Version 2.3.0

Merge commit '18b6e510f0c44d167dabc4637569d3a8d293083e' into stable
diff --git a/.gitignore b/.gitignore
index 2e3efaa3..8012a26 100644
--- a/.gitignore
+++ b/.gitignore
@@ -39,6 +39,9 @@
 .clang_complete
 cmake-build-debug
 
+# VS project files
+.vs
+
 # VSCode project files
 .vscode
 .history
diff --git a/.packages b/.packages
index a686ef2..c5944a1 100644
--- a/.packages
+++ b/.packages
@@ -16,7 +16,6 @@
 args:third_party/pkg/args/lib
 async:third_party/pkg/async/lib
 async_helper:pkg/async_helper/lib
-barback:third_party/pkg/barback/lib
 bazel_worker:third_party/pkg/bazel_worker/lib
 boolean_selector:third_party/pkg/boolean_selector/lib
 build_integration:pkg/build_integration/lib
@@ -48,7 +47,6 @@
 http_retry:third_party/pkg/http_retry/lib
 http_throttle:third_party/pkg/http_throttle/lib
 intl:third_party/pkg/intl/lib
-isolate:third_party/pkg/isolate/lib
 js:pkg/js/lib
 js_ast:pkg/js_ast/lib
 js_runtime:sdk/lib/_internal/js_runtime/lib
@@ -64,12 +62,13 @@
 mustache:third_party/pkg/mustache/lib
 oauth2:third_party/pkg/oauth2/lib
 observatory:runtime/observatory/lib
+observatory_test_package:runtime/observatory/tests/service/observatory_test_package
 package_config:third_party/pkg_tested/package_config/lib
 package_resolver:third_party/pkg_tested/package_resolver/lib
 path:third_party/pkg/path/lib
-plugin:third_party/pkg/plugin/lib
+pedantic:third_party/pkg/pedantic/lib
 pool:third_party/pkg/pool/lib
-protobuf:third_party/pkg/protobuf/lib
+protobuf:third_party/pkg/protobuf/protobuf/lib
 pub:third_party/pkg/pub/lib
 pub_semver:third_party/pkg/pub_semver/lib
 quiver:third_party/pkg/quiver/lib
@@ -90,7 +89,9 @@
 string_scanner:third_party/pkg/string_scanner/lib
 telemetry:pkg/telemetry/lib
 term_glyph:third_party/pkg/term_glyph/lib
-test:third_party/pkg/test/lib
+test:third_party/pkg/test/pkgs/test/lib
+test_api:third_party/pkg/test/pkgs/test_api/lib
+test_core:third_party/pkg/test/pkgs/test_core/lib
 test_dart:tools/testing/dart
 test_descriptor:third_party/pkg/test_descriptor/lib
 test_process:third_party/pkg/test_process/lib
@@ -99,7 +100,6 @@
 typed_data:third_party/pkg/typed_data/lib
 unittest:third_party/pkg/unittest/lib
 usage:third_party/pkg/usage/lib
-utf:third_party/pkg/utf/lib
 vm:pkg/vm/lib
 watcher:third_party/pkg/watcher/lib
 web_components:third_party/pkg/web_components/lib
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1289493..f5b0bcf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,245 @@
+## 2.3.0 - 2019-05-08
+
+The focus in this release is on the new "UI-as-code" language features which
+make collections more expressive and declarative.
+
+### Language
+
+Flutter is growing rapidly, which means many Dart users are building UI in code
+out of big deeply-nested expressions. Our goal with 2.3.0 was to [make that kind
+of code easier to write and maintain][ui-as-code]. Collection literals are a
+large component, so we focused on three features to make collections more
+powerful. We'll use list literals in the examples below, but these features also
+work in map and set literals.
+
+[ui-as-code]: https://medium.com/dartlang/making-dart-a-better-language-for-ui-f1ccaf9f546c
+
+#### Spread
+
+Placing `...` before an expression inside a collection literal unpacks the
+result of the expression and inserts its elements directly inside the new
+collection. Where before you had to write something like this:
+
+```dart
+CupertinoPageScaffold(
+  child: ListView(children: [
+    Tab2Header()
+  ]..addAll(buildTab2Conversation())
+    ..add(buildFooter())),
+);
+```
+
+Now you can write this:
+
+```dart
+CupertinoPageScaffold(
+  child: ListView(children: [
+    Tab2Header(),
+    ...buildTab2Conversation(),
+    buildFooter()
+  ]),
+);
+```
+
+If you know the expression might evaluate to null and you want to treat that as
+equivalent to zero elements, you can use the null-aware spread `...?`.
+
+#### Collection if
+
+Sometimes you might want to include one or more elements in a collection only
+under certain conditions. If you're lucky, you can use a `?:` operator to
+selectively swap out a single element, but if you want to exchange more than one
+or omit elements, you are forced to write imperative code like this:
+
+```dart
+Widget build(BuildContext context) {
+  var children = [
+    IconButton(icon: Icon(Icons.menu)),
+    Expanded(child: title)
+  ];
+
+  if (isAndroid) {
+    children.add(IconButton(icon: Icon(Icons.search)));
+  }
+
+  return Row(children: children);
+}
+```
+
+We now allow `if` inside collection literals to conditionally omit or (with
+`else`) swap out an element:
+
+```dart
+Widget build(BuildContext context) {
+  return Row(
+    children: [
+      IconButton(icon: Icon(Icons.menu)),
+      Expanded(child: title),
+      if (isAndroid)
+        IconButton(icon: Icon(Icons.search)),
+    ],
+  );
+}
+```
+
+Unlike the existing `?:` operator, a collection `if` can be composed with
+spreads to conditionally include or omit multiple items:
+
+```dart
+Widget build(BuildContext context) {
+  return Row(
+    children: [
+      IconButton(icon: Icon(Icons.menu)),
+      if (isAndroid) ...[
+        Expanded(child: title),
+        IconButton(icon: Icon(Icons.search)),
+      ]
+    ],
+  );
+}
+```
+
+#### Collection for
+
+In many cases, the higher-order methods on Iterable give you a declarative way
+to modify a collection in the context of a single expression. But some
+operations, especially involving both transforming and filtering, can be
+cumbersome to express in a functional style.
+
+To solve this problem, you can use `for` inside a collection literal. Each
+iteration of the loop produces an element which is then inserted in the
+resulting collection. Consider the following code:
+
+```dart
+var command = [
+  engineDartPath,
+  frontendServer,
+  ...fileSystemRoots.map((root) => "--filesystem-root=$root"),
+  ...entryPoints
+      .where((entryPoint) => fileExists("lib/$entryPoint.json"))
+      .map((entryPoint) => "lib/$entryPoint"),
+  mainPath
+];
+```
+
+With a collection `for`, the code becomes simpler:
+
+```dart
+var command = [
+  engineDartPath,
+  frontendServer,
+  for (var root in fileSystemRoots) "--filesystem-root=$root",
+  for (var entryPoint in entryPoints)
+    if (fileExists("lib/$entryPoint.json")) "lib/$entryPoint",
+  mainPath
+];
+```
+
+As you can see, all three of these features can be freely composed. For full
+details of the changes, see [the official proposal][ui-as-code proposal].
+
+[ui-as-code proposal]: https://github.com/dart-lang/language/blob/master/accepted/future-releases/unified-collections/feature-specification.md
+
+**Note: These features are not currently supported in *const* collection
+literals. In a future release, we intend to relax this restriction and allow
+spread and collection `if` inside const collections.**
+
+### Core library changes
+
+#### `dart:isolate`
+
+*   Added `debugName` property to `Isolate`.
+*   Added `debugName` optional parameter to `Isolate.spawn` and
+    `Isolate.spawnUri`.
+
+#### `dart:core`
+
+*   RegExp patterns can now use lookbehind assertions.
+*   RegExp patterns can now use named capture groups and named backreferences.
+    Currently, named group matches can only be retrieved in Dart either by the
+    implicit index of the named group or by downcasting the returned Match
+    object to the type RegExpMatch. The RegExpMatch interface contains methods
+    for retrieving the available group names and retrieving a match by group
+    name.
+
+### Dart VM
+
+*   The VM service now requires an authentication code by default. This behavior
+    can be disabled by providing the `--disable-service-auth-codes` flag.
+
+*   Support for deprecated flags '-c' and '--checked' has been removed.
+
+### Dart for the Web
+
+#### dart2js
+
+A binary format was added to dump-info. The old JSON format is still available
+and provided by default, but we are starting to deprecate it. The new binary
+format is more compact and cheaper to generate. On some large apps we tested, it
+was 4x faster to serialize and used 6x less memory.
+
+To use the binary format today, use `--dump-info=binary`, instead of
+`--dump-info`.
+
+What to expect next?
+
+*   The [visualizer tool][visualizer] will not be updated to support the new
+    binary format, but you can find several command-line tools at
+    `package:dart2js_info` that provide similar features to those in the
+    visualizer.
+
+*   The command-line tools in `package:dart2js_info` also work with the old JSON
+    format, so you can start using them even before you enable the new format.
+
+*   In a future release `--dump-info` will default to `--dump-info=binary`. At
+    that point, there will be an option to fallback to the JSON format, but the
+    visualizer tool will be deprecated.
+
+*   A release after that, the JSON format will no longer be available from
+    dart2js, but may be available from a command-line tool in
+    `package:dart2js_info`.
+
+[visualizer]: https://dart-lang.github.io/dump-info-visualizer/
+
+### Tools
+
+#### dartfmt
+
+*   Tweak set literal formatting to follow other collection literals.
+*   Add support for "UI as code" features.
+*   Properly format trailing commas in assertions.
+*   Improve indentation of adjacent strings in argument lists.
+
+#### Linter
+
+The Linter was updated to `0.1.86`, which includes the following changes:
+
+*   Added the following lints: `prefer_inlined_adds`,
+    `prefer_for_elements_to_map_fromIterable`,
+    `prefer_if_elements_to_conditional_expressions`,
+    `diagnostic_describe_all_properties`.
+*   Updated `file_names` to skip prefixed-extension Dart files (`.css.dart`,
+  `.g.dart`, etc.).
+*   Fixed false positives in `unnecessary_parenthesis`.
+
+#### Pub client
+
+*   Added a CHANGELOG validator that complains if you `pub publish` without
+    mentioning the current version.
+*   Removed validation of library names when doing `pub publish`.
+*   Added support for `pub global activate`ing package from a custom pub URL.
+*   Added subcommand: `pub logout`. Logs you out of the current session.
+
+#### Dart native
+
+Initial support for compiling Dart apps to native machine code has been added.
+Two new tools have been added to the `bin` folder of the Dart SDK:
+
+* `dart2aot`: AOT (ahead-of-time) compiles a Dart program to native
+machine code. The tool is supported on Windows, macOS, and Linux.
+
+* `dartaotruntime`: A small runtime used for executing an AOT compiled program.
+
 ## 2.2.0 - 2019-02-26
 
 ### Language
diff --git a/DEPS b/DEPS
index e8098e9..0ad497f 100644
--- a/DEPS
+++ b/DEPS
@@ -36,7 +36,7 @@
   "chromium_git": "https://chromium.googlesource.com",
   "fuchsia_git": "https://fuchsia.googlesource.com",
 
-  "co19_2_rev": "31f7dc1e222910ce64ab57ffee286382b03446a4",
+  "co19_2_rev": "a0a24a4bd5e4d913264fccfd600139af5b20c8e9",
 
   # As Flutter does, we use Fuchsia's GN and Clang toolchain. These revision
   # should be kept up to date with the revisions pulled by the Flutter engine.
@@ -54,7 +54,7 @@
   # Revisions of /third_party/* dependencies.
   "args_tag": "1.4.4",
   "async_tag": "2.0.8",
-  "bazel_worker_tag": "0.1.14",
+  "bazel_worker_tag": "bazel_worker-v0.1.20",
   "boolean_selector_tag" : "1.0.4",
   "boringssl_gen_rev": "bbf52f18f425e29b1185f2f6753bec02ed8c5880",
   "boringssl_rev" : "702e2b6d3831486535e958f262a05c75a5cb312e",
@@ -64,41 +64,41 @@
   "collection_tag": "1.14.11",
   "convert_tag": "2.0.2",
   "crypto_tag" : "2.0.6",
-  "csslib_tag" : "0.14.4+1",
-  "dart2js_info_tag" : "0.5.15",
+  "csslib_tag" : "0.15.0",
+  "dart2js_info_tag" : "0.6.0",
 
-  # Note: updates to dart_style have to be coordinated carefully with
-  # the infrastructure-team so that the internal formatter in
-  # `sdk/tools/sdks/dart-sdk/bin/dartfmt` matches the version here.
+  # Note: Updates to dart_style have to be coordinated with the infrastructure
+  # team so that the internal formatter in `tools/sdks/dart-sdk/bin/dartfmt`
+  # matches the version here.
   #
   # Please follow this process to make updates:
-  #   * file an issue with area-infrastructure requesting a roll for this
-  #     package (please also indicate what version to roll).
-  #   * let the infrastructure team submit the change on your behalf,
-  #     so they can build a new dev release and roll the submitted sdks a few
-  #     minutes later.
+  #
+  # *   Create a commit that updates the version here to the desired version and
+  #     adds any appropriate CHANGELOG text.
+  # *   Send that to eng-prod to review. They will update the checked-in SDK
+  #     and land the review.
   #
   # For more details, see https://github.com/dart-lang/sdk/issues/30164
-  "dart_style_tag": "1.2.2",  # Please see the note above before updating.
+  "dart_style_tag": "1.2.7",  # Please see the note above before updating.
 
-  "dartdoc_tag" : "v0.28.1+2",
+  "dartdoc_tag" : "v0.28.2",
   "fixnum_tag": "0.10.9",
   "glob_tag": "1.1.7",
-  "html_tag" : "0.13.3+2",
+  "html_tag" : "0.14.0+1",
   "http_io_rev": "57da05a66f5bf7df3dd7aebe7b7efe0dfc477baa",
   "http_multi_server_tag" : "2.0.5",
-  "http_parser_tag" : "3.1.1",
+  "http_parser_tag" : "3.1.3",
   "http_retry_tag": "0.1.1",
-  "http_tag" : "0.12.0",
+  "http_tag" : "0.12.0+2",
   "http_throttle_tag" : "1.0.2",
   "idl_parser_rev": "5fb1ebf49d235b5a70c9f49047e83b0654031eb7",
   "intl_tag": "0.15.7",
   "jinja2_rev": "2222b31554f03e62600cd7e383376a7c187967a1",
   "json_rpc_2_tag": "2.0.9",
-  "linter_tag": "0.1.82",
+  "linter_tag": "0.1.86",
   "logging_tag": "0.11.3+2",
   "markupsafe_rev": "8f45f5cfa0009d2a70589bcda0349b8cb2b72783",
-  "markdown_tag": "2.0.2",
+  "markdown_tag": "2.0.3",
   "matcher_tag": "0.12.3",
   "mime_tag": "0.9.6+2",
   "mockito_tag": "d39ac507483b9891165e422ec98d9fb480037c8b",
@@ -106,13 +106,13 @@
   "oauth2_tag": "1.2.1",
   "observatory_pub_packages_rev": "0894122173b0f98eb08863a7712e78407d4477bc",
   "package_config_tag": "1.0.5",
-  "package_resolver_tag": "1.0.4",
+  "package_resolver_tag": "1.0.10",
   "path_tag": "1.6.2",
-  "plugin_tag": "f5b4b0e32d1406d62daccea030ba6457d14b1c47",
+  "pedantic_tag": "v1.5.0",
   "ply_rev": "604b32590ffad5cbb82e4afef1d305512d06ae93",
   "pool_tag": "1.3.6",
-  "protobuf_tag": "0.9.0",
-  "pub_rev": "9f00679ef47bc79cadc18e143720ade6c06c0100",
+  "protobuf_rev": "0c77167b16d00b561a6055bfe26690af7f26ae88",
+  "pub_rev": "8c363fe26f059c3063f1129adbb3c4e22a8ce954",
   "pub_semver_tag": "1.4.2",
   "quiver_tag": "2.0.0+1",
   "resource_rev": "2.1.5",
@@ -124,19 +124,18 @@
   "source_map_stack_trace_tag": "1.1.5",
   "source_maps-0.9.4_rev": "38524",
   "source_maps_tag": "8af7cc1a1c3a193c1fba5993ce22a546a319c40e",
-  "source_span_tag": "1.4.1",
+  "source_span_tag": "1.5.5",
   "stack_trace_tag": "1.9.3",
-  "stream_channel_tag": "1.6.8",
+  "stream_channel_tag": "2.0.0",
   "string_scanner_tag": "1.0.3",
   "test_descriptor_tag": "1.1.1",
   "test_process_tag": "1.0.3",
   "term_glyph_tag": "1.0.1",
   "test_reflective_loader_tag": "0.1.8",
-  "test_tag": "1.3.4",
+  "test_tag": "test-v1.6.1",
   "typed_data_tag": "1.1.6",
   "unittest_rev": "2b8375bc98bb9dc81c539c91aaea6adce12e1072",
   "usage_tag": "3.4.0",
-  "utf_tag": "0.9.0+5",
   "watcher_rev": "0.9.7+12",
   "web_components_rev": "8f57dac273412a7172c8ade6f361b407e2e4ed02",
   "web_socket_channel_tag": "1.0.9",
@@ -157,14 +156,14 @@
   Var("dart_root") + "/tools/sdks": {
       "packages": [{
           "package": "dart/dart-sdk/${{platform}}",
-          "version": "version:2.1.1-dev.1.0",
+          "version": "version:2.2.1-dev.3.1",
       }],
       "dep_type": "cipd",
   },
   Var("dart_root") + "/third_party/d8": {
       "packages": [{
           "package": "dart/d8",
-          "version": "version:6.9.427.23+1",
+          "version": "version:7.5.149",
       }],
       "dep_type": "cipd",
   },
@@ -303,12 +302,12 @@
       + "@" + Var("package_resolver_tag"),
   Var("dart_root") + "/third_party/pkg/path":
       Var("dart_git") + "path.git" + "@" + Var("path_tag"),
-  Var("dart_root") + "/third_party/pkg/plugin":
-      Var("dart_git") + "plugin.git" + "@" + Var("plugin_tag"),
+  Var("dart_root") + "/third_party/pkg/pedantic":
+      Var("dart_git") + "pedantic.git" + "@" + Var("pedantic_tag"),
   Var("dart_root") + "/third_party/pkg/pool":
       Var("dart_git") + "pool.git" + "@" + Var("pool_tag"),
   Var("dart_root") + "/third_party/pkg/protobuf":
-      Var("dart_git") + "protobuf.git" + "@" + Var("protobuf_tag"),
+      Var("dart_git") + "protobuf.git" + "@" + Var("protobuf_rev"),
   Var("dart_root") + "/third_party/pkg/pub_semver":
       Var("dart_git") + "pub_semver.git" + "@" + Var("pub_semver_tag"),
   Var("dart_root") + "/third_party/pkg/pub":
@@ -365,8 +364,6 @@
       "@" + Var("unittest_rev"),
   Var("dart_root") + "/third_party/pkg/usage":
       Var("dart_git") + "usage.git" + "@" + Var("usage_tag"),
-  Var("dart_root") + "/third_party/pkg/utf":
-      Var("dart_git") + "utf.git" + "@" + Var("utf_tag"),
   Var("dart_root") + "/third_party/pkg/watcher":
       Var("dart_git") + "watcher.git" + "@" + Var("watcher_rev"),
   Var("dart_root") + "/third_party/pkg/web_components":
@@ -437,7 +434,7 @@
     ],
   },
   {
-    "name": "7zip",
+    "name": "front_end_benchmark_data",
     "pattern": ".",
     "action": [
       "download_from_google_storage",
@@ -445,10 +442,10 @@
       "--no_resume",
       "--bucket",
       "dart-dependencies",
-      "--platform=win32",
+      "--recursive",
       "--extract",
-      "-s",
-      Var('dart_root') + "/third_party/7zip.tar.gz.sha1",
+      "--directory",
+      Var('dart_root') + "/pkg/front_end/test/fasta/types",
     ],
   },
   {
@@ -495,4 +492,30 @@
     'pattern': '.',
     'action': ['python', 'sdk/build/vs_toolchain.py', 'update'],
   },
+  {
+    # Download dill files for all supported ABI versions, if necessary.
+    'name': 'abiversions',
+    'pattern': '.',
+    'action': ['python', 'sdk/tools/download_abi_dills.py'],
+  },
 ]
+
+hooks_os = {
+  "win": [
+    {
+      "name": "7zip",
+      "pattern": ".",
+      "action": [
+        "download_from_google_storage",
+        "--no_auth",
+        "--no_resume",
+        "--bucket",
+        "dart-dependencies",
+        "--platform=win32",
+        "--extract",
+        "-s",
+        Var('dart_root') + "/third_party/7zip.tar.gz.sha1",
+      ],
+    },
+  ]
+}
diff --git a/WATCHLISTS b/WATCHLISTS
index 598f0ab..538f457 100644
--- a/WATCHLISTS
+++ b/WATCHLISTS
@@ -50,9 +50,6 @@
         ')$'
       )
     },
-    'mirrors' : {
-      'filepath': '.*mirrors.*',
-    },
     'observatory': {
       'filepath': (
         '^runtime/bin/vmservice/|'
@@ -79,8 +76,7 @@
     'kernel': [ 'karlklose@google.com', 'jensj@google.com', 'kmillikin@google.com',
                 'alexmarkov@google.com' ],
     'messages_review': [ 'dart-uxr+reviews@google.com' ],
-    'mirrors' : [ 'rmacnak@google.com' ],
-    'observatory': [ 'rmacnak@google.com' ],
+    'observatory': [ 'bkonyi@google.com' ],
     'package_vm': [ 'alexmarkov@google.com' ],
     'runtime': [ 'vm-dev@dartlang.org' ],
     'vm_compiler': [ 'dart-vm-compiler-team+reviews@google.com' ],
diff --git a/build/linux/sysroot_scripts/install-sysroot.py b/build/linux/sysroot_scripts/install-sysroot.py
index 4500023..304824d9 100755
--- a/build/linux/sysroot_scripts/install-sysroot.py
+++ b/build/linux/sysroot_scripts/install-sysroot.py
@@ -131,8 +131,6 @@
   if os.path.exists(stamp):
     with open(stamp) as s:
       if s.read() == url:
-        print '%s %s sysroot image already up to date: %s' % \
-            (target_platform, target_arch, sysroot)
         return
 
   print 'Installing Debian %s %s root image: %s' % \
diff --git a/docs/language/Dart.g b/docs/language/Dart.g
deleted file mode 100644
index f586c96..0000000
--- a/docs/language/Dart.g
+++ /dev/null
@@ -1,1764 +0,0 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// *** This grammar is under development and it contains known bugs. ***
-//
-// CHANGES:
-//
-// v0.2 Changed top level variable declarations to avoid redundant and
-// misleading occurrence of (FINAL|CONST).
-//
-// v0.1 First version available in the SDK github repository. Covers the
-// Dart language as specified in the language specification based on the
-// many grammar rule snippets. That grammar was then adjusted to remove
-// known issues (e.g., misplaced metadata) and to resolve ambiguities.
-
-grammar Dart;
-
-@parser::header{
-import java.util.Stack;
-}
-
-@lexer::header{
-import java.util.Stack;
-}
-
-@parser::members {
-  static String filePath = null;
-  static boolean errorHasOccurred = false;
-
-  /// Must be invoked before the first error is reported for a library.
-  /// Will print the name of the library and indicate that it has errors.
-  static void prepareForErrors() {
-    errorHasOccurred = true;
-    System.err.println("Syntax error in " + filePath + ":");
-  }
-
-  /// Parse library, return true if success, false if errors occurred.
-  public boolean parseLibrary(String filePath) throws RecognitionException {
-    this.filePath = filePath;
-    errorHasOccurred = false;
-    libraryDefinition();
-    return !errorHasOccurred;
-  }
-
-  /// Produce grammar debugging friendly output, as described in 'The
-  /// Definitive ANTLR Reference', p247.
-  public String getErrorMessage(RecognitionException e, String[] tokenNames) {
-    List stack = getRuleInvocationStack(e, this.getClass().getName());
-    String msg = null;
-    if (e instanceof NoViableAltException) {
-      NoViableAltException nvae = (NoViableAltException)e;
-      msg = "no viable alt; token=" + e.token +
-          " (decision=" + nvae.decisionNumber +
-          " state " + nvae.stateNumber + ")" +
-          " decision=<<" + nvae.grammarDecisionDescription + ">>";
-    }
-    else {
-      msg = super.getErrorMessage(e, tokenNames);
-    }
-    if (!errorHasOccurred) prepareForErrors();
-    return stack + " " + msg;
-  }
-
-  public String getTokenErrorDisplay(Token t) {
-    return t.toString();
-  }
-
-  // Enable the parser to treat ASYNC/AWAIT/YIELD as keywords in the body of an
-  // `async`, `async*`, or `sync*` function. Access via methods below.
-  private Stack<Boolean> asyncEtcAreKeywords = new Stack<Boolean>();
-  { asyncEtcAreKeywords.push(false); }
-
-  // Use this to indicate that we are now entering an `async`, `async*`,
-  // or `sync*` function.
-  void startAsyncFunction() { asyncEtcAreKeywords.push(true); }
-
-  // Use this to indicate that we are now entering a function which is
-  // neither `async`, `async*`, nor `sync*`.
-  void startNonAsyncFunction() { asyncEtcAreKeywords.push(false); }
-
-  // Use this to indicate that we are now leaving any funciton.
-  void endFunction() { asyncEtcAreKeywords.pop(); }
-
-  // Whether we can recognize ASYNC/AWAIT/YIELD as an identifier/typeIdentifier.
-  boolean asyncEtcPredicate(int tokenId) {
-    if (tokenId == ASYNC || tokenId == AWAIT || tokenId == YIELD) {
-      return !asyncEtcAreKeywords.peek();
-    }
-    return false;
-  }
-
-  // Debugging support methods.
-  void dp(int indent, String method, String sep) {
-    for (int i = 0; i < indent; i++) {
-      System.out.print("  ");
-    }
-    System.out.println(method + sep + " " + input.LT(1) + " " + state.failed);
-  }
-
-  void dpBegin(int indent, String method) { dp(indent, method, ":"); }
-  void dpEnd(int indent, String method) { dp(indent, method, " END:"); }
-  void dpCall(int indent, String method) { dp(indent, method, "?"); }
-  void dpCalled(int indent, String method) { dp(indent, method, ".."); }
-  void dpResult(int indent, String method) { dp(indent, method, "!"); }
-}
-
-@lexer::members{
-  public static final int BRACE_NORMAL = 1;
-  public static final int BRACE_SINGLE = 2;
-  public static final int BRACE_DOUBLE = 3;
-  public static final int BRACE_THREE_SINGLE = 4;
-  public static final int BRACE_THREE_DOUBLE = 5;
-
-  /// This override ensures that lexer errors are recognized as errors,
-  /// but does not change the format of the reported error.
-  public String getErrorMessage(RecognitionException e, String[] tokenNames) {
-    if (!DartParser.errorHasOccurred) DartParser.prepareForErrors();
-    return super.getErrorMessage(e, tokenNames);
-  }
-
-  // Enable the parser to handle string interpolations via brace matching.
-  // The top of the `braceLevels` stack describes the most recent unmatched
-  // '{'. This is needed in order to enable/disable certain lexer rules.
-  //
-  //   NORMAL: Most recent unmatched '{' was not string literal related.
-  //   SINGLE: Most recent unmatched '{' was `'...${`.
-  //   DOUBLE: Most recent unmatched '{' was `"...${`.
-  //   THREE_SINGLE: Most recent unmatched '{' was `'''...${`.
-  //   THREE_DOUBLE: Most recent unmatched '{' was `"""...${`.
-  //
-  // Access via functions below.
-  private Stack<Integer> braceLevels = new Stack<Integer>();
-
-  // Whether we are currently in a string literal context, and which one.
-  boolean currentBraceLevel(int braceLevel) {
-    if (braceLevels.empty()) return false;
-    return braceLevels.peek() == braceLevel;
-  }
-
-  // Use this to indicate that we are now entering a specific '{...}'.
-  // Call it after accepting the '{'.
-  void enterBrace() {
-    braceLevels.push(BRACE_NORMAL);
-  }
-  void enterBraceSingleQuote() {
-    braceLevels.push(BRACE_SINGLE);
-  }
-  void enterBraceDoubleQuote() {
-    braceLevels.push(BRACE_DOUBLE);
-  }
-  void enterBraceThreeSingleQuotes() {
-    braceLevels.push(BRACE_THREE_SINGLE);
-  }
-  void enterBraceThreeDoubleQuotes() {
-    braceLevels.push(BRACE_THREE_DOUBLE);
-  }
-
-  // Use this to indicate that we are now exiting a specific '{...}',
-  // no matter which kind. Call it before accepting the '}'.
-  void exitBrace() {
-      // We might raise a parse error here if the stack is empty, but the
-      // parsing rules should ensure that we get a parse error anyway, and
-      // it is not a big problem for the spec parser even if it misinterprets
-      // the brace structure of some programs with syntax errors.
-      if (!braceLevels.empty()) braceLevels.pop();
-  }
-}
-
-// ---------------------------------------- Grammar rules.
-
-libraryDefinition
-    :    FEFF? SCRIPT_TAG?
-         ((metadata LIBRARY) => libraryName)?
-         ((metadata (IMPORT | EXPORT)) => importOrExport)*
-         ((metadata PART) => partDirective)*
-         (metadata topLevelDefinition)*
-         EOF
-    ;
-
-topLevelDefinition
-    :    classDefinition
-    |    enumType
-    |    (TYPEDEF typeIdentifier typeParameters? '=') => typeAlias
-    |    (TYPEDEF functionPrefix ('<' | '(')) => typeAlias
-    |    (EXTERNAL functionSignature ';') => EXTERNAL functionSignature ';'
-    |    (EXTERNAL getterSignature) => EXTERNAL getterSignature ';'
-    |    (EXTERNAL type? SET identifier '(') =>
-         EXTERNAL setterSignature ';'
-    |    (getterSignature functionBodyPrefix) => getterSignature functionBody
-    |    (type? SET identifier '(') => setterSignature functionBody
-    |    (type? identifierNotFUNCTION typeParameters? '(') =>
-         functionSignature functionBody
-    |    (FINAL | CONST) type? staticFinalDeclarationList ';'
-    |    topLevelVariableDeclaration ';'
-    ;
-
-topLevelVariableDeclaration
-    :    varOrType identifier ('=' expression)? (',' initializedIdentifier)*
-    ;
-
-declaredIdentifier
-    :    COVARIANT? finalConstVarOrType identifier
-    ;
-
-finalConstVarOrType
-    :    FINAL type?
-    |    CONST type?
-    |    varOrType
-    ;
-
-varOrType
-    :    VAR
-    |    type
-    ;
-
-initializedIdentifier
-    :    identifier ('=' expression)?
-    ;
-
-initializedIdentifierList
-    :    initializedIdentifier (',' initializedIdentifier)*
-    ;
-
-functionSignature
-    :    type? identifierNotFUNCTION formalParameterPart
-    ;
-
-functionBodyPrefix
-    :    ASYNC? '=>'
-    |    (ASYNC | ASYNC '*' | SYNC '*')? LBRACE
-    ;
-
-functionBody
-    :    '=>' { startNonAsyncFunction(); } expression { endFunction(); } ';'
-    |    { startNonAsyncFunction(); } block { endFunction(); }
-    |    ASYNC '=>'
-         { startAsyncFunction(); } expression { endFunction(); } ';'
-    |    (ASYNC | ASYNC '*' | SYNC '*')
-         { startAsyncFunction(); } block { endFunction(); }
-    ;
-
-block
-    :    LBRACE statements RBRACE
-    ;
-
-formalParameterPart
-    :    typeParameters? formalParameterList
-    ;
-
-formalParameterList
-    :    '(' ')'
-    |    '(' normalFormalParameters (','? | ',' optionalFormalParameters) ')'
-    |    '(' optionalFormalParameters ')'
-    ;
-
-normalFormalParameters
-    :    normalFormalParameter (',' normalFormalParameter)*
-    ;
-
-optionalFormalParameters
-    :    optionalPositionalFormalParameters
-    |    namedFormalParameters
-    ;
-
-optionalPositionalFormalParameters
-    :    '[' defaultFormalParameter (',' defaultFormalParameter)* ','? ']'
-    ;
-
-namedFormalParameters
-    :    LBRACE defaultNamedParameter (',' defaultNamedParameter)* ','? RBRACE
-    ;
-
-normalFormalParameter
-    :    metadata normalFormalParameterNoMetadata
-    ;
-
-normalFormalParameterNoMetadata
-    :    (COVARIANT? type? identifierNotFUNCTION formalParameterPart) =>
-         functionFormalParameter
-    |    (finalConstVarOrType? THIS) => fieldFormalParameter
-    |    simpleFormalParameter
-    ;
-
-// NB: It is an anomaly that a functionFormalParameter cannot be FINAL.
-functionFormalParameter
-    :    COVARIANT? type? identifierNotFUNCTION formalParameterPart
-    ;
-
-simpleFormalParameter
-    :    declaredIdentifier
-    |    COVARIANT? identifier
-    ;
-
-// NB: It is an anomaly that VAR can be a return type (`var this.x()`).
-fieldFormalParameter
-    :    finalConstVarOrType? THIS '.' identifier formalParameterPart?
-    ;
-
-defaultFormalParameter
-    :    normalFormalParameter ('=' expression)?
-    ;
-
-defaultNamedParameter
-    :    normalFormalParameter ((':' | '=') expression)?
-    ;
-
-typeApplication
-    :    typeIdentifier typeParameters?
-    ;
-
-classDefinition
-    :    (ABSTRACT? CLASS typeApplication (EXTENDS|IMPLEMENTS|LBRACE)) =>
-         ABSTRACT? CLASS typeApplication (superclass mixins?)? interfaces?
-         LBRACE (metadata classMemberDefinition)* RBRACE
-    |    (ABSTRACT? CLASS typeApplication '=') =>
-         ABSTRACT? CLASS mixinApplicationClass
-    ;
-
-mixins
-    :    WITH typeNotVoidNotFunctionList
-    ;
-
-classMemberDefinition
-    :    (methodSignature functionBodyPrefix) => methodSignature functionBody
-    |    declaration ';'
-    ;
-
-methodSignature
-    :    (constructorSignature ':') => constructorSignature initializers
-    |    (FACTORY constructorName '(') => factoryConstructorSignature
-    |    (STATIC? type? identifierNotFUNCTION typeParameters? '(') =>
-         STATIC? functionSignature
-    |    (STATIC? type? GET) => STATIC? getterSignature
-    |    (STATIC? type? SET) => STATIC? setterSignature
-    |    (type? OPERATOR operator '(') => operatorSignature
-    |    constructorSignature
-    ;
-
-// https://github.com/dart-lang/sdk/issues/29501 reports on the problem which
-// was solved by adding a case for redirectingFactoryConstructorSignature.
-// TODO(eernst): Close that issue when this is integrated into the spec.
-
-// https://github.com/dart-lang/sdk/issues/29502 reports on the problem that
-// than external const factory constructor declaration cannot be derived by
-// the spec grammar (and also not by this grammar). The following fixes were
-// introduced for that: Added the 'factoryConstructorSignature' case below in
-// 'declaration'; also added 'CONST?' in the 'factoryConstructorSignature'
-// rule, such that const factories in general are allowed.
-// TODO(eernst): Close that issue when this is integrated into the spec.
-
-// TODO(eernst): Note that `EXTERNAL? STATIC? functionSignature` includes
-// `STATIC functionSignature`, but a static function cannot be abstract.
-// We might want to make that a syntax error rather than a static semantic
-// check.
-
-declaration
-    :    (EXTERNAL CONST? FACTORY constructorName '(') =>
-         EXTERNAL factoryConstructorSignature
-    |    (EXTERNAL CONST constructorName '(') =>
-         EXTERNAL constantConstructorSignature
-    |    (EXTERNAL constructorName '(') => EXTERNAL constructorSignature
-    |    ((EXTERNAL STATIC?)? type? GET identifier) =>
-         (EXTERNAL STATIC?)? getterSignature
-    |    ((EXTERNAL STATIC?)? type? SET identifier) =>
-         (EXTERNAL STATIC?)? setterSignature
-    |    (EXTERNAL? type? OPERATOR) => EXTERNAL? operatorSignature
-    |    (STATIC (FINAL | CONST)) =>
-         STATIC (FINAL | CONST) type? staticFinalDeclarationList
-    |    FINAL type? initializedIdentifierList
-    |    ((STATIC | COVARIANT)? (VAR | type) identifier ('=' | ',' | ';')) =>
-         (STATIC | COVARIANT)? (VAR | type) initializedIdentifierList
-    |    (EXTERNAL? STATIC? functionSignature ';') =>
-         EXTERNAL? STATIC? functionSignature
-    |    (CONST? FACTORY constructorName formalParameterList '=') =>
-         redirectingFactoryConstructorSignature
-    |    constantConstructorSignature (redirection | initializers)?
-    |    constructorSignature (redirection | initializers)?
-    ;
-
-staticFinalDeclarationList
-    :    staticFinalDeclaration (',' staticFinalDeclaration)*
-    ;
-
-staticFinalDeclaration
-    :    identifier '=' expression
-    ;
-
-operatorSignature
-    :    type? OPERATOR operator formalParameterList
-    ;
-
-operator
-    :    '~'
-    |    binaryOperator
-    |    '[' ']'
-    |    '[' ']' '='
-    ;
-
-binaryOperator
-    :    multiplicativeOperator
-    |    additiveOperator
-    |    (shiftOperator) => shiftOperator
-    |    relationalOperator
-    |    '=='
-    |    bitwiseOperator
-    ;
-
-getterSignature
-    :    type? GET identifier
-    ;
-
-setterSignature
-    :    type? SET identifier formalParameterList
-    ;
-
-constructorSignature
-    :    constructorName formalParameterList
-    ;
-
-constructorName
-    :    typeIdentifier ('.' identifier)?
-    ;
-
-redirection
-    :    ':' THIS ('.' identifier)? arguments
-    ;
-
-initializers
-    :    ':' superCallOrFieldInitializer (',' superCallOrFieldInitializer)*
-    ;
-
-superCallOrFieldInitializer
-    :    SUPER arguments
-    |    SUPER '.' identifier arguments
-    |    fieldInitializer
-    |    assertClause
-    ;
-
-fieldInitializer
-    :    (THIS '.')? identifier '=' conditionalExpression cascadeSection*
-    ;
-
-factoryConstructorSignature
-    :    CONST? FACTORY constructorName formalParameterList
-    ;
-
-redirectingFactoryConstructorSignature
-    :    CONST? FACTORY constructorName formalParameterList '='
-         constructorDesignation
-    ;
-
-constantConstructorSignature
-    :    CONST constructorName formalParameterList
-    ;
-
-superclass
-    :    EXTENDS typeNotVoidNotFunction
-    ;
-
-interfaces
-    :    IMPLEMENTS typeNotVoidNotFunctionList
-    ;
-
-mixinApplicationClass
-    :    typeApplication '=' mixinApplication ';'
-    ;
-
-mixinApplication
-    :    typeNotVoidNotFunction mixins interfaces?
-    ;
-
-enumType
-    :    ENUM typeIdentifier LBRACE enumEntry (',' enumEntry)* (',')? RBRACE
-    ;
-
-enumEntry
-    :    metadata identifier
-    ;
-
-typeParameter
-    :    metadata typeIdentifier (EXTENDS typeNotVoid)?
-    ;
-
-typeParameters
-    :    '<' typeParameter (',' typeParameter)* '>'
-    ;
-
-metadata
-    :    ('@' metadatum)*
-    ;
-
-metadatum
-    :    constructorDesignation arguments
-    |    qualified
-    ;
-
-expression
-    :    (formalParameterPart functionExpressionBodyPrefix) =>
-         functionExpression
-    |    throwExpression
-    |    (assignableExpression assignmentOperator) =>
-         assignableExpression assignmentOperator expression
-    |    conditionalExpression cascadeSection*
-    ;
-
-expressionWithoutCascade
-    :    (formalParameterPart functionExpressionBodyPrefix) =>
-         functionExpressionWithoutCascade
-    |    throwExpressionWithoutCascade
-    |    (assignableExpression assignmentOperator) =>
-         assignableExpression assignmentOperator expressionWithoutCascade
-    |    conditionalExpression
-    ;
-
-expressionList
-    :    expression (',' expression)*
-    ;
-
-primary
-    :    thisExpression
-    |    SUPER unconditionalAssignableSelector
-    |    (CONST constructorDesignation) => constObjectExpression
-    |    newExpression
-    |    (formalParameterPart functionPrimaryBodyPrefix) => functionPrimary
-    |    '(' expression ')'
-    |    literal
-    |    identifier
-    ;
-
-literal
-    :    nullLiteral
-    |    booleanLiteral
-    |    numericLiteral
-    |    stringLiteral
-    |    symbolLiteral
-    |    (CONST? typeArguments? LBRACE) => mapLiteral
-    |    listLiteral
-    ;
-
-nullLiteral
-    :    NULL
-    ;
-
-numericLiteral
-    :    NUMBER
-    |    HEX_NUMBER
-    ;
-
-booleanLiteral
-    :    TRUE
-    |    FALSE
-    ;
-
-stringLiteral
-    :    (multiLineString | singleLineString)+
-    ;
-
-stringLiteralWithoutInterpolation
-    :    singleLineStringWithoutInterpolation+
-    ;
-
-listLiteral
-    :    CONST? typeArguments? '[' (expressionList ','?)? ']'
-    ;
-
-mapLiteral
-    :    CONST? typeArguments?
-         LBRACE (mapLiteralEntry (',' mapLiteralEntry)* ','?)? RBRACE
-    ;
-
-mapLiteralEntry
-    :    expression ':' expression
-    ;
-
-throwExpression
-    :    THROW expression
-    ;
-
-throwExpressionWithoutCascade
-    :    THROW expressionWithoutCascade
-    ;
-
-functionExpression
-    :    formalParameterPart functionExpressionBody
-    ;
-
-functionExpressionBody
-    :    '=>' { startNonAsyncFunction(); } expression { endFunction(); }
-    |    ASYNC '=>' { startAsyncFunction(); } expression { endFunction(); }
-    ;
-
-functionExpressionBodyPrefix
-    :    ASYNC? '=>'
-    ;
-
-functionExpressionWithoutCascade
-    :    formalParameterPart functionExpressionWithoutCascadeBody
-    ;
-
-functionExpressionWithoutCascadeBody
-    :    '=>' { startNonAsyncFunction(); }
-         expressionWithoutCascade { endFunction(); }
-    |    ASYNC '=>' { startAsyncFunction(); }
-         expressionWithoutCascade { endFunction(); }
-    ;
-
-functionPrimary
-    :    formalParameterPart functionPrimaryBody
-    ;
-
-functionPrimaryBody
-    :    { startNonAsyncFunction(); } block { endFunction(); }
-    |    (ASYNC | ASYNC '*' | SYNC '*')
-         { startAsyncFunction(); } block { endFunction(); }
-    ;
-
-functionPrimaryBodyPrefix
-    : (ASYNC | ASYNC '*' | SYNC '*')? LBRACE
-    ;
-
-thisExpression
-    :    THIS
-    ;
-
-newExpression
-    :    NEW constructorDesignation arguments
-    ;
-
-constObjectExpression
-    :    CONST constructorDesignation arguments
-    ;
-
-arguments
-    :    '(' (argumentList ','?)? ')'
-    ;
-
-argumentList
-    :    namedArgument (',' namedArgument)*
-    |    expressionList (',' namedArgument)*
-    ;
-
-namedArgument
-    :    label expression
-    ;
-
-cascadeSection
-    :    '..'
-         (cascadeSelector argumentPart*)
-         (assignableSelector argumentPart*)*
-         (assignmentOperator expressionWithoutCascade)?
-    ;
-
-cascadeSelector
-    :    '[' expression ']'
-    |    identifier
-    ;
-
-assignmentOperator
-    :    '='
-    |    compoundAssignmentOperator
-    ;
-
-compoundAssignmentOperator
-    :    '*='
-    |    '/='
-    |    '~/='
-    |    '%='
-    |    '+='
-    |    '-='
-    |    '<<='
-    |    '>' '>' '='
-    |    '&='
-    |    '^='
-    |    '|='
-    |    '??='
-    ;
-
-conditionalExpression
-    :    ifNullExpression
-         ('?' expressionWithoutCascade ':' expressionWithoutCascade)?
-    ;
-
-ifNullExpression
-    :    logicalOrExpression ('??' logicalOrExpression)*
-    ;
-
-logicalOrExpression
-    :    logicalAndExpression ('||' logicalAndExpression)*
-    ;
-
-logicalAndExpression
-    :    equalityExpression ('&&' equalityExpression)*
-    ;
-
-equalityExpression
-    :    relationalExpression (equalityOperator relationalExpression)?
-    |    SUPER equalityOperator relationalExpression
-    ;
-
-equalityOperator
-    :    '=='
-    |    '!='
-    ;
-
-relationalExpression
-    :    bitwiseOrExpression
-         (typeTest | typeCast | relationalOperator bitwiseOrExpression)?
-    |    SUPER relationalOperator bitwiseOrExpression
-    ;
-
-relationalOperator
-    :    '>' '='
-    |    '>'
-    |    '<='
-    |    '<'
-    ;
-
-bitwiseOrExpression
-    :    bitwiseXorExpression ('|' bitwiseXorExpression)*
-    |    SUPER ('|' bitwiseXorExpression)+
-    ;
-
-bitwiseXorExpression
-    :    bitwiseAndExpression ('^' bitwiseAndExpression)*
-    |    SUPER ('^' bitwiseAndExpression)+
-    ;
-
-bitwiseAndExpression
-    :    shiftExpression ('&' shiftExpression)*
-    |    SUPER ('&' shiftExpression)+
-    ;
-
-bitwiseOperator
-    :    '&'
-    |    '^'
-    |    '|'
-    ;
-
-shiftExpression
-    :    additiveExpression (shiftOperator additiveExpression)*
-    |    SUPER (shiftOperator additiveExpression)+
-    ;
-
-shiftOperator
-    :    '<<'
-    |    '>' '>'
-    ;
-
-additiveExpression
-    :    multiplicativeExpression (additiveOperator multiplicativeExpression)*
-    |    SUPER (additiveOperator multiplicativeExpression)+
-    ;
-
-additiveOperator
-    :    '+'
-    |    '-'
-    ;
-
-multiplicativeExpression
-    :    unaryExpression (multiplicativeOperator unaryExpression)*
-    |    SUPER (multiplicativeOperator unaryExpression)+
-    ;
-
-multiplicativeOperator
-    :    '*'
-    |    '/'
-    |    '%'
-    |    '~/'
-    ;
-
-unaryExpression
-    :    (prefixOperator ~SUPER) => prefixOperator unaryExpression
-    |    (awaitExpression) => awaitExpression
-    |    postfixExpression
-    |    (minusOperator | tildeOperator) SUPER
-    |    incrementOperator assignableExpression
-    ;
-
-prefixOperator
-    :    minusOperator
-    |    negationOperator
-    |    tildeOperator
-    ;
-
-minusOperator
-    :    '-'
-    ;
-
-negationOperator
-    :    '!'
-    ;
-
-tildeOperator
-    :    '~'
-    ;
-
-awaitExpression
-    :    AWAIT unaryExpression
-    ;
-
-// The `(selector)` predicate ensures that the parser commits to the longest
-// possible chain of selectors, e.g., `a<b,c>(d)` as a call rather than as a
-// sequence of two relational expressions.
-
-postfixExpression
-    :    (assignableExpression postfixOperator) =>
-         assignableExpression postfixOperator
-    |    (typeName typeArguments '.') =>
-         constructorInvocation ((selector) => selector)*
-    |    primary ((selector) => selector)*
-    ;
-
-constructorInvocation
-    :    typeName typeArguments '.' identifier arguments
-    ;
-
-postfixOperator
-    :    incrementOperator
-    ;
-
-selector
-    :    assignableSelector
-    |    argumentPart
-    ;
-
-argumentPart
-    :    typeArguments? arguments
-    ;
-
-incrementOperator
-    :    '++'
-    |    '--'
-    ;
-
-// The `(assignableSelectorPart)` predicate ensures that the parser
-// commits to the longest possible chain, e.g., `a<b,c>(d).e` as one rather
-// than two expressions. The first `identifier` alternative handles all
-// the simple cases; the final `identifier` alternative at the end catches
-// the case where we have `identifier '<'` and the '<' is used as a
-// relationalOperator, not the beginning of typeArguments.
-
-assignableExpression
-    :    (SUPER unconditionalAssignableSelector
-            ~('<' | '(' | '[' | '.' | '?.')) =>
-         SUPER unconditionalAssignableSelector
-    |    (typeName typeArguments '.' identifier '(') =>
-         constructorInvocation
-         ((assignableSelectorPart) => assignableSelectorPart)+
-    |    (identifier ~('<' | '(' | '[' | '.' | '?.')) => identifier
-    |    (primary assignableSelectorPart) =>
-         primary ((assignableSelectorPart) => assignableSelectorPart)+
-    |    identifier
-    ;
-
-assignableSelectorPart
-    :    argumentPart* assignableSelector
-    ;
-
-unconditionalAssignableSelector
-    :    '[' expression ']'
-    |    '.' identifier
-    ;
-
-assignableSelector
-    :    unconditionalAssignableSelector
-    |    '?.' identifier
-    ;
-
-identifierNotFUNCTION
-    :    IDENTIFIER
-    |    ABSTRACT // Built-in identifier.
-    |    AS // Built-in identifier.
-    |    COVARIANT // Built-in identifier.
-    |    DEFERRED // Built-in identifier.
-    |    DYNAMIC // Built-in identifier.
-    |    EXPORT // Built-in identifier.
-    |    EXTERNAL // Built-in identifier.
-    |    FACTORY // Built-in identifier.
-    |    GET // Built-in identifier.
-    |    IMPLEMENTS // Built-in identifier.
-    |    IMPORT // Built-in identifier.
-    |    LIBRARY // Built-in identifier.
-    |    OPERATOR // Built-in identifier.
-    |    PART // Built-in identifier.
-    |    SET // Built-in identifier.
-    |    STATIC // Built-in identifier.
-    |    TYPEDEF // Built-in identifier.
-    |    HIDE // Not a built-in identifier.
-    |    OF // Not a built-in identifier.
-    |    ON // Not a built-in identifier.
-    |    SHOW // Not a built-in identifier.
-    |    SYNC // Not a built-in identifier.
-    |    { asyncEtcPredicate(input.LA(1)) }? (ASYNC|AWAIT|YIELD)
-    ;
-
-identifier
-    :    identifierNotFUNCTION
-    |    FUNCTION // Built-in identifier that can be used as a type.
-    ;
-
-qualified
-    :    typeIdentifier
-    |    typeIdentifier '.' identifier
-    |    typeIdentifier '.' typeIdentifier '.' identifier
-    ;
-
-typeIdentifier
-    :    IDENTIFIER
-    |    DYNAMIC // Built-in identifier that can be used as a type.
-    |    HIDE // Not a built-in identifier.
-    |    OF // Not a built-in identifier.
-    |    ON // Not a built-in identifier.
-    |    SHOW // Not a built-in identifier.
-    |    SYNC // Not a built-in identifier.
-    |    { asyncEtcPredicate(input.LA(1)) }? (ASYNC|AWAIT|YIELD)
-    ;
-
-typeTest
-    :    isOperator typeNotVoid
-    ;
-
-isOperator
-    :    IS '!'?
-    ;
-
-typeCast
-    :    asOperator typeNotVoid
-    ;
-
-asOperator
-    :    AS
-    ;
-
-statements
-    :    statement*
-    ;
-
-statement
-    :    label* nonLabelledStatement
-    ;
-
-// Exception in the language specification: An expressionStatement cannot
-// start with LBRACE. We force anything that starts with LBRACE to be a block,
-// which will prevent an expressionStatement from starting with LBRACE, and
-// which will not interfere with the recognition of any other case. If we
-// add another statement which can start with LBRACE we must adjust this
-// check.
-nonLabelledStatement
-    :    (LBRACE) => block
-    |    (metadata declaredIdentifier ('='|','|';')) =>
-         localVariableDeclaration
-    |    (AWAIT? FOR) => forStatement
-    |    whileStatement
-    |    doStatement
-    |    switchStatement
-    |    ifStatement
-    |    rethrowStatement
-    |    tryStatement
-    |    breakStatement
-    |    continueStatement
-    |    returnStatement
-    |    (metadata functionSignature functionBodyPrefix) =>
-         localFunctionDeclaration
-    |    assertStatement
-    |    (YIELD ~'*') => yieldStatement
-    |    yieldEachStatement
-    |    expressionStatement
-    ;
-
-expressionStatement
-    :    expression? ';'
-    ;
-
-localVariableDeclaration
-    :    metadata initializedVariableDeclaration ';'
-    ;
-
-initializedVariableDeclaration
-    :    declaredIdentifier ('=' expression)? (',' initializedIdentifier)*
-    ;
-
-localFunctionDeclaration
-    :    metadata functionSignature functionBody
-    ;
-
-ifStatement
-    :    IF '(' expression ')' statement ((ELSE) => ELSE statement | ())
-    ;
-
-forStatement
-    :    AWAIT? FOR '(' forLoopParts ')' statement
-    ;
-
-forLoopParts
-    :    (metadata declaredIdentifier IN) =>
-         metadata declaredIdentifier IN expression
-    |    (metadata identifier IN) => metadata identifier IN expression
-    |    forInitializerStatement expression? ';' expressionList?
-    ;
-
-// The localVariableDeclaration cannot be CONST, but that can
-// be enforced in a later phase, and the grammar allows it.
-forInitializerStatement
-    :    (localVariableDeclaration) => localVariableDeclaration
-    |    expression? ';'
-    ;
-
-whileStatement
-    :    WHILE '(' expression ')' statement
-    ;
-
-doStatement
-    :    DO statement WHILE '(' expression ')' ';'
-    ;
-
-switchStatement
-    :    SWITCH '(' expression ')' LBRACE switchCase* defaultCase? RBRACE
-    ;
-
-switchCase
-    :    label* CASE expression ':' statements
-    ;
-
-defaultCase
-    :    label* DEFAULT ':' statements
-    ;
-
-rethrowStatement
-    :    RETHROW ';'
-    ;
-
-tryStatement
-    :    TRY block (onParts finallyPart? | finallyPart)
-    ;
-
-onPart
-    :    catchPart block
-    |    ON typeNotVoid catchPart? block
-    ;
-
-onParts
-    :    (onPart (ON|CATCH)) => onPart onParts
-    |    onPart
-    ;
-
-catchPart
-    :    CATCH '(' identifier (',' identifier)? ')'
-    ;
-
-finallyPart
-    :    FINALLY block
-    ;
-
-returnStatement
-    :    RETURN expression? ';'
-    ;
-
-label
-    :    identifier ':'
-    ;
-
-breakStatement
-    :    BREAK identifier? ';'
-    ;
-
-continueStatement
-    :    CONTINUE identifier? ';'
-    ;
-
-yieldStatement
-    :    YIELD expression ';'
-    ;
-
-yieldEachStatement
-    :    YIELD '*' expression ';'
-    ;
-
-assertStatement
-    :    assertClause ';'
-    ;
-
-assertClause
-    :    ASSERT '(' expression (',' expression)? ','? ')'
-    ;
-
-libraryName
-    :    metadata LIBRARY identifier ('.' identifier)* ';'
-    ;
-
-importOrExport
-    :    (metadata IMPORT) => libraryImport
-    |    (metadata EXPORT) => libraryExport
-    ;
-
-libraryImport
-    :    metadata importSpecification
-    ;
-
-importSpecification
-    :    IMPORT uri (AS identifier)? combinator* ';'
-    |    IMPORT uri DEFERRED AS identifier combinator* ';'
-    ;
-
-combinator
-    :    SHOW identifierList
-    |    HIDE identifierList
-    ;
-
-identifierList
-    :    identifier (',' identifier)*
-    ;
-
-libraryExport
-    :    metadata EXPORT uri combinator* ';'
-    ;
-
-partDirective
-    :    metadata PART uri ';'
-    ;
-
-partHeader
-    :    metadata PART OF identifier ('.' identifier)* ';'
-    ;
-
-partDeclaration
-    :    partHeader topLevelDefinition* EOF
-    ;
-
-uri
-    :    stringLiteralWithoutInterpolation
-    ;
-
-type
-    :    (FUNCTION ('('|'<')) => functionTypeTails
-    |    (typeNotFunction FUNCTION ('('|'<')) =>
-         typeNotFunction functionTypeTails
-    |    typeNotFunction
-    ;
-
-typeNotFunction
-    :    typeNotVoidNotFunction
-    |    VOID
-    ;
-
-typeNotVoid
-    :    (typeNotFunction? FUNCTION ('('|'<')) => functionType
-    |    typeNotVoidNotFunction
-    ;
-
-typeNotVoidNotFunction
-    :    typeName typeArguments?
-    |    FUNCTION
-    ;
-
-typeName
-    :    typeIdentifier ('.' typeIdentifier)?
-    ;
-
-typeArguments
-    :    '<' typeList '>'
-    ;
-
-typeList
-    :    type (',' type)*
-    ;
-
-typeNotVoidNotFunctionList
-    :    typeNotVoidNotFunction (',' typeNotVoidNotFunction)*
-    ;
-
-typeAlias
-    :    (TYPEDEF typeIdentifier typeParameters? '=') =>
-         TYPEDEF typeIdentifier typeParameters? '=' functionType ';'
-    |    TYPEDEF functionTypeAlias
-    ;
-
-functionTypeAlias
-    :    functionPrefix formalParameterPart ';'
-    ;
-
-functionPrefix
-    :    (type identifier) => type identifier
-    |    identifier
-    ;
-
-functionTypeTail
-    :    FUNCTION typeParameters? parameterTypeList
-    ;
-
-functionTypeTails
-    :    (functionTypeTail FUNCTION ('<'|'(')) =>
-         functionTypeTail functionTypeTails
-    |    functionTypeTail
-    ;
-
-functionType
-    :    (FUNCTION ('<'|'(')) => functionTypeTails
-    |    typeNotFunction functionTypeTails
-    ;
-
-parameterTypeList
-    :    ('(' ')') => '(' ')'
-    |    ('(' normalParameterTypes ',' ('['|'{')) =>
-         '(' normalParameterTypes ',' optionalParameterTypes ')'
-    |    ('(' normalParameterTypes ','? ')') =>
-         '(' normalParameterTypes ','? ')'
-    |    '(' optionalParameterTypes ')'
-    ;
-
-normalParameterTypes
-    :    normalParameterType (',' normalParameterType)*
-    ;
-
-normalParameterType
-    :    (typedIdentifier) => typedIdentifier
-    |    type
-    ;
-
-optionalParameterTypes
-    :    optionalPositionalParameterTypes
-    |    namedParameterTypes
-    ;
-
-optionalPositionalParameterTypes
-    :    '[' normalParameterTypes ','? ']'
-    ;
-
-namedParameterTypes
-    :    LBRACE typedIdentifier (',' typedIdentifier)* ','? RBRACE
-    ;
-
-typedIdentifier
-    :    type identifier
-    ;
-
-constructorDesignation
-    :    qualified
-    |    typeName typeArguments ('.' identifier)?
-    ;
-
-// Predicate: Force resolution as composite symbolLiteral as far as possible.
-symbolLiteral
-    :    '#' (operator | (identifier (('.' identifier) => '.' identifier)*))
-    ;
-
-singleLineStringWithoutInterpolation
-    :    RAW_SINGLE_LINE_STRING
-    |    SINGLE_LINE_STRING_DQ_BEGIN_END
-    |    SINGLE_LINE_STRING_SQ_BEGIN_END
-    ;
-
-singleLineString
-    :    RAW_SINGLE_LINE_STRING
-    |    SINGLE_LINE_STRING_SQ_BEGIN_END
-    |    SINGLE_LINE_STRING_SQ_BEGIN_MID expression
-         (SINGLE_LINE_STRING_SQ_MID_MID expression)*
-         SINGLE_LINE_STRING_SQ_MID_END
-    |    SINGLE_LINE_STRING_DQ_BEGIN_END
-    |    SINGLE_LINE_STRING_DQ_BEGIN_MID expression
-         (SINGLE_LINE_STRING_DQ_MID_MID expression)*
-         SINGLE_LINE_STRING_DQ_MID_END
-    ;
-
-multiLineString
-    :    RAW_MULTI_LINE_STRING
-    |    MULTI_LINE_STRING_SQ_BEGIN_END
-    |    MULTI_LINE_STRING_SQ_BEGIN_MID expression
-         (MULTI_LINE_STRING_SQ_MID_MID expression)*
-         MULTI_LINE_STRING_SQ_MID_END
-    |    MULTI_LINE_STRING_DQ_BEGIN_END
-    |    MULTI_LINE_STRING_DQ_BEGIN_MID expression
-         (MULTI_LINE_STRING_DQ_MID_MID expression)*
-         MULTI_LINE_STRING_DQ_MID_END
-    ;
-
-// ---------------------------------------- Lexer rules.
-
-fragment
-LETTER
-    :    'a' .. 'z'
-    |    'A' .. 'Z'
-    ;
-
-fragment
-DIGIT
-    :    '0' .. '9'
-    ;
-
-fragment
-EXPONENT
-    :    ('e' | 'E') ('+' | '-')? DIGIT+
-    ;
-
-fragment
-HEX_DIGIT
-    :    ('a' | 'b' | 'c' | 'd' | 'e' | 'f')
-    |    ('A' | 'B' | 'C' | 'D' | 'E' | 'F')
-    |    DIGIT
-    ;
-
-FINAL
-    :    'final'
-    ;
-
-CONST
-    :    'const'
-    ;
-
-VAR
-    :    'var'
-    ;
-
-VOID
-    :    'void'
-    ;
-
-ASYNC
-    :    'async'
-    ;
-
-THIS
-    :    'this'
-    ;
-
-ABSTRACT
-    :    'abstract'
-    ;
-
-AS
-    :    'as'
-    ;
-
-SYNC
-    :    'sync'
-    ;
-
-CLASS
-    :    'class'
-    ;
-
-WITH
-    :    'with'
-    ;
-
-STATIC
-    :    'static'
-    ;
-
-DYNAMIC
-    :    'dynamic'
-    ;
-
-EXTERNAL
-    :    'external'
-    ;
-
-GET
-    :    'get'
-    ;
-
-SET
-    :    'set'
-    ;
-
-OPERATOR
-    :    'operator'
-    ;
-
-SUPER
-    :    'super'
-    ;
-
-FACTORY
-    :    'factory'
-    ;
-
-EXTENDS
-    :    'extends'
-    ;
-
-IMPLEMENTS
-    :    'implements'
-    ;
-
-ENUM
-    :    'enum'
-    ;
-
-NULL
-    :    'null'
-    ;
-
-TRUE
-    :    'true'
-    ;
-
-FALSE
-    :    'false'
-    ;
-
-THROW
-    :    'throw'
-    ;
-
-NEW
-    :    'new'
-    ;
-
-AWAIT
-    :    'await'
-    ;
-
-DEFERRED
-    :    'deferred'
-    ;
-
-EXPORT
-    :    'export'
-    ;
-
-IMPORT
-    :    'import'
-    ;
-
-LIBRARY
-    :    'library'
-    ;
-
-PART
-    :    'part'
-    ;
-
-TYPEDEF
-    :    'typedef'
-    ;
-
-IS
-    :    'is'
-    ;
-
-IF
-    :    'if'
-    ;
-
-ELSE
-    :    'else'
-    ;
-
-WHILE
-    :    'while'
-    ;
-
-FOR
-    :    'for'
-    ;
-
-IN
-    :    'in'
-    ;
-
-DO
-    :    'do'
-    ;
-
-SWITCH
-    :    'switch'
-    ;
-
-CASE
-    :    'case'
-    ;
-
-DEFAULT
-    :    'default'
-    ;
-
-RETHROW
-    :    'rethrow'
-    ;
-
-TRY
-    :    'try'
-    ;
-
-ON
-    :    'on'
-    ;
-
-CATCH
-    :    'catch'
-    ;
-
-FINALLY
-    :    'finally'
-    ;
-
-RETURN
-    :    'return'
-    ;
-
-BREAK
-    :    'break'
-    ;
-
-CONTINUE
-    :    'continue'
-    ;
-
-YIELD
-    :    'yield'
-    ;
-
-SHOW
-    :    'show'
-    ;
-
-HIDE
-    :    'hide'
-    ;
-
-OF
-    :    'of'
-    ;
-
-ASSERT
-    :    'assert'
-    ;
-
-COVARIANT
-    :    'covariant'
-    ;
-
-FUNCTION
-    :    'Function'
-    ;
-
-NUMBER
-    :    (DIGIT+ '.' DIGIT) => DIGIT+ '.' DIGIT+ EXPONENT?
-    |    DIGIT+ EXPONENT?
-    |    '.' DIGIT+ EXPONENT?
-    ;
-
-HEX_NUMBER
-    :    '0x' HEX_DIGIT+
-    |    '0X' HEX_DIGIT+
-    ;
-
-RAW_SINGLE_LINE_STRING
-    :    'r' '\'' (~('\'' | '\r' | '\n'))* '\''
-    |    'r' '"' (~('"' | '\r' | '\n'))* '"'
-    ;
-
-RAW_MULTI_LINE_STRING
-    :    'r' '"""' (options {greedy=false;} : .)* '"""'
-    |    'r' '\'\'\'' (options {greedy=false;} : .)* '\'\'\''
-    ;
-
-fragment
-SIMPLE_STRING_INTERPOLATION
-    :    '$' IDENTIFIER_NO_DOLLAR
-    ;
-
-fragment
-STRING_CONTENT_SQ
-    :    ~('\\' | '\'' | '$' |  '\r' | '\n')
-    |    '\\' ~( '\r' | '\n')
-    |    SIMPLE_STRING_INTERPOLATION
-    ;
-
-SINGLE_LINE_STRING_SQ_BEGIN_END
-    :    '\'' STRING_CONTENT_SQ* '\''
-    ;
-
-SINGLE_LINE_STRING_SQ_BEGIN_MID
-    :    '\'' STRING_CONTENT_SQ* '${' { enterBraceSingleQuote(); }
-    ;
-
-SINGLE_LINE_STRING_SQ_MID_MID
-    :    { currentBraceLevel(BRACE_SINGLE) }? =>
-         ('}' STRING_CONTENT_SQ* '${') =>
-         { exitBrace(); } '}' STRING_CONTENT_SQ* '${'
-         { enterBraceSingleQuote(); }
-    ;
-
-SINGLE_LINE_STRING_SQ_MID_END
-    :    { currentBraceLevel(BRACE_SINGLE) }? =>
-         ('}' STRING_CONTENT_SQ* '\'') =>
-         { exitBrace(); } '}' STRING_CONTENT_SQ* '\''
-    ;
-
-fragment
-STRING_CONTENT_DQ
-    :    ~('\\' | '"' | '$' | '\r' | '\n')
-    |    '\\' ~('\r' | '\n')
-    |    SIMPLE_STRING_INTERPOLATION
-    ;
-
-SINGLE_LINE_STRING_DQ_BEGIN_END
-    :    '"' STRING_CONTENT_DQ* '"'
-    ;
-
-SINGLE_LINE_STRING_DQ_BEGIN_MID
-    :    '"' STRING_CONTENT_DQ* '${' { enterBraceDoubleQuote(); }
-    ;
-
-SINGLE_LINE_STRING_DQ_MID_MID
-    :    { currentBraceLevel(BRACE_DOUBLE) }? =>
-         ('}' STRING_CONTENT_DQ* '${') =>
-         { exitBrace(); } '}' STRING_CONTENT_DQ* '${'
-         { enterBraceDoubleQuote(); }
-    ;
-
-SINGLE_LINE_STRING_DQ_MID_END
-    :    { currentBraceLevel(BRACE_DOUBLE) }? =>
-         ('}' STRING_CONTENT_DQ* '"') =>
-         { exitBrace(); } '}' STRING_CONTENT_DQ* '"'
-    ;
-
-fragment
-QUOTES_SQ
-    :
-    |    '\''
-    |    '\'\''
-    ;
-
-// Read string contents, which may be almost anything, but stop when seeing
-// '\'\'\'' and when seeing '${'. We do this by allowing all other
-// possibilities including escapes, simple interpolation, and fewer than
-// three '\''.
-fragment
-STRING_CONTENT_TSQ
-    :    QUOTES_SQ
-         (~('\\' | '$' | '\'') | '\\' . | SIMPLE_STRING_INTERPOLATION)
-    ;
-
-MULTI_LINE_STRING_SQ_BEGIN_END
-    :    '\'\'\'' STRING_CONTENT_TSQ* '\'\'\''
-    ;
-
-MULTI_LINE_STRING_SQ_BEGIN_MID
-    :    '\'\'\'' STRING_CONTENT_TSQ* QUOTES_SQ '${'
-         { enterBraceThreeSingleQuotes(); }
-    ;
-
-MULTI_LINE_STRING_SQ_MID_MID
-    :    { currentBraceLevel(BRACE_THREE_SINGLE) }? =>
-         ('}' STRING_CONTENT_TSQ* QUOTES_SQ '${') =>
-         { exitBrace(); } '}' STRING_CONTENT_TSQ* QUOTES_SQ '${'
-         { enterBraceThreeSingleQuotes(); }
-    ;
-
-MULTI_LINE_STRING_SQ_MID_END
-    :    { currentBraceLevel(BRACE_THREE_SINGLE) }? =>
-         ('}' STRING_CONTENT_TSQ* '\'\'\'') =>
-         { exitBrace(); } '}' STRING_CONTENT_TSQ* '\'\'\''
-    ;
-
-fragment
-QUOTES_DQ
-    :
-    |    '"'
-    |    '""'
-    ;
-
-// Read string contents, which may be almost anything, but stop when seeing
-// '"""' and when seeing '${'. We do this by allowing all other possibilities
-// including escapes, simple interpolation, and fewer-than-three '"'.
-fragment
-STRING_CONTENT_TDQ
-    :    QUOTES_DQ
-         (~('\\' | '$' | '"') | '\\' . | SIMPLE_STRING_INTERPOLATION)
-    ;
-
-MULTI_LINE_STRING_DQ_BEGIN_END
-    :    '"""' STRING_CONTENT_TDQ* '"""'
-    ;
-
-MULTI_LINE_STRING_DQ_BEGIN_MID
-    :    '"""' STRING_CONTENT_TDQ* QUOTES_DQ '${'
-         { enterBraceThreeDoubleQuotes(); }
-    ;
-
-MULTI_LINE_STRING_DQ_MID_MID
-    :    { currentBraceLevel(BRACE_THREE_DOUBLE) }? =>
-         ('}' STRING_CONTENT_TDQ* QUOTES_DQ '${') =>
-         { exitBrace(); } '}' STRING_CONTENT_TDQ* QUOTES_DQ '${'
-         { enterBraceThreeDoubleQuotes(); }
-    ;
-
-MULTI_LINE_STRING_DQ_MID_END
-    :    { currentBraceLevel(BRACE_THREE_DOUBLE) }? =>
-         ('}' STRING_CONTENT_TDQ* '"""') =>
-         { exitBrace(); } '}' STRING_CONTENT_TDQ* '"""'
-    ;
-
-LBRACE
-    :    '{' { enterBrace(); }
-    ;
-
-RBRACE
-    :    { currentBraceLevel(BRACE_NORMAL) }? => ('}') => { exitBrace(); } '}'
-    ;
-
-fragment
-IDENTIFIER_START_NO_DOLLAR
-    :    LETTER
-    |    '_'
-    ;
-
-fragment
-IDENTIFIER_PART_NO_DOLLAR
-    :    IDENTIFIER_START_NO_DOLLAR
-    |    DIGIT
-    ;
-
-fragment
-IDENTIFIER_NO_DOLLAR
-    :    IDENTIFIER_START_NO_DOLLAR IDENTIFIER_PART_NO_DOLLAR*
-    ;
-
-fragment
-IDENTIFIER_START
-    :    IDENTIFIER_START_NO_DOLLAR
-    |    '$'
-    ;
-
-fragment
-IDENTIFIER_PART
-    :    IDENTIFIER_START
-    |    DIGIT
-    ;
-
-SCRIPT_TAG
-    :    '#!' (~('\r' | '\n'))* NEWLINE
-    ;
-
-IDENTIFIER
-    :    IDENTIFIER_START IDENTIFIER_PART*
-    ;
-
-SINGLE_LINE_COMMENT
-    :    '//' (~('\r' | '\n'))* NEWLINE?
-         { skip(); }
-    ;
-
-MULTI_LINE_COMMENT
-    :    '/*' (options {greedy=false;} : (MULTI_LINE_COMMENT | .))* '*/'
-         { skip(); }
-    ;
-
-fragment
-NEWLINE
-    :    ('\r' | '\n' | '\r\n')
-    ;
-
-FEFF
-    :    '\uFEFF'
-    ;
-
-WS
-    :    (' ' | '\t' | '\r' | '\n')+
-         { skip(); }
-    ;
diff --git a/docs/language/dart.sty b/docs/language/dart.sty
index 0ad847e..77d8efa 100644
--- a/docs/language/dart.sty
+++ b/docs/language/dart.sty
@@ -107,27 +107,28 @@
 \newcommand{\Case}[1]{\textbf{Case }$\langle\hspace{0.1em}${#1}$\hspace{0.1em}\rangle$\textbf{.}}
 \newcommand{\EndCase}{\mbox{}\hfill$\scriptscriptstyle\Box$\xspace}
 
-\newenvironment{dartCode}[1][!ht] {
+\newenvironment{dartCode}[1][!ht] {%
   \def\@programcr{\@addfield\strut}%
   \let\\=\@programcr%
   \relax\@vobeyspaces\obeylines%
   \ttfamily\color{commentaryColor}%
-  \vspace{1em}
+  \vspace{1em}%
 }{\normalcolor\vspace{1em}}
 
-\newenvironment{normativeDartCode}[1][!ht] {
+\newenvironment{normativeDartCode}[1][!ht] {%
   \def\@programcr{\@addfield\strut}%
   \let\\=\@programcr%
   \relax\@vobeyspaces\obeylines%
   \ttfamily\color{normativeColor}%
-  \vspace{1em}
+  \vspace{1em}%
 }{\normalcolor\vspace{1em}}
 
 % Used for comments in a code context.
 \def\comment#1{\textsf{#1}}
 
-% A commonly used name for an identifier
+% A commonly used metavariable for an identifier, operator.
 \newcommand{\id}{\metavar{id}}
+\newcommand{\op}{\metavar{op}}
 
 % Used for defining occurrence of phrase, with customized index entry.
 \newcommand{\IndexCustom}[2]{%
@@ -142,7 +143,7 @@
 \newcommand{\Index}[1]{\IndexCustom{#1}{#1}}
 
 % Same appearance, but not adding an entry to the index.
-\newcommand{\NoIndex}[1]{
+\newcommand{\NoIndex}[1]{%
   \leavevmode\marginpar{\ensuremath{\diamond}}\emph{#1}}
 
 % Used to specify comma separated lists of similar symbols.
diff --git a/docs/language/dartLangSpec.tex b/docs/language/dartLangSpec.tex
index 04bdb83..6cb53cc 100644
--- a/docs/language/dartLangSpec.tex
+++ b/docs/language/dartLangSpec.tex
@@ -173,6 +173,9 @@
 % - Integrate generalized-void.md. Introduces syntactic support for using
 %   `void` in many new locations, including variable type annotations and
 %   actual type arguments; also adds errors for using values of type `void`.
+% - Integrate implicit_creation.md, specifying how some constant expressions
+%   can be written without `const`, and all occurrences of `new` can be
+%   omitted.
 %
 % 1.15
 % - Change how language specification describes control flow.
@@ -419,24 +422,85 @@
 \IndexCustom{fresh variable}{variable!fresh},
 it means a variable with a name that doesn't occur anywhere
 in the current program.
-When the specification introduces a fresh variable bound to a value, the fresh variable is implicitly bound in a surrounding scope.
+When the specification introduces a fresh variable bound to an object,
+the fresh variable is implicitly bound in a surrounding scope.
 
 \LMHash{}%
-References to otherwise unspecified names of program entities (such as classes or functions) are interpreted as the names of members of the Dart core library.
+References to otherwise unspecified names of program entities
+(such as classes or functions)
+are interpreted as the names of members of the Dart core library.
 
-\commentary{
-Examples would be the classes \code{Object} and \code{Type} representing the root of the class hierarchy and the reification of run-time types respectively.
+\commentary{%
+Examples would be the classes \code{Object} and \code{Type}
+representing, respectively, the root of the class hierarchy and
+the reification of run-time types.
+%
+It would be possible to declare, e.g.,
+a local variable named \code{Object},
+so it is generally incorrect to assume that
+the name \code{Object} will actually resolve to said core class.
+However, we will generally omit mentioning this, for brevity.%
 }
 
+%% TODO(eernst): We need to get rid of the concept of `is equivalent to`,
+%% cf. language issue https://github.com/dart-lang/language/issues/227.
+%% In this CL the phrase `treated as` has been introduced in a few places,
+%% and the above-mentioned issue 227 will give rise to a complete revision
+%% of this aspect of this document. In particular, the next paragraph will
+%% be deleted.
+
 \LMHash{}%
 When the specification says that one piece of syntax \Index{is equivalent to}
 another piece of syntax, it means that it is equivalent in all ways,
 and the former syntax should generate the same compile-time errors
 and have the same run-time behavior as the latter, if any.
-\commentary{
-Error messages, if any, should always refer to the original syntax.
+\commentary{%
+Error messages, if any, should always refer to the original syntax.%
 }
-If execution or evaluation of a construct is said to be equivalent to execution or evaluation of another construct, then only the run-time behavior is equivalent, and compile-time errors apply only for the original syntax.
+If execution or evaluation of a construct is said to be
+equivalent to execution or evaluation of another construct,
+then only the run-time behavior is equivalent,
+and compile-time errors apply only for the original syntax.
+
+\LMHash{}%
+When the specification says that one piece of syntax $s$ is
+\Index{treated as}
+another piece of syntax $s'$,
+it means that the static analysis of $s$ is the static analysis of $s'$
+(\commentary{in particular, exactly the same compile-time errors occur}).
+Moreover, if $s$ has no compile-time errors then
+the behavior of $s$ at run time is exactly the behavior of $s'$.
+
+\rationale{%
+Error \emph{messages}, if any, should always refer to the original syntax $s$.%
+}
+
+\commentary{%
+In short, whenever $s$ is treated as $s'$,
+the reader should immediately switch to the section about $s'$
+in order to get any further information about
+the static analysis and dynamic semantics of $s$.%
+}
+
+\rationale{%
+The notion of being `treated as' is similar to the notion of syntactic sugar:
+``$s$ is treated as $s'$''
+could as well have been worded
+``$s$ is desugared into $s'$''.
+Of course, it should then actually be called ``semantic sugar'',
+because the applicability of the transformation and the construction of $s'$
+may rely on information from static analysis.
+
+The point is that we only specify the static analysis and dynamic semantics
+of a core language which is a subset of Dart
+(just slightly smaller than Dart),
+and desugaring transforms any given Dart program to
+a program in that core language.
+This helps keeping the language specification consistent and comprehensible,
+because it shows directly
+that some language features are introducing essential semantics,
+and others are better described as mere abbreviations of existing constructs.%
+}
 
 
 \section{Overview}
@@ -852,6 +916,12 @@
 is a variable whose declaration includes the modifier \CONST{}.
 A constant variable must be initialized to a constant expression (\ref{constants}) or a compile-time error occurs.
 
+\commentary{%
+An initializing expression of a constant variable occurs in a constant context
+(\ref{constantContexts}),
+which means that \CONST{} modifiers need not be specified explicitly.%
+}
+
 \LMHash{}%
 A \IndexCustom{final variable}{variable!final}
 is a variable whose binding is fixed upon initialization;
@@ -3056,7 +3126,7 @@
 
 \LMHash{}%
 Then if any instance variable of $i$ declared by the immediately enclosing class
-is not yet bound to a value,
+is not yet bound to an object,
 all such variables are initialized with the null object (\ref{null}).
 
 \LMHash{}%
@@ -4588,13 +4658,13 @@
 
 \begin{normativeDartCode}
 $m$ \CLASS{} $E$ \{
-  \FINAL{} int index;
-  \CONST{} $E$(\THIS{}.index);
-  $m_0$ \STATIC{} \CONST{} $E$ $\id_0$ = \CONST{} $E$(0);
-  $\ldots$
-  $m_{n-1}$ \STATIC{} \CONST{} $E$ $\id_{n-1}$ = const $E$(n - 1);
-  \STATIC{} \CONST{} List<$E$> values = const <$E$>[\id$_0, \ldots, $ \id$_{n-1}$];
-  String toString() => \{ 0: `$E$.\id$_0$', $\ldots$, n-1: `$E$.\id$_{n-1}$'\}[index]
+\ \ \FINAL{} int index;
+\ \ \CONST{} $E$(\THIS{}.index);
+\ \ $m_0$ \STATIC{} \CONST{} $E$ $\id_0$ = \CONST{} $E$(0);
+\ \ $\ldots$
+\ \ $m_{n-1}$ \STATIC{} \CONST{} $E$ $\id_{n-1}$ = const $E$(n - 1);
+\ \ \STATIC{} \CONST{} List<$E$> values = const <$E$>[\id$_0, \ldots, $ \id$_{n-1}$];
+\ \ String toString() => \{ 0: `$E$.\id$_0$', $\ldots$, n-1: `$E$.\id$_{n-1}$'\}[index]
 \}
 \end{normativeDartCode}
 
@@ -5720,82 +5790,91 @@
 Dart supports metadata which is used to attach user defined annotations to program structures.
 
 \begin{grammar}
-<metadata> ::= (`@' <qualified> (`.' <identifier>)? (<arguments>)?)*
+<metadata> ::= (`@' <qualified> (`.' <identifier>)? <arguments>?)*
 \end{grammar}
 
 \LMHash{}%
-Metadata consists of a series of annotations, each of which begin with the character @, followed by a constant expression that starts with an identifier.
-It is a compile-time error if the expression is not one of the following:
+Metadata consists of a series of annotations,
+each of which begin with the character \lit{@},
+followed by a constant expression $e$ derivable from
+\syntax{<qualified> (`.' <identifier>)? <arguments>?}.
+It is a compile-time error if $e$ is not one of the following:
 \begin{itemize}
 \item A reference to a constant variable.
 \item A call to a constant constructor.
 \end{itemize}
 
+\commentary{%
+The expression $e$ occurs in a constant context
+(\ref{constantContexts}),
+which means that \CONST{} modifiers need not be specified explicitly.
+}
+
 \LMHash{}%
-Metadata is associated with the abstract syntax tree of the program construct $p$ that immediately follows the metadata, assuming $p$ is not itself metadata or a comment.
-Metadata can be retrieved at run time via a reflective call, provided the annotated program construct $p$ is accessible via reflection.
+Metadata is associated with the abstract syntax tree
+of the program construct $p$ that immediately follows the metadata,
+and which is not itself metadata or a comment.
+Metadata can be retrieved at run time via a reflective call,
+provided the annotated program construct $p$ is accessible via reflection.
 
 \commentary{
-Obviously, metadata can also be retrieved statically by parsing the program and evaluating the constants via a suitable interpreter.
-In fact many if not most uses of metadata are entirely static.
+Obviously, metadata can also be retrieved statically by
+parsing the program and evaluating the constants via a suitable interpreter.
+In fact, many if not most uses of metadata are entirely static.
 }
 
 \rationale{
-It is important that no run-time overhead be incurred by the introduction of metadata that is not actually used.
-Because metadata only involves constants, the time at which it is computed is irrelevant so that implementations may skip the metadata during ordinary parsing and execution and evaluate it lazily.
+It is important that no run-time overhead be incurred by
+the introduction of metadata that is not actually used.
+Because metadata only involves constants,
+the time at which it is computed is irrelevant.
+So implementations may skip the metadata during ordinary parsing and execution,
+and evaluate it lazily.
 }
 
 \commentary{
-It is possible to associate metadata with constructs that may not be accessible via reflection, such as local variables (though it is conceivable that in the future, richer reflective libraries might provide access to these as well).
+It is possible to associate metadata with constructs
+that may not be accessible via reflection,
+such as local variables
+(though it is conceivable that in the future,
+richer reflective libraries might provide access to these as well).
 This is not as useless as it might seem.
 As noted above, the data can be retrieved statically if source code is available.
 }
 
 \LMHash{}%
-Metadata can appear before a library, part header, class, typedef, type parameter, constructor, factory, function, parameter, or variable declaration and before an import, export or part directive.
+Metadata can appear before a library, part header, class,
+typedef, type parameter, constructor, factory, function,
+parameter, or variable declaration,
+and before an import, export, or part directive.
 
 \LMHash{}%
-The constant expression given in an annotation is type checked and evaluated in the scope surrounding the declaration being annotated.
+The constant expression given in an annotation is type checked and evaluated
+in the scope surrounding the declaration being annotated.
 
 
 \section{Expressions}
 \LMLabel{expressions}
 
 \LMHash{}%
-\label{evaluation}
-An \Index{expression} is a fragment of Dart code that can be evaluated at run time.
-Evaluating an expression either
-\IndexCustom{produces a value}{expression!produces a value}
-(an object),
-or it
-\IndexCustom{throws}{expression!throws}
-an exception object and an associated stack trace.
-In the former case, we also say that the expression
-\NoIndex{evaluates to a value}.
+An \Index{expression} is a fragment of Dart code
+that can be evaluated at run time.
 
 \LMHash{}%
 Every expression has an associated static type (\ref{staticTypes}) and
-may have an associated static context type.
-\commentary{The static context type represents
-the type expectation of the surrounding context,
-the expression or statement that the expression itself is part of.
-Some contexts may not introduce any static context type.}
-The static context type may affect the static type and evaluation
-of the expression.
+may have an associated static context type
+%% TODO(eernst): This ref is undefined until CL 92782 is landed.
+%% (\ref{contextTypes}),
+which may affect the static type and evaluation of the expression.
 Every value has an associated dynamic type (\ref{dynamicTypeSystem}).
 
-\LMHash{}%
-If evaluation of one expression, $e$, is defined in terms of evaluation of another expression, typically a subexpression of $e$,
-and the evaluation of the other expression throws an exception and a stack trace,
-the evaluation of $e$ stops at that point and throws the same exception object and stack trace.
-
 \begin{grammar}
 <expression> ::= <assignableExpression> <assignmentOperator> <expression>
   \alt <conditionalExpression> <cascadeSection>*
   \alt <throwExpression>
 
-<expressionWithoutCascade> ::= <assignableExpression> <assignmentOperator>
-  \gnewline{} <expressionWithoutCascade>
+<expressionWithoutCascade> ::= \gnewline{}
+  <assignableExpression> <assignmentOperator> <expressionWithoutCascade>
   \alt <conditionalExpression>
   \alt <throwExpressionWithoutCascade>
 
@@ -5815,11 +5894,50 @@
 An expression $e$ may always be enclosed in parentheses, but this never has any semantic effect on $e$.
 
 \commentary{
-Sadly, it may have an effect on the surrounding expression.
-Given a class $C$ with static method $m => 42$, $C.m()$ returns 42, but $(C).m()$ produces a \code{NoSuchMethodError}.
+However, it may have an effect on the surrounding expression.
+For instance, given a class \code{C} with a static method
+\code{m() => 42}, \code{C.m()} returns 42,
+but \code{(C).m()} is a compile-time error.
+%
+The point is that the meaning of \code{C.m()}
+is specified in terms of several parts,
+rather than being specified in a strictly compositional manner.
+Concretely, the meaning of \code{C} and \code{(C)} as expressions is the same,
+but the meaning of \code{C.m()} is not defined in terms of
+the meaning of \code{C} as an expression,
+and it differs from the meaning of \code{(C).m()}.
+% A strictly compositional evaluation would always evaluate every subexpression
+% using the same rules (`evaluation` is always the same thing), and then it
+% would combine the evaluation results into the result of the whole expression.
+% We won't expand on that here, and in particular we won't discuss whether
+% compositional evaluation is even meaningful in the context of side-effects.
+% But it's still useful to keep in mind that we have these "highly
+% non-compositional" elements in the semantics, such as static method
+% lookups.
 }
 
 
+\subsection{Expression Evaluation}
+\LMLabel{expressionEvaluation}
+
+\LMHash{}%
+Evaluation of an expression either
+\IndexCustom{produces an object}{expression!produces an object}
+or it
+\IndexCustom{throws}{expression!throws}
+an exception object and an associated stack trace.
+In the former case, we also say that the expression
+\NoIndex{evaluates to an object}.
+
+\LMHash{}%
+If evaluation of one expression, $e$,
+is defined in terms of evaluation of another expression $e_1$,
+typically a subexpression of $e$,
+and the evaluation of $e_1$ throws an exception and a stack trace,
+the evaluation of $e$ stops at that point
+and throws the same exception object and stack trace.
+
+
 \subsection{Object Identity}
 \LMLabel{objectIdentity}
 
@@ -5865,7 +5983,8 @@
 All usages of the word 'constant' in Dart are associated with compile time.
 A potentially constant expression is an expression that will generally yield
 a constant value when the value of certain parameters is given.
-The constant expressions is a subset of the potentially constant expressions that \emph{can} be evaluated entirely at compile time.
+The constant expressions is a subset of the potentially constant expressions
+that \emph{can} be evaluated entirely at compile time.
 }
 
 \rationale{
@@ -5884,11 +6003,17 @@
 \begin{itemize}
 \item A literal boolean, \TRUE{} or \FALSE{} (\ref{booleans}), is a potentially constant and constant expression.
 
-\item A literal number (\ref{numbers}) is a potentially constant and constant expression if it evaluates to a value of type \code{int} or \code{double}.
-% A too-large integer literal does not evaluate to a value.
+\item A literal number (\ref{numbers}) is a potentially constant and constant expression
+  if it evaluates to an instance of type \code{int} or \code{double}.
+  % A too-large integer literal does not evaluate to an object.
 
-\item A literal string (\ref{strings}) with string interpolations (\ref{stringInterpolation} with expressions $e_1$, \ldots{}, $e_n$ is a potentially constant expression if $e_1$, \ldots{}, $e_n$ are potentially constant expressions.
-The literal is further a constant expression if $e_1$, \ldots{}, $e_n$ are constant expressions evaluating to values that are instances of \code{int}, \code{double} \code{String}, \code{bool} or \code{Null}.
+\item A literal string (\ref{strings}) with string interpolations
+  (\ref{stringInterpolation})
+  with expressions $e_1$, \ldots{}, $e_n$ is a potentially constant expression
+  if $e_1$, \ldots{}, $e_n$ are potentially constant expressions.
+  The literal is further a constant expression
+  if $e_1$, \ldots{}, $e_n$ are constant expressions
+  evaluating to instances of \code{int}, \code{double} \code{String}, \code{bool} or \code{Null}.
 \commentary{These requirements hold trivially if there are no interpolations in the string}.
 \rationale{It would be tempting to allow string interpolation where the
 interpolated value is any compile-time constant. However, this would require
@@ -5921,7 +6046,7 @@
 \code{\CONST{} $C$<$T_1,\ \ldots,\ T_k$>(\metavar{arguments})} or
 \code{\CONST{} $C$<$T_1,\ \ldots,\ T_k$>.\id(\metavar{arguments})},
 or either expression without the leading \CONST{} that occurs in a constant context, is a potentially constant expression.
-It is further a constant expression if the invocation evaluates to a value.
+It is further a constant expression if the invocation evaluates to an object.
 % \ref{const} requires each actual argument to be a constant expression,
 % but here we also catch errors during evaluation, e.g., `C(1, 0)` where
 % `C(double x, double y): z = x / y;`.
@@ -5932,19 +6057,19 @@
 \code{\CONST{} <$T$>[$e_1$, \ldots{}, $e_n$]}, or
 \code{<$T$>[$e_1$, \ldots{}, $e_n$]}
 that occurs in a constant context, is a potentially constant expression if $T$ is a constant type expression, and $e_1$, \ldots{} , $e_n$ are constant expressions.
-It is further a constant expression if the list literal evaluates to a value.
+It is further a constant expression if the list literal evaluates to an object.
 
 \item A constant set literal (\ref{set}),
 \code{\CONST{} <$T$>\{$e_1$, \ldots{}, $e_n$\}}, or
 \code{<$T$>\{$e_1$, \ldots{}, $e_n$\}}
 that occurs in a constant context, is a potentially constant expression if $T$ is a constant type expression, and $e_1$, \ldots{} , $e_n$ are constant expressions.
-It is further a constant expression if the list literal evaluates to a value.
+It is further a constant expression if the list literal evaluates to an object.
 
 \item A constant map literal (\ref{maps}),
 \code{\CONST{} <$K$, $V$>\{$k_1$: $v_1$, \ldots{}, $k_n$: $v_n$\}}, or
 \code{<$K$, $V$>\{$k_1$: $v_1$, \ldots{}, $k_n$: $v_n$\}} that occurs in a constant context,
 is a potentially constant expression.
-It is further a constant expression if the map literal evaluates to a value.
+It is further a constant expression if the map literal evaluates to an object.
 
 \item A parenthesized expression \code{($e$)} is a potentially constant expression if $e$ is a potentially constant expression. It is further a constant expression if $e$ is a constant expression.
 
@@ -5952,66 +6077,108 @@
 
 \item An expression of the form \code{$e_1$\,!=\,$e_2$} is equivalent to \code{!($e_1$\,==\,$e_2$)} in every way, including whether it is potentially constant or constant.
 
-\item An expression of the form \code{$e_1$\,==\,$e_2$} is potentially constant if $e_1$ and $e_2$ are both potentially constant expressions. It is further constant if both $e_1$ and $e_2$ are constant and either $e_1$ evaluates to a value that is an instance of \code{int}, \code{double}, \code{String}, \code{bool} or \code{Null}, or if $e_2$ evaluates to the null object (\ref{null}).
-%TODO: Consider adding enum instances here.
+\item An expression of the form \code{$e_1$\,==\,$e_2$} is potentially constant
+  if $e_1$ and $e_2$ are both potentially constant expressions.
+  It is further constant if both $e_1$ and $e_2$ are constant and
+  either $e_1$ evaluates to an object that is an instance of
+  \code{int}, \code{double}, \code{String}, \code{bool} or \code{Null},
+  or if $e_2$ evaluates to the null object (\ref{null}).
+  %TODO: Consider adding enum instances here.
 
-\item An expression of the form \code{!$e_1$} is potentially constant if $e_1$ is potentially constant. It is further constant if $e_1$ is a constant expression that evaluates to a value of type \code{bool}.
+\item An expression of the form \code{!$e_1$} is potentially constant if $e_1$ is potentially constant. It is further constant if $e_1$ is a constant expression that evaluates to an instance of type \code{bool}.
 
 \item An expression of the form \code{$e_1$\,\&\&\,$e_2$} is potentially constant if $e_1$ and $e_2$ are both potentially constant expressions. It is further constant if $e_1$ is a constant expression and either
 \begin{enumerate}
 \item $e_1$ evaluates to \FALSE{}, or
-\item $e_1$ evaluates to \TRUE{} and $e_2$ is a constant expression that evaluates to a value of type \code{bool}.
+\item $e_1$ evaluates to \TRUE{} and $e_2$ is a constant expression that evaluates to an instance of type \code{bool}.
 \end{enumerate}
 
 \item An expression of the form \code{$e_1$\,||\,$e_2$} is potentially constant if $e_1$ and $e_2$ are both potentially constant expressions. It is further constant if $e_1$ is a constant expression and either
 \begin{enumerate}
 \item $e_1$ evaluates to \TRUE{}, or
-\item $e_1$ evaluates to \FALSE{} and $e_2$ is a constant expression that evaluates to a value of type \code{bool}.
+\item $e_1$ evaluates to \FALSE{} and $e_2$ is a constant expression that evaluates to an instance of type \code{bool}.
 \end{enumerate}
 
-\item An expression of the form \code{\~{}$e_1$} is a potentially constant expression if $e_1$ is a potentially constant expression. It is further a constant expression if $e_1$ is a constant expression that evaluates to a value of type \code{int}.
+\item An expression of the form \code{\~{}$e_1$} is a potentially constant expression if $e_1$ is a potentially constant expression. It is further a constant expression if $e_1$ is a constant expression that evaluates to an instance of type \code{int}.
 
-\item An expression of one of the forms \code{$e_1$\,\&\,$e_2$}, \code{$e_1$\,|\,$e_2$}, or \code{$e_1$\,\^\,$e_2$} is potentially constant if $e_1$ and $e_2$ are both potentially constant expressions. It is further constant if both $e_1$ and $e_2$ are constant expressions that both evaluate to values that are both instances of \code{int}, or that are both instances of \code{bool}.
-% The bool case is new in 2.1.
+\item An expression of one of the forms \code{$e_1$\,\&\,$e_2$},
+  \code{$e_1$\,|\,$e_2$}, or \code{$e_1$\,\^\,$e_2$} is potentially constant
+  if $e_1$ and $e_2$ are both potentially constant expressions.
+  It is further constant if both $e_1$ and $e_2$ are constant expressions that
+  both evaluate to instances of \code{int}, or both to instances of \code{bool}.
+  % The bool case is new in 2.1.
 
-\item An expression of one of the forms \code{$e_1$\,\~{}/\,$e_2$}, \code{$e_1$\,\gtgt\,$e_2$}, \code{$e_1$\,\gtgtgt\,$e_2$}, or \code{$e_1$\,\ltlt\,$e_2$} is potentially constant if $e_1$ and $e_2$ are both potentially constant expressions. It is further constant if both $e_1$ and $e_2$ are constant expressions that evaluate to values that are instances of \code{int}.
+\item An expression of one of the forms \code{$e_1$\,\~{}/\,$e_2$},
+  \code{$e_1$\,\gtgt\,$e_2$}, \code{$e_1$\,\gtgtgt\,$e_2$},
+  or \code{$e_1$\,\ltlt\,$e_2$} is potentially constant
+  if $e_1$ and $e_2$ are both potentially constant expressions.
+  It is further constant if both $e_1$ and $e_2$ are constant expressions that
+  both evaluate to an instance of \code{int}.
 
-\item An expression of the form \code{$e_1$\,+\,$e_2$} is a potentially constant expression if $e_1$ and $e_2$ are both potentially constant expressions. It is further a constant expression if both $e_1$ and $e_2$ are constant expressions and either both evaluate to values that are instances of \code{int} or \code{double}, or both evaluate to values of type \code{String}.
+\item An expression of the form \code{$e_1$\,+\,$e_2$} is
+  a potentially constant expression if $e_1$ and $e_2$
+  are both potentially constant expressions.
+  It is further a constant expression if both $e_1$ and $e_2$ are constant expressions
+  and either both evaluate to an instance of \code{int} or \code{double},
+  or both evaluate to an instance of \code{String}.
 
-\item An expression of the form \code{-$e_1$} is a potentially constant expression if $e_1$ is a potentially constant expression. It is further a constant expression if $e_1$ is a constant expression that evaluates to a value that is an instance of \code{int} or \code{double}.
+\item An expression of the form \code{-$e_1$} is a potentially constant expression
+  if $e_1$ is a potentially constant expression.
+  It is further a constant expression if $e_1$ is a constant expression that
+  evaluates to an instance of type \code{int} or \code{double}.
 
-\item An expression of the form \code{$e_1$\,-\,$e_2$}, \code{$e_1$\,*\,$e_2$}, \code{$e_1$\,/\,$e_2$}, \code{$e_1$\,\%\,$e_2$}, \code{$e_1$\,<\,$e_2$}, \code{$e_1$\,<=\,$e_2$}, \code{$e_1$\,>\,$e_2$}, or \code{$e_1$\,>=\,$e_2$} is potentially constant if $e_1$ and $e_2$ are both potentially constant expressions. It is further constant if both $e_1$ and $e_2$ are constant expressions that evaluate to values that are instances of \code{int} or \code{double}.
+\item An expression of the form \code{$e_1$\,-\,$e_2$}, \code{$e_1$\,*\,$e_2$},
+  \code{$e_1$\,/\,$e_2$}, \code{$e_1$\,\%\,$e_2$}, \code{$e_1$\,<\,$e_2$},
+  \code{$e_1$\,<=\,$e_2$}, \code{$e_1$\,>\,$e_2$}, or \code{$e_1$\,>=\,$e_2$}
+  is potentially constant
+  if $e_1$ and $e_2$ are both potentially constant expressions.
+  It is further constant if both $e_1$ and $e_2$ are constant expressions that
+  evaluate to instances of \code{int} or \code{double}.
 
-\item An expression of the form \code{$e_1$\,?\,$e_2$\,:\,$e_3$} is potentially constant if $e_1$, $e_2$, and $e_3$ are all potentially constant expressions. It is constant if $e_1$ is a constant expression and either
+\item An expression of the form \code{$e_1$\,?\,$e_2$\,:\,$e_3$}
+  is potentially constant if $e_1$, $e_2$, and $e_3$
+  are all potentially constant expressions.
+  It is constant if $e_1$ is a constant expression and either
 \begin{enumerate}
 \item $e_1$ evaluates to \TRUE{} and $e_2$ is a constant expression, or
 \item $e_1$ evaluates to \FALSE{} and $e_3$ is a constant expression.
 \end{enumerate}
 
-\item An expression of the form \code{$e_1$\,??\,$e_2$} is potentially constant if $e_1$ and $e_2$ are both potentially constant expressions. It is further constant if $e_1$ is a constant expression and either
+\item An expression of the form \code{$e_1$\,??\,$e_2$} is potentially constant
+  if $e_1$ and $e_2$ are both potentially constant expressions.
+  It is further constant if $e_1$ is a constant expression and either
 \begin{enumerate}
-\item $e_1$ evaluates to a non-\NULL{} value, or
-\item $e_1$ evaluates to \NULL{} and $e_2$ is a constant expression.
+\item $e_1$ evaluates to an object which is not the null object, or
+\item $e_1$ evaluates to the null object, and $e_2$ is a constant expression.
 \end{enumerate}
 
-\item An expression of the form \code{$e$.length} is potentially constant if $e$ is a potentially constant expression. It is further constant if $e$ is a constant expression that evaluates to a \code{String}.
+\item An expression of the form \code{$e$.length} is potentially constant
+  if $e$ is a potentially constant expression.
+  It is further constant if $e$ is a constant expression that
+  evaluates to an instance of \code{String}.
 
 % New in 2.1.
-\item An expression of the form \code{$e$ as $T$} is potentially constant if $e$ is a potentially constant expression and $T$ is a constant type expression, and it is further constant if $e$ is constant.
+\item An expression of the form \code{$e$ as $T$} is potentially constant
+  if $e$ is a potentially constant expression
+  and $T$ is a constant type expression,
+  and it is further constant if $e$ is constant.
 \commentary{
 It is a compile-time error to evaluate the constant expression
 if the cast operation would throw, that is,
-if the value the $e$ evaluates to is not \NULL{} and not of type $T$.
+if $e$ evaluates to an object which is not the null object and not of type $T$.
 }
 
 % New in 2.1.
-\item An expression of the form \code{$e$ is $T$} is potentially constant if $e$ is a potentially constant expression and $T$ is a constant type expression, and it is further constant if $e$ is constant.
+\item An expression of the form \code{$e$ is $T$} is potentially constant
+  if $e$ is a potentially constant expression
+  and $T$ is a constant type expression,
+  and it is further constant if $e$ is constant.
 
 % New in 2.1.
 \item{}
-An expression of the form \code{$e$ is! $T$} is equivalent to \code{!($e$ is $T$)} in every way,
-including whether it's potentially constant or constant.
-
+  An expression of the form \code{$e$ is! $T$}
+  is equivalent to \code{!($e$ is $T$)} in every way,
+  including whether it's potentially constant or constant.
 \end{itemize}
 
 \LMHash{}%
@@ -6060,7 +6227,12 @@
 
 \commentary{
 Note that there is no requirement that every constant expression evaluate correctly.
-Only when a constant expression is required (e.g., to initialize a constant variable, or as a default value of a formal parameter, or as metadata) do we insist that a constant expression actually be evaluated successfully at compile time.
+Only when a constant expression is required
+(e.g., to initialize a constant variable,
+or as a default value of a formal parameter,
+or as metadata)
+do we insist that a constant expression actually
+be evaluated successfully at compile time.
 
 The above is not dependent on program control-flow.
 The mere presence of a required compile-time constant whose evaluation would fail within a program is an error.
@@ -6149,6 +6321,48 @@
 \end{grammar}
 
 
+\subsubsection{Constant Contexts}
+\LMLabel{constantContexts}
+
+\LMHash{}%
+Let $e$ be an expression; $e$ occurs in a
+\Index{constant context}
+if{}f one of the following applies:
+
+% We avoid the circularity "constant context depends on constant list literal,
+% etc., which depends on constant context" by mentioning the \CONST{} modifier
+% explicitly here. So 'constant context' is consistently a lower-level concept
+% based on syntax, and 'constant X expressions' (like 'constant list literal')
+% are built on top of this.
+
+\begin{itemize}
+\item $e$ is an element of a list or set literal whose first token is \CONST,
+  or $e$ is a key or a value of an entry
+  of a map literal whose first token is \CONST.
+\item $e$ occurs as \code{@$e$} in a construct derived from \synt{metadata}.
+\item $e$ is an actual argument in an expression derived from
+  \synt{constObjectExpression}.
+\item $e$ is the initializing expression of a constant variable declaration
+  (\ref{variables}).
+\item $e$ is a switch case expression
+  (\ref{switch}).
+\item $e$ is an immediate subexpression of
+  an expression $e_0$ which occurs in a constant context,
+  where $e_0$ is
+  %% May be added later:
+  %% not a \THROW{} expression (\ref{throw}) and
+  not a function literal
+  (\ref{functionExpressions}).
+\end{itemize}
+
+\rationale{%
+A constant context is introduced in situations where
+an expression is required to be constant.
+This is used to allow the \CONST{} modifier to be omitted
+in cases where it does not contribute any new information.%
+}
+
+
 \subsection{Null}
 \LMLabel{null}
 
@@ -6668,9 +6882,14 @@
 using an index that is not a member of its set of indices.
 
 \LMHash{}%
-If a list literal begins with the reserved word \CONST{}, it is a
-\IndexCustom{constant list literal}{literal!list!constant}
-which is a constant expression (\ref{constants}) and therefore evaluated at compile time.
+If a list literal $\ell$ begins with the reserved word \CONST{}
+or $\ell$ occurs in a constant context
+(\ref{constantContexts}),
+it is a
+\IndexCustom{constant list literal}{literal!list!constant},
+which is a constant expression
+(\ref{constants})
+and therefore evaluated at compile time.
 Otherwise, it is a
 \IndexCustom{run-time list literal}{literal!list!run-time}
 and it is evaluated at run time.
@@ -6679,35 +6898,57 @@
 % This error can occur because being constant is a dynamic property, here.
 Attempting to mutate a constant list literal will result in a dynamic error.
 
+\commentary{%
+% The following is true either directly or indirectly: There is a \CONST{}
+% modifier on the literal list, or we use the "immediate subexpression" rule
+% about constant contexts.
+Note that the element expressions of a constant list literal
+occur in a constant context
+(\ref{constantContexts}),
+which means that \CONST{} modifiers need not be specified explicitly.%
+}
+
 \LMHash{}%
-It is a compile-time error if an element of a constant list literal is not a constant expression.
-It is a compile-time error if the type argument of a constant list literal is
-not a constant type expression.
-\rationale{
-The binding of a type parameter is not known at compile time, so we cannot use type parameters inside constant expressions.
+It is a compile-time error if an element of a constant list literal
+is not a constant expression.
+It is a compile-time error if the type argument of a constant list literal
+is not a constant type expression.
+
+\rationale{%
+The binding of a formal type parameter is not known at compile time,
+so we cannot use type parameters inside constant expressions.%
 }
 
 \LMHash{}%
 The value of a constant list literal
-\code{\CONST{} <$E$>[$e_1, \ldots, e_n$]}
+\code{\CONST?\,\,<$E$>[$e_1, \ldots, e_n$]}
 is an object $a$ whose class implements the built-in class
 \code{List<$E$>}.
-The $i$th element of $a$ is $v_{i+1}$, where $v_i$ is the value of the compile-time expression $e_i$.
+Let $v_i$ be the value of the constant expression $e_i$, $i \in 1 .. n$.
+The $i$th element of $a$ (at index $i - 1$) is $v_i$.
+%
+%% TODO(eernst): If inference is specified to provide all type arguments,
+%% we should delete the following.
 The value of a constant list literal
-\code{\CONST{} [$e_1, \ldots, e_n$]}
+\code{\CONST?\,\,[$e_1, \ldots, e_n$]}
 is defined as the value of the constant list literal
-\code{\CONST{} <\DYNAMIC{}>[$e_1, \ldots, e_n$]}.
+% For a constant list literal, it is never an error to have the \CONST, even if
+% it was omitted above. So we remove the `?`, making the next line well-defined.
+\code{\CONST\,\,<\DYNAMIC>[$e_1, \ldots, e_n$]}.
 
 \LMHash{}%
 Let
-$list_1 =$ \code{\CONST{} <$V$>[$e_{11}, \ldots, e_{1n}$]}
+$list_1 =$ \code{\CONST?\,\,<$V$>[$e_{11}, \ldots, e_{1n}$]}
 and
-$list_2 =$ \code{\CONST{} <$U$>[$e_{21}, \ldots, e_{2n}$]}
-be two constant list literals and let the elements of $list_1$ and $list_2$ evaluate to $o_{11}, \ldots, o_{1n}$ and $o_{21}, \ldots, o_{2n}$ respectively.
-If{}f \code{identical($o_{1i}$, $o_{2i}$)} for $i \in 1 .. n$ and $V = U$ then \code{identical($list_1$, $list_2$)}.
+$list_2 =$ \code{\CONST?\,\,<$U$>[$e_{21}, \ldots, e_{2n}$]}
+be two constant list literals and
+let the elements of $list_1$ and $list_2$ evaluate to
+$o_{11}, \ldots, o_{1n}$ and $o_{21}, \ldots, o_{2n}$ respectively.
+If{}f \code{identical($o_{1i}$, $o_{2i}$)} for $i \in 1 .. n$ and $V == U$
+then \code{identical($list_1$, $list_2$)}.
 
-\commentary{
-In other words, constant list literals are canonicalized.
+\commentary{%
+In other words, constant list literals are canonicalized.%
 }
 
 \LMHash{}%
@@ -6746,10 +6987,12 @@
 }
 
 \LMHash{}%
+%% TODO(eernst): If inference is specified to provide all type arguments,
+%% we should delete the following.
 A run-time list literal
 \code{[$e_1, \ldots, e_n$]}
 is evaluated as
-\code{<\DYNAMIC{}>[$e_1, \ldots, e_n$]}.
+\code{<\DYNAMIC>[$e_1, \ldots, e_n$]}.
 
 \commentary{
 There is no restriction precluding nesting of list literals.
@@ -6761,15 +7004,18 @@
 
 \LMHash{}%
 The static type of a list literal of the form
-\code{\CONST{} <$E$>[$e_1, \ldots, e_n$]}
+\code{\CONST\,\,<$E$>[$e_1, \ldots, e_n$]}
 or the form
 \code{<$E$>[$e_1, \ldots, e_n$]}
 is \code{List<$E$>}.
+%
+%% TODO(eernst): If inference is specified to provide all type arguments,
+%% we should delete the following.
 The static type of a list literal of the form
-\code{\CONST{} [$e_1, \ldots, e_n$]}
+\code{\CONST\,\,[$e_1, \ldots, e_n$]}
 or the form
 \code{[$e_1, \ldots, e_n$]}
-is \code{List<\DYNAMIC{}>}.
+is \code{List<\DYNAMIC>}.
 
 
 \subsection{Maps}
@@ -6811,9 +7057,14 @@
 or more than two type arguments.
 
 \LMHash{}%
-If a map literal begins with the reserved word \CONST{}, it is a
+If a map literal $\ell$ begins with the reserved word \CONST{},
+or if $\ell$ occurs in a constant context
+(\ref{constantContexts}),
+it is a
 \IndexCustom{constant map literal}{literal!map!constant}
-which is a constant expression (\ref{constants}) and therefore evaluated at compile time.
+which is a constant expression
+(\ref{constants})
+and therefore evaluated at compile time.
 Otherwise, it is a
 \IndexCustom{run-time map literal}{literal!map!run-time}
 and it is evaluated at run time.
@@ -6821,6 +7072,16 @@
 % This error can occur because being constant is a dynamic property, here.
 Attempting to mutate a constant map literal will result in a dynamic error.
 
+\commentary{%
+% The following is true either directly or indirectly: There is a \CONST{}
+% modifier on the literal map, or we use the "immediate subexpression" rule
+% about constant contexts.
+Note that the key and value expressions of a constant list literal
+occur in a constant context
+(\ref{constantContexts}),
+which means that \CONST{} modifiers need not be specified explicitly.%
+}
+
 \LMHash{}%
 It is a compile-time error if
 either a key or a value of an entry in a constant map literal
@@ -6835,26 +7096,38 @@
 
 \LMHash{}%
 The value of a constant map literal
-\code{\CONST{} <$K, V$>\{$k_1:e_1, \ldots, k_n:e_n$\}}
+\code{\CONST?\,\,<$K, V$>\{$k_1:e_1, \ldots, k_n:e_n$\}}
 is an object $m$ whose class implements the built-in class
 \code{Map<$K, V$>}.
-The entries of $m$ are $u_i:v_i, i \in 1 .. n$, where $u_i$ is the value of the compile-time expression $k_i$ and $v_i$ is the value of the compile-time expression $e_i$.
+The entries of $m$ are $u_i:v_i, i \in 1 .. n$,
+where $u_i$ is the value of the compile-time expression $k_i$,
+and $v_i$ is the value of the compile-time expression $e_i$.
+%
+%% TODO(eernst): If inference is specified to provide all type arguments,
+%% we should delete the following.
 The value of a constant map literal
-\code{\CONST{} \{$k_1:e_1, \ldots, k_n:e_n$\}}
-is defined as the value of a constant map literal
-\code{\CONST{} <\DYNAMIC{}, \DYNAMIC{}>\{$k_1:e_1, \ldots, k_n:e_n$\}}.
+\code{\CONST?\,\,\{$k_1:e_1, \ldots, k_n:e_n$\}}
+is defined as the value of the constant map literal
+% For a constant map literal, it is never an error to have the \CONST, even if
+% it was omitted above. So we remove the `?`, making the next line well-defined.
+\code{\CONST\,\,<\DYNAMIC, \DYNAMIC>\{$k_1:e_1, \ldots, k_n:e_n$\}}.
 
 \LMHash{}%
-Let
-$map_1 =$ \code{\CONST{} <$K, V$>\{$k_{11}:e_{11}, \ldots, k_{1n}:e_{1n}$\}}
-and
-$map_2 =$ \code{\CONST{} <$J, U$>\{$k_{21}:e_{21}, \ldots, k_{2n}:e_{2n}$\}}
-be two constant map literals.
-Let the keys of $map_1$ and $map_2$ evaluate to $s_{11}, \ldots, s_{1n}$ and $s_{21}, \ldots, s_{2n}$ respectively, and let the elements of $map_1$ and $map_2$ evaluate to $o_{11}, \ldots, o_{1n}$ and $o_{21}, \ldots, o_{2n}$ respectively.
-If{}f \code{identical($o_{1i}$, $o_{2i}$)} and \code{identical($s_{1i}$, $s_{2i}$)} for $i \in 1 .. n$, and $K = J, V = U$ then \code{identical($map_1$, $map_2$)}.
+Let $map_1$ be a constant map literal of the form
+\code{\CONST?\,\,<$K, V$>\{$k_{11}:e_{11}, \ldots, k_{1n}:e_{1n}$\}}
+and $map_2$ a constant map literal of the form
+\code{\CONST?\,\,<$J, U$>\{$k_{21}:e_{21}, \ldots, k_{2n}:e_{2n}$\}}.
+Let the keys of $map_1$ and $map_2$ evaluate to
+$s_{11}, \ldots, s_{1n}$ and $s_{21}, \ldots, s_{2n}$, respectively,
+and let the elements of $map_1$ and $map_2$ evaluate to
+$o_{11}, \ldots, o_{1n}$ and $o_{21}, \ldots, o_{2n}$, respectively.
+If{}f
+\code{identical($o_{1i}$, $o_{2i}$)} and
+\code{identical($s_{1i}$, $s_{2i}$)}
+for $i \in 1 .. n$, and $K == J, V == U$, then \code{identical($map_1$, $map_2$)}.
 
-\commentary{
-In other words, constant map literals are canonicalized.
+\commentary{%
+In other words, constant map literals are canonicalized.%
 }
 
 \LMHash{}%
@@ -6888,11 +7161,13 @@
 the \lit{==} operator inherited from the \code{Object} class.
 
 \LMHash{}%
+%% TODO(eernst): If inference is specified to provide all type arguments,
+%% we should delete the following.
 A run-time map literal
 \code{\{$k_1:e_1, \ldots, k_n:e_n$\}}
 is evaluated as
 
-\code{<\DYNAMIC{}, \DYNAMIC{}>\{$k_1:e_1, \ldots, k_n:e_n$\}}.
+\code{<\DYNAMIC, \DYNAMIC>\{$k_1:e_1, \ldots, k_n:e_n$\}}.
 
 \LMHash{}%
 A map literal is ordered:
@@ -6911,11 +7186,14 @@
 \code{<$K, V$>\{$k_1:e_1, \ldots, k_n:e_n$\}}
 is
 \code{Map<$K, V$>}.
+%
+%% TODO(eernst): If inference is specified to provide all type arguments,
+%% we should delete the following.
 The static type of a map literal of the form
 \code{\CONST{} \{$k_1:e_1, \ldots, k_n:e_n$\}}
 or the form
 \code{\{$k_1:e_1, \ldots, k_n:e_n$\}} is
-\code{Map<\DYNAMIC{}, \DYNAMIC{}>}.
+\code{Map<\DYNAMIC, \DYNAMIC>}.
 
 
 \subsection{Sets}
@@ -6930,7 +7208,8 @@
 \end{grammar}
 
 \LMHash{}%
-A \synt{setOrMapLiteral} is either set literal or a map literal (\ref {maps}).
+A \synt{setOrMapLiteral} is either a set literal or a map literal
+(\ref{maps}).
 A set literal derived from \synt{setOrMapLiteral}
 is treated the same way as one derived from \synt{setLiteral},
 as described below.
@@ -6939,17 +7218,21 @@
 A set literal consists of zero or more element expressions.
 It is a compile-time error if a set literal has more than one type argument.
 
-\LMHash{}%
-\rationale{
+\rationale{%
 A set literal with no type argument is always converted to a literal
 with a type argument by type inference (\ref{overview}), so the following
-section only address the behavior of literals with type arguments.}
+section only address the behavior of literals with type arguments.%
+}
 
 \LMHash{}%
-If a set literal begins with the reserved word \CONST{},
-or if it occurs in a constant context, then it is a
+If a set literal $\ell$ begins with the reserved word \CONST{}
+or $\ell$ occurs in a constant context
+(\ref{constantContexts}),
+it is a
 \IndexCustom{constant set literal}{literal!set!constant}
-which is a constant expression (\ref{constants}) and therefore evaluated at compile time.
+which is a constant expression
+(\ref{constants})
+and therefore evaluated at compile time.
 Otherwise, it is a
 \IndexCustom{run-time set literal}{literal!set!run-time}
 and it is evaluated at run time.
@@ -6957,6 +7240,16 @@
 % This error can occur because being constant is a dynamic property, here.
 Attempting to mutate a constant set literal will result in a dynamic error.
 
+\commentary{%
+% The following is true either directly or indirectly: There is a \CONST{}
+% modifier on the literal set, or we use the "immediate subexpression" rule
+% about constant contexts.
+Note that the element expressions of a constant set literal
+occur in a constant context
+(\ref{constantContexts}),
+which means that \CONST{} modifiers need not be specified explicitly.%
+}
+
 \LMHash{}%
 It is a compile-time error if an element expression in a constant set literal
 is not a constant expression.
@@ -6972,11 +7265,21 @@
 (\ref{equality}).
 
 \LMHash{}%
-The value of a constant set literal with element expressions
-$e_1, \dots, e_n$ and type argument $E$
+The value of a constant set literal
+\code{\CONST?\,\,<$E$>\{$e_1, \ldots, e_n$\}}
 is an object $s$ whose class implements the built-in class
 \code{Set<$E$>}.
-The elements of $m$ are $v_i, i \in 1 .. n$, where $v_i$ is the value of the constant expression $e_i$.
+The elements of $m$ are $v_i, i \in 1 .. n$,
+where $v_i$ is the value of the constant expression $e_i$.
+%
+%% TODO(eernst): If inference is specified to provide all type arguments,
+%% we should delete the following.
+The value of a constant set literal
+\code{\CONST?\,\,\{$e_1, \ldots, e_n$\}}
+is defined as the value of the constant set literal
+% For a constant set literal, it is never an error to have the \CONST, even if
+% it was omitted above. So we remove the `?`, making the next line well-defined.
+\code{\CONST\,\,<\DYNAMIC>\{$e_1, \ldots, e_n$\}}.
 
 \LMHash{}%
 Let $set_1$ be a constant set literal with type argument $E$
@@ -6988,12 +7291,13 @@
 If{}f \code{identical($v_{1i}$, $v_{2i}$)}
 for $i \in 1 .. n$, and $E$ and $F$ is the same type,
 then \code{identical($set_1$, $set_2$)}.
-\commentary{
+
+\commentary{%
 In other words, constant set literals are canonicalized if they have
 the same type and the same values in the same order.
+Two constant set literals are never identical
+if they have a different number of elements.%
 }
-Two constant set literals are never identical if they have different numbers
-of elements.
 
 \LMHash{}%
 A run-time set literal with element expressions $e_1, \ldots, e_n$
@@ -7024,12 +7328,28 @@
 }
 
 \LMHash{}%
+%% TODO(eernst): If inference is specified to provide all type arguments,
+%% we should delete the following.
+A run-time set literal
+\code{\{$e_1, \ldots, e_n$\}}
+is evaluated as
+\code{<\DYNAMIC>\{$e_1, \ldots, e_n$\}}.
+
+\LMHash{}%
 The static type of a set literal of the form
-\code{\CONST{} <$E$>\{$e_1, \ldots, e_n$\}}
+\code{\CONST\,\,<$E$>\{$e_1, \ldots, e_n$\}}
 or the form
 \code{<$E$>\{$e_1, \ldots, e_n$\}}
 is
 \code{Set<$E$>}.
+%
+%% TODO(eernst): If inference is specified to provide all type arguments,
+%% we should delete the following.
+The static type of a list literal of the form
+\code{\CONST\,\,\{$e_1, \ldots, e_n$\}}
+or the form
+\code{\{$e_1, \ldots, e_n$\}}
+is \code{Set<\DYNAMIC>}.
 
 
 \subsection{Throw}
@@ -7048,7 +7368,8 @@
 Evaluation of a throw expression of the form \code{\THROW{} $e$;} proceeds as follows:
 
 \LMHash{}%
-The expression $e$ is evaluated to a value $v$ (\ref{evaluation}).
+The expression $e$ is evaluated to an object $v$
+(\ref{expressionEvaluation}).
 
 \commentary{
 There is no requirement that the expression $e$ must evaluate to any special kind of object.
@@ -7058,7 +7379,7 @@
 If $v$ is the null object (\ref{null}), then a \code{NullThrownError} is thrown.
 Otherwise let $t$ be a stack trace corresponding to the current execution state,
 and the \THROW{} statement throws with $v$ as exception object
-and $t$ as stack trace (\ref{evaluation}).
+and $t$ as stack trace (\ref{expressionEvaluation}).
 
 \LMHash{}%
 If $v$ is an instance of class \code{Error} or a subclass thereof,
@@ -7553,7 +7874,7 @@
 If execution of $q$ completes normally (\ref{statementCompletion}), $e$ evaluates to $i$.
 Otherwise execution of $q$ throws an exception object $x$ and stack trace $t$,
 and then evaluation of $e$ also throws exception object $x$ and stack trace $t$
-(\ref{evaluation}).
+(\ref{expressionEvaluation}).
 \EndCase
 
 \LMHash{}%
@@ -7586,7 +7907,8 @@
 Otherwise, if the execution completes normally or returns with no value,
 then $e$ evaluates to the null object (\ref{null}).
 Otherwise the execution throws an exception $x$ and stack trace $t$,
-and then evaluation of $e$ also throws $x$ and $t$ (\ref{evaluation}).
+and then evaluation of $e$ also throws $x$ and $t$
+(\ref{expressionEvaluation}).
 
 \rationale{
 A factory constructor can be declared in an abstract class and used safely,
@@ -7760,8 +8082,8 @@
 %% TODO(eernst): Delete some \CONST{} when integrating implicit-creation.md
 \begin{dartCode}
 \CLASS{} A \{
-   \FINAL{} x;
-   \CONST{} A(p): x = p * 10;
+  \FINAL{} x;
+  \CONST{} A(p): x = p * 10;
 \}
 \\
 \CLASS{} IntPair \{
@@ -7830,13 +8152,20 @@
 If $f$ is synchronous and is not a generator (\ref{functions}) then execution of the body of $f$ begins immediately.
 If the execution of the body of $f$ returns a value, $v$, (\ref{statementCompletion}), the invocation evaluates to $v$.
 If the execution completes normally or it returns without a value, the invocation evaluates to the null object (\ref{null}).
-If the execution throws an exception object and stack trace, the invocation throws the same exception object and stack trace (\ref{evaluation}).
+If the execution throws an exception object and stack trace,
+the invocation throws the same exception object and stack trace
+(\ref{expressionEvaluation}).
 
-\commentary{
+\commentary{%
 A complete function body can never break or continue (\ref{statementCompletion})
-because a \BREAK{} or \CONTINUE{} statement must always occur inside the statement that is the target of the \BREAK{} or \CONTINUE{}.
+because a \BREAK{} or \CONTINUE{} statement must always occur inside
+the statement that is the target of the \BREAK{} or \CONTINUE{}.
 This means that a function body can only either complete normally, throw, or return.
-Completing normally or returning without a value is treated the same as returning the null object (\ref{null}), so the result of executing a function body can always be used as the result of evaluating an expression, either by evaluating to a value or by the evaluation throwing.
+Completing normally or returning without a value is treated
+the same as returning the null object (\ref{null}),
+so the result of executing a function body can always be used as
+the result of evaluating an expression,
+either by evaluating to an object, or by the evaluation throwing.%
 }
 
 \LMHash{}%
@@ -8348,6 +8677,7 @@
 \LMHash{}%
 An unqualified function invocation $i$ has the form
 
+\noindent
 \code{\id<$A_1, \ldots,\ A_r$>($a_1, \ldots,\ a_n,\ x_{n+1}$: $a_{n+1}, \ldots,\ x_{n+k}$: $a_{n+k}$)},
 
 \noindent
@@ -8365,37 +8695,46 @@
 
 \LMHash{}%
 If there exists a lexically visible declaration named \id,
-let $f_{id}$ be the innermost such declaration.
+let $D_{id}$ be the innermost such declaration.
 Then:
 \begin{itemize}
-\item It is a compile-time error if $f_{id}$ denotes a type
-  (\commentary{that is, if \id{} is a type literal or type variable}),
-  unless \id{} denotes a constructor.
-\item It is a compile-time error if $f_{id}$ is an import directive
-  where \id{} is declared to be a library prefix.
-\item
-If $f_{id}$ is
-a local function,
-a library function,
-a library or static getter or a variable,
-$i$ is interpreted as a function expression invocation
-(\ref{functionExpressionInvocation}).
-\item
-Otherwise, if $f_{id}$ is a static method of the enclosing class $C$,
-$i$ is equivalent to
-\code{$C$.\id<$A_1, \ldots,\ A_r$>($a_1, \ldots,\ a_n,\ x_{n+1}$: $a_{n+1}, \ldots,\ x_{n+k}$: $a_{n+k}$)}.
+\item Consider the situation where $D_{id}$ is a type declaration.
+  If $D_{id}$ is a declaration of a class $C$
+  that has a constructor named $C$
+  then the meaning of $i$ depends on the context:
+  If $i$ occurs in a constant context
+  (\ref{constantContexts}),
+  then $i$ is equivalent to \code{\CONST\,\,$i$};
+  if $i$ does not occur in a constant context
+  then $i$ is equivalent to \code{\NEW\,\,$i$}.
+  Otherwise a compile-time error occurs
+  (\commentary{that is, if $D_{id}$ does not declare a class,
+    or it declares a class that has no constructor named $C$}).
+\item Otherwise, if $D_{id}$ is an import directive
+  where \id{} is declared to be a library prefix,
+  a compile-time error occurs.
+\item Otherwise, if $D_{id}$ declares
+  a local function,
+  a library function, or
+  a library or static getter, or a variable,
+  then $i$ is treated as a function expression invocation
+  (\ref{functionExpressionInvocation}).
+\item Otherwise, if $D_{id}$ is a static method of the enclosing class $C$,
+  $i$ is equivalent to
+  \code{$C$.\id<$A_1, \ldots,\ A_r$>($a_1, \ldots,\ a_n,\ x_{n+1}$: $a_{n+1}, \ldots,\ x_{n+k}$: $a_{n+k}$)}.
 \item Otherwise, if $i$ occurs in an instance method body,
-$i$ is equivalent to the ordinary method invocation
+  $i$ is equivalent to the ordinary method invocation
 
-\code{\THIS{}.\id<$A_1, \ldots,\ A_r$>($a_1, \ldots,\ a_n,\ x_{n+1}$: $a_{n+1}, \ldots,\ x_{n+k}$: $a_{n+k}$)}.
+  \code{\THIS{}.\id<$A_1, \ldots,\ A_r$>($a_1, \ldots,\ a_n,\ x_{n+1}$: $a_{n+1}, \ldots,\ x_{n+k}$: $a_{n+k}$)}.
 \end{itemize}
 
-\commentary{
-Otherwise $i$ must occur inside a top-level or static function
+\commentary{%
+Otherwise \id{} is not in scope, and
+$i$ must occur inside a top-level or static function
 (be it function, method, getter, or setter)
 or a top-level or static variable initializer,
-in which case a compile-time error occurs
-(\ref{unqualifiedInvocation}).
+in which case a compile-time error occurs,
+as specified earlier in this section.%
 }
 
 
@@ -8405,6 +8744,7 @@
 \LMHash{}%
 A function expression invocation $i$ has the form
 
+\noindent
 \code{$e_f$<$A_1, \ldots,\ A_r$>($a_1, \ldots,\ a_n,\ x_{n+1}$: $a_{n+1}, \ldots,\ x_{n+k}$: $a_{n+k}$)},
 
 \noindent
@@ -8415,38 +8755,69 @@
 }
 
 \LMHash{}%
-If $e_f$ is an identifier \id, then \id{} must necessarily denote
-a local function, a library function, a library or static getter or a variable as described above,
-or $i$ is not considered a function expression invocation.
-It is a compile-time error if $e_f$ is a type literal,
-unless $e_f$ denotes a constructor.
+Consider the situation where $e_f$ denotes a class $C$
+that contains a declaration of a constructor named $C$,
+or it is of the form \code{$e'_f$.\id} where
+$e'_f$ denotes a class $C$ that contains a declaration of
+a constructor named \code{$C$.\id}.
+If $i$ occurs in a constant context
+(\ref{constantContexts})
+then $i$ is treated as \code{\CONST\,\,$i$},
+and if $i$ does not occur in a constant context
+then $i$ is treated as \code{\NEW\,\,$i$}.
 
-\commentary{
-This error was already specified elsewhere
-(\ref{unqualifiedInvocation})
-for the case where $e_f$ is an identifier,
-but $e_f$ may also have other forms, e.g., \code{p.C}.
+\commentary{%
+When $i$ is treated as another construct $i'$,
+both the static analysis and the dynamic semantics
+is specified in the section about $i'$
+(\ref{notation}).%
 }
 
 \LMHash{}%
-If $e_f$ is a property extraction expression (\ref{propertyExtraction}),
-then $i$ isn't a function expression invocation and is instead recognized as an ordinary method invocation (\ref{ordinaryInvocation}).
+Otherwise, it is a compile-time error if $e_f$ is a type literal.
 
-\commentary{
-\code{$a.b(x)$} is parsed as a method invocation of method \code{$b()$} on object \code{$a$}, not as an invocation of getter \code{$b$} on \code{$a$} followed by a function call \code{$(a.b)(x)$}.
+\commentary{%
+This error was already specified elsewhere
+(\ref{unqualifiedInvocation})
+for the case where $e_f$ is an identifier,
+but $e_f$ may also have other forms, e.g., \code{p.C}.%
+}
+
+\LMHash{}%
+Otherwise, if $e_f$ is an identifier \id, then \id{} must necessarily denote
+a local function, a library function, a library or static getter,
+or a variable as described above,
+or $i$ would not have been treated as a function expression invocation.
+
+\LMHash{}%
+If $e_f$ is a property extraction expression
+(\ref{propertyExtraction})
+then $i$ treated as an ordinary method invocation
+(\ref{ordinaryInvocation}).
+
+\commentary{%
+\code{$a.b(x)$} is treated as a method invocation of method
+\code{$b()$} on object \code{$a$},
+not as an invocation of getter \code{$b$} on \code{$a$}
+followed by a function call \code{$(a.b)(x)$}.
 If a method or getter \code{$b$} exists, the two will be equivalent.
-However, if \code{$b$} is not defined on \code{$a$}, the resulting invocation of \code{noSuchMethod()} would differ.
-The \code{Invocation} passed to \code{noSuchMethod()} would describe a call to a method \code{$b$} with argument \code{$x$} in the former case, and a call to a getter \code{$b$} (with no arguments) in the latter.
+However, if \code{$b$} is not defined on \code{$a$},
+the resulting invocation of \code{noSuchMethod()} would differ.
+The \code{Invocation} passed to \code{noSuchMethod()} would describe
+a call to a method \code{$b$} with argument \code{$x$} in the former case,
+and a call to a getter \code{$b$} (with no arguments) in the latter.%
 }
 
 \LMHash{}%
 Let $F$ be the static type of $e_f$.
 The static analysis of $i$ is performed as specified in Section~\ref{bindingActualsToFormals},
+using $F$ as the static type of the invoked function,
 and the static type of $i$ is as specified there.
 
 \LMHash{}%
 Evaluation of a function expression invocation
 
+\noindent
 \code{$e_f$<$A_1, \ldots,\ A_r$>($a_1, \ldots,\ a_n,\ x_{n+1}$: $a_{n+1}, \ldots,\ x_{n+k}$: $a_{n+k}$)}
 
 \noindent
@@ -8454,8 +8825,10 @@
 Let $f$ be a fresh variable bound to $o$.
 If $o$ is a function object then the function invocation
 
-\code{$f$<$A_1, \ldots,\ A_r$>($a_1, \ldots,\ a_n,\ x_{n+1}$: $a_{n+1}, \ldots,\ x_{n+k}$: $a_{n+k}$)}.
+\noindent
+\code{$f$<$A_1, \ldots,\ A_r$>($a_1, \ldots,\ a_n,\ x_{n+1}$: $a_{n+1}, \ldots,\ x_{n+k}$: $a_{n+k}$)}
 
+\noindent
 is evaluated by binding actuals to formals as specified in Section~\ref{bindingActualsToFormals},
 and executing the body of $f$ with those bindings;
 the returned result is then the result of evaluating $i$.
@@ -8466,6 +8839,7 @@
 the following ordinary method invocation is evaluated,
 and its result is then the result of evaluating $i$:
 
+\noindent
 \code{$f$.call<$A_1, \ldots,\ A_r$>($a_1, \ldots,\ a_n,\ x_{n+1}$: $a_{n+1}, \ldots,\ x_{n+k}$: $a_{n+k}$)}.
 
 \LMHash{}%
@@ -8495,7 +8869,9 @@
 when the static type of $e_f$ is \DYNAMIC{}.
 The run-time semantics ensures that
 a function invocation may amount to an invocation of the instance method \CALL{}.
-However, an interface type with a method named \CALL{} is not itself a subtype of any function type.
+However, an interface type with a method named \CALL{}
+is not itself a subtype of any function type
+(\ref{subtypeRules}).
 }
 
 
@@ -8915,7 +9291,7 @@
 If $o$ is the null object, $i$ evaluates to the null object (\ref{null}).
 Otherwise let $v$ be a fresh variable bound to $o$ and evaluate
 \code{$v$.$m$<$A_1, \ldots,\ A_r$>($a_1, \ldots,\ a_n,\ x_{n+1}$: $a_{n+1}, \ldots,\ x_{n+k}$: $a_{n+k}$)}
-to a value $r$.
+to an object $r$.
 Then $e$ evaluates to $r$.
 \EndCase
 
@@ -8986,7 +9362,7 @@
 proceeds as follows:
 
 \LMHash{}%
-First, the expression $e$ is evaluated to a value $o$.
+First, the expression $e$ is evaluated to an object $o$.
 Let $f$ be the result of looking up
 (\ref{lookup})
 method $m$ in $o$ with respect to the current library $L$.
@@ -8998,7 +9374,7 @@
 The body of $f$ is then executed with respect to the bindings
 that resulted from the evaluation of the argument list,
 and with \THIS{} bound to $o$.
-The value of $i$ is the value returned by the execution of $f$'s body.
+The value of $i$ is the object returned by the execution of $f$'s body.
 
 \LMHash{}%
 If the method lookup failed,
@@ -9238,7 +9614,7 @@
 Otherwise evaluate $e$ to an object $o$.
 If $o$ is the null object, $i$ evaluates to the null object (\ref{null}).
 Otherwise let $x$ be a fresh variable bound to $o$
-and evaluate \code{$x$.\id} to a value $r$.
+and evaluate \code{$x$.\id} to an object $r$.
 Then $i$ evaluates to $r$.
 \EndCase
 
@@ -10176,7 +10552,7 @@
 proceeds as follows:
 Evaluate $v$ to an object $o$.
 If $o$ is not the null object (\ref{null}), $a$ evaluates to $o$.
-Otherwise evaluate \code{$v$ = $e$} to a value $r$,
+Otherwise evaluate \code{$v$ = $e$} to an object $r$,
 and then $a$ evaluates to $r$.
 \EndCase
 
@@ -10195,7 +10571,7 @@
 where $C$ is a type literal proceeds as follow:
 Evaluate \code{$C$.$v$} to an object $o$.
 If $o$ is not the null object (\ref{null}), $a$ evaluates to $o$.
-Otherwise evaluate \code{$C$.$v$ = $e$} to a value $r$,
+Otherwise evaluate \code{$C$.$v$ = $e$} to an object $r$,
 and then $a$ evaluates to $r$.
 \EndCase
 
@@ -10451,7 +10827,8 @@
 A \Index{logical boolean expression} is either an equality expression (\ref{equality}), or an invocation of a logical boolean operator on an expression $e_1$ with argument $e_2$.
 
 \LMHash{}%
-Evaluation of a logical boolean expression $b$ of the form $e_1 || e_2$ causes the evaluation of $e_1$ to a value $o_1$.
+Evaluation of a logical boolean expression $b$ of the form $e_1 || e_2$ causes
+the evaluation of $e_1$ to an object $o_1$.
 % This error can occur due to implicit casts and null.
 It is a dynamic error if the run-time type of $o_1$ is not \code{bool}.
 If $o_1$ is \TRUE, the result of evaluating $b$ is \TRUE, otherwise $e_2$ is evaluated to an object $o_2$.
@@ -10806,7 +11183,9 @@
 Next, the stream associated with the innermost enclosing asynchronous for loop (\ref{asynchronousFor-in}), if any, is paused.
 The current invocation of the function body immediately enclosing $a$ is suspended until after $f$ completes.
 At some time after $f$ is completed, control returns to the current invocation.
-If $f$ has completed with an error $x$ and stack trace $t$, $a$ throws $x$ and $t$ (\ref{evaluation}).
+If $f$ has completed with an error $x$ and stack trace $t$,
+$a$ throws $x$ and $t$
+(\ref{expressionEvaluation}).
 If $f$ completes with a value $v$, $a$ evaluates to $v$.
 
 %Otherwise, the value of $a$ is the value of $e$. If evaluation of $e$ raises an exception $x$, $a$ raises $x$.
@@ -10843,10 +11222,14 @@
 
 \begin{grammar}
 <postfixExpression> ::= <assignableExpression> <postfixOperator>
+  \alt <constructorInvocation> <selector>*
   \alt <primary> <selector>*
 
 <postfixOperator> ::= <incrementOperator>
 
+<constructorInvocation> ::= \gnewline{}
+  <typeName> <typeArguments> `.' <identifier> <arguments>
+
 <selector> ::= <assignableSelector>
   \alt <argumentPart>
 
@@ -10855,153 +11238,182 @@
 \end{grammar}
 
 \LMHash{}%
-A \Index{postfix expression} is either a primary expression, a function, method or getter invocation, or an invocation of a postfix operator on an expression $e$.
+A \Index{postfix expression} is either a primary expression;
+a function, method or getter invocation;
+an invocation of a named constructor;
+or an invocation of a postfix operator on an expression $e$.
+All but the latter two are specified elsewhere.
 
 \LMHash{}%
-Evaluation of a postfix expression $e$ of the form \code{$v$++}, where $v$ is an identifier, proceeds as follows:
+\Case{Constructor Invocations}
+Consider a \synt{constructorInvocation} $e$ of the form
+\code{$n$<\metavar{typeArguments}>.\id(\metavar{arguments})}.
+If $n$ does not denote a class $C$
+that declares a constructor named \code{$C$.\id},
+a compile-time error occurs.
 
 \LMHash{}%
-Evaluate $v$ to an object $r$ and let $y$ be a fresh variable bound to $r$.
-Evaluate \code{$v$ = $y$ + 1}.
-Then $e$ evaluates to $r$.
+Otherwise, if $e$ occurs in a constant context
+(\ref{constantContexts})
+then $e$ is treated as \code{\CONST\,\,$e$},
+and if $e$ does not occur in a constant context
+then $e$ is treated as \code{\NEW\,\,$e$}.
 
-\LMHash{}%
-The static type of such an expression is the static type of $v$.
-
-\rationale{
-The above ensures that if $v$ is a variable, the getter gets called exactly once.
-Likewise in the cases below.
+% We might add support for passing type arguments to static methods,
+% but that is not a feature which is coming any time soon.
+\commentary{%
+Note that $e$ cannot be anything other than an instance creation
+(constant or not)
+because $e$ provides actual type arguments to $n$,
+which is not supported if $n$ denotes a library prefix,
+nor if $e$ is a static method invocation.
 }
+\EndCase
 
 \LMHash{}%
-Evaluation of a postfix expression $e$ of the form \code{$C$.$v$++}
+\Case{\code{$v$++}, \code{$v$-{}-}}
+Consider a postfix expression $e$ of the form \code{$v$\,\op},
+where $v$ is an identifier and \op{} is either \lit{++} or \lit{-{}-}.
+A compile-time error occurs unless $v$ denotes a variable,
+or $v$ denotes a getter and there is an associated setter \code{$v$=}.
+Let $T$ be the static type of the variable $v$ or the return type of the getter.
+A compile-time error occurs if $T$ is not \DYNAMIC{}
+and $T$ does not have an operator \lit{+} (when \op{} is \lit{++})
+or operator \lit{-} (when \op{} is \lit{-{}-}),
+or if the return type of this operator is not assignable to
+the variable respectively the argument type of the setter.
+A compile-time error occurs if \code{int} is not assignable to
+the parameter type of said operator.
+The static type of $e$ is $T$.
+
+\LMHash{}%
+Evaluation of a postfix expression $e$
+of the form \code{$v$++} respectively \code{$v$-{}-},
+where $v$ is an identifier, proceeds as follows:
+Evaluate $v$ to an object $r$ and let $y$ be a fresh variable bound to $r$.
+%% TODO(eernst): In order to eliminate syntactic sugar, we should probably
+%% rewrite this to specify the effect directly (cases to remember: `v` is a
+%% local variable/parameter, instance/static/global/imported getter).
+Evaluate \code{$v$ = $y$ + 1} respectively \code{$v$ = $y$ - 1}.
+Then $e$ evaluates to $r$.
+
+\rationale{%
+The above ensures that if the evaluation involves a getter,
+it gets called exactly once.
+Likewise in the cases below.%
+}
+\EndCase
+
+\LMHash{}%
+\Case{\code{$C$.$v$++}, \code{$C$.$v$-{}-}}
+Consider a postfix expression $e$ of the form \code{$C$.$v$\,\op},
+where $C$ is a type literal and \op{} is either \lit{++} or \lit{-{}-}.
+A compile-time error occurs unless \code{$C$.$v$} denotes a static getter
+and there is an associated static setter \code{$v$=}
+(\commentary{possibly implicitly induced by a static variable}).
+Let $T$ be the return type of said getter.
+A compile-time error occurs if $T$ is not \DYNAMIC{}
+and $T$ does not have an operator \lit{+} (when \op{} is \lit{++})
+or operator \lit{-} (when \op{} is \lit{-{}-}),
+or if the return type of this operator is not assignable to
+the argument type of the setter.
+A compile-time error occurs if \code{int} is not assignable to
+the parameter type of said operator.
+The static type of $e$ is $T$.
+
+\LMHash{}%
+Evaluation of a postfix expression $e$
+of the form \code{$C$.$v$++} respectively \code{$C$.$v$-{}-}
 where $C$ is a type literal proceeds as follows:
-
-\LMHash{}%
-Evaluate \code{$C$.$v$} to a value $r$
+Evaluate \code{$C$.$v$} to an object $r$
 and let $y$ be a fresh variable bound to $r$.
-Evaluate \code{$C$.$v$ = $y$ + 1}.
+Evaluate \code{$C$.$v$ = $y$ + 1} respectively \code{$C$.$v$ = $y$ - 1}.
 Then $e$ evaluates to $r$.
+\EndCase
 
 \LMHash{}%
-The static type of such an expression is the static type of \code{$C$.$v$}.
+\Case{\code{$e_1$.$v$++}, \code{$e_1$.$v$-{}-}}
+Consider a postfix expression $e$ of the form \code{$e_1$.$v$\,\op}
+where \op{} is either \lit{++} or \lit{-{}-}.
+Let $S$ be the static type of $e_1$.
+A compile-time error occurs unless $S$ has
+a getter named $v$ and a setter named \code{$v$=}
+(\commentary{possibly implicitly induced by an instance variable}).
+Let $T$ be the return type of said getter.
+A compile-time error occurs if $T$ is not \DYNAMIC{}
+and $T$ does not have an operator \lit{+} (when \op{} is \lit{++})
+or operator \lit{-} (when \op{} is \lit{-{}-}),
+or if the return type of this operator is not assignable to
+the argument type of the setter.
+A compile-time error occurs if \code{int} is not assignable to
+the parameter type of said operator.
+The static type of $e$ is $T$.
 
 \LMHash{}%
-Evaluation of a postfix expression $e$ of the form \code{$e_1$.$v$++}
+Evaluation of a postfix expression $e$
+of the form \code{$e_1$.$v$++} respectively \code{$e_1$.$v$-{}-}
 proceeds as follows:
-
-\LMHash{}%
 Evaluate $e_1$ to an object $u$ and let $x$ be a fresh variable bound to $u$.
-Evaluate \code{$x$.$v$} to a value $r$
+Evaluate \code{$x$.$v$} to an object $r$
 and let $y$ be a fresh variable bound to $r$.
-Evaluate \code{$x$.$v$ = $y$ + 1}.
+Evaluate \code{$x$.$v$ = $y$ + 1} respectively \code{$x$.$v$ = $y$ - 1}.
 Then $e$ evaluates to $r$.
+\EndCase
 
 \LMHash{}%
-The static type of such an expression is the static type of \code{$e_1$.$v$}.
+\Case{\code{$e_1$[$e_2$]++}, \code{$e_1$[$e_2$]-{}-}}
+Consider a postfix expression $e$ of the form \code{$e_1$[$e_2$]\,\op}
+where \op{} is either \lit{++} or \lit{-{}-}.
+Let $S_1$ be the static type of $e_1$
+and $S_2$ be the static type of $e_2$.
+A compile-time error occurs unless $S_1$ has
+an operator \lit{[]} and an operator \lit{[]=}.
+Let $T$ be the return type of the former.
+A compile-time error occurs unless $S_2$ is assignable to
+the first parameter type of said operator \lit{[]=}.
+A compile-time error occurs if $T$ is not \DYNAMIC{}
+and $T$ does not have an operator \lit{+} (when \op{} is \lit{++})
+or operator \lit{-} (when \op{} is \lit{-{}-}),
+or if the return type of this operator is not assignable to
+the second argument type of said operator \lit{[]=}.
+% We allow `e1[e2]++;` also when the entry has static type double,
+% so we can't just say 'assignable'.
+A compile-time error occurs if passing the integer literal \code{1}
+as an argument to said operator \lit{+} or \lit{-} would be an error.
+The static type of $e$ is $T$.
 
 \LMHash{}%
-Evaluation of a postfix expression $e$ of the form \code{$e_1$[$e_2$]++}
+Evaluation of a postfix expression $e$
+of the form \code{$e_1$[$e_2$]++} respectively \code{$e_1$[$e_2$]-{}-}
 proceeds as follows:
-
-\LMHash{}%
 Evaluate $e_1$ to an object $u$ and $e_2$ to an object $v$.
 Let $a$ and $i$ be fresh variables bound to $u$ and $v$ respectively.
 Evaluate \code{$a$[$i$]} to an object $r$
 and let $y$ be a fresh variable bound to $r$.
-Evaluate \code{$a$[$i$] = $y$ + 1}.
+Evaluate \code{$a$[$i$] = $y$ + 1} respectively \code{$a$[$i$] = $y$ - 1}.
 Then $e$ evaluates to $r$.
+\EndCase
 
 \LMHash{}%
-The static type of such an expression is the static type of \code{$e_1$[$e_2$]}.
+\Case{\code{$e_1$?.$v$++}, \code{$e_1$?.$v$-{}-}}
+Consider a postfix expression $e$ of the form \code{$e_1$?.$v$\,\op}
+where \op{} is either \lit{++} or \lit{-{}-}.
+Exactly the same compile-time errors that would be caused by \code{$e_1$.$v$\,\op}
+are also generated in the case of \code{$e_1$?.$v$\,\op}.
+The static type of $e$ is the static type of \code{$e_1$.$v$}.
 
 \LMHash{}%
-Evaluation of a postfix expression $e$ of the form \code{$v$-{}-}, where $v$ is an identifier, proceeds as follows:
-
-\LMHash{}%
-Evaluate the expression $v$ to an object $r$
-and let $y$ be a fresh variable bound to $r$.
-Evaluate \code{$v$ = $y$ - 1}.
-Then $e$ evaluates to $r$.
-
-\LMHash{}%
-The static type of such an expression is the static type of $v$.
-
-\LMHash{}%
-Evaluation of a postfix expression $e$ of the form \code{$C$.$v$-{}-}
+Evaluation of a postfix expression $e$
+of the form \code{$e_1$?.$v$++} respectively \code{$e_1$?.$v$-{}-}
 proceeds as follows:
-
-\LMHash{}%
-Evaluate \code{$C$.$v$} to a value $r$
-and let $y$ be a fresh variable bound to $r$.
-Evaluate \code{$C$.$v$ = $y$ - 1}.
-Then $e$ evaluates to $r$.
-
-\LMHash{}%
-The static type of such an expression is the static type of \code{$C$.$v$}.
-
-\LMHash{}%
-Evaluation of a postfix expression of the form \code{$e_1$.$v$-{}-}
-proceeds as follows:
-
-\LMHash{}%
-Evaluate $e_1$ to an object $u$ and let $x$ be a fresh variable bound to $u$.
-Evaluate \code{$x$.$v$} to a value $r$
-and let $y$ be a fresh variable bound to $r$.
-Evaluate \code{$x$.$v$ = $y$ - 1}.
-Then $e$ evaluates to $r$.
-
-\LMHash{}%
-The static type of such an expression is the static type of \code{$e_1$.$v$}.
-
-\LMHash{}%
-Evaluation of a postfix expression $e$ of the form \code{$e_1$[$e_2$]-{}-}
-proceeds as follows:
-
-\LMHash{}%
-Evaluate $e_1$ to an object $u$ and $e_2$ to an object $v$.
-Let $a$ and $i$ be fresh variables bound to $u$ and $v$ respectively.
-Evaluate \code{$a$[$i$]} to an object $r$
-and let $y$ be a fresh variable bound to $r$.
-Evaluate \code{$a$[$i$] = $y$ - 1}.
-Then $e$ evaluates to $r$.
-
-\LMHash{}%
-The static type of such an expression is the static type of \code{$e_1$[$e_2$]}.
-
-\LMHash{}%
-Evaluation of a postfix expression $e$ of the form \code{$e_1$?.$v$++}
-proceeds as follows:
-
-\LMHash{}%
 If $e_1$ is a type literal, evaluation of $e$ is equivalent to
-evaluation of \code{$e_1$.$v$++}.
-
-\LMHash{}%
+evaluation of \code{$e_1$.$v$++} respectively \code{$e_1$.$v$-{}-}.
 Otherwise evaluate $e_1$ to an object $u$.
 if $u$ is the null object, $e$ evaluates to the null object (\ref{null}).
 Otherwise let $x$ be a fresh variable bound to $u$.
-Evaluate \code{$x$.$v$++} to an object $o$.
+Evaluate \code{$x$.$v$++} respectively \code{$x$.$v$-{}-} to an object $o$.
 Then $e$ evaluates to $o$.
-
-\LMHash{}%
-The static type of such an expression is the static type of \code{$e_1$.$v$}.
-
-\LMHash{}%
-Evaluation of a postfix expression $e$ of the form \code{$e_1$?.$v$-{}-}
-proceeds as follows:
-
-If $e_1$ is a type literal, evaluation of $e$ is equivalent to
-evaluation of \code{$e_1$.$v$-{}-}.
-
-Otherwise evaluate $e_1$ to an object $u$.
-If $u$ is the null object, $e$ evaluates to the null object (\ref{null}).
-Otherwise let $x$ be a fresh variable bound to $u$.
-Evaluate \code{$x$.$v$-{}-} to an object $o$.
-Then $e$ evaluates to $o$.
-
-\LMHash{}%
-The static type of such an expression is the static type of \code{$e_1$.$v$}.
+\EndCase
 
 
 \subsection{Assignable Expressions}
@@ -11017,10 +11429,13 @@
 }
 
 \begin{grammar}
-<assignableExpression> ::= <primary> (<argumentPart>* <assignableSelector>)+
+<assignableExpression> ::= <primary> <assignableSelectorPart>+
   \alt \SUPER{} <unconditionalAssignableSelector>
+  \alt <constructorInvocation> <assignableSelectorPart>+
   <identifier>
 
+<assignableSelectorPart> ::= <argumentPart>* <assignableSelector>
+
 <unconditionalAssignableSelector> ::= `[' <expression> `]'
   \alt `.' <identifier>
 
@@ -11213,7 +11628,7 @@
 Evaluation of the is-expression \code{$e$ \IS{} $T$} proceeds as follows:
 
 \LMHash{}%
-The expression $e$ is evaluated to a value $v$.
+The expression $e$ is evaluated to an object $v$.
 If the dynamic type of $v$ is a subtype of $T$,
 the is-expression evaluates to \TRUE.
 Otherwise it evaluates to \FALSE.
@@ -11281,7 +11696,7 @@
  Evaluation of the cast expression \code{$e$ \AS{} $T$} proceeds as follows:
 
 \LMHash{}%
-The expression $e$ is evaluated to a value $v$.
+The expression $e$ is evaluated to an object $v$.
 % This error can occur, by design of `as`.
 It is a dynamic type error if $o$ is not the null object (\ref{null}),
 and the dynamic type of $o$ is not a subtype of $T$.
@@ -11296,7 +11711,8 @@
 
 \LMHash{}%
 A \Index{statement} is a fragment of Dart code that can be executed at run time.
-Statements, unlike expressions, do not evaluate to a value, but are instead executed for their effect on the program state and control flow.
+Statements, unlike expressions, do not evaluate to an object,
+but are instead executed for their effect on the program state and control flow.
 
 \begin{grammar}
 <statements> ::= <statement>*
@@ -11422,8 +11838,8 @@
 
 \LMHash{}%
 Execution of an expression statement \code{$e$;} proceeds by evaluating $e$.
-If the expression evaluates to a value, then the value is ignored
-and the execution completes normally.
+If the expression evaluates to an object,
+then the object is ignored and the execution completes normally.
 
 
 \subsection{Local Variable Declaration}
@@ -11560,9 +11976,9 @@
 \begin{dartCode}
 \CLASS{} C \{\}
 perverse() \{
-   \VAR{} v = \NEW{} C(); // \comment{compile-time error}
-   C aC; // \comment{compile-time error}
-   \VAR{} C = 10;
+  \VAR{} v = \NEW{} C(); // \comment{compile-time error}
+  C aC; // \comment{compile-time error}
+  \VAR{} C = 10;
 \}
 \end{dartCode}
 
@@ -11765,7 +12181,7 @@
 If this is the first iteration of the for loop, let $v'$ be $v$.
 Otherwise, let $v'$ be the variable $v''$ created in the previous execution of step \ref{allocateFreshVar}.
 \item
-The expression $[v'/v]c$ is evaluated to a value $o$.
+The expression $[v'/v]c$ is evaluated to an object $o$.
 % This error can occur due to implicit casts and null.
 It is a dynamic error if the run-time type of $o$ is not \code{bool}.
 If $o$ is \FALSE{}, the for loop completes normally.
@@ -11825,8 +12241,8 @@
 \begin{normativeDartCode}
 \VAR{} $n0$ = $e$.iterator;
 \WHILE{} ($n0$.moveNext()) \{
-   $D$ \id{} = $n0$.current;
-   $s$
+\ \ $D$ \id{} = $n0$.current;
+\ \ $s$
 \}
 \end{normativeDartCode}
 
@@ -12004,33 +12420,41 @@
 \end{grammar}
 
 \LMHash{}%
- Given a switch statement of the form
+Consider a switch statement of the form
 
 \begin{normativeDartCode}
 \SWITCH{} ($e$) \{
-   $label_{11} \ldots label_{1j_1}$ \CASE{} $e_1: s_1$
-   $\ldots$
-   $label_{n1} \ldots label_{nj_n}$ \CASE{} $e_n: s_n$
-   $label_{(n+1)1} \ldots label_{(n+1)j_{n+1}}$ \DEFAULT{}: $s_{n+1}$
+\ \ $label_{11} \ldots label_{1j_1}$ \CASE{} $e_1: s_1$
+\ \ $\ldots$
+\ \ $label_{n1} \ldots label_{nj_n}$ \CASE{} $e_n: s_n$
+\ \ $label_{(n+1)1} \ldots label_{(n+1)j_{n+1}}$ \DEFAULT{}: $s_{n+1}$
 \}
 \end{normativeDartCode}
 
+\noindent
 or the form
 
 \begin{normativeDartCode}
 \SWITCH{} ($e$) \{
-   $label_{11} \ldots label_{1j_1}$ \CASE{} $e_1: s_1$
-   $\ldots$
-   $label_{n1} \ldots label_{nj_n}$ \CASE{} $e_n: s_n$
+\ \ $label_{11} \ldots label_{1j_1}$ \CASE{} $e_1: s_1$
+\ \ $\ldots$
+\ \ $label_{n1} \ldots label_{nj_n}$ \CASE{} $e_n: s_n$
 \}
 \end{normativeDartCode}
 
-it is a compile-time error unless the expressions $e_k$ are constant expressions for all $k \in 1 .. n$.
-It is a compile-time error if the values of the expressions $e_k$ are not either:
+\commentary{%
+Note that each expression $e_j, j \in 1 .. n$ occurs in a constant context
+(\ref{constantContexts}),
+which means that \CONST{} modifiers need not be specified explicitly.%
+}
+
+\LMHash{}%
+It is a compile-time error unless each expression $e_j, j \in 1 .. n$ is constant.
+It is a compile-time error if the value of the expressions $e_j, j \in 1 .. n$ are not either:
 \begin{itemize}
-\item instances of the same class $C$, for all $k \in 1 .. n$, or
-\item instances of a class that implements \code{int}, for all $k \in 1 .. n$, or
-\item instances of a class that implements \code{String}, for all $k \in 1 .. n$.
+\item instances of the same class $C$, for all $j \in 1 .. n$, or
+\item instances of a class that implements \code{int}, for all $j \in 1 .. n$, or
+\item instances of a class that implements \code{String}, for all $j \in 1 .. n$.
 \end{itemize}
 
 \commentary{
@@ -12067,10 +12491,10 @@
 
 \begin{normativeDartCode}
 \SWITCH{} ($e$) \{
-   $label_{11} \ldots label_{1j_1}$ \CASE{} $e_1: s_1$
-   $\ldots$
-   $label_{n1} \ldots label_{nj_n}$ \CASE{} $e_n: s_n$
-   $label_{(n+1)1} \ldots label_{(n+1)j_{n+1}}$ \DEFAULT{}: $s_{n+1}$
+\ \ $label_{11} \ldots label_{1j_1}$ \CASE{} $e_1: s_1$
+\ \ $\ldots$
+\ \ $label_{n1} \ldots label_{nj_n}$ \CASE{} $e_n: s_n$
+\ \ $label_{(n+1)1} \ldots label_{(n+1)j_{n+1}}$ \DEFAULT{}: $s_{n+1}$
 \}
 \end{normativeDartCode}
 
@@ -12078,9 +12502,9 @@
 
 \begin{normativeDartCode}
 \SWITCH{} ($e$) \{
-   $label_{11} \ldots label_{1j_1}$ \CASE{} $e_1: s_1$
-   $\ldots$
-   $label_{n1} \ldots label_{nj_n}$ \CASE{} $e_n: s_n$
+\ \ $label_{11} \ldots label_{1j_1}$ \CASE{} $e_1: s_1$
+\ \ $\ldots$
+\ \ $label_{n1} \ldots label_{nj_n}$ \CASE{} $e_n: s_n$
 \}
 \end{normativeDartCode}
 
@@ -12106,10 +12530,10 @@
 
 \begin{normativeDartCode}
 \SWITCH{} ($e$) \{
-   $label_{11} \ldots label_{1j_1}$ \CASE{} $e_1: s_1$
-   $\ldots$
-   $label_{n1} \ldots label_{nj_n}$ \CASE{} $e_n: s_n$
-   $label_{(n+1)1} \ldots label_{(n+1)j_{n+1}}$ \DEFAULT{}: $s_{n+1}$
+\ \ $label_{11} \ldots label_{1j_1}$ \CASE{} $e_1: s_1$
+\ \ $\ldots$
+\ \ $label_{n1} \ldots label_{nj_n}$ \CASE{} $e_n: s_n$
+\ \ $label_{(n+1)1} \ldots label_{(n+1)j_{n+1}}$ \DEFAULT{}: $s_{n+1}$
 \}
 \end{normativeDartCode}
 
@@ -12129,9 +12553,9 @@
 
 \begin{normativeDartCode}
 \SWITCH{} ($e$) \{
-   $label_{11} \ldots label_{1j_1}$ \CASE{} $e_1: s_1$
-   $\ldots$
-   $label_{n1} \ldots label_{nj_n}$ \CASE{} $e_n: s_n$
+\ \ $label_{11} \ldots label_{1j_1}$ \CASE{} $e_1: s_1$
+\ \ $\ldots$
+\ \ $label_{n1} \ldots label_{nj_n}$ \CASE{} $e_n: s_n$
 \}
 \end{normativeDartCode}
 
@@ -12200,9 +12624,9 @@
 
 \begin{normativeDartCode}
 \SWITCH{} ($e$) \{
-   $label_{11} \ldots label_{1j_1}$ \CASE{} $e_1: s_1$
-   $\ldots$
-   $label_{n1} \ldots label_{nj_n}$ \CASE{} $e_n: s_n$
+\ \ $label_{11} \ldots label_{1j_1}$ \CASE{} $e_1: s_1$
+\ \ $\ldots$
+\ \ $label_{n1} \ldots label_{nj_n}$ \CASE{} $e_n: s_n$
 \}
 \end{normativeDartCode}
 
@@ -12210,10 +12634,10 @@
 
 \begin{normativeDartCode}
 \SWITCH{} ($e$) \{
-   $label_{11} \ldots label_{1j_1}$ \CASE{} $e_1: s_1$
-   $\ldots$
-   $label_{n1} \ldots label_{nj_n}$ \CASE{} $e_n: s_n$
-   $label_{(n+1)1} \ldots label_{(n+1)j_{n+1}}$ \DEFAULT{}: $s_{n+1}$
+\ \ $label_{11} \ldots label_{1j_1}$ \CASE{} $e_1: s_1$
+\ \ $\ldots$
+\ \ $label_{n1} \ldots label_{nj_n}$ \CASE{} $e_n: s_n$
+\ \ $label_{(n+1)1} \ldots label_{(n+1)j_{n+1}}$ \DEFAULT{}: $s_{n+1}$
 \}
 \end{normativeDartCode}
 
@@ -12785,7 +13209,7 @@
 \item
   The getter \code{current} is invoked on $i$.
   If the invocation throws
-  (\ref{evaluation}),
+  (\ref{expressionEvaluation}),
   execution of $s$ throws the same exception object and stack trace
   (\ref{statementCompletion}).
   Otherwise, the result $x$ of the getter invocation is added to
diff --git a/docs/process/breaking-changes.md b/docs/process/breaking-changes.md
index adf71a2..5ed9bcb 100644
--- a/docs/process/breaking-changes.md
+++ b/docs/process/breaking-changes.md
@@ -66,7 +66,7 @@
 
 [TODO: Link to an issue template for this]
 
-* Email `announce@dartlang.org, flutter-announce@googlegroups.com`,:
+* Email Dart Announce (`announce@dartlang.org`):
 
   * Subject: 'Breaking change [bug ID]: [short summary]'
 
@@ -77,6 +77,9 @@
   * A request that developers may leave comments in the linked issue, if this
     breaking change poses a severe problem.
 
+* Once you have sent the announce email, please let `aadilmaan@google.com` know
+as he will help drive the request through approval review process.
+
 ### Step 2: Approval
 
 If there is a general agreement that the benefit of the change outweighs the
diff --git a/pkg/analysis_server/README.md b/pkg/analysis_server/README.md
index d596f5c..d93666c 100644
--- a/pkg/analysis_server/README.md
+++ b/pkg/analysis_server/README.md
@@ -12,7 +12,9 @@
 
 Clients (typically tools, such as an editor) are expected to run the analysis
 server in a separate process and communicate with it using a JSON protocol. The
-protocol is specified in the file [`analysis_server/doc/api.html`][api].
+original protocol is specified in the file [`analysis_server/doc/api.html`][api]
+and (less complete) [Language Server Protocol][lsp_spec] support is documented
+in [`tool/lsp_spec/README.md`](tool/lsp_spec/README.md).
 
 ## Features and bugs
 
@@ -20,3 +22,4 @@
 
 [tracker]: https://github.com/dart-lang/sdk/issues
 [api]: https://htmlpreview.github.io/?https://github.com/dart-lang/sdk/blob/master/pkg/analysis_server/doc/api.html
+[lsp_spec]: https://microsoft.github.io/language-server-protocol/
diff --git a/pkg/analysis_server/doc/api.html b/pkg/analysis_server/doc/api.html
index f7ed499..204d162 100644
--- a/pkg/analysis_server/doc/api.html
+++ b/pkg/analysis_server/doc/api.html
@@ -109,7 +109,7 @@
 <body>
 <h1>Analysis Server API Specification</h1>
 <h1 style="color:#999999">Version
-  1.23.0
+  1.26.0
 </h1>
 <p>
   This document contains a specification of the API provided by the
@@ -256,6 +256,9 @@
 </ul>
 
 <p><a href="#domain_completion">Completion</a></p><ul><li><a href="#request_completion.getSuggestions">completion.getSuggestions</a></li>
+<li><a href="#request_completion.setSubscriptions">completion.setSubscriptions</a></li>
+<li><a href="#request_completion.registerLibraryPaths">completion.registerLibraryPaths</a></li>
+<li><a href="#request_completion.getSuggestionDetails">completion.getSuggestionDetails</a></li>
 </ul>
 
 <p><a href="#domain_search">Search</a></p><ul><li><a href="#request_search.findElementReferences">search.findElementReferences</a></li>
@@ -1451,6 +1454,7 @@
   
   
   
+  
 <h3>Requests</h3><dl><dt class="request"><a name="request_completion.getSuggestions">completion.getSuggestions</a></dt><dd><div class="box"><pre>request: {
   "id": String
   "method": "completion.getSuggestions"
@@ -1489,6 +1493,117 @@
           The identifier used to associate results with this
           completion request.
         </p>
+      </dd></dl></dd><dt class="request"><a name="request_completion.setSubscriptions">completion.setSubscriptions</a></dt><dd><div class="box"><pre>request: {
+  "id": String
+  "method": "completion.setSubscriptions"
+  "params": {
+    "<b>subscriptions</b>": List&lt;<a href="#type_CompletionService">CompletionService</a>&gt;
+  }
+}</pre><br><pre>response: {
+  "id": String
+  "error": <span style="color:#999999">optional</span> <a href="#type_RequestError">RequestError</a>
+}</pre></div>
+    <p>
+      Subscribe for completion services. All previous subscriptions are
+      replaced by the given set of services.
+    </p>
+    <p>
+      It is an error if any of the elements in the list are not valid
+      services. If there is an error, then the current subscriptions will
+      remain unchanged.
+    </p>
+    
+  <h4>parameters:</h4><dl><dt class="field"><b>subscriptions: List&lt;<a href="#type_CompletionService">CompletionService</a>&gt;</b></dt><dd>
+        
+        <p>A list of the services being subscribed to.</p>
+      </dd></dl></dd><dt class="request"><a name="request_completion.registerLibraryPaths">completion.registerLibraryPaths</a></dt><dd><div class="box"><pre>request: {
+  "id": String
+  "method": "completion.registerLibraryPaths"
+  "params": {
+    "<b>paths</b>": List&lt;<a href="#type_LibraryPathSet">LibraryPathSet</a>&gt;
+  }
+}</pre><br><pre>response: {
+  "id": String
+  "error": <span style="color:#999999">optional</span> <a href="#type_RequestError">RequestError</a>
+}</pre></div>
+    <p>
+      The client can make this request to express interest in certain
+      libraries to receive completion suggestions from based on the client path.
+      If this request is received before the client has used
+      'completion.setSubscriptions' to subscribe to the <tt>AVAILABLE_SUGGESTION_SETS</tt>
+      service, then an error of type <tt>NOT_SUBSCRIBED_TO_AVAILABLE_SUGGESTION_SETS</tt>
+      will be generated. All previous paths are replaced by the given set of paths.
+    </p>
+    
+  <h4>parameters:</h4><dl><dt class="field"><b>paths: List&lt;<a href="#type_LibraryPathSet">LibraryPathSet</a>&gt;</b></dt><dd>
+        
+        <p>
+          A list of objects each containing a path and the additional libraries from which
+          the client is interested in receiving completion suggestions.
+          If one configured path is beneath another, the descendent
+          will override the ancestors' configured libraries of interest.
+        </p>
+      </dd></dl></dd><dt class="request"><a name="request_completion.getSuggestionDetails">completion.getSuggestionDetails</a></dt><dd><div class="box"><pre>request: {
+  "<b>id</b>": String
+  "method": "completion.getSuggestionDetails"
+  "params": {
+    "<b>file</b>": <a href="#type_FilePath">FilePath</a>
+    "<b>id</b>": int
+    "<b>label</b>": String
+    "<b>offset</b>": int
+  }
+}</pre><br><pre>response: {
+  "id": String
+  "error": <span style="color:#999999">optional</span> <a href="#type_RequestError">RequestError</a>
+  "result": {
+    "<b>completion</b>": String
+    "<b>change</b>": <span style="color:#999999">optional</span> <a href="#type_SourceChange">SourceChange</a>
+  }
+}</pre></div>
+    <p>
+      Clients must make this request when the user has selected a completion
+      suggestion from an <tt>AvailableSuggestionSet</tt>. Analysis server will respond with
+      the text to insert as well as any <tt>SourceChange</tt> that needs to be applied
+      in case the completion requires an additional import to be added. It is an error
+      if the id is no longer valid, for instance if the library has been removed after
+      the completion suggestion is accepted.
+    </p>
+    
+    
+  <h4>parameters:</h4><dl><dt class="field"><b>file: <a href="#type_FilePath">FilePath</a></b></dt><dd>
+        
+        <p>
+          The path of the file into which this completion is being inserted.
+        </p>
+      </dd><dt class="field"><b>id: int</b></dt><dd>
+        
+        <p>
+          The identifier of the <tt>AvailableSuggestionSet</tt> containing
+          the selected label.
+        </p>
+      </dd><dt class="field"><b>label: String</b></dt><dd>
+        
+        <p>
+          The label from the <tt>AvailableSuggestionSet</tt> with the `id`
+          for which insertion information is requested.
+        </p>
+      </dd><dt class="field"><b>offset: int</b></dt><dd>
+        
+        <p>
+          The offset in the file where the completion will be inserted.
+        </p>
+      </dd></dl><h4>returns:</h4><dl><dt class="field"><b>completion: String</b></dt><dd>
+        
+        <p>
+          The full text to insert, including any optional import prefix.
+        </p>
+      </dd><dt class="field"><b>change: <a href="#type_SourceChange">SourceChange</a><span style="color:#999999"> (optional)</span></b></dt><dd>
+        
+        <p>
+          A change for the client to apply in case the library containing
+          the accepted completion suggestion needs to be imported. The field
+          will be omitted if there are no additional changes that need to be made.
+        </p>
       </dd></dl></dd></dl><h3>Notifications</h3><dl><dt class="notification"><a name="notification_completion.results">completion.results</a></dt><dd><div class="box"><pre>notification: {
   "event": "completion.results"
   "params": {
@@ -1498,7 +1613,7 @@
     "<b>results</b>": List&lt;<a href="#type_CompletionSuggestion">CompletionSuggestion</a>&gt;
     "<b>isLast</b>": bool
     "<b>includedSuggestionSets</b>": <span style="color:#999999">optional</span> List&lt;<a href="#type_IncludedSuggestionSet">IncludedSuggestionSet</a>&gt;
-    "<b>includedSuggestionKinds</b>": <span style="color:#999999">optional</span> List&lt;<a href="#type_ElementKind">ElementKind</a>&gt;
+    "<b>includedElementKinds</b>": <span style="color:#999999">optional</span> List&lt;<a href="#type_ElementKind">ElementKind</a>&gt;
     "<b>includedSuggestionRelevanceTags</b>": <span style="color:#999999">optional</span> List&lt;<a href="#type_IncludedSuggestionRelevanceTag">IncludedSuggestionRelevanceTag</a>&gt;
   }
 }</pre></div>
@@ -1551,19 +1666,13 @@
       </dd><dt class="field"><b>includedSuggestionSets: List&lt;<a href="#type_IncludedSuggestionSet">IncludedSuggestionSet</a>&gt;<span style="color:#999999"> (optional)</span></b></dt><dd>
         
         <p>
-          This field is experimental.
-        </p>
-        <p>
           References to <tt>AvailableSuggestionSet</tt> objects previously sent
           to the client. The client can include applicable names from the
           referenced library in code completion suggestions.
         </p>
-      </dd><dt class="field"><b>includedSuggestionKinds: List&lt;<a href="#type_ElementKind">ElementKind</a>&gt;<span style="color:#999999"> (optional)</span></b></dt><dd>
+      </dd><dt class="field"><b>includedElementKinds: List&lt;<a href="#type_ElementKind">ElementKind</a>&gt;<span style="color:#999999"> (optional)</span></b></dt><dd>
         
         <p>
-          This field is experimental.
-        </p>
-        <p>
           The client is expected to check this list against the
           <tt>ElementKind</tt> sent in <tt>IncludedSuggestionSet</tt> to decide
           whether or not these symbols should should be presented to the user.
@@ -1571,9 +1680,6 @@
       </dd><dt class="field"><b>includedSuggestionRelevanceTags: List&lt;<a href="#type_IncludedSuggestionRelevanceTag">IncludedSuggestionRelevanceTag</a>&gt;<span style="color:#999999"> (optional)</span></b></dt><dd>
         
         <p>
-          This field is experimental.
-        </p>
-        <p>
           The client is expected to check this list against the values of the
           field <tt>relevanceTags</tt> of <tt>AvailableSuggestion</tt> to
           decide if the suggestion should be given a different relevance than
@@ -1586,6 +1692,34 @@
           than one <tt>IncludedSuggestionRelevanceTag</tt>, the maximum
           relevance boost is used.
         </p>
+      </dd></dl></dd><dt class="notification"><a name="notification_completion.availableSuggestions">completion.availableSuggestions</a></dt><dd><div class="box"><pre>notification: {
+  "event": "completion.availableSuggestions"
+  "params": {
+    "<b>changedLibraries</b>": <span style="color:#999999">optional</span> List&lt;<a href="#type_AvailableSuggestionSet">AvailableSuggestionSet</a>&gt;
+    "<b>removedLibraries</b>": <span style="color:#999999">optional</span> List&lt;int&gt;
+  }
+}</pre></div>
+    <p>
+      Reports the pre-computed, candidate completions from symbols defined
+      in a corresponding library. This notification may be sent multiple times.
+      When a notification is processed, clients should replace any previous
+      information about the libraries in the list of changedLibraries, discard
+      any information about the libraries in the list of removedLibraries, and
+      preserve any previously received information about any libraries that are
+      not included in either list.
+    </p>
+    
+  <h4>parameters:</h4><dl><dt class="field"><b>changedLibraries: List&lt;<a href="#type_AvailableSuggestionSet">AvailableSuggestionSet</a>&gt;<span style="color:#999999"> (optional)</span></b></dt><dd>
+        
+        <p>
+          A list of pre-computed, potential completions coming from
+          this set of completion suggestions.
+        </p>
+      </dd><dt class="field"><b>removedLibraries: List&lt;int&gt;<span style="color:#999999"> (optional)</span></b></dt><dd>
+        
+        <p>
+          A list of library ids that no longer apply.
+        </p>
       </dd></dl></dd></dl>
 <h2 class="domain"><a name="domain_search">search domain</a></h2>
   <p>
@@ -2698,6 +2832,7 @@
   
   
   
+  
 <dl><dt class="typeDefinition"><a name="type_AddContentOverlay">AddContentOverlay: object</a></dt><dd>
     <p>
       A directive to begin overlaying the contents of a file. The supplied
@@ -2756,6 +2891,11 @@
         <p>
           The name, as a string, of the error code associated with this error.
         </p>
+      </dd><dt class="field"><b>url: String<span style="color:#999999"> (optional)</span></b></dt><dd>
+        
+        <p>
+          The URL of a page containing documentation associated with this error.
+        </p>
       </dd><dt class="field"><b>hasFix: bool<span style="color:#999999"> (optional)</span></b></dt><dd>
         
         <p>
@@ -2881,12 +3021,95 @@
           The name of the current target of analysis. This field is
           omitted if analyzing is false.
         </p>
+      </dd></dl></dd><dt class="typeDefinition"><a name="type_AvailableSuggestion">AvailableSuggestion: object</a></dt><dd>
+    <p>
+      A partial completion suggestion that can be used in combination with
+      info from <tt>completion.results</tt> to build completion suggestions
+      for not yet imported library tokens.
+    </p>
+    
+  <dl><dt class="field"><b>label: String</b></dt><dd>
+        
+        <p>
+          The identifier to present to the user for code completion.
+        </p>
+      </dd><dt class="field"><b>element: <a href="#type_Element">Element</a></b></dt><dd>
+        
+        <p>
+          Information about the element reference being suggested.
+        </p>
+      </dd><dt class="field"><b>defaultArgumentListString: String<span style="color:#999999"> (optional)</span></b></dt><dd>
+        
+        <p>
+          A default String for use in generating argument list source contents
+          on the client side.
+        </p>
+      </dd><dt class="field"><b>defaultArgumentListTextRanges: List&lt;int&gt;<span style="color:#999999"> (optional)</span></b></dt><dd>
+        
+        <p>
+          Pairs of offsets and lengths describing 'defaultArgumentListString'
+          text ranges suitable for use by clients to set up linked edits of
+          default argument source contents. For example, given an argument list
+          string 'x, y', the corresponding text range [0, 1, 3, 1], indicates
+          two text ranges of length 1, starting at offsets 0 and 3. Clients can
+          use these ranges to treat the 'x' and 'y' values specially for linked
+          edits.
+        </p>
+      </dd><dt class="field"><b>docComplete: String<span style="color:#999999"> (optional)</span></b></dt><dd>
+        
+        <p>
+          The Dartdoc associated with the element being suggested. This field
+          is omitted if there is no Dartdoc associated with the element.
+        </p>
+      </dd><dt class="field"><b>docSummary: String<span style="color:#999999"> (optional)</span></b></dt><dd>
+        
+        <p>
+          An abbreviated version of the Dartdoc associated with the element being suggested.
+          This field is omitted if there is no Dartdoc associated with the element.
+        </p>
+      </dd><dt class="field"><b>parameterNames: List&lt;String&gt;<span style="color:#999999"> (optional)</span></b></dt><dd>
+        
+        <p>
+          If the element is an executable, the names of the formal parameters of
+          all kinds - required, optional positional, and optional named. The
+          names of positional parameters are empty strings. Omitted if the element
+          is not an executable.
+        </p>
+      </dd><dt class="field"><b>parameterTypes: List&lt;String&gt;<span style="color:#999999"> (optional)</span></b></dt><dd>
+        
+        <p>
+          If the element is an executable, the declared types of the formal parameters
+          of all kinds - required, optional positional, and optional named.
+          Omitted if the element is not an executable.
+        </p>
+      </dd><dt class="field"><b>relevanceTags: List&lt;<a href="#type_AvailableSuggestionRelevanceTag">AvailableSuggestionRelevanceTag</a>&gt;<span style="color:#999999"> (optional)</span></b></dt><dd>
+        
+        <p>
+          This field is set if the relevance of this suggestion might be
+          changed depending on where completion is requested.
+        </p>
+      </dd><dt class="field"><b>requiredParameterCount: int<span style="color:#999999"> (optional)</span></b></dt><dd>
+        
       </dd></dl></dd><dt class="typeDefinition"><a name="type_AvailableSuggestionRelevanceTag">AvailableSuggestionRelevanceTag: String</a></dt><dd>
     
     <p>
       The opaque tag value.
     </p>
-  </dd><dt class="typeDefinition"><a name="type_ChangeContentOverlay">ChangeContentOverlay: object</a></dt><dd>
+  </dd><dt class="typeDefinition"><a name="type_AvailableSuggestionSet">AvailableSuggestionSet: object</a></dt><dd>
+    
+  <dl><dt class="field"><b>id: int</b></dt><dd>
+        
+        <p>
+          The id associated with the library.
+        </p>
+      </dd><dt class="field"><b>uri: String</b></dt><dd>
+        
+        <p>
+          The URI of the library.
+        </p>
+      </dd><dt class="field"><b>items: List&lt;<a href="#type_AvailableSuggestion">AvailableSuggestion</a>&gt;</b></dt><dd>
+        
+      </dd></dl></dd><dt class="typeDefinition"><a name="type_ChangeContentOverlay">ChangeContentOverlay: object</a></dt><dd>
     <p>
       A directive to modify an existing file content overlay. One or more ranges
       of text are deleted from the old file content overlay and replaced with
@@ -2945,7 +3168,20 @@
       An identifier used to associate completion results with a
       completion request.
     </p>
-  </dd><dt class="typeDefinition"><a name="type_CompletionSuggestion">CompletionSuggestion: object</a></dt><dd>
+  </dd><dt class="typeDefinition"><a name="type_CompletionService">CompletionService: String</a></dt><dd>
+    <p>
+      An enumeration of the completion services to which a client can subscribe.
+    </p>
+    
+  <dl><dt class="value">AVAILABLE_SUGGESTION_SETS</dt><dd>
+        
+        <p>
+          The client will receive notifications once subscribed with completion suggestion sets from
+          the libraries of interest. The client should keep an up-to-date record of these in
+          memory so that it will be able to union these candidates with other
+          completion suggestions when applicable at completion time.
+        </p>
+      </dd></dl></dd><dt class="typeDefinition"><a name="type_CompletionSuggestion">CompletionSuggestion: object</a></dt><dd>
     <p>
       A suggestion for how to complete partially entered text. Many of the
       fields are optional, depending on the kind of element being suggested.
@@ -2977,12 +3213,6 @@
           is only defined if the displayed text should be different than the
           completion.  Otherwise it is omitted.
         </p>
-      </dd><dt class="field"><b>elementUri: String<span style="color:#999999"> (optional)</span></b></dt><dd>
-        
-        <p>
-          The URI of the element corresponding to this suggestion. It will be
-          set whenever analysis server is able to compute it.
-        </p>
       </dd><dt class="field"><b>selectionOffset: int</b></dt><dd>
         
         <p>
@@ -3093,12 +3323,6 @@
           The type of the options parameter being suggested. This field is
           omitted if the parameterName field is omitted.
         </p>
-      </dd><dt class="field"><b>importUri: String<span style="color:#999999"> (optional)</span></b></dt><dd>
-        
-        <p>
-          The import to be added if the suggestion is out of scope and needs
-          an import to be added to be in scope.
-        </p>
       </dd></dl></dd><dt class="typeDefinition"><a name="type_CompletionSuggestionKind">CompletionSuggestionKind: String</a></dt><dd>
     <p>
       An enumeration of the kinds of elements that can be included in a
@@ -3716,6 +3940,57 @@
         <p>
           The names of the elements imported from the library.
         </p>
+      </dd></dl></dd><dt class="typeDefinition"><a name="type_IncludedSuggestionRelevanceTag">IncludedSuggestionRelevanceTag: object</a></dt><dd>
+    <p>
+      Each <tt>AvailableSuggestion</tt> can specify zero or more tags in the
+      field <tt>relevanceTags</tt>, so that when the included tag is equal to
+      one of the <tt>relevanceTags</tt>, the suggestion is given higher
+      relevance than the whole <tt>IncludedSuggestionSet</tt>.
+    </p>
+    
+  <dl><dt class="field"><b>tag: <a href="#type_AvailableSuggestionRelevanceTag">AvailableSuggestionRelevanceTag</a></b></dt><dd>
+        
+        <p>
+          The opaque value of the tag.
+        </p>
+      </dd><dt class="field"><b>relevanceBoost: int</b></dt><dd>
+        
+        <p>
+          The boost to the relevance of the completion suggestions that match
+          this tag, which is added to the relevance of the containing
+          <tt>IncludedSuggestionSet</tt>.
+        </p>
+      </dd></dl></dd><dt class="typeDefinition"><a name="type_IncludedSuggestionSet">IncludedSuggestionSet: object</a></dt><dd>
+    <p>
+      A reference to an <tt>AvailableSuggestionSet</tt> noting
+      that the library's members which match the kind of this ref
+      should be presented to the user.
+    </p>
+    
+  <dl><dt class="field"><b>id: int</b></dt><dd>
+        
+        <p>
+          Clients should use it to access the set of precomputed completions
+          to be displayed to the user.
+        </p>
+      </dd><dt class="field"><b>relevance: int</b></dt><dd>
+        
+        <p>
+          The relevance of completion suggestions from this
+          library where a higher number indicates a higher relevance.
+        </p>
+      </dd><dt class="field"><b>displayUri: String<span style="color:#999999"> (optional)</span></b></dt><dd>
+        
+        <p>
+          The optional string that should be displayed instead of the
+          <tt>uri</tt> of the referenced <tt>AvailableSuggestionSet</tt>.
+        </p>
+        <p>
+          For example libraries in the "test" directory of a package have only
+          "file://" URIs, so are usually long, and don't look nice, but actual
+          import directives will use relative URIs, which are short, so we
+          probably want to display such relative URIs to the user.
+        </p>
       </dd></dl></dd><dt class="typeDefinition"><a name="type_KytheEntry">KytheEntry: object</a></dt><dd>
     <p>
       This object matches the format and documentation of the Entry object
@@ -3787,6 +4062,24 @@
         <p>
           The language this name belongs to.
         </p>
+      </dd></dl></dd><dt class="typeDefinition"><a name="type_LibraryPathSet">LibraryPathSet: object</a></dt><dd>
+    <p>
+      A list of associations between paths and the libraries that should be
+      included for code completion when editing a file beneath that path.
+    </p>
+    
+  <dl><dt class="field"><b>scope: <a href="#type_FilePath">FilePath</a></b></dt><dd>
+        
+        <p>
+          The filepath for which this request's libraries should be active
+          in completion suggestions. This object associates filesystem regions
+          to libraries and library directories of interest to the client.
+        </p>
+      </dd><dt class="field"><b>libraryPaths: List&lt;<a href="#type_FilePath">FilePath</a>&gt;</b></dt><dd>
+        
+        <p>
+          The paths of the libraries of interest to the client for completion suggestions.
+        </p>
       </dd></dl></dd><dt class="typeDefinition"><a name="type_LinkedEditGroup">LinkedEditGroup: object</a></dt><dd>
     <p>
       A collection of positions that should be linked (edited simultaneously)
@@ -5110,7 +5403,7 @@
   TODO: TBD
 </p>
 <h2 class="domain"><a name="index">Index</a></h2>
-<h3>Domains</h3><h4>server (<a href="#domain_server">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_server.getVersion">getVersion</a></li><li><a href="#request_server.shutdown">shutdown</a></li><li><a href="#request_server.setSubscriptions">setSubscriptions</a></li></ul><h5>Notifications</h5><div class="subindex"><ul><li><a href="#notification_server.connected">connected</a></li><li><a href="#notification_server.error">error</a></li><li><a href="#notification_server.status">status</a></li></ul></div></div><h4>analysis (<a href="#domain_analysis">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_analysis.getErrors">getErrors</a></li><li><a href="#request_analysis.getHover">getHover</a></li><li><a href="#request_analysis.getLibraryDependencies">getLibraryDependencies</a></li><li><a href="#request_analysis.getNavigation">getNavigation</a></li><li><a href="#request_analysis.getReachableSources">getReachableSources</a></li><li><a href="#request_analysis.reanalyze">reanalyze</a></li><li><a href="#request_analysis.setAnalysisRoots">setAnalysisRoots</a></li><li><a href="#request_analysis.setGeneralSubscriptions">setGeneralSubscriptions</a></li><li><a href="#request_analysis.setPriorityFiles">setPriorityFiles</a></li><li><a href="#request_analysis.setSubscriptions">setSubscriptions</a></li><li><a href="#request_analysis.updateContent">updateContent</a></li><li><a href="#request_analysis.updateOptions">updateOptions</a></li></ul><h5>Notifications</h5><div class="subindex"><ul><li><a href="#notification_analysis.analyzedFiles">analyzedFiles</a></li><li><a href="#notification_analysis.closingLabels">closingLabels</a></li><li><a href="#notification_analysis.errors">errors</a></li><li><a href="#notification_analysis.flushResults">flushResults</a></li><li><a href="#notification_analysis.folding">folding</a></li><li><a href="#notification_analysis.highlights">highlights</a></li><li><a href="#notification_analysis.implemented">implemented</a></li><li><a href="#notification_analysis.invalidate">invalidate</a></li><li><a href="#notification_analysis.navigation">navigation</a></li><li><a href="#notification_analysis.occurrences">occurrences</a></li><li><a href="#notification_analysis.outline">outline</a></li><li><a href="#notification_analysis.overrides">overrides</a></li></ul></div></div><h4>completion (<a href="#domain_completion">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_completion.getSuggestions">getSuggestions</a></li></ul><h5>Notifications</h5><div class="subindex"><ul><li><a href="#notification_completion.results">results</a></li><li><a href="#notification_completion.availableSuggestions">availableSuggestions</a></li></ul></div></div><h4>search (<a href="#domain_search">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_search.findElementReferences">findElementReferences</a></li><li><a href="#request_search.findMemberDeclarations">findMemberDeclarations</a></li><li><a href="#request_search.findMemberReferences">findMemberReferences</a></li><li><a href="#request_search.findTopLevelDeclarations">findTopLevelDeclarations</a></li><li><a href="#request_search.getTypeHierarchy">getTypeHierarchy</a></li></ul><h5>Notifications</h5><div class="subindex"><ul><li><a href="#notification_search.results">results</a></li></ul></div></div><h4>edit (<a href="#domain_edit">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_edit.format">format</a></li><li><a href="#request_edit.getAssists">getAssists</a></li><li><a href="#request_edit.getAvailableRefactorings">getAvailableRefactorings</a></li><li><a href="#request_edit.getFixes">getFixes</a></li><li><a href="#request_edit.getRefactoring">getRefactoring</a></li><li><a href="#request_edit.sortMembers">sortMembers</a></li><li><a href="#request_edit.organizeDirectives">organizeDirectives</a></li></ul></div><h4>execution (<a href="#domain_execution">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_execution.createContext">createContext</a></li><li><a href="#request_execution.deleteContext">deleteContext</a></li><li><a href="#request_execution.getSuggestions">getSuggestions</a></li><li><a href="#request_execution.mapUri">mapUri</a></li><li><a href="#request_execution.setSubscriptions">setSubscriptions</a></li></ul><h5>Notifications</h5><div class="subindex"><ul><li><a href="#notification_execution.launchData">launchData</a></li></ul></div></div><h4>diagnostic (<a href="#domain_diagnostic">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_diagnostic.getDiagnostics">getDiagnostics</a></li><li><a href="#request_diagnostic.getServerPort">getServerPort</a></li></ul></div><h3>Types (<a href="#types">↑</a>)</h3><div class="subindex"><ul><li><a href="#type_AddContentOverlay">AddContentOverlay</a></li><li><a href="#type_AnalysisError">AnalysisError</a></li><li><a href="#type_AnalysisErrorFixes">AnalysisErrorFixes</a></li><li><a href="#type_AnalysisErrorSeverity">AnalysisErrorSeverity</a></li><li><a href="#type_AnalysisErrorType">AnalysisErrorType</a></li><li><a href="#type_AnalysisOptions">AnalysisOptions</a></li><li><a href="#type_AnalysisService">AnalysisService</a></li><li><a href="#type_AnalysisStatus">AnalysisStatus</a></li><li><a href="#type_AvailableSuggestionRelevanceTag">AvailableSuggestionRelevanceTag</a></li><li><a href="#type_ChangeContentOverlay">ChangeContentOverlay</a></li><li><a href="#type_ClosingLabel">ClosingLabel</a></li><li><a href="#type_CompletionId">CompletionId</a></li><li><a href="#type_CompletionSuggestion">CompletionSuggestion</a></li><li><a href="#type_CompletionSuggestionKind">CompletionSuggestionKind</a></li><li><a href="#type_ContextData">ContextData</a></li><li><a href="#type_Element">Element</a></li><li><a href="#type_ElementDeclaration">ElementDeclaration</a></li><li><a href="#type_ElementKind">ElementKind</a></li><li><a href="#type_ExecutableFile">ExecutableFile</a></li><li><a href="#type_ExecutableKind">ExecutableKind</a></li><li><a href="#type_ExecutionContextId">ExecutionContextId</a></li><li><a href="#type_ExecutionService">ExecutionService</a></li><li><a href="#type_FileKind">FileKind</a></li><li><a href="#type_FilePath">FilePath</a></li><li><a href="#type_FoldingKind">FoldingKind</a></li><li><a href="#type_FoldingRegion">FoldingRegion</a></li><li><a href="#type_GeneralAnalysisService">GeneralAnalysisService</a></li><li><a href="#type_HighlightRegion">HighlightRegion</a></li><li><a href="#type_HighlightRegionType">HighlightRegionType</a></li><li><a href="#type_HoverInformation">HoverInformation</a></li><li><a href="#type_ImplementedClass">ImplementedClass</a></li><li><a href="#type_ImplementedMember">ImplementedMember</a></li><li><a href="#type_ImportedElements">ImportedElements</a></li><li><a href="#type_KytheEntry">KytheEntry</a></li><li><a href="#type_KytheVName">KytheVName</a></li><li><a href="#type_LinkedEditGroup">LinkedEditGroup</a></li><li><a href="#type_LinkedEditSuggestion">LinkedEditSuggestion</a></li><li><a href="#type_LinkedEditSuggestionKind">LinkedEditSuggestionKind</a></li><li><a href="#type_Location">Location</a></li><li><a href="#type_NavigationRegion">NavigationRegion</a></li><li><a href="#type_NavigationTarget">NavigationTarget</a></li><li><a href="#type_Occurrences">Occurrences</a></li><li><a href="#type_Outline">Outline</a></li><li><a href="#type_OverriddenMember">OverriddenMember</a></li><li><a href="#type_Override">Override</a></li><li><a href="#type_Position">Position</a></li><li><a href="#type_PostfixTemplateDescriptor">PostfixTemplateDescriptor</a></li><li><a href="#type_PubStatus">PubStatus</a></li><li><a href="#type_RefactoringFeedback">RefactoringFeedback</a></li><li><a href="#type_RefactoringKind">RefactoringKind</a></li><li><a href="#type_RefactoringMethodParameter">RefactoringMethodParameter</a></li><li><a href="#type_RefactoringMethodParameterKind">RefactoringMethodParameterKind</a></li><li><a href="#type_RefactoringOptions">RefactoringOptions</a></li><li><a href="#type_RefactoringProblem">RefactoringProblem</a></li><li><a href="#type_RefactoringProblemSeverity">RefactoringProblemSeverity</a></li><li><a href="#type_RemoveContentOverlay">RemoveContentOverlay</a></li><li><a href="#type_RequestError">RequestError</a></li><li><a href="#type_RequestErrorCode">RequestErrorCode</a></li><li><a href="#type_RuntimeCompletionExpression">RuntimeCompletionExpression</a></li><li><a href="#type_RuntimeCompletionExpressionType">RuntimeCompletionExpressionType</a></li><li><a href="#type_RuntimeCompletionExpressionTypeKind">RuntimeCompletionExpressionTypeKind</a></li><li><a href="#type_RuntimeCompletionVariable">RuntimeCompletionVariable</a></li><li><a href="#type_SearchId">SearchId</a></li><li><a href="#type_SearchResult">SearchResult</a></li><li><a href="#type_SearchResultKind">SearchResultKind</a></li><li><a href="#type_ServerService">ServerService</a></li><li><a href="#type_SourceChange">SourceChange</a></li><li><a href="#type_SourceEdit">SourceEdit</a></li><li><a href="#type_SourceFileEdit">SourceFileEdit</a></li><li><a href="#type_TypeHierarchyItem">TypeHierarchyItem</a></li></ul></div><h3>Refactorings (<a href="#refactorings">↑</a>)</h3><div class="subindex"><ul><li><a href="#refactoring_CONVERT_GETTER_TO_METHOD">CONVERT_GETTER_TO_METHOD</a></li><li><a href="#refactoring_CONVERT_METHOD_TO_GETTER">CONVERT_METHOD_TO_GETTER</a></li><li><a href="#refactoring_EXTRACT_LOCAL_VARIABLE">EXTRACT_LOCAL_VARIABLE</a></li><li><a href="#refactoring_EXTRACT_METHOD">EXTRACT_METHOD</a></li><li><a href="#refactoring_EXTRACT_WIDGET">EXTRACT_WIDGET</a></li><li><a href="#refactoring_INLINE_LOCAL_VARIABLE">INLINE_LOCAL_VARIABLE</a></li><li><a href="#refactoring_INLINE_METHOD">INLINE_METHOD</a></li><li><a href="#refactoring_MOVE_FILE">MOVE_FILE</a></li><li><a href="#refactoring_RENAME">RENAME</a></li></ul></div>
+<h3>Domains</h3><h4>server (<a href="#domain_server">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_server.getVersion">getVersion</a></li><li><a href="#request_server.shutdown">shutdown</a></li><li><a href="#request_server.setSubscriptions">setSubscriptions</a></li></ul><h5>Notifications</h5><div class="subindex"><ul><li><a href="#notification_server.connected">connected</a></li><li><a href="#notification_server.error">error</a></li><li><a href="#notification_server.status">status</a></li></ul></div></div><h4>analysis (<a href="#domain_analysis">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_analysis.getErrors">getErrors</a></li><li><a href="#request_analysis.getHover">getHover</a></li><li><a href="#request_analysis.getLibraryDependencies">getLibraryDependencies</a></li><li><a href="#request_analysis.getNavigation">getNavigation</a></li><li><a href="#request_analysis.getReachableSources">getReachableSources</a></li><li><a href="#request_analysis.reanalyze">reanalyze</a></li><li><a href="#request_analysis.setAnalysisRoots">setAnalysisRoots</a></li><li><a href="#request_analysis.setGeneralSubscriptions">setGeneralSubscriptions</a></li><li><a href="#request_analysis.setPriorityFiles">setPriorityFiles</a></li><li><a href="#request_analysis.setSubscriptions">setSubscriptions</a></li><li><a href="#request_analysis.updateContent">updateContent</a></li><li><a href="#request_analysis.updateOptions">updateOptions</a></li></ul><h5>Notifications</h5><div class="subindex"><ul><li><a href="#notification_analysis.analyzedFiles">analyzedFiles</a></li><li><a href="#notification_analysis.closingLabels">closingLabels</a></li><li><a href="#notification_analysis.errors">errors</a></li><li><a href="#notification_analysis.flushResults">flushResults</a></li><li><a href="#notification_analysis.folding">folding</a></li><li><a href="#notification_analysis.highlights">highlights</a></li><li><a href="#notification_analysis.implemented">implemented</a></li><li><a href="#notification_analysis.invalidate">invalidate</a></li><li><a href="#notification_analysis.navigation">navigation</a></li><li><a href="#notification_analysis.occurrences">occurrences</a></li><li><a href="#notification_analysis.outline">outline</a></li><li><a href="#notification_analysis.overrides">overrides</a></li></ul></div></div><h4>completion (<a href="#domain_completion">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_completion.getSuggestions">getSuggestions</a></li><li><a href="#request_completion.setSubscriptions">setSubscriptions</a></li><li><a href="#request_completion.registerLibraryPaths">registerLibraryPaths</a></li><li><a href="#request_completion.getSuggestionDetails">getSuggestionDetails</a></li></ul><h5>Notifications</h5><div class="subindex"><ul><li><a href="#notification_completion.results">results</a></li><li><a href="#notification_completion.availableSuggestions">availableSuggestions</a></li></ul></div></div><h4>search (<a href="#domain_search">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_search.findElementReferences">findElementReferences</a></li><li><a href="#request_search.findMemberDeclarations">findMemberDeclarations</a></li><li><a href="#request_search.findMemberReferences">findMemberReferences</a></li><li><a href="#request_search.findTopLevelDeclarations">findTopLevelDeclarations</a></li><li><a href="#request_search.getTypeHierarchy">getTypeHierarchy</a></li></ul><h5>Notifications</h5><div class="subindex"><ul><li><a href="#notification_search.results">results</a></li></ul></div></div><h4>edit (<a href="#domain_edit">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_edit.format">format</a></li><li><a href="#request_edit.getAssists">getAssists</a></li><li><a href="#request_edit.getAvailableRefactorings">getAvailableRefactorings</a></li><li><a href="#request_edit.getFixes">getFixes</a></li><li><a href="#request_edit.getRefactoring">getRefactoring</a></li><li><a href="#request_edit.sortMembers">sortMembers</a></li><li><a href="#request_edit.organizeDirectives">organizeDirectives</a></li></ul></div><h4>execution (<a href="#domain_execution">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_execution.createContext">createContext</a></li><li><a href="#request_execution.deleteContext">deleteContext</a></li><li><a href="#request_execution.getSuggestions">getSuggestions</a></li><li><a href="#request_execution.mapUri">mapUri</a></li><li><a href="#request_execution.setSubscriptions">setSubscriptions</a></li></ul><h5>Notifications</h5><div class="subindex"><ul><li><a href="#notification_execution.launchData">launchData</a></li></ul></div></div><h4>diagnostic (<a href="#domain_diagnostic">↑</a>)</h4><div class="subindex"><h5>Requests</h5><ul><li><a href="#request_diagnostic.getDiagnostics">getDiagnostics</a></li><li><a href="#request_diagnostic.getServerPort">getServerPort</a></li></ul></div><h3>Types (<a href="#types">↑</a>)</h3><div class="subindex"><ul><li><a href="#type_AddContentOverlay">AddContentOverlay</a></li><li><a href="#type_AnalysisError">AnalysisError</a></li><li><a href="#type_AnalysisErrorFixes">AnalysisErrorFixes</a></li><li><a href="#type_AnalysisErrorSeverity">AnalysisErrorSeverity</a></li><li><a href="#type_AnalysisErrorType">AnalysisErrorType</a></li><li><a href="#type_AnalysisOptions">AnalysisOptions</a></li><li><a href="#type_AnalysisService">AnalysisService</a></li><li><a href="#type_AnalysisStatus">AnalysisStatus</a></li><li><a href="#type_AvailableSuggestion">AvailableSuggestion</a></li><li><a href="#type_AvailableSuggestionRelevanceTag">AvailableSuggestionRelevanceTag</a></li><li><a href="#type_AvailableSuggestionSet">AvailableSuggestionSet</a></li><li><a href="#type_ChangeContentOverlay">ChangeContentOverlay</a></li><li><a href="#type_ClosingLabel">ClosingLabel</a></li><li><a href="#type_CompletionId">CompletionId</a></li><li><a href="#type_CompletionService">CompletionService</a></li><li><a href="#type_CompletionSuggestion">CompletionSuggestion</a></li><li><a href="#type_CompletionSuggestionKind">CompletionSuggestionKind</a></li><li><a href="#type_ContextData">ContextData</a></li><li><a href="#type_Element">Element</a></li><li><a href="#type_ElementDeclaration">ElementDeclaration</a></li><li><a href="#type_ElementKind">ElementKind</a></li><li><a href="#type_ExecutableFile">ExecutableFile</a></li><li><a href="#type_ExecutableKind">ExecutableKind</a></li><li><a href="#type_ExecutionContextId">ExecutionContextId</a></li><li><a href="#type_ExecutionService">ExecutionService</a></li><li><a href="#type_FileKind">FileKind</a></li><li><a href="#type_FilePath">FilePath</a></li><li><a href="#type_FoldingKind">FoldingKind</a></li><li><a href="#type_FoldingRegion">FoldingRegion</a></li><li><a href="#type_GeneralAnalysisService">GeneralAnalysisService</a></li><li><a href="#type_HighlightRegion">HighlightRegion</a></li><li><a href="#type_HighlightRegionType">HighlightRegionType</a></li><li><a href="#type_HoverInformation">HoverInformation</a></li><li><a href="#type_ImplementedClass">ImplementedClass</a></li><li><a href="#type_ImplementedMember">ImplementedMember</a></li><li><a href="#type_ImportedElements">ImportedElements</a></li><li><a href="#type_IncludedSuggestionRelevanceTag">IncludedSuggestionRelevanceTag</a></li><li><a href="#type_IncludedSuggestionSet">IncludedSuggestionSet</a></li><li><a href="#type_KytheEntry">KytheEntry</a></li><li><a href="#type_KytheVName">KytheVName</a></li><li><a href="#type_LibraryPathSet">LibraryPathSet</a></li><li><a href="#type_LinkedEditGroup">LinkedEditGroup</a></li><li><a href="#type_LinkedEditSuggestion">LinkedEditSuggestion</a></li><li><a href="#type_LinkedEditSuggestionKind">LinkedEditSuggestionKind</a></li><li><a href="#type_Location">Location</a></li><li><a href="#type_NavigationRegion">NavigationRegion</a></li><li><a href="#type_NavigationTarget">NavigationTarget</a></li><li><a href="#type_Occurrences">Occurrences</a></li><li><a href="#type_Outline">Outline</a></li><li><a href="#type_OverriddenMember">OverriddenMember</a></li><li><a href="#type_Override">Override</a></li><li><a href="#type_Position">Position</a></li><li><a href="#type_PostfixTemplateDescriptor">PostfixTemplateDescriptor</a></li><li><a href="#type_PubStatus">PubStatus</a></li><li><a href="#type_RefactoringFeedback">RefactoringFeedback</a></li><li><a href="#type_RefactoringKind">RefactoringKind</a></li><li><a href="#type_RefactoringMethodParameter">RefactoringMethodParameter</a></li><li><a href="#type_RefactoringMethodParameterKind">RefactoringMethodParameterKind</a></li><li><a href="#type_RefactoringOptions">RefactoringOptions</a></li><li><a href="#type_RefactoringProblem">RefactoringProblem</a></li><li><a href="#type_RefactoringProblemSeverity">RefactoringProblemSeverity</a></li><li><a href="#type_RemoveContentOverlay">RemoveContentOverlay</a></li><li><a href="#type_RequestError">RequestError</a></li><li><a href="#type_RequestErrorCode">RequestErrorCode</a></li><li><a href="#type_RuntimeCompletionExpression">RuntimeCompletionExpression</a></li><li><a href="#type_RuntimeCompletionExpressionType">RuntimeCompletionExpressionType</a></li><li><a href="#type_RuntimeCompletionExpressionTypeKind">RuntimeCompletionExpressionTypeKind</a></li><li><a href="#type_RuntimeCompletionVariable">RuntimeCompletionVariable</a></li><li><a href="#type_SearchId">SearchId</a></li><li><a href="#type_SearchResult">SearchResult</a></li><li><a href="#type_SearchResultKind">SearchResultKind</a></li><li><a href="#type_ServerService">ServerService</a></li><li><a href="#type_SourceChange">SourceChange</a></li><li><a href="#type_SourceEdit">SourceEdit</a></li><li><a href="#type_SourceFileEdit">SourceFileEdit</a></li><li><a href="#type_TypeHierarchyItem">TypeHierarchyItem</a></li></ul></div><h3>Refactorings (<a href="#refactorings">↑</a>)</h3><div class="subindex"><ul><li><a href="#refactoring_CONVERT_GETTER_TO_METHOD">CONVERT_GETTER_TO_METHOD</a></li><li><a href="#refactoring_CONVERT_METHOD_TO_GETTER">CONVERT_METHOD_TO_GETTER</a></li><li><a href="#refactoring_EXTRACT_LOCAL_VARIABLE">EXTRACT_LOCAL_VARIABLE</a></li><li><a href="#refactoring_EXTRACT_METHOD">EXTRACT_METHOD</a></li><li><a href="#refactoring_EXTRACT_WIDGET">EXTRACT_WIDGET</a></li><li><a href="#refactoring_INLINE_LOCAL_VARIABLE">INLINE_LOCAL_VARIABLE</a></li><li><a href="#refactoring_INLINE_METHOD">INLINE_METHOD</a></li><li><a href="#refactoring_MOVE_FILE">MOVE_FILE</a></li><li><a href="#refactoring_RENAME">RENAME</a></li></ul></div>
 
 
 </body></html>
\ No newline at end of file
diff --git a/pkg/analysis_server/lib/lsp_protocol/protocol_generated.dart b/pkg/analysis_server/lib/lsp_protocol/protocol_generated.dart
index e0484bf..116d1e3 100644
--- a/pkg/analysis_server/lib/lsp_protocol/protocol_generated.dart
+++ b/pkg/analysis_server/lib/lsp_protocol/protocol_generated.dart
@@ -22,6 +22,9 @@
 const jsonEncoder = const JsonEncoder.withIndent('    ');
 
 class ApplyWorkspaceEditParams implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      ApplyWorkspaceEditParams.canParse, ApplyWorkspaceEditParams.fromJson);
+
   ApplyWorkspaceEditParams(this.label, this.edit) {
     if (edit == null) {
       throw 'edit is required but was not provided';
@@ -52,6 +55,7 @@
 
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
+        (obj['label'] == null || obj['label'] is String) &&
         obj.containsKey('edit') &&
         WorkspaceEdit.canParse(obj['edit']);
   }
@@ -77,6 +81,9 @@
 }
 
 class ApplyWorkspaceEditResponse implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      ApplyWorkspaceEditResponse.canParse, ApplyWorkspaceEditResponse.fromJson);
+
   ApplyWorkspaceEditResponse(this.applied) {
     if (applied == null) {
       throw 'applied is required but was not provided';
@@ -123,6 +130,9 @@
 }
 
 class CancelParams implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(CancelParams.canParse, CancelParams.fromJson);
+
   CancelParams(this.id) {
     if (id == null) {
       throw 'id is required but was not provided';
@@ -172,6 +182,9 @@
 }
 
 class ClientCapabilities implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      ClientCapabilities.canParse, ClientCapabilities.fromJson);
+
   ClientCapabilities(this.workspace, this.textDocument, this.experimental);
   static ClientCapabilities fromJson(Map<String, dynamic> json) {
     final workspace = json['workspace'] != null
@@ -208,7 +221,12 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['workspace'] == null ||
+            WorkspaceClientCapabilities.canParse(obj['workspace'])) &&
+        (obj['textDocument'] == null ||
+            TextDocumentClientCapabilities.canParse(obj['textDocument'])) &&
+        (obj['experimental'] == null || true);
   }
 
   @override
@@ -241,6 +259,9 @@
 /// A CodeAction must set either `edit` and/or a `command`. If both are
 /// supplied, the `edit` is applied first, then the `command` is executed.
 class CodeAction implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(CodeAction.canParse, CodeAction.fromJson);
+
   CodeAction(this.title, this.kind, this.diagnostics, this.edit, this.command) {
     if (title == null) {
       throw 'title is required but was not provided';
@@ -300,7 +321,14 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
         obj.containsKey('title') &&
-        obj['title'] is String;
+        obj['title'] is String &&
+        (obj['kind'] == null || CodeActionKind.canParse(obj['kind'])) &&
+        (obj['diagnostics'] == null ||
+            (obj['diagnostics'] is List &&
+                (obj['diagnostics']
+                    .every((item) => Diagnostic.canParse(item))))) &&
+        (obj['edit'] == null || WorkspaceEdit.canParse(obj['edit'])) &&
+        (obj['command'] == null || Command.canParse(obj['command']));
   }
 
   @override
@@ -335,6 +363,9 @@
 /// Contains additional diagnostic information about the context in which a code
 /// action is run.
 class CodeActionContext implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      CodeActionContext.canParse, CodeActionContext.fromJson);
+
   CodeActionContext(this.diagnostics, this.only) {
     if (diagnostics == null) {
       throw 'diagnostics is required but was not provided';
@@ -375,7 +406,10 @@
     return obj is Map<String, dynamic> &&
         obj.containsKey('diagnostics') &&
         (obj['diagnostics'] is List &&
-            (obj['diagnostics'].every((item) => Diagnostic.canParse(item))));
+            (obj['diagnostics'].every((item) => Diagnostic.canParse(item)))) &&
+        (obj['only'] == null ||
+            (obj['only'] is List &&
+                (obj['only'].every((item) => CodeActionKind.canParse(item)))));
   }
 
   @override
@@ -474,6 +508,9 @@
 
 /// Code Action options.
 class CodeActionOptions implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      CodeActionOptions.canParse, CodeActionOptions.fromJson);
+
   CodeActionOptions(this.codeActionKinds);
   static CodeActionOptions fromJson(Map<String, dynamic> json) {
     if (CodeActionRegistrationOptions.canParse(json)) {
@@ -501,7 +538,11 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['codeActionKinds'] == null ||
+            (obj['codeActionKinds'] is List &&
+                (obj['codeActionKinds']
+                    .every((item) => CodeActionKind.canParse(item)))));
   }
 
   @override
@@ -527,6 +568,9 @@
 
 /// Params for the CodeActionRequest
 class CodeActionParams implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      CodeActionParams.canParse, CodeActionParams.fromJson);
+
   CodeActionParams(this.textDocument, this.range, this.context) {
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
@@ -604,6 +648,10 @@
 
 class CodeActionRegistrationOptions
     implements TextDocumentRegistrationOptions, CodeActionOptions, ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      CodeActionRegistrationOptions.canParse,
+      CodeActionRegistrationOptions.fromJson);
+
   CodeActionRegistrationOptions(this.documentSelector, this.codeActionKinds);
   static CodeActionRegistrationOptions fromJson(Map<String, dynamic> json) {
     final documentSelector = json['documentSelector']
@@ -639,9 +687,14 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
         obj.containsKey('documentSelector') &&
-        (obj['documentSelector'] is List &&
-            (obj['documentSelector']
-                .every((item) => DocumentFilter.canParse(item))));
+        (obj['documentSelector'] == null ||
+            (obj['documentSelector'] is List &&
+                (obj['documentSelector']
+                    .every((item) => DocumentFilter.canParse(item))))) &&
+        (obj['codeActionKinds'] == null ||
+            (obj['codeActionKinds'] is List &&
+                (obj['codeActionKinds']
+                    .every((item) => CodeActionKind.canParse(item)))));
   }
 
   @override
@@ -674,6 +727,9 @@
 /// performance reasons the creation of a code lens and resolving should be done
 /// in two stages.
 class CodeLens implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(CodeLens.canParse, CodeLens.fromJson);
+
   CodeLens(this.range, this.command, this.data) {
     if (range == null) {
       throw 'range is required but was not provided';
@@ -713,7 +769,9 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
         obj.containsKey('range') &&
-        Range.canParse(obj['range']);
+        Range.canParse(obj['range']) &&
+        (obj['command'] == null || Command.canParse(obj['command'])) &&
+        (obj['data'] == null || true);
   }
 
   @override
@@ -742,6 +800,9 @@
 
 /// Code Lens options.
 class CodeLensOptions implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(CodeLensOptions.canParse, CodeLensOptions.fromJson);
+
   CodeLensOptions(this.resolveProvider);
   static CodeLensOptions fromJson(Map<String, dynamic> json) {
     final resolveProvider = json['resolveProvider'];
@@ -760,7 +821,8 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['resolveProvider'] == null || obj['resolveProvider'] is bool);
   }
 
   @override
@@ -783,6 +845,9 @@
 }
 
 class CodeLensParams implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(CodeLensParams.canParse, CodeLensParams.fromJson);
+
   CodeLensParams(this.textDocument) {
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
@@ -832,6 +897,10 @@
 
 class CodeLensRegistrationOptions
     implements TextDocumentRegistrationOptions, ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      CodeLensRegistrationOptions.canParse,
+      CodeLensRegistrationOptions.fromJson);
+
   CodeLensRegistrationOptions(this.resolveProvider, this.documentSelector);
   static CodeLensRegistrationOptions fromJson(Map<String, dynamic> json) {
     final resolveProvider = json['resolveProvider'];
@@ -860,10 +929,12 @@
 
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
+        (obj['resolveProvider'] == null || obj['resolveProvider'] is bool) &&
         obj.containsKey('documentSelector') &&
-        (obj['documentSelector'] is List &&
-            (obj['documentSelector']
-                .every((item) => DocumentFilter.canParse(item))));
+        (obj['documentSelector'] == null ||
+            (obj['documentSelector'] is List &&
+                (obj['documentSelector']
+                    .every((item) => DocumentFilter.canParse(item)))));
   }
 
   @override
@@ -890,6 +961,9 @@
 
 /// Represents a color in RGBA space.
 class Color implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(Color.canParse, Color.fromJson);
+
   Color(this.red, this.green, this.blue, this.alpha) {
     if (red == null) {
       throw 'red is required but was not provided';
@@ -972,6 +1046,9 @@
 }
 
 class ColorInformation implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      ColorInformation.canParse, ColorInformation.fromJson);
+
   ColorInformation(this.range, this.color) {
     if (range == null) {
       throw 'range is required but was not provided';
@@ -1028,6 +1105,9 @@
 }
 
 class ColorPresentation implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      ColorPresentation.canParse, ColorPresentation.fromJson);
+
   ColorPresentation(this.label, this.textEdit, this.additionalTextEdits) {
     if (label == null) {
       throw 'label is required but was not provided';
@@ -1074,7 +1154,12 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
         obj.containsKey('label') &&
-        obj['label'] is String;
+        obj['label'] is String &&
+        (obj['textEdit'] == null || TextEdit.canParse(obj['textEdit'])) &&
+        (obj['additionalTextEdits'] == null ||
+            (obj['additionalTextEdits'] is List &&
+                (obj['additionalTextEdits']
+                    .every((item) => TextEdit.canParse(item)))));
   }
 
   @override
@@ -1103,6 +1188,9 @@
 }
 
 class ColorPresentationParams implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      ColorPresentationParams.canParse, ColorPresentationParams.fromJson);
+
   ColorPresentationParams(this.textDocument, this.color, this.range) {
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
@@ -1177,6 +1265,9 @@
 
 /// Color provider options.
 class ColorProviderOptions implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      ColorProviderOptions.canParse, ColorProviderOptions.fromJson);
+
   static ColorProviderOptions fromJson(Map<String, dynamic> json) {
     return new ColorProviderOptions();
   }
@@ -1209,6 +1300,9 @@
 }
 
 class Command implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(Command.canParse, Command.fromJson);
+
   Command(this.title, this.command, this.arguments) {
     if (title == null) {
       throw 'title is required but was not provided';
@@ -1250,7 +1344,10 @@
         obj.containsKey('title') &&
         obj['title'] is String &&
         obj.containsKey('command') &&
-        obj['command'] is String;
+        obj['command'] is String &&
+        (obj['arguments'] == null ||
+            (obj['arguments'] is List &&
+                (obj['arguments'].every((item) => true))));
   }
 
   @override
@@ -1281,6 +1378,9 @@
 /// Contains additional information about the context in which a completion
 /// request is triggered.
 class CompletionContext implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      CompletionContext.canParse, CompletionContext.fromJson);
+
   CompletionContext(this.triggerKind, this.triggerCharacter) {
     if (triggerKind == null) {
       throw 'triggerKind is required but was not provided';
@@ -1314,7 +1414,8 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
         obj.containsKey('triggerKind') &&
-        obj['triggerKind'] is num;
+        CompletionTriggerKind.canParse(obj['triggerKind']) &&
+        (obj['triggerCharacter'] == null || obj['triggerCharacter'] is String);
   }
 
   @override
@@ -1340,6 +1441,9 @@
 }
 
 class CompletionItem implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(CompletionItem.canParse, CompletionItem.fromJson);
+
   CompletionItem(
       this.label,
       this.kind,
@@ -1544,7 +1648,29 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
         obj.containsKey('label') &&
-        obj['label'] is String;
+        obj['label'] is String &&
+        (obj['kind'] == null || CompletionItemKind.canParse(obj['kind'])) &&
+        (obj['detail'] == null || obj['detail'] is String) &&
+        (obj['documentation'] == null ||
+            (obj['documentation'] is String ||
+                MarkupContent.canParse(obj['documentation']))) &&
+        (obj['deprecated'] == null || obj['deprecated'] is bool) &&
+        (obj['preselect'] == null || obj['preselect'] is bool) &&
+        (obj['sortText'] == null || obj['sortText'] is String) &&
+        (obj['filterText'] == null || obj['filterText'] is String) &&
+        (obj['insertText'] == null || obj['insertText'] is String) &&
+        (obj['insertTextFormat'] == null ||
+            InsertTextFormat.canParse(obj['insertTextFormat'])) &&
+        (obj['textEdit'] == null || TextEdit.canParse(obj['textEdit'])) &&
+        (obj['additionalTextEdits'] == null ||
+            (obj['additionalTextEdits'] is List &&
+                (obj['additionalTextEdits']
+                    .every((item) => TextEdit.canParse(item))))) &&
+        (obj['commitCharacters'] == null ||
+            (obj['commitCharacters'] is List &&
+                (obj['commitCharacters'].every((item) => item is String)))) &&
+        (obj['command'] == null || Command.canParse(obj['command'])) &&
+        (obj['data'] == null || true);
   }
 
   @override
@@ -1599,68 +1725,40 @@
 
 /// The kind of a completion entry.
 class CompletionItemKind {
-  const CompletionItemKind._(this._value);
+  const CompletionItemKind(this._value);
   const CompletionItemKind.fromJson(this._value);
 
   final num _value;
 
   static bool canParse(Object obj) {
-    switch (obj) {
-      case 1:
-      case 2:
-      case 3:
-      case 4:
-      case 5:
-      case 6:
-      case 7:
-      case 8:
-      case 9:
-      case 10:
-      case 11:
-      case 12:
-      case 13:
-      case 14:
-      case 15:
-      case 16:
-      case 17:
-      case 18:
-      case 19:
-      case 20:
-      case 21:
-      case 22:
-      case 23:
-      case 24:
-      case 25:
-        return true;
-    }
-    return false;
+    return obj is num;
   }
 
-  static const Text = const CompletionItemKind._(1);
-  static const Method = const CompletionItemKind._(2);
-  static const Function = const CompletionItemKind._(3);
-  static const Constructor = const CompletionItemKind._(4);
-  static const Field = const CompletionItemKind._(5);
-  static const Variable = const CompletionItemKind._(6);
-  static const Class = const CompletionItemKind._(7);
-  static const Interface = const CompletionItemKind._(8);
-  static const Module = const CompletionItemKind._(9);
-  static const Property = const CompletionItemKind._(10);
-  static const Unit = const CompletionItemKind._(11);
-  static const Value = const CompletionItemKind._(12);
-  static const Enum = const CompletionItemKind._(13);
-  static const Keyword = const CompletionItemKind._(14);
-  static const Snippet = const CompletionItemKind._(15);
-  static const Color = const CompletionItemKind._(16);
-  static const File = const CompletionItemKind._(17);
-  static const Reference = const CompletionItemKind._(18);
-  static const Folder = const CompletionItemKind._(19);
-  static const EnumMember = const CompletionItemKind._(20);
-  static const Constant = const CompletionItemKind._(21);
-  static const Struct = const CompletionItemKind._(22);
-  static const Event = const CompletionItemKind._(23);
-  static const Operator = const CompletionItemKind._(24);
-  static const TypeParameter = const CompletionItemKind._(25);
+  static const Text = const CompletionItemKind(1);
+  static const Method = const CompletionItemKind(2);
+  static const Function = const CompletionItemKind(3);
+  static const Constructor = const CompletionItemKind(4);
+  static const Field = const CompletionItemKind(5);
+  static const Variable = const CompletionItemKind(6);
+  static const Class = const CompletionItemKind(7);
+  static const Interface = const CompletionItemKind(8);
+  static const Module = const CompletionItemKind(9);
+  static const Property = const CompletionItemKind(10);
+  static const Unit = const CompletionItemKind(11);
+  static const Value = const CompletionItemKind(12);
+  static const Enum = const CompletionItemKind(13);
+  static const Keyword = const CompletionItemKind(14);
+  static const Snippet = const CompletionItemKind(15);
+  static const Color = const CompletionItemKind(16);
+  static const File = const CompletionItemKind(17);
+  static const Reference = const CompletionItemKind(18);
+  static const Folder = const CompletionItemKind(19);
+  static const EnumMember = const CompletionItemKind(20);
+  static const Constant = const CompletionItemKind(21);
+  static const Struct = const CompletionItemKind(22);
+  static const Event = const CompletionItemKind(23);
+  static const Operator = const CompletionItemKind(24);
+  static const TypeParameter = const CompletionItemKind(25);
 
   Object toJson() => _value;
 
@@ -1676,6 +1774,9 @@
 /// Represents a collection of completion items ([CompletionItem]) to be
 /// presented in the editor.
 class CompletionList implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(CompletionList.canParse, CompletionList.fromJson);
+
   CompletionList(this.isIncomplete, this.items) {
     if (isIncomplete == null) {
       throw 'isIncomplete is required but was not provided';
@@ -1742,6 +1843,9 @@
 
 /// Completion options.
 class CompletionOptions implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      CompletionOptions.canParse, CompletionOptions.fromJson);
+
   CompletionOptions(this.resolveProvider, this.triggerCharacters);
   static CompletionOptions fromJson(Map<String, dynamic> json) {
     final resolveProvider = json['resolveProvider'];
@@ -1771,7 +1875,11 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['resolveProvider'] == null || obj['resolveProvider'] is bool) &&
+        (obj['triggerCharacters'] == null ||
+            (obj['triggerCharacters'] is List &&
+                (obj['triggerCharacters'].every((item) => item is String))));
   }
 
   @override
@@ -1798,6 +1906,9 @@
 }
 
 class CompletionParams implements TextDocumentPositionParams, ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      CompletionParams.canParse, CompletionParams.fromJson);
+
   CompletionParams(this.context, this.textDocument, this.position) {
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
@@ -1843,6 +1954,8 @@
 
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
+        (obj['context'] == null ||
+            CompletionContext.canParse(obj['context'])) &&
         obj.containsKey('textDocument') &&
         TextDocumentIdentifier.canParse(obj['textDocument']) &&
         obj.containsKey('position') &&
@@ -1875,6 +1988,10 @@
 
 class CompletionRegistrationOptions
     implements TextDocumentRegistrationOptions, ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      CompletionRegistrationOptions.canParse,
+      CompletionRegistrationOptions.fromJson);
+
   CompletionRegistrationOptions(
       this.triggerCharacters, this.resolveProvider, this.documentSelector);
   static CompletionRegistrationOptions fromJson(Map<String, dynamic> json) {
@@ -1925,10 +2042,15 @@
 
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
+        (obj['triggerCharacters'] == null ||
+            (obj['triggerCharacters'] is List &&
+                (obj['triggerCharacters'].every((item) => item is String)))) &&
+        (obj['resolveProvider'] == null || obj['resolveProvider'] is bool) &&
         obj.containsKey('documentSelector') &&
-        (obj['documentSelector'] is List &&
-            (obj['documentSelector']
-                .every((item) => DocumentFilter.canParse(item))));
+        (obj['documentSelector'] == null ||
+            (obj['documentSelector'] is List &&
+                (obj['documentSelector']
+                    .every((item) => DocumentFilter.canParse(item)))));
   }
 
   @override
@@ -1997,6 +2119,9 @@
 }
 
 class ConfigurationItem implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      ConfigurationItem.canParse, ConfigurationItem.fromJson);
+
   ConfigurationItem(this.scopeUri, this.section);
   static ConfigurationItem fromJson(Map<String, dynamic> json) {
     final scopeUri = json['scopeUri'];
@@ -2022,7 +2147,9 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['scopeUri'] == null || obj['scopeUri'] is String) &&
+        (obj['section'] == null || obj['section'] is String);
   }
 
   @override
@@ -2046,6 +2173,9 @@
 }
 
 class ConfigurationParams implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      ConfigurationParams.canParse, ConfigurationParams.fromJson);
+
   ConfigurationParams(this.items) {
     if (items == null) {
       throw 'items is required but was not provided';
@@ -2097,6 +2227,9 @@
 
 /// Create file operation
 class CreateFile implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(CreateFile.canParse, CreateFile.fromJson);
+
   CreateFile(this.kind, this.uri, this.options) {
     if (kind == null) {
       throw 'kind is required but was not provided';
@@ -2138,7 +2271,8 @@
         obj.containsKey('kind') &&
         obj['kind'] is String &&
         obj.containsKey('uri') &&
-        obj['uri'] is String;
+        obj['uri'] is String &&
+        (obj['options'] == null || CreateFileOptions.canParse(obj['options']));
   }
 
   @override
@@ -2167,6 +2301,9 @@
 
 /// Options to create a file.
 class CreateFileOptions implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      CreateFileOptions.canParse, CreateFileOptions.fromJson);
+
   CreateFileOptions(this.overwrite, this.ignoreIfExists);
   static CreateFileOptions fromJson(Map<String, dynamic> json) {
     final overwrite = json['overwrite'];
@@ -2192,7 +2329,9 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['overwrite'] == null || obj['overwrite'] is bool) &&
+        (obj['ignoreIfExists'] == null || obj['ignoreIfExists'] is bool);
   }
 
   @override
@@ -2219,6 +2358,9 @@
 
 /// Delete file operation
 class DeleteFile implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(DeleteFile.canParse, DeleteFile.fromJson);
+
   DeleteFile(this.kind, this.uri, this.options) {
     if (kind == null) {
       throw 'kind is required but was not provided';
@@ -2260,7 +2402,8 @@
         obj.containsKey('kind') &&
         obj['kind'] is String &&
         obj.containsKey('uri') &&
-        obj['uri'] is String;
+        obj['uri'] is String &&
+        (obj['options'] == null || DeleteFileOptions.canParse(obj['options']));
   }
 
   @override
@@ -2289,6 +2432,9 @@
 
 /// Delete file options
 class DeleteFileOptions implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      DeleteFileOptions.canParse, DeleteFileOptions.fromJson);
+
   DeleteFileOptions(this.recursive, this.ignoreIfNotExists);
   static DeleteFileOptions fromJson(Map<String, dynamic> json) {
     final recursive = json['recursive'];
@@ -2314,7 +2460,9 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['recursive'] == null || obj['recursive'] is bool) &&
+        (obj['ignoreIfNotExists'] == null || obj['ignoreIfNotExists'] is bool);
   }
 
   @override
@@ -2340,6 +2488,9 @@
 }
 
 class Diagnostic implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(Diagnostic.canParse, Diagnostic.fromJson);
+
   Diagnostic(this.range, this.severity, this.code, this.source, this.message,
       this.relatedInformation) {
     if (range == null) {
@@ -2411,8 +2562,16 @@
     return obj is Map<String, dynamic> &&
         obj.containsKey('range') &&
         Range.canParse(obj['range']) &&
+        (obj['severity'] == null ||
+            DiagnosticSeverity.canParse(obj['severity'])) &&
+        (obj['code'] == null || obj['code'] is String) &&
+        (obj['source'] == null || obj['source'] is String) &&
         obj.containsKey('message') &&
-        obj['message'] is String;
+        obj['message'] is String &&
+        (obj['relatedInformation'] == null ||
+            (obj['relatedInformation'] is List &&
+                (obj['relatedInformation'].every(
+                    (item) => DiagnosticRelatedInformation.canParse(item)))));
   }
 
   @override
@@ -2454,6 +2613,10 @@
 /// should be used to point to code locations that cause or related to a
 /// diagnostics, e.g when duplicating a symbol in a scope.
 class DiagnosticRelatedInformation implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      DiagnosticRelatedInformation.canParse,
+      DiagnosticRelatedInformation.fromJson);
+
   DiagnosticRelatedInformation(this.location, this.message) {
     if (location == null) {
       throw 'location is required but was not provided';
@@ -2513,33 +2676,26 @@
 }
 
 class DiagnosticSeverity {
-  const DiagnosticSeverity._(this._value);
+  const DiagnosticSeverity(this._value);
   const DiagnosticSeverity.fromJson(this._value);
 
   final num _value;
 
   static bool canParse(Object obj) {
-    switch (obj) {
-      case 1:
-      case 2:
-      case 3:
-      case 4:
-        return true;
-    }
-    return false;
+    return obj is num;
   }
 
   /// Reports an error.
-  static const Error = const DiagnosticSeverity._(1);
+  static const Error = const DiagnosticSeverity(1);
 
   /// Reports a warning.
-  static const Warning = const DiagnosticSeverity._(2);
+  static const Warning = const DiagnosticSeverity(2);
 
   /// Reports an information.
-  static const Information = const DiagnosticSeverity._(3);
+  static const Information = const DiagnosticSeverity(3);
 
   /// Reports a hint.
-  static const Hint = const DiagnosticSeverity._(4);
+  static const Hint = const DiagnosticSeverity(4);
 
   Object toJson() => _value;
 
@@ -2553,6 +2709,10 @@
 }
 
 class DidChangeConfigurationParams implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      DidChangeConfigurationParams.canParse,
+      DidChangeConfigurationParams.fromJson);
+
   DidChangeConfigurationParams(this.settings);
   static DidChangeConfigurationParams fromJson(Map<String, dynamic> json) {
     final settings = json['settings'];
@@ -2569,7 +2729,9 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic> && obj.containsKey('settings') && true;
+    return obj is Map<String, dynamic> &&
+        obj.containsKey('settings') &&
+        (obj['settings'] == null || true);
   }
 
   @override
@@ -2592,6 +2754,10 @@
 }
 
 class DidChangeTextDocumentParams implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      DidChangeTextDocumentParams.canParse,
+      DidChangeTextDocumentParams.fromJson);
+
   DidChangeTextDocumentParams(this.textDocument, this.contentChanges) {
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
@@ -2668,6 +2834,10 @@
 }
 
 class DidChangeWatchedFilesParams implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      DidChangeWatchedFilesParams.canParse,
+      DidChangeWatchedFilesParams.fromJson);
+
   DidChangeWatchedFilesParams(this.changes) {
     if (changes == null) {
       throw 'changes is required but was not provided';
@@ -2722,6 +2892,10 @@
 /// Describe options to be used when registering for text document change
 /// events.
 class DidChangeWatchedFilesRegistrationOptions implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      DidChangeWatchedFilesRegistrationOptions.canParse,
+      DidChangeWatchedFilesRegistrationOptions.fromJson);
+
   DidChangeWatchedFilesRegistrationOptions(this.watchers) {
     if (watchers == null) {
       throw 'watchers is required but was not provided';
@@ -2776,6 +2950,10 @@
 }
 
 class DidChangeWorkspaceFoldersParams implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      DidChangeWorkspaceFoldersParams.canParse,
+      DidChangeWorkspaceFoldersParams.fromJson);
+
   DidChangeWorkspaceFoldersParams(this.event) {
     if (event == null) {
       throw 'event is required but was not provided';
@@ -2823,6 +3001,9 @@
 }
 
 class DidCloseTextDocumentParams implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      DidCloseTextDocumentParams.canParse, DidCloseTextDocumentParams.fromJson);
+
   DidCloseTextDocumentParams(this.textDocument) {
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
@@ -2871,6 +3052,9 @@
 }
 
 class DidOpenTextDocumentParams implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      DidOpenTextDocumentParams.canParse, DidOpenTextDocumentParams.fromJson);
+
   DidOpenTextDocumentParams(this.textDocument) {
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
@@ -2919,6 +3103,9 @@
 }
 
 class DidSaveTextDocumentParams implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      DidSaveTextDocumentParams.canParse, DidSaveTextDocumentParams.fromJson);
+
   DidSaveTextDocumentParams(this.textDocument, this.text) {
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
@@ -2952,7 +3139,8 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
         obj.containsKey('textDocument') &&
-        TextDocumentIdentifier.canParse(obj['textDocument']);
+        TextDocumentIdentifier.canParse(obj['textDocument']) &&
+        (obj['text'] == null || obj['text'] is String);
   }
 
   @override
@@ -2976,6 +3164,9 @@
 }
 
 class DocumentFilter implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(DocumentFilter.canParse, DocumentFilter.fromJson);
+
   DocumentFilter(this.language, this.scheme, this.pattern);
   static DocumentFilter fromJson(Map<String, dynamic> json) {
     final language = json['language'];
@@ -3020,7 +3211,10 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['language'] == null || obj['language'] is String) &&
+        (obj['scheme'] == null || obj['scheme'] is String) &&
+        (obj['pattern'] == null || obj['pattern'] is String);
   }
 
   @override
@@ -3048,6 +3242,9 @@
 }
 
 class DocumentFormattingParams implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      DocumentFormattingParams.canParse, DocumentFormattingParams.fromJson);
+
   DocumentFormattingParams(this.textDocument, this.options) {
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
@@ -3115,6 +3312,9 @@
 /// special attention. Usually a document highlight is visualized by changing
 /// the background color of its range.
 class DocumentHighlight implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      DocumentHighlight.canParse, DocumentHighlight.fromJson);
+
   DocumentHighlight(this.range, this.kind) {
     if (range == null) {
       throw 'range is required but was not provided';
@@ -3146,7 +3346,8 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
         obj.containsKey('range') &&
-        Range.canParse(obj['range']);
+        Range.canParse(obj['range']) &&
+        (obj['kind'] == null || DocumentHighlightKind.canParse(obj['kind']));
   }
 
   @override
@@ -3171,29 +3372,23 @@
 
 /// A document highlight kind.
 class DocumentHighlightKind {
-  const DocumentHighlightKind._(this._value);
+  const DocumentHighlightKind(this._value);
   const DocumentHighlightKind.fromJson(this._value);
 
   final num _value;
 
   static bool canParse(Object obj) {
-    switch (obj) {
-      case 1:
-      case 2:
-      case 3:
-        return true;
-    }
-    return false;
+    return obj is num;
   }
 
   /// A textual occurrence.
-  static const Text = const DocumentHighlightKind._(1);
+  static const Text = const DocumentHighlightKind(1);
 
   /// Read-access of a symbol, like reading a variable.
-  static const Read = const DocumentHighlightKind._(2);
+  static const Read = const DocumentHighlightKind(2);
 
   /// Write-access of a symbol, like writing to a variable.
-  static const Write = const DocumentHighlightKind._(3);
+  static const Write = const DocumentHighlightKind(3);
 
   Object toJson() => _value;
 
@@ -3209,6 +3404,9 @@
 /// A document link is a range in a text document that links to an internal or
 /// external resource, like another text document or a web site.
 class DocumentLink implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(DocumentLink.canParse, DocumentLink.fromJson);
+
   DocumentLink(this.range, this.target, this.data) {
     if (range == null) {
       throw 'range is required but was not provided';
@@ -3246,7 +3444,9 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
         obj.containsKey('range') &&
-        Range.canParse(obj['range']);
+        Range.canParse(obj['range']) &&
+        (obj['target'] == null || obj['target'] is String) &&
+        (obj['data'] == null || true);
   }
 
   @override
@@ -3275,6 +3475,9 @@
 
 /// Document link options.
 class DocumentLinkOptions implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      DocumentLinkOptions.canParse, DocumentLinkOptions.fromJson);
+
   DocumentLinkOptions(this.resolveProvider);
   static DocumentLinkOptions fromJson(Map<String, dynamic> json) {
     final resolveProvider = json['resolveProvider'];
@@ -3293,7 +3496,8 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['resolveProvider'] == null || obj['resolveProvider'] is bool);
   }
 
   @override
@@ -3316,6 +3520,9 @@
 }
 
 class DocumentLinkParams implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      DocumentLinkParams.canParse, DocumentLinkParams.fromJson);
+
   DocumentLinkParams(this.textDocument) {
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
@@ -3365,6 +3572,10 @@
 
 class DocumentLinkRegistrationOptions
     implements TextDocumentRegistrationOptions, ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      DocumentLinkRegistrationOptions.canParse,
+      DocumentLinkRegistrationOptions.fromJson);
+
   DocumentLinkRegistrationOptions(this.resolveProvider, this.documentSelector);
   static DocumentLinkRegistrationOptions fromJson(Map<String, dynamic> json) {
     final resolveProvider = json['resolveProvider'];
@@ -3394,10 +3605,12 @@
 
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
+        (obj['resolveProvider'] == null || obj['resolveProvider'] is bool) &&
         obj.containsKey('documentSelector') &&
-        (obj['documentSelector'] is List &&
-            (obj['documentSelector']
-                .every((item) => DocumentFilter.canParse(item))));
+        (obj['documentSelector'] == null ||
+            (obj['documentSelector'] is List &&
+                (obj['documentSelector']
+                    .every((item) => DocumentFilter.canParse(item)))));
   }
 
   @override
@@ -3424,6 +3637,10 @@
 
 /// Format document on type options.
 class DocumentOnTypeFormattingOptions implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      DocumentOnTypeFormattingOptions.canParse,
+      DocumentOnTypeFormattingOptions.fromJson);
+
   DocumentOnTypeFormattingOptions(
       this.firstTriggerCharacter, this.moreTriggerCharacter) {
     if (firstTriggerCharacter == null) {
@@ -3459,7 +3676,10 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
         obj.containsKey('firstTriggerCharacter') &&
-        obj['firstTriggerCharacter'] is String;
+        obj['firstTriggerCharacter'] is String &&
+        (obj['moreTriggerCharacter'] == null ||
+            (obj['moreTriggerCharacter'] is List &&
+                (obj['moreTriggerCharacter'].every((item) => item is String))));
   }
 
   @override
@@ -3486,6 +3706,10 @@
 }
 
 class DocumentOnTypeFormattingParams implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      DocumentOnTypeFormattingParams.canParse,
+      DocumentOnTypeFormattingParams.fromJson);
+
   DocumentOnTypeFormattingParams(
       this.textDocument, this.position, this.ch, this.options) {
     if (textDocument == null) {
@@ -3579,6 +3803,10 @@
 
 class DocumentOnTypeFormattingRegistrationOptions
     implements TextDocumentRegistrationOptions, ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      DocumentOnTypeFormattingRegistrationOptions.canParse,
+      DocumentOnTypeFormattingRegistrationOptions.fromJson);
+
   DocumentOnTypeFormattingRegistrationOptions(this.firstTriggerCharacter,
       this.moreTriggerCharacter, this.documentSelector) {
     if (firstTriggerCharacter == null) {
@@ -3625,10 +3853,15 @@
     return obj is Map<String, dynamic> &&
         obj.containsKey('firstTriggerCharacter') &&
         obj['firstTriggerCharacter'] is String &&
+        (obj['moreTriggerCharacter'] == null ||
+            (obj['moreTriggerCharacter'] is List &&
+                (obj['moreTriggerCharacter']
+                    .every((item) => item is String)))) &&
         obj.containsKey('documentSelector') &&
-        (obj['documentSelector'] is List &&
-            (obj['documentSelector']
-                .every((item) => DocumentFilter.canParse(item))));
+        (obj['documentSelector'] == null ||
+            (obj['documentSelector'] is List &&
+                (obj['documentSelector']
+                    .every((item) => DocumentFilter.canParse(item)))));
   }
 
   @override
@@ -3657,6 +3890,10 @@
 }
 
 class DocumentRangeFormattingParams implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      DocumentRangeFormattingParams.canParse,
+      DocumentRangeFormattingParams.fromJson);
+
   DocumentRangeFormattingParams(this.textDocument, this.range, this.options) {
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
@@ -3737,6 +3974,9 @@
 /// have two ranges: one that encloses its definition and one that points to its
 /// most interesting range, e.g. the range of an identifier.
 class DocumentSymbol implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(DocumentSymbol.canParse, DocumentSymbol.fromJson);
+
   DocumentSymbol(this.name, this.detail, this.kind, this.deprecated, this.range,
       this.selectionRange, this.children) {
     if (name == null) {
@@ -3820,12 +4060,18 @@
     return obj is Map<String, dynamic> &&
         obj.containsKey('name') &&
         obj['name'] is String &&
+        (obj['detail'] == null || obj['detail'] is String) &&
         obj.containsKey('kind') &&
         SymbolKind.canParse(obj['kind']) &&
+        (obj['deprecated'] == null || obj['deprecated'] is bool) &&
         obj.containsKey('range') &&
         Range.canParse(obj['range']) &&
         obj.containsKey('selectionRange') &&
-        Range.canParse(obj['selectionRange']);
+        Range.canParse(obj['selectionRange']) &&
+        (obj['children'] == null ||
+            (obj['children'] is List &&
+                (obj['children']
+                    .every((item) => DocumentSymbol.canParse(item)))));
   }
 
   @override
@@ -3862,6 +4108,9 @@
 }
 
 class DocumentSymbolParams implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      DocumentSymbolParams.canParse, DocumentSymbolParams.fromJson);
+
   DocumentSymbolParams(this.textDocument) {
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
@@ -3947,6 +4196,9 @@
 
 /// Execute command options.
 class ExecuteCommandOptions implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      ExecuteCommandOptions.canParse, ExecuteCommandOptions.fromJson);
+
   ExecuteCommandOptions(this.commands) {
     if (commands == null) {
       throw 'commands is required but was not provided';
@@ -3997,6 +4249,9 @@
 }
 
 class ExecuteCommandParams implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      ExecuteCommandParams.canParse, ExecuteCommandParams.fromJson);
+
   ExecuteCommandParams(this.command, this.arguments) {
     if (command == null) {
       throw 'command is required but was not provided';
@@ -4028,7 +4283,10 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
         obj.containsKey('command') &&
-        obj['command'] is String;
+        obj['command'] is String &&
+        (obj['arguments'] == null ||
+            (obj['arguments'] is List &&
+                (obj['arguments'].every((item) => true))));
   }
 
   @override
@@ -4056,6 +4314,10 @@
 
 /// Execute command registration options.
 class ExecuteCommandRegistrationOptions implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      ExecuteCommandRegistrationOptions.canParse,
+      ExecuteCommandRegistrationOptions.fromJson);
+
   ExecuteCommandRegistrationOptions(this.commands) {
     if (commands == null) {
       throw 'commands is required but was not provided';
@@ -4154,29 +4416,23 @@
 
 /// The file event type.
 class FileChangeType {
-  const FileChangeType._(this._value);
+  const FileChangeType(this._value);
   const FileChangeType.fromJson(this._value);
 
   final num _value;
 
   static bool canParse(Object obj) {
-    switch (obj) {
-      case 1:
-      case 2:
-      case 3:
-        return true;
-    }
-    return false;
+    return obj is num;
   }
 
   /// The file got created.
-  static const Created = const FileChangeType._(1);
+  static const Created = const FileChangeType(1);
 
   /// The file got changed.
-  static const Changed = const FileChangeType._(2);
+  static const Changed = const FileChangeType(2);
 
   /// The file got deleted.
-  static const Deleted = const FileChangeType._(3);
+  static const Deleted = const FileChangeType(3);
 
   Object toJson() => _value;
 
@@ -4191,6 +4447,9 @@
 
 /// An event describing a file change.
 class FileEvent implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(FileEvent.canParse, FileEvent.fromJson);
+
   FileEvent(this.uri, this.type) {
     if (uri == null) {
       throw 'uri is required but was not provided';
@@ -4247,6 +4506,9 @@
 }
 
 class FileSystemWatcher implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      FileSystemWatcher.canParse, FileSystemWatcher.fromJson);
+
   FileSystemWatcher(this.globPattern, this.kind) {
     if (globPattern == null) {
       throw 'globPattern is required but was not provided';
@@ -4290,7 +4552,8 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
         obj.containsKey('globPattern') &&
-        obj['globPattern'] is String;
+        obj['globPattern'] is String &&
+        (obj['kind'] == null || WatchKind.canParse(obj['kind']));
   }
 
   @override
@@ -4315,6 +4578,9 @@
 
 /// Represents a folding range.
 class FoldingRange implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(FoldingRange.canParse, FoldingRange.fromJson);
+
   FoldingRange(this.startLine, this.startCharacter, this.endLine,
       this.endCharacter, this.kind) {
     if (startLine == null) {
@@ -4377,8 +4643,11 @@
     return obj is Map<String, dynamic> &&
         obj.containsKey('startLine') &&
         obj['startLine'] is num &&
+        (obj['startCharacter'] == null || obj['startCharacter'] is num) &&
         obj.containsKey('endLine') &&
-        obj['endLine'] is num;
+        obj['endLine'] is num &&
+        (obj['endCharacter'] == null || obj['endCharacter'] is num) &&
+        (obj['kind'] == null || FoldingRangeKind.canParse(obj['kind']));
   }
 
   @override
@@ -4411,29 +4680,23 @@
 
 /// Enum of known range kinds
 class FoldingRangeKind {
-  const FoldingRangeKind._(this._value);
+  const FoldingRangeKind(this._value);
   const FoldingRangeKind.fromJson(this._value);
 
   final String _value;
 
   static bool canParse(Object obj) {
-    switch (obj) {
-      case r'comment':
-      case r'imports':
-      case r'region':
-        return true;
-    }
-    return false;
+    return obj is String;
   }
 
   /// Folding range for a comment
-  static const Comment = const FoldingRangeKind._(r'comment');
+  static const Comment = const FoldingRangeKind(r'comment');
 
   /// Folding range for a imports or includes
-  static const Imports = const FoldingRangeKind._(r'imports');
+  static const Imports = const FoldingRangeKind(r'imports');
 
   /// Folding range for a region (e.g. `#region`)
-  static const Region = const FoldingRangeKind._(r'region');
+  static const Region = const FoldingRangeKind(r'region');
 
   Object toJson() => _value;
 
@@ -4447,6 +4710,9 @@
 }
 
 class FoldingRangeParams implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      FoldingRangeParams.canParse, FoldingRangeParams.fromJson);
+
   FoldingRangeParams(this.textDocument) {
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
@@ -4496,6 +4762,10 @@
 
 /// Folding range provider options.
 class FoldingRangeProviderOptions implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      FoldingRangeProviderOptions.canParse,
+      FoldingRangeProviderOptions.fromJson);
+
   static FoldingRangeProviderOptions fromJson(Map<String, dynamic> json) {
     return new FoldingRangeProviderOptions();
   }
@@ -4529,6 +4799,9 @@
 
 /// Value-object describing what options formatting should use.
 class FormattingOptions implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      FormattingOptions.canParse, FormattingOptions.fromJson);
+
   FormattingOptions(this.tabSize, this.insertSpaces) {
     if (tabSize == null) {
       throw 'tabSize is required but was not provided';
@@ -4590,6 +4863,9 @@
 
 /// The result of a hover request.
 class Hover implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(Hover.canParse, Hover.fromJson);
+
   Hover(this.contents, this.range) {
     if (contents == null) {
       throw 'contents is required but was not provided';
@@ -4627,7 +4903,9 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
         obj.containsKey('contents') &&
-        (obj['contents'] is String || MarkupContent.canParse(obj['contents']));
+        (obj['contents'] is String ||
+            MarkupContent.canParse(obj['contents'])) &&
+        (obj['range'] == null || Range.canParse(obj['range']));
   }
 
   @override
@@ -4651,6 +4929,9 @@
 }
 
 class InitializeParams implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      InitializeParams.canParse, InitializeParams.fromJson);
+
   InitializeParams(
       this.processId,
       this.rootPath,
@@ -4736,11 +5017,18 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
         obj.containsKey('processId') &&
-        obj['processId'] is num &&
+        (obj['processId'] == null || obj['processId'] is num) &&
+        (obj['rootPath'] == null || obj['rootPath'] is String) &&
         obj.containsKey('rootUri') &&
-        obj['rootUri'] is String &&
+        (obj['rootUri'] == null || obj['rootUri'] is String) &&
+        (obj['initializationOptions'] == null || true) &&
         obj.containsKey('capabilities') &&
-        ClientCapabilities.canParse(obj['capabilities']);
+        ClientCapabilities.canParse(obj['capabilities']) &&
+        (obj['trace'] == null || obj['trace'] is String) &&
+        (obj['workspaceFolders'] == null ||
+            (obj['workspaceFolders'] is List &&
+                (obj['workspaceFolders']
+                    .every((item) => WorkspaceFolder.canParse(item)))));
   }
 
   @override
@@ -4777,6 +5065,9 @@
 }
 
 class InitializeResult implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      InitializeResult.canParse, InitializeResult.fromJson);
+
   InitializeResult(this.capabilities) {
     if (capabilities == null) {
       throw 'capabilities is required but was not provided';
@@ -4825,6 +5116,9 @@
 }
 
 class InitializedParams implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      InitializedParams.canParse, InitializedParams.fromJson);
+
   static InitializedParams fromJson(Map<String, dynamic> json) {
     return new InitializedParams();
   }
@@ -4896,6 +5190,9 @@
 }
 
 class Location implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(Location.canParse, Location.fromJson);
+
   Location(this.uri, this.range) {
     if (uri == null) {
       throw 'uri is required but was not provided';
@@ -4949,6 +5246,9 @@
 }
 
 class LocationLink implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(LocationLink.canParse, LocationLink.fromJson);
+
   LocationLink(this.originSelectionRange, this.targetUri, this.targetRange,
       this.targetSelectionRange) {
     if (targetUri == null) {
@@ -5012,6 +5312,8 @@
 
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
+        (obj['originSelectionRange'] == null ||
+            Range.canParse(obj['originSelectionRange'])) &&
         obj.containsKey('targetUri') &&
         obj['targetUri'] is String &&
         obj.containsKey('targetRange') &&
@@ -5047,6 +5349,9 @@
 }
 
 class LogMessageParams implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      LogMessageParams.canParse, LogMessageParams.fromJson);
+
   LogMessageParams(this.type, this.message) {
     if (type == null) {
       throw 'type is required but was not provided';
@@ -5127,6 +5432,9 @@
 /// *Please Note* that clients might sanitize the return markdown. A client
 /// could decide to remove HTML from the markdown to avoid script execution.
 class MarkupContent implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(MarkupContent.canParse, MarkupContent.fromJson);
+
   MarkupContent(this.kind, this.value) {
     if (kind == null) {
       throw 'kind is required but was not provided';
@@ -5158,7 +5466,7 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
         obj.containsKey('kind') &&
-        obj['kind'] is String &&
+        MarkupKind.canParse(obj['kind']) &&
         obj.containsKey('value') &&
         obj['value'] is String;
   }
@@ -5221,6 +5529,9 @@
 }
 
 class Message implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(Message.canParse, Message.fromJson);
+
   Message(this.jsonrpc) {
     if (jsonrpc == null) {
       throw 'jsonrpc is required but was not provided';
@@ -5275,6 +5586,9 @@
 }
 
 class MessageActionItem implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      MessageActionItem.canParse, MessageActionItem.fromJson);
+
   MessageActionItem(this.title) {
     if (title == null) {
       throw 'title is required but was not provided';
@@ -5320,33 +5634,26 @@
 }
 
 class MessageType {
-  const MessageType._(this._value);
+  const MessageType(this._value);
   const MessageType.fromJson(this._value);
 
   final num _value;
 
   static bool canParse(Object obj) {
-    switch (obj) {
-      case 1:
-      case 2:
-      case 3:
-      case 4:
-        return true;
-    }
-    return false;
+    return obj is num;
   }
 
   /// An error message.
-  static const Error = const MessageType._(1);
+  static const Error = const MessageType(1);
 
   /// A warning message.
-  static const Warning = const MessageType._(2);
+  static const Warning = const MessageType(2);
 
   /// An information message.
-  static const Info = const MessageType._(3);
+  static const Info = const MessageType(3);
 
   /// A log message.
-  static const Log = const MessageType._(4);
+  static const Log = const MessageType(4);
 
   Object toJson() => _value;
 
@@ -5550,6 +5857,9 @@
 }
 
 class NotificationMessage implements Message, IncomingMessage, ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      NotificationMessage.canParse, NotificationMessage.fromJson);
+
   NotificationMessage(this.method, this.params, this.jsonrpc) {
     if (method == null) {
       throw 'method is required but was not provided';
@@ -5589,6 +5899,7 @@
     return obj is Map<String, dynamic> &&
         obj.containsKey('method') &&
         Method.canParse(obj['method']) &&
+        (obj['params'] == null || true) &&
         obj.containsKey('jsonrpc') &&
         obj['jsonrpc'] is String;
   }
@@ -5620,6 +5931,9 @@
 /// Represents a parameter of a callable-signature. A parameter can have a label
 /// and a doc-comment.
 class ParameterInformation implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      ParameterInformation.canParse, ParameterInformation.fromJson);
+
   ParameterInformation(this.label, this.documentation) {
     if (label == null) {
       throw 'label is required but was not provided';
@@ -5668,7 +5982,10 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
         obj.containsKey('label') &&
-        obj['label'] is String;
+        obj['label'] is String &&
+        (obj['documentation'] == null ||
+            (obj['documentation'] is String ||
+                MarkupContent.canParse(obj['documentation'])));
   }
 
   @override
@@ -5694,6 +6011,9 @@
 }
 
 class Position implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(Position.canParse, Position.fromJson);
+
   Position(this.line, this.character) {
     if (line == null) {
       throw 'line is required but was not provided';
@@ -5756,6 +6076,9 @@
 }
 
 class PublishDiagnosticsParams implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      PublishDiagnosticsParams.canParse, PublishDiagnosticsParams.fromJson);
+
   PublishDiagnosticsParams(this.uri, this.diagnostics) {
     if (uri == null) {
       throw 'uri is required but was not provided';
@@ -5820,6 +6143,9 @@
 }
 
 class Range implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(Range.canParse, Range.fromJson);
+
   Range(this.start, this.end) {
     if (start == null) {
       throw 'start is required but was not provided';
@@ -5877,6 +6203,9 @@
 }
 
 class RangeAndPlaceholder implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      RangeAndPlaceholder.canParse, RangeAndPlaceholder.fromJson);
+
   RangeAndPlaceholder(this.range, this.placeholder) {
     if (range == null) {
       throw 'range is required but was not provided';
@@ -5931,6 +6260,9 @@
 }
 
 class ReferenceContext implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      ReferenceContext.canParse, ReferenceContext.fromJson);
+
   ReferenceContext(this.includeDeclaration) {
     if (includeDeclaration == null) {
       throw 'includeDeclaration is required but was not provided';
@@ -5977,6 +6309,9 @@
 }
 
 class ReferenceParams implements TextDocumentPositionParams, ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(ReferenceParams.canParse, ReferenceParams.fromJson);
+
   ReferenceParams(this.context, this.textDocument, this.position) {
     if (context == null) {
       throw 'context is required but was not provided';
@@ -6055,6 +6390,9 @@
 
 /// General parameters to register for a capability.
 class Registration implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(Registration.canParse, Registration.fromJson);
+
   Registration(this.id, this.method, this.registerOptions) {
     if (id == null) {
       throw 'id is required but was not provided';
@@ -6095,7 +6433,8 @@
         obj.containsKey('id') &&
         obj['id'] is String &&
         obj.containsKey('method') &&
-        obj['method'] is String;
+        obj['method'] is String &&
+        (obj['registerOptions'] == null || true);
   }
 
   @override
@@ -6123,6 +6462,9 @@
 }
 
 class RegistrationParams implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      RegistrationParams.canParse, RegistrationParams.fromJson);
+
   RegistrationParams(this.registrations) {
     if (registrations == null) {
       throw 'registrations is required but was not provided';
@@ -6176,6 +6518,9 @@
 
 /// Rename file operation
 class RenameFile implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(RenameFile.canParse, RenameFile.fromJson);
+
   RenameFile(this.kind, this.oldUri, this.newUri, this.options) {
     if (kind == null) {
       throw 'kind is required but was not provided';
@@ -6227,7 +6572,8 @@
         obj.containsKey('oldUri') &&
         obj['oldUri'] is String &&
         obj.containsKey('newUri') &&
-        obj['newUri'] is String;
+        obj['newUri'] is String &&
+        (obj['options'] == null || RenameFileOptions.canParse(obj['options']));
   }
 
   @override
@@ -6258,6 +6604,9 @@
 
 /// Rename file options
 class RenameFileOptions implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      RenameFileOptions.canParse, RenameFileOptions.fromJson);
+
   RenameFileOptions(this.overwrite, this.ignoreIfExists);
   static RenameFileOptions fromJson(Map<String, dynamic> json) {
     final overwrite = json['overwrite'];
@@ -6283,7 +6632,9 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['overwrite'] == null || obj['overwrite'] is bool) &&
+        (obj['ignoreIfExists'] == null || obj['ignoreIfExists'] is bool);
   }
 
   @override
@@ -6310,6 +6661,9 @@
 
 /// Rename options
 class RenameOptions implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(RenameOptions.canParse, RenameOptions.fromJson);
+
   RenameOptions(this.prepareProvider);
   static RenameOptions fromJson(Map<String, dynamic> json) {
     final prepareProvider = json['prepareProvider'];
@@ -6328,7 +6682,8 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['prepareProvider'] == null || obj['prepareProvider'] is bool);
   }
 
   @override
@@ -6351,6 +6706,9 @@
 }
 
 class RenameParams implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(RenameParams.canParse, RenameParams.fromJson);
+
   RenameParams(this.textDocument, this.position, this.newName) {
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
@@ -6429,6 +6787,9 @@
 
 class RenameRegistrationOptions
     implements TextDocumentRegistrationOptions, ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      RenameRegistrationOptions.canParse, RenameRegistrationOptions.fromJson);
+
   RenameRegistrationOptions(this.prepareProvider, this.documentSelector);
   static RenameRegistrationOptions fromJson(Map<String, dynamic> json) {
     final prepareProvider = json['prepareProvider'];
@@ -6457,10 +6818,12 @@
 
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
+        (obj['prepareProvider'] == null || obj['prepareProvider'] is bool) &&
         obj.containsKey('documentSelector') &&
-        (obj['documentSelector'] is List &&
-            (obj['documentSelector']
-                .every((item) => DocumentFilter.canParse(item))));
+        (obj['documentSelector'] == null ||
+            (obj['documentSelector'] is List &&
+                (obj['documentSelector']
+                    .every((item) => DocumentFilter.canParse(item)))));
   }
 
   @override
@@ -6486,6 +6849,9 @@
 }
 
 class RequestMessage implements Message, IncomingMessage, ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(RequestMessage.canParse, RequestMessage.fromJson);
+
   RequestMessage(this.id, this.method, this.params, this.jsonrpc) {
     if (id == null) {
       throw 'id is required but was not provided';
@@ -6538,6 +6904,7 @@
         (obj['id'] is num || obj['id'] is String) &&
         obj.containsKey('method') &&
         Method.canParse(obj['method']) &&
+        (obj['params'] == null || true) &&
         obj.containsKey('jsonrpc') &&
         obj['jsonrpc'] is String;
   }
@@ -6605,6 +6972,9 @@
 }
 
 class ResponseError<D> implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(ResponseError.canParse, ResponseError.fromJson);
+
   ResponseError(this.code, this.message, this.data) {
     if (code == null) {
       throw 'code is required but was not provided';
@@ -6647,7 +7017,8 @@
         obj.containsKey('code') &&
         ErrorCodes.canParse(obj['code']) &&
         obj.containsKey('message') &&
-        obj['message'] is String;
+        obj['message'] is String &&
+        (obj['data'] == null || obj['data'] is String);
   }
 
   @override
@@ -6675,6 +7046,9 @@
 }
 
 class ResponseMessage implements Message, ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(ResponseMessage.canParse, ResponseMessage.fromJson);
+
   ResponseMessage(this.id, this.result, this.error, this.jsonrpc) {
     if (jsonrpc == null) {
       throw 'jsonrpc is required but was not provided';
@@ -6724,7 +7098,9 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
         obj.containsKey('id') &&
-        (obj['id'] is num || obj['id'] is String) &&
+        (obj['id'] == null || (obj['id'] is num || obj['id'] is String)) &&
+        (obj['result'] == null || true) &&
+        (obj['error'] == null || ResponseError.canParse(obj['error'])) &&
         obj.containsKey('jsonrpc') &&
         obj['jsonrpc'] is String;
   }
@@ -6757,6 +7133,9 @@
 
 /// Save options.
 class SaveOptions implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(SaveOptions.canParse, SaveOptions.fromJson);
+
   SaveOptions(this.includeText);
   static SaveOptions fromJson(Map<String, dynamic> json) {
     final includeText = json['includeText'];
@@ -6775,7 +7154,8 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['includeText'] == null || obj['includeText'] is bool);
   }
 
   @override
@@ -6798,6 +7178,9 @@
 }
 
 class ServerCapabilities implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      ServerCapabilities.canParse, ServerCapabilities.fromJson);
+
   ServerCapabilities(
       this.textDocumentSync,
       this.hoverProvider,
@@ -7102,7 +7485,60 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['textDocumentSync'] == null ||
+            (TextDocumentSyncOptions.canParse(obj['textDocumentSync']) ||
+                obj['textDocumentSync'] is num)) &&
+        (obj['hoverProvider'] == null || obj['hoverProvider'] is bool) &&
+        (obj['completionProvider'] == null ||
+            CompletionOptions.canParse(obj['completionProvider'])) &&
+        (obj['signatureHelpProvider'] == null ||
+            SignatureHelpOptions.canParse(obj['signatureHelpProvider'])) &&
+        (obj['definitionProvider'] == null ||
+            obj['definitionProvider'] is bool) &&
+        (obj['typeDefinitionProvider'] == null ||
+            (obj['typeDefinitionProvider'] is bool || true)) &&
+        (obj['implementationProvider'] == null ||
+            (obj['implementationProvider'] is bool || true)) &&
+        (obj['referencesProvider'] == null ||
+            obj['referencesProvider'] is bool) &&
+        (obj['documentHighlightProvider'] == null ||
+            obj['documentHighlightProvider'] is bool) &&
+        (obj['documentSymbolProvider'] == null ||
+            obj['documentSymbolProvider'] is bool) &&
+        (obj['workspaceSymbolProvider'] == null ||
+            obj['workspaceSymbolProvider'] is bool) &&
+        (obj['codeActionProvider'] == null ||
+            (obj['codeActionProvider'] is bool ||
+                CodeActionOptions.canParse(obj['codeActionProvider']))) &&
+        (obj['codeLensProvider'] == null ||
+            CodeLensOptions.canParse(obj['codeLensProvider'])) &&
+        (obj['documentFormattingProvider'] == null ||
+            obj['documentFormattingProvider'] is bool) &&
+        (obj['documentRangeFormattingProvider'] == null ||
+            obj['documentRangeFormattingProvider'] is bool) &&
+        (obj['documentOnTypeFormattingProvider'] == null ||
+            DocumentOnTypeFormattingOptions.canParse(
+                obj['documentOnTypeFormattingProvider'])) &&
+        (obj['renameProvider'] == null ||
+            (obj['renameProvider'] is bool ||
+                RenameOptions.canParse(obj['renameProvider']))) &&
+        (obj['documentLinkProvider'] == null ||
+            DocumentLinkOptions.canParse(obj['documentLinkProvider'])) &&
+        (obj['colorProvider'] == null ||
+            (obj['colorProvider'] is bool ||
+                ColorProviderOptions.canParse(obj['colorProvider']) ||
+                true)) &&
+        (obj['foldingRangeProvider'] == null ||
+            (obj['foldingRangeProvider'] is bool ||
+                FoldingRangeProviderOptions.canParse(
+                    obj['foldingRangeProvider']) ||
+                true)) &&
+        (obj['executeCommandProvider'] == null ||
+            ExecuteCommandOptions.canParse(obj['executeCommandProvider'])) &&
+        (obj['workspace'] == null ||
+            ServerCapabilitiesWorkspace.canParse(obj['workspace'])) &&
+        (obj['experimental'] == null || true);
   }
 
   @override
@@ -7174,6 +7610,10 @@
 }
 
 class ServerCapabilitiesWorkspace implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      ServerCapabilitiesWorkspace.canParse,
+      ServerCapabilitiesWorkspace.fromJson);
+
   ServerCapabilitiesWorkspace(this.workspaceFolders);
   static ServerCapabilitiesWorkspace fromJson(Map<String, dynamic> json) {
     final workspaceFolders = json['workspaceFolders'] != null
@@ -7196,7 +7636,10 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['workspaceFolders'] == null ||
+            ServerCapabilitiesWorkspaceFolders.canParse(
+                obj['workspaceFolders']));
   }
 
   @override
@@ -7219,6 +7662,10 @@
 }
 
 class ServerCapabilitiesWorkspaceFolders implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      ServerCapabilitiesWorkspaceFolders.canParse,
+      ServerCapabilitiesWorkspaceFolders.fromJson);
+
   ServerCapabilitiesWorkspaceFolders(this.supported, this.changeNotifications);
   static ServerCapabilitiesWorkspaceFolders fromJson(
       Map<String, dynamic> json) {
@@ -7251,7 +7698,10 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['supported'] == null || obj['supported'] is bool) &&
+        (obj['changeNotifications'] == null ||
+            obj['changeNotifications'] is bool);
   }
 
   @override
@@ -7277,6 +7727,9 @@
 }
 
 class ShowMessageParams implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      ShowMessageParams.canParse, ShowMessageParams.fromJson);
+
   ShowMessageParams(this.type, this.message) {
     if (type == null) {
       throw 'type is required but was not provided';
@@ -7335,6 +7788,9 @@
 }
 
 class ShowMessageRequestParams implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      ShowMessageRequestParams.canParse, ShowMessageRequestParams.fromJson);
+
   ShowMessageRequestParams(this.type, this.message, this.actions) {
     if (type == null) {
       throw 'type is required but was not provided';
@@ -7379,7 +7835,11 @@
         obj.containsKey('type') &&
         MessageType.canParse(obj['type']) &&
         obj.containsKey('message') &&
-        obj['message'] is String;
+        obj['message'] is String &&
+        (obj['actions'] == null ||
+            (obj['actions'] is List &&
+                (obj['actions']
+                    .every((item) => MessageActionItem.canParse(item)))));
   }
 
   @override
@@ -7410,6 +7870,9 @@
 /// Signature help represents the signature of something callable. There can be
 /// multiple signature but only one active and only one active parameter.
 class SignatureHelp implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(SignatureHelp.canParse, SignatureHelp.fromJson);
+
   SignatureHelp(this.signatures, this.activeSignature, this.activeParameter) {
     if (signatures == null) {
       throw 'signatures is required but was not provided';
@@ -7463,7 +7926,9 @@
         obj.containsKey('signatures') &&
         (obj['signatures'] is List &&
             (obj['signatures']
-                .every((item) => SignatureInformation.canParse(item))));
+                .every((item) => SignatureInformation.canParse(item)))) &&
+        (obj['activeSignature'] == null || obj['activeSignature'] is num) &&
+        (obj['activeParameter'] == null || obj['activeParameter'] is num);
   }
 
   @override
@@ -7493,6 +7958,9 @@
 
 /// Signature help options.
 class SignatureHelpOptions implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      SignatureHelpOptions.canParse, SignatureHelpOptions.fromJson);
+
   SignatureHelpOptions(this.triggerCharacters);
   static SignatureHelpOptions fromJson(Map<String, dynamic> json) {
     final triggerCharacters = json['triggerCharacters']
@@ -7514,7 +7982,10 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['triggerCharacters'] == null ||
+            (obj['triggerCharacters'] is List &&
+                (obj['triggerCharacters'].every((item) => item is String))));
   }
 
   @override
@@ -7540,6 +8011,10 @@
 
 class SignatureHelpRegistrationOptions
     implements TextDocumentRegistrationOptions, ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      SignatureHelpRegistrationOptions.canParse,
+      SignatureHelpRegistrationOptions.fromJson);
+
   SignatureHelpRegistrationOptions(
       this.triggerCharacters, this.documentSelector);
   static SignatureHelpRegistrationOptions fromJson(Map<String, dynamic> json) {
@@ -7573,10 +8048,14 @@
 
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
+        (obj['triggerCharacters'] == null ||
+            (obj['triggerCharacters'] is List &&
+                (obj['triggerCharacters'].every((item) => item is String)))) &&
         obj.containsKey('documentSelector') &&
-        (obj['documentSelector'] is List &&
-            (obj['documentSelector']
-                .every((item) => DocumentFilter.canParse(item))));
+        (obj['documentSelector'] == null ||
+            (obj['documentSelector'] is List &&
+                (obj['documentSelector']
+                    .every((item) => DocumentFilter.canParse(item)))));
   }
 
   @override
@@ -7605,6 +8084,9 @@
 /// Represents the signature of something callable. A signature can have a
 /// label, like a function-name, a doc-comment, and a set of parameters.
 class SignatureInformation implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      SignatureInformation.canParse, SignatureInformation.fromJson);
+
   SignatureInformation(this.label, this.documentation, this.parameters) {
     if (label == null) {
       throw 'label is required but was not provided';
@@ -7655,7 +8137,14 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
         obj.containsKey('label') &&
-        obj['label'] is String;
+        obj['label'] is String &&
+        (obj['documentation'] == null ||
+            (obj['documentation'] is String ||
+                MarkupContent.canParse(obj['documentation']))) &&
+        (obj['parameters'] == null ||
+            (obj['parameters'] is List &&
+                (obj['parameters']
+                    .every((item) => ParameterInformation.canParse(item)))));
   }
 
   @override
@@ -7685,6 +8174,9 @@
 
 /// Static registration options to be returned in the initialize request.
 class StaticRegistrationOptions implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      StaticRegistrationOptions.canParse, StaticRegistrationOptions.fromJson);
+
   StaticRegistrationOptions(this.id);
   static StaticRegistrationOptions fromJson(Map<String, dynamic> json) {
     final id = json['id'];
@@ -7704,7 +8196,8 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['id'] == null || obj['id'] is String);
   }
 
   @override
@@ -7729,6 +8222,9 @@
 /// Represents information about programming constructs like variables, classes,
 /// interfaces etc.
 class SymbolInformation implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      SymbolInformation.canParse, SymbolInformation.fromJson);
+
   SymbolInformation(this.name, this.kind, this.deprecated, this.location,
       this.containerName) {
     if (name == null) {
@@ -7800,8 +8296,10 @@
         obj['name'] is String &&
         obj.containsKey('kind') &&
         SymbolKind.canParse(obj['kind']) &&
+        (obj['deprecated'] == null || obj['deprecated'] is bool) &&
         obj.containsKey('location') &&
-        Location.canParse(obj['location']);
+        Location.canParse(obj['location']) &&
+        (obj['containerName'] == null || obj['containerName'] is String);
   }
 
   @override
@@ -7834,70 +8332,41 @@
 
 /// A symbol kind.
 class SymbolKind {
-  const SymbolKind._(this._value);
+  const SymbolKind(this._value);
   const SymbolKind.fromJson(this._value);
 
   final num _value;
 
   static bool canParse(Object obj) {
-    switch (obj) {
-      case 1:
-      case 2:
-      case 3:
-      case 4:
-      case 5:
-      case 6:
-      case 7:
-      case 8:
-      case 9:
-      case 10:
-      case 11:
-      case 12:
-      case 13:
-      case 14:
-      case 15:
-      case 16:
-      case 17:
-      case 18:
-      case 19:
-      case 20:
-      case 21:
-      case 22:
-      case 23:
-      case 24:
-      case 25:
-      case 26:
-        return true;
-    }
-    return false;
+    return obj is num;
   }
 
-  static const File = const SymbolKind._(1);
-  static const Module = const SymbolKind._(2);
-  static const Namespace = const SymbolKind._(3);
-  static const Package = const SymbolKind._(4);
-  static const Class = const SymbolKind._(5);
-  static const Method = const SymbolKind._(6);
-  static const Property = const SymbolKind._(7);
-  static const Field = const SymbolKind._(8);
-  static const Constructor = const SymbolKind._(9);
-  static const Enum = const SymbolKind._(10);
-  static const Interface = const SymbolKind._(11);
-  static const Function = const SymbolKind._(12);
-  static const Variable = const SymbolKind._(13);
-  static const Constant = const SymbolKind._(14);
-  static const Str = const SymbolKind._(15);
-  static const Number = const SymbolKind._(16);
-  static const Boolean = const SymbolKind._(17);
-  static const Array = const SymbolKind._(18);
-  static const Obj = const SymbolKind._(19);
-  static const Key = const SymbolKind._(20);
-  static const Null = const SymbolKind._(21);
-  static const EnumMember = const SymbolKind._(22);
-  static const Struct = const SymbolKind._(23);
-  static const Event = const SymbolKind._(24);
-  static const Operator = const SymbolKind._(25);
-  static const TypeParameter = const SymbolKind._(26);
+  static const File = const SymbolKind(1);
+  static const Module = const SymbolKind(2);
+  static const Namespace = const SymbolKind(3);
+  static const Package = const SymbolKind(4);
+  static const Class = const SymbolKind(5);
+  static const Method = const SymbolKind(6);
+  static const Property = const SymbolKind(7);
+  static const Field = const SymbolKind(8);
+  static const Constructor = const SymbolKind(9);
+  static const Enum = const SymbolKind(10);
+  static const Interface = const SymbolKind(11);
+  static const Function = const SymbolKind(12);
+  static const Variable = const SymbolKind(13);
+  static const Constant = const SymbolKind(14);
+  static const Str = const SymbolKind(15);
+  static const Number = const SymbolKind(16);
+  static const Boolean = const SymbolKind(17);
+  static const Array = const SymbolKind(18);
+  static const Obj = const SymbolKind(19);
+  static const Key = const SymbolKind(20);
+  static const Null = const SymbolKind(21);
+  static const EnumMember = const SymbolKind(22);
+  static const Struct = const SymbolKind(23);
+  static const Event = const SymbolKind(24);
+  static const Operator = const SymbolKind(25);
+  static const TypeParameter = const SymbolKind(26);
 
   Object toJson() => _value;
 
@@ -7914,6 +8383,10 @@
 /// events.
 class TextDocumentChangeRegistrationOptions
     implements TextDocumentRegistrationOptions, ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentChangeRegistrationOptions.canParse,
+      TextDocumentChangeRegistrationOptions.fromJson);
+
   TextDocumentChangeRegistrationOptions(this.syncKind, this.documentSelector) {
     if (syncKind == null) {
       throw 'syncKind is required but was not provided';
@@ -7951,9 +8424,10 @@
         obj.containsKey('syncKind') &&
         obj['syncKind'] is num &&
         obj.containsKey('documentSelector') &&
-        (obj['documentSelector'] is List &&
-            (obj['documentSelector']
-                .every((item) => DocumentFilter.canParse(item))));
+        (obj['documentSelector'] == null ||
+            (obj['documentSelector'] is List &&
+                (obj['documentSelector']
+                    .every((item) => DocumentFilter.canParse(item)))));
   }
 
   @override
@@ -7980,6 +8454,10 @@
 
 /// Text document specific client capabilities.
 class TextDocumentClientCapabilities implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentClientCapabilities.canParse,
+      TextDocumentClientCapabilities.fromJson);
+
   TextDocumentClientCapabilities(
       this.synchronization,
       this.completion,
@@ -8244,7 +8722,67 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['synchronization'] == null ||
+            TextDocumentClientCapabilitiesSynchronization.canParse(
+                obj['synchronization'])) &&
+        (obj['completion'] == null ||
+            TextDocumentClientCapabilitiesCompletion.canParse(
+                obj['completion'])) &&
+        (obj['hover'] == null ||
+            TextDocumentClientCapabilitiesHover.canParse(obj['hover'])) &&
+        (obj['signatureHelp'] == null ||
+            TextDocumentClientCapabilitiesSignatureHelp.canParse(
+                obj['signatureHelp'])) &&
+        (obj['references'] == null ||
+            TextDocumentClientCapabilitiesReferences.canParse(
+                obj['references'])) &&
+        (obj['documentHighlight'] == null ||
+            TextDocumentClientCapabilitiesDocumentHighlight.canParse(
+                obj['documentHighlight'])) &&
+        (obj['documentSymbol'] == null ||
+            TextDocumentClientCapabilitiesDocumentSymbol.canParse(
+                obj['documentSymbol'])) &&
+        (obj['formatting'] == null ||
+            TextDocumentClientCapabilitiesFormatting.canParse(
+                obj['formatting'])) &&
+        (obj['rangeFormatting'] == null ||
+            TextDocumentClientCapabilitiesRangeFormatting.canParse(
+                obj['rangeFormatting'])) &&
+        (obj['onTypeFormatting'] == null ||
+            TextDocumentClientCapabilitiesOnTypeFormatting.canParse(
+                obj['onTypeFormatting'])) &&
+        (obj['declaration'] == null ||
+            TextDocumentClientCapabilitiesDeclaration.canParse(
+                obj['declaration'])) &&
+        (obj['definition'] == null ||
+            TextDocumentClientCapabilitiesDefinition.canParse(
+                obj['definition'])) &&
+        (obj['typeDefinition'] == null ||
+            TextDocumentClientCapabilitiesTypeDefinition.canParse(
+                obj['typeDefinition'])) &&
+        (obj['implementation'] == null ||
+            TextDocumentClientCapabilitiesImplementation.canParse(
+                obj['implementation'])) &&
+        (obj['codeAction'] == null ||
+            TextDocumentClientCapabilitiesCodeAction.canParse(
+                obj['codeAction'])) &&
+        (obj['codeLens'] == null ||
+            TextDocumentClientCapabilitiesCodeLens.canParse(obj['codeLens'])) &&
+        (obj['documentLink'] == null ||
+            TextDocumentClientCapabilitiesDocumentLink.canParse(
+                obj['documentLink'])) &&
+        (obj['colorProvider'] == null ||
+            TextDocumentClientCapabilitiesColorProvider.canParse(
+                obj['colorProvider'])) &&
+        (obj['rename'] == null ||
+            TextDocumentClientCapabilitiesRename.canParse(obj['rename'])) &&
+        (obj['publishDiagnostics'] == null ||
+            TextDocumentClientCapabilitiesPublishDiagnostics.canParse(
+                obj['publishDiagnostics'])) &&
+        (obj['foldingRange'] == null ||
+            TextDocumentClientCapabilitiesFoldingRange.canParse(
+                obj['foldingRange']));
   }
 
   @override
@@ -8308,6 +8846,10 @@
 }
 
 class TextDocumentClientCapabilitiesCodeAction implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentClientCapabilitiesCodeAction.canParse,
+      TextDocumentClientCapabilitiesCodeAction.fromJson);
+
   TextDocumentClientCapabilitiesCodeAction(
       this.dynamicRegistration, this.codeActionLiteralSupport);
   static TextDocumentClientCapabilitiesCodeAction fromJson(
@@ -8343,7 +8885,12 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['dynamicRegistration'] == null ||
+            obj['dynamicRegistration'] is bool) &&
+        (obj['codeActionLiteralSupport'] == null ||
+            TextDocumentClientCapabilitiesCodeActionLiteralSupport.canParse(
+                obj['codeActionLiteralSupport']));
   }
 
   @override
@@ -8369,6 +8916,10 @@
 }
 
 class TextDocumentClientCapabilitiesCodeActionKind implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentClientCapabilitiesCodeActionKind.canParse,
+      TextDocumentClientCapabilitiesCodeActionKind.fromJson);
+
   TextDocumentClientCapabilitiesCodeActionKind(this.valueSet) {
     if (valueSet == null) {
       throw 'valueSet is required but was not provided';
@@ -8399,7 +8950,7 @@
     return obj is Map<String, dynamic> &&
         obj.containsKey('valueSet') &&
         (obj['valueSet'] is List &&
-            (obj['valueSet'].every((item) => item is String)));
+            (obj['valueSet'].every((item) => CodeActionKind.canParse(item))));
   }
 
   @override
@@ -8425,6 +8976,10 @@
 
 class TextDocumentClientCapabilitiesCodeActionLiteralSupport
     implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentClientCapabilitiesCodeActionLiteralSupport.canParse,
+      TextDocumentClientCapabilitiesCodeActionLiteralSupport.fromJson);
+
   TextDocumentClientCapabilitiesCodeActionLiteralSupport(this.codeActionKind) {
     if (codeActionKind == null) {
       throw 'codeActionKind is required but was not provided';
@@ -8477,6 +9032,10 @@
 }
 
 class TextDocumentClientCapabilitiesCodeLens implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentClientCapabilitiesCodeLens.canParse,
+      TextDocumentClientCapabilitiesCodeLens.fromJson);
+
   TextDocumentClientCapabilitiesCodeLens(this.dynamicRegistration);
   static TextDocumentClientCapabilitiesCodeLens fromJson(
       Map<String, dynamic> json) {
@@ -8496,7 +9055,9 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['dynamicRegistration'] == null ||
+            obj['dynamicRegistration'] is bool);
   }
 
   @override
@@ -8519,6 +9080,10 @@
 }
 
 class TextDocumentClientCapabilitiesColorProvider implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentClientCapabilitiesColorProvider.canParse,
+      TextDocumentClientCapabilitiesColorProvider.fromJson);
+
   TextDocumentClientCapabilitiesColorProvider(this.dynamicRegistration);
   static TextDocumentClientCapabilitiesColorProvider fromJson(
       Map<String, dynamic> json) {
@@ -8541,7 +9106,9 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['dynamicRegistration'] == null ||
+            obj['dynamicRegistration'] is bool);
   }
 
   @override
@@ -8564,6 +9131,10 @@
 }
 
 class TextDocumentClientCapabilitiesCompletion implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentClientCapabilitiesCompletion.canParse,
+      TextDocumentClientCapabilitiesCompletion.fromJson);
+
   TextDocumentClientCapabilitiesCompletion(this.dynamicRegistration,
       this.completionItem, this.completionItemKind, this.contextSupport);
   static TextDocumentClientCapabilitiesCompletion fromJson(
@@ -8611,7 +9182,16 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['dynamicRegistration'] == null ||
+            obj['dynamicRegistration'] is bool) &&
+        (obj['completionItem'] == null ||
+            TextDocumentClientCapabilitiesCompletionItem.canParse(
+                obj['completionItem'])) &&
+        (obj['completionItemKind'] == null ||
+            TextDocumentClientCapabilitiesCompletionItemKind.canParse(
+                obj['completionItemKind'])) &&
+        (obj['contextSupport'] == null || obj['contextSupport'] is bool);
   }
 
   @override
@@ -8641,6 +9221,10 @@
 }
 
 class TextDocumentClientCapabilitiesCompletionItem implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentClientCapabilitiesCompletionItem.canParse,
+      TextDocumentClientCapabilitiesCompletionItem.fromJson);
+
   TextDocumentClientCapabilitiesCompletionItem(
       this.snippetSupport,
       this.commitCharactersSupport,
@@ -8707,7 +9291,17 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['snippetSupport'] == null || obj['snippetSupport'] is bool) &&
+        (obj['commitCharactersSupport'] == null ||
+            obj['commitCharactersSupport'] is bool) &&
+        (obj['documentationFormat'] == null ||
+            (obj['documentationFormat'] is List &&
+                (obj['documentationFormat']
+                    .every((item) => MarkupKind.canParse(item))))) &&
+        (obj['deprecatedSupport'] == null ||
+            obj['deprecatedSupport'] is bool) &&
+        (obj['preselectSupport'] == null || obj['preselectSupport'] is bool);
   }
 
   @override
@@ -8740,6 +9334,10 @@
 }
 
 class TextDocumentClientCapabilitiesCompletionItemKind implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentClientCapabilitiesCompletionItemKind.canParse,
+      TextDocumentClientCapabilitiesCompletionItemKind.fromJson);
+
   TextDocumentClientCapabilitiesCompletionItemKind(this.valueSet);
   static TextDocumentClientCapabilitiesCompletionItemKind fromJson(
       Map<String, dynamic> json) {
@@ -8768,7 +9366,11 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['valueSet'] == null ||
+            (obj['valueSet'] is List &&
+                (obj['valueSet']
+                    .every((item) => CompletionItemKind.canParse(item)))));
   }
 
   @override
@@ -8793,6 +9395,10 @@
 }
 
 class TextDocumentClientCapabilitiesDeclaration implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentClientCapabilitiesDeclaration.canParse,
+      TextDocumentClientCapabilitiesDeclaration.fromJson);
+
   TextDocumentClientCapabilitiesDeclaration(
       this.dynamicRegistration, this.linkSupport);
   static TextDocumentClientCapabilitiesDeclaration fromJson(
@@ -8826,7 +9432,10 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['dynamicRegistration'] == null ||
+            obj['dynamicRegistration'] is bool) &&
+        (obj['linkSupport'] == null || obj['linkSupport'] is bool);
   }
 
   @override
@@ -8852,6 +9461,10 @@
 }
 
 class TextDocumentClientCapabilitiesDefinition implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentClientCapabilitiesDefinition.canParse,
+      TextDocumentClientCapabilitiesDefinition.fromJson);
+
   TextDocumentClientCapabilitiesDefinition(
       this.dynamicRegistration, this.linkSupport);
   static TextDocumentClientCapabilitiesDefinition fromJson(
@@ -8880,7 +9493,10 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['dynamicRegistration'] == null ||
+            obj['dynamicRegistration'] is bool) &&
+        (obj['linkSupport'] == null || obj['linkSupport'] is bool);
   }
 
   @override
@@ -8906,6 +9522,10 @@
 }
 
 class TextDocumentClientCapabilitiesDocumentHighlight implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentClientCapabilitiesDocumentHighlight.canParse,
+      TextDocumentClientCapabilitiesDocumentHighlight.fromJson);
+
   TextDocumentClientCapabilitiesDocumentHighlight(this.dynamicRegistration);
   static TextDocumentClientCapabilitiesDocumentHighlight fromJson(
       Map<String, dynamic> json) {
@@ -8926,7 +9546,9 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['dynamicRegistration'] == null ||
+            obj['dynamicRegistration'] is bool);
   }
 
   @override
@@ -8949,6 +9571,10 @@
 }
 
 class TextDocumentClientCapabilitiesDocumentLink implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentClientCapabilitiesDocumentLink.canParse,
+      TextDocumentClientCapabilitiesDocumentLink.fromJson);
+
   TextDocumentClientCapabilitiesDocumentLink(this.dynamicRegistration);
   static TextDocumentClientCapabilitiesDocumentLink fromJson(
       Map<String, dynamic> json) {
@@ -8968,7 +9594,9 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['dynamicRegistration'] == null ||
+            obj['dynamicRegistration'] is bool);
   }
 
   @override
@@ -8991,6 +9619,10 @@
 }
 
 class TextDocumentClientCapabilitiesDocumentSymbol implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentClientCapabilitiesDocumentSymbol.canParse,
+      TextDocumentClientCapabilitiesDocumentSymbol.fromJson);
+
   TextDocumentClientCapabilitiesDocumentSymbol(this.dynamicRegistration,
       this.symbolKind, this.hierarchicalDocumentSymbolSupport);
   static TextDocumentClientCapabilitiesDocumentSymbol fromJson(
@@ -9030,7 +9662,14 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['dynamicRegistration'] == null ||
+            obj['dynamicRegistration'] is bool) &&
+        (obj['symbolKind'] == null ||
+            TextDocumentClientCapabilitiesSymbolKind.canParse(
+                obj['symbolKind'])) &&
+        (obj['hierarchicalDocumentSymbolSupport'] == null ||
+            obj['hierarchicalDocumentSymbolSupport'] is bool);
   }
 
   @override
@@ -9060,6 +9699,10 @@
 }
 
 class TextDocumentClientCapabilitiesFoldingRange implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentClientCapabilitiesFoldingRange.canParse,
+      TextDocumentClientCapabilitiesFoldingRange.fromJson);
+
   TextDocumentClientCapabilitiesFoldingRange(
       this.dynamicRegistration, this.rangeLimit, this.lineFoldingOnly);
   static TextDocumentClientCapabilitiesFoldingRange fromJson(
@@ -9103,7 +9746,11 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['dynamicRegistration'] == null ||
+            obj['dynamicRegistration'] is bool) &&
+        (obj['rangeLimit'] == null || obj['rangeLimit'] is num) &&
+        (obj['lineFoldingOnly'] == null || obj['lineFoldingOnly'] is bool);
   }
 
   @override
@@ -9131,6 +9778,10 @@
 }
 
 class TextDocumentClientCapabilitiesFormatting implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentClientCapabilitiesFormatting.canParse,
+      TextDocumentClientCapabilitiesFormatting.fromJson);
+
   TextDocumentClientCapabilitiesFormatting(this.dynamicRegistration);
   static TextDocumentClientCapabilitiesFormatting fromJson(
       Map<String, dynamic> json) {
@@ -9150,7 +9801,9 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['dynamicRegistration'] == null ||
+            obj['dynamicRegistration'] is bool);
   }
 
   @override
@@ -9173,6 +9826,10 @@
 }
 
 class TextDocumentClientCapabilitiesHover implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentClientCapabilitiesHover.canParse,
+      TextDocumentClientCapabilitiesHover.fromJson);
+
   TextDocumentClientCapabilitiesHover(
       this.dynamicRegistration, this.contentFormat);
   static TextDocumentClientCapabilitiesHover fromJson(
@@ -9205,7 +9862,13 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['dynamicRegistration'] == null ||
+            obj['dynamicRegistration'] is bool) &&
+        (obj['contentFormat'] == null ||
+            (obj['contentFormat'] is List &&
+                (obj['contentFormat']
+                    .every((item) => MarkupKind.canParse(item)))));
   }
 
   @override
@@ -9232,6 +9895,10 @@
 }
 
 class TextDocumentClientCapabilitiesImplementation implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentClientCapabilitiesImplementation.canParse,
+      TextDocumentClientCapabilitiesImplementation.fromJson);
+
   TextDocumentClientCapabilitiesImplementation(
       this.dynamicRegistration, this.linkSupport);
   static TextDocumentClientCapabilitiesImplementation fromJson(
@@ -9265,7 +9932,10 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['dynamicRegistration'] == null ||
+            obj['dynamicRegistration'] is bool) &&
+        (obj['linkSupport'] == null || obj['linkSupport'] is bool);
   }
 
   @override
@@ -9291,6 +9961,10 @@
 }
 
 class TextDocumentClientCapabilitiesOnTypeFormatting implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentClientCapabilitiesOnTypeFormatting.canParse,
+      TextDocumentClientCapabilitiesOnTypeFormatting.fromJson);
+
   TextDocumentClientCapabilitiesOnTypeFormatting(this.dynamicRegistration);
   static TextDocumentClientCapabilitiesOnTypeFormatting fromJson(
       Map<String, dynamic> json) {
@@ -9311,7 +9985,9 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['dynamicRegistration'] == null ||
+            obj['dynamicRegistration'] is bool);
   }
 
   @override
@@ -9334,6 +10010,10 @@
 }
 
 class TextDocumentClientCapabilitiesParameterInformation implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentClientCapabilitiesParameterInformation.canParse,
+      TextDocumentClientCapabilitiesParameterInformation.fromJson);
+
   TextDocumentClientCapabilitiesParameterInformation(this.labelOffsetSupport);
   static TextDocumentClientCapabilitiesParameterInformation fromJson(
       Map<String, dynamic> json) {
@@ -9357,7 +10037,9 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['labelOffsetSupport'] == null ||
+            obj['labelOffsetSupport'] is bool);
   }
 
   @override
@@ -9380,6 +10062,10 @@
 }
 
 class TextDocumentClientCapabilitiesPublishDiagnostics implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentClientCapabilitiesPublishDiagnostics.canParse,
+      TextDocumentClientCapabilitiesPublishDiagnostics.fromJson);
+
   TextDocumentClientCapabilitiesPublishDiagnostics(this.relatedInformation);
   static TextDocumentClientCapabilitiesPublishDiagnostics fromJson(
       Map<String, dynamic> json) {
@@ -9400,7 +10086,9 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['relatedInformation'] == null ||
+            obj['relatedInformation'] is bool);
   }
 
   @override
@@ -9423,6 +10111,10 @@
 }
 
 class TextDocumentClientCapabilitiesRangeFormatting implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentClientCapabilitiesRangeFormatting.canParse,
+      TextDocumentClientCapabilitiesRangeFormatting.fromJson);
+
   TextDocumentClientCapabilitiesRangeFormatting(this.dynamicRegistration);
   static TextDocumentClientCapabilitiesRangeFormatting fromJson(
       Map<String, dynamic> json) {
@@ -9443,7 +10135,9 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['dynamicRegistration'] == null ||
+            obj['dynamicRegistration'] is bool);
   }
 
   @override
@@ -9466,6 +10160,10 @@
 }
 
 class TextDocumentClientCapabilitiesReferences implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentClientCapabilitiesReferences.canParse,
+      TextDocumentClientCapabilitiesReferences.fromJson);
+
   TextDocumentClientCapabilitiesReferences(this.dynamicRegistration);
   static TextDocumentClientCapabilitiesReferences fromJson(
       Map<String, dynamic> json) {
@@ -9485,7 +10183,9 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['dynamicRegistration'] == null ||
+            obj['dynamicRegistration'] is bool);
   }
 
   @override
@@ -9508,6 +10208,10 @@
 }
 
 class TextDocumentClientCapabilitiesRename implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentClientCapabilitiesRename.canParse,
+      TextDocumentClientCapabilitiesRename.fromJson);
+
   TextDocumentClientCapabilitiesRename(
       this.dynamicRegistration, this.prepareSupport);
   static TextDocumentClientCapabilitiesRename fromJson(
@@ -9537,7 +10241,10 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['dynamicRegistration'] == null ||
+            obj['dynamicRegistration'] is bool) &&
+        (obj['prepareSupport'] == null || obj['prepareSupport'] is bool);
   }
 
   @override
@@ -9563,6 +10270,10 @@
 }
 
 class TextDocumentClientCapabilitiesSignatureHelp implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentClientCapabilitiesSignatureHelp.canParse,
+      TextDocumentClientCapabilitiesSignatureHelp.fromJson);
+
   TextDocumentClientCapabilitiesSignatureHelp(
       this.dynamicRegistration, this.signatureInformation);
   static TextDocumentClientCapabilitiesSignatureHelp fromJson(
@@ -9595,7 +10306,12 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['dynamicRegistration'] == null ||
+            obj['dynamicRegistration'] is bool) &&
+        (obj['signatureInformation'] == null ||
+            TextDocumentClientCapabilitiesSignatureInformation.canParse(
+                obj['signatureInformation']));
   }
 
   @override
@@ -9621,6 +10337,10 @@
 }
 
 class TextDocumentClientCapabilitiesSignatureInformation implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentClientCapabilitiesSignatureInformation.canParse,
+      TextDocumentClientCapabilitiesSignatureInformation.fromJson);
+
   TextDocumentClientCapabilitiesSignatureInformation(
       this.documentationFormat, this.parameterInformation);
   static TextDocumentClientCapabilitiesSignatureInformation fromJson(
@@ -9656,7 +10376,14 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['documentationFormat'] == null ||
+            (obj['documentationFormat'] is List &&
+                (obj['documentationFormat']
+                    .every((item) => MarkupKind.canParse(item))))) &&
+        (obj['parameterInformation'] == null ||
+            TextDocumentClientCapabilitiesParameterInformation.canParse(
+                obj['parameterInformation']));
   }
 
   @override
@@ -9683,6 +10410,10 @@
 }
 
 class TextDocumentClientCapabilitiesSymbolKind implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentClientCapabilitiesSymbolKind.canParse,
+      TextDocumentClientCapabilitiesSymbolKind.fromJson);
+
   TextDocumentClientCapabilitiesSymbolKind(this.valueSet);
   static TextDocumentClientCapabilitiesSymbolKind fromJson(
       Map<String, dynamic> json) {
@@ -9710,7 +10441,10 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['valueSet'] == null ||
+            (obj['valueSet'] is List &&
+                (obj['valueSet'].every((item) => SymbolKind.canParse(item)))));
   }
 
   @override
@@ -9735,6 +10469,10 @@
 }
 
 class TextDocumentClientCapabilitiesSynchronization implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentClientCapabilitiesSynchronization.canParse,
+      TextDocumentClientCapabilitiesSynchronization.fromJson);
+
   TextDocumentClientCapabilitiesSynchronization(this.dynamicRegistration,
       this.willSave, this.willSaveWaitUntil, this.didSave);
   static TextDocumentClientCapabilitiesSynchronization fromJson(
@@ -9779,7 +10517,13 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['dynamicRegistration'] == null ||
+            obj['dynamicRegistration'] is bool) &&
+        (obj['willSave'] == null || obj['willSave'] is bool) &&
+        (obj['willSaveWaitUntil'] == null ||
+            obj['willSaveWaitUntil'] is bool) &&
+        (obj['didSave'] == null || obj['didSave'] is bool);
   }
 
   @override
@@ -9809,6 +10553,10 @@
 }
 
 class TextDocumentClientCapabilitiesTypeDefinition implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentClientCapabilitiesTypeDefinition.canParse,
+      TextDocumentClientCapabilitiesTypeDefinition.fromJson);
+
   TextDocumentClientCapabilitiesTypeDefinition(
       this.dynamicRegistration, this.linkSupport);
   static TextDocumentClientCapabilitiesTypeDefinition fromJson(
@@ -9842,7 +10590,10 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['dynamicRegistration'] == null ||
+            obj['dynamicRegistration'] is bool) &&
+        (obj['linkSupport'] == null || obj['linkSupport'] is bool);
   }
 
   @override
@@ -9871,6 +10622,10 @@
 /// are omitted the new text is considered to be the full content of the
 /// document.
 class TextDocumentContentChangeEvent implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentContentChangeEvent.canParse,
+      TextDocumentContentChangeEvent.fromJson);
+
   TextDocumentContentChangeEvent(this.range, this.rangeLength, this.text) {
     if (text == null) {
       throw 'text is required but was not provided';
@@ -9906,6 +10661,8 @@
 
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
+        (obj['range'] == null || Range.canParse(obj['range'])) &&
+        (obj['rangeLength'] == null || obj['rangeLength'] is num) &&
         obj.containsKey('text') &&
         obj['text'] is String;
   }
@@ -9935,6 +10692,9 @@
 }
 
 class TextDocumentEdit implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentEdit.canParse, TextDocumentEdit.fromJson);
+
   TextDocumentEdit(this.textDocument, this.edits) {
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
@@ -10000,6 +10760,9 @@
 }
 
 class TextDocumentIdentifier implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentIdentifier.canParse, TextDocumentIdentifier.fromJson);
+
   TextDocumentIdentifier(this.uri) {
     if (uri == null) {
       throw 'uri is required but was not provided';
@@ -10048,6 +10811,9 @@
 }
 
 class TextDocumentItem implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentItem.canParse, TextDocumentItem.fromJson);
+
   TextDocumentItem(this.uri, this.languageId, this.version, this.text) {
     if (uri == null) {
       throw 'uri is required but was not provided';
@@ -10133,6 +10899,9 @@
 }
 
 class TextDocumentPositionParams implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentPositionParams.canParse, TextDocumentPositionParams.fromJson);
+
   TextDocumentPositionParams(this.textDocument, this.position) {
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
@@ -10202,6 +10971,10 @@
 }
 
 class TextDocumentRegistrationOptions implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentRegistrationOptions.canParse,
+      TextDocumentRegistrationOptions.fromJson);
+
   TextDocumentRegistrationOptions(this.documentSelector);
   static TextDocumentRegistrationOptions fromJson(Map<String, dynamic> json) {
     if (TextDocumentChangeRegistrationOptions.canParse(json)) {
@@ -10251,9 +11024,10 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
         obj.containsKey('documentSelector') &&
-        (obj['documentSelector'] is List &&
-            (obj['documentSelector']
-                .every((item) => DocumentFilter.canParse(item))));
+        (obj['documentSelector'] == null ||
+            (obj['documentSelector'] is List &&
+                (obj['documentSelector']
+                    .every((item) => DocumentFilter.canParse(item)))));
   }
 
   @override
@@ -10277,30 +11051,24 @@
 
 /// Represents reasons why a text document is saved.
 class TextDocumentSaveReason {
-  const TextDocumentSaveReason._(this._value);
+  const TextDocumentSaveReason(this._value);
   const TextDocumentSaveReason.fromJson(this._value);
 
   final num _value;
 
   static bool canParse(Object obj) {
-    switch (obj) {
-      case 1:
-      case 2:
-      case 3:
-        return true;
-    }
-    return false;
+    return obj is num;
   }
 
   /// Manually triggered, e.g. by the user pressing save, by starting debugging,
   /// or by an API call.
-  static const Manual = const TextDocumentSaveReason._(1);
+  static const Manual = const TextDocumentSaveReason(1);
 
   /// Automatic after a delay.
-  static const AfterDelay = const TextDocumentSaveReason._(2);
+  static const AfterDelay = const TextDocumentSaveReason(2);
 
   /// When the editor lost focus.
-  static const FocusOut = const TextDocumentSaveReason._(3);
+  static const FocusOut = const TextDocumentSaveReason(3);
 
   Object toJson() => _value;
 
@@ -10315,6 +11083,10 @@
 
 class TextDocumentSaveRegistrationOptions
     implements TextDocumentRegistrationOptions, ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentSaveRegistrationOptions.canParse,
+      TextDocumentSaveRegistrationOptions.fromJson);
+
   TextDocumentSaveRegistrationOptions(this.includeText, this.documentSelector);
   static TextDocumentSaveRegistrationOptions fromJson(
       Map<String, dynamic> json) {
@@ -10345,10 +11117,12 @@
 
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
+        (obj['includeText'] == null || obj['includeText'] is bool) &&
         obj.containsKey('documentSelector') &&
-        (obj['documentSelector'] is List &&
-            (obj['documentSelector']
-                .every((item) => DocumentFilter.canParse(item))));
+        (obj['documentSelector'] == null ||
+            (obj['documentSelector'] is List &&
+                (obj['documentSelector']
+                    .every((item) => DocumentFilter.canParse(item)))));
   }
 
   @override
@@ -10376,30 +11150,24 @@
 /// Defines how the host (editor) should sync document changes to the language
 /// server.
 class TextDocumentSyncKind {
-  const TextDocumentSyncKind._(this._value);
+  const TextDocumentSyncKind(this._value);
   const TextDocumentSyncKind.fromJson(this._value);
 
   final num _value;
 
   static bool canParse(Object obj) {
-    switch (obj) {
-      case 0:
-      case 1:
-      case 2:
-        return true;
-    }
-    return false;
+    return obj is num;
   }
 
   /// Documents should not be synced at all.
-  static const None = const TextDocumentSyncKind._(0);
+  static const None = const TextDocumentSyncKind(0);
 
   /// Documents are synced by always sending the full content of the document.
-  static const Full = const TextDocumentSyncKind._(1);
+  static const Full = const TextDocumentSyncKind(1);
 
   /// Documents are synced by sending the full content on open. After that only
   /// incremental updates to the document are send.
-  static const Incremental = const TextDocumentSyncKind._(2);
+  static const Incremental = const TextDocumentSyncKind(2);
 
   Object toJson() => _value;
 
@@ -10413,6 +11181,9 @@
 }
 
 class TextDocumentSyncOptions implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      TextDocumentSyncOptions.canParse, TextDocumentSyncOptions.fromJson);
+
   TextDocumentSyncOptions(this.openClose, this.change, this.willSave,
       this.willSaveWaitUntil, this.save);
   static TextDocumentSyncOptions fromJson(Map<String, dynamic> json) {
@@ -10467,7 +11238,14 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['openClose'] == null || obj['openClose'] is bool) &&
+        (obj['change'] == null ||
+            TextDocumentSyncKind.canParse(obj['change'])) &&
+        (obj['willSave'] == null || obj['willSave'] is bool) &&
+        (obj['willSaveWaitUntil'] == null ||
+            obj['willSaveWaitUntil'] is bool) &&
+        (obj['save'] == null || SaveOptions.canParse(obj['save']));
   }
 
   @override
@@ -10499,6 +11277,9 @@
 }
 
 class TextEdit implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(TextEdit.canParse, TextEdit.fromJson);
+
   TextEdit(this.range, this.newText) {
     if (range == null) {
       throw 'range is required but was not provided';
@@ -10558,6 +11339,9 @@
 
 /// General parameters to unregister a capability.
 class Unregistration implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(Unregistration.canParse, Unregistration.fromJson);
+
   Unregistration(this.id, this.method) {
     if (id == null) {
       throw 'id is required but was not provided';
@@ -10615,6 +11399,9 @@
 }
 
 class UnregistrationParams implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      UnregistrationParams.canParse, UnregistrationParams.fromJson);
+
   UnregistrationParams(this.unregisterations) {
     if (unregisterations == null) {
       throw 'unregisterations is required but was not provided';
@@ -10668,6 +11455,10 @@
 
 class VersionedTextDocumentIdentifier
     implements TextDocumentIdentifier, ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      VersionedTextDocumentIdentifier.canParse,
+      VersionedTextDocumentIdentifier.fromJson);
+
   VersionedTextDocumentIdentifier(this.version, this.uri) {
     if (uri == null) {
       throw 'uri is required but was not provided';
@@ -10702,7 +11493,7 @@
   static bool canParse(Object obj) {
     return obj is Map<String, dynamic> &&
         obj.containsKey('version') &&
-        obj['version'] is num &&
+        (obj['version'] == null || obj['version'] is num) &&
         obj.containsKey('uri') &&
         obj['uri'] is String;
   }
@@ -10728,29 +11519,23 @@
 }
 
 class WatchKind {
-  const WatchKind._(this._value);
+  const WatchKind(this._value);
   const WatchKind.fromJson(this._value);
 
   final num _value;
 
   static bool canParse(Object obj) {
-    switch (obj) {
-      case 1:
-      case 2:
-      case 4:
-        return true;
-    }
-    return false;
+    return obj is num;
   }
 
   /// Interested in create events.
-  static const Create = const WatchKind._(1);
+  static const Create = const WatchKind(1);
 
   /// Interested in change events
-  static const Change = const WatchKind._(2);
+  static const Change = const WatchKind(2);
 
   /// Interested in delete events
-  static const Delete = const WatchKind._(4);
+  static const Delete = const WatchKind(4);
 
   Object toJson() => _value;
 
@@ -10765,6 +11550,9 @@
 
 /// The parameters send in a will save text document notification.
 class WillSaveTextDocumentParams implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      WillSaveTextDocumentParams.canParse, WillSaveTextDocumentParams.fromJson);
+
   WillSaveTextDocumentParams(this.textDocument, this.reason) {
     if (textDocument == null) {
       throw 'textDocument is required but was not provided';
@@ -10827,6 +11615,10 @@
 
 /// Workspace specific client capabilities.
 class WorkspaceClientCapabilities implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      WorkspaceClientCapabilities.canParse,
+      WorkspaceClientCapabilities.fromJson);
+
   WorkspaceClientCapabilities(
       this.applyEdit,
       this.workspaceEdit,
@@ -10932,7 +11724,24 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['applyEdit'] == null || obj['applyEdit'] is bool) &&
+        (obj['workspaceEdit'] == null ||
+            WorkspaceClientCapabilitiesWorkspaceEdit.canParse(
+                obj['workspaceEdit'])) &&
+        (obj['didChangeConfiguration'] == null ||
+            WorkspaceClientCapabilitiesDidChangeConfiguration.canParse(
+                obj['didChangeConfiguration'])) &&
+        (obj['didChangeWatchedFiles'] == null ||
+            WorkspaceClientCapabilitiesDidChangeWatchedFiles.canParse(
+                obj['didChangeWatchedFiles'])) &&
+        (obj['symbol'] == null ||
+            WorkspaceClientCapabilitiesSymbol.canParse(obj['symbol'])) &&
+        (obj['executeCommand'] == null ||
+            WorkspaceClientCapabilitiesExecuteCommand.canParse(
+                obj['executeCommand'])) &&
+        (obj['workspaceFolders'] == null || obj['workspaceFolders'] is bool) &&
+        (obj['configuration'] == null || obj['configuration'] is bool);
   }
 
   @override
@@ -10970,6 +11779,10 @@
 }
 
 class WorkspaceClientCapabilitiesDidChangeConfiguration implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      WorkspaceClientCapabilitiesDidChangeConfiguration.canParse,
+      WorkspaceClientCapabilitiesDidChangeConfiguration.fromJson);
+
   WorkspaceClientCapabilitiesDidChangeConfiguration(this.dynamicRegistration);
   static WorkspaceClientCapabilitiesDidChangeConfiguration fromJson(
       Map<String, dynamic> json) {
@@ -10990,7 +11803,9 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['dynamicRegistration'] == null ||
+            obj['dynamicRegistration'] is bool);
   }
 
   @override
@@ -11013,6 +11828,10 @@
 }
 
 class WorkspaceClientCapabilitiesDidChangeWatchedFiles implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      WorkspaceClientCapabilitiesDidChangeWatchedFiles.canParse,
+      WorkspaceClientCapabilitiesDidChangeWatchedFiles.fromJson);
+
   WorkspaceClientCapabilitiesDidChangeWatchedFiles(this.dynamicRegistration);
   static WorkspaceClientCapabilitiesDidChangeWatchedFiles fromJson(
       Map<String, dynamic> json) {
@@ -11035,7 +11854,9 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['dynamicRegistration'] == null ||
+            obj['dynamicRegistration'] is bool);
   }
 
   @override
@@ -11058,6 +11879,10 @@
 }
 
 class WorkspaceClientCapabilitiesExecuteCommand implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      WorkspaceClientCapabilitiesExecuteCommand.canParse,
+      WorkspaceClientCapabilitiesExecuteCommand.fromJson);
+
   WorkspaceClientCapabilitiesExecuteCommand(this.dynamicRegistration);
   static WorkspaceClientCapabilitiesExecuteCommand fromJson(
       Map<String, dynamic> json) {
@@ -11077,7 +11902,9 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['dynamicRegistration'] == null ||
+            obj['dynamicRegistration'] is bool);
   }
 
   @override
@@ -11100,6 +11927,10 @@
 }
 
 class WorkspaceClientCapabilitiesSymbol implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      WorkspaceClientCapabilitiesSymbol.canParse,
+      WorkspaceClientCapabilitiesSymbol.fromJson);
+
   WorkspaceClientCapabilitiesSymbol(this.dynamicRegistration, this.symbolKind);
   static WorkspaceClientCapabilitiesSymbol fromJson(Map<String, dynamic> json) {
     final dynamicRegistration = json['dynamicRegistration'];
@@ -11129,7 +11960,11 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['dynamicRegistration'] == null ||
+            obj['dynamicRegistration'] is bool) &&
+        (obj['symbolKind'] == null ||
+            WorkspaceClientCapabilitiesSymbolKind.canParse(obj['symbolKind']));
   }
 
   @override
@@ -11155,6 +11990,10 @@
 }
 
 class WorkspaceClientCapabilitiesSymbolKind implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      WorkspaceClientCapabilitiesSymbolKind.canParse,
+      WorkspaceClientCapabilitiesSymbolKind.fromJson);
+
   WorkspaceClientCapabilitiesSymbolKind(this.valueSet);
   static WorkspaceClientCapabilitiesSymbolKind fromJson(
       Map<String, dynamic> json) {
@@ -11182,7 +12021,10 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['valueSet'] == null ||
+            (obj['valueSet'] is List &&
+                (obj['valueSet'].every((item) => SymbolKind.canParse(item)))));
   }
 
   @override
@@ -11207,6 +12049,10 @@
 }
 
 class WorkspaceClientCapabilitiesWorkspaceEdit implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      WorkspaceClientCapabilitiesWorkspaceEdit.canParse,
+      WorkspaceClientCapabilitiesWorkspaceEdit.fromJson);
+
   WorkspaceClientCapabilitiesWorkspaceEdit(
       this.documentChanges, this.resourceOperations, this.failureHandling);
   static WorkspaceClientCapabilitiesWorkspaceEdit fromJson(
@@ -11250,7 +12096,14 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['documentChanges'] == null || obj['documentChanges'] is bool) &&
+        (obj['resourceOperations'] == null ||
+            (obj['resourceOperations'] is List &&
+                (obj['resourceOperations']
+                    .every((item) => ResourceOperationKind.canParse(item))))) &&
+        (obj['failureHandling'] == null ||
+            FailureHandlingKind.canParse(obj['failureHandling']));
   }
 
   @override
@@ -11279,6 +12132,9 @@
 }
 
 class WorkspaceEdit implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(WorkspaceEdit.canParse, WorkspaceEdit.fromJson);
+
   WorkspaceEdit(this.changes, this.documentChanges);
   static WorkspaceEdit fromJson(Map<String, dynamic> json) {
     final changes = json['changes']
@@ -11342,7 +12198,23 @@
   }
 
   static bool canParse(Object obj) {
-    return obj is Map<String, dynamic>;
+    return obj is Map<String, dynamic> &&
+        (obj['changes'] == null ||
+            (obj['changes'] is Map &&
+                (obj['changes'].keys.every((item) =>
+                    item is String &&
+                    obj['changes'].values.every((item) => (item is List &&
+                        (item.every((item) => TextEdit.canParse(item))))))))) &&
+        (obj['documentChanges'] == null ||
+            ((obj['documentChanges'] is List &&
+                    (obj['documentChanges']
+                        .every((item) => TextDocumentEdit.canParse(item)))) ||
+                (obj['documentChanges'] is List &&
+                    (obj['documentChanges'].every((item) =>
+                        (TextDocumentEdit.canParse(item) ||
+                            CreateFile.canParse(item) ||
+                            RenameFile.canParse(item) ||
+                            DeleteFile.canParse(item)))))));
   }
 
   @override
@@ -11369,6 +12241,9 @@
 }
 
 class WorkspaceFolder implements ToJsonable {
+  static const jsonHandler =
+      const LspJsonHandler(WorkspaceFolder.canParse, WorkspaceFolder.fromJson);
+
   WorkspaceFolder(this.uri, this.name) {
     if (uri == null) {
       throw 'uri is required but was not provided';
@@ -11426,6 +12301,10 @@
 
 /// The workspace folder change event.
 class WorkspaceFoldersChangeEvent implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      WorkspaceFoldersChangeEvent.canParse,
+      WorkspaceFoldersChangeEvent.fromJson);
+
   WorkspaceFoldersChangeEvent(this.added, this.removed) {
     if (added == null) {
       throw 'added is required but was not provided';
@@ -11496,6 +12375,9 @@
 
 /// The parameters of a Workspace Symbol Request.
 class WorkspaceSymbolParams implements ToJsonable {
+  static const jsonHandler = const LspJsonHandler(
+      WorkspaceSymbolParams.canParse, WorkspaceSymbolParams.fromJson);
+
   WorkspaceSymbolParams(this.query) {
     if (query == null) {
       throw 'query is required but was not provided';
diff --git a/pkg/analysis_server/lib/lsp_protocol/protocol_special.dart b/pkg/analysis_server/lib/lsp_protocol/protocol_special.dart
index 7a4edc4..7093987 100644
--- a/pkg/analysis_server/lib/lsp_protocol/protocol_special.dart
+++ b/pkg/analysis_server/lib/lsp_protocol/protocol_special.dart
@@ -189,6 +189,19 @@
   dynamic get params;
 }
 
+/// A helper to allow handlers to declare both a JSON validation function and
+/// parse function.
+class LspJsonHandler<T> {
+  final bool Function(Map<String, Object>) validateParams;
+  final T Function(Map<String, Object>) convertParams;
+
+  const LspJsonHandler(this.validateParams, this.convertParams);
+}
+
+bool _alwaysTrue(_) => true;
+Null _alwaysNull(_) => null;
+const NullJsonHandler = const LspJsonHandler<Null>(_alwaysTrue, _alwaysNull);
+
 abstract class ToJsonable {
   Object toJson();
 }
diff --git a/pkg/analysis_server/lib/protocol/protocol_constants.dart b/pkg/analysis_server/lib/protocol/protocol_constants.dart
index d599adc..35174b9 100644
--- a/pkg/analysis_server/lib/protocol/protocol_constants.dart
+++ b/pkg/analysis_server/lib/protocol/protocol_constants.dart
@@ -6,7 +6,7 @@
 // To regenerate the file, use the script
 // "pkg/analysis_server/tool/spec/generate_files".
 
-const String PROTOCOL_VERSION = '1.23.0';
+const String PROTOCOL_VERSION = '1.26.0';
 
 const String ANALYSIS_NOTIFICATION_ANALYZED_FILES = 'analysis.analyzedFiles';
 const String ANALYSIS_NOTIFICATION_ANALYZED_FILES_DIRECTORIES = 'directories';
@@ -118,8 +118,8 @@
     'removedLibraries';
 const String COMPLETION_NOTIFICATION_RESULTS = 'completion.results';
 const String COMPLETION_NOTIFICATION_RESULTS_ID = 'id';
-const String COMPLETION_NOTIFICATION_RESULTS_INCLUDED_SUGGESTION_KINDS =
-    'includedSuggestionKinds';
+const String COMPLETION_NOTIFICATION_RESULTS_INCLUDED_ELEMENT_KINDS =
+    'includedElementKinds';
 const String
     COMPLETION_NOTIFICATION_RESULTS_INCLUDED_SUGGESTION_RELEVANCE_TAGS =
     'includedSuggestionRelevanceTags';
@@ -140,6 +140,9 @@
 const String COMPLETION_REQUEST_GET_SUGGESTION_DETAILS_ID = 'id';
 const String COMPLETION_REQUEST_GET_SUGGESTION_DETAILS_LABEL = 'label';
 const String COMPLETION_REQUEST_GET_SUGGESTION_DETAILS_OFFSET = 'offset';
+const String COMPLETION_REQUEST_LIST_TOKEN_DETAILS =
+    'completion.listTokenDetails';
+const String COMPLETION_REQUEST_LIST_TOKEN_DETAILS_FILE = 'file';
 const String COMPLETION_REQUEST_REGISTER_LIBRARY_PATHS =
     'completion.registerLibraryPaths';
 const String COMPLETION_REQUEST_REGISTER_LIBRARY_PATHS_PATHS = 'paths';
@@ -151,6 +154,7 @@
 const String COMPLETION_RESPONSE_GET_SUGGESTION_DETAILS_CHANGE = 'change';
 const String COMPLETION_RESPONSE_GET_SUGGESTION_DETAILS_COMPLETION =
     'completion';
+const String COMPLETION_RESPONSE_LIST_TOKEN_DETAILS_TOKENS = 'tokens';
 const String DIAGNOSTIC_REQUEST_GET_DIAGNOSTICS = 'diagnostic.getDiagnostics';
 const String DIAGNOSTIC_REQUEST_GET_SERVER_PORT = 'diagnostic.getServerPort';
 const String DIAGNOSTIC_RESPONSE_GET_DIAGNOSTICS_CONTEXTS = 'contexts';
@@ -197,6 +201,7 @@
 const String EDIT_REQUEST_IMPORT_ELEMENTS = 'edit.importElements';
 const String EDIT_REQUEST_IMPORT_ELEMENTS_ELEMENTS = 'elements';
 const String EDIT_REQUEST_IMPORT_ELEMENTS_FILE = 'file';
+const String EDIT_REQUEST_IMPORT_ELEMENTS_OFFSET = 'offset';
 const String EDIT_REQUEST_IS_POSTFIX_COMPLETION_APPLICABLE =
     'edit.isPostfixCompletionApplicable';
 const String EDIT_REQUEST_IS_POSTFIX_COMPLETION_APPLICABLE_FILE = 'file';
diff --git a/pkg/analysis_server/lib/protocol/protocol_generated.dart b/pkg/analysis_server/lib/protocol/protocol_generated.dart
index 9f29f1a..6e7da59 100644
--- a/pkg/analysis_server/lib/protocol/protocol_generated.dart
+++ b/pkg/analysis_server/lib/protocol/protocol_generated.dart
@@ -5076,6 +5076,8 @@
  * {
  *   "label": String
  *   "element": Element
+ *   "defaultArgumentListString": optional String
+ *   "defaultArgumentListTextRanges": optional List<int>
  *   "docComplete": optional String
  *   "docSummary": optional String
  *   "parameterNames": optional List<String>
@@ -5091,6 +5093,10 @@
 
   Element _element;
 
+  String _defaultArgumentListString;
+
+  List<int> _defaultArgumentListTextRanges;
+
   String _docComplete;
 
   String _docSummary;
@@ -5130,6 +5136,42 @@
   }
 
   /**
+   * A default String for use in generating argument list source contents on
+   * the client side.
+   */
+  String get defaultArgumentListString => _defaultArgumentListString;
+
+  /**
+   * A default String for use in generating argument list source contents on
+   * the client side.
+   */
+  void set defaultArgumentListString(String value) {
+    this._defaultArgumentListString = value;
+  }
+
+  /**
+   * Pairs of offsets and lengths describing 'defaultArgumentListString' text
+   * ranges suitable for use by clients to set up linked edits of default
+   * argument source contents. For example, given an argument list string 'x,
+   * y', the corresponding text range [0, 1, 3, 1], indicates two text ranges
+   * of length 1, starting at offsets 0 and 3. Clients can use these ranges to
+   * treat the 'x' and 'y' values specially for linked edits.
+   */
+  List<int> get defaultArgumentListTextRanges => _defaultArgumentListTextRanges;
+
+  /**
+   * Pairs of offsets and lengths describing 'defaultArgumentListString' text
+   * ranges suitable for use by clients to set up linked edits of default
+   * argument source contents. For example, given an argument list string 'x,
+   * y', the corresponding text range [0, 1, 3, 1], indicates two text ranges
+   * of length 1, starting at offsets 0 and 3. Clients can use these ranges to
+   * treat the 'x' and 'y' values specially for linked edits.
+   */
+  void set defaultArgumentListTextRanges(List<int> value) {
+    this._defaultArgumentListTextRanges = value;
+  }
+
+  /**
    * The Dartdoc associated with the element being suggested. This field is
    * omitted if there is no Dartdoc associated with the element.
    */
@@ -5214,7 +5256,9 @@
   }
 
   AvailableSuggestion(String label, Element element,
-      {String docComplete,
+      {String defaultArgumentListString,
+      List<int> defaultArgumentListTextRanges,
+      String docComplete,
       String docSummary,
       List<String> parameterNames,
       List<String> parameterTypes,
@@ -5222,6 +5266,8 @@
       int requiredParameterCount}) {
     this.label = label;
     this.element = element;
+    this.defaultArgumentListString = defaultArgumentListString;
+    this.defaultArgumentListTextRanges = defaultArgumentListTextRanges;
     this.docComplete = docComplete;
     this.docSummary = docSummary;
     this.parameterNames = parameterNames;
@@ -5249,6 +5295,19 @@
       } else {
         throw jsonDecoder.mismatch(jsonPath, "element");
       }
+      String defaultArgumentListString;
+      if (json.containsKey("defaultArgumentListString")) {
+        defaultArgumentListString = jsonDecoder.decodeString(
+            jsonPath + ".defaultArgumentListString",
+            json["defaultArgumentListString"]);
+      }
+      List<int> defaultArgumentListTextRanges;
+      if (json.containsKey("defaultArgumentListTextRanges")) {
+        defaultArgumentListTextRanges = jsonDecoder.decodeList(
+            jsonPath + ".defaultArgumentListTextRanges",
+            json["defaultArgumentListTextRanges"],
+            jsonDecoder.decodeInt);
+      }
       String docComplete;
       if (json.containsKey("docComplete")) {
         docComplete = jsonDecoder.decodeString(
@@ -5281,6 +5340,8 @@
             json["requiredParameterCount"]);
       }
       return new AvailableSuggestion(label, element,
+          defaultArgumentListString: defaultArgumentListString,
+          defaultArgumentListTextRanges: defaultArgumentListTextRanges,
           docComplete: docComplete,
           docSummary: docSummary,
           parameterNames: parameterNames,
@@ -5297,6 +5358,12 @@
     Map<String, dynamic> result = {};
     result["label"] = label;
     result["element"] = element.toJson();
+    if (defaultArgumentListString != null) {
+      result["defaultArgumentListString"] = defaultArgumentListString;
+    }
+    if (defaultArgumentListTextRanges != null) {
+      result["defaultArgumentListTextRanges"] = defaultArgumentListTextRanges;
+    }
     if (docComplete != null) {
       result["docComplete"] = docComplete;
     }
@@ -5326,6 +5393,9 @@
     if (other is AvailableSuggestion) {
       return label == other.label &&
           element == other.element &&
+          defaultArgumentListString == other.defaultArgumentListString &&
+          listEqual(defaultArgumentListTextRanges,
+              other.defaultArgumentListTextRanges, (int a, int b) => a == b) &&
           docComplete == other.docComplete &&
           docSummary == other.docSummary &&
           listEqual(parameterNames, other.parameterNames,
@@ -5344,6 +5414,8 @@
     int hash = 0;
     hash = JenkinsSmiHash.combine(hash, label.hashCode);
     hash = JenkinsSmiHash.combine(hash, element.hashCode);
+    hash = JenkinsSmiHash.combine(hash, defaultArgumentListString.hashCode);
+    hash = JenkinsSmiHash.combine(hash, defaultArgumentListTextRanges.hashCode);
     hash = JenkinsSmiHash.combine(hash, docComplete.hashCode);
     hash = JenkinsSmiHash.combine(hash, docSummary.hashCode);
     hash = JenkinsSmiHash.combine(hash, parameterNames.hashCode);
@@ -6211,6 +6283,184 @@
 }
 
 /**
+ * completion.listTokenDetails params
+ *
+ * {
+ *   "file": FilePath
+ * }
+ *
+ * Clients may not extend, implement or mix-in this class.
+ */
+class CompletionListTokenDetailsParams implements RequestParams {
+  String _file;
+
+  /**
+   * The path to the file from which tokens should be returned.
+   */
+  String get file => _file;
+
+  /**
+   * The path to the file from which tokens should be returned.
+   */
+  void set file(String value) {
+    assert(value != null);
+    this._file = value;
+  }
+
+  CompletionListTokenDetailsParams(String file) {
+    this.file = file;
+  }
+
+  factory CompletionListTokenDetailsParams.fromJson(
+      JsonDecoder jsonDecoder, String jsonPath, Object json) {
+    if (json == null) {
+      json = {};
+    }
+    if (json is Map) {
+      String file;
+      if (json.containsKey("file")) {
+        file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
+      } else {
+        throw jsonDecoder.mismatch(jsonPath, "file");
+      }
+      return new CompletionListTokenDetailsParams(file);
+    } else {
+      throw jsonDecoder.mismatch(
+          jsonPath, "completion.listTokenDetails params", json);
+    }
+  }
+
+  factory CompletionListTokenDetailsParams.fromRequest(Request request) {
+    return new CompletionListTokenDetailsParams.fromJson(
+        new RequestDecoder(request), "params", request.params);
+  }
+
+  @override
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> result = {};
+    result["file"] = file;
+    return result;
+  }
+
+  @override
+  Request toRequest(String id) {
+    return new Request(id, "completion.listTokenDetails", toJson());
+  }
+
+  @override
+  String toString() => json.encode(toJson());
+
+  @override
+  bool operator ==(other) {
+    if (other is CompletionListTokenDetailsParams) {
+      return file == other.file;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, file.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+}
+
+/**
+ * completion.listTokenDetails result
+ *
+ * {
+ *   "tokens": List<TokenDetails>
+ * }
+ *
+ * Clients may not extend, implement or mix-in this class.
+ */
+class CompletionListTokenDetailsResult implements ResponseResult {
+  List<TokenDetails> _tokens;
+
+  /**
+   * A list of the file's scanned tokens including analysis information about
+   * them.
+   */
+  List<TokenDetails> get tokens => _tokens;
+
+  /**
+   * A list of the file's scanned tokens including analysis information about
+   * them.
+   */
+  void set tokens(List<TokenDetails> value) {
+    assert(value != null);
+    this._tokens = value;
+  }
+
+  CompletionListTokenDetailsResult(List<TokenDetails> tokens) {
+    this.tokens = tokens;
+  }
+
+  factory CompletionListTokenDetailsResult.fromJson(
+      JsonDecoder jsonDecoder, String jsonPath, Object json) {
+    if (json == null) {
+      json = {};
+    }
+    if (json is Map) {
+      List<TokenDetails> tokens;
+      if (json.containsKey("tokens")) {
+        tokens = jsonDecoder.decodeList(
+            jsonPath + ".tokens",
+            json["tokens"],
+            (String jsonPath, Object json) =>
+                new TokenDetails.fromJson(jsonDecoder, jsonPath, json));
+      } else {
+        throw jsonDecoder.mismatch(jsonPath, "tokens");
+      }
+      return new CompletionListTokenDetailsResult(tokens);
+    } else {
+      throw jsonDecoder.mismatch(
+          jsonPath, "completion.listTokenDetails result", json);
+    }
+  }
+
+  factory CompletionListTokenDetailsResult.fromResponse(Response response) {
+    return new CompletionListTokenDetailsResult.fromJson(
+        new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)),
+        "result",
+        response.result);
+  }
+
+  @override
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> result = {};
+    result["tokens"] =
+        tokens.map((TokenDetails value) => value.toJson()).toList();
+    return result;
+  }
+
+  @override
+  Response toResponse(String id) {
+    return new Response(id, result: toJson());
+  }
+
+  @override
+  String toString() => json.encode(toJson());
+
+  @override
+  bool operator ==(other) {
+    if (other is CompletionListTokenDetailsResult) {
+      return listEqual(
+          tokens, other.tokens, (TokenDetails a, TokenDetails b) => a == b);
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, tokens.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+}
+
+/**
  * completion.registerLibraryPaths params
  *
  * {
@@ -6344,7 +6594,7 @@
  *   "results": List<CompletionSuggestion>
  *   "isLast": bool
  *   "includedSuggestionSets": optional List<IncludedSuggestionSet>
- *   "includedSuggestionKinds": optional List<ElementKind>
+ *   "includedElementKinds": optional List<ElementKind>
  *   "includedSuggestionRelevanceTags": optional List<IncludedSuggestionRelevanceTag>
  * }
  *
@@ -6363,7 +6613,7 @@
 
   List<IncludedSuggestionSet> _includedSuggestionSets;
 
-  List<ElementKind> _includedSuggestionKinds;
+  List<ElementKind> _includedElementKinds;
 
   List<IncludedSuggestionRelevanceTag> _includedSuggestionRelevanceTags;
 
@@ -6453,8 +6703,6 @@
   }
 
   /**
-   * This field is experimental.
-   *
    * References to AvailableSuggestionSet objects previously sent to the
    * client. The client can include applicable names from the referenced
    * library in code completion suggestions.
@@ -6463,8 +6711,6 @@
       _includedSuggestionSets;
 
   /**
-   * This field is experimental.
-   *
    * References to AvailableSuggestionSet objects previously sent to the
    * client. The client can include applicable names from the referenced
    * library in code completion suggestions.
@@ -6474,28 +6720,22 @@
   }
 
   /**
-   * This field is experimental.
-   *
    * The client is expected to check this list against the ElementKind sent in
    * IncludedSuggestionSet to decide whether or not these symbols should should
    * be presented to the user.
    */
-  List<ElementKind> get includedSuggestionKinds => _includedSuggestionKinds;
+  List<ElementKind> get includedElementKinds => _includedElementKinds;
 
   /**
-   * This field is experimental.
-   *
    * The client is expected to check this list against the ElementKind sent in
    * IncludedSuggestionSet to decide whether or not these symbols should should
    * be presented to the user.
    */
-  void set includedSuggestionKinds(List<ElementKind> value) {
-    this._includedSuggestionKinds = value;
+  void set includedElementKinds(List<ElementKind> value) {
+    this._includedElementKinds = value;
   }
 
   /**
-   * This field is experimental.
-   *
    * The client is expected to check this list against the values of the field
    * relevanceTags of AvailableSuggestion to decide if the suggestion should be
    * given a different relevance than the IncludedSuggestionSet that contains
@@ -6509,8 +6749,6 @@
       _includedSuggestionRelevanceTags;
 
   /**
-   * This field is experimental.
-   *
    * The client is expected to check this list against the values of the field
    * relevanceTags of AvailableSuggestion to decide if the suggestion should be
    * given a different relevance than the IncludedSuggestionSet that contains
@@ -6528,7 +6766,7 @@
   CompletionResultsParams(String id, int replacementOffset,
       int replacementLength, List<CompletionSuggestion> results, bool isLast,
       {List<IncludedSuggestionSet> includedSuggestionSets,
-      List<ElementKind> includedSuggestionKinds,
+      List<ElementKind> includedElementKinds,
       List<IncludedSuggestionRelevanceTag> includedSuggestionRelevanceTags}) {
     this.id = id;
     this.replacementOffset = replacementOffset;
@@ -6536,7 +6774,7 @@
     this.results = results;
     this.isLast = isLast;
     this.includedSuggestionSets = includedSuggestionSets;
-    this.includedSuggestionKinds = includedSuggestionKinds;
+    this.includedElementKinds = includedElementKinds;
     this.includedSuggestionRelevanceTags = includedSuggestionRelevanceTags;
   }
 
@@ -6591,11 +6829,11 @@
                 new IncludedSuggestionSet.fromJson(
                     jsonDecoder, jsonPath, json));
       }
-      List<ElementKind> includedSuggestionKinds;
-      if (json.containsKey("includedSuggestionKinds")) {
-        includedSuggestionKinds = jsonDecoder.decodeList(
-            jsonPath + ".includedSuggestionKinds",
-            json["includedSuggestionKinds"],
+      List<ElementKind> includedElementKinds;
+      if (json.containsKey("includedElementKinds")) {
+        includedElementKinds = jsonDecoder.decodeList(
+            jsonPath + ".includedElementKinds",
+            json["includedElementKinds"],
             (String jsonPath, Object json) =>
                 new ElementKind.fromJson(jsonDecoder, jsonPath, json));
       }
@@ -6611,7 +6849,7 @@
       return new CompletionResultsParams(
           id, replacementOffset, replacementLength, results, isLast,
           includedSuggestionSets: includedSuggestionSets,
-          includedSuggestionKinds: includedSuggestionKinds,
+          includedElementKinds: includedElementKinds,
           includedSuggestionRelevanceTags: includedSuggestionRelevanceTags);
     } else {
       throw jsonDecoder.mismatch(jsonPath, "completion.results params", json);
@@ -6637,8 +6875,8 @@
           .map((IncludedSuggestionSet value) => value.toJson())
           .toList();
     }
-    if (includedSuggestionKinds != null) {
-      result["includedSuggestionKinds"] = includedSuggestionKinds
+    if (includedElementKinds != null) {
+      result["includedElementKinds"] = includedElementKinds
           .map((ElementKind value) => value.toJson())
           .toList();
     }
@@ -6669,7 +6907,7 @@
           isLast == other.isLast &&
           listEqual(includedSuggestionSets, other.includedSuggestionSets,
               (IncludedSuggestionSet a, IncludedSuggestionSet b) => a == b) &&
-          listEqual(includedSuggestionKinds, other.includedSuggestionKinds,
+          listEqual(includedElementKinds, other.includedElementKinds,
               (ElementKind a, ElementKind b) => a == b) &&
           listEqual(
               includedSuggestionRelevanceTags,
@@ -6690,7 +6928,7 @@
     hash = JenkinsSmiHash.combine(hash, results.hashCode);
     hash = JenkinsSmiHash.combine(hash, isLast.hashCode);
     hash = JenkinsSmiHash.combine(hash, includedSuggestionSets.hashCode);
-    hash = JenkinsSmiHash.combine(hash, includedSuggestionKinds.hashCode);
+    hash = JenkinsSmiHash.combine(hash, includedElementKinds.hashCode);
     hash =
         JenkinsSmiHash.combine(hash, includedSuggestionRelevanceTags.hashCode);
     return JenkinsSmiHash.finish(hash);
@@ -10065,6 +10303,7 @@
  * {
  *   "file": FilePath
  *   "elements": List<ImportedElements>
+ *   "offset": optional int
  * }
  *
  * Clients may not extend, implement or mix-in this class.
@@ -10074,6 +10313,8 @@
 
   List<ImportedElements> _elements;
 
+  int _offset;
+
   /**
    * The file in which the specified elements are to be made accessible.
    */
@@ -10100,9 +10341,29 @@
     this._elements = value;
   }
 
-  EditImportElementsParams(String file, List<ImportedElements> elements) {
+  /**
+   * The offset at which the specified elements need to be made accessible. If
+   * provided, this is used to guard against adding imports for text that would
+   * be inserted into a comment, string literal, or other location where the
+   * imports would not be necessary.
+   */
+  int get offset => _offset;
+
+  /**
+   * The offset at which the specified elements need to be made accessible. If
+   * provided, this is used to guard against adding imports for text that would
+   * be inserted into a comment, string literal, or other location where the
+   * imports would not be necessary.
+   */
+  void set offset(int value) {
+    this._offset = value;
+  }
+
+  EditImportElementsParams(String file, List<ImportedElements> elements,
+      {int offset}) {
     this.file = file;
     this.elements = elements;
+    this.offset = offset;
   }
 
   factory EditImportElementsParams.fromJson(
@@ -10127,7 +10388,11 @@
       } else {
         throw jsonDecoder.mismatch(jsonPath, "elements");
       }
-      return new EditImportElementsParams(file, elements);
+      int offset;
+      if (json.containsKey("offset")) {
+        offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
+      }
+      return new EditImportElementsParams(file, elements, offset: offset);
     } else {
       throw jsonDecoder.mismatch(jsonPath, "edit.importElements params", json);
     }
@@ -10144,6 +10409,9 @@
     result["file"] = file;
     result["elements"] =
         elements.map((ImportedElements value) => value.toJson()).toList();
+    if (offset != null) {
+      result["offset"] = offset;
+    }
     return result;
   }
 
@@ -10160,7 +10428,8 @@
     if (other is EditImportElementsParams) {
       return file == other.file &&
           listEqual(elements, other.elements,
-              (ImportedElements a, ImportedElements b) => a == b);
+              (ImportedElements a, ImportedElements b) => a == b) &&
+          offset == other.offset;
     }
     return false;
   }
@@ -10170,6 +10439,7 @@
     int hash = 0;
     hash = JenkinsSmiHash.combine(hash, file.hashCode);
     hash = JenkinsSmiHash.combine(hash, elements.hashCode);
+    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 }
@@ -16076,6 +16346,7 @@
  * {
  *   "id": int
  *   "relevance": int
+ *   "displayUri": optional String
  * }
  *
  * Clients may not extend, implement or mix-in this class.
@@ -16085,6 +16356,8 @@
 
   int _relevance;
 
+  String _displayUri;
+
   /**
    * Clients should use it to access the set of precomputed completions to be
    * displayed to the user.
@@ -16115,9 +16388,34 @@
     this._relevance = value;
   }
 
-  IncludedSuggestionSet(int id, int relevance) {
+  /**
+   * The optional string that should be displayed instead of the uri of the
+   * referenced AvailableSuggestionSet.
+   *
+   * For example libraries in the "test" directory of a package have only
+   * "file://" URIs, so are usually long, and don't look nice, but actual
+   * import directives will use relative URIs, which are short, so we probably
+   * want to display such relative URIs to the user.
+   */
+  String get displayUri => _displayUri;
+
+  /**
+   * The optional string that should be displayed instead of the uri of the
+   * referenced AvailableSuggestionSet.
+   *
+   * For example libraries in the "test" directory of a package have only
+   * "file://" URIs, so are usually long, and don't look nice, but actual
+   * import directives will use relative URIs, which are short, so we probably
+   * want to display such relative URIs to the user.
+   */
+  void set displayUri(String value) {
+    this._displayUri = value;
+  }
+
+  IncludedSuggestionSet(int id, int relevance, {String displayUri}) {
     this.id = id;
     this.relevance = relevance;
+    this.displayUri = displayUri;
   }
 
   factory IncludedSuggestionSet.fromJson(
@@ -16139,7 +16437,12 @@
       } else {
         throw jsonDecoder.mismatch(jsonPath, "relevance");
       }
-      return new IncludedSuggestionSet(id, relevance);
+      String displayUri;
+      if (json.containsKey("displayUri")) {
+        displayUri = jsonDecoder.decodeString(
+            jsonPath + ".displayUri", json["displayUri"]);
+      }
+      return new IncludedSuggestionSet(id, relevance, displayUri: displayUri);
     } else {
       throw jsonDecoder.mismatch(jsonPath, "IncludedSuggestionSet", json);
     }
@@ -16150,6 +16453,9 @@
     Map<String, dynamic> result = {};
     result["id"] = id;
     result["relevance"] = relevance;
+    if (displayUri != null) {
+      result["displayUri"] = displayUri;
+    }
     return result;
   }
 
@@ -16159,7 +16465,9 @@
   @override
   bool operator ==(other) {
     if (other is IncludedSuggestionSet) {
-      return id == other.id && relevance == other.relevance;
+      return id == other.id &&
+          relevance == other.relevance &&
+          displayUri == other.displayUri;
     }
     return false;
   }
@@ -16169,6 +16477,7 @@
     int hash = 0;
     hash = JenkinsSmiHash.combine(hash, id.hashCode);
     hash = JenkinsSmiHash.combine(hash, relevance.hashCode);
+    hash = JenkinsSmiHash.combine(hash, displayUri.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 }
@@ -21260,6 +21569,142 @@
 }
 
 /**
+ * TokenDetails
+ *
+ * {
+ *   "lexeme": String
+ *   "type": optional String
+ *   "validElementKinds": optional List<String>
+ * }
+ *
+ * Clients may not extend, implement or mix-in this class.
+ */
+class TokenDetails implements HasToJson {
+  String _lexeme;
+
+  String _type;
+
+  List<String> _validElementKinds;
+
+  /**
+   * The token's lexeme.
+   */
+  String get lexeme => _lexeme;
+
+  /**
+   * The token's lexeme.
+   */
+  void set lexeme(String value) {
+    assert(value != null);
+    this._lexeme = value;
+  }
+
+  /**
+   * A unique id for the type of the identifier. Omitted if the token is not an
+   * identifier in a reference position.
+   */
+  String get type => _type;
+
+  /**
+   * A unique id for the type of the identifier. Omitted if the token is not an
+   * identifier in a reference position.
+   */
+  void set type(String value) {
+    this._type = value;
+  }
+
+  /**
+   * An indication of whether this token is in a declaration or reference
+   * position. (If no other purpose is found for this field then it should be
+   * renamed and converted to a boolean value.) Omitted if the token is not an
+   * identifier.
+   */
+  List<String> get validElementKinds => _validElementKinds;
+
+  /**
+   * An indication of whether this token is in a declaration or reference
+   * position. (If no other purpose is found for this field then it should be
+   * renamed and converted to a boolean value.) Omitted if the token is not an
+   * identifier.
+   */
+  void set validElementKinds(List<String> value) {
+    this._validElementKinds = value;
+  }
+
+  TokenDetails(String lexeme, {String type, List<String> validElementKinds}) {
+    this.lexeme = lexeme;
+    this.type = type;
+    this.validElementKinds = validElementKinds;
+  }
+
+  factory TokenDetails.fromJson(
+      JsonDecoder jsonDecoder, String jsonPath, Object json) {
+    if (json == null) {
+      json = {};
+    }
+    if (json is Map) {
+      String lexeme;
+      if (json.containsKey("lexeme")) {
+        lexeme = jsonDecoder.decodeString(jsonPath + ".lexeme", json["lexeme"]);
+      } else {
+        throw jsonDecoder.mismatch(jsonPath, "lexeme");
+      }
+      String type;
+      if (json.containsKey("type")) {
+        type = jsonDecoder.decodeString(jsonPath + ".type", json["type"]);
+      }
+      List<String> validElementKinds;
+      if (json.containsKey("validElementKinds")) {
+        validElementKinds = jsonDecoder.decodeList(
+            jsonPath + ".validElementKinds",
+            json["validElementKinds"],
+            jsonDecoder.decodeString);
+      }
+      return new TokenDetails(lexeme,
+          type: type, validElementKinds: validElementKinds);
+    } else {
+      throw jsonDecoder.mismatch(jsonPath, "TokenDetails", json);
+    }
+  }
+
+  @override
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> result = {};
+    result["lexeme"] = lexeme;
+    if (type != null) {
+      result["type"] = type;
+    }
+    if (validElementKinds != null) {
+      result["validElementKinds"] = validElementKinds;
+    }
+    return result;
+  }
+
+  @override
+  String toString() => json.encode(toJson());
+
+  @override
+  bool operator ==(other) {
+    if (other is TokenDetails) {
+      return lexeme == other.lexeme &&
+          type == other.type &&
+          listEqual(validElementKinds, other.validElementKinds,
+              (String a, String b) => a == b);
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, lexeme.hashCode);
+    hash = JenkinsSmiHash.combine(hash, type.hashCode);
+    hash = JenkinsSmiHash.combine(hash, validElementKinds.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+}
+
+/**
  * TypeHierarchyItem
  *
  * {
diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart
index 745f48d..c60be02 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -18,7 +18,6 @@
 import 'package:analysis_server/src/channel/channel.dart';
 import 'package:analysis_server/src/computer/computer_highlights.dart';
 import 'package:analysis_server/src/computer/computer_highlights2.dart';
-import 'package:analysis_server/src/computer/computer_outline.dart';
 import 'package:analysis_server/src/computer/new_notifications.dart';
 import 'package:analysis_server/src/context_manager.dart';
 import 'package:analysis_server/src/domain_analysis.dart';
@@ -62,8 +61,6 @@
 import 'package:analyzer/src/dart/analysis/status.dart' as nd;
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/sdk.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/source_io.dart';
 import 'package:analyzer/src/generated/utilities_general.dart';
 import 'package:analyzer/src/plugin/resolver_provider.dart';
 import 'package:analyzer/src/services/available_declarations.dart';
@@ -295,15 +292,6 @@
     analysisDriverScheduler.notify(null);
   }
 
-  /// Notify the declarations tracker that the file with the given [path] was
-  /// changed - added, updated, or removed.  Schedule processing of the file.
-  void notifyDeclarationsTracker(String path) {
-    if (declarationsTracker != null) {
-      declarationsTracker.changeFile(path);
-      analysisDriverScheduler.notify(null);
-    }
-  }
-
   void disposeDeclarationsTracker() {
     declarationsTracker = null;
     analysisDriverScheduler.outOfBandWorker = null;
@@ -398,6 +386,15 @@
         resourceProvider.pathContext.normalize(path) == path;
   }
 
+  /// Notify the declarations tracker that the file with the given [path] was
+  /// changed - added, updated, or removed.  Schedule processing of the file.
+  void notifyDeclarationsTracker(String path) {
+    if (declarationsTracker != null) {
+      declarationsTracker.changeFile(path);
+      analysisDriverScheduler.notify(null);
+    }
+  }
+
   /// Read all files, resolve all URIs, and perform required analysis in
   /// all current analysis drivers.
   void reanalyze() {
@@ -605,9 +602,7 @@
       });
     }
 
-    if (options.enableUXExperiment2) {
-      detachableFileSystemManager?.dispose();
-    }
+    detachableFileSystemManager?.dispose();
 
     // Defer closing the channel and shutting down the instrumentation server so
     // that the shutdown response can be sent and logged.
@@ -777,15 +772,6 @@
 
   /// Whether to enable parsing via the Fasta parser.
   bool useFastaParser = true;
-
-  /// User Experience, Experiment #1. This experiment changes the notion of
-  /// what analysis roots are and priority files: the analysis root is set to be
-  /// the priority files' containing directory.
-  bool enableUXExperiment1 = false;
-
-  /// User Experience, Experiment #2. This experiment introduces the notion of
-  /// an intermittent file system.
-  bool enableUXExperiment2 = false;
 }
 
 class ServerContextManagerCallbacks extends ContextManagerCallbacks {
@@ -898,12 +884,7 @@
         if (analysisServer._hasAnalysisServiceSubscription(
             AnalysisService.OUTLINE, path)) {
           _runDelayed(() {
-            SourceKind sourceKind =
-                unit.directives.any((d) => d is PartOfDirective)
-                    ? SourceKind.PART
-                    : SourceKind.LIBRARY;
-            sendAnalysisNotificationOutline(
-                analysisServer, path, result.lineInfo, sourceKind, unit);
+            sendAnalysisNotificationOutline(analysisServer, result);
           });
         }
         if (analysisServer._hasAnalysisServiceSubscription(
@@ -915,8 +896,7 @@
         if (analysisServer._hasFlutterServiceSubscription(
             FlutterService.OUTLINE, path)) {
           _runDelayed(() {
-            sendFlutterNotificationOutline(analysisServer, path, result.content,
-                result.lineInfo, unit, result.typeProvider);
+            sendFlutterNotificationOutline(analysisServer, result);
           });
         }
         // TODO(scheglov) Implement notifications for AnalysisService.IMPLEMENTED.
@@ -1014,20 +994,6 @@
     }
   }
 
-  String _computeLibraryName(CompilationUnit unit) {
-    for (Directive directive in unit.directives) {
-      if (directive is LibraryDirective && directive.name != null) {
-        return directive.name.name;
-      }
-    }
-    for (Directive directive in unit.directives) {
-      if (directive is PartOfDirective && directive.libraryName != null) {
-        return directive.libraryName.name;
-      }
-    }
-    return null;
-  }
-
   server.AnalysisNavigationParams _computeNavigationParams(
       String path, CompilationUnit unit) {
     NavigationCollectorImpl collector = new NavigationCollectorImpl();
@@ -1043,29 +1009,6 @@
     return collector.allOccurrences;
   }
 
-  // ignore: unused_element
-  server.AnalysisOutlineParams _computeOutlineParams(
-      String path, CompilationUnit unit, LineInfo lineInfo) {
-    // compute FileKind
-    SourceKind sourceKind = unit.directives.any((d) => d is PartOfDirective)
-        ? SourceKind.PART
-        : SourceKind.LIBRARY;
-    server.FileKind fileKind = server.FileKind.LIBRARY;
-    if (sourceKind == SourceKind.LIBRARY) {
-      fileKind = server.FileKind.LIBRARY;
-    } else if (sourceKind == SourceKind.PART) {
-      fileKind = server.FileKind.PART;
-    }
-    // compute library name
-    String libraryName = _computeLibraryName(unit);
-    // compute Outline
-    DartUnitOutlineComputer computer =
-        new DartUnitOutlineComputer(path, lineInfo, unit);
-    server.Outline outline = computer.compute();
-    return new server.AnalysisOutlineParams(path, fileKind, outline,
-        libraryName: libraryName);
-  }
-
   /// Run [f] in a new [Future].
   ///
   /// This method is used to delay sending notifications. If there is a more
diff --git a/pkg/analysis_server/lib/src/analysis_server_abstract.dart b/pkg/analysis_server/lib/src/analysis_server_abstract.dart
index 50834b3..3ed2774 100644
--- a/pkg/analysis_server/lib/src/analysis_server_abstract.dart
+++ b/pkg/analysis_server/lib/src/analysis_server_abstract.dart
@@ -70,7 +70,8 @@
     '**/*.${AnalysisEngine.SUFFIX_HTM}',
     '**/${AnalysisEngine.ANALYSIS_OPTIONS_FILE}',
     '**/${AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE}',
-    '**/${AnalysisEngine.PUBSPEC_YAML_FILE}'
+    '**/${AnalysisEngine.PUBSPEC_YAML_FILE}',
+    '**/${AnalysisEngine.ANDROID_MANIFEST_FILE}'
   ];
 
   /// The [ResourceProvider] using which paths are converted into [Resource]s.
diff --git a/pkg/analysis_server/lib/src/computer/computer_folding.dart b/pkg/analysis_server/lib/src/computer/computer_folding.dart
index 4edf2fc..9326583 100644
--- a/pkg/analysis_server/lib/src/computer/computer_folding.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_folding.dart
@@ -107,6 +107,7 @@
  */
 class _DartUnitFoldingComputerVisitor extends RecursiveAstVisitor<void> {
   final DartUnitFoldingComputer _computer;
+
   _DartUnitFoldingComputerVisitor(this._computer);
 
   @override
@@ -191,13 +192,6 @@
   }
 
   @override
-  void visitMapLiteral(MapLiteral node) {
-    _computer._addRegion(
-        node.leftBracket.end, node.rightBracket.offset, FoldingKind.LITERAL);
-    super.visitMapLiteral(node);
-  }
-
-  @override
   void visitMethodDeclaration(MethodDeclaration node) {
     _computer._addRegionForAnnotations(node.metadata);
     super.visitMethodDeclaration(node);
@@ -230,4 +224,11 @@
     _computer._recordDirective(node);
     super.visitPartOfDirective(node);
   }
+
+  @override
+  void visitSetOrMapLiteral(SetOrMapLiteral node) {
+    _computer._addRegion(
+        node.leftBracket.end, node.rightBracket.offset, FoldingKind.LITERAL);
+    super.visitSetOrMapLiteral(node);
+  }
 }
diff --git a/pkg/analysis_server/lib/src/computer/computer_highlights.dart b/pkg/analysis_server/lib/src/computer/computer_highlights.dart
index 0076909..7c150bab 100644
--- a/pkg/analysis_server/lib/src/computer/computer_highlights.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_highlights.dart
@@ -487,14 +487,6 @@
   }
 
   @override
-  void visitForEachStatement(ForEachStatement node) {
-    computer._addRegion_token(node.awaitKeyword, HighlightRegionType.BUILT_IN);
-    computer._addRegion_token(node.forKeyword, HighlightRegionType.KEYWORD);
-    computer._addRegion_token(node.inKeyword, HighlightRegionType.KEYWORD);
-    super.visitForEachStatement(node);
-  }
-
-  @override
   void visitForElement(ForElement node) {
     computer._addRegion_token(node.awaitKeyword, HighlightRegionType.BUILT_IN);
     computer._addRegion_token(node.forKeyword, HighlightRegionType.KEYWORD);
@@ -503,15 +495,9 @@
 
   @override
   void visitForStatement(ForStatement node) {
-    computer._addRegion_token(node.forKeyword, HighlightRegionType.KEYWORD);
-    super.visitForStatement(node);
-  }
-
-  @override
-  void visitForStatement2(ForStatement2 node) {
     computer._addRegion_token(node.awaitKeyword, HighlightRegionType.BUILT_IN);
     computer._addRegion_token(node.forKeyword, HighlightRegionType.KEYWORD);
-    super.visitForStatement2(node);
+    super.visitForStatement(node);
   }
 
   @override
@@ -615,27 +601,6 @@
   }
 
   @override
-  void visitListLiteral2(ListLiteral2 node) {
-    computer._addRegion_node(node, HighlightRegionType.LITERAL_LIST);
-    computer._addRegion_token(node.constKeyword, HighlightRegionType.KEYWORD);
-    super.visitListLiteral2(node);
-  }
-
-  @override
-  void visitMapLiteral(MapLiteral node) {
-    computer._addRegion_node(node, HighlightRegionType.LITERAL_MAP);
-    computer._addRegion_token(node.constKeyword, HighlightRegionType.KEYWORD);
-    super.visitMapLiteral(node);
-  }
-
-  @override
-  void visitMapLiteral2(MapLiteral2 node) {
-    computer._addRegion_node(node, HighlightRegionType.LITERAL_MAP);
-    computer._addRegion_token(node.constKeyword, HighlightRegionType.KEYWORD);
-    super.visitMapLiteral2(node);
-  }
-
-  @override
   void visitMethodDeclaration(MethodDeclaration node) {
     computer._addRegion_token(
         node.externalKeyword, HighlightRegionType.BUILT_IN);
@@ -700,17 +665,17 @@
   }
 
   @override
-  void visitSetLiteral(SetLiteral node) {
+  void visitSetOrMapLiteral(SetOrMapLiteral node) {
+    if (node.isMap) {
+      computer._addRegion_node(node, HighlightRegionType.LITERAL_MAP);
+      // TODO(brianwilkerson) Add a highlight region for set literals. This
+      //  would be a breaking change, but would be consistent with list and map
+      //  literals.
+//    } else if (node.isSet) {
 //    computer._addRegion_node(node, HighlightRegionType.LITERAL_SET);
+    }
     computer._addRegion_token(node.constKeyword, HighlightRegionType.KEYWORD);
-    super.visitSetLiteral(node);
-  }
-
-  @override
-  void visitSetLiteral2(SetLiteral2 node) {
-//    computer._addRegion_node(node, HighlightRegionType.LITERAL_SET);
-    computer._addRegion_token(node.constKeyword, HighlightRegionType.KEYWORD);
-    super.visitSetLiteral2(node);
+    super.visitSetOrMapLiteral(node);
   }
 
   @override
diff --git a/pkg/analysis_server/lib/src/computer/computer_highlights2.dart b/pkg/analysis_server/lib/src/computer/computer_highlights2.dart
index 1f0326f..fe52ab6 100644
--- a/pkg/analysis_server/lib/src/computer/computer_highlights2.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_highlights2.dart
@@ -578,14 +578,6 @@
   }
 
   @override
-  void visitForEachStatement(ForEachStatement node) {
-    computer._addRegion_token(node.awaitKeyword, HighlightRegionType.BUILT_IN);
-    computer._addRegion_token(node.forKeyword, HighlightRegionType.KEYWORD);
-    computer._addRegion_token(node.inKeyword, HighlightRegionType.KEYWORD);
-    super.visitForEachStatement(node);
-  }
-
-  @override
   void visitForElement(ForElement node) {
     computer._addRegion_token(node.awaitKeyword, HighlightRegionType.BUILT_IN);
     computer._addRegion_token(node.forKeyword, HighlightRegionType.KEYWORD);
@@ -594,15 +586,9 @@
 
   @override
   void visitForStatement(ForStatement node) {
-    computer._addRegion_token(node.forKeyword, HighlightRegionType.KEYWORD);
-    super.visitForStatement(node);
-  }
-
-  @override
-  void visitForStatement2(ForStatement2 node) {
     computer._addRegion_token(node.awaitKeyword, HighlightRegionType.BUILT_IN);
     computer._addRegion_token(node.forKeyword, HighlightRegionType.KEYWORD);
-    super.visitForStatement2(node);
+    super.visitForStatement(node);
   }
 
   @override
@@ -712,27 +698,6 @@
   }
 
   @override
-  void visitListLiteral2(ListLiteral2 node) {
-    computer._addRegion_node(node, HighlightRegionType.LITERAL_LIST);
-    computer._addRegion_token(node.constKeyword, HighlightRegionType.KEYWORD);
-    super.visitListLiteral2(node);
-  }
-
-  @override
-  void visitMapLiteral(MapLiteral node) {
-    computer._addRegion_node(node, HighlightRegionType.LITERAL_MAP);
-    computer._addRegion_token(node.constKeyword, HighlightRegionType.KEYWORD);
-    super.visitMapLiteral(node);
-  }
-
-  @override
-  void visitMapLiteral2(MapLiteral2 node) {
-    computer._addRegion_node(node, HighlightRegionType.LITERAL_MAP);
-    computer._addRegion_token(node.constKeyword, HighlightRegionType.KEYWORD);
-    super.visitMapLiteral2(node);
-  }
-
-  @override
   void visitMethodDeclaration(MethodDeclaration node) {
     computer._addRegion_token(
         node.externalKeyword, HighlightRegionType.BUILT_IN);
@@ -797,17 +762,17 @@
   }
 
   @override
-  void visitSetLiteral(SetLiteral node) {
+  void visitSetOrMapLiteral(SetOrMapLiteral node) {
+    if (node.isMap) {
+      computer._addRegion_node(node, HighlightRegionType.LITERAL_MAP);
+      // TODO(brianwilkerson) Add a highlight region for set literals. This
+      //  would be a breaking change, but would be consistent with list and map
+      //  literals.
+//    } else if (node.isSet) {
 //    computer._addRegion_node(node, HighlightRegionType.LITERAL_SET);
+    }
     computer._addRegion_token(node.constKeyword, HighlightRegionType.KEYWORD);
-    super.visitSetLiteral(node);
-  }
-
-  @override
-  void visitSetLiteral2(SetLiteral2 node) {
-//    computer._addRegion_node(node, HighlightRegionType.LITERAL_SET);
-    computer._addRegion_token(node.constKeyword, HighlightRegionType.KEYWORD);
-    super.visitSetLiteral2(node);
+    super.visitSetOrMapLiteral(node);
   }
 
   @override
diff --git a/pkg/analysis_server/lib/src/computer/computer_hover.dart b/pkg/analysis_server/lib/src/computer/computer_hover.dart
index 3af0fbd..4229e9c 100644
--- a/pkg/analysis_server/lib/src/computer/computer_hover.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_hover.dart
@@ -10,16 +10,17 @@
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/dart/ast/element_locator.dart';
 import 'package:analyzer/src/dart/ast/utilities.dart';
-import 'package:analyzer/src/util/comment.dart';
+import 'package:analyzer/src/dartdoc/dartdoc_directive_info.dart';
 
 /**
  * A computer for the hover at the specified offset of a Dart [CompilationUnit].
  */
 class DartUnitHoverComputer {
+  final DartdocDirectiveInfo _dartdocInfo;
   final CompilationUnit _unit;
   final int _offset;
 
-  DartUnitHoverComputer(this._unit, this._offset);
+  DartUnitHoverComputer(this._dartdocInfo, this._unit, this._offset);
 
   /**
    * Returns the computed hover, maybe `null`.
@@ -76,7 +77,7 @@
           }
         }
         // documentation
-        hover.dartdoc = computeDocumentation(element);
+        hover.dartdoc = computeDocumentation(_dartdocInfo, element);
       }
       // parameter
       hover.parameter = _safeToString(expression.staticParameterElement);
@@ -104,7 +105,8 @@
     return null;
   }
 
-  static String computeDocumentation(Element element) {
+  static String computeDocumentation(
+      DartdocDirectiveInfo dartdocInfo, Element element) {
     // TODO(dantup) We're reusing this in parameter information - move it somewhere shared?
     if (element is FieldFormalParameterElement) {
       element = (element as FieldFormalParameterElement).field;
@@ -119,7 +121,7 @@
     }
     // The documentation of the element itself.
     if (element.documentationComment != null) {
-      return getDartDocPlainText(element.documentationComment);
+      return dartdocInfo.processDartdoc(element.documentationComment);
     }
     // Look for documentation comments of overridden members.
     OverriddenElements overridden = findOverriddenElements(element);
@@ -129,7 +131,7 @@
       String rawDoc = superElement.documentationComment;
       if (rawDoc != null) {
         Element interfaceClass = superElement.enclosingElement;
-        return getDartDocPlainText(rawDoc) +
+        return dartdocInfo.processDartdoc(rawDoc) +
             '\n\nCopied from `${interfaceClass.displayName}`.';
       }
     }
diff --git a/pkg/analysis_server/lib/src/computer/computer_outline.dart b/pkg/analysis_server/lib/src/computer/computer_outline.dart
index c11bac0..7b32719 100644
--- a/pkg/analysis_server/lib/src/computer/computer_outline.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_outline.dart
@@ -3,33 +3,32 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analysis_server/src/collections.dart';
-import 'package:analysis_server/src/utilities/flutter.dart' as flutter;
+import 'package:analysis_server/src/utilities/flutter.dart';
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart' as engine;
 import 'package:analyzer/dart/element/type.dart' as engine;
 import 'package:analyzer/source/line_info.dart';
-import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
 
 /**
  * A computer for [CompilationUnit] outline.
  */
 class DartUnitOutlineComputer {
-  final String file;
-  final CompilationUnit unit;
-  final LineInfo lineInfo;
+  final ResolvedUnitResult resolvedUnit;
   final bool withBasicFlutter;
+  final Flutter flutter;
 
-  DartUnitOutlineComputer(this.file, this.lineInfo, this.unit,
-      {this.withBasicFlutter: false});
+  DartUnitOutlineComputer(this.resolvedUnit, {this.withBasicFlutter: false})
+      : flutter = Flutter.of(resolvedUnit.session);
 
   /**
    * Returns the computed outline, not `null`.
    */
   Outline compute() {
     List<Outline> unitContents = <Outline>[];
-    for (CompilationUnitMember unitMember in unit.declarations) {
+    for (CompilationUnitMember unitMember in resolvedUnit.unit.declarations) {
       if (unitMember is ClassDeclaration) {
         unitContents.add(_newClassOutline(
             unitMember, _outlinesForMembers(unitMember.members)));
@@ -85,10 +84,11 @@
   }
 
   Location _getLocationOffsetLength(int offset, int length) {
-    CharacterLocation lineLocation = lineInfo.getLocation(offset);
+    CharacterLocation lineLocation = resolvedUnit.lineInfo.getLocation(offset);
     int startLine = lineLocation.lineNumber;
     int startColumn = lineLocation.columnNumber;
-    return new Location(file, offset, length, startLine, startColumn);
+    return new Location(
+        resolvedUnit.path, offset, length, startLine, startColumn);
   }
 
   Outline _newClassOutline(ClassDeclaration node, List<Outline> classContents) {
@@ -229,10 +229,10 @@
 
   Outline _newGenericTypeAliasOutline(GenericTypeAlias node) {
     var functionType = node.functionType;
-    TypeAnnotation returnType = functionType.returnType;
+    TypeAnnotation returnType = functionType?.returnType;
     SimpleIdentifier nameNode = node.name;
     String name = nameNode.name;
-    FormalParameterList parameters = functionType.parameters;
+    FormalParameterList parameters = functionType?.parameters;
     String parametersStr = _safeToSource(parameters);
     String returnTypeStr = _safeToSource(returnType);
     Element element = new Element(
@@ -297,8 +297,8 @@
   Outline _newUnitOutline(List<Outline> unitContents) {
     Element element = new Element(
         ElementKind.COMPILATION_UNIT, '<unit>', Element.makeFlags(),
-        location: _getLocationNode(unit));
-    return _nodeOutline(unit, element, unitContents);
+        location: _getLocationNode(resolvedUnit.unit));
+    return _nodeOutline(resolvedUnit.unit, element, unitContents);
   }
 
   Outline _newVariableOutline(String typeName, ElementKind kind,
@@ -434,12 +434,13 @@
 
   @override
   visitInstanceCreationExpression(InstanceCreationExpression node) {
-    if (outlineComputer.withBasicFlutter && flutter.isWidgetCreation(node)) {
+    if (outlineComputer.withBasicFlutter &&
+        outlineComputer.flutter.isWidgetCreation(node)) {
       List<Outline> children = <Outline>[];
       node.argumentList
           .accept(new _FunctionBodyOutlinesVisitor(outlineComputer, children));
 
-      String text = flutter.getWidgetPresentationText(node);
+      String text = outlineComputer.flutter.getWidgetPresentationText(node);
       Element element = new Element(ElementKind.CONSTRUCTOR_INVOCATION, text, 0,
           location: outlineComputer._getLocationOffsetLength(node.offset, 0));
 
diff --git a/pkg/analysis_server/lib/src/computer/computer_signature.dart b/pkg/analysis_server/lib/src/computer/computer_signature.dart
index 2dd950c..81f8cea 100644
--- a/pkg/analysis_server/lib/src/computer/computer_signature.dart
+++ b/pkg/analysis_server/lib/src/computer/computer_signature.dart
@@ -10,13 +10,16 @@
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/dart/ast/element_locator.dart';
 import 'package:analyzer/src/dart/ast/utilities.dart';
+import 'package:analyzer/src/dartdoc/dartdoc_directive_info.dart';
 
 /**
  * A computer for the signature at the specified offset of a Dart [CompilationUnit].
  */
 class DartUnitSignatureComputer {
+  final DartdocDirectiveInfo _dartdocInfo;
   final AstNode _node;
-  DartUnitSignatureComputer(CompilationUnit _unit, int _offset)
+  DartUnitSignatureComputer(
+      this._dartdocInfo, CompilationUnit _unit, int _offset)
       : _node = new NodeLocator(_offset).searchWithin(_unit);
 
   bool get offsetIsValid => _node != null;
@@ -68,7 +71,8 @@
         execElement.parameters.map((p) => _convertParam(p)).toList();
 
     return new AnalysisGetSignatureResult(name, parameters,
-        dartdoc: DartUnitHoverComputer.computeDocumentation(execElement));
+        dartdoc: DartUnitHoverComputer.computeDocumentation(
+            _dartdocInfo, execElement));
   }
 
   ParameterInfo _convertParam(ParameterElement param) {
diff --git a/pkg/analysis_server/lib/src/computer/imported_elements_computer.dart b/pkg/analysis_server/lib/src/computer/imported_elements_computer.dart
index a587098..5271020 100644
--- a/pkg/analysis_server/lib/src/computer/imported_elements_computer.dart
+++ b/pkg/analysis_server/lib/src/computer/imported_elements_computer.dart
@@ -39,11 +39,29 @@
    * Compute and return the list of imported elements.
    */
   List<ImportedElements> compute() {
+    if (_regionIncludesDirectives()) {
+      return const <ImportedElements>[];
+    }
     _Visitor visitor =
         new _Visitor(unit.declaredElement.library, offset, offset + length);
     unit.accept(visitor);
     return visitor.importedElements.values.toList();
   }
+
+  /**
+   * Return `true` if the region being copied includes any directives. This
+   * really only needs to check for import and export directives, but excluding
+   * other directives is unlikely to hurt the UX.
+   */
+  bool _regionIncludesDirectives() {
+    NodeList<Directive> directives = unit.directives;
+    if (directives.isEmpty) {
+      return false;
+    }
+    // This might be overly restrictive if there are directives after the first
+    // declaration, but that should be a rare case given that it's invalid.
+    return offset < directives.last.end;
+  }
 }
 
 /**
@@ -99,14 +117,11 @@
         String prefix = '';
         AstNode parent = node.parent;
         if (parent is PrefixedIdentifier && parent.identifier == node) {
-          SimpleIdentifier prefixIdentifier = parent.prefix;
-          if (prefixIdentifier.offset <= endOffset &&
-              prefixIdentifier.end >= startOffset) {
-            Element prefixElement = prefixIdentifier.staticElement;
-            if (prefixElement is PrefixElement) {
-              prefix = prefixElement.name;
-            }
-          }
+          prefix = _getPrefixFrom(parent.prefix);
+        } else if (parent is MethodInvocation &&
+            parent.methodName == node &&
+            parent.target is SimpleIdentifier) {
+          prefix = _getPrefixFrom(parent.target);
         }
         String key = '$prefix;$path';
         ImportedElements elements = importedElements.putIfAbsent(
@@ -120,6 +135,16 @@
     }
   }
 
+  String _getPrefixFrom(SimpleIdentifier identifier) {
+    if (identifier.offset <= endOffset && identifier.end >= startOffset) {
+      Element prefixElement = identifier.staticElement;
+      if (prefixElement is PrefixElement) {
+        return prefixElement.name;
+      }
+    }
+    return '';
+  }
+
   static bool _isConstructorDeclarationReturnType(SimpleIdentifier node) {
     AstNode parent = node.parent;
     return parent is ConstructorDeclaration && parent.returnType == node;
diff --git a/pkg/analysis_server/lib/src/context_manager.dart b/pkg/analysis_server/lib/src/context_manager.dart
index b7312d6..5066368 100644
--- a/pkg/analysis_server/lib/src/context_manager.dart
+++ b/pkg/analysis_server/lib/src/context_manager.dart
@@ -23,6 +23,7 @@
 import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/source_io.dart';
+import 'package:analyzer/src/manifest/manifest_validator.dart';
 import 'package:analyzer/src/plugin/resolver_provider.dart';
 import 'package:analyzer/src/pubspec/pubspec_validator.dart';
 import 'package:analyzer/src/source/package_map_resolver.dart';
@@ -394,6 +395,11 @@
   static const String LIB_DIR_NAME = 'lib';
 
   /**
+   * File name of Android manifest files.
+   */
+  static const String MANIFEST_NAME = 'AndroidManifest.xml';
+
+  /**
    * File name of pubspec files.
    */
   static const String PUBSPEC_NAME = 'pubspec.yaml';
@@ -846,11 +852,36 @@
     try {
       String content = _readFile(path);
       LineInfo lineInfo = _computeLineInfo(content);
-      List<AnalysisError> errors =
-          GenerateOptionsErrorsTask.analyzeAnalysisOptions(
-              resourceProvider.getFile(path).createSource(),
-              content,
-              driver.sourceFactory);
+      List<AnalysisError> errors = analyzeAnalysisOptions(
+          resourceProvider.getFile(path).createSource(),
+          content,
+          driver.sourceFactory);
+      AnalyzerConverter converter = new AnalyzerConverter();
+      convertedErrors = converter.convertAnalysisErrors(errors,
+          lineInfo: lineInfo, options: driver.analysisOptions);
+    } catch (exception) {
+      // If the file cannot be analyzed, fall through to clear any previous
+      // errors.
+    }
+    callbacks.notificationManager.recordAnalysisErrors(
+        NotificationManager.serverId,
+        path,
+        convertedErrors ?? <protocol.AnalysisError>[]);
+  }
+
+  /**
+   * Use the given analysis [driver] to analyze the content of the 
+   * AndroidManifest file at the given [path].
+   */
+  void _analyzeManifestFile(AnalysisDriver driver, String path) {
+    List<protocol.AnalysisError> convertedErrors;
+    try {
+      String content = _readFile(path);
+      ManifestValidator validator =
+          new ManifestValidator(resourceProvider.getFile(path).createSource());
+      LineInfo lineInfo = _computeLineInfo(content);
+      List<AnalysisError> errors = validator.validate(
+          content, driver.analysisOptions.chromeOsManifestChecks);
       AnalyzerConverter converter = new AnalyzerConverter();
       convertedErrors = converter.convertAnalysisErrors(errors,
           lineInfo: lineInfo, options: driver.analysisOptions);
@@ -907,6 +938,19 @@
     }
   }
 
+  void _checkForManifestUpdate(String path, ContextInfo info) {
+    if (_isManifest(path)) {
+      AnalysisDriver driver = info.analysisDriver;
+      if (driver == null) {
+        // I suspect that this happens as a result of a race condition: server
+        // has determined that the file (at [path]) is in a context, but hasn't
+        // yet created a driver for that context.
+        return;
+      }
+      _analyzeManifestFile(driver, path);
+    }
+  }
+
   void _checkForPackagespecUpdate(String path, ContextInfo info) {
     // Check to see if this is the .packages file for this context and if so,
     // update the context's source factory.
@@ -1095,6 +1139,28 @@
     if (pubspecFile.exists) {
       _analyzePubspecFile(info.analysisDriver, pubspecFile.path);
     }
+
+    void checkManifestFilesIn(Folder folder) {
+      // Don't traverse into dot directories.
+      if (folder.shortName.startsWith('.')) {
+        return;
+      }
+
+      for (var child in folder.getChildren()) {
+        if (child is File) {
+          if (child.shortName == MANIFEST_NAME &&
+              !excludedPaths.contains(child.path)) {
+            _analyzeManifestFile(info.analysisDriver, child.path);
+          }
+        } else if (child is Folder) {
+          if (!excludedPaths.contains(child.path)) {
+            checkManifestFilesIn(child);
+          }
+        }
+      }
+    }
+
+    checkManifestFilesIn(folder);
     return info;
   }
 
@@ -1410,6 +1476,7 @@
     _checkForPackagespecUpdate(path, info);
     _checkForAnalysisOptionsUpdate(path, info);
     _checkForPubspecUpdate(path, info);
+    _checkForManifestUpdate(path, info);
   }
 
   /**
@@ -1461,6 +1528,8 @@
     return false;
   }
 
+  bool _isManifest(String path) => pathContext.basename(path) == MANIFEST_NAME;
+
   bool _isPackagespec(String path) =>
       pathContext.basename(path) == PACKAGE_SPEC_NAME;
 
diff --git a/pkg/analysis_server/lib/src/domain_analysis.dart b/pkg/analysis_server/lib/src/domain_analysis.dart
index 6886c65..53a2d7f 100644
--- a/pkg/analysis_server/lib/src/domain_analysis.dart
+++ b/pkg/analysis_server/lib/src/domain_analysis.dart
@@ -21,13 +21,13 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/error/error.dart' as engine;
 import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/src/dartdoc/dartdoc_directive_info.dart';
 import 'package:analyzer/src/generated/engine.dart' as engine;
 import 'package:analyzer_plugin/protocol/protocol.dart' as plugin;
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
 import 'package:analyzer_plugin/protocol/protocol_constants.dart' as plugin;
 import 'package:analyzer_plugin/protocol/protocol_generated.dart' as plugin;
 import 'package:analyzer_plugin/src/utilities/navigation/navigation.dart';
-import 'package:path/path.dart';
 
 // TODO(devoncarew): See #31456 for the tracking issue to remove this flag.
 final bool disableManageImportsOnPaste = true;
@@ -88,8 +88,9 @@
     // Prepare the hovers.
     List<HoverInformation> hovers = <HoverInformation>[];
     if (unit != null) {
-      HoverInformation hoverInformation =
-          new DartUnitHoverComputer(unit, params.offset).compute();
+      HoverInformation hoverInformation = new DartUnitHoverComputer(
+              _getDartdocDirectiveInfoFor(result), unit, params.offset)
+          .compute();
       if (hoverInformation != null) {
         hovers.add(hoverInformation);
       }
@@ -277,7 +278,8 @@
 
     // Ensure the offset provided is a valid location in the file.
     final unit = result.unit;
-    final computer = new DartUnitSignatureComputer(unit, params.offset);
+    final computer = new DartUnitSignatureComputer(
+        _getDartdocDirectiveInfoFor(result), unit, params.offset);
     if (!computer.offsetIsValid) {
       server.sendResponse(new Response.getSignatureInvalidOffset(request));
       return;
@@ -360,10 +362,6 @@
    * Implement the 'analysis.setAnalysisRoots' request.
    */
   Response setAnalysisRoots(Request request) {
-    if (server.options.enableUXExperiment1) {
-      return new AnalysisSetAnalysisRootsResult().toResponse(request.id);
-    }
-
     var params = new AnalysisSetAnalysisRootsParams.fromRequest(request);
     List<String> includedPathList = params.included;
     List<String> excludedPathList = params.excluded;
@@ -385,8 +383,7 @@
     Map<String, String> packageRoots =
         params.packageRoots ?? <String, String>{};
 
-    if (server.options.enableUXExperiment2 &&
-        server.detachableFileSystemManager != null) {
+    if (server.detachableFileSystemManager != null) {
       server.detachableFileSystemManager.setAnalysisRoots(
           request.id, includedPathList, excludedPathList, packageRoots);
     } else {
@@ -418,45 +415,6 @@
       }
     }
 
-    if (server.options.enableUXExperiment1) {
-      // If this experiment is enabled, set the analysis root to be the
-      // containing directory.
-
-      List<String> includedPathList = new List<String>();
-
-      // Reference the priority files, remove files that don't end in dart, yaml
-      // or html suffixes and sort from shortest to longest file paths.
-      List<String> priorityFiles = params.files;
-      priorityFiles.removeWhere((s) =>
-          !s.endsWith('.dart') && !s.endsWith('.yaml') && !s.endsWith('.html'));
-
-      Context pathContext = server.resourceProvider.pathContext;
-      List<String> containingDirectories = <String>[];
-      for (String filePath in priorityFiles) {
-        containingDirectories.add(pathContext.dirname(filePath));
-      }
-      containingDirectories.sort();
-
-      // For each file, add the contained directory to includedPathList iff
-      // some other parent containing directory has not already been added.
-      for (String containedDir in containingDirectories) {
-        // Check that no parent directories have already been added (we have
-        // guarantees here as the list was sorted above.)
-        bool parentDirectoryInListAlready = false;
-        for (int i = 0; i < includedPathList.length; i++) {
-          if (containedDir.startsWith(includedPathList[i])) {
-            parentDirectoryInListAlready = true;
-          }
-        }
-        if (!parentDirectoryInListAlready) {
-          includedPathList.add(containedDir);
-        }
-      }
-
-      server.setAnalysisRoots(
-          request.id, includedPathList, <String>[], <String, String>{});
-    }
-
     server.setPriorityFiles(request.id, params.files);
     //
     // Forward the request to the plugins.
@@ -551,4 +509,12 @@
     server.updateOptions(updaters);
     return new AnalysisUpdateOptionsResult().toResponse(request.id);
   }
+
+  DartdocDirectiveInfo _getDartdocDirectiveInfoFor(ResolvedUnitResult result) {
+    // TODO(brianwilkerson) Consider moving this to AnalysisServer.
+    return server.declarationsTracker
+            ?.getContext(result.session.analysisContext)
+            ?.dartdocDirectiveInfo ??
+        new DartdocDirectiveInfo();
+  }
 }
diff --git a/pkg/analysis_server/lib/src/domain_completion.dart b/pkg/analysis_server/lib/src/domain_completion.dart
index b9d51ae..3951541 100644
--- a/pkg/analysis_server/lib/src/domain_completion.dart
+++ b/pkg/analysis_server/lib/src/domain_completion.dart
@@ -16,7 +16,9 @@
 import 'package:analysis_server/src/services/completion/completion_core.dart';
 import 'package:analysis_server/src/services/completion/completion_performance.dart';
 import 'package:analysis_server/src/services/completion/dart/completion_manager.dart';
+import 'package:analysis_server/src/services/completion/token_details/token_detail_builder.dart';
 import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer_plugin/protocol/protocol.dart' as plugin;
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
@@ -37,7 +39,7 @@
   /**
    * The completion services that the client is currently subscribed.
    */
-  final Set<CompletionService> _subscriptions = Set<CompletionService>();
+  final Set<CompletionService> subscriptions = Set<CompletionService>();
 
   /**
    * The next completion response id.
@@ -62,6 +64,12 @@
   CompletionRequestImpl _currentRequest;
 
   /**
+   * The identifiers of the latest `getSuggestionDetails` request.
+   * We use it to abort previous requests.
+   */
+  int _latestGetSuggestionDetailsId = 0;
+
+  /**
    * Initialize a new request handler for the given [server].
    */
   CompletionDomainHandler(AnalysisServer server) : super(server);
@@ -76,7 +84,7 @@
   Future<CompletionResult> computeSuggestions(
     CompletionRequestImpl request,
     CompletionGetSuggestionsParams params,
-    Set<ElementKind> includedSuggestionKinds,
+    Set<ElementKind> includedElementKinds,
     List<IncludedSuggestionRelevanceTag> includedSuggestionRelevanceTags,
   ) async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
@@ -103,7 +111,7 @@
       performance.logStartTime(COMPUTE_SUGGESTIONS_TAG);
 
       var manager = new DartCompletionManager(
-        includedSuggestionKinds: includedSuggestionKinds,
+        includedElementKinds: includedElementKinds,
         includedSuggestionRelevanceTags: includedSuggestionRelevanceTags,
       );
 
@@ -173,11 +181,6 @@
       return;
     }
 
-    var analysisDriver = server.getAnalysisDriver(file);
-    var session = analysisDriver.currentSession;
-    var resolvedLibrary = await session.getResolvedLibrary(file);
-    var requestedLibraryElement = await session.getLibraryByUri(library.uriStr);
-
     // The label might be `MyEnum.myValue`, but we import only `MyEnum`.
     var requestedName = params.label;
     if (requestedName.contains('.')) {
@@ -187,26 +190,63 @@
       );
     }
 
-    var completion = params.label;
-    var builder = DartChangeBuilder(session);
-    await builder.addFileEdit(file, (builder) {
-      var result = builder.importLibraryElement(
-        targetLibrary: resolvedLibrary,
-        targetPath: file,
-        targetOffset: params.offset,
-        requestedLibrary: requestedLibraryElement,
-        requestedName: requestedName,
-      );
-      if (result.prefix != null) {
-        completion = '${result.prefix}.$completion';
-      }
-    });
+    const timeout = Duration(milliseconds: 1000);
+    var timer = Stopwatch()..start();
+    var id = ++_latestGetSuggestionDetailsId;
+    while (id == _latestGetSuggestionDetailsId && timer.elapsed < timeout) {
+      try {
+        var analysisDriver = server.getAnalysisDriver(file);
+        var session = analysisDriver.currentSession;
 
+        var fileElement = await session.getUnitElement(file);
+        var libraryPath = fileElement.element.librarySource.fullName;
+
+        var resolvedLibrary = await session.getResolvedLibrary(libraryPath);
+        var requestedLibraryElement = await session.getLibraryByUri(
+          library.uriStr,
+        );
+
+        var requestedElement =
+            requestedLibraryElement.exportNamespace.get(requestedName);
+        if (requestedElement == null) {
+          server.sendResponse(Response.invalidParameter(
+            request,
+            'label',
+            'No such element: $requestedName',
+          ));
+          return;
+        }
+
+        var completion = params.label;
+        var builder = DartChangeBuilder(session);
+        await builder.addFileEdit(libraryPath, (builder) {
+          var result = builder.importLibraryElement(
+            targetLibrary: resolvedLibrary,
+            targetPath: libraryPath,
+            targetOffset: params.offset,
+            requestedLibrary: requestedLibraryElement,
+            requestedElement: requestedElement,
+          );
+          if (result.prefix != null) {
+            completion = '${result.prefix}.$completion';
+          }
+        });
+
+        server.sendResponse(
+          CompletionGetSuggestionDetailsResult(
+            completion,
+            change: builder.sourceChange,
+          ).toResponse(request.id),
+        );
+        return;
+      } on InconsistentAnalysisException {
+        // Loop around to try again.
+      }
+    }
+
+    // Timeout or abort, send the empty response.
     server.sendResponse(
-      CompletionGetSuggestionDetailsResult(
-        completion,
-        change: builder.sourceChange,
-      ).toResponse(request.id),
+      CompletionGetSuggestionDetailsResult('').toResponse(request.id),
     );
   }
 
@@ -221,6 +261,9 @@
       } else if (requestName == COMPLETION_REQUEST_GET_SUGGESTIONS) {
         processRequest(request);
         return Response.DELAYED_RESPONSE;
+      } else if (requestName == COMPLETION_REQUEST_LIST_TOKEN_DETAILS) {
+        listTokenDetails(request);
+        return Response.DELAYED_RESPONSE;
       } else if (requestName == COMPLETION_REQUEST_SET_SUBSCRIPTIONS) {
         return setSubscriptions(request);
       }
@@ -240,6 +283,43 @@
   }
 
   /**
+   * Process a `completion.listTokenDetails` request.
+   */
+  Future<void> listTokenDetails(Request request) async {
+    CompletionListTokenDetailsParams params =
+        CompletionListTokenDetailsParams.fromRequest(request);
+
+    String file = params.file;
+    if (server.sendResponseErrorIfInvalidFilePath(request, file)) {
+      return;
+    }
+
+    AnalysisDriver analysisDriver = server.getAnalysisDriver(file);
+    if (analysisDriver == null) {
+      server.sendResponse(Response.invalidParameter(
+        request,
+        'file',
+        'File is not being analyzed: $file',
+      ));
+    }
+    AnalysisSession session = analysisDriver.currentSession;
+    ResolvedUnitResult result = await session.getResolvedUnit(file);
+    if (result.state != ResultState.VALID) {
+      server.sendResponse(Response.invalidParameter(
+        request,
+        'file',
+        'File does not exist or cannot be read: $file',
+      ));
+    }
+
+    TokenDetailBuilder builder = new TokenDetailBuilder();
+    builder.visitNode(result.unit);
+    server.sendResponse(
+      CompletionListTokenDetailsResult(builder.details).toResponse(request.id),
+    );
+  }
+
+  /**
    * Process a `completion.getSuggestions` request.
    */
   Future<void> processRequest(Request request) async {
@@ -283,10 +363,10 @@
 
     // If the client opted into using available suggestion sets,
     // create the kinds set, so signal the completion manager about opt-in.
-    Set<ElementKind> includedSuggestionKinds;
+    Set<ElementKind> includedElementKinds;
     List<IncludedSuggestionRelevanceTag> includedSuggestionRelevanceTags;
-    if (_subscriptions.contains(CompletionService.AVAILABLE_SUGGESTION_SETS)) {
-      includedSuggestionKinds = Set<ElementKind>();
+    if (subscriptions.contains(CompletionService.AVAILABLE_SUGGESTION_SETS)) {
+      includedElementKinds = Set<ElementKind>();
       includedSuggestionRelevanceTags = <IncludedSuggestionRelevanceTag>[];
     }
 
@@ -294,11 +374,11 @@
     computeSuggestions(
       completionRequest,
       params,
-      includedSuggestionKinds,
+      includedElementKinds,
       includedSuggestionRelevanceTags,
     ).then((CompletionResult result) {
       List<IncludedSuggestionSet> includedSuggestionSets;
-      if (includedSuggestionKinds != null && resolvedUnit != null) {
+      if (includedElementKinds != null && resolvedUnit != null) {
         includedSuggestionSets = computeIncludedSetList(
           server.declarationsTracker,
           resolvedUnit,
@@ -315,7 +395,7 @@
         result.replacementLength,
         result.suggestions,
         includedSuggestionSets,
-        includedSuggestionKinds?.toList(),
+        includedElementKinds?.toList(),
         includedSuggestionRelevanceTags,
       );
       performance.logElapseTime(SEND_NOTIFICATION_TAG);
@@ -353,7 +433,7 @@
     int replacementLength,
     Iterable<CompletionSuggestion> results,
     List<IncludedSuggestionSet> includedSuggestionSets,
-    List<ElementKind> includedSuggestionKinds,
+    List<ElementKind> includedElementKinds,
     List<IncludedSuggestionRelevanceTag> includedSuggestionRelevanceTags,
   ) {
     server.sendNotification(
@@ -364,7 +444,7 @@
         results,
         true,
         includedSuggestionSets: includedSuggestionSets,
-        includedSuggestionKinds: includedSuggestionKinds,
+        includedElementKinds: includedElementKinds,
         includedSuggestionRelevanceTags: includedSuggestionRelevanceTags,
       ).toNotification(),
     );
@@ -381,10 +461,10 @@
   Response setSubscriptions(Request request) {
     var params = CompletionSetSubscriptionsParams.fromRequest(request);
 
-    _subscriptions.clear();
-    _subscriptions.addAll(params.subscriptions);
+    subscriptions.clear();
+    subscriptions.addAll(params.subscriptions);
 
-    if (_subscriptions.contains(CompletionService.AVAILABLE_SUGGESTION_SETS)) {
+    if (subscriptions.contains(CompletionService.AVAILABLE_SUGGESTION_SETS)) {
       server.createDeclarationsTracker((change) {
         server.sendNotification(
           createCompletionAvailableSuggestionsNotification(change),
diff --git a/pkg/analysis_server/lib/src/domains/analysis/navigation_dart.dart b/pkg/analysis_server/lib/src/domains/analysis/navigation_dart.dart
index d8fbb56..a04b33f 100644
--- a/pkg/analysis_server/lib/src/domains/analysis/navigation_dart.dart
+++ b/pkg/analysis_server/lib/src/domains/analysis/navigation_dart.dart
@@ -356,8 +356,8 @@
    * then add the navigation region from the [node] to the [element].
    */
   void _addUriDirectiveRegion(UriBasedDirective node, Element element) {
-    if (element != null) {
-      Source source = element.source;
+    Source source = element?.source;
+    if (source != null) {
       if (resourceProvider.getResource(source.fullName).exists) {
         computer._addRegionForNode(node.uri, element);
       }
diff --git a/pkg/analysis_server/lib/src/domains/completion/available_suggestions.dart b/pkg/analysis_server/lib/src/domains/completion/available_suggestions.dart
index 69f51f6..bbe879f 100644
--- a/pkg/analysis_server/lib/src/domains/completion/available_suggestions.dart
+++ b/pkg/analysis_server/lib/src/domains/completion/available_suggestions.dart
@@ -43,7 +43,11 @@
     }
 
     includedSetList.add(
-      protocol.IncludedSuggestionSet(library.id, relevance),
+      protocol.IncludedSuggestionSet(
+        library.id,
+        relevance,
+        displayUri: _getRelativeFileUri(resolvedUnit, library.uri),
+      ),
     );
   }
 
@@ -68,37 +72,79 @@
 ) {
   return protocol.CompletionAvailableSuggestionsParams(
     changedLibraries: change.changed.map((library) {
-      return protocol.AvailableSuggestionSet(
-        library.id,
-        library.uriStr,
-        library.declarations.map((declaration) {
-          return _protocolAvailableSuggestion(declaration);
-        }).toList(),
-      );
+      return _protocolAvailableSuggestionSet(library);
     }).toList(),
     removedLibraries: change.removed,
   ).toNotification();
 }
 
+/// Computes the best URI to import [what] into the [unit] library.
+String _getRelativeFileUri(ResolvedUnitResult unit, Uri what) {
+  if (what.scheme == 'file') {
+    var pathContext = unit.session.resourceProvider.pathContext;
+
+    var libraryPath = unit.libraryElement.source.fullName;
+    var libraryFolder = pathContext.dirname(libraryPath);
+
+    var whatPath = pathContext.fromUri(what);
+    var relativePath = pathContext.relative(whatPath, from: libraryFolder);
+    return pathContext.split(relativePath).join('/');
+  }
+  return null;
+}
+
 protocol.AvailableSuggestion _protocolAvailableSuggestion(
     Declaration declaration) {
   var label = declaration.name;
+  if (declaration.kind == DeclarationKind.CONSTRUCTOR) {
+    label = declaration.parent.name;
+    if (declaration.name.isNotEmpty) {
+      label += '.${declaration.name}';
+    }
+  }
   if (declaration.kind == DeclarationKind.ENUM_CONSTANT) {
-    label = '${declaration.name2}.${declaration.name}';
+    label = '${declaration.parent.name}.${declaration.name}';
+  }
+
+  List<String> relevanceTags;
+  if (declaration.relevanceTags == null) {
+    relevanceTags = null;
+  } else {
+    relevanceTags = List<String>.from(declaration.relevanceTags);
+    relevanceTags.add(declaration.name);
   }
 
   return protocol.AvailableSuggestion(
     label,
     _protocolElement(declaration),
+    defaultArgumentListString: declaration.defaultArgumentListString,
+    defaultArgumentListTextRanges: declaration.defaultArgumentListTextRanges,
     docComplete: declaration.docComplete,
     docSummary: declaration.docSummary,
     parameterNames: declaration.parameterNames,
     parameterTypes: declaration.parameterTypes,
     requiredParameterCount: declaration.requiredParameterCount,
-    relevanceTags: declaration.relevanceTags,
+    relevanceTags: relevanceTags,
   );
 }
 
+protocol.AvailableSuggestionSet _protocolAvailableSuggestionSet(
+    Library library) {
+  var items = <protocol.AvailableSuggestion>[];
+
+  void addItem(Declaration declaration) {
+    var suggestion = _protocolAvailableSuggestion(declaration);
+    items.add(suggestion);
+    declaration.children.forEach(addItem);
+  }
+
+  for (var declaration in library.declarations) {
+    addItem(declaration);
+  }
+
+  return protocol.AvailableSuggestionSet(library.id, library.uriStr, items);
+}
+
 protocol.Element _protocolElement(Declaration declaration) {
   return protocol.Element(
     _protocolElementKind(declaration.kind),
@@ -132,6 +178,8 @@
       return protocol.ElementKind.CLASS;
     case DeclarationKind.CLASS_TYPE_ALIAS:
       return protocol.ElementKind.CLASS_TYPE_ALIAS;
+    case DeclarationKind.CONSTRUCTOR:
+      return protocol.ElementKind.CONSTRUCTOR;
     case DeclarationKind.ENUM:
       return protocol.ElementKind.ENUM;
     case DeclarationKind.ENUM_CONSTANT:
diff --git a/pkg/analysis_server/lib/src/edit/edit_dartfix.dart b/pkg/analysis_server/lib/src/edit/edit_dartfix.dart
index 9b5c226..0525b77 100644
--- a/pkg/analysis_server/lib/src/edit/edit_dartfix.dart
+++ b/pkg/analysis_server/lib/src/edit/edit_dartfix.dart
@@ -21,6 +21,7 @@
   final AnalysisServer server;
 
   final Request request;
+  final pkgFolders = <Folder>[];
   final fixFolders = <Folder>[];
   final fixFiles = <File>[];
 
@@ -78,6 +79,11 @@
               contextManager.isInAnalysisRoot(filePath))) {
         return new Response.fileNotAnalyzed(request, filePath);
       }
+      var pkgFolder =
+          findPkgFolder(contextManager.getContextFolderFor(filePath));
+      if (pkgFolder != null && !pkgFolders.contains(pkgFolder)) {
+        pkgFolders.add(pkgFolder);
+      }
       if (res is Folder) {
         fixFolders.add(res);
       } else {
@@ -85,6 +91,11 @@
       }
     }
 
+    // Process each package
+    for (Folder pkgFolder in pkgFolders) {
+      await processPackage(pkgFolder);
+    }
+
     // Process each source file.
     bool hasErrors = false;
     String changedPath;
@@ -100,11 +111,13 @@
           hasErrors = true;
         }
         await processLints(result);
-        await processCodeTasks(result);
+        if (numPhases > 0) {
+          await processCodeTasks(0, result);
+        }
       });
-      if (needsSecondPass) {
+      for (int phase = 1; phase < numPhases; phase++) {
         await processResources((ResolvedUnitResult result) async {
-          await processCodeTasks2(result);
+          await processCodeTasks(phase, result);
         });
       }
       await finishLints();
@@ -133,6 +146,17 @@
     ).toResponse(request.id);
   }
 
+  Folder findPkgFolder(Folder folder) {
+    while (folder != null) {
+      if (folder.getChild('analysis_options.yaml').exists ||
+          folder.getChild('pubspec.yaml').exists) {
+        return folder;
+      }
+      folder = folder.parent;
+    }
+    return null;
+  }
+
   /// Return `true` if the path in within the set of `included` files
   /// or is within an `included` directory.
   bool isIncluded(String filePath) {
diff --git a/pkg/analysis_server/lib/src/edit/edit_domain.dart b/pkg/analysis_server/lib/src/edit/edit_domain.dart
index efccaeb..dbbd2d4 100644
--- a/pkg/analysis_server/lib/src/edit/edit_domain.dart
+++ b/pkg/analysis_server/lib/src/edit/edit_domain.dart
@@ -22,6 +22,9 @@
 import 'package:analysis_server/src/services/correction/assist_internal.dart';
 import 'package:analysis_server/src/services/correction/change_workspace.dart';
 import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/fix/analysis_options/fix_generator.dart';
+import 'package:analysis_server/src/services/correction/fix/manifest/fix_generator.dart';
+import 'package:analysis_server/src/services/correction/fix/pubspec/fix_generator.dart';
 import 'package:analysis_server/src/services/correction/fix_internal.dart';
 import 'package:analysis_server/src/services/correction/organize_directives.dart';
 import 'package:analysis_server/src/services/correction/sort_members.dart';
@@ -33,16 +36,29 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/error/error.dart' as engine;
+import 'package:analyzer/file_system/file_system.dart';
+// ignore: deprecated_member_use
+import 'package:analyzer/source/analysis_options_provider.dart';
+import 'package:analyzer/source/line_info.dart';
 import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/dart/scanner/scanner.dart' as engine;
 import 'package:analyzer/src/error/codes.dart' as engine;
 import 'package:analyzer/src/generated/engine.dart' as engine;
+import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/parser.dart' as engine;
 import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/manifest/manifest_validator.dart';
+import 'package:analyzer/src/manifest/manifest_values.dart';
+import 'package:analyzer/src/pubspec/pubspec_validator.dart';
+import 'package:analyzer/src/task/options.dart';
 import 'package:analyzer_plugin/protocol/protocol.dart' as plugin;
 import 'package:analyzer_plugin/protocol/protocol_constants.dart' as plugin;
 import 'package:analyzer_plugin/protocol/protocol_generated.dart' as plugin;
 import 'package:dart_style/dart_style.dart';
+import 'package:html/dom.dart';
+import 'package:html/parser.dart';
+import 'package:path/src/context.dart';
+import 'package:yaml/yaml.dart';
 
 int test_resetCount = 0;
 
@@ -231,9 +247,7 @@
       new EditGetDartfixInfoResult(allFixes.map((i) => i.asDartFix()).toList())
           .toResponse(request.id);
 
-  Future getFixes(Request request) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
+  Future<void> getFixes(Request request) async {
     EditGetFixesParams params = new EditGetFixesParams.fromRequest(request);
     String file = params.file;
     int offset = params.offset;
@@ -241,7 +255,6 @@
     if (server.sendResponseErrorIfInvalidFilePath(request, file)) {
       return;
     }
-
     //
     // Allow plugins to start computing fixes.
     //
@@ -569,12 +582,49 @@
   }
 
   /**
-   * Compute and return the fixes associated with server-generated errors.
+   * Compute and return the fixes associated with server-generated errors in
+   * analysis options files.
    */
-  Future<List<AnalysisErrorFixes>> _computeServerErrorFixes(
+  Future<List<AnalysisErrorFixes>> _computeAnalysisOptionsFixes(
       String file, int offset) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
+    List<AnalysisErrorFixes> errorFixesList = <AnalysisErrorFixes>[];
+    File optionsFile = server.resourceProvider.getFile(file);
+    String content = _safelyRead(optionsFile);
+    if (content == null) {
+      return errorFixesList;
+    }
+    SourceFactory sourceFactory = server.getAnalysisDriver(file).sourceFactory;
+    List<engine.AnalysisError> errors = analyzeAnalysisOptions(
+        optionsFile.createSource(), content, sourceFactory);
+    YamlMap options = _getOptions(sourceFactory, content);
+    if (options == null) {
+      return errorFixesList;
+    }
+    for (engine.AnalysisError error in errors) {
+      AnalysisOptionsFixGenerator generator =
+          new AnalysisOptionsFixGenerator(error, content, options);
+      List<Fix> fixes = await generator.computeFixes();
+      if (fixes.isNotEmpty) {
+        fixes.sort(Fix.SORT_BY_RELEVANCE);
+        LineInfo lineInfo = new LineInfo.fromContent(content);
+        AnalysisError serverError =
+            newAnalysisError_fromEngine(lineInfo, error);
+        AnalysisErrorFixes errorFixes = new AnalysisErrorFixes(serverError);
+        errorFixesList.add(errorFixes);
+        fixes.forEach((fix) {
+          errorFixes.fixes.add(fix.change);
+        });
+      }
+    }
+    return errorFixesList;
+  }
+
+  /**
+   * Compute and return the fixes associated with server-generated errors in
+   * Dart files.
+   */
+  Future<List<AnalysisErrorFixes>> _computeDartFixes(
+      String file, int offset) async {
     List<AnalysisErrorFixes> errorFixesList = <AnalysisErrorFixes>[];
     var result = await server.getResolvedUnit(file);
     if (result != null) {
@@ -603,6 +653,103 @@
     return errorFixesList;
   }
 
+  /**
+   * Compute and return the fixes associated with server-generated errors in
+   * Android manifest files.
+   */
+  Future<List<AnalysisErrorFixes>> _computeManifestFixes(
+      String file, int offset) async {
+    List<AnalysisErrorFixes> errorFixesList = <AnalysisErrorFixes>[];
+    File manifestFile = server.resourceProvider.getFile(file);
+    String content = _safelyRead(manifestFile);
+    if (content == null) {
+      return errorFixesList;
+    }
+    DocumentFragment document =
+        parseFragment(content, container: MANIFEST_TAG, generateSpans: true);
+    if (document == null) {
+      return errorFixesList;
+    }
+    ManifestValidator validator =
+        new ManifestValidator(manifestFile.createSource());
+    List<engine.AnalysisError> errors = validator.validate(content, true);
+    for (engine.AnalysisError error in errors) {
+      ManifestFixGenerator generator =
+          new ManifestFixGenerator(error, content, document);
+      List<Fix> fixes = await generator.computeFixes();
+      if (fixes.isNotEmpty) {
+        fixes.sort(Fix.SORT_BY_RELEVANCE);
+        LineInfo lineInfo = new LineInfo.fromContent(content);
+        AnalysisError serverError =
+            newAnalysisError_fromEngine(lineInfo, error);
+        AnalysisErrorFixes errorFixes = new AnalysisErrorFixes(serverError);
+        errorFixesList.add(errorFixes);
+        fixes.forEach((fix) {
+          errorFixes.fixes.add(fix.change);
+        });
+      }
+    }
+    return errorFixesList;
+  }
+
+  /**
+   * Compute and return the fixes associated with server-generated errors in
+   * pubspec.yaml files.
+   */
+  Future<List<AnalysisErrorFixes>> _computePubspecFixes(
+      String file, int offset) async {
+    List<AnalysisErrorFixes> errorFixesList = <AnalysisErrorFixes>[];
+    File pubspecFile = server.resourceProvider.getFile(file);
+    String content = _safelyRead(pubspecFile);
+    if (content == null) {
+      return errorFixesList;
+    }
+    SourceFactory sourceFactory = server.getAnalysisDriver(file).sourceFactory;
+    YamlMap pubspec = _getOptions(sourceFactory, content);
+    if (pubspec == null) {
+      return errorFixesList;
+    }
+    PubspecValidator validator = new PubspecValidator(
+        server.resourceProvider, pubspecFile.createSource());
+    List<engine.AnalysisError> errors = validator.validate(pubspec.nodes);
+    for (engine.AnalysisError error in errors) {
+      PubspecFixGenerator generator =
+          new PubspecFixGenerator(error, content, pubspec);
+      List<Fix> fixes = await generator.computeFixes();
+      if (fixes.isNotEmpty) {
+        fixes.sort(Fix.SORT_BY_RELEVANCE);
+        LineInfo lineInfo = new LineInfo.fromContent(content);
+        AnalysisError serverError =
+            newAnalysisError_fromEngine(lineInfo, error);
+        AnalysisErrorFixes errorFixes = new AnalysisErrorFixes(serverError);
+        errorFixesList.add(errorFixes);
+        fixes.forEach((fix) {
+          errorFixes.fixes.add(fix.change);
+        });
+      }
+    }
+    return errorFixesList;
+  }
+
+  /**
+   * Compute and return the fixes associated with server-generated errors.
+   */
+  Future<List<AnalysisErrorFixes>> _computeServerErrorFixes(
+      String file, int offset) async {
+    Context context = server.resourceProvider.pathContext;
+    if (AnalysisEngine.isDartFileName(file)) {
+      return _computeDartFixes(file, offset);
+    } else if (AnalysisEngine.isAnalysisOptionsFileName(file, context)) {
+      return _computeAnalysisOptionsFixes(file, offset);
+    } else if (context.basename(file) == 'pubspec.yaml') {
+      return _computePubspecFixes(file, offset);
+    } else if (context.basename(file) == 'manifest.xml') {
+      // TODO(brianwilkerson) Do we need to check more than the file name?
+      return _computeManifestFixes(file, offset);
+    }
+    return <AnalysisErrorFixes>[];
+  }
+
   Response _getAvailableRefactorings(Request request) {
     _getAvailableRefactoringsImpl(request);
     return Response.DELAYED_RESPONSE;
@@ -676,6 +823,16 @@
     server.sendResponse(result.toResponse(request.id));
   }
 
+  YamlMap _getOptions(SourceFactory sourceFactory, String content) {
+    AnalysisOptionsProvider optionsProvider =
+        new AnalysisOptionsProvider(sourceFactory);
+    try {
+      return optionsProvider.getOptionsFromString(content);
+    } on OptionsFormatException {
+      return null;
+    }
+  }
+
   Response _getRefactoring(Request request) {
     if (refactoringManager.hasPendingRequest) {
       refactoringManager.cancel();
@@ -692,6 +849,16 @@
     refactoringManager = new _RefactoringManager(server, refactoringWorkspace);
   }
 
+  /// Return the contents of the [file], or `null` if the file does not exist or
+  /// cannot be read.
+  String _safelyRead(File file) {
+    try {
+      return file.readAsStringSync();
+    } on FileSystemException {
+      return null;
+    }
+  }
+
   static int _getNumberOfScanParseErrors(List<engine.AnalysisError> errors) {
     int numScanParseErrors = 0;
     for (engine.AnalysisError error in errors) {
@@ -842,7 +1009,8 @@
       result.potentialEdits = nullIfEmpty(refactoring.potentialEditIds);
       _sendResultResponse();
     }, onError: (exception, stackTrace) {
-      if (exception is _ResetError) {
+      if (exception is _ResetError ||
+          exception is InconsistentAnalysisException) {
         cancel();
       } else {
         server.instrumentationService.logException(exception, stackTrace);
diff --git a/pkg/analysis_server/lib/src/edit/fix/dartfix_info.dart b/pkg/analysis_server/lib/src/edit/fix/dartfix_info.dart
index 3e6c9c8..728bb580 100644
--- a/pkg/analysis_server/lib/src/edit/fix/dartfix_info.dart
+++ b/pkg/analysis_server/lib/src/edit/fix/dartfix_info.dart
@@ -8,8 +8,11 @@
 import 'package:analysis_server/src/edit/fix/dartfix_registrar.dart';
 import 'package:analysis_server/src/edit/fix/fix_error_task.dart';
 import 'package:analysis_server/src/edit/fix/non_nullable_fix.dart';
+import 'package:analysis_server/src/edit/fix/prefer_for_elements_to_map_fromIterable_fix.dart';
+import 'package:analysis_server/src/edit/fix/prefer_if_elements_to_conditional_expressions_fix.dart';
 import 'package:analysis_server/src/edit/fix/prefer_int_literals_fix.dart';
 import 'package:analysis_server/src/edit/fix/prefer_mixin_fix.dart';
+import 'package:analysis_server/src/edit/fix/prefer_spread_collections_fix.dart';
 
 const allFixes = <DartFixInfo>[
   //
@@ -33,22 +36,40 @@
   const DartFixInfo(
     'double-to-int',
     'Find double literals ending in .0 and remove the .0\n'
-        'wherever double context can be inferred.',
+    'wherever double context can be inferred.',
     PreferIntLiteralsFix.task,
   ),
   //
-  // Expermimental fixes
+  // Experimental fixes
   //
   const DartFixInfo(
     'non-nullable',
     // TODO(danrubel) update description and make default/required
     // when NNBD fix is ready
     'Experimental: Update sources to be non-nullable by default.\n'
-        'Requires the experimental non-nullable flag to be enabled.\n'
-        'This is not applied unless explicitly included.',
+    'Requires the experimental non-nullable flag to be enabled.\n'
+    'This is not applied unless explicitly included.',
     NonNullableFix.task,
     isDefault: false,
   ),
+  const DartFixInfo(
+    'use-spread-collections',
+    'Convert to using collection spread operators.',
+    PreferSpreadCollectionsFix.task,
+    isDefault: false,
+  ),
+  const DartFixInfo(
+    'collection-if-elements',
+    'Convert to using if elements when building collections.',
+    PreferIfElementsToConditionalExpressionsFix.task,
+    isDefault: false,
+  ),
+  const DartFixInfo(
+    'map-for-elements',
+    'Convert to for elements when building maps from iterables.',
+    PreferForElementsToMapFromIterableFix.task,
+    isDefault: false,
+  ),
 ];
 
 /// [DartFixInfo] represents a fix that can be applied by [EditDartFix].
diff --git a/pkg/analysis_server/lib/src/edit/fix/dartfix_listener.dart b/pkg/analysis_server/lib/src/edit/fix/dartfix_listener.dart
index 73805d4..c1e9639 100644
--- a/pkg/analysis_server/lib/src/edit/fix/dartfix_listener.dart
+++ b/pkg/analysis_server/lib/src/edit/fix/dartfix_listener.dart
@@ -19,6 +19,20 @@
 
   DartFixListener(this.server);
 
+  /// Record an edit to be sent to the client.
+  ///
+  /// The associated suggestion should be separately added by calling
+  /// [addSuggestion].
+  void addEditWithoutSuggestion(Source source, SourceEdit edit) {
+    sourceChange.addEdit(source.fullName, -1, edit);
+  }
+
+  /// Record a recommendation to be sent to the client.
+  void addRecommendation(String description, [Location location]) {
+    otherSuggestions
+        .add(new DartFixSuggestion(description, location: location));
+  }
+
   /// Record a source change to be sent to the client.
   void addSourceChange(
       String description, Location location, SourceChange change) {
@@ -48,10 +62,12 @@
     }
   }
 
-  /// Record a recommendation to be sent to the client.
-  void addRecommendation(String description, [Location location]) {
-    otherSuggestions
-        .add(new DartFixSuggestion(description, location: location));
+  /// Record a suggestion to be sent to the client.
+  ///
+  /// The associated edits should be separately added by calling
+  /// [addEditWithoutRecommendation].
+  void addSuggestion(String description, Location location) {
+    suggestions.add(new DartFixSuggestion(description, location: location));
   }
 
   /// Return the [Location] representing the specified offset and length
diff --git a/pkg/analysis_server/lib/src/edit/fix/fix_code_task.dart b/pkg/analysis_server/lib/src/edit/fix/fix_code_task.dart
index 71d491b..e4f0b2e 100644
--- a/pkg/analysis_server/lib/src/edit/fix/fix_code_task.dart
+++ b/pkg/analysis_server/lib/src/edit/fix/fix_code_task.dart
@@ -2,55 +2,61 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'dart:math' show max;
+
 import 'package:analysis_server/src/edit/edit_dartfix.dart';
 import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/file_system/file_system.dart';
 
 /// A general task for performing a fix.
 abstract class FixCodeTask {
-  /// [processUnit] is called for each compilation unit.
-  Future<void> processUnit(ResolvedUnitResult result);
+  /// Number of times [processUnit] should be called for each compilation unit.
+  int get numPhases;
 
-  /// [finish] is called after [processUnit] (and [processUnit2] if this
-  /// is a FixCodeTask2) has been called for each compilation unit.
+  /// [processPackage] is called once for each package
+  /// before [processUnit] is called for any compilation unit in any package.
+  Future<void> processPackage(Folder pkgFolder);
+
+  /// [processUnit] is called for each phase and compilation unit.
+  ///
+  /// First [processUnit] will be called once for each compilation unit with
+  /// [phase] set to 0; then it will be called for each compilation unit with
+  /// [phase] set to 1; and so on through `numPhases-1`.
+  Future<void> processUnit(int phase, ResolvedUnitResult result);
+
+  /// [finish] is called after [processUnit] has been called for each
+  /// phase and compilation unit.
   Future<void> finish();
 }
 
-/// A general task for performing a fix which needs a 2nd pass.
-abstract class FixCodeTask2 extends FixCodeTask {
-  /// [processUnit2] is called for each compilation unit
-  /// after [processUnit] has been called for each compilation unit.
-  Future<void> processUnit2(ResolvedUnitResult result);
-}
-
 /// A processor used by [EditDartFix] to manage [FixCodeTask]s.
 mixin FixCodeProcessor {
-  final codeTasks = <FixCodeTask>[];
-  final codeTasks2 = <FixCodeTask2>[];
+  final _codeTasks = <FixCodeTask>[];
+
+  int _numPhases = 0;
 
   Future<void> finishCodeTasks() async {
-    for (FixCodeTask task in codeTasks) {
+    for (FixCodeTask task in _codeTasks) {
       await task.finish();
     }
   }
 
-  bool get needsSecondPass => codeTasks2.isNotEmpty;
+  int get numPhases => _numPhases;
 
-  Future<void> processCodeTasks(ResolvedUnitResult result) async {
-    for (FixCodeTask task in codeTasks) {
-      await task.processUnit(result);
+  Future<void> processCodeTasks(int phase, ResolvedUnitResult result) async {
+    for (FixCodeTask task in _codeTasks) {
+      await task.processUnit(phase, result);
     }
   }
 
-  Future<void> processCodeTasks2(ResolvedUnitResult result) async {
-    for (FixCodeTask2 task in codeTasks) {
-      await task.processUnit2(result);
+  void processPackage(Folder pkgFolder) async {
+    for (FixCodeTask task in _codeTasks) {
+      await task.processPackage(pkgFolder);
     }
   }
 
   void registerCodeTask(FixCodeTask task) {
-    codeTasks.add(task);
-    if (task is FixCodeTask2) {
-      codeTasks2.add(task);
-    }
+    _codeTasks.add(task);
+    _numPhases = max(_numPhases, task.numPhases);
   }
 }
diff --git a/pkg/analysis_server/lib/src/edit/fix/non_nullable_fix.dart b/pkg/analysis_server/lib/src/edit/fix/non_nullable_fix.dart
index c80cf39..61d3984 100644
--- a/pkg/analysis_server/lib/src/edit/fix/non_nullable_fix.dart
+++ b/pkg/analysis_server/lib/src/edit/fix/non_nullable_fix.dart
@@ -7,41 +7,174 @@
 import 'package:analysis_server/src/edit/fix/fix_code_task.dart';
 import 'package:analysis_server/src/nullability/provisional_api.dart';
 import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/task/options.dart';
+import 'package:analyzer_plugin/protocol/protocol_common.dart';
+import 'package:yaml/yaml.dart';
+import 'package:source_span/source_span.dart';
 
 /// [NonNullableFix] visits each named type in a resolved compilation unit
 /// and determines whether the associated variable or parameter can be null
 /// then adds or removes a '?' trailing the named type as appropriate.
-class NonNullableFix extends FixCodeTask2 {
+class NonNullableFix extends FixCodeTask {
   /// TODO(paulberry): stop using permissive mode once the migration logic is
   /// mature enough.
   static const bool _usePermissiveMode = true;
 
-  static void task(DartFixRegistrar registrar, DartFixListener listener) {
-    registrar.registerCodeTask(new NonNullableFix(listener));
-  }
-
   final DartFixListener listener;
 
   final NullabilityMigration migration;
 
+  /// If this flag has a value of `false`, then something happened to prevent
+  /// at least one package from being marked as non-nullable.
+  /// If this occurs, then don't update any code.
+  bool _packageIsNNBD = true;
+
   NonNullableFix(this.listener)
       : migration = new NullabilityMigration(
             new NullabilityMigrationAdapter(listener),
             permissive: _usePermissiveMode);
 
   @override
+  int get numPhases => 2;
+
+  @override
   Future<void> finish() async {
     migration.finish();
   }
 
+  /// If the package contains an analysis_options.yaml file, then update the
+  /// file to enabled NNBD. If that file does not exist, but the package
+  /// contains a pubspec.yaml, then create the analysis_options.yaml file.
   @override
-  Future<void> processUnit(ResolvedUnitResult result) async {
-    migration.prepareInput(result);
+  Future<void> processPackage(Folder pkgFolder) async {
+    if (!_packageIsNNBD) {
+      return;
+    }
+
+    // TODO(danrubel): Update pubspec.yaml to enable NNBD
+
+    File optionsFile = pkgFolder.getChildAssumingFile('analysis_options.yaml');
+    String optionsContent;
+    YamlNode optionsMap;
+    if (optionsFile.exists) {
+      try {
+        optionsContent = optionsFile.readAsStringSync();
+      } on FileSystemException catch (e) {
+        processYamlException('read', optionsFile.path, e);
+        return;
+      }
+      try {
+        optionsMap = loadYaml(optionsContent);
+      } on YamlException catch (e) {
+        processYamlException('parse', optionsFile.path, e);
+        return;
+      }
+    }
+
+    SourceSpan parentSpan;
+    String content;
+    YamlNode analyzerOptions;
+    if (optionsMap is YamlMap) {
+      analyzerOptions = optionsMap.nodes[AnalyzerOptions.analyzer];
+    }
+    if (analyzerOptions == null) {
+      var start = new SourceLocation(0, line: 0, column: 0);
+      parentSpan = new SourceSpan(start, start, '');
+      content = '''
+analyzer:
+  enable-experiment:
+    - non-nullable
+
+''';
+    } else if (analyzerOptions is YamlMap) {
+      YamlNode experiments =
+          analyzerOptions.nodes[AnalyzerOptions.enableExperiment];
+      if (experiments == null) {
+        parentSpan = analyzerOptions.span;
+        content = '''
+
+  enable-experiment:
+    - non-nullable''';
+      } else if (experiments is YamlList) {
+        experiments.nodes.firstWhere(
+          (node) => node.span.text == EnableString.non_nullable,
+          orElse: () {
+            parentSpan = experiments.span;
+            content = '''
+
+    - non-nullable''';
+          },
+        );
+      }
+    }
+
+    if (parentSpan != null) {
+      final space = ' '.codeUnitAt(0);
+      final cr = '\r'.codeUnitAt(0);
+      final lf = '\n'.codeUnitAt(0);
+
+      int line = parentSpan.end.line;
+      int offset = parentSpan.end.offset;
+      while (offset > 0) {
+        int ch = optionsContent.codeUnitAt(offset - 1);
+        if (ch == space || ch == cr) {
+          --offset;
+        } else if (ch == lf) {
+          --offset;
+          --line;
+        } else {
+          break;
+        }
+      }
+      listener.addSourceFileEdit(
+          'enable non-nullable analysis',
+          new Location(
+            optionsFile.path,
+            offset,
+            content.length,
+            line,
+            0,
+          ),
+          new SourceFileEdit(optionsFile.path, 0,
+              edits: [new SourceEdit(offset, 0, content)]));
+    }
+  }
+
+  void processYamlException(String action, String optionsFilePath, error) {
+    listener.addRecommendation('''Failed to $action options file
+  $optionsFilePath
+  $error
+
+  Manually update this file to enable non-nullable by adding:
+
+    analyzer:
+      enable-experiment:
+        - non-nullable
+''');
+    _packageIsNNBD = false;
   }
 
   @override
-  Future<void> processUnit2(ResolvedUnitResult result) async {
-    migration.processInput(result);
+  Future<void> processUnit(int phase, ResolvedUnitResult result) async {
+    if (!_packageIsNNBD) {
+      return;
+    }
+    switch (phase) {
+      case 0:
+        migration.prepareInput(result);
+        break;
+      case 1:
+        migration.processInput(result);
+        break;
+      default:
+        throw new ArgumentError('Unsupported phase $phase');
+    }
+  }
+
+  static void task(DartFixRegistrar registrar, DartFixListener listener) {
+    registrar.registerCodeTask(new NonNullableFix(listener));
   }
 }
 
@@ -51,9 +184,13 @@
   NullabilityMigrationAdapter(this.listener);
 
   @override
+  void addEdit(SingleNullabilityFix fix, SourceEdit edit) {
+    listener.addEditWithoutSuggestion(fix.source, edit);
+  }
+
+  @override
   void addFix(SingleNullabilityFix fix) {
     // TODO(danrubel): Update the description based upon the [fix.kind]
-    listener.addSourceEdits(
-        fix.kind.appliedMessage, fix.location, fix.source, fix.sourceEdits);
+    listener.addSuggestion(fix.kind.appliedMessage, fix.location);
   }
 }
diff --git a/pkg/analysis_server/lib/src/edit/fix/prefer_for_elements_to_map_fromIterable_fix.dart b/pkg/analysis_server/lib/src/edit/fix/prefer_for_elements_to_map_fromIterable_fix.dart
new file mode 100644
index 0000000..84ecff9
--- /dev/null
+++ b/pkg/analysis_server/lib/src/edit/fix/prefer_for_elements_to_map_fromIterable_fix.dart
@@ -0,0 +1,69 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/plugin/edit/assist/assist_core.dart';
+import 'package:analysis_server/src/edit/fix/dartfix_listener.dart';
+import 'package:analysis_server/src/edit/fix/dartfix_registrar.dart';
+import 'package:analysis_server/src/edit/fix/fix_lint_task.dart';
+import 'package:analysis_server/src/services/correction/assist.dart';
+import 'package:analysis_server/src/services/correction/assist_internal.dart';
+import 'package:analysis_server/src/services/correction/change_workspace.dart';
+import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/error/error.dart';
+import 'package:analyzer/src/lint/registry.dart';
+
+class PreferForElementsToMapFromIterableFix extends FixLintTask {
+  final List<AstNode> nodes = <AstNode>[];
+
+  PreferForElementsToMapFromIterableFix(DartFixListener listener)
+      : super(listener);
+
+  @override
+  Future<void> applyLocalFixes(ResolvedUnitResult result) async {
+    while (nodes.isNotEmpty) {
+      AstNode node = nodes.removeLast();
+      AssistProcessor processor = new AssistProcessor(
+        new DartAssistContextImpl(
+            DartChangeWorkspace(listener.server.currentSessions),
+            result,
+            node.offset,
+            node.length),
+      );
+      List<Assist> assists =
+          await processor.computeAssist(DartAssistKind.CONVERT_TO_FOR_ELEMENT);
+
+      final location = listener.locationFor(result, node.offset, node.length);
+      if (assists.isNotEmpty) {
+        for (Assist assist in assists) {
+          listener.addSourceChange(
+              assist.kind.message, location, assist.change);
+        }
+      } else {
+        listener.addRecommendation(
+            'Convert to for elements assist not found', location);
+      }
+    }
+
+    return null;
+  }
+
+  @override
+  Future<void> applyRemainingFixes() {
+    return null;
+  }
+
+  @override
+  void reportErrorForNode(ErrorCode errorCode, AstNode node,
+      [List<Object> arguments]) {
+    nodes.add(node);
+  }
+
+  static void task(DartFixRegistrar registrar, DartFixListener listener) {
+    registrar.registerLintTask(
+      Registry.ruleRegistry['prefer_for_elements_to_map_fromIterable'],
+      new PreferForElementsToMapFromIterableFix(listener),
+    );
+  }
+}
diff --git a/pkg/analysis_server/lib/src/edit/fix/prefer_if_elements_to_conditional_expressions_fix.dart b/pkg/analysis_server/lib/src/edit/fix/prefer_if_elements_to_conditional_expressions_fix.dart
new file mode 100644
index 0000000..0dbdf26
--- /dev/null
+++ b/pkg/analysis_server/lib/src/edit/fix/prefer_if_elements_to_conditional_expressions_fix.dart
@@ -0,0 +1,69 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/plugin/edit/assist/assist_core.dart';
+import 'package:analysis_server/src/edit/fix/dartfix_listener.dart';
+import 'package:analysis_server/src/edit/fix/dartfix_registrar.dart';
+import 'package:analysis_server/src/edit/fix/fix_lint_task.dart';
+import 'package:analysis_server/src/services/correction/assist.dart';
+import 'package:analysis_server/src/services/correction/assist_internal.dart';
+import 'package:analysis_server/src/services/correction/change_workspace.dart';
+import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/error/error.dart';
+import 'package:analyzer/src/lint/registry.dart';
+
+class PreferIfElementsToConditionalExpressionsFix extends FixLintTask {
+  final List<AstNode> nodes = <AstNode>[];
+
+  PreferIfElementsToConditionalExpressionsFix(DartFixListener listener)
+      : super(listener);
+
+  @override
+  Future<void> applyLocalFixes(ResolvedUnitResult result) async {
+    while (nodes.isNotEmpty) {
+      AstNode node = nodes.removeLast();
+      AssistProcessor processor = new AssistProcessor(
+        new DartAssistContextImpl(
+            DartChangeWorkspace(listener.server.currentSessions),
+            result,
+            node.offset,
+            node.length),
+      );
+      List<Assist> assists =
+          await processor.computeAssist(DartAssistKind.CONVERT_TO_IF_ELEMENT);
+
+      final location = listener.locationFor(result, node.offset, node.length);
+      if (assists.isNotEmpty) {
+        for (Assist assist in assists) {
+          listener.addSourceChange(
+              assist.kind.message, location, assist.change);
+        }
+      } else {
+        listener.addRecommendation(
+            'Convert to if elements assist not found', location);
+      }
+    }
+
+    return null;
+  }
+
+  @override
+  Future<void> applyRemainingFixes() {
+    return null;
+  }
+
+  @override
+  void reportErrorForNode(ErrorCode errorCode, AstNode node,
+      [List<Object> arguments]) {
+    nodes.add(node);
+  }
+
+  static void task(DartFixRegistrar registrar, DartFixListener listener) {
+    registrar.registerLintTask(
+      Registry.ruleRegistry['prefer_if_elements_to_conditional_expressions'],
+      new PreferIfElementsToConditionalExpressionsFix(listener),
+    );
+  }
+}
diff --git a/pkg/analysis_server/lib/src/edit/fix/prefer_spread_collections_fix.dart b/pkg/analysis_server/lib/src/edit/fix/prefer_spread_collections_fix.dart
new file mode 100644
index 0000000..caff2e6
--- /dev/null
+++ b/pkg/analysis_server/lib/src/edit/fix/prefer_spread_collections_fix.dart
@@ -0,0 +1,68 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/plugin/edit/assist/assist_core.dart';
+import 'package:analysis_server/src/edit/fix/dartfix_listener.dart';
+import 'package:analysis_server/src/edit/fix/dartfix_registrar.dart';
+import 'package:analysis_server/src/edit/fix/fix_lint_task.dart';
+import 'package:analysis_server/src/services/correction/assist.dart';
+import 'package:analysis_server/src/services/correction/assist_internal.dart';
+import 'package:analysis_server/src/services/correction/change_workspace.dart';
+import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/error/error.dart';
+import 'package:analyzer/src/lint/registry.dart';
+
+class PreferSpreadCollectionsFix extends FixLintTask {
+  final List<AstNode> nodes = <AstNode>[];
+
+  PreferSpreadCollectionsFix(DartFixListener listener) : super(listener);
+
+  @override
+  Future<void> applyLocalFixes(ResolvedUnitResult result) async {
+    while (nodes.isNotEmpty) {
+      AstNode node = nodes.removeLast();
+      AssistProcessor processor = new AssistProcessor(
+        new DartAssistContextImpl(
+            DartChangeWorkspace(listener.server.currentSessions),
+            result,
+            node.offset,
+            0),
+      );
+      List<Assist> assists =
+          await processor.computeAssist(DartAssistKind.CONVERT_TO_SPREAD);
+
+      final location = listener.locationFor(result, node.offset, node.length);
+      if (assists.isNotEmpty) {
+        for (Assist assist in assists) {
+          listener.addSourceChange(
+              assist.kind.message, location, assist.change);
+        }
+      } else {
+        listener.addRecommendation(
+            'Convert to spread assist not found', location);
+      }
+    }
+
+    return null;
+  }
+
+  @override
+  Future<void> applyRemainingFixes() {
+    return null;
+  }
+
+  @override
+  void reportErrorForNode(ErrorCode errorCode, AstNode node,
+      [List<Object> arguments]) {
+    nodes.add(node);
+  }
+
+  static void task(DartFixRegistrar registrar, DartFixListener listener) {
+    registrar.registerLintTask(
+      Registry.ruleRegistry['prefer_spread_collections'],
+      new PreferSpreadCollectionsFix(listener),
+    );
+  }
+}
diff --git a/pkg/analysis_server/lib/src/flutter/flutter_notifications.dart b/pkg/analysis_server/lib/src/flutter/flutter_notifications.dart
index 054a199..3cc2d2e 100644
--- a/pkg/analysis_server/lib/src/flutter/flutter_notifications.dart
+++ b/pkg/analysis_server/lib/src/flutter/flutter_notifications.dart
@@ -5,24 +5,19 @@
 import 'package:analysis_server/src/analysis_server.dart';
 import 'package:analysis_server/src/flutter/flutter_outline_computer.dart';
 import 'package:analysis_server/src/protocol_server.dart' as protocol;
-import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/src/generated/resolver.dart';
-import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/dart/analysis/results.dart';
 
 void sendFlutterNotificationOutline(
-    AnalysisServer server,
-    String file,
-    String content,
-    LineInfo lineInfo,
-    CompilationUnit dartUnit,
-    TypeProvider typeProvider) {
+    AnalysisServer server, ResolvedUnitResult resolvedUnit) {
   _sendNotification(server, () {
-    var computer = new FlutterOutlineComputer(
-        file, content, lineInfo, dartUnit, typeProvider);
+    var computer = new FlutterOutlineComputer(resolvedUnit);
     protocol.FlutterOutline outline = computer.compute();
     // send notification
-    var params = new protocol.FlutterOutlineParams(file, outline,
-        instrumentedCode: computer.instrumentedCode);
+    var params = new protocol.FlutterOutlineParams(
+      resolvedUnit.path,
+      outline,
+      instrumentedCode: computer.instrumentedCode,
+    );
     server.sendNotification(params.toNotification());
   });
 }
diff --git a/pkg/analysis_server/lib/src/flutter/flutter_outline_computer.dart b/pkg/analysis_server/lib/src/flutter/flutter_outline_computer.dart
index d6fae03..2df986e 100644
--- a/pkg/analysis_server/lib/src/flutter/flutter_outline_computer.dart
+++ b/pkg/analysis_server/lib/src/flutter/flutter_outline_computer.dart
@@ -6,11 +6,11 @@
 import 'package:analysis_server/src/protocol_server.dart' as protocol;
 import 'package:analysis_server/src/protocol_server.dart';
 import 'package:analysis_server/src/utilities/flutter.dart';
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/source.dart';
 
 /// Computer for Flutter specific outlines.
@@ -28,11 +28,8 @@
 }
 ''';
 
-  final String file;
-  final String content;
-  final LineInfo lineInfo;
-  final CompilationUnit unit;
-  final TypeProvider typeProvider;
+  final ResolvedUnitResult resolvedUnit;
+  Flutter flutter;
 
   final List<protocol.FlutterOutline> _depthFirstOrder = [];
 
@@ -45,18 +42,20 @@
   final List<protocol.SourceEdit> instrumentationEdits = [];
   String instrumentedCode;
 
-  FlutterOutlineComputer(
-      this.file, this.content, this.lineInfo, this.unit, this.typeProvider);
+  FlutterOutlineComputer(this.resolvedUnit);
 
   protocol.FlutterOutline compute() {
     protocol.Outline dartOutline = new DartUnitOutlineComputer(
-            file, lineInfo, unit,
-            withBasicFlutter: false)
-        .compute();
+      resolvedUnit,
+      withBasicFlutter: false,
+    ).compute();
+
+    flutter = Flutter.of(resolvedUnit.session);
 
     // Find widget classes.
     // IDEA plugin only supports rendering widgets in libraries.
-    if (unit.declaredElement.source == unit.declaredElement.librarySource) {
+    var unitElement = resolvedUnit.unit.declaredElement;
+    if (unitElement.source == unitElement.librarySource) {
       _findWidgets();
     }
 
@@ -64,14 +63,16 @@
     var flutterDartOutline = _convert(dartOutline);
 
     // Create outlines for widgets.
-    unit.accept(new _FlutterOutlineBuilder(this));
+    resolvedUnit.unit.accept(new _FlutterOutlineBuilder(this));
 
     // Compute instrumented code.
     if (widgets.values.any((w) => w.hasDesignTimeConstructor)) {
       _rewriteRelativeDirectives();
       instrumentationEdits.sort((a, b) => b.offset - a.offset);
-      instrumentedCode =
-          SourceEdit.applySequence(content, instrumentationEdits);
+      instrumentedCode = SourceEdit.applySequence(
+        resolvedUnit.content,
+        instrumentationEdits,
+      );
       instrumentedCode += RENDER_APPEND;
     }
 
@@ -91,7 +92,7 @@
 
     String name = parameter.displayName;
 
-    String label = content.substring(argument.offset, argument.end);
+    var label = resolvedUnit.content.substring(argument.offset, argument.end);
     if (label.contains('\n')) {
       label = '…';
     }
@@ -116,7 +117,7 @@
         }
       } else if (argument is ListLiteral) {
         label = '[…]';
-      } else if (argument is MapLiteral) {
+      } else if (argument is SetOrMapLiteral) {
         label = '{…}';
       }
       attributes.add(new protocol.FlutterOutlineAttribute(name, label));
@@ -167,7 +168,7 @@
   /// a widget reference outline item.
   protocol.FlutterOutline _createOutline(Expression node, bool withGeneric) {
     DartType type = node.staticType;
-    if (!isWidgetType(type)) {
+    if (!flutter.isWidgetType(type)) {
       return null;
     }
     String className = type.element.displayName;
@@ -178,8 +179,9 @@
       var attributes = <protocol.FlutterOutlineAttribute>[];
       var children = <protocol.FlutterOutline>[];
       for (var argument in node.argumentList.arguments) {
-        bool isWidgetArgument = isWidgetType(argument.staticType);
-        bool isWidgetListArgument = isListOfWidgetsType(argument.staticType);
+        bool isWidgetArgument = flutter.isWidgetType(argument.staticType);
+        bool isWidgetListArgument =
+            flutter.isListOfWidgetsType(argument.staticType);
 
         String parentAssociationLabel;
         Expression childrenExpression;
@@ -200,10 +202,25 @@
         } else if (isWidgetListArgument) {
           if (childrenExpression is ListLiteral) {
             for (var element in childrenExpression.elements) {
-              var child = _createOutline(element, true);
-              if (child != null) {
-                children.add(child);
+              void addChildrenFrom(CollectionElement element) {
+                if (element is Expression) {
+                  var child = _createOutline(element, true);
+                  if (child != null) {
+                    children.add(child);
+                  }
+                } else if (element is IfElement) {
+                  addChildrenFrom(element.thenElement);
+                  addChildrenFrom(element.elseElement);
+                } else if (element is ForElement) {
+                  addChildrenFrom(element.body);
+                } else if (element is SpreadElement) {
+                  // Ignored. It's possible that we might be able to extract
+                  // some information from some spread expressions, but it seems
+                  // unlikely enough that we're not handling it at the moment.
+                }
               }
+
+              addChildrenFrom(element);
             }
           }
         } else {
@@ -284,13 +301,13 @@
     }
 
     ClassElement stateElement;
-    if (stateType is InterfaceType && isState(stateType.element)) {
+    if (stateType is InterfaceType && flutter.isState(stateType.element)) {
       stateElement = stateType.element;
     } else {
       return null;
     }
 
-    for (var stateNode in unit.declarations) {
+    for (var stateNode in resolvedUnit.unit.declarations) {
       if (stateNode is ClassDeclaration &&
           stateNode.declaredElement == stateElement) {
         return stateNode;
@@ -302,7 +319,7 @@
 
   /// Fill [widgets] with information about classes that can be rendered.
   void _findWidgets() {
-    for (var widget in unit.declarations) {
+    for (var widget in resolvedUnit.unit.declarations) {
       if (widget is ClassDeclaration) {
         int nameOffset = widget.name.offset;
 
@@ -310,10 +327,10 @@
         bool hasDesignTimeConstructor = designTimeConstructor != null;
 
         InterfaceType superType = widget.declaredElement.supertype;
-        if (isExactlyStatelessWidgetType(superType)) {
+        if (flutter.isExactlyStatelessWidgetType(superType)) {
           widgets[nameOffset] =
               new _WidgetClass(nameOffset, hasDesignTimeConstructor);
-        } else if (isExactlyStatefulWidgetType(superType)) {
+        } else if (flutter.isExactlyStatefulWidgetType(superType)) {
           ClassDeclaration state = _findState(widget);
           if (state != null) {
             widgets[nameOffset] =
@@ -349,7 +366,7 @@
   /// The instrumented code is put into a temporary directory for Dart VM to
   /// run. So, any relative URIs must be changed to corresponding absolute URIs.
   void _rewriteRelativeDirectives() {
-    for (var directive in unit.directives) {
+    for (var directive in resolvedUnit.unit.directives) {
       if (directive is UriBasedDirective) {
         String uriContent = directive.uriContent;
         Source source = directive.uriSource;
diff --git a/pkg/analysis_server/lib/src/lsp/constants.dart b/pkg/analysis_server/lib/src/lsp/constants.dart
index aaf762f..2c4999c 100644
--- a/pkg/analysis_server/lib/src/lsp/constants.dart
+++ b/pkg/analysis_server/lib/src/lsp/constants.dart
@@ -41,6 +41,7 @@
   static const FileHasErrors = const ErrorCodes(-32008);
   static const ClientFailedToApplyEdit = const ErrorCodes(-32009);
   static const RenameNotValid = const ErrorCodes(-32010);
+  static const ServerShuttingDown = const ErrorCodes(-32011);
 
   /// An error raised when the server detects that the server and client are out
   /// of sync and cannot recover. For example if a textDocument/didChange notification
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/custom/handler_diagnostic_server.dart b/pkg/analysis_server/lib/src/lsp/handlers/custom/handler_diagnostic_server.dart
index 7a3dec6..5d75dde 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/custom/handler_diagnostic_server.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/custom/handler_diagnostic_server.dart
@@ -17,7 +17,7 @@
   Method get handlesMessage => CustomMethods.DiagnosticServer;
 
   @override
-  void convertParams(Map<String, dynamic> json) => null;
+  LspJsonHandler<void> get jsonHandler => NullJsonHandler;
 
   @override
   Future<ErrorOr<DartDiagnosticServer>> handle(void _) async {
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_change_workspace_folders.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_change_workspace_folders.dart
index 6823eb8..c43057f 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_change_workspace_folders.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_change_workspace_folders.dart
@@ -9,14 +9,24 @@
 
 class WorkspaceFoldersHandler
     extends MessageHandler<DidChangeWorkspaceFoldersParams, void> {
-  WorkspaceFoldersHandler(LspAnalysisServer server) : super(server);
+  // Whether to update analysis roots based on the open workspace folders.
+  bool updateAnalysisRoots;
+
+  WorkspaceFoldersHandler(LspAnalysisServer server, this.updateAnalysisRoots)
+      : super(server);
+
   Method get handlesMessage => Method.workspace_didChangeWorkspaceFolders;
 
   @override
-  DidChangeWorkspaceFoldersParams convertParams(Map<String, dynamic> json) =>
-      DidChangeWorkspaceFoldersParams.fromJson(json);
+  LspJsonHandler<DidChangeWorkspaceFoldersParams> get jsonHandler =>
+      DidChangeWorkspaceFoldersParams.jsonHandler;
 
   ErrorOr<void> handle(DidChangeWorkspaceFoldersParams params) {
+    // Don't do anything if our analysis roots are not based on open workspaces.
+    if (!updateAnalysisRoots) {
+      return success();
+    }
+
     final added = params?.event?.added
         ?.map((wf) => Uri.parse(wf.uri).toFilePath())
         ?.toList();
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_code_actions.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_code_actions.dart
index 3788e2c..c55a22e 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_code_actions.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_code_actions.dart
@@ -29,8 +29,8 @@
   Method get handlesMessage => Method.textDocument_codeAction;
 
   @override
-  CodeActionParams convertParams(Map<String, dynamic> json) =>
-      CodeActionParams.fromJson(json);
+  LspJsonHandler<CodeActionParams> get jsonHandler =>
+      CodeActionParams.jsonHandler;
 
   Future<ErrorOr<List<Either2<Command, CodeAction>>>> handle(
       CodeActionParams params) async {
@@ -115,9 +115,7 @@
     int length,
     ResolvedUnitResult unit,
   ) async {
-    // TODO(dantup): Is it acceptable not to support these for clients that can't
-    // handle Code Action literals? (Doing so requires we encode this into a
-    // command/arguments set and allow the client to call us back later).
+    // We only support these for clients that advertise codeActionLiteralSupport.
     if (!clientSupportsLiteralCodeActions ||
         !clientSupportedCodeActionKinds.contains(CodeActionKind.Refactor)) {
       return const [];
@@ -168,9 +166,7 @@
     Range range,
     ResolvedUnitResult unit,
   ) async {
-    // TODO(dantup): Is it acceptable not to support these for clients that can't
-    // handle Code Action literals? (Doing so requires we encode this into a
-    // command/arguments set and allow the client to call us back later).
+    // We only support these for clients that advertise codeActionLiteralSupport.
     if (!clientSupportsLiteralCodeActions ||
         !clientSupportedCodeActionKinds.contains(CodeActionKind.QuickFix)) {
       return const [];
@@ -214,9 +210,7 @@
     Range range,
     ResolvedUnitResult unit,
   ) async {
-    // TODO(dantup): Is it acceptable not to support these for clients that can't
-    // handle Code Action literals? (Doing so requires we encode this into a
-    // command/arguments set and allow the client to call us back later).
+    // We only support these for clients that advertise codeActionLiteralSupport.
     if (!clientSupportsLiteralCodeActions ||
         !clientSupportedCodeActionKinds.contains(CodeActionKind.Refactor)) {
       return const [];
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_completion.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_completion.dart
index 1f845ef..67a3fa8 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_completion.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_completion.dart
@@ -45,8 +45,8 @@
   Method get handlesMessage => Method.textDocument_completion;
 
   @override
-  CompletionParams convertParams(Map<String, dynamic> json) =>
-      CompletionParams.fromJson(json);
+  LspJsonHandler<CompletionParams> get jsonHandler =>
+      CompletionParams.jsonHandler;
 
   Future<ErrorOr<List<CompletionItem>>> handle(CompletionParams params) async {
     final completionCapabilities =
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_definition.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_definition.dart
index 90912c6..51f7b2f 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_definition.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_definition.dart
@@ -19,8 +19,8 @@
   Method get handlesMessage => Method.textDocument_definition;
 
   @override
-  TextDocumentPositionParams convertParams(Map<String, dynamic> json) =>
-      TextDocumentPositionParams.fromJson(json);
+  LspJsonHandler<TextDocumentPositionParams> get jsonHandler =>
+      TextDocumentPositionParams.jsonHandler;
 
   Future<ErrorOr<List<Location>>> handle(
       TextDocumentPositionParams params) async {
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_document_highlights.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_document_highlights.dart
index cc21c40..c2fabbd 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_document_highlights.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_document_highlights.dart
@@ -18,8 +18,8 @@
   Method get handlesMessage => Method.textDocument_documentHighlight;
 
   @override
-  TextDocumentPositionParams convertParams(Map<String, dynamic> json) =>
-      TextDocumentPositionParams.fromJson(json);
+  LspJsonHandler<TextDocumentPositionParams> get jsonHandler =>
+      TextDocumentPositionParams.jsonHandler;
 
   Future<ErrorOr<List<DocumentHighlight>>> handle(
       TextDocumentPositionParams params) async {
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_document_symbols.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_document_symbols.dart
index 7810b7f..6c5b120 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_document_symbols.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_document_symbols.dart
@@ -44,8 +44,8 @@
   Method get handlesMessage => Method.textDocument_documentSymbol;
 
   @override
-  DocumentSymbolParams convertParams(Map<String, dynamic> json) =>
-      DocumentSymbolParams.fromJson(json);
+  LspJsonHandler<DocumentSymbolParams> get jsonHandler =>
+      DocumentSymbolParams.jsonHandler;
 
   Future<ErrorOr<Either2<List<DocumentSymbol>, List<SymbolInformation>>>>
       handle(DocumentSymbolParams params) async {
@@ -112,8 +112,7 @@
     String path,
     ResolvedUnitResult unit,
   ) {
-    final computer =
-        new DartUnitOutlineComputer(path, unit.lineInfo, unit.unit);
+    final computer = new DartUnitOutlineComputer(unit);
     final outline = computer.compute();
 
     if (clientSupportsDocumentSymbol) {
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_execute_command.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_execute_command.dart
index a1bb950..b40f4b4 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_execute_command.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_execute_command.dart
@@ -27,8 +27,8 @@
   Method get handlesMessage => Method.workspace_executeCommand;
 
   @override
-  ExecuteCommandParams convertParams(Map<String, dynamic> json) =>
-      ExecuteCommandParams.fromJson(json);
+  LspJsonHandler<ExecuteCommandParams> get jsonHandler =>
+      ExecuteCommandParams.jsonHandler;
 
   Future<ErrorOr<Object>> handle(ExecuteCommandParams params) async {
     final handler = commandHandlers[params.command];
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_exit.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_exit.dart
index 4f3f320..c301118 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_exit.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_exit.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:async';
+import 'dart:io';
 
 import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
 import 'package:analysis_server/lsp_protocol/protocol_special.dart';
@@ -10,19 +11,29 @@
 import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
 
 class ExitMessageHandler extends MessageHandler<void, void> {
-  ExitMessageHandler(LspAnalysisServer server) : super(server);
+  final bool clientDidCallShutdown;
+
+  ExitMessageHandler(
+    LspAnalysisServer server, {
+    this.clientDidCallShutdown = false,
+  }) : super(server);
+
   Method get handlesMessage => Method.exit;
 
   @override
-  void convertParams(Map<String, dynamic> json) => null;
+  LspJsonHandler<void> get jsonHandler => NullJsonHandler;
 
   @override
   Future<ErrorOr<void>> handle(void _) async {
-    // TODO(dantup): Spec says we should exit with a code of 1 if we had not
-    // received a shutdown request prior to exit.
-    // TODO(dantup): Probably we should add a new state for "shutting down"
-    // that refuses any more requests between shutdown and exit.
+    // Set a flag that the server shutdown is being controlled here to ensure
+    // that the normal code that shuts down the server when the channel closes
+    // does not fire.
+    server.willExit = true;
+
     await server.shutdown();
+    new Future(() {
+      exit(clientDidCallShutdown ? 0 : 1);
+    });
     return success();
   }
 }
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_folding.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_folding.dart
index 96e1a4a..50d8ca3 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_folding.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_folding.dart
@@ -17,8 +17,8 @@
   Method get handlesMessage => Method.textDocument_foldingRange;
 
   @override
-  FoldingRangeParams convertParams(Map<String, dynamic> json) =>
-      FoldingRangeParams.fromJson(json);
+  LspJsonHandler<FoldingRangeParams> get jsonHandler =>
+      FoldingRangeParams.jsonHandler;
 
   Future<ErrorOr<List<FoldingRange>>> handle(FoldingRangeParams params) async {
     final path = pathOfDoc(params.textDocument);
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_format_on_type.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_format_on_type.dart
index 37d6a9d..7426410 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_format_on_type.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_format_on_type.dart
@@ -18,8 +18,8 @@
   Method get handlesMessage => Method.textDocument_onTypeFormatting;
 
   @override
-  DocumentOnTypeFormattingParams convertParams(Map<String, dynamic> json) =>
-      DocumentOnTypeFormattingParams.fromJson(json);
+  LspJsonHandler<DocumentOnTypeFormattingParams> get jsonHandler =>
+      DocumentOnTypeFormattingParams.jsonHandler;
 
   ErrorOr<List<TextEdit>> formatFile(String path) {
     final file = server.resourceProvider.getFile(path);
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_formatting.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_formatting.dart
index b4e0b60..effe549 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_formatting.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_formatting.dart
@@ -18,8 +18,8 @@
   Method get handlesMessage => Method.textDocument_formatting;
 
   @override
-  DocumentFormattingParams convertParams(Map<String, dynamic> json) =>
-      DocumentFormattingParams.fromJson(json);
+  LspJsonHandler<DocumentFormattingParams> get jsonHandler =>
+      DocumentFormattingParams.jsonHandler;
 
   ErrorOr<List<TextEdit>> formatFile(String path) {
     final file = server.resourceProvider.getFile(path);
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_hover.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_hover.dart
index d9302ae..7d0db4f 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_hover.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_hover.dart
@@ -14,14 +14,15 @@
 import 'package:analysis_server/src/lsp/mapping.dart';
 import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/source/line_info.dart';
+import 'package:analyzer/src/dartdoc/dartdoc_directive_info.dart';
 
 class HoverHandler extends MessageHandler<TextDocumentPositionParams, Hover> {
   HoverHandler(LspAnalysisServer server) : super(server);
   Method get handlesMessage => Method.textDocument_hover;
 
   @override
-  TextDocumentPositionParams convertParams(Map<String, dynamic> json) =>
-      TextDocumentPositionParams.fromJson(json);
+  LspJsonHandler<TextDocumentPositionParams> get jsonHandler =>
+      TextDocumentPositionParams.jsonHandler;
 
   Future<ErrorOr<Hover>> handle(TextDocumentPositionParams params) async {
     final pos = params.position;
@@ -82,7 +83,16 @@
   }
 
   ErrorOr<Hover> _getHover(ResolvedUnitResult unit, int offset) {
-    final hover = new DartUnitHoverComputer(unit.unit, offset).compute();
+    final hover = new DartUnitHoverComputer(
+            // TODO(brianwilkerson) Add declarationsTracker to server in order to
+            //  enable dartdoc processing.
+//            server.declarationsTracker
+//                .getContext(unit.session.analysisContext)
+//                .dartdocDirectiveInfo,
+            new DartdocDirectiveInfo(),
+            unit.unit,
+            offset)
+        .compute();
     return success(toHover(unit.lineInfo, hover));
   }
 }
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_initialize.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_initialize.dart
index a67c282..88423de 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_initialize.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_initialize.dart
@@ -16,30 +16,41 @@
   Method get handlesMessage => Method.initialize;
 
   @override
-  InitializeParams convertParams(Map<String, dynamic> json) =>
-      InitializeParams.fromJson(json);
+  LspJsonHandler<InitializeParams> get jsonHandler =>
+      InitializeParams.jsonHandler;
 
   ErrorOr<InitializeResult> handle(InitializeParams params) {
     final openWorkspacePaths = <String>[];
 
-    if (params.workspaceFolders != null) {
-      params.workspaceFolders.forEach((wf) {
-        openWorkspacePaths.add(Uri.parse(wf.uri).toFilePath());
-      });
-    }
-    if (params.rootUri != null) {
-      openWorkspacePaths.add(Uri.parse(params.rootUri).toFilePath());
-      // ignore: deprecated_member_use_from_same_package
-    } else if (params.rootPath != null) {
-      // This is deprecated according to LSP spec, but we still want to support
-      // it in case older clients send us it.
-      // ignore: deprecated_member_use_from_same_package
-      openWorkspacePaths.add(params.rootPath);
+    // The onlyAnalyzeProjectsWithOpenFiles flag allows opening huge folders
+    // without setting them as analysis roots. Instead, analysis roots will be
+    // based only on the open files.
+    final onlyAnalyzeProjectsWithOpenFiles = params.initializationOptions !=
+            null
+        ? params.initializationOptions['onlyAnalyzeProjectsWithOpenFiles'] ==
+            true
+        : false;
+
+    if (!onlyAnalyzeProjectsWithOpenFiles) {
+      if (params.workspaceFolders != null) {
+        params.workspaceFolders.forEach((wf) {
+          openWorkspacePaths.add(Uri.parse(wf.uri).toFilePath());
+        });
+      }
+      if (params.rootUri != null) {
+        openWorkspacePaths.add(Uri.parse(params.rootUri).toFilePath());
+        // ignore: deprecated_member_use_from_same_package
+      } else if (params.rootPath != null) {
+        // This is deprecated according to LSP spec, but we still want to support
+        // it in case older clients send us it.
+        // ignore: deprecated_member_use_from_same_package
+        openWorkspacePaths.add(params.rootPath);
+      }
     }
 
     server.handleClientConnection(params.capabilities);
-    server.messageHandler =
-        new InitializingStateMessageHandler(server, openWorkspacePaths);
+    server.messageHandler = new InitializingStateMessageHandler(
+        server, openWorkspacePaths, onlyAnalyzeProjectsWithOpenFiles);
 
     final codeActionLiteralSupport =
         params.capabilities.textDocument?.codeAction?.codeActionLiteralSupport;
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_initialized.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_initialized.dart
index 3462d78..463ac9e 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_initialized.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_initialized.dart
@@ -10,18 +10,23 @@
 
 class IntializedMessageHandler extends MessageHandler<InitializedParams, void> {
   final List<String> openWorkspacePaths;
-  IntializedMessageHandler(LspAnalysisServer server, this.openWorkspacePaths)
+  final bool onlyAnalyzeProjectsWithOpenFiles;
+  IntializedMessageHandler(LspAnalysisServer server, this.openWorkspacePaths,
+      this.onlyAnalyzeProjectsWithOpenFiles)
       : super(server);
   Method get handlesMessage => Method.initialized;
 
   @override
-  InitializedParams convertParams(Map<String, dynamic> json) =>
-      InitializedParams.fromJson(json);
+  LspJsonHandler<InitializedParams> get jsonHandler =>
+      InitializedParams.jsonHandler;
 
   ErrorOr<void> handle(InitializedParams params) {
-    server.messageHandler = new InitializedStateMessageHandler(server);
+    server.messageHandler = new InitializedStateMessageHandler(
+        server, onlyAnalyzeProjectsWithOpenFiles);
 
-    server.setAnalysisRoots(openWorkspacePaths);
+    if (!onlyAnalyzeProjectsWithOpenFiles) {
+      server.setAnalysisRoots(openWorkspacePaths);
+    }
 
     return success();
   }
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_references.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_references.dart
index 5f3fe45..c025819 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_references.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_references.dart
@@ -24,8 +24,8 @@
   Method get handlesMessage => Method.textDocument_references;
 
   @override
-  ReferenceParams convertParams(Map<String, dynamic> json) =>
-      ReferenceParams.fromJson(json);
+  LspJsonHandler<ReferenceParams> get jsonHandler =>
+      ReferenceParams.jsonHandler;
 
   @override
   Future<ErrorOr<List<Location>>> handle(ReferenceParams params) async {
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_reject.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_reject.dart
index 8cd06e5..b006c00 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_reject.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_reject.dart
@@ -18,7 +18,7 @@
       : super(server);
 
   @override
-  void convertParams(Map<String, dynamic> json) => null;
+  LspJsonHandler<void> get jsonHandler => NullJsonHandler;
 
   @override
   ErrorOr<void> handle(void _) {
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_rename.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_rename.dart
index 5433077..16ed7cd 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_rename.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_rename.dart
@@ -16,8 +16,8 @@
   Method get handlesMessage => Method.textDocument_prepareRename;
 
   @override
-  TextDocumentPositionParams convertParams(Map<String, dynamic> json) =>
-      TextDocumentPositionParams.fromJson(json);
+  LspJsonHandler<TextDocumentPositionParams> get jsonHandler =>
+      TextDocumentPositionParams.jsonHandler;
 
   @override
   Future<ErrorOr<RangeAndPlaceholder>> handle(
@@ -68,8 +68,7 @@
   Method get handlesMessage => Method.textDocument_rename;
 
   @override
-  RenameParams convertParams(Map<String, dynamic> json) =>
-      RenameParams.fromJson(json);
+  LspJsonHandler<RenameParams> get jsonHandler => RenameParams.jsonHandler;
 
   @override
   Future<ErrorOr<WorkspaceEdit>> handle(RenameParams params) async {
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_shutdown.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_shutdown.dart
index 82e50f6..c16a394 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_shutdown.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_shutdown.dart
@@ -4,6 +4,7 @@
 
 import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
 import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:analysis_server/src/lsp/handlers/handler_states.dart';
 import 'package:analysis_server/src/lsp/handlers/handlers.dart';
 import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
 
@@ -12,12 +13,17 @@
   Method get handlesMessage => Method.shutdown;
 
   @override
-  void convertParams(Map<String, dynamic> json) => null;
+  LspJsonHandler<void> get jsonHandler => NullJsonHandler;
 
   @override
   ErrorOr<void> handle(void _) {
+    // Move to the Shutting Down state so we won't process any more
+    // requests and the Exit notification will know it was a clean shutdown.
+    server.messageHandler = new ShuttingDownStateMessageHandler(server);
+
     // We can clean up and shut down here, but we cannot terminate the server
     // because that must be done after the exit notification.
+
     return success();
   }
 }
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_signature_help.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_signature_help.dart
index 3f3e195..7fa60a7 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_signature_help.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_signature_help.dart
@@ -10,6 +10,7 @@
 import 'package:analysis_server/src/lsp/handlers/handlers.dart';
 import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
 import 'package:analysis_server/src/lsp/mapping.dart';
+import 'package:analyzer/src/dartdoc/dartdoc_directive_info.dart';
 
 class SignatureHelpHandler
     extends MessageHandler<TextDocumentPositionParams, SignatureHelp> {
@@ -17,8 +18,8 @@
   Method get handlesMessage => Method.textDocument_signatureHelp;
 
   @override
-  TextDocumentPositionParams convertParams(Map<String, dynamic> json) =>
-      TextDocumentPositionParams.fromJson(json);
+  LspJsonHandler<TextDocumentPositionParams> get jsonHandler =>
+      TextDocumentPositionParams.jsonHandler;
 
   Future<ErrorOr<SignatureHelp>> handle(
       TextDocumentPositionParams params) async {
@@ -28,7 +29,15 @@
     final offset = await unit.mapResult((unit) => toOffset(unit.lineInfo, pos));
 
     return offset.mapResult((offset) {
-      final computer = new DartUnitSignatureComputer(unit.result.unit, offset);
+      final computer = new DartUnitSignatureComputer(
+          // TODO(brianwilkerson) Add declarationsTracker to server in order to
+          //  enable dartdoc processing.
+//          server.declarationsTracker
+//              .getContext(unit.result.session.analysisContext)
+//              .dartdocDirectiveInfo,
+          new DartdocDirectiveInfo(),
+          unit.result.unit,
+          offset);
       if (!computer.offsetIsValid) {
         return success(); // No error, just no valid hover.
       }
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_states.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_states.dart
index 7594631..cd79433 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_states.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_states.dart
@@ -14,6 +14,7 @@
 import 'package:analysis_server/src/lsp/handlers/handler_document_highlights.dart';
 import 'package:analysis_server/src/lsp/handlers/handler_document_symbols.dart';
 import 'package:analysis_server/src/lsp/handlers/handler_execute_command.dart';
+import 'package:analysis_server/src/lsp/handlers/handler_exit.dart';
 import 'package:analysis_server/src/lsp/handlers/handler_folding.dart';
 import 'package:analysis_server/src/lsp/handlers/handler_format_on_type.dart';
 import 'package:analysis_server/src/lsp/handlers/handler_formatting.dart';
@@ -22,6 +23,7 @@
 import 'package:analysis_server/src/lsp/handlers/handler_initialized.dart';
 import 'package:analysis_server/src/lsp/handlers/handler_references.dart';
 import 'package:analysis_server/src/lsp/handlers/handler_rename.dart';
+import 'package:analysis_server/src/lsp/handlers/handler_shutdown.dart';
 import 'package:analysis_server/src/lsp/handlers/handler_signature_help.dart';
 import 'package:analysis_server/src/lsp/handlers/handler_text_document_changes.dart';
 import 'package:analysis_server/src/lsp/handlers/handler_change_workspace_folders.dart';
@@ -45,14 +47,23 @@
 }
 
 class InitializedStateMessageHandler extends ServerStateMessageHandler {
-  InitializedStateMessageHandler(LspAnalysisServer server) : super(server) {
+  InitializedStateMessageHandler(
+    LspAnalysisServer server,
+    bool onlyAnalyzeProjectsWithOpenFiles,
+  ) : super(server) {
     reject(Method.initialize, ServerErrorCodes.ServerAlreadyInitialized,
         'Server already initialized');
     reject(Method.initialized, ServerErrorCodes.ServerAlreadyInitialized,
         'Server already initialized');
-    registerHandler(new TextDocumentOpenHandler(server));
+    registerHandler(new ShutdownMessageHandler(server));
+    registerHandler(new ExitMessageHandler(server));
+    registerHandler(
+      new TextDocumentOpenHandler(server, onlyAnalyzeProjectsWithOpenFiles),
+    );
     registerHandler(new TextDocumentChangeHandler(server));
-    registerHandler(new TextDocumentCloseHandler(server));
+    registerHandler(
+      new TextDocumentCloseHandler(server, onlyAnalyzeProjectsWithOpenFiles),
+    );
     registerHandler(new HoverHandler(server));
     registerHandler(new CompletionHandler(server));
     registerHandler(new SignatureHelpHandler(server));
@@ -64,7 +75,9 @@
     registerHandler(new DocumentSymbolHandler(server));
     registerHandler(new CodeActionHandler(server));
     registerHandler(new ExecuteCommandHandler(server));
-    registerHandler(new WorkspaceFoldersHandler(server));
+    registerHandler(
+      new WorkspaceFoldersHandler(server, !onlyAnalyzeProjectsWithOpenFiles),
+    );
     registerHandler(new PrepareRenameHandler(server));
     registerHandler(new RenameHandler(server));
     registerHandler(new FoldingHandler(server));
@@ -74,12 +87,15 @@
 }
 
 class InitializingStateMessageHandler extends ServerStateMessageHandler {
-  InitializingStateMessageHandler(
-      LspAnalysisServer server, List<String> openWorkspacePaths)
+  InitializingStateMessageHandler(LspAnalysisServer server,
+      List<String> openWorkspacePaths, bool onlyAnalyzeProjectsWithOpenFiles)
       : super(server) {
     reject(Method.initialize, ServerErrorCodes.ServerAlreadyInitialized,
         'Server already initialized');
-    registerHandler(new IntializedMessageHandler(server, openWorkspacePaths));
+    registerHandler(new ShutdownMessageHandler(server));
+    registerHandler(new ExitMessageHandler(server));
+    registerHandler(new IntializedMessageHandler(
+        server, openWorkspacePaths, onlyAnalyzeProjectsWithOpenFiles));
   }
 
   @override
@@ -97,6 +113,8 @@
 
 class UninitializedStateMessageHandler extends ServerStateMessageHandler {
   UninitializedStateMessageHandler(LspAnalysisServer server) : super(server) {
+    registerHandler(new ShutdownMessageHandler(server));
+    registerHandler(new ExitMessageHandler(server));
     registerHandler(new InitializeMessageHandler(server));
   }
 
@@ -110,3 +128,20 @@
         'Unable to handle ${message.method} before client has sent initialize request');
   }
 }
+
+class ShuttingDownStateMessageHandler extends ServerStateMessageHandler {
+  ShuttingDownStateMessageHandler(LspAnalysisServer server) : super(server) {
+    registerHandler(
+        new ExitMessageHandler(server, clientDidCallShutdown: true));
+  }
+
+  @override
+  FutureOr<ErrorOr<Object>> handleUnknownMessage(IncomingMessage message) {
+    // Silently drop non-requests.
+    if (message is! RequestMessage) {
+      return success();
+    }
+    return failure(ServerErrorCodes.ServerShuttingDown,
+        'Unable to handle ${message.method} after shutdown request');
+  }
+}
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_text_document_changes.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_text_document_changes.dart
index ea42bec..e083f5d 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_text_document_changes.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_text_document_changes.dart
@@ -4,11 +4,15 @@
 
 import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
 import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:analysis_server/src/context_manager.dart'
+    show ContextManagerImpl;
 import 'package:analysis_server/src/lsp/constants.dart';
 import 'package:analysis_server/src/lsp/handlers/handlers.dart';
 import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
 import 'package:analysis_server/src/lsp/mapping.dart';
 import 'package:analysis_server/src/lsp/source_edits.dart';
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:path/path.dart' show dirname, join;
 
 class TextDocumentChangeHandler
     extends MessageHandler<DidChangeTextDocumentParams, void> {
@@ -16,8 +20,8 @@
   Method get handlesMessage => Method.textDocument_didChange;
 
   @override
-  DidChangeTextDocumentParams convertParams(Map<String, dynamic> json) =>
-      DidChangeTextDocumentParams.fromJson(json);
+  LspJsonHandler<DidChangeTextDocumentParams> get jsonHandler =>
+      DidChangeTextDocumentParams.jsonHandler;
 
   ErrorOr<void> handle(DidChangeTextDocumentParams params) {
     final path = pathOfDoc(params.textDocument);
@@ -50,19 +54,44 @@
 
 class TextDocumentCloseHandler
     extends MessageHandler<DidCloseTextDocumentParams, void> {
-  TextDocumentCloseHandler(LspAnalysisServer server) : super(server);
+  /// Whether analysis roots are based on open files and should be updated.
+  bool updateAnalysisRoots;
+
+  TextDocumentCloseHandler(LspAnalysisServer server, this.updateAnalysisRoots)
+      : super(server);
+
   Method get handlesMessage => Method.textDocument_didClose;
 
   @override
-  DidCloseTextDocumentParams convertParams(Map<String, dynamic> json) =>
-      DidCloseTextDocumentParams.fromJson(json);
+  LspJsonHandler<DidCloseTextDocumentParams> get jsonHandler =>
+      DidCloseTextDocumentParams.jsonHandler;
 
   ErrorOr<void> handle(DidCloseTextDocumentParams params) {
     final path = pathOfDoc(params.textDocument);
     return path.mapResult((path) {
       server.removePriorityFile(path);
-      server.documentVersions[path] = null;
+      server.documentVersions.remove(path);
       server.updateOverlay(path, null);
+
+      if (updateAnalysisRoots) {
+        // If there are no other open files in this context, we can remove it
+        // from the analysis roots.
+        final contextFolder = server.contextManager.getContextFolderFor(path);
+        var hasOtherFilesInContext = false;
+        for (var otherDocPath in server.documentVersions.keys) {
+          if (server.contextManager.getContextFolderFor(otherDocPath) ==
+              contextFolder) {
+            hasOtherFilesInContext = true;
+            break;
+          }
+        }
+        if (!hasOtherFilesInContext) {
+          final projectFolder =
+              _findProjectFolder(server.resourceProvider, path);
+          server.updateAnalysisRoots([], [projectFolder]);
+        }
+      }
+
       return success();
     });
   }
@@ -70,12 +99,17 @@
 
 class TextDocumentOpenHandler
     extends MessageHandler<DidOpenTextDocumentParams, void> {
-  TextDocumentOpenHandler(LspAnalysisServer server) : super(server);
+  /// Whether analysis roots are based on open files and should be updated.
+  bool updateAnalysisRoots;
+
+  TextDocumentOpenHandler(LspAnalysisServer server, this.updateAnalysisRoots)
+      : super(server);
+
   Method get handlesMessage => Method.textDocument_didOpen;
 
   @override
-  DidOpenTextDocumentParams convertParams(Map<String, dynamic> json) =>
-      DidOpenTextDocumentParams.fromJson(json);
+  LspJsonHandler<DidOpenTextDocumentParams> get jsonHandler =>
+      DidOpenTextDocumentParams.jsonHandler;
 
   ErrorOr<void> handle(DidOpenTextDocumentParams params) {
     final doc = params.textDocument;
@@ -90,11 +124,62 @@
       );
       server.updateOverlay(path, doc.text);
 
+      final driver = server.contextManager.getDriverFor(path);
       // If the file did not exist, and is "overlay only", it still should be
       // analyzed. Add it to driver to which it should have been added.
-      server.contextManager.getDriverFor(path)?.addFile(path);
+
+      driver?.addFile(path);
+
+      // If there was no current driver for this file, then we may need to add
+      // its project folder as an analysis root.
+      if (updateAnalysisRoots && driver == null) {
+        final projectFolder = _findProjectFolder(server.resourceProvider, path);
+        if (projectFolder != null) {
+          server.updateAnalysisRoots([projectFolder], []);
+        } else {
+          // There was no pubspec - ideally we should add just the file
+          // here but we don't currently support that.
+          // https://github.com/dart-lang/sdk/issues/32256
+
+          // Send a warning to the user, but only if we haven't already in the
+          // last 60 seconds.
+          if (lastSentAnalyzeOpenFilesWarnings == null ||
+              (DateTime.now()
+                      .difference(lastSentAnalyzeOpenFilesWarnings)
+                      .inSeconds >
+                  60)) {
+            lastSentAnalyzeOpenFilesWarnings = DateTime.now();
+            server.showMessageToUser(
+                MessageType.Warning,
+                'When using onlyAnalyzeProjectsWithOpenFiles, files opened that '
+                'are not contained within project folders containing pubspec.yaml, '
+                '.packages or BUILD files will not be analyzed.');
+          }
+        }
+      }
 
       return success();
     });
   }
+
+  DateTime lastSentAnalyzeOpenFilesWarnings;
+}
+
+/// Finds the nearest ancestor to [filePath] that contains a pubspec/.packages/build file.
+String _findProjectFolder(ResourceProvider resourceProvider, String filePath) {
+  // TODO(dantup): Is there something we can reuse for this?
+  var folder = dirname(filePath);
+  while (folder != dirname(folder)) {
+    final pubspec =
+        resourceProvider.getFile(join(folder, ContextManagerImpl.PUBSPEC_NAME));
+    final packages = resourceProvider
+        .getFile(join(folder, ContextManagerImpl.PACKAGE_SPEC_NAME));
+    final build = resourceProvider.getFile(join(folder, 'BUILD'));
+
+    if (pubspec.exists || packages.exists || build.exists) {
+      return folder;
+    }
+    folder = dirname(folder);
+  }
+  return null;
 }
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handler_workspace_symbols.dart b/pkg/analysis_server/lib/src/lsp/handlers/handler_workspace_symbols.dart
index 3d41c0e..0f748d5 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handler_workspace_symbols.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handler_workspace_symbols.dart
@@ -20,8 +20,8 @@
   Method get handlesMessage => Method.workspace_symbol;
 
   @override
-  WorkspaceSymbolParams convertParams(Map<String, dynamic> json) =>
-      WorkspaceSymbolParams.fromJson(json);
+  LspJsonHandler<WorkspaceSymbolParams> get jsonHandler =>
+      WorkspaceSymbolParams.jsonHandler;
 
   Future<ErrorOr<List<SymbolInformation>>> handle(
       WorkspaceSymbolParams params) async {
diff --git a/pkg/analysis_server/lib/src/lsp/handlers/handlers.dart b/pkg/analysis_server/lib/src/lsp/handlers/handlers.dart
index 78684ec..29d6800 100644
--- a/pkg/analysis_server/lib/src/lsp/handlers/handlers.dart
+++ b/pkg/analysis_server/lib/src/lsp/handlers/handlers.dart
@@ -7,9 +7,7 @@
 import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
 import 'package:analysis_server/lsp_protocol/protocol_special.dart';
 import 'package:analysis_server/src/lsp/constants.dart';
-import 'package:analysis_server/src/lsp/handlers/handler_exit.dart';
 import 'package:analysis_server/src/lsp/handlers/handler_reject.dart';
-import 'package:analysis_server/src/lsp/handlers/handler_shutdown.dart';
 import 'package:analysis_server/src/lsp/lsp_analysis_server.dart';
 import 'package:analyzer/dart/analysis/results.dart';
 
@@ -68,7 +66,8 @@
   /// The method that this handler can handle.
   Method get handlesMessage;
 
-  P convertParams(Map<String, dynamic> json);
+  /// A handler that can parse and validate JSON params.
+  LspJsonHandler<P> get jsonHandler;
 
   FutureOr<ErrorOr<R>> handle(P params);
 
@@ -76,7 +75,12 @@
   /// return value will be sent back in a [ResponseMessage].
   /// [NotificationMessage]s are not expected to return results.
   FutureOr<ErrorOr<R>> handleMessage(IncomingMessage message) {
-    final params = convertParams(message.params);
+    if (!jsonHandler.validateParams(message.params)) {
+      return error(ErrorCodes.InvalidParams,
+          'Invalid params for ${message.method}', null);
+    }
+
+    final params = jsonHandler.convertParams(message.params);
     return handle(params);
   }
 }
@@ -86,11 +90,7 @@
   final LspAnalysisServer server;
   final Map<Method, MessageHandler> _messageHandlers = {};
 
-  ServerStateMessageHandler(this.server) {
-    // All server states support shutdown and exit.
-    registerHandler(new ShutdownMessageHandler(server));
-    registerHandler(new ExitMessageHandler(server));
-  }
+  ServerStateMessageHandler(this.server);
 
   ErrorOr<Object> failure<Object>(ErrorCodes code, String message,
           [String data]) =>
diff --git a/pkg/analysis_server/lib/src/lsp/lsp_analysis_server.dart b/pkg/analysis_server/lib/src/lsp/lsp_analysis_server.dart
index 5f99c59..a1c6cf2 100644
--- a/pkg/analysis_server/lib/src/lsp/lsp_analysis_server.dart
+++ b/pkg/analysis_server/lib/src/lsp/lsp_analysis_server.dart
@@ -132,6 +132,10 @@
 
   LspPerformance performanceStats = new LspPerformance();
 
+  /// Whether or not the server is controlling the shutdown and will exit
+  /// automatically.
+  bool willExit = false;
+
   /**
    * Initialize a newly created server to send and receive messages to the given
    * [channel].
@@ -248,14 +252,14 @@
         // requests we've sent) then show an error.
         final completer = completers[id];
         if (completer == null) {
-          showError('Response with ID $id was unexpected');
+          showErrorMessageToUser('Response with ID $id was unexpected');
         } else {
           completers.remove(id);
           completer.complete(message);
         }
       },
       (stringID) {
-        showError('Unexpected String ID for response $stringID');
+        showErrorMessageToUser('Unexpected String ID for response $stringID');
       },
     );
   }
@@ -284,7 +288,7 @@
               sendErrorResponse(message, result.error);
             }
           } else {
-            showError('Unknown message type');
+            showErrorMessageToUser('Unknown message type');
           }
         } catch (error, stackTrace) {
           final errorMessage = message is ResponseMessage
@@ -345,11 +349,11 @@
     } else if (message is ResponseMessage) {
       // For bad response messages where we can't respond with an error, send it as
       // show instead of log.
-      showError(error.message);
+      showErrorMessageToUser(error.message);
     } else {
       // For notifications where we couldn't respond with an error, send it as
       // show instead of log.
-      showError(error.message);
+      showErrorMessageToUser(error.message);
     }
 
     // Handle fatal errors where the client/server state is out of sync and we
@@ -402,7 +406,7 @@
     message = exception == null ? message : '$message: $exception';
 
     // Show message (without stack) to the user.
-    showError(message);
+    showErrorMessageToUser(message);
 
     logException(message, exception, stackTrace);
   }
@@ -442,10 +446,14 @@
     return contextManager.isInAnalysisRoot(file);
   }
 
-  void showError(String message) {
+  void showErrorMessageToUser(String message) {
+    showMessageToUser(MessageType.Error, message);
+  }
+
+  void showMessageToUser(MessageType type, String message) {
     channel.sendNotification(new NotificationMessage(
       Method.window_showMessage,
-      new ShowMessageParams(MessageType.Error, message),
+      new ShowMessageParams(type, message),
       jsonRpcVersion,
     ));
   }
diff --git a/pkg/analysis_server/lib/src/nullability/conditional_discard.dart b/pkg/analysis_server/lib/src/nullability/conditional_discard.dart
index 4b47370..3e09ed4 100644
--- a/pkg/analysis_server/lib/src/nullability/conditional_discard.dart
+++ b/pkg/analysis_server/lib/src/nullability/conditional_discard.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:analysis_server/src/nullability/nullability_node.dart';
 import 'package:analysis_server/src/nullability/unit_propagation.dart';
 
 /// Container for information gathered during nullability migration about a
@@ -11,15 +12,21 @@
 /// whose boolean value influences control flow (e.g. the condition of an `if`
 /// statement).
 class ConditionalDiscard {
-  /// Constraint variable whose value will be `true` if the code path that
-  /// results from the condition evaluating to `true` will be reachable after
+  /// Nullability node that will be `nullable` if the code path that results
+  /// from the condition evaluating to `true` will be reachable after
   /// nullability migration, and therefore should be kept.
-  final ConstraintVariable keepTrue;
+  ///
+  /// `null` if the code path should be kept regardless of the outcome of
+  /// migration.
+  final NullabilityNode trueGuard;
 
-  /// Constraint variable whose value will be `false` if the code path that
-  /// results from the condition evaluating to `false` will be reachable after
+  /// Nullability node that will be `nullable` if the code path that results
+  /// from the condition evaluating to `false` will be reachable after
   /// nullability migration, and therefore should be kept.
-  final ConstraintVariable keepFalse;
+  ///
+  /// `null` if the code path should be kept regardless of the outcome of
+  /// migration.
+  final NullabilityNode falseGuard;
 
   /// Indicates whether the condition is pure (free from side effects).
   ///
@@ -27,11 +34,19 @@
   /// variable or static variable), because evaluating it has no user-visible
   /// effect other than returning a boolean value.
   ///
-  /// If [pureCondition] is `false`, and either [keepTrue] or [keepFalse] is
+  /// If [pureCondition] is `false`, and either [trueGuard] or [falseGuard] is
   /// `false`, that it is safe to delete the condition expression as well as the
   /// dead code branch (e.g. it means that `if (x == null) f(); else g();` could
   /// be changed to simply `g();`).
   final bool pureCondition;
 
-  ConditionalDiscard(this.keepTrue, this.keepFalse, this.pureCondition);
+  ConditionalDiscard(this.trueGuard, this.falseGuard, this.pureCondition);
+
+  /// Indicates whether the code path that results from the condition evaluating
+  /// to `false` is reachable after migration.
+  bool get keepFalse => falseGuard == null || falseGuard.isNullable;
+
+  /// Indicates whether the code path that results from the condition evaluating
+  /// to `true` is reachable after migration.
+  bool get keepTrue => trueGuard == null || trueGuard.isNullable;
 }
diff --git a/pkg/analysis_server/lib/src/nullability/constraint_gatherer.dart b/pkg/analysis_server/lib/src/nullability/constraint_gatherer.dart
index ec6f294..a723c9a 100644
--- a/pkg/analysis_server/lib/src/nullability/constraint_gatherer.dart
+++ b/pkg/analysis_server/lib/src/nullability/constraint_gatherer.dart
@@ -6,6 +6,7 @@
 import 'package:analysis_server/src/nullability/constraint_variable_gatherer.dart';
 import 'package:analysis_server/src/nullability/decorated_type.dart';
 import 'package:analysis_server/src/nullability/expression_checks.dart';
+import 'package:analysis_server/src/nullability/nullability_node.dart';
 import 'package:analysis_server/src/nullability/transitional_api.dart';
 import 'package:analysis_server/src/nullability/unit_propagation.dart';
 import 'package:analyzer/dart/ast/ast.dart';
@@ -63,13 +64,13 @@
   /// boolean value could possibly affect nullability analysis.
   _ConditionInfo _conditionInfo;
 
-  /// The set of constraint variables that would have to be assigned the value
-  /// of `true` for the code currently being visited to be reachable.
+  /// The set of nullability nodes that would have to be `nullable` for the code
+  /// currently being visited to be reachable.
   ///
   /// Guard variables are attached to the left hand side of any generated
   /// constraints, so that constraints do not take effect if they come from
   /// code that can be proven unreachable by the migration tool.
-  final _guards = <ConstraintVariable>[];
+  final _guards = <NullabilityNode>[];
 
   /// Indicates whether the statement or expression being visited is within
   /// conditional control flow.  If `true`, this means that the enclosing
@@ -79,11 +80,14 @@
 
   ConstraintGatherer(TypeProvider typeProvider, this._variables,
       this._constraints, this._source, this._permissive, this.assumptions)
-      : _notNullType = DecoratedType(typeProvider.objectType, null),
-        _nonNullableBoolType = DecoratedType(typeProvider.boolType, null),
-        _nonNullableTypeType = DecoratedType(typeProvider.typeType, null),
+      : _notNullType =
+            DecoratedType(typeProvider.objectType, NullabilityNode.never),
+        _nonNullableBoolType =
+            DecoratedType(typeProvider.boolType, NullabilityNode.never),
+        _nonNullableTypeType =
+            DecoratedType(typeProvider.typeType, NullabilityNode.never),
         _nullType =
-            DecoratedType(typeProvider.nullType, ConstraintVariable.always);
+            DecoratedType(typeProvider.nullType, NullabilityNode.always);
 
   /// Gets the decorated type of [element] from [_variables], performing any
   /// necessary substitutions.
@@ -132,7 +136,8 @@
     if (identical(_conditionInfo?.condition, node.condition)) {
       if (!_inConditionalControlFlow &&
           _conditionInfo.trueDemonstratesNonNullIntent != null) {
-        _recordFact(_conditionInfo.trueDemonstratesNonNullIntent);
+        _conditionInfo.trueDemonstratesNonNullIntent
+            ?.recordNonNullIntent(_constraints, _guards);
       }
     }
     node.message?.accept(this);
@@ -154,8 +159,8 @@
           bool isPure = node.leftOperand is SimpleIdentifier;
           var conditionInfo = _ConditionInfo(node,
               isPure: isPure,
-              trueGuard: leftType.nullable,
-              falseDemonstratesNonNullIntent: leftType.nonNullIntent);
+              trueGuard: leftType.node,
+              falseDemonstratesNonNullIntent: leftType.node);
           _conditionInfo = node.operator.type == TokenType.EQ_EQ
               ? conditionInfo
               : conditionInfo.not(node);
@@ -181,6 +186,11 @@
   }
 
   @override
+  DecoratedType visitBooleanLiteral(BooleanLiteral node) {
+    return DecoratedType(node.staticType, NullabilityNode.never);
+  }
+
+  @override
   DecoratedType visitClassDeclaration(ClassDeclaration node) {
     node.members.accept(this);
     return null;
@@ -194,8 +204,10 @@
     assert(_isSimple(thenType)); // TODO(paulberry)
     var elseType = node.elseExpression.accept(this);
     assert(_isSimple(elseType)); // TODO(paulberry)
-    var overallType = DecoratedType(node.staticType,
-        _joinNullabilities(node, thenType.nullable, elseType.nullable));
+    var overallType = DecoratedType(
+        node.staticType,
+        NullabilityNode.forConditionalexpression(
+            node, thenType.node, elseType.node, _joinNullabilities));
     _variables.recordDecoratedExpressionType(node, overallType);
     return overallType;
   }
@@ -210,14 +222,21 @@
       } else if (node.declaredElement.isOptionalPositional ||
           assumptions.namedNoDefaultParameterHeuristic ==
               NamedNoDefaultParameterHeuristic.assumeNullable) {
-        _recordFact(getOrComputeElementType(node.declaredElement).nullable);
+        NullabilityNode.recordAssignment(
+            NullabilityNode.always,
+            getOrComputeElementType(node.declaredElement).node,
+            null,
+            _guards,
+            _constraints,
+            false);
       } else {
         assert(assumptions.namedNoDefaultParameterHeuristic ==
             NamedNoDefaultParameterHeuristic.assumeRequired);
       }
     } else {
       _handleAssignment(
-          getOrComputeElementType(node.declaredElement), defaultValue);
+          getOrComputeElementType(node.declaredElement), defaultValue,
+          canInsertChecks: false);
     }
     return null;
   }
@@ -234,8 +253,12 @@
     assert(_currentFunctionType == null);
     _currentFunctionType =
         _variables.decoratedElementType(node.declaredElement);
-    node.functionExpression.body.accept(this);
-    _currentFunctionType = null;
+    _inConditionalControlFlow = false;
+    try {
+      node.functionExpression.body.accept(this);
+    } finally {
+      _currentFunctionType = null;
+    }
     return null;
   }
 
@@ -245,37 +268,40 @@
     // treated like an implicit `assert(b != null)`?  Probably.
     _handleAssignment(_notNullType, node.condition);
     _inConditionalControlFlow = true;
-    ConstraintVariable trueGuard;
-    ConstraintVariable falseGuard;
+    NullabilityNode trueGuard;
+    NullabilityNode falseGuard;
     if (identical(_conditionInfo?.condition, node.condition)) {
       trueGuard = _conditionInfo.trueGuard;
       falseGuard = _conditionInfo.falseGuard;
-      _variables.recordConditionalDiscard(
-          _source,
-          node,
-          ConditionalDiscard(trueGuard ?? ConstraintVariable.always,
-              falseGuard ?? ConstraintVariable.always, _conditionInfo.isPure));
+      _variables.recordConditionalDiscard(_source, node,
+          ConditionalDiscard(trueGuard, falseGuard, _conditionInfo.isPure));
     }
     if (trueGuard != null) {
       _guards.add(trueGuard);
     }
-    node.thenStatement.accept(this);
-    if (trueGuard != null) {
-      _guards.removeLast();
+    try {
+      node.thenStatement.accept(this);
+    } finally {
+      if (trueGuard != null) {
+        _guards.removeLast();
+      }
     }
     if (falseGuard != null) {
       _guards.add(falseGuard);
     }
-    node.elseStatement?.accept(this);
-    if (falseGuard != null) {
-      _guards.removeLast();
+    try {
+      node.elseStatement?.accept(this);
+    } finally {
+      if (falseGuard != null) {
+        _guards.removeLast();
+      }
     }
     return null;
   }
 
   @override
   DecoratedType visitIntegerLiteral(IntegerLiteral node) {
-    return DecoratedType(node.staticType, null);
+    return DecoratedType(node.staticType, NullabilityNode.never);
   }
 
   @override
@@ -284,8 +310,12 @@
     assert(_currentFunctionType == null);
     _currentFunctionType =
         _variables.decoratedElementType(node.declaredElement);
-    node.body.accept(this);
-    _currentFunctionType = null;
+    _inConditionalControlFlow = false;
+    try {
+      node.body.accept(this);
+    } finally {
+      _currentFunctionType = null;
+    }
     return null;
   }
 
@@ -317,10 +347,9 @@
       }
     }
     // Any parameters not supplied must be optional.
-    for (var entry in calleeType.namedParameterOptionalVariables.entries) {
-      assert(entry.value != null);
+    for (var entry in calleeType.namedParameters.entries) {
       if (suppliedNamedParameters.contains(entry.key)) continue;
-      _recordFact(entry.value);
+      entry.value.node.recordNamedParameterNotSupplied(_constraints, _guards);
     }
     return calleeType.returnType;
   }
@@ -373,24 +402,24 @@
 
   @override
   DecoratedType visitStringLiteral(StringLiteral node) {
-    return DecoratedType(node.staticType, null);
+    return DecoratedType(node.staticType, NullabilityNode.never);
   }
 
   @override
   DecoratedType visitThisExpression(ThisExpression node) {
-    return DecoratedType(node.staticType, null);
+    return DecoratedType(node.staticType, NullabilityNode.never);
   }
 
   @override
   DecoratedType visitThrowExpression(ThrowExpression node) {
     node.expression.accept(this);
     // TODO(paulberry): do we need to check the expression type?  I think not.
-    return DecoratedType(node.staticType, null);
+    return DecoratedType(node.staticType, NullabilityNode.never);
   }
 
   @override
   DecoratedType visitTypeName(TypeName typeName) {
-    return DecoratedType(typeName.type, null);
+    return DecoratedType(typeName.type, NullabilityNode.never);
   }
 
   /// Creates the necessary constraint(s) for an assignment from [sourceType] to
@@ -399,17 +428,14 @@
   /// where a nullable source is assigned to a non-nullable destination.
   void _checkAssignment(DecoratedType destinationType, DecoratedType sourceType,
       Expression expression) {
-    if (sourceType.nullable != null) {
-      if (destinationType.nullable != null) {
-        _recordConstraint(sourceType.nullable, destinationType.nullable);
-      } else {
-        assert(expression != null); // TODO(paulberry)
-        var checkNotNull = CheckExpression(expression);
-        _recordConstraint(sourceType.nullable, checkNotNull);
-        _variables.recordExpressionChecks(
-            expression, ExpressionChecks(_source, checkNotNull));
-      }
+    CheckExpression checkNotNull;
+    if (expression != null) {
+      checkNotNull = CheckExpression(expression);
+      _variables.recordExpressionChecks(
+          _source, expression, ExpressionChecks(checkNotNull));
     }
+    NullabilityNode.recordAssignment(sourceType.node, destinationType.node,
+        checkNotNull, _guards, _constraints, _inConditionalControlFlow);
     // TODO(paulberry): it's a cheat to pass in expression=null for the
     // recursive checks.  Really we want to unify all the checks in a single
     // ExpressionChecks object.
@@ -449,9 +475,11 @@
   /// Creates the necessary constraint(s) for an assignment of the given
   /// [expression] to a destination whose type is [destinationType].
   DecoratedType _handleAssignment(
-      DecoratedType destinationType, Expression expression) {
+      DecoratedType destinationType, Expression expression,
+      {bool canInsertChecks = true}) {
     var sourceType = expression.accept(this);
-    _checkAssignment(destinationType, sourceType, expression);
+    _checkAssignment(
+        destinationType, sourceType, canInsertChecks ? expression : null);
     return sourceType;
   }
 
@@ -479,27 +507,11 @@
       return ConstraintVariable.always;
     }
     var result = TypeIsNullable(node.offset);
-    _recordConstraint(a, result);
-    _recordConstraint(b, result);
-    _recordConstraint(result, ConstraintVariable.or(_constraints, a, b));
+    _constraints.record([a], result);
+    _constraints.record([b], result);
+    _constraints.record([result], ConstraintVariable.or(_constraints, a, b));
     return result;
   }
-
-  /// Records a constraint having [condition] as its left hand side and
-  /// [consequence] as its right hand side.  Any [_guards] are included in the
-  /// left hand side.
-  void _recordConstraint(
-      ConstraintVariable condition, ConstraintVariable consequence) {
-    _guards.add(condition);
-    _recordFact(consequence);
-    _guards.removeLast();
-  }
-
-  /// Records a constraint having [consequence] as its right hand side.  Any
-  /// [_guards] are used as the right hand side.
-  void _recordFact(ConstraintVariable consequence) {
-    _constraints.record(_guards, consequence);
-  }
 }
 
 /// Information about a binary expression whose boolean value could possibly
@@ -515,21 +527,21 @@
   /// effect other than returning a boolean value.
   final bool isPure;
 
-  /// If not `null`, the [ConstraintVariable] whose value must be `true` in
+  /// If not `null`, the [NullabilityNode] that would need to be nullable in
   /// order for [condition] to evaluate to `true`.
-  final ConstraintVariable trueGuard;
+  final NullabilityNode trueGuard;
 
-  /// If not `null`, the [ConstraintVariable] whose value must be `true` in
+  /// If not `null`, the [NullabilityNode] that would need to be nullable in
   /// order for [condition] to evaluate to `false`.
-  final ConstraintVariable falseGuard;
+  final NullabilityNode falseGuard;
 
-  /// If not `null`, the [ConstraintVariable] whose value should be set to
-  /// `true` if [condition] is asserted to be `true`.
-  final ConstraintVariable trueDemonstratesNonNullIntent;
+  /// If not `null`, the [NullabilityNode] that should be asserted to have
+  //  /// non-null intent if [condition] is asserted to be `true`.
+  final NullabilityNode trueDemonstratesNonNullIntent;
 
-  /// If not `null`, the [ConstraintVariable] whose value should be set to
-  /// `true` if [condition] is asserted to be `false`.
-  final ConstraintVariable falseDemonstratesNonNullIntent;
+  /// If not `null`, the [NullabilityNode] that should be asserted to have
+  /// non-null intent if [condition] is asserted to be `false`.
+  final NullabilityNode falseDemonstratesNonNullIntent;
 
   _ConditionInfo(this.condition,
       {@required this.isPure,
diff --git a/pkg/analysis_server/lib/src/nullability/constraint_variable_gatherer.dart b/pkg/analysis_server/lib/src/nullability/constraint_variable_gatherer.dart
index d3a89538..8f5f170 100644
--- a/pkg/analysis_server/lib/src/nullability/constraint_variable_gatherer.dart
+++ b/pkg/analysis_server/lib/src/nullability/constraint_variable_gatherer.dart
@@ -5,6 +5,7 @@
 import 'package:analysis_server/src/nullability/conditional_discard.dart';
 import 'package:analysis_server/src/nullability/decorated_type.dart';
 import 'package:analysis_server/src/nullability/expression_checks.dart';
+import 'package:analysis_server/src/nullability/nullability_node.dart';
 import 'package:analysis_server/src/nullability/transitional_api.dart';
 import 'package:analysis_server/src/nullability/unit_propagation.dart';
 import 'package:analyzer/dart/ast/ast.dart';
@@ -50,28 +51,19 @@
         // TODO(danrubel): Return something other than this
         // to indicate that we should insert a type for the declaration
         // that is missing a type reference.
-        ? new DecoratedType(DynamicTypeImpl.instance, ConstraintVariable.always)
+        ? new DecoratedType(
+            DynamicTypeImpl.instance, NullabilityNode.forInferredDynamicType())
         : type.accept(this);
   }
 
   @override
   DecoratedType visitDefaultFormalParameter(DefaultFormalParameter node) {
     var decoratedType = node.parameter.accept(this);
-    ConstraintVariable optional;
-    if (node.declaredElement.hasRequired) {
-      optional = null;
-    } else if (node.defaultValue != null) {
-      optional = ConstraintVariable.always;
-    } else {
-      optional = decoratedType.nullable;
-      _variables.recordPossiblyOptional(_source, node, optional);
+    if (node.declaredElement.hasRequired || node.defaultValue != null) {
+      return null;
     }
-    if (optional != null) {
-      _currentFunctionType
-              .namedParameterOptionalVariables[node.declaredElement.name] =
-          optional;
-    }
-    return null;
+    decoratedType.node.trackPossiblyOptional();
+    _variables.recordPossiblyOptional(_source, node, decoratedType.node);
   }
 
   @override
@@ -117,8 +109,7 @@
   DecoratedType visitSimpleFormalParameter(SimpleFormalParameter node) {
     var type = decorateType(node.type);
     var declaredElement = node.declaredElement;
-    assert(type.nonNullIntent == null);
-    type.nonNullIntent = NonNullIntent(node.offset);
+    type.node.trackNonNullIntent(node.offset);
     _variables.recordDecoratedElementType(declaredElement, type);
     if (declaredElement.isNamed) {
       _currentFunctionType.namedParameters[declaredElement.name] = type;
@@ -133,7 +124,10 @@
     assert(node != null); // TODO(paulberry)
     assert(node is NamedType); // TODO(paulberry)
     var type = node.type;
-    if (type.isVoid) return DecoratedType(type, ConstraintVariable.always);
+    if (type.isVoid) {
+      return DecoratedType(
+          type, NullabilityNode.forTypeAnnotation(node.end, always: true));
+    }
     assert(
         type is InterfaceType || type is TypeParameterType); // TODO(paulberry)
     var typeArguments = const <DecoratedType>[];
@@ -146,13 +140,13 @@
         assert(false); // TODO(paulberry): is this possible?
       }
     }
-    var nullable = node.question == null
-        ? TypeIsNullable(node.end)
-        : ConstraintVariable.always;
     var decoratedType = DecoratedTypeAnnotation(
-        type, nullable, _source, node.end,
+        type,
+        NullabilityNode.forTypeAnnotation(node.end,
+            always: node.question != null),
+        node.end,
         typeArguments: typeArguments);
-    _variables.recordDecoratedTypeAnnotation(node, decoratedType);
+    _variables.recordDecoratedTypeAnnotation(_source, node, decoratedType);
     return decoratedType;
   }
 
@@ -166,14 +160,17 @@
     var previousFunctionType = _currentFunctionType;
     // TODO(paulberry): test that it's correct to use `null` for the nullability
     // of the function type
-    var functionType = DecoratedType(declaredElement.type, null,
+    var functionType = DecoratedType(
+        declaredElement.type, NullabilityNode.never,
         returnType: decoratedReturnType,
         positionalParameters: [],
-        namedParameters: {},
-        namedParameterOptionalVariables: {});
+        namedParameters: {});
     _currentFunctionType = functionType;
-    parameters.accept(this);
-    _currentFunctionType = previousFunctionType;
+    try {
+      parameters.accept(this);
+    } finally {
+      _currentFunctionType = previousFunctionType;
+    }
     _variables.recordDecoratedElementType(declaredElement, functionType);
   }
 }
@@ -190,13 +187,13 @@
 
   /// Associates decorated type information with the given [type] node.
   void recordDecoratedTypeAnnotation(
-      TypeAnnotation node, DecoratedTypeAnnotation type);
+      Source source, TypeAnnotation node, DecoratedTypeAnnotation type);
 
-  /// Associates a constraint variable with the question of whether the given
-  /// named parameter should be optional (should not have a `required`
+  /// Records that [node] is associated with the question of whether the named
+  /// [parameter] should be optional (should not have a `required`
   /// annotation added to it).
-  void recordPossiblyOptional(Source source, DefaultFormalParameter parameter,
-      ConstraintVariable variable);
+  void recordPossiblyOptional(
+      Source source, DefaultFormalParameter parameter, NullabilityNode node);
 }
 
 /// Repository of constraint variables and decorated types corresponding to the
@@ -229,5 +226,6 @@
   void recordDecoratedExpressionType(Expression node, DecoratedType type);
 
   /// Associates a set of nullability checks with the given expression [node].
-  void recordExpressionChecks(Expression expression, ExpressionChecks checks);
+  void recordExpressionChecks(
+      Source source, Expression expression, ExpressionChecks checks);
 }
diff --git a/pkg/analysis_server/lib/src/nullability/decorated_type.dart b/pkg/analysis_server/lib/src/nullability/decorated_type.dart
index 53c023b..c6b3256 100644
--- a/pkg/analysis_server/lib/src/nullability/decorated_type.dart
+++ b/pkg/analysis_server/lib/src/nullability/decorated_type.dart
@@ -2,12 +2,12 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:analysis_server/src/nullability/nullability_node.dart';
 import 'package:analysis_server/src/nullability/transitional_api.dart';
 import 'package:analysis_server/src/nullability/unit_propagation.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/type.dart';
-import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart' show SourceEdit;
 
 /// Representation of a type in the code to be migrated.  In addition to
@@ -16,18 +16,7 @@
 class DecoratedType {
   final DartType type;
 
-  /// [ConstraintVariable] whose value will be set to `true` if this type needs
-  /// to be nullable.
-  ///
-  /// If `null`, that means that an external constraint (outside the code being
-  /// migrated) forces this type to be non-nullable.
-  final ConstraintVariable nullable;
-
-  /// [ConstraintVariable] whose value will be set to `true` if the usage of
-  /// this type suggests that it is intended to be non-null (because of the
-  /// presence of a statement or expression that would unconditionally lead to
-  /// an exception being thrown in the case of a `null` value at runtime).
-  ConstraintVariable nonNullIntent;
+  final NullabilityNode node;
 
   /// If `this` is a function type, the [DecoratedType] of its return type.
   final DecoratedType returnType;
@@ -41,41 +30,31 @@
   /// parameters.
   final Map<String, DecoratedType> namedParameters;
 
-  /// If `this` is a function type, [ConstraintVariable] for each of its named
-  /// parameters indicating whether the given named parameter needs to be
-  /// optional (no `required` annotation).
-  ///
-  /// If there is no entry in this map corresponding to a given named parameter,
-  /// that means that it has already been decided (prior to migration) that the
-  /// given named parameter is required.  TODO(paulberry): test that this works
-  /// for already-migrated code.
-  final Map<String, ConstraintVariable> namedParameterOptionalVariables;
-
   /// If `this` is a parameterized type, the [DecoratedType] of each of its
   /// type parameters.
   ///
   /// TODO(paulberry): how should we handle generic typedefs?
   final List<DecoratedType> typeArguments;
 
-  DecoratedType(this.type, this.nullable,
+  DecoratedType(this.type, this.node,
       {this.returnType,
       this.positionalParameters = const [],
       this.namedParameters = const {},
-      this.namedParameterOptionalVariables = const {},
       this.typeArguments = const []}) {
+    assert(node != null);
     // The type system doesn't have a non-nullable version of `dynamic`.  So if
     // the type is `dynamic`, verify that `nullable` is `always`.
-    assert(!type.isDynamic || identical(nullable, ConstraintVariable.always));
+    assert(!type.isDynamic || node.isAlwaysNullable);
   }
 
   /// Creates a [DecoratedType] corresponding to the given [element], which is
   /// presumed to have come from code that is already migrated.
   factory DecoratedType.forElement(Element element) {
     DecoratedType decorate(DartType type) {
-      assert((type as TypeImpl).nullability ==
-          Nullability.indeterminate); // TODO(paulberry)
+      assert((type as TypeImpl).nullabilitySuffix ==
+          NullabilitySuffix.star); // TODO(paulberry)
       if (type is FunctionType) {
-        var decoratedType = DecoratedType(type, null,
+        var decoratedType = DecoratedType(type, NullabilityNode.never,
             returnType: decorate(type.returnType), positionalParameters: []);
         for (var parameter in type.parameters) {
           assert(parameter.isPositional); // TODO(paulberry)
@@ -84,7 +63,7 @@
         return decoratedType;
       } else if (type is InterfaceType) {
         assert(type.typeParameters.isEmpty); // TODO(paulberry)
-        return DecoratedType(type, null);
+        return DecoratedType(type, NullabilityNode.never);
       } else {
         throw type.runtimeType; // TODO(paulberry)
       }
@@ -113,7 +92,7 @@
 
   @override
   String toString() {
-    var trailing = nullable == null ? '' : '?($nullable)';
+    var trailing = node.debugSuffix;
     var type = this.type;
     if (type is TypeParameterType || type is VoidType) {
       return '$type$trailing';
@@ -156,14 +135,14 @@
         newPositionalParameters.add(positionalParameters[i]
             ._substitute(constraints, substitution, undecoratedParameterType));
       }
-      return DecoratedType(undecoratedResult, nullable,
+      return DecoratedType(undecoratedResult, node,
           returnType: returnType._substitute(
               constraints, substitution, undecoratedResult.returnType),
           positionalParameters: newPositionalParameters);
     } else if (type is TypeParameterType) {
       var inner = substitution[type.element];
       return DecoratedType(undecoratedResult,
-          ConstraintVariable.or(constraints, inner?.nullable, nullable));
+          NullabilityNode.forSubstitution(constraints, inner?.node, node));
     } else if (type is VoidType) {
       return this;
     }
@@ -178,19 +157,15 @@
 /// the source code to reflect its nullability.
 class DecoratedTypeAnnotation extends DecoratedType
     implements PotentialModification {
-  @override
-  final Source source;
-
   final int _offset;
 
   DecoratedTypeAnnotation(
-      DartType type, ConstraintVariable nullable, this.source, this._offset,
+      DartType type, NullabilityNode nullabilityNode, this._offset,
       {List<DecoratedType> typeArguments = const []})
-      : super(type, nullable, typeArguments: typeArguments);
+      : super(type, nullabilityNode, typeArguments: typeArguments);
 
   @override
-  bool get isEmpty =>
-      identical(nullable, ConstraintVariable.always) || !nullable.value;
+  bool get isEmpty => node.isAlwaysNullable || !node.isNullable;
 
   @override
   Iterable<SourceEdit> get modifications =>
diff --git a/pkg/analysis_server/lib/src/nullability/expression_checks.dart b/pkg/analysis_server/lib/src/nullability/expression_checks.dart
index 3c4af10..14f47db 100644
--- a/pkg/analysis_server/lib/src/nullability/expression_checks.dart
+++ b/pkg/analysis_server/lib/src/nullability/expression_checks.dart
@@ -3,7 +3,6 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analysis_server/src/nullability/transitional_api.dart';
-import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
 
 /// Container for information gathered during nullability migration about the
@@ -14,14 +13,11 @@
 /// that the expression is not null.  We need to add other checks, e.g. to check
 /// that a List<int?> is actually a List<int>.
 class ExpressionChecks extends PotentialModification {
-  @override
-  final Source source;
-
   /// Constraint variable whose value will be `true` if this expression requires
   /// a null check.
   final CheckExpression nullCheck;
 
-  ExpressionChecks(this.source, this.nullCheck);
+  ExpressionChecks(this.nullCheck);
 
   @override
   bool get isEmpty => !nullCheck.value;
diff --git a/pkg/analysis_server/lib/src/nullability/nullability_node.dart b/pkg/analysis_server/lib/src/nullability/nullability_node.dart
new file mode 100644
index 0000000..fd7d82b
--- /dev/null
+++ b/pkg/analysis_server/lib/src/nullability/nullability_node.dart
@@ -0,0 +1,201 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/nullability/decorated_type.dart';
+import 'package:analysis_server/src/nullability/transitional_api.dart';
+import 'package:analysis_server/src/nullability/unit_propagation.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:meta/meta.dart';
+
+/// Representation of a single node in the nullability inference graph.
+///
+/// Initially, this is just a wrapper over constraint variables, and the
+/// nullability inference graph is encoded into the wrapped constraint
+/// variables.  Over time this will be replaced by a first class representation
+/// of the nullability inference graph.
+class NullabilityNode {
+  /// [NullabilityNode] used for types that are known a priori to be nullable
+  /// (e.g. the type of the `null` literal).
+  static final always = NullabilityNode._(ConstraintVariable.always);
+
+  /// [NullabilityNode] used for types that are known a priori to be
+  /// non-nullable (e.g. the type of an integer literal).
+  static final never = NullabilityNode._(null);
+
+  /// [ConstraintVariable] whose value will be set to `true` if this type needs
+  /// to be nullable.
+  ///
+  /// If `null`, that means that an external constraint (outside the code being
+  /// migrated) forces this type to be non-nullable.
+  final ConstraintVariable nullable;
+
+  ConstraintVariable _nonNullIntent;
+
+  bool _isPossiblyOptional = false;
+
+  /// Creates a [NullabilityNode] representing the nullability of a conditional
+  /// expression which is nullable iff both [a] and [b] are nullable.
+  ///
+  /// The constraint variable contained in the new node is created using the
+  /// [joinNullabilities] callback.  TODO(paulberry): this should become
+  /// unnecessary once constraint solving is performed directly using
+  /// [NullabilityNode] objects.
+  NullabilityNode.forConditionalexpression(
+      ConditionalExpression conditionalExpression,
+      NullabilityNode a,
+      NullabilityNode b,
+      ConstraintVariable Function(
+              ConditionalExpression, ConstraintVariable, ConstraintVariable)
+          joinNullabilities)
+      : this._(
+            joinNullabilities(conditionalExpression, a.nullable, b.nullable));
+
+  /// Creates a [NullabilityNode] representing the nullability of a variable
+  /// whose type is `dynamic` due to type inference.
+  ///
+  /// TODO(paulberry): this should go away; we should decorate the actual
+  /// inferred type rather than assuming `dynamic`.
+  NullabilityNode.forInferredDynamicType() : this._(ConstraintVariable.always);
+
+  /// Creates a [NullabilityNode] representing the nullability of a type
+  /// substitution where [outerNode] is the nullability node for the type
+  /// variable being eliminated by the substitution, and [innerNode] is the
+  /// nullability node for the type being substituted in its place.
+  ///
+  /// [innerNode] may be `null`.  TODO(paulberry): when?
+  ///
+  /// Additional constraints are recorded in [constraints] as necessary to make
+  /// the new nullability node behave consistently with the old nodes.
+  /// TODO(paulberry): this should become unnecessary once constraint solving is
+  /// performed directly using [NullabilityNode] objects.
+  NullabilityNode.forSubstitution(Constraints constraints,
+      NullabilityNode innerNode, NullabilityNode outerNode)
+      : this._(ConstraintVariable.or(
+            constraints, innerNode?.nullable, outerNode.nullable));
+
+  /// Creates a [NullabilityNode] representing the nullability of a type
+  /// annotation appearing explicitly in the user's program.
+  NullabilityNode.forTypeAnnotation(int endOffset, {@required bool always})
+      : this._(always ? ConstraintVariable.always : TypeIsNullable(endOffset));
+
+  NullabilityNode._(this.nullable);
+
+  /// Gets a string that can be appended to a type name during debugging to help
+  /// annotate the nullability of that type.
+  String get debugSuffix => nullable == null ? '' : '?($nullable)';
+
+  /// Indicates whether this node is always nullable, by construction.
+  bool get isAlwaysNullable => identical(nullable, ConstraintVariable.always);
+
+  /// After constraint solving, this getter can be used to query whether the
+  /// type associated with this node should be considered nullable.
+  bool get isNullable => nullable.value;
+
+  /// Indicates whether this node is associated with a named parameter for which
+  /// nullability migration needs to decide whether it is optional or required.
+  bool get isPossiblyOptional => _isPossiblyOptional;
+
+  /// [ConstraintVariable] whose value will be set to `true` if the usage of
+  /// this type suggests that it is intended to be non-null (because of the
+  /// presence of a statement or expression that would unconditionally lead to
+  /// an exception being thrown in the case of a `null` value at runtime).
+  ConstraintVariable get nonNullIntent => _nonNullIntent;
+
+  /// Records the fact that an invocation was made to a function with named
+  /// parameters, and the named parameter associated with this node was not
+  /// supplied.
+  void recordNamedParameterNotSupplied(
+      Constraints constraints, List<NullabilityNode> guards) {
+    if (isPossiblyOptional) {
+      _recordConstraints(constraints, guards, const [], nullable);
+    }
+  }
+
+  void recordNonNullIntent(
+      Constraints constraints, List<NullabilityNode> guards) {
+    _recordConstraints(constraints, guards, const [], nonNullIntent);
+  }
+
+  /// Tracks that the possibility that this nullability node might demonstrate
+  /// non-null intent, based on the fact that it corresponds to a formal
+  /// parameter declaration at location [offset].
+  ///
+  /// TODO(paulberry): consider eliminating this method altogether, and simply
+  /// allowing all nullability nodes to track non-null intent if necessary.
+  void trackNonNullIntent(int offset) {
+    assert(_nonNullIntent == null);
+    _nonNullIntent = NonNullIntent(offset);
+  }
+
+  /// Tracks the possibility that this node is associated with a named parameter
+  /// for which nullability migration needs to decide whether it is optional or
+  /// required.
+  void trackPossiblyOptional() {
+    _isPossiblyOptional = true;
+  }
+
+  /// Connect the nullability nodes [sourceNode] and [destinationNode]
+  /// appopriately to account for an assignment in the source code being
+  /// analyzed.  Any constraints generated are recorded in [constraints].
+  ///
+  /// If [checkNotNull] is non-null, then it tracks the expression that may
+  /// require null-checking.
+  ///
+  /// [inConditionalControlFlow] indicates whether the assignment being analyzed
+  /// is reachable conditionally or unconditionally from the entry point of the
+  /// function; this affects how non-null intent is back-propagated.
+  static void recordAssignment(
+      NullabilityNode sourceNode,
+      NullabilityNode destinationNode,
+      CheckExpression checkNotNull,
+      List<NullabilityNode> guards,
+      Constraints constraints,
+      bool inConditionalControlFlow) {
+    var additionalConditions = <ConstraintVariable>[];
+    if (sourceNode.nullable != null) {
+      additionalConditions.add(sourceNode.nullable);
+      var destinationNonNullIntent = destinationNode.nonNullIntent;
+      // nullable_src => nullable_dst | check_expr
+      _recordConstraints(
+          constraints,
+          guards,
+          additionalConditions,
+          ConstraintVariable.or(
+              constraints, destinationNode.nullable, checkNotNull));
+      if (checkNotNull != null) {
+        // nullable_src & nonNullIntent_dst => check_expr
+        if (destinationNonNullIntent != null) {
+          additionalConditions.add(destinationNonNullIntent);
+          _recordConstraints(
+              constraints, guards, additionalConditions, checkNotNull);
+        }
+      }
+      additionalConditions.clear();
+      var sourceNonNullIntent = sourceNode.nonNullIntent;
+      if (!inConditionalControlFlow && sourceNonNullIntent != null) {
+        if (destinationNode.nullable == null) {
+          // The destination type can never be nullable so this demonstrates
+          // non-null intent.
+          _recordConstraints(
+              constraints, guards, additionalConditions, sourceNonNullIntent);
+        } else if (destinationNonNullIntent != null) {
+          // Propagate non-null intent from the destination to the source.
+          additionalConditions.add(destinationNonNullIntent);
+          _recordConstraints(
+              constraints, guards, additionalConditions, sourceNonNullIntent);
+        }
+      }
+    }
+  }
+
+  static void _recordConstraints(
+      Constraints constraints,
+      List<NullabilityNode> guards,
+      List<ConstraintVariable> additionalConditions,
+      ConstraintVariable consequence) {
+    var conditions = guards.map((node) => node.nullable).toList();
+    conditions.addAll(additionalConditions);
+    constraints.record(conditions, consequence);
+  }
+}
diff --git a/pkg/analysis_server/lib/src/nullability/provisional_api.dart b/pkg/analysis_server/lib/src/nullability/provisional_api.dart
index 6352b4d..99080c9 100644
--- a/pkg/analysis_server/lib/src/nullability/provisional_api.dart
+++ b/pkg/analysis_server/lib/src/nullability/provisional_api.dart
@@ -18,6 +18,10 @@
 
 /// Kinds of fixes that might be performed by nullability migration.
 class NullabilityFixKind {
+  /// An import needs to be added.
+  static const addImport =
+      const NullabilityFixKind._(appliedMessage: 'Add an import');
+
   /// A formal parameter needs to have a required annotation added.
   static const addRequired =
       const NullabilityFixKind._(appliedMessage: 'Add a required annotation');
@@ -77,9 +81,16 @@
             permissive: permissive, assumptions: assumptions);
 
   void finish() {
-    _analyzerMigration.finish().forEach((pm) {
-      listener.addFix(_SingleNullabilityFix(pm));
-    });
+    for (var entry in _analyzerMigration.finish().entries) {
+      var source = entry.key;
+      for (var potentialModification in entry.value) {
+        var fix = _SingleNullabilityFix(source, potentialModification);
+        listener.addFix(fix);
+        for (var edit in potentialModification.modifications) {
+          listener.addEdit(fix, edit);
+        }
+      }
+    }
   }
 
   void prepareInput(ResolvedUnitResult result) {
@@ -94,6 +105,10 @@
 /// [NullabilityMigrationListener] is used by [NullabilityMigration]
 /// to communicate source changes or "fixes" to the client.
 abstract class NullabilityMigrationListener {
+  /// [addEdit] is called once for each source edit, in the order in which they
+  /// appear in the source file.
+  void addEdit(SingleNullabilityFix fix, SourceEdit edit);
+
   /// [addFix] is called once for each source change.
   void addFix(SingleNullabilityFix fix);
 }
@@ -110,26 +125,19 @@
 
   /// File to change.
   Source get source;
-
-  /// Individual source edits to achieve the change.  May be returned in any
-  /// order.
-  Iterable<SourceEdit> get sourceEdits;
 }
 
 /// Implementation of [SingleNullabilityFix] used internally by
 /// [NullabilityMigration].
 class _SingleNullabilityFix extends SingleNullabilityFix {
   @override
-  final List<SourceEdit> sourceEdits;
-
-  @override
   final Source source;
 
   @override
   final NullabilityFixKind kind;
 
   factory _SingleNullabilityFix(
-      analyzer.PotentialModification potentialModification) {
+      Source source, analyzer.PotentialModification potentialModification) {
     // TODO(paulberry): once everything is migrated into the analysis server,
     // the migration engine can just create SingleNullabilityFix objects
     // directly and set their kind appropriately; we won't need to translate the
@@ -140,19 +148,20 @@
     } else if (potentialModification is analyzer.DecoratedTypeAnnotation) {
       kind = NullabilityFixKind.makeTypeNullable;
     } else if (potentialModification is analyzer.ConditionalModification) {
-      kind = potentialModification.discard.keepFalse.value
+      kind = potentialModification.discard.keepFalse
           ? NullabilityFixKind.discardThen
           : NullabilityFixKind.discardElse;
+    } else if (potentialModification is analyzer.PotentiallyAddImport) {
+      kind = NullabilityFixKind.addImport;
     } else if (potentialModification is analyzer.PotentiallyAddRequired) {
       kind = NullabilityFixKind.addRequired;
     } else {
       throw new UnimplementedError('TODO(paulberry)');
     }
-    return _SingleNullabilityFix._(potentialModification.modifications.toList(),
-        potentialModification.source, kind);
+    return _SingleNullabilityFix._(source, kind);
   }
 
-  _SingleNullabilityFix._(this.sourceEdits, this.source, this.kind);
+  _SingleNullabilityFix._(this.source, this.kind);
 
   /// TODO(paulberry): do something better
   Location get location => null;
diff --git a/pkg/analysis_server/lib/src/nullability/transitional_api.dart b/pkg/analysis_server/lib/src/nullability/transitional_api.dart
index 4f0c81a..7a1b505 100644
--- a/pkg/analysis_server/lib/src/nullability/transitional_api.dart
+++ b/pkg/analysis_server/lib/src/nullability/transitional_api.dart
@@ -7,6 +7,7 @@
 import 'package:analysis_server/src/nullability/constraint_variable_gatherer.dart';
 import 'package:analysis_server/src/nullability/decorated_type.dart';
 import 'package:analysis_server/src/nullability/expression_checks.dart';
+import 'package:analysis_server/src/nullability/nullability_node.dart';
 import 'package:analysis_server/src/nullability/unit_propagation.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
@@ -41,11 +42,7 @@
 
   final _KeepNode elseStatement;
 
-  @override
-  final Source source;
-
-  factory ConditionalModification(
-      Source source, AstNode node, ConditionalDiscard discard) {
+  factory ConditionalModification(AstNode node, ConditionalDiscard discard) {
     if (node is IfStatement) {
       return ConditionalModification._(
           node.offset,
@@ -54,25 +51,17 @@
           discard,
           _KeepNode(node.condition),
           _KeepNode(node.thenStatement),
-          _KeepNode(node.elseStatement),
-          source);
+          _KeepNode(node.elseStatement));
     } else {
       throw new UnimplementedError('TODO(paulberry)');
     }
   }
 
-  ConditionalModification._(
-      this.offset,
-      this.end,
-      this.isStatement,
-      this.discard,
-      this.condition,
-      this.thenStatement,
-      this.elseStatement,
-      this.source);
+  ConditionalModification._(this.offset, this.end, this.isStatement,
+      this.discard, this.condition, this.thenStatement, this.elseStatement);
 
   @override
-  bool get isEmpty => discard.keepTrue.value && discard.keepFalse.value;
+  bool get isEmpty => discard.keepTrue && discard.keepFalse;
 
   @override
   Iterable<SourceEdit> get modifications {
@@ -84,10 +73,10 @@
     if (!discard.pureCondition) {
       keepNodes.add(condition); // TODO(paulberry): test
     }
-    if (discard.keepTrue.value) {
+    if (discard.keepTrue) {
       keepNodes.add(thenStatement); // TODO(paulberry): test
     }
-    if (discard.keepFalse.value) {
+    if (discard.keepFalse) {
       keepNodes.add(elseStatement); // TODO(paulberry): test
     }
     // TODO(paulberry): test thoroughly
@@ -171,7 +160,7 @@
       this.assumptions: const NullabilityMigrationAssumptions()})
       : _permissive = permissive;
 
-  List<PotentialModification> finish() {
+  Map<Source, List<PotentialModification>> finish() {
     _constraints.applyHeuristics();
     return _variables.getPotentialModifications();
   }
@@ -205,25 +194,57 @@
       {this.defaultParameterHandling:
           DefaultParameterHandling.option2_addRequiredNamedParameters,
       this.namedNoDefaultParameterHeuristic:
-          NamedNoDefaultParameterHeuristic.assumeRequired});
+          NamedNoDefaultParameterHeuristic.assumeNullable});
+}
+
+/// Records information about the possible addition of an import
+/// to the source code.
+class PotentiallyAddImport extends PotentialModification {
+  final _usages = <PotentialModification>[];
+
+  final int _offset;
+  final String _importPath;
+
+  PotentiallyAddImport(
+      AstNode beforeNode, this._importPath, PotentialModification usage)
+      : _offset = beforeNode.offset {
+    _usages.add(usage);
+  }
+
+  get importPath => _importPath;
+
+  @override
+  bool get isEmpty {
+    for (PotentialModification usage in _usages) {
+      if (!usage.isEmpty) {
+        return false;
+      }
+    }
+    return true;
+  }
+
+  // TODO(danrubel): change all of dartfix NNBD to use DartChangeBuilder
+  @override
+  Iterable<SourceEdit> get modifications =>
+      isEmpty ? const [] : [SourceEdit(_offset, 0, "import '$_importPath';\n")];
+
+  void addUsage(PotentialModification usage) {
+    _usages.add(usage);
+  }
 }
 
 /// Records information about the possible addition of a `@required` annotation
 /// to the source code.
 class PotentiallyAddRequired extends PotentialModification {
-  @override
-  final Source source;
-
-  final ConstraintVariable _optionalVariable;
+  final NullabilityNode _node;
 
   final int _offset;
 
-  PotentiallyAddRequired(
-      this.source, DefaultFormalParameter parameter, this._optionalVariable)
+  PotentiallyAddRequired(DefaultFormalParameter parameter, this._node)
       : _offset = parameter.offset;
 
   @override
-  bool get isEmpty => _optionalVariable.value;
+  bool get isEmpty => _node.isNullable;
 
   @override
   Iterable<SourceEdit> get modifications =>
@@ -238,14 +259,12 @@
   /// Gets the individual migrations that need to be done, considering the
   /// solution to the constraint equations.
   Iterable<SourceEdit> get modifications;
-
-  Source get source;
 }
 
 class Variables implements VariableRecorder, VariableRepository {
   final _decoratedElementTypes = <Element, DecoratedType>{};
 
-  final _potentialModifications = <PotentialModification>[];
+  final _potentialModifications = <Source, List<PotentialModification>>{};
 
   @override
   DecoratedType decoratedElementType(Element element, {bool create: false}) =>
@@ -253,14 +272,14 @@
           ? DecoratedType.forElement(element)
           : throw StateError('No element found');
 
-  List<PotentialModification> getPotentialModifications() =>
-      _potentialModifications.where((m) => !m.isEmpty).toList();
+  Map<Source, List<PotentialModification>> getPotentialModifications() =>
+      _potentialModifications;
 
   @override
   void recordConditionalDiscard(
       Source source, AstNode node, ConditionalDiscard conditionalDiscard) {
-    _potentialModifications
-        .add(ConditionalModification(source, node, conditionalDiscard));
+    _addPotentialModification(
+        source, ConditionalModification(node, conditionalDiscard));
   }
 
   void recordDecoratedElementType(Element element, DecoratedType type) {
@@ -270,20 +289,73 @@
   void recordDecoratedExpressionType(Expression node, DecoratedType type) {}
 
   void recordDecoratedTypeAnnotation(
-      TypeAnnotation node, DecoratedTypeAnnotation type) {
-    _potentialModifications.add(type);
+      Source source, TypeAnnotation node, DecoratedTypeAnnotation type) {
+    _addPotentialModification(source, type);
   }
 
   @override
-  void recordExpressionChecks(Expression expression, ExpressionChecks checks) {
-    _potentialModifications.add(checks);
+  void recordExpressionChecks(
+      Source source, Expression expression, ExpressionChecks checks) {
+    _addPotentialModification(source, checks);
   }
 
   @override
-  void recordPossiblyOptional(Source source, DefaultFormalParameter parameter,
-      ConstraintVariable variable) {
-    _potentialModifications
-        .add(PotentiallyAddRequired(source, parameter, variable));
+  void recordPossiblyOptional(
+      Source source, DefaultFormalParameter parameter, NullabilityNode node) {
+    var modification = PotentiallyAddRequired(parameter, node);
+    _addPotentialModification(source, modification);
+    _addPotentialImport(
+        source, parameter, modification, 'package:meta/meta.dart');
+  }
+
+  void _addPotentialImport(Source source, AstNode node,
+      PotentialModification usage, String importPath) {
+    // Get the compilation unit - assume not null
+    while (node is! CompilationUnit) {
+      node = node.parent;
+    }
+    var unit = node as CompilationUnit;
+
+    // Find an existing import
+    for (var directive in unit.directives) {
+      if (directive is ImportDirective) {
+        if (directive.uri.stringValue == importPath) {
+          return;
+        }
+      }
+    }
+
+    // Add the usage to an existing modification if possible
+    for (var modification in (_potentialModifications[source] ??= [])) {
+      if (modification is PotentiallyAddImport) {
+        if (modification.importPath == importPath) {
+          modification.addUsage(usage);
+          return;
+        }
+      }
+    }
+
+    // Create a new import modification
+    AstNode beforeNode;
+    for (var directive in unit.directives) {
+      if (directive is ImportDirective || directive is ExportDirective) {
+        beforeNode = directive;
+        break;
+      }
+    }
+    if (beforeNode == null) {
+      for (var declaration in unit.declarations) {
+        beforeNode = declaration;
+        break;
+      }
+    }
+    _addPotentialModification(
+        source, PotentiallyAddImport(beforeNode, importPath, usage));
+  }
+
+  void _addPotentialModification(
+      Source source, PotentialModification potentialModification) {
+    (_potentialModifications[source] ??= []).add(potentialModification);
   }
 }
 
diff --git a/pkg/analysis_server/lib/src/nullability/unit_propagation.dart b/pkg/analysis_server/lib/src/nullability/unit_propagation.dart
index 1add712..b587e33 100644
--- a/pkg/analysis_server/lib/src/nullability/unit_propagation.dart
+++ b/pkg/analysis_server/lib/src/nullability/unit_propagation.dart
@@ -66,7 +66,7 @@
 
   /// The value assigned to this constraint variable by the solution currently
   /// being computed.
-  get value => _value;
+  bool get value => _value;
 
   @override
   String toString() =>
diff --git a/pkg/analysis_server/lib/src/operation/operation_analysis.dart b/pkg/analysis_server/lib/src/operation/operation_analysis.dart
index 87aa99d..f275ee9 100644
--- a/pkg/analysis_server/lib/src/operation/operation_analysis.dart
+++ b/pkg/analysis_server/lib/src/operation/operation_analysis.dart
@@ -14,6 +14,7 @@
 import 'package:analysis_server/src/domains/analysis/implemented_dart.dart';
 import 'package:analysis_server/src/protocol_server.dart' as protocol;
 import 'package:analysis_server/src/services/search/search_engine.dart';
+import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/generated/source.dart';
@@ -116,24 +117,28 @@
   });
 }
 
-void sendAnalysisNotificationOutline(AnalysisServer server, String file,
-    LineInfo lineInfo, SourceKind sourceKind, CompilationUnit dartUnit) {
+void sendAnalysisNotificationOutline(
+    AnalysisServer server, ResolvedUnitResult resolvedUnit) {
   _sendNotification(server, () {
-    // compute FileKind
-    protocol.FileKind fileKind = protocol.FileKind.LIBRARY;
-    if (sourceKind == SourceKind.LIBRARY) {
-      fileKind = protocol.FileKind.LIBRARY;
-    } else if (sourceKind == SourceKind.PART) {
+    protocol.FileKind fileKind;
+    if (resolvedUnit.unit.directives.any((d) => d is PartOfDirective)) {
       fileKind = protocol.FileKind.PART;
+    } else {
+      fileKind = protocol.FileKind.LIBRARY;
     }
+
     // compute library name
-    String libraryName = _computeLibraryName(dartUnit);
+    String libraryName = _computeLibraryName(resolvedUnit.unit);
+
     // compute Outline
-    var computer = new DartUnitOutlineComputer(file, lineInfo, dartUnit,
-        withBasicFlutter: true);
-    protocol.Outline outline = computer.compute();
+    protocol.Outline outline = new DartUnitOutlineComputer(
+      resolvedUnit,
+      withBasicFlutter: true,
+    ).compute();
+
     // send notification
-    var params = new protocol.AnalysisOutlineParams(file, fileKind, outline,
+    var params = new protocol.AnalysisOutlineParams(
+        resolvedUnit.path, fileKind, outline,
         libraryName: libraryName);
     server.sendNotification(params.toNotification());
   });
diff --git a/pkg/analysis_server/lib/src/plugin/plugin_watcher.dart b/pkg/analysis_server/lib/src/plugin/plugin_watcher.dart
index ecfe285..6ecd84c 100644
--- a/pkg/analysis_server/lib/src/plugin/plugin_watcher.dart
+++ b/pkg/analysis_server/lib/src/plugin/plugin_watcher.dart
@@ -2,11 +2,14 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'dart:convert';
+
 import 'package:analysis_server/src/plugin/plugin_locator.dart';
 import 'package:analysis_server/src/plugin/plugin_manager.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/context/context_root.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart';
+import 'package:analyzer/src/dart/sdk/sdk.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:path/src/context.dart';
 
@@ -98,7 +101,18 @@
    * [driver].
    */
   String _getSdkPath(AnalysisDriver driver) {
-    String sdkRoot = driver.sourceFactory.forUri('dart:core').fullName;
+    var coreSource = driver.sourceFactory.forUri('dart:core');
+
+    // TODO(scheglov) Debug for https://github.com/dart-lang/sdk/issues/35226
+    if (coreSource == null) {
+      var sdk = driver.sourceFactory.dartSdk;
+      if (sdk is AbstractDartSdk) {
+        var sdkJson = JsonEncoder.withIndent('  ').convert(sdk.debugInfo());
+        throw StateError('No dart:core, sdk: $sdkJson');
+      }
+    }
+
+    String sdkRoot = coreSource.fullName;
     while (resourceProvider.pathContext.basename(sdkRoot) != 'lib') {
       String parent = resourceProvider.pathContext.dirname(sdkRoot);
       if (parent == sdkRoot) {
diff --git a/pkg/analysis_server/lib/src/protocol_server.dart b/pkg/analysis_server/lib/src/protocol_server.dart
index fc2d22a..e24d2db 100644
--- a/pkg/analysis_server/lib/src/protocol_server.dart
+++ b/pkg/analysis_server/lib/src/protocol_server.dart
@@ -40,34 +40,6 @@
 }
 
 /**
- * Translates engine errors through the ErrorProcessor.
- */
-List<T> mapEngineErrors<T>(
-    engine.AnalysisOptions analysisOptions,
-    engine.LineInfo lineInfo,
-    List<engine.AnalysisError> errors,
-    T Function(engine.LineInfo lineInfo, engine.AnalysisError error,
-            [engine.ErrorSeverity errorSeverity])
-        constructor) {
-  List<T> serverErrors = <T>[];
-  for (engine.AnalysisError error in errors) {
-    ErrorProcessor processor =
-        ErrorProcessor.getProcessor(analysisOptions, error);
-    if (processor != null) {
-      engine.ErrorSeverity severity = processor.severity;
-      // Errors with null severity are filtered out.
-      if (severity != null) {
-        // Specified severities override.
-        serverErrors.add(constructor(lineInfo, error, severity));
-      }
-    } else {
-      serverErrors.add(constructor(lineInfo, error));
-    }
-  }
-  return serverErrors;
-}
-
-/**
  * Adds [edit] to the file containing the given [element].
  */
 void doSourceChange_addElementEdit(
@@ -104,6 +76,34 @@
 }
 
 /**
+ * Translates engine errors through the ErrorProcessor.
+ */
+List<T> mapEngineErrors<T>(
+    engine.AnalysisOptions analysisOptions,
+    engine.LineInfo lineInfo,
+    List<engine.AnalysisError> errors,
+    T Function(engine.LineInfo lineInfo, engine.AnalysisError error,
+            [engine.ErrorSeverity errorSeverity])
+        constructor) {
+  List<T> serverErrors = <T>[];
+  for (engine.AnalysisError error in errors) {
+    ErrorProcessor processor =
+        ErrorProcessor.getProcessor(analysisOptions, error);
+    if (processor != null) {
+      engine.ErrorSeverity severity = processor.severity;
+      // Errors with null severity are filtered out.
+      if (severity != null) {
+        // Specified severities override.
+        serverErrors.add(constructor(lineInfo, error, severity));
+      }
+    } else {
+      serverErrors.add(constructor(lineInfo, error));
+    }
+  }
+  return serverErrors;
+}
+
+/**
  * Construct based on error information from the analyzer engine.
  *
  * If an [errorSeverity] is specified, it will override the one in [error].
@@ -140,8 +140,13 @@
   String code = errorCode.name.toLowerCase();
   String correction = error.correction;
   bool fix = hasFix(error.errorCode);
+  String url = errorCode.url;
+  if (url == null && errorCode is engine.LintCode) {
+    String lintName = errorCode.name.toLowerCase();
+    url = 'https://dart-lang.github.io/linter/lints/$lintName.html';
+  }
   return new AnalysisError(severity, type, location, message, code,
-      correction: correction, hasFix: fix);
+      correction: correction, hasFix: fix, url: url);
 }
 
 /**
diff --git a/pkg/analysis_server/lib/src/provisional/completion/dart/completion_dart.dart b/pkg/analysis_server/lib/src/provisional/completion/dart/completion_dart.dart
index c5ee92f..26a8028 100644
--- a/pkg/analysis_server/lib/src/provisional/completion/dart/completion_dart.dart
+++ b/pkg/analysis_server/lib/src/provisional/completion/dart/completion_dart.dart
@@ -43,6 +43,12 @@
   Expression get dotTarget;
 
   /**
+   * Return a list containing the names of the experiments that have been
+   * enabled.
+   */
+  List<String> get enabledExperiments;
+
+  /**
    * Return `true` if free standing identifiers should be suggested
    */
   bool get includeIdentifiers;
diff --git a/pkg/analysis_server/lib/src/server/driver.dart b/pkg/analysis_server/lib/src/server/driver.dart
index 305b455..70f98dc 100644
--- a/pkg/analysis_server/lib/src/server/driver.dart
+++ b/pkg/analysis_server/lib/src/server/driver.dart
@@ -30,7 +30,6 @@
 import 'package:analyzer/src/plugin/resolver_provider.dart';
 import 'package:args/args.dart';
 import 'package:linter/src/rules.dart' as linter;
-import 'package:plugin/manager.dart';
 import 'package:telemetry/crash_reporting.dart';
 import 'package:telemetry/telemetry.dart' as telemetry;
 
@@ -276,19 +275,6 @@
   static const String TRAIN_USING = "train-using";
 
   /**
-   * User Experience, Experiment #1. This experiment changes the notion of
-   * what analysis roots are and priority files: the analysis root is set to be
-   * the priority files' containing directory.
-   */
-  static const String UX_EXPERIMENT_1 = "ux-experiment-1";
-
-  /**
-   * User Experience, Experiment #2. This experiment introduces the notion of an
-   * intermittent file system.
-   */
-  static const String UX_EXPERIMENT_2 = "ux-experiment-2";
-
-  /**
    * The instrumentation server that is to be used by the analysis server.
    */
   InstrumentationServer instrumentationServer;
@@ -333,8 +319,6 @@
     analysisServerOptions.cacheFolder = results[CACHE_FOLDER];
     analysisServerOptions.useFastaParser = results[USE_FASTA_PARSER];
     analysisServerOptions.useLanguageServerProtocol = results[USE_LSP];
-    analysisServerOptions.enableUXExperiment1 = results[UX_EXPERIMENT_1];
-    analysisServerOptions.enableUXExperiment2 = results[UX_EXPERIMENT_2];
 
     bool disableAnalyticsForSession = results[SUPPRESS_ANALYTICS_FLAG];
     if (results.wasParsed(TRAIN_USING)) {
@@ -455,10 +439,8 @@
     final serve_http = diagnosticServerPort != null;
 
     //
-    // Process all of the plugins so that extensions are registered.
+    // Register lint rules.
     //
-    ExtensionManager manager = new ExtensionManager();
-    manager.processPlugins(AnalysisEngine.instance.requiredPlugins);
     linter.registerLintRules();
 
     _DiagnosticServerImpl diagnosticServer = new _DiagnosticServerImpl();
@@ -570,8 +552,12 @@
       LspStdioAnalysisServer stdioServer =
           new LspStdioAnalysisServer(socketServer);
       stdioServer.serveStdio().then((_) async {
-        socketServer.analysisServer.shutdown();
-        exit(0);
+        // Only shutdown the server and exit if the server is not already
+        // handling the shutdown.
+        if (!socketServer.analysisServer.willExit) {
+          socketServer.analysisServer.shutdown();
+          exit(0);
+        }
       });
     });
   }
@@ -699,16 +685,6 @@
     parser.addOption(TRAIN_USING,
         help: "Pass in a directory to analyze for purposes of training an "
             "analysis server snapshot.");
-    parser.addFlag(UX_EXPERIMENT_1,
-        help: "User Experience, Experiment #1, "
-            "this experiment changes the notion of analysis roots and priority "
-            "files.",
-        hide: true);
-    parser.addFlag(UX_EXPERIMENT_2,
-        help: "User Experience, Experiment #2, "
-            "this experiment introduces the notion of an intermittent file "
-            "system.",
-        hide: true);
 
     return parser;
   }
@@ -722,6 +698,15 @@
     return sdk;
   }
 
+  /**
+   * Constructs a uuid combining the current date and a random integer.
+   */
+  String _generateUuidString() {
+    int millisecondsSinceEpoch = new DateTime.now().millisecondsSinceEpoch;
+    int random = new Random().nextInt(0x3fffffff);
+    return '$millisecondsSinceEpoch$random';
+  }
+
   String _getSdkPath(ArgResults args) {
     if (args[SDK_OPTION] != null) {
       return args[SDK_OPTION];
@@ -789,15 +774,6 @@
   }
 
   /**
-   * Constructs a uuid combining the current date and a random integer.
-   */
-  String _generateUuidString() {
-    int millisecondsSinceEpoch = new DateTime.now().millisecondsSinceEpoch;
-    int random = new Random().nextInt(0x3fffffff);
-    return '$millisecondsSinceEpoch$random';
-  }
-
-  /**
    * Perform log files rolling.
    *
    * Rename existing files with names `[path].(x)` to `[path].(x+1)`.
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/arglist_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/arglist_contributor.dart
index 4c4b692..3558966 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/arglist_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/arglist_contributor.dart
@@ -8,7 +8,7 @@
     hide Element, ElementKind;
 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.dart';
 import 'package:analysis_server/src/services/completion/dart/utilities.dart';
-import 'package:analysis_server/src/utilities/flutter.dart' as flutter;
+import 'package:analysis_server/src/utilities/flutter.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/element/element.dart';
@@ -182,6 +182,7 @@
       // Optionally add Flutter child widget details.
       Element element = parameter.enclosingElement;
       if (element is ConstructorElement) {
+        var flutter = Flutter.of(request.result.session);
         if (flutter.isWidget(element.enclosingElement)) {
           String value = getDefaultStringParameterValue(parameter);
           if (value == '<Widget>[]') {
@@ -212,7 +213,6 @@
       if (parameter is FieldFormalParameterElement) {
         _setDocumentation(suggestion, parameter.field?.documentationComment);
         suggestion.element = convertElement(parameter);
-        suggestion.elementUri = parameter.source.toString();
       }
 
       suggestions.add(suggestion);
@@ -260,6 +260,7 @@
   }
 
   bool _isInFlutterCreation(DartCompletionRequest request) {
+    var flutter = Flutter.of(request.result.session);
     AstNode containingNode = request?.target?.containingNode;
     InstanceCreationExpression newExpr = containingNode != null
         ? flutter.identifyNewExpression(containingNode.parent)
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart b/pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart
index 7661185..942ace0 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart
@@ -60,15 +60,15 @@
   /// fill this set with kinds of elements that are applicable at the
   /// completion location, so should be suggested from available suggestion
   /// sets.
-  final Set<protocol.ElementKind> includedSuggestionKinds;
+  final Set<protocol.ElementKind> includedElementKinds;
 
-  /// If [includedSuggestionKinds] is not null, must be also not `null`, and
+  /// If [includedElementKinds] is not null, must be also not `null`, and
   /// will be filled with tags for suggestions that should be given higher
   /// relevance than other included suggestions.
   final List<IncludedSuggestionRelevanceTag> includedSuggestionRelevanceTags;
 
   DartCompletionManager({
-    this.includedSuggestionKinds,
+    this.includedElementKinds,
     this.includedSuggestionRelevanceTags,
   });
 
@@ -121,8 +121,8 @@
       new VariableNameContributor()
     ];
 
-    if (includedSuggestionKinds != null) {
-      _addIncludedSuggestionKinds(dartRequest);
+    if (includedElementKinds != null) {
+      _addIncludedElementKinds(dartRequest);
       _addIncludedSuggestionRelevanceTags(dartRequest);
     } else {
       contributors.add(new ImportedReferenceContributor());
@@ -177,13 +177,16 @@
     return suggestions;
   }
 
-  void _addIncludedSuggestionKinds(DartCompletionRequestImpl request) {
+  void _addIncludedElementKinds(DartCompletionRequestImpl request) {
     var opType = request.opType;
 
     if (!opType.includeIdentifiers) return;
 
-    var kinds = includedSuggestionKinds;
+    var kinds = includedElementKinds;
     if (kinds != null) {
+      if (opType.includeConstructorSuggestions) {
+        kinds.add(protocol.ElementKind.CONSTRUCTOR);
+      }
       if (opType.includeTypeNameSuggestions) {
         kinds.add(protocol.ElementKind.CLASS);
         kinds.add(protocol.ElementKind.CLASS_TYPE_ALIAS);
@@ -192,6 +195,7 @@
         kinds.add(protocol.ElementKind.MIXIN);
       }
       if (opType.includeReturnValueSuggestions) {
+        kinds.add(protocol.ElementKind.CONSTRUCTOR);
         kinds.add(protocol.ElementKind.ENUM_CONSTANT);
         kinds.add(protocol.ElementKind.FUNCTION);
         kinds.add(protocol.ElementKind.TOP_LEVEL_VARIABLE);
@@ -326,6 +330,10 @@
   }
 
   @override
+  List<String> get enabledExperiments =>
+      result.session.analysisContext.analysisOptions.enabledExperiments;
+
+  @override
   bool get includeIdentifiers {
     return opType.includeIdentifiers;
   }
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/inherited_reference_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/inherited_reference_contributor.dart
index ef19706..5a66b56 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/inherited_reference_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/inherited_reference_contributor.dart
@@ -6,7 +6,7 @@
 
 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.dart';
 import 'package:analysis_server/src/services/completion/dart/suggestion_builder.dart';
-import 'package:analysis_server/src/utilities/flutter.dart' as flutter;
+import 'package:analysis_server/src/utilities/flutter.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/standard_resolution_map.dart';
 import 'package:analyzer/dart/element/element.dart';
@@ -134,7 +134,8 @@
     }
     if (element is MethodElement &&
         element.name == 'setState' &&
-        flutter.isExactState(element.enclosingElement)) {
+        Flutter.of(request.result.session)
+            .isExactState(element.enclosingElement)) {
       // Find the line indentation.
       String content = request.result.content;
       int lineStartOffset = request.offset;
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart
index 64bac8e..9da6534 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart
@@ -9,6 +9,7 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/ast/visitor.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/ast/token.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
 import 'package:analyzer_plugin/src/utilities/completion/optype.dart';
@@ -306,7 +307,7 @@
   }
 
   @override
-  visitForEachStatement(ForEachStatement node) {
+  visitForEachParts(ForEachParts node) {
     if (entity == node.inKeyword) {
       Token previous = node.findPrevious(node.inKeyword);
       if (previous is SyntheticStringToken && previous.lexeme == 'in') {
@@ -327,6 +328,13 @@
   }
 
   @override
+  visitForElement(ForElement node) {
+    _addCollectionElementKeywords();
+    _addExpressionKeywords(node);
+    return super.visitForElement(node);
+  }
+
+  @override
   visitFormalParameterList(FormalParameterList node) {
     AstNode constructorDeclaration =
         node.thisOrAncestorOfType<ConstructorDeclaration>();
@@ -344,19 +352,13 @@
   }
 
   @override
-  visitForStatement(ForStatement node) {
-    // Actual: for (va^)
-    // Parsed: for (va^; ;)
-    if (node.initialization == entity && entity is SimpleIdentifier) {
-      if (_isNextTokenSynthetic(entity, TokenType.SEMICOLON)) {
-        _addSuggestion(Keyword.VAR, DART_RELEVANCE_HIGH);
-      }
-    }
+  visitForParts(ForParts node) {
     // Actual: for (int x i^)
     // Parsed: for (int x; i^;)
     // Handle the degenerate case while typing - for (int x i^)
     if (node.condition == entity &&
         entity is SimpleIdentifier &&
+        node is ForPartsWithDeclarations &&
         node.variables != null) {
       if (_isPreviousTokenSynthetic(entity, TokenType.SEMICOLON)) {
         _addSuggestion(Keyword.IN, DART_RELEVANCE_HIGH);
@@ -365,6 +367,15 @@
   }
 
   @override
+  visitForStatement(ForStatement node) {
+    // Actual: for (va^)
+    // Parsed: for (va^; ;)
+    if (node.forLoopParts == entity) {
+      _addSuggestion(Keyword.VAR, DART_RELEVANCE_HIGH);
+    }
+  }
+
+  @override
   visitFunctionExpression(FunctionExpression node) {
     if (entity == node.body) {
       FunctionBody body = node.body;
@@ -384,6 +395,13 @@
   }
 
   @override
+  visitIfElement(IfElement node) {
+    _addCollectionElementKeywords();
+    _addExpressionKeywords(node);
+    return super.visitIfElement(node);
+  }
+
+  @override
   visitIfStatement(IfStatement node) {
     if (_isPreviousTokenSynthetic(entity, TokenType.CLOSE_PAREN)) {
       // analyzer parser
@@ -446,6 +464,12 @@
   }
 
   @override
+  visitListLiteral(ListLiteral node) {
+    _addCollectionElementKeywords();
+    super.visitListLiteral(node);
+  }
+
+  @override
   visitMethodDeclaration(MethodDeclaration node) {
     if (entity == node.body) {
       if (isEmptyBody(node.body)) {
@@ -546,6 +570,18 @@
   }
 
   @override
+  visitSetOrMapLiteral(SetOrMapLiteral node) {
+    _addCollectionElementKeywords();
+    super.visitSetOrMapLiteral(node);
+  }
+
+  @override
+  visitSpreadElement(SpreadElement node) {
+    _addExpressionKeywords(node);
+    return super.visitSpreadElement(node);
+  }
+
+  @override
   visitStringLiteral(StringLiteral node) {
     // ignored
   }
@@ -624,6 +660,17 @@
     }
   }
 
+  void _addCollectionElementKeywords() {
+    List<String> enabledExperiments = request.enabledExperiments;
+    if (enabledExperiments.contains(EnableString.control_flow_collections) ||
+        enabledExperiments.contains(EnableString.spread_collections)) {
+      _addSuggestions([
+        Keyword.FOR,
+        Keyword.IF,
+      ]);
+    }
+  }
+
   void _addCompilationUnitKeywords() {
     _addSuggestions([
       Keyword.ABSTRACT,
@@ -776,9 +823,7 @@
       node.thisOrAncestorOfType<DoStatement>() != null;
 
   bool _inForLoop(AstNode node) =>
-      node.thisOrAncestorMatching(
-          (p) => p is ForStatement || p is ForEachStatement) !=
-      null;
+      node.thisOrAncestorMatching((p) => p is ForStatement) != null;
 
   bool _inLoop(AstNode node) =>
       _inDoLoop(node) || _inForLoop(node) || _inWhileLoop(node);
@@ -813,15 +858,6 @@
     return false;
   }
 
-  static bool _isNextTokenSynthetic(Object entity, TokenType type) {
-    if (entity is AstNode) {
-      Token token = entity.beginToken;
-      Token nextToken = token.next;
-      return nextToken.isSynthetic && nextToken.type == type;
-    }
-    return false;
-  }
-
   static bool _isPreviousTokenSynthetic(Object entity, TokenType type) {
     if (entity is AstNode) {
       Token token = entity.beginToken;
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/label_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/label_contributor.dart
index d89ed2f..77b4ebf 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/label_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/label_contributor.dart
@@ -103,7 +103,6 @@
         suggestion.element = createLocalElement(
             request.source, protocol.ElementKind.LABEL, label.label,
             returnType: NO_RETURN_TYPE);
-        suggestion.elementUri = request.source.toString();
       }
     }
   }
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/local_reference_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/local_reference_contributor.dart
index b1d8459..e4d6e0f 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/local_reference_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/local_reference_contributor.dart
@@ -54,8 +54,10 @@
 
         // Do not suggest loop variable of a ForEachStatement
         // when completing the expression of the ForEachStatement
-        if (node is ForEachStatement) {
+        if (node is ForStatement && node.forLoopParts is ForEachParts) {
           node = node.parent;
+        } else if (node is ForEachParts) {
+          node = node.parent.parent;
         }
 
         _LocalVisitor visitor = new _LocalVisitor(
@@ -295,6 +297,19 @@
   }
 
   @override
+  void declaredMixin(MixinDeclaration declaration) {
+    if (optype.includeTypeNameSuggestions) {
+      _addLocalSuggestion_includeTypeNameSuggestions(
+          declaration.documentationComment,
+          declaration.name,
+          NO_RETURN_TYPE,
+          protocol.ElementKind.MIXIN,
+          isAbstract: true,
+          isDeprecated: isDeprecated(declaration));
+    }
+  }
+
+  @override
   void declaredParam(SimpleIdentifier id, TypeAnnotation typeName) {
     if (optype.includeReturnValueSuggestions) {
       _addLocalSuggestion_includeReturnValueSuggestions(
@@ -358,7 +373,6 @@
           isDeprecated: isDeprecated,
           parameters: param?.toSource(),
           returnType: typeName);
-      suggestion.elementUri = request.source.toString();
       if ((elemKind == protocol.ElementKind.METHOD ||
               elemKind == protocol.ElementKind.FUNCTION) &&
           param != null) {
@@ -400,7 +414,6 @@
             constantDeclaration.name.length,
             0,
             0));
-    suggestion.elementUri = request.source.uri.toString();
   }
 
   void _addLocalSuggestion_includeReturnValueSuggestions(
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/override_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/override_contributor.dart
index e2d567d..cd4c94c 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/override_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/override_contributor.dart
@@ -117,7 +117,6 @@
         false,
         displayText: displayText);
     suggestion.element = protocol.convertElement(signature.element);
-    suggestion.elementUri = signature.element.source.toString();
     return suggestion;
   }
 
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/suggestion_builder.dart b/pkg/analysis_server/lib/src/services/completion/dart/suggestion_builder.dart
index c7186e2..abce4e7 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/suggestion_builder.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/suggestion_builder.dart
@@ -10,21 +10,16 @@
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/dart/element/visitor.dart';
-import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/util/comment.dart';
-import 'package:path/path.dart' as path;
 
 /**
- * Return a suggestion based upon the given element
- * or `null` if a suggestion is not appropriate for the given element.
- * If the suggestion is not currently in scope, then specify
- * importForSource as the source to which an import should be added.
+ * Return a suggestion based upon the given element or `null` if a suggestion
+ * is not appropriate for the given element.
  */
 CompletionSuggestion createSuggestion(Element element,
     {String completion,
     CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
-    int relevance: DART_RELEVANCE_DEFAULT,
-    Source importForSource}) {
+    int relevance: DART_RELEVANCE_DEFAULT}) {
   if (element == null) {
     return null;
   }
@@ -51,7 +46,6 @@
   suggestion.docSummary = getDartDocSummary(doc);
 
   suggestion.element = protocol.convertElement(element);
-  suggestion.elementUri = element.source.uri.toString();
   Element enclosingElement = element.enclosingElement;
   if (enclosingElement is ClassElement) {
     suggestion.declaringType = enclosingElement.displayName;
@@ -79,34 +73,6 @@
     addDefaultArgDetails(
         suggestion, element, requiredParameters, namedParameters);
   }
-  if (importForSource != null) {
-    String srcPath = path.dirname(importForSource.fullName);
-    LibraryElement libElem = element.library;
-    if (libElem != null) {
-      Source libSource = libElem.source;
-      if (libSource != null) {
-        UriKind uriKind = libSource.uriKind;
-        if (uriKind == UriKind.DART_URI) {
-          suggestion.importUri = libSource.uri.toString();
-        } else if (uriKind == UriKind.PACKAGE_URI) {
-          suggestion.importUri = libSource.uri.toString();
-        } else if (uriKind == UriKind.FILE_URI &&
-            element.source.uriKind == UriKind.FILE_URI) {
-          try {
-            suggestion.importUri =
-                path.relative(libSource.fullName, from: srcPath);
-          } catch (_) {
-            // ignored
-          }
-        }
-      }
-    }
-    if (suggestion.importUri == null) {
-      // Do not include out of scope suggestions
-      // for which we cannot determine an import
-      return null;
-    }
-  }
   return suggestion;
 }
 
@@ -166,7 +132,6 @@
     CompletionSuggestion suggestion = createSuggestion(element,
         completion: completion, kind: kind, relevance: relevance);
     if (suggestion != null) {
-      suggestion.elementUri = element.source.uri.toString();
       if (element.isSynthetic && element is PropertyAccessorElement) {
         String cacheKey;
         if (element.isGetter) {
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/type_member_contributor.dart b/pkg/analysis_server/lib/src/services/completion/dart/type_member_contributor.dart
index 63faf71..50e4b46 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/type_member_contributor.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/type_member_contributor.dart
@@ -76,9 +76,11 @@
     }
     String containingMethodName;
     List<InterfaceType> mixins;
+    List<InterfaceType> superclassConstraints;
     if (expression is SuperExpression && type is InterfaceType) {
       // Suggest members from superclass if target is "super"
       mixins = (type as InterfaceType).mixins;
+      superclassConstraints = (type as InterfaceType).superclassConstraints;
       type = (type as InterfaceType).superclass;
       // Determine the name of the containing method because
       // the most likely completion is a super expression with same name
@@ -99,7 +101,8 @@
     // Build the suggestions
     if (type is InterfaceType) {
       _SuggestionBuilder builder = new _SuggestionBuilder(containingLibrary);
-      builder.buildSuggestions(type, containingMethodName, mixins: mixins);
+      builder.buildSuggestions(type, containingMethodName,
+          mixins: mixins, superclassConstraints: superclassConstraints);
       return builder.suggestions.toList();
     }
     return const <CompletionSuggestion>[];
@@ -290,7 +293,7 @@
    * is the name of the method in which the completion is requested.
    */
   void buildSuggestions(InterfaceType type, String containingMethodName,
-      {List<InterfaceType> mixins}) {
+      {List<InterfaceType> mixins, List<InterfaceType> superclassConstraints}) {
     // Visit all of the types in the class hierarchy, collecting possible
     // completions.  If multiple elements are found that complete to the same
     // identifier, addSuggestion will discard all but the first (with a few
@@ -299,6 +302,9 @@
     if (mixins != null) {
       types.addAll(mixins);
     }
+    if (superclassConstraints != null) {
+      types.addAll(superclassConstraints);
+    }
     for (InterfaceType targetType in types) {
       for (MethodElement method in targetType.methods) {
         // Exclude static methods when completion on an instance
diff --git a/pkg/analysis_server/lib/src/services/completion/postfix/postfix_completion.dart b/pkg/analysis_server/lib/src/services/completion/postfix/postfix_completion.dart
index 86231ae..9fa7d7e 100644
--- a/pkg/analysis_server/lib/src/services/completion/postfix/postfix_completion.dart
+++ b/pkg/analysis_server/lib/src/services/completion/postfix/postfix_completion.dart
@@ -460,7 +460,6 @@
         // Disallow control-flow statements.
         if (astNode is DoStatement ||
             astNode is IfStatement ||
-            astNode is ForEachStatement ||
             astNode is ForStatement ||
             astNode is SwitchStatement ||
             astNode is TryStatement ||
diff --git a/pkg/analysis_server/lib/src/services/completion/statement/statement_completion.dart b/pkg/analysis_server/lib/src/services/completion/statement/statement_completion.dart
index 303ddd5..6c73922 100644
--- a/pkg/analysis_server/lib/src/services/completion/statement/statement_completion.dart
+++ b/pkg/analysis_server/lib/src/services/completion/statement/statement_completion.dart
@@ -185,8 +185,7 @@
     if (node is Statement) {
       if (errors.isEmpty) {
         if (_complete_ifStatement() ||
-            _complete_forStatement() ||
-            _complete_forEachStatement() ||
+            _complete_forStatement2() ||
             _complete_whileStatement() ||
             _complete_controlFlowBlock()) {
           return completion;
@@ -194,8 +193,7 @@
       } else {
         if (_complete_ifStatement() ||
             _complete_doStatement() ||
-            _complete_forStatement() ||
-            _complete_forEachStatement() ||
+            _complete_forStatement2() ||
             _complete_functionDeclarationStatement() ||
             _complete_switchStatement() ||
             _complete_tryStatement() ||
@@ -396,7 +394,6 @@
     AstNode outer = node.parent.parent;
     if (!(outer is DoStatement ||
         outer is ForStatement ||
-        outer is ForEachStatement ||
         outer is IfStatement ||
         outer is WhileStatement)) {
       return false;
@@ -523,17 +520,22 @@
     return true;
   }
 
-  bool _complete_forEachStatement() {
-    if (node is! ForEachStatement) {
-      return false;
+  bool _complete_forEachStatement(
+      ForStatement forNode, ForEachParts forEachParts) {
+    AstNode name;
+    if (forEachParts is ForEachPartsWithIdentifier) {
+      name = forEachParts.identifier;
+    } else if (forEachParts is ForEachPartsWithDeclaration) {
+      name = forEachParts.loopVariable;
+    } else {
+      throw new StateError('Unrecognized for loop parts');
     }
-    ForEachStatement forNode = node;
     return _complete_forEachStatementRest(
         forNode.forKeyword,
         forNode.leftParenthesis,
-        forNode.identifier ?? forNode.loopVariable,
-        forNode.inKeyword,
-        forNode.iterable,
+        name,
+        forEachParts.inKeyword,
+        forEachParts.iterable,
         forNode.rightParenthesis,
         forNode.body);
   }
@@ -584,11 +586,7 @@
     return true;
   }
 
-  bool _complete_forStatement() {
-    if (node is! ForStatement) {
-      return false;
-    }
-    ForStatement forNode = node;
+  bool _complete_forStatement(ForStatement forNode, ForParts forParts) {
     SourceBuilder sb;
     int replacementLength = 0;
     if (forNode.leftParenthesis.isSynthetic) {
@@ -601,21 +599,21 @@
       sb.setExitOffset();
       sb.append(')');
     } else {
-      if (!forNode.rightSeparator.isSynthetic) {
+      if (!forParts.rightSeparator.isSynthetic) {
         // Fully-defined init, cond, updaters so nothing more needed here.
         // emptyParts, noError
         sb = new SourceBuilder(file, forNode.rightParenthesis.offset + 1);
-      } else if (!forNode.leftSeparator.isSynthetic) {
-        if (_isSyntheticExpression(forNode.condition)) {
+      } else if (!forParts.leftSeparator.isSynthetic) {
+        if (_isSyntheticExpression(forParts.condition)) {
           String text = utils
               .getNodeText(forNode)
-              .substring(forNode.leftSeparator.offset - forNode.offset);
+              .substring(forParts.leftSeparator.offset - forNode.offset);
           Match match =
               new RegExp(r';\s*(/\*.*\*/\s*)?\)[ \t]*').matchAsPrefix(text);
           if (match != null) {
             // emptyCondition, emptyInitializersEmptyCondition
             replacementLength = match.end - match.start;
-            sb = new SourceBuilder(file, forNode.leftSeparator.offset);
+            sb = new SourceBuilder(file, forParts.leftSeparator.offset);
             sb.append('; ${match.group(1) == null ? '' : match.group(1)}; )');
             String suffix = text.substring(match.end);
             if (suffix.trim().isNotEmpty) {
@@ -627,7 +625,7 @@
                 replacementLength -= eol.length;
               }
             }
-            exitPosition = _newPosition(forNode.leftSeparator.offset + 2);
+            exitPosition = _newPosition(forParts.leftSeparator.offset + 2);
           } else {
             return false; // Line comment in condition
           }
@@ -636,25 +634,27 @@
           sb = new SourceBuilder(file, forNode.rightParenthesis.offset);
           replacementLength = 1;
           sb.append('; )');
-          exitPosition = _newPosition(forNode.rightSeparator.offset + 2);
+          exitPosition = _newPosition(forParts.rightSeparator.offset + 2);
         }
-      } else if (_isSyntheticExpression(forNode.initialization)) {
+      } else if (forParts is ForPartsWithExpression &&
+          _isSyntheticExpression(forParts.initialization)) {
         // emptyInitializers
         exitPosition = _newPosition(forNode.rightParenthesis.offset);
         sb = new SourceBuilder(file, forNode.rightParenthesis.offset);
-      } else if (forNode.initialization is SimpleIdentifier &&
-          forNode.initialization.beginToken.lexeme == 'in') {
+      } else if (forParts is ForPartsWithExpression &&
+          forParts.initialization is SimpleIdentifier &&
+          forParts.initialization.beginToken.lexeme == 'in') {
         // looks like a for/each statement missing the loop variable
         return _complete_forEachStatementRest(
             forNode.forKeyword,
             forNode.leftParenthesis,
             null,
-            forNode.initialization.beginToken,
+            forParts.initialization.beginToken,
             null,
             forNode.rightParenthesis,
             forNode.body);
       } else {
-        int start = forNode.condition.offset + forNode.condition.length;
+        int start = forParts.condition.offset + forParts.condition.length;
         String text =
             utils.getNodeText(forNode).substring(start - forNode.offset);
         if (text.startsWith(new RegExp(r'\s*\)'))) {
@@ -687,6 +687,19 @@
     return true;
   }
 
+  bool _complete_forStatement2() {
+    var node = this.node;
+    if (node is ForStatement) {
+      var forLoopParts = node.forLoopParts;
+      if (forLoopParts is ForParts) {
+        return _complete_forStatement(node, forLoopParts);
+      } else if (forLoopParts is ForEachParts) {
+        return _complete_forEachStatement(node, forLoopParts);
+      }
+    }
+    return false;
+  }
+
   bool _complete_functionDeclaration() {
     if (node is! MethodDeclaration && node is! FunctionDeclaration) {
       return false;
@@ -1141,7 +1154,9 @@
       return true;
     }
     AstNode p = n.parent;
-    return p is! Statement && p?.parent is! Statement;
+    return p is! Statement &&
+        p?.parent is! Statement &&
+        p?.parent?.parent is! Statement;
   }
 
   bool _isSyntheticExpression(Expression expr) {
diff --git a/pkg/analysis_server/lib/src/services/completion/token_details/token_detail_builder.dart b/pkg/analysis_server/lib/src/services/completion/token_details/token_detail_builder.dart
new file mode 100644
index 0000000..3d225b5
--- /dev/null
+++ b/pkg/analysis_server/lib/src/services/completion/token_details/token_detail_builder.dart
@@ -0,0 +1,125 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/protocol/protocol_generated.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/syntactic_entity.dart';
+import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/type.dart';
+
+/// An object used to build the details for each token in the code being
+/// analyzed.
+class TokenDetailBuilder {
+  /// The list of details that were built.
+  List<TokenDetails> details = [];
+
+  /// Initialize a newly created builder.
+  TokenDetailBuilder();
+
+  /// Visit a [node] in the AST structure to build details for all of the tokens
+  /// contained by that node.
+  void visitNode(AstNode node) {
+    for (SyntacticEntity entity in node.childEntities) {
+      if (entity is Token) {
+        _createDetails(entity, null, null);
+      } else if (entity is SimpleIdentifier) {
+        String type = _getType(entity);
+        if (_isTypeName(entity)) {
+          type = 'dart:core;Type<$type>';
+        }
+        List<String> kinds = [];
+        if (entity.inDeclarationContext()) {
+          kinds.add('declaration');
+        } else {
+          kinds.add('reference');
+        }
+        _createDetails(entity.token, type, kinds);
+      } else if (entity is BooleanLiteral) {
+        _createDetails(entity.literal, _getType(entity), null);
+      } else if (entity is DoubleLiteral) {
+        _createDetails(entity.literal, _getType(entity), null);
+      } else if (entity is IntegerLiteral) {
+        _createDetails(entity.literal, _getType(entity), null);
+      } else if (entity is SimpleStringLiteral) {
+        _createDetails(entity.literal, _getType(entity), null);
+      } else if (entity is Comment) {
+        // Ignore comments and the references within them.
+      } else if (entity is AstNode) {
+        visitNode(entity);
+      }
+    }
+  }
+
+  /// Create the details for a single [token], using the given list of [kinds].
+  void _createDetails(Token token, String type, List<String> kinds) {
+    details.add(
+        new TokenDetails(token.lexeme, type: type, validElementKinds: kinds));
+  }
+
+  /// Return a unique identifier for the type of the given [expression].
+  String _getType(Expression expression) {
+    StringBuffer buffer = new StringBuffer();
+    _writeType(buffer, expression.staticType);
+    return buffer.toString();
+  }
+
+  /// Return `true` if the [identifier] represents the name of a type.
+  bool _isTypeName(SimpleIdentifier identifier) {
+    AstNode parent = identifier.parent;
+    if (parent is TypeName && identifier == parent.name) {
+      return true;
+    } else if (parent is PrefixedIdentifier &&
+        parent.identifier == identifier) {
+      AstNode parent2 = parent.parent;
+      if (parent2 is TypeName && parent == parent2.name) {
+        return true;
+      }
+    }
+    return false;
+  }
+
+  /// Return a unique identifier for the type of the given [expression].
+  void _writeType(StringBuffer buffer, DartType type) {
+    if (type == null) {
+      // This should never happen if the AST has been resolved.
+      buffer.write('dynamic');
+    } else if (type is FunctionType) {
+      _writeType(buffer, type.returnType);
+      buffer.write(' Function(');
+      bool first = true;
+      for (var parameter in type.parameters) {
+        if (first) {
+          first = false;
+        } else {
+          buffer.write(', ');
+        }
+        _writeType(buffer, parameter.type);
+      }
+      buffer.write(')');
+    } else if (type is InterfaceType) {
+      Element element = type.element;
+      if (element == null || element.isSynthetic) {
+        buffer.write(type.displayName);
+      } else {
+//        String uri = element.library.source.uri.toString();
+        String name = element.name;
+        if (element is ClassMemberElement) {
+          String className = element.enclosingElement.name;
+          // TODO(brianwilkerson) Figure out why the uri is a file: URI when it
+          //  ought to be a package: URI and restore the code below to include
+          //  the URI in the string.
+//          buffer.write('$uri;$className;$name');
+          buffer.write('$className;$name');
+        } else {
+//          buffer.write('$uri;$name');
+          buffer.write('$name');
+        }
+      }
+    } else {
+      // Handle `void` and `dynamic`.
+      buffer.write(type.displayName);
+    }
+  }
+}
diff --git a/pkg/analysis_server/lib/src/services/correction/assist.dart b/pkg/analysis_server/lib/src/services/correction/assist.dart
index 7bc89e0..b16b95c 100644
--- a/pkg/analysis_server/lib/src/services/correction/assist.dart
+++ b/pkg/analysis_server/lib/src/services/correction/assist.dart
@@ -51,7 +51,7 @@
       "Convert to line documentation comment",
       associatedErrorCodes: <String>['slash_for_doc_comments']);
   static const CONVERT_INTO_ASYNC_BODY = const AssistKind(
-      'dart.assist.convert.bodyToAsync', 30, "Convert to async function body");
+      'dart.assist.convert.bodyToAsync', 29, "Convert to async function body");
   static const CONVERT_INTO_BLOCK_BODY = const AssistKind(
       'dart.assist.convert.bodyToBlock', 30, "Convert to block body");
   static const CONVERT_INTO_EXPRESSION_BODY = const AssistKind(
@@ -60,6 +60,11 @@
   static const CONVERT_INTO_FINAL_FIELD = const AssistKind(
       'dart.assist.convert.getterToFinalField', 30, "Convert to final field",
       associatedErrorCodes: <String>['prefer_final_fields']);
+  static const CONVERT_INTO_ABSOLUTE_IMPORT = const AssistKind(
+      'dart.assist.convert.relativeToAbsoluteImport',
+      30,
+      "Convert to absolute import",
+      associatedErrorCodes: <String>['avoid_relative_lib_imports']);
   static const CONVERT_INTO_FOR_INDEX = const AssistKind(
       'dart.assist.convert.forEachToForIndex', 30, "Convert to for-index loop");
   static const CONVERT_INTO_GENERIC_FUNCTION_SYNTAX = const AssistKind(
@@ -83,8 +88,16 @@
       'dart.assist.convert.toConstructorFieldParameter',
       30,
       "Convert to field formal parameter");
+  static const CONVERT_TO_FOR_ELEMENT = const AssistKind(
+      'dart.assist.convertToForElement', 30, "Convert to a 'for' element",
+      associatedErrorCodes: <String>[
+        'prefer_for_elements_to_map_fromIterable'
+      ]);
   static const CONVERT_TO_IF_ELEMENT = const AssistKind(
-      'dart.assist.convertToIfElement', 30, "Convert to an 'if' element");
+      'dart.assist.convertToIfElement', 30, "Convert to an 'if' element",
+      associatedErrorCodes: <String>[
+        'prefer_if_elements_to_conditional_expressions'
+      ]);
   static const CONVERT_TO_INT_LITERAL = const AssistKind(
       'dart.assist.convert.toIntLiteral', 30, "Convert to an int literal",
       associatedErrorCodes: <String>['prefer_int_literals']);
@@ -104,6 +117,9 @@
       'dart.assist.convert.toConstructorNormalParameter',
       30,
       "Convert to normal parameter");
+  static const CONVERT_TO_NULL_AWARE = const AssistKind(
+      'dart.assist.convert.toNullAware', 30, "Convert to use '?.'",
+      associatedErrorCodes: <String>['prefer_null_aware_operators']);
   static const CONVERT_TO_SET_LITERAL = const AssistKind(
       'dart.assist.convert.toSetLiteral', 30, "Convert to set literal",
       // todo (brianwilkerson): unify w/ fix
@@ -114,7 +130,8 @@
       "Convert to single quoted string",
       associatedErrorCodes: <String>['prefer_single_quotes']);
   static const CONVERT_TO_SPREAD = const AssistKind(
-      'dart.assist.convertToSpread', 30, "Convert to a spread");
+      'dart.assist.convertToSpread', 30, "Convert to a spread",
+      associatedErrorCodes: <String>['prefer_spread_collections']);
   static const ENCAPSULATE_FIELD =
       const AssistKind('dart.assist.encapsulateField', 30, "Encapsulate field");
   static const EXCHANGE_OPERANDS =
@@ -153,6 +170,9 @@
       'dart.assist.flutter.wrap.streamBuilder', 30, "Wrap with StreamBuilder");
   static const IMPORT_ADD_SHOW = const AssistKind(
       'dart.assist.addShowCombinator', 30, "Add explicit 'show' combinator");
+  static const INLINE_INVOCATION = const AssistKind(
+      'dart.assist.inline', 30, "Inline invocation of '{0}'",
+      associatedErrorCodes: <String>['prefer_inlined_adds']);
   static const INTRODUCE_LOCAL_CAST_TYPE = const AssistKind(
       'dart.assist.introduceLocalCast',
       30,
diff --git a/pkg/analysis_server/lib/src/services/correction/assist_internal.dart b/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
index 18b210c..9a58459 100644
--- a/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/assist_internal.dart
@@ -13,9 +13,10 @@
 import 'package:analysis_server/src/services/correction/statement_analyzer.dart';
 import 'package:analysis_server/src/services/correction/util.dart';
 import 'package:analysis_server/src/services/search/hierarchy.dart';
-import 'package:analysis_server/src/utilities/flutter.dart' as flutter;
+import 'package:analysis_server/src/utilities/flutter.dart';
 import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/precedence.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
@@ -53,6 +54,7 @@
   final TypeProvider typeProvider;
   final String file;
   final CorrectionUtils utils;
+  final Flutter flutter;
 
   final List<Assist> assists = <Assist>[];
 
@@ -66,7 +68,8 @@
         sessionHelper = AnalysisSessionHelper(context.resolveResult.session),
         typeProvider = context.resolveResult.typeProvider,
         file = context.resolveResult.path,
-        utils = new CorrectionUtils(context.resolveResult);
+        utils = new CorrectionUtils(context.resolveResult),
+        flutter = Flutter.of(context.resolveResult.session);
 
   /**
    * Returns the EOL to use for this [CompilationUnit].
@@ -101,6 +104,7 @@
     await _addProposal_convertMapConstructorToMapLiteral();
     await _addProposal_convertPartOfToUri();
     await _addProposal_convertSetConstructorToSetLiteral();
+    await _addProposal_convertToAbsoluteImport();
     await _addProposal_convertToAsyncFunctionBody();
     await _addProposal_convertToBlockFunctionBody();
     await _addProposal_convertToDoubleQuotedString();
@@ -114,6 +118,7 @@
     await _addProposal_convertToIsNotEmpty();
     await _addProposal_convertToMultilineString();
     await _addProposal_convertToNormalParameter();
+    await _addProposal_convertToNullAware();
     await _addProposal_convertToSingleQuotedString();
     await _addProposal_encapsulateField();
     await _addProposal_exchangeOperands();
@@ -129,6 +134,7 @@
     await _addProposal_flutterWrapWidget();
     await _addProposal_flutterWrapWidgets();
     await _addProposal_importAddShow();
+    await _addProposal_inlineAdd();
     await _addProposal_introduceLocalTestedType();
     await _addProposal_invertIf();
     await _addProposal_joinIfStatementInner();
@@ -145,7 +151,7 @@
 
     if (experimentStatus.control_flow_collections) {
       await _addProposal_convertConditionalExpressionToIfElement();
-      await _addProposal_convertMapFromIterableToIfLiteral();
+      await _addProposal_convertMapFromIterableToForLiteral();
     }
     if (experimentStatus.spread_collections) {
       await _addProposal_convertAddAllToSpread();
@@ -164,6 +170,18 @@
       await _addProposal_convertClassToMixin();
     } else if (assistKind == DartAssistKind.CONVERT_TO_INT_LITERAL) {
       await _addProposal_convertToIntLiteral();
+    } else if (assistKind == DartAssistKind.CONVERT_TO_SPREAD) {
+      if (experimentStatus.spread_collections) {
+        await _addProposal_convertAddAllToSpread();
+      }
+    } else if (assistKind == DartAssistKind.CONVERT_TO_FOR_ELEMENT) {
+      if (experimentStatus.control_flow_collections) {
+        await _addProposal_convertMapFromIterableToForLiteral();
+      }
+    } else if (assistKind == DartAssistKind.CONVERT_TO_IF_ELEMENT) {
+      if (experimentStatus.control_flow_collections) {
+        await _addProposal_convertConditionalExpressionToIfElement();
+      }
     }
     return assists;
   }
@@ -219,12 +237,16 @@
     DeclaredIdentifier declaredIdentifier =
         node.thisOrAncestorOfType<DeclaredIdentifier>();
     if (declaredIdentifier == null) {
-      ForEachStatement forEach = node.thisOrAncestorOfType<ForEachStatement>();
+      ForStatement forEach = node.thisOrAncestorMatching(
+          (node) => node is ForStatement && node.forLoopParts is ForEachParts);
+      ForEachParts forEachParts = forEach?.forLoopParts;
       int offset = node.offset;
       if (forEach != null &&
-          forEach.iterable != null &&
-          offset < forEach.iterable.offset) {
-        declaredIdentifier = forEach.loopVariable;
+          forEachParts.iterable != null &&
+          offset < forEachParts.iterable.offset) {
+        declaredIdentifier = forEachParts is ForEachPartsWithDeclaration
+            ? forEachParts.loopVariable
+            : null;
       }
     }
     if (declaredIdentifier == null) {
@@ -442,17 +464,20 @@
     CascadeExpression cascade = invocation.thisOrAncestorOfType();
     NodeList<Expression> sections = cascade.cascadeSections;
     Expression target = cascade.target;
-    if (target is! ListLiteral2 || sections[0] != invocation) {
+    if (target is! ListLiteral || sections[0] != invocation) {
+      // TODO(brianwilkerson) Consider extending this to handle set literals.
       _coverageMarker();
       return;
     }
 
     bool isEmptyListLiteral(Expression expression) =>
-        expression is ListLiteral2 && expression.elements.isEmpty;
+        expression is ListLiteral && expression.elements.isEmpty;
 
-    ListLiteral2 list = target;
+    ListLiteral list = target;
     Expression argument = invocation.argumentList.arguments[0];
     String elementText;
+    AssistKind kind = DartAssistKind.CONVERT_TO_SPREAD;
+    List<String> args = null;
     if (argument is BinaryExpression &&
         argument.operator.type == TokenType.QUESTION_QUESTION) {
       Expression right = argument.rightOperand;
@@ -471,14 +496,34 @@
         String thenText = utils.getNodeText(argument.thenExpression);
         elementText = 'if ($conditionText) ...$thenText';
       }
+    } else if (argument is ListLiteral) {
+      // ..addAll([ ... ])
+      NodeList<CollectionElement> elements = argument.elements;
+      if (elements.isEmpty) {
+        // TODO(brianwilkerson) Consider adding a cleanup for the empty list
+        //  case. We can essentially remove the whole invocation because it does
+        //  nothing.
+        return;
+      }
+      int startOffset = elements.first.offset;
+      int endOffset = elements.last.end;
+      elementText = utils.getText(startOffset, endOffset - startOffset);
+      kind = DartAssistKind.INLINE_INVOCATION;
+      args = ['addAll'];
     }
     elementText ??= '...${utils.getNodeText(argument)}';
     DartChangeBuilder changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
-      builder.addSimpleInsertion(list.elements.last.end, ', $elementText');
+      if (list.elements.isNotEmpty) {
+        // ['a']..addAll(['b', 'c']);
+        builder.addSimpleInsertion(list.elements.last.end, ', $elementText');
+      } else {
+        // []..addAll(['b', 'c']);
+        builder.addSimpleInsertion(list.leftBracket.end, elementText);
+      }
       builder.addDeletion(range.node(invocation));
     });
-    _addAssistFromBuilder(changeBuilder, DartAssistKind.CONVERT_TO_SPREAD);
+    _addAssistFromBuilder(changeBuilder, kind, args: args);
   }
 
   Future<void> _addProposal_convertClassToMixin() async {
@@ -538,8 +583,8 @@
   }
 
   Future<void> _addProposal_convertConditionalExpressionToIfElement() async {
-    AstNode node = this.node;
-    if (node is! ConditionalExpression) {
+    AstNode node = this.node.thisOrAncestorOfType<ConditionalExpression>();
+    if (node == null) {
       _coverageMarker();
       return;
     }
@@ -549,8 +594,7 @@
       nodeToReplace = parent;
       parent = parent.parent;
     }
-    // TODO(brianwilkerson) Consider adding support for map literals.
-    if (parent is ListLiteral2 || parent is SetLiteral2) {
+    if (parent is ListLiteral || (parent is SetOrMapLiteral && parent.isSet)) {
       ConditionalExpression conditional = node;
       Expression condition = conditional.condition.unParenthesized;
       Expression thenExpression = conditional.thenExpression.unParenthesized;
@@ -857,10 +901,6 @@
       hasTypeArgs = target.typeArguments != null;
       openRange = range.token(target.leftBracket);
       closeRange = range.startEnd(target.rightBracket, invocation);
-    } else if (target is ListLiteral2) {
-      hasTypeArgs = target.typeArguments != null;
-      openRange = range.token(target.leftBracket);
-      closeRange = range.startEnd(target.rightBracket, invocation);
     } else {
       _coverageMarker();
       return;
@@ -919,7 +959,7 @@
     _addAssistFromBuilder(changeBuilder, DartAssistKind.CONVERT_TO_MAP_LITERAL);
   }
 
-  Future<void> _addProposal_convertMapFromIterableToIfLiteral() async {
+  Future<void> _addProposal_convertMapFromIterableToForLiteral() async {
     //
     // Ensure that the selection is inside an invocation of Map.fromIterable.
     //
@@ -1073,7 +1113,7 @@
         builder.write(' }');
       });
     });
-    _addAssistFromBuilder(changeBuilder, DartAssistKind.CONVERT_TO_IF_ELEMENT);
+    _addAssistFromBuilder(changeBuilder, DartAssistKind.CONVERT_TO_FOR_ELEMENT);
   }
 
   Future<void> _addProposal_convertPartOfToUri() async {
@@ -1129,11 +1169,6 @@
         elementTypeArguments = elements.typeArguments;
         elementsRange =
             range.endStart(elements.leftBracket, elements.rightBracket);
-      } else if (arguments[0] is ListLiteral2) {
-        ListLiteral2 elements = arguments[0] as ListLiteral2;
-        elementTypeArguments = elements.typeArguments;
-        elementsRange =
-            range.endStart(elements.leftBracket, elements.rightBracket);
       } else {
         // TODO(brianwilkerson) Consider handling other iterables. Literal sets
         //  could be treated like lists, and arbitrary iterables by using a
@@ -1194,6 +1229,29 @@
     _addAssistFromBuilder(changeBuilder, DartAssistKind.CONVERT_TO_SET_LITERAL);
   }
 
+  Future<void> _addProposal_convertToAbsoluteImport() async {
+    var node = this.node;
+    if (node is StringLiteral) {
+      node = node.parent;
+    }
+    if (node is ImportDirective) {
+      var importDirective = node;
+      var importUri = node.uriSource?.uri;
+      if (importUri?.scheme != 'package') {
+        return;
+      }
+      var changeBuilder = _newDartChangeBuilder();
+      await changeBuilder.addFileEdit(file, (builder) {
+        builder.addSimpleReplacement(
+            range.node(importDirective.uri), "'$importUri'");
+      });
+      _addAssistFromBuilder(
+        changeBuilder,
+        DartAssistKind.CONVERT_INTO_ABSOLUTE_IMPORT,
+      );
+    }
+  }
+
   Future<void> _addProposal_convertToAsyncFunctionBody() async {
     FunctionBody body = getEnclosingFunctionBody();
     if (body == null ||
@@ -1430,26 +1488,30 @@
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     // find enclosing ForEachStatement
-    ForEachStatement forEachStatement =
-        node.thisOrAncestorOfType<ForEachStatement>();
+    ForStatement forEachStatement = node.thisOrAncestorMatching(
+        (node) => node is ForStatement && node.forLoopParts is ForEachParts);
     if (forEachStatement == null) {
       _coverageMarker();
       return;
     }
+    ForEachParts forEachParts = forEachStatement.forLoopParts;
     if (selectionOffset < forEachStatement.offset ||
         forEachStatement.rightParenthesis.end < selectionOffset) {
       _coverageMarker();
       return;
     }
     // loop should declare variable
-    DeclaredIdentifier loopVariable = forEachStatement.loopVariable;
+    DeclaredIdentifier loopVariable =
+        forEachParts is ForEachPartsWithDeclaration
+            ? forEachParts.loopVariable
+            : null;
     if (loopVariable == null) {
       _coverageMarker();
       return;
     }
     // iterable should be VariableElement
     String listName;
-    Expression iterable = forEachStatement.iterable;
+    Expression iterable = forEachParts.iterable;
     if (iterable is SimpleIdentifier &&
         iterable.staticElement is VariableElement) {
       listName = iterable.name;
@@ -1593,7 +1655,7 @@
     var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       if (getExpressionParentPrecedence(prefExpression) >=
-          TokenClass.RELATIONAL_OPERATOR.precedence) {
+          Precedence.relational) {
         builder.addDeletion(range.token(prefExpression.operator));
       } else {
         builder.addDeletion(
@@ -1647,7 +1709,7 @@
     var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
       if (getExpressionParentPrecedence(prefExpression) >=
-          TokenClass.RELATIONAL_OPERATOR.precedence) {
+          Precedence.relational) {
         builder.addDeletion(range.token(prefExpression.operator));
       } else {
         builder.addDeletion(
@@ -1794,6 +1856,95 @@
     }
   }
 
+  Future<void> _addProposal_convertToNullAware() async {
+    AstNode node = this.node;
+    if (node is! ConditionalExpression) {
+      _coverageMarker();
+      return;
+    }
+    ConditionalExpression conditional = node;
+    Expression condition = conditional.condition.unParenthesized;
+    SimpleIdentifier identifier;
+    Expression nullExpression;
+    Expression nonNullExpression;
+    int periodOffset;
+
+    if (condition is BinaryExpression) {
+      //
+      // Identify the variable being compared to `null`, or return if the
+      // condition isn't a simple comparison of `null` to a variable's value.
+      //
+      Expression leftOperand = condition.leftOperand;
+      Expression rightOperand = condition.rightOperand;
+      if (leftOperand is NullLiteral && rightOperand is SimpleIdentifier) {
+        identifier = rightOperand;
+      } else if (rightOperand is NullLiteral &&
+          leftOperand is SimpleIdentifier) {
+        identifier = leftOperand;
+      } else {
+        _coverageMarker();
+        return;
+      }
+      if (identifier.staticElement is! LocalElement) {
+        _coverageMarker();
+        return;
+      }
+      //
+      // Identify the expression executed when the variable is `null` and when
+      // it is non-`null`. Return if the `null` expression isn't a null literal
+      // or if the non-`null` expression isn't a method invocation whose target
+      // is the save variable being compared to `null`.
+      //
+      if (condition.operator.type == TokenType.EQ_EQ) {
+        nullExpression = conditional.thenExpression;
+        nonNullExpression = conditional.elseExpression;
+      } else if (condition.operator.type == TokenType.BANG_EQ) {
+        nonNullExpression = conditional.thenExpression;
+        nullExpression = conditional.elseExpression;
+      }
+      if (nullExpression == null || nonNullExpression == null) {
+        _coverageMarker();
+        return;
+      }
+      if (nullExpression.unParenthesized is! NullLiteral) {
+        _coverageMarker();
+        return;
+      }
+      Expression unwrappedExpression = nonNullExpression.unParenthesized;
+      Expression target;
+      Token operator;
+      if (unwrappedExpression is MethodInvocation) {
+        target = unwrappedExpression.target;
+        operator = unwrappedExpression.operator;
+      } else if (unwrappedExpression is PrefixedIdentifier) {
+        target = unwrappedExpression.prefix;
+        operator = unwrappedExpression.period;
+      } else {
+        _coverageMarker();
+        return;
+      }
+      if (operator.type != TokenType.PERIOD) {
+        _coverageMarker();
+        return;
+      }
+      if (!(target is SimpleIdentifier &&
+          target.staticElement == identifier.staticElement)) {
+        _coverageMarker();
+        return;
+      }
+      periodOffset = operator.offset;
+
+      DartChangeBuilder changeBuilder = _newDartChangeBuilder();
+      await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
+        builder.addDeletion(range.startStart(node, nonNullExpression));
+        builder.addSimpleInsertion(periodOffset, '?');
+        builder.addDeletion(range.endEnd(nonNullExpression, node));
+      });
+      _addAssistFromBuilder(
+          changeBuilder, DartAssistKind.CONVERT_TO_NULL_AWARE);
+    }
+  }
+
   Future<void> _addProposal_convertToSingleQuotedString() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
@@ -2120,9 +2271,13 @@
     }
 
     var statefulWidgetClass = await sessionHelper.getClass(
-        flutter.WIDGETS_LIBRARY_URI, 'StatefulWidget');
-    var stateClass =
-        await sessionHelper.getClass(flutter.WIDGETS_LIBRARY_URI, 'State');
+      flutter.widgetsUri,
+      'StatefulWidget',
+    );
+    var stateClass = await sessionHelper.getClass(
+      flutter.widgetsUri,
+      'State',
+    );
     if (statefulWidgetClass == null || stateClass == null) {
       return;
     }
@@ -2233,12 +2388,12 @@
 
     AstNode parentList = widget.parent;
     if (parentList is ListLiteral) {
-      List<Expression> parentElements = parentList.elements;
+      List<CollectionElement> parentElements = parentList.elements;
       int index = parentElements.indexOf(widget);
       if (index != parentElements.length - 1) {
         var changeBuilder = _newDartChangeBuilder();
         await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
-          Expression nextWidget = parentElements[index + 1];
+          CollectionElement nextWidget = parentElements[index + 1];
           var nextRange = range.node(nextWidget);
           var nextText = utils.getRangeText(nextRange);
 
@@ -2267,12 +2422,12 @@
 
     AstNode parentList = widget.parent;
     if (parentList is ListLiteral) {
-      List<Expression> parentElements = parentList.elements;
+      List<CollectionElement> parentElements = parentList.elements;
       int index = parentElements.indexOf(widget);
       if (index > 0) {
         var changeBuilder = _newDartChangeBuilder();
         await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
-          Expression previousWidget = parentElements[index - 1];
+          CollectionElement previousWidget = parentElements[index - 1];
           var previousRange = range.node(previousWidget);
           var previousText = utils.getRangeText(previousRange);
 
@@ -2299,7 +2454,7 @@
     }
 
     // Prepare the list of our children.
-    List<Expression> childrenExpressions;
+    List<CollectionElement> childrenExpressions;
     {
       var childrenArgument = flutter.findChildrenArgument(widgetCreation);
       var childrenExpression = childrenArgument?.expression;
@@ -2410,7 +2565,7 @@
     String widgetSrc = utils.getNodeText(widgetExpr);
 
     var streamBuilderElement = await sessionHelper.getClass(
-      flutter.WIDGETS_LIBRARY_URI,
+      flutter.widgetsUri,
       'StreamBuilder',
     );
     if (streamBuilderElement == null) {
@@ -2421,7 +2576,10 @@
     await changeBuilder.addFileEdit(file, (builder) {
       builder.addReplacement(range.node(widgetExpr), (builder) {
         builder.writeType(streamBuilderElement.type);
-        builder.writeln('<Object>(');
+
+        builder.write('<');
+        builder.addSimpleLinkedEdit('type', 'Object');
+        builder.writeln('>(');
 
         String indentOld = utils.getLinePrefix(widgetExpr.offset);
         String indentNew1 = indentOld + utils.getIndent(1);
@@ -2460,21 +2618,21 @@
     await _addProposal_flutterWrapWidgetImpl();
     await _addProposal_flutterWrapWidgetImpl(
         kind: DartAssistKind.FLUTTER_WRAP_CENTER,
-        parentLibraryUri: flutter.WIDGETS_LIBRARY_URI,
+        parentLibraryUri: flutter.widgetsUri,
         parentClassName: 'Center',
         widgetValidator: (expr) {
           return !flutter.isExactWidgetTypeCenter(expr.staticType);
         });
     await _addProposal_flutterWrapWidgetImpl(
         kind: DartAssistKind.FLUTTER_WRAP_CONTAINER,
-        parentLibraryUri: flutter.WIDGETS_LIBRARY_URI,
+        parentLibraryUri: flutter.widgetsUri,
         parentClassName: 'Container',
         widgetValidator: (expr) {
           return !flutter.isExactWidgetTypeContainer(expr.staticType);
         });
     await _addProposal_flutterWrapWidgetImpl(
         kind: DartAssistKind.FLUTTER_WRAP_PADDING,
-        parentLibraryUri: flutter.WIDGETS_LIBRARY_URI,
+        parentLibraryUri: flutter.widgetsUri,
         parentClassName: 'Padding',
         leadingLines: ['padding: const EdgeInsets.all(8.0),'],
         widgetValidator: (expr) {
@@ -2588,7 +2746,7 @@
       ClassElement parentClassElement =
           await sessionHelper.getClass(parentLibraryUri, parentClassName);
       ClassElement widgetClassElement =
-          await sessionHelper.getClass(flutter.WIDGETS_LIBRARY_URI, 'Widget');
+          await sessionHelper.getClass(flutter.widgetsUri, 'Widget');
       if (parentClassElement == null || widgetClassElement == null) {
         return;
       }
@@ -2630,11 +2788,11 @@
 
     await addAssist(
         kind: DartAssistKind.FLUTTER_WRAP_COLUMN,
-        parentLibraryUri: flutter.WIDGETS_LIBRARY_URI,
+        parentLibraryUri: flutter.widgetsUri,
         parentClassName: 'Column');
     await addAssist(
         kind: DartAssistKind.FLUTTER_WRAP_ROW,
-        parentLibraryUri: flutter.WIDGETS_LIBRARY_URI,
+        parentLibraryUri: flutter.widgetsUri,
         parentClassName: 'Row');
   }
 
@@ -2683,6 +2841,48 @@
     _addAssistFromBuilder(changeBuilder, DartAssistKind.IMPORT_ADD_SHOW);
   }
 
+  Future<void> _addProposal_inlineAdd() async {
+    AstNode node = this.node;
+    if (node is! SimpleIdentifier || node.parent is! MethodInvocation) {
+      _coverageMarker();
+      return;
+    }
+    SimpleIdentifier name = node;
+    MethodInvocation invocation = node.parent;
+    if (name != invocation.methodName ||
+        name.name != 'add' ||
+        !invocation.isCascaded ||
+        invocation.argumentList.arguments.length != 1) {
+      _coverageMarker();
+      return;
+    }
+    CascadeExpression cascade = invocation.thisOrAncestorOfType();
+    NodeList<Expression> sections = cascade.cascadeSections;
+    Expression target = cascade.target;
+    if (target is! ListLiteral || sections[0] != invocation) {
+      // TODO(brianwilkerson) Consider extending this to handle set literals.
+      _coverageMarker();
+      return;
+    }
+    ListLiteral list = target;
+    Expression argument = invocation.argumentList.arguments[0];
+    String elementText = utils.getNodeText(argument);
+
+    DartChangeBuilder changeBuilder = _newDartChangeBuilder();
+    await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
+      if (list.elements.isNotEmpty) {
+        // ['a']..add(e);
+        builder.addSimpleInsertion(list.elements.last.end, ', $elementText');
+      } else {
+        // []..add(e);
+        builder.addSimpleInsertion(list.leftBracket.end, elementText);
+      }
+      builder.addDeletion(range.node(invocation));
+    });
+    _addAssistFromBuilder(changeBuilder, DartAssistKind.INLINE_INVOCATION,
+        args: ['add']);
+  }
+
   Future<void> _addProposal_introduceLocalTestedType() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
@@ -3112,7 +3312,7 @@
     if (node is! ListLiteral) {
       return;
     }
-    if ((node as ListLiteral).elements.any((Expression exp) =>
+    if ((node as ListLiteral).elements.any((CollectionElement exp) =>
         !(exp is InstanceCreationExpression &&
             flutter.isWidgetCreation(exp)))) {
       _coverageMarker();
@@ -3905,8 +4105,6 @@
   /// set literal rather than a map literal.
   bool _listHasUnambiguousElement(AstNode node) {
     if (node is ListLiteral && node.elements.length > 0) {
-      return true;
-    } else if (node is ListLiteral2) {
       for (CollectionElement element in node.elements) {
         if (_isUnambiguousElement(element)) {
           return true;
diff --git a/pkg/analysis_server/lib/src/services/correction/fix.dart b/pkg/analysis_server/lib/src/services/correction/fix.dart
index f193dd1..7ca77e9 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix.dart
@@ -11,9 +11,7 @@
 import 'package:analyzer_plugin/utilities/change_builder/change_workspace.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 
-/**
- * Return true if this [errorCode] is likely to have a fix associated with it.
- */
+/// Return true if this [errorCode] is likely to have a fix associated with it.
 bool hasFix(ErrorCode errorCode) =>
     errorCode == StaticWarningCode.UNDEFINED_CLASS_BOOLEAN ||
     errorCode == StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER ||
@@ -38,7 +36,6 @@
     errorCode == StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_1 ||
     errorCode == StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_2 ||
     errorCode == StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_3_PLUS ||
-    errorCode == StaticWarningCode.FUNCTION_WITHOUT_CALL ||
     errorCode == StaticWarningCode.UNDEFINED_IDENTIFIER ||
     errorCode ==
         CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE ||
@@ -73,18 +70,45 @@
     errorCode == StaticTypeWarningCode.UNDEFINED_SETTER ||
     errorCode == CompileTimeErrorCode.UNDEFINED_NAMED_PARAMETER ||
     (errorCode is LintCode &&
-        (errorCode.name == LintNames.annotate_overrides ||
+        (errorCode.name == LintNames.always_require_non_null_named_parameters ||
+            errorCode.name == LintNames.annotate_overrides ||
+            errorCode.name == LintNames.avoid_annotating_with_dynamic ||
+            errorCode.name == LintNames.avoid_empty_else ||
             errorCode.name == LintNames.avoid_init_to_null ||
+            errorCode.name == LintNames.avoid_return_types_on_setters ||
+            errorCode.name == LintNames.avoid_types_on_closure_parameters ||
+            errorCode.name == LintNames.await_only_futures ||
+            errorCode.name == LintNames.empty_catches ||
+            errorCode.name == LintNames.empty_constructor_bodies ||
+            errorCode.name == LintNames.empty_statements ||
+            errorCode.name == LintNames.no_duplicate_case_values ||
+            errorCode.name == LintNames.non_constant_identifier_names ||
+            errorCode.name == LintNames.null_closures ||
             errorCode.name == LintNames.prefer_collection_literals ||
             errorCode.name == LintNames.prefer_conditional_assignment ||
             errorCode.name == LintNames.prefer_const_declarations ||
-            errorCode.name == LintNames.unnecessary_brace_in_string_interp ||
+            errorCode.name == LintNames.prefer_equal_for_default_values ||
+            errorCode.name == LintNames.prefer_final_fields ||
+            errorCode.name == LintNames.prefer_final_locals ||
+            errorCode.name == LintNames.prefer_is_not_empty ||
+            errorCode.name == LintNames.type_init_formals ||
+            errorCode.name == LintNames.unawaited_futures ||
+            errorCode.name == LintNames.unnecessary_brace_in_string_interps ||
+            errorCode.name == LintNames.unnecessary_const ||
             errorCode.name == LintNames.unnecessary_lambdas ||
-            errorCode.name == LintNames.unnecessary_this));
+            errorCode.name == LintNames.unnecessary_new ||
+            errorCode.name == LintNames.unnecessary_overrides ||
+            errorCode.name == LintNames.unnecessary_this ||
+            errorCode.name == LintNames.use_rethrow_when_possible));
 
-/**
- * The implementation of [DartFixContext].
- */
+/// An enumeration of quick fix kinds for the errors found in an analysis
+/// options file.
+class AnalysisOptionsFixKind {
+  static const REMOVE_SETTING =
+      const FixKind('REMOVE_SETTING', 50, "Remove '{0}'");
+}
+
+/// The implementation of [DartFixContext].
 class DartFixContextImpl implements DartFixContext {
   @override
   final ChangeWorkspace workspace;
@@ -98,17 +122,19 @@
   DartFixContextImpl(this.workspace, this.resolveResult, this.error);
 }
 
-/**
- * An enumeration of possible quick fix kinds.
- */
+/// An enumeration of quick fix kinds found in a Dart file.
 class DartFixKind {
   static const ADD_ASYNC =
       const FixKind('ADD_ASYNC', 50, "Add 'async' modifier");
+  static const ADD_AWAIT =
+      const FixKind('ADD_AWAIT', 50, "Add 'await' keyword");
   static const ADD_EXPLICIT_CAST = const FixKind(
       'ADD_EXPLICIT_CAST', 50, "Add cast",
       appliedTogetherMessage: "Add all casts in file");
   static const ADD_FIELD_FORMAL_PARAMETERS = const FixKind(
       'ADD_FIELD_FORMAL_PARAMETERS', 70, "Add final field formal parameters");
+  static const ADD_MISSING_ENUM_CASE_CLAUSES = const FixKind(
+      'ADD_MISSING_ENUM_CASE_CLAUSES', 50, 'Add missing case clauses');
   static const ADD_MISSING_PARAMETER_NAMED = const FixKind(
       'ADD_MISSING_PARAMETER_NAMED', 70, "Add named parameter '{0}'");
   static const ADD_MISSING_PARAMETER_POSITIONAL = const FixKind(
@@ -131,6 +157,8 @@
       'ADD_SUPER_CONSTRUCTOR_INVOCATION',
       50,
       "Add super constructor {0} invocation");
+  static const CHANGE_ARGUMENT_NAME =
+      const FixKind('CHANGE_ARGUMENT_NAME', 60, "Change to '{0}'");
   static const CHANGE_TO = const FixKind('CHANGE_TO', 51, "Change to '{0}'");
   static const CHANGE_TO_NEAREST_PRECISE_VALUE = const FixKind(
       'CHANGE_TO_NEAREST_PRECISE_VALUE',
@@ -206,6 +234,8 @@
   static const REMOVE_AWAIT = const FixKind('REMOVE_AWAIT', 50, "Remove await");
   static const REMOVE_DEAD_CODE =
       const FixKind('REMOVE_DEAD_CODE', 50, "Remove dead code");
+  static const REMOVE_DUPLICATE_CASE = const FixKind(
+      'REMOVE_DUPLICATE_CASE', 50, "Remove duplicate case statement");
   static const REMOVE_EMPTY_CATCH =
       const FixKind('REMOVE_EMPTY_CATCH', 50, "Remove empty catch clause");
   static const REMOVE_EMPTY_CONSTRUCTOR_BODY = const FixKind(
@@ -241,6 +271,8 @@
   static const REMOVE_UNNECESSARY_CAST = const FixKind(
       'REMOVE_UNNECESSARY_CAST', 50, "Remove unnecessary cast",
       appliedTogetherMessage: "Remove all unnecessary casts in file");
+  static const REMOVE_UNNECESSARY_CONST = const FixKind(
+      'REMOVE_UNNECESSARY_CONST', 50, "Remove unnecessary const keyword");
   static const REMOVE_UNUSED_CATCH_CLAUSE = const FixKind(
       'REMOVE_UNUSED_CATCH_CLAUSE', 50, "Remove unused 'catch' clause");
   static const REMOVE_UNUSED_CATCH_STACK = const FixKind(
@@ -248,13 +280,19 @@
   static const REMOVE_UNUSED_IMPORT = const FixKind(
       'REMOVE_UNUSED_IMPORT', 50, "Remove unused import",
       appliedTogetherMessage: "Remove all unused imports in this file");
+  static const REMOVE_UNNECESSARY_NEW = const FixKind(
+      'REMOVE_UNNECESSARY_NEW', 50, "Remove unnecessary new keyword");
   static const RENAME_TO_CAMEL_CASE =
       const FixKind('RENAME_TO_CAMEL_CASE', 50, "Rename to '{0}'");
   static const REPLACE_BOOLEAN_WITH_BOOL = const FixKind(
       'REPLACE_BOOLEAN_WITH_BOOL', 50, "Replace 'boolean' with 'bool'",
       appliedTogetherMessage: "Replace all 'boolean' with 'bool' in file");
+  static const REPLACE_COLON_WITH_EQUALS =
+      const FixKind('REPLACE_COLON_WITH_EQUALS', 50, "Replace ':' with '='");
   static const REPLACE_FINAL_WITH_CONST = const FixKind(
       'REPLACE_FINAL_WITH_CONST', 50, "Replace 'final' with 'const'");
+  static const REPLACE_NULL_WITH_CLOSURE = const FixKind(
+      'REPLACE_NULL_WITH_CLOSURE', 50, "Replace 'null' with a closure");
   static const REPLACE_RETURN_TYPE_FUTURE = const FixKind(
       'REPLACE_RETURN_TYPE_FUTURE',
       50,
@@ -267,6 +305,10 @@
       'REPLACE_WITH_CONDITIONAL_ASSIGNMENT', 50, "Replace with ??=");
   static const REPLACE_WITH_IDENTIFIER =
       const FixKind('REPLACE_WITH_IDENTIFIER', 50, "Replace with identifier");
+  static const REPLACE_WITH_IS_EMPTY =
+      const FixKind('REPLACE_WITH_IS_EMPTY', 50, "Replace with 'isEmpty'");
+  static const REPLACE_WITH_IS_NOT_EMPTY = const FixKind(
+      'REPLACE_WITH_IS_NOT_EMPTY', 50, "Replace with 'isNotEmpty'");
   static const REPLACE_WITH_NULL_AWARE = const FixKind(
       'REPLACE_WITH_NULL_AWARE',
       50,
@@ -290,4 +332,13 @@
       'USE_NOT_EQ_NULL', 50, "Use != null instead of 'is! Null'",
       appliedTogetherMessage:
           "Use != null instead of 'is! Null' everywhere in file");
+  static const USE_RETHROW =
+      const FixKind('USE_RETHROW', 50, "Replace throw with rethrow");
 }
+
+/// An enumeration of quick fix kinds for the errors found in an Android
+/// manifest file.
+class ManifestFixKind {}
+
+/// An enumeration of quick fix kinds for the errors found in a pubspec file.
+class PubspecFixKind {}
diff --git a/pkg/analysis_server/lib/src/services/correction/fix/analysis_options/fix_generator.dart b/pkg/analysis_server/lib/src/services/correction/fix/analysis_options/fix_generator.dart
new file mode 100644
index 0000000..af92ea7
--- /dev/null
+++ b/pkg/analysis_server/lib/src/services/correction/fix/analysis_options/fix_generator.dart
@@ -0,0 +1,176 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:math' as math;
+
+import 'package:analysis_server/plugin/edit/fix/fix_core.dart';
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/strings.dart';
+import 'package:analysis_server/src/utilities/yaml_node_locator.dart';
+import 'package:analyzer/error/error.dart';
+import 'package:analyzer/source/line_info.dart';
+import 'package:analyzer/source/source_range.dart';
+import 'package:analyzer/src/analysis_options/error/option_codes.dart';
+import 'package:analyzer/src/generated/java_core.dart';
+import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer_plugin/protocol/protocol_common.dart'
+    show SourceChange;
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:yaml/yaml.dart';
+
+/// The generator used to generate fixes in analysis options files.
+class AnalysisOptionsFixGenerator {
+  final AnalysisError error;
+
+  final int errorOffset;
+
+  final int errorLength;
+
+  final String content;
+
+  final YamlMap options;
+
+  final LineInfo lineInfo;
+
+  final List<Fix> fixes = <Fix>[];
+
+  List<YamlNode> coveringNodePath;
+
+  AnalysisOptionsFixGenerator(this.error, this.content, this.options)
+      : errorOffset = error.offset,
+        errorLength = error.length,
+        lineInfo = new LineInfo.fromContent(content);
+
+  /// Return the absolute, normalized path to the file in which the error was
+  /// reported.
+  String get file => error.source.fullName;
+
+  /// Return the list of fixes that apply to the error being fixed.
+  Future<List<Fix>> computeFixes() async {
+    YamlNodeLocator locator = new YamlNodeLocator(
+        start: errorOffset, end: errorOffset + errorLength - 1);
+    coveringNodePath = locator.searchWithin(options);
+    if (coveringNodePath.isEmpty) {
+      return fixes;
+    }
+
+    ErrorCode errorCode = error.errorCode;
+//    if (errorCode == AnalysisOptionsErrorCode.INCLUDED_FILE_PARSE_ERROR) {
+//    } else if (errorCode == AnalysisOptionsErrorCode.PARSE_ERROR) {
+//    } else if (errorCode ==
+//        AnalysisOptionsHintCode.DEPRECATED_ANALYSIS_OPTIONS_FILE_NAME) {
+//    } else if (errorCode ==
+//        AnalysisOptionsHintCode.PREVIEW_DART_2_SETTING_DEPRECATED) {
+//    } else if (errorCode ==
+//        AnalysisOptionsHintCode.STRONG_MODE_SETTING_DEPRECATED) {
+//    } else
+    if (errorCode == AnalysisOptionsHintCode.SUPER_MIXINS_SETTING_DEPRECATED) {
+      await _addFix_removeSetting();
+//    } else if (errorCode ==
+//        AnalysisOptionsWarningCode.ANALYSIS_OPTION_DEPRECATED) {
+//    } else if (errorCode == AnalysisOptionsWarningCode.INCLUDED_FILE_WARNING) {
+//    } else if (errorCode == AnalysisOptionsWarningCode.INCLUDE_FILE_NOT_FOUND) {
+//    } else if (errorCode == AnalysisOptionsWarningCode.INVALID_OPTION) {
+//    } else if (errorCode == AnalysisOptionsWarningCode.INVALID_SECTION_FORMAT) {
+//    } else if (errorCode == AnalysisOptionsWarningCode.SPEC_MODE_REMOVED) {
+//    } else if (errorCode ==
+//        AnalysisOptionsWarningCode.UNRECOGNIZED_ERROR_CODE) {
+    } else if (errorCode ==
+        AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITHOUT_VALUES) {
+      await _addFix_removeSetting();
+//    } else if (errorCode ==
+//        AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITH_LEGAL_VALUE) {
+//    } else if (errorCode ==
+//        AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITH_LEGAL_VALUES) {
+//    } else if (errorCode == AnalysisOptionsWarningCode.UNSUPPORTED_VALUE) {
+    }
+    return fixes;
+  }
+
+  void _addFix_removeSetting() async {
+    if (coveringNodePath[0] is YamlScalar) {
+      SourceRange deletionRange;
+      int index = 1;
+      while (index < coveringNodePath.length) {
+        YamlNode parent = coveringNodePath[index];
+        if (parent is YamlList) {
+          if (parent.nodes.length > 1) {
+            YamlNode nodeToDelete = coveringNodePath[index - 1];
+            deletionRange = _lines(
+                nodeToDelete.span.start.offset, nodeToDelete.span.end.offset);
+            break;
+          }
+        } else if (parent is YamlMap) {
+          Map<dynamic, YamlNode> nodes = parent.nodes;
+          if (nodes.length > 1) {
+            YamlNode key;
+            YamlNode value;
+            YamlNode child = coveringNodePath[index - 1];
+            if (nodes.containsKey(child)) {
+              key = child;
+              value = nodes[child];
+            } else if (nodes.containsValue(child)) {
+              for (var entry in nodes.entries) {
+                if (child == entry.value) {
+                  key = entry.key;
+                  value = child;
+                  break;
+                }
+              }
+            }
+            if (key == null || value == null) {
+              throw StateError(
+                  'Child is neither a key nor a value in the parent');
+            }
+            deletionRange = _lines(key.span.start.offset,
+                _firstNonWhitespaceBefore(value.span.end.offset));
+            break;
+          }
+        } else if (parent is YamlDocument) {
+          break;
+        }
+        index++;
+      }
+      YamlNode nodeToDelete = coveringNodePath[index - 1];
+      deletionRange ??=
+          _lines(nodeToDelete.span.start.offset, nodeToDelete.span.end.offset);
+      ChangeBuilder builder = new ChangeBuilder();
+      await builder.addFileEdit(file, (builder) {
+        builder.addDeletion(deletionRange);
+      });
+      _addFixFromBuilder(builder, AnalysisOptionsFixKind.REMOVE_SETTING,
+          args: [coveringNodePath[0].toString()]);
+    }
+  }
+
+  /// Add a fix whose edits were built by the [builder] that has the given
+  /// [kind]. If [args] are provided, they will be used to fill in the message
+  /// for the fix.
+  void _addFixFromBuilder(ChangeBuilder builder, FixKind kind,
+      {List args: null}) {
+    SourceChange change = builder.sourceChange;
+    if (change.edits.isEmpty) {
+      return;
+    }
+    change.message = formatList(kind.message, args);
+    fixes.add(new Fix(kind, change));
+  }
+
+  int _firstNonWhitespaceBefore(int offset) {
+    while (offset > 0 && isWhitespace(content.codeUnitAt(offset - 1))) {
+      offset--;
+    }
+    return offset;
+  }
+
+  SourceRange _lines(int start, int end) {
+    CharacterLocation startLocation = lineInfo.getLocation(start);
+    int startOffset = lineInfo.getOffsetOfLine(startLocation.lineNumber - 1);
+    CharacterLocation endLocation = lineInfo.getLocation(end);
+    int endOffset = lineInfo.getOffsetOfLine(
+        math.min(endLocation.lineNumber, lineInfo.lineCount - 1));
+    return new SourceRange(startOffset, endOffset - startOffset);
+  }
+}
diff --git a/pkg/analysis_server/lib/src/services/correction/fix/manifest/fix_generator.dart b/pkg/analysis_server/lib/src/services/correction/fix/manifest/fix_generator.dart
new file mode 100644
index 0000000..50ee2a7
--- /dev/null
+++ b/pkg/analysis_server/lib/src/services/correction/fix/manifest/fix_generator.dart
@@ -0,0 +1,144 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:math' as math;
+
+import 'package:analysis_server/plugin/edit/fix/fix_core.dart';
+import 'package:analysis_server/src/services/correction/strings.dart';
+import 'package:analyzer/error/error.dart';
+import 'package:analyzer/source/line_info.dart';
+import 'package:analyzer/source/source_range.dart';
+import 'package:analyzer/src/generated/java_core.dart';
+import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/manifest/manifest_warning_code.dart';
+import 'package:analyzer_plugin/protocol/protocol_common.dart'
+    show SourceChange;
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:html/dom.dart';
+import 'package:meta/meta.dart';
+import 'package:source_span/source_span.dart';
+
+/// An object used to locate the HTML [Node] associated with a source range.
+/// More specifically, it will return the deepest HTML [Node] which completely
+/// encompasses the specified range.
+class HtmlNodeLocator {
+  /// The inclusive start offset of the range used to identify the node.
+  int _startOffset = 0;
+
+  /// The inclusive end offset of the range used to identify the node.
+  int _endOffset = 0;
+
+  /// Initialize a newly created locator to locate the deepest [Node] for
+  /// which `node.offset <= [start]` and `[end] < node.end`.
+  ///
+  /// If the [end] offset is not provided, then it is considered the same as the
+  /// [start] offset.
+  HtmlNodeLocator({@required int start, int end})
+      : this._startOffset = start,
+        this._endOffset = end ?? start;
+
+  /// Search within the given HTML [node] and return the path to the most deeply
+  /// nested node that includes the whole target range, or an empty list if no
+  /// node was found. The path is represented by all of the elements from the
+  /// starting [node] to the most deeply nested node, in reverse order.
+  List<Node> searchWithin(Node node) {
+    List<Node> path = [];
+    _searchWithin(path, node);
+    return path;
+  }
+
+  void _searchWithin(List<Node> path, Node node) {
+    FileSpan span = node.sourceSpan;
+    if (span.start.offset > _endOffset || span.end.offset < _startOffset) {
+      return;
+    }
+    for (Element element in node.children) {
+      _searchWithin(path, element);
+      if (path.isNotEmpty) {
+        path.add(node);
+        return;
+      }
+    }
+    path.add(node);
+  }
+}
+
+/// The generator used to generate fixes in Android manifest files.
+class ManifestFixGenerator {
+  final AnalysisError error;
+
+  final int errorOffset;
+
+  final int errorLength;
+
+  final String content;
+
+  final DocumentFragment document;
+
+  final LineInfo lineInfo;
+
+  final List<Fix> fixes = <Fix>[];
+
+  List<Node> coveringNodePath;
+
+  ManifestFixGenerator(this.error, this.content, this.document)
+      : errorOffset = error.offset,
+        errorLength = error.length,
+        lineInfo = new LineInfo.fromContent(content);
+
+  /// Return the absolute, normalized path to the file in which the error was
+  /// reported.
+  String get file => error.source.fullName;
+
+  /// Return the list of fixes that apply to the error being fixed.
+  Future<List<Fix>> computeFixes() async {
+    HtmlNodeLocator locator = new HtmlNodeLocator(
+        start: errorOffset, end: errorOffset + errorLength - 1);
+    coveringNodePath = locator.searchWithin(document);
+    if (coveringNodePath.isEmpty) {
+      return fixes;
+    }
+
+    ErrorCode errorCode = error.errorCode;
+    if (errorCode == ManifestWarningCode.UNSUPPORTED_CHROME_OS_HARDWARE) {
+    } else if (errorCode ==
+        ManifestWarningCode.PERMISSION_IMPLIES_UNSUPPORTED_HARDWARE) {
+    } else if (errorCode ==
+        ManifestWarningCode.CAMERA_PERMISSIONS_INCOMPATIBLE) {}
+    return fixes;
+  }
+
+  /// Add a fix whose edits were built by the [builder] that has the given
+  /// [kind]. If [args] are provided, they will be used to fill in the message
+  /// for the fix.
+  // ignore: unused_element
+  void _addFixFromBuilder(ChangeBuilder builder, FixKind kind,
+      {List args: null}) {
+    SourceChange change = builder.sourceChange;
+    if (change.edits.isEmpty) {
+      return;
+    }
+    change.message = formatList(kind.message, args);
+    fixes.add(new Fix(kind, change));
+  }
+
+  // ignore: unused_element
+  int _firstNonWhitespaceBefore(int offset) {
+    while (offset > 0 && isWhitespace(content.codeUnitAt(offset - 1))) {
+      offset--;
+    }
+    return offset;
+  }
+
+  // ignore: unused_element
+  SourceRange _lines(int start, int end) {
+    CharacterLocation startLocation = lineInfo.getLocation(start);
+    int startOffset = lineInfo.getOffsetOfLine(startLocation.lineNumber - 1);
+    CharacterLocation endLocation = lineInfo.getLocation(end);
+    int endOffset = lineInfo.getOffsetOfLine(
+        math.min(endLocation.lineNumber, lineInfo.lineCount - 1));
+    return new SourceRange(startOffset, endOffset - startOffset);
+  }
+}
diff --git a/pkg/analysis_server/lib/src/services/correction/fix/pubspec/fix_generator.dart b/pkg/analysis_server/lib/src/services/correction/fix/pubspec/fix_generator.dart
new file mode 100644
index 0000000..36f9a32
--- /dev/null
+++ b/pkg/analysis_server/lib/src/services/correction/fix/pubspec/fix_generator.dart
@@ -0,0 +1,102 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:math' as math;
+
+import 'package:analysis_server/plugin/edit/fix/fix_core.dart';
+import 'package:analysis_server/src/services/correction/strings.dart';
+import 'package:analysis_server/src/utilities/yaml_node_locator.dart';
+import 'package:analyzer/error/error.dart';
+import 'package:analyzer/source/line_info.dart';
+import 'package:analyzer/source/source_range.dart';
+import 'package:analyzer/src/generated/java_core.dart';
+import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/pubspec/pubspec_warning_code.dart';
+import 'package:analyzer_plugin/protocol/protocol_common.dart'
+    show SourceChange;
+import 'package:analyzer_plugin/utilities/change_builder/change_builder_core.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:yaml/yaml.dart';
+
+/// The generator used to generate fixes in pubspec.yaml files.
+class PubspecFixGenerator {
+  final AnalysisError error;
+
+  final int errorOffset;
+
+  final int errorLength;
+
+  final String content;
+
+  final YamlMap options;
+
+  final LineInfo lineInfo;
+
+  final List<Fix> fixes = <Fix>[];
+
+  List<YamlNode> coveringNodePath;
+
+  PubspecFixGenerator(this.error, this.content, this.options)
+      : errorOffset = error.offset,
+        errorLength = error.length,
+        lineInfo = new LineInfo.fromContent(content);
+
+  /// Return the absolute, normalized path to the file in which the error was
+  /// reported.
+  String get file => error.source.fullName;
+
+  /// Return the list of fixes that apply to the error being fixed.
+  Future<List<Fix>> computeFixes() async {
+    YamlNodeLocator locator = new YamlNodeLocator(
+        start: errorOffset, end: errorOffset + errorLength - 1);
+    coveringNodePath = locator.searchWithin(options);
+    if (coveringNodePath.isEmpty) {
+      return fixes;
+    }
+
+    ErrorCode errorCode = error.errorCode;
+    if (errorCode == PubspecWarningCode.ASSET_DOES_NOT_EXIST) {
+    } else if (errorCode == PubspecWarningCode.ASSET_DIRECTORY_DOES_NOT_EXIST) {
+    } else if (errorCode == PubspecWarningCode.ASSET_FIELD_NOT_LIST) {
+    } else if (errorCode == PubspecWarningCode.ASSET_NOT_STRING) {
+    } else if (errorCode == PubspecWarningCode.DEPENDENCIES_FIELD_NOT_MAP) {
+    } else if (errorCode == PubspecWarningCode.FLUTTER_FIELD_NOT_MAP) {
+    } else if (errorCode == PubspecWarningCode.MISSING_NAME) {
+    } else if (errorCode == PubspecWarningCode.NAME_NOT_STRING) {
+    } else if (errorCode == PubspecWarningCode.UNNECESSARY_DEV_DEPENDENCY) {}
+    return fixes;
+  }
+
+  /// Add a fix whose edits were built by the [builder] that has the given
+  /// [kind]. If [args] are provided, they will be used to fill in the message
+  /// for the fix.
+  // ignore: unused_element
+  void _addFixFromBuilder(ChangeBuilder builder, FixKind kind,
+      {List args: null}) {
+    SourceChange change = builder.sourceChange;
+    if (change.edits.isEmpty) {
+      return;
+    }
+    change.message = formatList(kind.message, args);
+    fixes.add(new Fix(kind, change));
+  }
+
+  // ignore: unused_element
+  int _firstNonWhitespaceBefore(int offset) {
+    while (offset > 0 && isWhitespace(content.codeUnitAt(offset - 1))) {
+      offset--;
+    }
+    return offset;
+  }
+
+  // ignore: unused_element
+  SourceRange _lines(int start, int end) {
+    CharacterLocation startLocation = lineInfo.getLocation(start);
+    int startOffset = lineInfo.getOffsetOfLine(startLocation.lineNumber - 1);
+    CharacterLocation endLocation = lineInfo.getLocation(end);
+    int endOffset = lineInfo.getOffsetOfLine(
+        math.min(endLocation.lineNumber, lineInfo.lineCount - 1));
+    return new SourceRange(startOffset, endOffset - startOffset);
+  }
+}
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 c6600c1..e605378 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
@@ -15,9 +15,10 @@
 import 'package:analysis_server/src/services/correction/strings.dart';
 import 'package:analysis_server/src/services/correction/util.dart';
 import 'package:analysis_server/src/services/search/hierarchy.dart';
-import 'package:analysis_server/src/utilities/flutter.dart' as flutter;
+import 'package:analysis_server/src/utilities/flutter.dart';
 import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/precedence.dart';
 import 'package:analyzer/dart/ast/standard_resolution_map.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/element/element.dart';
@@ -174,6 +175,7 @@
   final LibraryElement unitLibraryElement;
   final CompilationUnit unit;
   final CorrectionUtils utils;
+  final Flutter flutter;
 
   final AnalysisError error;
   final int errorOffset;
@@ -194,6 +196,7 @@
         unitLibraryElement = context.resolveResult.libraryElement,
         unit = context.resolveResult.unit,
         utils = CorrectionUtils(context.resolveResult),
+        flutter = Flutter.of(context.resolveResult.session),
         error = context.error,
         errorOffset = context.error.offset,
         errorLength = context.error.length;
@@ -206,9 +209,6 @@
   String get eol => utils.endOfLine;
 
   Future<List<Fix>> compute() async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
-
     node = new NodeLocator2(errorOffset).searchWithin(unit);
     coveredNode = new NodeLocator2(errorOffset, errorOffset + errorLength - 1)
         .searchWithin(unit);
@@ -227,6 +227,7 @@
       await _addFix_replaceWithConstInstanceCreation();
     }
     if (errorCode == CompileTimeErrorCode.ASYNC_FOR_IN_WRONG_CONTEXT ||
+        errorCode == CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT ||
         errorCode == StaticWarningCode.UNDEFINED_IDENTIFIER_AWAIT) {
       await _addFix_addAsync();
     }
@@ -331,7 +332,18 @@
 //    }
     if (errorCode == HintCode.SDK_VERSION_ASYNC_EXPORTED_FROM_CORE) {
       await _addFix_importAsync();
-      await _addFix_updateSdkConstraints();
+      await _addFix_updateSdkConstraints('2.1.0');
+    }
+    if (errorCode == HintCode.SDK_VERSION_SET_LITERAL) {
+      await _addFix_updateSdkConstraints('2.2.0');
+    }
+    if (errorCode == HintCode.SDK_VERSION_AS_EXPRESSION_IN_CONST_CONTEXT ||
+        errorCode == HintCode.SDK_VERSION_BOOL_OPERATOR ||
+        errorCode == HintCode.SDK_VERSION_EQ_EQ_OPERATOR_IN_CONST_CONTEXT ||
+        errorCode == HintCode.SDK_VERSION_GT_GT_GT_OPERATOR ||
+        errorCode == HintCode.SDK_VERSION_IS_EXPRESSION_IN_CONST_CONTEXT ||
+        errorCode == HintCode.SDK_VERSION_UI_AS_CODE) {
+      await _addFix_updateSdkConstraints('2.2.2');
     }
     if (errorCode == HintCode.TYPE_CHECK_IS_NOT_NULL) {
       await _addFix_isNotNull();
@@ -468,7 +480,8 @@
     }
     if (errorCode == CompileTimeErrorCode.UNDEFINED_NAMED_PARAMETER ||
         errorCode == StaticWarningCode.UNDEFINED_NAMED_PARAMETER) {
-      await _addFix_addMissingNamedArgument();
+      await _addFix_addMissingParameterNamed();
+      await _addFix_changeArgumentName();
     }
     if (errorCode == StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE) {
       await _addFix_illegalAsyncReturnType();
@@ -545,6 +558,9 @@
         CompileTimeErrorCode.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE) {
       await _addFix_extendClassForMixin();
     }
+    if (errorCode == StaticWarningCode.MISSING_ENUM_CONSTANT_IN_SWITCH) {
+      await _addFix_addMissingEnumCaseClauses();
+    }
     // lints
     if (errorCode is LintCode) {
       String name = errorCode.name;
@@ -581,39 +597,63 @@
       if (name == LintNames.empty_statements) {
         await _addFix_removeEmptyStatement();
       }
+      if (name == LintNames.no_duplicate_case_values) {
+        await _addFix_removeCaseStatement();
+      }
       if (name == LintNames.non_constant_identifier_names) {
         await _addFix_renameToCamelCase();
       }
+      if (name == LintNames.null_closures) {
+        await _addFix_replaceNullWithClosure();
+      }
       if (name == LintNames.prefer_conditional_assignment) {
         await _addFix_replaceWithConditionalAssignment();
       }
       if (errorCode.name == LintNames.prefer_const_declarations) {
         await _addFix_replaceFinalWithConst();
       }
+      if (errorCode.name == LintNames.prefer_equal_for_default_values) {
+        await _addFix_replaceColonWithEquals();
+      }
       if (name == LintNames.prefer_final_fields) {
         await _addFix_makeVariableFinal();
       }
       if (name == LintNames.prefer_final_locals) {
         await _addFix_makeVariableFinal();
       }
+      if (name == LintNames.prefer_is_empty) {
+        await _addFix_replaceWithIsEmpty();
+      }
       if (name == LintNames.prefer_is_not_empty) {
         await _addFix_isNotEmpty();
       }
       if (name == LintNames.type_init_formals) {
         await _addFix_removeTypeAnnotation();
       }
-      if (name == LintNames.unnecessary_brace_in_string_interp) {
+      if (name == LintNames.unawaited_futures) {
+        await _addFix_addAwait();
+      }
+      if (name == LintNames.unnecessary_brace_in_string_interps) {
         await _addFix_removeInterpolationBraces();
       }
+      if (name == LintNames.unnecessary_const) {
+        await _addFix_removeConstKeyword();
+      }
       if (name == LintNames.unnecessary_lambdas) {
         await _addFix_replaceWithTearOff();
       }
-      if (name == LintNames.unnecessary_override) {
+      if (name == LintNames.unnecessary_new) {
+        await _addFix_removeNewKeyword();
+      }
+      if (name == LintNames.unnecessary_overrides) {
         await _addFix_removeMethodDeclaration();
       }
       if (name == LintNames.unnecessary_this) {
         await _addFix_removeThisExpression();
       }
+      if (name == LintNames.use_rethrow_when_possible) {
+        await _addFix_replaceWithRethrow();
+      }
     }
     // done
     return fixes;
@@ -639,6 +679,14 @@
     }
   }
 
+  Future<void> _addFix_addAwait() async {
+    var changeBuilder = _newDartChangeBuilder();
+    await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
+      builder.addSimpleInsertion(node.offset, 'await ');
+    });
+    _addFixFromBuilder(changeBuilder, DartFixKind.ADD_AWAIT);
+  }
+
   Future<void> _addFix_addExplicitCast() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
@@ -675,7 +723,7 @@
       // TODO(brianwilkerson) Consider updating the right operand.
       return;
     }
-    bool needsParentheses = target.precedence < 15;
+    bool needsParentheses = target.precedence < Precedence.postfix;
     if (((_isDartCoreIterable(fromType) || _isDartCoreList(fromType)) &&
             _isDartCoreList(toType)) ||
         (_isDartCoreSet(fromType) && _isDartCoreSet(toType))) {
@@ -740,68 +788,67 @@
     }
   }
 
-  Future<void> _addFix_addMissingNamedArgument() async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
-    // Prepare the name of the missing parameter.
-    if (this.node is! SimpleIdentifier) {
-      return;
-    }
-    SimpleIdentifier node = this.node;
-    String name = node.name;
-
-    // We expect that the node is part of a NamedExpression.
-    if (node.parent?.parent is! NamedExpression) {
-      return;
-    }
-    NamedExpression namedExpression = node.parent.parent;
-
-    // We should be in an ArgumentList.
-    if (namedExpression.parent is! ArgumentList) {
-      return;
-    }
-    AstNode argumentList = namedExpression.parent;
-
-    // Prepare the invoked element.
-    var context = new _ExecutableParameters(sessionHelper, argumentList.parent);
-    if (context == null) {
-      return;
-    }
-
-    // We cannot add named parameters when there are positional positional.
-    if (context.optionalPositional.isNotEmpty) {
-      return;
-    }
-
-    Future<void> addParameter(int offset, String prefix, String suffix) async {
-      // TODO(brianwilkerson) Determine whether this await is necessary.
-      await null;
-      if (offset != null) {
-        var changeBuilder = _newDartChangeBuilder();
-        await changeBuilder.addFileEdit(context.file, (builder) {
-          builder.addInsertion(offset, (builder) {
-            builder.write(prefix);
-            builder.writeParameterMatchingArgument(
-                namedExpression, 0, new Set<String>());
-            builder.write(suffix);
-          });
-        });
-        _addFixFromBuilder(
-            changeBuilder, DartFixKind.ADD_MISSING_PARAMETER_NAMED,
-            args: [name]);
+  Future<void> _addFix_addMissingEnumCaseClauses() async {
+    SwitchStatement statement = node as SwitchStatement;
+    String enumName;
+    List<String> enumConstantNames = [];
+    DartType expressionType = statement.expression.staticType;
+    if (expressionType is InterfaceType) {
+      ClassElement enumElement = expressionType.element;
+      if (enumElement.isEnum) {
+        enumName = enumElement.name;
+        for (FieldElement field in enumElement.fields) {
+          if (!field.isSynthetic) {
+            enumConstantNames.add(field.name);
+          }
+        }
       }
     }
-
-    if (context.named.isNotEmpty) {
-      var prevNode = await context.getParameterNode(context.named.last);
-      await addParameter(prevNode?.end, ', ', '');
-    } else if (context.required.isNotEmpty) {
-      var prevNode = await context.getParameterNode(context.required.last);
-      await addParameter(prevNode?.end, ', {', '}');
-    } else {
-      var parameterList = await context.getParameterList();
-      await addParameter(parameterList?.leftParenthesis?.end, '{', '}');
+    if (enumName == null) {
+      return;
     }
+    for (SwitchMember member in statement.members) {
+      if (member is SwitchCase) {
+        Expression expression = member.expression;
+        if (expression is Identifier) {
+          Element element = expression.staticElement;
+          if (element is PropertyAccessorElement) {
+            enumConstantNames.remove(element.name);
+          }
+        }
+      }
+    }
+    if (enumConstantNames.isEmpty) {
+      return;
+    }
+
+    String statementIndent = utils.getLinePrefix(statement.offset);
+    String singleIndent = utils.getIndent(1);
+
+    DartChangeBuilder changeBuilder = _newDartChangeBuilder();
+    await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
+      builder.addInsertion(utils.getLineThis(statement.end), (builder) {
+        for (String constantName in enumConstantNames) {
+          builder.write(statementIndent);
+          builder.write(singleIndent);
+          builder.write('case ');
+          builder.write(enumName);
+          builder.write('.');
+          builder.write(constantName);
+          builder.writeln(':');
+          builder.write(statementIndent);
+          builder.write(singleIndent);
+          builder.write(singleIndent);
+          builder.writeln('// TODO: Handle this case.');
+          builder.write(statementIndent);
+          builder.write(singleIndent);
+          builder.write(singleIndent);
+          builder.writeln('break;');
+        }
+      });
+    });
+    _addFixFromBuilder(
+        changeBuilder, DartFixKind.ADD_MISSING_ENUM_CASE_CLAUSES);
   }
 
   Future<void> _addFix_addMissingParameter() async {
@@ -874,6 +921,66 @@
     }
   }
 
+  Future<void> _addFix_addMissingParameterNamed() async {
+    // Prepare the name of the missing parameter.
+    if (this.node is! SimpleIdentifier) {
+      return;
+    }
+    SimpleIdentifier node = this.node;
+    String name = node.name;
+
+    // We expect that the node is part of a NamedExpression.
+    if (node.parent?.parent is! NamedExpression) {
+      return;
+    }
+    NamedExpression namedExpression = node.parent.parent;
+
+    // We should be in an ArgumentList.
+    if (namedExpression.parent is! ArgumentList) {
+      return;
+    }
+    AstNode argumentList = namedExpression.parent;
+
+    // Prepare the invoked element.
+    var context = new _ExecutableParameters(sessionHelper, argumentList.parent);
+    if (context == null) {
+      return;
+    }
+
+    // We cannot add named parameters when there are positional positional.
+    if (context.optionalPositional.isNotEmpty) {
+      return;
+    }
+
+    Future<void> addParameter(int offset, String prefix, String suffix) async {
+      if (offset != null) {
+        var changeBuilder = _newDartChangeBuilder();
+        await changeBuilder.addFileEdit(context.file, (builder) {
+          builder.addInsertion(offset, (builder) {
+            builder.write(prefix);
+            builder.writeParameterMatchingArgument(
+                namedExpression, 0, new Set<String>());
+            builder.write(suffix);
+          });
+        });
+        _addFixFromBuilder(
+            changeBuilder, DartFixKind.ADD_MISSING_PARAMETER_NAMED,
+            args: [name]);
+      }
+    }
+
+    if (context.named.isNotEmpty) {
+      var prevNode = await context.getParameterNode(context.named.last);
+      await addParameter(prevNode?.end, ', ', '');
+    } else if (context.required.isNotEmpty) {
+      var prevNode = await context.getParameterNode(context.required.last);
+      await addParameter(prevNode?.end, ', {', '}');
+    } else {
+      var parameterList = await context.getParameterList();
+      await addParameter(parameterList?.leftParenthesis?.end, '{', '}');
+    }
+  }
+
   Future<void> _addFix_addMissingRequiredArgument() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
@@ -1029,6 +1136,57 @@
     }
   }
 
+  Future<void> _addFix_changeArgumentName() async {
+    const int maxDistance = 4;
+
+    List<String> getNamedParameterNames() {
+      AstNode namedExpression = node?.parent?.parent;
+      if (node is SimpleIdentifier &&
+          namedExpression is NamedExpression &&
+          namedExpression.name == node.parent &&
+          namedExpression.parent is ArgumentList) {
+        var parameters = _ExecutableParameters(
+          sessionHelper,
+          namedExpression.parent.parent,
+        );
+        return parameters?.namedNames;
+      }
+      return null;
+    }
+
+    int computeDistance(String current, String proposal) {
+      if ((current == 'child' && proposal == 'children') ||
+          (current == 'children' && proposal == 'child')) {
+        // Special case handling for 'child' and 'children' is unnecessary if
+        // `maxDistance >= 3`, but is included to prevent regression in case the
+        // value is changed to improve results.
+        return 1;
+      }
+      return levenshtein(current, proposal, maxDistance, caseSensitive: false);
+    }
+
+    List<String> names = getNamedParameterNames();
+    if (names == null || names.isEmpty) {
+      return;
+    }
+
+    SimpleIdentifier argumentName = node;
+    String invalidName = argumentName.name;
+    for (String proposedName in names) {
+      int distance = computeDistance(invalidName, proposedName);
+      if (distance <= maxDistance) {
+        DartChangeBuilder changeBuilder = _newDartChangeBuilder();
+        await changeBuilder.addFileEdit(file, (builder) {
+          builder.addSimpleReplacement(range.node(argumentName), proposedName);
+        });
+        // TODO(brianwilkerson) Create a way to use the distance as part of the
+        //  computation of the priority (so that closer names sort first).
+        _addFixFromBuilder(changeBuilder, DartFixKind.CHANGE_ARGUMENT_NAME,
+            args: [proposedName]);
+      }
+    }
+  }
+
   Future<void> _addFix_changeToNearestPreciseValue() async {
     IntegerLiteral integer = node;
     String lexeme = integer.literal.lexeme;
@@ -1130,7 +1288,7 @@
       NamedExpression named = node.parent?.parent;
       Expression expression = named.expression;
       if (expression is ListLiteral && expression.elements.length == 1) {
-        Expression widget = expression.elements[0];
+        CollectionElement widget = expression.elements[0];
         if (flutter.isWidgetExpression(widget)) {
           String widgetText = utils.getNodeText(widget);
           String indentOld = utils.getLinePrefix(widget.offset);
@@ -1342,7 +1500,7 @@
         flutter.isExactlyStatefulWidgetType(superType)) {
       // Specialize for Flutter widgets.
       ClassElement keyClass =
-          await sessionHelper.getClass(flutter.WIDGETS_LIBRARY_URI, 'Key');
+          await sessionHelper.getClass(flutter.widgetsUri, 'Key');
       await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
         builder.addInsertion(targetLocation.offset, (DartEditBuilder builder) {
           builder.write(targetLocation.prefix);
@@ -2218,7 +2376,8 @@
         DartFixKind.IMPORT_ASYNC, Uri.parse('dart:async'));
   }
 
-  Future<void> _addFix_importLibrary(FixKind kind, Uri library) async {
+  Future<void> _addFix_importLibrary(FixKind kind, Uri library,
+      [String relativeURI = null]) async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
     String uriText;
@@ -2227,6 +2386,16 @@
       uriText = builder.importLibrary(library);
     });
     _addFixFromBuilder(changeBuilder, kind, args: [uriText]);
+
+    if (relativeURI != null && relativeURI.isNotEmpty) {
+      var changeBuilder2 = _newDartChangeBuilder();
+      await changeBuilder2.addFileEdit(file, (DartFileEditBuilder builder) {
+        if (builder is DartFileEditBuilderImpl) {
+          builder.importLibraryWithRelativeUri(relativeURI);
+        }
+      });
+      _addFixFromBuilder(changeBuilder2, kind, args: [relativeURI]);
+    }
   }
 
   Future<void> _addFix_importLibrary_withElement(
@@ -2331,7 +2500,9 @@
           fixKind = DartFixKind.IMPORT_LIBRARY_PROJECT1;
         }
         // Add the fix.
-        await _addFix_importLibrary(fixKind, librarySource.uri);
+        var relativeURI =
+            _getRelativeURIFromLibrary(unitLibraryElement, librarySource);
+        await _addFix_importLibrary(fixKind, librarySource.uri, relativeURI);
       }
     }
   }
@@ -2638,6 +2809,28 @@
     }
   }
 
+  Future<void> _addFix_removeCaseStatement() async {
+    if (coveredNode is SwitchCase) {
+      var changeBuilder = _newDartChangeBuilder();
+      await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
+        builder.addDeletion(utils.getLinesRange(range.node(coveredNode)));
+      });
+      _addFixFromBuilder(changeBuilder, DartFixKind.REMOVE_DUPLICATE_CASE);
+    }
+  }
+
+  Future<void> _addFix_removeConstKeyword() async {
+    final instanceCreationExpression = node;
+    if (instanceCreationExpression is InstanceCreationExpression) {
+      final constToken = instanceCreationExpression.keyword;
+      var changeBuilder = _newDartChangeBuilder();
+      await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
+        builder.addDeletion(range.startStart(constToken, constToken.next));
+      });
+      _addFixFromBuilder(changeBuilder, DartFixKind.REMOVE_UNNECESSARY_CONST);
+    }
+  }
+
   Future<void> _addFix_removeDeadCode() async {
     AstNode coveringNode = this.coveredNode;
     if (coveringNode is Expression) {
@@ -2859,6 +3052,18 @@
     }
   }
 
+  Future<void> _addFix_removeNewKeyword() async {
+    final instanceCreationExpression = node;
+    if (instanceCreationExpression is InstanceCreationExpression) {
+      final newToken = instanceCreationExpression.keyword;
+      var changeBuilder = _newDartChangeBuilder();
+      await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
+        builder.addDeletion(range.startStart(newToken, newToken.next));
+      });
+      _addFixFromBuilder(changeBuilder, DartFixKind.REMOVE_UNNECESSARY_NEW);
+    }
+  }
+
   Future<void> _addFix_removeParameters_inGetterDeclaration() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
@@ -2956,7 +3161,7 @@
     }
     AsExpression asExpression = coveredNode as AsExpression;
     Expression expression = asExpression.expression;
-    int expressionPrecedence = getExpressionPrecedence(expression);
+    Precedence expressionPrecedence = getExpressionPrecedence(expression);
     // remove 'as T' from 'e as T'
     var changeBuilder = _newDartChangeBuilder();
     await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
@@ -3064,6 +3269,17 @@
         args: [newName]);
   }
 
+  Future<void> _addFix_replaceColonWithEquals() async {
+    if (node is DefaultFormalParameter) {
+      var changeBuilder = _newDartChangeBuilder();
+      await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
+        builder.addSimpleReplacement(
+            range.token((node as DefaultFormalParameter).separator), '=');
+      });
+      _addFixFromBuilder(changeBuilder, DartFixKind.REPLACE_COLON_WITH_EQUALS);
+    }
+  }
+
   Future<void> _addFix_replaceFinalWithConst() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
@@ -3077,6 +3293,39 @@
     }
   }
 
+  Future<void> _addFix_replaceNullWithClosure() async {
+    var nodeToFix;
+    var parameters = const <ParameterElement>[];
+    if (coveredNode is NamedExpression) {
+      NamedExpression namedExpression = coveredNode;
+      var expression = namedExpression.expression;
+      if (expression is NullLiteral) {
+        var element = namedExpression.element;
+        if (element is ParameterElement) {
+          var type = element.type;
+          if (type is FunctionType) {
+            parameters = type.parameters;
+          }
+        }
+        nodeToFix = expression;
+      }
+    } else if (coveredNode is NullLiteral) {
+      nodeToFix = coveredNode;
+    }
+
+    if (nodeToFix != null) {
+      var changeBuilder = _newDartChangeBuilder();
+      await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
+        builder.addReplacement(range.node(nodeToFix),
+            (DartEditBuilder builder) {
+          builder.writeParameters(parameters);
+          builder.write(' => null');
+        });
+      });
+      _addFixFromBuilder(changeBuilder, DartFixKind.REPLACE_NULL_WITH_CLOSURE);
+    }
+  }
+
   Future<void> _addFix_replaceVarWithDynamic() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
@@ -3159,6 +3408,110 @@
     }
   }
 
+  Future<void> _addFix_replaceWithIsEmpty() async {
+    /// Return the value of an integer literal or prefix expression with a
+    /// minus and then an integer literal. For anything else, returns `null`.
+    int getIntValue(Expression expressions) {
+      // Copied from package:linter/src/rules/prefer_is_empty.dart.
+      if (expressions is IntegerLiteral) {
+        return expressions.value;
+      } else if (expressions is PrefixExpression) {
+        var operand = expressions.operand;
+        if (expressions.operator.type == TokenType.MINUS &&
+            operand is IntegerLiteral) {
+          return -operand.value;
+        }
+      }
+      return null;
+    }
+
+    /// Return the expression producing the object on which `length` is being
+    /// invoked, or `null` if there is no such expression.
+    Expression getLengthTarget(Expression expression) {
+      if (expression is PropertyAccess &&
+          expression.propertyName.name == 'length') {
+        return expression.target;
+      } else if (expression is PrefixedIdentifier &&
+          expression.identifier.name == 'length') {
+        return expression.prefix;
+      }
+      return null;
+    }
+
+    BinaryExpression binary = node.thisOrAncestorOfType();
+    TokenType operator = binary.operator.type;
+    String getter;
+    FixKind kind;
+    Expression lengthTarget;
+    int rightValue = getIntValue(binary.rightOperand);
+    if (rightValue != null) {
+      lengthTarget = getLengthTarget(binary.leftOperand);
+      if (rightValue == 0) {
+        if (operator == TokenType.EQ_EQ || operator == TokenType.LT_EQ) {
+          getter = 'isEmpty';
+          kind = DartFixKind.REPLACE_WITH_IS_EMPTY;
+        } else if (operator == TokenType.GT || operator == TokenType.BANG_EQ) {
+          getter = 'isNotEmpty';
+          kind = DartFixKind.REPLACE_WITH_IS_NOT_EMPTY;
+        }
+      } else if (rightValue == 1) {
+        // 'length >= 1' is same as 'isNotEmpty',
+        // and 'length < 1' is same as 'isEmpty'
+        if (operator == TokenType.GT_EQ) {
+          getter = 'isNotEmpty';
+          kind = DartFixKind.REPLACE_WITH_IS_NOT_EMPTY;
+        } else if (operator == TokenType.LT) {
+          getter = 'isEmpty';
+          kind = DartFixKind.REPLACE_WITH_IS_EMPTY;
+        }
+      }
+    } else {
+      int leftValue = getIntValue(binary.leftOperand);
+      if (leftValue != null) {
+        lengthTarget = getLengthTarget(binary.rightOperand);
+        if (leftValue == 0) {
+          if (operator == TokenType.EQ_EQ || operator == TokenType.GT_EQ) {
+            getter = 'isEmpty';
+            kind = DartFixKind.REPLACE_WITH_IS_EMPTY;
+          } else if (operator == TokenType.LT ||
+              operator == TokenType.BANG_EQ) {
+            getter = 'isNotEmpty';
+            kind = DartFixKind.REPLACE_WITH_IS_NOT_EMPTY;
+          }
+        } else if (leftValue == 1) {
+          // '1 <= length' is same as 'isNotEmpty',
+          // and '1 > length' is same as 'isEmpty'
+          if (operator == TokenType.LT_EQ) {
+            getter = 'isNotEmpty';
+            kind = DartFixKind.REPLACE_WITH_IS_NOT_EMPTY;
+          } else if (operator == TokenType.GT) {
+            getter = 'isEmpty';
+            kind = DartFixKind.REPLACE_WITH_IS_EMPTY;
+          }
+        }
+      }
+    }
+    if (lengthTarget == null || getter == null || kind == null) {
+      return;
+    }
+    String target = utils.getNodeText(lengthTarget);
+    DartChangeBuilder changeBuilder = _newDartChangeBuilder();
+    await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
+      builder.addSimpleReplacement(range.node(binary), '$target.$getter');
+    });
+    _addFixFromBuilder(changeBuilder, kind);
+  }
+
+  Future<void> _addFix_replaceWithRethrow() async {
+    if (coveredNode is ThrowExpression) {
+      var changeBuilder = _newDartChangeBuilder();
+      await changeBuilder.addFileEdit(file, (DartFileEditBuilder builder) {
+        builder.addSimpleReplacement(range.node(coveredNode), 'rethrow');
+      });
+      _addFixFromBuilder(changeBuilder, DartFixKind.USE_RETHROW);
+    }
+  }
+
   Future<void> _addFix_replaceWithTearOff() async {
     // TODO(brianwilkerson) Determine whether this await is necessary.
     await null;
@@ -3577,7 +3930,7 @@
     _addFixFromBuilder(changeBuilder, DartFixKind.ADD_FIELD_FORMAL_PARAMETERS);
   }
 
-  Future<void> _addFix_updateSdkConstraints() async {
+  Future<void> _addFix_updateSdkConstraints(String minimumVersion) async {
     Context context = resourceProvider.pathContext;
     File pubspecFile = null;
     Folder folder = resourceProvider.getFolder(context.dirname(file));
@@ -3605,13 +3958,13 @@
       length = spaceOffset;
     }
     if (text == 'any') {
-      newText = '^2.1.0';
+      newText = '^$minimumVersion';
     } else if (text.startsWith('^')) {
-      newText = '^2.1.0';
+      newText = '^$minimumVersion';
     } else if (text.startsWith('>=')) {
-      newText = '>=2.1.0';
+      newText = '>=$minimumVersion';
     } else if (text.startsWith('>')) {
-      newText = '>=2.1.0';
+      newText = '>=$minimumVersion';
     }
     if (newText == null) {
       return;
@@ -3891,6 +4244,27 @@
   }
 
   /**
+   * Return the relative uri from the passed [library] to the passed
+   * [source]. If the [source] is not in the LibraryElement, `null` is returned.
+   */
+  String _getRelativeURIFromLibrary(LibraryElement library, Source source) {
+    var librarySource = library?.librarySource;
+    if (librarySource == null) {
+      return null;
+    }
+    var pathCtx = resourceProvider.pathContext;
+    var libraryDirectory = pathCtx.dirname(librarySource.fullName);
+    var sourceDirectory = pathCtx.dirname(source.fullName);
+    if (pathCtx.isWithin(libraryDirectory, source.fullName) ||
+        pathCtx.isWithin(sourceDirectory, libraryDirectory)) {
+      String relativeFile =
+          pathCtx.relative(source.fullName, from: libraryDirectory);
+      return pathCtx.split(relativeFile).join('/');
+    }
+    return null;
+  }
+
+  /**
    * Returns an expected [DartType] of [expression], may be `null` if cannot be
    * inferred.
    */
@@ -4144,7 +4518,7 @@
    * [exprPrecedence] - the effective precedence of [expr].
    */
   void _removeEnclosingParentheses(
-      DartFileEditBuilder builder, Expression expr, int exprPrecedence) {
+      DartFileEditBuilder builder, Expression expr, Precedence exprPrecedence) {
     while (expr.parent is ParenthesizedExpression) {
       ParenthesizedExpression parenthesized =
           expr.parent as ParenthesizedExpression;
@@ -4230,21 +4604,30 @@
   static const String empty_catches = 'empty_catches';
   static const String empty_constructor_bodies = 'empty_constructor_bodies';
   static const String empty_statements = 'empty_statements';
+  static const String no_duplicate_case_values = 'no_duplicate_case_values';
   static const String non_constant_identifier_names =
       'non_constant_identifier_names';
+  static const String null_closures = 'null_closures';
   static const String prefer_collection_literals = 'prefer_collection_literals';
   static const String prefer_conditional_assignment =
       'prefer_conditional_assignment';
   static const String prefer_const_declarations = 'prefer_const_declarations';
+  static const String prefer_equal_for_default_values =
+      'prefer_equal_for_default_values';
   static const String prefer_final_fields = 'prefer_final_fields';
   static const String prefer_final_locals = 'prefer_final_locals';
+  static const String prefer_is_empty = 'prefer_is_empty';
   static const String prefer_is_not_empty = 'prefer_is_not_empty';
   static const String type_init_formals = 'type_init_formals';
-  static const String unnecessary_brace_in_string_interp =
-      'unnecessary_brace_in_string_interp';
+  static const String unawaited_futures = 'unawaited_futures';
+  static const String unnecessary_brace_in_string_interps =
+      'unnecessary_brace_in_string_interps';
+  static const String unnecessary_const = 'unnecessary_const';
   static const String unnecessary_lambdas = 'unnecessary_lambdas';
-  static const String unnecessary_override = 'unnecessary_override';
+  static const String unnecessary_new = 'unnecessary_new';
+  static const String unnecessary_overrides = 'unnecessary_overrides';
   static const String unnecessary_this = 'unnecessary_this';
+  static const String use_rethrow_when_possible = 'use_rethrow_when_possible';
 }
 
 /**
@@ -4290,11 +4673,15 @@
   factory _ExecutableParameters(
       AnalysisSessionHelper sessionHelper, AstNode invocation) {
     Element element;
-    if (invocation is InstanceCreationExpression) {
+    // This doesn't handle FunctionExpressionInvocation.
+    if (invocation is Annotation) {
+      element = invocation.element;
+    } else if (invocation is InstanceCreationExpression) {
       element = invocation.staticElement;
-    }
-    if (invocation is MethodInvocation) {
+    } else if (invocation is MethodInvocation) {
       element = invocation.methodName.staticElement;
+    } else if (invocation is ConstructorReferenceNode) {
+      element = invocation.staticElement;
     }
     if (element is ExecutableElement && !element.isSynthetic) {
       return new _ExecutableParameters._(sessionHelper, element);
@@ -4317,6 +4704,10 @@
 
   String get file => executable.source.fullName;
 
+  List<String> get namedNames {
+    return named.map((parameter) => parameter.name).toList();
+  }
+
   /**
    * Return the [FormalParameterList] of the [executable], or `null` is cannot
    * be found.
diff --git a/pkg/analysis_server/lib/src/services/correction/organize_directives.dart b/pkg/analysis_server/lib/src/services/correction/organize_directives.dart
index 14e218e..3c3ff33 100644
--- a/pkg/analysis_server/lib/src/services/correction/organize_directives.dart
+++ b/pkg/analysis_server/lib/src/services/correction/organize_directives.dart
@@ -76,17 +76,36 @@
    * Organize all [Directive]s.
    */
   void _organizeDirectives() {
+    var lineInfo = unit.lineInfo;
     List<_DirectiveInfo> directives = [];
     for (Directive directive in unit.directives) {
       if (directive is UriBasedDirective) {
         _DirectivePriority priority = getDirectivePriority(directive);
         if (priority != null) {
           int offset = directive.offset;
-          int length = directive.length;
-          String text = code.substring(offset, offset + length);
+
+          int end = directive.end;
+          int line = lineInfo.getLocation(end).lineNumber;
+          Token comment = directive.endToken.next.precedingComments;
+          while (comment != null) {
+            if (lineInfo.getLocation(comment.offset).lineNumber == line) {
+              end = comment.end;
+            }
+            comment = comment.next;
+          }
+
+          String text = code.substring(offset, end);
           String uriContent = directive.uri.stringValue;
-          directives
-              .add(new _DirectiveInfo(directive, priority, uriContent, text));
+          directives.add(
+            new _DirectiveInfo(
+              directive,
+              priority,
+              uriContent,
+              offset,
+              end,
+              text,
+            ),
+          );
         }
       }
     }
@@ -94,8 +113,8 @@
     if (directives.isEmpty) {
       return;
     }
-    int firstDirectiveOffset = directives.first.directive.offset;
-    int lastDirectiveEnd = directives.last.directive.end;
+    int firstDirectiveOffset = directives.first.offset;
+    int lastDirectiveEnd = directives.last.end;
     // sort
     directives.sort();
     // append directives with grouping
@@ -125,29 +144,6 @@
       directivesCode = sb.toString();
       directivesCode = directivesCode.trimRight();
     }
-    // append comment tokens which otherwise would be removed completely
-    {
-      bool firstCommentToken = true;
-      Token token = unit.beginToken;
-      while (token != null &&
-          token.type != TokenType.EOF &&
-          token.end < lastDirectiveEnd) {
-        Token commentToken = token.precedingComments;
-        while (commentToken != null) {
-          int offset = commentToken.offset;
-          int end = commentToken.end;
-          if (offset > firstDirectiveOffset && offset < lastDirectiveEnd) {
-            if (firstCommentToken) {
-              directivesCode += endOfLine;
-              firstCommentToken = false;
-            }
-            directivesCode += code.substring(offset, end) + endOfLine;
-          }
-          commentToken = commentToken.next;
-        }
-        token = token.next;
-      }
-    }
     // prepare code
     String beforeDirectives = code.substring(0, firstDirectiveOffset);
     String afterDirectives = code.substring(lastDirectiveEnd);
@@ -200,9 +196,24 @@
   final UriBasedDirective directive;
   final _DirectivePriority priority;
   final String uri;
+
+  /// The offset of the first token, usually the keyword.
+  final int offset;
+
+  /// The offset after the least token, including the end-of-line comment.
+  final int end;
+
+  /// The text between [offset] and [end].
   final String text;
 
-  _DirectiveInfo(this.directive, this.priority, this.uri, this.text);
+  _DirectiveInfo(
+    this.directive,
+    this.priority,
+    this.uri,
+    this.offset,
+    this.end,
+    this.text,
+  );
 
   @override
   int compareTo(_DirectiveInfo other) {
diff --git a/pkg/analysis_server/lib/src/services/correction/statement_analyzer.dart b/pkg/analysis_server/lib/src/services/correction/statement_analyzer.dart
index 184c81b..dcba372 100644
--- a/pkg/analysis_server/lib/src/services/correction/statement_analyzer.dart
+++ b/pkg/analysis_server/lib/src/services/correction/statement_analyzer.dart
@@ -107,21 +107,31 @@
   @override
   Object visitForStatement(ForStatement node) {
     super.visitForStatement(node);
-    List<AstNode> selectedNodes = this.selectedNodes;
-    bool containsInit = _contains(selectedNodes, node.initialization) ||
-        _contains(selectedNodes, node.variables);
-    bool containsCondition = _contains(selectedNodes, node.condition);
-    bool containsUpdaters = _containsAny(selectedNodes, node.updaters);
-    bool containsBody = _contains(selectedNodes, node.body);
-    if (containsInit && containsCondition) {
-      invalidSelection(
-          "Operation not applicable to a 'for' statement's initializer and condition.");
-    } else if (containsCondition && containsUpdaters) {
-      invalidSelection(
-          "Operation not applicable to a 'for' statement's condition and updaters.");
-    } else if (containsUpdaters && containsBody) {
-      invalidSelection(
-          "Operation not applicable to a 'for' statement's updaters and body.");
+    var forLoopParts = node.forLoopParts;
+    if (forLoopParts is ForParts) {
+      List<AstNode> selectedNodes = this.selectedNodes;
+      bool containsInit;
+      if (forLoopParts is ForPartsWithExpression) {
+        containsInit = _contains(selectedNodes, forLoopParts.initialization);
+      } else if (forLoopParts is ForPartsWithDeclarations) {
+        containsInit = _contains(selectedNodes, forLoopParts.variables);
+      } else {
+        throw new StateError('Unrecognized for loop parts');
+      }
+      bool containsCondition = _contains(selectedNodes, forLoopParts.condition);
+      bool containsUpdaters =
+          _containsAny(selectedNodes, forLoopParts.updaters);
+      bool containsBody = _contains(selectedNodes, node.body);
+      if (containsInit && containsCondition) {
+        invalidSelection(
+            "Operation not applicable to a 'for' statement's initializer and condition.");
+      } else if (containsCondition && containsUpdaters) {
+        invalidSelection(
+            "Operation not applicable to a 'for' statement's condition and updaters.");
+      } else if (containsUpdaters && containsBody) {
+        invalidSelection(
+            "Operation not applicable to a 'for' statement's updaters and body.");
+      }
     }
     return null;
   }
diff --git a/pkg/analysis_server/lib/src/services/correction/util.dart b/pkg/analysis_server/lib/src/services/correction/util.dart
index 9ea11e0..d4a4280 100644
--- a/pkg/analysis_server/lib/src/services/correction/util.dart
+++ b/pkg/analysis_server/lib/src/services/correction/util.dart
@@ -10,6 +10,7 @@
 import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/precedence.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
@@ -300,17 +301,17 @@
 }
 
 /**
- * Returns [getExpressionPrecedence] for the parent of [node], or `0` if the
- * parent node is a [ParenthesizedExpression].
+ * Returns [getExpressionPrecedence] for the parent of [node], or
+ * ASSIGNMENT_PRECEDENCE if the parent node is a [ParenthesizedExpression].
  *
  * The reason is that `(expr)` is always executed after `expr`.
  */
-int getExpressionParentPrecedence(AstNode node) {
+Precedence getExpressionParentPrecedence(AstNode node) {
   AstNode parent = node.parent;
   if (parent is ParenthesizedExpression) {
-    return 0;
+    return Precedence.assignment;
   } else if (parent is IndexExpression && parent.index == node) {
-    return 0;
+    return Precedence.assignment;
   } else if (parent is AssignmentExpression &&
       node == parent.rightHandSide &&
       parent.parent is CascadeExpression) {
@@ -319,19 +320,20 @@
     // expressions are equal it sometimes means that we don't need parentheses
     // (such as replacing the `b` in `a + b` with `c + d`) and sometimes do
     // (such as replacing the `v` in `..f = v` with `a..b`).
-    return 3;
+    return Precedence.conditional;
   }
   return getExpressionPrecedence(parent);
 }
 
 /**
- * Returns the precedence of [node] it is an [Expression], negative otherwise.
+ * Returns the precedence of [node] it is an [Expression], NO_PRECEDENCE
+ * otherwise.
  */
-int getExpressionPrecedence(AstNode node) {
+Precedence getExpressionPrecedence(AstNode node) {
   if (node is Expression) {
     return node.precedence;
   }
-  return -1000;
+  return Precedence.none;
 }
 
 /**
diff --git a/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart b/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart
index bce5382..2c14f1f 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/extract_method.dart
@@ -964,13 +964,23 @@
   }
 
   @override
+  Object visitForParts(ForParts node) {
+    node.visitChildren(this);
+    return null;
+  }
+
+  @override
   Object visitForStatement(ForStatement node) {
     super.visitForStatement(node);
-    if (identical(node.variables, firstSelectedNode)) {
-      invalidSelection(
-          "Cannot extract initialization part of a 'for' statement.");
-    } else if (node.updaters.contains(lastSelectedNode)) {
-      invalidSelection("Cannot extract increment part of a 'for' statement.");
+    var forLoopParts = node.forLoopParts;
+    if (forLoopParts is ForParts) {
+      if (forLoopParts is ForPartsWithDeclarations &&
+          identical(forLoopParts.variables, firstSelectedNode)) {
+        invalidSelection(
+            "Cannot extract initialization part of a 'for' statement.");
+      } else if (forLoopParts.updaters.contains(lastSelectedNode)) {
+        invalidSelection("Cannot extract increment part of a 'for' statement.");
+      }
     }
     return null;
   }
@@ -1094,11 +1104,11 @@
   }
 
   @override
-  visitForEachStatement(ForEachStatement node) {
+  visitForStatement(ForStatement node) {
     if (node.awaitKeyword != null) {
       result = true;
     }
-    super.visitForEachStatement(node);
+    super.visitForStatement(node);
   }
 }
 
diff --git a/pkg/analysis_server/lib/src/services/refactoring/extract_widget.dart b/pkg/analysis_server/lib/src/services/refactoring/extract_widget.dart
index b182f37..347c778 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/extract_widget.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/extract_widget.dart
@@ -35,6 +35,7 @@
   final int length;
 
   CorrectionUtils utils;
+  Flutter flutter;
 
   ClassElement classBuildContext;
   ClassElement classKey;
@@ -75,6 +76,7 @@
       this.searchEngine, this.resolveResult, this.offset, this.length)
       : sessionHelper = new AnalysisSessionHelper(resolveResult.session) {
     utils = new CorrectionUtils(resolveResult);
+    flutter = Flutter.of(resolveResult.session);
   }
 
   @override
@@ -182,8 +184,8 @@
     _enclosingClassElement = _enclosingClassNode?.declaredElement;
 
     // new MyWidget(...)
-    InstanceCreationExpression newExpression = identifyNewExpression(node);
-    if (isWidgetCreation(newExpression)) {
+    var newExpression = flutter.identifyNewExpression(node);
+    if (flutter.isWidgetCreation(newExpression)) {
       _expression = newExpression;
       return new RefactoringStatus();
     }
@@ -201,7 +203,7 @@
       if (statements.isNotEmpty) {
         var lastStatement = statements.last;
         if (lastStatement is ReturnStatement &&
-            isWidgetExpression(lastStatement.expression)) {
+            flutter.isWidgetExpression(lastStatement.expression)) {
           _statements = statements;
           _statementsRange = range.startEnd(statements.first, statements.last);
           return new RefactoringStatus();
@@ -219,7 +221,7 @@
       }
       if (node is MethodDeclaration) {
         DartType returnType = node.returnType?.type;
-        if (isWidgetType(returnType) && node.body != null) {
+        if (flutter.isWidgetType(returnType) && node.body != null) {
           _method = node;
           return new RefactoringStatus();
         }
@@ -240,10 +242,11 @@
     Future<ClassElement> getClass(String name) async {
       // TODO(brianwilkerson) Determine whether this await is necessary.
       await null;
-      const uri = 'package:flutter/widgets.dart';
-      var element = await sessionHelper.getClass(uri, name);
+      var element = await sessionHelper.getClass(flutter.widgetsUri, name);
       if (element == null) {
-        result.addFatalError("Unable to find '$name' in $uri");
+        result.addFatalError(
+          "Unable to find '$name' in ${flutter.widgetsUri}",
+        );
       }
       return element;
     }
diff --git a/pkg/analysis_server/lib/src/services/refactoring/inline_local.dart b/pkg/analysis_server/lib/src/services/refactoring/inline_local.dart
index 00b8883..2d7efec 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/inline_local.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/inline_local.dart
@@ -12,6 +12,7 @@
 import 'package:analysis_server/src/services/search/search_engine.dart';
 import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/precedence.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/dart/analysis/session_helper.dart';
@@ -192,7 +193,7 @@
 
   static bool _shouldUseParenthesis(Expression init, AstNode node) {
     // check precedence
-    int initPrecedence = getExpressionPrecedence(init);
+    Precedence initPrecedence = getExpressionPrecedence(init);
     if (initPrecedence < getExpressionParentPrecedence(node)) {
       return true;
     }
diff --git a/pkg/analysis_server/lib/src/services/refactoring/inline_method.dart b/pkg/analysis_server/lib/src/services/refactoring/inline_method.dart
index 4d7b4e2..c552695 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/inline_method.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/inline_method.dart
@@ -14,6 +14,7 @@
 import 'package:analysis_server/src/services/search/search_engine.dart';
 import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/precedence.dart';
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/dart/analysis/session_helper.dart';
@@ -66,7 +67,7 @@
       argument = (argument as NamedExpression).expression;
     }
     // prepare argument properties
-    int argumentPrecedence;
+    Precedence argumentPrecedence;
     String argumentSource;
     if (argument != null) {
       argumentPrecedence = getExpressionPrecedence(argument);
@@ -79,7 +80,7 @@
         return;
       }
       // an optional parameter
-      argumentPrecedence = -1000;
+      argumentPrecedence = Precedence.none;
       argumentSource = parameter.defaultValueCode;
       if (argumentSource == null) {
         argumentSource = 'null';
@@ -414,8 +415,9 @@
 }
 
 class _ParameterOccurrence {
-  final int parentPrecedence;
+  final Precedence parentPrecedence;
   final SourceRange range;
+
   _ParameterOccurrence(this.parentPrecedence, this.range);
 }
 
@@ -735,8 +737,8 @@
     _implicitThisOffsets.add(offset - _base);
   }
 
-  void addParameterOccurrence(
-      ParameterElement parameter, SourceRange identifierRange, int precedence) {
+  void addParameterOccurrence(ParameterElement parameter,
+      SourceRange identifierRange, Precedence precedence) {
     if (parameter != null) {
       List<_ParameterOccurrence> occurrences = _parameters[parameter];
       if (occurrences == null) {
@@ -846,7 +848,7 @@
     }
     // OK, add occurrence
     SourceRange nodeRange = range.node(node);
-    int parentPrecedence = getExpressionParentPrecedence(node);
+    Precedence parentPrecedence = getExpressionParentPrecedence(node);
     result.addParameterOccurrence(
         parameterElement, nodeRange, parentPrecedence);
   }
diff --git a/pkg/analysis_server/lib/src/services/refactoring/rename_unit_member.dart b/pkg/analysis_server/lib/src/services/refactoring/rename_unit_member.dart
index cb8683f..26d14d3 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/rename_unit_member.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/rename_unit_member.dart
@@ -13,7 +13,7 @@
 import 'package:analysis_server/src/services/refactoring/rename.dart';
 import 'package:analysis_server/src/services/search/element_visitors.dart';
 import 'package:analysis_server/src/services/search/search_engine.dart';
-import 'package:analysis_server/src/utilities/flutter.dart' as flutter;
+import 'package:analysis_server/src/utilities/flutter.dart';
 import 'package:analyzer/dart/ast/ast.dart' show Identifier;
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/generated/java_core.dart';
@@ -144,6 +144,7 @@
   }
 
   void _findFlutterStateClass() {
+    var flutter = Flutter.of(element.session);
     if (flutter.isStatefulWidgetDeclaration(element)) {
       var oldStateName = oldName + 'State';
       _flutterWidgetState = element.library.getType(oldStateName) ??
diff --git a/pkg/analysis_server/lib/src/status/diagnostics.dart b/pkg/analysis_server/lib/src/status/diagnostics.dart
index 793b9c3..2723c18 100644
--- a/pkg/analysis_server/lib/src/status/diagnostics.dart
+++ b/pkg/analysis_server/lib/src/status/diagnostics.dart
@@ -40,6 +40,7 @@
 import 'package:analyzer/src/source/package_map_resolver.dart';
 import 'package:analyzer/src/source/sdk_ext.dart';
 import 'package:path/path.dart' as pathPackage;
+import 'package:analyzer/src/dartdoc/dartdoc_directive_info.dart';
 
 final String kCustomCss = '''
 .lead, .page-title+.markdown-body>p:first-child {
@@ -174,9 +175,6 @@
 
   @override
   Future generateContent(Map<String, String> params) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
-
     List<CompletionPerformance> completions = performanceItems;
 
     if (completions.isEmpty) {
@@ -246,8 +244,6 @@
 
   @override
   Future<void> generateContent(Map<String, String> params) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
     String path = params['file'];
     if (path == null) {
       p('No file path provided.');
@@ -274,8 +270,6 @@
 
   @override
   Future<void> generatePage(Map<String, String> params) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
     try {
       _description = params['file'];
       await super.generatePage(params);
@@ -293,9 +287,6 @@
 
   @override
   Future generateContent(Map<String, String> params) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
-
     void writeRow(List<String> data, {List<String> classes}) {
       buf.write("<tr>");
       for (int i = 0; i < data.length; i++) {
@@ -420,8 +411,6 @@
 
   @override
   Future generateContent(Map<String, String> params) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
     Map<Folder, AnalysisDriver> driverMap = server.driverMap;
     if (driverMap.isEmpty) {
       blankslate('No contexts.');
@@ -560,6 +549,13 @@
         buf.write('</p>');
       }
     }
+
+    h3('Dartdoc template info');
+    DartdocDirectiveInfo info = (server as AnalysisServer).declarationsTracker
+        ?.getContext(driver.analysisContext)
+        ?.dartdocDirectiveInfo ??
+        new DartdocDirectiveInfo();
+    writeMap(info.templateMap);
   }
 
   void writeList<E>(List<E> list) {
@@ -600,14 +596,10 @@
   AbstractAnalysisServer get server => site.socketServer.analysisServer;
 
   Future<void> generateContainer(Map<String, String> params) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
     buf.writeln('<div class="columns docs-layout">');
     buf.writeln('<div class="three-fourths column markdown-body">');
     h1(title, classes: 'page-title');
     await asyncDiv(() async {
-      // TODO(brianwilkerson) Determine whether this await is necessary.
-      await null;
       p(description);
       await generateContent(params);
     }, classes: 'markdown-body');
@@ -646,8 +638,6 @@
   }
 
   Future<void> generatePage(Map<String, String> params) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
     buf.writeln('<!DOCTYPE html><html lang="en">');
     buf.write('<head>');
     buf.write('<meta charset="utf-8">');
@@ -686,8 +676,6 @@
   bool get showInNav => true;
 
   Future<void> generateContainer(Map<String, String> params) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
     buf.writeln('<div class="columns docs-layout">');
 
     bool shouldShowInNav(Page page) {
@@ -711,8 +699,6 @@
     buf.writeln('<div class="four-fifths column markdown-body">');
     h1(title, classes: 'page-title');
     await asyncDiv(() async {
-      // TODO(brianwilkerson) Determine whether this await is necessary.
-      await null;
       p(description);
       await generateContent(params);
     }, classes: 'markdown-body');
@@ -792,8 +778,6 @@
 
   @override
   Future<void> generateContent(Map<String, String> params) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
     String path = params['file'];
     if (path == null) {
       p('No file path provided.');
@@ -820,8 +804,6 @@
 
   @override
   Future<void> generatePage(Map<String, String> params) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
     try {
       _description = params['file'];
       await super.generatePage(params);
@@ -839,8 +821,6 @@
 
   @override
   Future generateContent(Map<String, String> params) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
     buf.writeln('<table>');
     buf.writeln('<tr><th>Variable</th><th>Value</th></tr>');
     for (String key in Platform.environment.keys.toList()..sort()) {
@@ -858,8 +838,6 @@
       : super(site, '', '500 Oops', description: message);
 
   Future generateContent(Map<String, String> params) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
     p(trace.toString(), style: 'white-space: pre');
   }
 }
@@ -875,8 +853,6 @@
 
   @override
   Future generateContent(Map<String, String> params) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
     if (exceptions.isEmpty) {
       blankslate('No exceptions encountered!');
     } else {
@@ -899,12 +875,10 @@
 
   @override
   Future generateContent(Map<String, String> params) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
     final String issuesUrl = 'https://github.com/dart-lang/sdk/issues';
     p(
       'To file issues or feature requests, see our '
-          '<a href="$issuesUrl">bug tracker</a>. When filing an issue, please describe:',
+      '<a href="$issuesUrl">bug tracker</a>. When filing an issue, please describe:',
       raw: true,
     );
     ul([
@@ -941,8 +915,6 @@
 
   @override
   Future generateContent(Map<String, String> params) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
     p(
         'Instrumentation can be enabled by starting the analysis server with the '
         '<code>--instrumentation-log-file=path/to/file</code> flag.',
@@ -1025,8 +997,6 @@
 
   @override
   Future generateContent(Map<String, String> params) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
     UsageInfo usage = await profiler.getProcessUsage(pid);
 
     developer.ServiceProtocolInfo serviceProtocolInfo =
@@ -1090,8 +1060,6 @@
       : super(site, '', '404 Not found', description: "'$path' not found.");
 
   Future generateContent(Map<String, String> params) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
   }
 }
 
@@ -1104,19 +1072,19 @@
 
   @override
   Future generateContent(Map<String, String> params) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
-
     h3('Analysis plugins');
     List<PluginInfo> analysisPlugins = server.pluginManager.plugins;
 
     if (analysisPlugins.isEmpty) {
       blankslate('No known analysis plugins.');
     } else {
+      analysisPlugins
+          .sort((first, second) => first.pluginId.compareTo(second.pluginId));
       for (PluginInfo plugin in analysisPlugins) {
-        // TODO(brianwilkerson) Sort the plugins by name.
         String id = plugin.pluginId;
         PluginData data = plugin.data;
+        Map<String, List<int>> responseTimes =
+            PluginManager.pluginResponseTimes[plugin];
 
         List<String> components = pathPackage.split(id);
         int length = components.length;
@@ -1155,6 +1123,19 @@
               buf.writeln(root.root);
             });
           }
+          p('Performance:');
+          List<String> requestNames = responseTimes.keys.toList();
+          requestNames.sort();
+          for (String requestName in requestNames) {
+            List<int> data = responseTimes[requestName];
+            // TODO(brianwilkerson) Consider displaying these times as a graph,
+            //  similar to the one in AbstractCompletionPage.generateContent.
+            StringBuffer buffer = new StringBuffer();
+            buffer.write(requestName);
+            buffer.write(' ');
+            buffer.write(data);
+            p(buffer.toString());
+          }
         }
       }
     }
@@ -1168,8 +1149,6 @@
 
   @override
   Future generateContent(Map<String, String> params) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
     h3('Profiling performance tag data');
 
     // prepare sorted tags
@@ -1317,10 +1296,6 @@
 
   @override
   Future generateContent(Map<String, String> params) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
-    DiagnosticsSite diagnosticsSite = site;
-
     buf.writeln('<div class="columns">');
 
     buf.writeln('<div class="column one-half">');
@@ -1328,14 +1303,6 @@
     buf.writeln(writeOption('Server type', server.runtimeType));
     buf.writeln(writeOption('Instrumentation enabled',
         AnalysisEngine.instance.instrumentationService.isActive));
-    bool uxExp1 =
-        diagnosticsSite.socketServer.analysisServerOptions.enableUXExperiment1;
-    bool uxExp2 =
-        diagnosticsSite.socketServer.analysisServerOptions.enableUXExperiment2;
-    if (uxExp1 || uxExp2) {
-      buf.writeln(writeOption('UX Experiment 1', uxExp1));
-      buf.writeln(writeOption('ux Experiment 2', uxExp2));
-    }
     buf.writeln(writeOption('Server process ID', pid));
     buf.writeln('</div>');
 
@@ -1365,9 +1332,6 @@
 
   @override
   Future generateContent(Map<String, String> params) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
-
     // server domain
     h3('Server domain subscriptions');
     ul(ServerService.VALUES, (item) {
@@ -1386,5 +1350,18 @@
         buf.write('$item');
       });
     }
+
+    // completion domain
+    CompletionDomainHandler handler = server.handlers.firstWhere(
+        (handler) => handler is CompletionDomainHandler,
+        orElse: () => null);
+    h3('Completion domain subscriptions');
+    ul(CompletionService.VALUES, (service) {
+      if (handler.subscriptions.contains(service)) {
+        buf.write('$service (has subscriptions)');
+      } else {
+        buf.write('$service (no subscriptions)');
+      }
+    });
   }
 }
diff --git a/pkg/analysis_server/lib/src/utilities/flutter.dart b/pkg/analysis_server/lib/src/utilities/flutter.dart
index 3c63b01..71fcd4a 100644
--- a/pkg/analysis_server/lib/src/utilities/flutter.dart
+++ b/pkg/analysis_server/lib/src/utilities/flutter.dart
@@ -3,430 +3,456 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analysis_server/src/services/correction/strings.dart';
+import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer_plugin/utilities/change_builder/change_builder_dart.dart';
 
-const WIDGETS_LIBRARY_URI = 'package:flutter/widgets.dart';
+class Flutter {
+  static const _nameCenter = 'Center';
+  static const _nameContainer = 'Container';
+  static const _namePadding = 'Padding';
+  static const _nameState = 'State';
+  static const _nameStatefulWidget = 'StatefulWidget';
+  static const _nameStatelessWidget = 'StatelessWidget';
+  static const _nameStreamBuilder = 'StreamBuilder';
+  static const _nameWidget = 'Widget';
 
-const _BASIC_URI = "package:flutter/src/widgets/basic.dart";
-const _CENTER_NAME = "Center";
-const _CONTAINER_NAME = "Container";
-const _CONTAINER_URI = "package:flutter/src/widgets/container.dart";
-const _PADDING_NAME = "Padding";
-const _STATE_NAME = "State";
-const _STATEFUL_WIDGET_NAME = "StatefulWidget";
-const _STATELESS_WIDGET_NAME = "StatelessWidget";
-const _STREAM_BUILDER_NAME = "StreamBuilder";
-const _STREAM_BUILDER_URI = "package:flutter/src/widgets/async.dart";
-const _WIDGET_NAME = "Widget";
-const _WIDGET_URI = "package:flutter/src/widgets/framework.dart";
-final _frameworkUri = Uri.parse('package:flutter/src/widgets/framework.dart');
+  static final mobile = Flutter._('flutter', 'package:flutter');
+  static final web = Flutter._('flutter_web', 'package:flutter_web');
 
-void convertChildToChildren(
-    InstanceCreationExpression childArg,
-    NamedExpression namedExp,
-    String eol,
-    Function getNodeText,
-    Function getLinePrefix,
-    Function getIndent,
-    Function getText,
-    Function _addInsertEdit,
-    Function _addRemoveEdit,
-    Function _addReplaceEdit,
-    Function rangeNode) {
-  int childLoc = namedExp.offset + 'child'.length;
-  _addInsertEdit(childLoc, 'ren');
-  int listLoc = childArg.offset;
-  String childArgSrc = getNodeText(childArg);
-  if (!childArgSrc.contains(eol)) {
-    _addInsertEdit(listLoc, '<Widget>[');
-    _addInsertEdit(listLoc + childArg.length, ']');
-  } else {
-    int newlineLoc = childArgSrc.lastIndexOf(eol);
-    if (newlineLoc == childArgSrc.length) {
-      newlineLoc -= 1;
+  static final _uriFlutterWebWidgets =
+      Uri.parse('package:flutter_web/widgets.dart');
+
+  final String packageName;
+  final String widgetsUri;
+
+  final Uri _uriAsync;
+  final Uri _uriBasic;
+  final Uri _uriContainer;
+  final Uri _uriFramework;
+  final Uri _uriWidgetsIcon;
+  final Uri _uriWidgetsText;
+
+  factory Flutter.of(AnalysisSession session) {
+    if (session.uriConverter.uriToPath(_uriFlutterWebWidgets) != null) {
+      return web;
     }
-    String indentOld = getLinePrefix(childArg.offset + 1 + newlineLoc);
-    String indentNew = '$indentOld${getIndent(1)}';
-    // The separator includes 'child:' but that has no newlines.
-    String separator =
-        getText(namedExp.offset, childArg.offset - namedExp.offset);
-    String prefix = separator.contains(eol) ? "" : "$eol$indentNew";
-    if (prefix.isEmpty) {
-      _addInsertEdit(namedExp.offset + 'child:'.length, ' <Widget>[');
-      _addRemoveEdit(new SourceRange(childArg.offset - 2, 2));
-    } else {
+    return mobile;
+  }
+
+  Flutter._(this.packageName, String uriPrefix)
+      : widgetsUri = '$uriPrefix/widgets.dart',
+        _uriAsync = Uri.parse('$uriPrefix/src/widgets/async.dart'),
+        _uriBasic = Uri.parse('$uriPrefix/src/widgets/basic.dart'),
+        _uriContainer = Uri.parse('$uriPrefix/src/widgets/container.dart'),
+        _uriFramework = Uri.parse('$uriPrefix/src/widgets/framework.dart'),
+        _uriWidgetsIcon = Uri.parse('$uriPrefix/src/widgets/icon.dart'),
+        _uriWidgetsText = Uri.parse('$uriPrefix/src/widgets/text.dart');
+
+  void convertChildToChildren(
+      InstanceCreationExpression childArg,
+      NamedExpression namedExp,
+      String eol,
+      Function getNodeText,
+      Function getLinePrefix,
+      Function getIndent,
+      Function getText,
+      Function _addInsertEdit,
+      Function _addRemoveEdit,
+      Function _addReplaceEdit,
+      Function rangeNode) {
+    int childLoc = namedExp.offset + 'child'.length;
+    _addInsertEdit(childLoc, 'ren');
+    int listLoc = childArg.offset;
+    String childArgSrc = getNodeText(childArg);
+    if (!childArgSrc.contains(eol)) {
       _addInsertEdit(listLoc, '<Widget>[');
-    }
-    String newChildArgSrc = childArgSrc.replaceAll(
-        new RegExp("^$indentOld", multiLine: true), "$indentNew");
-    newChildArgSrc = "$prefix$newChildArgSrc,$eol$indentOld]";
-    _addReplaceEdit(rangeNode(childArg), newChildArgSrc);
-  }
-}
-
-void convertChildToChildren2(
-    DartFileEditBuilder builder,
-    Expression childArg,
-    NamedExpression namedExp,
-    String eol,
-    Function getNodeText,
-    Function getLinePrefix,
-    Function getIndent,
-    Function getText,
-    Function rangeNode) {
-  int childLoc = namedExp.offset + 'child'.length;
-  builder.addSimpleInsertion(childLoc, 'ren');
-  int listLoc = childArg.offset;
-  String childArgSrc = getNodeText(childArg);
-  if (!childArgSrc.contains(eol)) {
-    builder.addSimpleInsertion(listLoc, '<Widget>[');
-    builder.addSimpleInsertion(listLoc + childArg.length, ']');
-  } else {
-    int newlineLoc = childArgSrc.lastIndexOf(eol);
-    if (newlineLoc == childArgSrc.length) {
-      newlineLoc -= 1;
-    }
-    String indentOld = getLinePrefix(childArg.offset + 1 + newlineLoc);
-    String indentNew = '$indentOld${getIndent(1)}';
-    // The separator includes 'child:' but that has no newlines.
-    String separator =
-        getText(namedExp.offset, childArg.offset - namedExp.offset);
-    String prefix = separator.contains(eol) ? "" : "$eol$indentNew";
-    if (prefix.isEmpty) {
-      builder.addSimpleInsertion(
-          namedExp.offset + 'child:'.length, ' <Widget>[');
-      builder.addDeletion(new SourceRange(childArg.offset - 2, 2));
+      _addInsertEdit(listLoc + childArg.length, ']');
     } else {
-      builder.addSimpleInsertion(listLoc, '<Widget>[');
+      int newlineLoc = childArgSrc.lastIndexOf(eol);
+      if (newlineLoc == childArgSrc.length) {
+        newlineLoc -= 1;
+      }
+      String indentOld = getLinePrefix(childArg.offset + 1 + newlineLoc);
+      String indentNew = '$indentOld${getIndent(1)}';
+      // The separator includes 'child:' but that has no newlines.
+      String separator =
+          getText(namedExp.offset, childArg.offset - namedExp.offset);
+      String prefix = separator.contains(eol) ? "" : "$eol$indentNew";
+      if (prefix.isEmpty) {
+        _addInsertEdit(namedExp.offset + 'child:'.length, ' <Widget>[');
+        _addRemoveEdit(new SourceRange(childArg.offset - 2, 2));
+      } else {
+        _addInsertEdit(listLoc, '<Widget>[');
+      }
+      String newChildArgSrc = childArgSrc.replaceAll(
+          new RegExp("^$indentOld", multiLine: true), "$indentNew");
+      newChildArgSrc = "$prefix$newChildArgSrc,$eol$indentOld]";
+      _addReplaceEdit(rangeNode(childArg), newChildArgSrc);
     }
-    String newChildArgSrc = childArgSrc.replaceAll(
-        new RegExp("^$indentOld", multiLine: true), "$indentNew");
-    newChildArgSrc = "$prefix$newChildArgSrc,$eol$indentOld]";
-    builder.addSimpleReplacement(rangeNode(childArg), newChildArgSrc);
   }
-}
 
-/**
- * Return the named expression representing the `child` argument of the given
- * [newExpr], or `null` if none.
- */
-NamedExpression findChildArgument(InstanceCreationExpression newExpr) =>
-    newExpr.argumentList.arguments
-        .firstWhere(isChildArgument, orElse: () => null);
-
-/**
- * Return the named expression representing the `children` argument of the
- * given [newExpr], or `null` if none.
- */
-NamedExpression findChildrenArgument(InstanceCreationExpression newExpr) =>
-    newExpr.argumentList.arguments
-        .firstWhere(isChildrenArgument, orElse: () => null);
-
-/**
- * Return the Flutter instance creation expression that is the value of the
- * 'child' argument of the given [newExpr], or null if none.
- */
-InstanceCreationExpression findChildWidget(InstanceCreationExpression newExpr) {
-  NamedExpression child = findChildArgument(newExpr);
-  return getChildWidget(child);
-}
-
-/**
- * If the given [node] is a simple identifier, find the named expression whose
- * name is the given [name] that is an argument to a Flutter instance creation
- * expression. Return null if any condition cannot be satisfied.
- */
-NamedExpression findNamedExpression(AstNode node, String name) {
-  if (node is! SimpleIdentifier) {
-    return null;
+  void convertChildToChildren2(
+      DartFileEditBuilder builder,
+      Expression childArg,
+      NamedExpression namedExp,
+      String eol,
+      Function getNodeText,
+      Function getLinePrefix,
+      Function getIndent,
+      Function getText,
+      Function rangeNode) {
+    int childLoc = namedExp.offset + 'child'.length;
+    builder.addSimpleInsertion(childLoc, 'ren');
+    int listLoc = childArg.offset;
+    String childArgSrc = getNodeText(childArg);
+    if (!childArgSrc.contains(eol)) {
+      builder.addSimpleInsertion(listLoc, '<Widget>[');
+      builder.addSimpleInsertion(listLoc + childArg.length, ']');
+    } else {
+      int newlineLoc = childArgSrc.lastIndexOf(eol);
+      if (newlineLoc == childArgSrc.length) {
+        newlineLoc -= 1;
+      }
+      String indentOld = getLinePrefix(childArg.offset + 1 + newlineLoc);
+      String indentNew = '$indentOld${getIndent(1)}';
+      // The separator includes 'child:' but that has no newlines.
+      String separator =
+          getText(namedExp.offset, childArg.offset - namedExp.offset);
+      String prefix = separator.contains(eol) ? "" : "$eol$indentNew";
+      if (prefix.isEmpty) {
+        builder.addSimpleInsertion(
+            namedExp.offset + 'child:'.length, ' <Widget>[');
+        builder.addDeletion(new SourceRange(childArg.offset - 2, 2));
+      } else {
+        builder.addSimpleInsertion(listLoc, '<Widget>[');
+      }
+      String newChildArgSrc = childArgSrc.replaceAll(
+          new RegExp("^$indentOld", multiLine: true), "$indentNew");
+      newChildArgSrc = "$prefix$newChildArgSrc,$eol$indentOld]";
+      builder.addSimpleReplacement(rangeNode(childArg), newChildArgSrc);
+    }
   }
-  SimpleIdentifier namedArg = node;
-  NamedExpression namedExp;
-  if (namedArg.parent is Label && namedArg.parent.parent is NamedExpression) {
-    namedExp = namedArg.parent.parent;
-    if (namedArg.name != name || namedExp.expression == null) {
+
+  /**
+   * Return the named expression representing the `child` argument of the given
+   * [newExpr], or `null` if none.
+   */
+  NamedExpression findChildArgument(InstanceCreationExpression newExpr) =>
+      newExpr.argumentList.arguments
+          .firstWhere(isChildArgument, orElse: () => null);
+
+  /**
+   * Return the named expression representing the `children` argument of the
+   * given [newExpr], or `null` if none.
+   */
+  NamedExpression findChildrenArgument(InstanceCreationExpression newExpr) =>
+      newExpr.argumentList.arguments
+          .firstWhere(isChildrenArgument, orElse: () => null);
+
+  /**
+   * Return the Flutter instance creation expression that is the value of the
+   * 'child' argument of the given [newExpr], or null if none.
+   */
+  InstanceCreationExpression findChildWidget(
+      InstanceCreationExpression newExpr) {
+    NamedExpression child = findChildArgument(newExpr);
+    return getChildWidget(child);
+  }
+
+  /**
+   * If the given [node] is a simple identifier, find the named expression whose
+   * name is the given [name] that is an argument to a Flutter instance creation
+   * expression. Return null if any condition cannot be satisfied.
+   */
+  NamedExpression findNamedExpression(AstNode node, String name) {
+    if (node is! SimpleIdentifier) {
       return null;
     }
-  } else {
-    return null;
-  }
-  if (namedExp.parent?.parent is! InstanceCreationExpression) {
-    return null;
-  }
-  InstanceCreationExpression newExpr = namedExp.parent.parent;
-  if (newExpr == null || !isWidgetCreation(newExpr)) {
-    return null;
-  }
-  return namedExp;
-}
-
-/**
- * Return the expression that is a Flutter Widget that is the value of the
- * given [child], or null if none.
- */
-Expression getChildWidget(NamedExpression child) {
-  Expression expression = child?.expression;
-  if (isWidgetExpression(expression)) {
-    return expression;
-  }
-  return null;
-}
-
-/**
- * Return the presentation for the given Flutter `Widget` creation [node].
- */
-String getWidgetPresentationText(InstanceCreationExpression node) {
-  ClassElement element = node.staticElement?.enclosingElement;
-  if (!isWidget(element)) {
-    return null;
-  }
-  List<Expression> arguments = node.argumentList.arguments;
-  if (_isExactWidget(
-      element, 'Icon', 'package:flutter/src/widgets/icon.dart')) {
-    if (arguments.isNotEmpty) {
-      String text = arguments[0].toString();
-      String arg = shorten(text, 32);
-      return 'Icon($arg)';
+    SimpleIdentifier namedArg = node;
+    NamedExpression namedExp;
+    if (namedArg.parent is Label && namedArg.parent.parent is NamedExpression) {
+      namedExp = namedArg.parent.parent;
+      if (namedArg.name != name || namedExp.expression == null) {
+        return null;
+      }
     } else {
-      return 'Icon';
+      return null;
     }
-  }
-  if (_isExactWidget(
-      element, 'Text', 'package:flutter/src/widgets/text.dart')) {
-    if (arguments.isNotEmpty) {
-      String text = arguments[0].toString();
-      String arg = shorten(text, 32);
-      return 'Text($arg)';
-    } else {
-      return 'Text';
+    if (namedExp.parent?.parent is! InstanceCreationExpression) {
+      return null;
     }
+    InstanceCreationExpression newExpr = namedExp.parent.parent;
+    if (newExpr == null || !isWidgetCreation(newExpr)) {
+      return null;
+    }
+    return namedExp;
   }
-  return element.name;
-}
 
-/**
- * Return the instance creation expression that surrounds the given
- * [node], if any, else null. The [node] may be the instance creation
- * expression itself or the identifier that names the constructor.
- */
-InstanceCreationExpression identifyNewExpression(AstNode node) {
-  InstanceCreationExpression newExpr;
-  if (node is SimpleIdentifier) {
-    if (node.parent is ConstructorName &&
-        node.parent.parent is InstanceCreationExpression) {
-      newExpr = node.parent.parent;
-    } else if (node.parent?.parent is ConstructorName &&
-        node.parent.parent?.parent is InstanceCreationExpression) {
-      newExpr = node.parent.parent.parent;
+  /**
+   * Return the expression that is a Flutter Widget that is the value of the
+   * given [child], or null if none.
+   */
+  Expression getChildWidget(NamedExpression child) {
+    Expression expression = child?.expression;
+    if (isWidgetExpression(expression)) {
+      return expression;
     }
-  } else if (node is InstanceCreationExpression) {
-    newExpr = node;
+    return null;
   }
-  return newExpr;
-}
 
-/**
- * Attempt to find and return the closest expression that encloses the [node]
- * and is an independent Flutter `Widget`.  Return `null` if nothing found.
- */
-Expression identifyWidgetExpression(AstNode node) {
-  for (; node != null; node = node.parent) {
-    if (isWidgetExpression(node)) {
-      var parent = node.parent;
-      if (parent is ArgumentList ||
-          parent is ListLiteral ||
-          parent is NamedExpression && parent.expression == node ||
-          parent is Statement) {
-        return node;
+  /**
+   * Return the presentation for the given Flutter `Widget` creation [node].
+   */
+  String getWidgetPresentationText(InstanceCreationExpression node) {
+    ClassElement element = node.staticElement?.enclosingElement;
+    if (!isWidget(element)) {
+      return null;
+    }
+    List<Expression> arguments = node.argumentList.arguments;
+    if (_isExactWidget(element, 'Icon', _uriWidgetsIcon)) {
+      if (arguments.isNotEmpty) {
+        String text = arguments[0].toString();
+        String arg = shorten(text, 32);
+        return 'Icon($arg)';
+      } else {
+        return 'Icon';
       }
     }
-    if (node is ArgumentList || node is Statement || node is FunctionBody) {
-      return null;
+    if (_isExactWidget(element, 'Text', _uriWidgetsText)) {
+      if (arguments.isNotEmpty) {
+        String text = arguments[0].toString();
+        String arg = shorten(text, 32);
+        return 'Text($arg)';
+      } else {
+        return 'Text';
+      }
     }
+    return element.name;
   }
-  return null;
-}
 
-/**
- * Return `true` is the given [argument] is the `child` argument.
- */
-bool isChildArgument(Expression argument) =>
-    argument is NamedExpression && argument.name.label.name == 'child';
-
-/**
- * Return `true` is the given [argument] is the `child` argument.
- */
-bool isChildrenArgument(Expression argument) =>
-    argument is NamedExpression && argument.name.label.name == 'children';
-
-/**
- * Return `true` if the given [type] is the Flutter class `StatefulWidget`.
- */
-bool isExactlyStatefulWidgetType(DartType type) {
-  return type is InterfaceType &&
-      _isExactWidget(type.element, _STATEFUL_WIDGET_NAME, _WIDGET_URI);
-}
-
-/**
- * Return `true` if the given [type] is the Flutter class `StatelessWidget`.
- */
-bool isExactlyStatelessWidgetType(DartType type) {
-  return type is InterfaceType &&
-      _isExactWidget(type.element, _STATELESS_WIDGET_NAME, _WIDGET_URI);
-}
-
-/// Return `true` if the given [element] is the Flutter class `State`.
-bool isExactState(ClassElement element) {
-  return _isExactWidget(element, _STATE_NAME, _WIDGET_URI);
-}
-
-/**
- * Return `true` if the given [type] is the Flutter class `Center`.
- */
-bool isExactWidgetTypeCenter(DartType type) {
-  return type is InterfaceType &&
-      _isExactWidget(type.element, _CENTER_NAME, _BASIC_URI);
-}
-
-/**
- * Return `true` if the given [type] is the Flutter class `Container`.
- */
-bool isExactWidgetTypeContainer(DartType type) {
-  return type is InterfaceType &&
-      _isExactWidget(type.element, _CONTAINER_NAME, _CONTAINER_URI);
-}
-
-/**
- * Return `true` if the given [type] is the Flutter class `Padding`.
- */
-bool isExactWidgetTypePadding(DartType type) {
-  return type is InterfaceType &&
-      _isExactWidget(type.element, _PADDING_NAME, _BASIC_URI);
-}
-
-/**
- * Return `true` if the given [type] is the Flutter class `StreamBuilder`.
- */
-bool isExactWidgetTypeStreamBuilder(DartType type) {
-  return type is InterfaceType &&
-      _isExactWidget(type.element, _STREAM_BUILDER_NAME, _STREAM_BUILDER_URI);
-}
-
-/**
- * Return `true` if the given [type] is the Flutter class `Widget`, or its
- * subtype.
- */
-bool isListOfWidgetsType(DartType type) {
-  return type is InterfaceType &&
-      type.element.library.isDartCore &&
-      type.element.name == 'List' &&
-      type.typeArguments.length == 1 &&
-      isWidgetType(type.typeArguments[0]);
-}
-
-/// Return `true` if the given [element] has the Flutter class `State` as
-/// a superclass.
-bool isState(ClassElement element) {
-  return _hasSupertype(element, _frameworkUri, _STATE_NAME);
-}
-
-/**
- * Return `true` if the given [element] is a [ClassElement] that extends
- * the Flutter class `StatefulWidget`.
- */
-bool isStatefulWidgetDeclaration(Element element) {
-  if (element is ClassElement) {
-    return isExactlyStatefulWidgetType(element.supertype);
+  /**
+   * Return the instance creation expression that surrounds the given
+   * [node], if any, else null. The [node] may be the instance creation
+   * expression itself or the identifier that names the constructor.
+   */
+  InstanceCreationExpression identifyNewExpression(AstNode node) {
+    InstanceCreationExpression newExpr;
+    if (node is SimpleIdentifier) {
+      if (node.parent is ConstructorName &&
+          node.parent.parent is InstanceCreationExpression) {
+        newExpr = node.parent.parent;
+      } else if (node.parent?.parent is ConstructorName &&
+          node.parent.parent?.parent is InstanceCreationExpression) {
+        newExpr = node.parent.parent.parent;
+      }
+    } else if (node is InstanceCreationExpression) {
+      newExpr = node;
+    }
+    return newExpr;
   }
-  return false;
-}
 
-/**
- * Return `true` if the given [element] is the Flutter class `Widget`, or its
- * subtype.
- */
-bool isWidget(ClassElement element) {
-  if (element == null) {
+  /**
+   * Attempt to find and return the closest expression that encloses the [node]
+   * and is an independent Flutter `Widget`.  Return `null` if nothing found.
+   */
+  Expression identifyWidgetExpression(AstNode node) {
+    for (; node != null; node = node.parent) {
+      if (isWidgetExpression(node)) {
+        var parent = node.parent;
+        if (parent is ArgumentList ||
+            parent is ListLiteral ||
+            parent is NamedExpression && parent.expression == node ||
+            parent is Statement) {
+          return node;
+        }
+      }
+      if (node is ArgumentList || node is Statement || node is FunctionBody) {
+        return null;
+      }
+    }
+    return null;
+  }
+
+  /**
+   * Return `true` is the given [argument] is the `child` argument.
+   */
+  bool isChildArgument(Expression argument) =>
+      argument is NamedExpression && argument.name.label.name == 'child';
+
+  /**
+   * Return `true` is the given [argument] is the `child` argument.
+   */
+  bool isChildrenArgument(Expression argument) =>
+      argument is NamedExpression && argument.name.label.name == 'children';
+
+  /**
+   * Return `true` if the given [type] is the Flutter class `StatefulWidget`.
+   */
+  bool isExactlyStatefulWidgetType(DartType type) {
+    return type is InterfaceType &&
+        _isExactWidget(type.element, _nameStatefulWidget, _uriFramework);
+  }
+
+  /**
+   * Return `true` if the given [type] is the Flutter class `StatelessWidget`.
+   */
+  bool isExactlyStatelessWidgetType(DartType type) {
+    return type is InterfaceType &&
+        _isExactWidget(type.element, _nameStatelessWidget, _uriFramework);
+  }
+
+  /// Return `true` if the given [element] is the Flutter class `State`.
+  bool isExactState(ClassElement element) {
+    return _isExactWidget(element, _nameState, _uriFramework);
+  }
+
+  /**
+   * Return `true` if the given [type] is the Flutter class `Center`.
+   */
+  bool isExactWidgetTypeCenter(DartType type) {
+    return type is InterfaceType &&
+        _isExactWidget(type.element, _nameCenter, _uriBasic);
+  }
+
+  /**
+   * Return `true` if the given [type] is the Flutter class `Container`.
+   */
+  bool isExactWidgetTypeContainer(DartType type) {
+    return type is InterfaceType &&
+        _isExactWidget(type.element, _nameContainer, _uriContainer);
+  }
+
+  /**
+   * Return `true` if the given [type] is the Flutter class `Padding`.
+   */
+  bool isExactWidgetTypePadding(DartType type) {
+    return type is InterfaceType &&
+        _isExactWidget(type.element, _namePadding, _uriBasic);
+  }
+
+  /**
+   * Return `true` if the given [type] is the Flutter class `StreamBuilder`.
+   */
+  bool isExactWidgetTypeStreamBuilder(DartType type) {
+    return type is InterfaceType &&
+        _isExactWidget(type.element, _nameStreamBuilder, _uriAsync);
+  }
+
+  /**
+   * Return `true` if the given [type] is the Flutter class `Widget`, or its
+   * subtype.
+   */
+  bool isListOfWidgetsType(DartType type) {
+    return type is InterfaceType &&
+        type.element.library.isDartCore &&
+        type.element.name == 'List' &&
+        type.typeArguments.length == 1 &&
+        isWidgetType(type.typeArguments[0]);
+  }
+
+  /// Return `true` if the given [element] has the Flutter class `State` as
+  /// a superclass.
+  bool isState(ClassElement element) {
+    return _hasSupertype(element, _uriFramework, _nameState);
+  }
+
+  /**
+   * Return `true` if the given [element] is a [ClassElement] that extends
+   * the Flutter class `StatefulWidget`.
+   */
+  bool isStatefulWidgetDeclaration(Element element) {
+    if (element is ClassElement) {
+      return isExactlyStatefulWidgetType(element.supertype);
+    }
     return false;
   }
-  if (_isExactWidget(element, _WIDGET_NAME, _WIDGET_URI)) {
-    return true;
-  }
-  for (InterfaceType type in element.allSupertypes) {
-    if (_isExactWidget(type.element, _WIDGET_NAME, _WIDGET_URI)) {
+
+  /**
+   * Return `true` if the given [element] is the Flutter class `Widget`, or its
+   * subtype.
+   */
+  bool isWidget(ClassElement element) {
+    if (element == null) {
+      return false;
+    }
+    if (_isExactWidget(element, _nameWidget, _uriFramework)) {
       return true;
     }
-  }
-  return false;
-}
-
-/**
- * Return `true` if the given [expr] is a constructor invocation for a
- * class that has the Flutter class `Widget` as a superclass.
- */
-bool isWidgetCreation(InstanceCreationExpression expr) {
-  ClassElement element = expr?.staticElement?.enclosingElement;
-  return isWidget(element);
-}
-
-/**
- * Return `true` if the given [node] is the Flutter class `Widget`, or its
- * subtype.
- */
-bool isWidgetExpression(AstNode node) {
-  if (node == null) {
-    return false;
-  }
-  if (node.parent is TypeName || node.parent?.parent is TypeName) {
-    return false;
-  }
-  if (node.parent is ConstructorName) {
-    return false;
-  }
-  if (node is NamedExpression) {
-    return false;
-  }
-  if (node is Expression) {
-    return isWidgetType(node.staticType);
-  }
-  return false;
-}
-
-/**
- * Return `true` if the given [type] is the Flutter class `Widget`, or its
- * subtype.
- */
-bool isWidgetType(DartType type) {
-  return type is InterfaceType && isWidget(type.element);
-}
-
-/// Return `true` if the given [element] has a supertype with the [requiredName]
-/// defined in the file with the [requiredUri].
-bool _hasSupertype(ClassElement element, Uri requiredUri, String requiredName) {
-  if (element == null) {
-    return false;
-  }
-  for (InterfaceType type in element.allSupertypes) {
-    if (type.name == requiredName) {
-      Uri uri = type.element.source.uri;
-      if (uri == requiredUri) {
+    for (InterfaceType type in element.allSupertypes) {
+      if (_isExactWidget(type.element, _nameWidget, _uriFramework)) {
         return true;
       }
     }
+    return false;
   }
-  return false;
-}
 
-/**
- * Return `true` if the given [element] is the exact [type] defined in the
- * file with the given [uri].
- */
-bool _isExactWidget(ClassElement element, String type, String uri) {
-  return element != null &&
-      element.name == type &&
-      element.source.uri.toString() == uri;
+  /**
+   * Return `true` if the given [expr] is a constructor invocation for a
+   * class that has the Flutter class `Widget` as a superclass.
+   */
+  bool isWidgetCreation(InstanceCreationExpression expr) {
+    ClassElement element = expr?.staticElement?.enclosingElement;
+    return isWidget(element);
+  }
+
+  /**
+   * Return `true` if the given [node] is the Flutter class `Widget`, or its
+   * subtype.
+   */
+  bool isWidgetExpression(AstNode node) {
+    if (node == null) {
+      return false;
+    }
+    if (node.parent is TypeName || node.parent?.parent is TypeName) {
+      return false;
+    }
+    if (node.parent is ConstructorName) {
+      return false;
+    }
+    if (node is NamedExpression) {
+      return false;
+    }
+    if (node is Expression) {
+      return isWidgetType(node.staticType);
+    }
+    return false;
+  }
+
+  /**
+   * Return `true` if the given [type] is the Flutter class `Widget`, or its
+   * subtype.
+   */
+  bool isWidgetType(DartType type) {
+    return type is InterfaceType && isWidget(type.element);
+  }
+
+  /// Return `true` if the given [element] has a supertype with the [requiredName]
+  /// defined in the file with the [requiredUri].
+  bool _hasSupertype(
+      ClassElement element, Uri requiredUri, String requiredName) {
+    if (element == null) {
+      return false;
+    }
+    for (InterfaceType type in element.allSupertypes) {
+      if (type.name == requiredName) {
+        Uri uri = type.element.source.uri;
+        if (uri == requiredUri) {
+          return true;
+        }
+      }
+    }
+    return false;
+  }
+
+  /**
+   * Return `true` if the given [element] is the exact [type] defined in the
+   * file with the given [uri].
+   */
+  bool _isExactWidget(ClassElement element, String type, Uri uri) {
+    return element != null && element.name == type && element.source.uri == uri;
+  }
 }
diff --git a/pkg/analysis_server/lib/src/utilities/yaml_node_locator.dart b/pkg/analysis_server/lib/src/utilities/yaml_node_locator.dart
new file mode 100644
index 0000000..480bb4e
--- /dev/null
+++ b/pkg/analysis_server/lib/src/utilities/yaml_node_locator.dart
@@ -0,0 +1,68 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:meta/meta.dart';
+import 'package:source_span/src/span.dart';
+import 'package:yaml/yaml.dart';
+
+/// An object used to locate the [YamlNode] associated with a source range.
+/// More specifically, it will return the deepest [YamlNode] which completely
+/// encompasses the specified range.
+class YamlNodeLocator {
+  /// The inclusive start offset of the range used to identify the node.
+  int _startOffset = 0;
+
+  /// The inclusive end offset of the range used to identify the node.
+  int _endOffset = 0;
+
+  /// Initialize a newly created locator to locate the deepest [YamlNode] for
+  /// which `node.offset <= [start]` and `[end] < node.end`.
+  ///
+  /// If the [end] offset is not provided, then it is considered the same as the
+  /// [start] offset.
+  YamlNodeLocator({@required int start, int end})
+      : this._startOffset = start,
+        this._endOffset = end ?? start;
+
+  /// Search within the given Yaml [node] and return the path to the most deeply
+  /// nested node that includes the whole target range, or an empty list if no
+  /// node was found. The path is represented by all of the elements from the
+  /// starting [node] to the most deeply nested node, in reverse order.
+  List<YamlNode> searchWithin(YamlNode node) {
+    List<YamlNode> path = [];
+    _searchWithin(path, node);
+    return path;
+  }
+
+  void _searchWithin(List<YamlNode> path, YamlNode node) {
+    SourceSpan span = node.span;
+    if (span.start.offset > _endOffset || span.end.offset < _startOffset) {
+      return;
+    }
+    if (node is YamlList) {
+      for (YamlNode element in node.nodes) {
+        _searchWithin(path, element);
+        if (path.isNotEmpty) {
+          path.add(node);
+          return;
+        }
+      }
+    } else if (node is YamlMap) {
+      Map<dynamic, YamlNode> nodeMap = node.nodes;
+      for (YamlNode key in nodeMap.keys) {
+        _searchWithin(path, key);
+        if (path.isNotEmpty) {
+          path.add(node);
+          return;
+        }
+        _searchWithin(path, nodeMap[key]);
+        if (path.isNotEmpty) {
+          path.add(node);
+          return;
+        }
+      }
+    }
+    path.add(node);
+  }
+}
diff --git a/pkg/analysis_server/test/analysis/notification_errors_test.dart b/pkg/analysis_server/test/analysis/notification_errors_test.dart
index a270f6c..ffec72b 100644
--- a/pkg/analysis_server/test/analysis/notification_errors_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_errors_test.dart
@@ -66,6 +66,65 @@
     expect(error.type, AnalysisErrorType.STATIC_WARNING);
   }
 
+  test_androidManifestFile() async {
+    String filePath = join(projectPath, 'android', 'AndroidManifest.xml');
+    String manifestFile = newFile(filePath, content: '''
+<manifest
+    xmlns:android="http://schemas.android.com/apk/res/android">
+    <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
+    <uses-feature android:name="android.software.home_screen" />
+</manifest>
+''').path;
+    newFile(join(projectPath, 'analysis_options.yaml'), content: '''
+analyzer:
+  optional-checks:
+    chrome-os-manifest-checks: true
+''');
+
+    Request request =
+        new AnalysisSetAnalysisRootsParams([projectPath], []).toRequest('0');
+    handleSuccessfulRequest(request);
+    await waitForTasksFinished();
+    await pumpEventQueue();
+    //
+    // Verify the error result.
+    //
+    List<AnalysisError> errors = filesErrors[manifestFile];
+    expect(errors, hasLength(1));
+    AnalysisError error = errors[0];
+    expect(error.location.file, filePath);
+    expect(error.severity, AnalysisErrorSeverity.WARNING);
+    expect(error.type, AnalysisErrorType.STATIC_WARNING);
+  }
+
+  test_androidManifestFile_dotDirectoryIgnored() async {
+    String filePath =
+        join(projectPath, 'ios', '.symlinks', 'AndroidManifest.xml');
+    String manifestFile = newFile(filePath, content: '''
+<manifest
+    xmlns:android="http://schemas.android.com/apk/res/android">
+    <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
+    <uses-feature android:name="android.software.home_screen" />
+</manifest>
+''').path;
+    newFile(join(projectPath, 'analysis_options.yaml'), content: '''
+analyzer:
+  optional-checks:
+    chrome-os-manifest-checks: true
+''');
+
+    Request request =
+        new AnalysisSetAnalysisRootsParams([projectPath], []).toRequest('0');
+    handleSuccessfulRequest(request);
+    await waitForTasksFinished();
+    await pumpEventQueue();
+    //
+    // Verify that the file wasn't analyzed.
+    //
+    List<AnalysisError> errors = filesErrors[manifestFile];
+    expect(errors, isNull);
+  }
+
   test_importError() async {
     createProject();
 
diff --git a/pkg/analysis_server/test/analysis/notification_highlights2_test.dart b/pkg/analysis_server/test/analysis/notification_highlights2_test.dart
index 4aa6ddc..a7c001b 100644
--- a/pkg/analysis_server/test/analysis/notification_highlights2_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_highlights2_test.dart
@@ -1178,8 +1178,8 @@
   @failingTest
   test_KEYWORD_awaitForIn_map() async {
     addTestFile('''
-f(a, b) async {
-  return {await for(var b in a) b};
+f(a) async {
+  return {await for(var b in a) b : 0};
 }
 ''');
     await prepareHighlights();
@@ -1191,7 +1191,7 @@
   @failingTest
   test_KEYWORD_awaitForIn_set() async {
     addTestFile('''
-f(a, b) async {
+f(a) async {
   return {await for(var b in a) b};
 }
 ''');
diff --git a/pkg/analysis_server/test/analysis/notification_highlights_test.dart b/pkg/analysis_server/test/analysis/notification_highlights_test.dart
index b992bc9..78517c2 100644
--- a/pkg/analysis_server/test/analysis/notification_highlights_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_highlights_test.dart
@@ -1027,8 +1027,8 @@
   @failingTest
   test_KEYWORD_awaitForIn_map() async {
     addTestFile('''
-f(a, b) async {
-  return {await for(var b in a) b};
+f(a) async {
+  return {await for(var b in a) b : 0};
 }
 ''');
     await prepareHighlights();
@@ -1040,7 +1040,7 @@
   @failingTest
   test_KEYWORD_awaitForIn_set() async {
     addTestFile('''
-f(a, b) async {
+f(a) async {
   return {await for(var b in a) b};
 }
 ''');
diff --git a/pkg/analysis_server/test/analysis/notification_navigation_test.dart b/pkg/analysis_server/test/analysis/notification_navigation_test.dart
index 7a7aa0f..4f34392 100644
--- a/pkg/analysis_server/test/analysis/notification_navigation_test.dart
+++ b/pkg/analysis_server/test/analysis/notification_navigation_test.dart
@@ -855,6 +855,14 @@
     assertHasFileTarget(unitFile, 0, 0);
   }
 
+  test_string_part_invalidUri() async {
+    addTestFile('''
+part ":[invalid]";
+''');
+    await prepareNavigation();
+    assertNoRegionString('":[invalid]"');
+  }
+
   Future<void> test_string_part_unresolvedUri() async {
     addTestFile('''
 library lib;
diff --git a/pkg/analysis_server/test/analysis_abstract.dart b/pkg/analysis_server/test/analysis_abstract.dart
index 6135864..f4593b4 100644
--- a/pkg/analysis_server/test/analysis_abstract.dart
+++ b/pkg/analysis_server/test/analysis_abstract.dart
@@ -23,7 +23,6 @@
 import 'package:analyzer_plugin/protocol/protocol.dart' as plugin;
 import 'package:analyzer_plugin/protocol/protocol_generated.dart' as plugin;
 import 'package:analyzer_plugin/src/protocol/protocol_internal.dart' as plugin;
-import 'package:plugin/manager.dart';
 import 'package:test/test.dart';
 import 'package:watcher/watcher.dart';
 
@@ -108,11 +107,6 @@
 
   AnalysisServer createAnalysisServer() {
     //
-    // Process plugins
-    //
-    ExtensionManager manager = new ExtensionManager();
-    manager.processPlugins(AnalysisEngine.instance.requiredPlugins);
-    //
     // Create an SDK in the mock file system.
     //
     new MockSdk(
diff --git a/pkg/analysis_server/test/completion_test_support.dart b/pkg/analysis_server/test/completion_test_support.dart
index 0af04a9..8588391 100644
--- a/pkg/analysis_server/test/completion_test_support.dart
+++ b/pkg/analysis_server/test/completion_test_support.dart
@@ -13,7 +13,7 @@
 /**
  * A base class for classes containing completion tests.
  */
-class CompletionTestCase extends CompletionDomainHandlerTest {
+class CompletionTestCase extends CompletionDomainHandlerListTokenDetailsTest {
   static const String CURSOR_MARKER = '!';
 
   List get suggestedCompletions => suggestions
diff --git a/pkg/analysis_server/test/constants.dart b/pkg/analysis_server/test/constants.dart
index 8b0282c..e6bae68 100644
--- a/pkg/analysis_server/test/constants.dart
+++ b/pkg/analysis_server/test/constants.dart
@@ -20,4 +20,5 @@
 const String START_LINE = 'startLine';
 const String SUBSCRIPTIONS = 'subscriptions';
 const String TYPE = 'type';
+const String URL = 'url';
 const String VERSION = 'version';
diff --git a/pkg/analysis_server/test/context_manager_test.dart b/pkg/analysis_server/test/context_manager_test.dart
index 4a7e95d..88938f1 100644
--- a/pkg/analysis_server/test/context_manager_test.dart
+++ b/pkg/analysis_server/test/context_manager_test.dart
@@ -17,6 +17,7 @@
 import 'package:analyzer/src/dart/analysis/driver.dart';
 import 'package:analyzer/src/dart/analysis/file_state.dart';
 import 'package:analyzer/src/dart/analysis/performance_logger.dart';
+import 'package:analyzer/src/dart/analysis/restricted_analysis_context.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/engine.dart' hide AnalysisResult;
 import 'package:analyzer/src/generated/sdk.dart';
@@ -30,7 +31,6 @@
 import 'package:linter/src/rules.dart';
 import 'package:linter/src/rules/avoid_as.dart';
 import 'package:path/path.dart' as path;
-import 'package:plugin/manager.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:watcher/watcher.dart';
@@ -1722,9 +1722,6 @@
       .firstWhere((ErrorProcessor p) => p.appliesTo(error), orElse: () => null);
 
   void processRequiredPlugins() {
-    ExtensionManager manager = new ExtensionManager();
-    manager.processPlugins(AnalysisEngine.instance.requiredPlugins);
-
     registerLintRules();
   }
 
@@ -1981,7 +1978,9 @@
     String sdkExtPath = '$projPath/sdk_ext';
     newFile('$projPath/test', content: 'test.dart');
     newFile('$sdkExtPath/entry.dart');
-    List<int> bytes = new SummaryBuilder([], null).build();
+    List<int> bytes = new SummaryBuilder(
+            [], RestrictedAnalysisContext(analysisOptions, null, null))
+        .build();
     newFileWithBytes('$projPath/sdk.ds', bytes);
     // Setup _embedder.yaml.
     newFile('$libPath/_embedder.yaml', content: r'''
@@ -2045,8 +2044,10 @@
 
     expect(
         lintNames,
-        unorderedEquals(
-            ['avoid_as' /* embedder */, 'camel_case_types' /* options */]));
+        unorderedEquals([
+          'avoid_as' /* embedder */,
+          'camel_case_types' /* options */
+        ]));
 
     // Sanity check embedder libs.
     var source = sourceFactory.forUri('dart:foobar');
@@ -2498,20 +2499,12 @@
 
     ContextBuilder builder =
         createContextBuilder(folder, options, useSummaries: true);
-    AnalysisContext context = builder.buildContext(folder.path);
-    SourceFactory sourceFactory = context.sourceFactory;
-    AnalysisOptions analysisOptions = context.analysisOptions;
-    context.dispose();
+    builder.analysisDriverScheduler = scheduler;
+    builder.byteStore = MemoryByteStore();
+    builder.performanceLog = logger;
+    builder.fileContentOverlay = FileContentOverlay();
+    currentDriver = builder.buildDriver(contextRoot);
 
-    currentDriver = new AnalysisDriver(
-        scheduler,
-        logger,
-        resourceProvider,
-        new MemoryByteStore(),
-        new FileContentOverlay(),
-        contextRoot,
-        sourceFactory,
-        analysisOptions);
     driverMap[path] = currentDriver;
     currentDriver.exceptions.listen((ExceptionResult result) {
       AnalysisEngine.instance.logger
diff --git a/pkg/analysis_server/test/domain_completion_test.dart b/pkg/analysis_server/test/domain_completion_test.dart
index fa74e67..dc47e1d 100644
--- a/pkg/analysis_server/test/domain_completion_test.dart
+++ b/pkg/analysis_server/test/domain_completion_test.dart
@@ -23,12 +23,14 @@
 
 main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(CompletionDomainHandlerTest);
+    defineReflectiveTests(CompletionDomainHandlerGetSuggestionsTest);
+    defineReflectiveTests(CompletionDomainHandlerListTokenDetailsTest);
   });
 }
 
 @reflectiveTest
-class CompletionDomainHandlerTest extends AbstractCompletionDomainTest {
+class CompletionDomainHandlerGetSuggestionsTest
+    extends AbstractCompletionDomainTest {
   test_ArgumentList_constructor_named_fieldFormalParam() async {
     // https://github.com/dart-lang/sdk/issues/31023
     addTestFile('''
@@ -863,6 +865,413 @@
   }
 }
 
+@reflectiveTest
+class CompletionDomainHandlerListTokenDetailsTest
+    extends AbstractCompletionDomainTest {
+  String testFileUri;
+
+  void expectTokens(String content, List<TokenDetails> expectedTokens) async {
+    newFile(testFile, content: content);
+    Request request =
+        new CompletionListTokenDetailsParams(testFile).toRequest('0');
+    Response response = await waitResponse(request);
+    List<Map<String, dynamic>> tokens = response.result['tokens'];
+    _compareTokens(tokens, expectedTokens);
+  }
+
+  @override
+  void setUp() {
+    super.setUp();
+    testFileUri = toUriStr(testFile);
+  }
+
+  test_classDeclaration() async {
+    await expectTokens('''
+class A {}
+class B extends A {}
+class C implements B {}
+class D with C {}
+''', [
+      token('class', null, null),
+      token('A', 'Type',
+          ['declaration']), //token('A', 'dart:core;Type', ['declaration']),
+      token('{', null, null),
+      token('}', null, null),
+      token('class', null, null),
+      token('B', 'Type',
+          ['declaration']), //token('B', 'dart:core;Type', ['declaration']),
+      token('extends', null, null),
+      token('A', 'dart:core;Type<A>', [
+        'reference'
+      ]), //token('A', 'dart:core;Type<$testFileUri;A>', ['reference']),
+      token('{', null, null),
+      token('}', null, null),
+      token('class', null, null),
+      token('C', 'Type',
+          ['declaration']), //token('C', 'dart:core;Type', ['declaration']),
+      token('implements', null, null),
+      token('B', 'dart:core;Type<B>', [
+        'reference'
+      ]), //token('B', 'dart:core;Type<$testFileUri;B>', ['reference']),
+      token('{', null, null),
+      token('}', null, null),
+      token('class', null, null),
+      token('D', 'Type',
+          ['declaration']), //token('D', 'dart:core;Type', ['declaration']),
+      token('with', null, null),
+      token('C', 'dart:core;Type<C>', [
+        'reference'
+      ]), //token('C', 'dart:core;Type<$testFileUri;C>', ['reference']),
+      token('{', null, null),
+      token('}', null, null),
+    ]);
+  }
+
+  test_genericType() async {
+    await expectTokens('''
+List<int> x = null;
+''', [
+      token('List', 'dart:core;Type<List>', [
+        'reference'
+      ]), //token('List', 'dart:core;Type<dart:core;List>', ['reference']),
+      token('<', null, null),
+      token('int', 'dart:core;Type<int>', [
+        'reference'
+      ]), //token('int', 'dart:core;Type<dart:core;int>', ['reference']),
+      token('>', null, null),
+      token('x', 'List',
+          ['declaration']), //token('x', 'dart:core;List', ['declaration']),
+      token('=', null, null),
+      token('null', null, null),
+      token(';', null, null),
+    ]);
+  }
+
+  test_getterInvocation() async {
+    await expectTokens('''
+var x = 'a'.length;
+''', [
+      token('var', null, null),
+      token('x', 'int',
+          ['declaration']), //token('x', 'dart:core;int', ['declaration']),
+      token('=', null, null),
+      token("'a'", 'String', null), //token("'a'", 'dart:core;String', null),
+      token('.', null, null),
+      token('length', 'int',
+          ['reference']), //token('length', 'dart:core;int', ['reference']),
+      token(';', null, null),
+    ]);
+  }
+
+  test_literal_bool() async {
+    await expectTokens('''
+var x = true;
+''', [
+      token('var', null, null),
+      token('x', 'bool',
+          ['declaration']), //token('x', 'dart:core;bool', ['declaration']),
+      token('=', null, null),
+      token('true', 'bool', null), //token('true', 'dart:core;bool', null),
+      token(';', null, null),
+    ]);
+  }
+
+  test_literal_double() async {
+    await expectTokens('''
+var x = 3.4;
+''', [
+      token('var', null, null),
+      token('x', 'double',
+          ['declaration']), //token('x', 'dart:core;double', ['declaration']),
+      token('=', null, null),
+      token('3.4', 'double', null), //token('3.4', 'dart:core;double', null),
+      token(';', null, null),
+    ]);
+  }
+
+  test_literal_int() async {
+    await expectTokens('''
+var x = 7;
+''', [
+      token('var', null, null),
+      token('x', 'int',
+          ['declaration']), //token('x', 'dart:core;int', ['declaration']),
+      token('=', null, null),
+      token('7', 'int', null), //token('7', 'dart:core;int', null),
+      token(';', null, null),
+    ]);
+  }
+
+  test_literal_list() async {
+    await expectTokens('''
+var x = <int>[];
+''', [
+      token('var', null, null),
+      token('x', 'List',
+          ['declaration']), //token('x', 'dart:core;List', ['declaration']),
+      token('=', null, null),
+      token('<', null, null),
+      token("int", 'dart:core;Type<int>', [
+        'reference'
+      ]), //token("int", 'dart:core;Type<dart:core;int>', ['reference']),
+      token('>', null, null),
+      token('[', null, null),
+      token(']', null, null),
+      token(';', null, null),
+    ]);
+  }
+
+  test_literal_map() async {
+    await expectTokens('''
+var x = <int, int>{};
+''', [
+      token('var', null, null),
+      token('x', 'Map',
+          ['declaration']), //token('x', 'dart:core;Map', ['declaration']),
+      token('=', null, null),
+      token('<', null, null),
+      token("int", 'dart:core;Type<int>', [
+        'reference'
+      ]), //token("int", 'dart:core;Type<dart:core;int>', ['reference']),
+//      token(',', null, null),
+      token("int", 'dart:core;Type<int>', [
+        'reference'
+      ]), //token("int", 'dart:core;Type<dart:core;int>', ['reference']),
+      token('>', null, null),
+      token('{', null, null),
+      token('}', null, null),
+      token(';', null, null),
+    ]);
+  }
+
+  test_literal_null() async {
+    await expectTokens('''
+var x = null;
+''', [
+      token('var', null, null),
+      token('x', 'dynamic', ['declaration']),
+      token('=', null, null),
+      token('null', null, null),
+      token(';', null, null),
+    ]);
+  }
+
+  test_literal_set() async {
+    await expectTokens('''
+var x = <int>{};
+''', [
+      token('var', null, null),
+      token('x', 'Set',
+          ['declaration']), //token('x', 'dart:core;Set', ['declaration']),
+      token('=', null, null),
+      token('<', null, null),
+      token("int", 'dart:core;Type<int>', [
+        'reference'
+      ]), //token("int", 'dart:core;Type<dart:core;int>', ['reference']),
+      token('>', null, null),
+      token('{', null, null),
+      token('}', null, null),
+      token(';', null, null),
+    ]);
+  }
+
+  test_literal_string() async {
+    await expectTokens('''
+var x = 'a';
+''', [
+      token('var', null, null),
+      token('x', 'String',
+          ['declaration']), //token('x', 'dart:core;String', ['declaration']),
+      token('=', null, null),
+      token("'a'", 'String', null), //token("'a'", 'dart:core;String', null),
+      token(';', null, null),
+    ]);
+  }
+
+  test_methodDeclaration() async {
+    await expectTokens('''
+class A {
+  String c(int x, int y) {}
+}
+''', [
+      token('class', null, null),
+      token('A', 'Type',
+          ['declaration']), //token('A', 'dart:core;Type', ['declaration']),
+      token('{', null, null),
+      token('String', 'dart:core;Type<String>', [
+        'reference'
+      ]), //token('String', 'dart:core;Type<dart:core;String>', ['reference']),
+      token('c',
+          'String Function(int, int)', //'dart:core;String Function(dart:core;int, dart:core;int)',
+          ['declaration']),
+      token('(', null, null),
+      token('int', 'dart:core;Type<int>', [
+        'reference'
+      ]), //token('int', 'dart:core;Type<dart:core;int>', ['reference']),
+      token('x', 'int',
+          ['declaration']), //token('x', 'dart:core;int', ['declaration']),
+//      token(',', null, null),
+      token('int', 'dart:core;Type<int>', [
+        'reference'
+      ]), //token('int', 'dart:core;Type<dart:core;int>', ['reference']),
+      token('y', 'int',
+          ['declaration']), //token('y', 'dart:core;int', ['declaration']),
+      token(')', null, null),
+      token('{', null, null),
+      token('}', null, null),
+      token('}', null, null),
+    ]);
+  }
+
+  test_methodInvocation() async {
+    await expectTokens('''
+var x = 'radar'.indexOf('r', 1);
+''', [
+      token('var', null, null),
+      token('x', 'int',
+          ['declaration']), //token('x', 'dart:core;int', ['declaration']),
+      token('=', null, null),
+      token("'radar'", 'String',
+          null), //token("'radar'", 'dart:core;String', null),
+      token('.', null, null),
+      token('indexOf',
+          'int Function(Pattern, int)', //'dart:core;int Function(dart:core;Pattern, dart:core;int)',
+          ['reference']),
+      token('(', null, null),
+      token("'r'", 'String', null), //token("'r'", 'dart:core;String', null),
+//      token(',', null, null),
+      token('1', 'int', null), //token('1', 'dart:core;int', null),
+      token(')', null, null),
+      token(';', null, null),
+    ]);
+  }
+
+  test_mixinDeclaration() async {
+    await expectTokens('''
+class A {}
+class B {}
+mixin D on A implements B {}
+''', [
+      token('class', null, null),
+      token('A', 'Type',
+          ['declaration']), //token('A', 'dart:core;Type', ['declaration']),
+      token('{', null, null),
+      token('}', null, null),
+      token('class', null, null),
+      token('B', 'Type',
+          ['declaration']), //token('B', 'dart:core;Type', ['declaration']),
+      token('{', null, null),
+      token('}', null, null),
+      token('mixin', null, null),
+      token('D', 'Type',
+          ['declaration']), //token('D', 'dart:core;Type', ['declaration']),
+      token('on', null, null),
+      token('A', 'dart:core;Type<A>', [
+        'reference'
+      ]), //token('A', 'dart:core;Type<$testFileUri;A>', ['reference']),
+      token('implements', null, null),
+      token('B', 'dart:core;Type<B>', [
+        'reference'
+      ]), //token('B', 'dart:core;Type<$testFileUri;B>', ['reference']),
+      token('{', null, null),
+      token('}', null, null),
+    ]);
+  }
+
+  test_parameterReference() async {
+    await expectTokens('''
+int f(int p) {
+  return p;
+}
+''', [
+      token('int', 'dart:core;Type<int>', [
+        'reference'
+      ]), //token('int', 'dart:core;Type<dart:core;int>', ['reference']),
+      token('f', 'int Function(int)', [
+        'declaration'
+      ]), //token('f', 'dart:core;int Function(dart:core;int)', ['declaration']),
+      token('(', null, null),
+      token('int', 'dart:core;Type<int>', [
+        'reference'
+      ]), //token('int', 'dart:core;Type<dart:core;int>', ['reference']),
+      token('p', 'int',
+          ['declaration']), //token('p', 'dart:core;int', ['declaration']),
+      token(')', null, null),
+      token('{', null, null),
+      token('return', null, null),
+      token('p', 'int',
+          ['reference']), //token('p', 'dart:core;int', ['reference']),
+      token(';', null, null),
+      token('}', null, null),
+    ]);
+  }
+
+  test_topLevelVariable_withDocComment() async {
+    await expectTokens('''
+/// Doc comment [x] with reference.
+int x;
+''', [
+      token('int', 'dart:core;Type<int>', [
+        'reference'
+      ]), //token('int', 'dart:core;Type<dart:core;int>', ['reference']),
+      token('x', 'int',
+          ['declaration']), //token('x', 'dart:core;int', ['declaration']),
+      token(';', null, null),
+    ]);
+  }
+
+  TokenDetails token(String lexeme, String type, List<String> kinds) {
+    return new TokenDetails(lexeme, type: type, validElementKinds: kinds);
+  }
+
+  void _compareTokens(List<Map<String, dynamic>> actualTokens,
+      List<TokenDetails> expectedTokens) {
+    int length = expectedTokens.length;
+    expect(actualTokens, hasLength(length));
+    List<String> errors = [];
+    for (int i = 0; i < length; i++) {
+      Map<String, dynamic> actual = actualTokens[i];
+      TokenDetails expected = expectedTokens[i];
+      if (actual['lexeme'] != expected.lexeme) {
+        errors.add('Lexeme at $i: '
+            'expected "${expected.lexeme}", '
+            'actual "${actual['lexeme']}"');
+      }
+      if (actual['type'] != expected.type) {
+        errors.add('Type at $i ("${expected.lexeme}"): '
+            'expected "${expected.type}", '
+            'actual "${actual['type']}"');
+      }
+      if (_differentKinds(
+          actual['validElementKinds'], expected.validElementKinds)) {
+        errors.add('Kinds at $i ("${expected.lexeme}"): '
+            'expected "${expected.validElementKinds}", '
+            'actual "${actual['validElementKinds']}"');
+      }
+    }
+    expect(errors, isEmpty);
+  }
+
+  /// Return `true` if the two lists of kinds are different.
+  bool _differentKinds(List<String> actual, List<String> expected) {
+    if (actual == null) {
+      return expected != null;
+    } else if (expected == null) {
+      return true;
+    }
+    int expectedLength = expected.length;
+    if (actual.length != expectedLength) {
+      return true;
+    }
+    for (int i = 0; i < expectedLength; i++) {
+      if (actual[i] != expected[i]) {
+        return true;
+      }
+    }
+    return false;
+  }
+}
+
 class MockRelevancySorter implements DartContributionSorter {
   bool enabled = true;
 
diff --git a/pkg/analysis_server/test/domain_edit_dartfix_test.dart b/pkg/analysis_server/test/domain_edit_dartfix_test.dart
index 3f322e6..930f08a 100644
--- a/pkg/analysis_server/test/domain_edit_dartfix_test.dart
+++ b/pkg/analysis_server/test/domain_edit_dartfix_test.dart
@@ -28,11 +28,12 @@
   void expectEdits(List<SourceFileEdit> fileEdits, String expectedSource) {
     expect(fileEdits, hasLength(1));
     expect(fileEdits[0].file, testFile);
-    List<SourceEdit> edits = fileEdits[0].edits;
-    String source = testCode;
-    for (SourceEdit edit in edits) {
-      source = edit.apply(source);
-    }
+    expectFileEdits(testCode, fileEdits[0], expectedSource);
+  }
+
+  void expectFileEdits(
+      String originalSource, SourceFileEdit fileEdit, String expectedSource) {
+    String source = SourceEdit.applySequence(originalSource, fileEdit.edits);
     expect(source, expectedSource);
   }
 
@@ -67,6 +68,31 @@
     testFile = resourceProvider.convertPath('/project/lib/fileToBeFixed.dart');
   }
 
+  test_dartfix_collection_if_elements() async {
+    // Add analysis options to enable ui as code
+    newFile('/project/analysis_options.yaml', content: '''
+analyzer:
+  enable-experiment:
+    - control-flow-collections
+    - spread-collections
+''');
+    addTestFile('''
+f(bool b) {
+  return ['a', b ? 'c' : 'd', 'e'];
+}
+''');
+    createProject();
+    EditDartfixResult result =
+        await performFix(includedFixes: ['collection-if-elements']);
+    expect(result.suggestions.length, greaterThanOrEqualTo(1));
+    expect(result.hasErrors, isFalse);
+    expectEdits(result.edits, '''
+f(bool b) {
+  return ['a', if (b) 'c' else 'd', 'e'];
+}
+''');
+  }
+
   test_dartfix_convertClassToMixin() async {
     addTestFile('''
 class A {}
@@ -97,6 +123,52 @@
     ''');
   }
 
+  test_dartfix_excludedSource() async {
+    // Add analysis options to exclude the lib directory then reanalyze
+    newFile('/project/analysis_options.yaml', content: '''
+analyzer:
+  exclude:
+    - lib/**
+''');
+
+    addTestFile('''
+const double myDouble = 42.0;
+    ''');
+    createProject();
+
+    // Assert no suggestions now that source has been excluded
+    final result = await performFix();
+    expect(result.suggestions, hasLength(0));
+    expect(result.edits, hasLength(0));
+  }
+
+  test_dartfix_map_for_elements() async {
+    // Add analysis options to enable ui as code
+    newFile('/project/analysis_options.yaml', content: '''
+analyzer:
+  enable-experiment:
+    - control-flow-collections
+    - spread-collections
+''');
+    addTestFile('''
+f(Iterable<int> i) {
+  var k = 3;
+  return Map.fromIterable(i, key: (k) => k * 2, value: (v) => k);
+}
+''');
+    createProject();
+    EditDartfixResult result =
+        await performFix(includedFixes: ['map-for-elements']);
+    expect(result.suggestions.length, greaterThanOrEqualTo(1));
+    expect(result.hasErrors, isFalse);
+    expectEdits(result.edits, '''
+f(Iterable<int> i) {
+  var k = 3;
+  return { for (var e in i) e * 2 : k };
+}
+''');
+  }
+
   test_dartfix_moveTypeArgumentToClass() async {
     addTestFile('''
 class A<T> { A.from(Object obj) { } }
@@ -144,23 +216,76 @@
 ''');
   }
 
-  test_dartfix_excludedSource() async {
-    // Add analysis options to exclude the lib directory then reanalyze
-    newFile('/project/analysis_options.yaml', content: '''
-analyzer:
-  exclude:
-    - lib/**
+  test_dartfix_non_nullable_analysis_options_created() async {
+    // Add pubspec for nnbd migration to detect
+    newFile('/project/pubspec.yaml', content: '''
+name: testnnbd
 ''');
-
-    addTestFile('''
-const double myDouble = 42.0;
-    ''');
     createProject();
+    EditDartfixResult result =
+        await performFix(includedFixes: ['non-nullable']);
+    expect(result.suggestions.length, greaterThanOrEqualTo(1));
+    expect(result.hasErrors, isFalse);
+    expect(result.edits, hasLength(1));
+    expectFileEdits('', result.edits[0], '''
+analyzer:
+  enable-experiment:
+    - non-nullable
 
-    // Assert no suggestions now that source has been excluded
-    final result = await performFix();
-    expect(result.suggestions, hasLength(0));
-    expect(result.edits, hasLength(0));
+''');
+  }
+
+  test_dartfix_non_nullable_analysis_options_experiments_added() async {
+    String originalOptions = '''
+analyzer:
+  something:
+    - other
+
+linter:
+  - boo
+''';
+    newFile('/project/analysis_options.yaml', content: originalOptions);
+    createProject();
+    EditDartfixResult result =
+        await performFix(includedFixes: ['non-nullable']);
+    expect(result.suggestions.length, greaterThanOrEqualTo(1));
+    expect(result.hasErrors, isFalse);
+    expect(result.edits, hasLength(1));
+    expectFileEdits(originalOptions, result.edits[0], '''
+analyzer:
+  something:
+    - other
+  enable-experiment:
+    - non-nullable
+
+linter:
+  - boo
+''');
+  }
+
+  test_dartfix_non_nullable_analysis_options_nnbd_added() async {
+    String originalOptions = '''
+analyzer:
+  enable-experiment:
+    - other
+linter:
+  - boo
+''';
+    newFile('/project/analysis_options.yaml', content: originalOptions);
+    createProject();
+    EditDartfixResult result =
+        await performFix(includedFixes: ['non-nullable']);
+    expect(result.suggestions.length, greaterThanOrEqualTo(1));
+    expect(result.hasErrors, isFalse);
+    expect(result.edits, hasLength(1));
+    expectFileEdits(originalOptions, result.edits[0], '''
+analyzer:
+  enable-experiment:
+    - other
+    - non-nullable
+linter:
+  - boo
+''');
   }
 
   test_dartfix_partFile() async {
@@ -200,4 +325,27 @@
 const double myDouble = 42;
     ''');
   }
+
+  test_dartfix_spread_collections() async {
+    // Add analysis options to enable ui as code
+    newFile('/project/analysis_options.yaml', content: '''
+analyzer:
+  enable-experiment:
+    - control-flow-collections
+    - spread-collections
+''');
+    addTestFile('''
+var l1 = ['b'];
+var l2 = ['a']..addAll(l1);
+''');
+    createProject();
+    EditDartfixResult result =
+        await performFix(includedFixes: ['use-spread-collections']);
+    expect(result.suggestions.length, greaterThanOrEqualTo(1));
+    expect(result.hasErrors, isFalse);
+    expectEdits(result.edits, '''
+var l1 = ['b'];
+var l2 = ['a', ...l1];
+''');
+  }
 }
diff --git a/pkg/analysis_server/test/edit/test_all.dart b/pkg/analysis_server/test/edit/test_all.dart
index 79cc139..70251a6 100644
--- a/pkg/analysis_server/test/edit/test_all.dart
+++ b/pkg/analysis_server/test/edit/test_all.dart
@@ -4,24 +4,24 @@
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'assists_test.dart' as assists_test;
-import 'fixes_test.dart' as fixes_test;
-import 'format_test.dart' as format_test;
-import 'organize_directives_test.dart' as organize_directives_test;
-import 'postfix_completion_test.dart' as postfix_completion_test;
-import 'refactoring_test.dart' as refactoring_test;
-import 'sort_members_test.dart' as sort_members_test;
-import 'statement_completion_test.dart' as statement_completion_test;
+import 'assists_test.dart' as assists;
+import 'fixes_test.dart' as fixes;
+import 'format_test.dart' as format;
+import 'organize_directives_test.dart' as organize_directives;
+import 'postfix_completion_test.dart' as postfix_completion;
+import 'refactoring_test.dart' as refactoring;
+import 'sort_members_test.dart' as sort_members;
+import 'statement_completion_test.dart' as statement_completion;
 
 main() {
   defineReflectiveSuite(() {
-    assists_test.main();
-    fixes_test.main();
-    format_test.main();
-    organize_directives_test.main();
-    postfix_completion_test.main();
-    refactoring_test.main();
-    sort_members_test.main();
-    statement_completion_test.main();
+    assists.main();
+    fixes.main();
+    format.main();
+    organize_directives.main();
+    postfix_completion.main();
+    refactoring.main();
+    sort_members.main();
+    statement_completion.main();
   }, name: 'edit');
 }
diff --git a/pkg/analysis_server/test/integration/analysis/get_errors_nonStandard_sdk_test.dart b/pkg/analysis_server/test/integration/analysis/get_errors_nonStandard_sdk_test.dart
index c9be4cd..1ea7f7c 100644
--- a/pkg/analysis_server/test/integration/analysis/get_errors_nonStandard_sdk_test.dart
+++ b/pkg/analysis_server/test/integration/analysis/get_errors_nonStandard_sdk_test.dart
@@ -44,6 +44,7 @@
 class int {}
 class num {}
 class Object {}
+class Iterable<E> {}
 class Map<K, V> {}
 class Null {}
 class String {}
diff --git a/pkg/analysis_server/test/integration/coverage.md b/pkg/analysis_server/test/integration/coverage.md
index 6f13a5e..1728314 100644
--- a/pkg/analysis_server/test/integration/coverage.md
+++ b/pkg/analysis_server/test/integration/coverage.md
@@ -33,6 +33,7 @@
 - [ ] completion.availableSuggestions
 - [ ] completion.getSuggestionDetails
 - [x] completion.getSuggestions
+- [ ] completion.listTokenDetails
 - [ ] completion.registerLibraryPaths
 - [ ] completion.results
 - [ ] completion.setSubscriptions
diff --git a/pkg/analysis_server/test/integration/linter/lint_names_test.dart b/pkg/analysis_server/test/integration/linter/lint_names_test.dart
new file mode 100644
index 0000000..1a515bf
--- /dev/null
+++ b/pkg/analysis_server/test/integration/linter/lint_names_test.dart
@@ -0,0 +1,105 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:io';
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/visitor.dart';
+import 'package:analyzer/error/error.dart';
+import 'package:analyzer/error/listener.dart';
+import 'package:analyzer/src/dart/scanner/reader.dart';
+import 'package:analyzer/src/dart/scanner/scanner.dart';
+import 'package:analyzer/src/generated/parser.dart';
+import 'package:analyzer/src/lint/linter.dart';
+import 'package:analyzer/src/lint/registry.dart';
+import 'package:analyzer/src/string_source.dart';
+import 'package:linter/src/rules.dart';
+import 'package:meta/meta.dart';
+import 'package:path/path.dart' as path;
+import 'package:test/test.dart';
+
+main() {
+  // Set prefix for local or bot execution.
+  final pathPrefix =
+      FileSystemEntity.isDirectorySync(path.join('test', 'integration'))
+          ? ''
+          : path.join('pkg', 'analysis_server');
+
+  /// Ensure server lint name representations correspond w/ actual lint rules.
+  /// See, e.g., https://dart-review.googlesource.com/c/sdk/+/95743.
+  group('lint_names', () {
+    var fixFileContents = new File(path.join(pathPrefix, 'lib', 'src',
+            'services', 'correction', 'fix_internal.dart'))
+        .readAsStringSync();
+    var parser = new CompilationUnitParser();
+    var cu = parser.parse(contents: fixFileContents, name: 'fix_internal.dart');
+    var lintNamesClass = cu.declarations
+        .firstWhere((m) => m is ClassDeclaration && m.name.name == 'LintNames');
+
+    var collector = new _FixCollector();
+    lintNamesClass.accept(collector);
+    for (var name in collector.lintNames) {
+      test(name, () {
+        expect(registeredLintNames, contains(name));
+      });
+    }
+  });
+}
+
+List<LintRule> _registeredLints;
+
+Iterable<String> get registeredLintNames => registeredLints.map((r) => r.name);
+
+List<LintRule> get registeredLints {
+  if (_registeredLints == null) {
+    if (Registry.ruleRegistry.isEmpty) {
+      registerLintRules();
+    }
+    _registeredLints = Registry.ruleRegistry.toList();
+  }
+  return _registeredLints;
+}
+
+class CompilationUnitParser {
+  CompilationUnit parse({@required String contents, @required String name}) {
+    var reader = new CharSequenceReader(contents);
+    var stringSource = new StringSource(contents, name);
+    var errorListener = new _ErrorListener();
+    var scanner = new Scanner(stringSource, reader, errorListener);
+    var startToken = scanner.tokenize();
+    errorListener.throwIfErrors();
+
+    var parser = new Parser(stringSource, errorListener);
+    var cu = parser.parseCompilationUnit(startToken);
+    errorListener.throwIfErrors();
+
+    return cu;
+  }
+}
+
+class _ErrorListener implements AnalysisErrorListener {
+  final errors = <AnalysisError>[];
+
+  @override
+  void onError(AnalysisError error) {
+    errors.add(error);
+  }
+
+  void throwIfErrors() {
+    if (errors.isNotEmpty) {
+      throw new Exception(errors);
+    }
+  }
+}
+
+class _FixCollector extends GeneralizingAstVisitor<void> {
+  final List<String> lintNames = <String>[];
+
+  @override
+  void visitFieldDeclaration(FieldDeclaration node) {
+    for (var v in node.fields.variables) {
+      lintNames.add(v.name.name);
+    }
+  }
+}
diff --git a/pkg/analysis_server/test/integration/linter/test_all.dart b/pkg/analysis_server/test/integration/linter/test_all.dart
new file mode 100644
index 0000000..079a94c
--- /dev/null
+++ b/pkg/analysis_server/test/integration/linter/test_all.dart
@@ -0,0 +1,13 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'lint_names_test.dart' as lint_names;
+
+main() {
+  defineReflectiveSuite(() {
+    lint_names.main();
+  }, name: 'linter');
+}
diff --git a/pkg/analysis_server/test/integration/lsp_server/initialization_test.dart b/pkg/analysis_server/test/integration/lsp_server/initialization_test.dart
new file mode 100644
index 0000000..8d364dc
--- /dev/null
+++ b/pkg/analysis_server/test/integration/lsp_server/initialization_test.dart
@@ -0,0 +1,34 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/lsp_protocol/protocol_special.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'integration_tests.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(InitializationTest);
+  });
+}
+
+@reflectiveTest
+class InitializationTest extends AbstractLspAnalysisServerIntegrationTest {
+  test_initialize_invalidParams() async {
+    final params = {'processId': 'invalid'};
+    final request = new RequestMessage(
+      Either2<num, String>.t1(1),
+      Method.initialize,
+      params,
+      jsonRpcVersion,
+    );
+    final response = await sendRequestToServer(request);
+    expect(response.id, equals(request.id));
+    expect(response.error, isNotNull);
+    expect(response.error.code, equals(ErrorCodes.InvalidParams));
+    expect(response.result, isNull);
+  }
+}
diff --git a/pkg/analysis_server/test/integration/lsp_server/integration_tests.dart b/pkg/analysis_server/test/integration/lsp_server/integration_tests.dart
index 8f21d53..f8a1713 100644
--- a/pkg/analysis_server/test/integration/lsp_server/integration_tests.dart
+++ b/pkg/analysis_server/test/integration/lsp_server/integration_tests.dart
@@ -5,6 +5,7 @@
 import 'dart:async';
 import 'dart:io';
 
+import 'package:analysis_server/lsp_protocol/protocol_custom_generated.dart';
 import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
 import 'package:analysis_server/src/lsp/channel/lsp_byte_stream_channel.dart';
 import 'package:analyzer/instrumentation/instrumentation.dart';
@@ -25,6 +26,29 @@
   @override
   Stream<Message> get serverToClient => client.serverToClient;
 
+  /// Sends a request to the server and unwraps the result. Throws if the
+  /// response was not successful or returned an error.
+  Future<T> expectSuccessfulResponseTo<T>(RequestMessage request) async {
+    final resp = await sendRequestToServer(request);
+    if (resp.error != null) {
+      throw resp.error;
+      // TODO(dantup): It would be better if we had some code-gen'd way
+      // to be able to deserialise into the correct types. We could either
+      // code-gen this list, or code-gen the LSP client (used in tests) to
+      // give strongly typed sendXxx functions that return the correct types.
+    } else if (T == DartDiagnosticServer) {
+      return DartDiagnosticServer.fromJson(resp.result) as T;
+    } else if (T == Null) {
+      return resp.result == null
+          ? null
+          : throw 'Expected Null response but got ${resp.result}';
+    } else {
+      throw 'Unable to deserialise ${resp.result.runtimeType} into $T.\n\n'
+          'You may need to extend expectSuccessfulResponseTo in '
+          'AbstractLspAnalysisServerIntegrationTest';
+    }
+  }
+
   @override
   void sendNotificationToServer(NotificationMessage notification) =>
       client.channel.sendNotification(notification);
@@ -46,6 +70,12 @@
       client.channel.sendResponse(response);
 
   Future setUp() async {
+    // Set up temporary folder for the test.
+    projectFolderPath = Directory.systemTemp
+        .createTempSync('analysisServer')
+        .resolveSymbolicLinksSync();
+    projectFolderUri = Uri.file(projectFolderPath);
+
     client = new LspServerClient();
     await client.start();
     client.serverToClient.listen((message) {
@@ -121,6 +151,13 @@
       }
     });
 
+    // If the server writes to stderr, fail tests with a more useful message
+    // (rather than having the test just hang waiting for a response).
+    _process.stderr.listen((data) {
+      final message = String.fromCharCodes(data);
+      throw 'Analysis Server wrote to stderr:\n\n$message';
+    });
+
     channel = new LspByteStreamServerChannel(
         _process.stdout, _process.stdin, InstrumentationService.NULL_SERVICE);
     channel.listen(_serverToClient.add);
diff --git a/pkg/analysis_server/test/integration/lsp_server/server_test.dart b/pkg/analysis_server/test/integration/lsp_server/server_test.dart
index 0e3c8c0..0b90316 100644
--- a/pkg/analysis_server/test/integration/lsp_server/server_test.dart
+++ b/pkg/analysis_server/test/integration/lsp_server/server_test.dart
@@ -2,6 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'dart:convert';
+import 'dart:io';
+
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -15,7 +18,28 @@
 
 @reflectiveTest
 class ServerTest extends AbstractLspAnalysisServerIntegrationTest {
-  test_exit_afterShutdown() async {
+  test_diagnosticServer() async {
+    await initialize();
+
+    // Send the custom request to the LSP server to get the Dart diagnostic
+    // server info.
+    final server = await getDiagnosticServer();
+
+    expect(server.port, isNotNull);
+    expect(server.port, isNonZero);
+    expect(server.port, isPositive);
+
+    // Ensure the server was actually started.
+    final client = new HttpClient();
+    HttpClientRequest request = await client
+        .getUrl(Uri.parse('http://localhost:${server.port}/status'));
+    final response = await request.close();
+    final responseBody = await utf8.decodeStream(response);
+    expect(responseBody, contains('<title>Analysis Server</title>'));
+  }
+
+  test_exit_inintializedWithShutdown() async {
+    await initialize();
     await sendShutdown();
     sendExit();
 
@@ -29,8 +53,11 @@
     expect(exitCode, equals(0));
   }
 
-  @failingTest
-  test_exit_withoutShutdown() async {
+  test_exit_initializedWithoutShutdown() async {
+    // Send a request that we can wait for, to ensure the server is fully ready
+    // before we send exit. Otherwise the exit notification won't be handled for
+    // a long time (while the server starts up) and will exceed the 10s timeout.
+    await initialize();
     sendExit();
 
     await client.channel.closed.timeout(const Duration(seconds: 10),
@@ -40,7 +67,33 @@
     final exitCode = await client.exitCode.timeout(const Duration(seconds: 10),
         onTimeout: () => fail('Server process did not exit within 10 seconds'));
 
-    // TODO(dantup): Fix the server so this works.
+    expect(exitCode, equals(1));
+  }
+
+  test_exit_uninintializedWithShutdown() async {
+    await sendShutdown();
+    sendExit();
+
+    await client.channel.closed.timeout(const Duration(seconds: 10),
+        onTimeout: () =>
+            fail('Server channel did not close within 10 seconds'));
+
+    final exitCode = await client.exitCode.timeout(const Duration(seconds: 10),
+        onTimeout: () => fail('Server process did not exit within 10 seconds'));
+
+    expect(exitCode, equals(0));
+  }
+
+  test_exit_uninitializedWithoutShutdown() async {
+    // This tests the same as test_exit_withoutShutdown but without sending
+    // initialize. It can't be as strict with the timeout as the server may take
+    // time to start up (we can't tell when it's ready without sending a request).
+
+    sendExit();
+
+    await client.channel.closed;
+    final exitCode = await client.exitCode;
+
     expect(exitCode, equals(1));
   }
 }
diff --git a/pkg/analysis_server/test/integration/lsp_server/test_all.dart b/pkg/analysis_server/test/integration/lsp_server/test_all.dart
new file mode 100644
index 0000000..7f67613
--- /dev/null
+++ b/pkg/analysis_server/test/integration/lsp_server/test_all.dart
@@ -0,0 +1,15 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'initialization_test.dart' as initialization_test;
+import 'server_test.dart' as server_test;
+
+main() {
+  defineReflectiveSuite(() {
+    initialization_test.main();
+    server_test.main();
+  }, name: 'lsp integration');
+}
diff --git a/pkg/analysis_server/test/integration/support/integration_test_methods.dart b/pkg/analysis_server/test/integration/support/integration_test_methods.dart
index c536416..fe67037 100644
--- a/pkg/analysis_server/test/integration/support/integration_test_methods.dart
+++ b/pkg/analysis_server/test/integration/support/integration_test_methods.dart
@@ -1155,6 +1155,33 @@
   }
 
   /**
+   * Inspect analysis server's knowledge about all of a file's tokens including
+   * their lexeme, type, and what element kinds would have been appropriate for
+   * the token's program location.
+   *
+   * Parameters
+   *
+   * file: FilePath
+   *
+   *   The path to the file from which tokens should be returned.
+   *
+   * Returns
+   *
+   * tokens: List<TokenDetails>
+   *
+   *   A list of the file's scanned tokens including analysis information about
+   *   them.
+   */
+  Future<CompletionListTokenDetailsResult> sendCompletionListTokenDetails(
+      String file) async {
+    var params = new CompletionListTokenDetailsParams(file).toJson();
+    var result = await server.send("completion.listTokenDetails", params);
+    ResponseDecoder decoder = new ResponseDecoder(null);
+    return new CompletionListTokenDetailsResult.fromJson(
+        decoder, 'result', result);
+  }
+
+  /**
    * Reports the completion suggestions that should be presented to the user.
    * The set of suggestions included in the notification is always a complete
    * list that supersedes any previously reported suggestions.
@@ -1194,15 +1221,11 @@
    *
    * includedSuggestionSets: List<IncludedSuggestionSet> (optional)
    *
-   *   This field is experimental.
-   *
    *   References to AvailableSuggestionSet objects previously sent to the
    *   client. The client can include applicable names from the referenced
    *   library in code completion suggestions.
    *
-   * includedSuggestionKinds: List<ElementKind> (optional)
-   *
-   *   This field is experimental.
+   * includedElementKinds: List<ElementKind> (optional)
    *
    *   The client is expected to check this list against the ElementKind sent
    *   in IncludedSuggestionSet to decide whether or not these symbols should
@@ -1211,8 +1234,6 @@
    * includedSuggestionRelevanceTags: List<IncludedSuggestionRelevanceTag>
    * (optional)
    *
-   *   This field is experimental.
-   *
    *   The client is expected to check this list against the values of the
    *   field relevanceTags of AvailableSuggestion to decide if the suggestion
    *   should be given a different relevance than the IncludedSuggestionSet
@@ -2005,6 +2026,13 @@
    *
    *   The elements to be made accessible in the specified file.
    *
+   * offset: int (optional)
+   *
+   *   The offset at which the specified elements need to be made accessible.
+   *   If provided, this is used to guard against adding imports for text that
+   *   would be inserted into a comment, string literal, or other location
+   *   where the imports would not be necessary.
+   *
    * Returns
    *
    * edit: SourceFileEdit (optional)
@@ -2017,8 +2045,10 @@
    *   that need to be applied.
    */
   Future<EditImportElementsResult> sendEditImportElements(
-      String file, List<ImportedElements> elements) async {
-    var params = new EditImportElementsParams(file, elements).toJson();
+      String file, List<ImportedElements> elements,
+      {int offset}) async {
+    var params =
+        new EditImportElementsParams(file, elements, offset: offset).toJson();
     var result = await server.send("edit.importElements", params);
     ResponseDecoder decoder = new ResponseDecoder(null);
     return new EditImportElementsResult.fromJson(decoder, 'result', result);
diff --git a/pkg/analysis_server/test/integration/support/integration_tests.dart b/pkg/analysis_server/test/integration/support/integration_tests.dart
index 16f7d4b..7d348d6 100644
--- a/pkg/analysis_server/test/integration/support/integration_tests.dart
+++ b/pkg/analysis_server/test/integration/support/integration_tests.dart
@@ -712,6 +712,7 @@
     if (Platform.packageConfig != null) {
       arguments.add('--packages=${Platform.packageConfig}');
     }
+    arguments.add('--disable-service-auth-codes');
     //
     // Add the server executable.
     //
diff --git a/pkg/analysis_server/test/integration/support/protocol_matchers.dart b/pkg/analysis_server/test/integration/support/protocol_matchers.dart
index ef2ded9..ec50cf1 100644
--- a/pkg/analysis_server/test/integration/support/protocol_matchers.dart
+++ b/pkg/analysis_server/test/integration/support/protocol_matchers.dart
@@ -34,6 +34,7 @@
  *   "message": String
  *   "correction": optional String
  *   "code": String
+ *   "url": optional String
  *   "hasFix": optional bool
  * }
  */
@@ -46,6 +47,7 @@
           "code": isString
         }, optionalFields: {
           "correction": isString,
+          "url": isString,
           "hasFix": isBool
         }));
 
@@ -169,6 +171,8 @@
  * {
  *   "label": String
  *   "element": Element
+ *   "defaultArgumentListString": optional String
+ *   "defaultArgumentListTextRanges": optional List<int>
  *   "docComplete": optional String
  *   "docSummary": optional String
  *   "parameterNames": optional List<String>
@@ -182,6 +186,8 @@
           "label": isString,
           "element": isElement
         }, optionalFields: {
+          "defaultArgumentListString": isString,
+          "defaultArgumentListTextRanges": isListOf(isInt),
           "docComplete": isString,
           "docSummary": isString,
           "parameterNames": isListOf(isString),
@@ -262,7 +268,6 @@
  *   "relevance": int
  *   "completion": String
  *   "displayText": optional String
- *   "elementUri": optional String
  *   "selectionOffset": int
  *   "selectionLength": int
  *   "isDeprecated": bool
@@ -280,7 +285,6 @@
  *   "hasNamedParameters": optional bool
  *   "parameterName": optional String
  *   "parameterType": optional String
- *   "importUri": optional String
  * }
  */
 final Matcher isCompletionSuggestion =
@@ -294,7 +298,6 @@
           "isPotential": isBool
         }, optionalFields: {
           "displayText": isString,
-          "elementUri": isString,
           "docSummary": isString,
           "docComplete": isString,
           "declaringType": isString,
@@ -307,8 +310,7 @@
           "requiredParameterCount": isInt,
           "hasNamedParameters": isBool,
           "parameterName": isString,
-          "parameterType": isString,
-          "importUri": isString
+          "parameterType": isString
         }));
 
 /**
@@ -963,11 +965,13 @@
  * {
  *   "id": int
  *   "relevance": int
+ *   "displayUri": optional String
  * }
  */
 final Matcher isIncludedSuggestionSet = new LazyMatcher(() =>
     new MatchesJsonObject(
-        "IncludedSuggestionSet", {"id": isInt, "relevance": isInt}));
+        "IncludedSuggestionSet", {"id": isInt, "relevance": isInt},
+        optionalFields: {"displayUri": isString}));
 
 /**
  * KytheEntry
@@ -1610,6 +1614,23 @@
     {"file": isFilePath, "fileStamp": isInt, "edits": isListOf(isSourceEdit)}));
 
 /**
+ * TokenDetails
+ *
+ * {
+ *   "lexeme": String
+ *   "type": optional String
+ *   "validElementKinds": optional List<String>
+ * }
+ */
+final Matcher isTokenDetails = new LazyMatcher(() => new MatchesJsonObject(
+        "TokenDetails", {
+      "lexeme": isString
+    }, optionalFields: {
+      "type": isString,
+      "validElementKinds": isListOf(isString)
+    }));
+
+/**
  * TypeHierarchyItem
  *
  * {
@@ -2208,6 +2229,28 @@
         "completion.getSuggestions result", {"id": isCompletionId}));
 
 /**
+ * completion.listTokenDetails params
+ *
+ * {
+ *   "file": FilePath
+ * }
+ */
+final Matcher isCompletionListTokenDetailsParams = new LazyMatcher(() =>
+    new MatchesJsonObject(
+        "completion.listTokenDetails params", {"file": isFilePath}));
+
+/**
+ * completion.listTokenDetails result
+ *
+ * {
+ *   "tokens": List<TokenDetails>
+ * }
+ */
+final Matcher isCompletionListTokenDetailsResult = new LazyMatcher(() =>
+    new MatchesJsonObject("completion.listTokenDetails result",
+        {"tokens": isListOf(isTokenDetails)}));
+
+/**
  * completion.registerLibraryPaths params
  *
  * {
@@ -2233,7 +2276,7 @@
  *   "results": List<CompletionSuggestion>
  *   "isLast": bool
  *   "includedSuggestionSets": optional List<IncludedSuggestionSet>
- *   "includedSuggestionKinds": optional List<ElementKind>
+ *   "includedElementKinds": optional List<ElementKind>
  *   "includedSuggestionRelevanceTags": optional List<IncludedSuggestionRelevanceTag>
  * }
  */
@@ -2246,7 +2289,7 @@
           "isLast": isBool
         }, optionalFields: {
           "includedSuggestionSets": isListOf(isIncludedSuggestionSet),
-          "includedSuggestionKinds": isListOf(isElementKind),
+          "includedElementKinds": isListOf(isElementKind),
           "includedSuggestionRelevanceTags":
               isListOf(isIncludedSuggestionRelevanceTag)
         }));
@@ -2577,11 +2620,13 @@
  * {
  *   "file": FilePath
  *   "elements": List<ImportedElements>
+ *   "offset": optional int
  * }
  */
 final Matcher isEditImportElementsParams = new LazyMatcher(() =>
     new MatchesJsonObject("edit.importElements params",
-        {"file": isFilePath, "elements": isListOf(isImportedElements)}));
+        {"file": isFilePath, "elements": isListOf(isImportedElements)},
+        optionalFields: {"offset": isInt}));
 
 /**
  * edit.importElements result
diff --git a/pkg/analysis_server/test/integration/test_all.dart b/pkg/analysis_server/test/integration/test_all.dart
index ce11216..3c601b3 100644
--- a/pkg/analysis_server/test/integration/test_all.dart
+++ b/pkg/analysis_server/test/integration/test_all.dart
@@ -4,32 +4,32 @@
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'analysis/test_all.dart' as analysis_test_all;
-import 'analytics/test_all.dart' as analytics_test_all;
-import 'completion/test_all.dart' as completion_test_all;
+import 'analysis/test_all.dart' as analysis;
+import 'analytics/test_all.dart' as analytics;
+import 'completion/test_all.dart' as completion;
 import 'coverage_test.dart' as coverage_test;
-import 'diagnostic/test_all.dart' as diagnostic_test_all;
-import 'edit/test_all.dart' as edit_test_all;
-import 'execution/test_all.dart' as execution_test_all;
-import 'kythe/test_all.dart' as kythe_test_all;
-import 'search/test_all.dart' as search_test_all;
-import 'server/test_all.dart' as server_test_all;
+import 'diagnostic/test_all.dart' as diagnostic;
+import 'edit/test_all.dart' as edit;
+import 'execution/test_all.dart' as execution;
+import 'kythe/test_all.dart' as kythe;
+import 'linter/test_all.dart' as linter;
+import 'lsp_server/test_all.dart' as lsp_server;
+import 'search/test_all.dart' as search;
+import 'server/test_all.dart' as server;
 
-/**
- * Utility for manually running all integration tests.
- */
 main() {
   defineReflectiveSuite(() {
-    analysis_test_all.main();
-    analytics_test_all.main();
-    completion_test_all.main();
-    diagnostic_test_all.main();
-    edit_test_all.main();
-    execution_test_all.main();
-    kythe_test_all.main();
-    search_test_all.main();
-    server_test_all.main();
-
+    analysis.main();
+    analytics.main();
+    completion.main();
     coverage_test.main();
+    diagnostic.main();
+    edit.main();
+    execution.main();
+    kythe.main();
+    linter.main();
+    lsp_server.main();
+    search.main();
+    server.main();
   }, name: 'analysis_server_integration');
 }
diff --git a/pkg/analysis_server/test/lsp/completion_test.dart b/pkg/analysis_server/test/lsp/completion_test.dart
index 26685ec..b3554c1 100644
--- a/pkg/analysis_server/test/lsp/completion_test.dart
+++ b/pkg/analysis_server/test/lsp/completion_test.dart
@@ -6,6 +6,7 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
+import '../tool/lsp_spec/matchers.dart';
 import 'server_abstract.dart';
 
 main() {
@@ -89,6 +90,20 @@
     );
   }
 
+  test_completionTriggerKinds_invalidParams() async {
+    await initialize();
+
+    final invalidTriggerKind = CompletionTriggerKind.fromJson(-1);
+    final request = getCompletion(
+      mainFileUri,
+      new Position(0, 0),
+      context: new CompletionContext(invalidTriggerKind, 'A'),
+    );
+
+    await expectLater(
+        request, throwsA(isResponseError(ErrorCodes.InvalidParams)));
+  }
+
   test_gettersAndSetters() async {
     final content = '''
     class MyClass {
diff --git a/pkg/analysis_server/test/lsp/initialization_test.dart b/pkg/analysis_server/test/lsp/initialization_test.dart
index edbad6e..26b7028 100644
--- a/pkg/analysis_server/test/lsp/initialization_test.dart
+++ b/pkg/analysis_server/test/lsp/initialization_test.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
+import 'package:analysis_server/lsp_protocol/protocol_special.dart';
 import 'package:analysis_server/src/lsp/constants.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -38,9 +39,24 @@
     );
   }
 
+  test_initialize_invalidParams() async {
+    final params = {'processId': 'invalid'};
+    final request = new RequestMessage(
+      Either2<num, String>.t1(1),
+      Method.initialize,
+      params,
+      jsonRpcVersion,
+    );
+    final response = await sendRequestToServer(request);
+    expect(response.id, equals(request.id));
+    expect(response.error, isNotNull);
+    expect(response.error.code, equals(ErrorCodes.InvalidParams));
+    expect(response.result, isNull);
+  }
+
   test_initialize_onlyAllowedOnce() async {
     await initialize();
-    final response = await initialize();
+    final response = await initialize(throwOnFailure: false);
     expect(response, isNotNull);
     expect(response.result, isNull);
     expect(response.error, isNotNull);
@@ -58,6 +74,85 @@
     expect(server.contextManager.includedPaths, equals([projectFolderPath]));
   }
 
+  test_onlyAnalyzeProjectsWithOpenFiles_withPubpsec() async {
+    final nestedFilePath = join(
+        projectFolderPath, 'nested', 'deeply', 'in', 'folders', 'test.dart');
+    final nestedFileUri = Uri.file(nestedFilePath);
+    await newFile(nestedFilePath);
+    final pubspecPath = join(projectFolderPath, 'pubspec.yaml');
+    await newFile(pubspecPath);
+
+    // The project folder shouldn't be added to start with.
+    await initialize(
+      rootUri: projectFolderUri,
+      initializationOptions: {'onlyAnalyzeProjectsWithOpenFiles': true},
+    );
+    expect(server.contextManager.includedPaths, equals([]));
+
+    // Opening a file nested within the project should add the project folder.
+    await openFile(nestedFileUri, '');
+    expect(server.contextManager.includedPaths, equals([projectFolderPath]));
+
+    // Closing the file should remove it.
+    await closeFile(nestedFileUri);
+    expect(server.contextManager.includedPaths, equals([]));
+  }
+
+  test_onlyAnalyzeProjectsWithOpenFiles_multipleFiles() async {
+    final file1 = join(projectFolderPath, 'file1.dart');
+    final file1Uri = Uri.file(file1);
+    await newFile(file1);
+    final file2 = join(projectFolderPath, 'file2.dart');
+    final file2Uri = Uri.file(file2);
+    await newFile(file2);
+    final pubspecPath = join(projectFolderPath, 'pubspec.yaml');
+    await newFile(pubspecPath);
+
+    await initialize(
+      rootUri: projectFolderUri,
+      initializationOptions: {'onlyAnalyzeProjectsWithOpenFiles': true},
+    );
+
+    // Opening both files should only add the project folder once.
+    await openFile(file1Uri, '');
+    await openFile(file2Uri, '');
+    expect(server.contextManager.includedPaths, equals([projectFolderPath]));
+
+    // Closing only one of the files should not remove the project folder
+    // since there are still open files.
+    await closeFile(file1Uri);
+    expect(server.contextManager.includedPaths, equals([projectFolderPath]));
+
+    // Closing the last file should remove the project folder.
+    await closeFile(file2Uri);
+    expect(server.contextManager.includedPaths, equals([]));
+  }
+
+  test_onlyAnalyzeProjectsWithOpenFiles_withoutPubpsec() async {
+    final nestedFilePath = join(
+        projectFolderPath, 'nested', 'deeply', 'in', 'folders', 'test.dart');
+    final nestedFileUri = Uri.file(nestedFilePath);
+    await newFile(nestedFilePath);
+
+    // The project folder shouldn't be added to start with.
+    await initialize(
+      rootUri: projectFolderUri,
+      initializationOptions: {'onlyAnalyzeProjectsWithOpenFiles': true},
+    );
+    expect(server.contextManager.includedPaths, equals([]));
+
+    // Opening a file nested within the project will still not add the project
+    // folder because there was no pubspec.
+    final messageFromServer = await expectNotification<ShowMessageParams>(
+      (notification) => notification.method == Method.window_showMessage,
+      () => openFile(nestedFileUri, ''),
+    );
+    expect(server.contextManager.includedPaths, equals([]));
+    expect(messageFromServer.type, MessageType.Warning);
+    expect(messageFromServer.message,
+        contains('using onlyAnalyzeProjectsWithOpenFiles'));
+  }
+
   test_initialize_workspaceFolders() async {
     await initialize(workspaceFolders: [projectFolderUri]);
     expect(server.contextManager.includedPaths, equals([projectFolderPath]));
diff --git a/pkg/analysis_server/test/lsp/server_abstract.dart b/pkg/analysis_server/test/lsp/server_abstract.dart
index a1735ec..108a850 100644
--- a/pkg/analysis_server/test/lsp/server_abstract.dart
+++ b/pkg/analysis_server/test/lsp/server_abstract.dart
@@ -279,6 +279,20 @@
     return notificationFromServer.params as T;
   }
 
+  Future<T> expectNotification<T>(
+    bool Function(NotificationMessage) test,
+    FutureOr<void> f(), {
+    Duration timeout = const Duration(seconds: 5),
+  }) async {
+    final firstError = notificationsFromServer.firstWhere(test);
+    await f();
+
+    final notificationFromServer = await firstError.timeout(timeout);
+
+    expect(notificationFromServer, isNotNull);
+    return notificationFromServer.params as T;
+  }
+
   /// Expects a [method] request from the server after executing [f].
   Future<RequestMessage> expectRequest(
     Method method,
@@ -295,16 +309,7 @@
     return requestFromServer;
   }
 
-  /// Sends a request to the server and unwraps the result. Throws if the
-  /// response was not successful or returned an error.
-  Future<T> expectSuccessfulResponseTo<T>(RequestMessage request) async {
-    final resp = await sendRequestToServer(request);
-    if (resp.error != null) {
-      throw resp.error;
-    } else {
-      return resp.result as T;
-    }
-  }
+  Future<T> expectSuccessfulResponseTo<T>(RequestMessage request);
 
   Future<List<TextEdit>> formatDocument(String fileUri) {
     final request = makeRequest(
@@ -509,6 +514,8 @@
     List<Uri> workspaceFolders,
     TextDocumentClientCapabilities textDocumentCapabilities,
     WorkspaceClientCapabilities workspaceCapabilities,
+    Map<String, Object> initializationOptions,
+    bool throwOnFailure = true,
   }) async {
     // Assume if none of the project options were set, that we want to default to
     // opening the test project folder.
@@ -521,7 +528,7 @@
             null,
             rootPath,
             rootUri?.toString(),
-            null,
+            initializationOptions,
             new ClientCapabilities(
               workspaceCapabilities,
               textDocumentCapabilities,
@@ -533,9 +540,13 @@
     expect(response.id, equals(request.id));
 
     if (response.error == null) {
-      final notification = makeNotification(Method.initialized, null);
+      final notification =
+          makeNotification(Method.initialized, new InitializedParams());
       sendNotificationToServer(notification);
       await pumpEventQueue();
+    } else if (throwOnFailure) {
+      throw 'Error during initialize request: '
+          '${response.error.code}: ${response.error.message}';
     }
 
     return response;
@@ -731,6 +742,17 @@
 
   Stream<Message> get serverToClient => channel.serverToClient;
 
+  /// Sends a request to the server and unwraps the result. Throws if the
+  /// response was not successful or returned an error.
+  Future<T> expectSuccessfulResponseTo<T>(RequestMessage request) async {
+    final resp = await sendRequestToServer(request);
+    if (resp.error != null) {
+      throw resp.error;
+    } else {
+      return resp.result as T;
+    }
+  }
+
   Future sendNotificationToServer(NotificationMessage notification) async {
     channel.sendNotificationToServer(notification);
     await pumpEventQueue();
diff --git a/pkg/analysis_server/test/lsp/server_test.dart b/pkg/analysis_server/test/lsp/server_test.dart
index f935b60..eb79236 100644
--- a/pkg/analysis_server/test/lsp/server_test.dart
+++ b/pkg/analysis_server/test/lsp/server_test.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'dart:convert';
-import 'dart:io';
-
 import 'package:analysis_server/lsp_protocol/protocol_generated.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -65,31 +62,6 @@
     );
   }
 
-  @failingTest
-  test_diagnosticServer() async {
-    // TODO(dantup): This test fails because server.diagnosticServer is not
-    // set up in these tests. This needs moving to an integration test (which
-    // we don't yet have for LSP, but the existing server does have that we
-    // can mirror).
-    await initialize();
-
-    // Send the custom request to the LSP server to get the Dart diagnostic
-    // server info.
-    final server = await getDiagnosticServer();
-
-    expect(server.port, isNotNull);
-    expect(server.port, isNonZero);
-    expect(server.port, isPositive);
-
-    // Ensure the server was actually started.
-    final client = new HttpClient();
-    HttpClientRequest request = await client
-        .getUrl(Uri.parse('http://localhost:${server.port}/status'));
-    final response = await request.close();
-    final responseBody = await utf8.decodeStream(response);
-    expect(responseBody, contains('<title>Analysis Server</title>'));
-  }
-
   test_unknownOptionalNotifications_silentlyDropped() async {
     await initialize();
     final notification =
diff --git a/pkg/analysis_server/test/lsp/test_all.dart b/pkg/analysis_server/test/lsp/test_all.dart
index bdd25b3..7c6ab34 100644
--- a/pkg/analysis_server/test/lsp/test_all.dart
+++ b/pkg/analysis_server/test/lsp/test_all.dart
@@ -4,49 +4,50 @@
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../src/lsp/lsp_packet_transformer_test.dart'
-    as packet_transformer_tests;
-import 'code_actions_assists_test.dart' as assists_code_action_tests;
-import 'code_actions_fixes_test.dart' as fixes_code_action_tests;
-import 'code_actions_source_test.dart' as source_code_action_tests;
-import 'completion_test.dart' as completion_test;
-import 'definition_test.dart' as definition_test;
-import 'diagnostic_test.dart' as diagnostic_test;
-import 'document_highlights_test.dart' as document_highlights_test;
-import 'document_symbols_test.dart' as document_symbols_test;
-import 'file_modification_test.dart' as file_modification_test;
-import 'folding_test.dart' as folding_test;
-import 'format_test.dart' as format_test;
-import 'hover_test.dart' as hover_test;
-import 'initialization_test.dart' as initialization_test;
-import 'priority_files_test.dart' as priority_files_test;
-import 'references_test.dart' as references_test;
-import 'rename_test.dart' as rename_test;
-import 'server_test.dart' as server_test;
-import 'signature_help_test.dart' as signature_help_test;
-import 'workspace_symbols_test.dart' as workspace_symbols_test;
+import '../src/lsp/lsp_packet_transformer_test.dart' as lsp_packet_transformer;
+import 'change_workspace_folders_test.dart' as change_workspace_folders;
+import 'code_actions_assists_test.dart' as code_actions_assists;
+import 'code_actions_fixes_test.dart' as code_actions_fixes;
+import 'code_actions_source_test.dart' as code_actions_source;
+import 'completion_test.dart' as completion;
+import 'definition_test.dart' as definition;
+import 'diagnostic_test.dart' as diagnostic;
+import 'document_highlights_test.dart' as document_highlights;
+import 'document_symbols_test.dart' as document_symbols;
+import 'file_modification_test.dart' as file_modification;
+import 'folding_test.dart' as folding;
+import 'format_test.dart' as format;
+import 'hover_test.dart' as hover;
+import 'initialization_test.dart' as initialization;
+import 'priority_files_test.dart' as priority_files;
+import 'references_test.dart' as references;
+import 'rename_test.dart' as rename;
+import 'server_test.dart' as server;
+import 'signature_help_test.dart' as signature_help;
+import 'workspace_symbols_test.dart' as workspace_symbols;
 
 main() {
   defineReflectiveSuite(() {
-    completion_test.main();
-    definition_test.main();
-    diagnostic_test.main();
-    document_symbols_test.main();
-    document_highlights_test.main();
-    file_modification_test.main();
-    priority_files_test.main();
-    format_test.main();
-    hover_test.main();
-    initialization_test.main();
-    references_test.main();
-    server_test.main();
-    signature_help_test.main();
-    source_code_action_tests.main();
-    fixes_code_action_tests.main();
-    assists_code_action_tests.main();
-    packet_transformer_tests.main();
-    rename_test.main();
-    folding_test.main();
-    workspace_symbols_test.main();
+    change_workspace_folders.main();
+    code_actions_assists.main();
+    code_actions_fixes.main();
+    code_actions_source.main();
+    completion.main();
+    definition.main();
+    diagnostic.main();
+    document_highlights.main();
+    document_symbols.main();
+    file_modification.main();
+    folding.main();
+    format.main();
+    lsp_packet_transformer.main();
+    hover.main();
+    initialization.main();
+    priority_files.main();
+    references.main();
+    rename.main();
+    server.main();
+    signature_help.main();
+    workspace_symbols.main();
   }, name: 'lsp');
 }
diff --git a/pkg/analysis_server/test/protocol_server_test.dart b/pkg/analysis_server/test/protocol_server_test.dart
index 553f0a8..7b66304 100644
--- a/pkg/analysis_server/test/protocol_server_test.dart
+++ b/pkg/analysis_server/test/protocol_server_test.dart
@@ -10,6 +10,7 @@
 import 'package:analyzer/dart/element/element.dart' as engine;
 import 'package:analyzer/dart/element/type.dart' as engine;
 import 'package:analyzer/error/error.dart' as engine;
+import 'package:analyzer/src/dart/error/lint_codes.dart';
 import 'package:analyzer/src/error/codes.dart' as engine;
 import 'package:analyzer/src/generated/source.dart' as engine;
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
@@ -67,6 +68,56 @@
     });
   }
 
+  void test_fromEngine_hasUrl() {
+    engineError = new MockAnalysisError(
+        source,
+        new MockErrorCode(url: 'http://codes.dartlang.org/TEST_ERROR'),
+        10,
+        20,
+        'my message');
+    AnalysisError error = newAnalysisError_fromEngine(lineInfo, engineError);
+    expect(error.toJson(), {
+      SEVERITY: 'ERROR',
+      TYPE: 'COMPILE_TIME_ERROR',
+      LOCATION: {
+        FILE: 'foo.dart',
+        OFFSET: 10,
+        LENGTH: 20,
+        START_LINE: 3,
+        START_COLUMN: 2
+      },
+      MESSAGE: 'my message',
+      CODE: 'test_error',
+      URL: 'http://codes.dartlang.org/TEST_ERROR',
+      HAS_FIX: false
+    });
+  }
+
+  void test_fromEngine_lint() {
+    engineError = new MockAnalysisError(
+        source,
+        new LintCode('my_lint', 'my message', correction: 'correction'),
+        10,
+        20,
+        'my message');
+    AnalysisError error = newAnalysisError_fromEngine(lineInfo, engineError);
+    expect(error.toJson(), {
+      SEVERITY: 'INFO',
+      TYPE: 'LINT',
+      LOCATION: {
+        FILE: 'foo.dart',
+        OFFSET: 10,
+        LENGTH: 20,
+        START_LINE: 3,
+        START_COLUMN: 2
+      },
+      MESSAGE: 'my message',
+      CODE: 'my_lint',
+      URL: 'https://dart-lang.github.io/linter/lints/my_lint.html',
+      HAS_FIX: false
+    });
+  }
+
   void test_fromEngine_noCorrection() {
     engineError.correction = null;
     AnalysisError error = newAnalysisError_fromEngine(lineInfo, engineError);
@@ -213,3 +264,41 @@
   MockAnalysisError(
       this.source, this.errorCode, this.offset, this.length, this.message);
 }
+
+class MockErrorCode implements engine.ErrorCode {
+  @override
+  engine.ErrorType type;
+
+  @override
+  engine.ErrorSeverity errorSeverity;
+
+  @override
+  String name;
+
+  @override
+  String url;
+
+  MockErrorCode(
+      {this.type: engine.ErrorType.COMPILE_TIME_ERROR,
+      this.errorSeverity: engine.ErrorSeverity.ERROR,
+      this.name: 'TEST_ERROR',
+      this.url});
+
+  @override
+  String get correction {
+    throw new StateError('Unexpected invocation of correction');
+  }
+
+  @override
+  bool get isUnresolvedIdentifier => false;
+
+  @override
+  String get message {
+    throw new StateError('Unexpected invocation of message');
+  }
+
+  @override
+  String get uniqueName {
+    throw new StateError('Unexpected invocation of uniqueName');
+  }
+}
diff --git a/pkg/analysis_server/test/services/completion/dart/completion_contributor_util.dart b/pkg/analysis_server/test/services/completion/dart/completion_contributor_util.dart
index 9bb1010..e7047ba 100644
--- a/pkg/analysis_server/test/services/completion/dart/completion_contributor_util.dart
+++ b/pkg/analysis_server/test/services/completion/dart/completion_contributor_util.dart
@@ -102,7 +102,6 @@
   CompletionSuggestion assertSuggest(String completion,
       {CompletionSuggestionKind csKind: CompletionSuggestionKind.INVOCATION,
       int relevance: DART_RELEVANCE_DEFAULT,
-      String importUri,
       ElementKind elemKind: null,
       bool isDeprecated: false,
       bool isPotential: false,
@@ -124,7 +123,6 @@
     } else {
       expect(cs.relevance, equals(relevance), reason: completion);
     }
-    expect(cs.importUri, importUri);
     expect(cs.selectionOffset, equals(selectionOffset ?? completion.length));
     expect(cs.selectionLength, equals(0));
     expect(cs.isDeprecated, equals(isDeprecated));
@@ -160,7 +158,6 @@
 
   CompletionSuggestion assertSuggestClass(String name,
       {int relevance: DART_RELEVANCE_DEFAULT,
-      String importUri,
       CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
       bool isDeprecated: false,
       String elemFile,
@@ -169,7 +166,6 @@
     CompletionSuggestion cs = assertSuggest(name,
         csKind: kind,
         relevance: relevance,
-        importUri: importUri,
         isDeprecated: isDeprecated,
         elemFile: elemFile,
         elemKind: ElementKind.CLASS,
@@ -201,14 +197,12 @@
 
   CompletionSuggestion assertSuggestConstructor(String name,
       {int relevance: DART_RELEVANCE_DEFAULT,
-      String importUri,
       String elementName,
       int elemOffset,
       String defaultArgListString: _UNCHECKED,
       List<int> defaultArgumentListTextRanges}) {
     CompletionSuggestion cs = assertSuggest(name,
         relevance: relevance,
-        importUri: importUri,
         elemKind: ElementKind.CONSTRUCTOR,
         elemOffset: elemOffset,
         defaultArgListString: defaultArgListString,
@@ -248,13 +242,11 @@
 
   CompletionSuggestion assertSuggestField(String name, String type,
       {int relevance: DART_RELEVANCE_DEFAULT,
-      String importUri,
       CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
       bool isDeprecated: false}) {
     CompletionSuggestion cs = assertSuggest(name,
         csKind: kind,
         relevance: relevance,
-        importUri: importUri,
         elemKind: ElementKind.FIELD,
         isDeprecated: isDeprecated);
     // The returnType represents the type of a field
@@ -274,13 +266,11 @@
       {CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
       bool isDeprecated: false,
       int relevance: DART_RELEVANCE_DEFAULT,
-      String importUri,
       String defaultArgListString: _UNCHECKED,
       List<int> defaultArgumentListTextRanges}) {
     CompletionSuggestion cs = assertSuggest(name,
         csKind: kind,
         relevance: relevance,
-        importUri: importUri,
         isDeprecated: isDeprecated,
         defaultArgListString: defaultArgListString,
         defaultArgumentListTextRanges: defaultArgumentListTextRanges);
@@ -308,16 +298,14 @@
   }
 
   CompletionSuggestion assertSuggestFunctionTypeAlias(
-      String name, String returnType,
-      {bool isDeprecated: false,
-      int relevance: DART_RELEVANCE_DEFAULT,
-      CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
-      String importUri}) {
+    String name,
+    String returnType, {
+    bool isDeprecated: false,
+    int relevance: DART_RELEVANCE_DEFAULT,
+    CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
+  }) {
     CompletionSuggestion cs = assertSuggest(name,
-        csKind: kind,
-        relevance: relevance,
-        importUri: importUri,
-        isDeprecated: isDeprecated);
+        csKind: kind, relevance: relevance, isDeprecated: isDeprecated);
     if (returnType != null) {
       expect(cs.returnType, returnType);
     } else if (isNullExpectedReturnTypeConsideredDynamic) {
@@ -344,13 +332,11 @@
 
   CompletionSuggestion assertSuggestGetter(String name, String returnType,
       {int relevance: DART_RELEVANCE_DEFAULT,
-      String importUri,
       CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
       bool isDeprecated: false}) {
     CompletionSuggestion cs = assertSuggest(name,
         csKind: kind,
         relevance: relevance,
-        importUri: importUri,
         elemKind: ElementKind.GETTER,
         isDeprecated: isDeprecated);
     expect(cs.returnType, returnType != null ? returnType : 'dynamic');
@@ -368,7 +354,6 @@
   CompletionSuggestion assertSuggestMethod(
       String name, String declaringType, String returnType,
       {int relevance: DART_RELEVANCE_DEFAULT,
-      String importUri,
       CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
       bool isDeprecated: false,
       String defaultArgListString: _UNCHECKED,
@@ -376,7 +361,6 @@
     CompletionSuggestion cs = assertSuggest(name,
         csKind: kind,
         relevance: relevance,
-        importUri: importUri,
         isDeprecated: isDeprecated,
         defaultArgListString: defaultArgListString,
         defaultArgumentListTextRanges: defaultArgumentListTextRanges);
@@ -395,16 +379,36 @@
     return cs;
   }
 
-  CompletionSuggestion assertSuggestName(String name,
+  CompletionSuggestion assertSuggestMixin(String name,
       {int relevance: DART_RELEVANCE_DEFAULT,
-      String importUri,
-      CompletionSuggestionKind kind: CompletionSuggestionKind.IDENTIFIER,
-      bool isDeprecated: false}) {
+      CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
+      bool isDeprecated: false,
+      String elemFile,
+      String elemName,
+      int elemOffset}) {
     CompletionSuggestion cs = assertSuggest(name,
         csKind: kind,
         relevance: relevance,
-        importUri: importUri,
-        isDeprecated: isDeprecated);
+        isDeprecated: isDeprecated,
+        elemFile: elemFile,
+        elemKind: ElementKind.MIXIN,
+        elemOffset: elemOffset);
+    Element element = cs.element;
+    expect(element, isNotNull);
+    expect(element.kind, equals(ElementKind.MIXIN));
+    expect(element.name, equals(elemName ?? name));
+    expect(element.parameters, isNull);
+    expect(element.returnType, isNull);
+    assertHasNoParameterInfo(cs);
+    return cs;
+  }
+
+  CompletionSuggestion assertSuggestName(String name,
+      {int relevance: DART_RELEVANCE_DEFAULT,
+      CompletionSuggestionKind kind: CompletionSuggestionKind.IDENTIFIER,
+      bool isDeprecated: false}) {
+    CompletionSuggestion cs = assertSuggest(name,
+        csKind: kind, relevance: relevance, isDeprecated: isDeprecated);
     expect(cs.completion, equals(name));
     expect(cs.element, isNull);
     assertHasNoParameterInfo(cs);
@@ -413,13 +417,9 @@
 
   CompletionSuggestion assertSuggestSetter(String name,
       {int relevance: DART_RELEVANCE_DEFAULT,
-      String importUri,
       CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION}) {
     CompletionSuggestion cs = assertSuggest(name,
-        csKind: kind,
-        relevance: relevance,
-        importUri: importUri,
-        elemKind: ElementKind.SETTER);
+        csKind: kind, relevance: relevance, elemKind: ElementKind.SETTER);
     Element element = cs.element;
     expect(element, isNotNull);
     expect(element.kind, equals(ElementKind.SETTER));
@@ -434,12 +434,14 @@
     return cs;
   }
 
-  CompletionSuggestion assertSuggestTopLevelVar(String name, String returnType,
-      {int relevance: DART_RELEVANCE_DEFAULT,
-      CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
-      String importUri}) {
-    CompletionSuggestion cs = assertSuggest(name,
-        csKind: kind, relevance: relevance, importUri: importUri);
+  CompletionSuggestion assertSuggestTopLevelVar(
+    String name,
+    String returnType, {
+    int relevance: DART_RELEVANCE_DEFAULT,
+    CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
+  }) {
+    CompletionSuggestion cs =
+        assertSuggest(name, csKind: kind, relevance: relevance);
     if (returnType != null) {
       expect(cs.returnType, returnType);
     } else if (isNullExpectedReturnTypeConsideredDynamic) {
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 0c2b22f..49d5f95 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
@@ -43,9 +43,8 @@
 void main() {f^}''');
     await computeSuggestions();
 
-    CompletionSuggestion cs = assertSuggestFunction('foo', 'bool',
+    assertSuggestFunction('foo', 'bool',
         defaultArgListString: 'bar, baz: null');
-    expect(cs.elementUri, equals('package:test/b.dart'));
   }
 
   test_ArgumentList() async {
@@ -1924,6 +1923,17 @@
     assertNoSuggestions();
   }
 
+  test_extendsClause() async {
+    newFile('/home/test/lib/a.dart', content: 'class A {}');
+    addTestSource('''
+import 'a.dart';
+
+class B extends ^
+''');
+    await computeSuggestions();
+    assertSuggestClass('A');
+  }
+
   test_FieldDeclaration_name_typed() async {
     // SimpleIdentifier  VariableDeclaration  VariableDeclarationList
     // FieldDeclaration
@@ -2446,6 +2456,17 @@
     assertNotSuggested('int');
   }
 
+  test_implementsClause() async {
+    newFile('/home/test/lib/a.dart', content: 'class A {}');
+    addTestSource('''
+import 'a.dart';
+
+class B implements ^
+''');
+    await computeSuggestions();
+    assertSuggestClass('A');
+  }
+
   test_implicitCreation() async {
     addSource('/home/test/lib/a.dart', '''
 class A {
@@ -4432,4 +4453,15 @@
     assertNotSuggested('x');
     assertNotSuggested('e');
   }
+
+  test_withClause_mixin() async {
+    newFile('/home/test/lib/a.dart', content: 'mixin M {}');
+    addTestSource('''
+import 'a.dart';
+
+class B extends A with ^
+''');
+    await computeSuggestions();
+    assertSuggestMixin('M');
+  }
 }
diff --git a/pkg/analysis_server/test/services/completion/dart/keyword_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/keyword_contributor_test.dart
index 73f5b37..2955d79 100644
--- a/pkg/analysis_server/test/services/completion/dart/keyword_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/keyword_contributor_test.dart
@@ -5,6 +5,7 @@
 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.dart';
 import 'package:analysis_server/src/services/completion/dart/keyword_contributor.dart';
 import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -14,6 +15,7 @@
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(KeywordContributorTest);
+    defineReflectiveTests(KeywordContributorWithUiAsCodeTest);
   });
 }
 
@@ -1882,3 +1884,153 @@
     return true;
   }
 }
+
+@reflectiveTest
+class KeywordContributorWithUiAsCodeTest extends KeywordContributorTest {
+  static const List<Keyword> COLLECTION_ELEMENT_START = const [
+    Keyword.CONST,
+    Keyword.FALSE,
+    Keyword.FOR,
+    Keyword.IF,
+    Keyword.NEW,
+    Keyword.NULL,
+    Keyword.TRUE,
+  ];
+
+  @override
+  void setupResourceProvider() {
+    super.setupResourceProvider();
+    createAnalysisOptionsFile(experiments: [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections
+    ]);
+  }
+
+  test_ifOrForElement_forElement() async {
+    addTestSource('''
+f() => [for (var e in c) ^];
+''');
+    await computeSuggestions();
+    assertSuggestKeywords(COLLECTION_ELEMENT_START);
+  }
+
+  test_ifOrForElement_ifElement_else() async {
+    addTestSource('''
+f() => [if (true) 1 else ^];
+''');
+    await computeSuggestions();
+    assertSuggestKeywords(COLLECTION_ELEMENT_START);
+  }
+
+  test_ifOrForElement_ifElement_then() async {
+    addTestSource('''
+f() => [if (true) ^];
+''');
+    await computeSuggestions();
+    assertSuggestKeywords(COLLECTION_ELEMENT_START);
+  }
+
+  test_ifOrForElement_list_empty() async {
+    addTestSource('''
+f() => [^];
+''');
+    await computeSuggestions();
+    assertSuggestKeywords(COLLECTION_ELEMENT_START);
+  }
+
+  test_ifOrForElement_list_first() async {
+    addTestSource('''
+f() => [^1, 2];
+''');
+    await computeSuggestions();
+    assertSuggestKeywords(COLLECTION_ELEMENT_START);
+  }
+
+  test_ifOrForElement_list_last() async {
+    addTestSource('''
+f() => [1, 2, ^];
+''');
+    await computeSuggestions();
+    assertSuggestKeywords(COLLECTION_ELEMENT_START);
+  }
+
+  test_ifOrForElement_list_middle() async {
+    addTestSource('''
+f() => [1, ^, 2];
+''');
+    await computeSuggestions();
+    assertSuggestKeywords(COLLECTION_ELEMENT_START);
+  }
+
+  test_ifOrForElement_map_empty() async {
+    addTestSource('''
+f() => <String, int>{^};
+''');
+    await computeSuggestions();
+    assertSuggestKeywords(COLLECTION_ELEMENT_START);
+  }
+
+  test_ifOrForElement_map_first() async {
+    addTestSource('''
+f() => <String, int>{^'a' : 1};
+''');
+    await computeSuggestions();
+    assertSuggestKeywords(COLLECTION_ELEMENT_START);
+  }
+
+  test_ifOrForElement_map_last() async {
+    addTestSource('''
+f() => <String, int>{'a' : 1, 'b' : 2, ^};
+''');
+    await computeSuggestions();
+    assertSuggestKeywords(COLLECTION_ELEMENT_START);
+  }
+
+  test_ifOrForElement_map_middle() async {
+    addTestSource('''
+f() => <String, int>{'a' : 1, ^, 'b' : 2];
+''');
+    await computeSuggestions();
+    assertSuggestKeywords(COLLECTION_ELEMENT_START);
+  }
+
+  test_ifOrForElement_set_empty() async {
+    addTestSource('''
+f() => <int>{^};
+''');
+    await computeSuggestions();
+    assertSuggestKeywords(COLLECTION_ELEMENT_START);
+  }
+
+  test_ifOrForElement_set_first() async {
+    addTestSource('''
+f() => <int>{^1, 2};
+''');
+    await computeSuggestions();
+    assertSuggestKeywords(COLLECTION_ELEMENT_START);
+  }
+
+  test_ifOrForElement_set_last() async {
+    addTestSource('''
+f() => <int>{1, 2, ^};
+''');
+    await computeSuggestions();
+    assertSuggestKeywords(COLLECTION_ELEMENT_START);
+  }
+
+  test_ifOrForElement_set_middle() async {
+    addTestSource('''
+f() => <int>{1, ^, 2};
+''');
+    await computeSuggestions();
+    assertSuggestKeywords(COLLECTION_ELEMENT_START);
+  }
+
+  test_spreadElement() async {
+    addTestSource('''
+f() => [...^];
+''');
+    await computeSuggestions();
+    assertSuggestKeywords(KeywordContributorTest.EXPRESSION_START_NO_INSTANCE);
+  }
+}
diff --git a/pkg/analysis_server/test/services/completion/dart/library_member_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/library_member_contributor_test.dart
index af3d4f8..e13ad70 100644
--- a/pkg/analysis_server/test/services/completion/dart/library_member_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/library_member_contributor_test.dart
@@ -4,7 +4,6 @@
 
 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.dart';
 import 'package:analysis_server/src/services/completion/dart/library_member_contributor.dart';
-import 'package:analyzer_plugin/protocol/protocol_common.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -27,8 +26,7 @@
     // SimpleIdentifier  PrefixedIdentifier  ExpressionStatement
     addTestSource('import "dart:async" as bar; foo() {bar.^}');
     await computeSuggestions();
-    CompletionSuggestion cs = assertSuggestClass('Future');
-    expect(cs.elementUri, equals('dart:async'));
+    assertSuggestClass('Future');
     assertNotSuggested('loadLibrary');
   }
 
diff --git a/pkg/analysis_server/test/services/completion/dart/local_library_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/local_library_contributor_test.dart
index f38def7..8e5f942 100644
--- a/pkg/analysis_server/test/services/completion/dart/local_library_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/local_library_contributor_test.dart
@@ -4,7 +4,6 @@
 
 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.dart';
 import 'package:analysis_server/src/services/completion/dart/local_library_contributor.dart';
-import 'package:analyzer_plugin/protocol/protocol_common.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -43,8 +42,7 @@
     await computeSuggestions();
     expect(replacementOffset, completionOffset);
     expect(replacementLength, 0);
-    CompletionSuggestion cs = assertSuggestConstructor('A');
-    expect(cs.elementUri, 'package:test/a.dart');
+    assertSuggestConstructor('A');
     // Suggested by LocalConstructorContributor
     assertNotSuggested('B.bar');
     // Suggested by ImportedReferenceContributor
diff --git a/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart
index 3844a66..4fbe052 100644
--- a/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/local_reference_contributor_test.dart
@@ -82,11 +82,10 @@
 void main() {h^}''');
     await computeSuggestions();
 
-    CompletionSuggestion cs = assertSuggestFunction('hasLength', 'bool',
+    assertSuggestFunction('hasLength', 'bool',
         relevance: DART_RELEVANCE_LOCAL_FUNCTION,
         defaultArgListString: 'a, b',
         defaultArgumentListTextRanges: [0, 1, 3, 1]);
-    expect(cs.elementUri, equals(convertPath('/home/test/lib/test.dart')));
   }
 
   test_ArgDefaults_function_none() async {
@@ -2408,6 +2407,20 @@
     assertNotSuggested('U');
   }
 
+  test_expression_typeParameter_mixinDeclaration() async {
+    addTestSource('''
+mixin M<T> {
+  void m() {
+    ^
+  }
+}
+class B<U> {}
+''');
+    await computeSuggestions();
+    assertSuggestTypeParameter('T');
+    assertNotSuggested('U');
+  }
+
   test_ExpressionStatement_identifier() async {
     // SimpleIdentifier  ExpressionStatement  Block
     addSource('/home/test/lib/a.dart', '''
@@ -2450,6 +2463,17 @@
     assertNoSuggestions();
   }
 
+  test_extendsClause() async {
+    addTestSource('''
+class A {}
+mixin M {}
+class B extends ^
+''');
+    await computeSuggestions();
+    assertSuggestClass('A');
+    assertNotSuggested('M');
+  }
+
   test_FieldDeclaration_name_typed() async {
     // SimpleIdentifier  VariableDeclaration  VariableDeclarationList
     // FieldDeclaration
@@ -2990,6 +3014,17 @@
     assertNotSuggested('MC');
   }
 
+  test_implementsClause() async {
+    addTestSource('''
+class A {}
+mixin M {}
+class B implements ^
+''');
+    await computeSuggestions();
+    assertSuggestClass('A');
+    assertSuggestMixin('M');
+  }
+
   test_ImportDirective_dart() async {
     // SimpleStringLiteral  ImportDirective
     addTestSource('''
@@ -4848,4 +4883,14 @@
     assertNotSuggested('x');
     assertNotSuggested('e');
   }
+
+  test_withClause_mixin() async {
+    addTestSource('''
+class A {}
+mixin M {}
+class B extends A with ^
+''');
+    await computeSuggestions();
+    assertSuggestMixin('M');
+  }
 }
diff --git a/pkg/analysis_server/test/services/completion/dart/override_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/override_contributor_test.dart
index da7ec8f..830b314 100644
--- a/pkg/analysis_server/test/services/completion/dart/override_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/override_contributor_test.dart
@@ -383,7 +383,6 @@
     }
     expect(cs.kind, equals(CompletionSuggestionKind.OVERRIDE));
     expect(cs.relevance, equals(DART_RELEVANCE_HIGH));
-    expect(cs.importUri, null);
     if (selectionOffset != null && selectionLength != null) {
       expect(cs.selectionOffset, selectionOffset);
       expect(cs.selectionLength, selectionLength);
diff --git a/pkg/analysis_server/test/services/completion/dart/type_member_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/type_member_contributor_test.dart
index c3712b1..11eb5eb 100644
--- a/pkg/analysis_server/test/services/completion/dart/type_member_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/type_member_contributor_test.dart
@@ -3659,6 +3659,19 @@
     assertNotSuggested('ms3');
   }
 
+  test_super_fromSuperclassConstraint() async {
+    addTestSource('''
+class C {
+  void c(x, int y) {}
+}
+mixin M on C {
+  m() {super.^}
+}
+''');
+    await computeSuggestions();
+    assertSuggestMethod('c', 'C', 'void');
+  }
+
   test_super_withMixin() async {
     addTestSource('''
 mixin M {
diff --git a/pkg/analysis_server/test/services/correction/organize_directives_test.dart b/pkg/analysis_server/test/services/correction/organize_directives_test.dart
index 8c53f7a..2a56e73 100644
--- a/pkg/analysis_server/test/services/correction/organize_directives_test.dart
+++ b/pkg/analysis_server/test/services/correction/organize_directives_test.dart
@@ -24,6 +24,26 @@
 class OrganizeDirectivesTest extends AbstractSingleUnitTest {
   List<AnalysisError> testErrors;
 
+  test_docComment_beforeDirective_hasUnresolvedIdentifier() async {
+    await _computeUnitAndErrors(r'''
+/// Library documentation comment A
+/// Library documentation comment B
+import 'a.dart';
+import 'b.dart';
+
+B b;
+''');
+    // validate change
+    _assertOrganize(r'''
+/// Library documentation comment A
+/// Library documentation comment B
+import 'a.dart';
+import 'b.dart';
+
+B b;
+''');
+  }
+
   test_keep_duplicateImports_withDifferentPrefix() async {
     await _computeUnitAndErrors(r'''
 import 'dart:async' as async1;
@@ -286,12 +306,9 @@
 // header
 library lib;
 
-import 'a.dart';
-import 'b.dart';
-import 'c.dart';
-// c
-// aa
-// bbb
+import 'a.dart';// aa
+import 'b.dart';// bbb
+import 'c.dart';// c
 
 /** doc */
 main() {
diff --git a/pkg/analysis_server/test/services/refactoring/extract_method_test.dart b/pkg/analysis_server/test/services/refactoring/extract_method_test.dart
index 420f69a..7c54046 100644
--- a/pkg/analysis_server/test/services/refactoring/extract_method_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/extract_method_test.dart
@@ -281,7 +281,7 @@
 ''');
     _createRefactoringForStartEndComments();
     return _assertConditionsFatal(
-        "Operation not applicable to a 'for' statement's updaters and body.");
+        "Not all selected statements are enclosed by the same parent statement.");
   }
 
   test_bad_methodName_reference() async {
diff --git a/pkg/analysis_server/test/src/computer/imported_elements_computer_test.dart b/pkg/analysis_server/test/src/computer/imported_elements_computer_test.dart
index 8e123ae..c3d7bbf 100644
--- a/pkg/analysis_server/test/src/computer/imported_elements_computer_test.dart
+++ b/pkg/analysis_server/test/src/computer/imported_elements_computer_test.dart
@@ -14,14 +14,36 @@
 
 main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(ImportElementsComputerTest);
+    defineReflectiveTests(ImportedElementsComputerTest);
   });
 }
 
 @reflectiveTest
-class ImportElementsComputerTest extends AbstractContextTest {
+class ImportedElementsComputerTest extends AbstractContextTest {
   String sourcePath;
 
+  List<ImportedElements> importedElements;
+
+  void assertElements(List<ImportedElements> expectedElementsList) {
+    expect(importedElements, hasLength(expectedElementsList.length));
+    for (ImportedElements expectedElements in expectedElementsList) {
+      String expectedPath = convertPath(expectedElements.path);
+      bool found = false;
+      for (ImportedElements actualElements in importedElements) {
+        if (expectedPath == actualElements.path &&
+            actualElements.prefix == expectedElements.prefix) {
+          expect(actualElements.elements,
+              unorderedEquals(expectedElements.elements));
+          found = true;
+          break;
+        }
+      }
+      if (!found) {
+        fail('Expected elements from $expectedPath, but none found.');
+      }
+    }
+  }
+
   setUp() {
     super.setUp();
     sourcePath = convertPath('/home/test/lib/test.dart');
@@ -29,126 +51,104 @@
 
   test_dartAsync_noPrefix() async {
     String selection = "Future<String> f = null;";
-    String content = """
+    String content = '''
 import 'dart:async';
 printer() {
   $selection
   print(await f);
 }
-""";
-    List<ImportedElements> elementsList = await _computeElements(
-        content, content.indexOf(selection), selection.length);
-    expect(elementsList, hasLength(2));
-    ImportedElements elements1 = elementsList[0];
-    ImportedElements elements2 = elementsList[1];
-    ImportedElements asyncElements;
-    ImportedElements coreElements;
-    if (elements1.path == convertPath('/sdk/lib/core/core.dart')) {
-      coreElements = elements1;
-      asyncElements = elements2;
-    } else {
-      coreElements = elements2;
-      asyncElements = elements1;
-    }
-    expect(coreElements, isNotNull);
-    expect(coreElements.path, convertPath('/sdk/lib/core/core.dart'));
-    expect(coreElements.prefix, '');
-    expect(coreElements.elements, unorderedEquals(['String']));
-
-    expect(asyncElements, isNotNull);
-    expect(asyncElements.path, convertPath('/sdk/lib/async/async.dart'));
-    expect(asyncElements.prefix, '');
-    expect(asyncElements.elements, unorderedEquals(['Future']));
+''';
+    await _computeElements(content, selection);
+    assertElements([
+      new ImportedElements('/sdk/lib/core/core.dart', '', ['String']),
+      new ImportedElements('/sdk/lib/async/async.dart', '', ['Future']),
+    ]);
   }
 
   test_dartAsync_prefix() async {
     String selection = "a.Future<String> f = null;";
-    String content = """
+    String content = '''
 import 'dart:async' as a;
 printer() {
   $selection
   print(await f);
 }
-""";
-    List<ImportedElements> elementsList = await _computeElements(
-        content, content.indexOf(selection), selection.length);
-    expect(elementsList, hasLength(2));
-    ImportedElements elements1 = elementsList[0];
-    ImportedElements elements2 = elementsList[1];
-    ImportedElements asyncElements;
-    ImportedElements coreElements;
-    if (elements1.path == convertPath('/sdk/lib/core/core.dart')) {
-      coreElements = elements1;
-      asyncElements = elements2;
-    } else {
-      coreElements = elements2;
-      asyncElements = elements1;
-    }
-    expect(coreElements, isNotNull);
-    expect(coreElements.path, convertPath('/sdk/lib/core/core.dart'));
-    expect(coreElements.prefix, '');
-    expect(coreElements.elements, unorderedEquals(['String']));
-
-    expect(asyncElements, isNotNull);
-    expect(asyncElements.path, convertPath('/sdk/lib/async/async.dart'));
-    expect(asyncElements.prefix, 'a');
-    expect(asyncElements.elements, unorderedEquals(['Future']));
+''';
+    await _computeElements(content, selection);
+    assertElements([
+      new ImportedElements('/sdk/lib/core/core.dart', '', ['String']),
+      new ImportedElements('/sdk/lib/async/async.dart', 'a', ['Future']),
+    ]);
   }
 
   test_dartCore_noPrefix() async {
     String selection = "String s = '';";
-    String content = """
+    String content = '''
 blankLine() {
   $selection
   print(s);
 }
-""";
-    List<ImportedElements> elementsList = await _computeElements(
-        content, content.indexOf(selection), selection.length);
-    expect(elementsList, hasLength(1));
-    ImportedElements elements = elementsList[0];
-    expect(elements, isNotNull);
-    expect(elements.path, convertPath('/sdk/lib/core/core.dart'));
-    expect(elements.prefix, '');
-    expect(elements.elements, unorderedEquals(['String']));
+''';
+    await _computeElements(content, selection);
+    assertElements([
+      new ImportedElements('/sdk/lib/core/core.dart', '', ['String']),
+    ]);
   }
 
   test_dartCore_prefix() async {
     String selection = "core.String s = '';";
-    String content = """
+    String content = '''
 import 'dart:core' as core;
 blankLine() {
   $selection
   print(s);
 }
-""";
-    List<ImportedElements> elementsList = await _computeElements(
-        content, content.indexOf(selection), selection.length);
-    expect(elementsList, hasLength(1));
-    ImportedElements elements = elementsList[0];
-    expect(elements, isNotNull);
-    expect(elements.path, convertPath('/sdk/lib/core/core.dart'));
-    expect(elements.prefix, 'core');
-    expect(elements.elements, unorderedEquals(['String']));
+''';
+    await _computeElements(content, selection);
+    assertElements([
+      new ImportedElements('/sdk/lib/core/core.dart', 'core', ['String']),
+    ]);
   }
 
   test_dartMath_noPrefix() async {
     String selection = "new Random();";
-    String content = """
+    String content = '''
 import 'dart:math';
 bool randomBool() {
   Random r = $selection
   return r.nextBool();
 }
-""";
-    List<ImportedElements> elementsList = await _computeElements(
-        content, content.indexOf(selection), selection.length);
-    expect(elementsList, hasLength(1));
-    ImportedElements elements = elementsList[0];
-    expect(elements, isNotNull);
-    expect(elements.path, convertPath('/sdk/lib/math/math.dart'));
-    expect(elements.prefix, '');
-    expect(elements.elements, unorderedEquals(['Random']));
+''';
+    await _computeElements(content, selection);
+    assertElements([
+      new ImportedElements('/sdk/lib/math/math.dart', '', ['Random']),
+    ]);
+  }
+
+  test_import_simple() async {
+    String selection = "import 'dart:math';";
+    String content = '''
+$selection
+bool randomBool() {
+  Random r = new Random();
+  return r.nextBool();
+}
+''';
+    await _computeElements(content, selection);
+    expect(importedElements, hasLength(0));
+  }
+
+  test_import_simple_show() async {
+    String selection = "import 'dart:math' show Random;";
+    String content = '''
+$selection
+bool randomBool() {
+  Random r = new Random();
+  return r.nextBool();
+}
+''';
+    await _computeElements(content, selection);
+    expect(importedElements, hasLength(0));
   }
 
   test_multiple() async {
@@ -164,34 +164,23 @@
 
 $selection
 ''';
-    List<ImportedElements> elementsList = await _computeElements(
-        content, content.indexOf(selection), selection.length);
-    expect(elementsList, hasLength(2));
-
-    ImportedElements mathElements = elementsList[0];
-    expect(mathElements, isNotNull);
-    expect(mathElements.path, convertPath('/sdk/lib/math/math.dart'));
-    expect(mathElements.prefix, '');
-    expect(mathElements.elements, unorderedEquals(['Random']));
-
-    ImportedElements coreElements = elementsList[1];
-    expect(coreElements, isNotNull);
-    expect(coreElements.path, convertPath('/sdk/lib/core/core.dart'));
-    expect(coreElements.prefix, '');
-    expect(coreElements.elements, unorderedEquals(['String', 'print']));
+    await _computeElements(content, selection);
+    assertElements([
+      new ImportedElements('/sdk/lib/core/core.dart', '', ['String', 'print']),
+      new ImportedElements('/sdk/lib/math/math.dart', '', ['Random']),
+    ]);
   }
 
   test_none_comment() async {
     String selection = 'comment';
-    String content = """
+    String content = '''
 // Method $selection.
 blankLine() {
   print('');
 }
-""";
-    List<ImportedElements> elementsList = await _computeElements(
-        content, content.indexOf(selection), selection.length);
-    expect(elementsList, hasLength(0));
+''';
+    await _computeElements(content, selection);
+    expect(importedElements, hasLength(0));
   }
 
   test_none_constructorDeclarationReturnType() async {
@@ -201,38 +190,35 @@
   A.named();
 }
 ''';
-    String content = """
+    String content = '''
 $selection
-""";
-    List<ImportedElements> elementsList = await _computeElements(
-        content, content.indexOf(selection), selection.length);
-    expect(elementsList, hasLength(0));
+''';
+    await _computeElements(content, selection);
+    expect(importedElements, hasLength(0));
   }
 
   test_none_partialNames() async {
     String selection = 'x + y';
-    String content = """
+    String content = '''
 plusThree(int xx) {
   int yy = 2;
   print(x${selection}y);
 }
-""";
-    List<ImportedElements> elementsList = await _computeElements(
-        content, content.indexOf(selection), selection.length);
-    expect(elementsList, hasLength(0));
+''';
+    await _computeElements(content, selection);
+    expect(importedElements, hasLength(0));
   }
 
   test_none_wholeNames() async {
     String selection = 'x + y + 1';
-    String content = """
+    String content = '''
 plusThree(int x) {
   int y = 2;
   print($selection);
 }
-""";
-    List<ImportedElements> elementsList = await _computeElements(
-        content, content.indexOf(selection), selection.length);
-    expect(elementsList, hasLength(0));
+''';
+    await _computeElements(content, selection);
+    expect(importedElements, hasLength(0));
   }
 
   test_package_multipleInSame() async {
@@ -245,20 +231,16 @@
 }
 ''');
     String selection = "A.a + B.b";
-    String content = """
+    String content = '''
 import 'package:foo/foo.dart';
 blankLine() {
   print($selection);
 }
-""";
-    List<ImportedElements> elementsList = await _computeElements(
-        content, content.indexOf(selection), selection.length);
-    expect(elementsList, hasLength(1));
-    ImportedElements elements = elementsList[0];
-    expect(elements, isNotNull);
-    expect(elements.path, convertPath('/.pub-cache/foo/lib/foo.dart'));
-    expect(elements.prefix, '');
-    expect(elements.elements, unorderedEquals(['A', 'B']));
+''';
+    await _computeElements(content, selection);
+    assertElements([
+      new ImportedElements('/.pub-cache/foo/lib/foo.dart', '', ['A', 'B']),
+    ]);
   }
 
   test_package_noPrefix() async {
@@ -268,43 +250,86 @@
 }
 ''');
     String selection = "Foo.first";
-    String content = """
+    String content = '''
 import 'package:foo/foo.dart';
 blankLine() {
   print($selection);
 }
-""";
-    List<ImportedElements> elementsList = await _computeElements(
-        content, content.indexOf(selection), selection.length);
-    expect(elementsList, hasLength(1));
-    ImportedElements elements = elementsList[0];
-    expect(elements, isNotNull);
-    expect(elements.path, convertPath('/.pub-cache/foo/lib/foo.dart'));
-    expect(elements.prefix, '');
-    expect(elements.elements, unorderedEquals(['Foo']));
+''';
+    await _computeElements(content, selection);
+    assertElements([
+      new ImportedElements('/.pub-cache/foo/lib/foo.dart', '', ['Foo']),
+    ]);
   }
 
-  test_package_prefix_selected() async {
+  test_package_prefix_selected_class() async {
     addPackageFile('foo', 'foo.dart', '''
 class Foo {
   static String first = '';
 }
 ''');
     String selection = "f.Foo.first";
-    String content = """
+    String content = '''
 import 'package:foo/foo.dart' as f;
 blankLine() {
   print($selection);
 }
-""";
-    List<ImportedElements> elementsList = await _computeElements(
-        content, content.indexOf(selection), selection.length);
-    expect(elementsList, hasLength(1));
-    ImportedElements elements = elementsList[0];
-    expect(elements, isNotNull);
-    expect(elements.path, convertPath('/.pub-cache/foo/lib/foo.dart'));
-    expect(elements.prefix, 'f');
-    expect(elements.elements, unorderedEquals(['Foo']));
+''';
+    await _computeElements(content, selection);
+    assertElements([
+      new ImportedElements('/.pub-cache/foo/lib/foo.dart', 'f', ['Foo']),
+    ]);
+  }
+
+  test_package_prefix_selected_function() async {
+    addPackageFile('foo', 'foo.dart', '''
+String foo() => '';
+''');
+    String selection = "f.foo()";
+    String content = '''
+import 'package:foo/foo.dart' as f;
+blankLine() {
+  print($selection);
+}
+''';
+    await _computeElements(content, selection);
+    assertElements([
+      new ImportedElements('/.pub-cache/foo/lib/foo.dart', 'f', ['foo']),
+    ]);
+  }
+
+  test_package_prefix_selected_getter() async {
+    addPackageFile('foo', 'foo.dart', '''
+String foo = '';
+''');
+    String selection = "f.foo";
+    String content = '''
+import 'package:foo/foo.dart' as f;
+blankLine() {
+  print($selection);
+}
+''';
+    await _computeElements(content, selection);
+    assertElements([
+      new ImportedElements('/.pub-cache/foo/lib/foo.dart', 'f', ['foo']),
+    ]);
+  }
+
+  test_package_prefix_selected_setter() async {
+    addPackageFile('foo', 'foo.dart', '''
+String foo = '';
+''');
+    String selection = "f.foo";
+    String content = '''
+import 'package:foo/foo.dart' as f;
+main() {
+  $selection = '';
+}
+''';
+    await _computeElements(content, selection);
+    assertElements([
+      new ImportedElements('/.pub-cache/foo/lib/foo.dart', 'f', ['foo=']),
+    ]);
   }
 
   test_package_prefix_unselected() async {
@@ -314,20 +339,16 @@
 }
 ''');
     String selection = "Foo.first";
-    String content = """
+    String content = '''
 import 'package:foo/foo.dart' as f;
 blankLine() {
   print(f.$selection);
 }
-""";
-    List<ImportedElements> elementsList = await _computeElements(
-        content, content.indexOf(selection), selection.length);
-    expect(elementsList, hasLength(1));
-    ImportedElements elements = elementsList[0];
-    expect(elements, isNotNull);
-    expect(elements.path, convertPath('/.pub-cache/foo/lib/foo.dart'));
-    expect(elements.prefix, '');
-    expect(elements.elements, unorderedEquals(['Foo']));
+''';
+    await _computeElements(content, selection);
+    assertElements([
+      new ImportedElements('/.pub-cache/foo/lib/foo.dart', '', ['Foo']),
+    ]);
   }
 
   test_package_prefixedAndNot() async {
@@ -338,64 +359,64 @@
 }
 ''');
     String selection = "f.Foo.first + Foo.second";
-    String content = """
+    String content = '''
 import 'package:foo/foo.dart';
 import 'package:foo/foo.dart' as f;
 blankLine() {
   print($selection);
 }
-""";
-    List<ImportedElements> elementsList = await _computeElements(
-        content, content.indexOf(selection), selection.length);
-
-    expect(elementsList, hasLength(2));
-    ImportedElements elements1 = elementsList[0];
-    ImportedElements elements2 = elementsList[1];
-    ImportedElements notPrefixedElements;
-    ImportedElements prefixedElements;
-    if (elements1.prefix == '') {
-      prefixedElements = elements2;
-      notPrefixedElements = elements1;
-    } else {
-      prefixedElements = elements1;
-      notPrefixedElements = elements2;
-    }
-
-    expect(notPrefixedElements, isNotNull);
-    expect(
-        notPrefixedElements.path, convertPath('/.pub-cache/foo/lib/foo.dart'));
-    expect(notPrefixedElements.prefix, '');
-    expect(notPrefixedElements.elements, unorderedEquals(['Foo']));
-
-    expect(prefixedElements, isNotNull);
-    expect(prefixedElements.path, convertPath('/.pub-cache/foo/lib/foo.dart'));
-    expect(prefixedElements.prefix, 'f');
-    expect(prefixedElements.elements, unorderedEquals(['Foo']));
+''';
+    await _computeElements(content, selection);
+    assertElements([
+      new ImportedElements('/.pub-cache/foo/lib/foo.dart', '', ['Foo']),
+      new ImportedElements('/.pub-cache/foo/lib/foo.dart', 'f', ['Foo']),
+    ]);
   }
 
   test_self() async {
     String selection = 'A parent;';
-    String content = """
+    String content = '''
 class A {
   $selection
 }
-""";
-    List<ImportedElements> elementsList = await _computeElements(
-        content, content.indexOf(selection), selection.length);
-    expect(elementsList, hasLength(1));
-    ImportedElements elements = elementsList[0];
-    expect(elements, isNotNull);
-    expect(elements.path, sourcePath);
-    expect(elements.prefix, '');
-    expect(elements.elements, unorderedEquals(['A']));
+''';
+    await _computeElements(content, selection);
+    assertElements([
+      new ImportedElements(sourcePath, '', ['A']),
+    ]);
   }
 
-  Future<List<ImportedElements>> _computeElements(
-      String sourceContent, int offset, int length) async {
-    newFile(sourcePath, content: sourceContent);
+  test_wholeFile_noImports() async {
+    String content = '''
+blankLine() {
+  String s = '';
+  print(s);
+}
+''';
+    await _computeElements(content, content);
+    assertElements([
+      new ImportedElements('/sdk/lib/core/core.dart', '', ['String', 'print']),
+    ]);
+  }
+
+  test_wholeFile_withImports() async {
+    String content = '''
+import 'dart:math';
+bool randomBool() {
+  Random r = new Random();
+  return r.nextBool();
+}
+''';
+    await _computeElements(content, content);
+    expect(importedElements, hasLength(0));
+  }
+
+  Future<void> _computeElements(String content, String selection) async {
+    // TODO(brianwilkerson) Automatically extract the selection from the content.
+    newFile(sourcePath, content: content);
     ResolvedUnitResult result = await session.getResolvedUnit(sourcePath);
-    ImportedElementsComputer computer =
-        new ImportedElementsComputer(result.unit, offset, length);
-    return computer.compute();
+    ImportedElementsComputer computer = new ImportedElementsComputer(
+        result.unit, content.indexOf(selection), selection.length);
+    importedElements = computer.compute();
   }
 }
diff --git a/pkg/analysis_server/test/src/computer/outline_computer_test.dart b/pkg/analysis_server/test/src/computer/outline_computer_test.dart
index 643d144c..6fee770 100644
--- a/pkg/analysis_server/test/src/computer/outline_computer_test.dart
+++ b/pkg/analysis_server/test/src/computer/outline_computer_test.dart
@@ -34,9 +34,9 @@
     newFile(testPath, content: code);
     var resolveResult = await session.getResolvedUnit(testPath);
     return new DartUnitOutlineComputer(
-            testPath, resolveResult.lineInfo, resolveResult.unit,
-            withBasicFlutter: true)
-        .compute();
+      resolveResult,
+      withBasicFlutter: true,
+    ).compute();
   }
 }
 
@@ -413,6 +413,66 @@
     }
   }
 
+  test_genericTypeAlias_incomplete() async {
+    Outline unitOutline = await _computeOutline('''
+typedef F = Object;
+''');
+    List<Outline> topOutlines = unitOutline.children;
+    expect(topOutlines, hasLength(1));
+    // F
+    Outline outline_F = topOutlines[0];
+    Element element_F = outline_F.element;
+    expect(element_F.kind, ElementKind.FUNCTION_TYPE_ALIAS);
+    expect(element_F.name, "F");
+    {
+      Location location = element_F.location;
+      expect(location.offset, testCode.indexOf("F ="));
+      expect(location.length, 'F'.length);
+    }
+    expect(element_F.parameters, '');
+    expect(element_F.returnType, '');
+  }
+
+  test_genericTypeAlias_minimal() async {
+    Outline unitOutline = await _computeOutline('''
+typedef F = void Function();
+''');
+    List<Outline> topOutlines = unitOutline.children;
+    expect(topOutlines, hasLength(1));
+    // F
+    Outline outline_F = topOutlines[0];
+    Element element_F = outline_F.element;
+    expect(element_F.kind, ElementKind.FUNCTION_TYPE_ALIAS);
+    expect(element_F.name, "F");
+    {
+      Location location = element_F.location;
+      expect(location.offset, testCode.indexOf("F ="));
+      expect(location.length, 'F'.length);
+    }
+    expect(element_F.parameters, '()');
+    expect(element_F.returnType, 'void');
+  }
+
+  test_genericTypeAlias_noReturnType() async {
+    Outline unitOutline = await _computeOutline('''
+typedef F = Function();
+''');
+    List<Outline> topOutlines = unitOutline.children;
+    expect(topOutlines, hasLength(1));
+    // F
+    Outline outline_F = topOutlines[0];
+    Element element_F = outline_F.element;
+    expect(element_F.kind, ElementKind.FUNCTION_TYPE_ALIAS);
+    expect(element_F.name, "F");
+    {
+      Location location = element_F.location;
+      expect(location.offset, testCode.indexOf("F ="));
+      expect(location.length, 'F'.length);
+    }
+    expect(element_F.parameters, '()');
+    expect(element_F.returnType, '');
+  }
+
   test_groupAndTest() async {
     Outline outline = await _computeOutline('''
 void group(name, closure) {}
diff --git a/pkg/analysis_server/test/src/domains/completion/available_suggestion_sets_test.dart b/pkg/analysis_server/test/src/domains/completion/available_suggestion_sets_test.dart
index ecf6d0cd..d94ac33 100644
--- a/pkg/analysis_server/test/src/domains/completion/available_suggestion_sets_test.dart
+++ b/pkg/analysis_server/test/src/domains/completion/available_suggestion_sets_test.dart
@@ -52,7 +52,9 @@
     var uriStr = 'package:test/a.dart';
 
     newFile(path, content: r'''
-class A {}
+class A {
+  A.a();
+}
 ''');
 
     var set = await waitForSetWithUri(uriStr);
@@ -72,10 +74,33 @@
     "flags": 0
   },
   "relevanceTags": [
-    "package:test/a.dart::A"
+    "package:test/a.dart::A",
+    "A"
   ]
 }
 ''');
+    assertJsonText(_getSuggestion(set, 'A.a'), '''
+{
+  "label": "A.a",
+  "element": {
+    "kind": "CONSTRUCTOR",
+    "name": "a",
+    "location": {
+      "file": ${jsonOfPath(path)},
+      "offset": 14,
+      "length": 0,
+      "startLine": 2,
+      "startColumn": 5
+    },
+    "flags": 0,
+    "parameters": "()",
+    "returnType": "A"
+  },
+  "parameterNames": [],
+  "parameterTypes": [],
+  "requiredParameterCount": 0
+}
+''');
   }
 
   test_suggestion_enum() async {
@@ -106,7 +131,8 @@
     "flags": 0
   },
   "relevanceTags": [
-    "package:test/a.dart::MyEnum"
+    "package:test/a.dart::MyEnum",
+    "MyEnum"
   ]
 }
 ''');
@@ -126,7 +152,8 @@
     "flags": 0
   },
   "relevanceTags": [
-    "package:test/a.dart::MyEnum"
+    "package:test/a.dart::MyEnum",
+    "aaa"
   ]
 }
 ''');
@@ -146,7 +173,8 @@
     "flags": 0
   },
   "relevanceTags": [
-    "package:test/a.dart::MyEnum"
+    "package:test/a.dart::MyEnum",
+    "bbb"
   ]
 }
 ''');
@@ -181,7 +209,8 @@
     "returnType": ""
   },
   "relevanceTags": [
-    "dart:core::bool"
+    "dart:core::bool",
+    "boolV"
   ]
 }
 ''');
@@ -202,7 +231,8 @@
     "returnType": ""
   },
   "relevanceTags": [
-    "dart:core::int"
+    "dart:core::int",
+    "intV"
   ]
 }
 ''');
@@ -223,7 +253,8 @@
     "returnType": ""
   },
   "relevanceTags": [
-    "dart:core::double"
+    "dart:core::double",
+    "doubleV"
   ]
 }
 ''');
@@ -244,7 +275,8 @@
     "returnType": ""
   },
   "relevanceTags": [
-    "dart:core::String"
+    "dart:core::String",
+    "stringV"
   ]
 }
 ''');
diff --git a/pkg/analysis_server/test/src/domains/completion/get_suggestion_details_test.dart b/pkg/analysis_server/test/src/domains/completion/get_suggestion_details_test.dart
index 84fdccb..e99991e 100644
--- a/pkg/analysis_server/test/src/domains/completion/get_suggestion_details_test.dart
+++ b/pkg/analysis_server/test/src/domains/completion/get_suggestion_details_test.dart
@@ -32,9 +32,11 @@
 
     var set = await waitForSetWithUri('package:test/a.dart');
     var result = await _getSuggestionDetails(
-      id: set.id,
-      label: 'MyEnum.aaa',
-      offset: testCode.indexOf('} // ref'),
+      _buildRequest(
+        id: set.id,
+        label: 'MyEnum.aaa',
+        offset: testCode.indexOf('} // ref'),
+      ),
     );
 
     expect(result.completion, 'MyEnum.aaa');
@@ -54,9 +56,11 @@
 
     var mathSet = await waitForSetWithUri('dart:math');
     var result = await _getSuggestionDetails(
-      id: mathSet.id,
-      label: 'sin',
-      offset: testCode.indexOf('} // ref'),
+      _buildRequest(
+        id: mathSet.id,
+        label: 'sin',
+        offset: testCode.indexOf('} // ref'),
+      ),
     );
 
     expect(result.completion, 'sin');
@@ -72,15 +76,42 @@
 
     var mathSet = await waitForSetWithUri('dart:math');
     var result = await _getSuggestionDetails(
-      id: mathSet.id,
-      label: 'sin',
-      offset: testCode.indexOf('} // ref'),
+      _buildRequest(
+        id: mathSet.id,
+        label: 'sin',
+        offset: testCode.indexOf('} // ref'),
+      ),
     );
 
     expect(result.completion, 'math.sin');
     _assertEmptyChange(result.change);
   }
 
+  test_invalid_label() async {
+    addTestFile(r'''
+import 'dart:math';
+
+main() {} // ref
+''');
+
+    var mathSet = await waitForSetWithUri('dart:math');
+
+    var response = await waitResponse(
+      _buildRequest(id: mathSet.id, label: 'foo', offset: 0),
+    );
+
+    expect(response.error.code, RequestErrorCode.INVALID_PARAMETER);
+  }
+
+  test_invalid_library() async {
+    addTestFile('');
+
+    var response = await waitResponse(
+      _buildRequest(id: -1, label: 'foo', offset: 0),
+    );
+    expect(response.error.code, RequestErrorCode.INVALID_PARAMETER);
+  }
+
   test_newImport() async {
     addTestFile(r'''
 main() {} // ref
@@ -88,9 +119,11 @@
 
     var mathSet = await waitForSetWithUri('dart:math');
     var result = await _getSuggestionDetails(
-      id: mathSet.id,
-      label: 'sin',
-      offset: testCode.indexOf('} // ref'),
+      _buildRequest(
+        id: mathSet.id,
+        label: 'sin',
+        offset: testCode.indexOf('} // ref'),
+      ),
     );
 
     expect(result.completion, 'sin');
@@ -101,6 +134,35 @@
 ''');
   }
 
+  test_newImport_part() async {
+    var partCode = r'''
+part of 'test.dart';
+
+main() {} // ref
+''';
+    var partPath = newFile('/home/test/lib/a.dart', content: partCode).path;
+    addTestFile(r'''
+part 'a.dart';
+''');
+
+    var mathSet = await waitForSetWithUri('dart:math');
+    var result = await _getSuggestionDetails(
+      _buildRequest(
+        file: partPath,
+        id: mathSet.id,
+        label: 'sin',
+        offset: partCode.indexOf('} // ref'),
+      ),
+    );
+
+    expect(result.completion, 'sin');
+    _assertTestFileChange(result.change, r'''
+import 'dart:math';
+
+part 'a.dart';
+''');
+  }
+
   void _assertEmptyChange(SourceChange change) {
     expect(change.edits, isEmpty);
   }
@@ -116,21 +178,23 @@
     expect(SourceEdit.applySequence(testCode, edits), expected);
   }
 
-  Future<CompletionGetSuggestionDetailsResult> _getSuggestionDetails({
+  Request _buildRequest({
     String file,
     @required int id,
     @required String label,
     @required int offset,
-  }) async {
-    file ??= testFile;
-    var response = await waitResponse(
-      CompletionGetSuggestionDetailsParams(
-        file,
-        id,
-        label,
-        offset,
-      ).toRequest('0'),
-    );
+  }) {
+    return CompletionGetSuggestionDetailsParams(
+      file ?? testFile,
+      id,
+      label,
+      offset,
+    ).toRequest('0');
+  }
+
+  Future<CompletionGetSuggestionDetailsResult> _getSuggestionDetails(
+      Request request) async {
+    var response = await waitResponse(request);
     return CompletionGetSuggestionDetailsResult.fromResponse(response);
   }
 }
diff --git a/pkg/analysis_server/test/src/domains/completion/get_suggestions_available_test.dart b/pkg/analysis_server/test/src/domains/completion/get_suggestions_available_test.dart
index 0de95fdf..600a33a 100644
--- a/pkg/analysis_server/test/src/domains/completion/get_suggestions_available_test.dart
+++ b/pkg/analysis_server/test/src/domains/completion/get_suggestions_available_test.dart
@@ -22,14 +22,86 @@
     var asyncSet = await waitForSetWithUri('dart:async');
 
     var results = await _getSuggestions(testFile, 0);
-    expect(results.includedSuggestionKinds, isNotEmpty);
+    expect(results.includedElementKinds, isNotEmpty);
 
     var includedIdSet = results.includedSuggestionSets.map((set) => set.id);
     expect(includedIdSet, contains(mathSet.id));
     expect(includedIdSet, contains(asyncSet.id));
   }
 
-  test_includedSuggestionKinds_type() async {
+  test_dart_instanceCreationExpression() async {
+    addTestFile(r'''
+main() {
+  new ; // ref
+}
+''');
+
+    var mathSet = await waitForSetWithUri('dart:math');
+    var asyncSet = await waitForSetWithUri('dart:async');
+
+    var results = await _getSuggestions(testFile, findOffset('; // ref'));
+    expect(
+      results.includedElementKinds,
+      unorderedEquals([ElementKind.CONSTRUCTOR]),
+    );
+
+    var includedIdSet = results.includedSuggestionSets.map((set) => set.id);
+    expect(includedIdSet, contains(mathSet.id));
+    expect(includedIdSet, contains(asyncSet.id));
+  }
+
+  test_defaultArgumentListString() async {
+    newFile('/home/test/lib/a.dart', content: r'''
+void fff(int aaa, int bbb) {}
+
+void ggg({int aaa, @required int bbb, @required int ccc}) {}
+''');
+
+    var aSet = await waitForSetWithUri('package:test/a.dart');
+
+    var fff = aSet.items.singleWhere((e) => e.label == 'fff');
+    expect(fff.defaultArgumentListString, 'aaa, bbb');
+    expect(fff.defaultArgumentListTextRanges, [0, 3, 5, 3]);
+
+    var ggg = aSet.items.singleWhere((e) => e.label == 'ggg');
+    expect(ggg.defaultArgumentListString, 'bbb: null, ccc: null');
+    expect(ggg.defaultArgumentListTextRanges, [5, 4, 16, 4]);
+  }
+
+  test_displayUri_file() async {
+    var aPath = '/home/test/test/a.dart';
+    newFile(aPath, content: 'class A {}');
+
+    var aSet = await waitForSetWithUri(toUriStr(aPath));
+
+    var testPath = newFile('/home/test/test/sub/test.dart').path;
+    var results = await _getSuggestions(testPath, 0);
+
+    expect(
+      results.includedSuggestionSets.singleWhere((set) {
+        return set.id == aSet.id;
+      }).displayUri,
+      '../a.dart',
+    );
+  }
+
+  test_displayUri_package() async {
+    var aPath = '/home/test/lib/a.dart';
+    newFile(aPath, content: 'class A {}');
+
+    var aSet = await waitForSetWithUri('package:test/a.dart');
+    var testPath = newFile('/home/test/lib/test.dart').path;
+
+    var results = await _getSuggestions(testPath, 0);
+    expect(
+      results.includedSuggestionSets.singleWhere((set) {
+        return set.id == aSet.id;
+      }).displayUri,
+      isNull,
+    );
+  }
+
+  test_includedElementKinds_type() async {
     addTestFile(r'''
 class X extends {} // ref
 ''');
@@ -40,7 +112,7 @@
     );
 
     expect(
-      results.includedSuggestionKinds,
+      results.includedElementKinds,
       unorderedEquals([
         ElementKind.CLASS,
         ElementKind.CLASS_TYPE_ALIAS,
@@ -51,7 +123,7 @@
     );
   }
 
-  test_includedSuggestionKinds_value() async {
+  test_includedElementKinds_value() async {
     addTestFile(r'''
 main() {
   print(); // ref
@@ -64,10 +136,11 @@
     );
 
     expect(
-      results.includedSuggestionKinds,
+      results.includedElementKinds,
       unorderedEquals([
         ElementKind.CLASS,
         ElementKind.CLASS_TYPE_ALIAS,
+        ElementKind.CONSTRUCTOR,
         ElementKind.ENUM,
         ElementKind.ENUM_CONSTANT,
         ElementKind.FUNCTION,
diff --git a/pkg/analysis_server/test/src/flutter/flutter_outline_computer_test.dart b/pkg/analysis_server/test/src/flutter/flutter_outline_computer_test.dart
index 18df136..fe6ebd6 100644
--- a/pkg/analysis_server/test/src/flutter/flutter_outline_computer_test.dart
+++ b/pkg/analysis_server/test/src/flutter/flutter_outline_computer_test.dart
@@ -102,6 +102,11 @@
     expect(attribute.label, '…');
   }
 
+  test_attributes_setLiteral() async {
+    var attribute = await _getAttribute('test', '{1, 2}');
+    expect(attribute.label, '{…}');
+  }
+
   test_attributes_string_interpolation() async {
     FlutterOutline unitOutline = await _computeOutline(r'''
 import 'package:flutter/widgets.dart';
@@ -200,6 +205,33 @@
     }
   }
 
+  test_children_withCollectionElements() async {
+    FlutterOutline unitOutline = await _computeOutline('''
+import 'package:flutter/widgets.dart';
+
+class MyWidget extends StatelessWidget {
+  @override
+  Widget build(BuildContext context) {
+    bool includeB = true;
+    return new Column(children: [
+      const Text('aaa'),
+      if (includeB) const Text('bbb'),
+      for (int s in ['ccc', 'ddd'] const Text(s),
+    ]);
+  }
+}
+''');
+
+    expect(_toText(unitOutline), r'''
+(D) MyWidget
+  (D) build
+    Column
+      Text
+      Text
+      Text
+''');
+  }
+
   test_codeOffsetLength() async {
     FlutterOutline unitOutline = await _computeOutline('''
 import 'package:flutter/widgets.dart';
@@ -626,8 +658,7 @@
     testCode = code;
     newFile(testPath, content: code);
     resolveResult = await session.getResolvedUnit(testPath);
-    computer = new FlutterOutlineComputer(testPath, testCode,
-        resolveResult.lineInfo, resolveResult.unit, resolveResult.typeProvider);
+    computer = new FlutterOutlineComputer(resolveResult);
     return computer.compute();
   }
 
diff --git a/pkg/analysis_server/test/src/lsp/test_all.dart b/pkg/analysis_server/test/src/lsp/test_all.dart
new file mode 100644
index 0000000..fa29bbd
--- /dev/null
+++ b/pkg/analysis_server/test/src/lsp/test_all.dart
@@ -0,0 +1,13 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'lsp_packet_transformer_test.dart' as lsp_packet_transformer;
+
+main() {
+  defineReflectiveSuite(() {
+    lsp_packet_transformer.main();
+  }, name: 'lsp');
+}
diff --git a/pkg/analysis_server/test/src/nullability/migration_visitor_test.dart b/pkg/analysis_server/test/src/nullability/migration_visitor_test.dart
index 88c6a34..c3b1915 100644
--- a/pkg/analysis_server/test/src/nullability/migration_visitor_test.dart
+++ b/pkg/analysis_server/test/src/nullability/migration_visitor_test.dart
@@ -7,6 +7,7 @@
 import 'package:analysis_server/src/nullability/constraint_variable_gatherer.dart';
 import 'package:analysis_server/src/nullability/decorated_type.dart';
 import 'package:analysis_server/src/nullability/expression_checks.dart';
+import 'package:analysis_server/src/nullability/nullability_node.dart';
 import 'package:analysis_server/src/nullability/transitional_api.dart';
 import 'package:analysis_server/src/nullability/unit_propagation.dart';
 import 'package:analyzer/dart/ast/ast.dart';
@@ -48,6 +49,14 @@
             predicate((_Clause clause) => clause.consequence == consequence))));
   }
 
+  void assertNonNullIntent(NullabilityNode node, bool expected) {
+    if (expected) {
+      assertConstraint([], node.nonNullIntent);
+    } else {
+      assertNoConstraints(node.nonNullIntent);
+    }
+  }
+
   /// Gets the [ExpressionChecks] associated with the expression whose text
   /// representation is [text], or `null` if the expression has no
   /// [ExpressionChecks] associated with it.
@@ -78,7 +87,7 @@
 }
 ''');
 
-    assertConstraint([], decoratedTypeAnnotation('int i').nonNullIntent);
+    assertNonNullIntent(decoratedTypeAnnotation('int i').node, true);
   }
 
   test_binaryExpression_add_left_check() async {
@@ -86,7 +95,7 @@
 int f(int i, int j) => i + j;
 ''');
 
-    assertConstraint([decoratedTypeAnnotation('int i').nullable],
+    assertConstraint([decoratedTypeAnnotation('int i').node.nullable],
         checkExpression('i +').nullCheck);
   }
 
@@ -98,7 +107,7 @@
 Int f(Int i, Int j) => i + j;
 ''');
 
-    assertConstraint([decoratedTypeAnnotation('Int i').nullable],
+    assertConstraint([decoratedTypeAnnotation('Int i').node.nullable],
         checkExpression('i +').nullCheck);
   }
 
@@ -107,11 +116,13 @@
 class Int {
   Int operator+(Int other) => this;
 }
-Int f(Int i, Int j) => i + j;
+Int f(Int i, Int j) => (i + j);
 ''');
 
-    assertConstraint([decoratedTypeAnnotation('Int operator+').nullable],
-        decoratedTypeAnnotation('Int f').nullable);
+    assertConstraint(
+        [decoratedTypeAnnotation('Int operator+').node.nullable],
+        _either(decoratedTypeAnnotation('Int f').node.nullable,
+            checkExpression('(i + j)').nullCheck));
   }
 
   test_binaryExpression_add_result_not_null() async {
@@ -119,7 +130,7 @@
 int f(int i, int j) => i + j;
 ''');
 
-    assertNoConstraints(decoratedTypeAnnotation('int f').nullable);
+    assertNoConstraints(decoratedTypeAnnotation('int f').node.nullable);
   }
 
   test_binaryExpression_add_right_check() async {
@@ -127,7 +138,7 @@
 int f(int i, int j) => i + j;
 ''');
 
-    assertConstraint([decoratedTypeAnnotation('int j').nullable],
+    assertConstraint([decoratedTypeAnnotation('int j').node.nullable],
         checkExpression('j;').nullCheck);
   }
 
@@ -136,11 +147,13 @@
 class Int {
   Int operator+(Int other) => this;
 }
-Int f(Int i, Int j) => i + j;
+Int f(Int i, Int j) => i + j/*check*/;
 ''');
 
-    assertConstraint([decoratedTypeAnnotation('Int j').nullable],
-        decoratedTypeAnnotation('Int other').nullable);
+    assertConstraint(
+        [decoratedTypeAnnotation('Int j').node.nullable],
+        _either(decoratedTypeAnnotation('Int other').node.nullable,
+            checkExpression('j/*check*/').nullCheck));
   }
 
   test_binaryExpression_equal() async {
@@ -148,7 +161,16 @@
 bool f(int i, int j) => i == j;
 ''');
 
-    assertNoConstraints(decoratedTypeAnnotation('bool f').nullable);
+    assertNoConstraints(decoratedTypeAnnotation('bool f').node.nullable);
+  }
+
+  test_boolLiteral() async {
+    await analyze('''
+bool f() {
+  return true;
+}
+''');
+    assertNoConstraints(decoratedTypeAnnotation('bool').node.nullable);
   }
 
   test_conditionalExpression_condition_check() async {
@@ -158,7 +180,7 @@
 }
 ''');
 
-    var nullable_b = decoratedTypeAnnotation('bool b').nullable;
+    var nullable_b = decoratedTypeAnnotation('bool b').node.nullable;
     var check_b = checkExpression('b ?').nullCheck;
     assertConstraint([nullable_b], check_b);
   }
@@ -170,15 +192,16 @@
 }
 ''');
 
-    var nullable_i = decoratedTypeAnnotation('int i').nullable;
-    var nullable_j = decoratedTypeAnnotation('int j').nullable;
-    var nullable_i_or_nullable_j = _mockOr(nullable_i, nullable_j);
-    var nullable_conditional = decoratedExpressionType('(b ?').nullable;
-    var nullable_return = decoratedTypeAnnotation('int f').nullable;
+    var nullable_i = decoratedTypeAnnotation('int i').node.nullable;
+    var nullable_j = decoratedTypeAnnotation('int j').node.nullable;
+    var nullable_i_or_nullable_j = _either(nullable_i, nullable_j);
+    var nullable_conditional = decoratedExpressionType('(b ?').node.nullable;
+    var nullable_return = decoratedTypeAnnotation('int f').node.nullable;
     assertConstraint([nullable_i], nullable_conditional);
     assertConstraint([nullable_j], nullable_conditional);
     assertConstraint([nullable_conditional], nullable_i_or_nullable_j);
-    assertConstraint([nullable_conditional], nullable_return);
+    assertConstraint([nullable_conditional],
+        _either(nullable_return, checkExpression('(b ? i : j)').nullCheck));
   }
 
   test_conditionalExpression_left_non_null() async {
@@ -188,8 +211,8 @@
 }
 ''');
 
-    var nullable_i = decoratedTypeAnnotation('int i').nullable;
-    var nullable_conditional = decoratedExpressionType('(b ?').nullable;
+    var nullable_i = decoratedTypeAnnotation('int i').node.nullable;
+    var nullable_conditional = decoratedExpressionType('(b ?').node.nullable;
     expect(nullable_conditional, same(nullable_i));
   }
 
@@ -200,7 +223,7 @@
 }
 ''');
 
-    var nullable_conditional = decoratedExpressionType('(b ?').nullable;
+    var nullable_conditional = decoratedExpressionType('(b ?').node.nullable;
     expect(nullable_conditional, same(ConstraintVariable.always));
   }
 
@@ -211,8 +234,8 @@
 }
 ''');
 
-    var nullable_i = decoratedTypeAnnotation('int i').nullable;
-    var nullable_conditional = decoratedExpressionType('(b ?').nullable;
+    var nullable_i = decoratedTypeAnnotation('int i').node.nullable;
+    var nullable_conditional = decoratedExpressionType('(b ?').node.nullable;
     expect(nullable_conditional, same(nullable_i));
   }
 
@@ -223,17 +246,19 @@
 }
 ''');
 
-    var nullable_conditional = decoratedExpressionType('(b ?').nullable;
+    var nullable_conditional = decoratedExpressionType('(b ?').node.nullable;
     expect(nullable_conditional, same(ConstraintVariable.always));
   }
 
   test_functionDeclaration_expression_body() async {
     await analyze('''
-int/*1*/ f(int/*2*/ i) => i;
+int/*1*/ f(int/*2*/ i) => i/*3*/;
 ''');
 
-    assertConstraint([decoratedTypeAnnotation('int/*2*/').nullable],
-        decoratedTypeAnnotation('int/*1*/').nullable);
+    assertConstraint(
+        [decoratedTypeAnnotation('int/*2*/').node.nullable],
+        _either(decoratedTypeAnnotation('int/*1*/').node.nullable,
+            checkExpression('i/*3*/').nullCheck));
   }
 
   test_functionDeclaration_parameter_named_default_notNull() async {
@@ -241,7 +266,7 @@
 void f({int i = 1}) {}
 ''');
 
-    assertNoConstraints(decoratedTypeAnnotation('int').nullable);
+    assertNoConstraints(decoratedTypeAnnotation('int').node.nullable);
   }
 
   test_functionDeclaration_parameter_named_default_null() async {
@@ -249,8 +274,8 @@
 void f({int i = null}) {}
 ''');
 
-    assertConstraint(
-        [ConstraintVariable.always], decoratedTypeAnnotation('int').nullable);
+    assertConstraint([ConstraintVariable.always],
+        decoratedTypeAnnotation('int').node.nullable);
   }
 
   test_functionDeclaration_parameter_named_no_default_assume_nullable() async {
@@ -261,7 +286,8 @@
             namedNoDefaultParameterHeuristic:
                 NamedNoDefaultParameterHeuristic.assumeNullable));
 
-    assertConstraint([], decoratedTypeAnnotation('int').nullable);
+    assertConstraint([ConstraintVariable.always],
+        decoratedTypeAnnotation('int').node.nullable);
   }
 
   test_functionDeclaration_parameter_named_no_default_assume_required() async {
@@ -272,7 +298,7 @@
             namedNoDefaultParameterHeuristic:
                 NamedNoDefaultParameterHeuristic.assumeRequired));
 
-    assertNoConstraints(decoratedTypeAnnotation('int').nullable);
+    assertNoConstraints(decoratedTypeAnnotation('int').node.nullable);
   }
 
   test_functionDeclaration_parameter_named_no_default_required_assume_nullable() async {
@@ -285,7 +311,7 @@
             namedNoDefaultParameterHeuristic:
                 NamedNoDefaultParameterHeuristic.assumeNullable));
 
-    assertNoConstraints(decoratedTypeAnnotation('int').nullable);
+    assertNoConstraints(decoratedTypeAnnotation('int').node.nullable);
   }
 
   test_functionDeclaration_parameter_named_no_default_required_assume_required() async {
@@ -298,7 +324,7 @@
             namedNoDefaultParameterHeuristic:
                 NamedNoDefaultParameterHeuristic.assumeRequired));
 
-    assertNoConstraints(decoratedTypeAnnotation('int').nullable);
+    assertNoConstraints(decoratedTypeAnnotation('int').node.nullable);
   }
 
   test_functionDeclaration_parameter_positionalOptional_default_notNull() async {
@@ -306,7 +332,7 @@
 void f([int i = 1]) {}
 ''');
 
-    assertNoConstraints(decoratedTypeAnnotation('int').nullable);
+    assertNoConstraints(decoratedTypeAnnotation('int').node.nullable);
   }
 
   test_functionDeclaration_parameter_positionalOptional_default_null() async {
@@ -314,8 +340,8 @@
 void f([int i = null]) {}
 ''');
 
-    assertConstraint(
-        [ConstraintVariable.always], decoratedTypeAnnotation('int').nullable);
+    assertConstraint([ConstraintVariable.always],
+        decoratedTypeAnnotation('int').node.nullable);
   }
 
   test_functionDeclaration_parameter_positionalOptional_no_default() async {
@@ -323,7 +349,8 @@
 void f([int i]) {}
 ''');
 
-    assertConstraint([], decoratedTypeAnnotation('int').nullable);
+    assertConstraint([ConstraintVariable.always],
+        decoratedTypeAnnotation('int').node.nullable);
   }
 
   test_functionDeclaration_parameter_positionalOptional_no_default_assume_required() async {
@@ -336,31 +363,55 @@
             namedNoDefaultParameterHeuristic:
                 NamedNoDefaultParameterHeuristic.assumeRequired));
 
-    assertConstraint([], decoratedTypeAnnotation('int').nullable);
+    assertConstraint([ConstraintVariable.always],
+        decoratedTypeAnnotation('int').node.nullable);
+  }
+
+  test_functionDeclaration_resets_unconditional_control_flow() async {
+    await analyze('''
+void f(bool b, int i, int j) {
+  assert(i != null);
+  if (b) return;
+  assert(j != null);
+}
+void g(int k) {
+  assert(k != null);
+}
+''');
+    assertNonNullIntent(decoratedTypeAnnotation('int i').node, true);
+    assertNonNullIntent(decoratedTypeAnnotation('int j').node, false);
+    assertNonNullIntent(decoratedTypeAnnotation('int k').node, true);
   }
 
   test_functionInvocation_parameter_fromLocalParameter() async {
     await analyze('''
 void f(int/*1*/ i) {}
 void test(int/*2*/ i) {
-  f(i);
+  f(i/*3*/);
 }
 ''');
 
-    assertConstraint([decoratedTypeAnnotation('int/*2*/').nullable],
-        decoratedTypeAnnotation('int/*1*/').nullable);
+    var int_1 = decoratedTypeAnnotation('int/*1*/');
+    var int_2 = decoratedTypeAnnotation('int/*2*/');
+    var i_3 = checkExpression('i/*3*/');
+    assertConstraint(
+        [int_2.node.nullable], _either(int_1.node.nullable, i_3.nullCheck));
+    assertConstraint(
+        [int_2.node.nullable, int_1.node.nonNullIntent], i_3.nullCheck);
+    assertConstraint([int_1.node.nonNullIntent], int_2.node.nonNullIntent);
   }
 
   test_functionInvocation_parameter_named() async {
     await analyze('''
 void f({int i: 0}) {}
 void g(int j) {
-  f(i: j);
+  f(i: j/*check*/);
 }
 ''');
-    var nullable_i = decoratedTypeAnnotation('int i').nullable;
-    var nullable_j = decoratedTypeAnnotation('int j').nullable;
-    assertConstraint([nullable_j], nullable_i);
+    var nullable_i = decoratedTypeAnnotation('int i').node.nullable;
+    var nullable_j = decoratedTypeAnnotation('int j').node.nullable;
+    assertConstraint([nullable_j],
+        _either(nullable_i, checkExpression('j/*check*/').nullCheck));
   }
 
   test_functionInvocation_parameter_named_missing() async {
@@ -371,7 +422,7 @@
 }
 ''');
     var optional_i = possiblyOptionalParameter('int i');
-    assertConstraint([], optional_i);
+    assertConstraint([], optional_i.nullable);
   }
 
   test_functionInvocation_parameter_named_missing_required() async {
@@ -387,7 +438,7 @@
     // The call at `f()` is presumed to be in error; no constraint is recorded.
     var optional_i = possiblyOptionalParameter('int i');
     expect(optional_i, isNull);
-    var nullable_i = decoratedTypeAnnotation('int i').nullable;
+    var nullable_i = decoratedTypeAnnotation('int i').node.nullable;
     assertNoConstraints(nullable_i);
   }
 
@@ -400,19 +451,23 @@
 ''');
 
     assertConstraint(
-        [ConstraintVariable.always], decoratedTypeAnnotation('int').nullable);
+        [ConstraintVariable.always],
+        _either(decoratedTypeAnnotation('int').node.nullable,
+            checkExpression('null').nullCheck));
   }
 
   test_functionInvocation_return() async {
     await analyze('''
 int/*1*/ f() => 0;
 int/*2*/ g() {
-  return f();
+  return (f());
 }
 ''');
 
-    assertConstraint([decoratedTypeAnnotation('int/*1*/').nullable],
-        decoratedTypeAnnotation('int/*2*/').nullable);
+    assertConstraint(
+        [decoratedTypeAnnotation('int/*1*/').node.nullable],
+        _either(decoratedTypeAnnotation('int/*2*/').node.nullable,
+            checkExpression('(f())').nullCheck));
   }
 
   test_if_condition() async {
@@ -422,7 +477,7 @@
 }
 ''');
 
-    assertConstraint([(decoratedTypeAnnotation('bool b').nullable)],
+    assertConstraint([(decoratedTypeAnnotation('bool b').node.nullable)],
         checkExpression('b) {}').nullCheck);
   }
 
@@ -436,7 +491,7 @@
 }
 ''');
 
-    assertNoConstraints(decoratedTypeAnnotation('int i').nonNullIntent);
+    assertNonNullIntent(decoratedTypeAnnotation('int i').node, false);
   }
 
   test_if_conditional_control_flow_within() async {
@@ -451,28 +506,30 @@
 }
 ''');
 
-    assertNoConstraints(decoratedTypeAnnotation('int i').nonNullIntent);
+    assertNonNullIntent(decoratedTypeAnnotation('int i').node, false);
   }
 
   test_if_guard_equals_null() async {
     await analyze('''
 int f(int i, int j, int k) {
   if (i == null) {
-    return j;
+    return j/*check*/;
   } else {
-    return k;
+    return k/*check*/;
   }
 }
 ''');
-    var nullable_i = decoratedTypeAnnotation('int i').nullable;
-    var nullable_j = decoratedTypeAnnotation('int j').nullable;
-    var nullable_k = decoratedTypeAnnotation('int k').nullable;
-    var nullable_return = decoratedTypeAnnotation('int f').nullable;
-    assertConstraint([nullable_i, nullable_j], nullable_return);
-    assertConstraint([nullable_k], nullable_return);
+    var nullable_i = decoratedTypeAnnotation('int i').node.nullable;
+    var nullable_j = decoratedTypeAnnotation('int j').node.nullable;
+    var nullable_k = decoratedTypeAnnotation('int k').node.nullable;
+    var nullable_return = decoratedTypeAnnotation('int f').node.nullable;
+    assertConstraint([nullable_i, nullable_j],
+        _either(nullable_return, checkExpression('j/*check*/').nullCheck));
+    assertConstraint([nullable_k],
+        _either(nullable_return, checkExpression('k/*check*/').nullCheck));
     var discard = statementDiscard('if (i == null)');
-    expect(discard.keepTrue, same(nullable_i));
-    expect(discard.keepFalse, same(ConstraintVariable.always));
+    expect(discard.trueGuard.nullable, same(nullable_i));
+    expect(discard.falseGuard, null);
     expect(discard.pureCondition, true);
   }
 
@@ -480,33 +537,36 @@
     await analyze('''
 int f(bool b, int i, int j) {
   if (b) {
-    return i;
+    return i/*check*/;
   } else {
-    return j;
+    return j/*check*/;
   }
 }
 ''');
 
-    var nullable_i = decoratedTypeAnnotation('int i').nullable;
-    var nullable_j = decoratedTypeAnnotation('int j').nullable;
-    var nullable_return = decoratedTypeAnnotation('int f').nullable;
-    assertConstraint([nullable_i], nullable_return);
-    assertConstraint([nullable_j], nullable_return);
+    var nullable_i = decoratedTypeAnnotation('int i').node.nullable;
+    var nullable_j = decoratedTypeAnnotation('int j').node.nullable;
+    var nullable_return = decoratedTypeAnnotation('int f').node.nullable;
+    assertConstraint([nullable_i],
+        _either(nullable_return, checkExpression('i/*check*/').nullCheck));
+    assertConstraint([nullable_j],
+        _either(nullable_return, checkExpression('j/*check*/').nullCheck));
   }
 
   test_if_without_else() async {
     await analyze('''
 int f(bool b, int i) {
   if (b) {
-    return i;
+    return i/*check*/;
   }
   return 0;
 }
 ''');
 
-    var nullable_i = decoratedTypeAnnotation('int i').nullable;
-    var nullable_return = decoratedTypeAnnotation('int f').nullable;
-    assertConstraint([nullable_i], nullable_return);
+    var nullable_i = decoratedTypeAnnotation('int i').node.nullable;
+    var nullable_return = decoratedTypeAnnotation('int f').node.nullable;
+    assertConstraint([nullable_i],
+        _either(nullable_return, checkExpression('i/*check*/').nullCheck));
   }
 
   test_intLiteral() async {
@@ -515,7 +575,25 @@
   return 0;
 }
 ''');
-    assertNoConstraints(decoratedTypeAnnotation('int').nullable);
+    assertNoConstraints(decoratedTypeAnnotation('int').node.nullable);
+  }
+
+  test_methodDeclaration_resets_unconditional_control_flow() async {
+    await analyze('''
+class C {
+  void f(bool b, int i, int j) {
+    assert(i != null);
+    if (b) return;
+    assert(j != null);
+  }
+  void g(int k) {
+    assert(k != null);
+  }
+}
+''');
+    assertNonNullIntent(decoratedTypeAnnotation('int i').node, true);
+    assertNonNullIntent(decoratedTypeAnnotation('int j').node, false);
+    assertNonNullIntent(decoratedTypeAnnotation('int k').node, true);
   }
 
   test_methodInvocation_parameter_contravariant() async {
@@ -524,16 +602,19 @@
   void f(T t) {}
 }
 void g(C<int> c, int i) {
-  c.f(i);
+  c.f(i/*check*/);
 }
 ''');
 
-    var nullable_i = decoratedTypeAnnotation('int i').nullable;
+    var nullable_i = decoratedTypeAnnotation('int i').node.nullable;
     var nullable_c_t =
-        decoratedTypeAnnotation('C<int>').typeArguments[0].nullable;
-    var nullable_t = decoratedTypeAnnotation('T t').nullable;
-    var nullable_c_t_or_nullable_t = _mockOr(nullable_c_t, nullable_t);
-    assertConstraint([nullable_i], nullable_c_t_or_nullable_t);
+        decoratedTypeAnnotation('C<int>').typeArguments[0].node.nullable;
+    var nullable_t = decoratedTypeAnnotation('T t').node.nullable;
+    var nullable_c_t_or_nullable_t = _either(nullable_c_t, nullable_t);
+    assertConstraint(
+        [nullable_i],
+        _either(nullable_c_t_or_nullable_t,
+            checkExpression('i/*check*/').nullCheck));
   }
 
   test_methodInvocation_parameter_generic() async {
@@ -541,14 +622,16 @@
 class C<T> {}
 void f(C<int/*1*/>/*2*/ c) {}
 void g(C<int/*3*/>/*4*/ c) {
-  f(c);
+  f(c/*check*/);
 }
 ''');
 
-    assertConstraint([decoratedTypeAnnotation('int/*3*/').nullable],
-        decoratedTypeAnnotation('int/*1*/').nullable);
-    assertConstraint([decoratedTypeAnnotation('C<int/*3*/>/*4*/').nullable],
-        decoratedTypeAnnotation('C<int/*1*/>/*2*/').nullable);
+    assertConstraint([decoratedTypeAnnotation('int/*3*/').node.nullable],
+        decoratedTypeAnnotation('int/*1*/').node.nullable);
+    assertConstraint(
+        [decoratedTypeAnnotation('C<int/*3*/>/*4*/').node.nullable],
+        _either(decoratedTypeAnnotation('C<int/*1*/>/*2*/').node.nullable,
+            checkExpression('c/*check*/').nullCheck));
   }
 
   test_methodInvocation_parameter_named() async {
@@ -557,12 +640,13 @@
   void f({int i: 0}) {}
 }
 void g(C c, int j) {
-  c.f(i: j);
+  c.f(i: j/*check*/);
 }
 ''');
-    var nullable_i = decoratedTypeAnnotation('int i').nullable;
-    var nullable_j = decoratedTypeAnnotation('int j').nullable;
-    assertConstraint([nullable_j], nullable_i);
+    var nullable_i = decoratedTypeAnnotation('int i').node.nullable;
+    var nullable_j = decoratedTypeAnnotation('int j').node.nullable;
+    assertConstraint([nullable_j],
+        _either(nullable_i, checkExpression('j/*check*/').nullCheck));
   }
 
   test_methodInvocation_target_check() async {
@@ -575,10 +659,23 @@
 }
 ''');
 
-    assertConstraint([decoratedTypeAnnotation('C c').nullable],
+    assertConstraint([decoratedTypeAnnotation('C c').node.nullable],
         checkExpression('c.m').nullCheck);
   }
 
+  test_methodInvocation_target_demonstrates_non_null_intent() async {
+    await analyze('''
+class C {
+  void m() {}
+}
+void test(C c) {
+  c.m();
+}
+''');
+
+    assertNonNullIntent(decoratedTypeAnnotation('C c').node, true);
+  }
+
   test_parenthesizedExpression() async {
     await analyze('''
 int f() {
@@ -587,7 +684,9 @@
 ''');
 
     assertConstraint(
-        [ConstraintVariable.always], decoratedTypeAnnotation('int').nullable);
+        [ConstraintVariable.always],
+        _either(decoratedTypeAnnotation('int').node.nullable,
+            checkExpression('(null)').nullCheck));
   }
 
   test_return_implicit_null() async {
@@ -598,8 +697,8 @@
 }
 ''');
 
-    assertConstraint(
-        [ConstraintVariable.always], decoratedTypeAnnotation('int').nullable);
+    assertConstraint([ConstraintVariable.always],
+        decoratedTypeAnnotation('int').node.nullable);
   }
 
   test_return_null() async {
@@ -610,7 +709,9 @@
 ''');
 
     assertConstraint(
-        [ConstraintVariable.always], decoratedTypeAnnotation('int').nullable);
+        [ConstraintVariable.always],
+        _either(decoratedTypeAnnotation('int').node.nullable,
+            checkExpression('null').nullCheck));
   }
 
   test_stringLiteral() async {
@@ -620,7 +721,7 @@
   return 'x';
 }
 ''');
-    assertNoConstraints(decoratedTypeAnnotation('String').nullable);
+    assertNoConstraints(decoratedTypeAnnotation('String').node.nullable);
   }
 
   test_thisExpression() async {
@@ -630,7 +731,7 @@
 }
 ''');
 
-    assertNoConstraints(decoratedTypeAnnotation('C f').nullable);
+    assertNoConstraints(decoratedTypeAnnotation('C f').node.nullable);
   }
 
   test_throwExpression() async {
@@ -639,7 +740,7 @@
   return throw null;
 }
 ''');
-    assertNoConstraints(decoratedTypeAnnotation('int').nullable);
+    assertNoConstraints(decoratedTypeAnnotation('int').node.nullable);
   }
 
   test_typeName() async {
@@ -648,14 +749,14 @@
   return int;
 }
 ''');
-    assertNoConstraints(decoratedTypeAnnotation('Type').nullable);
+    assertNoConstraints(decoratedTypeAnnotation('Type').node.nullable);
   }
 
   /// Creates a variable representing the disjunction of [a] and [b] solely for
   /// the purpose of inspecting constraint equations in unit tests.  No
   /// additional constraints will be recorded in [_constraints] as a consequence
   /// of creating this variable.
-  ConstraintVariable _mockOr(ConstraintVariable a, ConstraintVariable b) =>
+  ConstraintVariable _either(ConstraintVariable a, ConstraintVariable b) =>
       ConstraintVariable.or(_MockConstraints(), a, b);
 }
 
@@ -690,7 +791,7 @@
     var decoratedType = decoratedTypeAnnotation('int?');
     expect(decoratedFunctionType('f').positionalParameters[0],
         same(decoratedType));
-    expect(decoratedType.nullable, same(ConstraintVariable.always));
+    expect(decoratedType.node.nullable, same(ConstraintVariable.always));
   }
 
   test_interfaceType_typeParameter() async {
@@ -700,10 +801,10 @@
     var decoratedListType = decoratedTypeAnnotation('List<int>');
     expect(decoratedFunctionType('f').positionalParameters[0],
         same(decoratedListType));
-    expect(decoratedListType.nullable, isNotNull);
+    expect(decoratedListType.node.nullable, isNotNull);
     var decoratedIntType = decoratedTypeAnnotation('int');
     expect(decoratedListType.typeArguments[0], same(decoratedIntType));
-    expect(decoratedIntType.nullable, isNotNull);
+    expect(decoratedIntType.node.nullable, isNotNull);
   }
 
   test_topLevelFunction_parameterType_implicit_dynamic() async {
@@ -715,7 +816,7 @@
     expect(decoratedFunctionType('f').positionalParameters[0],
         same(decoratedType));
     expect(decoratedType.type.isDynamic, isTrue);
-    expect(decoratedType.nullable, same(ConstraintVariable.always));
+    expect(decoratedType.node.nullable, same(ConstraintVariable.always));
   }
 
   test_topLevelFunction_parameterType_named_no_default() async {
@@ -725,10 +826,9 @@
     var decoratedType = decoratedTypeAnnotation('String');
     var functionType = decoratedFunctionType('f');
     expect(functionType.namedParameters['s'], same(decoratedType));
-    expect(decoratedType.nullable, isNotNull);
-    expect(decoratedType.nullable, isNot(same(ConstraintVariable.always)));
-    expect(functionType.namedParameterOptionalVariables['s'],
-        same(decoratedType.nullable));
+    expect(decoratedType.node.nullable, isNotNull);
+    expect(decoratedType.node.nullable, isNot(same(ConstraintVariable.always)));
+    expect(functionType.namedParameters['s'].node.isPossiblyOptional, true);
   }
 
   test_topLevelFunction_parameterType_named_no_default_required() async {
@@ -740,9 +840,9 @@
     var decoratedType = decoratedTypeAnnotation('String');
     var functionType = decoratedFunctionType('f');
     expect(functionType.namedParameters['s'], same(decoratedType));
-    expect(decoratedType.nullable, isNotNull);
-    expect(decoratedType.nullable, isNot(same(ConstraintVariable.always)));
-    expect(functionType.namedParameterOptionalVariables['s'], isNull);
+    expect(decoratedType.node.nullable, isNotNull);
+    expect(decoratedType.node.nullable, isNot(same(ConstraintVariable.always)));
+    expect(functionType.namedParameters['s'].node.isPossiblyOptional, false);
   }
 
   test_topLevelFunction_parameterType_named_with_default() async {
@@ -752,9 +852,8 @@
     var decoratedType = decoratedTypeAnnotation('String');
     var functionType = decoratedFunctionType('f');
     expect(functionType.namedParameters['s'], same(decoratedType));
-    expect(decoratedType.nullable, isNotNull);
-    expect(functionType.namedParameterOptionalVariables['s'],
-        same(ConstraintVariable.always));
+    expect(decoratedType.node.nullable, isNotNull);
+    expect(functionType.namedParameters['s'].node.isPossiblyOptional, false);
   }
 
   test_topLevelFunction_parameterType_positionalOptional() async {
@@ -764,7 +863,7 @@
     var decoratedType = decoratedTypeAnnotation('int');
     expect(decoratedFunctionType('f').positionalParameters[0],
         same(decoratedType));
-    expect(decoratedType.nullable, isNotNull);
+    expect(decoratedType.node.nullable, isNotNull);
   }
 
   test_topLevelFunction_parameterType_simple() async {
@@ -774,8 +873,8 @@
     var decoratedType = decoratedTypeAnnotation('int');
     expect(decoratedFunctionType('f').positionalParameters[0],
         same(decoratedType));
-    expect(decoratedType.nullable, isNotNull);
-    expect(decoratedType.nonNullIntent, isNotNull);
+    expect(decoratedType.node.nullable, isNotNull);
+    expect(decoratedType.node.nonNullIntent, isNotNull);
   }
 
   test_topLevelFunction_returnType_implicit_dynamic() async {
@@ -784,7 +883,7 @@
 ''');
     var decoratedType = decoratedFunctionType('f').returnType;
     expect(decoratedType.type.isDynamic, isTrue);
-    expect(decoratedType.nullable, same(ConstraintVariable.always));
+    expect(decoratedType.node.nullable, same(ConstraintVariable.always));
   }
 
   test_topLevelFunction_returnType_simple() async {
@@ -793,7 +892,7 @@
 ''');
     var decoratedType = decoratedTypeAnnotation('int');
     expect(decoratedFunctionType('f').returnType, same(decoratedType));
-    expect(decoratedType.nullable, isNotNull);
+    expect(decoratedType.node.nullable, isNotNull);
   }
 }
 
@@ -820,7 +919,7 @@
     return _variables.decoratedTypeAnnotation(findNode.typeAnnotation(text));
   }
 
-  ConstraintVariable possiblyOptionalParameter(String text) {
+  NullabilityNode possiblyOptionalParameter(String text) {
     return _variables
         .possiblyOptionalParameter(findNode.defaultParameter(text));
   }
@@ -901,7 +1000,7 @@
 
   final _expressionChecks = <Expression, ExpressionChecks>{};
 
-  final _possiblyOptional = <DefaultFormalParameter, ConstraintVariable>{};
+  final _possiblyOptional = <DefaultFormalParameter, NullabilityNode>{};
 
   /// Gets the [ExpressionChecks] associated with the given [expression].
   ExpressionChecks checkExpression(Expression expression) =>
@@ -919,10 +1018,9 @@
   DecoratedType decoratedTypeAnnotation(TypeAnnotation typeAnnotation) =>
       _decoratedTypeAnnotations[typeAnnotation];
 
-  /// Gets the [ConstraintVariable] associated with the possibility that
+  /// Gets the [NullabilityNode] associated with the possibility that
   /// [parameter] may be optional.
-  ConstraintVariable possiblyOptionalParameter(
-          DefaultFormalParameter parameter) =>
+  NullabilityNode possiblyOptionalParameter(DefaultFormalParameter parameter) =>
       _possiblyOptional[parameter];
 
   @override
@@ -937,22 +1035,24 @@
     _decoratedExpressionTypes[_normalizeExpression(node)] = type;
   }
 
-  void recordDecoratedTypeAnnotation(TypeAnnotation node, DecoratedType type) {
-    super.recordDecoratedTypeAnnotation(node, type);
+  void recordDecoratedTypeAnnotation(
+      Source source, TypeAnnotation node, DecoratedType type) {
+    super.recordDecoratedTypeAnnotation(source, node, type);
     _decoratedTypeAnnotations[node] = type;
   }
 
   @override
-  void recordExpressionChecks(Expression expression, ExpressionChecks checks) {
-    super.recordExpressionChecks(expression, checks);
+  void recordExpressionChecks(
+      Source source, Expression expression, ExpressionChecks checks) {
+    super.recordExpressionChecks(source, expression, checks);
     _expressionChecks[_normalizeExpression(expression)] = checks;
   }
 
   @override
-  void recordPossiblyOptional(Source source, DefaultFormalParameter parameter,
-      ConstraintVariable variable) {
-    _possiblyOptional[parameter] = variable;
-    super.recordPossiblyOptional(source, parameter, variable);
+  void recordPossiblyOptional(
+      Source source, DefaultFormalParameter parameter, NullabilityNode node) {
+    _possiblyOptional[parameter] = node;
+    super.recordPossiblyOptional(source, parameter, node);
   }
 
   /// Unwraps any parentheses surrounding [expression].
diff --git a/pkg/analysis_server/test/src/nullability/provisional_api_test.dart b/pkg/analysis_server/test/src/nullability/provisional_api_test.dart
index 8f9f86e..d96f84d 100644
--- a/pkg/analysis_server/test/src/nullability/provisional_api_test.dart
+++ b/pkg/analysis_server/test/src/nullability/provisional_api_test.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analysis_server/src/nullability/provisional_api.dart';
+import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -11,23 +12,23 @@
 
 main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(ProvisionalApiTest);
-    defineReflectiveTests(ProvisionalApiTestPermissive);
-    defineReflectiveTests(ProvisionalApiTestWithReset);
+    defineReflectiveTests(_ProvisionalApiTest);
+    defineReflectiveTests(_ProvisionalApiTestPermissive);
+    defineReflectiveTests(_ProvisionalApiTestWithReset);
   });
 }
 
 /// Tests of the provisional API.
 @reflectiveTest
-class ProvisionalApiTest extends ProvisionalApiTestBase
-    with ProvisionalApiTestCases {
+class _ProvisionalApiTest extends _ProvisionalApiTestBase
+    with _ProvisionalApiTestCases {
   @override
-  bool get usePermissiveMode => false;
+  bool get _usePermissiveMode => false;
 }
 
 /// Base class for provisional API tests.
-abstract class ProvisionalApiTestBase extends AbstractContextTest {
-  bool get usePermissiveMode;
+abstract class _ProvisionalApiTestBase extends AbstractContextTest {
+  bool get _usePermissiveMode;
 
   /// Hook invoked after calling `prepareInput` on each input.
   void _afterPrepare() {}
@@ -41,9 +42,9 @@
     for (var path in input.keys) {
       newFile(path, content: input[path]);
     }
-    var listener = new TestMigrationListener();
+    var listener = new _TestMigrationListener();
     var migration = NullabilityMigration(listener,
-        permissive: usePermissiveMode, assumptions: assumptions);
+        permissive: _usePermissiveMode, assumptions: assumptions);
     for (var path in input.keys) {
       migration.prepareInput(await session.getResolvedUnit(path));
     }
@@ -53,10 +54,10 @@
     }
     migration.finish();
     var sourceEdits = <String, List<SourceEdit>>{};
-    for (var fix in listener.fixes) {
-      var path = fix.source.fullName;
+    for (var entry in listener._edits.entries) {
+      var path = entry.key.fullName;
       expect(expectedOutput.keys, contains(path));
-      (sourceEdits[path] ??= []).addAll(fix.sourceEdits);
+      sourceEdits[path] = entry.value;
     }
     for (var path in expectedOutput.keys) {
       var sourceEditsForPath = sourceEdits[path] ?? [];
@@ -79,7 +80,119 @@
 }
 
 /// Mixin containing test cases for the provisional API.
-mixin ProvisionalApiTestCases on ProvisionalApiTestBase {
+mixin _ProvisionalApiTestCases on _ProvisionalApiTestBase {
+  test_conditional_assert_statement_does_not_imply_non_null_intent() async {
+    var content = '''
+void f(bool b, int i) {
+  if (b) return;
+  assert(i != null);
+}
+void g(bool b, int i) {
+  if (b) f(b, i);
+}
+main() {
+  g(true, null);
+}
+''';
+    var expected = '''
+void f(bool b, int? i) {
+  if (b) return;
+  assert(i != null);
+}
+void g(bool b, int? i) {
+  if (b) f(b, i);
+}
+main() {
+  g(true, null);
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  test_conditional_dereference_does_not_imply_non_null_intent() async {
+    var content = '''
+void f(bool b, int i) {
+  if (b) i.abs();
+}
+void g(bool b, int i) {
+  if (b) f(b, i);
+}
+main() {
+  g(false, null);
+}
+''';
+    var expected = '''
+void f(bool b, int? i) {
+  if (b) i!.abs();
+}
+void g(bool b, int? i) {
+  if (b) f(b, i);
+}
+main() {
+  g(false, null);
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  test_conditional_non_null_usage_does_not_imply_non_null_intent() async {
+    var content = '''
+void f(bool b, int i, int j) {
+  if (b) i.gcd(j);
+}
+void g(bool b, int i, int j) {
+  if (b) f(b, i, j);
+}
+main() {
+  g(false, 0, null);
+}
+''';
+    var expected = '''
+void f(bool b, int i, int? j) {
+  if (b) i.gcd(j!);
+}
+void g(bool b, int i, int? j) {
+  if (b) f(b, i, j);
+}
+main() {
+  g(false, 0, null);
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  test_conditional_usage_does_not_propagate_non_null_intent() async {
+    var content = '''
+void f(int i) {
+  assert(i != null);
+}
+void g(bool b, int i) {
+  if (b) f(i);
+}
+void h(bool b1, bool b2, int i) {
+  if (b1) g(b2, i);
+}
+main() {
+  h(true, false, null);
+}
+''';
+    var expected = '''
+void f(int i) {
+  assert(i != null);
+}
+void g(bool b, int? i) {
+  if (b) f(i!);
+}
+void h(bool b1, bool b2, int? i) {
+  if (b1) g(b2, i);
+}
+main() {
+  h(true, false, null);
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
   test_data_flow_generic_inward() async {
     var content = '''
 class C<T> {
@@ -255,6 +368,31 @@
                 NamedNoDefaultParameterHeuristic.assumeNullable));
   }
 
+  test_named_parameter_no_default_unused_option2_assume_nullable_propagate() async {
+    var content = '''
+void f(String s) {}
+void g({String s}) {
+  f(s);
+}
+main() {
+  g();
+}
+''';
+    var expected = '''
+void f(String? s) {}
+void g({String? s}) {
+  f(s);
+}
+main() {
+  g();
+}
+''';
+    await _checkSingleFileChanges(content, expected,
+        assumptions: NullabilityMigrationAssumptions(
+            namedNoDefaultParameterHeuristic:
+                NamedNoDefaultParameterHeuristic.assumeNullable));
+  }
+
   test_named_parameter_no_default_unused_option2_assume_required() async {
     var content = '''
 void f({String s}) {}
@@ -274,6 +412,31 @@
                 NamedNoDefaultParameterHeuristic.assumeRequired));
   }
 
+  test_named_parameter_no_default_unused_option2_assume_required_propagate() async {
+    var content = '''
+void f(String s) {}
+void g({String s}) {
+  f(s);
+}
+main() {
+  g();
+}
+''';
+    var expected = '''
+void f(String? s) {}
+void g({String? s}) {
+  f(s);
+}
+main() {
+  g();
+}
+''';
+    await _checkSingleFileChanges(content, expected,
+        assumptions: NullabilityMigrationAssumptions(
+            namedNoDefaultParameterHeuristic:
+                NamedNoDefaultParameterHeuristic.assumeRequired));
+  }
+
   test_named_parameter_no_default_unused_required_option2_assume_nullable() async {
     // The `@required` annotation overrides the assumption of nullability.
     // The call at `f()` is presumed to be in error.
@@ -342,6 +505,31 @@
                 NamedNoDefaultParameterHeuristic.assumeNullable));
   }
 
+  test_named_parameter_no_default_used_non_null_option2_assume_nullable_propagate() async {
+    var content = '''
+void f(String s) {}
+void g({String s}) {
+  f(s);
+}
+main() {
+  g(s: 'x');
+}
+''';
+    var expected = '''
+void f(String? s) {}
+void g({String? s}) {
+  f(s);
+}
+main() {
+  g(s: 'x');
+}
+''';
+    await _checkSingleFileChanges(content, expected,
+        assumptions: NullabilityMigrationAssumptions(
+            namedNoDefaultParameterHeuristic:
+                NamedNoDefaultParameterHeuristic.assumeNullable));
+  }
+
   test_named_parameter_no_default_used_non_null_option2_assume_required() async {
     var content = '''
 void f({String s}) {}
@@ -350,6 +538,7 @@
 }
 ''';
     var expected = '''
+import 'package:meta/meta.dart';
 void f({@required String s}) {}
 main() {
   f(s: 'x');
@@ -361,6 +550,32 @@
                 NamedNoDefaultParameterHeuristic.assumeRequired));
   }
 
+  test_named_parameter_no_default_used_non_null_option2_assume_required_propagate() async {
+    var content = '''
+void f(String s) {}
+void g({String s}) {
+  f(s);
+}
+main() {
+  g(s: 'x');
+}
+''';
+    var expected = '''
+import 'package:meta/meta.dart';
+void f(String s) {}
+void g({@required String s}) {
+  f(s);
+}
+main() {
+  g(s: 'x');
+}
+''';
+    await _checkSingleFileChanges(content, expected,
+        assumptions: NullabilityMigrationAssumptions(
+            namedNoDefaultParameterHeuristic:
+                NamedNoDefaultParameterHeuristic.assumeRequired));
+  }
+
   test_named_parameter_no_default_used_non_null_required_option2_assume_required() async {
     // Even if we are using the "assumeRequired" heuristic, we should not add a
     // duplicate `@required` annotation.
@@ -577,23 +792,133 @@
     await _checkMultipleFileChanges(
         {path1: file1, path2: file2}, {path1: expected1, path2: expected2});
   }
+
+  test_unconditional_assert_statement_implies_non_null_intent() async {
+    var content = '''
+void f(int i) {
+  assert(i != null);
+}
+void g(bool b, int i) {
+  if (b) f(i);
+}
+main() {
+  g(false, null);
+}
+''';
+    var expected = '''
+void f(int i) {
+  assert(i != null);
+}
+void g(bool b, int? i) {
+  if (b) f(i!);
+}
+main() {
+  g(false, null);
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  test_unconditional_dereference_implies_non_null_intent() async {
+    var content = '''
+void f(int i) {
+  i.abs();
+}
+void g(bool b, int i) {
+  if (b) f(i);
+}
+main() {
+  g(false, null);
+}
+''';
+    var expected = '''
+void f(int i) {
+  i.abs();
+}
+void g(bool b, int? i) {
+  if (b) f(i!);
+}
+main() {
+  g(false, null);
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  test_unconditional_non_null_usage_implies_non_null_intent() async {
+    var content = '''
+void f(int i, int j) {
+  i.gcd(j);
+}
+void g(bool b, int i, int j) {
+  if (b) f(i, j);
+}
+main() {
+  g(false, 0, null);
+}
+''';
+    var expected = '''
+void f(int i, int j) {
+  i.gcd(j);
+}
+void g(bool b, int i, int? j) {
+  if (b) f(i, j!);
+}
+main() {
+  g(false, 0, null);
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
+
+  test_unconditional_usage_propagates_non_null_intent() async {
+    var content = '''
+void f(int i) {
+  assert(i != null);
+}
+void g(int i) {
+  f(i);
+}
+void h(bool b, int i) {
+  if (b) g(i);
+}
+main() {
+  h(false, null);
+}
+''';
+    var expected = '''
+void f(int i) {
+  assert(i != null);
+}
+void g(int i) {
+  f(i);
+}
+void h(bool b, int? i) {
+  if (b) g(i!);
+}
+main() {
+  h(false, null);
+}
+''';
+    await _checkSingleFileChanges(content, expected);
+  }
 }
 
 @reflectiveTest
-class ProvisionalApiTestPermissive extends ProvisionalApiTestBase
-    with ProvisionalApiTestCases {
+class _ProvisionalApiTestPermissive extends _ProvisionalApiTestBase
+    with _ProvisionalApiTestCases {
   @override
-  bool get usePermissiveMode => true;
+  bool get _usePermissiveMode => true;
 }
 
 /// Tests of the provisional API, where the driver is reset between calls to
 /// `prepareInput` and `processInput`, ensuring that the migration algorithm
 /// sees different AST and element objects during different phases.
 @reflectiveTest
-class ProvisionalApiTestWithReset extends ProvisionalApiTestBase
-    with ProvisionalApiTestCases {
+class _ProvisionalApiTestWithReset extends _ProvisionalApiTestBase
+    with _ProvisionalApiTestCases {
   @override
-  bool get usePermissiveMode => false;
+  bool get _usePermissiveMode => false;
 
   @override
   void _afterPrepare() {
@@ -601,11 +926,14 @@
   }
 }
 
-class TestMigrationListener implements NullabilityMigrationListener {
-  final fixes = <SingleNullabilityFix>[];
+class _TestMigrationListener implements NullabilityMigrationListener {
+  final _edits = <Source, List<SourceEdit>>{};
 
   @override
-  void addFix(SingleNullabilityFix fix) {
-    fixes.add(fix);
+  void addEdit(SingleNullabilityFix fix, SourceEdit edit) {
+    (_edits[fix.source] ??= []).add(edit);
   }
+
+  @override
+  void addFix(SingleNullabilityFix fix) {}
 }
diff --git a/pkg/analysis_server/test/src/services/correction/assist/convert_into_absolute_import_test.dart b/pkg/analysis_server/test/src/services/correction/assist/convert_into_absolute_import_test.dart
new file mode 100644
index 0000000..36e3fab
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/convert_into_absolute_import_test.dart
@@ -0,0 +1,68 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConvertIntoAbsoluteImportTest);
+  });
+}
+
+@reflectiveTest
+class ConvertIntoAbsoluteImportTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.CONVERT_INTO_ABSOLUTE_IMPORT;
+
+  test_fileName_onUri() async {
+    addSource('/home/test/lib/foo.dart', '');
+
+    await resolveTestUnit('''
+import 'foo.dart';
+''');
+    await assertHasAssistAt('foo.dart', '''
+import 'package:test/foo.dart';
+''');
+  }
+
+  test_fileName_onImport() async {
+    addSource('/home/test/lib/foo.dart', '');
+
+    await resolveTestUnit('''
+import 'foo.dart';
+''');
+    // Validate assist is on import keyword too.
+    await assertHasAssistAt('import', '''
+import 'package:test/foo.dart';
+''');
+  }
+
+  test_nonPackage_Uri() async {
+    addSource('/home/test/lib/foo.dart', '');
+
+    await resolveTestUnit('''
+import 'dart:core';
+''');
+
+    await assertNoAssistAt('dart:core');
+    await assertNoAssistAt('import');
+  }
+
+  test_path() async {
+    addSource('/home/test/lib/foo/bar.dart', '');
+
+    testFile = convertPath('/home/test/lib/src/test.dart');
+
+    await resolveTestUnit('''
+import '../foo/bar.dart';
+''');
+    await assertHasAssistAt('bar.dart', '''
+import 'package:test/foo/bar.dart';
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/convert_to_for_element_test.dart b/pkg/analysis_server/test/src/services/correction/assist/convert_to_for_element_test.dart
new file mode 100644
index 0000000..597c353
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/convert_to_for_element_test.dart
@@ -0,0 +1,190 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConvertToIfElementTest);
+  });
+}
+
+@reflectiveTest
+class ConvertToIfElementTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.CONVERT_TO_FOR_ELEMENT;
+
+  void setUp() {
+    createAnalysisOptionsFile(
+        experiments: [EnableString.control_flow_collections]);
+    super.setUp();
+  }
+
+  test_mapFromIterable_complexKey() async {
+    await resolveTestUnit('''
+f(Iterable<int> i) {
+  return Map.fromIt/*caret*/erable(i, key: (e) {
+    var result = e * 2;
+    return result;
+  }, value: (e) => e + 3);
+}
+''');
+    await assertNoAssist();
+  }
+
+  test_mapFromIterable_complexValue() async {
+    await resolveTestUnit('''
+f(Iterable<int> i) {
+  return Map.fromIt/*caret*/erable(i, key: (e) => e * 2, value: (e) {
+    var result = e  + 3;
+    return result;
+  });
+}
+''');
+    await assertNoAssist();
+  }
+
+  test_mapFromIterable_differentParameterNames_usedInKey_conflictInValue() async {
+    await resolveTestUnit('''
+f(Iterable<int> i) {
+  var k = 3;
+  return Map.fromIt/*caret*/erable(i, key: (k) => k * 2, value: (v) => k);
+}
+''');
+    await assertHasAssist('''
+f(Iterable<int> i) {
+  var k = 3;
+  return { for (var e in i) e * 2 : k };
+}
+''');
+  }
+
+  test_mapFromIterable_differentParameterNames_usedInKey_noConflictInValue() async {
+    await resolveTestUnit('''
+f(Iterable<int> i) {
+  return Map.fromIt/*caret*/erable(i, key: (k) => k * 2, value: (v) => 0);
+}
+''');
+    await assertHasAssist('''
+f(Iterable<int> i) {
+  return { for (var k in i) k * 2 : 0 };
+}
+''');
+  }
+
+  test_mapFromIterable_differentParameterNames_usedInKeyAndValue_conflictWithDefault() async {
+    await resolveTestUnit('''
+f(Iterable<int> i) {
+  var e = 2;
+  return Map.fromIt/*caret*/erable(i, key: (k) => k * e, value: (v) => v + e);
+}
+''');
+    await assertHasAssist('''
+f(Iterable<int> i) {
+  var e = 2;
+  return { for (var e1 in i) e1 * e : e1 + e };
+}
+''');
+  }
+
+  test_mapFromIterable_differentParameterNames_usedInKeyAndValue_noConflictWithDefault() async {
+    await resolveTestUnit('''
+f(Iterable<int> i) {
+  return Map.fromIt/*caret*/erable(i, key: (k) => k * 2, value: (v) => v + 3);
+}
+''');
+    await assertHasAssist('''
+f(Iterable<int> i) {
+  return { for (var e in i) e * 2 : e + 3 };
+}
+''');
+  }
+
+  test_mapFromIterable_differentParameterNames_usedInValue_conflictInKey() async {
+    await resolveTestUnit('''
+f(Iterable<int> i) {
+  int v = 0;
+  return Map.fromIt/*caret*/erable(i, key: (k) => v++, value: (v) => v * 10);
+}
+''');
+    await assertHasAssist('''
+f(Iterable<int> i) {
+  int v = 0;
+  return { for (var e in i) v++ : e * 10 };
+}
+''');
+  }
+
+  test_mapFromIterable_differentParameterNames_usedInValue_noConflictInKey() async {
+    await resolveTestUnit('''
+f(Iterable<int> i) {
+  int index = 0;
+  return Map.fromIt/*caret*/erable(i, key: (k) => index++, value: (v) => v * 10);
+}
+''');
+    await assertHasAssist('''
+f(Iterable<int> i) {
+  int index = 0;
+  return { for (var v in i) index++ : v * 10 };
+}
+''');
+  }
+
+  test_mapFromIterable_missingKey() async {
+    await resolveTestUnit('''
+f(Iterable<int> i) {
+  return Map.fromIt/*caret*/erable(i, value: (e) => e + 3);
+}
+''');
+    await assertNoAssist();
+  }
+
+  test_mapFromIterable_missingKeyAndValue() async {
+    await resolveTestUnit('''
+f(Iterable<int> i) {
+  return Map.fromIt/*caret*/erable(i);
+}
+''');
+    await assertNoAssist();
+  }
+
+  test_mapFromIterable_missingValue() async {
+    await resolveTestUnit('''
+f(Iterable<int> i) {
+  return Map.fromIt/*caret*/erable(i, key: (e) => e * 2);
+}
+''');
+    await assertNoAssist();
+  }
+
+  test_mapFromIterable_notMapFromIterable() async {
+    await resolveTestUnit('''
+f(Iterable<int> i) {
+  return A.fromIt/*caret*/erable(i, key: (e) => e * 2, value: (e) => e + 3);
+}
+class A {
+  A.fromIterable(i, {key, value});
+}
+''');
+    await assertNoAssist();
+  }
+
+  test_mapFromIterable_sameParameterNames() async {
+    await resolveTestUnit('''
+f(Iterable<int> i) {
+  return Map.fromIt/*caret*/erable(i, key: (e) => e * 2, value: (e) => e + 3);
+}
+''');
+    await assertHasAssist('''
+f(Iterable<int> i) {
+  return { for (var e in i) e * 2 : e + 3 };
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/convert_to_if_element_test.dart b/pkg/analysis_server/test/src/services/correction/assist/convert_to_if_element_test.dart
index fda239f..5caae77 100644
--- a/pkg/analysis_server/test/src/services/correction/assist/convert_to_if_element_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/assist/convert_to_if_element_test.dart
@@ -21,10 +21,8 @@
   AssistKind get kind => DartAssistKind.CONVERT_TO_IF_ELEMENT;
 
   void setUp() {
-    createAnalysisOptionsFile(experiments: [
-      EnableString.control_flow_collections,
-      EnableString.set_literals
-    ]);
+    createAnalysisOptionsFile(
+        experiments: [EnableString.control_flow_collections]);
     super.setUp();
   }
 
@@ -41,6 +39,19 @@
 ''');
   }
 
+  test_conditional_list_caret_at_start_of_expression() async {
+    await resolveTestUnit('''
+f(bool b) {
+  return ['a', /*caret*/b ? 'c' : 'd', 'e'];
+}
+''');
+    await assertHasAssist('''
+f(bool b) {
+  return ['a', if (b) 'c' else 'd', 'e'];
+}
+''');
+  }
+
   test_conditional_list_withParentheses() async {
     await resolveTestUnit('''
 f(bool b) {
@@ -106,166 +117,4 @@
 }
 ''');
   }
-
-  test_mapFromIterable_complexKey() async {
-    await resolveTestUnit('''
-f(Iterable<int> i) {
-  return Map.fromIt/*caret*/erable(i, key: (e) {
-    var result = e * 2;
-    return result;
-  }, value: (e) => e + 3);
-}
-''');
-    await assertNoAssist();
-  }
-
-  test_mapFromIterable_complexValue() async {
-    await resolveTestUnit('''
-f(Iterable<int> i) {
-  return Map.fromIt/*caret*/erable(i, key: (e) => e * 2, value: (e) {
-    var result = e  + 3;
-    return result;
-  });
-}
-''');
-    await assertNoAssist();
-  }
-
-  test_mapFromIterable_differentParameterNames_usedInKey_conflictInValue() async {
-    await resolveTestUnit('''
-f(Iterable<int> i) {
-  var k = 3;
-  return Map.fromIt/*caret*/erable(i, key: (k) => k * 2, value: (v) => k);
-}
-''');
-    await assertHasAssist('''
-f(Iterable<int> i) {
-  var k = 3;
-  return { for (var e in i) e * 2 : k };
-}
-''');
-  }
-
-  test_mapFromIterable_differentParameterNames_usedInKey_noConflictInValue() async {
-    await resolveTestUnit('''
-f(Iterable<int> i) {
-  return Map.fromIt/*caret*/erable(i, key: (k) => k * 2, value: (v) => 0);
-}
-''');
-    await assertHasAssist('''
-f(Iterable<int> i) {
-  return { for (var k in i) k * 2 : 0 };
-}
-''');
-  }
-
-  test_mapFromIterable_differentParameterNames_usedInKeyAndValue_conflictWithDefault() async {
-    await resolveTestUnit('''
-f(Iterable<int> i) {
-  var e = 2;
-  return Map.fromIt/*caret*/erable(i, key: (k) => k * e, value: (v) => v + e);
-}
-''');
-    await assertHasAssist('''
-f(Iterable<int> i) {
-  var e = 2;
-  return { for (var e1 in i) e1 * e : e1 + e };
-}
-''');
-  }
-
-  test_mapFromIterable_differentParameterNames_usedInKeyAndValue_noConflictWithDefault() async {
-    await resolveTestUnit('''
-f(Iterable<int> i) {
-  return Map.fromIt/*caret*/erable(i, key: (k) => k * 2, value: (v) => v + 3);
-}
-''');
-    await assertHasAssist('''
-f(Iterable<int> i) {
-  return { for (var e in i) e * 2 : e + 3 };
-}
-''');
-  }
-
-  test_mapFromIterable_differentParameterNames_usedInValue_conflictInKey() async {
-    await resolveTestUnit('''
-f(Iterable<int> i) {
-  int v = 0;
-  return Map.fromIt/*caret*/erable(i, key: (k) => v++, value: (v) => v * 10);
-}
-''');
-    await assertHasAssist('''
-f(Iterable<int> i) {
-  int v = 0;
-  return { for (var e in i) v++ : e * 10 };
-}
-''');
-  }
-
-  test_mapFromIterable_differentParameterNames_usedInValue_noConflictInKey() async {
-    await resolveTestUnit('''
-f(Iterable<int> i) {
-  int index = 0;
-  return Map.fromIt/*caret*/erable(i, key: (k) => index++, value: (v) => v * 10);
-}
-''');
-    await assertHasAssist('''
-f(Iterable<int> i) {
-  int index = 0;
-  return { for (var v in i) index++ : v * 10 };
-}
-''');
-  }
-
-  test_mapFromIterable_missingKey() async {
-    await resolveTestUnit('''
-f(Iterable<int> i) {
-  return Map.fromIt/*caret*/erable(i, value: (e) => e + 3);
-}
-''');
-    await assertNoAssist();
-  }
-
-  test_mapFromIterable_missingKeyAndValue() async {
-    await resolveTestUnit('''
-f(Iterable<int> i) {
-  return Map.fromIt/*caret*/erable(i);
-}
-''');
-    await assertNoAssist();
-  }
-
-  test_mapFromIterable_missingValue() async {
-    await resolveTestUnit('''
-f(Iterable<int> i) {
-  return Map.fromIt/*caret*/erable(i, key: (e) => e * 2);
-}
-''');
-    await assertNoAssist();
-  }
-
-  test_mapFromIterable_notMapFromIterable() async {
-    await resolveTestUnit('''
-f(Iterable<int> i) {
-  return A.fromIt/*caret*/erable(i, key: (e) => e * 2, value: (e) => e + 3);
-}
-class A {
-  A.fromIterable(i, {key, value});
-}
-''');
-    await assertNoAssist();
-  }
-
-  test_mapFromIterable_sameParameterNames() async {
-    await resolveTestUnit('''
-f(Iterable<int> i) {
-  return Map.fromIt/*caret*/erable(i, key: (e) => e * 2, value: (e) => e + 3);
-}
-''');
-    await assertHasAssist('''
-f(Iterable<int> i) {
-  return { for (var e in i) e * 2 : e + 3 };
-}
-''');
-  }
 }
diff --git a/pkg/analysis_server/test/src/services/correction/assist/convert_to_null_aware_test.dart b/pkg/analysis_server/test/src/services/correction/assist/convert_to_null_aware_test.dart
new file mode 100644
index 0000000..5677205
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/convert_to_null_aware_test.dart
@@ -0,0 +1,167 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConvertToNormalParameterTest);
+  });
+}
+
+@reflectiveTest
+class ConvertToNormalParameterTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.CONVERT_TO_NULL_AWARE;
+
+  test_equal_differentTarget() async {
+    await resolveTestUnit('''
+abstract class A {
+  int m();
+}
+int f(A a1, A a2) => a1 == null ? null : a2.m();
+''');
+    await assertNoAssistAt('?');
+  }
+
+  test_equal_notComparedToNull() async {
+    await resolveTestUnit('''
+abstract class A {
+  int m();
+}
+int f(A a1, A a2) => a1 == a2 ? a2.m() : a1.m();
+''');
+    await assertNoAssistAt('?');
+  }
+
+  test_equal_notIdentifier() async {
+    await resolveTestUnit('''
+abstract class A {
+  int m();
+}
+int f(A a) => a.m() == null ? 0 : a.m();
+''');
+    await assertNoAssistAt('?');
+  }
+
+  test_equal_notInvocation() async {
+    await resolveTestUnit('''
+abstract class A {
+  int m();
+  int operator +(A a);
+}
+int f(A a1) => a1 == null ? null : a1 + a1;
+''');
+    await assertNoAssistAt('?');
+  }
+
+  test_equal_notNullPreserving() async {
+    await resolveTestUnit('''
+abstract class A {
+  int m();
+}
+int f(A a1, A a2) => a1 == null ? a2.m() : a1.m();
+''');
+    await assertNoAssistAt('?');
+  }
+
+  test_equal_notPeriod() async {
+    await resolveTestUnit('''
+abstract class A {
+  int m();
+}
+int f(A a1) => a1 == null ? null : a1?.m();
+''');
+    await assertNoAssistAt('? ');
+  }
+
+  test_equal_nullOnLeft() async {
+    await resolveTestUnit('''
+abstract class A {
+  int m();
+}
+int f(A a) => null == a ? null : a.m();
+''');
+    await assertHasAssistAt('?', '''
+abstract class A {
+  int m();
+}
+int f(A a) => a?.m();
+''');
+  }
+
+  test_equal_nullOnRight() async {
+    await resolveTestUnit('''
+abstract class A {
+  int m();
+}
+int f(A a) => a == null ? null : a.m();
+''');
+    await assertHasAssistAt('?', '''
+abstract class A {
+  int m();
+}
+int f(A a) => a?.m();
+''');
+  }
+
+  test_equal_prefixedIdentifier() async {
+    await resolveTestUnit('''
+class A {
+  int p;
+}
+int f(A a) => null == a ? null : a.p;
+''');
+    await assertHasAssistAt('?', '''
+class A {
+  int p;
+}
+int f(A a) => a?.p;
+''');
+  }
+
+  test_notEqual_notNullPreserving() async {
+    await resolveTestUnit('''
+abstract class A {
+  int m();
+}
+int f(A a1, A a2) => a1 != null ? a1.m() : a2.m();
+''');
+    await assertNoAssistAt('?');
+  }
+
+  test_notEqual_nullOnLeft() async {
+    await resolveTestUnit('''
+abstract class A {
+  int m();
+}
+int f(A a) => null != a ? a.m() : null;
+''');
+    await assertHasAssistAt('?', '''
+abstract class A {
+  int m();
+}
+int f(A a) => a?.m();
+''');
+  }
+
+  test_notEqual_nullOnRight() async {
+    await resolveTestUnit('''
+abstract class A {
+  int m();
+}
+int f(A a) => a != null ? a.m() : null;
+''');
+    await assertHasAssistAt('?', '''
+abstract class A {
+  int m();
+}
+int f(A a) => a?.m();
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/convert_to_spread_test.dart b/pkg/analysis_server/test/src/services/correction/assist/convert_to_spread_test.dart
index 648502f..6242b56 100644
--- a/pkg/analysis_server/test/src/services/correction/assist/convert_to_spread_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/assist/convert_to_spread_test.dart
@@ -41,13 +41,27 @@
 ''');
   }
 
+  test_addAll_expression_toEmptyList() async {
+    await resolveTestUnit('''
+f() {
+  var ints = [1, 2, 3];
+  print([]..addAl/*caret*/l(ints.map((i) => i.toString()))..addAll(['c']));
+}
+''');
+    await assertHasAssist('''
+f() {
+  var ints = [1, 2, 3];
+  print([...ints.map((i) => i.toString())]..addAll(['c']));
+}
+''');
+  }
+
   test_addAll_literal() async {
+    // This case is covered by the INLINE_INVOCATION assist.
     await resolveTestUnit('''
 var l = ['a']..add/*caret*/All(['b'])..addAll(['c']);
 ''');
-    await assertHasAssist('''
-var l = ['a', ...['b']]..addAll(['c']);
-''');
+    await assertNoAssist();
   }
 
   test_addAll_nonLiteralTarget() async {
diff --git a/pkg/analysis_server/test/src/services/correction/assist/inline_invocation_test.dart b/pkg/analysis_server/test/src/services/correction/assist/inline_invocation_test.dart
new file mode 100644
index 0000000..a183e7f
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/assist/inline_invocation_test.dart
@@ -0,0 +1,112 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/assist.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer_plugin/utilities/assist/assist.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'assist_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(InlineInvocationTest);
+  });
+}
+
+@reflectiveTest
+class InlineInvocationTest extends AssistProcessorTest {
+  @override
+  AssistKind get kind => DartAssistKind.INLINE_INVOCATION;
+
+  void setUp() {
+    createAnalysisOptionsFile(experiments: [EnableString.spread_collections]);
+    super.setUp();
+  }
+
+  test_add_emptyTarget() async {
+    await resolveTestUnit('''
+var l = []..ad/*caret*/d('a')..add('b');
+''');
+    await assertHasAssist('''
+var l = ['a']..add('b');
+''');
+  }
+
+  test_add_nonEmptyTarget() async {
+    await resolveTestUnit('''
+var l = ['a']..ad/*caret*/d('b')..add('c');
+''');
+    await assertHasAssist('''
+var l = ['a', 'b']..add('c');
+''');
+  }
+
+  test_add_nonLiteralArgument() async {
+    await resolveTestUnit('''
+var e = 'b';
+var l = ['a']..add/*caret*/(e);
+''');
+    await assertHasAssist('''
+var e = 'b';
+var l = ['a', e];
+''');
+  }
+
+  test_add_nonLiteralTarget() async {
+    await resolveTestUnit('''
+var l1 = [];
+var l2 = l1..ad/*caret*/d('b')..add('c');
+''');
+    await assertNoAssist();
+  }
+
+  test_add_notFirst() async {
+    await resolveTestUnit('''
+var l = ['a']..add('b')../*caret*/add('c');
+''');
+    await assertNoAssist();
+  }
+
+  test_addAll_emptyTarget() async {
+    await resolveTestUnit('''
+var l = []..add/*caret*/All(['a'])..addAll(['b']);
+''');
+    await assertHasAssist('''
+var l = ['a']..addAll(['b']);
+''');
+  }
+
+  test_addAll_nonEmptyTarget() async {
+    await resolveTestUnit('''
+var l = ['a']..add/*caret*/All(['b'])..addAll(['c']);
+''');
+    await assertHasAssist('''
+var l = ['a', 'b']..addAll(['c']);
+''');
+  }
+
+  test_addAll_nonLiteralArgument() async {
+    await resolveTestUnit('''
+var l1 = <String>[];
+var l2 = ['a']..add/*caret*/All(l1);
+''');
+    await assertNoAssist();
+  }
+
+  test_addAll_nonLiteralTarget() async {
+    await resolveTestUnit('''
+var l1 = [];
+var l2 = l1..addAl/*caret*/l(['b'])..addAll(['c']);
+''');
+    await assertNoAssist();
+  }
+
+  test_addAll_notFirst() async {
+    await resolveTestUnit('''
+var l = ['a']..addAll(['b'])../*caret*/addAll(['c']);
+''');
+    await assertNoAssist();
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/assist/test_all.dart b/pkg/analysis_server/test/src/services/correction/assist/test_all.dart
index 86c5872..bc906ab 100644
--- a/pkg/analysis_server/test/src/services/correction/assist/test_all.dart
+++ b/pkg/analysis_server/test/src/services/correction/assist/test_all.dart
@@ -11,6 +11,7 @@
     as convert_documentation_into_block;
 import 'convert_documentation_into_line_test.dart'
     as convert_documentation_into_line;
+import 'convert_into_absolute_import_test.dart' as convert_into_absolute_import;
 import 'convert_into_async_body_test.dart' as convert_into_async_body;
 import 'convert_into_block_body_test.dart' as convert_into_block_body;
 import 'convert_into_expression_body_test.dart' as convert_into_expression_body;
@@ -25,12 +26,14 @@
 import 'convert_to_double_quoted_string_test.dart'
     as convert_to_double_quoted_string;
 import 'convert_to_field_parameter_test.dart' as convert_to_field_parameter;
+import 'convert_to_for_element_test.dart' as convert_to_for_element;
 import 'convert_to_if_element_test.dart' as convert_to_if_element;
 import 'convert_to_int_literal_test.dart' as convert_to_int_literal;
 import 'convert_to_list_literal_test.dart' as convert_to_list_literal;
 import 'convert_to_map_literal_test.dart' as convert_to_map_literal;
 import 'convert_to_multiline_string_test.dart' as convert_to_multiline_string;
 import 'convert_to_normal_parameter_test.dart' as convert_to_normal_parameter;
+import 'convert_to_null_aware_test.dart' as convert_to_null_aware;
 import 'convert_to_set_literal_test.dart' as convert_to_set_literal;
 import 'convert_to_single_quoted_string_test.dart'
     as convert_to_single_quoted_string;
@@ -53,6 +56,7 @@
 import 'flutter_wrap_row_test.dart' as flutter_wrap_row;
 import 'flutter_wrap_stream_builder_test.dart' as flutter_wrap_stream_builder;
 import 'import_add_show_test.dart' as import_add_show;
+import 'inline_invocation_test.dart' as inline_invocation;
 import 'introduce_local_cast_type_test.dart' as introduce_local_cast_type;
 import 'invert_if_statement_test.dart' as invert_if_statement;
 import 'join_if_with_inner_test.dart' as join_if_with_inner;
@@ -81,6 +85,7 @@
     convert_class_to_mixin.main();
     convert_documentation_into_block.main();
     convert_documentation_into_line.main();
+    convert_into_absolute_import.main();
     convert_into_async_body.main();
     convert_into_block_body.main();
     convert_into_expression_body.main();
@@ -93,12 +98,14 @@
     convert_part_of_to_uri.main();
     convert_to_double_quoted_string.main();
     convert_to_field_parameter.main();
+    convert_to_for_element.main();
     convert_to_if_element.main();
     convert_to_int_literal.main();
     convert_to_list_literal.main();
     convert_to_map_literal.main();
     convert_to_multiline_string.main();
     convert_to_normal_parameter.main();
+    convert_to_null_aware.main();
     convert_to_set_literal.main();
     convert_to_single_quoted_string.main();
     convert_to_spread.main();
@@ -119,6 +126,7 @@
     flutter_wrap_row.main();
     flutter_wrap_stream_builder.main();
     import_add_show.main();
+    inline_invocation.main();
     introduce_local_cast_type.main();
     invert_if_statement.main();
     join_if_with_inner.main();
diff --git a/pkg/analysis_server/test/src/services/correction/fix/add_async_test.dart b/pkg/analysis_server/test/src/services/correction/fix/add_async_test.dart
index 49938b4..4d4c30e 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/add_async_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/add_async_test.dart
@@ -52,10 +52,7 @@
 main() async {
   await foo();
 }
-''', errorFilter: (AnalysisError error) {
-      return error.errorCode ==
-          CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE;
-    });
+''');
   }
 
   test_blockFunctionBody_getter() async {
@@ -132,8 +129,7 @@
   return 42;
 }
 ''', errorFilter: (AnalysisError error) {
-      return error.errorCode ==
-          CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE;
+      return error.errorCode == CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT;
     });
   }
 
@@ -151,10 +147,7 @@
   await foo();
   return 42;
 }
-''', errorFilter: (AnalysisError error) {
-      return error.errorCode ==
-          CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE;
-    });
+''');
   }
 
   test_returnFuture_nonFuture() async {
@@ -171,10 +164,7 @@
   await foo();
   return 42;
 }
-''', errorFilter: (AnalysisError error) {
-      return error.errorCode ==
-          CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE;
-    });
+''');
   }
 
   test_returnFuture_noType() async {
@@ -191,9 +181,6 @@
   await foo();
   return 42;
 }
-''', errorFilter: (AnalysisError error) {
-      return error.errorCode ==
-          CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE;
-    });
+''');
   }
 }
diff --git a/pkg/analysis_server/test/src/services/correction/fix/add_await_test.dart b/pkg/analysis_server/test/src/services/correction/fix/add_await_test.dart
new file mode 100644
index 0000000..1391007
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/add_await_test.dart
@@ -0,0 +1,42 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AddAwaitTest);
+  });
+}
+
+@reflectiveTest
+class AddAwaitTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.ADD_AWAIT;
+
+  @override
+  String get lintCode => LintNames.unawaited_futures;
+
+  test_intLiteral() async {
+    await resolveTestUnit('''
+Future doSomething() => new Future();
+
+void main() async {
+  doSomething()/*LINT*/;
+}
+''');
+    await assertHasFix('''
+Future doSomething() => new Future();
+
+void main() async {
+  await doSomething()/*LINT*/;
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/add_missing_enum_case_clauses_test.dart b/pkg/analysis_server/test/src/services/correction/fix/add_missing_enum_case_clauses_test.dart
new file mode 100644
index 0000000..f796f39
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/add_missing_enum_case_clauses_test.dart
@@ -0,0 +1,88 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AddMissingEnumCaseClausesTest);
+  });
+}
+
+@reflectiveTest
+class AddMissingEnumCaseClausesTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.ADD_MISSING_ENUM_CASE_CLAUSES;
+
+  Future<void> assertHasFixWithFilter(String expected) async {
+    bool noError = true;
+    await assertHasFix(expected, errorFilter: (error) {
+      if (noError &&
+          error.errorCode ==
+              StaticWarningCode.MISSING_ENUM_CONSTANT_IN_SWITCH) {
+        noError = false;
+        return true;
+      }
+      return false;
+    });
+  }
+
+  test_empty() async {
+    await resolveTestUnit('''
+enum E {a, b, c}
+void f(E e) {
+  switch (e) {
+  }
+}
+''');
+    await assertHasFixWithFilter('''
+enum E {a, b, c}
+void f(E e) {
+  switch (e) {
+    case E.a:
+      // TODO: Handle this case.
+      break;
+    case E.b:
+      // TODO: Handle this case.
+      break;
+    case E.c:
+      // TODO: Handle this case.
+      break;
+  }
+}
+''');
+  }
+
+  test_nonEmpty() async {
+    await resolveTestUnit('''
+enum E {a, b, c}
+void f(E e) {
+  switch (e) {
+    case E.a:
+      break;
+  }
+}
+''');
+    await assertHasFixWithFilter('''
+enum E {a, b, c}
+void f(E e) {
+  switch (e) {
+    case E.a:
+      break;
+    case E.b:
+      // TODO: Handle this case.
+      break;
+    case E.c:
+      // TODO: Handle this case.
+      break;
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/analysis_options/remove_setting_test.dart b/pkg/analysis_server/test/src/services/correction/fix/analysis_options/remove_setting_test.dart
new file mode 100644
index 0000000..548d53a
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/analysis_options/remove_setting_test.dart
@@ -0,0 +1,65 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'test_support.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveSettingTest);
+  });
+}
+
+@reflectiveTest
+class RemoveSettingTest extends AnalysisOptionsFixTest {
+  test_enableSuperMixins() async {
+    await assertHasFix('''
+analyzer:
+  enable-experiment:
+    - non-nullable
+  language:
+    enableSuperMixins: true
+''', '''
+analyzer:
+  enable-experiment:
+    - non-nullable
+''');
+  }
+
+  test_invalidExperiment_first() async {
+    await assertHasFix('''
+analyzer:
+  enable-experiment:
+    - not-an-experiment
+    - non-nullable
+''', '''
+analyzer:
+  enable-experiment:
+    - non-nullable
+''');
+  }
+
+  test_invalidExperiment_last() async {
+    await assertHasFix('''
+analyzer:
+  enable-experiment:
+    - non-nullable
+    - not-an-experiment
+''', '''
+analyzer:
+  enable-experiment:
+    - non-nullable
+''');
+  }
+
+  test_invalidExperiment_only() async {
+    await assertHasFix('''
+analyzer:
+  enable-experiment:
+    - not-an-experiment
+''', '''
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/analysis_options/test_all.dart b/pkg/analysis_server/test/src/services/correction/fix/analysis_options/test_all.dart
new file mode 100644
index 0000000..c202ee9
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/analysis_options/test_all.dart
@@ -0,0 +1,13 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'remove_setting_test.dart' as remove_setting;
+
+main() {
+  defineReflectiveSuite(() {
+    remove_setting.main();
+  });
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/analysis_options/test_support.dart b/pkg/analysis_server/test/src/services/correction/fix/analysis_options/test_support.dart
new file mode 100644
index 0000000..23d6dc3
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/analysis_options/test_support.dart
@@ -0,0 +1,68 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/plugin/edit/fix/fix_core.dart';
+import 'package:analysis_server/src/protocol_server.dart' show SourceEdit;
+import 'package:analysis_server/src/services/correction/fix/analysis_options/fix_generator.dart';
+import 'package:analyzer/error/error.dart' as engine;
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/src/analysis_options/analysis_options_provider.dart';
+import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/task/options.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
+import 'package:analyzer_plugin/protocol/protocol_common.dart'
+    show SourceFileEdit;
+import 'package:analyzer_plugin/protocol/protocol_common.dart';
+import 'package:test/test.dart';
+import 'package:yaml/src/yaml_node.dart';
+import 'package:yaml/yaml.dart';
+
+/// A base class providing utility methods for tests of fixes associated with
+/// errors in Dart files.
+class AnalysisOptionsFixTest with ResourceProviderMixin {
+  Future<void> assertHasFix(
+      String initialContent, String expectedContent) async {
+    List<Fix> fixes = await _getFixes(initialContent);
+    expect(fixes, hasLength(1));
+    List<SourceFileEdit> fileEdits = fixes[0].change.edits;
+    expect(fileEdits, hasLength(1));
+
+    String actualContent =
+        SourceEdit.applySequence(initialContent, fileEdits[0].edits);
+    expect(actualContent, expectedContent);
+  }
+
+  Future<void> assertHasNoFix(String initialContent) async {
+    List<Fix> fixes = await _getFixes(initialContent);
+    expect(fixes, hasLength(0));
+  }
+
+  Future<List<Fix>> _getFixes(String content) {
+    File optionsFile = getFile('/analysis_options.yaml');
+    SourceFactory sourceFactory = new SourceFactory([]);
+    List<engine.AnalysisError> errors = analyzeAnalysisOptions(
+        optionsFile.createSource(), content, sourceFactory);
+    expect(errors, hasLength(1));
+    engine.AnalysisError error = errors[0];
+    YamlMap options = _parseYaml(content);
+    AnalysisOptionsFixGenerator generator =
+        new AnalysisOptionsFixGenerator(error, content, options);
+    return generator.computeFixes();
+  }
+
+  YamlMap _parseYaml(String content) {
+    if (content == null) {
+      return new YamlMap();
+    }
+    try {
+      YamlNode doc = loadYamlNode(content);
+      if (doc is YamlMap) {
+        return doc;
+      }
+      return new YamlMap();
+    } catch (exception) {
+      return null;
+    }
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/change_argument_name_test.dart b/pkg/analysis_server/test/src/services/correction/fix/change_argument_name_test.dart
new file mode 100644
index 0000000..2707a41
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/change_argument_name_test.dart
@@ -0,0 +1,251 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ChangeArgumentNameTest);
+  });
+}
+
+@reflectiveTest
+class ChangeArgumentNameTest extends FixProcessorTest {
+  @override
+  FixKind get kind => DartFixKind.CHANGE_ARGUMENT_NAME;
+
+  test_child_constructor() async {
+    await resolveTestUnit('''
+f() => new A(children: 2);
+class A {
+  A({int child});
+}
+''');
+    await assertHasFix('''
+f() => new A(child: 2);
+class A {
+  A({int child});
+}
+''');
+  }
+
+  test_child_function() async {
+    await resolveTestUnit('''
+f() {
+  g(children: 0);
+}
+void g({int child}) {}
+''');
+    await assertHasFix('''
+f() {
+  g(child: 0);
+}
+void g({int child}) {}
+''');
+  }
+
+  test_child_method() async {
+    await resolveTestUnit('''
+f(A a) {
+  a.m(children: 0);
+}
+class A {
+  void m({int child}) {}
+}
+''');
+    await assertHasFix('''
+f(A a) {
+  a.m(child: 0);
+}
+class A {
+  void m({int child}) {}
+}
+''');
+  }
+
+  test_children_constructor() async {
+    await resolveTestUnit('''
+f() => new A(child: 2);
+class A {
+  A({int children});
+}
+''');
+    await assertHasFix('''
+f() => new A(children: 2);
+class A {
+  A({int children});
+}
+''');
+  }
+
+  test_children_function() async {
+    await resolveTestUnit('''
+f() {
+  g(child: 0);
+}
+void g({int children}) {}
+''');
+    await assertHasFix('''
+f() {
+  g(children: 0);
+}
+void g({int children}) {}
+''');
+  }
+
+  test_children_method() async {
+    await resolveTestUnit('''
+f(A a) {
+  a.m(child: 0);
+}
+class A {
+  void m({int children}) {}
+}
+''');
+    await assertHasFix('''
+f(A a) {
+  a.m(children: 0);
+}
+class A {
+  void m({int children}) {}
+}
+''');
+  }
+
+  test_default_annotation() async {
+    await resolveTestUnit('''
+@A(boot: 2)
+f() => null;
+class A {
+  const A({int boat});
+}
+''');
+    await assertHasFix('''
+@A(boat: 2)
+f() => null;
+class A {
+  const A({int boat});
+}
+''');
+  }
+
+  test_default_constructor() async {
+    await resolveTestUnit('''
+f() => new A(boot: 2);
+class A {
+  A({int boat});
+}
+''');
+    await assertHasFix('''
+f() => new A(boat: 2);
+class A {
+  A({int boat});
+}
+''');
+  }
+
+  test_default_function() async {
+    await resolveTestUnit('''
+f() {
+  g(boot: 0);
+}
+void g({int boat}) {}
+''');
+    await assertHasFix('''
+f() {
+  g(boat: 0);
+}
+void g({int boat}) {}
+''');
+  }
+
+  test_default_method() async {
+    await resolveTestUnit('''
+f(A a) {
+  a.m(boot: 0);
+}
+class A {
+  void m({int boat}) {}
+}
+''');
+    await assertHasFix('''
+f(A a) {
+  a.m(boat: 0);
+}
+class A {
+  void m({int boat}) {}
+}
+''');
+  }
+
+  test_default_redirectingConstructor() async {
+    await resolveTestUnit('''
+class A {
+  A.one() : this.two(boot: 3);
+  A.two({int boat});
+}
+''');
+    await assertHasFix('''
+class A {
+  A.one() : this.two(boat: 3);
+  A.two({int boat});
+}
+''');
+  }
+
+  test_default_superConstructor() async {
+    await resolveTestUnit('''
+class A {
+  A.a({int boat});
+}
+class B extends A {
+  B.b() : super.a(boot: 3);
+}
+''');
+    await assertHasFix('''
+class A {
+  A.a({int boat});
+}
+class B extends A {
+  B.b() : super.a(boat: 3);
+}
+''');
+  }
+
+  test_tooDistant_constructor() async {
+    await resolveTestUnit('''
+f() => new A(bbbbb: 2);
+class A {
+  A({int aaaaaaa});
+}
+''');
+    await assertNoFix();
+  }
+
+  test_tooDistant_function() async {
+    await resolveTestUnit('''
+f() {
+  g(bbbbb: 0);
+}
+void g({int aaaaaaa}) {}
+''');
+    await assertNoFix();
+  }
+
+  test_tooDistant_method() async {
+    await resolveTestUnit('''
+f(A a) {
+  a.m(bbbbb: 0);
+}
+class A {
+  void m({int aaaaaaa}) {}
+}
+''');
+    await assertNoFix();
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/fix_processor.dart b/pkg/analysis_server/test/src/services/correction/fix/fix_processor.dart
index e9b5fa2..beb7025 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/fix_processor.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/fix_processor.dart
@@ -64,9 +64,13 @@
   Future<void> assertHasFix(String expected,
       {bool Function(AnalysisError) errorFilter,
       int length,
-      String target}) async {
+      String target,
+      int expectedNumberOfFixesForKind,
+      String matchFixMessage}) async {
     AnalysisError error = await _findErrorToFix(errorFilter, length: length);
-    Fix fix = await _assertHasFix(error);
+    Fix fix = await _assertHasFix(error,
+        expectedNumberOfFixesForKind: expectedNumberOfFixesForKind,
+        matchFixMessage: matchFixMessage);
     change = fix.change;
 
     // apply to "file"
@@ -148,12 +152,38 @@
     verifyNoTestUnitErrors = false;
   }
 
-  /// Computes fixes and verifies that there is a fix for the given [error] of
-  /// the appropriate kind.
-  Future<Fix> _assertHasFix(AnalysisError error) async {
+  /// Computes fixes and verifies that there is a fix for the given [error] of the appropriate kind.
+  /// Optionally, if a [matchFixMessage] is passed, then the kind as well as the fix message must
+  /// match to be returned.
+  Future<Fix> _assertHasFix(AnalysisError error,
+      {int expectedNumberOfFixesForKind, String matchFixMessage}) async {
     // Compute the fixes for this AnalysisError
     final List<Fix> fixes = await _computeFixes(error);
 
+    if (expectedNumberOfFixesForKind != null) {
+      int actualNumberOfFixesForKind = 0;
+      for (Fix fix in fixes) {
+        if (fix.kind == kind) {
+          actualNumberOfFixesForKind++;
+        }
+      }
+      if (actualNumberOfFixesForKind != expectedNumberOfFixesForKind) {
+        fail(
+            "Expected $expectedNumberOfFixesForKind fixes of kind $kind, but found $actualNumberOfFixesForKind:\n${fixes.join('\n')}");
+      }
+    }
+
+    // If a matchFixMessage was provided,
+    if (matchFixMessage != null) {
+      for (Fix fix in fixes) {
+        if (matchFixMessage == fix?.change?.message) {
+          return fix;
+        }
+      }
+      fail(
+          'Expected to find fix $kind with name $matchFixMessage in\n${fixes.join('\n')}');
+    }
+
     // Assert that none of the fixes are a fix-all fix.
     Fix foundFix = null;
     for (Fix fix in fixes) {
diff --git a/pkg/analysis_server/test/src/services/correction/fix/import_library_project_test.dart b/pkg/analysis_server/test/src/services/correction/fix/import_library_project_test.dart
index 78de092..f1d1710 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/import_library_project_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/import_library_project_test.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -64,7 +65,7 @@
   Test test = null;
   print(test);
 }
-''');
+''', expectedNumberOfFixesForKind: 1);
   }
 
   test_preferDirectOverExport_src() async {
@@ -82,7 +83,65 @@
   Test test = null;
   print(test);
 }
+''', expectedNumberOfFixesForKind: 1);
+  }
+
+  test_relativeDirective() async {
+    addSource('/home/test/lib/a.dart', '''
+import "b.dart";
 ''');
+    addSource('/home/test/lib/b.dart', '''
+class Foo {}
+''');
+    await resolveTestUnit('''
+main() { new Foo(); }
+''');
+    await assertHasFix('''
+import 'b.dart';
+
+main() { new Foo(); }
+''',
+        expectedNumberOfFixesForKind: 2,
+        matchFixMessage: "Import library 'b.dart'");
+  }
+
+  test_relativeDirective_upOneDirectory() async {
+    addSource('/home/test/lib/a.dart', '''
+import "b.dart";
+''');
+    addSource('/home/test/lib/b.dart', '''
+class Foo {}
+''');
+    testFile = convertPath('/home/test/lib/dir/test.dart');
+    await resolveTestUnit('''
+main() { new Foo(); }
+''');
+    await assertHasFix('''
+import '../b.dart';
+
+main() { new Foo(); }
+''',
+        expectedNumberOfFixesForKind: 2,
+        matchFixMessage: "Import library '../b.dart'");
+  }
+
+  test_relativeDirective_downOneDirectory() async {
+    addSource('/home/test/lib/dir/a.dart', '''
+import "b.dart";
+''');
+    addSource('/home/test/lib/dir/b.dart', '''
+class Foo {}
+''');
+    await resolveTestUnit('''
+main() { new Foo(); }
+''');
+    await assertHasFix('''
+import 'dir/b.dart';
+
+main() { new Foo(); }
+''',
+        expectedNumberOfFixesForKind: 2,
+        matchFixMessage: "Import library 'dir/b.dart'");
   }
 
   test_withClass_annotation() async {
@@ -318,6 +377,53 @@
 ''');
   }
 
+  test_withFunction_functionTopLevelVariable() async {
+    addSource('/home/test/lib/lib.dart', 'var myFunction = () {};');
+    await resolveTestUnit('''
+main() {
+  myFunction();
+}
+''');
+    await assertHasFix('''
+import 'package:test/lib.dart';
+
+main() {
+  myFunction();
+}
+''');
+  }
+
+  @failingTest
+  test_withFunction_nonFunctionType() async {
+    // TODO Remove preferFunctionOverTopLevelVariable test once this is passing
+    addSource('/home/test/lib/lib.dart', 'int zero = 0;');
+    await resolveTestUnit('''
+main() {
+  zero();
+}
+''');
+    await assertNoFix();
+  }
+
+  test_withFunction_preferFunctionOverTopLevelVariable() async {
+    _configureMyPkg({
+      'b.dart': 'var myFunction = () {};',
+      'a.dart': 'myFunction() {}',
+    });
+    await resolveTestUnit('''
+main() {
+  myFunction();
+}
+''');
+    await assertHasFix('''
+import 'package:my_pkg/a.dart';
+
+main() {
+  myFunction();
+}
+''');
+  }
+
   test_withFunction_unresolvedMethod() async {
     addSource('/home/test/lib/lib.dart', '''
 library lib;
@@ -362,51 +468,20 @@
 ''');
   }
 
-  test_withFunction_functionTopLevelVariable() async {
-    addSource('/home/test/lib/lib.dart', 'var myFunction = () {};');
+  test_withMixin() async {
+    addSource('/home/test/lib/lib.dart', '''
+mixin Test {}
+''');
     await resolveTestUnit('''
-main() {
-  myFunction();
-}
+class X = Object with Test;
 ''');
     await assertHasFix('''
 import 'package:test/lib.dart';
 
-main() {
-  myFunction();
-}
-''');
-  }
-
-  test_withFunction_preferFunctionOverTopLevelVariable() async {
-    _configureMyPkg({
-      'b.dart': 'var myFunction = () {};',
-      'a.dart': 'myFunction() {}',
+class X = Object with Test;
+''', errorFilter: (error) {
+      return error.errorCode == StaticWarningCode.UNDEFINED_CLASS;
     });
-    await resolveTestUnit('''
-main() {
-  myFunction();
-}
-''');
-    await assertHasFix('''
-import 'package:my_pkg/a.dart';
-
-main() {
-  myFunction();
-}
-''');
-  }
-
-  @failingTest
-  test_withFunction_nonFunctionType() async {
-    // TODO Remove preferFunctionOverTopLevelVariable test once this is passing
-    addSource('/home/test/lib/lib.dart', 'int zero = 0;');
-    await resolveTestUnit('''
-main() {
-  zero();
-}
-''');
-    await assertNoFix();
   }
 
   test_withTopLevelVariable() async {
diff --git a/pkg/analysis_server/test/src/services/correction/fix/manifest/test_support.dart b/pkg/analysis_server/test/src/services/correction/fix/manifest/test_support.dart
new file mode 100644
index 0000000..31347b93
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/manifest/test_support.dart
@@ -0,0 +1,54 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/plugin/edit/fix/fix_core.dart';
+import 'package:analysis_server/src/protocol_server.dart' show SourceEdit;
+import 'package:analysis_server/src/services/correction/fix/manifest/fix_generator.dart';
+import 'package:analyzer/error/error.dart' as engine;
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/src/manifest/manifest_validator.dart';
+import 'package:analyzer/src/manifest/manifest_values.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
+import 'package:analyzer_plugin/protocol/protocol_common.dart'
+    show SourceFileEdit;
+import 'package:analyzer_plugin/protocol/protocol_common.dart';
+import 'package:html/dom.dart';
+import 'package:html/parser.dart';
+import 'package:test/test.dart';
+
+/// A base class providing utility methods for tests of fixes associated with
+/// errors in Android manifest files.
+class ManifestFixTest with ResourceProviderMixin {
+  Future<void> assertHasFix(
+      String initialContent, String expectedContent) async {
+    List<Fix> fixes = await _getFixes(initialContent);
+    expect(fixes, hasLength(1));
+    List<SourceFileEdit> fileEdits = fixes[0].change.edits;
+    expect(fileEdits, hasLength(1));
+
+    String actualContent =
+        SourceEdit.applySequence(initialContent, fileEdits[0].edits);
+    expect(actualContent, expectedContent);
+  }
+
+  Future<void> assertHasNoFix(String initialContent) async {
+    List<Fix> fixes = await _getFixes(initialContent);
+    expect(fixes, hasLength(0));
+  }
+
+  Future<List<Fix>> _getFixes(String content) {
+    File manifestFile = getFile('/package/AndroidManifest.xml');
+    DocumentFragment document =
+        parseFragment(content, container: MANIFEST_TAG, generateSpans: true);
+    expect(document, isNotNull);
+    ManifestValidator validator =
+        new ManifestValidator(manifestFile.createSource());
+    List<engine.AnalysisError> errors = validator.validate(content, true);
+    expect(errors, hasLength(1));
+    engine.AnalysisError error = errors[0];
+    ManifestFixGenerator generator =
+        new ManifestFixGenerator(error, content, document);
+    return generator.computeFixes();
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/pubspec/test_support.dart b/pkg/analysis_server/test/src/services/correction/fix/pubspec/test_support.dart
new file mode 100644
index 0000000..c884474
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/pubspec/test_support.dart
@@ -0,0 +1,67 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/plugin/edit/fix/fix_core.dart';
+import 'package:analysis_server/src/protocol_server.dart' show SourceEdit;
+import 'package:analysis_server/src/services/correction/fix/pubspec/fix_generator.dart';
+import 'package:analyzer/error/error.dart' as engine;
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/src/pubspec/pubspec_validator.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
+import 'package:analyzer_plugin/protocol/protocol_common.dart'
+    show SourceFileEdit;
+import 'package:analyzer_plugin/protocol/protocol_common.dart';
+import 'package:test/test.dart';
+import 'package:yaml/src/yaml_node.dart';
+import 'package:yaml/yaml.dart';
+
+/// A base class providing utility methods for tests of fixes associated with
+/// errors in pubspec files.
+class PubspecFixTest with ResourceProviderMixin {
+  Future<void> assertHasFix(
+      String initialContent, String expectedContent) async {
+    List<Fix> fixes = await _getFixes(initialContent);
+    expect(fixes, hasLength(1));
+    List<SourceFileEdit> fileEdits = fixes[0].change.edits;
+    expect(fileEdits, hasLength(1));
+
+    String actualContent =
+        SourceEdit.applySequence(initialContent, fileEdits[0].edits);
+    expect(actualContent, expectedContent);
+  }
+
+  Future<void> assertHasNoFix(String initialContent) async {
+    List<Fix> fixes = await _getFixes(initialContent);
+    expect(fixes, hasLength(0));
+  }
+
+  Future<List<Fix>> _getFixes(String content) {
+    File pubspecFile = getFile('/package/pubspec.yaml');
+    YamlMap pubspec = _parseYaml(content);
+    expect(pubspec, isNotNull);
+    PubspecValidator validator =
+        new PubspecValidator(resourceProvider, pubspecFile.createSource());
+    List<engine.AnalysisError> errors = validator.validate(pubspec.nodes);
+    expect(errors, hasLength(1));
+    engine.AnalysisError error = errors[0];
+    PubspecFixGenerator generator =
+        new PubspecFixGenerator(error, content, pubspec);
+    return generator.computeFixes();
+  }
+
+  YamlMap _parseYaml(String content) {
+    if (content == null) {
+      return new YamlMap();
+    }
+    try {
+      YamlNode doc = loadYamlNode(content);
+      if (doc is YamlMap) {
+        return doc;
+      }
+      return new YamlMap();
+    } catch (exception) {
+      return null;
+    }
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_duplicate_case_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_duplicate_case_test.dart
new file mode 100644
index 0000000..0f1f928
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_duplicate_case_test.dart
@@ -0,0 +1,89 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(RemoveDuplicateCaseTest);
+  });
+}
+
+@reflectiveTest
+class RemoveDuplicateCaseTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.REMOVE_DUPLICATE_CASE;
+
+  @override
+  String get lintCode => LintNames.no_duplicate_case_values;
+
+  test_removeStringCase() async {
+    await resolveTestUnit('''
+void switchString() {
+  String v = 'a';
+  switch (v) {
+    case 'a':
+      print('a');
+      break;
+    case 'b':
+      print('b');
+      break;
+    case 'a' /*LINT*/:
+      print('a');
+      break;
+    default:
+      print('?);
+  }
+}
+''');
+    await assertHasFix('''
+void switchString() {
+  String v = 'a';
+  switch (v) {
+    case 'a':
+      print('a');
+      break;
+    case 'b':
+      print('b');
+      break;
+    default:
+      print('?);
+  }
+}
+''');
+  }
+
+  test_removeIntCase() async {
+    await resolveTestUnit('''
+void switchInt() {
+  switch (2) {
+    case 1:
+      print('a');
+      break;
+    case 2:
+    case 2 /*LINT*/:
+    default:
+      print('?);
+  }
+}
+''');
+    await assertHasFix('''
+void switchInt() {
+  switch (2) {
+    case 1:
+      print('a');
+      break;
+    case 2:
+    default:
+      print('?);
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_interpolation_braces_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_interpolation_braces_test.dart
index 2fdfad9a..b48e7d8 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/remove_interpolation_braces_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_interpolation_braces_test.dart
@@ -21,7 +21,7 @@
   FixKind get kind => DartFixKind.REMOVE_INTERPOLATION_BRACES;
 
   @override
-  String get lintCode => LintNames.unnecessary_brace_in_string_interp;
+  String get lintCode => LintNames.unnecessary_brace_in_string_interps;
 
   test_withSpace() async {
     await resolveTestUnit(r'''
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_method_declaration_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_method_declaration_test.dart
index 443d382..666a59c 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/remove_method_declaration_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_method_declaration_test.dart
@@ -21,7 +21,7 @@
   FixKind get kind => DartFixKind.REMOVE_METHOD_DECLARATION;
 
   @override
-  String get lintCode => LintNames.unnecessary_override;
+  String get lintCode => LintNames.unnecessary_overrides;
 
   test_getter() async {
     await resolveTestUnit('''
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_unnecessary_const_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_unnecessary_const_test.dart
new file mode 100644
index 0000000..440b948
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_unnecessary_const_test.dart
@@ -0,0 +1,40 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(UnnecessaryConstTest);
+  });
+}
+
+@reflectiveTest
+class UnnecessaryConstTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.REMOVE_UNNECESSARY_CONST;
+
+  @override
+  String get lintCode => LintNames.unnecessary_const;
+
+  test_constConstructor() async {
+    await resolveTestUnit('''
+class A { const A(); }
+m(){
+  const a = /*LINT*/const A();
+}
+''');
+    await assertHasFix('''
+class A { const A(); }
+m(){
+  const a = /*LINT*/A();
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/remove_unnecessary_new_test.dart b/pkg/analysis_server/test/src/services/correction/fix/remove_unnecessary_new_test.dart
new file mode 100644
index 0000000..b1cad87
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/remove_unnecessary_new_test.dart
@@ -0,0 +1,40 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(UnnecessaryNewTest);
+  });
+}
+
+@reflectiveTest
+class UnnecessaryNewTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.REMOVE_UNNECESSARY_NEW;
+
+  @override
+  String get lintCode => LintNames.unnecessary_new;
+
+  test_constructor() async {
+    await resolveTestUnit('''
+class A { A(); }
+m(){
+  final a = /*LINT*/new A();
+}
+''');
+    await assertHasFix('''
+class A { A(); }
+m(){
+  final a = /*LINT*/A();
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/replace_colon_with_equals_test.dart b/pkg/analysis_server/test/src/services/correction/fix/replace_colon_with_equals_test.dart
new file mode 100644
index 0000000..375a662
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/replace_colon_with_equals_test.dart
@@ -0,0 +1,38 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ReplaceColonWithEqualsTest);
+  });
+}
+
+@reflectiveTest
+class ReplaceColonWithEqualsTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.REPLACE_COLON_WITH_EQUALS;
+
+  @override
+  String get lintCode => LintNames.prefer_equal_for_default_values;
+
+  test_method() async {
+    await resolveTestUnit('''
+void f1({int a}) { }    
+
+f1({a/*LINT*/: 1}) => null;
+''');
+    await assertHasFix('''
+void f1({int a}) { }    
+
+f1({a/*LINT*/= 1}) => null;
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/replace_null_with_closure_test.dart b/pkg/analysis_server/test/src/services/correction/fix/replace_null_with_closure_test.dart
new file mode 100644
index 0000000..4ada2dd
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/replace_null_with_closure_test.dart
@@ -0,0 +1,87 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ReplaceNullWithClosureTest);
+  });
+}
+
+@reflectiveTest
+class ReplaceNullWithClosureTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.REPLACE_NULL_WITH_CLOSURE;
+
+  @override
+  String get lintCode => LintNames.null_closures;
+
+  test_null_closure_named_expression() async {
+    await resolveTestUnit('''
+main() {
+  [1, 3, 5].firstWhere((e) => e.isOdd, orElse: /*LINT*/null);
+}
+''');
+    await assertHasFix('''
+main() {
+  [1, 3, 5].firstWhere((e) => e.isOdd, orElse: /*LINT*/() => null);
+}
+''');
+  }
+
+  test_null_closure_named_expression_with_args() async {
+    await resolveTestUnit('''
+void f({int closure(x, y)}) { }
+main() {
+  f(closure: /*LINT*/null);
+}
+''');
+    await assertHasFix('''
+void f({int closure(x, y)}) { }
+main() {
+  f(closure: /*LINT*/(x, y) => null);
+}
+''');
+  }
+
+  test_null_closure_named_expression_with_args_2() async {
+    await resolveTestUnit('''
+void f({int closure(x, y, {z})}) { }
+main() {
+  f(closure: /*LINT*/null);
+}
+''');
+    await assertHasFix('''
+void f({int closure(x, y, {z})}) { }
+main() {
+  f(closure: /*LINT*/(x, y, {z}) => null);
+}
+''');
+  }
+
+  /// Currently failing since the LINT annotation is tagging the ArgumentList
+  /// where the fix (and lint) expect a NullLiteral.
+  /// todo (pq): re-write FixProcessorLintTest to run the actual lints.
+  @failingTest
+  test_null_closure_literal() async {
+    await resolveTestUnit('''
+void f(dynamic x) { }
+main() {
+  f(null/*LINT*/);
+}
+''');
+    await assertHasFix('''
+void f(dynamic x) { }
+main() {
+  f(/*LINT*/() => null);
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/replace_with_is_empty_test.dart b/pkg/analysis_server/test/src/services/correction/fix/replace_with_is_empty_test.dart
new file mode 100644
index 0000000..ef13aa9
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/replace_with_is_empty_test.dart
@@ -0,0 +1,103 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ReplaceWithIsEmptyTest);
+  });
+}
+
+@reflectiveTest
+class ReplaceWithIsEmptyTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.REPLACE_WITH_IS_EMPTY;
+
+  @override
+  String get lintCode => LintNames.prefer_is_empty;
+
+  test_constantOnLeft_equal() async {
+    await resolveTestUnit('''
+f(List c) {
+  if (/*LINT*/0 == c.length) {}
+}
+''');
+    await assertHasFix('''
+f(List c) {
+  if (/*LINT*/c.isEmpty) {}
+}
+''');
+  }
+
+  test_constantOnLeft_greaterThan() async {
+    await resolveTestUnit('''
+f(List c) {
+  if (/*LINT*/1 > c.length) {}
+}
+''');
+    await assertHasFix('''
+f(List c) {
+  if (/*LINT*/c.isEmpty) {}
+}
+''');
+  }
+
+  test_constantOnLeft_greaterThanOrEqual() async {
+    await resolveTestUnit('''
+f(List c) {
+  if (/*LINT*/0 >= c.length) {}
+}
+''');
+    await assertHasFix('''
+f(List c) {
+  if (/*LINT*/c.isEmpty) {}
+}
+''');
+  }
+
+  test_constantOnRight_equal() async {
+    await resolveTestUnit('''
+f(List c) {
+  if (/*LINT*/c.length == 0) {}
+}
+''');
+    await assertHasFix('''
+f(List c) {
+  if (/*LINT*/c.isEmpty) {}
+}
+''');
+  }
+
+  test_constantOnRight_lessThan() async {
+    await resolveTestUnit('''
+f(List c) {
+  if (/*LINT*/c.length < 1) {}
+}
+''');
+    await assertHasFix('''
+f(List c) {
+  if (/*LINT*/c.isEmpty) {}
+}
+''');
+  }
+
+  test_constantOnRight_lessThanOrEqual() async {
+    await resolveTestUnit('''
+f(List c) {
+  if (/*LINT*/c.length <= 0) {}
+}
+''');
+    await assertHasFix('''
+f(List c) {
+  if (/*LINT*/c.isEmpty) {}
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/replace_with_is_not_empty_test.dart b/pkg/analysis_server/test/src/services/correction/fix/replace_with_is_not_empty_test.dart
new file mode 100644
index 0000000..9b621d9
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/replace_with_is_not_empty_test.dart
@@ -0,0 +1,77 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ReplaceWithIsNotEmptyTest);
+  });
+}
+
+@reflectiveTest
+class ReplaceWithIsNotEmptyTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.REPLACE_WITH_IS_NOT_EMPTY;
+
+  @override
+  String get lintCode => LintNames.prefer_is_empty;
+
+  test_constantOnLeft_lessThanOrEqual() async {
+    await resolveTestUnit('''
+f(List c) {
+  if (/*LINT*/1 <= c.length) {}
+}
+''');
+    await assertHasFix('''
+f(List c) {
+  if (/*LINT*/c.isNotEmpty) {}
+}
+''');
+  }
+
+  test_constantOnLeft_notEqual() async {
+    await resolveTestUnit('''
+f(List c) {
+  if (/*LINT*/0 != c.length) {}
+}
+''');
+    await assertHasFix('''
+f(List c) {
+  if (/*LINT*/c.isNotEmpty) {}
+}
+''');
+  }
+
+  test_constantOnRight_greaterThanOrEqual() async {
+    await resolveTestUnit('''
+f(List c) {
+  if (/*LINT*/c.length >= 1) {}
+}
+''');
+    await assertHasFix('''
+f(List c) {
+  if (/*LINT*/c.isNotEmpty) {}
+}
+''');
+  }
+
+  test_constantOnRight_notEqual() async {
+    await resolveTestUnit('''
+f(List c) {
+  if (/*LINT*/c.length != 0) {}
+}
+''');
+    await assertHasFix('''
+f(List c) {
+  if (/*LINT*/c.isNotEmpty) {}
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/services/correction/fix/test_all.dart b/pkg/analysis_server/test/src/services/correction/fix/test_all.dart
index 6a259e9..de8cd2a 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/test_all.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/test_all.dart
@@ -5,8 +5,11 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import 'add_async_test.dart' as add_async;
+import 'add_await_test.dart' as add_await;
 import 'add_explicit_cast_test.dart' as add_explicit_cast;
 import 'add_field_formal_parameters_test.dart' as add_field_formal_parameters;
+import 'add_missing_enum_case_clauses_test.dart'
+    as add_missing_enum_case_clauses;
 import 'add_missing_parameter_named_test.dart' as add_missing_parameter_named;
 import 'add_missing_parameter_positional_test.dart'
     as add_missing_parameter_positional;
@@ -20,6 +23,8 @@
 import 'add_static_test.dart' as add_static;
 import 'add_super_constructor_invocation_test.dart'
     as add_super_constructor_invocation;
+import 'analysis_options/test_all.dart' as analysis_options;
+import 'change_argument_name_test.dart' as change_argument_name;
 import 'change_to_nearest_precise_value_test.dart'
     as change_to_nearest_precise_value;
 import 'change_to_static_access_test.dart' as change_to_static_access;
@@ -57,6 +62,7 @@
 import 'remove_annotation_test.dart' as remove_annotation;
 import 'remove_await_test.dart' as remove_await;
 import 'remove_dead_code_test.dart' as remove_dead_code;
+import 'remove_duplicate_case_test.dart' as remove_duplicate_case;
 import 'remove_empty_catch_test.dart' as remove_empty_catch;
 import 'remove_empty_constructor_body_test.dart'
     as remove_empty_constructor_body;
@@ -74,18 +80,24 @@
 import 'remove_type_annotation_test.dart' as remove_type_annotation;
 import 'remove_type_arguments_test.dart' as remove_type_arguments;
 import 'remove_unnecessary_cast_test.dart' as remove_unnecessary_cast;
+import 'remove_unnecessary_const_test.dart' as remove_unnecessary_const;
+import 'remove_unnecessary_new_test.dart' as remove_unnecessary_new;
 import 'remove_unused_catch_clause_test.dart' as remove_unused_catch_clause;
 import 'remove_unused_catch_stack_test.dart' as remove_unused_catch_stack;
 import 'remove_unused_import_test.dart' as remove_unused_import;
 import 'rename_to_camel_case_test.dart' as rename_to_camel_case;
 import 'replace_boolean_with_bool_test.dart' as replace_boolean_with_bool;
+import 'replace_colon_with_equals_test.dart' as replace_colon_with_equals;
 import 'replace_final_with_const_test.dart' as replace_final_with_const;
+import 'replace_null_with_closure_test.dart' as replace_null_with_closure;
 import 'replace_return_type_future_test.dart' as replace_return_type_future;
 import 'replace_var_with_dynamic_test.dart' as replace_var_with_dynamic;
 import 'replace_with_brackets_test.dart' as replace_with_brackets;
 import 'replace_with_conditional_assignment_test.dart'
     as replace_with_conditional_assignment;
 import 'replace_with_identifier_test.dart' as replace_with_identifier;
+import 'replace_with_is_empty_test.dart' as replace_with_is_empty;
+import 'replace_with_is_not_empty_test.dart' as replace_with_is_not_empty;
 import 'replace_with_null_aware_test.dart' as replace_with_null_aware;
 import 'replace_with_tear_off_test.dart' as replace_with_tear_off;
 import 'update_sdk_constraints_test.dart' as update_sdk_constraints;
@@ -95,12 +107,15 @@
 import 'use_eq_eq_null_test.dart' as use_eq_eq_null;
 import 'use_is_not_empty_test.dart' as use_is_not_empty;
 import 'use_not_eq_null_test.dart' as use_not_eq_null;
+import 'use_rethrow_test.dart' as use_rethrow;
 
 main() {
   defineReflectiveSuite(() {
     add_async.main();
+    add_await.main();
     add_explicit_cast.main();
     add_field_formal_parameters.main();
+    add_missing_enum_case_clauses.main();
     add_missing_parameter_named.main();
     add_missing_parameter_positional.main();
     add_missing_parameter_required.main();
@@ -110,6 +125,8 @@
     add_required.main();
     add_static.main();
     add_super_constructor_invocation.main();
+    analysis_options.main();
+    change_argument_name.main();
     change_to.main();
     change_to_nearest_precise_value.main();
     change_to_static_access.main();
@@ -145,6 +162,7 @@
     remove_annotation.main();
     remove_await.main();
     remove_dead_code.main();
+    remove_duplicate_case.main();
     remove_empty_catch.main();
     remove_empty_constructor_body.main();
     remove_empty_else.main();
@@ -159,17 +177,23 @@
     remove_type_annotation.main();
     remove_type_arguments.main();
     remove_unnecessary_cast.main();
+    remove_unnecessary_const.main();
+    remove_unnecessary_new.main();
     remove_unused_catch_clause.main();
     remove_unused_catch_stack.main();
     remove_unused_import.main();
     rename_to_camel_case.main();
     replace_boolean_with_bool.main();
+    replace_colon_with_equals.main();
     replace_final_with_const.main();
+    replace_null_with_closure.main();
     replace_return_type_future.main();
     replace_var_with_dynamic.main();
     replace_with_brackets.main();
     replace_with_conditional_assignment.main();
     replace_with_identifier.main();
+    replace_with_is_empty.main();
+    replace_with_is_not_empty.main();
     replace_with_null_aware.main();
     replace_with_tear_off.main();
     update_sdk_constraints.main();
@@ -178,5 +202,6 @@
     use_eq_eq_null.main();
     use_is_not_empty.main();
     use_not_eq_null.main();
+    use_rethrow.main();
   }, name: 'fix');
 }
diff --git a/pkg/analysis_server/test/src/services/correction/fix/update_sdk_constraints_test.dart b/pkg/analysis_server/test/src/services/correction/fix/update_sdk_constraints_test.dart
index 4b957b3..33223ec 100644
--- a/pkg/analysis_server/test/src/services/correction/fix/update_sdk_constraints_test.dart
+++ b/pkg/analysis_server/test/src/services/correction/fix/update_sdk_constraints_test.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -23,6 +24,21 @@
     await testUpdate(from: 'any', to: '^2.1.0');
   }
 
+  test_asInConstContext() async {
+    createAnalysisOptionsFile(experiments: [EnableString.constant_update_2018]);
+    await testUpdate(content: '''
+const dynamic a = 2;
+const c = a as int;
+''', to: '^2.2.2');
+  }
+
+  test_boolOperator() async {
+    createAnalysisOptionsFile(experiments: [EnableString.constant_update_2018]);
+    await testUpdate(content: '''
+const c = true & false;
+''', to: '^2.2.2');
+  }
+
   test_caret() async {
     await testUpdate(from: '^2.0.0', to: '^2.1.0');
   }
@@ -31,6 +47,16 @@
     await testUpdate(from: "'>=2.0.0 <3.0.0'", to: "'>=2.1.0 <3.0.0'");
   }
 
+  test_eqEqOperatorInConstContext() async {
+    await testUpdate(content: '''
+class A {
+  const A();
+}
+const a = A();
+const c = a == null;
+''', to: '^2.2.2');
+  }
+
   test_gt() async {
     await testUpdate(from: "'>2.0.0'", to: "'>=2.1.0'");
   }
@@ -39,12 +65,36 @@
     await testUpdate(from: "'>=2.0.0'", to: "'>=2.1.0'");
   }
 
-  testUpdate({String from, String to}) async {
+  test_gtGtGtOperator() async {
+    createAnalysisOptionsFile(experiments: [EnableString.triple_shift]);
+    await testUpdate(content: '''
+class C {
+  C operator >>>(C other) => this;
+}
+''', to: '^2.2.2');
+  }
+
+  test_isInConstContext() async {
+    createAnalysisOptionsFile(experiments: [EnableString.constant_update_2018]);
+    await testUpdate(content: '''
+const a = 0;
+const c = a is int;
+''', to: '^2.2.2');
+  }
+
+  test_setLiteral() async {
+    await testUpdate(content: '''
+var s = <int>{};
+''', to: '^2.2.0');
+  }
+
+  testUpdate({String content, String from: '^2.0.0', String to}) async {
     updateTestPubspecFile('''
 environment:
   sdk: $from
 ''');
-    await resolveTestUnit('''
+    await resolveTestUnit(content ??
+        '''
 Future<int> zero() async => 0;
 ''');
     await assertHasFix('''
diff --git a/pkg/analysis_server/test/src/services/correction/fix/use_rethrow_test.dart b/pkg/analysis_server/test/src/services/correction/fix/use_rethrow_test.dart
new file mode 100644
index 0000000..5a49867
--- /dev/null
+++ b/pkg/analysis_server/test/src/services/correction/fix/use_rethrow_test.dart
@@ -0,0 +1,42 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analysis_server/src/services/correction/fix.dart';
+import 'package:analysis_server/src/services/correction/fix_internal.dart';
+import 'package:analyzer_plugin/utilities/fixes/fixes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'fix_processor.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(UseRethrowTest);
+  });
+}
+
+@reflectiveTest
+class UseRethrowTest extends FixProcessorLintTest {
+  @override
+  FixKind get kind => DartFixKind.USE_RETHROW;
+
+  @override
+  String get lintCode => LintNames.use_rethrow_when_possible;
+
+  test_rethrow() async {
+    await resolveTestUnit('''
+void bad1() {
+  try {} catch (e) {
+    throw/*LINT*/ e;
+  }
+}
+''');
+    await assertHasFix('''
+void bad1() {
+  try {} catch (e) {
+    rethrow;
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analysis_server/test/src/test_all.dart b/pkg/analysis_server/test/src/test_all.dart
index 51ad9b3..86eb450 100644
--- a/pkg/analysis_server/test/src/test_all.dart
+++ b/pkg/analysis_server/test/src/test_all.dart
@@ -4,29 +4,31 @@
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'computer/test_all.dart' as computer_all;
-import 'domain_abstract_test.dart' as domain_abstract_test;
-import 'domains/test_all.dart' as domains_all;
-import 'flutter/test_all.dart' as flutter_all;
-import 'nullability/test_all.dart' as nullability_all;
-import 'plugin/test_all.dart' as plugin_all;
-import 'services/test_all.dart' as services_all;
-import 'utilities/test_all.dart' as utilities_all;
-import 'watch_manager_test.dart' as watch_manager_test;
+import 'computer/test_all.dart' as computer;
+import 'domain_abstract_test.dart' as domain_abstract;
+import 'domains/test_all.dart' as domains;
+import 'flutter/test_all.dart' as flutter;
+import 'lsp/test_all.dart' as lsp;
+import 'nullability/test_all.dart' as nullability;
+import 'plugin/test_all.dart' as plugin;
+import 'services/test_all.dart' as services;
+import 'utilities/test_all.dart' as utilities;
+import 'watch_manager_test.dart' as watch_manager;
 
 /**
  * Utility for manually running all tests.
  */
 main() {
   defineReflectiveSuite(() {
-    computer_all.main();
-    domain_abstract_test.main();
-    domains_all.main();
-    flutter_all.main();
-    nullability_all.main();
-    plugin_all.main();
-    services_all.main();
-    utilities_all.main();
-    watch_manager_test.main();
+    computer.main();
+    domain_abstract.main();
+    domains.main();
+    flutter.main();
+    lsp.main();
+    nullability.main();
+    plugin.main();
+    services.main();
+    utilities.main();
+    watch_manager.main();
   }, name: 'src');
 }
diff --git a/pkg/analysis_server/test/src/utilities/flutter_test.dart b/pkg/analysis_server/test/src/utilities/flutter_test.dart
index 20193cb..6bb17e3 100644
--- a/pkg/analysis_server/test/src/utilities/flutter_test.dart
+++ b/pkg/analysis_server/test/src/utilities/flutter_test.dart
@@ -17,6 +17,8 @@
 
 @reflectiveTest
 class FlutterTest extends AbstractSingleUnitTest {
+  final flutter = Flutter.mobile;
+
   @override
   void setUp() {
     super.setUp();
@@ -29,7 +31,7 @@
 var w = const Icon(Icons.book);
 ''');
     var w = _getTopVariableCreation('w');
-    expect(getWidgetPresentationText(w), "Icon(Icons.book)");
+    expect(flutter.getWidgetPresentationText(w), "Icon(Icons.book)");
   }
 
   test_getWidgetPresentationText_icon_withoutArguments() async {
@@ -39,7 +41,7 @@
 var w = const Icon();
 ''');
     var w = _getTopVariableCreation('w');
-    expect(getWidgetPresentationText(w), "Icon");
+    expect(flutter.getWidgetPresentationText(w), "Icon");
   }
 
   test_getWidgetPresentationText_notWidget() async {
@@ -48,7 +50,7 @@
 var w = new Object();
 ''');
     var w = _getTopVariableCreation('w');
-    expect(getWidgetPresentationText(w), isNull);
+    expect(flutter.getWidgetPresentationText(w), isNull);
   }
 
   test_getWidgetPresentationText_text() async {
@@ -57,7 +59,7 @@
 var w = const Text('foo');
 ''');
     var w = _getTopVariableCreation('w');
-    expect(getWidgetPresentationText(w), "Text('foo')");
+    expect(flutter.getWidgetPresentationText(w), "Text('foo')");
   }
 
   test_getWidgetPresentationText_text_longText() async {
@@ -67,7 +69,9 @@
 ''');
     var w = _getTopVariableCreation('w');
     expect(
-        getWidgetPresentationText(w), "Text('abcabcabcabcab...cabcabcabcabc')");
+      flutter.getWidgetPresentationText(w),
+      "Text('abcabcabcabcab...cabcabcabcabc')",
+    );
   }
 
   test_getWidgetPresentationText_text_withoutArguments() async {
@@ -77,7 +81,7 @@
 var w = const Text();
 ''');
     var w = _getTopVariableCreation('w');
-    expect(getWidgetPresentationText(w), "Text");
+    expect(flutter.getWidgetPresentationText(w), "Text");
   }
 
   test_getWidgetPresentationText_unresolved() async {
@@ -87,7 +91,7 @@
 var w = new Foo();
 ''');
     var w = _getTopVariableCreation('w');
-    expect(getWidgetPresentationText(w), isNull);
+    expect(flutter.getWidgetPresentationText(w), isNull);
   }
 
   test_identifyWidgetExpression_node_instanceCreation() async {
@@ -116,11 +120,14 @@
       ConstructorName constructorName = creation.constructorName;
       TypeName typeName = constructorName.type;
       ArgumentList argumentList = creation.argumentList;
-      expect(identifyWidgetExpression(creation), creation);
-      expect(identifyWidgetExpression(constructorName), creation);
-      expect(identifyWidgetExpression(typeName), creation);
-      expect(identifyWidgetExpression(argumentList), isNull);
-      expect(identifyWidgetExpression(argumentList.arguments[0]), isNull);
+      expect(flutter.identifyWidgetExpression(creation), creation);
+      expect(flutter.identifyWidgetExpression(constructorName), creation);
+      expect(flutter.identifyWidgetExpression(typeName), creation);
+      expect(flutter.identifyWidgetExpression(argumentList), isNull);
+      expect(
+        flutter.identifyWidgetExpression(argumentList.arguments[0]),
+        isNull,
+      );
     }
 
     // new MyWidget.named(5678);
@@ -130,13 +137,16 @@
       ConstructorName constructorName = creation.constructorName;
       TypeName typeName = constructorName.type;
       ArgumentList argumentList = creation.argumentList;
-      expect(identifyWidgetExpression(creation), creation);
-      expect(identifyWidgetExpression(constructorName), creation);
-      expect(identifyWidgetExpression(typeName), creation);
-      expect(identifyWidgetExpression(typeName.name), creation);
-      expect(identifyWidgetExpression(constructorName.name), creation);
-      expect(identifyWidgetExpression(argumentList), isNull);
-      expect(identifyWidgetExpression(argumentList.arguments[0]), isNull);
+      expect(flutter.identifyWidgetExpression(creation), creation);
+      expect(flutter.identifyWidgetExpression(constructorName), creation);
+      expect(flutter.identifyWidgetExpression(typeName), creation);
+      expect(flutter.identifyWidgetExpression(typeName.name), creation);
+      expect(flutter.identifyWidgetExpression(constructorName.name), creation);
+      expect(flutter.identifyWidgetExpression(argumentList), isNull);
+      expect(
+        flutter.identifyWidgetExpression(argumentList.arguments[0]),
+        isNull,
+      );
     }
   }
 
@@ -155,18 +165,21 @@
     {
       MethodInvocation invocation = findNodeAtString(
           "createEmptyText();", (node) => node is MethodInvocation);
-      expect(identifyWidgetExpression(invocation), invocation);
+      expect(flutter.identifyWidgetExpression(invocation), invocation);
       ArgumentList argumentList = invocation.argumentList;
-      expect(identifyWidgetExpression(argumentList), isNull);
+      expect(flutter.identifyWidgetExpression(argumentList), isNull);
     }
 
     {
       MethodInvocation invocation = findNodeAtString(
           "createText('xyz');", (node) => node is MethodInvocation);
-      expect(identifyWidgetExpression(invocation), invocation);
+      expect(flutter.identifyWidgetExpression(invocation), invocation);
       ArgumentList argumentList = invocation.argumentList;
-      expect(identifyWidgetExpression(argumentList), isNull);
-      expect(identifyWidgetExpression(argumentList.arguments[0]), isNull);
+      expect(flutter.identifyWidgetExpression(argumentList), isNull);
+      expect(
+        flutter.identifyWidgetExpression(argumentList.arguments[0]),
+        isNull,
+      );
     }
   }
 
@@ -181,7 +194,7 @@
 Text createEmptyText() => new Text('');
 ''');
     Expression childExpression = findNodeAtString('child: ');
-    expect(identifyWidgetExpression(childExpression), isNull);
+    expect(flutter.identifyWidgetExpression(childExpression), isNull);
   }
 
   test_identifyWidgetExpression_node_prefixedIdentifier_identifier() async {
@@ -197,7 +210,7 @@
 }
 ''');
     SimpleIdentifier bar = findNodeAtString('bar; // ref');
-    expect(identifyWidgetExpression(bar), bar.parent);
+    expect(flutter.identifyWidgetExpression(bar), bar.parent);
   }
 
   test_identifyWidgetExpression_node_prefixedIdentifier_prefix() async {
@@ -213,7 +226,7 @@
 }
 ''');
     SimpleIdentifier foo = findNodeAtString('foo.bar');
-    expect(identifyWidgetExpression(foo), foo.parent);
+    expect(flutter.identifyWidgetExpression(foo), foo.parent);
   }
 
   test_identifyWidgetExpression_node_simpleIdentifier() async {
@@ -225,7 +238,7 @@
 }
 ''');
     Expression expression = findNodeAtString('widget; // ref');
-    expect(identifyWidgetExpression(expression), expression);
+    expect(flutter.identifyWidgetExpression(expression), expression);
   }
 
   test_identifyWidgetExpression_null() async {
@@ -239,15 +252,15 @@
 
 Text createEmptyText() => new Text('');
 ''');
-    expect(identifyWidgetExpression(null), isNull);
+    expect(flutter.identifyWidgetExpression(null), isNull);
     {
       Expression expression = findNodeAtString("42;");
-      expect(identifyWidgetExpression(expression), isNull);
+      expect(flutter.identifyWidgetExpression(expression), isNull);
     }
 
     {
       Expression expression = findNodeAtString("intVariable;");
-      expect(identifyWidgetExpression(expression), isNull);
+      expect(flutter.identifyWidgetExpression(expression), isNull);
     }
   }
 
@@ -263,7 +276,7 @@
 void useWidget(Widget w) {}
 ''');
     Expression expression = findNodeAtString("text); // ref");
-    expect(identifyWidgetExpression(expression), expression);
+    expect(flutter.identifyWidgetExpression(expression), expression);
   }
 
   test_identifyWidgetExpression_parent_expressionStatement() async {
@@ -275,7 +288,7 @@
 }
 ''');
     Expression expression = findNodeAtString("widget; // ref");
-    expect(identifyWidgetExpression(expression), expression);
+    expect(flutter.identifyWidgetExpression(expression), expression);
   }
 
   test_identifyWidgetExpression_parent_listLiteral() async {
@@ -287,7 +300,7 @@
 }
 ''');
     Expression expression = findNodeAtString("widget]; // ref");
-    expect(identifyWidgetExpression(expression), expression);
+    expect(flutter.identifyWidgetExpression(expression), expression);
   }
 
   test_identifyWidgetExpression_parent_namedExpression() async {
@@ -302,7 +315,7 @@
 void useWidget({Widget child}) {}
 ''');
     Expression expression = findNodeAtString("text); // ref");
-    expect(identifyWidgetExpression(expression), expression);
+    expect(flutter.identifyWidgetExpression(expression), expression);
   }
 
   test_identifyWidgetExpression_parent_returnStatement() async {
@@ -314,7 +327,7 @@
 }
 ''');
     Expression expression = findNodeAtString("widget; // ref");
-    expect(identifyWidgetExpression(expression), expression);
+    expect(flutter.identifyWidgetExpression(expression), expression);
   }
 
   test_isWidget() async {
@@ -328,19 +341,19 @@
 class NotWidget extends State {}
 ''');
     var myStatelessWidget = testUnitElement.getType('MyStatelessWidget');
-    expect(isWidget(myStatelessWidget), isTrue);
+    expect(flutter.isWidget(myStatelessWidget), isTrue);
 
     var myStatefulWidget = testUnitElement.getType('MyStatefulWidget');
-    expect(isWidget(myStatefulWidget), isTrue);
+    expect(flutter.isWidget(myStatefulWidget), isTrue);
 
     var myContainer = testUnitElement.getType('MyContainer');
-    expect(isWidget(myContainer), isTrue);
+    expect(flutter.isWidget(myContainer), isTrue);
 
     var notFlutter = testUnitElement.getType('NotFlutter');
-    expect(isWidget(notFlutter), isFalse);
+    expect(flutter.isWidget(notFlutter), isFalse);
 
     var notWidget = testUnitElement.getType('NotWidget');
-    expect(isWidget(notWidget), isFalse);
+    expect(flutter.isWidget(notWidget), isFalse);
   }
 
   test_isWidgetCreation() async {
@@ -350,13 +363,13 @@
 var a = new Object();
 var b = new Text('bbb');
 ''');
-    expect(isWidgetCreation(null), isFalse);
+    expect(flutter.isWidgetCreation(null), isFalse);
 
     InstanceCreationExpression a = _getTopVariableCreation('a');
-    expect(isWidgetCreation(a), isFalse);
+    expect(flutter.isWidgetCreation(a), isFalse);
 
     InstanceCreationExpression b = _getTopVariableCreation('b');
-    expect(isWidgetCreation(b), isTrue);
+    expect(flutter.isWidgetCreation(b), isTrue);
   }
 
   test_isWidgetExpression() async {
@@ -381,46 +394,46 @@
 ''');
     {
       Expression expression = findNodeAtString('named(); // use');
-      expect(isWidgetExpression(expression), isFalse);
+      expect(flutter.isWidgetExpression(expression), isFalse);
       var creation = expression.parent.parent as InstanceCreationExpression;
-      expect(isWidgetExpression(creation), isTrue);
+      expect(flutter.isWidgetExpression(creation), isTrue);
     }
 
     {
       Expression expression = findNodeAtString("new Text('abc')");
-      expect(isWidgetExpression(expression), isTrue);
+      expect(flutter.isWidgetExpression(expression), isTrue);
     }
 
     {
       Expression expression = findNodeAtString("text;");
-      expect(isWidgetExpression(expression), isTrue);
+      expect(flutter.isWidgetExpression(expression), isTrue);
     }
 
     {
       Expression expression = findNodeAtString(
           "createEmptyText();", (node) => node is MethodInvocation);
-      expect(isWidgetExpression(expression), isTrue);
+      expect(flutter.isWidgetExpression(expression), isTrue);
     }
 
     {
       SimpleIdentifier expression = findNodeAtString('Container(');
-      expect(isWidgetExpression(expression), isFalse);
+      expect(flutter.isWidgetExpression(expression), isFalse);
     }
 
     {
       NamedExpression expression =
           findNodeAtString('child: ', (n) => n is NamedExpression);
-      expect(isWidgetExpression(expression), isFalse);
+      expect(flutter.isWidgetExpression(expression), isFalse);
     }
 
     {
       Expression expression = findNodeAtString("42;");
-      expect(isWidgetExpression(expression), isFalse);
+      expect(flutter.isWidgetExpression(expression), isFalse);
     }
 
     {
       Expression expression = findNodeAtString("intVariable;");
-      expect(isWidgetExpression(expression), isFalse);
+      expect(flutter.isWidgetExpression(expression), isFalse);
     }
   }
 
diff --git a/pkg/analysis_server/test/test_all.dart b/pkg/analysis_server/test/test_all.dart
index e26c43d..9d87caa 100644
--- a/pkg/analysis_server/test/test_all.dart
+++ b/pkg/analysis_server/test/test_all.dart
@@ -5,50 +5,55 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../tool/spec/check_all_test.dart' as check_spec;
-import 'analysis/test_all.dart' as analysis_all;
-import 'analysis_server_test.dart' as analysis_server_test;
-import 'channel/test_all.dart' as channel_test;
-import 'completion_test.dart' as completion_test;
-import 'context_manager_test.dart' as context_manager_test;
-import 'domain_analysis_test.dart' as domain_analysis_test;
-import 'domain_completion_test.dart' as domain_completion_test;
-import 'domain_diagnostic_test.dart' as domain_experimental_test;
-import 'domain_edit_dartfix_test.dart' as domain_edit_dartfix_test;
-import 'domain_execution_test.dart' as domain_execution_test;
-import 'domain_server_test.dart' as domain_server_test;
-import 'edit/test_all.dart' as edit_all;
-import 'plugin/test_all.dart' as plugin_all;
-import 'protocol_server_test.dart' as protocol_server_test;
-import 'protocol_test.dart' as protocol_test;
-import 'search/test_all.dart' as search_all;
-import 'services/test_all.dart' as services_all;
-import 'socket_server_test.dart' as socket_server_test;
-import 'src/test_all.dart' as src_all;
+import 'analysis/test_all.dart' as analysis;
+import 'analysis_server_test.dart' as analysis_server;
+import 'benchmarks_test.dart' as benchmarks;
+import 'channel/test_all.dart' as channel;
+import 'completion_test.dart' as completion;
+import 'context_manager_test.dart' as context_manager;
+import 'domain_analysis_test.dart' as domain_analysis;
+import 'domain_completion_test.dart' as domain_completion;
+import 'domain_diagnostic_test.dart' as domain_experimental;
+import 'domain_edit_dartfix_test.dart' as domain_edit_dartfix;
+import 'domain_execution_test.dart' as domain_execution;
+import 'domain_server_test.dart' as domain_server;
+import 'edit/test_all.dart' as edit;
+import 'lsp/test_all.dart' as lsp;
+import 'plugin/test_all.dart' as plugin;
+import 'protocol_server_test.dart' as protocol_server;
+import 'protocol_test.dart' as protocol;
+import 'search/test_all.dart' as search;
+import 'services/test_all.dart' as services;
+import 'socket_server_test.dart' as socket_server;
+import 'src/test_all.dart' as src;
+import 'tool/test_all.dart' as tool;
+import 'verify_tests_test.dart' as verify_tests;
 
-/**
- * Utility for manually running all tests.
- */
 main() {
   defineReflectiveSuite(() {
-    analysis_all.main();
-    analysis_server_test.main();
-    channel_test.main();
-    completion_test.main();
-    context_manager_test.main();
-    domain_analysis_test.main();
-    domain_completion_test.main();
-    domain_edit_dartfix_test.main();
-    domain_execution_test.main();
-    domain_experimental_test.main();
-    domain_server_test.main();
-    edit_all.main();
-    plugin_all.main();
-    protocol_server_test.main();
-    protocol_test.main();
-    search_all.main();
-    services_all.main();
-    socket_server_test.main();
-    src_all.main();
+    analysis.main();
+    analysis_server.main();
+    benchmarks.main();
+    channel.main();
+    completion.main();
+    context_manager.main();
+    domain_analysis.main();
+    domain_completion.main();
+    domain_edit_dartfix.main();
+    domain_execution.main();
+    domain_experimental.main();
+    domain_server.main();
+    edit.main();
+    lsp.main();
+    plugin.main();
+    protocol_server.main();
+    protocol.main();
+    search.main();
+    services.main();
+    socket_server.main();
+    src.main();
+    tool.main();
+    verify_tests.main();
     defineReflectiveSuite(() {
       defineReflectiveTests(SpecTest);
     }, name: 'spec');
diff --git a/pkg/analysis_server/test/tool/lsp_spec/json_test.dart b/pkg/analysis_server/test/tool/lsp_spec/json_test.dart
index df7a3c8..b4cb36e 100644
--- a/pkg/analysis_server/test/tool/lsp_spec/json_test.dart
+++ b/pkg/analysis_server/test/tool/lsp_spec/json_test.dart
@@ -99,6 +99,44 @@
       expect(jsonMap, isNot(contains('error')));
     });
 
+    test('canParse returns false for out-of-spec (restricted) enum values', () {
+      expect(MarkupKind.canParse('NotAMarkupKind'), isFalse);
+    });
+
+    test('canParse returns true for in-spec (restricted) enum values', () {
+      expect(MarkupKind.canParse('plaintext'), isTrue);
+    });
+
+    test('canParse returns true for out-of-spec (unrestricted) enum values',
+        () {
+      expect(SymbolKind.canParse(-1), isTrue);
+    });
+
+    test('canParse allows nulls in nullable and undefinable fields', () {
+      // The only required field in InitializeParams is capabilities, and all
+      // of the fields on that are optional.
+      final canParse = InitializeParams.canParse({
+        'processId': null,
+        'rootUri': null,
+        'capabilities': <String, Object>{}
+      });
+      expect(canParse, isTrue);
+    });
+
+    test('canParse validates optional fields', () {
+      expect(RenameFileOptions.canParse(<String, Object>{}), isTrue);
+      expect(RenameFileOptions.canParse({'overwrite': true}), isTrue);
+      expect(RenameFileOptions.canParse({'overwrite': 1}), isFalse);
+    });
+
+    test('canParse ignores fields not in the spec', () {
+      expect(
+          RenameFileOptions.canParse({'overwrite': true, 'invalidField': true}),
+          isTrue);
+      expect(RenameFileOptions.canParse({'overwrite': 1, 'invalidField': true}),
+          isFalse);
+    });
+
     test('ResponseMessage can include a null result', () {
       final id = new Either2<num, String>.t1(1);
       final resp = new ResponseMessage(id, null, null, jsonRpcVersion);
@@ -169,6 +207,16 @@
       expect(params.textDocument,
           const TypeMatcher<VersionedTextDocumentIdentifier>());
     });
+
+    test('parses JSON with unknown fields', () {
+      final input =
+          '{"id":1,"invalidField":true,"method":"foo","jsonrpc":"test"}';
+      final message = RequestMessage.fromJson(jsonDecode(input));
+      expect(message.id.valueEquals(1), isTrue);
+      expect(message.method, equals(new Method("foo")));
+      expect(message.params, isNull);
+      expect(message.jsonrpc, equals("test"));
+    });
   });
 
   test('objects with lists can round-trip through to json and back', () {
diff --git a/pkg/analysis_server/test/tool/test_all.dart b/pkg/analysis_server/test/tool/test_all.dart
new file mode 100644
index 0000000..8f79e7d
--- /dev/null
+++ b/pkg/analysis_server/test/tool/test_all.dart
@@ -0,0 +1,13 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'lsp_spec/test_all.dart' as lsp_spec;
+
+main() {
+  defineReflectiveSuite(() {
+    lsp_spec.main();
+  }, name: 'tool');
+}
diff --git a/pkg/analysis_server/test/verify_tests_test.dart b/pkg/analysis_server/test/verify_tests_test.dart
new file mode 100644
index 0000000..4373181
--- /dev/null
+++ b/pkg/analysis_server/test/verify_tests_test.dart
@@ -0,0 +1,84 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/analysis/analysis_context.dart';
+import 'package:analyzer/dart/analysis/analysis_context_collection.dart';
+import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/dart/analysis/session.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/file_system/physical_file_system.dart';
+import 'package:front_end/src/testing/package_root.dart' as package_root;
+import 'package:path/path.dart' as path;
+import 'package:test/test.dart';
+
+main() {
+  PhysicalResourceProvider provider = PhysicalResourceProvider.INSTANCE;
+  String packageRoot = provider.pathContext.normalize(package_root.packageRoot);
+  String analysisServerPath =
+      provider.pathContext.join(packageRoot, 'analysis_server');
+  String testDirPath = provider.pathContext.join(analysisServerPath, 'test');
+
+  AnalysisContextCollection collection = new AnalysisContextCollection(
+      includedPaths: <String>[testDirPath], resourceProvider: provider);
+  List<AnalysisContext> contexts = collection.contexts;
+  if (contexts.length != 1) {
+    fail('The test directory contains multiple analysis contexts.');
+  }
+
+  buildTestsIn(
+      contexts[0].currentSession, testDirPath, provider.getFolder(testDirPath));
+}
+
+void buildTestsIn(
+    AnalysisSession session, String testDirPath, Folder directory) {
+  List<String> testFileNames = [];
+  File testAllFile;
+  List<Resource> children = directory.getChildren();
+  children.sort((first, second) => first.shortName.compareTo(second.shortName));
+  for (Resource child in children) {
+    if (child is Folder) {
+      if (child.shortName != 'integration' &&
+          child.getChildAssumingFile('test_all.dart').exists) {
+        testFileNames.add('${child.shortName}/test_all.dart');
+      }
+      buildTestsIn(session, testDirPath, child);
+    } else if (child is File) {
+      String name = child.shortName;
+      if (name == 'test_all.dart') {
+        testAllFile = child;
+      } else if (name.endsWith('_test.dart')) {
+        testFileNames.add(name);
+      }
+    }
+  }
+  String relativePath = path.relative(directory.path, from: testDirPath);
+  test(relativePath, () {
+    if (testFileNames.isEmpty) {
+      return;
+    }
+    if (testAllFile == null) {
+      fail('Missing "test_all.dart" in $relativePath');
+    }
+    ParsedUnitResult result = session.getParsedUnit(testAllFile.path);
+    if (result.state != ResultState.VALID) {
+      fail('Could not parse ${testAllFile.path}');
+    }
+    List<String> importedFiles = [];
+    for (var directive in result.unit.directives) {
+      if (directive is ImportDirective) {
+        importedFiles.add(directive.uri.stringValue);
+      }
+    }
+    List<String> missingFiles = [];
+    for (String testFileName in testFileNames) {
+      if (!importedFiles.contains(testFileName)) {
+        missingFiles.add(testFileName);
+      }
+    }
+    if (missingFiles.isNotEmpty) {
+      fail('Tests missing from "test_all.dart": ${missingFiles.join(', ')}');
+    }
+  });
+}
diff --git a/pkg/analysis_server/tool/lsp_spec/README.md b/pkg/analysis_server/tool/lsp_spec/README.md
index 5c0ab08..f5420ac 100644
--- a/pkg/analysis_server/tool/lsp_spec/README.md
+++ b/pkg/analysis_server/tool/lsp_spec/README.md
@@ -1,8 +1,10 @@
 # Language Server Protocol
 
-## LSP Support Status
+[Language Server Protocol](https://microsoft.github.io/language-server-protocol/) (LSP) support is available in the Dart analysis server from version 2.2.0 of the SDK (which was included in version 1.2.1 of Flutter). The supported messages are detailed below (for the version of the SDK that matches this README).
 
-Support for [the Language Server Protocol](https://microsoft.github.io/language-server-protocol/) (LSP) is **not production ready** but available as a preview to allow testing/integration work.
+## Using the Dart LSP server in editors
+
+- [Using Dart LSP in Vim](README_vim.md)
 
 ## Running the Server
 
@@ -63,9 +65,9 @@
 | textDocument/documentSymbol | ✅ | ✅ | ✅ | ✅ |
 | textDocument/codeAction (sortMembers) | ✅ | ✅ | ✅ | ✅ |
 | textDocument/codeAction (organiseImports) | ✅ | ✅ | ✅ | ✅ |
-| textDocument/codeAction (refactors) | | | | |
-| textDocument/codeAction (assists) | ✅ | ✅ | ✅ | ✅ |
-| textDocument/codeAction (fixes) | ✅ | ✅ | ✅ | ✅ |
+| textDocument/codeAction (refactors) | | | | | <!-- Only if the client advertises `codeActionLiteralSupport` with Refactors -->
+| textDocument/codeAction (assists) | ✅ | ✅ | ✅ | ✅ | Only if the client advertises `codeActionLiteralSupport` with `Refactor`
+| textDocument/codeAction (fixes) | ✅ | ✅ | ✅ | ✅ | Only if the client advertises `codeActionLiteralSupport` with `QuickFix`
 | textDocument/codeLens | | | | |
 | codeLens/resolve | | | | |
 | textDocument/documentLink | | | | |
diff --git a/pkg/analysis_server/tool/lsp_spec/README_vim.md b/pkg/analysis_server/tool/lsp_spec/README_vim.md
new file mode 100644
index 0000000..19dd029
--- /dev/null
+++ b/pkg/analysis_server/tool/lsp_spec/README_vim.md
@@ -0,0 +1,75 @@
+# Using Dart LSP in Vim
+
+## Prerequisites
+
+To use Dart’s LSP server with Vim you’ll need to be using at least version 2.2.0
+of the Dart SDK (which shipped in version 1.2.1 of Flutter). A Vim plugin manager
+is not required but may simplify setup. The steps below have been written assuming
+use of [vim-plug](https://github.com/junegunn/vim-plug).
+
+
+## Install the Plugins
+
+Install the [dart-vim-plugin](https://github.com/dart-lang/dart-vim-plugin) and
+[vim-lsc](https://github.com/natebosch/vim-lsc) plugins. Using vim-plug this can
+be done by adding the following to `.vimrc` then reloading and running
+`:PlugInstall`:
+
+```
+call plug#begin('~/.vim/plugged')
+Plug 'dart-lang/dart-vim-plugin'
+Plug 'natebosch/vim-lsc'
+call plug#end()
+```
+
+Note: Other LSP plugins are available for Vim but this document assumes vim-lsc.
+
+
+## Configure vim-lsc
+
+Next tell vim-lsc how to invoke the LSP server. You’ll need the path to the Dart
+SDK (which may be inside the Flutter SDK at bin/cache/dart-sdk for Flutter) and
+add this to `.vimrc` and reload.
+
+```
+let g:lsc_server_commands = {'dart': '~/dart-sdk/bin/dart ~/dart-sdk/bin/snapshots/analysis_server.dart.snapshot --lsp'}
+let g:lsc_auto_map = v:true " Use defaults
+```
+
+This will set up the LSP server for Dart files using default keybindings. More
+info on configuring vim-lsc can be found at
+[natebosch/vim-lsc#configuration](https://github.com/natebosch/vim-lsc#configuration).
+
+
+## Test the Plugins
+
+Open a Dart file in Vim and confirm that you see syntax highlighting (this is
+provided by dart-vim-plugin) and that invalid code is highlighted (this is
+provided by the LSP server via vim-lsc), with the error showing along the bottom
+of the window.
+
+
+## Keybindings and Commands
+
+Keybindings and commands are documented in the
+[vim-lsc README](https://github.com/natebosch/vim-lsc#configuration).
+
+
+## Supported Features
+
+Available features are those supported by both the vim-lsc plugin
+([see here](https://github.com/natebosch/vim-lsc#features)) and the Dart LSP
+server ([see here](https://github.com/dart-lang/sdk/blob/master/pkg/analysis_server/tool/lsp_spec/README.md#message-status)).
+
+
+## Troubleshooting
+
+If you find an issue with the LSP server you can enable logging in the server by
+adding the following switches to the LSP server command in `.vimrc`:
+
+```
+--instrumentation-log-file /path/to/logs/lsp-vim.txt
+```
+
+Issues should be opened in the [dart-lang/sdk](https://github.com/dart-lang/sdk)
+repository.
diff --git a/pkg/analysis_server/tool/lsp_spec/codegen_dart.dart b/pkg/analysis_server/tool/lsp_spec/codegen_dart.dart
index 839da75..2967651 100644
--- a/pkg/analysis_server/tool/lsp_spec/codegen_dart.dart
+++ b/pkg/analysis_server/tool/lsp_spec/codegen_dart.dart
@@ -21,10 +21,17 @@
 /// in the spec (it's important the server doesn't crash on deserialising
 /// newer values).
 bool enumClassAllowsAnyValue(String name) {
-  // TODO(dantup): This should return true by default, and allow opt-out for
-  // those things we know are not supported. This behaviour matches the old
-  // code in order to simplify diffs while migrating.
-  return name == 'ErrorCodes' || name == 'CodeActionKind' || name == 'Method';
+  // The types listed here are the ones that have a guaranteed restricted type
+  // in the LSP spec, for example:
+  //
+  //   export type CompletionTriggerKind = 1 | 2 | 3;
+  //
+  // The other enum types use string/number/etc. in the referencing classes.
+  return name != 'CompletionTriggerKind' &&
+      name != 'FailureHandlingKind' &&
+      name != 'InsertTextFormat' &&
+      name != 'MarkupKind' &&
+      name != 'ResourceOperationKind';
 }
 
 String generateDartForTypes(List<AstNode> types) {
@@ -157,11 +164,21 @@
     ..writeIndented('return obj is Map<String, dynamic>');
   // In order to consider this valid for parsing, all fields that may not be
   // undefined must be present and also type check for the correct type.
-  final requiredFields =
-      _getAllFields(interface).where((f) => !f.allowsUndefined);
-  for (var field in requiredFields) {
-    buffer.write(" && obj.containsKey('${field.name}') && ");
+  // Any fields that are optional but present, must still type check.
+  final fields = _getAllFields(interface);
+  for (var field in fields) {
+    if (!field.allowsUndefined) {
+      buffer.write(" && obj.containsKey('${field.name}') && ");
+    } else {
+      buffer.write(" && ");
+    }
+    if (field.allowsNull || field.allowsUndefined) {
+      buffer.write("(obj['${field.name}'] == null || ");
+    }
     _writeTypeCheckCondition(buffer, "obj['${field.name}']", field.type);
+    if (field.allowsNull || field.allowsUndefined) {
+      buffer.write(")");
+    }
   }
   buffer
     ..writeln(';')
@@ -206,6 +223,15 @@
   }
 }
 
+void _writeJsonHandler(IndentableStringBuffer buffer, Interface interface) {
+  buffer
+    ..writeIndented('static const jsonHandler = ')
+    ..write('const LspJsonHandler(')
+    ..write('${interface.name}.canParse, ${interface.name}.fromJson')
+    ..writeln(');')
+    ..writeln();
+}
+
 void _writeDocCommentsAndAnnotations(
     IndentableStringBuffer buffer, AstNode node) {
   var comment = node.commentText?.trim();
@@ -241,7 +267,7 @@
     ..indent();
   if (allowsAnyValue) {
     buffer.writeIndentedln('return ');
-    _writeTypeCheckCondition(buffer, 'obj', consts.first.type);
+    _writeTypeCheckCondition(buffer, 'obj', typeOfValues);
     buffer.writeln(';');
   } else {
     buffer
@@ -414,7 +440,7 @@
   for (final subclassName in _subtypes[interface.name] ?? const <String>[]) {
     final subclass = _interfaces[subclassName];
     buffer
-      ..writeIndentedln('if (${subclass.nameWithTypeArgs}.canParse(json)) {')
+      ..writeIndentedln('if (${subclass.name}.canParse(json)) {')
       ..indent()
       ..writeln('return ${subclass.nameWithTypeArgs}.fromJson(json);')
       ..outdent()
@@ -439,13 +465,13 @@
     ..writeIndentedln('@override')
     ..writeIndentedln('int get hashCode {')
     ..indent()
-    ..writeIndented('int hash = 0;');
+    ..writeIndentedln('int hash = 0;');
   for (var field in _getAllFields(interface)) {
-    buffer
-        .write('hash = JenkinsSmiHash.combine(hash, ${field.name}.hashCode);');
+    buffer.writeIndentedln(
+        'hash = JenkinsSmiHash.combine(hash, ${field.name}.hashCode);');
   }
   buffer
-    ..writeln('return JenkinsSmiHash.finish(hash);')
+    ..writeIndentedln('return JenkinsSmiHash.finish(hash);')
     ..outdent()
     ..writeIndentedln('}');
 }
@@ -464,6 +490,7 @@
   buffer
     ..writeln('{')
     ..indent();
+  _writeJsonHandler(buffer, interface);
   _writeConstructor(buffer, interface);
   _writeFromJsonConstructor(buffer, interface);
   // Handle Consts and Fields separately, since we need to include superclass
@@ -596,18 +623,19 @@
 
 void _writeTypeCheckCondition(
     IndentableStringBuffer buffer, String valueCode, TypeBase type) {
-  type = resolveTypeAlias(type, resolveEnumClasses: true);
+  type = resolveTypeAlias(type);
 
-  final resolvedDartType = type.dartTypeWithTypeArgs;
-  if (resolvedDartType == 'dynamic') {
+  final dartType = type.dartType;
+  final fullDartType = type.dartTypeWithTypeArgs;
+  if (fullDartType == 'dynamic') {
     buffer.write('true');
   } else if (_isSimpleType(type)) {
-    buffer.write('$valueCode is $resolvedDartType');
+    buffer.write('$valueCode is $fullDartType');
   } else if (_isSpecType(type)) {
-    buffer.write('$resolvedDartType.canParse($valueCode)');
+    buffer.write('$dartType.canParse($valueCode)');
   } else if (type is ArrayType) {
     buffer.write('($valueCode is List');
-    if (resolvedDartType != 'dynamic') {
+    if (fullDartType != 'dynamic') {
       // TODO(dantup): If we're happy to assume we never have two lists in a union
       // we could skip this bit.
       buffer.write(' && ($valueCode.every((item) => ');
@@ -617,8 +645,8 @@
     buffer.write(')');
   } else if (type is MapType) {
     buffer.write('($valueCode is Map');
-    if (resolvedDartType != 'dynamic') {
-      buffer..write(' && ((')..write('$valueCode.keys.every((item) => ');
+    if (fullDartType != 'dynamic') {
+      buffer..write(' && (')..write('$valueCode.keys.every((item) => ');
       _writeTypeCheckCondition(buffer, 'item', type.indexType);
       buffer..write('&& $valueCode.values.every((item) => ');
       _writeTypeCheckCondition(buffer, 'item', type.valueType);
@@ -636,7 +664,7 @@
     }
     buffer.write(')');
   } else {
-    throw 'Unable to type check $valueCode against $resolvedDartType';
+    throw 'Unable to type check $valueCode against $fullDartType';
   }
 }
 
diff --git a/pkg/analysis_server/tool/spec/check_all_test.dart b/pkg/analysis_server/tool/spec/check_all_test.dart
index 1388652..e37d58f 100644
--- a/pkg/analysis_server/tool/spec/check_all_test.dart
+++ b/pkg/analysis_server/tool/spec/check_all_test.dart
@@ -19,5 +19,5 @@
   int index = components.indexOf('analysis_server');
   String pkgPath = joinAll(components.sublist(0, index + 1));
   await GeneratedContent.checkAll(
-      pkgPath, join('tool', 'spec', 'generate_all.dart'), allTargets);
+      pkgPath, join(pkgPath, 'tool', 'spec', 'generate_all.dart'), allTargets);
 }
diff --git a/pkg/analysis_server/tool/spec/codegen_java.dart b/pkg/analysis_server/tool/spec/codegen_java.dart
index 56bdc8b..6204f68 100644
--- a/pkg/analysis_server/tool/spec/codegen_java.dart
+++ b/pkg/analysis_server/tool/spec/codegen_java.dart
@@ -51,6 +51,7 @@
   static const Map<String, String> _typeRenames = const {
     'bool': 'boolean',
     'int': 'int',
+    'AvailableSuggestionRelevanceTag': 'String',
     'ExecutionContextId': 'String',
     'FilePath': 'String',
     'DebugContextId': 'String',
diff --git a/pkg/analysis_server/tool/spec/codegen_java_types.dart b/pkg/analysis_server/tool/spec/codegen_java_types.dart
index 5a0e443..2cb3562 100644
--- a/pkg/analysis_server/tool/spec/codegen_java_types.dart
+++ b/pkg/analysis_server/tool/spec/codegen_java_types.dart
@@ -533,9 +533,11 @@
   Element element = Element.fromJson(elementObject);
   int offset = outlineObject.get("offset").getAsInt();
   int length = outlineObject.get("length").getAsInt();
+  int codeOffset = outlineObject.get("codeOffset").getAsInt();
+  int codeLength = outlineObject.get("codeLength").getAsInt();
 
   // create outline object
-  Outline outline = new Outline(parent, element, offset, length);
+  Outline outline = new Outline(parent, element, offset, length, codeOffset, codeLength);
 
   // compute children recursively
   List<Outline> childrenList = Lists.newArrayList();
diff --git a/pkg/analysis_server/tool/spec/generated/java/AnalysisServer.java b/pkg/analysis_server/tool/spec/generated/java/AnalysisServer.java
index 895f4f4..7249cad 100644
--- a/pkg/analysis_server/tool/spec/generated/java/AnalysisServer.java
+++ b/pkg/analysis_server/tool/spec/generated/java/AnalysisServer.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
@@ -417,6 +417,16 @@
   public void completion_getSuggestions(String file, int offset, GetSuggestionsConsumer consumer);
 
   /**
+   * {@code completion.listTokenDetails}
+   *
+   * Inspect analysis server's knowledge about all of a file's tokens including their lexeme, type,
+   * and what element kinds would have been appropriate for the token's program location.
+   *
+   * @param file The path to the file from which tokens should be returned.
+   */
+  public void completion_listTokenDetails(String file, ListTokenDetailsConsumer consumer);
+
+  /**
    * {@code completion.registerLibraryPaths}
    *
    * The client can make this request to express interest in certain libraries to receive completion
@@ -614,8 +624,12 @@
    *
    * @param file The file in which the specified elements are to be made accessible.
    * @param elements The elements to be made accessible in the specified file.
+   * @param offset The offset at which the specified elements need to be made accessible. If
+   *         provided, this is used to guard against adding imports for text that would be inserted
+   *         into a comment, string literal, or other location where the imports would not be
+   *         necessary.
    */
-  public void edit_importElements(String file, List<ImportedElements> elements, ImportElementsConsumer consumer);
+  public void edit_importElements(String file, List<ImportedElements> elements, int offset, ImportElementsConsumer consumer);
 
   /**
    * {@code edit.isPostfixCompletionApplicable}
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/AddContentOverlay.java b/pkg/analysis_server/tool/spec/generated/java/types/AddContentOverlay.java
index e3fad08..86a7416 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/AddContentOverlay.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/AddContentOverlay.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/AnalysisError.java b/pkg/analysis_server/tool/spec/generated/java/types/AnalysisError.java
index d4affbc..24a3fdc 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/AnalysisError.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/AnalysisError.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
@@ -69,6 +69,11 @@
   private final String code;
 
   /**
+   * The URL of a page containing documentation associated with this error.
+   */
+  private final String url;
+
+  /**
    * A hint to indicate to interested clients that this error has an associated fix (or fixes). The
    * absence of this field implies there are not known to be fixes. Note that since the operation to
    * calculate whether fixes apply needs to be performant it is possible that complicated tests will
@@ -82,13 +87,14 @@
   /**
    * Constructor for {@link AnalysisError}.
    */
-  public AnalysisError(String severity, String type, Location location, String message, String correction, String code, Boolean hasFix) {
+  public AnalysisError(String severity, String type, Location location, String message, String correction, String code, String url, Boolean hasFix) {
     this.severity = severity;
     this.type = type;
     this.location = location;
     this.message = message;
     this.correction = correction;
     this.code = code;
+    this.url = url;
     this.hasFix = hasFix;
   }
 
@@ -103,6 +109,7 @@
         ObjectUtilities.equals(other.message, message) &&
         ObjectUtilities.equals(other.correction, correction) &&
         ObjectUtilities.equals(other.code, code) &&
+        ObjectUtilities.equals(other.url, url) &&
         ObjectUtilities.equals(other.hasFix, hasFix);
     }
     return false;
@@ -115,8 +122,9 @@
     String message = jsonObject.get("message").getAsString();
     String correction = jsonObject.get("correction") == null ? null : jsonObject.get("correction").getAsString();
     String code = jsonObject.get("code").getAsString();
+    String url = jsonObject.get("url") == null ? null : jsonObject.get("url").getAsString();
     Boolean hasFix = jsonObject.get("hasFix") == null ? null : jsonObject.get("hasFix").getAsBoolean();
-    return new AnalysisError(severity, type, location, message, correction, code, hasFix);
+    return new AnalysisError(severity, type, location, message, correction, code, url, hasFix);
   }
 
   public static List<AnalysisError> fromJsonArray(JsonArray jsonArray) {
@@ -189,6 +197,13 @@
     return type;
   }
 
+  /**
+   * The URL of a page containing documentation associated with this error.
+   */
+  public String getUrl() {
+    return url;
+  }
+
   @Override
   public int hashCode() {
     HashCodeBuilder builder = new HashCodeBuilder();
@@ -198,6 +213,7 @@
     builder.append(message);
     builder.append(correction);
     builder.append(code);
+    builder.append(url);
     builder.append(hasFix);
     return builder.toHashCode();
   }
@@ -212,6 +228,9 @@
       jsonObject.addProperty("correction", correction);
     }
     jsonObject.addProperty("code", code);
+    if (url != null) {
+      jsonObject.addProperty("url", url);
+    }
     if (hasFix != null) {
       jsonObject.addProperty("hasFix", hasFix);
     }
@@ -234,6 +253,8 @@
     builder.append(correction + ", ");
     builder.append("code=");
     builder.append(code + ", ");
+    builder.append("url=");
+    builder.append(url + ", ");
     builder.append("hasFix=");
     builder.append(hasFix);
     builder.append("]");
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/AnalysisErrorFixes.java b/pkg/analysis_server/tool/spec/generated/java/types/AnalysisErrorFixes.java
index 78cc51f..098fc96 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/AnalysisErrorFixes.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/AnalysisErrorFixes.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/AnalysisErrorSeverity.java b/pkg/analysis_server/tool/spec/generated/java/types/AnalysisErrorSeverity.java
index 96166f9..7206867 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/AnalysisErrorSeverity.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/AnalysisErrorSeverity.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/AnalysisErrorType.java b/pkg/analysis_server/tool/spec/generated/java/types/AnalysisErrorType.java
index 3c4d6d9..f17a385 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/AnalysisErrorType.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/AnalysisErrorType.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/AnalysisOptions.java b/pkg/analysis_server/tool/spec/generated/java/types/AnalysisOptions.java
index 8fb0076..0e1e94f 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/AnalysisOptions.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/AnalysisOptions.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/AnalysisService.java b/pkg/analysis_server/tool/spec/generated/java/types/AnalysisService.java
index 3076de6..9e6c9f1 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/AnalysisService.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/AnalysisService.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/AnalysisStatus.java b/pkg/analysis_server/tool/spec/generated/java/types/AnalysisStatus.java
index c1dfdc9..0900624 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/AnalysisStatus.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/AnalysisStatus.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/AvailableSuggestion.java b/pkg/analysis_server/tool/spec/generated/java/types/AvailableSuggestion.java
index a25dd89..488d3c9 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/AvailableSuggestion.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/AvailableSuggestion.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
@@ -47,6 +47,20 @@
   private final Element element;
 
   /**
+   * A default String for use in generating argument list source contents on the client side.
+   */
+  private final String defaultArgumentListString;
+
+  /**
+   * Pairs of offsets and lengths describing 'defaultArgumentListString' text ranges suitable for use
+   * by clients to set up linked edits of default argument source contents. For example, given an
+   * argument list string 'x, y', the corresponding text range [0, 1, 3, 1], indicates two text
+   * ranges of length 1, starting at offsets 0 and 3. Clients can use these ranges to treat the 'x'
+   * and 'y' values specially for linked edits.
+   */
+  private final int[] defaultArgumentListTextRanges;
+
+  /**
    * The Dartdoc associated with the element being suggested. This field is omitted if there is no
    * Dartdoc associated with the element.
    */
@@ -75,16 +89,18 @@
    * This field is set if the relevance of this suggestion might be changed depending on where
    * completion is requested.
    */
-  private final List<AvailableSuggestionRelevanceTag> relevanceTags;
+  private final List<String> relevanceTags;
 
   private final Integer requiredParameterCount;
 
   /**
    * Constructor for {@link AvailableSuggestion}.
    */
-  public AvailableSuggestion(String label, Element element, String docComplete, String docSummary, List<String> parameterNames, List<String> parameterTypes, List<AvailableSuggestionRelevanceTag> relevanceTags, Integer requiredParameterCount) {
+  public AvailableSuggestion(String label, Element element, String defaultArgumentListString, int[] defaultArgumentListTextRanges, String docComplete, String docSummary, List<String> parameterNames, List<String> parameterTypes, List<String> relevanceTags, Integer requiredParameterCount) {
     this.label = label;
     this.element = element;
+    this.defaultArgumentListString = defaultArgumentListString;
+    this.defaultArgumentListTextRanges = defaultArgumentListTextRanges;
     this.docComplete = docComplete;
     this.docSummary = docSummary;
     this.parameterNames = parameterNames;
@@ -100,6 +116,8 @@
       return
         ObjectUtilities.equals(other.label, label) &&
         ObjectUtilities.equals(other.element, element) &&
+        ObjectUtilities.equals(other.defaultArgumentListString, defaultArgumentListString) &&
+        Arrays.equals(other.defaultArgumentListTextRanges, defaultArgumentListTextRanges) &&
         ObjectUtilities.equals(other.docComplete, docComplete) &&
         ObjectUtilities.equals(other.docSummary, docSummary) &&
         ObjectUtilities.equals(other.parameterNames, parameterNames) &&
@@ -113,13 +131,15 @@
   public static AvailableSuggestion fromJson(JsonObject jsonObject) {
     String label = jsonObject.get("label").getAsString();
     Element element = Element.fromJson(jsonObject.get("element").getAsJsonObject());
+    String defaultArgumentListString = jsonObject.get("defaultArgumentListString") == null ? null : jsonObject.get("defaultArgumentListString").getAsString();
+    int[] defaultArgumentListTextRanges = jsonObject.get("defaultArgumentListTextRanges") == null ? null : JsonUtilities.decodeIntArray(jsonObject.get("defaultArgumentListTextRanges").getAsJsonArray());
     String docComplete = jsonObject.get("docComplete") == null ? null : jsonObject.get("docComplete").getAsString();
     String docSummary = jsonObject.get("docSummary") == null ? null : jsonObject.get("docSummary").getAsString();
     List<String> parameterNames = jsonObject.get("parameterNames") == null ? null : JsonUtilities.decodeStringList(jsonObject.get("parameterNames").getAsJsonArray());
     List<String> parameterTypes = jsonObject.get("parameterTypes") == null ? null : JsonUtilities.decodeStringList(jsonObject.get("parameterTypes").getAsJsonArray());
-    List<AvailableSuggestionRelevanceTag> relevanceTags = jsonObject.get("relevanceTags") == null ? null : AvailableSuggestionRelevanceTag.fromJsonArray(jsonObject.get("relevanceTags").getAsJsonArray());
+    List<String> relevanceTags = jsonObject.get("relevanceTags") == null ? null : JsonUtilities.decodeStringList(jsonObject.get("relevanceTags").getAsJsonArray());
     Integer requiredParameterCount = jsonObject.get("requiredParameterCount") == null ? null : jsonObject.get("requiredParameterCount").getAsInt();
-    return new AvailableSuggestion(label, element, docComplete, docSummary, parameterNames, parameterTypes, relevanceTags, requiredParameterCount);
+    return new AvailableSuggestion(label, element, defaultArgumentListString, defaultArgumentListTextRanges, docComplete, docSummary, parameterNames, parameterTypes, relevanceTags, requiredParameterCount);
   }
 
   public static List<AvailableSuggestion> fromJsonArray(JsonArray jsonArray) {
@@ -135,6 +155,24 @@
   }
 
   /**
+   * A default String for use in generating argument list source contents on the client side.
+   */
+  public String getDefaultArgumentListString() {
+    return defaultArgumentListString;
+  }
+
+  /**
+   * Pairs of offsets and lengths describing 'defaultArgumentListString' text ranges suitable for use
+   * by clients to set up linked edits of default argument source contents. For example, given an
+   * argument list string 'x, y', the corresponding text range [0, 1, 3, 1], indicates two text
+   * ranges of length 1, starting at offsets 0 and 3. Clients can use these ranges to treat the 'x'
+   * and 'y' values specially for linked edits.
+   */
+  public int[] getDefaultArgumentListTextRanges() {
+    return defaultArgumentListTextRanges;
+  }
+
+  /**
    * The Dartdoc associated with the element being suggested. This field is omitted if there is no
    * Dartdoc associated with the element.
    */
@@ -185,7 +223,7 @@
    * This field is set if the relevance of this suggestion might be changed depending on where
    * completion is requested.
    */
-  public List<AvailableSuggestionRelevanceTag> getRelevanceTags() {
+  public List<String> getRelevanceTags() {
     return relevanceTags;
   }
 
@@ -198,6 +236,8 @@
     HashCodeBuilder builder = new HashCodeBuilder();
     builder.append(label);
     builder.append(element);
+    builder.append(defaultArgumentListString);
+    builder.append(defaultArgumentListTextRanges);
     builder.append(docComplete);
     builder.append(docSummary);
     builder.append(parameterNames);
@@ -211,6 +251,16 @@
     JsonObject jsonObject = new JsonObject();
     jsonObject.addProperty("label", label);
     jsonObject.add("element", element.toJson());
+    if (defaultArgumentListString != null) {
+      jsonObject.addProperty("defaultArgumentListString", defaultArgumentListString);
+    }
+    if (defaultArgumentListTextRanges != null) {
+      JsonArray jsonArrayDefaultArgumentListTextRanges = new JsonArray();
+      for (int elt : defaultArgumentListTextRanges) {
+        jsonArrayDefaultArgumentListTextRanges.add(new JsonPrimitive(elt));
+      }
+      jsonObject.add("defaultArgumentListTextRanges", jsonArrayDefaultArgumentListTextRanges);
+    }
     if (docComplete != null) {
       jsonObject.addProperty("docComplete", docComplete);
     }
@@ -233,8 +283,8 @@
     }
     if (relevanceTags != null) {
       JsonArray jsonArrayRelevanceTags = new JsonArray();
-      for (AvailableSuggestionRelevanceTag elt : relevanceTags) {
-        jsonArrayRelevanceTags.add(elt.toJson());
+      for (String elt : relevanceTags) {
+        jsonArrayRelevanceTags.add(new JsonPrimitive(elt));
       }
       jsonObject.add("relevanceTags", jsonArrayRelevanceTags);
     }
@@ -252,6 +302,10 @@
     builder.append(label + ", ");
     builder.append("element=");
     builder.append(element + ", ");
+    builder.append("defaultArgumentListString=");
+    builder.append(defaultArgumentListString + ", ");
+    builder.append("defaultArgumentListTextRanges=");
+    builder.append(StringUtils.join(defaultArgumentListTextRanges, ", ") + ", ");
     builder.append("docComplete=");
     builder.append(docComplete + ", ");
     builder.append("docSummary=");
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/AvailableSuggestionSet.java b/pkg/analysis_server/tool/spec/generated/java/types/AvailableSuggestionSet.java
index 570ef61..26586dc 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/AvailableSuggestionSet.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/AvailableSuggestionSet.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/ChangeContentOverlay.java b/pkg/analysis_server/tool/spec/generated/java/types/ChangeContentOverlay.java
index 86784d9..c1fb108 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/ChangeContentOverlay.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/ChangeContentOverlay.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/ClosingLabel.java b/pkg/analysis_server/tool/spec/generated/java/types/ClosingLabel.java
index 75506c0..ee4c125 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/ClosingLabel.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/ClosingLabel.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/CompletionService.java b/pkg/analysis_server/tool/spec/generated/java/types/CompletionService.java
index d7a0d19..5007ebd 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/CompletionService.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/CompletionService.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/CompletionSuggestion.java b/pkg/analysis_server/tool/spec/generated/java/types/CompletionSuggestion.java
index 83f2643..28e0a81 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/CompletionSuggestion.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/CompletionSuggestion.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
@@ -60,12 +60,6 @@
   private final String displayText;
 
   /**
-   * The URI of the element corresponding to this suggestion. It will be set whenever analysis server
-   * is able to compute it.
-   */
-  private final String elementUri;
-
-  /**
    * The offset, relative to the beginning of the completion, of where the selection should be placed
    * after insertion.
    */
@@ -167,20 +161,13 @@
   private final String parameterType;
 
   /**
-   * The import to be added if the suggestion is out of scope and needs an import to be added to be
-   * in scope.
-   */
-  private final String importUri;
-
-  /**
    * Constructor for {@link CompletionSuggestion}.
    */
-  public CompletionSuggestion(String kind, int relevance, String completion, String displayText, String elementUri, int selectionOffset, int selectionLength, boolean isDeprecated, boolean isPotential, String docSummary, String docComplete, String declaringType, String defaultArgumentListString, int[] defaultArgumentListTextRanges, Element element, String returnType, List<String> parameterNames, List<String> parameterTypes, Integer requiredParameterCount, Boolean hasNamedParameters, String parameterName, String parameterType, String importUri) {
+  public CompletionSuggestion(String kind, int relevance, String completion, String displayText, int selectionOffset, int selectionLength, boolean isDeprecated, boolean isPotential, String docSummary, String docComplete, String declaringType, String defaultArgumentListString, int[] defaultArgumentListTextRanges, Element element, String returnType, List<String> parameterNames, List<String> parameterTypes, Integer requiredParameterCount, Boolean hasNamedParameters, String parameterName, String parameterType) {
     this.kind = kind;
     this.relevance = relevance;
     this.completion = completion;
     this.displayText = displayText;
-    this.elementUri = elementUri;
     this.selectionOffset = selectionOffset;
     this.selectionLength = selectionLength;
     this.isDeprecated = isDeprecated;
@@ -198,7 +185,6 @@
     this.hasNamedParameters = hasNamedParameters;
     this.parameterName = parameterName;
     this.parameterType = parameterType;
-    this.importUri = importUri;
   }
 
   @Override
@@ -210,7 +196,6 @@
         other.relevance == relevance &&
         ObjectUtilities.equals(other.completion, completion) &&
         ObjectUtilities.equals(other.displayText, displayText) &&
-        ObjectUtilities.equals(other.elementUri, elementUri) &&
         other.selectionOffset == selectionOffset &&
         other.selectionLength == selectionLength &&
         other.isDeprecated == isDeprecated &&
@@ -227,8 +212,7 @@
         ObjectUtilities.equals(other.requiredParameterCount, requiredParameterCount) &&
         ObjectUtilities.equals(other.hasNamedParameters, hasNamedParameters) &&
         ObjectUtilities.equals(other.parameterName, parameterName) &&
-        ObjectUtilities.equals(other.parameterType, parameterType) &&
-        ObjectUtilities.equals(other.importUri, importUri);
+        ObjectUtilities.equals(other.parameterType, parameterType);
     }
     return false;
   }
@@ -238,7 +222,6 @@
     int relevance = jsonObject.get("relevance").getAsInt();
     String completion = jsonObject.get("completion").getAsString();
     String displayText = jsonObject.get("displayText") == null ? null : jsonObject.get("displayText").getAsString();
-    String elementUri = jsonObject.get("elementUri") == null ? null : jsonObject.get("elementUri").getAsString();
     int selectionOffset = jsonObject.get("selectionOffset").getAsInt();
     int selectionLength = jsonObject.get("selectionLength").getAsInt();
     boolean isDeprecated = jsonObject.get("isDeprecated").getAsBoolean();
@@ -256,8 +239,7 @@
     Boolean hasNamedParameters = jsonObject.get("hasNamedParameters") == null ? null : jsonObject.get("hasNamedParameters").getAsBoolean();
     String parameterName = jsonObject.get("parameterName") == null ? null : jsonObject.get("parameterName").getAsString();
     String parameterType = jsonObject.get("parameterType") == null ? null : jsonObject.get("parameterType").getAsString();
-    String importUri = jsonObject.get("importUri") == null ? null : jsonObject.get("importUri").getAsString();
-    return new CompletionSuggestion(kind, relevance, completion, displayText, elementUri, selectionOffset, selectionLength, isDeprecated, isPotential, docSummary, docComplete, declaringType, defaultArgumentListString, defaultArgumentListTextRanges, element, returnType, parameterNames, parameterTypes, requiredParameterCount, hasNamedParameters, parameterName, parameterType, importUri);
+    return new CompletionSuggestion(kind, relevance, completion, displayText, selectionOffset, selectionLength, isDeprecated, isPotential, docSummary, docComplete, declaringType, defaultArgumentListString, defaultArgumentListTextRanges, element, returnType, parameterNames, parameterTypes, requiredParameterCount, hasNamedParameters, parameterName, parameterType);
   }
 
   public static List<CompletionSuggestion> fromJsonArray(JsonArray jsonArray) {
@@ -339,14 +321,6 @@
   }
 
   /**
-   * The URI of the element corresponding to this suggestion. It will be set whenever analysis server
-   * is able to compute it.
-   */
-  public String getElementUri() {
-    return elementUri;
-  }
-
-  /**
    * True if the function or method being suggested has at least one named parameter. This field is
    * omitted if the parameterNames field is omitted.
    */
@@ -355,14 +329,6 @@
   }
 
   /**
-   * The import to be added if the suggestion is out of scope and needs an import to be added to be
-   * in scope.
-   */
-  public String getImportUri() {
-    return importUri;
-  }
-
-  /**
    * True if the suggested element is deprecated.
    */
   public boolean isDeprecated() {
@@ -461,7 +427,6 @@
     builder.append(relevance);
     builder.append(completion);
     builder.append(displayText);
-    builder.append(elementUri);
     builder.append(selectionOffset);
     builder.append(selectionLength);
     builder.append(isDeprecated);
@@ -479,7 +444,6 @@
     builder.append(hasNamedParameters);
     builder.append(parameterName);
     builder.append(parameterType);
-    builder.append(importUri);
     return builder.toHashCode();
   }
 
@@ -491,9 +455,6 @@
     if (displayText != null) {
       jsonObject.addProperty("displayText", displayText);
     }
-    if (elementUri != null) {
-      jsonObject.addProperty("elementUri", elementUri);
-    }
     jsonObject.addProperty("selectionOffset", selectionOffset);
     jsonObject.addProperty("selectionLength", selectionLength);
     jsonObject.addProperty("isDeprecated", isDeprecated);
@@ -549,9 +510,6 @@
     if (parameterType != null) {
       jsonObject.addProperty("parameterType", parameterType);
     }
-    if (importUri != null) {
-      jsonObject.addProperty("importUri", importUri);
-    }
     return jsonObject;
   }
 
@@ -567,8 +525,6 @@
     builder.append(completion + ", ");
     builder.append("displayText=");
     builder.append(displayText + ", ");
-    builder.append("elementUri=");
-    builder.append(elementUri + ", ");
     builder.append("selectionOffset=");
     builder.append(selectionOffset + ", ");
     builder.append("selectionLength=");
@@ -602,9 +558,7 @@
     builder.append("parameterName=");
     builder.append(parameterName + ", ");
     builder.append("parameterType=");
-    builder.append(parameterType + ", ");
-    builder.append("importUri=");
-    builder.append(importUri);
+    builder.append(parameterType);
     builder.append("]");
     return builder.toString();
   }
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/CompletionSuggestionKind.java b/pkg/analysis_server/tool/spec/generated/java/types/CompletionSuggestionKind.java
index b94893d..e7595aa 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/CompletionSuggestionKind.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/CompletionSuggestionKind.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/ContextData.java b/pkg/analysis_server/tool/spec/generated/java/types/ContextData.java
index c094e21..6d14ea8 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/ContextData.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/ContextData.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/DartFix.java b/pkg/analysis_server/tool/spec/generated/java/types/DartFix.java
index b441025..0669805 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/DartFix.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/DartFix.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/DartFixSuggestion.java b/pkg/analysis_server/tool/spec/generated/java/types/DartFixSuggestion.java
index 7a106f8..b40cb10 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/DartFixSuggestion.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/DartFixSuggestion.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/Element.java b/pkg/analysis_server/tool/spec/generated/java/types/Element.java
index d1cfc65..80f51fb 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/Element.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/Element.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/ElementDeclaration.java b/pkg/analysis_server/tool/spec/generated/java/types/ElementDeclaration.java
index 47b4534..393fcee 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/ElementDeclaration.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/ElementDeclaration.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/ElementKind.java b/pkg/analysis_server/tool/spec/generated/java/types/ElementKind.java
index 17fe527..2ac5f3e 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/ElementKind.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/ElementKind.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/ExecutableFile.java b/pkg/analysis_server/tool/spec/generated/java/types/ExecutableFile.java
index 00ee0b1..331332e 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/ExecutableFile.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/ExecutableFile.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/ExecutableKind.java b/pkg/analysis_server/tool/spec/generated/java/types/ExecutableKind.java
index 0882e91..7bbc97f 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/ExecutableKind.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/ExecutableKind.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/ExecutionService.java b/pkg/analysis_server/tool/spec/generated/java/types/ExecutionService.java
index 1a6e868..f8770b7 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/ExecutionService.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/ExecutionService.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/ExtractLocalVariableFeedback.java b/pkg/analysis_server/tool/spec/generated/java/types/ExtractLocalVariableFeedback.java
index 6cd016e..31d12df 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/ExtractLocalVariableFeedback.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/ExtractLocalVariableFeedback.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/ExtractLocalVariableOptions.java b/pkg/analysis_server/tool/spec/generated/java/types/ExtractLocalVariableOptions.java
index f7e951c..1bb7400 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/ExtractLocalVariableOptions.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/ExtractLocalVariableOptions.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/ExtractMethodFeedback.java b/pkg/analysis_server/tool/spec/generated/java/types/ExtractMethodFeedback.java
index 0a0125c..729480d 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/ExtractMethodFeedback.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/ExtractMethodFeedback.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/ExtractMethodOptions.java b/pkg/analysis_server/tool/spec/generated/java/types/ExtractMethodOptions.java
index a6127cfe..399482b 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/ExtractMethodOptions.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/ExtractMethodOptions.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/ExtractWidgetFeedback.java b/pkg/analysis_server/tool/spec/generated/java/types/ExtractWidgetFeedback.java
index 720c686..3a31de0 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/ExtractWidgetFeedback.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/ExtractWidgetFeedback.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/ExtractWidgetOptions.java b/pkg/analysis_server/tool/spec/generated/java/types/ExtractWidgetOptions.java
index d526b78..cb3e520 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/ExtractWidgetOptions.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/ExtractWidgetOptions.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/FileKind.java b/pkg/analysis_server/tool/spec/generated/java/types/FileKind.java
index b282ce8..9fda96d 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/FileKind.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/FileKind.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/FlutterOutline.java b/pkg/analysis_server/tool/spec/generated/java/types/FlutterOutline.java
index 9bc666b..52029e0 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/FlutterOutline.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/FlutterOutline.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/FlutterOutlineAttribute.java b/pkg/analysis_server/tool/spec/generated/java/types/FlutterOutlineAttribute.java
index b18dbe9..b02f3ae 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/FlutterOutlineAttribute.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/FlutterOutlineAttribute.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/FlutterOutlineKind.java b/pkg/analysis_server/tool/spec/generated/java/types/FlutterOutlineKind.java
index b083a9d..271fd31 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/FlutterOutlineKind.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/FlutterOutlineKind.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/FlutterService.java b/pkg/analysis_server/tool/spec/generated/java/types/FlutterService.java
index cc71a7c..607780d 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/FlutterService.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/FlutterService.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/FoldingKind.java b/pkg/analysis_server/tool/spec/generated/java/types/FoldingKind.java
index d30381c..8ae6957 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/FoldingKind.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/FoldingKind.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/FoldingRegion.java b/pkg/analysis_server/tool/spec/generated/java/types/FoldingRegion.java
index 8cce15c..3f6f408 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/FoldingRegion.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/FoldingRegion.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/GeneralAnalysisService.java b/pkg/analysis_server/tool/spec/generated/java/types/GeneralAnalysisService.java
index d3ac75e..075184b 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/GeneralAnalysisService.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/GeneralAnalysisService.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/HighlightRegion.java b/pkg/analysis_server/tool/spec/generated/java/types/HighlightRegion.java
index 8ea3562..fdb868d 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/HighlightRegion.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/HighlightRegion.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/HighlightRegionType.java b/pkg/analysis_server/tool/spec/generated/java/types/HighlightRegionType.java
index 4ae12e2..21d7fbc 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/HighlightRegionType.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/HighlightRegionType.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/HoverInformation.java b/pkg/analysis_server/tool/spec/generated/java/types/HoverInformation.java
index a860fd2..463b420 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/HoverInformation.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/HoverInformation.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/ImplementedClass.java b/pkg/analysis_server/tool/spec/generated/java/types/ImplementedClass.java
index 54505e1..e81d14a 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/ImplementedClass.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/ImplementedClass.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/ImplementedMember.java b/pkg/analysis_server/tool/spec/generated/java/types/ImplementedMember.java
index 64fab48..200ec62 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/ImplementedMember.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/ImplementedMember.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/ImportedElements.java b/pkg/analysis_server/tool/spec/generated/java/types/ImportedElements.java
index afa9e17..cf7f31f 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/ImportedElements.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/ImportedElements.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/IncludedSuggestionRelevanceTag.java b/pkg/analysis_server/tool/spec/generated/java/types/IncludedSuggestionRelevanceTag.java
index d079df2..05e9574 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/IncludedSuggestionRelevanceTag.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/IncludedSuggestionRelevanceTag.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
@@ -40,7 +40,7 @@
   /**
    * The opaque value of the tag.
    */
-  private final AvailableSuggestionRelevanceTag tag;
+  private final String tag;
 
   /**
    * The boost to the relevance of the completion suggestions that match this tag, which is added to
@@ -51,7 +51,7 @@
   /**
    * Constructor for {@link IncludedSuggestionRelevanceTag}.
    */
-  public IncludedSuggestionRelevanceTag(AvailableSuggestionRelevanceTag tag, int relevanceBoost) {
+  public IncludedSuggestionRelevanceTag(String tag, int relevanceBoost) {
     this.tag = tag;
     this.relevanceBoost = relevanceBoost;
   }
@@ -68,7 +68,7 @@
   }
 
   public static IncludedSuggestionRelevanceTag fromJson(JsonObject jsonObject) {
-    AvailableSuggestionRelevanceTag tag = AvailableSuggestionRelevanceTag.fromJson(jsonObject.get("tag").getAsJsonObject());
+    String tag = jsonObject.get("tag").getAsString();
     int relevanceBoost = jsonObject.get("relevanceBoost").getAsInt();
     return new IncludedSuggestionRelevanceTag(tag, relevanceBoost);
   }
@@ -96,7 +96,7 @@
   /**
    * The opaque value of the tag.
    */
-  public AvailableSuggestionRelevanceTag getTag() {
+  public String getTag() {
     return tag;
   }
 
@@ -110,7 +110,7 @@
 
   public JsonObject toJson() {
     JsonObject jsonObject = new JsonObject();
-    jsonObject.add("tag", tag.toJson());
+    jsonObject.addProperty("tag", tag);
     jsonObject.addProperty("relevanceBoost", relevanceBoost);
     return jsonObject;
   }
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/IncludedSuggestionSet.java b/pkg/analysis_server/tool/spec/generated/java/types/IncludedSuggestionSet.java
index 344ac5b..c9e0af9 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/IncludedSuggestionSet.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/IncludedSuggestionSet.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
@@ -48,11 +48,22 @@
   private final int relevance;
 
   /**
+   * The optional string that should be displayed instead of the uri of the referenced
+   * AvailableSuggestionSet.
+   *
+   * For example libraries in the "test" directory of a package have only "file://" URIs, so are
+   * usually long, and don't look nice, but actual import directives will use relative URIs, which
+   * are short, so we probably want to display such relative URIs to the user.
+   */
+  private final String displayUri;
+
+  /**
    * Constructor for {@link IncludedSuggestionSet}.
    */
-  public IncludedSuggestionSet(int id, int relevance) {
+  public IncludedSuggestionSet(int id, int relevance, String displayUri) {
     this.id = id;
     this.relevance = relevance;
+    this.displayUri = displayUri;
   }
 
   @Override
@@ -61,7 +72,8 @@
       IncludedSuggestionSet other = (IncludedSuggestionSet) obj;
       return
         other.id == id &&
-        other.relevance == relevance;
+        other.relevance == relevance &&
+        ObjectUtilities.equals(other.displayUri, displayUri);
     }
     return false;
   }
@@ -69,7 +81,8 @@
   public static IncludedSuggestionSet fromJson(JsonObject jsonObject) {
     int id = jsonObject.get("id").getAsInt();
     int relevance = jsonObject.get("relevance").getAsInt();
-    return new IncludedSuggestionSet(id, relevance);
+    String displayUri = jsonObject.get("displayUri") == null ? null : jsonObject.get("displayUri").getAsString();
+    return new IncludedSuggestionSet(id, relevance, displayUri);
   }
 
   public static List<IncludedSuggestionSet> fromJsonArray(JsonArray jsonArray) {
@@ -85,6 +98,18 @@
   }
 
   /**
+   * The optional string that should be displayed instead of the uri of the referenced
+   * AvailableSuggestionSet.
+   *
+   * For example libraries in the "test" directory of a package have only "file://" URIs, so are
+   * usually long, and don't look nice, but actual import directives will use relative URIs, which
+   * are short, so we probably want to display such relative URIs to the user.
+   */
+  public String getDisplayUri() {
+    return displayUri;
+  }
+
+  /**
    * Clients should use it to access the set of precomputed completions to be displayed to the user.
    */
   public int getId() {
@@ -104,6 +129,7 @@
     HashCodeBuilder builder = new HashCodeBuilder();
     builder.append(id);
     builder.append(relevance);
+    builder.append(displayUri);
     return builder.toHashCode();
   }
 
@@ -111,6 +137,9 @@
     JsonObject jsonObject = new JsonObject();
     jsonObject.addProperty("id", id);
     jsonObject.addProperty("relevance", relevance);
+    if (displayUri != null) {
+      jsonObject.addProperty("displayUri", displayUri);
+    }
     return jsonObject;
   }
 
@@ -121,7 +150,9 @@
     builder.append("id=");
     builder.append(id + ", ");
     builder.append("relevance=");
-    builder.append(relevance);
+    builder.append(relevance + ", ");
+    builder.append("displayUri=");
+    builder.append(displayUri);
     builder.append("]");
     return builder.toString();
   }
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/InlineLocalVariableFeedback.java b/pkg/analysis_server/tool/spec/generated/java/types/InlineLocalVariableFeedback.java
index 13f871c..30930b3 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/InlineLocalVariableFeedback.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/InlineLocalVariableFeedback.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/InlineMethodFeedback.java b/pkg/analysis_server/tool/spec/generated/java/types/InlineMethodFeedback.java
index c9cd093..725d973 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/InlineMethodFeedback.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/InlineMethodFeedback.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/InlineMethodOptions.java b/pkg/analysis_server/tool/spec/generated/java/types/InlineMethodOptions.java
index 8f1619d..a647368 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/InlineMethodOptions.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/InlineMethodOptions.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/KytheEntry.java b/pkg/analysis_server/tool/spec/generated/java/types/KytheEntry.java
index 76f9a30..9efb62a 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/KytheEntry.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/KytheEntry.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/KytheVName.java b/pkg/analysis_server/tool/spec/generated/java/types/KytheVName.java
index d9e6e62..eeda647 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/KytheVName.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/KytheVName.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/LibraryPathSet.java b/pkg/analysis_server/tool/spec/generated/java/types/LibraryPathSet.java
index de46030..1e3c7dd 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/LibraryPathSet.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/LibraryPathSet.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/LinkedEditGroup.java b/pkg/analysis_server/tool/spec/generated/java/types/LinkedEditGroup.java
index dacc0e1..c315c1c 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/LinkedEditGroup.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/LinkedEditGroup.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/LinkedEditSuggestion.java b/pkg/analysis_server/tool/spec/generated/java/types/LinkedEditSuggestion.java
index fe31f3a..2afb4f5 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/LinkedEditSuggestion.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/LinkedEditSuggestion.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/LinkedEditSuggestionKind.java b/pkg/analysis_server/tool/spec/generated/java/types/LinkedEditSuggestionKind.java
index 791789a..120d83c 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/LinkedEditSuggestionKind.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/LinkedEditSuggestionKind.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/Location.java b/pkg/analysis_server/tool/spec/generated/java/types/Location.java
index dce3fb7..2daf9de 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/Location.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/Location.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/MoveFileOptions.java b/pkg/analysis_server/tool/spec/generated/java/types/MoveFileOptions.java
index 29c172a..f605b97 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/MoveFileOptions.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/MoveFileOptions.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/NavigationRegion.java b/pkg/analysis_server/tool/spec/generated/java/types/NavigationRegion.java
index 6b4a202..00fc4ca 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/NavigationRegion.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/NavigationRegion.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/NavigationTarget.java b/pkg/analysis_server/tool/spec/generated/java/types/NavigationTarget.java
index d2a8fb8..a52c112 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/NavigationTarget.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/NavigationTarget.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/Occurrences.java b/pkg/analysis_server/tool/spec/generated/java/types/Occurrences.java
index e971c4c..9d2ce11 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/Occurrences.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/Occurrences.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/Outline.java b/pkg/analysis_server/tool/spec/generated/java/types/Outline.java
index 658a494..3d2c5be 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/Outline.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/Outline.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
@@ -103,9 +103,11 @@
     Element element = Element.fromJson(elementObject);
     int offset = outlineObject.get("offset").getAsInt();
     int length = outlineObject.get("length").getAsInt();
+    int codeOffset = outlineObject.get("codeOffset").getAsInt();
+    int codeLength = outlineObject.get("codeLength").getAsInt();
 
     // create outline object
-    Outline outline = new Outline(parent, element, offset, length);
+    Outline outline = new Outline(parent, element, offset, length, codeOffset, codeLength);
 
     // compute children recursively
     List<Outline> childrenList = Lists.newArrayList();
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/OverriddenMember.java b/pkg/analysis_server/tool/spec/generated/java/types/OverriddenMember.java
index 052a3e6..fd07ef6 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/OverriddenMember.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/OverriddenMember.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/OverrideMember.java b/pkg/analysis_server/tool/spec/generated/java/types/OverrideMember.java
index ca395c6..a60e46c 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/OverrideMember.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/OverrideMember.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/ParameterInfo.java b/pkg/analysis_server/tool/spec/generated/java/types/ParameterInfo.java
index 7855e12..38131d3 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/ParameterInfo.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/ParameterInfo.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/ParameterKind.java b/pkg/analysis_server/tool/spec/generated/java/types/ParameterKind.java
index 4073993..43f3e4d 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/ParameterKind.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/ParameterKind.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/Position.java b/pkg/analysis_server/tool/spec/generated/java/types/Position.java
index 349ec6a..7b17db3 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/Position.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/Position.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/PostfixTemplateDescriptor.java b/pkg/analysis_server/tool/spec/generated/java/types/PostfixTemplateDescriptor.java
index 7b85f64..f1099a7 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/PostfixTemplateDescriptor.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/PostfixTemplateDescriptor.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/PubStatus.java b/pkg/analysis_server/tool/spec/generated/java/types/PubStatus.java
index 0d28027..77c6b5f 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/PubStatus.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/PubStatus.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/RefactoringFeedback.java b/pkg/analysis_server/tool/spec/generated/java/types/RefactoringFeedback.java
index 13d2bbd..ea68aaf 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/RefactoringFeedback.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/RefactoringFeedback.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/RefactoringKind.java b/pkg/analysis_server/tool/spec/generated/java/types/RefactoringKind.java
index c2d9a9c..228c0ea 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/RefactoringKind.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/RefactoringKind.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/RefactoringMethodParameter.java b/pkg/analysis_server/tool/spec/generated/java/types/RefactoringMethodParameter.java
index e69bccf..362044f 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/RefactoringMethodParameter.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/RefactoringMethodParameter.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/RefactoringMethodParameterKind.java b/pkg/analysis_server/tool/spec/generated/java/types/RefactoringMethodParameterKind.java
index d7025cf..03c56d5 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/RefactoringMethodParameterKind.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/RefactoringMethodParameterKind.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/RefactoringOptions.java b/pkg/analysis_server/tool/spec/generated/java/types/RefactoringOptions.java
index 1a352f7..64c7028 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/RefactoringOptions.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/RefactoringOptions.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/RefactoringProblem.java b/pkg/analysis_server/tool/spec/generated/java/types/RefactoringProblem.java
index f0ee4b1..4caaf12 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/RefactoringProblem.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/RefactoringProblem.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/RefactoringProblemSeverity.java b/pkg/analysis_server/tool/spec/generated/java/types/RefactoringProblemSeverity.java
index 684f09f..569d3ff 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/RefactoringProblemSeverity.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/RefactoringProblemSeverity.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/RemoveContentOverlay.java b/pkg/analysis_server/tool/spec/generated/java/types/RemoveContentOverlay.java
index 8b53cbd..4adc36c 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/RemoveContentOverlay.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/RemoveContentOverlay.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/RenameFeedback.java b/pkg/analysis_server/tool/spec/generated/java/types/RenameFeedback.java
index 72b58a1..eac650a1 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/RenameFeedback.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/RenameFeedback.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/RenameOptions.java b/pkg/analysis_server/tool/spec/generated/java/types/RenameOptions.java
index a9a63a5..2fa6367 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/RenameOptions.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/RenameOptions.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/RequestError.java b/pkg/analysis_server/tool/spec/generated/java/types/RequestError.java
index 6d9eb4d..0cdab8b 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/RequestError.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/RequestError.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/RequestErrorCode.java b/pkg/analysis_server/tool/spec/generated/java/types/RequestErrorCode.java
index dbd738a..aa8e173 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/RequestErrorCode.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/RequestErrorCode.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/RuntimeCompletionExpression.java b/pkg/analysis_server/tool/spec/generated/java/types/RuntimeCompletionExpression.java
index b2d6b70..85a9c41 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/RuntimeCompletionExpression.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/RuntimeCompletionExpression.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/RuntimeCompletionExpressionType.java b/pkg/analysis_server/tool/spec/generated/java/types/RuntimeCompletionExpressionType.java
index 5645384..c080810 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/RuntimeCompletionExpressionType.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/RuntimeCompletionExpressionType.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/RuntimeCompletionExpressionTypeKind.java b/pkg/analysis_server/tool/spec/generated/java/types/RuntimeCompletionExpressionTypeKind.java
index 6f74132..c63089e 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/RuntimeCompletionExpressionTypeKind.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/RuntimeCompletionExpressionTypeKind.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/RuntimeCompletionVariable.java b/pkg/analysis_server/tool/spec/generated/java/types/RuntimeCompletionVariable.java
index 62a0fb5..a54d799 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/RuntimeCompletionVariable.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/RuntimeCompletionVariable.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/SearchResult.java b/pkg/analysis_server/tool/spec/generated/java/types/SearchResult.java
index f741485..f139e07 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/SearchResult.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/SearchResult.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/SearchResultKind.java b/pkg/analysis_server/tool/spec/generated/java/types/SearchResultKind.java
index fe02fb5..d22f7cb 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/SearchResultKind.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/SearchResultKind.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/ServerService.java b/pkg/analysis_server/tool/spec/generated/java/types/ServerService.java
index 7680299..fed7a98 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/ServerService.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/ServerService.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/SourceChange.java b/pkg/analysis_server/tool/spec/generated/java/types/SourceChange.java
index bddcbc9..55b2761 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/SourceChange.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/SourceChange.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/SourceEdit.java b/pkg/analysis_server/tool/spec/generated/java/types/SourceEdit.java
index f5a0f86..41210ff 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/SourceEdit.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/SourceEdit.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/SourceFileEdit.java b/pkg/analysis_server/tool/spec/generated/java/types/SourceFileEdit.java
index fdc0fbf..b2d6996 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/SourceFileEdit.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/SourceFileEdit.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/TokenDetails.java b/pkg/analysis_server/tool/spec/generated/java/types/TokenDetails.java
new file mode 100644
index 0000000..b9cc17e
--- /dev/null
+++ b/pkg/analysis_server/tool/spec/generated/java/types/TokenDetails.java
@@ -0,0 +1,159 @@
+/*
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+ * for details. All rights reserved. Use of this source code is governed by a
+ * BSD-style license that can be found in the LICENSE file.
+ *
+ * This file has been automatically generated. Please do not edit it manually.
+ * To regenerate the file, use the script "pkg/analysis_server/tool/spec/generate_files".
+ */
+package org.dartlang.analysis.server.protocol;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+import com.google.common.collect.Lists;
+import com.google.dart.server.utilities.general.JsonUtilities;
+import com.google.dart.server.utilities.general.ObjectUtilities;
+import com.google.gson.JsonArray;
+import com.google.gson.JsonElement;
+import com.google.gson.JsonObject;
+import com.google.gson.JsonPrimitive;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import java.util.ArrayList;
+import java.util.Iterator;
+import org.apache.commons.lang3.StringUtils;
+
+/**
+ * A scanned token along with its inferred type information.
+ *
+ * @coverage dart.server.generated.types
+ */
+@SuppressWarnings("unused")
+public class TokenDetails {
+
+  public static final TokenDetails[] EMPTY_ARRAY = new TokenDetails[0];
+
+  public static final List<TokenDetails> EMPTY_LIST = Lists.newArrayList();
+
+  /**
+   * The token's lexeme.
+   */
+  private final String lexeme;
+
+  /**
+   * A unique id for the type of the identifier. Omitted if the token is not an identifier in a
+   * reference position.
+   */
+  private final String type;
+
+  /**
+   * An indication of whether this token is in a declaration or reference position. (If no other
+   * purpose is found for this field then it should be renamed and converted to a boolean value.)
+   * Omitted if the token is not an identifier.
+   */
+  private final List<String> validElementKinds;
+
+  /**
+   * Constructor for {@link TokenDetails}.
+   */
+  public TokenDetails(String lexeme, String type, List<String> validElementKinds) {
+    this.lexeme = lexeme;
+    this.type = type;
+    this.validElementKinds = validElementKinds;
+  }
+
+  @Override
+  public boolean equals(Object obj) {
+    if (obj instanceof TokenDetails) {
+      TokenDetails other = (TokenDetails) obj;
+      return
+        ObjectUtilities.equals(other.lexeme, lexeme) &&
+        ObjectUtilities.equals(other.type, type) &&
+        ObjectUtilities.equals(other.validElementKinds, validElementKinds);
+    }
+    return false;
+  }
+
+  public static TokenDetails fromJson(JsonObject jsonObject) {
+    String lexeme = jsonObject.get("lexeme").getAsString();
+    String type = jsonObject.get("type") == null ? null : jsonObject.get("type").getAsString();
+    List<String> validElementKinds = jsonObject.get("validElementKinds") == null ? null : JsonUtilities.decodeStringList(jsonObject.get("validElementKinds").getAsJsonArray());
+    return new TokenDetails(lexeme, type, validElementKinds);
+  }
+
+  public static List<TokenDetails> fromJsonArray(JsonArray jsonArray) {
+    if (jsonArray == null) {
+      return EMPTY_LIST;
+    }
+    ArrayList<TokenDetails> list = new ArrayList<TokenDetails>(jsonArray.size());
+    Iterator<JsonElement> iterator = jsonArray.iterator();
+    while (iterator.hasNext()) {
+      list.add(fromJson(iterator.next().getAsJsonObject()));
+    }
+    return list;
+  }
+
+  /**
+   * The token's lexeme.
+   */
+  public String getLexeme() {
+    return lexeme;
+  }
+
+  /**
+   * A unique id for the type of the identifier. Omitted if the token is not an identifier in a
+   * reference position.
+   */
+  public String getType() {
+    return type;
+  }
+
+  /**
+   * An indication of whether this token is in a declaration or reference position. (If no other
+   * purpose is found for this field then it should be renamed and converted to a boolean value.)
+   * Omitted if the token is not an identifier.
+   */
+  public List<String> getValidElementKinds() {
+    return validElementKinds;
+  }
+
+  @Override
+  public int hashCode() {
+    HashCodeBuilder builder = new HashCodeBuilder();
+    builder.append(lexeme);
+    builder.append(type);
+    builder.append(validElementKinds);
+    return builder.toHashCode();
+  }
+
+  public JsonObject toJson() {
+    JsonObject jsonObject = new JsonObject();
+    jsonObject.addProperty("lexeme", lexeme);
+    if (type != null) {
+      jsonObject.addProperty("type", type);
+    }
+    if (validElementKinds != null) {
+      JsonArray jsonArrayValidElementKinds = new JsonArray();
+      for (String elt : validElementKinds) {
+        jsonArrayValidElementKinds.add(new JsonPrimitive(elt));
+      }
+      jsonObject.add("validElementKinds", jsonArrayValidElementKinds);
+    }
+    return jsonObject;
+  }
+
+  @Override
+  public String toString() {
+    StringBuilder builder = new StringBuilder();
+    builder.append("[");
+    builder.append("lexeme=");
+    builder.append(lexeme + ", ");
+    builder.append("type=");
+    builder.append(type + ", ");
+    builder.append("validElementKinds=");
+    builder.append(StringUtils.join(validElementKinds, ", "));
+    builder.append("]");
+    return builder.toString();
+  }
+
+}
diff --git a/pkg/analysis_server/tool/spec/generated/java/types/TypeHierarchyItem.java b/pkg/analysis_server/tool/spec/generated/java/types/TypeHierarchyItem.java
index 6ae2f59..156ec7d 100644
--- a/pkg/analysis_server/tool/spec/generated/java/types/TypeHierarchyItem.java
+++ b/pkg/analysis_server/tool/spec/generated/java/types/TypeHierarchyItem.java
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
diff --git a/pkg/analysis_server/tool/spec/spec_input.html b/pkg/analysis_server/tool/spec/spec_input.html
index fd11715..56f1243 100644
--- a/pkg/analysis_server/tool/spec/spec_input.html
+++ b/pkg/analysis_server/tool/spec/spec_input.html
@@ -7,7 +7,7 @@
 <body>
 <h1>Analysis Server API Specification</h1>
 <h1 style="color:#999999">Version
-  <version>1.23.0</version>
+  <version>1.26.0</version>
 </h1>
 <p>
   This document contains a specification of the API provided by the
@@ -1412,7 +1412,7 @@
       </field>
     </result>
   </request>
-  <request method="setSubscriptions" experimental="true">
+  <request method="setSubscriptions">
     <p>
       Subscribe for completion services. All previous subscriptions are
       replaced by the given set of services.
@@ -1431,7 +1431,7 @@
       </field>
     </params>
   </request>
-  <request method="registerLibraryPaths" experimental="true">
+  <request method="registerLibraryPaths">
     <p>
       The client can make this request to express interest in certain
       libraries to receive completion suggestions from based on the client path.
@@ -1454,7 +1454,7 @@
       </field>
     </params>
   </request>
-  <request method="getSuggestionDetails" experimental="true">
+  <request method="getSuggestionDetails">
     <p>
       Clients must make this request when the user has selected a completion
       suggestion from an <tt>AvailableSuggestionSet</tt>. Analysis server will respond with
@@ -1508,6 +1508,32 @@
       </field>
     </result>
   </request>
+  <request method="listTokenDetails" experimental="true">
+    <p>
+      Inspect analysis server's knowledge about all of a file's tokens including
+      their lexeme, type, and what element kinds would have been appropriate for
+      the token's program location.
+    </p>
+    <params>
+      <field name="file">
+        <ref>FilePath</ref>
+        <p>
+          The path to the file from which tokens should be returned.
+        </p>
+      </field>
+    </params>
+    <result>
+      <field name="tokens">
+        <list>
+          <ref>TokenDetails</ref>
+        </list>
+        <p>
+          A list of the file's scanned tokens including analysis information
+          about them.
+        </p>
+      </field>
+    </result>
+  </request>
   <notification event="results">
     <p>
       Reports the completion suggestions that should be presented
@@ -1567,22 +1593,16 @@
           <ref>IncludedSuggestionSet</ref>
         </list>
         <p>
-          This field is experimental.
-        </p>
-        <p>
           References to <tt>AvailableSuggestionSet</tt> objects previously sent
           to the client. The client can include applicable names from the
           referenced library in code completion suggestions.
         </p>
       </field>
-      <field name="includedSuggestionKinds" optional="true">
+      <field name="includedElementKinds" optional="true">
         <list>
           <ref>ElementKind</ref>
         </list>
         <p>
-          This field is experimental.
-        </p>
-        <p>
           The client is expected to check this list against the
           <tt>ElementKind</tt> sent in <tt>IncludedSuggestionSet</tt> to decide
           whether or not these symbols should should be presented to the user.
@@ -1593,9 +1613,6 @@
           <ref>IncludedSuggestionRelevanceTag</ref>
         </list>
         <p>
-          This field is experimental.
-        </p>
-        <p>
           The client is expected to check this list against the values of the
           field <tt>relevanceTags</tt> of <tt>AvailableSuggestion</tt> to
           decide if the suggestion should be given a different relevance than
@@ -1611,7 +1628,7 @@
       </field>
     </params>
   </notification>
-  <notification event="availableSuggestions" experimental="true">
+  <notification event="availableSuggestions">
     <p>
       Reports the pre-computed, candidate completions from symbols defined
       in a corresponding library. This notification may be sent multiple times.
@@ -2517,15 +2534,26 @@
           The elements to be made accessible in the specified file.
         </p>
       </field>
+      <field name="offset" optional="true">
+        <ref>int</ref>
+        <p>
+          The offset at which the specified elements need to be made accessible.
+          If provided, this is used to guard against adding imports for text
+          that would be inserted into a comment, string literal, or other
+          location where the imports would not be necessary.
+        </p>
+      </field>
     </params>
     <result>
       <field name="edit" optional="true">
         <ref>SourceFileEdit</ref>
         <p>
-          The edits to be applied in order to make the specified elements accessible. The file to be edited will be the
-          defining compilation unit of the library containing the file specified in the request, which can be different
-          than the file specified in the request if the specified file is a part file. This field will be omitted if
-          there are no edits that need to be applied.
+          The edits to be applied in order to make the specified elements
+          accessible. The file to be edited will be the defining compilation
+          unit of the library containing the file specified in the request,
+          which can be different than the file specified in the request if the
+          specified file is a part file. This field will be omitted if there are
+          no edits that need to be applied.
         </p>
       </field>
     </result>
@@ -3525,7 +3553,7 @@
       The identifier for a execution context.
     </p>
   </type>
-  <type name="AvailableSuggestion" experimental="true">
+  <type name="AvailableSuggestion">
     <p>
       A partial completion suggestion that can be used in combination with
       info from <tt>completion.results</tt> to build completion suggestions
@@ -3544,6 +3572,27 @@
           Information about the element reference being suggested.
         </p>
       </field>
+      <field name="defaultArgumentListString" optional="true">
+        <ref>String</ref>
+        <p>
+          A default String for use in generating argument list source contents
+          on the client side.
+        </p>
+      </field>
+      <field name="defaultArgumentListTextRanges" optional="true">
+        <list>
+          <ref>int</ref>
+        </list>
+        <p>
+          Pairs of offsets and lengths describing 'defaultArgumentListString'
+          text ranges suitable for use by clients to set up linked edits of
+          default argument source contents. For example, given an argument list
+          string 'x, y', the corresponding text range [0, 1, 3, 1], indicates
+          two text ranges of length 1, starting at offsets 0 and 3. Clients can
+          use these ranges to treat the 'x' and 'y' values specially for linked
+          edits.
+        </p>
+      </field>
       <field name="docComplete" optional="true">
         <ref>String</ref>
         <p>
@@ -3599,7 +3648,7 @@
       The opaque tag value.
     </p>
   </type>
-  <type name="AvailableSuggestionSet" experimental="true">
+  <type name="AvailableSuggestionSet">
     <object>
       <field name="id">
         <ref>int</ref>
@@ -3620,7 +3669,7 @@
       </field>
     </object>
   </type>
-  <type name="IncludedSuggestionSet" experimental="true">
+  <type name="IncludedSuggestionSet">
     <p>
       A reference to an <tt>AvailableSuggestionSet</tt> noting
       that the library's members which match the kind of this ref
@@ -3641,9 +3690,22 @@
           library where a higher number indicates a higher relevance.
         </p>
       </field>
+      <field name="displayUri" optional="true">
+        <ref>String</ref>
+        <p>
+          The optional string that should be displayed instead of the
+          <tt>uri</tt> of the referenced <tt>AvailableSuggestionSet</tt>.
+        </p>
+        <p>
+          For example libraries in the "test" directory of a package have only
+          "file://" URIs, so are usually long, and don't look nice, but actual
+          import directives will use relative URIs, which are short, so we
+          probably want to display such relative URIs to the user.
+        </p>
+      </field>
     </object>
   </type>
-  <type name="IncludedSuggestionRelevanceTag" experimental="true">
+  <type name="IncludedSuggestionRelevanceTag">
     <p>
       Each <tt>AvailableSuggestion</tt> can specify zero or more tags in the
       field <tt>relevanceTags</tt>, so that when the included tag is equal to
@@ -3667,7 +3729,7 @@
       </field>
     </object>
   </type>
-  <type name="CompletionService" experimental="true">
+  <type name="CompletionService">
     <p>
       An enumeration of the completion services to which a client can subscribe.
     </p>
@@ -3683,7 +3745,7 @@
       </value>
     </enum>
   </type>
-  <type name="LibraryPathSet" experimental="true">
+  <type name="LibraryPathSet">
     <p>
       A list of associations between paths and the libraries that should be
       included for code completion when editing a file beneath that path.
@@ -3833,6 +3895,37 @@
       <value><code>INTERFACE</code></value>
     </enum>
   </type>
+  <type name="TokenDetails" experimental="true">
+    <p>
+      A scanned token along with its inferred type information.
+    </p>
+    <object>
+      <field name="lexeme">
+        <ref>String</ref>
+        <p>
+          The token's lexeme.
+        </p>
+      </field>
+      <field name="type" optional="true">
+        <ref>String</ref>
+        <p>
+          A unique id for the type of the identifier.
+          Omitted if the token is not an identifier in a reference position.
+        </p>
+      </field>
+      <field name="validElementKinds" optional="true">
+        <list>
+          <ref>String</ref>
+        </list>
+        <p>
+          An indication of whether this token is in a declaration or reference
+          position. (If no other purpose is found for this field then it should
+          be renamed and converted to a boolean value.)
+          Omitted if the token is not an identifier.
+        </p>
+      </field>
+    </object>
+  </type>
   <type name="ExecutionService">
     <p>
       An enumeration of the services provided by the execution
diff --git a/pkg/analysis_server_client/lib/src/protocol/protocol_constants.dart b/pkg/analysis_server_client/lib/src/protocol/protocol_constants.dart
index d599adc..35174b9 100644
--- a/pkg/analysis_server_client/lib/src/protocol/protocol_constants.dart
+++ b/pkg/analysis_server_client/lib/src/protocol/protocol_constants.dart
@@ -6,7 +6,7 @@
 // To regenerate the file, use the script
 // "pkg/analysis_server/tool/spec/generate_files".
 
-const String PROTOCOL_VERSION = '1.23.0';
+const String PROTOCOL_VERSION = '1.26.0';
 
 const String ANALYSIS_NOTIFICATION_ANALYZED_FILES = 'analysis.analyzedFiles';
 const String ANALYSIS_NOTIFICATION_ANALYZED_FILES_DIRECTORIES = 'directories';
@@ -118,8 +118,8 @@
     'removedLibraries';
 const String COMPLETION_NOTIFICATION_RESULTS = 'completion.results';
 const String COMPLETION_NOTIFICATION_RESULTS_ID = 'id';
-const String COMPLETION_NOTIFICATION_RESULTS_INCLUDED_SUGGESTION_KINDS =
-    'includedSuggestionKinds';
+const String COMPLETION_NOTIFICATION_RESULTS_INCLUDED_ELEMENT_KINDS =
+    'includedElementKinds';
 const String
     COMPLETION_NOTIFICATION_RESULTS_INCLUDED_SUGGESTION_RELEVANCE_TAGS =
     'includedSuggestionRelevanceTags';
@@ -140,6 +140,9 @@
 const String COMPLETION_REQUEST_GET_SUGGESTION_DETAILS_ID = 'id';
 const String COMPLETION_REQUEST_GET_SUGGESTION_DETAILS_LABEL = 'label';
 const String COMPLETION_REQUEST_GET_SUGGESTION_DETAILS_OFFSET = 'offset';
+const String COMPLETION_REQUEST_LIST_TOKEN_DETAILS =
+    'completion.listTokenDetails';
+const String COMPLETION_REQUEST_LIST_TOKEN_DETAILS_FILE = 'file';
 const String COMPLETION_REQUEST_REGISTER_LIBRARY_PATHS =
     'completion.registerLibraryPaths';
 const String COMPLETION_REQUEST_REGISTER_LIBRARY_PATHS_PATHS = 'paths';
@@ -151,6 +154,7 @@
 const String COMPLETION_RESPONSE_GET_SUGGESTION_DETAILS_CHANGE = 'change';
 const String COMPLETION_RESPONSE_GET_SUGGESTION_DETAILS_COMPLETION =
     'completion';
+const String COMPLETION_RESPONSE_LIST_TOKEN_DETAILS_TOKENS = 'tokens';
 const String DIAGNOSTIC_REQUEST_GET_DIAGNOSTICS = 'diagnostic.getDiagnostics';
 const String DIAGNOSTIC_REQUEST_GET_SERVER_PORT = 'diagnostic.getServerPort';
 const String DIAGNOSTIC_RESPONSE_GET_DIAGNOSTICS_CONTEXTS = 'contexts';
@@ -197,6 +201,7 @@
 const String EDIT_REQUEST_IMPORT_ELEMENTS = 'edit.importElements';
 const String EDIT_REQUEST_IMPORT_ELEMENTS_ELEMENTS = 'elements';
 const String EDIT_REQUEST_IMPORT_ELEMENTS_FILE = 'file';
+const String EDIT_REQUEST_IMPORT_ELEMENTS_OFFSET = 'offset';
 const String EDIT_REQUEST_IS_POSTFIX_COMPLETION_APPLICABLE =
     'edit.isPostfixCompletionApplicable';
 const String EDIT_REQUEST_IS_POSTFIX_COMPLETION_APPLICABLE_FILE = 'file';
diff --git a/pkg/analysis_server_client/lib/src/protocol/protocol_generated.dart b/pkg/analysis_server_client/lib/src/protocol/protocol_generated.dart
index 6d464ab..5d1b076 100644
--- a/pkg/analysis_server_client/lib/src/protocol/protocol_generated.dart
+++ b/pkg/analysis_server_client/lib/src/protocol/protocol_generated.dart
@@ -5076,6 +5076,8 @@
  * {
  *   "label": String
  *   "element": Element
+ *   "defaultArgumentListString": optional String
+ *   "defaultArgumentListTextRanges": optional List<int>
  *   "docComplete": optional String
  *   "docSummary": optional String
  *   "parameterNames": optional List<String>
@@ -5091,6 +5093,10 @@
 
   Element _element;
 
+  String _defaultArgumentListString;
+
+  List<int> _defaultArgumentListTextRanges;
+
   String _docComplete;
 
   String _docSummary;
@@ -5130,6 +5136,42 @@
   }
 
   /**
+   * A default String for use in generating argument list source contents on
+   * the client side.
+   */
+  String get defaultArgumentListString => _defaultArgumentListString;
+
+  /**
+   * A default String for use in generating argument list source contents on
+   * the client side.
+   */
+  void set defaultArgumentListString(String value) {
+    this._defaultArgumentListString = value;
+  }
+
+  /**
+   * Pairs of offsets and lengths describing 'defaultArgumentListString' text
+   * ranges suitable for use by clients to set up linked edits of default
+   * argument source contents. For example, given an argument list string 'x,
+   * y', the corresponding text range [0, 1, 3, 1], indicates two text ranges
+   * of length 1, starting at offsets 0 and 3. Clients can use these ranges to
+   * treat the 'x' and 'y' values specially for linked edits.
+   */
+  List<int> get defaultArgumentListTextRanges => _defaultArgumentListTextRanges;
+
+  /**
+   * Pairs of offsets and lengths describing 'defaultArgumentListString' text
+   * ranges suitable for use by clients to set up linked edits of default
+   * argument source contents. For example, given an argument list string 'x,
+   * y', the corresponding text range [0, 1, 3, 1], indicates two text ranges
+   * of length 1, starting at offsets 0 and 3. Clients can use these ranges to
+   * treat the 'x' and 'y' values specially for linked edits.
+   */
+  void set defaultArgumentListTextRanges(List<int> value) {
+    this._defaultArgumentListTextRanges = value;
+  }
+
+  /**
    * The Dartdoc associated with the element being suggested. This field is
    * omitted if there is no Dartdoc associated with the element.
    */
@@ -5214,7 +5256,9 @@
   }
 
   AvailableSuggestion(String label, Element element,
-      {String docComplete,
+      {String defaultArgumentListString,
+      List<int> defaultArgumentListTextRanges,
+      String docComplete,
       String docSummary,
       List<String> parameterNames,
       List<String> parameterTypes,
@@ -5222,6 +5266,8 @@
       int requiredParameterCount}) {
     this.label = label;
     this.element = element;
+    this.defaultArgumentListString = defaultArgumentListString;
+    this.defaultArgumentListTextRanges = defaultArgumentListTextRanges;
     this.docComplete = docComplete;
     this.docSummary = docSummary;
     this.parameterNames = parameterNames;
@@ -5249,6 +5295,19 @@
       } else {
         throw jsonDecoder.mismatch(jsonPath, "element");
       }
+      String defaultArgumentListString;
+      if (json.containsKey("defaultArgumentListString")) {
+        defaultArgumentListString = jsonDecoder.decodeString(
+            jsonPath + ".defaultArgumentListString",
+            json["defaultArgumentListString"]);
+      }
+      List<int> defaultArgumentListTextRanges;
+      if (json.containsKey("defaultArgumentListTextRanges")) {
+        defaultArgumentListTextRanges = jsonDecoder.decodeList(
+            jsonPath + ".defaultArgumentListTextRanges",
+            json["defaultArgumentListTextRanges"],
+            jsonDecoder.decodeInt);
+      }
       String docComplete;
       if (json.containsKey("docComplete")) {
         docComplete = jsonDecoder.decodeString(
@@ -5281,6 +5340,8 @@
             json["requiredParameterCount"]);
       }
       return new AvailableSuggestion(label, element,
+          defaultArgumentListString: defaultArgumentListString,
+          defaultArgumentListTextRanges: defaultArgumentListTextRanges,
           docComplete: docComplete,
           docSummary: docSummary,
           parameterNames: parameterNames,
@@ -5297,6 +5358,12 @@
     Map<String, dynamic> result = {};
     result["label"] = label;
     result["element"] = element.toJson();
+    if (defaultArgumentListString != null) {
+      result["defaultArgumentListString"] = defaultArgumentListString;
+    }
+    if (defaultArgumentListTextRanges != null) {
+      result["defaultArgumentListTextRanges"] = defaultArgumentListTextRanges;
+    }
     if (docComplete != null) {
       result["docComplete"] = docComplete;
     }
@@ -5326,6 +5393,9 @@
     if (other is AvailableSuggestion) {
       return label == other.label &&
           element == other.element &&
+          defaultArgumentListString == other.defaultArgumentListString &&
+          listEqual(defaultArgumentListTextRanges,
+              other.defaultArgumentListTextRanges, (int a, int b) => a == b) &&
           docComplete == other.docComplete &&
           docSummary == other.docSummary &&
           listEqual(parameterNames, other.parameterNames,
@@ -5344,6 +5414,8 @@
     int hash = 0;
     hash = JenkinsSmiHash.combine(hash, label.hashCode);
     hash = JenkinsSmiHash.combine(hash, element.hashCode);
+    hash = JenkinsSmiHash.combine(hash, defaultArgumentListString.hashCode);
+    hash = JenkinsSmiHash.combine(hash, defaultArgumentListTextRanges.hashCode);
     hash = JenkinsSmiHash.combine(hash, docComplete.hashCode);
     hash = JenkinsSmiHash.combine(hash, docSummary.hashCode);
     hash = JenkinsSmiHash.combine(hash, parameterNames.hashCode);
@@ -6211,6 +6283,184 @@
 }
 
 /**
+ * completion.listTokenDetails params
+ *
+ * {
+ *   "file": FilePath
+ * }
+ *
+ * Clients may not extend, implement or mix-in this class.
+ */
+class CompletionListTokenDetailsParams implements RequestParams {
+  String _file;
+
+  /**
+   * The path to the file from which tokens should be returned.
+   */
+  String get file => _file;
+
+  /**
+   * The path to the file from which tokens should be returned.
+   */
+  void set file(String value) {
+    assert(value != null);
+    this._file = value;
+  }
+
+  CompletionListTokenDetailsParams(String file) {
+    this.file = file;
+  }
+
+  factory CompletionListTokenDetailsParams.fromJson(
+      JsonDecoder jsonDecoder, String jsonPath, Object json) {
+    if (json == null) {
+      json = {};
+    }
+    if (json is Map) {
+      String file;
+      if (json.containsKey("file")) {
+        file = jsonDecoder.decodeString(jsonPath + ".file", json["file"]);
+      } else {
+        throw jsonDecoder.mismatch(jsonPath, "file");
+      }
+      return new CompletionListTokenDetailsParams(file);
+    } else {
+      throw jsonDecoder.mismatch(
+          jsonPath, "completion.listTokenDetails params", json);
+    }
+  }
+
+  factory CompletionListTokenDetailsParams.fromRequest(Request request) {
+    return new CompletionListTokenDetailsParams.fromJson(
+        new RequestDecoder(request), "params", request.params);
+  }
+
+  @override
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> result = {};
+    result["file"] = file;
+    return result;
+  }
+
+  @override
+  Request toRequest(String id) {
+    return new Request(id, "completion.listTokenDetails", toJson());
+  }
+
+  @override
+  String toString() => json.encode(toJson());
+
+  @override
+  bool operator ==(other) {
+    if (other is CompletionListTokenDetailsParams) {
+      return file == other.file;
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, file.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+}
+
+/**
+ * completion.listTokenDetails result
+ *
+ * {
+ *   "tokens": List<TokenDetails>
+ * }
+ *
+ * Clients may not extend, implement or mix-in this class.
+ */
+class CompletionListTokenDetailsResult implements ResponseResult {
+  List<TokenDetails> _tokens;
+
+  /**
+   * A list of the file's scanned tokens including analysis information about
+   * them.
+   */
+  List<TokenDetails> get tokens => _tokens;
+
+  /**
+   * A list of the file's scanned tokens including analysis information about
+   * them.
+   */
+  void set tokens(List<TokenDetails> value) {
+    assert(value != null);
+    this._tokens = value;
+  }
+
+  CompletionListTokenDetailsResult(List<TokenDetails> tokens) {
+    this.tokens = tokens;
+  }
+
+  factory CompletionListTokenDetailsResult.fromJson(
+      JsonDecoder jsonDecoder, String jsonPath, Object json) {
+    if (json == null) {
+      json = {};
+    }
+    if (json is Map) {
+      List<TokenDetails> tokens;
+      if (json.containsKey("tokens")) {
+        tokens = jsonDecoder.decodeList(
+            jsonPath + ".tokens",
+            json["tokens"],
+            (String jsonPath, Object json) =>
+                new TokenDetails.fromJson(jsonDecoder, jsonPath, json));
+      } else {
+        throw jsonDecoder.mismatch(jsonPath, "tokens");
+      }
+      return new CompletionListTokenDetailsResult(tokens);
+    } else {
+      throw jsonDecoder.mismatch(
+          jsonPath, "completion.listTokenDetails result", json);
+    }
+  }
+
+  factory CompletionListTokenDetailsResult.fromResponse(Response response) {
+    return new CompletionListTokenDetailsResult.fromJson(
+        new ResponseDecoder(REQUEST_ID_REFACTORING_KINDS.remove(response.id)),
+        "result",
+        response.result);
+  }
+
+  @override
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> result = {};
+    result["tokens"] =
+        tokens.map((TokenDetails value) => value.toJson()).toList();
+    return result;
+  }
+
+  @override
+  Response toResponse(String id) {
+    return new Response(id, result: toJson());
+  }
+
+  @override
+  String toString() => json.encode(toJson());
+
+  @override
+  bool operator ==(other) {
+    if (other is CompletionListTokenDetailsResult) {
+      return listEqual(
+          tokens, other.tokens, (TokenDetails a, TokenDetails b) => a == b);
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, tokens.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+}
+
+/**
  * completion.registerLibraryPaths params
  *
  * {
@@ -6344,7 +6594,7 @@
  *   "results": List<CompletionSuggestion>
  *   "isLast": bool
  *   "includedSuggestionSets": optional List<IncludedSuggestionSet>
- *   "includedSuggestionKinds": optional List<ElementKind>
+ *   "includedElementKinds": optional List<ElementKind>
  *   "includedSuggestionRelevanceTags": optional List<IncludedSuggestionRelevanceTag>
  * }
  *
@@ -6363,7 +6613,7 @@
 
   List<IncludedSuggestionSet> _includedSuggestionSets;
 
-  List<ElementKind> _includedSuggestionKinds;
+  List<ElementKind> _includedElementKinds;
 
   List<IncludedSuggestionRelevanceTag> _includedSuggestionRelevanceTags;
 
@@ -6453,8 +6703,6 @@
   }
 
   /**
-   * This field is experimental.
-   *
    * References to AvailableSuggestionSet objects previously sent to the
    * client. The client can include applicable names from the referenced
    * library in code completion suggestions.
@@ -6463,8 +6711,6 @@
       _includedSuggestionSets;
 
   /**
-   * This field is experimental.
-   *
    * References to AvailableSuggestionSet objects previously sent to the
    * client. The client can include applicable names from the referenced
    * library in code completion suggestions.
@@ -6474,28 +6720,22 @@
   }
 
   /**
-   * This field is experimental.
-   *
    * The client is expected to check this list against the ElementKind sent in
    * IncludedSuggestionSet to decide whether or not these symbols should should
    * be presented to the user.
    */
-  List<ElementKind> get includedSuggestionKinds => _includedSuggestionKinds;
+  List<ElementKind> get includedElementKinds => _includedElementKinds;
 
   /**
-   * This field is experimental.
-   *
    * The client is expected to check this list against the ElementKind sent in
    * IncludedSuggestionSet to decide whether or not these symbols should should
    * be presented to the user.
    */
-  void set includedSuggestionKinds(List<ElementKind> value) {
-    this._includedSuggestionKinds = value;
+  void set includedElementKinds(List<ElementKind> value) {
+    this._includedElementKinds = value;
   }
 
   /**
-   * This field is experimental.
-   *
    * The client is expected to check this list against the values of the field
    * relevanceTags of AvailableSuggestion to decide if the suggestion should be
    * given a different relevance than the IncludedSuggestionSet that contains
@@ -6509,8 +6749,6 @@
       _includedSuggestionRelevanceTags;
 
   /**
-   * This field is experimental.
-   *
    * The client is expected to check this list against the values of the field
    * relevanceTags of AvailableSuggestion to decide if the suggestion should be
    * given a different relevance than the IncludedSuggestionSet that contains
@@ -6528,7 +6766,7 @@
   CompletionResultsParams(String id, int replacementOffset,
       int replacementLength, List<CompletionSuggestion> results, bool isLast,
       {List<IncludedSuggestionSet> includedSuggestionSets,
-      List<ElementKind> includedSuggestionKinds,
+      List<ElementKind> includedElementKinds,
       List<IncludedSuggestionRelevanceTag> includedSuggestionRelevanceTags}) {
     this.id = id;
     this.replacementOffset = replacementOffset;
@@ -6536,7 +6774,7 @@
     this.results = results;
     this.isLast = isLast;
     this.includedSuggestionSets = includedSuggestionSets;
-    this.includedSuggestionKinds = includedSuggestionKinds;
+    this.includedElementKinds = includedElementKinds;
     this.includedSuggestionRelevanceTags = includedSuggestionRelevanceTags;
   }
 
@@ -6591,11 +6829,11 @@
                 new IncludedSuggestionSet.fromJson(
                     jsonDecoder, jsonPath, json));
       }
-      List<ElementKind> includedSuggestionKinds;
-      if (json.containsKey("includedSuggestionKinds")) {
-        includedSuggestionKinds = jsonDecoder.decodeList(
-            jsonPath + ".includedSuggestionKinds",
-            json["includedSuggestionKinds"],
+      List<ElementKind> includedElementKinds;
+      if (json.containsKey("includedElementKinds")) {
+        includedElementKinds = jsonDecoder.decodeList(
+            jsonPath + ".includedElementKinds",
+            json["includedElementKinds"],
             (String jsonPath, Object json) =>
                 new ElementKind.fromJson(jsonDecoder, jsonPath, json));
       }
@@ -6611,7 +6849,7 @@
       return new CompletionResultsParams(
           id, replacementOffset, replacementLength, results, isLast,
           includedSuggestionSets: includedSuggestionSets,
-          includedSuggestionKinds: includedSuggestionKinds,
+          includedElementKinds: includedElementKinds,
           includedSuggestionRelevanceTags: includedSuggestionRelevanceTags);
     } else {
       throw jsonDecoder.mismatch(jsonPath, "completion.results params", json);
@@ -6637,8 +6875,8 @@
           .map((IncludedSuggestionSet value) => value.toJson())
           .toList();
     }
-    if (includedSuggestionKinds != null) {
-      result["includedSuggestionKinds"] = includedSuggestionKinds
+    if (includedElementKinds != null) {
+      result["includedElementKinds"] = includedElementKinds
           .map((ElementKind value) => value.toJson())
           .toList();
     }
@@ -6669,7 +6907,7 @@
           isLast == other.isLast &&
           listEqual(includedSuggestionSets, other.includedSuggestionSets,
               (IncludedSuggestionSet a, IncludedSuggestionSet b) => a == b) &&
-          listEqual(includedSuggestionKinds, other.includedSuggestionKinds,
+          listEqual(includedElementKinds, other.includedElementKinds,
               (ElementKind a, ElementKind b) => a == b) &&
           listEqual(
               includedSuggestionRelevanceTags,
@@ -6690,7 +6928,7 @@
     hash = JenkinsSmiHash.combine(hash, results.hashCode);
     hash = JenkinsSmiHash.combine(hash, isLast.hashCode);
     hash = JenkinsSmiHash.combine(hash, includedSuggestionSets.hashCode);
-    hash = JenkinsSmiHash.combine(hash, includedSuggestionKinds.hashCode);
+    hash = JenkinsSmiHash.combine(hash, includedElementKinds.hashCode);
     hash =
         JenkinsSmiHash.combine(hash, includedSuggestionRelevanceTags.hashCode);
     return JenkinsSmiHash.finish(hash);
@@ -10065,6 +10303,7 @@
  * {
  *   "file": FilePath
  *   "elements": List<ImportedElements>
+ *   "offset": optional int
  * }
  *
  * Clients may not extend, implement or mix-in this class.
@@ -10074,6 +10313,8 @@
 
   List<ImportedElements> _elements;
 
+  int _offset;
+
   /**
    * The file in which the specified elements are to be made accessible.
    */
@@ -10100,9 +10341,29 @@
     this._elements = value;
   }
 
-  EditImportElementsParams(String file, List<ImportedElements> elements) {
+  /**
+   * The offset at which the specified elements need to be made accessible. If
+   * provided, this is used to guard against adding imports for text that would
+   * be inserted into a comment, string literal, or other location where the
+   * imports would not be necessary.
+   */
+  int get offset => _offset;
+
+  /**
+   * The offset at which the specified elements need to be made accessible. If
+   * provided, this is used to guard against adding imports for text that would
+   * be inserted into a comment, string literal, or other location where the
+   * imports would not be necessary.
+   */
+  void set offset(int value) {
+    this._offset = value;
+  }
+
+  EditImportElementsParams(String file, List<ImportedElements> elements,
+      {int offset}) {
     this.file = file;
     this.elements = elements;
+    this.offset = offset;
   }
 
   factory EditImportElementsParams.fromJson(
@@ -10127,7 +10388,11 @@
       } else {
         throw jsonDecoder.mismatch(jsonPath, "elements");
       }
-      return new EditImportElementsParams(file, elements);
+      int offset;
+      if (json.containsKey("offset")) {
+        offset = jsonDecoder.decodeInt(jsonPath + ".offset", json["offset"]);
+      }
+      return new EditImportElementsParams(file, elements, offset: offset);
     } else {
       throw jsonDecoder.mismatch(jsonPath, "edit.importElements params", json);
     }
@@ -10144,6 +10409,9 @@
     result["file"] = file;
     result["elements"] =
         elements.map((ImportedElements value) => value.toJson()).toList();
+    if (offset != null) {
+      result["offset"] = offset;
+    }
     return result;
   }
 
@@ -10160,7 +10428,8 @@
     if (other is EditImportElementsParams) {
       return file == other.file &&
           listEqual(elements, other.elements,
-              (ImportedElements a, ImportedElements b) => a == b);
+              (ImportedElements a, ImportedElements b) => a == b) &&
+          offset == other.offset;
     }
     return false;
   }
@@ -10170,6 +10439,7 @@
     int hash = 0;
     hash = JenkinsSmiHash.combine(hash, file.hashCode);
     hash = JenkinsSmiHash.combine(hash, elements.hashCode);
+    hash = JenkinsSmiHash.combine(hash, offset.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 }
@@ -16076,6 +16346,7 @@
  * {
  *   "id": int
  *   "relevance": int
+ *   "displayUri": optional String
  * }
  *
  * Clients may not extend, implement or mix-in this class.
@@ -16085,6 +16356,8 @@
 
   int _relevance;
 
+  String _displayUri;
+
   /**
    * Clients should use it to access the set of precomputed completions to be
    * displayed to the user.
@@ -16115,9 +16388,34 @@
     this._relevance = value;
   }
 
-  IncludedSuggestionSet(int id, int relevance) {
+  /**
+   * The optional string that should be displayed instead of the uri of the
+   * referenced AvailableSuggestionSet.
+   *
+   * For example libraries in the "test" directory of a package have only
+   * "file://" URIs, so are usually long, and don't look nice, but actual
+   * import directives will use relative URIs, which are short, so we probably
+   * want to display such relative URIs to the user.
+   */
+  String get displayUri => _displayUri;
+
+  /**
+   * The optional string that should be displayed instead of the uri of the
+   * referenced AvailableSuggestionSet.
+   *
+   * For example libraries in the "test" directory of a package have only
+   * "file://" URIs, so are usually long, and don't look nice, but actual
+   * import directives will use relative URIs, which are short, so we probably
+   * want to display such relative URIs to the user.
+   */
+  void set displayUri(String value) {
+    this._displayUri = value;
+  }
+
+  IncludedSuggestionSet(int id, int relevance, {String displayUri}) {
     this.id = id;
     this.relevance = relevance;
+    this.displayUri = displayUri;
   }
 
   factory IncludedSuggestionSet.fromJson(
@@ -16139,7 +16437,12 @@
       } else {
         throw jsonDecoder.mismatch(jsonPath, "relevance");
       }
-      return new IncludedSuggestionSet(id, relevance);
+      String displayUri;
+      if (json.containsKey("displayUri")) {
+        displayUri = jsonDecoder.decodeString(
+            jsonPath + ".displayUri", json["displayUri"]);
+      }
+      return new IncludedSuggestionSet(id, relevance, displayUri: displayUri);
     } else {
       throw jsonDecoder.mismatch(jsonPath, "IncludedSuggestionSet", json);
     }
@@ -16150,6 +16453,9 @@
     Map<String, dynamic> result = {};
     result["id"] = id;
     result["relevance"] = relevance;
+    if (displayUri != null) {
+      result["displayUri"] = displayUri;
+    }
     return result;
   }
 
@@ -16159,7 +16465,9 @@
   @override
   bool operator ==(other) {
     if (other is IncludedSuggestionSet) {
-      return id == other.id && relevance == other.relevance;
+      return id == other.id &&
+          relevance == other.relevance &&
+          displayUri == other.displayUri;
     }
     return false;
   }
@@ -16169,6 +16477,7 @@
     int hash = 0;
     hash = JenkinsSmiHash.combine(hash, id.hashCode);
     hash = JenkinsSmiHash.combine(hash, relevance.hashCode);
+    hash = JenkinsSmiHash.combine(hash, displayUri.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 }
@@ -21260,6 +21569,142 @@
 }
 
 /**
+ * TokenDetails
+ *
+ * {
+ *   "lexeme": String
+ *   "type": optional String
+ *   "validElementKinds": optional List<String>
+ * }
+ *
+ * Clients may not extend, implement or mix-in this class.
+ */
+class TokenDetails implements HasToJson {
+  String _lexeme;
+
+  String _type;
+
+  List<String> _validElementKinds;
+
+  /**
+   * The token's lexeme.
+   */
+  String get lexeme => _lexeme;
+
+  /**
+   * The token's lexeme.
+   */
+  void set lexeme(String value) {
+    assert(value != null);
+    this._lexeme = value;
+  }
+
+  /**
+   * A unique id for the type of the identifier. Omitted if the token is not an
+   * identifier in a reference position.
+   */
+  String get type => _type;
+
+  /**
+   * A unique id for the type of the identifier. Omitted if the token is not an
+   * identifier in a reference position.
+   */
+  void set type(String value) {
+    this._type = value;
+  }
+
+  /**
+   * An indication of whether this token is in a declaration or reference
+   * position. (If no other purpose is found for this field then it should be
+   * renamed and converted to a boolean value.) Omitted if the token is not an
+   * identifier.
+   */
+  List<String> get validElementKinds => _validElementKinds;
+
+  /**
+   * An indication of whether this token is in a declaration or reference
+   * position. (If no other purpose is found for this field then it should be
+   * renamed and converted to a boolean value.) Omitted if the token is not an
+   * identifier.
+   */
+  void set validElementKinds(List<String> value) {
+    this._validElementKinds = value;
+  }
+
+  TokenDetails(String lexeme, {String type, List<String> validElementKinds}) {
+    this.lexeme = lexeme;
+    this.type = type;
+    this.validElementKinds = validElementKinds;
+  }
+
+  factory TokenDetails.fromJson(
+      JsonDecoder jsonDecoder, String jsonPath, Object json) {
+    if (json == null) {
+      json = {};
+    }
+    if (json is Map) {
+      String lexeme;
+      if (json.containsKey("lexeme")) {
+        lexeme = jsonDecoder.decodeString(jsonPath + ".lexeme", json["lexeme"]);
+      } else {
+        throw jsonDecoder.mismatch(jsonPath, "lexeme");
+      }
+      String type;
+      if (json.containsKey("type")) {
+        type = jsonDecoder.decodeString(jsonPath + ".type", json["type"]);
+      }
+      List<String> validElementKinds;
+      if (json.containsKey("validElementKinds")) {
+        validElementKinds = jsonDecoder.decodeList(
+            jsonPath + ".validElementKinds",
+            json["validElementKinds"],
+            jsonDecoder.decodeString);
+      }
+      return new TokenDetails(lexeme,
+          type: type, validElementKinds: validElementKinds);
+    } else {
+      throw jsonDecoder.mismatch(jsonPath, "TokenDetails", json);
+    }
+  }
+
+  @override
+  Map<String, dynamic> toJson() {
+    Map<String, dynamic> result = {};
+    result["lexeme"] = lexeme;
+    if (type != null) {
+      result["type"] = type;
+    }
+    if (validElementKinds != null) {
+      result["validElementKinds"] = validElementKinds;
+    }
+    return result;
+  }
+
+  @override
+  String toString() => json.encode(toJson());
+
+  @override
+  bool operator ==(other) {
+    if (other is TokenDetails) {
+      return lexeme == other.lexeme &&
+          type == other.type &&
+          listEqual(validElementKinds, other.validElementKinds,
+              (String a, String b) => a == b);
+    }
+    return false;
+  }
+
+  @override
+  int get hashCode {
+    int hash = 0;
+    hash = JenkinsSmiHash.combine(hash, lexeme.hashCode);
+    hash = JenkinsSmiHash.combine(hash, type.hashCode);
+    hash = JenkinsSmiHash.combine(hash, validElementKinds.hashCode);
+    return JenkinsSmiHash.finish(hash);
+  }
+}
+
+/**
  * TypeHierarchyItem
  *
  * {
diff --git a/pkg/analysis_tool/lib/tools.dart b/pkg/analysis_tool/lib/tools.dart
index 0e35b61..831014e 100644
--- a/pkg/analysis_tool/lib/tools.dart
+++ b/pkg/analysis_tool/lib/tools.dart
@@ -159,7 +159,7 @@
     if (codeGeneratorSettings.languageName == 'java') {
       header = '''
 /*
- * Copyright (c) ${year ?? '2018'}, the Dart project authors. Please see the AUTHORS file
+ * Copyright (c) ${year ?? '2019'}, the Dart project authors. Please see the AUTHORS file
  * for details. All rights reserved. Use of this source code is governed by a
  * BSD-style license that can be found in the LICENSE file.
  *
@@ -313,14 +313,15 @@
    * out a message instructing the user to regenerate them, and exit with a
    * nonzero error code.
    *
-   * [pkgPath] is the path to the current package.  [generatorRelPath] is the
-   * path to a .dart script the user may use to regenerate the targets.
+   * [pkgPath] is the path to the current package.  [generatorPath] is the path
+   * to a .dart script the user may use to regenerate the targets.
    *
-   * To avoid mistakes when run on Windows, [generatorRelPath] always uses
+   * To avoid mistakes when run on Windows, [generatorPath] always uses
    * POSIX directory separators.
    */
-  static Future<void> checkAll(String pkgPath, String generatorRelPath,
-      Iterable<GeneratedContent> targets) async {
+  static Future<void> checkAll(
+      String pkgPath, String generatorPath, Iterable<GeneratedContent> targets,
+      {List<String> args = const []}) async {
     bool generateNeeded = false;
     for (GeneratedContent target in targets) {
       bool ok = await target.check(pkgPath);
@@ -339,9 +340,8 @@
         // ignore: deprecated_member_use
         packageRoot = ' --package-root=${Platform.packageRoot}';
       }
-      String generateScript =
-          join(pkgPath, joinAll(posix.split(generatorRelPath)));
-      print('  $executable$packageRoot $generateScript');
+      String generateScript = normalize(joinAll(posix.split(generatorPath)));
+      print('  $executable$packageRoot $generateScript ${args.join(" ")}');
       exit(1);
     } else {
       print('All generated files up to date.');
diff --git a/pkg/analyzer/CHANGELOG.md b/pkg/analyzer/CHANGELOG.md
index 591419d..e30b6cf 100644
--- a/pkg/analyzer/CHANGELOG.md
+++ b/pkg/analyzer/CHANGELOG.md
@@ -1,3 +1,87 @@
+## 0.36.0
+* Changed the return type of `Expression.precendence` to `Precedence`.  Clients
+  that prepared for this change by switching to `Expression.precedence2` should
+  now return to using `Expression.precedence`.
+* AST cleanup related to the "UI as code" feature:
+  * Removed the following AST node types:
+    * `ForEachStatement` (use `ForStatement` instead)
+    * `MapLiteral` and `MapLiteral2` (use `SetOrMapLiteral` instead)
+    * `SetLiteral` and `SetLiteral2` (use `SetOrMapLiteral` instead)
+    * `ListLiteral2` (use `ListLiteral` instead)
+  * Deprecated `ForStatement2` (use `ForStatement` instead)
+  * Removed the following visit methods:
+    * `visitForEachStatement` (override `visitForStatement` instead)
+    * `visitMapLiteral` and `visitMapLiteral2` (override `visitSetOrMapLiteral`
+      instead)
+    * `visitSetLiteral` and `visitSetLiteral2` (override `visitSetOrMapLiteral`
+      instead)
+    * `visitListLiteral2` (override `visitListLiteral` instead)
+  * Deprecated the `visitForStatement2` visit method (use `VisitForStatement`
+    instead)
+  * Removed the following AstFactory methods:
+    * `mapLiteral` and `mapLiteral2` (use `setOrMapLiteral` instead)
+    * `setLiteral` and `setLiteral2` (use `setOrMapLiteral` instead)
+    * `listLiteral2` (use `listLiteral` instead)
+  * Deprecated `AstFactory.forStatement2`, and introduced
+    `AstFactory.forStatement` to replace it
+  * Changed the type of the getter `ListLiteral.elements` to
+    `NodeList<CollectionElement>`
+  * Deprecated `ListLiteral.elements2` (use `ListLiteral.elements` instead)
+  * Deprecated `SetOrMapLiteral.elements2`, and introduced
+    `SetOrMapLiteral.elements` to replace it
+  * Deprecated `NodeLintRegistry.addForStatement2` (use
+    `NodeLintRegistry.addForStatement` instead)
+* Bug fixes: #36158, #36212, #36255
+
+## 0.35.4
+* Deprecated AST structures that will no longer be used after the
+  control_flow_collections and spread_collections experiments are enabled.  The
+  following AST node types are deprecated:
+  * `ForEachStatement` (use `ForStatement2` instead)
+  * `ForStatement` (use `ForStatement2` instead)
+  * `MapLiteral` (use `SetOrMapLiteral` instead)
+  * `SetLiteral` (use `SetOrMapLiteral` instead)
+* Deprecated visit methods that will no longer be used after the
+  control_flow_collections and spread_collections experiments are enabled.  The
+  following visit methods are deprecated:
+  * `visitForEachStatement` (override `visitForStatement2` instead)
+  * `visitForStatement` (override `visitForStatement2` instead)
+  * `visitMapLiteral` (override `visitSetOrMapLiteral` instead)
+  * `visitSetLiteral` (override `visitSetOrMapLiteral` instead)
+* Deprecated ASTFactory methods that will no longer be available after the
+  control_flow_collections and spread_collections experiments are enabled.  The
+  following factory methods are deprecated:
+  * `mapLiteral` and `mapLiteral2` (use `setOrMapLiteral` instead)
+  * `setLiteral` and `setLiteral2` (use `setOrMapLiteral` instead)
+* Bug fixes: #33119, #33241, #35747, #35900, #36048, #36129
+* The analyzer no longer uses `package:html` (see #35802)
+
+## 0.35.3
+* Further updates to the AST structure for the control_flow_collections and
+  spread_collections experiments.  The following AST node types will be
+  deprecated soon:
+  * `ForEachStatement` (use `ForStatement2` instead)
+  * `ForStatement` (use `ForStatement2` instead)
+  * `MapLiteral` (use `SetOrMapLiteral` instead)
+  * `SetLiteral` (use `SetOrMapLiteral` instead)
+* Deprecated `Expression.precedence`.  In analyzer version 0.36.0, its return
+  type will be changed to `Precedence`.  Clients that wish to prepare for the
+  change can switch to `Expression.precedence2`.
+* Bug fixes: #35908, #35993 (workaround).
+
+## 0.35.2
+* Updated support in the AST structure for the control_flow_collections and
+  spread_collections experiments.  The following methods are now deprecated:
+  * `AstFactory.mapLiteral2` and `AstFactory.setLiteral2` (replaced by
+    `AstFactory.setOrMapLiteral`).
+  * `AstVisitor.visitListLiteral2` (clients should not need to override this
+    anymore).
+  * `AstVisitor.visitMapLiteral2 and AstVisitor.visitSetLiteral2` (replaced by
+    `AstVisitor.visitSetOrMapLiteral`).
+* Started to add support for strict-inference as an analysis option.
+* Bug fixes: #35870, #35922, #35936, #35940,
+  https://github.com/flutter/flutter-intellij/issues/3204
+
 ## 0.35.1
 * The new "set literals" language feature is now enabled by default.
 * The dev_dependency analysis_tool was created so that clients do not have to
diff --git a/pkg/analyzer/doc/support/dart.js b/pkg/analyzer/doc/support/dart.js
deleted file mode 100644
index f8d686e..0000000
--- a/pkg/analyzer/doc/support/dart.js
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-(function() {
-// Bootstrap support for Dart scripts on the page as this script.
-if (navigator.userAgent.indexOf('(Dart)') === -1) {
-  // TODO:
-  // - Support in-browser compilation.
-  // - Handle inline Dart scripts.
-
-  // Fall back to compiled JS. Run through all the scripts and
-  // replace them if they have a type that indicate that they source
-  // in Dart code (type="application/dart").
-  var scripts = document.getElementsByTagName("script");
-  var length = scripts.length;
-  for (var i = 0; i < length; ++i) {
-    if (scripts[i].type == "application/dart") {
-      // Remap foo.dart to foo.dart.js.
-      if (scripts[i].src && scripts[i].src != '') {
-        var script = document.createElement('script');
-        script.src = scripts[i].src.replace(/\.dart(?=\?|$)/, '.dart.js');
-        var parent = scripts[i].parentNode;
-        // TODO(vsm): Find a solution for issue 8455 that works with more
-        // than one script.
-        document.currentScript = script;
-        parent.replaceChild(script, scripts[i]);
-      }
-    }
-  }
-}
-})();
diff --git a/pkg/analyzer/doc/support/style.css b/pkg/analyzer/doc/support/style.css
deleted file mode 100644
index 0964121..0000000
--- a/pkg/analyzer/doc/support/style.css
+++ /dev/null
@@ -1,29 +0,0 @@
-*, *:before, *:after {
-    -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
-}
-button {
-    position: fixed;
-    padding: 10px;
-    top: 5px;
-    left: 5px;
-    opacity: 0.8;
-    display: none;
-}
-g > * {
-    transition-property: stroke, stroke-width, transform, fill, font-size;
-    transition-duration: .2s;
-}
-g.active > text {
-    fill: blue;
-    font-size: 100%;
-}
-g.active > polygon, g.active > ellipse, g.active > path {
-    stroke: blue;
-    stroke-width: 3px !important;
-}
-g.active.edge > polygon {
-    fill: blue;
-}
-html, body { margin:10px; padding:0; }
-svg {  height:100%; width:100%; }
-svg.zoom {height: inherit; width: inherit;}
diff --git a/pkg/analyzer/doc/support/viz.js b/pkg/analyzer/doc/support/viz.js
deleted file mode 100644
index 488db0c..0000000
--- a/pkg/analyzer/doc/support/viz.js
+++ /dev/null
@@ -1,1302 +0,0 @@
-function k($a){throw $a;}var p=void 0,q=!0,r=null,G=!1;function M(){return function(){}}
-window.Viz=function($a,ec,ab){function ob(a){eval.call(r,a)}function J(a,b){a||aa("Assertion failed: "+b)}function pb(a){try{var b=e["_"+a];b||(b=eval("_"+a))}catch(c){}J(b,"Cannot call unknown function "+a+" (perhaps LLVM optimizations or closure removed it?)");return b}function qb(a,b,c,f){function d(a,b){if("string"==b){if(a===r||a===p||0===a)return 0;a=V(a);b="array"}if("array"==b){i||(i=l.kd());var c=l.hd(a.length);rb(a,c);return c}return a}var i=0,e=0,f=f?f.map(function(a){return d(a,c[e++])}):
-[];a=a.apply(r,f);"string"==b?b=R(a):(J("array"!=b),b=a);i&&l.jd(i);return b}function ta(a,b,c){c=c||"i8";"*"===c.charAt(c.length-1)&&(c="i32");switch(c){case "i1":v[a]=b;break;case "i8":v[a]=b;break;case "i16":ea[a>>1]=b;break;case "i32":t[a>>2]=b;break;case "i64":na=[b>>>0,(N=b,1<=+ua(N)?0<N?(va(+Ia(N/4294967296),4294967295)|0)>>>0:~~+Ja((N-+(~~N>>>0))/4294967296)>>>0:0)];t[a>>2]=na[0];t[a+4>>2]=na[1];break;case "float":wa[a>>2]=b;break;case "double":oa[a>>3]=b;break;default:aa("invalid type for setValue: "+
-c)}}function pa(a,b){b=b||"i8";"*"===b.charAt(b.length-1)&&(b="i32");switch(b){case "i1":return v[a];case "i8":return v[a];case "i16":return ea[a>>1];case "i32":return t[a>>2];case "i64":return t[a>>2];case "float":return wa[a>>2];case "double":return oa[a>>3];default:aa("invalid type for setValue: "+b)}return r}function D(a,b,c,f){var d,i;"number"===typeof a?(d=q,i=a):(d=G,i=a.length);var e="string"===typeof b?b:r,c=c==L?f:[ia,l.hd,l.md,l.Ub][c===p?S:c](Math.max(i,e?1:b.length));if(d){f=c;J(0==(c&
-3));for(a=c+(i&-4);f<a;f+=4)t[f>>2]=0;for(a=c+i;f<a;)v[f++|0]=0;return c}if("i8"===e)return a.subarray||a.slice?T.set(a,c):T.set(new Uint8Array(a),c),c;for(var f=0,j,g;f<i;){var x=a[f];"function"===typeof x&&(x=l.Ni(x));d=e||b[f];0===d?f++:("i64"==d&&(d="i32"),ta(c+f,x,d),g!==d&&(j=l.Lc(d),g=d),f+=j)}return c}function R(a,b){for(var c=G,f,d=0;;){f=T[a+d|0];if(128<=f)c=q;else if(0==f&&!b)break;d++;if(b&&d==b)break}b||(b=d);var i="";if(!c){for(;0<b;)f=String.fromCharCode.apply(String,T.subarray(a,a+
-Math.min(b,1024))),i=i?i+f:f,a+=1024,b-=1024;return i}c=new l.pb;for(d=0;d<b;d++)f=T[a+d|0],i+=c.ic(f);return i}function fc(a){try{if("Object._main"==a||"_main"==a)return"main()";"number"===typeof a&&(a=R(a));if("_"!==a[0]||"_"!==a[1]||"Z"!==a[2])return a;switch(a[3]){case "n":return"operator new()";case "d":return"operator delete()"}var b=3,c={v:"void",b:"bool",c:"char",s:"short",i:"int",l:"long",f:"float",d:"double",w:"wchar_t",a:"signed char",h:"unsigned char",t:"unsigned short",j:"unsigned int",
-m:"unsigned long",x:"long long",y:"unsigned long long",z:"..."},f=[],d=q,i=function(e,h,g){var h=h||Infinity,m="",s=[],y;if("N"===a[b]){b++;"K"===a[b]&&b++;for(y=[];"E"!==a[b];)if("S"===a[b]){b++;var A=a.indexOf("_",b);y.push(f[a.substring(b,A)||0]||"?");b=A+1}else if("C"===a[b])y.push(y[y.length-1]),b+=2;else{var A=parseInt(a.substr(b)),F=A.toString().length;if(!A||!F){b--;break}var P=a.substr(b+F,A);y.push(P);f.push(P);b+=F+A}b++;y=y.join("::");h--;if(0===h)return e?[y]:y}else if(("K"===a[b]||d&&
-"L"===a[b])&&b++,A=parseInt(a.substr(b)))F=A.toString().length,y=a.substr(b+F,A),b+=F+A;d=G;"I"===a[b]?(b++,A=i(q),F=i(q,1,q),m+=F[0]+" "+y+"<"+A.join(", ")+">"):m=y;a:for(;b<a.length&&0<h--;)if(y=a[b++],y in c)s.push(c[y]);else switch(y){case "P":s.push(i(q,1,q)[0]+"*");break;case "R":s.push(i(q,1,q)[0]+"&");break;case "L":b++;A=a.indexOf("E",b)-b;s.push(a.substr(b,A));b+=A+2;break;case "A":A=parseInt(a.substr(b));b+=A.toString().length;"_"!==a[b]&&k("?");b++;s.push(i(q,1,q)[0]+" ["+A+"]");break;
-case "E":break a;default:m+="?"+y;break a}!g&&(1===s.length&&"void"===s[0])&&(s=[]);return e?s:m+("("+s.join(", ")+")")};return i()}catch(e){return a}}function bb(){var a=Error().stack;return a?a.replace(/__Z[\w\d_]+/g,function(a){var c=fc(a);return a===c?a:a+" ["+c+"]"}):"(no stack trace available)"}function qa(a){for(;0<a.length;){var b=a.shift();if("function"==typeof b)b();else{var c=b.Ka;"number"===typeof c?b.uc===p?l.Dc("v",c):l.Dc("vi",c,[b.uc]):c(b.uc===p?r:b.uc)}}}function sb(a){cb.unshift(a)}
-function tb(a){ub.unshift(a)}function V(a,b,c){a=(new l.pb).re(a);c&&(a.length=c);b||a.push(0);return a}function rb(a,b){for(var c=0;c<a.length;c++)v[b+c|0]=a[c]}function Ka(a,b,c){for(var f=0;f<a.length;f++)v[b+f|0]=a.charCodeAt(f);c||(v[b+a.length|0]=0)}function La(a,b){return 0<=a?a:32>=b?2*Math.abs(1<<b-1)+a:Math.pow(2,b)+a}function vb(a,b){if(0>=a)return a;var c=32>=b?Math.abs(1<<b-1):Math.pow(2,b-1);if(a>=c&&(32>=b||a>c))a=-2*c+a;return a}function db(){fa++;e.monitorRunDependencies&&e.monitorRunDependencies(fa)}
-function Ma(){fa--;e.monitorRunDependencies&&e.monitorRunDependencies(fa);if(0==fa&&(eb!==r&&(clearInterval(eb),eb=r),xa)){var a=xa;xa=r;a()}}function H(a){return t[Na>>2]=a}function fb(a,b,c){a=d.D(a);if(!a)return H(g.H),-1;try{return d.P(a,v,b,c)}catch(f){return d.sa(f),-1}}function wb(a,b,c){if(a in Oa){if(Oa[a].length>c-1)return H(g.qc);Ka(Oa[a],b);return 0}return H(g.B)}function ya(a){ya.buffer||(ya.buffer=ia(256));wb(a,ya.buffer,256);return ya.buffer}function Pa(a){return 0>a||0===a&&-Infinity===
-1/a}function gb(a,b){function c(a){var c;"double"===a?c=oa[b+d>>3]:"i64"==a?(c=[t[b+d>>2],t[b+(d+8)>>2]],d+=8):(a="i32",c=t[b+d>>2]);d+=Math.max(l.$d(a),l.Aa(a,r,q));return c}for(var f=a,d=0,e=[],h,j;;){var g=f;h=v[f];if(0===h)break;j=v[f+1|0];if(37==h){var x=G,m=G,s=G,y=G,A=G;a:for(;;){switch(j){case 43:x=q;break;case 45:m=q;break;case 35:s=q;break;case 48:if(y)break a;else{y=q;break}case 32:A=q;break;default:break a}f++;j=v[f+1|0]}var F=0;if(42==j)F=c("i32"),f++,j=v[f+1|0];else for(;48<=j&&57>=
-j;)F=10*F+(j-48),f++,j=v[f+1|0];var P=G,E=-1;if(46==j){E=0;P=q;f++;j=v[f+1|0];if(42==j)E=c("i32"),f++;else for(;;){j=v[f+1|0];if(48>j||57<j)break;E=10*E+(j-48);f++}j=v[f+1|0]}-1===E&&(E=6,P=G);var C;switch(String.fromCharCode(j)){case "h":j=v[f+2|0];104==j?(f++,C=1):C=2;break;case "l":j=v[f+2|0];108==j?(f++,C=8):C=4;break;case "L":case "q":case "j":C=8;break;case "z":case "t":case "I":C=4;break;default:C=r}C&&f++;j=v[f+1|0];switch(String.fromCharCode(j)){case "d":case "i":case "u":case "o":case "x":case "X":case "p":g=
-100==j||105==j;C=C||4;var n=h=c("i"+8*C),w;8==C&&(h=l.Mf(h[0],h[1],117==j));4>=C&&(h=(g?vb:La)(h&Math.pow(256,C)-1,8*C));var u=Math.abs(h),g="";if(100==j||105==j)w=8==C&&za?za.stringify(n[0],n[1],r):vb(h,8*C).toString(10);else if(117==j)w=8==C&&za?za.stringify(n[0],n[1],q):La(h,8*C).toString(10),h=Math.abs(h);else if(111==j)w=(s?"0":"")+u.toString(8);else if(120==j||88==j){g=s&&0!=h?"0x":"";if(8==C&&za)if(n[1]){w=(n[1]>>>0).toString(16);for(s=(n[0]>>>0).toString(16);8>s.length;)s="0"+s;w+=s}else w=
-(n[0]>>>0).toString(16);else if(0>h){h=-h;w=(u-1).toString(16);n=[];for(s=0;s<w.length;s++)n.push((15-parseInt(w[s],16)).toString(16));for(w=n.join("");w.length<2*C;)w="f"+w}else w=u.toString(16);88==j&&(g=g.toUpperCase(),w=w.toUpperCase())}else 112==j&&(0===u?w="(nil)":(g="0x",w=u.toString(16)));if(P)for(;w.length<E;)w="0"+w;0<=h&&(x?g="+"+g:A&&(g=" "+g));"-"==w.charAt(0)&&(g="-"+g,w=w.substr(1));for(;g.length+w.length<F;)m?w+=" ":y?w="0"+w:g=" "+g;w=g+w;w.split("").forEach(function(a){e.push(a.charCodeAt(0))});
-break;case "f":case "F":case "e":case "E":case "g":case "G":h=c("double");if(isNaN(h))w="nan",y=G;else if(isFinite(h)){P=G;C=Math.min(E,20);if(103==j||71==j)P=q,E=E||1,C=parseInt(h.toExponential(C).split("e")[1],10),E>C&&-4<=C?(j=(103==j?"f":"F").charCodeAt(0),E-=C+1):(j=(103==j?"e":"E").charCodeAt(0),E--),C=Math.min(E,20);if(101==j||69==j)w=h.toExponential(C),/[eE][-+]\d$/.test(w)&&(w=w.slice(0,-1)+"0"+w.slice(-1));else if(102==j||70==j)w=h.toFixed(C),0===h&&Pa(h)&&(w="-"+w);g=w.split("e");if(P&&
-!s)for(;1<g[0].length&&-1!=g[0].indexOf(".")&&("0"==g[0].slice(-1)||"."==g[0].slice(-1));)g[0]=g[0].slice(0,-1);else for(s&&-1==w.indexOf(".")&&(g[0]+=".");E>C++;)g[0]+="0";w=g[0]+(1<g.length?"e"+g[1]:"");69==j&&(w=w.toUpperCase());0<=h&&(x?w="+"+w:A&&(w=" "+w))}else w=(0>h?"-":"")+"inf",y=G;for(;w.length<F;)w=m?w+" ":y&&("-"==w[0]||"+"==w[0])?w[0]+"0"+w.slice(1):(y?"0":" ")+w;97>j&&(w=w.toUpperCase());w.split("").forEach(function(a){e.push(a.charCodeAt(0))});break;case "s":y=(x=c("i8*"))?Aa(x):6;
-P&&(y=Math.min(y,E));if(!m)for(;y<F--;)e.push(32);if(x)for(s=0;s<y;s++)e.push(T[x++|0]);else e=e.concat(V("(null)".substr(0,y),q));if(m)for(;y<F--;)e.push(32);break;case "c":for(m&&e.push(c("i8"));0<--F;)e.push(32);m||e.push(c("i8"));break;case "n":m=c("i32*");t[m>>2]=e.length;break;case "%":e.push(h);break;default:for(s=g;s<f+2;s++)e.push(v[s])}f+=2}else e.push(h),f+=1}return e}function hb(a,b,c,f){c=gb(c,f);f=b===p?c.length:Math.min(c.length,Math.max(b-1,0));if(0>a)var a=-a,d=ia(f+1),a=t[a>>2]=
-d;for(d=0;d<f;d++)v[a+d|0]=c[d];if(f<b||b===p)v[a+d|0]=0;return c.length}function xb(a,b,c){for(var f=0;f<c;){var d=T[a+f|0],e=T[b+f|0];if(d==e&&0==d)break;if(0==d)return-1;if(0==e)return 1;if(d==e)f++;else return d>e?1:-1}return 0}function yb(a){return 32==a||9<=a&&13>=a}function zb(a,b,c,f,d,e,h){for(;yb(v[a]);)a++;var j=1;45==v[a]?(j=-1,a++):43==v[a]&&a++;if(c){if(16==c&&48==v[a]&&(120==v[a+1|0]||88==v[a+1|0]))a+=2}else 48==v[a]&&(120==v[a+1|0]||88==v[a+1|0]?(c=16,a+=2):(c=8,a++));c||(c=10);for(var l,
-x=0;0!=(l=v[a])&&!(l=parseInt(String.fromCharCode(l),c),isNaN(l));)x=x*c+l,a++;x*=j;b&&(t[b>>2]=a);h&&(Math.abs(x)>d?(x=d,H(g.qc)):x=La(x,e));if(x>d||x<f)x=x>d?d:f,H(g.qc);return 64==e?(u.setTempRet0((N=x,1<=+ua(N)?0<N?(va(+Ia(N/4294967296),4294967295)|0)>>>0:~~+Ja((N-+(~~N>>>0))/4294967296)>>>0:0)),x>>>0)|0:x}function Ab(a,b,c){return zb(a,b,c,-2147483648,2147483647,32)}function Bb(a){return/^[+-]?[0-9]*\.?[0-9]+([eE][+-]?[0-9]+)?/.exec(a)}function Q(a,b,c,f){Q.whiteSpace||(Q.whiteSpace={},Q.whiteSpace[32]=
-1,Q.whiteSpace[9]=1,Q.whiteSpace[10]=1,Q.whiteSpace[11]=1,Q.whiteSpace[12]=1,Q.whiteSpace[13]=1);var a=R(a),d=0;if(0<=a.indexOf("%n"))var e=b,b=function(){d++;return e()},h=c,c=function(){d--;return h()};var j=0,g=0,x=0,m,j=0;a:for(;j<a.length;)if("%"===a[j]&&"n"==a[j+1]){var s=t[f+x>>2],x=x+l.Aa("void*",r,q);t[s>>2]=d;j+=2}else{if("%"===a[j]){var y=a.indexOf("c",j+1);if(0<y){var A=1;y>j+1&&(m=a.substring(j+1,y),A=parseInt(m),A!=m&&(A=0));if(A){s=t[f+x>>2];x+=l.Aa("void*",r,q);g++;for(var F=0;F<A;F++)m=
-b(),v[s++|0]=m;j+=y-j+1;continue}}}if("%"===a[j]&&0<a.indexOf("[",j+1)&&(y=/\%([0-9]*)\[(\^)?(\]?[^\]]*)\]/.exec(a.substring(j)))){for(var A=parseInt(y[1])||Infinity,P="^"===y[2],E=y[3];m=/([^\-])\-([^\-])/.exec(E);){for(var s=m[1].charCodeAt(0),F=m[2].charCodeAt(0),C="";s<=F;C+=String.fromCharCode(s++));E=E.replace(m[1]+"-"+m[2],C)}s=t[f+x>>2];x+=l.Aa("void*",r,q);g++;for(F=0;F<A;F++)if(m=b(),P)if(0>E.indexOf(String.fromCharCode(m)))v[s++|0]=m;else{c();break}else if(0<=E.indexOf(String.fromCharCode(m)))v[s++|
-0]=m;else{c();break}v[s++|0]=0;j+=y[0].length;continue}for(;;){m=b();if(0==m)return g;if(!(m in Q.whiteSpace))break}c();if("%"===a[j]){j++;s=G;"*"==a[j]&&(s=q,j++);for(m=j;48<=a[j].charCodeAt(0)&&57>=a[j].charCodeAt(0);)j++;var n;j!=m&&(n=parseInt(a.slice(m,j),10));P=A=y=G;"l"==a[j]?(y=q,j++,"l"==a[j]&&(P=q,j++)):"h"==a[j]&&(A=q,j++);E=a[j];j++;F=0;C=[];if("f"==E||"e"==E||"g"==E||"F"==E||"E"==E||"G"==E){for(m=b();0<m&&!(m in Q.whiteSpace);)C.push(String.fromCharCode(m)),m=b();m=(m=Bb(C.join("")))?
-m[0].length:0;for(F=0;F<C.length-m+1;F++)c();C.length=m}else{m=b();var w=q;if(("x"==E||"X"==E)&&48==m){var u=b();120==u||88==u?m=b():c()}for(;(F<n||isNaN(n))&&0<m;)if(!(m in Q.whiteSpace)&&("s"==E||("d"===E||"u"==E||"i"==E)&&(48<=m&&57>=m||w&&45==m)||("x"===E||"X"===E)&&(48<=m&&57>=m||97<=m&&102>=m||65<=m&&70>=m))&&(j>=a.length||m!==a[j].charCodeAt(0)))C.push(String.fromCharCode(m)),m=b(),F++,w=G;else break;c()}if(0===C.length)return 0;if(!s){m=C.join("");s=t[f+x>>2];x+=l.Aa("void*",r,q);switch(E){case "d":case "u":case "i":A?
-ea[s>>1]=parseInt(m,10):P?(na=[parseInt(m,10)>>>0,(N=parseInt(m,10),1<=+ua(N)?0<N?(va(+Ia(N/4294967296),4294967295)|0)>>>0:~~+Ja((N-+(~~N>>>0))/4294967296)>>>0:0)],t[s>>2]=na[0],t[s+4>>2]=na[1]):t[s>>2]=parseInt(m,10);break;case "X":case "x":t[s>>2]=parseInt(m,16);break;case "F":case "f":case "E":case "e":case "G":case "g":case "E":y?oa[s>>3]=parseFloat(m):wa[s>>2]=parseFloat(m);break;case "s":m=V(m);for(F=0;F<m.length;F++)v[s+F|0]=m[F]}g++}}else{if(a[j].charCodeAt(0)in Q.whiteSpace){for(m=b();m in
-Q.whiteSpace;){if(0>=m)break a;m=b()}c(m)}else if(m=b(),a[j].charCodeAt(0)!==m){c(m);break a}j++}}return g}function Cb(a,b,c){return hb(a,p,b,c)}function Qa(){Qa.$||(Qa.$=D([0],"i8",ja));return Qa.$}function Ba(a,b,c){a=d.D(a);if(!a)return H(g.H),-1;try{return d.write(a,v,b,c)}catch(f){return d.sa(f),-1}}function Db(a,b,c,f){c*=b;if(0==c)return 0;a=Ba(f,a,c);if(-1==a){if(b=d.D(f))b.error=q;return 0}return Math.floor(a/b)}function Eb(a,b,c){c=gb(b,c);b=l.kd();a=Db(D(c,"i8",ib),1,c.length,a);l.jd(b);
-return a}function Fb(a,b,c){var f,d,e,h;if(0==a&&0==(a=pa(c,"i8*")))return 0;a:for(;;){d=pa(a++,"i8");for(f=b;0!=(e=pa(f++,"i8"));)if(d==e)continue a;break}if(0==d)return ta(c,0,"i8*"),0;for(h=a-1;;){d=pa(a++,"i8");f=b;do if((e=pa(f++,"i8"))==d)return 0==d?a=0:ta(a-1,0,"i8"),ta(c,a,"i8*"),h;while(0!=e)}aa("strtok_r error!")}function Gb(a){e.exit(a)}function Ca(a){var b,c;Ca.xc?(c=t[Hb>>2],b=t[c>>2]):(Ca.xc=q,U.USER="root",U.PATH="/",U.PWD="/",U.HOME="/home/emscripten",U.LANG="en_US.UTF-8",U._="./this.program",
-b=D(1024,"i8",S),c=D(256,"i8*",S),t[c>>2]=b,t[Hb>>2]=c);var f=[],d=0,e;for(e in a)if("string"===typeof a[e]){var h=e+"="+a[e];f.push(h);d+=h.length}1024<d&&k(Error("Environment size exceeded TOTAL_ENV_SIZE!"));for(a=0;a<f.length;a++)h=f[a],Ka(h,b),t[c+4*a>>2]=b,b+=h.length+1;t[c+4*f.length>>2]=0}function Da(a){if(0===a)return 0;a=R(a);if(!U.hasOwnProperty(a))return 0;Da.$&&Ib(Da.$);Da.$=D(V(U[a]),"i8",ja);return Da.$}function Jb(a,b,c){c=t[c>>2];a=R(a);try{return d.open(a,b,c).da}catch(f){return d.sa(f),
--1}}function Kb(a,b){var c,b=R(b);if("r"==b[0])c=-1!=b.indexOf("+")?2:0;else if("w"==b[0])c=-1!=b.indexOf("+")?2:1,c|=576;else if("a"==b[0])c=-1!=b.indexOf("+")?2:1,c|=64,c|=1024;else return H(g.B),0;c=Jb(a,c,D([511,0,0,0],"i32",ib));return-1==c?0:c}function Lb(a){a=d.D(a);if(!a)return H(g.H),-1;try{return d.close(a),0}catch(b){return d.sa(b),-1}}function Mb(a){if(d.D(a))return 0;H(g.H);return-1}function ra(a,b){var c=La(a&255);v[ra.$|0]=c;if(-1==Ba(b,ra.$,1)){if(c=d.D(b))c.error=q;return-1}return c}
-function Nb(a,b,c,f){c*=b;if(0==c)return 0;var e=0,i=d.D(f);if(!i)return H(g.H),0;for(;i.pd.length&&0<c;)v[a++|0]=i.pd.pop(),c--,e++;a=fb(f,a,c);if(-1==a)return i&&(i.error=q),0;e+=a;e<c&&(i.Ua=q);return Math.floor(e/b)}function Ea(a){var b=d.D(a);if(!b||b.Ua||b.error)return-1;a=Nb(Ea.$,1,1,a);return 0==a?-1:-1==a?(b.error=q,-1):T[Ea.$|0]}function Ob(a,b,c){a="string"!==typeof a?R(a):a;try{var f=c?d.Kf(a):d.ld(a);t[b>>2]=f.Cc;t[b+4>>2]=0;t[b+8>>2]=f.ac;t[b+12>>2]=f.mode;t[b+16>>2]=f.Wc;t[b+20>>2]=
-f.uid;t[b+24>>2]=f.Mc;t[b+28>>2]=f.Pa;t[b+32>>2]=0;t[b+36>>2]=f.size;t[b+40>>2]=4096;t[b+44>>2]=f.sb;t[b+48>>2]=Math.floor(f.wc.getTime()/1E3);t[b+52>>2]=0;t[b+56>>2]=Math.floor(f.Uc.getTime()/1E3);t[b+60>>2]=0;t[b+64>>2]=Math.floor(f.Ac.getTime()/1E3);t[b+68>>2]=0;t[b+72>>2]=f.ac;return 0}catch(e){return d.sa(e),-1}}function Pb(a,b,c){a=d.D(a);if(!a)return H(g.H),-1;try{return d.ga(a,b,c)}catch(f){return d.sa(f),-1}}function Qb(a,b){return Ba(b,a,Aa(a))}function Fa(a,b,c){var f=d.Ud(b||"/tmp");if(!f||
-!f.Pc)if(b="/tmp",f=d.Ud(b),!f||!f.Pc)return 0;c=c||"file";do c+=String.fromCharCode(65+Math.floor(25*Math.random()));while(c in f.u);b=b+"/"+c;Fa.buffer||(Fa.buffer=ia(256));a||(a=Fa.buffer);Ka(b,a);return a}function Ra(){Ra.mode&&(Ra.mode=D(V("w+"),"i8",ja));return Kb(Fa(0),Ra.mode)}function Rb(a){var b=Rb;b.xc||(Z=Z+4095&-4096,b.xc=q,J(l.Ub),b.We=l.Ub,l.Ub=function(){aa("cannot dynamically allocate, sbrk now has control")});var c=Z;0!=a&&b.We(a);return c}function jb(a){this.name="ExitStatus";this.message=
-"Program terminated with exit("+a+")";this.status=a}function kb(a){function b(){if(!e.calledRun){e.calledRun=q;Sa||(Sa=q,qa(ka));qa(lb);e._main&&mb&&e.callMain(a);if(e.postRun)for("function"==typeof e.postRun&&(e.postRun=[e.postRun]);e.postRun.length;)tb(e.postRun.shift());qa(ub)}}a=a||e.arguments;Ta===r&&(Ta=Date.now());if(0<fa)e.ab("run() called, but dependencies remain, so not running");else{if(e.preRun)for("function"==typeof e.preRun&&(e.preRun=[e.preRun]);e.preRun.length;)sb(e.preRun.shift());
-qa(cb);!(0<fa)&&!e.calledRun&&(e.setStatus?(e.setStatus("Running..."),setTimeout(function(){setTimeout(function(){e.setStatus("")},1);ba||b()},1)):b())}}function Sb(a){ba=q;X=Tb;qa(Ua);k(new jb(a))}function aa(a){a&&(e.print(a),e.ab(a));ba=q;k("abort() at "+bb())}"undefined"===typeof ab&&(ab="dot");var e={"return":"",print:function(a){e["return"]+=a+"\n"}},Va={},ga;for(ga in e)e.hasOwnProperty(ga)&&(Va[ga]=e[ga]);var ca="object"===typeof process&&"function"===typeof require,Wa="object"===typeof window,
-Xa="function"===typeof importScripts,gc=!Wa&&!ca&&!Xa;if(ca){e.print||(e.print=function(a){process.stdout.write(a+"\n")});e.printErr||(e.printErr=function(a){process.stderr.write(a+"\n")});var Ub=require("fs"),Vb=require("path");e.read=function(a,b){var a=Vb.normalize(a),c=Ub.readFileSync(a);!c&&a!=Vb.resolve(a)&&(a=path.join(__dirname,"..","src",a),c=Ub.readFileSync(a));c&&!b&&(c=c.toString());return c};e.readBinary=function(a){return e.read(a,q)};e.load=function(a){ob(read(a))};e.arguments=process.argv.slice(2);
-module.exports=e}else gc?(e.print||(e.print=print),"undefined"!=typeof printErr&&(e.printErr=printErr),e.read="undefined"!=typeof read?read:function(){k("no read() available (jsc?)")},e.readBinary=function(a){return read(a,"binary")},"undefined"!=typeof scriptArgs?e.arguments=scriptArgs:"undefined"!=typeof arguments&&(e.arguments=arguments),this.Module=e,eval("if (typeof gc === 'function' && gc.toString().indexOf('[native code]') > 0) var gc = undefined")):Wa||Xa?(e.read=function(a){var b=new XMLHttpRequest;
-b.open("GET",a,G);b.send(r);return b.responseText},"undefined"!=typeof arguments&&(e.arguments=arguments),"undefined"!==typeof console?(e.print||(e.print=function(a){console.log(a)}),e.printErr||(e.printErr=function(a){console.log(a)})):e.print||(e.print=M()),Wa?this.Module=e:e.load=importScripts):k("Unknown runtime environment. Where are we?");"undefined"==!e.load&&e.read&&(e.load=function(a){ob(e.read(a))});e.print||(e.print=M());e.printErr||(e.printErr=e.print);e.arguments||(e.arguments=[]);e.print=
-e.print;e.ab=e.printErr;e.preRun=[];e.postRun=[];for(ga in Va)Va.hasOwnProperty(ga)&&(e[ga]=Va[ga]);var l={kd:function(){return X},jd:function(a){X=a},Ii:function(a,b){b=b||4;return 1==b?a:isNumber(a)&&isNumber(b)?Math.ceil(a/b)*b:isNumber(b)&&isPowerOfTwo(b)?"((("+a+")+"+(b-1)+")&"+-b+")":"Math.ceil(("+a+")/"+b+")*"+b},Ff:function(a){return a in l.Re||a in l.Pe},Gf:function(a){return"*"==a[a.length-1]},If:function(a){return isPointerType(a)?G:isArrayType(a)||/<?{ ?[^}]* ?}>?/.test(a)?q:"%"==a[0]},
-Re:{i1:0,i8:0,i16:0,i32:0,i64:0},Pe:{"float":0,"double":0},cj:function(a,b){return(a|0|b|0)+4294967296*(Math.round(a/4294967296)|Math.round(b/4294967296))},ti:function(a,b){return((a|0)&(b|0))+4294967296*(Math.round(a/4294967296)&Math.round(b/4294967296))},Ij:function(a,b){return((a|0)^(b|0))+4294967296*(Math.round(a/4294967296)^Math.round(b/4294967296))},Lc:function(a){switch(a){case "i1":case "i8":return 1;case "i16":return 2;case "i32":return 4;case "i64":return 8;case "float":return 4;case "double":return 8;
-default:return"*"===a[a.length-1]?l.Fa:"i"===a[0]?(a=parseInt(a.substr(1)),J(0===a%8),a/8):0}},$d:function(a){return Math.max(l.Lc(a),l.Fa)},lf:function(a,b){var c={};return b?a.filter(function(a){return c[a[b]]?G:c[a[b]]=q}):a.filter(function(a){return c[a]?G:c[a]=q})},set:function(){for(var a="object"===typeof arguments[0]?arguments[0]:arguments,b={},c=0;c<a.length;c++)b[a[c]]=0;return b},fi:8,Aa:function(a,b,c){return c||!c&&("i64"==a||"double"==a)?8:!a?Math.min(b,8):Math.min(b||(a?l.$d(a):0),
-l.Fa)},Ye:function(a){a.ja=0;a.Ta=0;var b=[],c=-1,f=0;a.Xd=a.Gc.map(function(d){f++;var e,h;l.Ff(d)||l.Gf(d)?(e=l.Lc(d),h=l.Aa(d,e)):l.If(d)?"0"===d[1]?(e=0,h=Types.types[d]?l.Aa(r,Types.types[d].Ta):a.Ta||QUANTUM_SIZE):(e=Types.types[d].ja,h=l.Aa(r,Types.types[d].Ta)):"b"==d[0]?(e=d.substr(1)|0,h=1):"<"===d[0]?e=h=Types.types[d].ja:"i"===d[0]?(e=h=parseInt(d.substr(1))/8,J(0===e%1,"cannot handle non-byte-size field "+d)):J(G,"invalid type for calculateStructAlignment");a.dj&&(h=1);a.Ta=Math.max(a.Ta,
-h);d=l.qb(a.ja,h);a.ja=d+e;0<=c&&b.push(d-c);return c=d});a.ne&&"["===a.ne[0]&&(a.ja=parseInt(a.ne.substr(1))*a.ja/2);a.ja=l.qb(a.ja,a.Ta);0==b.length?a.Wd=a.ja:1==l.lf(b).length&&(a.Wd=b[0]);a.$i=1!=a.Wd;return a.Xd},sf:function(a,b,c){var f,d;if(b){c=c||0;f=("undefined"===typeof Types?l.zj:Types.types)[b];if(!f)return r;if(f.Gc.length!=a.length)return printErr("Number of named fields must match the type for "+b+": possibly duplicate struct names. Cannot return structInfo"),r;d=f.Xd}else f={Gc:a.map(function(a){return a[0]})},
-d=l.Ye(f);var e={ki:f.ja};b?a.forEach(function(a,b){if("string"===typeof a)e[a]=d[b]+c;else{var g,x;for(x in a)g=x;e[g]=l.sf(a[g],f.Gc[b],d[b])}}):a.forEach(function(a,b){e[a[1]]=d[b]});return e},Dc:function(a,b,c){return c&&c.length?(c.splice||(c=Array.prototype.slice.call(c)),c.splice(0,0,b),e["dynCall_"+a].apply(r,c)):e["dynCall_"+a].call(r,b)},Wb:[],mi:function(a){for(var b=0;b<l.Wb.length;b++)if(!l.Wb[b])return l.Wb[b]=a,2*(1+b);k("Finished up all reserved function pointers. Use a higher value for RESERVED_FUNCTION_POINTERS.")},
-lj:function(a){l.Wb[(a-2)/2]=r},Li:function(a,b){l.vc||(l.vc={});var c=l.vc[a];if(c)return c;for(var c=[],f=0;f<b;f++)c.push(String.fromCharCode(36)+f);a=R(a);'"'===a[0]&&(a.indexOf('"',1)===a.length-1?a=a.substr(1,a.length-2):aa("invalid EM_ASM input |"+a+"|. Please use EM_ASM(..code..) (no quotes) or EM_ASM({ ..code($0).. }, input) (to input values)"));return l.vc[a]=eval("(function("+c.join(",")+"){ "+a+" })")},Fb:function(a){l.Fb.fd||(l.Fb.fd={});l.Fb.fd[a]||(l.Fb.fd[a]=1,e.ab(a))},Ic:{},Mi:function(a,
-b){J(b);l.Ic[a]||(l.Ic[a]=function(){return l.Dc(b,a,arguments)});return l.Ic[a]},pb:function(){var a=[],b=0;this.ic=function(c){c&=255;if(0==a.length){if(0==(c&128))return String.fromCharCode(c);a.push(c);b=192==(c&224)?1:224==(c&240)?2:3;return""}if(b&&(a.push(c),b--,0<b))return"";var c=a[0],f=a[1],d=a[2],e=a[3];2==a.length?c=String.fromCharCode((c&31)<<6|f&63):3==a.length?c=String.fromCharCode((c&15)<<12|(f&63)<<6|d&63):(c=(c&7)<<18|(f&63)<<12|(d&63)<<6|e&63,c=String.fromCharCode(Math.floor((c-
-65536)/1024)+55296,(c-65536)%1024+56320));a.length=0;return c};this.re=function(a){for(var a=unescape(encodeURIComponent(a)),b=[],d=0;d<a.length;d++)b.push(a.charCodeAt(d));return b}},hd:function(a){var b=X;X=X+a|0;X=X+7&-8;return b},md:function(a){var b=la;la=la+a|0;la=la+7&-8;return b},Ub:function(a){var b=Z;Z=Z+a|0;Z=Z+7&-8;Z>=ha&&aa("Cannot enlarge memory arrays in asm.js. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+ha+", or (2) set Module.TOTAL_MEMORY before the program runs.");
-return b},qb:function(a,b){return Math.ceil(a/(b?b:8))*(b?b:8)},Mf:function(a,b,c){return c?+(a>>>0)+4294967296*+(b>>>0):+(a>>>0)+4294967296*+(b|0)},J:8,Fa:4,ji:0};e.Runtime=l;var ba=G,N,na;e.ccall=function(a,b,c,f){return qb(pb(a),b,c,f)};e.cwrap=function(a,b,c){var f=pb(a);return function(){return qb(f,b,c,Array.prototype.slice.call(arguments))}};e.setValue=ta;e.getValue=pa;var ja=0,ib=1,S=2,L=4;e.ALLOC_NORMAL=ja;e.ALLOC_STACK=ib;e.ALLOC_STATIC=S;e.ALLOC_DYNAMIC=3;e.ALLOC_NONE=L;e.allocate=D;e.Pointer_stringify=
-R;e.UTF16ToString=function(a){for(var b=0,c="";;){var f=ea[a+2*b>>1];if(0==f)return c;++b;c+=String.fromCharCode(f)}};e.stringToUTF16=function(a,b){for(var c=0;c<a.length;++c)ea[b+2*c>>1]=a.charCodeAt(c);ea[b+2*a.length>>1]=0};e.UTF32ToString=function(a){for(var b=0,c="";;){var f=t[a+4*b>>2];if(0==f)return c;++b;65536<=f?(f-=65536,c+=String.fromCharCode(55296|f>>10,56320|f&1023)):c+=String.fromCharCode(f)}};e.stringToUTF32=function(a,b){for(var c=0,f=0;f<a.length;++f){var d=a.charCodeAt(f);if(55296<=
-d&&57343>=d)var e=a.charCodeAt(++f),d=65536+((d&1023)<<10)|e&1023;t[b+4*c>>2]=d;++c}t[b+4*c>>2]=0};for(var v,T,ea,Wb,t,Ya,wa,oa,Xb=0,la=0,Zb=0,X=0,nb=0,$b=0,Z=0,hc=e.TOTAL_STACK||5242880,ha=e.TOTAL_MEMORY||16777216,da=4096;da<ha||da<2*hc;)da=16777216>da?2*da:da+16777216;da!==ha&&(e.ab("increasing TOTAL_MEMORY to "+da+" to be more reasonable"),ha=da);J("undefined"!==typeof Int32Array&&"undefined"!==typeof Float64Array&&!!(new Int32Array(1)).subarray&&!!(new Int32Array(1)).set,"Cannot fallback to non-typed array case: Code is too specialized");
-var $=new ArrayBuffer(ha);v=new Int8Array($);ea=new Int16Array($);t=new Int32Array($);T=new Uint8Array($);Wb=new Uint16Array($);Ya=new Uint32Array($);wa=new Float32Array($);oa=new Float64Array($);t[0]=255;J(255===T[0]&&0===T[3],"Typed arrays 2 must be run on a little-endian system");e.HEAP=p;e.HEAP8=v;e.HEAP16=ea;e.HEAP32=t;e.HEAPU8=T;e.HEAPU16=Wb;e.HEAPU32=Ya;e.HEAPF32=wa;e.HEAPF64=oa;var cb=[],ka=[],lb=[],Ua=[],ub=[],Sa=G;e.addOnPreRun=e.ri=sb;e.addOnInit=e.oi=function(a){ka.unshift(a)};e.addOnPreMain=
-e.qi=function(a){lb.unshift(a)};e.addOnExit=e.ni=function(a){Ua.unshift(a)};e.addOnPostRun=e.pi=tb;e.intArrayFromString=V;e.intArrayToString=function(a){for(var b=[],c=0;c<a.length;c++){var f=a[c];255<f&&(f&=255);b.push(String.fromCharCode(f))}return b.join("")};e.writeStringToMemory=function(a,b,c){a=V(a,c);for(c=0;c<a.length;)v[b+c|0]=a[c],c+=1};e.writeArrayToMemory=rb;e.writeAsciiToMemory=Ka;if(!Math.imul||-5!==Math.imul(4294967295,5))Math.imul=function(a,b){var c=a&65535,f=b&65535;return c*f+
-((a>>>16)*f+c*(b>>>16)<<16)|0};Math.Pi=Math.imul;var ua=Math.abs,ic=Math.cos,jc=Math.sin,kc=Math.tan,lc=Math.acos,mc=Math.asin,nc=Math.atan2,oc=Math.exp,ac=Math.sqrt,Ja=Math.ceil,Ia=Math.floor,pc=Math.pow,va=Math.min,fa=0,eb=r,xa=r;e.addRunDependency=db;e.removeRunDependency=Ma;e.preloadedImages={};e.preloadedAudios={};Xb=8;la=Xb+215424;ka.push({Ka:function(){qc()}});var ma;ma=ma=D([0,0,0,0,0,0,0,0],"i8",S);var Ga;Ga=Ga=D([0,0,0,0,0,0,0,0],"i8",S);var Ha;Ha=Ha=D([0,0,0,0,0,0,0,0],"i8",S);D([31,139,
-8,0,0,0,0,0,0,3,0,0,0,0,0,0,56,98,1,0,128,40,2,0,152,65,3,0,32,181,1,0,168,155,1,0,72,133,1,0,144,111,1,0,88,90,1,0,16,71,1,0,152,65,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38,0,0,0,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,38,0,0,0,0,0,0,0,54,0,0,0,36,0,0,0,6,0,0,0,72,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,128,169,2,0,144,169,2,0,160,169,2,0,176,169,2,0,192,169,2,0,208,169,2,0,224,169,2,0,240,169,2,0,144,169,2,0,144,169,2,0,208,169,2,0,208,169,2,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51,51,51,51,51,51,211,63,0,0,0,0,0,0,248,63,0,0,0,0,0,0,0,0,97,108,110,117,109,0,97,108,112,104,97,0,98,108,97,110,107,0,99,110,116,114,108,0,100,105,103,105,116,0,103,114,97,112,104,0,108,111,119,101,114,0,112,114,105,110,116,0,112,117,110,99,116,0,115,112,97,99,101,0,117,112,112,101,114,0,120,100,105,103,105,
-116,0,0,0,0,0,0,0,0,216,122,2,0,192,107,2,0,232,87,2,0,248,75,2,0,168,64,2,0,104,52,2,0,144,40,2,0,160,28,2,0,152,18,2,0,136,8,2,0,232,255,1,0,56,246,1,0,248,233,1,0,176,224,1,0,192,218,1,0,128,215,1,0,48,0,0,0,0,0,0,0,116,0,0,0,62,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,30,0,0,0,122,0,0,0,0,0,0,0,0,0,0,0,42,0,0,0,0,0,0,0,8,0,0,0,46,0,0,0,14,0,0,0,48,0,0,0,42,0,0,0,0,0,0,0,38,0,0,0,96,0,0,0,36,0,0,0,100,0,0,0,70,0,0,0,26,
-0,0,0,4,0,0,0,156,0,0,0,42,0,0,0,106,0,0,0,112,0,0,0,54,0,0,0,28,0,0,0,74,0,0,0,20,0,0,0,32,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,21,10,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,16,12,19,28,30,3,13,31,32,33,34,35,27,26,17,25,25,25,25,25,25,25,25,25,25,22,18,2,14,11,15,28,24,24,24,24,24,24,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,20,28,4,28,22,28,24,24,24,24,24,24,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,28,36,28,28,28,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,
-8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,0,0,0,0,0,0,0,0,0,1,1,188,0,0,0,186,0,0,0,84,0,0,0,12,0,0,0,14,0,0,0,84,0,0,0,70,0,0,0,72,0,0,0,74,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100,0,0,0,52,0,0,0,116,0,0,0,88,132,1,0,110,0,0,0,224,59,2,0,114,0,0,0,176,217,1,0,102,0,0,0,208,189,1,0,97,0,0,0,216,162,1,0,101,0,0,0,112,140,1,0,119,0,0,0,
-224,118,1,0,87,0,0,0,96,98,1,0,115,0,0,0,224,77,1,0,83,0,0,0,192,59,1,0,100,0,0,0,144,140,2,0,68,0,0,0,64,124,2,0,0,0,0,0,0,0,0,0,104,0,0,0,0,0,0,0,126,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,136,0,0,0,0,0,0,0,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,124,0,0,0,0,0,0,0,60,0,0,0,38,0,0,0,8,0,0,0,16,0,0,0,36,0,0,0,0,0,0,0,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,
-0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,
-208,63,88,168,53,205,59,78,213,63,37,117,2,154,8,27,218,63,0,0,0,0,0,0,224,63,0,0,0,0,0,0,224,63,44,212,154,230,29,167,234,63,106,222,113,138,142,228,232,63,88,168,53,205,59,78,213,63,88,168,53,205,59,78,213,63,88,168,53,205,59,78,213,63,0,0,0,0,0,0,224,63,93,220,70,3,120,11,226,63,0,0,0,0,0,0,208,63,88,168,53,205,59,78,213,63,0,0,0,0,0,0,208,63,211,188,227,20,29,201,209,63,0,0,0,0,0,0,224,63,0,0,0,0,0,0,224,63,0,0,0,0,0,0,224,63,0,0,0,0,0,0,224,63,0,0,0,0,0,0,224,63,0,0,0,0,0,0,224,63,0,0,0,0,0,
-0,224,63,0,0,0,0,0,0,224,63,0,0,0,0,0,0,224,63,0,0,0,0,0,0,224,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,93,220,70,3,120,11,226,63,93,220,70,3,120,11,226,63,93,220,70,3,120,11,226,63,13,113,172,139,219,104,220,63,100,93,220,70,3,120,237,63,210,111,95,7,206,25,231,63,16,122,54,171,62,87,229,63,16,122,54,171,62,87,229,63,210,111,95,7,206,25,231,63,120,11,36,40,126,140,227,63,181,21,251,203,238,201,225,63,210,111,95,7,206,25,231,63,210,111,95,7,206,25,231,63,88,168,53,205,59,78,213,
-63,136,133,90,211,188,227,216,63,210,111,95,7,206,25,231,63,120,11,36,40,126,140,227,63,196,66,173,105,222,113,236,63,210,111,95,7,206,25,231,63,210,111,95,7,206,25,231,63,181,21,251,203,238,201,225,63,210,111,95,7,206,25,231,63,16,122,54,171,62,87,229,63,181,21,251,203,238,201,225,63,120,11,36,40,126,140,227,63,210,111,95,7,206,25,231,63,210,111,95,7,206,25,231,63,134,56,214,197,109,52,238,63,210,111,95,7,206,25,231,63,210,111,95,7,206,25,231,63,120,11,36,40,126,140,227,63,88,168,53,205,59,78,213,
-63,211,188,227,20,29,201,209,63,88,168,53,205,59,78,213,63,166,10,70,37,117,2,222,63,0,0,0,0,0,0,224,63,88,168,53,205,59,78,213,63,13,113,172,139,219,104,220,63,0,0,0,0,0,0,224,63,13,113,172,139,219,104,220,63,0,0,0,0,0,0,224,63,13,113,172,139,219,104,220,63,88,168,53,205,59,78,213,63,0,0,0,0,0,0,224,63,0,0,0,0,0,0,224,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,0,0,0,0,0,0,224,63,211,188,227,20,29,201,209,63,106,222,113,138,142,228,232,63,0,0,0,0,0,0,224,63,0,0,0,0,0,0,224,63,0,
-0,0,0,0,0,224,63,0,0,0,0,0,0,224,63,88,168,53,205,59,78,213,63,136,133,90,211,188,227,216,63,211,188,227,20,29,201,209,63,0,0,0,0,0,0,224,63,0,0,0,0,0,0,224,63,210,111,95,7,206,25,231,63,0,0,0,0,0,0,224,63,0,0,0,0,0,0,224,63,13,113,172,139,219,104,220,63,244,108,86,125,174,182,222,63,17,54,60,189,82,150,201,63,244,108,86,125,174,182,222,63,59,1,77,132,13,79,225,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,
-0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,
-0,208,63,88,168,53,205,59,78,213,63,0,0,0,0,0,0,224,63,0,0,0,0,0,0,224,63,62,232,217,172,250,92,197,63,0,0,0,0,0,0,224,63,0,0,0,0,0,0,224,63,0,0,0,0,0,0,224,63,0,0,0,0,0,0,224,63,130,115,70,148,246,6,199,63,13,113,172,139,219,104,220,63,0,0,0,0,0,0,224,63,88,168,53,205,59,78,213,63,88,168,53,205,59,78,213,63,181,21,251,203,238,201,225,63,181,21,251,203,238,201,225,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,224,63,0,0,0,0,0,0,224,63,0,0,0,0,0,0,224,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,7,240,22,72,80,252,
-220,63,162,180,55,248,194,100,214,63,88,168,53,205,59,78,213,63,13,113,172,139,219,104,220,63,13,113,172,139,219,104,220,63,0,0,0,0,0,0,224,63,0,0,0,0,0,0,240,63,0,0,0,0,0,0,240,63,0,0,0,0,0,0,208,63,13,113,172,139,219,104,220,63,0,0,0,0,0,0,208,63,88,168,53,205,59,78,213,63,88,168,53,205,59,78,213,63,88,168,53,205,59,78,213,63,88,168,53,205,59,78,213,63,88,168,53,205,59,78,213,63,88,168,53,205,59,78,213,63,88,168,53,205,59,78,213,63,88,168,53,205,59,78,213,63,0,0,0,0,0,0,208,63,88,168,53,205,59,
-78,213,63,88,168,53,205,59,78,213,63,0,0,0,0,0,0,208,63,88,168,53,205,59,78,213,63,88,168,53,205,59,78,213,63,88,168,53,205,59,78,213,63,0,0,0,0,0,0,240,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,196,66,173,105,222,113,236,63,0,0,0,0,0,0,
-208,63,127,217,61,121,88,168,209,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,120,11,36,40,126,140,227,63,210,111,95,7,206,25,231,63,196,66,173,105,222,113,236,63,19,242,65,207,102,213,211,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,16,122,54,171,62,87,229,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,211,188,227,20,29,201,209,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,211,188,227,20,29,201,209,63,
-0,0,0,0,0,0,224,63,210,111,95,7,206,25,231,63,0,0,0,0,0,0,224,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,0,0,0,0,0,0,208,63,72,210,1,0,64,0,0,0,144,164,1,0,144,0,0,0,232,161,1,0,76,0,0,0,72,66,1,0,174,0,0,0,56,160,1,0,196,0,0,0,128,158,1,0,10,0,0,0,96,188,1,0,102,0,0,0,16,64,1,0,92,0,0,0,248,154,1,0,130,0,0,0,88,153,1,0,190,0,0,0,104,151,1,0,78,0,0,0,8,149,1,0,36,0,0,0,128,146,1,0,116,0,0,0,208,142,1,0,54,0,0,0,72,61,1,0,158,0,0,0,80,138,1,0,32,0,0,0,136,136,1,0,38,0,0,0,120,134,
-1,0,58,0,0,0,208,132,1,0,58,0,0,0,80,131,1,0,128,0,0,0,152,129,1,0,136,0,0,0,18,17,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,17,34,35,36,17,37,38,39,40,41,42,43,44,17,45,46,47,16,16,48,16,16,16,16,16,16,16,49,50,51,16,52,53,16,16,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,54,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,
-17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,55,17,17,17,17,56,17,57,58,59,60,61,62,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,63,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,64,65,17,66,67,68,69,70,71,72,73,16,16,16,74,75,76,77,78,16,16,16,79,80,16,16,16,16,81,16,16,16,16,16,16,16,16,16,17,17,17,82,83,16,16,16,16,16,16,16,16,16,16,16,17,17,17,17,84,
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,17,17,85,16,16,16,16,86,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,87,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,88,89,90,91,16,16,16,16,
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,92,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,254,255,255,7,254,255,255,7,0,0,0,0,0,4,32,4,255,255,127,255,255,255,127,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,195,255,3,0,
-31,80,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,0,223,60,64,215,255,255,251,255,255,255,255,255,255,255,255,255,191,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,3,252,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,254,255,255,255,127,2,254,255,255,255,255,0,0,0,0,0,255,191,182,0,255,255,255,7,7,0,0,0,255,7,255,255,255,255,255,255,255,254,255,195,255,255,255,255,255,255,255,255,255,255,255,255,239,31,254,225,255,159,0,0,255,255,255,255,255,255,0,224,255,255,
-255,255,255,255,255,255,255,255,255,255,3,0,255,255,255,255,255,7,48,4,255,255,255,252,255,31,0,0,255,255,255,1,0,0,0,0,0,0,0,0,253,31,0,0,0,0,0,0,240,3,255,127,255,255,255,255,255,255,255,239,255,223,225,255,207,255,254,254,238,159,249,255,255,253,197,227,159,89,128,176,207,255,3,0,238,135,249,255,255,253,109,195,135,25,2,94,192,255,63,0,238,191,251,255,255,253,237,227,191,27,1,0,207,255,0,0,238,159,249,255,255,253,237,227,159,25,192,176,207,255,2,0,236,199,61,214,24,199,255,195,199,29,129,0,192,
-255,0,0,238,223,253,255,255,253,239,227,223,29,96,3,207,255,0,0,236,223,253,255,255,253,239,227,223,29,96,64,207,255,6,0,236,223,253,255,255,255,255,231,223,93,128,0,207,255,0,252,236,255,127,252,255,255,251,47,127,128,95,255,0,0,12,0,254,255,255,255,255,127,255,7,63,32,255,3,0,0,0,0,150,37,240,254,174,236,255,59,95,32,255,243,0,0,0,0,1,0,0,0,255,3,0,0,255,254,255,255,255,31,254,255,3,255,255,254,255,255,255,31,0,0,0,0,0,0,0,0,255,255,255,255,255,255,127,249,255,3,255,255,231,193,255,255,127,64,255,
-51,255,255,255,255,191,32,255,255,255,255,255,247,255,255,255,255,255,255,255,255,255,61,127,61,255,255,255,255,255,61,255,255,255,255,61,127,61,255,127,255,255,255,255,255,255,255,61,255,255,255,255,255,255,255,255,135,0,0,0,0,255,255,0,0,255,255,255,255,255,255,255,255,255,255,31,0,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,159,255,255,254,255,255,7,255,255,255,
-255,255,255,255,255,255,199,1,0,255,223,15,0,255,255,15,0,255,255,15,0,255,223,13,0,255,255,255,255,255,255,207,255,255,1,128,16,255,3,0,0,0,0,255,3,255,255,255,255,255,255,255,255,255,255,255,0,255,255,255,255,255,7,255,255,255,255,255,255,255,255,63,0,255,255,255,31,255,15,255,1,192,255,255,255,255,63,31,0,255,255,255,255,255,15,255,255,255,3,255,3,0,0,0,0,255,255,255,15,255,255,255,255,255,255,255,127,254,255,31,0,255,3,255,3,128,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,239,255,239,15,255,
-3,0,0,0,0,255,255,255,255,255,243,255,255,255,255,255,255,191,255,3,0,255,255,255,255,255,255,63,0,255,227,255,255,255,255,255,63,0,0,0,0,0,0,0,0,0,0,0,0,0,222,111,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,255,255,63,63,255,255,255,255,63,63,255,170,255,255,255,63,255,255,255,255,255,255,223,95,220,31,207,15,255,31,220,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,128,0,0,255,31,0,0,0,0,0,0,0,0,0,0,0,0,132,252,47,62,80,189,255,243,224,67,
-0,0,255,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,255,255,255,255,255,255,3,0,0,255,255,255,255,255,127,255,255,255,255,255,127,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,31,120,12,0,255,255,255,255,191,32,255,255,255,255,255,255,255,128,0,0,255,255,127,0,127,127,127,127,127,127,127,127,255,255,255,255,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,0,0,0,254,3,62,31,254,255,255,255,255,255,255,255,255,
-255,127,224,254,255,255,255,255,255,255,255,255,255,255,247,224,255,255,255,255,63,254,255,255,255,255,255,255,255,255,255,255,127,0,0,255,255,255,7,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,31,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,31,0,0,0,0,0,0,0,0,255,255,255,255,255,63,
-255,31,255,255,255,15,0,0,255,255,255,255,255,127,240,143,255,255,255,128,255,255,255,255,255,255,255,255,255,255,0,0,0,0,128,255,252,255,255,255,255,255,255,255,255,255,255,255,255,121,15,0,255,7,0,0,0,0,0,0,0,0,0,255,187,247,255,255,255,0,0,0,255,255,255,255,255,255,15,0,255,255,255,255,255,255,255,255,15,0,255,3,0,0,252,8,255,255,255,255,255,7,255,255,255,255,7,0,255,255,255,31,255,255,255,255,255,255,247,255,0,128,255,3,0,0,0,0,255,255,255,255,255,255,127,0,255,63,255,3,255,255,127,4,255,255,
-255,255,255,255,255,127,5,0,0,56,255,255,60,0,126,126,126,0,127,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,7,255,3,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,15,0,255,255,127,248,255,255,255,255,255,15,255,255,255,255,255,255,255,255,255,255,255,255,255,63,255,255,255,255,255,255,255,255,255,255,255,255,255,3,0,0,0,0,127,0,248,224,255,253,127,95,219,255,255,255,255,255,255,255,255,255,255,255,255,255,3,0,0,0,248,255,255,255,255,255,255,255,255,
-255,255,255,255,63,0,0,255,255,255,255,255,255,255,255,252,255,255,255,255,255,255,0,0,0,0,0,255,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,223,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,31,0,0,255,3,254,255,255,7,254,255,255,7,192,255,255,255,255,255,255,255,255,255,255,127,252,252,252,28,0,0,0,0,255,239,255,255,127,255,255,183,255,63,255,63,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,7,0,0,0,0,0,0,0,0,255,255,255,255,255,255,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,31,255,255,255,255,255,255,1,0,0,0,0,0,255,255,255,127,0,0,255,255,255,7,0,0,0,0,0,0,255,255,255,63,255,255,255,255,15,255,62,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,255,3,0,0,0,0,0,0,0,0,0,0,63,253,255,255,255,255,191,145,255,255,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,63,0,255,255,255,3,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,192,0,0,0,0,0,0,0,0,111,240,239,254,255,255,15,0,0,0,0,0,255,
-255,255,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,63,0,255,255,63,0,255,255,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,63,0,0,0,192,255,0,0,252,255,255,255,255,255,255,1,0,0,255,255,255,1,255,3,255,255,255,255,255,255,199,255,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,30,0,255,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,63,0,255,3,0,0,0,0,0,0,255,255,
-255,255,255,255,255,255,255,255,255,255,255,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,31,0,255,255,255,255,255,127,0,0,248,255,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,
-255,255,255,255,255,255,223,255,255,255,255,255,255,255,255,223,100,222,255,235,239,255,255,255,255,255,255,255,191,231,223,223,255,255,255,123,95,252,253,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,255,255,255,253,255,255,247,255,255,255,247,255,255,223,255,255,255,223,255,255,127,255,255,255,127,255,255,255,253,255,255,255,253,255,255,247,207,255,255,255,255,255,255,239,255,
-255,255,150,254,247,10,132,234,150,170,150,247,247,94,255,251,255,15,238,251,255,15,0,0,0,0,0,0,0,0,18,16,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,16,16,34,35,16,36,37,38,39,40,41,42,43,16,44,45,46,17,47,48,17,17,49,17,17,17,50,51,52,53,54,55,56,57,17,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,58,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,59,16,60,61,62,63,64,65,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,66,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,67,16,16,68,16,69,70,71,16,72,16,73,16,16,16,16,74,75,76,77,16,16,78,16,79,80,16,16,16,16,81,16,16,16,16,16,16,16,16,16,16,16,16,16,82,16,16,16,16,16,16,16,16,
-16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,83,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,84,85,86,87,
-16,16,88,89,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,90,16,91,92,93,94,95,96,97,98,16,16,16,16,16,16,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,254,255,0,252,1,0,0,248,1,0,0,120,0,0,0,0,255,251,223,251,0,0,128,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,60,0,252,255,224,175,255,255,255,255,255,255,
-255,255,255,255,223,255,255,255,255,255,32,64,176,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252,0,0,0,0,0,134,254,255,255,255,0,64,73,0,0,0,0,0,24,0,223,255,0,200,0,0,0,0,0,0,0,1,0,60,0,0,0,0,0,0,0,0,0,0,0,0,16,224,1,30,0,96,255,191,0,0,0,0,0,0,255,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,248,207,3,0,0,0,3,0,32,255,127,0,0,0,78,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252,0,0,0,0,0,0,0,0,0,16,0,32,30,0,48,0,1,0,0,0,0,0,0,0,0,16,
-0,32,0,0,0,0,252,15,0,0,0,0,0,0,0,16,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,32,0,0,0,0,3,0,0,0,0,0,0,0,0,16,0,32,0,0,0,0,253,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,255,7,0,0,0,0,0,0,0,0,0,32,0,0,0,0,0,255,0,0,0,0,0,0,0,16,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,0,0,0,0,63,2,0,0,0,0,0,0,0,0,0,4,0,0,0,0,16,0,0,0,0,0,0,128,0,128,192,223,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,31,0,0,0,0,0,0,254,255,255,255,0,252,255,255,0,0,0,0,0,0,0,0,252,0,0,0,0,0,0,192,255,223,255,7,0,0,0,0,0,0,0,0,0,0,128,6,0,252,0,0,24,62,0,0,128,191,
-0,204,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,96,255,255,255,31,0,0,255,3,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,0,0,1,0,0,24,0,0,0,0,0,0,0,0,0,56,0,0,0,0,16,0,0,0,112,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,0,0,254,127,47,0,0,255,3,255,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,196,255,255,255,255,0,0,0,192,0,0,0,0,0,0,0,0,1,0,224,159,0,0,0,0,127,
-63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,16,0,0,252,255,255,255,31,0,0,0,0,0,12,0,0,0,0,0,0,64,0,12,240,0,0,0,0,0,0,192,248,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,255,0,255,255,255,33,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,127,0,0,240,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,160,3,224,0,224,0,224,0,96,128,248,255,255,255,252,255,255,255,255,255,127,31,252,241,127,255,127,0,0,255,255,255,3,0,0,255,255,255,255,1,0,123,3,208,193,175,66,0,12,31,188,255,255,0,0,0,0,0,2,255,
-255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,15,0,255,255,255,255,127,0,0,0,255,7,0,0,255,255,255,255,255,255,255,255,255,255,63,0,0,0,0,0,0,252,255,255,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,31,255,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,224,135,3,254,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,127,255,15,0,0,0,0,0,0,0,0,255,255,255,251,255,255,255,255,255,255,255,255,255,255,15,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,0,0,0,255,15,30,255,255,255,1,252,193,224,0,0,0,0,0,0,0,0,0,0,0,30,1,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,0,0,0,0,255,255,255,255,
-15,0,0,0,255,255,255,127,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,127,0,0,0,0,0,0,192,0,224,0,0,0,0,0,0,0,0,0,0,0,128,15,112,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,0,255,255,127,0,3,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,68,8,0,0,0,15,255,3,0,0,0,0,0,0,240,0,0,0,0,0,0,0,0,0,16,192,
-0,0,255,255,3,7,0,0,0,0,0,248,0,0,0,0,8,128,0,0,0,0,0,0,0,0,0,0,8,0,255,63,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,0,0,128,11,0,0,0,0,0,0,0,128,2,0,0,192,0,0,67,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,252,255,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,255,255,
-255,3,127,0,255,255,255,255,247,255,127,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,254,255,0,252,1,0,0,248,1,0,0,248,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,127,127,0,48,135,255,255,255,255,255,143,255,0,0,0,0,0,0,224,255,255,7,255,15,0,0,0,0,0,0,255,255,255,255,255,63,0,0,0,0,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,143,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,135,255,0,255,1,0,0,0,
-224,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,254,0,0,0,255,0,0,0,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,127,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,63,252,255,63,0,0,0,3,0,0,0,0,0,0,254,3,0,0,0,0,0,0,0,0,0,0,0,0,0,24,0,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,225,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,7,0,0,0,0,0,
-0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,0,255,255,255,255,127,254,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,0,0,0,0,255,255,255,255,255,255,255,255,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,127,0,255,255,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,8,0,0,0,8,0,0,32,
-0,0,0,32,0,0,128,0,0,0,128,0,0,0,2,0,0,0,2,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,255,255,255,255,255,15,255,255,255,255,255,255,255,255,255,255,255,255,15,0,255,127,254,127,254,255,254,255,0,0,0,0,255,7,255,255,255,127,255,255,255,255,255,255,255,15,255,255,255,255,255,7,0,0,0,0,0,0,0,0,192,255,255,255,7,0,255,255,255,255,255,7,255,1,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,1,0,191,255,255,255,255,255,255,255,255,31,255,255,15,0,255,
-255,255,255,223,7,0,0,255,255,1,0,255,255,255,255,255,255,255,127,253,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,30,255,255,255,255,255,255,255,63,15,0,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,248,255,255,255,255,255,255,255,255,225,255,0,0,0,0,0,0,255,255,255,255,255,255,255,255,63,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,1,0,0,0,2,
-0,0,0,4,0,0,0,0,0,0,0,80,197,1,0,248,168,1,0,160,146,1,0,200,124,1,0,72,103,1,0,168,82,1,0,32,64,1,0,232,144,2,0,160,128,2,0,128,112,2,0,48,93,2,0,224,79,2,0,168,68,2,0,32,56,2,0,144,44,2,0,160,32,2,0,96,22,2,0,248,10,2,0,0,3,2,0,64,250,1,0,96,237,1,0,152,227,1,0,248,219,1,0,240,216,1,0,168,213,1,0,136,210,1,0,200,207,1,0,64,204,1,0,176,200,1,0,32,197,1,0,240,191,1,0,168,188,1,0,104,186,1,0,96,184,1,0,152,182,1,0,16,180,1,0,136,177,1,0,200,174,1,0,216,171,1,0,152,168,1,0,168,164,1,0,32,162,1,0,88,
-160,1,0,192,158,1,0,176,156,1,0,24,155,1,0,152,153,1,0,160,151,1,0,32,149,1,0,136,146,1,0,216,142,1,0,240,139,1,0,88,138,1,0,144,136,1,0,128,134,1,0,216,132,1,0,88,131,1,0,160,129,1,0,88,127,1,0,168,124,1,0,88,120,1,0,64,118,1,0,32,116,1,0,160,114,1,0,192,112,1,0,56,111,1,0,88,109,1,0,128,107,1,0,176,105,1,0,40,103,1,0,216,99,1,0,216,97,1,0,144,95,1,0,96,93,1,0,224,91,1,0,16,90,1,0,72,88,1,0,152,86,1,0,152,84,1,0,128,82,1,0,32,79,1,0,72,77,1,0,136,75,1,0,24,74,1,0,88,72,1,0,208,70,1,0,56,69,1,0,152,
-67,1,0,24,66,1,0,224,63,1,0,24,61,1,0,0,59,1,0,40,57,1,0,200,55,1,0,64,54,1,0,8,53,1,0,240,51,1,0,136,147,2,0,0,146,2,0,168,144,2,0,184,141,2,0,24,140,2,0,88,138,2,0,0,137,2,0,120,135,2,0,64,134,2,0,232,132,2,0,120,131,2,0,200,129,2,0,80,128,2,0,64,125,2,0,168,123,2,0,72,122,2,0,240,120,2,0,152,119,2,0,56,118,2,0,248,116,2,0,200,115,2,0,80,114,2,0,96,112,2,0,120,109,2,0,56,108,2,0,248,106,2,0,232,105,2,0,136,104,2,0,88,102,2,0,240,100,2,0,168,99,2,0,216,94,2,0,232,92,2,0,48,90,2,0,184,88,2,0,104,
-87,2,0,96,86,2,0,64,85,2,0,64,84,2,0,56,83,2,0,56,82,2,0,216,80,2,0,208,79,2,0,176,77,2,0,128,76,2,0,128,75,2,0,168,74,2,0,168,73,2,0,216,72,2,0,232,71,2,0,0,0,0,0,8,0,0,0,0,0,0,0,160,0,0,0,170,0,0,0,32,0,0,0,58,0,0,0,70,0,0,0,12,0,0,0,34,0,0,0,36],"i8",L,l.J);D([64,0,0,0,174,0,0,0,66,0,0,0,140,0,0,0,34,0,0,0,178,0,0,0,0,0,0,0,0,0,0,0,106,0,0,0,0,0,0,0,62,0,0,0,44,0,0,0,12,0,0,0,66,0,0,0,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,104,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,
-0,0,255,255,255,255,0,0,0,0,0,0,0,0,82,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,105,108,108,45,99,111,110,100,105,116,105,111,110,101,100,0,12,0,8,0,140,0,8,0,76,0,8,0,204,0,8,0,44,0,8,0,172,0,8,0,108,0,8,0,236,0,8,0,28,0,8,0,156,0,8,0,92,0,8,0,220,0,8,0,60,0,8,0,188,0,8,0,124,0,8,0,252,0,8,0,2,0,8,0,130,0,8,0,66,0,8,0,194,0,8,0,34,0,8,0,162,0,8,0,98,0,8,0,226,0,8,0,18,0,8,0,146,0,8,0,82,0,8,0,210,0,8,0,50,0,8,0,178,0,8,0,114,0,8,0,242,0,8,0,10,0,8,0,138,0,8,0,74,0,8,0,202,0,8,0,42,0,8,0,170,
-0,8,0,106,0,8,0,234,0,8,0,26,0,8,0,154,0,8,0,90,0,8,0,218,0,8,0,58,0,8,0,186,0,8,0,122,0,8,0,250,0,8,0,6,0,8,0,134,0,8,0,70,0,8,0,198,0,8,0,38,0,8,0,166,0,8,0,102,0,8,0,230,0,8,0,22,0,8,0,150,0,8,0,86,0,8,0,214,0,8,0,54,0,8,0,182,0,8,0,118,0,8,0,246,0,8,0,14,0,8,0,142,0,8,0,78,0,8,0,206,0,8,0,46,0,8,0,174,0,8,0,110,0,8,0,238,0,8,0,30,0,8,0,158,0,8,0,94,0,8,0,222,0,8,0,62,0,8,0,190,0,8,0,126,0,8,0,254,0,8,0,1,0,8,0,129,0,8,0,65,0,8,0,193,0,8,0,33,0,8,0,161,0,8,0,97,0,8,0,225,0,8,0,17,0,8,0,145,0,8,
-0,81,0,8,0,209,0,8,0,49,0,8,0,177,0,8,0,113,0,8,0,241,0,8,0,9,0,8,0,137,0,8,0,73,0,8,0,201,0,8,0,41,0,8,0,169,0,8,0,105,0,8,0,233,0,8,0,25,0,8,0,153,0,8,0,89,0,8,0,217,0,8,0,57,0,8,0,185,0,8,0,121,0,8,0,249,0,8,0,5,0,8,0,133,0,8,0,69,0,8,0,197,0,8,0,37,0,8,0,165,0,8,0,101,0,8,0,229,0,8,0,21,0,8,0,149,0,8,0,85,0,8,0,213,0,8,0,53,0,8,0,181,0,8,0,117,0,8,0,245,0,8,0,13,0,8,0,141,0,8,0,77,0,8,0,205,0,8,0,45,0,8,0,173,0,8,0,109,0,8,0,237,0,8,0,29,0,8,0,157,0,8,0,93,0,8,0,221,0,8,0,61,0,8,0,189,0,8,0,125,
-0,8,0,253,0,8,0,19,0,9,0,19,1,9,0,147,0,9,0,147,1,9,0,83,0,9,0,83,1,9,0,211,0,9,0,211,1,9,0,51,0,9,0,51,1,9,0,179,0,9,0,179,1,9,0,115,0,9,0,115,1,9,0,243,0,9,0,243,1,9,0,11,0,9,0,11,1,9,0,139,0,9,0,139,1,9,0,75,0,9,0,75,1,9,0,203,0,9,0,203,1,9,0,43,0,9,0,43,1,9,0,171,0,9,0,171,1,9,0,107,0,9,0,107,1,9,0,235,0,9,0,235,1,9,0,27,0,9,0,27,1,9,0,155,0,9,0,155,1,9,0,91,0,9,0,91,1,9,0,219,0,9,0,219,1,9,0,59,0,9,0,59,1,9,0,187,0,9,0,187,1,9,0,123,0,9,0,123,1,9,0,251,0,9,0,251,1,9,0,7,0,9,0,7,1,9,0,135,0,9,
-0,135,1,9,0,71,0,9,0,71,1,9,0,199,0,9,0,199,1,9,0,39,0,9,0,39,1,9,0,167,0,9,0,167,1,9,0,103,0,9,0,103,1,9,0,231,0,9,0,231,1,9,0,23,0,9,0,23,1,9,0,151,0,9,0,151,1,9,0,87,0,9,0,87,1,9,0,215,0,9,0,215,1,9,0,55,0,9,0,55,1,9,0,183,0,9,0,183,1,9,0,119,0,9,0,119,1,9,0,247,0,9,0,247,1,9,0,15,0,9,0,15,1,9,0,143,0,9,0,143,1,9,0,79,0,9,0,79,1,9,0,207,0,9,0,207,1,9,0,47,0,9,0,47,1,9,0,175,0,9,0,175,1,9,0,111,0,9,0,111,1,9,0,239,0,9,0,239,1,9,0,31,0,9,0,31,1,9,0,159,0,9,0,159,1,9,0,95,0,9,0,95,1,9,0,223,0,9,0,
-223,1,9,0,63,0,9,0,63,1,9,0,191,0,9,0,191,1,9,0,127,0,9,0,127,1,9,0,255,0,9,0,255,1,9,0,0,0,7,0,64,0,7,0,32,0,7,0,96,0,7,0,16,0,7,0,80,0,7,0,48,0,7,0,112,0,7,0,8,0,7,0,72,0,7,0,40,0,7,0,104,0,7,0,24,0,7,0,88,0,7,0,56,0,7,0,120,0,7,0,4,0,7,0,68,0,7,0,36,0,7,0,100,0,7,0,20,0,7,0,84,0,7,0,52,0,7,0,116,0,7,0,3,0,8,0,131,0,8,0,67,0,8,0,195,0,8,0,35,0,8,0,163,0,8,0,99,0,8,0,227,0,8,0,184,40,0,0,88,102,0,0,1,1,0,0,30,1,0,0,15,0,0,0,0,0,0,0,0,0,5,0,16,0,5,0,8,0,5,0,24,0,5,0,4,0,5,0,20,0,5,0,12,0,5,0,28,0,
-5,0,2,0,5,0,18,0,5,0,10,0,5,0,26,0,5,0,6,0,5,0,22,0,5,0,14,0,5,0,30,0,5,0,1,0,5,0,17,0,5,0,9,0,5,0,25,0,5,0,5,0,5,0,21,0,5,0,13,0,5,0,29,0,5,0,3,0,5,0,19,0,5,0,11,0,5,0,27,0,5,0,7,0,5,0,23,0,5,0,80,45,0,0,208,102,0,0,0,0,0,0,30,0,0,0,15,0,0,0,0,0,0,0,0,0,0,0,72,103,0,0,0,0,0,0,19,0,0,0,7,0,0,0,0,0,0,0,46,0,0,0,6,0,0,0,80,0,0,0,18,0,0,0,34,0,0,0,82,0,0,0,22,0,0,0,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,28,0,0,0,42,0,0,0,0,0,0,0,0,0,0,0,52,0,0,0,46,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,32,193,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,176,193,0,0,0,0,0,0,0,0,0,0,0,0,0,160,1,0,0,16,0,0,0,1,0,0,0,0,0,0,0,0,16,0,2,0,0,0,0,0,0,0,0,0,0,16,64,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,176,193,0,0,0,0,0,0,0,0,0,0,0,16,64,144,37,0,0,147,0,0,0,1,0,0,0,0,0,0,0,0,32,3,2,0,0,0,0,0,0,0,0,0,0,16,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,16,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,144,195,0,0,0,0,0,0,0,0,0,0,0,16,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,16,0,0,0,0,0,0,0,0,0,0,0,0,16,64,128,101,0,0,8,0,0,0,1,0,0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,56,0,0,0,32,0,0,0,8,0,0,0,90,0,0,0,86,0,0,0,32,0,0,0,232,22,2,0,96,69,2,0,248,56,2,0,64,45,2,0,64,33,2,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,124,0,0,0,
-112,0,0,0,2,0,0,0,0,0,0,0,50,0,0,0,0,0,0,0,118,0,0,0,108,0,0,0,166,0,0,0,82,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,102,0,0,0,110,0,0,0,14,0,0,0,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,0,0,0,0,0,0,0,14,0,0,0,2,0,0,0,2,0,0,0,50,0,0,0,28,0,0,0,14,0,0,0,8,124,1,0,232,119,1,0,248,117,1,0,104,65,3,0,88,114,1,0,136,112,1,0,240,110,1,0,16,109,1,0,104,65,3,0,32,107,1,0,72,105,1,0,104,65,3,0,128,102,1,0,112,99,1,0,128,97,1,0,40,95,1,0,24,93,1,0,136,91,1,0,184,89,1,0,24,88,1,0,56,86,1,0,80,84,1,0,32,82,
-1,0,208,78,1,0,24,77,1,0,80,75,1,0,120,74,1,0,32,72,1,0,168,70,1,0,8,69,1,0,104,67,1,0,192,65,1,0,112,63,1,0,200,60,1,0,104,65,3,0,144,58,1,0,240,56,1,0,136,55,1,0,232,53,1,0,104,65,3,0,224,52,1,0,208,51,1,0,72,147,2,0,216,145,2,0,200,60,1,0,104,65,3,0,96,144,2,0,128,141,2,0,160,139,2,0,240,137,2,0,112,136,2,0,72,135,2,0,32,134,2,0,200,132,2,0,88,131,2,0,168,129,2,0,48,128,2,0,104,65,3,0,8,125,2,0,120,123,2,0,24,122,2,0,184,120,2,0,104,119,2,0,104,65,3,0,16,118,2,0,216,116,2,0,176,115,2,0,56,114,
-2,0,64,112,2,0,96,109,2,0,40,108,2,0,216,106,2,0,184,105,2,0,200,104,2,0,8,103,2,0,224,100,2,0,200,60,1,0,104,65,3,0,144,99,2,0,192,94,2,0,200,92,2,0,24,88,1,0,104,65,3,0,248,89,2,0,144,88,2,0,80,87,2,0,48,86,2,0,56,85,2,0,48,84,2,0,40,83,2,0,240,81,2,0,208,80,2,0,192,79,2,0,24,88,1,0,104,65,3,0,128,77,2,0,112,76,2,0,112,75,2,0,144,74,2,0,232,73,2,0,192,72,2,0,208,71,2,0,216,70,2,0,200,60,1,0,104,65,3,0,168,69,2,0,128,68,2,0,88,66,2,0,32,65,2,0,24,64,2,0,240,62,2,0,216,61,2,0,8,61,2,0,0,60,2,0,176,
-58,2,0,128,57,2,0,200,60,1,0,104,65,3,0,240,55,2,0,8,54,2,0,104,65,3,0,0,53,2,0,208,51,2,0,224,50,2,0,208,49,2,0,0,49,2,0,24,48,2,0,24,47,2,0,176,45,2,0,96,44,2,0,104,65,3,0,144,42,2,0,104,65,3,0,88,41,2,0,232,39,2,0,224,38,2,0,224,37,2,0,0,37,2,0,8,36,2,0,200,60,1,0,104,65,3,0,240,34,2,0,104,65,3,0,184,33,2,0,128,32,2,0,80,30,2,0,56,29,2,0,80,28,2,0,168,27,2,0,240,26,2,0,24,88,1,0,104,65,3,0,24,26,2,0,104,65,3,0,80,25,2,0,56,24,2,0,72,23,2,0,56,22,2,0,64,20,2,0,48,19,2,0,32,18,2,0,104,65,3,0,0,17,
-2,0,128,15,2,0,112,14,2,0,184,13,2,0,232,12,2,0,240,11,2,0,208,10,2,0,168,9,2,0,104,65,3,0,240,8,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,88,125,2,0,136,109,2,0,64,90,2,0,0,0,0,0,0,0,0,0,4,0,0,0,224,77,2,0,0,0,0,0,0,0,0,0,128,66,2,0,136,109,2,0,64,90,2,0,0,0,0,0,40,54,2,0,5,0,0,0,224,77,2,0,0,0,0,0,192,42,2,0,112,30,2,0,136,109,2,0,88,20,2,0,0,0,0,0,0,0,0,0,6,0,0,0,224,77,2,0,184,9,2,0,0,0,0,0,96,1,2,0,136,109,2,0,88,20,2,0,0,0,0,0,40,54,2,0,7,0,0,0,224,77,2,0,184,9,2,0,192,42,2,0,104,248,1,0,216,235,
-1,0,88,20,2,0,0,0,0,0,0,0,0,0,10,0,0,0,112,226,1,0,184,9,2,0,0,0,0,0,56,219,1,0,216,235,1,0,88,20,2,0,0,0,0,0,192,42,2,0,11,0,0,0,112,226,1,0,184,9,2,0,192,42,2,0,240,215,1,0,216,235,1,0,240,212,1,0,0,0,0,0,0,0,0,0,8,0,0,0,112,226,1,0,0,0,0,0,0,0,0,0,208,209,1,0,216,235,1,0,240,212,1,0,0,0,0,0,192,42,2,0,9,0,0,0,112,226,1,0,0,0,0,0,192,42,2,0,56,207,1,0,56,207,1,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,128,203,1,0,0,0,0,0,0,0,0,0,224,199,1,0,56,207,1,0,184,9,2,0,0,0,0,0,0,0,0,0,14,0,0,0,128,203,1,0,184,
-9,2,0,0,0,0,0,56,196,1,0,56,207,1,0,184,9,2,0,0,0,0,0,40,54,2,0,15,0,0,0,128,203,1,0,184,9,2,0,192,42,2,0,224,190,1,0,56,207,1,0,0,0,0,0,0,0,0,0,40,54,2,0,13,0,0,0,128,203,1,0,0,0,0,0,192,42,2,0,248,187,1,0,248,187,1,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,224,77,2,0,0,0,0,0,0,0,0,0,248,185,1,0,248,187,1,0,184,9,2,0,0,0,0,0,0,0,0,0,18,0,0,0,224,77,2,0,184,9,2,0,0,0,0,0,200,183,1,0,248,187,1,0,184,9,2,0,0,0,0,0,40,54,2,0,19,0,0,0,224,77,2,0,184,9,2,0,192,42,2,0,200,181,1,0,248,187,1,0,0,0,0,0,112,179,1,
-0,0,0,0,0,20,0,0,0,224,77,2,0,0,0,0,0,0,0,0,0,216,176,1,0,248,187,1,0,184,9,2,0,112,179,1,0,0,0,0,0,22,0,0,0,224,77,2,0,184,9,2,0,0,0,0,0,0,174,1,0,248,187,1,0,184,9,2,0,112,179,1,0,40,54,2,0,23,0,0,0,224,77,2,0,184,9,2,0,192,42,2,0,80,171,1,0,248,187,1,0,0,0,0,0,112,179,1,0,40,54,2,0,21,0,0,0,224,77,2,0,0,0,0,0,192,42,2,0,32,168,1,0,248,187,1,0,0,0,0,0,0,0,0,0,40,54,2,0,17,0,0,0,224,77,2,0,0,0,0,0,192,42,2,0,16,164,1,0,144,161,1,0,184,9,2,0,0,0,0,0,0,0,0,0,26,0,0,0,112,226,1,0,184,9,2,0,0,0,0,0,
-232,159,1,0,144,161,1,0,184,9,2,0,0,0,0,0,192,42,2,0,27,0,0,0,112,226,1,0,184,9,2,0,192,42,2,0,64,158,1,0,144,161,1,0,0,0,0,0,0,0,0,0,192,42,2,0,25,0,0,0,112,226,1,0,0,0,0,0,192,42,2,0,96,156,1,0,144,161,1,0,184,154,1,0,0,0,0,0,0,0,0,0,24,0,0,0,112,226,1,0,0,0,0,0,0,0,0,0,16,153,1,0,48,151,1,0,184,9,2,0,0,0,0,0,0,0,0,0,30,0,0,0,112,226,1,0,184,9,2,0,0,0,0,0,200,148,1,0,48,151,1,0,184,9,2,0,0,0,0,0,192,42,2,0,31,0,0,0,112,226,1,0,184,9,2,0,192,42,2,0,24,146,1,0,48,151,1,0,0,0,0,0,0,0,0,0,192,42,2,
-0,29,0,0,0,112,226,1,0,0,0,0,0,192,42,2,0,112,142,1,0,48,151,1,0,184,154,1,0,0,0,0,0,0,0,0,0,28,0,0,0,112,226,1,0,0,0,0,0,0,0,0,0,144,139,1,0,144,139,1,0,0,0,0,0,0,0,0,0,0,0,0,0,32,0,0,0,216,137,1,0,0,0,0,0,0,0,0,0,48,136,1,0,16,134,1,0,184,9,2,0,0,0,0,0,0,0,0,0,2,0,0,0,112,226,1,0,184,9,2,0,0,0,0,0,136,132,1,0,16,134,1,0,184,9,2,0,0,0,0,0,192,42,2,0,3,0,0,0,112,226,1,0,184,9,2,0,192,42,2,0,224,130,1,0,16,134,1,0,0,0,0,0,0,0,0,0,192,42,2,0,1,0,0,0,112,226,1,0,0,0,0,0,192,42,2,0,48,129,1,0,16,134,
-1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,226,1,0,0,0,0,0,0,0,0,0,0,127,1,0,32,124,1,0,8,120,1,0,0,0,0,0,192,42,2,0,33,0,0,0,112,226,1,0,0,0,0,0,192,42,2,0,16,118,1,0,224,115,1,0,0,0,0,0,0,0,0,0,0,0,0,0,34,0,0,0,216,137,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,80,0,0,0,18,0,0,0,34,0,0,0,184,0,0,0,22,0,0,0,48,0,0,0,32,57,1,0,184,55,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,18,0,0,0,34,0,0,0,52,0,0,0,0,0,0,0,38,0,0,0,
-100,111,116,32,112,105,99,32,112,108,117,103,105,110,58,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,54,0,0,0,134,0,0,0,0,0,0,0,0,0,0,0,40,0,0,0,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,34,0,0,0,0,0,0,0,96,0,0,0,24,0,0,0,10,0,0,0,68,0,0,0,20,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,240,63,0,0,0,0,0,0,240,63,0,0,0,0,0,0,240,63,0,0,0,0,0,0,240,63,0,0,0,0,0,0,240,63,0,0,0,0,0,0,240,63,0,0,0,0,0,0,240,63,0,0,0,0,
-0,0,240,63,0,0,0,0,0,0,240,63,0,0,0,0,0,0,240,63,0,0,0,0,0,0,240,63,180,0,0,0,42,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,73,0,49,1,83,0,127,1,48,1,105,0,120,1,255,0,129,1,83,2,130,1,131,1,132,1,133,1,134,1,84,2,135,1,136,1,137,1,86,2,138,1,87,2,139,1,140,1,142,1,221,1,143,1,89,2,144,1,91,2,145,1,146,1,147,1,96,2,148,1,99,2,150,1,105,2,151,1,104,2,152,1,153,1,156,1,111,2,157,1,114,2,159,1,117,2,166,1,128,2,167,1,168,1,169,1,131,2,172,1,173,1,174,1,136,2,175,1,176,1,177,1,138,2,178,1,139,2,183,1,146,
-2,184,1,185,1,188,1,189,1,196,1,198,1,196,1,197,1,197,1,198,1,199,1,201,1,199,1,200,1,200,1,201,1,202,1,204,1,202,1,203,1,203,1,204,1,241,1,243,1,241,1,242,1,242,1,243,1,244,1,245,1,246,1,149,1,247,1,191,1,32,2,158,1,134,3,172,3,136,3,173,3,137,3,174,3,138,3,175,3,140,3,204,3,142,3,205,3,143,3,206,3,153,3,69,3,153,3,190,31,163,3,194,3,247,3,248,3,250,3,251,3,96,30,155,30,223,0,223,0,158,30,223,0,89,31,81,31,91,31,83,31,93,31,85,31,95,31,87,31,188,31,179,31,204,31,195,31,236,31,229,31,252,31,243,31,
-58,2,101,44,59,2,60,2,61,2,154,1,62,2,102,44,65,2,66,2,67,2,128,1,68,2,137,2,69,2,140,2,244,3,184,3,249,3,242,3,253,3,123,3,254,3,124,3,255,3,125,3,192,4,207,4,38,33,201,3,42,33,107,0,43,33,229,0,50,33,78,33,131,33,132,33,96,44,97,44,98,44,107,2,99,44,125,29,100,44,125,2,109,44,81,2,110,44,113,2,111,44,80,2,112,44,82,2,114,44,115,44,117,44,118,44,126,44,63,2,127,44,64,2,242,44,243,44,125,167,121,29,139,167,140,167,141,167,101,2,170,167,102,2,199,16,39,45,205,16,45,45,118,3,119,3,156,3,181,0,146,3,
-208,3,152,3,209,3,166,3,213,3,160,3,214,3,154,3,240,3,161,3,241,3,149,3,245,3,207,3,215,3,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,3,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,
-0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,154,153,153,153,153,153,217,191,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,1,0,0,0,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,248,45,0,0,1,0,0,0,1,0,
-0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,1,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,22,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,23,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51,
-51,51,51,51,51,227,63,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,24,0,0,0,0,0,0,0,0,1,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,128,102,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,128,102,64,154,153,153,153,153,153,217,191,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,128,102,64,123,20,174,71,225,122,228,191,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,17,0,0,0,0,0,0,0,0,1,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,123,
-20,174,71,225,122,228,191,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,51,51,51,51,
-51,51,211,191,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,128,70,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,1,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,
-0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,128,70,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,158,0,0,0,28,0,0,0,0,0,0,0,0,0,0,0,67,68,65,84,65,91,0,0,96,0,0,0,144,0,0,0,128,0,0,0,144,0,0,0,8,0,0,0,4,0,0,0,0,0,0,0,56,0,0,0,52,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,120,249,1,0,240,236,1,0,32,227,1,0,200,219,1,0,72,216,1,0,112,213,1,0,56,210,1,0,152,207,1,0,0,204,1,0,104,200,1,0,176,
-196,1,0,176,191,1,0,88,188,1,0,64,186,1,0,8,184,1,0,24,182,1,0,208,179,1,0,40,177,1,0,72,174,1,0,168,171,1,0,120,168,1,0,0,0,0,0,2,3,4,5,6,7,8,0,0,9,10,11,12,13,14,15,16,17,0,0,0,0,0,0,0,0,0,0,0,0,18,19,0,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,23,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,78,0,0,0,144,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,0,0,0,0,0,0,0,4,254,255,255,135,254,255,255,7,0,0,0,0,0,0,0,0,255,255,127,255,255,255,127,255,255,255,255,255,255,255,243,127,254,253,255,
-255,255,255,255,127,255,255,255,255,255,255,255,255,15,224,255,255,255,255,49,252,255,255,255,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,1,0,248,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,215,255,255,251,255,255,255,255,127,127,84,253,255,15,0,254,223,255,255,255,255,255,255,255,255,254,223,255,255,255,255,3,0,255,255,255,255,255,255,159,25,255,255,255,207,63,3,0,0,0,0,0,0,254,255,255,255,127,2,254,255,255,255,127,0,0,0,0,0,0,0,0,0,255,255,255,7,7,0,0,0,0,0,254,255,255,7,254,
-7,0,0,0,0,254,255,255,255,255,255,255,255,255,124,255,127,47,0,96,0,0,0,224,255,255,255,255,255,255,35,0,0,0,255,3,0,0,0,224,159,249,255,255,253,197,3,0,0,0,176,3,0,3,0,224,135,249,255,255,253,109,3,0,0,0,94,0,0,28,0,224,175,251,255,255,253,237,35,0,0,0,0,1,0,0,0,224,159,249,255,255,253,205,35,0,0,0,176,3,0,0,0,224,199,61,214,24,199,191,3,0,0,0,0,0,0,0,0,224,223,253,255,255,253,239,3,0,0,0,0,3,0,0,0,224,223,253,255,255,253,239,3,0,0,0,64,3,0,0,0,224,223,253,255,255,253,255,3,0,0,0,0,3,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,255,127,13,0,63,0,0,0,0,0,0,0,150,37,240,254,174,108,13,32,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,254,255,255,255,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,63,0,255,255,255,255,127,0,237,218,7,0,0,0,0,80,1,80,49,130,171,98,44,0,0,0,0,64,0,201,128,245,7,0,0,0,0,8,1,2,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,15,255,255,255,255,255,255,255,255,255,255,255,3,255,255,63,63,255,
-255,255,255,63,63,255,170,255,255,255,63,255,255,255,255,255,255,223,95,220,31,207,15,255,31,220,31,0,0,0,0,64,76,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,0,0,0,254,3,0,0,254,255,255,255,255,255,255,255,255,255,31,0,254,255,255,255,255,255,255,255,255,255,255,7,224,255,255,255,255,31,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,63,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,
-255,255,255,255,255,255,255,255,255,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,255,7,254,255,255,135,254,255,255,7,0,0,0,0,0,0,128,0,255,255,127,255,255,255,127,255,255,255,255,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,255,255,255,1,0,248,3,0,3,0,0,0,0,0,255,255,255,255,255,255,255,255,63,0,0,0,3,0,0,0,192,215,255,255,251,255,255,255,255,127,127,84,253,255,15,0,254,223,255,255,255,255,255,255,255,255,254,223,255,255,255,255,123,0,255,255,255,255,255,255,159,25,255,255,255,207,63,3,0,0,0,0,0,0,254,
-255,255,255,127,2,254,255,255,255,127,0,254,255,251,255,255,187,22,0,255,255,255,7,7,0,0,0,0,0,254,255,255,7,255,255,7,0,255,3,255,255,255,255,255,255,255,255,255,124,255,127,239,255,255,61,255,3,238,255,255,255,255,255,255,243,255,63,30,255,207,255,0,0,238,159,249,255,255,253,197,211,159,57,128,176,207,255,3,0,228,135,249,255,255,253,109,211,135,57,0,94,192,255,31,0,238,175,251,255,255,253,237,243,191,59,0,0,193,255,0,0,238,159,249,255,255,253,205,243,143,57,192,176,195,255,0,0,236,199,61,214,24,
-199,191,195,199,61,128,0,128,255,0,0,238,223,253,255,255,253,239,195,223,61,96,0,195,255,0,0,236,223,253,255,255,253,239,195,223,61,96,64,195,255,0,0,236,223,253,255,255,253,255,195,207,61,128,0,195,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,254,255,255,255,255,127,255,7,255,127,255,3,0,0,0,0,150,37,240,254,174,108,255,59,95,63,255,3,0,0,0,0,0,0,0,3,255,3,160,194,255,254,255,255,255,3,254,255,223,15,191,254,255,63,254,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,31,2,0,0,
-0,160,0,0,0,254,255,62,0,254,255,255,255,255,255,255,255,255,255,31,102,254,255,255,255,255,255,255,255,255,255,255,119,25,3,26,27,28,29,30,0,0,31,32,33,34,35,36,37,16,17,0,0,0,0,0,0,0,0,0,0,0,0,18,19,38,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,39,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,23,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,
-1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,102,0,0,0,0,0,0,0,0,0,0,0,44,0,0,0,0,0,0,0,0,0,0,0,80,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,45,57,57,57,57,57,57,57,57,57,57,57,57,57,57,57,46,57,57,0,0,0,0,0,154,153,153,153,153,153,169,63,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26,0,0,0,98,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,4,0,0,0,0,0,0,0,28,0,0,0,114,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,58,0,0,0,30,0,0,0,76,0,0,0,88,0,0,0,68,0,0,0,20,0,0,0,24,0,0,0,126,0,0,0,146,0,0,0,32,0,0,0,96,0,0,0,24,0,0,0,26,0,0,0,16,0,0,0,4,0,0,0,22,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,10,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,16,12,19,28,30,
-3,13,31,32,33,34,35,27,26,17,25,25,25,25,25,25,25,25,25,25,22,18,2,14,11,15,28,24,24,24,24,24,24,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,20,28,4,28,22,28,24,24,24,24,24,24,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,28,36,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,22,28,28,28,28,28,28,28,28,28,28,22,28,26,28,28,22,28,28,28,28,28,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
-22,22,22,22,22,22,22,22,22,28,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,28,22,22,22,22,22,22,22,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,38,0,0,0,96,0,0,0,36,0,0,0,100,0,0,0,70,0,0,0,26,0,0,0,4,0,0,0,156,0,0,0,42,0,0,0,106,0,0,0,112,0,0,0,54,0,0,0,28,0,0,0,74,0,0,0,10,0,0,0,24,0,0,0,1],"i8",L,l.J+10256);D([21,10,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,16,12,19,28,30,3,13,31,32,33,34,35,
-27,26,17,25,25,25,25,25,25,25,25,25,25,22,18,2,14,11,15,28,24,24,24,24,24,24,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,20,28,4,28,22,28,24,24,24,24,24,24,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,28,36,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,22,28,28,28,28,28,28,28,28,28,28,22,28,26,28,28,22,28,28,28,28,28,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
-22,22,28,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,28,22,22,22,22,22,22,22,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,208,1,0,8,0,0,0,3,0,0,0,144,204,1,0,200,201,1,0,11,0,0,0,6,0,0,0,96,197,1,0,64,192,1,0,2,0,0,0,1,0,0,0,0,189,1,0,144,186,1,0,4,0,0,0,2,0,0,0,136,184,1,0,192,182,1,0,4,0,0,0,4,0,0,0,80,180,1,0,216,177,1,0,5,0,0,0,5,0,0,0,56,175,1,0,80,172,1,0,4,0,0,0,7,0,0,0,24,169,1,0,72,165,1,0,5,0,0,0,9,
-0,0,0,96,162,1,0,224,159,1,0,4,0,0,0,10,0,0,0,240,158,1,0,88,156,1,0,4,0,0,0,12,0,0,0,80,155,1,0,1,208,209,210,211,212,213,214,215,216,217,0,0,0,0,0,32,0,0,0,9,0,0,0,10,0,0,0,13,0,0,0,11,0,0,0,12,0,0,0,133,0,0,0,0,32,0,0,1,32,0,0,2,32,0,0,3,32,0,0,4,32,0,0,5,32,0,0,6,32,0,0,8,32,0,0,9,32,0,0,10,32,0,0,40,32,0,0,41,32,0,0,95,32,0,0,0,48,0,0,0,0,0,0,38,0,0,0,96,0,0,0,36,0,0,0,100,0,0,0,70,0,0,0,26,0,0,0,4,0,0,0,156,0,0,0,42,0,0,0,106,0,0,0,112,0,0,0,54,0,0,0,28,0,0,0,74,0,0,0,20,0,0,0,32,0,0,0,1,0,
-0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,21,10,0,0,21,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,16,12,19,28,30,3,13,31,32,33,34,35,27,26,17,25,25,25,25,25,25,25,25,25,25,22,18,2,14,11,15,28,24,24,24,24,24,24,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,20,28,4,28,22,28,24,24,24,24,24,24,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,28,36,28,28,28,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,5,5,5,5,5,
-5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,7,7,7,7,0,0,0,0,0,0,0,0,0,1,1,188,0,0,0,186,0,0,0,84,0,0,0,12,0,0,0,14,0,0,0,84,0,0,0,70,0,0,0,72,0,0,0,74,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0,4,0,0,0,42,0,0,0,4,0,0,0,112,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,74,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,8,0,0,0,0,0,0,0,40,0,0,0,108,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,1,0,0,48,
-1,0,0,176,0,0,0,0,0,0,0,120,109,108,61,104,116,116,112,58,47,47,119,119,119,46,119,51,46,111,114,103,47,88,77,76,47,49,57,57,56,47,110,97,109,101,115,112,97,99,101,0,0,0,0,0,0,0,0,56,227,1,0,18,0,0,0,208,219,1,0,66,0,0,0,1,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,0,0,25,17,18,19,21,32,49,78,29,30,96,31,1,50,86,25,25,25,2,25,52,51,49,198,214,4,104,58,32,55,32,71,32,63,32,32,93,32,32,5,6,87,88,52,4,7,8,9,10,11,
-12,13,80,94,95,4,85,98,5,6,101,80,103,89,7,8,9,10,11,12,13,105,4,83,55,106,107,54,25,17,18,19,21,57,60,4,5,6,58,84,65,0,7,8,9,10,11,12,13,5,6,0,90,0,0,7,8,9,10,11,12,13,4,39,41,43,0,46,0,61,0,0,0,0,0,4,5,6,0,63,0,0,7,8,9,10,11,12,13,5,6,0,0,0,0,7,8,9,10,11,12,13,4,0,71,0,0,66,75,0,0,0,0,0,0,4,5,6,0,76,77,68,7,8,9,10,11,12,13,5,6,4,0,0,0,7,8,9,10,11,12,13,0,0,0,5,6,0,0,0,0,7,8,9,10,11,12,13,38,40,42,44,45,47,48,0,0,0,0,0,0,0,0,0,38,40,42,45,0,0,0,0,0,2,3,3,1,1,2,1,1,1,3,3,3,3,3,3,3,1,1,1,1,1,1,1,1,
-1,1,1,1,1,1,2,1,1,2,0,6,1,3,3,3,3,1,0,1,2,3,0,4,1,2,3,0,4,0,4,0,4,0,3,2,1,2,1,2,1,0,0,0,0,0,0,0,39,40,40,40,41,42,42,43,43,43,43,43,43,43,43,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,58,59,59,61,60,62,62,62,62,62,63,63,64,64,64,66,65,67,67,67,69,68,70,68,71,68,72,68,73,73,74,74,75,75,0,0,0,0,0,0,184,255,184,255,239,255,191,0,246,255,255,255,38,0,0,0,42,0,1,0,41,0,184,255,184,255,2,0,44,0,184,255,184,255,184,255,184,255,184,255,254,255,96,0,184,255,22,0,14,0,184,255,191,255,184,255,184,255,185,
-255,184,255,184,255,184,255,184,255,184,255,184,255,184,255,0,0,0,0,0,0,11,0,184,255,169,0,8,0,184,255,184,255,6,0,184,255,184,255,184,255,184,255,184,255,184,255,184,255,3,0,169,0,184,255,169,0,169,0,169,0,169,0,169,0,169,0,169,0,184,255,250,255,184,255,5,0,247,255,184,255,184,255,184,255,184,255,169,0,169,0,169,0,169,0,10,0,32,0,9,0,60,0,15,0,73,0,12,0,100,0,113,0,17,0,140,0,153,0,184,255,184,255,184,255,184,255,184,255,184,255,184,255,184,255,184,255,184,255,184,255,184,255,184,255,184,255,184,
-255,184,255,184,255,184,255,184,255,184,255,184,255,26,0,184,255,149,0,184,255,21,0,43,0,184,255,34,0,184,255,26,0,13,0,30,0,184,255,10,0,184,255,184,255,184,255,184,255,53,0,184,255,184,255,50,0,184,255,184,255,184,255,37,0,184,255,21,0,184,255,61,0,65,0,184,255,66,0,184,255,184,255,184,255,184,255,184,255,255,3,14,15,16,33,53,34,56,35,59,20,62,36,64,22,67,23,69,24,37,26,70,27,28,72,73,74,81,82,100,99,102,91,92,79,97,0,0,0,0,4,43,0,33,32,0,17,19,21,25,27,29,23,0,5,7,43,43,43,0,43,0,0,9,8,37,0,0,
-1,31,2,6,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,34,3,35,18,10,38,20,11,39,22,13,41,24,16,26,12,40,28,14,30,15,0,47,0,44,0,43,63,0,45,0,43,0,49,42,36,62,46,61,0,54,52,0,56,48,65,0,50,0,60,0,0,59,0,64,51,55,53,57,0,0,0,0,2,2,2,2,2,15,12,72,0,3,81,8,1,8,79,17,18,19,7,21,11,30,12,10,30,12,97,15,38,14,40,5,42,16,44,45,6,47,48,26,27,28,29,11,12,32,33,34,35,36,37,38,31,23,24,12,22,4,26,27,10,31,25,80,32,33,34,35,36,37,38,10,12,75,14,10,10,39,80,80,80,80,80,41,43,12,26,27,15,75,46,255,32,33,34,35,36,37,38,26,27,
-255,80,255,255,32,33,34,35,36,37,38,12,17,18,19,255,21,255,19,255,255,255,255,255,12,26,27,255,16,255,255,32,33,34,35,36,37,38,26,27,255,255,255,255,32,33,34,35,36,37,38,12,255,5,255,255,17,9,255,255,255,255,255,255,12,26,27,255,20,21,18,32,33,34,35,36,37,38,26,27,12,255,255,255,32,33,34,35,36,37,38,255,255,255,26,27,255,255,255,255,32,33,34,35,36,37,38,17,18,19,20,21,22,23,255,255,255,255,255,255,255,255,255,33,34,35,36,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,136,76,1,0,1,0,0,0,224,1,0,0,192,46,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,166,1,0,1,0,0,0,72,4,0,0,224,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,248,2,2,0,1,0,0,0,224,39,0,0,0,47,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,72,102,2,0,1,0,0,0,40,48,0,0,32,47,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,56,125,1,0,255,255,255,255,232,56,0,0,64,47,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,192,73,1,0,1,0,0,0,176,77,0,0,96,47,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,161,1,0,1,
-0,0,0,160,101,0,0,128,47,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,233,1,0,1,0,0,0,48,112,0,0,160,47,0,0,4,0,0,0,88,190,1,0,1,0,0,0,96,0,0,0,160,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,208,59,1,0,168,34,1,0,0,0,0,0,0,0,0,0,56,179,1,0,184,34,1,0,184,185,1,0,200,34,1,0,15,0,0,0,88,71,1,0,1,0,0,0,176,111,0,0,0,0,0,0,16,0,0,0,96,26,2,0,1,0,0,0,176,111,0,0,0,0,0,0,17,0,0,0,208,208,1,0,1,0,0,0,176,111,0,0,0,0,0,0,17,0,0,0,176,178,1,0,1,0,0,0,176,111,0,0,0,0,0,0,17,0,0,0,32,
-154,1,0,1,0,0,0,176,111,0,0,0,0,0,0,19,0,0,0,192,131,1,0,1,0,0,0,208,111,0,0,0,0,0,0,20,0,0,0,16,110,1,0,1,0,0,0,208,111,0,0,0,0,0,0,21,0,0,0,24,89,1,0,1,0,0,0,208,111,0,0,0,0,0,0,21,0,0,0,232,69,1,0,1,0,0,0,208,111,0,0,0,0,0,0,21,0,0,0,120,52,1,0,1,0,0,0,208,111,0,0,0,0,0,0,22,0,0,0,136,133,2,0,1,0,0,0,152,111,0,0,0,0,0,0,23,0,0,0,144,117,2,0,1,0,0,0,152,111,0,0,0,0,0,0,24,0,0,0,136,101,2,0,1,0,0,0,152,111,0,0,0,0,0,0,24,0,0,0,152,83,2,0,1,0,0,0,152,111,0,0,0,0,0,0,24,0,0,0,80,72,2,0,1,0,0,0,152,
-111,0,0,0,0,0,0,25,0,0,0,128,60,2,0,1,0,0,0,192,111,0,0,0,0,0,0,25,0,0,0,128,48,2,0,1,0,0,0,192,111,0,0,0,0,0,0,26,0,0,0,128,36,2,0,1,0,0,0,184,111,0,0,0,0,0,0,10,0,0,0,144,25,2,0,1,0,0,0,200,111,0,0,0,0,0,0,11,0,0,0,40,14,2,0,1,0,0,0,200,111,0,0,0,0,0,0,12,0,0,0,40,6,2,0,1,0,0,0,200,111,0,0,0,0,0,0,12,0,0,0,120,253,1,0,1,0,0,0,200,111,0,0,0,0,0,0,12,0,0,0,144,241,1,0,1,0,0,0,200,111,0,0,0,0,0,0,14,0,0,0,32,231,1,0,1,0,0,0,200,111,0,0,0,0,0,0,14,0,0,0,216,221,1,0,1,0,0,0,200,111,0,0,0,0,0,0,13,0,
-0,0,32,218,1,0,1,0,0,0,200,111,0,0,0,0,0,0,5,0,0,0,136,214,1,0,1,0,0,0,200,111,0,0,0,0,0,0,6,0,0,0,0,212,1,0,1,0,0,0,200,111,0,0,0,0,0,0,7,0,0,0,168,208,1,0,1,0,0,0,200,111,0,0,0,0,0,0,7,0,0,0,88,205,1,0,1,0,0,0,200,111,0,0,0,0,0,0,7,0,0,0,96,202,1,0,1,0,0,0,200,111,0,0,0,0,0,0,9,0,0,0,56,198,1,0,1,0,0,0,200,111,0,0,0,0,0,0,9,0,0,0,0,194,1,0,1,0,0,0,200,111,0,0,0,0,0,0,8,0,0,0,184,189,1,0,1,0,0,0,200,111,0,0,0,0,0,0,0,0,0,0,32,187,1,0,1,0,0,0,144,111,0,0,0,0,0,0,1,0,0,0,232,184,1,0,1,0,0,0,144,111,
-0,0,0,0,0,0,2,0,0,0,8,183,1,0,1,0,0,0,144,111,0,0,0,0,0,0,2,0,0,0,208,180,1,0,1,0,0,0,144,111,0,0,0,0,0,0,2,0,0,0,144,178,1,0,1,0,0,0,144,111,0,0,0,0,0,0,4,0,0,0,216,175,1,0,1,0,0,0,144,111,0,0,0,0,0,0,4,0,0,0,72,173,1,0,1,0,0,0,144,111,0,0,0,0,0,0,3,0,0,0,168,169,1,0,1,0,0,0,144,111,0,0,0,0,0,0,18,0,0,0,128,166,1,0,1,0,0,0,176,111,0,0,0,0,0,0,27,0,0,0,192,162,1,0,1,0,0,0,160,111,0,0,0,0,0,0,28,0,0,0,200,160,1,0,1,0,0,0,160,111,0,0,0,0,0,0,29,0,0,0,40,159,1,0,1,0,0,0,160,111,0,0,0,0,0,0,29,0,0,0,
-120,157,1,0,1,0,0,0,160,111,0,0,0,0,0,0,29,0,0,0,128,155,1,0,1,0,0,0,160,111,0,0,0,0,0,0,30,0,0,0,8,154,1,0,1,0,0,0,168,111,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,179,1,0,0,0,0,0,48,71,0,0,240,179,2,0,1,0,0,0,0,84,2,0,0,0,0,0,24,102,0,0,240,179,2,0,3,0,0,0,104,231,1,0,0,0,0,0,216,3,0,0,240,179,2,0,4,0,0,0,216,189,1,0,0,0,0,0,200,20,1,0,240,179,2,0,5,0,0,0,224,162,1,0,0,0,0,0,192,57,0,0,240,179,2,0,6,0,0,0,120,140,1,0,0,0,0,0,136,69,0,0,240,179,2,0,7,0,0,0,240,118,1,0,0,0,0,
-0,168,69,0,0,240,179,2,0,7,0,0,0,112,98,1,0,0,0,0,0,168,69,0,0,240,179,2,0,7,0,0,0,240,77,1,0,0,0,0,0,160,69,0,0,240,179,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,84,2,0,0,0,0,0,40,112,0,0,32,112,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,240,176,1,0,50,0,0,0,72,82,2,0,44,0,0,0,8,229,1,0,44,0,0,0,184,188,1,0,22,0,0,0,168,161,1,0,22,0,0,0,88,139,1,0,40,0,0,0,192,117,1,0,40,0,0,0,40,97,1,0,16,0,0,0,160,76,1,0,16,0,0,0,24,58,1,0,4,0,0,0,240,138,2,0,4,0,0,0,160,122,2,0,
-26,0,0,0,56,107,2,0,26,0,0,0,152,87,2,0,32,0,0,0,0,0,0,0,16,58,1,0,1,0,0,0,0,0,0,0,88,113,0,0,1,0,0,0,8,139,2,0,1,0,0,0,0,0,0,0,32,113,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,200,77,2,0,1,0,0,0,0,0,0,0,144,113,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,114,2,0,1,0,0,0,0,0,0,0,0,114,0,0,1,0,0,0,32,251,1,0,1,0,0,0,0,0,0,0,200,113,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,80,126,2,0,1,0,0,0,0,0,0,0,56,114,0,0,1,0,0,0,136,1,2,0,1,0,0,0,0,0,0,0,56,114,0,
-0,2,0,0,0,8,200,1,0,1,0,0,0,0,0,0,0,80,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,72,56,2,0,255,255,255,255,0,0,0,0,112,114,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,32,25,2,0,1,0,0,0,0,0,0,0,168,114,0,0,2,0,0,0,80,208,1,0,1,0,0,0,0,0,0,0,224,114,0,0,0,0,0,0,0,178,1,0,1,0,0,0,0,0,0,0,224,114,0,0,3,0,0,0,176,153,1,0,1,0,0,0,0,0,0,0,224,114,0,0,0,0,0,0,240,130,1,0,1,0,0,0,0,0,0,0,168,114,0,0,3,0,0,0,240,108,1,0,1,0,0,0,0,0,0,0,168,114,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,184,73,2,0,1,0,0,0,0,0,0,0,24,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,163,1,0,1,0,0,0,0,0,0,0,136,115,0,0,0,0,0,0,96,141,1,0,1,0,0,0,0,0,0,0,136,115,0,0,1,0,0,0,96,119,1,0,1,0,0,0,0,0,0,0,192,115,0,0,2,0,0,0,32,99,1,0,1,0,0,0,0,0,0,0,136,115,0,0,3,0,0,0,120,78,1,0,1,0,0,0,0,0,0,0,136,115,0,0,4,0,0,0,80,60,1,0,1,0,0,0,0,0,0,0,136,115,0,0,5,0,0,0,48,141,2,0,1,0,0,0,0,0,0,0,136,115,0,0,6,0,0,0,176,124,2,0,1,0,0,0,0,0,0,0,136,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,148,0,0,0,12,0,0,0,116,0,0,0,22,0,0,0,86,0,0,0,162,0,0,0,88,0,0,0,14,0,0,0,110,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,12,0,0,0,32,0,0,0,0,0,0,0,78,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,248,203,1,0,96,200,1,0,168,196,1,0,0,0,0,0,100,0,0,0,101,0,0,0,102,0,0,0,100,0,0,0,104,191,1,0,80,188,1,0,56,186,1,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,255,255,255,255,168,163,2,0,64,163,2,0,16,163,2,0,56,163,2,0,40,163,2,0,24,163,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65,66,0,0,192,38,2,0,65,73,0,0,120,27,2,0,65,82,0,0,208,16,2,0,65,88,0,0,128,7,2,0,66,32,0,0,248,254,1,0,66,73,0,0,152,244,1,0,67,66,0,0,136,232,1,0,67,79,0,0,160,223,1,0,67,88,0,0,120,218,1,0,72,32,0,0,56,215,1,0,72,66,0,0,88,212,1,0,72,73,0,0,24,209,1,0,72,88,0,0,248,205,1,0,72,98,0,0,168,202,1,0,72,105,0,0,136,198,1,0,72,114,0,0,216,194,1,0,72,120,0,0,40,190,1,0,73,32,0,0,96,187,1,0,75,66,0,0,88,185,1,0,75,73,
-0,0,88,183,1,0,75,82,0,0,48,181,1,0,75,88,0,0,216,178,1,0,78,66,0,0,16,176,1,0,78,73,0,0,136,173,1,0,78,82,0,0,32,170,1,0,78,88,0,0,72,167,1,0,80,65,0,0,16,163,1,0,80,66,0,0,8,161,1,0,80,73,0,0,112,159,1,0,80,88,0,0,200,157,1,0,82,32,0,0,200,155,1,0,83,32,0,0,72,154,1,0,90,68,0,0,136,152,1,0,0,0,0,0,0,0,0,0,96,188,1,0,46,0,0,0,72,186,1,0,6,0,0,0,16,184,1,0,192,0,0,0,248,220,1,0,168,186,1,0,208,137,1,0,120,160,1,0,0,95,1,0,192,115,1,0,160,56,1,0,8,75,1,0,0,0,0,0,0,0,0,0,248,220,1,0,168,186,1,0,120,
-160,1,0,208,137,1,0,192,115,1,0,0,95,1,0,8,75,1,0,160,56,1,0,0,0,0,0,0,0,0,0,84,0,0,0,30,0,0,0,0,0,0,0,0,0,0,0,74,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,94,0,0,0,72,0,0,0,22,0,0,0,164,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,0,0,0,30,0,0,0,120,0,0,0,22,0,0,0,4,0,0,0,28,0,0,0,44,0,0,0,0,0,0,0,176,0,0,0,142,0,0,0,40,102,0,0,0,0,0,0,1,0,0,0,1,0,0,0,255,255,255,255,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,0,0,0,0,0,0,240,191,0,0,0,0,0,0,240,191,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,3,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,4,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,4,0,0,0,4,0,0,0,5,0,0,0,5,0,0,0,6,0,0,0,6,0,0,0,7,0,0,0,7,0,0,0,8,0,0,0,8,0,0,0,9,0,0,0,9,0,0,0,10,0,0,0,10,0,0,0,11,0,0,0,11,0,0,0,12,0,0,0,12,0,0,0,13,0,0,0,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,3,0,0,0,7,0,0,0,0,0,0,0,76,0,0,0,152,0,0,0,34,0,0,0,114,0,0,0,0,0,0,0,2,0,0,0,72,171,1,0,198,0,0,0,24,168,1,0,193,0,0,0,8,164,1,0,194,0,0,0,136,161,1,0,192,0,0,0,216,159,1,0,145,3,0,0,56,158,1,0,197,0,0,0,72,156,1,0,195,0,0,0,176,154,1,0,196,0,0,0,0,153,1,0,146,3,0,0,32,151,1,0,199,0,0,0,176,148,1,0,167,3,0,0,8,146,1,0,33,32,0,0,88,142,1,0,148,3,0,0,136,139,1,0,208,0,0,0,200,137,1,0,201,0,0,0,40,136,1,0,202,
-0,0,0,8,134,1,0,200,0,0,0,128,132,1,0,149,3,0,0,216,130,1,0,151,3,0,0,40,129,1,0,203,0,0,0,248,126,1,0,147,3,0,0,24,124,1,0,205,0,0,0,0,120,1,0,206,0,0,0,8,118,1,0,204,0,0,0,216,115,1,0,153,3,0,0,104,114,1,0,207,0,0,0,144,112,1,0,154,3,0,0,16,111,1,0,155,3,0,0,40,109,1,0,156,3,0,0,80,107,1,0,209,0,0,0,104,105,1,0,157,3,0,0,168,102,1,0,82,1,0,0,128,99,1,0,211,0,0,0,176,97,1,0,212,0,0,0,96,95,1,0,210,0,0,0,48,93,1,0,169,3,0,0,176,91,1,0,159,3,0,0,224,89,1,0,216,0,0,0,32,88,1,0,213,0,0,0,88,86,1,0,214,
-0,0,0,112,84,1,0,166,3,0,0,96,82,1,0,160,3,0,0,248,78,1,0,51,32,0,0,56,77,1,0,168,3,0,0,120,75,1,0,161,3,0,0,200,73,1,0,96,1,0,0,72,72,1,0,163,3,0,0,192,70,1,0,222,0,0,0,40,69,1,0,164,3,0,0,136,67,1,0,152,3,0,0,232,65,1,0,218,0,0,0,152,63,1,0,219,0,0,0,216,60,1,0,217,0,0,0,184,58,1,0,165,3,0,0,24,57,1,0,220,0,0,0,176,55,1,0,158,3,0,0,32,54,1,0,221,0,0,0,248,52,1,0,120,1,0,0,224,51,1,0,150,3,0,0,120,147,2,0,225,0,0,0,232,145,2,0,226,0,0,0,112,144,2,0,180,0,0,0,168,141,2,0,230,0,0,0,224,139,2,0,224,
-0,0,0,64,138,2,0,53,33,0,0,200,136,2,0,177,3,0,0,112,135,2,0,38,0,0,0,56,134,2,0,39,34,0,0,224,132,2,0,32,34,0,0,112,131,2,0,229,0,0,0,192,129,2,0,72,34,0,0,72,128,2,0,227,0,0,0,56,125,2,0,228,0,0,0,160,123,2,0,30,32,0,0,64,122,2,0,178,3,0,0,224,120,2,0,166,0,0,0,144,119,2,0,34,32,0,0,48,118,2,0,41,34,0,0,240,116,2,0,231,0,0,0,192,115,2,0,184,0,0,0,72,114,2,0,162,0,0,0,88,112,2,0,199,3,0,0,112,109,2,0,198,2,0,0,48,108,2,0,99,38,0,0,240,106,2,0,69,34,0,0,200,105,2,0,169,0,0,0,128,104,2,0,181,33,0,
-0,80,102,2,0,42,34,0,0,232,100,2,0,164,0,0,0,160,99,2,0,211,33,0,0,208,94,2,0,32,32,0,0,224,92,2,0,147,33,0,0,40,90,2,0,176,0,0,0,176,88,2,0,180,3,0,0,96,87,2,0,102,38,0,0,104,86,2,0,247,0,0,0,80,85,2,0,233,0,0,0,80,84,2,0,234,0,0,0,64,83,2,0,232,0,0,0,64,82,2,0,5,34,0,0,224,80,2,0,3,32,0,0,216,79,2,0,2,32,0,0,192,77,2,0,181,3,0,0,136,76,2,0,97,34,0,0,136,75,2,0,183,3,0,0,176,74,2,0,240,0,0,0,192,73,2,0,235,0,0,0,224,72,2,0,172,32,0,0,248,71,2,0,3,34,0,0,240,70,2,0,146,1,0,0,192,69,2,0,0,34,0,0,160,
-68,2,0,189,0,0,0,120,66,2,0,188,0,0,0,56,65,2,0,190,0,0,0,48,64,2,0,68,32,0,0,16,63,2,0,179,3,0,0,248,61,2,0,101,34,0,0,24,61,2,0,62,0,0,0,16,60,2,0,212,33,0,0,200,58,2,0,148,33,0,0,144,57,2,0,101,38,0,0,16,56,2,0,38,32,0,0,32,54,2,0,237,0,0,0,16,53,2,0,238,0,0,0,0,52,2,0,161,0,0,0,240,50,2,0,236,0,0,0,224,49,2,0,17,33,0,0,16,49,2,0,30,34,0,0,40,48,2,0,43,34,0,0,40,47,2,0,185,3,0,0,232,45,2,0,191,0,0,0,104,44,2,0,8,34,0,0,184,42,2,0,239,0,0,0,144,41,2,0,186,3,0,0,24,40,2,0,208,33,0,0,248,38,2,0,187,
-3,0,0,0,38,2,0,41,35,0,0,32,37,2,0,171,0,0,0,40,36,2,0,144,33,0,0,24,35,2,0,8,35,0,0,200,33,2,0,28,32,0,0,152,32,2,0,100,34,0,0,104,30,2,0,10,35,0,0,80,29,2,0,23,34,0,0,104,28,2,0,202,37,0,0,176,27,2,0,14,32,0,0,0,27,2,0,57,32,0,0,40,26,2,0,24,32,0,0,48,25,2,0,60,0,0,0,72,24,2,0,175,0,0,0,88,23,2,0,20,32,0,0,88,22,2,0,181,0,0,0,80,20,2,0,183,0,0,0,72,19,2,0,18,34,0,0,56,18,2,0,188,3,0,0,80,17,2,0,7,34,0,0,200,15,2,0,160,0,0,0,160,14,2,0,19,32,0,0,240,13,2,0,96,34,0,0,240,12,2,0,11,34,0,0,32,12,2,
-0,172,0,0,0,8,11,2,0,9,34,0,0,176,9,2,0,132,34,0,0,0,9,2,0,241,0,0,0,80,8,2,0,189,3,0,0,192,7,2,0,243,0,0,0,8,7,2,0,244,0,0,0,128,6,2,0,83,1,0,0,232,5,2,0,242,0,0,0,72,5,2,0,62,32,0,0,112,4,2,0,201,3,0,0,16,3,2,0,191,3,0,0,88,1,2,0,149,34,0,0,72,0,2,0,40,34,0,0,176,255,1,0,170,0,0,0,32,255,1,0,186,0,0,0,144,254,1,0,248,0,0,0,216,253,1,0,245,0,0,0,8,253,1,0,151,34,0,0,32,252,1,0,246,0,0,0,112,251,1,0,182,0,0,0,88,250,1,0,2,34,0,0,96,248,1,0,48,32,0,0,232,246,1,0,165,34,0,0,200,245,1,0,198,3,0,0,200,
-244,1,0,192,3,0,0,104,243,1,0,214,3,0,0,8,242,1,0,177,0,0,0,48,241,1,0,163,0,0,0,24,240,1,0,50,32,0,0,200,238,1,0,15,34,0,0,120,237,1,0,29,34,0,0,208,235,1,0,200,3,0,0,168,234,1,0,34,0,0,0,192,233,1,0,210,33,0,0,192,232,1,0,26,34,0,0,0,232,1,0,42,35,0,0,136,231,1,0,187,0,0,0,216,230,1,0,146,33,0,0,240,229,1,0,9,35,0,0,0,229,1,0,29,32,0,0,216,227,1,0,28,33,0,0,104,226,1,0,174,0,0,0,120,225,1,0,11,35,0,0,128,224,1,0,193,3,0,0,192,223,1,0,15,32,0,0,248,222,1,0,58,32,0,0,72,222,1,0,25,32,0,0,160,221,
-1,0,26,32,0,0,240,220,1,0,97,1,0,0,144,220,1,0,197,34,0,0,24,220,1,0,167,0,0,0,48,219,1,0,173,0,0,0,0,219,1,0,195,3,0,0,184,218,1,0,194,3,0,0,144,218,1,0,60,34,0,0,80,218,1,0,96,38,0,0,56,218,1,0,130,34,0,0,8,218,1,0,134,34,0,0,184,217,1,0,17,34,0,0,104,217,1,0,131,34,0,0,0,217,1,0,185,0,0,0,232,215,1,0,178,0,0,0,192,215,1,0,179,0,0,0,120,215,1,0,135,34,0,0,72,215,1,0,223,0,0,0,224,214,1,0,196,3,0,0,160,214,1,0,52,34,0,0,128,214,1,0,184,3,0,0,48,214,1,0,209,3,0,0,0,214,1,0,9,32,0,0,184,213,1,0,254,
-0,0,0,232,212,1,0,220,2,0,0,192,212,1,0,215,0,0,0,136,212,1,0,34,33,0,0,104,212,1,0,209,33,0,0,64,212,1,0,250,0,0,0,24,212,1,0,145,33,0,0,248,211,1,0,251,0,0,0,152,211,1,0,249,0,0,0,40,211,1,0,168,0,0,0,152,210,1,0,210,3,0,0,200,209,1,0,197,3,0,0,120,209,1,0,252,0,0,0,80,209,1,0,24,33,0,0,48,209,1,0,190,3,0,0,0,209,1,0,253,0,0,0,200,208,1,0,165,0,0,0,160,208,1,0,255,0,0,0,72,208,1,0,182,3,0,0,40,208,1,0,13,32,0,0,216,207,1,0,12,32,0,0,42,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,18,0,0,0,0,
-0,0,0,20,0,0,0,0,0,0,0,30,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,200,79,0,0,56,25,1,0,88,2,0,0,184,22,1,0,184,22,1,0,80,78,0,0,88,2,0,0,0,0,0,0,8,0,0,0,48,0,0,0,0,0,0,0,60,0,0,0,32,0,0,0,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,146,0,0,0,24,0,0,0,0,0,0,0,0,0,0,0,38,0,0,0,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,78,79,84,65,84,73,79,78,40,0,0,0,0,0,0,0,40,0,0,0,0,0,0,0,124,0,0,0,0,0,0,0,78,77,84,79,75,69,78,83,0,0,0,0,0,0,0,0,78,77,84,79,75,69,78,0,73,68,82,69,70,83,0,0,73,68,82,69,70,0,0,0,73,68,0,0,0,0,0,0,69,78,84,73,84,89,0,0,69,78,84,73,84,73,69,83,0,0,0,0,0,0,0,0,67,68,65,84,65,0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,88,64,0,0,0,0,0,0,88,64,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,88,64,0,0,0,0,0,0,88,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,88,64,0,0,0,0,0,0,88,64,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,82,64,0,0,0,0,0,0,82,64,64,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,82,64,0,0,0,0,0,0,82,64,96,0,0,0,0,0,0,0,0,0,0,0,0,0,66,64,0,0,0,0,0,0,66,64,0,0,0,0,0,32,131,64,0,0,0,0,0,192,136,64,
-0,0,0,0,0,0,82,64,0,0,0,0,0,0,82,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,82,64,0,0,0,0,0,0,82,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,88,64,0,0,0,0,0,0,88,64,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,88,64,0,0,0,0,0,0,88,64,2,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,150,64,0,0,0,0,0,128,
-150,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,66,64,0,0,0,0,0,0,66,64,0,0,0,0,0,32,131,64,0,0,0,0,0,192,136,64,0,0,0,0,0,0,82,64,0,0,0,0,0,0,82,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,82,64,0,0,0,0,0,0,82,64,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,82,64,0,0,0,0,0,0,82,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,184,114,1,0,216,112,1,0,0,0,0,0,0,0,0,0,95,112,137,0,255,9,47,15,10,0,0,0,100,0,0,0,232,3,0,0,16,39,0,
-0,160,134,1,0,64,66,15,0,128,150,152,0,0,225,245,5,0,0,0,0,150,48,7,119,44,97,14,238,186,81,9,153,25,196,109,7,143,244,106,112,53,165,99,233,163,149,100,158,50,136,219,14,164,184,220,121,30,233,213,224,136,217,210,151,43,76,182,9,189,124,177,126,7,45,184,231,145,29,191,144,100,16,183,29,242,32,176,106,72,113,185,243,222,65,190,132,125,212,218,26,235,228,221,109,81,181,212,244,199,133,211,131,86,152,108,19,192,168,107,100,122,249,98,253,236,201,101,138,79,92,1,20,217,108,6,99,99,61,15,250,245,13,8,
-141,200,32,110,59,94,16,105,76,228,65,96,213,114,113,103,162,209,228,3,60,71,212,4,75,253,133,13,210,107,181,10,165,250,168,181,53,108,152,178,66,214,201,187,219,64,249,188,172,227,108,216,50,117,92,223,69,207,13,214,220,89,61,209,171,172,48,217,38,58,0,222,81,128,81,215,200,22,97,208,191,181,244,180,33,35,196,179,86,153,149,186,207,15,165,189,184,158,184,2,40,8,136,5,95,178,217,12,198,36,233,11,177,135,124,111,47,17,76,104,88,171,29,97,193,61,45,102,182,144,65,220,118,6,113,219,1,188,32,210,152,
-42,16,213,239,137,133,177,113,31,181,182,6,165,228,191,159,51,212,184,232,162,201,7,120,52,249,0,15,142,168,9,150,24,152,14,225,187,13,106,127,45,61,109,8,151,108,100,145,1,92,99,230,244,81,107,107,98,97,108,28,216,48,101,133,78,0,98,242,237,149,6,108,123,165,1,27,193,244,8,130,87,196,15,245,198,217,176,101,80,233,183,18,234,184,190,139,124,136,185,252,223,29,221,98,73,45,218,21,243,124,211,140,101,76,212,251,88,97,178,77,206,81,181,58,116,0,188,163,226,48,187,212,65,165,223,74,215,149,216,61,109,
-196,209,164,251,244,214,211,106,233,105,67,252,217,110,52,70,136,103,173,208,184,96,218,115,45,4,68,229,29,3,51,95,76,10,170,201,124,13,221,60,113,5,80,170,65,2,39,16,16,11,190,134,32,12,201,37,181,104,87,179,133,111,32,9,212,102,185,159,228,97,206,14,249,222,94,152,201,217,41,34,152,208,176,180,168,215,199,23,61,179,89,129,13,180,46,59,92,189,183,173,108,186,192,32,131,184,237,182,179,191,154,12,226,182,3,154,210,177,116,57,71,213,234,175,119,210,157,21,38,219,4,131,22,220,115,18,11,99,227,132,59,
-100,148,62,106,109,13,168,90,106,122,11,207,14,228,157,255,9,147,39,174,0,10,177,158,7,125,68,147,15,240,210,163,8,135,104,242,1,30,254,194,6,105,93,87,98,247,203,103,101,128,113,54,108,25,231,6,107,110,118,27,212,254,224,43,211,137,90,122,218,16,204,74,221,103,111,223,185,249,249,239,190,142,67,190,183,23,213,142,176,96,232,163,214,214,126,147,209,161,196,194,216,56,82,242,223,79,241,103,187,209,103,87,188,166,221,6,181,63,75,54,178,72,218,43,13,216,76,27,10,175,246,74,3,54,96,122,4,65,195,239,96,
-223,85,223,103,168,239,142,110,49,121,190,105,70,140,179,97,203,26,131,102,188,160,210,111,37,54,226,104,82,149,119,12,204,3,71,11,187,185,22,2,34,47,38,5,85,190,59,186,197,40,11,189,178,146,90,180,43,4,106,179,92,167,255,215,194,49,207,208,181,139,158,217,44,29,174,222,91,176,194,100,155,38,242,99,236,156,163,106,117,10,147,109,2,169,6,9,156,63,54,14,235,133,103,7,114,19,87,0,5,130,74,191,149,20,122,184,226,174,43,177,123,56,27,182,12,155,142,210,146,13,190,213,229,183,239,220,124,33,223,219,11,
-212,210,211,134,66,226,212,241,248,179,221,104,110,131,218,31,205,22,190,129,91,38,185,246,225,119,176,111,119,71,183,24,230,90,8,136,112,106,15,255,202,59,6,102,92,11,1,17,255,158,101,143,105,174,98,248,211,255,107,97,69,207,108,22,120,226,10,160,238,210,13,215,84,131,4,78,194,179,3,57,97,38,103,167,247,22,96,208,77,71,105,73,219,119,110,62,74,106,209,174,220,90,214,217,102,11,223,64,240,59,216,55,83,174,188,169,197,158,187,222,127,207,178,71,233,255,181,48,28,242,189,189,138,194,186,202,48,147,
-179,83,166,163,180,36,5,54,208,186,147,6,215,205,41],"i8",L,l.J+20497);D([87,222,84,191,103,217,35,46,122,102,179,184,74,97,196,2,27,104,93,148,43,111,42,55,190,11,180,161,142,12,195,27,223,5,90,141,239,2,45,0,0,0,0,65,49,27,25,130,98,54,50,195,83,45,43,4,197,108,100,69,244,119,125,134,167,90,86,199,150,65,79,8,138,217,200,73,187,194,209,138,232,239,250,203,217,244,227,12,79,181,172,77,126,174,181,142,45,131,158,207,28,152,135,81,18,194,74,16,35,217,83,211,112,244,120,146,65,239,97,85,215,174,46,
-20,230,181,55,215,181,152,28,150,132,131,5,89,152,27,130,24,169,0,155,219,250,45,176,154,203,54,169,93,93,119,230,28,108,108,255,223,63,65,212,158,14,90,205,162,36,132,149,227,21,159,140,32,70,178,167,97,119,169,190,166,225,232,241,231,208,243,232,36,131,222,195,101,178,197,218,170,174,93,93,235,159,70,68,40,204,107,111,105,253,112,118,174,107,49,57,239,90,42,32,44,9,7,11,109,56,28,18,243,54,70,223,178,7,93,198,113,84,112,237,48,101,107,244,247,243,42,187,182,194,49,162,117,145,28,137,52,160,7,144,
-251,188,159,23,186,141,132,14,121,222,169,37,56,239,178,60,255,121,243,115,190,72,232,106,125,27,197,65,60,42,222,88,5,79,121,240,68,126,98,233,135,45,79,194,198,28,84,219,1,138,21,148,64,187,14,141,131,232,35,166,194,217,56,191,13,197,160,56,76,244,187,33,143,167,150,10,206,150,141,19,9,0,204,92,72,49,215,69,139,98,250,110,202,83,225,119,84,93,187,186,21,108,160,163,214,63,141,136,151,14,150,145,80,152,215,222,17,169,204,199,210,250,225,236,147,203,250,245,92,215,98,114,29,230,121,107,222,181,84,
-64,159,132,79,89,88,18,14,22,25,35,21,15,218,112,56,36,155,65,35,61,167,107,253,101,230,90,230,124,37,9,203,87,100,56,208,78,163,174,145,1,226,159,138,24,33,204,167,51,96,253,188,42,175,225,36,173,238,208,63,180,45,131,18,159,108,178,9,134,171,36,72,201,234,21,83,208,41,70,126,251,104,119,101,226,246,121,63,47,183,72,36,54,116,27,9,29,53,42,18,4,242,188,83,75,179,141,72,82,112,222,101,121,49,239,126,96,254,243,230,231,191,194,253,254,124,145,208,213,61,160,203,204,250,54,138,131,187,7,145,154,120,
-84,188,177,57,101,167,168,75,152,131,59,10,169,152,34,201,250,181,9,136,203,174,16,79,93,239,95,14,108,244,70,205,63,217,109,140,14,194,116,67,18,90,243,2,35,65,234,193,112,108,193,128,65,119,216,71,215,54,151,6,230,45,142,197,181,0,165,132,132,27,188,26,138,65,113,91,187,90,104,152,232,119,67,217,217,108,90,30,79,45,21,95,126,54,12,156,45,27,39,221,28,0,62,18,0,152,185,83,49,131,160,144,98,174,139,209,83,181,146,22,197,244,221,87,244,239,196,148,167,194,239,213,150,217,246,233,188,7,174,168,141,
-28,183,107,222,49,156,42,239,42,133,237,121,107,202,172,72,112,211,111,27,93,248,46,42,70,225,225,54,222,102,160,7,197,127,99,84,232,84,34,101,243,77,229,243,178,2,164,194,169,27,103,145,132,48,38,160,159,41,184,174,197,228,249,159,222,253,58,204,243,214,123,253,232,207,188,107,169,128,253,90,178,153,62,9,159,178,127,56,132,171,176,36,28,44,241,21,7,53,50,70,42,30,115,119,49,7,180,225,112,72,245,208,107,81,54,131,70,122,119,178,93,99,78,215,250,203,15,230,225,210,204,181,204,249,141,132,215,224,74,
-18,150,175,11,35,141,182,200,112,160,157,137,65,187,132,70,93,35,3,7,108,56,26,196,63,21,49,133,14,14,40,66,152,79,103,3,169,84,126,192,250,121,85,129,203,98,76,31,197,56,129,94,244,35,152,157,167,14,179,220,150,21,170,27,0,84,229,90,49,79,252,153,98,98,215,216,83,121,206,23,79,225,73,86,126,250,80,149,45,215,123,212,28,204,98,19,138,141,45,82,187,150,52,145,232,187,31,208,217,160,6,236,243,126,94,173,194,101,71,110,145,72,108,47,160,83,117,232,54,18,58,169,7,9,35,106,84,36,8,43,101,63,17,228,121,
-167,150,165,72,188,143,102,27,145,164,39,42,138,189,224,188,203,242,161,141,208,235,98,222,253,192,35,239,230,217,189,225,188,20,252,208,167,13,63,131,138,38,126,178,145,63,185,36,208,112,248,21,203,105,59,70,230,66,122,119,253,91,181,107,101,220,244,90,126,197,55,9,83,238,118,56,72,247,177,174,9,184,240,159,18,161,51,204,63,138,114,253,36,147,0,0,0,0,55,106,194,1,110,212,132,3,89,190,70,2,220,168,9,7,235,194,203,6,178,124,141,4,133,22,79,5,184,81,19,14,143,59,209,15,214,133,151,13,225,239,85,12,
-100,249,26,9,83,147,216,8,10,45,158,10,61,71,92,11,112,163,38,28,71,201,228,29,30,119,162,31,41,29,96,30,172,11,47,27,155,97,237,26,194,223,171,24,245,181,105,25,200,242,53,18,255,152,247,19,166,38,177,17,145,76,115,16,20,90,60,21,35,48,254,20,122,142,184,22,77,228,122,23,224,70,77,56,215,44,143,57,142,146,201,59,185,248,11,58,60,238,68,63,11,132,134,62,82,58,192,60,101,80,2,61,88,23,94,54,111,125,156,55,54,195,218,53,1,169,24,52,132,191,87,49,179,213,149,48,234,107,211,50,221,1,17,51,144,229,107,
-36,167,143,169,37,254,49,239,39,201,91,45,38,76,77,98,35,123,39,160,34,34,153,230,32,21,243,36,33,40,180,120,42,31,222,186,43,70,96,252,41,113,10,62,40,244,28,113,45,195,118,179,44,154,200,245,46,173,162,55,47,192,141,154,112,247,231,88,113,174,89,30,115,153,51,220,114,28,37,147,119,43,79,81,118,114,241,23,116,69,155,213,117,120,220,137,126,79,182,75,127,22,8,13,125,33,98,207,124,164,116,128,121,147,30,66,120,202,160,4,122,253,202,198,123,176,46,188,108,135,68,126,109,222,250,56,111,233,144,250,110,
-108,134,181,107,91,236,119,106,2,82,49,104,53,56,243,105,8,127,175,98,63,21,109,99,102,171,43,97,81,193,233,96,212,215,166,101,227,189,100,100,186,3,34,102,141,105,224,103,32,203,215,72,23,161,21,73,78,31,83,75,121,117,145,74,252,99,222,79,203,9,28,78,146,183,90,76,165,221,152,77,152,154,196,70,175,240,6,71,246,78,64,69,193,36,130,68,68,50,205,65,115,88,15,64,42,230,73,66,29,140,139,67,80,104,241,84,103,2,51,85,62,188,117,87,9,214,183,86,140,192,248,83,187,170,58,82,226,20,124,80,213,126,190,81,232,
-57,226,90,223,83,32,91,134,237,102,89,177,135,164,88,52,145,235,93,3,251,41,92,90,69,111,94,109,47,173,95,128,27,53,225,183,113,247,224,238,207,177,226,217,165,115,227,92,179,60,230,107,217,254,231,50,103,184,229,5,13,122,228,56,74,38,239,15,32,228,238,86,158,162,236,97,244,96,237,228,226,47,232,211,136,237,233,138,54,171,235,189,92,105,234,240,184,19,253,199,210,209,252,158,108,151,254,169,6,85,255,44,16,26,250,27,122,216,251,66,196,158,249,117,174,92,248,72,233,0,243,127,131,194,242,38,61,132,240,
-17,87,70,241,148,65,9,244,163,43,203,245,250,149,141,247,205,255,79,246,96,93,120,217,87,55,186,216,14,137,252,218,57,227,62,219,188,245,113,222,139,159,179,223,210,33,245,221,229,75,55,220,216,12,107,215,239,102,169,214,182,216,239,212,129,178,45,213,4,164,98,208,51,206,160,209,106,112,230,211,93,26,36,210,16,254,94,197,39,148,156,196,126,42,218,198,73,64,24,199,204,86,87,194,251,60,149,195,162,130,211,193,149,232,17,192,168,175,77,203,159,197,143,202,198,123,201,200,241,17,11,201,116,7,68,204,67,
-109,134,205,26,211,192,207,45,185,2,206,64,150,175,145,119,252,109,144,46,66,43,146,25,40,233,147,156,62,166,150,171,84,100,151,242,234,34,149,197,128,224,148,248,199,188,159,207,173,126,158,150,19,56,156,161,121,250,157,36,111,181,152,19,5,119,153,74,187,49,155,125,209,243,154,48,53,137,141,7,95,75,140,94,225,13,142,105,139,207,143,236,157,128,138,219,247,66,139,130,73,4,137,181,35,198,136,136,100,154,131,191,14,88,130,230,176,30,128,209,218,220,129,84,204,147,132,99,166,81,133,58,24,23,135,13,114,
-213,134,160,208,226,169,151,186,32,168,206,4,102,170,249,110,164,171,124,120,235,174,75,18,41,175,18,172,111,173,37,198,173,172,24,129,241,167,47,235,51,166,118,85,117,164,65,63,183,165,196,41,248,160,243,67,58,161,170,253,124,163,157,151,190,162,208,115,196,181,231,25,6,180,190,167,64,182,137,205,130,183,12,219,205,178,59,177,15,179,98,15,73,177,85,101,139,176,104,34,215,187,95,72,21,186,6,246,83,184,49,156,145,185,180,138,222,188,131,224,28,189,218,94,90,191,237,52,152,190,0,0,0,0,101,103,188,184,
-139,200,9,170,238,175,181,18,87,151,98,143,50,240,222,55,220,95,107,37,185,56,215,157,239,40,180,197,138,79,8,125,100,224,189,111,1,135,1,215,184,191,214,74,221,216,106,242,51,119,223,224,86,16,99,88,159,87,25,80,250,48,165,232,20,159,16,250,113,248,172,66,200,192,123,223,173,167,199,103,67,8,114,117,38,111,206,205,112,127,173,149,21,24,17,45,251,183,164,63,158,208,24,135,39,232,207,26,66,143,115,162,172,32,198,176,201,71,122,8,62,175,50,160,91,200,142,24,181,103,59,10,208,0,135,178,105,56,80,47,
-12,95,236,151,226,240,89,133,135,151,229,61,209,135,134,101,180,224,58,221,90,79,143,207,63,40,51,119,134,16,228,234,227,119,88,82,13,216,237,64,104,191,81,248,161,248,43,240,196,159,151,72,42,48,34,90,79,87,158,226,246,111,73,127,147,8,245,199,125,167,64,213,24,192,252,109,78,208,159,53,43,183,35,141,197,24,150,159,160,127,42,39,25,71,253,186,124,32,65,2,146,143,244,16,247,232,72,168,61,88,20,155,88,63,168,35,182,144,29,49,211,247,161,137,106,207,118,20,15,168,202,172,225,7,127,190,132,96,195,6,
-210,112,160,94,183,23,28,230,89,184,169,244,60,223,21,76,133,231,194,209,224,128,126,105,14,47,203,123,107,72,119,195,162,15,13,203,199,104,177,115,41,199,4,97,76,160,184,217,245,152,111,68,144,255,211,252,126,80,102,238,27,55,218,86,77,39,185,14,40,64,5,182,198,239,176,164,163,136,12,28,26,176,219,129,127,215,103,57,145,120,210,43,244,31,110,147,3,247,38,59,102,144,154,131,136,63,47,145,237,88,147,41,84,96,68,180,49,7,248,12,223,168,77,30,186,207,241,166,236,223,146,254,137,184,46,70,103,23,155,
-84,2,112,39,236,187,72,240,113,222,47,76,201,48,128,249,219,85,231,69,99,156,160,63,107,249,199,131,211,23,104,54,193,114,15,138,121,203,55,93,228,174,80,225,92,64,255,84,78,37,152,232,246,115,136,139,174,22,239,55,22,248,64,130,4,157,39,62,188,36,31,233,33,65,120,85,153,175,215,224,139,202,176,92,51,59,182,89,237,94,209,229,85,176,126,80,71,213,25,236,255,108,33,59,98,9,70,135,218,231,233,50,200,130,142,142,112,212,158,237,40,177,249,81,144,95,86,228,130,58,49,88,58,131,9,143,167,230,110,51,31,8,
-193,134,13,109,166,58,181,164,225,64,189,193,134,252,5,47,41,73,23,74,78,245,175,243,118,34,50,150,17,158,138,120,190,43,152,29,217,151,32,75,201,244,120,46,174,72,192,192,1,253,210,165,102,65,106,28,94,150,247,121,57,42,79,151,150,159,93,242,241,35,229,5,25,107,77,96,126,215,245,142,209,98,231,235,182,222,95,82,142,9,194,55,233,181,122,217,70,0,104,188,33,188,208,234,49,223,136,143,86,99,48,97,249,214,34,4,158,106,154,189,166,189,7,216,193,1,191,54,110,180,173,83,9,8,21,154,78,114,29,255,41,206,
-165,17,134,123,183,116,225,199,15,205,217,16,146,168,190,172,42,70,17,25,56,35,118,165,128,117,102,198,216,16,1,122,96,254,174,207,114,155,201,115,202,34,241,164,87,71,150,24,239,169,57,173,253,204,94,17,69,6,238,77,118,99,137,241,206,141,38,68,220,232,65,248,100,81,121,47,249,52,30,147,65,218,177,38,83,191,214,154,235,233,198,249,179,140,161,69,11,98,14,240,25,7,105,76,161,190,81,155,60,219,54,39,132,53,153,146,150,80,254,46,46,153,185,84,38,252,222,232,158,18,113,93,140,119,22,225,52,206,46,54,
-169,171,73,138,17,69,230,63,3,32,129,131,187,118,145,224,227,19,246,92,91,253,89,233,73,152,62,85,241,33,6,130,108,68,97,62,212,170,206,139,198,207,169,55,126,56,65,127,214,93,38,195,110,179,137,118,124,214,238,202,196,111,214,29,89,10,177,161,225,228,30,20,243,129,121,168,75,215,105,203,19,178,14,119,171,92,161,194,185,57,198,126,1,128,254,169,156,229,153,21,36,11,54,160,54,110,81,28,142,167,22,102,134,194,113,218,62,44,222,111,44,73,185,211,148,240,129,4,9,149,230,184,177,123,73,13,163,30,46,177,
-27,72,62,210,67,45,89,110,251,195,246,219,233,166,145,103,81,31,169,176,204,122,206,12,116,148,97,185,102,241,6,5,222,0,0,0,0,119,7,48,150,238,14,97,44,153,9,81,186,7,109,196,25,112,106,244,143,233,99,165,53,158,100,149,163,14,219,136,50,121,220,184,164,224,213,233,30,151,210,217,136,9,182,76,43,126,177,124,189,231,184,45,7,144,191,29,145,29,183,16,100,106,176,32,242,243,185,113,72,132,190,65,222,26,218,212,125,109,221,228,235,244,212,181,81,131,211,133,199,19,108,152,86,100,107,168,192,253,98,249,
-122,138,101,201,236,20,1,92,79,99,6,108,217,250,15,61,99,141,8,13,245,59,110,32,200,76,105,16,94,213,96,65,228,162,103,113,114,60,3,228,209,75,4,212,71,210,13,133,253,165,10,181,107,53,181,168,250,66,178,152,108,219,187,201,214,172,188,249,64,50,216,108,227,69,223,92,117,220,214,13,207,171,209,61,89,38,217,48,172,81,222,0,58,200,215,81,128,191,208,97,22,33,180,244,181,86,179,196,35,207,186,149,153,184,189,165,15,40,2,184,158,95,5,136,8,198,12,217,178,177,11,233,36,47,111,124,135,88,104,76,17,193,
-97,29,171,182,102,45,61,118,220,65,144,1,219,113,6,152,210,32,188,239,213,16,42,113,177,133,137,6,182,181,31,159,191,228,165,232,184,212,51,120,7,201,162,15,0,249,52,150,9,168,142,225,14,152,24,127,106,13,187,8,109,61,45,145,100,108,151,230,99,92,1,107,107,81,244,28,108,97,98,133,101,48,216,242,98,0,78,108,6,149,237,27,1,165,123,130,8,244,193,245,15,196,87,101,176,217,198,18,183,233,80,139,190,184,234,252,185,136,124,98,221,29,223,21,218,45,73,140,211,124,243,251,212,76,101,77,178,97,88,58,181,81,
-206,163,188,0,116,212,187,48,226,74,223,165,65,61,216,149,215,164,209,196,109,211,214,244,251,67,105,233,106,52,110,217,252,173,103,136,70,218,96,184,208,68,4,45,115,51,3,29,229,170,10,76,95,221,13,124,201,80,5,113,60,39,2,65,170,190,11,16,16,201,12,32,134,87,104,181,37,32,111,133,179,185,102,212,9,206,97,228,159,94,222,249,14,41,217,201,152,176,208,152,34,199,215,168,180,89,179,61,23,46,180,13,129,183,189,92,59,192,186,108,173,237,184,131,32,154,191,179,182,3,182,226,12,116,177,210,154,234,213,71,
-57,157,210,119,175,4,219,38,21,115,220,22,131,227,99,11,18,148,100,59,132,13,109,106,62,122,106,90,168,228,14,207,11,147,9,255,157,10,0,174,39,125,7,158,177,240,15,147,68,135,8,163,210,30,1,242,104,105,6,194,254,247,98,87,93,128,101,103,203,25,108,54,113,110,107,6,231,254,212,27,118,137,211,43,224,16,218,122,90,103,221,74,204,249,185,223,111,142,190,239,249,23,183,190,67,96,176,142,213,214,214,163,232,161,209,147,126,56,216,194,196,79,223,242,82,209,187,103,241,166,188,87,103,63,181,6,221,72,178,
-54,75,216,13,43,218,175,10,27,76,54,3,74,246,65,4,122,96,223,96,239,195,168,103,223,85,49,110,142,239,70,105,190,121,203,97,179,140,188,102,131,26,37,111,210,160,82,104,226,54,204,12,119,149,187,11,71,3,34,2,22,185,85,5,38,47,197,186,59,190,178,189,11,40,43,180,90,146,92,179,106,4,194,215,255,167,181,208,207,49,44,217,158,139,91,222,174,29,155,100,194,176,236,99,242,38,117,106,163,156,2,109,147,10,156,9,6,169,235,14,54,63,114,7,103,133,5,0,87,19,149,191,74,130,226,184,122,20,123,177,43,174,12,182,
-27,56,146,210,142,155,229,213,190,13,124,220,239,183,11,219,223,33,134,211,210,212,241,212,226,66,104,221,179,248,31,218,131,110,129,190,22,205,246,185,38,91,111,176,119,225,24,183,71,119,136,8,90,230,255,15,106,112,102,6,59,202,17,1,11,92,143,101,158,255,248,98,174,105,97,107,255,211,22,108,207,69,160,10,226,120,215,13,210,238,78,4,131,84,57,3,179,194,167,103,38,97,208,96,22,247,73,105,71,77,62,110,119,219,174,209,106,74,217,214,90,220,64,223,11,102,55,216,59,240,169,188,174,83,222,187,158,197,71,
-178,207,127,48,181,255,233,189,189,242,28,202,186,194,138,83,179,147,48,36,180,163,166,186,208,54,5,205,215,6,147,84,222,87,41,35,217,103,191,179,102,122,46,196,97,74,184,93,104,27,2,42,111,43,148,180,11,190,55,195,12,142,161,90,5,223,27,45,2,239,141,0,0,0,0,25,27,49,65,50,54,98,130,43,45,83,195,100,108,197,4,125,119,244,69,86,90,167,134,79,65,150,199,200,217,138,8,209,194,187,73,250,239,232,138,227,244,217,203,172,181,79,12,181,174,126,77,158,131,45,142,135,152,28,207,74,194,18,81,83,217,35,16,120,
-244,112,211,97,239,65,146,46,174,215,85,55,181,230,20,28,152,181,215,5,131,132,150,130,27,152,89,155,0,169,24,176,45,250,219,169,54,203,154,230,119,93,93,255,108,108,28,212,65,63,223,205,90,14,158,149,132,36,162,140,159,21,227,167,178,70,32,190,169,119,97,241,232,225,166,232,243,208,231,195,222,131,36,218,197,178,101,93,93,174,170,68,70,159,235,111,107,204,40,118,112,253,105,57,49,107,174,32,42,90,239,11,7,9,44,18,28,56,109,223,70,54,243,198,93,7,178,237,112,84,113,244,107,101,48,187,42,243,247,162,
-49,194,182,137,28,145,117,144,7,160,52,23,159,188,251,14,132,141,186,37,169,222,121,60,178,239,56,115,243,121,255,106,232,72,190,65,197,27,125,88,222,42,60,240,121,79,5,233,98,126,68,194,79,45,135,219,84,28,198,148,21,138,1,141,14,187,64,166,35,232,131,191,56,217,194,56,160,197,13,33,187,244,76,10,150,167,143,19,141,150,206,92,204,0,9,69,215,49,72,110,250,98,139,119,225,83,202,186,187,93,84,163,160,108,21,136,141,63,214,145,150,14,151,222,215,152,80,199,204,169,17,236,225,250,210,245,250,203,147,
-114,98,215,92,107,121,230,29,64,84,181,222,89,79,132,159,22,14,18,88,15,21,35,25,36,56,112,218,61,35,65,155,101,253,107,167,124,230,90,230,87,203,9,37,78,208,56,100,1,145,174,163,24,138,159,226,51,167,204,33,42,188,253,96,173,36,225,175,180,63,208,238,159,18,131,45,134,9,178,108,201,72,36,171,208,83,21,234,251,126,70,41,226,101,119,104,47,63,121,246,54,36,72,183,29,9,27,116,4,18,42,53,75,83,188,242,82,72,141,179,121,101,222,112,96,126,239,49,231,230,243,254,254,253,194,191,213,208,145,124,204,203,
-160,61,131,138,54,250,154,145,7,187,177,188,84,120,168,167,101,57,59,131,152,75,34,152,169,10,9,181,250,201,16,174,203,136,95,239,93,79,70,244,108,14,109,217,63,205,116,194,14,140,243,90,18,67,234,65,35,2,193,108,112,193,216,119,65,128,151,54,215,71,142,45,230,6,165,0,181,197,188,27,132,132,113,65,138,26,104,90,187,91,67,119,232,152,90,108,217,217,21,45,79,30,12,54,126,95,39,27,45,156,62,0,28,221,185,152,0,18,160,131,49,83,139,174,98,144,146,181,83,209,221,244,197,22,196,239,244,87,239,194,167,148,
-246,217,150,213,174,7,188,233,183,28,141,168,156,49,222,107,133,42,239,42,202,107,121,237,211,112,72,172,248,93,27,111,225,70,42,46,102,222,54,225,127,197,7,160,84,232,84,99,77,243,101,34,2,178,243,229,27,169,194,164,48,132,145,103,41,159,160,38,228,197,174,184,253,222,159,249,214,243,204,58,207,232,253,123,128,169,107,188,153,178,90,253,178,159,9,62,171,132,56,127,44,28,36,176,53,7,21,241,30,42,70,50,7,49,119,115,72,112,225,180,81,107,208,245,122,70,131,54,99,93,178,119,203,250,215,78,210,225,230,
-15,249,204,181,204,224,215,132,141,175,150,18,74,182,141,35,11,157,160,112,200,132,187,65,137,3,35,93,70,26,56,108,7,49,21,63,196,40,14,14,133,103,79,152,66,126,84,169,3,85,121,250,192,76,98,203,129,129,56,197,31,152,35,244,94,179,14,167,157,170,21,150,220,229,84,0,27,252,79,49,90,215,98,98,153,206,121,83,216,73,225,79,23,80,250,126,86,123,215,45,149,98,204,28,212,45,141,138,19,52,150,187,82,31,187,232,145,6,160,217,208,94,126,243,236,71,101,194,173,108,72,145,110,117,83,160,47,58,18,54,232,35,9,
-7,169,8,36,84,106,17,63,101,43,150,167,121,228,143,188,72,165,164,145,27,102,189,138,42,39,242,203,188,224,235,208,141,161,192,253,222,98,217,230,239,35,20,188,225,189,13,167,208,252,38,138,131,63,63,145,178,126,112,208,36,185,105,203,21,248,66,230,70,59,91,253,119,122,220,101,107,181,197,126,90,244,238,83,9,55,247,72,56,118,184,9,174,177,161,18,159,240,138,63,204,51,147,36,253,114,0,0,0,0,1,194,106,55,3,132,212,110,2,70,190,89,7,9,168,220,6,203,194,235,4,141,124,178,5,79,22,133,14,19,81,184,15,209,
-59,143,13,151,133,214,12,85,239,225,9,26,249,100,8,216,147,83,10,158,45,10,11,92,71,61,28,38,163,112,29,228,201,71,31,162,119,30,30,96,29,41,27,47,11,172,26,237,97,155,24,171,223,194,25,105,181,245,18,53,242,200,19,247,152,255,17,177,38,166,16,115,76,145,21,60,90,20,20,254,48,35,22,184,142,122,23,122,228,77,56,77,70,224,57,143,44,215,59,201,146,142,58,11,248,185,63,68,238,60,62,134,132,11,60,192,58,82,61,2,80,101,54,94,23,88,55,156,125,111,53,218,195,54,52,24,169,1,49,87,191,132,48,149,213,179,50,
-211,107,234,51,17,1,221,36,107,229,144,37,169,143,167,39,239,49,254,38,45,91,201,35,98,77,76,34,160,39,123,32,230,153,34,33,36,243,21,42,120,180,40,43,186,222,31,41,252,96,70,40,62,10,113,45,113,28,244,44,179,118,195,46,245,200,154,47,55,162,173,112,154,141,192,113,88,231,247,115,30,89,174,114,220,51,153,119,147,37,28,118,81,79,43,116,23,241,114,117,213,155,69,126,137,220,120,127,75,182,79,125,13,8,22,124,207,98,33,121,128,116,164,120,66,30,147,122,4,160,202,123,198,202,253,108,188,46,176,109,126,
-68,135,111,56,250,222,110,250,144,233,107,181,134,108,106,119,236,91,104,49,82,2,105,243,56,53,98,175,127,8,99,109,21,63,97,43,171,102,96,233,193,81,101,166,215,212,100,100,189,227,102,34,3,186,103,224,105,141,72,215,203,32,73,21,161,23,75,83,31,78,74,145,117,121,79,222,99,252,78,28,9,203,76,90,183,146,77,152,221,165,70,196,154,152,71,6,240,175,69,64,78,246,68,130,36,193,65,205,50,68,64,15,88,115,66,73,230,42,67,139,140,29,84,241,104,80,85,51,2,103,87,117,188,62,86,183,214,9,83,248,192,140,82,58,
-170,187,80,124,20,226,81,190,126,213,90,226,57,232,91,32,83,223,89,102,237,134,88,164,135,177,93,235,145,52,92,41,251,3,94,111,69,90,95,173,47,109,225,53,27,128,224,247,113,183,226,177,207,238,227,115,165,217,230,60,179,92,231,254,217,107,229,184,103,50,228,122,13,5,239,38,74,56,238,228,32,15,236,162,158,86,237,96,244,97,232,47,226,228,233,237,136,211,235,171,54,138,234,105,92,189,253,19,184,240,252,209,210,199,254,151,108,158,255,85,6,169,250,26,16,44,251,216,122,27,249,158,196,66,248,92,174,117,
-243,0,233,72,242,194,131,127,240,132,61,38,241,70,87,17,244,9,65,148,245,203,43,163,247,141,149,250,246,79,255,205,217,120,93,96,216,186,55,87,218,252,137,14,219,62,227,57,222,113,245,188,223,179,159,139,221,245,33,210,220,55,75,229,215,107,12,216,214,169,102,239,212,239,216,182,213,45,178,129,208,98,164,4,209,160,206,51,211,230,112,106,210,36,26,93,197,94,254,16,196,156,148,39,198,218,42,126,199,24,64,73,194,87,86,204,195,149,60,251,193,211,130,162,192,17,232,149,203,77,175,168,202,143,197,159,200,
-201,123,198,201,11,17,241,204,68,7,116,205,134,109,67,207,192,211,26,206,2,185,45,145,175,150,64,144,109,252,119,146,43,66,46,147,233,40,25,150,166,62,156,151,100,84,171,149,34,234,242,148,224,128,197,159,188,199,248,158,126,173,207,156,56,19,150,157,250,121,161,152,181,111,36,153,119,5,19,155,49,187,74,154,243,209,125,141,137,53,48,140,75,95,7,142,13,225,94,143,207,139,105,138,128,157,236,139,66,247,219,137,4,73,130,136,198,35,181,131,154,100,136,130,88,14,191,128,30,176,230,129,220,218,209,132,
-147,204,84,133,81,166,99,135,23,24,58,134,213,114,13,169,226,208,160,168,32,186,151,170,102,4,206,171,164,110,249,174,235,120,124,175,41,18,75,173,111,172,18,172,173,198,37,167,241,129,24,166,51,235,47,164,117,85,118,165,183,63,65,160,248,41,196,161,58,67,243,163,124,253,170,162,190,151,157,181,196,115,208,180,6,25,231,182,64,167,190,183,130,205,137,178,205,219,12,179,15,177,59,177,73,15,98,176,139,101,85,187,215,34,104,186,21,72,95,184,83,246,6,185,145,156,49,188,222,138,180,189,28,224,131,191,90,
-94,218,190,152,52,237,0,0,0,0,184,188,103,101,170,9,200,139,18,181,175,238,143,98,151,87,55,222,240,50,37,107,95,220,157,215,56,185,197,180,40,239,125,8,79,138,111,189,224,100,215,1,135,1,74,214,191,184,242,106,216,221,224,223,119,51,88,99,16,86,80,25,87,159,232,165,48,250,250,16,159,20,66,172,248,113,223,123,192,200,103,199,167,173,117,114,8,67,205,206,111,38,149,173,127,112,45,17,24,21,63,164,183,251,135,24,208,158,26,207,232,39,162,115,143,66,176,198,32,172,8,122,71,201,160,50,175,62,24,142,200,
-91,10,59,103,181,178,135,0,208,47,80,56,105,151,236,95,12,133,89,240,226,61,229,151,135,101,134,135,209,221,58,224,180,207,143,79,90,119,51,40,63,234,228,16,134,82,88,119,227,64,237,216,13,248,81,191,104,240,43,248,161,72,151,159,196,90,34,48,42,226,158,87,79,127,73,111,246,199,245,8,147,213,64,167,125,109,252,192,24,53,159,208,78,141,35,183,43,159,150,24,197,39,42,127,160,186,253,71,25,2,65,32,124,16,244,143,146,168,72,232,247,155,20,88,61,35,168,63,88,49,29,144,182,137,161,247,211,20,118,207,106,
-172,202,168,15,190,127,7,225,6,195,96,132,94,160,112,210,230,28,23,183,244,169,184,89,76,21,223,60,209,194,231,133,105,126,128,224,123,203,47,14,195,119,72,107,203,13,15,162,115,177,104,199,97,4,199,41,217,184,160,76,68,111,152,245,252,211,255,144,238,102,80,126,86,218,55,27,14,185,39,77,182,5,64,40,164,176,239,198,28,12,136,163,129,219,176,26,57,103,215,127,43,210,120,145,147,110,31,244,59,38,247,3,131,154,144,102,145,47,63,136,41,147,88,237,180,68,96,84,12,248,7,49,30,77,168,223,166,241,207,186,
-254,146,223,236,70,46,184,137,84,155,23,103,236,39,112,2,113,240,72,187,201,76,47,222,219,249,128,48,99,69,231,85,107,63,160,156,211,131,199,249,193,54,104,23,121,138,15,114,228,93,55,203,92,225,80,174,78,84,255,64,246,232,152,37,174,139,136,115,22,55,239,22,4,130,64,248,188,62,39,157,33,233,31,36,153,85,120,65,139,224,215,175,51,92,176,202,237,89,182,59,85,229,209,94,71,80,126,176,255,236,25,213,98,59,33,108,218,135,70,9,200,50,233,231,112,142,142,130,40,237,158,212,144,81,249,177,130,228,86,95,
-58,88,49,58,167,143,9,131,31,51,110,230,13,134,193,8,181,58,166,109,189,64,225,164,5,252,134,193,23,73,41,47,175,245,78,74,50,34,118,243,138,158,17,150,152,43,190,120,32,151,217,29,120,244,201,75,192,72,174,46,210,253,1,192,106,65,102,165,247,150,94,28,79,42,57,121,93,159,150,151,229,35,241,242,77,107,25,5,245,215,126,96,231,98,209,142,95,222,182,235,194,9,142,82,122,181,233,55,104,0,70,217,208,188,33,188,136,223,49,234,48,99,86,143,34,214,249,97,154,106,158,4,7,189,166,189,191,1,193,216,173,180,
-110,54,21,8,9,83,29,114,78,154,165,206,41,255,183,123,134,17,15,199,225,116,146,16,217,205,42,172,190,168,56,25,17,70,128,165,118,35,216,198,102,117,96,122,1,16,114,207,174,254,202,115,201,155,87,164,241,34,239,24,150,71,253,173,57,169,69,17,94,204,118,77,238,6,206,241,137,99,220,68,38,141,100,248,65,232,249,47,121,81,65,147,30,52,83,38,177,218,235,154,214,191,179,249,198,233,11,69,161,140,25,240,14,98,161,76,105,7,60,155,81,190,132,39,54,219,150,146,153,53,46,46,254,80,38,84,185,153,158,232,222,
-252,140,93,113,18,52,225,22,119,169,54,46,206,17,138,73,171,3,63,230,69,187,131,129,32,227,224,145,118,91,92,246,19,73,233,89,253,241,85,62,152,108,130,6,33,212,62,97,68,198,139,206,170,126,55,169,207,214,127,65,56,110,195,38,93,124,118,137,179,196,202,238,214,89,29,214,111,225,161,177,10,243,20,30,228,75,168,121,129,19,203,105,215,171,119,14,178,185,194,161,92,1,126,198,57,156,169,254,128,36,21,153,229,54,160,54,11,142,28,81,110,134,102,22,167,62,218,113,194,44,111,222,44,148,211,185,73,9,4,129,
-240,177,184,230,149,163,13,73,123,27,177,46,30,67,210,62,72,251,110,89,45,233,219,246,195,81,103,145,166,204,176,169,31,116,12,206,122,102,185,97,148,222,5,6,241,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,
-50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,
-27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,
-63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,
-97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,
-218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,
-227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,
-124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,
-81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,
-50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,
-27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,
-63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,
-97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,
-218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,227,63,81,218,27,124,97,50,
-227,63,81,218,27,124,97,50,227,63,12,0,0,0,4,0,0,0,6,0,0,0,2,0,0,0,3,0,0,0,1,0,0,0,9,0,0,0,8,0,0,0,11,0,0,0,12,0,0,0,13,0,0,0,14,0,0,0,15,0,0,0,16,0,0,0,17,0,0,0,18,0,0,0,21,0,0,0,22,0,0,0,23,0,0,0,24,0,0,0,25,0,0,0,26,0,0,0,27,0,0,0,28,0,0,0,31,0,0,0,32,0,0,0,33,0,0,0,34,0,0,0,35,0,0,0,36,0,0,0,37,0,0,0,38,0,0,0,41,0,0,0,42,0,0,0,43,0,0,0,44,0,0,0,45,0,0,0,46,0,0,0,47,0,0,0,48,0,0,0,51,0,0,0,52,0,0,0,53,0,0,0,54,0,0,0,55,0,0,0,56,0,0,0,57,0,0,0,58,0,0,0,61,0,0,0,62,0,0,0,63,0,0,0,64,0,0,0,65,0,0,
-0,66,0,0,0,67,0,0,0,68,0,0,0,71,0,0,0,72,0,0,0,73,0,0,0,74,0,0,0,75,0,0,0,76,0,0,0,77,0,0,0,78,0,0,0,81,0,0,0,82,0,0,0,83,0,0,0,84,0,0,0,85,0,0,0,86,0,0,0,87,0,0,0,88,0,0,0,8,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,108,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,86,0,0,0,4,0,4,0,8,0,4,0,106,0,0,0,4,0,5,0,16,0,8,0,106,0,0,0,4,0,6,0,32,0,32,0,106,0,0,0,4,0,4,0,16,0,16,0,132,0,0,0,8,0,16,0,32,0,32,0,132,0,0,0,8,0,16,0,128,0,128,0,132,0,0,0,8,0,32,0,128,0,0,1,132,0,0,0,32,0,128,0,2,1,0,4,132,
-0,0,0,32,0,2,1,2,1,0,16,132,0,0,0,88,247,1,0,85,93,201,127,201,127,255,0,0,196,1,0,187,45,212,190,174,212,255,0,144,167,1,0,20,119,253,253,192,134,255,0,80,145,1,0,85,93,201,127,201,127,255,0,248,122,1,0,187,45,212,190,174,212,255,0,72,101,1,0,20,119,253,253,192,134,255,0,168,80,1,0,42,102,255,255,255,153,255,0,216,61,1,0,85,93,201,127,201,127,255,0,40,142,2,0,187,45,212,190,174,212,255,0,104,125,2,0,20,119,253,253,192,134,255,0,72,109,2,0,42,102,255,255,255,153,255,0,192,89,2,0,151,173,176,56,108,
-176,255,0,32,77,2,0,85,93,201,127,201,127,255,0,216,65,2,0,187,45,212,190,174,212,255,0,136,53,2,0,20,119,253,253,192,134,255,0,0,42,2,0,42,102,255,255,255,153,255,0,152,29,2,0,151,173,176,56,108,176,255,0,128,19,2,0,232,252,240,240,2,127,255,0,24,9,2,0,85,93,201,127,201,127,255,0,88,0,2,0,187,45,212,190,174,212,255,0,200,246,1,0,20,119,253,253,192,134,255,0,16,231,1,0,42,102,255,255,255,153,255,0,192,221,1,0,151,173,176,56,108,176,255,0,16,218,1,0,232,252,240,240,2,127,255,0,176,215,1,0,17,224,191,
-191,91,23,255,0,232,211,1,0,85,93,201,127,201,127,255,0,144,208,1,0,187,45,212,190,174,212,255,0,24,205,1,0,20,119,253,253,192,134,255,0,80,202,1,0,42,102,255,255,255,153,255,0,232,197,1,0,151,173,176,56,108,176,255,0,168,193,1,0,232,252,240,240,2,127,255,0,248,192,1,0,17,224,191,191,91,23,255,0,112,189,1,0,0,0,102,102,102,102,255,0,192,186,1,0,147,25,247,222,235,247,255,0,168,184,1,0,142,75,225,158,202,225,255,0,120,181,1,0,145,188,189,49,130,189,255,0,112,180,1,0,159,16,255,239,243,255,255,0,16,
-178,1,0,143,46,231,189,215,231,255,0,80,175,1,0,143,127,214,107,174,214,255,0,120,172,1,0,147,208,181,33,113,181,255,0,72,169,1,0,159,16,255,239,243,255,255,0,8,166,1,0,143,46,231,189,215,231,255,0,136,162,1,0,143,127,214,107,174,214,255,0,152,160,1,0,145,188,189,49,130,189,255,0,24,159,1,0,149,241,156,8,81],"i8",L,l.J+30737);D([156,255,0,104,157,1,0,159,16,255,239,243,255,255,0,120,154,1,0,148,43,239,198,219,239,255,0,248,153,1,0,142,75,225,158,202,225,255,0,248,151,1,0,143,127,214,107,174,214,255,
-0,56,150,1,0,145,188,189,49,130,189,255,0,216,146,1,0,149,241,156,8,81,156,255,0,72,144,1,0,159,16,255,239,243,255,255,0,72,140,1,0,148,43,239,198,219,239,255,0,168,138,1,0,142,75,225,158,202,225,255,0,208,136,1,0,143,127,214,107,174,214,255,0,32,135,1,0,144,169,198,66,146,198,255,0,32,133,1,0,147,208,181,33,113,181,255,0,152,131,1,0,151,241,148,8,69,148,255,0,232,129,1,0,148,8,255,247,251,255,255,0,80,128,1,0,147,25,247,222,235,247,255,0,8,125,1,0,148,43,239,198,219,239,255,0,8,122,1,0,142,75,225,
-158,202,225,255,0,160,118,1,0,143,127,214,107,174,214,255,0,144,116,1,0,144,169,198,66,146,198,255,0,208,114,1,0,147,208,181,33,113,181,255,0,48,113,1,0,151,241,148,8,69,148,255,0,168,111,1,0,148,8,255,247,251,255,255,0,208,109,1,0,147,25,247,222,235,247,255,0,224,107,1,0,148,43,239,198,219,239,255,0,56,106,1,0,142,75,225,158,202,225,255,0,128,103,1,0,143,127,214,107,174,214,255,0,104,100,1,0,144,169,198,66,146,198,255,0,24,98,1,0,147,208,181,33,113,181,255,0,224,95,1,0,149,241,156,8,81,156,255,0,
-248,93,1,0,152,235,107,8,48,107,255,0,80,92,1,0,23,239,84,84,48,5,255,0,120,90,1,0,119,255,60,0,60,48,255,0,168,88,1,0,23,236,140,140,81,10,255,0,248,86,1,0,24,194,191,191,129,45,255,0,64,85,1,0,29,112,223,223,194,125,255,0,16,83,1,0,30,52,246,246,232,195,255,0,184,80,1,0,121,38,234,199,234,229,255,0,192,77,1,0,120,95,205,128,205,193,255,0,240,75,1,0,124,165,151,53,151,143,255,0,184,74,1,0,124,252,102,1,102,94,255,0,232,72,1,0,23,239,84,84,48,5,255,0,72,71,1,0,124,252,102,1,102,94,255,0,200,69,1,
-0,119,255,60,0,60,48,255,0,16,68,1,0,23,236,140,140,81,10,255,0,176,66,1,0,24,194,191,191,129,45,255,0,88,64,1,0,29,112,223,223,194,125,255,0,48,62,1,0,30,52,246,246,232,195,255,0,160,59,1,0,0,0,245,245,245,245,255,0,232,57,1,0,121,38,234,199,234,229,255,0,112,56,1,0,120,95,205,128,205,193,255,0,208,54,1,0,124,165,151,53,151,143,255,0,104,53,1,0,28,135,216,216,179,101,255,0,88,52,1,0,0,0,245,245,245,245,255,0,248,147,2,0,123,127,180,90,180,172,255,0,176,146,2,0,21,215,166,166,97,26,255,0,32,145,2,
-0,29,112,223,223,194,125,255,0,24,143,2,0,120,95,205,128,205,193,255,0,112,140,2,0,121,253,133,1,133,113,255,0,224,138,2,0,21,215,166,166,97,26,255,0,96,137,2,0,29,112,223,223,194,125,255,0,232,135,2,0,0,0,245,245,245,245,255,0,160,134,2,0,120,95,205,128,205,193,255,0,104,133,2,0,121,253,133,1,133,113,255,0,224,131,2,0,23,236,140,140,81,10,255,0,152,130,2,0,28,135,216,216,179,101,255,0,248,128,2,0,30,52,246,246,232,195,255,0,248,126,2,0,121,38,234,199,234,229,255,0,16,124,2,0,123,127,180,90,180,172,
-255,0,184,122,2,0,124,252,102,1,102,94,255,0,80,121,2,0,23,236,140,140,81,10,255,0,248,119,2,0,28,135,216,216,179,101,255,0,208,118,2,0,30,52,246,246,232,195,255,0,128,117,2,0,0,0,245,245,245,245,255,0,48,116,2,0,121,38,234,199,234,229,255,0,8,115,2,0,123,127,180,90,180,172,255,0,248,112,2,0,124,252,102,1,102,94,255,0,40,109,2,0,23,236,140,140,81,10,255,0,152,108,2,0,24,194,191,191,129,45,255,0,104,107,2,0,29,112,223,223,194,125,255,0,80,106,2,0,30,52,246,246,232,195,255,0,48,105,2,0,121,38,234,199,
-234,229,255,0,168,103,2,0,120,95,205,128,205,193,255,0,120,101,2,0,124,165,151,53,151,143,255,0,32,100,2,0,124,252,102,1,102,94,255,0,144,98,2,0,23,236,140,140,81,10,255,0,128,93,2,0,24,194,191,191,129,45,255,0,104,91,2,0,29,112,223,223,194,125,255,0,16,89,2,0,30,52,246,246,232,195,255,0,176,87,2,0,0,0,245,245,245,245,255,0,184,86,2,0,121,38,234,199,234,229,255,0,152,85,2,0,120,95,205,128,205,193,255,0,192,84,2,0,124,165,151,53,151,143,255,0,136,83,2,0,124,252,102,1,102,94,255,0,144,82,2,0,135,20,
-249,229,245,249,255,0,120,81,2,0,117,74,216,153,216,201,255,0,40,80,2,0,103,185,162,44,162,95,255,0,216,78,2,0,136,14,251,237,248,251,255,0,208,76,2,0,127,54,226,178,226,226,255,0,232,75,2,0,113,120,194,102,194,164,255,0,0,75,2,0,98,190,139,35,139,69,255,0,0,74,2,0,136,14,251,237,248,251,255,0,48,73,2,0,127,54,226,178,226,226,255,0,64,72,2,0,113,120,194,102,194,164,255,0,56,71,2,0,103,185,162,44,162,95,255,0,104,70,2,0,102,255,109,0,109,44,255,0,16,69,2,0,136,14,251,237,248,251,255,0,80,67,2,0,119,
-34,236,204,236,230,255,0,152,65,2,0,117,74,216,153,216,201,255,0,152,64,2,0,113,120,194,102,194,164,255,0,128,63,2,0,103,185,162,44,162,95,255,0,80,62,2,0,102,255,109,0,109,44,255,0,96,61,2,0,136,14,251,237,248,251,255,0,192,59,2,0,119,34,236,204,236,230,255,0,48,59,2,0,117,74,216,153,216,201,255,0,48,58,2,0,113,120,194,102,194,164,255,0,128,56,2,0,105,159,174,65,174,118,255,0,8,55,2,0,98,190,139,35,139,69,255,0,88,53,2,0,102,255,88,0,88,36,255,0,88,52,2,0,134,6,253,247,252,253,255,0,64,51,2,0,135,
-20,249,229,245,249,255,0,8,50,2,0,119,34,236,204,236,230,255,0,88,49,2,0,117,74,216,153,216,201,255,0,112,48,2,0,113,120,194,102,194,164,255,0,112,47,2,0,105,159,174,65,174,118,255,0,144,46,2,0,98,190,139,35,139,69,255,0,224,44,2,0,102,255,88,0,88,36,255,0,96,43,2,0,134,6,253,247,252,253,255,0,216,41,2,0,135,20,249,229,245,249,255,0,80,40,2,0,119,34,236,204,236,230,255,0,80,39,2,0,117,74,216,153,216,201,255,0,72,38,2,0,113,120,194,102,194,164,255,0,104,37,2,0,105,159,174,65,174,118,255,0,112,36,2,
-0,98,190,139,35,139,69,255,0,96,35,2,0,102,255,109,0,109,44,255,0,88,34,2,0,101,255,68,0,68,27,255,0,240,32,2,0,144,20,244,224,236,244,255,0,96,31,2,0,148,70,218,158,188,218,255,0,168,29,2,0,196,123,167,136,86,167,255,0,144,28,2,0,136,14,251,237,248,251,255,0,224,27,2,0,146,53,227,179,205,227,255,0,48,27,2,0,162,74,198,140,150,198,255,0,120,26,2,0,202,149,157,136,65,157,255,0,128,25,2,0,136,14,251,237,248,251,255,0,160,24,2,0,146,53,227,179,205,227,255,0,224,23,2,0,162,74,198,140,150,198,255,0,168,
-22,2,0,196,123,167,136,86,167,255,0,112,21,2,0,214,225,129,129,15,124,255,0,160,19,2,0,136,14,251,237,248,251,255,0,136,18,2,0,148,43,230,191,211,230,255,0,152,17,2,0,148,70,218,158,188,218,255,0,40,16,2,0,162,74,198,140,150,198,255,0,24,15,2,0,196,123,167,136,86,167,255,0,24,14,2,0,214,225,129,129,15,124,255,0,24,13,2,0,136,14,251,237,248,251,255,0,144,12,2,0,148,43,230,191,211,230,255,0,48,11,2,0,148,70,218,158,188,218,255,0,64,10,2,0,162,74,198,140,150,198,255,0,56,9,2,0,190,100,177,140,107,177,
-255,0,120,8,2,0,202,149,157,136,65,157,255,0,232,7,2,0,213,252,110,110,1,107,255,0,48,7,2,0,134,6,253,247,252,253,255,0,168,6,2,0,144,20,244,224,236,244,255,0,24,6,2,0,148,43,230,191,211,230,255,0,112,5,2,0,148,70,218,158,188,218,255,0,224,4,2,0,162,74,198,140,150,198,255,0,112,3,2,0,190,100,177,140,107,177,255,0,0,2,2,0,202,149,157,136,65,157,255,0,224,0,2,0,213,252,110,110,1,107,255,0,216,255,1,0,134,6,253,247,252,253,255,0,72,255,1,0,144,20,244,224,236,244,255,0,184,254,1,0,148,43,230,191,211,
-230,255,0,32,254,1,0,148,70,218,158,188,218,255,0,136,253,1,0,162,74,198,140,150,198,255,0,104,252,1,0,190,100,177,140,107,177,255,0,184,251,1,0,202,149,157,136,65,157,255,0,160,250,1,0,214,225,129,129,15,124,255,0,208,248,1,0,213,255,77,77,0,75,255,0,152,246,1,0,114,211,158,27,158,119,255,0,40,246,1,0,18,252,217,217,95,2,255,0,16,245,1,0,173,95,179,117,112,179,255,0,40,244,1,0,114,211,158,27,158,119,255,0,208,242,1,0,18,252,217,217,95,2,255,0,168,241,1,0,173,95,179,117,112,179,255,0,136,240,1,0,
-233,209,231,231,41,138,255,0,128,239,1,0,114,211,158,27,158,119,255,0,152,237,1,0,18,252,217,217,95,2,255,0,152,236,1,0,173,95,179,117,112,179,255,0,216,234,1,0,233,209,231,231,41,138,255,0,16,234,1,0,62,208,166,102,166,30,255,0,232,232,1,0,114,211,158,27,158,119,255,0,56,232,1,0,18,252,217,217,95,2,255,0,176,231,1,0,173,95,179,117,112,179,255,0,56,231,1,0,233,209,231,231,41,138,255,0,32,230,1,0,62,208,166,102,166,30,255,0,128,229,1,0,31,252,230,230,171,2,255,0,24,228,1,0,114,211,158,27,158,119,255,
-0,232,226,1,0,18,252,217,217,95,2,255,0,176,225,1,0,173,95,179,117,112,179,255,0,200,224,1,0,233,209,231,231,41,138,255,0,0,224,1,0,62,208,166,102,166,30,255,0,88,223,1,0,31,252,230,230,171,2,255,0,96,222,1,0,27,210,166,166,118,29,255,0,232,221,1,0,114,211,158,27,158,119,255,0,0,221,1,0,18,252,217,217,95,2,255,0,168,220,1,0,173,95,179,117,112,179,255,0,48,220,1,0,233,209,231,231,41,138,255,0,144,219,1,0,62,208,166,102,166,30,255,0,8,219,1,0,31,252,230,230,171,2,255,0,200,218,1,0,27,210,166,166,118,
-29,255,0,168,218,1,0,0,0,102,102,102,102,255,0,104,218,1,0,76,25,243,224,243,219,255,0,64,218,1,0,95,61,221,168,221,181,255,0,40,218,1,0,140,170,202,67,162,202,255,0,192,217,1,0,65,17,249,240,249,232,255,0,160,217,1,0,87,46,228,186,228,188,255,0,24,217,1,0,123,101,204,123,204,196,255,0,40,216,1,0,141,197,190,43,140,190,255,0,200,215,1,0,65,17,249,240,249,232,255,0,152,215,1,0,87,46,228,186,228,188,255,0,96,215,1,0,123,101,204,123,204,196,255,0,40,215,1,0,140,170,202,67,162,202,255,0,168,214,1,0,145,
-243,172,8,104,172,255,0,144,214,1,0,65,17,249,240,249,232,255,0,64,214,1,0,77,41,235,204,235,197,255,0,16,214,1,0,95,61,221,168,221,181,255,0,208,213,1,0,123,101,204,123,204,196,255,0,64,213,1,0,140,170,202,67,162,202,255,0,200,212,1,0,145,243,172,8,104,172,255,0,160,212,1,0,65,17,249,240,249,232,255,0,112,212,1,0,77,41,235,204,235,197,255,0,72,212,1,0,95,61,221,168,221,181,255,0,32,212,1,0,123,101,204,123,204,196,255,0,8,212,1,0,137,160,211,78,179,211,255,0,184,211,1,0,141,197,190,43,140,190,255,
-0,64,211,1,0,147,242,158,8,88,158,255,0,248,210,1,0,60,12,252,247,252,240,255,0,16,210,1,0,76,25,243,224,243,219,255,0,128,209,1,0,77,41,235,204,235,197,255,0,96,209,1,0,95,61,221,168,221,181,255,0,56,209,1,0,123,101,204,123,204,196,255,0,8,209,1,0,137,160,211,78,179,211,255,0,224,208,1,0,141,197,190,43,140,190,255,0,184,208,1,0,147,242,158,8,88,158,255,0,96,208,1,0,60,12,252,247,252,240,255,0,56,208,1,0,76,25,243,224,243,219,255,0,248,207,1,0,77,41,235,204,235,197,255,0,120,207,1,0,95,61,221,168,
-221,181,255,0,16,207,1,0,123,101,204,123,204,196,255,0,208,206,1,0,137,160,211,78,179,211,255,0,80,206,1,0,141,197,190,43,140,190,255,0,232,205,1,0,145,243,172,8,104,172,255,0,160,205,1,0,150,239,129,8,64,129,255,0,96,205,1,0,74,21,245,229,245,224,255,0,208,204,1,0,80,72,217,161,217,155,255,0,184,204,1,0,98,178,163,49,163,84,255,0,104,204,1,0,73,15,248,237,248,233,255,0,192,203,1,0,78,54,228,186,228,179,255,0,88,203,1,0,86,104,196,116,196,118,255,0,48,203,1,0,98,190,139,35,139,69,255,0,224,202,1,
-0,73,15,248,237,248,233,255,0,152,202,1,0,78,54,228,186,228,179,255,0,120,202,1,0,86,104,196,116,196,118,255,0,104,202,1,0,98,178,163,49,163,84,255,0,32,202,1,0,102,255,109,0,109,44,255,0,0,202,1,0,73,15,248,237,248,233,255,0,224,200,1,0,77,44,233,199,233,192,255,0,48,200,1,0,80,72,217,161,217,155,255,0,184,199,1,0,86,104,196,116,196,118,255,0,8,199,1,0,98,178,163,49,163,84,255,0,192,198,1,0,102,255,109,0,109,44,255,0,104,198,1,0,73,15,248,237,248,233,255,0,64,198,1,0,77,44,233,199,233,192,255,0,
-40,198,1,0,80,72,217,161,217,155,255,0,176,197,1,0,86,104,196,116,196,118,255,0,136,197,1,0,96,158,171,65,171,93,255,0,64,197,1,0,98,190,139,35,139,69,255,0,136,196,1,0,108,255,90,0,90,50,255,0,24,196,1,0,72,7,252,247,252,245,255,0,112,195,1,0,74,21,245,229,245,224,255,0,0,195,1,0,77,44,233,199,233,192,255,0,200,194,1,0,80,72,217,161,217,155,255,0,168,194,1,0,86,104,196,116,196,118,255,0,8,194,1,0,96,158,171,65,171,93,255,0,112,193,1,0,98,190,139,35,139,69,255,0,8,193,1,0,108,255,90,0,90,50,255,0,
-32,192,1,0,72,7,252,247,252,245,255,0,56,191,1,0,74,21,245,229,245,224,255,0,168,190,1,0,77,44,233,199,233,192,255,0,112,190,1,0,80,72,217,161,217,155,255,0,72,190,1,0,86,104,196,116,196,118,255,0,24,190,1,0,96,158,171,65,171,93,255,0,248,189,1,0,98,190,139,35,139,69,255,0,192,189,1,0,102,255,109,0,109,44,255,0,144,189,1,0,101,255,68,0,68,27,255,0,128,189,1,0,0,0,240,240,240,240,255,0,240,188,1,0,0,0,189,189,189,189,255,0,32,188,1,0,0,0,99,99,99,99,255,0,208,187,1,0,0,0,247,247,247,247,255,0,176,
-187,1,0,0,0,204,204,204,204,255,0,112,187,1,0,0,0,150,150,150,150,255,0,80,187,1,0,0,0,82,82,82,82,255,0,56,187,1,0,0,0,247,247,247,247,255,0,16,187,1,0,0,0,204,204,204,204,255,0,224,186,1,0,0,0,150,150,150,150,255,0,208,186,1,0,0,0,99,99,99,99,255,0,128,186,1,0,0,0,37,37,37,37,255,0,40,186,1,0,0,0,247,247,247,247,255,0,168,185,1,0,0,0,217,217,217,217,255,0,128,185,1,0,0,0,189,189,189,189,255,0,104,185,1,0,0,0,150,150,150,150,255,0,72,185,1,0,0,0,99,99,99,99,255,0,16,185,1,0,0,0,37,37,37,37,255,0,
-248,184,1,0,0,0,247,247,247,247,255,0,200,184,1,0,0,0,217,217,217,217,255,0,184,184,1,0,0,0,189,189,189,189,255,0,120,184,1,0,0,0,150,150,150,150,255,0,232,183,1,0,0,0,115,115,115,115,255,0,168,183,1,0,0,0,82,82,82,82,255,0,136,183,1,0,0,0,37,37,37,37,255,0,112,183,1,0,0,0,255,255,255,255,255,0,72,183,1,0,0,0,240,240,240,240,255,0,48,183,1,0,0,0,217,217,217,217,255,0,24,183,1,0,0,0,189,189,189,189,255,0,224,182,1,0,0,0,150,150,150,150,255,0,208,182,1,0,0,0,115,115,115,115,255,0,176,182,1,0,0,0,82,
-82,82,82,255,0,240,181,1,0,0,0,37,37,37,37,255,0,160,181,1,0,0,0,255,255,255,255,255,0,96,181,1,0,0,0,240,240,240,240,255,0,64,181,1,0,0,0,217,217,217,217,255,0,16,181,1,0,0,0,189,189,189,189,255,0,248,180,1,0,0,0,150,150,150,150,255,0,224,180,1,0,0,0,115,115,115,115,255,0,144,180,1,0,0,0,82,82,82,82,255,0,128,180,1,0,0,0,37,37,37,37,255,0,64,180,1,0,0,0,0,0,0,0,255,0,176,179,1,0,21,48,254,254,230,206,255,0,72,179,1,0,19,147,253,253,174,107,255,0,24,179,1,0,14,240,230,230,85,13,255,0,240,178,1,0,
-19,32,254,254,237,222,255,0,200,178,1,0,20,120,253,253,190,133,255,0,184,178,1,0,17,194,253,253,141,60,255,0,160,178,1,0,13,253,217,217,71,1,255,0,48,178,1,0,19,32,254,254,237,222,255,0,32,178,1,0,20,120,253,253,190,133,255,0,200,177,1,0,17,194,253,253,141,60,255,0,8,177,1,0,14,240,230,230,85,13,255,0,96,176,1,0,13,250,166,166,54,3,255,0,80,176,1,0,19,32,254,254,237,222,255,0,40,176,1,0,21,91,253,253,208,162,255,0,0,176,1,0,19,147,253,253,174,107,255,0,240,175,1,0,17,194,253,253,141,60,255,0,224,
-175,1,0,14,240,230,230,85,13,255,0,112,175,1,0,13,250,166,166,54,3,255,0,96,175,1,0,19,32,254,254,237,222,255,0,40,175,1,0,21,91,253,253,208,162,255,0,48,174,1,0,19,147,253,253,174,107,255,0,216,173,1,0,17,194,253,253,141,60,255,0,200,173,1,0,16,234,241,241,105,19,255,0,160,173,1,0,13,253,217,217,72,1,255,0,120,173,1,0,12,247,140,140,45,4,255,0,104,173,1,0,21,20,255,255,245,235,255,0,88,173,1,0,21,48,254,254,230,206,255,0,248,172,1,0,21,91,253,253,208,162,255,0,136,172,1,0,19,147,253,253,174,107,
-255,0,64,172,1,0,17,194,253,253,141,60,255,0,144,171,1,0,16,234,241,241,105,19,255,0,8,171,1,0,13,253,217,217,72,1,255,0,200,170,1,0,12,247,140,140,45,4,255,0,128,170,1,0,21,20,255,255,245,235,255,0,16,170,1,0,21,48,254,254,230,206,255,0,208,169,1,0,21,91,253,253,208,162,255,0,184,169,1,0,19,147,253,253,174,107,255,0,152,169,1,0,17,194,253,253,141,60,255,0,88,169,1,0,16,234,241,241,105,19,255,0,8,169,1,0,13,253,217,217,72,1,255,0,96,168,1,0,13,250,166,166,54,3,255,0,232,167,1,0,12,246,127,127,39,
-4,255,0,208,167,1,0,25,54,254,254,232,200,255,0,120,167,1,0,19,121,253,253,187,132,255,0,48,167,1,0,5,197,227,227,74,51,255,0,240,166,1,0,26,37,254,254,240,217,255,0,136,166,1,0,24,115,253,253,204,138,255,0,80,166,1,0,13,164,252,252,141,89,255,0,24,166,1,0,3,218,215,215,48,31,255,0,56,165,1,0,26,37,254,254,240,217,255,0,104,164,1,0,24,115,253,253,204,138,255,0,112,163,1,0,13,164,252,252,141,89,255,0,96,163,1,0,5,197,227,227,74,51,255,0,32,163,1,0,0,255,179,179,0,0,255,0,0,163,1,0,26,37,254,254,240,
-217,255,0,240,162,1,0,24,95,253,253,212,158,255,0,200,162,1,0,19,121,253,253,187,132,255,0,168,162,1,0,13,164,252,252,141,89,255,0,152,162,1,0,5,197,227,227,74,51,255,0,80,162,1,0,0,255,179,179,0,0,255,0,200,161,1,0,26,37,254,254,240,217,255,0,96,161,1,0,24,95,253,253,212,158,255,0,64,161,1,0,19,121,253,253,187,132,255,0,32,161,1,0,13,164,252,252,141,89,255,0,248,160,1,0,7,178,239,239,101,72,255,0,224,160,1,0,3,218,215,215,48,31,255,0,208,160,1,0,0,255,153,153,0,0,255,0,184,160,1,0,24,18,255,255,
-247,236,255,0,168,160,1,0,25,54,254,254,232,200,255,0,136,160,1,0,24,95,253,253,212,158,255,0,16,160,1,0,19,121,253,253,187,132,255,0,184,159,1,0,13,164,252,252,141,89,255,0,168,159,1,0,7,178,239,239,101,72,255,0,128,159,1,0,3,218,215,215,48,31,255,0,96,159,1,0,0,255,153,153,0,0,255,0,80,159,1,0,24,18,255,255,247,236,255,0,56,159,1,0,25,54,254,254,232,200,255,0,8,159,1,0,24,95,253,253,212,158,255,0,248,158,1,0,19,121,253,253,187,132,255,0,224,158,1,0,13,164,252,252,141,89,255,0,96,158,1,0,7,178,239,
-239,101,72,255,0,24,158,1,0,3,218,215,215,48,31,255,0,8,158,1,0,0,255,179,179,0,0,255,0,224,157,1,0,0,255,127,127,0,0,255,0,184,157,1,0,142,68,227,166,206,227,255,0,168,157,1,0,190,153,154,106,61,154,255,0,128,157,1,0,144,211,180,31,120,180,255,0,48,157,1,0,65,97,223,178,223,138,255,0,32,157,1,0,82,184,160,51,160,44,255,0,16,157,1,0,0,99,251,251,154,153,255,0,136,156,1,0,254,225,227,227,26,28,255,0,16,156,1,0,23,143,253,253,191,111,255,0,0,156,1,0,21,255,255,255,127,0,255,0,216,155,1,0,198,42,214,
-202,178,214,255,0,184,155,1,0,142,68,227,166,206,227,255,0,152,155,1,0,190,153,154,106,61,154,255,0,136,155,1,0,42,102,255,255,255,153,255,0,104,155,1,0,144,211,180,31,120,180,255,0,88,155,1,0,65,97,223,178,223,138,255,0,64,155,1,0,82,184,160,51,160,44,255,0,200,154,1,0,0,99,251,251,154,153,255,0,136,154,1,0,254,225,227,227,26,28,255,0,104,154,1,0,23,143,253,253,191,111,255,0,80,154,1,0,21,255,255,255,127,0,255,0,56,154,1,0,198,42,214,202,178,214,255,0,40,154,1,0,142,68,227,166,206,227,255,0,16,154,
-1,0,190,153,154,106,61,154,255,0,232,153,1,0,42,102,255,255,255,153,255,0,216,153,1,0,15,197,177,177,89,40,255,0,200,153,1,0,144,211,180,31,120,180,255,0,56,153,1,0,65,97,223,178,223,138,255,0,200,152,1,0,82,184,160,51,160,44,255,0,184,152,1,0,0,99,251,251,154,153,255,0,152,152,1,0,254,225,227,227,26,28,255,0,120,152,1,0,23,143,253,253,191,111,255,0,104,152,1,0,21,255,255,255,127,0,255,0,88,152,1,0,198,42,214,202,178,214,255,0,232,151,1,0,142,68,227,166,206,227,255,0,216,151,1,0,144,211,180,31,120,
-180,255,0,200,151,1,0,65,97,223,178,223,138,255,0,80,151,1,0,142,68,227,166,206,227,255,0,224,150,1,0,144,211,180,31,120,180,255,0,208,150,1,0,65,97,223,178,223,138,255,0,176,150,1,0,82,184,160,51,160,44,255,0,152,150,1,0,142,68,227,166,206,227,255,0,136,150,1,0,144,211,180,31,120,180,255,0,120,150,1,0,65,97,223,178,223,138,255,0,40,150,1,0,82,184,160,51,160,44,255,0,192,149,1,0,0,99,251,251,154,153,255,0,152,149,1,0,142,68,227,166,206,227,255,0,240,148,1,0,144,211,180,31,120,180,255,0,248,147,1,
-0,65,97,223,178,223,138,255,0,208,147,1,0,82,184,160,51,160,44,255,0,184,147,1,0,0,99,251,251,154,153,255,0,136,147,1,0,254,225,227,227,26,28,255,0,104,147,1,0,142,68,227,166,206,227,255,0,72,147,1,0,144,211,180,31,120,180,255,0,200,146,1,0,65,97,223,178,223,138,255,0,184,146,1,0,82,184,160,51,160,44,255,0,168,146,1,0,0,99,251,251,154,153,255,0,88,146,1,0,254,225,227,227,26,28,255,0,200,145,1,0,23,143,253,253,191,111,255,0,184,145,1,0,142,68,227,166,206,227,255,0,128,145,1,0,144,211,180,31,120,180,
-255,0,40,145,1,0,65,97,223,178,223,138,255,0,16,145,1,0,82,184,160,51,160,44,255,0,144,144,1,0,0,99,251,251,154,153,255,0,56,144,1,0,254,225,227,227,26,28,255,0,208,143,1,0,23,143,253,253,191,111,255,0,48,143,1,0,21,255,255,255,127,0,255,0,168,142,1,0,142,68,227,166,206,227,255,0,152,141,1,0,144,211,180,31,120,180,255,0,136,141,1,0,65,97,223,178,223,138,255,0,80,141,1,0,82,184,160,51,160,44,255,0,144,140,1,0,0,99,251,251,154,153,255,0,128,140,1,0,254,225,227,227,26,28,255,0,96,140,1,0,23,143,253,
-253,191,111,255,0,56,140,1,0,21,255,255,255,127,0,255,0,16,140,1,0,198,42,214,202,178,214,255,0,0,140,1,0,3,78,251,251,180,174,255,0,184,139,1,0,146,53,227,179,205,227,255,0,96,139,1,0,77,41,235,204,235,197,255,0,72,139,1,0,3,78,251,251,180,174,255,0,48,139,1,0,146,53,227,179,205,227,255,0,248,138,1,0,77,41,235,204,235,197,255,0,224,138,1,0,202,27,228,222,203,228,255,0,208,138,1,0,3,78,251,251,180,174,255,0,152,138,1,0,146,53,227,179,205,227,255,0,136,138,1,0,77,41,235,204,235,197,255,0,120,138,1,
-0,202,27,228,222,203,228,255,0,240,137,1,0,24,88,254,254,217,166,255,0,160,137,1,0,3,78,251,251,180,174,255,0,144,137,1,0,146,53,227,179,205,227,255,0,120,137,1,0,77,41,235,204,235,197,255,0,24,137,1,0,202,27,228,222,203,228,255,0,8,137,1,0,24,88,254,254,217,166,255,0,248,136,1,0,42,50,255,255,255,204,255,0,192,136,1,0,3,78,251,251,180,174,255,0,176,136,1,0,146,53,227,179,205,227,255,0,160,136,1,0,77,41,235,204,235,197,255,0,80,136,1,0,202,27,228,222,203,228,255,0,8,136,1,0,24,88,254,254,217,166,
-255,0,248,135,1,0,42,50,255,255,255,204,255,0,200,135,1,0,28,44,229,229,216,189,255,0,120,135,1,0,3,78,251,251,180,174,255,0,104,135,1,0,146,53,227,179,205,227,255,0,88,135,1,0,77,41,235,204,235,197,255,0,16,135,1,0,202,27,228,222,203,228,255,0,0,135,1,0,24,88,254,254,217,166,255,0,240,134,1,0,42,50,255,255,255,204,255,0,40,134,1,0,28,44,229,229,216,189,255,0,216,133,1,0,233,35,253,253,218,236,255,0,200,133,1,0,3,78,251,251,180,174,255,0,176,133,1,0,146,53,227,179,205,227,255,0,104,133,1,0,77,41,
-235,204,235,197,255,0,88,133,1,0,202,27,228,222,203,228,255,0,56,133,1,0,24,88,254,254,217,166,255,0,16,133,1,0,42,50,255,255,255,204,255,0,0,133,1,0,28,44,229,229,216,189,255,0,240,132,1,0,233,35,253,253,218,236,255,0,176,132,1,0,0,0,242,242,242,242,255,0,72,132,1,0,108,53,226,179,226,205,255,0,56,132,1,0,17,81,253,253,205,172,255,0,16,132,1,0,155,31,232,203,213,232,255,0,216,131,1,0,108,53,226,179,226,205,255,0,200,131,1,0,17,81,253,253,205,172,255,0,176,131,1,0,155,31,232,203,213,232,255,0,136,
-131,1,0,228,43,244,244,202,228,255,0,120,131,1,0,108,53,226,179,226,205,255,0,104,131,1,0,17,81,253,253,205,172,255,0,16,131,1,0,155,31,232,203,213,232,255,0,176,130,1,0,228,43,244,244,202,228,255,0,160,130,1,0,56,45,245,230,245,201,255,0,128,130,1,0,108,53,226,179,226,205,255,0,56,130,1,0,17,81,253,253,205,172,255,0,40,130,1,0,155,31,232,203,213,232,255,0,24,130,1,0,228,43,244,244,202,228,255,0,216,129,1,0,56,45,245,230,245,201,255,0,200,129,1,0,35,81,255,255,242,174,255,0,184,129,1,0,108,53,226,
-179,226,205,255,0,112,129,1,0,17,81,253,253,205,172,255,0,8,129,1,0,155,31,232,203,213,232,255,0,248,128,1,0,228,43,244,244,202,228,255,0,224,128,1,0,56,45,245,230,245,201,255,0,144,128,1,0,35,81,255,255,242,174,255,0,128,128,1,0,25,39,241,241,226,204,255,0,112,128,1,0,108,53,226,179,226,205,255,0,64,128,1,0,17,81,253,253,205,172,255,0,176,127,1,0,155,31,232,203,213,232,255,0,152,127,1,0,228,43,244,244,202,228,255,0,56,127,1,0,56,45,245,230,245,201,255,0,160,126,1,0,35,81,255,255,242,174,255,0,80,
-126,1,0,25,39,241,241,226,204,255,0,24,126,1,0,0,0,204,204,204,204,255,0,136,125,1,0,230,253,142,142,1,82,255,0,104,125,1,0,77,191,100,39,100,25,255,0,64,125,1,0,230,220,197,197,27,125,255,0,248,124,1,0,232,118,222,222,119,174,255,0,232,124,1,0,229,62,241,241,182,218,255,0,216,124,1,0,233,29,253,253,224,239,255,0,144,124,1,0,59,38,245,230,245,208,255,0,248,123,1,0,61,103,225,184,225,134,255,0,232,123,1,0,63,166,188,127,188,65,255,0,152,123,1,0,68,197,146,77,146,33,255,0,8,123,1,0,230,253,142,142,
-1,82,255,0,112,122,1,0,68,197,146,77,146,33,255,0,80,122,1,0,77,191,100,39,100,25,255,0,248,121,1,0,230,220,197,197,27,125,255,0,104,121,1,0,232,118,222,222,119,174,255,0,168,120,1,0,229,62,241,241,182,218,255,0,64,120,1,0,233,29,253,253,224,239,255,0,208,119,1,0,0,0,247,247,247,247,255,0,160,119,1,0,59,38,245,230,245,208,255,0,80,119,1,0,61,103,225,184,225,134,255,0,8,119,1,0,63,166,188,127,188,65,255,0,248,118,1,0,231,76,233,233,163,201,255,0,208,118,1,0,0,0,247,247,247,247,255,0,144,118,1,0,63,
-129,215,161,215,106,255,0,128,118,1,0,228,220,208,208,28,139,255,0,112,118,1,0,229,62,241,241,182,218,255,0,40,118,1,0,61,103,225,184,225,134,255,0,232,117,1,0,72,198,172,77,172,38,255,0,200,117,1,0,228,220,208,208,28,139,255,0,144,117,1,0,229,62,241,241,182,218,255,0,48,117,1,0,0,0,247,247,247,247,255,0,184,116,1,0,61,103,225,184,225,134,255,0,168,116,1,0,72,198,172,77,172,38,255,0,128,116,1,0,230,220,197,197,27,125,255,0,112,116,1,0,231,76,233,233,163,201,255,0,96,116,1,0,233,29,253,253,224,239,
-255,0,8,116,1,0,59,38,245,230,245,208,255,0,200,115,1,0,63,129,215,161,215,106,255,0,176,115,1,0,68,197,146,77,146,33,255,0,144,115,1,0,230,220,197,197,27,125,255,0,88,115,1,0,231,76,233,233,163,201,255,0,56,115,1,0,233,29,253,253,224,239,255,0,40,115,1,0,0,0,247,247,247,247,255,0,16,115,1,0,59,38,245,230,245,208,255,0,224,114,1,0,63,129,215,161,215,106,255,0,192,114,1,0,68,197,146,77,146,33,255,0,128,114,1,0,230,220,197,197,27,125,255,0,72,114,1,0,232,118,222,222,119,174,255,0,56,114,1,0,229,62,
-241,241,182,218,255,0,0,114,1,0,233,29,253,253,224,239,255,0,112,113,1,0,59,38,245,230,245,208,255,0,96,113,1,0,61,103,225,184,225,134,255,0,80,113,1,0,63,166,188,127,188,65,255,0,32,113,1,0,68,197,146,77,146,33,255,0,248,112,1,0,230,220,197,197,27,125,255,0,232,112,1,0,232,118,222,222,119,174,255,0,160,112,1,0,229,62,241,241,182,218,255,0,120,112,1,0,233,29,253,253,224,239,255,0,96,112,1,0,0,0,247,247,247,247,255,0,40,112,1,0,59,38,245,230,245,208,255,0,248,111,1,0,61,103,225,184,225,134,255,0,232,
-111,1,0,63,166,188,127,188,65,255,0,216,111,1,0,68,197,146,77,146,33,255,0,128,111,1,0,206,255,75,64,0,75,255,0,112,111,1,0,101,255,68,0,68,27,255,0,96,111,1,0,206,173,131,118,42,131,255,0,32,111,1,0,199,87,171,153,112,171,255,0,224,110,1,0,199,51,207,194,165,207,255,0,208,110,1,0,210,21,232,231,212,232,255,0,96,110,1,0,76,30,240,217,240,211,255,0,40,110,1,0,80,68,219,166,219,160,255,0,24,110,1,0,88,123,174,90,174,97,255,0,0,110,1,0,97,197,120,27,120,55,255,0,192,109,1,0,206,255,75,64,0,75,255,0,
-176,109,1,0,97,197,120,27,120,55,255,0,160,109,1,0,101,255,68,0,68,27,255,0,56,109,1,0,206,173,131,118,42,131,255,0,0,109,1,0,199,87,171,153,112,171,255,0,224,108,1,0,199,51,207,194,165,207,255,0,184,108,1,0,210,21,232,231,212,232,255,0,72,108,1,0,0,0,247,247,247,247,255,0,56,108,1,0,76,30,240,217,240,211,255,0,40,108,1,0,80,68,219,166,219,160,255,0,208,107,1,0,88,123,174,90,174,97,255,0,192,107,1,0,196,70,195,175,141,195,255,0,176,107,1,0,0,0,247,247,247,247,255,0,96,107,1,0,82,90,191,127,191,123,
-255,0,16,107,1,0,201,168,148,123,50,148,255,0,0,107,1,0,199,51,207,194,165,207,255,0,216,106,1,0,80,68,219,166,219,160,255,0,136,106,1,0,102,255,136,0,136,55,255,0,120,106,1,0,201,168,148,123,50,148,255,0,104,106,1,0,199,51,207,194,165,207,255,0,40,106,1,0,0,0,247,247,247,247,255,0,8,106,1,0,80,68,219,166,219,160,255,0,216,105,1,0,102,255,136,0,136,55,255,0,144,105,1,0,206,173,131,118,42,131,255,0,32,105,1,0,196,70,195,175,141,195,255,0,152,104,1,0,210,21,232,231,212,232,255,0,112,104,1,0,76,30,240,
-217,240,211,255,0,208,103,1,0,82,90,191,127,191,123,255,0,192,103,1,0,97,197,120,27,120,55,255,0,168,103,1,0,206,173,131,118,42,131,255,0,112,103,1,0,196,70,195,175,141,195,255,0,96,103,1,0,210,21,232,231,212,232,255,0,80,103,1,0,0,0,247,247,247,247,255,0,16,103,1,0,76,30,240,217,240,211,255,0,112,102,1,0,82,90,191,127,191,123,255,0,96,102,1,0,97,197,120,27,120,55,255,0,40,102,1,0,206,173,131,118,42,131,255,0,176,101,1,0,199,87,171,153,112,171,255,0,144,101,1,0,199,51,207,194,165,207,255,0,8,101,
-1,0,210,21,232,231,212,232,255,0,232,100,1,0,76,30,240,217,240,211,255,0,120,100,1,0,80,68,219,166,219,160,255,0,0,100,1,0,88,123,174,90,174,97,255,0,184,99,1,0,97,197,120,27,120,55,255,0,88,99,1,0,206,173,131,118,42,131,255,0,72,99,1,0,199,87,171,153,112,171,255,0,248,98,1,0,199,51,207,194,165,207,255,0,136,98,1,0,210,21,232,231,212,232,255,0,120,98,1,0,0,0,247,247,247,247,255,0,80,98,1,0,76,30,240,217,240,211,255,0,40,98,1,0,80,68,219,166,219,160,255,0,8,98,1,0,88,123,174,90,174,97,255,0,248,97,
-1,0,97,197,120,27,120,55,255,0,192,97,1,0,189,11,242,236,231,242,255,0,112,97,1,0,151,61,219,166,189,219,255,0,80,97,1,0,141,197,190,43,140,190,255,0,48,97,1,0,185,8,246,241,238,246,255,0,168,96,1,0,155,40,225,189,201,225,255,0,144,96,1,0,145,112,207,116,169,207,255,0,248,95,1,0,143,247,176,5,112,176,255,0,208,95,1,0,185,8,246,241,238,246,255,0,192,95,1,0,155,40,225,189,201,225,255,0,176,95,1,0,145,112,207,116,169,207,255,0,112,95,1,0,141,197,190,43,140,190,255,0,24,95,1,0,143,247,141,4,90,141,255,
-0,8,95,1,0,185,8,246,241,238,246,255,0,216,94,1,0,168,24,230,208,209,230,255,0,120,94,1,0,151,61,219,166,189,219,255,0,104,94,1,0,145,112,207,116,169,207,255,0,72,94,1,0,141,197,190,43,140,190,255,0,232,93,1,0,143,247,141,4,90,141,255,0,216,93,1,0,185,8,246,241,238,246,255,0,168,93,1,0,168,24,230,208,209,230,255,0,72,93,1,0,151,61,219,166,189,219,255,0,8,93,1,0,145,112,207,116,169,207,255,0,248,92,1,0,142,183,192,54,144,192,255,0,216,92,1,0,143,247,176,5,112,176,255,0,160,92,1,0,143,248,123,3,78,
-123,255,0,144,92,1,0,233,8,255,255,247,251,255,0,128,92,1,0,189,11,242,236,231,242,255,0,64,92,1,0,168,24,230,208,209,230,255,0,48,92,1,0,151,61,219,166,189,219,255,0,8,92,1,0,145,112,207,116,169,207,255,0,192,91,1,0,142,183,192,54,144,192,255,0,120,91,1,0,143,247,176,5,112,176,255,0,104,91,1,0,143,248,123,3,78,123,255,0,56,91,1,0,233,8,255,255,247,251,255,0,40,91,1,0,189,11,242,236,231,242,255,0,176,90,1,0,168,24,230,208,209,230,255,0,160,90,1,0,151,61,219,166,189,219,255,0,104,90,1,0,145,112,207,
-116,169,207,255,0,72,90,1,0,142,183,192,54,144,192,255,0,56,90,1,0,143,247,176,5,112,176,255,0,240,89,1,0,143,247,141,4,90,141,255,0,168,89,1,0,143,249,88,2,56,88,255,0,152,89,1,0,200,14,240,236,226,240,255,0,120,89,1,0,151,61,219,166,189,219,255,0,104,89,1,0,130,208,153,28,144,153,255,0,40,89,1,0,207,8,247,246,239,247,255,0,8,89,1,0,155,40,225,189,201,225,255,0,152,88,1,0,143,128,207,103,169,207,255,0,136,88,1,0,130,251,138,2,129,138,255,0,120,88,1,0,207,8,247,246,239,247,255,0,56,88,1,0,155,40,
-225,189,201,225,255,0,8,88,1,0,143,128,207,103,169,207,255,0,248,87,1,0,130,208,153,28,144,153,255,0,224,87,1,0,119,252,108,1,108,89,255,0,208,87,1,0,207,8,247,246,239,247,255,0,72,87,1,0,168,24,230,208,209,230,255,0,56,87,1,0,151,61,219,166,189,219,255,0,232,86,1,0,143,128,207,103,169,207,255,0,216,86,1,0,130,208,153,28,144,153,255,0,200,86,1,0,119,252,108,1,108,89,255,0,136,86,1,0,207,8,247,246,239,247,255,0,40,86,1,0,168,24,230,208,209,230,255,0,24,86,1,0,151,61,219,166,189,219,255,0,0,86,1,0,
-143,128,207,103,169,207,255,0,240,85,1,0,142,183,192,54,144,192,255,0,176,85,1,0,130,251,138,2,129,138,255,0,160,85,1,0,118,252,100,1,100,80,255,0,48,85,1,0,233,8,255,255,247,251,255,0,0,85,1,0,200,14,240,236,226,240,255,0,232,84,1,0,168,24,230,208,209,230,255,0,136,84,1,0,151,61,219,166,189,219,255,0,64,84,1,0,143,128,207,103,169,207,255,0,16,84,1,0,142,183,192,54,144,192,255,0,240,83,1,0,130,251,138,2,129,138,255,0,216,83,1,0,118,252,100,1,100,80,255,0,72,83,1,0,233,8,255,255,247,251,255,0,40,83,
-1,0,200,14,240,236,226,240,255,0,0,83,1,0,168,24,230,208,209,230,255,0,240,82,1,0,151,61,219,166,189,219,255,0,176,82,1,0,143,128,207,103,169,207,255,0,112,82,1,0,142,183,192,54,144,192,255,0,16,82,1,0,130,251,138,2,129,138,255,0,0,82,1,0,119,252,108,1,108,89,255,0,160,81,1,0,117,251,70,1,70,54,255,0,136,81,1,0,18,238,127,127,59,8,255,0,8,81,1,0,195,255,75,45,0,75,255,0,208,80,1,0,20,246,179,179,88,6,255,0,128,80,1,0,22,232,224,224,130,20,255,0,56,80,1,0,23,155,253,253,184,99,255,0,104,79,1,0,24,
-72,254,254,224,182,255,0,16,79,1,0,165,20,235,216,218,235,255,0,184,78,1,0,177,47,210,178,171,210,255,0,168,78,1,0,179,84,172,128,115,172,255,0,88,78,1,0,189,181,136,84,39,136,255,0,72,78,1,0,18,238,127,127,59,8,255,0,248,77,1,0,189,181,136,84,39,136,255,0,208,77,1,0,195,255,75,45,0,75,255,0,176,77,1,0,20,246,179,179,88,6,255,0,160,77,1,0,22,232,224,224,130,20,255,0,144,77,1,0,23,155,253,253,184,99,255,0,88,77,1,0,24,72,254,254,224,182,255,0,8,77,1,0,0,0,247,247,247,247,255,0,240,76,1,0,165,20,235,
-216,218,235,255,0,216,76,1,0,177,47,210,178,171,210,255,0,200,76,1,0,179,84,172,128,115,172,255,0,144,76,1,0,23,187,241,241,163,64,255,0,104,76,1,0,0,0,247,247,247,247,255,0,224,75,1,0,178,69,195,153,142,195,255,0,208,75,1,0,17,253,230,230,97,1,255,0,192,75,1,0,23,155,253,253,184,99,255,0,144,75,1,0,177,47,210,178,171,210,255,0,64,75,1,0,185,155,153,94,60,153,255,0,48,75,1,0,17,253,230,230,97,1,255,0,16,75,1,0,23,155,253,253,184,99,255,0,248,74,1,0,0,0,247,247,247,247,255,0,224,74,1,0,177,47,210,
-178,171,210,255,0,208,74,1,0,185,155,153,94,60,153,255,0,168,74,1,0,20,246,179,179,88,6,255,0,152,74,1,0,23,187,241,241,163,64,255,0,104,74,1,0,24,72,254,254,224,182,255,0,40,74,1,0,165,20,235,216,218,235,255,0,176,73,1,0,178,69,195,153,142,195,255,0,160,73,1,0,189,181,136,84,39,136,255,0,136,73,1,0,20,246,179,179,88,6,255,0,120,73,1,0,23,187,241,241,163,64,255,0,8,73,1,0,24,72,254,254,224,182,255,0,248,72,1,0,0,0,247,247,247,247,255,0,216,72,1,0,165,20,235,216,218,235,255,0,200,72,1,0,178,69,195,
-153,142,195,255,0,184,72,1,0,189,181,136,84,39,136,255,0,96,72,1,0,20,246,179,179,88,6,255,0,16,72,1,0,22,232,224,224,130,20,255,0,0,72,1,0,23,155,253,253,184,99,255,0,176,71,1,0,24,72,254,254,224,182,255,0,128,71,1,0,165,20,235,216,218,235,255,0,112,71,1,0,177,47,210,178,171,210,255,0,96,71,1,0,179,84,172,128,115,172,255,0,56,71,1,0,189,181,136,84,39,136,255,0,40,71,1,0,20,246,179,179,88,6,255,0,0,71,1,0,22,232,224,224,130,20,255,0,216,70,1,0,23,155,253,253,184,99,255,0,152,70,1,0,24,72,254,254,
-224,182,255,0,136,70,1,0,0,0,247,247,247,247,255,0,72,70,1,0,165,20,235,216,218,235,255,0,56,70,1,0,177,47,210,178,171,210,255,0,240,69,1,0,179,84,172,128,115,172,255,0,216,69,1,0,189,181,136,84,39,136,255,0,184,69,1,0,188,14,239,231,225,239,255,0,168,69,1,0,214,67,201,201,148,199,255,0,152,69,1,0,234,222,221,221,28,119,255,0,64,69,1,0,185,8,246,241,238,246,255,0,248,68,1,0,211,41,216,215,181,216,255,0,232,68,1,0,228,139,223,223,101,176,255,0,160,68,1,0,239,232,206,206,18,86,255,0,144,68,1,0,185,
-8,246,241,238,246,255,0,96,68,1,0,211,41,216,215,181,216,255,0,56,68,1,0,228,139,223,223,101,176,255],"i8",L,l.J+40977);D([68,1,0,234,222,221,221,28,119,255,0,240,67,1,0,236,255,152,152,0,67,255,0,224,67,1,0,185,8,246,241,238,246,255,0,176,67,1,0,204,38,218,212,185,218,255,0,88,67,1,0,214,67,201,201,148,199,255,0,72,67,1,0,228,139,223,223,101,176,255,0,0,67,1,0,234,222,221,221,28,119,255,0,240,66,1,0,236,255,152,152,0,67,255,0,208,66,1,0,185,8,246,241,238,246,255,0,192,66,1,0,204,38,218,212,185,218,
-255,0,160,66,1,0,214,67,201,201,148,199,255,0,136,66,1,0,228,139,223,223,101,176,255,0,104,66,1,0,233,209,231,231,41,138,255,0,40,66,1,0,239,232,206,206,18,86,255,0,176,65,1,0,236,255,145,145,0,63,255,0,128,65,1,0,195,5,249,247,244,249,255,0,8,65,1,0,188,14,239,231,225,239,255,0,240,64,1,0,204,38,218,212,185,218,255,0,168,64,1,0,214,67,201,201,148,199,255,0,104,64,1,0,228,139,223,223,101,176,255,0,72,64,1,0,233,209,231,231,41,138,255,0,56,64,1,0,239,232,206,206,18,86,255,0,40,64,1,0,236,255,145,145,
-0,63,255,0,240,63,1,0,195,5,249,247,244,249,255,0,96,63,1,0,188,14,239,231,225,239,255,0,80,63,1,0,204,38,218,212,185,218,255,0,208,62,1,0,214,67,201,201,148,199,255,0,184,62,1,0,228,139,223,223,101,176,255,0,160,62,1,0,233,209,231,231,41,138,255,0,80,62,1,0,239,232,206,206,18,86,255,0,32,62,1,0,236,255,152,152,0,67,255,0,192,61,1,0,242,255,103,103,0,31,255,0,104,61,1,0,180,8,245,239,237,245,255,0,40,61,1,0,168,37,220,188,189,220,255,0,176,60,1,0,176,100,177,117,107,177,255,0,160,60,1,0,182,7,247,
-242,240,247,255,0,8,60,1,0,173,28,226,203,201,226,255,0,240,59,1,0,173,58,200,158,154,200,255,0,224,59,1,0,182,128,163,106,81,163,255,0,176,59,1,0,182,7,247,242,240,247,255,0,144,59,1,0,173,28,226,203,201,226,255,0,128,59,1,0,173,58,200,158,154,200,255,0,112,59,1,0,176,100,177,117,107,177,255,0,240,58,1,0,188,185,143,84,39,143,255,0,128,58,1,0,182,7,247,242,240,247,255,0,104,58,1,0,170,18,235,218,218,235,255,0,64,58,1,0,168,37,220,188,189,220,255,0,48,58,1,0,173,58,200,158,154,200,255,0,32,58,1,0,
-176,100,177,117,107,177,255,0,0,58,1,0,188,185,143,84,39,143,255,0,216,57,1,0,182,7,247,242,240,247,255,0,160,57,1,0,170,18,235,218,218,235,255,0,144,57,1,0,168,37,220,188,189,220,255,0,56,57,1,0,173,58,200,158,154,200,255,0,224,56,1,0,172,83,186,128,125,186,255,0,208,56,1,0,182,128,163,106,81,163,255,0,184,56,1,0,190,216,134,74,20,134,255,0,168,56,1,0,191,2,253,252,251,253,255,0,144,56,1,0,180,8,245,239,237,245,255,0,128,56,1,0,170,18,235,218,218,235,255,0,96,56,1,0,168,37,220,188,189,220,255,0,
-80,56,1,0,173,58,200,158,154,200,255,0,64,56,1,0,172,83,186,128,125,186,255,0,8,56,1,0,182,128,163,106,81,163,255,0,120,55,1,0,190,216,134,74,20,134,255,0,104,55,1,0,191,2,253,252,251,253,255,0,16,55,1,0,180,8,245,239,237,245,255,0,0,55,1,0,170,18,235,218,218,235,255,0,240,54,1,0,168,37,220,188,189,220,255,0,224,54,1,0,173,58,200,158,154,200,255,0,192,54,1,0,172,83,186,128,125,186,255,0,176,54,1,0,182,128,163,106,81,163,255,0,160,54,1,0,188,185,143,84,39,143,255,0,80,54,1,0,191,255,125,63,0,125,255,
-0,216,53,1,0,242,255,103,103,0,31,255,0,200,53,1,0,150,241,97,5,48,97,255,0,176,53,1,0,249,220,178,178,24,43,255,0,160,53,1,0,5,163,214,214,96,77,255,0,136,53,1,0,13,119,244,244,165,130,255,0,120,53,1,0,15,54,253,253,219,199,255,0,88,53,1,0,142,32,240,209,229,240,255,0,72,53,1,0,141,87,222,146,197,222,255,0,56,53,1,0,143,167,195,67,147,195,255,0,24,53,1,0,148,206,172,33,102,172,255,0,208,52,1,0,242,255,103,103,0,31,255,0,192,52,1,0,148,206,172,33,102,172,255,0,160,52,1,0,150,241,97,5,48,97,255,0,
-144,52,1,0,249,220,178,178,24,43,255,0,128,52,1,0,5,163,214,214,96,77,255,0,104,52,1,0,13,119,244,244,165,130,255,0,72,52,1,0,15,54,253,253,219,199,255,0,56,52,1,0,0,0,247,247,247,247,255,0,40,52,1,0,142,32,240,209,229,240,255,0,0,52,1,0,141,87,222,146,197,222,255,0,192,51,1,0,143,167,195,67,147,195,255,0,176,51,1,0,12,150,239,239,138,98,255,0,136,51,1,0,0,0,247,247,247,247,255,0,120,51,1,0,143,128,207,103,169,207,255,0,104,51,1,0,248,255,202,202,0,32,255,0,88,51,1,0,13,119,244,244,165,130,255,0,
-232,147,2,0,141,87,222,146,197,222,255,0,216,147,2,0,143,247,176,5,113,176,255,0,200,147,2,0,248,255,202,202,0,32,255,0,152,147,2,0,13,119,244,244,165,130,255,0,56,147,2,0,0,0,247,247,247,247,255,0,40,147,2,0,141,87,222,146,197,222,255,0,240,146,2,0,143,247,176,5,113,176,255,0,224,146,2,0,249,220,178,178,24,43,255,0,208,146,2,0,12,150,239,239,138,98,255,0,192,146,2,0,15,54,253,253,219,199,255,0,160,146,2,0,142,32,240,209,229,240,255,0,128,146,2,0,143,128,207,103,169,207,255,0,104,146,2,0,148,206,
-172,33,102,172,255,0,56,146,2,0,249,220,178,178,24,43,255,0,200,145,2,0,12,150,239,239,138,98,255,0,168,145,2,0,15,54,253,253,219,199,255,0,120,145,2,0,0,0,247,247,247,247,255,0,96,145,2,0,142,32,240,209,229,240,255,0,80,145,2,0,143,128,207,103,169,207,255,0,48,145,2,0,148,206,172,33,102,172,255,0,16,145,2,0,249,220,178,178,24,43,255,0,0,145,2,0,5,163,214,214,96,77,255,0,240,144,2,0,13,119,244,244,165,130,255,0,184,144,2,0,15,54,253,253,219,199,255,0,72,144,2,0,142,32,240,209,229,240,255,0,56,144,
-2,0,141,87,222,146,197,222,255,0,224,143,2,0,143,167,195,67,147,195,255,0,168,143,2,0,148,206,172,33,102,172,255,0,144,143,2,0,249,220,178,178,24,43,255,0,112,143,2,0,5,163,214,214,96,77,255,0,8,143,2,0,13,119,244,244,165,130,255,0,192,142,2,0,15,54,253,253,219,199,255,0,24,142,2,0,0,0,247,247,247,247,255,0,224,141,2,0,142,32,240,209,229,240,255,0,104,141,2,0,141,87,222,146,197,222,255,0,88,141,2,0,143,167,195,67,147,195,255,0,240,140,2,0,148,206,172,33,102,172,255,0,192,140,2,0,242,255,103,103,0,
-31,255,0,160,140,2,0,0,0,26,26,26,26,255,0,128,140,2,0,249,220,178,178,24,43,255,0,96,140,2,0,5,163,214,214,96,77,255,0,80,140,2,0,13,119,244,244,165,130,255,0,64,140,2,0,15,54,253,253,219,199,255,0,32,140,2,0,0,0,224,224,224,224,255,0,144,139,2,0,0,0,186,186,186,186,255,0,120,139,2,0,0,0,135,135,135,135,255,0,56,139,2,0,0,0,77,77,77,77,255,0,40,139,2,0,242,255,103,103,0,31,255,0,24,139,2,0,0,0,77,77,77,77,255,0,248,138,2,0,0,0,26,26,26,26,255,0,208,138,2,0,249,220,178,178,24,43,255,0,184,138,2,0,
-5,163,214,214,96,77,255,0,144,138,2,0,13,119,244,244,165,130,255,0,96,138,2,0,15,54,253,253,219,199,255,0,224,137,2,0,0,0,255,255,255,255,255,0,208,137,2,0,0,0,224,224,224,224,255,0,168,137,2,0,0,0,186,186,186,186,255,0,152,137,2,0,0,0,135,135,135,135,255,0,136,137,2,0,12,150,239,239,138,98,255,0,112,137,2,0,0,0,255,255,255,255,255,0,80,137,2,0,0,0,153,153,153,153,255,0,64,137,2,0,248,255,202,202,0,32,255,0,48,137,2,0,13,119,244,244,165,130,255,0,8,137,2,0,0,0,186,186,186,186,255,0,96,136,2,0,0,0,
-64,64,64,64,255,0,80,136,2,0,248,255,202,202,0,32,255,0,40,136,2,0,13,119,244,244,165,130,255,0,24,136,2,0,0,0,255,255,255,255,255,0,8,136,2,0,0,0,186,186,186,186,255,0,248,135,2,0,0,0,64,64,64,64,255,0,216,135,2,0,249,220,178,178,24,43,255,0,200,135,2,0,12,150,239,239,138,98,255,0,184,135,2,0,15,54,253,253,219,199,255,0,136,135,2,0,0,0,224,224,224,224,255,0,56,135,2,0,0,0,153,153,153,153,255,0,40,135,2,0,0,0,77,77,77,77,255,0,232,134,2,0,249,220,178,178,24,43,255,0,216,134,2,0,12,150,239,239,138,
-98,255,0,200,134,2,0,15,54,253,253,219,199,255,0,176,134,2,0,0,0,255,255,255,255,255,0,144,134,2,0,0,0,224,224,224,224,255,0,128,134,2,0,0,0,153,153,153,153,255,0,112,134,2,0,0,0,77,77,77,77,255,0,72,134,2,0,249,220,178,178,24,43,255,0,16,134,2,0,5,163,214,214,96,77,255,0,0,134,2,0,13,119,244,244,165,130,255,0,184,133,2,0,15,54,253,253,219,199,255,0,168,133,2,0,0,0,224,224,224,224,255,0,152,133,2,0,0,0,186,186,186,186,255,0,120,133,2,0,0,0,135,135,135,135,255,0,88,133,2,0,0,0,77,77,77,77,255,0,72,
-133,2,0,249,220,178,178,24,43,255,0,56,133,2,0,5,163,214,214,96,77,255,0,248,132,2,0,13,119,244,244,165,130,255,0,184,132,2,0,15,54,253,253,219,199,255,0,168,132,2,0,0,0,255,255,255,255,255,0,72,132,2,0,0,0,224,224,224,224,255,0,56,132,2,0,0,0,186,186,186,186,255,0,40,132,2,0,0,0,135,135,135,135,255,0,24,132,2,0,0,0,77,77,77,77,255,0,208,131,2,0,3,32,253,253,224,221,255,0,192,131,2,0,244,92,250,250,159,181,255,0,176,131,2,0,227,220,197,197,27,138,255,0,136,131,2,0,13,28,254,254,235,226,255,0,72,131,
-2,0,252,72,251,251,180,185,255,0,56,131,2,0,238,147,247,247,104,161,255,0,216,130,2,0,224,253,174,174,1,126,255,0,200,130,2,0,13,28,254,254,235,226,255,0,184,130,2,0,252,72,251,251,180,185,255,0,168,130,2,0,238,147,247,247,104,161,255,0,136,130,2,0,227,220,197,197,27,138,255,0,72,130,2,0,213,252,122,122,1,119,255,0,56,130,2,0,13,28,254,254,235,226,255,0,224,129,2,0,3,60,252,252,197,192,255,0,152,129,2,0,244,92,250,250,159,181,255,0,120,129,2,0,238,147,247,247,104,161,255,0,88,129,2,0,227,220,197,
-197,27,138,255,0,56,129,2,0,213,252,122,122,1,119,255,0,40,129,2,0,13,28,254,254,235,226,255,0,8,129,2,0,3,60,252,252,197,192,255,0,232,128,2,0,244,92,250,250,159,181,255,0,200,128,2,0,238,147,247,247,104,161,255,0,184,128,2,0,230,195,221,221,52,151,255,0,128,128,2,0,224,253,174,174,1,126,255,0,16,128,2,0,213,252,122,122,1,119,255,0,0,128,2,0,14,12,255,255,247,243,255,0,144,127,2,0,3,32,253,253,224,221,255,0,88,127,2,0,3,60,252,252,197,192,255,0,64,127,2,0,244,92,250,250,159,181,255,0,32,127,2,0,
-238,147,247,247,104,161,255,0,232,126,2,0,230,195,221,221,52,151,255,0,136,126,2,0,224,253,174,174,1,126,255,0,216,125,2,0,213,252,122,122,1,119,255,0,40,125,2,0,14,12,255,255,247,243,255,0,248,124,2,0,3,32,253,253,224,221,255,0,232,124,2,0,3,60,252,252,197,192,255,0,128,124,2,0,244,92,250,250,159,181,255,0,112,124,2,0,238,147,247,247,104,161,255,0,96,124,2,0,230,195,221,221,52,151,255,0,48,124,2,0,224,253,174,174,1,126,255,0,0,124,2,0,213,252,122,122,1,119,255,0,240,123,2,0,199,255,106,73,0,106,
-255,0,224,123,2,0,245,255,165,165,0,38,255,0,184,123,2,0,167,171,149,49,54,149,255,0,104,123,2,0,2,208,215,215,48,39,255,0,72,123,2,0,10,184,244,244,109,67,255,0,0,123,2,0,20,157,253,253,174,97,255,0,240,122,2,0,30,110,254,254,224,144,255,0,224,122,2,0,136,24,248,224,243,248,255,0,200,122,2,0,138,67,233,171,217,233,255,0,168,122,2,0,143,113,209,116,173,209,255,0,144,122,2,0,151,157,180,69,117,180,255,0,120,122,2,0,245,255,165,165,0,38,255,0,88,122,2,0,151,157,180,69,117,180,255,0,8,122,2,0,167,171,
-149,49,54,149,255,0,248,121,2,0,2,208,215,215,48,39,255,0,200,121,2,0,10,184,244,244,109,67,255,0,184,121,2,0,20,157,253,253,174,97,255,0,168,121,2,0,30,110,254,254,224,144,255,0,152,121,2,0,42,64,255,255,255,191,255,0,64,121,2,0,136,24,248,224,243,248,255,0,48,121,2,0,138,67,233,171,217,233,255,0,32,121,2,0,143,113,209,116,173,209,255,0,0,121,2,0,13,164,252,252,141,89,255,0,168,120,2,0,42,64,255,255,255,191,255,0,152,120,2,0,143,86,219,145,191,219,255,0,88,120,2,0,254,225,215,215,25,28,255,0,72,
-120,2,0,20,157,253,253,174,97,255,0,56,120,2,0,138,67,233,171,217,233,255,0,40,120,2,0,145,193,182,44,123,182,255,0,24,120,2,0,254,225,215,215,25,28,255,0,8,120,2,0,20,157,253,253,174,97,255,0,232,119,2,0,42,64,255,255,255,191,255,0,160,119,2,0,138,67,233,171,217,233,255,0,88,119,2,0,145,193,182,44,123,182,255,0,72,119,2,0,2,208,215,215,48,39,255,0,40,119,2,0,13,164,252,252,141,89,255,0,8,119,2,0,30,110,254,254,224,144,255,0,240,118,2,0,136,24,248,224,243,248,255,0,224,118,2,0,143,86,219,145,191,
-219,255,0,184,118,2,0,151,157,180,69,117,180,255,0,168,118,2,0,2,208,215,215,48,39,255,0,152,118,2,0,13,164,252,252,141,89,255,0,64,118,2,0,30,110,254,254,224,144,255,0,0,118,2,0,42,64,255,255,255,191,255,0,240,117,2,0,136,24,248,224,243,248,255,0,208,117,2,0,143,86,219,145,191,219,255,0,192,117,2,0,151,157,180,69,117,180,255,0,176,117,2,0,2,208,215,215,48,39,255,0,160,117,2,0,10,184,244,244,109,67,255,0,112,117,2,0,20,157,253,253,174,97,255,0,96,117,2,0,30,110,254,254,224,144,255,0,64,117,2,0,136,
-24,248,224,243,248,255,0,0,117,2,0,138,67,233,171,217,233,255,0,200,116,2,0,143,113,209,116,173,209,255,0,184,116,2,0,151,157,180,69,117,180,255,0,136,116,2,0,2,208,215,215,48,39,255,0,120,116,2,0,10,184,244,244,109,67,255,0,104,116,2,0,20,157,253,253,174,97,255,0,88,116,2,0,30,110,254,254,224,144,255,0,32,116,2,0,42,64,255,255,255,191,255,0,16,116,2,0,136,24,248,224,243,248,255,0,0,116,2,0,138,67,233,171,217,233,255,0,216,115,2,0,143,113,209,116,173,209,255,0,160,115,2,0,151,157,180,69,117,180,255,
-0,144,115,2,0,245,255,165,165,0,38,255,0,72,115,2,0,107,255,104,0,104,55,255,0,56,115,2,0,2,208,215,215,48,39,255,0,40,115,2,0,10,184,244,244,109,67,255,0,24,115,2,0,20,157,253,253,174,97,255,0,248,114,2,0,31,115,254,254,224,139,255,0,176,114,2,0,51,106,239,217,239,139,255,0,160,114,2,0,62,130,217,166,217,106,255,0,88,114,2,0,83,121,189,102,189,99,255,0,40,114,2,0,103,211,152,26,152,80,255,0,8,114,2,0,245,255,165,165,0,38,255,0,192,113,2,0,103,211,152,26,152,80,255,0,96,113,2,0,107,255,104,0,104,
-55,255,0,80,113,2,0,2,208,215,215,48,39,255,0,40,113,2,0,10,184,244,244,109,67,255,0,24,113,2,0,20,157,253,253,174,97,255,0,8,113,2,0,31,115,254,254,224,139,255,0,216,112,2,0,42,64,255,255,255,191,255,0,104,112,2,0,51,106,239,217,239,139,255,0,32,112,2,0,62,130,217,166,217,106,255,0,16,112,2,0,83,121,189,102,189,99,255,0,216,111,2,0,13,164,252,252,141,89,255,0,176,111,2,0,42,64,255,255,255,191,255,0,152,111,2,0,66,136,207,145,207,96,255,0,32,111,2,0,254,225,215,215,25,28,255,0,240,110,2,0,20,157,
-253,253,174,97,255,0,152,110,2,0,62,130,217,166,217,106,255,0,56,110,2,0,98,210,150,26,150,65,255,0,152,109,2,0,254,225,215,215,25,28,255,0,56,109,2,0,20,157,253,253,174,97,255,0,24,109,2,0,42,64,255,255,255,191,255,0,240,108,2,0,62,130,217,166,217,106,255,0,216,108,2,0,98,210,150,26,150,65,255,0,200,108,2,0,2,208,215,215,48,39,255,0,184,108,2,0,13,164,252,252,141,89,255,0,136,108,2,0,31,115,254,254,224,139,255,0,120,108,2,0,51,106,239,217,239,139,255,0,104,108,2,0,66,136,207,145,207,96,255,0,80,
-108,2,0,103,211,152,26,152,80,255,0,24,108,2,0,2,208,215,215,48,39,255,0,0,108,2,0,13,164,252,252,141,89,255,0,240,107,2,0,31,115,254,254,224,139,255,0,216,107,2,0,42,64,255,255,255,191,255,0,200,107,2,0,51,106,239,217,239,139,255,0,176,107,2,0,66,136,207,145,207,96,255,0,88,107,2,0,103,211,152,26,152,80,255,0,72,107,2,0,2,208,215,215,48,39,255,0,40,107,2,0,10,184,244,244,109,67,255,0,16,107,2,0,20,157,253,253,174,97,255,0,200,106,2,0,31,115,254,254,224,139,255,0,184,106,2,0,51,106,239,217,239,139,
-255,0,160,106,2,0,62,130,217,166,217,106,255,0,128,106,2,0,83,121,189,102,189,99,255,0,112,106,2,0,103,211,152,26,152,80,255,0,96,106,2,0,2,208,215,215,48,39,255,0,64,106,2,0,10,184,244,244,109,67,255,0,40,106,2,0,20,157,253,253,174,97,255,0,24,106,2,0,31,115,254,254,224,139,255,0,248,105,2,0,42,64,255,255,255,191,255,0,168,105,2,0,51,106,239,217,239,139,255,0,152,105,2,0,62,130,217,166,217,106,255,0,120,105,2,0,83,121,189,102,189,99,255,0,96,105,2,0,103,211,152,26,152,80,255,0,80,105,2,0,13,44,254,
-254,224,210,255,0,64,105,2,0,9,139,252,252,146,114,255,0,32,105,2,0,1,211,222,222,45,38,255,0,8,105,2,0,13,37,254,254,229,217,255,0,184,104,2,0,11,108,252,252,174,145,255,0,152,104,2,0,7,179,251,251,106,74,255,0,104,104,2,0,253,224,203,203,24,29,255,0,88,104,2,0,13,37,254,254,229,217,255,0,72,104,2,0,11,108,252,252,174,145,255,0,16,104,2,0,7,179,251,251,106,74,255,0,0,104,2,0,1,211,222,222,45,38,255,0,240,103,2,0,253,231,165,165,15,21,255,0,152,103,2,0,13,37,254,254,229,217,255,0,56,103,2,0,12,92,
-252,252,187,161,255,0,248,102,2,0,9,139,252,252,146,114,255,0,104,102,2,0,7,179,251,251,106,74,255,0,56,102,2,0,1,211,222,222,45,38,255,0,40,102,2,0,253,231,165,165,15,21,255,0,24,102,2,0,13,37,254,254,229,217,255,0,184,101,2,0,12,92,252,252,187,161,255,0,168,101,2,0,9,139,252,252,146,114,255,0,152,101,2,0,7,179,251,251,106,74,255,0,104,101,2,0,3,208,239,239,59,44,255,0,88,101,2,0,253,224,203,203,24,29,255,0,72,101,2,0,251,255,153,153,0,13,255,0,40,101,2,0,14,15,255,255,245,240,255,0,208,100,2,0,
-13,44,254,254,224,210,255,0,192,100,2,0,12,92,252,252,187,161,255,0,176,100,2,0,9,139,252,252,146,114,255,0,120,100,2,0,7,179,251,251,106,74,255,0,104,100,2,0,3,208,239,239,59,44,255,0,80,100,2,0,253,224,203,203,24,29,255,0,16,100,2,0,251,255,153,153,0,13,255,0,0,100,2,0,14,15,255,255,245,240,255,0,216,99,2,0,13,44,254,254,224,210,255,0,192,99,2,0,12,92,252,252,187,161,255,0,128,99,2,0,9,139,252,252,146,114,255,0,112,99,2,0,7,179,251,251,106,74,255,0,96,99,2,0,3,208,239,239,59,44,255,0,16,99,2,0,
-253,224,203,203,24,29,255,0,248,98,2,0,253,231,165,165,15,21,255,0,232,98,2,0,249,255,103,103,0,13,255,0,216,98,2,0,254,225,228,228,26,28,255,0,176,98,2,0,146,178,184,55,126,184,255,0,96,95,2,0,83,147,175,77,175,74,255,0,64,95,2,0,254,225,228,228,26,28,255,0,176,94,2,0,146,178,184,55,126,184,255,0,96,94,2,0,83,147,175,77,175,74,255,0,24,94,2,0,207,132,163,152,78,163,255,0,200,93,2,0,254,225,228,228,26,28,255,0,168,93,2,0,146,178,184,55,126,184,255,0,144,93,2,0,83,147,175,77,175,74,255,0,112,93,2,
-0,207,132,163,152,78,163,255,0,88,93,2,0,21,255,255,255,127,0,255,0,72,93,2,0,254,225,228,228,26,28,255,0,240,92,2,0,146,178,184,55,126,184,255,0,184,92,2,0,83,147,175,77,175,74,255,0,152,92,2,0,207,132,163,152,78,163,255,0,96,92,2,0,21,255,255,255,127,0,255,0,32,92,2,0,42,204,255,255,255,51,255,0,8,92,2,0,254,225,228,228,26,28,255,0,176,91,2,0,146,178,184,55,126,184,255,0,88,91,2,0,83,147,175,77,175,74,255,0,200,90,2,0,207,132,163,152,78,163,255,0,104,90,2,0,21,255,255,255,127,0,255,0,72,90,2,0,
-42,204,255,255,255,51,255,0,216,89,2,0,15,193,166,166,86,40,255,0,168,89,2,0,254,225,228,228,26,28,255,0,152,89,2,0,146,178,184,55,126,184,255,0,64,89,2,0,83,147,175,77,175,74,255,0,48,89,2,0,207,132,163,152,78,163,255,0,32,89,2,0,21,255,255,255,127,0,255,0,0,89,2,0,42,204,255,255,255,51,255,0,240,88,2,0,15,193,166,166,86,40,255,0,224,88,2,0,232,121,247,247,129,191,255,0,208,88,2,0,254,225,228,228,26,28,255,0,128,88,2,0,146,178,184,55,126,184,255,0,88,88,2,0,83,147,175,77,175,74,255,0,72,88,2,0,207,
-132,163,152,78,163,255,0,16,88,2,0,21,255,255,255,127,0,255,0,0,88,2,0,42,204,255,255,255,51,255,0,240,87,2,0,15,193,166,166,86,40,255,0,208,87,2,0,232,121,247,247,129,191,255,0,192,87,2,0,0,0,153,153,153,153,255,0,160,87,2,0,114,120,194,102,194,165,255,0,136,87,2,0,11,155,252,252,141,98,255,0,64,87,2,0,156,77,203,141,160,203,255,0,40,87,2,0,114,120,194,102,194,165,255,0,24,87,2,0,11,155,252,252,141,98,255,0,232,86,2,0,156,77,203,141,160,203,255,0,216,86,2,0,228,102,231,231,138,195,255,0,200,86,2,
-0,114,120,194,102,194,165,255,0,168,86,2,0,11,155,252,252,141,98,255,0,152,86,2,0,156,77,203,141,160,203,255,0,128,86,2,0,228,102,231,231,138,195,255,0,112,86,2,0,58,155,216,166,216,84,255,0,32,86,2,0,114,120,194,102,194,165,255,0,16,86,2,0,11,155,252,252,141,98,255,0,0,86,2,0,156,77,203,141,160,203,255,0,200,85,2,0,228,102,231,231,138,195,255,0,184,85,2,0,58,155,216,166,216,84,255,0,168,85,2,0,34,208,255,255,217,47,255,0,136,85,2,0,114,120,194,102,194,165,255,0,120,85,2,0,11,155,252,252,141,98,255,
-0,104,85,2,0,156,77,203,141,160,203,255,0,88,85,2,0,228,102,231,231,138,195,255,0,40,85,2,0,58,155,216,166,216,84,255,0,24,85,2,0,34,208,255,255,217,47,255,0,8,85,2,0,25,90,229,229,196,148,255,0,240,84,2,0,114,120,194,102,194,165,255,0,224,84,2,0,11,155,252,252,141,98,255,0,208,84,2,0,156,77,203,141,160,203,255,0,176,84,2,0,228,102,231,231,138,195,255,0,160,84,2,0,58,155,216,166,216,84,255,0,136,84,2,0,34,208,255,255,217,47,255,0,88,84,2,0,25,90,229,229,196,148,255,0,32,84,2,0,0,0,179,179,179,179,
-255,0,8,84,2,0,120,84,211,141,211,199,255,0,240,83,2,0,211,82,189,188,128,189,255,0,200,83,2,0,42,76,255,255,255,179,255,0,184,83,2,0,175,37,218,190,186,218,255,0,168,83,2,0,4,139,251,251,128,114,255,0,120,83,2,0,144,100,211,128,177,211,255,0,104,83,2,0,22,156,253,253,180,98,255,0,88,83,2,0,58,134,222,179,222,105,255,0,72,83,2,0,233,47,252,252,205,229,255,0,24,83,2,0,0,0,217,217,217,217,255,0,8,83,2,0,120,84,211,141,211,199,255,0,248,82,2,0,211,82,189,188,128,189,255,0,216,82,2,0,77,41,235,204,235,
-197,255,0,200,82,2,0,42,76,255,255,255,179,255,0,184,82,2,0,175,37,218,190,186,218,255,0,128,82,2,0,4,139,251,251,128,114,255,0,112,82,2,0,144,100,211,128,177,211,255,0,96,82,2,0,22,156,253,253,180,98,255,0,80,82,2,0,58,134,222,179,222,105,255,0,224,81,2,0,233,47,252,252,205,229,255,0,208,81,2,0,0,0,217,217,217,217,255,0,192,81,2,0,120,84,211,141,211,199,255,0,168,81,2,0,211,82,189,188,128,189,255,0,152,81,2,0,77,41,235,204,235,197,255,0,136,81,2,0,37,144,255,255,237,111,255,0,104,81,2,0,42,76,255,
-255,255,179,255,0,48,81,2,0,175,37,218,190,186,218,255,0,16,81,2,0,4,139,251,251,128,114,255,0,232,80,2,0,144,100,211,128,177,211,255,0,192,80,2,0,22,156,253,253,180,98,255,0,152,80,2,0,58,134,222,179,222,105,255,0,136,80,2,0,233,47,252,252,205,229,255,0,104,80,2,0,0,0,217,217,217,217,255,0,88,80,2,0,120,84,211,141,211,199,255,0,64,80,2,0,42,76,255,255,255,179,255,0,24,80,2,0,175,37,218,190,186,218,255,0,8,80,2,0,120,84,211,141,211,199,255,0,248,79,2,0,42,76,255,255,255,179,255,0,232,79,2,0,175,37,
-218,190,186,218,255,0,176,79,2,0,4,139,251,251,128,114,255,0,152,79,2,0,120,84,211,141,211,199,255,0,136,79,2,0,42,76,255,255,255,179,255,0,72,79,2,0,175,37,218,190,186,218,255,0,48,79,2,0,4,139,251,251,128,114,255,0,248,78,2,0,144,100,211,128,177,211,255,0,200,78,2,0,120,84,211,141,211,199,255,0,176,78,2,0,42,76,255,255,255,179,255,0,16,78,2,0,175,37,218,190,186,218,255,0,240,77,2,0,4,139,251,251,128,114,255,0,104,77,2,0,144,100,211,128,177,211,255,0,88,77,2,0,22,156,253,253,180,98,255,0,16,77,2,
-0,120,84,211,141,211,199,255,0,0,77,2,0,42,76,255,255,255,179,255,0,240,76,2,0,175,37,218,190,186,218,255,0,224,76,2,0,4,139,251,251,128,114,255,0,192,76,2,0,144,100,211,128,177,211,255,0,176,76,2,0,22,156,253,253,180,98,255,0,160,76,2,0,58,134,222,179,222,105,255,0,144,76,2,0,120,84,211,141,211,199,255,0,96,76,2,0,42,76,255,255,255,179,255,0,64,76,2,0,175,37,218,190,186,218,255,0,48,76,2,0,4,139,251,251,128,114,255,0,32,76,2,0,144,100,211,128,177,211,255,0,16,76,2,0,22,156,253,253,180,98,255,0,0,
-76,2,0,58,134,222,179,222,105,255,0,216,75,2,0,233,47,252,252,205,229,255,0,200,75,2,0,120,84,211,141,211,199,255,0,184,75,2,0,42,76,255,255,255,179,255,0,152,75,2,0,175,37,218,190,186,218,255,0,96,75,2,0,4,139,251,251,128,114,255,0,80,75,2,0,144,100,211,128,177,211,255,0,64,75,2,0,22,156,253,253,180,98,255,0,48,75,2,0,58,134,222,179,222,105,255,0,32,75,2,0,233,47,252,252,205,229,255,0,16,75,2,0,0,0,217,217,217,217,255,0,240,74,2,0,237,253,158,158,1,66,255,0,224,74,2,0,177,130,162,94,79,162,255,0,
-208,74,2,0,250,180,213,213,62,79,255,0,184,74,2,0,10,184,244,244,109,67,255,0,128,74,2,0,20,157,253,253,174,97,255,0,112,74,2,0,31,115,254,254,224,139,255,0,96,74,2,0,49,96,245,230,245,152,255,0,80,74,2,0,79,65,221,171,221,164,255,0,64,74,2,0,114,120,194,102,194,165,255,0,48,74,2,0,143,187,189,50,136,189,255,0,32,74,2,0,237,253,158,158,1,66,255,0,16,74,2,0,143,187,189,50,136,189,255,0,216,73,2,0,177,130,162,94,79,162,255,0,200,73,2,0,250,180,213,213,62,79,255,0,152,73,2,0,10,184,244,244,109,67,255,
-0,128,73,2,0,20,157,253,253,174,97,255,0,112,73,2,0,31,115,254,254,224,139,255,0,96,73,2,0,42,64,255,255,255,191,255,0,80,73,2,0,49,96,245,230,245,152,255,0,64,73,2,0,79,65,221,171,221,164,255,0,32,73,2,0,114,120,194,102,194,165,255,0,16,73,2,0,13,164,252,252,141,89,255,0,0,73,2,0,42,64,255,255,255,191,255,0,232,72,2,0,81,77,213,153,213,148,255,0,176,72,2,0,254,225,215,215,25,28,255,0,160,72,2,0,20,157,253,253,174,97,255,0,144,72,2,0,79,65,221,171,221,164,255,0,128,72,2,0,143,196,186,43,131,186,255,
-0,112,72,2,0,254,225,215,215,25,28,255,0,96,72,2,0,20,157,253,253,174,97,255,0,48,72,2,0,42,64,255,255,255,191,255,0,32,72,2,0,79,65,221,171,221,164,255,0,16,72,2,0,143,196,186,43,131,186,255,0,0,72,2,0,250,180,213,213,62,79,255,0,192,71,2,0,13,164,252,252,141,89,255,0,176,71,2,0,31,115,254,254,224,139,255,0,160,71,2,0,49,96,245,230,245,152,255,0,144,71,2,0,81,77,213,153,213,148,255,0,128,71,2,0,143,187,189,50,136,189,255,0,112,71,2,0,250,180,213,213,62,79,255,0,40,71,2,0,13,164,252,252,141,89,255,
-0,24,71,2,0,31,115,254,254,224,139,255,0,8,71,2,0,42,64,255,255,255,191,255,0,248,70,2,0,49,96,245,230,245,152,255,0,200,70,2,0,81,77,213,153,213,148,255,0,184,70,2,0,143,187,189,50,136,189,255,0,168,70,2,0,250,180,213,213,62,79,255,0,152,70,2,0,10,184,244,244,109,67,255,0,136,70,2,0,20,157,253,253,174,97,255,0,120,70,2,0,31,115,254,254,224,139,255,0,88,70,2,0,49,96,245,230,245,152,255,0,48,70,2,0,79,65,221,171,221,164,255,0,24,70,2,0,114,120,194,102,194,165,255,0,248,69,2,0,143,187,189,50,136,189,
-255,0,152,69,2,0,250,180,213,213,62,79,255,0,120,69,2,0,10,184,244,244,109,67,255,0,104,69,2,0,20,157,253,253,174,97,255,0,80,69,2,0,31,115,254,254,224,139,255,0,64,69,2,0,42,64,255,255,255,191,255,0,48,69,2,0,49,96,245,230,245,152,255,0,0,69,2,0,79,65,221,171,221,164,255,0,240,68,2,0,114,120,194,102,194,165,255,0,224,68,2,0,143,187,189,50,136,189,255,0,184,68,2,0,147,15,255,240,248,255,255,0,104,68,2,0,24,35,250,250,235,215,255,0,88,68,2,0,127,255,255,0,255,255,255,0,40,68,2,0,113,128,255,127,255,
-212,255,0,0,68,2,0,127,15,255,240,255,255,255,0,232,67,2,0,42,26,245,245,245,220,255,0,120,67,2,0,23,58,255,255,228,196,255,0,64,67,2,0,0,0,0,0,0,0,255,0,24,67,2,0,25,49,255,255,235,205,255,0,176,66,2,0,170,255,255,0,0,255,255,0,160,66,2,0,192,206,226,138,43,226,255,0,56,66,2,0,0,190,165,165,42,42,255,0,40,66,2,0,23,99,222,222,184,135,255,0,232,65,2,0,128,103,160,95,158,160,255,0,200,65,2,0,63,255,255,127,255,0,255,0,184,65,2,0,17,218,210,210,105,30,255,0,168,65,2,0,11,175,255,255,127,80,255,0,128,
-65,2,0,154,147,237,100,149,237,255,0,112,65,2,0,33,34,255,255,248,220,255,0,96,65,2,0,246,231,220,220,20,60,255,0,64,65,2,0,127,255,255,0,255,255,255,0,16,65,2,0,170,255,139,0,0,139,255,0,248,64,2,0,127,255,139,0,139,139,255,0,224,64,2,0,30,239,184,184,134,11,255,0,208,64,2,0,0,0,169,169,169,169,255,0,192,64,2,0,85,255,100,0,100,0,255,0,176,64,2,0,0,0,169,169,169,169,255,0,136,64,2,0,39,110,189,189,183,107,255,0,112,64,2,0,212,255,139,139,0,139,255,0,88,64,2,0,58,142,107,85,107,47,255,0,72,64,2,0,
-23,255,255,255,140,0,255,0,8,64,2,0,198,192,204,153,50,204,255,0,232,63,2,0,0,255,139,139,0,0,255,0,216,63,2,0,10,121,233,233,150,122,255,0,192,63,2,0,85,61,188,143,188,143,255,0,168,63,2,0,175,143,139,72,61,139,255,0,144,63,2,0,127,103,79,47,79,79,255,0,104,63,2,0,127,103,79,47,79,79,255,0,80,63,2,0,128,255,209,0,206,209,255,0,64,63,2,0,199,255,211,148,0,211,255,0,48,63,2,0,232,235,255,255,20,147,255,0,184,62,2,0,138,255,255,0,191,255,255,0,168,62,2,0,0,0,105,105,105,105,255,0,152,62,2,0,0,0,105,
-105,105,105,255,0,136,62,2,0,148,225,255,30,144,255,255,0,120,62,2,0,0,206,178,178,34,34,255,0,96,62,2,0,28,15,255,255,250,240,255,0,56,62,2,0,85,192,139,34,139,34,255,0,32,62,2,0,212,255,255,255,0,255,255,0,16,62,2,0,0,0,220,220,220,220,255,0,0,62,2,0,170,7,255,248,248,255,255,0,200,61,2,0,35,255,255,255,215,0,255,0,184,61,2,0,30,217,218,218,165,32,255,0,168,61,2,0,0,0,128,128,128,128,255,0,152,61,2,0,85,255,128,0,128,0,255,0,128,61,2,0,59,208,255,173,255,47,255,0,112,61,2,0,0,0,128,128,128,128,
-255,0,80,61,2,0,85,15,255,240,255,240,255,0,64,61,2,0,233,150,255,255,105,180,255,0,48,61,2,0,0,140,205,205,92,92,255,0,32,61,2,0,194,255,130,75,0,130,255,0,232,60,2,0,42,15,255,255,255,240,255,0,216,60,2,0,38,106,240,240,230,140,255,0,200,60,2,0,170,20,250,230,230,250,255,0,176,60,2,0,240,15,255,255,240,245,255,0,160,60,2,0,64,255,252,124,252,0,255,0,136,60,2,0,38,49,255,255,250,205,255,0,104,60,2,0,137,63,230,173,216,230,255,0,88,60,2,0,0,119,240,240,128,128,255,0,72,60,2,0,127,31,255,224,255,255,
-255,0,24,60,2,0,42,40,250,250,250,210,255,0,208,59,2,0,0,0,211,211,211,211,255,0,176,59,2,0,85,100,238,144,238,144,255,0,160,59,2,0,0,0,211,211,211,211,255,0,144,59,2,0,248,73,255,255,182,193,255,0,120,59,2,0,12,132,255,255,160,122,255,0,96,59,2,0,125,209,178,32,178,170,255,0,24,59,2,0,143,117,250,135,206,250,255,0,0,59,2,0,148,56,153,119,136,153,255,0,232,58,2,0,148,56,153,119,136,153,255,0,208,58,2,0,151,52,222,176,196,222,255,0,144,58,2,0,42,31,255,255,255,224,255,0,128,58,2,0,85,255,255,0,255,
-0,255,0,112,58,2,0,85,192,205,50,205,50,255,0,96,58,2,0,21,20,250,250,240,230,255,0,80,58,2,0,212,255,255,255,0,255,255,0,64,58,2,0,0,255,128,128,0,0,255,0,24,58,2,0,113,128,205,102,205,170,255,0,240,57,2,0,170,255,205,0,0,205,255,0,208,57,2,0,204,152,211,186,85,211,255,0,152,57,2,0,183,124,219,147,112,219,255,0,88,57,2,0,103,169,179,60,179,113,255,0,56,57,2,0,176,143,238,123,104,238,255,0,24,57,2,0,111,255,250,0,250,154,255,0,0,57,2,0,125,167,209,72,209,204,255,0,224,56,2,0,228,228,199,199,21,133,
-255,0,200,56,2,0,170,198,112,25,25,112,255,0,112,56,2,0,106,9,255,245,255,250,255,0,96,56,2,0,4,30,255,255,228,225,255,0,80,56,2,0,26,73,255,255,228,181,255,0,48,56,2,0,25,81,255,255,222,173,255,0,200,55,2,0,170,255,128,0,0,128,255,0,184,55,2,0,27,23,253,253,245,230,255,0,152,55,2,0,42,255,128,128,128,0,255,0,104,55,2,0,56,192,142,107,142,35,255,0,80,55,2,0,27,255,255,255,165,0,255,0,32,55,2,0,11,255,255,255,69,0,255,0,248,54,2,0,214,123,218,218,112,214,255,0,200,54,2,0,38,72,238,238,232,170,255,
-0,80,54,2,0,85,100,251,152,251,152,255,0,56,54,2,0,127,67,238,175,238,238,255,0,216,53,2,0,241,124,219,219,112,147,255,0,200,53,2,0,26,41,255,255,239,213,255,0,168,53,2,0,20,70,255,255,218,185,255,0,152,53,2,0,20,176,205,205,133,63,255,0,120,53,2,0,247,63,255,255,192,203,255,0,104,53,2,0,212,70,221,221,160,221,255,0,72,53,2,0,132,59,230,176,224,230,255,0,56,53,2,0,212,255,128,128,0,128,255,0,40,53,2,0,0,255,255,255,0,0,255,0,24,53,2,0,0,61,188,188,143,143,255,0,216,52,2,0,159,181,225,65,105,225,255,
-0,192,52,2,0,17,220,139,139,69,19,255,0,160,52,2,0,4,138,250,250,128,114,255,0,144,52,2,0,19,154,244,244,164,96,255,0,128,52,2,0,103,170,139,46,139,87,255,0,112,52,2,0,17,16,255,255,245,238,255,0,72,52,2,0,13,183,160,160,82,45,255,0,56,52,2,0,0,0,192,192,192,192,255,0,40,52,2,0,139,108,235,135,206,235,255,0,8,52,2,0,175,143,205,106,90,205,255,0,184,51,2,0,148,56,144,112,128,144,255,0,168,51,2,0,148,56,144,112,128,144,255,0,136,51,2,0,0,5,255,255,250,250,255,0,112,51,2,0,106,255,255,0,255,127,255,
-0,96,51,2,0,146,155,180,70,130,180,255,0,80,51,2,0,24,84,210,210,180,140,255,0,48,51,2,0,127,255,128,0,128,128,255,0,32,51,2,0,212,29,216,216,191,216,255,0,16,51,2,0,6,184,255,255,99,71,255,0,0,51,2,0,123,182,224,64,224,208,255,0,192,50,2,0,212,115,238,238,130,238,255,0,128,50,2,0,27,68,245,245,222,179,255,0,112,50,2,0,0,0,255,255,255,255,255,0,96,50,2,0,0,0,245,245,245,245,255,0,80,50,2,0,42,255,255,255,255,0,255,0,56,50,2,0,56,192,205,154,205,50,255,0,40,50,2,0,45,67,252,247,252,185,255,0,24,50,
-2,0,68,91,221,173,221,142,255,0,248,49,2,0,98,178,163,49,163,84,255,0,232,49,2,0,42,50,255,255,255,204,255,0,184,49,2,0,62,85,230,194,230,153,255,0,168,49,2,0,85,100,198,120,198,121,255,0,152,49,2,0,99,187,132,35,132,67,255,0,136,49,2,0,42,50,255,255,255,204,255,0,120,49,2,0,62,85,230,194,230,153,255,0,104,49,2,0,85,100,198,120,198,121,255,0,72,49,2,0,98,178,163,49,163,84,255,0,56,49,2,0,107,255,104,0,104,55,255,0,40,49,2,0,42,50,255,255,255,204,255,0,24,49,2,0,55,81,240,217,240,163,255,0,216,48,
-2,0,68,91,221,173,221,142,255,0,200,48,2,0,85,100,198,120,198,121,255,0,184,48,2,0,98,178,163,49,163,84,255,0,168,48,2,0,107,255,104,0,104,55,255,0,152,48,2,0,42,50,255,255,255,204,255,0,136,48,2,0,55,81,240,217,240,163,255,0,96,48,2,0,68,91,221,173,221,142,255,0,80,48,2,0,85,100,198,120,198,121,255,0,64,48,2,0,96,158,171,65,171,93,255,0,48,48,2,0,99,187,132,35,132,67,255,0,0,48,2,0,108,255,90,0,90,50,255,0,240,47,2,0,42,25,255,255,255,229,255,0,224,47,2,0,45,67,252,247,252,185,255,0,208,47,2,0,55,
-81,240,217,240,163,255,0,192,47,2,0,68,91,221,173,221,142,255,0,176,47,2,0,85,100,198,120,198,121,255,0,96,47,2,0,96,158,171,65,171,93,255,0,80,47,2,0,99,187,132,35,132,67,255,0,64,47,2,0,108,255,90,0,90,50,255,0,48,47,2,0,42,25,255,255,255,229,255,0,240,46,2,0,45,67,252,247,252,185,255,0,224,46,2,0,55,81,240,217,240,163,255,0,208,46,2,0,68,91,221,173,221,142,255,0,192,46,2,0,85,100,198,120,198,121,255,0,176,46,2,0,96,158,171,65,171,93,255,0,160,46,2,0,99,187,132,35,132,67,255,0,128,46,2,0,107,255,
-104,0,104,55,255,0,88,46,2,0,110,255,69,0,69,41,255,0,24,46,2,0,49,73,248,237,248,177,255,0,240,45,2,0,117,97,205,127,205,187,255,0,152,45,2,0,144,194,184,44,127,184,255,0,112,45,2,0,42,50,255,255,255,204,255,0,88,45,2,0,99,66,218,161,218,180,255,0,72,45,2,0,132,170,196,65,182,196,255,0,48,45,2,0,150,203,168,34,94,168,255,0,32,45,2,0,42,50,255,255,255,204,255,0,208,44,2,0,99,66,218,161,218,180,255,0,192,44,2,0,132,170,196,65,182,196,255,0,176,44,2,0,144,194,184,44,127,184,255,0,160,44,2,0,164,191,
-148,37,52,148,255,0,72,44,2,0,42,50,255,255,255,204,255,0,56,44,2,0,69,58,233,199,233,180,255,0,32,44,2,0,117,97,205,127,205,187,255,0,208,43,2,0,132,170,196,65,182,196,255,0,184,43,2,0,144,194,184,44,127,184,255,0,144,43,2,0,164,191,148,37,52,148,255,0,80,43,2,0,42,50,255,255,255,204,255,0,48,43,2,0,69,58,233,199,233,180,255,0,232,42,2,0,117,97,205,127,205,187,255,0,216,42,2,0,132,170,196,65,182,196,255,0,104,42,2,0,139,216,192,29,145,192,255,0,88,42,2,0,150,203,168,34,94,168,255,0,48,42,2,0,158,
-231,132,12,44,132,255,0,32,42,2,0,42,38,255,255,255,217,255,0,16,42,2,0,49,73,248,237,248,177,255,0,232,41,2,0,69,58,233,199,233,180,255,0,200,41,2,0,117,97,205,127,205,187,255,0,184,41,2,0,132,170,196,65,182,196,255,0,168,41,2,0,139,216,192,29,145,192,255,0,152,41,2,0,150,203,168,34,94,168,255,0,240,40,2,0,158,231,132,12,44,132,255,0,224,40,2,0,42,38,255,255,255,217,255,0,200,40,2,0,49,73,248,237,248,177,255,0,184,40,2,0,69,58,233,199,233,180,255,0,168,40,2,0,117,97,205,127,205,187,255,0,152,40,
-2,0,132,170,196,65,182,196,255,0,112,40,2,0,139,216,192,29,145,192,255,0,96,40,2,0,150,203,168,34,94,168,255,0,64,40,2,0,164,191,148,37,52,148,255,0,32,40,2,0,158],"i8",L,l.J+51217);D([231,88,8,29,88,255,0,176,39,2,0,37,66,255,255,247,188,255,0,160,39,2,0,28,175,254,254,196,79,255,0,144,39,2,0,16,238,217,217,95,14,255,0,128,39,2,0,42,42,255,255,255,212,255,0,112,39,2,0,28,112,254,254,217,142,255,0,96,39,2,0,22,213,254,254,153,41,255,0,64,39,2,0,15,252,204,204,76,2,255,0,48,39,2,0,42,42,255,255,255,
-212,255,0,32,39,2,0,28,112,254,254,217,142,255,0,16,39,2,0,22,213,254,254,153,41,255,0,176,38,2,0,16,238,217,217,95,14,255,0,160,38,2,0,13,248,153,153,52,4,255,0,136,38,2,0,42,42,255,255,255,212,255,0,120,38,2,0,31,109,254,254,227,145,255,0,104,38,2,0,28,175,254,254,196,79,255,0,88,38,2,0,22,213,254,254,153,41,255,0,56,38,2,0,16,238,217,217,95,14,255,0,40,38,2,0,13,248,153,153,52,4,255,0,24,38,2,0,42,42,255,255,255,212,255,0,8,38,2,0,31,109,254,254,227,145,255,0,200,37,2,0,28,175,254,254,196,79,255,
-0,184,37,2,0,22,213,254,254,153,41,255,0,168,37,2,0,18,233,236,236,112,20,255,0,152,37,2,0,15,252,204,204,76,2,255,0,136,37,2,0,12,247,140,140,45,4,255,0,120,37,2,0,42,25,255,255,255,229,255,0,88,37,2,0,37,66,255,255,247,188,255,0,72,37,2,0,31,109,254,254,227,145,255,0,56,37,2,0,28,175,254,254,196,79,255,0,40,37,2,0,22,213,254,254,153,41,255,0,232,36,2,0,18,233,236,236,112,20,255,0,208,36,2,0,15,252,204,204,76,2,255,0,192,36,2,0,12,247,140,140,45,4,255,0,176,36,2,0,42,25,255,255,255,229,255,0,160,
-36,2,0,37,66,255,255,247,188,255,0,144,36,2,0,31,109,254,254,227,145,255,0,96,36,2,0,28,175,254,254,196,79,255,0,80,36,2,0,22,213,254,254,153,41,255,0,64,36,2,0,18,233,236,236,112,20,255,0,48,36,2,0,15,252,204,204,76,2,255,0,240,35,2,0,13,248,153,153,52,4,255,0,224,35,2,0,13,240,102,102,37,6,255,0,208,35,2,0,34,95,255,255,237,160,255,0,192,35,2,0,24,178,254,254,178,76,255,0,176,35,2,0,5,221,240,240,59,32,255,0,160,35,2,0,42,77,255,255,255,178,255,0,80,35,2,0,29,162,254,254,204,92,255,0,64,35,2,0,
-17,194,253,253,141,60,255,0,48,35,2,0,254,225,227,227,26,28,255,0,32,35,2,0,42,77,255,255,255,178,255,0,184,34,2,0,29,162,254,254,204,92,255,0,168,34,2,0,17,194,253,253,141,60,255,0,152,34,2,0,5,221,240,240,59,32,255,0,136,34,2,0,246,255,189,189,0,38,255,0,120,34,2,0,42,77,255,255,255,178,255,0,104,34,2,0,30,136,254,254,217,118,255,0,72,34,2,0,24,178,254,254,178,76,255,0,48,34,2,0,17,194,253,253,141,60,255,0,248,33,2,0,5,221,240,240,59,32,255,0,232,33,2,0,246,255,189,189,0,38,255,0,136,33,2,0,42,
-77,255,255,255,178,255,0,120,33,2,0,30,136,254,254,217,118,255,0,88,33,2,0,24,178,254,254,178,76,255,0,72,33,2,0,17,194,253,253,141,60,255,0,48,33,2,0,7,212,252,252,78,42,255,0,32,33,2,0,254,225,227,227,26,28,255,0,224,32,2,0,245,255,177,177,0,38,255,0,208,32,2,0,42,50,255,255,255,204,255,0,192,32,2,0,34,95,255,255,237,160,255,0,176,32,2,0,30,136,254,254,217,118,255,0,40,32,2,0,24,178,254,254,178,76,255,0,24,32,2,0,17,194,253,253,141,60,255,0,0,32,2,0,7,212,252,252,78,42,255,0,176,31,2,0,254,225,
-227,227,26,28,255,0,152,31,2,0,245,255,177,177,0,38,255,0,128,31,2,0,42,50,255,255,255,204,255,0,80,31,2,0,34,95,255,255,237,160,255,0,24,31,2,0,30,136,254,254,217,118,255,0,160,30,2,0,24,178,254,254,178,76,255,0,128,30,2,0,17,194,253,253,141,60,255,0,16,30,2,0,7,212,252,252,78,42,255,0,0,30,2,0,254,225,227,227,26,28,255,0,232,29,2,0,246,255,189,189,0,38,255,0,216,29,2,0,242,255,128,128,0,38,255,0,200,29,2,0,147,15,255,240,248,255,255,0,184,29,2,0,24,35,250,250,235,215,255,0,136,29,2,0,23,36,255,
-255,239,219,255,0,120,29,2,0,23,36,238,238,223,204,255,0,104,29,2,0,23,36,205,205,192,176,255,0,88,29,2,0,24,34,139,139,131,120,255,0,40,29,2,0,113,128,255,127,255,212,255,0,240,28,2,0,113,128,255,127,255,212,255,0,208,28,2,0,113,128,238,118,238,198,255,0,192,28,2,0,113,128,205,102,205,170,255,0,176,28,2,0,113,128,139,69,139,116,255,0,168,28,2,0,127,15,255,240,255,255,255,0,136,28,2,0,127,15,255,240,255,255,255,0,128,28,2,0,127,15,238,224,238,238,255,0,120,28,2,0,127,14,205,193,205,205,255,0,112,
-28,2,0,127,14,139,131,139,139,255,0,72,28,2,0,42,26,245,245,245,220,255,0,16,28,2,0,23,58,255,255,228,196,255,0,8,28,2,0,23,58,255,255,228,196,255,0,0,28,2,0,23,58,238,238,213,183,255,0,248,27,2,0,22,58,205,205,183,158,255,0,240,27,2,0,23,58,139,139,125,107,255,0,216,27,2,0,0,0,0,0,0,0,255,0,200,27,2,0,25,49,255,255,235,205,255,0,192,27,2,0,170,255,255,0,0,255,255,0,184,27,2,0,170,255,255,0,0,255,255,0,160,27,2,0,170,255,238,0,0,238,255,0,112,27,2,0,170,255,205,0,0,205,255,0,104,27,2,0,170,255,139,
-0,0,139,255,0,80,27,2,0,192,206,226,138,43,226,255,0,72,27,2,0,0,190,165,165,42,42,255,0,64,27,2,0,0,191,255,255,64,64,255,0,40,27,2,0,0,191,238,238,59,59,255,0,32,27,2,0,0,191,205,205,51,51,255,0,24,27,2,0,0,190,139,139,35,35,255,0,8,27,2,0,23,99,222,222,184,135,255,0,224,26,2,0,23,100,255,255,211,155,255,0,200,26,2,0,23,99,238,238,197,145,255,0,184,26,2,0,23,99,205,205,170,125,255,0,168,26,2,0,23,99,139,139,115,85,255,0,152,26,2,0,128,103,160,95,158,160,255,0,136,26,2,0,131,103,255,152,245,255,
-255,0,104,26,2,0,131,102,238,142,229,238,255,0,80,26,2,0,131,103,205,122,197,205,255,0,64,26,2,0,131,102,139,83,134,139,255,0,48,26,2,0,63,255,255,127,255,0,255,0,8,26,2,0,63,255,255,127,255,0,255,0,232,25,2,0,63,255,238,118,238,0,255,0,200,25,2,0,63,255,205,102,205,0,255,0,184,25,2,0,63,255,139,69,139,0,255,0,168,25,2,0,17,218,210,210,105,30,255,0,152,25,2,0,17,219,255,255,127,36,255,0,112,25,2,0,17,219,238,238,118,33,255,0,96,25,2,0,17,218,205,205,102,29,255,0,64,25,2,0,17,220,139,139,69,19,255,
-0,56,25,2,0,11,175,255,255,127,80,255,0,24,25,2,0,7,169,255,255,114,86,255,0,248,24,2,0,6,169,238,238,106,80,255,0,240,24,2,0,6,169,205,205,91,69,255,0,232,24,2,0,6,168,139,139,62,47,255,0,216,24,2,0,154,147,237,100,149,237,255,0,200,24,2,0,33,34,255,255,248,220,255,0,144,24,2,0,33,34,255,255,248,220,255,0,128,24,2,0,34,35,238,238,232,205,255,0,112,24,2,0,34,34,205,205,200,177,255,0,80,24,2,0,35,34,139,139,136,120,255,0,48,24,2,0,246,231,220,220,20,60,255,0,16,24,2,0,127,255,255,0,255,255,255,0,8,
-24,2,0,127,255,255,0,255,255,255,0,0,24,2,0,127,255,238,0,238,238,255,0,248,23,2,0,127,255,205,0,205,205,255,0,240,23,2,0,127,255,139,0,139,139,255,0,208,23,2,0,30,239,184,184,134,11,255,0,184,23,2,0,30,240,255,255,185,15,255,0,112,23,2,0,30,240,238,238,173,14,255,0,96,23,2,0,30,240,205,205,149,12,255,0,56,23,2,0,30,240,139,139,101,8,255,0,32,23,2,0,85,255,100,0,100,0,255,0,0,23,2,0,39,110,189,189,183,107,255,0,240,22,2,0,58,142,107,85,107,47,255,0,216,22,2,0,58,143,255,202,255,112,255,0,200,22,2,
-0,58,143,238,188,238,104,255,0,152,22,2,0,58,143,205,162,205,90,255,0,136,22,2,0,58,143,139,110,139,61,255,0,120,22,2,0,23,255,255,255,140,0,255,0,104,22,2,0,21,255,255,255,127,0,255,0,40,22,2,0,21,255,238,238,118,0,255,0,16,22,2,0,21,255,205,205,102,0,255,0,216,21,2,0,21,255,139,139,69,0,255,0,192,21,2,0,198,192,204,153,50,204,255,0,168,21,2,0,198,193,255,191,62,255,255,0,144,21,2,0,198,192,238,178,58,238,255,0,96,21,2,0,198,192,205,154,50,205,255,0,32,21,2,0,198,192,139,104,34,139,255,0,128,20,
-2,0,10,121,233,233,150,122,255,0,112,20,2,0,85,61,188,143,188,143,255,0,32,20,2,0,85,62,255,193,255,193,255,0,248,19,2,0,85,62,238,180,238,180,255,0,224,19,2,0,85,62,205,155,205,155,255,0,208,19,2,0,85,62,139,105,139,105,255,0,192,19,2,0,175,143,139,72,61,139,255,0,176,19,2,0,127,103,79,47,79,79,255,0,144,19,2,0,127,104,255,151,255,255,255,0,112,19,2,0,127,103,238,141,238,238,255,0,96,19,2,0,127,104,205,121,205,205,255,0,80,19,2,0,127,104,139,82,139,139,255,0,32,19,2,0,127,103,79,47,79,79,255,0,248,
-18,2,0,128,255,209,0,206,209,255,0,208,18,2,0,199,255,211,148,0,211,255,0,192,18,2,0,232,235,255,255,20,147,255,0,176,18,2,0,232,235,255,255,20,147,255,0,160,18,2,0,232,235,238,238,18,137,255,0,120,18,2,0,232,235,205,205,16,118,255,0,104,18,2,0,231,236,139,139,10,80,255,0,88,18,2,0,138,255,255,0,191,255,255,0,64,18,2,0,138,255,255,0,191,255,255,0,16,18,2,0,138,255,238,0,178,238,255,0,232,17,2,0,138,255,205,0,154,205,255,0,216,17,2,0,138,255,139,0,104,139,255,0,192,17,2,0,0,0,105,105,105,105,255,0,
-184,17,2,0,0,0,105,105,105,105,255,0,168,17,2,0,148,225,255,30,144,255,255,0,136,17,2,0,148,225,255,30,144,255,255,0,120,17,2,0,148,225,238,28,134,238,255,0,104,17,2,0,148,225,205,24,116,205,255,0,88,17,2,0,148,225,139,16,78,139,255,0,240,16,2,0,0,206,178,178,34,34,255,0,192,16,2,0,0,207,255,255,48,48,255,0,176,16,2,0,0,207,238,238,44,44,255,0,160,16,2,0,0,207,205,205,38,38,255,0,72,16,2,0,0,207,139,139,26,26,255,0,56,16,2,0,28,15,255,255,250,240,255,0,24,16,2,0,85,192,139,34,139,34,255,0,8,16,2,
-0,0,0,220,220,220,220,255,0,248,15,2,0,170,7,255,248,248,255,255,0,240,15,2,0,35,255,255,255,215,0,255,0,120,15,2,0,35,255,255,255,215,0,255,0,88,15,2,0,35,255,238,238,201,0,255,0,80,15,2,0,35,255,205,205,173,0,255,0,72,15,2,0,35,255,139,139,117,0,255,0,56,15,2,0,30,217,218,218,165,32,255,0,40,15,2,0,30,218,255,255,193,37,255,0,8,15,2,0,30,218,238,238,180,34,255,0,248,14,2,0,30,218,205,205,155,29,255,0,232,14,2,0,30,218,139,139,105,20,255,0,168,14,2,0,0,0,192,192,192,192,255,0,104,14,2,0,0,0,0,0,
-0,0,255,0,88,14,2,0,0,0,3,3,3,3,255,0,80,14,2,0,0,0,26,26,26,26,255,0,64,14,2,0,0,0,255,255,255,255,255,0,56,14,2,0,0,0,28,28,28,28,255,0,48,14,2,0,0,0,31,31,31,31,255,0,16,14,2,0,0,0,33,33,33,33,255,0,8,14,2,0,0,0,36,36,36,36,255,0,0,14,2,0,0,0,38,38,38,38,255,0,248,13,2,0,0,0,41,41,41,41,255,0,176,13,2,0,0,0,43,43,43,43,255,0,144,13,2,0,0,0,46,46,46,46,255,0,136,13,2,0,0,0,48,48,48,48,255,0,128,13,2,0,0,0,5,5,5,5,255,0,120,13,2,0,0,0,51,51,51,51,255,0,112,13,2,0,0,0,54,54,54,54,255,0,16,13,2,0,
-0,0,56,56,56,56,255,0,8,13,2,0,0,0,59,59,59,59,255,0,0,13,2,0,0,0,61,61,61,61,255,0,248,12,2,0,0,0,64,64,64,64,255,0,224,12,2,0,0,0,66,66,66,66,255,0,192,12,2,0,0,0,69,69,69,69,255,0,184,12,2,0,0,0,71,71,71,71,255,0,176,12,2,0,0,0,74,74,74,74,255,0,168,12,2,0,0,0,8,8,8,8,255,0,160,12,2,0,0,0,77,77,77,77,255,0,136,12,2,0,0,0,79,79,79,79,255,0,128,12,2,0,0,0,82,82,82,82,255,0,48,12,2,0,0,0,84,84,84,84,255,0,40,12,2,0,0,0,87,87,87,87,255,0,232,11,2,0,0,0,89,89,89,89,255,0,200,11,2,0,0,0,92,92,92,92,
-255,0,168,11,2,0,0,0,94,94,94,94,255,0,160,11,2,0,0,0,97,97,97,97,255,0,136,11,2,0,0,0,99,99,99,99,255,0,128,11,2,0,0,0,10,10,10,10,255,0,40,11,2,0,0,0,102,102,102,102,255,0,32,11,2,0,0,0,105,105,105,105,255,0,24,11,2,0,0,0,107,107,107,107,255,0,16,11,2,0,0,0,110,110,110,110,255,0,200,10,2,0,0,0,112,112,112,112,255,0,168,10,2,0,0,0,115,115,115,115,255,0,152,10,2,0,0,0,117,117,117,117,255,0,112,10,2,0,0,0,120,120,120,120,255,0,96,10,2,0,0,0,122,122,122,122,255,0,80,10,2,0,0,0,125,125,125,125,255,0,
-56,10,2,0,0,0,13,13,13,13,255,0,32,10,2,0,0,0,127,127,127,127,255,0,208,9,2,0,0,0,130,130,130,130,255,0,200,9,2,0,0,0,133,133,133,133,255,0,144,9,2,0,0,0,135,135,135,135,255,0,112,9,2,0,0,0,138,138,138,138,255,0,96,9,2,0,0,0,140,140,140,140,255,0,88,9,2,0,0,0,143,143,143,143,255,0,80,9,2,0,0,0,145,145,145,145,255,0,72,9,2,0,0,0,148,148,148,148,255,0,48,9,2,0,0,0,150,150,150,150,255,0,40,9,2,0,0,0,15,15,15,15,255,0,16,9,2,0,0,0,153,153,153,153,255,0,8,9,2,0,0,0,156,156,156,156,255,0,232,8,2,0,0,0,
-158,158,158,158,255,0,200,8,2,0,0,0,161,161,161,161,255,0,168,8,2,0,0,0,163,163,163,163,255,0,160,8,2,0,0,0,166,166,166,166,255,0,152,8,2,0,0,0,168,168,168,168,255,0,144,8,2,0,0,0,171,171,171,171,255,0,112,8,2,0,0,0,173,173,173,173,255,0,104,8,2,0,0,0,176,176,176,176,255,0,96,8,2,0,0,0,18,18,18,18,255,0,88,8,2,0,0,0,179,179,179,179,255,0,56,8,2,0,0,0,181,181,181,181,255,0,24,8,2,0,0,0,184,184,184,184,255,0,16,8,2,0,0,0,186,186,186,186,255,0,8,8,2,0,0,0,189,189,189,189,255,0,0,8,2,0,0,0,191,191,191,
-191,255,0,248,7,2,0,0,0,194,194,194,194,255,0,224,7,2,0,0,0,196,196,196,196,255,0,216,7,2,0,0,0,199,199,199,199,255,0,208,7,2,0,0,0,201,201,201,201,255,0,200,7,2,0,0,0,20,20,20,20,255,0,168,7,2,0,0,0,204,204,204,204,255,0,120,7,2,0,0,0,207,207,207,207,255,0,112,7,2,0,0,0,209,209,209,209,255,0,104,7,2,0,0,0,212,212,212,212,255,0,96,7,2,0,0,0,214,214,214,214,255,0,64,7,2,0,0,0,217,217,217,217,255,0,40,7,2,0,0,0,219,219,219,219,255,0,32,7,2,0,0,0,222,222,222,222,255,0,24,7,2,0,0,0,224,224,224,224,255,
-0,16,7,2,0,0,0,227,227,227,227,255,0,240,6,2,0,0,0,23,23,23,23,255,0,216,6,2,0,0,0,229,229,229,229,255,0,208,6,2,0,0,0,232,232,232,232,255,0,200,6,2,0,0,0,235,235,235,235,255,0,192,6,2,0,0,0,237,237,237,237,255,0,184,6,2,0,0,0,240,240,240,240,255,0,160,6,2,0,0,0,242,242,242,242,255,0,152,6,2,0,0,0,245,245,245,245,255,0,144,6,2,0,0,0,247,247,247,247,255,0,136,6,2,0,0,0,250,250,250,250,255,0,112,6,2,0,0,0,252,252,252,252,255,0,96,6,2,0,85,255,255,0,255,0,255,0,88,6,2,0,85,255,255,0,255,0,255,0,80,6,
-2,0,85,255,238,0,238,0,255,0,64,6,2,0,85,255,205,0,205,0,255,0,56,6,2,0,85,255,139,0,139,0,255,0,8,6,2,0,59,208,255,173,255,47,255,0,0,6,2,0,0,0,192,192,192,192,255,0,248,5,2,0,0,0,0,0,0,0,255,0,240,5,2,0,0,0,3,3,3,3,255,0,208,5,2,0,0,0,26,26,26,26,255,0,200,5,2,0,0,0,255,255,255,255,255,0,192,5,2,0,0,0,28,28,28,28,255,0,184,5,2,0,0,0,31,31,31,31,255,0,176,5,2,0,0,0,33,33,33,33,255,0,168,5,2,0,0,0,36,36,36,36,255,0,136,5,2,0,0,0,38,38,38,38,255,0,128,5,2,0,0,0,41,41,41,41,255,0,104,5,2,0,0,0,43,43,
-43,43,255,0,80,5,2,0,0,0,46,46,46,46,255,0,48,5,2,0,0,0,48,48,48,48,255,0,16,5,2,0,0,0,5,5,5,5,255,0,8,5,2,0,0,0,51,51,51,51,255,0,0,5,2,0,0,0,54,54,54,54,255,0,248,4,2,0,0,0,56,56,56,56,255,0,240,4,2,0,0,0,59,59,59,59,255,0,216,4,2,0,0,0,61,61,61,61,255,0,208,4,2,0,0,0,64,64,64,64,255,0,136,4,2,0,0,0,66,66,66,66,255,0,128,4,2,0,0,0,69,69,69,69,255,0,64,4,2,0,0,0,71,71,71,71,255,0,32,4,2,0,0,0,74,74,74,74,255,0,232,3,2,0,0,0,8,8,8,8,255,0,224,3,2,0,0,0,77,77,77,77,255,0,200,3,2,0,0,0,79,79,79,79,
-255,0,192,3,2,0,0,0,82,82,82,82,255,0,104,3,2,0,0,0,84,84,84,84,255,0,96,3,2,0,0,0,87,87,87,87,255,0,88,3,2,0,0,0,89,89,89,89,255,0,80,3,2,0,0,0,92,92,92,92,255,0,240,2,2,0,0,0,94,94,94,94,255,0,168,2,2,0,0,0,97,97,97,97,255,0,152,2,2,0,0,0,99,99,99,99,255,0,72,2,2,0,0,0,10,10,10,10,255,0,56,2,2,0,0,0,102,102,102,102,255,0,32,2,2,0,0,0,105,105,105,105,255,0,248,1,2,0,0,0,107,107,107,107,255,0,216,1,2,0,0,0,110,110,110,110,255,0,144,1,2,0,0,0,112,112,112,112,255,0,128,1,2,0,0,0,115,115,115,115,255,
-0,56,1,2,0,0,0,117,117,117,117,255,0,48,1,2,0,0,0,120,120,120,120,255,0,24,1,2,0,0,0,122,122,122,122,255,0,0,1,2,0,0,0,125,125,125,125,255,0,248,0,2,0,0,0,13,13,13,13,255,0,240,0,2,0,0,0,127,127,127,127,255,0,216,0,2,0,0,0,130,130,130,130,255,0,176,0,2,0,0,0,133,133,133,133,255,0,168,0,2,0,0,0,135,135,135,135,255,0,64,0,2,0,0,0,138,138,138,138,255,0,32,0,2,0,0,0,140,140,140,140,255,0,24,0,2,0,0,0,143,143,143,143,255,0,8,0,2,0,0,0,145,145,145,145,255,0,0,0,2,0,0,0,148,148,148,148,255,0,248,255,1,0,
-0,0,150,150,150,150,255,0,240,255,1,0,0,0,15,15,15,15,255,0,208,255,1,0,0,0,153,153,153,153,255,0,200,255,1,0,0,0,156,156,156,156,255,0,192,255,1,0,0,0,158,158,158,158,255,0,184,255,1,0,0,0,161,161,161,161,255,0,160,255,1,0,0,0,163,163,163,163,255,0,152,255,1,0,0,0,166,166,166,166,255,0,144,255,1,0,0,0,168,168,168,168,255,0,104,255,1,0,0,0,171,171,171,171,255,0,96,255,1,0,0,0,173,173,173,173,255,0,88,255,1,0,0,0,176,176,176,176,255,0,64,255,1,0,0,0,18,18,18,18,255,0,56,255,1,0,0,0,179,179,179,179,
-255,0,48,255,1,0,0,0,181,181,181,181,255,0,40,255,1,0,0,0,184,184,184,184,255,0,8,255,1,0,0,0,186,186,186,186,255,0,240,254,1,0,0,0,189,189,189,189,255,0,232,254,1,0,0,0,191,191,191,191,255,0,224,254,1,0,0,0,194,194,194,194,255,0,216,254,1,0,0,0,196,196,196,196,255,0,208,254,1,0,0,0,199,199,199,199,255,0,176,254,1,0,0,0,201,201,201,201,255,0,168,254,1,0,0,0,20,20,20,20,255,0,160,254,1,0,0,0,204,204,204,204,255,0,152,254,1,0,0,0,207,207,207,207,255,0,128,254,1,0,0,0,209,209,209,209,255,0,120,254,1,
-0,0,0,212,212,212,212,255,0,112,254,1,0,0,0,214,214,214,214,255,0,104,254,1,0,0,0,217,217,217,217,255,0,80,254,1,0,0,0,219,219,219,219,255,0,64,254,1,0,0,0,222,222,222,222,255,0,56,254,1,0,0,0,224,224,224,224,255,0,48,254,1,0,0,0,227,227,227,227,255,0,24,254,1,0,0,0,23,23,23,23,255,0,224,253,1,0,0,0,229,229,229,229,255,0,200,253,1,0,0,0,232,232,232,232,255,0,192,253,1,0,0,0,235,235,235,235,255,0,184,253,1,0,0,0,237,237,237,237,255,0,176,253,1,0,0,0,240,240,240,240,255,0,168,253,1,0,0,0,242,242,242,
-242,255,0,152,253,1,0,0,0,245,245,245,245,255,0,128,253,1,0,0,0,247,247,247,247,255,0,112,253,1,0,0,0,250,250,250,250,255,0,104,253,1,0,0,0,252,252,252,252,255,0,16,253,1,0,85,15,255,240,255,240,255,0,240,252,1,0,85,15,255,240,255,240,255,0,224,252,1,0,85,15,238,224,238,224,255,0,208,252,1,0,85,14,205,193,205,193,255,0,192,252,1,0,85,14,139,131,139,131,255,0,184,252,1,0,233,150,255,255,105,180,255,0,168,252,1,0,234,145,255,255,110,180,255,0,88,252,1,0,235,141,238,238,106,167,255,0,72,252,1,0,236,
-135,205,205,96,144,255,0,56,252,1,0,234,148,139,139,58,98,255,0,40,252,1,0,0,140,205,205,92,92,255,0,8,252,1,0,0,148,255,255,106,106,255,0,248,251,1,0,0,148,238,238,99,99,255,0,232,251,1,0,0,149,205,205,85,85,255,0,216,251,1,0,0,148,139,139,58,58,255,0,208,251,1,0,194,255,130,75,0,130,255,0,200,251,1,0,42,0,255,255,255,254,0,0,176,251,1,0,42,15,255,255,255,240,255,0,168,251,1,0,42,15,255,255,255,240,255,0,128,251,1,0,42,15,238,238,238,224,255,0,120,251,1,0,42,14,205,205,205,193,255,0,96,251,1,0,42,
-14,139,139,139,131,255,0,88,251,1,0,38,106,240,240,230,140,255,0,48,251,1,0,39,112,255,255,246,143,255,0,24,251,1,0,39,112,238,238,230,133,255,0,0,251,1,0,39,111,205,205,198,115,255,0,248,250,1,0,39,111,139,139,134,78,255,0,144,250,1,0,170,20,250,230,230,250,255,0,128,250,1,0,240,15,255,255,240,245,255,0,112,250,1,0,240,15,255,255,240,245,255,0,96,250,1,0,239,15,238,238,224,229,255,0,48,250,1,0,240,14,205,205,193,197,255,0,32,250,1,0,239,14,139,139,131,134,255,0,216,249,1,0,64,255,252,124,252,0,255,
-0,192,249,1,0,38,49,255,255,250,205,255,0,128,249,1,0,38,49,255,255,250,205,255,0,104,249,1,0,37,50,238,238,233,191,255,0,8,249,1,0,38,49,205,205,201,165,255,0,224,248,1,0,39,49,139,139,137,112,255,0,144,248,1,0,137,63,230,173,216,230,255,0,128,248,1,0,138,64,255,191,239,255,255,0,192,247,1,0,138,64,238,178,223,238,255,0,176,247,1,0,138,63,205,154,192,205,255,0,152,247,1,0,137,64,139,104,131,139,255,0,136,247,1,0,0,119,240,240,128,128,255,0,120,247,1,0,127,31,255,224,255,255,255,0,104,247,1,0,127,
-31,255,224,255,255,255,0,72,247,1,0,127,31,238,209,238,238,255,0,56,247,1,0,127,31,205,180,205,205,255,0,40,247,1,0,127,31,139,122,139,139,255,0,240,246,1,0,35,115,238,238,221,130,255,0,184,246,1,0,35,116,255,255,236,139,255,0,168,246,1,0,35,115,238,238,220,130,255,0,120,246,1,0,35,115,205,205,190,112,255,0,104,246,1,0,35,115,139,139,129,76,255,0,80,246,1,0,42,40,250,250,250,210,255,0,64,246,1,0,0,0,211,211,211,211,255,0,24,246,1,0,0,0,211,211,211,211,255,0,0,246,1,0,248,73,255,255,182,193,255,0,
-240,245,1,0,249,81,255,255,174,185,255,0,224,245,1,0,248,81,238,238,162,173,255,0,176,245,1,0,249,80,205,205,140,149,255,0,120,245,1,0,249,80,139,139,95,101,255,0,96,245,1,0,12,132,255,255,160,122,255,0,80,245,1,0,12,132,255,255,160,122,255,0,48,245,1,0,11,132,238,238,149,114,255,0,32,245,1,0,12,133,205,205,129,98,255,0,0,245,1,0,12,133,139,139,87,66,255,0,240,244,1,0,125,209,178,32,178,170,255,0,224,244,1,0,143,117,250,135,206,250,255,0,208,244,1,0,143,79,255,176,226,255,255,0,176,244,1,0,143,79,
-238,164,211,238,255,0,136,244,1,0,142,79,205,141,182,205,255,0,104,244,1,0,143,78,139,96,123,139,255,0,88,244,1,0,175,143,255,132,112,255,255,0,72,244,1,0,148,56,153,119,136,153,255,0,56,244,1,0,148,56,153,119,136,153,255,0,24,244,1,0,151,52,222,176,196,222,255,0,200,243,1,0,151,53,255,202,225,255,255,0,184,243,1,0,151,53,238,188,210,238,255,0,120,243,1,0,151,53,205,162,181,205,255,0,72,243,1,0,150,53,139,110,123,139,255,0,56,243,1,0,42,31,255,255,255,224,255,0,40,243,1,0,42,31,255,255,255,224,255,
-0,24,243,1,0,42,31,238,238,238,209,255,0,8,243,1,0,42,31,205,205,205,180,255,0,248,242,1,0,42,31,139,139,139,122,255,0,192,242,1,0,85,192,205,50,205,50,255,0,168,242,1,0,21,20,250,250,240,230,255,0,112,242,1,0,212,255,255,255,0,255,255,0,16,242,1,0,212,255,255,255,0,255,255,0,240,241,1,0,212,255,238,238,0,238,255,0,224,241,1,0,212,255,205,205,0,205,255,0,208,241,1,0,212,255,139,139,0,139,255,0,200,241,1,0,239,185,176,176,48,96,255,0,192,241,1,0,228,203,255,255,52,179,255,0,184,241,1,0,228,203,238,
-238,48,167,255,0,136,241,1,0,228,204,205,205,41,144,255,0,128,241,1,0,228,203,139,139,28,98,255,0,104,241,1,0,113,128,205,102,205,170,255,0,56,241,1,0,170,255,205,0,0,205,255,0,24,241,1,0,204,152,211,186,85,211,255,0,8,241,1,0,203,153,255,224,102,255,255,0,248,240,1,0,203,153,238,209,95,238,255,0,232,240,1,0,203,153,205,180,82,205,255,0,208,240,1,0,203,154,139,122,55,139,255,0,184,240,1,0,183,124,219,147,112,219,255,0,120,240,1,0,183,125,255,171,130,255,255,0,104,240,1,0,183,125,238,159,121,238,255,
-0,88,240,1,0,183,125,205,137,104,205,255,0,40,240,1,0,183,124,139,93,71,139,255,0,248,239,1,0,103,169,179,60,179,113,255,0,232,239,1,0,176,143,238,123,104,238,255,0,208,239,1,0,111,255,250,0,250,154,255,0,184,239,1,0,125,167,209,72,209,204,255,0,160,239,1,0,228,228,199,199,21,133,255,0,144,239,1,0,170,198,112,25,25,112,255,0,112,239,1,0,106,9,255,245,255,250,255,0,96,239,1,0,4,30,255,255,228,225,255,0,48,239,1,0,4,30,255,255,228,225,255,0,0,239,1,0,4,30,238,238,213,210,255,0,176,238,1,0,3,29,205,
-205,183,181,255,0,160,238,1,0,5,29,139,139,125,123,255,0,72,238,1,0,26,73,255,255,228,181,255,0,56,238,1,0,25,81,255,255,222,173,255,0,16,238,1,0,25,81,255,255,222,173,255,0,0,238,1,0,25,82,238,238,207,161,255,0,200,237,1,0,25,82,205,205,179,139,255,0,168,237,1,0,25,82,139,139,121,94,255,0,144,237,1,0,170,255,128,0,0,128,255,0,128,237,1,0,170,255,128,0,0,128,255,0,88,237,1,0,42,0,255,255,255,254,0,0,80,237,1,0,27,23,253,253,245,230,255,0,56,237,1,0,56,192,142,107,142,35,255,0,24,237,1,0,56,193,255,
-192,255,62,255,0,248,236,1,0,56,192,238,179,238,58,255,0,200,236,1,0,56,192,205,154,205,50,255,0,136,236,1,0,56,192,139,105,139,34,255,0,96,236,1,0,27,255,255,255,165,0,255,0,0,236,1,0,27,255,255,255,165,0,255,0,232,235,1,0,27,255,238,238,154,0,255,0,64,235,1,0,27,255,205,205,133,0,255,0,56,235,1,0,27,255,139,139,90,0,255,0,32,235,1,0,11,255,255,255,69,0,255,0,16,235,1,0,11,255,255,255,69,0,255,0,248,234,1,0,11,255,238,238,64,0,255,0,232,234,1,0,11,255,205,205,55,0,255,0,200,234,1,0,11,255,139,139,
-37,0,255,0,192,234,1,0,214,123,218,218,112,214,255,0,184,234,1,0,214,124,255,255,131,250,255,0,176,234,1,0,214,124,238,238,122,233,255,0,144,234,1,0,214,124,205,205,105,201,255,0,136,234,1,0,213,124,139,139,71,137,255,0,104,234,1,0,38,72,238,238,232,170,255,0,88,234,1,0,85,100,251,152,251,152,255,0,72,234,1,0,85,101,255,154,255,154,255,0,56,234,1,0,85,100,238,144,238,144,255,0,0,234,1,0,85,100,205,124,205,124,255,0,232,233,1,0,85,100,139,84,139,84,255,0,216,233,1,0,127,67,238,175,238,238,255,0,200,
-233,1,0,127,68,255,187,255,255,255,0,120,233,1,0,127,68,238,174,238,238,255,0,96,233,1,0,127,68,205,150,205,205,255,0,72,233,1,0,127,67,139,102,139,139,255,0,56,233,1,0,241,124,219,219,112,147,255,0,40,233,1,0,241,125,255,255,130,171,255,0,24,233,1,0,241,125,238,238,121,159,255,0,8,233,1,0,241,125,205,205,104,137,255,0,248,232,1,0,241,124,139,139,71,93,255,0,216,232,1,0,26,41,255,255,239,213,255,0,200,232,1,0,20,70,255,255,218,185,255,0,152,232,1,0,20,70,255,255,218,185,255,0,120,232,1,0,19,69,238,
-238,203,173,255,0,104,232,1,0,19,69,205,205,175,149,255,0,88,232,1,0,20,69,139,139,119,101,255,0,80,232,1,0,20,176,205,205,133,63,255,0,72,232,1,0,247,63,255,255,192,203,255,0,48,232,1,0,245,73,255,255,181,197,255,0,40,232,1,0,245,73,238,238,169,184,255,0,24,232,1,0,245,74,205,205,145,158,255,0,16,232,1,0,245,73,139,139,99,108,255,0,240,231,1,0,212,70,221,221,160,221,255,0,232,231,1,0,212,68,255,255,187,255,255,0,224,231,1,0,212,68,238,238,174,238,255,0,216,231,1,0,212,68,205,205,150,205,255,0,208,
-231,1,0,212,67,139,139,102,139,255,0,192,231,1,0,132,59,230,176,224,230,255,0,168,231,1,0,196,221,240,160,32,240,255,0,160,231,1,0,191,207,255,155,48,255,255,0,152,231,1,0,192,207,238,145,44,238,255,0,144,231,1,0,192,207,205,125,38,205,255,0,120,231,1,0,192,207,139,85,26,139,255,0,112,231,1,0,0,255,255,255,0,0,255,0,96,231,1,0,0,255,255,255,0,0,255,0,88,231,1,0,0,255,238,238,0,0,255,0,80,231,1,0,0,255,205,205,0,0,255,0,72,231,1,0,0,255,139,139,0,0,255,0,40,231,1,0,0,61,188,188,143,143,255,0,0,231,
-1,0,0,62,255,255,193,193,255,0,240,230,1,0,0,62,238,238,180,180,255,0,224,230,1,0,0,62,205,205,155,155,255,0,184,230,1,0,0,62,139,139,105,105,255,0,168,230,1,0,159,181,225,65,105,225,255,0,152,230,1,0,159,183,255,72,118,255,255,0,136,230,1,0,159,183,238,67,110,238,255,0,120,230,1,0,159,182,205,58,95,205,255,0,104,230,1,0,159,183,139,39,64,139,255,0,16,230,1,0,17,220,139,139,69,19,255,0,8,230,1,0,4,138,250,250,128,114,255,0,0,230,1,0,9,150,255,255,140,105,255,0,248,229,1,0,9,150,238,238,130,98,255,
-0,216,229,1,0,9,150,205,205,112,84,255,0,208,229,1,0,9,150,139,139,76,57,255,0,192,229,1,0,19,154,244,244,164,96,255,0,176,229,1,0,103,170,139,46,139,87,255,0,160,229,1,0,103,171,255,84,255,159,255,0,144,229,1,0,103,171,238,78,238,148,255,0,112,229,1,0,103,171,205,67,205,128,255,0,96,229,1,0,103,170,139,46,139,87,255,0,64,229,1,0,17,16,255,255,245,238,255,0,16,229,1,0,17,16,255,255,245,238,255,0,200,228,1,0,18,17,238,238,229,222,255,0,184,228,1,0,18,17,205,205,197,191,255,0,144,228,1,0,18,16,139,
-139,134,130,255,0,136,228,1,0,13,183,160,160,82,45,255,0,88,228,1,0,13,184,255,255,130,71,255,0,80,228,1,0,13,184,238,238,121,66,255,0,16,228,1,0,13,184,205,205,104,57,255,0,8,228,1,0,13,185,139,139,71,38,255,0,0,228,1,0,139,108,235,135,206,235,255,0,224,227,1,0,144,120,255,135,206,255,255,0,168,227,1,0,144,120,238,126,192,238,255,0,128,227,1,0,144,120,205,108,166,205,255,0,104,227,1,0,145,119,139,74,112,139,255,0,72,227,1,0,175,143,205,106,90,205,255,0,40,227,1,0,175,144,255,131,111,255,255,0,8,
-227,1,0,175,144,238,122,103,238,255,0,216,226,1,0,175,144,205,105,89,205,255,0,176,226,1,0,175,144,139,71,60,139,255,0,144,226,1,0,148,56,144,112,128,144,255,0,128,226,1,0,149,56,255,198,226,255,255,0,40,226,1,0,149,56,238,185,211,238,255,0,0,226,1,0,148,57,205,159,182,205,255,0,232,225,1,0,149,56,139,108,123,139,255,0,208,225,1,0,148,56,144,112,128,144,255,0,200,225,1,0,0,5,255,255,250,250,255,0,192,225,1,0,0,5,255,255,250,250,255,0,168,225,1,0,0,5,238,238,233,233,255,0,160,225,1,0,0,4,205,205,201,
-201,255,0,152,225,1,0,0,3,139,139,137,137,255,0,136,225,1,0,106,255,255,0,255,127,255,0,56,225,1,0,106,255,255,0,255,127,255,0,40,225,1,0,106,255,238,0,238,118,255,0,8,225,1,0,106,255,205,0,205,102,255,0,248,224,1,0,106,255,139,0,139,69,255,0,232,224,1,0,146,155,180,70,130,180,255,0,216,224,1,0,146,156,255,99,184,255,255,0,184,224,1,0,146,156,238,92,172,238,255,0,160,224,1,0,146,156,205,79,148,205,255,0,144,224,1,0,147,155,139,54,100,139,255,0,136,224,1,0,24,84,210,210,180,140,255,0,64,224,1,0,20,
-176,255,255,165,79,255,0,56,224,1,0,20,176,238,238,154,73,255,0,48,224,1,0,20,176,205,205,133,63,255,0,40,224,1,0,20,176,139,139,90,43,255,0,32,224,1,0,212,29,216,216,191,216,255,0,16,224,1,0,212,30,255,255,225,255,255,0,240,223,1,0,212,30,238,238,210,238,255,0,224,223,1,0,212,29,205,205,181,205,255,0,208,223,1,0,212,29,139,139,123,139,255,0,200,223,1,0,6,184,255,255,99,71,255,0,168,223,1,0,6,184,255,255,99,71,255,0,152,223,1,0,6,184,238,238,92,66,255,0,144,223,1,0,6,184,205,205,79,57,255,0,136,223,
-1,0,6,185,139,139,54,38,255,0,120,223,1,0,42,0,255,255,255,254,0,0,104,223,1,0,123,182,224,64,224,208,255,0,72,223,1,0,129,255,255,0,245,255,255,0,56,223,1,0,129,255,238,0,229,238,255,0,40,223,1,0,129,255,205,0,197,205,255,0,0,223,1,0,129,255,139,0,134,139,255,0,216,222,1,0,212,115,238,238,130,238,255,0,200,222,1,0,227,215,208,208,32,144,255,0,176,222,1,0,235,193,255,255,62,150,255,0,160,222,1,0,235,192,238,238,58,140,255,0,144,222,1,0,235,192,205,205,50,120,255,0,128,222,1,0,235,192,139,139,34,82,
-255,0,120,222,1,0,27,68,245,245,222,179,255,0,112,222,1,0,27,69,255,255,231,186,255,0,88,222,1,0,27,68,238,238,216,174,255,0,80,222,1,0,27,68,205,205,186,150,255,0,40,222,1,0,27,67,139,139,126,102,255,0,32,222,1,0,0,0,255,255,255,255,255,0,16,222,1,0,0,0,245,245,245,245,255,0,8,222,1,0,42,255,255,255,255,0,255,0,0,222,1,0,42,255,255,255,255,0,255,0,248,221,1,0,42,255,238,238,238,0,255,0,224,221,1,0,42,255,205,205,205,0,255,0,208,221,1,0,42,255,139,139,139,0,255,0,176,221,1,0,56,192,205,154,205,50,
-255,0,0,0,0,0,81,160,79,228,73,210,14,64,180,200,118,190,159,58,53,192,58,34,223,165,212,37,213,191,243,130,62,71,154,46,138,63,159,229,121,112,119,214,249,191,126,253,16,27,44,156,230,63,150,236,216,8,196,235,204,63,205,206,162,119,42,224,208,63,176,227,191,64,16,32,237,191,173,161,212,94,68,219,216,63,59,161,124,230,81,150,118,63,211,110,112,249,122,132,123,63,129,204,206,162,119,42,228,191,209,173,215,244,160,160,200,63,106,223,55,25,176,63,132,63,190,202,144,25,94,255,132,63,28,150,6,126,84,195,
-196,191,165,73,41,232,246,226,35,64,169,217,3,173,192,144,193,63,8,196,144,65,147,105,137,63,250,68,158,36,93,51,208,191,1,240,153,54,45,194,94,63,13,156,125,47,207,148,151,63,137,181,248,20,0,227,137,63,229,169,88,70,52,203,177,191,143,0,201,207,161,103,166,191,92,181,198,251,204,180,136,63,77,164,143,84,58,179,144,63,230,199,4,161,97,214,160,191,199,105,103,28,19,247,130,191,42,127,107,229,45,112,92,191,228,87,98,84,8,154,117,63,209,241,135,85,114,4,183,63,149,212,9,104,34,60,51,192,100,35,16,175,
-235,119,16,192,167,33,170,240,103,120,199,63,218,255,0,107,213,174,193,63,78,40,68,192,33,84,247,191,170,72,133,177,133,32,245,63,157,104,87,33,229,39,246,63,77,46,198,192,58,142,205,63,89,107,40,181,23,209,220,191,3,63,170,97,191,39,204,63,166,71,83,61,153,127,218,63,182,129,59,80,167,60,174,63,81,76,222,0,51,223,185,191,245,118,149,255,218,11,166,63,212,165,53,188,15,246,148,63,31,173,32,188,44,220,144,63,40,44,241,128,178,201,35,64,35,90,225,76,2,138,183,63,72,163,101,81,150,41,127,63,187,180,
-134,247,193,158,147,63,23,168,123,83,71,125,160,191,33,43,174,224,109,148,139,63,51,115,220,132,214,30,181,191,160,120,132,137,245,252,143,63,105,53,36,238,177,244,145,191,184,205,51,122,94,191,106,63,146,62,173,162,63,52,205,191,126,176,231,198,79,62,152,191,7,35,155,80,45,199,164,63,62,24,194,123,88,185,145,191,45,124,125,173,75,141,198,63,46,0,0,0,154,0,0,0,72,210,1,0,110,0,0,0,128,168,1,0,40,0,0,0,144,164,1,0,144,0,0,0,232,161,1,0,76,0,0,0,56,160,1,0,196,0,0,0,128,158,1,0,10,0,0,0,96,188,1,0,
-102,0,0,0,160,156,1,0,134,0,0,0,248,154,1,0,130,0,0,0,88,153,1,0,190,0,0,0,104,151,1,0,78,0,0,0,8,149,1,0,36,0,0,0,128,146,1,0,116,0,0,0,208,142,1,0,54,0,0,0,232,139,1,0,164,0,0,0,80,138,1,0,32,0,0,0,136,136,1,0,38,0,0,0,120,134,1,0,58,0,0,0,208,132,1,0,58,0,0,0,80,131,1,0,128,0,0,0,152,129,1,0,136,0,0,0,8,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,90,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,65,0,32,26,192,0,32,31,0,1,1,47,50,1,1,5,57,1,1,15,74,1,1,45,121,1,1,5,112,3,1,3,145,3,32,17,163,3,32,9,0,4,80,16,
-16,4,32,32,96,4,1,33,138,4,1,53,193,4,1,13,208,4,1,63,20,5,1,19,49,5,48,38,160,1,1,5,179,1,1,3,205,1,1,15,222,1,1,17,248,1,1,39,34,2,1,17,216,3,1,23,0,30,1,149,160,30,1,95,8,31,248,8,24,31,248,6,40,31,248,8,56,31,248,8,72,31,248,6,104,31,248,8,136,31,248,8,152,31,248,8,168,31,248,8,184,31,248,2,186,31,182,2,200,31,170,4,216,31,248,2,218,31,156,2,232,31,248,2,234,31,144,2,248,31,128,2,250,31,130,2,70,2,1,9,16,5,1,3,96,33,16,16,0,44,48,47,103,44,1,5,128,44,1,99,235,44,1,3,64,166,1,45,128,166,1,23,34,
-167,1,13,50,167,1,61,121,167,1,3,126,167,1,9,144,167,1,3,160,167,1,9,33,255,32,26,0,0,0,0,72,210,1,0,68,0,0,0,16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15,0,0,0,0,0,116,0,0,0,18,0,0,0,34,0,0,0,66,0,0,0,104,0,0,0,52,0,0,0,94,0,0,0,62,0,0,0,94,0,0,0,10,0,0,0,154,0,0,0,50,0,0,0,48,0,0,0,20,0,0,0,2,0,0,0,36,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,10,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,16,12,19,28,30,3,13,31,32,33,34,35,27,26,17,25,25,25,25,25,25,25,25,25,25,22,18,2,14,11,15,28,24,24,24,
-24,24,24,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,20,28,4,28,22,28,24,24,24,24,24,24,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,28,36,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,22,28,28,28,28,28,28,28,28,28,28,22,28,26,28,28,22,28,28,28,28,28,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,28,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,
-22,22,22,22,22,22,22,22,22,22,22,28,22,22,22,22,22,22,22,22],"i8",L,l.J+61457);D([1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,5,0,0,0,6,0,0,0,7,0,0,0,8,0,0,0,10,0,0,0,12,0,0,0,14,0,0,0,16,0,0,0,20,0,0,0,24,0,0,0,28,0,0,0,32,0,0,0,40,0,0,0,48,0,0,0,56,0,0,0,64,0,0,0,80,0,0,0,96,0,0,0,112,0,0,0,128,0,0,0,160,0,0,0,192,0,0,0,224,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,4,0,0,0,6,0,0,0,8,0,0,0,12,0,0,0,16,0,0,0,24,0,0,0,32,0,0,0,48,0,0,0,64,0,0,0,96,0,0,0,128,0,0,0,192,0,0,0,0,1,0,0,128,1,0,0,0,2,0,
-0,0,3,0,0,0,4,0,0,0,6,0,0,0,8,0,0,0,12,0,0,0,16,0,0,0,24,0,0,0,32,0,0,0,48,0,0,0,64,0,0,0,96,0,0,16,164,2,0,208,163,2,0,200,163,2,0,192,163,2,0,224,163,2,0,232,163,2,0,152,163,2,0,136,163,2,0,38,0,0,0,96,0,0,0,36,0,0,0,100,0,0,0,70,0,0,0,26,0,0,0,4,0,0,0,156,0,0,0,42,0,0,0,106,0,0,0,112,0,0,0,54,0,0,0,28,0,0,0,74,0,0,0,12,0,0,0,24,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,21,10,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,21,16,12,19,28,30,3,13,31,32,33,34,35,27,26,17,25,25,25,25,25,25,25,25,25,25,22,
-18,2,14,11,15,28,24,24,24,24,24,24,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,20,28,4,28,22,28,24,24,24,24,24,24,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,28,36,28,28,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,
-63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,
-227,20,29,201,209,63,244,108,86,125,174,182,214,63,181,21,251,203,238,201,225,63,181,21,251,203,238,201,225,63,196,66,173,105,222,113,236,63,16,122,54,171,62,87,229,63,245,219,215,129,115,70,204,63,88,168,53,205,59,78,213,63,88,168,53,205,59,78,213,63,136,133,90,211,188,227,216,63,1,77,132,13,79,175,226,63,211,188,227,20,29,201,209,63,88,168,53,205,59,78,213,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,181,21,251,203,238,201,225,63,181,21,251,203,238,201,225,63,181,21,251,203,238,
-201,225,63,181,21,251,203,238,201,225,63,181,21,251,203,238,201,225,63,181,21,251,203,238,201,225,63,181,21,251,203,238,201,225,63,181,21,251,203,238,201,225,63,181,21,251,203,238,201,225,63,181,21,251,203,238,201,225,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,1,77,132,13,79,175,226,63,1,77,132,13,79,175,226,63,1,77,132,13,79,175,226,63,181,21,251,203,238,201,225,63,204,93,75,200,7,61,240,63,16,122,54,171,62,87,229,63,16,122,54,171,62,87,229,63,210,111,95,7,206,25,231,63,210,111,
-95,7,206,25,231,63,16,122,54,171,62,87,229,63,120,11,36,40,126,140,227,63,106,222,113,138,142,228,232,63,210,111,95,7,206,25,231,63,211,188,227,20,29,201,209,63,0,0,0,0,0,0,224,63,16,122,54,171,62,87,229,63,181,21,251,203,238,201,225,63,44,212,154,230,29,167,234,63,210,111,95,7,206,25,231,63,106,222,113,138,142,228,232,63,16,122,54,171,62,87,229,63,106,222,113,138,142,228,232,63,210,111,95,7,206,25,231,63,16,122,54,171,62,87,229,63,120,11,36,40,126,140,227,63,210,111,95,7,206,25,231,63,16,122,54,
-171,62,87,229,63,134,56,214,197,109,52,238,63,16,122,54,171,62,87,229,63,16,122,54,171,62,87,229,63,120,11,36,40,126,140,227,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,166,10,70,37,117,2,222,63,181,21,251,203,238,201,225,63,72,191,125,29,56,103,204,63,181,21,251,203,238,201,225,63,181,21,251,203,238,201,225,63,0,0,0,0,0,0,224,63,181,21,251,203,238,201,225,63,181,21,251,203,238,201,225,63,211,188,227,20,29,201,209,63,181,21,251,203,238,201,225,63,181,
-21,251,203,238,201,225,63,72,191,125,29,56,103,204,63,72,191,125,29,56,103,204,63,0,0,0,0,0,0,224,63,72,191,125,29,56,103,204,63,44,212,154,230,29,167,234,63,181,21,251,203,238,201,225,63,181,21,251,203,238,201,225,63,181,21,251,203,238,201,225,63,181,21,251,203,238,201,225,63,88,168,53,205,59,78,213,63,0,0,0,0,0,0,224,63,211,188,227,20,29,201,209,63,181,21,251,203,238,201,225,63,0,0,0,0,0,0,224,63,210,111,95,7,206,25,231,63,0,0,0,0,0,0,224,63,0,0,0,0,0,0,224,63,0,0,0,0,0,0,224,63,2,154,8,27,158,
-94,213,63,224,190,14,156,51,162,208,63,2,154,8,27,158,94,213,63,1,77,132,13,79,175,226,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,
-227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,
-201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,88,168,53,205,59,78,213,63,181,21,251,203,238,201,225,63,181,21,251,203,238,201,225,63,62,232,217,172,250,92,197,63,181,21,251,203,238,201,225,63,181,21,251,203,238,201,225,63,181,21,251,203,238,201,225,63,181,21,251,203,238,201,225,63,29,56,103,68,105,111,200,63,88,168,53,205,59,78,213,63,181,21,251,203,238,201,225,63,88,168,53,205,59,78,213,63,88,168,53,205,59,78,213,63,0,0,0,0,0,0,224,63,0,0,0,0,0,0,224,63,211,188,227,20,29,201,
-209,63,181,21,251,203,238,201,225,63,181,21,251,203,238,201,225,63,181,21,251,203,238,201,225,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,231,29,167,232,72,46,225,63,162,180,55,248,194,100,214,63,72,191,125,29,56,103,204,63,88,168,53,205,59,78,213,63,88,168,53,205,59,78,213,63,181,21,251,203,238,201,225,63,0,0,0,0,0,0,240,63,0,0,0,0,0,0,240,63,211,188,227,20,29,201,209,63,120,11,36,40,126,140,227,63,211,188,227,20,29,201,209,63,88,168,53,205,59,78,213,63,88,168,53,205,59,78,213,63,
-88,168,53,205,59,78,213,63,88,168,53,205,59,78,213,63,88,168,53,205,59,78,213,63,88,168,53,205,59,78,213,63,88,168,53,205,59,78,213,63,88,168,53,205,59,78,213,63,211,188,227,20,29,201,209,63,88,168,53,205,59,78,213,63,88,168,53,205,59,78,213,63,211,188,227,20,29,201,209,63,88,168,53,205,59,78,213,63,88,168,53,205,59,78,213,63,88,168,53,205,59,78,213,63,0,0,0,0,0,0,240,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,
-20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,0,0,0,0,0,0,240,63,211,188,227,20,29,201,209,63,234,149,178,12,113,172,215,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,
-211,188,227,20,29,201,209,63,181,21,251,203,238,201,225,63,106,222,113,138,142,228,232,63,0,0,0,0,0,0,240,63,152,221,147,135,133,90,215,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,196,66,173,105,222,113,236,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,72,191,125,29,
-56,103,204,63,120,11,36,40,126,140,227,63,134,56,214,197,109,52,238,63,120,11,36,40,126,140,227,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,211,188,227,20,29,201,209,63,1,0,0,0,64,95,0,0,0,0,0,0,0,0,0,0,1,0,0,0,8,96,0,0,0,0,0,0,0,0,0,0,3,0,0,0,128,98,0,0,3,0,0,0,88,98,0,0,3,0,0,0,200,97,0,0,3,0,0,0,80,97,0,0,3,0,0,0,16,97,0,0,3,0,0,0,232,96,0,0,3,0,0,0,168,96,0,0,3,0,0,0,160,97,0,0,3,0,0,0,224,186,2,0,0,0,0,0,248,90,0,0,0,0,0,0,208,90,0,0,0,0,0,0,168,
-90,0,0,0,0,0,0,88,90,0,0,0,0,0,0,48,90,0,0,0,0,0,0,8,90,0,0,0,0,0,0,224,89,0,0,0,0,0,0,128,90,0,0,0,0,0,0,160,186,2,0,4,0,0,0,88,91,0,0,0,0,0,0,0,0,0,0,8,153,1,0,40,151,1,0,184,148,1,0,16,146,1,0,96,142,1,0,0,0,0,0,0,0,0,0,128,65,3,0,0,0,0,0,80,2,2,0,1,0,0,0,184,249,1,0,7,0,0,0,16,237,1,0,3,0,0,0,64,227,1,0,5,0,0,0,216,219,1,0,15,0,0,0,168,216,1,0,8,0,0,0,168,216,1,0,16,0,0,0,128,213,1,0,4,0,0,0,128,213,1,0,17,0,0,0,80,210,1,0,5,0,0,0,80,210,1,0,2,0,0,0,168,207,1,0,6,0,0,0,16,204,1,0,4,0,0,0,120,
-200,1,0,7,0,0,0,224,196,1,0,7,0,0,0,192,191,1,0,5,0,0,0,104,188,1,0,8,0,0,0,80,186,1,0,8,0,0,0,104,188,1,0,9,0,0,0,32,184,1,0,7,0,0,0,56,182,1,0,10,0,0,0,248,179,1,0,7,0,0,0,104,177,1,0,11,0,0,0,120,174,1,0,6,0,0,0,184,171,1,0,12,0,0,0,136,168,1,0,9,0,0,0,184,171,1,0,13,0,0,0,152,164,1,0,8,0,0,0,240,161,1,0,14,0,0,0,72,160,1,0,8,0,0,0,144,158,1,0,18,0,0,0,168,156,1,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,108,110,114,0,0,0,0,0,104,116,116,112,58,47,47,119,119,119,46,119,51,46,111,114,103,
-47,50,48,48,48,47,120,109,108,110,115,47,0,0,0,104,116,116,112,58,47,47,119,119,119,46,119,51,46,111,114,103,47,88,77,76,47,49,57,57,56,47,110,97,109,101,115,112,97,99,101,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,23,17,2,2,2,2,2,2,2,2,2,2,2,2,2,18,16,2,19,2,2,22,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,20,2,21,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,14,2,15,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,2,3,4,5,6,7,8,9,10,11,12,13,0,0,0,34,12,13,14,35,15,9,16,17,10,16,17,201,16,17,45,69,70,252,1,6,246,15,7,246,36,2,16,17,47,48,54,77,78,40,38,59,60,42,54,49,57,61,63,47,58,64,216,68,48,62,37,55,67,53,75,43,56,73,76,0,0,0,0,0,2,2,1,0,3,3,1,0,1,0,1,1,1,0,2,1,1,0,2,2,3,1,1,0,0,5,0,1,3,1,3,5,3,1,1,1,1,2,
-0,1,0,4,2,0,2,1,1,3,2,1,0,3,2,1,0,1,1,0,1,1,1,3,0,0,24,25,25,25,26,27,28,28,29,29,30,30,31,31,32,32,33,33,34,34,35,36,36,38,39,37,37,40,40,41,41,41,42,42,43,43,43,44,44,45,45,46,47,47,48,49,49,50,51,52,54,53,55,55,55,56,56,56,57,57,58,58,0,238,238,255,238,238,238,238,238,238,31,32,238,0,239,238,238,238,12,238,238,238,8,13,238,238,238,248,238,238,238,238,238,238,245,238,0,0,0,0,0,18,238,238,20,9,3,238,254,238,238,238,1,238,238,238,1,238,238,10,254,238,19,25,21,238,19,1,238,238,238,238,11,17,238,238,
-238,238,238,238,238,238,238,1,238,238,22,9,1,1,29,15,23,238,238,26,23,27,238,238,28,238,238,238,238,1,25,251,238,238,238,1,238,16,238,238,30,238,238,238,238,255,3,8,4,33,5,11,18,19,39,20,21,22,41,50,65,23,24,25,26,44,51,52,66,71,72,27,74,28,29,46,30,79,31,32,0,0,0,0,0,0,3,9,0,0,0,1,14,2,11,12,8,35,36,37,54,59,61,0,13,16,18,27,22,28,18,39,50,34,23,51,30,60,6,7,53,5,15,17,20,24,41,0,19,41,0,0,0,0,0,55,21,40,29,30,0,33,38,52,31,48,62,25,44,0,27,0,32,26,42,0,43,58,46,47,0,49,56,57,45,11,3,4,5,15,7,3,
-12,13,6,12,13,14,12,13,26,21,22,0,1,0,3,7,14,6,15,8,12,13,18,19,42,16,17,9,16,47,48,17,50,23,19,13,20,18,46,18,20,65,19,50,19,44,64,42,66,25,44,66,70,0,0,0,0,0,0,10,0,11,0,12,0,13,0,14,0,10,0,15,0,16,0,17,0,18,0,19,0,10,0,20,0,21,0,21,0,21,0,22,0,23,0,21,0,24,0,21,0,21,0,25,0,21,0,21,0,21,0,26,0,21,0,21,0,10,0,21,0,21,0,21,0,22,0,23,0,24,0,21,0,21,0,25,0,21,0,21,0,21,0,26,0,21,0,21,0,12,0,12,0,35,0,29,0,29,0,31,0,32,0,31,0,32,0,35,0,36,0,37,0,44,0,49,0,46,0,45,0,41,0,36,0,37,0,39,0,40,0,50,0,41,0,
-51,0,42,0,52,0,53,0,54,0,58,0,49,0,48,0,59,0,33,0,66,0,33,0,61,0,62,0,67,0,50,0,51,0,68,0,52,0,53,0,54,0,46,0,88,0,41,0,43,0,88,0,66,0,65,0,69,0,71,0,67,0,70,0,88,0,58,0,68,0,88,0,59,0,88,0,72,0,65,0,73,0,43,0,74,0,75,0,78,0,69,0,71,0,70,0,76,0,77,0,79,0,80,0,43,0,81,0,72,0,82,0,83,0,73,0,74,0,84,0,75,0,78,0,85,0,86,0,76,0,77,0,79,0,87,0,80,0,81,0,88,0,82,0,83,0,27,0,88,0,88,0,84,0,88,0,85,0,86,0,88,0,88,0,88,0,87,0,28,0,28,0,28,0,28,0,28,0,28,0,28,0,30,0,30,0,30,0,30,0,30,0,30,0,30,0,34,0,34,0,34,
-0,34,0,34,0,34,0,34,0,38,0,88,0,38,0,38,0,38,0,38,0,38,0,47,0,47,0,55,0,88,0,55,0,55,0,55,0,55,0,55,0,56,0,88,0,56,0,88,0,56,0,56,0,56,0,57,0,88,0,57,0,57,0,57,0,57,0,57,0,60,0,60,0,88,0,60,0,60,0,60,0,60,0,63,0,88,0,63,0,63,0,63,0,63,0,64,0,88,0,64,0,64,0,64,0,64,0,64,0,9,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,
-0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,1,0,0,0,4,0,0,0,1,0,0,0,5,0,0,0,1,0,0,0,6,0,0,0,7,0,0,0,7,0,0,0,1,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,3,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,1,0,0,0,1,0,0,0,2,0,0,
-0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,2,0,0,0,1,0,0,0,4,0,0,0,5,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,6,0,0,0,1,0,0,0,1,0,0,0,7,0,0,0,8,0,0,0,9,0,0,0,10,0,0,0,10,0,0,0,10,0,0,0,10,0,0,0,10,0,0,0,10,0,0,0,10,0,0,0,10,0,0,0,10,0,0,0,10,0,0,0,1,0,0,0,1,0,0,0,11,0,0,0,1,0,0,0,12,0,0,0,1,0,0,0,13,0,0,0,14,0,0,0,15,0,0,0,16,0,0,0,17,0,0,0,18,0,0,0,19,0,0,0,20,0,0,0,21,0,0,0,22,0,0,
-0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,23,0,0,0,24,0,0,0,25,0,0,0,19,0,0,0,26,0,0,0,27,0,0,0,28,0,0,0,29,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,1,0,0,0,30,0,0,0,1,0,0,0,1,0,0,0,19,0,0,0,1,0,0,0,31,0,0,0,32,0,0,0,33,0,0,0,34,0,0,0,35,0,0,0,19,0,0,0,36,0,0,0,37,0,0,0,38,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,39,0,0,0,40,0,0,0,41,0,0,0,19,0,0,0,42,0,0,0,43,0,0,0,44,0,0,0,45,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,19,0,0,0,19,0,0,0,19,0,
-0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,
-0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,
-19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,19,0,0,0,0,0,0,0,0,0,0,0,0,0,88,0,1,0,89,0,89,0,90,0,90,0,91,0,91,0,88,0,88,0,88,0,88,0,88,0,92,0,88,0,88,0,88,0,93,0,88,0,88,0,94,0,94,0,94,0,94,0,94,0,94,0,95,0,96,0,97,0,98,0,98,0,88,0,88,0,99,0,88,0,88,0,88,0,92,0,88,0,88,0,93,0,88,0,93,0,88,0,100,0,93,0,88,0,94,0,94,0,94,0,94,0,94,0,94,0,94,0,95,0,96,0,97,0,97,0,88,0,98,0,88,0,88,0,99,0,100,0,93,0,94,0,94,0,94,0,94,0,94,0,94,0,
-94,0,94,0,94,0,94,0,94,0,94,0,94,0,94,0,94,0,94,0,94,0,94,0,94,0,94,0,94,0,94,0,0,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,3,0,4,0,7,0,3,0,4,0,5,0,5,0,6,0,6,0,8,0,7,0,7,0,17,0,22,0,18,0,17,0,18,0,8,0,8,0,15,0,15,0,23,0,15,0,24,0,15,0,25,0,26,0,26,0,29,0,22,0,94,0,29,0,5,0,49,0,6,0,33,
-0,33,0,50,0,23,0,24,0,51,0,25,0,26,0,26,0,41,0,43,0,41,0,43,0,46,0,49,0,46,0,52,0,54,0,50,0,53,0,57,0,58,0,51,0,57,0,58,0,65,0,66,0,65,0,67,0,40,0,68,0,69,0,72,0,52,0,54,0,53,0,70,0,71,0,74,0,76,0,16,0,77,0,66,0,78,0,80,0,67,0,68,0,81,0,69,0,72,0,82,0,84,0,70,0,71,0,74,0,86,0,76,0,77,0,9,0,78,0,80,0,2,0,0,0,0,0,81,0,0,0,82,0,84,0,0,0,0,0,0,0,86,0,89,0,89,0,89,0,89,0,89,0,89,0,89,0,90,0,90,0,90,0,90,0,90,0,90,0,90,0,91,0,91,0,91,0,91,0,91,0,91,0,91,0,92,0,0,0,92,0,92,0,92,0,92,0,92,0,93,0,93,0,95,
-0,0,0,95,0,95,0,95,0,95,0,95,0,96,0,0,0,96,0,0,0,96,0,96,0,96,0,97,0,0,0,97,0,97,0,97,0,97,0,97,0,98,0,98,0,0,0,98,0,98,0,98,0,98,0,99,0,0,0,99,0,99,0,99,0,99,0,100,0,0,0,100,0,100,0,100,0,100,0,100,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,88,0,0,0,0,0,0,0,0,0,137,0,43,0,44,0,48,0,50,0,45,0,52,0,139,0,224,0,224,0,
-224,0,224,0,0,0,58,0,111,0,52,0,52,0,224,0,224,0,0,0,37,0,50,0,43,0,47,0,44,0,0,0,0,0,68,0,0,0,0,0,224,0,78,0,0,0,224,0,224,0,224,0,0,0,224,0,100,0,82,0,224,0,83,0,224,0,0,0,86,0,224,0,0,0,59,0,63,0,72,0,80,0,74,0,83,0,0,0,0,0,95,0,96,0,224,0,0,0,224,0,224,0,0,0,0,0,98,0,81,0,91,0,86,0,94,0,95,0,98,0,99,0,0,0,98,0,0,0,104,0,96,0,99,0,0,0,97,0,114,0,110,0,0,0,107,0,0,0,115,0,0,0,224,0,152,0,159,0,166,0,173,0,176,0,70,0,182,0,189,0,196,0,203,0,210,0,216,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,4,0,25,0,25,0,30,
-0,30,0,33,0,31,0,10,0,2,0,21,0,9,0,31,0,31,0,31,0,20,0,26,0,1,0,19,0,19,0,19,0,19,0,19,0,19,0,8,0,4,0,5,0,25,0,2,0,22,0,25,0,30,0,29,0,28,0,27,0,9,0,18,0,0,0,20,0,17,0,20,0,3,0,7,0,20,0,20,0,19,0,19,0,19,0,19,0,19,0,19,0,19,0,8,0,4,0,5,0,5,0,6,0,25,0,24,0,23,0,30,0,7,0,20,0,19,0,19,0,19,0,19,0,19,0,19,0,19,0,12,0,19,0,11,0,19,0,19,0,19,0,13,0,19,0,19,0,19,0,15,0,19,0,14,0,19,0,16,0,0,0,0,0,0,0,0,0,112,111,108,121,32,37,115,0,47,114,100,98,117,52,47,50,0,0,0,0,0,0,0,0,47,114,100,98,117,52,47,49,0,
-0,0,0,0,0,0,0,47,114,100,98,117,51,47,51,0,0,0,0,0,0,0,0,47,114,100,98,117,51,47,50,0,0,0,0,0,0,0,0,60,33,45,45,32,80,97,103,101,115,58,32,37,100,32,45,45,62,10,0,0,0,0,0,47,114,100,98,117,51,47,49,0,0,0,0,0,0,0,0,47,114,100,98,117,49,49,47,57,0,0,0,0,0,0,0,47,115,101,116,95,115,99,97,108,101,32,123,0,0,0,0,90,101,116,97,0,0,0,0,109,97,114,103,105,110,0,0,109,105,100,110,105,103,104,116,98,108,117,101,0,0,0,0,47,114,100,98,117,49,49,47,56,0,0,0,0,0,0,0,100,101,99,111,114,97,116,101,0,0,0,0,0,0,0,
-0,116,97,114,103,101,116,0,0,47,114,100,98,117,49,49,47,55,0,0,0,0,0,0,0,47,114,100,98,117,49,49,47,54,0,0,0,0,0,0,0,47,114,100,98,117,49,49,47,53,0,0,0,0,0,0,0,47,98,114,98,103,51,47,50,0,0,0,0,0,0,0,0,47,114,100,98,117,49,49,47,52,0,0,0,0,0,0,0,106,112,103,58,102,105,103,0,47,114,100,98,117,49,49,47,51,0,0,0,0,0,0,0,47,114,100,98,117,49,49,47,50,0,0,0,0,0,0,0,47,114,100,98,117,49,49,47,49,49,0,0,0,0,0,0,60,47,84,73,84,76,69,62,0,0,0,0,0,0,0,0,47,114,100,98,117,49,49,47,49,48,0,0,0,0,0,0,47,114,
-100,98,117,49,49,47,49,0,0,0,0,0,0,0,47,73,110,118,83,99,97,108,101,70,97,99,116,111,114,32,49,46,48,32,100,101,102,0,89,117,109,108,0,0,0,0,92,78,0,0,0,0,0,0,109,101,100,105,117,109,118,105,111,108,101,116,114,101,100,0,47,114,100,98,117,49,48,47,57,0,0,0,0,0,0,0,109,105,110,108,101,110,0,0,104,101,97,100,85,82,76,0,47,114,100,98,117,49,48,47,56,0,0,0,0,0,0,0,47,114,100,98,117,49,48,47,55,0,0,0,0,0,0,0,47,114,100,98,117,49,48,47,54,0,0,0,0,0,0,0,47,98,114,98,103,51,47,49,0,0,0,0,0,0,0,0,47,114,100,
-98,117,49,48,47,53,0,0,0,0,0,0,0,47,114,100,98,117,49,48,47,52,0,0,0,0,0,0,0,118,101,101,0,0,0,0,0,47,114,100,98,117,49,48,47,51,0,0,0,0,0,0,0,47,114,100,98,117,49,48,47,50,0,0,0,0,0,0,0,60,84,73,84,76,69,62,0,47,114,100,98,117,49,48,47,49,48,0,0,0,0,0,0,47,114,100,98,117,49,48,47,49,0,0,0,0,0,0,0,47,99,111,111,114,100,102,111,110,116,32,99,111,111,114,100,45,102,111,110,116,45,102,97,109,105,108,121,32,102,105,110,100,102,111,110,116,32,56,32,115,99,97,108,101,102,111,110,116,32,100,101,102,0,0,
-0,89,97,99,117,116,101,0,0,98,97,100,32,108,97,98,101,108,32,102,111,114,109,97,116,32,37,115,10,0,0,0,0,109,101,100,105,117,109,116,117,114,113,117,111,105,115,101,0,47,112,117,114,112,108,101,115,57,47,57,0,0,0,0,0,108,97,98,101,108,97,110,103,108,101,0,0,0,0,0,0,46,46,46,32,37,115,32,46,46,46,10,0,0,0,0,0,114,101,109,105,110,99,114,111,115,115,0,0,0,0,0,0,104,101,97,100,104,114,101,102,0,0,0,0,0,0,0,0,47,112,117,114,112,108,101,115,57,47,56,0,0,0,0,0,47,112,117,114,112,108,101,115,57,47,55,0,0,
-0,0,0,47,112,117,114,112,108,101,115,57,47,54,0,0,0,0,0,47,98,114,98,103,49,49,47,57,0,0,0,0,0,0,0,47,112,117,114,112,108,101,115,57,47,53,0,0,0,0,0,47,112,117,114,112,108,101,115,57,47,52,0,0,0,0,0,47,112,117,114,112,108,101,115,57,47,51,0,0,0,0,0,47,112,117,114,112,108,101,115,57,47,50,0,0,0,0,0,60,77,69,84,65,32,104,116,116,112,45,101,113,117,105,118,61,34,67,111,110,116,101,110,116,45,84,121,112,101,34,32,99,111,110,116,101,110,116,61,34,116,101,120,116,47,104,116,109,108,59,32,99,104,97,114,
-115,101,116,61,85,84,70,45,56,34,62,10,0,0,0,0,47,112,117,114,112,108,101,115,57,47,49,0,0,0,0,0,47,112,117,114,112,108,101,115,56,47,56,0,0,0,0,0,47,100,101,102,97,117,108,116,45,102,111,110,116,45,102,97,109,105,108,121,32,47,84,105,109,101,115,45,82,111,109,97,110,32,100,101,102,0,0,0,88,105,0,0,0,0,0,0,102,105,108,108,101,100,0,0,102,105,108,108,32,0,0,0,109,101,100,105,117,109,115,112,114,105,110,103,103,114,101,101,110,0,0,0,0,0,0,0,97,103,114,101,99,111,114,100,95,99,97,108,108,98,97,99,107,
-32,111,102,32,97,32,98,97,100,32,111,98,106,101,99,116,0,0,0,0,0,0,0,47,112,117,114,112,108,101,115,56,47,55,0,0,0,0,0,108,97,98,101,108,100,105,115,116,97,110,99,101,0,0,0,67,69,76,76,83,66,79,82,68,69,82,0,0,0,0,0,116,97,105,108,85,82,76,0,47,112,117,114,112,108,101,115,56,47,54,0,0,0,0,0,47,112,117,114,112,108,101,115,56,47,53,0,0,0,0,0,47,112,117,114,112,108,101,115,56,47,52,0,0,0,0,0,47,98,114,98,103,49,49,47,56,0,0,0,0,0,0,0,47,112,117,114,112,108,101,115,56,47,51,0,0,0,0,0,47,112,117,114,112,
-108,101,115,56,47,50,0,0,0,0,0,121,101,108,108,111,119,0,0,47,112,117,114,112,108,101,115,56,47,49,0,0,0,0,0,47,112,117,114,112,108,101,115,55,47,55,0,0,0,0,0,60,72,69,65,68,62,0,0,47,112,117,114,112,108,101,115,55,47,54,0,0,0,0,0,47,112,117,114,112,108,101,115,55,47,53,0,0,0,0,0,47,99,111,111,114,100,45,102,111,110,116,45,102,97,109,105,108,121,32,47,84,105,109,101,115,45,82,111,109,97,110,32,100,101,102,0,0,0,0,0,85,117,109,108,0,0,0,0,105,110,118,105,115,0,0,0,109,101,100,105,117,109,115,108,97,
-116,101,98,108,117,101,0,47,112,117,114,112,108,101,115,55,47,52,0,0,0,0,0,108,97,98,101,108,102,111,110,116,99,111,108,111,114,0,0,85,110,107,110,111,119,110,32,118,97,108,117,101,32,37,115,32,102,111,114,32,67,79,76,85,77,78,83,32,45,32,105,103,110,111,114,101,100,10,0,116,97,105,108,104,114,101,102,0,0,0,0,0,0,0,0,47,112,117,114,112,108,101,115,55,47,51,0,0,0,0,0,47,112,117,114,112,108,101,115,55,47,50,0,0,0,0,0,33,114,116,112,45,62,115,112,108,105,116,46,80,97,114,116,105,116,105,111,110,115,
-91,48,93,46,116,97,107,101,110,91,105,93,0,0,0,0,0,0,47,112,117,114,112,108,101,115,55,47,49,0,0,0,0,0,47,98,114,98,103,49,49,47,55,0,0,0,0,0,0,0,123,37,115,125,0,0,0,0,47,112,117,114,112,108,101,115,54,47,54,0,0,0,0,0,118,109,108,58,118,109,108,0,112,108,117,115,0,0,0,0,47,112,117,114,112,108,101,115,54,47,53,0,0,0,0,0,47,112,117,114,112,108,101,115,54,47,52,0,0,0,0,0,47,112,117,114,112,108,101,115,54,47,51,0,0,0,0,0,60,47,66,79,68,89,62,10,60,47,72,84,77,76,62,10,0,0,0,0,0,0,0,0,47,112,117,114,
-112,108,101,115,54,47,50,0,0,0,0,0,101,100,103,101,0,0,0,0,47,112,117,114,112,108,101,115,54,47,49,0,0,0,0,0,37,37,66,101,103,105,110,82,101,115,111,117,114,99,101,58,32,112,114,111,99,115,101,116,32,103,114,97,112,104,118,105,122,32,48,32,48,0,0,0,85,112,115,105,108,111,110,0,37,46,53,103,32,37,46,53,103,32,116,114,97,110,115,108,97,116,101,32,110,101,119,112,97,116,104,32,117,115,101,114,95,115,104,97,112,101,95,37,100,10,0,0,0,0,0,0,47,112,117,114,112,108,101,115,53,47,53,0,0,0,0,0,109,101,100,
-105,117,109,115,101,97,103,114,101,101,110,0,0,108,97,98,101,108,102,111,110,116,110,97,109,101,0,0,0,85,110,107,110,111,119,110,32,118,97,108,117,101,32,37,115,32,102,111,114,32,82,79,87,83,32,45,32,105,103,110,111,114,101,100,10,0,0,0,0,78,68,95,111,117,116,40,118,41,46,115,105,122,101,32,61,61,32,50,0,0,0,0,0,108,97,98,101,108,85,82,76,0,0,0,0,0,0,0,0,47,112,117,114,112,108,101,115,53,47,52,0,0,0,0,0,47,112,117,114,112,108,101,115,53,47,51,0,0,0,0,0,47,112,117,114,112,108,101,115,53,47,50,0,0,
-0,0,0,47,98,114,98,103,49,49,47,54,0,0,0,0,0,0,0,47,112,117,114,112,108,101,115,53,47,49,0,0,0,0,0,91,94,91,58,115,112,97,99,101,58,93,93,0,0,0,0,110,101,97,116,111,95,108,97,121,111,117,116,0,0,0,0,47,112,117,114,112,108,101,115,52,47,52,0,0,0,0,0,47,112,117,114,112,108,101,115,52,47,51,0,0,0,0,0,37,100,0,0,0,0,0,0,47,112,117,114,112,108,101,115,52,47,50,0,0,0,0,0,60,33,45,45,32,105,110,115,101,114,116,32,97,110,121,32,111,116,104,101,114,32,78,79,78,45,73,69,32,104,116,109,108,32,99,111,110,116,
-101,110,116,32,104,101,114,101,32,45,45,62,10,0,0,0,0,0,120,100,111,116,58,120,100,111,116,0,0,0,0,0,0,0,100,101,102,108,97,116,105,111,110,32,102,105,110,105,115,104,32,112,114,111,98,108,101,109,32,37,100,32,99,110,116,61,37,100,10,0,0,0,0,0,99,97,110,110,111,116,32,109,97,108,108,111,99,32,112,110,108,115,0,0,0,0,0,0,47,112,117,114,112,108,101,115,52,47,49,0,0,0,0,0,47,112,117,114,112,108,101,115,51,47,51,0,0,0,0,0,116,114,117,101,0,0,0,0,125,32,98,105,110,100,32,100,101,102,0,0,0,0,0,0,85,103,
-114,97,118,101,0,0,110,111,100,101,32,37,115,44,32,112,111,114,116,32,37,115,32,117,110,114,101,99,111,103,110,105,122,101,100,10,0,0,91,105,110,116,101,114,110,97,108,32,97,114,105,97,108,93,0,0,0,0,0,0,0,0,109,101,100,105,117,109,112,117,114,112,108,101,0,0,0,0,47,112,117,114,112,108,101,115,51,47,50,0,0,0,0,0,108,97,98,101,108,102,111,110,116,115,105,122,101,0,0,0,114,111,119,115,0,0,0,0,108,97,98,101,108,104,114,101,102,0,0,0,0,0,0,0,110,0,0,0,0,0,0,0,47,112,117,114,112,108,101,115,51,47,49,0,
-0,0,0,0,119,0,0,0,0,0,0,0,65,103,110,111,100,101,105,110,102,111,95,116,0,0,0,0,105,110,32,99,104,101,99,107,112,97,116,104,44,32,98,111,120,32,48,32,104,97,115,32,76,76,32,99,111,111,114,100,32,62,32,85,82,32,99,111,111,114,100,10,0,0,0,0,47,112,117,114,100,57,47,57,0,0,0,0,0,0,0,0,84,82,65,73,76,69,82,0,47,97,99,99,101,110,116,53,47,49,0,0,0,0,0,0,101,100,103,101,0,0,0,0,116,114,111,117,98,108,101,32,105,110,32,105,110,105,116,95,114,97,110,107,10,0,0,0,10,102,105,110,97,108,32,101,32,61,32,37,
-102,0,0,0,38,103,116,59,0,0,0,0,47,112,117,114,100,57,47,56,0,0,0,0,0,0,0,0,47,98,114,98,103,49,49,47,53,0,0,0,0,0,0,0,37,115,58,37,115,0,0,0,110,111,100,101,0,0,0,0,47,112,117,114,100,57,47,55,0,0,0,0,0,0,0,0,83,101,116,116,105,110,103,32,117,112,32,115,116,114,101,115,115,32,102,117,110,99,116,105,111,110,0,0,0,0,0,0,65,103,101,100,103,101,105,110,102,111,95,116,0,0,0,0,100,101,108,120,32,62,61,32,48,0,0,0,0,0,0,0,47,112,117,114,100,57,47,54,0,0,0,0,0,0,0,0,84,68,0,0,0,0,0,0,47,112,117,114,100,
-57,47,53,0,0,0,0,0,0,0,0,101,115,101,112,0,0,0,0,47,112,117,114,100,57,47,52,0,0,0,0,0,0,0,0,60,68,73,86,32,105,100,61,39,95,110,111,116,86,77,76,50,95,39,32,115,116,121,108,101,61,34,112,111,115,105,116,105,111,110,58,114,101,108,97,116,105,118,101,59,34,62,10,0,0,0,0,0,0,0,0,37,115,32,45,62,32,37,115,58,32,104,101,97,100,32,105,115,32,105,110,115,105,100,101,32,116,97,105,108,32,99,108,117,115,116,101,114,32,37,115,10,0,0,0,0,0,0,0,110,111,100,101,0,0,0,0,47,112,117,114,100,57,47,51,0,0,0,0,0,0,
-0,0,47,112,117,114,100,57,47,50,0,0,0,0,0,0,0,0,99,108,101,97,114,116,111,109,97,114,107,0,0,0,0,0,111,114,116,104,111,103,111,110,97,108,32,108,105,110,101,115,0,0,0,0,0,0,0,0,85,99,105,114,99,0,0,0,110,111,100,101,32,37,115,44,32,112,111,114,116,32,37,115,44,32,117,110,114,101,99,111,103,110,105,122,101,100,32,99,111,109,112,97,115,115,32,112,111,105,110,116,32,39,37,115,39,32,45,32,105,103,110,111,114,101,100,10,0,0,0,0,109,101,100,105,117,109,111,114,99,104,105,100,0,0,0,0,47,112,117,114,100,
-57,47,49,0,0,0,0,0,0,0,0,116,97,105,108,108,97,98,101,108,0,0,0,0,0,0,0,99,111,108,117,109,110,115,0,101,100,103,101,85,82,76,0,98,105,115,113,117,101,0,0,47,112,117,114],"i8",L,l.J+71716);D([100,56,47,56,0,0,0,0,0,0,0,0,47,112,117,114,100,56,47,55,0,0,0,0,0,0,0,0,47,112,117,114,100,56,47,54,0,0,0,0,0,0,0,0,47,98,114,98,103,49,49,47,52,0,0,0,0,0,0,0,47,112,117,114,100,56,47,53,0,0,0,0,0,0,0,0,44,10,0,0,0,0,0,0,110,111,100,101,32,37,115,32,105,110,32,103,114,97,112,104,32,37,115,32,104,97,115,32,110,
-111,32,112,111,115,105,116,105,111,110,10,0,0,0,0,47,112,117,114,100,56,47,52,0,0,0,0,0,0,0,0,37,115,32,115,97,118,101,32,112,111,105,110,116,32,115,105,122,101,32,97,110,100,32,102,111,110,116,10,46,110,114,32,46,83,32,92,110,40,46,115,10,46,110,114,32,68,70,32,92,110,40,46,102,10,0,0,47,112,117,114,100,56,47,51,0,0,0,0,0,0,0,0,127,98,111,116,0,0,0,0,47,112,117,114,100,56,47,50,0,0,0,0,0,0,0,0,60,72,50,62,83,111,114,114,121,44,32,116,104,105,115,32,100,105,97,103,114,97,109,32,119,105,108,108,32,
-111,110,108,121,32,100,105,115,112,108,97,121,32,99,111,114,114,101,99,116,108,121,32,111,110,32,73,110,116,101,114,110,101,116,32,69,120,112,108,111,114,101,114,32,53,32,40,97,110,100,32,117,112,41,32,98,114,111,119,115,101,114,115,46,60,47,72,50,62,10,0,0,0,0,0,47,112,117,114,100,56,47,49,0,0,0,0,0,0,0,0,104,112,0,0,0,0,0,0,37,108,102,37,50,115,0,0,115,101,116,108,105,110,101,119,105,100,116,104,0,0,0,0,47,112,117,114,100,55,47,55,0,0,0,0,0,0,0,0,47,67,111,117,114,105,101,114,45,66,111,108,100,
-79,98,108,105,113,117,101,32,115,116,97,114,110,101,116,73,83,79,32,100,101,102,0,0,0,0,0,85,97,99,117,116,101,0,0,102,108,101,120,32,115,99,97,110,110,101,114,32,112,117,115,104,45,98,97,99,107,32,111,118,101,114,102,108,111,119,0,95,0,0,0,0,0,0,0,109,101,100,105,117,109,98,108,117,101,0,0,0,0,0,0,47,112,117,114,100,55,47,54,0,0,0,0,0,0,0,0,104,101,97,100,108,97,98,101,108,0,0,0,0,0,0,0,99,101,108,108,98,111,114,100,101,114,0,0,0,0,0,0,101,100,103,101,104,114,101,102,0,0,0,0,0,0,0,0,47,112,117,114,
-100,55,47,53,0,0,0,0,0,0,0,0,117,110,102,105,108,108,101,100,0,0,0,0,0,0,0,0,47,112,117,114,100,55,47,52,0,0,0,0,0,0,0,0,111,117,116,0,0,0,0,0,47,112,117,114,100,55,47,51,0,0,0,0,0,0,0,0,47,98,114,98,103,49,49,47,51,0,0,0,0,0,0,0,47,112,117,114,100,55,47,50,0,0,0,0,0,0,0,0,47,112,117,114,100,55,47,49,0,0,0,0,0,0,0,0,37,115,32,84,105,116,108,101,58,32,37,115,10,0,0,0,47,112,117,114,100,54,47,54,0,0,0,0,0,0,0,0,47,112,117,114,100,54,47,53,0,0,0,0,0,0,0,0,60,33,45,45,32,116,104,105,115,32,115,104,111,
-117,108,100,32,111,110,108,121,32,100,105,115,112,108,97,121,32,111,110,32,78,79,78,45,73,69,32,98,114,111,119,115,101,114,115,32,45,45,62,10,0,0,0,47,112,117,114,100,54,47,52,0,0,0,0,0,0,0,0,47,112,117,114,100,54,47,51,0,0,0,0,0,0,0,0,47,67,111,117,114,105,101,114,45,66,111,108,100,32,115,116,97,114,110,101,116,73,83,79,32,100,101,102,0,0,0,0,84,104,101,116,97,0,0,0,119,101,100,103,101,100,0,0,109,101,100,105,117,109,97,113,117,97,109,97,114,105,110,101,0,0,0,0,0,0,0,0,47,112,117,114,100,54,47,50,
-0,0,0,0,0,0,0,0,97,114,114,111,119,116,97,105,108,0,0,0,0,0,0,0,60,84,65,66,76,69,62,0,85,82,76,0,0,0,0,0,47,112,117,114,100,54,47,49,0,0,0,0,0,0,0,0,47,112,117,114,100,53,47,53,0,0,0,0,0,0,0,0,47,112,117,114,100,53,47,52,0,0,0,0,0,0,0,0,47,98,114,98,103,49,49,47,50,0,0,0,0,0,0,0,100,117,112,108,105,99,97,116,101,32,97,116,116,114,105,98,117,116,101,0,0,0,0,0,47,112,117,114,100,53,47,51,0,0,0,0,0,0,0,0,99,105,114,99,108,101,32,37,115,32,37,100,44,37,100,44,37,100,10,0,0,0,0,0,47,112,117,114,100,53,
-47,50,0,0,0,0,0,0,0,0,37,115,32,67,114,101,97,116,111,114,58,32,37,115,32,118,101,114,115,105,111,110,32,37,115,32,40,37,115,41,10,0,47,112,117,114,100,53,47,49,0,0,0,0,0,0,0,0,47,112,117,114,100,52,47,52,0,0,0,0,0,0,0,0,60,68,73,86,32,105,100,61,39,95,110,111,116,86,77,76,49,95,39,32,115,116,121,108,101,61,34,112,111,115,105,116,105,111,110,58,114,101,108,97,116,105,118,101,59,34,62,10,0,0,0,0,0,0,0,0,47,112,117,114,100,52,47,51,0,0,0,0,0,0,0,0,47,112,117,114,100,52,47,50,0,0,0,0,0,0,0,0,47,67,111,
-117,114,105,101,114,45,79,98,108,105,113,117,101,32,115,116,97,114,110,101,116,73,83,79,32,100,101,102,0,84,97,117,0,0,0,0,0,115,116,114,105,112,101,100,0,109,97,114,111,111,110,0,0,47,112,117,114,100,52,47,49,0,0,0,0,0,0,0,0,97,114,114,111,119,104,101,97,100,0,0,0,0,0,0,0,73,108,108,101,103,97,108,32,118,97,108,117,101,32,37,115,32,102,111,114,32,65,76,73,71,78,32,105,110,32,84,68,32,45,32,105,103,110,111,114,101,100,10,0,0,0,0,0,104,114,101,102,0,0,0,0,47,112,117,114,100,51,47,51,0,0,0,0,0,0,0,
-0,47,112,117,114,100,51,47,50,0,0,0,0,0,0,0,0,47,112,117,114,100,51,47,49,0,0,0,0,0,0,0,0,47,98,114,98,103,49,49,47,49,49,0,0,0,0,0,0,47,112,117,111,114,57,47,57,0,0,0,0,0,0,0,0,106,112,101,58,102,105,103,0,47,112,117,111,114,57,47,56,0,0,0,0,0,0,0,0,37,115,32,114,101,115,116,111,114,101,32,112,111,105,110,116,32,115,105,122,101,32,97,110,100,32,102,111,110,116,10,46,112,115,32,92,110,40,46,83,10,46,102,116,32,92,110,40,68,70,10,0,0,0,0,0,47,112,117,111,114,57,47,55,0,0,0,0,0,0,0,0,47,112,117,111,
-114,57,47,54,0,0,0,0,0,0,0,0,60,33,45,45,32,105,110,115,101,114,116,32,97,110,121,32,111,116,104,101,114,32,104,116,109,108,32,99,111,110,116,101,110,116,32,104,101,114,101,32,45,45,62,10,0,0,0,0,47,112,117,111,114,57,47,53,0,0,0,0,0,0,0,0,47,112,117,111,114,57,47,52,0,0,0,0,0,0,0,0,47,67,111,117,114,105,101,114,32,115,116,97,114,110,101,116,73,83,79,32,100,101,102,0,84,72,79,82,78,0,0,0,114,97,100,105,97,108,0,0,109,97,103,101,110,116,97,0,47,112,117,111,114,57,47,51,0,0,0,0,0,0,0,0,100,105,114,
-0,0,0,0,0,69,88,84,0,0,0,0,0,32,45,45,32,0,0,0,0,47,112,117,111,114,57,47,50,0,0,0,0,0,0,0,0,105,110,99,111,109,112,97,116,105,98,108,101,32,118,101,114,115,105,111,110,0,0,0,0,47,112,117,111,114,57,47,49,0,0,0,0,0,0,0,0,47,112,117,111,114,56,47,56,0,0,0,0,0,0,0,0,47,98,114,98,103,49,49,47,49,48,0,0,0,0,0,0,112,110,103,58,115,118,103,0,47,112,117,111,114,56,47,55,0,0,0,0,0,0,0,0,47,112,117,111,114,56,47,54,0,0,0,0,0,0,0,0,47,112,117,111,114,56,47,53,0,0,0,0,0,0,0,0,37,115,37,115,32,117,110,115,117,
-112,112,111,114,116,101,100,10,0,0,0,0,0,0,0,105,110,118,0,0,0,0,0,47,112,117,111,114,56,47,52,0,0,0,0,0,0,0,0,60,68,73,86,32,105,100,61,39,95,86,77,76,50,95,39,32,115,116,121,108,101,61,34,112,111,115,105,116,105,111,110,58,114,101,108,97,116,105,118,101,59,118,105,115,105,98,105,108,105,116,121,58,104,105,100,100,101,110,34,62,10,0,0,47,112,117,111,114,56,47,51,0,0,0,0,0,0,0,0,47,112,117,111,114,56,47,50,0,0,0,0,0,0,0,0,47,72,101,108,118,101,116,105,99,97,45,66,111,108,100,79,98,108,105,113,117,
-101,32,115,116,97,114,110,101,116,73,83,79,32,100,101,102,0,0,0,83,105,103,109,97,0,0,0,105,110,118,105,115,0,0,0,108,105,110,101,110,0,0,0,47,112,117,111,114,56,47,49,0,0,0,0,0,0,0,0,108,97,98,101,108,102,108,111,97,116,0,0,0,0,0,0,73,108,108,101,103,97,108,32,118,97,108,117,101,32,37,115,32,102,111,114,32,66,65,76,73,71,78,32,105,110,32,84,68,32,45,32,105,103,110,111,114,101,100,10,0,0,0,0,32,45,62,32,0,0,0,0,47,112,117,111,114,55,47,55,0,0,0,0,0,0,0,0,47,112,117,111,114,55,47,54,0,0,0,0,0,0,0,
-0,47,112,117,111,114,55,47,53,0,0,0,0,0,0,0,0,47,98,114,98,103,49,49,47,49,0,0,0,0,0,0,0,47,112,117,111,114,55,47,52,0,0,0,0,0,0,0,0,47,112,117,111,114,55,47,51,0,0,0,0,0,0,0,0,100,101,102,105,110,101,32,97,116,116,114,115,48,32,37,37,32,37,37,59,32,100,101,102,105,110,101,32,117,110,102,105,108,108,101,100,32,37,37,32,37,37,59,32,100,101,102,105,110,101,32,114,111,117,110,100,101,100,32,37,37,32,37,37,59,32,100,101,102,105,110,101,32,100,105,97,103,111,110,97,108,115,32,37,37,32,37,37,10,0,0,0,0,
-0,0,0,47,112,117,111,114,55,47,50,0,0,0,0,0,0,0,0,47,112,117,111,114,55,47,49,0,0,0,0,0,0,0,0,60,47,68,73,86,62,10,0,47,112,117,111,114,54,47,54,0,0,0,0,0,0,0,0,47,112,117,111,114,54,47,53,0,0,0,0,0,0,0,0,109,97,112,0,0,0,0,0,83,99,97,114,111,110,0,0,100,105,97,103,111,110,97,108,115,0,0,0,0,0,0,0,101,108,108,105,112,115,101,32,97,116,116,114,115,37,100,32,37,115,119,105,100,32,37,46,53,102,32,104,116,32,37,46,53,102,32,97,116,32,40,37,46,53,102,44,37,46,53,102,41,59,10,0,0,0,0,0,108,105,109,101,
-103,114,101,101,110,0,0,0,0,0,0,0,47,112,117,111,114,54,47,52,0,0,0,0,0,0,0,0,119,101,105,103,104,116,0,0,66,79,82,68,69,82,0,0,105,110,32,101,100,103,101,32,37,115,37,115,37,115,10,0,111,117,116,32,111,102,32,109,101,109,111,114,121,10,0,0,47,112,117,111,114,54,47,51,0,0,0,0,0,0,0,0,47,72,101,108,118,101,116,105,99,97,45,66,111,108,100,32,115,116,97,114,110,101,116,73,83,79,32,100,101,102,0,0,47,112,117,111,114,54,47,50,0,0,0,0,0,0,0,0,47,112,117,111,114,54,47,49,0,0,0,0,0,0,0,0,47,98,114,98,103,
-49,48,47,57,0,0,0,0,0,0,0,118,103,0,0,0,0,0,0,47,112,117,111,114,53,47,53,0,0,0,0,0,0,0,0,47,112,117,111,114,53,47,52,0,0,0,0,0,0,0,0,68,111,116,58,32,91,10,0,47,112,117,111,114,53,47,51,0,0,0,0,0,0,0,0,119,104,105,116,101,0,0,0,47,112,117,111,114,53,47,50,0,0,0,0,0,0,0,0,60,47,118,58,103,114,111,117,112,62,10,0,0,0,0,0,47,112,117,111,114,53,47,49,0,0,0,0,0,0,0,0,47,112,117,111,114,52,47,52,0,0,0,0,0,0,0,0,47,72,101,108,118,101,116,105,99,97,45,79,98,108,105,113,117,101,32,115,116,97,114,110,101,
-116,73,83,79,32,100,101,102,0,0,0,0,0,0,0,82,104,111,0,0,0,0,0,114,111,117,110,100,101,100,0,108,105,109,101,0,0,0,0,47,112,117,111,114,52,47,51,0,0,0,0,0,0,0,0,122,0,0,0,0,0,0,0,67,69,76,76,80,65,68,68,73,78,71,0,0,0,0,0,110,111,110,101,0,0,0,0,47,112,117,111,114,52,47,50,0,0,0,0,0,0,0,0,47,112,117,111,114,52,47,49,0,0,0,0,0,0,0,0,47,112,117,111,114,51,47,51,0,0,0,0,0,0,0,0,47,98,114,98,103,49,48,47,56,0,0,0,0,0,0,0,114,116,112,45,62,115,112,108,105,116,46,80,97,114,116,105,116,105,111,110,115,91,
-48,93,46,99,111,117,110,116,91,48,93,32,62,61,32,114,116,112,45,62,77,105,110,70,105,108,108,32,38,38,32,114,116,112,45,62,115,112,108,105,116,46,80,97,114,116,105,116,105,111,110,115,91,48,93,46,99,111,117,110,116,91,49,93,32,62,61,32,114,116,112,45,62,77,105,110,70,105,108,108,0,0,47,112,117,111,114,51,47,50,0,0,0,0,0,0,0,0,65,103,110,111,100,101,105,110,102,111,95,116,0,0,0,0,118,109,108,0,0,0,0,0,47,112,117,111,114,51,47,49,0,0,0,0,0,0,0,0,75,80,95,68,111,119,110,0,109,97,120,112,115,104,116,
-32,61,32,37,102,10,109,97,120,112,115,119,105,100,32,61,32,37,102,10,0,0,0,0,0,47,112,117,111,114,49,49,47,57,0,0,0,0,0,0,0,47,112,117,111,114,49,49,47,56,0,0,0,0,0,0,0,62,10,0,0,0,0,0,0,47,112,117,111,114,49,49,47,55,0,0,0,0,0,0,0,110,111,100,101,0,0,0,0,47,112,117,111,114,49,49,47,54,0,0,0,0,0,0,0,47,72,101,108,118,101,116,105,99,97,32,115,116,97,114,110,101,116,73,83,79,32,100,101,102,0,0,0,0,0,0,0,80,115,105,0,0,0,0,0,102,105,108,108,101,100,0,0,108,105,103,104,116,121,101,108,108,111,119,0,0,
-0,0,0,47,112,117,111,114,49,49,47,53,0,0,0,0,0,0,0,118,101,114,116,105,99,101,115,0,0,0,0,0,0,0,0,67,69,76,76,83,80,65,67,73,78,71,0,0,0,0,0,98,111,116,104,0,0,0,0,47,112,117,111,114,49,49,47,52,0,0,0,0,0,0,0,47,112,117,111,114,49,49,47,51,0,0,0,0,0,0,0,47,112,117,111,114,49,49,47,50,0,0,0,0,0,0,0,47,98,114,98,103,49,48,47,55,0,0,0,0,0,0,0,47,112,117,111,114,49,49,47,49,49,0,0,0,0,0,0,91,91,58,115,112,97,99,101,58,93,93,0,0,0,0,0,110,111,112,50,0,0,0,0,47,112,117,111,114,49,49,47,49,48,0,0,0,0,0,
-0,37,115,32,109,97,120,112,115,104,116,32,97,110,100,32,109,97,120,112,115,119,105,100,32,97,114,101,32,112,114,101,100,101,102,105,110,101,100,32,116,111,32,49,49,46,48,32,97,110,100,32,56,46,53,32,105,110,32,103,112,105,99,10,0,47,112,117,111,114,49,49,47,49,0,0,0,0,0,0,0,47,112,117,111,114,49,48,47,57,0,0,0,0,0,0,0,32,116,97,114,103,101,116,61,34,37,115,34,0,0,0,0,112,108,97,105,110,45,101,120,116,58,100,111,116,0,0,0,111,114,100,101,114,0,0,0,99,97,110,110,111,116,32,114,101,97,108,108,111,99,
-32,100,113,46,112,110,108,115,0,0,47,112,117,111,114,49,48,47,56,0,0,0,0,0,0,0,47,112,117,111,114,49,48,47,55,0,0,0,0,0,0,0,110,111,0,0,0,0,0,0,47,84,105,109,101,115,45,66,111,108,100,73,116,97,108,105,99,32,115,116,97,114,110,101,116,73,83,79,32,100,101,102,0,0,0,0,0,0,0,0,80,114,105,109,101,0,0,0,104,101,108,118,101,116,105,99,97,0,0,0,0,0,0,0,47,112,117,111,114,49,48,47,54,0,0,0,0,0,0,0,108,105,103,104,116,115,116,101,101,108,98,108,117,101,0,0,99,111,109,109,101,110,116,0,67,79,76,83,80,65,78,
-32,118,97,108,117,101,32,99,97,110,110,111,116,32,98,101,32,48,32,45,32,105,103,110,111,114,101,100,10,0,0,0,0,98,97,99,107,0,0,0,0,47,112,117,111,114,49,48,47,53,0,0,0,0,0,0,0,110,0,0,0,0,0,0,0,65,103,101,100,103,101,105,110,102,111,95,116,0,0,0,0,85,110,97,98,108,101,32,116,111,32,114,101,99,108,97,105,109,32,98,111,120,32,115,112,97,99,101,32,105,110,32,115,112,108,105,110,101,32,114,111,117,116,105,110,103,32,102,111,114,32,101,100,103,101,32,34,37,115,34,32,45,62,32,34,37,115,34,46,32,83,111,
-109,101,116,104,105,110,103,32,105,115,32,112,114,111,98,97,98,108,121,32,115,101,114,105,111,117,115,108,121,32,119,114,111,110,103,46,10,0,0,0,0,69,78,68,0,0,0,0,0,32,91,37,100,93,32,40,37,46,48,50,102,44,37,46,48,50,102,41,32,40,37,46,48,50,102,44,37,46,48,50,102,41,32,37,112,32,34,37,115,34,10,0,0,0,0,0,0,47,112,117,111,114,49,48,47,52,0,0,0,0,0,0,0,104,101,97,100,112,111,114,116,0,0,0,0,0,0,0,0,97,100,100,95,116,114,101,101,95,101,100,103,101,58,32,101,109,112,116,121,32,105,110,101,100,103,
-101,32,108,105,115,116,10,0,0,0,0,0,0,0,47,112,117,111,114,49,48,47,51,0,0,0,0,0,0,0,37,46,50,102,32,115,101,99,10,0,0,0,0,0,0,0,38,108,116,59,0,0,0,0,47,97,99,99,101,110,116,52,47,52,0,0,0,0,0,0,47,98,114,98,103,49,48,47,54,0,0,0,0,0,0,0,103,114,97,112,104,0,0,0,47,112,117,111,114,49,48,47,50,0,0,0,0,0,0,0,58,32,37,46,50,102,32,115,101,99,0,0,0,0,0,0,65,103,114,97,112,104,105,110,102,111,95,116,0,0,0,0,60,84,65,66,76,69,62,0,47,112,117,111,114,49,48,47,49,48,0,0,0,0,0,0,84,72,0,0,0,0,0,0,37,115,
-32,109,97,120,112,115,104,116,32,97,110,100,32,109,97,120,112,115,119,105,100,32,104,97,118,101,32,110,111,32,109,101,97,110,105,110,103,32,105,110,32,68,87,66,32,50,46,48,44,32,115,101,116,32,112,97,103,101,32,98,111,117,110,100,97,114,105,101,115,32,105,110,32,103,112,105,99,32,97,110,100,32,105,110,32,49,48,116,104,32,69,100,105,116,105,111,110,10,0,0,0,0,47,112,117,111,114,49,48,47,49,0,0,0,0,0,0,0,115,101,112,0,0,0,0,0,47,112,117,98,117,103,110,57,47,57,0,0,0,0,0,0,32,116,105,116,108,101,61,
-34,37,115,34,0,0,0,0,0,37,115,32,119,97,115,32,97,108,114,101,97,100,121,32,105,110,32,97,32,114,97,110,107,115,101,116,44,32,100,101,108,101,116,101,100,32,102,114,111,109,32,99,108,117,115,116,101,114,32,37,115,10,0,0,0,99,108,117,115,116,0,0,0,47,112,117,98,117,103,110,57,47,56,0,0,0,0,0,0,47,112,117,98,117,103,110,57,47,55,0,0,0,0,0,0,47,84,105,109,101,115,45,66,111,108,100,32,115,116,97,114,110,101,116,73,83,79,32,100,101,102,0,0,0,0,0,0,67,114,101,97,116,105,110,103,32,101,100,103,101,115,32,
-117,115,105,110,103,32,37,115,10,0,0,0,0,0,0,0,0,80,105,0,0,0,0,0,0,102,97,108,115,101,0,0,0,47,112,117,98,117,103,110,57,47,54,0,0,0,0,0,0,108,105,103,104,116,115,108,97,116,101,103,114,101,121,0,0,103,114,111,117,112,0,0,0,67,79,76,83,80,65,78,0,102,111,114,119,97,114,100,0,98,101,105,103,101,0,0,0,47,112,117,98,117,103,110,57,47,53,0,0,0,0,0,0,37,115,32,45,62,32,37,115,58,32,116,97,105,108,32,110,111,116,32,105,110,115,105,100,101,32,116,97,105,108,32,99,108,117,115,116,101,114,32,37,115,10,0,
-0,0,0,0,0,47,112,117,98,117,103,110,57,47,52,0,0,0,0,0,0,47,112,117,98,117,103,110,57,47,51,0,0,0,0,0,0,47,98,114,98,103,49,48,47,53,0,0,0,0,0,0,0,47,62,10,0,0,0,0,0,47,112,117,98,117,103,110,57,47,50,0,0,0,0,0,0,32,91,0,0,0,0,0,0,99,108,117,115,116,101,114,0,47,112,117,98,117,103,110,57,47,49,0,0,0,0,0,0,102,97,105,108,117,114,101,32,109,97,108,108,111,99,39,105,110,103,32,102,111,114,32,114,101,115,117,108,116,32,115,116,114,105,110,103,0,0,0,0,37,115,32,46,80,83,32,119,47,111,32,97,114,103,115,
-32,99,97,117,115,101,115,32,71,78,85,32,112,105,99,32,116,111,32,115,99,97,108,101,32,100,114,97,119,105,110,103,32,116,111,32,102,105,116,32,56,46,53,120,49,49,32,112,97,112,101,114,59,32,68,87,66,32,100,111,101,115,32,110,111,116,10,0,0,0,0,0,0,47,112,117,98,117,103,110,56,47,56,0,0,0,0,0,0,127,116,111,112,0,0,0,0,47,112,117,98,117,103,110,56,47,55,0,0,0,0,0,0,32,104,114,101,102,61,34,37,115,34,0,0,0,0,0,0,47,112,117,98,117,103,110,56,47,54,0,0,0,0,0,0,110,115,108,105,109,105,116,0,119,105,100,
-116,104,0,0,0,32,115,101,116,108,105,110,101,119,105,100,116,104,10,0,0,47,112,117,98,117,103,110,56,47,53,0,0,0,0,0,0,47,84,105,109,101,115,45,73,116,97,108,105,99,32,115,116,97,114,110,101,116,73,83,79,32,100,101,102,0,0,0,0,80,104,105,0,0,0,0,0,105,109,97,103,101,0,0,0,39,10,0,0,0,0,0,0,47,112,117,98,117,103,110,56,47,52,0,0,0,0,0,0,108,105,103,104,116,115,108,97,116,101,103,114,97,121,0,0,108,97,121,101,114,0,0,0,73,108,108,101,103,97,108,32,118,97,108,117,101,32,37,115,32,102,111,114,32,70,73,
-88,69,68,83,73,90,69,32,45,32,105,103,110,111,114,101,100,10,0,0,0,0,0,0,0,58,0,0,0,0,0,0,0,47,112,117,98,117,103,110,56,47,51,0,0,0,0,0,0,102,105,108,108,101,100,0,0,47,112,117,98,117,103,110,56,47,50,0,0,0,0,0,0,78,68,95,111,114,100,101,114,40,118,41,32,60,32,78,68,95,111,114,100,101,114,40,119,41,0,0,0,0,0,0,0,47,112,117,98,117,103,110,56,47,49,0,0,0,0,0,0,47,98,114,98,103,49,48,47,52,0,0,0,0,0,0,0,34,32,119,105,100,116,104,61,34,37,103,112,120,34,32,104,101,105,103,104,116,61,34,37,103,112,120,
-34,32,112,114,101,115,101,114,118,101,65,115,112,101,99,116,82,97,116,105,111,61,34,120,77,105,110,89,77,105,110,32,109,101,101,116,34,32,120,61,34,37,103,34,32,121,61,34,37,103,34,0,0,47,112,117,98,117,103,110,55,47,55,0,0,0,0,0,0,47,112,117,98,117,103,110,55,47,54,0,0,0,0,0,0,108,105,110,101,116,104,105,99,107,32,61,32,48,59,32,111,108,100,108,105,110,101,116,104,105,99,107,32,61,32,108,105,110,101,116,104,105,99,107,10,0,0,0,0,0,0,0,0,47,112,117,98,117,103,110,55,47,53,0,0,0,0,0,0,47,112,117,98,
-117,103,110,55,47,52,0,0,0,0,0,0,60,97,0,0,0,0,0,0,47,112,117,98,117,103,110,55,47,51,0,0,0,0,0,0,47,112,117,98,117,103,110,55,47,50,0,0,0,0,0,0,47,84,105,109,101,115,45,82,111,109,97,110,32,115,116,97,114,110,101,116,73,83,79,32,100,101,102,0,0,0,0,0,79,117,109,108,0,0,0,0,105,110,32,110,111,100,101,32,37,115,10,0,0,0,0,0,97,103,100,101,108,101,116,101,32,111,110,32,119,114,111,110,103,32,103,114,97,112,104,0,47,112,117,98,117,103,110,55,47,49,0,0,0,0,0,0,108,105,103,104,116,115,107,121,98,108,117,
-101,0,0,0,0,110,111,106,117,115,116,105,102,121,0,0,0,0,0,0,0,65,76,83,69,0,0,0,0,116,97,112,101,114,101,100,0,47,112,117,98,117,103,110,54,47,54,0,0,0,0,0,0,47,112,117,98,117,103,110,54,47,53,0,0,0,0,0,0,47,112,117,98,117,103,110,54,47,52,0,0,0,0,0,0,47,98,114,98,103,49,48,47,51,0,0,0,0,0,0,0,109,105,115,109,97,116,99,104,101,100,32,116,97,103,0,0,32,116,114,97,110,115,102,111,114,109,61,34,114,111,116,97,116,101,40,37,100,32,37,103,32,37,103,41,34,0,0,0,47,112,117,98,117,103,110,54,47,51,0,0,0,
-0,0,0,47,112,117,98,117,103,110,54,47,50,0,0,0,0,0,0,114,101,99,116,32,37,115,32,37,100,44,37,100,32,37,100,44,37,100,10,0,0,0,0,37,115,32,71,78,85,32,112,105,99,32,115,117,112,112,111,114,116,115,32,97,32,108,105,110,101,116,104,105,99,107,32,118,97,114,105,97,98,108,101,32,116,111,32,115,101,116,32,108,105,110,101,32,116,104,105,99,107,110,101,115,115,59,32,68,87,66,32,97,110,100,32,49,48,116,104,32,69,100,46,32,100,111,32,110,111,116,10,0,0,0,0,0,0,0,0,47,112,117,98,117,103,110,54,47,49,0,0,0,
-0,0,0,47,112,117,98,117,103,110,53,47,53,0,0,0,0,0,0,60,47,97,62,10,0,0,0,47,112,117,98,117,103,110,53,47,52,0,0,0,0,0,0,47,112,117,98,117,103,110,53,47,51,0,0,0,0,0,0,125,32,100,101,102,0,0,0,79,116,105,108,100,101,0,0,116,114,97,110,115,112,97,114,101,110,116,0,0,0,0,0,47,112,117,98,117,103,110,53,47,50,0,0,0,0,0,0,108,105,103,104,116,115,101,97,103,114,101,101,110,0,0,0,105,109,97,103,101,115,99,97,108,101,0,0,0,0,0,0,82,85,69,0,0,0,0,0,37,115,45,37,115,0,0,0,47,112,117,98,117,103,110,53,47,49,
-0,0,0,0,0,0,47,112,117,98,117,103,110,52,47,52,0,0,0,0,0,0,47,112,117,98,117,103,110,52,47,51,0,0,0,0,0,0,47,98,114,98,103,49,48,47,50,0,0,0,0,0,0,0,34,32,119,105,100,116,104,61,34,37,103,112,120,34,32,104,101,105,103,104,116,61,34,37,103,112,120,34,32,112,114,101,115,101,114,118,101,65,115,112,101,99,116,82,97,116,105,111,61,34,120,77,105,100,89,77,105,100,32,109,101,101,116,34,32,120,61,34,37,103,34,32,121,61,34,37,103,34,0,0,47,112,117,98,117,103,110,52,47,50,0,0,0,0,0,0,106,112,101,103,58,102,
-105,103,0,0,0,0,0,0,0,0,47,112,117,98,117,103,110,52,47,49,0,0,0,0,0,0,98,111,120,114,97,100,32,61,32,48,32,37,115,32,110,111,32,114,111,117,110,100,101,100,32,99,111,114,110,101,114,115,32,105,110,32,103,114,97,112,104,118,105,122,10,0,0,0,47,112,117,98,117,103,110,51,47,51,0,0,0,0,0,0,47,112,117,98,117,103,110,51,47,50,0,0,0,0,0,0,60,47,118,58,114,101,99,116,62,10,0,0,0,0,0,0,47,112,117,98,117,103,110,51,47,49,0,0,0,0,0,0,47,112,117,98,117,57,47,57,0,0,0,0,0,0,0,0,32,32,32,32,32,32,32,32,99,117,
-114,114,101,110,116,100,105,99,116,32,101,110,100,32,100,101,102,105,110,101,102,111,110,116,0,0,0,0,0,0,79,115,108,97,115,104,0,0,98,108,97,99,107,0,0,0,47,112,117,98,117,57,47,56,0,0,0,0,0,0,0,0,102,105,120,101,100,115,105,122,101,0,0,0,0,0,0,0,108,105,103,104,116,115,97,108,109,111,110,0,0,0,0,0,71,82,65,68,73,69,78,84,65,78,71,76,69,0,0,0,48,0,0,0,0,0,0,0,47,112,117,98,117,57,47,55,0,0,0,0,0,0,0,0,47,112,117,98,117,57,47,54,0,0,0,0,0,0,0,0,98,117,102,102,101,114,32,101,114,114,111,114,0,0,0,0,
-47,112,117,98,117,57,47,53,0,0,0,0,0,0,0,0,47,98,114,98,103,49,48,47,49,48,0,0,0,0,0,0,60,105,109,97,103,101,32,120,108,105,110,107,58,104,114,101,102,61,34,0,0,0,0,0,47,112,117,98,117,57,47,52,0,0,0,0,0,0,0,0,47,112,117,98,117,57,47,51,0,0,0,0,0,0,0,0,37,115,32,71,78,85,32,112,105,99,32,115,117,112,112,111,114,116,115,32,97,32,98,111,120,114,97,100,32,118,97,114,105,97,98,108,101,32,116,111,32,100,114,97,119,32,98,111,120,101,115,32,119,105,116,104,32,114,111,117,110,100,101,100,32,99,111,114,110,
-101,114,115,59,32,68,87,66,32,97,110,100,32,49,48,116,104,32,69,100,46,32,100,111,32,110,111,116,10,0,0,0,0,0,0,47,112,117,98,117,57,47,50,0,0,0,0,0,0,0,0,47,112,117,98,117,57,47,49,0,0,0,0,0,0,0,0,110,111,110,101,0,0,0,0,60,47,99,101,110,116,101,114,62,60,47,118,58,116,101,120,116,98,111,120,62,10,0,0,47,112,117,98,117,56,47,56,0,0,0,0,0,0,0,0,47,112,117,98,117,56,47,55,0,0,0,0,0,0,0,0,32,32,32,32,32,32,32,32,47,69,110,99,111,100,105,110,103,32,69,110,99,111,100,105,110,103,86,101,99,116,111,114,
-32,100,101,102,0,0,0,0,79,109,105,99,114,111,110,0,35,102,56,102,56,102,56,0,47,112,117,98,117,56,47,54,0,0,0,0,0,0,0,0,100,105,115,116,111,114,116,105,111,110,0,0,0,0,0,0,108,105,103,104,116,112,105,110,107,0,0,0,0,0,0,0,72,69,73,71,72,84,0,0,116,97,105,108,108,97,98,101,108,0,0,0,0,0,0,0,47,112,117,98,117,56,47,53,0,0,0,0,0,0,0,0,69,68,95,116,111,95,118,105,114,116,40,101,41,32,61,61,32,78,85,76,76,0,0,0,47,112,117,98,117,56,47,52,0,0,0,0,0,0,0,0,47,112,117,98,117,56,47,51,0,0,0,0,0,0,0,0,47,98,
-114,98,103,49,48,47,49,0,0,0,0,0,0,0,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,10,0,47,112,117,98,117,56,47,50,0,0,0,0,0,0,0,0,47,112,117,98,117,56,47,49,0,0,0,0,0,0,0,0,47,112,117,98,117,55,47,55,0,0,0,0,0,0,0,0,97,114,114,111,119,104,101,97,100,32,61,32,55,32,37,115,32,110,111,116,32,117,115,101,100,32,98,121,32,103,114,97,112,104,118,105,122,10,0,0,47,112,117,98,117,55,47,54,0,0,0,0,0,0,0,0,34,62,60,99,101,110,116,101,114,62,0,0,0,0,0,0,
-47,112,117,98,117,55,47,53,0,0,0,0,0,0,0,0,47,112,117,98,117,55,47,52,0,0,0,0,0,0,0,0,32,32,32,32,32,32,32,32,125,32,102,111,114,97,108,108,0,0,0,0,0,0,0,0,79,109,101,103,97,0,0,0,35,49,48,49,48,49,48,0,32,37,100,0,0,0,0,0,47,112,117,98,117,55,47,51,0,0,0,0,0,0,0,0,115,107,101,119,0,0,0,0,108,105,103,104,116,103,114,101,121,0,0,0,0,0,0,0,82,79,87,83,80,65,78,32,118,97,108,117,101,32,99,97,110,110,111,116,32,98,101,32,48,32,45,32,105,103,110,111,114,101,100,10,0,0,0,0,104,101,97,100,108,97,98,101,
-108,0,0,0,0,0,0,0,47,112,117,98,117,55,47,50,0,0,0,0,0,0,0,0,114,101,99,116,46,98,111,117,110,100,97,114,121,91,51,93,32,60,32,73,78,84,95,77,65,88,0,0,0,0,0,0,47,112,117,98,117,55,47,49,0,0,0,0,0,0,0,0,47,112,117,98,117,54,47,54,0,0,0,0,0,0,0,0,47,98,108,117,101,115,57,47,57,0,0,0,0,0,0,0,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,46,49,102,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,10,32,37,100,32,37,115,10,0,0,0,0,0,0,0,47,112,
-117,98,117,54,47,53,0,0,0,0,0,0,0,0,100,101,108,116,97,32,60,61,32,48,120,70,70,70,70,0,47,112,117,98,117,54,47,52,0,0,0,0,0,0,0,0,47,112,117,98,117,54,47,51,0,0,0,0,0,0,0,0,37,115,32,97,114,114,111,119,104,101,97,100,32,105,115,32,117,110,100,101,102,105,110,101,100,32,105,110,32,68,87,66,32,50,44,32,105,110,105,116,105,97,108,108,121,32,49,32,105,110,32,103,112,105,99,44,32,50,32,105,110,32,49,48,116,104,32,69,100,105,116,105,111,110,10,0,0,0,0,0,47,112,117,98,117,54,47,50,0,0,0,0,0,0,0,0,99,111,
-108,111,114,58,35,37,48,50,120,37,48,50,120,37,48,50,120,59,0,0,0,0,114,101,100,0,0,0,0,0,47,112,117,98,117,54,47,49,0,0,0,0,0,0,0,0,47,112,117,98,117,53,47,53,0,0,0,0,0,0,0,0,32,32,32,32,32,32,32,32,123,32,49,32,105,110,100,101,120,32,47,70,73,68,32,110,101,32,123,32,100,101,102,32,125,123,32,112,111,112,32,112,111,112,32,125,32,105,102,101,108,115,101,0,0,0,0,0,79,103,114,97,118,101,0,0,35,102,48,102,48,102,48,0,47,112,117,98,117,53,47,52,0,0,0,0,0,0,0,0,112,101,114,105,112,104,101,114,105,101,
-115,0,0,0,0,0,108,105,103,104,116,103,114,101,101,110,0,0,0,0,0,0,82,79,87,83,80,65,78,0,108,97,98,101,108,0,0,0,47,112,117,98,117,53,47,51,0,0,0,0,0,0,0,0,47,112,117,98,117,53,47,50,0,0,0,0,0,0,0,0,47,112,117,98,117,53,47,49,0,0,0,0,0,0,0,0,47,98,108,117,101,115,57,47,56,0,0,0,0,0,0,0,125,10,0,0,0,0,0,0,47,112,117,98,117,52,47,52,0,0,0,0,0,0,0,0,114,116,112,45,62,115,112,108,105,116,46,80,97,114,116,105,116,105,111,110,115,91,48,93,46,99,111,117,110,116,91,48,93,32,43,32,114,116,112,45,62,115,112,
-108,105,116,46,80,97,114,116,105,116,105,111,110,115,91,48,93,46,99,111,117,110,116,91,49,93,32,61,61,32,78,79,68,69,67,65,82,68,32,43,32,49,0,0,0,69,114,114,111,114,32,100,117,114,105,110,103,32,99,111,110,118,101,114,115,105,111,110,32,116,111,32,34,85,84,70,45,56,34,46,32,32,81,117,105,116,105,110,103,46,10,0,0,47,112,117,98,117,52,47,51,0,0,0,0,0,0,0,0,49,48,48,48,48,0,0,0,47,112,117,98,117,52,47,50,0,0,0,0,0,0,0,0,37,115,32,97,114,114,111,119,104,101,97,100,32,104,97,115,32,110,111,32,109,101,
-97,110,105,110,103,32,105,110,32,68,87,66,32,50,44,32,97,114,114,111,119,104,101,97,100,32,61,32,55,32,109,97,107,101,115,32,102,105,108,108,101,100,32,97,114,114,111,119,104,101,97,100,115,32,105,110,32,103,112,105,99,32,97,110,100,32,105,110,32,49,48,116,104,32,69,100,105,116,105,111,110,10,0,0,0,0,0,0,0,0,68,111,119,110,0,0,0,0,47,112,117,98,117,52,47,49,0,0,0,0,0,0,0,0,99,111,108,111,114,58,37,115,59,0,0,0,0,0,0,0,47,112,117,98,117,51,47,51,0,0,0,0,0,0,0,0,32,45,100,97,115,104,32,50,0,0,0,0,0,
-0,0,0,47,112,117,98,117,51,47,50,0,0,0,0,0,0,0,0,32,32,32,32,32,32,32,32,100,117,112,32,100,117,112,32,102,105,110,100,102,111,110,116,32,100,117,112,32,108,101,110,103,116,104,32,100,105,99,116,32,98,101,103,105,110,0,0,79,99,105,114,99,0,0,0,35,101,48,101,48,101,48,0,47,112,117,98,117,51,47,49,0,0,0,0,0,0,0,0,115,105,100,101,115,0,0,0,108,105,103,104,116,103,114,97,121,0,0,0,0,0,0,0,68,65,83,72,69,68,0,0,102,97,108,115,101,0,0,0,47,112,114,103,110,57,47,57,0,0,0,0,0,0,0,0,47,112,114,103,110,57,
-47,56,0,0,0,0,0,0,0,0,47,98,108,117,101,115,57,47,55,0,0,0,0,0,0,0,47,112,114,103,110,57,47,55,0,0,0,0,0,0,0,0,110,101,101,100,32,100,105,99,116,105,111,110,97,114,121,0,32,32,125,10,0,0,0,0,47,112,114,103,110,57,47,54,0,0,0,0,0,0,0,0,91,94,91,58,97,108,110,117,109,58,93,95,93,0,0,0,110,111,112,49,0,0,0,0,47,112,114,103,110,57,47,53,0,0,0,0,0,0,0,0,47,112,114,103,110,57,47,52,0,0,0,0,0,0,0,0,88,32,101,108,115,101,32,90,10,9,100,101,102,105,110,101,32,115,101,116,102,105,108,108,118,97,108,32,89,32,
-102,105,108,108,118,97,108,32,61,32,89,59,10,9,100,101,102,105,110,101,32,98,111,108,100,32,89,32,89,59,10,9,100,101,102,105,110,101,32,102,105,108,108,101,100,32,89,32,102,105,108,108,32,89,59,10,90,10,0,0,0,0,0,0,0,0,47,112,114,103,110,57,47,51,0,0,0,0,0,0,0,0,32,102,111,110,116,45,115,105,122,101,58,32,37,46,50,102,112,116,59,0,0,0,0,0,112,108,97,105,110,58,100,111,116,0,0,0,0,0,0,0,99,97,110,110,111,116,32,109,97,108,108,111,99,32,100,113,46,112,110,108,115,0,0,0,47,112,114,103,110,57,47,50,0,
-0,0,0,0,0,0,0,47,112,114,103,110,57,47,49,0,0,0,0,0,0,0,0,102,97,108,115,101,0,0,0,47,115,116,97,114,110,101,116,73,83,79,32,123,0,0,0,79,97,99,117,116,101,0,0,100,121,110,97,109,105,99,32,108,111,97,100,105,110,103,32,110,111,116,32,97,118,97,105,108,97,98,108,101,10,0,0,35,101,56,101,56,101,56,0,97,114,105,97,108,0,0,0,47,112,114,103,110,56,47,56,0,0,0,0,0,0,0,0,112,101,110,119,105,100,116,104,0,0,0,0,0,0,0,0,108,105,103,104,116,103,111,108,100,101,110,114,111,100,121,101,108,108,111,119,0,0,0,
-0,68,79,84,84,69,68,0,0,105,110,118,105,115,0,0,0,47,112,114,103,110,56,47,55,0,0,0,0,0,0,0,0,101,0,0,0,0,0,0,0,65,103,101,100,103,101,105,110,102,111,95,116,0,0,0,0,105,110,32,114,111,117,116,101,115,112,108,105,110,101,115,44,32,80,114,111,117,116,101,115,112,108,105,110,101,32,102,97,105,108,101,100,10,0,0,0,66,69,71,73,78,0,0,0,111,98,106,101,99,116,115,10,0,0,0,0,0,0,0,0,47,98,108,117,101,115,57,47,54,0,0,0,0,0,0,0,47,112,114,103,110,56,47,54,0,0,0,0,0,0,0,0,116,97,105,108,112,111,114,116,0,
-0,0,0,0,0,0,0,97,100,100,95,116,114,101,101,95,101,100,103,101,58,32,101,109,112,116,121,32,111,117,116,101,100,103,101,32,108,105,115,116,10,0,0,0,0,0,0,38,97,109,112,59,0,0,0,83,101,116,116,105,110,103,32,117,112,32,115,112,114,105,110,103,32,109,111,100,101,108,58,32,0,0,0,0,0,0,0,47,112,114,103,110,56,47,53,0,0,0,0,0,0,0,0,104,101,97,100,112,111,114,116,0,0,0,0,0,0,0,0,47,112,114,103,110,56,47,52,0,0,0,0,0,0,0,0,32,32,32,32,116,101,120,116,117,114,101,32,73,109,97,103,101,84,101,120,116,117,114,
-101,32,123,32,117,114,108,32,34,37,115,34,32,125,10,0,0,99,108,117,115,116,101,114,0,47,97,99,99,101,110,116,52,47,51,0,0,0,0,0,0,83,101,116,116,105,110,103,32,105,110,105,116,105,97,108,32,112,111,115,105,116,105,111,110,115,0,0,0,0,0,0,0,99,108,117,115,116,101,114,0,65,103,114,97,112,104,105,110,102,111,95,116,0,0,0,0,47,112,114,103,110,56,47,51,0,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,84,82,0,0,0,0,0,0,47,112,114,103,110,56,47,50,0,0,0,0,0,0,0,0,9,37,115,9,115,111,114,114,121,44,32,116,104,101,32,103,
-114,111,102,102,32,102,111,108,107,115,32,99,104,97,110,103,101,100,32,103,112,105,99,59,32,115,101,110,100,32,97,110,121,32,99,111,109,112,108,97,105,110,116,32,116,111,32,116,104,101,109,59,10,0,0,0,85,110,104,97,110,100,108,101,100,32,97,100,106,117,115,116,32,111,112,116,105,111,110,32,37,115,10,0,0,0,0,0,47,112,114,103,110,56,47,49,0,0,0,0,0,0,0,0,98,101,122,45,62,101,102,108,97,103,0,0,0,0,0,0,102,111,110,116,45,115,116,121,108,101,58,32,37,115,59,0,103,114,97,112,104,0,0,0,47,112,114,103,110,
-55,47,55,0,0,0,0,0,0,0,0,47,112,114,103,110,55,47,54,0,0,0,0,0,0,0,0,37,32,83,101,116,32,117,112,32,73,83,79,32,76,97,116,105,110,32,49,32,99,104,97,114,97,99,116,101,114,32,101,110,99,111,100,105,110,103,0,79,69,108,105,103,0,0,0,115,111,109,101,32,110,111,100,101,115,32,119,105,116,104,32,109,97,114,103,105,110,32,40,37,46,48,50,102,44,37,46,48,50,102,41,32,116,111,117,99,104,32,45,32,102,97,108,108,105,110,103,32,98,97,99,107,32,116,111,32,115,116,114,97,105,103,104,116,32,108,105,110,101,32,101,
-100,103,101,115,10,0,0,0,0,0,0,0,35,51,48,51,48,51,48,0,47,112,114,103,110,55,47,53,0,0,0,0,0,0,0,0,120,108,97,98,101,108,0,0,108,105,103,104,116,99,121,97,110,0,0,0,0,0,0,0,73,78,86,73,83,0,0,0,45,45,0,0,0,0,0,0,97,122,117,114,101,0,0,0,47,112,114,103,110,55,47,52,0,0,0,0,0,0,0,0,47,112,114,103,110,55,47,51,0,0,0,0,0,0,0,0,47,112,114,103,110,55,47,50,0,0,0,0,0,0,0,0,47,98,108,117,101,115,57,47,53,0,0,0,0,0,0,0,32,32,32,32,125,10,0,0,65,103,114,97,112,104,105,110,102,111,95,116,0,0,0,0,47,112,114,
-103,110,55,47,49,0,0,0,0,0,0,0,0,93,0,0,0,0,0,0,0,47,112,114,103,110,54,47,54,0,0,0,0,0,0,0,0,47,112,114,103,110,54,47,53,0,0,0,0,0,0,0,0,9,37,115,9,105,110,115,116,97,108,108,32,97,32,109,111,114,101,32,114,101,99,101,110,116,32,118,101,114,115,105,111,110,32,111,102,32,103,112,105,99,32,111,114,32,115,119,105,116,99,104,32,116,111,32,68,87,66,32,111,114,32,49,48,116,104,32,69,100,105,116,105,111,110,32,112],"i8",L,l.J+81956);D([105,99,59,10,0,0,0,0,0,0,0,0,76,97,121,111,117,116,32,119,97,115,32,
-110,111,116,32,100,111,110,101,10,0,0,0,0,110,45,62,98,114,97,110,99,104,91,105,93,46,99,104,105,108,100,0,0,0,0,0,0,127,114,111,111,116,0,0,0,47,112,114,103,110,54,47,52,0,0,0,0,0,0,0,0,102,111,110,116,45,115,116,114,101,116,99,104,58,32,37,115,59,0,0,0,0,0,0,0,47,112,114,103,110,54,47,51,0,0,0,0,0,0,0,0,69,100,103,101,32,108,101,110,103,116,104,32,37,102,32,108,97,114,103,101,114,32,116,104,97,110,32,109,97,120,105,109,117,109,32,37,117,32,97,108,108,111,119,101,100,46,10,67,104,101,99,107,32,102,
-111,114,32,111,118,101,114,119,105,100,101,32,110,111,100,101,40,115,41,46,10,0,0,0,0,0,99,97,110,110,111,116,32,99,111,109,112,105,108,101,32,114,101,103,117,108,97,114,32,101,120,112,114,101,115,115,105,111,110,32,37,115,0,0,0,0,47,112,114,103,110,54,47,50,0,0,0,0,0,0,0,0,32,93,32,32,37,100,32,102,97,108,115,101,32,37,115,10,0,0,0,0,0,0,0,0,69,110,99,111,100,105,110,103,86,101,99,116,111,114,32,52,53,32,47,104,121,112,104,101,110,32,112,117,116,0,0,0,78,117,0,0,0,0,0,0,35,102,99,102,99,102,99,0,
-32,105,110,32,108,105,110,101,32,37,100,32,110,101,97,114,32,39,0,0,0,0,0,0,47,112,114,103,110,54,47,49,0,0,0,0,0,0,0,0,102,111,110,116,99,111,108,111,114,0,0,0,0,0,0,0,108,105,103,104,116,99,111,114,97,108,0,0,0,0,0,0,73,78,86,73,83,73,66,76,69,0,0,0,0,0,0,0,45,62,0,0,0,0,0,0,47,112,114,103,110,53,47,53,0,0,0,0,0,0,0,0,115,101,116,108,105,110,101,119,105,100,116,104,0,0,0,0,65,103,101,100,103,101,105,110,102,111,95,116,0,0,0,0,47,112,114,103,110,53,47,52,0,0,0,0,0,0,0,0,115,117,114,112,114,105,115,
-101,10,0,0,0,0,0,0,0,47,112,114,103,110,53,47,51,0,0,0,0,0,0,0,0,47,98,108,117,101,115,57,47,52,0,0,0,0,0,0,0,32,32,32,32,32,32,32,32,100,105,102,102,117,115,101,67,111,108,111,114,32,49,32,49,32,49,10,0,0,0,0,0,47,112,114,103,110,53,47,50,0,0,0,0,0,0,0,0,47,112,114,103,110,53,47,49,0,0,0,0,0,0,0,0,47,112,114,103,110,52,47,52,0,0,0,0,0,0,0,0,9,37,115,32,105,102,32,121,111,117,32,117,115,101,32,103,112,105,99,32,97,110,100,32,105,116,32,98,97,114,102,115,32,111,110,32,101,110,99,111,117,110,116,101,
-114,105,110,103,32,34,115,111,108,105,100,34,44,10,0,0,0,0,0,0,47,112,114,103,110,52,47,51,0,0,0,0,0,0,0,0,102,111,110,116,45,119,101,105,103,104,116,58,32,37,115,59,0,0,0,0,0,0,0,0,47,112,114,103,110,52,47,50,0,0,0,0,0,0,0,0,47,112,114,103,110,52,47,49,0,0,0,0,0,0,0,0,73,83,79,76,97,116,105,110,49,69,110,99,111,100,105,110,103,32,48,32,50,53,53,32,103,101,116,105,110,116,101,114,118,97,108,32,112,117,116,105,110,116,101,114,118,97,108,0,78,116,105,108,100,101,0,0,35,56,48,56,48,56,48,0,47,112,114,
-103,110,51,47,51,0,0,0,0,0,0,0,0,102,111,110,116,110,97,109,101,0,0,0,0,0,0,0,0,108,105,103,104,116,98,108,117,101,0,0,0,0,0,0,0,83,79,76,73,68,0,0,0,98,122,46,115,105,122,101,32,37,32,51,32,61,61,32,49,0,0,0,0,0,0,0,0,47,112,114,103,110,51,47,50,0,0,0,0,0,0,0,0,47,112,114,103,110,51,47,49,0,0,0,0,0,0,0,0,47,112,114,103,110,49,49,47,57,0,0,0,0,0,0,0,47,98,108,117,101,115,57,47,51,0,0,0,0,0,0,0,112,97,114,116,105,97,108,32,99,104,97,114,97,99,116,101,114,0,0,0,0,0,0,0,32,32,32,32,32,32,97,109,98,105,
-101,110,116,73,110,116,101,110,115,105,116,121,32,48,46,51,51,10,0,0,0,0,47,112,114,103,110,49,49,47,56,0,0,0,0,0,0,0,47,112,114,103,110,49,49,47,55,0,0,0,0,0,0,0,47,112,114,103,110,49,49,47,54,0,0,0,0,0,0,0,105,102,32,102,105,108,108,118,97,108,32,62,32,48,46,52,32,116,104,101,110,32,88,10,9,100,101,102,105,110,101,32,115,101,116,102,105,108,108,118,97,108,32,89,32,102,105,108,108,118,97,108,32,61,32,49,32,45,32,89,59,10,9,100,101,102,105,110,101,32,98,111,108,100,32,89,32,116,104,105,99,107,110,
-101,115,115,32,50,32,89,59,10,0,0,0,0,47,112,114,103,110,49,49,47,53,0,0,0,0,0,0,0,102,111,110,116,45,102,97,109,105,108,121,58,32,39,37,115,39,59,0,0,0,0,0,0,47,112,114,103,110,49,49,47,52,0,0,0,0,0,0,0,99,109,97,112,120,95,110,112,58,109,97,112,0,0,0,0,47,112,114,103,110,49,49,47,51,0,0,0,0,0,0,0,32,69,110,99,111,100,105,110,103,86,101,99,116,111,114,32,48,0,0,0,0,0,0,0,77,117,0,0,0,0,0,0,115,116,97,114,0,0,0,0,47,112,114,103,110,49,49,47,50,0,0,0,0,0,0,0,102,111,110,116,115,105,122,101,0,0,0,0,
-0,0,0,0,108,101,109,111,110,99,104,105,102,102,111,110,0,0,0,0,73,108,108,101,103,97,108,32,118,97,108,117,101,32,37,115,32,102,111,114,32,83,84,89,76,69,32,45,32,105,103,110,111,114,101,100,10,0,0,0,98,122,46,115,105,122,101,32,62,32,48,0,0,0,0,0,47,112,114,103,110,49,49,47,49,49,0,0,0,0,0,0,47,112,114,103,110,49,49,47,49,48,0,0,0,0,0,0,47,112,114,103,110,49,49,47,49,0,0,0,0,0,0,0,47,98,108,117,101,115,57,47,50,0,0,0,0,0,0,0,32,32,32,32,109,97,116,101,114,105,97,108,32,77,97,116,101,114,105,97,108,
-32,123,10,0,0,0,0,0,0,0,0,47,112,114,103,110,49,48,47,57,0,0,0,0,0,0,0,103,105,102,58,102,105,103,0,47,112,114,103,110,49,48,47,56,0,0,0,0,0,0,0,47,112,114,103,110,49,48,47,55,0,0,0,0,0,0,0,37,115,32,71,78,85,32,112,105,99,32,118,115,46,32,49,48,116,104,32,69,100,105,116,105,111,110,32,100,92,40,101,39,116,101,110,116,101,10,0,47,112,114,103,110,49,48,47,54,0,0,0,0,0,0,0,60,118,58,116,101,120,116,98,111,120,32,105,110,115,101,116,61,34,48,44,48,44,48,44,48,34,32,115,116,121,108,101,61,34,112,111,
-115,105,116,105,111,110,58,97,98,115,111,108,117,116,101,59,32,118,45,116,101,120,116,45,119,114,97,112,112,105,110,103,58,39,102,97,108,115,101,39,59,112,97,100,100,105,110,103,58,39,48,39,59,0,0,0,0,0,0,0,47,112,114,103,110,49,48,47,53,0,0,0,0,0,0,0,47,112,114,103,110,49,48,47,52,0,0,0,0,0,0,0,47,69,110,99,111,100,105,110,103,86,101,99,116,111,114,32,50,53,54,32,97,114,114,97,121,32,100,101,102,0,0,0,76,97,109,98,100,97,0,0,77,114,101,99,111,114,100,0,47,112,114,103,110,49,48,47,51,0,0,0,0,0,0,
-0,115,116,121,108,101,0,0,0,108,97,119,110,103,114,101,101,110,0,0,0,0,0,0,0,65,68,73,65,76,0,0,0,115,112,108,45,62,115,105,122,101,32,62,32,48,0,0,0,47,112,114,103,110,49,48,47,50,0,0,0,0,0,0,0,47,112,114,103,110,49,48,47,49,48,0,0,0,0,0,0,47,112,114,103,110,49,48,47,49,0,0,0,0,0,0,0,105,110,115,117,102,102,105,99,105,101,110,116,32,109,101,109,111,114,121,0,0,0,0,0,47,98,108,117,101,115,57,47,49,0,0,0,0,0,0,0,32,32,97,112,112,101,97,114,97,110,99,101,32,65,112,112,101,97,114,97,110,99,101,32,123,
-10,0,0,0,0,0,0,47,112,105,121,103,57,47,57,0,0,0,0,0,0,0,0,47,112,105,121,103,57,47,56,0,0,0,0,0,0,0,0,47,112,105,121,103,57,47,55,0,0,0,0,0,0,0,0,114,101,115,101,116,32,37,115,32,115,101,116,32,116,111,32,107,110,111,119,110,32,115,116,97,116,101,10,0,0,0,0,47,112,105,121,103,57,47,54,0,0,0,0,0,0,0,0,32,115,116,114,111,107,101,100,61,34,102,97,108,115,101,34,32,102,105,108,108,101,100,61,34,102,97,108,115,101,34,62,10,0,0,0,0,0,0,0,47,112,105,121,103,57,47,53,0,0,0,0,0,0,0,0,100,111,116,0,0,0,0,
-0,47,112,105,121,103,57,47,52,0,0,0,0,0,0,0,0,109,97,114,107,0,0,0,0,75,97,112,112,97,0,0,0,114,101,99,111,114,100,0,0,47,112,105,121,103,57,47,51,0,0,0,0,0,0,0,0,102,105,108,108,99,111,108,111,114,0,0,0,0,0,0,0,108,97,118,101,110,100,101,114,98,108,117,115,104,0,0,0,79,85,78,68,69,68,0,0,115,101,116,108,105,110,101,119,105,100,116,104,0,49,0,0,47,112,105,121,103,57,47,50,0,0,0,0,0,0,0,0,47,112,105,121,103,57,47,49,0,0,0,0,0,0,0,0,109,101,114,103,101,95,111,110,101,119,97,121,32,103,108,105,116,99,
-104,10,0,0,0,0,47,112,105,121,103,56,47,56,0,0,0,0,0,0,0,0,47,98,108,117,101,115,56,47,56,0,0,0,0,0,0,0,83,104,97,112,101,32,123,10,0,0,0,0,0,0,0,0,47,112,105,121,103,56,47,55,0,0,0,0,0,0,0,0,47,112,105,121,103,56,47,54,0,0,0,0,0,0,0,0,47,112,105,121,103,56,47,53,0,0,0,0,0,0,0,0,105,102,32,98,111,120,114,97,100,32,62,32,49,46,48,32,38,38,32,100,97,115,104,119,105,100,32,60,32,48,46,48,55,53,32,116,104,101,110,32,88,10,9,102,105,108,108,118,97,108,32,61,32,49,59,10,9,100,101,102,105,110,101,32,102,
-105,108,108,32,89,32,89,59,10,9,100,101,102,105,110,101,32,115,111,108,105,100,32,89,32,89,59,10,9,100,101,102,105,110,101,32,114,101,115,101,116,32,89,32,115,99,97,108,101,61,49,46,48,32,89,59,10,88,10,0,0,0,0,47,112,105,121,103,56,47,52,0,0,0,0,0,0,0,0,60,118,58,114,101,99,116,32,115,116,121,108,101,61,34,112,111,115,105,116,105,111,110,58,97,98,115,111,108,117,116,101,59,32,0,0,0,0,0,0,47,112,105,121,103,56,47,51,0,0,0,0,0,0,0,0,47,112,105,121,103,56,47,50,0,0,0,0,0,0,0,0,47,115,101,116,117,112,
-76,97,116,105,110,49,32,123,0,0,73,117,109,108,0,0,0,0,108,112,114,111,109,111,116,101,114,0,0,0,0,0,0,0,47,112,105,121,103,56,47,49,0,0,0,0,0,0,0,0,99,111,108,111,114,0,0,0,32,37,115,10,0,0,0,0,108,97,118,101,110,100,101,114,0,0,0,0,0,0,0,0,32,44,0,0,0,0,0,0,115,111,108,105,100,0,0,0,47,112,105,121,103,55,47,55,0,0,0,0,0,0,0,0,47,98,108,117,101,115,56,47,55,0,0,0,0,0,0,0,47,112,105,121,103,55,47,54,0,0,0,0,0,0,0,0,114,101,99,116,46,98,111,117,110,100,97,114,121,91,50,93,32,60,32,73,78,84,95,77,65,
-88,0,0,0,0,0,0,47,112,105,121,103,55,47,53,0,0,0,0,0,0,0,0,110,0,0,0,0,0,0,0,47,112,105,121,103,55,47,52,0,0,0,0,0,0,0,0,47,112,105,121,103,55,47,51,0,0,0,0,0,0,0,0,65,103,101,100,103,101,105,110,102,111,95,116,0,0,0,0,47,112,105,121,103,55,47,50,0,0,0,0,0,0,0,0,37,115,32,68,87,66,32,50,32,99,111,109,112,97,116,105,98,105,108,105,116,121,32,100,101,102,105,110,105,116,105,111,110,115,10,0,0,0,0,0,47,112,105,121,103,55,47,49,0,0,0,0,0,0,0,0,60,47,118,58,111,118,97,108,62,10,0,0,0,0,0,0,47,112,105,
-121,103,54,47,54,0,0,0,0,0,0,0,0,109,97,103,101,110,116,97,0,47,112,105,121,103,54,47,53,0,0,0,0,0,0,0,0,73,111,116,97,0,0,0,0,68,105,110,103,98,97,116,115,0,0,0,0,0,0,0,0,65,103,114,97,112,104,105,110,102,111,95,116,0,0,0,0,114,97,114,114,111,119,0,0,47,112,105,121,103,54,47,52,0,0,0,0,0,0,0,0,115,104,97,112,101,0,0,0,107,104,97,107,105,0,0,0,73,108,108,101,103,97,108,32,118,97,108,117,101,32,37,115,32,102,111,114,32,86,65,76,73,71,78,32,45,32,105,103,110,111,114,101,100,10,0,0,84,105,109,101,115,
-45,82,111,109,97,110,0,0,0,0,0,47,112,105,121,103,54,47,51,0,0,0,0,0,0,0,0,47,112,105,121,103,54,47,50,0,0,0,0,0,0,0,0,47,112,105,121,103,54,47,49,0,0,0,0,0,0,0,0,47,98,108,117,101,115,56,47,54,0,0,0,0,0,0,0,111,98,106,0,0,0,0,0,47,112,105,121,103,53,47,53,0,0,0,0,0,0,0,0,47,112,105,121,103,53,47,52,0,0,0,0,0,0,0,0,38,35,51,57,59,0,0,0,114,116,112,45,62,115,112,108,105,116,46,80,97,114,116,105,116,105,111,110,115,91,48,93,46,112,97,114,116,105,116,105,111,110,91,105,93,32,61,61,32,48,32,124,124,32,
-114,116,112,45,62,115,112,108,105,116,46,80,97,114,116,105,116,105,111,110,115,91,48,93,46,112,97,114,116,105,116,105,111,110,91,105,93,32,61,61,32,49,0,0,0,0,0,0,0,0,47,112,105,121,103,53,47,51,0,0,0,0,0,0,0,0,37,115,32,114,101,115,101,116,32,119,111,114,107,115,32,105,110,32,103,112,105,99,32,97,110,100,32,49,48,116,104,32,101,100,105,116,105,111,110,44,32,98,117,116,32,105,115,110,39,116,32,100,101,102,105,110,101,100,32,105,110,32,68,87,66,32,50,10,0,0,0,0,115,111,117,114,99,101,0,0,47,112,105,
-121,103,53,47,50,0,0,0,0,0,0,0,0,32,119,105,100,116,104,58,32,37,46,50,102,59,32,104,101,105,103,104,116,58,32,37,46,50,102,34,0,0,0,0,0,75,80,95,85,112,0,0,0,47,112,105,121,103,53,47,49,0,0,0,0,0,0,0,0,32,45,100,97,115,104,32,53,0,0,0,0,0,0,0,0,47,112,105,121,103,52,47,52,0,0,0,0,0,0,0,0,68,111,116,68,105,99,116,32,98,101,103,105,110,0,0,0,73,103,114,97,118,101,0,0,90,97,112,102,68,105,110,103,98,97,116,115,0,0,0,0,108,97,114,114,111,119,0,0,47,112,105,121,103,52,47,51,0,0,0,0,0,0,0,0,119,105,100,
-116,104,0,0,0,105,118,111,114,121,0,0,0,73,68,68,76,69,0,0,0,101,32,33,61,32,78,85,76,76,0,0,0,0,0,0,0,112,101,110,119,105,100,116,104,0,0,0,0,0,0,0,0,47,112,105,121,103,52,47,50,0,0,0,0,0,0,0,0,47,112,105,121,103,52,47,49,0,0,0,0,0,0,0,0,47,112,105,121,103,51,47,51,0,0,0,0,0,0,0,0,47,98,108,117,101,115,56,47,53,0,0,0,0,0,0,0,103,114,101,115,116,111,114,101,10,0,0,0,0,0,0,0,105,110,102,105,110,105,116,121,0,0,0,0,0,0,0,0,47,112,105,121,103,51,47,50,0,0,0,0,0,0,0,0,91,91,58,97,108,110,117,109,58,93,
-95,93,0,0,0,0,110,111,112,0,0,0,0,0,47,112,105,121,103,51,47,49,0,0,0,0,0,0,0,0,47,112,105,121,103,49,49,47,57,0,0,0,0,0,0,0,37,115,32,68,87,66,32,50,32,100,111,101,115,110,39,116,32,117,115,101,32,102,105,108,108,32,97,110,100,32,100,111,101,115,110,39,116,32,100,101,102,105,110,101,32,102,105,108,108,118,97,108,10,0,0,0,47,112,105,121,103,49,49,47,56,0,0,0,0,0,0,0,99,97,110,111,110,58,100,111,116,0,0,0,0,0,0,0,32,108,101,102,116,58,32,37,46,50,102,59,32,116,111,112,58,32,37,46,50,102,59,0,108,105,
-98,112,97,116,104,47,37,115,58,37,100,58,32,37,115,10,0,0,0,0,0,0,47,112,105,121,103,49,49,47,55,0,0,0,0,0,0,0,103,118,119,114,105,116,101,95,110,111,95,122,32,112,114,111,98,108,101,109,32,37,100,10,0,0,0,0,0,0,0,0,47,112,105,121,103,49,49,47,54,0,0,0,0,0,0,0,47,0,0,0,0,0,0,0,47,68,111,116,68,105,99,116,32,50,48,48,32,100,105,99,116,32,100,101,102,0,0,0,73,99,105,114,99,0,0,0,109,101,100,105,117,109,0,0,114,97,110,107,0,0,0,0,114,112,114,111,109,111,116,101,114,0,0,0,0,0,0,0,91,105,110,116,101,114,
-110,97,108,32,99,111,117,114,105,101,114,93,0,0,0,0,0,0,47,112,105,121,103,49,49,47,53,0,0,0,0,0,0,0,104,101,105,103,104,116,0,0,105,110,100,105,103,111,0,0,79,80,0,0,0,0,0,0,112,101,114,105,112,104,101,114,105,101,115,0,0,0,0,0,114,45,62,98,111,117,110,100,97,114,121,91,105,93,32,60,61,32,114,45,62,98,111,117,110,100,97,114,121,91,78,85,77,68,73,77,83,32,43,32,105,93,0,0,0,0,0,0,47,112,105,121,103,49,49,47,52,0,0,0,0,0,0,0,115,0,0,0,0,0,0,0,87,97,114,110,105,110,103,58,32,110,111,100,101,32,37,115,
-44,32,112,111,115,105,116,105,111,110,32,37,115,44,32,101,120,112,101,99,116,101,100,32,116,119,111,32,102,108,111,97,116,115,10,0,0,0,0,0,105,110,32,114,111,117,116,101,115,112,108,105,110,101,115,44,32,80,115,104,111,114,116,101,115,116,112,97,116,104,32,102,97,105,108,101,100,10,0,0,69,79,70,0,0,0,0,0,37,100,32,111,98,106,115,32,37,100,32,120,108,97,98,101,108,115,32,102,111,114,99,101,61,37,100,32,98,98,61,40,37,46,48,50,102,44,37,46,48,50,102,41,32,40,37,46,48,50,102,44,37,46,48,50,102,41,10,
-0,0,0,0,0,47,112,105,121,103,49,49,47,51,0,0,0,0,0,0,0,108,105,103,104,116,103,114,101,121,0,0,0,0,0,0,0,97,100,100,95,116,114,101,101,95,101,100,103,101,58,32,109,105,115,115,105,110,103,32,116,114,101,101,32,101,100,103,101,10,0,0,0,0,0,0,0,108,97,98,101,108,115,46,99,0,0,0,0,0,0,0,0,115,116,97,114,116,61,37,115,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,119,105,116,104,32,109,111,100,101,61,115,101,108,102,32,45,32,105,103,110,111,114,101,100,10,0,0,0,0,0,0,0,0,47,112,105,121,103,
-49,49,47,50,0,0,0,0,0,0,0,47,98,108,117,101,115,56,47,52,0,0,0,0,0,0,0,97,103,100,105,99,116,111,102,58,32,117,110,107,110,111,119,110,32,107,105,110,100,32,37,100,10,0,0,0,0,0,0,117,115,101,114,95,115,104,97,112,101,95,37,100,10,0,0,37,102,0,0,0,0,0,0,47,112,105,121,103,49,49,47,49,49,0,0,0,0,0,0,58,32,37,46,50,102,32,115,101,99,10,0,0,0,0,0,47,112,105,121,103,49,49,47,49,48,0,0,0,0,0,0,71,114,97,112,104,32,37,115,32,104,97,115,32,97,114,114,97,121,32,112,97,99,107,105,110,103,32,119,105,116,104,
-32,117,115,101,114,32,118,97,108,117,101,115,32,98,117,116,32,110,111,32,34,115,111,114,116,118,34,32,97,116,116,114,105,98,117,116,101,115,32,97,114,101,32,100,101,102,105,110,101,100,46,0,0,0,0,0,0,65,103,114,97,112,104,105,110,102,111,95,116,0,0,0,0,99,111,108,103,0,0,0,0,119,101,105,103,104,116,0,0,47,97,99,99,101,110,116,52,47,50,0,0,0,0,0,0,47,112,105,121,103,49,49,47,49,0,0,0,0,0,0,0,84,65,66,76,69,0,0,0,37,115,32,102,105,108,108,32,104,97,115,32,110,111,32,109,101,97,110,105,110,103,32,105,
-110,32,68,87,66,32,50,44,32,103,112,105,99,32,99,97,110,32,117,115,101,32,102,105,108,108,32,111,114,32,102,105,108,108,101,100,44,32,49,48,116,104,32,69,100,105,116,105,111,110,32,117,115,101,115,32,102,105,108,108,32,111,110,108,121,10,0,0,0,0,0,0,65,100,106,117,115,116,105,110,103,32,37,115,32,117,115,105,110,103,32,37,115,10,0,0,47,112,105,121,103,49,48,47,57,0,0,0,0,0,0,0,99,111,109,112,111,117,110,100,46,99,0,0,0,0,0,0,32,32,60,118,58,111,118,97,108,32,115,116,121,108,101,61,34,112,111,115,
-105,116,105,111,110,58,97,98,115,111,108,117,116,101,59,0,0,0,0,0,105,100,0,0,0,0,0,0,47,112,105,121,103,49,48,47,56,0,0,0,0,0,0,0,47,112,105,121,103,49,48,47,55,0,0,0,0,0,0,0,37,37,66,101,103,105,110,80,114,111,108,111,103,0,0,0,73,97,99,117,116,101,0,0,85,82,87,32,67,104,97,110,99,101,114,121,32,76,0,0,116,104,101,32,98,111,117,110,100,105,110,103,32,98,111,120,101,115,32,111,102,32,115,111,109,101,32,110,111,100,101,115,32,116,111,117,99,104,32,45,32,102,97,108,108,105,110,103,32,98,97,99,107,
-32,116,111,32,115,116,114,97,105,103,104,116,32,108,105,110,101,32,101,100,103,101,115,10,0,0,0,115,105,103,110,97,116,117,114,101,0,0,0,0,0,0,0,47,112,105,121,103,49,48,47,54,0,0,0,0,0,0,0,109,97,114,103,105,110,0,0,105,110,100,105,97,110,114,101,100,0,0,0,0,0,0,0,79,84,84,79,77,0,0,0,112,97,103,101,100,105,114,0,97,113,117,97,109,97,114,105,110,101,0,0,0,0,0,0,47,112,105,121,103,49,48,47,53,0,0,0,0,0,0,0,47,112,105,121,103,49,48,47,52,0,0,0,0,0,0,0,47,112,105,121,103,49,48,47,51,0,0,0,0,0,0,0,47,
-98,108,117,101,115,56,47,51,0,0,0,0,0,0,0,103,115,97,118,101,32,37,103,32,37,103,32,116,114,97,110,115,108,97,116,101,32,110,101,119,112,97,116,104,10,0,0,112,105,99,0,0,0,0,0,47,112,105,121,103,49,48,47,50,0,0,0,0,0,0,0,101,110,100,32,37,115,10,0,32,91,107,101,121,61,0,0,98,98,0,0,0,0,0,0,47,112,105,121,103,49,48,47,49,48,0,0,0,0,0,0,116,97,105,108,112,111,114,116,0,0,0,0,0,0,0,0,47,112,105,121,103,49,48,47,49,0,0,0,0,0,0,0,37,115,32,102,105,108,108,118,97,108,32,105,115,32,48,46,51,32,105,110,32,
-49,48,116,104,32,69,100,105,116,105,111,110,32,40,102,105,108,108,32,48,32,109,101,97,110,115,32,98,108,97,99,107,41,44,32,48,46,53,32,105,110,32,103,112,105,99,32,40,102,105,108,108,32,48,32,109,101,97,110,115,32,119,104,105,116,101,41,44,32,117,110,100,101,102,105,110,101,100,32,105,110,32,68,87,66,32,50,10,0,0,0,115,101,97,114,99,104,115,105,122,101,0,0,0,0,0,0,47,112,97,115,116,101,108,50,56,47,56,0,0,0,0,0,120,32,101,32,34,47,62,0,110,32,38,38,32,105,32,62,61,32,48,32,38,38,32,105,32,60,32,78,
-79,68,69,67,65,82,68,0,0,0,0,0,47,112,97,115,116,101,108,50,56,47,55,0,0,0,0,0,99,111,110,116,97,105,110,95,110,111,100,101,115,32,99,108,117,115,116,32,37,115,32,114,97,110,107,32,37,100,32,109,105,115,115,105,110,103,32,110,111,100,101,10,0,0,0,0,47,77,101,100,105,97,66,111,120,0,0,0,0,0,0,0,47,112,97,115,116,101,108,50,56,47,54,0,0,0,0,0,32,93,32,32,37,100,32,116,114,117,101,32,37,115,10,0,91,32,123,67,97,116,97,108,111,103,125,32,60,60,32,47,85,82,73,32,60,60,32,47,66,97,115,101,32,40,37,115,
-41,32,62,62,32,62,62,10,47,80,85,84,32,112,100,102,109,97,114,107,10,0,0,0,71,97,109,109,97,0,0,0,90,97,112,102,67,104,97,110,99,101,114,121,45,77,101,100,105,117,109,73,116,97,108,105,99,0,0,0,0,0,0,0,97,115,115,101,109,98,108,121,0,0,0,0,0,0,0,0,58,32,0,0,0,0,0,0,47,112,97,115,116,101,108,50,56,47,53,0,0,0,0,0,103,114,97,100,105,101,110,116,97,110,103,108,101,0,0,0,104,111,116,112,105,110,107,0,37,108,102,44,37,108,102,44,37,108,102,44,37,108,102,0,87,73,68,84,72,0,0,0,66,76,0,0,0,0,0,0,99,97,110,
-110,111,116,32,114,101,97,108,108,111,99,32,111,112,115,0,0,0,0,0,0,47,112,97,115,116,101,108,50,56,47,52,0,0,0,0,0,98,111,108,100,0,0,0,0,47,112,97,115,116,101,108,50,56,47,51,0,0,0,0,0,105,110,115,116,97,108,108,95,105,110,95,114,97,110,107,44,32,108,105,110,101,32,37,100,58,32,71,68,95,114,97,110,107,40,103,41,91,37,100,93,46,118,32,43,32,78,68,95,111,114,100,101,114,40,37,115,41,32,91,37,100,93,32,62,32,71,68,95,114,97,110,107,40,103,41,91,37,100,93,46,97,118,32,43,32,71,68,95,114,97,110,107,
-40,82,111,111,116,41,91,37,100,93,46,97,110,32,91,37,100,93,10,0,65,103,114,97,112,104,105,110,102,111,95,116,0,0,0,0,47,112,97,115,116,101,108,50,56,47,50,0,0,0,0,0,47,98,108,117,101,115,56,47,50,0,0,0,0,0,0,0,93,32,32,37,100,32,102,97,108,115,101,32,37,115,10,0,47,112,97,115,116,101,108,50,56,47,49,0,0,0,0,0,47,112,97,115,116,101,108,50,55,47,55,0,0,0,0,0,47,112,97,115,116,101,108,50,55,47,54,0,0,0,0,0,37,115,32,100,97,115,104,119,105,100,32,105,115,32,48,46,49,32,105,110,32,49,48,116,104,32,69,
-100,105,116,105,111,110,44,32,48,46,48,53,32,105,110,32,68,87,66,32,50,32,97,110,100,32,105,110,32,103,112,105,99,10,0,0,0,47,112,97,115,116,101,108,50,55,47,53,0,0,0,0,0,108,32,0,0,0,0,0,0,47,112,97,115,116,101,108,50,55,47,52,0,0,0,0,0,47,112,97,115,116,101,108,50,55,47,51,0,0,0,0,0,115,101,116,117,112,76,97,116,105,110,49,10,0,0,0,0,69,117,109,108,0,0,0,0,84,105,109,101,115,45,82,111,109,97,110,0,0,0,0,0,110,111,118,101,114,104,97,110,103,0,0,0,0,0,0,0,109,101,109,111,114,121,32,97,108,108,111,
-99,97,116,105,111,110,32,102,97,105,108,117,114,101,0,0,0,0,0,0,0,47,112,97,115,116,101,108,50,55,47,50,0,0,0,0,0,111,114,100,101,114,105,110,103,0,0,0,0,0,0,0,0,37,108,102,44,37,108,102,0,119,105,100,116,104,0,0,0,104,111,110,101,121,100,101,119,0,0,0,0,0,0,0,0,112,97,100,0,0,0,0,0,47,112,97,115,116,101,108,50,55,47,49,0,0,0,0,0,47,112,97,115,116,101,108,50,54,47,54,0,0,0,0,0,47,112,97,115,116,101,108,50,54,47,53,0,0,0,0,0,47,98,108,117,101,115,56,47,49,0,0,0,0,0,0,0,117,110,99,108,111,115,101,100,
-32,116,111,107,101,110,0,0,93,32,32,37,100,32,116,114,117,101,32,37,115,10,0,0,47,112,97,115,116,101,108,50,54,47,52,0,0,0,0,0,47,112,97,115,116,101,108,50,54,47,51,0,0,0,0,0,47,112,97,115,116,101,108,50,54,47,50,0,0,0,0,0,37,115,32,98,111,120,114,97,100,32,105,115,32,110,111,119,32,48,46,48,32,105,110,32,103,112,105,99,44,32,101,108,115,101,32,105,116,32,114,101,109,97,105,110,115,32,50,46,48,10,0,0,0,0,0,0,47,112,97,115,116,101,108,50,54,47,49,0,0,0,0,0,37,46,48,102,32,37,46,48,102,32,0,0,0,0,0,
-0,47,112,97,115,116,101,108,50,53,47,53,0,0,0,0,0,47,112,97,115,116,101,108,50,53,47,52,0,0,0,0,0,37,37,69,110,100,67,111,109,109,101,110,116,115,10,115,97,118,101,10,0,0,0,0,0,69,116,97,0,0,0,0,0,84,105,109,101,115,45,73,116,97,108,105,99,0,0,0,0,105,109,97,112,95,110,112,58,109,97,112,0,0,0,0,0,116,104,114,101,101,112,111,118,101,114,104,97,110,103,0,0,47,112,97,115,116,101,108,50,53,47,51,0,0,0,0,0,114,101,115,111,108,117,116,105,111,110,0,0,0,0,0,0,115,99,97,108,101,32,61,32,40,37,102,44,37,102,
-41,10,0,0,0,0,0,0,0,0,116,97,105,108,95,108,112,0,118,97,108,105,103,110,0,0,103,114,101,121,0,0,0,0,37,108,102,44,37,108,102,0,47,112,97,115,116,101,108,50,53,47,50,0,0,0,0,0,47,112,97,115,116,101,108,50,53,47,49,0,0,0,0,0,47,112,97,115,116,101,108,50,52,47,52,0,0,0,0,0,47,98,108,117,101,115,55,47,55,0,0,0,0,0,0,0,37,103,32,37,103,32,0,0,47,112,97,115,116,101,108,50,52,47,51,0,0,0,0,0,112,110,103,58,102,105,103,0,47,112,97,115,116,101,108,50,52,47,50,0,0,0,0,0,47,112,97,115,116,101,108,50,52,47,
-49,0,0,0,0,0,115,99,97,108,101,61,49,46,48,32,37,115,32,114,101,113,117,105,114,101,100,32,102,111,114,32,99,111,109,112,97,114,105,115,111,110,115,10,0,0,47,112,97,115,116,101,108,50,51,47,51,0,0,0,0,0,32,102,105,108,108,101,100,61,34,102,97,108,115,101,34,32,0,0,0,0,0,0,0,0,47,112,97,115,116,101,108,50,51,47,50,0,0,0,0,0,47,112,97,115,116,101,108,50,51,47,49,0,0,0,0,0,9,0,0,0,0,0,0,0,37,37,37,37,66,111,117,110,100,105,110,103,66,111,120,58,32,37,100,32,37,100,32,37,100,32,37,100,10,0,0,0,69,112,
-115,105,108,111,110,0,84,105,109,101,115,45,66,111,108,100,73,116,97,108,105,99,0,0,0,0,0,0,0,0,102,105,118,101,112,111,118,101,114,104,97,110,103,0,0,0,47,112,97,115,116,101,108,49,57,47,57,0,0,0,0,0,100,112,105,0,0,0,0,0,104,101,97,100,95,108,112,0,116,111,111,108,116,105,112,0,103,114,101,101,110,121,101,108,108,111,119,0,0,0,0,0,109,97,114,103,105,110,0,0,47,112,97,115,116,101,108,49,57,47,56,0,0,0,0,0,47,112,97,115,116,101,108,49,57,47,55,0,0,0,0,0,47,112,97,115,116,101,108,49,57,47,54,0,0,0,
-0,0,47,98,108,117,101,115,55,47,54,0,0,0,0,0,0,0,91,32,0,0,0,0,0,0,47,112,97,115,116,101,108,49,57,47,53,0,0,0,0,0,100,97,116,97,32,101,114,114,111,114,0,0,0,0,0,0,47,112,97,115,116,101,108,49,57,47,52,0,0,0,0,0,47,112,97,115,116,101,108,49,57,47,51,0,0,0,0,0,98,111,120,114,97,100,61,50,46,48,32,37,115,32,119,105,108,108,32,98,101,32,114,101,115,101,116,32,116,111,32,48,46,48,32,98,121,32,103,112,105,99,32,111,110,108,121,10,0,0,0,0,0,0,0,0,47,112,97,115,116,101,108,49,57,47,50,0,0,0,0,0,34,32,0,
-0,0,0,0,0,47,112,97,115,116,101,108,49,57,47,49,0,0,0,0,0,47,112,97,115,116,101,108,49,56,47,56,0,0,0,0,0,100,105,97,109,111,110,100,0,37,37,66,111,117,110,100,105,110,103,66,111,120,58,32,40,97,116,101,110,100,41,10,0,69,103,114,97,118,101,0,0,84,105,109,101,115,0,0,0,114,101,115,116,114,105,99,116,105,111,110,115,105,116,101,0,47,112,97,115,116,101,108,49,56,47,55,0,0,0,0,0,99,111,110,99,101,110,116,114,97,116,101,0,0,0,0,0,115,121,110,116,97,120,32,101,114,114,111,114,32,105,110,32,112,111,115,
-32,97,116,116,114,105,98,117,116,101,32,102,111,114,32,101,100,103,101,32,40,37,115,44,37,115,41,10,0,116,105,116,108,101,0,0,0,103,114,101,101,110,0,0,0,84,104,101,32,99,104,97,114,97,99,116,101,114,32,39,37,99,39,32,97,112,112,101,97,114,115,32,105,110,32,98,111,116,104,32,116,104,101,32,108,97,121,101,114,115,101,112,32,97,110,100,32,108,97,121,101,114,108,105,115,116,115,101,112,32,97,116,116,114,105,98,117,116,101,115,32,45,32,108,97,121,101,114,108,105,115,116,115,101,112,32,105,103,110,111,
-114,101,100,46,10,0,0,0,0,47,112,97,115,116,101,108,49,56,47,54,0,0,0,0,0,47,112,97,115,116,101,108,49,56,47,53,0,0,0,0,0,47,112,97,115,116,101,108,49,56,47,52,0,0,0,0,0,47,98,108,117,101,115,55,47,53,0,0,0,0,0,0,0,117,115,45,62,110,97,109,101,0,0,0,0,0,0,0,0,102,105,110,100,95,102,97,115,116,95,110,111,100,101,40,103,44,32,110,41,0,0,0,0,47,112,97,115,116,101,108,49,56,47,51,0,0,0,0,0,47,112,97,115,116,101,108,49,56,47,50,0,0,0,0,0,47,112,97,115,116,101,108,49,56,47,49,0,0,0,0,0,37,115,32,110,111,
-110,45,102,97,116,97,108,32,114,117,110,45,116,105,109,101,32,112,105,99,32,118,101,114,115,105,111,110,32,100,101,116,101,114,109,105,110,97,116,105,111,110,44,32,118,101,114,115,105,111,110,32,50,10,0,0,0,0,0,47,112,97,115,116,101,108,49,55,47,55,0,0,0,0,0,32,102,105,108,108,101,100,61,34,116,114,117,101,34,32,102,105,108,108,99,111,108,111,114,61,34,0,0,0,0,0,0,47,112,97,115,116,101,108,49,55,47,54,0,0,0,0,0,47,112,97,115,116,101,108,49,55,47,53,0,0,0,0,0,37,37,80,97,103,101,115,58,32,49,10,0,
-0,0,0,0,69,99,105,114,99,0,0,0,84,105,109,101,115,45,66,111,108,100,0,0,0,0,0,0,112,114,105,109,101,114,115,105,116,101,0,0,0,0,0,0,47,112,97,115,116,101,108,49,55,47,52,0,0,0,0,0,99,108,117,115,116,101,114,114,97,110,107,0,0,0,0,0,10,0,0,0,0,0,0,0,37,108,102,44,37,108,102,37,110,0,0,0,0,0,0,0,116,97,114,103,101,116,0,0,103,114,97,121,0,0,0,0,44,0,0,0,0,0,0,0,47,112,97,115,116,101,108,49,55,47,51,0,0,0,0,0,47,112,97,115,116,101,108,49,55,47,50,0,0,0,0,0,47,112,97,115,116,101,108,49,55,47,49,0,0,0,
-0,0,47,98,108,117,101,115,55,47,52,0,0,0,0,0,0,0,117,115,0,0,0,0,0,0,115,105,122,101,61,61,102,114,101,101,100,0,0,0,0,0,47,112,97,115,116,101,108,49,54,47,54,0,0,0,0,0,47,112,97,115,116,101,108,49,54,47,53,0,0,0,0,0,47,112,97,115,116,101,108,49,54,47,52,0,0,0,0,0,37,115,32,100,111,110,39,116,32,99,104,97,110,103,101,32,97,110,121,116,104,105,110,103,32,98,101,108,111,119,32,116,104,105,115,32,108,105,110,101,32,105,110,32,116,104,105,115,32,100,114,97,119,105,110,103,10,0,0,0,0,0,0,0,65,103,110,
-111,100,101,105,110,102,111,95,116,0,0,0,0,47,112,97,115,116,101,108,49,54,47,51,0,0,0,0,0,34,0,0,0,0,0,0,0,47,112,97,115,116,101,108,49,54,47,50,0,0,0,0,0,47,112,97,115,116,101,108,49,54,47,49,0,0,0,0,0,37,37,80,97,103,101,115,58,32,40,97,116,101,110,100,41,10,0,0,0,0,0,0,0,69,97,99,117,116,101,0,0,103,114,101,101,110,0,0,0,102,97,110,116,97,115,121,0,112,114,111,116,101,105,110,115,116,97,98,0,0,0,0,0,47,112,97,115,116,101,108,49,53,47,53,0,0,0,0,0,108,97,110,100,115,99,97,112,101,0,0,0,0,0,0,0,
-112,111,115,32,97,116,116,114,105,98,117,116,101,32,102,111,114,32,101,100,103,101,32,40,37,115,44,37,115,41,32,100,111,101,115,110,39,116,32,104,97,118,101,32,51,110,43,49,32,112,111,105,110,116,115,10,0,0,0,0,0,0,0,0,115,116,121,108,101,0,0,0,103,111,108,100,101,110,114,111,100,0,0,0,0,0,0,0,108,97,121,101,114,108,105,115,116,115,101,112,0,0,0,0,47,112,97,115,116,101,108,49,53,47,52,0,0,0,0,0,47,112,97,115,116,101,108,49,53,47,51,0,0,0,0,0,47,112,97,115,116,101,108,49,53,47,50,0,0,0,0,0,47,98,108,
-117,101,115,55,47,51,0,0,0,0,0,0,0,103,118,108,111,97,100,105,109,97,103,101,95,99,111,114,101,46,99,0,0,0,0,0,0,47,112,97,115,116,101,108,49,53,47,49,0,0,0,0,0,47,112,97,115,116,101,108,49,52,47,52,0,0,0,0,0,38,113,117,111,116,59,0,0,47,112,97,115,116,101,108,49,52,47,51,0,0,0,0,0,46,110,114,32,83,70,32,37,46,48,102,10,115,99,97,108,101,116,104,105,99,107,110,101,115,115,32,61,32,37,46,48,102,10,0,0,0,0,0,0,47,112,97,115,116,101,108,49,52,47,50,0,0,0,0,0,114,97,110,107,0,0,0,0,47,112,97,115,116,
-101,108,49,52,47,49,0,0,0,0,0,85,112,0,0,0,0,0,0,47,112,97,115,116,101,108,49,51,47,51,0,0,0,0,0,32,45,102,105,108,108,32,0,37,37,37,37,84,105,116,108,101,58,32,37,115,10,0,0,69,84,72,0,0,0,0,0,83,121,109,98,111,108,0,0,111,98,106,112,45,62,108,98,108,0,0,0,0,0,0,0,112,114,111,116,101,97,115,101,115,105,116,101,0,0,0,0,47,112,97,115,116,101,108,49,51,47,50,0,0,0,0,0,111,114,105,101,110,116,97,116,105,111,110,0,0,0,0,0,32,101,44,37,108,102,44,37,108,102,37,110,0,0,0,0,114,111,119,115,112,97,110,0,
-103,111,108,100,0,0,0,0,58,9,32,0,0,0,0,0,47,112,97,115,116,101,108,49,51,47,49,0,0,0,0,0,47,112,97,105,114,101,100,57,47,57,0,0,0,0,0,0,116,114,105,101,115,32,61,32,37,100,44,32,109,111,100,101,32,61,32,37,115,10,0,0,47,112,97,105,114,101,100,57,47,56,0,0,0,0,0,0,47,98,108,117,101,115,55,47,50,0,0,0,0,0,0,0,106,111,98,0,0,0,0,0,47,112,97,105,114,101,100,57,47,55,0,0,0,0,0,0,27,0,0,0,0,0,0,0,111,115,97,103,101,0,0,0,47,112,97,105,114,101,100,57,47,54,0,0,0,0,0,0,47,112,97,105,114,101,100,57,47,53,
-0,0,0,0,0,0,37,115,32,116,111,32,99,104,97,110,103,101,32,100,114,97,119,105,110,103,32,115,105,122,101,44,32,109,117,108,116,105,112,108,121,32,116,104,101,32,119,105,100,116,104,32,97,110,100,32,104,101,105,103,104,116,32,111,110,32,116,104,101,32,46,80,83,32,108,105,110,101,32,97,98,111,118,101,32,97,110,100,32,116,104,101,32,110,117,109,98,101,114,32,111,110,32,116,104,101,32,116,119,111,32,108,105,110,101,115,32,98,101,108,111,119,32,40,114,111,117,110,100,101,100,32,116,111,32,116,104,101,32,
-110,101,97,114,101,115,116,32,105,110,116,101,103,101,114,41,32,98,121,32,97,32,115,99,97,108,101,32,102,97,99,116,111,114,10,0,0,0,0,0,0,0,0,47,112,97,105,114,101,100,57,47,52,0,0,0,0,0,0,103,118,58,100,111,116,0,0,99,32,0,0,0,0,0,0,99,97,110,110,111,116,32,109,97,108,108,111,99,32,111,112,115,0,0,0,0,0,0,0,47,112,97,105,114,101,100,57,47,51,0,0,0,0,0,0,47,112,97,105,114,101,100,57,47,50,0,0,0,0,0,0,80,97,116,104,32,112,114,111,118,105,100,101,100,32,116,111,32,102,105,108,101,58,32,34,37,115,34,
-32,104,97,115,32,98,101,101,110,32,105,103,110,111,114,101,100,32,98,101,99,97,117,115,101,32,102,105,108,101,115,32,97,114,101,32,111,110,108,121,32,112,101,114,109,105,116,116,101,100,32,116,111,32,98,101,32,108,111,97,100,101,100,32,102,114,111,109,32,116,104,101,32,100,105,114,101,99,116,111,114,105,101,115,32,105,110,32,34,37,115,34,32,119,104,101,110,32,114,117,110,110,105,110,103,32,105,110,32,97,110,32,104,116,116,112,32,115,101,114,118,101,114,46,10,0,0,0,0,0,0,0,0,37,100,32,37,100,32,115,
-101,116,108,97,121,101,114,10,0,68,101,108,116,97,0,0,0,108,111,97,100,105,109,97,103,101,0,0,0,0,0,0,0,80,97,108,97,116,105,110,111,45,82,111,109,97,110,0,0,100,101,102,108,97,116,105,111,110,32,112,114,111,98,108,101,109,32,37,100,10,0,0,0,114,110,97,115,116,97,98,0,99,111,117,114,0,0,0,0,47,112,97,105,114,101,100,57,47,49,0,0,0,0,0,0,114,111,116,97,116,101,0,0,115,44,37,108,102,44,37,108,102,37,110,0,0,0,0,0,112,111,114,116,0,0,0,0,103,104,111,115,116,119,104,105,116,101,0,0,0,0,0,0,108,97,121,
-101,114,115,101,112,0,0,0,0,0,0,0,0,100,111,116,105,110,105,116,46,99,0,0,0,0,0,0,0,108,101,118,101,108,32,62,61,32,48,32,38,38,32,108,101,118,101,108,32,60,61,32,40,42,110,41,45,62,108,101,118,101,108,0,0,0,0,0,0,47,112,97,105,114,101,100,56,47,56,0,0,0,0,0,0,99,117,115,116,111,109,0,0,65,103,110,111,100,101,105,110,102,111,95,116,0,0,0,0,105,110,32,114,111,117,116,101,115,112,108,105,110,101,115,44,32,101,100,103,101,32,105,115,32,97,32,108,111,111,112,32,97,116,32,37,115,10,0,0,99,97,110,39,116,
-32,111,112,101,110,32,108,105,98,114,97,114,121,32,102,105,108,101,32,37,115,10,0,0,0,0,0,37,100,32,111,117,116,32,111,102,32,37,100,32,101,120,116,101,114,105,111,114,32,108,97,98,101,108,115,32,112,111,115,105,116,105,111,110,101,100,46,10,0,0,0,0,0,0,0,47,112,97,105,114,101,100,56,47,55,0,0,0,0,0,0,117,112,100,97,116,101,58,32,109,105,115,109,97,116,99,104,101,100,32,108,99,97,32,105,110,32,116,114,101,101,117,112,100,97,116,101,115,10,0,0,107,105,110,100,32,61,61,32,76,84,95,78,79,78,69,0,83,
-101,116,116,105,110,103,32,105,110,105,116,105,97,108,32,112,111,115,105],"i8",L,l.J+92196);D([116,105,111,110,115,10,0,0,0,0,0,0,47,112,97,105,114,101,100,56,47,54,0,0,0,0,0,0,47,98,108,117,101,115,55,47,49,0,0,0,0,0,0,0,97,103,97,112,112,108,121,58,32,117,110,107,110,111,119,110,32,111,98,106,101,99,116,32,116,121,112,101,32,37,100,10,0,0,0,0,0,0,0,0,32,47,62,10,0,0,0,0,97,115,112,101,99,116,0,0,47,112,97,105,114,101,100,56,47,53,0,0,0,0,0,0,67,97,108,99,117,108,97,116,105,110,103,32,115,104,111,
-114,116,101,115,116,32,112,97,116,104,115,0,0,0,0,0,0,115,111,114,116,118,0,0,0,37,102,32,45,32,37,102,32,37,102,32,37,102,32,37,102,32,61,32,37,102,32,40,37,102,32,37,102,32,37,102,32,37,102,41,10,0,0,0,0,114,111,119,103,0,0,0,0,109,101,109,111,114,121,32,101,120,104,97,117,115,116,101,100,0,0,0,0,0,0,0,0,47,112,97,105,114,101,100,56,47,52,0,0,0,0,0,0,114,97,110,107,115,101,112,0,47,112,97,105,114,101,100,56,47,51,0,0,0,0,0,0,85,110,99,108,111,115,101,100,32,99,111,109,109,101,110,116,10,0,0,0,0,
-0,0,0,47,97,99,99,101,110,116,52,47,49,0,0,0,0,0,0,46,80,83,32,37,46,53,102,32,37,46,53,102,10,0,0,114,111,111,116,32,61,32,37,115,10,0,0,0,0,0,0,47,112,97,105,114,101,100,56,47,50,0,0,0,0,0,0,98,101,122,45,62,115,102,108,97,103,0,0,0,0,0,0,37,115,37,46,48,102,44,37,46,48,102,32,0,0,0,0,101,109,105,116,46,99,0,0,47,112,97,105,114,101,100,56,47,49,0,0,0,0,0,0,47,112,97,105,114,101,100,55,47,55,0,0,0,0,0,0,91,32,47,67,114,111,112,66,111,120,32,91,37,100,32,37,100,32,37,100,32,37,100,93,32,47,80,65,
-71,69,83,32,112,100,102,109,97,114,107,10,0,0,0,0,0,0,0,0,68,97,103,103,101,114,0,0,100,101,118,105,99,101,0,0,80,97,108,97,116,105,110,111,45,73,116,97,108,105,99,0,114,105,98,111,115,105,116,101,0,0,0,0,0,0,0,0,82,79,85,78,68,40,71,68,95,98,98,40,103,41,46,76,76,46,121,41,32,61,61,32,48,0,0,0,0,0,0,0,47,112,97,105,114,101,100,55,47,54,0,0,0,0,0,0,99,101,110,116,101,114,0,0,65,103,101,100,103,101,105,110,102,111,95,116,0,0,0,0,105,100,0,0,0,0,0,0,103,97,105,110,115,98,111,114,111,0,0,0,0,0,0,0,97,
-108,108,0,0,0,0,0,97,113,117,97,0,0,0,0,47,112,97,105,114,101,100,55,47,53,0,0,0,0,0,0,47,112,97,105,114,101,100,55,47,52,0,0,0,0,0,0,47,112,97,105,114,101,100,55,47,51,0,0,0,0,0,0,47,98,108,117,101,115,54,47,54,0,0,0,0,0,0,0,60,118,58,105,109,97,103,101,32,115,114,99,61,34,37,115,34,32,115,116,121,108,101,61,34,32,112,111,115,105,116,105,111,110,58,97,98,115,111,108,117,116,101,59,32,119,105,100,116,104,58,37,46,50,102,59,32,104,101,105,103,104,116,58,37,46,50,102,59,32,108,101,102,116,58,37,46,
-50,102,32,59,32,116,111,112,58,37,46,50,102,34,0,0,0,0,0,47,112,97,105,114,101,100,55,47,50,0,0,0,0,0,0,59,10,0,0,0,0,0,0,108,112,0,0,0,0,0,0,47,112,97,105,114,101,100,55,47,49,0,0,0,0,0,0,108,97,121,111,117,116,32,37,115,10,0,0,0,0,0,0,47,112,97,105,114,101,100,54,47,54,0,0,0,0,0,0,114,111,116,97,116,105,111,110,0,0,0,0,0,0,0,0,108,101,118,101,108,32,103,114,97,112,104,32,114,101,99,0,47,112,97,105,114,101,100,54,47,53,0,0,0,0,0,0,109,32,0,0,0,0,0,0,47,112,97,105,114,101,100,54,47,52,0,0,0,0,0,0,
-110,101,119,0,0,0,0,0,110,101,120,116,35,105,116,101,114,61,37,100,10,0,0,0,47,112,97,105,114,101,100,54,47,51,0,0,0,0,0,0,34,37,115,34,32,119,97,115,32,110,111,116,32,102,111,117,110,100,32,97,115,32,97,32,102,105,108,101,32,111,114,32,97,115,32,97,32,115,104,97,112,101,32,108,105,98,114,97,114,121,32,109,101,109,98,101,114,10,0,0,0,0,0,0,32,0,0,0,0,0,0,0,99,97,110,118,97,115,32,115,105,122,101,32,40,37,100,44,37,100,41,32,101,120,99,101,101,100,115,32,80,68,70,32,108,105,109,105,116,32,40,37,100,
-41,10,9,40,115,117,103,103,101,115,116,32,115,101,116,116,105,110,103,32,97,32,98,111,117,110,100,105,110,103,32,98,111,120,32,115,105,122,101,44,32,115,101,101,32,100,111,116,40,49,41,41,10,0,0,67,104,105,0,0,0,0,0,116,101,120,116,108,97,121,111,117,116,0,0,0,0,0,0,80,97,108,97,116,105,110,111,45,66,111,108,100,73,116,97,108,105,99,0,0,0,0,0,105,110,115,117,108,97,116,111,114,0,0,0,0,0,0,0,47,112,97,105,114,101,100,54,47,50,0,0,0,0,0,0,112,97,103,101,0,0,0,0,104,114,101,102,0,0,0,0,99,111,109,112,
-114,101,115,115,32,37,103,32,10,0,0,0,102,117,99,104,115,105,97,0,84,104,101,32,108,97,121,101,114,115,101,108,101,99,116,32,97,116,116,114,105,98,117,116,101,32,34,37,115,34,32,100,111,101,115,32,110,111,116,32,109,97,116,99,104,32,97,110,121,32,108,97,121,101,114,32,115,112,101,99,105,102,101,100,32,98,121,32,116,104,101,32,108,97,121,101,114,115,32,97,116,116,114,105,98,117,116,101,32,45,32,105,103,110,111,114,101,100,46,10,0,0,0,0,112,105,110,0,0,0,0,0,47,112,97,105,114,101,100,54,47,49,0,0,0,
-0,0,0,105,110,118,105,115,105,98,108,101,0,0,0,0,0,0,0,99,108,117,115,116,101,114,0,47,112,97,105,114,101,100,53,47,53,0,0,0,0,0,0,37,108,102,44,37,108,102,37,99,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,105,110,115,116,97,108,108,95,105,110,95,114,97,110,107,44,32,108,105,110,101,32,37,100,58,32,114,97,110,107,32,37,100,32,110,111,116,32,105,110,32,114,97,110,107,32,114,97,110,103,101,32,91,37,100,44,37,100,93,10,0,0,0,0,47,112,97,105,114,101,100,53,47,52,0,0,0,0,0,0,47,98,108,117,101,115,54,47,53,0,0,0,0,
-0,0,0,36,99,32,99,114,101,97,116,101,32,105,109,97,103,101,32,37,46,50,102,32,37,46,50,102,32,45,105,109,97,103,101,32,34,112,104,111,116,111,95,37,115,34,10,0,0,0,0,47,112,97,105,114,101,100,53,47,51,0,0,0,0,0,0,47,112,97,105,114,101,100,53,47,50,0,0,0,0,0,0,47,112,97,105,114,101,100,53,47,49,0,0,0,0,0,0,93,10,46,80,69,10,0,0,47,112,97,105,114,101,100,52,47,52,0,0,0,0,0,0,47,62,60,47,118,58,115,104,97,112,101,62,10,0,0,0,47,112,97,105,114,101,100,52,47,51,0,0,0,0,0,0,47,112,97,105,114,101,100,52,
-47,50,0,0,0,0,0,0,37,103,32,37,103,32,115,101,116,95,115,99,97,108,101,32,37,100,32,114,111,116,97,116,101,32,37,103,32,37,103,32,116,114,97,110,115,108,97,116,101,10,0,0,0,0,0,0,67,99,101,100,105,108,0,0,108,97,121,111,117,116,0,0,80,97,108,97,116,105,110,111,32,76,105,110,111,116,121,112,101,0,0,0,0,0,0,0,117,116,114,0,0,0,0,0,47,112,97,105,114,101,100,52,47,49,0,0,0,0,0,0,115,105,122,101,0,0,0,0,104,101,105,103,104,116,0,0,99,111,110,106,117,103,97,116,101,95,103,114,97,100,105,101,110,116,58,
-32,117,110,101,120,112,101,99,116,101,100,32,108,101,110,103,116,104,32,48,32,118,101,99,116,111,114,10,0,102,111,114,101,115,116,103,114,101,101,110,0,0,0,0,0,108,97,121,101,114,115,101,108,101,99,116,0,0,0,0,0,112,111,115,0,0,0,0,0,47,112,97,105,114,101,100,51,47,51,0,0,0,0,0,0,47,112,97,105,114,101,100,51,47,50,0,0,0,0,0,0,47,112,97,105,114,101,100,51,47,49,0,0,0,0,0,0,47,98,108,117,101,115,54,47,52,0,0,0,0,0,0,0,110,111,116,32,119,101,108,108,45,102,111,114,109,101,100,32,40,105,110,118,97,108,
-105,100,32,116,111,107,101,110,41,0,105,109,97,103,101,32,99,114,101,97,116,101,32,112,104,111,116,111,32,34,112,104,111,116,111,95,37,115,34,32,45,102,105,108,101,32,34,37,115,34,10,0,0,0,0,0,0,0,47,112,97,105,114,101,100,49,50,47,57,0,0,0,0,0,47,112,97,105,114,101,100,49,50,47,56,0,0,0,0,0,47,112,97,105,114,101,100,49,50,47,55,0,0,0,0,0,90,97,112,102,68,105,110,103,98,97,116,115,0,0,0,0,47,112,97,105,114,101,100,49,50,47,54,0,0,0,0,0,60,118,58,112,97,116,104,32,32,118,61,34,0,0,0,0,47,112,97,105,
-114,101,100,49,50,47,53,0,0,0,0,0,47,112,97,105,114,101,100,49,50,47,52,0,0,0,0,0,103,115,97,118,101,10,37,100,32,37,100,32,37,100,32,37,100,32,98,111,120,112,114,105,109,32,99,108,105,112,32,110,101,119,112,97,116,104,10,0,66,101,116,97,0,0,0,0,114,101,110,100,101,114,0,0,80,97,108,97,116,105,110,111,45,66,111,108,100,0,0,0,116,101,114,109,105,110,97,116,111,114,0,0,0,0,0,0,112,105,110,0,0,0,0,0,47,112,97,105,114,101,100,49,50,47,51,0,0,0,0,0,102,111,110,116,110,97,109,101,115,0,0,0,0,0,0,0,103,
-114,97,100,105,101,110,116,97,110,103,108,101,0,0,0,67,97,108,99,117,108,97,116,105,110,103,32,99,105,114,99,117,105,116,32,109,111,100,101,108,0,0,0,0,0,0,0,98,108,111,99,107,116,114,101,101,46,99,0,0,0,0,0,102,108,111,114,97,108,119,104,105,116,101,0,0,0,0,0,108,97,121,101,114,115,0,0,99,109,97,112,120,58,109,97,112,0,0,0,0,0,0,0,100,105,109,0,0,0,0,0,47,112,97,105,114,101,100,49,50,47,50,0,0,0,0,0,47,112,97,105,114,101,100,49,50,47,49,50,0,0,0,0,47,112,97,105,114,101,100,49,50,47,49,49,0,0,0,0,
-47,98,108,117,101,115,54,47,51,0,0,0,0,0,0,0,103,105,102,58,116,107,0,0,47,112,97,105,114,101,100,49,50,47,49,48,0,0,0,0,106,112,103,58,115,118,103,0,47,112,97,105,114,101,100,49,50,47,49,0,0,0,0,0,47,112,97,105,114,101,100,49,49,47,57,0,0,0,0,0,83,121,109,98,111,108,0,0,47,112,97,105,114,101,100,49,49,47,56,0,0,0,0,0,32,62,0,0,0,0,0,0,47,112,97,105,114,101,100,49,49,47,55,0,0,0,0,0,47,98,108,117,101,115,54,47,50,0,0,0,0,0,0,0,47,112,97,105,114,101,100,49,49,47,54,0,0,0,0,0,37,100,32,37,100,32,37,
-100,32,98,101,103,105,110,112,97,103,101,10,0,0,0,0,0,65,117,109,108,0,0,0,0,114,111,109,97,110,0,0,0,99,100,115,0,0,0,0,0,47,112,97,105,114,101,100,49,49,47,53,0,0,0,0,0,97,114,114,97,121,0,0,0,115,104,111,119,98,111,120,101,115,0,0,0,0,0,0,0,37,108,102,44,37,108,102,0,102,105,120,101,100,115,105,122,101,0,0,0,0,0,0,0,110,111,114,109,97,108,105,122,101,0,0,0,0,0,0,0,102,105,114,101,98,114,105,99,107,0,0,0,0,0,0,0,100,103,101,115,102,105,114,115,116,0,0,0,0,0,0,0,100,105,109,101,110,0,0,0,47,112,
-97,105,114,101,100,49,49,47,52,0,0,0,0,0,105,99,111,0,0,0,0,0,47,112,97,105,114,101,100,49,49,47,51,0,0,0,0,0,47,112,97,105,114,101,100,49,49,47,50,0,0,0,0,0,98,111,120,0,0,0,0,0,106,112,103,58,118,109,108,0,47,112,97,105,114,101,100,49,49,47,49,49,0,0,0,0,47,112,97,105,114,101,100,49,49,47,49,48,0,0,0,0,115,116,114,101,97,109,32,101,114,114,111,114,0,0,0,0,47,112,97,105,114,101,100,49,49,47,49,0,0,0,0,0,84,105,109,101,115,45,82,111,109,97,110,0,0,0,0,0,47,112,97,105,114,101,100,49,48,47,57,0,0,0,
-0,0,32,119,105,100,116,104,58,32,37,100,59,32,104,101,105,103,104,116,58,32,37,100,34,0,47,112,97,105,114,101,100,49,48,47,56,0,0,0,0,0,47,112,97,105,114,101,100,49,48,47,55,0,0,0,0,0,60,60,32,47,80,97,103,101,83,105,122,101,32,91,37,100,32,37,100,93,32,62,62,32,115,101,116,112,97,103,101,100,101,118,105,99,101,10,0,0,65,116,105,108,100,101,0,0,38,97,109,112,59,0,0,0,0,0,1,0,0,0,0,0,78,101,119,67,101,110,116,117,114,121,83,99,104,108,98,107,45,82,111,109,97,110,0,0,112,114,111,109,111,116,101,114,
-0,0,0,0,0,0,0,0,47,112,97,105,114,101,100,49,48,47,54,0,0,0,0,0,101,113,117,97,108,108,121,0,99,111,108,115,112,97,110,0,112,114,105,115,109,0,0,0,100,111,100,103,101,114,98,108,117,101,0,0,0,0,0,0,111,100,101,115,102,105,114,115,116,0,0,0,0,0,0,0,73,108,108,101,103,97,108,32,118,97,108,117,101,32,37,115,32,102,111,114,32,97,116,116,114,105,98,117,116,101,32,34,109,111,100,101,34,32,105,110,32,103,114,97,112,104,32,37,115,32,45,32,105,103,110,111,114,101,100,10,0,0,0,0,47,112,97,105,114,101,100,49,
-48,47,53,0,0,0,0,0,47,112,97,105,114,101,100,49,48,47,52,0,0,0,0,0,47,112,97,105,114,101,100,49,48,47,51,0,0,0,0,0,65,114,114,111,119,32,116,121,112,101,32,34,37,115,34,32,117,110,107,110,111,119,110,32,45,32,105,103,110,111,114,105,110,103,10,0,0,0,0,0,47,98,108,117,101,115,54,47,49,0,0,0,0,0,0,0,106,112,101,58,118,109,108,0,47,112,97,105,114,101,100,49,48,47,50,0,0,0,0,0,78,68,95,110,101,120,116,40,118,41,32,61,61,32,78,85,76,76,0,0,0,0,0,0,47,112,97,105,114,101,100,49,48,47,49,48,0,0,0,0,47,112,
-97,105,114,101,100,49,48,47,49,0,0,0,0,0,80,97,108,97,116,105,110,111,45,66,111,108,100,73,116,97,108,105,99,0,0,0,0,0,47,111,114,114,100,57,47,57,0,0,0,0,0,0,0,0,103,118,114,101,110,100,101,114,95,99,111,114,101,95,118,109,108,46,99,0,0,0,0,0,47,111,114,114,100,57,47,56,0,0,0,0,0,0,0,0,47,111,114,114,100,57,47,55,0,0,0,0,0,0,0,0,80,111,114,116,114,97,105,116,0,0,0,0,0,0,0,0,65,114,105,110,103,0,0,0,78,101,119,67,101,110,116,117,114,121,83,99,104,108,98,107,45,73,116,97,108,105,99,0,77,99,105,114,
-99,108,101,0,47,111,114,114,100,57,47,54,0,0,0,0,0,0,0,0,114,97,110,107,115,101,112,0,95,37,100,0,0,0,0,0,99,101,108,108,115,112,97,99,105,110,103,0,0,0,0,0,121,120,32,112,115,101,117,100,111,45,111,114,116,104,111,103,111,110,97,108,32,99,111,110,115,116,114,97,105,110,116,115,0,0,0,0,0,0,0,0,32,37,100,32,37,100,0,0,100,105,109,103,114,101,121,0,111,117,116,112,117,116,111,114,100,101,114,0,0,0,0,0,109,97,106,111,114,0,0,0,47,111,114,114,100,57,47,53,0,0,0,0,0,0,0,0,114,105,102,102,0,0,0,0,47,111,
-114,114,100,57,47,52,0,0,0,0,0,0,0,0,47,111,114,114,100,57,47,51,0,0,0,0,0,0,0,0,47,98,108,117,101,115,53,47,53,0,0,0,0,0,0,0,106,112,101,103,58,118,109,108,0,0,0,0,0,0,0,0,47,111,114,114,100,57,47,50,0,0,0,0,0,0,0,0,118,112,0,0,0,0,0,0,47,111,114,114,100,57,47,49,0,0,0,0,0,0,0,0,47,111,114,114,100,56,47,56,0,0,0,0,0,0,0,0,80,97,108,97,116,105,110,111,45,73,116,97,108,105,99,0,47,111,114,114,100,56,47,55,0,0,0,0,0,0,0,0,65,103,114,97,112,104,105,110,102,111,95,116,0,0,0,0,48,0,0,0,0,0,0,0,47,111,
-114,114,100,56,47,54,0,0,0,0,0,0,0,0,47,111,114,114,100,56,47,53,0,0,0,0,0,0,0,0,76,97,110,100,115,99,97,112,101,0,0,0,0,0,0,0,65,108,112,104,97,0,0,0,82,73,70,70,0,0,0,0,78,101,119,67,101,110,116,117,114,121,83,99,104,108,98,107,45,66,111,108,100,73,116,97,108,105,99,0,0,0,0,0,77,115,113,117,97,114,101,0,47,111,114,114,100,56,47,52,0,0,0,0,0,0,0,0,110,111,100,101,115,101,112,0,116,114,97,110,115,112,97,114,101,110,116,0,0,0,0,0,99,101,108,108,112,97,100,100,105,110,103,0,0,0,0,0,112,111,114,116,
-104,111,121,120,0,0,0,0,0,0,0,0,100,105,109,103,114,97,121,0,37,108,102,44,37,108,102,44,37,108,102,44,37,108,102,44,37,108,102,0,0,0,0,0,99,121,97,110,0,0,0,0,75,75,0,0,0,0,0,0,47,111,114,114,100,56,47,51,0,0,0,0,0,0,0,0,47,98,108,117,101,115,53,47,52,0,0,0,0,0,0,0,47,111,114,114,100,56,47,50,0,0,0,0,0,0,0,0,47,111,114,114,100,56,47,49,0,0,0,0,0,0,0,0,103,105,102,58,118,109,108,0,47,111,114,114,100,55,47,55,0,0,0,0,0,0,0,0,47,111,114,114,100,55,47,54,0,0,0,0,0,0,0,0,38,35,49,54,48,59,0,0,47,111,
-114,114,100,55,47,53,0,0,0,0,0,0,0,0,80,97,108,97,116,105,110,111,45,66,111,108,100,0,0,0,113,0,0,0,0,0,0,0,47,111,114,114,100,55,47,52,0,0,0,0,0,0,0,0,35,37,48,50,120,37,48,50,120,37,48,50,120,0,0,0,47,111,114,114,100,55,47,51,0,0,0,0,0,0,0,0,65,103,114,97,112,104,105,110,102,111,95,116,0,0,0,0,47,111,114,114,100,55,47,50,0,0,0,0,0,0,0,0,32,99,114,101,97,116,101,32,108,105,110,101,32,0,0,0,102,105,103,0,0,0,0,0,65,103,114,97,118,101,0,0,67,101,110,116,117,114,121,32,83,99,104,111,111,108,98,111,
-111,107,32,76,0,0,0,0,75,80,95,82,105,103,104,116,0,0,0,0,0,0,0,0,77,100,105,97,109,111,110,100,0,0,0,0,0,0,0,0,47,111,114,114,100,55,47,49,0,0,0,0,0,0,0,0,82,76,0,0,0,0,0,0,100,111,116,116,101,100,0,0,98,111,114,100,101,114,0,0,120,121,32,112,115,101,117,100,111,45,111,114,116,104,111,103,111,110,97,108,32,99,111,110,115,116,114,97,105,110,116,115,0,0,0,0,0,0,0,0,97,99,116,117,97,108,0,0,100,101,101,112,115,107,121,98,108,117,101,0,0,0,0,0,37,108,102,44,37,108,102,44,37,108,102,44,37,91,94,44,93,
-37,115,0,0,0,0,0,109,111,100,101,0,0,0,0,47,111,114,114,100,54,47,54,0,0,0,0,0,0,0,0,120,109,108,0,0,0,0,0,37,37,37,37,80,97,103,101,79,114,105,101,110,116,97,116,105,111,110,58,32,37,115,10,0,0,0,0,0,0,0,0,47,98,108,117,101,115,53,47,51,0,0,0,0,0,0,0,47,111,114,114,100,54,47,53,0,0,0,0,0,0,0,0,47,111,114,114,100,54,47,52,0,0,0,0,0,0,0,0,57,58,112,114,105,115,109,0,112,110,103,58,118,109,108,0,47,111,114,114,100,54,47,51,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,112,97,116,99,104,119,111,114,107,0,0,0,0,0,
-0,0,47,111,114,114,100,54,47,50,0,0,0,0,0,0,0,0,47,111,114,114,100,54,47,49,0,0,0,0,0,0,0,0,80,97,108,97,116,105,110,111,45,82,111,109,97,110,0,0,47,111,114,114,100,53,47,53,0,0,0,0,0,0,0,0,100,111,116,58,100,111,116,0,110,111,110,101,0,0,0,0,99,97,110,110,111,116,32,102,105,110,100,32,116,114,105,97,110,103,108,101,32,112,97,116,104,0,0,0,0,0,0,0,47,111,114,114,100,53,47,52,0,0,0,0,0,0,0,0,47,111,114,114,100,53,47,51,0,0,0,0,0,0,0,0,102,105,108,101,32,108,111,97,100,105,110,103,32,105,115,32,100,
-105,115,97,98,108,101,100,32,98,101,99,97,117,115,101,32,116,104,101,32,101,110,118,105,114,111,110,109,101,110,116,32,99,111,110,116,97,105,110,115,32,83,69,82,86,69,82,95,78,65,77,69,61,34,37,115,34,10,97,110,100,32,116,104,101,32,71,86,95,70,73,76,69,95,80,65,84,72,32,118,97,114,105,97,98,108,101,32,105,115,32,117,110,115,101,116,32,111,114,32,101,109,112,116,121,46,10,0,0,0,0,37,46,48,50,102,0,0,0,65,99,105,114,99,0,0,0,78,101,119,67,101,110,116,117,114,121,83,99,104,108,98,107,45,66,111,108,
-100,0,0,0,114,32,38,38,32,115,0,0,117,110,100,101,114,108,105,110,101,0,0,0,0,0,0,0,102,111,110,116,110,97,109,101,58,32,117,110,97,98,108,101,32,116,111,32,114,101,115,111,108,118,101,32,34,37,115,34,10,0,0,0,0,0,0,0,47,111,114,114,100,53,47,50,0,0,0,0,0,0,0,0,66,84,0,0,0,0,0,0,70,65,76,83,69,0,0,0,100,97,115,104,101,100,0,0,98,103,99,111,108,111,114,0,112,111,114,116,104,111,120,121,0,0,0,0,0,0,0,0,100,101,101,112,112,105,110,107,0,0,0,0,0,0,0,0,37,108,102,44,37,108,102,44,37,108,102,44,39,37,91,
-94,39,93,39,0,0,0,0,0,109,101,109,111,114,121,32,97,108,108,111,99,97,116,105,111,110,32,102,97,105,108,117,114,101,10,0,0,0,0,0,0,85,110,107,110,111,119,110,32,118,97,108,117,101,32,37,115,32,102,111,114,32,97,116,116,114,105,98,117,116,101,32,34,109,111,100,101,108,34,32,105,110,32,103,114,97,112,104,32,37,115,32,45,32,105,103,110,111,114,101,100,10,0,0,0,114,32,38,38,32,110,0,0,47,111,114,114,100,53,47,49,0,0,0,0,0,0,0,0,60,63,120,109,108,0,0,0,37,37,37,37,80,97,103,101,66,111,117,110,100,105,
-110,103,66,111,120,58,32,37,100,32,37,100,32,37,100,32,37,100,10,0,0,0,0,0,0,0,101,112,115,102,0,0,0,0,99,111,109,112,46,99,0,0,105,110,32,114,111,117,116,101,115,112,108,105,110,101,115,44,32,105,108,108,101,103,97,108,32,118,97,108,117,101,115,32,111,102,32,112,114,101,118,32,37,100,32,97,110,100,32,110,101,120,116,32,37,100,44,32,108,105,110,101,32,37,100,10,0,0,0,0,0,0,0,0,114,0,0,0,0,0,0,0,118,32,61,61,32,110,0,0,37,100,32,111,117,116,32,111,102,32,37,100,32,108,97,98,101,108,115,32,112,111,
-115,105,116,105,111,110,101,100,46,10,0,0,0,0,0,0,0,0,47,98,108,117,101,115,53,47,50,0,0,0,0,0,0,0,47,111,114,114,100,52,47,52,0,0,0,0,0,0,0,0,98,108,97,99,107,0,0,0,115,101,97,114,99,104,115,105,122,101,0,0,0,0,0,0,116,107,0,0,0,0,0,0,45,45,0,0,0,0,0,0,47,111,114,114,100,52,47,51,0,0,0,0,0,0,0,0,100,101,102,97,117,108,116,100,105,115,116,0,0,0,0,0,58,32,0,0,0,0,0,0,115,111,114,116,118,0,0,0,115,118,103,58,115,118,103,0,47,111,114,114,100,52,47,50,0,0,0,0,0,0,0,0,67,97,108,99,117,108,97,116,105,110,
-103,32,77,68,83,32,109,111,100,101,108,0,0,0,108,97,121,111,117,116,32,37,115,10,0,0,0,0,0,0,114,101,99,32,37,102,32,37,102,32,37,102,32,37,102,10,0,0,0,0,0,0,0,0,65,103,110,111,100,101,105,110,102,111,95,116,0,0,0,0,114,111,111,116,0,0,0,0,47,111,114,114,100,52,47,49,0,0,0,0,0,0,0,0,76,97,98,101,108,32,99,108,111,115,101,100,32,98,101,102,111,114,101,32,101,110,100,32,111,102,32,72,84,77,76,32,101,108,101,109,101,110,116,10,0,0,0,0,0,0,0,0,47,111,114,114,100,51,47,51,0,0,0,0,0,0,0,0,111,118,101,
-114,108,97,112,0,78,101,119,67,101,110,116,117,114,121,83,99,104,108,98,107,45,66,111,108,100,73,116,97,108,105,99,0,0,0,0,0,65,103,110,111,100,101,105,110,102,111,95,116,0,0,0,0,47,111,114,114,100,51,47,50,0,0,0,0,0,0,0,0,99,111,110,99,46,99,0,0,47,97,99,99,101,110,116,51,47,51,0,0,0,0,0,0,115,97,109,112,108,101,112,111,105,110,116,115,0,0,0,0,69,68,95,116,111,95,118,105,114,116,40,101,41,32,61,61,32,78,85,76,76,0,0,0,34,32,47,62,0,0,0,0,47,111,114,114,100,51,47,49,0,0,0,0,0,0,0,0,111,98,106,0,0,
-0,0,0,47,111,114,97,110,103,101,115,57,47,57,0,0,0,0,0,120,100,111,116,32,118,101,114,115,105,111,110,32,34,37,115,34,32,116,111,111,32,108,111,110,103,0,0,0,0,0,0,65,97,99,117,116,101,0,0,72,101,108,118,101,116,105,99,97,45,79,98,108,105,113,117,101,0,0,0,0,0,0,0,110,0,0,0,0,0,0,0,105,110,118,104,111,117,115,101,0,0,0,0,0,0,0,0,110,101,97,116,111,115,112,108,105,110,101,115,46,99,0,0,47,111,114,97,110,103,101,115,57,47,56,0,0,0,0,0,76,82,0,0,0,0,0,0,50,48,0,0,0,0,0,0,98,97,108,105,103,110,0,0,112,
-111,114,116,104,111,95,121,120,0,0,0,0,0,0,0,100,97,114,107,118,105,111,108,101,116,0,0,0,0,0,0,118,105,101,119,112,111,114,116,0,0,0,0,0,0,0,0,105,115,32,105,110,97,112,112,114,111,112,114,105,97,116,101,46,32,82,101,118,101,114,116,105,110,103,32,116,111,32,116,104,101,32,115,104,111,114,116,101,115,116,32,112,97,116,104,32,109,111,100,101,108,46,10,0,0,0,0,0,0,0,0,97,110,116,105,113,117,101,119,104,105,116,101,0,0,0,0,47,111,114,97,110,103,101,115,57,47,55,0,0,0,0,0,101,112,115,0,0,0,0,0,37,37,
-37,37,80,97,103,101,58,32,37,100,32,37,100,10,0,0,0,0,0,0,0,0,65,103,110,111,100,101,105,110,102,111,95,116,0,0,0,0,47,98,108,117,101,115,53,47,49,0,0,0,0,0,0,0,47,111,114,97,110,103,101,115,57,47,54,0,0,0,0,0,37,115,32,45,62,32,37,115,58,32,116,97,105,108,32,105,115,32,105,110,115,105,100,101,32,104,101,97,100,32,99,108,117,115,116,101,114,32,37,115,10,0,0,0,0,0,0,0,47,111,114,97,110,103,101,115,57,47,53,0,0,0,0,0,115,118,103,58,120,100,111,116,0,0,0,0,0,0,0,0,47,111,114,97,110,103,101,115,57,47,
-52,0,0,0,0,0,32,45,45,32,0,0,0,0,47,111,114,97,110,103,101,115,57,47,51,0,0,0,0,0,110,111,100,101,32,37,115,44,32,112,111,115,105,116,105,111,110,32,37,115,44,32,101,120,112,101,99,116,101,100,32,116,119,111,32,100,111,117,98,108,101,115,10,0,0,0,0,0,47,111,114,97,110,103,101,115,57,47,50,0,0,0,0,0,78,101,119,67,101,110,116,117,114,121,83,99,104,108,98,107,45,82,111,109,97,110,0,0,115,112,108,105,110,101,115,32,97,110,100,32,99,108,117,115,116,101,114,32,101,100,103,101,115,32,110,111,116,32,115,
-117,112,112,111,114,116,101,100,32,45,32,117,115,105,110,103,32,108,105,110,101,32,115,101,103,109,101,110,116,115,10,0,0,114,111,111,116,0,0,0,0,47,111,114,97,110,103,101,115,57,47,49,0,0,0,0,0,108,101,118,101,108,32,97,115,115,105,103,110,109,101,110,116,32,99,111,110,115,116,114,97,105,110,116,115,0,0,0,0,34,32,100,97,115,104,115,116,121,108,101,61,34,100,111,116,0,0,0,0,0,0,0,0,47,111,114,97,110,103,101,115,56,47,56,0,0,0,0,0,98,98,0,0,0,0,0,0,71,111,105,110,103,32,116,111,32,97,112,112,108,121,
-32,97,110,111,116,104,101,114,32,101,120,112,97,110,115,105,111,110,46,10,0,0,0,0,0,0,47,111,114,97,110,103,101,115,56,47,55,0,0,0,0,0,37,115,32,119,104,105,108,101,32,111,112,101,110,105,110,103,32,37,115,10,0,0,0,0,91,32,0,0,0,0,0,0,95,116,108,100,114,97,119,95,0,0,0,0,0,0,0,0,65,69,108,105,103,0,0,0,72,101,108,118,101,116,105,99,97,45,78,97,114,114,111,119,45,79,98,108,105,113,117,101,0,0,0,0,0,0,0,0,105,32,60,32,78,79,68,69,67,65,82,68,0,0,0,0,105,110,118,116,114,97,112,101,122,105,117,109,0,
-0,0,0,47,111,114,97,110,103,101,115,56,47,54,0,0,0,0,0,114,97,110,107,100,105,114,0,49,57,0,0,0,0,0,0,60,84,68,62,0,0,0,0,112,115,101,117,100,111,45,111,114,116,104,111,103,111,110,97,108,32,99,111,110,115,116,114,97,105,110,116,115,0,0,0,100,97,114,107,116,117,114,113,117,111,105,115,101,0,0,0,112,97,103,101,100,105,114,61,37,115,32,105,103,110,111,114,101,100,10,0,0,0,0,0,101,100,103,101,115,32,105,110,32,103,114,97,112,104,32,37,115,32,104,97,118,101,32,110,111,32,108,101,110,32,97,116,116,114,
-105,98,117,116,101,46,32,72,101,110,99,101,44,32,116,104,101,32,109,100,115,32,109,111,100,101,108,10,0,0,47,111,114,97,110,103,101,115,56,47,53,0,0,0,0,0,197,208,211,198,0,0,0,0,37,37,37,37,69,110,100,80,97,103,101,58,32,37,100,10,0,0,0,0,0,0,0,0,105,110,118,105,115,0,0,0,47,98,108,117,101,115,52,47,52,0,0,0,0,0,0,0,47,111,114,97,110,103,101,115,56,47,52,0,0,0,0,0,65,103,101,100,103,101,105,110,102,111,95,116,0,0,0,0,105,110,115,116,97,108,108,95,105,110,95,114,97,110,107,44,32,108,105,110,101,32,
-37,100,58,32,78,68,95,111,114,100,101,114,40,37,115,41,32,91,37,100,93,32,62,32,71,68,95,114,97,110,107,40,82,111,111,116,41,91,37,100,93,46,97,110,32,91,37,100,93,10,0,0,0,0,0,0,0,0,47,111,114,97,110,103,101,115,56,47,51,0,0,0,0,0,112,114,101,102,105,120,32,109,117,115,116,32,110,111,116,32,98,101,32,98,111,117,110,100,32,116,111,32,111,110,101,32,111,102,32,116,104,101,32,114,101,115,101,114,118,101,100,32,110,97,109,101,115,112,97,99,101,32,110,97,109,101,115,0,101,112,115,58,120,100,111,116,0,
-0,0,0,0,0,0,0,47,111,114,97,110,103,101,115,56,47,50,0,0,0,0,0,47,111,114,97,110,103,101,115,56,47,49,0,0,0,0,0,47,111,114,97,110,103,101,115,55,47,55,0,0,0,0,0,78,101,119,67,101,110,116,117,114,121,83,99,104,108,98,107,45,73,116,97,108,105,99,0,47,111,114,97,110,103,101,115,55,47,54,0,0,0,0,0,34,32,100,97,115,104,115,116,121,108,101,61,34,100,97,115,104,0,0,0,0,0,0,0,47,111,114,97,110,103,101,115,55,47,53,0,0,0,0,0,47,111,114,97,110,103,101,115,55,47,52,0,0,0,0,0,95,104,108,100,114,97,119,95,0,0,
-0,0,0,0,0,0,98,122,46,115,105,122,101,0,72,101,108,118,101,116,105,99,97,45,78,97,114,114,111,119,45,66,111,108,100,79,98,108,105,113,117,101,0,0,0,0,105,110,118,116,114,105,97,110,103,108,101,0,0,0,0,0,47,111,114,97,110,103,101,115,55,47,51,0,0,0,0,0,113,117,97,110,116,117,109,0,49,56,0,0,0,0,0,0,37,115,32,118,97,108,117,101,32,37,115,32,60,32,37,100,32,45,32,116,111,111,32,115,109,97,108,108,32,45,32,105,103,110,111,114,101,100,0,0,112,111,114,116,104,111,0,0,101,100,103,101,32,108,97,98,101,108,
-115,32,119,105,116,104,32,115,112,108,105,110,101,115,61,99,117,114,118,101,100,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,105,110,32,100,111,116,32,45,32,117,115,101,32,120,108,97,98,101,108,115,10,0,0,0,0,0,100,97,114,107,115,108,97,116,101,103,114,101,121,0,0,0,77,111,114,101,32,116,104,97,110,32,50,32,99,111,108,111,114,115,32,115,112,101,99,105,102,105,101,100,32,102,111,114,32,97,32,103,114,97,100,105,101,110,116,32,45,32,105,103,110,111,114,105,110,103,32,114,101,109,97,105,110,
-105,110,103,10,0,0,0,0,0,0,0,109,100,115,0,0,0,0,0,47,111,114,97,110,103,101,115,55,47,50,0,0,0,0,0,112,100,102,0,0,0,0,0,37,37,80,97,103,101,84,114,97,105,108,101,114,10,0,0,47,98,108,117,101,115,52,47,51,0,0,0,0,0,0,0,47,111,114,97,110,103,101,115,55,47,49,0,0,0,0,0,47,111,114,97,110,103,101,115,54,47,54,0,0,0,0,0,114,101,115,101,114,118,101,100,32,112,114,101,102,105,120,32,40,120,109,108,110,115,41,32,109,117,115,116,32,110,111,116,32,98,101,32,100,101,99,108,97,114,101,100,32,111,114,32,117,
-110,100,101,99,108,97,114,101,100,0,0,0,0,0,0,110,111,32,101,108,101,109,101,110,116,32,102,111,117,110,100,0,0,0,0,0,0,0,0,112,115,58,120,100,111,116,0,47,111,114,97,110,103,101,115,54,47,53,0,0,0,0,0,47,111,114,97,110,103,101,115,54,47,52,0,0,0,0,0,47,111,114,97,110,103,101,115,54,47,51,0,0,0,0,0,78,101,119,67,101,110,116,117,114,121,83,99,104,108,98,107,45,66,111,108,100,0,0,0,47,111,114,97,110,103,101,115,54,47,50,0,0,0,0,0,34,32,119,101,105,103,104,116,61,34,37,46,48,102,112,116,0,0,0,0,0,0,
-0,0,47,111,114,97,110,103,101,115,54,47,49,0,0,0,0,0,47,111,114,97,110,103,101,115,53,47,53,0,0,0,0,0,95,116,100,114,97,119,95,0,100,101,115,116,105,110,97,116,105,111,110,32,112,111,105,110,116,32,110,111,116,32,105,110,32,97,110,121,32,116,114,105,97,110,103,108,101,0,0,0,84,119,111,32,99,108,117,115,116,101,114,115,32,110,97,109,101,100,32,37,115,32,45,32,116,104,101,32,115,101,99,111,110,100,32,119,105,108,108,32,98,101,32,105,103,110,111,114,101,100,10,0,0,0,0,0,72,101,108,118,101,116,105,99,
-97,45,78,97,114,114,111,119,45,66,111,108,100,0,0,0,81,0,0,0,0,0,0,0,116,114,105,112,108,101,111,99,116,97,103,111,110,0,0,0,47,111,114,97,110,103,101,115,53,47,52,0,0,0,0,0,105,109,97,103,101,112,97,116,104,0,0,0,0,0,0,0,49,55,0,0,0,0,0,0,65,103,110,111,100,101,105,110,102,111,95,116,0,0,0,0,37,115,32,118,97,108,117,101,32,37,115,32,62,32,37,100,32,45,32,116,111,111,32,108,97,114,103,101,32,45,32,105,103,110,111,114,101,100,0,0,121,120,32,111,114,116,104,111,103,111,110,97,108,32,99,111,110,115,
-116,114,97,105,110,116,115,0,0,0,0,0,0,0,100,97,114,107,115,108,97,116,101,103,114,97,121,0,0,0,114,101,110,100,101,114,101,114,32,102,111,114,32,37,115,32,105,115,32,117,110,97,118,97,105,108,97,98,108,101,10,0,115,104,111,114,116,112,97,116,104,0,0,0,0,0,0,0,47,111,114,97,110,103,101,115,53,47,51,0,0,0,0,0,37,80,68,70,45,0,0,0,101,110,100,112,97,103,101,10,115,104,111,119,112,97,103,101,10,103,114,101,115,116,111,114,101,10,0,0,0,0,0,0,105,109,97,112,58,109,97,112,0,0,0,0,0,0,0,0,47,98,108,117,
-101,115,52,47,50,0,0,0,0,0,0,0,47,111,114,97,110,103,101,115,53,47,50,0,0,0,0,0,47,111,114,97,110,103,101,115,53,47,49,0,0,0,0,0,114,101,115,101,114,118,101,100,32,112,114,101,102,105,120,32,40,120,109,108,41,32,109,117,115,116,32,110,111,116,32,98,101,32,117,110,100,101,99,108,97,114,101,100,32,111,114,32,98,111,117,110,100,32,116,111,32,97,110,111,116,104,101,114,32,110,97,109,101,115,112,97,99,101,32,110,97,109,101,0,106,112,103,58,120,100,111,116,0,0,0,0,0,0,0,0,47,111,114,97,110,103,101,115,
-52,47,52,0,0,0,0,0,106,112,101,58,115,118,103,0,47,111,114,97,110,103,101,115,52,47,51,0,0,0,0,0,47,111,114,97,110,103,101,115,52,47,50,0,0,0,0,0,66,111,111,107,109,97,110,45,68,101,109,105,73,116,97,108,105,99,0,0,0,0,0,0,47,111,114,97,110,103,101,115,52,47,49,0,0,0,0,0,60,118,58,115,116,114,111,107,101,32,99,111,108,111,114,61,34,0,0,0,0,0,0,0,47,111,114,97,110,103,101,115,51,47,51,0,0,0,0,0,110,101,97,116,111,0,0,0,41,10,0,0,0,0,0,0,100,111,116,95,108,97,121,111,117,116,0,0,0,0,0,0,47,111,114,
-97,110,103,101,115,51,47,50,0,0,0,0,0,95,104,100,114,97,119,95,0,65,103,110,111,100,101,105,110,102,111,95,116,0,0,0,0,99,111,110,100,101,110,115,101,100,0,0,0,0,0,0,0,97,103,114,97,112,104,111,102,32,97,32,98,97,100,32,111,98,106,101,99,116,0,0,0,100,111,117,98,108,101,111,99,116,97,103,111,110,0,0,0,112,111,115,0,0,0,0,0,47,111,114,97,110,103,101,115,51,47,49,0,0,0,0,0,71,68,70,79,78,84,80,65,84,72,61,0,0,0,0,0,49,54,0,0,0,0,0,0,73,109,112,114,111,112,101,114,32,37,115,32,118,97,108,117,101,32,
-37,115,32,45,32,105,103,110,111,114,101,100,0,0,111,114,116,104,111,121,120,0,115,45,62,115,122,32,62,32,48,0,0,0,0,0,0,0,100,97,114,107,115,108,97,116,101,98,108,117,101,0,0,0,108,97,121,111,117,116,32,119,97,115,32,110,111,116,32,100,111,110,101,10,0,0,0,0,115,117,98,115,101,116,0,0,47,103,114,101,121,115,57,47,57,0,0,0,0,0,0,0,106,112,101,103,0,0,0,0,48,32,48,32,48,32,101,100,103,101,99,111,108,111,114,10,0,0,0,0,0,0,0,0,47,98,108,117,101,115,52,47,49,0,0,0,0,0,0,0,47,103,114,101,121,115,57,47,
-56,0,0,0,0,0,0,0,47,103,114,101,121,115,57,47,55,0,0,0,0,0,0,0,99,97,110,110,111,116,32,115,117,115,112,101,110,100,32,105,110,32,101,120,116,101,114,110,97,108,32,112,97,114,97,109,101,116,101,114,32,101,110,116,105,116,121,0,0,0,0,0,106,112,101,58,120,100,111,116,0,0,0,0,0,0,0,0,47,103,114,101,121,115,57,47,54,0,0,0,0,0,0,0,32,50,10,0,0,0,0,0,47,103,114,101,121,115,57,47,53,0,0,0,0,0,0,0,116,101,101,0,0,0,0,0,47,103,114,101,121,115,57,47,52,0,0,0,0,0,0,0,102,105,108,101,32,101,114,114,111,114,0,
-0,0,0,0,0,66,111,111,107,109,97,110,45,76,105,103,104,116,0,0,0,47,103,114,101,121,115,57,47,51,0,0,0,0,0,0,0,60,47,118,58,115,104,97,112,101,62,10,0,0,0,0,0,47,103,114,101,121,115,57,47,50,0,0,0,0,0,0,0,32,40,0,0,0,0,0,0,47,98,108,117,101,115,51,47,51,0,0,0,0,0,0,0,85,115,105,110,103,32,37,115,58,32,37,115,58,37,115,10,0,0,0,0,0,0,0,0,47,103,114,101,121,115,57,47,49,0,0,0,0,0,0,0,95,108,100,114,97,119,95,0,65,103,101,100,103,101,105,110,102,111,95,116,0,0,0,0,72,101,108,118,101,116,105,99,97,45,
-78,97,114,114,111,119,0,0,0,0,0,0,0,0,100,111,117,98,108,101,99,105,114,99,108,101,0,0,0,0,47,103,114,101,121,115,56,47,56,0,0,0,0,0,0,0,112,97,99,107,46,99,0,0,68,79,84,70,79,78,84,80,65,84,72,0,0,0,0,0,49,53,0,0,0,0,0,0,115,99,97,108,101,0,0,0,80,79,73,78,84,45,83,73,90,69,0,0,0,0,0,0,120,121,32,111,114,116,104,111,103,111,110,97,108,32,99,111,110,115,116,114,97,105,110,116,115,0,0,0,0,0,0,0,69,68,95,116,111,95,118,105,114,116,40,111,114,105,103,41,32,33,61,32,78,85,76,76,0,0,0,0,0,0,0,0,103,118,
-82,101,110,100,101,114,74,111,98,115,32,37,115,58,32,37,46,50,102,32,115,101,99,115,46,10,0,0,0,0,100,97,114,107,115,101,97,103,114,101,101,110,0,0,0,0,99,105,114,99,117,105,116,0,47,103,114,101,121,115,56,47,55,0,0,0,0,0,0,0,255,216,255,224,0,0,0,0,37,37,32,37,115,10,0,0,47,103,114,101,121,115,56,47,54,0,0,0,0,0,0,0,47,103,114,101,121,115,56,47,53,0,0,0,0,0,0,0,112,97,114,115,105,110,103,32,102,105,110,105,115,104,101,100,0,0,0,0,0,0,0,0,106,112,101,103,58,120,100,111,116,0,0,0,0,0,0,0,47,103,114,
-101,121,115,56,47,52,0,0,0,0,0,0,0,49,50,48,48,0,0,0,0,47,103,114,101,121,115,56,47,51,0,0,0,0,0,0,0,117,32,33,61,32,118,0,0,47,103,114,101,121,115,56,47,50,0,0,0,0,0,0,0,66,111,111,107,109,97,110,45,76,105,103,104,116,73,116,97,108,105,99,0,0,0,0,0,47,103,114,101,121,115,56,47,49,0,0,0,0,0,0,0,34,47,62,0,0,0,0,0,47,103,114,101,121,115,55,47,55,0,0,0,0,0,0,0,32,118,101,114,115,105,111,110,32,0,0,0,0,0,0,0,47,103,114,101,121,115,55,47,54,0,0,0,0,0,0,0,49,46,54,0,0,0,0,0,115,112,108,105,110,101,115,
-0,72,101,108,118,101,116,105,99,97,45,66,111,108,100,79,98,108,105,113,117,101,0,0,0,115,113,117,97,114,101,0,0,47,103,114,101,121,115,55,47,53,0,0,0,0,0,0,0,102,111,110,116,112,97,116,104,0,0,0,0,0,0,0,0,49,52,0,0,0,0,0,0,112,111,105,110,116,45,115,105,122,101,0,0,0,0,0,0,111,114,116,104,111,120,121,0,46,92,34,32],"i8",L,l.J+102436);D([0,0,0,0,76,97,121,111,117,116,32,119,97,115,32,110,111,116,32,100,111,110,101,46,32,32,77,105,115,115,105,110,103,32,108,97,121,111,117,116,32,112,108,117,103,105,
-110,115,63,32,10,0,100,97,114,107,115,97,108,109,111,110,0,0,0,0,0,0,109,111,100,101,108,0,0,0,47,103,114,101,121,115,55,47,52,0,0,0,0,0,0,0,103,105,102,0,0,0,0,0,103,115,97,118,101,10,0,0,34,32,110,97,109,101,61,34,0,0,0,0,0,0,0,0,47,98,108,117,101,115,51,47,50,0,0,0,0,0,0,0,47,103,114,101,121,115,55,47,51,0,0,0,0,0,0,0,47,103,114,101,121,115,55,47,50,0,0,0,0,0,0,0,112,97,114,115,105,110,103,32,97,98,111,114,116,101,100,0,103,105,102,58,120,100,111,116,0,0,0,0,0,0,0,0,47,103,114,101,121,115,55,47,
-49,0,0,0,0,0,0,0,45,50,10,0,0,0,0,0,47,103,114,101,121,115,54,47,54,0,0,0,0,0,0,0,111,98,106,112,49,45,62,115,122,46,120,32,61,61,32,48,32,38,38,32,111,98,106,112,49,45,62,115,122,46,121,32,61,61,32,48,0,0,0,0,47,103,114,101,121,115,54,47,53,0,0,0,0,0,0,0,66,111,111,107,109,97,110,45,68,101,109,105,0,0,0,0,47,103,114,101,121,115,54,47,52,0,0,0,0,0,0,0,32,101,32,0,0,0,0,0,47,103,114,101,121,115,54,47,51,0,0,0,0,0,0,0,35,32,71,101,110,101,114,97,116,101,100,32,98,121,32,0,99,103,0,0,0,0,0,0,47,103,
-114,101,121,115,54,47,50,0,0,0,0,0,0,0,99,111,114,101,0,0,0,0,49,46,50,0,0,0,0,0,85,110,107,110,111,119,110,32,34,115,112,108,105,110,101,115,34,32,118,97,108,117,101,58,32,34,37,115,34,32,45,32,105,103,110,111,114,101,100,10,0,0,0,0,0,0,0,0,72,101,108,118,101,116,105,99,97,45,66,111,108,100,0,0,114,101,99,116,97,110,103,108,101,0,0,0,0,0,0,0,58,0,0,0,0,0,0,0,37,99,37,108,100,0,0,0,47,103,114,101,121,115,54,47,49,0,0,0,0,0,0,0,115,118,103,0,0,0,0,0,49,51,0,0,0,0,0,0,102,97,99,101,0,0,0,0,111,114,
-116,104,111,95,121,120,0,0,0,0,0,0,0,0,67,0,0,0,0,0,0,0,100,97,114,107,114,101,100,0,95,110,101,97,116,111,95,99,99,0,0,0,0,0,0,0,47,103,114,101,121,115,53,47,53,0,0,0,0,0,0,0,71,73,70,56,0,0,0,0,103,114,101,115,116,111,114,101,10,0,0,0,0,0,0,0,98,108,117,101,0,0,0,0,60,109,97,112,32,105,100,61,34,0,0,0,0,0,0,0,47,98,108,117,101,115,51,47,49,0,0,0,0,0,0,0,47,103,114,101,121,115,53,47,52,0,0,0,0,0,0,0,47,103,114,101,121,115,53,47,51,0,0,0,0,0,0,0,112,97,114,115,101,114,32,110,111,116,32,115,117,115,
-112,101,110,100,101,100,0,0,0,0,106,32,61,61,32,48,0,0,47,103,114,101,121,115,53,47,50,0,0,0,0,0,0,0,112,110,103,58,120,100,111,116,0,0,0,0,0,0,0,0,83,105,110,103,108,101,10,0,47,103,114,101,121,115,53,47,49,0,0,0,0,0,0,0,38,35,52,53,59,0,0,0,47,103,114,101,121,115,52,47,52,0,0,0,0,0,0,0,84,105,109,101,115,45,73,116,97,108,105,99,0,0,0,0,47,103,114,101,121,115,52,47,51,0,0,0,0,0,0,0,110,45,62,99,111,117,110,116,32,43,32,40,42,110,110,41,45,62,99,111,117,110,116,32,61,61,32,78,79,68,69,67,65,82,68,
-32,43,32,49,0,32,108,32,0,0,0,0,0,47,103,114,101,121,115,52,47,50,0,0,0,0,0,0,0,32,80,97,103,101,115,58,32,37,100,10,0,0,0,0,0,47,103,114,101,121,115,52,47,49,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,49,46,52,0,0,0,0,0,101,115,0,0,0,0,0,0,72,101,108,118,101,116,105,99,97,0,0,0,0,0,0,0,120,120,120,0,0,0,0,0,114,101,99,116,0,0,0,0,37,100,0,0,0,0,0,0,47,103,114,101,121,115,51,47,51,0,0,0,0,0,0,0,99,99,32,40,37,100,32,99,101,108,108,115,41,32,97,116,32,40,37,100,44,37,100,41,10,0,0,0,0,0,0,0,112,115,0,0,0,0,0,
-0,49,50,0,0,0,0,0,0,99,111,108,111,114,0,0,0,111,114,116,104,111,103,111,110,97,108,32,99,111,110,115,116,114,97,105,110,116,115,0,0,102,105,120,101,100,0,0,0,117,110,109,97,116,99,104,101,100,32,39,40,39,32,105,110,32,115,116,121,108,101,58,32,37,115,10,0,0,0,0,0,100,97,114,107,111,114,99,104,105,100,0,0,0,0,0,0,82,105,103,104,116,0,0,0,37,115,32,97,116,116,114,105,98,117,116,101,32,118,97,108,117,101,32,109,117,115,116,32,98,101,32,49,32,111,114,32,50,32,45,32,105,103,110,111,114,105,110,103,10,
-0,0,0,47,103,114,101,121,115,51,47,50,0,0,0,0,0,0,0,98,109,112,0,0,0,0,0,32,32,47,66,111,114,100,101,114,32,91,32,48,32,48,32,48,32,93,10,32,32,47,65,99,116,105,111,110,32,60,60,32,47,83,117,98,116,121,112,101,32,47,85,82,73,32,47,85,82,73,32,37,115,32,62,62,10,32,32,47,83,117,98,116,121,112,101,32,47,76,105,110,107,10,47,65,78,78,32,112,100,102,109,97,114,107,10,0,0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,47,97,99,99,101,110,116,56,47,56,0,0,0,0,0,0,47,103,114,101,121,115,51,47,49,0,0,0,0,0,0,0,47,103,114,
-101,101,110,115,57,47,57,0,0,0,0,0,0,112,97,114,115,101,114,32,115,117,115,112,101,110,100,101,100,0,0,0,0,0,0,0,0,115,118,103,58,100,111,116,0,47,103,114,101,101,110,115,57,47,56,0,0,0,0,0,0,12,0,0,0,0,0,0,0,99,105,114,99,111,0,0,0,120,76,97,121,111,117,116,32,0,0,0,0,0,0,0,0,49,48,48,46,48,48,10,0,47,103,114,101,101,110,115,57,47,55,0,0,0,0,0,0,105,110,112,117,116,115,99,97,108,101,0,0,0,0,0,0,47,103,114,101,101,110,115,57,47,54,0,0,0,0,0,0,72,101,108,118,101,116,105,99,97,45,78,97,114,114,111,
-119,45,66,111,108,100,79,98,108,105,113,117,101,0,0,0,0,47,103,114,101,101,110,115,57,47,53,0,0,0,0,0,0,120,100,111,116,0,0,0,0,37,46,48,102,44,37,46,48,102,32,0,0,0,0,0,0,47,103,114,101,101,110,115,57,47,52,0,0,0,0,0,0,99,97,110,110,111,116,32,114,101,97,108,108,111,99,32,111,112,115,0,0,0,0,0,0,32,84,105,116,108,101,58,32,0,0,0,0,0,0,0,0,47,103,114,101,101,110,115,57,47,51,0,0,0,0,0,0,117,32,61,61,32,85,70,95,102,105,110,100,40,117,41,0,120,100,111,116,118,101,114,115,105,111,110,0,0,0,0,0,114,
-117,101,0,0,0,0,0,67,111,117,114,105,101,114,45,79,98,108,105,113,117,101,0,99,111,109,112,111,110,101,110,116,0,0,0,0,0,0,0,37,46,53,103,44,37,46,53,103,44,37,46,53,103,44,37,46,53,103,32,0,0,0,0,102,111,110,116,110,97,109,101,58,32,34,37,115,34,32,114,101,115,111,108,118,101,100,32,116,111,58,32,37,115,10,0,47,103,114,101,101,110,115,57,47,50,0,0,0,0,0,0,98,98,91,37,115,93,32,37,46,53,103,32,37,46,53,103,32,37,46,53,103,32,37,46,53,103,10,0,0,0,0,0,103,100,0,0,0,0,0,0,103,101,116,115,112,108,105,
-110,101,112,111,105,110,116,115,58,32,110,111,32,115,112,108,105,110,101,32,112,111,105,110,116,115,32,97,118,97,105,108,97,98,108,101,32,102,111,114,32,101,100,103,101,32,40,37,115,44,37,115,41,10,0,0,0,49,49,0,0,0,0,0,0,60,70,79,78,84,62,0,0,111,114,116,104,111,0,0,0,100,105,115,116,111,114,116,105,111,110,0,0,0,0,0,0,116,114,117,110,99,97,116,105,110,103,32,115,116,121,108,101,32,39,37,115,39,10,0,0,100,97,114,107,111,114,97,110,103,101,0,0,0,0,0,0,114,32,38,38,32,114,114,0,114,0,0,0,0,0,0,0,115,
-116,114,101,115,115,119,116,0,0,0,0,0,0,0,0,47,103,114,101,101,110,115,57,47,49,0,0,0,0,0,0,115,104,97,112,101,102,105,108,101,0,0,0,0,0,0,0,66,77,0,0,0,0,0,0,32,93,10,0,0,0,0,0,99,95,99,110,116,32,61,61,32,48,0,0,0,0,0,0,105,110,32,114,111,117,116,101,115,112,108,105,110,101,115,44,32,99,97,110,110,111,116,32,102,105,110,100,32,78,79,82,77,65,76,32,101,100,103,101,10,0,0,0,0,0,0,0,69,114,114,111,114,32,105,110,105,116,105,97,108,105,122,105,110,103,32,102,111,114,32,100,101,102,108,97,116,105,111,
-110,10,0,0,0,0,0,0,0,99,97,110,39,116,32,102,105,110,100,32,108,105,98,114,97,114,121,32,102,105,108,101,32,37,115,10,0,0,0,0,0,100,101,102,97,117,108,116,32,0,0,0,0,0,0,0,0,102,111,114,99,101,108,97,98,101,108,115,0,0,0,0,0,47,97,99,99,101,110,116,56,47,55,0,0,0,0,0,0,47,103,114,101,101,110,115,56,47,56,0,0,0,0,0,0,115,111,108,105,100,0,0,0,37,115,37,100,32,110,111,100,101,115,32,37,100,32,101,100,103,101,115,32,37,100,32,105,116,101,114,32,37,46,50,102,32,115,101,99,10,0,0,0,115,112,97,110,45,62,
-102,111,110,116,0,0,0,0,0,0,95,110,101,119,95,114,97,110,107,0,0,0,0,0,0,0,45,62,0,0,0,0,0,0,47,103,114,101,101,110,115,56,47,55,0,0,0,0,0,0,105,108,108,101,103,97,108,32,99,104,97,114,97,99,116,101,114,40,115,41,32,105,110,32,112,117,98,108,105,99,32,105,100,0,0,0,0,0,0,0,47,97,99,99,101,110,116,56,47,54,0,0,0,0,0,0,117,115,101,114,111,117,116,58,32,99,111,117,108,100,32,110,111,116,32,97,108,108,111,99,97,116,101,32,109,101,109,111,114,121,10,0,0,0,0,0,68,97,109,112,105,110,103,0,103,99,58,32,79,
-117,116,32,111,102,32,109,101,109,111,114,121,10,0,0,0,0,0,0,101,112,115,58,100,111,116,0,47,103,114,101,101,110,115,56,47,54,0,0,0,0,0,0,102,100,112,32,100,111,101,115,32,110,111,116,32,115,117,112,112,111,114,116,32,115,116,97,114,116,61,115,101,108,102,32,45,32,105,103,110,111,114,105,110,103,10,0,0,0,0,0,105,115,32,117,110,100,101,102,105,110,101,100,46,32,82,101,118,101,114,116,105,110,103,32,116,111,32,116,104,101,32,115,104,111,114,116,101,115,116,32,112,97,116,104,32,109,111,100,101,108,46,
-10,0,0,0,0,32,32,0,0,0,0,0,0,48,0,0,0,0,0,0,0,37,46,48,51,102,0,0,0,37,100,0,0,0,0,0,0,76,101,116,116,101,114,10,0,47,103,114,101,101,110,115,56,47,53,0,0,0,0,0,0,37,46,48,51,108,102,32,0,45,45,0,0,0,0,0,0,47,103,114,101,101,110,115,56,47,52,0,0,0,0,0,0,72,101,108,118,101,116,105,99,97,45,78,97,114,114,111,119,0,0,0,0,0,0,0,0,95,99,108,111,110,101,95,37,100,0,0,0,0,0,0,0,47,103,114,101,101,110,115,56,47,51,0,0,0,0,0,0,116,104,101,32,97,115,112,101,99,116,32,97,116,116,114,105,98,117,116,101,32,104,
-97,115,32,98,101,101,110,32,100,105,115,97,98,108,101,100,32,100,117,101,32,116,111,32,105,109,112,108,101,109,101,110,116,97,116,105,111,110,32,102,108,97,119,115,32,45,32,97,116,116,114,105,98,117,116,101,32,105,103,110,111,114,101,100,46,10,0,0,0,0,0,0,0,0,47,103,114,101,101,110,115,56,47,50,0,0,0,0,0,0,109,97,107,101,80,111,108,121,58,32,117,110,107,110,111,119,110,32,115,104,97,112,101,32,116,121,112,101,32,37,115,10,0,0,0,0,0,0,0,0,78,68,95,105,110,40,114,105,103,104,116,41,46,115,105,122,101,
-32,43,32,78,68,95,111,117,116,40,114,105,103,104,116,41,46,115,105,122,101,32,61,61,32,48,0,0,0,0,0,32,109,32,0,0,0,0,0,110,111,32,109,101,109,111,114,121,32,102,114,111,109,32,122,109,97,108,108,111,99,40,41,10,0,0,0,0,0,0,0,47,97,99,99,101,110,116,51,47,50,0,0,0,0,0,0,35,0,0,0,0,0,0,0,47,103,114,101,101,110,115,56,47,49,0,0,0,0,0,0,95,100,114,97,119,95,0,0,112,108,105,110,101,0,0,0,67,111,117,114,105,101,114,45,66,111,108,100,79,98,108,105,113,117,101,0,0,0,0,0,100,105,103,114,97,112,104,0,98,111,
-120,51,100,0,0,0,37,46,50,102,0,0,0,0,82,79,85,78,68,40,71,68,95,98,98,40,103,41,46,76,76,46,120,41,32,61,61,32,48,0,0,0,0,0,0,0,47,103,114,101,101,110,115,55,47,55,0,0,0,0,0,0,99,111,108,117,109,110,32,109,97,106,111,114,0,0,0,0,110,111,110,101,0,0,0,0,49,48,0,0,0,0,0,0,73,108,108,101,103,97,108,32,118,97,108,117,101,32,37,115,32,102,111,114,32,65,76,73,71,78,32,45,32,105,103,110,111,114,101,100,10,0,0,0,120,32,97,110,100,32,121,32,115,99,97,108,105,110,103,0,111,114,105,101,110,116,97,116,105,111,
-110,0,0,0,0,0,117,110,109,97,116,99,104,101,100,32,39,41,39,32,105,110,32,115,116,121,108,101,58,32,37,115,10,0,0,0,0,0,100,97,114,107,111,108,105,118,101,103,114,101,101,110,0,0,108,97,121,111,117,116,32,97,98,111,114,116,101,100,10,0,47,103,114,101,101,110,115,55,47,54,0,0,0,0,0,0,97,108,105,99,101,98,108,117,101,0,0,0,0,0,0,0,112,115,0,0,0,0,0,0,91,32,47,82,101,99,116,32,91,32,0,0,0,0,0,0,98,97,115,101,32,114,101,102,101,114,101,114,10,0,0,0,47,103,114,101,101,110,115,55,47,53,0,0,0,0,0,0,110,
-0,0,0,0,0,0,0,65,103,114,97,112,104,105,110,102,111,95,116,0,0,0,0,47,103,114,101,101,110,115,55,47,52,0,0,0,0,0,0,116,101,120,116,32,100,101,99,108,97,114,97,116,105,111,110,32,110,111,116,32,119,101,108,108,45,102,111,114,109,101,100,0,0,0,0,0,0,0,0,47,97,99,99,101,110,116,56,47,53,0,0,0,0,0,0,37,115,32,45,62,32,37,115,58,32,104,101,97,100,32,110,111,116,32,105,110,115,105,100,101,32,104,101,97,100,32,99,108,117,115,116,101,114,32,37,115,10,0,0,0,0,0,0,47,103,114,101,101,110,115,55,47,51,0,0,0,
-0,0,0,112,115,58,100,111,116,0,0,47,103,114,101,101,110,115,55,47,50,0,0,0,0,0,0,73,110,99,104,101,115,10,0,32,45,62,32,0,0,0,0,37,108,102,0,0,0,0,0,47,103,114,101,101,110,115,55,47,49,0,0,0,0,0,0,108,105,103,104,116,103,114,101,121,0,0,0,0,0,0,0,72,101,108,118,101,116,105,99,97,45,78,97,114,114,111,119,45,79,98,108,105,113,117,101,0,0,0,0,0,0,0,0,109,101,109,111,114,121,32,101,120,104,97,117,115,116,101,100,0,0,0,0,0,0,0,0,47,103,114,101,101,110,115,54,47,54,0,0,0,0,0,0,99,108,117,115,116,101,114,
-0,100,105,109,0,0,0,0,0,97,114,116,105,99,117,108,97,116,105,111,110,95,112,111,115,0,0,0,0,0,0,0,0,60,118,58,112,97,116,104,32,118,61,34,0,0,0,0,0,47,103,114,101,101,110,115,54,47,53,0,0,0,0,0,0,99,111,109,112,111,117,110,100,69,100,103,101,115,58,32,99,111,117,108,100,32,110,111,116,32,99,111,110,115,116,114,117,99,116,32,111,98,115,116,97,99,108,101,115,32,45,32,102,97,108,108,105,110,103,32,98,97,99,107,32,116,111,32,115,116,114,97,105,103,104,116,32,108,105,110,101,32,101,100,103,101,115,10,
-0,0,0,0,0,114,111,117,116,101,115,112,108,105,110,101,115,105,110,105,116,58,32,99,97,110,110,111,116,32,97,108,108,111,99,97,116,101,32,112,115,10,0,0,0,32,45,97,110,99,104,111,114,32,101,0,0,0,0,0,0,68,117,109,109,121,61,37,100,10,0,0,0,0,0,0,0,47,103,114,101,101,110,115,54,47,52,0,0,0,0,0,0,114,0,0,0,0,0,0,0,37,100,32,0,0,0,0,0,111,108,121,108,105,110,101,0,67,111,117,114,105,101,114,45,66,111,108,100,0,0,0,0,37,100,32,37,100,32,37,100,32,37,100,0,0,0,0,0,103,114,97,112,104,0,0,0,101,112,115,58,
-112,115,0,0,102,111,108,100,101,114,0,0,37,46,53,103,44,37,46,53,103,44,37,46,53,103,44,37,46,53,103,0,0,0,0,0,47,103,114,101,101,110,115,54,47,51,0,0,0,0,0,0,114,111,119,32,109,97,106,111,114,0,0,0,0,0,0,0,115,104,97,112,101,102,105,108,101,0,0,0,0,0,0,0,103,108,111,98,97,108,0,0,57,0,0,0,0,0,0,0,69,78,84,69,82,0,0,0,115,99,97,108,101,120,121,0,115,107,101,119,0,0,0,0,110,101,115,116,105,110,103,32,110,111,116,32,97,108,108,111,119,101,100,32,105,110,32,115,116,121,108,101,58,32,37,115,10,0,0,0,
-0,0,0,0,100,97,114,107,109,97,103,101,110,116,97,0,0,0,0,0,98,0,0,0,0,0,0,0,37,100,32,110,111,100,101,115,32,37,46,50,102,32,115,101,99,10,0,0,0,0,0,0,47,103,114,101,101,110,115,54,47,50,0,0,0,0,0,0,47,112,97,116,104,98,111,120,32,123,10,32,32,32,32,47,88,32,101,120,99,104,32,110,101,103,32,37,46,53,103,32,115,117,98,32,100,101,102,10,32,32,32,32,47,89,32,101,120,99,104,32,37,46,53,103,32,115,117,98,32,100,101,102,10,32,32,32,32,47,120,32,101,120,99,104,32,110,101,103,32,37,46,53,103,32,115,117,98,
-32,100,101,102,10,32,32,32,32,47,121,32,101,120,99,104,32,37,46,53,103,32,115,117,98,32,100,101,102,10,32,32,32,32,110,101,119,112,97,116,104,32,120,32,121,32,109,111,118,101,116,111,10,32,32,32,32,88,32,121,32,108,105,110,101,116,111,10,32,32,32,32,88,32,89,32,108,105,110,101,116,111,10,32,32,32,32,120,32,89,32,108,105,110,101,116,111,10,32,32,32,32,99,108,111,115,101,112,97,116,104,32,115,116,114,111,107,101,10,125,32,100,101,102,10,0,0,37,33,80,83,45,65,100,111,98,101,45,0,0,0,0,0,32,37,115,32,
-97,108,105,103,110,101,100,116,101,120,116,10,0,0,0,0,0,0,0,0,60,47,109,97,112,62,10,0,100,111,116,116,101,100,0,0,47,103,114,101,101,110,115,54,47,49,0,0,0,0,0,0,109,105,110,99,114,111,115,115,46,99,0,0,0,0,0,0,47,103,114,101,101,110,115,53,47,53,0,0,0,0,0,0,88,77,76,32,100,101,99,108,97,114,97,116,105,111,110,32,110,111,116,32,119,101,108,108,45,102,111,114,109,101,100,0,47,97,99,99,101,110,116,56,47,52,0,0,0,0,0,0,106,112,103,58,100,111,116,0,47,103,114,101,101,110,115,53,47,52,0,0,0,0,0,0,47,
-103,114,101,101,110,115,53,47,51,0,0,0,0,0,0,67,101,110,116,101,114,10,0,103,114,97,112,104,32,0,0,47,103,114,101,101,110,115,53,47,50,0,0,0,0,0,0,72,101,108,118,101,116,105,99,97,45,78,97,114,114,111,119,45,66,111,108,100,0,0,0,58,0,0,0,0,0,0,0,110,101,116,119,111,114,107,32,115,105,109,112,108,101,120,58,32,0,0,0,0,0,0,0,47,103,114,101,101,110,115,53,47,49,0,0,0,0,0,0,37,115,37,115,37,115,0,0,111,117,116,32,111,102,32,109,101,109,111,114,121,10,0,0,32,119,105,100,116,104,58,32,37,100,59,32,104,
-101,105,103,104,116,58,32,37,100,34,32,102,105,108,108,101,100,61,34,102,97,108,115,101,34,62,0,47,103,114,101,101,110,115,52,47,52,0,0,0,0,0,0,32,45,97,110,99,104,111,114,32,119,0,0,0,0,0,0,98,111,120,0,0,0,0,0,47,103,114,101,101,110,115,52,47,51,0,0,0,0,0,0,84,32,0,0,0,0,0,0,114,116,104,111,0,0,0,0,115,104,97,112,101,0,0,0,109,111,110,111,115,112,97,99,101,0,0,0,0,0,0,0,115,117,98,103,114,97,112,104,0,0,0,0,0,0,0,0,116,97,98,0,0,0,0,0,101,44,37,46,53,103,44,37,46,53,103,32,0,0,0,0,34,34,0,0,0,0,
-0,0,47,103,114,101,101,110,115,52,47,50,0,0,0,0,0,0,97,114,114,97,121,32,112,97,99,107,105,110,103,58,32,37,115,32,37,100,32,114,111,119,115,32,37,100,32,99,111,108,117,109,110,115,10,0,0,0,108,111,99,97,108,0,0,0,56,0,0,0,0,0,0,0,69,70,84,0,0,0,0,0,111,108,100,32,115,99,97,108,105,110,103,0,0,0,0,0,112,101,114,105,112,104,101,114,105,101,115,0,0,0,0,0,105,110,32,99,108,117,115,116,101,114,32,37,115,10,0,0,100,97,114,107,107,104,97,107,105,0,0,0,0,0,0,0,105,110,118,105,115,0,0,0,109,97,106,111,114,
-105,122,97,116,105,111,110,10,0,0,0,47,103,114,101,101,110,115,52,47,49,0,0,0,0,0,0,105,110,32,108,97,98,101,108,32,111,102,32,103,114,97,112,104,32,37,115,10,0,0,0,112,110,103,0,0,0,0,0,32,109,111,118,101,116,111,32,0,0,0,0,0,0,0,0,115,116,121,108,101,0,0,0,34,62,10,0,0,0,0,0,47,103,114,101,101,110,115,51,47,51,0,0,0,0,0,0,108,97,98,101,108,0,0,0,47,103,114,101,101,110,115,51,47,50,0,0,0,0,0,0,105,110,99,111,109,112,108,101,116,101,32,109,97,114,107,117,112,32,105,110,32,112,97,114,97,109,101,116,
-101,114,32,101,110,116,105,116,121,0,0,0,115,121,110,116,97,120,32,101,114,114,111,114,0,0,0,0,47,97,99,99,101,110,116,56,47,51,0,0,0,0,0,0,95,95,0,0,0,0,0,0,71,68,95,114,97,110,107,40,103,41,91,114,93,46,110,32,60,61,32,71,68,95,114,97,110,107,40,103,41,91,114,93,46,97,110,0,0,0,0,0,106,112,101,58,100,111,116,0,47,103,114,101,101,110,115,51,47,49,0,0,0,0,0,0,104,101,97,100,32,110,111,100,101,32,37,115,32,105,110,115,105,100,101,32,116,97,105,108,32,99,108,117,115,116,101,114,32,37,115,10,0,0,0,0,
-37,115,58,32,0,0,0,0,47,103,110,98,117,57,47,57,0,0,0,0,0,0,0,0,80,111,114,116,114,97,105,116,10,0,0,0,0,0,0,0,116,97,105,108,32,110,111,100,101,32,37,115,32,105,110,115,105,100,101,32,104,101,97,100,32,99,108,117,115,116,101,114,32,37,115,10,0,0,0,0,47,103,110,98,117,57,47,56,0,0,0,0,0,0,0,0,72,101,108,118,101,116,105,99,97,45,66,111,108,100,79,98,108,105,113,117,101,0,0,0,104,101,97,100,32,99,108,117,115,116,101,114,32,37,115,32,105,110,115,105,100,101,32,116,97,105,108,32,99,108,117,115,116,101,
-114,32,37,115,10,0,71,68,95,109,105,110,114,97,110,107,40,103,41,32,61,61,32,48,0,0,0,0,0,0,47,103,110,98,117,57,47,55,0,0,0,0,0,0,0,0,116,97,105,108,32,99,108,117,115,116,101,114,32,37,115,32,105,110,115,105,100,101,32,104,101,97,100,32,99,108,117,115,116,101,114,32,37,115,10,0,83,99,97,110,110,105,110,103,32,103,114,97,112,104,32,37,115,44,32,37,100,32,110,111,100,101,115,10,0,0,0,0,32,60,118,58,115,104,97,112,101,32,115,116,121,108,101,61,34,112,111,115,105,116,105,111,110,58,97,98,115,111,108,
-117,116,101,59,32,0,0,0,0,47,103,110,98,117,57,47,54,0,0,0,0,0,0,0,0,32,37,100,125,0,0,0,0,99,108,117,115,116,101,114,32,99,121,99,108,101,32,37,115,32,45,45,32,37,115,32,110,111,116,32,115,117,112,112,111,114,116,101,100,10,0,0,0,47,103,110,98,117,57,47,53,0,0,0,0,0,0,0,0,116,32,37,100,32,0,0,0,111,0,0,0,0,0,0,0,110,97,109,101,0,0,0,0,67,111,117,114,105,101,114,0,110,111,100,101,0,0,0,0,114,0,0,0,0,0,0,0,110,111,116,101,0,0,0,0,115,44,37,46,53,103,44,37,46,53,103,32,0,0,0,0,115,117,98,103,114,97,
-112,104,0,0,0,0,0,0,0,0,47,103,110,98,117,57,47,52,0,0,0,0,0,0,0,0,32,114,49,32,37,102,32,114,50,32,37,102,10,0,0,0,55,0,0,0,0,0,0,0,73,71,72,84,0,0,0,0,111,115,99,97,108,101,0,0,115,105,100,101,115,0,0,0,116,114,97,110,115,112,97,114,101,110,116,0,0,0,0,0,100,97,114,107,103,114,101,121,0,0,0,0,0,0,0,0,122,119,110,106,0,0,0,0,95,99,99,95,0,0,0,0,99,111,110,118,101,114,116,32,103,114,97,112,104,58,32,0,47,103,110,98,117,57,47,51,0,0,0,0,0,0,0,0,137,80,78,71,13,10,26,10,0,0,0,0,0,0,0,0,32,47,37,115,
-32,115,101,116,95,102,111,110,116,10,0,0,122,119,106,0,0,0,0,0,34,47,62,10,0,0,0,0,47,103,110,98,117,57,47,50,0,0,0,0,0,0,0,0,122,101,116,97,0,0,0,0,99,109,97,112,58,109,97,112,0,0,0,0,0,0,0,0,47,103,110,98,117,57,47,49,0,0,0,0,0,0,0,0,109,117,115,116,32,110,111,116,32,117,110,100,101,99,108,97,114,101,32,112,114,101,102,105,120,0,0,0,0,0,0,0,47,97,99,99,101,110,116,56,47,50,0,0,0,0,0,0,121,117,109,108,0,0,0,0,106,112,101,103,58,100,111,116,0,0,0,0,0,0,0,0,47,103,110,98,117,56,47,56,0,0,0,0,0,0,0,
-0,121,101,110,0,0,0,0,0,106,112,101,103,58,115,118,103,0,0,0,0,0,0,0,0,47,103,110,98,117,56,47,55,0,0,0,0,0,0,0,0,35,32,80,97,103,101,115,58,32,37,100,10,0,0,0,0,121,97,99,117,116,101,0,0,47,103,110,98,117,56,47,54,0,0,0,0,0,0,0,0,72,101,108,118,101,116,105,99,97,45,79,98,108,105,113,117,101,0,0,0,0,0,0,0,120,105,0,0,0,0,0,0,47,103,110,98,117,56,47,53,0,0,0,0,0,0,0,0,101,100,103,101,0,0,0,0,119,101,105,101,114,112,0,0,32,45,45,62,10,0,0,0,47,103,110,98,117,56,47,52,0,0,0,0,0,0,0,0,34,0,0,0,0,0,0,
-0,117,117,109,108,0,0,0,0,47,103,110,98,117,56,47,51,0,0,0,0,0,0,0,0,70,32,0,0,0,0,0,0,115,111,117,114,99,101,32,112,111,105,110,116,32,110,111,116,32,105,110,32,97,110,121,32,116,114,105,97,110,103,108,101,0,0,0,0,0,0,0,0,111,110,101,0,0,0,0,0,117,112,115,105,108,111,110,0,66,111,111,107,109,97,110,45,76,105,103,104,116,73,116,97,108,105,99,0,0,0,0,0,119,0,0,0,0,0,0,0,111,99,116,97,103,111,110,0,37,46,53,103,32,37,46,53,103,0,0,0,0,0,0,0,100,105,103,114,97,112,104,0,47,103,110,98,117,56,47,50,0,
-0,0,0,0,0,0,0,114,111,111,116,32,37,100,32,40,37,102,41,32,37,100,32,40,37,102,41,10,0,0,0,54,0,0,0,0,0,0,0,98,111,120,0,0,0,0,0,97,108,105,103,110,0,0,0,105,112,115,101,112,0,0,0,111,114,100,101,114,105,110,103,0,0,0,0,0,0,0,0,108,105,103,104,116,103,114,101,121,0,0,0,0,0,0,0,114,101,112,111,115,105,116,105,111,110,32,37,115,10,0,0,100,97,114,107,103,114,101,101,110,0,0,0,0,0,0,0,117,112,115,105,104,0,0,0,97,103,114,111,111,116,32,111,102,32,97,32,98,97,100,32,111,98,106,101,99,116,0,0,109,111,100,
-101,108,32,37,100,32,115,109,97,114,116,95,105,110,105,116,32,37,100,32,115,116,114,101,115,115,119,116,32,37,100,32,105,116,101,114,97,116,105,111,110,115,32,37,100,32,116,111,108,32,37,102,10,0,0,0,0,0,0,0,0,47,103,110,98,117,56,47,49,0,0,0,0,0,0,0,0,40,108,105,98,41,0,0,0,32,101,108,108,105,112,115,101,95,112,97,116,104,32,115,116,114,111,107,101,10,0,0,0,117,109,108,0,0,0,0,0,44,37,100,44,37,100,0,0,97,114,101,97,0,0,0,0,47,103,110,98,117,55,47,55,0,0,0,0,0,0,0,0,105,109,97,103,101,115,99,97,
-108,101,0,0,0,0,0,0,83,121,110,116,97,120,32,101,114,114,111,114,58,32,110,111,110,45,115,112,97,99,101,32,115,116,114,105,110,103,32,117,115,101,100,32,98,101,102,111,114,101,32,60,84,65,66,76,69,62,0,0,0,0,0,0,117,103,114,97,118,101,0,0,109,100,115,77,111,100,101,108,58,32,100,101,108,116,97,32,61,32,37,102,10,0,0,0,47,103,110,98,117,55,47,54,0,0,0,0,0,0,0,0,117,110,98,111,117,110,100,32,112,114,101,102,105,120,0,0,114,111,111,116,32,61,32,37,115,10,0,0,0,0,0,0,47,97,99,99,101,110,116,56,47,49,
-0,0,0,0,0,0,117,99,105,114,99,0,0,0,103,105,102,58,100,111,116,0,47,103,110,98,117,55,47,53,0,0,0,0,0,0,0,0,117,97,114,114,0,0,0,0,47,103,110,98,117,55,47,52,0,0,0,0,0,0,0,0,35,32,84,105,116,108,101,58,32,37,115,10,0,0,0,0,117,97,99,117,116,101,0,0,47,103,110,98,117,55,47,51,0,0,0,0,0,0,0,0,72,101,108,118,101,116,105,99,97,45,66,111,108,100,0,0,117,65,114,114,0,0,0,0,47,103,110,98,117,55,47,50,0,0,0,0,0,0,0,0,115,104,97,112,101,0,0,0,116,114,97,100,101,0,0,0,32,32,32,32,32,32,60,33,45,45,32,0,0,0,
-0,0,47,103,110,98,117,55,47,49,0,0,0,0,0,0,0,0,32,45,102,111,110,116,32,123,0,0,0,0,0,0,0,0,116,105,109,101,115,0,0,0,47,103,110,98,117,54,47,54,0,0,0,0,0,0,0,0,101,32,0,0,0,0,0,0,105,110,101,0,0,0,0,0,116,105,108,100,101,0,0,0,108,105,103,104,116,0,0,0,116,97,105,108,112,111,114,116,0,0,0,0,0,0,0,0,115,101,112,116,97,103,111,110,0,0,0,0,0,0,0,0,65,103,114,97,112,104,105,110,102,111,95,116,0,0,0,0,115,97,109,112,108,101,112,111,105,110,116,115,0,0,0,0,115,116,114,105,99,116,0,0,47,103,110,98,117,
-54,47,53,0,0,0,0,0,0,0,0,97,32,37,102,32,98,32,37,102,32,99,32,37,102,32,100,32,37,102,32,114,32,37,102,10,0,0,0,0,0,0,0,53,0,0,0,0,0,0,0,60,66,82,62,0,0,0,0,118,112,115,99,0,0,0,0,65,103,114,97,112,104,105,110,102,111,95,116,0,0,0,0,112,104,97,115,101,0,0,0,98,103,99,111,108,111,114,0,100,97,114,107,103,114,97,121,0,0,0,0,0,0,0,0,116,104,111,114,110,0,0,0,110,101,97,116,111,105,110,105,116,46,99,0,0,0,0,0,47,103,110,98,117,54,47,52,0,0,0,0,0,0,0,0,119,101,98,112,0,0,0,0,32,101,108,108,105,112,115,
-101,95,112,97,116,104,32,102,105,108,108,10,0,0,0,0,0,116,104,105,110,115,112,0,0,37,100,44,37,100,0,0,0,47,103,110,98,117,54,47,51,0,0,0,0,0,0,0,0,37,115,32,105,110,32,108,105,110,101,32,37,100,32,10,0,116,104,101,116,97,115,121,109,0,0,0,0,0,0,0,0,47,103,110,98,117,54,47,50,0,0,0,0,0,0,0,0,99,97,110,110,111,116,32,99,104,97,110,103,101,32,115,101,116,116,105,110,103,32,111,110,99,101,32,112,97,114,115,105,110,103,32,104,97,115,32,98,101,103,117,110,0,0,0,0,116,104,101,116,97,0,0,0,112,110,103,58,
-100,111,116,0,47,103,110,98,117,54,47,49,0,0,0,0,0,0,0,0,116,104,101,114,101,52,0,0,47,103,110,98,117,53,47,53,0,0,0,0,0,0,0,0,35,32,71,101,110,101,114,97,116,101,100,32,98,121,32,37,115,32,118,101,114,115,105,111,110,32,37,115,32,40,37,115,41,10,0,0,0,0,0,0,116,97,117,0,0,0,0,0,76,97,121,111,117,116,32,116,121,112,101,58,32,34,37,115,34,32,110,111,116,32,114,101,99,111,103,110,105,122,101,100,46,32,85,115,101,32,111,110,101,32,111,102,58,37,115,10,0,0,0,0,0,0,0,0,99,114,111,119,0,0,0,0,47,103,110,
-98,117,53,47,52,0,0,0,0,0,0,0,0,72,101,108,118,101,116,105,99,97,0,0,0,0,0,0,0,115,122,108,105,103,0,0,0,110,32,33,61,32,78,68,95,110,101,120,116,40,110,41,0,47,103,110,98,117,53,47,51,0,0,0,0,0,0,0,0,119,105,100,116,104,0,0,0,115,117,112,101,0,0,0,0,121,101,108,108,111,119,0,0,95,115,112,97,110,95,37,100,0,0,0,0,0,0,0,0,47,103,110,98,117,53,47,50,0,0,0,0,0,0,0,0,125,0,0,0,0,0,0,0,47,97,99,99,101,110,116,55,47,55,0,0,0,0,0,0,115,117,112,51,0,0,0,0,47,103,110,98,117,53,47,49,0,0,0,0,0,0,0,0,69,32,
-0,0,0,0,0,0,97,108,115,101,0,0,0,0,115,117,112,50,0,0,0,0,66,111,111,107,109,97,110,45,76,105,103,104,116,0,0,0,104,101,97,100,112,111,114,116,0,0,0,0,0,0,0,0,104,101,120,97,103,111,110,0,114,101,99,111,114,100,0,0,93,59,10,0,0,0,0,0,47,103,110,98,117,52,47,52,0,0,0,0,0,0,0,0,112,105,110,102,111,0,0,0,37,108,102,0,0,0,0,0,52,0,0,0,0,0,0,0,85,115,105,110,103,32,100,101,102,97,117,108,116,32,99,97,108,99,117,108,97,116,105,111,110,32,102,111,114,32,114,111,111,116,32,110,111,100,101,10,0,0,0,0,0,0,
-0,0,73,108,108,101,103,97,108,32,97,116,116,114,105,98,117,116,101,32,37,115,32,105,110,32,37,115,32,45,32,105,103,110,111,114,101,100,10,0,0,0,99,111,109,112,114,101,115,115,0,0,0,0,0,0,0,0,69,68,95,116,111,95,118,105,114,116,40,111,114,105,103,41,32,61,61,32,78,85,76,76,0,0,0,0,0,0,0,0,102,105,108,108,99,111,108,111,114,0,0,0,0,0,0,0,37,115,32,37,115,10,0,0,100,97,114,107,103,111,108,100,101,110,114,111,100,0,0,0,115,117,112,49,0,0,0,0,78,68,95,105,100,40,110,112,41,32,61,61,32,105,0,0,47,103,110,
-98,117,52,47,51,0,0,0,0,0,0,0,0,97,103,116,97,105,108,40,101,41,32,61,61,32,85,70,95,102,105,110,100,40,97,103,116,97,105,108,40,101,41,41,0,87,69,66,80,0,0,0,0,99,108,111,115,101,112,97,116,104,32,115,116,114,111,107,101,10,0,0,0,0,0,0,0,115,117,112,0,0,0,0,0,37,100,44,37,100,44,37,100,44,37,100,0,0,0,0,0,80,97,99,107,105,110,103,58,32,99,111,109,112,117,116,101,32,103,114,105,100,32,115,105,122,101,10,0,0,0,0,0,47,103,110,98,117,52,47,50,0,0,0,0,0,0,0,0,13,0,0,0,0,0,0,0,115,117,109,0,0,0,0,0,47,
-103,110,98,117,52,47,49,0,0,0,0,0,0,0,0,114,101,113,117,101,115,116,101,100,32,102,101,97,116,117,114,101,32,114,101,113,117,105,114,101,115,32,88,77,76,95,68,84,68,32,115,117,112,112,111,114,116,32,105,110,32,69,120,112,97,116,0,0,0,0,0,115,117,98,101,0,0,0,0,47,97,99,99,101,110,116,55,47,54,0,0,0,0,0,0,115,118,103,58,109,97,112,0,47,103,110,98,117,51,47,51,0,0,0,0,0,0,0,0,115,117,98,0,0,0,0,0,47,103,110,98,117,51,47,50,0,0,0,0,0,0,0,0,115,112,97,100,101,115,0,0,35,70,73,71,32,51,46,50,10,0,0,0,
-0,0,0,0,47,103,110,98,117,51,47,49,0,0,0,0,0,0,0,0,67,111,117,114,105,101,114,45,66,111,108,100,79,98,108,105,113,117,101,0,0,0,0,0,115,105,109,0,0,0,0,0,108,112,32,33,61,32,99,108,112,0,0,0,0,0,0,0,47,100,97,114,107,50,56,47,56,0,0,0,0,0,0,0,115,105,103,109,97,102,0,0,119,104,105,116,101,0,0,0,47,100,97,114,107,50,56,47,55,0,0,0,0,0,0,0,99,111,109,98,105,65,82,32,61,32,37,108,102,10,0,0,32,45,116,101,120,116,32,123,0,0,0,0,0,0,0,0,41,10,0,0,0,0,0,0,115,105,103,109,97,0,0,0,47,100,97,114,107,50,56,
-47,54,0,0,0,0,0,0,0,37,115,37,100,32,45,0,0,111,109,112,111,117,110,100,0,32,40,0,0,0,0,0,0,115,104,121,0,0,0,0,0,66,111,111,107,109,97,110,45,68,101,109,105,73,116,97,108,105,99,0,0,0,0,0,0,107,101,121,0,0,0,0,0,99,111,110,115,116,114,97,105,110,116,46,99,0,0,0,0,112,101,110,116,97,103,111,110,0,0,0,0,0,0,0,0,109,97,120,105,116,101,114,0,37,46,53,103,0,0,0,0,10,0,0,0,0,0,0,0,47,100,97,114,107,50,56,47,53,0,0,0,0,0,0,0,108,105,98,112,97,99,107,58,32,100,105,115,99,32,61,32,37,102,32,40,32,60,32,48,
-41,10,0,0,0,0,0,0,92,78,0,0,0,0,0,0,51,0,0,0,0,0,0,0,115,114,99,0,0,0,0,0,115,99,97,108,105,110,103,0,104,101,105,103,104,116,0,0,112,101,110,99,111,108,111,114,0,0,0,0,0,0,0,0,100,97,114,107,99,121,97,110,0,0,0,0,0,0,0,0,32,118,101,114,115,105,111,110,32,0,0,0,0,0,0,0,115,101,99,116,0,0,0,0,98,111,120,0,0,0,0,0,108,101,110,0,0,0,0,0,47,100,97,114,107,50,56,47,52,0,0,0,0,0,0,0,97,103,104,101,97,100,40,101,41,32,61,61,32,85,70,95,102,105,110,100,40,97,103,104,101,97,100,40,101,41,41,0,115,118,103,
-0,0,0,0,0,99,108,111,115,101,112,97,116,104,32,102,105,108,108,10,0,60,33,45,45,32,71,101,110,101,114,97,116,101,100,32,98,121,32,0,0,0,0,0,0,115,100,111,116,0,0,0,0,37,100,44,37,100,44,37,100,0,0,0,0,0,0,0,0,47,100,97,114,107,50,56,47,51,0,0,0,0,0,0,0,32,34,104,116,116,112,58,47,47,119,119,119,46,119,51,46,111,114,103,47,71,114,97,112,104,105,99,115,47,83,86,71,47,49,46,49,47,68,84,68,47,115,118,103,49,49,46,100,116,100,34,62,10,0,0,0,115,99,97,114,111,110,0,0,98,108,97,99,107,0,0,0,47,100,97,114,
-107,50,56,47,50,0,0,0,0,0,0,0,101,110,116,105,116,121,32,100,101,99,108,97,114,101,100,32,105,110,32,112,97,114,97,109,101,116,101,114,32,101,110,116,105,116,121,0,0,0,0,0,95,98,97,99,107,103,114,111,117,110,100,0,0,0,0,0,47,37,115,47,37,115,0,0,88,49,49,47,0,0,0,0,105,103,104,116,103,114,101,121,0,0,0,0,0,0,0,0,104,105,116,101,0,0,0,0,60,33,68,79,67,84,89,80,69,32,115,118,103,32,80,85,66,76,73,67,32,34,45,47,47,87,51,67,47,47,68,84,68,32,83,86,71,32,49,46,49,47,47,69,78,34,10,0,115,98,113,117,111,
-0,0,0,108,97,99,107,0,0,0,0,121,101,108,108,111,119,103,114,101,101,110,0,0,0,0,0,47,97,99,99,101,110,116,55,47,53,0,0,0,0,0,0,121,101,108,108,111,119,52,0,101,112,115,58,109,97,112,0,121,101,108,108,111,119,51,0,47,100,97,114,107,50,56,47,49,0,0,0,0,0,0,0,121,101,108,108,111,119,50,0,121,101,108,108,111,119,49,0,121,101,108,108,111,119,0,0,119,104,105,116,101,115,109,111,107,101,0,0,0,0,0,0,119,104,105,116,101,0,0,0,119,104,101,97,116,52,0,0,34,32,116,121,112,101,61,34,116,101,120,116,47,99,115,
-115,34,63,62,10,0,0,0,0,114,115,113,117,111,0,0,0,119,104,101,97,116,51,0,0,119,104,101,97,116,50,0,0,47,100,97,114,107,50,55,47,55,0,0,0,0,0,0,0,119,104,101,97,116,49,0,0,119,104,101,97,116,0,0,0,118,105,111,108,101,116,114,101,100,52,0,0,0,0,0,0,118,105,111,108,101,116,114,101,100,51,0,0,0,0,0,0,118,105,111,108,101,116,114,101,100,50,0,0,0,0,0,0,118,105,111,108,101,116,114,101,100,49,0,0,0,0,0,0,38,103,116,59,0,0,0,0,118,105,111,108,101,116,114,101,100,0,0,0,0,0,0,0,118,105,111,108,101,116,0,0,
-60,63,120,109,108,45,115,116,121,108,101,115,104,101,101,116,32,104,114,101,102,61,34,0,114,115,97,113,117,111,0,0,116,117,114,113,117,111,105,115,101,52,0,0,0,0,0,0,35,32,101,110,100,32,111,102,32,70,73,71,32,102,105,108,101,10,0,0,0,0,0,0,116,117,114,113,117,111,105,115,101,51,0,0,0,0,0,0,116,117,114,113,117,111,105,115,101,50,0,0,0,0,0,0,116,117,114,113,117,111,105,115,101,49,0,0,0,0,0,0,47,100,97,114,107,50,55,47,54,0,0,0,0,0,0,0,116,117,114,113,117,111,105,115,101,0,0,0,0,0,0,0,116,114,97,110,
-115,112,97,114,101,110,116,0,0,0,0,0,116,111,109,97,116,111,52,0,116,111,109,97,116,111,51,0,116,111,109,97,116,111,50,0,67,111,117,114,105,101,114,0,116,111,109,97,116,111,49,0,115,116,121,108,101,115,104,101,101,116,0,0,0,0,0,0,114,108,109,0,0,0,0,0,116,111,109,97,116,111,0,0,116,104,105,115,116,108,101,52,0,0,0,0,0,0,0,0,116,104,105,115,116,108,101,51,0,0,0,0,0,0,0,0,116,104,105,115,116,108,101,50,0,0,0,0,0,0,0,0,47,100,97,114,107,50,55,47,53,0,0,0,0,0,0,0,116,104,105,115,116,108,101,49,0,0,0,
-0,0,0,0,0,116,104,105,115,116,108,101,0,116,97,110,52],"i8",L,l.J+112676);D([0,0,0,0,116,97,110,51,0,0,0,0,116,97,110,50,0,0,0,0,116,97,110,49,0,0,0,0,60,63,120,109,108,32,118,101,114,115,105,111,110,61,34,49,46,48,34,32,101,110,99,111,100,105,110,103,61,34,85,84,70,45,56,34,32,115,116,97,110,100,97,108,111,110,101,61,34,110,111,34,63,62,10,0,114,104,111,0,0,0,0,0,116,97,110,0,0,0,0,0,115,116,101,101,108,98,108,117,101,52,0,0,0,0,0,0,115,116,101,101,108,98,108,117,101,51,0,0,0,0,0,0,116,101,97,108,
-0,0,0,0,115,116,101,101,108,98,108,117,101,50,0,0,0,0,0,0,47,100,97,114,107,50,55,47,52,0,0,0,0,0,0,0,115,116,101,101,108,98,108,117,101,49,0,0,0,0,0,0,115,116,101,101,108,98,108,117,101,0,0,0,0,0,0,0,115,112,114,105,110,103,103,114,101,101,110,52,0,0,0,0,115,112,114,105,110,103,103,114,101,101,110,51,0,0,0,0,32,99,114,101,97,116,101,32,116,101,120,116,32,0,0,0,115,112,114,105,110,103,103,114,101,101,110,50,0,0,0,0,115,112,114,105,110,103,103,114,101,101,110,49,0,0,0,0,32,120,109,108,110,115,58,120,
-108,105,110,107,61,34,104,116,116,112,58,47,47,119,119,119,46,119,51,46,111,114,103,47,49,57,57,57,47,120,108,105,110,107,34,0,0,0,0,0,114,102,108,111,111,114,0,0,98,0,0,0,0,0,0,0,115,112,114,105,110,103,103,114,101,101,110,0,0,0,0,0,115,110,111,119,52,0,0,0,115,110,111,119,51,0,0,0,115,110,111,119,50,0,0,0,47,100,97,114,107,50,55,47,51,0,0,0,0,0,0,0,115,110,111,119,49,0,0,0,115,110,111,119,0,0,0,0,115,108,97,116,101,103,114,101,121,0,0,0,0,0,0,0,35,32,0,0,0,0,0,0,115,108,97,116,101,103,114,97,121,
-52,0,0,0,0,0,0,37,46,48,51,102,0,0,0,115,108,97,116,101,103,114,97,121,51,0,0,0,0,0,0,99,97,110,110,111,116,32,109,97,108,108,111,99,32,111,112,115,0,0,0,0,0,0,0,115,108,97,116,101,103,114,97,121,50,0,0,0,0,0,0,117,114,118,101,100,0,0,0,32,120,109,108,110,115,61,34,104,116,116,112,58,47,47,119,119,119,46,119,51,46,111,114,103,47,50,48,48,48,47,115,118,103,34,0,0,0,0,0,114,101,103,0,0,0,0,0,115,101,114,105,102,0,0,0,104,114,101,102,0,0,0,0,115,108,97,116,101,103,114,97,121,49,0,0,0,0,0,0,115,108,97,
-116,101,103,114,97,121,0,0,0,0,0,0,0,104,111,117,115,101,0,0,0,99,99,37,115,43,37,100,0,115,108,97,116,101,98,108,117,101,52,0,0,0,0,0,0,37,46,53,103,44,37,46,53,103,0,0,0,0,0,0,0,101,100,103,101,0,0,0,0,115,108,97,116,101,98,108,117,101,51,0,0,0,0,0,0,47,100,97,114,107,50,55,47,50,0,0,0,0,0,0,0,32,32,37,100,32,37,100,32,99,101,108,108,10,0,0,0,115,108,97,116,101,98,108,117,101,50,0,0,0,0,0,0,108,97,98,101,108,0,0,0,50,0,0,0,0,0,0,0,115,108,97,116,101,98,108,117,101,49,0,0,0,0,0,0,115,99,97,108,101,
-0,0,0,115,99,97,108,101,0,0,0,115,108,97,116,101,98,108,117,101,0,0,0,0,0,0,0,116,97,105,108,99,108,105,112,0,0,0,0,0,0,0,0,115,107,121,98,108,117,101,52,0,0,0,0,0,0,0,0,99,111,108,111,114,0,0,0,115,107,121,98,108,117,101,51,0,0,0,0,0,0,0,0,99,108,117,115,116,101,114,0,100,97,114,107,98,108,117,101,0,0,0,0,0,0,0,0,115,107,121,98,108,117,101,50,0,0,0,0,0,0,0,0,32,118,105,101,119,66,111,120,61,34,37,46,50,102,32,37,46,50,102,32,37,46,50,102,32,37,46,50,102,34,0,0,114,101,97,108,0,0,0,0,115,107,121,
-98,108,117,101,49,0,0,0,0,0,0,0,0,100,111,116,115,112,108,105,110,101,115,46,99,0,0,0,0,115,107,121,98,108,117,101,0,115,105,101,110,110,97,52,0,115,105,101,110,110,97,51,0,47,100,97,114,107,50,55,47,49,0,0,0,0,0,0,0,83,111,108,118,105,110,103,32,109,111,100,101,108,32,37,100,32,105,116,101,114,97,116,105,111,110,115,32,37,100,32,116,111,108,32,37,102,10,0,0,115,105,101,110,110,97,50,0,115,105,101,110,110,97,49,0,40,78,68,95,85,70,95,115,105,122,101,40,110,41,32,60,61,32,49,41,32,124,124,32,40,110,
-32,61,61,32,108,101,97,100,101,114,41,0,0,0,115,105,101,110,110,97,0,0,115,101,97,115,104,101,108,108,52,0,0,0,0,0,0,0,60,115,118,103,0,0,0,0,32,99,117,114,118,101,116,111,10,0,0,0,0,0,0,0,115,101,97,115,104,101,108,108,51,0,0,0,0,0,0,0,115,101,97,115,104,101,108,108,50,0,0,0,0,0,0,0,60,115,118,103,32,119,105,100,116,104,61,34,37,100,112,116,34,32,104,101,105,103,104,116,61,34,37,100,112,116,34,10,0,0,0,0,0,0,0,0,114,100,113,117,111,0,0,0,75,80,95,76,101,102,116,0,115,101,97,115,104,101,108,108,49,
-0,0,0,0,0,0,0,102,108,97,116,105,110,100,101,120,40,97,103,116,97,105,108,40,101,41,41,32,60,32,77,45,62,110,99,111,108,115,0,115,101,97,115,104,101,108,108,0,0,0,0,0,0,0,0,32,99,111,111,114,100,115,61,34,0,0,0,0,0,0,0,115,101,97,103,114,101,101,110,52,0,0,0,0,0,0,0,115,101,97,103,114,101,101,110,51,0,0,0,0,0,0,0,47,100,97,114,107,50,54,47,54,0,0,0,0,0,0,0,115,101,97,103,114,101,101,110,50,0,0,0,0,0,0,0,115,101,97,103,114,101,101,110,49,0,0,0,0,0,0,0,115,101,97,103,114,101,101,110,0,0,0,0,0,0,0,0,
-115,97,110,100,121,98,114,111,119,110,0,0,0,0,0,0,115,97,108,109,111,110,52,0,115,97,108,109,111,110,51,0,32,80,97,103,101,115,58,32,37,100,32,45,45,62,10,0,114,99,101,105,108,0,0,0,115,97,108,109,111,110,50,0,115,97,108,109,111,110,49,0,115,97,108,109,111,110,0,0,115,97,100,100,108,101,98,114,111,119,110,0,0,0,0,0,47,100,97,114,107,50,54,47,53,0,0,0,0,0,0,0,117,110,101,120,112,101,99,116,101,100,32,112,97,114,115,101,114,32,115,116,97,116,101,32,45,32,112,108,101,97,115,101,32,115,101,110,100,32,
-97,32,98,117,103,32,114,101,112,111,114,116,0,0,0,0,0,0,114,111,121,97,108,98,108,117,101,52,0,0,0,0,0,0,114,111,121,97,108,98,108,117,101,51,0,0,0,0,0,0,114,111,121,97,108,98,108,117,101,50,0,0,0,0,0,0,114,111,121,97,108,98,108,117,101,49,0,0,0,0,0,0,114,111,121,97,108,98,108,117,101,0,0,0,0,0,0,0,114,111,115,121,98,114,111,119,110,52,0,0,0,0,0,0,32,84,105,116,108,101,58,32,0,0,0,0,0,0,0,0,114,97,114,114,0,0,0,0,114,111,115,121,98,114,111,119,110,51,0,0,0,0,0,0,114,111,115,121,98,114,111,119,110,
-50,0,0,0,0,0,0,114,111,115,121,98,114,111,119,110,49,0,0,0,0,0,0,47,97,99,99,101,110,116,55,47,52,0,0,0,0,0,0,112,115,58,109,97,112,0,0,114,111,115,121,98,114,111,119,110,0,0,0,0,0,0,0,47,100,97,114,107,50,54,47,52,0,0,0,0,0,0,0,114,101,100,52,0,0,0,0,114,101,100,51,0,0,0,0,114,101,100,50,0,0,0,0,114,101,100,49,0,0,0,0,116,119,111,112,105,0,0,0,114,101,100,0,0,0,0,0,112,117,114,112,108,101,52,0,60,33,45,45,0,0,0,0,114,97,113,117,111,0,0,0,112,117,114,112,108,101,51,0,112,117,114,112,108,101,50,0,
-112,117,114,112,108,101,49,0,112,117,114,112,108,101,0,0,47,100,97,114,107,50,54,47,51,0,0,0,0,0,0,0,112,111,119,100,101,114,98,108,117,101,0,0,0,0,0,0,112,108,117,109,52,0,0,0,112,108,117,109,51,0,0,0,112,108,117,109,50,0,0,0,112,108,117,109,49,0,0,0,112,108,117,109,0,0,0,0,60,47,115,118,103,62,10,0,114,97,110,103,0,0,0,0,111,118,101,114,108,97,112,0,112,105,110,107,52,0,0,0,112,105,110,107,51,0,0,0,37,48,51,111,0,0,0,0,112,105,110,107,50,0,0,0,112,105,110,107,49,0,0,0,47,100,97,114,107,50,54,47,
-50,0,0,0,0,0,0,0,112,105,110,107,0,0,0,0,112,101,114,117,0,0,0,0,112,101,97,99,104,112,117,102,102,52,0,0,0,0,0,0,112,101,97,99,104,112,117,102,102,51,0,0,0,0,0,0,112,101,97,99,104,112,117,102,102,50,0,0,0,0,0,0,67,111,117,114,105,101,114,45,66,111,108,100,0,0,0,0,112,101,97,99,104,112,117,102,102,49,0,0,0,0,0,0,34,32,99,108,97,115,115,61,34,108,97,121,101,114,34,62,10,0,0,0,0,0,0,0,114,97,100,105,99,0,0,0,112,101,97,99,104,112,117,102,102,0,0,0,0,0,0,0,112,97,112,97,121,97,119,104,105,112,0,0,0,
-0,0,0,47,100,97,114,107,50,54,47,49,0,0,0,0,0,0,0,112,97,108,101,118,105,111,108,101,116,114,101,100,52,0,0,112,97,108,101,118,105,111,108,101,116,114,101,100,51,0,0,112,97,108,101,118,105,111,108,101,116,114,101,100,50,0,0,112,97,108,101,118,105,111,108,101,116,114,101,100,49,0,0,112,97,108,101,118,105,111,108,101,116,114,101,100,0,0,0,112,97,108,101,116,117,114,113,117,111,105,115,101,52,0,0,85,82,76,0,0,0,0,0,112,97,108,101,116,117,114,113,117,111,105,115,101,51,0,0,100,111,116,0,0,0,0,0,112,97,
-108,101,116,117,114,113,117,111,105,115,101,50,0,0,32,116,114,97,110,115,102,111,114,109,61,34,115,99,97,108,101,40,37,103,32,37,103,41,32,114,111,116,97,116,101,40,37,100,41,32,116,114,97,110,115,108,97,116,101,40,37,103,32,37,103,41,34,62,10,0,114,65,114,114,0,0,0,0,112,97,108,101,116,117,114,113,117,111,105,115,101,49,0,0,112,97,108,101,116,117,114,113,117,111,105,115,101,0,0,0,112,97,108,101,103,114,101,101,110,52,0,0,0,0,0,0,115,105,108,118,101,114,0,0,112,97,108,101,103,114,101,101,110,51,0,
-0,0,0,0,0,47,100,97,114,107,50,53,47,53,0,0,0,0,0,0,0,108,105,98,112,97,116,104,47,37,115,58,37,100,58,32,37,115,10,0,0,0,0,0,0,112,97,108,101,103,114,101,101,110,50,0,0,0,0,0,0,112,97,108,101,103,114,101,101,110,49,0,0,0,0,0,0,112,97,108,101,103,114,101,101,110,0,0,0,0,0,0,0,112,97,108,101,103,111,108,100,101,110,114,111,100,0,0,0,32,99,114,101,97,116,101,32,111,118,97,108,32,0,0,0,111,114,99,104,105,100,52,0,111,114,99,104,105,100,51,0,34,32,99,108,97,115,115,61,34,103,114,97,112,104,34,0,113,117,
-111,116,0,0,0,0,111,114,99,104,105,100,50,0,111,114,99,104,105,100,49,0,111,114,99,104,105,100,0,0,111,114,97,110,103,101,114,101,100,52,0,0,0,0,0,0,47,100,97,114,107,50,53,47,52,0,0,0,0,0,0,0,111,114,97,110,103,101,114,101,100,51,0,0,0,0,0,0,111,114,97,110,103,101,114,101,100,50,0,0,0,0,0,0,117,116,105,108,115,46,99,0,111,114,97,110,103,101,114,101,100,49,0,0,0,0,0,0,111,114,97,110,103,101,114,101,100,0,0,0,0,0,0,0,50,32,0,0,0,0,0,0,111,114,97,110,103,101,52,0,111,114,97,110,103,101,51,0,73,110,
-118,97,108,105,100,32,37,100,45,98,121,116,101,32,85,84,70,56,32,102,111,117,110,100,32,105,110,32,105,110,112,117,116,32,111,102,32,103,114,97,112,104,32,37,115,32,45,32,116,114,101,97,116,101,100,32,97,115,32,76,97,116,105,110,45,49,46,32,80,101,114,104,97,112,115,32,34,45,71,99,104,97,114,115,101,116,61,108,97,116,105,110,49,34,32,105,115,32,110,101,101,100,101,100,63,10,0,0,0,0,34,32,99,108,97,115,115,61,34,99,108,117,115,116,101,114,34,62,0,0,0,0,0,0,112,115,105,0,0,0,0,0,85,82,87,32,66,111,
-111,107,109,97,110,32,76,0,0,0,111,114,97,110,103,101,50,0,103,114,97,112,104,118,105,122,0,0,0,0,0,0,0,0,111,114,97,110,103,101,49,0,112,97,114,97,108,108,101,108,111,103,114,97,109,0,0,0,103,114,97,112,104,32,37,115,44,32,99,111,111,114,100,32,37,115,44,32,101,120,112,101,99,116,101,100,32,102,111,117,114,32,100,111,117,98,108,101,115,10,0,0,0,0,0,0,98,97,100,32,101,100,103,101,32,108,101,110,32,34,37,115,34,0,0,0,0,0,0,0,111,114,97,110,103,101,0,0,44,37,46,53,103,0,0,0,102,111,110,116,45,62,110,
-97,109,101,0,0,0,0,0,0,110,111,100,101,0,0,0,0,111,108,105,118,101,100,114,97,98,52,0,0,0,0,0,0,47,100,97,114,107,50,53,47,51,0,0,0,0,0,0,0,37,115,32,110,111,46,32,99,101,108,108,115,32,37,100,32,87,32,37,100,32,72,32,37,100,10,0,0,0,0,0,0,111,108,105,118,101,100,114,97,98,51,0,0,0,0,0,0,80,45,62,101,110,100,46,116,104,101,116,97,32,60,32,50,32,42,32,77,95,80,73,0,49,0,0,0,0,0,0,0,111,108,105,118,101,100,114,97,98,50,0,0,0,0,0,0,60,73,77,71,62,0,0,0,86,111,114,111,110,111,105,0,111,108,105,118,101,
-100,114,97,98,49,0,0,0,0,0,0,108,97,98,101,108,102,111,110,116,115,105,122,101,0,0,0,111,108,105,118,101,100,114,97,98,0,0,0,0,0,0,0,35,102,56,102,56,102,56,0,111,108,100,108,97,99,101,0,110,111,110,101,0,0,0,0,99,121,97,110,0,0,0,0,34,32,99,108,97,115,115,61,34,110,111,100,101,34,62,0,112,114,111,112,0,0,0,0,110,97,118,121,98,108,117,101,0,0,0,0,0,0,0,0,110,97,118,121,0,0,0,0,47,100,97,114,107,50,53,47,50,0,0,0,0,0,0,0,110,97,118,97,106,111,119,104,105,116,101,52,0,0,0,0,110,45,62,108,101,118,101,
-108,32,62,61,32,48,0,0,0,110,97,118,97,106,111,119,104,105,116,101,51,0,0,0,0,116,104,101,32,103,114,97,112,104,32,105,110,116,111,32,99,111,110,110,101,99,116,101,100,32,99,111,109,112,111,110,101,110,116,115,46,10,0,0,0,110,97,118,97,106,111,119,104,105,116,101,50,0,0,0,0,110,97,118,97,106,111,119,104,105,116,101,49,0,0,0,0,114,97,110,107,46,99,0,0,115,104,97,112,101,115,46,99,0,0,0,0,0,0,0,0,110,97,118,97,106,111,119,104,105,116,101,0,0,0,0,0,109,111,99,99,97,115,105,110,0,0,0,0,0,0,0,0,37,37,
-37,37,66,111,117,110,100,105,110,103,66,111,120,58,32,37,100,32,37,100,32,37,100,32,37,100,0,0,0,0,115,116,114,111,107,101,10,0,99,99,37,115,95,37,100,0,99,97,110,110,111,116,32,114,101,45,97,108,108,111,99,97,116,101,32,112,115,10,0,0,109,105,115,116,121,114,111,115,101,52,0,0,0,0,0,0,109,105,115,116,121,114,111,115,101,51,0,0,0,0,0,0,95,37,115,0,0,0,0,0,112,114,111,100,0,0,0,0,108,97,98,101,108,58,32,97,114,101,97,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,114,116,114,101,101,10,0,0,
-0,0,0,0,0,0,10,0,0,0,0,0,0,0,109,105,115,116,121,114,111,115,101,50,0,0,0,0,0,0,102,108,97,116,105,110,100,101,120,40,97,103,104,101,97,100,40,101,41,41,32,60,32,77,45,62,110,114,111,119,115,0,109,105,115,116,121,114,111,115,101,49,0,0,0,0,0,0,108,111,115,116,32,37,115,32,37,115,32,101,100,103,101,10,0,0,0,0,0,0,0,0,32,97,108,116,61,34,34,0,109,105,115,116,121,114,111,115,101,0,0,0,0,0,0,0,109,105,110,116,99,114,101,97,109,0,0,0,0,0,0,0,47,100,97,114,107,50,53,47,49,0,0,0,0,0,0,0,109,105,100,110,
-105,103,104,116,98,108,117,101,0,0,0,0,109,101,100,105,117,109,118,105,111,108,101,116,114,101,100,0,110,111,100,101,32,0,0,0,109,101,100,105,117,109,116,117,114,113,117,111,105,115,101,0,37,100,32,0,0,0,0,0,109,101,100,105,117,109,115,112,114,105,110,103,103,114,101,101,110,0,0,0,0,0,0,0,109,101,100,105,117,109,115,108,97,116,101,98,108,117,101,0,109,101,100,105,117,109,115,101,97,103,114,101,101,110,0,0,60,47,116,105,116,108,101,62,10,0,0,0,0,0,0,0,112,114,105,109,101,0,0,0,49,46,50,46,53,0,0,0,
-109,101,100,105,117,109,112,117,114,112,108,101,52,0,0,0,105,110,32,108,97,98,101,108,32,111,102,32,101,100,103,101,32,37,115,32,37,115,32,37,115,10,0,0,0,0,0,0,109,101,100,105,117,109,112,117,114,112,108,101,51,0,0,0,109,101,100,105,117,109,112,117,114,112,108,101,50,0,0,0,109,101,100,105,117,109,112,117,114,112,108,101,49,0,0,0,47,100,97,114,107,50,52,47,52,0,0,0,0,0,0,0,100,111,99,117,109,101,110,116,32,105,115,32,110,111,116,32,115,116,97,110,100,97,108,111,110,101,0,0,0,0,0,0,109,101,100,105,
-117,109,112,117,114,112,108,101,0,0,0,0,87,97,114,110,105,110,103,0,109,101,100,105,117,109,111,114,99,104,105,100,52,0,0,0,101,112,115,105,108,111,110,0,109,101,100,105,117,109,111,114,99,104,105,100,51,0,0,0,109,101,100,105,117,109,111,114,99,104,105,100,50,0,0,0,109,101,100,105,117,109,111,114,99,104,105,100,49,0,0,0,109,101,100,105,117,109,111,114,99,104,105,100,0,0,0,0,92,69,0,0,0,0,0,0,112,111,117,110,100,0,0,0,109,101,100,105,117,109,98,108,117,101,0,0,0,0,0,0,65,103,114,97,112,104,105,110,
-102,111,95,116,0,0,0,0,99,111,109,112,111,117,110,100,0,0,0,0,0,0,0,0,109,101,100,105,117,109,97,113,117,97,109,97,114,105,110,101,0,0,0,0,0,0,0,0,109,97,114,111,111,110,52,0,109,97,114,111,111,110,51,0,106,112,103,58,109,97,112,0,35,37,50,120,37,50,120,37,50,120,37,50,120,0,0,0,47,100,97,114,107,50,52,47,51,0,0,0,0,0,0,0,109,97,114,111,111,110,50,0,109,97,114,111,111,110,49,0,109,97,114,111,111,110,0,0,109,97,103,101,110,116,97,52,0,0,0,0,0,0,0,0,109,97,103,101,110,116,97,51,0,0,0,0,0,0,0,0,109,
-97,103,101,110,116,97,50,0,0,0,0,0,0,0,0,60,116,105,116,108,101,62,0,112,108,117,115,109,110,0,0,109,97,103,101,110,116,97,49,0,0,0,0,0,0,0,0,37,115,32,58,32,37,102,32,37,102,32,37,102,32,37,102,10,0,0,0,0,0,0,0,103,114,97,112,104,32,105,115,32,100,105,115,99,111,110,110,101,99,116,101,100,46,32,72,101,110,99,101,44,32,116,104,101,32,99,105,114,99,117,105,116,32,109,111,100,101,108,10,0,0,0,0,0,0,0,0,109,97,103,101,110,116,97,0,37,115,32,99,111,111,114,100,32,37,46,53,103,32,37,46,53,103,32,104,116,
-32,37,102,32,119,105,100,116,104,32,37,102,10,0,0,0,0,0,0,98,108,97,99,107,0,0,0,108,105,110,101,110,0,0,0,115,121,110,116,97,120,32,101,114,114,111,114,0,0,0,0,108,105,109,101,103,114,101,101,110,0,0,0,0,0,0,0,47,100,97,114,107,50,52,47,50,0,0,0,0,0,0,0,82,97,110,107,32,115,101,112,97,114,97,116,105,111,110,32,61,32,0,0,0,0,0,0,108,105,103,104,116,121,101,108,108,111,119,52,0,0,0,0,108,105,103,104,116,121,101,108,108,111,119,51,0,0,0,0,108,105,103,104,116,121,101,108,108,111,119,50,0,0,0,0,108,105,
-103,104,116,121,101,108,108,111,119,49,0,0,0,0,108,105,103,104,116,121,101,108,108,111,119,0,0,0,0,0,108,105,103,104,116,115,116,101,101,108,98,108,117,101,52,0,34,32,99,108,97,115,115,61,34,101,100,103,101,34,62,0,112,105,118,0,0,0,0,0,84,48,0,0,0,0,0,0,108,105,103,104,116,115,116,101,101,108,98,108,117,101,51,0,109,97,107,101,83,112,108,105,110,101,58,32,102,97,105,108,101,100,32,116,111,32,109,97,107,101,32,115,112,108,105,110,101,32,101,100,103,101,32,40,37,115,44,37,115,41,10,0,108,105,103,104,
-116,115,116,101,101,108,98,108,117,101,50,0,108,105,103,104,116,115,116,101,101,108,98,108,117,101,49,0,60,47,72,84,77,76,62,0,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,46,49,102,32,37,46,52,102,32,37,100,32,37,46,49,102,32,37,46,49,102,32,37,100,32,37,100,32,37,115,92,48,48,49,10,0,0,108,105,103,104,116,115,116,101,101,108,98,108,117,101,0,0,47,100,97,114,107,50,52,47,49,0,0,0,0,0,0,0,108,105,103,104,116,115,108,97,116,101,103,114,101,121,0,0,108,105,103,104,116,115,108,97,116,
-101,103,114,97,121,0,0,108,105,103,104,116,115,108,97,116,101,98,108,117,101,0,0,108,105,103,104,116,115,107,121,98,108,117,101,52,0,0,0,65,103,101,100,103,101,105,110,102,111,95,116,0,0,0,0,108,105,103,104,116,115,107,121,98,108,117,101,51,0,0,0,84,105,109,101,115,45,66,111,108,100,73,116,97,108,105,99,0,0,0,0,0,0,0,0,108,105,103,104,116,115,107,121,98,108,117,101,50,0,0,0,60,103,32,105,100,61,34,0,112,105,0,0,0,0,0,0,108,105,103,104,116,115,107,121,98,108,117,101,49,0,0,0,108,105,103,104,116,115,
-107,121,98,108,117,101,0,0,0,0,108,105,103,104,116,115,101,97,103,114,101,101,110,0,0,0,108,105,103,104,116,115,97,108,109,111,110,52,0,0,0,0,47,100,97,114,107,50,51,47,51,0,0,0,0,0,0,0,108,105,103,104,116,115,97,108,109,111,110,51,0,0,0,0,108,105,103,104,116,115,97,108,109,111,110,50,0,0,0,0,108,97,98,101,108,102,111,110,116,110,97,109,101,0,0,0,108,105,103,104,116,115,97,108,109,111,110,49,0,0,0,0,108,105,103,104,116,115,97,108,109,111,110,0,0,0,0,0,37,108,102,44,37,100,0,0,108,105,103,104,116,
-112,105,110,107,52,0,0,0,0,0,0,109,97,107,101,65,100,100,80,111,108,121,58,32,117,110,107,110,111,119,110,32,115,104,97,112,101,32,116,121,112,101,32,37,115,10,0,0,0,0,0,108,105,103,104,116,112,105,110,107,51,0,0,0,0,0,0,62,10,0,0,0,0,0,0,112,104,105,0,0,0,0,0,50,48,49,52,48,49,49,49,46,50,51,49,53,0,0,0,108,105,103,104,116,112,105,110,107,50,0,0,0,0,0,0,108,105,103,104,116,112,105,110,107,49,0,0,0,0,0,0,108,105,103,104,116,112,105,110,107,0,0,0,0,0,0,0,32,32,34,37,115,34,10,0,108,105,103,104,116,
-103,114,101,121,0,0,0,0,0,0,0,47,100,97,114,107,50,51,47,50,0,0,0,0,0,0,0,114,101,100,0,0,0,0,0,108,105,103,104,116,103,114,97,121,0,0,0,0,0,0,0,108,105,103,104,116,103,111,108,100,101,110,114,111,100,121,101,108,108,111,119,0,0,0,0,108,105,103,104,116,103,111,108,100,101,110,114,111,100,52,0,108,105,103,104,116,103,111,108,100,101,110,114,111,100,51,0,32,45,111,117,116,108,105,110,101,32,0,0,0,0,0,0,47,100,97,114,107,50,51,47,49,0,0,0,0,0,0,0,108,105,103,104,116,103,111,108,100,101,110,114,111,100,
-50,0,108,105,103,104,116,103,111,108,100,101,110,114,111,100,49,0,47,97,99,99,101,110,116,55,47,51,0,0,0,0,0,0,32,116,97,114,103,101,116,61,34,0,0,0,0,0,0,0,112,101,114,112,0,0,0,0,108,105,103,104,116,103,111,108,100,101,110,114,111,100,0,0,100,101,103,101,110,101,114,97,116,101,32,99,111,110,99,101,110,116,114,97,116,101,100,32,114,97,110,107,32,37,115,44,37,100,10,0,0,0,0,0,108,105,103,104,116,99,121,97,110,52,0,0,0,0,0,0,108,105,103,104,116,99,121,97,110,51,0,0,0,0,0,0,108,105,103,104,116,99,121,
-97,110,50,0,0,0,0,0,0,47,97,99,99,101,110,116,51,47,49,0,0,0,0,0,0,108,105,103,104,116,99,121,97,110,49,0,0,0,0,0,0,108,105,103,104,116,99,121,97,110,0,0,0,0,0,0,0,108,105,103,104,116,99,111,114,97,108,0,0,0,0,0,0,108,105,103,104,116,98,108,117,101,52,0,0,0,0,0,0,67,32,0,0,0,0,0,0,108,105,103,104,116,98,108,117,101,51,0,0,0,0,0,0,108,105,103,104,116,98,108,117,101,50,0,0,0,0,0,0,85,84,70,56,32,99,111,100,101,115,32,62,32,52,32,98,121,116,101,115,32,97,114,101,32,110,111,116,32,99,117,114,114,101,
-110,116,108,121,32,115,117,112,112,111,114,116,101,100,32,40,103,114,97,112,104,32,37,115,41,32,45,32,116,114,101,97,116,101,100,32,97,115,32,76,97,116,105,110,45,49,46,32,80,101,114,104,97,112,115,32,34,45,71,99,104,97,114,115,101,116,61,108,97,116,105,110,49,34,32,105,115,32,110,101,101,100,101,100,63,10,0,0,0,0,0,0,0,0,32,120,108,105,110,107,58,116,105,116,108,101,61,34,0,0,112,101,114,109,105,108,0,0,66,111,111,107,109,97,110,45,68,101,109,105,0,0,0,0,45,45,0,0,0,0,0,0,108,105,103,104,116,98,
-108,117,101,49,0,0,0,0,0,0,108,105,103,104,116,98,108,117,101,0,0,0,0,0,0,0,116,114,97,112,101,122,105,117,109,0,0,0,0,0,0,0,37,108,102,44,37,108,102,44,37,108,102,44,37,108,102,37,99,0,0,0,0,0,0,0,37,108,102,0,0,0,0,0,47,98,117,112,117,57,47,57,0,0,0,0,0,0,0,0,108,101,109,111,110,99,104,105,102,102,111,110,52,0,0,0,37,46,53,103,44,37,46,53,103,44,37,46,53,103,0,0,103,114,97,112,104,0,0,0,108,101,109,111,110,99,104,105,102,102,111,110,51,0,0,0,99,99,32,40,37,100,32,99,101,108,108,115,41,32,97,116,
-32,40,37,100,44,37,100,41,32,40,37,100,44,37,100,41,10,0,0,0,0,0,0,0,79,114,116,104,111,103,111,110,97,108,32,101,100,103,101,115,32,110,111,116,32,121,101,116,32,115,117,112,112,111,114,116,101,100,10,0,0,0,0,0,108,101,109,111,110,99,104,105,102,102,111,110,50,0,0,0,48,0,0,0,0,0,0,0,108,101,109,111,110,99,104,105,102,102,111,110,49,0,0,0,85,110,107,110,111,119,110,32,72,84,77,76,32,101,108,101,109,101,110,116,32,60,37,115,62,32,111,110,32,108,105,110,101,32,37,100,32,10,0,0,118,111,114,111,110,111,
-105,0,108,101,109,111,110,99,104,105,102,102,111,110,0,0,0,0,105,112,0,0,0,0,0,0,108,97,119,110,103,114,101,101,110,0,0,0,0,0,0,0,99,111,110,99,101,110,116,114,97,116,101,61,116,114,117,101,32,109,97,121,32,110,111,116,32,119,111,114,107,32,99,111,114,114,101,99,116,108,121,46,10,0,0,0,0,0,0,0,35,49,48,49,48,49,48,0,108,97,118,101,110,100,101,114,98,108,117,115,104,52,0,0,108,97,118,101,110,100,101,114,98,108,117,115,104,51,0,0,99,114,105,109,115,111,110,0,32,120,108,105,110,107,58,104,114,101,102,
-61,34,0,0,0,112,97,114,116,0,0,0,0,108,97,118,101,110,100,101,114,98,108,117,115,104,50,0,0,108,97,118,101,110,100,101,114,98,108,117,115,104,49,0,0,108,97,118,101,110,100,101,114,98,108,117,115,104,0,0,0,108,97,118,101,110,100,101,114,0,0,0,0,0,0,0,0,47,98,117,112,117,57,47,56,0,0,0,0,0,0,0,0,65,108,116,101,114,110,97,116,105,118,101,108,121,44,32,99,111,110,115,105,100,101,114,32,114,117,110,110,105,110,103,32,110,101,97,116,111,32,117,115,105,110,103,32,45,71,112,97,99,107,61,116,114,117,101,32,
-111,114,32,100,101,99,111,109,112,111,115,105,110,103,10,0,107,104,97,107,105,52,0,0,107,104,97,107,105,51,0,0,108,101,97,100,101,114,32,33,61,32,78,85,76,76,0,0,107,104,97,107,105,50,0,0,115,118,103,122,58,115,118,103,0,0,0,0,0,0,0,0,107,104,97,107,105,49,0,0,37,37,66,111,117,110,100,105,110,103,66,111,120,58,0,0,32,108,105,110,101,116,111,10,0,0,0,0,0,0,0,0,107,104,97,107,105,0,0,0,105,118,111,114,121,52,0,0,60,97,0,0,0,0,0,0,112,97,114,97,0,0,0,0,105,118,111,114,121,51,0,0,105,118,111,114,121,
-50,0,0,78,68,95,114,97,110,107,40,118,41,32,61,61,32,114,0,32,116,105,116,108,101,61,34,0,0,0,0,0,0,0,0,105,118,111,114,121,49,0,0,105,118,111,114,121,0,0,0,47,98,117,112,117,57,47,55,0,0,0,0,0,0,0,0,105,110,118,105,115,0,0,0,105,110,100,105,103,111,0,0,105,110,100,105,97,110,114,101,100,52,0,0,0,0,0,0,105,110,100,105,97,110,114,101,100,51,0,0,0,0,0,0,105,110,100,105,97,110,114,101,100,50,0,0,0,0,0,0,105,110,100,105,97,110,114,101,100,49,0,0,0,0,0,0,32,105,100,61,34,97,95,0,111,117,109,108,0,0,0,
-0,105,110,100,105,97,110,114,101,100,0,0,0,0,0,0,0,104,111,116,112,105,110,107,52,0,0,0,0,0,0,0,0,104,111,116,112,105,110,107,51,0,0,0,0,0,0,0,0,104,111,116,112,105,110,107,50,0,0,0,0,0,0,0,0,47,98,117,112,117,57,47,54,0,0,0,0,0,0,0,0,101,114,114,111,114,32,105,110,32,112,114,111,99,101,115,115,105,110,103,32,101,120,116,101,114,110,97,108,32,101,110,116,105,116,121,32,114,101,102,101,114,101,110,99,101,0,0,0,104,111,116,112,105,110,107,49,0,0,0,0,0,0,0,0,104,111,116,112,105,110,107,0,104,111,110,
-101,121,100,101,119,52,0,0,0,0,0,0,0,104,111,110,101,121,100,101,119,51,0,0,0,0,0,0,0,104,111,110,101,121,100,101,119,50,0,0,0,0,0,0,0,104,111,110,101,121,100,101,119,49,0,0,0,0,0,0,0,60,103,0,0,0,0,0,0,111,116,105,109,101,115,0,0,104,111,110,101,121,100,101,119,0,0,0,0,0,0,0,0,65,103,101,100,103,101,105,110,102,111,95,116,0,0,0,0,116,111,111,32,109,97,110,121,32,40,62,32,37,100,41,32,115,97,109,101,123,104,101,97,100,44,116,97,105,108,125,32,103,114,111,117,112,115,32,102,111,114,32,110,111,100,
-101,32,37,115,10,0,0,0,0,0,103,114,101,121,57,57,0,0,103,114,101,121,57,56,0,0,106,112,101,58,109,97,112,0,103,114,101,121,57,55,0,0,47,98,117,112,117,57,47,53,0,0,0,0,0,0,0,0,103,114,101,121,57,54,0,0,98,111,116,104,0,0,0,0,103,114,101,121,57,53,0,0,103,114,101,121,57,52,0,0,103,114,101,121,57,51,0,0,103,114,101,121,57,50,0,0,103,114,101,121,57,49,0,0,60,47,103,62,10,0,0,0,111,116,105,108,100,101,0,0,103,114,101,121,57,48,0,0,37,115,32,45,62,32,37,115,58,32,115,112,108,105,110,101,32,115,105,122,
-101,32,62,32,49,32,110,111,116,32,115,117,112,112,111,114,116,101,100,10,0,0,0,0,0,0,0,0,103,114,101,121,57,0,0,0,47,98,117,112,117,57,47,52,0,0,0,0,0,0,0,0,103,114,101,121,56,57,0,0,103,114,101,121,56,56,0,0,103,114,101,121,56,55,0,0,9,0,0,0,0,0,0,0,103,114,101,121,56,54,0,0,37,108,102,44,37,108,102,37,99,0,0,0,0,0,0,0,103,114,101,121,56,53,0,0,103,114,101,121,56,52,0,0,103,114,101,121,56,51,0,0,103,114,101,121,56,50,0,0,60,47,97,62,10,0,0,0,111,115,108,97,115,104,0,0,103,114,101,121,56,49,0,0,103,
-114,101,121,56,48,0,0,103,114,101,121,56,0,0,0,103,114,101,121,55,57,0,0,47,98,117,112,117,57,47,51,0,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,103,114,101,121,55,56,0,0,103,114,101,121,55,55,0,0,103,114,101,121,55,54,0,0,103,114,101,121,55,53,0,0,103,114,101,121,55,52,0,0,84,105,109,101,115,45,66,111,108,100,0,0,0,0,0,0,103,114,101,121,55,51,0,0,60,47,116,101,120,116,62,10,0,0,0,0,0,0,0,0,111,114,100,109,0,0,0,0,103,114,101,121,55,50,0,0,103,114,101,121,55,49,0,0,103,114,101,121,55,48,0,0,103,114,101,121,55,
-0,0,0,47,98,117,112,117,57,47,50,0,0,0,0,0,0,0,0,103,114,101,121,54,57,0,0,103,114,101,121,54,56,0,0,103,114,101,121,54,55,0,0,77,97,120,114,97,110,107,32,61,32,37,100,44,32,109,105,110,114,97,110,107,32,61,32,37,100,10,0,0,0,0,0,103,114,101,121,54,54,0,0,103,114,101,121,54,53,0,0,103,114,101,121,54,52,0,0,62,0,0,0,0,0,0,0,111,114,100,102,0,0,0,0,103,114,101,121,54,51,0,0,103,114,101,121,54,50,0,0,103,114,101,121,54,49,0,0,103,114,101,121,54,48,0,0,47,98,117,112,117,57,47,49,0,0,0,0,0,0,0,0,112,117,
-114,112,108,101,0,0,103,114,101,121,54,0,0,0,103,114,101,121,53,57,0,0,103,114,101,121,53,56,0,0,103,114,101,121,53,55,0,0,119,104,105,116,101,0,0,0,103,114,101,121,53,54,0,0,103,114,101,121,53,53,0,0,32,102,105,108,108,61,34,35,37,48,50,120,37,48,50,120,37,48,50,120,34,0,0,0,103,114,101,121,53,52,0,0,111,114,0,0,0,0,0,0,104,101,105,103,104,116,0,0,47,97,99,99,101,110,116,55,47,50,0,0,0,0,0,0,97,100,100,105,110,103,32,37,100,32,105,116,101,109,115,44,32,116,111,116,97,108,32,97,114,101,97,32,61,32,
-37,102,44,32,119,32,61,32,37,102,44,32,97,114,101,97,47,119,61,37,102,10,0,0,0,0,109,105,110,100,105,115,116,0,103,114,101,121,53,51,0,0,103,114,101,121,53,50,0,0,65,82,61,37,48,46,52,108,102,9,32,65,114,101,97,61,32,37,48,46,52,108,102,9,0,0,0,0,0,0,0,0,103,114,101,121,53,49,0,0,47,98,117,112,117,56,47,56,0,0,0,0,0,0,0,0,103,114,101,121,53,48,0,0,103,114,101,121,53,0,0,0,103,114,101,121,52,57,0,0,117,115,45,62,110,97,109,101,0,0,0,0,0,0,0,0,103,114,101,121,52,56,0,0,115,101,116,108,105,110,101,119,
-105,100,116,104,0,0,0,0,103,114,101,121,52,55,0,0,103,114,101,121,52,54,0,0,37,100,0,0,0,0,0,0,32,102,105,108,108,61,34,37,115,34,0,0,0,0,0,0,111,112,108,117,115,0,0,0,65,118,97,110,116,71,97,114,100,101,45,68,101,109,105,79,98,108,105,113,117,101,0,0,45,62,0,0,0,0,0,0,103,114,101,121,52,53,0,0,112,115,50,58,112,115,0,0,103,114,101,121,52,52,0,0,100,105,97,109,111,110,100,0,95,112,111,114,116,95,37,115,95,40,37,100,41,95,40,37,100,41,95,37,108,100,0,0,32,105,110,32,37,115,32,45,32,115,101,116,116,
-105,110,103,32,116,111,32,37,46,48,50,102,10,0,0,0,0,0,0,103,114,101,121,52,51,0,0,98,98,0,0,0,0,0,0,37,100,32,37,49,91,34,93,37,110,0,0,0,0,0,0,103,114,101,121,52,50,0,0,47,98,117,112,117,56,47,55,0,0,0,0,0,0,0,0,112,111,115,91,37,100,93,32,37,100,32,37,100,10,0,0,103,114,101,121,52,49,0,0,65,103,101,100,103,101,105,110,102,111,95,116,0,0,0,0,103,114,101,121,52,48,0,0,73,77,71,0,0,0,0,0,103,114,101,121,52,0,0,0,110,111,110,101,0,0,0,0,111,117,116,32,111,102,32,100,121,110,97,109,105,99,32,109,101,
-109,111,114,121,32,105,110,32,97,97,103,95,99,114,101,97,116,101,95,98,117,102,102,101,114,40,41,0,0,0,0,108,97,98,101,108,95,102,108,111,97,116,0,0,0,0,0,103,114,101,121,51,57,0,0,35,102,48,102,48,102,48,0,103,114,101,121,51,56,0,0,32,102,111,110,116,45,115,105,122,101,61,34,37,46,50,102,34,0,0,0,0,0,0,0,115,101,103,35,37,100,32,58,32,40,37,46,51,102,44,32,37,46,51,102,41,32,40,37,46,51,102,44,32,37,46,51,102,41,10,0,0,0,0,0,103,114,101,121,51,55,0,0,115,118,103,0,0,0,0,0,99,111,114,110,115,105,
-108,107,0,0,0,0,0,0,0,0,111,109,105,99,114,111,110,0,76,97,121,111,117,116,32,116,121,112,101,58,32,34,37,115,34,32,110,111,116,32,114,101,99,111,103,110,105,122,101,100,46,32,85,115,101,32,111,110,101,32,111,102,58,37,115,10,0,0,0,0,0,0,0,0,103,114,101,121,51,54,0,0,103,114,101,121,51,53,0,0,103,114,101,121,51,52,0,0,103,114,101,121,51,51,0,0,47,98,117,112,117,56,47,54,0,0,0,0,0,0,0,0,123,10,0,0,0,0,0,0,105,115,32,117,110,100,101,102,105,110,101,100,46,32,82,101,118,101,114,116,105,110,103,32,116,
-111,32,116,104,101,32,115,104,111,114,116,101,115,116,32,112,97,116,104,32,109,111,100,101,108,46,10,0,0,0,0,103,114,101,121,51,50,0,0,103,114,101,121,51,49,0,0,108,101,118,101,108,32,110,111,100,101,32,114,101,99,0,0,103,114,101,121,51,48,0,0,103,114,101,121,51,0,0,0,40,91,97,45,122,93,91,97,45,122,65,45,90,93,42,41,61,34,40,91,94,34,93,42,41,34,0,0,0,0,0,0,32,109,111,118,101,116,111,10,0,0,0,0,0,0,0,0,103,114,101,121,50,57,0,0,32,98,97,115,101,108,105,110,101,45,115,104,105,102,116,61,34,115,117,
-98,34,0,0,0,103,114,101,121,50,56,0,0,37,37,37,37,67,114,101,97,116,111,114,58,32,37,115,32,118,101,114,115,105,111,110,32,37,115,32,40,37,115,41,10,0,0,0,0,0,0,0,0,111,109,101,103,97,0,0,0,114,32,38,38,32,110,0,0,103,114,101,121,50,55,0,0,103,114,101,121,50,54,0,0,99,111,110,115,116,114,97,105,110,105,110,103,95,102,108,97,116,95,101,100,103,101,40,103,44,118,44,101,41,32,61,61,32,70,65,76,83,69,0,0,100,97,115,104,101,100,0,0,32,116,97,114,103,101,116,61,34,0,0,0,0,0,0,0,103,114,101,121,50,53,0,
-0,103,114,101,121,50,52,0,0,47,98,117,112,117,56,47,53,0,0,0,0,0,0,0,0,103,114,101,121,50,51,0,0,103,114,101,121,50,50,0,0,103,114,101,121,50,49,0,0,103,114,101,121,50,48,0,0,103,114,101,121,50,0,0,0,32,98,97,115,101,108,105,110,101,45,115,104,105,102,116,61,34,115,117,112,101,114,34,0,103,114,101,121,49,57,0,0,32,69,80,83,70,45,51,46,48,10,0,0,0,0,0,0,111,108,105,110,101,0,0,0,103,114,101,121,49,56,0,0,99,108,117,115,116,101,114,46,99,0,0,0,0,0,0,0,103,114,101,121,49,55,0,0,47,98,117,112,117,56,
-47,52,0,0,0,0,0,0,0,0,103,114,101,121,49,54,0,0,103,114,101,121,49,53,0,0,117,110,99,108,111,115,101,100,32,67,68,65,84,65,32,115,101,99,116,105,111,110,0,0,103,114,101,121,49,52,0,0,103,114,101,121,49,51,0,0,103,114,101,121,49,50,0,0,103,114,101,121,49,49,0,0,103,114,101,121,49,48,48,0,103,114,101,121,49,48,0,0,37,33,80,83,45,65,100,111,98,101,45,51,46,48,0,0,111,103,114,97,118,101,0,0,103,114,101,121,49,0,0,0,103,114,101,121,48,0,0,0,103,114,101,121,0,0,0,0,103,114,101,101,110,121,101,108,108,111,
-119,0,0,0,0,0,47,98,117,112,117,56,47,51,0,0,0,0,0,0,0,0,106,112,101,103,58,109,97,112,0,0,0,0,0,0,0,0,103,114,101,101,110,52,0,0,103,114,101,101,110,51,0,0,98,97,99,107,0,0,0,0,103,114,101,101,110,50,0,0,103,114,101,101,110,49,0,0,103,114,101,101,110,0,0,0,44,0,0,0,0,0,0,0,103,114,97,121,57,57,0,0,37,37,69,79,70,10,0,0,111,101,108,105,103,0,0,0,103,114,97,121,57,56,0,0,103,114,97,121,57,55,0,0,103,114,97,121,57,54,0,0,103,114,97,121,57,53,0,0,47,98,117,112,117,56,47,50,0,0,0,0,0,0,0,0,103,114,97,
-121,57,52,0,0,103,114,97,121,57,51,0,0,103,114,97,121,57,50,0,0,103,114,97,121,57,49,0,0,103,114,97,121,57,48,0,0,37,115,108,105,110,101,45,116,104,114,111,117,103,104,0,0,103,114,97,121,57,0,0,0,101,110,100,10,114,101,115,116,111,114,101,10,0,0,0,0,111,99,105,114,99,0,0,0,103,114,97,121,56,57,0,0,103,114,97,121,56,56,0,0,103,114,97,121,56,55,0,0,103,114,97,121,56,54,0,0,47,98,117,112,117,56,47,49,0,0,0,0,0,0,0,0,103,114,97,121,56,53,0,0,37,100,32,37,100,32,35,37,48,50,120,37,48,50,120,37,48,50,120,
-10,0,0,0,0,103,114,97,121,56,52,0,0,103,114,97,121,56,51,0,0,103,114,97,121,56,50,0,0,103,114,97,121,56,49,0,0,65,118,97,110,116,71,97,114,100,101,45,68,101,109,105,79,98,108,105,113,117,101,0,0,117,110,100,101,114,108,105,110,101,0,0,0,0,0,0,0,103,114,97,121,56,48,0,0,37,37,37,37,80,97,103,101,115,58,32,37,100,10,0,0,111,97,99,117,116,101,0,0,103,114,97,121,56,0,0,0,103,114,97,121,55,57,0,0,103,114,97,121,55,56,0,0,103,114,97,121,55,55,0,0,47,98,117,112,117,55,47,55,0,0,0,0,0,0,0,0,103,114,97,121,
-55,54,0,0,103,114,97,121,55,53,0,0,103,114,97,121,55,52,0,0,103,114,97,121,55,51,0,0,103,114,97,121,55,50,0,0,32,116,101,120,116,45,100,101,99,111,114,97],"i8",L,l.J+122916);D([116,105,111,110,61,34,0,0,0,0,0,0,103,114,97,121,55,49,0,0,37,37,84,114,97,105,108,101,114,10,0,0,0,0,0,0,110,117,0,0,0,0,0,0,103,114,97,121,55,48,0,0,103,114,97,121,55,0,0,0,103,114,97,121,54,57,0,0,103,114,97,121,54,56,0,0,47,98,117,112,117,55,47,54,0,0,0,0,0,0,0,0,111,108,105,118,101,0,0,0,103,114,97,121,54,55,0,0,103,114,
-97,121,54,54,0,0,103,114,97,121,54,53,0,0,103,114,97,121,54,52,0,0,32,99,114,101,97,116,101,32,112,111,108,121,103,111,110,32,0,0,0,0,0,0,0,0,103,114,97,121,54,51,0,0,32,102,111,110,116,45,115,116,121,108,101,61,34,105,116,97,108,105,99,34,0,0,0,0,103,114,97,121,54,50,0,0,37,37,69,110,100,83,101,116,117,112,0,0,0,0,0,0,110,116,105,108,100,101,0,0,103,114,97,121,54,49,0,0,103,114,97,121,54,48,0,0,47,97,99,99,101,110,116,55,47,49,0,0,0,0,0,0,103,114,97,121,54,0,0,0,103,114,97,121,53,57,0,0,47,98,117,
-112,117,55,47,53,0,0,0,0,0,0,0,0,103,114,97,121,53,56,0,0,103,114,97,121,53,55,0,0,103,114,97,121,53,54,0,0,103,114,97,121,53,53,0,0,98,111,108,100,0,0,0,0,103,114,97,121,53,52,0,0,32,102,111,110,116,45,119,101,105,103,104,116,61,34,98,111,108,100,34,0,0,0,0,0,103,114,97,121,53,51,0,0,65,103,114,97,112,104,105,110,102,111,95,116,0,0,0,0,125,32,105,102,0,0,0,0,110,115,117,98,0,0,0,0,98,111,108,100,0,0,0,0,116,111,111,108,116,105,112,0,103,114,97,121,53,50,0,0,103,114,97,121,53,49,0,0,112,108,97,105,
-110,116,101,120,116,0,0,0,0,0,0,0,95,112,111,114,116,95,37,115,95,37,115,95,37,115,95,37,108,100,0,0,0,0,0,0,67,97,108,99,117,108,97,116,105,110,103,32,115,104,111,114,116,101,115,116,32,112,97,116,104,115,58,32,0,0,0,0,103,114,97,121,53,48,0,0,108,104,101,105,103,104,116,0,92,76,0,0,0,0,0,0,103,114,97,121,53,0,0,0,47,98,117,112,117,55,47,52,0,0,0,0,0,0,0,0,103,114,97,121,52,57,0,0,45,45,0,0,0,0,0,0,103,114,97,121,52,56,0,0,86,82,0,0,0,0,0,0,103,114,97,121,52,55,0,0,111,118,101,114,108,97,112,95,
-115,99,97,108,105,110,103,0,104,101,97,100,99,108,105,112,0,0,0,0,0,0,0,0,103,114,97,121,52,54,0,0,35,101,48,101,48,101,48,0,103,114,97,121,52,53,0,0,32,102,111,110,116,45,102,97,109,105,108,121,61,34,37,115,34,0,0,0,0,0,0,0,103,114,97,121,52,52,0,0,32,32,32,32,117,115,101,114,100,105,99,116,32,40,62,62,41,32,99,118,110,32,40,91,41,32,99,118,110,32,108,111,97,100,32,112,117,116,0,0,99,111,114,110,102,108,111,119,101,114,98,108,117,101,0,0,110,111,116,105,110,0,0,0,103,114,97,121,52,51,0,0,103,114,
-97,121,52,50,0,0,103,114,97,121,52,49,0,0,103,114,97,121,52,48,0,0,47,98,117,112,117,55,47,51,0,0,0,0,0,0,0,0,103,114,97,112,104,32,0,0,103,114,97,112,104,32,37,115,32,105,115,32,100,105,115,99,111,110,110,101,99,116,101,100,46,32,72,101,110,99,101,44,32,116,104,101,32,99,105,114,99,117,105,116,32,109,111,100,101,108,10,0,0,0,0,0,103,114,97,121,52,0,0,0,103,114,97,121,51,57,0,0,108,101,118,101,108,32,101,100,103,101,32,114,101,99,0,0,103,114,97,121,51,56,0,0,103,114,97,121,51,55,0,0,109,109,0,0,0,
-0,0,0,110,101,119,112,97,116,104,32,0,0,0,0,0,0,0,0,103,114,97,121,51,54,0,0,32,102,111,110,116,45,115,116,121,108,101,61,34,37,115,34,0,0,0,0,0,0,0,0,103,114,97,121,51,53,0,0,32,32,32,32,117,115,101,114,100,105,99,116,32,40,60,60,41,32,99,118,110,32,40,91,41,32,99,118,110,32,108,111,97,100,32,112,117,116,0,0,108,105,110,101,0,0,0,0,110,111,116,0,0,0,0,0,103,114,97,121,51,52,0,0,103,114,97,121,51,51,0,0,109,105,110,99,114,111,115,115,58,32,112,97,115,115,32,37,100,32,105,116,101,114,32,37,100,32,
-116,114,121,105,110,103,32,37,100,32,99,117,114,95,99,114,111,115,115,32,37,100,32,98,101,115,116,95,99,114,111,115,115,32,37,100,10,0,32,104,114,101,102,61,34,0,103,114,97,121,51,50,0,0,103,114,97,121,51,49,0,0,47,98,117,112,117,55,47,50,0,0,0,0,0,0,0,0,103,114,97,121,51,48,0,0,103,114,97,121,51,0,0,0,103,114,97,121,50,57,0,0,103,114,97,121,50,56,0,0,103,114,97,121,50,55,0,0,32,102,111,110,116,45,115,116,114,101,116,99,104,61,34,37,115,34,0,0,0,0,0,0,103,114,97,121,50,54,0,0,50,32,108,116,32,123,
-0,0,110,105,0,0,0,0,0,0,103,114,97,121,50,53,0,0,103,114,97,121,50,52,0,0,103,114,97,121,50,51,0,0,103,114,97,121,50,50,0,0,47,98,117,112,117,55,47,49,0,0,0,0,0,0,0,0,101,110,99,111,100,105,110,103,32,115,112,101,99,105,102,105,101,100,32,105,110,32,88,77,76,32,100,101,99,108,97,114,97,116,105,111,110,32,105,115,32,105,110,99,111,114,114,101,99,116,0,0,0,0,0,0,111,117,116,32,111,102,32,109,101,109,111,114,121,0,0,0,103,114,97,121,50,49,0,0,103,114,97,121,50,48,0,0,103,114,97,121,50,0,0,0,103,114,
-97,121,49,57,0,0,103,114,97,121,49,56,0,0,32,102,111,110,116,45,119,101,105,103,104,116,61,34,37,115,34,0,0,0,0,0,0,0,103,114,97,121,49,55,0,0,47,108,97,110,103,117,97,103,101,108,101,118,101,108,32,119,104,101,114,101,32,123,112,111,112,32,108,97,110,103,117,97,103,101,108,101,118,101,108,125,123,49,125,32,105,102,101,108,115,101,0,0,0,0,0,0,110,101,0,0,0,0,0,0,103,114,97,121,49,54,0,0,103,114,97,121,49,53,0,0,103,114,97,121,49,52,0,0,103,114,97,121,49,51,0,0,47,98,117,112,117,54,47,54,0,0,0,0,0,
-0,0,0,103,105,102,58,109,97,112,0,103,114,97,121,49,50,0,0,103,114,97,121,49,49,0,0,103,114,97,121,49,48,48,0,102,111,114,119,97,114,100,0,103,114,97,121,49,48,0,0,103,114,97,121,49,0,0,0,44,37,115,0,0,0,0,0,103,114,97,121,48,0,0,0,37,32,109,97,107,101,32,39,60,60,39,32,97,110,100,32,39,62,62,39,32,115,97,102,101,32,111,110,32,80,83,32,76,101,118,101,108,32,49,32,100,101,118,105,99,101,115,0,110,100,97,115,104,0,0,0,103,114,97,121,0,0,0,0,105,110,115,116,97,108,108,95,105,110,95,114,97,110,107,44,
-32,108,105,110,101,32,37,100,58,32,37,115,32,37,115,32,114,97,110,107,32,37,100,32,105,32,61,32,37,100,32,97,110,32,61,32,48,10,0,0,103,111,108,100,101,110,114,111,100,52,0,0,0,0,0,0,103,111,108,100,101,110,114,111,100,51,0,0,0,0,0,0,103,111,108,100,101,110,114,111,100,50,0,0,0,0,0,0,47,98,117,112,117,54,47,53,0,0,0,0,0,0,0,0,103,111,108,100,101,110,114,111,100,49,0,0,0,0,0,0,103,111,108,100,101,110,114,111,100,0,0,0,0,0,0,0,103,111,108,100,52,0,0,0,103,111,108,100,51,0,0,0,103,111,108,100,50,0,0,
-0,32,102,111,110,116,45,102,97,109,105,108,121,61,34,37,115,0,0,0,0,0,0,0,0,103,111,108,100,49,0,0,0,47,112,100,102,109,97,114,107,32,119,104,101,114,101,32,123,112,111,112,125,32,123,117,115,101,114,100,105,99,116,32,47,112,100,102,109,97,114,107,32,47,99,108,101,97,114,116,111,109,97,114,107,32,108,111,97,100,32,112,117,116,125,32,105,102,101,108,115,101,0,0,0,110,98,115,112,0,0,0,0,112,101,110,100,32,100,105,99,116,111,102,32,97,32,98,97,100,32,111,98,106,101,99,116,0,0,0,0,0,0,0,0,103,111,108,
-100,0,0,0,0,103,104,111,115,116,119,104,105,116,101,0,0,0,0,0,0,103,97,105,110,115,98,111,114,111,0,0,0,0,0,0,0,102,111,114,101,115,116,103,114,101,101,110,0,0,0,0,0,47,98,117,112,117,54,47,52,0,0,0,0,0,0,0,0,102,108,111,114,97,108,119,104,105,116,101,0,0,0,0,0,102,105,114,101,98,114,105,99,107,52,0,0,0,0,0,0,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,46,51,102,32,37,100,32,37,46,52,102,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,
-37,100,32,37,100,10,0,0,0,0,0,0,0,0,102,105,114,101,98,114,105,99,107,51,0,0,0,0,0,0,102,105,114,101,98,114,105,99,107,50,0,0,0,0,0,0,102,105,114,101,98,114,105,99,107,49,0,0,0,0,0,0,65,118,97,110,116,71,97,114,100,101,45,66,111,111,107,0,32,120,61,34,37,103,34,32,121,61,34,37,103,34,0,0,102,105,114,101,98,114,105,99,107,0,0,0,0,0,0,0,37,32,109,97,107,101,32,115,117,114,101,32,112,100,102,109,97,114,107,32,105,115,32,104,97,114,109,108,101,115,115,32,102,111,114,32,80,83,45,105,110,116,101,114,112,
-114,101,116,101,114,115,32,111,116,104,101,114,32,116,104,97,110,32,68,105,115,116,105,108,108,101,114,0,0,0,0,0,0,0,0,110,97,98,108,97,0,0,0,100,111,100,103,101,114,98,108,117,101,52,0,0,0,0,0,100,111,100,103,101,114,98,108,117,101,51,0,0,0,0,0,100,111,100,103,101,114,98,108,117,101,50,0,0,0,0,0,100,111,100,103,101,114,98,108,117,101,49,0,0,0,0,0,47,98,117,112,117,54,47,51,0,0,0,0,0,0,0,0,100,111,100,103,101,114,98,108,117,101,0,0,0,0,0,0,100,105,109,103,114,101,121,0,100,105,109,103,114,97,121,
-0,102,111,110,116,115,105,122,101,0,0,0,0,0,0,0,0,100,101,101,112,115,107,121,98,108,117,101,52,0,0,0,0,100,101,101,112,115,107,121,98,108,117,101,51,0,0,0,0,32,116,101,120,116,45,97,110,99,104,111,114,61,34,109,105,100,100,108,101,34,0,0,0,100,101,101,112,115,107,121,98,108,117,101,50,0,0,0,0,37,32,47,97,114,114,111,119,119,105,100,116,104,32,53,32,100,101,102,0,0,0,0,0,109,117,0,0,0,0,0,0,100,101,101,112,115,107,121,98,108,117,101,49,0,0,0,0,102,108,97,116,46,99,0,0,100,101,101,112,115,107,121,
-98,108,117,101,0,0,0,0,0,100,101,101,112,112,105,110,107,52,0,0,0,0,0,0,0,100,101,101,112,112,105,110,107,51,0,0,0,0,0,0,0,47,98,117,112,117,54,47,50,0,0,0,0,0,0,0,0,110,97,118,121,0,0,0,0,100,101,101,112,112,105,110,107,50,0,0,0,0,0,0,0,100,101,101,112,112,105,110,107,49,0,0,0,0,0,0,0,100,101,101,112,112,105,110,107,0,0,0,0,0,0,0,0,100,97,114,107,118,105,111,108,101,116,0,0,0,0,0,0,32,45,115,109,111,111,116,104,32,98,101,122,105,101,114,32,0,0,0,0,0,0,0,0,100,97,114,107,116,117,114,113,117,111,105,
-115,101,0,0,0,32,116,101,120,116,45,97,110,99,104,111,114,61,34,101,110,100,34,0,0,0,0,0,0,100,97,114,107,115,108,97,116,101,103,114,101,121,0,0,0,37,32,47,97,114,114,111,119,108,101,110,103,116,104,32,49,48,32,100,101,102,0,0,0,109,105,110,117,115,0,0,0,100,97,114,107,115,108,97,116,101,103,114,97,121,52,0,0,100,97,114,107,115,108,97,116,101,103,114,97,121,51,0,0,100,97,114,107,115,108,97,116,101,103,114,97,121,50,0,0,47,97,99,99,101,110,116,54,47,54,0,0,0,0,0,0,100,97,114,107,115,108,97,116,101,
-103,114,97,121,49,0,0,47,98,117,112,117,54,47,49,0,0,0,0,0,0,0,0,100,97,114,107,115,108,97,116,101,103,114,97,121,0,0,0,100,97,114,107,115,108,97,116,101,98,108,117,101,0,0,0,100,97,114,107,115,101,97,103,114,101,101,110,52,0,0,0,100,97,114,107,115,101,97,103,114,101,101,110,51,0,0,0,102,105,108,108,101,100,0,0,100,97,114,107,115,101,97,103,114,101,101,110,50,0,0,0,32,116,101,120,116,45,97,110,99,104,111,114,61,34,115,116,97,114,116,34,0,0,0,0,100,97,114,107,115,101,97,103,114,101,101,110,49,0,0,
-0,95,95,99,108,117,115,116,101,114,110,111,100,101,115,0,0,49,32,115,101,116,109,105,116,101,114,108,105,109,105,116,0,109,105,100,100,111,116,0,0,100,101,109,105,0,0,0,0,65,103,101,100,103,101,105,110,102,111,95,116,0,0,0,0,100,97,114,107,115,101,97,103,114,101,101,110,0,0,0,0,100,97,114,107,115,97,108,109,111,110,0,0,0,0,0,0,110,111,110,101,0,0,0,0,110,111,100,101,32,34,37,115,34,32,105,115,32,99,111,110,116,97,105,110,101,100,32,105,110,32,116,119,111,32,110,111,110,45,99,111,109,112,97,114,97,
-98,108,101,32,99,108,117,115,116,101,114,115,32,34,37,115,34,32,97,110,100,32,34,37,115,34,10,0,0,0,0,101,110,100,32,112,111,114,116,58,32,40,37,46,53,103,44,32,37,46,53,103,41,44,32,116,97,110,103,101,110,116,32,97,110,103,108,101,58,32,37,46,53,103,44,32,37,115,10,0,0,0,0,0,0,0,0,115,116,117,102,102,46,99,0,100,97,114,107,111,114,99,104,105,100,52,0,0,0,0,0,108,119,105,100,116,104,0,0,92,84,0,0,0,0,0,0,32,115,112,108,105,116,115,32,105,110,116,111,32,116,119,111,32,116,111,107,101,110,115,10,0,
-0,0,0,0,0,0,0,100,97,114,107,111,114,99,104,105,100,51,0,0,0,0,0,47,98,117,112,117,53,47,53,0,0,0,0,0,0,0,0,115,116,101,112,32,115,105,122,101,32,61,32,37,100,10,0,100,97,114,107,111,114,99,104,105,100,50,0,0,0,0,0,45,62,0,0,0,0,0,0,100,97,114,107,111,114,99,104,105,100,49,0,0,0,0,0,72,82,0,0,0,0,0,0,100,97,114,107,111,114,99,104,105,100,0,0,0,0,0,0,37,100,0,0,0,0,0,0,100,97,114,107,111,114,97,110,103,101,52,0,0,0,0,0,78,68,95,114,97,110,107,40,102,114,111,109,41,32,60,32,78,68,95,114,97,110,107,
-40,116,111,41,0,0,0,0,0,35,101,56,101,56,101,56,0,100,97,114,107,111,114,97,110,103,101,51,0,0,0,0,0,60,116,101,120,116,0,0,0,100,97,114,107,111,114,97,110,103,101,50,0,0,0,0,0,49,52,32,100,101,102,97,117,108,116,45,102,111,110,116,45,102,97,109,105,108,121,32,115,101,116,95,102,111,110,116,0,109,105,99,114,111,0,0,0,99,111,114,97,108,0,0,0,100,97,114,107,111,114,97,110,103,101,49,0,0,0,0,0,100,97,114,107,111,114,97,110,103,101,0,0,0,0,0,0,100,97,114,107,111,108,105,118,101,103,114,101,101,110,52,
-0,100,97,114,107,111,108,105,118,101,103,114,101,101,110,51,0,47,98,117,112,117,53,47,52,0,0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,109,97,120,105,116,101,114,0,100,97,114,107,111,108,105,118,101,103,114,101,101,110,50,0,100,97,114,107,111,108,105,118,101,103,114,101,101,110,49,0,115,97,109,101,0,0,0,0,100,97,114,107,111,108,105,118,101,103,114,101,101,110,0,0,100,97,114,107,107,104,97,107,105,0,0,0,0,0,0,0,99,109,0,0,0,0,0,0,10,0,0,0,0,0,0,0,100,97,114,107,103,114,101,101,110,0,0,0,0,0,0,0,47,62,10,0,0,0,
-0,0,100,97,114,107,103,111,108,100,101,110,114,111,100,52,0,0,37,37,66,101,103,105,110,83,101,116,117,112,0,0,0,0,109,100,97,115,104,0,0,0,100,97,114,107,103,111,108,100,101,110,114,111,100,51,0,0,100,97,114,107,103,111,108,100,101,110,114,111,100,50,0,0,109,101,114,103,101,50,58,32,103,114,97,112,104,32,37,115,44,32,114,97,110,107,32,37,100,32,104,97,115,32,111,110,108,121,32,37,100,32,60,32,37,100,32,110,111,100,101,115,10,0,0,0,0,0,0,0,100,97,114,107,103,111,108,100,101,110,114,111,100,49,0,0,
-34,0,0,0,0,0,0,0,100,97,114,107,103,111,108,100,101,110,114,111,100,0,0,0,47,98,117,112,117,53,47,51,0,0,0,0,0,0,0,0,99,121,97,110,52,0,0,0,99,121,97,110,51,0,0,0,99,121,97,110,50,0,0,0,99,121,97,110,49,0,0,0,99,121,97,110,0,0,0,0,32,114,120,61,34,37,103,34,32,114,121,61,34,37,103,34,0,0,0,0,0,0,0,0,99,114,105,109,115,111,110,0,37,37,69,110,100,80,114,111,108,111,103,0,0,0,0,0,109,97,99,114,0,0,0,0,99,111,114,110,115,105,108,107,52,0,0,0,0,0,0,0,115,97,109,101,104,101,97,100,0,0,0,0,0,0,0,0,99,111,
-114,110,115,105,108,107,51,0,0,0,0,0,0,0,99,111,114,110,115,105,108,107,50,0,0,0,0,0,0,0,99,111,114,110,115,105,108,107,49,0,0,0,0,0,0,0,47,98,117,112,117,53,47,50,0,0,0,0,0,0,0,0,117,110,107,110,111,119,110,32,101,110,99,111,100,105,110,103,0,0,0,0,0,0,0,0,99,111,114,110,115,105,108,107,0,0,0,0,0,0,0,0,99,111,114,110,102,108,111,119,101,114,98,108,117,101,0,0,99,111,114,97,108,52,0,0,99,111,114,97,108,51,0,0,99,111,114,97,108,50,0,0,32,99,120,61,34,37,103,34,32,99,121,61,34,37,103,34,0,0,0,0,0,0,
-0,0,99,111,114,97,108,49,0,0,105,115,109,97,112,58,109,97,112,0,0,0,0,0,0,0,108,116,0,0,0,0,0,0,99,111,114,97,108,0,0,0,99,104,111,99,111,108,97,116,101,52,0,0,0,0,0,0,37,37,69,110,100,82,101,115,111,117,114,99,101,0,0,0,99,104,111,99,111,108,97,116,101,51,0,0,0,0,0,0,99,104,111,99,111,108,97,116,101,50,0,0,0,0,0,0,47,98,117,112,117,53,47,49,0,0,0,0,0,0,0,0,112,110,103,58,109,97,112,0,99,104,111,99,111,108,97,116,101,49,0,0,0,0,0,0,99,104,111,99,111,108,97,116,101,0,0,0,0,0,0,0,99,104,97,114,116,
-114,101,117,115,101,52,0,0,0,0,0,99,104,97,114,116,114,101,117,115,101,51,0,0,0,0,0,105,110,118,101,109,112,116,121,0,0,0,0,0,0,0,0,99,104,97,114,116,114,101,117,115,101,50,0,0,0,0,0,60,101,108,108,105,112,115,101,0,0,0,0,0,0,0,0,99,104,97,114,116,114,101,117,115,101,49,0,0,0,0,0,47,99,117,114,108,97,121,101,114,32,48,32,100,101,102,0,108,115,113,117,111,0,0,0,99,104,97,114,116,114,101,117,115,101,0,0,0,0,0,0,99,97,100,101,116,98,108,117,101,52,0,0,0,0,0,0,99,97,100,101,116,98,108,117,101,51,0,0,
-0,0,0,0,103,105,102,58,115,118,103,0,99,97,100,101,116,98,108,117,101,50,0,0,0,0,0,0,47,98,117,112,117,52,47,52,0,0,0,0,0,0,0,0,99,97,100,101,116,98,108,117,101,49,0,0,0,0,0,0,99,97,100,101,116,98,108,117,101,0,0,0,0,0,0,0,98,117,114,108,121,119,111,111,100,52,0,0,0,0,0,0,98,117,114,108,121,119,111,111,100,51,0,0,0,0,0,0,98,117,114,108,121,119,111,111,100,50,0,0,0,0,0,0,37,103,44,37,103,0,0,0,98,117,114,108,121,119,111,111,100,49,0,0,0,0,0,0,9,123,105,110,118,105,115,125,32,105,102,0,0,0,0,0,108,
-115,97,113,117,111,0,0,98,117,114,108,121,119,111,111,100,0,0,0,0,0,0,0,98,114,111,119,110,52,0,0,98,114,111,119,110,51,0,0,98,114,111,119,110,50,0,0,47,98,117,112,117,52,47,51,0,0,0,0,0,0,0,0,98,114,111,119,110,49,0,0,98,114,111,119,110,0,0,0,98,108,117,101,118,105,111,108,101,116,0,0,0,0,0,0,32,37,100,0,0,0,0,0,98,108,117,101,52,0,0,0,98,108,117,101,51,0,0,0,65,118,97,110,116,71,97,114,100,101,45,66,111,111,107,79,98,108,105,113,117,101,0,0,60,112,111,108,121,103,111,110,0,0,0,0,0,0,0,0,98,108,
-117,101,50,0,0,0,9,111,114,0,0,0,0,0,108,114,109,0,0,0,0,0,98,108,117,101,49,0,0,0,98,108,117,101,0,0,0,0,98,108,97,110,99,104,101,100,97,108,109,111,110,100,0,0,98,108,97,99,107,0,0,0,47,98,117,112,117,52,47,50,0,0,0,0,0,0,0,0,98,105,115,113,117,101,52,0,98,105,115,113,117,101,51,0,98,105,115,113,117,101,50,0,98,105,115,113,117,101,49,0,98,105,115,113,117,101,0,0,65,103,110,111,100,101,105,110,102,111,95,116,0,0,0,0,59,34,47,62,10,60,47,108,105,110,101,97,114,71,114,97,100,105,101,110,116,62,10,
-60,47,100,101,102,115,62,10,0,98,101,105,103,101,0,0,0,9,99,117,114,108,97,121,101,114,32,109,121,117,112,112,101,114,32,103,116,0,0,0,0,108,111,122,0,0,0,0,0,97,122,117,114,101,52,0,0,97,122,117,114,101,51,0,0,97,122,117,114,101,50,0,0,97,122,117,114,101,49,0,0,47,98,117,112,117,52,47,49,0,0,0,0,0,0,0,0,109,97,114,111,111,110,0,0,97,122,117,114,101,0,0,0,97,113,117,97,109,97,114,105,110,101,52,0,0,0,0,0,97,113,117,97,109,97,114,105,110,101,51,0,0,0,0,0,97,113,117,97,109,97,114,105,110,101,50,0,0,
-0,0,0,32,45,119,105,100,116,104,32,0,0,0,0,0,0,0,0,97,113,117,97,109,97,114,105,110,101,49,0,0,0,0,0,60,115,116,111,112,32,111,102,102,115,101,116,61,34,37,46,48,51,102,34,32,115,116,121,108,101,61,34,115,116,111,112,45,99,111,108,111,114,58,0,97,113,117,97,109,97,114,105,110,101,0,0,0,0,0,0,9,99,117,114,108,97,121,101,114,32,109,121,108,111,119,101,114,32,108,116,0,0,0,0,108,111,119,97,115,116,0,0,97,110,116,105,113,117,101,119,104,105,116,101,52,0,0,0,97,110,116,105,113,117,101,119,104,105,116,
-101,51,0,0,0,97,110,116,105,113,117,101,119,104,105,116,101,50,0,0,0,97,110,116,105,113,117,101,119,104,105,116,101,49,0,0,0,47,97,99,99,101,110,116,54,47,53,0,0,0,0,0,0,47,98,117,112,117,51,47,51,0,0,0,0,0,0,0,0,97,110,116,105,113,117,101,119,104,105,116,101,0,0,0,0,97,108,105,99,101,98,108,117,101,0,0,0,0,0,0,0,47,121,108,111,114,114,100,57,47,57,0,0,0,0,0,0,47,121,108,111,114,114,100,57,47,56,0,0,0,0,0,0,83,32,0,0,0,0,0,0,47,121,108,111,114,114,100,57,47,55,0,0,0,0,0,0,47,121,108,111,114,114,100,
-57,47,54,0,0,0,0,0,0,120,49,61,34,37,103,34,32,121,49,61,34,37,103,34,32,120,50,61,34,37,103,34,32,121,50,61,34,37,103,34,32,62,10,0,0,0,0,0,0,99,108,117,115,116,101,114,0,9,47,109,121,108,111,119,101,114,32,101,120,99,104,32,100,101,102,0,0,0,0,0,0,108,102,108,111,111,114,0,0,65,118,97,110,116,71,97,114,100,101,45,68,101,109,105,0,47,121,108,111,114,114,100,57,47,53,0,0,0,0,0,0,95,76,84,88,95,108,105,98,114,97,114,121,0,0,0,0,47,121,108,111,114,114,100,57,47,52,0,0,0,0,0,0,116,114,105,97,110,103,
-108,101,0,0,0,0,0,0,0,0,75,0,0,0,0,0,0,0,110,111,116,32,99,111,110,115,116,114,97,105,110,101,100,0,66,111,117,110,100,105,110,103,66,111,120,32,110,111,116,32,102,111,117,110,100,32,105,110,32,101,112,115,102,32,102,105,108,101,32,37,115,10,0,0,78,68,95,104,101,97,112,105,110,100,101,120,40,118,41,32,60,32,48,0,0,0,0,0,47,121,108,111,114,114,100,57,47,51,0,0,0,0,0,0,116,97,105,108,95,108,112,0,92,72,0,0,0,0,0,0,39,32,105,110,32,108,105,110,101,32,37,100,32,111,102,32,0,0,0,0,0,0,0,0,47,121,108,111,
-114,114,100,57,47,50,0,0,0,0,0,0,47,98,117,112,117,51,47,50,0,0,0,0,0,0,0,0,117,110,100,101,102,105,110,101,100,0,0,0,0,0,0,0,47,121,108,111,114,114,100,57,47,49,0,0,0,0,0,0,99,111,108,111,114,0,0,0,47,121,108,111,114,114,100,56,47,56,0,0,0,0,0,0,66,82,0,0,0,0,0,0,47,121,108,111,114,114,100,56,47,55,0,0,0,0,0,0,85,110,114,101,99,111,103,110,105,122,101,100,32,111,118,101,114,108,97,112,32,118,97,108,117,101,32,34,37,115,34,32,45,32,117,115,105,110,103,32,102,97,108,115,101,10,0,0,102,111,110,116,
-110,97,109,101,0,0,0,0,0,0,0,0,47,121,108,111,114,114,100,56,47,54,0,0,0,0,0,0,35,51,48,51,48,51,48,0,47,121,108,111,114,114,100,56,47,53,0,0,0,0,0,0,47,121,108,111,114,114,100,56,47,52,0,0,0,0,0,0,60,100,101,102,115,62,10,60,108,105,110,101,97,114,71,114,97,100,105,101,110,116,32,105,100,61,34,108,95,37,100,34,32,103,114,97,100,105,101,110,116,85,110,105,116,115,61,34,117,115,101,114,83,112,97,99,101,79,110,85,115,101,34,32,0,0,0,0,0,0,0,0,9,47,109,121,117,112,112,101,114,32,101,120,99,104,32,100,
-101,102,0,0,0,0,0,0,108,101,0,0,0,0,0,0,99,104,111,99,111,108,97,116,101,0,0,0,0,0,0,0,47,121,108,111,114,114,100,56,47,51,0,0,0,0,0,0,47,121,108,111,114,114,100,56,47,50,0,0,0,0,0,0,47,121,108,111,114,114,100,56,47,49,0,0,0,0,0,0,47,121,108,111,114,114,100,55,47,55,0,0,0,0,0,0,47,98,117,112,117,51,47,49,0,0,0,0,0,0,0,0,104,101,97,100,112,111,114,116,0,0,0,0,0,0,0,0,65,103,114,97,112,104,105,110,102,111,95,116,0,0,0,0,47,121,108,111,114,114,100,55,47,54,0,0,0,0,0,0,47,121,108,111,114,114,100,55,47,
-53,0,0,0,0,0,0,115,105,110,107,0,0,0,0,47,121,108,111,114,114,100,55,47,52,0,0,0,0,0,0,47,121,108,111,114,114,100,55,47,51,0,0,0,0,0,0,34,0,0,0,0,0,0,0,37,32,0,0,0,0,0,0,47,121,108,111,114,114,100,55,47,50,0,0,0,0,0,0,47,121,108,111,114,114,100,55,47,49,0,0,0,0,0,0,59,34,47,62,10,60,47,114,97,100,105,97,108,71,114,97,100,105,101,110,116,62,10,60,47,100,101,102,115,62,10,0,47,111,110,108,97,121,101,114,115,32,123,0,0,0,0,0,108,100,113,117,111,0,0,0,97,103,100,101,108,101,116,101,32,111,110,32,98,97,
-100,32,111,98,106,101,99,116,0,0,47,121,108,111,114,114,100,54,47,54,0,0,0,0,0,0,47,121,108,111,114,114,100,54,47,53,0,0,0,0,0,0,109,105,110,99,114,111,115,115,32,37,115,58,32,37,100,32,99,114,111,115,115,105,110,103,115,44,32,37,46,50,102,32,115,101,99,115,46,10,0,0,47,121,108,111,114,114,100,54,47,52,0,0,0,0,0,0,32,105,100,61,34,0,0,0,47,121,108,111,114,114,100,54,47,51,0,0,0,0,0,0,47,98,117,103,110,57,47,57,0,0,0,0,0,0,0,0,47,121,108,111,114,114,100,54,47,50,0,0,0,0,0,0,47,121,108,111,114,114,
-100,54,47,49,0,0,0,0,0,0,47,121,108,111,114,114,100,53,47,53,0,0,0,0,0,0,47,121,108,111,114,114,100,53,47,52,0,0,0,0,0,0,47,121,108,111,114,114,100,53,47,51,0,0,0,0,0,0,47,121,108,111,114,114,100,53,47,50,0,0,0,0,0,0,60,115,116,111,112,32,111,102,102,115,101,116,61,34,49,34,32,115,116,121,108,101,61,34,115,116,111,112,45,99,111,108,111,114,58,0,0,0,0,0,47,111,110,108,97,121,101,114,32,123,32,99,117,114,108,97,121,101,114,32,110,101,32,123,105,110,118,105,115,125,32,105,102,32,125,32,100,101,102,0,
-108,99,101,105,108,0,0,0,47,121,108,111,114,114,100,53,47,49,0,0,0,0,0,0,47,121,108,111,114,114,100,52,47,52,0,0,0,0,0,0,47,121,108,111,114,114,100,52,47,51,0,0,0,0,0,0,47,121,108,111,114,114,100,52,47,50,0,0,0,0,0,0,47,98,117,103,110,57,47,56,0,0,0,0,0,0,0,0,88,77,76,32,111,114,32,116,101,120,116,32,100,101,99,108,97,114,97,116,105,111,110,32,110,111,116,32,97,116,32,115,116,97,114,116,32,111,102,32,101,110,116,105,116,121,0,0,47,121,108,111,114,114,100,52,47,49,0,0,0,0,0,0,47,121,108,111,114,114,
-100,51,47,51,0,0,0,0,0,0,47,121,108,111,114,114,100,51,47,50,0,0,0,0,0,0,47,121,108,111,114,114,100,51,47,49,0,0,0,0,0,0,47,121,108,111,114,98,114,57,47,57,0,0,0,0,0,0,47,121,108,111,114,98,114,57,47,56,0,0,0,0,0,0,59,34,47,62,10,0,0,0,9,47,103,114,97,112,104,99,111,108,111,114,32,123,110,111,112,99,111,108,111,114,125,32,100,101,102,0,0,0,0,0,108,97,114,114,0,0,0,0,47,121,108,111,114,98,114,57,47,55,0,0,0,0,0,0,47,121,108,111,114,98,114,57,47,54,0,0,0,0,0,0,47,121,108,111,114,98,114,57,47,53,0,0,
-0,0,0,0,47,121,108,111,114,98,114,57,47,52,0,0,0,0,0,0,47,98,117,103,110,57,47,55,0,0,0,0,0,0,0,0,40,108,105,98,41,58,112,115,0,0,0,0,0,0,0,0,47,121,108,111,114,98,114,57,47,51,0,0,0,0,0,0,47,121,108,111,114,98,114,57,47,50,0,0,0,0,0,0,47,121,108,111,114,98,114,57,47,49,0,0,0,0,0,0,47,121,108,111,114,98,114,56,47,56,0,0,0,0,0,0,47,121,108,111,114,98,114,56,47,55,0,0,0,0,0,0,104,97,108,102,0,0,0,0,47,121,108,111,114,98,114,56,47,54,0,0,0,0,0,0,49,46,0,0,0,0,0,0,9,47,101,100,103,101,99,111,108,111,
-114,32,123,110,111,112,99,111,108,111,114,125,32,100,101,102,0,0,0,0,0,0,108,97,113,117,111,0,0,0,47,121,108,111,114,98,114,56,47,53,0,0,0,0,0,0,47,121,108,111,114,98,114,56,47,52,0,0,0,0,0,0,47,121,108,111,114,98,114,56,47,51,0,0,0,0,0,0,47,121,108,111,114,98,114,56,47,50,0,0,0,0,0,0,47,98,117,103,110,57,47,54,0,0,0,0,0,0,0,0,47,121,108,111,114,98,114,56,47,49,0,0,0,0,0,0,47,121,108,111,114,98,114,55,47,55,0,0,0,0,0,0,47,121,108,111,114,98,114,55,47,54,0,0,0,0,0,0,47,121,108,111,114,98,114,55,47,
-53,0,0,0,0,0,0,47,121,108,111,114,98,114,55,47,52,0,0,0,0,0,0,47,121,108,111,114,98,114,55,47,51,0,0,0,0,0,0,37,102,0,0,0,0,0,0,9,47,110,111,100,101,99,111,108,111,114,32,123,110,111,112,99,111,108,111,114,125,32,100,101,102,0,0,0,0,0,0,108,97,110,103,0,0,0,0,47,121,108,111,114,98,114,55,47,50,0,0,0,0,0,0,47,121,108,111,114,98,114,55,47,49,0,0,0,0,0,0,47,121,108,111,114,98,114,54,47,54,0,0,0,0,0,0,47,121,108,111,114,98,114,54,47,53,0,0,0,0,0,0,47,98,117,103,110,57,47,53,0,0,0,0,0,0,0,0,47,121,108,
-111,114,98,114,54,47,52,0,0,0,0,0,0,47,121,108,111,114,98,114,54,47,51,0,0,0,0,0,0,47,121,108,111,114,98,114,54,47,50,0,0,0,0,0,0,47,121,108,111,114,98,114,54,47,49,0,0,0,0,0,0,32,37,115,10,0,0,0,0,47,121,108,111,114,98,114,53,47,53,0,0,0,0,0,0,47,121,108,111,114,98,114,53,47,52,0,0,0,0,0,0,65,118,97,110,116,71,97,114,100,101,45,68,101,109,105,0,59,115,116,111,112,45,111,112,97,99,105,116,121,58,0,0,9,97,108,111,97,100,32,112,111,112,32,115,101,116,104,115,98,99,111,108,111,114,0,0,108,97,109,98,
-100,97,0,0,108,105,110,101,108,101,110,103,116,104,0,0,0,0,0,0,47,121,108,111,114,98,114,53,47,51,0,0,0,0,0,0,47,121,108,111,114,98,114,53,47,50,0,0,0,0,0,0,47,121,108,111,114,98,114,53,47,49,0,0,0,0,0,0,47,121,108,111,114,98,114,52,47,52,0,0,0,0,0,0,47,98,117,103,110,57,47,52,0,0,0,0,0,0,0,0,47,121,108,111,114,98,114,52,47,51,0,0,0,0,0,0,47,121,108,111,114,98,114,52,47,50,0,0,0,0,0,0,47,121,108,111,114,98,114,52,47,49,0,0,0,0,0,0,47,121,108,111,114,98,114,51,47,51,0,0,0,0,0,0,47,121,108,111,114,
-98,114,51,47,50,0,0,0,0,0,0,47,121,108,111,114,98,114,51,47,49,0,0,0,0,0,0,60,115,116,111,112,32,111,102,102,115,101,116,61,34,48,34,32,115,116,121,108,101,61,34,115,116,111,112,45,99,111,108,111,114,58,0,0,0,0,0,9,108,97,121,101,114,99,111,108,111,114,115,101,113,32,99,117,114,108,97,121,101,114,32,49,32,115,117,98,32,108,97,121,101,114,108,101,110,32,109,111,100,32,103,101,116,0,0,108,65,114,114,0,0,0,0,47,121,108,103,110,98,117,57,47,57,0,0,0,0,0,0,65,103,110,111,100,101,105,110,102,111,95,116,
-0,0,0,0,47,121,108,103,110,98,117,57,47,56,0,0,0,0,0,0,47,98,117,103,110,57,47,51,0,0,0,0,0,0,0,0,47,121,108,103,110,98,117,57,47,55,0,0,0,0,0,0,47,121,108,103,110,98,117,57,47,54,0,0,0,0,0,0,115,116,114,101,97,109,32,101,110,100,0,0,0,0,0,0,108,105,109,101,0,0,0,0,47,121,108,103,110,98,117,57,47,53,0,0,0,0,0,0,47,121,108,103,110,98,117,57,47,52,0,0,0,0,0,0,47,121,108,103,110,98,117,57,47,51,0,0,0,0,0,0,47,121,108,103,110,98,117,57,47,50,0,0,0,0,0,0,36,99,0,0,0,0,0,0,47,121,108,103,110,98,117,57,
-47,49,0,0,0,0,0,0,47,121,108,103,110,98,117,56,47,56,0,0,0,0,0,0,60,100,101,102,115,62,10,60,114,97,100,105,97,108,71,114,97,100,105,101,110,116,32,105,100,61,34,114,95,37,100,34,32,99,120,61,34,53,48,37,37,34,32,99,121,61,34,53,48,37,37,34,32,114,61,34,55,53,37,37,34,32,102,120,61,34,37,100,37,37,34,32,102,121,61,34,37,100,37,37,34,62,10,0,0,0,0,0,47,115,101,116,108,97,121,101,114,32,123,47,109,97,120,108,97,121,101,114,32,101,120,99,104,32,100,101,102,32,47,99,117,114,108,97,121,101,114,32,101,
-120,99,104,32,100,101,102,0,0,0,0,0,0,0,0,107,97,112,112,97,0,0,0,47,121,108,103,110,98,117,56,47,55,0,0,0,0,0,0,47,121,108,103,110,98,117,56,47,54,0,0,0,0,0,0,47,121,108,103,110,98,117,56,47,53,0,0,0,0,0,0,47,121,108,103,110,98,117,56,47,52,0,0,0,0,0,0,47,98,117,103,110,57,47,50,0,0,0,0,0,0,0,0,47,121,108,103,110,98,117,56,47,51,0,0,0,0,0,0,110,97,110,0,0,0,0,0,47,97,99,99,101,110,116,54,47,52,0,0,0,0,0,0,47,121,108,103,110,98,117,56,47,50,0,0,0,0,0,0,47,121,108,103,110,98,117,56,47,49,0,0,0,0,0,
-0,47,121,108,103,110,98,117,55,47,55,0,0,0,0,0,0,37,46,51,102,0,0,0,0,115,104,111,114,116,101,115,116,46,99,0,0,0,0,0,0,47,121,108,103,110,98,117,55,47,54,0,0,0,0,0,0,47,121,108,103,110,98,117,55,47,53,0,0,0,0,0,0,104,101,97,100,112,111,114,116,0,0,0,0,0,0,0,0,37,99,37,103,44,37,103,0,47,108,97,121,101,114,108,101,110,32,108,97,121,101,114,99,111,108,111,114,115,101,113,32,108,101,110,103,116,104,32,100,101,102,0,0,0,0,0,0,105,117,109,108,0,0,0,0,105,116,97,108,105,99,0,0,65,103,114,97,112,104,105,
-110,102,111,95,116,0,0,0,0,47,121,108,103,110,98,117,55,47,52,0,0,0,0,0,0,47,121,108,103,110,98,117,55,47,51,0,0,0,0,0,0,101,103,103,0,0,0,0,0,115,101,112,0,0,0,0,0,99,111,110,115,116,114,97,105,110,101,100,0,0,0,0,0,114,101,97,100,0,0,0,0,37,115,32,37,46,51,102,10,0,0,0,0,0,0,0,0,47,121,108,103,110,98,117,55,47,50,0,0,0,0,0,0,104,101,97,100,95,108,112,0,92,69,0,0,0,0,0,0,47,121,108,103,110,98,117,55,47,49,0,0,0,0,0,0,47,98,117,103,110,57,47,49,0,0,0,0,0,0,0,0,95,65,71,95,115,116,114,100,97,116,97,
-0,0,0,0,0,32,32,109,97,114,103,105,110,32,37,100,10,0,0,0,0,47,121,108,103,110,98,117,54,47,54,0,0,0,0,0,0,112,101,110,99,111,108,111,114,0,0,0,0,0,0,0,0,115,104,97,112,101,0,0,0,47,121,108,103,110,98,117,54,47,53,0,0,0,0,0,0,83,0,0,0,0,0,0,0,47,121,108,103,110,98,117,54,47,52,0,0,0,0,0,0,79,118,101,114,108,97,112,32,118,97,108,117,101,32,34,37,115,34,32,117,110,115,117,112,112,111,114,116,101,100,32,45,32,105,103,110,111,114,101,100,10,0,0,0,0,0,0,0,100,101,114,105,118,101,100,0,119,101,105,103,
-104,116,0,0,47,121,108,103,110,98,117,54,47,51,0,0,0,0,0,0,35,102,99,102,99,102,99,0,47,121,108,103,110,98,117,54,47,50,0,0,0,0,0,0,47,121,108,103,110,98,117,54,47,49,0,0,0,0,0,0,32,100,61,34,0,0,0,0,100,101,102,0,0,0,0,0,105,115,105,110,0,0,0,0,78,111,32,108,111,97,100,105,109,97,103,101,32,112,108,117,103,105,110,32,102,111,114,32,34,37,115,34,10,0,0,0,99,104,97,114,116,114,101,117,115,101,0,0,0,0,0,0,47,121,108,103,110,98,117,53,47,53,0,0,0,0,0,0,47,121,108,103,110,98,117,53,47,52,0,0,0,0,0,0,
-47,121,108,103,110,98,117,53,47,51,0,0,0,0,0,0,47,121,108,103,110,98,117,53,47,50,0,0,0,0,0,0,47,98,117,103,110,56,47,56,0,0,0,0,0,0,0,0,116,97,105,108,112,111,114,116,0,0,0,0,0,0,0,0,97,115,32,114,101,113,117,105,114,101,100,32,98,121,32,116,104,101,32,45,110,32,102,108,97,103,10,0,0,0,0,0,47,121,108,103,110,98,117,53,47,49,0,0,0,0,0,0,47,121,108,103,110,98,117,52,47,52,0,0,0,0,0,0,109,97,120,0,0,0,0,0,47,121,108,103,110,98,117,52,47,51,0,0,0,0,0,0,47,121,108,103,110,98,117,52,47,50,0,0,0,0,0,0,
-112,99,0,0,0,0,0,0,47,121,108,103,110,98,117,52,47,49,0,0,0,0,0,0,37,46,53,103,32,37,46,53,103,32,37,46,53,103,32,37,115,99,111,108,111,114,10,0,47,121,108,103,110,98,117,51,47,51,0,0,0,0,0,0,60,112,97,116,104,0,0,0,9,93,0,0,0,0,0,0,115,121,110,116,97,120,32,97,109,98,105,103,117,105,116,121,32,45,32,98,97,100,108,121,32,100,101,108,105,109,105,116,101,100,32,110,117,109,98,101,114,32,39,0,0,0,0,0,105,113,117,101,115,116,0,0,47,121,108,103,110,98,117,51,47,50,0,0,0,0,0,0,101,114,114,111,114,32,105,
-110,32,99,111,108,120,108,97,116,101,40,41,10,0,0,0,0,47,121,108,103,110,98,117,51,47,49,0,0,0,0,0,0,40,114,118,32,61,61,32,48,41,32,124,124,32,40,78,68,95,111,114,100,101,114,40,114,118,41,45,78,68,95,111,114,100,101,114,40,118,41,41,42,100,105,114,32,62,32,48,0,47,121,108,103,110,57,47,57,0,0,0,0,0,0,0,0,60,97,114,101,97,32,115,104,97,112,101,61,34,112,111,108,121,34,0,0,0,0,0,0,47,121,108,103,110,57,47,56,0,0,0,0,0,0,0,0,47,98,117,103,110,56,47,55,0,0,0,0,0,0,0,0,47,121,108,103,110,57,47,55,0,
-0,0,0,0,0,0,0,47,121,108,103,110,57,47,54,0,0,0,0,0,0,0,0,47,121,108,103,110,57,47,53,0,0,0,0,0,0,0,0,47,121,108,103,110,57,47,52,0,0,0,0,0,0,0,0,47,121,108,103,110,57,47,51,0,0,0,0,0,0,0,0,47,121,108,103,110,57,47,50,0,0,0,0,0,0,0,0,103,118,114,101,110,100,101,114,95,99,111,114,101,95,115,118,103,46,99,0,0,0,0,0,9,9,91,46,56,32,46,56,32,46,56,93,0,0,0,0,105,111,116,97,0,0,0,0,47,121,108,103,110,57,47,49,0,0,0,0,0,0,0,0,47,121,108,103,110,56,47,56,0,0,0,0,0,0,0,0,47,121,108,103,110,56,47,55,0,0,0,
-0,0,0,0,0,47,121,108,103,110,56,47,54,0,0,0,0,0,0,0,0,47,98,117,103,110,56,47,54,0,0,0,0,0,0,0,0,114,101,102,101,114,101,110,99,101,32,116,111,32,101,120,116,101,114,110,97,108,32,101,110,116,105,116,121,32,105,110,32,97,116,116,114,105,98,117,116,101,0,0,0,0,0,0,0,47,121,108,103,110,56,47,53,0,0,0,0,0,0,0,0,47,121,108,103,110,56,47,52,0,0,0,0,0,0,0,0,47,121,108,103,110,56,47,51,0,0,0,0,0,0,0,0,47,121,108,103,110,56,47,50,0,0,0,0,0,0,0,0,47,121,108,103,110,56,47,49,0,0,0,0,0,0,0,0,47,121,108,103,
-110,55,47,55,0,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,9,9,91,46,54,32,46,56,32,46,56,93,0,0,0,0,105,110,116],"i8",L,l.J+133156);D([47,121,108,103,110,55,47,54,0,0,0,0,0,0,0,0,47,121,108,103,110,55,47,53,0,0,0,0,0,0,0,0,47,121,108,103,110,55,47,52,0,0,0,0,0,0,0,0,47,121,108,103,110,55,47,51,0,0,0,0,0,0,0,0,47,98,117,103,110,56,47,53,0,0,0,0,0,0,0,0,112,115,58,112,115,0,0,0,47,121,108,103,110,55,47,50,0,0,0,0,0,0,0,0,47,121,108,103,110,55,47,49,0,0,0,0,0,0,0,0,47,121,108,103,110,54,47,54,0,0,0,0,0,0,0,0,47,
-121,108,103,110,54,47,53,0,0,0,0,0,0,0,0,47,121,108,103,110,54,47,52,0,0,0,0,0,0,0,0,47,121,108,103,110,54,47,51,0,0,0,0,0,0,0,0,101,0,0,0,0,0,0,0,35,37,48,50,120,37,48,50,120,37,48,50,120,0,0,0,9,9,91,46,52,32,46,56,32,46,56,93,0,0,0,0,105,110,102,105,110,0,0,0,47,121,108,103,110,54,47,50,0,0,0,0,0,0,0,0,47,121,108,103,110,54,47,49,0,0,0,0,0,0,0,0,47,121,108,103,110,53,47,53,0,0,0,0,0,0,0,0,47,121,108,103,110,53,47,52,0,0,0,0,0,0,0,0,47,98,117,103,110,56,47,52,0,0,0,0,0,0,0,0,47,121,108,103,110,
-53,47,51,0,0,0,0,0,0,0,0,47,121,108,103,110,53,47,50,0,0,0,0,0,0,0,0,47,121,108,103,110,53,47,49,0,0,0,0,0,0,0,0,47,121,108,103,110,52,47,52,0,0,0,0,0,0,0,0,47,121,108,103,110,52,47,51,0,0,0,0,0,0,0,0,47,121,108,103,110,52,47,50,0,0,0,0,0,0,0,0,53,44,50,0,0,0,0,0,9,9,91,46,50,32,46,56,32,46,56,93,0,0,0,0,105,109,97,103,101,0,0,0,47,121,108,103,110,52,47,49,0,0,0,0,0,0,0,0,47,121,108,103,110,51,47,51,0,0,0,0,0,0,0,0,47,98,117,103,110,56,47,51,0,0,0,0,0,0,0,0,47,121,108,103,110,51,47,50,0,0,0,0,0,0,
-0,0,47,121,108,103,110,51,47,49,0,0,0,0,0,0,0,0,47,115,118,103,47,121,101,108,108,111,119,103,114,101,101,110,0,0,0,0,0,0,0,0,47,115,118,103,47,121,101,108,108,111,119,0,0,0,0,0,47,115,118,103,47,119,104,105,116,101,115,109,111,107,101,0,47,115,118,103,47,119,104,105,116,101,0,0,0,0,0,0,47,115,118,103,47,119,104,101,97,116,0,0,0,0,0,0,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,46,49,102,32,37,100,32,37,100,32,37,100,32,37,100,10,0,0,0,0,47,115,118,
-103,47,118,105,111,108,101,116,0,0,0,0,0,82,0,0,0,0,0,0,0,49,44,53,0,0,0,0,0,9,9,91,48,32,48,32,48,93,0,0,0,0,0,0,0,105,103,114,97,118,101,0,0,108,97,121,111,117,116,0,0,47,115,118,103,47,116,117,114,113,117,111,105,115,101,0,0,47,115,118,103,47,116,111,109,97,116,111,0,0,0,0,0,47,115,118,103,47,116,104,105,115,116,108,101,0,0,0,0,47,115,118,103,47,116,101,97,108,0,0,0,0,0,0,0,47,98,117,103,110,56,47,50,0,0,0,0,0,0,0,0,47,115,118,103,47,116,97,110,0,0,0,0,0,0,0,0,47,115,118,103,47,115,116,101,101,
-108,98,108,117,101,0,0,47,115,118,103,47,115,112,114,105,110,103,103,114,101,101,110,0,0,0,0,0,0,0,0,47,115,118,103,47,115,110,111,119,0,0,0,0,0,0,0,115,97,109,101,116,97,105,108,0,0,0,0,0,0,0,0,47,115,118,103,47,115,108,97,116,101,103,114,101,121,0,0,47,115,118,103,47,115,108,97,116,101,103,114,97,121,0,0,34,0,0,0,0,0,0,0,9,91,9,37,32,108,97,121,101,114,32,99,111,108,111,114,32,115,101,113,117,101,110,99,101,32,45,32,100,97,114,107,101,115,116,32,116,111,32,108,105,103,104,116,101,115,116,0,105,
-101,120,99,108,0,0,0,47,115,118,103,47,115,108,97,116,101,98,108,117,101,0,0,102,97,115,116,103,114,46,99,0,0,0,0,0,0,0,0,47,115,118,103,47,115,107,121,98,108,117,101,0,0,0,0,47,115,118,103,47,115,105,108,118,101,114,0,0,0,0,0,47,115,118,103,47,115,105,101,110,110,97,0,0,0,0,0,47,98,117,103,110,56,47,49,0,0,0,0,0,0,0,0,103,114,101,101,110,0,0,0,47,115,118,103,47,115,101,97,115,104,101,108,108,0,0,0,47,115,118,103,47,115,101,97,103,114,101,101,110,0,0,0,47,115,118,103,47,115,97,110,100,121,98,114,
-111,119,110,0,47,115,118,103,47,115,97,108,109,111,110,0,0,0,0,0,35,37,48,50,120,37,48,50,120,37,48,50,120,0,0,0,47,115,118,103,47,115,97,100,100,108,101,98,114,111,119,110,0,0,0,0,0,0,0,0,47,115,118,103,47,114,111,121,97,108,98,108,117,101,0,0,34,32,115,116,114,111,107,101,45,111,112,97,99,105,116,121,61,34,37,102,0,0,0,0,47,108,97,121,101,114,99,111,108,111,114,115,101,113,0,0,105,99,105,114,99,0,0,0,47,115,118,103,47,114,111,115,121,98,114,111,119,110,0,0,47,115,118,103,47,114,101,100,0,0,0,0,
-0,0,0,0,47,115,118,103,47,112,117,114,112,108,101,0,0,0,0,0,47,115,118,103,47,112,111,119,100,101,114,98,108,117,101,0,47,98,117,103,110,55,47,55,0,0,0,0,0,0,0,0,47,115,118,103,47,112,108,117,109,0,0,0,0,0,0,0,47,115,118,103,47,112,105,110,107,0,0,0,0,0,0,0,47,97,99,99,101,110,116,54,47,51,0,0,0,0,0,0,47,115,118,103,47,112,101,114,117,0,0,0,0,0,0,0,47,115,118,103,47,112,101,97,99,104,112,117,102,102,0,0,115,101,116,108,105,110,101,119,105,100,116,104,40,0,0,0,47,115,118,103,47,112,97,112,97,121,97,
-119,104,105,112,0,47,115,118,103,47,112,97,108,101,118,105,111,108,101,116,114,101,100,0,0,0,0,0,0,34,32,115,116,114,111,107,101,45,100,97,115,104,97,114,114,97,121,61,34,37,115,0,0,47,115,104,111,119,112,97,103,101,32,123,32,125,32,100,101,102,0,0,0,0,0,0,0,105,97,99,117,116,101,0,0,111,98,108,105,113,117,101,0,114,0,0,0,0,0,0,0,47,115,118,103,47,112,97,108,101,116,117,114,113,117,111,105,115,101,0,0,0,0,0,0,47,115,118,103,47,112,97,108,101,103,114,101,101,110,0,0,112,111,105,110,116,0,0,0,115,116,
-97,114,116,32,112,111,114,116,58,32,40,37,46,53,103,44,32,37,46,53,103,41,44,32,116,97,110,103,101,110,116,32,97,110,103,108,101,58,32,37,46,53,103,44,32,37,115,10,0,0,0,0,0,0,108,101,110,0,0,0,0,0,37,37,37,37,66,111,117,110,100,105,110,103,66,111,120,58,32,37,100,32,37,100,32,37,100,32,37,100,0,0,0,0,47,115,118,103,47,112,97,108,101,103,111,108,100,101,110,114,111,100,0,0,0,0,0,0,108,112,0,0,0,0,0,0,92,78,0,0,0,0,0,0,105,110,112,117,116,0,0,0,47,115,118,103,47,111,114,99,104,105,100,0,0,0,0,0,47,
-98,117,103,110,55,47,54,0,0,0,0,0,0,0,0,112,97,99,107,0,0,0,0,47,115,118,103,47,111,114,97,110,103,101,114,101,100,0,0,78,111,32,111,114,32,105,109,112,114,111,112,101,114,32,105,109,97,103,101,32,102,105,108,101,61,34,37,115,34,10,0,47,115,118,103,47,111,114,97,110,103,101,0,0,0,0,0,83,85,66,0,0,0,0,0,47,115,118,103,47,111,108,105,118,101,100,114,97,98,0,0,118,111,114,111,95,109,97,114,103,105,110,0,0,0,0,0,95,98,108,111,99,107,95,37,100,0,0,0,0,0,0,0,47,115,118,103,47,111,108,105,118,101,0,0,0,
-0,0,0,108,104,101,97,100,0,0,0,35,56,48,56,48,56,48,0,47,115,118,103,47,111,108,100,108,97,99,101,0,0,0,0,47,115,118,103,47,110,97,118,121,0,0,0,0,0,0,0,34,32,115,116,114,111,107,101,45,119,105,100,116,104,61,34,37,103,0,0,0,0,0,0,47,101,110,100,112,97,103,101,32,123,32,115,104,111,119,112,97,103,101,32,125,32,98,105,110,100,32,100,101,102,0,0,104,101,108,108,105,112,0,0,111,118,101,114,108,97,112,0,99,97,100,101,116,98,108,117,101,0,0,0,0,0,0,0,47,115,118,103,47,110,97,118,97,106,111,119,104,105,
-116,101,0,0,0,0,0,0,0,0,112,105,99,58,112,105,99,0,47,115,118,103,47,109,111,99,99,97,115,105,110,0,0,0,47,115,118,103,47,109,105,115,116,121,114,111,115,101,0,0,47,115,118,103,47,109,105,110,116,99,114,101,97,109,0,0,47,98,117,103,110,55,47,53,0,0,0,0,0,0,0,0,115,116,114,105,99,116,32,0,110,111,100,101,32,112,111,115,105,116,105,111,110,115,32,97,114,101,32,105,103,110,111,114,101,100,32,117,110,108,101,115,115,32,115,116,97,114,116,61,114,97,110,100,111,109,10,0,47,115,118,103,47,109,105,100,110,
-105,103,104,116,98,108,117,101,0,0,0,0,0,0,0,47,115,118,103,47,109,101,100,105,117,109,118,105,111,108,101,116,114,101,100,0,0,0,0,115,111,117,114,99,101,0,0,47,115,118,103,47,109,101,100,105,117,109,116,117,114,113,117,111,105,115,101,0,0,0,0,47,115,118,103,47,109,101,100,105,117,109,115,112,114,105,110,103,103,114,101,101,110,0,0,112,120,0,0,0,0,0,0,47,115,118,103,47,109,101,100,105,117,109,115,108,97,116,101,98,108,117,101,0,0,0,0,115,101,116,104,115,98,0,0,47,115,118,103,47,109,101,100,105,117,
-109,115,101,97,103,114,101,101,110,0,0,0,0,0,34,32,115,116,114,111,107,101,61,34,0,0,0,0,0,0,9,115,101,116,109,97,116,114,105,120,0,0,0,0,0,0,104,101,97,114,116,115,0,0,47,115,118,103,47,109,101,100,105,117,109,112,117,114,112,108,101,0,0,0,0,0,0,0,37,115,32,105,115,32,110,111,116,32,97,32,107,110,111,119,110,32,99,111,108,111,114,46,10,0,0,0,0,0,0,0,47,115,118,103,47,109,101,100,105,117,109,111,114,99,104,105,100,0,0,0,0,0,0,0,118,0,0,0,0,0,0,0,47,115,118,103,47,109,101,100,105,117,109,98,108,117,
-101,0,60,97,114,101,97,32,115,104,97,112,101,61,34,114,101,99,116,34,0,0,0,0,0,0,47,115,118,103,47,109,101,100,105,117,109,97,113,117,97,109,97,114,105,110,101,0,0,0,47,98,117,103,110,55,47,52,0,0,0,0,0,0,0,0,47,115,118,103,47,109,97,114,111,111,110,0,0,0,0,0,47,115,118,103,47,109,97,103,101,110,116,97,0,0,0,0,47,115,118,103,47,108,105,110,101,110,0,0,0,0,0,0,47,115,118,103,47,108,105,109,101,103,114,101,101,110,0,0,47,115,118,103,47,108,105,109,101,0,0,0,0,0,0,0,47,115,118,103,47,108,105,103,104,
-116,121,101,108,108,111,119,0,0,0,0,0,0,0,0,110,111,110,101,0,0,0,0,9,48,32,48,32,49,32,48,32,51,54,48,32,97,114,99,0,0,0,0,0,0,0,0,104,97,114,114,0,0,0,0,47,115,118,103,47,108,105,103,104,116,115,116,101,101,108,98,108,117,101,0,0,0,0,0,47,115,118,103,47,108,105,103,104,116,115,108,97,116,101,103,114,101,121,0,0,0,0,0,47,115,118,103,47,108,105,103,104,116,115,108,97,116,101,103,114,97,121,0,0,0,0,0,47,115,118,103,47,108,105,103,104,116,115,107,121,98,108,117,101,0,0,0,0,0,0,0,47,98,117,103,110,55,
-47,51,0,0,0,0,0,0,0,0,114,101,102,101,114,101,110,99,101,32,116,111,32,98,105,110,97,114,121,32,101,110,116,105,116,121,0,0,0,0,0,0,47,115,118,103,47,108,105,103,104,116,115,101,97,103,114,101,101,110,0,0,0,0,0,0,47,115,118,103,47,108,105,103,104,116,115,97,108,109,111,110,0,0,0,0,0,0,0,0,47,115,118,103,47,108,105,103,104,116,112,105,110,107,0,0,47,115,118,103,47,108,105,103,104,116,103,114,101,121,0,0,47,115,118,103,47,108,105,103,104,116,103,114,101,101,110,0,47,98,117,103,110,55,47,50,0,0,0,0,
-0,0,0,0,47,115,118,103,47,108,105,103,104,116,103,114,97,121,0,0,10,0,0,0,0,0,0,0,34,32,102,105,108,108,45,111,112,97,99,105,116,121,61,34,37,102,0,0,0,0,0,0,9,114,120,32,114,121,32,115,99,97,108,101,0,0,0,0,104,65,114,114,0,0,0,0,47,115,118,103,47,108,105,103,104,116,103,111,108,100,101,110,114,111,100,121,101,108,108,111,119,0,0,0,0,0,0,0,112,97,99,107,109,111,100,101,0,0,0,0,0,0,0,0,47,115,118,103,47,108,105,103,104,116,99,121,97,110,0,0,47,115,118,103,47,108,105,103,104,116,99,111,114,97,108,
-0,47,115,118,103,47,108,105,103,104,116,98,108,117,101,0,0,108,0,0,0,0,0,0,0,101,112,115,58,112,115,0,0,47,115,118,103,47,108,101,109,111,110,99,104,105,102,102,111,110,0,0,0,0,0,0,0,47,115,118,103,47,108,97,119,110,103,114,101,101,110,0,0,47,115,118,103,47,108,97,118,101,110,100,101,114,98,108,117,115,104,0,0,0,0,0,0,47,115,118,103,47,108,97,118,101,110,100,101,114,0,0,0,47,115,118,103,47,107,104,97,107,105,0,0,0,0,0,0,47,115,118,103,47,105,118,111,114,121,0,0,0,0,0,0,117,114,108,40,35,114,95,37,
-100,41,0,0,0,0,0,0,9,120,32,121,32,116,114,97,110,115,108,97,116,101,0,0,103,116,0,0,0,0,0,0,47,115,118,103,47,105,110,100,105,103,111,0,0,0,0,0,47,115,118,103,47,105,110,100,105,97,110,114,101,100,0,0,47,115,118,103,47,104,111,116,112,105,110,107,0,0,0,0,47,115,118,103,47,104,111,110,101,121,100,101,119,0,0,0,47,98,117,103,110,55,47,49,0,0,0,0,0,0,0,0,47,115,118,103,47,103,114,101,121,0,0,0,0,0,0,0,47,115,118,103,47,103,114,101,101,110,121,101,108,108,111,119,0,0,0,0,0,0,0,0,47,115,118,103,47,103,
-114,101,101,110,0,0,0,0,0,0,47,115,118,103,47,103,114,97,121,0,0,0,0,0,0,0,47,115,118,103,47,103,111,108,100,101,110,114,111,100,0,0,47,115,118,103,47,103,111,108,100,0,0,0,0,0,0,0,9,110,101,119,112,97,116,104,0,0,0,0,0,0,0,0,117,114,108,40,35,108,95,37,100,41,0,0,0,0,0,0,103,101,0,0,0,0,0,0,47,115,118,103,47,103,104,111,115,116,119,104,105,116,101,0,47,115,118,103,47,103,97,105,110,115,98,111,114,111,0,0,47,115,118,103,47,102,117,99,104,115,105,97,0,0,0,0,110,111,114,109,97,108,0,0,47,115,118,103,
-47,102,111,114,101,115,116,103,114,101,101,110,0,0,0,0,0,0,0,0,47,98,117,103,110,54,47,54,0,0,0,0,0,0,0,0,47,115,118,103,47,102,108,111,114,97,108,119,104,105,116,101,0,0,0,0,0,0,0,0,47,115,118,103,47,102,105,114,101,98,114,105,99,107,0,0,47,115,118,103,47,100,111,100,103,101,114,98,108,117,101,0,47,115,118,103,47,100,105,109,103,114,101,121,0,0,0,0,47,115,118,103,47,100,105,109,103,114,97,121,0,0,0,0,47,115,118,103,47,100,101,101,112,115,107,121,98,108,117,101,0,0,0,0,0,0,0,0,37,115,37,115,32,105,
-115,32,110,111,116,32,97,32,116,114,111,102,102,32,102,111,110,116,10,0,0,0,0,0,0,0,9,109,97,116,114,105,120,32,99,117,114,114,101,110,116,109,97,116,114,105,120,0,0,0,32,102,105,108,108,61,34,0,103,97,109,109,97,0,0,0,103,118,114,101,110,100,101,114,95,99,111,114,101,95,102,105,103,46,99,0,0,0,0,0,47,115,118,103,47,100,101,101,112,112,105,110,107,0,0,0,47,115,118,103,47,100,97,114,107,118,105,111,108,101,116,0,47,115,118,103,47,100,97,114,107,116,117,114,113,117,111,105,115,101,0,0,0,0,0,0,47,115,
-118,103,47,100,97,114,107,115,108,97,116,101,103,114,101,121,0,0,0,0,0,0,47,98,117,103,110,54,47,53,0,0,0,0,0,0,0,0,47,115,118,103,47,100,97,114,107,115,108,97,116,101,103,114,97,121,0,0,0,0,0,0,47,115,118,103,47,100,97,114,107,115,108,97,116,101,98,108,117,101,0,0,0,0,0,0,47,115,118,103,47,100,97,114,107,115,101,97,103,114,101,101,110,0,0,0,0,0,0,0,47,115,118,103,47,100,97,114,107,115,97,108,109,111,110,0,47,115,118,103,47,100,97,114,107,114,101,100,0,0,0,0,115,97,109,101,104,101,97,100,0,0,0,0,
-0,0,0,0,47,115,118,103,47,100,97,114,107,111,114,99,104,105,100,0,9,47,120,32,101,120,99,104,32,100,101,102,0,0,0,0,34,47,62,10,0,0,0,0,102,114,97,115,108,0,0,0,120,108,97,98,101,108,115,46,99,0,0,0,0,0,0,0,47,115,118,103,47,100,97,114,107,111,114,97,110,103,101,0,47,115,118,103,47,100,97,114,107,111,108,105,118,101,103,114,101,101,110,0,0,0,0,0,47,115,118,103,47,100,97,114,107,109,97,103,101,110,116,97,0,0,0,0,0,0,0,0,47,115,118,103,47,100,97,114,107,107,104,97,107,105,0,0,47,98,117,103,110,54,47,
-52,0,0,0,0,0,0,0,0,103,114,97,121,0,0,0,0,47,115,118,103,47,100,97,114,107,103,114,101,121,0,0,0,47,115,118,103,47,100,97,114,107,103,114,101,101,110,0,0,47,115,118,103,47,100,97,114,107,103,114,97,121,0,0,0,47,115,118,103,47,100,97,114,107,103,111,108,100,101,110,114,111,100,0,0,0,0,0,0,47,115,118,103,47,100,97,114,107,99,121,97,110,0,0,0,34,34,0,0,0,0,0,0,47,115,118,103,47,100,97,114,107,98,108,117,101,0,0,0,9,47,121,32,101,120,99,104,32,100,101,102,0,0,0,0,37,103,44,37,103,32,0,0,102,114,97,99,
-51,52,0,0,47,115,118,103,47,99,121,97,110,0,0,0,0,0,0,0,110,115,108,105,109,105,116,49,0,0,0,0,0,0,0,0,47,115,118,103,47,99,114,105,109,115,111,110,0,0,0,0,47,115,118,103,47,99,111,114,110,115,105,108,107,0,0,0,47,115,118,103,47,99,111,114,110,102,108,111,119,101,114,98,108,117,101,0,0,0,0,0,47,98,117,103,110,54,47,51,0,0,0,0,0,0,0,0,47,115,118,103,47,99,111,114,97,108,0,0,0,0,0,0,47,115,118,103,47,99,104,111,99,111,108,97,116,101,0,0,47,115,118,103,47,99,104,97,114,116,114,101,117,115,101,0,47,97,
-99,99,101,110,116,54,47,50,0,0,0,0,0,0,47,115,118,103,47,99,97,100,101,116,98,108,117,101,0,0,35,37,48,50,120,37,48,50,120,37,48,50,120,37,48,50,120,0,0,0,0,0,0,0,99,97,110,110,111,116,32,114,101,97,108,108,111,99,32,116,114,105,115,0,0,0,0,0,47,115,118,103,47,98,117,114,108,121,119,111,111,100,0,0,47,115,118,103,47,98,114,111,119,110,0,0,0,0,0,0,116,97,105,108,112,111,114,116,0,0,0,0,0,0,0,0,9,47,114,120,32,101,120,99,104,32,100,101,102,0,0,0,32,112,111,105,110,116,115,61,34,0,0,0,0,0,0,0,102,114,
-97,99,49,52,0,0,65,118,97,110,116,71,97,114,100,101,45,66,111,111,107,79,98,108,105,113,117,101,0,0,110,101,119,46,103,118,0,0,47,115,118,103,47,98,108,117,101,118,105,111,108,101,116,0,47,115,118,103,47,98,108,117,101,0,0,0,0,0,0,0,99,105,114,99,108,101,0,0,100,101,114,105,118,101,100,0,37,100,32,40,37,46,53,103,44,32,37,46,53,103,41,44,32,40,37,46,53,103,44,32,37,46,53,103,41,10,0,0,99,111,117,108,100,110,39,116,32,111,112,101,110,32,101,112,115,102,32,102,105,108,101,32,37,115,10,0,0,0,0,0,37,
-46,51,102,32,0,0,0,47,115,118,103,47,98,108,97,110,99,104,101,100,97,108,109,111,110,100,0,0,0,0,0,120,108,112,0,0,0,0,0,92,71,0,0,0,0,0,0,47,115,118,103,47,98,108,97,99,107,0,0,0,0,0,0,47,98,117,103,110,54,47,50,0,0,0,0,0,0,0,0,115,121,110,116,97,120,32,101,114,114,111,114,0,0,0,0,37,100,0,0,0,0,0,0,47,115,118,103,47,98,105,115,113,117,101,0,0,0,0,0,102,105,120,101,100,32,99,101,108,108,32,115,105,122,101,32,119,105,116,104,32,117,110,115,112,101,99,105,102,105,101,100,32,119,105,100,116,104,32,
-111,114,32,104,101,105,103,104,116,10,0,0,0,0,0,0,0,115,112,101,99,105,102,105,101,100,32,114,111,111,116,32,110,111,100,101,32,34,37,115,34,32,119,97,115,32,110,111,116,32,102,111,117,110,100,46,0,47,115,118,103,47,98,101,105,103,101,0,0,0,0,0,0,83,85,80,0,0,0,0,0,47,115,118,103,47,97,122,117,114,101,0,0,0,0,0,0,111,118,101,114,108,97,112,32,91,37,100,93,32,58,32,37,100,10,0,0,0,0,0,0,47,115,118,103,47,97,113,117,97,109,97,114,105,110,101,0,99,108,97,115,115,50,46,99,0,0,0,0,0,0,0,0,99,111,108,111,
-114,115,99,104,101,109,101,0,0,0,0,0,47,115,118,103,47,97,113,117,97,0,0,0,0,0,0,0,47,115,118,103,47,97,110,116,105,113,117,101,119,104,105,116,101,0,0,0,0,0,0,0,9,47,114,121,32,101,120,99,104,32,100,101,102,0,0,0,60,112,111,108,121,108,105,110,101,0,0,0,0,0,0,0,102,114,97,99,49,50,0,0,98,117,114,108,121,119,111,111,100,0,0,0,0,0,0,0,47,115,118,103,47,97,108,105,99,101,98,108,117,101,0,0,98,101,115,116,99,111,115,116,32,60,32,72,85,71,69,95,86,65,76,0,0,0,0,0,47,115,112,101,99,116,114,97,108,57,47,
-57,0,0,0,0,47,115,112,101,99,116,114,97,108,57,47,56,0,0,0,0,47,115,112,101,99,116,114,97,108,57,47,55,0,0,0,0,47,98,117,103,110,54,47,49,0,0,0,0,0,0,0,0,100,105,0,0,0,0,0,0,37,108,100,0,0,0,0,0,47,115,112,101,99,116,114,97,108,57,47,54,0,0,0,0,47,115,112,101,99,116,114,97,108,57,47,53,0,0,0,0,47,115,112,101,99,116,114,97,108,57,47,52,0,0,0,0,109,105,110,0,0,0,0,0,47,115,112,101,99,116,114,97,108,57,47,51,0,0,0,0,47,115,112,101,99,116,114,97,108,57,47,50,0,0,0,0,105,110,0,0,0,0,0,0,101,100,103,101,
-0,0,0,0,47,115,112,101,99,116,114,97,108,57,47,49,0,0,0,0,47,101,108,108,105,112,115,101,95,112,97,116,104,32,123,0,32,45,45,62,10,0,0,0,102,111,114,97,108,108,0,0,111,117,116,32,111,102,32,100,121,110,97,109,105,99,32,109,101,109,111,114,121,32,105,110,32,97,97,103,95,103,101,116,95,110,101,120,116,95,98,117,102,102,101,114,40,41,0,0,47,115,112,101,99,116,114,97,108,56,47,56,0,0,0,0,99,111,108,111,114,32,37,115,0,0,0,0,0,0,0,0,47,115,112,101,99,116,114,97,108,56,47,55,0,0,0,0,109,99,108,105,109,
-105,116,0,47,115,112,101,99,116,114,97,108,56,47,54,0,0,0,0,60,97,114,101,97,32,115,104,97,112,101,61,34,99,105,114,99,108,101,34,0,0,0,0,47,115,112,101,99,116,114,97,108,56,47,53,0,0,0,0,47,98,117,103,110,53,47,53,0,0,0,0,0,0,0,0,47,115,112,101,99,116,114,97,108,56,47,52,0,0,0,0,47,115,112,101,99,116,114,97,108,56,47,51,0,0,0,0,47,115,112,101,99,116,114,97,108,56,47,50,0,0,0,0,47,115,112,101,99,116,114,97,108,56,47,49,0,0,0,0,47,115,112,101,99,116,114,97,108,55,47,55,0,0,0,0,47,115,112,101,99,116,
-114,97,108,55,47,54,0,0,0,0,9,9,99,108,111,115,101,112,97,116,104,0,0,0,0,0,60,33,45,45,32,0,0,0,102,110,111,102,0,0,0,0,47,115,112,101,99,116,114,97,108,55,47,53,0,0,0,0,47,115,112,101,99,116,114,97,108,55,47,52,0,0,0,0,47,115,112,101,99,116,114,97,108,55,47,51,0,0,0,0,47,115,112,101,99,116,114,97,108,55,47,50,0,0,0,0,47,98,117,103,110,53,47,52,0,0,0,0,0,0,0,0,114,101,102,101,114,101,110,99,101,32,116,111,32,105,110,118,97,108,105,100,32,99,104,97,114,97,99,116,101,114,32,110,117,109,98,101,114,
-0,0,0,47,115,112,101,99,116,114,97,108,55,47,49,0,0,0,0,47,115,112,101,99,116,114,97,108,54,47,54,0,0,0,0,47,115,112,101,99,116,114,97,108,54,47,53,0,0,0,0,47,115,112,101,99,116,114,97,108,54,47,52,0,0,0,0,47,115,112,101,99,116,114,97,108,54,47,51,0,0,0,0,47,115,112,101,99,116,114,97,108,54,47,50,0,0,0,0,9,9,112,111,112,32,110,101,103,32,48,32,114,108,105,110,101,116,111,0,0,0,0,0,121,101,108,108,111,119,103,114,101,101,110,0,0,0,0,0,101,120,105,115,116,0,0,0,47,115,112,101,99,116,114,97,108,54,47,
-49,0,0,0,0,47,115,112,101,99,116,114,97,108,53,47,53,0,0,0,0,47,115,112,101,99,116,114,97,108,53,47,52,0,0,0,0,47,115,112,101,99,116,114,97,108,53,47,51,0,0,0,0,47,98,117,103,110,53,47,51,0,0,0,0,0,0,0,0,106,112,103,58,118,114,109,108,0,0,0,0,0,0,0,0,47,115,112,101,99,116,114,97,108,53,47,50,0,0,0,0,47,115,112,101,99,116,114,97,108,53,47,49,0,0,0,0,47,115,112,101,99,116,114,97,108,52,47,52,0,0,0,0,47,115,112,101,99,116,114,97,108,52,47,51,0,0,0,0,47,115,112,101,99,116,114,97,108,52,47,50,0,0,0,0,
-47,115,112,101,99,116,114,97,108,52,47,49,0,0,0,0,9,9,48,32,101,120,99,104,32,114,108,105,110,101,116,111,0,0,0,0,0,0,0,0,121,101,108,108,111,119,0,0,101,117,114,111,0,0,0,0,47,115,112,101,99,116,114,97,108,51,47,51,0,0,0,0,114,0,0,0,0,0,0,0,47,115,112,101,99,116,114,97,108,51,47,50,0,0,0,0,47,115,112,101,99,116,114,97,108,51,47,49,0,0,0,0,47,115,112,101,99,116,114,97,108,49,49,47,57,0,0,0,47,98,117,103,110,53,47,50,0,0,0,0,0,0,0,0,47,115,112,101,99,116,114,97,108,49,49,47,56,0,0,0,47,115,112,101,
-99,116,114,97,108,49,49,47,55,0,0,0,47,115,112,101,99,116,114,97,108,49,49,47,54,0,0,0,47,115,112,101,99,116,114,97,108,49,49,47,53,0,0,0,47,115,112,101,99,116,114,97,108,49,49,47,52,0,0,0,38,108,116,59,0,0,0,0,47,115,112,101,99,116,114,97,108,49,49,47,51,0,0,0,119,104,105,116,101,115,109,111,107,101,0,0,0,0,0,0,102,105,103,58,102,105,103,0,101,117,109,108,0,0,0,0,47,115,112,101,99,116,114,97,108,49,49,47,50,0,0,0,47,115,112,101,99,116,114,97,108,49,49,47,49,49,0,0,9,9,101,120,99,104,32,48,32,114,
-108,105,110,101,116,111,0,0,0,0,0,0,0,0,47,98,117,103,110,53,47,49,0,0,0,0,0,0,0,0,47,115,112,101,99,116,114,97,108,49,49,47,49,48,0,0,47,115,112,101,99,116,114,97,108,49,49,47,49,0,0,0,47,115,112,101,99,116,114,97,108,49,48,47,57,0,0,0,47,115,112,101,99,116,114,97,108,49,48,47,56,0,0,0,47,115,112,101,99,116,114,97,108,49,48,47,55,0,0,0,47,115,112,101,99,116,114,97,108,49,48,47,54,0,0,0,47,115,112,101,99,116,114,97,108,49,48,47,53,0,0,0,47,115,112,101,99,116,114,97,108,49,48,47,52,0,0,0,9,9,50,32,
-99,111,112,121,0,0,0,0,0,0,0,0,37,48,51,111,0,0,0,0,119,104,105,116,101,0,0,0,101,116,104,0,0,0,0,0,47,115,112,101,99,116,114,97,108,49,48,47,51,0,0,0,110,32,62,61,32,52,0,0,47,115,112,101,99,116,114,97,108,49,48,47,50,0,0,0,47,115,112,101,99,116,114,97,108,49,48,47,49,48,0,0,47,115,112,101,99,116,114,97,108,49,48,47,49,0,0,0,47,98,117,103,110,52,47,52,0,0,0,0,0,0,0,0,47,115,101,116,51,57,47,57,0,0,0,0,0,0,0,0,47,115,101,116,51,57,47,56,0,0,0,0,0,0,0,0,47,115,101,116,51,57,47,55,0,0,0,0,0,0,0,0,47,
-115,101,116,51,57,47,54,0,0,0,0,0,0,0,0,47,115,101,116,51,57,47,53,0,0,0,0,0,0,0,0,47,115,101,116,51,57,47,52,0,0,0,0,0,0,0,0,9,9,109,111,118,101,116,111,0,0,0,0,0,0,0,0,119,104,101,97,116,0,0,0,101,116,97,0,0,0,0,0,71,0,0,0,0,0,0,0,47,115,101,116,51,57,47,51,0,0,0,0,0,0,0,0,110,111,100,101,108,105,115,116,46,99,0,0,0,0,0,0,47,115,101,116,51,57,47,50,0,0,0,0,0,0,0,0,47,115,101,116,51,57,47,49,0,0,0,0,0,0,0,0,47,115,101,116,51,56,47,56,0,0,0,0,0,0,0,0,47,98,117,103,110,52,47,51,0,0,0,0,0,0,0,0,102,
-117,99,104,115,105,97,0,47,115,101,116,51,56,47,55,0,0,0,0,0,0,0,0,47,115,101,116,51,56,47,54,0,0,0,0,0,0,0,0,47,115,101,116,51,56,47,53,0,0,0,0,0,0,0,0,47,115,101,116,51,56,47,52,0,0,0,0,0,0,0,0,47,115,101,116,51,56,47,51,0,0,0,0,0,0,0,0,32,45,116,97,103,115,32,123,37,100,37,115,37,100,125,0,47,115,101,116,51,56,47,50,0,0,0,0,0,0,0,0,9,9,52,32,50,32,114,111,108,108,0,0,0,0,0,0,118,105,111,108,101,116,0,0,101,113,117,105,118,0,0,0,47,115,101,116,51,56,47,49,0,0,0,0,0,0,0,0,47,115,101,116,51,55,47,
-55,0,0,0,0,0,0,0,0,47,115,101,116,51,55,47,54,0,0,0,0,0,0,0,0,47,115,101,116,51,55,47,53,0,0,0,0,0,0,0,0,47,98,117,103,110,52,47,50,0,0,0,0,0,0,0,0,47,115,101,116,51,55,47,52,0,0,0,0,0,0,0,0,47,115,101,116,51,55,47,51,0,0,0,0,0,0,0,0,47,115,101,116,51,55,47,50,0,0,0,0,0,0,0,0,47,115,101,116,51,55,47,49,0,0,0,0,0,0,0,0,47,97,99,99,101,110,116,54,47,49,0,0,0,0,0,0,35,37,48,50,120,37,48,50,120,37,48,50,120,0,0,0,99,97,110,110,111,116,32,109,97,108,108,111,99,32,116,114,105,115,0,0,0,0,0,0,47,115,101,
-116,51,54,47,54,0,0,0,0,0,0,0,0,47,115,101,116,51,54,47,53,0,0,0,0,0,0,0,0,98,108,97,99,107,0,0,0,47,98,111,120,112,114,105,109,32,123,9,9,9,9,37,32,120,99,111,114,110,101,114,32,121,99,111,114,110,101,114,32,120,115,105,122,101,32,121,115,105,122,101,0,0,0,0,0,116,117,114,113,117,111,105,115,101,0,0,0,0,0,0,0,101,112,115,105,108,111,110,0,116,107,58,116,107,0,0,0,115,112,108,105,116,46,113,46,99,0,0,0,0,0,0,0,115,97,110,115,45,83,101,114,105,102,0,0,0,0,0,0,47,115,101,116,51,54,47,52,0,0,0,0,0,0,
-0,0,110,111,110,97,109,101,46,103,118,0,0,0,0,0,0,0,47,115,101,116,51,54,47,51,0,0,0,0,0,0,0,0,111,118,97,108,0,0,0,0,100,101,114,105,118,101,32,103,114,97,112,104,32,37,115,32,111,102,32,37,115,10,0,0,37,100,32,98,111,120,101,115,58,10,0,0,0,0,0,0,85,84,70,45,56,32,105,110,112,117,116,32,117,115,101,115,32,110,111,110,45,76,97,116,105,110,49,32,99,104,97,114,97,99,116,101,114,115,32,119,104,105,99,104,32,99,97,110,110,111,116,32,98,101,32,104,97,110,100,108,101,100,32,98,121,32,116,104,105,115,32,
-80,111,115,116,83,99,114,105,112,116,32,100,114,105,118,101,114,10,0,0,0,0,0,0,0,47,115,101,116,51,54,47,50,0,0,0,0,0,0,0,0,104,101,105,103,104,116,0,0,47,115,101,116,51,54,47,49,0,0,0,0,0,0,0,0,47,98,117,103,110,52,47,49,0,0,0,0,0,0,0,0,32,32,102,108,97,103,115,32,32,37,100,10,0,0,0,0,47,115,101,116,51,53,47,53,0,0,0,0,0,0,0,0,99,101,108,108,32,115,105,122,101,32,116,111,111,32,115,109,97,108,108,32,102,111,114,32,99,111,110,116,101,110,116,10,0,0,0,0,0,0,0,0,47,115,101,116,51,53,47,52,0,0,0,0,0,
-0,0,0,73,0,0,0,0,0,0,0,47,115,101,116,51,53,47,51,0,0,0,0,0,0,0,0,78,117,109,98,101,114,32,111,102,32,105,110,99,114,101,97,115,101,115,32,61,32,37,100,10,0,0,0,0,0,0,0,116,97,105,108,112,111,114,116,0,0,0,0,0,0,0,0,47,115,101,116,51,53,47,50,0,0,0,0,0,0,0,0,47,115,101,116,51,53,47,49,0,0,0,0,0,0,0,0,98,32,61,61,32,110,0,0,47,115,101,116,51,52,47,52,0,0,0,0,0,0,0,0,9,103,114,101,115,116,111,114,101,0,0,0,0,0,0,0,116,111,109,97,116,111,0,0,101,110,115,112,0,0,0,0,98,114,111,119,110,0,0,0,47,115,101,
-116,51,52,47,51,0,0,0,0,0,0,0,0,47,115,101,116,51,52,47,50,0,0,0,0,0,0,0,0,47,115,101,116,51,52,47,49,0,0,0,0,0,0,0,0,47,115,101,116,51,51,47,51,0,0,0,0,0,0,0,0,47,98,117,103,110,51,47,51,0,0,0,0,0,0,0,0,115,117,98,0,0,0,0,0,47,115,101,116,51,51,47,50,0,0,0,0,0,0,0,0,114,97,110,100,111,109,0,0,47,115,101,116,51,51,47,49,0,0,0,0,0,0,0,0,47,115,101,116,51,49,50,47,57,0,0,0,0,0,0,0,114,97,110,107,0,0,0,0,41,10,45,45,62,10,0,0,47,115,101,116,51,49,50,47,56,0,0,0,0,0,0,0,47,115,101,116,51,49,50,47,55,
-0,0,0,0,0,0,0,37,108,102,32,37,108,102,32,37,108,102,32,37,108,102,0,110,111,100,101,0,0,0,0,47,115,101,116,51,49,50,47,54,0,0,0,0,0,0,0,9,9,125,32,105,102,0,0,116,104,105,115,116,108,101,0,101,109,115,112,0,0,0,0,47,115,101,116,51,49,50,47,53,0,0,0,0,0,0,0,69,68,95,108,97,98,101,108,40,102,101,41,0,0,0,0,98,111,116,104,0,0,0,0,47,115,101,116,51,49,50,47,52,0,0,0,0,0,0,0,65,103,110,111,100,101,105,110,102,111,95,116,0,0,0,0,47,115,101,116,51,49,50,47,51,0,0,0,0,0,0,0,114,101,99,116,97,110,103,108,
-101,32,40,37,100,44,37,100,41,32,40,37,100,44,37,100,41,32,37,115,32,37,115,10,0,0,0,0,0,0,0,0,47,115,101,116,51,49,50,47,50,0,0,0,0,0,0,0,47,98,117,103,110,51,47,50,0,0,0,0,0,0,0,0,47,115,101,116,51,49,50,47,49,50,0,0,0,0,0,0,47,115,101,116,51,49,50,47,49,49,0,0,0,0,0,0,47,115,101,116,51,49,50,47,49,48,0,0,0,0,0,0,32,40,0,0,0,0,0,0,47,115,101,116,51,49,50,47,49,0,0,0,0,0,0,0,47,115,101,116,51,49,49,47,57,0,0,0,0,0,0,0,47,115,101,116,51,49,49,47,56,0,0,0,0,0,0,0,9,9,9,116,101,120,116,32,115,116,114,
-105,110,103,119,105,100,116,104,32,112,111,112,32,119,105,100,116,104,32,101,120,99,104,32,115,117,98,32,116,101,120,116,32,108,101,110,103,116,104,32,100,105,118,32,48,32,116,101,120,116,32,97,115,104,111,119,0,0,0,0,0,116,101,97,108,0,0,0,0,101,109,112,116,121,0,0,0,76,101,102,116,0,0,0,0,47,115,101,116,51,49,49,47,55,0,0,0,0,0,0,0,47,115,101,116,51,49,49,47,54,0,0,0,0,0,0,0,47,115,101,116,51,49,49,47,53,0,0,0,0,0,0,0,47,115,101,116,51,49,49,47,52,0,0,0,0,0,0,0,47,98,117,103,110,51,47,49,0,0,0,
-0,0,0,0,0,97,115,121,110,99,104,114,111,110,111,117,115,32,101,110,116,105,116,121,0,0,0,0,0,47,115,101,116,51,49,49,47,51,0,0,0,0,0,0,0,47,115,101,116,51,49,49,47,50,0,0,0,0,0,0,0,47,115,101,116,51,49,49,47,49,49,0,0,0,0,0,0,32,118,101,114,115,105,111,110,32,0,0,0,0,0,0,0,47,115,101,116,51,49,49,47,49,48,0,0,0,0,0,0,47,115,101,116,51,49,49,47,49,0,0,0,0,0,0,0,47,115,101,116,51,49,48,47,57,0,0,0,0,0,0,0,9,9,9,91,93,32,48,32,115,101,116,100,97,115,104,0,116,97,110,0,0,0,0,0,101,103,114,97,118,101,
-0,0,47,115,101,116,51,49,48,47,56,0,0,0,0,0,0,0,47,115,101,116,51,49,48,47,55,0,0,0,0,0,0,0,47,115,101,116,51,49,48,47,54,0,0,0,0,0,0,0,47,115,101,116,51,49,48,47,53,0,0,0,0,0,0,0,47,98,114,98,103,57,47,57,0,0,0,0,0,0,0,0,106,112,101,58,118,114,109,108,0,0,0,0,0,0,0,0,47,115,101,116,51,49,48,47,52,0,0,0,0,0,0,0,47,115,101,116,51,49,48,47,51,0,0,0,0,0,0,0,47,115,101,116,51,49,48,47,50,0,0,0,0,0,0,0,10,60,33,45,45,32,71,101,110,101,114,97,116,101,100,32,98,121,32,0,0,0,0,0,47,115,101,116,51,49,48,47,
-49,48,0,0,0,0,0,0,102,100,112,0,0,0,0,0,47,115,101,116,51,49,48,47,49,0,0,0,0,0,0,0,100,111,116,0,0,0,0,0,47,115,101,116,50,56,47,56,0,0,0,0,0,0,0,0,9,9,119,105,100,116,104,32,48,32,103,116,32,123,0,0,115,116,101,101,108,98,108,117,101,0,0,0,0,0,0,0,101,99,105,114,99,0,0,0,47,115,101,116,50,56,47,55,0,0,0,0,0,0,0,0,114,97,110,107,40,103,44,32,50,44,32,110,115,105,116,101,114,50,40,103,41,41,32,61,61,32,48,0,0,0,0,0,47,115,101,116,50,56,47,54,0,0,0,0,0,0,0,0,111,0,0,0,0,0,0,0,47,115,101,116,50,56,
-47,53,0,0,0,0,0,0,0,0,47,115,101,116,50,56,47,52,0,0,0,0,0,0,0,0,47,98,114,98,103,57,47,56,0,0,0,0,0,0,0,0,47,115,101,116,50,56,47,51,0,0,0,0,0,0,0,0,47,115,101,116,50,56,47,50,0,0,0,0,0,0,0,0,47,115,101,116,50,56,47,49,0,0,0,0,0,0,0,0,60,72,84,77,76,62,10,0,47,115,101,116,50,55,47,55,0,0,0,0,0,0,0,0,47,115,101,116,50,55,47,54,0,0,0,0,0,0,0,0,47,115,101,116,50,55,47,53,0,0,0,0,0,0,0,0,9,103,115,97,118,101,0,0,115,112,114,105,110,103,103,114,101,101,110,0,0,0,0,0,101,97,99,117,116,101,0,0,47,115,101,
-116,50,55,47,52,0,0,0,0,0,0,0,0,47,115,101,116,50,55,47,51,0,0,0,0,0,0,0,0,47,115,101,116,50,55,47,50,0,0,0,0,0,0,0,0,47,115,101,116,50,55,47,49,0,0,0,0,0,0,0,0,47,98,114,98,103,57,47,55,0,0,0,0,0,0,0,0,47,115,101,116,50,54,47,54,0,0,0,0,0,0,0,0,47,115,101,116,50,54,47,53,0,0,0,0,0,0,0,0,47,115,101,116,50,54,47,52,0,0,0,0,0,0,0,0,32,99,111,111,114,100,111,114,105,103,105,110,61,34,48,44,48,34,32,99,111,111,114,100,115,105,122,101,61,34,37,100,44,37,100,34,32,62,0,0,47,115,101,116,50,54,47,51,0,0,
-0,0,0,0,0,0,47,115,101,116,50,54,47,50,0,0,0,0,0,0,0,0,47,115,101,116,50,54,47,49,0,0,0,0,0,0,0,0,9,47,119,105,100,116,104,32,101,120,99,104,32,100,101,102,0,0,0,0,0,0,0,0,34,37,115,34,32,97,116,32,40,37,46,53,102,44,37,46,53,102,41,59,10,0,0,0,115,110,111,119,0,0,0,0,100,105,118,105,100,101,0,0,47,115,101,116,50,53,47,53,0,0,0,0,0,0,0,0,47,115,101,116,50,53,47,52,0,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,47,115,101,116,50,53,47,51,0,0,0,0,0,0,0,0,47,115,101,116,50,53,47,50,0,0,0,0,0,0,0,0,47,98,114,98,103,
-57,47,54,0,0,0,0,0,0,0,0,47,115,101,116,50,53,47,49,0,0,0,0,0,0,0,0,47,115,101,116,50,52,47,52,0,0,0,0,0,0,0,0,47,115,101,116,50,52,47,51,0,0,0,0,0,0,0,0,32,119,105,100,116,104,58,32,37,100,112,116,59,32,104,101,105,103,104,116,58,32,37,100,112,116,34,0,0,0,0,0,47,115,101,116,50,52,47,50,0,0,0,0,0,0,0,0,47,115,101,116,50,52,47,49,0,0,0,0,0,0,0,0,73,32,0,0,0,0,0,0,47,115,101,116,50,51,47,51,0,0,0,0,0,0,0,0,9,47,116,101,120,116,32,101,120,99,104,32,100,101,102,0,100,105,97,109,115,0,0,0,115,108,97,
-116,101,103,114,101,121,0,0,0,0,0,0,0,104,101,97,100,112,111,114,116,0,0,0,0,0,0,0,0,47,115,101,116,50,51,47,50,0,0,0,0,0,0,0,0,70,0,0,0,0,0,0,0,47,115,101,116,50,51,47,49,0,0,0,0,0,0,0,0,47,98,114,98,103,57,47,53,0,0,0,0,0,0,0,0,47,115,101,116,49,57,47,57,0,0,0,0,0,0,0,0,47,115,101,116,49,57,47,56,0,0,0,0,0,0,0,0,99,118,116,46,99,0,0,0,98,108,117,101,0,0,0,0,47,115,101,116,49,57,47,55,0,0,0,0,0,0,0,0,47,115,101,116,49,57,47,54,0,0,0,0,0,0,0,0,47,115,101,116,49,57,47,53,0,0,0,0,0,0,0,0,32,60,118,
-58,103,114,111,117,112,32,115,116,121,108,101,61],"i8",L,l.J+143400);D([34,112,111,115,105,116,105,111,110,58,114,101,108,97,116,105,118,101,59,32,0,0,0,0,47,115,101,116,49,57,47,52,0,0,0,0,0,0,0,0,47,115,101,116,49,57,47,51,0,0,0,0,0,0,0,0,103,118,114,101,110,100,101,114,95,99,111,114,101,95,116,107,46,99,0,0,0,0,0,0,47,115,101,116,49,57,47,50,0,0,0,0,0,0,0,0,47,97,108,105,103,110,101,100,116,101,120,116,32,123,9,9,9,37,32,119,105,100,116,104,32,116,101,120,116,0,0,0,100,101,108,116,97,0,0,0,115,
-108,97,116,101,103,114,97,121,0,0,0,0,0,0,0,117,115,0,0,0,0,0,0,47,115,101,116,49,57,47,49,0,0,0,0,0,0,0,0,47,115,101,116,49,56,47,56,0,0,0,0,0,0,0,0,47,115,101,116,49,56,47,55,0,0,0,0,0,0,0,0,47,115,101,116,49,56,47,54,0,0,0,0,0,0,0,0,47,98,114,98,103,57,47,52,0,0,0,0,0,0,0,0,47,115,101,116,49,56,47,53,0,0,0,0,0,0,0,0,47,115,101,116,49,56,47,52,0,0,0,0,0,0,0,0,47,115,101,116,49,56,47,51,0,0,0,0,0,0,0,0,60,120,109,108,58,110,97,109,101,115,112,97,99,101,32,110,115,61,34,117,114,110,58,115,99,104,
-101,109,97,115,45,109,105,99,114,111,115,111,102,116,45,99,111,109,58,118,109,108,34,32,112,114,101,102,105,120,61,34,118,34,32,47,62,10,0,0,0,0,0,0,0,0,47,115,101,116,49,56,47,50,0,0,0,0,0,0,0,0,47,115,101,116,49,56,47,49,0,0,0,0,0,0,0,0,99,32,0,0,0,0,0,0,47,97,99,99,101,110,116,53,47,53,0,0,0,0,0,0,114,111,117,116,101,46,99,0,47,115,101,116,49,55,47,55,0,0,0,0,0,0,0,0,84,105,109,101,115,45,82,111,109,97,110,0,0,0,0,0,37,32,100,114,97,119,32,116,101,120,116,32,102,105,116,116,101,100,32,116,111,
-32,105,116,115,32,101,120,112,101,99,116,101,100,32,119,105,100,116,104,0,0,0,0,0,0,0,0,100,101,103,0,0,0,0,0,115,108,97,116,101,98,108,117,101,0,0,0,0,0,0,0,98,111,111,107,0,0,0,0,47,115,101,116,49,55,47,54,0,0,0,0,0,0,0,0,46,37,100,0,0,0,0,0,70,65,76,83,69,0,0,0,47,115,101,116,49,55,47,53,0,0,0,0,0,0,0,0,101,108,108,105,112,115,101,0,105,110,32,99,104,101,99,107,112,97,116,104,44,32,101,110,100,32,112,111,114,116,32,110,111,116,32,105,110,32,108,97,115,116,32,98,111,120,10,0,65,103,114,97,112,104,
-105,110,102,111,95,116,0,0,0,0,125,32,98,105,110,100,32,100,101,102,10,0,0,0,0,0,47,115,101,116,49,55,47,52,0,0,0,0,0,0,0,0,119,105,100,116,104,0,0,0,77,97,120,46,32,105,116,101,114,97,116,105,111,110,115,32,40,37,100,41,32,114,101,97,99,104,101,100,32,111,110,32,103,114,97,112,104,32,37,115,10,0,0,0,0,0,0,0,116,101,120,116,115,112,97,110,46,99,0,0,0,0,0,0,38,35,51,57,59,0,0,0,102,97,116,97,108,32,101,114,114,111,114,32,45,32,115,99,97,110,110,101,114,32,105,110,112,117,116,32,98,117,102,102,101,
-114,32,111,118,101,114,102,108,111,119,0,0,0,0,0,47,115,101,116,49,55,47,51,0,0,0,0,0,0,0,0,47,98,114,98,103,57,47,51,0,0,0,0,0,0,0,0,32,32,115,105,122,101,32,32,32,37,100,10,0,0,0,0,10,102,105,110,97,108,32,101,32,61,32,37,102,32,37,100,32,105,116,101,114,97,116,105,111,110,115,32,37,46,50,102,32,115,101,99,10,0,0,0,47,115,101,116,49,55,47,50,0,0,0,0,0,0,0,0,115,112,108,105,110,101,115,46,99,0,0,0,0,0,0,0,102,105,120,101,100,32,116,97,98,108,101,32,115,105,122,101,32,119,105,116,104,32,117,110,115,
-112,101,99,105,102,105,101,100,32,119,105,100,116,104,32,111,114,32,104,101,105,103,104,116,10,0,0,0,0,0,0,47,115,101,116,49,55,47,49,0,0,0,0,0,0,0,0,85,0,0,0,0,0,0,0,47,115,101,116,49,54,47,54,0,0,0,0,0,0,0,0,78,117,109,98,101,114,32,111,102,32,105,116,101,114,97,116,105,111,110,115,32,61,32,37,100,10,0,0,0,0,0,0,60,47,83,84,89,76,69,62,10,0,0,0,0,0,0,0,47,115,101,116,49,54,47,53,0,0,0,0,0,0,0,0,99,108,117,115,116,101,114,32,110,97,109,101,100,32,37,115,32,110,111,116,32,102,111,117,110,100,10,0,
-0,0,0,0,99,111,109,109,101,110,116,0,47,115,101,116,49,54,47,52,0,0,0,0,0,0,0,0,112,111,108,121,108,105,110,101,32,37,115,32,37,115,10,0,47,115,101,116,49,54,47,51,0,0,0,0,0,0,0,0,9,115,99,97,108,101,102,111,110,116,32,115,101,116,102,111,110,116,0,0,0,0,0,0,100,97,114,114,0,0,0,0,115,107,121,98,108,117,101,0,47,115,101,116,49,54,47,50,0,0,0,0,0,0,0,0,85,110,115,117,112,112,111,114,116,101,100,32,99,104,97,114,115,101,116,32,34,37,115,34,32,45,32,97,115,115,117,109,105,110,103,32,117,116,102,45,56,
-10,0,0,0,0,0,0,98,108,117,101,118,105,111,108,101,116,0,0,0,0,0,0,95,100,103,95,37,100,0,0,47,115,101,116,49,54,47,49,0,0,0,0,0,0,0,0,47,115,101,116,49,53,47,53,0,0,0,0,0,0,0,0,105,110,100,101,120,46,99,0,47,115,101,116,49,53,47,52,0,0,0,0,0,0,0,0,47,98,114,98,103,57,47,50,0,0,0,0,0,0,0,0,47,115,101,116,49,53,47,51,0,0,0,0,0,0,0,0,114,101,103,117,108,97,114,0,47,115,101,116,49,53,47,50,0,0,0,0,0,0,0,0,115,105,100,101,115,32,61,61,32,52,0,0,0,0,0,0,47,115,101,116,49,53,47,49,0,0,0,0,0,0,0,0,118,92,
-58,42,32,123,32,98,101,104,97,118,105,111,114,58,32,117,114,108,40,35,100,101,102,97,117,108,116,35,86,77,76,41,59,100,105,115,112,108,97,121,58,105,110,108,105,110,101,45,98,108,111,99,107,125,10,0,0,0,0,0,0,0,47,115,101,116,49,52,47,52,0,0,0,0,0,0,0,0,110,111,100,101,115,32,116,111,117,99,104,32,45,32,102,97,108,108,105,110,103,32,98,97,99,107,32,116,111,32,115,116,114,97,105,103,104,116,32,108,105,110,101,32,101,100,103,101,115,10,0,0,0,0,0,0,47,115,101,116,49,52,47,51,0,0,0,0,0,0,0,0,114,111,
-117,116,101,115,112,108,105,110,101,115,58,32,37,100,32,101,100,103,101,115,44,32,37,100,32,98,111,120,101,115,32,37,46,50,102,32,115,101,99,10,0,0,0,0,0,0,118,105,101,119,66,111,120,0,103,114,97,112,104,0,0,0,47,115,101,116,49,52,47,50,0,0,0,0,0,0,0,0,9,102,105,110,100,102,111,110,116,32,101,120,99,104,0,0,100,97,103,103,101,114,0,0,115,105,108,118,101,114,0,0,116,101,120,116,108,97,121,111,117,116,0,0,0,0,0,0,116,114,105,97,110,103,117,108,97,116,105,111,110,32,102,97,105,108,101,100,0,0,0,0,115,
-104,97,112,101,102,105,108,101,32,110,111,116,32,115,101,116,32,111,114,32,110,111,116,32,102,111,117,110,100,32,102,111,114,32,101,112,115,102,32,110,111,100,101,32,37,115,10,0,0,0,0,0,0,0,0,47,115,101,116,49,52,47,49,0,0,0,0,0,0,0,0,117,116,102,56,0,0,0,0,104,101,105,103,104,116,0,0,47,115,101,116,49,51,47,51,0,0,0,0,0,0,0,0,47,112,97,116,104,98,111,120,32,123,10,32,32,32,32,47,89,32,101,120,99,104,32,37,46,53,103,32,115,117,98,32,100,101,102,10,32,32,32,32,47,88,32,101,120,99,104,32,37,46,53,103,
-32,115,117,98,32,100,101,102,10,32,32,32,32,47,121,32,101,120,99,104,32,37,46,53,103,32,115,117,98,32,100,101,102,10,32,32,32,32,47,120,32,101,120,99,104,32,37,46,53,103,32,115,117,98,32,100,101,102,10,32,32,32,32,110,101,119,112,97,116,104,32,120,32,121,32,109,111,118,101,116,111,10,32,32,32,32,88,32,121,32,108,105,110,101,116,111,10,32,32,32,32,88,32,89,32,108,105,110,101,116,111,10,32,32,32,32,120,32,89,32,108,105,110,101,116,111,10,32,32,32,32,99,108,111,115,101,112,97,116,104,32,115,116,114,
-111,107,101,10,32,125,32,100,101,102,10,47,100,98,103,115,116,97,114,116,32,123,32,103,115,97,118,101,32,37,46,53,103,32,37,46,53,103,32,116,114,97,110,115,108,97,116,101,32,125,32,100,101,102,10,47,97,114,114,111,119,108,101,110,103,116,104,32,49,48,32,100,101,102,10,47,97,114,114,111,119,119,105,100,116,104,32,97,114,114,111,119,108,101,110,103,116,104,32,50,32,100,105,118,32,100,101,102,10,47,97,114,114,111,119,104,101,97,100,32,123,10,32,32,32,32,103,115,97,118,101,10,32,32,32,32,114,111,116,
-97,116,101,10,32,32,32,32,99,117,114,114,101,110,116,112,111,105,110,116,10,32,32,32,32,110,101,119,112,97,116,104,10,32,32,32,32,109,111,118,101,116,111,10,32,32,32,32,97,114,114,111,119,108,101,110,103,116,104,32,97,114,114,111,119,119,105,100,116,104,32,50,32,100,105,118,32,114,108,105,110,101,116,111,10,32,32,32,32,48,32,97,114,114,111,119,119,105,100,116,104,32,110,101,103,32,114,108,105,110,101,116,111,10,32,32,32,32,99,108,111,115,101,112,97,116,104,32,102,105,108,108,10,32,32,32,32,103,114,
-101,115,116,111,114,101,10,125,32,98,105,110,100,32,100,101,102,10,47,109,97,107,101,97,114,114,111,119,32,123,10,32,32,32,32,99,117,114,114,101,110,116,112,111,105,110,116,32,101,120,99,104,32,112,111,112,32,115,117,98,32,101,120,99,104,32,99,117,114,114,101,110,116,112,111,105,110,116,32,112,111,112,32,115,117,98,32,97,116,97,110,10,32,32,32,32,97,114,114,111,119,104,101,97,100,10,125,32,98,105,110,100,32,100,101,102,10,47,112,111,105,110,116,32,123,32,32,32,32,110,101,119,112,97,116,104,32,32,
-32,32,50,32,48,32,51,54,48,32,97,114,99,32,102,105,108,108,125,32,100,101,102,47,109,97,107,101,118,101,99,32,123,10,32,32,32,32,47,89,32,101,120,99,104,32,100,101,102,10,32,32,32,32,47,88,32,101,120,99,104,32,100,101,102,10,32,32,32,32,47,121,32,101,120,99,104,32,100,101,102,10,32,32,32,32,47,120,32,101,120,99,104,32,100,101,102,10,32,32,32,32,110,101,119,112,97,116,104,32,120,32,121,32,109,111,118,101,116,111,10,32,32,32,32,88,32,89,32,108,105,110,101,116,111,32,115,116,114,111,107,101,10,32,32,
-32,32,88,32,89,32,109,111,118,101,116,111,10,32,32,32,32,120,32,121,32,109,97,107,101,97,114,114,111,119,10,125,32,100,101,102,10,0,0,0,0,0,0,47,98,114,98,103,57,47,49,0,0,0,0,0,0,0,0,95,110,101,119,95,114,97,110,107,0,0,0,0,0,0,0,47,115,101,116,49,51,47,50,0,0,0,0,0,0,0,0,103,118,114,101,110,100,101,114,95,99,111,114,101,95,109,97,112,46,99,0,0,0,0,0,47,115,101,116,49,51,47,49,0,0,0,0,0,0,0,0,47,114,101,100,115,57,47,57,0,0,0,0,0,0,0,0,47,114,101,100,115,57,47,56,0,0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,
-47,114,101,100,115,57,47,55,0,0,0,0,0,0,0,0,37,115,32,37,100,32,110,111,100,101,115,32,37,100,32,101,100,103,101,115,32,109,97,120,105,116,101,114,61,37,100,32,98,97,108,97,110,99,101,61,37,100,10,0,0,0,0,0,60,83,84,89,76,69,62,10,0,0,0,0,0,0,0,0,47,114,101,100,115,57,47,54,0,0,0,0,0,0,0,0,47,114,101,100,115,57,47,53,0,0,0,0,0,0,0,0,47,114,101,100,115,57,47,52,0,0,0,0,0,0,0,0,47,115,101,116,95,102,111,110,116,32,123,0,0,0,0,0,100,65,114,114,0,0,0,0,115,105,101,110,110,97,0,0,114,101,99,116,97,110,
-103,108,101,46,99,0,0,0,0,0,47,114,101,100,115,57,47,51,0,0,0,0,0,0,0,0,98,105,103,53,0,0,0,0,47,114,101,100,115,57,47,50,0,0,0,0,0,0,0,0,105,110,32,108,97,98,101,108,32,111,102,32,110,111,100,101,32,37,115,10,0,0,0,0,47,114,101,100,115,57,47,49,0,0,0,0,0,0,0,0,47,114,101,100,115,56,47,56,0,0,0,0,0,0,0,0,47,98,114,98,103,56,47,56,0,0,0,0,0,0,0,0,114,101,99,117,114,115,105,118,101,32,101,110,116,105,116,121,32,114,101,102,101,114,101,110,99,101,0,0,0,0,0,0,47,114,101,100,115,56,47,55,0,0,0,0,0,0,0,
-0,69,114,114,111,114,0,0,0,47,114,101,100,115,56,47,54,0,0,0,0,0,0,0,0,47,114,101,100,115,56,47,53,0,0,0,0,0,0,0,0,108,101,110,0,0,0,0,0,32,119,105,100,116,104,58,32,37,100,112,116,59,32,104,101,105,103,104,116,58,32,37,100,112,116,34,62,10,0,0,0,47,114,101,100,115,56,47,52,0,0,0,0,0,0,0,0,47,114,101,100,115,56,47,51,0,0,0,0,0,0,0,0,47,114,101,100,115,56,47,50,0,0,0,0,0,0,0,0,9,125,32,105,102,0,0,0,99,117,114,114,101,110,0,0,115,101,97,115,104,101,108,108,0,0,0,0,0,0,0,0,67,111,117,108,100,32,110,
-111,116,32,111,112,101,110,32,34,37,115,34,32,102,111,114,32,119,114,105,116,105,110,103,32,58,32,37,115,10,0,0,0,47,114,101,100,115,56,47,49,0,0,0,0,0,0,0,0,98,105,103,45,53,0,0,0,37,100,0,0,0,0,0,0,47,114,101,100,115,55,47,55,0,0,0,0,0,0,0,0,47,114,101,100,115,55,47,54,0,0,0,0,0,0,0,0,47,114,101,100,115,55,47,53,0,0,0,0,0,0,0,0,47,98,114,98,103,56,47,55,0,0,0,0,0,0,0,0,106,112,101,103,58,118,114,109,108,0,0,0,0,0,0,0,47,114,101,100,115,55,47,52,0,0,0,0,0,0,0,0,47,114,101,100,115,55,47,51,0,0,0,
-0,0,0,0,0,47,114,101,100,115,55,47,50,0,0,0,0,0,0,0,0,60,68,73,86,32,105,100,61,39,95,86,77,76,49,95,39,32,115,116,121,108,101,61,34,112,111,115,105,116,105,111,110,58,114,101,108,97,116,105,118,101,59,32,100,105,115,112,108,97,121,58,105,110,108,105,110,101,59,32,118,105,115,105,98,105,108,105,116,121,58,104,105,100,100,101,110,0,0,0,0,47,114,101,100,115,55,47,49,0,0,0,0,0,0,0,0,47,114,101,100,115,54,47,54,0,0,0,0,0,0,0,0,47,114,101,100,115,54,47,53,0,0,0,0,0,0,0,0,112,115,0,0,0,0,0,0,99,117,112,
-0,0,0,0,0,115,101,97,103,114,101,101,110,0,0,0,0,0,0,0,0,47,114,101,100,115,54,47,52,0,0,0,0,0,0,0,0,73,83,79,45,73,82,45,49,48,48,0,0,0,0,0,0,37,115,32,58,32,37,102,32,37,102,10,0,0,0,0,0,100,111,116,32,100,111,101,115,32,110,111,116,32,115,117,112,112,111,114,116,32,116,104,101,32,97,115,112,101,99,116,32,97,116,116,114,105,98,117,116,101,32,102,111,114,32,100,105,115,99,111,110,110,101,99,116,101,100,32,103,114,97,112,104,115,32,111,114,32,103,114,97,112,104,115,32,119,105,116,104,32,99,108,117,
-115,116,101,114,115,10,0,0,0,0,0,0,47,114,101,100,115,54,47,51,0,0,0,0,0,0,0,0,9,9,103,114,101,115,116,111,114,101,0,0,0,0,0,0,67,97,108,99,117,108,97,116,105,110,103,32,115,117,98,115,101,116,32,109,111,100,101,108,0,0,0,0,0,0,0,0,47,114,101,100,115,54,47,50,0,0,0,0,0,0,0,0,105,110,115,101,116,0,0,0,102,97,108,115,101,0,0,0,99,117,114,118,101,0,0,0,83,121,110,116,97,120,32,101,114,114,111,114,58,32,110,111,110,45,115,112,97,99,101,32,115,116,114,105,110,103,32,117,115,101,100,32,97,102,116,101,114,
-32,60,47,84,65,66,76,69,62,0,0,0,0,0,0,47,114,101,100,115,54,47,49,0,0,0,0,0,0,0,0,47,98,114,98,103,56,47,54,0,0,0,0,0,0,0,0,116,119,111,112,105,58,32,117,115,101,32,111,102,32,119,101,105,103,104,116,61,48,32,99,114,101,97,116,101,115,32,100,105,115,99,111,110,110,101,99,116,101,100,32,99,111,109,112,111,110,101,110,116,46,10,0,47,114,101,100,115,53,47,53,0,0,0,0,0,0,0,0,47,114,101,100,115,53,47,52,0,0,0,0,0,0,0,0,47,114,101,100,115,53,47,51,0,0,0,0,0,0,0,0,60,66,79,68,89,32,111,110,108,111,97,100,
-61,39,98,114,111,119,115,101,114,99,104,101,99,107,40,41,59,39,62,10,0,0,0,0,0,0,0,0,47,114,101,100,115,53,47,50,0,0,0,0,0,0,0,0,47,114,101,100,115,53,47,49,0,0,0,0,0,0,0,0,47,114,101,100,115,52,47,52,0,0,0,0,0,0,0,0,32,37,100,32,0,0,0,0,99,114,97,114,114,0,0,0,115,97,110,100,121,98,114,111,119,110,0,0,0,0,0,0,47,114,101,100,115,52,47,51,0,0,0,0,0,0,0,0,73,83,79,56,56,53,57,45,49,0,0,0,0,0,0,0,47,114,101,100,115,52,47,50,0,0,0,0,0,0,0,0,9,9,9,40,92,40,41,32,115,104,111,119,32,105,32,115,116,114,32,
-99,118,115,32,115,104,111,119,32,40,44,41,32,115,104,111,119,32,106,32,115,116,114,32,99,118,115,32,115,104,111,119,32,40,92,41,41,32,115,104,111,119,0,0,0,47,114,101,100,115,52,47,49,0,0,0,0,0,0,0,0,60,72,84,77,76,62,0,0,47,114,101,100,115,51,47,51,0,0,0,0,0,0,0,0,47,98,114,98,103,56,47,53,0,0,0,0,0,0,0,0,47,114,101,100,115,51,47,50,0,0,0,0,0,0,0,0,47,114,101,100,115,51,47,49,0,0,0,0,0,0,0,0,47,114,100,121,108,103,110,57,47,57,0,0,0,0,0,0,60,47,72,69,65,68,62,0,47,114,100,121,108,103,110,57,47,56,
-0,0,0,0,0,0,65,103,114,97,112,104,105,110,102,111,95,116,0,0,0,0,47,114,100,121,108,103,110,57,47,55,0,0,0,0,0,0,47,114,100,121,108,103,110,57,47,54,0,0,0,0,0,0,9,9,9,48,32,48,32,109,111,118,101,116,111,0,0,0,99,111,112,121,0,0,0,0,46,112,115,32,37,100,42,92,110,40,83,70,117,47,37,46,48,102,117,10,0,0,0,0,115,97,108,109,111,110,0,0,75,0,0,0,0,0,0,0,47,114,100,121,108,103,110,57,47,53,0,0,0,0,0,0,73,83,79,95,56,56,53,57,45,49,0,0,0,0,0,0,47,114,100,121,108,103,110,57,47,52,0,0,0,0,0,0,47,114,100,121,
-108,103,110,57,47,51,0,0,0,0,0,0,32,37,100,32,37,100,0,0,47,114,100,121,108,103,110,57,47,50,0,0,0,0,0,0,47,98,114,98,103,56,47,52,0,0,0,0,0,0,0,0,47,114,100,121,108,103,110,57,47,49,0,0,0,0,0,0,47,114,100,121,108,103,110,56,47,56,0,0,0,0,0,0,47,114,100,121,108,103,110,56,47,55,0,0,0,0,0,0,32,32,32,60,47,83,67,82,73,80,84,62,10,0,0,0,47,114,100,121,108,103,110,56,47,54,0,0,0,0,0,0,97,115,112,101,99,116,0,0,47,114,100,121,108,103,110,56,47,53,0,0,0,0,0,0,47,114,100,121,108,103,110,56,47,52,0,0,0,0,
-0,0,9,9,9,99,111,111,114,100,102,111,110,116,32,115,101,116,102,111,110,116,0,0,0,0,99,111,110,103,0,0,0,0,115,97,100,100,108,101,98,114,111,119,110,0,0,0,0,0,112,111,108,121,103,111,110,0,47,114,100,121,108,103,110,56,47,51,0,0,0,0,0,0,108,49,0,0,0,0,0,0,47,114,100,121,108,103,110,56,47,50,0,0,0,0,0,0,75,80,95,83,117,98,116,114,97,99,116,0,0,0,0,0,47,114,100,121,108,103,110,56,47,49,0,0,0,0,0,0,47,114,100,121,108,103,110,55,47,55,0,0,0,0,0,0,47,98,114,98,103,56,47,51,0,0,0,0,0,0,0,0,67,111,117,108,
-100,32,110,111,116,32,112,97,114,115,101,32,34,95,98,97,99,107,103,114,111,117,110,100,34,32,97,116,116,114,105,98,117,116,101,32,105,110,32,103,114,97,112,104,32,37,115,10,0,0,0,0,47,114,100,121,108,103,110,55,47,54,0,0,0,0,0,0,98,108,97,99,107,0,0,0,47,114,100,121,108,103,110,55,47,53,0,0,0,0,0,0,47,114,100,121,108,103,110,55,47,52,0,0,0,0,0,0,32,32,32,125,10,0,0,0,47,114,100,121,108,103,110,55,47,51,0,0,0,0,0,0,47,114,100,121,108,103,110,55,47,50,0,0,0,0,0,0,48,0,0,0,0,0,0,0,47,114,100,121,108,
-103,110,55,47,49,0,0,0,0,0,0,9,9,103,115,97,118,101,0,99,108,117,98,115,0,0,0,114,111,121,97,108,98,108,117,101,0,0,0,0,0,0,0,50,46,50,56,46,48,0,0,47,114,100,121,108,103,110,54,47,54,0,0,0,0,0,0,108,97,116,105,110,49,0,0,47,114,100,121,108,103,110,54,47,53,0,0,0,0,0,0,47,114,100,121,108,103,110,54,47,52,0,0,0,0,0,0,47,114,100,121,108,103,110,54,47,51,0,0,0,0,0,0,47,98,114,98,103,56,47,50,0,0,0,0,0,0,0,0,65,103,101,100,103,101,105,110,102,111,95,116,0,0,0,0,47,114,100,121,108,103,110,54,47,50,0,0,
-0,0,0,0,47,114,100,121,108,103,110,54,47,49,0,0,0,0,0,0,47,114,100,121,108,103,110,53,47,53,0,0,0,0,0,0,32,32,32,32,32,125,10,0,47,114,100,121,108,103,110,53,47,52,0,0,0,0,0,0,99,97,110,110,111,116,32,114,101,97,108,108,111,99,32,112,110,108,112,115,0,0,0,0,47,114,100,121,108,103,110,53,47,51,0,0,0,0,0,0,47,98,114,98,103,56,47,49,0,0,0,0,0,0,0,0,47,114,100,121,108,103,110,53,47,50,0,0,0,0,0,0,47,97,99,99,101,110,116,53,47,52,0,0,0,0,0,0,101,108,108,105,112,115,101,0,9,110,112,97,103,101,115,32,49,
-32,103,116,32,123,0,0,99,105,114,99,0,0,0,0,114,111,115,121,98,114,111,119,110,0,0,0,0,0,0,0,85,82,87,32,71,111,116,104,105,99,32,76,0,0,0,0,47,114,100,121,108,103,110,53,47,49,0,0,0,0,0,0,108,97,116,105,110,45,49,0,48,0,0,0,0,0,0,0,100,101,103,108,105,115,116,46,99,0,0,0,0,0,0,0,112,97,103,101,37,100,44,37,100,95,0,0,0,0,0,0,114,101,98,117,105,108,116,100,95,118,108,105,115,116,115,58,32,114,97,110,107,32,108,101,97,100,32,37,115,32,110,111,116,32,105,110,32,111,114,100,101,114,32,37,100,32,111,
-102,32,114,97,110,107,32,37,100,10,0,0,0,0,0,0,0,108,101,118,101,108,32,62,61,32,48,32,38,38,32,108,101,118,101,108,32,60,61,32,110,45,62,108,101,118,101,108,0,47,114,100,121,108,103,110,52,47,52,0,0,0,0,0,0,112,111,108,121,103,111,110,0,99,111,111,114,100,115,0,0,105,110,32,99,104,101,99,107,112,97,116,104,44,32,115,116,97,114,116,32,112,111,114,116,32,110,111,116,32,105,110,32,102,105,114,115,116,32,98,111,120,10,0,0,0,0,0,0,37,37,69,110,100,68,111,99,117,109,101,110,116,10,0,0,47,114,100,121,108,
-103,110,52,47,51,0,0,0,0,0,0,114,101,99,116,115,0,0,0,38,113,117,111,116,59,0,0,102,97,116,97,108,32,102,108,101,120,32,115,99,97,110,110,101,114,32,105,110,116,101,114,110,97,108,32,101,114,114,111,114,45,45,101,110,100,32,111,102,32,98,117,102,102,101,114,32,109,105,115,115,101,100,0,47,114,100,121,108,103,110,52,47,50,0,0,0,0,0,0,37,108,102,37,108,102,37,108,102,0,0,0,0,0,0,0,32,32,97,115,112,101,99,116,32,37,102,10,0,0,0,0,47,114,100,121,108,103,110,52,47,49,0,0,0,0,0,0,115,112,108,105,110,101,
-32,37,115,32,37,115,10,0,0,0,116,114,121,105,110,103,32,116,111,32,97,100,100,32,116,111,32,114,101,99,116,32,123,37,102,32,43,47,45,32,37,102,44,32,37,102,32,43,47,45,32,37,102,125,10,0,0,0,116,97,98,108,101,32,115,105,122,101,32,116,111,111,32,115,109,97,108,108,32,102,111,114,32,99,111,110,116,101,110,116,10,0,0,0,0,0,0,0,47,114,100,121,108,103,110,51,47,51,0,0,0,0,0,0,66,0,0,0,0,0,0,0,47,114,100,121,108,103,110,51,47,50,0,0,0,0,0,0,37,102,44,37,102,0,0,0,111,110,101,98,108,111,99,107,0,0,0,0,
-0,0,0,0,47,114,100,121,108,103,110,51,47,49,0,0,0,0,0,0,32,32,32,32,32,125,101,108,115,101,123,10,0,0,0,0,40,37,46,53,103,44,37,46,53,103,41,0,0,0,0,0,98,108,97,99,107,0,0,0,47,114,100,121,108,103,110,49,49,47,57,0,0,0,0,0,47,114,100,121,108,103,110,49,49,47,56,0,0,0,0,0,108,105,110,101,32,115,101,103,109,101,110,116,115,0,0,0,9,47,115,116,114,32,49,48,32,115,116,114,105,110,103,32,100,101,102,0,0,0,0,0,99,104,105,0,0,0,0,0,114,101,100,0,0,0,0,0,47,114,100,121,108,103,110,49,49,47,55,0,0,0,0,0,117,
-116,102,45,56,0,0,0,98,108,117,101,0,0,0,0,116,114,121,105,110,103,32,116,111,32,100,101,108,101,116,101,32,97,32,110,111,110,45,108,105,110,101,10,0,0,0,0,73,108,108,101,103,97,108,32,108,101,110,103,116,104,32,118,97,108,117,101,32,105,110,32,34,37,115,34,32,99,111,108,111,114,32,97,116,116,114,105,98,117,116,101,32,0,0,0,47,114,100,121,108,103,110,49,49,47,54,0,0,0,0,0,105,32,61,61,32,100,101,103,0,0,0,0,0,0,0,0,47,98,114,98,103,55,47,55,0,0,0,0,0,0,0,0,47,114,100,121,108,103,110,49,49,47,53,0,
-0,0,0,0,47,114,100,121,108,103,110,49,49,47,52,0,0,0,0,0,47,114,100,121,108,103,110,49,49,47,51,0,0,0,0,0,95,37,108,100,95,83,85,83,80,69,67,84,0,0,0,0,115,101,108,102,0,0,0,0,47,114,100,121,108,103,110,49,49,47,50,0,0,0,0,0,47,114,100,121,108,103,110,49,49,47,49,49,0,0,0,0,114,97,110,107,105,110,103,58,32,102,97,105,108,117,114,101,32,116,111,32,99,114,101,97,116,101,32,115,116,114,111,110,103,32,99,111,110,115,116,114,97,105,110,116,32,101,100,103,101,32,98,101,116,119,101,101,110,32,110,111,100,
-101,115,32,37,115,32,97,110,100,32,37,115,10,0,0,0,0,0,0,47,114,100,121,108,103,110,49,49,47,49,48,0,0,0,0,32,32,32,32,32,32,32,32,32,32,32,105,116,101,109,46,115,116,121,108,101,46,118,105,115,105,98,105,108,105,116,121,61,39,104,105,100,100,101,110,39,59,10,0,0,0,0,0,115,118,103,58,115,118,103,0,47,114,100,121,108,103,110,49,49,47,49,0,0,0,0,0,104,101,105,103,104,116,0,0,37,115,10,0,0,0,0,0,47,114,100,121,108,103,110,49,48,47,57,0,0,0,0,0,9,47,105,32,101,120,99,104,32,100,101,102,0,0,0,0,99,101,
-110,116,0,0,0,0,112,117,114,112,108,101,0,0,47,114,100,121,108,103,110,49,48,47,56,0,0,0,0,0,99,104,97,114,115,101,116,0,84,111,116,97,108,32,115,105,122,101,32,62,32,49,32,105,110,32,34,37,115,34,32,99,111,108,111,114,32,115,112,101,99,32,0,0,0,0,0,0,119,105,100,116,104,0,0,0,47,114,100,121,108,103,110,49,48,47,55,0,0,0,0,0,47,114,100,121,108,103,110,49,48,47,54,0,0,0,0,0,111,114,100,101,114,105,110,103,32,39,37,115,39,32,110,111,116,32,114,101,99,111,103,110,105,122,101,100,32,102,111,114,32,110,
-111,100,101,32,39,37,115,39,46,10,0,0,0,0,48,0,0,0,0,0,0,0,47,114,100,121,108,103,110,49,48,47,53,0,0,0,0,0,47,98,114,98,103,55,47,54,0,0,0,0,0,0,0,0,47,114,100,121,108,103,110,49,48,47,52,0,0,0,0,0,47,114,100,121,108,103,110,49,48,47,51,0,0,0,0,0,47,114,100,121,108,103,110,49,48,47,50,0,0,0,0,0,47,114,100,121,108,103,110,49,48,47,49,48,0,0,0,0,32,32,32,32,32,32,32,32,32,105,116,101,109,32,61,32,100,111,99,117,109,101,110,116,46,103,101,116,69,108,101,109,101,110,116,66,121,73,100,40,86,77,76,110,
-111,91,120,93,41,59,10,0,0,0,0,0,47,114,100,121,108,103,110,49,48,47,49,0,0,0,0,0,47,114,100,121,108,98,117,57,47,57,0,0,0,0,0,0,9,47,106,32,101,120,99,104,32,100,101,102,0,0,0,0,99,101,100,105,108,0,0,0,112,111,119,100,101,114,98,108,117,101,0,0,0,0,0,0,47,114,100,121,108,98,117,57,47,56,0,0,0,0,0,0,102,105,108,108,0,0,0,0,102,111,110,116,99,111,108,111,114,0,0,0,0,0,0,0,47,114,100,121,108,98,117,57,47,55,0,0,0,0,0,0,47,114,100,121,108,98,117,57,47,54,0,0,0,0,0,0,47,114,100,121,108,98,117,57,47,
-53,0,0,0,0,0,0,47,98,114,98,103,55,47,53,0,0,0,0,0,0,0,0,117,110,100,101,102,105,110,101,100,32,101,110,116,105,116,121,0,0,0,0,0,0,0,0,47,114,100,121,108,98,117,57,47,52,0,0,0,0,0,0,47,114,100,121,108,98,117,57,47,51,0,0,0,0,0,0,47,114,100,121,108,98,117,57,47,50,0,0,0,0,0,0,47,114,100,121,108,98,117,57,47,49,0,0,0,0,0,0,32,32,32,32,32,32,32,102,111,114,32,40,120,32,105,110,32,86,77,76,110,111,41,123,10,0,0,0,0,0,0,0,47,114,100,121,108,98,117,56,47,56,0,0,0,0,0,0,47,114,100,121,108,98,117,56,47,
-55,0,0,0,0,0,0,9,47,110,112,97,103,101,115,32,101,120,99,104,32,100,101,102,0,0,0,0,0,0,0,99,99,101,100,105,108,0,0,112,108,117,109,0,0,0,0,47,114,100,121,108,98,117,56,47,54,0,0,0,0,0,0,101,120,112,97,110,100,0,0,108,97,121,101,114,115,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,105,110,32,37,115,32,111,117,116,112,117,116,10,0,0,0,0,0,0,47,114,100,121,108,98,117,56,47,53,0,0,0,0,0,0,115,97,109,101,116,97,105,108,0,0,0,0,0,0,0,0,47,114,100,121,108,98,117,56,47,52,0,0,0,0,0,0,47,114,
-100,121,108,98,117,56,47,51,0,0,0,0,0,0,47,98,114,98,103,55,47,52,0,0,0,0,0,0,0,0,103,105,102,58,118,114,109,108,0,0,0,0,0,0,0,0,47,114,100,121,108,98,117,56,47,50,0,0,0,0,0,0,47,114,100,121,108,98,117,56,47,49,0,0,0,0,0,0,47,114,100,121,108,98,117,55,47,55,0,0,0,0,0,0,47,114,100,121,108,98,117,55,47,54,0,0,0,0,0,0,32,32,32,32,32,32,32,125,10,0,0,0,0,0,0,0,47,114,100,121,108,98,117,55,47,53,0,0,0,0,0,0,47,114,100,121,108,98,117,55,47,52,0,0,0,0,0,0,47,98,101,103,105,110,112,97,103,101,32,123,9,37,
-32,105,32,106,32,110,112,97,103,101,115,0,0,0,0,0,0,0,99,97,112,0,0,0,0,0,112,105,110,107,0,0,0,0,47,114,100,121,108,98,117,55,47,51,0,0,0,0,0,0,99,111,109,112,114,101,115,115,0,0,0,0,0,0,0,0,105,110,102,111,0,0,0,0,73,109,97,103,101,115,32,117,110,115,117,112,112,111,114,116,101,100,32,105,110,32,34,98,97,99,107,103,114,111,117,110,100,34,32,97,116,116,114,105,98,117,116,101,10,0,0,0,47,114,100,121,108,98,117,55,47,50,0,0,0,0,0,0,47,114,100,121,108,98,117,55,47,49,0,0,0,0,0,0,47,114,100,121,108,
-98,117,54,47,54,0,0,0,0,0,0,109,112,116,121,0,0,0,0,47,98,114,98,103,55,47,51,0,0,0,0,0,0,0,0,47,114,100,121,108,98,117,54,47,53,0,0,0,0,0,0,47,114,100,121,108,98,117,54,47,52,0,0,0,0,0,0,125,10,0,0,0,0,0,0,47,114,100,121,108,98,117,54,47,51,0,0,0,0,0,0,37,108,102,44,37,108,102,44,37,108,102,37,99,0,0,0,47,114,100,121,108,98,117,54,47,50,0,0,0,0,0,0,32,32,32,32,32,32,32,32,32,125,10,0,0,0,0,0,47,114,100,121,108,98,117,54,47,49,0,0,0,0,0,0,47,114,100,121,108,98,117,53,47,53,0,0,0,0,0,0,47,110,111,
-112,99,111,108,111,114,32,123,112,111,112,32,112,111,112,32,112,111,112,125,32,98,105,110,100,32,100,101,102,0,0,0,0,0,0,0,0,98,117,108,108,0,0,0,0,112,101,114,117,0,0,0,0,47,114,100,121,108,98,117,53,47,52,0,0,0,0,0,0,97,117,116,111,0,0,0,0,103,114,97,100,105,101,110,116,32,112,101,110,32,99,111,108,111,114,115,32,110,111,116,32,121,101,116,32,115,117,112,112,111,114,116,101,100,46,10,0,108,116,97,105,108,0,0,0,47,114,100,121,108,98,117,53,47,51,0,0,0,0,0,0,47,98,114,98,103,55,47,50,0,0,0,0,0,0,
-0,0,47,114,100,121,108,98,117,53,47,50,0,0,0,0,0,0,47,114,100,121,108,98,117,53,47,49,0,0,0,0,0,0,47,114,100,121,108,98,117,52,47,52,0,0,0,0,0,0,47,114,100,121,108,98,117,52,47,51,0,0,0,0,0,0,47,114,100,121,108,98,117,52,47,50,0,0,0,0,0,0,47,114,100,121,108,98,117,52,47,49,0,0,0,0,0,0,32,32,32,32,32,32,32,32,32,32,32,105,116,101,109,46,115,116,121,108,101,46,118,105,115,105,98,105,108,105,116,121,61,39,118,105,115,105,98,108,101,39,59,10,0,0,0,0,47,114,100,121,108,98,117,51,47,51,0,0,0,0,0,0,47,114,
-100,121,108,98,117,51,47,50,0,0,0,0,0,0,47,103,114,97,112,104,99,111,108,111,114,32,123,32,115,101,116,104,115,98,99,111,108,111,114,32,125,32,98,105,110,100,32,100,101,102,0,0,0,0,98,114,118,98,97,114,0,0,46,102,116,32,37,115,10,0,112,101,97,99,104,112,117,102,102,0,0,0,0,0,0,0,47,114,100,121,108,98,117,51,47,49,0,0,0,0,0,0,114,97,116,105,111,0,0,0,119,104,105,116,101,0,0,0,47,114,100,121,108,98,117,49,49,47,57,0,0,0,0,0,47,114,100,121,108,98,117,49,49,47,56,0,0,0,0,0,47,114,100,121,108,98,117,49,
-49,47,55,0,0,0,0,0,47,98,114,98,103,55,47,49,0,0,0,0,0,0,0,0,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,46,49,102,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,32,37,100,10,0,0,0,0,0,0,47,114,100,121,108,98,117,49,49,47,54,0,0,0,0,0,47,114,100,121,108,98,117,49,49,47,53,0,0,0,0,0,47,114,100,121,108,98,117,49,49,47,52,0,0,0,0,0,47,114,100,121,108,98,117,49,49,47,51,0,0,0,0,0,32,32,32,32,32,32,32,32,32,105,102,32,40,105,116,101,109,41,32,123,10,
-0,0,0,110,101,119,114,97,110,107,0,47,114,100,121,108,98,117,49,49,47,50,0,0,0,0,0,47,114,100,121,108,98,117,49,49,47,49,49,0,0,0,0,47,101,100,103,101,99,111,108,111,114,32,123,32,115,101,116,104,115,98,99,111,108,111,114,32,125,32,98,105,110,100,32,100,101,102,0,0,0,0,0,98,101,116,97,0,0,0,0,112,97,112,97,121,97,119,104,105,112,0,0,0,0,0,0,47,114,100,121,108,98,117,49,49,47,49,48,0,0,0,0,37,108,102,37,99,0,0,0,108,97,121,101,114,0,0,0,47,114,100,121,108,98,117,49,49,47,49,0,0,0,0,0,97,117,120,103,
-0,0,0,0,47,114,100,121,108,98,117,49,48,47,57,0,0,0,0,0,109,105,110,117,115,0,0,0,47,114,100,121,108,98,117,49,48,47,56,0,0,0,0,0,47,98,114,98,103,54,47,54,0,0,0,0,0,0,0,0,47,114,100,121,108,98,117,49,48,47,55,0,0,0,0,0,97,113,117,97,0,0,0,0,47,114,100,121,108,98,117,49,48,47,54,0,0,0,0,0,47,114,100,121,108,98,117,49,48,47,53,0,0,0,0,0,47,114,100,121,108,98,117,49,48,47,52,0,0,0,0,0,32,32,32,32,32,32,32,32,32,105,116,101,109,32,61,32,100,111,99,117,109,101,110,116,46,103,101,116,69,108,101,109,101,
-110,116,66,121,73,100,40,86,77,76,121,101,115,91,120,93,41,59,10,0,0,0,0,47,114,100,121,108,98,117,49,48,47,51,0,0,0,0,0,103,114,97,112,104,32,108,97,98,101,108,0,0,0,0,0,47,114,100,121,108,98,117,49,48,47,50,0,0,0,0,0,47,110,111,100,101,99,111,108,111,114,32,123,32,115,101,116,104,115,98,99,111,108,111,114,32,125,32,98,105,110,100,32,100,101,102,0,0,0,0,0,98,100,113,117,111,0,0,0,112,97,108,101,118,105,111,108,101,116,114,101,100,0,0,0,47,114,100,121,108,98,117,49,48,47,49,48,0,0,0,0,37,108,102,
-44,37,108,102,37,99,0,0,0,0,0,0,0,114,111,117,110,100,101,100,0,47,114,100,121,108,98,117,49,48,47,49,0,0,0,0,0,47,114,100,112,117,57,47,57,0,0,0,0,0,0,0,0,47,114,100,112,117,57,47,56,0,0,0,0,0,0,0,0,47,98,114,98,103,54,47,53,0,0,0,0,0,0,0,0,112,111,115,105,116,105,111,110,46,99,0,0,0,0,0,0,47,114,100,112,117,57,47,55,0,0,0,0,0,0,0,0,91,94,91,58,100,105,103,105,116,58,93,93,0,0,0,0,65,103,110,111,100,101,105,110,102,111,95,116,0,0,0,0,47,114,100,112,117,57,47,54,0,0,0,0,0,0,0,0,47,114,100,112,117,
-57,47,53,0,0,0,0,0,0,0,0,47,114,100,112,117,57,47,52,0,0,0,0,0,0,0,0,32,32,32,32,32,32,32,102,111,114,32,40,120,32,105,110,32,86,77,76,121,101,115,41,123,10,0,0,0,0,0,0,120,100,111,116,49,46,52,58,120,100,111,116,0,0,0,0,103,118,117,115,101,114,115,104,97,112,101,46,99,0,0,0,99,97,110,110,111,116,32,114,101,97,108,108,111,99,32,112,110,108,115,0,0,0,0,0,47,114,100,112,117,57,47,51,0,0,0,0,0,0,0,0,47,114,100,112,117,57,47,50,0,0,0,0,0,0,0,0,37,32,104,111,111,107,115,32,102,111,114,32,115,101,116,116,
-105,110,103,32,99,111,108,111,114,32,0,0,0,0,0,0,47,114,100,112,117,57,47,49,0,0,0,0,0,0,0,0,97,117,109,108,0,0,0,0,112,97,108,101,116,117,114,113,117,111,105,115,101,0,0,0,119,105,100,116,104,0,0,0,65,118,97,110,116,71,97,114,100,101,45,66,111,111,107,0,47,97,99,99,101,110,116,53,47,51,0,0,0,0,0,0,108,97,98,101,108,106,117,115,116,0,0,0,0,0,0,0,32,0,0,0,0,0,0,0,116,111,116,97,108,32,97,100,100,101,100,32,115,111,32,102,97,114,32,61,32,37,100,10,0,0,0,0,0,0,0,0,95,98,108,111,99,107,95,37,100,0,0,
-0,0,0,0,0,115,116,114,105,112,101,100,0,114,32,38,38,32,110,32,38,38,32,110,101,119,0,0,0,47,114,100,112,117,56,47,56,0,0,0,0,0,0,0,0,98,111,120,0,0,0,0,0,103,114,105,100,40,37,100,44,37,100,41,58,32,37,115,10,0,0,0,0,0,0,0,0,105,110,32,99,104,101,99,107,112,97,116,104,44,32,98,111,120,101,115,32,37,100,32,97,110,100,32,37,100,32,100,111,110,39,116,32,116,111,117,99,104,10,0,0,0,0,0,0,37,37,66,101,103,105,110,68,111,99,117,109,101,110,116,58,10,0,0,0,0,0,0,0,112,115,58,112,115,0,0,0,32,91,37,100,
-93,32,37,112,32,115,101,116,32,37,100,32,40,37,46,48,50,102,44,37,46,48,50,102,41,32,40,37,46,48,50,102,44,37,46,48,50,102,41,32,37,115,10,0,47,114,100,112,117,56,47,55,0,0,0,0,0,0,0,0,112,111,115,0,0,0,0,0,33,0,0,0,0,0,0,0,38,35,49,54,48,59,0,0,111,117,116,32,111,102,32,100,121,110,97,109,105,99,32,109,101,109,111,114,121,32,105,110,32,97,97,103,101,110,115,117,114,101,95,98,117,102,102,101,114,95,115,116,97,99,107,40,41,0,0,0,0,0,0,0,47,114,100,112,117,56,47,54,0,0,0,0,0,0,0,0,47,98,114,98,103,
-54,47,52,0,0,0,0,0,0,0,0,32,32,109,111,100,101,32,32,32,37,115,10,0,0,0,0,37,46,51,102,32,0,0,0,47,114,100,112,117,56,47,53,0,0,0,0,0,0,0,0,100,101,108,121,32,62,61,32,48,0,0,0,0,0,0,0,47,114,100,112,117,56,47,52,0,0,0,0,0,0,0,0,70,79,78,84,0,0,0,0,47,114,100,112,117,56,47,51,0,0,0,0,0,0,0,0,69,100,103,101,32,115,101,112,97,114,97,116,105,111,110,58,32,97,100,100,61,37,100,32,40,37,102,44,37,102,41,10,0,0,0,0,0,0,0,0,47,114,100,112,117,56,47,50,0,0,0,0,0,0,0,0,32,32,32,32,32,32,105,102,32,40,105,
-101,118,101,114,115,62,61,53,41,123,10,0,0,48,0,0,0,0,0,0,0,102,97,116,97,108,32,102,108,101,120,32,115,99,97,110,110,101,114,32,105,110,116,101,114,110,97,108,32,101,114,114,111,114,45,45,110,111,32,97,99,116,105,111,110,32,102,111,117,110,100,0,0,0,0,0,0,37,108,100,0,0,0,0,0,47,114,100,112,117,56,47,49,0,0,0,0,0,0,0,0,47,114,100,112,117,55,47,55,0,0,0,0,0,0,0,0,112,111,108,121,108,105,110,101,115],"i8",L,l.J+153640);D([47,116,97,112,101,114,101,100,32,123,32,125,32,98,105,110,100,32,100,101,102,
-0,0,0,97,116,105,108,100,101,0,0,112,97,108,101,103,114,101,101,110,0,0,0,0,0,0,0,10,105,110,116,101,114,115,101,99,116,105,111,110,32,97,116,32,37,46,51,102,32,37,46,51,102,10,0,0,0,0,0,47,114,100,112,117,55,47,54,0,0,0,0,0,0,0,0,108,97,98,101,108,108,111,99,0,0,0,0,0,0,0,0,98,108,97,110,99,104,101,100,97,108,109,111,110,100,0,0,114,97,100,105,97,108,0,0,47,114,100,112,117,55,47,53,0,0,0,0,0,0,0,0,47,114,100,112,117,55,47,52,0,0,0,0,0,0,0,0,108,97,121,111,117,116,46,99,0,0,0,0,0,0,0,0,47,114,100,
-112,117,55,47,51,0,0,0,0,0,0,0,0,47,98,114,98,103,54,47,51,0,0,0,0,0,0,0,0,47,114,100,112,117,55,47,50,0,0,0,0,0,0,0,0,58,0,0,0,0,0,0,0,115,116,97,114,116,0,0,0,47,114,100,112,117,55,47,49,0,0,0,0,0,0,0,0,47,114,100,112,117,54,47,54,0,0,0,0,0,0,0,0,95,119,101,97,107,95,37,100,0,0,0,0,0,0,0,0,47,114,100,112,117,54,47,53,0,0,0,0,0,0,0,0,32,32,32,32,32,32,125,10,0,0,0,0,0,0,0,0,47,114,100,112,117,54,47,52,0,0,0,0,0,0,0,0,112,116,0,0,0,0,0,0,105,110,118,105,115,0,0,0,47,114,100,112,117,54,47,51,0,0,0,
-0,0,0,0,0,47,100,105,97,103,111,110,97,108,115,32,123,32,125,32,98,105,110,100,32,100,101,102,0,97,115,121,109,112,0,0,0,112,97,108,101,103,111,108,100,101,110,114,111,100,0,0,0,92,78,0,0,0,0,0,0,47,114,100,112,117,54,47,50,0,0,0,0,0,0,0,0,98,108,97,99,107,0,0,0,115,116,121,108,101,0,0,0,103,118,114,101,110,100,101,114,95,115,101,116,95,115,116,121,108,101,58,32,117,110,115,117,112,112,111,114,116,101,100,32,115,116,121,108,101,32,37,115,32,45,32,105,103,110,111,114,105,110,103,10,0,0,0,0,47,114,
-100,112,117,54,47,49,0,0,0,0,0,0,0,0,47,114,100,112,117,53,47,53,0,0,0,0,0,0,0,0,111,114,100,101,114,105,110,103,32,39,37,115,39,32,110,111,116,32,114,101,99,111,103,110,105,122,101,100,46,10,0,0,115,111,108,105,100,0,0,0,10,0,0,0,0,0,0,0,47,114,100,112,117,53,47,52,0,0,0,0,0,0,0,0,47,98,114,98,103,54,47,50,0,0,0,0,0,0,0,0,47,114,100,112,117,53,47,51,0,0,0,0,0,0,0,0,47,114,100,112,117,53,47,50,0,0,0,0,0,0,0,0,47,114,100,112,117,53,47,49,0,0,0,0,0,0,0,0,47,114,100,112,117,52,47,52,0,0,0,0,0,0,0,0,
-32,32,32,32,32,32,32,32,32,105,101,118,101,114,115,61,32,112,97,114,115,101,73,110,116,32,40,117,97,46,115,117,98,115,116,114,105,110,103,32,40,109,115,105,101,43,53,44,32,117,97,46,105,110,100,101,120,79,102,32,40,39,46,39,44,32,109,115,105,101,32,41,41,41,10,0,0,0,0,0,47,114,100,112,117,52,47,51,0,0,0,0,0,0,0,0,47,114,100,112,117,52,47,50,0,0,0,0,0,0,0,0,47,114,111,117,110,100,101,100,32,123,32,125,32,98,105,110,100,32,100,101,102,0,0,0,97,114,105,110,103,0,0,0,111,114,99,104,105,100,0,0,110,111,
-100,101,46,99,0,0,47,114,100,112,117,52,47,49,0,0,0,0,0,0,0,0,84,105,109,101,115,45,82,111,109,97,110,0,0,0,0,0,102,105,108,108,101,100,0,0,47,114,100,112,117,51,47,51,0,0,0,0,0,0,0,0,47,114,100,112,117,51,47,50,0,0,0,0,0,0,0,0,47,114,100,112,117,51,47,49,0,0,0,0,0,0,0,0,47,98,114,98,103,54,47,49,0,0,0,0,0,0,0,0,105,108,108,101,103,97,108,32,112,97,114,97,109,101,116,101,114,32,101,110,116,105,116,121,32,114,101,102,101,114,101,110,99,101,0,0,0,0,0,0,47,114,100,103,121,57,47,57,0,0,0,0,0,0,0,0,47,
-114,100,103,121,57,47,56,0,0,0,0,0,0,0,0,47,114,100,103,121,57,47,55,0,0,0,0,0,0,0,0,47,114,100,103,121,57,47,54,0,0,0,0,0,0,0,0,32,32,32,32,32,32,105,102,32,40,32,109,115,105,101,32,62,32,48,32,41,123,32,32,32,32,32,32,47,47,32,73,102,32,73,110,116,101,114,110,101,116,32,69,120,112,108,111,114,101,114,44,32,114,101,116,117,114,110,32,118,101,114,115,105,111,110,32,110,117,109,98,101,114,10,0,0,0,0,0,47,114,100,103,121,57,47,53,0,0,0,0,0,0,0,0,47,114,100,103,121,57,47,52,0,0,0,0,0,0,0,0,47,117,110,
-102,105,108,108,101,100,32,123,32,125,32,98,105,110,100,32,100,101,102,0,0,97,110,103,0,0,0,0,0,111,114,97,110,103,101,114,101,100,0,0,0,0,0,0,0,47,114,100,103,121,57,47,51,0,0,0,0,0,0,0,0,85,110,115,117,112,112,111,114,116,101,100,32,99,104,97,114,115,101,116,32,118,97,108,117,101,32,37,100,10,0,0,0,115,97,109,112,108,101,112,111,105,110,116,115,0,0,0,0,47,114,100,103,121,57,47,50,0,0,0,0,0,0,0,0,47,114,100,103,121,57,47,49,0,0,0,0,0,0,0,0,47,114,100,103,121,56,47,56,0,0,0,0,0,0,0,0,47,98,114,98,
-103,53,47,53,0,0,0,0,0,0,0,0,47,114,100,103,121,56,47,55,0,0,0,0,0,0,0,0,112,110,103,58,118,114,109,108,0,0,0,0,0,0,0,0,47,114,100,103,121,56,47,54,0,0,0,0,0,0,0,0,47,114,100,103,121,56,47,53,0,0,0,0,0,0,0,0,47,114,100,103,121,56,47,52,0,0,0,0,0,0,0,0,32,32,32,32,32,32,118,97,114,32,86,77,76,110,111,61,110,101,119,32,65,114,114,97,121,40,39,95,110,111,116,86,77,76,49,95,39,44,39,95,110,111,116,86,77,76,50,95,39,41,59,10,0,0,0,0,47,114,100,103,121,56,47,51,0,0,0,0,0,0,0,0,47,114,100,103,121,56,47,
-50,0,0,0,0,0,0,0,0,47,102,105,108,108,101,100,32,123,32,125,32,98,105,110,100,32,100,101,102,0,0,0,0,97,110,100,0,0,0,0,0,111,114,97,110,103,101,0,0,47,114,100,103,121,56,47,49,0,0,0,0,0,0,0,0,66,73,71,45,53,0,0,0,104,101,97,100,116,111,111,108,116,105,112,0,0,0,0,0,47,114,100,103,121,55,47,55,0,0,0,0,0,0,0,0,47,114,100,103,121,55,47,54,0,0,0,0,0,0,0,0,47,114,100,103,121,55,47,53,0,0,0,0,0,0,0,0,47,98,114,98,103,53,47,52,0,0,0,0,0,0,0,0,47,114,100,103,121,55,47,52,0,0,0,0,0,0,0,0,112,101,110,0,0,
-0,0,0,47,114,100,103,121,55,47,51,0,0,0,0,0,0,0,0,47,114,100,103,121,55,47,50,0,0,0,0,0,0,0,0,47,114,100,103,121,55,47,49,0,0,0,0,0,0,0,0,32,32,32,32,32,32,118,97,114,32,86,77,76,121,101,115,61,110,101,119,32,65,114,114,97,121,40,39,95,86,77,76,49,95,39,44,39,95,86,77,76,50,95,39,41,59,10,0,47,114,100,103,121,54,47,54,0,0,0,0,0,0,0,0,47,114,100,103,121,54,47,53,0,0,0,0,0,0,0,0,47,98,111,108,100,32,123,32,50,32,115,101,116,108,105,110,101,119,105,100,116,104,32,125,32,98,105,110,100,32,100,101,102,
-0,0,0,0,0,0,0,97,109,112,0,0,0,0,0,111,108,105,118,101,100,114,97,98,0,0,0,0,0,0,0,47,114,100,103,121,54,47,52,0,0,0,0,0,0,0,0,73,83,79,45,56,56,53,57,45,49,0,0,0,0,0,0,116,97,105,108,116,111,111,108,116,105,112,0,0,0,0,0,47,114,100,103,121,54,47,51,0,0,0,0,0,0,0,0,47,114,100,103,121,54,47,50,0,0,0,0,0,0,0,0,47,114,100,103,121,54,47,49,0,0,0,0,0,0,0,0,47,98,114,98,103,53,47,51,0,0,0,0,0,0,0,0,47,114,100,103,121,53,47,53,0,0,0,0,0,0,0,0,47,114,100,103,121,53,47,52,0,0,0,0,0,0,0,0,47,114,100,103,121,
-53,47,51,0,0,0,0,0,0,0,0,47,114,100,103,121,53,47,50,0,0,0,0,0,0,0,0,32,32,32,32,32,32,118,97,114,32,105,116,101,109,59,10,0,0,0,0,0,0,0,0,47,114,100,103,121,53,47,49,0,0,0,0,0,0,0,0,47,114,100,103,121,52,47,52,0,0,0,0,0,0,0,0,47,105,110,118,105,115,32,123,47,102,105,108,108,32,123,110,101,119,112,97,116,104,125,32,100,101,102,32,47,115,116,114,111,107,101,32,123,110,101,119,112,97,116,104,125,32,100,101,102,32,47,115,104,111,119,32,123,112,111,112,32,110,101,119,112,97,116,104,125,32,100,101,102,
-125,32,98,105,110,100,32,100,101,102,0,0,0,0,0,97,108,112,104,97,0,0,0,110,111,100,101,32,39,37,115,39,44,32,103,114,97,112,104,32,39,37,115,39,32,115,105,122,101,32,116,111,111,32,115,109,97,108,108,32,102,111,114,32,108,97,98,101,108,10,0,111,108,105,118,101,0,0,0,47,114,100,103,121,52,47,51,0,0,0,0,0,0,0,0,85,84,70,45,56,0,0,0,108,97,98,101,108,116,111,111,108,116,105,112,0,0,0,0,47,114,100,103,121,52,47,50,0,0,0,0,0,0,0,0,47,114,100,103,121,52,47,49,0,0,0,0,0,0,0,0,47,114,100,103,121,51,47,51,
-0,0,0,0,0,0,0,0,47,98,114,98,103,53,47,50,0,0,0,0,0,0,0,0,47,114,100,103,121,51,47,50,0,0,0,0,0,0,0,0,35,32,37,115,10,0,0,0,47,114,100,103,121,51,47,49,0,0,0,0,0,0,0,0,47,114,100,103,121,49,49,47,57,0,0,0,0,0,0,0,47,114,100,103,121,49,49,47,56,0,0,0,0,0,0,0,32,32,32,32,32,32,118,97,114,32,105,101,118,101,114,115,59,10,0,0,0,0,0,0,47,114,100,103,121,49,49,47,55,0,0,0,0,0,0,0,47,114,100,103,121,49,49,47,54,0,0,0,0,0,0,0,47,100,111,116,116,101,100,32,123,32,91,49,32,73,110,118,83,99,97,108,101,70,97,
-99,116,111,114,32,109,117,108,32,54,32,73,110,118,83,99,97,108,101,70,97,99,116,111,114,32,109,117,108,93,32,48,32,115,101,116,100,97,115,104,32,125,32,98,105,110,100,32,100,101,102,0,0,0,0,0,0,97,108,101,102,115,121,109,0,108,97,98,101,108,108,111,99,0,0,0,0,0,0,0,0,111,108,100,108,97,99,101,0,47,114,100,103,121,49,49,47,53,0,0,0,0,0,0,0,65,103,114,97,112,104,105,110,102,111,95,116,0,0,0,0,101,100,103,101,116,111,111,108,116,105,112,0,0,0,0,0,47,114,100,103,121,49,49,47,52,0,0,0,0,0,0,0,110,45,62,
-98,114,97,110,99,104,91,105,93,46,99,104,105,108,100,0,0,0,0,0,0,47,114,100,103,121,49,49,47,51,0,0,0,0,0,0,0,108,97,98,101,108,0,0,0,47,114,100,103,121,49,49,47,50,0,0,0,0,0,0,0,47,98,114,98,103,53,47,49,0,0,0,0,0,0,0,0,75,80,95,65,100,100,0,0,47,114,100,103,121,49,49,47,49,49,0,0,0,0,0,0,118,109,108,122,58,118,109,108,0,0,0,0,0,0,0,0,47,114,100,103,121,49,49,47,49,48,0,0,0,0,0,0,47,114,100,103,121,49,49,47,49,0,0,0,0,0,0,0,47,114,100,103,121,49,48,47,57,0,0,0,0,0,0,0,32,32,32,32,32,32,118,97,114,
-32,109,115,105,101,32,61,32,117,97,46,105,110,100,101,120,79,102,32,40,32,39,77,83,73,69,32,39,32,41,10,0,0,0,0,0,0,0,0,47,114,100,103,121,49,48,47,56,0,0,0,0,0,0,0,103,114,97,112,104,0,0,0,47,114,100,103,121,49,48,47,55,0,0,0,0,0,0,0,47,100,97,115,104,101,100,32,123,32,91,57,32,73,110,118,83,99,97,108,101,70,97,99,116,111,114,32,109,117,108,32,100,117,112,32,93,32,48,32,115,101,116,100,97,115,104,32,125,32,98,105,110,100,32,100,101,102,0,0,0,0,0,0,97,103,114,97,118,101,0,0,78,111,32,111,114,32,105,
-109,112,114,111,112,101,114,32,105,109,97,103,101,61,34,37,115,34,32,102,111,114,32,110,111,100,101,32,34,37,115,34,10,0,0,0,0,0,0,0,0,110,97,118,121,0,0,0,0,47,114,100,103,121,49,48,47,54,0,0,0,0,0,0,0,105,100,0,0,0,0,0,0,116,111,111,108,116,105,112,0,47,114,100,103,121,49,48,47,53,0,0,0,0,0,0,0,47,114,100,103,121,49,48,47,52,0,0,0,0,0,0,0,47,114,100,103,121,49,48,47,51,0,0,0,0,0,0,0,47,98,114,98,103,52,47,52,0,0,0,0,0,0,0,0,47,114,100,103,121,49,48,47,50,0,0,0,0,0,0,0,91,91,58,100,105,103,105,116,
-58,93,93,0,0,0,0,0,47,114,100,103,121,49,48,47,49,48,0,0,0,0,0,0,65,103,114,97,112,104,105,110,102,111,95,116,0,0,0,0,47,114,100,103,121,49,48,47,49,0,0,0,0,0,0,0,100,101,102,108,97,116,105,111,110,32,101,110,100,32,112,114,111,98,108,101,109,32,37,100,10,0,0,0,0,0,0,0,47,114,100,98,117,57,47,57,0,0,0,0,0,0,0,0,32,32,32,32,32,32,118,97,114,32,117,97,32,61,32,119,105,110,100,111,119,46,110,97,118,105,103,97,116,111,114,46,117,115,101,114,65,103,101,110,116,10,0,0,0,0,0,0,120,100,111,116,49,46,50,58,
-120,100,111,116,0,0,0,0,99,97,110,110,111,116,32,109,97,108,108,111,99,32,112,110,108,112,115,0,0,0,0,0,47,114,100,98,117,57,47,56,0,0,0,0,0,0,0,0,47,114,100,98,117,57,47,55,0,0,0,0,0,0,0,0,121,101,115,0,0,0,0,0,47,115,111,108,105,100,32,123,32,91,93,32,48,32,115,101,116,100,97,115,104,32,125,32,98,105,110,100,32,100,101,102,0,0,0,0,0,0,0,0,97,101,108,105,103,0,0,0,60,110,105,108,62,0,0,0,110,97,118,97,106,111,119,104,105,116,101,0,0,0,0,0,91,105,110,116,101,114,110,97,108,32,116,105,109,101,115,
-93,0,0,0,0,0,0,0,0,47,114,100,98,117,57,47,54,0,0,0,0,0,0,0,0,104,101,97,100,99,108,105,112,0,0,0,0,0,0,0,0,108,97,98,101,108,0,0,0,104,101,97,100,116,97,114,103,101,116,0,0,0,0,0,0,47,114,100,98,117,57,47,53,0,0,0,0,0,0,0,0,47,97,99,99,101,110,116,53,47,50,0,0,0,0,0,0,117,115,105,110,103,32,37,115,32,102,111,114,32,117,110,107,110,111,119,110,32,115,104,97,112,101,32,37,115,10,0,0,105,100,120,32,61,61,32,115,122,0,0,0,0,0,0,0,105,110,32,99,104,101,99,107,112,97,116,104,44,32,98,111,120,32,37,100,
-32,104,97,115,32,76,76,32,99,111,111,114,100,32,62,32,85,82,32,99,111,111,114,100,10,0,0,0,47,117,115,101,114,95,115,104,97,112,101,95,37,100,32,123,10,0,0,0,0,0,0,0,120,108,97,98,101,108,115,10,0,0,0,0,0,0,0,0,47,114,100,98,117,57,47,52,0,0,0,0,0,0,0,0,115,116,111,112,10,0,0,0,9,37,115,32,37,100,10,0,32,37,100,37,115,32,105,116,101,114,97,116,105,111,110,115,32,37,46,50,102,32,115,101,99,10,0,0,0,0,0,0,38,35,52,53,59,0,0,0,47,114,100,98,117,57,47,51,0,0,0,0,0,0,0,0,47,98,114,98,103,52,47,51,0,0,
-0,0,0,0,0,0,97,116,116,114,105,98,117,116,101,32,109,97,99,114,111,115,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,0,0,0,0,0,0,0,112,97,99,107,32,105,110,102,111,58,10,0,0,0,0,0,83,111,108,118,105,110,103,32,109,111,100,101,108,58,32,0,47,114,100,98,117,57,47,50,0,0,0,0,0,0,0,0,104,116,109,108,116,97,98,108,101,46,99,0,0,0,0,0,47,114,100,98,117,57,47,49,0,0,0,0,0,0,0,0,72,84,77,76,0,0,0,0,47,114,100,98,117,56,47,56,0,0,0,0,0,0,0,0,78,111,100,101,32,115,101,112,97,114,97,116,105,
-111,110,58,32,97,100,100,61,37,100,32,40,37,102,44,37,102,41,10,0,0,0,0,0,0,0,0,47,114,100,98,117,56,47,55,0,0,0,0,0,0,0,0,32,32,32,123,10,0,0,0,115,101,103,109,101,110,116,32,91,37,115,44,37,115,93,32,100,111,101,115,32,110,111,116,32,105,110,116,101,114,115,101,99,116,32,98,111,120,32,108,108,61,37,115,44,117,114,61,37,115,10,0,0,0,0,0,101,100,103,101,0,0,0,0,47,114,100,98,117,56,47,54,0,0,0,0,0,0,0,0,47,114,100,98,117,56,47,53,0,0,0,0,0,0,0,0,115,112,108,105,110,101,115,0,37,32,115,116,121,108,
-101,115,0,0,0,0,0,0,0,0,97,99,117,116,101,0,0,0,78,111,32,111,114,32,105,109,112,114,111,112,101,114,32,115,104,97,112,101,102,105,108,101,61,34,37,115,34,32,102,111,114,32,110,111,100,101,32,34,37,115,34,10,0,0,0,0,109,111,99,99,97,115,105,110,0,0,0,0,0,0,0,0,47,114,100,98,117,56,47,52,0,0,0,0,0,0,0,0,116,97,105,108,99,108,105,112,0,0,0,0,0,0,0,0,116,97,105,108,116,97,114,103,101,116,0,0,0,0,0,0,98,108,97,99,107,0,0,0,47,114,100,98,117,56,47,51,0,0,0,0,0,0,0,0,47,114,100,98,117,56,47,50,0,0,0,0,
-0,0,0,0,47,114,100,98,117,56,47,49,0,0,0,0,0,0,0,0,47,98,114,98,103,52,47,50,0,0,0,0,0,0,0,0,47,114,100,98,117,55,47,55,0,0,0,0,0,0,0,0,61,0,0,0,0,0,0,0,120,108,112,0,0,0,0,0,47,114,100,98,117,55,47,54,0,0,0,0,0,0,0,0,47,114,100,98,117,55,47,53,0,0,0,0,0,0,0,0,99,111,109,112,97,99,116,0,47,114,100,98,117,55,47,52,0,0,0,0,0,0,0,0,32,32,32,102,117,110,99,116,105,111,110,32,98,114,111,119,115,101,114,99,104,101,99,107,40,41,10,0,0,0,0,0,47,114,100,98,117,55,47,51,0,0,0,0,0,0,0,0,37,108,102,0,0,0,0,0,
-37,115,32,0,0,0,0,0,47,114,100,98,117,55,47,50,0,0,0,0,0,0,0,0,32,32,32,32,32,32,32,115,99,97,108,101,0,0,0,0,97,99,105,114,99,0,0,0,37,115,10,0,0,0,0,0,114,101,103,117,108,97,114,0,109,105,115,116,121,114,111,115,101,0,0,0,0,0,0,0,109,111,118,101,32,116,111,32,102,114,111,110,116,32,108,111,99,107,32,105,110,99,111,110,115,105,115,116,101,110,99,121,0,0,0,0,0,0,0,0,47,114,100,98,117,55,47,49,0,0,0,0,0,0,0,0,99,111,110,115,116,114,97,105,110,116,0,0,0,0,0,0,108,97,98,101,108,116,97,114,103,101,116,
-0,0,0,0,0,47,114,100,98,117,54,47,54,0,0,0,0,0,0,0,0,116,97,112,101,114,101,100,0,47,114,100,98,117,54,47,53,0,0,0,0,0,0,0,0,105,110,0,0,0,0,0,0,32,37,100,44,37,100,0,0,47,114,100,98,117,54,47,52,0,0,0,0,0,0,0,0,47,98,114,98,103,52,47,49,0,0,0,0,0,0,0,0,47,114,100,98,117,54,47,51,0,0,0,0,0,0,0,0,47,114,100,98,117,54,47,50,0,0,0,0,0,0,0,0,47,114,100,98,117,54,47,49,0,0,0,0,0,0,0,0,47,114,100,98,117,53,47,53,0,0,0,0,0,0,0,0,32,32,32,60,83,67,82,73,80,84,32,76,65,78,71,85,65,71,69,61,39,74,97,118,97,
-115,99,114,105,112,116,39,62,10,0,0,0,0,0,0,47,114,100,98,117,53,47,52,0,0,0,0,0,0,0,0,47,114,100,98,117,53,47,51,0,0,0,0,0,0,0,0,32,32,32,32,32,32,32,100,117,112,32,49,32,101,120,99,104,32,100,105,118,32,47,73,110,118,83,99,97,108,101,70,97,99,116,111,114,32,101,120,99,104,32,100,101,102,0,0,97,97,99,117,116,101,0,0,37,108,102,44,37,108,102,0,109,105,110,116,99,114,101,97,109,0,0,0,0,0,0,0,47,114,100,98,117,53,47,50,0,0,0,0,0,0,0,0,97,114,114,111,119,115,105,122,101,0,0,0,0,0,0,0,101,100,103,101,
-116,97,114,103,101,116,0,0,0,0,0,0,47,114,100,98,117,53,47,49,0,0,0,0,0,0,0,0,47,114,100,98,117,52,47,52,0,0,0,0,0,0,0,0,47,114,100,98,117,52,47,51,0,0,0,0,0,0,0,0,47,98,114,98,103,51,47,51,0,0,0,0,0,0,0,0,106,117,110,107,32,97,102,116,101,114,32,100,111,99,117,109,101,110,116,32,101,108,101,109,101,110,116,0,0,0,0,0,0,1,2,3,4,5,6,7,8,8,9,9,10,10,11,11,12,12,12,12,13,13,13,13,14,14,14,14,15,15,15,15,16,16,16,16,16,16,16,16,17,17,17,17,17,17,17,17,18,18,18,18,18,18,18,18,19,19,19,19,19,19,19,19,20,
-20,20,20,20,20,20,20,20,20,20,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,27,27,27,27,27,27,27,27,
-27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28,0,1,2,3,4,4,5,5,6,6,6,6,7,7,7,7,8,8,8,8,8,8,8,8,9,9,9,9,9,9,9,9,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,
-14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,0,0,16,17,18,18,19,19,20,20,20,20,21,21,21,21,22,22,22,22,22,22,22,22,23,23,23,23,23,23,23,23,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,24,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,25,26,26,
-26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,
-29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,128,236,1,0,208,226,1,0,56,213,1,0,0,249,1,0,8,210,1,0,104,207,1,0,0,0,0,0,0,0,0,0,120,108,105,110,116,101,114,115,101,99,116,105,111,110,115,0,120,108,104,100,120,117,110,108,111,97,100,0,0,0,0,0,118,109,108,95,116,101,120,116,115,112,97,110,0,0,0,0,118,109,108,95,112,114,105,110,116,95,99,111,108,111,114,0,116,114,97,110,115,112,111,115,101,95,115,116,101,112,0,0,116,107,103,101,110,95,112,114,105,110,116,95,116,97,103,115,0,0,
-0,0,0,0,0,0,116,107,103,101,110,95,112,114,105,110,116,95,99,111,108,111,114,0,0,0,0,0,0,0,116,101,120,116,115,112,97,110,95,115,105,122,101,0,0,0,115,118,103,95,116,101,120,116,115,112,97,110,0,0,0,0,115,118,103,95,112,114,105,110,116,95,99,111,108,111,114,0,115,101,116,98,111,117,110,100,115,0,0,0,0,0,0,0,114,111,117,110,100,95,99,111,114,110,101,114,115,0,0,0,114,101,109,111,118,101,95,102,114,111,109,95,114,97,110,107,0,0,0,0,0,0,0,0,114,101,109,111,118,101,68,101,103,108,105,115,116,0,0,0,112,
-111,115,116,111,114,100,101,114,0,0,0,0,0,0,0,112,111,115,95,104,116,109,108,95,116,98,108,0,0,0,0,112,111,112,95,111,98,106,95,115,116,97,116,101,0,0,0,112,111,112,0,0,0,0,0,112,111,108,121,108,105,110,101,77,105,100,112,111,105,110,116,0,0,0,0,0,0,0,0,112,97,114,115,101,80,97,99,107,77,111,100,101,73,110,102,111,0,0,0,0,0,0,0,111,118,101,114,108,97,112,95,98,101,122,105,101,114,0,0,111,98,106,112,108,112,109,107,115,0,0,0,0,0,0,0,110,101,105,103,104,98,111,114,0,0,0,0,0,0,0,0,110,101,97,116,111,
-95,101,110,113,117,101,117,101,0,0,0,109,107,78,67,111,110,115,116,114,97,105,110,116,71,0,0,109,105,110,109,97,120,95,101,100,103,101,115,0,0,0,0,109,101,114,103,101,118,105,114,116,117,97,108,0,0,0,0,109,101,114,103,101,95,111,110,101,119,97,121,0,0,0,0,109,101,114,103,101,95,99,104,97,105,110,0,0,0,0,0,109,97,112,95,112,97,116,104,0,0,0,0,0,0,0,0,109,97,112,95,111,117,116,112,117,116,95,115,104,97,112,101,0,0,0,0,0,0,0,0,109,97,112,78,0,0,0,0,109,97,107,101,95,108,97,98,101,108,0,0,0,0,0,0,109,
-97,107,101,95,99,104,97,105,110,0,0,0,0,0,0,109,97,107,101,95,98,97,114,114,105,101,114,115,0,0,0,109,97,107,101,83,101,108,102,69,100,103,101,0,0,0,0,109,97,107,101,71,114,97,112,104,68,97,116,97,0,0,0,109,97,107,101,67,111,109,112,111,117,110,100,69,100,103,101,0,0,0,0,0,0,0,0,108,98,108,101,110,99,108,111,115,105,110,103,0,0,0,0,105,110,115,116,97,108,108,95,105,110,95,114,97,110,107,0,105,110,115,101,114,116,78,111,100,101,108,105,115,116,0,0,105,110,105,116,95,115,112,108,105,110,101,115,95,
-98,98,0,103,118,117,115,101,114,115,104,97,112,101,95,102,105,108,101,95,97,99,99,101,115,115,0,103,101,116,105,110,116,114,115,120,105,0,0,0,0,0,0,103,101,116,80,97,99,107,73,110,102,111,0,0,0,0,0,103,101,116,69,100,103,101,76,105,115,116,0,0,0,0,0,102,108,97,116,95,115,101,97,114,99,104,0,0,0,0,0,102,108,97,116,95,114,101,111,114,100,101,114,0,0,0,0,102,105,110,100,67,67,111,109,112,0,0,0,0,0,0,0,102,105,103,95,114,101,115,111,108,118,101,95,99,111,108,111,114,0,0,0,0,0,0,0,102,105,103,95,98,101,
-122,105,101,114,0,0,0,0,0,0,102,97,115,116,95,110,111,100,101,97,112,112,0,0,0,0,102,97,115,116,95,110,111,100,101,0,0,0,0,0,0,0,101,120,112,97,110,100,67,108,117,115,116,101,114,0,0,0,101,110,100,112,97,116,104,0,101,109,105,116,95,101,100,103,101,95,108,97,98,101,108,0,100,111,116,95,112,111,115,105,116,105,111,110,0,0,0,0,100,101,108,101,116,101,95,102,108,97,116,95,101,100,103,101,0,0,0,0,0,0,0,0,100,101,108,101,116,101,95,102,97,115,116,95,110,111,100,101,0,0,0,0,0,0,0,0,100,101,108,101,116,
-101,95,102,97,115,116,95,101,100,103,101,0,0,0,0,0,0,0,0,99,111,114,101,95,108,111,97,100,105,109,97,103,101,95,118,114,109,108,0,0,0,0,0,99,111,114,101,95,108,111,97,100,105,109,97,103,101,95,115,118,103,0,0,0,0,0,0,99,111,114,101,95,108,111,97,100,105,109,97,103,101,95,112,115,108,105,98,0,0,0,0,99,111,114,101,95,108,111,97,100,105,109,97,103,101,95,112,115,0,0,0,0,0,0,0,99,111,114,101,95,108,111,97,100,105,109,97,103,101,95,102,105,103,0,0,0,0,0,0,99,111,110,110,101,99,116,71,114,97,112,104,0,
-0,0,0,99,111,109,112,117,116,101,83,99,97,108,101,88,89,0,0,99,108,117,115,116,101,114,95,108,101,97,100,101,114,0,0,98,111,120,73,110,116,101,114,115,101,99,116,102,0,0,0,98,101,122,105,101,114,95,98,98,0,0,0,0,0,0,0,98,101,103,105,110,112,97,116,104,0,0,0,0,0,0,0,98,97,108,97,110,99,101,0,97,98,111,109,105,110,97,116,105,111,110,0,0,0,0,0,95,110,101,97,116,111,95,115,101,116,95,97,115,112,101,99,116,0,0,0,0,0,0,0,95,100,111,116,95,115,112,108,105,110,101,115,0,0,0,0,85,70,95,115,101,116,110,97,
-109,101,0,0,0,0,0,0,83,112,108,105,116,78,111,100,101,0,0,0,0,0,0,0,82,101,99,116,65,114,101,97,0,0,0,0,0,0,0,0,82,84,114,101,101,83,101,97,114,99,104,0,0,0,0,0,82,84,114,101,101,73,110,115,101,114,116,50,0,0,0,0,82,84,114,101,101,73,110,115,101,114,116,0,0,0,0,0,80,111,98,115,112,97,116,104,0,0,0,0,0,0,0,0,80,105,99,107,66,114,97,110,99,104,0,0,0,0,0,0,79,118,101,114,108,97,112,0,78,111,100,101,67,111,118,101,114,0,0,0,0,0,0,0,77,101,116,104,111,100,90,101,114,111,0,0,0,0,0,0,76,111,97,100,78,111,
-100,101,115,0,0,0,0,0,0,0,71,101,116,66,114,97,110,99,104,101,115,0,0,0,0,0,68,105,115,99,111,110,66,114,97,110,99,104,0,0,0,0,67,111,109,98,105,110,101,82,101,99,116,0,0,0,0,0,67,108,97,115,115,105,102,121,0,0,0,0,0,0,0,0,65,100,100,66,114,97,110,99,104,0,0,0,0,0,0,0,46,0,0,0,4,0,0,0,2,0,0,0,64,0,0,0,46,0,0,0,4,0,0,0,46,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,96,13,2,0,8,205,1,0,192,175,1,0,8,152,1,0,248,129,1,0,240,107,1,0,8,87,1,0,32,68,1,0,8,148,2,
-0,240,131,2,0,64,116,2,0,48,100,2,0,160,82,2,0,72,71,2,0,64,59,2,0,128,47,2,0,112,35,2,0,176,24,2,0,40,13,2,0,144,5,2,0,120,252,1,0,152,240,1,0,48,230,1,0,16,221,1,0,208,217,1,0,80,214,1,0,200,211,1,0,112,208,1,0,224,204,1,0,48,202,1,0,192,197,1,0,128,193,1,0,160,189,1,0,240,186,1,0,216,184,1,0,240,182,1,0,160,180,1,0,64,178,1,0,128,175,1,0,8,173,1,0,0,0,0,0,232,125,2,0,128,56,0,0,152,68,0,0,0,0,0,0,72,110,2,0,128,56,0,0,184,63,0,0,0,0,0,0,120,90,2,0,128,56,0,0,232,66,0,0,0,0,0,0,32,78,2,0,128,56,
-0,0,232,66,0,0,0,0,0,0,192,66,2,0,128,56,0,0,8,68,0,0,0,0,0,0,96,54,2,0,176,56,0,0,8,68,0,0,0,0,0,0,248,42,2,0,128,56,0,0,24,67,0,0,0,0,0,0,176,30,2,0,128,56,0,0,88,60,0,0,0,0,0,0,144,20,2,0,128,56,0,0,232,63,0,0,0,0,0,0,216,9,2,0,128,56,0,0,232,63,0,0,0,0,0,0,152,1,2,0,128,56,0,0,168,67,0,0,0,0,0,0,160,248,1,0,128,56,0,0,136,60,0,0,0,0,0,0,8,236,1,0,128,56,0,0,72,64,0,0,0,0,0,0,160,226,1,0,128,56,0,0,40,66,0,0,0,0,0,0,104,219,1,0,128,56,0,0,24,64,0,0,0,0,0,0,16,216,1,0,128,56,0,0,88,66,0,0,0,0,0,
-0,8,213,1,0,128,56,0,0,216,61,0,0,0,0,0,0,240,209,1,0,128,56,0,0,120,64,0,0,0,0,0,0,80,207,1,0,128,56,0,0,216,64,0,0,0,0,0,0,160,203,1,0,128,56,0,0,24,61,0,0,0,0,0,0,16,200,1,0,128,56,0,0,136,66,0,0,0,0,0,0,88,196,1,0,128,56,0,0,104,68,0,0,0,0,0,0,240,190,1,0,128,56,0,0,216,67,0,0,0,0,0,0,16,188,1,0,128,56,0,0,152,68,0,0,0,0,0,0,8,186,1,0,128,56,0,0,152,68,0,0,0,0,0,0,224,183,1,0,128,56,0,0,120,61,0,0,0,0,0,0,224,181,1,0,128,56,0,0,120,67,0,0,0,0,0,0,152,179,1,0,128,56,0,0,72,67,0,0,0,0,0,0,248,176,
-1,0,128,56,0,0,40,60,0,0,0,0,0,0,32,174,1,0,128,56,0,0,104,65,0,0,0,0,0,0,128,171,1,0,128,56,0,0,152,65,0,0,0,0,0,0,64,168,1,0,128,56,0,0,200,65,0,0,0,0,0,0,48,164,1,0,128,56,0,0,248,59,0,0,0,0,0,0,184,161,1,0,128,56,0,0,40,69,0,0,0,0,0,0,8,160,1,0,128,56,0,0,248,68,0,0,0,0,0,0,88,158,1,0,128,56,0,0,88,69,0,0,0,0,0,0,120,156,1,0,128,56,0,0,88,63,0,0,0,0,0,0,192,154,1,0,128,56,0,0,56,68,0,0,0,0,0,0,32,153,1,0,128,56,0,0,232,60,0,0,0,0,0,0,72,151,1,0,128,56,0,0,200,59,0,0,0,0,0,0,224,148,1,0,128,56,
-0,0,248,65,0,0,0,0,0,0,40,146,1,0,128,56,0,0,104,62,0,0,0,0,0,0,152,142,1,0,128,56,0,0,56,62,0,0,0,0,0,0,168,139,1,0,128,56,0,0,40,63,0,0,0,0,0,0,224,137,1,0,128,56,0,0,248,62,0,0,0,0,0,0,64,136,1,0,128,56,0,0,136,63,0,0,0,0,0,0,24,134,1,0,128,56,0,0,152,62,0,0,0,0,0,0,160,132,1,0,128,56,0,0,184,66,0,0,0,0,0,0,0,131,1,0,128,56,0,0,184,60,0,0,0,0,0,0,64,129,1,0,128,56,0,0,168,64,0,0,0,0,0,0,32,127,1,0,128,56,0,0,200,68,0,0,0,0,0,0,128,124,1,0,128,56,0,0,168,61,0,0,0,0,0,0,24,120,1,0,128,56,0,0,8,62,
-0,0,0,0,0,0,32,118,1,0,128,56,0,0,56,65,0,0,0,0,0,0,0,116,1,0,128,56,0,0,200,62,0,0,0,0,0,0,112,114,1,0,128,56,0,0,8,65,0,0,0,0,0,0,152,112,1,0,192,47,0,0,0,0,0,0,0,0,0,0,24,111,1,0,192,47,0,0,0,0,0,0,0,0,0,0,120,165,1,0,152,103,0,0,0,0,0,0,0,0,0,0,48,109,1,0,0,46,0,0,72,61,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,114,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,53,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
-0,0,0,0,0,0,0,0,44,0,0,0,0,0,0,0,114,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,62,0,0,0,0,0,0,0,114,0,0,0,0,0,0,0,0,0,0,0,240,235,1,0,72,108,2,0,208,245,1,0,0,0,0,0,107,101,121,0,0,0,0,0,121,101,115,0,0,0,0,0,118,101,114,115,105,111,110,0,115,116,97,110,100,97,108,111,110,101,0,0,0,0,0,0,110,111,0,0,0,0,0,0,101,110,99,111,100,105,110,103,0,0,0,0,0,0,0,0,85,84,70,45,56,0,0,0,85,84,70,45,49,54,76,69,0,0,0,0,0,0,0,0,85,84,70,45,49,54,66,69,0,0,0,0,0,0,0,0,85,84,70,45,49,54,0,0,85,
-83,45,65,83,67,73,73,0,0,0,0,0,0,0,0,83,89,83,84,69,77,0,0,82,69,81,85,73,82,69,68,0,0,0,0,0,0,0,0,80,85,66,76,73,67,0,0,80,67,68,65,84,65,0,0,78,79,84,65,84,73,79,78,0,0,0,0,0,0,0,0,78,77,84,79,75,69,78,83,0,0,0,0,0,0,0,0,78,77,84,79,75,69,78,0,78,68,65,84,65,0,0,0,73,83,79,45,56,56,53,57,45,49,0,0,0,0,0,0,73,77,80,76,73,69,68,0,73,68,82,69,70,83,0,0,73,68,82,69,70,0,0,0,73,68,0,0,0,0,0,0,70,73,88,69,68,0,0,0,69,78,84,73,84,89,0,0,69,78,84,73,84,73,69,83,0,0,0,0,0,0,0,0,69,77,80,84,89,0,0,0,69,76,
-69,77,69,78,84,0,68,79,67,84,89,80,69,0,67,68,65,84,65,0,0,0,65,84,84,76,73,83,84,0,65,78,89,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,112,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,24,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,4,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,48,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,4,0,0,0,0,0,0,0,14,0,0,0,118,
-0,0,0,110,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,112,157,2,0,0,0,0,0,120,157,2,0,0,0,0,0,128,157,2,0,0,0,0,0,136,157,2,0,0,0,0,0,8,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,95,65,71,95,100,97,116,97,100,105,99,116,0,0,0,0,0,0,0,0,0,0,0,0,95,65,71,95,112,101,110,100,105,110,103,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,240,191,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,10,0,0,0,0,0,0,0,2,0,0,0,0,
-0,0,0,0,0,0,0,0,0,240,63,14,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,224,63,16,0,0,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,2,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0,51,51,51,51,51,51,243,63,6,0,0,0,0,0,0,0,6,0,0,0,0,0,0,0,154,153,153,153,153,153,233,63,4,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,240,63,8,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,0,0,224,63,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,216,25,2,0,49,0,0,0,0,0,0,0,0,0,0,0,48,62,2,0,1,0,0,0,32,215,1,0,2,0,0,0,8,181,1,0,3,
-0,0,0,120,155,1,0,4,0,0,0,232,133,1,0,5,0,0,0,112,112,1,0,6,0,0,0,72,91,1,0,8,0,0,0,168,71,1,0,33,0,0,0,152,53,1,0,34,0,0,0,192,134,2,0,34,0,0,0,200,118,2,0,1,0,0,0,88,103,2,0,7,0,0,0,0,0,0,0,0,0,0,0,152,84,2,0,16,0,0,0,248,72,2,0,128,0,0,0,120,60,2,0,64,0,0,0,232,48,2,0,16,0,0,0,224,36,2,0,64,0,0,0,0,0,0,0,0,0,0,0,72,14,2,0,0,0,0,0,1,0,0,0,72,6,2,0,1,0,0,0,0,0,0,0,160,253,1,0,1,0,0,0,1,0,0,0,72,91,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,10,0,0,0,0,0,0,0,11,0,0,0,0,0,0,
-0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,0,0,0,98,0,0,0,0,0,0,0,114,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,0,0,0,0,26,0,0,0,0,0,0,0,114,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,80,0,0,0,0,0,0,0,114,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,22,0,0,0,0,0,0,0,114,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255],"i8",L,l.J+163880);D([54,0,0,0,0,0,0,0,114,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,0,0,0,0,0,0,0,0,0,0,0,22,
-0,0,0,0,0,0,0,114,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,54,0,0,0,0,0,0,0,114,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,118,0,0,0,28,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,108,0,0,0,48,0,0,0,0,0,0,0,150,0,0,0,92,0,0,0,22,0,0,0,122,0,0,0,48,0,0,0,114,0,0,0,84,0,0,0,0,0,0,0,152,168,2,0,192,168,2,0,176,168,2,0,0,0,0,0,112,43,2,0,0,0,0,0,8,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"i8",L,l.J+174124);var sa=l.qb(D(12,"i8",S),8);J(0==sa%8);e._memcpy=
-Za;e._memmove=bc;e._memset=cc;e._memcmp=rc;e._strlen=Aa;var g={ba:1,Ib:2,Uh:3,Ug:4,Ea:5,wd:6,rg:7,rh:8,H:9,Eg:10,lb:11,di:11,Ne:12,mc:13,Pg:14,Dh:15,mb:16,ud:17,Oe:18,Hb:19,oc:20,Sa:21,B:22,mh:23,Me:24,vd:25,ai:26,Qg:27,zh:28,nb:29,Rh:30,fh:31,Lh:32,Mg:33,qc:34,vh:42,Sg:43,Fg:44,Wg:45,Xg:46,Yg:47,eh:48,bi:49,ph:50,Vg:51,Kg:35,sh:37,wg:52,zg:53,ei:54,nh:55,Ag:56,Bg:57,Lg:35,Cg:59,Bh:60,qh:61,Yh:62,Ah:63,wh:64,xh:65,Qh:66,th:67,ug:68,Vh:69,Gg:70,Mh:71,hh:72,Ng:73,yg:74,Hh:76,xg:77,Ph:78,Zg:79,$g:80,
-dh:81,bh:82,ah:83,Ch:38,pc:39,ih:36,nc:40,Kb:95,Kh:96,Jg:104,oh:105,vg:97,Oh:91,Fh:88,yh:92,Sh:108,Ig:111,sg:98,Hg:103,lh:101,jh:100,Zh:110,Rg:112,Je:113,Ke:115,He:114,Ie:89,gh:90,Nh:93,Th:94,tg:99,kh:102,Le:106,Jb:107,$h:109,ci:87,Og:122,Wh:116,Gh:95,uh:123,Tg:84,Ih:75,Dg:125,Eh:131,Jh:130,Xh:86},Oa={"0":"Success",1:"Not super-user",2:"No such file or directory",3:"No such process",4:"Interrupted system call",5:"I/O error",6:"No such device or address",7:"Arg list too long",8:"Exec format error",
-9:"Bad file number",10:"No children",11:"No more processes",12:"Not enough core",13:"Permission denied",14:"Bad address",15:"Block device required",16:"Mount device busy",17:"File exists",18:"Cross-device link",19:"No such device",20:"Not a directory",21:"Is a directory",22:"Invalid argument",23:"Too many open files in system",24:"Too many open files",25:"Not a typewriter",26:"Text file busy",27:"File too large",28:"No space left on device",29:"Illegal seek",30:"Read only file system",31:"Too many links",
-32:"Broken pipe",33:"Math arg out of domain of func",34:"Math result not representable",35:"File locking deadlock error",36:"File or path name too long",37:"No record locks available",38:"Function not implemented",39:"Directory not empty",40:"Too many symbolic links",42:"No message of desired type",43:"Identifier removed",44:"Channel number out of range",45:"Level 2 not synchronized",46:"Level 3 halted",47:"Level 3 reset",48:"Link number out of range",49:"Protocol driver not attached",50:"No CSI structure available",
-51:"Level 2 halted",52:"Invalid exchange",53:"Invalid request descriptor",54:"Exchange full",55:"No anode",56:"Invalid request code",57:"Invalid slot",59:"Bad font file fmt",60:"Device not a stream",61:"No data (for no delay io)",62:"Timer expired",63:"Out of streams resources",64:"Machine is not on the network",65:"Package not installed",66:"The object is remote",67:"The link has been severed",68:"Advertise error",69:"Srmount error",70:"Communication error on send",71:"Protocol error",72:"Multihop attempted",
-73:"Cross mount point (not really error)",74:"Trying to read unreadable message",75:"Value too large for defined data type",76:"Given log. name not unique",77:"f.d. invalid for this operation",78:"Remote address changed",79:"Can   access a needed shared lib",80:"Accessing a corrupted shared lib",81:".lib section in a.out corrupted",82:"Attempting to link in too many libs",83:"Attempting to exec a shared library",84:"Illegal byte sequence",86:"Streams pipe error",87:"Too many users",88:"Socket operation on non-socket",
-89:"Destination address required",90:"Message too long",91:"Protocol wrong type for socket",92:"Protocol not available",93:"Unknown protocol",94:"Socket type not supported",95:"Not supported",96:"Protocol family not supported",97:"Address family not supported by protocol family",98:"Address already in use",99:"Address not available",100:"Network interface is not configured",101:"Network is unreachable",102:"Connection reset by network",103:"Connection aborted",104:"Connection reset by peer",105:"No buffer space available",
-106:"Socket is already connected",107:"Socket is not connected",108:"Can't send after socket shutdown",109:"Too many references",110:"Connection timed out",111:"Connection refused",112:"Host is down",113:"Host is unreachable",114:"Socket already connected",115:"Connection already in progress",116:"Stale file handle",122:"Quota exceeded",123:"No medium (in tape drive)",125:"Operation canceled",130:"Previous owner died",131:"State not recoverable"},Na=0,B={xe:function(a){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(a).slice(1)},
-Xc:function(a,b){for(var c=0,f=a.length-1;0<=f;f--){var d=a[f];"."===d?a.splice(f,1):".."===d?(a.splice(f,1),c++):c&&(a.splice(f,1),c--)}if(b)for(;c--;c)a.unshift("..");return a},normalize:function(a){var b="/"===a.charAt(0),c="/"===a.substr(-1),a=B.Xc(a.split("/").filter(function(a){return!!a}),!b).join("/");!a&&!b&&(a=".");a&&c&&(a+="/");return(b?"/":"")+a},dirname:function(a){var b=B.xe(a),a=b[0],b=b[1];if(!a&&!b)return".";b&&(b=b.substr(0,b.length-1));return a+b},wa:function(a){if("/"===a)return"/";
-var b=a.lastIndexOf("/");return-1===b?a:a.substr(b+1)},Fi:function(a){return B.xe(a)[3]},join:function(){var a=Array.prototype.slice.call(arguments,0);return B.normalize(a.join("/"))},V:function(a,b){return B.normalize(a+"/"+b)},eb:function(){for(var a="",b=G,c=arguments.length-1;-1<=c&&!b;c--){var f=0<=c?arguments[c]:d.Bc();"string"!==typeof f&&k(new TypeError("Arguments to path.resolve must be strings"));f&&(a=f+"/"+a,b="/"===f.charAt(0))}a=B.Xc(a.split("/").filter(function(a){return!!a}),!b).join("/");
-return(b?"/":"")+a||"."},te:function(a,b){function c(a){for(var b=0;b<a.length&&""===a[b];b++);for(var c=a.length-1;0<=c&&""===a[c];c--);return b>c?[]:a.slice(b,c-b+1)}for(var a=B.eb(a).substr(1),b=B.eb(b).substr(1),f=c(a.split("/")),d=c(b.split("/")),e=Math.min(f.length,d.length),h=e,j=0;j<e;j++)if(f[j]!==d[j]){h=j;break}e=[];for(j=h;j<f.length;j++)e.push("..");e=e.concat(d.slice(h));return e.join("/")}},Y={Be:[],ka:M(),tj:M(),se:function(a,b){Y.Be[a]={input:[],Oa:[],Bb:b};d.bd(a,Y.o)},o:{open:function(a){var b=
-Y.Be[a.k.Pa];b||k(new d.e(g.Hb));a.aa=b;a.seekable=G},close:function(a){a.aa.Oa.length&&a.aa.Bb.jc(a.aa,10)},P:function(a,b,c,f){(!a.aa||!a.aa.Bb.be)&&k(new d.e(g.wd));for(var e=0,i=0;i<f;i++){var h;try{h=a.aa.Bb.be(a.aa)}catch(j){k(new d.e(g.Ea))}h===p&&0===e&&k(new d.e(g.lb));if(h===r||h===p)break;e++;b[c+i]=h}e&&(a.k.timestamp=Date.now());return e},write:function(a,b,c,f){(!a.aa||!a.aa.Bb.jc)&&k(new d.e(g.wd));for(var e=0;e<f;e++)try{a.aa.Bb.jc(a.aa,b[c+e])}catch(i){k(new d.e(g.Ea))}f&&(a.k.timestamp=
-Date.now());return e}},nf:{be:function(a){if(!a.input.length){var b=r;if(ca){if(b=process.stdin.read(),!b){if(process.stdin._readableState&&process.stdin._readableState.ended)return r;return}}else"undefined"!=typeof window&&"function"==typeof window.prompt?(b=window.prompt("Input: "),b!==r&&(b+="\n")):"function"==typeof readline&&(b=readline(),b!==r&&(b+="\n"));if(!b)return r;a.input=V(b,q)}return a.input.shift()},jc:function(a,b){b===r||10===b?(e.print(a.Oa.join("")),a.Oa=[]):a.Oa.push(Y.De.ic(b))}},
-mf:{jc:function(a,b){b===r||10===b?(e.printErr(a.Oa.join("")),a.Oa=[]):a.Oa.push(Y.De.ic(b))}}},z={la:r,Ge:1,lc:2,rd:3,L:function(){return z.createNode(r,"/",16895,0)},createNode:function(a,b,c,f){(d.Df(c)||d.Ef(c))&&k(new d.e(g.ba));z.la||(z.la={dir:{k:{fa:z.n.fa,N:z.n.N,Wa:z.n.Wa,Y:z.n.Y,Y:z.n.Y,rename:z.n.rename,Ra:z.n.Ra,fb:z.n.fb,bb:z.n.bb,na:z.n.na},ma:{ga:z.o.ga}},file:{k:{fa:z.n.fa,N:z.n.N},ma:{ga:z.o.ga,P:z.o.P,write:z.o.write,rb:z.o.rb,xb:z.o.xb}},link:{k:{fa:z.n.fa,N:z.n.N,Qa:z.n.Qa},ma:{}},
-Hd:{k:{fa:z.n.fa,N:z.n.N},ma:d.Ze}});c=d.createNode(a,b,c,f);d.O(c.mode)?(c.n=z.la.dir.k,c.o=z.la.dir.ma,c.u={}):d.isFile(c.mode)?(c.n=z.la.file.k,c.o=z.la.file.ma,c.u=[],c.Qb=z.lc):d.Va(c.mode)?(c.n=z.la.link.k,c.o=z.la.link.ma):d.vb(c.mode)&&(c.n=z.la.Hd.k,c.o=z.la.Hd.ma);c.timestamp=Date.now();a&&(a.u[b]=c);return c},Ec:function(a){a.Qb!==z.lc&&(a.u=Array.prototype.slice.call(a.u),a.Qb=z.lc)},n:{fa:function(a){var b={};b.Cc=d.vb(a.mode)?a.id:1;b.ac=a.id;b.mode=a.mode;b.Wc=1;b.uid=0;b.Mc=0;b.Pa=
-a.Pa;b.size=d.O(a.mode)?4096:d.isFile(a.mode)?a.u.length:d.Va(a.mode)?a.link.length:0;b.wc=new Date(a.timestamp);b.Uc=new Date(a.timestamp);b.Ac=new Date(a.timestamp);b.Ha=4096;b.sb=Math.ceil(b.size/b.Ha);return b},N:function(a,b){b.mode!==p&&(a.mode=b.mode);b.timestamp!==p&&(a.timestamp=b.timestamp);if(b.size!==p){z.Ec(a);var c=a.u;if(b.size<c.length)c.length=b.size;else for(;b.size>c.length;)c.push(0)}},Wa:function(){k(d.Jc[g.Ib])},Y:function(a,b,c,d){return z.createNode(a,b,c,d)},rename:function(a,
-b,c){if(d.O(a.mode)){var f;try{f=d.ta(b,c)}catch(e){}if(f)for(var i in f.u)k(new d.e(g.pc))}delete a.parent.u[a.name];a.name=c;b.u[c]=a;a.parent=b},Ra:function(a,b){delete a.u[b]},fb:function(a,b){var c=d.ta(a,b),f;for(f in c.u)k(new d.e(g.pc));delete a.u[b]},bb:function(a){var b=[".",".."],c;for(c in a.u)a.u.hasOwnProperty(c)&&b.push(c);return b},na:function(a,b,c){a=z.createNode(a,b,41471,0);a.link=c;return a},Qa:function(a){d.Va(a.mode)||k(new d.e(g.B));return a.link}},o:{P:function(a,b,c,d,e){a=
-a.k.u;if(e>=a.length)return 0;d=Math.min(a.length-e,d);J(0<=d);if(8<d&&a.subarray)b.set(a.subarray(e,e+d),c);else for(var i=0;i<d;i++)b[c+i]=a[e+i];return d},write:function(a,b,c,d,e,i){var h=a.k;h.timestamp=Date.now();a=h.u;if(d&&0===a.length&&0===e&&b.subarray)return i&&0===c?(h.u=b,h.Qb=b.buffer===v.buffer?z.Ge:z.rd):(h.u=new Uint8Array(b.subarray(c,c+d)),h.Qb=z.rd),d;z.Ec(h);for(a=h.u;a.length<e;)a.push(0);for(i=0;i<d;i++)a[e+i]=b[c+i];return d},ga:function(a,b,c){1===c?b+=a.position:2===c&&d.isFile(a.k.mode)&&
-(b+=a.k.u.length);0>b&&k(new d.e(g.B));a.pd=[];return a.position=b},rb:function(a,b,c){z.Ec(a.k);a=a.k.u;for(b+=c;b>a.length;)a.push(0)},xb:function(a,b,c,f,e,i,h){d.isFile(a.k.mode)||k(new d.e(g.Hb));a=a.k.u;if(!(h&2)&&(a.buffer===b||a.buffer===b.buffer))e=G,f=a.byteOffset;else{if(0<e||e+f<a.length)a=a.subarray?a.subarray(e,e+f):Array.prototype.slice.call(a,e,e+f);e=q;(f=ia(f))||k(new d.e(g.Ne));b.set(a,f)}return{ej:f,si:e}}}},I={cc:G,nd:function(){I.cc=!!process.platform.match(/^win/)},L:function(a){J(ca);
-return I.createNode(r,"/",I.La(a.pe.root),0)},createNode:function(a,b,c){!d.O(c)&&(!d.isFile(c)&&!d.Va(c))&&k(new d.e(g.B));a=d.createNode(a,b,c);a.n=I.n;a.o=I.o;return a},La:function(a){var b;try{b=O.Lf(a),I.cc&&(b.mode|=(b.mode&146)>>1)}catch(c){c.code||k(c),k(new d.e(g[c.code]))}return b.mode},Z:function(a){for(var b=[];a.parent!==a;)b.push(a.name),a=a.parent;b.push(a.L.pe.root);b.reverse();return B.join.apply(r,b)},Vd:{"0":"r",1:"r+",2:"r+",64:"r",65:"r+",66:"r+",129:"rx+",193:"rx+",514:"w+",
-577:"w",578:"w+",705:"wx",706:"wx+",1024:"a",1025:"a",1026:"a+",1089:"a",1090:"a+",1153:"ax",1154:"ax+",1217:"ax",1218:"ax+",4096:"rs",4098:"rs+"},Hc:function(a){return a in I.Vd?I.Vd[a]:a},n:{fa:function(a){var a=I.Z(a),b;try{b=O.Lf(a)}catch(c){c.code||k(c),k(new d.e(g[c.code]))}I.cc&&!b.Ha&&(b.Ha=4096);I.cc&&!b.sb&&(b.sb=(b.size+b.Ha-1)/b.Ha|0);return{Cc:b.Cc,ac:b.ac,mode:b.mode,Wc:b.Wc,uid:b.uid,Mc:b.Mc,Pa:b.Pa,size:b.size,wc:b.wc,Uc:b.Uc,Ac:b.Ac,Ha:b.Ha,sb:b.sb}},N:function(a,b){var c=I.Z(a);
-try{b.mode!==p&&(O.xi(c,b.mode),a.mode=b.mode);if(b.timestamp!==p){var f=new Date(b.timestamp);O.Dj(c,f,f)}b.size!==p&&O.yj(c,b.size)}catch(e){e.code||k(e),k(new d.e(g[e.code]))}},Wa:function(a,b){var c=B.V(I.Z(a),b),c=I.La(c);return I.createNode(a,b,c)},Y:function(a,b,c,f){a=I.createNode(a,b,c,f);b=I.Z(a);try{d.O(a.mode)?O.Zi(b,a.mode):O.Gj(b,"",{mode:a.mode})}catch(e){e.code||k(e),k(new d.e(g[e.code]))}return a},rename:function(a,b,c){a=I.Z(a);b=B.V(I.Z(b),c);try{O.mj(a,b)}catch(f){f.code||k(f),
-k(new d.e(g[f.code]))}},Ra:function(a,b){var c=B.V(I.Z(a),b);try{O.Aj(c)}catch(f){f.code||k(f),k(new d.e(g[f.code]))}},fb:function(a,b){var c=B.V(I.Z(a),b);try{O.nj(c)}catch(f){f.code||k(f),k(new d.e(g[f.code]))}},bb:function(a){a=I.Z(a);try{return O.ij(a)}catch(b){b.code||k(b),k(new d.e(g[b.code]))}},na:function(a,b,c){a=B.V(I.Z(a),b);try{O.vj(c,a)}catch(f){f.code||k(f),k(new d.e(g[f.code]))}},Qa:function(a){a=I.Z(a);try{return O.jj(a)}catch(b){b.code||k(b),k(new d.e(g[b.code]))}}},o:{open:function(a){var b=
-I.Z(a.k);try{d.isFile(a.k.mode)&&(a.Ab=O.bj(b,I.Hc(a.I)))}catch(c){c.code||k(c),k(new d.e(g[c.code]))}},close:function(a){try{d.isFile(a.k.mode)&&a.Ab&&O.yi(a.Ab)}catch(b){b.code||k(b),k(new d.e(g[b.code]))}},P:function(a,b,c,f,e){var i=new Buffer(f),h;try{h=O.hj(a.Ab,i,0,f,e)}catch(j){k(new d.e(g[j.code]))}if(0<h)for(a=0;a<h;a++)b[c+a]=i[a];return h},write:function(a,b,c,f,e){var b=new Buffer(b.subarray(c,c+f)),i;try{i=O.Hj(a.Ab,b,0,f,e)}catch(h){k(new d.e(g[h.code]))}return i},ga:function(a,b,c){if(1===
-c)b+=a.position;else if(2===c&&d.isFile(a.k.mode))try{var f=O.Ji(a.Ab),b=b+f.size}catch(e){k(new d.e(g[e.code]))}0>b&&k(new d.e(g.B));return a.position=b}}};Ga=D(1,"i32*",S);ma=D(1,"i32*",S);Ha=D(1,"i32*",S);var d={root:r,gc:[],Pd:[r],jb:[r],Vf:1,Ca:r,Ld:"/",$b:G,ee:q,e:r,Jc:{},sa:function(a){a instanceof d.e||k(a+" : "+bb());return H(a.Vb)},F:function(a,b){a=B.eb(d.Bc(),a);b=b||{ad:0};8<b.ad&&k(new d.e(g.nc));for(var c=B.Xc(a.split("/").filter(function(a){return!!a}),G),f=d.root,e="/",i=0;i<c.length;i++){var h=
-i===c.length-1;if(h&&b.parent)break;f=d.ta(f,c[i]);e=B.V(e,c[i]);d.wb(f)&&(f=f.L.root);if(!h||b.T)for(h=0;d.Va(f.mode);)f=d.Qa(e),e=B.eb(B.dirname(e),f),f=d.F(e,{ad:b.ad}).k,40<h++&&k(new d.e(g.nc))}return{path:e,k:f}},Ba:function(a){for(var b;;){if(d.bc(a))return a=a.L.Sf,!b?a:"/"!==a[a.length-1]?a+"/"+b:a+b;b=b?a.name+"/"+b:a.name;a=a.parent}},Nc:function(a,b){for(var c=0,f=0;f<b.length;f++)c=(c<<5)-c+b.charCodeAt(f)|0;return(a+c>>>0)%d.Ca.length},ce:function(a){var b=d.Nc(a.parent.id,a.name);a.$a=
-d.Ca[b];d.Ca[b]=a},de:function(a){var b=d.Nc(a.parent.id,a.name);if(d.Ca[b]===a)d.Ca[b]=a.$a;else for(b=d.Ca[b];b;){if(b.$a===a){b.$a=a.$a;break}b=b.$a}},ta:function(a,b){var c=d.Nf(a);c&&k(new d.e(c));for(c=d.Ca[d.Nc(a.id,b)];c;c=c.$a){var f=c.name;if(c.parent.id===a.id&&f===b)return c}return d.Wa(a,b)},createNode:function(a,b,c,f){d.Lb||(d.Lb=function(a,b,c,f){this.id=d.Vf++;this.name=b;this.mode=c;this.n={};this.o={};this.Pa=f;this.L=this.parent=r;a||(a=this);this.parent=a;this.L=a.L;d.ce(this)},
-d.Lb.prototype={},Object.defineProperties(d.Lb.prototype,{P:{get:function(){return 365===(this.mode&365)},set:function(a){a?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146===(this.mode&146)},set:function(a){a?this.mode|=146:this.mode&=-147}},Pc:{get:function(){return d.O(this.mode)}},Oc:{get:function(){return d.vb(this.mode)}}}));return new d.Lb(a,b,c,f)},Od:function(a){d.de(a)},bc:function(a){return a===a.parent},wb:function(a){return a.Rf},isFile:function(a){return 32768===(a&
-61440)},O:function(a){return 16384===(a&61440)},Va:function(a){return 40960===(a&61440)},vb:function(a){return 8192===(a&61440)},Df:function(a){return 24576===(a&61440)},Ef:function(a){return 4096===(a&61440)},Hf:function(a){return 49152===(a&49152)},qf:{r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218},je:function(a){var b=d.qf[a];"undefined"===typeof b&&k(Error("Unknown file open mode: "+a));return b},Hc:function(a){var b=
-["r","w","rw"][a&2097155];a&512&&(b+="w");return b},Da:function(a,b){return d.ee?0:-1!==b.indexOf("r")&&!(a.mode&292)||-1!==b.indexOf("w")&&!(a.mode&146)||-1!==b.indexOf("x")&&!(a.mode&73)?g.mc:0},Nf:function(a){return d.Da(a,"x")},Tc:function(a,b){try{return d.ta(a,b),g.ud}catch(c){}return d.Da(a,"wx")},ec:function(a,b,c){var f;try{f=d.ta(a,b)}catch(e){return e.Vb}if(a=d.Da(a,"wx"))return a;if(c){if(!d.O(f.mode))return g.oc;if(d.bc(f)||d.Ba(f)===d.Bc())return g.mb}else if(d.O(f.mode))return g.Sa;
-return 0},Of:function(a,b){return!a?g.Ib:d.Va(a.mode)?g.nc:d.O(a.mode)&&(0!==(b&2097155)||b&512)?g.Sa:d.Da(a,d.Hc(b))},Se:4096,Wf:function(a,b){for(var b=b||d.Se,c=a||1;c<=b;c++)if(!d.jb[c])return c;k(new d.e(g.Me))},D:function(a){return d.jb[a]},Jd:function(a,b,c){d.ob||(d.ob=M(),d.ob.prototype={},Object.defineProperties(d.ob.prototype,{object:{get:function(){return this.k},set:function(a){this.k=a}},Ri:{get:function(){return 1!==(this.I&2097155)}},Si:{get:function(){return 0!==(this.I&2097155)}},
-Qi:{get:function(){return this.I&1024}}}));if(a.__proto__)a.__proto__=d.ob.prototype;else{var f=new d.ob,e;for(e in a)f[e]=a[e];a=f}b=d.Wf(b,c);a.da=b;return d.jb[b]=a},$e:function(a){d.jb[a]=r},Ze:{open:function(a){a.o=d.tf(a.k.Pa).o;a.o.open&&a.o.open(a)},ga:function(){k(new d.e(g.nb))}},Sc:function(a){return a>>8},Yi:function(a){return a&255},Na:function(a,b){return a<<8|b},bd:function(a,b){d.Pd[a]={o:b}},tf:function(a){return d.Pd[a]},Ae:function(a,b){function c(a){if(a)return b(a);++f>=e&&b(r)}
-"function"===typeof a&&(b=a,a=G);for(var f=0,e=d.gc.length,i=0;i<d.gc.length;i++){var h=d.gc[i];h.type.Ae?h.type.Ae(h,a,c):c(r)}},L:function(a,b,c){var f;c&&(f=d.F(c,{T:G}),c=f.path);b={type:a,pe:b,Sf:c,root:r};a=a.L(b);a.L=b;b.root=a;f&&(f.k.L=b,f.k.Rf=q,"/"===c&&(d.root=b.root));d.gc.push(b);return a},Wa:function(a,b){return a.n.Wa(a,b)},Y:function(a,b,c){var f=d.F(a,{parent:q}).k,a=B.wa(a),e=d.Tc(f,a);e&&k(new d.e(e));f.n.Y||k(new d.e(g.ba));return f.n.Y(f,a,b,c)},create:function(a,b){b=(b!==p?
-b:438)&4095;b|=32768;return d.Y(a,b,0)},Xa:function(a,b){b=(b!==p?b:511)&1023;b|=16384;return d.Y(a,b,0)},fc:function(a,b,c){"undefined"===typeof c&&(c=b,b=438);return d.Y(a,b|8192,c)},na:function(a,b){var c=d.F(b,{parent:q}).k,f=B.wa(b),e=d.Tc(c,f);e&&k(new d.e(e));c.n.na||k(new d.e(g.ba));return c.n.na(c,f,a)},rename:function(a,b){var c=B.dirname(a),f=B.dirname(b),e=B.wa(a),i=B.wa(b),h,j,l;try{h=d.F(a,{parent:q}),j=h.k,h=d.F(b,{parent:q}),l=h.k}catch(x){k(new d.e(g.mb))}j.L!==l.L&&k(new d.e(g.Oe));
-h=d.ta(j,e);f=B.te(a,f);"."!==f.charAt(0)&&k(new d.e(g.B));f=B.te(b,c);"."!==f.charAt(0)&&k(new d.e(g.pc));var m;try{m=d.ta(l,i)}catch(s){}if(h!==m){c=d.O(h.mode);(e=d.ec(j,e,c))&&k(new d.e(e));(e=m?d.ec(l,i,c):d.Tc(l,i))&&k(new d.e(e));j.n.rename||k(new d.e(g.ba));(d.wb(h)||m&&d.wb(m))&&k(new d.e(g.mb));l!==j&&(e=d.Da(j,"w"))&&k(new d.e(e));d.de(h);try{j.n.rename(h,l,i)}catch(y){k(y)}finally{d.ce(h)}}},fb:function(a){var b=d.F(a,{parent:q}).k,a=B.wa(a),c=d.ta(b,a),f=d.ec(b,a,q);f&&k(new d.e(f));
-b.n.fb||k(new d.e(g.ba));d.wb(c)&&k(new d.e(g.mb));b.n.fb(b,a);d.Od(c)},bb:function(a){a=d.F(a,{T:q}).k;a.n.bb||k(new d.e(g.oc));return a.n.bb(a)},Ra:function(a){var b=d.F(a,{parent:q}).k,a=B.wa(a),c=d.ta(b,a),f=d.ec(b,a,G);f&&(f===g.Sa&&(f=g.ba),k(new d.e(f)));b.n.Ra||k(new d.e(g.ba));d.wb(c)&&k(new d.e(g.mb));b.n.Ra(b,a);d.Od(c)},Qa:function(a){a=d.F(a,{T:G}).k;a.n.Qa||k(new d.e(g.B));return a.n.Qa(a)},ld:function(a,b){var c=d.F(a,{T:!b}).k;c.n.fa||k(new d.e(g.ba));return c.n.fa(c)},Kf:function(a){return d.ld(a,
-q)},Nb:function(a,b,c){a="string"===typeof a?d.F(a,{T:!c}).k:a;a.n.N||k(new d.e(g.ba));a.n.N(a,{mode:b&4095|a.mode&-4096,timestamp:Date.now()})},Ui:function(a,b){d.Nb(a,b,q)},Gi:function(a,b){var c=d.D(a);c||k(new d.e(g.H));d.Nb(c.k,b)},Gd:function(a,b,c,f){a="string"===typeof a?d.F(a,{T:!f}).k:a;a.n.N||k(new d.e(g.ba));a.n.N(a,{timestamp:Date.now()})},Vi:function(a,b,c){d.Gd(a,b,c,q)},Hi:function(a,b,c){(a=d.D(a))||k(new d.e(g.H));d.Gd(a.k,b,c)},truncate:function(a,b){0>b&&k(new d.e(g.B));var c;
-c="string"===typeof a?d.F(a,{T:q}).k:a;c.n.N||k(new d.e(g.ba));d.O(c.mode)&&k(new d.e(g.Sa));d.isFile(c.mode)||k(new d.e(g.B));var f=d.Da(c,"w");f&&k(new d.e(f));c.n.N(c,{size:b,timestamp:Date.now()})},Ki:function(a,b){var c=d.D(a);c||k(new d.e(g.H));0===(c.I&2097155)&&k(new d.e(g.B));d.truncate(c.k,b)},Cj:function(a,b,c){a=d.F(a,{T:q}).k;a.n.N(a,{timestamp:Math.max(b,c)})},open:function(a,b,c,f,W){var b="string"===typeof b?d.je(b):b,c=b&64?("undefined"===typeof c?438:c)&4095|32768:0,i;if("object"===
-typeof a)i=a;else{a=B.normalize(a);try{i=d.F(a,{T:!(b&131072)}).k}catch(h){}}b&64&&(i?b&128&&k(new d.e(g.ud)):i=d.Y(a,c,0));i||k(new d.e(g.Ib));d.vb(i.mode)&&(b&=-513);(c=d.Of(i,b))&&k(new d.e(c));b&512&&d.truncate(i,0);b&=-641;f=d.Jd({k:i,path:d.Ba(i),I:b,seekable:q,position:0,o:i.o,pd:[],error:G},f,W);f.o.open&&f.o.open(f);e.logReadFiles&&!(b&1)&&(d.$c||(d.$c={}),a in d.$c||(d.$c[a]=1,e.printErr("read file: "+a)));return f},close:function(a){try{a.o.close&&a.o.close(a)}catch(b){k(b)}finally{d.$e(a.da)}},
-ga:function(a,b,c){(!a.seekable||!a.o.ga)&&k(new d.e(g.nb));return a.o.ga(a,b,c)},P:function(a,b,c,f,e){(0>f||0>e)&&k(new d.e(g.B));1===(a.I&2097155)&&k(new d.e(g.H));d.O(a.k.mode)&&k(new d.e(g.Sa));a.o.P||k(new d.e(g.B));var i=q;"undefined"===typeof e?(e=a.position,i=G):a.seekable||k(new d.e(g.nb));b=a.o.P(a,b,c,f,e);i||(a.position+=b);return b},write:function(a,b,c,f,e,i){(0>f||0>e)&&k(new d.e(g.B));0===(a.I&2097155)&&k(new d.e(g.H));d.O(a.k.mode)&&k(new d.e(g.Sa));a.o.write||k(new d.e(g.B));var h=
-q;"undefined"===typeof e?(e=a.position,h=G):a.seekable||k(new d.e(g.nb));a.I&1024&&d.ga(a,0,2);b=a.o.write(a,b,c,f,e,i);h||(a.position+=b);return b},rb:function(a,b,c){(0>b||0>=c)&&k(new d.e(g.B));0===(a.I&2097155)&&k(new d.e(g.H));!d.isFile(a.k.mode)&&!d.O(node.mode)&&k(new d.e(g.Hb));a.o.rb||k(new d.e(g.Kb));a.o.rb(a,b,c)},xb:function(a,b,c,f,e,i,h){1===(a.I&2097155)&&k(new d.e(g.mc));a.o.xb||k(new d.e(g.Hb));return a.o.xb(a,b,c,f,e,i,h)},ub:function(a,b,c){a.o.ub||k(new d.e(g.vd));return a.o.ub(a,
-b,c)},gj:function(a,b){b=b||{};b.I=b.I||"r";b.encoding=b.encoding||"binary";var c,f=d.open(a,b.I),e=d.ld(a).size,i=new Uint8Array(e);d.P(f,i,0,e,0);if("utf8"===b.encoding){c="";for(var h=new l.pb,g=0;g<e;g++)c+=h.ic(i[g])}else"binary"===b.encoding?c=i:k(Error('Invalid encoding type "'+b.encoding+'"'));d.close(f);return c},Fj:function(a,b,c){c=c||{};c.I=c.I||"w";c.encoding=c.encoding||"utf8";a=d.open(a,c.I,c.mode);"utf8"===c.encoding?(b=new Uint8Array((new l.pb).re(b)),d.write(a,b,0,b.length,0)):"binary"===
-c.encoding?d.write(a,b,0,b.length,0):k(Error('Invalid encoding type "'+c.encoding+'"'));d.close(a)},Bc:function(){return d.Ld},wi:function(a){a=d.F(a,{T:q});d.O(a.k.mode)||k(new d.e(g.oc));var b=d.Da(a.k,"x");b&&k(new d.e(b));d.Ld=a.path},bf:function(){d.Xa("/tmp")},af:function(){d.Xa("/dev");d.bd(d.Na(1,3),{P:function(){return 0},write:function(){return 0}});d.fc("/dev/null",d.Na(1,3));Y.se(d.Na(5,0),Y.nf);Y.se(d.Na(6,0),Y.mf);d.fc("/dev/tty",d.Na(5,0));d.fc("/dev/tty1",d.Na(6,0));d.Xa("/dev/shm");
-d.Xa("/dev/shm/tmp")},kf:function(){e.stdin?d.Ia("/dev","stdin",e.stdin):d.na("/dev/tty","/dev/stdin");e.stdout?d.Ia("/dev","stdout",r,e.stdout):d.na("/dev/tty","/dev/stdout");e.stderr?d.Ia("/dev","stderr",r,e.stderr):d.na("/dev/tty1","/dev/stderr");var a=d.open("/dev/stdin","r");t[Ga>>2]=a.da;J(1===a.da,"invalid handle for stdin ("+a.da+")");a=d.open("/dev/stdout","w");t[ma>>2]=a.da;J(2===a.da,"invalid handle for stdout ("+a.da+")");a=d.open("/dev/stderr","w");t[Ha>>2]=a.da;J(3===a.da,"invalid handle for stderr ("+
-a.da+")")},Rd:function(){d.e||(d.e=function(a){this.Vb=a;for(var b in g)if(g[b]===a){this.code=b;break}this.message=Oa[a]},d.e.prototype=Error(),[g.Ib].forEach(function(a){d.Jc[a]=new d.e(a);d.Jc[a].stack="<generic error, no stack>"}))},nd:function(){d.Rd();d.Ca=Array(4096);d.root=d.createNode(r,"/",16895,0);d.L(z,{},"/");d.bf();d.af()},ka:function(a,b,c){J(!d.ka.$b,"FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)");
-d.ka.$b=q;d.Rd();e.stdin=a||e.stdin;e.stdout=b||e.stdout;e.stderr=c||e.stderr;d.kf()},bg:function(){d.ka.$b=G;for(var a=0;a<d.jb.length;a++){var b=d.jb[a];b&&d.close(b)}},La:function(a,b){var c=0;a&&(c|=365);b&&(c|=146);return c},Ti:function(a,b){var c=B.join.apply(r,a);b&&"/"==c[0]&&(c=c.substr(1));return c},li:function(a,b){return B.eb(b,a)},uj:function(a){return B.normalize(a)},Ud:function(a,b){var c=d.tc(a,b);if(c.Fc)return c.object;H(c.error);return r},tc:function(a,b){try{var c=d.F(a,{T:!b}),
-a=c.path}catch(f){}var e={bc:G,Fc:G,error:0,name:r,path:r,object:r,Zf:G,ag:r,$f:r};try{c=d.F(a,{parent:q}),e.Zf=q,e.ag=c.path,e.$f=c.k,e.name=B.wa(a),c=d.F(a,{T:!b}),e.Fc=q,e.path=c.path,e.object=c.k,e.name=c.k.name,e.bc="/"===c.path}catch(i){e.error=i.Vb}return e},df:function(a,b,c,f){a=B.V("string"===typeof a?a:d.Ba(a),b);c=d.La(c,f);return d.Xa(a,c)},gf:function(a,b){for(var a="string"===typeof a?a:d.Ba(a),c=b.split("/").reverse();c.length;){var f=c.pop();if(f){var e=B.V(a,f);try{d.Xa(e)}catch(i){}a=
-e}}return e},cf:function(a,b,c,f,e){a=B.V("string"===typeof a?a:d.Ba(a),b);f=d.La(f,e);return d.create(a,f)},zc:function(a,b,c,f,e,i){a=b?B.V("string"===typeof a?a:d.Ba(a),b):a;f=d.La(f,e);e=d.create(a,f);if(c){if("string"===typeof c){for(var a=Array(c.length),b=0,h=c.length;b<h;++b)a[b]=c.charCodeAt(b);c=a}d.Nb(e,f|146);a=d.open(e,"w");d.write(a,c,0,c.length,0,i);d.close(a);d.Nb(e,f)}return e},Ia:function(a,b,c,f){a=B.V("string"===typeof a?a:d.Ba(a),b);b=d.La(!!c,!!f);d.Ia.Sc||(d.Ia.Sc=64);var e=
-d.Na(d.Ia.Sc++,0);d.bd(e,{open:function(a){a.seekable=G},close:function(){f&&(f.buffer&&f.buffer.length)&&f(10)},P:function(a,b,f,e){for(var W=0,m=0;m<e;m++){var s;try{s=c()}catch(y){k(new d.e(g.Ea))}s===p&&0===W&&k(new d.e(g.lb));if(s===r||s===p)break;W++;b[f+m]=s}W&&(a.k.timestamp=Date.now());return W},write:function(a,b,c,e){for(var W=0;W<e;W++)try{f(b[c+W])}catch(m){k(new d.e(g.Ea))}e&&(a.k.timestamp=Date.now());return W}});return d.fc(a,b,e)},ff:function(a,b,c){a=B.V("string"===typeof a?a:d.Ba(a),
-b);return d.na(c,a)},Yd:function(a){if(a.Oc||a.Pc||a.link||a.u)return q;var b=q;"undefined"!==typeof XMLHttpRequest&&k(Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread."));if(e.read)try{a.u=V(e.read(a.url),q)}catch(c){b=G}else k(Error("Cannot load without read() or XMLHttpRequest."));b||H(g.Ea);return b},ef:function(a,b,c,f,e){if("undefined"!==typeof XMLHttpRequest){Xa||
-k("Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc");var i=function(){this.Rc=G;this.Pb=[]};i.prototype.get=function(a){if(!(a>this.length-1||0>a)){var b=a%this.Ob;return this.xf(Math.floor(a/this.Ob))[b]}};i.prototype.kg=function(a){this.xf=a};i.prototype.Ed=function(){var a=new XMLHttpRequest;a.open("HEAD",c,G);a.send(r);200<=a.status&&300>a.status||304===a.status||k(Error("Couldn't load "+c+". Status: "+a.status));var b=Number(a.getResponseHeader("Content-length")),
-d,f=1048576;if(!((d=a.getResponseHeader("Accept-Ranges"))&&"bytes"===d))f=b;var e=this;e.kg(function(a){var d=a*f,i=(a+1)*f-1,i=Math.min(i,b-1);if("undefined"===typeof e.Pb[a]){var h=e.Pb;d>i&&k(Error("invalid range ("+d+", "+i+") or no bytes requested!"));i>b-1&&k(Error("only "+b+" bytes available! programmer error!"));var g=new XMLHttpRequest;g.open("GET",c,G);b!==f&&g.setRequestHeader("Range","bytes="+d+"-"+i);"undefined"!=typeof Uint8Array&&(g.responseType="arraybuffer");g.overrideMimeType&&g.overrideMimeType("text/plain; charset=x-user-defined");
-g.send(r);200<=g.status&&300>g.status||304===g.status||k(Error("Couldn't load "+c+". Status: "+g.status));d=g.response!==p?new Uint8Array(g.response||[]):V(g.responseText||"",q);h[a]=d}"undefined"===typeof e.Pb[a]&&k(Error("doXHR failed!"));return e.Pb[a]});this.Ve=b;this.Ue=f;this.Rc=q};i=new i;Object.defineProperty(i,"length",{get:function(){this.Rc||this.Ed();return this.Ve}});Object.defineProperty(i,"chunkSize",{get:function(){this.Rc||this.Ed();return this.Ue}});i={Oc:G,u:i}}else i={Oc:G,url:c};
-var h=d.cf(a,b,i,f,e);i.u?h.u=i.u:i.url&&(h.u=r,h.url=i.url);var j={};Object.keys(h.o).forEach(function(a){var b=h.o[a];j[a]=function(){d.Yd(h)||k(new d.e(g.Ea));return b.apply(r,arguments)}});j.P=function(a,b,c,f,e){d.Yd(h)||k(new d.e(g.Ea));a=a.k.u;if(e>=a.length)return 0;f=Math.min(a.length-e,f);J(0<=f);if(a.slice)for(var A=0;A<f;A++)b[c+A]=a[e+A];else for(A=0;A<f;A++)b[c+A]=a.get(e+A);return f};h.o=j;return h},hf:function(a,b,c,f,g,i,h,j,l){function x(c){function y(c){j||d.zc(a,b,c,f,g,l);i&&
-i();Ma()}var A=G;e.preloadPlugins.forEach(function(a){!A&&a.canHandle(m)&&(a.handle(c,m,y,function(){h&&h();Ma()}),A=q)});A||y(c)}n.ka();var m=b?B.eb(B.V(a,b)):a;db();"string"==typeof c?n.Xe(c,function(a){x(a)},h):x(c)},indexedDB:function(){return window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB},sd:function(){return"EM_FS_"+window.location.pathname},td:20,kb:"FILE_DATA",sj:function(a,b,c){var b=b||M(),c=c||M(),f=d.indexedDB();try{var e=f.open(d.sd(),d.td)}catch(i){return c(i)}e.Yf=
-function(){console.log("creating db");e.result.createObjectStore(d.kb)};e.onsuccess=function(){var f=e.result.transaction([d.kb],"readwrite"),i=f.objectStore(d.kb),g=0,l=0,m=a.length;a.forEach(function(a){a=i.put(d.tc(a).object.u,a);a.onsuccess=function(){g++;g+l==m&&(0==l?b():c())};a.onerror=function(){l++;g+l==m&&(0==l?b():c())}});f.onerror=c};e.onerror=c},Xi:function(a,b,c){var b=b||M(),c=c||M(),f=d.indexedDB();try{var e=f.open(d.sd(),d.td)}catch(i){return c(i)}e.Yf=c;e.onsuccess=function(){var f=
-e.result;try{var i=f.transaction([d.kb],"readonly")}catch(g){c(g);return}var l=i.objectStore(d.kb),m=0,n=0,y=a.length;a.forEach(function(a){var f=l.get(a);f.onsuccess=function(){d.tc(a).Fc&&d.Ra(a);d.zc(B.dirname(a),B.wa(a),f.result,q,q,q);m++;m+n==y&&(0==n?b():c())};f.onerror=function(){n++;m+n==y&&(0==n?b():c())}});i.onerror=c};e.onerror=c}},K={L:function(){return d.createNode(r,"/",16895,0)},jf:function(a,b,c){c&&J(1==b==(6==c));a={pf:a,type:b,protocol:c,M:r,Cb:{},Yc:[],cb:[],hb:K.S};b=K.hc();
-c=d.createNode(K.root,b,49152,0);c.gb=a;b=d.Jd({path:b,k:c,I:d.je("r+"),seekable:G,o:K.o});a.ma=b;return a},ae:function(a){a=d.D(a);return!a||!d.Hf(a.k.mode)?r:a.k.gb},o:{qe:function(a){a=a.k.gb;return a.hb.qe(a)},ub:function(a,b,c){a=a.k.gb;return a.hb.ub(a,b,c)},P:function(a,b,c,d){a=a.k.gb;d=a.hb.dg(a,d);if(!d)return 0;b.set(d.buffer,c);return d.buffer.length},write:function(a,b,c,d){a=a.k.gb;return a.hb.ig(a,b,c,d)},close:function(a){a=a.k.gb;a.hb.close(a)}},hc:function(){K.hc.Kd||(K.hc.Kd=0);
-return"socket["+K.hc.Kd++ +"]"},S:{Rb:function(a,b,c){var f;"object"===typeof b&&(f=b,c=b=r);if(f)f._socket?(b=f._socket.remoteAddress,c=f._socket.remotePort):((c=/ws[s]?:\/\/([^:]+):(\d+)/.exec(f.url))||k(Error("WebSocket URL must be in the format ws(s)://address:port")),b=c[1],c=parseInt(c[2],10));else try{var e=ca?{headers:{"websocket-protocol":["binary"]}}:["binary"];f=new (ca?require("ws"):window.WebSocket)("ws://"+b+":"+c,e);f.binaryType="arraybuffer"}catch(i){k(new d.e(g.Je))}b={oa:b,port:c,
-q:f,Sb:[]};K.S.Dd(a,b);K.S.Af(a,b);2===a.type&&"undefined"!==typeof a.ib&&b.Sb.push(new Uint8Array([255,255,255,255,112,111,114,116,(a.ib&65280)>>8,a.ib&255]));return b},Xb:function(a,b,c){return a.Cb[b+":"+c]},Dd:function(a,b){a.Cb[b.oa+":"+b.port]=b},ue:function(a,b){delete a.Cb[b.oa+":"+b.port]},Af:function(a,b){function c(){try{for(var a=b.Sb.shift();a;)b.q.send(a),a=b.Sb.shift()}catch(c){b.q.close()}}function d(c){J("string"!==typeof c&&c.byteLength!==p);var c=new Uint8Array(c),f=e;e=G;f&&10===
-c.length&&255===c[0]&&255===c[1]&&255===c[2]&&255===c[3]&&112===c[4]&&111===c[5]&&114===c[6]&&116===c[7]?(c=c[8]<<8|c[9],K.S.ue(a,b),b.port=c,K.S.Dd(a,b)):a.cb.push({oa:b.oa,port:b.port,data:c})}var e=q;ca?(b.q.on("open",c),b.q.on("message",function(a,b){b.binary&&d((new Uint8Array(a)).buffer)}),b.q.on("error",M())):(b.q.onopen=c,b.q.onmessage=function(a){d(a.data)})},qe:function(a){if(1===a.type&&a.M)return a.Yc.length?65:0;var b=0,c=1===a.type?K.S.Xb(a,a.pa,a.qa):r;if(a.cb.length||!c||c&&c.q.readyState===
-c.q.Gb||c&&c.q.readyState===c.q.CLOSED)b|=65;if(!c||c&&c.q.readyState===c.q.OPEN)b|=4;if(c&&c.q.readyState===c.q.Gb||c&&c.q.readyState===c.q.CLOSED)b|=16;return b},ub:function(a,b,c){switch(b){case 21531:return b=0,a.cb.length&&(b=a.cb[0].data.length),t[c>>2]=b,0;default:return g.B}},close:function(a){if(a.M){try{a.M.close()}catch(b){}a.M=r}for(var c=Object.keys(a.Cb),d=0;d<c.length;d++){var e=a.Cb[c[d]];try{e.q.close()}catch(g){}K.S.ue(a,e)}return 0},bind:function(a,b,c){("undefined"!==typeof a.ed||
-"undefined"!==typeof a.ib)&&k(new d.e(g.B));a.ed=b;a.ib=c||p();if(2===a.type){a.M&&(a.M.close(),a.M=r);try{a.hb.Jf(a,0)}catch(f){f instanceof d.e||k(f),f.Vb!==g.Kb&&k(f)}}},zi:function(a,b,c){a.M&&k(new d.e(ERRNO_CODS.Kb));if("undefined"!==typeof a.pa&&"undefined"!==typeof a.qa){var f=K.S.Xb(a,a.pa,a.qa);f&&(f.q.readyState===f.q.CONNECTING&&k(new d.e(g.He)),k(new d.e(g.Le)))}b=K.S.Rb(a,b,c);a.pa=b.oa;a.qa=b.port;k(new d.e(g.Ke))},Jf:function(a){ca||k(new d.e(g.Kb));a.M&&k(new d.e(g.B));var b=require("ws").Server;
-a.M=new b({host:a.ed,port:a.ib});a.M.on("connection",function(b){if(1===a.type){var d=K.jf(a.pf,a.type,a.protocol),b=K.S.Rb(d,b);d.pa=b.oa;d.qa=b.port;a.Yc.push(d)}else K.S.Rb(a,b)});a.M.on("closed",function(){a.M=r});a.M.on("error",M())},accept:function(a){a.M||k(new d.e(g.B));var b=a.Yc.shift();b.ma.I=a.ma.I;return b},Oi:function(a,b){var c,f;b?((a.pa===p||a.qa===p)&&k(new d.e(g.Jb)),c=a.pa,f=a.qa):(c=a.ed||0,f=a.ib||0);return{oa:c,port:f}},ig:function(a,b,c,f,e,i){if(2===a.type){if(e===p||i===
-p)e=a.pa,i=a.qa;(e===p||i===p)&&k(new d.e(g.Ie))}else e=a.pa,i=a.qa;var h=K.S.Xb(a,e,i);1===a.type&&((!h||h.q.readyState===h.q.Gb||h.q.readyState===h.q.CLOSED)&&k(new d.e(g.Jb)),h.q.readyState===h.q.CONNECTING&&k(new d.e(g.lb)));b=b instanceof Array||b instanceof ArrayBuffer?b.slice(c,c+f):b.buffer.slice(b.byteOffset+c,b.byteOffset+c+f);if(2===a.type&&(!h||h.q.readyState!==h.q.OPEN)){if(!h||h.q.readyState===h.q.Gb||h.q.readyState===h.q.CLOSED)h=K.S.Rb(a,e,i);h.Sb.push(b);return f}try{return h.q.send(b),
-f}catch(j){k(new d.e(g.B))}},dg:function(a,b){1===a.type&&a.M&&k(new d.e(g.Jb));var c=a.cb.shift();if(!c){if(1===a.type){var f=K.S.Xb(a,a.pa,a.qa);if(f){if(f.q.readyState===f.q.Gb||f.q.readyState===f.q.CLOSED)return r;k(new d.e(g.lb))}k(new d.e(g.Jb))}k(new d.e(g.lb))}var f=c.data.byteLength||c.data.length,e=c.data.byteOffset||0,i=c.data.buffer||c.data,h=Math.min(b,f),j={buffer:new Uint8Array(i,e,h),oa:c.oa,port:c.port};1===a.type&&h<f&&(c.data=new Uint8Array(i,e+h,f-h),a.cb.unshift(c));return j}}},
-sc=ac;e._tolower=tc;var uc=ic,vc=jc,wc=kc,xc=oc,yc=nc,zc=Ia;e._strcpy=Ac;var dc=0;e._strcat=Bc;var Cc=lc,Dc=ua,Hb=D(1,"i32*",S),U={};e._saveSetjmp=Ec;e._testSetjmp=Fc;e._strncpy=Gc;var Hc=Ja,Ic=mc,Jc=ua,Kc=ac,Lc=pc,n={ua:{hg:r,we:G,paused:G,fj:[],pause:function(){n.ua.we=q},fg:function(){n.ua.paused&&(n.ua.paused=G,n.ua.hg());n.ua.we=G},updateStatus:function(){if(e.setStatus){var a=e.statusMessage||"Please wait...",b=n.ua.kj,c=n.ua.Ei;b?b<c?e.setStatus(a+" ("+(c-b)+"/"+c+")"):e.setStatus(a):e.setStatus("")}}},
-Qc:G,Zc:G,Qf:[],Ej:[],ka:function(){function a(){n.Zc=document.pointerLockElement===c||document.mozPointerLockElement===c||document.webkitPointerLockElement===c}e.preloadPlugins||(e.preloadPlugins=[]);if(!n.Bf&&!Xa){n.Bf=q;try{new Blob,n.Zb=q}catch(b){n.Zb=G,console.log("warning: no blob constructor, cannot create blobs with mimetypes")}n.BlobBuilder="undefined"!=typeof MozBlobBuilder?MozBlobBuilder:"undefined"!=typeof WebKitBlobBuilder?WebKitBlobBuilder:!n.Zb?console.log("warning: no BlobBuilder"):
-r;n.Mb="undefined"!=typeof window?window.URL?window.URL:window.webkitURL:p;!e.oe&&"undefined"===typeof n.Mb&&(console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."),e.oe=q);e.preloadPlugins.push({canHandle:function(a){return!e.oe&&/\.(jpg|jpeg|png|bmp)$/i.test(a)},handle:function(a,b,c,d){var g=r;if(n.Zb)try{g=new Blob([a],{type:n.Kc(b)}),g.size!==a.length&&(g=new Blob([(new Uint8Array(a)).buffer],{type:n.Kc(b)}))}catch(u){l.Fb("Blob constructor present but fails: "+
-u+"; falling back to blob builder")}g||(g=new n.BlobBuilder,g.append((new Uint8Array(a)).buffer),g=g.getBlob());var x=n.Mb.createObjectURL(g),m=new Image;m.onload=function(){J(m.complete,"Image "+b+" could not be decoded");var d=document.createElement("canvas");d.width=m.width;d.height=m.height;d.getContext("2d").drawImage(m,0,0);e.preloadedImages[b]=d;n.Mb.revokeObjectURL(x);c&&c(a)};m.onerror=function(){console.log("Image "+x+" could not be decoded");d&&d()};m.src=x}});e.preloadPlugins.push({canHandle:function(a){return!e.aj&&
-a.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},handle:function(a,b,c,d){function g(d){x||(x=q,e.preloadedAudios[b]=d,c&&c(a))}function l(){x||(x=q,e.preloadedAudios[b]=new Audio,d&&d())}var x=G;if(n.Zb){try{var m=new Blob([a],{type:n.Kc(b)})}catch(s){return l()}var m=n.Mb.createObjectURL(m),y=new Audio;y.addEventListener("canplaythrough",function(){g(y)},G);y.onerror=function(){if(!x){console.log("warning: browser could not fully decode audio "+b+", trying slower base64 approach");for(var c="",d=0,e=
-0,i=0;i<a.length;i++){d=d<<8|a[i];for(e+=8;6<=e;)var h=d>>e-6&63,e=e-6,c=c+"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[h]}2==e?(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(d&3)<<4],c+="=="):4==e&&(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"[(d&15)<<2],c+="=");y.src="data:audio/x-"+b.substr(-3)+";base64,"+c;g(y)}};y.src=m;n.gg(function(){g(y)},1E4)}else return l()}});var c=e.canvas;c.dd=c.requestPointerLock||c.mozRequestPointerLock||
-c.webkitRequestPointerLock;c.Td=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||M();c.Td=c.Td.bind(document);document.addEventListener("pointerlockchange",a,G);document.addEventListener("mozpointerlockchange",a,G);document.addEventListener("webkitpointerlockchange",a,G);e.elementPointerLock&&c.addEventListener("click",function(a){!n.Zc&&c.dd&&(c.dd(),a.preventDefault())},G)}},Ai:function(a,b,c,d){var g;try{if(b){var i={antialias:G,alpha:G};if(d)for(var h in d)i[h]=
-d[h];var j="?",d=function(a){j=a.statusMessage||j};a.addEventListener("webglcontextcreationerror",d,G);try{["experimental-webgl","webgl"].some(function(b){return g=a.getContext(b,i)})}finally{a.removeEventListener("webglcontextcreationerror",d,G)}}else g=a.getContext("2d");g||k(":(")}catch(l){return e.print("Could not create canvas: "+[j,l]),r}b&&(a.style.backgroundColor="black",a.addEventListener("webglcontextlost",function(){alert("WebGL context lost. You will need to reload the page.")},G));c&&
-(GLctx=e.Bi=g,e.Bj=b,n.Qf.forEach(function(a){a()}),n.ka());return g},Ci:M(),Zd:G,dc:p,Db:p,cd:function(a,b){function c(){n.Qc=G;(document.webkitFullScreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.mozFullscreenElement||document.fullScreenElement||document.fullscreenElement)===d?(d.Fd=document.cancelFullScreen||document.mozCancelFullScreen||document.webkitCancelFullScreen,d.Fd=d.Fd.bind(document),n.dc&&d.dd(),n.Qc=q,n.Db&&n.lg()):n.Db&&n.mg();if(e.onFullScreen)e.onFullScreen(n.Qc)}
-n.dc=a;n.Db=b;"undefined"===typeof n.dc&&(n.dc=q);"undefined"===typeof n.Db&&(n.Db=G);var d=e.canvas;n.Zd||(n.Zd=q,document.addEventListener("fullscreenchange",c,G),document.addEventListener("mozfullscreenchange",c,G),document.addEventListener("webkitfullscreenchange",c,G));d.cd=d.requestFullScreen||d.mozRequestFullScreen||(d.webkitRequestFullScreen?function(){d.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:r);d.cd()},requestAnimationFrame:function(a){"undefined"===typeof window?setTimeout(a,
-1E3/60):(window.requestAnimationFrame||(window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||window.setTimeout),window.requestAnimationFrame(a))},pj:function(a){return function(){if(!ba)return a.apply(r,arguments)}},qj:function(a){return n.requestAnimationFrame(function(){ba||a()})},gg:function(a,b){return setTimeout(function(){ba||a()},b)},rj:function(a,b){return setInterval(function(){ba||
-a()},b)},Kc:function(a){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[a.substr(a.lastIndexOf(".")+1)]},Yb:function(a){window.Yb||(window.Yb=navigator.getUserMedia||navigator.mozGetUserMedia);window.Yb(a)},vf:function(a){return a.movementX||a.mozMovementX||a.webkitMovementX||0},wf:function(a){return a.movementY||a.mozMovementY||a.webkitMovementY||0},Ya:0,Za:0,yb:0,zb:0,ui:function(a){if(n.Zc)"mousemove"!=a.type&&"mozMovementX"in
-a?n.yb=n.zb=0:(n.yb=n.vf(a),n.zb=n.wf(a)),"undefined"!=typeof SDL?(n.Ya=SDL.Ya+n.yb,n.Za=SDL.Za+n.zb):(n.Ya+=n.yb,n.Za+=n.zb);else{var b=e.canvas.getBoundingClientRect(),c,d;c="undefined"!==typeof window.scrollX?window.scrollX:window.pageXOffset;d="undefined"!==typeof window.scrollY?window.scrollY:window.pageYOffset;if("touchstart"==a.type||"touchend"==a.type||"touchmove"==a.type)if(a=a.touches.item(0))c=a.pageX-(c+b.left),d=a.pageY-(d+b.top);else return;else c=a.pageX-(c+b.left),d=a.pageY-(d+b.top);
-a=e.canvas.height;c*=e.canvas.width/b.width;d*=a/b.height;n.yb=c-n.Ya;n.zb=d-n.Za;n.Ya=c;n.Za=d}},qg:function(a,b,c){var d=new XMLHttpRequest;d.open("GET",a,q);d.responseType="arraybuffer";d.onload=function(){200==d.status||0==d.status&&d.response?b(d.response):c()};d.onerror=c;d.send(r)},Xe:function(a,b,c,d){n.qg(a,function(c){J(c,'Loading data file "'+a+'" failed (no arrayBuffer).');b(new Uint8Array(c));d||Ma()},function(){c?c():k('Loading data file "'+a+'" failed.')});d||db()},eg:[],qd:function(){var a=
-e.canvas;n.eg.forEach(function(b){b(a.width,a.height)})},jg:function(a,b,c){var d=e.canvas;d.width=a;d.height=b;c||n.qd()},Fe:0,Ee:0,lg:function(){var a=e.canvas;this.Fe=a.width;this.Ee=a.height;a.width=screen.width;a.height=screen.height;"undefined"!=typeof SDL&&(a=Ya[SDL.screen+0*l.Fa>>2],t[SDL.screen+0*l.Fa>>2]=a|8388608);n.qd()},mg:function(){var a=e.canvas;a.width=this.Fe;a.height=this.Ee;"undefined"!=typeof SDL&&(a=Ya[SDL.screen+0*l.Fa>>2],t[SDL.screen+0*l.Fa>>2]=a&-8388609);n.qd()}};d.nd();
-ka.unshift({Ka:function(){!e.noFSInit&&!d.ka.$b&&d.ka()}});lb.push({Ka:function(){d.ee=G}});Ua.push({Ka:function(){d.bg()}});e.FS_createFolder=d.df;e.FS_createPath=d.gf;e.FS_createDataFile=d.zc;e.FS_createPreloadedFile=d.hf;e.FS_createLazyFile=d.ef;e.FS_createLink=d.ff;e.FS_createDevice=d.Ia;Na=l.md(4);t[Na>>2]=0;ka.unshift({Ka:function(){Y.ka()}});Ua.push({Ka:M()});Y.De=new l.pb;if(ca){var O=require("fs");I.nd()}ka.push({Ka:function(){K.root=d.L(K,{},r)}});dc=l.md(4);Ca(U);ra.$=D([0],"i8",S);Ea.$=
-D([0],"i8",S);e.requestFullScreen=function(a,b){n.cd(a,b)};e.requestAnimationFrame=function(a){n.requestAnimationFrame(a)};e.setCanvasSize=function(a,b,c){n.jg(a,b,c)};e.pauseMainLoop=function(){n.ua.pause()};e.resumeMainLoop=function(){n.ua.fg()};e.getUserMedia=function(){n.Yb()};Zb=X=l.qb(la);nb=Zb+5242880;$b=Z=l.qb(nb);J($b<ha,"TOTAL_MEMORY not big enough for stack");var Mc=D([8,7,6,6,5,5,5,5,4,4,4,4,4,4,4,4,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
-2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"i8",3),Nc=D([8,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,
-1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,7,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,6,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,5,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0,4,0,1,0,2,0,1,0,3,0,1,0,2,0,1,0],"i8",3),va=Math.min;var u=(function(global,env,buffer) {
-// EMSCRIPTEN_START_ASM
-"use asm";var a=new global.Int8Array(buffer);var b=new global.Int16Array(buffer);var c=new global.Int32Array(buffer);var d=new global.Uint8Array(buffer);var e=new global.Uint16Array(buffer);var f=new global.Uint32Array(buffer);var g=new global.Float32Array(buffer);var h=new global.Float64Array(buffer);var i=env.STACKTOP|0;var j=env.STACK_MAX|0;var k=env.tempDoublePtr|0;var l=env.ABORT|0;var m=env.cttz_i8|0;var n=env.ctlz_i8|0;var o=env._stderr|0;var p=env._stdout|0;var q=env._stdin|0;var r=env.___fsmu8|0;var s=+env.NaN;var t=+env.Infinity;var u=0;var v=0;var w=0;var x=0;var y=0,z=0,A=0,B=0,C=0.0,D=0,E=0,F=0,G=0.0;var H=0;var I=0;var J=0;var K=0;var L=0;var M=0;var N=0;var O=0;var P=0;var Q=0;var R=global.Math.floor;var S=global.Math.abs;var T=global.Math.sqrt;var U=global.Math.pow;var V=global.Math.cos;var W=global.Math.sin;var X=global.Math.tan;var Y=global.Math.acos;var Z=global.Math.asin;var _=global.Math.atan;var $=global.Math.atan2;var aa=global.Math.exp;var ba=global.Math.log;var ca=global.Math.ceil;var da=global.Math.imul;var ea=env.abort;var fa=env.assert;var ga=env.asmPrintInt;var ha=env.asmPrintFloat;var ia=env.min;var ja=env.invoke_viiiii;var ka=env.invoke_vi;var la=env.invoke_vii;var ma=env.invoke_ii;var na=env.invoke_iiiff;var oa=env.invoke_iiiiii;var pa=env.invoke_iiii;var qa=env.invoke_viiiiii;var ra=env.invoke_iiiiidddd;var sa=env.invoke_di;var ta=env.invoke_dd;var ua=env.invoke_dddd;var va=env.invoke_viiiiiiiii;var wa=env.invoke_iii;var xa=env.invoke_d;var ya=env.invoke_i;var za=env.invoke_viiiddi;var Aa=env.invoke_iiiii;var Ba=env.invoke_viii;var Ca=env.invoke_v;var Da=env.invoke_viiii;var Ea=env._llvm_lifetime_end;var Fa=env._lseek;var Ga=env.__scanString;var Ha=env._fclose;var Ia=env._fflush;var Ja=env._strtol;var Ka=env._fputc;var La=env._strtok;var Ma=env._fwrite;var Na=env._send;var Oa=env._fputs;var Pa=env._tmpnam;var Qa=env._isspace;var Ra=env._read;var Sa=env._ceil;var Ta=env._fileno;var Ua=env._strstr;var Va=env._fsync;var Wa=env._isblank;var Xa=env._fmod;var Ya=env._strcmp;var Za=env._strncmp;var _a=env._tmpfile;var $a=env._snprintf;var ab=env._fgetc;var bb=env.__getFloat;var cb=env._hypot;var db=env._fgets;var eb=env._close;var fb=env._getgid;var gb=env._strchr;var hb=env._asin;var ib=env._puts;var jb=env.___setErrNo;var kb=env._access;var lb=env._ftell;var mb=env._exit;var nb=env._sprintf;var ob=env._strrchr;var pb=env._copysign;var qb=env._recv;var rb=env._cos;var sb=env._putchar;var tb=env._isalnum;var ub=env._times;var vb=env._bsearch;var wb=env.__exit;var xb=env._isupper;var yb=env._rand;var zb=env._fabsf;var Ab=env._setlocale;var Bb=env._bcopy;var Cb=env._toupper;var Db=env._pread;var Eb=env._fopen;var Fb=env._open;var Gb=env._sqrtf;var Hb=env._sysconf;var Ib=env._putenv;var Jb=env._qsort;var Kb=env._isalpha;var Lb=env._strdup;var Mb=env._log10;var Nb=env._fread;var Ob=env._isatty;var Pb=env.__formatString;var Qb=env._getenv;var Rb=env._atoi;var Sb=env._vfprintf;var Tb=env._llvm_pow_f64;var Ub=env._sbrk;var Vb=env.___errno_location;var Wb=env._strerror;var Xb=env._fstat;var Yb=env._llvm_lifetime_start;var Zb=env.__parseInt;var _b=env._vsprintf;var $b=env._vsnprintf;var ac=env._sscanf;var bc=env._feof;var cc=env.___assert_fail;var dc=env._srand;var ec=env._strtok_r;var fc=env._abort;var gc=env._fprintf;var hc=env._tan;var ic=env.___buildEnvironment;var jc=env._fabs;var kc=env._floor;var lc=env.__reallyNegative;var mc=env._fseek;var nc=env._sqrt;var oc=env._write;var pc=env._sin;var qc=env._stat;var rc=env._longjmp;var sc=env._strpbrk;var tc=env._llvm_va_end;var uc=env._acos;var vc=env._pwrite;var wc=env._strerror_r;var xc=env._atan2;var yc=env._exp;var zc=env._time;var Ac=0.0;
-// EMSCRIPTEN_START_FUNCS
-function gj(){var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0;e=i;i=i+1200|0;f=e|0;g=e+400|0;c[44690]=0;c[44694]=-2;h=0;j=0;k=f;l=f;m=200;n=g;o=g;a:while(1){b[l>>1]=h;if((k+(m-1<<1)|0)>>>0>l>>>0){p=k;q=l;r=m;s=n;t=o}else{g=l-k>>1;u=g+1|0;if(m>>>0>9999>>>0){v=109;break}w=m<<1;x=w>>>0>1e4>>>0?1e4:w;w=dF(x*6|0|3)|0;if((w|0)==0){v=109;break}y=w;z=k;tF(w|0,z|0,u<<1)|0;A=w+((x>>>1&1073741823)<<2)|0;tF(A|0,o|0,u<<2)|0;if((k|0)!=(f|0)){eF(z)}if((x-1|0)>(g|0)){p=y;q=y+(g<<1)|0;r=x;s=A+(g<<2)|0;t=A}else{B=y;C=1;break}}if((h|0)==29){B=p;C=0;break}y=b[22400+(h<<1)>>1]|0;A=y<<16>>16;do{if(y<<16>>16==-72){v=22}else{g=c[44694]|0;if((g|0)==-2){x=Ci()|0;c[44694]=x;D=x}else{D=g}do{if((D|0)<1){c[44694]=0;E=0}else{if(D>>>0>=294>>>0){E=2;break}E=d[21648+D|0]|0}}while(0);g=E+A|0;if(g>>>0>227>>>0){v=22;break}if((a[22768+g|0]|0)!=(E|0)){v=22;break}x=a[21944+g|0]|0;g=x<<24>>24;if(x<<24>>24<1){F=-g|0;v=23;break}else{c[44694]=-2;x=s+4|0;c[x>>2]=c[44692];G=g;H=(j|0)==0?0:j-1|0;I=q;J=x;break}}}while(0);do{if((v|0)==22){v=0;A=a[22656+h|0]|0;if(A<<24>>24!=0){F=A&255;v=23;break}A=c[44694]|0;do{if((j|0)==0){c[44690]=(c[44690]|0)+1;vi(127664);K=q;L=s;M=y}else if((j|0)==3){if((A|0)<1){if((A|0)==0){B=p;C=1;break a}else{K=q;L=s;M=y;break}}else{c[44694]=-2;K=q;L=s;M=y;break}}else{K=q;L=s;M=y}}while(0);while(1){if(M<<16>>16!=-72){A=(M<<16>>16)+1|0;if(M<<16>>16>-2&(A|0)<228&(A|0)==12){break}}if((K|0)==(p|0)){B=p;C=1;break a}A=K-2|0;K=A;L=L-4|0;M=b[22400+(b[A>>1]<<1)>>1]|0}A=L+4|0;c[A>>2]=c[44692];G=1;H=3;I=K;J=A}}while(0);b:do{if((v|0)==23){v=0;y=d[22176+F|0]|0;A=1-y|0;x=s+(A<<2)|0;g=c[x>>2]|0;switch(F|0){case 22:{z=c[53690]|0;u=c[z+4>>2]|0;eF(z);c[53690]=u;N=g;break};case 23:{kj(c[s>>2]|0);N=g;break};case 41:{N=c[s-4>>2]|0;break};case 18:{u=c[53690]|0;z=c[u+4>>2]|0;eF(u);c[53690]=z;N=g;break};case 5:{N=ij()|0;break};case 52:{z=c[s-4>>2]|0;u=c[s>>2]|0;w=jk(16)|0;O=c[53698]|0;P=c[O+84>>2]|0;Q=c[(Hc[c[P>>2]&63](P,0,256)|0)+8>>2]|0;c[w+8>>2]=z;Hc[c[Q>>2]&63](Q,w,1)|0;a[z+92|0]=1;if((a[O+112|0]&1)!=0){a[z+100|0]=1}c[z+88>>2]=u;N=g;break};case 38:{N=c[s-4>>2]|0;break};case 32:{N=c[s>>2]|0;break};case 57:{N=c[s-12>>2]|0;break};case 58:{u=c[s>>2]|0;z=ij()|0;O=jk(16)|0;w=c[53698]|0;Q=c[w+84>>2]|0;P=c[(Hc[c[Q>>2]&63](Q,0,256)|0)+8>>2]|0;c[O+8>>2]=u;Hc[c[P>>2]&63](P,O,1)|0;a[u+92|0]=2;if((a[w+112|0]&1)!=0){a[u+100|0]=1}c[u+88>>2]=z;N=g;break};case 46:{a[(c[s-8>>2]|0)+12|0]=1;N=c[s>>2]|0;break};case 47:{z=$g(71032,c[43328]|0)|0;u=c[53698]|0;w=jk(16)|0;c[w+8>>2]=z;if((a[u+112|0]&2)!=0){a[w+12|0]=1}z=c[u+84>>2]|0;Hc[c[z>>2]&63](z,w,1)|0;N=g;break};case 44:{N=c[s>>2]|0;break};case 45:{N=c[s>>2]|0;break};case 39:{N=c[s-4>>2]|0;break};case 21:{kj(c[s>>2]|0);N=g;break};case 17:{kj(c[s>>2]|0);N=g;break};case 9:{jj(c[s>>2]|0);N=g;break};case 24:{w=c[53690]|0;z=c[w+4>>2]|0;eF(w);c[53690]=z;N=g;break};case 25:{kj(c[s>>2]|0);N=g;break};case 40:{N=c[s-4>>2]|0;break};case 37:{N=c[s>>2]|0;break};case 19:{kj(c[s>>2]|0);N=g;break};case 55:{N=c[s-12>>2]|0;break};case 56:{z=c[s-4>>2]|0;w=c[s>>2]|0;u=jk(16)|0;O=c[53698]|0;P=c[O+84>>2]|0;Q=c[(Hc[c[P>>2]&63](P,0,256)|0)+8>>2]|0;c[u+8>>2]=z;Hc[c[Q>>2]&63](Q,u,1)|0;a[z+92|0]=3;if((a[O+112|0]&1)!=0){a[z+100|0]=1}c[z+88>>2]=w;N=g;break};case 53:{N=c[s-12>>2]|0;break};case 49:{N=c[s>>2]|0;break};case 50:{N=c[s>>2]|0;break};case 51:{w=(c[s-8>>2]|0)+100|0;a[w]=a[w]|1;N=c[s>>2]|0;break};case 54:{w=c[s-4>>2]|0;z=c[s>>2]|0;O=jk(16)|0;u=c[53698]|0;Q=c[u+84>>2]|0;P=c[(Hc[c[Q>>2]&63](Q,0,256)|0)+8>>2]|0;c[O+8>>2]=w;Hc[c[P>>2]&63](P,O,1)|0;a[w+92|0]=2;if((a[u+112|0]&1)!=0){a[w+100|0]=1}c[w+88>>2]=z;N=g;break};case 4:{v=26;break a;break};case 8:{z=c[53692]|0;w=jk(64)|0;u=z+4|0;O=c[u>>2]|0;if(O>>>0<(c[z+8>>2]|0)>>>0){R=O}else{Jv(z,1)|0;R=c[u>>2]|0}a[R]=0;O=c[z>>2]|0;c[u>>2]=O;c[w+8>>2]=Lb(O|0)|0;c[w+12>>2]=c[c[53690]>>2];O=c[53696]|0;Hc[c[O>>2]&63](O,w,1)|0;N=g;break};case 3:{w=c[s-4>>2]|0;O=jk(8)|0;a[O+4|0]=1;c[O>>2]=w;c[53700]=O;N=g;break};case 48:{O=c[(c[53698]|0)+84>>2]|0;N=Hc[c[O>>2]&63](O,0,256)|0;break};case 59:{N=c[s-8>>2]|0;break};case 20:{O=c[53690]|0;w=c[O+4>>2]|0;eF(O);c[53690]=w;N=g;break};case 29:{kj(c[s>>2]|0);N=g;break};case 30:{w=c[53690]|0;O=c[w+4>>2]|0;eF(w);c[53690]=O;N=g;break};case 31:{N=c[s-4>>2]|0;break};case 60:{N=c[s-4>>2]|0;break};case 61:{N=c[s>>2]|0;break};case 35:{O=c[53692]|0;w=c[O+4>>2]|0;if(w>>>0<(c[O+8>>2]|0)>>>0){S=O;T=w}else{Jv(O,1)|0;O=c[53692]|0;S=O;T=c[O+4>>2]|0}c[S+4>>2]=T+1;a[T]=0;O=c[53692]|0;w=c[O>>2]|0;c[O+4>>2]=w;O=w;while(1){w=a[O]|0;if(w<<24>>24==0){break}if(w<<24>>24==32){O=O+1|0}else{v=53;break a}}O=s;c[(c[O>>2]|0)+80>>2]=c[53698];w=$g(11880,c[43328]|0)|0;c[(c[O>>2]|0)+84>>2]=w;c[53698]=c[O>>2];c[(c[O>>2]|0)+108>>2]=c[c[53690]>>2];N=c[O>>2]|0;break};case 36:{O=c[53692]|0;w=c[O+4>>2]|0;if(w>>>0<(c[O+8>>2]|0)>>>0){U=O;V=w}else{Jv(O,1)|0;O=c[53692]|0;U=O;V=c[O+4>>2]|0}c[U+4>>2]=V+1;a[V]=0;O=c[53692]|0;w=c[O>>2]|0;c[O+4>>2]=w;O=w;while(1){w=a[O]|0;if(w<<24>>24==0){break}if(w<<24>>24==32){O=O+1|0}else{v=60;break a}}O=c[53698]|0;c[53698]=c[O+80>>2];N=O;break};case 26:{O=c[53690]|0;w=c[O+4>>2]|0;eF(O);c[53690]=w;N=g;break};case 27:{kj(c[s>>2]|0);N=g;break};case 28:{w=c[53690]|0;O=c[w+4>>2]|0;eF(w);c[53690]=O;N=g;break};case 2:{O=c[s-4>>2]|0;w=jk(8)|0;a[w+4|0]=2;c[w>>2]=O;c[53700]=w;N=g;break};default:{N=g}}w=q+(-y<<1)|0;O=s+(A<<2)|0;c[x>>2]=N;u=(d[22248+F|0]|0)-39|0;z=b[w>>1]|0;P=z+(b[22320+(u<<1)>>1]|0)|0;do{if(P>>>0<228>>>0){if((a[22768+P|0]|0)!=(z|0)){break}G=a[21944+P|0]|0;H=j;I=w;J=O;break b}}while(0);G=a[22616+u|0]|0;H=j;I=w;J=O}}while(0);h=G;j=H;k=p;l=I+2|0;m=r;n=J;o=t}if((v|0)==26){hj();B=p;C=1}else if((v|0)==53){vi(119648);hj();B=p;C=1}else if((v|0)==60){vi(157536);hj();B=p;C=1}else if((v|0)==109){vi(102648);B=k;C=2}if((B|0)==(f|0)){i=e;return C|0}eF(B);i=e;return C|0}function hj(){var a=0,b=0,d=0,e=0;a=c[53698]|0;b=c[53700]|0;if((b|0)!=0){wj(b,1);c[53700]=0}c[17762]=78;if((a|0)!=0){b=a;while(1){a=c[b+80>>2]|0;Vg(c[b+84>>2]|0)|0;uj(b|0);eF(b);if((a|0)==0){break}else{b=a}}}c[17762]=90;c[6396]=94;b=c[53696]|0;Hc[c[b>>2]&63](b,0,64)|0;c[6396]=90;c[6406]=30;b=c[53694]|0;Hc[c[b>>2]&63](b,0,64)|0;c[6406]=90;b=c[53690]|0;a=c[b+4>>2]|0;if((a|0)==0){return}else{d=b;e=a}while(1){eF(d);a=c[e+4>>2]|0;if((a|0)==0){break}else{d=e;e=a}}return}function ij(){var a=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;a=c[53694]|0;d=jk(40)|0;e=d;if((bh(c[53696]|0)|0)!=0){jj(0)}f=bh(a)|0;b[d+4>>1]=f;if((f|0)==0){g=a|0;h=c[g>>2]|0;i=Hc[h&63](a,0,64)|0;return e|0}j=d;c[j>>2]=jk(f*24|0)|0;f=a|0;d=Hc[c[f>>2]&63](a,0,128)|0;if((d|0)==0){g=f;h=c[g>>2]|0;i=Hc[h&63](a,0,64)|0;return e|0}else{k=d;l=0}while(1){d=k+8|0;m=(c[j>>2]|0)+(l*24|0)|0;c[m>>2]=c[d>>2];c[m+4>>2]=c[d+4>>2];c[m+8>>2]=c[d+8>>2];c[m+12>>2]=c[d+12>>2];c[m+16>>2]=c[d+16>>2];c[m+20>>2]=c[d+20>>2];d=Hc[c[f>>2]&63](a,k,8)|0;if((d|0)==0){g=f;break}else{k=d;l=l+1|0}}h=c[g>>2]|0;i=Hc[h&63](a,0,64)|0;return e|0}function jj(d){d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;e=jk(32)|0;f=c[53696]|0;g=bh(f)|0;h=e+8|0;a[e+14|0]=d;do{if((g|0)==0){d=h;c[d>>2]=jk(56)|0;b[e+12>>1]=1;i=Lb(213312)|0;c[c[d>>2]>>2]=i;c[(c[d>>2]|0)+4>>2]=c[c[53690]>>2]}else{b[e+12>>1]=g;d=h;c[d>>2]=jk(g*56|0)|0;i=Zg(f)|0;if((i|0)==0){break}else{j=i;k=0}while(1){i=(c[d>>2]|0)+(k*56|0)|0;l=j+8|0;c[i>>2]=c[l>>2];c[i+4>>2]=c[l+4>>2];c[i+8>>2]=c[l+8>>2];c[i+12>>2]=c[l+12>>2];c[i+16>>2]=c[l+16>>2];c[i+20>>2]=c[l+20>>2];c[i+24>>2]=c[l+24>>2];c[i+28>>2]=c[l+28>>2];c[i+32>>2]=c[l+32>>2];c[i+36>>2]=c[l+36>>2];c[i+40>>2]=c[l+40>>2];c[i+44>>2]=c[l+44>>2];c[i+48>>2]=c[l+48>>2];c[i+52>>2]=c[l+52>>2];l=c[j>>2]|0;if((l|0)==0){break}else{j=l;k=k+1|0}}}}while(0);Hc[c[f>>2]&63](f,0,64)|0;f=c[53694]|0;Hc[c[f>>2]&63](f,e,1)|0;return}function kj(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0.0;b=i;i=i+32|0;d=b|0;e=jk(8)|0;f=e;g=c[c[53690]>>2]|0;j=d;k=a;c[j>>2]=c[k>>2];c[j+4>>2]=c[k+4>>2];c[j+8>>2]=c[k+8>>2];c[j+12>>2]=c[k+12>>2];c[j+16>>2]=c[k+16>>2];c[j+20>>2]=c[k+20>>2];c[j+24>>2]=c[k+24>>2];c[j+28>>2]=c[k+28>>2];do{if((g|0)!=0){k=d+4|0;do{if((c[k>>2]|0)==0){a=c[g+4>>2]|0;if((a|0)==0){break}c[k>>2]=a}}while(0);k=d+16|0;do{if(+h[k>>3]<0.0){l=+h[g+16>>3];if(l<0.0){break}h[k>>3]=l}}while(0);k=d|0;do{if((c[k>>2]|0)==0){a=c[g>>2]|0;if((a|0)==0){break}c[k>>2]=a}}while(0);k=c[g+24>>2]&127;if((k|0)==0){break}a=d+24|0;c[a>>2]=c[a>>2]|k}}while(0);d=c[(c[53688]|0)+144>>2]|0;c[e>>2]=Hc[c[d>>2]&63](d,j,1)|0;c[e+4>>2]=c[53690];c[53690]=f;i=b;return}function lj(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+152|0;f=e+128|0;g=e+144|0;c[g>>2]=0;c[g+4>>2]=0;c[53690]=g;c[53698]=0;c[53700]=0;c[53688]=c[(c[(c[d+52>>2]|0)+8>>2]|0)+136>>2];c[53696]=$g(25568,c[43328]|0)|0;c[53694]=$g(25608,c[43328]|0)|0;Iv(f,128,e|0);c[53692]=f;if((xi(a,f,d)|0)==0){gj()|0;c[b>>2]=Bi()|0;h=c[53700]|0}else{c[b>>2]=2;h=0}Vg(c[53696]|0)|0;Vg(c[53694]|0)|0;c[53696]=0;c[53694]=0;c[53690]=0;Mv(f);i=e;return h|0}function mj(a,b,c){a=a|0;b=b|0;c=c|0;eF(b);return}function nj(a,b,d){a=a|0;b=b|0;d=d|0;Vg(c[b+8>>2]|0)|0;eF(b);return}function oj(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;e=c[d+8>>2]|0;b=e+88|0;f=a[e+92|0]|0;if((f<<24>>24|0)==2){vj(c[b>>2]|0)}else if((f<<24>>24|0)==1){f=c[b>>2]|0;Vg(c[f+84>>2]|0)|0;uj(f|0);eF(f)}uj(e|0);eF(e);eF(d);return}function pj(a,b,d){a=a|0;b=b|0;d=d|0;d=c[b+8>>2]|0;if((d|0)!=0){eF(d)}eF(b);return}function qj(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;e=d+12|0;a=b[e>>1]|0;if(a<<16>>16==0){f=d;eF(f);return}g=d+8|0;if(a<<16>>16>0){h=c[g>>2]|0;i=0;j=a;while(1){a=c[h>>2]|0;if((a|0)==0){k=j}else{eF(a);k=b[e>>1]|0}a=i+1|0;if((a|0)<(k<<16>>16|0)){h=h+56|0;i=a;j=k}else{break}}}eF(c[g>>2]|0);f=d;eF(f);return}function rj(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;g=i;i=i+72|0;j=g|0;k=Fh(d)|0;l=c[k>>2]|0;m=c[l+4>>2]|0;c[k+4>>2]=m;c[k+12>>2]=c[l+12>>2];if((m|0)==1){c[k+8>>2]=c[l+8>>2]}else if((m|0)==0){c[k+8>>2]=c[l+8>>2]}else if((m|0)==2){c[k+8>>2]=c[l+8>>2]}else if((m|0)==3){c[k+8>>2]=c[l+8>>2]}c[k+208>>2]=c[l+208>>2];c[k+228>>2]=c[l+228>>2];c[k+244>>2]=c[l+244>>2];m=k+260|0;b[m>>1]=b[m>>1]&-2|b[l+260>>1]&1;n=+h[f+56>>3];o=+h[f+64>>3];l=a[f+80|0]|0;if((l|0)==98){p=+h[f+48>>3];m=a[e+4|0]|0;if((m|0)==3){k=c[e>>2]|0;q=+h[k+24>>3]- +h[k+8>>3]}else if((m|0)==1){k=c[e>>2]|0;q=+h[k+72>>3]- +h[k+56>>3]}else if((m|0)==2){m=c[e>>2]|0;q=+h[m+32>>3]- +h[m+16>>3]}else{q=0.0}r=o-(p-q)*.5+-1.0}else if((l|0)==116){q=+h[f+48>>3];l=a[e+4|0]|0;if((l|0)==1){m=c[e>>2]|0;s=+h[m+72>>3]- +h[m+56>>3]}else if((l|0)==3){m=c[e>>2]|0;s=+h[m+24>>3]- +h[m+8>>3]}else if((l|0)==2){l=c[e>>2]|0;s=+h[l+32>>3]- +h[l+16>>3]}else{s=0.0}r=o+(q-s)*.5+-1.0}else{r=o}h[j>>3]=n;h[j+8>>3]=r;c[j+20>>2]=c[f+8>>2];c[j+16>>2]=c[f+4>>2];h[j+32>>3]=+h[f+16>>3];f=d+16|0;l=ew(c[(c[f>>2]|0)+8>>2]|0,119632)|0;m=j+56|0;c[m>>2]=l;k=j+60|0;c[k>>2]=c[(c[f>>2]|0)+212>>2];t=j+64|0;a[t]=0;if((l|0)==0){u=19}else{if((a[l]|0)==0){u=19}}if((u|0)==19){c[m>>2]=157520}if((a[e+4|0]|0)==1){m=c[e>>2]|0;pB(d,c[(c[d>>2]|0)+336>>2]|0);u=c[m+24>>2]|0;if((u|0)==0){lB(d,127648)}else{lB(d,u)}sj(d,m,j)}else{tj(d,c[e>>2]|0,j)}if((a[t]|0)==0){v=c[f>>2]|0;w=v+208|0;c[w>>2]=0;x=v+228|0;c[x>>2]=0;y=v+244|0;c[y>>2]=0;z=v+212|0;c[z>>2]=0;Gh(d);i=g;return}eF(c[k>>2]|0);v=c[f>>2]|0;w=v+208|0;c[w>>2]=0;x=v+228|0;c[x>>2]=0;y=v+244|0;c[y>>2]=0;z=v+212|0;c[z>>2]=0;Gh(d);i=g;return}function sj(f,g,j){f=f|0;g=g|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0.0,C=0,D=0.0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0.0,N=0,O=0,P=0,Q=0,R=0,S=0.0,T=0.0,U=0.0,V=0.0,W=0.0,X=0.0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0.0,Ea=0.0,Fa=0.0,Ga=0.0,Ha=0,Ia=0,Ja=0.0,Ka=0,La=0,Ma=0.0,Na=0,Oa=0,Pa=0.0,Qa=0;k=i;i=i+480|0;l=k|0;m=k+64|0;n=k+96|0;o=k+136|0;p=k+168|0;q=k+232|0;r=k+240|0;s=k+272|0;t=k+304|0;u=k+336|0;v=k+368|0;w=k+408|0;x=k+472|0;y=g|0;z=u;A=g+48|0;c[z>>2]=c[A>>2];c[z+4>>2]=c[A+4>>2];c[z+8>>2]=c[A+8>>2];c[z+12>>2]=c[A+12>>2];c[z+16>>2]=c[A+16>>2];c[z+20>>2]=c[A+20>>2];c[z+24>>2]=c[A+24>>2];c[z+28>>2]=c[A+28>>2];A=j|0;B=+h[A>>3];C=j+8|0;D=+h[C>>3];E=g+84|0;F=c[E>>2]|0;if((c[g>>2]|0)==0){G=(c[g+8>>2]|0)!=0}else{G=1}H=g+108|0;I=c[H>>2]|0;do{if((I|0)!=0){J=j+16|0;K=c[J>>2]|0;do{if((K|0)!=0){L=I|0;if((c[L>>2]|0)==0){c[45156]=0;break}else{c[45156]=K;c[J>>2]=c[L>>2];break}}}while(0);J=j+20|0;K=c[J>>2]|0;do{if((K|0)!=0){L=I+4|0;if((c[L>>2]|0)==0){c[45157]=0;break}else{c[45157]=K;c[J>>2]=c[L>>2];break}}}while(0);J=j+32|0;M=+h[J>>3];if(M<0.0){break}K=I+16|0;if(+h[K>>3]<0.0){h[22580]=-1.0;break}else{h[22580]=M;h[J>>3]=+h[K>>3];break}}}while(0);I=u|0;h[I>>3]=B+ +h[I>>3];I=u+16|0;h[I>>3]=B+ +h[I>>3];I=u+8|0;h[I>>3]=D+ +h[I>>3];I=u+24|0;h[I>>3]=D+ +h[I>>3];do{if(G){if((c[f+152>>2]&4|0)!=0){N=0;break}N=Kj(f,j,y,u,v,1)|0}else{N=0}}while(0);I=g+42|0;K=e[I>>1]|0;do{if((K&32|0)==0){J=c[g+20>>2]|0;if((J|0)!=0){L=x|0;O=Lj(f,J,c[g+28>>2]|0,K,L)|0;if((b[I>>1]&4)==0){sB(f,u,O)}else{J=a[g+33|0]|0;P=t;c[P>>2]=c[z>>2];c[P+4>>2]=c[z+4>>2];c[P+8>>2]=c[z+8>>2];c[P+12>>2]=c[z+12>>2];c[P+16>>2]=c[z+16>>2];c[P+20>>2]=c[z+20>>2];c[P+24>>2]=c[z+24>>2];c[P+28>>2]=c[z+28>>2];P=w;c[P>>2]=c[z>>2];c[P+4>>2]=c[z+4>>2];c[P+8>>2]=c[z+8>>2];c[P+12>>2]=c[z+12>>2];P=w+32|0;Q=P;R=t+16|0;c[Q>>2]=c[R>>2];c[Q+4>>2]=c[R+4>>2];c[Q+8>>2]=c[R+8>>2];c[Q+12>>2]=c[R+12>>2];if((J&255)>>>0>1>>>0){D=+(J&255|0)*.5;J=w|0;B=D+ +h[J>>3];h[J>>3]=B;J=w+8|0;M=D+ +h[J>>3];h[J>>3]=M;J=P|0;S=+h[J>>3]-D;h[J>>3]=S;J=w+40|0;T=+h[J>>3]-D;h[J>>3]=T;U=S;V=M;W=B;X=T}else{U=+h[P>>3];V=+h[w+8>>3];W=+h[w>>3];X=+h[w+40>>3]}h[w+16>>3]=U;h[w+24>>3]=V;h[w+48>>3]=W;h[w+56>>3]=X;ol(f,w|0,4,4,O)}eF(c[L>>2]|0)}L=c[F>>2]|0;if((L|0)!=0){O=m;P=o;J=p;R=o|0;Q=o+16|0;Y=o+8|0;Z=o+24|0;_=f+152|0;$=l|0;aa=l+8|0;ba=l+32|0;ca=l+40|0;da=l+16|0;ea=l|0;fa=l+24|0;ga=l+48|0;ha=l+56|0;ia=j+56|0;ja=q|0;ka=p|0;la=p+32|0;ma=la;na=m+16|0;oa=p|0;pa=p+8|0;qa=la|0;la=p+40|0;ra=p+16|0;sa=p+24|0;ta=p+48|0;ua=p+56|0;va=F;wa=L;do{L=wa|0;xa=wa+48|0;c[P>>2]=c[xa>>2];c[P+4>>2]=c[xa+4>>2];c[P+8>>2]=c[xa+8>>2];c[P+12>>2]=c[xa+12>>2];c[P+16>>2]=c[xa+16>>2];c[P+20>>2]=c[xa+20>>2];c[P+24>>2]=c[xa+24>>2];c[P+28>>2]=c[xa+28>>2];T=+h[A>>3];B=+h[C>>3];if((c[wa>>2]|0)==0){ya=(c[wa+8>>2]|0)!=0}else{ya=1}h[R>>3]=T+ +h[R>>3];h[Q>>3]=T+ +h[Q>>3];h[Y>>3]=B+ +h[Y>>3];h[Z>>3]=B+ +h[Z>>3];do{if(ya){if((c[_>>2]&4|0)!=0){za=0;break}za=Kj(f,j,L,o,n,1)|0}else{za=0}}while(0);xa=wa+42|0;Aa=e[xa>>1]|0;do{if((Aa&32|0)==0){Ba=c[wa+20>>2]|0;if((Ba|0)!=0){Ca=Lj(f,Ba,c[wa+28>>2]|0,Aa,ja)|0;if((b[xa>>1]&4)==0){sB(f,o,Ca)}else{Ba=a[wa+33|0]|0;c[O>>2]=c[P>>2];c[O+4>>2]=c[P+4>>2];c[O+8>>2]=c[P+8>>2];c[O+12>>2]=c[P+12>>2];c[O+16>>2]=c[P+16>>2];c[O+20>>2]=c[P+20>>2];c[O+24>>2]=c[P+24>>2];c[O+28>>2]=c[P+28>>2];c[J>>2]=c[P>>2];c[J+4>>2]=c[P+4>>2];c[J+8>>2]=c[P+8>>2];c[J+12>>2]=c[P+12>>2];c[ma>>2]=c[na>>2];c[ma+4>>2]=c[na+4>>2];c[ma+8>>2]=c[na+8>>2];c[ma+12>>2]=c[na+12>>2];if((Ba&255)>>>0>1>>>0){B=+(Ba&255|0)*.5;T=B+ +h[oa>>3];h[oa>>3]=T;M=B+ +h[pa>>3];h[pa>>3]=M;S=+h[qa>>3]-B;h[qa>>3]=S;D=+h[la>>3]-B;h[la>>3]=D;Da=S;Ea=M;Fa=T;Ga=D}else{Da=+h[qa>>3];Ea=+h[pa>>3];Fa=+h[oa>>3];Ga=+h[la>>3]}h[ra>>3]=Da;h[sa>>3]=Ea;h[ta>>3]=Fa;h[ua>>3]=Ga;ol(f,ka,4,4,Ca)}eF(c[ja>>2]|0)}if((a[wa+33|0]|0)!=0){Mj(f,L,o)}Ca=wa+88|0;Ba=a[wa+92|0]|0;if((Ba<<24>>24|0)==1){sj(f,c[Ca>>2]|0,j);break}else if((Ba<<24>>24|0)==3){Ba=c[Ca>>2]|0;D=+h[A>>3];T=+h[Ba>>3]+D;M=+h[C>>3];S=+h[Ba+8>>3]+M;B=+h[Ba+16>>3]+D;D=+h[Ba+24>>3]+M;h[$>>3]=B;h[aa>>3]=D;h[ba>>3]=T;h[ca>>3]=S;h[da>>3]=T;h[fa>>3]=D;h[ga>>3]=B;h[ha>>3]=S;Ha=c[Ba+36>>2]|0;if((Ha|0)==0){Ia=c[ia>>2]|0}else{Ia=Ha}wB(f,c[Ba+32>>2]|0,ea,4,1,Ia);break}else{tj(f,c[Ca>>2]|0,j);break}}}while(0);if((za|0)!=0){Nj(f,n,1)}do{if(ya){if((c[_>>2]&4|0)==0){break}if((Kj(f,j,L,o,n,0)|0)==0){break}Nj(f,n,0)}}while(0);va=va+4|0;wa=c[va>>2]|0;}while((wa|0)!=0)}wa=c[E>>2]|0;xB(f,1.0);va=c[wa>>2]|0;if((va|0)!=0){_=g+24|0;ea=r|0;ia=r+8|0;ha=r+16|0;ga=r+24|0;fa=s|0;da=s+8|0;ca=s+16|0;ba=s+24|0;aa=wa;wa=va;do{aa=aa+4|0;va=wa+100|0;do{if((a[va]|0)!=0){$=c[_>>2]|0;ja=c[aa>>2]|0;S=+h[A>>3];B=+h[C>>3];ka=($|0)==0?127648:$;nB(f,ka);lB(f,ka);D=S+ +h[wa+48>>3];T=S+ +h[wa+64>>3];M=B+ +h[wa+56>>3];Ja=B+ +h[wa+72>>3];ka=a[va]|0;do{if((ka&1)==0){Ka=ka}else{$=c[wa+96>>2]|0;if(((e[wa+80>>1]|0)+(e[wa+84>>1]|0)|0)>=(c[$+104>>2]|0)){Ka=ka;break}ua=b[wa+86>>1]|0;do{if(ua<<16>>16==0){ta=a[$+32|0]|0;sa=(ta<<24>>24|0)/2|0;La=sa+(d[$+33|0]|0)&255;Ma=M- +(sa|0);Na=ta}else{if(((e[wa+82>>1]|0)+(ua&65535)|0)==(c[$+100>>2]|0)){ta=a[$+32|0]|0;sa=(ta<<24>>24|0)/2|0;ra=sa+(d[$+33|0]|0)|0;La=ra&255;Ma=M- +(sa|0)- +(ra&255|0);Na=ta;break}else{ta=a[$+32|0]|0;La=0;Ma=M- +((ta<<24>>24|0)/2|0|0);Na=ta;break}}}while(0);B=T+ +((Na<<24>>24|0)/2|0|0);h[fa>>3]=B;h[da>>3]=Ma;h[ca>>3]=B+0.0;h[ba>>3]=Ma+(+(Na<<24>>24|0)+(Ja+ +(La&255|0)-M));sB(f,s,1);Ka=a[va]|0}}while(0);if((Ka&2)==0){break}ka=b[wa+86>>1]|0;$=c[wa+96>>2]|0;if(((e[wa+82>>1]|0)+(ka&65535)|0)>=(c[$+100>>2]|0)){break}ua=b[wa+84>>1]|0;do{if(ua<<16>>16==0){ta=a[$+32|0]|0;ra=(ta<<24>>24|0)/2|0;sa=ra+(d[$+33|0]|0)|0;la=sa&255;oa=sa&255;Ja=+(ra|0);B=D- +(oa|0)-Ja;if((e[wa+80>>1]|0)==(c[$+104>>2]|0)){Oa=oa<<1&255;Pa=B;Qa=ta;break}if((ja|0)==0){Oa=la;Pa=B;Qa=ta;break}if((b[ja+86>>1]|0)==ka<<16>>16){Oa=la;Pa=B;Qa=ta;break}Oa=~~(+((la&255)>>>0)+(S+ +h[$+64>>3]-(T+Ja)));Pa=B;Qa=ta}else{if(((e[wa+80>>1]|0)+(ua&65535)|0)==(c[$+104>>2]|0)){ta=a[$+32|0]|0;la=(ta<<24>>24|0)/2|0;Oa=la+(d[$+33|0]|0)&255;Pa=D- +(la|0);Qa=ta;break}ta=a[$+32|0]|0;B=+((ta<<24>>24|0)/2|0|0);Ja=D-B;if((ja|0)==0){Oa=0;Pa=Ja;Qa=ta;break}if((b[ja+86>>1]|0)==ka<<16>>16){Oa=0;Pa=Ja;Qa=ta;break}Oa=~~(S+ +h[$+64>>3]-(T+B)+0.0);Pa=Ja;Qa=ta}}while(0);S=M- +((Qa<<24>>24|0)/2|0|0);h[ea>>3]=Pa;h[ia>>3]=S;h[ha>>3]=Pa+(+(Qa<<24>>24|0)+(T+ +(Oa&255|0)-D));h[ga>>3]=S+0.0;sB(f,r,1);}}while(0);wa=c[aa>>2]|0;}while((wa|0)!=0)}if((a[g+33|0]|0)==0){break}Mj(f,y,u)}}while(0);if((N|0)!=0){Nj(f,v,1)}do{if(G){if((c[f+152>>2]&4|0)==0){break}if((Kj(f,j,y,u,v,0)|0)==0){break}Nj(f,v,0)}}while(0);if((c[H>>2]|0)==0){i=k;return}H=c[45156]|0;if((H|0)!=0){c[j+16>>2]=H}H=c[45157]|0;if((H|0)!=0){c[j+20>>2]=H}Pa=+h[22580];if(Pa<0.0){i=k;return}h[j+32>>3]=Pa;i=k;return}function tj(e,f,g){e=e|0;f=f|0;g=g|0;var j=0,l=0,m=0,n=0,o=0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0,v=0,w=0,x=0,y=0.0,z=0.0,A=0.0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0.0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0.0,Z=0,_=0,$=0,aa=0,ba=0.0,ca=0,da=0,ea=0,fa=0;j=i;i=i+104|0;l=j|0;m=j+56|0;n=j+88|0;o=b[f+4>>1]|0;if(o<<16>>16<1){i=j;return}p=+h[f+24>>3];q=+h[f+8>>3];r=(p-q)*.5;s=+h[g>>3]+(p+q)*.5;q=+h[f+32>>3];p=+h[f+16>>3];t=+h[g+8>>3]+(q+p)*.5;u=o<<16>>16;o=c[f>>2]|0;v=a[f+6|0]|0;f=g+16|0;w=d[f]|d[f+1|0]<<8|d[f+2|0]<<16|d[f+3|0]<<24|0;f=g+20|0;x=d[f]|d[f+1|0]<<8|d[f+2|0]<<16|d[f+3|0]<<24|0;f=g+32|0;y=(c[k>>2]=d[f]|d[f+1|0]<<8|d[f+2|0]<<16|d[f+3|0]<<24,c[k+4>>2]=d[f+4|0]|d[f+5|0]<<8|d[f+6|0]<<16|d[f+7|0]<<24,+h[k>>3]);f=n;c[f>>2]=0;c[f+4>>2]=0;z=s-r;A=r+s;f=n+8|0;h[f>>3]=t+(q-p)*.5;iB(e,1);g=m+16|0;B=m|0;C=m+4|0;D=m+24|0;E=l|0;F=l+4|0;G=l+16|0;H=v<<24>>24==0;v=l+24|0;I=l+8|0;J=l+32|0;K=l+40|0;L=l+48|0;M=n|0;N=m+8|0;O=0;do{P=a[o+(O*24|0)+6|0]|0;if((P|0)==114){Q=A- +h[o+(O*24|0)+8>>3]}else if((P|0)==108){Q=z}else{Q=s- +h[o+(O*24|0)+8>>3]*.5}P=o+(O*24|0)+16|0;h[f>>3]=+h[f>>3]- +h[P>>3];R=c[o+(O*24|0)>>2]|0;S=o+(O*24|0)+4|0;if((b[S>>1]|0)>0){if(H){p=Q;T=0;U=R;while(1){V=U+4|0;W=c[V>>2]|0;if((W|0)==0){X=10}else{q=+h[W+16>>3];if(q>0.0){Y=q}else{X=10}}if((X|0)==10){X=0;Y=y}h[g>>3]=Y;W=c[V>>2]|0;if((W|0)==0){X=13}else{Z=c[W>>2]|0;if((Z|0)==0){X=13}else{_=Z}}if((X|0)==13){X=0;_=w}c[B>>2]=_;Z=c[V>>2]|0;if((Z|0)==0){X=16}else{W=c[Z+4>>2]|0;if((W|0)==0){X=16}else{$=W}}if((X|0)==16){X=0;$=x}c[C>>2]=$;W=c[V>>2]|0;do{if((W|0)==0){X=20}else{Z=c[W+24>>2]<<25>>25;if((Z|0)==0){X=20;break}aa=c[D>>2]&-128|Z&127}}while(0);if((X|0)==20){X=0;aa=c[D>>2]&-128}c[D>>2]=aa;lB(e,$);c[E>>2]=c[U>>2];c[F>>2]=m;h[G>>3]=+h[U+16>>3];h[v>>3]=1.0;c[N>>2]=c[(c[V>>2]|0)+8>>2];c[I>>2]=c[U+8>>2];W=U+32|0;h[J>>3]=+h[W>>3];h[K>>3]=+h[P>>3];a[L]=108;h[M>>3]=p;kB(e,n,l);Z=T+1|0;if((Z|0)<(b[S>>1]|0)){p=p+ +h[W>>3];T=Z;U=U+56|0}else{break}}}else{p=Q;U=0;T=R;while(1){Z=T+4|0;W=c[Z>>2]|0;if((W|0)==0){X=24}else{q=+h[W+16>>3];if(q>0.0){ba=q}else{X=24}}if((X|0)==24){X=0;ba=y}h[g>>3]=ba;W=c[Z>>2]|0;if((W|0)==0){X=27}else{ca=c[W>>2]|0;if((ca|0)==0){X=27}else{da=ca}}if((X|0)==27){X=0;da=w}c[B>>2]=da;ca=c[Z>>2]|0;if((ca|0)==0){X=30}else{W=c[ca+4>>2]|0;if((W|0)==0){X=30}else{ea=W}}if((X|0)==30){X=0;ea=x}c[C>>2]=ea;W=c[Z>>2]|0;do{if((W|0)==0){X=34}else{ca=c[W+24>>2]<<25>>25;if((ca|0)==0){X=34;break}fa=c[D>>2]&-128|ca&127}}while(0);if((X|0)==34){X=0;fa=c[D>>2]&-128}c[D>>2]=fa;lB(e,ea);c[E>>2]=c[T>>2];c[F>>2]=m;h[G>>3]=+h[T+16>>3];h[v>>3]=+h[T+24>>3];c[N>>2]=c[(c[Z>>2]|0)+8>>2];c[I>>2]=c[T+8>>2];W=T+32|0;h[J>>3]=+h[W>>3];h[K>>3]=+h[P>>3];a[L]=108;h[M>>3]=p;kB(e,n,l);V=U+1|0;if((V|0)<(b[S>>1]|0)){p=p+ +h[W>>3];U=V;T=T+56|0}else{break}}}}O=O+1|0;}while((O|0)<(u|0));jB(e);i=j;return}function uj(a){a=a|0;eF(c[a>>2]|0);eF(c[a+4>>2]|0);eF(c[a+8>>2]|0);eF(c[a+16>>2]|0);eF(c[a+12>>2]|0);eF(c[a+20>>2]|0);eF(c[a+24>>2]|0);return}function vj(a){a=a|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;if((a|0)==0){return}d=a|0;e=a+4|0;f=b[e>>1]|0;if(f<<16>>16>0){g=c[d>>2]|0;h=0;i=f;while(1){f=g+4|0;if((b[f>>1]|0)>0){j=c[g>>2]|0;k=0;while(1){l=c[j>>2]|0;if((l|0)!=0){eF(l)}l=c[j+8>>2]|0;do{if((l|0)!=0){m=c[j+12>>2]|0;if((m|0)==0){break}Cc[m&255](l)}}while(0);l=k+1|0;if((l|0)<(b[f>>1]|0)){j=j+56|0;k=l}else{break}}n=b[e>>1]|0}else{n=i}k=h+1|0;if((k|0)<(n<<16>>16|0)){g=g+24|0;h=k;i=n}else{break}}}n=c[d>>2]|0;if((n|0)!=0){eF(n)}eF(a);return}function wj(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;e=a[b+4|0]|0;if((e<<24>>24|0)==1){f=c[b>>2]|0;g=f+84|0;h=c[g>>2]|0;if((c[f+100>>2]|0)==-1){Vg(h)|0}else{eF(c[f+92>>2]|0);eF(c[f+96>>2]|0);i=c[h>>2]|0;if((i|0)!=0){j=h;h=i;do{wj(h+88|0,0);eF(c[h>>2]|0);eF(c[h+4>>2]|0);eF(c[h+8>>2]|0);eF(c[h+16>>2]|0);eF(c[h+12>>2]|0);eF(c[h+20>>2]|0);eF(c[h+24>>2]|0);eF(h);j=j+4|0;h=c[j>>2]|0;}while((h|0)!=0)}eF(c[g>>2]|0)}eF(c[f>>2]|0);eF(c[f+4>>2]|0);eF(c[f+8>>2]|0);eF(c[f+16>>2]|0);eF(c[f+12>>2]|0);eF(c[f+20>>2]|0);eF(c[f+24>>2]|0);eF(f)}else if((e<<24>>24|0)==3){e=c[b>>2]|0;eF(c[e+32>>2]|0);eF(e)}else{vj(c[b>>2]|0)}if((d|0)==0){return}eF(b);return}function xj(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0;g=c[(c[(c[b+8>>2]|0)+104>>2]|0)+72>>2]|0;if((a[g+4|0]|0)==2){h=0;return h|0}b=yj(c[g>>2]|0,e)|0;if((b|0)==0){h=0;return h|0}c[f>>2]=d[b+35|0]|0;h=b+48|0;return h|0}function yj(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;e=c[b+4>>2]|0;do{if((e|0)!=0){if((pm(e,d)|0)==0){f=b|0}else{break}return f|0}}while(0);e=c[b+84>>2]|0;b=c[e>>2]|0;if((b|0)==0){f=0;return f|0}else{g=e;h=b}while(1){b=g+4|0;e=c[h+4>>2]|0;if((e|0)==0){i=6}else{if((pm(e,d)|0)==0){j=h|0;i=8}else{i=6}}do{if((i|0)==6){i=0;if((a[h+92|0]|0)!=1){break}j=yj(c[h+88>>2]|0,d)|0;i=8}}while(0);if((i|0)==8){i=0;if((j|0)!=0){f=j;i=10;break}}e=c[b>>2]|0;if((e|0)==0){f=0;i=10;break}else{g=b;h=e}}if((i|0)==10){return f|0}return 0}function zj(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return 0}function Aj(d){d=d|0;var f=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0.0,o=0,p=0,q=0,r=0,s=0,t=0;f=d+92|0;c[f>>2]=jk((c[d+100>>2]<<2)+4|0)|0;g=d+96|0;c[g>>2]=jk((c[d+104>>2]<<2)+4|0)|0;i=c[d+84>>2]|0;j=c[i>>2]|0;if((j|0)==0){return}k=d+32|0;d=i;i=j;do{j=i+82|0;l=b[j>>1]|0;m=l&65535;n=+h[i+72>>3];if(l<<16>>16==1){o=~~n}else{p=~~((n- +(da((a[k]|0)-1|0,m-1|0)|0))/+(m|0));o=(p|0)>1?p:1}p=i+80|0;m=b[p>>1]|0;q=m&65535;n=+h[i+64>>3];if(m<<16>>16==1){r=~~n}else{s=~~((n- +(da((a[k]|0)-1|0,q-1|0)|0))/+(q|0));r=(s|0)>1?s:1}s=i+86|0;if(l<<16>>16==0){t=m}else{m=e[s>>1]|0;do{l=(c[f>>2]|0)+(m<<2)|0;q=c[l>>2]|0;c[l>>2]=(q|0)>(o|0)?q:o;m=m+1|0;}while((m|0)<((e[j>>1]|0)+(e[s>>1]|0)|0));t=b[p>>1]|0}s=i+84|0;if(t<<16>>16!=0){j=e[s>>1]|0;do{m=(c[g>>2]|0)+(j<<2)|0;q=c[m>>2]|0;c[m>>2]=(q|0)>(r|0)?q:r;j=j+1|0;}while((j|0)<((e[p>>1]|0)+(e[s>>1]|0)|0))}d=d+4|0;i=c[d>>2]|0;}while((i|0)!=0);return}function Bj(a,d,f){a=a|0;d=d|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;g=i;j=a+104|0;k=a+100|0;if((c[j>>2]|0)>=0){l=f+8|0;m=0;n=0;while(1){if(n>>>0<21>>>0){o=c[17880+(n<<2)>>2]|0}else{nb(177168,115352,(p=i,i=i+8|0,c[p>>2]=n,p)|0)|0;i=p;o=177168}q=Ax(f,o,1)|0;Wx(q|0,108248,304,1)|0;r=q+8|0;c[(c[r>>2]|0)+176>>2]=0;s=jk((c[k>>2]<<2)+4|0)|0;c[(c[r>>2]|0)+172>>2]=s;c[(c[r>>2]|0)+184>>2]=0;s=jk((c[k>>2]<<2)+4|0)|0;c[(c[r>>2]|0)+180>>2]=s;if((m|0)==0){c[(c[l>>2]|0)+180>>2]=q}else{c[(c[m+8>>2]|0)+164>>2]=q}if((n|0)<(c[j>>2]|0)){m=q;n=n+1|0}else{break}}}if((c[k>>2]|0)>=0){n=d+8|0;m=0;l=0;while(1){if(l>>>0<21>>>0){t=c[17880+(l<<2)>>2]|0}else{nb(177168,115352,(p=i,i=i+8|0,c[p>>2]=l,p)|0)|0;i=p;t=177168}o=Ax(d,t,1)|0;Wx(o|0,108248,304,1)|0;q=o+8|0;c[(c[q>>2]|0)+176>>2]=0;s=jk((c[j>>2]<<2)+4|0)|0;c[(c[q>>2]|0)+172>>2]=s;c[(c[q>>2]|0)+184>>2]=0;s=jk((c[j>>2]<<2)+4|0)|0;c[(c[q>>2]|0)+180>>2]=s;if((m|0)==0){c[(c[n>>2]|0)+180>>2]=o}else{c[(c[m+8>>2]|0)+164>>2]=o}if((l|0)<(c[k>>2]|0)){m=o;l=l+1|0}else{break}}}l=c[a+84>>2]|0;a=c[l>>2]|0;if((a|0)==0){Dj(f);Dj(d);i=g;return}else{u=l;v=a}do{a=v+84|0;l=b[a>>1]|0;m=l&65535;if((l&65535)>>>0<21>>>0){w=c[17880+(m<<2)>>2]|0}else{nb(177168,115352,(p=i,i=i+8|0,c[p>>2]=m,p)|0)|0;i=p;w=177168}m=Ax(f,w,0)|0;l=(e[v+80>>1]|0)+(e[a>>1]|0)|0;if(l>>>0<21>>>0){x=c[17880+(l<<2)>>2]|0}else{nb(177168,115352,(p=i,i=i+8|0,c[p>>2]=l,p)|0)|0;i=p;x=177168}l=Ax(f,x,0)|0;Cj(f,m,l,~~+h[v+64>>3]);l=v+86|0;m=b[l>>1]|0;a=m&65535;if((m&65535)>>>0<21>>>0){y=c[17880+(a<<2)>>2]|0}else{nb(177168,115352,(p=i,i=i+8|0,c[p>>2]=a,p)|0)|0;i=p;y=177168}a=Ax(d,y,0)|0;m=(e[v+82>>1]|0)+(e[l>>1]|0)|0;if(m>>>0<21>>>0){z=c[17880+(m<<2)>>2]|0}else{nb(177168,115352,(p=i,i=i+8|0,c[p>>2]=m,p)|0)|0;i=p;z=177168}m=Ax(d,z,0)|0;Cj(d,a,m,~~+h[v+72>>3]);u=u+4|0;v=c[u>>2]|0;}while((v|0)!=0);Dj(f);Dj(d);i=g;return}function Cj(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0;g=uw(a,d,e,0,0)|0;if((g|0)!=0){h=(c[g+8>>2]|0)+170|0;g=b[h>>1]|0;b[h>>1]=(g&65535|0)>(f|0)?g:f&65535;return}g=uw(a,d,e,0,1)|0;Wx(g|0,131624,176,1)|0;b[(c[g+8>>2]|0)+170>>1]=f;f=d+8|0;d=(c[f>>2]|0)+180|0;a=c[d>>2]|0;if((a|0)==0){i=kk((c[d+4>>2]<<2)+8|0)|0}else{i=mk(a,(c[d+4>>2]<<2)+8|0)|0}c[(c[f>>2]|0)+180>>2]=i;i=(c[f>>2]|0)+184|0;d=c[i>>2]|0;c[i>>2]=d+1;c[(c[(c[f>>2]|0)+180>>2]|0)+(d<<2)>>2]=g;d=(c[f>>2]|0)+180|0;c[(c[d>>2]|0)+(c[d+4>>2]<<2)>>2]=0;d=e+8|0;e=(c[d>>2]|0)+172|0;f=c[e>>2]|0;if((f|0)==0){j=kk((c[e+4>>2]<<2)+8|0)|0}else{j=mk(f,(c[e+4>>2]<<2)+8|0)|0}c[(c[d>>2]|0)+172>>2]=j;j=(c[d>>2]|0)+176|0;e=c[j>>2]|0;c[j>>2]=e+1;c[(c[(c[d>>2]|0)+172>>2]|0)+(e<<2)>>2]=g;g=(c[d>>2]|0)+172|0;c[(c[g>>2]|0)+(c[g+4>>2]<<2)>>2]=0;return}function Dj(a){a=a|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;d=c[(c[a+8>>2]|0)+180>>2]|0;e=c[(c[d+8>>2]|0)+164>>2]|0;if((e|0)==0){return}f=d;d=e;while(1){e=d;if((uw(a,f,e,0,0)|0)==0){g=uw(a,f,e,0,1)|0;Wx(g|0,131624,176,1)|0;b[(c[g+8>>2]|0)+170>>1]=0;h=f+8|0;i=(c[h>>2]|0)+180|0;j=c[i>>2]|0;if((j|0)==0){k=kk((c[i+4>>2]<<2)+8|0)|0}else{k=mk(j,(c[i+4>>2]<<2)+8|0)|0}c[(c[h>>2]|0)+180>>2]=k;i=(c[h>>2]|0)+184|0;j=c[i>>2]|0;c[i>>2]=j+1;c[(c[(c[h>>2]|0)+180>>2]|0)+(j<<2)>>2]=g;j=(c[h>>2]|0)+180|0;c[(c[j>>2]|0)+(c[j+4>>2]<<2)>>2]=0;j=d+8|0;h=(c[j>>2]|0)+172|0;i=c[h>>2]|0;if((i|0)==0){l=kk((c[h+4>>2]<<2)+8|0)|0}else{l=mk(i,(c[h+4>>2]<<2)+8|0)|0}c[(c[j>>2]|0)+172>>2]=l;h=(c[j>>2]|0)+176|0;i=c[h>>2]|0;c[h>>2]=i+1;c[(c[(c[j>>2]|0)+172>>2]|0)+(i<<2)>>2]=g;g=(c[j>>2]|0)+172|0;c[(c[g>>2]|0)+(c[g+4>>2]<<2)>>2]=0;m=j}else{m=d+8|0}j=c[(c[m>>2]|0)+164>>2]|0;if((j|0)==0){break}else{f=e;d=j}}return}function Ej(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;b=i;i=i+8|0;d=b|0;e=d;c[d>>2]=c[43484];d=c[a+100>>2]|0;do{if((d|0)!=1){f=a+104|0;if((c[f>>2]|0)==1){break}g=a+92|0;c[g>>2]=jk((d<<2)+4|0)|0;h=a+96|0;c[h>>2]=jk((c[f>>2]<<2)+4|0)|0;f=Hw(102640,e,0)|0;j=Hw(97e3,e,0)|0;Wx(f|0,91520,272,1)|0;Wx(j|0,91520,272,1)|0;Bj(a,f,j);ok(f,2,2147483647)|0;ok(j,2,2147483647)|0;k=c[(c[(c[(c[f+8>>2]|0)+180>>2]|0)+8>>2]|0)+164>>2]|0;if((k|0)!=0){l=0;m=0;n=k;while(1){k=n+8|0;c[(c[g>>2]|0)+(l<<2)>>2]=(c[(c[k>>2]|0)+232>>2]|0)-m;o=c[k>>2]|0;k=c[o+164>>2]|0;if((k|0)==0){break}else{l=l+1|0;m=c[o+232>>2]|0;n=k}}}n=j+8|0;m=c[(c[n>>2]|0)+180>>2]|0;l=c[(c[m+8>>2]|0)+164>>2]|0;if((l|0)==0){p=m}else{m=0;g=0;k=l;while(1){l=k+8|0;c[(c[h>>2]|0)+(m<<2)>>2]=(c[(c[l>>2]|0)+232>>2]|0)-g;o=c[l>>2]|0;l=c[o+164>>2]|0;if((l|0)==0){break}else{m=m+1|0;g=c[o+232>>2]|0;k=l}}p=c[(c[n>>2]|0)+180>>2]|0}if((p|0)!=0){k=p;do{g=k+8|0;m=c[g>>2]|0;h=c[m+172>>2]|0;if((h|0)==0){q=m}else{eF(h);q=c[g>>2]|0}h=c[q+180>>2]|0;if((h|0)==0){r=q}else{eF(h);r=c[g>>2]|0}k=c[r+164>>2]|0;}while((k|0)!=0)}Kw(f)|0;Kw(j)|0;i=b;return}}while(0);Aj(a);i=b;return}function Fj(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0.0,z=0.0;e=i;i=i+256|0;f=e|0;g=e+8|0;j=e+40|0;k=e+112|0;l=e+128|0;c[j+48>>2]=b;m=Sx(b)|0;if((m|0)==0){n=c[b+48>>2]|0;c[j+52>>2]=n;o=n}else if((m|0)==2){n=Hx(c[((c[b>>2]&3|0)==2?b:b-32|0)+28>>2]|0)|0;c[j+52>>2]=n;o=n}else if((m|0)==1){m=Hx(b)|0;c[j+52>>2]=m;o=m}else{o=c[j+52>>2]|0}m=j+52|0;n=c[o+48>>2]|0;h[j+32>>3]=+h[d+16>>3];c[j+16>>2]=c[d+4>>2];c[j+20>>2]=c[d+8>>2];o=j+40|0;c[o>>2]=c[o>>2]&-128;o=d|0;p=lj(c[o>>2]|0,f,j)|0;if((p|0)==0){Iv(k,128,l|0);a[d+82|0]=0;l=Sx(b)|0;do{if((l|0)==0){Lv(k,$w(b)|0)|0}else if((l|0)==1){Lv(k,$w(b)|0)|0}else if((l|0)==2){q=b;r=b;Lv(k,$w(c[((c[r>>2]&3|0)==3?q:b+32|0)+28>>2]|0)|0)|0;s=b-32|0;Lv(k,$w(c[((c[r>>2]&3|0)==2?q:s)+28>>2]|0)|0)|0;if((Nw(Hx(c[((c[r>>2]&3|0)==2?q:s)+28>>2]|0)|0)|0)==0){Lv(k,133720)|0;break}else{Lv(k,136608)|0;break}}}while(0);l=k+4|0;s=c[l>>2]|0;if(s>>>0<(c[k+8>>2]|0)>>>0){t=s}else{Jv(k,1)|0;t=c[l>>2]|0}a[t]=0;t=c[k>>2]|0;c[l>>2]=t;l=Lb(t|0)|0;c[o>>2]=l;if((c[d+12>>2]|0)==1){u=kn(l)|0}else{u=hn(l,c[m>>2]|0)|0}eF(c[o>>2]|0);c[o>>2]=u;_j(c[(c[n+8>>2]|0)+136>>2]|0,d);Mv(k);v=c[f>>2]|0;i=e;return v|0}k=p+4|0;if((a[k]|0)==1){u=p|0;do{if((c[(c[u>>2]|0)+24>>2]|0)==0){m=ew(b,142240)|0;if((m|0)==0){w=23}else{if((a[m]|0)==0){w=23}}if((w|0)==23){m=ew(b,139152)|0;if((m|0)==0){break}if((a[m]|0)==0){break}}m=ew(b,142240)|0;if((m|0)==0){w=27}else{if((a[m]|0)==0){w=27}else{x=m}}do{if((w|0)==27){m=ew(b,139152)|0;if((m|0)!=0){if((a[m]|0)!=0){x=m;break}}x=0}}while(0);m=Lb(x|0)|0;c[(c[u>>2]|0)+24>>2]=m}}while(0);x=Gj(n,c[u>>2]|0,0,j)|0;c[f>>2]=c[f>>2]|x;x=c[u>>2]|0;y=(+h[x+64>>3]+1.0)*.5;z=(+h[x+72>>3]+1.0)*.5;u=g|0;h[u>>3]=-0.0-y;b=g+8|0;h[b>>3]=-0.0-z;w=g+16|0;h[w>>3]=y;m=g+24|0;h[m>>3]=z;Hj(x,g,15);h[d+24>>3]=+h[w>>3]- +h[u>>3];h[d+32>>3]=+h[m>>3]- +h[b>>3]}else{b=p;Ij(c[(c[n+8>>2]|0)+136>>2]|0,c[b>>2]|0,j);j=c[b>>2]|0;z=+h[j+24>>3]*.5;y=+h[j+32>>3]*.5;b=g;h[g>>3]=-0.0-z;h[g+8>>3]=-0.0-y;h[g+16>>3]=z;h[g+24>>3]=y;g=j+8|0;c[g>>2]=c[b>>2];c[g+4>>2]=c[b+4>>2];c[g+8>>2]=c[b+8>>2];c[g+12>>2]=c[b+12>>2];c[g+16>>2]=c[b+16>>2];c[g+20>>2]=c[b+20>>2];c[g+24>>2]=c[b+24>>2];c[g+28>>2]=c[b+28>>2];h[d+24>>3]=z+z;h[d+32>>3]=y+y}c[d+72>>2]=p;if((a[k]|0)!=1){v=c[f>>2]|0;i=e;return v|0}eF(c[o>>2]|0);c[o>>2]=Lb(86272)|0;v=c[f>>2]|0;i=e;return v|0}function Gj(f,g,j,k){f=f|0;g=g|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0.0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0;l=i;m=g+108|0;n=c[m>>2]|0;do{if((n|0)!=0){o=k+16|0;p=c[o>>2]|0;do{if((p|0)!=0){q=n|0;if((c[q>>2]|0)==0){c[43752]=0;break}else{c[43752]=p;c[o>>2]=c[q>>2];break}}}while(0);o=k+20|0;p=c[o>>2]|0;do{if((p|0)!=0){q=n+4|0;if((c[q>>2]|0)==0){c[43753]=0;break}else{c[43753]=p;c[o>>2]=c[q>>2];break}}}while(0);o=k+32|0;r=+h[o>>3];if(r<0.0){break}p=n+16|0;if(+h[p>>3]<0.0){h[21878]=-1.0;break}else{h[21878]=r;h[o>>3]=+h[p>>3];break}}}while(0);c[g+80>>2]=j;j=g+84|0;n=c[j>>2]|0;p=Dk()|0;o=Uj()|0;q=Zg(n)|0;if((q|0)==0){s=0}else{t=1;u=0;v=q;while(1){q=Zg(c[v+8>>2]|0)|0;if((q|0)==0){w=u}else{x=u;y=q;while(1){q=x+1|0;z=c[y>>2]|0;if((z|0)==0){w=q;break}else{x=q;y=z}}}if((a[v+12|0]|0)!=0){Vj(o,t)}y=c[v>>2]|0;if((y|0)==0){s=w;break}else{t=t+1|0;u=w;v=y}}}v=jk((s<<2)+4|0)|0;c[j>>2]=v;j=Zg(n)|0;if((j|0)==0){A=0;B=0;C=0}else{s=0;w=v;v=0;u=0;t=0;y=j;while(1){j=Zg(c[y+8>>2]|0)|0;if((j|0)==0){D=w;E=v;F=u;G=t}else{x=s&65535;z=0;q=w;H=v;I=u;J=t;K=j;while(1){j=c[K+8>>2]|0;L=q+4|0;c[q>>2]=j;M=Jj(f,j,g,k)|0|H;N=j+80|0;O=b[N>>1]|0;P=(O&65535)-1|0;do{if(O<<16>>16==0){Q=z;R=25}else{S=z;a:while(1){T=P+S|0;while(1){if((Ik(p,T,s)|0)!=0){break}if((T|0)>(S|0)){T=T-1|0}else{break a}}S=T+1|0}U=b[N>>1]|0;if(U<<16>>16==0){Q=S;R=25;break}V=j+82|0;W=b[V>>1]|0;X=S;Y=W;Z=U;U=W;while(1){if(Y<<16>>16==0){_=0;$=Z;aa=U}else{W=s;do{Gk(p,X,W);W=W+1|0;ba=b[V>>1]|0;}while((W|0)<((ba&65535)+s|0));_=ba;$=b[N>>1]|0;aa=ba}W=X+1|0;if((W|0)<(($&65535)+S|0)){X=W;Y=_;Z=$;U=aa}else{ca=$;ea=aa;fa=S;break}}}}while(0);if((R|0)==25){R=0;ca=0;ea=b[j+82>>1]|0;fa=Q}b[j+86>>1]=x;b[j+84>>1]=fa;N=(ca&65535)+fa|0;P=(N|0)>(J|0)?N:J;O=(ea&65535)+s|0;S=(O|0)>(I|0)?O:I;if((Wj(o,O)|0)!=0){O=j+100|0;a[O]=a[O]|2}O=c[K>>2]|0;if((O|0)==0){D=L;E=M;F=S;G=P;break}else{z=N;q=L;H=M;I=S;J=P;K=O}}}K=c[y>>2]|0;if((K|0)==0){A=E;B=F;C=G;break}else{s=s+1|0;w=D;v=E;u=F;t=G;y=K}}}y=g+100|0;c[y>>2]=B;B=g+104|0;c[B>>2]=C;Vg(n)|0;Vg(o)|0;Ek(p);p=g+36|0;o=b[p>>1]|0;if((o&128)==0){a[g+32|0]=2}n=g+33|0;if((o&32)==0){a[n]=1}Ej(g);o=c[B>>2]|0;B=a[g+32|0]|0;C=da(B,o+1|0)|0;G=d[n]<<1;n=G+C|0;C=c[y>>2]|0;y=(da(C+1|0,B)|0)+G|0;if((o|0)>0){G=c[g+96>>2]|0;B=0;t=n;while(1){F=(c[G+(B<<2)>>2]|0)+t|0;u=B+1|0;if((u|0)<(o|0)){B=u;t=F}else{ga=F;break}}}else{ga=n}if((C|0)>0){n=c[g+92>>2]|0;t=0;B=y;while(1){o=(c[n+(t<<2)>>2]|0)+B|0;G=t+1|0;if((G|0)<(C|0)){t=G;B=o}else{ha=o;break}}}else{ha=y}y=g+38|0;b:do{if((b[p>>1]&1)==0){ia=A;ja=ha;ka=ga}else{B=b[y>>1]|0;t=B&65535;do{if(B<<16>>16!=0){C=b[g+40>>1]|0;if(C<<16>>16==0){break}if(!((t|0)<(ga|0)|(C&65535|0)<(ha|0))){ia=A;ja=0;ka=0;break b}Fv(0,159600,(la=i,i=i+1|0,i=i+7&-8,c[la>>2]=0,la)|0)|0;i=la;ia=1;ja=0;ka=0;break b}}while(0);Fv(0,154576,(la=i,i=i+1|0,i=i+7&-8,c[la>>2]=0,la)|0)|0;i=la;ia=1;ja=ha;ka=ga}}while(0);ga=e[y>>1]|0;h[g+64>>3]=+(((ka|0)>(ga|0)?ka:ga)|0);ga=e[g+40>>1]|0;h[g+72>>3]=+(((ja|0)>(ga|0)?ja:ga)|0);if((c[m>>2]|0)==0){i=l;return ia|0}m=c[43752]|0;if((m|0)!=0){c[k+16>>2]=m}m=c[43753]|0;if((m|0)!=0){c[k+20>>2]=m}r=+h[21878];if(r<0.0){i=l;return ia|0}h[k+32>>3]=r;i=l;return ia|0}function Hj(f,g,j){f=f|0;g=g|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0.0,s=0,t=0,u=0.0,v=0,w=0.0,x=0.0,y=0,z=0,A=0,B=0,C=0.0,D=0.0,E=0,F=0,G=0.0,H=0.0,I=0.0,J=0.0,K=0,L=0,M=0,N=0.0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0.0,_=0.0,$=0.0,aa=0.0,ba=0,ca=0,ea=0.0,fa=0.0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0;k=i;i=i+32|0;l=g;g=i;i=i+32|0;tF(g,l,32)|0;l=k|0;m=c[f+84>>2]|0;n=c[f+80>>2]|0;do{if((n|0)!=0){o=c[n+24>>2]|0;if((o|0)==0){break}p=f+24|0;if((c[p>>2]|0)!=0){break}c[p>>2]=Lb(o|0)|0}}while(0);n=f+48|0;o=g+16|0;q=+h[o>>3];p=g|0;r=+h[p>>3];s=~~(q-r- +(~~+h[f+64>>3]|0));if((s|0)<=-1){cc(81552,167808,1708,170064)}t=g+24|0;u=+h[t>>3];v=g+8|0;w=+h[v>>3];x=+(~~+h[f+72>>3]|0);y=~~(u-w-x);if((y|0)<=-1){cc(163632,167808,1711,170064)}z=e[f+36>>1]|0;do{if((z&1|0)==0){A=y;B=s;C=r;D=u}else{do{if((s|0)>0){E=z&6;if((E|0)==4){h[o>>3]=r+x;F=0;G=r;break}else if((E|0)==2){H=+(s|0);h[o>>3]=q+H;I=H+r;h[p>>3]=I;F=0;G=I;break}else{I=+((s|0)/2|0|0);H=r+I;h[p>>3]=H;h[o>>3]=q-I;F=0;G=H;break}}else{F=s;G=r}}while(0);if((y|0)<=0){A=y;B=F;C=G;D=u;break}E=z&24;if((E|0)==8){H=+(y|0);I=H+u;h[t>>3]=I;h[v>>3]=H+w;A=0;B=F;C=G;D=I;break}else if((E|0)==16){I=x+w;h[t>>3]=I;A=0;B=F;C=G;D=I;break}else{I=+((y|0)/2|0|0);h[v>>3]=w+I;H=u-I;h[t>>3]=H;A=0;B=F;C=G;D=H;break}}}while(0);F=f+33|0;t=a[F]|0;v=f+32|0;y=a[v]|0;z=f+104|0;s=c[z>>2]|0;o=(B|0)/(s|0)|0;p=B-(da(o,s)|0)|0;G=+(p|0);if((p|0)>-1){J=G+.5}else{J=G+-.5}p=~~J;if((s|0)<0){K=t;L=y}else{s=f+96|0;B=0;E=~~(+(y<<24>>24|0)+(C+ +(t&255|0)));while(1){t=(c[s>>2]|0)+(B<<2)|0;y=c[t>>2]|0;c[t>>2]=E;M=a[v]|0;t=E+o+((B|0)<(p|0))+y+(M<<24>>24)|0;if((B|0)<(c[z>>2]|0)){B=B+1|0;E=t}else{break}}K=a[F]|0;L=M}M=f+100|0;F=c[M>>2]|0;E=(A|0)/(F|0)|0;B=A-(da(E,F)|0)|0;C=+(B|0);if((B|0)>-1){N=C+.5}else{N=C+-.5}B=~~N;if((F|0)>=0){F=f+92|0;A=~~(D- +(K&255|0)- +(L<<24>>24|0));L=0;while(1){K=(c[F>>2]|0)+(L<<2)|0;p=c[K>>2]|0;c[K>>2]=A;if((L|0)<(c[M>>2]|0)){A=A-E+(((L|0)<(B|0))<<31>>31)-p-(a[v]|0)|0;L=L+1|0}else{break}}}L=c[m>>2]|0;if((L|0)==0){O=j&255;P=f+35|0;a[P]=O;Q=n;R=g;c[Q>>2]=c[R>>2];c[Q+4>>2]=c[R+4>>2];c[Q+8>>2]=c[R+8>>2];c[Q+12>>2]=c[R+12>>2];c[Q+16>>2]=c[R+16>>2];c[Q+20>>2]=c[R+20>>2];c[Q+24>>2]=c[R+24>>2];c[Q+28>>2]=c[R+28>>2];i=k;return}B=(j|0)==0;E=f+96|0;A=f+92|0;F=l;p=l|0;K=l+8|0;o=l+16|0;s=l+24|0;t=m;m=L;do{t=t+4|0;L=b[m+84>>1]|0;if(B){S=0;T=b[m+80>>1]|0;U=b[m+86>>1]|0;V=b[m+82>>1]|0}else{y=L<<16>>16==0?8:0;W=b[m+86>>1]|0;X=W<<16>>16==0?y|4:y;y=b[m+80>>1]|0;Y=b[m+82>>1]|0;S=((Y&65535)+(W&65535)|0)==(c[M>>2]|0)|(((y&65535)+(L&65535)|0)==(c[z>>2]|0)?X|2:X);T=y;U=W;V=Y}Y=L&65535;L=c[E>>2]|0;D=+(c[L+(Y<<2)>>2]|0);W=a[v]|0;N=+((c[L+((T&65535)+Y<<2)>>2]|0)-W|0);Y=U&65535;L=c[A>>2]|0;C=+(c[L+(Y<<2)>>2]|0);J=+((c[L+((V&65535)+Y<<2)>>2]|0)+W|0);W=S&j;Y=m+24|0;do{if((c[Y>>2]|0)==0){L=c[(c[m+96>>2]|0)+24>>2]|0;if((L|0)==0){break}c[Y>>2]=Lb(L|0)|0}}while(0);Y=m+36|0;L=e[Y>>1]|0;y=m+64|0;do{if((L&1|0)==0){Z=D;_=J;$=N;aa=C;ba=m+72|0}else{G=+h[y>>3];X=m+72|0;u=+h[X>>3];w=N-D-G;do{if(w>0.0){ca=L&6;if((ca|0)==2){ea=D+w;fa=N+w;break}else if((ca|0)==4){ea=D;fa=D+G;break}else{x=w*.5;ea=D+x;fa=N-x;break}}else{ea=D;fa=N}}while(0);w=C-J-u;if(w<=0.0){Z=ea;_=J;$=fa;aa=C;ba=X;break}ca=L&24;if((ca|0)==16){Z=ea;_=J;$=fa;aa=J+u;ba=X;break}else if((ca|0)==8){Z=ea;_=J+w;$=fa;aa=C+w;ba=X;break}else{G=w*.5;Z=ea;_=J+G;$=fa;aa=C-G;ba=X;break}}}while(0);h[m+48>>3]=Z;h[m+56>>3]=_;h[y>>3]=$;h[ba>>3]=aa;a[m+35|0]=W;C=+(d[m+33|0]|0);J=+(d[m+34|0]|0);N=Z+C+J;h[p>>3]=N;D=_+C+J;h[K>>3]=D;G=$-C-J;h[o>>3]=G;w=aa-C-J;h[s>>3]=w;ca=m+88|0;ga=a[m+92|0]|0;do{if((ga<<24>>24|0)==1){Hj(c[ca>>2]|0,l,W)}else if((ga<<24>>24|0)==3){ha=c[ca>>2]|0;J=+h[ha+24>>3];C=G-N- +h[ha+16>>3];do{if(C>0.0){ia=L&6;if((ia|0)==2){h[p>>3]=N+C;break}else if((ia|0)==4){h[o>>3]=G-C;break}else{break}}}while(0);C=w-D-J;do{if(C>0.0){X=L&24;if((X|0)==16){h[s>>3]=w-C;break}else if((X|0)==8){h[K>>3]=D+C;break}else{break}}}while(0);X=ha;c[X>>2]=c[F>>2];c[X+4>>2]=c[F+4>>2];c[X+8>>2]=c[F+8>>2];c[X+12>>2]=c[F+12>>2];c[X+16>>2]=c[F+16>>2];c[X+20>>2]=c[F+20>>2];c[X+24>>2]=c[F+24>>2];c[X+28>>2]=c[F+28>>2]}else{X=ca;ia=c[X>>2]|0;C=+h[ia+32>>3];J=G-N- +h[ia+24>>3];do{if(J>0.0){ja=L&6;if((ja|0)==2){h[p>>3]=N+J;break}else if((ja|0)==4){h[o>>3]=G-J;break}else if((ja|0)==6){break}else{u=J*.5;h[p>>3]=N+u;h[o>>3]=G-u;break}}}while(0);J=w-D-C;do{if(J>0.0){ha=L&24;if((ha|0)==8){h[K>>3]=D+J;break}else if((ha|0)==16){h[s>>3]=w-J;break}else{u=J*.5;h[K>>3]=D+u;h[s>>3]=w-u;break}}}while(0);ha=ia+8|0;c[ha>>2]=c[F>>2];c[ha+4>>2]=c[F+4>>2];c[ha+8>>2]=c[F+8>>2];c[ha+12>>2]=c[F+12>>2];c[ha+16>>2]=c[F+16>>2];c[ha+20>>2]=c[F+20>>2];c[ha+24>>2]=c[F+24>>2];c[ha+28>>2]=c[F+28>>2];ha=b[Y>>1]&768;if((ha|0)==256){ka=114}else if((ha|0)==512){ka=108}else{ka=110}ha=c[X>>2]|0;ja=ha+4|0;la=b[ja>>1]|0;if(la<<16>>16<=0){break}ma=ha|0;ha=0;na=la;while(1){la=(c[ma>>2]|0)+(ha*24|0)+6|0;if((a[la]|0)==0){a[la]=ka;oa=b[ja>>1]|0}else{oa=na}la=ha+1|0;if((la|0)<(oa<<16>>16|0)){ha=la;na=oa}else{break}}}}while(0);m=c[t>>2]|0;}while((m|0)!=0);O=j&255;P=f+35|0;a[P]=O;Q=n;R=g;c[Q>>2]=c[R>>2];c[Q+4>>2]=c[R+4>>2];c[Q+8>>2]=c[R+8>>2];c[Q+12>>2]=c[R+12>>2];c[Q+16>>2]=c[R+16>>2];c[Q+20>>2]=c[R+20>>2];c[Q+24>>2]=c[R+24>>2];c[Q+28>>2]=c[R+28>>2];i=k;return}function Ij(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0.0,s=0.0,t=0.0,u=0,v=0,w=0,x=0,y=0.0,z=0,A=0,B=0,C=0,D=0,E=0,F=0.0,G=0,H=0,I=0,J=0,K=0.0,L=0,M=0.0,N=0,O=0.0,P=0,Q=0.0,R=0,S=0,T=0,U=0,V=0,W=0.0,X=0.0,Y=0,Z=0,_=0,$=0,aa=0,ba=0.0,ca=0.0,da=0,ea=0.0,fa=0.0,ga=0.0,ha=0.0,ia=0.0,ja=0.0,ka=0.0,la=0.0,ma=0,na=0.0;g=i;i=i+104|0;j=g|0;k=g+56|0;l=g+88|0;m=k;c[m>>2]=c[2950];c[m+4>>2]=c[2951];c[m+8>>2]=c[2952];c[m+12>>2]=c[2953];c[m+16>>2]=c[2954];c[m+20>>2]=c[2955];c[m+24>>2]=c[2956];c[m+28>>2]=c[2957];n=e|0;o=e+4|0;p=b[o>>1]|0;q=p<<16>>16>0;if(!q){a[e+6|0]=1;r=0.0;s=0.0;t=0.0;u=p;v=e+24|0;h[v>>3]=s;w=u<<16>>16==1;x=e+32|0;y=w?t:r;h[x>>3]=y;i=g;return}z=f+32|0;A=k+16|0;B=f+16|0;C=k|0;D=c[n>>2]|0;E=0;F=-1.0;G=0;a:while(1){if((b[D+(E*24|0)+4>>1]|0)>1){H=0;break}I=D+(E*24|0)|0;J=c[(c[I>>2]|0)+4>>2]|0;do{if((J|0)==0){K=+h[z>>3];h[A>>3]=K;L=c[B>>2]|0;c[C>>2]=L;M=K;N=L}else{if((c[J+24>>2]&127|0)!=0){H=0;break a}K=+h[J+16>>3];if(K>0.0){O=K}else{O=+h[z>>3]}h[A>>3]=O;L=c[c[(c[I>>2]|0)+4>>2]>>2]|0;if((L|0)==0){P=c[B>>2]|0;c[C>>2]=P;M=O;N=P;break}else{c[C>>2]=L;M=O;N=L;break}}}while(0);if(F==-1.0){Q=M}else{if(M!=F){H=0;break}else{Q=F}}if((G|0)==0){R=N}else{if((Ya(N|0,G|0)|0)==0){R=G}else{H=0;break}}I=E+1|0;if((I|0)<(p<<16>>16|0)){E=I;F=Q;G=R}else{H=1;break}}a[e+6|0]=H;if(!q){r=0.0;s=0.0;t=0.0;u=p;v=e+24|0;h[v>>3]=s;w=u<<16>>16==1;x=e+32|0;y=w?t:r;h[x>>3]=y;i=g;return}p=(H|0)==0;H=f+48|0;q=j|0;R=f+32|0;G=k+16|0;E=f+16|0;N=k|0;C=f+20|0;B=k+4|0;A=f+40|0;f=k+24|0;k=d+144|0;z=j+4|0;D=l|0;I=l+8|0;J=j+16|0;L=j+24|0;P=j+8|0;S=j+12|0;Q=0.0;F=0.0;M=0.0;T=0;U=c[n>>2]|0;while(1){if((b[U+(T*24|0)+4>>1]|0)>0){O=0.0;V=0;K=0.0;W=0.0;X=0.0;Y=U;while(1){c[q>>2]=fk(c[(c[Y+(T*24|0)>>2]|0)+(V*56|0)>>2]|0,c[H>>2]|0)|0;Z=(c[n>>2]|0)+(T*24|0)|0;_=c[(c[Z>>2]|0)+(V*56|0)+4>>2]|0;do{if((_|0)==0){h[G>>3]=+h[R>>3];c[N>>2]=c[E>>2];c[B>>2]=c[C>>2];c[f>>2]=c[f>>2]&-128|c[A>>2]&127}else{$=c[_+24>>2]<<25>>25;do{if(($|0)==0){aa=c[A>>2]|0;if((aa<<25>>25|0)>0<<25>>25&127){c[f>>2]=c[f>>2]&-128|aa&127;break}else{c[f>>2]=c[f>>2]&-128;break}}else{c[f>>2]=c[f>>2]&-128|$&127}}while(0);ba=+h[(c[(c[Z>>2]|0)+(V*56|0)+4>>2]|0)+16>>3];if(ba>0.0){ca=ba}else{ca=+h[R>>3]}h[G>>3]=ca;$=c[c[(c[Z>>2]|0)+(V*56|0)+4>>2]>>2]|0;if(($|0)==0){da=c[E>>2]|0}else{da=$}c[N>>2]=da;$=c[(c[(c[Z>>2]|0)+(V*56|0)+4>>2]|0)+4>>2]|0;if(($|0)==0){c[B>>2]=c[C>>2];break}else{c[B>>2]=$;break}}}while(0);Z=c[k>>2]|0;c[z>>2]=Hc[c[Z>>2]&63](Z,m,1)|0;sm(l,d,j);ba=+h[D>>3];ea=+h[I>>3];eF(c[(c[(c[n>>2]|0)+(T*24|0)>>2]|0)+(V*56|0)>>2]|0);c[(c[(c[n>>2]|0)+(T*24|0)>>2]|0)+(V*56|0)>>2]=c[q>>2];h[(c[(c[n>>2]|0)+(T*24|0)>>2]|0)+(V*56|0)+32>>3]=ba;h[(c[(c[n>>2]|0)+(T*24|0)>>2]|0)+(V*56|0)+16>>3]=+h[J>>3];h[(c[(c[n>>2]|0)+(T*24|0)>>2]|0)+(V*56|0)+24>>3]=+h[L>>3];c[(c[(c[n>>2]|0)+(T*24|0)>>2]|0)+(V*56|0)+4>>2]=c[z>>2];c[(c[(c[n>>2]|0)+(T*24|0)>>2]|0)+(V*56|0)+8>>2]=c[P>>2];c[(c[(c[n>>2]|0)+(T*24|0)>>2]|0)+(V*56|0)+12>>2]=c[S>>2];fa=K+ba;ba=+h[G>>3];ga=ba>O?ba:O;ba=ea>X?ea:X;ea=+h[L>>3];ha=ea>W?ea:W;Z=V+1|0;_=c[n>>2]|0;if((Z|0)<(b[_+(T*24|0)+4>>1]|0)){O=ga;V=Z;K=fa;W=ha;X=ba;Y=_}else{ia=ga;ja=fa;ka=ha;la=ba;ma=_;break}}}else{ia=0.0;ja=0.0;ka=0.0;la=0.0;ma=U}h[ma+(T*24|0)+8>>3]=ja;Y=(T|0)==0;do{if(p){if(Y){h[(c[n>>2]|0)+16>>3]=ia-ka;na=ia;break}else{h[(c[n>>2]|0)+(T*24|0)+16>>3]=F+ia-Q-ka;na=ia;break}}else{V=(c[n>>2]|0)+(T*24|0)+16|0;if(Y){h[V>>3]=ia;na=la;break}else{h[V>>3]=la;na=la;break}}}while(0);Y=c[n>>2]|0;X=ja>M?ja:M;W=F+na;V=T+1|0;_=b[o>>1]|0;if((V|0)<(_<<16>>16|0)){Q=Q+ +h[Y+(T*24|0)+16>>3];F=W;M=X;T=V;U=Y}else{r=W;s=X;t=la;u=_;break}}v=e+24|0;h[v>>3]=s;w=u<<16>>16==1;x=e+32|0;y=w?t:r;h[x>>3]=y;i=g;return}function Jj(f,g,j,k){f=f|0;g=g|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0.0,B=0.0,C=0.0,D=0,E=0.0,F=0.0;l=i;i=i+8|0;m=l|0;c[g+96>>2]=j;n=g+36|0;o=b[n>>1]|0;do{if((o&64)==0){if((b[j+36>>1]&64)==0){a[g+34|0]=2;break}else{a[g+34|0]=a[j+34|0]|0;break}}}while(0);do{if((o&32)==0){p=a[j+88|0]|0;if(p<<24>>24>-1){a[g+33|0]=p;break}if((b[j+36>>1]&32)==0){a[g+33|0]=1;break}else{a[g+33|0]=a[j+33|0]|0;break}}}while(0);j=g+88|0;o=g+92|0;p=a[o]|0;if((p<<24>>24|0)==1){q=j|0;r=Gj(f,c[q>>2]|0,g,k)|0;s=c[q>>2]|0;t=r;u=s+64|0;v=s+72|0}else if((p<<24>>24|0)==3){p=j;s=c[p>>2]|0;r=k+52|0;q=s+32|0;FB(m,c[r>>2]|0,c[q>>2]|0);w=c[m>>2]|0;x=c[m+4>>2]|0;if((w|0)==-1&(x|0)==-1){Fv(1,145200,(y=i,i=i+8|0,c[y>>2]=c[q>>2],y)|0)|0;i=y;z=1;A=0.0;B=0.0}else{a[(c[(c[r>>2]|0)+8>>2]|0)+114|0]=1;z=0;A=+(x|0);B=+(w|0)}vF(s|0,0,16)|0;h[s+16>>3]=B;h[s+24>>3]=A;s=c[p>>2]|0;t=z;u=s+16|0;v=s+24|0}else{s=j;Ij(c[(c[f+8>>2]|0)+136>>2]|0,c[s>>2]|0,k);k=c[s>>2]|0;t=0;u=k+24|0;v=k+32|0}A=+((d[g+33|0]|0)+(d[g+34|0]|0)<<1|0);B=+h[u>>3]+A;C=+h[v>>3]+A;v=g+38|0;a:do{if((b[n>>1]&1)==0){D=t;E=B;F=C}else{u=b[v>>1]|0;k=u&65535;do{if(u<<16>>16!=0){s=b[g+40>>1]|0;if(s<<16>>16==0){break}if(+(k|0)>=B){if(+(s&65535|0)>=C){D=t;E=0.0;F=0.0;break a}}if((a[o]|0)==3){D=t;E=0.0;F=0.0;break a}Fv(0,151304,(y=i,i=i+1|0,i=i+7&-8,c[y>>2]=0,y)|0)|0;i=y;D=1;E=0.0;F=0.0;break a}}while(0);Fv(0,148360,(y=i,i=i+1|0,i=i+7&-8,c[y>>2]=0,y)|0)|0;i=y;D=1;E=B;F=C}}while(0);C=+(e[v>>1]|0);h[g+64>>3]=E>C?E:C;C=+(e[g+40>>1]|0);h[g+72>>3]=F>C?F:C;i=l;return D|0}function Kj(d,e,f,g,h,j){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;k=i;i=i+176|0;l=g;g=i;i=i+32|0;tF(g,l,32)|0;l=k|0;m=k+16|0;n=k+48|0;o=c[d+16>>2]|0;p=o+208|0;q=h|0;c[q>>2]=c[p>>2];r=o+228|0;c[h+4>>2]=c[r>>2];s=o+244|0;c[h+8>>2]=c[s>>2];t=o+212|0;c[h+12>>2]=c[t>>2];u=o+260|0;v=h+16|0;a[v]=b[u>>1]<<15<<16>>16>>15;h=c[f+16>>2]|0;if((h|0)==0){w=3}else{if((a[h]|0)==0){w=3}else{x=0;y=h}}if((w|0)==3){Iv(l,128,n|0);n=e+60|0;w=c[n>>2]|0;if((w|0)==0){h=Lb(Ih(d,c[o+8>>2]|0,l)|0)|0;c[n>>2]=h;a[e+64|0]=1;z=h}else{z=w}Lv(l,z)|0;z=m|0;m=c[44688]|0;c[44688]=m+1;nb(z|0,106104,(w=i,i=i+8|0,c[w>>2]=m,w)|0)|0;i=w;Lv(l,z)|0;z=l+4|0;w=c[z>>2]|0;if(w>>>0<(c[l+8>>2]|0)>>>0){A=w}else{Jv(l,1)|0;A=c[z>>2]|0}a[A]=0;A=c[l>>2]|0;c[z>>2]=A;x=1;y=A}A=Hh(d,0,c[f>>2]|0,c[f+12>>2]|0,c[f+8>>2]|0,y,c[o+8>>2]|0)|0;if(x){Mv(l)}if((A|0)==0){i=k;return A|0}do{if((j|0)!=0){if((c[q>>2]|0)==0){if((a[v]|0)==0){break}}hB(d)}}while(0);do{if((c[p>>2]|0)==0){if((b[u>>1]&1)!=0){break}i=k;return A|0}}while(0);Nh(d,g);gB(d,c[p>>2]|0,c[r>>2]|0,c[s>>2]|0,c[t>>2]|0);i=k;return A|0}function Lj(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var h=0,j=0,k=0,l=0.0;h=i;i=i+8|0;j=h|0;if((Vh(b,f,j)|0)<<24>>24==0){nB(a,b);k=1;lB(a,106536);i=h;return k|0}nB(a,c[f>>2]|0);b=c[f+4>>2]|0;l=+g[j>>2];if((b|0)==0){oB(a,127648,d,l)}else{oB(a,b,d,l)}k=e>>>1&1|2;lB(a,106536);i=h;return k|0}function Mj(e,f,g){e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0;j=i;i=i+104|0;k=g;g=i;i=i+32|0;tF(g,k,32)|0;k=j|0;l=j+32|0;m=j+96|0;n=c[f+24>>2]|0;lB(e,(n|0)==0?127648:n);n=f+42|0;o=b[n>>1]|0;if((o&384)==0){pB(e,c[(c[e>>2]|0)+336>>2]|0)}else{c[m+4>>2]=0;p=m|0;c[p>>2]=0;m=o&65535;do{if((m&256|0)==0){if((m&128|0)==0){break}c[p>>2]=106976}else{c[p>>2]=107656}}while(0);pB(e,p)}p=f+33|0;xB(e,+((d[p]|0)>>>0));if((b[n>>1]&4)==0){n=a[p]|0;if((n&255)>>>0>1>>>0){q=+((n&255)>>>0)*.5;n=g|0;h[n>>3]=q+ +h[n>>3];n=g+8|0;h[n>>3]=q+ +h[n>>3];n=g+16|0;h[n>>3]=+h[n>>3]-q;n=g+24|0;h[n>>3]=+h[n>>3]-q}sB(e,g,0);i=j;return}n=a[p]|0;p=g;tF(k|0,p|0,32)|0;tF(l|0,p|0,16)|0;p=l+32|0;g=p;f=k+16|0;c[g>>2]=c[f>>2];c[g+4>>2]=c[f+4>>2];c[g+8>>2]=c[f+8>>2];c[g+12>>2]=c[f+12>>2];if((n&255)>>>0>1>>>0){q=+(n&255|0)*.5;n=l|0;r=q+ +h[n>>3];h[n>>3]=r;n=l+8|0;s=q+ +h[n>>3];h[n>>3]=s;n=p|0;t=+h[n>>3]-q;h[n>>3]=t;n=l+40|0;u=+h[n>>3]-q;h[n>>3]=u;v=t;w=s;x=r;y=u}else{v=+h[p>>3];w=+h[l+8>>3];x=+h[l>>3];y=+h[l+40>>3]}h[l+16>>3]=v;h[l+24>>3]=w;h[l+48>>3]=x;h[l+56>>3]=y;ol(e,l|0,4,4,0);i=j;return}function Nj(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;g=c[d+16>>2]|0;h=g+208|0;if((c[h>>2]|0)==0){if((b[g+260>>1]&1)==0){i=0}else{j=3}}else{j=3}if((j|0)==3){hB(d);i=c[h>>2]|0}j=e|0;if((i|0)!=(c[j>>2]|0)){eF(i);c[h>>2]=c[j>>2]}j=g+228|0;i=c[j>>2]|0;k=e+4|0;if((i|0)!=(c[k>>2]|0)){eF(i);c[j>>2]=c[k>>2]}k=g+244|0;i=c[k>>2]|0;l=e+8|0;if((i|0)!=(c[l>>2]|0)){eF(i);c[k>>2]=c[l>>2]}l=g+212|0;i=c[l>>2]|0;m=e+12|0;if((i|0)==(c[m>>2]|0)){n=i}else{eF(i);i=c[m>>2]|0;c[l>>2]=i;n=i}i=g+260|0;g=a[e+16|0]&1;b[i>>1]=b[i>>1]&-2|g;if((f|0)==0){return}f=c[h>>2]|0;if((f|0)==0&g<<16>>16==0){return}gB(d,f,c[j>>2]|0,c[k>>2]|0,n);return}function Oj(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;e=i;i=i+8|0;f=e|0;g=ew(a|0,b)|0;if((g|0)==0){i=e;return}b=ac(g|0,120896,(g=i,i=i+8|0,c[g>>2]=f,g)|0)|0;i=g;if((b|0)<=0){i=e;return}h[d>>3]=+h[f>>3];i=e;return}function Pj(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0,y=0;e=i;i=i+8|0;f=e|0;g=jk(96)|0;j=b+8|0;c[(c[j>>2]|0)+8>>2]=g;g=b|0;k=ew(g,112632)|0;if((k|0)==0){l=Qb(112136)|0;if((l|0)!=0){m=l;n=3}}else{m=k;n=3}if((n|0)==3){k=c[44740]|0;l=mk(k,(xF(m|0)|0)+12|0)|0;c[44740]=l;tF(l|0,111552,12)|0;AF(l|0,m|0)|0;Ib(c[44740]|0)|0}m=Im(g,Wv(b,0,160360,0)|0,159864)|0;do{if((pm(m,159144)|0)==0){o=1}else{if((pm(m,158816)|0)==0){o=1;break}if((pm(m,158496)|0)==0){o=1;break}if((pm(m,165784)|0)==0){o=1;break}if((pm(m,158216)|0)==0){o=1;break}if((pm(m,157864)|0)==0){o=1;break}if((pm(m,157304)|0)==0){o=1;break}if((pm(m,156984)|0)==0){o=2;break}if((pm(m,156624)|0)==0){o=2;break}if((pm(m,159864)|0)==0){o=0;break}if((pm(m,155472)|0)==0){o=0;break}Fv(0,154880,(p=i,i=i+8|0,c[p>>2]=m,p)|0)|0;i=p;o=0}}while(0);a[(c[j>>2]|0)+115|0]=o;do{if((c[53686]|0)==0){o=ew(g,110872)|0;c[53702]=o;if((o|0)!=0){break}c[53702]=c[53704]}}while(0);q=+Fm(g,Wv(b,0,110144,0)|0,0.0,0.0);h[c[(c[j>>2]|0)+8>>2]>>3]=q;o=ew(g,109472)|0;do{if((o|0)==0){r=0}else{m=a[o]|0;if((m<<24>>24|0)==76){if((Ya(o|0,108656)|0)==0){r=1;break}}else if((m<<24>>24|0)==66){if((Ya(o|0,107640)|0)==0){r=2;break}}else if((m<<24>>24|0)==82){m=(Ya(o|0,106968)|0)==0;r=m?3:0;break}else{r=0;break}r=0}}while(0);o=r<<2;if(d<<24>>24==0){c[(c[j>>2]|0)+116>>2]=o}else{c[(c[j>>2]|0)+116>>2]=o|r}q=+Fm(g,Wv(b,0,106528,0)|0,.25,.02);h[f>>3]=q;s=q*72.0;if(s<0.0){t=s+-.5}else{t=s+.5}c[(c[j>>2]|0)+236>>2]=~~t;r=Hm(g,Wv(b,0,106096,0)|0,0)|0;do{if((r|0)==0){h[f>>3]=.5;u=.5}else{o=ac(r|0,120896,(p=i,i=i+8|0,c[p>>2]=f,p)|0)|0;i=p;do{if((o|0)==0){h[f>>3]=.5;v=.5}else{t=+h[f>>3];if(t>=.02){v=t;break}h[f>>3]=.02;v=.02}}while(0);if((Ua(r|0,105624)|0)==0){u=v;break}a[(c[j>>2]|0)+264|0]=1;u=+h[f>>3]}}while(0);v=u*72.0;if(v<0.0){w=v+-.5}else{w=v+.5}c[(c[j>>2]|0)+240>>2]=~~w;f=(Em(g,Wv(b,0,105184,0)|0,0,0)|0)&255;a[(c[j>>2]|0)+231|0]=f;f=Um(Hm(g,Wv(b,0,104776,0)|0,0)|0,25512,25528)|0;c[(c[j>>2]|0)+232>>2]=f;f=ew(g,162064)|0;do{if((f|0)!=0){r=a[f]|0;if(r<<24>>24==0){break}p=r<<24>>24;if((p|0)==97){if(r<<24>>24!=97){break}if((Ya(f|0,161712)|0)!=0){break}c[(c[(c[j>>2]|0)+8>>2]|0)+84>>2]=4;break}else if((p|0)==99){if(r<<24>>24!=99){break}if((Ya(f|0,161360)|0)!=0){break}c[(c[(c[j>>2]|0)+8>>2]|0)+84>>2]=3;break}else if((p|0)==101){if(r<<24>>24!=101){break}if((Ya(f|0,161040)|0)!=0){break}c[(c[(c[j>>2]|0)+8>>2]|0)+84>>2]=5;break}else if((p|0)==102){if(r<<24>>24!=102){break}if((Ya(f|0,160744)|0)!=0){break}c[(c[(c[j>>2]|0)+8>>2]|0)+84>>2]=2;break}else{w=+rF(f);if(w<=0.0){break}c[(c[(c[j>>2]|0)+8>>2]|0)+84>>2]=1;h[(c[(c[j>>2]|0)+8>>2]|0)+16>>3]=w;break}}}while(0);f=Qj(b,104288,(c[(c[j>>2]|0)+8>>2]|0)+64|0)|0;a[(c[(c[j>>2]|0)+8>>2]|0)+80|0]=f;Qj(b,103680,(c[(c[j>>2]|0)+8>>2]|0)+48|0)|0;f=Km(ew(g,103016)|0)|0;a[(c[(c[j>>2]|0)+8>>2]|0)+82|0]=f;f=ew(g,102072)|0;do{if((f|0)==0){r=ew(g,101320)|0;if((r|0)==0){p=ew(g,100864)|0;if((p|0)==0){break}o=Km(p)|0;a[(c[(c[j>>2]|0)+8>>2]|0)+81|0]=o;break}o=a[r]|0;if(o<<24>>24==108){x=1}else{x=o<<24>>24==76|0}a[(c[(c[j>>2]|0)+8>>2]|0)+81|0]=x}else{o=(Rb(f|0)|0)==90|0;a[(c[(c[j>>2]|0)+8>>2]|0)+81|0]=o}}while(0);c[53850]=Um(ew(g,100448)|0,25480,25496)|0;a[215376]=Km(ew(g,99896)|0)|0;c[53522]=0;c[53746]=0;h[(c[(c[j>>2]|0)+8>>2]|0)+24>>3]=0.0;f=ew(g,99520)|0;if((f|0)==0){n=69}else{if((a[f]|0)==0){n=69}else{y=f;n=71}}do{if((n|0)==69){f=ew(g,99104)|0;if((f|0)==0){break}if((a[f]|0)!=0){y=f;n=71}}}while(0);if((n|0)==71){w=+rF(y);h[(c[(c[j>>2]|0)+8>>2]|0)+24>>3]=w}Rj(b);h[21638]=1.0e+37;c[53718]=Wv(b,0,98688,0)|0;c[53722]=Wv(b,0,98120,0)|0;c[53720]=Wv(b,0,97440,0)|0;c[53618]=Wv(b,1,96336,0)|0;c[53574]=Wv(b,1,95800,0)|0;c[53590]=Wv(b,1,95256,0)|0;c[53644]=Wv(b,1,94864,0)|0;c[53632]=Wv(b,1,94384,0)|0;c[53582]=Wv(b,1,94e3,0)|0;c[53624]=Wv(b,1,93512,0)|0;c[53626]=Wv(b,1,93040,0)|0;c[53628]=Wv(b,1,92576,0)|0;y=Wv(b,1,123672,0)|0;c[53614]=y;if((y|0)==0){c[53614]=Wv(b,1,123672,121792)|0}c[53572]=Wv(b,1,91936,0)|0;c[53588]=Wv(b,1,105184,0)|0;c[53600]=Wv(b,1,91080,0)|0;c[53604]=Wv(b,1,98688,0)|0;c[53610]=Wv(b,1,97440,0)|0;c[53586]=Wv(b,1,90576,0)|0;c[53598]=Wv(b,1,89984,0)|0;c[53584]=Wv(b,1,89432,0)|0;c[53602]=Wv(b,1,101320,0)|0;c[53636]=Wv(b,1,89040,0)|0;c[53630]=Wv(b,1,88576,0)|0;c[53616]=Wv(b,1,88152,0)|0;c[53606]=Wv(b,1,87720,0)|0;c[53612]=Wv(b,1,87208,0)|0;c[53620]=Wv(b,1,86672,0)|0;c[53642]=Wv(b,1,85808,0)|0;c[53580]=Wv(b,1,85352,0)|0;c[53570]=Wv(b,1,84896,0)|0;c[53622]=Wv(b,1,98120,0)|0;c[53750]=Wv(b,2,84536,0)|0;c[53816]=Wv(b,2,94864,0)|0;c[53802]=Wv(b,2,94384,0)|0;c[53796]=Wv(b,2,93512,0)|0;c[53798]=Wv(b,2,93040,0)|0;c[53800]=Wv(b,2,92576,0)|0;c[53790]=Wv(b,2,123672,0)|0;c[53748]=Wv(b,2,91936,0)|0;c[53788]=Wv(b,2,84080,0)|0;c[53804]=Wv(b,2,83688,0)|0;c[53822]=Wv(b,2,83280,0)|0;c[53818]=Wv(b,2,82880,0)|0;c[53792]=Wv(b,2,82488,0)|0;c[53756]=Wv(b,2,81920,0)|0;c[53778]=Wv(b,2,81208,0)|0;c[53780]=Wv(b,2,80656,0)|0;c[53782]=Wv(b,2,80200,0)|0;c[53784]=Wv(b,2,79896,0)|0;c[53786]=Wv(b,2,79456,0)|0;c[53774]=Wv(b,2,79144,0)|0;c[53762]=Wv(b,2,105184,0)|0;c[53760]=Wv(b,2,94e3,0)|0;c[53810]=Wv(b,2,78864,0)|0;c[53820]=Wv(b,2,168872,0)|0;c[53812]=Wv(b,2,168520,0)|0;c[53776]=Wv(b,2,87208,0)|0;c[53814]=Wv(b,2,85808,0)|0;c[53758]=Wv(b,2,168136,0)|0;c[53794]=Wv(b,2,167408,0)|0;c[53772]=Wv(b,2,91080,0)|0;y=Eh(b)|0;c[(c[(c[j>>2]|0)+8>>2]|0)+88>>2]=y;y=ew(g,166960)|0;if((y|0)==0){i=e;return}if((a[y]|0)==0){i=e;return}b=fk(y,g)|0;c[(c[(c[j>>2]|0)+8>>2]|0)+92>>2]=b;i=e;return}function Qj(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0,u=0.0,v=0,w=0,x=0,y=0,z=0;f=i;i=i+24|0;g=f|0;j=f+8|0;k=f+16|0;a[k]=0;l=ew(b|0,d)|0;if((l|0)==0){m=0;i=f;return m|0}d=ac(l|0,162760,(b=i,i=i+24|0,c[b>>2]=g,c[b+8>>2]=j,c[b+16>>2]=k,b)|0)|0;i=b;do{if((d|0)>1){n=+h[g>>3];if(n<=0.0){break}o=+h[j>>3];if(o<=0.0){break}p=n*72.0;if(p<0.0){q=p+-.5}else{q=p+.5}h[e>>3]=+(~~q|0);p=o*72.0;if(p<0.0){r=p+-.5}else{r=p+.5}h[e+8>>3]=+(~~r|0);m=(a[k]|0)==33|0;i=f;return m|0}}while(0);a[k]=0;j=ac(l|0,162408,(b=i,i=i+16|0,c[b>>2]=g,c[b+8>>2]=k,b)|0)|0;i=b;if((j|0)<=0){m=0;i=f;return m|0}r=+h[g>>3];if(r<=0.0){m=0;i=f;return m|0}q=r*72.0;if(q<0.0){s=q+-.5;t=~~s;u=+(t|0);v=e|0;h[v>>3]=u;w=e+8|0;h[w>>3]=u;x=a[k]|0;y=x<<24>>24==33;z=y&1;i=f;return z|0}else{s=q+.5;t=~~s;u=+(t|0);v=e|0;h[v>>3]=u;w=e+8|0;h[w>>3]=u;x=a[k]|0;y=x<<24>>24==33;z=y&1;i=f;return z|0}return 0}function Rj(b){b=b|0;var d=0,e=0,f=0,g=0.0,i=0,j=0,k=0,l=0,m=0.0;d=b|0;e=ew(d,123672)|0;if((e|0)==0){return}if((a[e]|0)==0){return}f=(c[(c[b+48>>2]|0)+8>>2]|0)+113|0;a[f]=a[f]|8;f=(gy(e)|0)!=0;g=+Fm(d,Wv(b,0,93512,0)|0,14.0,1.0);i=Im(d,Wv(b,0,93040,0)|0,164760)|0;j=ak(d,e,f?2:0,g,i,Im(d,Wv(b,0,92576,0)|0,164336)|0)|0;i=b+8|0;c[(c[i>>2]|0)+12>>2]=j;j=ew(d,163984)|0;f=(j|0)!=0;do{if((Ix(d)|0)==(b|0)){if(f){if((a[j]|0)==116){k=1;break}}k=0}else{if(f){if((a[j]|0)==98){k=0;break}}k=1}}while(0);j=ew(d,163192)|0;do{if((j|0)==0){l=k}else{f=a[j]|0;if((f<<24>>24|0)==108){l=k|2;break}else if((f<<24>>24|0)==114){l=k|4;break}else{l=k;break}}}while(0);a[(c[i>>2]|0)+263|0]=l;if((Ix(d)|0)==(b|0)){return}b=c[(c[i>>2]|0)+12>>2]|0;g=+h[b+24>>3]+16.0;m=+h[b+32>>3]+8.0;b=(c[(c[(Ix(d)|0)+8>>2]|0)+116>>2]&1|0)==0;d=c[i>>2]|0;l=(a[d+263|0]&1)!=0;if(b){b=l?2:0;k=d+48|0;h[k+(b<<4)>>3]=g;h[k+(b<<4)+8>>3]=m;return}else{b=l?1:3;h[d+48+(b<<4)>>3]=m;h[(c[i>>2]|0)+48+(b<<4)+8>>3]=g;return}}function Sj(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=a+8|0;d=c[(c[b>>2]|0)+8>>2]|0;do{if((d|0)==0){e=0}else{f=c[d+88>>2]|0;if((f|0)==0){g=d}else{Hn(f);f=c[(c[b>>2]|0)+8>>2]|0;if((f|0)==0){e=0;break}else{g=f}}f=c[g+92>>2]|0;if((f|0)==0){e=g;break}eF(f);e=c[(c[b>>2]|0)+8>>2]|0}}while(0);eF(e);c[(c[b>>2]|0)+8>>2]=0;dk(c[(c[b>>2]|0)+12>>2]|0);_x(a,0,166512);return}function Tj(a){a=a|0;var b=0,d=0,e=0;b=i;if((a|0)==1){d=165784}else if((a|0)==2){d=165464}else if((a|0)==0){d=166168}else{Fv(1,165128,(e=i,i=i+8|0,c[e>>2]=a,e)|0)|0;i=e;d=166168}i=b;return d|0}function Uj(){return $g(21424,c[43330]|0)|0}function Vj(a,b){a=a|0;b=b|0;var d=0,e=0;d=i;i=i+16|0;e=d|0;c[e>>2]=b;Hc[c[a>>2]&63](a,e,1)|0;i=d;return}function Wj(a,b){a=a|0;b=b|0;var d=0,e=0;d=i;i=i+8|0;e=d|0;c[e>>2]=b;b=(Hc[c[a>>2]&63](a,e,512)|0)!=0|0;i=d;return b|0}function Xj(a,b,d){a=a|0;b=b|0;d=d|0;d=jk(12)|0;c[d>>2]=c[b>>2];return d|0}function Yj(a,b,c){a=a|0;b=b|0;c=c|0;eF(b);return}function Zj(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0;e=c[b>>2]|0;b=c[d>>2]|0;if((e|0)>(b|0)){f=1;return f|0}f=((e|0)<(b|0))<<31>>31;return f|0}function _j(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;e=c[d>>2]|0;f=d+24|0;vF(f|0,0,16)|0;if((a[e]|0)==0){return}g=kk((xF(e|0)|0)+1|0)|0;a[g]=0;h=a[e]|0;do{if(h<<24>>24!=0){i=d+12|0;j=g;k=g;l=e;m=h;a:while(1){n=k;o=l;p=m;while(1){q=o+1|0;if((p&255)>>>0<161>>>0|(c[i>>2]|0)!=2|p<<24>>24==-1){if((p<<24>>24|0)==92){r=8;break}else if((p<<24>>24|0)==10){r=12;break}a[n]=p;s=n+1|0;t=q}else{a[n]=p;u=a[q]|0;v=n+2|0;a[n+1|0]=u;if(u<<24>>24==0){w=v;x=j;break a}else{s=v;t=o+2|0}}v=a[t]|0;if(v<<24>>24==0){w=s;x=j;break a}else{n=s;o=t;p=v}}if((r|0)==8){r=0;p=a[q]|0;v=p<<24>>24;if((v|0)==110|(v|0)==108|(v|0)==114){v=n+1|0;a[n]=0;$j(b,d,j,a[q]|0);y=v;z=v}else{a[n]=p;y=n+1|0;z=j}A=y;B=z;C=(a[q]|0)==0?q:o+2|0}else if((r|0)==12){r=0;p=n+1|0;a[n]=0;$j(b,d,j,110);A=p;B=p;C=q}p=a[C]|0;if(p<<24>>24==0){w=A;x=B;break}else{j=B;k=A;l=C;m=p}}if((x|0)==(w|0)){break}a[w]=0;$j(b,d,x,110)}}while(0);x=d+40|0;d=f;c[x>>2]=c[d>>2];c[x+4>>2]=c[d+4>>2];c[x+8>>2]=c[d+8>>2];c[x+12>>2]=c[d+12>>2];return}function $j(d,e,f,g){d=d|0;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0.0,s=0,t=0,u=0,v=0.0,w=0,x=0.0,y=0,z=0.0,A=0.0,B=0.0;j=i;i=i+16|0;k=j|0;l=e+76|0;m=b[l>>1]|0;n=e+72|0;o=c[n>>2]|0;if((o|0)==0){p=jk((m*56|0)+112|0)|0}else{p=lk(o,m+2|0,56,m+1|0)|0}m=p;c[n>>2]=m;n=b[l>>1]|0;p=m+(n*56|0)|0;c[p>>2]=f;a[m+(n*56|0)+48|0]=g;do{if((f|0)!=0){if((a[f]|0)==0){break}c[43704]=c[e+4>>2];h[21854]=+h[e+16>>3];g=c[d+144>>2]|0;c[m+(n*56|0)+4>>2]=Hc[c[g>>2]&63](g,174816,1)|0;sm(k,d,p);q=+h[k+8>>3];r=+h[k>>3];s=b[l>>1]|0;t=s+1&65535;b[l>>1]=t;u=e+24|0;v=+h[u>>3];w=v>r;x=w?v:r;h[u>>3]=x;y=e+32|0;z=+h[y>>3];A=q+z;h[y>>3]=A;i=j;return}}while(0);B=+(~~(+h[e+16>>3]*1.2)|0);h[m+(n*56|0)+40>>3]=B;q=B;r=0.0;s=b[l>>1]|0;t=s+1&65535;b[l>>1]=t;u=e+24|0;v=+h[u>>3];w=v>r;x=w?v:r;h[u>>3]=x;y=e+32|0;z=+h[y>>3];A=q+z;h[y>>3]=A;i=j;return}function ak(b,e,f,g,j,k){b=b|0;e=e|0;f=f|0;g=+g;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;l=i;m=jk(88)|0;n=m;o=Sx(b)|0;if((o|0)==0){p=0;q=0;r=b;s=c[b+48>>2]|0}else if((o|0)==1){p=0;q=b;r=0;s=Ix(Hx(b)|0)|0}else if((o|0)==2){o=b;p=o;q=0;r=0;s=Ix(Hx(c[((c[b>>2]&3|0)==2?o:b-32|0)+28>>2]|0)|0)|0}else{p=0;q=0;r=0;s=0}c[m+4>>2]=j;c[m+8>>2]=k;h[m+16>>3]=g;k=s+8|0;j=m+12|0;c[j>>2]=d[(c[k>>2]|0)+115|0]|0;if((f&4|0)!=0){c[m>>2]=Lb(e|0)|0;if((f&2|0)==0){i=l;return n|0}a[m+82|0]=1;i=l;return n|0}if((f|0)==2){c[m>>2]=Lb(e|0)|0;a[m+82|0]=1;if((Fj(b,n)|0)==0){i=l;return n|0}o=Sx(b)|0;if((o|0)==0){t=$w(r|0)|0;Fv(3,117880,(u=i,i=i+8|0,c[u>>2]=t,u)|0)|0;i=u;i=l;return n|0}else if((o|0)==1){t=$w(q|0)|0;Fv(3,156648,(u=i,i=i+8|0,c[u>>2]=t,u)|0)|0;i=u;i=l;return n|0}else if((o|0)==2){o=p;t=$w(c[((c[o>>2]&3|0)==3?p:p+32|0)+28>>2]|0)|0;q=(Nw(s)|0)!=0;r=$w(c[((c[o>>2]&3|0)==2?p:p-32|0)+28>>2]|0)|0;Fv(3,127032,(u=i,i=i+24|0,c[u>>2]=t,c[u+8>>2]=q?115048:108104,c[u+16>>2]=r,u)|0)|0;i=u;i=l;return n|0}else{i=l;return n|0}}else if((f|0)==0){f=bk(e,b,0)|0;b=m;c[b>>2]=f;if((c[j>>2]|0)==1){v=kn(f)|0}else{v=hn(f,s)|0}eF(c[b>>2]|0);c[b>>2]=v;_j(c[(c[k>>2]|0)+136>>2]|0,n);i=l;return n|0}else{cc(102408,96688,166,170344);return 0}return 0}function bk(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0;f=Sx(d)|0;do{if((f|0)==0){g=$w(d)|0;h=xF(g|0)|0;i=c[(c[d+8>>2]|0)+12>>2]|0;if((i|0)==0){j=0;k=0;l=0;m=2;n=2;o=2;p=2;q=2;r=h;s=133680;t=136504;u=139056;v=142152;w=145128;x=g;y=213432;z=213432;break}A=c[i>>2]|0;if((b|0)==0){j=0;k=0;l=0;m=2;n=2;o=2;p=2;q=2;r=h;s=A;t=136504;u=139056;v=142152;w=145128;x=g;y=213432;z=213432;break}j=0;k=0;l=0;m=xF(A|0)|0;n=2;o=2;p=2;q=2;r=h;s=A;t=136504;u=139056;v=142152;w=145128;x=g;y=213432;z=213432}else if((f|0)==1){g=$w(Hx(d)|0)|0;A=xF(g|0)|0;h=$w(d)|0;i=xF(h|0)|0;B=c[(c[d+8>>2]|0)+104>>2]|0;if((B|0)==0){j=0;k=0;l=0;m=2;n=2;o=2;p=2;q=i;r=A;s=133680;t=136504;u=139056;v=142152;w=h;x=g;y=213432;z=213432;break}C=c[B>>2]|0;if((b|0)==0){j=0;k=0;l=0;m=2;n=2;o=2;p=2;q=i;r=A;s=C;t=136504;u=139056;v=142152;w=h;x=g;y=213432;z=213432;break}j=0;k=0;l=0;m=xF(C|0)|0;n=2;o=2;p=2;q=i;r=A;s=C;t=136504;u=139056;v=142152;w=h;x=g;y=213432;z=213432}else if((f|0)==2){g=d;h=d;C=d+32|0;A=$w(Ix(Hx(c[((c[h>>2]&3|0)==3?g:C)+28>>2]|0)|0)|0)|0;i=xF(A|0)|0;B=$w(c[((c[h>>2]&3|0)==3?g:C)+28>>2]|0)|0;D=xF(B|0)|0;E=d+8|0;F=c[(c[E>>2]|0)+52>>2]|0;G=F;if((F|0)==0){H=0}else{H=xF(G|0)|0}F=$w(c[((c[h>>2]&3|0)==2?g:d-32|0)+28>>2]|0)|0;I=c[E>>2]|0;E=c[I+92>>2]|0;J=E;if((E|0)==0){K=0}else{K=xF(J|0)|0}E=xF(F|0)|0;L=c[I+96>>2]|0;do{if((L|0)==0){M=2;N=133680}else{I=c[L>>2]|0;if((b|0)==0){M=2;N=I;break}M=xF(I|0)|0;N=I}}while(0);L=(Nw(Ix(Hx(c[((c[h>>2]&3|0)==3?g:C)+28>>2]|0)|0)|0)|0)==0;j=1;k=K;l=H;m=M;n=D;o=E;p=D+2+((H|0)==0?0:H+1|0)+E+((K|0)==0?0:K+1|0)|0;q=2;r=i;s=N;t=B;u=F;v=L?108104:115048;w=145128;x=A;y=J;z=G}else{j=0;k=0;l=0;m=2;n=2;o=2;p=2;q=2;r=2;s=133680;t=136504;u=139056;v=142152;w=145128;x=148280;y=213432;z=213432}}while(0);N=(e|0)==0;a:do{if(N){e=0;K=b;b:while(1){H=K+1|0;M=a[K]|0;if((M<<24>>24|0)==0){O=e;break a}else if((M<<24>>24|0)!=92){e=e+1|0;K=H;continue}M=K+2|0;switch(a[H]|0){case 76:{e=e+m|0;K=M;continue b;break};case 78:{e=e+q|0;K=M;continue b;break};case 71:{e=e+r|0;K=M;continue b;break};case 84:{e=e+n|0;K=M;continue b;break};case 72:{e=e+o|0;K=M;continue b;break};case 69:{e=e+p|0;K=M;continue b;break};default:{e=e+2|0;K=M;continue b}}}}else{K=0;e=b;c:while(1){G=e+1|0;J=a[e]|0;if((J<<24>>24|0)==0){O=K;break a}else if((J<<24>>24|0)!=92){K=K+1|0;e=G;continue}J=e+2|0;switch(a[G]|0){case 71:{K=K+r|0;e=J;continue c;break};case 78:{K=K+q|0;e=J;continue c;break};case 69:{K=K+p|0;e=J;continue c;break};case 72:{K=K+o|0;e=J;continue c;break};case 84:{K=K+n|0;e=J;continue c;break};case 76:{K=K+m|0;e=J;continue c;break};case 92:{K=K+1|0;e=J;continue c;break};default:{K=K+2|0;e=J;continue c}}}}}while(0);m=kk(O+1|0)|0;O=(j|0)==0;j=(l|0)==0;l=(k|0)==0;k=m;n=b;d:while(1){b=n+1|0;o=a[n]|0;if((o<<24>>24|0)==0){break}else if((o<<24>>24|0)!=92){a[k]=o;k=k+1|0;n=b;continue}o=n+2|0;p=a[b]|0;e:do{switch(p<<24>>24|0){case 92:{if(N){break e}a[k]=92;k=k+1|0;n=o;continue d;break};case 71:{b=a[x]|0;a[k]=b;if(b<<24>>24==0){k=k;n=o;continue d}else{P=k;Q=x}while(1){b=Q+1|0;q=P+1|0;r=a[b]|0;a[q]=r;if(r<<24>>24==0){k=q;n=o;continue d}else{P=q;Q=b}}break};case 78:{b=a[w]|0;a[k]=b;if(b<<24>>24==0){k=k;n=o;continue d}else{R=k;S=w}while(1){b=S+1|0;q=R+1|0;r=a[b]|0;a[q]=r;if(r<<24>>24==0){k=q;n=o;continue d}else{R=q;S=b}}break};case 84:{b=a[t]|0;a[k]=b;if(b<<24>>24==0){k=k;n=o;continue d}else{T=k;U=t}while(1){b=U+1|0;q=T+1|0;r=a[b]|0;a[q]=r;if(r<<24>>24==0){k=q;n=o;continue d}else{T=q;U=b}}break};case 72:{b=a[u]|0;a[k]=b;if(b<<24>>24==0){k=k;n=o;continue d}else{V=k;W=u}while(1){b=W+1|0;q=V+1|0;r=a[b]|0;a[q]=r;if(r<<24>>24==0){k=q;n=o;continue d}else{V=q;W=b}}break};case 76:{b=a[s]|0;a[k]=b;if(b<<24>>24==0){k=k;n=o;continue d}else{X=k;Y=s}while(1){b=Y+1|0;q=X+1|0;r=a[b]|0;a[q]=r;if(r<<24>>24==0){k=q;n=o;continue d}else{X=q;Y=b}}break};case 69:{if(O){k=k;n=o;continue d}b=a[t]|0;a[k]=b;if(b<<24>>24==0){Z=k}else{b=k;q=t;while(1){r=q+1|0;e=b+1|0;K=a[r]|0;a[e]=K;if(K<<24>>24==0){Z=e;break}else{b=e;q=r}}}if(j){_=Z}else{a[Z]=58;q=z;b=Z;while(1){r=b+1|0;e=a[q]|0;a[r]=e;if(e<<24>>24==0){_=r;break}else{q=q+1|0;b=r}}}b=a[v]|0;a[_]=b;if(b<<24>>24==0){$=_}else{b=_;q=v;while(1){r=q+1|0;e=b+1|0;K=a[r]|0;a[e]=K;if(K<<24>>24==0){$=e;break}else{b=e;q=r}}}q=a[u]|0;a[$]=q;if(q<<24>>24==0){aa=$}else{q=$;b=u;while(1){r=b+1|0;e=q+1|0;K=a[r]|0;a[e]=K;if(K<<24>>24==0){aa=e;break}else{q=e;b=r}}}if(l){k=aa;n=o;continue d}a[aa]=58;b=y;q=aa;while(1){r=q+1|0;e=a[b]|0;a[r]=e;if(e<<24>>24==0){k=r;n=o;continue d}else{b=b+1|0;q=r}}break};default:{}}}while(0);a[k]=92;a[k+1|0]=p;k=k+2|0;n=o}a[k]=0;return m|0}function ck(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;if((a|0)==0){return}if((b|0)>0){d=0;e=a;while(1){do{if((d|0)==0){f=c[e>>2]|0;if((f|0)==0){break}eF(f)}}while(0);f=c[e+8>>2]|0;do{if((f|0)!=0){g=c[e+12>>2]|0;if((g|0)==0){break}Cc[g&255](f)}}while(0);f=d+1|0;if((f|0)<(b|0)){d=f;e=e+56|0}else{break}}}eF(a);return}function dk(d){d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;if((d|0)==0){return}eF(c[d>>2]|0);e=d+72|0;do{if((a[d+82|0]|0)==0){f=c[e>>2]|0;g=b[d+76>>1]|0;h=g<<16>>16;if((f|0)==0){break}if(g<<16>>16>0){g=0;i=f;while(1){do{if((g|0)==0){j=c[i>>2]|0;if((j|0)==0){break}eF(j)}}while(0);j=c[i+8>>2]|0;do{if((j|0)!=0){k=c[i+12>>2]|0;if((k|0)==0){break}Cc[k&255](j)}}while(0);j=g+1|0;if((j|0)<(h|0)){g=j;i=i+56|0}else{break}}}eF(f)}else{i=c[e>>2]|0;if((i|0)==0){break}wj(i,1)}}while(0);eF(d);return}function ek(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;g=i;i=i+16|0;j=g|0;k=(c[d+16>>2]|0)+12|0;l=c[k>>2]|0;c[k>>2]=e;if((a[f+82|0]|0)!=0){rj(d,c[f+72>>2]|0,f);c[k>>2]=l;i=g;return}e=f+76|0;if((b[e>>1]|0)<1){i=g;return}iB(d,0);lB(d,c[f+8>>2]|0);m=a[f+80|0]|0;if((m|0)==116){h[j+8>>3]=+h[f+64>>3]+ +h[f+48>>3]*.5- +h[f+16>>3]}else if((m|0)==98){h[j+8>>3]=+h[f+32>>3]+(+h[f+64>>3]- +h[f+48>>3]*.5)- +h[f+16>>3]}else{h[j+8>>3]=+h[f+64>>3]+ +h[f+32>>3]*.5- +h[f+16>>3]}if((b[e>>1]|0)>0){m=f+72|0;n=f+56|0;o=j|0;p=j+8|0;q=f+40|0;f=0;r=c[m>>2]|0;do{s=a[r+(f*56|0)+48|0]|0;if((s|0)==108){h[o>>3]=+h[n>>3]- +h[q>>3]*.5}else if((s|0)==114){h[o>>3]=+h[n>>3]+ +h[q>>3]*.5}else{h[o>>3]=+h[n>>3]}kB(d,j,r+(f*56|0)|0);r=c[m>>2]|0;h[p>>3]=+h[p>>3]- +h[r+(f*56|0)+40>>3];f=f+1|0;}while((f|0)<(b[e>>1]|0))}jB(d);c[k>>2]=l;i=g;return}function fk(a,b){a=a|0;b=b|0;return bk(a,b,1)|0}function gk(a){a=a|0;return hk(a,0)|0}function hk(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;e=c[43612]|0;if((e|0)==0){c[43610]=64;f=kk(64)|0;c[43612]=f;g=f}else{g=e}if((b|0)==0){h=g;a[h]=0;i=c[43612]|0;return i|0}e=d<<24>>24==0;d=b;b=g;g=0;f=0;while(1){j=a[d]|0;if(j<<24>>24==0){h=b;break}k=c[43610]|0;if((f|0)>(k-8|0)){l=k<<1;c[43610]=l;k=mk(c[43612]|0,l)|0;c[43612]=k;m=k+f|0;n=a[d]|0}else{m=b;n=j}a:do{switch(n<<24>>24){case 60:{o=4;p=86176;break};case 45:{q=23;break};case 32:{q=24;break};case 38:{if(!e){o=5;p=91328;break a}j=a[d+1|0]|0;b:do{if(j<<24>>24==35){k=a[d+2|0]|0;if((k<<24>>24|0)==120|(k<<24>>24|0)==88){l=d+3|0;while(1){r=a[l]|0;if((r-48&255)>>>0<10>>>0|(r-97&255)>>>0<6>>>0|(r-65&255)>>>0<6>>>0){l=l+1|0}else{s=r;break b}}}if((k-48&255)>>>0>=10>>>0){s=k;break}l=d+3|0;while(1){r=a[l]|0;if((r-48&255)>>>0<10>>>0){l=l+1|0}else{s=r;break}}}else{if(!((j-97&255)>>>0<26>>>0|(j-65&255)>>>0<26>>>0)){s=j;break}l=d+2|0;while(1){k=a[l]|0;if((k-97&255)>>>0<26>>>0|(k-65&255)>>>0<26>>>0){l=l+1|0}else{s=k;break}}}}while(0);if(s<<24>>24!=59){o=5;p=91328;break a}if((n<<24>>24|0)==60){o=4;p=86176}else if((n<<24>>24|0)==45){q=23}else if((n<<24>>24|0)==32){q=24}else if((n<<24>>24|0)==62){q=22}else{q=26}break};case 62:{q=22;break};default:{q=26}}}while(0);do{if((q|0)==22){q=0;o=4;p=81432}else if((q|0)==23){q=0;o=5;p=167680}else if((q|0)==24){q=0;if((g|0)==0){q=28;break}if((a[g]|0)==32){o=6;p=163496}else{q=28}}else if((q|0)==26){q=0;if((n<<24>>24|0)==34){o=6;p=159408;break}else if((n<<24>>24|0)!=39){q=28;break}o=5;p=154400}}while(0);if((q|0)==28){q=0;o=1;p=d}j=o+f|0;l=m;k=p;r=o;while(1){t=r-1|0;a[l]=a[k]|0;if((t|0)==0){break}else{l=l+1|0;k=k+1|0;r=t}}g=d;d=d+1|0;b=m+o|0;f=j}a[h]=0;i=c[43612]|0;return i|0}function ik(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=c[43608]|0;if((d|0)==0){c[43606]=64;e=kk(64)|0;c[43608]=e;f=e}else{f=d}if((b|0)==0){g=f;a[g]=0;h=c[43608]|0;return h|0}else{i=b;j=f;k=0}while(1){f=a[i]|0;if(f<<24>>24==0){g=j;break}b=c[43606]|0;if((k|0)>(b-8|0)){d=b<<1;c[43606]=d;b=mk(c[43608]|0,d)|0;c[43608]=b;l=b+k|0;m=a[i]|0}else{l=j;m=f}a:do{switch(m<<24>>24){case 39:{n=22;break};case 60:{o=4;p=86176;break};case 38:{f=a[i+1|0]|0;b:do{if(f<<24>>24==35){b=a[i+2|0]|0;if((b<<24>>24|0)==120|(b<<24>>24|0)==88){d=i+3|0;while(1){e=a[d]|0;if((e-48&255)>>>0<10>>>0|(e-97&255)>>>0<6>>>0|(e-65&255)>>>0<6>>>0){d=d+1|0}else{q=e;break b}}}if((b-48&255)>>>0>=10>>>0){q=b;break}d=i+3|0;while(1){e=a[d]|0;if((e-48&255)>>>0<10>>>0){d=d+1|0}else{q=e;break}}}else{if(!((f-97&255)>>>0<26>>>0|(f-65&255)>>>0<26>>>0)){q=f;break}d=i+2|0;while(1){b=a[d]|0;if((b-97&255)>>>0<26>>>0|(b-65&255)>>>0<26>>>0){d=d+1|0}else{q=b;break}}}}while(0);if(q<<24>>24!=59){o=5;p=91328;break a}if((m<<24>>24|0)==39){n=22}else if((m<<24>>24|0)==60){o=4;p=86176}else if((m<<24>>24|0)==62){n=20}else if((m<<24>>24|0)==34){n=21}else{n=23}break};case 62:{n=20;break};case 34:{n=21;break};default:{n=23}}}while(0);if((n|0)==20){n=0;o=4;p=81432}else if((n|0)==21){n=0;o=6;p=159408}else if((n|0)==22){n=0;o=5;p=154400}else if((n|0)==23){n=0;o=1;p=i}f=o+k|0;d=l;b=p;e=o;while(1){r=e-1|0;a[d]=a[b]|0;if((r|0)==0){break}else{d=d+1|0;b=b+1|0;e=r}}i=i+1|0;j=l+o|0;k=f}a[g]=0;h=c[43608]|0;return h|0}function jk(a){a=a|0;var b=0,d=0,e=0;if((a|0)==0){b=0;return b|0}d=dF(a)|0;if((d|0)==0){Ma(117496,14,1,c[o>>2]|0)|0;e=0}else{e=d}vF(e|0,0,a|0)|0;b=e;return b|0}function kk(a){a=a|0;var b=0,d=0;do{if((a|0)==0){b=0}else{d=dF(a)|0;if((d|0)!=0){b=d;break}Ma(117496,14,1,c[o>>2]|0)|0;b=0}}while(0);return b|0}function lk(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0;f=gF(a,da(d,b)|0)|0;if(!((f|0)!=0|(b|0)==0)){Ma(117496,14,1,c[o>>2]|0)|0;return f|0}if(e>>>0>=b>>>0){return f|0}vF(f+(da(e,d)|0)|0,0,da(b-e|0,d)|0)|0;return f|0}function mk(a,b){a=a|0;b=b|0;var d=0;d=gF(a,b)|0;if((d|0)!=0|(b|0)==0){return d|0}Ma(117496,14,1,c[o>>2]|0)|0;return d|0}function nk(b,d,f,g){b=b|0;d=d|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,na=0,oa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,ya=0,za=0,Ba=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,_a=0,$a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,_b=0,$b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0,Sc=0,Tc=0,Uc=0,Vc=0,Wc=0,Xc=0,Yc=0,Zc=0,_c=0,$c=0,ad=0,bd=0,cd=0,dd=0,ed=0,fd=0,gd=0,hd=0,id=0,jd=0,kd=0,ld=0,md=0,nd=0,od=0,pd=0,qd=0,rd=0,sd=0,td=0,ud=0,vd=0,wd=0,xd=0,yd=0,zd=0,Ad=0,Bd=0,Cd=0,Dd=0,Ed=0,Fd=0,Gd=0,Hd=0,Id=0,Jd=0,Kd=0,Ld=0,Md=0,Nd=0,Od=0,Pd=0,Qd=0,Rd=0,Sd=0,Td=0,Ud=0,Vd=0,Wd=0,Xd=0,Yd=0,Zd=0,_d=0,$d=0,ae=0,be=0,ce=0,de=0,ee=0,fe=0,ge=0,he=0,ie=0,je=0,ke=0,le=0,me=0,ne=0,oe=0,pe=0,qe=0,re=0,se=0,te=0,ue=0,ve=0,we=0,xe=0,ye=0,ze=0,Ae=0,Be=0,Ce=0,De=0.0;j=i;k=1;l=0;m=i;i=i+168|0;c[m>>2]=0;while(1)switch(k|0){case 1:n=b+8|0;if((a[213992]|0)==0){k=7;break}else{k=2;break};case 2:p=c[(c[n>>2]|0)+180>>2]|0;if((p|0)==0){q=0;r=0;k=6;break}else{s=0;t=0;w=p;k=3;break};case 3:x=s+1|0;y=c[w+8>>2]|0;z=c[y+180>>2]|0;if((c[z>>2]|0)==0){A=t;k=5;break}else{B=t;C=0;k=4;break};case 4:p=B+1|0;D=C+1|0;if((c[z+(D<<2)>>2]|0)==0){A=p;k=5;break}else{B=p;C=D;k=4;break};case 5:D=c[y+164>>2]|0;if((D|0)==0){q=x;r=A;k=6;break}else{s=x;t=A;w=D;k=3;break};case 6:pa(30,c[o>>2]|0,156448,(E=i,i=i+40|0,c[E>>2]=117448,c[E+8>>2]=q,c[E+16>>2]=r,c[E+24>>2]=f,c[E+32>>2]=d,E)|0)|0;if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;i=E;Ca(2);if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;k=7;break;case 7:c[53736]=b;c[53538]=0;c[53634]=0;c[53608]=0;D=c[(c[n>>2]|0)+180>>2]|0;if((D|0)==0){F=0;k=13;break}else{G=D;k=8;break};case 8:H=G+8|0;a[(c[H>>2]|0)+157|0]=0;I=(c[53608]|0)+1|0;c[53608]=I;D=c[H>>2]|0;if((c[c[D+180>>2]>>2]|0)==0){J=D;k=11;break}else{k=9;break};case 9:K=0;L=c[53634]|0;k=10;break;case 10:D=L+1|0;c[53634]=D;p=K+1|0;M=c[H>>2]|0;if((c[(c[M+180>>2]|0)+(p<<2)>>2]|0)==0){J=M;k=11;break}else{K=p;L=D;k=10;break};case 11:D=c[J+164>>2]|0;if((D|0)==0){k=12;break}else{G=D;k=8;break};case 12:F=I<<2;k=13;break;case 13:N=c[53504]|0;if((N|0)==0){k=15;break}else{k=14;break};case 14:D=wa(206,N|0,F|0)|0;if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;O=D;k=16;break;case 15:D=ma(54,F|0)|0;if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;O=D;k=16;break;case 16:c[53504]=O;c[53502]=0;P=c[53508]|0;if((P|0)==0){k=18;break}else{k=17;break};case 17:D=wa(206,P|0,c[53608]<<2|0)|0;if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;Q=D;k=19;break;case 18:D=ma(54,c[53608]<<2|0)|0;if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;Q=D;k=19;break;case 19:c[53508]=Q;c[53506]=0;D=c[(c[n>>2]|0)+180>>2]|0;if((D|0)==0){k=47;break}else{R=1;S=D;k=20;break};case 20:T=S+8|0;c[(c[T>>2]|0)+288>>2]=0;D=c[T>>2]|0;p=c[c[D+172>>2]>>2]|0;if((p|0)==0){U=4;V=R;k=25;break}else{W=0;X=R;Y=D;Z=p;k=21;break};case 21:p=Y+288|0;c[p>>2]=(c[p>>2]|0)+1;_=Z+8|0;c[(c[_>>2]|0)+160>>2]=0;c[(c[_>>2]|0)+164>>2]=-1;if((X|0)==0){$=0;k=23;break}else{k=22;break};case 22:p=c[Z>>2]&3;$=((c[(c[(c[((p|0)==2?Z:Z-32|0)+28>>2]|0)+8>>2]|0)+232>>2]|0)-(c[(c[(c[((p|0)==3?Z:Z+32|0)+28>>2]|0)+8>>2]|0)+232>>2]|0)|0)<(e[(c[_>>2]|0)+170>>1]|0)?0:X;k=23;break;case 23:aa=W+1|0;p=c[T>>2]|0;D=c[(c[p+172>>2]|0)+(aa<<2)>>2]|0;if((D|0)==0){k=24;break}else{W=aa;X=$;Y=p;Z=D;k=21;break};case 24:U=(aa<<2)+4|0;V=$;k=25;break;case 25:D=ma(12,U|0)|0;if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;c[(c[T>>2]|0)+260>>2]=D;c[(c[T>>2]|0)+264>>2]=0;ba=c[(c[T>>2]|0)+180>>2]|0;ca=0;k=26;break;case 26:da=ca+1|0;if((c[ba+(ca<<2)>>2]|0)==0){k=27;break}else{ca=da;k=26;break};case 27:D=ma(12,da<<2|0)|0;if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;c[(c[T>>2]|0)+268>>2]=D;c[(c[T>>2]|0)+272>>2]=0;D=c[(c[T>>2]|0)+164>>2]|0;if((D|0)==0){k=28;break}else{R=V;S=D;k=20;break};case 28:if((V|0)==0){k=29;break}else{k=47;break};case 29:ea=ma(10,c[53608]|0)|0;if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;D=c[(c[(c[53736]|0)+8>>2]|0)+180>>2]|0;if((D|0)==0){k=30;break}else{fa=D;k=31;break};case 30:D=ma(30,ea|0)|0;if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;if((D|0)==0){ga=0;k=41;break}else{ha=0;ia=D;k=35;break};case 31:ja=fa+8|0;D=c[ja>>2]|0;if((c[D+288>>2]|0)==0){k=32;break}else{na=D;k=33;break};case 32:la(18,ea|0,fa|0);if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;na=c[ja>>2]|0;k=33;break;case 33:D=c[na+164>>2]|0;if((D|0)==0){k=30;break}else{fa=D;k=31;break};case 34:D=ma(30,ea|0)|0;if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;if((D|0)==0){ga=oa;k=41;break}else{ha=oa;ia=D;k=35;break};case 35:qa=ia+8|0;c[(c[qa>>2]|0)+232>>2]=0;oa=ha+1|0;D=c[qa>>2]|0;p=c[c[D+172>>2]>>2]|0;if((p|0)==0){ra=D;k=37;break}else{sa=0;ta=D;ua=p;k=36;break};case 36:p=c[ta+232>>2]|0;D=(e[(c[ua+8>>2]|0)+170>>1]|0)+(c[(c[(c[((c[ua>>2]&3|0)==3?ua:ua+32|0)+28>>2]|0)+8>>2]|0)+232>>2]|0)|0;c[ta+232>>2]=(p|0)>(D|0)?p:D;D=sa+1|0;p=c[qa>>2]|0;M=c[(c[p+172>>2]|0)+(D<<2)>>2]|0;if((M|0)==0){ra=p;k=37;break}else{sa=D;ta=p;ua=M;k=36;break};case 37:M=c[c[ra+180>>2]>>2]|0;if((M|0)==0){k=34;break}else{va=0;ya=M;k=38;break};case 38:za=ya;Ba=ya-32|0;M=(c[(c[((c[za>>2]&3|0)==2?ya:Ba)+28>>2]|0)+8>>2]|0)+288|0;p=c[M>>2]|0;c[M>>2]=p-1;if((p|0)<2){k=39;break}else{k=40;break};case 39:la(18,ea|0,c[((c[za>>2]&3|0)==2?ya:Ba)+28>>2]|0);if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;k=40;break;case 40:p=va+1|0;M=c[(c[(c[qa>>2]|0)+180>>2]|0)+(p<<2)>>2]|0;if((M|0)==0){k=34;break}else{va=p;ya=M;k=38;break};case 41:if((ga|0)==(c[53608]|0)){k=46;break}else{k=42;break};case 42:pa(16,1,81392,(E=i,i=i+1|0,i=i+7&-8,c[E>>2]=0,E)|0)|0;if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;i=E;M=c[(c[(c[53736]|0)+8>>2]|0)+180>>2]|0;if((M|0)==0){k=46;break}else{Da=M;k=43;break};case 43:Ea=Da+8|0;M=c[Ea>>2]|0;if((c[M+288>>2]|0)==0){Fa=M;k=45;break}else{k=44;break};case 44:M=ma(56,Da|0)|0;if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;p=c[(c[Ea>>2]|0)+288>>2]|0;pa(16,3,167640,(E=i,i=i+16|0,c[E>>2]=M,c[E+8>>2]=p,E)|0)|0;if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;i=E;Fa=c[Ea>>2]|0;k=45;break;case 45:p=c[Fa+164>>2]|0;if((p|0)==0){k=46;break}else{Da=p;k=43;break};case 46:ka(120,ea|0);if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;k=47;break;case 47:if((f|0)<1){k=48;break}else{k=54;break};case 48:p=c[(c[(c[53736]|0)+8>>2]|0)+180>>2]|0;if((p|0)==0){Ga=0;k=216;break}else{Ha=p;k=49;break};case 49:Ia=Ha+8|0;p=c[Ia>>2]|0;Ja=c[p+260>>2]|0;if((Ja|0)==0){Ka=p;k=51;break}else{k=50;break};case 50:ka(150,Ja|0);if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;Ka=c[Ia>>2]|0;k=51;break;case 51:La=c[Ka+268>>2]|0;if((La|0)==0){Ma=Ka;k=53;break}else{k=52;break};case 52:ka(150,La|0);if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;Ma=c[Ia>>2]|0;k=53;break;case 53:a[Ma+157|0]=0;p=c[(c[Ia>>2]|0)+164>>2]|0;if((p|0)==0){Ga=0;k=216;break}else{Ha=p;k=49;break};case 54:c[53534]=(g|0)>-1?g:30;Na=BF(178552,k,m)|0;k=217;break;case 217:if((Na|0)==0){k=55;break}else{Ga=2;k=216;break};case 55:if((c[53608]|0)<2){k=56;break}else{k=57;break};case 56:Oa=c[o>>2]|0;Pa=0;k=92;break;case 57:p=c[(c[(c[53736]|0)+8>>2]|0)+180>>2]|0;if((p|0)==0){k=58;break}else{Qa=p;k=59;break};case 58:if((c[53506]|0)>0){Ra=0;k=60;break}else{k=61;break};case 59:p=Qa+8|0;a[(c[p>>2]|0)+157|0]=0;c[c[(c[p>>2]|0)+268>>2]>>2]=0;c[c[(c[p>>2]|0)+260>>2]>>2]=0;c[(c[p>>2]|0)+272>>2]=0;c[(c[p>>2]|0)+264>>2]=0;M=c[(c[p>>2]|0)+164>>2]|0;if((M|0)==0){k=58;break}else{Qa=M;k=59;break};case 60:c[(c[(c[(c[53508]|0)+(Ra<<2)>>2]|0)+8>>2]|0)+164>>2]=-1;M=Ra+1|0;if((M|0)<(c[53506]|0)){Ra=M;k=60;break}else{k=61;break};case 61:c[53506]=0;c[53502]=0;M=c[(c[(c[53736]|0)+8>>2]|0)+180>>2]|0;if((M|0)==0){Sa=0;Ta=0;k=64;break}else{Ua=M;k=62;break};case 62:ma(36,Ua|0)|0;if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;M=c[(c[Ua+8>>2]|0)+164>>2]|0;if((M|0)!=0&(c[53506]|0)==0){Ua=M;k=62;break}else{k=63;break};case 63:Sa=c[53502]|0;Ta=c[(c[(c[53736]|0)+8>>2]|0)+180>>2]|0;k=64;break;case 64:if((Sa|0)<(c[53608]|0)){k=65;break}else{k=85;break};case 65:Va=(Ta|0)==0;if(Va){Ga=1;k=216;break}else{Wa=0;Xa=Ta;k=66;break};case 66:Ya=c[Xa+8>>2]|0;Za=c[Ya+180>>2]|0;M=c[Za>>2]|0;if((M|0)==0){_a=Wa;k=76;break}else{$a=0;ab=Wa;bb=M;k=67;break};case 67:cb=c[bb+8>>2]|0;if((c[cb+164>>2]|0)<0){k=68;break}else{db=ab;k=75;break};case 68:M=c[bb>>2]&3;eb=c[((M|0)==3?bb:bb+32|0)+28>>2]|0;fb=c[eb+8>>2]|0;gb=c[((M|0)==2?bb:bb-32|0)+28>>2]|0;hb=c[gb+8>>2]|0;ib=(a[hb+157|0]|0)==0;if((a[fb+157|0]|0)==0){k=70;break}else{k=69;break};case 69:if(ib){jb=eb;k=71;break}else{db=ab;k=75;break};case 70:if(ib){db=ab;k=75;break}else{jb=gb;k=71;break};case 71:if((jb|0)==0){db=ab;k=75;break}else{k=72;break};case 72:if((ab|0)==0){k=74;break}else{k=73;break};case 73:M=c[ab>>2]&3;if(((c[hb+232>>2]|0)-(c[fb+232>>2]|0)-(e[cb+170>>1]|0)|0)<((c[(c[(c[((M|0)==2?ab:ab-32|0)+28>>2]|0)+8>>2]|0)+232>>2]|0)-(c[(c[(c[((M|0)==3?ab:ab+32|0)+28>>2]|0)+8>>2]|0)+232>>2]|0)-(e[(c[ab+8>>2]|0)+170>>1]|0)|0)){k=74;break}else{db=ab;k=75;break};case 74:db=bb;k=75;break;case 75:M=$a+1|0;p=c[Za+(M<<2)>>2]|0;if((p|0)==0){_a=db;k=76;break}else{$a=M;ab=db;bb=p;k=67;break};case 76:p=c[Ya+164>>2]|0;if((p|0)==0){k=77;break}else{Wa=_a;Xa=p;k=66;break};case 77:if((_a|0)==0){k=86;break}else{k=78;break};case 78:p=c[_a>>2]&3;kb=c[((p|0)==2?_a:_a-32|0)+28>>2]|0;lb=c[kb+8>>2]|0;mb=c[((p|0)==3?_a:_a+32|0)+28>>2]|0;nb=c[mb+8>>2]|0;p=(c[lb+232>>2]|0)-(c[nb+232>>2]|0)|0;M=e[(c[_a+8>>2]|0)+170>>1]|0;ob=p-M|0;if((p|0)==(M|0)){k=57;break}else{k=79;break};case 79:pb=(a[lb+157|0]|0)==0;if((a[nb+157|0]|0)==0){k=81;break}else{k=80;break};case 80:if(pb){qb=mb;k=83;break}else{k=82;break};case 81:if(pb){k=82;break}else{qb=kb;k=83;break};case 82:qb=0;k=83;break;case 83:rb=(qb|0)==(kb|0)?-ob|0:ob;if((Sa|0)>0){sb=0;k=84;break}else{k=57;break};case 84:M=(c[(c[(c[53504]|0)+(sb<<2)>>2]|0)+8>>2]|0)+232|0;c[M>>2]=(c[M>>2]|0)+rb;M=sb+1|0;if((M|0)<(c[53502]|0)){sb=M;k=84;break}else{k=57;break};case 85:pa(34,Ta|0,0,1)|0;if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;la(34,c[(c[(c[53736]|0)+8>>2]|0)+180>>2]|0,0);if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;k=56;break;case 86:if(Va){Ga=1;k=216;break}else{tb=Ta;k=87;break};case 87:ub=tb+8|0;M=c[ub>>2]|0;vb=c[M+260>>2]|0;if((vb|0)==0){wb=M;k=89;break}else{k=88;break};case 88:ka(150,vb|0);if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;wb=c[ub>>2]|0;k=89;break;case 89:xb=c[wb+268>>2]|0;if((xb|0)==0){yb=wb;k=91;break}else{k=90;break};case 90:ka(150,xb|0);if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;yb=c[ub>>2]|0;k=91;break;case 91:a[yb+157|0]=0;M=c[(c[ub>>2]|0)+164>>2]|0;if((M|0)==0){Ga=1;k=216;break}else{tb=M;k=87;break};case 92:zb=c[53538]|0;Ab=c[53506]|0;if((zb|0)<(Ab|0)){k=93;break}else{Bb=0;Cb=0;k=99;break};case 93:Db=c[53508]|0;Eb=0;Fb=0;Gb=zb;k=94;break;case 94:Hb=c[Db+(Gb<<2)>>2]|0;Ib=c[(c[Hb+8>>2]|0)+160>>2]|0;if((Ib|0)<0){k=95;break}else{Jb=Fb;Kb=Eb;k=98;break};case 95:if((Eb|0)==0){Lb=Hb;k=97;break}else{k=96;break};case 96:Lb=(c[(c[Eb+8>>2]|0)+160>>2]|0)>(Ib|0)?Hb:Eb;k=97;break;case 97:M=Fb+1|0;if((M|0)<(c[53534]|0)){Jb=M;Kb=Lb;k=98;break}else{Mb=Lb;k=106;break};case 98:M=Gb+1|0;c[53538]=M;if((M|0)<(Ab|0)){Eb=Kb;Fb=Jb;Gb=M;k=94;break}else{Bb=Kb;Cb=Jb;k=99;break};case 99:if((zb|0)>0){k=100;break}else{Mb=Bb;k=106;break};case 100:c[53538]=0;Nb=c[53508]|0;Ob=0;Pb=Bb;Qb=Cb;k=101;break;case 101:Rb=c[Nb+(Ob<<2)>>2]|0;Sb=c[(c[Rb+8>>2]|0)+160>>2]|0;if((Sb|0)<0){k=102;break}else{Tb=Qb;Ub=Pb;k=105;break};case 102:if((Pb|0)==0){Vb=Rb;k=104;break}else{k=103;break};case 103:Vb=(c[(c[Pb+8>>2]|0)+160>>2]|0)>(Sb|0)?Rb:Pb;k=104;break;case 104:M=Qb+1|0;if((M|0)<(c[53534]|0)){Tb=M;Ub=Vb;k=105;break}else{Mb=Vb;k=106;break};case 105:M=Ob+1|0;c[53538]=M;if((M|0)<(zb|0)){Ob=M;Pb=Ub;Qb=Tb;k=101;break}else{Mb=Ub;k=106;break};case 106:if((Mb|0)==0){Wb=Pa;k=147;break}else{k=107;break};case 107:Xb=Mb;M=c[Xb>>2]&3;Yb=Mb+32|0;p=c[((M|0)==3?Mb:Yb)+28>>2]|0;Zb=Mb-32|0;D=c[((M|0)==2?Mb:Zb)+28>>2]|0;M=(c[(c[p+8>>2]|0)+284>>2]|0)<(c[(c[D+8>>2]|0)+284>>2]|0);_b=M?p:D;c[53744]=0;c[53528]=2147483647;D=_b+8|0;c[53662]=c[(c[D>>2]|0)+280>>2];c[53664]=c[(c[D>>2]|0)+284>>2];if(M){k=109;break}else{k=108;break};case 108:ka(172,_b|0);if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;k=110;break;case 109:ka(138,_b|0);if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;k=110;break;case 110:$b=c[53744]|0;ac=$b;M=c[ac>>2]&3;bc=$b-32|0;cc=$b+32|0;dc=$b+8|0;ec=(c[(c[(c[((M|0)==2?$b:bc)+28>>2]|0)+8>>2]|0)+232>>2]|0)-(c[(c[(c[((M|0)==3?$b:cc)+28>>2]|0)+8>>2]|0)+232>>2]|0)-(e[(c[dc>>2]|0)+170>>1]|0)|0;if((ec|0)>0){k=111;break}else{k=118;break};case 111:fc=c[Xb>>2]&3;gc=c[((fc|0)==3?Mb:Yb)+28>>2]|0;hc=c[gc+8>>2]|0;if(((c[hc+272>>2]|0)+(c[hc+264>>2]|0)|0)==1){k=112;break}else{k=113;break};case 112:la(10,gc|0,ec|0);if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;k=118;break;case 113:ic=c[((fc|0)==2?Mb:Zb)+28>>2]|0;jc=c[ic+8>>2]|0;if(((c[jc+272>>2]|0)+(c[jc+264>>2]|0)|0)==1){k=114;break}else{k=115;break};case 114:la(10,ic|0,-ec|0);if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;k=118;break;case 115:if((c[hc+284>>2]|0)<(c[jc+284>>2]|0)){k=116;break}else{k=117;break};case 116:la(10,gc|0,ec|0);if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;k=118;break;case 117:la(10,ic|0,-ec|0);if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;k=118;break;case 118:kc=Mb+8|0;lc=c[(c[kc>>2]|0)+160>>2]|0;M=c[ac>>2]&3;mc=(c[((M|0)==2?$b:bc)+28>>2]|0)+8|0;nc=c[((M|0)==3?$b:cc)+28>>2]|0;k=119;break;case 119:oc=nc+8|0;pc=c[oc>>2]|0;qc=c[(c[mc>>2]|0)+284>>2]|0;if((c[pc+280>>2]|0)>(qc|0)){k=121;break}else{k=120;break};case 120:if((qc|0)>(c[pc+284>>2]|0)){k=121;break}else{k=125;break};case 121:rc=c[pc+276>>2]|0;sc=rc;tc=rc;uc=rc+32|0;vc=(c[rc+8>>2]|0)+160|0;wc=c[vc>>2]|0;if((nc|0)==(c[((c[tc>>2]&3|0)==3?sc:uc)+28>>2]|0)){k=122;break}else{k=123;break};case 122:c[vc>>2]=wc+lc;k=124;break;case 123:c[vc>>2]=wc-lc;k=124;break;case 124:M=c[tc>>2]&3;D=c[((M|0)==3?sc:uc)+28>>2]|0;p=c[((M|0)==2?sc:rc-32|0)+28>>2]|0;nc=(c[(c[D+8>>2]|0)+284>>2]|0)>(c[(c[p+8>>2]|0)+284>>2]|0)?D:p;k=119;break;case 125:p=c[ac>>2]&3;xc=(c[((p|0)==3?$b:cc)+28>>2]|0)+8|0;yc=c[((p|0)==2?$b:bc)+28>>2]|0;k=126;break;case 126:zc=c[yc+8>>2]|0;Ac=c[(c[xc>>2]|0)+284>>2]|0;if((c[zc+280>>2]|0)>(Ac|0)){k=128;break}else{k=127;break};case 127:if((Ac|0)>(c[zc+284>>2]|0)){k=128;break}else{k=132;break};case 128:Bc=c[zc+276>>2]|0;Cc=Bc;Dc=Bc;Ec=Bc+32|0;Fc=(c[Bc+8>>2]|0)+160|0;Gc=c[Fc>>2]|0;if((yc|0)==(c[((c[Dc>>2]&3|0)==3?Cc:Ec)+28>>2]|0)){k=130;break}else{k=129;break};case 129:c[Fc>>2]=Gc+lc;k=131;break;case 130:c[Fc>>2]=Gc-lc;k=131;break;case 131:p=c[Dc>>2]&3;D=c[((p|0)==3?Cc:Ec)+28>>2]|0;M=c[((p|0)==2?Cc:Bc-32|0)+28>>2]|0;yc=(c[(c[D+8>>2]|0)+284>>2]|0)>(c[(c[M+8>>2]|0)+284>>2]|0)?D:M;k=126;break;case 132:if((yc|0)==(nc|0)){k=134;break}else{k=133;break};case 133:pa(16,1,102368,(E=i,i=i+1|0,i=i+7&-8,c[E>>2]=0,E)|0)|0;if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;i=E;la(40,178552,1);if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;return 0;case 134:c[(c[dc>>2]|0)+160>>2]=-lc;c[(c[kc>>2]|0)+160>>2]=0;c[(c[dc>>2]|0)+164>>2]=c[(c[kc>>2]|0)+164>>2];c[(c[53508]|0)+(c[(c[kc>>2]|0)+164>>2]<<2)>>2]=$b;c[(c[kc>>2]|0)+164>>2]=-1;Hc=(c[((c[Xb>>2]&3|0)==3?Mb:Yb)+28>>2]|0)+8|0;M=(c[Hc>>2]|0)+272|0;D=c[M>>2]|0;Ic=D-1|0;c[M>>2]=Ic;Jc=c[(c[Hc>>2]|0)+268>>2]|0;if((D|0)<1){Kc=0;k=137;break}else{Lc=0;k=136;break};case 135:if((Lc|0)<(Ic|0)){Lc=Mc;k=136;break}else{Kc=Mc;k=137;break};case 136:Mc=Lc+1|0;if((c[Jc+(Lc<<2)>>2]|0)==(Mb|0)){Kc=Lc;k=137;break}else{k=135;break};case 137:c[Jc+(Kc<<2)>>2]=c[Jc+(Ic<<2)>>2];c[(c[(c[Hc>>2]|0)+268>>2]|0)+(Ic<<2)>>2]=0;Nc=(c[((c[Xb>>2]&3|0)==2?Mb:Zb)+28>>2]|0)+8|0;D=(c[Nc>>2]|0)+264|0;M=c[D>>2]|0;Oc=M-1|0;c[D>>2]=Oc;Pc=c[(c[Nc>>2]|0)+260>>2]|0;if((M|0)<1){Qc=0;k=140;break}else{Rc=0;k=139;break};case 138:if((Rc|0)<(Oc|0)){Rc=Sc;k=139;break}else{Qc=Sc;k=140;break};case 139:Sc=Rc+1|0;if((c[Pc+(Rc<<2)>>2]|0)==(Mb|0)){Qc=Rc;k=140;break}else{k=138;break};case 140:c[Pc+(Qc<<2)>>2]=c[Pc+(Oc<<2)>>2];c[(c[(c[Nc>>2]|0)+260>>2]|0)+(Oc<<2)>>2]=0;M=(c[((c[ac>>2]&3|0)==3?$b:cc)+28>>2]|0)+8|0;D=(c[M>>2]|0)+272|0;p=c[D>>2]|0;c[D>>2]=p+1;c[(c[(c[M>>2]|0)+268>>2]|0)+(p<<2)>>2]=$b;p=(c[M>>2]|0)+268|0;c[(c[p>>2]|0)+(c[p+4>>2]<<2)>>2]=0;p=(c[((c[ac>>2]&3|0)==2?$b:bc)+28>>2]|0)+8|0;M=(c[p>>2]|0)+264|0;D=c[M>>2]|0;c[M>>2]=D+1;c[(c[(c[p>>2]|0)+260>>2]|0)+(D<<2)>>2]=$b;D=(c[p>>2]|0)+260|0;c[(c[D>>2]|0)+(c[D+4>>2]<<2)>>2]=0;D=c[oc>>2]|0;pa(34,nc|0,c[D+276>>2]|0,c[D+280>>2]|0)|0;if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;Tc=Pa+1|0;if((a[213992]|0)==0){k=146;break}else{k=141;break};case 141:if(((Tc|0)%100|0|0)==0){k=142;break}else{k=146;break};case 142:Uc=(Tc|0)%1e3|0;if((Uc|0)==100){k=143;break}else{k=144;break};case 143:Aa(42,117448,17,1,Oa|0)|0;if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;pa(30,Oa|0,126920,(E=i,i=i+8|0,c[E>>2]=Tc,E)|0)|0;if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;i=E;k=146;break;case 144:pa(30,Oa|0,126920,(E=i,i=i+8|0,c[E>>2]=Tc,E)|0)|0;if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;i=E;if((Uc|0)==0){k=145;break}else{k=146;break};case 145:wa(100,10,Oa|0)|0;if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;k=146;break;case 146:if((Tc|0)<(f|0)){Pa=Tc;k=92;break}else{Wb=Tc;k=147;break};case 147:if((d|0)==1){k=148;break}else if((d|0)==2){k=180;break}else{k=197;break};case 148:c[53654]=2147483647;c[53658]=-2147483647;Vc=(c[53736]|0)+8|0;D=c[(c[Vc>>2]|0)+180>>2]|0;if((D|0)==0){Wc=2147483647;Xc=-2147483647;k=156;break}else{Yc=D;Zc=2147483647;_c=-2147483647;k=149;break};case 149:$c=Yc+8|0;ad=c[$c>>2]|0;if((a[ad+156|0]|0)==0){k=150;break}else{bd=Zc;cd=_c;dd=ad;k=151;break};case 150:D=c[ad+232>>2]|0;p=(Zc|0)<(D|0)?Zc:D;c[53654]=p;D=c[(c[$c>>2]|0)+232>>2]|0;M=(_c|0)>(D|0)?_c:D;c[53658]=M;bd=p;cd=M;dd=c[$c>>2]|0;k=151;break;case 151:M=c[dd+164>>2]|0;if((M|0)==0){k=152;break}else{Yc=M;Zc=bd;_c=cd;k=149;break};case 152:if((bd|0)==0){ed=cd;k=157;break}else{k=153;break};case 153:M=c[(c[Vc>>2]|0)+180>>2]|0;if((M|0)==0){Wc=bd;Xc=cd;k=156;break}else{fd=M;gd=bd;k=154;break};case 154:M=fd+8|0;p=(c[M>>2]|0)+232|0;c[p>>2]=(c[p>>2]|0)-gd;p=c[(c[M>>2]|0)+164>>2]|0;hd=c[53654]|0;if((p|0)==0){k=155;break}else{fd=p;gd=hd;k=154;break};case 155:Wc=hd;Xc=c[53658]|0;k=156;break;case 156:p=Xc-Wc|0;c[53658]=p;c[53654]=0;ed=p;k=157;break;case 157:id=ma(12,(ed<<2)+4|0)|0;if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;jd=id;if((c[53658]|0)<0){k=159;break}else{kd=0;k=158;break};case 158:c[jd+(kd<<2)>>2]=0;if((kd|0)<(c[53658]|0)){kd=kd+1|0;k=158;break}else{k=159;break};case 159:p=c[(c[(c[53736]|0)+8>>2]|0)+180>>2]|0;if((p|0)==0){k=179;break}else{ld=p;k=160;break};case 160:md=ld+8|0;nd=c[md>>2]|0;if((a[nd+156|0]|0)==0){k=161;break}else{od=nd;k=162;break};case 161:p=jd+(c[nd+232>>2]<<2)|0;c[p>>2]=(c[p>>2]|0)+1;od=c[md>>2]|0;k=162;break;case 162:p=c[od+164>>2]|0;if((p|0)==0){k=163;break}else{ld=p;k=160;break};case 163:p=c[(c[(c[53736]|0)+8>>2]|0)+180>>2]|0;if((p|0)==0){k=179;break}else{pd=p;k=164;break};case 164:qd=pd+8|0;rd=c[qd>>2]|0;if((a[rd+156|0]|0)==0){k=165;break}else{sd=rd;k=178;break};case 165:td=c[53658]|0;ud=c[rd+172>>2]|0;p=c[ud>>2]|0;if((p|0)==0){vd=0;wd=0;k=167;break}else{xd=0;yd=0;zd=0;Ad=p;k=166;break};case 166:p=c[Ad+8>>2]|0;M=(c[p+156>>2]|0)+zd|0;D=(e[p+170>>1]|0)+(c[(c[(c[((c[Ad>>2]&3|0)==3?Ad:Ad+32|0)+28>>2]|0)+8>>2]|0)+232>>2]|0)|0;p=(yd|0)>(D|0)?yd:D;D=xd+1|0;Bd=c[ud+(D<<2)>>2]|0;if((Bd|0)==0){vd=p;wd=M;k=167;break}else{xd=D;yd=p;zd=M;Ad=Bd;k=166;break};case 167:Cd=c[rd+180>>2]|0;Bd=c[Cd>>2]|0;if((Bd|0)==0){Dd=td;Ed=0;k=169;break}else{Fd=0;Gd=td;Hd=0;Id=Bd;k=168;break};case 168:Bd=c[Id+8>>2]|0;M=(c[Bd+156>>2]|0)+Hd|0;p=(c[(c[(c[((c[Id>>2]&3|0)==2?Id:Id-32|0)+28>>2]|0)+8>>2]|0)+232>>2]|0)-(e[Bd+170>>1]|0)|0;Bd=(Gd|0)<(p|0)?Gd:p;p=Fd+1|0;D=c[Cd+(p<<2)>>2]|0;if((D|0)==0){Dd=Bd;Ed=M;k=169;break}else{Fd=p;Gd=Bd;Hd=M;Id=D;k=168;break};case 169:Jd=(vd|0)<0?0:vd;if((wd|0)==(Ed|0)){k=170;break}else{Kd=rd;k=173;break};case 170:if((Jd|0)<(Dd|0)){Ld=Jd;Md=Jd;k=171;break}else{Nd=Jd;k=172;break};case 171:D=Md+1|0;M=(c[jd+(D<<2)>>2]|0)<(c[jd+(Ld<<2)>>2]|0)?D:Ld;if((D|0)<(Dd|0)){Ld=M;Md=D;k=171;break}else{Nd=M;k=172;break};case 172:M=jd+(c[rd+232>>2]<<2)|0;c[M>>2]=(c[M>>2]|0)-1;M=jd+(Nd<<2)|0;c[M>>2]=(c[M>>2]|0)+1;c[(c[qd>>2]|0)+232>>2]=Nd;Kd=c[qd>>2]|0;k=173;break;case 173:Od=c[Kd+260>>2]|0;if((Od|0)==0){Pd=Kd;k=175;break}else{k=174;break};case 174:ka(150,Od|0);if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;Pd=c[qd>>2]|0;k=175;break;case 175:Qd=c[Pd+268>>2]|0;if((Qd|0)==0){Rd=Pd;k=177;break}else{k=176;break};case 176:ka(150,Qd|0);if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;Rd=c[qd>>2]|0;k=177;break;case 177:a[Rd+157|0]=0;sd=c[qd>>2]|0;k=178;break;case 178:M=c[sd+164>>2]|0;if((M|0)==0){k=179;break}else{pd=M;k=164;break};case 179:ka(150,id|0);if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;k=212;break;case 180:if((c[53506]|0)>0){Sd=0;k=181;break}else{k=191;break};case 181:Td=c[(c[53508]|0)+(Sd<<2)>>2]|0;if((c[(c[Td+8>>2]|0)+160>>2]|0)==0){k=182;break}else{k=190;break};case 182:Ud=Td;M=c[Ud>>2]&3;Vd=Td+32|0;D=c[((M|0)==3?Td:Vd)+28>>2]|0;Wd=Td-32|0;Bd=c[((M|0)==2?Td:Wd)+28>>2]|0;M=(c[(c[D+8>>2]|0)+284>>2]|0)<(c[(c[Bd+8>>2]|0)+284>>2]|0);Xd=M?D:Bd;c[53744]=0;c[53528]=2147483647;Bd=Xd+8|0;c[53662]=c[(c[Bd>>2]|0)+280>>2];c[53664]=c[(c[Bd>>2]|0)+284>>2];if(M){k=184;break}else{k=183;break};case 183:ka(172,Xd|0);if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;k=185;break;case 184:ka(138,Xd|0);if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;k=185;break;case 185:Yd=c[53744]|0;if((Yd|0)==0){k=190;break}else{k=186;break};case 186:M=c[Yd>>2]&3;Zd=(c[(c[(c[((M|0)==2?Yd:Yd-32|0)+28>>2]|0)+8>>2]|0)+232>>2]|0)-(c[(c[(c[((M|0)==3?Yd:Yd+32|0)+28>>2]|0)+8>>2]|0)+232>>2]|0)-(e[(c[Yd+8>>2]|0)+170>>1]|0)|0;if((Zd|0)<2){k=190;break}else{k=187;break};case 187:M=c[Ud>>2]&3;_d=c[((M|0)==3?Td:Vd)+28>>2]|0;$d=c[((M|0)==2?Td:Wd)+28>>2]|0;if((c[(c[_d+8>>2]|0)+284>>2]|0)<(c[(c[$d+8>>2]|0)+284>>2]|0)){k=188;break}else{k=189;break};case 188:la(10,_d|0,(Zd|0)/2|0|0);if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;k=190;break;case 189:la(10,$d|0,(Zd|0)/-2|0|0);if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;k=190;break;case 190:M=Sd+1|0;if((M|0)<(c[53506]|0)){Sd=M;k=181;break}else{k=191;break};case 191:M=c[(c[(c[53736]|0)+8>>2]|0)+180>>2]|0;if((M|0)==0){k=212;break}else{ae=M;k=192;break};case 192:be=ae+8|0;M=c[be>>2]|0;ce=c[M+260>>2]|0;if((ce|0)==0){de=M;k=194;break}else{k=193;break};case 193:ka(150,ce|0);if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;de=c[be>>2]|0;k=194;break;case 194:ee=c[de+268>>2]|0;if((ee|0)==0){fe=de;k=196;break}else{k=195;break};case 195:ka(150,ee|0);if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;fe=c[be>>2]|0;k=196;break;case 196:a[fe+157|0]=0;M=c[(c[be>>2]|0)+164>>2]|0;if((M|0)==0){k=212;break}else{ae=M;k=192;break};case 197:c[53654]=2147483647;c[53658]=-2147483647;ge=c[53736]|0;he=ge+8|0;M=c[(c[he>>2]|0)+180>>2]|0;if((M|0)==0){ie=2147483647;je=-2147483647;ke=ge;k=205;break}else{le=M;me=2147483647;ne=-2147483647;k=198;break};case 198:oe=le+8|0;pe=c[oe>>2]|0;if((a[pe+156|0]|0)==0){k=199;break}else{qe=me;re=ne;se=pe;k=200;break};case 199:M=c[pe+232>>2]|0;Bd=(me|0)<(M|0)?me:M;c[53654]=Bd;M=c[(c[oe>>2]|0)+232>>2]|0;D=(ne|0)>(M|0)?ne:M;c[53658]=D;qe=Bd;re=D;se=c[oe>>2]|0;k=200;break;case 200:D=c[se+164>>2]|0;if((D|0)==0){k=201;break}else{le=D;me=qe;ne=re;k=198;break};case 201:if((qe|0)==0){te=ge;k=206;break}else{k=202;break};case 202:D=c[(c[he>>2]|0)+180>>2]|0;if((D|0)==0){ie=qe;je=re;ke=ge;k=205;break}else{ue=D;ve=qe;k=203;break};case 203:D=ue+8|0;Bd=(c[D>>2]|0)+232|0;c[Bd>>2]=(c[Bd>>2]|0)-ve;Bd=c[(c[D>>2]|0)+164>>2]|0;we=c[53654]|0;if((Bd|0)==0){k=204;break}else{ue=Bd;ve=we;k=203;break};case 204:ie=we;je=c[53658]|0;ke=c[53736]|0;k=205;break;case 205:c[53658]=je-ie;c[53654]=0;te=ke;k=206;break;case 206:Bd=c[(c[te+8>>2]|0)+180>>2]|0;if((Bd|0)==0){k=212;break}else{xe=Bd;k=207;break};case 207:ye=xe+8|0;Bd=c[ye>>2]|0;ze=c[Bd+260>>2]|0;if((ze|0)==0){Ae=Bd;k=209;break}else{k=208;break};case 208:ka(150,ze|0);if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;Ae=c[ye>>2]|0;k=209;break;case 209:Be=c[Ae+268>>2]|0;if((Be|0)==0){Ce=Ae;k=211;break}else{k=210;break};case 210:ka(150,Be|0);if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;Ce=c[ye>>2]|0;k=211;break;case 211:a[Ce+157|0]=0;Bd=c[(c[ye>>2]|0)+164>>2]|0;if((Bd|0)==0){k=212;break}else{xe=Bd;k=207;break};case 212:if((a[213992]|0)==0){Ga=0;k=216;break}else{k=213;break};case 213:if((Wb|0)>99){k=214;break}else{k=215;break};case 214:wa(100,10,Oa|0)|0;if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;k=215;break;case 215:Bd=c[53608]|0;D=c[53634]|0;De=+xa(2);if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;pa(30,Oa|0,114976,(E=i,i=i+40|0,c[E>>2]=117448,c[E+8>>2]=Bd,c[E+16>>2]=D,c[E+24>>2]=Wb,h[E+32>>3]=De,E)|0)|0;if((u|0)!=0&(v|0)!=0){l=CF(c[u>>2]|0,m)|0;if((l|0)>0){k=-1;break}else return 0}u=v=0;i=E;Ga=0;k=216;break;case 216:i=j;return Ga|0;case-1:if((l|0)==54){Na=v;k=217}u=v=0;break}return 0}function ok(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=ew(a|0,108080)|0;if((d|0)==0){e=30}else{e=Rb(d|0)|0}return nk(a,b,c,e)|0}function pk(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;d=a+8|0;a=(c[d>>2]|0)+232|0;c[a>>2]=(c[a>>2]|0)-b;a=c[d>>2]|0;e=c[c[a+268>>2]>>2]|0;if((e|0)==0){f=a}else{g=0;h=a;a=e;while(1){if((a|0)==(c[h+276>>2]|0)){i=h}else{pk(c[((c[a>>2]&3|0)==2?a:a-32|0)+28>>2]|0,b);i=c[d>>2]|0}e=g+1|0;j=c[(c[i+268>>2]|0)+(e<<2)>>2]|0;if((j|0)==0){f=i;break}else{g=e;h=i;a=j}}}a=c[c[f+260>>2]>>2]|0;if((a|0)==0){return}else{k=0;l=f;m=a}while(1){if((m|0)==(c[l+276>>2]|0)){n=l}else{pk(c[((c[m>>2]&3|0)==3?m:m+32|0)+28>>2]|0,b);n=c[d>>2]|0}a=k+1|0;f=c[(c[n+260>>2]|0)+(a<<2)>>2]|0;if((f|0)==0){break}else{k=a;l=n;m=f}}return}function qk(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;e=a+8|0;c[(c[e>>2]|0)+276>>2]=b;c[(c[e>>2]|0)+280>>2]=d;a=c[e>>2]|0;f=c[c[a+268>>2]>>2]|0;if((f|0)==0){g=d;h=a}else{i=0;j=d;d=f;f=a;while(1){if((d|0)==(b|0)){k=j;l=f}else{a=qk(c[((c[d>>2]&3|0)==2?d:d-32|0)+28>>2]|0,d,j)|0;k=a;l=c[e>>2]|0}a=i+1|0;m=c[(c[l+268>>2]|0)+(a<<2)>>2]|0;if((m|0)==0){g=k;h=l;break}else{i=a;j=k;d=m;f=l}}}l=c[c[h+260>>2]>>2]|0;if((l|0)==0){n=g;o=h;p=o+284|0;q=n;c[p>>2]=q;r=n+1|0;return r|0}else{s=0;t=g;u=l;v=h}while(1){if((u|0)==(b|0)){w=t;x=v}else{h=qk(c[((c[u>>2]&3|0)==3?u:u+32|0)+28>>2]|0,u,t)|0;w=h;x=c[e>>2]|0}h=s+1|0;l=c[(c[x+260>>2]|0)+(h<<2)>>2]|0;if((l|0)==0){n=w;o=x;break}else{s=h;t=w;u=l;v=x}}p=o+284|0;q=n;c[p>>2]=q;r=n+1|0;return r|0}function rk(a){a=a|0;var b=0,d=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;b=a+8|0;a=c[b>>2]|0;d=c[c[a+180>>2]>>2]|0;if((d|0)==0){f=a}else{g=0;h=a;a=d;while(1){d=c[a+8>>2]|0;do{if((c[d+164>>2]|0)<0){i=c[a>>2]&3;j=c[(c[((i|0)==2?a:a-32|0)+28>>2]|0)+8>>2]|0;k=c[j+284>>2]|0;if(!((c[53662]|0)>(k|0)|(k|0)>(c[53664]|0))){break}k=(c[j+232>>2]|0)-(c[(c[(c[((i|0)==3?a:a+32|0)+28>>2]|0)+8>>2]|0)+232>>2]|0)-(e[d+170>>1]|0)|0;if(!((k|0)<(c[53528]|0)|(c[53744]|0)==0)){break}c[53744]=a;c[53528]=k}else{k=c[((c[a>>2]&3|0)==2?a:a-32|0)+28>>2]|0;if((c[(c[k+8>>2]|0)+284>>2]|0)>=(c[h+284>>2]|0)){break}rk(k)}}while(0);d=g+1|0;k=c[b>>2]|0;i=c[(c[k+180>>2]|0)+(d<<2)>>2]|0;if((i|0)==0){f=k;break}else{g=d;h=k;a=i}}}a=c[c[f+260>>2]>>2]|0;h=c[53528]|0;if((a|0)!=0&(h|0)>0){l=0;m=f;n=a;o=h}else{return}while(1){h=c[((c[n>>2]&3|0)==3?n:n+32|0)+28>>2]|0;if((c[(c[h+8>>2]|0)+284>>2]|0)<(c[m+284>>2]|0)){rk(h);p=c[b>>2]|0;q=c[53528]|0}else{p=m;q=o}h=l+1|0;a=c[(c[p+260>>2]|0)+(h<<2)>>2]|0;if((a|0)!=0&(q|0)>0){l=h;m=p;n=a;o=q}else{break}}return}function sk(a){a=a|0;var b=0,d=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;b=a+8|0;a=c[b>>2]|0;d=c[c[a+172>>2]>>2]|0;if((d|0)==0){f=a}else{g=0;h=a;a=d;while(1){d=c[a+8>>2]|0;do{if((c[d+164>>2]|0)<0){i=c[a>>2]&3;j=c[(c[((i|0)==3?a:a+32|0)+28>>2]|0)+8>>2]|0;k=c[j+284>>2]|0;if(!((c[53662]|0)>(k|0)|(k|0)>(c[53664]|0))){break}k=(c[(c[(c[((i|0)==2?a:a-32|0)+28>>2]|0)+8>>2]|0)+232>>2]|0)-(c[j+232>>2]|0)-(e[d+170>>1]|0)|0;if(!((k|0)<(c[53528]|0)|(c[53744]|0)==0)){break}c[53744]=a;c[53528]=k}else{k=c[((c[a>>2]&3|0)==3?a:a+32|0)+28>>2]|0;if((c[(c[k+8>>2]|0)+284>>2]|0)>=(c[h+284>>2]|0)){break}sk(k)}}while(0);d=g+1|0;k=c[b>>2]|0;j=c[(c[k+172>>2]|0)+(d<<2)>>2]|0;if((j|0)==0){f=k;break}else{g=d;h=k;a=j}}}a=c[c[f+268>>2]>>2]|0;h=c[53528]|0;if((a|0)!=0&(h|0)>0){l=0;m=f;n=a;o=h}else{return}while(1){h=c[((c[n>>2]&3|0)==2?n:n-32|0)+28>>2]|0;if((c[(c[h+8>>2]|0)+284>>2]|0)<(c[m+284>>2]|0)){sk(h);p=c[b>>2]|0;q=c[53528]|0}else{p=m;q=o}h=l+1|0;a=c[(c[p+268>>2]|0)+(h<<2)>>2]|0;if((a|0)!=0&(q|0)>0){l=h;m=p;n=a;o=q}else{break}}return}function tk(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;d=a+8|0;a=c[d>>2]|0;e=c[c[a+268>>2]>>2]|0;if((e|0)==0){f=a}else{g=0;h=e;e=a;while(1){if((h|0)==(b|0)){i=e}else{tk(c[((c[h>>2]&3|0)==2?h:h-32|0)+28>>2]|0,h);i=c[d>>2]|0}a=g+1|0;j=c[(c[i+268>>2]|0)+(a<<2)>>2]|0;if((j|0)==0){f=i;break}else{g=a;h=j;e=i}}}i=c[c[f+260>>2]>>2]|0;if((i|0)!=0){e=0;h=i;i=f;while(1){if((h|0)==(b|0)){k=i}else{tk(c[((c[h>>2]&3|0)==3?h:h+32|0)+28>>2]|0,h);k=c[d>>2]|0}f=e+1|0;g=c[(c[k+260>>2]|0)+(f<<2)>>2]|0;if((g|0)==0){break}else{e=f;h=g;i=k}}}if((b|0)==0){return}k=c[b>>2]&3;i=c[((k|0)==3?b:b+32|0)+28>>2]|0;h=c[i+8>>2]|0;if((c[h+276>>2]|0)==(b|0)){l=1;m=i;n=h}else{h=c[((k|0)==2?b:b-32|0)+28>>2]|0;l=-1;m=h;n=c[h+8>>2]|0}h=c[n+180>>2]|0;k=c[h>>2]|0;if((k|0)==0){o=0}else{i=c[n+280>>2]|0;e=n+284|0;if((l|0)>0){d=0;g=0;f=k;while(1){j=c[f>>2]&3;a=c[((j|0)==3?f:f+32|0)+28>>2]|0;if((a|0)==(m|0)){p=c[((j|0)==2?f:f-32|0)+28>>2]|0}else{p=a}a=c[(c[p+8>>2]|0)+284>>2]|0;do{if((i|0)>(a|0)){q=21}else{if((a|0)>(c[e>>2]|0)){q=21;break}r=c[f+8>>2]|0;if((c[r+164>>2]|0)>-1){s=c[r+160>>2]|0}else{s=0}t=1;u=s-(c[r+156>>2]|0)|0}}while(0);if((q|0)==21){q=0;t=0;u=c[(c[f+8>>2]|0)+156>>2]|0}a=(c[((j|0)==2?f:f-32|0)+28>>2]|0)==(m|0)?1:-1;r=(((t?a:-a|0)|0)<0?-u|0:u)+g|0;a=d+1|0;v=c[h+(a<<2)>>2]|0;if((v|0)==0){o=r;break}else{d=a;g=r;f=v}}}else{f=0;g=0;d=k;while(1){k=c[d>>2]&3;u=c[((k|0)==3?d:d+32|0)+28>>2]|0;t=(u|0)==(m|0);if(t){w=c[((k|0)==2?d:d-32|0)+28>>2]|0}else{w=u}u=c[(c[w+8>>2]|0)+284>>2]|0;do{if((i|0)>(u|0)){q=38}else{if((u|0)>(c[e>>2]|0)){q=38;break}k=c[d+8>>2]|0;if((c[k+164>>2]|0)>-1){x=c[k+160>>2]|0}else{x=0}y=1;z=x-(c[k+156>>2]|0)|0}}while(0);if((q|0)==38){q=0;y=0;z=c[(c[d+8>>2]|0)+156>>2]|0}u=t?1:-1;j=(((y?u:-u|0)|0)<0?-z|0:z)+g|0;u=f+1|0;k=c[h+(u<<2)>>2]|0;if((k|0)==0){o=j;break}else{f=u;g=j;d=k}}}}d=c[n+172>>2]|0;g=c[d>>2]|0;if((g|0)==0){A=o}else{f=c[n+280>>2]|0;h=n+284|0;if((l|0)>0){l=0;n=o;z=g;while(1){y=c[z>>2]&3;x=c[((y|0)==3?z:z+32|0)+28>>2]|0;if((x|0)==(m|0)){B=c[((y|0)==2?z:z-32|0)+28>>2]|0}else{B=x}x=c[(c[B+8>>2]|0)+284>>2]|0;do{if((f|0)>(x|0)){q=32}else{if((x|0)>(c[h>>2]|0)){q=32;break}e=c[z+8>>2]|0;if((c[e+164>>2]|0)>-1){C=c[e+160>>2]|0}else{C=0}D=1;E=C-(c[e+156>>2]|0)|0}}while(0);if((q|0)==32){q=0;D=0;E=c[(c[z+8>>2]|0)+156>>2]|0}x=(c[((y|0)==2?z:z-32|0)+28>>2]|0)==(m|0)?1:-1;t=(((D?x:-x|0)|0)<0?-E|0:E)+n|0;x=l+1|0;e=c[d+(x<<2)>>2]|0;if((e|0)==0){A=t;break}else{l=x;n=t;z=e}}}else{z=0;n=o;o=g;while(1){g=c[o>>2]&3;l=c[((g|0)==3?o:o+32|0)+28>>2]|0;E=(l|0)==(m|0);if(E){F=c[((g|0)==2?o:o-32|0)+28>>2]|0}else{F=l}l=c[(c[F+8>>2]|0)+284>>2]|0;do{if((f|0)>(l|0)){q=47}else{if((l|0)>(c[h>>2]|0)){q=47;break}g=c[o+8>>2]|0;if((c[g+164>>2]|0)>-1){G=c[g+160>>2]|0}else{G=0}H=1;I=G-(c[g+156>>2]|0)|0}}while(0);if((q|0)==47){q=0;H=0;I=c[(c[o+8>>2]|0)+156>>2]|0}l=E?1:-1;y=(((H?l:-l|0)|0)<0?-I|0:I)+n|0;l=z+1|0;g=c[d+(l<<2)>>2]|0;if((g|0)==0){A=y;break}else{z=l;n=y;o=g}}}}c[(c[b+8>>2]|0)+160>>2]=A;return}function uk(b){b=b|0;var d=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;d=b+8|0;b=c[d>>2]|0;f=c[c[b+180>>2]>>2]|0;a:do{if((f|0)==0){g=b}else{h=0;i=f;j=b;b:while(1){k=i;l=c[k>>2]&3;m=i-32|0;n=c[(c[((l|0)==2?i:m)+28>>2]|0)+8>>2]|0;do{if((a[n+157|0]|0)==0){if(((c[n+232>>2]|0)-(c[(c[(c[((l|0)==3?i:i+32|0)+28>>2]|0)+8>>2]|0)+232>>2]|0)|0)!=(e[(c[i+8>>2]|0)+170>>1]|0)){o=j;break}vk(i);if((c[53506]|0)==((c[53608]|0)-1|0)){p=1;q=15;break b}if((uk(c[((c[k>>2]&3|0)==2?i:m)+28>>2]|0)|0)!=0){p=1;q=15;break b}o=c[d>>2]|0}else{o=j}}while(0);m=h+1|0;k=c[(c[o+180>>2]|0)+(m<<2)>>2]|0;if((k|0)==0){g=o;break a}else{h=m;i=k;j=o}}if((q|0)==15){return p|0}}}while(0);o=c[c[g+172>>2]>>2]|0;if((o|0)==0){p=0;return p|0}else{r=0;s=o;t=g}c:while(1){g=s;o=c[g>>2]&3;b=s+32|0;f=c[(c[((o|0)==3?s:b)+28>>2]|0)+8>>2]|0;do{if((a[f+157|0]|0)==0){if(((c[(c[(c[((o|0)==2?s:s-32|0)+28>>2]|0)+8>>2]|0)+232>>2]|0)-(c[f+232>>2]|0)|0)!=(e[(c[s+8>>2]|0)+170>>1]|0)){u=t;break}vk(s);if((c[53506]|0)==((c[53608]|0)-1|0)){p=1;q=15;break c}if((uk(c[((c[g>>2]&3|0)==3?s:b)+28>>2]|0)|0)!=0){p=1;q=15;break c}u=c[d>>2]|0}else{u=t}}while(0);b=r+1|0;g=c[(c[u+172>>2]|0)+(b<<2)>>2]|0;if((g|0)==0){p=0;q=15;break}else{r=b;s=g;t=u}}if((q|0)==15){return p|0}return 0}function vk(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;d=i;e=(c[b+8>>2]|0)+164|0;if((c[e>>2]|0)>-1){Fv(1,96648,(f=i,i=i+1|0,i=i+7&-8,c[f>>2]=0,f)|0)|0;i=f;rc(178552,1)}c[e>>2]=c[53506];e=c[53506]|0;c[53506]=e+1;c[(c[53508]|0)+(e<<2)>>2]=b;e=b;g=c[e>>2]|0;h=b+32|0;j=c[((g&3|0)==3?b:h)+28>>2]|0;if((a[(c[j+8>>2]|0)+157|0]|0)==0){k=c[53502]|0;c[53502]=k+1;c[(c[53504]|0)+(k<<2)>>2]=j;l=c[e>>2]|0}else{l=g}g=b-32|0;j=c[((l&3|0)==2?b:g)+28>>2]|0;if((a[(c[j+8>>2]|0)+157|0]|0)==0){k=c[53502]|0;c[53502]=k+1;c[(c[53504]|0)+(k<<2)>>2]=j;m=c[e>>2]|0}else{m=l}l=(c[((m&3|0)==3?b:h)+28>>2]|0)+8|0;a[(c[l>>2]|0)+157|0]=1;h=(c[l>>2]|0)+272|0;m=c[h>>2]|0;c[h>>2]=m+1;c[(c[(c[l>>2]|0)+268>>2]|0)+(m<<2)>>2]=b;m=(c[l>>2]|0)+268|0;c[(c[m>>2]|0)+(c[m+4>>2]<<2)>>2]=0;m=c[l>>2]|0;if((c[(c[m+180>>2]|0)+((c[m+272>>2]|0)-1<<2)>>2]|0)==0){Fv(1,91288,(f=i,i=i+1|0,i=i+7&-8,c[f>>2]=0,f)|0)|0;i=f;rc(178552,1)}m=(c[((c[e>>2]&3|0)==2?b:g)+28>>2]|0)+8|0;a[(c[m>>2]|0)+157|0]=1;g=(c[m>>2]|0)+264|0;e=c[g>>2]|0;c[g>>2]=e+1;c[(c[(c[m>>2]|0)+260>>2]|0)+(e<<2)>>2]=b;b=(c[m>>2]|0)+260|0;c[(c[b>>2]|0)+(c[b+4>>2]<<2)>>2]=0;b=c[m>>2]|0;if((c[(c[b+172>>2]|0)+((c[b+264>>2]|0)-1<<2)>>2]|0)==0){Fv(1,86104,(f=i,i=i+1|0,i=i+7&-8,c[f>>2]=0,f)|0)|0;i=f;rc(178552,1)}else{i=d;return}}function wk(a){a=+a;var b=0.0;if((c[53492]|0)==0){b=a;return+b}b=+h[21426]-a;return+b}function xk(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0.0,n=0.0,o=0.0,p=0,q=0,r=0,s=0.0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0.0,K=0,L=0.0;g=i;i=i+1024|0;j=c[(c[(c[d+52>>2]|0)+8>>2]|0)+4>>2]|0;c[43802]=j;k=d+8|0;if((c[53492]|0)!=0){l=c[k>>2]|0;m=+h[l+40>>3]+ +h[l+24>>3];h[21426]=m;h[21427]=m/72.0}l=c[k>>2]|0;m=+h[l+32>>3];n=+h[l+40>>3];o=+h[b+352>>3];b=g|0;l=e;Oc[j&255](l,117392)|0;nb(b|0,121728,(j=i,i=i+8|0,h[j>>3]=o,j)|0)|0;i=j;Oc[c[43802]&255](l,b)|0;Oc[c[43802]&255](l,156424)|0;nb(b|0,121728,(j=i,i=i+8|0,h[j>>3]=m/72.0,j)|0)|0;i=j;Oc[c[43802]&255](l,b)|0;Oc[c[43802]&255](l,156424)|0;nb(b|0,121728,(j=i,i=i+8|0,h[j>>3]=n/72.0,j)|0)|0;i=j;Oc[c[43802]&255](l,b)|0;a[212960]=10;Oc[c[43802]&255](l,212960)|0;k=ux(d)|0;if((k|0)!=0){p=k;do{k=p+8|0;if((a[(c[k>>2]|0)+118|0]|0)==0){q=p|0;r=Dy($w(q)|0)|0;Oc[c[43802]&255](l,126896)|0;Oc[c[43802]&255](l,r)|0;r=c[k>>2]|0;n=+h[r+24>>3];m=+h[r+16>>3]/72.0;Oc[c[43802]&255](l,156424)|0;nb(b|0,121728,(j=i,i=i+8|0,h[j>>3]=m,j)|0)|0;i=j;Oc[c[43802]&255](l,b)|0;if((c[53492]|0)==0){s=n}else{s=+h[21426]-n}Oc[c[43802]&255](l,156424)|0;nb(b|0,121728,(j=i,i=i+8|0,h[j>>3]=s/72.0,j)|0)|0;i=j;Oc[c[43802]&255](l,b)|0;if((a[(c[(c[k>>2]|0)+104>>2]|0)+82|0]|0)==0){r=Hx(q)|0;t=dy(r,c[c[(c[k>>2]|0)+104>>2]>>2]|0)|0;u=Dy(t)|0;fy(r,t)|0;v=u}else{v=Dy(fw(q,c[53614]|0)|0)|0}n=+h[(c[k>>2]|0)+32>>3];Oc[c[43802]&255](l,156424)|0;nb(b|0,121728,(j=i,i=i+8|0,h[j>>3]=n,j)|0)|0;i=j;Oc[c[43802]&255](l,b)|0;n=+h[(c[k>>2]|0)+40>>3];Oc[c[43802]&255](l,156424)|0;nb(b|0,121728,(j=i,i=i+8|0,h[j>>3]=n,j)|0)|0;i=j;Oc[c[43802]&255](l,b)|0;Oc[c[43802]&255](l,156424)|0;Oc[c[43802]&255](l,v)|0;u=Im(q,c[53582]|0,114968)|0;Oc[c[43802]&255](l,156424)|0;Oc[c[43802]&255](l,u)|0;u=c[c[(c[k>>2]|0)+8>>2]>>2]|0;Oc[c[43802]&255](l,156424)|0;Oc[c[43802]&255](l,u)|0;u=Im(q,c[53644]|0,108072)|0;Oc[c[43802]&255](l,156424)|0;Oc[c[43802]&255](l,u)|0;u=Im(q,c[53632]|0,213368)|0;if((a[u]|0)==0){w=Im(q,c[53644]|0,96632)|0}else{w=u}Oc[c[43802]&255](l,156424)|0;Oc[c[43802]&255](l,w)|0;a[212960]=10;Oc[c[43802]&255](l,212960)|0}p=vx(d,p)|0;}while((p|0)!=0)}p=ux(d)|0;if((p|0)==0){x=c[43802]|0;y=Oc[x&255](l,167632)|0;i=g;return}w=f<<24>>24==0;f=p;do{p=mw(d,f)|0;if((p|0)!=0){v=p;do{if(w){z=213368;A=213368}else{p=v|0;u=ew(p,91272)|0;q=ew(p,86088)|0;z=(q|0)!=0?q:213368;A=(u|0)!=0?u:213368}u=v+8|0;q=c[u>>2]|0;p=c[q+8>>2]|0;do{if((p|0)==0){B=q}else{k=c[p+4>>2]|0;if((k|0)>0){t=c[p>>2]|0;r=0;C=0;while(1){D=(c[t+(C*48|0)+4>>2]|0)+r|0;E=C+1|0;if((E|0)<(k|0)){r=D;C=E}else{F=D;break}}}else{F=0}Oc[c[43802]&255](l,81384)|0;C=v;yk(e,c[((c[C>>2]&3|0)==3?v:v+32|0)+28>>2]|0,A);yk(e,c[((c[C>>2]&3|0)==2?v:v-32|0)+28>>2]|0,z);Oc[c[43802]&255](l,156424)|0;nb(b|0,113688,(j=i,i=i+8|0,c[j>>2]=F,j)|0)|0;i=j;Oc[c[43802]&255](l,b)|0;C=c[u>>2]|0;r=c[C+8>>2]|0;if((c[r+4>>2]|0)>0){G=0;H=r;I=C}else{B=C;break}while(1){C=c[H>>2]|0;r=c[C+(G*48|0)>>2]|0;k=c[C+(G*48|0)+4>>2]|0;if((k|0)>0){C=0;do{s=+h[r+(C<<4)+8>>3];n=+h[r+(C<<4)>>3]/72.0;Oc[c[43802]&255](l,156424)|0;nb(b|0,121728,(j=i,i=i+8|0,h[j>>3]=n,j)|0)|0;i=j;Oc[c[43802]&255](l,b)|0;if((c[53492]|0)==0){J=s}else{J=+h[21426]-s}Oc[c[43802]&255](l,156424)|0;nb(b|0,121728,(j=i,i=i+8|0,h[j>>3]=J/72.0,j)|0)|0;i=j;Oc[c[43802]&255](l,b)|0;C=C+1|0;}while((C|0)<(k|0));K=c[u>>2]|0}else{K=I}k=G+1|0;C=c[K+8>>2]|0;if((k|0)<(c[C+4>>2]|0)){G=k;H=C;I=K}else{B=K;break}}}}while(0);if((c[B+96>>2]|0)!=0){p=Hx(c[((c[v>>2]&3|0)==3?v:v+32|0)+28>>2]|0)|0;q=dy(p,c[c[(c[u>>2]|0)+96>>2]>>2]|0)|0;C=Dy(q)|0;fy(p,q)|0;Oc[c[43802]&255](l,156424)|0;Oc[c[43802]&255](l,C)|0;C=c[(c[u>>2]|0)+96>>2]|0;s=+h[C+64>>3];n=+h[C+56>>3]/72.0;Oc[c[43802]&255](l,156424)|0;nb(b|0,121728,(j=i,i=i+8|0,h[j>>3]=n,j)|0)|0;i=j;Oc[c[43802]&255](l,b)|0;if((c[53492]|0)==0){L=s}else{L=+h[21426]-s}Oc[c[43802]&255](l,156424)|0;nb(b|0,121728,(j=i,i=i+8|0,h[j>>3]=L/72.0,j)|0)|0;i=j;Oc[c[43802]&255](l,b)|0;}C=v|0;q=Im(C,c[53760]|0,114968)|0;Oc[c[43802]&255](l,156424)|0;Oc[c[43802]&255](l,q)|0;q=Im(C,c[53816]|0,108072)|0;Oc[c[43802]&255](l,156424)|0;Oc[c[43802]&255](l,q)|0;a[212960]=10;Oc[c[43802]&255](l,212960)|0;v=ow(d,v)|0;}while((v|0)!=0)}f=vx(d,f)|0;}while((f|0)!=0);x=c[43802]|0;y=Oc[x&255](l,167632)|0;i=g;return}function yk(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;f=d|0;if((a[(c[d+8>>2]|0)+118|0]|0)==0){g=Dy($w(f)|0)|0}else{d=Hx(f)|0;h=dy(d,(gb($w(f)|0,58)|0)+1|0)|0;f=Dy(h)|0;fy(d,h)|0;g=f}f=b;Oc[c[43802]&255](f,156424)|0;Oc[c[43802]&255](f,g)|0;if((e|0)==0){return}if((a[e]|0)==0){return}g=Dy(e)|0;Oc[c[43802]&255](f,113176)|0;Oc[c[43802]&255](f,g)|0;return}function zk(d,f,g){d=d|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,o=0.0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0,H=0,I=0,J=0.0,K=0,L=0,M=0,N=0.0,O=0,P=0,Q=0,R=0,S=0,T=0.0,U=0.0,X=0.0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0.0,na=0,oa=0,pa=0,qa=0,ra=0.0,sa=0,ta=0,ua=0,va=0.0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0.0,Fa=0,Ga=0.0,Ha=0,Ia=0.0,Ja=0.0;j=i;i=i+2064|0;k=j+2048|0;l=d+8|0;m=(e[(c[l>>2]|0)+170>>1]|0)>>>0>2>>>0;Zh(1);if((c[53492]|0)!=0){n=c[l>>2]|0;o=+h[n+40>>3]+ +h[n+24>>3];h[21426]=o;h[21427]=o/72.0}Iv(k,1024,j+1024|0);en(d,1,163480,213368)|0;en(d,1,159400,213368)|0;c[53574]=en(d,1,154328,213368)|0;c[53618]=en(d,1,151232,213368)|0;en(d,2,163480,213368)|0;n=a[(c[l>>2]|0)+113|0]|0;if((n&16)==0){p=n}else{en(d,1,148272,213368)|0;p=a[(c[l>>2]|0)+113|0]|0}if((p&1)==0){q=p}else{en(d,2,145120,213368)|0;q=a[(c[l>>2]|0)+113|0]|0}if((q&32)==0){r=q}else{en(d,2,148272,213368)|0;r=a[(c[l>>2]|0)+113|0]|0}if((r&2)==0){s=r}else{en(d,2,142144,213368)|0;s=a[(c[l>>2]|0)+113|0]|0}if((s&4)==0){t=s}else{en(d,2,139048,213368)|0;t=a[(c[l>>2]|0)+113|0]|0}if((t&8)==0){u=0;v=0;w=0}else{t=en(d,0,145120,213368)|0;s=en(d,0,136496,213368)|0;u=en(d,0,133672,213368)|0;v=s;w=t}t=en(d,0,131552,213368)|0;s=ux(d)|0;if((s|0)==0){x=0;y=0}else{r=j|0;q=k+4|0;p=k+8|0;n=k|0;z=s;s=0;A=0;while(1){B=z+8|0;C=c[B>>2]|0;o=+h[C+16>>3];D=(c[53492]|0)!=0;if(m){if(D){E=+h[21426]- +h[C+24>>3]}else{E=+h[C+24>>3]}F=+h[(c[C+132>>2]|0)+16>>3]*72.0;nb(r|0,129264,(G=i,i=i+24|0,h[G>>3]=o,h[G+8>>3]=E,h[G+16>>3]=F,G)|0)|0;i=G;Lv(k,r)|0;if((e[(c[l>>2]|0)+170>>1]|0)>>>0>3>>>0){H=3;do{nb(r|0,126056,(G=i,i=i+8|0,h[G>>3]=+h[(c[(c[B>>2]|0)+132>>2]|0)+(H<<3)>>3]*72.0,G)|0)|0;i=G;Lv(k,r)|0;H=H+1|0;}while((H|0)<(e[(c[l>>2]|0)+170>>1]|0))}H=c[q>>2]|0;if(H>>>0<(c[p>>2]|0)>>>0){I=H}else{Jv(k,1)|0;I=c[q>>2]|0}a[I]=0;H=c[n>>2]|0;c[q>>2]=H;gw(z|0,163480,H)|0}else{if(D){J=+h[21426]- +h[C+24>>3]}else{J=+h[C+24>>3]}nb(r|0,123584,(G=i,i=i+16|0,h[G>>3]=o,h[G+8>>3]=J,G)|0)|0;i=G;gw(z|0,163480,r)|0}nb(r|0,121728,(G=i,i=i+8|0,h[G>>3]=+h[(c[B>>2]|0)+80>>3]/72.0,G)|0)|0;i=G;H=z|0;hw(H,c[53618]|0,r)|0;K=c[B>>2]|0;nb(r|0,121728,(G=i,i=i+8|0,h[G>>3]=(+h[K+88>>3]+ +h[K+96>>3])/72.0,G)|0)|0;i=G;hw(H,c[53574]|0,r)|0;K=c[B>>2]|0;L=c[K+108>>2]|0;do{if((L|0)==0){M=K}else{if((a[L+81|0]|0)==0){M=K;break}F=+h[L+64>>3];if((c[53492]|0)==0){N=F}else{N=+h[21426]-F}nb(r|0,123584,(G=i,i=i+16|0,h[G>>3]=+h[L+56>>3],h[G+8>>3]=N,G)|0)|0;i=G;gw(H,148272,r)|0;M=c[B>>2]|0}}while(0);do{if((Ya(c[c[M+8>>2]>>2]|0,120856)|0)==0){Ak(z,c[M+12>>2]|0,k);Nv(k)|0;L=c[q>>2]|0;if(L>>>0<(c[p>>2]|0)>>>0){O=L}else{Jv(k,1)|0;O=c[q>>2]|0}a[O]=0;L=c[n>>2]|0;c[q>>2]=L;gw(H,159400,L)|0}else{if((c[53580]|0)==0){break}if((tl(z)|0)<<24>>24==0){break}L=c[(c[B>>2]|0)+12>>2]|0;K=L+8|0;C=c[K>>2]|0;if((C|0)<3){D=ew(H,120104)|0;if((D|0)==0){P=8}else{P=Rb(D|0)|0}D=(P|0)<3?8:P;if((D|0)>0){Q=D;R=45}}else{Q=C;R=45}if((R|0)==45){R=0;C=L+44|0;o=+(Q|0);L=0;do{if((L|0)>0){D=c[q>>2]|0;if(D>>>0<(c[p>>2]|0)>>>0){S=D}else{Jv(k,1)|0;S=c[q>>2]|0}c[q>>2]=S+1;a[S]=32}if((c[K>>2]|0)>2){D=c[C>>2]|0;if((c[53492]|0)==0){T=+h[D+(L<<4)+8>>3]/72.0}else{T=+h[21427]- +h[D+(L<<4)+8>>3]/72.0}nb(r|0,119288,(G=i,i=i+16|0,h[G>>3]=+h[D+(L<<4)>>3]/72.0,h[G+8>>3]=T,G)|0)|0;i=G}else{D=c[B>>2]|0;F=+(L|0)/o*3.141592653589793*2.0;U=+h[D+32>>3]*.5*+V(F);if((c[53492]|0)==0){X=+h[D+40>>3]*.5*+W(F)}else{X=+h[21427]- +h[D+40>>3]*.5*+W(F)}nb(r|0,119288,(G=i,i=i+16|0,h[G>>3]=U,h[G+8>>3]=X,G)|0)|0;i=G}Lv(k,r)|0;L=L+1|0;}while((L|0)<(Q|0))}L=c[53580]|0;C=c[q>>2]|0;if(C>>>0<(c[p>>2]|0)>>>0){Y=C}else{Jv(k,1)|0;Y=c[q>>2]|0}a[Y]=0;C=c[n>>2]|0;c[q>>2]=C;hw(H,L,C)|0}}while(0);do{if((c[53522]|0)>0){H=mw(d,z)|0;if((H|0)==0){Z=A;_=s;break}else{$=H;aa=s;ba=A}while(1){H=$+8|0;B=c[H>>2]|0;do{if((a[B+112|0]|0)==6){ca=ba;da=aa}else{C=c[B+8>>2]|0;if((C|0)==0){ca=ba;da=aa;break}if((c[C+4>>2]|0)>0){C=0;L=aa;K=ba;D=B;while(1){if((C|0)>0){ea=c[q>>2]|0;if(ea>>>0<(c[p>>2]|0)>>>0){fa=ea}else{Jv(k,1)|0;fa=c[q>>2]|0}c[q>>2]=fa+1;a[fa]=59;ga=c[H>>2]|0}else{ga=D}ea=c[ga+8>>2]|0;ha=c[ea>>2]|0;if((c[ha+(C*48|0)+8>>2]|0)==0){ia=L;ja=ga;ka=ea;la=ha}else{if((c[53492]|0)==0){ma=+h[ha+(C*48|0)+24>>3]}else{ma=+h[21426]- +h[ha+(C*48|0)+24>>3]}nb(r|0,118616,(G=i,i=i+16|0,h[G>>3]=+h[ha+(C*48|0)+16>>3],h[G+8>>3]=ma,G)|0)|0;i=G;Lv(k,r)|0;ha=c[H>>2]|0;ea=c[ha+8>>2]|0;ia=1;ja=ha;ka=ea;la=c[ea>>2]|0}if((c[la+(C*48|0)+12>>2]|0)==0){na=K;oa=ja;pa=ka;qa=la}else{if((c[53492]|0)==0){ra=+h[la+(C*48|0)+40>>3]}else{ra=+h[21426]- +h[la+(C*48|0)+40>>3]}nb(r|0,117672,(G=i,i=i+16|0,h[G>>3]=+h[la+(C*48|0)+32>>3],h[G+8>>3]=ra,G)|0)|0;i=G;Lv(k,r)|0;ea=c[H>>2]|0;ha=c[ea+8>>2]|0;na=1;oa=ea;pa=ha;qa=c[ha>>2]|0}if((c[qa+(C*48|0)+4>>2]|0)>0){ha=0;ea=oa;while(1){if((ha|0)>0){sa=c[q>>2]|0;if(sa>>>0<(c[p>>2]|0)>>>0){ta=sa}else{Jv(k,1)|0;ta=c[q>>2]|0}c[q>>2]=ta+1;a[ta]=32;ua=c[H>>2]|0}else{ua=ea}sa=c[(c[c[ua+8>>2]>>2]|0)+(C*48|0)>>2]|0;o=+h[sa+(ha<<4)+8>>3];if((c[53492]|0)==0){va=o}else{va=+h[21426]-o}nb(r|0,123584,(G=i,i=i+16|0,h[G>>3]=+h[sa+(ha<<4)>>3],h[G+8>>3]=va,G)|0)|0;i=G;Lv(k,r)|0;sa=ha+1|0;wa=c[H>>2]|0;xa=c[wa+8>>2]|0;if((sa|0)<(c[(c[xa>>2]|0)+(C*48|0)+4>>2]|0)){ha=sa;ea=wa}else{ya=wa;za=xa;break}}}else{ya=oa;za=pa}ea=C+1|0;if((ea|0)<(c[za+4>>2]|0)){C=ea;L=ia;K=na;D=ya}else{Aa=ia;Ba=na;break}}}else{Aa=aa;Ba=ba}D=$|0;K=c[q>>2]|0;if(K>>>0<(c[p>>2]|0)>>>0){Ca=K}else{Jv(k,1)|0;Ca=c[q>>2]|0}a[Ca]=0;K=c[n>>2]|0;c[q>>2]=K;gw(D,163480,K)|0;K=c[H>>2]|0;L=c[K+96>>2]|0;if((L|0)==0){Da=K}else{o=+h[L+64>>3];if((c[53492]|0)==0){Ea=o}else{Ea=+h[21426]-o}nb(r|0,123584,(G=i,i=i+16|0,h[G>>3]=+h[L+56>>3],h[G+8>>3]=Ea,G)|0)|0;i=G;gw(D,145120,r)|0;Da=c[H>>2]|0}L=c[Da+108>>2]|0;do{if((L|0)==0){Fa=Da}else{if((a[L+81|0]|0)==0){Fa=Da;break}o=+h[L+64>>3];if((c[53492]|0)==0){Ga=o}else{Ga=+h[21426]-o}nb(r|0,123584,(G=i,i=i+16|0,h[G>>3]=+h[L+56>>3],h[G+8>>3]=Ga,G)|0)|0;i=G;gw(D,148272,r)|0;Fa=c[H>>2]|0}}while(0);L=c[Fa+100>>2]|0;if((L|0)==0){Ha=Fa}else{o=+h[L+64>>3];if((c[53492]|0)==0){Ia=o}else{Ia=+h[21426]-o}nb(r|0,123584,(G=i,i=i+16|0,h[G>>3]=+h[L+56>>3],h[G+8>>3]=Ia,G)|0)|0;i=G;gw(D,142144,r)|0;Ha=c[H>>2]|0}L=c[Ha+104>>2]|0;if((L|0)==0){ca=Ba;da=Aa;break}o=+h[L+64>>3];if((c[53492]|0)==0){Ja=o}else{Ja=+h[21426]-o}nb(r|0,123584,(G=i,i=i+16|0,h[G>>3]=+h[L+56>>3],h[G+8>>3]=Ja,G)|0)|0;i=G;gw(D,139048,r)|0;ca=Ba;da=Aa}}while(0);H=ow(d,$)|0;if((H|0)==0){Z=ca;_=da;break}else{$=H;aa=da;ba=ca}}}else{Z=A;_=s}}while(0);H=vx(d,z)|0;if((H|0)==0){x=_;y=Z;break}else{z=H;s=_;A=Z}}}Bk(d,t,w,v,u);Mv(k);if((b[(c[l>>2]|0)+128>>1]&1)==0){c[f>>2]=x;c[g>>2]=y;Zh(0);i=j;return}dn(d);c[f>>2]=x;c[g>>2]=y;Zh(0);i=j;return}function Ak(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0.0,m=0.0,n=0.0,o=0.0,p=0;e=i;i=i+1024|0;f=b+48|0;g=c[f>>2]|0;if((g|0)==0){j=e|0;k=c[a+8>>2]|0;l=+h[k+16>>3];if((c[53492]|0)==0){m=+h[k+24>>3];n=+h[b+40>>3]+m;o=+h[b+24>>3]+m}else{m=+h[k+24>>3];n=+h[21426]-(+h[b+40>>3]+m);o=+h[21426]-(+h[b+24>>3]+m)}m=+h[b+32>>3]+l;nb(j|0,114432,(k=i,i=i+32|0,h[k>>3]=+h[b+16>>3]+l,h[k+8>>3]=o,h[k+16>>3]=m,h[k+24>>3]=n,k)|0)|0;i=k;Lv(d,j)|0;p=c[f>>2]|0}else{p=g}if((p|0)<=0){i=e;return}p=b+56|0;b=0;do{Ak(a,c[(c[p>>2]|0)+(b<<2)>>2]|0,d);b=b+1|0;}while((b|0)<(c[f>>2]|0));i=e;return}function Bk(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0.0,o=0.0,p=0.0,q=0,r=0,s=0,t=0.0,u=0,v=0,w=0;j=i;i=i+1024|0;k=j|0;l=b+8|0;m=c[l>>2]|0;if((c[53492]|0)==0){n=+h[m+40>>3];o=+h[m+24>>3]}else{p=+h[21426];n=p- +h[m+40>>3];o=p- +h[m+24>>3]}p=+h[m+32>>3];nb(k|0,116760,(q=i,i=i+32|0,h[q>>3]=+h[m+16>>3],h[q+8>>3]=o,h[q+16>>3]=p,h[q+24>>3]=n,q)|0)|0;i=q;m=b|0;hw(m,d,k)|0;b=c[l>>2]|0;r=c[b+12>>2]|0;do{if((r|0)==0){s=b}else{if((a[c[r>>2]|0]|0)==0){s=b;break}n=+h[r+64>>3];if((c[53492]|0)==0){t=n}else{t=+h[21426]-n}nb(k|0,123584,(q=i,i=i+16|0,h[q>>3]=+h[r+56>>3],h[q+8>>3]=t,q)|0)|0;i=q;hw(m,e,k)|0;u=c[(c[l>>2]|0)+12>>2]|0;n=+h[u+32>>3];nb(k|0,115808,(q=i,i=i+8|0,h[q>>3]=+h[u+24>>3]/72.0,q)|0)|0;i=q;hw(m,f,k)|0;nb(k|0,115808,(q=i,i=i+8|0,h[q>>3]=n/72.0,q)|0)|0;i=q;hw(m,g,k)|0;s=c[l>>2]|0}}while(0);if((c[s+172>>2]|0)<1){i=j;return}else{v=1;w=s}while(1){Bk(c[(c[w+176>>2]|0)+(v<<2)>>2]|0,d,e,f,g);s=c[l>>2]|0;if((v|0)<(c[s+172>>2]|0)){v=v+1|0;w=s}else{break}}i=j;return}function Ck(a){a=a|0;var b=0;b=i;i=i+16|0;zk(a,b+8|0,b|0);i=b;return}function Dk(){return $g(21464,c[43330]|0)|0}function Ek(a){a=a|0;Vg(a)|0;return}function Fk(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;e=b;b=i;i=i+8|0;c[b>>2]=c[e>>2];c[b+4>>2]=c[e+4>>2];e=c[a>>2]|0;f=c[b>>2]|0;g=c[b+4>>2]|0;b=jk(16)|0;h=b+8|0;c[h>>2]=f;c[h+4>>2]=g;Hc[e&63](a,b,1)|0;i=d;return}function Gk(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;e=c[a>>2]|0;f=jk(16)|0;g=f+8|0;c[g>>2]=b;c[g+4>>2]=d;Hc[e&63](a,f,1)|0;return}function Hk(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=i;i=i+16|0;e=b;b=i;i=i+8|0;c[b>>2]=c[e>>2];c[b+4>>2]=c[e+4>>2];e=d|0;f=b;b=e+8|0;g=c[f+4>>2]|0;c[b>>2]=c[f>>2];c[b+4>>2]=g;g=(Hc[c[a>>2]&63](a,e,4)|0)!=0|0;i=d;return g|0}function Ik(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=i;i=i+16|0;f=e|0;c[f+8>>2]=b;c[f+12>>2]=d;d=(Hc[c[a>>2]&63](a,f,4)|0)!=0|0;i=e;return d|0}function Jk(a){a=a|0;return bh(a)|0}function Kk(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=jk((bh(a)|0)<<3)|0;d=Zg(a)|0;if((d|0)==0){return b|0}else{e=d;f=b}while(1){d=e+8|0;a=f;g=c[d+4>>2]|0;c[a>>2]=c[d>>2];c[a+4>>2]=g;g=c[e>>2]|0;if((g|0)==0){break}else{e=g;f=f+8|0}}return b|0}function Lk(){var a=0;a=kk(40)|0;tF(a|0,21504,36)|0;c[a+36>>2]=0;return $g(a,c[43330]|0)|0}function Mk(a){a=a|0;Hc[c[a>>2]&63](a,0,64)|0;return}function Nk(a){a=a|0;var b=0,d=0,e=0;b=c[a+4>>2]|0;Vg(a)|0;a=c[b+36>>2]|0;if((a|0)==0){d=b;eF(d);return}else{e=a}while(1){a=c[e>>2]|0;eF(e);if((a|0)==0){break}else{e=a}}d=b;eF(d);return}function Ok(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0;f=i;i=i+24|0;g=f|0;c[g+8>>2]=b;c[g+12>>2]=d;c[g+16>>2]=e;e=c[(Hc[c[a>>2]&63](a,g,1)|0)+16>>2]|0;i=f;return e|0}function Pk(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;a=d+36|0;d=c[a>>2]|0;if((d|0)==0){e=kk(20)|0}else{c[a>>2]=c[d>>2];e=d}d=b+8|0;a=e+8|0;f=c[d+4>>2]|0;c[a>>2]=c[d>>2];c[a+4>>2]=f;c[e+16>>2]=c[b+16>>2];return e|0}function Qk(a,b,d){a=a|0;b=b|0;d=d|0;a=d+36|0;c[b>>2]=c[a>>2];c[a>>2]=b;return}function Rk(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;e=c[b>>2]|0;a=c[d>>2]|0;do{if((e|0)>(a|0)){f=1}else{if((e|0)<(a|0)){f=-1;break}g=c[b+4>>2]|0;h=c[d+4>>2]|0;if((g|0)>(h|0)){f=1;break}f=((g|0)<(h|0))<<31>>31}}while(0);return f|0}function Sk(a,b,c){a=a|0;b=b|0;c=c|0;eF(b);return}function Tk(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0.0,t=0.0,u=0.0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0;d=i;i=i+240|0;e=d|0;f=d+16|0;g=d+32|0;j=d+48|0;k=d+64|0;l=d+80|0;m=d+96|0;n=d+112|0;o=d+128|0;p=d+144|0;q=d+160|0;r=a+8|0;a=c[r>>2]|0;s=+h[a+16>>3];t=+h[a+24>>3];u=+h[a+32>>3];v=+h[a+40>>3];if((b-1|0)>>>0<2>>>0){a=o;w=p;x=o|0;h[x>>3]=s;y=o+8|0;h[y>>3]=v;si(p,o,(c[53548]|0)*90|0);c[a>>2]=c[w>>2];c[a+4>>2]=c[w+4>>2];c[a+8>>2]=c[w+8>>2];c[a+12>>2]=c[w+12>>2];h[x>>3]=+h[x>>3]- +h[26781];h[y>>3]=+h[y>>3]- +h[26782];y=q;c[y>>2]=c[a>>2];c[y+4>>2]=c[a+4>>2];c[y+8>>2]=c[a+8>>2];c[y+12>>2]=c[a+12>>2];a=k;y=l;x=k|0;h[x>>3]=u;w=k+8|0;h[w>>3]=t;si(l,k,(c[53548]|0)*90|0);c[a>>2]=c[y>>2];c[a+4>>2]=c[y+4>>2];c[a+8>>2]=c[y+8>>2];c[a+12>>2]=c[y+12>>2];h[x>>3]=+h[x>>3]- +h[26781];h[w>>3]=+h[w>>3]- +h[26782];w=d+192|0;c[w>>2]=c[a>>2];c[w+4>>2]=c[a+4>>2];c[w+8>>2]=c[a+8>>2];c[w+12>>2]=c[a+12>>2];a=q+16|0;c[a>>2]=c[w>>2];c[a+4>>2]=c[w+4>>2];c[a+8>>2]=c[w+8>>2];c[a+12>>2]=c[w+12>>2]}else{w=e;a=f;x=e|0;h[x>>3]=s;y=e+8|0;h[y>>3]=t;si(f,e,(c[53548]|0)*90|0);c[w>>2]=c[a>>2];c[w+4>>2]=c[a+4>>2];c[w+8>>2]=c[a+8>>2];c[w+12>>2]=c[a+12>>2];h[x>>3]=+h[x>>3]- +h[26781];h[y>>3]=+h[y>>3]- +h[26782];y=q;c[y>>2]=c[w>>2];c[y+4>>2]=c[w+4>>2];c[y+8>>2]=c[w+8>>2];c[y+12>>2]=c[w+12>>2];w=g;y=j;x=g|0;h[x>>3]=u;a=g+8|0;h[a>>3]=v;si(j,g,(c[53548]|0)*90|0);c[w>>2]=c[y>>2];c[w+4>>2]=c[y+4>>2];c[w+8>>2]=c[y+8>>2];c[w+12>>2]=c[y+12>>2];h[x>>3]=+h[x>>3]- +h[26781];h[a>>3]=+h[a>>3]- +h[26782];a=d+208|0;c[a>>2]=c[w>>2];c[a+4>>2]=c[w+4>>2];c[a+8>>2]=c[w+8>>2];c[a+12>>2]=c[w+12>>2];w=q+16|0;c[w>>2]=c[a>>2];c[w+4>>2]=c[a+4>>2];c[w+8>>2]=c[a+8>>2];c[w+12>>2]=c[a+12>>2]}a=(c[r>>2]|0)+16|0;w=q;c[a>>2]=c[w>>2];c[a+4>>2]=c[w+4>>2];c[a+8>>2]=c[w+8>>2];c[a+12>>2]=c[w+12>>2];c[a+16>>2]=c[w+16>>2];c[a+20>>2]=c[w+20>>2];c[a+24>>2]=c[w+24>>2];c[a+28>>2]=c[w+28>>2];w=c[r>>2]|0;a=c[w+12>>2]|0;if((a|0)==0){z=w}else{w=a+56|0;v=+h[a+64>>3];a=m;q=n;x=m|0;h[x>>3]=+h[w>>3];y=m+8|0;h[y>>3]=v;si(n,m,(c[53548]|0)*90|0);c[a>>2]=c[q>>2];c[a+4>>2]=c[q+4>>2];c[a+8>>2]=c[q+8>>2];c[a+12>>2]=c[q+12>>2];h[x>>3]=+h[x>>3]- +h[26781];h[y>>3]=+h[y>>3]- +h[26782];y=d+224|0;c[y>>2]=c[a>>2];c[y+4>>2]=c[a+4>>2];c[y+8>>2]=c[a+8>>2];c[y+12>>2]=c[a+12>>2];a=w;c[a>>2]=c[y>>2];c[a+4>>2]=c[y+4>>2];c[a+8>>2]=c[y+8>>2];c[a+12>>2]=c[y+12>>2];z=c[r>>2]|0}if((c[z+172>>2]|0)<1){i=d;return}else{A=1;B=z}while(1){Tk(c[(c[B+176>>2]|0)+(A<<2)>>2]|0,b);z=c[r>>2]|0;if((A|0)<(c[z+172>>2]|0)){A=A+1|0;B=z}else{break}}i=d;return}function Uk(e,f){e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0.0,va=0.0,wa=0.0,xa=0.0,ya=0,za=0,Aa=0,Ba=0.0,Ca=0.0,Da=0.0,Ea=0.0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0.0,La=0.0,Na=0.0,Oa=0.0,Pa=0,Qa=0.0,Ra=0.0,Sa=0.0,Ta=0,Ua=0,Va=0.0,Wa=0.0,Xa=0.0,Ya=0.0,Za=0.0,_a=0.0,$a=0.0,ab=0,bb=0.0,cb=0.0,db=0.0,eb=0.0,fb=0.0,gb=0.0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0.0,ob=0.0,pb=0.0,qb=0.0,rb=0,sb=0,tb=0.0,ub=0.0,vb=0.0,wb=0.0,xb=0,yb=0.0,zb=0.0,Ab=0,Bb=0,Cb=0.0,Db=0.0,Eb=0.0,Fb=0.0,Gb=0,Hb=0,Ib=0.0,Jb=0.0,Kb=0.0,Mb=0.0,Nb=0.0,Ob=0.0,Pb=0,Qb=0.0,Rb=0.0,Sb=0,Tb=0,Ub=0.0,Vb=0.0,Wb=0.0,Xb=0.0,Yb=0,Zb=0,_b=0.0,$b=0.0,ac=0.0,bc=0.0,cc=0.0,dc=0.0,ec=0,fc=0,hc=0.0,ic=0.0,jc=0,kc=0,lc=0.0,mc=0.0,nc=0.0,oc=0.0,pc=0,qc=0.0,rc=0.0,sc=0.0,tc=0.0,uc=0.0,vc=0.0,wc=0.0,xc=0.0,yc=0.0,zc=0.0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Jc=0.0,Kc=0.0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0.0,Sc=0.0;g=i;i=i+1608|0;j=g|0;k=g+16|0;l=g+32|0;m=g+48|0;n=g+64|0;p=g+80|0;q=g+96|0;r=g+112|0;s=g+128|0;t=g+144|0;u=g+160|0;v=g+176|0;w=g+192|0;x=g+208|0;y=g+224|0;z=g+240|0;A=g+256|0;B=g+272|0;C=g+288|0;D=g+304|0;E=g+320|0;F=g+336|0;G=g+352|0;H=g+368|0;I=g+384|0;J=g+400|0;K=g+416|0;L=g+432|0;M=g+472|0;N=g+488|0;O=g+504|0;P=g+544|0;Q=g+584|0;R=e+8|0;c[53548]=c[(c[R>>2]|0)+116>>2]&3;S=c[(c[R>>2]|0)+116>>2]&1;a[214952]=S;if(S<<24>>24==0){Wk(e)}else{Vk(e)}S=O;T=P;U=c[R>>2]|0;V=b[U+128>>1]&14;W=d[U+113|0]|0;if((W&54|0)==0){if(!((W&1|0)==0|(c[53746]|0)!=0)){X=6}}else{X=6}do{if((X|0)==6){W=ux(e)|0;if((W|0)==0){Y=0;Z=0;_=0}else{U=(V|0)!=0|0;$=0;aa=0;ba=0;ca=W;while(1){W=c[(c[ca+8>>2]|0)+108>>2]|0;do{if((W|0)==0){da=ba;ea=$}else{if((a[W+81|0]|0)==0){da=ba;ea=$+1|0;break}else{da=ba+1|0;ea=$;break}}}while(0);W=mw(e,ca)|0;if((W|0)==0){fa=aa;ga=da}else{ha=aa;ia=da;ja=W;while(1){W=c[ja+8>>2]|0;ka=c[W+108>>2]|0;do{if((ka|0)==0){la=ia;ma=ha}else{if((a[ka+81|0]|0)==0){la=ia;ma=ha+U|0;break}else{la=ia+1|0;ma=ha;break}}}while(0);ka=c[W+100>>2]|0;do{if((ka|0)==0){na=la;oa=ma}else{if((a[ka+81|0]|0)==0){na=la;oa=ma+U|0;break}else{na=la+1|0;oa=ma;break}}}while(0);ka=c[W+104>>2]|0;do{if((ka|0)==0){pa=na;qa=oa}else{if((a[ka+81|0]|0)==0){pa=na;qa=oa+U|0;break}else{pa=na+1|0;qa=oa;break}}}while(0);ka=c[W+96>>2]|0;do{if((ka|0)==0){ra=pa;sa=qa}else{if((a[ka+81|0]|0)==0){ra=pa;sa=qa+U|0;break}else{ra=pa+1|0;sa=qa;break}}}while(0);ka=ow(e,ja)|0;if((ka|0)==0){fa=sa;ga=ra;break}else{ha=sa;ia=ra;ja=ka}}}ja=vx(e,ca)|0;if((ja|0)==0){Y=ea;Z=fa;_=ga;break}else{$=ea;aa=fa;ba=ga;ca=ja}}}if((a[(c[R>>2]|0)+113|0]&8)==0){ta=0}else{ta=Yk(e)|0}ca=Y+Z|0;if((ca|0)==0){break}ba=Z+_+ta+(Lw(e)|0)|0;aa=jk(ba*40|0)|0;$=aa;U=jk(ca*40|0)|0;ja=U;ia=ux(e)|0;if((ia|0)==0){ua=-2147483647.0;va=-2147483647.0;wa=2147483647.0;xa=2147483647.0;ya=$}else{ha=(V|0)==0;ka=N|0;W=N+8|0;za=M|0;Aa=M+8|0;Ba=-2147483647.0;Ca=-2147483647.0;Da=2147483647.0;Ea=2147483647.0;Fa=$;Ga=ja;Ha=ia;while(1){ia=(a[214952]|0)==0;Ia=Ha+8|0;Ja=c[Ia>>2]|0;if(ia){Ka=+h[Ja+32>>3]*72.0;h[Fa+16>>3]=Ka;La=+h[(c[Ia>>2]|0)+40>>3]*72.0;h[Fa+24>>3]=La;Na=Ka;Oa=La}else{La=+h[Ja+40>>3]*72.0;h[Fa+16>>3]=La;Ka=+h[(c[Ia>>2]|0)+32>>3]*72.0;h[Fa+24>>3]=Ka;Na=La;Oa=Ka}Ja=Fa;Pa=(c[Ia>>2]|0)+16|0;c[Ja>>2]=c[Pa>>2];c[Ja+4>>2]=c[Pa+4>>2];c[Ja+8>>2]=c[Pa+8>>2];c[Ja+12>>2]=c[Pa+12>>2];Pa=Fa|0;Ka=+h[Pa>>3]-Na*.5;h[Pa>>3]=Ka;Pa=Fa+8|0;La=+h[Pa>>3]-Oa*.5;h[Pa>>3]=La;Qa=Ea<Ka?Ea:Ka;Ra=Da<La?Da:La;Sa=Na+Ka;Ka=Oa+La;La=Ca>Sa?Ca:Sa;Sa=Ba>Ka?Ba:Ka;Pa=c[(c[Ia>>2]|0)+108>>2]|0;do{if((Pa|0)==0){Ta=Ga;Ua=Fa;Va=Qa;Wa=Ra;Xa=La;Ya=Sa}else{if((a[Pa+81|0]|0)==0){if(ia){Ia=Ga;Ja=Pa+24|0;c[Ia>>2]=c[Ja>>2];c[Ia+4>>2]=c[Ja+4>>2];c[Ia+8>>2]=c[Ja+8>>2];c[Ia+12>>2]=c[Ja+12>>2]}else{h[Ga>>3]=+h[Pa+32>>3];h[Ga+8>>3]=+h[Pa+24>>3]}c[Ga+32>>2]=Pa;a[Ga+36|0]=0;c[Fa+32>>2]=Ga;Ta=Ga+40|0;Ua=Fa;Va=Qa;Wa=Ra;Xa=La;Ya=Sa;break}else{Ja=Fa+40|0;Ia=Pa+24|0;if(ia){Ka=+h[Ia>>3];h[Fa+56>>3]=Ka;Za=+h[Pa+32>>3];h[Fa+64>>3]=Za;_a=Ka;$a=Za}else{Za=+h[Pa+32>>3];h[Fa+56>>3]=Za;Ka=+h[Ia>>3];h[Fa+64>>3]=Ka;_a=Za;$a=Ka}Ia=Ja;ab=Pa+56|0;c[Ia>>2]=c[ab>>2];c[Ia+4>>2]=c[ab+4>>2];c[Ia+8>>2]=c[ab+8>>2];c[Ia+12>>2]=c[ab+12>>2];ab=Ja|0;Ka=+h[ab>>3]-_a*.5;h[ab>>3]=Ka;ab=Fa+48|0;Za=+h[ab>>3]-$a*.5;h[ab>>3]=Za;bb=_a+Ka;cb=$a+Za;Ta=Ga;Ua=Ja;Va=Qa<Ka?Qa:Ka;Wa=Ra<Za?Ra:Za;Xa=La>bb?La:bb;Ya=Sa>cb?Sa:cb;break}}}while(0);Pa=Ua+40|0;ia=mw(e,Ha)|0;if((ia|0)==0){db=Ya;eb=Xa;fb=Wa;gb=Va;hb=Pa;ib=Ta}else{Sa=Ya;La=Xa;Ra=Wa;Qa=Va;Ja=Pa;Pa=Ta;ab=ia;while(1){ia=ab+8|0;Ia=c[ia>>2]|0;jb=c[Ia+96>>2]|0;if((jb|0)==0){kb=Pa;lb=Ja;mb=Qa;ob=Ra;pb=La;qb=Sa;rb=Ia}else{do{if((a[jb+81|0]|0)==0){if(ha){sb=Pa;tb=Qa;ub=Ra;vb=La;wb=Sa;break}mm(M,e,ab);cb=+h[za>>3];bb=+h[Aa>>3];vF(Ja+16|0,0,16)|0;h[Ja>>3]=cb;h[Ja+8>>3]=bb;if((a[214952]|0)==0){Ia=Pa;xb=jb+24|0;c[Ia>>2]=c[xb>>2];c[Ia+4>>2]=c[xb+4>>2];c[Ia+8>>2]=c[xb+8>>2];c[Ia+12>>2]=c[xb+12>>2]}else{h[Pa>>3]=+h[jb+32>>3];h[Pa+8>>3]=+h[jb+24>>3]}c[Pa+32>>2]=jb;a[Pa+36|0]=0;c[Ja+32>>2]=Pa;sb=Pa+40|0;tb=Qa;ub=Ra;vb=La;wb=Sa}else{xb=jb+24|0;if((a[214952]|0)==0){bb=+h[xb>>3];h[Ja+16>>3]=bb;cb=+h[jb+32>>3];h[Ja+24>>3]=cb;yb=bb;zb=cb}else{cb=+h[jb+32>>3];h[Ja+16>>3]=cb;bb=+h[xb>>3];h[Ja+24>>3]=bb;yb=cb;zb=bb}xb=Ja;Ia=jb+56|0;c[xb>>2]=c[Ia>>2];c[xb+4>>2]=c[Ia+4>>2];c[xb+8>>2]=c[Ia+8>>2];c[xb+12>>2]=c[Ia+12>>2];Ia=Ja|0;bb=+h[Ia>>3]-yb*.5;h[Ia>>3]=bb;Ia=Ja+8|0;cb=+h[Ia>>3]-zb*.5;h[Ia>>3]=cb;Za=yb+bb;Ka=zb+cb;sb=Pa;tb=Qa<bb?Qa:bb;ub=Ra<cb?Ra:cb;vb=La>Za?La:Za;wb=Sa>Ka?Sa:Ka}}while(0);kb=sb;lb=Ja+40|0;mb=tb;ob=ub;pb=vb;qb=wb;rb=c[ia>>2]|0}jb=c[rb+104>>2]|0;if((jb|0)==0){Ab=kb;Bb=lb;Cb=mb;Db=ob;Eb=pb;Fb=qb;Gb=rb}else{do{if((a[jb+81|0]|0)==0){if(ha){Hb=kb;Ib=mb;Jb=ob;Kb=pb;Mb=qb;break}Ia=om(ab)|0;do{if((Ia|0)==0){Nb=0.0;Ob=0.0}else{xb=c[Ia>>2]|0;if((c[xb+8>>2]|0)==0){Pb=c[xb>>2]|0;Nb=+h[Pb>>3];Ob=+h[Pb+8>>3];break}else{Nb=+h[xb+16>>3];Ob=+h[xb+24>>3];break}}}while(0);vF(lb+16|0,0,16)|0;h[lb>>3]=Nb;h[lb+8>>3]=Ob;if((a[214952]|0)==0){Ia=kb;xb=jb+24|0;c[Ia>>2]=c[xb>>2];c[Ia+4>>2]=c[xb+4>>2];c[Ia+8>>2]=c[xb+8>>2];c[Ia+12>>2]=c[xb+12>>2]}else{h[kb>>3]=+h[jb+32>>3];h[kb+8>>3]=+h[jb+24>>3]}c[kb+32>>2]=jb;a[kb+36|0]=0;c[lb+32>>2]=kb;Hb=kb+40|0;Ib=mb;Jb=ob;Kb=pb;Mb=qb}else{xb=jb+24|0;if((a[214952]|0)==0){Ka=+h[xb>>3];h[lb+16>>3]=Ka;Za=+h[jb+32>>3];h[lb+24>>3]=Za;Qb=Ka;Rb=Za}else{Za=+h[jb+32>>3];h[lb+16>>3]=Za;Ka=+h[xb>>3];h[lb+24>>3]=Ka;Qb=Za;Rb=Ka}xb=lb;Ia=jb+56|0;c[xb>>2]=c[Ia>>2];c[xb+4>>2]=c[Ia+4>>2];c[xb+8>>2]=c[Ia+8>>2];c[xb+12>>2]=c[Ia+12>>2];Ia=lb|0;Ka=+h[Ia>>3]-Qb*.5;h[Ia>>3]=Ka;Ia=lb+8|0;Za=+h[Ia>>3]-Rb*.5;h[Ia>>3]=Za;cb=Qb+Ka;bb=Rb+Za;Hb=kb;Ib=mb<Ka?mb:Ka;Jb=ob<Za?ob:Za;Kb=pb>cb?pb:cb;Mb=qb>bb?qb:bb}}while(0);Ab=Hb;Bb=lb+40|0;Cb=Ib;Db=Jb;Eb=Kb;Fb=Mb;Gb=c[ia>>2]|0}jb=c[Gb+100>>2]|0;if((jb|0)==0){Sb=Ab;Tb=Bb;Ub=Cb;Vb=Db;Wb=Eb;Xb=Fb;Yb=Gb}else{do{if((a[jb+81|0]|0)==0){if(ha){Zb=Ab;_b=Cb;$b=Db;ac=Eb;bc=Fb;break}Ia=om(ab)|0;do{if((Ia|0)==0){cc=0.0;dc=0.0}else{xb=(c[Ia+4>>2]|0)-1|0;Pb=c[Ia>>2]|0;if((c[Pb+(xb*48|0)+12>>2]|0)==0){ec=(c[Pb+(xb*48|0)+4>>2]|0)-1|0;fc=c[Pb+(xb*48|0)>>2]|0;cc=+h[fc+(ec<<4)>>3];dc=+h[fc+(ec<<4)+8>>3];break}else{cc=+h[Pb+(xb*48|0)+32>>3];dc=+h[Pb+(xb*48|0)+40>>3];break}}}while(0);vF(Bb+16|0,0,16)|0;h[Bb>>3]=cc;h[Bb+8>>3]=dc;if((a[214952]|0)==0){Ia=Ab;xb=jb+24|0;c[Ia>>2]=c[xb>>2];c[Ia+4>>2]=c[xb+4>>2];c[Ia+8>>2]=c[xb+8>>2];c[Ia+12>>2]=c[xb+12>>2]}else{h[Ab>>3]=+h[jb+32>>3];h[Ab+8>>3]=+h[jb+24>>3]}c[Ab+32>>2]=jb;a[Ab+36|0]=0;c[Bb+32>>2]=Ab;Zb=Ab+40|0;_b=Cb;$b=Db;ac=Eb;bc=Fb}else{xb=jb+24|0;if((a[214952]|0)==0){bb=+h[xb>>3];h[Bb+16>>3]=bb;cb=+h[jb+32>>3];h[Bb+24>>3]=cb;hc=bb;ic=cb}else{cb=+h[jb+32>>3];h[Bb+16>>3]=cb;bb=+h[xb>>3];h[Bb+24>>3]=bb;hc=cb;ic=bb}xb=Bb;Ia=jb+56|0;c[xb>>2]=c[Ia>>2];c[xb+4>>2]=c[Ia+4>>2];c[xb+8>>2]=c[Ia+8>>2];c[xb+12>>2]=c[Ia+12>>2];Ia=Bb|0;bb=+h[Ia>>3]-hc*.5;h[Ia>>3]=bb;Ia=Bb+8|0;cb=+h[Ia>>3]-ic*.5;h[Ia>>3]=cb;Za=hc+bb;Ka=ic+cb;Zb=Ab;_b=Cb<bb?Cb:bb;$b=Db<cb?Db:cb;ac=Eb>Za?Eb:Za;bc=Fb>Ka?Fb:Ka}}while(0);Sb=Zb;Tb=Bb+40|0;Ub=_b;Vb=$b;Wb=ac;Xb=bc;Yb=c[ia>>2]|0}jb=c[Yb+108>>2]|0;if((jb|0)==0){jc=Sb;kc=Tb;lc=Ub;mc=Vb;nc=Wb;oc=Xb}else{do{if((a[jb+81|0]|0)==0){if(ha){pc=Sb;qc=Ub;rc=Vb;sc=Wb;tc=Xb;break}mm(N,e,ab);Ka=+h[ka>>3];Za=+h[W>>3];vF(Tb+16|0,0,16)|0;h[Tb>>3]=Ka;h[Tb+8>>3]=Za;if((a[214952]|0)==0){Ia=Sb;xb=jb+24|0;c[Ia>>2]=c[xb>>2];c[Ia+4>>2]=c[xb+4>>2];c[Ia+8>>2]=c[xb+8>>2];c[Ia+12>>2]=c[xb+12>>2]}else{h[Sb>>3]=+h[jb+32>>3];h[Sb+8>>3]=+h[jb+24>>3]}c[Sb+32>>2]=jb;a[Sb+36|0]=0;c[Tb+32>>2]=Sb;pc=Sb+40|0;qc=Ub;rc=Vb;sc=Wb;tc=Xb}else{xb=jb+24|0;if((a[214952]|0)==0){Za=+h[xb>>3];h[Tb+16>>3]=Za;Ka=+h[jb+32>>3];h[Tb+24>>3]=Ka;uc=Za;vc=Ka}else{Ka=+h[jb+32>>3];h[Tb+16>>3]=Ka;Za=+h[xb>>3];h[Tb+24>>3]=Za;uc=Ka;vc=Za}xb=Tb;Ia=jb+56|0;c[xb>>2]=c[Ia>>2];c[xb+4>>2]=c[Ia+4>>2];c[xb+8>>2]=c[Ia+8>>2];c[xb+12>>2]=c[Ia+12>>2];Ia=Tb|0;Za=+h[Ia>>3]-uc*.5;h[Ia>>3]=Za;Ia=Tb+8|0;Ka=+h[Ia>>3]-vc*.5;h[Ia>>3]=Ka;cb=uc+Za;bb=vc+Ka;pc=Sb;qc=Ub<Za?Ub:Za;rc=Vb<Ka?Vb:Ka;sc=Wb>cb?Wb:cb;tc=Xb>bb?Xb:bb}}while(0);jc=pc;kc=Tb+40|0;lc=qc;mc=rc;nc=sc;oc=tc}jb=ow(e,ab)|0;if((jb|0)==0){db=oc;eb=nc;fb=mc;gb=lc;hb=kc;ib=jc;break}else{Sa=oc;La=nc;Ra=mc;Qa=lc;Ja=kc;Pa=jc;ab=jb}}}ab=vx(e,Ha)|0;if((ab|0)==0){ua=db;va=eb;wa=fb;xa=gb;ya=hb;break}else{Ba=db;Ca=eb;Da=fb;Ea=gb;Fa=hb;Ga=ib;Ha=ab}}}if((ta|0)==0){wc=xa;xc=wa;yc=va;zc=ua}else{Ha=O|0;h[Ha>>3]=xa;Ga=O+8|0;h[Ga>>3]=wa;Fa=O+16|0;h[Fa>>3]=va;W=O+24|0;h[W>>3]=ua;c[O+32>>2]=ya;Zk(P,e,O);c[S>>2]=c[T>>2];c[S+4>>2]=c[T+4>>2];c[S+8>>2]=c[T+8>>2];c[S+12>>2]=c[T+12>>2];c[S+16>>2]=c[T+16>>2];c[S+20>>2]=c[T+20>>2];c[S+24>>2]=c[T+24>>2];c[S+28>>2]=c[T+28>>2];c[S+32>>2]=c[T+32>>2];c[S+36>>2]=c[T+36>>2];wc=+h[Ha>>3];xc=+h[Ga>>3];yc=+h[Fa>>3];zc=+h[W>>3]}W=L+32|0;a[W]=Jm(e|0,Wv(e,0,114920,0)|0,1)|0;Fa=L|0;h[Fa>>3]=wc;Ga=L+8|0;h[Ga>>3]=xc;Ha=L+16|0;h[Ha>>3]=yc;ka=L+24|0;h[ka>>3]=zc;Mz($,ba,ja,ca,L)|0;do{if((a[213992]|0)==0){X=118}else{ha=c[o>>2]|0;Aa=d[W]|0;Ea=+h[Fa>>3];Da=+h[Ga>>3];Ca=+h[Ha>>3];Ba=+h[ka>>3];gc(ha|0,96552,(Ac=i,i=i+56|0,c[Ac>>2]=ba,c[Ac+8>>2]=ca,c[Ac+16>>2]=Aa,h[Ac+24>>3]=Ea,h[Ac+32>>3]=Da,h[Ac+40>>3]=Ca,h[Ac+48>>3]=Ba,Ac)|0)|0;i=Ac;if((d[213992]|0)>>>0<2>>>0){X=118;break}Ma(91224,8,1,ha|0)|0;if((ba|0)>0){Aa=$;za=0;while(1){ab=c[Aa+32>>2]|0;Ba=+h[Aa>>3];Ca=+h[Aa+8>>3];Da=+h[Aa+16>>3];Ea=+h[Aa+24>>3];if((ab|0)==0){Bc=213304}else{Bc=c[c[ab+32>>2]>>2]|0}gc(ha|0,86024,(Ac=i,i=i+56|0,c[Ac>>2]=za,h[Ac+8>>3]=Ba,h[Ac+16>>3]=Ca,h[Ac+24>>3]=Da,h[Ac+32>>3]=Ea,c[Ac+40>>2]=ab,c[Ac+48>>2]=Bc,Ac)|0)|0;i=Ac;ab=za+1|0;if((ab|0)<(ba|0)){Aa=Aa+40|0;za=ab}else{break}}}Ma(167600,8,1,ha|0)|0;if((ca|0)>0){Cc=ja;Dc=0}else{Ec=0;break}while(1){za=d[Cc+36|0]|0;Ea=+h[Cc+16>>3];Da=+h[Cc+24>>3];Ca=+h[Cc>>3];Ba=+h[Cc+8>>3];Aa=c[c[Cc+32>>2]>>2]|0;gc(ha|0,163416,(Ac=i,i=i+64|0,c[Ac>>2]=Dc,c[Ac+8>>2]=Cc,c[Ac+16>>2]=za,h[Ac+24>>3]=Ea,h[Ac+32>>3]=Da,h[Ac+40>>3]=Ca,h[Ac+48>>3]=Ba,c[Ac+56>>2]=Aa,Ac)|0)|0;i=Ac;Aa=Dc+1|0;if((Aa|0)<(ca|0)){Cc=Cc+40|0;Dc=Aa}else{X=118;break}}}}while(0);do{if((X|0)==118){if((ca|0)>0){Fc=0;Gc=0;Hc=ja}else{Ec=0;break}while(1){if((a[Hc+36|0]|0)==0){Ic=Gc}else{ba=c[Hc+32>>2]|0;a[ba+81|0]=1;Ba=+h[Hc+24>>3]+ +h[Hc+8>>3]*.5;h[ba+56>>3]=+h[Hc+16>>3]+ +h[Hc>>3]*.5;h[ba+64>>3]=Ba;_m(e,ba);Ic=Gc+1|0}ba=Fc+1|0;if((ba|0)<(ca|0)){Fc=ba;Gc=Ic;Hc=Hc+40|0}else{Ec=Ic;break}}}}while(0);do{if((a[213992]|0)==0){if((Ec|0)==(ca|0)){break}Fv(0,102304,(Ac=i,i=i+16|0,c[Ac>>2]=Ec,c[Ac+8>>2]=ca,Ac)|0)|0;i=Ac}else{gc(c[o>>2]|0,108e3,(Ac=i,i=i+16|0,c[Ac>>2]=Ec,c[Ac+8>>2]=ca,Ac)|0)|0;i=Ac}}while(0);eF(aa);eF(U)}}while(0);Ec=c[R>>2]|0;Ic=c[Ec+12>>2]|0;do{if((Ic|0)==0){Jc=0.0;Kc=0.0}else{if((a[Ic+81|0]|0)!=0){Jc=0.0;Kc=0.0;break}zc=+h[Ic+24>>3]+16.0;yc=+h[Ic+32>>3]+8.0;Hc=(a[Ec+263|0]&1)!=0;if((a[214952]|0)!=0){if(Hc){Gc=Ec+32|0;h[Gc>>3]=yc+ +h[Gc>>3]}else{Gc=Ec+16|0;h[Gc>>3]=+h[Gc>>3]-yc}Gc=c[R>>2]|0;Fc=Gc+24|0;xc=+h[Fc>>3];wc=+h[Gc+40>>3]-xc;if(zc<=wc){Jc=zc;Kc=yc;break}ua=(zc-wc)*.5;h[Fc>>3]=xc-ua;Fc=(c[R>>2]|0)+40|0;h[Fc>>3]=ua+ +h[Fc>>3];Jc=zc;Kc=yc;break}Fc=(c[53548]|0)==0;do{if(Hc){if(Fc){Gc=Ec+40|0;h[Gc>>3]=yc+ +h[Gc>>3];break}else{Gc=Ec+24|0;h[Gc>>3]=+h[Gc>>3]-yc;break}}else{if(Fc){Gc=Ec+24|0;h[Gc>>3]=+h[Gc>>3]-yc;break}else{Gc=Ec+40|0;h[Gc>>3]=yc+ +h[Gc>>3];break}}}while(0);Fc=c[R>>2]|0;Hc=Fc+16|0;ua=+h[Hc>>3];xc=+h[Fc+32>>3]-ua;if(zc<=xc){Jc=zc;Kc=yc;break}wc=(zc-xc)*.5;h[Hc>>3]=ua-wc;Hc=(c[R>>2]|0)+32|0;h[Hc>>3]=wc+ +h[Hc>>3];Jc=zc;Kc=yc}}while(0);do{if((f|0)!=0){Ec=c[53548]|0;if((Ec|0)==0){Ic=(c[R>>2]|0)+16|0;c[53562]=c[Ic>>2];c[53563]=c[Ic+4>>2];c[53564]=c[Ic+8>>2];c[53565]=c[Ic+12>>2]}else if((Ec|0)==1){Ic=c[R>>2]|0;wc=+h[Ic+16>>3];h[26781]=-0.0- +h[Ic+40>>3];h[26782]=wc}else if((Ec|0)==2){Ic=c[R>>2]|0;wc=-0.0- +h[Ic+40>>3];h[26781]=+h[Ic+16>>3];h[26782]=wc}else if((Ec|0)==3){Ic=c[R>>2]|0;wc=+h[Ic+16>>3];h[26781]=+h[Ic+24>>3];h[26782]=wc}Ic=J;Hc=K;if(+h[26781]==0.0){if(!(+h[26782]!=0.0|(Ec|0)!=0)){break}}Ec=ux(e)|0;if((Ec|0)!=0){Fc=H;U=I;aa=H|0;Gc=H+8|0;X=y;Dc=z;Cc=A;Bc=B;L=C;T=D;S=E;O=s;P=t;ya=s|0;ta=s+8|0;ib=u;hb=v;jc=u|0;kc=u+8|0;Tb=w;pc=x;Sb=w|0;N=w+8|0;Yb=j;Bb=k;Zb=j|0;Ab=j+8|0;Gb=l;lb=m;Hb=l|0;kb=l+8|0;rb=n;sb=p;M=n|0;Ta=n+8|0;Ua=q;V=r;_=q|0;Z=q+8|0;Y=F;ga=G;fa=F|0;ea=F+8|0;ra=Ec;do{if((c[53548]|0)==0){Lc=0}else{vn(ra,0);Lc=(c[53548]|0)*90|0}Ec=ra+8|0;sa=c[Ec>>2]|0;qa=sa+16|0;wc=+h[sa+24>>3];h[aa>>3]=+h[qa>>3];h[Gc>>3]=wc;si(I,H,Lc);c[Fc>>2]=c[U>>2];c[Fc+4>>2]=c[U+4>>2];c[Fc+8>>2]=c[U+8>>2];c[Fc+12>>2]=c[U+12>>2];h[aa>>3]=+h[aa>>3]- +h[26781];h[Gc>>3]=+h[Gc>>3]- +h[26782];c[Ic>>2]=c[Fc>>2];c[Ic+4>>2]=c[Fc+4>>2];c[Ic+8>>2]=c[Fc+8>>2];c[Ic+12>>2]=c[Fc+12>>2];sa=qa;c[sa>>2]=c[Ic>>2];c[sa+4>>2]=c[Ic+4>>2];c[sa+8>>2]=c[Ic+8>>2];c[sa+12>>2]=c[Ic+12>>2];sa=c[(c[Ec>>2]|0)+108>>2]|0;if((sa|0)!=0){Ec=sa+56|0;wc=+h[sa+64>>3];h[fa>>3]=+h[Ec>>3];h[ea>>3]=wc;si(G,F,(c[53548]|0)*90|0);c[Y>>2]=c[ga>>2];c[Y+4>>2]=c[ga+4>>2];c[Y+8>>2]=c[ga+8>>2];c[Y+12>>2]=c[ga+12>>2];h[fa>>3]=+h[fa>>3]- +h[26781];h[ea>>3]=+h[ea>>3]- +h[26782];c[Hc>>2]=c[Y>>2];c[Hc+4>>2]=c[Y+4>>2];c[Hc+8>>2]=c[Y+8>>2];c[Hc+12>>2]=c[Y+12>>2];sa=Ec;c[sa>>2]=c[Hc>>2];c[sa+4>>2]=c[Hc+4>>2];c[sa+8>>2]=c[Hc+8>>2];c[sa+12>>2]=c[Hc+12>>2]}do{if((c[53522]|0)==1){sa=mw(e,ra)|0;if((sa|0)==0){break}else{Mc=sa}do{sa=Mc+8|0;Ec=c[sa>>2]|0;qa=c[Ec+8>>2]|0;do{if((qa|0)==0){if((a[215376]|0)!=0){break}if((a[Ec+112|0]|0)==6){break}pa=Mc;oa=$w(c[((c[pa>>2]&3|0)==3?Mc:Mc+32|0)+28>>2]|0)|0;na=$w(c[((c[pa>>2]&3|0)==2?Mc:Mc-32|0)+28>>2]|0)|0;Fv(1,126784,(Ac=i,i=i+16|0,c[Ac>>2]=oa,c[Ac+8>>2]=na,Ac)|0)|0;i=Ac}else{if((c[qa+4>>2]|0)>0){na=0;oa=qa;while(1){pa=c[oa>>2]|0;ma=c[pa+(na*48|0)>>2]|0;la=c[pa+(na*48|0)+4>>2]|0;da=c[pa+(na*48|0)+8>>2]|0;ca=c[pa+(na*48|0)+12>>2]|0;if((la|0)>0){pa=0;do{ja=ma+(pa<<4)|0;wc=+h[ma+(pa<<4)+8>>3];h[Sb>>3]=+h[ja>>3];h[N>>3]=wc;si(x,w,(c[53548]|0)*90|0);c[Tb>>2]=c[pc>>2];c[Tb+4>>2]=c[pc+4>>2];c[Tb+8>>2]=c[pc+8>>2];c[Tb+12>>2]=c[pc+12>>2];h[Sb>>3]=+h[Sb>>3]- +h[26781];h[N>>3]=+h[N>>3]- +h[26782];c[X>>2]=c[Tb>>2];c[X+4>>2]=c[Tb+4>>2];c[X+8>>2]=c[Tb+8>>2];c[X+12>>2]=c[Tb+12>>2];ba=ja;c[ba>>2]=c[X>>2];c[ba+4>>2]=c[X+4>>2];c[ba+8>>2]=c[X+8>>2];c[ba+12>>2]=c[X+12>>2];pa=pa+1|0;}while((pa|0)<(la|0))}if((da|0)!=0){la=c[c[(c[sa>>2]|0)+8>>2]>>2]|0;pa=la+(na*48|0)+16|0;wc=+h[la+(na*48|0)+24>>3];h[jc>>3]=+h[pa>>3];h[kc>>3]=wc;si(v,u,(c[53548]|0)*90|0);c[ib>>2]=c[hb>>2];c[ib+4>>2]=c[hb+4>>2];c[ib+8>>2]=c[hb+8>>2];c[ib+12>>2]=c[hb+12>>2];h[jc>>3]=+h[jc>>3]- +h[26781];h[kc>>3]=+h[kc>>3]- +h[26782];c[Dc>>2]=c[ib>>2];c[Dc+4>>2]=c[ib+4>>2];c[Dc+8>>2]=c[ib+8>>2];c[Dc+12>>2]=c[ib+12>>2];la=pa;c[la>>2]=c[Dc>>2];c[la+4>>2]=c[Dc+4>>2];c[la+8>>2]=c[Dc+8>>2];c[la+12>>2]=c[Dc+12>>2]}if((ca|0)!=0){la=c[c[(c[sa>>2]|0)+8>>2]>>2]|0;pa=la+(na*48|0)+32|0;wc=+h[la+(na*48|0)+40>>3];h[ya>>3]=+h[pa>>3];h[ta>>3]=wc;si(t,s,(c[53548]|0)*90|0);c[O>>2]=c[P>>2];c[O+4>>2]=c[P+4>>2];c[O+8>>2]=c[P+8>>2];c[O+12>>2]=c[P+12>>2];h[ya>>3]=+h[ya>>3]- +h[26781];h[ta>>3]=+h[ta>>3]- +h[26782];c[Cc>>2]=c[O>>2];c[Cc+4>>2]=c[O+4>>2];c[Cc+8>>2]=c[O+8>>2];c[Cc+12>>2]=c[O+12>>2];la=pa;c[la>>2]=c[Cc>>2];c[la+4>>2]=c[Cc+4>>2];c[la+8>>2]=c[Cc+8>>2];c[la+12>>2]=c[Cc+12>>2]}la=na+1|0;pa=c[sa>>2]|0;ma=c[pa+8>>2]|0;if((la|0)<(c[ma+4>>2]|0)){na=la;oa=ma}else{Nc=pa;break}}}else{Nc=Ec}oa=c[Nc+96>>2]|0;if((oa|0)==0){Oc=Nc}else{na=oa+56|0;wc=+h[oa+64>>3];h[_>>3]=+h[na>>3];h[Z>>3]=wc;si(r,q,(c[53548]|0)*90|0);c[Ua>>2]=c[V>>2];c[Ua+4>>2]=c[V+4>>2];c[Ua+8>>2]=c[V+8>>2];c[Ua+12>>2]=c[V+12>>2];h[_>>3]=+h[_>>3]- +h[26781];h[Z>>3]=+h[Z>>3]- +h[26782];c[Bc>>2]=c[Ua>>2];c[Bc+4>>2]=c[Ua+4>>2];c[Bc+8>>2]=c[Ua+8>>2];c[Bc+12>>2]=c[Ua+12>>2];oa=na;c[oa>>2]=c[Bc>>2];c[oa+4>>2]=c[Bc+4>>2];c[oa+8>>2]=c[Bc+8>>2];c[oa+12>>2]=c[Bc+12>>2];Oc=c[sa>>2]|0}oa=c[Oc+108>>2]|0;if((oa|0)==0){Pc=Oc}else{na=oa+56|0;wc=+h[oa+64>>3];h[M>>3]=+h[na>>3];h[Ta>>3]=wc;si(p,n,(c[53548]|0)*90|0);c[rb>>2]=c[sb>>2];c[rb+4>>2]=c[sb+4>>2];c[rb+8>>2]=c[sb+8>>2];c[rb+12>>2]=c[sb+12>>2];h[M>>3]=+h[M>>3]- +h[26781];h[Ta>>3]=+h[Ta>>3]- +h[26782];c[L>>2]=c[rb>>2];c[L+4>>2]=c[rb+4>>2];c[L+8>>2]=c[rb+8>>2];c[L+12>>2]=c[rb+12>>2];oa=na;c[oa>>2]=c[L>>2];c[oa+4>>2]=c[L+4>>2];c[oa+8>>2]=c[L+8>>2];c[oa+12>>2]=c[L+12>>2];Pc=c[sa>>2]|0}oa=c[Pc+100>>2]|0;if((oa|0)==0){Qc=Pc}else{na=oa+56|0;wc=+h[oa+64>>3];h[Hb>>3]=+h[na>>3];h[kb>>3]=wc;si(m,l,(c[53548]|0)*90|0);c[Gb>>2]=c[lb>>2];c[Gb+4>>2]=c[lb+4>>2];c[Gb+8>>2]=c[lb+8>>2];c[Gb+12>>2]=c[lb+12>>2];h[Hb>>3]=+h[Hb>>3]- +h[26781];h[kb>>3]=+h[kb>>3]- +h[26782];c[T>>2]=c[Gb>>2];c[T+4>>2]=c[Gb+4>>2];c[T+8>>2]=c[Gb+8>>2];c[T+12>>2]=c[Gb+12>>2];oa=na;c[oa>>2]=c[T>>2];c[oa+4>>2]=c[T+4>>2];c[oa+8>>2]=c[T+8>>2];c[oa+12>>2]=c[T+12>>2];Qc=c[sa>>2]|0}oa=c[Qc+104>>2]|0;if((oa|0)==0){break}na=oa+56|0;wc=+h[oa+64>>3];h[Zb>>3]=+h[na>>3];h[Ab>>3]=wc;si(k,j,(c[53548]|0)*90|0);c[Yb>>2]=c[Bb>>2];c[Yb+4>>2]=c[Bb+4>>2];c[Yb+8>>2]=c[Bb+8>>2];c[Yb+12>>2]=c[Bb+12>>2];h[Zb>>3]=+h[Zb>>3]- +h[26781];h[Ab>>3]=+h[Ab>>3]- +h[26782];c[S>>2]=c[Yb>>2];c[S+4>>2]=c[Yb+4>>2];c[S+8>>2]=c[Yb+8>>2];c[S+12>>2]=c[Yb+12>>2];oa=na;c[oa>>2]=c[S>>2];c[oa+4>>2]=c[S+4>>2];c[oa+8>>2]=c[S+8>>2];c[oa+12>>2]=c[S+12>>2]}}while(0);Mc=ow(e,Mc)|0;}while((Mc|0)!=0)}}while(0);ra=vx(e,ra)|0;}while((ra|0)!=0)}Tk(e,c[(c[R>>2]|0)+116>>2]&3)}}while(0);e=c[R>>2]|0;Mc=c[e+12>>2]|0;do{if((Mc|0)!=0){if((a[Mc+81|0]|0)!=0){break}j=a[e+263|0]|0;k=j<<24>>24;do{if((k&4|0)==0){yc=+h[e+16>>3];if((k&2|0)==0){Rc=(yc+ +h[e+32>>3])*.5;break}else{Rc=Jc*.5+yc;break}}else{Rc=+h[e+32>>3]-Jc*.5}}while(0);if((j&1)==0){Sc=Kc*.5+ +h[e+24>>3]}else{Sc=+h[e+40>>3]-Kc*.5}h[Mc+56>>3]=Rc;h[Mc+64>>3]=Sc;a[(c[(c[R>>2]|0)+12>>2]|0)+81|0]=1}}while(0);if((c[53530]|0)==0){i=g;return}R=Q|0;if((a[214952]|0)==0){Sc=+h[26782];Rc=+h[26781];nb(R|0,155504,(Ac=i,i=i+48|0,h[Ac>>3]=Sc,h[Ac+8>>3]=Rc,h[Ac+16>>3]=Sc,h[Ac+24>>3]=Rc,h[Ac+32>>3]=-0.0-Rc,h[Ac+40>>3]=-0.0-Sc,Ac)|0)|0;i=Ac}else{Sc=+h[26781];Rc=+h[26782];nb(R|0,116976,(Ac=i,i=i+32|0,h[Ac>>3]=Sc,h[Ac+8>>3]=Rc,h[Ac+16>>3]=Sc,h[Ac+24>>3]=Rc,Ac)|0)|0;i=Ac}Ac=Lb(R|0)|0;c[c[53530]>>2]=Ac;i=g;return}function Vk(b){b=b|0;var d=0,e=0,f=0,g=0,i=0,j=0.0,k=0.0,l=0,m=0.0,n=0,o=0;d=b+8|0;do{if((Ix(b|0)|0)!=(b|0)){e=c[d>>2]|0;f=c[e+12>>2]|0;if((f|0)==0){break}if((a[f+81|0]|0)!=0){break}g=a[e+263|0]|0;if((g&1)==0){i=e+104|0;j=+h[e+16>>3]+ +h[e+96>>3]*.5}else{i=e+72|0;j=+h[e+32>>3]- +h[e+64>>3]*.5}k=+h[i>>3];l=g<<24>>24;do{if((l&4|0)==0){if((l&2|0)==0){m=(+h[e+24>>3]+ +h[e+40>>3])*.5;break}else{m=+h[e+40>>3]-k*.5;break}}else{m=k*.5+ +h[e+24>>3]}}while(0);h[f+56>>3]=j;h[f+64>>3]=m;a[(c[(c[d>>2]|0)+12>>2]|0)+81|0]=1}}while(0);i=c[d>>2]|0;if((c[i+172>>2]|0)<1){return}else{n=1;o=i}while(1){Vk(c[(c[o+176>>2]|0)+(n<<2)>>2]|0);i=c[d>>2]|0;if((n|0)<(c[i+172>>2]|0)){n=n+1|0;o=i}else{break}}return}function Wk(b){b=b|0;var d=0,e=0,f=0,g=0,i=0,j=0.0,k=0.0,l=0,m=0.0,n=0.0,o=0,p=0;d=b+8|0;do{if((Ix(b|0)|0)!=(b|0)){e=c[d>>2]|0;f=c[e+12>>2]|0;if((f|0)==0){break}if((a[f+81|0]|0)!=0){break}g=a[e+263|0]|0;if((g&1)==0){i=e+48|0;j=+h[e+24>>3]+ +h[e+56>>3]*.5}else{i=e+80|0;j=+h[e+40>>3]- +h[e+88>>3]*.5}k=+h[i>>3];l=g<<24>>24;do{if((l&4|0)==0){m=+h[e+16>>3];if((l&2|0)==0){n=(m+ +h[e+32>>3])*.5;break}else{n=k*.5+m;break}}else{n=+h[e+32>>3]-k*.5}}while(0);h[f+56>>3]=n;h[f+64>>3]=j;a[(c[(c[d>>2]|0)+12>>2]|0)+81|0]=1}}while(0);i=c[d>>2]|0;if((c[i+172>>2]|0)<1){return}else{o=1;p=i}while(1){Wk(c[(c[p+176>>2]|0)+(o<<2)>>2]|0);i=c[d>>2]|0;if((o|0)<(c[i+172>>2]|0)){o=o+1|0;p=i}else{break}}return}function Xk(a){a=a|0;Uk(a,1);return}function Yk(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;d=(Ix(b|0)|0)==(b|0);e=c[b+8>>2]|0;do{if(d){f=0}else{g=c[e+12>>2]|0;if((g|0)==0){f=0;break}f=(a[g+81|0]|0)!=0|0}}while(0);d=b+8|0;if((c[e+172>>2]|0)<1){h=f;return h|0}else{i=1;j=f;k=e}while(1){e=(Yk(c[(c[k+176>>2]|0)+(i<<2)>>2]|0)|0)+j|0;f=c[d>>2]|0;if((i|0)<(c[f+172>>2]|0)){i=i+1|0;j=e;k=f}else{h=e;break}}return h|0}function Zk(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0.0,s=0.0,t=0.0,u=0,v=0.0,w=0,x=0.0,y=0.0,z=0.0,A=0.0,B=0,C=0.0,D=0.0;g=i;i=i+40|0;j=f;f=i;i=i+40|0;tF(f,j,40)|0;j=g|0;l=e+8|0;m=c[l>>2]|0;if((c[m+172>>2]|0)>=1){n=f;o=j;p=1;q=m;while(1){Zk(j,c[(c[q+176>>2]|0)+(p<<2)>>2]|0,f);c[n>>2]=c[o>>2];c[n+4>>2]=c[o+4>>2];c[n+8>>2]=c[o+8>>2];c[n+12>>2]=c[o+12>>2];c[n+16>>2]=c[o+16>>2];c[n+20>>2]=c[o+20>>2];c[n+24>>2]=c[o+24>>2];c[n+28>>2]=c[o+28>>2];c[n+32>>2]=c[o+32>>2];c[n+36>>2]=c[o+36>>2];m=c[l>>2]|0;if((p|0)<(c[m+172>>2]|0)){p=p+1|0;q=m}else{break}}}do{if((Ix(e|0)|0)!=(e|0)){q=c[(c[l>>2]|0)+12>>2]|0;if((q|0)==0){break}if((a[q+81|0]|0)==0){break}p=f+32|0;o=c[p>>2]|0;n=f|0;r=(c[k>>2]=d[n]|d[n+1|0]<<8|d[n+2|0]<<16|d[n+3|0]<<24,c[k+4>>2]=d[n+4|0]|d[n+5|0]<<8|d[n+6|0]<<16|d[n+7|0]<<24,+h[k>>3]);j=f+8|0;s=(c[k>>2]=d[j]|d[j+1|0]<<8|d[j+2|0]<<16|d[j+3|0]<<24,c[k+4>>2]=d[j+4|0]|d[j+5|0]<<8|d[j+6|0]<<16|d[j+7|0]<<24,+h[k>>3]);m=f+16|0;t=(c[k>>2]=d[m]|d[m+1|0]<<8|d[m+2|0]<<16|d[m+3|0]<<24,c[k+4>>2]=d[m+4|0]|d[m+5|0]<<8|d[m+6|0]<<16|d[m+7|0]<<24,+h[k>>3]);u=f+24|0;v=(c[k>>2]=d[u]|d[u+1|0]<<8|d[u+2|0]<<16|d[u+3|0]<<24,c[k+4>>2]=d[u+4|0]|d[u+5|0]<<8|d[u+6|0]<<16|d[u+7|0]<<24,+h[k>>3]);w=q+24|0;if((a[214952]|0)==0){x=+h[w>>3];h[o+16>>3]=x;y=+h[q+32>>3];h[o+24>>3]=y;z=x;A=y}else{y=+h[q+32>>3];h[o+16>>3]=y;x=+h[w>>3];h[o+24>>3]=x;z=y;A=x}w=o;B=q+56|0;c[w>>2]=c[B>>2];c[w+4>>2]=c[B+4>>2];c[w+8>>2]=c[B+8>>2];c[w+12>>2]=c[B+12>>2];B=o|0;x=+h[B>>3]-z*.5;h[B>>3]=x;B=o+8|0;y=+h[B>>3]-A*.5;h[B>>3]=y;C=z+x;D=A+y;h[n>>3]=r<x?r:x;h[j>>3]=s<y?s:y;h[m>>3]=t>C?t:C;h[u>>3]=v>D?v:D;c[p>>2]=o+40}}while(0);l=b;b=f;c[l>>2]=c[b>>2];c[l+4>>2]=c[b+4>>2];c[l+8>>2]=c[b+8>>2];c[l+12>>2]=c[b+12>>2];c[l+16>>2]=c[b+16>>2];c[l+20>>2]=c[b+20>>2];c[l+24>>2]=c[b+24>>2];c[l+28>>2]=c[b+28>>2];c[l+32>>2]=c[b+32>>2];c[l+36>>2]=c[b+36>>2];i=g;return}function _k(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;d=i;i=i+1136|0;e=d+1024|0;f=d+1104|0;g=d+1112|0;j=d+1120|0;k=d+1128|0;l=b|0;m=Sm(ew(l,116816)|0)|0;if((m|0)==0){n=$w(l)|0;Fv(0,155400,(o=i,i=i+8|0,c[o>>2]=n,o)|0)|0;i=o;i=d;return}n=d|0;l=c[53828]|0;if((l|0)==0){p=$g(173152,c[43330]|0)|0;c[53828]=p;q=p}else{q=l}l=Hc[c[q>>2]&63](q,m,512)|0;do{if((l|0)==0){q=Eb(m|0,107984)|0;if((q|0)==0){Fv(0,148208,(o=i,i=i+8|0,c[o>>2]=m,o)|0)|0;i=o;r=0;break}do{if((db(n|0,1024,q|0)|0)==0){s=16}else{p=0;t=0;while(1){u=ac(n|0,145064,(o=i,i=i+32|0,c[o>>2]=f,c[o+8>>2]=g,c[o+16>>2]=j,c[o+24>>2]=k,o)|0)|0;i=o;v=(u|0)==4?1:p;if((a[n]|0)==37){w=t}else{u=(Ua(n|0,142104)|0)==0;w=u?t:1}if((v|0)==0){x=w;y=0}else{if((w|0)==0){x=0;y=v}else{z=v;A=w&255;break}}if((db(n|0,1024,q|0)|0)==0){z=y;A=x&255;break}else{p=y;t=x}}if((z|0)==0){s=16;break}t=kk(64)|0;c[t+32>>2]=c[f>>2];p=t+36|0;c[p>>2]=c[g>>2];c[t+40>>2]=(c[j>>2]|0)-(c[f>>2]|0);c[p>>2]=(c[k>>2]|0)-(c[g>>2]|0);c[t+8>>2]=m;p=c[53652]|0;c[53652]=p+1;c[t+12>>2]=p;Xb(Ta(q|0)|0,e|0)|0;p=c[e+36>>2]|0;v=kk(p+1|0)|0;c[t+52>>2]=v;mc(q|0,0,0)|0;Nb(v|0,p|0,1,q|0)|0;a[v+p|0]=0;p=c[53828]|0;Hc[c[p>>2]&63](p,t,1)|0;a[t+16|0]=A;B=t}}while(0);if((s|0)==16){Fv(0,138968,(o=i,i=i+8|0,c[o>>2]=m,o)|0)|0;i=o;B=0}Ha(q|0)|0;r=B}else{r=l}}while(0);if((r|0)==0){i=d;return}l=c[r+40>>2]|0;B=c[r+44>>2]|0;o=b+8|0;h[(c[o>>2]|0)+32>>3]=+(l|0)/72.0;h[(c[o>>2]|0)+40>>3]=+(B|0)/72.0;b=jk(12)|0;c[(c[o>>2]|0)+12>>2]=b;c[b>>2]=c[r+12>>2];c[b+4>>2]=((l|0)/-2|0)-(c[r+32>>2]|0);c[b+8>>2]=((B|0)/-2|0)-(c[r+36>>2]|0);i=d;return}function $k(a){a=a|0;var b=0;b=c[(c[a+8>>2]|0)+12>>2]|0;if((b|0)==0){return}eF(b);return}function al(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;f=i;g=(d|0)!=0;a:do{if(g){h=0;j=1;while(1){k=c[d+(h<<2)>>2]|0;if((k|0)==0){l=4;break a}m=(a[k]|0)==0?0:j;if(m<<24>>24==0){break}else{h=h+1|0;j=m}}}else{l=4}}while(0);do{if((l|0)==4){j=c[e>>2]|0;if((j|0)==0){break}else{n=e;o=j}do{_z(b,o)|0;_z(b,126712)|0;n=n+4|0;o=c[n>>2]|0;}while((o|0)!=0)}}while(0);if(!g){i=f;return}g=c[d>>2]|0;if((g|0)==0){i=f;return}else{p=0;q=g}do{do{if((a[q]|0)!=0){g=Sm(q)|0;if((g|0)==0){Fv(0,114872,(r=i,i=i+8|0,c[r>>2]=q,r)|0)|0;i=r;break}o=Eb(g|0,107984)|0;if((o|0)==0){Fv(0,102272,(r=i,i=i+8|0,c[r>>2]=g,r)|0)|0;i=r;break}g=Rm(o)|0;if((g|0)!=0){n=g;do{_z(b,n)|0;n=Rm(o)|0;}while((n|0)!=0)}_z(b,126712)|0;Ha(o|0)|0}}while(0);p=p+1|0;q=c[d+(p<<2)>>2]|0;}while((q|0)!=0);i=f;return}function bl(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;e=c[d+52>>2]|0;a:while(1){d=a[e]|0;b:do{if((d<<24>>24|0)==0){break a}else if((d<<24>>24|0)==37){if((a[e+1|0]|0)!=37){f=e;g=37;break}h=e+2|0;do{if((qm(h,96544,3)|0)==0){i=e;j=37}else{if((qm(h,91216,5)|0)==0){i=e;j=37;break}if((qm(h,86016,3)|0)==0){i=e;j=37;break}if((qm(h,81360,7)|0)==0){i=e;j=37}else{f=e;g=d;break b}}}while(0);while(1){if((j<<24>>24|0)==13){k=10;break}else if((j<<24>>24|0)==0|(j<<24>>24|0)==10){k=12;break}h=i+1|0;i=h;j=a[h]|0}do{if((k|0)==10){k=0;h=i+1|0;if((a[h]|0)!=10){l=h;break}e=i+2|0;continue a}else if((k|0)==12){k=0;l=i+1|0}}while(0);e=j<<24>>24==0?i:l;continue a}else{f=e;g=d}}while(0);while(1){if((g<<24>>24|0)==13){k=16;break}else if((g<<24>>24|0)==0|(g<<24>>24|0)==10){k=18;break}$z(b,g<<24>>24)|0;d=f+1|0;f=d;g=a[d]|0}do{if((k|0)==16){k=0;d=f+1|0;if((a[d]|0)!=10){m=d;k=19;break}n=f+2|0}else if((k|0)==18){k=0;m=f+1|0;k=19}}while(0);if((k|0)==19){k=0;n=g<<24>>24==0?f:m}$z(b,10)|0;e=n}return}function cl(b){b=b|0;var d=0,e=0,f=0,g=0;d=i;e=c[53828]|0;if((e|0)==0){i=d;return}f=Hc[c[e>>2]&63](e,0,128)|0;if((f|0)==0){i=d;return}else{g=f}do{if((a[g+16|0]|0)==0){dA(b,167576,(f=i,i=i+8|0,c[f>>2]=c[g+12>>2],f)|0);i=f;_z(b,163384)|0;bl(b,g);_z(b,159368)|0;_z(b,154296)|0}f=c[53828]|0;g=Hc[c[f>>2]&63](f,g,8)|0;}while((g|0)!=0);i=d;return}function dl(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=i;do{if((d|0)==0){f=0;g=b;a:while(1){h=g;while(1){j=a[h]|0;if(j<<24>>24==0){k=7;break a}if((j&255)>>>0<127>>>0){h=h+1|0}else{break}}if((j&-4)<<24>>24==-64){f=1;g=h+2|0}else{k=9;break}}if((k|0)==7){if((f|0)!=1){l=b;break}l=ln(b)|0;break}else if((k|0)==9){if(a[13144]|0){l=b;break}Fv(0,151120,(g=i,i=i+1|0,i=i+7&-8,c[g>>2]=0,g)|0)|0;i=g;a[13144]=1;l=b;break}}else{l=ln(b)|0}}while(0);if((c[43808]|0)==0){Iv(175232,0,0)}k=c[43809]|0;if(k>>>0<(c[43810]|0)>>>0){m=k}else{Jv(175232,1)|0;m=c[43809]|0}c[43809]=m+1;a[m]=40;m=l;while(1){k=a[m]|0;if((k<<24>>24|0)==40|(k<<24>>24|0)==41|(k<<24>>24|0)==92){j=c[43809]|0;if(j>>>0<(c[43810]|0)>>>0){n=j}else{Jv(175232,1)|0;n=c[43809]|0}c[43809]=n+1;a[n]=92}else if((k<<24>>24|0)==0){break}k=c[43809]|0;if(k>>>0<(c[43810]|0)>>>0){o=k}else{Jv(175232,1)|0;o=c[43809]|0}k=a[m]|0;c[43809]=o+1;a[o]=k;m=m+1|0}m=c[43809]|0;if(m>>>0<(c[43810]|0)>>>0){p=m}else{Jv(175232,1)|0;p=c[43809]|0}c[43809]=p+1;a[p]=41;if((l|0)!=(b|0)){eF(l)}l=c[43809]|0;if(l>>>0<(c[43810]|0)>>>0){q=l;a[q]=0;r=c[43808]|0;c[43809]=r;i=e;return r|0}Jv(175232,1)|0;q=c[43809]|0;a[q]=0;r=c[43808]|0;c[43809]=r;i=e;return r|0}function el(a,b,d){a=a|0;b=b|0;d=d|0;eF(c[b+52>>2]|0);return}function fl(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;g=i;i=i+80|0;j=a;a=i;i=i+16|0;c[a>>2]=c[j>>2];c[a+4>>2]=c[j+4>>2];c[a+8>>2]=c[j+8>>2];c[a+12>>2]=c[j+12>>2];j=b;b=i;i=i+16|0;c[b>>2]=c[j>>2];c[b+4>>2]=c[j+4>>2];c[b+8>>2]=c[j+8>>2];c[b+12>>2]=c[j+12>>2];j=d;d=i;i=i+8|0;c[d>>2]=c[j>>2];c[d+4>>2]=c[j+4>>2];j=g|0;k=g+8|0;l=g+16|0;m=g+48|0;h[l>>3]=+h[a>>3];h[l+8>>3]=+h[a+8>>3];h[l+16>>3]=+h[b>>3];h[l+24>>3]=+h[b+8>>3];if((PB(d,l|0,j)|0)<0){n=0;i=g;return n|0}do{if((f|0)==0){l=d+4|0;b=c[l>>2]|0;if((b|0)>(c[45170]|0)){a=c[45168]|0;if((a|0)==0){o=kk(b<<5)|0}else{o=mk(a,b<<5)|0}c[45168]=o;a=c[l>>2]|0;c[45170]=a;p=a}else{p=b}b=c[45168]|0;if((p|0)>0){a=c[d>>2]|0;l=0;while(1){q=b+(l<<5)|0;r=a+(l<<4)|0;c[q>>2]=c[r>>2];c[q+4>>2]=c[r+4>>2];c[q+8>>2]=c[r+8>>2];c[q+12>>2]=c[r+12>>2];r=l+1|0;q=b+(l<<5)+16|0;s=a+(((r|0)%(p|0)|0)<<4)|0;c[q>>2]=c[s>>2];c[q+4>>2]=c[s+4>>2];c[q+8>>2]=c[s+8>>2];c[q+12>>2]=c[s+12>>2];if((r|0)<(p|0)){l=r}else{break}}}vF(m|0,0,32)|0;if((MB(b,p,j,m|0,k)|0)<0){n=0}else{break}i=g;return n|0}else{ZB(j,k)}}while(0);j=k+4|0;m=c[j>>2]|0;p=c[44370]|0;do{if((p|0)<(m|0)){d=m+300+p-((m|0)%300|0)|0;o=mk(c[43814]|0,d<<4)|0;c[43814]=o;if((o|0)!=0){c[44370]=d;t=c[j>>2]|0;break}Fv(1,126600,(d=i,i=i+1|0,i=i+7&-8,c[d>>2]=0,d)|0)|0;i=d;n=0;i=g;return n|0}else{t=m}}while(0);if((t|0)>0){m=c[43814]|0;j=c[k>>2]|0;k=0;do{p=m+(k<<4)|0;d=j+(k<<4)|0;c[p>>2]=c[d>>2];c[p+4>>2]=c[d+4>>2];c[p+8>>2]=c[d+8>>2];c[p+12>>2]=c[d+12>>2];k=k+1|0;}while((k|0)<(t|0))}c[e>>2]=t;n=c[43814]|0;i=g;return n|0}function gl(){var b=0,d=0,e=0,f=0;b=i;d=c[43780]|0;c[43780]=d+1;do{if((d|0)>0){e=0}else{f=kk(4800)|0;c[43814]=f;if((f|0)==0){Fv(1,116592,(f=i,i=i+1|0,i=i+7&-8,c[f>>2]=0,f)|0)|0;i=f;e=1;break}c[44370]=300;c[44282]=0;c[44290]=0;if((a[213992]|0)==0){e=0;break}ym();e=0}}while(0);i=b;return e|0}function hl(){var b=0,d=0,e=0,f=0,g=0.0;b=i;d=(c[43780]|0)-1|0;c[43780]=d;if((d|0)>0){i=b;return}eF(c[43814]|0);if((a[213992]|0)==0){i=b;return}d=c[o>>2]|0;e=c[44282]|0;f=c[44290]|0;g=+zm();gc(d|0,155248,(d=i,i=i+24|0,c[d>>2]=e,c[d+8>>2]=f,h[d+16>>3]=g,d)|0)|0;i=d;i=b;return}function il(a,b){a=a|0;b=b|0;return jl(a,b,0)|0}function jl(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0.0,z=0.0,A=0,B=0.0,C=0,D=0,E=0,F=0.0,G=0.0,H=0.0,I=0,J=0,K=0.0,L=0.0,M=0.0,N=0.0,O=0,P=0,Q=0.0,R=0,S=0.0,T=0,U=0.0,X=0,Y=0.0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0.0,Da=0.0,Ea=0.0,Fa=0.0,Ga=0,Ha=0.0,Ia=0.0,Ja=0.0,Ka=0.0,La=0,Na=0.0,Oa=0,Pa=0.0,Qa=0.0,Ra=0.0,Sa=0.0,Ta=0.0,Ua=0.0,Va=0.0,Wa=0.0,Xa=0,Ya=0,Za=0,_a=0.0,$a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0;f=i;i=i+96|0;g=f|0;j=f+8|0;k=f+16|0;l=f+24|0;m=f+56|0;n=f+88|0;c[44282]=(c[44282]|0)+1;p=b+80|0;c[44290]=(c[44290]|0)+(c[p>>2]|0);q=c[b+88>>2]|0;a:do{if((q|0)!=0){r=q;while(1){s=c[r+8>>2]|0;if((a[s+112|0]|0)==0){break}t=c[s+116>>2]|0;if((t|0)==0){break a}else{r=t}}t=c[b+84>>2]|0;s=c[p>>2]|0;u=(s|0)>0;if(u){v=0;w=0;while(1){x=t+(v<<5)|0;y=+h[t+(v<<5)+8>>3]- +h[t+(v<<5)+24>>3];if(y<0.0){z=-0.0-y}else{z=y}do{if(z<.01){A=w}else{y=+h[x>>3]- +h[t+(v<<5)+16>>3];if(y<0.0){B=-0.0-y}else{B=y}if(B<.01){A=w;break}if((w|0)!=(v|0)){C=t+(w<<5)|0;D=x;c[C>>2]=c[D>>2];c[C+4>>2]=c[D+4>>2];c[C+8>>2]=c[D+8>>2];c[C+12>>2]=c[D+12>>2];c[C+16>>2]=c[D+16>>2];c[C+20>>2]=c[D+20>>2];c[C+24>>2]=c[D+24>>2];c[C+28>>2]=c[D+28>>2]}A=w+1|0}}while(0);x=v+1|0;if((x|0)<(s|0)){v=x;w=A}else{E=A;break}}}else{E=0}w=t|0;y=+h[w>>3];v=t+16|0;F=+h[v>>3];do{if(y<=F){x=t+8|0;G=+h[x>>3];D=t+24|0;H=+h[D>>3];if(G>H){break}C=E-1|0;do{if((C|0)>0){I=c[o>>2]|0;J=0;K=F;L=y;M=H;N=G;while(1){O=J+1|0;P=t+(O<<5)|0;Q=+h[P>>3];R=t+(O<<5)+16|0;S=+h[R>>3];if(Q>S){break}T=t+(O<<5)+8|0;U=+h[T>>3];X=t+(O<<5)+24|0;Y=+h[X>>3];if(U>Y){break}Z=t+(J<<5)+16|0;_=K<Q;$=_&1;aa=t+(J<<5)|0;ba=L>S;ca=ba&1;da=t+(J<<5)+24|0;ea=M<U;fa=ea&1;ga=t+(J<<5)+8|0;ha=N>Y;ia=ha&1;ja=ca+$+fa+ia|0;ka=(ja|0)>0;if(!((a[213992]|0)==0|ka^1)){gc(I|0,163336,(la=i,i=i+16|0,c[la>>2]=J,c[la+8>>2]=O,la)|0)|0;i=la;nl(b)}do{if(ka){do{if(_){ma=~~+h[Z>>3];h[Z>>3]=+h[P>>3];h[P>>3]=+(ma|0);na=ia;oa=fa;pa=ca;qa=0}else{if(ba){ma=~~+h[aa>>3];h[aa>>3]=+h[R>>3];h[R>>3]=+(ma|0);na=ia;oa=fa;pa=0;qa=$;break}if(ea){ma=~~+h[da>>3];h[da>>3]=+h[T>>3];h[T>>3]=+(ma|0);na=ia;oa=0;pa=ca;qa=$;break}if(!ha){na=ia;oa=fa;pa=ca;qa=$;break}ma=~~+h[ga>>3];h[ga>>3]=+h[X>>3];h[X>>3]=+(ma|0);na=0;oa=fa;pa=ca;qa=$}}while(0);ma=ja-1|0;if((ma|0)>0){ra=0;sa=qa;ta=pa;ua=oa;va=na}else{break}while(1){do{if((sa|0)==1){Y=+(~~((+h[Z>>3]+ +h[P>>3])*.5+.5)|0);h[P>>3]=Y;h[Z>>3]=Y;wa=va;xa=ua;ya=ta;za=0}else{if((ta|0)==1){Y=+(~~((+h[aa>>3]+ +h[R>>3])*.5+.5)|0);h[R>>3]=Y;h[aa>>3]=Y;wa=va;xa=ua;ya=0;za=sa;break}if((ua|0)==1){Y=+(~~((+h[da>>3]+ +h[T>>3])*.5+.5)|0);h[T>>3]=Y;h[da>>3]=Y;wa=va;xa=0;ya=ta;za=sa;break}if((va|0)!=1){wa=va;xa=ua;ya=ta;za=sa;break}Y=+(~~((+h[ga>>3]+ +h[X>>3])*.5+.5)|0);h[X>>3]=Y;h[ga>>3]=Y;wa=0;xa=ua;ya=ta;za=sa}}while(0);Aa=ra+1|0;if((Aa|0)<(ma|0)){ra=Aa;sa=za;ta=ya;ua=xa;va=wa}else{break}}}}while(0);Y=+h[aa>>3];ja=~~Y;U=+h[Z>>3];$=~~U;S=+h[P>>3];ca=~~S;Q=+h[R>>3];fa=~~Q;do{if(($|0)>(ca|0)&(ja|0)<(fa|0)){if(!((ca|0)>(ja|0)|(ja|0)>(fa|0))){Ba=fa-ja|0;break}if((ca|0)>($|0)|($|0)>(fa|0)){ia=$-ja|0;ha=fa-ca|0;Ba=(ia|0)<(ha|0)?ia:ha;break}else{Ba=$-ca|0;break}}else{Ba=0}}while(0);Ca=+h[ga>>3];ca=~~Ca;Da=+h[da>>3];$=~~Da;Ea=+h[T>>3];fa=~~Ea;Fa=+h[X>>3];ja=~~Fa;do{if(($|0)>(fa|0)&(ca|0)<(ja|0)){do{if((fa|0)>(ca|0)|(ca|0)>(ja|0)){if((fa|0)>($|0)|($|0)>(ja|0)){ha=$-ca|0;ia=ja-fa|0;Ga=(ha|0)<(ia|0)?ha:ia;break}else{Ga=$-fa|0;break}}else{Ga=ja-ca|0}}while(0);if((Ba|0)==0|(Ga|0)==0){Ha=Q;Ia=S;Ja=Fa;Ka=Ea;break}if((Ba|0)<(Ga|0)){ia=U<Q;if(U-Y>Q-S){if(ia){h[Z>>3]=S;Ha=Q;Ia=S;Ja=Fa;Ka=Ea;break}else{h[aa>>3]=Q;Ha=Q;Ia=S;Ja=Fa;Ka=Ea;break}}else{if(ia){h[P>>3]=U;Ha=Q;Ia=U;Ja=Fa;Ka=Ea;break}else{h[R>>3]=Y;Ha=Y;Ia=S;Ja=Fa;Ka=Ea;break}}}else{ia=Da<Fa;if(Da-Ca>Fa-Ea){if(ia){h[da>>3]=Ea;Ha=Q;Ia=S;Ja=Fa;Ka=Ea;break}else{h[ga>>3]=Fa;Ha=Q;Ia=S;Ja=Fa;Ka=Ea;break}}else{if(ia){h[T>>3]=Da;Ha=Q;Ia=S;Ja=Fa;Ka=Da;break}else{h[X>>3]=Ca;Ha=Q;Ia=S;Ja=Ca;Ka=Ea;break}}}}else{Ha=Q;Ia=S;Ja=Fa;Ka=Ea}}while(0);if((O|0)<(C|0)){J=O;K=Ha;L=Ia;M=Ja;N=Ka}else{La=75;break}}if((La|0)==75){Na=+h[w>>3];break}Fv(1,167528,(la=i,i=i+8|0,c[la>>2]=O,la)|0)|0;i=la;nl(b);Oa=0;i=f;return Oa|0}else{Na=y}}while(0);J=b|0;G=+h[J>>3];do{if(G<Na){La=80}else{if(G>+h[v>>3]){La=80;break}H=+h[b+8>>3];if(H<+h[x>>3]){La=80;break}if(H>+h[D>>3]){La=80}}}while(0);do{if((La|0)==80){if((a[213992]|0)==0){Pa=G;Qa=Na}else{Ma(159320,42,1,c[o>>2]|0)|0;nl(b);Pa=+h[J>>3];Qa=+h[w>>3]}if(Pa<Qa){h[J>>3]=Qa;Ra=Qa}else{Ra=Pa}H=+h[v>>3];if(Ra>H){h[J>>3]=H}I=b+8|0;H=+h[I>>3];N=+h[x>>3];if(H<N){h[I>>3]=N;Sa=N}else{Sa=H}H=+h[D>>3];if(Sa<=H){break}h[I>>3]=H}}while(0);D=b+40|0;G=+h[D>>3];I=t+(C<<5)|0;H=+h[I>>3];do{if(G<H){La=94}else{if(G>+h[t+(C<<5)+16>>3]){La=94;break}N=+h[b+48>>3];if(N<+h[t+(C<<5)+8>>3]){La=94;break}if(N>+h[t+(C<<5)+24>>3]){La=94}}}while(0);do{if((La|0)==94){if((a[213992]|0)==0){Ta=G;Ua=H}else{Ma(154240,39,1,c[o>>2]|0)|0;nl(b);Ta=+h[D>>3];Ua=+h[I>>3]}if(Ta<Ua){h[D>>3]=Ua;Va=Ua}else{Va=Ta}N=+h[t+(C<<5)+16>>3];if(Va>N){h[D>>3]=N}X=b+48|0;N=+h[X>>3];M=+h[t+(C<<5)+8>>3];if(N<M){h[X>>3]=M;Wa=M}else{Wa=N}N=+h[t+(C<<5)+24>>3];if(Wa<=N){break}h[X>>3]=N}}while(0);C=s<<3;if((C|0)>(c[44072]|0)){I=c[44070]|0;if((I|0)==0){Xa=kk(s<<7)|0}else{Xa=mk(I,s<<7)|0}c[44070]=Xa;c[44072]=C}b:do{if((s|0)>1){H=+h[x>>3];C=H<=+h[t+40>>3];if(C|u^1){Ya=C&1^1;break}else{Za=0;_a=H}while(1){C=t+(Za<<5)+24|0;H=+h[C>>3];h[C>>3]=_a*-1.0;h[t+(Za<<5)+8>>3]=-0.0-H;C=Za+1|0;if((C|0)>=(s|0)){Ya=1;break b}Za=C;_a=+h[t+(C<<5)+8>>3]}}else{Ya=0}}while(0);x=r;C=c[x>>2]&3;I=r+32|0;X=c[((C|0)==3?r:I)+28>>2]|0;T=r-32|0;if((X|0)==(c[((C|0)==2?r:T)+28>>2]|0)){C=$w(X|0)|0;Fv(1,102232,(la=i,i=i+8|0,c[la>>2]=C,la)|0)|0;i=la;Oa=0;i=f;return Oa|0}c:do{if(u){C=s-1|0;X=c[44070]|0;ga=0;da=0;d:while(1){if((da|0)>0){$a=+h[t+(da<<5)+8>>3]>+h[t+(da-1<<5)+8>>3]?-1:1}else{$a=0}if((da|0)<(C|0)){ab=+h[t+(da+1<<5)+8>>3]>+h[t+(da<<5)+8>>3]?1:-1}else{ab=0}do{if(($a|0)==(ab|0)){if(($a|0)==(-1|0)){bb=ga;break}else if(($a|0)!=0){La=126;break d}R=t+(da<<5)|0;h[X+(ga<<4)>>3]=+h[R>>3];P=ga+1|0;h[X+(ga<<4)+8>>3]=+h[t+(da<<5)+24>>3];h[X+(P<<4)>>3]=+h[R>>3];h[X+(P<<4)+8>>3]=+h[t+(da<<5)+8>>3];bb=ga+2|0}else{if((ab|0)==-1|($a|0)==1){P=t+(da<<5)|0;h[X+(ga<<4)>>3]=+h[P>>3];R=ga+1|0;h[X+(ga<<4)+8>>3]=+h[t+(da<<5)+24>>3];h[X+(R<<4)>>3]=+h[P>>3];h[X+(R<<4)+8>>3]=+h[t+(da<<5)+8>>3];bb=ga+2|0;break}else{R=t+(da<<5)+16|0;h[X+(ga<<4)>>3]=+h[R>>3];P=ga+1|0;h[X+(ga<<4)+8>>3]=+h[t+(da<<5)+8>>3];h[X+(P<<4)>>3]=+h[R>>3];h[X+(P<<4)+8>>3]=+h[t+(da<<5)+24>>3];bb=ga+2|0;break}}}while(0);P=da+1|0;if((P|0)<(s|0)){ga=bb;da=P}else{break}}if((La|0)==126){Fv(1,107912,(la=i,i=i+24|0,c[la>>2]=$a,c[la+8>>2]=$a,c[la+16>>2]=480,la)|0)|0;i=la;Oa=0;i=f;return Oa|0}if(!u){cb=bb;break}da=c[44070]|0;ga=bb;X=C;e:while(1){if((X|0)<(C|0)){db=+h[t+(X<<5)+8>>3]>+h[t+(X+1<<5)+8>>3]?-1:1}else{db=0}P=(X|0)>0;if(P){eb=+h[t+(X-1<<5)+8>>3]>+h[t+(X<<5)+8>>3]?1:-1}else{eb=0}do{if((db|0)==(eb|0)){if((db|0)==0){R=t+(X<<5)+16|0;h[da+(ga<<4)>>3]=+h[R>>3];aa=ga+1|0;h[da+(ga<<4)+8>>3]=+h[t+(X<<5)+8>>3];h[da+(aa<<4)>>3]=+h[R>>3];h[da+(aa<<4)+8>>3]=+h[t+(X<<5)+24>>3];fb=ga+2|0;break}else if((db|0)==(-1|0)){aa=t+(X<<5)+16|0;h[da+(ga<<4)>>3]=+h[aa>>3];R=t+(X<<5)+8|0;Z=ga+1|0;h[da+(ga<<4)+8>>3]=+h[R>>3];h[da+(Z<<4)>>3]=+h[aa>>3];aa=t+(X<<5)+24|0;ca=ga+2|0;h[da+(Z<<4)+8>>3]=+h[aa>>3];Z=t+(X<<5)|0;h[da+(ca<<4)>>3]=+h[Z>>3];ja=ga+3|0;h[da+(ca<<4)+8>>3]=+h[aa>>3];h[da+(ja<<4)>>3]=+h[Z>>3];h[da+(ja<<4)+8>>3]=+h[R>>3];fb=ga+4|0;break}else{break e}}else{if((eb|0)==-1|(db|0)==1){R=t+(X<<5)|0;h[da+(ga<<4)>>3]=+h[R>>3];ja=ga+1|0;h[da+(ga<<4)+8>>3]=+h[t+(X<<5)+24>>3];h[da+(ja<<4)>>3]=+h[R>>3];h[da+(ja<<4)+8>>3]=+h[t+(X<<5)+8>>3];fb=ga+2|0;break}else{ja=t+(X<<5)+16|0;h[da+(ga<<4)>>3]=+h[ja>>3];R=ga+1|0;h[da+(ga<<4)+8>>3]=+h[t+(X<<5)+8>>3];h[da+(R<<4)>>3]=+h[ja>>3];h[da+(R<<4)+8>>3]=+h[t+(X<<5)+24>>3];fb=ga+2|0;break}}}while(0);if(P){ga=fb;X=X-1|0}else{cb=fb;break c}}Fv(1,107912,(la=i,i=i+24|0,c[la>>2]=db,c[la+8>>2]=db,c[la+16>>2]=513,la)|0)|0;i=la;Oa=0;i=f;return Oa|0}else{cb=0}}while(0);do{if((Ya|0)!=0){if(u){X=0;do{ga=t+(X<<5)+24|0;da=~~+h[ga>>3];C=t+(X<<5)+8|0;h[ga>>3]=+h[C>>3]*-1.0;h[C>>3]=+(-da|0);X=X+1|0;}while((X|0)<(s|0))}if((cb|0)<=0){break}X=c[44070]|0;da=0;do{C=X+(da<<4)+8|0;h[C>>3]=+h[C>>3]*-1.0;da=da+1|0;}while((da|0)<(cb|0))}}while(0);if(u){da=0;do{h[t+(da<<5)>>3]=2147483647.0;h[t+(da<<5)+16>>3]=-2147483648.0;da=da+1|0;}while((da|0)<(s|0))}c[g>>2]=c[44070];da=g+4|0;c[da>>2]=cb;h[l>>3]=+h[J>>3];h[l+8>>3]=+h[b+8>>3];h[l+16>>3]=+h[D>>3];h[l+24>>3]=+h[b+48>>3];if((PB(g,l|0,j)|0)<0){Fv(1,96504,(la=i,i=i+1|0,i=i+7&-8,c[la>>2]=0,la)|0)|0;i=la;Oa=0;i=f;return Oa|0}do{if((e|0)==0){X=c[da>>2]|0;if((X|0)>(c[45170]|0)){C=c[45168]|0;if((C|0)==0){gb=kk(X<<5)|0}else{gb=mk(C,X<<5)|0}c[45168]=gb;C=c[da>>2]|0;c[45170]=C;hb=C}else{hb=X}if((hb|0)>0){X=c[45168]|0;C=c[44070]|0;ga=0;while(1){R=X+(ga<<5)|0;ja=C+(ga<<4)|0;c[R>>2]=c[ja>>2];c[R+4>>2]=c[ja+4>>2];c[R+8>>2]=c[ja+8>>2];c[R+12>>2]=c[ja+12>>2];ja=ga+1|0;R=X+(ga<<5)+16|0;Z=C+(((ja|0)%(hb|0)|0)<<4)|0;c[R>>2]=c[Z>>2];c[R+4>>2]=c[Z+4>>2];c[R+8>>2]=c[Z+8>>2];c[R+12>>2]=c[Z+12>>2];if((ja|0)<(hb|0)){ga=ja}else{break}}}if((a[b+29|0]|0)==0){vF(m|0,0,16)|0}else{H=+h[b+16>>3];h[m>>3]=+V(H);h[m+8>>3]=+W(H)}if((a[b+69|0]|0)==0){vF(m+16|0,0,16)|0}else{H=+h[b+56>>3];h[m+16>>3]=-0.0- +V(H);h[m+24>>3]=-0.0- +W(H)}if((MB(c[45168]|0,hb,j,m|0,k)|0)>=0){break}Fv(1,91176,(la=i,i=i+1|0,i=i+7&-8,c[la>>2]=0,la)|0)|0;i=la;Oa=0;i=f;return Oa|0}else{ZB(j,k)}}while(0);da=k+4|0;D=c[da>>2]|0;J=c[44370]|0;do{if((J|0)<(D|0)){ga=D+300+J-((D|0)%300|0)|0;C=mk(c[43814]|0,ga<<4)|0;c[43814]=C;if((C|0)!=0){c[44370]=ga;break}Fv(1,126600,(la=i,i=i+1|0,i=i+7&-8,c[la>>2]=0,la)|0)|0;i=la;Oa=0;i=f;return Oa|0}}while(0);if(u){D=0;do{h[t+(D<<5)>>3]=2147483647.0;h[t+(D<<5)+16>>3]=-2147483648.0;D=D+1|0;}while((D|0)<(s|0))}D=c[da>>2]|0;if((D|0)>0){J=c[43814]|0;ga=c[k>>2]|0;C=0;do{X=J+(C<<4)|0;ja=ga+(C<<4)|0;c[X>>2]=c[ja>>2];c[X+4>>2]=c[ja+4>>2];c[X+8>>2]=c[ja+8>>2];c[X+12>>2]=c[ja+12>>2];C=C+1|0;}while((C|0)<(D|0))}f:do{if(u){C=0;ga=10;J=1;ja=D;while(1){ml(t,s,c[43814]|0,ja,ga);X=0;while(1){if(+h[t+(X<<5)>>3]==2147483647.0){La=185;break}Z=X+1|0;if(+h[t+(X<<5)+16>>3]==-2147483648.0){La=185;break}if((Z|0)<(s|0)){X=Z}else{ib=ga;jb=C;kb=Z;break}}if((La|0)==185){La=0;P=ga<<1;ib=P;jb=(P|0)>(2147483647/(s|0)|0|0)?15:C;kb=X}P=(kb|0)==(s|0)?0:J;Z=jb+1|0;if(!(P<<24>>24!=0&(Z|0)<15)){lb=P;break f}C=Z;ga=ib;J=P;ja=c[da>>2]|0}}else{ja=(s|0)==0;J=1;ga=1;C=D;while(1){ml(t,s,c[43814]|0,C,10);P=ja?0:ga;if(!(P<<24>>24!=0&(J|0)<15)){lb=P;break f}J=J+1|0;ga=P;C=c[da>>2]|0}}}while(0);if(lb<<24>>24!=0){D=$w(c[((c[x>>2]&3|0)==3?r:I)+28>>2]|0)|0;C=$w(c[((c[x>>2]&3|0)==2?r:T)+28>>2]|0)|0;Fv(0,85904,(la=i,i=i+16|0,c[la>>2]=D,c[la+8>>2]=C,la)|0)|0;i=la;ZB(j,n);C=n|0;ml(t,s,c[C>>2]|0,c[n+4>>2]|0,10);eF(c[C>>2]|0)}c[d>>2]=c[da>>2];Oa=c[43814]|0;i=f;return Oa|0}}while(0);Fv(1,81296,(la=i,i=i+1|0,i=i+7&-8,c[la>>2]=0,la)|0)|0;i=la;nl(b);Oa=0;i=f;return Oa|0}}while(0);Fv(1,114784,(la=i,i=i+1|0,i=i+7&-8,c[la>>2]=0,la)|0)|0;i=la;Oa=0;i=f;return Oa|0}function kl(a,b){a=a|0;b=b|0;return jl(a,b,1)|0}function ll(d,e,f,g){d=d|0;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0.0,D=0.0,E=0,F=0,G=0,H=0.0,I=0.0,J=0,K=0,L=0,M=0.0,N=0.0,O=0.0,P=0.0,Q=0.0,R=0.0,S=0.0,U=0,V=0.0,W=0.0,X=0,Y=0,Z=0,_=0,$=0,aa=0;j=i;i=i+240|0;k=j|0;l=j+64|0;m=j+128|0;n=j+144|0;o=j+160|0;p=j+224|0;q=j+232|0;r=e;s=c[r>>2]|0;t=s&3;u=e-32|0;v=c[((t|0)==2?e:u)+28>>2]|0;w=c[e+8>>2]|0;x=b[w+168>>1]|0;y=x<<16>>16;z=k+16|0;A=k|0;B=c[(c[((t|0)==3?e:e+32|0)+28>>2]|0)+8>>2]|0;C=+h[B+16>>3]+ +h[w+16>>3];D=+h[B+24>>3]+ +h[w+24>>3];B=k;h[k>>3]=C;h[k+8>>3]=D;t=z;c[t>>2]=c[B>>2];c[t+4>>2]=c[B+4>>2];c[t+8>>2]=c[B+8>>2];c[t+12>>2]=c[B+12>>2];E=m;c[E>>2]=c[B>>2];c[E+4>>2]=c[B+4>>2];c[E+8>>2]=c[B+8>>2];c[E+12>>2]=c[B+12>>2];F=k+32|0;G=c[v+8>>2]|0;H=+h[G+16>>3]+ +h[w+56>>3];I=+h[G+24>>3]+ +h[w+64>>3];w=k+48|0;h[k+48>>3]=H;h[k+56>>3]=I;G=F;c[G>>2]=c[w>>2];c[G+4>>2]=c[w+4>>2];c[G+8>>2]=c[w+8>>2];c[G+12>>2]=c[w+12>>2];J=n;c[J>>2]=c[w>>2];c[J+4>>2]=c[w+4>>2];c[J+8>>2]=c[w+8>>2];c[J+12>>2]=c[w+12>>2];if(!(x<<16>>16!=1&(a[215376]|0)==0)){if((f|0)==4){K=d+8|0;L=c[K>>2]|0;M=(+h[L+16>>3]+ +h[L+32>>3])*.5;h[22376]=M;L=c[K>>2]|0;N=(+h[L+24>>3]+ +h[L+40>>3])*.5;h[22377]=N;O=(C+H)*.5;P=(D+I)*.5;Q=H-C;R=I-D;S=+T(Q*Q+R*R)/5.0;R=M-O;M=N-P;N=+T(R*R+M*M);Q=O-S*(R/N);R=P-S*(M/N);h[k+32>>3]=Q;h[k+16>>3]=Q;h[k+40>>3]=R;h[k+24>>3]=R;U=c[r>>2]|0}else{U=s}cm(e,c[((U&3|0)==2?e:u)+28>>2]|0,A,4,g);nm(d,e,m,n);i=j;return}R=C-H;Q=D-I;N=Q*Q;if(R*R+N<1.0e-6){c[t>>2]=c[B>>2];c[t+4>>2]=c[B+4>>2];c[t+8>>2]=c[B+8>>2];c[t+12>>2]=c[B+12>>2];c[G>>2]=c[w>>2];c[G+4>>2]=c[w+4>>2];c[G+8>>2]=c[w+8>>2];c[G+12>>2]=c[w+12>>2];V=0.0;W=0.0}else{R=H-C;M=+T(R*R+N);A=c[(c[(c[d+48>>2]|0)+8>>2]|0)+236>>2]|0;N=+((da(A,y-1|0)|0)/2|0|0);S=Q*N/M;h[z>>3]=C+S;C=R*N/M;h[k+24>>3]=D+C;h[F>>3]=S+H;h[k+40>>3]=C+I;I=+(-A|0);V=R*I/M;W=Q*I/M}if(x<<16>>16<=0){i=j;return}x=(f|0)==6;f=q+4|0;A=o|0;u=q|0;U=p|0;r=p+4|0;L=z|0;z=k+24|0;K=F|0;F=k+40|0;X=l|0;Y=1;Z=e;e=s;while(1){s=Z;_=Z-32|0;if((c[((e&3|0)==2?Z:_)+28>>2]|0)==(v|0)){c[E>>2]=c[B>>2];c[E+4>>2]=c[B+4>>2];c[E+8>>2]=c[B+8>>2];c[E+12>>2]=c[B+12>>2];c[J>>2]=c[w>>2];c[J+4>>2]=c[w+4>>2];c[J+8>>2]=c[w+8>>2];c[J+12>>2]=c[w+12>>2];$=l;aa=k;c[$>>2]=c[aa>>2];c[$+4>>2]=c[aa+4>>2];c[$+8>>2]=c[aa+8>>2];c[$+12>>2]=c[aa+12>>2];aa=l+16|0;c[aa>>2]=c[t>>2];c[aa+4>>2]=c[t+4>>2];c[aa+8>>2]=c[t+8>>2];c[aa+12>>2]=c[t+12>>2];aa=l+32|0;c[aa>>2]=c[G>>2];c[aa+4>>2]=c[G+4>>2];c[aa+8>>2]=c[G+8>>2];c[aa+12>>2]=c[G+12>>2];aa=l+48|0;c[aa>>2]=c[w>>2];c[aa+4>>2]=c[w+4>>2];c[aa+8>>2]=c[w+8>>2];c[aa+12>>2]=c[w+12>>2]}else{c[E>>2]=c[w>>2];c[E+4>>2]=c[w+4>>2];c[E+8>>2]=c[w+8>>2];c[E+12>>2]=c[w+12>>2];c[J>>2]=c[B>>2];c[J+4>>2]=c[B+4>>2];c[J+8>>2]=c[B+8>>2];c[J+12>>2]=c[B+12>>2];aa=l+48|0;$=k;c[aa>>2]=c[$>>2];c[aa+4>>2]=c[$+4>>2];c[aa+8>>2]=c[$+8>>2];c[aa+12>>2]=c[$+12>>2];$=l+32|0;c[$>>2]=c[t>>2];c[$+4>>2]=c[t+4>>2];c[$+8>>2]=c[t+8>>2];c[$+12>>2]=c[t+12>>2];$=l+16|0;c[$>>2]=c[G>>2];c[$+4>>2]=c[G+4>>2];c[$+8>>2]=c[G+8>>2];c[$+12>>2]=c[G+12>>2];$=l;c[$>>2]=c[w>>2];c[$+4>>2]=c[w+4>>2];c[$+8>>2]=c[w+8>>2];c[$+12>>2]=c[w+12>>2]}if(x){c[f>>2]=4;c[u>>2]=A;$=o;aa=l;c[$>>2]=c[aa>>2];c[$+4>>2]=c[aa+4>>2];c[$+8>>2]=c[aa+8>>2];c[$+12>>2]=c[aa+12>>2];aa=o+16|0;$=l+16|0;c[aa>>2]=c[$>>2];c[aa+4>>2]=c[$+4>>2];c[aa+8>>2]=c[$+8>>2];c[aa+12>>2]=c[$+12>>2];$=o+32|0;aa=l+32|0;c[$>>2]=c[aa>>2];c[$+4>>2]=c[aa+4>>2];c[$+8>>2]=c[aa+8>>2];c[$+12>>2]=c[aa+12>>2];aa=o+48|0;$=l+48|0;c[aa>>2]=c[$>>2];c[aa+4>>2]=c[$+4>>2];c[aa+8>>2]=c[$+8>>2];c[aa+12>>2]=c[$+12>>2];ZB(q,p);cm(Z,c[((c[s>>2]&3|0)==2?Z:_)+28>>2]|0,c[U>>2]|0,c[r>>2]|0,g)}else{cm(Z,c[((c[s>>2]&3|0)==2?Z:_)+28>>2]|0,X,4,g)}nm(d,Z,m,n);_=c[(c[Z+8>>2]|0)+172>>2]|0;h[L>>3]=W+ +h[L>>3];h[z>>3]=V+ +h[z>>3];h[K>>3]=W+ +h[K>>3];h[F>>3]=V+ +h[F>>3];if((Y|0)>=(y|0)){break}Y=Y+1|0;Z=_;e=c[_>>2]|0}i=j;return}function ml(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0.0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0,D=0;f=da(e,b)|0;if((d|0)<=3){return}e=(f|0)<0;g=+(f|0);i=(b|0)>0;j=0;k=3;while(1){a:do{if(!e){l=c+(j<<4)|0;m=c+(j<<4)+8|0;n=j+1|0;o=c+(n<<4)|0;p=c+(n<<4)+8|0;n=j+2|0;q=c+(n<<4)|0;r=c+(n<<4)+8|0;n=c+(k<<4)|0;s=c+(k<<4)+8|0;if(i){t=0}else{break}while(1){u=+(t|0)/g;v=+h[l>>3];w=+h[m>>3];x=+h[o>>3];y=+h[p>>3];z=+h[q>>3];A=+h[r>>3];B=v+u*(x-v);v=w+u*(y-w);w=x+u*(z-x);x=y+u*(A-y);y=B+u*(w-B);B=v+u*(x-v);v=y+u*(w+u*(z+u*(+h[n>>3]-z)-w)-y);y=B+u*(x+u*(A+u*(+h[s>>3]-A)-x)-B);C=0;do{do{if(y<=+h[a+(C<<5)+24>>3]+1.0e-4){if(y<+h[a+(C<<5)+8>>3]+-1.0e-4){break}D=a+(C<<5)|0;if(+h[D>>3]>v){h[D>>3]=v}D=a+(C<<5)+16|0;if(+h[D>>3]>=v){break}h[D>>3]=v}}while(0);C=C+1|0;}while((C|0)<(b|0));if((t|0)>=(f|0)){break a}t=t+1|0}}}while(0);s=k+3|0;if((s|0)<(d|0)){j=k;k=s}else{break}}return}function nl(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0.0,n=0.0,p=0.0,q=0.0;d=i;e=c[o>>2]|0;f=b+80|0;gc(e|0,151104,(g=i,i=i+8|0,c[g>>2]=c[f>>2],g)|0)|0;i=g;if((c[f>>2]|0)>0){j=b+84|0;k=0;do{l=c[j>>2]|0;m=+h[l+(k<<5)>>3];n=+h[l+(k<<5)+8>>3];p=+h[l+(k<<5)+16>>3];q=+h[l+(k<<5)+24>>3];gc(e|0,148176,(g=i,i=i+40|0,c[g>>2]=k,h[g+8>>3]=m,h[g+16>>3]=n,h[g+24>>3]=p,h[g+32>>3]=q,g)|0)|0;i=g;k=k+1|0;}while((k|0)<(c[f>>2]|0))}q=+h[b+8>>3];p=+h[b+16>>3];f=(a[b+29|0]|0)!=0?142088:138952;gc(e|0,145e3,(g=i,i=i+32|0,h[g>>3]=+h[b>>3],h[g+8>>3]=q,h[g+16>>3]=p,c[g+24>>2]=f,g)|0)|0;i=g;p=+h[b+48>>3];q=+h[b+56>>3];f=(a[b+69|0]|0)!=0?142088:138952;gc(e|0,136416,(g=i,i=i+32|0,h[g>>3]=+h[b+40>>3],h[g+8>>3]=p,h[g+16>>3]=q,c[g+24>>2]=f,g)|0)|0;i=g;i=d;return}
-
-
-
-function Wc(a){a=a|0;var b=0;b=i;i=i+a|0;i=i+7&-8;return b|0}function Xc(){return i|0}function Yc(a){a=a|0;i=a}function Zc(a,b){a=a|0;b=b|0;if((u|0)==0){u=a;v=b}}function _c(b){b=b|0;a[k]=a[b];a[k+1|0]=a[b+1|0];a[k+2|0]=a[b+2|0];a[k+3|0]=a[b+3|0]}function $c(b){b=b|0;a[k]=a[b];a[k+1|0]=a[b+1|0];a[k+2|0]=a[b+2|0];a[k+3|0]=a[b+3|0];a[k+4|0]=a[b+4|0];a[k+5|0]=a[b+5|0];a[k+6|0]=a[b+6|0];a[k+7|0]=a[b+7|0]}function ad(a){a=a|0;H=a}function bd(a){a=a|0;I=a}function cd(a){a=a|0;J=a}function dd(a){a=a|0;K=a}function ed(a){a=a|0;L=a}function fd(a){a=a|0;M=a}function gd(a){a=a|0;N=a}function hd(a){a=a|0;O=a}function id(a){a=a|0;P=a}function jd(a){a=a|0;Q=a}function kd(){}function ld(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+16|0;f=e|0;if((c[45198]|0)==0){g=Oz()|0;c[45198]=g;Tz(g,23376);Tz(c[45198]|0,23368);Tz(c[45198]|0,23352)}g=mx(a)|0;Pz(c[45198]|0,g,d)|0;c[f>>2]=0;Rz(c[45198]|0,g,b,f,e+8|0)|0;JA(c[45198]|0,g)|0;Kw(g)|0;g=c[44396]|0;if((g|0)==0){h=c[f>>2]|0;c[44396]=h;i=e;return h|0}Sz(g);h=c[f>>2]|0;c[44396]=h;i=e;return h|0}function md(a){a=a|0;return nd(a,0,0)|0}function nd(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0;do{if((d|0)==0){f=dF(476)|0;g=f;if((f|0)==0){h=g;break}c[f+12>>2]=6;c[f+16>>2]=202;c[f+20>>2]=150;h=g}else{g=d|0;f=Ec[c[g>>2]&63](476)|0;i=f;if((f|0)==0){h=i;break}c[f+12>>2]=c[g>>2];c[f+16>>2]=c[d+4>>2];c[f+20>>2]=c[d+8>>2];h=i}}while(0);if((h|0)==0){j=0;return j|0}c[h+8>>2]=0;c[h+32>>2]=0;c[h+364>>2]=16;d=h+12|0;i=d|0;f=Ec[c[i>>2]&63](256)|0;g=h+376|0;c[g>>2]=f;if((f|0)==0){Cc[c[h+20>>2]&255](h);j=0;return j|0}f=Ec[c[i>>2]&63](1024)|0;k=h+44|0;c[k>>2]=f;if((f|0)==0){l=h+20|0;Cc[c[l>>2]&255](c[g>>2]|0);Cc[c[l>>2]&255](h);j=0;return j|0}c[h+48>>2]=f+1024;f=Ec[c[i>>2]&63](168)|0;i=f;if((f|0)==0){c[h+340>>2]=i;l=h+20|0;Cc[c[l>>2]&255](c[k>>2]|0);Cc[c[l>>2]&255](c[g>>2]|0);Cc[c[l>>2]&255](h);j=0;return j|0}vF(f+80|0,0,20)|0;c[f+100>>2]=d;vF(f+104|0,0,20)|0;c[f+124>>2]=d;a[f+4|0]=0;c[f+8>>2]=0;c[f+12>>2]=0;c[f>>2]=0;c[f+16>>2]=d;a[f+24|0]=0;c[f+28>>2]=0;c[f+32>>2]=0;c[f+20>>2]=0;c[f+36>>2]=d;a[f+44|0]=0;c[f+48>>2]=0;c[f+52>>2]=0;c[f+40>>2]=0;c[f+56>>2]=d;a[f+64|0]=0;c[f+68>>2]=0;c[f+72>>2]=0;c[f+60>>2]=0;c[f+76>>2]=d;c[f+132>>2]=0;c[f+136>>2]=0;a[f+140|0]=0;vF(f+144|0,0,24)|0;a[f+128|0]=1;a[f+129|0]=0;a[f+130|0]=0;c[h+340>>2]=i;c[h+360>>2]=0;c[h+352>>2]=0;c[h+288>>2]=0;c[h+452>>2]=0;c[h+448>>2]=0;c[h+124>>2]=0;c[h+244>>2]=0;i=h+456|0;a[i]=33;f=h+232|0;a[f]=0;a[h+233|0]=0;c[h+380>>2]=0;c[h+384>>2]=0;a[h+388|0]=0;vF(h+400|0,0,20)|0;c[h+420>>2]=d;vF(h+424|0,0,20)|0;c[h+444>>2]=d;od(h,b);do{if((b|0)!=0){if((c[h+228>>2]|0)!=0){break}qd(h);j=0;return j|0}}while(0);if((e|0)==0){c[h+224>>2]=Ze()|0;j=h;return j|0}else{a[f]=1;c[h+224>>2]=Ze()|0;a[i]=a[e]|0;j=h;return j|0}return 0}function od(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;c[b+264>>2]=102;Yd(b+252|0);a:do{if((d|0)==0){e=0}else{f=b+400|0;g=b+412|0;h=b+408|0;i=d;while(1){j=c[g>>2]|0;if((j|0)==(c[h>>2]|0)){if((Bd(f)|0)<<24>>24==0){e=0;break a}k=c[g>>2]|0}else{k=j}j=a[i]|0;c[g>>2]=k+1;a[k]=j;if((a[i]|0)==0){break}else{i=i+1|0}}i=b+416|0;f=c[i>>2]|0;c[i>>2]=c[g>>2];e=f}}while(0);c[b+228>>2]=e;c[b+344>>2]=0;_e(b+148|0,b+144|0,0)|0;c[b>>2]=0;c[b+4>>2]=0;vF(b+52|0,0,64)|0;c[b+116>>2]=b;c[b+120>>2]=0;vF(b+128|0,0,16)|0;e=c[b+8>>2]|0;c[b+24>>2]=e;c[b+28>>2]=e;c[b+36>>2]=0;c[b+40>>2]=0;e=b+392|0;c[e>>2]=0;c[e+4>>2]=0;vF(b+268|0,0,20)|0;vF(b+300|0,0,38)|0;a[b+292|0]=1;c[b+296>>2]=0;c[b+348>>2]=0;c[b+356>>2]=0;c[b+368>>2]=0;c[b+236>>2]=0;c[b+248>>2]=0;c[b+240>>2]=0;c[b+460>>2]=0;c[b+464>>2]=0;c[b+472>>2]=0;return}function pd(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;f=c[b+340>>2]|0;if((a[e]|0)==0){g=1;return g|0}h=b+400|0;i=b+412|0;j=b+408|0;k=b+416|0;l=f+132|0;m=b+356|0;n=f+60|0;o=f+80|0;p=f+92|0;q=f+88|0;r=f+96|0;s=f+8|0;t=b+472|0;u=f|0;v=f+4|0;f=e;a:while(1){e=f;while(1){w=a[e]|0;if((w<<24>>24|0)==12|(w<<24>>24|0)==0){x=5;break}y=c[i>>2]|0;if(w<<24>>24==61){x=24;break}if((y|0)==(c[j>>2]|0)){if((Bd(h)|0)<<24>>24==0){g=0;x=54;break a}z=a[e]|0;A=c[i>>2]|0}else{z=w;A=y}c[i>>2]=A+1;a[A]=z;if((a[f]|0)==0){g=1;x=54;break a}e=e+1|0}if((x|0)==5){x=0;w=c[i>>2]|0;if((w|0)==(c[j>>2]|0)){if((Bd(h)|0)<<24>>24==0){g=0;x=54;break}B=c[i>>2]|0}else{B=w}c[i>>2]=B+1;a[B]=0;w=c[k>>2]|0;C=c[s>>2]|0;b:do{if((C|0)==0){D=w}else{E=c[t>>2]|0;F=a[w]|0;if(F<<24>>24==0){G=E}else{H=w;I=E;E=F;while(1){J=H+1|0;K=(I*1000003|0)^E&255;L=a[J]|0;if(L<<24>>24==0){G=K;break}else{H=J;I=K;E=L}}}E=C-1|0;I=G&E;H=c[u>>2]|0;L=c[H+(I<<2)>>2]|0;if((L|0)==0){D=w;break}K=G&-C;J=E>>>2;E=0;M=I;I=L;c:while(1){L=c[I>>2]|0;if(F<<24>>24==(a[L]|0)){N=w;O=L;L=F;do{if(L<<24>>24==0){break c}N=N+1|0;O=O+1|0;L=a[N]|0;}while(L<<24>>24==(a[O]|0))}if(E<<24>>24==0){P=(K>>>(((d[v]|0)-1|0)>>>0)&J|1)&255}else{P=E}O=P&255;L=(M>>>0<O>>>0?C:0)+(M-O)|0;O=c[H+(L<<2)>>2]|0;if((O|0)==0){D=w;break b}else{E=P;M=L;I=O}}if((I|0)==0){D=w;break}a[I+32|0]=1;D=c[k>>2]|0}}while(0);w=(a[e]|0)==0?e:e+1|0;c[i>>2]=D;Q=w}else if((x|0)==24){x=0;if((y|0)==(c[k>>2]|0)){R=l;S=y}else{if((y|0)==(c[j>>2]|0)){if((Bd(h)|0)<<24>>24==0){g=0;x=54;break}T=c[i>>2]|0}else{T=y}c[i>>2]=T+1;a[T]=0;w=Cd(b,n,c[k>>2]|0,8)|0;C=w;if((w|0)==0){g=0;x=54;break}U=w|0;w=c[U>>2]|0;M=c[k>>2]|0;if((w|0)==(M|0)){E=w;while(1){w=c[p>>2]|0;if((w|0)==(c[q>>2]|0)){if((Bd(o)|0)<<24>>24==0){x=32;break a}V=c[p>>2]|0}else{V=w}w=a[E]|0;c[p>>2]=V+1;a[V]=w;if((a[E]|0)==0){break}else{E=E+1|0}}E=c[r>>2]|0;c[r>>2]=c[p>>2];c[U>>2]=E;if((E|0)==0){g=0;x=54;break}W=c[k>>2]|0}else{W=M}c[i>>2]=W;R=C;S=W}E=e;w=S;while(1){X=E+1|0;H=a[X]|0;Y=(w|0)==(c[j>>2]|0);if((H<<24>>24|0)==12|(H<<24>>24|0)==0){break}if(Y){if((Bd(h)|0)<<24>>24==0){g=0;x=54;break a}Z=a[X]|0;_=c[i>>2]|0}else{Z=H;_=w}c[i>>2]=_+1;a[_]=Z;E=X;w=c[i>>2]|0}if(Y){if((Bd(h)|0)<<24>>24==0){g=0;x=54;break}$=c[i>>2]|0}else{$=w}c[i>>2]=$+1;a[$]=0;if((Dd(b,R,0,c[k>>2]|0,m)|0)!=0){g=0;x=54;break}c[i>>2]=c[k>>2];Q=(a[X]|0)==0?X:E+2|0}if((a[Q]|0)==0){g=1;x=54;break}else{f=Q}}if((x|0)==32){c[U>>2]=0;g=0;return g|0}else if((x|0)==54){return g|0}return 0}function qd(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;if((a|0)==0){return}b=a+352|0;d=a+20|0;e=c[a+348>>2]|0;while(1){if((e|0)==0){f=c[b>>2]|0;if((f|0)==0){break}c[b>>2]=0;g=f}else{g=e}f=c[g>>2]|0;Cc[c[d>>2]&255](c[g+36>>2]|0);h=c[g+44>>2]|0;if((h|0)!=0){i=h;while(1){h=c[i+4>>2]|0;Cc[c[d>>2]&255](c[i+16>>2]|0);Cc[c[d>>2]&255](i);if((h|0)==0){break}else{i=h}}}Cc[c[d>>2]&255](g);e=f}e=a+288|0;g=c[a+284>>2]|0;while(1){if((g|0)==0){b=c[e>>2]|0;if((b|0)==0){break}c[e>>2]=0;j=b}else{j=g}b=c[j+8>>2]|0;Cc[c[d>>2]&255](j);g=b}g=c[a+360>>2]|0;if((g|0)!=0){j=g;while(1){g=c[j+4>>2]|0;Cc[c[d>>2]&255](c[j+16>>2]|0);Cc[c[d>>2]&255](j);if((g|0)==0){break}else{j=g}}}j=c[a+356>>2]|0;if((j|0)!=0){g=j;while(1){j=c[g+4>>2]|0;Cc[c[d>>2]&255](c[g+16>>2]|0);Cc[c[d>>2]&255](g);if((j|0)==0){break}else{g=j}}}g=c[a+400>>2]|0;if((g|0)!=0){j=a+420|0;e=g;while(1){g=c[e>>2]|0;Cc[c[(c[j>>2]|0)+8>>2]&255](e);if((g|0)==0){break}else{e=g}}}e=c[a+404>>2]|0;if((e|0)!=0){j=a+420|0;g=e;while(1){e=c[g>>2]|0;Cc[c[(c[j>>2]|0)+8>>2]&255](g);if((e|0)==0){break}else{g=e}}}g=c[a+424>>2]|0;if((g|0)!=0){j=a+444|0;e=g;while(1){g=c[e>>2]|0;Cc[c[(c[j>>2]|0)+8>>2]&255](e);if((g|0)==0){break}else{e=g}}}e=c[a+428>>2]|0;if((e|0)!=0){j=a+444|0;g=e;while(1){e=c[g>>2]|0;Cc[c[(c[j>>2]|0)+8>>2]&255](g);if((e|0)==0){break}else{g=e}}}g=c[a+340>>2]|0;if((g|0)!=0){j=(c[a+460>>2]|0)==0;e=g+20|0;b=c[e>>2]|0;i=g+28|0;h=c[i>>2]|0;k=b+(h<<2)|0;if((h|0)!=0){h=b;while(1){b=h+4|0;l=c[h>>2]|0;do{if((l|0)!=0){if((c[l+16>>2]|0)==0){break}Cc[c[d>>2]&255](c[l+20>>2]|0)}}while(0);if((b|0)==(k|0)){break}else{h=b}}}h=g+8|0;k=g+16|0;l=c[(c[k>>2]|0)+8>>2]|0;f=g|0;m=c[f>>2]|0;if((c[h>>2]|0)==0){n=l;o=m}else{p=0;q=l;l=m;while(1){Cc[q&255](c[l+(p<<2)>>2]|0);m=p+1|0;r=c[(c[k>>2]|0)+8>>2]|0;s=c[f>>2]|0;if(m>>>0<(c[h>>2]|0)>>>0){p=m;q=r;l=s}else{n=r;o=s;break}}}Cc[n&255](o);o=g+36|0;n=c[(c[o>>2]|0)+8>>2]|0;l=c[e>>2]|0;if((c[i>>2]|0)==0){t=n;u=l}else{q=0;p=n;n=l;while(1){Cc[p&255](c[n+(q<<2)>>2]|0);l=q+1|0;h=c[(c[o>>2]|0)+8>>2]|0;f=c[e>>2]|0;if(l>>>0<(c[i>>2]|0)>>>0){q=l;p=h;n=f}else{t=h;u=f;break}}}Cc[t&255](u);u=g+48|0;t=g+56|0;n=c[(c[t>>2]|0)+8>>2]|0;p=g+40|0;q=c[p>>2]|0;if((c[u>>2]|0)==0){v=n;w=q}else{i=0;e=n;n=q;while(1){Cc[e&255](c[n+(i<<2)>>2]|0);q=i+1|0;o=c[(c[t>>2]|0)+8>>2]|0;f=c[p>>2]|0;if(q>>>0<(c[u>>2]|0)>>>0){i=q;e=o;n=f}else{v=o;w=f;break}}}Cc[v&255](w);w=g+68|0;v=g+76|0;n=c[(c[v>>2]|0)+8>>2]|0;e=g+60|0;i=c[e>>2]|0;if((c[w>>2]|0)==0){x=n;y=i}else{u=0;p=n;n=i;while(1){Cc[p&255](c[n+(u<<2)>>2]|0);i=u+1|0;t=c[(c[v>>2]|0)+8>>2]|0;f=c[e>>2]|0;if(i>>>0<(c[w>>2]|0)>>>0){u=i;p=t;n=f}else{x=t;y=f;break}}}Cc[x&255](y);y=c[g+80>>2]|0;if((y|0)!=0){x=g+100|0;n=y;while(1){y=c[n>>2]|0;Cc[c[(c[x>>2]|0)+8>>2]&255](n);if((y|0)==0){break}else{n=y}}}n=c[g+84>>2]|0;if((n|0)!=0){x=g+100|0;y=n;while(1){n=c[y>>2]|0;Cc[c[(c[x>>2]|0)+8>>2]&255](y);if((n|0)==0){break}else{y=n}}}y=c[g+104>>2]|0;if((y|0)!=0){x=g+124|0;n=y;while(1){y=c[n>>2]|0;Cc[c[(c[x>>2]|0)+8>>2]&255](n);if((y|0)==0){break}else{n=y}}}n=c[g+108>>2]|0;if((n|0)!=0){x=g+124|0;y=n;while(1){n=c[y>>2]|0;Cc[c[(c[x>>2]|0)+8>>2]&255](y);if((n|0)==0){break}else{y=n}}}if(j){Cc[c[d>>2]&255](c[g+164>>2]|0);Cc[c[d>>2]&255](c[g+144>>2]|0)}Cc[c[d>>2]&255](g)}Cc[c[d>>2]&255](c[a+376>>2]|0);Cc[c[d>>2]&255](c[a+448>>2]|0);Cc[c[d>>2]&255](c[a+8>>2]|0);Cc[c[d>>2]&255](c[a+44>>2]|0);Cc[c[d>>2]&255](c[a+380>>2]|0);Cc[c[d>>2]&255](c[a+236>>2]|0);g=c[a+248>>2]|0;if((g|0)!=0){Cc[g&255](c[a+240>>2]|0)}Cc[c[d>>2]&255](a);return}function rd(a,b){a=a|0;b=b|0;var d=0,e=0;d=a+4|0;e=a|0;a=(c[d>>2]|0)==(c[e>>2]|0);c[e>>2]=b;if(!a){return}c[d>>2]=b;return}function sd(a,b,d){a=a|0;b=b|0;d=d|0;c[a+52>>2]=b;c[a+56>>2]=d;return}function td(a,b){a=a|0;b=b|0;c[a+60>>2]=b;return}function ud(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;g=i;i=i+8|0;h=g|0;j=b+464|0;k=c[j>>2]|0;do{if((k|0)==3){c[b+268>>2]=33;l=0;i=g;return l|0}else if((k|0)==2){c[b+268>>2]=36;l=0;i=g;return l|0}else if((k|0)==0){if((c[b+460>>2]|0)!=0){break}m=b+472|0;if((c[m>>2]|0)==0){dc(((zc(0)|0)>>>0)%4294967295|0|0);c[m>>2]=yb()|0}if((a[b+232|0]|0)==0){break}if((pd(b,21576)|0)<<24>>24!=0){break}c[b+268>>2]=1;l=0;i=g;return l|0}}while(0);c[j>>2]=1;if((e|0)==0){a[b+468|0]=f;if((f|0)==0){l=1;i=g;return l|0}k=b+24|0;m=c[k>>2]|0;n=b+280|0;c[n>>2]=m;o=c[b+28>>2]|0;c[b+40>>2]=o;p=b+264|0;q=Sc[c[p>>2]&127](b,m,o,k)|0;c[b+268>>2]=q;if((q|0)!=0){c[b+276>>2]=c[b+272>>2];c[p>>2]=84;l=0;i=g;return l|0}p=c[j>>2]|0;if((p|0)==3){q=c[b+144>>2]|0;Vc[c[q+48>>2]&63](q,c[n>>2]|0,c[k>>2]|0,b+392|0);c[n>>2]=c[k>>2];l=2;i=g;return l|0}else if((p|0)==0|(p|0)==1){c[j>>2]=2;l=1;i=g;return l|0}else{l=1;i=g;return l|0}}p=b+24|0;k=b+28|0;if((c[p>>2]|0)!=(c[k>>2]|0)){n=wd(b,e)|0;if((n|0)==0){l=0;i=g;return l|0}tF(n|0,d|0,e)|0;l=xd(b,e,f)|0;i=g;return l|0}n=b+36|0;c[n>>2]=(c[n>>2]|0)+e;n=b+280|0;c[n>>2]=d;a[b+468|0]=f;q=b+264|0;o=c[q>>2]|0;m=d+e|0;r=b+40|0;c[r>>2]=m;s=Sc[o&127](b,d,m,h)|0;d=b+268|0;c[d>>2]=s;if((s|0)!=0){c[b+276>>2]=c[b+272>>2];c[q>>2]=84;l=0;i=g;return l|0}s=c[j>>2]|0;do{if((s|0)==0|(s|0)==1){if((f|0)==0){t=23;break}c[j>>2]=2;l=1;i=g;return l|0}else if((s|0)==3){u=2}else{t=23}}while(0);if((t|0)==23){u=1}s=c[b+144>>2]|0;Vc[c[s+48>>2]&63](s,c[n>>2]|0,c[h>>2]|0,b+392|0);s=c[h>>2]|0;j=m-s|0;f=b+8|0;if((m|0)!=(s|0)){m=c[f>>2]|0;do{if((m|0)==0){v=Ec[c[b+12>>2]&63](e<<1)|0;t=29}else{if((j|0)<=((c[b+32>>2]|0)-m|0)){w=m;x=s;break}v=Oc[c[b+16>>2]&255](m,e<<1)|0;t=29}}while(0);do{if((t|0)==29){if((v|0)!=0){c[f>>2]=v;c[b+32>>2]=v+(e<<1);w=v;x=c[h>>2]|0;break}c[d>>2]=1;c[b+276>>2]=0;c[b+272>>2]=0;c[q>>2]=84;l=0;i=g;return l|0}}while(0);tF(w|0,x|0,j)|0}x=c[f>>2]|0;c[p>>2]=x;p=x+j|0;c[k>>2]=p;c[n>>2]=x;c[r>>2]=p;c[b+272>>2]=x;c[b+276>>2]=x;l=u;i=g;return l|0}function vd(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;return c[a+268>>2]|0}function wd(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=c[a+464>>2]|0;if((d|0)==3){c[a+268>>2]=33;e=0;return e|0}else if((d|0)==2){c[a+268>>2]=36;e=0;return e|0}else{d=a+32|0;f=c[d>>2]|0;g=a+28|0;h=c[g>>2]|0;i=f;j=h;if((i-j|0)>=(b|0)){e=h;return e|0}h=a+24|0;k=c[h>>2]|0;l=k;m=j-l|0;j=m+b|0;b=a+8|0;n=c[b>>2]|0;if((j|0)>(i-n|0)){o=(f|0)==(k|0)?1024:i-l|0;do{o=o<<1;}while((o|0)<(j|0));j=Ec[c[a+12>>2]&63](o)|0;if((j|0)==0){c[a+268>>2]=1;e=0;return e|0}c[d>>2]=j+o;o=c[h>>2]|0;if((o|0)==0){p=0}else{tF(j|0,o|0,(c[g>>2]|0)-o|0)|0;Cc[c[a+20>>2]&255](c[b>>2]|0);p=c[h>>2]|0}o=j+((c[g>>2]|0)-p)|0;c[g>>2]=o;c[b>>2]=j;q=j;r=o}else{Bb(k|0,n|0,m|0);m=c[b>>2]|0;b=m+((c[g>>2]|0)-(c[h>>2]|0))|0;c[g>>2]=b;q=m;r=b}c[h>>2]=q;c[a+276>>2]=0;c[a+272>>2]=0;c[a+280>>2]=0;e=r;return e|0}return 0}function xd(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;f=b+464|0;g=c[f>>2]|0;do{if((g|0)==3){c[b+268>>2]=33;h=0;return h|0}else if((g|0)==2){c[b+268>>2]=36;h=0;return h|0}else if((g|0)==0){if((c[b+460>>2]|0)!=0){break}i=b+472|0;if((c[i>>2]|0)==0){dc(((zc(0)|0)>>>0)%4294967295|0|0);c[i>>2]=yb()|0}if((a[b+232|0]|0)==0){break}if((pd(b,21576)|0)<<24>>24!=0){break}c[b+268>>2]=1;h=0;return h|0}}while(0);c[f>>2]=1;g=b+24|0;i=c[g>>2]|0;j=b+280|0;c[j>>2]=i;k=b+28|0;l=(c[k>>2]|0)+d|0;c[k>>2]=l;c[b+40>>2]=l;k=b+36|0;c[k>>2]=(c[k>>2]|0)+d;a[b+468|0]=e;d=b+264|0;k=Sc[c[d>>2]&127](b,i,l,g)|0;c[b+268>>2]=k;if((k|0)!=0){c[b+276>>2]=c[b+272>>2];c[d>>2]=84;h=0;return h|0}d=c[f>>2]|0;do{if((d|0)==3){m=2}else if((d|0)==0|(d|0)==1){if((e|0)==0){m=1;break}c[f>>2]=2;h=1;return h|0}else{m=1}}while(0);f=c[b+144>>2]|0;Vc[c[f+48>>2]&63](f,c[j>>2]|0,c[g>>2]|0,b+392|0);c[j>>2]=c[g>>2];h=m;return h|0}function yd(a){a=a|0;return c[a+268>>2]|0}function zd(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=a+272|0;d=c[b>>2]|0;do{if((d|0)!=0){e=a+280|0;f=c[e>>2]|0;if(d>>>0<f>>>0){break}g=c[a+144>>2]|0;Vc[c[g+48>>2]&63](g,f,d,a+392|0);c[e>>2]=c[b>>2]}}while(0);return(c[a+392>>2]|0)+1|0}function Ad(a){a=a|0;var b=0;if(!((a|0)!=0&a>>>0<41>>>0)){b=0;return b|0}b=c[171440+(a<<2)>>2]|0;return b|0}function Bd(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;b=a+4|0;d=c[b>>2]|0;do{if((d|0)!=0){e=a+16|0;f=c[e>>2]|0;if((f|0)==0){g=a|0;c[g>>2]=d;h=d|0;c[b>>2]=c[h>>2];c[h>>2]=0;h=c[g>>2]|0;g=h+8|0;c[e>>2]=g;c[a+8>>2]=(c[h+4>>2]|0)+(h+8);c[a+12>>2]=g;i=1;return i|0}g=a+8|0;if(((c[g>>2]|0)-f|0)>=(c[d+4>>2]|0)){break}f=d|0;h=c[f>>2]|0;j=a|0;c[f>>2]=c[j>>2];f=c[b>>2]|0;c[j>>2]=f;c[b>>2]=h;h=c[e>>2]|0;tF(f+8|0,h|0,(c[g>>2]|0)-h|0)|0;h=c[j>>2]|0;j=a+12|0;c[j>>2]=(c[j>>2]|0)-(c[e>>2]|0)+(h+8);c[e>>2]=h+8;c[g>>2]=(c[h+4>>2]|0)+(h+8);i=1;return i|0}}while(0);b=a|0;d=c[b>>2]|0;h=a+16|0;g=c[h>>2]|0;e=a+8|0;j=c[e>>2]|0;if((d|0)!=0&(g|0)==(d+8|0)){f=j-g<<1;k=Oc[c[(c[a+20>>2]|0)+4>>2]&255](d,f+8|0)|0;if((k|0)==0){i=0;return i|0}c[b>>2]=k;c[k+4>>2]=f;k=c[b>>2]|0;d=a+12|0;c[d>>2]=(c[d>>2]|0)-(c[h>>2]|0)+(k+8);c[h>>2]=k+8;c[e>>2]=k+8+f;i=1;return i|0}f=a+16|0;k=j-g|0;g=(k|0)<1024?1024:k<<1;k=g+8|0;j=Ec[c[c[a+20>>2]>>2]&63](k)|0;if((j|0)==0){i=0;return i|0}c[j+4>>2]=g;c[j>>2]=c[b>>2];c[b>>2]=j;b=a+12|0;a=c[b>>2]|0;g=c[f>>2]|0;h=j+8|0;if((a|0)==(g|0)){l=a;m=a}else{tF(h|0,g|0,a-g|0)|0;l=c[b>>2]|0;m=c[f>>2]|0}c[b>>2]=j+(l+8-m);c[f>>2]=h;c[e>>2]=j+k;i=1;return i|0}function Cd(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0;h=e+8|0;i=c[h>>2]|0;do{if((i|0)==0){if((g|0)==0){j=0;return j|0}a[e+4|0]=6;c[h>>2]=64;k=e+16|0;l=Ec[c[c[k>>2]>>2]&63](256)|0;c[e>>2]=l;if((l|0)==0){c[h>>2]=0;j=0;return j|0}vF(l|0,0,256)|0;l=c[b+472>>2]|0;m=a[f]|0;if(m<<24>>24==0){n=l}else{o=f;p=l;l=m;while(1){m=o+1|0;q=(p*1000003|0)^l&255;r=a[m]|0;if(r<<24>>24==0){n=q;break}else{o=m;p=q;l=r}}}s=(c[h>>2]|0)-1&n;t=k}else{l=b+472|0;p=c[l>>2]|0;o=a[f]|0;if(o<<24>>24==0){u=p}else{r=f;q=p;p=o;while(1){m=r+1|0;v=(q*1000003|0)^p&255;w=a[m]|0;if(w<<24>>24==0){u=v;break}else{r=m;q=v;p=w}}}p=i-1|0;q=p&u;r=e|0;k=c[r>>2]|0;w=c[k+(q<<2)>>2]|0;a:do{if((w|0)==0){x=q}else{v=u&-i;m=e+4|0;y=p>>>2;z=0;A=q;B=w;b:while(1){C=c[B>>2]|0;if(o<<24>>24==(a[C]|0)){D=f;E=C;C=o;do{if(C<<24>>24==0){j=B;break b}D=D+1|0;E=E+1|0;C=a[D]|0;}while(C<<24>>24==(a[E]|0))}if(z<<24>>24==0){F=(v>>>(((d[m]|0)-1|0)>>>0)&y|1)&255}else{F=z}E=F&255;C=A-E+(A>>>0<E>>>0?i:0)|0;E=c[k+(C<<2)>>2]|0;if((E|0)==0){x=C;break a}else{z=F;A=C;B=E}}return j|0}}while(0);if((g|0)==0){j=0;return j|0}k=e+4|0;o=a[k]|0;if(((c[e+12>>2]|0)>>>(((o&255)-1|0)>>>0)|0)==0){s=x;t=e+16|0;break}w=o+1&255;o=w&255;q=1<<o;p=q-1|0;B=q<<2;A=e+16|0;z=Ec[c[c[A>>2]>>2]&63](B)|0;y=z;if((z|0)==0){j=0;return j|0}vF(z|0,0,B|0)|0;B=c[h>>2]|0;if((B|0)!=0){z=-q|0;m=o-1|0;v=p>>>2;E=0;C=B;while(1){B=c[(c[r>>2]|0)+(E<<2)>>2]|0;if((B|0)==0){G=C}else{D=c[B>>2]|0;H=c[l>>2]|0;I=a[D]|0;if(I<<24>>24==0){J=H}else{K=D;D=H;H=I;while(1){I=K+1|0;L=(D*1000003|0)^H&255;M=a[I]|0;if(M<<24>>24==0){J=L;break}else{K=I;D=L;H=M}}}H=J&p;D=y+(H<<2)|0;if((c[D>>2]|0)==0){N=D}else{D=((J&z)>>>(m>>>0)&v|1)&255;K=0;M=H;while(1){H=K<<24>>24==0?D:K;L=H&255;I=M+(M>>>0<L>>>0?q:0)-L|0;L=y+(I<<2)|0;if((c[L>>2]|0)==0){N=L;break}else{K=H;M=I}}}c[N>>2]=B;G=c[h>>2]|0}M=E+1|0;if(M>>>0<G>>>0){E=M;C=G}else{break}}}Cc[c[(c[A>>2]|0)+8>>2]&255](c[r>>2]|0);c[r>>2]=y;a[k]=w;c[h>>2]=q;C=p&u;if((c[y+(C<<2)>>2]|0)==0){s=C;t=A;break}E=((u&-q)>>>((o-1|0)>>>0)&p>>>2|1)&255;v=0;m=C;while(1){C=v<<24>>24==0?E:v;z=C&255;l=m+(m>>>0<z>>>0?q:0)-z|0;if((c[y+(l<<2)>>2]|0)==0){s=l;t=A;break}else{v=C;m=l}}}}while(0);u=Ec[c[c[t>>2]>>2]&63](g)|0;t=e|0;c[(c[t>>2]|0)+(s<<2)>>2]=u;u=c[(c[t>>2]|0)+(s<<2)>>2]|0;if((u|0)==0){j=0;return j|0}vF(u|0,0,g|0)|0;c[c[(c[t>>2]|0)+(s<<2)>>2]>>2]=f;f=e+12|0;c[f>>2]=(c[f>>2]|0)+1;j=c[(c[t>>2]|0)+(s<<2)>>2]|0;return j|0}function Dd(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0;h=a[f]|0;i=h<<24>>24==0;j=c[d>>2]|0;do{if(i){if((j|0)==0){k=0;l=d|0;m=12;break}else{n=28;return n|0}}else{o=d|0;if((j|0)==0){p=o;m=14;break}if((a[j]|0)!=120){k=0;l=o;m=12;break}if((a[j+1|0]|0)!=109){k=0;l=o;m=12;break}if((a[j+2|0]|0)!=108){k=0;l=o;m=12;break}q=a[j+3|0]|0;do{if(q<<24>>24==110){if((a[j+4|0]|0)!=115){break}if((a[j+5|0]|0)==0){n=39}else{break}return n|0}}while(0);k=q<<24>>24==0|0;l=o;m=12}}while(0);do{if((m|0)==12){if(i){r=k;s=l;t=0;u=1;m=30;break}if(k<<24>>24==0){p=l;m=14;break}else{v=1;w=0;x=h;y=1}while(1){do{if(y){if((w|0)<=36){if(x<<24>>24==(a[74952+w|0]|0)){z=v;break}}z=0}else{z=0}}while(0);j=w+1|0;A=a[f+j|0]|0;B=z<<24>>24!=0;if(A<<24>>24==0){C=1;D=j;E=B;F=l;G=k;m=29;break}else{v=z;w=j;x=A;y=B}}}}while(0);if((m|0)==14){y=1;x=1;w=0;z=h;h=1;while(1){do{if(h){if((w|0)<=36){if(z<<24>>24==(a[74952+w|0]|0)){H=y;break}}H=0}else{H=0}}while(0);do{if(x<<24>>24==0){I=0}else{if((w|0)<=29){if(z<<24>>24==(a[74920+w|0]|0)){I=x;break}}I=0}}while(0);v=w+1|0;k=a[f+v|0]|0;l=H<<24>>24!=0;if(k<<24>>24==0){C=I;D=v;E=l;F=p;G=0;m=29;break}else{y=H;x=I;w=v;z=k;h=l}}}if((m|0)==29){if(E){r=G;s=F;t=D;u=C;m=30}else{J=0;K=G;L=F;M=D;N=C}}if((m|0)==30){J=(t|0)==36|0;K=r;L=s;M=t;N=u}if(N<<24>>24==0){O=0}else{O=(M|0)==29|0}if((K&255|0)!=(J|0)){n=K<<24>>24!=0?38:40;return n|0}if(O<<24>>24!=0){n=40;return n|0}O=b+456|0;K=((a[O]|0)!=0)+M|0;M=b+360|0;J=c[M>>2]|0;do{if((J|0)==0){N=b+12|0;u=Ec[c[N>>2]&63](28)|0;if((u|0)==0){n=1;return n|0}t=K+24|0;s=Ec[c[N>>2]&63](t)|0;c[u+16>>2]=s;if((s|0)!=0){c[u+24>>2]=t;P=u;break}Cc[c[b+20>>2]&255](u);n=1;return n|0}else{u=J+24|0;do{if((K|0)>(c[u>>2]|0)){t=J+16|0;s=K+24|0;N=Oc[c[b+16>>2]&255](c[t>>2]|0,s)|0;if((N|0)==0){n=1;return n|0}else{c[t>>2]=N;c[u>>2]=s;break}}}while(0);c[M>>2]=c[J+4>>2];P=J}}while(0);c[P+20>>2]=K;J=P+16|0;tF(c[J>>2]|0,f|0,K)|0;M=a[O]|0;if(M<<24>>24!=0){a[(c[J>>2]|0)+(K-1)|0]=M}c[P>>2]=d;c[P+12>>2]=e;M=d+4|0;c[P+8>>2]=c[M>>2];if((a[f]|0)==0){if(((c[b+340>>2]|0)+132|0)==(d|0)){Q=0}else{m=49}}else{m=49}if((m|0)==49){Q=P}c[M>>2]=Q;c[P+4>>2]=c[g>>2];c[g>>2]=P;if((e|0)==0){n=0;return n|0}e=c[b+100>>2]|0;if((e|0)==0){n=0;return n|0}Tc[e&127](c[b+4>>2]|0,c[L>>2]|0,(c[M>>2]|0)!=0?f:0);n=0;return n|0}function Ed(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0;g=i;i=i+80|0;h=g|0;j=g+8|0;k=g+16|0;l=g+24|0;m=g+32|0;n=g+40|0;o=g+48|0;p=g+56|0;q=g+64|0;r=g+72|0;c[n>>2]=0;c[o>>2]=0;c[p>>2]=0;c[r>>2]=-1;s=b+144|0;t=b+272|0;u=(d|0)!=0;if((cf(d,c[s>>2]|0,e,f,t,p,q,n,o,r)|0)==0){v=u?31:30;i=g;return v|0}do{if(!u){if((c[r>>2]|0)!=1){break}a[(c[b+340>>2]|0)+130|0]=1}}while(0);u=b+140|0;do{if((c[u>>2]|0)==0){d=b+80|0;w=c[d>>2]|0;if((w|0)==0){x=0;y=0;break}z=c[s>>2]|0;c[j>>2]=e;if((a[z+68|0]|0)!=0){Tc[w&127](c[b+4>>2]|0,e,f-e|0);x=0;y=0;break}w=b+276|0;A=b+44|0;B=z+56|0;C=b+48|0;D=b+4|0;while(1){c[k>>2]=c[A>>2];Bc[c[B>>2]&63](z,j,f,k,c[C>>2]|0);c[w>>2]=c[j>>2];E=c[A>>2]|0;Tc[c[d>>2]&127](c[D>>2]|0,E,(c[k>>2]|0)-E|0);c[t>>2]=c[j>>2];if((c[j>>2]|0)==(f|0)){x=0;y=0;break}}}else{D=c[n>>2]|0;do{if((D|0)==0){F=0}else{d=b+424|0;A=c[s>>2]|0;w=D+(Oc[c[A+28>>2]&255](A,D)|0)|0;c[m>>2]=D;C=b+436|0;do{if((c[C>>2]|0)==0){if((Bd(d)|0)<<24>>24==0){v=1}else{break}i=g;return v|0}}while(0);z=A+56|0;B=b+432|0;while(1){Bc[c[z>>2]&63](A,m,w,C,c[B>>2]|0);if((c[m>>2]|0)==(w|0)){break}if((Bd(d)|0)<<24>>24==0){v=1;G=65;break}}if((G|0)==65){i=g;return v|0}w=b+440|0;if((c[w>>2]|0)==0){v=1;i=g;return v|0}A=c[C>>2]|0;do{if((A|0)==(c[B>>2]|0)){if((Bd(d)|0)<<24>>24==0){v=1;i=g;return v|0}else{H=c[C>>2]|0;break}}else{H=A}}while(0);c[C>>2]=H+1;a[H]=0;A=c[w>>2]|0;if((A|0)==0){v=1;i=g;return v|0}else{c[w>>2]=c[C>>2];F=A;break}}}while(0);D=c[p>>2]|0;do{if((D|0)==0){I=0}else{A=b+424|0;d=c[s>>2]|0;B=(c[q>>2]|0)+(-(c[d+64>>2]|0)|0)|0;c[l>>2]=D;z=b+436|0;do{if((c[z>>2]|0)==0){if((Bd(A)|0)<<24>>24==0){v=1}else{break}i=g;return v|0}}while(0);C=d+56|0;w=b+432|0;while(1){Bc[c[C>>2]&63](d,l,B,z,c[w>>2]|0);if((c[l>>2]|0)==(B|0)){break}if((Bd(A)|0)<<24>>24==0){v=1;G=65;break}}if((G|0)==65){i=g;return v|0}B=b+440|0;if((c[B>>2]|0)==0){v=1;i=g;return v|0}d=c[z>>2]|0;do{if((d|0)==(c[w>>2]|0)){if((Bd(A)|0)<<24>>24==0){v=1;i=g;return v|0}else{J=c[z>>2]|0;break}}else{J=d}}while(0);c[z>>2]=J+1;a[J]=0;d=c[B>>2]|0;if((d|0)==0){v=1}else{I=d;break}i=g;return v|0}}while(0);Vc[c[u>>2]&63](c[b+4>>2]|0,I,F,c[r>>2]|0);x=I;y=F}}while(0);do{if((c[b+228>>2]|0)==0){F=c[o>>2]|0;if((F|0)!=0){if((c[F+64>>2]|0)==(c[(c[s>>2]|0)+64>>2]|0)){c[s>>2]=F;break}c[t>>2]=c[n>>2];v=19;i=g;return v|0}F=c[n>>2]|0;if((F|0)==0){break}do{if((y|0)==0){I=b+424|0;r=c[s>>2]|0;u=F+(Oc[c[r+28>>2]&255](r,F)|0)|0;c[h>>2]=F;J=b+436|0;do{if((c[J>>2]|0)==0){if((Bd(I)|0)<<24>>24==0){v=1}else{break}i=g;return v|0}}while(0);B=r+56|0;z=b+432|0;while(1){Bc[c[B>>2]&63](r,h,u,J,c[z>>2]|0);if((c[h>>2]|0)==(u|0)){break}if((Bd(I)|0)<<24>>24==0){v=1;G=65;break}}if((G|0)==65){i=g;return v|0}u=b+440|0;if((c[u>>2]|0)==0){v=1;i=g;return v|0}r=c[J>>2]|0;do{if((r|0)==(c[z>>2]|0)){if((Bd(I)|0)<<24>>24==0){v=1;i=g;return v|0}else{K=c[J>>2]|0;break}}else{K=r}}while(0);c[J>>2]=K+1;a[K]=0;r=c[u>>2]|0;if((r|0)==0){v=1}else{L=r;break}i=g;return v|0}else{L=y}}while(0);F=Td(b,L)|0;r=b+428|0;I=c[r>>2]|0;z=b+424|0;B=c[z>>2]|0;do{if((I|0)==0){c[r>>2]=B}else{if((B|0)==0){break}else{M=B;N=I}while(1){l=M|0;q=c[l>>2]|0;c[l>>2]=N;c[r>>2]=M;if((q|0)==0){break}else{N=M;M=q}}}}while(0);c[z>>2]=0;c[b+440>>2]=0;c[b+436>>2]=0;c[b+432>>2]=0;if((F|0)!=18){v=F;i=g;return v|0}c[t>>2]=c[n>>2];v=18;i=g;return v|0}}while(0);if((y|0)==0&(x|0)==0){v=0;i=g;return v|0}x=b+428|0;y=c[x>>2]|0;n=b+424|0;t=c[n>>2]|0;do{if((y|0)==0){c[x>>2]=t}else{if((t|0)==0){break}else{O=t;P=y}while(1){M=O|0;N=c[M>>2]|0;c[M>>2]=P;c[x>>2]=O;if((N|0)==0){break}else{P=O;O=N}}}}while(0);c[n>>2]=0;c[b+440>>2]=0;c[b+436>>2]=0;c[b+432>>2]=0;v=0;i=g;return v|0}function Fd(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=Gd(b,1,c[b+144>>2]|0,d,e,f,(a[b+468|0]|0)==0|0)|0;do{if((g|0)==0){if((Hd(b)|0)<<24>>24==0){h=1}else{break}return h|0}}while(0);h=g;return h|0}function Gd(b,e,f,g,h,j,k){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,_a=0,$a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,_b=0,$b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Fc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Pc=0,Qc=0,Rc=0,Uc=0,Vc=0,Wc=0,Xc=0,Yc=0,Zc=0,_c=0;l=i;i=i+360|0;m=l|0;n=l+8|0;o=l+16|0;p=l+24|0;q=l+32|0;r=l+40|0;s=l+48|0;t=l+56|0;u=l+64|0;v=l+72|0;w=l+80|0;x=l+88|0;y=l+96|0;z=l+104|0;A=l+112|0;B=l+120|0;C=l+128|0;D=l+136|0;E=l+144|0;F=l+152|0;G=l+160|0;H=l+168|0;I=l+176|0;J=l+184|0;K=l+192|0;L=l+200|0;M=l+208|0;N=l+216|0;O=l+224|0;P=l+232|0;Q=l+240|0;R=l+248|0;S=l+256|0;T=l+264|0;U=l+272|0;V=l+280|0;W=l+288|0;X=l+296|0;Y=l+304|0;Z=l+336|0;_=l+344|0;$=l+352|0;c[R>>2]=g;aa=b+340|0;ba=c[aa>>2]|0;ca=b+144|0;if((c[ca>>2]|0)==(f|0)){da=b+272|0;ea=b+276|0;fa=da;ga=ea;ha=da;ia=ea;ja=b+284|0}else{ea=b+284|0;da=c[ea>>2]|0;fa=da|0;ga=da+4|0;ha=b+272|0;ia=b+276|0;ja=ea}c[fa>>2]=g;g=f+4|0;ea=b+80|0;da=f+68|0;ka=b+44|0;la=f+56|0;ma=b+48|0;na=b+4|0;oa=b+464|0;pa=f+44|0;qa=f+64|0;ra=ba+80|0;sa=ba+92|0;ta=ba+88|0;ua=ba+96|0;va=ba+8|0;wa=ba+129|0;xa=b+112|0;ya=b+400|0;za=b+412|0;Aa=b+408|0;Ba=b+456|0;Ca=b+416|0;Da=b+116|0;Ea=b+292|0;Fa=b+120|0;Ga=b+288|0;Ha=b+12|0;Ia=b+296|0;Ja=b+224|0;Ka=b+264|0;La=ba+130|0;Ma=b+472|0;Na=ba|0;Oa=ba+4|0;ba=b+60|0;Pa=b+352|0;Qa=b+348|0;Ra=f+28|0;Sa=b+16|0;Ta=b+52|0;Ua=b+404|0;Va=b+400|0;Wa=b+376|0;Xa=Y|0;Ya=b+56|0;Za=ya|0;_a=b+104|0;$a=b+360|0;ab=b+232|0;bb=b+233|0;cb=f+40|0;db=l+328|0;eb=b+72|0;a:while(1){fb=c[R>>2]|0;c[S>>2]=fb;gb=Sc[c[g>>2]&127](f,fb,h,S)|0;c[ga>>2]=c[S>>2];b:do{switch(gb|0){case-2:{hb=28;break a;break};case-4:{hb=20;break a;break};case-1:{hb=26;break a;break};case 9:{fb=c[qa>>2]|0;ib=(Hc[c[pa>>2]&63](f,(c[R>>2]|0)+fb|0,(c[S>>2]|0)+(-fb|0)|0)|0)&255;a[U]=ib;if(ib<<24>>24!=0){ib=c[ba>>2]|0;if((ib|0)!=0){Tc[ib&127](c[na>>2]|0,U,1);break b}ib=c[ea>>2]|0;if((ib|0)==0){break b}fb=c[R>>2]|0;jb=c[S>>2]|0;c[L>>2]=fb;if((a[da]|0)!=0){Tc[ib&127](c[na>>2]|0,fb,jb-fb|0);break b}if((c[ca>>2]|0)==(f|0)){kb=ia;lb=ha}else{fb=c[ja>>2]|0;kb=fb+4|0;lb=fb|0}while(1){c[M>>2]=c[ka>>2];Bc[c[la>>2]&63](f,L,jb,M,c[ma>>2]|0);c[kb>>2]=c[L>>2];fb=c[ka>>2]|0;Tc[c[ea>>2]&127](c[na>>2]|0,fb,(c[M>>2]|0)-fb|0);c[lb>>2]=c[L>>2];if((c[L>>2]|0)==(jb|0)){break b}}}jb=c[qa>>2]|0;fb=(c[S>>2]|0)+(-jb|0)|0;c[K>>2]=(c[R>>2]|0)+jb;if((c[sa>>2]|0)==0){if((Bd(ra)|0)<<24>>24==0){mb=1;hb=320;break a}}while(1){Bc[c[la>>2]&63](f,K,fb,sa,c[ta>>2]|0);if((c[K>>2]|0)==(fb|0)){break}if((Bd(ra)|0)<<24>>24==0){mb=1;hb=320;break a}}if((c[ua>>2]|0)==0){mb=1;hb=320;break a}fb=c[sa>>2]|0;if((fb|0)==(c[ta>>2]|0)){if((Bd(ra)|0)<<24>>24==0){mb=1;hb=320;break a}nb=c[sa>>2]|0}else{nb=fb}c[sa>>2]=nb+1;a[nb]=0;fb=c[ua>>2]|0;if((fb|0)==0){mb=1;hb=320;break a}jb=c[va>>2]|0;c:do{if((jb|0)==0){ob=0}else{ib=c[Ma>>2]|0;pb=a[fb]|0;if(pb<<24>>24==0){qb=ib}else{rb=fb;sb=ib;ib=pb;while(1){tb=rb+1|0;ub=(sb*1000003|0)^ib&255;vb=a[tb]|0;if(vb<<24>>24==0){qb=ub;break}else{rb=tb;sb=ub;ib=vb}}}ib=jb-1|0;sb=qb&ib;rb=c[Na>>2]|0;vb=c[rb+(sb<<2)>>2]|0;if((vb|0)==0){ob=0;break}ub=qb&-jb;tb=ib>>>2;ib=0;wb=sb;sb=vb;while(1){vb=c[sb>>2]|0;if(pb<<24>>24==(a[vb]|0)){xb=fb;yb=vb;vb=pb;do{if(vb<<24>>24==0){ob=sb;break c}xb=xb+1|0;yb=yb+1|0;vb=a[xb]|0;}while(vb<<24>>24==(a[yb]|0))}if(ib<<24>>24==0){zb=(ub>>>(((d[Oa]|0)-1|0)>>>0)&tb|1)&255}else{zb=ib}yb=zb&255;vb=(wb>>>0<yb>>>0?jb:0)+(wb-yb)|0;yb=c[rb+(vb<<2)>>2]|0;if((yb|0)==0){ob=0;break}else{ib=zb;wb=vb;sb=yb}}}}while(0);jb=ob;c[sa>>2]=fb;do{if((a[wa]|0)==0){hb=62}else{if((a[La]|0)!=0){hb=62;break}if((ob|0)!=0){break}sb=c[Fa>>2]|0;if((sb|0)!=0){Tc[sb&127](c[na>>2]|0,fb,0);break b}sb=c[ea>>2]|0;if((sb|0)==0){break b}wb=c[R>>2]|0;ib=c[S>>2]|0;c[I>>2]=wb;if((a[da]|0)!=0){Tc[sb&127](c[na>>2]|0,wb,ib-wb|0);break b}if((c[ca>>2]|0)==(f|0)){Ab=ia;Bb=ha}else{wb=c[ja>>2]|0;Ab=wb+4|0;Bb=wb|0}while(1){c[J>>2]=c[ka>>2];Bc[c[la>>2]&63](f,I,ib,J,c[ma>>2]|0);c[Ab>>2]=c[I>>2];wb=c[ka>>2]|0;Tc[c[ea>>2]&127](c[na>>2]|0,wb,(c[J>>2]|0)-wb|0);c[Bb>>2]=c[I>>2];if((c[I>>2]|0)==(ib|0)){break b}}}}while(0);if((hb|0)==62){hb=0;if((ob|0)==0){mb=11;hb=320;break a}if((a[jb+34|0]|0)==0){mb=24;hb=320;break a}}Cb=ob+32|0;if((a[Cb]|0)!=0){mb=12;hb=320;break a}if((c[ob+28>>2]|0)!=0){mb=15;hb=320;break a}fb=ob+4|0;if((c[fb>>2]|0)!=0){if((a[Ea]|0)!=0){ib=c[Ga>>2]|0;if((ib|0)==0){wb=Ec[c[Ha>>2]&63](24)|0;if((wb|0)==0){mb=1;hb=320;break a}else{Db=wb}}else{c[Ga>>2]=c[ib+8>>2];Db=ib}a[Cb]=1;ib=ob+12|0;c[ib>>2]=0;wb=Db+8|0;c[wb>>2]=c[ja>>2];c[ja>>2]=Db;c[Db+12>>2]=jb;c[Db+16>>2]=c[Ia>>2];a[Db+20|0]=0;c[Db>>2]=0;c[Db+4>>2]=0;sb=c[fb>>2]|0;fb=sb+(c[ob+8>>2]|0)|0;rb=Gd(b,c[Ia>>2]|0,c[Ja>>2]|0,sb,fb,m,0)|0;if((rb|0)!=0){mb=rb;hb=320;break a}rb=c[m>>2]|0;do{if((fb|0)!=(rb|0)){if((c[oa>>2]|0)!=3){break}c[ib>>2]=rb-sb;c[Ka>>2]=86;break b}}while(0);a[Cb]=0;c[ja>>2]=c[wb>>2];c[wb>>2]=c[Ga>>2];c[Ga>>2]=Db;break b}sb=c[Fa>>2]|0;if((sb|0)!=0){Tc[sb&127](c[na>>2]|0,c[ob>>2]|0,0);break b}sb=c[ea>>2]|0;if((sb|0)==0){break b}rb=c[R>>2]|0;ib=c[S>>2]|0;c[G>>2]=rb;if((a[da]|0)!=0){Tc[sb&127](c[na>>2]|0,rb,ib-rb|0);break b}if((c[ca>>2]|0)==(f|0)){Eb=ia;Fb=ha}else{rb=c[ja>>2]|0;Eb=rb+4|0;Fb=rb|0}while(1){c[H>>2]=c[ka>>2];Bc[c[la>>2]&63](f,G,ib,H,c[ma>>2]|0);c[Eb>>2]=c[G>>2];rb=c[ka>>2]|0;Tc[c[ea>>2]&127](c[na>>2]|0,rb,(c[H>>2]|0)-rb|0);c[Fb>>2]=c[G>>2];if((c[G>>2]|0)==(ib|0)){break b}}}if((c[xa>>2]|0)==0){ib=c[ea>>2]|0;if((ib|0)==0){break b}wb=c[R>>2]|0;rb=c[S>>2]|0;c[E>>2]=wb;if((a[da]|0)!=0){Tc[ib&127](c[na>>2]|0,wb,rb-wb|0);break b}if((c[ca>>2]|0)==(f|0)){Gb=ia;Hb=ha}else{wb=c[ja>>2]|0;Gb=wb+4|0;Hb=wb|0}while(1){c[F>>2]=c[ka>>2];Bc[c[la>>2]&63](f,E,rb,F,c[ma>>2]|0);c[Gb>>2]=c[E>>2];wb=c[ka>>2]|0;Tc[c[ea>>2]&127](c[na>>2]|0,wb,(c[F>>2]|0)-wb|0);c[Hb>>2]=c[E>>2];if((c[E>>2]|0)==(rb|0)){break b}}}a[Cb]=1;rb=c[aa>>2]|0;wb=rb+136|0;do{if((c[wb>>2]|0)==0){Ib=0}else{ib=c[za>>2]|0;if((ib|0)==(c[Aa>>2]|0)){if((Bd(ya)|0)<<24>>24==0){hb=148;break a}Jb=c[za>>2]|0}else{Jb=ib}c[za>>2]=Jb+1;a[Jb]=61;ib=(((a[Ba]|0)!=0)<<31>>31)+(c[(c[wb>>2]|0)+20>>2]|0)|0;if((ib|0)>0){Kb=0}else{Ib=1;break}while(1){sb=c[za>>2]|0;if((sb|0)==(c[Aa>>2]|0)){if((Bd(ya)|0)<<24>>24==0){hb=148;break a}Lb=c[za>>2]|0}else{Lb=sb}sb=a[(c[(c[wb>>2]|0)+16>>2]|0)+Kb|0]|0;c[za>>2]=Lb+1;a[Lb]=sb;sb=Kb+1|0;if((sb|0)<(ib|0)){Kb=sb}else{Ib=1;break}}}}while(0);wb=c[rb+60>>2]|0;ib=c[rb+68>>2]|0;sb=wb+(ib<<2)|0;d:do{if((ib|0)==0){Mb=Ib}else{fb=wb;jb=Ib;while(1){tb=fb;while(1){Nb=tb+4|0;Ob=c[tb>>2]|0;if((Ob|0)!=0){Pb=Ob+4|0;if((c[Pb>>2]|0)!=0){break}}if((Nb|0)==(sb|0)){Mb=jb;break d}else{tb=Nb}}if(jb<<24>>24!=0){tb=c[za>>2]|0;if((tb|0)==(c[Aa>>2]|0)){if((Bd(ya)|0)<<24>>24==0){hb=148;break a}Qb=c[za>>2]|0}else{Qb=tb}c[za>>2]=Qb+1;a[Qb]=12}tb=c[Ob>>2]|0;ub=a[tb]|0;pb=c[za>>2]|0;yb=(pb|0)==(c[Aa>>2]|0);if(ub<<24>>24==0){Rb=yb;Sb=pb}else{vb=tb;tb=yb;yb=ub;ub=pb;while(1){if(tb){if((Bd(ya)|0)<<24>>24==0){hb=148;break a}Tb=a[vb]|0;Ub=c[za>>2]|0}else{Tb=yb;Ub=ub}c[za>>2]=Ub+1;a[Ub]=Tb;pb=vb+1|0;xb=a[pb]|0;Vb=c[za>>2]|0;Wb=(Vb|0)==(c[Aa>>2]|0);if(xb<<24>>24==0){Rb=Wb;Sb=Vb;break}else{vb=pb;tb=Wb;yb=xb;ub=Vb}}}if(Rb){if((Bd(ya)|0)<<24>>24==0){hb=148;break a}Xb=c[za>>2]|0}else{Xb=Sb}c[za>>2]=Xb+1;a[Xb]=61;ub=(((a[Ba]|0)!=0)<<31>>31)+(c[(c[Pb>>2]|0)+20>>2]|0)|0;if((ub|0)>0){yb=0;do{tb=c[za>>2]|0;if((tb|0)==(c[Aa>>2]|0)){if((Bd(ya)|0)<<24>>24==0){hb=148;break a}Yb=c[za>>2]|0}else{Yb=tb}tb=a[(c[(c[Pb>>2]|0)+16>>2]|0)+yb|0]|0;c[za>>2]=Yb+1;a[Yb]=tb;yb=yb+1|0;}while((yb|0)<(ub|0))}if((Nb|0)==(sb|0)){Mb=1;break}else{fb=Nb;jb=1}}}}while(0);sb=c[rb>>2]|0;wb=c[rb+8>>2]|0;ib=sb+(wb<<2)|0;e:do{if((wb|0)!=0){jb=sb;fb=Mb;while(1){ub=jb;while(1){Zb=ub+4|0;_b=c[ub>>2]|0;if((_b|0)!=0){if((a[_b+32|0]|0)!=0){break}}if((Zb|0)==(ib|0)){break e}else{ub=Zb}}if(fb<<24>>24!=0){ub=c[za>>2]|0;if((ub|0)==(c[Aa>>2]|0)){if((Bd(ya)|0)<<24>>24==0){hb=148;break a}$b=c[za>>2]|0}else{$b=ub}c[za>>2]=$b+1;a[$b]=12}ub=c[_b>>2]|0;yb=a[ub]|0;if(yb<<24>>24!=0){tb=ub;ub=yb;do{yb=c[za>>2]|0;if((yb|0)==(c[Aa>>2]|0)){if((Bd(ya)|0)<<24>>24==0){hb=148;break a}ac=a[tb]|0;bc=c[za>>2]|0}else{ac=ub;bc=yb}c[za>>2]=bc+1;a[bc]=ac;tb=tb+1|0;ub=a[tb]|0;}while(ub<<24>>24!=0)}if((Zb|0)==(ib|0)){break}else{jb=Zb;fb=1}}}}while(0);ib=c[za>>2]|0;if((ib|0)==(c[Aa>>2]|0)){if((Bd(ya)|0)<<24>>24==0){hb=148;break a}cc=c[za>>2]|0}else{cc=ib}c[za>>2]=cc+1;a[cc]=0;ib=c[Ca>>2]|0;a[Cb]=0;if((ib|0)==0){mb=1;hb=320;break a}if((Gc[c[xa>>2]&127](c[Da>>2]|0,ib,c[ob+20>>2]|0,c[ob+16>>2]|0,c[ob+24>>2]|0)|0)==0){mb=21;hb=320;break a}c[za>>2]=c[Ca>>2];break};case 0:{hb=25;break a;break};case-3:{hb=6;break a;break};case 2:case 1:{ib=c[Pa>>2]|0;if((ib|0)==0){dc=Ec[c[Ha>>2]&63](48)|0;if((dc|0)==0){mb=1;hb=320;break a}sb=Ec[c[Ha>>2]&63](32)|0;c[dc+36>>2]=sb;if((sb|0)==0){hb=163;break a}c[dc+40>>2]=sb+32;ec=dc}else{c[Pa>>2]=c[ib>>2];ec=ib}ib=ec+44|0;c[ib>>2]=0;c[ec>>2]=c[Qa>>2];c[Qa>>2]=ec;sb=ec+12|0;c[ec+16>>2]=0;c[ec+20>>2]=0;wb=(c[R>>2]|0)+(c[qa>>2]|0)|0;rb=ec+4|0;c[rb>>2]=wb;fb=ec+8|0;c[fb>>2]=Oc[c[Ra>>2]&255](f,wb)|0;c[Ia>>2]=(c[Ia>>2]|0)+1;wb=c[rb>>2]|0;rb=wb+(c[fb>>2]|0)|0;c[W>>2]=wb;wb=ec+36|0;fb=ec+40|0;jb=c[wb>>2]|0;while(1){c[V>>2]=jb;Bc[c[la>>2]&63](f,W,rb,V,(c[fb>>2]|0)-1|0);fc=c[wb>>2]|0;ub=fc;gc=(c[V>>2]|0)-ub|0;if((c[W>>2]|0)==(rb|0)){break}tb=(c[fb>>2]|0)-ub<<1;ub=Oc[c[Sa>>2]&255](fc,tb)|0;if((ub|0)==0){mb=1;hb=320;break a}c[wb>>2]=ub;c[fb>>2]=ub+tb;jb=ub+gc|0}c[ec+24>>2]=gc;jb=sb|0;c[jb>>2]=fc;a[c[V>>2]|0]=0;fb=Id(b,f,c[R>>2]|0,sb,ib)|0;if((fb|0)!=0){mb=fb;hb=320;break a}fb=c[Ta>>2]|0;do{if((fb|0)==0){wb=c[ea>>2]|0;if((wb|0)==0){break}rb=c[R>>2]|0;ub=c[S>>2]|0;c[C>>2]=rb;if((a[da]|0)!=0){Tc[wb&127](c[na>>2]|0,rb,ub-rb|0);break}if((c[ca>>2]|0)==(f|0)){hc=ia;ic=ha}else{rb=c[ja>>2]|0;hc=rb+4|0;ic=rb|0}do{c[D>>2]=c[ka>>2];Bc[c[la>>2]&63](f,C,ub,D,c[ma>>2]|0);c[hc>>2]=c[C>>2];rb=c[ka>>2]|0;Tc[c[ea>>2]&127](c[na>>2]|0,rb,(c[D>>2]|0)-rb|0);c[ic>>2]=c[C>>2];}while((c[C>>2]|0)!=(ub|0))}else{Tc[fb&127](c[na>>2]|0,c[jb>>2]|0,c[Wa>>2]|0)}}while(0);jb=c[Ua>>2]|0;fb=c[Va>>2]|0;do{if((jb|0)==0){c[Ua>>2]=fb}else{if((fb|0)==0){break}else{jc=fb;kc=jb}while(1){ib=jc|0;sb=c[ib>>2]|0;c[ib>>2]=kc;c[Ua>>2]=jc;if((sb|0)==0){break}else{kc=jc;jc=sb}}}}while(0);c[Va>>2]=0;c[Ca>>2]=0;c[za>>2]=0;c[Aa>>2]=0;break};case 4:case 3:{jb=c[R>>2]|0;fb=c[qa>>2]|0;sb=jb+fb|0;c[X>>2]=0;ib=jb+((Oc[c[Ra>>2]&255](f,sb)|0)+fb)|0;c[B>>2]=sb;if((c[za>>2]|0)==0){if((Bd(ya)|0)<<24>>24==0){hb=192;break a}}while(1){Bc[c[la>>2]&63](f,B,ib,za,c[Aa>>2]|0);if((c[B>>2]|0)==(ib|0)){break}if((Bd(ya)|0)<<24>>24==0){hb=192;break a}}if((c[Ca>>2]|0)==0){hb=192;break a}ib=c[za>>2]|0;if((ib|0)==(c[Aa>>2]|0)){if((Bd(ya)|0)<<24>>24==0){hb=192;break a}lc=c[za>>2]|0}else{lc=ib}c[za>>2]=lc+1;a[lc]=0;ib=c[Ca>>2]|0;c[Xa>>2]=ib;if((ib|0)==0){mb=1;hb=320;break a}c[Ca>>2]=c[za>>2];ib=Id(b,f,c[R>>2]|0,Y,X)|0;if((ib|0)!=0){mb=ib;hb=320;break a}c[Ca>>2]=c[za>>2];ib=c[Ta>>2]|0;if((ib|0)==0){mc=1}else{Tc[ib&127](c[na>>2]|0,c[Xa>>2]|0,c[Wa>>2]|0);mc=0}ib=c[Ya>>2]|0;do{if((ib|0)==0){if(mc<<24>>24==0){break}sb=c[ea>>2]|0;if((sb|0)==0){break}fb=c[R>>2]|0;jb=c[S>>2]|0;c[z>>2]=fb;if((a[da]|0)!=0){Tc[sb&127](c[na>>2]|0,fb,jb-fb|0);break}if((c[ca>>2]|0)==(f|0)){nc=ia;oc=ha}else{fb=c[ja>>2]|0;nc=fb+4|0;oc=fb|0}do{c[A>>2]=c[ka>>2];Bc[c[la>>2]&63](f,z,jb,A,c[ma>>2]|0);c[nc>>2]=c[z>>2];fb=c[ka>>2]|0;Tc[c[ea>>2]&127](c[na>>2]|0,fb,(c[A>>2]|0)-fb|0);c[oc>>2]=c[z>>2];}while((c[z>>2]|0)!=(jb|0))}else{if((c[Ta>>2]|0)==0){pc=ib}else{c[fa>>2]=c[ga>>2];pc=c[Ya>>2]|0}Dc[pc&63](c[na>>2]|0,c[Xa>>2]|0)}}while(0);ib=c[Ua>>2]|0;jb=c[Za>>2]|0;do{if((ib|0)==0){c[Ua>>2]=jb}else{if((jb|0)==0){break}else{qc=jb;rc=ib}while(1){fb=qc|0;sb=c[fb>>2]|0;c[fb>>2]=rc;c[Ua>>2]=qc;if((sb|0)==0){break}else{rc=qc;qc=sb}}}}while(0);c[Za>>2]=0;c[Ca>>2]=0;c[za>>2]=0;c[Aa>>2]=0;ib=c[X>>2]|0;if((ib|0)!=0){jb=ib;while(1){ib=c[_a>>2]|0;if((ib|0)==0){sc=jb|0}else{sb=jb|0;Dc[ib&63](c[na>>2]|0,c[c[sb>>2]>>2]|0);sc=sb}sb=c[jb+4>>2]|0;c[jb+4>>2]=c[$a>>2];c[$a>>2]=jb;c[(c[sc>>2]|0)+4>>2]=c[jb+8>>2];if((sb|0)==0){break}else{jb=sb}}c[X>>2]=0}if((c[Ia>>2]|0)==0){hb=220;break a}break};case 5:{if((c[Ia>>2]|0)==(e|0)){mb=13;hb=320;break a}jb=c[Qa>>2]|0;sb=jb|0;c[Qa>>2]=c[sb>>2];c[sb>>2]=c[Pa>>2];c[Pa>>2]=jb;tc=(c[R>>2]|0)+(c[qa>>2]<<1)|0;sb=Oc[c[Ra>>2]&255](f,tc)|0;if((sb|0)!=(c[jb+8>>2]|0)){hb=224;break a}if((wF(c[jb+4>>2]|0,tc|0,sb|0)|0)!=0){hb=224;break a}c[Ia>>2]=(c[Ia>>2]|0)-1;sb=c[Ya>>2]|0;do{if((sb|0)==0){ib=c[ea>>2]|0;if((ib|0)==0){break}fb=c[R>>2]|0;ub=c[S>>2]|0;c[x>>2]=fb;if((a[da]|0)!=0){Tc[ib&127](c[na>>2]|0,fb,ub-fb|0);break}if((c[ca>>2]|0)==(f|0)){uc=ia;vc=ha}else{fb=c[ja>>2]|0;uc=fb+4|0;vc=fb|0}do{c[y>>2]=c[ka>>2];Bc[c[la>>2]&63](f,x,ub,y,c[ma>>2]|0);c[uc>>2]=c[x>>2];fb=c[ka>>2]|0;Tc[c[ea>>2]&127](c[na>>2]|0,fb,(c[y>>2]|0)-fb|0);c[vc>>2]=c[x>>2];}while((c[x>>2]|0)!=(ub|0))}else{ub=c[jb+16>>2]|0;fb=jb+12|0;if((a[ab]|0)==0|(ub|0)==0){wc=sb}else{ib=(c[fb>>2]|0)+(c[jb+28>>2]|0)|0;rb=a[ub]|0;if(rb<<24>>24==0){xc=ib}else{wb=ub;ub=ib;ib=rb;while(1){rb=wb+1|0;tb=ub+1|0;a[ub]=ib;yb=a[rb]|0;if(yb<<24>>24==0){xc=tb;break}else{wb=rb;ub=tb;ib=yb}}}ib=c[jb+20>>2]|0;do{if((a[bb]|0)==0|(ib|0)==0){yc=xc}else{a[xc]=a[Ba]|0;ub=xc+1|0;wb=a[ib]|0;if(wb<<24>>24==0){yc=ub;break}else{zc=ib;Ac=ub;Fc=wb}while(1){wb=zc+1|0;a[Ac]=Fc;ub=Ac+1|0;yb=a[wb]|0;if(yb<<24>>24==0){yc=ub;break}else{zc=wb;Ac=ub;Fc=yb}}}}while(0);a[yc]=0;wc=c[Ya>>2]|0}Dc[wc&63](c[na>>2]|0,c[fb>>2]|0)}}while(0);sb=jb+44|0;ib=c[sb>>2]|0;if((ib|0)!=0){yb=ib;do{ib=c[_a>>2]|0;if((ib|0)==0){Ic=yb;Jc=yb|0}else{ub=yb|0;Dc[ib&63](c[na>>2]|0,c[c[ub>>2]>>2]|0);Ic=c[sb>>2]|0;Jc=ub}c[sb>>2]=c[Ic+4>>2];c[yb+4>>2]=c[$a>>2];c[$a>>2]=yb;c[(c[Jc>>2]|0)+4>>2]=c[yb+8>>2];yb=c[sb>>2]|0;}while((yb|0)!=0)}if((c[Ia>>2]|0)==0){hb=247;break a}break};case 10:{yb=Oc[c[cb>>2]&255](f,c[R>>2]|0)|0;if((yb|0)<0){mb=14;hb=320;break a}sb=c[ba>>2]|0;if((sb|0)!=0){jb=c[na>>2]|0;ub=Re(yb,db)|0;Tc[sb&127](jb,db,ub);break b}ub=c[ea>>2]|0;if((ub|0)==0){break b}jb=c[R>>2]|0;sb=c[S>>2]|0;c[v>>2]=jb;if((a[da]|0)!=0){Tc[ub&127](c[na>>2]|0,jb,sb-jb|0);break b}if((c[ca>>2]|0)==(f|0)){Kc=ia;Lc=ha}else{jb=c[ja>>2]|0;Kc=jb+4|0;Lc=jb|0}do{c[w>>2]=c[ka>>2];Bc[c[la>>2]&63](f,v,sb,w,c[ma>>2]|0);c[Kc>>2]=c[v>>2];jb=c[ka>>2]|0;Tc[c[ea>>2]&127](c[na>>2]|0,jb,(c[w>>2]|0)-jb|0);c[Lc>>2]=c[v>>2];}while((c[v>>2]|0)!=(sb|0));break};case 7:{sb=c[ba>>2]|0;if((sb|0)!=0){a[Z]=10;Tc[sb&127](c[na>>2]|0,Z,1);break b}sb=c[ea>>2]|0;if((sb|0)==0){break b}jb=c[R>>2]|0;ub=c[S>>2]|0;c[t>>2]=jb;if((a[da]|0)!=0){Tc[sb&127](c[na>>2]|0,jb,ub-jb|0);break b}if((c[ca>>2]|0)==(f|0)){Mc=ia;Nc=ha}else{jb=c[ja>>2]|0;Mc=jb+4|0;Nc=jb|0}do{c[u>>2]=c[ka>>2];Bc[c[la>>2]&63](f,t,ub,u,c[ma>>2]|0);c[Mc>>2]=c[t>>2];jb=c[ka>>2]|0;Tc[c[ea>>2]&127](c[na>>2]|0,jb,(c[u>>2]|0)-jb|0);c[Nc>>2]=c[t>>2];}while((c[t>>2]|0)!=(ub|0));break};case 8:{ub=c[eb>>2]|0;do{if((ub|0)==0){jb=c[ea>>2]|0;if((jb|0)==0){break}sb=c[R>>2]|0;yb=c[S>>2]|0;c[r>>2]=sb;if((a[da]|0)!=0){Tc[jb&127](c[na>>2]|0,sb,yb-sb|0);break}if((c[ca>>2]|0)==(f|0)){Pc=ia;Qc=ha}else{sb=c[ja>>2]|0;Pc=sb+4|0;Qc=sb|0}do{c[s>>2]=c[ka>>2];Bc[c[la>>2]&63](f,r,yb,s,c[ma>>2]|0);c[Pc>>2]=c[r>>2];sb=c[ka>>2]|0;Tc[c[ea>>2]&127](c[na>>2]|0,sb,(c[s>>2]|0)-sb|0);c[Qc>>2]=c[r>>2];}while((c[r>>2]|0)!=(yb|0))}else{Cc[ub&255](c[na>>2]|0)}}while(0);ub=Kd(b,f,S,h,j,k)|0;if((ub|0)!=0){mb=ub;hb=320;break a}if((c[S>>2]|0)==0){hb=278;break a}break};case-5:{hb=279;break a;break};case 6:{ub=c[ba>>2]|0;if((ub|0)!=0){if((a[da]|0)!=0){yb=c[R>>2]|0;Tc[ub&127](c[na>>2]|0,yb,(c[S>>2]|0)-yb|0);break b}while(1){c[$>>2]=c[ka>>2];Bc[c[la>>2]&63](f,R,c[S>>2]|0,$,c[ma>>2]|0);c[ga>>2]=c[R>>2];yb=c[ka>>2]|0;Tc[ub&127](c[na>>2]|0,yb,(c[$>>2]|0)-yb|0);yb=c[R>>2]|0;if((yb|0)==(c[S>>2]|0)){break b}c[fa>>2]=yb}}ub=c[ea>>2]|0;if((ub|0)==0){break b}yb=c[R>>2]|0;fb=c[S>>2]|0;c[n>>2]=yb;if((a[da]|0)!=0){Tc[ub&127](c[na>>2]|0,yb,fb-yb|0);break b}if((c[ca>>2]|0)==(f|0)){Rc=ia;Uc=ha}else{yb=c[ja>>2]|0;Rc=yb+4|0;Uc=yb|0}do{c[o>>2]=c[ka>>2];Bc[c[la>>2]&63](f,n,fb,o,c[ma>>2]|0);c[Rc>>2]=c[n>>2];yb=c[ka>>2]|0;Tc[c[ea>>2]&127](c[na>>2]|0,yb,(c[o>>2]|0)-yb|0);c[Uc>>2]=c[n>>2];}while((c[n>>2]|0)!=(fb|0));break};case 11:{if((Md(b,f,c[R>>2]|0,c[S>>2]|0)|0)==0){mb=1;hb=320;break a}break};case 13:{if((Nd(b,f,c[R>>2]|0,c[S>>2]|0)|0)==0){mb=1;hb=320;break a}break};case 12:{mb=17;hb=320;break a;break};default:{fb=c[ea>>2]|0;if((fb|0)==0){break b}yb=c[R>>2]|0;ub=c[S>>2]|0;c[P>>2]=yb;if((a[da]|0)!=0){Tc[fb&127](c[na>>2]|0,yb,ub-yb|0);break b}if((c[ca>>2]|0)==(f|0)){Vc=ia;Wc=ha}else{yb=c[ja>>2]|0;Vc=yb+4|0;Wc=yb|0}do{c[Q>>2]=c[ka>>2];Bc[c[la>>2]&63](f,P,ub,Q,c[ma>>2]|0);c[Vc>>2]=c[P>>2];yb=c[ka>>2]|0;Tc[c[ea>>2]&127](c[na>>2]|0,yb,(c[Q>>2]|0)-yb|0);c[Wc>>2]=c[P>>2];}while((c[P>>2]|0)!=(ub|0))}}}while(0);gb=c[S>>2]|0;c[R>>2]=gb;c[fa>>2]=gb;gb=c[oa>>2]|0;if((gb|0)==3){hb=319;break}else if((gb|0)==2){mb=35;hb=320;break}}if((hb|0)==6){if(k<<24>>24!=0){c[j>>2]=c[R>>2];mb=0;i=l;return mb|0}c[ga>>2]=h;ga=c[ba>>2]|0;do{if((ga|0)==0){oa=c[ea>>2]|0;if((oa|0)==0){break}P=c[R>>2]|0;c[N>>2]=P;if((a[da]|0)!=0){Tc[oa&127](c[na>>2]|0,P,h-P|0);break}if((c[ca>>2]|0)==(f|0)){Xc=ia;Yc=ha}else{P=c[ja>>2]|0;Xc=P+4|0;Yc=P|0}do{c[O>>2]=c[ka>>2];Bc[c[la>>2]&63](f,N,h,O,c[ma>>2]|0);c[Xc>>2]=c[N>>2];P=c[ka>>2]|0;Tc[c[ea>>2]&127](c[na>>2]|0,P,(c[O>>2]|0)-P|0);c[Yc>>2]=c[N>>2];}while((c[N>>2]|0)!=(h|0))}else{a[T]=10;Tc[ga&127](c[na>>2]|0,T,1)}}while(0);if((e|0)==0){mb=3;i=l;return mb|0}if((c[Ia>>2]|0)!=(e|0)){mb=13;i=l;return mb|0}c[j>>2]=h;mb=0;i=l;return mb|0}else if((hb|0)==20){if(k<<24>>24!=0){c[j>>2]=c[R>>2];mb=0;i=l;return mb|0}if((e|0)<=0){mb=3;i=l;return mb|0}if((c[Ia>>2]|0)!=(e|0)){mb=13;i=l;return mb|0}c[j>>2]=c[R>>2];mb=0;i=l;return mb|0}else if((hb|0)==25){c[fa>>2]=c[S>>2];mb=4;i=l;return mb|0}else if((hb|0)==26){if(k<<24>>24==0){mb=5;i=l;return mb|0}c[j>>2]=c[R>>2];mb=0;i=l;return mb|0}else if((hb|0)==28){if(k<<24>>24==0){mb=6;i=l;return mb|0}c[j>>2]=c[R>>2];mb=0;i=l;return mb|0}else if((hb|0)==148){a[Cb]=0;mb=1;i=l;return mb|0}else if((hb|0)==163){Cc[c[b+20>>2]&255](dc);mb=1;i=l;return mb|0}else if((hb|0)==192){c[Xa>>2]=0;mb=1;i=l;return mb|0}else if((hb|0)==220){mb=Jd(b,c[S>>2]|0,h,j)|0;i=l;return mb|0}else if((hb|0)==224){c[fa>>2]=tc;mb=7;i=l;return mb|0}else if((hb|0)==247){mb=Jd(b,c[S>>2]|0,h,j)|0;i=l;return mb|0}else if((hb|0)==278){c[Ka>>2]=90;mb=0;i=l;return mb|0}else if((hb|0)==279){if(k<<24>>24!=0){c[j>>2]=c[R>>2];mb=0;i=l;return mb|0}k=c[ba>>2]|0;do{if((k|0)==0){Ka=c[ea>>2]|0;if((Ka|0)==0){break}b=c[R>>2]|0;c[p>>2]=b;if((a[da]|0)!=0){Tc[Ka&127](c[na>>2]|0,b,h-b|0);break}if((c[ca>>2]|0)==(f|0)){Zc=ia;_c=ha}else{b=c[ja>>2]|0;Zc=b+4|0;_c=b|0}do{c[q>>2]=c[ka>>2];Bc[c[la>>2]&63](f,p,h,q,c[ma>>2]|0);c[Zc>>2]=c[p>>2];b=c[ka>>2]|0;Tc[c[ea>>2]&127](c[na>>2]|0,b,(c[q>>2]|0)-b|0);c[_c>>2]=c[p>>2];}while((c[p>>2]|0)!=(h|0))}else{if((a[da]|0)==0){c[_>>2]=c[ka>>2];Bc[c[la>>2]&63](f,R,h,_,c[ma>>2]|0);b=c[ka>>2]|0;Tc[c[ba>>2]&127](c[na>>2]|0,b,(c[_>>2]|0)-b|0);break}else{b=c[R>>2]|0;Tc[k&127](c[na>>2]|0,b,h-b|0);break}}}while(0);if((e|0)==0){c[fa>>2]=h;mb=3;i=l;return mb|0}if((c[Ia>>2]|0)==(e|0)){c[j>>2]=h;mb=0;i=l;return mb|0}else{c[fa>>2]=h;mb=13;i=l;return mb|0}}else if((hb|0)==319){c[j>>2]=c[S>>2];mb=0;i=l;return mb|0}else if((hb|0)==320){i=l;return mb|0}return 0}function Hd(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;b=a+16|0;d=c[a+348>>2]|0;if((d|0)==0){e=1;return e|0}else{f=d}while(1){d=(c[f+24>>2]|0)+1|0;a=f+36|0;g=c[a>>2]|0;h=g+d|0;i=f+4|0;j=c[i>>2]|0;if((j|0)==(h|0)){e=1;k=11;break}l=f+8|0;m=c[l>>2]|0;n=m+d|0;o=f+40|0;if((n|0)>((c[o>>2]|0)-g|0)){p=Oc[c[b>>2]&255](g,n)|0;if((p|0)==0){e=0;k=11;break}g=f+12|0;q=c[a>>2]|0;if((c[g>>2]|0)==(q|0)){c[g>>2]=p}g=f+16|0;r=c[g>>2]|0;if((r|0)!=0){c[g>>2]=p+(r-q)}c[a>>2]=p;c[o>>2]=p+n;s=p+d|0;t=c[i>>2]|0;u=c[l>>2]|0}else{s=h;t=j;u=m}tF(s|0,t|0,u)|0;c[i>>2]=s;i=c[f>>2]|0;if((i|0)==0){e=1;k=11;break}else{f=i}}if((k|0)==11){return e|0}return 0}function Id(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0;j=i;i=i+8|0;k=j|0;l=c[b+340>>2]|0;m=l+20|0;n=g|0;o=c[n>>2]|0;p=c[l+28>>2]|0;a:do{if((p|0)==0){q=13}else{r=c[b+472>>2]|0;s=a[o]|0;if(s<<24>>24==0){t=r}else{u=o;v=r;r=s;while(1){w=u+1|0;x=(v*1000003|0)^r&255;y=a[w]|0;if(y<<24>>24==0){t=x;break}else{u=w;v=x;r=y}}}r=p-1|0;v=t&r;u=c[m>>2]|0;y=c[u+(v<<2)>>2]|0;if((y|0)==0){q=13;break}x=t&-p;w=l+24|0;z=r>>>2;r=0;A=v;v=y;b:while(1){y=c[v>>2]|0;if(s<<24>>24==(a[y]|0)){B=o;C=y;y=s;do{if(y<<24>>24==0){break b}B=B+1|0;C=C+1|0;y=a[B]|0;}while(y<<24>>24==(a[C]|0))}if(r<<24>>24==0){D=(x>>>(((d[w]|0)-1|0)>>>0)&z|1)&255}else{D=r}C=D&255;y=(A>>>0<C>>>0?p:0)+(A-C)|0;C=c[u+(y<<2)>>2]|0;if((C|0)==0){q=13;break a}else{r=D;A=y;v=C}}if((v|0)==0){q=13}else{E=v}}}while(0);do{if((q|0)==13){D=l+80|0;p=l+92|0;t=l+88|0;A=o;while(1){r=c[p>>2]|0;if((r|0)==(c[t>>2]|0)){if((Bd(D)|0)<<24>>24==0){F=1;q=161;break}G=c[p>>2]|0}else{G=r}r=a[A]|0;c[p>>2]=G+1;a[G]=r;if((a[A]|0)==0){break}else{A=A+1|0}}if((q|0)==161){i=j;return F|0}A=l+96|0;D=c[A>>2]|0;c[A>>2]=c[p>>2];if((D|0)==0){F=1;i=j;return F|0}A=Cd(b,m,D,24)|0;D=A;if((A|0)==0){F=1;i=j;return F|0}if((a[b+232|0]|0)==0){E=D;break}if((Pd(b,D)|0)==0){F=1}else{E=D;break}i=j;return F|0}}while(0);m=c[E+12>>2]|0;G=e+36|0;o=b+364|0;D=b+376|0;A=Sc[c[G>>2]&127](e,f,c[o>>2]|0,c[D>>2]|0)|0;t=A+m|0;v=c[o>>2]|0;do{if((t|0)>(v|0)){r=t+16|0;c[o>>2]=r;u=Oc[c[b+16>>2]&255](c[D>>2]|0,r<<4)|0;r=u;if((u|0)==0){F=1;i=j;return F|0}c[D>>2]=r;if((A|0)<=(v|0)){break}Sc[c[G>>2]&127](e,f,A,r)|0}}while(0);f=c[D>>2]|0;G=f|0;c:do{if((A|0)>0){v=e+28|0;o=b+400|0;t=b+412|0;r=b+416|0;u=b+408|0;z=E+20|0;w=e+56|0;x=0;s=0;C=0;y=f;d:while(1){B=c[y+(s<<4)>>2]|0;H=Qd(b,e,B,B+(Oc[c[v>>2]&255](e,B)|0)|0)|0;if((H|0)==0){F=1;q=161;break}B=H|0;I=(c[B>>2]|0)-1|0;if((a[I]|0)!=0){q=30;break}a[I]=1;J=C+1|0;c[G+(C<<2)>>2]=c[B>>2];I=c[D>>2]|0;if((a[I+(s<<4)+12|0]|0)==0){e:do{if((a[H+8|0]|0)==0|(m|0)<1){K=1}else{L=c[z>>2]|0;M=0;while(1){N=M+1|0;if((H|0)==(c[L+(M*12|0)>>2]|0)){break}if((N|0)<(m|0)){M=N}else{K=1;break e}}K=a[L+(M*12|0)+4|0]|0}}while(0);N=Rd(b,e,K,c[I+(s<<4)+4>>2]|0,c[I+(s<<4)+8>>2]|0,o)|0;if((N|0)!=0){F=N;q=161;break}N=c[t>>2]|0;do{if(K<<24>>24==0){if((N|0)==(c[r>>2]|0)){O=N;break}P=N-1|0;if((a[P]|0)!=32){O=N;break}c[t>>2]=P;O=P}else{O=N}}while(0);if((O|0)==(c[u>>2]|0)){if((Bd(o)|0)<<24>>24==0){F=1;q=161;break}Q=c[t>>2]|0}else{Q=O}c[t>>2]=Q+1;a[Q]=0;c[G+(J<<2)>>2]=c[r>>2]}else{N=c[I+(s<<4)+8>>2]|0;c[k>>2]=c[I+(s<<4)+4>>2];if((c[t>>2]|0)==0){if((Bd(o)|0)<<24>>24==0){q=55;break}}while(1){Bc[c[w>>2]&63](e,k,N,t,c[u>>2]|0);if((c[k>>2]|0)==(N|0)){break}if((Bd(o)|0)<<24>>24==0){q=55;break d}}if((c[r>>2]|0)==0){q=55;break}N=c[t>>2]|0;if((N|0)==(c[u>>2]|0)){if((Bd(o)|0)<<24>>24==0){q=55;break}R=c[t>>2]|0}else{R=N}c[t>>2]=R+1;a[R]=0;N=c[r>>2]|0;c[G+(J<<2)>>2]=N;if((N|0)==0){F=1;q=161;break}}c[r>>2]=c[t>>2];N=c[H+4>>2]|0;do{if((N|0)==0){S=C+2|0;T=x}else{if((a[H+9|0]|0)==0){a[(c[B>>2]|0)-1|0]=2;S=C+2|0;T=x+1|0;break}else{I=Dd(b,N,H,c[G+(J<<2)>>2]|0,h)|0;if((I|0)==0){S=C;T=x;break}else{F=I;q=161;break d}}}}while(0);H=s+1|0;if((H|0)>=(A|0)){U=T;V=S;break c}x=T;s=H;C=S;y=c[D>>2]|0}if((q|0)==30){if((c[b+144>>2]|0)!=(e|0)){F=8;i=j;return F|0}c[b+272>>2]=c[(c[D>>2]|0)+(s<<4)>>2];F=8;i=j;return F|0}else if((q|0)==55){c[G+(J<<2)>>2]=0;F=1;i=j;return F|0}else if((q|0)==161){i=j;return F|0}}else{U=0;V=0}}while(0);c[b+368>>2]=V;J=c[E+8>>2]|0;f:do{if((J|0)==0){q=70}else{D=c[J>>2]|0;if((a[D-1|0]|0)==0){q=70;break}if((V|0)>0){W=0}else{break}while(1){e=W+2|0;if((c[G+(W<<2)>>2]|0)==(D|0)){break}if((e|0)<(V|0)){W=e}else{break f}}c[b+372>>2]=W}}while(0);if((q|0)==70){c[b+372>>2]=-1}g:do{if((m|0)>0){W=E+20|0;J=U;D=0;s=V;h:while(1){e=c[W>>2]|0;S=e+(D*12|0)|0;T=c[S>>2]|0;A=(c[T>>2]|0)-1|0;do{if((a[A]|0)==0){R=e+(D*12|0)+8|0;k=c[R>>2]|0;if((k|0)==0){X=s;Y=J;break}Q=c[T+4>>2]|0;if((Q|0)==0){a[A]=1;c[G+(s<<2)>>2]=c[c[S>>2]>>2];c[G+(s+1<<2)>>2]=c[R>>2];X=s+2|0;Y=J;break}if((a[T+9|0]|0)==0){a[A]=2;c[G+(s<<2)>>2]=c[c[S>>2]>>2];c[G+(s+1<<2)>>2]=c[R>>2];X=s+2|0;Y=J+1|0;break}else{R=Dd(b,Q,T,k,h)|0;if((R|0)==0){X=s;Y=J;break}else{F=R;break h}}}else{X=s;Y=J}}while(0);T=D+1|0;if((T|0)<(m|0)){J=Y;D=T;s=X}else{Z=Y;_=X;break g}}i=j;return F|0}else{Z=U;_=V}}while(0);c[G+(_<<2)>>2]=0;i:do{if((Z|0)==0){$=0}else{V=b+384|0;U=c[V>>2]|0;X=b+388|0;Y=a[X]|0;m=Y&255;do{if((Z<<1>>m|0)==0){s=1<<m;if((U|0)!=0){aa=U;ba=s;break}ca=s;da=b+380|0;q=89}else{s=Y;while(1){ea=s+1&255;if((Z>>(s&255)|0)==0){break}else{s=ea}}s=(ea&255)>>>0<3>>>0?3:ea;a[X]=s;D=s&255;s=b+380|0;J=Oc[c[b+16>>2]&255](c[s>>2]|0,12<<D)|0;if((J|0)==0){F=1;i=j;return F|0}else{c[s>>2]=J;ca=1<<D;da=s;q=89;break}}}while(0);if((q|0)==89){Y=ca;while(1){U=Y-1|0;c[(c[da>>2]|0)+(U*12|0)>>2]=-1;if((U|0)==0){aa=-1;ba=ca;break}else{Y=U}}}Y=aa-1|0;c[V>>2]=Y;if((_|0)<=0){$=0;break}U=b+472|0;m=l+48|0;s=l+40|0;D=l+44|0;J=b+400|0;W=b+412|0;T=b+408|0;S=ba-1|0;A=b+380|0;e=b+233|0;R=b+416|0;k=b+456|0;Q=-ba|0;O=S>>>2;K=Z;f=0;j:while(1){y=G+(f<<2)|0;C=c[y>>2]|0;x=C-1|0;if((a[x]|0)==2){t=c[U>>2]|0;a[x]=0;r=c[m>>2]|0;o=c[U>>2]|0;u=a[C]|0;if(u<<24>>24==0){fa=o}else{w=C;z=o;o=u;while(1){v=w+1|0;p=(z*1000003|0)^o&255;H=a[v]|0;if(H<<24>>24==0){fa=p;break}else{w=v;z=p;o=H}}}o=r-1|0;z=c[s>>2]|0;w=fa&-r;H=o>>>2;p=0;v=fa&o;k:while(1){ga=c[z+(v<<2)>>2]|0;o=c[ga>>2]|0;if(u<<24>>24==(a[o]|0)){N=C;B=o;o=u;do{if(o<<24>>24==0){break k}N=N+1|0;B=B+1|0;o=a[N]|0;}while(o<<24>>24==(a[B]|0))}if(p<<24>>24==0){ha=(w>>>(((d[D]|0)-1|0)>>>0)&H|1)&255}else{ha=p}B=ha&255;p=ha;v=v-B+(v>>>0<B>>>0?r:0)|0}r=c[(c[ga+4>>2]|0)+4>>2]|0;if((r|0)==0){F=27;q=161;break}v=r+20|0;if((c[v>>2]|0)>0){p=r+16|0;H=0;w=t;while(1){u=a[(c[p>>2]|0)+H|0]|0;z=c[W>>2]|0;if((z|0)==(c[T>>2]|0)){if((Bd(J)|0)<<24>>24==0){F=1;q=161;break j}ia=c[W>>2]|0}else{ia=z}c[W>>2]=ia+1;a[ia]=u;z=u&255^(w*1000003|0);u=H+1|0;if((u|0)<(c[v>>2]|0)){H=u;w=z}else{ja=z;break}}}else{ja=t}w=C;while(1){H=w+1|0;if((a[w]|0)==58){ka=ja;la=H;break}else{w=H}}while(1){w=a[la]|0;C=c[W>>2]|0;if((C|0)==(c[T>>2]|0)){if((Bd(J)|0)<<24>>24==0){F=1;q=161;break j}ma=a[la]|0;na=c[W>>2]|0}else{ma=w;na=C}c[W>>2]=na+1;a[na]=ma;oa=w&255^(ka*1000003|0);if((a[la]|0)==0){break}else{ka=oa;la=la+1|0}}w=oa&S;C=c[A>>2]|0;if((c[C+(w*12|0)>>2]|0)==(Y|0)){t=oa&Q;H=w;v=0;while(1){if((oa|0)==(c[C+(H*12|0)+4>>2]|0)){p=c[R>>2]|0;z=c[C+(H*12|0)+8>>2]|0;u=a[p]|0;B=u<<24>>24==0;if(u<<24>>24!=(a[z]|0)|B){pa=B}else{B=p;p=z;while(1){z=B+1|0;u=p+1|0;o=a[z]|0;N=o<<24>>24==0;if(o<<24>>24!=(a[u]|0)|N){pa=N;break}else{B=z;p=u}}}if(pa){F=8;q=161;break j}}if(v<<24>>24==0){qa=(t>>>(((d[X]|0)-1|0)>>>0)&O|1)&255}else{qa=v}p=qa&255;B=H+((H|0)<(p|0)?ba:0)-p|0;if((c[C+(B*12|0)>>2]|0)==(Y|0)){H=B;v=qa}else{ra=B;break}}}else{ra=w}if((a[e]|0)!=0){a[(c[W>>2]|0)-1|0]=a[k]|0;v=c[c[r>>2]>>2]|0;while(1){H=c[W>>2]|0;if((H|0)==(c[T>>2]|0)){if((Bd(J)|0)<<24>>24==0){F=1;q=161;break j}sa=c[W>>2]|0}else{sa=H}H=a[v]|0;c[W>>2]=sa+1;a[sa]=H;if((a[v]|0)==0){break}else{v=v+1|0}}}v=c[R>>2]|0;c[R>>2]=c[W>>2];c[y>>2]=v;c[(c[A>>2]|0)+(ra*12|0)>>2]=Y;c[(c[A>>2]|0)+(ra*12|0)+4>>2]=oa;c[(c[A>>2]|0)+(ra*12|0)+8>>2]=v;v=K-1|0;if((v|0)==0){q=132;break}else{ta=v}}else{a[x]=0;ta=K}v=f+2|0;if((v|0)<(_|0)){K=ta;f=v}else{$=v;break i}}if((q|0)==132){$=f+2|0;break}else if((q|0)==161){i=j;return F|0}}}while(0);if(($|0)<(_|0)){q=$;do{a[(c[G+(q<<2)>>2]|0)-1|0]=0;q=q+2|0;}while((q|0)<(_|0))}_=c[h>>2]|0;if((_|0)!=0){h=_;do{a[(c[c[h+12>>2]>>2]|0)-1|0]=0;h=c[h+4>>2]|0;}while((h|0)!=0)}if((a[b+232|0]|0)==0){F=0;i=j;return F|0}h=c[E+4>>2]|0;do{if((h|0)==0){E=c[l+136>>2]|0;if((E|0)==0){F=0;i=j;return F|0}else{ua=E;va=c[n>>2]|0;break}}else{E=c[h+4>>2]|0;if((E|0)==0){F=27;i=j;return F|0}_=c[n>>2]|0;while(1){q=_+1|0;if((a[_]|0)==58){ua=E;va=q;break}else{_=q}}}}while(0);h=ua|0;do{if((a[b+233|0]|0)==0){wa=0}else{l=c[c[h>>2]>>2]|0;if((l|0)==0){wa=0;break}else{xa=0}while(1){_=xa+1|0;if((a[l+xa|0]|0)==0){wa=_;break}else{xa=_}}}}while(0);c[g+4>>2]=va;xa=ua+20|0;c[g+16>>2]=c[xa>>2];c[g+8>>2]=c[c[h>>2]>>2];c[g+20>>2]=wa;g=0;while(1){ya=g+1|0;if((a[va+g|0]|0)==0){break}else{g=ya}}l=c[xa>>2]|0;_=ya+wa+l|0;E=ua+24|0;if((_|0)>(c[E>>2]|0)){f=_+24|0;_=Ec[c[b+12>>2]&63](f)|0;if((_|0)==0){F=1;i=j;return F|0}c[E>>2]=f;f=ua+16|0;tF(_|0,c[f>>2]|0,c[xa>>2]|0)|0;E=c[b+348>>2]|0;if((E|0)!=0){q=E;do{E=q+12|0;if((c[E>>2]|0)==(c[f>>2]|0)){c[E>>2]=_}q=c[q>>2]|0;}while((q|0)!=0)}Cc[c[b+20>>2]&255](c[f>>2]|0);c[f>>2]=_;za=c[xa>>2]|0;Aa=_}else{za=l;Aa=c[ua+16>>2]|0}tF(Aa+za|0,va|0,ya)|0;if((wa|0)!=0){ya=za+g|0;a[Aa+ya|0]=a[b+456|0]|0;tF(Aa+(ya+1)|0,c[c[h>>2]>>2]|0,wa)|0}c[n>>2]=c[ua+16>>2];F=0;i=j;return F|0}function Jd(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;g=i;i=i+40|0;h=g|0;j=g+8|0;k=g+16|0;l=g+24|0;m=g+32|0;c[b+264>>2]=82;n=b+272|0;c[n>>2]=d;o=b+144|0;p=b+276|0;q=b+80|0;r=b+44|0;s=b+48|0;t=b+4|0;u=b+464|0;v=d;a:while(1){c[m>>2]=0;d=c[o>>2]|0;w=Sc[c[d>>2]&127](d,v,e,m)|0;x=c[m>>2]|0;c[p>>2]=x;b:do{switch(w|0){case-15:{y=3;break a;break};case-4:{y=11;break a;break};case 15:{d=c[q>>2]|0;if((d|0)==0){break b}z=c[o>>2]|0;c[h>>2]=v;if((a[z+68|0]|0)!=0){Tc[d&127](c[t>>2]|0,v,x-v|0);break b}d=z+56|0;do{c[j>>2]=c[r>>2];Bc[c[d>>2]&63](z,h,x,j,c[s>>2]|0);c[p>>2]=c[h>>2];A=c[r>>2]|0;Tc[c[q>>2]&127](c[t>>2]|0,A,(c[j>>2]|0)-A|0);c[n>>2]=c[h>>2];}while((c[h>>2]|0)!=(x|0));break};case 11:{if((Md(b,c[o>>2]|0,v,x)|0)==0){B=1;y=26;break a}break};case 13:{if((Nd(b,c[o>>2]|0,v,x)|0)==0){B=1;y=26;break a}break};case 0:{y=19;break a;break};case-1:{y=20;break a;break};case-2:{y=22;break a;break};default:{B=9;y=26;break a}}}while(0);C=c[m>>2]|0;c[n>>2]=C;w=c[u>>2]|0;if((w|0)==3){y=25;break}else if((w|0)==2){B=35;y=26;break}else{v=C}}if((y|0)==3){h=c[q>>2]|0;do{if((h|0)==0){D=x}else{j=c[o>>2]|0;c[k>>2]=v;if((a[j+68|0]|0)==0){e=j+56|0;do{c[l>>2]=c[r>>2];Bc[c[e>>2]&63](j,k,x,l,c[s>>2]|0);c[p>>2]=c[k>>2];w=c[r>>2]|0;Tc[c[q>>2]&127](c[t>>2]|0,w,(c[l>>2]|0)-w|0);c[n>>2]=c[k>>2];}while((c[k>>2]|0)!=(x|0))}else{Tc[h&127](c[t>>2]|0,v,x-v|0)}if((c[u>>2]|0)==2){B=35;i=g;return B|0}else{D=c[m>>2]|0;break}}}while(0);c[f>>2]=D;B=0;i=g;return B|0}else if((y|0)==11){c[f>>2]=v;B=0;i=g;return B|0}else if((y|0)==19){c[n>>2]=x;B=4;i=g;return B|0}else if((y|0)==20){if((a[b+468|0]|0)!=0){B=5;i=g;return B|0}c[f>>2]=v;B=0;i=g;return B|0}else if((y|0)==22){if((a[b+468|0]|0)!=0){B=6;i=g;return B|0}c[f>>2]=v;B=0;i=g;return B|0}else if((y|0)==25){c[f>>2]=C;B=0;i=g;return B|0}else if((y|0)==26){i=g;return B|0}return 0}function Kd(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0;j=i;i=i+80|0;k=j|0;l=j+8|0;m=j+16|0;n=j+24|0;o=j+32|0;p=j+40|0;q=j+48|0;r=j+56|0;s=j+64|0;t=j+72|0;u=c[e>>2]|0;c[q>>2]=u;v=b+144|0;if((c[v>>2]|0)==(d|0)){w=b+272|0;c[w>>2]=u;x=b+276|0;y=w;z=x;A=w;B=x;C=b+284|0}else{x=b+284|0;w=c[x>>2]|0;y=w|0;z=w+4|0;A=b+272|0;B=b+276|0;C=x}c[y>>2]=u;c[e>>2]=0;u=d+8|0;x=b+60|0;w=b+80|0;D=d+68|0;E=b+44|0;F=d+56|0;G=b+48|0;H=b+4|0;I=b+464|0;a:while(1){J=Sc[c[u>>2]&127](d,c[q>>2]|0,f,r)|0;c[z>>2]=c[r>>2];b:do{switch(J|0){case 40:{K=6;break a;break};case 7:{L=c[x>>2]|0;if((L|0)!=0){a[s]=10;Tc[L&127](c[H>>2]|0,s,1);break b}L=c[w>>2]|0;if((L|0)==0){break b}M=c[q>>2]|0;N=c[r>>2]|0;c[m>>2]=M;if((a[D]|0)!=0){Tc[L&127](c[H>>2]|0,M,N-M|0);break b}if((c[v>>2]|0)==(d|0)){O=B;P=A}else{M=c[C>>2]|0;O=M+4|0;P=M|0}do{c[n>>2]=c[E>>2];Bc[c[F>>2]&63](d,m,N,n,c[G>>2]|0);c[O>>2]=c[m>>2];M=c[E>>2]|0;Tc[c[w>>2]&127](c[H>>2]|0,M,(c[n>>2]|0)-M|0);c[P>>2]=c[m>>2];}while((c[m>>2]|0)!=(N|0));break};case 6:{N=c[x>>2]|0;if((N|0)!=0){if((a[D]|0)!=0){M=c[q>>2]|0;Tc[N&127](c[H>>2]|0,M,(c[r>>2]|0)-M|0);break b}while(1){c[t>>2]=c[E>>2];Bc[c[F>>2]&63](d,q,c[r>>2]|0,t,c[G>>2]|0);c[z>>2]=c[r>>2];M=c[E>>2]|0;Tc[N&127](c[H>>2]|0,M,(c[t>>2]|0)-M|0);M=c[q>>2]|0;if((M|0)==(c[r>>2]|0)){break b}c[y>>2]=M}}N=c[w>>2]|0;if((N|0)==0){break b}M=c[q>>2]|0;L=c[r>>2]|0;c[k>>2]=M;if((a[D]|0)!=0){Tc[N&127](c[H>>2]|0,M,L-M|0);break b}if((c[v>>2]|0)==(d|0)){Q=B;R=A}else{M=c[C>>2]|0;Q=M+4|0;R=M|0}do{c[l>>2]=c[E>>2];Bc[c[F>>2]&63](d,k,L,l,c[G>>2]|0);c[Q>>2]=c[k>>2];M=c[E>>2]|0;Tc[c[w>>2]&127](c[H>>2]|0,M,(c[l>>2]|0)-M|0);c[R>>2]=c[k>>2];}while((c[k>>2]|0)!=(L|0));break};case 0:{K=37;break a;break};case-2:{K=38;break a;break};case-1:case-4:{K=40;break a;break};default:{K=42;break a}}}while(0);J=c[r>>2]|0;c[q>>2]=J;c[y>>2]=J;J=c[I>>2]|0;if((J|0)==3){K=44;break}else if((J|0)==2){S=35;K=45;break}}if((K|0)==6){k=c[b+76>>2]|0;do{if((k|0)==0){b=c[w>>2]|0;if((b|0)==0){break}R=c[q>>2]|0;l=c[r>>2]|0;c[o>>2]=R;if((a[D]|0)!=0){Tc[b&127](c[H>>2]|0,R,l-R|0);break}if((c[v>>2]|0)==(d|0)){T=B;U=A}else{R=c[C>>2]|0;T=R+4|0;U=R|0}do{c[p>>2]=c[E>>2];Bc[c[F>>2]&63](d,o,l,p,c[G>>2]|0);c[T>>2]=c[o>>2];R=c[E>>2]|0;Tc[c[w>>2]&127](c[H>>2]|0,R,(c[p>>2]|0)-R|0);c[U>>2]=c[o>>2];}while((c[o>>2]|0)!=(l|0))}else{Cc[k&255](c[H>>2]|0)}}while(0);H=c[r>>2]|0;c[e>>2]=H;c[g>>2]=H;S=(c[I>>2]|0)==2?35:0;i=j;return S|0}else if((K|0)==37){c[y>>2]=c[r>>2];S=4;i=j;return S|0}else if((K|0)==38){if(h<<24>>24==0){S=6;i=j;return S|0}c[g>>2]=c[q>>2];S=0;i=j;return S|0}else if((K|0)==40){if(h<<24>>24==0){S=20;i=j;return S|0}c[g>>2]=c[q>>2];S=0;i=j;return S|0}else if((K|0)==42){c[y>>2]=c[r>>2];S=23;i=j;return S|0}else if((K|0)==44){c[g>>2]=c[r>>2];S=0;i=j;return S|0}else if((K|0)==45){i=j;return S|0}return 0}function Ld(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;g=i;i=i+8|0;h=g|0;c[h>>2]=d;d=b+144|0;j=b+468|0;k=Kd(b,c[d>>2]|0,h,e,f,(a[j]|0)==0|0)|0;l=c[h>>2]|0;if((k|0)!=0|(l|0)==0){m=k;i=g;return m|0}k=b+264|0;if((c[b+460>>2]|0)==0){c[k>>2]=6;h=Gd(b,0,c[d>>2]|0,l,e,f,(a[j]|0)==0|0)|0;if((h|0)!=0){m=h;i=g;return m|0}h=b+16|0;n=c[b+348>>2]|0;if((n|0)==0){m=0;i=g;return m|0}else{o=n}while(1){n=(c[o+24>>2]|0)+1|0;p=o+36|0;q=c[p>>2]|0;r=q+n|0;s=o+4|0;t=c[s>>2]|0;if((t|0)==(r|0)){m=0;u=25;break}v=o+8|0;w=c[v>>2]|0;x=w+n|0;y=o+40|0;if((x|0)>((c[y>>2]|0)-q|0)){z=Oc[c[h>>2]&255](q,x)|0;if((z|0)==0){m=1;u=25;break}q=o+12|0;A=c[p>>2]|0;if((c[q>>2]|0)==(A|0)){c[q>>2]=z}q=o+16|0;B=c[q>>2]|0;if((B|0)!=0){c[q>>2]=z+(B-A)}c[p>>2]=z;c[y>>2]=z+x;C=z+n|0;D=c[s>>2]|0;E=c[v>>2]|0}else{C=r;D=t;E=w}tF(C|0,D|0,E)|0;c[s>>2]=C;s=c[o>>2]|0;if((s|0)==0){m=0;u=25;break}else{o=s}}if((u|0)==25){i=g;return m|0}}else{c[k>>2]=2;k=Gd(b,1,c[d>>2]|0,l,e,f,(a[j]|0)==0|0)|0;if((k|0)!=0){m=k;i=g;return m|0}k=b+16|0;j=c[b+348>>2]|0;if((j|0)==0){m=0;i=g;return m|0}else{F=j}while(1){j=(c[F+24>>2]|0)+1|0;b=F+36|0;f=c[b>>2]|0;e=f+j|0;l=F+4|0;d=c[l>>2]|0;if((d|0)==(e|0)){m=0;u=25;break}o=F+8|0;C=c[o>>2]|0;E=C+j|0;D=F+40|0;if((E|0)>((c[D>>2]|0)-f|0)){h=Oc[c[k>>2]&255](f,E)|0;if((h|0)==0){m=1;u=25;break}f=F+12|0;s=c[b>>2]|0;if((c[f>>2]|0)==(s|0)){c[f>>2]=h}f=F+16|0;w=c[f>>2]|0;if((w|0)!=0){c[f>>2]=h+(w-s)}c[b>>2]=h;c[D>>2]=h+E;G=h+j|0;H=c[l>>2]|0;I=c[o>>2]|0}else{G=e;H=d;I=C}tF(G|0,H|0,I)|0;c[l>>2]=G;l=c[F>>2]|0;if((l|0)==0){m=0;u=25;break}else{F=l}}if((u|0)==25){i=g;return m|0}}return 0}function Md(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;g=i;i=i+32|0;h=g|0;j=g+8|0;k=g+16|0;l=g+24|0;m=b+64|0;if((c[m>>2]|0)==0){n=b+80|0;o=c[n>>2]|0;if((o|0)==0){p=1;i=g;return p|0}c[k>>2]=e;if((a[d+68|0]|0)!=0){Tc[o&127](c[b+4>>2]|0,e,f-e|0);p=1;i=g;return p|0}if((c[b+144>>2]|0)==(d|0)){q=b+276|0;r=b+272|0}else{o=c[b+284>>2]|0;q=o+4|0;r=o|0}o=b+44|0;s=d+56|0;t=b+48|0;u=b+4|0;while(1){c[l>>2]=c[o>>2];Bc[c[s>>2]&63](d,k,f,l,c[t>>2]|0);c[q>>2]=c[k>>2];v=c[o>>2]|0;Tc[c[n>>2]&127](c[u>>2]|0,v,(c[l>>2]|0)-v|0);c[r>>2]=c[k>>2];if((c[k>>2]|0)==(f|0)){p=1;break}}i=g;return p|0}k=d+64|0;r=c[k>>2]<<1;l=e+r|0;u=e+((Oc[c[d+28>>2]&255](d,l)|0)+r)|0;r=b+400|0;c[j>>2]=l;l=b+412|0;do{if((c[l>>2]|0)==0){if((Bd(r)|0)<<24>>24==0){p=0}else{break}i=g;return p|0}}while(0);e=d+56|0;n=b+408|0;while(1){Bc[c[e>>2]&63](d,j,u,l,c[n>>2]|0);if((c[j>>2]|0)==(u|0)){break}if((Bd(r)|0)<<24>>24==0){p=0;w=41;break}}if((w|0)==41){i=g;return p|0}j=b+416|0;if((c[j>>2]|0)==0){p=0;i=g;return p|0}o=c[l>>2]|0;do{if((o|0)==(c[n>>2]|0)){if((Bd(r)|0)<<24>>24==0){p=0;i=g;return p|0}else{x=c[l>>2]|0;break}}else{x=o}}while(0);c[l>>2]=x+1;a[x]=0;x=c[j>>2]|0;if((x|0)==0){p=0;i=g;return p|0}c[j>>2]=c[l>>2];o=Oc[c[d+32>>2]&255](d,u)|0;u=f+(-(c[k>>2]<<1)|0)|0;c[h>>2]=o;do{if((c[l>>2]|0)==0){if((Bd(r)|0)<<24>>24==0){p=0}else{break}i=g;return p|0}}while(0);while(1){Bc[c[e>>2]&63](d,h,u,l,c[n>>2]|0);if((c[h>>2]|0)==(u|0)){break}if((Bd(r)|0)<<24>>24==0){p=0;w=41;break}}if((w|0)==41){i=g;return p|0}if((c[j>>2]|0)==0){p=0;i=g;return p|0}u=c[l>>2]|0;do{if((u|0)==(c[n>>2]|0)){if((Bd(r)|0)<<24>>24==0){p=0;i=g;return p|0}else{y=c[l>>2]|0;break}}else{y=u}}while(0);c[l>>2]=y+1;a[y]=0;y=c[j>>2]|0;if((y|0)==0){p=0;i=g;return p|0}else{z=y}while(1){u=a[z]|0;if((u<<24>>24|0)==13){A=z;B=z;C=13;w=31;break}else if((u<<24>>24|0)==0){break}z=z+1|0}if((w|0)==31){while(1){w=0;if(C<<24>>24==13){a[A]=10;z=B+1|0;D=(a[z]|0)==10?B+2|0:z}else{a[A]=C;D=B+1|0}E=A+1|0;z=a[D]|0;if(z<<24>>24==0){break}else{A=E;B=D;C=z;w=31}}a[E]=0}Tc[c[m>>2]&127](c[b+4>>2]|0,x,y);y=b+404|0;b=c[y>>2]|0;x=r|0;r=c[x>>2]|0;do{if((b|0)==0){c[y>>2]=r}else{if((r|0)==0){break}else{F=r;G=b}while(1){m=F|0;E=c[m>>2]|0;c[m>>2]=G;c[y>>2]=F;if((E|0)==0){break}else{G=F;F=E}}}}while(0);c[x>>2]=0;c[j>>2]=0;c[l>>2]=0;c[n>>2]=0;p=1;i=g;return p|0}function Nd(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;g=i;i=i+24|0;h=g|0;j=g+8|0;k=g+16|0;l=b+68|0;if((c[l>>2]|0)==0){m=b+80|0;n=c[m>>2]|0;if((n|0)==0){o=1;i=g;return o|0}c[j>>2]=e;if((a[d+68|0]|0)!=0){Tc[n&127](c[b+4>>2]|0,e,f-e|0);o=1;i=g;return o|0}if((c[b+144>>2]|0)==(d|0)){p=b+276|0;q=b+272|0}else{n=c[b+284>>2]|0;p=n+4|0;q=n|0}n=b+44|0;r=d+56|0;s=b+48|0;t=b+4|0;while(1){c[k>>2]=c[n>>2];Bc[c[r>>2]&63](d,j,f,k,c[s>>2]|0);c[p>>2]=c[j>>2];u=c[n>>2]|0;Tc[c[m>>2]&127](c[t>>2]|0,u,(c[k>>2]|0)-u|0);c[q>>2]=c[j>>2];if((c[j>>2]|0)==(f|0)){o=1;break}}i=g;return o|0}j=b+400|0;q=c[d+64>>2]|0;k=f+(q*-3|0)|0;c[h>>2]=e+(q<<2);q=b+412|0;do{if((c[q>>2]|0)==0){if((Bd(j)|0)<<24>>24==0){o=0}else{break}i=g;return o|0}}while(0);e=d+56|0;f=b+408|0;while(1){Bc[c[e>>2]&63](d,h,k,q,c[f>>2]|0);if((c[h>>2]|0)==(k|0)){break}if((Bd(j)|0)<<24>>24==0){o=0;v=32;break}}if((v|0)==32){i=g;return o|0}k=b+416|0;if((c[k>>2]|0)==0){o=0;i=g;return o|0}h=c[q>>2]|0;do{if((h|0)==(c[f>>2]|0)){if((Bd(j)|0)<<24>>24==0){o=0;i=g;return o|0}else{w=c[q>>2]|0;break}}else{w=h}}while(0);c[q>>2]=w+1;a[w]=0;w=c[k>>2]|0;if((w|0)==0){o=0;i=g;return o|0}else{x=w}while(1){h=a[x]|0;if((h<<24>>24|0)==13){y=x;z=x;A=13;v=22;break}else if((h<<24>>24|0)==0){break}x=x+1|0}if((v|0)==22){while(1){v=0;if(A<<24>>24==13){a[y]=10;x=z+1|0;B=(a[x]|0)==10?z+2|0:x}else{a[y]=A;B=z+1|0}C=y+1|0;x=a[B]|0;if(x<<24>>24==0){break}else{y=C;z=B;A=x;v=22}}a[C]=0}Dc[c[l>>2]&63](c[b+4>>2]|0,w);w=b+404|0;b=c[w>>2]|0;l=j|0;j=c[l>>2]|0;do{if((b|0)==0){c[w>>2]=j}else{if((j|0)==0){break}else{D=j;E=b}while(1){C=D|0;v=c[C>>2]|0;c[C>>2]=E;c[w>>2]=D;if((v|0)==0){break}else{E=D;D=v}}}}while(0);c[l>>2]=0;c[k>>2]=0;c[q>>2]=0;c[f>>2]=0;o=1;i=g;return o|0}function Od(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=Gd(b,0,c[b+144>>2]|0,d,e,f,(a[b+468|0]|0)==0|0)|0;do{if((g|0)==0){if((Hd(b)|0)<<24>>24==0){h=1}else{break}return h|0}}while(0);h=g;return h|0}function Pd(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;e=c[b+340>>2]|0;f=d|0;g=e+80|0;h=e+92|0;i=e+88|0;j=e+60|0;k=e+96|0;e=d+4|0;d=c[f>>2]|0;a:while(1){l=a[d]|0;if((l<<24>>24|0)==0){m=1;n=17;break}else if((l<<24>>24|0)==58){l=c[f>>2]|0;o=c[h>>2]|0;p=(o|0)==(c[i>>2]|0);if((l|0)==(d|0)){q=p;r=o}else{s=l;l=p;p=o;while(1){if(l){if((Bd(g)|0)<<24>>24==0){m=0;n=17;break a}t=c[h>>2]|0}else{t=p}o=a[s]|0;c[h>>2]=t+1;a[t]=o;o=s+1|0;u=c[h>>2]|0;v=(u|0)==(c[i>>2]|0);if((o|0)==(d|0)){q=v;r=u;break}else{s=o;l=v;p=u}}}if(q){if((Bd(g)|0)<<24>>24==0){m=0;n=17;break}w=c[h>>2]|0}else{w=r}c[h>>2]=w+1;a[w]=0;p=Cd(b,j,c[k>>2]|0,8)|0;if((p|0)==0){m=0;n=17;break}l=c[k>>2]|0;if((c[p>>2]|0)==(l|0)){c[k>>2]=c[h>>2]}else{c[h>>2]=l}c[e>>2]=p}d=d+1|0}if((n|0)==17){return m|0}return 0}function Qd(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;g=i;i=i+8|0;h=g|0;j=c[b+340>>2]|0;k=j+80|0;l=j+92|0;m=c[l>>2]|0;n=j+88|0;do{if((m|0)==(c[n>>2]|0)){if((Bd(k)|0)<<24>>24==0){o=0;i=g;return o|0}else{p=c[l>>2]|0;break}}else{p=m}}while(0);c[l>>2]=p+1;a[p]=0;c[h>>2]=e;do{if((c[l>>2]|0)==0){if((Bd(k)|0)<<24>>24==0){o=0}else{break}i=g;return o|0}}while(0);e=d+56|0;while(1){Bc[c[e>>2]&63](d,h,f,l,c[n>>2]|0);if((c[h>>2]|0)==(f|0)){break}if((Bd(k)|0)<<24>>24==0){o=0;q=39;break}}if((q|0)==39){i=g;return o|0}f=j+96|0;if((c[f>>2]|0)==0){o=0;i=g;return o|0}h=c[l>>2]|0;do{if((h|0)==(c[n>>2]|0)){if((Bd(k)|0)<<24>>24==0){o=0;i=g;return o|0}else{r=c[l>>2]|0;break}}else{r=h}}while(0);c[l>>2]=r+1;a[r]=0;r=c[f>>2]|0;if((r|0)==0){o=0;i=g;return o|0}h=r+1|0;d=Cd(b,j+40|0,h,12)|0;e=d;if((d|0)==0){o=0;i=g;return o|0}if((c[d>>2]|0)!=(h|0)){c[l>>2]=c[f>>2];o=e;i=g;return o|0}p=c[l>>2]|0;c[f>>2]=p;if((a[b+232|0]|0)==0){o=e;i=g;return o|0}do{if((a[h]|0)==120){if((a[r+2|0]|0)!=109){s=0;break}if((a[r+3|0]|0)!=108){s=0;break}if((a[r+4|0]|0)!=110){s=0;break}if((a[r+5|0]|0)!=115){s=0;break}m=a[r+6|0]|0;if((m<<24>>24|0)==0){c[d+4>>2]=j+132}else if((m<<24>>24|0)==58){c[d+4>>2]=Cd(b,j+60|0,r+7|0,8)|0}else{s=0;break}a[e+9|0]=1;o=e;i=g;return o|0}else{s=0}}while(0);while(1){h=s+1|0;m=a[r+h|0]|0;if((m<<24>>24|0)==58){break}else if((m<<24>>24|0)==0){o=e;q=39;break}else{s=h}}if((q|0)==39){i=g;return o|0}q=(p|0)==(c[n>>2]|0);a:do{if((s|0)>0){h=0;m=q;t=p;while(1){if(m){if((Bd(k)|0)<<24>>24==0){o=0;break}u=c[l>>2]|0}else{u=t}v=h+1|0;w=a[r+v|0]|0;c[l>>2]=u+1;a[u]=w;w=c[l>>2]|0;x=(w|0)==(c[n>>2]|0);if((v|0)<(s|0)){h=v;m=x;t=w}else{y=x;z=w;break a}}i=g;return o|0}else{y=q;z=p}}while(0);do{if(y){if((Bd(k)|0)<<24>>24==0){o=0;i=g;return o|0}else{A=c[l>>2]|0;break}}else{A=z}}while(0);c[l>>2]=A+1;a[A]=0;A=Cd(b,j+60|0,c[f>>2]|0,8)|0;c[d+4>>2]=A;d=c[f>>2]|0;if((c[A>>2]|0)==(d|0)){c[f>>2]=c[l>>2];o=e;i=g;return o|0}else{c[l>>2]=d;o=e;i=g;return o|0}return 0}function Rd(b,e,f,g,h,j){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0;k=i;i=i+32|0;l=k|0;m=k+8|0;n=k+16|0;o=k+24|0;p=c[b+340>>2]|0;q=e+12|0;r=e+40|0;s=f<<24>>24==0;t=j+12|0;u=j+16|0;v=o|0;w=j+8|0;x=e+56|0;y=e+64|0;z=e+44|0;A=b+424|0;B=b+436|0;C=b+432|0;D=b+440|0;E=p+8|0;F=(p+80|0)==(j|0);G=p+130|0;H=p+129|0;I=b+284|0;J=b+224|0;K=b+472|0;L=p|0;M=p+4|0;p=g;a:while(1){b:do{switch(Sc[c[q>>2]&127](e,p,h,n)|0){case 10:{g=Oc[c[r>>2]&255](e,p)|0;if((g|0)<0){N=8;break a}if(s&(g|0)==32){O=c[t>>2]|0;if((O|0)==(c[u>>2]|0)){break b}if((a[O-1|0]|0)==32){break b}}O=Re(g,v)|0;if((O|0)==0){N=15;break a}if((O|0)>0){P=0}else{break b}do{g=c[t>>2]|0;if((g|0)==(c[w>>2]|0)){if((Bd(j)|0)<<24>>24==0){Q=1;N=84;break a}R=c[t>>2]|0}else{R=g}g=a[o+P|0]|0;c[t>>2]=R+1;a[R]=g;P=P+1|0;}while((P|0)<(O|0));break};case 6:{O=c[n>>2]|0;c[m>>2]=p;if((c[t>>2]|0)==0){if((Bd(j)|0)<<24>>24==0){Q=1;N=84;break a}}while(1){Bc[c[x>>2]&63](e,m,O,t,c[w>>2]|0);if((c[m>>2]|0)==(O|0)){break}if((Bd(j)|0)<<24>>24==0){Q=1;N=84;break a}}if((c[u>>2]|0)==0){Q=1;N=84;break a}break};case-3:{c[n>>2]=p+(c[y>>2]|0);N=27;break};case 39:case 7:{N=27;break};case 9:{O=c[y>>2]|0;g=(Hc[c[z>>2]&63](e,p+O|0,(c[n>>2]|0)+(-O|0)|0)|0)&255;if(g<<24>>24!=0){O=c[t>>2]|0;if((O|0)==(c[w>>2]|0)){if((Bd(j)|0)<<24>>24==0){Q=1;N=84;break a}S=c[t>>2]|0}else{S=O}c[t>>2]=S+1;a[S]=g;break b}g=c[y>>2]|0;O=(c[n>>2]|0)+(-g|0)|0;c[l>>2]=p+g;if((c[B>>2]|0)==0){if((Bd(A)|0)<<24>>24==0){Q=1;N=84;break a}}while(1){Bc[c[x>>2]&63](e,l,O,B,c[C>>2]|0);if((c[l>>2]|0)==(O|0)){break}if((Bd(A)|0)<<24>>24==0){Q=1;N=84;break a}}if((c[D>>2]|0)==0){Q=1;N=84;break a}O=c[B>>2]|0;if((O|0)==(c[C>>2]|0)){if((Bd(A)|0)<<24>>24==0){Q=1;N=84;break a}T=c[B>>2]|0}else{T=O}c[B>>2]=T+1;a[T]=0;O=c[D>>2]|0;if((O|0)==0){Q=1;N=84;break a}g=c[E>>2]|0;c:do{if((g|0)==0){U=0}else{V=c[K>>2]|0;W=a[O]|0;if(W<<24>>24==0){X=V}else{Y=O;Z=V;V=W;while(1){_=Y+1|0;$=(Z*1000003|0)^V&255;aa=a[_]|0;if(aa<<24>>24==0){X=$;break}else{Y=_;Z=$;V=aa}}}V=g-1|0;Z=X&V;Y=c[L>>2]|0;aa=c[Y+(Z<<2)>>2]|0;if((aa|0)==0){U=0;break}$=X&-g;_=V>>>2;V=0;ba=Z;Z=aa;while(1){aa=c[Z>>2]|0;if(W<<24>>24==(a[aa]|0)){ca=O;da=aa;aa=W;do{if(aa<<24>>24==0){U=Z;break c}ca=ca+1|0;da=da+1|0;aa=a[ca]|0;}while(aa<<24>>24==(a[da]|0))}if(V<<24>>24==0){ea=($>>>(((d[M]|0)-1|0)>>>0)&_|1)&255}else{ea=V}da=ea&255;aa=(ba>>>0<da>>>0?g:0)+(ba-da)|0;da=c[Y+(aa<<2)>>2]|0;if((da|0)==0){U=0;break}else{V=ea;ba=aa;Z=da}}}}while(0);g=U;c[B>>2]=O;do{if(F){if((a[G]|0)==0){fa=(a[H]|0)!=0}else{fa=(c[I>>2]|0)!=0}ga=fa&1^1;N=67}else{if((a[H]|0)==0){if((U|0)==0){Q=11;N=84;break a}else{N=69;break}}else{ga=(a[G]|0)!=0|0;N=67;break}}}while(0);do{if((N|0)==67){N=0;O=(U|0)!=0;if(ga<<24>>24==0){if(O){break}else{break b}}else{if(O){N=69;break}else{Q=11;N=84;break a}}}}while(0);if((N|0)==69){N=0;if((a[g+34|0]|0)==0){Q=24;N=84;break a}}O=U+32|0;if((a[O]|0)!=0){N=72;break a}if((c[U+28>>2]|0)!=0){N=75;break a}Z=c[U+4>>2]|0;if((Z|0)==0){N=78;break a}ba=Z+(c[U+8>>2]|0)|0;a[O]=1;V=Rd(b,c[J>>2]|0,f,Z,ba,j)|0;a[O]=0;if((V|0)!=0){Q=V;N=84;break a}break};case-4:{Q=0;N=84;break a;break};case-1:{N=5;break a;break};case 0:{N=3;break a;break};default:{N=81;break a}}}while(0);do{if((N|0)==27){N=0;V=c[t>>2]|0;if(s){if((V|0)==(c[u>>2]|0)){break}if((a[V-1|0]|0)==32){break}}if((V|0)==(c[w>>2]|0)){if((Bd(j)|0)<<24>>24==0){Q=1;N=84;break a}ha=c[t>>2]|0}else{ha=V}c[t>>2]=ha+1;a[ha]=32}}while(0);p=c[n>>2]|0}if((N|0)==3){if((c[b+144>>2]|0)!=(e|0)){Q=4;i=k;return Q|0}c[b+272>>2]=c[n>>2];Q=4;i=k;return Q|0}else if((N|0)==5){if((c[b+144>>2]|0)!=(e|0)){Q=4;i=k;return Q|0}c[b+272>>2]=p;Q=4;i=k;return Q|0}else if((N|0)==8){if((c[b+144>>2]|0)!=(e|0)){Q=14;i=k;return Q|0}c[b+272>>2]=p;Q=14;i=k;return Q|0}else if((N|0)==15){if((c[b+144>>2]|0)!=(e|0)){Q=14;i=k;return Q|0}c[b+272>>2]=p;Q=14;i=k;return Q|0}else if((N|0)==72){if((c[b+144>>2]|0)!=(e|0)){Q=12;i=k;return Q|0}c[b+272>>2]=p;Q=12;i=k;return Q|0}else if((N|0)==75){if((c[b+144>>2]|0)!=(e|0)){Q=15;i=k;return Q|0}c[b+272>>2]=p;Q=15;i=k;return Q|0}else if((N|0)==78){if((c[b+144>>2]|0)!=(e|0)){Q=16;i=k;return Q|0}c[b+272>>2]=p;Q=16;i=k;return Q|0}else if((N|0)==81){if((c[b+144>>2]|0)!=(e|0)){Q=23;i=k;return Q|0}c[b+272>>2]=p;Q=23;i=k;return Q|0}else if((N|0)==84){i=k;return Q|0}return 0}function Sd(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;g=i;i=i+8|0;h=g|0;j=b+284|0;k=c[j>>2]|0;if((k|0)==0){l=23;i=g;return l|0}m=c[k+12>>2]|0;n=m+4|0;o=c[n>>2]|0;p=m+12|0;q=o+(c[m+8>>2]|0)|0;r=Gd(b,c[k+16>>2]|0,c[b+224>>2]|0,o+(c[p>>2]|0)|0,q,h,0)|0;if((r|0)!=0){l=r;i=g;return l|0}r=c[h>>2]|0;do{if((q|0)!=(r|0)){if((c[b+464>>2]|0)!=3){break}c[p>>2]=r-(c[n>>2]|0);l=0;i=g;return l|0}}while(0);a[m+32|0]=0;m=k+8|0;c[j>>2]=c[m>>2];j=b+288|0;c[m>>2]=c[j>>2];c[j>>2]=k;c[b+264>>2]=6;l=Gd(b,(c[b+460>>2]|0)!=0|0,c[b+144>>2]|0,d,e,f,(a[b+468|0]|0)==0|0)|0;i=g;return l|0}function Td(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;d=i;i=i+1040|0;e=d|0;f=c[a+124>>2]|0;if((f|0)==0){g=18;i=d;return g|0}vF(e|0,-1|0,1024)|0;h=e+1028|0;c[h>>2]=0;j=e+1024|0;c[j>>2]=0;k=e+1032|0;c[k>>2]=0;do{if((Hc[f&63](c[a+244>>2]|0,b,e)|0)!=0){l=c[a+12>>2]|0;m=Se()|0;n=Ec[l&63](m)|0;c[a+236>>2]=n;if((n|0)!=0){m=Te(n,e|0,c[h>>2]|0,c[j>>2]|0)|0;if((m|0)==0){break}c[a+240>>2]=c[j>>2];c[a+248>>2]=c[k>>2];c[a+144>>2]=m;g=0;i=d;return g|0}m=c[k>>2]|0;if((m|0)==0){g=1;i=d;return g|0}Cc[m&255](c[j>>2]|0);g=1;i=d;return g|0}}while(0);a=c[k>>2]|0;if((a|0)==0){g=18;i=d;return g|0}Cc[a&255](c[j>>2]|0);g=18;i=d;return g|0}function Ud(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;f=a+228|0;do{if((_e(a+148|0,a+144|0,c[f>>2]|0)|0)==0){g=Td(a,c[f>>2]|0)|0;if((g|0)==0){break}else{h=g}return h|0}}while(0);c[a+264>>2]=92;h=Vd(a,b,d,e)|0;return h|0}function Vd(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,_a=0,$a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,_b=0,$b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0;h=i;i=i+184|0;j=h|0;k=h+8|0;l=h+16|0;m=h+24|0;n=h+32|0;o=h+40|0;p=h+48|0;q=h+56|0;r=h+64|0;s=h+72|0;t=h+80|0;u=h+88|0;v=h+96|0;w=h+104|0;x=h+112|0;y=h+120|0;z=h+128|0;A=h+136|0;B=h+144|0;C=h+152|0;D=h+160|0;E=h+168|0;F=h+176|0;c[F>>2]=e;G=b+144|0;H=c[G>>2]|0;I=Sc[c[H>>2]&127](H,e,f,F)|0;H=c[G>>2]|0;J=b+468|0;K=a[J]|0;c[E>>2]=c[F>>2];F=b+340|0;L=c[F>>2]|0;M=b+272|0;N=b+276|0;O=b+284|0;P=K<<24>>24!=0;K=b+252|0;Q=K|0;R=b+80|0;S=b+44|0;T=b+48|0;U=b+4|0;V=b+464|0;W=b+84|0;X=b+308|0;Y=b+400|0;Z=b+412|0;_=b+408|0;$=b+416|0;aa=b+304|0;ba=b+312|0;ca=b+404|0;da=b+400|0;ea=L+129|0;fa=L+128|0;ga=b+300|0;ha=L+80|0;ia=L+92|0;ja=L+88|0;ka=L+96|0;la=b+136|0;ma=b+88|0;na=b+328|0;oa=b+132|0;pa=b+332|0;qa=b+336|0;ra=b+316|0;sa=b+337|0;ta=b+12|0;ua=b+16|0;va=z|0;wa=L+120|0;xa=L+116|0;ya=b+344|0;za=L+130|0;Aa=b+108|0;Ba=b+92|0;Ca=L|0;Da=b+460|0;Ea=b+324|0;Fa=b+320|0;Ga=b+96|0;Ha=b+256|0;Ia=b+452|0;Ja=b+448|0;Ka=L+140|0;La=L+160|0;Ma=L+164|0;Na=L+144|0;Oa=b+128|0;Pa=L+156|0;Qa=L+148|0;L=H;H=e;e=I;a:while(1){c[M>>2]=H;c[N>>2]=c[E>>2];b:do{if((e|0)<1){if(!((e|0)==0|P)){Ra=4;break a}switch(e|0){case 0:{Ra=6;break a;break};case-1:{Sa=5;Ra=486;break a;break};case-2:{Ra=487;break a;break};case-15:{Ta=15;break b;break};case-4:{Ua=3;Ra=488;break a;break};default:{}}c[E>>2]=f;Ta=-e|0}else{Ta=e}}while(0);I=Gc[c[Q>>2]&127](K,Ta,H,c[E>>2]|0,L)|0;c:do{switch(I|0){case 28:{c[ra>>2]=28928;Ra=121;break};case 29:{c[ra>>2]=28888;Ra=121;break};case 30:{c[ra>>2]=28872;Ra=121;break};case 5:{a[ea]=1;if((c[W>>2]|0)==0){Va=1}else{Wa=c[L+64>>2]|0;Xa=(c[E>>2]|0)+(-Wa|0)|0;c[w>>2]=H+Wa;if((c[Z>>2]|0)==0){if((Bd(Y)|0)<<24>>24==0){Ra=261;break a}}Wa=L+56|0;while(1){Bc[c[Wa>>2]&63](L,w,Xa,Z,c[_>>2]|0);if((c[w>>2]|0)==(Xa|0)){break}if((Bd(Y)|0)<<24>>24==0){Ra=261;break a}}if((c[$>>2]|0)==0){Ra=261;break a}Xa=c[Z>>2]|0;if((Xa|0)==(c[_>>2]|0)){if((Bd(Y)|0)<<24>>24==0){Ra=261;break a}Ya=c[Z>>2]|0}else{Ya=Xa}c[Z>>2]=Ya+1;a[Ya]=0;Xa=c[$>>2]|0;c[X>>2]=Xa;if((Xa|0)==0){Sa=1;Ra=486;break a}c[$>>2]=c[Z>>2];Va=0}if((a[za]|0)!=0){Za=Va;Ra=475;break c}Xa=c[Aa>>2]|0;if((Xa|0)==0){Za=Va;Ra=475;break c}if((Ec[Xa&63](c[U>>2]|0)|0)==0){Sa=22;Ra=486;break a}else{Za=Va;Ra=475}break};case 4:{if((c[W>>2]|0)==0){_a=1}else{Xa=c[E>>2]|0;c[D>>2]=H;if((c[Z>>2]|0)==0){if((Bd(Y)|0)<<24>>24==0){Ra=21;break a}}Wa=L+56|0;while(1){Bc[c[Wa>>2]&63](L,D,Xa,Z,c[_>>2]|0);if((c[D>>2]|0)==(Xa|0)){break}if((Bd(Y)|0)<<24>>24==0){Ra=21;break a}}if((c[$>>2]|0)==0){Ra=21;break a}Xa=c[Z>>2]|0;if((Xa|0)==(c[_>>2]|0)){if((Bd(Y)|0)<<24>>24==0){Ra=21;break a}$a=c[Z>>2]|0}else{$a=Xa}c[Z>>2]=$a+1;a[$a]=0;Xa=c[$>>2]|0;c[aa>>2]=Xa;if((Xa|0)==0){Sa=1;Ra=486;break a}c[$>>2]=c[Z>>2];c[ba>>2]=0;_a=0}c[X>>2]=0;Za=_a;Ra=475;break};case 1:{Xa=Ed(b,0,H,c[E>>2]|0)|0;if((Xa|0)!=0){Sa=Xa;Ra=486;break a}ab=c[G>>2]|0;break};case 34:{Xa=c[E>>2]|0;Wa=c[F>>2]|0;bb=Wa+80|0;c[l>>2]=H;cb=Wa+92|0;if((c[cb>>2]|0)==0){if((Bd(bb)|0)<<24>>24==0){Ra=109;break a}}db=L+56|0;eb=Wa+88|0;while(1){Bc[c[db>>2]&63](L,l,Xa,cb,c[eb>>2]|0);if((c[l>>2]|0)==(Xa|0)){break}if((Bd(bb)|0)<<24>>24==0){Ra=109;break a}}Xa=Wa+96|0;if((c[Xa>>2]|0)==0){Ra=109;break a}db=c[cb>>2]|0;if((db|0)==(c[eb>>2]|0)){if((Bd(bb)|0)<<24>>24==0){Ra=109;break a}fb=c[cb>>2]|0}else{fb=db}c[cb>>2]=fb+1;a[fb]=0;db=c[Xa>>2]|0;if((db|0)==0){Ra=109;break a}gb=Cd(b,Wa+20|0,db,24)|0;hb=gb;if((gb|0)==0){Ra=109;break a}if((c[gb>>2]|0)==(db|0)){c[Xa>>2]=c[cb>>2];if((Pd(b,hb)|0)==0){Ra=109;break a}}else{c[cb>>2]=c[Xa>>2]}c[na>>2]=hb;Ra=121;break};case 21:{if((Sc[c[L+52>>2]&127](L,H,c[E>>2]|0,M)|0)==0){Sa=32;Ra=486;break a}if((c[Fa>>2]|0)==0){Ra=476;break c}hb=c[L+64>>2]|0;Xa=(c[E>>2]|0)+(-hb|0)|0;c[r>>2]=H+hb;if((c[Z>>2]|0)==0){if((Bd(Y)|0)<<24>>24==0){Sa=1;Ra=486;break a}}hb=L+56|0;while(1){Bc[c[hb>>2]&63](L,r,Xa,Z,c[_>>2]|0);if((c[r>>2]|0)==(Xa|0)){break}if((Bd(Y)|0)<<24>>24==0){Ua=1;Ra=488;break a}}if((c[$>>2]|0)==0){Sa=1;Ra=486;break a}Xa=c[Z>>2]|0;if((Xa|0)==(c[_>>2]|0)){if((Bd(Y)|0)<<24>>24==0){Sa=1;Ra=486;break a}ib=c[Z>>2]|0}else{ib=Xa}c[Z>>2]=ib+1;a[ib]=0;Xa=c[$>>2]|0;if((Xa|0)==0){Sa=1;Ra=486;break a}hb=a[Xa]|0;do{if(hb<<24>>24==0){jb=Xa}else{cb=Xa;Wa=Xa;bb=hb;while(1){eb=bb<<24>>24;do{if((eb|0)==32|(eb|0)==13|(eb|0)==10){if((cb|0)==(Xa|0)){kb=Xa;break}if((a[cb-1|0]|0)==32){kb=cb;break}a[cb]=32;kb=cb+1|0}else{a[cb]=bb;kb=cb+1|0}}while(0);eb=Wa+1|0;db=a[eb]|0;if(db<<24>>24==0){break}else{cb=kb;Wa=eb;bb=db}}if((kb|0)==(Xa|0)){jb=Xa;break}bb=kb-1|0;jb=(a[bb]|0)==32?bb:kb}}while(0);a[jb]=0;c[Ea>>2]=Xa;c[$>>2]=c[Z>>2];ab=L;break};case 23:{a[qa]=1;c[ra>>2]=28944;Ra=121;break};case 37:case 38:{if((a[fa]|0)==0){Ra=476;break c}hb=a[qa]|0;bb=c[L+64>>2]|0;Wa=Rd(b,L,hb,H+bb|0,(c[E>>2]|0)+(-bb|0)|0,ha)|0;if((Wa|0)!=0){Sa=Wa;Ra=486;break a}Wa=c[ia>>2]|0;do{if(hb<<24>>24==0){if((Wa|0)==(c[ka>>2]|0)){lb=Wa;break}bb=Wa-1|0;if((a[bb]|0)!=32){lb=Wa;break}c[ia>>2]=bb;lb=bb}else{lb=Wa}}while(0);if((lb|0)==(c[ja>>2]|0)){if((Bd(ha)|0)<<24>>24==0){Sa=1;Ra=486;break a}mb=c[ia>>2]|0}else{mb=lb}c[ia>>2]=mb+1;a[mb]=0;Wa=c[ka>>2]|0;c[ka>>2]=c[ia>>2];hb=c[na>>2]|0;Xa=c[pa>>2]|0;bb=a[qa]|0;cb=hb+12|0;db=c[cb>>2]|0;d:do{if((Wa|0)!=0&(db|0)>0){eb=c[hb+20>>2]|0;gb=0;while(1){nb=gb+1|0;if((c[eb+(gb*12|0)>>2]|0)==(Xa|0)){break d}if((nb|0)<(db|0)){gb=nb}else{Ra=187;break}}}else{Ra=187}}while(0);if((Ra|0)==187){Ra=0;gb=hb+16|0;do{if((db|0)==(c[gb>>2]|0)){if((db|0)==0){c[gb>>2]=8;eb=Ec[c[ta>>2]&63](96)|0;nb=eb;c[hb+20>>2]=nb;if((eb|0)==0){Sa=1;Ra=486;break a}else{ob=nb;break}}nb=hb+20|0;eb=Oc[c[ua>>2]&255](c[nb>>2]|0,db*24|0)|0;if((eb|0)==0){Sa=1;Ra=486;break a}pb=eb;c[gb>>2]=db<<1;c[nb>>2]=pb;ob=pb}else{ob=c[hb+20>>2]|0}}while(0);hb=c[cb>>2]|0;c[ob+(hb*12|0)>>2]=Xa;c[ob+(hb*12|0)+8>>2]=Wa;a[ob+(hb*12|0)+4|0]=bb;if(bb<<24>>24==0){a[Xa+8|0]=1}c[cb>>2]=(c[cb>>2]|0)+1}if((c[oa>>2]|0)==0){Ra=476;break c}hb=c[ra>>2]|0;if((hb|0)==0){Ra=476;break c}db=a[hb]|0;if((db<<24>>24|0)==78){if((a[hb+1|0]|0)==79){Ra=200}}else if((db<<24>>24|0)==40){Ra=200}if((Ra|0)==200){Ra=0;db=c[Z>>2]|0;if((db|0)==(c[_>>2]|0)){if((Bd(Y)|0)<<24>>24==0){Sa=1;Ra=486;break a}qb=c[Z>>2]|0}else{qb=db}c[Z>>2]=qb+1;a[qb]=41;db=c[Z>>2]|0;if((db|0)==(c[_>>2]|0)){if((Bd(Y)|0)<<24>>24==0){Sa=1;Ra=486;break a}rb=c[Z>>2]|0}else{rb=db}c[Z>>2]=rb+1;a[rb]=0;c[ra>>2]=c[$>>2];c[$>>2]=c[Z>>2]}c[N>>2]=H;Ic[c[oa>>2]&15](c[U>>2]|0,c[c[na>>2]>>2]|0,c[c[pa>>2]>>2]|0,c[ra>>2]|0,Wa,(I|0)==38|0);db=c[ca>>2]|0;hb=c[da>>2]|0;do{if((db|0)==0){c[ca>>2]=hb}else{if((hb|0)==0){break}else{sb=hb;tb=db}while(1){gb=sb|0;pb=c[gb>>2]|0;c[gb>>2]=tb;c[ca>>2]=sb;if((pb|0)==0){break}else{tb=sb;sb=pb}}}}while(0);c[da>>2]=0;c[$>>2]=0;c[Z>>2]=0;c[_>>2]=0;ab=L;break};case 10:{c[ga>>2]=0;Ra=476;break};case 18:{c[Ea>>2]=0;c[Fa>>2]=0;if((c[Ga>>2]|0)==0){Ra=476;break c}db=c[E>>2]|0;c[s>>2]=H;if((c[Z>>2]|0)==0){if((Bd(Y)|0)<<24>>24==0){Ra=333;break a}}hb=L+56|0;while(1){Bc[c[hb>>2]&63](L,s,db,Z,c[_>>2]|0);if((c[s>>2]|0)==(db|0)){break}if((Bd(Y)|0)<<24>>24==0){Ra=333;break a}}if((c[$>>2]|0)==0){Ra=333;break a}db=c[Z>>2]|0;if((db|0)==(c[_>>2]|0)){if((Bd(Y)|0)<<24>>24==0){Ra=333;break a}ub=c[Z>>2]|0}else{ub=db}c[Z>>2]=ub+1;a[ub]=0;db=c[$>>2]|0;c[Fa>>2]=db;if((db|0)==0){Sa=1;Ra=486;break a}c[$>>2]=c[Z>>2];ab=L;break};case 6:{a[ea]=1;if((c[W>>2]|0)==0){Ra=53;break c}if((Sc[c[L+52>>2]&127](L,H,c[E>>2]|0,M)|0)==0){Sa=32;Ra=486;break a}db=c[L+64>>2]|0;hb=(c[E>>2]|0)+(-db|0)|0;c[C>>2]=H+db;if((c[Z>>2]|0)==0){if((Bd(Y)|0)<<24>>24==0){Sa=1;Ra=486;break a}}db=L+56|0;while(1){Bc[c[db>>2]&63](L,C,hb,Z,c[_>>2]|0);if((c[C>>2]|0)==(hb|0)){break}if((Bd(Y)|0)<<24>>24==0){Ua=1;Ra=488;break a}}if((c[$>>2]|0)==0){Sa=1;Ra=486;break a}hb=c[Z>>2]|0;if((hb|0)==(c[_>>2]|0)){if((Bd(Y)|0)<<24>>24==0){Sa=1;Ra=486;break a}vb=c[Z>>2]|0}else{vb=hb}c[Z>>2]=vb+1;a[vb]=0;hb=c[$>>2]|0;if((hb|0)==0){Sa=1;Ra=486;break a}db=a[hb]|0;do{if(db<<24>>24==0){wb=hb}else{Wa=hb;cb=hb;Xa=db;while(1){bb=Xa<<24>>24;do{if((bb|0)==32|(bb|0)==13|(bb|0)==10){if((Wa|0)==(hb|0)){xb=hb;break}if((a[Wa-1|0]|0)==32){xb=Wa;break}a[Wa]=32;xb=Wa+1|0}else{a[Wa]=Xa;xb=Wa+1|0}}while(0);bb=cb+1|0;pb=a[bb]|0;if(pb<<24>>24==0){break}else{Wa=xb;cb=bb;Xa=pb}}if((xb|0)==(hb|0)){wb=hb;break}Xa=xb-1|0;wb=(a[Xa]|0)==32?Xa:xb}}while(0);a[wb]=0;c[$>>2]=c[Z>>2];c[ba>>2]=hb;yb=0;Ra=54;break};case 19:{do{if((c[Fa>>2]|0)==0){zb=1}else{if((c[Ga>>2]|0)==0){zb=1;break}db=c[L+64>>2]|0;Xa=(c[E>>2]|0)+(-db|0)|0;c[q>>2]=H+db;if((c[Z>>2]|0)==0){if((Bd(Y)|0)<<24>>24==0){Sa=1;Ra=486;break a}}db=L+56|0;while(1){Bc[c[db>>2]&63](L,q,Xa,Z,c[_>>2]|0);if((c[q>>2]|0)==(Xa|0)){break}if((Bd(Y)|0)<<24>>24==0){Ua=1;Ra=488;break a}}if((c[$>>2]|0)==0){Sa=1;Ra=486;break a}Xa=c[Z>>2]|0;if((Xa|0)==(c[_>>2]|0)){if((Bd(Y)|0)<<24>>24==0){Sa=1;Ra=486;break a}Ab=c[Z>>2]|0}else{Ab=Xa}c[Z>>2]=Ab+1;a[Ab]=0;Xa=c[$>>2]|0;if((Xa|0)==0){Sa=1;Ra=486;break a}c[N>>2]=H;Bc[c[Ga>>2]&63](c[U>>2]|0,c[Fa>>2]|0,c[ya>>2]|0,Xa,c[Ea>>2]|0);zb=0}}while(0);hb=c[ca>>2]|0;Xa=c[da>>2]|0;do{if((hb|0)==0){c[ca>>2]=Xa}else{if((Xa|0)==0){break}else{Bb=Xa;Cb=hb}while(1){db=Bb|0;cb=c[db>>2]|0;c[db>>2]=Cb;c[ca>>2]=Bb;if((cb|0)==0){break}else{Cb=Bb;Bb=cb}}}}while(0);c[da>>2]=0;c[$>>2]=0;c[Z>>2]=0;c[_>>2]=0;Za=zb;Ra=475;break};case-1:{Ra=384;break a;break};case 44:{hb=c[Ia>>2]|0;do{if((c[Ha>>2]|0)>>>0>=hb>>>0){if((hb|0)==0){Xa=c[ta>>2]|0;c[Ia>>2]=32;cb=Ec[Xa&63](32)|0;c[Ja>>2]=cb;if((cb|0)==0){Sa=1;Ra=486;break a}else{break}}cb=c[ua>>2]|0;Xa=c[Ja>>2]|0;db=hb<<1;c[Ia>>2]=db;Wa=Oc[cb&255](Xa,db)|0;if((Wa|0)==0){Sa=1;Ra=486;break a}c[Ja>>2]=Wa;Wa=c[Ma>>2]|0;if((Wa|0)==0){break}db=Oc[c[ua>>2]&255](Wa,c[Ia>>2]<<2)|0;if((db|0)==0){Sa=1;Ra=486;break a}c[Ma>>2]=db}}while(0);a[(c[Ja>>2]|0)+(c[Ha>>2]|0)|0]=0;if((a[Ka]|0)==0){Ra=476;break c}hb=Wd(b)|0;if((hb|0)<0){Sa=1;Ra=486;break a}c[(c[Ma>>2]|0)+(c[La>>2]<<2)>>2]=hb;c[La>>2]=(c[La>>2]|0)+1;c[(c[Na>>2]|0)+(hb*28|0)>>2]=6;Za=(c[Oa>>2]|0)==0|0;Ra=475;break};case 8:{hb=c[aa>>2]|0;if((hb|0)==0){Db=1}else{Bc[c[W>>2]&63](c[U>>2]|0,hb,c[X>>2]|0,c[ba>>2]|0,0);hb=c[ca>>2]|0;db=c[da>>2]|0;do{if((hb|0)==0){c[ca>>2]=db}else{if((db|0)==0){break}else{Eb=db;Fb=hb}while(1){Wa=Eb|0;Xa=c[Wa>>2]|0;c[Wa>>2]=Fb;c[ca>>2]=Eb;if((Xa|0)==0){break}else{Fb=Eb;Eb=Xa}}}}while(0);c[da>>2]=0;c[$>>2]=0;c[Z>>2]=0;c[_>>2]=0;Db=0}hb=c[ma>>2]|0;if((hb|0)==0){Za=Db;Ra=475;break c}Cc[hb&255](c[U>>2]|0);ab=L;break};case 9:{if((Hc[c[L+44>>2]&63](L,H,c[E>>2]|0)|0)!=0){c[ga>>2]=0;Ra=476;break c}if((a[fa]|0)==0){c[ia>>2]=c[ka>>2];c[ga>>2]=0;Ra=476;break c}hb=c[E>>2]|0;c[t>>2]=H;if((c[ia>>2]|0)==0){if((Bd(ha)|0)<<24>>24==0){Sa=1;Ra=486;break a}}db=L+56|0;while(1){Bc[c[db>>2]&63](L,t,hb,ia,c[ja>>2]|0);if((c[t>>2]|0)==(hb|0)){break}if((Bd(ha)|0)<<24>>24==0){Ua=1;Ra=488;break a}}if((c[ka>>2]|0)==0){Sa=1;Ra=486;break a}hb=c[ia>>2]|0;if((hb|0)==(c[ja>>2]|0)){if((Bd(ha)|0)<<24>>24==0){Sa=1;Ra=486;break a}Gb=c[ia>>2]|0}else{Gb=hb}c[ia>>2]=Gb+1;a[Gb]=0;hb=c[ka>>2]|0;if((hb|0)==0){Sa=1;Ra=486;break a}db=Cd(b,Ca,hb,36)|0;c[ga>>2]=db;if((db|0)==0){Sa=1;Ra=486;break a}if((c[db>>2]|0)!=(hb|0)){c[ia>>2]=c[ka>>2];c[ga>>2]=0;Ra=476;break c}c[ka>>2]=c[ia>>2];c[(c[ga>>2]|0)+24>>2]=0;a[(c[ga>>2]|0)+33|0]=0;if((c[Da>>2]|0)==0){Hb=(c[O>>2]|0)==0|0}else{Hb=0}a[(c[ga>>2]|0)+34|0]=Hb;Za=(c[la>>2]|0)==0|0;Ra=475;break};case 14:{Ra=53;break};case 50:{hb=(c[Ja>>2]|0)+(c[Ha>>2]|0)|0;if((a[hb]|0)==124){Sa=2;Ra=486;break a}a[hb]=44;if((a[Ka]|0)==0){Ra=476;break c}Za=(c[Oa>>2]|0)==0|0;Ra=475;break};case 49:{hb=c[Ha>>2]|0;db=c[Ja>>2]|0;Xa=a[db+hb|0]|0;if(Xa<<24>>24==44){Sa=2;Ra=486;break a}do{if((a[Ka]|0)!=0&Xa<<24>>24==0){Wa=(c[Na>>2]|0)+((c[(c[Ma>>2]|0)+((c[La>>2]|0)-1<<2)>>2]|0)*28|0)|0;if((c[Wa>>2]|0)==3){Ib=1;Jb=hb;Kb=db;break}c[Wa>>2]=5;Ib=(c[Oa>>2]|0)==0|0;Jb=c[Ha>>2]|0;Kb=c[Ja>>2]|0}else{Ib=1;Jb=hb;Kb=db}}while(0);a[Kb+Jb|0]=124;Za=Ib;Ra=475;break};case 55:{if((Md(b,L,H,c[E>>2]|0)|0)==0){Sa=1;Ra=486;break a}else{ab=L}break};case 56:{if((Nd(b,L,H,c[E>>2]|0)|0)==0){Sa=1;Ra=486;break a}else{ab=L}break};case 0:{Za=(Ta|0)!=14|0;Ra=475;break};case 3:{Za=(c[W>>2]|0)==0|0;Ra=475;break};case 11:{if((a[fa]|0)==0){Ra=476;break c}Za=(c[la>>2]|0)==0|0;Ra=475;break};case 17:{Za=(c[Ga>>2]|0)==0|0;Ra=475;break};case 33:{if((a[fa]|0)==0){Ra=476;break c}Za=(c[oa>>2]|0)==0|0;Ra=475;break};case 39:{Za=(c[Oa>>2]|0)==0|0;Ra=475;break};case 2:{Ra=84;break a;break};case 24:{a[sa]=1;c[ra>>2]=28912;Ra=121;break};case 25:{c[ra>>2]=28904;Ra=121;break};case 26:{c[ra>>2]=28896;Ra=121;break};case 27:{c[ra>>2]=28920;Ra=121;break};case 35:case 36:{if((a[fa]|0)==0){Ra=476;break c}db=c[na>>2]|0;hb=c[pa>>2]|0;Xa=a[qa]|0;Wa=db+12|0;cb=c[Wa>>2]|0;e:do{if((a[sa]|0)==0){Ra=149}else{if((cb|0)>0){pb=c[db+20>>2]|0;bb=0;while(1){gb=bb+1|0;if((c[pb+(bb*12|0)>>2]|0)==(hb|0)){break e}if((gb|0)<(cb|0)){bb=gb}else{break}}}bb=db+8|0;if((c[bb>>2]|0)!=0){Ra=149;break}if((a[hb+9|0]|0)!=0){Ra=149;break}c[bb>>2]=hb;Ra=149}}while(0);if((Ra|0)==149){Ra=0;bb=db+16|0;do{if((cb|0)==(c[bb>>2]|0)){if((cb|0)==0){c[bb>>2]=8;pb=Ec[c[ta>>2]&63](96)|0;gb=pb;c[db+20>>2]=gb;if((pb|0)==0){Sa=1;Ra=486;break a}else{Lb=gb;break}}gb=db+20|0;pb=Oc[c[ua>>2]&255](c[gb>>2]|0,cb*24|0)|0;if((pb|0)==0){Sa=1;Ra=486;break a}nb=pb;c[bb>>2]=cb<<1;c[gb>>2]=nb;Lb=nb}else{Lb=c[db+20>>2]|0}}while(0);db=c[Wa>>2]|0;c[Lb+(db*12|0)>>2]=hb;c[Lb+(db*12|0)+8>>2]=0;a[Lb+(db*12|0)+4|0]=Xa;if(Xa<<24>>24==0){a[hb+8|0]=1}c[Wa>>2]=(c[Wa>>2]|0)+1}if((c[oa>>2]|0)==0){Ra=476;break c}db=c[ra>>2]|0;if((db|0)==0){Ra=476;break c}cb=a[db]|0;if((cb<<24>>24|0)==78){if((a[db+1|0]|0)==79){Ra=162}}else if((cb<<24>>24|0)==40){Ra=162}if((Ra|0)==162){Ra=0;cb=c[Z>>2]|0;if((cb|0)==(c[_>>2]|0)){if((Bd(Y)|0)<<24>>24==0){Sa=1;Ra=486;break a}Mb=c[Z>>2]|0}else{Mb=cb}c[Z>>2]=Mb+1;a[Mb]=41;cb=c[Z>>2]|0;if((cb|0)==(c[_>>2]|0)){if((Bd(Y)|0)<<24>>24==0){Sa=1;Ra=486;break a}Nb=c[Z>>2]|0}else{Nb=cb}c[Z>>2]=Nb+1;a[Nb]=0;c[ra>>2]=c[$>>2];c[$>>2]=c[Z>>2]}c[N>>2]=H;Ic[c[oa>>2]&15](c[U>>2]|0,c[c[na>>2]>>2]|0,c[c[pa>>2]>>2]|0,c[ra>>2]|0,0,(I|0)==36|0);cb=c[ca>>2]|0;db=c[da>>2]|0;do{if((cb|0)==0){c[ca>>2]=db}else{if((db|0)==0){break}else{Ob=db;Pb=cb}while(1){bb=Ob|0;nb=c[bb>>2]|0;c[bb>>2]=Pb;c[ca>>2]=Ob;if((nb|0)==0){break}else{Pb=Ob;Ob=nb}}}}while(0);c[da>>2]=0;c[$>>2]=0;c[Z>>2]=0;c[_>>2]=0;ab=L;break};case 40:{if((c[Oa>>2]|0)==0){Ra=476;break c}cb=c[E>>2]|0;db=c[F>>2]|0;Wa=db+80|0;c[k>>2]=H;hb=db+92|0;if((c[hb>>2]|0)==0){if((Bd(Wa)|0)<<24>>24==0){Ra=423;break a}}Xa=L+56|0;nb=db+88|0;while(1){Bc[c[Xa>>2]&63](L,k,cb,hb,c[nb>>2]|0);if((c[k>>2]|0)==(cb|0)){break}if((Bd(Wa)|0)<<24>>24==0){Ra=423;break a}}cb=db+96|0;if((c[cb>>2]|0)==0){Ra=423;break a}Xa=c[hb>>2]|0;if((Xa|0)==(c[nb>>2]|0)){if((Bd(Wa)|0)<<24>>24==0){Ra=423;break a}Qb=c[hb>>2]|0}else{Qb=Xa}c[hb>>2]=Qb+1;a[Qb]=0;Xa=c[cb>>2]|0;if((Xa|0)==0){Ra=423;break a}bb=Cd(b,db+20|0,Xa,24)|0;gb=bb;if((bb|0)==0){Ra=423;break a}if((c[bb>>2]|0)==(Xa|0)){c[cb>>2]=c[hb>>2];if((Pd(b,gb)|0)==0){Ra=423;break a}}else{c[hb>>2]=c[cb>>2]}c[na>>2]=gb;c[La>>2]=0;c[Pa>>2]=0;a[Ka]=1;ab=L;break};case 22:{gb=Qd(b,L,H,c[E>>2]|0)|0;c[pa>>2]=gb;if((gb|0)==0){Sa=1;Ra=486;break a}a[qa]=0;c[ra>>2]=0;a[sa]=0;Ra=121;break};case 53:{Rb=1;Ra=435;break};case 52:{Rb=2;Ra=435;break};case 54:{Rb=3;Ra=435;break};case 51:{Rb=0;Ra=435;break};case 47:{Sb=1;Ra=459;break};case 46:{Sb=2;Ra=459;break};case 48:{Sb=3;Ra=459;break};case 45:{Sb=0;Ra=459;break};case 7:{gb=c[W>>2]|0;if((gb|0)==0){Ra=476;break c}Bc[gb&63](c[U>>2]|0,c[aa>>2]|0,c[X>>2]|0,c[ba>>2]|0,1);c[aa>>2]=0;gb=c[ca>>2]|0;cb=c[da>>2]|0;do{if((gb|0)==0){c[ca>>2]=cb}else{if((cb|0)==0){break}else{Tb=cb;Ub=gb}while(1){Xa=Tb|0;bb=c[Xa>>2]|0;c[Xa>>2]=Ub;c[ca>>2]=Tb;if((bb|0)==0){break}else{Ub=Tb;Tb=bb}}}}while(0);c[da>>2]=0;c[$>>2]=0;c[Z>>2]=0;c[_>>2]=0;ab=L;break};case 13:{if((a[fa]|0)==0){Ra=476;break c}if((c[ga>>2]|0)==0){Ra=476;break c}gb=c[L+64>>2]|0;cb=(c[E>>2]|0)+(-gb|0)|0;c[v>>2]=H+gb;if((c[ia>>2]|0)==0){if((Bd(ha)|0)<<24>>24==0){Vb=0}else{Ra=271}}else{Ra=271}f:do{if((Ra|0)==271){Ra=0;gb=L+56|0;while(1){Bc[c[gb>>2]&63](L,v,cb,ia,c[ja>>2]|0);if((c[v>>2]|0)==(cb|0)){break}if((Bd(ha)|0)<<24>>24==0){Vb=0;break f}}if((c[ka>>2]|0)==0){Vb=0;break}gb=c[ia>>2]|0;if((gb|0)==(c[ja>>2]|0)){if((Bd(ha)|0)<<24>>24==0){Vb=0;break}Wb=c[ia>>2]|0}else{Wb=gb}c[ia>>2]=Wb+1;a[Wb]=0;Vb=c[ka>>2]|0}}while(0);c[(c[ga>>2]|0)+16>>2]=Vb;cb=c[ga>>2]|0;if((c[cb+16>>2]|0)==0){Sa=1;Ra=486;break a}c[cb+20>>2]=c[ya>>2];c[ka>>2]=c[ia>>2];Za=(c[la>>2]|0)==0|0;Ra=475;break};case 20:{do{if((c[Ea>>2]|0)==0){Xb=1}else{if((c[Ga>>2]|0)==0){Xb=1;break}c[N>>2]=H;Bc[c[Ga>>2]&63](c[U>>2]|0,c[Fa>>2]|0,c[ya>>2]|0,0,c[Ea>>2]|0);Xb=0}}while(0);cb=c[ca>>2]|0;gb=c[da>>2]|0;do{if((cb|0)==0){c[ca>>2]=gb}else{if((gb|0)==0){break}else{Yb=gb;Zb=cb}while(1){hb=Yb|0;db=c[hb>>2]|0;c[hb>>2]=Zb;c[ca>>2]=Yb;if((db|0)==0){break}else{Zb=Yb;Yb=db}}}}while(0);c[da>>2]=0;c[$>>2]=0;c[Z>>2]=0;c[_>>2]=0;Za=Xb;Ra=475;break};case 57:{if((a[za]|0)!=0){Ra=476;break c}cb=c[Aa>>2]|0;if((cb|0)==0){Ra=476;break c}if((Ec[cb&63](c[U>>2]|0)|0)==0){Sa=22;Ra=486;break a}else{Ra=476}break};case 31:case 32:{if((a[fa]|0)==0){Ra=476;break c}if((c[oa>>2]|0)==0){Ra=476;break c}if((c[ra>>2]|0)==0){_b=(I|0)==32?28840:28856}else{_b=28864}cb=a[_b]|0;if(cb<<24>>24!=0){gb=_b;db=cb;do{cb=c[Z>>2]|0;if((cb|0)==(c[_>>2]|0)){if((Bd(Y)|0)<<24>>24==0){Ua=1;Ra=488;break a}$b=a[gb]|0;ac=c[Z>>2]|0}else{$b=db;ac=cb}c[Z>>2]=ac+1;a[ac]=$b;gb=gb+1|0;db=a[gb]|0;}while(db<<24>>24!=0)}if((c[$>>2]|0)==0){Sa=1;Ra=486;break a}db=c[E>>2]|0;c[A>>2]=H;if((c[Z>>2]|0)==0){if((Bd(Y)|0)<<24>>24==0){Sa=1;Ra=486;break a}}gb=L+56|0;while(1){Bc[c[gb>>2]&63](L,A,db,Z,c[_>>2]|0);if((c[A>>2]|0)==(db|0)){break}if((Bd(Y)|0)<<24>>24==0){Ua=1;Ra=488;break a}}db=c[$>>2]|0;if((db|0)==0){Sa=1;Ra=486;break a}c[ra>>2]=db;ab=L;break};case 41:case 42:{if((a[Ka]|0)==0){Ra=476;break c}if((c[Oa>>2]|0)==0){bc=1}else{db=Ec[c[ta>>2]&63](20)|0;if((db|0)==0){Sa=1;Ra=486;break a}vF(db+4|0,0,16)|0;c[db>>2]=(I|0)==41?2:1;c[N>>2]=H;Tc[c[Oa>>2]&127](c[U>>2]|0,c[c[na>>2]>>2]|0,db);bc=0}a[Ka]=0;Za=bc;Ra=475;break};case 43:{if((a[Ka]|0)==0){Ra=476;break c}c[(c[Na>>2]|0)+((c[(c[Ma>>2]|0)+((c[La>>2]|0)-1<<2)>>2]|0)*28|0)>>2]=3;Za=(c[Oa>>2]|0)==0|0;Ra=475;break};case 15:{if((a[fa]|0)==0){Ra=476;break c}if((c[ga>>2]|0)==0){Ra=476;break c}if((c[la>>2]|0)==0){Ra=476;break c}c[N>>2]=H;db=c[ga>>2]|0;Nc[c[la>>2]&1](c[U>>2]|0,c[db>>2]|0,d[db+33|0]|0,0,0,c[db+20>>2]|0,c[db+16>>2]|0,c[db+24>>2]|0,0);ab=L;break};case 16:{if((a[fa]|0)==0){Ra=476;break c}if((c[ga>>2]|0)==0){Ra=476;break c}db=c[E>>2]|0;c[u>>2]=H;if((c[ia>>2]|0)==0){if((Bd(ha)|0)<<24>>24==0){cc=0}else{Ra=289}}else{Ra=289}g:do{if((Ra|0)==289){Ra=0;gb=L+56|0;while(1){Bc[c[gb>>2]&63](L,u,db,ia,c[ja>>2]|0);if((c[u>>2]|0)==(db|0)){break}if((Bd(ha)|0)<<24>>24==0){cc=0;break g}}if((c[ka>>2]|0)==0){cc=0;break}gb=c[ia>>2]|0;if((gb|0)==(c[ja>>2]|0)){if((Bd(ha)|0)<<24>>24==0){cc=0;break}dc=c[ia>>2]|0}else{dc=gb}c[ia>>2]=dc+1;a[dc]=0;cc=c[ka>>2]|0}}while(0);c[(c[ga>>2]|0)+28>>2]=cc;if((c[(c[ga>>2]|0)+28>>2]|0)==0){Sa=1;Ra=486;break a}c[ka>>2]=c[ia>>2];if((c[Ba>>2]|0)!=0){c[N>>2]=H;db=c[ga>>2]|0;Ic[c[Ba>>2]&15](c[U>>2]|0,c[db>>2]|0,c[db+20>>2]|0,c[db+16>>2]|0,c[db+24>>2]|0,c[db+28>>2]|0);ab=L;break c}if((c[la>>2]|0)==0){Ra=476;break c}c[N>>2]=H;db=c[ga>>2]|0;Nc[c[la>>2]&1](c[U>>2]|0,c[db>>2]|0,0,0,0,c[db+20>>2]|0,c[db+16>>2]|0,c[db+24>>2]|0,c[db+28>>2]|0);ab=L;break};case 12:{if((a[fa]|0)==0){Ra=476;break c}db=L+64|0;gb=c[db>>2]|0;cb=H+gb|0;hb=(c[E>>2]|0)+(-gb|0)|0;gb=c[F>>2]|0;Wa=gb+104|0;if((c[Wa>>2]|0)==0){if((Bd(Wa)|0)<<24>>24==0){ec=1}else{Ra=215}}else{Ra=215}h:do{if((Ra|0)==215){Ra=0;nb=L+16|0;bb=gb+116|0;Xa=L+56|0;pb=gb+112|0;eb=gb+120|0;fc=L+40|0;gc=cb;i:while(1){j:do{switch(Sc[c[nb>>2]&127](L,gc,hb,y)|0){case 28:{Ra=217;break i;break};case 9:case 6:{hc=c[y>>2]|0;c[x>>2]=gc;if((c[bb>>2]|0)==0){if((Bd(Wa)|0)<<24>>24==0){ec=1;break h}}while(1){Bc[c[Xa>>2]&63](L,x,hc,bb,c[pb>>2]|0);if((c[x>>2]|0)==(hc|0)){break}if((Bd(Wa)|0)<<24>>24==0){ec=1;break h}}if((c[eb>>2]|0)==0){ec=1;break h}break};case-3:{c[y>>2]=gc+(c[db>>2]|0);Ra=224;break};case 7:{Ra=224;break};case 10:{hc=Oc[c[fc>>2]&255](L,gc)|0;if((hc|0)<0){Ra=229;break i}ic=Re(hc,va)|0;if((ic|0)==0){Ra=233;break i}if((ic|0)>0){jc=0}else{break j}do{hc=c[bb>>2]|0;if((c[pb>>2]|0)==(hc|0)){if((Bd(Wa)|0)<<24>>24==0){ec=1;break h}kc=c[bb>>2]|0}else{kc=hc}hc=a[z+jc|0]|0;c[bb>>2]=kc+1;a[kc]=hc;jc=jc+1|0;}while((jc|0)<(ic|0));break};case-1:{Ra=239;break i;break};case 0:{Ra=241;break i;break};case-4:{ec=0;break h;break};default:{Ra=243;break i}}}while(0);if((Ra|0)==224){Ra=0;ic=c[bb>>2]|0;if((c[pb>>2]|0)==(ic|0)){if((Bd(Wa)|0)<<24>>24==0){ec=1;break h}lc=c[bb>>2]|0}else{lc=ic}c[bb>>2]=lc+1;a[lc]=10}gc=c[y>>2]|0}if((Ra|0)==217){Ra=0;c[M>>2]=gc;ec=10;break}else if((Ra|0)==229){Ra=0;if((c[G>>2]|0)!=(L|0)){ec=14;break}c[M>>2]=gc;ec=14;break}else if((Ra|0)==233){Ra=0;if((c[G>>2]|0)!=(L|0)){ec=14;break}c[M>>2]=gc;ec=14;break}else if((Ra|0)==239){Ra=0;if((c[G>>2]|0)!=(L|0)){ec=4;break}c[M>>2]=gc;ec=4;break}else if((Ra|0)==241){Ra=0;if((c[G>>2]|0)!=(L|0)){ec=4;break}c[M>>2]=c[y>>2];ec=4;break}else if((Ra|0)==243){Ra=0;if((c[G>>2]|0)!=(L|0)){ec=23;break}c[M>>2]=gc;ec=23;break}}}while(0);Wa=c[ga>>2]|0;db=c[wa>>2]|0;do{if((Wa|0)==0){c[xa>>2]=db;mc=1}else{c[Wa+4>>2]=db;c[(c[ga>>2]|0)+8>>2]=(c[xa>>2]|0)-(c[wa>>2]|0);c[wa>>2]=c[xa>>2];if((c[la>>2]|0)==0){mc=1;break}c[N>>2]=H;hb=c[ga>>2]|0;Nc[c[la>>2]&1](c[U>>2]|0,c[hb>>2]|0,d[hb+33|0]|0,c[hb+4>>2]|0,c[hb+8>>2]|0,c[ya>>2]|0,0,0,0);mc=0}}while(0);if((ec|0)==0){Za=mc;Ra=475}else{Sa=ec;Ra=486;break a}break};default:{Ra=476}}}while(0);do{if((Ra|0)==53){Ra=0;if((Sc[c[L+52>>2]&127](L,H,c[E>>2]|0,M)|0)==0){Sa=32;Ra=486;break a}else{yb=1;Ra=54}}else if((Ra|0)==121){Ra=0;if((a[fa]|0)==0){Ra=476;break}Za=(c[oa>>2]|0)==0|0;Ra=475}else if((Ra|0)==435){Ra=0;if((a[Ka]|0)==0){Ra=476;break}I=c[E>>2]|0;if((Rb|0)==0){nc=I}else{nc=I+(-(c[L+64>>2]|0)|0)|0}I=Wd(b)|0;if((I|0)<0){Sa=1;Ra=486;break a}c[(c[Na>>2]|0)+(I*28|0)>>2]=4;c[(c[Na>>2]|0)+(I*28|0)+4>>2]=Rb;db=c[F>>2]|0;Wa=db+80|0;c[j>>2]=H;hb=db+92|0;if((c[hb>>2]|0)==0){if((Bd(Wa)|0)<<24>>24==0){Sa=1;Ra=486;break a}}cb=L+56|0;gb=db+88|0;while(1){Bc[c[cb>>2]&63](L,j,nc,hb,c[gb>>2]|0);if((c[j>>2]|0)==(nc|0)){break}if((Bd(Wa)|0)<<24>>24==0){Ua=1;Ra=488;break a}}cb=db+96|0;if((c[cb>>2]|0)==0){Sa=1;Ra=486;break a}bb=c[hb>>2]|0;if((bb|0)==(c[gb>>2]|0)){if((Bd(Wa)|0)<<24>>24==0){Sa=1;Ra=486;break a}oc=c[hb>>2]|0}else{oc=bb}c[hb>>2]=oc+1;a[oc]=0;bb=c[cb>>2]|0;if((bb|0)==0){Sa=1;Ra=486;break a}pb=Cd(b,db+20|0,bb,24)|0;if((pb|0)==0){Sa=1;Ra=486;break a}fc=pb|0;if((c[fc>>2]|0)==(bb|0)){c[cb>>2]=c[hb>>2];if((Pd(b,pb)|0)==0){Sa=1;Ra=486;break a}}else{c[hb>>2]=c[cb>>2]}cb=c[fc>>2]|0;c[(c[Na>>2]|0)+(I*28|0)+8>>2]=cb;fc=0;while(1){pc=fc+1|0;if((a[cb+fc|0]|0)==0){break}else{fc=pc}}c[Qa>>2]=(c[Qa>>2]|0)+pc;Za=(c[Oa>>2]|0)==0|0;Ra=475}else if((Ra|0)==459){Ra=0;if((a[Ka]|0)==0){Ra=476;break}fc=(c[Oa>>2]|0)==0;cb=fc&1;I=(c[La>>2]|0)-1|0;c[La>>2]=I;c[(c[Na>>2]|0)+((c[(c[Ma>>2]|0)+(I<<2)>>2]|0)*28|0)+4>>2]=Sb;if((c[La>>2]|0)!=0){Za=cb;Ra=475;break}if(!fc){fc=c[F>>2]|0;I=fc+156|0;hb=Ec[c[ta>>2]&63](((c[I>>2]|0)*20|0)+(c[fc+148>>2]|0)|0)|0;fc=hb;if((hb|0)==0){Sa=1;Ra=486;break a}c[p>>2]=fc+((c[I>>2]|0)*20|0);c[o>>2]=hb+20;Xd(b,0,fc,o,p);c[N>>2]=H;Tc[c[Oa>>2]&127](c[U>>2]|0,c[c[na>>2]>>2]|0,fc)}a[Ka]=0;c[Qa>>2]=0;Za=cb;Ra=475}}while(0);do{if((Ra|0)==54){Ra=0;if((a[fa]|0)==0){Za=yb;Ra=475;break}if((c[ga>>2]|0)==0){Za=yb;Ra=475;break}cb=c[L+64>>2]|0;fc=(c[E>>2]|0)+(-cb|0)|0;c[B>>2]=H+cb;if((c[ia>>2]|0)==0){if((Bd(ha)|0)<<24>>24==0){Sa=1;Ra=486;break a}}cb=L+56|0;while(1){Bc[c[cb>>2]&63](L,B,fc,ia,c[ja>>2]|0);if((c[B>>2]|0)==(fc|0)){break}if((Bd(ha)|0)<<24>>24==0){Ua=1;Ra=488;break a}}if((c[ka>>2]|0)==0){Sa=1;Ra=486;break a}fc=c[ia>>2]|0;if((fc|0)==(c[ja>>2]|0)){if((Bd(ha)|0)<<24>>24==0){Sa=1;Ra=486;break a}qc=c[ia>>2]|0}else{qc=fc}c[ia>>2]=qc+1;a[qc]=0;fc=c[ka>>2]|0;if((fc|0)==0){Sa=1;Ra=486;break a}cb=a[fc]|0;do{if(cb<<24>>24==0){rc=fc}else{hb=fc;I=fc;db=cb;while(1){Wa=db<<24>>24;do{if((Wa|0)==32|(Wa|0)==13|(Wa|0)==10){if((hb|0)==(fc|0)){sc=fc;break}if((a[hb-1|0]|0)==32){sc=hb;break}a[hb]=32;sc=hb+1|0}else{a[hb]=db;sc=hb+1|0}}while(0);Wa=I+1|0;gb=a[Wa]|0;if(gb<<24>>24==0){break}else{hb=sc;I=Wa;db=gb}}if((sc|0)==(fc|0)){rc=fc;break}db=sc-1|0;rc=(a[db]|0)==32?db:sc}}while(0);a[rc]=0;c[(c[ga>>2]|0)+24>>2]=fc;c[ka>>2]=c[ia>>2];Za=(c[la>>2]|0)==0?yb:0;Ra=475}}while(0);if((Ra|0)==475){Ra=0;if(Za<<24>>24==0){ab=L}else{Ra=476}}do{if((Ra|0)==476){Ra=0;cb=c[R>>2]|0;if((cb|0)==0){ab=L;break}db=c[E>>2]|0;c[m>>2]=H;if((a[L+68|0]|0)!=0){Tc[cb&127](c[U>>2]|0,H,db-H|0);ab=L;break}if((c[G>>2]|0)==(L|0)){tc=N;uc=M}else{cb=c[O>>2]|0;tc=cb+4|0;uc=cb|0}cb=L+56|0;while(1){c[n>>2]=c[S>>2];Bc[c[cb>>2]&63](L,m,db,n,c[T>>2]|0);c[tc>>2]=c[m>>2];I=c[S>>2]|0;Tc[c[R>>2]&127](c[U>>2]|0,I,(c[n>>2]|0)-I|0);c[uc>>2]=c[m>>2];if((c[m>>2]|0)==(db|0)){ab=L;break}}}}while(0);db=c[V>>2]|0;if((db|0)==3){Ra=484;break}else if((db|0)==2){Sa=35;Ra=486;break}db=c[E>>2]|0;L=ab;H=db;e=Sc[c[ab>>2]&127](ab,db,f,E)|0}if((Ra|0)==4){c[g>>2]=H;Ua=0;vc=4;wc=0;i=h;return Ua|0}else if((Ra|0)==6){c[M>>2]=c[E>>2];Ua=4;vc=4;wc=0;i=h;return Ua|0}else if((Ra|0)==21){c[aa>>2]=0;Ua=1;vc=4;wc=0;i=h;return Ua|0}else if((Ra|0)==84){c[b+264>>2]=6;aa=Gd(b,0,c[G>>2]|0,H,f,g,(a[J]|0)==0|0)|0;if((aa|0)!=0){Ua=aa;vc=4;wc=0;i=h;return Ua|0}aa=c[b+348>>2]|0;if((aa|0)==0){Ua=0;vc=4;wc=0;i=h;return Ua|0}else{xc=aa}while(1){aa=(c[xc+24>>2]|0)+1|0;b=xc+36|0;J=c[b>>2]|0;f=J+aa|0;H=xc+4|0;G=c[H>>2]|0;if((G|0)==(f|0)){Ua=0;Ra=488;break}M=xc+8|0;ab=c[M>>2]|0;e=ab+aa|0;L=xc+40|0;if((e|0)>((c[L>>2]|0)-J|0)){V=Oc[c[ua>>2]&255](J,e)|0;if((V|0)==0){Ua=1;Ra=488;break}J=xc+12|0;m=c[b>>2]|0;if((c[J>>2]|0)==(m|0)){c[J>>2]=V}J=xc+16|0;uc=c[J>>2]|0;if((uc|0)!=0){c[J>>2]=V+(uc-m)}c[b>>2]=V;c[L>>2]=V+e;yc=V+aa|0;zc=c[H>>2]|0;Ac=c[M>>2]|0}else{yc=f;zc=G;Ac=ab}tF(yc|0,zc|0,Ac)|0;c[H>>2]=yc;H=c[xc>>2]|0;if((H|0)==0){Ua=0;Ra=488;break}else{xc=H}}if((Ra|0)==488){vc=4;wc=0;i=h;return Ua|0}}else if((Ra|0)==109){c[na>>2]=0;Ua=1;vc=4;wc=0;i=h;return Ua|0}else if((Ra|0)==261){c[X>>2]=0;Ua=1;vc=4;wc=0;i=h;return Ua|0}else if((Ra|0)==333){c[Fa>>2]=0;Ua=1;vc=4;wc=0;i=h;return Ua|0}else if((Ra|0)==384){if((Ta|0)==12){Ua=17;vc=4;wc=0;i=h;return Ua|0}else if((Ta|0)==28){Ua=10;vc=4;wc=0;i=h;return Ua|0}else{Ua=2;vc=4;wc=0;i=h;return Ua|0}}else if((Ra|0)==423){c[na>>2]=0;Ua=1;vc=4;wc=0;i=h;return Ua|0}else if((Ra|0)==484){c[g>>2]=c[E>>2];Ua=0;vc=4;wc=0;i=h;return Ua|0}else if((Ra|0)==486){Ua=Sa;vc=4;wc=0;i=h;return Ua|0}else if((Ra|0)==487){Ua=6;vc=4;wc=0;i=h;return Ua|0}else if((Ra|0)==488){vc=4;wc=0;i=h;return Ua|0}return 0}function Wd(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;b=c[a+340>>2]|0;d=b+164|0;do{if((c[d>>2]|0)==0){e=Ec[c[a+12>>2]&63](c[a+452>>2]<<2)|0;f=e;c[d>>2]=f;if((e|0)==0){g=-1;return g|0}else{c[f>>2]=0;break}}}while(0);f=b+156|0;e=c[f>>2]|0;h=b+152|0;i=c[h>>2]|0;j=b+144|0;k=c[j>>2]|0;if(e>>>0<i>>>0){l=e;m=k}else{do{if((k|0)==0){e=Ec[c[a+12>>2]&63](896)|0;if((e|0)==0){g=-1}else{n=e;o=32;break}return g|0}else{e=Oc[c[a+16>>2]&255](k,i*56|0)|0;if((e|0)==0){g=-1;return g|0}else{n=e;o=c[h>>2]<<1;break}}}while(0);i=n;c[h>>2]=o;c[j>>2]=i;l=c[f>>2]|0;m=i}c[f>>2]=l+1;f=c[b+160>>2]|0;if((f|0)!=0){b=c[(c[d>>2]|0)+(f-1<<2)>>2]|0;f=m+(b*28|0)+16|0;d=c[f>>2]|0;if((d|0)!=0){c[m+(d*28|0)+24>>2]=l}d=m+(b*28|0)+20|0;i=c[d>>2]|0;if((i|0)==0){c[m+(b*28|0)+12>>2]=l}c[f>>2]=l;c[d>>2]=i+1}vF(m+(l*28|0)+12|0,0,16)|0;g=l;return g|0}function Xd(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0;h=(c[b+340>>2]|0)+144|0;i=c[(c[h>>2]|0)+(d*28|0)>>2]|0;c[e>>2]=i;c[e+4>>2]=c[(c[h>>2]|0)+(d*28|0)+4>>2];if((i|0)==4){c[e+8>>2]=c[g>>2];i=c[(c[h>>2]|0)+(d*28|0)+8>>2]|0;while(1){j=a[i]|0;k=c[g>>2]|0;c[g>>2]=k+1;a[k]=j;if((a[i]|0)==0){break}else{i=i+1|0}}c[e+12>>2]=0;c[e+16>>2]=0;return}i=c[(c[h>>2]|0)+(d*28|0)+20>>2]|0;j=e+12|0;c[j>>2]=i;k=e+16|0;c[k>>2]=c[f>>2];c[f>>2]=(c[f>>2]|0)+(i*20|0);if((c[j>>2]|0)!=0){i=0;l=(c[h>>2]|0)+(d*28|0)+12|0;while(1){d=c[l>>2]|0;Xd(b,d,(c[k>>2]|0)+(i*20|0)|0,f,g);m=i+1|0;if(m>>>0<(c[j>>2]|0)>>>0){i=m;l=(c[h>>2]|0)+(d*28|0)+24|0}else{break}}}c[e+8>>2]=0;return}function Yd(a){a=a|0;c[a>>2]=60;return}function Zd(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;a:do{switch(b|0){case 29:{c[a>>2]=90;g=2;break};case 11:{c[a>>2]=62;g=55;break};case 13:{c[a>>2]=62;g=56;break};case 15:{c[a>>2]=62;g=0;break};case 16:{if((Sc[c[f+24>>2]&127](f,d+(c[f+64>>2]<<1)|0,e,173064)|0)==0){h=9;break a}c[a>>2]=16;g=3;break};case 14:{g=0;break};case 12:{c[a>>2]=62;g=1;break};default:{h=9}}}while(0);if((h|0)==9){c[a>>2]=90;g=-1}return g|0}function _d(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;a:do{switch(b|0){case 29:{c[a>>2]=90;g=2;break};case 13:{g=56;break};case 16:{if((Sc[c[f+24>>2]&127](f,d+(c[f+64>>2]<<1)|0,e,173064)|0)==0){h=7;break a}c[a>>2]=16;g=3;break};case 15:case 14:{g=0;break};case 11:{g=55;break};default:{h=7}}}while(0);if((h|0)==7){c[a>>2]=90;g=-1}return g|0}function $d(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;if((b|0)==18|(b|0)==41){c[a>>2]=96;g=4}else if((b|0)==15){g=3}else{c[a>>2]=90;g=-1}return g|0}function ae(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return 0}function be(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;do{if((b|0)==15){g=3;return g|0}else if((b|0)==17){c[a>>2]=2;g=8;return g|0}else if((b|0)==25){c[a>>2]=88;g=7;return g|0}else if((b|0)==18){h=f+24|0;if((Sc[c[h>>2]&127](f,d,e,172880)|0)!=0){c[a>>2]=100;g=3;return g|0}if((Sc[c[h>>2]&127](f,d,e,172904)|0)==0){break}c[a>>2]=98;g=3;return g|0}}while(0);c[a>>2]=90;g=-1;return g|0}function ce(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;a:do{switch(b|0){case 11:{g=55;return g|0};case 26:{c[a>>2]=94;g=3;return g|0};case 13:{g=56;return g|0};case 15:case-4:{g=0;return g|0};case 28:{g=57;return g|0};case 16:{h=f+24|0;i=f+64|0;if((Sc[c[h>>2]&127](f,d+(c[i>>2]<<1)|0,e,173024)|0)!=0){c[a>>2]=32;g=11;return g|0}if((Sc[c[h>>2]&127](f,d+(c[i>>2]<<1)|0,e,173080)|0)!=0){c[a>>2]=78;g=33;return g|0}if((Sc[c[h>>2]&127](f,d+(c[i>>2]<<1)|0,e,173056)|0)!=0){c[a>>2]=20;g=39;return g|0}if((Sc[c[h>>2]&127](f,d+(c[i>>2]<<1)|0,e,172920)|0)==0){break a}c[a>>2]=8;g=17;return g|0};default:{}}}while(0);c[a>>2]=90;g=-1;return g|0}function de(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;if((b|0)==11){g=55}else if((b|0)==15){g=0}else if((b|0)==29){c[a>>2]=90;g=2}else if((b|0)==13){g=56}else{c[a>>2]=90;g=-1}return g|0}function ee(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;if((b|0)==27){c[a>>2]=84;g=5}else if((b|0)==15){g=3}else{c[a>>2]=90;g=-1}return g|0}function fe(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;if((b|0)==15){g=3}else if((b|0)==27){c[a>>2]=100;g=6}else{c[a>>2]=90;g=-1}return g|0}function ge(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;if((b|0)==17){c[a>>2]=2;g=8}else if((b|0)==15){g=3}else if((b|0)==25){c[a>>2]=88;g=7}else{c[a>>2]=90;g=-1}return g|0}function he(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;if((b|0)==15){g=11}else if((b|0)==22){c[a>>2]=34;g=11}else if((b|0)==18){c[a>>2]=28;g=9}else{c[a>>2]=90;g=-1}return g|0}function ie(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;if((b|0)==18|(b|0)==41){c[a>>2]=76;g=34}else if((b|0)==15){g=33}else{c[a>>2]=90;g=-1}return g|0}function je(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;if((b|0)==15){g=39}else if((b|0)==18|(b|0)==41){c[a>>2]=54;g=40}else{c[a>>2]=90;g=-1}return g|0}function ke(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;if((b|0)==18){c[a>>2]=6;g=18}else if((b|0)==15){g=17}else{c[a>>2]=90;g=-1}return g|0}function le(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;if((b|0)==15){g=3}else if((b|0)==17){c[a>>2]=2;g=8}else{c[a>>2]=90;g=-1}return g|0}function me(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;if((b|0)==18){g=2}else if((b|0)==15){h=17;return h|0}do{if((g|0)==2){b=f+24|0;if((Sc[c[b>>2]&127](f,d,e,172880)|0)!=0){c[a>>2]=10;h=17;return h|0}if((Sc[c[b>>2]&127](f,d,e,172904)|0)==0){break}c[a>>2]=12;h=17;return h|0}}while(0);c[a>>2]=90;h=-1;return h|0}function ne(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;if((b|0)==27){c[a>>2]=44;c[a+8>>2]=17;g=19}else if((b|0)==15){g=17}else{c[a>>2]=90;g=-1}return g|0}function oe(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;if((b|0)==27){c[a>>2]=14;g=21}else if((b|0)==15){g=17}else{c[a>>2]=90;g=-1}return g|0}function pe(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;if((b|0)==27){c[a>>2]=44;c[a+8>>2]=17;g=19}else if((b|0)==17){c[a>>2]=88;g=20}else if((b|0)==15){g=17}else{c[a>>2]=90;g=-1}return g|0}function qe(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;if((b|0)==17){c[a>>2]=88;g=c[a+8>>2]|0;return g|0}else if((b|0)==15){g=c[a+8>>2]|0;return g|0}else{c[a>>2]=90;g=-1;return g|0}return 0}function re(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;do{if((b|0)==23){c[a>>2]=52;c[a+4>>2]=1;g=44;return g|0}else if((b|0)==15){g=39;return g|0}else if((b|0)==18){h=f+24|0;if((Sc[c[h>>2]&127](f,d,e,173048)|0)!=0){c[a>>2]=44;c[a+8>>2]=39;g=42;return g|0}if((Sc[c[h>>2]&127](f,d,e,173088)|0)==0){break}c[a>>2]=44;c[a+8>>2]=39;g=41;return g|0}}while(0);c[a>>2]=90;g=-1;return g|0}function se(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;a:do{switch(b|0){case 15:{g=39;break};case 30:{c[a>>2]=46;g=53;break};case 20:{if((Sc[c[f+24>>2]&127](f,d+(c[f+64>>2]|0)|0,e,172912)|0)==0){h=9;break a}c[a>>2]=58;g=43;break};case 23:{c[a+4>>2]=2;c[a>>2]=56;g=44;break};case 31:{c[a>>2]=46;g=52;break};case 18:case 41:{c[a>>2]=46;g=51;break};case 32:{c[a>>2]=46;g=54;break};default:{h=9}}}while(0);if((h|0)==9){c[a>>2]=90;g=-1}return g|0}function te(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;if((b|0)==36){c[a>>2]=44;c[a+8>>2]=39;g=46}else if((b|0)==15){g=39}else if((b|0)==24){c[a>>2]=44;c[a+8>>2]=39;g=45}else if((b|0)==21){c[a>>2]=48;g=39}else{c[a>>2]=90;g=-1}return g|0}function ue(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;switch(b|0){case 31:{c[a>>2]=46;g=52;break};case 18:case 41:{c[a>>2]=46;g=51;break};case 32:{c[a>>2]=46;g=54;break};case 23:{b=a+4|0;c[b>>2]=(c[b>>2]|0)+1;g=44;break};case 30:{c[a>>2]=46;g=53;break};case 15:{g=39;break};default:{c[a>>2]=90;g=-1}}return g|0}function ve(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;a:do{switch(b|0){case 36:{f=a+4|0;e=(c[f>>2]|0)-1|0;c[f>>2]=e;if((e|0)!=0){g=46;break a}c[a>>2]=44;c[a+8>>2]=39;g=46;break};case 35:{e=a+4|0;f=(c[e>>2]|0)-1|0;c[e>>2]=f;if((f|0)!=0){g=47;break a}c[a>>2]=44;c[a+8>>2]=39;g=47;break};case 37:{f=a+4|0;e=(c[f>>2]|0)-1|0;c[f>>2]=e;if((e|0)!=0){g=48;break a}c[a>>2]=44;c[a+8>>2]=39;g=48;break};case 21:{c[a>>2]=56;g=49;break};case 15:{g=39;break};case 38:{c[a>>2]=56;g=50;break};case 24:{e=a+4|0;f=(c[e>>2]|0)-1|0;c[e>>2]=f;if((f|0)!=0){g=45;break a}c[a>>2]=44;c[a+8>>2]=39;g=45;break};default:{c[a>>2]=90;g=-1}}}while(0);return g|0}function we(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;if((b|0)==18|(b|0)==41){c[a>>2]=50;g=51}else if((b|0)==15){g=39}else{c[a>>2]=90;g=-1}return g|0}function xe(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;if((b|0)==15){g=39}else if((b|0)==36){c[a>>2]=44;c[a+8>>2]=39;g=46}else if((b|0)==21){c[a>>2]=48;g=39}else{c[a>>2]=90;g=-1}return g|0}function ye(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;if((b|0)==18|(b|0)==41){c[a>>2]=82;g=22}else if((b|0)==15){g=33}else if((b|0)==17){c[a>>2]=88;g=33}else{c[a>>2]=90;g=-1}return g|0}function ze(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;do{if((b|0)==15){g=33;return g|0}else if((b|0)==18){h=f+24|0;i=0;j=c[h>>2]|0;while(1){k=i+1|0;if((Sc[j&127](f,d,e,c[71960+(i<<2)>>2]|0)|0)!=0){l=5;break}m=c[h>>2]|0;if((k|0)<8){i=k;j=m}else{break}}if((l|0)==5){c[a>>2]=66;g=i+23|0;return g|0}if((Sc[m&127](f,d,e,172920)|0)==0){break}c[a>>2]=68;g=33;return g|0}else if((b|0)==23){c[a>>2]=80;g=33;return g|0}}while(0);c[a>>2]=90;g=-1;return g|0}function Ae(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;do{if((b|0)==15){g=33;return g|0}else if((b|0)==20){h=f+24|0;i=f+64|0;if((Sc[c[h>>2]&127](f,d+(c[i>>2]|0)|0,e,172984)|0)!=0){c[a>>2]=76;g=35;return g|0}if((Sc[c[h>>2]&127](f,d+(c[i>>2]|0)|0,e,172888)|0)!=0){c[a>>2]=76;g=36;return g|0}if((Sc[c[h>>2]&127](f,d+(c[i>>2]|0)|0,e,173016)|0)==0){break}c[a>>2]=64;g=33;return g|0}else if((b|0)==27){c[a>>2]=76;g=37;return g|0}}while(0);c[a>>2]=90;g=-1;return g|0}function Be(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;if((b|0)==23){c[a>>2]=74;g=33}else if((b|0)==15){g=33}else{c[a>>2]=90;g=-1}return g|0}function Ce(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;if((b|0)==15){g=33}else if((b|0)==19|(b|0)==18|(b|0)==41){c[a>>2]=70;g=31}else{c[a>>2]=90;g=-1}return g|0}function De(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;if((b|0)==24){c[a>>2]=66;g=33}else if((b|0)==21){c[a>>2]=80;g=33}else if((b|0)==15){g=33}else{c[a>>2]=90;g=-1}return g|0}function Ee(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;if((b|0)==18){c[a>>2]=72;g=32}else if((b|0)==15){g=33}else{c[a>>2]=90;g=-1}return g|0}function Fe(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;if((b|0)==24){c[a>>2]=66;g=33}else if((b|0)==15){g=33}else if((b|0)==21){c[a>>2]=74;g=33}else{c[a>>2]=90;g=-1}return g|0}function Ge(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;if((b|0)==15){g=33}else if((b|0)==27){c[a>>2]=76;g=38}else{c[a>>2]=90;g=-1}return g|0}function He(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;if((b|0)==15){g=11}else if((b|0)==18){c[a>>2]=18;g=10}else{c[a>>2]=90;g=-1}return g|0}function Ie(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;do{if((b|0)==15){g=11;return g|0}else if((b|0)==18){h=f+24|0;if((Sc[c[h>>2]&127](f,d,e,172880)|0)!=0){c[a>>2]=38;g=11;return g|0}if((Sc[c[h>>2]&127](f,d,e,172904)|0)==0){break}c[a>>2]=30;g=11;return g|0}else if((b|0)==27){c[a>>2]=44;c[a+8>>2]=11;g=12;return g|0}}while(0);c[a>>2]=90;g=-1;return g|0}function Je(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;if((b|0)==15){g=11}else if((b|0)==27){c[a>>2]=40;g=13}else{c[a>>2]=90;g=-1}return g|0}function Ke(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;if((b|0)==27){c[a>>2]=38;g=14}else if((b|0)==15){g=11}else{c[a>>2]=90;g=-1}return g|0}function Le(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;do{if((b|0)==17){c[a>>2]=88;g=15;return g|0}else if((b|0)==18){if((Sc[c[f+24>>2]&127](f,d,e,172960)|0)==0){break}c[a>>2]=36;g=11;return g|0}else if((b|0)==15){g=11;return g|0}}while(0);c[a>>2]=90;g=-1;return g|0}function Me(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;if((b|0)==18){c[a>>2]=44;c[a+8>>2]=11;g=16}else if((b|0)==15){g=11}else{c[a>>2]=90;g=-1}return g|0}function Ne(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;do{if((b|0)==27){c[a>>2]=44;c[a+8>>2]=11;g=12;return g|0}else if((b|0)==15){g=11;return g|0}else if((b|0)==18){h=f+24|0;if((Sc[c[h>>2]&127](f,d,e,172880)|0)!=0){c[a>>2]=26;g=11;return g|0}if((Sc[c[h>>2]&127](f,d,e,172904)|0)==0){break}c[a>>2]=24;g=11;return g|0}}while(0);c[a>>2]=90;g=-1;return g|0}function Oe(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;if((b|0)==27){c[a>>2]=42;g=13}else if((b|0)==15){g=11}else{c[a>>2]=90;g=-1}return g|0}function Pe(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;if((b|0)==15){g=11}else if((b|0)==27){c[a>>2]=26;g=14}else{c[a>>2]=90;g=-1}return g|0}function Qe(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;if((b|0)==17){c[a>>2]=88;g=15}else if((b|0)==15){g=11}else{c[a>>2]=90;g=-1}return g|0}function Re(b,c){b=b|0;c=c|0;var d=0;if((b|0)<0){d=0;return d|0}if((b|0)<128){a[c]=b;d=1;return d|0}if((b|0)<2048){a[c]=b>>>6|192;a[c+1|0]=b&63|128;d=2;return d|0}if((b|0)<65536){a[c]=b>>>12|224;a[c+1|0]=b>>>6&63|128;a[c+2|0]=b&63|128;d=3;return d|0}if((b|0)>=1114112){d=0;return d|0}a[c]=b>>>18|240;a[c+1|0]=b>>>12&63|128;a[c+2|0]=b>>>6&63|128;a[c+3|0]=b&63|128;d=4;return d|0}function Se(){return 1908}function Te(e,f,g,h){e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;i=0;while(1){a[e+i|0]=a[20424+i|0]|0;j=i+1|0;if((j|0)<364){i=j}else{k=0;break}}do{i=a[20496+k|0]|0;if(!((i<<24>>24|0)==28|(i<<24>>24|0)==0)){if((c[f+(k<<2)>>2]|0)!=(k|0)){l=0;m=37;break}}k=k+1|0;}while((k|0)<128);if((m|0)==37){return l|0}k=e+372|0;i=e+884|0;j=0;a:while(1){n=c[f+(j<<2)>>2]|0;do{if((n|0)==-1){a[e+(j+72)|0]=1;b[k+(j<<1)>>1]=-1;a[i+(j<<2)|0]=1;a[i+(j<<2)+1|0]=0}else{if((n|0)<0){if((n|0)<-4){l=0;m=37;break a}a[e+(j+72)|0]=3-n;a[i+(j<<2)|0]=0;b[k+(j<<1)>>1]=0;break}if((n|0)<128){o=a[20496+n|0]|0;if(!((o<<24>>24|0)==28|(o<<24>>24|0)==0)){if((n|0)!=(j|0)){l=0;m=37;break a}}a[e+(j+72)|0]=o;a[i+(j<<2)|0]=1;a[i+(j<<2)+1|0]=n;b[k+(j<<1)>>1]=(n|0)==0?-1:n&65535;break}o=n>>8;switch(o|0){case 0:{if((a[20496+n|0]|0)==0){m=19}break};case 255:{if((n&-2|0)==65534){m=19}break};case 216:case 217:case 218:case 219:case 220:case 221:case 222:case 223:{m=19;break};default:{}}if((m|0)==19){m=0;a[e+(j+72)|0]=0;b[k+(j<<1)>>1]=-1;a[i+(j<<2)|0]=1;a[i+(j<<2)+1|0]=0;break}if((n|0)>65535){l=0;m=37;break a}p=n>>>5&7;q=1<<(n&31);do{if((c[18232+((d[17968+o|0]<<3|p)<<2)>>2]&q|0)==0){r=e+(j+72)|0;if((c[18232+((d[19512+o|0]<<3|p)<<2)>>2]&q|0)==0){a[r]=28;break}else{a[r]=26;break}}else{a[e+(j+72)|0]=22}}while(0);q=i+(j<<2)|0;p=i+(j<<2)+1|0;do{if((n|0)<2048){a[p]=n>>>6|192;a[i+(j<<2)+2|0]=n&63|128;s=2}else{if((n|0)<65536){a[p]=n>>>12|224;a[i+(j<<2)+2|0]=n>>>6&63|128;a[i+(j<<2)+3|0]=n&63|128;s=3;break}if((n|0)>=1114112){s=0;break}a[p]=n>>>18|240;a[i+(j<<2)+2|0]=n>>>12&63|128;a[i+(j<<2)+3|0]=n>>>6&63|128;a[i+(j<<2)+4|0]=n&63|128;s=4}}while(0);a[q]=s;b[k+(j<<1)>>1]=n}}while(0);n=j+1|0;if((n|0)<256){j=n}else{m=34;break}}if((m|0)==34){c[e+368>>2]=h;c[e+364>>2]=g;if((g|0)!=0){c[e+328>>2]=20;c[e+332>>2]=20;c[e+336>>2]=20;c[e+340>>2]=170;c[e+344>>2]=170;c[e+348>>2]=170;c[e+352>>2]=176;c[e+356>>2]=176;c[e+360>>2]=176}c[e+56>>2]=16;c[e+60>>2]=18;l=e;return l|0}else if((m|0)==37){return l|0}return 0}function Ue(a,b){a=a|0;b=b|0;var e=0,f=0;e=Oc[c[a+364>>2]&255](c[a+368>>2]|0,b)|0;if(e>>>0>65535>>>0){f=0;return f|0}f=c[18232+(((d[19512+(e>>8)|0]|0)<<3|e>>>5&7)<<2)>>2]&1<<(e&31);return f|0}function Ve(a,b){a=a|0;b=b|0;var e=0,f=0;e=Oc[c[a+364>>2]&255](c[a+368>>2]|0,b)|0;if(e>>>0>65535>>>0){f=0;return f|0}f=c[18232+(((d[17968+(e>>8)|0]|0)<<3|e>>>5&7)<<2)>>2]&1<<(e&31);return f|0}function We(b,d){b=b|0;d=d|0;var e=0,f=0;e=Oc[c[b+364>>2]&255](c[b+368>>2]|0,d)|0;if(e>>>0>65535>>>0){f=1;return f|0}a:do{switch(e>>8|0){case 255:{if((e&-2|0)==65534){f=1}else{break a}return f|0};case 216:case 217:case 218:case 219:case 220:case 221:case 222:case 223:{f=1;return f|0};case 0:{if((a[20496+e|0]|0)==0){f=1}else{break a}return f|0};default:{}}}while(0);f=e>>>31;return f|0}function Xe(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;j=i;i=i+8|0;k=j|0;l=c[e>>2]|0;if((l|0)==(f|0)){i=j;return}m=b+884|0;n=b+364|0;o=b+368|0;p=k|0;q=h;h=b+72|0;b=k+1|0;r=k+2|0;s=k+3|0;k=l;while(1){l=d[k]|0;t=m+(l<<2)+1|0;u=a[m+(l<<2)|0]|0;l=u<<24>>24;if(u<<24>>24==0){u=Oc[c[n>>2]&255](c[o>>2]|0,k)|0;do{if((u|0)<0){v=0}else{if((u|0)<128){a[p]=u;v=1;break}if((u|0)<2048){a[p]=u>>>6|192;a[b]=u&63|128;v=2;break}if((u|0)<65536){a[p]=u>>>12|224;a[b]=u>>>6&63|128;a[r]=u&63|128;v=3;break}if((u|0)>=1114112){v=0;break}a[p]=u>>>18|240;a[b]=u>>>12&63|128;a[r]=u>>>6&63|128;a[s]=u&63|128;v=4}}while(0);if((v|0)>(q-(c[g>>2]|0)|0)){w=20;break}u=c[e>>2]|0;x=p;y=v;z=u+((d[h+(d[u]|0)|0]|0)-3)|0}else{if((l|0)>(q-(c[g>>2]|0)|0)){w=20;break}x=t;y=l;z=k+1|0}c[e>>2]=z;u=x;A=y;while(1){B=a[u]|0;C=c[g>>2]|0;c[g>>2]=C+1;a[C]=B;B=A-1|0;if((B|0)==0){break}else{u=u+1|0;A=B}}A=c[e>>2]|0;if((A|0)==(f|0)){w=20;break}else{k=A}}if((w|0)==20){i=j;return}}function Ye(a,e,f,g,h){a=a|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;i=c[e>>2]|0;if((i|0)==(f|0)){return}j=a+372|0;k=a+364|0;l=a+368|0;m=a+72|0;a=i;while(1){if((c[g>>2]|0)==(h|0)){n=8;break}i=b[j+((d[a]|0)<<1)>>1]|0;if(i<<16>>16==0){o=(Oc[c[k>>2]&255](c[l>>2]|0,a)|0)&65535;p=c[e>>2]|0;q=o;r=p+((d[m+(d[p]|0)|0]|0)-3)|0}else{q=i;r=a+1|0}c[e>>2]=r;i=c[g>>2]|0;c[g>>2]=i+2;b[i>>1]=q;i=c[e>>2]|0;if((i|0)==(f|0)){n=8;break}else{a=i}}if((n|0)==8){return}}function Ze(){return 21056}function _e(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;do{if((e|0)==0){f=6}else{g=0;a:while(1){h=c[25544+(g<<2)>>2]|0;i=e;while(1){j=a[i]|0;k=a[h]|0;l=(j-97&255)>>>0<26>>>0?j-32&255:j;if(l<<24>>24!=((k-97&255)>>>0<26>>>0?k-32&255:k)<<24>>24){break}if(l<<24>>24==0){break a}else{h=h+1|0;i=i+1|0}}i=g+1|0;if((i|0)<6){g=i}else{m=0;n=8;break}}if((n|0)==8){return m|0}if((g|0)==-1){m=0}else{f=g&255;break}return m|0}}while(0);a[b+69|0]=f;c[b>>2]=46;c[b+4>>2]=64;c[b+48>>2]=14;c[b+72>>2]=d;c[d>>2]=b;m=1;return m|0}function $e(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return wg(a,0,b,c,d)|0}function af(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return wg(a,1,b,c,d)|0}function bf(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0;if(e>>>0>=f>>>0){return}b=g+4|0;h=g|0;g=e;while(1){switch(d[672+(d[g]|0)|0]|0){case 7:{i=g+4|0;break};case 10:{c[b>>2]=-1;c[h>>2]=(c[h>>2]|0)+1;i=g+1|0;break};case 6:{i=g+3|0;break};case 9:{c[h>>2]=(c[h>>2]|0)+1;e=g+1|0;if((e|0)==(f|0)){j=f}else{j=(a[672+(d[e]|0)|0]|0)==10?g+2|0:e}c[b>>2]=-1;i=j;break};case 5:{i=g+2|0;break};default:{i=g+1|0}}c[b>>2]=(c[b>>2]|0)+1;if(i>>>0<f>>>0){g=i}else{break}}return}function cf(b,d,e,f,g,h,j,k,l,m){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;k=k|0;l=l|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0;n=i;i=i+216|0;o=n|0;p=n+8|0;q=n+16|0;r=n+24|0;s=n+152|0;t=n+160|0;u=n+168|0;v=n+176|0;w=n+184|0;x=n+192|0;y=n+200|0;z=n+208|0;c[x>>2]=0;c[y>>2]=0;c[z>>2]=0;A=d+64|0;B=c[A>>2]|0;C=e+(B*5|0)|0;c[w>>2]=C;e=f+(-(B<<1)|0)|0;B=(vg(d,C,e,y,z,x,w)|0)!=0;C=c[y>>2]|0;a:do{if(B&(C|0)!=0){f=d+24|0;D=c[z>>2]|0;do{if((Sc[c[f>>2]&127](d,C,D,172768)|0)==0){if((b|0)!=0){E=C;F=D;break}c[g>>2]=C;G=0;break a}else{if((h|0)!=0){c[h>>2]=c[x>>2]}H=c[w>>2]|0;if((j|0)!=0){c[j>>2]=H}if((vg(d,H,e,y,z,x,w)|0)==0){c[g>>2]=c[w>>2];G=0;break a}H=c[y>>2]|0;if((H|0)!=0){E=H;F=c[z>>2]|0;break}if((b|0)==0){G=1;break a}c[g>>2]=c[w>>2];G=0;break a}}while(0);if((Sc[c[f>>2]&127](d,E,F,172800)|0)==0){I=E;J=F}else{D=c[x>>2]|0;H=u|0;c[t>>2]=D;c[v>>2]=H;K=d+56|0;Bc[c[K>>2]&63](d,t,e,v,u+1|0);if((c[v>>2]|0)==(H|0)){L=-1}else{L=a[H]|0}if(!((L-97|0)>>>0<26>>>0|(L-65|0)>>>0<26>>>0)){c[g>>2]=D;G=0;break}if((k|0)!=0){c[k>>2]=D}H=c[w>>2]|0;if((l|0)!=0){M=H+(-(c[A>>2]|0)|0)|0;N=r|0;c[q>>2]=D;c[s>>2]=N;Bc[c[K>>2]&63](d,q,M,s,r+127|0);b:do{if((c[q>>2]|0)==(M|0)){a[c[s>>2]|0]=0;K=172856;D=N;while(1){O=a[D]|0;P=a[K]|0;Q=(O-97&255)>>>0<26>>>0?O-32&255:O;if(Q<<24>>24!=((P-97&255)>>>0<26>>>0?P-32&255:P)<<24>>24){R=0;break}if(Q<<24>>24==0){S=28;break}else{K=K+1|0;D=D+1|0}}if((S|0)==28){if((c[A>>2]|0)==2){T=d;break}else{R=0}}c:while(1){D=c[25544+(R<<2)>>2]|0;K=N;while(1){Q=a[K]|0;P=a[D]|0;O=(Q-97&255)>>>0<26>>>0?Q-32&255:Q;if(O<<24>>24!=((P-97&255)>>>0<26>>>0?P-32&255:P)<<24>>24){break}if(O<<24>>24==0){break c}else{D=D+1|0;K=K+1|0}}K=R+1|0;if((K|0)<6){R=K}else{T=0;break b}}if((R|0)==-1){T=0;break}T=c[28632+(R<<2)>>2]|0}else{T=0}}while(0);c[l>>2]=T}if((vg(d,H,e,y,z,x,w)|0)==0){c[g>>2]=c[w>>2];G=0;break}N=c[y>>2]|0;if((N|0)==0){G=1;break}I=N;J=c[z>>2]|0}if(!((Sc[c[f>>2]&127](d,I,J,172776)|0)!=0&(b|0)==0)){c[g>>2]=I;G=0;break}N=c[x>>2]|0;M=c[w>>2]|0;do{if((Sc[c[f>>2]&127](d,N,M+(-(c[A>>2]|0)|0)|0,172760)|0)==0){if((Sc[c[f>>2]&127](d,N,M+(-(c[A>>2]|0)|0)|0,172792)|0)==0){c[g>>2]=N;G=0;break a}if((m|0)==0){break}c[m>>2]=0}else{if((m|0)==0){break}c[m>>2]=1}}while(0);N=u|0;c[o>>2]=M;c[p>>2]=N;f=d+56|0;H=u+1|0;Bc[c[f>>2]&63](d,o,e,p,H);d:do{if((c[p>>2]|0)==(N|0)){U=M}else{K=M;while(1){D=a[N]|0;if(!((D|0)==32|(D|0)==13|(D|0)==10|(D|0)==9)){U=K;break d}D=K+(c[A>>2]|0)|0;c[w>>2]=D;c[o>>2]=D;c[p>>2]=N;Bc[c[f>>2]&63](d,o,e,p,H);if((c[p>>2]|0)==(N|0)){U=D;break}else{K=D}}}}while(0);if((U|0)==(e|0)){G=1;break}c[g>>2]=U;G=0}else{c[g>>2]=c[w>>2];G=0}}while(0);i=n;return G|0}function df(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0;if((e|0)==(f|0)){h=-4;return h|0}i=e;j=f-i|0;do{if((j&1|0)==0){k=f}else{l=j&-2;if((l|0)==0){h=-1;return h|0}else{k=e+l|0;break}}}while(0);j=a[e+1|0]|0;f=a[e]|0;a:do{if(j<<24>>24==0){l=f&255;m=b+72|0;b:do{switch(d[m+l|0]|0){case 20:{c[g>>2]=e+2;h=25;return h|0};case 4:{n=e+2|0;if((n|0)==(k|0)){h=-26;return h|0}do{if((a[e+3|0]|0)==0){if((a[n]|0)!=93){break}o=e+4|0;if((o|0)==(k|0)){h=-1;return h|0}if((a[e+5|0]|0)!=0){break}if((a[o]|0)!=62){break}c[g>>2]=e+6;h=34;return h|0}}while(0);c[g>>2]=n;h=26;return h|0};case 35:{c[g>>2]=e+2;h=38;return h|0};case 2:{o=e+2|0;if((o|0)==(k|0)){h=-1;return h|0}p=a[e+3|0]|0;q=a[o]|0;c:do{if(p<<24>>24==0){switch(d[m+(q&255)|0]|0){case 15:{h=xf(b,e+4|0,k,g)|0;return h|0};case 22:case 24:case 29:case 5:case 6:case 7:{r=73;break c;break};case 16:{break};default:{r=74;break c}}s=e+4|0;if((s|0)==(k|0)){h=-1;return h|0}do{if((a[e+5|0]|0)==0){t=d[m+(d[s]|0)|0]|0;if((t|0)==22|(t|0)==24){u=e+6|0;if((u|0)==(k|0)){h=-1;return h|0}else{v=s;w=u}d:while(1){if((a[v+3|0]|0)!=0){r=71;break}switch(d[m+(d[w]|0)|0]|0){case 21:case 9:case 10:{break d;break};case 30:{r=66;break d;break};case 22:case 24:{break};default:{r=71;break d}}u=w+2|0;if((u|0)==(k|0)){h=-1;r=175;break}else{v=w;w=u}}do{if((r|0)==66){u=v+4|0;if((u|0)==(k|0)){h=-1;return h|0}if((a[v+5|0]|0)!=0){break}x=d[m+(d[u]|0)|0]|0;if(!((x|0)==21|(x|0)==9|(x|0)==10|(x|0)==30)){break}c[g>>2]=w;h=0;return h|0}else if((r|0)==71){c[g>>2]=w;h=0;return h|0}else if((r|0)==175){return h|0}}while(0);c[g>>2]=w;h=16;return h|0}else if((t|0)==27){h=wf(b,e+6|0,k,g)|0;return h|0}else if((t|0)==20){c[g>>2]=e+6;h=33;return h|0}else{break}}}while(0);c[g>>2]=s;h=0;return h|0}else{switch(p&255|0){case 255:{break};case 223:case 222:case 221:case 220:{r=74;break c;break};default:{r=73;break c}}if(((q&255)-254|0)>>>0<2>>>0){r=74}else{r=73}}}while(0);if((r|0)==73){c[g>>2]=e;h=29;return h|0}else if((r|0)==74){c[g>>2]=o;h=0;return h|0}break};case 31:{c[g>>2]=e+2;h=23;return h|0};case 32:{q=e+2|0;if((q|0)==(k|0)){h=-24;return h|0}e:do{if((a[e+3|0]|0)==0){switch(d[m+(d[q]|0)|0]|0){case 15:{c[g>>2]=e+4;h=35;return h|0};case 34:{c[g>>2]=e+4;h=37;return h|0};case 33:{c[g>>2]=e+4;h=36;return h|0};case 9:case 10:case 21:case 11:case 35:case 36:case 32:{c[g>>2]=q;h=24;return h|0};default:{break e}}}}while(0);c[g>>2]=q;h=0;return h|0};case 9:{if((e+2|0)!=(k|0)){break b}c[g>>2]=k;h=-15;return h|0};case 30:{h=vf(b,e+2|0,k,g)|0;return h|0};case 5:{if((k-i|0)<2){h=-2;return h|0}c[g>>2]=e;h=0;return h|0};case 25:case 26:case 27:{y=19;break a;break};case 29:{z=0;A=l;r=144;break a;break};case 11:{c[g>>2]=e+2;h=17;return h|0};case 19:{o=e+2|0;if((o|0)==(k|0)){h=-1;return h|0}p=a[e+3|0]|0;n=a[o]|0;f:do{if(p<<24>>24==0){x=n&255;switch(d[m+x|0]|0){case 7:{r=118;break f;break};case 22:case 24:{break f;break};case 29:{B=0;C=x;r=112;break f;break};case 5:{if((k-o|0)<2){h=-2;return h|0}c[g>>2]=o;h=0;return h|0};case 6:{if((k-o|0)<3){h=-2;return h|0}c[g>>2]=o;h=0;return h|0};default:{r=120;break f}}}else{x=p&255;switch(x|0){case 255:{u=n&255;if((u-254|0)>>>0<2>>>0){r=120;break f}else{B=255;C=u;r=112;break f}break};case 216:case 217:case 218:case 219:{r=118;break f;break};case 220:case 221:case 222:case 223:{r=120;break f;break};default:{B=x;C=n&255;r=112;break f}}}}while(0);do{if((r|0)==112){if((c[18232+((d[17968+B|0]<<3|C>>>5)<<2)>>2]&1<<(C&31)|0)!=0){break}c[g>>2]=o;h=0;return h|0}else if((r|0)==118){if((k-o|0)<4){h=-2;return h|0}c[g>>2]=o;h=0;return h|0}else if((r|0)==120){c[g>>2]=o;h=0;return h|0}}while(0);n=e+4|0;if((n|0)==(k|0)){h=-20;return h|0}else{D=o;E=n}g:while(1){n=a[D+3|0]|0;p=a[E]|0;h:do{if(n<<24>>24==0){q=p&255;switch(d[m+q|0]|0){case 29:{F=0;G=q;r=126;break};case 22:case 24:case 25:case 26:case 27:{break};case 6:{r=131;break g;break};case 7:{r=133;break g;break};case 9:case 10:case 21:case 32:case 11:case 30:case 36:{r=135;break g;break};case 5:{r=129;break g;break};default:{r=136;break g}}}else{q=n&255;switch(q|0){case 216:case 217:case 218:case 219:{r=133;break g;break};case 255:{x=p&255;if((x-254|0)>>>0<2>>>0){r=136;break g}else{F=255;G=x;r=126;break h}break};case 220:case 221:case 222:case 223:{r=136;break g;break};default:{F=q;G=p&255;r=126;break h}}}}while(0);if((r|0)==126){r=0;if((c[18232+((d[19512+F|0]<<3|G>>>5)<<2)>>2]&1<<(G&31)|0)==0){r=128;break}}p=E+2|0;if((p|0)==(k|0)){h=-20;r=175;break}else{D=E;E=p}}if((r|0)==128){c[g>>2]=E;h=0;return h|0}else if((r|0)==129){if((k-E|0)<2){h=-2;return h|0}c[g>>2]=E;h=0;return h|0}else if((r|0)==131){if((k-E|0)<3){h=-2;return h|0}c[g>>2]=E;h=0;return h|0}else if((r|0)==133){if((k-E|0)<4){h=-2;return h|0}c[g>>2]=E;h=0;return h|0}else if((r|0)==135){c[g>>2]=E;h=20;return h|0}else if((r|0)==136){c[g>>2]=E;h=0;return h|0}else if((r|0)==175){return h|0}break};case 21:case 10:{break};case 12:{o=e+2|0;if((o|0)==(k|0)){h=-1;return h|0}p=k;n=o;i:while(1){o=a[n+1|0]|0;s=a[n]|0;j:do{if(o<<24>>24==0){q=a[m+(s&255)|0]|0;switch(q&255|0){case 5:{if((p-n|0)<2){h=-2;r=175;break i}H=n+2|0;break j;break};case 0:case 1:case 8:{r=23;break i;break};case 12:case 13:{I=n+2|0;if(q<<24>>24==12){r=25;break i}else{H=I;break j}break};case 7:{r=21;break j;break};case 6:{if((p-n|0)<3){h=-2;r=175;break i}H=n+3|0;break j;break};default:{r=29;break j}}}else{switch(o&255|0){case 255:{break};case 220:case 221:case 222:case 223:{r=23;break i;break};case 216:case 217:case 218:case 219:{r=21;break j;break};default:{r=29;break j}}if(((s&255)-254|0)>>>0<2>>>0){r=23;break i}else{r=29}}}while(0);if((r|0)==21){r=0;if((p-n|0)<4){h=-2;r=175;break}H=n+4|0}else if((r|0)==29){r=0;H=n+2|0}if((H|0)==(k|0)){h=-1;r=175;break}else{n=H}}if((r|0)==23){c[g>>2]=n;h=0;return h|0}else if((r|0)==25){if((I|0)==(k|0)){h=-27;return h|0}c[g>>2]=I;k:do{if((a[n+3|0]|0)==0){switch(d[m+(d[I]|0)|0]|0){case 21:case 9:case 10:case 11:case 30:case 20:{h=27;break};default:{break k}}return h|0}}while(0);h=0;return h|0}else if((r|0)==175){return h|0}break};case 6:{if((k-i|0)<3){h=-2;return h|0}c[g>>2]=e;h=0;return h|0};case 7:{r=141;break a;break};case 22:case 24:{y=18;break a;break};case 36:{c[g>>2]=e+2;h=21;return h|0};case 13:{n=e+2|0;if((n|0)==(k|0)){h=-1;return h|0}p=k;s=n;l:while(1){n=a[s+1|0]|0;o=a[s]|0;m:do{if(n<<24>>24==0){q=a[m+(o&255)|0]|0;switch(q&255|0){case 6:{if((p-s|0)<3){h=-2;r=175;break l}J=s+3|0;break m;break};case 5:{if((p-s|0)<2){h=-2;r=175;break l}J=s+2|0;break m;break};case 7:{r=41;break m;break};case 0:case 1:case 8:{r=43;break l;break};case 12:case 13:{K=s+2|0;if(q<<24>>24==13){r=45;break l}else{J=K;break m}break};default:{r=49;break m}}}else{switch(n&255|0){case 255:{break};case 216:case 217:case 218:case 219:{r=41;break m;break};case 220:case 221:case 222:case 223:{r=43;break l;break};default:{r=49;break m}}if(((o&255)-254|0)>>>0<2>>>0){r=43;break l}else{r=49}}}while(0);if((r|0)==41){r=0;if((p-s|0)<4){h=-2;r=175;break}J=s+4|0}else if((r|0)==49){r=0;J=s+2|0}if((J|0)==(k|0)){h=-1;r=175;break}else{s=J}}if((r|0)==43){c[g>>2]=s;h=0;return h|0}else if((r|0)==45){if((K|0)==(k|0)){h=-27;return h|0}c[g>>2]=K;n:do{if((a[s+3|0]|0)==0){switch(d[m+(d[K]|0)|0]|0){case 21:case 9:case 10:case 11:case 30:case 20:{h=27;break};default:{break n}}return h|0}}while(0);h=0;return h|0}else if((r|0)==175){return h|0}break};default:{r=148;break a}}}while(0);l=e+2|0;o:do{if((l|0)!=(k|0)){s=e;p=l;while(1){if((a[s+3|0]|0)!=0){break}o=d[m+(d[p]|0)|0]|0;if((o|0)==9){if((s+4|0)==(k|0)){break}}else if(!((o|0)==21|(o|0)==10)){break}o=p+2|0;if((o|0)==(k|0)){break o}else{s=p;p=o}}c[g>>2]=p;h=15;return h|0}}while(0);c[g>>2]=k;h=15;return h|0}else{m=j&255;switch(m|0){case 220:case 221:case 222:case 223:{r=148;break a;break};case 216:case 217:case 218:case 219:{r=141;break a;break};case 255:{l=f&255;if((l-254|0)>>>0<2>>>0){r=148;break a}else{z=255;A=l;r=144;break a}break};default:{z=m;A=f&255;r=144;break a}}}}while(0);do{if((r|0)==141){if((k-i|0)<4){h=-2;return h|0}c[g>>2]=e;h=0;return h|0}else if((r|0)==144){f=A>>>5;j=1<<(A&31);if((j&c[18232+((f|d[17968+z|0]<<3)<<2)>>2]|0)!=0){y=18;break}if((c[18232+((d[19512+z|0]<<3|f)<<2)>>2]&j|0)==0){r=148}else{y=19}}}while(0);if((r|0)==148){c[g>>2]=e;h=0;return h|0}z=e+2|0;p:do{if((z|0)!=(k|0)){A=b+72|0;i=e;j=z;q:while(1){f=a[i+3|0]|0;K=a[j]|0;r:do{if(f<<24>>24==0){J=K&255;switch(d[A+J|0]|0){case 29:{L=0;M=J;r=154;break};case 22:case 24:case 25:case 26:case 27:{break};case 34:{r=164;break q;break};case 33:{r=167;break q;break};case 15:{r=170;break q;break};case 6:{r=159;break q;break};case 7:{r=161;break q;break};case 11:case 32:case 35:case 36:case 20:case 30:case 21:case 9:case 10:{r=163;break q;break};case 5:{r=157;break q;break};default:{r=173;break q}}}else{J=f&255;switch(J|0){case 216:case 217:case 218:case 219:{r=161;break q;break};case 255:{I=K&255;if((I-254|0)>>>0<2>>>0){r=173;break q}else{L=255;M=I;r=154;break r}break};case 220:case 221:case 222:case 223:{r=173;break q;break};default:{L=J;M=K&255;r=154;break r}}}}while(0);if((r|0)==154){r=0;if((1<<(M&31)&c[18232+((M>>>5|d[19512+L|0]<<3)<<2)>>2]|0)==0){r=156;break}}K=j+2|0;if((K|0)==(k|0)){break p}else{i=j;j=K}}if((r|0)==156){c[g>>2]=j;h=0;return h|0}else if((r|0)==157){if((k-j|0)<2){h=-2;return h|0}c[g>>2]=j;h=0;return h|0}else if((r|0)==159){if((k-j|0)<3){h=-2;return h|0}c[g>>2]=j;h=0;return h|0}else if((r|0)==161){if((k-j|0)<4){h=-2;return h|0}c[g>>2]=j;h=0;return h|0}else if((r|0)==163){c[g>>2]=j;h=y;return h|0}else if((r|0)==164){if((y|0)==19){c[g>>2]=j;h=0;return h|0}else{c[g>>2]=i+4;h=32;return h|0}}else if((r|0)==167){if((y|0)==19){c[g>>2]=j;h=0;return h|0}else{c[g>>2]=i+4;h=31;return h|0}}else if((r|0)==170){if((y|0)==19){c[g>>2]=j;h=0;return h|0}else{c[g>>2]=i+4;h=30;return h|0}}else if((r|0)==173){c[g>>2]=j;h=0;return h|0}}}while(0);h=-y|0;return h|0}function ef(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0;h=i;i=i+8|0;j=h|0;a:do{if((e|0)==(f|0)){k=-4}else{l=e;m=f-l|0;if((m&1|0)==0){n=f}else{o=m&-2;if((o|0)==0){k=-1;break}n=e+o|0}o=a[e+1|0]|0;m=a[e]|0;b:do{if(o<<24>>24==0){p=b+72|0;switch(d[p+(m&255)|0]|0){case 0:case 1:case 8:{q=208;break b;break};case 2:{r=e+2|0;if((r|0)==(n|0)){k=-1;break a}s=a[e+3|0]|0;t=a[r]|0;c:do{if(s<<24>>24==0){u=t&255;switch(d[p+u|0]|0){case 15:{k=xf(b,e+4|0,n,g)|0;break a;break};case 17:{v=e+4|0;if((v|0)==(n|0)){k=-1;break a}w=a[e+5|0]|0;x=a[v]|0;d:do{if(w<<24>>24==0){y=x&255;switch(d[p+y|0]|0){case 5:{if((n-v|0)<2){k=-2;break a}c[g>>2]=v;k=0;break a;break};case 22:case 24:{break d;break};case 29:{z=0;A=y;q=43;break d;break};case 7:{q=49;break d;break};case 6:{if((n-v|0)<3){k=-2;break a}c[g>>2]=v;k=0;break a;break};default:{q=51;break d}}}else{y=w&255;switch(y|0){case 220:case 221:case 222:case 223:{q=51;break d;break};case 216:case 217:case 218:case 219:{q=49;break d;break};case 255:{B=x&255;if((B-254|0)>>>0<2>>>0){q=51;break d}else{z=255;A=B;q=43;break d}break};default:{z=y;A=x&255;q=43;break d}}}}while(0);do{if((q|0)==43){if((c[18232+((d[17968+z|0]<<3|A>>>5)<<2)>>2]&1<<(A&31)|0)!=0){break}c[g>>2]=v;k=0;break a}else if((q|0)==49){if((n-v|0)<4){k=-2;break a}c[g>>2]=v;k=0;break a}else if((q|0)==51){c[g>>2]=v;k=0;break a}}while(0);x=e+6|0;if((x|0)==(n|0)){k=-1;break a}else{C=v;D=x}e:while(1){x=a[C+3|0]|0;w=a[D]|0;f:do{if(x<<24>>24==0){y=w&255;switch(d[p+y|0]|0){case 29:{E=0;F=y;q=57;break};case 6:{q=62;break e;break};case 11:{q=72;break e;break};case 22:case 24:case 25:case 26:case 27:{break};case 7:{q=64;break e;break};case 21:case 9:case 10:{q=66;break e;break};case 5:{q=60;break e;break};default:{q=73;break e}}}else{y=x&255;switch(y|0){case 255:{B=w&255;if((B-254|0)>>>0<2>>>0){q=73;break e}else{E=255;F=B;q=57;break f}break};case 216:case 217:case 218:case 219:{q=64;break e;break};case 220:case 221:case 222:case 223:{q=73;break e;break};default:{E=y;F=w&255;q=57;break f}}}}while(0);if((q|0)==57){q=0;if((c[18232+((d[19512+E|0]<<3|F>>>5)<<2)>>2]&1<<(F&31)|0)==0){q=59;break}}w=D+2|0;if((w|0)==(n|0)){k=-1;break a}else{C=D;D=w}}if((q|0)==59){c[g>>2]=D;k=0;break a}else if((q|0)==60){if((n-D|0)<2){k=-2;break a}c[g>>2]=D;k=0;break a}else if((q|0)==62){if((n-D|0)<3){k=-2;break a}c[g>>2]=D;k=0;break a}else if((q|0)==64){if((n-D|0)<4){k=-2;break a}c[g>>2]=D;k=0;break a}else if((q|0)==66){v=C+4|0;if((v|0)==(n|0)){k=-1;break a}else{G=v}while(1){if((a[G+1|0]|0)!=0){q=70;break}v=d[p+(d[G]|0)|0]|0;if((v|0)==11){q=69;break}else if(!((v|0)==21|(v|0)==9|(v|0)==10)){q=70;break}v=G+2|0;if((v|0)==(n|0)){k=-1;break a}else{G=v}}if((q|0)==69){c[g>>2]=G+2;k=5;break a}else if((q|0)==70){c[g>>2]=G;k=0;break a}}else if((q|0)==72){c[g>>2]=C+4;k=5;break a}else if((q|0)==73){c[g>>2]=D;k=0;break a}break};case 7:{q=22;break c;break};case 5:{if((n-r|0)<2){k=-2;break a}c[g>>2]=r;k=0;break a;break};case 16:{v=e+4|0;if((v|0)==(n|0)){k=-1;break a}do{if((a[e+5|0]|0)==0){w=d[p+(d[v]|0)|0]|0;if((w|0)==27){k=wf(b,e+6|0,n,g)|0;break a}else if((w|0)!=20){break}w=e+6|0;if((n-w|0)<12){k=-1;break a}else{H=w;I=0}while(1){if((a[H+1|0]|0)!=0){q=31;break}if((a[H]|0)!=(a[17816+I|0]|0)){q=31;break}w=I+1|0;J=H+2|0;if((w|0)<6){H=J;I=w}else{q=33;break}}if((q|0)==31){c[g>>2]=H;k=0;break a}else if((q|0)==33){c[g>>2]=J;k=8;break a}}}while(0);c[g>>2]=v;k=0;break a;break};case 6:{if((n-r|0)<3){k=-2;break a}c[g>>2]=r;k=0;break a;break};case 22:case 24:{break c;break};case 29:{K=0;L=u;q=16;break c;break};default:{q=74;break c}}}else{w=s&255;switch(w|0){case 216:case 217:case 218:case 219:{q=22;break c;break};case 255:{x=t&255;if((x-254|0)>>>0<2>>>0){q=74;break c}else{K=255;L=x;q=16;break c}break};case 220:case 221:case 222:case 223:{q=74;break c;break};default:{K=w;L=t&255;q=16;break c}}}}while(0);do{if((q|0)==16){if((c[18232+((d[17968+K|0]<<3|L>>>5)<<2)>>2]&1<<(L&31)|0)!=0){break}c[g>>2]=r;k=0;break a}else if((q|0)==22){if((n-r|0)<4){k=-2;break a}c[g>>2]=r;k=0;break a}else if((q|0)==74){c[g>>2]=r;k=0;break a}}while(0);t=e+4|0;if((t|0)==(n|0)){k=-1;break a}else{M=r;N=t}g:while(1){t=a[M+3|0]|0;s=a[N]|0;h:do{if(t<<24>>24==0){w=s&255;switch(d[p+w|0]|0){case 5:{q=83;break g;break};case 22:case 24:case 25:case 26:case 27:{break};case 6:{q=85;break g;break};case 17:{O=N;break g;break};case 7:{q=87;break g;break};case 21:case 9:case 10:{q=89;break g;break};case 11:{P=N;q=182;break g;break};case 29:{Q=0;R=w;q=80;break};default:{q=188;break g}}}else{w=t&255;switch(w|0){case 220:case 221:case 222:case 223:{q=188;break g;break};case 216:case 217:case 218:case 219:{q=87;break g;break};case 255:{x=s&255;if((x-254|0)>>>0<2>>>0){q=188;break g}else{Q=255;R=x;q=80;break h}break};default:{Q=w;R=s&255;q=80;break h}}}}while(0);if((q|0)==80){q=0;if((c[18232+((d[19512+Q|0]<<3|R>>>5)<<2)>>2]&1<<(R&31)|0)==0){q=82;break}}s=N+2|0;if((s|0)==(n|0)){k=-1;break a}else{M=N;N=s}}i:do{if((q|0)==82){c[g>>2]=N;k=0;break a}else if((q|0)==83){if((n-N|0)<2){k=-2;break a}c[g>>2]=N;k=0;break a}else if((q|0)==85){if((n-N|0)<3){k=-2;break a}c[g>>2]=N;k=0;break a}else if((q|0)==87){if((n-N|0)<4){k=-2;break a}c[g>>2]=N;k=0;break a}else if((q|0)==89){r=M+4|0;if((r|0)==(n|0)){k=-1;break a}else{S=r}j:while(1){T=a[S+1|0]|0;U=a[S]|0;if(T<<24>>24!=0){q=91;break}r=U&255;switch(d[p+r|0]|0){case 29:{V=0;W=r;q=95;break j;break};case 22:case 24:{break j;break};case 5:{q=174;break j;break};case 7:{q=178;break j;break};case 17:{O=S;break i;break};case 21:case 9:case 10:{break};case 11:{P=S;q=182;break i;break};case 6:{q=176;break j;break};default:{q=181;break j}}r=S+2|0;if((r|0)==(n|0)){k=-1;break a}else{S=r}}k:do{if((q|0)==91){r=T&255;switch(r|0){case 255:{s=U&255;if((s-254|0)>>>0<2>>>0){q=181;break k}else{V=255;W=s;q=95;break k}break};case 216:case 217:case 218:case 219:{q=178;break k;break};case 220:case 221:case 222:case 223:{q=181;break k;break};default:{V=r;W=U&255;q=95;break k}}}else if((q|0)==174){if((n-S|0)<2){k=-2;break a}c[g>>2]=S;k=0;break a}else if((q|0)==176){if((n-S|0)<3){k=-2;break a}c[g>>2]=S;k=0;break a}}while(0);do{if((q|0)==95){if((c[18232+((d[17968+V|0]<<3|W>>>5)<<2)>>2]&1<<(W&31)|0)!=0){break}c[g>>2]=S;k=0;break a}else if((q|0)==178){if((n-S|0)<4){k=-2;break a}c[g>>2]=S;k=0;break a}else if((q|0)==181){c[g>>2]=S;k=0;break a}}while(0);r=S+2|0;c[j>>2]=r;if((r|0)==(n|0)){k=-1;break a}s=n;t=r;l:while(1){r=a[t+1|0]|0;u=a[t]|0;m:do{if(r<<24>>24==0){v=u&255;n:do{switch(d[p+v|0]|0){case 6:{q=109;break l;break};case 29:{X=0;Y=v;q=105;break m;break};case 5:{q=107;break l;break};case 21:case 9:case 10:{w=t+2|0;c[j>>2]=w;if((w|0)==(n|0)){k=-1;break a}else{Z=t;_=w}while(1){if((a[Z+3|0]|0)!=0){q=116;break l}w=d[p+(d[_]|0)|0]|0;if((w|0)==14){$=_;break n}else if(!((w|0)==21|(w|0)==10|(w|0)==9)){q=116;break l}w=_+2|0;c[j>>2]=w;if((w|0)==(n|0)){k=-1;break a}else{Z=_;_=w}}break};case 7:{q=111;break l;break};case 22:case 24:case 25:case 26:case 27:{aa=t;break m;break};case 14:{$=t;break};default:{q=173;break l}}}while(0);v=$+2|0;c[j>>2]=v;if((v|0)==(n|0)){k=-1;break a}else{ba=$;ca=v}while(1){if((a[ba+3|0]|0)!=0){q=122;break l}da=d[p+(d[ca]|0)|0]|0;if((da&254|0)==12){break}if(!((da|0)==21|(da|0)==10|(da|0)==9)){q=122;break l}v=ca+2|0;c[j>>2]=v;if((v|0)==(n|0)){k=-1;break a}else{ba=ca;ca=v}}v=ca+2|0;c[j>>2]=v;if((v|0)==(n|0)){k=-1;break a}else{ea=v}while(1){v=a[ea+1|0]|0;w=a[ea]|0;o:do{if(v<<24>>24==0){fa=d[p+(w&255)|0]|0}else{switch(v&255|0){case 216:case 217:case 218:case 219:{fa=7;break o;break};case 220:case 221:case 222:case 223:{fa=8;break o;break};case 255:{if(((w&255)-254|0)>>>0<2>>>0){fa=0;break o}break};default:{}}fa=29}}while(0);if((fa|0)==(da|0)){break}switch(fa|0){case 5:{if((s-ea|0)<2){k=-2;break a}w=ea+2|0;c[j>>2]=w;ga=w;break};case 6:{if((s-ea|0)<3){k=-2;break a}w=ea+3|0;c[j>>2]=w;ga=w;break};case 2:{q=144;break l;break};case 0:case 1:case 8:{q=138;break l;break};case 3:{ha=uf(b,ea+2|0,n,j)|0;if((ha|0)<1){q=142;break l}ga=c[j>>2]|0;break};case 7:{if((s-ea|0)<4){k=-2;break a}w=ea+4|0;c[j>>2]=w;ga=w;break};default:{w=ea+2|0;c[j>>2]=w;ga=w}}if((ga|0)==(n|0)){k=-1;break a}else{ea=ga}}ia=ea+2|0;c[j>>2]=ia;if((ia|0)==(n|0)){k=-1;break a}if((a[ea+3|0]|0)!=0){q=150;break l}switch(d[p+(d[ia]|0)|0]|0){case 21:case 9:case 10:{break};case 11:{ja=ia;q=166;break l;break};case 17:{ka=ia;q=167;break l;break};default:{q=150;break l}}w=ea+4|0;c[j>>2]=w;if((w|0)==(n|0)){k=-1;break a}else{la=ia;ma=w}p:while(1){na=a[la+3|0]|0;oa=a[ma]|0;if(na<<24>>24!=0){q=152;break}w=oa&255;switch(d[p+w|0]|0){case 11:{ja=ma;q=166;break l;break};case 17:{ka=ma;q=167;break l;break};case 7:{q=164;break l;break};case 29:{pa=w;break p;break};case 22:case 24:{aa=ma;break m;break};case 6:{q=162;break l;break};case 5:{q=160;break l;break};case 21:case 9:case 10:{break};default:{q=172;break l}}w=ma+2|0;c[j>>2]=w;if((w|0)==(n|0)){k=-1;break a}else{la=ma;ma=w}}q:do{if((q|0)==152){q=0;switch(na&255|0){case 220:case 221:case 222:case 223:{q=172;break l;break};case 216:case 217:case 218:case 219:{q=164;break l;break};case 255:{w=oa&255;if((w-254|0)>>>0<2>>>0){q=172;break l}else{pa=w;break q}break};default:{pa=oa&255;break q}}}}while(0);if((c[18232+((d[17968+(d[ma+1|0]|0)|0]<<3|pa>>>5)<<2)>>2]&1<<(pa&31)|0)==0){q=158;break l}else{aa=ma}}else{w=r&255;switch(w|0){case 255:{v=u&255;if((v-254|0)>>>0<2>>>0){q=173;break l}else{X=255;Y=v;q=105;break m}break};case 220:case 221:case 222:case 223:{q=173;break l;break};case 216:case 217:case 218:case 219:{q=111;break l;break};default:{X=w;Y=u&255;q=105;break m}}}}while(0);if((q|0)==105){q=0;if((c[18232+((d[19512+X|0]<<3|Y>>>5)<<2)>>2]&1<<(Y&31)|0)==0){q=106;break}else{aa=t}}u=aa+2|0;c[j>>2]=u;if((u|0)==(n|0)){k=-1;break a}else{t=u}}if((q|0)==106){c[g>>2]=t;k=0;break a}else if((q|0)==107){if((s-t|0)<2){k=-2;break a}c[g>>2]=t;k=0;break a}else if((q|0)==109){if((s-t|0)<3){k=-2;break a}c[g>>2]=t;k=0;break a}else if((q|0)==111){if((s-t|0)<4){k=-2;break a}c[g>>2]=t;k=0;break a}else if((q|0)==116){c[g>>2]=_;k=0;break a}else if((q|0)==122){c[g>>2]=ca;k=0;break a}else if((q|0)==138){c[g>>2]=ea;k=0;break a}else if((q|0)==142){if((ha|0)!=0){k=ha;break a}c[g>>2]=c[j>>2];k=0;break a}else if((q|0)==144){c[g>>2]=ea;k=0;break a}else if((q|0)==150){c[g>>2]=ia;k=0;break a}else if((q|0)==158){c[g>>2]=ma;k=0;break a}else if((q|0)==160){if((s-ma|0)<2){k=-2;break a}c[g>>2]=ma;k=0;break a}else if((q|0)==162){if((s-ma|0)<3){k=-2;break a}c[g>>2]=ma;k=0;break a}else if((q|0)==164){if((s-ma|0)<4){k=-2;break a}c[g>>2]=ma;k=0;break a}else if((q|0)==166){c[g>>2]=ja+2;k=1;break a}else if((q|0)==167){u=ka+2|0;c[j>>2]=u;if((u|0)==(n|0)){k=-1;break a}do{if((a[ka+3|0]|0)==0){if((a[u]|0)!=62){break}c[g>>2]=ka+4;k=3;break a}}while(0);c[g>>2]=u;k=0;break a}else if((q|0)==172){c[g>>2]=ma;k=0;break a}else if((q|0)==173){c[g>>2]=t;k=0;break a}}else if((q|0)==188){c[g>>2]=N;k=0;break a}}while(0);if((q|0)==182){c[g>>2]=P+2;k=2;break a}s=O+2|0;if((s|0)==(n|0)){k=-1;break a}do{if((a[O+3|0]|0)==0){if((a[s]|0)!=62){break}c[g>>2]=O+4;k=4;break a}}while(0);c[g>>2]=s;k=0;break a;break};case 5:{if((n-l|0)<2){k=-2;break a}qa=e+2|0;break b;break};case 6:{if((n-l|0)<3){k=-2;break a}qa=e+3|0;break b;break};case 7:{q=206;break b;break};case 10:{c[g>>2]=e+2;k=7;break a;break};case 4:{r=e+2|0;if((r|0)==(n|0)){k=-5;break a}if((a[e+3|0]|0)!=0){qa=r;break b}if((a[r]|0)!=93){qa=r;break b}w=e+4|0;if((w|0)==(n|0)){k=-5;break a}if((a[e+5|0]|0)!=0){qa=r;break b}if((a[w]|0)!=62){qa=r;break b}c[g>>2]=w;k=0;break a;break};case 3:{k=uf(b,e+2|0,n,g)|0;break a;break};case 9:{w=e+2|0;if((w|0)==(n|0)){k=-3;break a}if((a[e+3|0]|0)==0){ra=(a[p+(d[w]|0)|0]|0)==10}else{ra=0}c[g>>2]=ra?e+4|0:w;k=7;break a;break};default:{q=209;break b}}}else{switch(o&255|0){case 220:case 221:case 222:case 223:{q=208;break b;break};case 216:case 217:case 218:case 219:{q=206;break b;break};case 255:{break};default:{q=209;break b}}if(((m&255)-254|0)>>>0<2>>>0){q=208}else{q=209}}}while(0);if((q|0)==206){if((n-l|0)<4){k=-2;break}qa=e+4|0}else if((q|0)==208){c[g>>2]=e;k=0;break}else if((q|0)==209){qa=e+2|0}r:do{if((qa|0)!=(n|0)){m=b+72|0;o=n;w=qa;s:while(1){r=a[w+1|0]|0;v=a[w]|0;t:do{if(r<<24>>24==0){switch(d[m+(v&255)|0]|0){case 6:{if((o-w|0)<3){q=220;break s}sa=w+3|0;break t;break};case 5:{if((o-w|0)<2){q=217;break s}sa=w+2|0;break t;break};case 7:{q=222;break t;break};case 4:{x=w+2|0;if((x|0)==(n|0)){q=232;break s}if((a[w+3|0]|0)!=0){sa=x;break t}if((a[x]|0)!=93){sa=x;break t}ta=w+4|0;if((ta|0)==(n|0)){q=232;break s}if((a[w+5|0]|0)!=0){sa=x;break t}if((a[ta]|0)==62){q=231;break s}else{sa=x;break t}break};case 3:case 2:case 0:case 1:case 8:case 9:case 10:{q=232;break s;break};default:{q=233;break t}}}else{switch(r&255|0){case 255:{break};case 216:case 217:case 218:case 219:{q=222;break t;break};case 220:case 221:case 222:case 223:{q=232;break s;break};default:{q=233;break t}}if(((v&255)-254|0)>>>0<2>>>0){q=232;break s}else{q=233}}}while(0);if((q|0)==222){q=0;if((o-w|0)<4){q=223;break}sa=w+4|0}else if((q|0)==233){q=0;sa=w+2|0}if((sa|0)==(n|0)){break r}else{w=sa}}if((q|0)==217){c[g>>2]=w;k=6;break a}else if((q|0)==220){c[g>>2]=w;k=6;break a}else if((q|0)==223){c[g>>2]=w;k=6;break a}else if((q|0)==231){c[g>>2]=ta;k=0;break a}else if((q|0)==232){c[g>>2]=w;k=6;break a}}}while(0);c[g>>2]=n;k=6}}while(0);i=h;return k|0}function ff(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;if((e|0)==(f|0)){h=-4;return h|0}i=e;j=f-i|0;do{if((j&1|0)==0){k=f}else{l=j&-2;if((l|0)==0){h=-1;return h|0}else{k=e+l|0;break}}}while(0);j=a[e+1|0]|0;f=a[e]|0;a:do{if(j<<24>>24==0){l=b+72|0;switch(d[l+(f&255)|0]|0){case 9:{m=e+2|0;if((m|0)==(k|0)){h=-1;return h|0}if((a[e+3|0]|0)==0){n=(a[l+(d[m]|0)|0]|0)==10}else{n=0}c[g>>2]=n?e+4|0:m;h=7;return h|0};case 10:{c[g>>2]=e+2;h=7;return h|0};case 5:{if((k-i|0)<2){h=-2;return h|0}else{o=e+2|0;break a}break};case 6:{if((k-i|0)<3){h=-2;return h|0}else{o=e+3|0;break a}break};case 7:{p=25;break a;break};case 0:case 1:case 8:{p=27;break a;break};case 4:{m=e+2|0;if((m|0)==(k|0)){h=-1;return h|0}if((a[e+3|0]|0)!=0){o=m;break a}if((a[m]|0)!=93){o=m;break a}l=e+4|0;if((l|0)==(k|0)){h=-1;return h|0}if((a[e+5|0]|0)!=0){o=m;break a}if((a[l]|0)!=62){o=m;break a}c[g>>2]=e+6;h=40;return h|0};default:{p=28;break a}}}else{switch(j&255|0){case 255:{break};case 216:case 217:case 218:case 219:{p=25;break a;break};case 220:case 221:case 222:case 223:{p=27;break a;break};default:{p=28;break a}}if(((f&255)-254|0)>>>0<2>>>0){p=27}else{p=28}}}while(0);do{if((p|0)==25){if((k-i|0)<4){h=-2;return h|0}else{o=e+4|0;break}}else if((p|0)==27){c[g>>2]=e;h=0;return h|0}else if((p|0)==28){o=e+2|0}}while(0);b:do{if((o|0)!=(k|0)){e=b+72|0;i=k;f=o;c:while(1){j=a[f+1|0]|0;n=a[f]|0;d:do{if(j<<24>>24==0){switch(d[e+(n&255)|0]|0){case 0:case 1:case 8:case 9:case 10:case 4:{p=44;break c;break};case 5:{if((i-f|0)<2){p=36;break c}q=f+2|0;break d;break};case 7:{p=41;break d;break};case 6:{if((i-f|0)<3){p=39;break c}q=f+3|0;break d;break};default:{p=45;break d}}}else{switch(j&255|0){case 220:case 221:case 222:case 223:{p=44;break c;break};case 255:{break};case 216:case 217:case 218:case 219:{p=41;break d;break};default:{p=45;break d}}if(((n&255)-254|0)>>>0<2>>>0){p=44;break c}else{p=45}}}while(0);if((p|0)==41){p=0;if((i-f|0)<4){p=42;break}q=f+4|0}else if((p|0)==45){p=0;q=f+2|0}if((q|0)==(k|0)){break b}else{f=q}}if((p|0)==36){c[g>>2]=f;h=6;return h|0}else if((p|0)==39){c[g>>2]=f;h=6;return h|0}else if((p|0)==42){c[g>>2]=f;h=6;return h|0}else if((p|0)==44){c[g>>2]=f;h=6;return h|0}}}while(0);c[g>>2]=k;h=6;return h|0}function gf(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0;if((e|0)==(f|0)){h=-4;return h|0}i=b+72|0;j=e;a:while(1){k=a[j+1|0]|0;b:do{if(k<<24>>24==0){switch(d[i+(d[j]|0)|0]|0){case 10:{l=13;break a;break};case 2:{l=12;break a;break};case 9:{l=16;break a;break};case 6:{m=j+3|0;break b;break};case 7:{l=8;break b;break};case 3:{l=9;break a;break};case 21:{l=22;break a;break};case 5:{m=j+2|0;break b;break};default:{l=25;break b}}}else{if(((k&255)-216|0)>>>0<4>>>0){l=8}else{l=25}}}while(0);if((l|0)==8){l=0;m=j+4|0}else if((l|0)==25){l=0;m=j+2|0}if((m|0)==(f|0)){l=27;break}else{j=m}}if((l|0)==9){if((j|0)==(e|0)){h=uf(b,e+2|0,f,g)|0;return h|0}else{c[g>>2]=j;h=6;return h|0}}else if((l|0)==12){c[g>>2]=j;h=0;return h|0}else if((l|0)==13){if((j|0)==(e|0)){c[g>>2]=e+2;h=7;return h|0}else{c[g>>2]=j;h=6;return h|0}}else if((l|0)==16){if((j|0)!=(e|0)){c[g>>2]=j;h=6;return h|0}b=e+2|0;if((b|0)==(f|0)){h=-3;return h|0}if((a[e+3|0]|0)==0){n=(a[i+(d[b]|0)|0]|0)==10}else{n=0}c[g>>2]=n?e+4|0:b;h=7;return h|0}else if((l|0)==22){if((j|0)==(e|0)){c[g>>2]=e+2;h=39;return h|0}else{c[g>>2]=j;h=6;return h|0}}else if((l|0)==27){c[g>>2]=f;h=6;return h|0}return 0}function hf(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0;if((e|0)==(f|0)){h=-4;return h|0}i=b+72|0;j=e;a:while(1){k=a[j+1|0]|0;b:do{if(k<<24>>24==0){switch(d[i+(d[j]|0)|0]|0){case 10:{l=15;break a;break};case 3:{l=9;break a;break};case 7:{l=8;break b;break};case 9:{l=18;break a;break};case 6:{m=j+3|0;break b;break};case 5:{m=j+2|0;break b;break};case 30:{l=12;break a;break};default:{l=24;break b}}}else{if(((k&255)-216|0)>>>0<4>>>0){l=8}else{l=24}}}while(0);if((l|0)==8){l=0;m=j+4|0}else if((l|0)==24){l=0;m=j+2|0}if((m|0)==(f|0)){l=26;break}else{j=m}}if((l|0)==9){if((j|0)==(e|0)){h=uf(b,e+2|0,f,g)|0;return h|0}else{c[g>>2]=j;h=6;return h|0}}else if((l|0)==12){if((j|0)==(e|0)){m=vf(b,e+2|0,f,g)|0;h=(m|0)==22?0:m;return h|0}else{c[g>>2]=j;h=6;return h|0}}else if((l|0)==15){if((j|0)==(e|0)){c[g>>2]=e+2;h=7;return h|0}else{c[g>>2]=j;h=6;return h|0}}else if((l|0)==18){if((j|0)!=(e|0)){c[g>>2]=j;h=6;return h|0}j=e+2|0;if((j|0)==(f|0)){h=-3;return h|0}if((a[e+3|0]|0)==0){n=(a[i+(d[j]|0)|0]|0)==10}else{n=0}c[g>>2]=n?e+4|0:j;h=7;return h|0}else if((l|0)==26){c[g>>2]=f;h=6;return h|0}return 0}function jf(b,c,e){b=b|0;c=c|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;f=b+72|0;b=e;e=c;a:while(1){c=e+1|0;g=a[c]|0;h=a[e]|0;b:do{if(g<<24>>24==0){switch(d[f+(h&255)|0]|0){case 5:{i=b;j=e;k=h;l=10;break};case 29:case 22:case 24:case 25:case 26:case 27:{l=12;break};case 6:{m=b;n=e;o=h;l=8;break};case 7:{l=6;break};default:{l=15;break a}}}else{switch(g&255|0){case 220:case 221:case 222:case 223:{l=15;break a;break};case 255:{break};case 216:case 217:case 218:case 219:{l=6;break b;break};default:{l=12;break b}}if(((h&255)-254|0)>>>0<2>>>0){l=15;break a}else{l=12}}}while(0);if((l|0)==6){l=0;if(h<<24>>24!=(a[b]|0)){p=0;l=20;break}m=b+1|0;n=c;o=g;l=8}else if((l|0)==12){l=0;if((a[b]|0)!=h<<24>>24){p=0;l=20;break}if((a[b+1|0]|0)==g<<24>>24){q=b;r=e}else{p=0;l=20;break}}if((l|0)==8){l=0;s=n+1|0;if(o<<24>>24!=(a[m]|0)){p=0;l=20;break}i=m+1|0;j=s;k=a[s]|0;l=10}if((l|0)==10){l=0;if(k<<24>>24!=(a[i]|0)){p=0;l=20;break}if((a[j+1|0]|0)==(a[i+1|0]|0)){q=i;r=j}else{p=0;l=20;break}}b=q+2|0;e=r+2|0}if((l|0)==15){r=a[b+1|0]|0;e=a[b]|0;c:do{if(r<<24>>24==0){switch(d[f+(e&255)|0]|0){case 5:case 6:case 7:case 29:case 22:case 24:case 25:case 26:case 27:{p=0;break};default:{break c}}return p|0}else{switch(r&255|0){case 223:case 222:case 221:case 220:{break c;break};case 255:{break};default:{p=0;return p|0}}if(((e&255)-254|0)>>>0<2>>>0){break}else{p=0}return p|0}}while(0);p=1;return p|0}else if((l|0)==20){return p|0}return 0}function kf(b,c,d,e){b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;b=a[e]|0;f=(c|0)==(d|0);a:do{if(b<<24>>24==0){g=f}else{h=c;i=e;j=b;k=f;while(1){if(k){l=0;m=7;break}if((a[h+1|0]|0)!=0){l=0;m=7;break}if((a[h]|0)!=j<<24>>24){l=0;m=7;break}n=h+2|0;o=i+1|0;p=a[o]|0;q=(n|0)==(d|0);if(p<<24>>24==0){g=q;break a}else{h=n;i=o;j=p;k=q}}if((m|0)==7){return l|0}}}while(0);l=g&1;return l|0}function lf(b,c){b=b|0;c=c|0;var e=0,f=0,g=0,h=0;e=b+72|0;b=c;a:while(1){f=a[b+1|0]|0;g=a[b]|0;b:do{if(f<<24>>24==0){switch(d[e+(g&255)|0]|0|0){case 7:{h=8;break b;break};case 29:case 22:case 24:case 25:case 26:case 27:{h=9;break b;break};case 6:{b=b+3|0;continue a;break};case 5:{b=b+2|0;continue a;break};default:{break a}}}else{switch(f&255|0){case 255:{break};case 216:case 217:case 218:case 219:{h=8;break b;break};case 220:case 221:case 222:case 223:{break a;break};default:{h=9;break b}}if(((g&255)-254|0)>>>0<2>>>0){break a}else{h=9}}}while(0);if((h|0)==8){h=0;b=b+4|0;continue}else if((h|0)==9){h=0;b=b+2|0;continue}}return b-c|0}function mf(b,c){b=b|0;c=c|0;var e=0,f=0,g=0;if((a[c+1|0]|0)!=0){e=c;return e|0}f=b+72|0;b=c;while(1){c=d[f+(d[b]|0)|0]|0;if(!((c|0)==10|(c|0)==9|(c|0)==21)){e=b;g=3;break}c=b+2|0;if((a[b+3|0]|0)==0){b=c}else{e=c;g=3;break}}if((g|0)==3){return e|0}return 0}function nf(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;h=b+72|0;b=0;i=0;j=1;k=e;a:while(1){e=k+2|0;l=k+3|0;m=a[l]|0;n=a[e]|0;b:do{if(m<<24>>24==0){switch(d[h+(n&255)|0]|0){case 21:{if((j|0)==1){b=b;i=i;j=0;k=e;continue a}if(!((j|0)==2&(i|0)<(f|0))){b=b;i=i;j=j;k=e;continue a}o=g+(i<<4)+12|0;if((a[o]|0)==0){b=b;i=i;j=2;k=e;continue a}do{if((e|0)!=(c[g+(i<<4)+4>>2]|0)&n<<24>>24==32){p=a[k+5|0]|0;q=a[k+4|0]|0;if((p<<24>>24|0)==0){if(q<<24>>24==32){break}r=d[h+(q&255)|0]|0}else if((p<<24>>24|0)==(-1|0)){if(((q&255)-254|0)>>>0<2>>>0){r=0}else{b=b;i=i;j=2;k=e;continue a}}else{b=b;i=i;j=2;k=e;continue a}if((r|0)!=(b|0)){b=b;i=i;j=2;k=e;continue a}}}while(0);a[o]=0;b=b;i=i;j=2;k=e;continue a;break};case 3:{if((i|0)>=(f|0)){b=b;i=i;j=j;k=e;continue a}a[g+(i<<4)+12|0]=0;b=b;i=i;j=j;k=e;continue a;break};case 12:{if((j|0)!=2){if((i|0)>=(f|0)){b=12;i=i;j=2;k=e;continue a}c[g+(i<<4)+4>>2]=k+4;b=12;i=i;j=2;k=e;continue a}if((b|0)!=12){b=b;i=i;j=2;k=e;continue a}if((i|0)<(f|0)){c[g+(i<<4)+8>>2]=e}b=12;i=i+1|0;j=0;k=e;continue a;break};case 5:{if((j|0)!=0){b=b;i=i;j=j;k=e;continue a}if((i|0)>=(f|0)){b=b;i=i;j=1;k=e;continue a}c[g+(i<<4)>>2]=e;a[g+(i<<4)+12|0]=1;b=b;i=i;j=1;k=e;continue a;break};case 11:case 17:{if((j|0)==2){b=b;i=i;j=2;k=e;continue a}else{break a}break};case 6:{if((j|0)!=0){b=b;i=i;j=j;k=l;continue a}if((i|0)>=(f|0)){b=b;i=i;j=1;k=l;continue a}c[g+(i<<4)>>2]=e;a[g+(i<<4)+12|0]=1;b=b;i=i;j=1;k=l;continue a;break};case 29:case 22:case 24:{s=16;break b;break};case 9:case 10:{if((j|0)==1){b=b;i=i;j=0;k=e;continue a}if(!((j|0)==2&(i|0)<(f|0))){b=b;i=i;j=j;k=e;continue a}a[g+(i<<4)+12|0]=0;b=b;i=i;j=2;k=e;continue a;break};case 13:{if((j|0)!=2){if((i|0)>=(f|0)){b=13;i=i;j=2;k=e;continue a}c[g+(i<<4)+4>>2]=k+4;b=13;i=i;j=2;k=e;continue a}if((b|0)!=13){b=b;i=i;j=2;k=e;continue a}if((i|0)<(f|0)){c[g+(i<<4)+8>>2]=e}b=13;i=i+1|0;j=0;k=e;continue a;break};case 7:{s=12;break b;break};default:{b=b;i=i;j=j;k=e;continue a}}}else{switch(m&255|0){case 255:{break};case 220:case 221:case 222:case 223:{b=b;i=i;j=j;k=e;continue a;break};case 216:case 217:case 218:case 219:{s=12;break b;break};default:{s=16;break b}}if(!(((n&255)-254|0)>>>0>1>>>0&(j|0)==0)){b=b;i=i;j=j;k=e;continue a}}}while(0);if((s|0)==12){s=0;do{if((j|0)==0){if((i|0)>=(f|0)){t=1;break}c[g+(i<<4)>>2]=e;a[g+(i<<4)+12|0]=1;t=1}else{t=j}}while(0);b=b;i=i;j=t;k=k+4|0;continue}else if((s|0)==16){s=0;if((j|0)!=0){b=b;i=i;j=j;k=e;continue}}if((i|0)>=(f|0)){b=b;i=i;j=1;k=e;continue}c[g+(i<<4)>>2]=e;a[g+(i<<4)+12|0]=1;b=b;i=i;j=1;k=e}return i|0}function of(b,c){b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;b=c+4|0;a:do{if((a[c+5|0]|0)==0){if((a[b]|0)!=120){d=b;e=0;f=11;break}g=c+6|0;h=0;while(1){b:do{if((a[g+1|0]|0)==0){i=a[g]|0;if(i<<24>>24==59){j=h;break a}k=i<<24>>24;switch(k|0){case 65:case 66:case 67:case 68:case 69:case 70:{l=(h<<4)-55+k|0;break b;break};case 97:case 98:case 99:case 100:case 101:case 102:{l=(h<<4)-87+k|0;break b;break};case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:{l=k-48|h<<4;break b;break};default:{l=h;break b}}}else{l=h}}while(0);if((l|0)>1114111){m=-1;break}else{g=g+2|0;h=l}}return m|0}else{d=b;e=0;f=11}}while(0);c:do{if((f|0)==11){while(1){f=0;if((a[d+1|0]|0)==0){b=a[d]|0;if(b<<24>>24==59){j=e;break c}n=(b<<24>>24)-48|0}else{n=-49}b=n+(e*10|0)|0;if((b|0)>1114111){m=-1;break}else{d=d+2|0;e=b;f=11}}return m|0}}while(0);d:do{switch(j>>8|0){case 0:{if((a[20496+j|0]|0)==0){m=-1}else{break d}return m|0};case 216:case 217:case 218:case 219:case 220:case 221:case 222:case 223:{m=-1;return m|0};case 255:{if((j&-2|0)==65534){m=-1}else{break d}return m|0};default:{}}}while(0);m=j;return m|0}function pf(b,c,d){b=b|0;c=c|0;d=d|0;var e=0;b=(d-c|0)/2|0;do{if((b|0)==2){if((a[c+3|0]|0)!=0){break}if((a[c+2|0]|0)!=116){break}if((a[c+1|0]|0)!=0){break}d=a[c]|0;if((d|0)==108){e=60;return e|0}else if((d|0)!=103){break}e=62;return e|0}else if((b|0)==3){if((a[c+1|0]|0)!=0){break}if((a[c]|0)!=97){break}if((a[c+3|0]|0)!=0){break}if((a[c+2|0]|0)!=109){break}if((a[c+5|0]|0)!=0){break}if((a[c+4|0]|0)==112){e=38}else{break}return e|0}else if((b|0)==4){if((a[c+1|0]|0)!=0){break}d=a[c]|0;if((d|0)==113){if((a[c+3|0]|0)!=0){break}if((a[c+2|0]|0)!=117){break}if((a[c+5|0]|0)!=0){break}if((a[c+4|0]|0)!=111){break}if((a[c+7|0]|0)!=0){break}if((a[c+6|0]|0)==116){e=34}else{break}return e|0}else if((d|0)==97){if((a[c+3|0]|0)!=0){break}if((a[c+2|0]|0)!=112){break}if((a[c+5|0]|0)!=0){break}if((a[c+4|0]|0)!=111){break}if((a[c+7|0]|0)!=0){break}if((a[c+6|0]|0)==115){e=39}else{break}return e|0}else{break}}}while(0);e=0;return e|0}function qf(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0;if(e>>>0>=f>>>0){return}h=b+72|0;b=g+4|0;i=g|0;g=e;while(1){e=a[g+1|0]|0;a:do{if(e<<24>>24==0){switch(d[h+(d[g]|0)|0]|0){case 6:{j=g+3|0;break a;break};case 9:{c[i>>2]=(c[i>>2]|0)+1;k=g+2|0;if((k|0)==(f|0)){l=f}else{if((a[g+3|0]|0)==0){m=(a[h+(d[k]|0)|0]|0)==10}else{m=0}l=m?g+4|0:k}c[b>>2]=-1;j=l;break a;break};case 5:{j=g+2|0;break a;break};case 7:{n=8;break a;break};case 10:{c[b>>2]=-1;c[i>>2]=(c[i>>2]|0)+1;j=g+2|0;break a;break};default:{n=15;break a}}}else{if(((e&255)-216|0)>>>0<4>>>0){n=8}else{n=15}}}while(0);if((n|0)==8){n=0;j=g+4|0}else if((n|0)==15){n=0;j=g+2|0}c[b>>2]=(c[b>>2]|0)+1;if(j>>>0<f>>>0){g=j}else{break}}return}function rf(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0;h=f-2|0;f=e+2|0;if((f|0)==(h|0)){i=1;return i|0}j=b+72|0;b=e;e=f;a:while(1){f=(a[b+3|0]|0)==0;if(!f){k=11;break}l=a[e]|0;b:do{switch(d[j+(l&255)|0]|0){case 21:{if(l<<24>>24==9){k=7;break a}break};case 26:case 22:{if(l<<24>>24>=0){break b}if(f){k=10}else{k=11;break a}break};case 25:case 24:case 27:case 13:case 31:case 32:case 34:case 35:case 17:case 14:case 15:case 9:case 10:case 18:case 16:case 33:case 30:case 19:{break};default:{k=10}}}while(0);if((k|0)==10){k=0;f=a[e]|0;if(!((f|0)==36|(f|0)==64)){k=11;break}}f=e+2|0;if((f|0)==(h|0)){i=1;k=12;break}else{b=e;e=f}}if((k|0)==7){c[g>>2]=e;i=0;return i|0}else if((k|0)==11){c[g>>2]=e;i=0;return i|0}else if((k|0)==12){return i|0}return 0}function sf(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;b=c[d>>2]|0;a:do{if((b|0)!=(e|0)){h=g;i=b;b:while(1){j=a[i]|0;k=a[i+1|0]|0;l=k&255;c:do{switch(l|0){case 0:{if(j<<24>>24<=-1){m=8;break c}n=c[f>>2]|0;if((n|0)==(g|0)){m=6;break b}c[f>>2]=n+1;a[n]=j;o=i;break};case 1:case 2:case 3:case 4:case 5:case 6:case 7:{m=8;break};case 216:case 217:case 218:case 219:{n=c[f>>2]|0;if((h-n|0)<4){m=15;break b}p=j&255;q=(l<<2&12|p>>>6)+1|0;c[f>>2]=n+1;a[n]=q>>>2|240;n=c[f>>2]|0;c[f>>2]=n+1;a[n]=p>>>2&15|q<<4&48|128;q=i+2|0;p=a[q]|0;n=j<<4&48|(p&255)>>>6|a[i+3|0]<<2&12|-128;r=c[f>>2]|0;c[f>>2]=r+1;a[r]=n;n=c[f>>2]|0;c[f>>2]=n+1;a[n]=p&63|-128;o=q;break};default:{q=c[f>>2]|0;if((h-q|0)<3){m=12;break b}c[f>>2]=q+1;a[q]=(k&255)>>>4|-32;q=c[f>>2]|0;c[f>>2]=q+1;a[q]=(j&255)>>>6|k<<2&60|-128;q=c[f>>2]|0;c[f>>2]=q+1;a[q]=j&63|-128;o=i}}}while(0);if((m|0)==8){m=0;l=c[f>>2]|0;if((h-l|0)<2){m=9;break}c[f>>2]=l+1;a[l]=(j&255)>>>6|k<<2|-64;l=c[f>>2]|0;c[f>>2]=l+1;a[l]=j&63|-128;o=i}l=o+2|0;if((l|0)==(e|0)){break a}else{i=l}}if((m|0)==6){c[d>>2]=i;return}else if((m|0)==9){c[d>>2]=i;return}else if((m|0)==12){c[d>>2]=i;return}else if((m|0)==15){c[d>>2]=i;return}}}while(0);c[d>>2]=e;return}function tf(e,f,g,h,i){e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0;e=c[f>>2]|0;j=c[h>>2]|0;if((g-e|0)>(i-j|0)){k=(a[g-1|0]&-8)<<24>>24==-40?g-2|0:g}else{k=g}if((e|0)==(k|0)){return}else{l=e;m=j}while(1){if((m|0)==(i|0)){n=7;break}j=(d[l+1|0]|0)<<8|(d[l]|0);c[h>>2]=m+2;b[m>>1]=j;j=(c[f>>2]|0)+2|0;c[f>>2]=j;if((j|0)==(k|0)){n=7;break}l=j;m=c[h>>2]|0}if((n|0)==7){return}}function uf(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;if((e|0)==(f|0)){h=-1;return h|0}i=a[e+1|0]|0;j=a[e]|0;a:do{if(i<<24>>24==0){k=j&255;l=b+72|0;switch(d[l+k|0]|0){case 6:{if((f-e|0)<3){h=-2;return h|0}c[g>>2]=e;h=0;return h|0};case 29:{m=0;n=k;o=9;break a;break};case 7:{o=15;break a;break};case 19:{k=e+2|0;if((k|0)==(f|0)){h=-1;return h|0}do{if((a[e+3|0]|0)==0){p=a[k]|0;if(p<<24>>24!=120){if((a[l+(p&255)|0]|0)==25){q=k}else{break}while(1){r=q+2|0;if((r|0)==(f|0)){h=-1;o=54;break}if((a[q+3|0]|0)!=0){o=36;break}p=d[l+(d[r]|0)|0]|0;if((p|0)==25){q=r}else if((p|0)==18){o=35;break}else{o=36;break}}if((o|0)==35){c[g>>2]=q+4;h=10;return h|0}else if((o|0)==36){c[g>>2]=r;h=0;return h|0}else if((o|0)==54){return h|0}}p=e+4|0;if((p|0)==(f|0)){h=-1;return h|0}do{if((a[e+5|0]|0)==0){if(((d[l+(d[p]|0)|0]|0)-24|0)>>>0>=2>>>0){break}s=e+6|0;if((s|0)==(f|0)){h=-1;return h|0}else{t=p;u=s}while(1){if((a[t+3|0]|0)!=0){o=29;break}s=d[l+(d[u]|0)|0]|0;if((s|0)==18){o=28;break}else if(!((s|0)==25|(s|0)==24)){o=29;break}s=u+2|0;if((s|0)==(f|0)){h=-1;o=54;break}else{t=u;u=s}}if((o|0)==28){c[g>>2]=t+4;h=10;return h|0}else if((o|0)==29){c[g>>2]=u;h=0;return h|0}else if((o|0)==54){return h|0}}}while(0);c[g>>2]=p;h=0;return h|0}}while(0);c[g>>2]=k;h=0;return h|0};case 5:{if((f-e|0)<2){h=-2;return h|0}c[g>>2]=e;h=0;return h|0};case 22:case 24:{break a;break};default:{o=37;break a}}}else{l=i&255;switch(l|0){case 220:case 221:case 222:case 223:{o=37;break a;break};case 216:case 217:case 218:case 219:{o=15;break a;break};case 255:{s=j&255;if((s-254|0)>>>0<2>>>0){o=37;break a}else{m=255;n=s;o=9;break a}break};default:{m=l;n=j&255;o=9;break a}}}}while(0);do{if((o|0)==9){if((1<<(n&31)&c[18232+((n>>>5|d[17968+m|0]<<3)<<2)>>2]|0)!=0){break}c[g>>2]=e;h=0;return h|0}else if((o|0)==15){if((f-e|0)<4){h=-2;return h|0}c[g>>2]=e;h=0;return h|0}else if((o|0)==37){c[g>>2]=e;h=0;return h|0}}while(0);m=e+2|0;if((m|0)==(f|0)){h=-1;return h|0}n=b+72|0;b=e;e=m;b:while(1){m=a[b+3|0]|0;j=a[e]|0;c:do{if(m<<24>>24==0){i=j&255;switch(d[n+i|0]|0){case 5:{o=46;break b;break};case 7:{o=50;break b;break};case 18:{o=52;break b;break};case 29:{v=0;w=i;o=43;break};case 22:case 24:case 25:case 26:case 27:{break};case 6:{o=48;break b;break};default:{o=53;break b}}}else{i=m&255;switch(i|0){case 255:{u=j&255;if((u-254|0)>>>0<2>>>0){o=53;break b}else{v=255;w=u;o=43;break c}break};case 216:case 217:case 218:case 219:{o=50;break b;break};case 220:case 221:case 222:case 223:{o=53;break b;break};default:{v=i;w=j&255;o=43;break c}}}}while(0);if((o|0)==43){o=0;if((1<<(w&31)&c[18232+((w>>>5|d[19512+v|0]<<3)<<2)>>2]|0)==0){o=45;break}}j=e+2|0;if((j|0)==(f|0)){h=-1;o=54;break}else{b=e;e=j}}if((o|0)==45){c[g>>2]=e;h=0;return h|0}else if((o|0)==46){if((f-e|0)<2){h=-2;return h|0}c[g>>2]=e;h=0;return h|0}else if((o|0)==48){if((f-e|0)<3){h=-2;return h|0}c[g>>2]=e;h=0;return h|0}else if((o|0)==50){if((f-e|0)<4){h=-2;return h|0}c[g>>2]=e;h=0;return h|0}else if((o|0)==52){c[g>>2]=b+4;h=9;return h|0}else if((o|0)==53){c[g>>2]=e;h=0;return h|0}else if((o|0)==54){return h|0}return 0}function vf(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;if((e|0)==(f|0)){h=-1;return h|0}i=a[e+1|0]|0;j=a[e]|0;a:do{if(i<<24>>24==0){k=j&255;switch(d[b+72+k|0]|0|0){case 22:case 24:{break a;break};case 21:case 10:case 9:case 30:{c[g>>2]=e;h=22;return h|0};case 5:{if((f-e|0)<2){h=-2;return h|0}c[g>>2]=e;h=0;return h|0};case 7:{l=15;break a;break};case 29:{m=0;n=k;l=9;break a;break};case 6:{if((f-e|0)<3){h=-2;return h|0}c[g>>2]=e;h=0;return h|0};default:{l=18;break a}}}else{k=i&255;switch(k|0){case 220:case 221:case 222:case 223:{l=18;break a;break};case 216:case 217:case 218:case 219:{l=15;break a;break};case 255:{o=j&255;if((o-254|0)>>>0<2>>>0){l=18;break a}else{m=255;n=o;l=9;break a}break};default:{m=k;n=j&255;l=9;break a}}}}while(0);do{if((l|0)==9){if((1<<(n&31)&c[18232+((n>>>5|(d[17968+m|0]|0)<<3)<<2)>>2]|0)!=0){break}c[g>>2]=e;h=0;return h|0}else if((l|0)==15){if((f-e|0)<4){h=-2;return h|0}c[g>>2]=e;h=0;return h|0}else if((l|0)==18){c[g>>2]=e;h=0;return h|0}}while(0);m=e+2|0;if((m|0)==(f|0)){h=-1;return h|0}n=b+72|0;b=e;e=m;b:while(1){m=a[b+3|0]|0;j=a[e]|0;c:do{if(m<<24>>24==0){i=j&255;switch(d[n+i|0]|0|0){case 7:{l=31;break b;break};case 29:{p=0;q=i;l=24;break};case 22:case 24:case 25:case 26:case 27:{break};case 5:{l=27;break b;break};case 6:{l=29;break b;break};case 18:{l=33;break b;break};default:{l=34;break b}}}else{i=m&255;switch(i|0){case 216:case 217:case 218:case 219:{l=31;break b;break};case 255:{k=j&255;if((k-254|0)>>>0<2>>>0){l=34;break b}else{p=255;q=k;l=24;break c}break};case 220:case 221:case 222:case 223:{l=34;break b;break};default:{p=i;q=j&255;l=24;break c}}}}while(0);if((l|0)==24){l=0;if((1<<(q&31)&c[18232+((q>>>5|(d[19512+p|0]|0)<<3)<<2)>>2]|0)==0){l=26;break}}j=e+2|0;if((j|0)==(f|0)){h=-1;l=35;break}else{b=e;e=j}}if((l|0)==26){c[g>>2]=e;h=0;return h|0}else if((l|0)==27){if((f-e|0)<2){h=-2;return h|0}c[g>>2]=e;h=0;return h|0}else if((l|0)==29){if((f-e|0)<3){h=-2;return h|0}c[g>>2]=e;h=0;return h|0}else if((l|0)==31){if((f-e|0)<4){h=-2;return h|0}c[g>>2]=e;h=0;return h|0}else if((l|0)==33){c[g>>2]=b+4;h=28;return h|0}else if((l|0)==34){c[g>>2]=e;h=0;return h|0}else if((l|0)==35){return h|0}return 0}function wf(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;if((e|0)==(f|0)){h=-1;return h|0}do{if((a[e+1|0]|0)==0){if((a[e]|0)!=45){break}i=e+2|0;if((i|0)==(f|0)){h=-1;return h|0}j=b+72|0;k=f;l=i;a:while(1){i=a[l+1|0]|0;m=a[l]|0;b:do{if(i<<24>>24==0){switch(d[j+(m&255)|0]|0){case 7:{n=15;break b;break};case 5:{if((k-l|0)<2){h=-2;n=28;break a}o=l+2|0;break b;break};case 0:case 1:case 8:{n=17;break a;break};case 6:{if((k-l|0)<3){h=-2;n=28;break a}o=l+3|0;break b;break};case 27:{p=l+2|0;if((p|0)==(f|0)){h=-1;n=28;break a}if((a[l+3|0]|0)!=0){o=p;break b}if((a[p]|0)==45){n=22;break a}else{o=p;break b}break};default:{n=27;break b}}}else{switch(i&255|0){case 216:case 217:case 218:case 219:{n=15;break b;break};case 220:case 221:case 222:case 223:{n=17;break a;break};case 255:{break};default:{n=27;break b}}if(((m&255)-254|0)>>>0<2>>>0){n=17;break a}else{n=27}}}while(0);if((n|0)==15){n=0;if((k-l|0)<4){h=-2;n=28;break}o=l+4|0}else if((n|0)==27){n=0;o=l+2|0}if((o|0)==(f|0)){h=-1;n=28;break}else{l=o}}if((n|0)==17){c[g>>2]=l;h=0;return h|0}else if((n|0)==22){k=l+4|0;if((k|0)==(f|0)){h=-1;return h|0}do{if((a[l+5|0]|0)==0){if((a[k]|0)!=62){break}c[g>>2]=l+6;h=13;return h|0}}while(0);c[g>>2]=k;h=0;return h|0}else if((n|0)==28){return h|0}}}while(0);c[g>>2]=e;h=0;return h|0}
-
-
-
-function xf(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;if((e|0)==(f|0)){h=-1;return h|0}i=a[e+1|0]|0;j=i<<24>>24==0;k=a[e]|0;a:do{if(j){l=k&255;switch(d[b+72+l|0]|0){case 5:{if((f-e|0)<2){h=-2;return h|0}c[g>>2]=e;h=0;return h|0};case 7:{m=15;break a;break};case 29:{n=0;o=l;m=9;break a;break};case 6:{if((f-e|0)<3){h=-2;return h|0}c[g>>2]=e;h=0;return h|0};case 22:case 24:{break a;break};default:{m=17;break a}}}else{l=i&255;switch(l|0){case 216:case 217:case 218:case 219:{m=15;break a;break};case 220:case 221:case 222:case 223:{m=17;break a;break};case 255:{p=k&255;if((p-254|0)>>>0<2>>>0){m=17;break a}else{n=255;o=p;m=9;break a}break};default:{n=l;o=k&255;m=9;break a}}}}while(0);do{if((m|0)==9){if((1<<(o&31)&c[18232+((o>>>5|d[17968+n|0]<<3)<<2)>>2]|0)!=0){break}c[g>>2]=e;h=0;return h|0}else if((m|0)==15){if((f-e|0)<4){h=-2;return h|0}c[g>>2]=e;h=0;return h|0}else if((m|0)==17){c[g>>2]=e;h=0;return h|0}}while(0);n=e+2|0;if((n|0)==(f|0)){h=-1;return h|0}o=b+72|0;b=e;i=n;b:while(1){l=a[b+3|0]|0;p=a[i]|0;c:do{if(l<<24>>24==0){q=p&255;switch(d[o+q|0]|0){case 21:case 9:case 10:{m=32;break b;break};case 15:{m=61;break b;break};case 22:case 24:case 25:case 26:case 27:{break};case 5:{m=26;break b;break};case 29:{r=0;s=q;m=23;break};case 7:{m=30;break b;break};case 6:{m=28;break b;break};default:{t=i;break b}}}else{q=l&255;switch(q|0){case 255:{u=p&255;if((u-254|0)>>>0<2>>>0){t=i;break b}else{r=255;s=u;m=23;break c}break};case 220:case 221:case 222:case 223:{t=i;break b;break};case 216:case 217:case 218:case 219:{m=30;break b;break};default:{r=q;s=p&255;m=23;break c}}}}while(0);if((m|0)==23){m=0;if((1<<(s&31)&c[18232+((s>>>5|d[19512+r|0]<<3)<<2)>>2]|0)==0){m=25;break}}p=i+2|0;if((p|0)==(f|0)){h=-1;m=76;break}else{b=i;i=p}}do{if((m|0)==25){c[g>>2]=i;h=0;return h|0}else if((m|0)==26){if((f-i|0)<2){h=-2;return h|0}c[g>>2]=i;h=0;return h|0}else if((m|0)==28){if((f-i|0)<3){h=-2;return h|0}c[g>>2]=i;h=0;return h|0}else if((m|0)==30){if((f-i|0)<4){h=-2;return h|0}c[g>>2]=i;h=0;return h|0}else if((m|0)==32){do{if((i-e|0)!=6|j^1){v=11}else{r=k<<24>>24;if((r|0)==120){w=0}else if((r|0)==88){w=1}else{v=11;break}if((a[e+3|0]|0)!=0){v=11;break}r=a[n]|0;if((r|0)==77){x=1}else if((r|0)==109){x=w}else{v=11;break}if((a[e+5|0]|0)!=0){v=11;break}r=a[e+4|0]|0;if((r|0)==108){if((x|0)==0){v=12;break}}else if((r|0)!=76){v=11;break}c[g>>2]=i;h=0;return h|0}}while(0);r=b+4|0;if((r|0)==(f|0)){h=-1;return h|0}s=f;p=r;d:while(1){r=a[p+1|0]|0;l=a[p]|0;e:do{if(r<<24>>24==0){switch(d[o+(l&255)|0]|0){case 15:{q=p+2|0;if((q|0)==(f|0)){h=-1;m=76;break d}if((a[p+3|0]|0)!=0){y=q;break e}if((a[q]|0)==62){m=59;break d}else{y=q;break e}break};case 5:{if((s-p|0)<2){h=-2;m=76;break d}y=p+2|0;break e;break};case 0:case 1:case 8:{m=54;break d;break};case 6:{if((s-p|0)<3){h=-2;m=76;break d}y=p+3|0;break e;break};case 7:{m=52;break e;break};default:{m=60;break e}}}else{switch(r&255|0){case 255:{break};case 220:case 221:case 222:case 223:{m=54;break d;break};case 216:case 217:case 218:case 219:{m=52;break e;break};default:{m=60;break e}}if(((l&255)-254|0)>>>0<2>>>0){m=54;break d}else{m=60}}}while(0);if((m|0)==52){m=0;if((s-p|0)<4){h=-2;m=76;break}y=p+4|0}else if((m|0)==60){m=0;y=p+2|0}if((y|0)==(f|0)){h=-1;m=76;break}else{p=y}}if((m|0)==54){c[g>>2]=p;h=0;return h|0}else if((m|0)==59){c[g>>2]=p+4;h=v;return h|0}else if((m|0)==76){return h|0}}else if((m|0)==61){do{if((i-e|0)!=6|j^1){z=11}else{s=k<<24>>24;if((s|0)==88){A=1}else if((s|0)==120){A=0}else{z=11;break}if((a[e+3|0]|0)!=0){z=11;break}s=a[n]|0;if((s|0)==77){B=1}else if((s|0)==109){B=A}else{z=11;break}if((a[e+5|0]|0)!=0){z=11;break}s=a[e+4|0]|0;if((s|0)==108){if((B|0)==0){z=12;break}}else if((s|0)!=76){z=11;break}c[g>>2]=i;h=0;return h|0}}while(0);p=b+4|0;if((p|0)==(f|0)){h=-1;return h|0}if((a[b+5|0]|0)!=0){t=p;break}if((a[p]|0)!=62){t=p;break}c[g>>2]=b+6;h=z;return h|0}else if((m|0)==76){return h|0}}while(0);c[g>>2]=t;h=0;return h|0}function yf(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;if((e|0)==(f|0)){h=-4;return h|0}i=e;j=f-i|0;do{if((j&1|0)==0){k=f}else{l=j&-2;if((l|0)==0){h=-1;return h|0}else{k=e+l|0;break}}}while(0);j=a[e]|0;f=a[e+1|0]|0;a:do{if(j<<24>>24==0){l=f&255;m=b+72|0;b:do{switch(d[m+l|0]|0){case 5:{if((k-i|0)<2){h=-2;return h|0}c[g>>2]=e;h=0;return h|0};case 6:{if((k-i|0)<3){h=-2;return h|0}c[g>>2]=e;h=0;return h|0};case 9:{if((e+2|0)!=(k|0)){break b}c[g>>2]=k;h=-15;return h|0};case 13:{n=e+2|0;if((n|0)==(k|0)){h=-1;return h|0}o=k;p=n;c:while(1){n=a[p]|0;q=a[p+1|0]|0;d:do{if(n<<24>>24==0){r=a[m+(q&255)|0]|0;switch(r&255|0){case 0:case 1:case 8:{s=43;break c;break};case 7:{s=41;break d;break};case 12:case 13:{t=p+2|0;if(r<<24>>24==13){s=45;break c}else{u=t;break d}break};case 5:{if((o-p|0)<2){h=-2;s=175;break c}u=p+2|0;break d;break};case 6:{if((o-p|0)<3){h=-2;s=175;break c}u=p+3|0;break d;break};default:{s=49;break d}}}else{switch(n&255|0){case 220:case 221:case 222:case 223:{s=43;break c;break};case 216:case 217:case 218:case 219:{s=41;break d;break};case 255:{break};default:{s=49;break d}}if(((q&255)-254|0)>>>0<2>>>0){s=43;break c}else{s=49}}}while(0);if((s|0)==41){s=0;if((o-p|0)<4){h=-2;s=175;break}u=p+4|0}else if((s|0)==49){s=0;u=p+2|0}if((u|0)==(k|0)){h=-1;s=175;break}else{p=u}}if((s|0)==43){c[g>>2]=p;h=0;return h|0}else if((s|0)==45){if((t|0)==(k|0)){h=-27;return h|0}c[g>>2]=t;e:do{if((a[t]|0)==0){switch(d[m+(d[p+3|0]|0)|0]|0){case 21:case 9:case 10:case 11:case 30:case 20:{h=27;break};default:{break e}}return h|0}}while(0);h=0;return h|0}else if((s|0)==175){return h|0}break};case 30:{h=Pf(b,e+2|0,k,g)|0;return h|0};case 12:{p=e+2|0;if((p|0)==(k|0)){h=-1;return h|0}o=k;q=p;f:while(1){p=a[q]|0;n=a[q+1|0]|0;g:do{if(p<<24>>24==0){r=a[m+(n&255)|0]|0;switch(r&255|0){case 5:{if((o-q|0)<2){h=-2;s=175;break f}v=q+2|0;break g;break};case 6:{if((o-q|0)<3){h=-2;s=175;break f}v=q+3|0;break g;break};case 12:case 13:{w=q+2|0;if(r<<24>>24==12){s=25;break f}else{v=w;break g}break};case 7:{s=21;break g;break};case 0:case 1:case 8:{s=23;break f;break};default:{s=29;break g}}}else{switch(p&255|0){case 255:{break};case 216:case 217:case 218:case 219:{s=21;break g;break};case 220:case 221:case 222:case 223:{s=23;break f;break};default:{s=29;break g}}if(((n&255)-254|0)>>>0<2>>>0){s=23;break f}else{s=29}}}while(0);if((s|0)==21){s=0;if((o-q|0)<4){h=-2;s=175;break}v=q+4|0}else if((s|0)==29){s=0;v=q+2|0}if((v|0)==(k|0)){h=-1;s=175;break}else{q=v}}if((s|0)==23){c[g>>2]=q;h=0;return h|0}else if((s|0)==25){if((w|0)==(k|0)){h=-27;return h|0}c[g>>2]=w;h:do{if((a[w]|0)==0){switch(d[m+(d[q+3|0]|0)|0]|0){case 21:case 9:case 10:case 11:case 30:case 20:{h=27;break};default:{break h}}return h|0}}while(0);h=0;return h|0}else if((s|0)==175){return h|0}break};case 7:{s=141;break a;break};case 25:case 26:case 27:{x=19;break a;break};case 29:{y=0;z=l;s=144;break a;break};case 22:case 24:{x=18;break a;break};case 31:{c[g>>2]=e+2;h=23;return h|0};case 2:{q=e+2|0;if((q|0)==(k|0)){h=-1;return h|0}o=a[q]|0;n=a[e+3|0]|0;i:do{if(o<<24>>24==0){switch(d[m+(n&255)|0]|0){case 22:case 24:case 29:case 5:case 6:case 7:{s=73;break i;break};case 16:{break};case 15:{h=Rf(b,e+4|0,k,g)|0;return h|0};default:{s=74;break i}}p=e+4|0;if((p|0)==(k|0)){h=-1;return h|0}do{if((a[p]|0)==0){r=d[m+(d[e+5|0]|0)|0]|0;if((r|0)==20){c[g>>2]=e+6;h=33;return h|0}else if((r|0)==27){h=Qf(b,e+6|0,k,g)|0;return h|0}else if((r|0)==22|(r|0)==24){r=e+6|0;if((r|0)==(k|0)){h=-1;return h|0}else{A=p;B=r}j:while(1){if((a[B]|0)!=0){s=71;break}switch(d[m+(d[A+3|0]|0)|0]|0){case 30:{s=66;break j;break};case 21:case 9:case 10:{break j;break};case 22:case 24:{break};default:{s=71;break j}}r=B+2|0;if((r|0)==(k|0)){h=-1;s=175;break}else{A=B;B=r}}do{if((s|0)==66){r=A+4|0;if((r|0)==(k|0)){h=-1;return h|0}if((a[r]|0)!=0){break}r=d[m+(d[A+5|0]|0)|0]|0;if(!((r|0)==21|(r|0)==9|(r|0)==10|(r|0)==30)){break}c[g>>2]=B;h=0;return h|0}else if((s|0)==71){c[g>>2]=B;h=0;return h|0}else if((s|0)==175){return h|0}}while(0);c[g>>2]=B;h=16;return h|0}else{break}}}while(0);c[g>>2]=p;h=0;return h|0}else{switch(o&255|0){case 223:case 222:case 221:case 220:{s=74;break i;break};case 255:{break};default:{s=73;break i}}if(((n&255)-254|0)>>>0<2>>>0){s=74}else{s=73}}}while(0);if((s|0)==73){c[g>>2]=e;h=29;return h|0}else if((s|0)==74){c[g>>2]=q;h=0;return h|0}break};case 19:{n=e+2|0;if((n|0)==(k|0)){h=-1;return h|0}o=a[n]|0;r=a[e+3|0]|0;k:do{if(o<<24>>24==0){C=r&255;switch(d[m+C|0]|0){case 22:case 24:{break k;break};case 6:{if((k-n|0)<3){h=-2;return h|0}c[g>>2]=n;h=0;return h|0};case 29:{D=0;E=C;s=112;break k;break};case 5:{if((k-n|0)<2){h=-2;return h|0}c[g>>2]=n;h=0;return h|0};case 7:{s=118;break k;break};default:{s=120;break k}}}else{C=o&255;switch(C|0){case 216:case 217:case 218:case 219:{s=118;break k;break};case 255:{F=r&255;if((F-254|0)>>>0<2>>>0){s=120;break k}else{D=255;E=F;s=112;break k}break};case 220:case 221:case 222:case 223:{s=120;break k;break};default:{D=C;E=r&255;s=112;break k}}}}while(0);do{if((s|0)==112){if((c[18232+((d[17968+D|0]<<3|E>>>5)<<2)>>2]&1<<(E&31)|0)!=0){break}c[g>>2]=n;h=0;return h|0}else if((s|0)==118){if((k-n|0)<4){h=-2;return h|0}c[g>>2]=n;h=0;return h|0}else if((s|0)==120){c[g>>2]=n;h=0;return h|0}}while(0);r=e+4|0;if((r|0)==(k|0)){h=-20;return h|0}else{G=n;H=r}l:while(1){r=a[H]|0;o=a[G+3|0]|0;m:do{if(r<<24>>24==0){q=o&255;switch(d[m+q|0]|0){case 29:{I=0;J=q;s=126;break};case 22:case 24:case 25:case 26:case 27:{break};case 7:{s=133;break l;break};case 5:{s=129;break l;break};case 9:case 10:case 21:case 32:case 11:case 30:case 36:{s=135;break l;break};case 6:{s=131;break l;break};default:{s=136;break l}}}else{q=r&255;switch(q|0){case 216:case 217:case 218:case 219:{s=133;break l;break};case 220:case 221:case 222:case 223:{s=136;break l;break};case 255:{C=o&255;if((C-254|0)>>>0<2>>>0){s=136;break l}else{I=255;J=C;s=126;break m}break};default:{I=q;J=o&255;s=126;break m}}}}while(0);if((s|0)==126){s=0;if((c[18232+((d[19512+I|0]<<3|J>>>5)<<2)>>2]&1<<(J&31)|0)==0){s=128;break}}o=H+2|0;if((o|0)==(k|0)){h=-20;s=175;break}else{G=H;H=o}}if((s|0)==128){c[g>>2]=H;h=0;return h|0}else if((s|0)==129){if((k-H|0)<2){h=-2;return h|0}c[g>>2]=H;h=0;return h|0}else if((s|0)==131){if((k-H|0)<3){h=-2;return h|0}c[g>>2]=H;h=0;return h|0}else if((s|0)==133){if((k-H|0)<4){h=-2;return h|0}c[g>>2]=H;h=0;return h|0}else if((s|0)==135){c[g>>2]=H;h=20;return h|0}else if((s|0)==136){c[g>>2]=H;h=0;return h|0}else if((s|0)==175){return h|0}break};case 35:{c[g>>2]=e+2;h=38;return h|0};case 20:{c[g>>2]=e+2;h=25;return h|0};case 32:{n=e+2|0;if((n|0)==(k|0)){h=-24;return h|0}n:do{if((a[n]|0)==0){switch(d[m+(d[e+3|0]|0)|0]|0){case 34:{c[g>>2]=e+4;h=37;return h|0};case 9:case 10:case 21:case 11:case 35:case 36:case 32:{c[g>>2]=n;h=24;return h|0};case 33:{c[g>>2]=e+4;h=36;return h|0};case 15:{c[g>>2]=e+4;h=35;return h|0};default:{break n}}}}while(0);c[g>>2]=n;h=0;return h|0};case 4:{o=e+2|0;if((o|0)==(k|0)){h=-26;return h|0}do{if((a[o]|0)==0){if((a[e+3|0]|0)!=93){break}r=e+4|0;if((r|0)==(k|0)){h=-1;return h|0}if((a[r]|0)!=0){break}if((a[e+5|0]|0)!=62){break}c[g>>2]=e+6;h=34;return h|0}}while(0);c[g>>2]=o;h=26;return h|0};case 21:case 10:{break};case 36:{c[g>>2]=e+2;h=21;return h|0};case 11:{c[g>>2]=e+2;h=17;return h|0};default:{s=148;break a}}}while(0);l=e+2|0;o:do{if((l|0)!=(k|0)){n=e;r=l;while(1){if((a[r]|0)!=0){break}p=d[m+(d[n+3|0]|0)|0]|0;if((p|0)==9){if((n+4|0)==(k|0)){break}}else if(!((p|0)==21|(p|0)==10)){break}p=r+2|0;if((p|0)==(k|0)){break o}else{n=r;r=p}}c[g>>2]=r;h=15;return h|0}}while(0);c[g>>2]=k;h=15;return h|0}else{m=j&255;switch(m|0){case 220:case 221:case 222:case 223:{s=148;break a;break};case 216:case 217:case 218:case 219:{s=141;break a;break};case 255:{l=f&255;if((l-254|0)>>>0<2>>>0){s=148;break a}else{y=255;z=l;s=144;break a}break};default:{y=m;z=f&255;s=144;break a}}}}while(0);do{if((s|0)==141){if((k-i|0)<4){h=-2;return h|0}c[g>>2]=e;h=0;return h|0}else if((s|0)==144){f=z>>>5;j=1<<(z&31);if((j&c[18232+((f|d[17968+y|0]<<3)<<2)>>2]|0)!=0){x=18;break}if((c[18232+((d[19512+y|0]<<3|f)<<2)>>2]&j|0)==0){s=148}else{x=19}}}while(0);if((s|0)==148){c[g>>2]=e;h=0;return h|0}y=e+2|0;p:do{if((y|0)!=(k|0)){z=b+72|0;i=e;j=y;q:while(1){f=a[j]|0;H=a[i+3|0]|0;r:do{if(f<<24>>24==0){G=H&255;switch(d[z+G|0]|0){case 5:{s=157;break q;break};case 34:{s=164;break q;break};case 33:{s=167;break q;break};case 6:{s=159;break q;break};case 7:{s=161;break q;break};case 11:case 32:case 35:case 36:case 20:case 30:case 21:case 9:case 10:{s=163;break q;break};case 29:{K=0;L=G;s=154;break};case 22:case 24:case 25:case 26:case 27:{break};case 15:{s=170;break q;break};default:{s=173;break q}}}else{G=f&255;switch(G|0){case 216:case 217:case 218:case 219:{s=161;break q;break};case 255:{J=H&255;if((J-254|0)>>>0<2>>>0){s=173;break q}else{K=255;L=J;s=154;break r}break};case 220:case 221:case 222:case 223:{s=173;break q;break};default:{K=G;L=H&255;s=154;break r}}}}while(0);if((s|0)==154){s=0;if((1<<(L&31)&c[18232+((L>>>5|d[19512+K|0]<<3)<<2)>>2]|0)==0){s=156;break}}H=j+2|0;if((H|0)==(k|0)){break p}else{i=j;j=H}}if((s|0)==156){c[g>>2]=j;h=0;return h|0}else if((s|0)==157){if((k-j|0)<2){h=-2;return h|0}c[g>>2]=j;h=0;return h|0}else if((s|0)==159){if((k-j|0)<3){h=-2;return h|0}c[g>>2]=j;h=0;return h|0}else if((s|0)==161){if((k-j|0)<4){h=-2;return h|0}c[g>>2]=j;h=0;return h|0}else if((s|0)==163){c[g>>2]=j;h=x;return h|0}else if((s|0)==164){if((x|0)==19){c[g>>2]=j;h=0;return h|0}else{c[g>>2]=i+4;h=32;return h|0}}else if((s|0)==167){if((x|0)==19){c[g>>2]=j;h=0;return h|0}else{c[g>>2]=i+4;h=31;return h|0}}else if((s|0)==170){if((x|0)==19){c[g>>2]=j;h=0;return h|0}else{c[g>>2]=i+4;h=30;return h|0}}else if((s|0)==173){c[g>>2]=j;h=0;return h|0}}}while(0);h=-x|0;return h|0}function zf(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0;h=i;i=i+8|0;j=h|0;a:do{if((e|0)==(f|0)){k=-4}else{l=e;m=f-l|0;if((m&1|0)==0){n=f}else{o=m&-2;if((o|0)==0){k=-1;break}n=e+o|0}o=a[e]|0;m=a[e+1|0]|0;b:do{if(o<<24>>24==0){p=b+72|0;switch(d[p+(m&255)|0]|0){case 0:case 1:case 8:{q=207;break b;break};case 5:{if((n-l|0)<2){k=-2;break a}r=e+2|0;break b;break};case 10:{c[g>>2]=e+2;k=7;break a;break};case 4:{s=e+2|0;if((s|0)==(n|0)){k=-5;break a}if((a[s]|0)!=0){r=s;break b}if((a[e+3|0]|0)!=93){r=s;break b}t=e+4|0;if((t|0)==(n|0)){k=-5;break a}if((a[t]|0)!=0){r=s;break b}if((a[e+5|0]|0)!=62){r=s;break b}c[g>>2]=t;k=0;break a;break};case 3:{k=Of(b,e+2|0,n,g)|0;break a;break};case 2:{t=e+2|0;if((t|0)==(n|0)){k=-1;break a}s=a[t]|0;u=a[e+3|0]|0;c:do{if(s<<24>>24==0){v=u&255;switch(d[p+v|0]|0){case 16:{w=e+4|0;if((w|0)==(n|0)){k=-1;break a}do{if((a[w]|0)==0){x=d[p+(d[e+5|0]|0)|0]|0;if((x|0)==27){k=Qf(b,e+6|0,n,g)|0;break a}else if((x|0)!=20){break}x=e+6|0;if((n-x|0)<12){k=-1;break a}else{y=x;z=0}while(1){if((a[y]|0)!=0){q=31;break}if((a[y+1|0]|0)!=(a[17816+z|0]|0)){q=31;break}x=z+1|0;A=y+2|0;if((x|0)<6){y=A;z=x}else{q=33;break}}if((q|0)==31){c[g>>2]=y;k=0;break a}else if((q|0)==33){c[g>>2]=A;k=8;break a}}}while(0);c[g>>2]=w;k=0;break a;break};case 7:{q=22;break c;break};case 15:{k=Rf(b,e+4|0,n,g)|0;break a;break};case 17:{x=e+4|0;if((x|0)==(n|0)){k=-1;break a}B=a[x]|0;C=a[e+5|0]|0;d:do{if(B<<24>>24==0){D=C&255;switch(d[p+D|0]|0){case 22:case 24:{break d;break};case 29:{E=0;F=D;q=43;break d;break};case 5:{if((n-x|0)<2){k=-2;break a}c[g>>2]=x;k=0;break a;break};case 6:{if((n-x|0)<3){k=-2;break a}c[g>>2]=x;k=0;break a;break};case 7:{q=49;break d;break};default:{q=51;break d}}}else{D=B&255;switch(D|0){case 255:{G=C&255;if((G-254|0)>>>0<2>>>0){q=51;break d}else{E=255;F=G;q=43;break d}break};case 216:case 217:case 218:case 219:{q=49;break d;break};case 220:case 221:case 222:case 223:{q=51;break d;break};default:{E=D;F=C&255;q=43;break d}}}}while(0);do{if((q|0)==43){if((c[18232+((d[17968+E|0]<<3|F>>>5)<<2)>>2]&1<<(F&31)|0)!=0){break}c[g>>2]=x;k=0;break a}else if((q|0)==49){if((n-x|0)<4){k=-2;break a}c[g>>2]=x;k=0;break a}else if((q|0)==51){c[g>>2]=x;k=0;break a}}while(0);C=e+6|0;if((C|0)==(n|0)){k=-1;break a}else{H=x;I=C}e:while(1){C=a[I]|0;B=a[H+3|0]|0;f:do{if(C<<24>>24==0){w=B&255;switch(d[p+w|0]|0){case 7:{q=64;break e;break};case 11:{q=72;break e;break};case 29:{J=0;K=w;q=57;break};case 22:case 24:case 25:case 26:case 27:{break};case 5:{q=60;break e;break};case 6:{q=62;break e;break};case 21:case 9:case 10:{q=66;break e;break};default:{q=73;break e}}}else{w=C&255;switch(w|0){case 216:case 217:case 218:case 219:{q=64;break e;break};case 220:case 221:case 222:case 223:{q=73;break e;break};case 255:{D=B&255;if((D-254|0)>>>0<2>>>0){q=73;break e}else{J=255;K=D;q=57;break f}break};default:{J=w;K=B&255;q=57;break f}}}}while(0);if((q|0)==57){q=0;if((c[18232+((d[19512+J|0]<<3|K>>>5)<<2)>>2]&1<<(K&31)|0)==0){q=59;break}}B=I+2|0;if((B|0)==(n|0)){k=-1;break a}else{H=I;I=B}}if((q|0)==59){c[g>>2]=I;k=0;break a}else if((q|0)==60){if((n-I|0)<2){k=-2;break a}c[g>>2]=I;k=0;break a}else if((q|0)==62){if((n-I|0)<3){k=-2;break a}c[g>>2]=I;k=0;break a}else if((q|0)==64){if((n-I|0)<4){k=-2;break a}c[g>>2]=I;k=0;break a}else if((q|0)==66){x=H+4|0;if((x|0)==(n|0)){k=-1;break a}else{L=x}while(1){if((a[L]|0)!=0){q=70;break}x=d[p+(d[L+1|0]|0)|0]|0;if((x|0)==11){q=69;break}else if(!((x|0)==21|(x|0)==9|(x|0)==10)){q=70;break}x=L+2|0;if((x|0)==(n|0)){k=-1;break a}else{L=x}}if((q|0)==69){c[g>>2]=L+2;k=5;break a}else if((q|0)==70){c[g>>2]=L;k=0;break a}}else if((q|0)==72){c[g>>2]=H+4;k=5;break a}else if((q|0)==73){c[g>>2]=I;k=0;break a}break};case 22:case 24:{break c;break};case 5:{if((n-t|0)<2){k=-2;break a}c[g>>2]=t;k=0;break a;break};case 29:{M=0;N=v;q=16;break c;break};case 6:{if((n-t|0)<3){k=-2;break a}c[g>>2]=t;k=0;break a;break};default:{q=74;break c}}}else{x=s&255;switch(x|0){case 216:case 217:case 218:case 219:{q=22;break c;break};case 220:case 221:case 222:case 223:{q=74;break c;break};case 255:{B=u&255;if((B-254|0)>>>0<2>>>0){q=74;break c}else{M=255;N=B;q=16;break c}break};default:{M=x;N=u&255;q=16;break c}}}}while(0);do{if((q|0)==16){if((c[18232+((d[17968+M|0]<<3|N>>>5)<<2)>>2]&1<<(N&31)|0)!=0){break}c[g>>2]=t;k=0;break a}else if((q|0)==22){if((n-t|0)<4){k=-2;break a}c[g>>2]=t;k=0;break a}else if((q|0)==74){c[g>>2]=t;k=0;break a}}while(0);u=e+4|0;if((u|0)==(n|0)){k=-1;break a}else{O=t;P=u}g:while(1){u=a[P]|0;s=a[O+3|0]|0;h:do{if(u<<24>>24==0){x=s&255;switch(d[p+x|0]|0){case 17:{Q=P;break g;break};case 22:case 24:case 25:case 26:case 27:{break};case 5:{q=83;break g;break};case 29:{R=0;S=x;q=80;break};case 7:{q=87;break g;break};case 6:{q=85;break g;break};case 11:{T=P;q=181;break g;break};case 21:case 9:case 10:{q=89;break g;break};default:{q=187;break g}}}else{x=u&255;switch(x|0){case 255:{B=s&255;if((B-254|0)>>>0<2>>>0){q=187;break g}else{R=255;S=B;q=80;break h}break};case 220:case 221:case 222:case 223:{q=187;break g;break};case 216:case 217:case 218:case 219:{q=87;break g;break};default:{R=x;S=s&255;q=80;break h}}}}while(0);if((q|0)==80){q=0;if((c[18232+((d[19512+R|0]<<3|S>>>5)<<2)>>2]&1<<(S&31)|0)==0){q=82;break}}s=P+2|0;if((s|0)==(n|0)){k=-1;break a}else{O=P;P=s}}i:do{if((q|0)==82){c[g>>2]=P;k=0;break a}else if((q|0)==83){if((n-P|0)<2){k=-2;break a}c[g>>2]=P;k=0;break a}else if((q|0)==85){if((n-P|0)<3){k=-2;break a}c[g>>2]=P;k=0;break a}else if((q|0)==87){if((n-P|0)<4){k=-2;break a}c[g>>2]=P;k=0;break a}else if((q|0)==89){t=O+4|0;if((t|0)==(n|0)){k=-1;break a}else{U=t}j:while(1){V=a[U]|0;W=a[U+1|0]|0;if(V<<24>>24!=0){q=91;break}t=W&255;switch(d[p+t|0]|0){case 17:{Q=U;break i;break};case 22:case 24:{break j;break};case 6:{q=175;break j;break};case 21:case 9:case 10:{break};case 29:{X=0;Y=t;q=95;break j;break};case 7:{q=177;break j;break};case 11:{T=U;q=181;break i;break};case 5:{q=173;break j;break};default:{q=180;break j}}t=U+2|0;if((t|0)==(n|0)){k=-1;break a}else{U=t}}k:do{if((q|0)==91){t=V&255;switch(t|0){case 220:case 221:case 222:case 223:{q=180;break k;break};case 255:{s=W&255;if((s-254|0)>>>0<2>>>0){q=180;break k}else{X=255;Y=s;q=95;break k}break};case 216:case 217:case 218:case 219:{q=177;break k;break};default:{X=t;Y=W&255;q=95;break k}}}else if((q|0)==173){if((n-U|0)<2){k=-2;break a}c[g>>2]=U;k=0;break a}else if((q|0)==175){if((n-U|0)<3){k=-2;break a}c[g>>2]=U;k=0;break a}}while(0);do{if((q|0)==95){if((c[18232+((d[17968+X|0]<<3|Y>>>5)<<2)>>2]&1<<(Y&31)|0)!=0){break}c[g>>2]=U;k=0;break a}else if((q|0)==177){if((n-U|0)<4){k=-2;break a}c[g>>2]=U;k=0;break a}else if((q|0)==180){c[g>>2]=U;k=0;break a}}while(0);t=U+2|0;c[j>>2]=t;if((t|0)==(n|0)){k=-1;break a}s=n;u=t;l:while(1){t=a[u]|0;v=a[u+1|0]|0;m:do{if(t<<24>>24==0){x=v&255;n:do{switch(d[p+x|0]|0){case 21:case 9:case 10:{B=u+2|0;c[j>>2]=B;if((B|0)==(n|0)){k=-1;break a}else{Z=u;_=B}while(1){if((a[_]|0)!=0){q=116;break l}B=d[p+(d[Z+3|0]|0)|0]|0;if((B|0)==14){$=_;break n}else if(!((B|0)==21|(B|0)==10|(B|0)==9)){q=116;break l}B=_+2|0;c[j>>2]=B;if((B|0)==(n|0)){k=-1;break a}else{Z=_;_=B}}break};case 29:{aa=0;ba=x;q=105;break m;break};case 22:case 24:case 25:case 26:case 27:{ca=u;break m;break};case 14:{$=u;break};case 5:{q=107;break l;break};case 6:{q=109;break l;break};case 7:{q=111;break l;break};default:{q=172;break l}}}while(0);x=$+2|0;c[j>>2]=x;if((x|0)==(n|0)){k=-1;break a}else{da=$;ea=x}while(1){if((a[ea]|0)!=0){q=122;break l}fa=d[p+(d[da+3|0]|0)|0]|0;if((fa&254|0)==12){break}if(!((fa|0)==21|(fa|0)==10|(fa|0)==9)){q=122;break l}x=ea+2|0;c[j>>2]=x;if((x|0)==(n|0)){k=-1;break a}else{da=ea;ea=x}}x=ea+2|0;c[j>>2]=x;if((x|0)==(n|0)){k=-1;break a}else{ga=x}while(1){x=a[ga]|0;B=a[ga+1|0]|0;o:do{if(x<<24>>24==0){ha=d[p+(B&255)|0]|0}else{switch(x&255|0){case 220:case 221:case 222:case 223:{ha=8;break o;break};case 255:{if(((B&255)-254|0)>>>0<2>>>0){ha=0;break o}break};case 216:case 217:case 218:case 219:{ha=7;break o;break};default:{}}ha=29}}while(0);if((ha|0)==(fa|0)){break}switch(ha|0){case 6:{if((s-ga|0)<3){k=-2;break a}B=ga+3|0;c[j>>2]=B;ia=B;break};case 5:{if((s-ga|0)<2){k=-2;break a}B=ga+2|0;c[j>>2]=B;ia=B;break};case 7:{if((s-ga|0)<4){k=-2;break a}B=ga+4|0;c[j>>2]=B;ia=B;break};case 0:case 1:case 8:{q=138;break l;break};case 3:{ja=Of(b,ga+2|0,n,j)|0;if((ja|0)<1){q=142;break l}ia=c[j>>2]|0;break};case 2:{q=144;break l;break};default:{B=ga+2|0;c[j>>2]=B;ia=B}}if((ia|0)==(n|0)){k=-1;break a}else{ga=ia}}ka=ga+2|0;c[j>>2]=ka;if((ka|0)==(n|0)){k=-1;break a}if((a[ka]|0)!=0){q=150;break l}switch(d[p+(d[ga+3|0]|0)|0]|0){case 11:{la=ka;q=165;break l;break};case 17:{ma=ka;q=166;break l;break};case 21:case 9:case 10:{break};default:{q=150;break l}}B=ga+4|0;c[j>>2]=B;if((B|0)==(n|0)){k=-1;break a}else{na=ka;oa=B}p:while(1){pa=a[oa]|0;qa=a[na+3|0]|0;if(pa<<24>>24!=0){q=152;break}switch(d[p+(qa&255)|0]|0){case 21:case 9:case 10:{break};case 11:{la=oa;q=165;break l;break};case 17:{ma=oa;q=166;break l;break};case 7:{q=163;break l;break};case 22:case 24:{ca=oa;break m;break};case 5:{q=159;break l;break};case 29:{ra=0;break p;break};case 6:{q=161;break l;break};default:{q=171;break l}}B=oa+2|0;c[j>>2]=B;if((B|0)==(n|0)){k=-1;break a}else{na=oa;oa=B}}q:do{if((q|0)==152){q=0;B=pa&255;switch(B|0){case 216:case 217:case 218:case 219:{q=163;break l;break};case 255:{break};case 220:case 221:case 222:case 223:{q=171;break l;break};default:{ra=B;break q}}if(((qa&255)-254|0)>>>0<2>>>0){q=171;break l}else{ra=255}}}while(0);B=d[oa+1|0]|0;if((1<<(B&31)&c[18232+((B>>>5|d[17968+ra|0]<<3)<<2)>>2]|0)==0){q=157;break l}else{ca=oa}}else{B=t&255;switch(B|0){case 255:{x=v&255;if((x-254|0)>>>0<2>>>0){q=172;break l}else{aa=255;ba=x;q=105;break m}break};case 216:case 217:case 218:case 219:{q=111;break l;break};case 220:case 221:case 222:case 223:{q=172;break l;break};default:{aa=B;ba=v&255;q=105;break m}}}}while(0);if((q|0)==105){q=0;if((c[18232+((d[19512+aa|0]<<3|ba>>>5)<<2)>>2]&1<<(ba&31)|0)==0){q=106;break}else{ca=u}}v=ca+2|0;c[j>>2]=v;if((v|0)==(n|0)){k=-1;break a}else{u=v}}if((q|0)==106){c[g>>2]=u;k=0;break a}else if((q|0)==107){if((s-u|0)<2){k=-2;break a}c[g>>2]=u;k=0;break a}else if((q|0)==109){if((s-u|0)<3){k=-2;break a}c[g>>2]=u;k=0;break a}else if((q|0)==111){if((s-u|0)<4){k=-2;break a}c[g>>2]=u;k=0;break a}else if((q|0)==116){c[g>>2]=_;k=0;break a}else if((q|0)==122){c[g>>2]=ea;k=0;break a}else if((q|0)==138){c[g>>2]=ga;k=0;break a}else if((q|0)==142){if((ja|0)!=0){k=ja;break a}c[g>>2]=c[j>>2];k=0;break a}else if((q|0)==144){c[g>>2]=ga;k=0;break a}else if((q|0)==150){c[g>>2]=ka;k=0;break a}else if((q|0)==157){c[g>>2]=oa;k=0;break a}else if((q|0)==159){if((s-oa|0)<2){k=-2;break a}c[g>>2]=oa;k=0;break a}else if((q|0)==161){if((s-oa|0)<3){k=-2;break a}c[g>>2]=oa;k=0;break a}else if((q|0)==163){if((s-oa|0)<4){k=-2;break a}c[g>>2]=oa;k=0;break a}else if((q|0)==165){c[g>>2]=la+2;k=1;break a}else if((q|0)==166){v=ma+2|0;c[j>>2]=v;if((v|0)==(n|0)){k=-1;break a}do{if((a[v]|0)==0){if((a[ma+3|0]|0)!=62){break}c[g>>2]=ma+4;k=3;break a}}while(0);c[g>>2]=v;k=0;break a}else if((q|0)==171){c[g>>2]=oa;k=0;break a}else if((q|0)==172){c[g>>2]=u;k=0;break a}}else if((q|0)==187){c[g>>2]=P;k=0;break a}}while(0);if((q|0)==181){c[g>>2]=T+2;k=2;break a}s=Q+2|0;if((s|0)==(n|0)){k=-1;break a}do{if((a[s]|0)==0){if((a[Q+3|0]|0)!=62){break}c[g>>2]=Q+4;k=4;break a}}while(0);c[g>>2]=s;k=0;break a;break};case 9:{t=e+2|0;if((t|0)==(n|0)){k=-3;break a}if((a[t]|0)==0){sa=(a[p+(d[e+3|0]|0)|0]|0)==10}else{sa=0}c[g>>2]=sa?e+4|0:t;k=7;break a;break};case 6:{if((n-l|0)<3){k=-2;break a}r=e+3|0;break b;break};case 7:{q=205;break b;break};default:{q=208;break b}}}else{switch(o&255|0){case 255:{break};case 220:case 221:case 222:case 223:{q=207;break b;break};case 216:case 217:case 218:case 219:{q=205;break b;break};default:{q=208;break b}}if(((m&255)-254|0)>>>0<2>>>0){q=207}else{q=208}}}while(0);if((q|0)==205){if((n-l|0)<4){k=-2;break}r=e+4|0}else if((q|0)==207){c[g>>2]=e;k=0;break}else if((q|0)==208){r=e+2|0}r:do{if((r|0)!=(n|0)){m=b+72|0;o=n;t=r;s:while(1){B=a[t]|0;x=a[t+1|0]|0;t:do{if(B<<24>>24==0){switch(d[m+(x&255)|0]|0){case 5:{if((o-t|0)<2){q=216;break s}ta=t+2|0;break t;break};case 3:case 2:case 0:case 1:case 8:case 9:case 10:{q=231;break s;break};case 6:{if((o-t|0)<3){q=219;break s}ta=t+3|0;break t;break};case 7:{q=221;break t;break};case 4:{C=t+2|0;if((C|0)==(n|0)){q=231;break s}if((a[C]|0)!=0){ta=C;break t}if((a[t+3|0]|0)!=93){ta=C;break t}ua=t+4|0;if((ua|0)==(n|0)){q=231;break s}if((a[ua]|0)!=0){ta=C;break t}if((a[t+5|0]|0)==62){q=230;break s}else{ta=C;break t}break};default:{q=232;break t}}}else{switch(B&255|0){case 255:{break};case 220:case 221:case 222:case 223:{q=231;break s;break};case 216:case 217:case 218:case 219:{q=221;break t;break};default:{q=232;break t}}if(((x&255)-254|0)>>>0<2>>>0){q=231;break s}else{q=232}}}while(0);if((q|0)==221){q=0;if((o-t|0)<4){q=222;break}ta=t+4|0}else if((q|0)==232){q=0;ta=t+2|0}if((ta|0)==(n|0)){break r}else{t=ta}}if((q|0)==216){c[g>>2]=t;k=6;break a}else if((q|0)==219){c[g>>2]=t;k=6;break a}else if((q|0)==222){c[g>>2]=t;k=6;break a}else if((q|0)==230){c[g>>2]=ua;k=0;break a}else if((q|0)==231){c[g>>2]=t;k=6;break a}}}while(0);c[g>>2]=n;k=6}}while(0);i=h;return k|0}function Af(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;if((e|0)==(f|0)){h=-4;return h|0}i=e;j=f-i|0;do{if((j&1|0)==0){k=f}else{l=j&-2;if((l|0)==0){h=-1;return h|0}else{k=e+l|0;break}}}while(0);j=a[e]|0;f=a[e+1|0]|0;a:do{if(j<<24>>24==0){l=b+72|0;switch(d[l+(f&255)|0]|0){case 6:{if((k-i|0)<3){h=-2;return h|0}else{m=e+3|0;break a}break};case 9:{n=e+2|0;if((n|0)==(k|0)){h=-1;return h|0}if((a[n]|0)==0){o=(a[l+(d[e+3|0]|0)|0]|0)==10}else{o=0}c[g>>2]=o?e+4|0:n;h=7;return h|0};case 5:{if((k-i|0)<2){h=-2;return h|0}else{m=e+2|0;break a}break};case 4:{n=e+2|0;if((n|0)==(k|0)){h=-1;return h|0}if((a[n]|0)!=0){m=n;break a}if((a[e+3|0]|0)!=93){m=n;break a}l=e+4|0;if((l|0)==(k|0)){h=-1;return h|0}if((a[l]|0)!=0){m=n;break a}if((a[e+5|0]|0)!=62){m=n;break a}c[g>>2]=e+6;h=40;return h|0};case 10:{c[g>>2]=e+2;h=7;return h|0};case 7:{p=25;break a;break};case 0:case 1:case 8:{p=27;break a;break};default:{p=28;break a}}}else{switch(j&255|0){case 255:{break};case 216:case 217:case 218:case 219:{p=25;break a;break};case 220:case 221:case 222:case 223:{p=27;break a;break};default:{p=28;break a}}if(((f&255)-254|0)>>>0<2>>>0){p=27}else{p=28}}}while(0);do{if((p|0)==25){if((k-i|0)<4){h=-2;return h|0}else{m=e+4|0;break}}else if((p|0)==27){c[g>>2]=e;h=0;return h|0}else if((p|0)==28){m=e+2|0}}while(0);b:do{if((m|0)!=(k|0)){e=b+72|0;i=k;f=m;c:while(1){j=a[f]|0;o=a[f+1|0]|0;d:do{if(j<<24>>24==0){switch(d[e+(o&255)|0]|0){case 5:{if((i-f|0)<2){p=36;break c}q=f+2|0;break d;break};case 6:{if((i-f|0)<3){p=39;break c}q=f+3|0;break d;break};case 7:{p=41;break d;break};case 0:case 1:case 8:case 9:case 10:case 4:{p=44;break c;break};default:{p=45;break d}}}else{switch(j&255|0){case 255:{break};case 216:case 217:case 218:case 219:{p=41;break d;break};case 220:case 221:case 222:case 223:{p=44;break c;break};default:{p=45;break d}}if(((o&255)-254|0)>>>0<2>>>0){p=44;break c}else{p=45}}}while(0);if((p|0)==41){p=0;if((i-f|0)<4){p=42;break}q=f+4|0}else if((p|0)==45){p=0;q=f+2|0}if((q|0)==(k|0)){break b}else{f=q}}if((p|0)==36){c[g>>2]=f;h=6;return h|0}else if((p|0)==39){c[g>>2]=f;h=6;return h|0}else if((p|0)==42){c[g>>2]=f;h=6;return h|0}else if((p|0)==44){c[g>>2]=f;h=6;return h|0}}}while(0);c[g>>2]=k;h=6;return h|0}function Bf(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0;if((e|0)==(f|0)){h=-4;return h|0}i=b+72|0;j=e;a:while(1){k=a[j]|0;b:do{if(k<<24>>24==0){switch(d[i+(d[j+1|0]|0)|0]|0){case 5:{l=j+2|0;break b;break};case 21:{m=22;break a;break};case 2:{m=12;break a;break};case 7:{m=8;break b;break};case 10:{m=13;break a;break};case 9:{m=16;break a;break};case 3:{m=9;break a;break};case 6:{l=j+3|0;break b;break};default:{m=25;break b}}}else{if(((k&255)-216|0)>>>0<4>>>0){m=8}else{m=25}}}while(0);if((m|0)==8){m=0;l=j+4|0}else if((m|0)==25){m=0;l=j+2|0}if((l|0)==(f|0)){m=27;break}else{j=l}}if((m|0)==9){if((j|0)==(e|0)){h=Of(b,e+2|0,f,g)|0;return h|0}else{c[g>>2]=j;h=6;return h|0}}else if((m|0)==12){c[g>>2]=j;h=0;return h|0}else if((m|0)==13){if((j|0)==(e|0)){c[g>>2]=e+2;h=7;return h|0}else{c[g>>2]=j;h=6;return h|0}}else if((m|0)==16){if((j|0)!=(e|0)){c[g>>2]=j;h=6;return h|0}b=e+2|0;if((b|0)==(f|0)){h=-3;return h|0}if((a[b]|0)==0){n=(a[i+(d[e+3|0]|0)|0]|0)==10}else{n=0}c[g>>2]=n?e+4|0:b;h=7;return h|0}else if((m|0)==22){if((j|0)==(e|0)){c[g>>2]=e+2;h=39;return h|0}else{c[g>>2]=j;h=6;return h|0}}else if((m|0)==27){c[g>>2]=f;h=6;return h|0}return 0}function Cf(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0;if((e|0)==(f|0)){h=-4;return h|0}i=b+72|0;j=e;a:while(1){k=a[j]|0;b:do{if(k<<24>>24==0){switch(d[i+(d[j+1|0]|0)|0]|0){case 10:{l=15;break a;break};case 5:{m=j+2|0;break b;break};case 6:{m=j+3|0;break b;break};case 30:{l=12;break a;break};case 3:{l=9;break a;break};case 7:{l=8;break b;break};case 9:{l=18;break a;break};default:{l=24;break b}}}else{if(((k&255)-216|0)>>>0<4>>>0){l=8}else{l=24}}}while(0);if((l|0)==8){l=0;m=j+4|0}else if((l|0)==24){l=0;m=j+2|0}if((m|0)==(f|0)){l=26;break}else{j=m}}if((l|0)==9){if((j|0)==(e|0)){h=Of(b,e+2|0,f,g)|0;return h|0}else{c[g>>2]=j;h=6;return h|0}}else if((l|0)==12){if((j|0)==(e|0)){m=Pf(b,e+2|0,f,g)|0;h=(m|0)==22?0:m;return h|0}else{c[g>>2]=j;h=6;return h|0}}else if((l|0)==15){if((j|0)==(e|0)){c[g>>2]=e+2;h=7;return h|0}else{c[g>>2]=j;h=6;return h|0}}else if((l|0)==18){if((j|0)!=(e|0)){c[g>>2]=j;h=6;return h|0}j=e+2|0;if((j|0)==(f|0)){h=-3;return h|0}if((a[j]|0)==0){n=(a[i+(d[e+3|0]|0)|0]|0)==10}else{n=0}c[g>>2]=n?e+4|0:j;h=7;return h|0}else if((l|0)==26){c[g>>2]=f;h=6;return h|0}return 0}function Df(b,c,e){b=b|0;c=c|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;f=b+72|0;b=e;e=c;a:while(1){c=a[e]|0;g=e+1|0;h=a[g]|0;b:do{if(c<<24>>24==0){switch(d[f+(h&255)|0]|0){case 29:case 22:case 24:case 25:case 26:case 27:{i=12;break};case 5:{j=b;k=e;l=0;i=10;break};case 7:{i=6;break};case 6:{m=b;n=e;o=0;i=8;break};default:{i=15;break a}}}else{switch(c&255|0){case 220:case 221:case 222:case 223:{i=15;break a;break};case 216:case 217:case 218:case 219:{i=6;break b;break};case 255:{break};default:{i=12;break b}}if(((h&255)-254|0)>>>0<2>>>0){i=15;break a}else{i=12}}}while(0);if((i|0)==6){i=0;if(c<<24>>24!=(a[b]|0)){p=0;i=20;break}m=b+1|0;n=g;o=h;i=8}else if((i|0)==12){i=0;if((a[b]|0)!=c<<24>>24){p=0;i=20;break}if((a[b+1|0]|0)==h<<24>>24){q=b;r=e}else{p=0;i=20;break}}if((i|0)==8){i=0;s=n+1|0;if(o<<24>>24!=(a[m]|0)){p=0;i=20;break}j=m+1|0;k=s;l=a[s]|0;i=10}if((i|0)==10){i=0;if(l<<24>>24!=(a[j]|0)){p=0;i=20;break}if((a[k+1|0]|0)==(a[j+1|0]|0)){q=j;r=k}else{p=0;i=20;break}}b=q+2|0;e=r+2|0}if((i|0)==15){r=a[b]|0;e=a[b+1|0]|0;c:do{if(r<<24>>24==0){switch(d[f+(e&255)|0]|0){case 5:case 6:case 7:case 29:case 22:case 24:case 25:case 26:case 27:{p=0;break};default:{break c}}return p|0}else{switch(r&255|0){case 255:{break};case 223:case 222:case 221:case 220:{break c;break};default:{p=0;return p|0}}if(((e&255)-254|0)>>>0<2>>>0){break}else{p=0}return p|0}}while(0);p=1;return p|0}else if((i|0)==20){return p|0}return 0}function Ef(b,c,d,e){b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;b=a[e]|0;f=(c|0)==(d|0);a:do{if(b<<24>>24==0){g=f}else{h=c;i=e;j=b;k=f;while(1){if(k){l=0;m=7;break}if((a[h]|0)!=0){l=0;m=7;break}if((a[h+1|0]|0)!=j<<24>>24){l=0;m=7;break}n=h+2|0;o=i+1|0;p=a[o]|0;q=(n|0)==(d|0);if(p<<24>>24==0){g=q;break a}else{h=n;i=o;j=p;k=q}}if((m|0)==7){return l|0}}}while(0);l=g&1;return l|0}function Ff(b,c){b=b|0;c=c|0;var e=0,f=0,g=0,h=0;e=b+72|0;b=c;a:while(1){f=a[b]|0;g=a[b+1|0]|0;b:do{if(f<<24>>24==0){switch(d[e+(g&255)|0]|0|0){case 6:{b=b+3|0;continue a;break};case 29:case 22:case 24:case 25:case 26:case 27:{h=9;break b;break};case 5:{b=b+2|0;continue a;break};case 7:{h=8;break b;break};default:{break a}}}else{switch(f&255|0){case 220:case 221:case 222:case 223:{break a;break};case 255:{break};case 216:case 217:case 218:case 219:{h=8;break b;break};default:{h=9;break b}}if(((g&255)-254|0)>>>0<2>>>0){break a}else{h=9}}}while(0);if((h|0)==8){h=0;b=b+4|0;continue}else if((h|0)==9){h=0;b=b+2|0;continue}}return b-c|0}function Gf(b,c){b=b|0;c=c|0;var e=0,f=0,g=0;if((a[c]|0)!=0){e=c;return e|0}f=b+72|0;b=c;while(1){c=d[f+(d[b+1|0]|0)|0]|0;if(!((c|0)==10|(c|0)==9|(c|0)==21)){e=b;g=3;break}c=b+2|0;if((a[c]|0)==0){b=c}else{e=c;g=3;break}}if((g|0)==3){return e|0}return 0}function Hf(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;h=b+72|0;b=0;i=0;j=1;k=e;a:while(1){e=k+2|0;l=a[e]|0;m=k+3|0;n=a[m]|0;b:do{if(l<<24>>24==0){switch(d[h+(n&255)|0]|0){case 6:{if((j|0)!=0){b=b;i=i;j=j;k=m;continue a}if((i|0)>=(f|0)){b=b;i=i;j=1;k=m;continue a}c[g+(i<<4)>>2]=e;a[g+(i<<4)+12|0]=1;b=b;i=i;j=1;k=m;continue a;break};case 5:{if((j|0)!=0){b=b;i=i;j=j;k=e;continue a}if((i|0)>=(f|0)){b=b;i=i;j=1;k=e;continue a}c[g+(i<<4)>>2]=e;a[g+(i<<4)+12|0]=1;b=b;i=i;j=1;k=e;continue a;break};case 7:{o=12;break b;break};case 9:case 10:{if((j|0)==1){b=b;i=i;j=0;k=e;continue a}if(!((j|0)==2&(i|0)<(f|0))){b=b;i=i;j=j;k=e;continue a}a[g+(i<<4)+12|0]=0;b=b;i=i;j=2;k=e;continue a;break};case 3:{if((i|0)>=(f|0)){b=b;i=i;j=j;k=e;continue a}a[g+(i<<4)+12|0]=0;b=b;i=i;j=j;k=e;continue a;break};case 13:{if((j|0)!=2){if((i|0)>=(f|0)){b=13;i=i;j=2;k=e;continue a}c[g+(i<<4)+4>>2]=k+4;b=13;i=i;j=2;k=e;continue a}if((b|0)!=13){b=b;i=i;j=2;k=e;continue a}if((i|0)<(f|0)){c[g+(i<<4)+8>>2]=e}b=13;i=i+1|0;j=0;k=e;continue a;break};case 11:case 17:{if((j|0)==2){b=b;i=i;j=2;k=e;continue a}else{break a}break};case 12:{if((j|0)!=2){if((i|0)>=(f|0)){b=12;i=i;j=2;k=e;continue a}c[g+(i<<4)+4>>2]=k+4;b=12;i=i;j=2;k=e;continue a}if((b|0)!=12){b=b;i=i;j=2;k=e;continue a}if((i|0)<(f|0)){c[g+(i<<4)+8>>2]=e}b=12;i=i+1|0;j=0;k=e;continue a;break};case 21:{if((j|0)==1){b=b;i=i;j=0;k=e;continue a}if(!((j|0)==2&(i|0)<(f|0))){b=b;i=i;j=j;k=e;continue a}p=g+(i<<4)+12|0;if((a[p]|0)==0){b=b;i=i;j=2;k=e;continue a}do{if((e|0)!=(c[g+(i<<4)+4>>2]|0)&n<<24>>24==32){q=a[k+4|0]|0;r=a[k+5|0]|0;if((q<<24>>24|0)==(-1|0)){if(((r&255)-254|0)>>>0<2>>>0){s=0}else{b=b;i=i;j=2;k=e;continue a}}else if((q<<24>>24|0)==0){if(r<<24>>24==32){break}s=d[h+(r&255)|0]|0}else{b=b;i=i;j=2;k=e;continue a}if((s|0)!=(b|0)){b=b;i=i;j=2;k=e;continue a}}}while(0);a[p]=0;b=b;i=i;j=2;k=e;continue a;break};case 29:case 22:case 24:{o=16;break b;break};default:{b=b;i=i;j=j;k=e;continue a}}}else{switch(l&255|0){case 216:case 217:case 218:case 219:{o=12;break b;break};case 255:{break};case 220:case 221:case 222:case 223:{b=b;i=i;j=j;k=e;continue a;break};default:{o=16;break b}}if(!(((n&255)-254|0)>>>0>1>>>0&(j|0)==0)){b=b;i=i;j=j;k=e;continue a}}}while(0);if((o|0)==12){o=0;do{if((j|0)==0){if((i|0)>=(f|0)){t=1;break}c[g+(i<<4)>>2]=e;a[g+(i<<4)+12|0]=1;t=1}else{t=j}}while(0);b=b;i=i;j=t;k=k+4|0;continue}else if((o|0)==16){o=0;if((j|0)!=0){b=b;i=i;j=j;k=e;continue}}if((i|0)>=(f|0)){b=b;i=i;j=1;k=e;continue}c[g+(i<<4)>>2]=e;a[g+(i<<4)+12|0]=1;b=b;i=i;j=1;k=e}return i|0}function If(b,c){b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;b=c+4|0;d=a[b]|0;a:do{if(d<<24>>24==0){if((a[c+5|0]|0)!=120){e=b;f=0;g=0;h=11;break}i=c+6|0;j=0;while(1){b:do{if((a[i]|0)==0){k=a[i+1|0]|0;if(k<<24>>24==59){l=j;break a}m=k<<24>>24;switch(m|0){case 65:case 66:case 67:case 68:case 69:case 70:{n=(j<<4)-55+m|0;break b;break};case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:{n=m-48|j<<4;break b;break};case 97:case 98:case 99:case 100:case 101:case 102:{n=(j<<4)-87+m|0;break b;break};default:{n=j;break b}}}else{n=j}}while(0);if((n|0)>1114111){o=-1;break}else{i=i+2|0;j=n}}return o|0}else{e=b;f=0;g=d;h=11}}while(0);c:do{if((h|0)==11){while(1){h=0;if(g<<24>>24==0){d=a[e+1|0]|0;if(d<<24>>24==59){l=f;break c}p=(d<<24>>24)-48|0}else{p=-49}d=p+(f*10|0)|0;b=e+2|0;if((d|0)>1114111){o=-1;break}e=b;f=d;g=a[b]|0;h=11}return o|0}}while(0);d:do{switch(l>>8|0){case 0:{if((a[20496+l|0]|0)==0){o=-1}else{break d}return o|0};case 255:{if((l&-2|0)==65534){o=-1}else{break d}return o|0};case 216:case 217:case 218:case 219:case 220:case 221:case 222:case 223:{o=-1;return o|0};default:{}}}while(0);o=l;return o|0}function Jf(b,c,d){b=b|0;c=c|0;d=d|0;var e=0;b=(d-c|0)/2|0;do{if((b|0)==2){if((a[c+2|0]|0)!=0){break}if((a[c+3|0]|0)!=116){break}if((a[c]|0)!=0){break}d=a[c+1|0]|0;if((d|0)==108){e=60;return e|0}else if((d|0)!=103){break}e=62;return e|0}else if((b|0)==3){if((a[c]|0)!=0){break}if((a[c+1|0]|0)!=97){break}if((a[c+2|0]|0)!=0){break}if((a[c+3|0]|0)!=109){break}if((a[c+4|0]|0)!=0){break}if((a[c+5|0]|0)==112){e=38}else{break}return e|0}else if((b|0)==4){if((a[c]|0)!=0){break}d=a[c+1|0]|0;if((d|0)==97){if((a[c+2|0]|0)!=0){break}if((a[c+3|0]|0)!=112){break}if((a[c+4|0]|0)!=0){break}if((a[c+5|0]|0)!=111){break}if((a[c+6|0]|0)!=0){break}if((a[c+7|0]|0)==115){e=39}else{break}return e|0}else if((d|0)==113){if((a[c+2|0]|0)!=0){break}if((a[c+3|0]|0)!=117){break}if((a[c+4|0]|0)!=0){break}if((a[c+5|0]|0)!=111){break}if((a[c+6|0]|0)!=0){break}if((a[c+7|0]|0)==116){e=34}else{break}return e|0}else{break}}}while(0);e=0;return e|0}function Kf(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0;if(e>>>0>=f>>>0){return}h=b+72|0;b=g+4|0;i=g|0;g=e;while(1){e=a[g]|0;a:do{if(e<<24>>24==0){switch(d[h+(d[g+1|0]|0)|0]|0){case 9:{c[i>>2]=(c[i>>2]|0)+1;j=g+2|0;if((j|0)==(f|0)){k=f}else{if((a[j]|0)==0){l=(a[h+(d[g+3|0]|0)|0]|0)==10}else{l=0}k=l?g+4|0:j}c[b>>2]=-1;m=k;break a;break};case 5:{m=g+2|0;break a;break};case 10:{c[b>>2]=-1;c[i>>2]=(c[i>>2]|0)+1;m=g+2|0;break a;break};case 7:{n=8;break a;break};case 6:{m=g+3|0;break a;break};default:{n=15;break a}}}else{if(((e&255)-216|0)>>>0<4>>>0){n=8}else{n=15}}}while(0);if((n|0)==8){n=0;m=g+4|0}else if((n|0)==15){n=0;m=g+2|0}c[b>>2]=(c[b>>2]|0)+1;if(m>>>0<f>>>0){g=m}else{break}}return}function Lf(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0;h=f-2|0;f=e+2|0;if((f|0)==(h|0)){i=1;return i|0}j=b+72|0;b=e;e=f;a:while(1){f=(a[e]|0)==0;k=b+3|0;if(!f){l=11;break}m=a[k]|0;b:do{switch(d[j+(m&255)|0]|0){case 25:case 24:case 27:case 13:case 31:case 32:case 34:case 35:case 17:case 14:case 15:case 9:case 10:case 18:case 16:case 33:case 30:case 19:{break};case 21:{if(m<<24>>24==9){l=7;break a}break};case 26:case 22:{if(m<<24>>24>=0){break b}if(f){l=10}else{l=11;break a}break};default:{l=10}}}while(0);if((l|0)==10){l=0;f=a[k]|0;if(!((f|0)==36|(f|0)==64)){l=11;break}}f=e+2|0;if((f|0)==(h|0)){i=1;l=12;break}else{b=e;e=f}}if((l|0)==7){c[g>>2]=e;i=0;return i|0}else if((l|0)==11){c[g>>2]=e;i=0;return i|0}else if((l|0)==12){return i|0}return 0}function Mf(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;b=c[d>>2]|0;a:do{if((b|0)!=(e|0)){h=g;i=b;b:while(1){j=a[i+1|0]|0;k=a[i]|0;l=k&255;c:do{switch(l|0){case 216:case 217:case 218:case 219:{m=c[f>>2]|0;if((h-m|0)<4){n=15;break b}o=j&255;p=(l<<2&12|o>>>6)+1|0;c[f>>2]=m+1;a[m]=p>>>2|240;m=c[f>>2]|0;c[f>>2]=m+1;a[m]=o>>>2&15|p<<4&48|128;p=i+2|0;o=a[i+3|0]|0;m=j<<4&48|(o&255)>>>6|a[p]<<2&12|-128;q=c[f>>2]|0;c[f>>2]=q+1;a[q]=m;m=c[f>>2]|0;c[f>>2]=m+1;a[m]=o&63|-128;r=p;break};case 1:case 2:case 3:case 4:case 5:case 6:case 7:{n=8;break};case 0:{if(j<<24>>24<=-1){n=8;break c}p=c[f>>2]|0;if((p|0)==(g|0)){n=6;break b}c[f>>2]=p+1;a[p]=j;r=i;break};default:{p=c[f>>2]|0;if((h-p|0)<3){n=12;break b}c[f>>2]=p+1;a[p]=(k&255)>>>4|-32;p=c[f>>2]|0;c[f>>2]=p+1;a[p]=(j&255)>>>6|k<<2&60|-128;p=c[f>>2]|0;c[f>>2]=p+1;a[p]=j&63|-128;r=i}}}while(0);if((n|0)==8){n=0;l=c[f>>2]|0;if((h-l|0)<2){n=9;break}c[f>>2]=l+1;a[l]=(j&255)>>>6|k<<2|-64;l=c[f>>2]|0;c[f>>2]=l+1;a[l]=j&63|-128;r=i}l=r+2|0;if((l|0)==(e|0)){break a}else{i=l}}if((n|0)==6){c[d>>2]=i;return}else if((n|0)==9){c[d>>2]=i;return}else if((n|0)==12){c[d>>2]=i;return}else if((n|0)==15){c[d>>2]=i;return}}}while(0);c[d>>2]=e;return}function Nf(e,f,g,h,i){e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0;e=c[f>>2]|0;j=c[h>>2]|0;if((g-e|0)>(i-j|0)){k=g-2|0;l=(a[k]&-8)<<24>>24==-40?k:g}else{l=g}if((e|0)==(l|0)){return}else{m=e;n=j}while(1){if((n|0)==(i|0)){o=7;break}j=(d[m]|0)<<8|(d[m+1|0]|0);c[h>>2]=n+2;b[n>>1]=j;j=(c[f>>2]|0)+2|0;c[f>>2]=j;if((j|0)==(l|0)){o=7;break}m=j;n=c[h>>2]|0}if((o|0)==7){return}}function Of(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;if((e|0)==(f|0)){h=-1;return h|0}i=a[e]|0;j=a[e+1|0]|0;a:do{if(i<<24>>24==0){k=j&255;l=b+72|0;switch(d[l+k|0]|0){case 6:{if((f-e|0)<3){h=-2;return h|0}c[g>>2]=e;h=0;return h|0};case 7:{m=15;break a;break};case 29:{n=0;o=k;m=9;break a;break};case 19:{k=e+2|0;if((k|0)==(f|0)){h=-1;return h|0}do{if((a[k]|0)==0){p=a[e+3|0]|0;if(p<<24>>24!=120){if((a[l+(p&255)|0]|0)==25){q=k}else{break}while(1){r=q+2|0;if((r|0)==(f|0)){h=-1;m=54;break}if((a[r]|0)!=0){m=36;break}p=d[l+(d[q+3|0]|0)|0]|0;if((p|0)==18){m=35;break}else if((p|0)==25){q=r}else{m=36;break}}if((m|0)==35){c[g>>2]=q+4;h=10;return h|0}else if((m|0)==36){c[g>>2]=r;h=0;return h|0}else if((m|0)==54){return h|0}}p=e+4|0;if((p|0)==(f|0)){h=-1;return h|0}do{if((a[p]|0)==0){if(((d[l+(d[e+5|0]|0)|0]|0)-24|0)>>>0>=2>>>0){break}s=e+6|0;if((s|0)==(f|0)){h=-1;return h|0}else{t=p;u=s}while(1){if((a[u]|0)!=0){m=29;break}s=d[l+(d[t+3|0]|0)|0]|0;if((s|0)==18){m=28;break}else if(!((s|0)==25|(s|0)==24)){m=29;break}s=u+2|0;if((s|0)==(f|0)){h=-1;m=54;break}else{t=u;u=s}}if((m|0)==28){c[g>>2]=t+4;h=10;return h|0}else if((m|0)==29){c[g>>2]=u;h=0;return h|0}else if((m|0)==54){return h|0}}}while(0);c[g>>2]=p;h=0;return h|0}}while(0);c[g>>2]=k;h=0;return h|0};case 5:{if((f-e|0)<2){h=-2;return h|0}c[g>>2]=e;h=0;return h|0};case 22:case 24:{break a;break};default:{m=37;break a}}}else{l=i&255;switch(l|0){case 255:{s=j&255;if((s-254|0)>>>0<2>>>0){m=37;break a}else{n=255;o=s;m=9;break a}break};case 216:case 217:case 218:case 219:{m=15;break a;break};case 220:case 221:case 222:case 223:{m=37;break a;break};default:{n=l;o=j&255;m=9;break a}}}}while(0);do{if((m|0)==9){if((1<<(o&31)&c[18232+((o>>>5|d[17968+n|0]<<3)<<2)>>2]|0)!=0){break}c[g>>2]=e;h=0;return h|0}else if((m|0)==15){if((f-e|0)<4){h=-2;return h|0}c[g>>2]=e;h=0;return h|0}else if((m|0)==37){c[g>>2]=e;h=0;return h|0}}while(0);n=e+2|0;if((n|0)==(f|0)){h=-1;return h|0}o=b+72|0;b=e;e=n;b:while(1){n=a[e]|0;j=a[b+3|0]|0;c:do{if(n<<24>>24==0){i=j&255;switch(d[o+i|0]|0){case 22:case 24:case 25:case 26:case 27:{break};case 6:{m=48;break b;break};case 5:{m=46;break b;break};case 7:{m=50;break b;break};case 29:{v=0;w=i;m=43;break};case 18:{m=52;break b;break};default:{m=53;break b}}}else{i=n&255;switch(i|0){case 216:case 217:case 218:case 219:{m=50;break b;break};case 220:case 221:case 222:case 223:{m=53;break b;break};case 255:{u=j&255;if((u-254|0)>>>0<2>>>0){m=53;break b}else{v=255;w=u;m=43;break c}break};default:{v=i;w=j&255;m=43;break c}}}}while(0);if((m|0)==43){m=0;if((1<<(w&31)&c[18232+((w>>>5|d[19512+v|0]<<3)<<2)>>2]|0)==0){m=45;break}}j=e+2|0;if((j|0)==(f|0)){h=-1;m=54;break}else{b=e;e=j}}if((m|0)==45){c[g>>2]=e;h=0;return h|0}else if((m|0)==46){if((f-e|0)<2){h=-2;return h|0}c[g>>2]=e;h=0;return h|0}else if((m|0)==48){if((f-e|0)<3){h=-2;return h|0}c[g>>2]=e;h=0;return h|0}else if((m|0)==50){if((f-e|0)<4){h=-2;return h|0}c[g>>2]=e;h=0;return h|0}else if((m|0)==52){c[g>>2]=b+4;h=9;return h|0}else if((m|0)==53){c[g>>2]=e;h=0;return h|0}else if((m|0)==54){return h|0}return 0}function Pf(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;if((e|0)==(f|0)){h=-1;return h|0}i=a[e]|0;j=a[e+1|0]|0;a:do{if(i<<24>>24==0){k=j&255;switch(d[b+72+k|0]|0|0){case 29:{l=0;m=k;n=9;break a;break};case 7:{n=15;break a;break};case 21:case 10:case 9:case 30:{c[g>>2]=e;h=22;return h|0};case 5:{if((f-e|0)<2){h=-2;return h|0}c[g>>2]=e;h=0;return h|0};case 22:case 24:{break a;break};case 6:{if((f-e|0)<3){h=-2;return h|0}c[g>>2]=e;h=0;return h|0};default:{n=18;break a}}}else{k=i&255;switch(k|0){case 216:case 217:case 218:case 219:{n=15;break a;break};case 255:{o=j&255;if((o-254|0)>>>0<2>>>0){n=18;break a}else{l=255;m=o;n=9;break a}break};case 220:case 221:case 222:case 223:{n=18;break a;break};default:{l=k;m=j&255;n=9;break a}}}}while(0);do{if((n|0)==9){if((1<<(m&31)&c[18232+((m>>>5|(d[17968+l|0]|0)<<3)<<2)>>2]|0)!=0){break}c[g>>2]=e;h=0;return h|0}else if((n|0)==15){if((f-e|0)<4){h=-2;return h|0}c[g>>2]=e;h=0;return h|0}else if((n|0)==18){c[g>>2]=e;h=0;return h|0}}while(0);l=e+2|0;if((l|0)==(f|0)){h=-1;return h|0}m=b+72|0;b=e;e=l;b:while(1){l=a[e]|0;j=a[b+3|0]|0;c:do{if(l<<24>>24==0){i=j&255;switch(d[m+i|0]|0|0){case 7:{n=31;break b;break};case 18:{n=33;break b;break};case 6:{n=29;break b;break};case 5:{n=27;break b;break};case 29:{p=0;q=i;n=24;break};case 22:case 24:case 25:case 26:case 27:{break};default:{n=34;break b}}}else{i=l&255;switch(i|0){case 216:case 217:case 218:case 219:{n=31;break b;break};case 220:case 221:case 222:case 223:{n=34;break b;break};case 255:{k=j&255;if((k-254|0)>>>0<2>>>0){n=34;break b}else{p=255;q=k;n=24;break c}break};default:{p=i;q=j&255;n=24;break c}}}}while(0);if((n|0)==24){n=0;if((1<<(q&31)&c[18232+((q>>>5|(d[19512+p|0]|0)<<3)<<2)>>2]|0)==0){n=26;break}}j=e+2|0;if((j|0)==(f|0)){h=-1;n=35;break}else{b=e;e=j}}if((n|0)==26){c[g>>2]=e;h=0;return h|0}else if((n|0)==27){if((f-e|0)<2){h=-2;return h|0}c[g>>2]=e;h=0;return h|0}else if((n|0)==29){if((f-e|0)<3){h=-2;return h|0}c[g>>2]=e;h=0;return h|0}else if((n|0)==31){if((f-e|0)<4){h=-2;return h|0}c[g>>2]=e;h=0;return h|0}else if((n|0)==33){c[g>>2]=b+4;h=28;return h|0}else if((n|0)==34){c[g>>2]=e;h=0;return h|0}else if((n|0)==35){return h|0}return 0}function Qf(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;if((e|0)==(f|0)){h=-1;return h|0}do{if((a[e]|0)==0){if((a[e+1|0]|0)!=45){break}i=e+2|0;if((i|0)==(f|0)){h=-1;return h|0}j=b+72|0;k=f;l=i;a:while(1){i=a[l]|0;m=a[l+1|0]|0;b:do{if(i<<24>>24==0){switch(d[j+(m&255)|0]|0){case 7:{n=15;break b;break};case 0:case 1:case 8:{n=17;break a;break};case 27:{o=l+2|0;if((o|0)==(f|0)){h=-1;n=28;break a}if((a[o]|0)!=0){p=o;break b}if((a[l+3|0]|0)==45){n=22;break a}else{p=o;break b}break};case 5:{if((k-l|0)<2){h=-2;n=28;break a}p=l+2|0;break b;break};case 6:{if((k-l|0)<3){h=-2;n=28;break a}p=l+3|0;break b;break};default:{n=27;break b}}}else{switch(i&255|0){case 216:case 217:case 218:case 219:{n=15;break b;break};case 220:case 221:case 222:case 223:{n=17;break a;break};case 255:{break};default:{n=27;break b}}if(((m&255)-254|0)>>>0<2>>>0){n=17;break a}else{n=27}}}while(0);if((n|0)==15){n=0;if((k-l|0)<4){h=-2;n=28;break}p=l+4|0}else if((n|0)==27){n=0;p=l+2|0}if((p|0)==(f|0)){h=-1;n=28;break}else{l=p}}if((n|0)==17){c[g>>2]=l;h=0;return h|0}else if((n|0)==22){k=l+4|0;if((k|0)==(f|0)){h=-1;return h|0}do{if((a[k]|0)==0){if((a[l+5|0]|0)!=62){break}c[g>>2]=l+6;h=13;return h|0}}while(0);c[g>>2]=k;h=0;return h|0}else if((n|0)==28){return h|0}}}while(0);c[g>>2]=e;h=0;return h|0}function Rf(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;if((e|0)==(f|0)){h=-1;return h|0}i=a[e]|0;j=i<<24>>24==0;k=a[e+1|0]|0;a:do{if(j){l=k&255;switch(d[b+72+l|0]|0){case 22:case 24:{break a;break};case 7:{m=15;break a;break};case 6:{if((f-e|0)<3){h=-2;return h|0}c[g>>2]=e;h=0;return h|0};case 5:{if((f-e|0)<2){h=-2;return h|0}c[g>>2]=e;h=0;return h|0};case 29:{n=0;o=l;m=9;break a;break};default:{m=17;break a}}}else{l=i&255;switch(l|0){case 216:case 217:case 218:case 219:{m=15;break a;break};case 255:{p=k&255;if((p-254|0)>>>0<2>>>0){m=17;break a}else{n=255;o=p;m=9;break a}break};case 220:case 221:case 222:case 223:{m=17;break a;break};default:{n=l;o=k&255;m=9;break a}}}}while(0);do{if((m|0)==9){if((1<<(o&31)&c[18232+((o>>>5|d[17968+n|0]<<3)<<2)>>2]|0)!=0){break}c[g>>2]=e;h=0;return h|0}else if((m|0)==15){if((f-e|0)<4){h=-2;return h|0}c[g>>2]=e;h=0;return h|0}else if((m|0)==17){c[g>>2]=e;h=0;return h|0}}while(0);n=e+2|0;if((n|0)==(f|0)){h=-1;return h|0}o=b+72|0;b=e;i=n;b:while(1){l=a[i]|0;p=a[b+3|0]|0;c:do{if(l<<24>>24==0){q=p&255;switch(d[o+q|0]|0){case 22:case 24:case 25:case 26:case 27:{break};case 15:{m=61;break b;break};case 6:{m=28;break b;break};case 7:{m=30;break b;break};case 5:{m=26;break b;break};case 29:{r=0;s=q;m=23;break};case 21:case 9:case 10:{m=32;break b;break};default:{t=i;break b}}}else{q=l&255;switch(q|0){case 220:case 221:case 222:case 223:{t=i;break b;break};case 216:case 217:case 218:case 219:{m=30;break b;break};case 255:{u=p&255;if((u-254|0)>>>0<2>>>0){t=i;break b}else{r=255;s=u;m=23;break c}break};default:{r=q;s=p&255;m=23;break c}}}}while(0);if((m|0)==23){m=0;if((1<<(s&31)&c[18232+((s>>>5|d[19512+r|0]<<3)<<2)>>2]|0)==0){m=25;break}}p=i+2|0;if((p|0)==(f|0)){h=-1;m=76;break}else{b=i;i=p}}do{if((m|0)==25){c[g>>2]=i;h=0;return h|0}else if((m|0)==26){if((f-i|0)<2){h=-2;return h|0}c[g>>2]=i;h=0;return h|0}else if((m|0)==28){if((f-i|0)<3){h=-2;return h|0}c[g>>2]=i;h=0;return h|0}else if((m|0)==30){if((f-i|0)<4){h=-2;return h|0}c[g>>2]=i;h=0;return h|0}else if((m|0)==32){do{if((i-e|0)!=6|j^1){v=11}else{r=k<<24>>24;if((r|0)==88){w=1}else if((r|0)==120){w=0}else{v=11;break}if((a[n]|0)!=0){v=11;break}r=a[e+3|0]|0;if((r|0)==109){x=w}else if((r|0)==77){x=1}else{v=11;break}if((a[e+4|0]|0)!=0){v=11;break}r=a[e+5|0]|0;if((r|0)==108){if((x|0)==0){v=12;break}}else if((r|0)!=76){v=11;break}c[g>>2]=i;h=0;return h|0}}while(0);r=b+4|0;if((r|0)==(f|0)){h=-1;return h|0}s=f;p=r;d:while(1){r=a[p]|0;l=a[p+1|0]|0;e:do{if(r<<24>>24==0){switch(d[o+(l&255)|0]|0){case 6:{if((s-p|0)<3){h=-2;m=76;break d}y=p+3|0;break e;break};case 0:case 1:case 8:{m=54;break d;break};case 15:{q=p+2|0;if((q|0)==(f|0)){h=-1;m=76;break d}if((a[q]|0)!=0){y=q;break e}if((a[p+3|0]|0)==62){m=59;break d}else{y=q;break e}break};case 7:{m=52;break e;break};case 5:{if((s-p|0)<2){h=-2;m=76;break d}y=p+2|0;break e;break};default:{m=60;break e}}}else{switch(r&255|0){case 255:{break};case 220:case 221:case 222:case 223:{m=54;break d;break};case 216:case 217:case 218:case 219:{m=52;break e;break};default:{m=60;break e}}if(((l&255)-254|0)>>>0<2>>>0){m=54;break d}else{m=60}}}while(0);if((m|0)==52){m=0;if((s-p|0)<4){h=-2;m=76;break}y=p+4|0}else if((m|0)==60){m=0;y=p+2|0}if((y|0)==(f|0)){h=-1;m=76;break}else{p=y}}if((m|0)==54){c[g>>2]=p;h=0;return h|0}else if((m|0)==59){c[g>>2]=p+4;h=v;return h|0}else if((m|0)==76){return h|0}}else if((m|0)==61){do{if((i-e|0)!=6|j^1){z=11}else{s=k<<24>>24;if((s|0)==88){A=1}else if((s|0)==120){A=0}else{z=11;break}if((a[n]|0)!=0){z=11;break}s=a[e+3|0]|0;if((s|0)==77){B=1}else if((s|0)==109){B=A}else{z=11;break}if((a[e+4|0]|0)!=0){z=11;break}s=a[e+5|0]|0;if((s|0)==108){if((B|0)==0){z=12;break}}else if((s|0)!=76){z=11;break}c[g>>2]=i;h=0;return h|0}}while(0);p=b+4|0;if((p|0)==(f|0)){h=-1;return h|0}if((a[p]|0)!=0){t=p;break}if((a[b+5|0]|0)!=62){t=p;break}c[g>>2]=b+6;h=z;return h|0}else if((m|0)==76){return h|0}}while(0);c[g>>2]=t;h=0;return h|0}function Sf(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;if((e|0)==(f|0)){h=-4;return h|0}i=b+72|0;a:do{switch(d[i+(d[e]|0)|0]|0){case 2:{j=e+1|0;if((j|0)==(f|0)){h=-1;return h|0}switch(d[i+(d[j]|0)|0]|0){case 22:case 24:case 29:case 5:case 6:case 7:{c[g>>2]=e;h=29;return h|0};case 15:{h=rg(b,e+2|0,f,g)|0;return h|0};case 16:{k=e+2|0;if((k|0)==(f|0)){h=-1;return h|0}l=d[i+(d[k]|0)|0]|0;if((l|0)==22|(l|0)==24){m=e+3|0;if((m|0)==(f|0)){h=-1;return h|0}else{n=k;o=m}b:while(1){switch(d[i+(d[o]|0)|0]|0){case 21:case 9:case 10:{break b;break};case 30:{p=16;break b;break};case 22:case 24:{break};default:{p=20;break b}}m=o+1|0;if((m|0)==(f|0)){h=-1;p=138;break}else{n=o;o=m}}do{if((p|0)==16){m=n+2|0;if((m|0)==(f|0)){h=-1;return h|0}q=d[i+(d[m]|0)|0]|0;if(!((q|0)==21|(q|0)==9|(q|0)==10|(q|0)==30)){break}c[g>>2]=o;h=0;return h|0}else if((p|0)==20){c[g>>2]=o;h=0;return h|0}else if((p|0)==138){return h|0}}while(0);c[g>>2]=o;h=16;return h|0}else if((l|0)==20){c[g>>2]=e+3;h=33;return h|0}else if((l|0)==27){h=qg(b,e+3|0,f,g)|0;return h|0}else{c[g>>2]=k;h=0;return h|0}break};default:{c[g>>2]=j;h=0;return h|0}}break};case 7:{if((f-e|0)<4){h=-2;return h|0}if((Oc[c[b+348>>2]&255](b,e)|0)!=0){r=18;s=e+4|0;break a}if((Oc[c[b+336>>2]&255](b,e)|0)!=0){r=19;s=e+4|0;break a}c[g>>2]=e;h=0;return h|0};case 6:{if((f-e|0)<3){h=-2;return h|0}if((Oc[c[b+344>>2]&255](b,e)|0)!=0){r=18;s=e+3|0;break a}if((Oc[c[b+332>>2]&255](b,e)|0)!=0){r=19;s=e+3|0;break a}c[g>>2]=e;h=0;return h|0};case 9:{if((e+1|0)!=(f|0)){p=3;break a}c[g>>2]=f;h=-15;return h|0};case 19:{q=e+1|0;if((q|0)==(f|0)){h=-1;return h|0}c:do{switch(d[i+(d[q]|0)|0]|0){case 6:{if((f-q|0)<3){h=-2;return h|0}if((Oc[c[b+344>>2]&255](b,q)|0)!=0){t=e+4|0;break c}c[g>>2]=q;h=0;return h|0};case 5:{if((f-q|0)<2){h=-2;return h|0}if((Oc[c[b+340>>2]&255](b,q)|0)!=0){t=e+3|0;break c}c[g>>2]=q;h=0;return h|0};case 29:{c[g>>2]=q;h=0;return h|0};case 22:case 24:{t=e+2|0;break};case 7:{if((f-q|0)<4){h=-2;return h|0}if((Oc[c[b+348>>2]&255](b,q)|0)!=0){t=e+5|0;break c}c[g>>2]=q;h=0;return h|0};default:{c[g>>2]=q;h=0;return h|0}}}while(0);if((t|0)==(f|0)){h=-20;return h|0}q=f;j=b+328|0;k=b+332|0;l=b+336|0;m=t;d:while(1){switch(d[i+(d[m]|0)|0]|0){case 9:case 10:case 21:case 32:case 11:case 30:case 36:{p=85;break d;break};case 6:{if((q-m|0)<3){h=-2;p=138;break d}if((Oc[c[k>>2]&255](b,m)|0)==0){p=78;break d}u=m+3|0;break};case 29:{p=70;break d;break};case 22:case 24:case 25:case 26:case 27:{u=m+1|0;break};case 5:{if((q-m|0)<2){h=-2;p=138;break d}if((Oc[c[j>>2]&255](b,m)|0)==0){p=74;break d}u=m+2|0;break};case 7:{if((q-m|0)<4){h=-2;p=138;break d}if((Oc[c[l>>2]&255](b,m)|0)==0){p=82;break d}u=m+4|0;break};default:{p=86;break d}}if((u|0)==(f|0)){h=-20;p=138;break}else{m=u}}if((p|0)==70){c[g>>2]=m;h=0;return h|0}else if((p|0)==74){c[g>>2]=m;h=0;return h|0}else if((p|0)==78){c[g>>2]=m;h=0;return h|0}else if((p|0)==82){c[g>>2]=m;h=0;return h|0}else if((p|0)==85){c[g>>2]=m;h=20;return h|0}else if((p|0)==86){c[g>>2]=m;h=0;return h|0}else if((p|0)==138){return h|0}break};case 21:case 10:{p=3;break};case 5:{if((f-e|0)<2){h=-2;return h|0}if((Oc[c[b+340>>2]&255](b,e)|0)!=0){r=18;s=e+2|0;break a}if((Oc[c[b+328>>2]&255](b,e)|0)!=0){r=19;s=e+2|0;break a}c[g>>2]=e;h=0;return h|0};case 13:{h=sg(13,b,e+1|0,f,g)|0;return h|0};case 32:{l=e+1|0;if((l|0)==(f|0)){h=-24;return h|0}switch(d[i+(d[l]|0)|0]|0){case 33:{c[g>>2]=e+2;h=36;return h|0};case 9:case 10:case 21:case 11:case 35:case 36:case 32:{c[g>>2]=l;h=24;return h|0};case 15:{c[g>>2]=e+2;h=35;return h|0};case 34:{c[g>>2]=e+2;h=37;return h|0};default:{c[g>>2]=l;h=0;return h|0}}break};case 12:{h=sg(12,b,e+1|0,f,g)|0;return h|0};case 31:{c[g>>2]=e+1;h=23;return h|0};case 36:{c[g>>2]=e+1;h=21;return h|0};case 22:case 24:{r=18;s=e+1|0;break};case 25:case 26:case 27:{r=19;s=e+1|0;break};case 11:{c[g>>2]=e+1;h=17;return h|0};case 30:{h=pg(b,e+1|0,f,g)|0;return h|0};case 35:{c[g>>2]=e+1;h=38;return h|0};case 20:{c[g>>2]=e+1;h=25;return h|0};case 4:{l=e+1|0;if((l|0)==(f|0)){h=-26;return h|0}do{if((a[l]|0)==93){q=e+2|0;if((q|0)==(f|0)){h=-1;return h|0}if((a[q]|0)!=62){break}c[g>>2]=e+3;h=34;return h|0}}while(0);c[g>>2]=l;h=26;return h|0};default:{c[g>>2]=e;h=0;return h|0}}}while(0);if((p|0)==3){u=e+1|0;e:do{if((u|0)!=(f|0)){t=e;o=u;while(1){n=d[i+(d[o]|0)|0]|0;if((n|0)==9){if((t+2|0)==(f|0)){break}}else if(!((n|0)==21|(n|0)==10)){break}n=o+1|0;if((n|0)==(f|0)){break e}else{t=o;o=n}}c[g>>2]=o;h=15;return h|0}}while(0);c[g>>2]=f;h=15;return h|0}f:do{if((s|0)!=(f|0)){u=f;e=b+328|0;t=b+332|0;l=b+336|0;n=s;g:while(1){switch(d[i+(d[n]|0)|0]|0){case 29:{p=111;break g;break};case 22:case 24:case 25:case 26:case 27:{v=n+1|0;break};case 7:{if((u-n|0)<4){h=-2;p=138;break g}if((Oc[c[l>>2]&255](b,n)|0)==0){p=123;break g}v=n+4|0;break};case 33:{p=130;break g;break};case 6:{if((u-n|0)<3){h=-2;p=138;break g}if((Oc[c[t>>2]&255](b,n)|0)==0){p=119;break g}v=n+3|0;break};case 11:case 32:case 35:case 36:case 20:case 30:case 21:case 9:case 10:{p=126;break g;break};case 34:{p=127;break g;break};case 15:{p=133;break g;break};case 5:{if((u-n|0)<2){h=-2;p=138;break g}if((Oc[c[e>>2]&255](b,n)|0)==0){p=115;break g}v=n+2|0;break};default:{p=136;break g}}if((v|0)==(f|0)){break f}else{n=v}}if((p|0)==111){c[g>>2]=n;h=0;return h|0}else if((p|0)==115){c[g>>2]=n;h=0;return h|0}else if((p|0)==119){c[g>>2]=n;h=0;return h|0}else if((p|0)==123){c[g>>2]=n;h=0;return h|0}else if((p|0)==126){c[g>>2]=n;h=r;return h|0}else if((p|0)==127){if((r|0)==19){c[g>>2]=n;h=0;return h|0}else{c[g>>2]=n+1;h=32;return h|0}}else if((p|0)==130){if((r|0)==19){c[g>>2]=n;h=0;return h|0}else{c[g>>2]=n+1;h=31;return h|0}}else if((p|0)==133){if((r|0)==19){c[g>>2]=n;h=0;return h|0}else{c[g>>2]=n+1;h=30;return h|0}}else if((p|0)==136){c[g>>2]=n;h=0;return h|0}else if((p|0)==138){return h|0}}}while(0);h=-r|0;return h|0}function Tf(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0;h=i;i=i+8|0;j=h|0;a:do{if((e|0)==(f|0)){k=-4}else{l=b+72|0;b:do{switch(d[l+(d[e]|0)|0]|0){case 0:case 1:case 8:{c[g>>2]=e;k=0;break a;break};case 5:{if((f-e|0)<2){k=-2;break a}if((Oc[c[b+352>>2]&255](b,e)|0)==0){m=e+2|0;break b}else{c[g>>2]=e;k=0;break a}break};case 6:{if((f-e|0)<3){k=-2;break a}if((Oc[c[b+356>>2]&255](b,e)|0)==0){m=e+3|0;break b}else{c[g>>2]=e;k=0;break a}break};case 7:{if((f-e|0)<4){k=-2;break a}if((Oc[c[b+360>>2]&255](b,e)|0)==0){m=e+4|0;break b}else{c[g>>2]=e;k=0;break a}break};case 2:{n=e+1|0;if((n|0)==(f|0)){k=-1;break a}c:do{switch(d[l+(d[n]|0)|0]|0){case 16:{o=e+2|0;if((o|0)==(f|0)){k=-1;break a}p=d[l+(d[o]|0)|0]|0;if((p|0)==20){q=e+3|0;if((f-q|0)<6){k=-1;break a}else{r=q;s=0}while(1){if((a[r]|0)!=(a[17816+s|0]|0)){t=26;break}q=s+1|0;u=r+1|0;if((q|0)<6){r=u;s=q}else{t=28;break}}if((t|0)==26){c[g>>2]=r;k=0;break a}else if((t|0)==28){c[g>>2]=u;k=8;break a}}else if((p|0)==27){k=qg(b,e+3|0,f,g)|0;break a}else{c[g>>2]=o;k=0;break a}break};case 7:{if((f-n|0)<4){k=-2;break a}if((Oc[c[b+348>>2]&255](b,n)|0)==0){c[g>>2]=n;k=0;break a}else{v=e+5|0;break c}break};case 22:case 24:{v=e+2|0;break};case 5:{if((f-n|0)<2){k=-2;break a}if((Oc[c[b+340>>2]&255](b,n)|0)==0){c[g>>2]=n;k=0;break a}else{v=e+3|0;break c}break};case 15:{k=rg(b,e+2|0,f,g)|0;break a;break};case 17:{q=e+2|0;if((q|0)==(f|0)){k=-1;break a}d:do{switch(d[l+(d[q]|0)|0]|0){case 29:{c[g>>2]=q;k=0;break a;break};case 22:case 24:{w=e+3|0;break};case 5:{if((f-q|0)<2){k=-2;break a}if((Oc[c[b+340>>2]&255](b,q)|0)==0){c[g>>2]=q;k=0;break a}else{w=e+4|0;break d}break};case 6:{if((f-q|0)<3){k=-2;break a}if((Oc[c[b+344>>2]&255](b,q)|0)==0){c[g>>2]=q;k=0;break a}else{w=e+5|0;break d}break};case 7:{if((f-q|0)<4){k=-2;break a}if((Oc[c[b+348>>2]&255](b,q)|0)==0){c[g>>2]=q;k=0;break a}else{w=e+6|0;break d}break};default:{c[g>>2]=q;k=0;break a}}}while(0);if((w|0)==(f|0)){k=-1;break a}q=f;o=b+328|0;p=b+332|0;x=b+336|0;y=w;e:while(1){switch(d[l+(d[y]|0)|0]|0){case 5:{if((q-y|0)<2){k=-2;break a}if((Oc[c[o>>2]&255](b,y)|0)==0){t=56;break e}z=y+2|0;break};case 6:{if((q-y|0)<3){k=-2;break a}if((Oc[c[p>>2]&255](b,y)|0)==0){t=60;break e}z=y+3|0;break};case 7:{if((q-y|0)<4){k=-2;break a}if((Oc[c[x>>2]&255](b,y)|0)==0){t=64;break e}z=y+4|0;break};case 21:case 9:case 10:{t=51;break e;break};case 29:{t=52;break e;break};case 22:case 24:case 25:case 26:case 27:{z=y+1|0;break};case 11:{t=71;break e;break};default:{t=72;break e}}if((z|0)==(f|0)){k=-1;break a}else{y=z}}if((t|0)==51){x=y+1|0;if((x|0)==(f|0)){k=-1;break a}else{A=y;B=x}while(1){x=d[l+(d[B]|0)|0]|0;if((x|0)==11){t=69;break}else if(!((x|0)==21|(x|0)==9|(x|0)==10)){t=70;break}x=B+1|0;if((x|0)==(f|0)){k=-1;break a}else{A=B;B=x}}if((t|0)==69){c[g>>2]=A+2;k=5;break a}else if((t|0)==70){c[g>>2]=B;k=0;break a}}else if((t|0)==52){c[g>>2]=y;k=0;break a}else if((t|0)==56){c[g>>2]=y;k=0;break a}else if((t|0)==60){c[g>>2]=y;k=0;break a}else if((t|0)==64){c[g>>2]=y;k=0;break a}else if((t|0)==71){c[g>>2]=y+1;k=5;break a}else if((t|0)==72){c[g>>2]=y;k=0;break a}break};case 29:{c[g>>2]=n;k=0;break a;break};case 6:{if((f-n|0)<3){k=-2;break a}if((Oc[c[b+344>>2]&255](b,n)|0)==0){c[g>>2]=n;k=0;break a}else{v=e+4|0;break c}break};default:{c[g>>2]=n;k=0;break a}}}while(0);if((v|0)==(f|0)){k=-1;break a}n=f;x=b+328|0;q=b+332|0;p=b+336|0;o=v;f:while(1){switch(d[l+(d[o]|0)|0]|0){case 21:case 9:case 10:{t=75;break f;break};case 22:case 24:case 25:case 26:case 27:{C=o+1|0;break};case 29:{t=76;break f;break};case 11:{D=o;t=186;break f;break};case 17:{E=o;break f;break};case 5:{if((n-o|0)<2){k=-2;break a}if((Oc[c[x>>2]&255](b,o)|0)==0){t=80;break f}C=o+2|0;break};case 7:{if((n-o|0)<4){k=-2;break a}if((Oc[c[p>>2]&255](b,o)|0)==0){t=88;break f}C=o+4|0;break};case 6:{if((n-o|0)<3){k=-2;break a}if((Oc[c[q>>2]&255](b,o)|0)==0){t=84;break f}C=o+3|0;break};default:{t=191;break f}}if((C|0)==(f|0)){k=-1;break a}else{o=C}}g:do{if((t|0)==75){F=o+1|0;if((F|0)==(f|0)){k=-1;break a}else{G=o;H=F}h:while(1){switch(d[l+(d[H]|0)|0]|0){case 22:case 24:{t=94;break h;break};case 5:{t=95;break h;break};case 7:{t=103;break h;break};case 11:{D=H;t=186;break g;break};case 17:{E=H;break g;break};case 6:{t=99;break h;break};case 21:case 9:case 10:{break};case 29:{t=93;break h;break};default:{t=107;break h}}F=H+1|0;if((F|0)==(f|0)){k=-1;break a}else{G=H;H=F}}do{if((t|0)==93){c[g>>2]=H;k=0;break a}else if((t|0)==94){I=G+2|0}else if((t|0)==95){if((n-H|0)<2){k=-2;break a}if((Oc[c[b+340>>2]&255](b,H)|0)==0){c[g>>2]=H;k=0;break a}else{I=G+3|0;break}}else if((t|0)==99){if((n-H|0)<3){k=-2;break a}if((Oc[c[b+344>>2]&255](b,H)|0)==0){c[g>>2]=H;k=0;break a}else{I=G+4|0;break}}else if((t|0)==103){if((n-H|0)<4){k=-2;break a}if((Oc[c[b+348>>2]&255](b,H)|0)==0){c[g>>2]=H;k=0;break a}else{I=G+5|0;break}}else if((t|0)==107){c[g>>2]=H;k=0;break a}}while(0);c[j>>2]=I;if((I|0)==(f|0)){k=-1;break a}y=b+352|0;F=b+356|0;J=b+360|0;K=b+340|0;L=b+344|0;M=b+348|0;N=I;i:while(1){j:do{switch(d[l+(d[N]|0)|0]|0){case 22:case 24:case 25:case 26:case 27:{O=N+1|0;c[j>>2]=O;P=O;break};case 7:{if((n-N|0)<4){k=-2;break a}O=(Oc[c[p>>2]&255](b,N)|0)==0;Q=c[j>>2]|0;if(O){t=124;break i}O=Q+4|0;c[j>>2]=O;P=O;break};case 21:case 9:case 10:{O=N+1|0;c[j>>2]=O;if((O|0)==(f|0)){k=-1;break a}else{R=O}while(1){O=a[l+(d[R]|0)|0]|0;if(O<<24>>24==14){S=R;t=130;break j}T=O&255;if(!((T|0)==21|(T|0)==10|(T|0)==9)){t=129;break i}T=R+1|0;c[j>>2]=T;if((T|0)==(f|0)){k=-1;break a}else{R=T}}break};case 29:{t=112;break i;break};case 14:{S=N;t=130;break};case 5:{if((n-N|0)<2){k=-2;break a}T=(Oc[c[x>>2]&255](b,N)|0)==0;U=c[j>>2]|0;if(T){t=116;break i}T=U+2|0;c[j>>2]=T;P=T;break};case 6:{if((n-N|0)<3){k=-2;break a}T=(Oc[c[q>>2]&255](b,N)|0)==0;V=c[j>>2]|0;if(T){t=120;break i}T=V+3|0;c[j>>2]=T;P=T;break};default:{t=185;break i}}}while(0);do{if((t|0)==130){t=0;T=S+1|0;c[j>>2]=T;if((T|0)==(f|0)){k=-1;break a}else{W=S;X=T}while(1){Y=a[l+(d[X]|0)|0]|0;if((Y&-2)<<24>>24==12){break}T=Y&255;if(!((T|0)==21|(T|0)==10|(T|0)==9)){t=134;break i}T=X+1|0;c[j>>2]=T;if((T|0)==(f|0)){k=-1;break a}else{W=X;X=T}}T=W+2|0;c[j>>2]=T;if((T|0)==(f|0)){k=-1;break a}else{Z=T}while(1){T=a[l+(d[Z]|0)|0]|0;if(T<<24>>24==Y<<24>>24){break}switch(T&255|0){case 3:{_=og(b,Z+1|0,f,j)|0;if((_|0)<1){t=154;break i}$=c[j>>2]|0;break};case 6:{if((n-Z|0)<3){k=-2;break a}T=(Oc[c[F>>2]&255](b,Z)|0)==0;aa=c[j>>2]|0;if(!T){t=144;break i}T=aa+3|0;c[j>>2]=T;$=T;break};case 2:{t=156;break i;break};case 7:{if((n-Z|0)<4){k=-2;break a}T=(Oc[c[J>>2]&255](b,Z)|0)==0;ba=c[j>>2]|0;if(!T){t=148;break i}T=ba+4|0;c[j>>2]=T;$=T;break};case 0:case 1:case 8:{t=150;break i;break};case 5:{if((n-Z|0)<2){k=-2;break a}T=(Oc[c[y>>2]&255](b,Z)|0)==0;ca=c[j>>2]|0;if(!T){t=140;break i}T=ca+2|0;c[j>>2]=T;$=T;break};default:{T=Z+1|0;c[j>>2]=T;$=T}}if(($|0)==(f|0)){k=-1;break a}else{Z=$}}da=Z+1|0;c[j>>2]=da;if((da|0)==(f|0)){k=-1;break a}switch(d[l+(d[da]|0)|0]|0){case 21:case 9:case 10:{break};case 11:{ea=da;t=179;break i;break};case 17:{fa=da;t=180;break i;break};default:{t=161;break i}}T=Z+2|0;c[j>>2]=T;if((T|0)==(f|0)){k=-1;break a}else{ga=T}k:while(1){switch(d[l+(d[ga]|0)|0]|0){case 11:{ea=ga;t=179;break i;break};case 17:{fa=ga;t=180;break i;break};case 7:{t=174;break k;break};case 21:case 9:case 10:{break};case 6:{t=170;break k;break};case 29:{t=164;break i;break};case 22:case 24:{t=165;break k;break};case 5:{t=166;break k;break};default:{t=184;break i}}T=ga+1|0;c[j>>2]=T;if((T|0)==(f|0)){k=-1;break a}else{ga=T}}if((t|0)==165){t=0;T=ga+1|0;c[j>>2]=T;P=T;break}else if((t|0)==166){t=0;if((n-ga|0)<2){k=-2;break a}T=(Oc[c[K>>2]&255](b,ga)|0)==0;ha=c[j>>2]|0;if(T){t=168;break i}T=ha+2|0;c[j>>2]=T;P=T;break}else if((t|0)==170){t=0;if((n-ga|0)<3){k=-2;break a}T=(Oc[c[L>>2]&255](b,ga)|0)==0;ia=c[j>>2]|0;if(T){t=172;break i}T=ia+3|0;c[j>>2]=T;P=T;break}else if((t|0)==174){t=0;if((n-ga|0)<4){k=-2;break a}T=(Oc[c[M>>2]&255](b,ga)|0)==0;ja=c[j>>2]|0;if(T){t=176;break i}T=ja+4|0;c[j>>2]=T;P=T;break}}}while(0);if((P|0)==(f|0)){k=-1;break a}else{N=P}}if((t|0)==112){c[g>>2]=N;k=0;break a}else if((t|0)==116){c[g>>2]=U;k=0;break a}else if((t|0)==120){c[g>>2]=V;k=0;break a}else if((t|0)==124){c[g>>2]=Q;k=0;break a}else if((t|0)==129){c[g>>2]=R;k=0;break a}else if((t|0)==134){c[g>>2]=X;k=0;break a}else if((t|0)==140){c[g>>2]=ca;k=0;break a}else if((t|0)==144){c[g>>2]=aa;k=0;break a}else if((t|0)==148){c[g>>2]=ba;k=0;break a}else if((t|0)==150){c[g>>2]=Z;k=0;break a}else if((t|0)==154){if((_|0)!=0){k=_;break a}c[g>>2]=c[j>>2];k=0;break a}else if((t|0)==156){c[g>>2]=Z;k=0;break a}else if((t|0)==161){c[g>>2]=da;k=0;break a}else if((t|0)==164){c[g>>2]=ga;k=0;break a}else if((t|0)==168){c[g>>2]=ha;k=0;break a}else if((t|0)==172){c[g>>2]=ia;k=0;break a}else if((t|0)==176){c[g>>2]=ja;k=0;break a}else if((t|0)==179){c[g>>2]=ea+1;k=1;break a}else if((t|0)==180){M=fa+1|0;c[j>>2]=M;if((M|0)==(f|0)){k=-1;break a}if((a[M]|0)==62){c[g>>2]=fa+2;k=3;break a}else{c[g>>2]=M;k=0;break a}}else if((t|0)==184){c[g>>2]=ga;k=0;break a}else if((t|0)==185){c[g>>2]=N;k=0;break a}}else if((t|0)==76){c[g>>2]=o;k=0;break a}else if((t|0)==80){c[g>>2]=o;k=0;break a}else if((t|0)==84){c[g>>2]=o;k=0;break a}else if((t|0)==88){c[g>>2]=o;k=0;break a}else if((t|0)==191){c[g>>2]=o;k=0;break a}}while(0);if((t|0)==186){c[g>>2]=D+1;k=2;break a}o=E+1|0;if((o|0)==(f|0)){k=-1;break a}if((a[o]|0)==62){c[g>>2]=E+2;k=4;break a}else{c[g>>2]=o;k=0;break a}break};case 3:{k=og(b,e+1|0,f,g)|0;break a;break};case 9:{o=e+1|0;if((o|0)==(f|0)){k=-3;break a}c[g>>2]=(a[l+(d[o]|0)|0]|0)==10?e+2|0:o;k=7;break a;break};case 10:{c[g>>2]=e+1;k=7;break a;break};case 4:{o=e+1|0;if((o|0)==(f|0)){k=-5;break a}if((a[o]|0)!=93){m=o;break b}n=e+2|0;if((n|0)==(f|0)){k=-5;break a}if((a[n]|0)!=62){m=o;break b}c[g>>2]=n;k=0;break a;break};default:{m=e+1|0}}}while(0);l:do{if((m|0)!=(f|0)){n=f;o=b+352|0;q=b+356|0;x=b+360|0;p=m;m:while(1){n:do{switch(d[l+(d[p]|0)|0]|0){case 5:{if((n-p|0)<2){t=220;break m}if((Oc[c[o>>2]&255](b,p)|0)!=0){t=220;break m}ka=p+2|0;break};case 3:case 2:case 0:case 1:case 8:case 9:case 10:{t=235;break m;break};case 6:{if((n-p|0)<3){t=224;break m}if((Oc[c[q>>2]&255](b,p)|0)!=0){t=224;break m}ka=p+3|0;break};case 7:{if((n-p|0)<4){t=228;break m}if((Oc[c[x>>2]&255](b,p)|0)!=0){t=228;break m}ka=p+4|0;break};case 4:{M=p+1|0;if((M|0)==(f|0)){t=235;break m}if((a[M]|0)!=93){ka=M;break n}la=p+2|0;if((la|0)==(f|0)){t=235;break m}if((a[la]|0)==62){t=234;break m}else{ka=M}break};default:{ka=p+1|0}}}while(0);if((ka|0)==(f|0)){break l}else{p=ka}}if((t|0)==220){c[g>>2]=p;k=6;break a}else if((t|0)==224){c[g>>2]=p;k=6;break a}else if((t|0)==228){c[g>>2]=p;k=6;break a}else if((t|0)==234){c[g>>2]=la;k=0;break a}else if((t|0)==235){c[g>>2]=p;k=6;break a}}}while(0);c[g>>2]=f;k=6}}while(0);i=h;return k|0}function Uf(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;if((e|0)==(f|0)){h=-4;return h|0}i=b+72|0;a:do{switch(d[i+(d[e]|0)|0]|0){case 9:{j=e+1|0;if((j|0)==(f|0)){h=-1;return h|0}c[g>>2]=(a[i+(d[j]|0)|0]|0)==10?e+2|0:j;h=7;return h|0};case 5:{if((f-e|0)<2){h=-2;return h|0}if((Oc[c[b+352>>2]&255](b,e)|0)==0){k=e+2|0;break a}c[g>>2]=e;h=0;return h|0};case 4:{j=e+1|0;if((j|0)==(f|0)){h=-1;return h|0}if((a[j]|0)!=93){k=j;break a}l=e+2|0;if((l|0)==(f|0)){h=-1;return h|0}if((a[l]|0)!=62){k=j;break a}c[g>>2]=e+3;h=40;return h|0};case 7:{if((f-e|0)<4){h=-2;return h|0}if((Oc[c[b+360>>2]&255](b,e)|0)==0){k=e+4|0;break a}c[g>>2]=e;h=0;return h|0};case 0:case 1:case 8:{c[g>>2]=e;h=0;return h|0};case 6:{if((f-e|0)<3){h=-2;return h|0}if((Oc[c[b+356>>2]&255](b,e)|0)==0){k=e+3|0;break a}c[g>>2]=e;h=0;return h|0};case 10:{c[g>>2]=e+1;h=7;return h|0};default:{k=e+1|0}}}while(0);b:do{if((k|0)!=(f|0)){e=f;j=b+352|0;l=b+356|0;m=b+360|0;n=k;c:while(1){switch(d[i+(d[n]|0)|0]|0){case 5:{if((e-n|0)<2){o=30;break c}if((Oc[c[j>>2]&255](b,n)|0)!=0){o=30;break c}p=n+2|0;break};case 6:{if((e-n|0)<3){o=34;break c}if((Oc[c[l>>2]&255](b,n)|0)!=0){o=34;break c}p=n+3|0;break};case 7:{if((e-n|0)<4){o=38;break c}if((Oc[c[m>>2]&255](b,n)|0)!=0){o=38;break c}p=n+4|0;break};case 0:case 1:case 8:case 9:case 10:case 4:{o=40;break c;break};default:{p=n+1|0}}if((p|0)==(f|0)){break b}else{n=p}}if((o|0)==30){c[g>>2]=n;h=6;return h|0}else if((o|0)==34){c[g>>2]=n;h=6;return h|0}else if((o|0)==38){c[g>>2]=n;h=6;return h|0}else if((o|0)==40){c[g>>2]=n;h=6;return h|0}}}while(0);c[g>>2]=f;h=6;return h|0}function Vf(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0;do{if((e|0)==(f|0)){h=-4}else{i=b+72|0;j=e;a:while(1){switch(d[i+(d[j]|0)|0]|0){case 3:{k=7;break a;break};case 7:{l=j+4|0;break};case 9:{k=14;break a;break};case 2:{k=10;break a;break};case 10:{k=11;break a;break};case 6:{l=j+3|0;break};case 5:{l=j+2|0;break};case 21:{k=18;break a;break};default:{l=j+1|0}}if((l|0)==(f|0)){k=23;break}else{j=l}}if((k|0)==7){if((j|0)==(e|0)){h=og(b,e+1|0,f,g)|0;break}else{c[g>>2]=j;h=6;break}}else if((k|0)==10){c[g>>2]=j;h=0;break}else if((k|0)==11){if((j|0)==(e|0)){c[g>>2]=e+1;h=7;break}else{c[g>>2]=j;h=6;break}}else if((k|0)==14){if((j|0)!=(e|0)){c[g>>2]=j;h=6;break}m=e+1|0;if((m|0)==(f|0)){h=-3;break}c[g>>2]=(a[i+(d[m]|0)|0]|0)==10?e+2|0:m;h=7;break}else if((k|0)==18){if((j|0)==(e|0)){c[g>>2]=e+1;h=39;break}else{c[g>>2]=j;h=6;break}}else if((k|0)==23){c[g>>2]=f;h=6;break}}}while(0);return h|0}function Wf(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0;if((e|0)==(f|0)){h=-4;return h|0}i=b+72|0;j=e;a:while(1){switch(d[i+(d[j]|0)|0]|0){case 6:{k=j+3|0;break};case 30:{l=10;break a;break};case 7:{k=j+4|0;break};case 3:{l=7;break a;break};case 9:{l=16;break a;break};case 10:{l=13;break a;break};case 5:{k=j+2|0;break};default:{k=j+1|0}}if((k|0)==(f|0)){l=22;break}else{j=k}}if((l|0)==7){if((j|0)==(e|0)){h=og(b,e+1|0,f,g)|0;return h|0}else{c[g>>2]=j;h=6;return h|0}}else if((l|0)==10){if((j|0)==(e|0)){k=pg(b,e+1|0,f,g)|0;h=(k|0)==22?0:k;return h|0}else{c[g>>2]=j;h=6;return h|0}}else if((l|0)==13){if((j|0)==(e|0)){c[g>>2]=e+1;h=7;return h|0}else{c[g>>2]=j;h=6;return h|0}}else if((l|0)==16){if((j|0)!=(e|0)){c[g>>2]=j;h=6;return h|0}j=e+1|0;if((j|0)==(f|0)){h=-3;return h|0}c[g>>2]=(a[i+(d[j]|0)|0]|0)==10?e+2|0:j;h=7;return h|0}else if((l|0)==22){c[g>>2]=f;h=6;return h|0}return 0}function Xf(b,c,e){b=b|0;c=c|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;f=b+72|0;b=e;e=c;a:while(1){g=a[e]|0;switch(d[f+(g&255)|0]|0){case 5:{h=b;i=e;j=g;break};case 6:{k=b;l=e;m=g;n=5;break};case 29:case 22:case 24:case 25:case 26:case 27:{if((a[b]|0)==g<<24>>24){b=b+1|0;e=e+1|0;continue a}else{o=0;n=13;break a}break};case 7:{n=3;break};default:{n=10;break a}}if((n|0)==3){n=0;c=e+1|0;if(g<<24>>24!=(a[b]|0)){o=0;n=13;break}k=b+1|0;l=c;m=a[c]|0;n=5}if((n|0)==5){n=0;c=l+1|0;if(m<<24>>24!=(a[k]|0)){o=0;n=13;break}h=k+1|0;i=c;j=a[c]|0}if(j<<24>>24!=(a[h]|0)){o=0;n=13;break}if((a[i+1|0]|0)==(a[h+1|0]|0)){b=h+2|0;e=i+2|0}else{o=0;n=13;break}}if((n|0)==10){i=a[b]|0;if(g<<24>>24==i<<24>>24){o=1;return o|0}switch(d[f+(i&255)|0]|0){case 5:case 6:case 7:case 29:case 22:case 24:case 25:case 26:case 27:{o=0;return o|0};default:{}}o=1;return o|0}else if((n|0)==13){return o|0}return 0}function Yf(b,c,d,e){b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;b=a[e]|0;f=(c|0)==(d|0);a:do{if(b<<24>>24==0){g=f}else{h=c;i=e;j=b;k=f;while(1){if(k){l=0;m=6;break}if((a[h]|0)!=j<<24>>24){l=0;m=6;break}n=h+1|0;o=i+1|0;p=a[o]|0;q=(n|0)==(d|0);if(p<<24>>24==0){g=q;break a}else{h=n;i=o;j=p;k=q}}if((m|0)==6){return l|0}}}while(0);l=g&1;return l|0}function Zf(a,b){a=a|0;b=b|0;var c=0;c=a+72|0;a=b;a:while(1){switch(d[c+(d[a]|0)|0]|0|0){case 29:case 22:case 24:case 25:case 26:case 27:{a=a+1|0;continue a;break};case 6:{a=a+3|0;continue a;break};case 7:{a=a+4|0;continue a;break};case 5:{a=a+2|0;continue a;break};default:{break a}}}return a-b|0}function _f(a,b){a=a|0;b=b|0;var c=0;c=a+72|0;a=b;while(1){b=d[c+(d[a]|0)|0]|0;if(!((b|0)==10|(b|0)==9|(b|0)==21)){break}a=a+1|0}return a|0}function $f(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;h=b+72|0;b=0;i=0;j=1;k=e;a:while(1){e=k+1|0;l=a[e]|0;switch(d[h+(l&255)|0]|0){case 13:{if((j|0)!=2){if((i|0)>=(f|0)){b=13;i=i;j=2;k=e;continue a}c[g+(i<<4)+4>>2]=k+2;b=13;i=i;j=2;k=e;continue a}if((b|0)!=13){b=b;i=i;j=2;k=e;continue a}if((i|0)<(f|0)){c[g+(i<<4)+8>>2]=e}b=13;i=i+1|0;j=0;k=e;continue a;break};case 9:case 10:{if((j|0)==1){b=b;i=i;j=0;k=e;continue a}if(!((j|0)==2&(i|0)<(f|0))){b=b;i=i;j=j;k=e;continue a}a[g+(i<<4)+12|0]=0;b=b;i=i;j=2;k=e;continue a;break};case 3:{if((i|0)>=(f|0)){b=b;i=i;j=j;k=e;continue a}a[g+(i<<4)+12|0]=0;b=b;i=i;j=j;k=e;continue a;break};case 6:{do{if((j|0)==0){if((i|0)>=(f|0)){m=1;break}c[g+(i<<4)>>2]=e;a[g+(i<<4)+12|0]=1;m=1}else{m=j}}while(0);b=b;i=i;j=m;k=k+3|0;continue a;break};case 12:{if((j|0)!=2){if((i|0)>=(f|0)){b=12;i=i;j=2;k=e;continue a}c[g+(i<<4)+4>>2]=k+2;b=12;i=i;j=2;k=e;continue a}if((b|0)!=12){b=b;i=i;j=2;k=e;continue a}if((i|0)<(f|0)){c[g+(i<<4)+8>>2]=e}b=12;i=i+1|0;j=0;k=e;continue a;break};case 29:case 22:case 24:{if((j|0)!=0){b=b;i=i;j=j;k=e;continue a}if((i|0)>=(f|0)){b=b;i=i;j=1;k=e;continue a}c[g+(i<<4)>>2]=e;a[g+(i<<4)+12|0]=1;b=b;i=i;j=1;k=e;continue a;break};case 11:case 17:{if((j|0)==2){b=b;i=i;j=2;k=e;continue a}else{break a}break};case 5:{do{if((j|0)==0){if((i|0)>=(f|0)){n=1;break}c[g+(i<<4)>>2]=e;a[g+(i<<4)+12|0]=1;n=1}else{n=j}}while(0);b=b;i=i;j=n;k=k+2|0;continue a;break};case 21:{if((j|0)==1){b=b;i=i;j=0;k=e;continue a}if(!((j|0)==2&(i|0)<(f|0))){b=b;i=i;j=j;k=e;continue a}o=g+(i<<4)+12|0;if((a[o]|0)==0){b=b;i=i;j=2;k=e;continue a}do{if((e|0)!=(c[g+(i<<4)+4>>2]|0)&l<<24>>24==32){p=a[k+2|0]|0;if(p<<24>>24==32){break}if((d[h+(p&255)|0]|0)!=(b|0)){b=b;i=i;j=2;k=e;continue a}}}while(0);a[o]=0;b=b;i=i;j=2;k=e;continue a;break};case 7:{do{if((j|0)==0){if((i|0)>=(f|0)){q=1;break}c[g+(i<<4)>>2]=e;a[g+(i<<4)+12|0]=1;q=1}else{q=j}}while(0);b=b;i=i;j=q;k=k+4|0;continue a;break};default:{b=b;i=i;j=j;k=e;continue a}}}return i|0}function ag(b,c){b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;b=c+2|0;d=a[b]|0;a:do{if((d<<24>>24|0)==59){e=0;f=12}else if((d<<24>>24|0)==120){g=c+3|0;h=a[g]|0;if(h<<24>>24==59){e=0;f=12;break}else{i=0;j=g;k=h}while(1){h=k<<24>>24;switch(h|0){case 97:case 98:case 99:case 100:case 101:case 102:{l=(i<<4)-87+h|0;break};case 65:case 66:case 67:case 68:case 69:case 70:{l=(i<<4)-55+h|0;break};case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:{l=h-48|i<<4;break};default:{l=i}}h=j+1|0;if((l|0)>1114111){m=-1;break}g=a[h]|0;if(g<<24>>24==59){n=l;f=11;break a}else{i=l;j=h;k=g}}return m|0}else{g=0;h=b;o=d;while(1){p=(g*10|0)-48+(o<<24>>24)|0;q=h+1|0;if((p|0)>1114111){m=-1;break}r=a[q]|0;if(r<<24>>24==59){n=p;f=11;break a}else{g=p;h=q;o=r}}return m|0}}while(0);b:do{if((f|0)==11){switch(n>>8|0){case 0:{e=n;f=12;break b;break};case 216:case 217:case 218:case 219:case 220:case 221:case 222:case 223:{m=-1;return m|0};case 255:{break};default:{s=n;break b}}if((n&-2|0)==65534){m=-1}else{s=n;break}return m|0}}while(0);do{if((f|0)==12){if((a[20496+e|0]|0)==0){m=-1}else{s=e;break}return m|0}}while(0);m=s;return m|0}function bg(b,c,d){b=b|0;c=c|0;d=d|0;var e=0;b=d-c|0;do{if((b|0)==4){d=a[c]|0;if((d|0)==97){if((a[c+1|0]|0)!=112){break}if((a[c+2|0]|0)!=111){break}if((a[c+3|0]|0)==115){e=39}else{break}return e|0}else if((d|0)==113){if((a[c+1|0]|0)!=117){break}if((a[c+2|0]|0)!=111){break}if((a[c+3|0]|0)==116){e=34}else{break}return e|0}else{break}}else if((b|0)==2){if((a[c+1|0]|0)!=116){break}d=a[c]|0;if((d|0)==108){e=60;return e|0}else if((d|0)!=103){break}e=62;return e|0}else if((b|0)==3){if((a[c]|0)!=97){break}if((a[c+1|0]|0)!=109){break}if((a[c+2|0]|0)==112){e=38}else{break}return e|0}}while(0);e=0;return e|0}function cg(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0;if(e>>>0>=f>>>0){return}h=b+72|0;b=g+4|0;i=g|0;g=e;while(1){switch(d[h+(d[g]|0)|0]|0){case 6:{j=g+3|0;break};case 9:{c[i>>2]=(c[i>>2]|0)+1;e=g+1|0;if((e|0)==(f|0)){k=f}else{k=(a[h+(d[e]|0)|0]|0)==10?g+2|0:e}c[b>>2]=-1;j=k;break};case 5:{j=g+2|0;break};case 7:{j=g+4|0;break};case 10:{c[b>>2]=-1;c[i>>2]=(c[i>>2]|0)+1;j=g+1|0;break};default:{j=g+1|0}}c[b>>2]=(c[b>>2]|0)+1;if(j>>>0<f>>>0){g=j}else{break}}return}function dg(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0;h=f-1|0;f=e+1|0;if((f|0)==(h|0)){i=1;return i|0}e=b+72|0;b=f;a:while(1){f=a[b]|0;switch(d[e+(f&255)|0]|0|0){case 21:{if(f<<24>>24==9){j=6;break a}break};case 25:case 24:case 27:case 13:case 31:case 32:case 34:case 35:case 17:case 14:case 15:case 9:case 10:case 18:case 16:case 33:case 30:case 19:{break};case 26:case 22:{if(f<<24>>24<0){j=8}break};default:{j=8}}if((j|0)==8){j=0;k=f<<24>>24;if(!((k|0)==36|(k|0)==64)){j=9;break}}k=b+1|0;if((k|0)==(h|0)){i=1;j=10;break}else{b=k}}if((j|0)==6){c[g>>2]=b;i=0;return i|0}else if((j|0)==9){c[g>>2]=b;i=0;return i|0}else if((j|0)==10){return i|0}return 0}function eg(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;b=c[d>>2]|0;h=c[f>>2]|0;i=g-h|0;a:do{if((e-b|0)>(i|0)){g=b+i|0;while(1){if(g>>>0<=b>>>0){j=g;break a}k=g-1|0;if((a[k]&-64)<<24>>24==-128){g=k}else{j=g;break}}}else{j=e}}while(0);if((b|0)==(j|0)){l=h;m=b;c[d>>2]=m;c[f>>2]=l;return}else{n=h;o=b}while(1){a[n]=a[o]|0;b=o+1|0;h=n+1|0;if((b|0)==(j|0)){l=h;m=j;break}else{n=h;o=b}}c[d>>2]=m;c[f>>2]=l;return}function fg(e,f,g,h,i){e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;j=c[h>>2]|0;k=c[f>>2]|0;if((k|0)==(g|0)|(j|0)==(i|0)){l=k;m=j;c[f>>2]=l;c[h>>2]=m;return}n=e+72|0;e=k;k=j;while(1){j=a[e]|0;o=j&255;p=d[n+o|0]|0;if((p|0)==7){q=k+2|0;if((q|0)==(i|0)){l=e;m=k;r=10;break}s=((d[e+1|0]|0)<<12&258048|o<<18&1835008|(d[e+2|0]|0)<<6&4032|a[e+3|0]&63)-65536|0;b[k>>1]=s>>>10|55296;b[q>>1]=s&1023|56320;t=k+4|0;u=e+4|0}else if((p|0)==6){b[k>>1]=(d[e+1|0]|0)<<6&4032|(j&255)<<12|a[e+2|0]&63;t=k+2|0;u=e+3|0}else if((p|0)==5){b[k>>1]=a[e+1|0]&63|(j&255)<<6&1984;t=k+2|0;u=e+2|0}else{b[k>>1]=j<<24>>24;t=k+2|0;u=e+1|0}if((u|0)==(g|0)|(t|0)==(i|0)){l=u;m=t;r=10;break}else{e=u;k=t}}if((r|0)==10){c[f>>2]=l;c[h>>2]=m;return}}function gg(a,b){a=a|0;b=b|0;var e=0;a=d[b]|0;e=d[b+1|0]|0;return 1<<(e&31)&c[18232+(((d[19512+(a>>>2&7)|0]|0)<<3|a<<1&6|e>>>5&1)<<2)>>2]|0}function hg(a,b){a=a|0;b=b|0;var e=0;a=d[b+1|0]|0;e=d[b+2|0]|0;return 1<<(e&31)&c[18232+(((d[19512+(a>>>2&15|(d[b]|0)<<4&240)|0]|0)<<3|a<<1&6|e>>>5&1)<<2)>>2]|0}function ig(a,b){a=a|0;b=b|0;return 0}function jg(a,b){a=a|0;b=b|0;var e=0;a=d[b]|0;e=d[b+1|0]|0;return 1<<(e&31)&c[18232+(((d[17968+(a>>>2&7)|0]|0)<<3|a<<1&6|e>>>5&1)<<2)>>2]|0}function kg(a,b){a=a|0;b=b|0;var e=0;a=d[b+1|0]|0;e=d[b+2|0]|0;return 1<<(e&31)&c[18232+(((d[17968+(a>>>2&15|(d[b]|0)<<4&240)|0]|0)<<3|a<<1&6|e>>>5&1)<<2)>>2]|0}function lg(a,b){a=a|0;b=b|0;var c=0;if((d[b]|0)>>>0<194>>>0){c=1;return c|0}a=d[b+1|0]|0;if((a&128|0)==0){c=1;return c|0}c=(a&192|0)==192|0;return c|0}function mg(b,c){b=b|0;c=c|0;var d=0,e=0,f=0,g=0,h=0,i=0;b=a[c+2|0]|0;a:do{if(b<<24>>24>-1){d=1}else{e=a[c]|0;do{if(e<<24>>24==-17){if((a[c+1|0]|0)!=-65){f=5;break}if((b&255)>>>0>189>>>0){d=1;break a}else{g=191}}else{f=5}}while(0);do{if((f|0)==5){if((b&-64)<<24>>24==-64){d=1;break a}h=a[c+1|0]|0;i=h&255;if(e<<24>>24==-32){if((h&255)>>>0<160>>>0){d=1;break a}d=(i&192|0)==192;break a}if((i&128|0)==0){d=1;break a}if(e<<24>>24!=-19){g=i;break}d=(h&255)>>>0>159>>>0;break a}}while(0);d=(g&192|0)==192}}while(0);return d&1|0}function ng(b,c){b=b|0;c=c|0;var e=0,f=0,g=0,h=0;b=d[c+3|0]|0;do{if((b&128|0)==0|(b&192|0)==192){e=1}else{f=d[c+2|0]|0;if((f&128|0)==0|(f&192|0)==192){e=1;break}f=a[c]|0;g=a[c+1|0]|0;h=g&255;if(f<<24>>24==-16){if((g&255)>>>0<144>>>0){e=1;break}e=(h&192|0)==192;break}if((h&128|0)==0){e=1;break}if(f<<24>>24==-12){e=(g&255)>>>0>143>>>0;break}else{e=(h&192|0)==192;break}}}while(0);return e&1|0}function og(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;if((e|0)==(f|0)){h=-1;return h|0}i=b+72|0;a:do{switch(d[i+(d[e]|0)|0]|0){case 22:case 24:{j=e+1|0;break};case 29:{c[g>>2]=e;h=0;return h|0};case 19:{k=e+1|0;if((k|0)==(f|0)){h=-1;return h|0}l=a[k]|0;if(l<<24>>24!=120){if((a[i+(l&255)|0]|0)==25){m=k}else{c[g>>2]=k;h=0;return h|0}while(1){n=m+1|0;if((n|0)==(f|0)){h=-1;o=54;break}k=d[i+(d[n]|0)|0]|0;if((k|0)==18){o=33;break}else if((k|0)==25){m=n}else{o=34;break}}if((o|0)==33){c[g>>2]=m+2;h=10;return h|0}else if((o|0)==34){c[g>>2]=n;h=0;return h|0}else if((o|0)==54){return h|0}}k=e+2|0;if((k|0)==(f|0)){h=-1;return h|0}if(((d[i+(d[k]|0)|0]|0)-24|0)>>>0>=2>>>0){c[g>>2]=k;h=0;return h|0}l=e+3|0;if((l|0)==(f|0)){h=-1;return h|0}else{p=k;q=l}while(1){l=d[i+(d[q]|0)|0]|0;if((l|0)==18){o=27;break}else if(!((l|0)==25|(l|0)==24)){o=28;break}l=q+1|0;if((l|0)==(f|0)){h=-1;o=54;break}else{p=q;q=l}}if((o|0)==27){c[g>>2]=p+2;h=10;return h|0}else if((o|0)==28){c[g>>2]=q;h=0;return h|0}else if((o|0)==54){return h|0}break};case 5:{if((f-e|0)<2){h=-2;return h|0}if((Oc[c[b+340>>2]&255](b,e)|0)!=0){j=e+2|0;break a}c[g>>2]=e;h=0;return h|0};case 7:{if((f-e|0)<4){h=-2;return h|0}if((Oc[c[b+348>>2]&255](b,e)|0)!=0){j=e+4|0;break a}c[g>>2]=e;h=0;return h|0};case 6:{if((f-e|0)<3){h=-2;return h|0}if((Oc[c[b+344>>2]&255](b,e)|0)!=0){j=e+3|0;break a}c[g>>2]=e;h=0;return h|0};default:{c[g>>2]=e;h=0;return h|0}}}while(0);if((j|0)==(f|0)){h=-1;return h|0}e=f;q=b+328|0;p=b+332|0;n=b+336|0;m=j;b:while(1){switch(d[i+(d[m]|0)|0]|0){case 5:{if((e-m|0)<2){h=-2;o=54;break b}if((Oc[c[q>>2]&255](b,m)|0)==0){o=41;break b}r=m+2|0;break};case 22:case 24:case 25:case 26:case 27:{r=m+1|0;break};case 7:{if((e-m|0)<4){h=-2;o=54;break b}if((Oc[c[n>>2]&255](b,m)|0)==0){o=49;break b}r=m+4|0;break};case 6:{if((e-m|0)<3){h=-2;o=54;break b}if((Oc[c[p>>2]&255](b,m)|0)==0){o=45;break b}r=m+3|0;break};case 29:{o=37;break b;break};case 18:{o=52;break b;break};default:{o=53;break b}}if((r|0)==(f|0)){h=-1;o=54;break}else{m=r}}if((o|0)==37){c[g>>2]=m;h=0;return h|0}else if((o|0)==41){c[g>>2]=m;h=0;return h|0}else if((o|0)==45){c[g>>2]=m;h=0;return h|0}else if((o|0)==49){c[g>>2]=m;h=0;return h|0}else if((o|0)==52){c[g>>2]=m+1;h=9;return h|0}else if((o|0)==53){c[g>>2]=m;h=0;return h|0}else if((o|0)==54){return h|0}return 0}function pg(a,b,e,f){a=a|0;b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;if((b|0)==(e|0)){g=-1;return g|0}h=a+72|0;a:do{switch(d[h+(d[b]|0)|0]|0|0){case 29:{c[f>>2]=b;g=0;return g|0};case 5:{if((e-b|0)<2){g=-2;return g|0}if((Oc[c[a+340>>2]&255](a,b)|0)!=0){i=b+2|0;break a}c[f>>2]=b;g=0;return g|0};case 6:{if((e-b|0)<3){g=-2;return g|0}if((Oc[c[a+344>>2]&255](a,b)|0)!=0){i=b+3|0;break a}c[f>>2]=b;g=0;return g|0};case 22:case 24:{i=b+1|0;break};case 7:{if((e-b|0)<4){g=-2;return g|0}if((Oc[c[a+348>>2]&255](a,b)|0)!=0){i=b+4|0;break a}c[f>>2]=b;g=0;return g|0};case 21:case 10:case 9:case 30:{c[f>>2]=b;g=22;return g|0};default:{c[f>>2]=b;g=0;return g|0}}}while(0);if((i|0)==(e|0)){g=-1;return g|0}b=e;j=a+328|0;k=a+332|0;l=a+336|0;m=i;b:while(1){switch(d[h+(d[m]|0)|0]|0|0){case 22:case 24:case 25:case 26:case 27:{n=m+1|0;break};case 7:{if((b-m|0)<4){g=-2;o=39;break b}if((Oc[c[l>>2]&255](a,m)|0)==0){o=34;break b}n=m+4|0;break};case 6:{if((b-m|0)<3){g=-2;o=39;break b}if((Oc[c[k>>2]&255](a,m)|0)==0){o=30;break b}n=m+3|0;break};case 29:{o=22;break b;break};case 18:{o=37;break b;break};case 5:{if((b-m|0)<2){g=-2;o=39;break b}if((Oc[c[j>>2]&255](a,m)|0)==0){o=26;break b}n=m+2|0;break};default:{o=38;break b}}if((n|0)==(e|0)){g=-1;o=39;break}else{m=n}}if((o|0)==22){c[f>>2]=m;g=0;return g|0}else if((o|0)==26){c[f>>2]=m;g=0;return g|0}else if((o|0)==30){c[f>>2]=m;g=0;return g|0}else if((o|0)==34){c[f>>2]=m;g=0;return g|0}else if((o|0)==37){c[f>>2]=m+1;g=28;return g|0}else if((o|0)==38){c[f>>2]=m;g=0;return g|0}else if((o|0)==39){return g|0}return 0}function qg(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;if((e|0)==(f|0)){h=-1;return h|0}if((a[e]|0)!=45){c[g>>2]=e;h=0;return h|0}i=e+1|0;if((i|0)==(f|0)){h=-1;return h|0}e=b+72|0;j=f;k=b+352|0;l=b+356|0;m=b+360|0;n=i;a:while(1){switch(d[e+(d[n]|0)|0]|0){case 0:case 1:case 8:{o=19;break a;break};case 27:{i=n+1|0;if((i|0)==(f|0)){h=-1;o=28;break a}if((a[i]|0)==45){o=23;break a}else{p=i}break};case 6:{if((j-n|0)<3){h=-2;o=28;break a}if((Oc[c[l>>2]&255](b,n)|0)!=0){o=13;break a}p=n+3|0;break};case 7:{if((j-n|0)<4){h=-2;o=28;break a}if((Oc[c[m>>2]&255](b,n)|0)!=0){o=17;break a}p=n+4|0;break};case 5:{if((j-n|0)<2){h=-2;o=28;break a}if((Oc[c[k>>2]&255](b,n)|0)!=0){o=9;break a}p=n+2|0;break};default:{p=n+1|0}}if((p|0)==(f|0)){h=-1;o=28;break}else{n=p}}if((o|0)==9){c[g>>2]=n;h=0;return h|0}else if((o|0)==13){c[g>>2]=n;h=0;return h|0}else if((o|0)==17){c[g>>2]=n;h=0;return h|0}else if((o|0)==19){c[g>>2]=n;h=0;return h|0}else if((o|0)==23){p=n+2|0;if((p|0)==(f|0)){h=-1;return h|0}if((a[p]|0)==62){c[g>>2]=n+3;h=13;return h|0}else{c[g>>2]=p;h=0;return h|0}}else if((o|0)==28){return h|0}return 0}function rg(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;if((e|0)==(f|0)){h=-1;return h|0}i=b+72|0;a:do{switch(d[i+(d[e]|0)|0]|0){case 6:{if((f-e|0)<3){h=-2;return h|0}if((Oc[c[b+344>>2]&255](b,e)|0)!=0){j=e+3|0;break a}c[g>>2]=e;h=0;return h|0};case 7:{if((f-e|0)<4){h=-2;return h|0}if((Oc[c[b+348>>2]&255](b,e)|0)!=0){j=e+4|0;break a}c[g>>2]=e;h=0;return h|0};case 29:{c[g>>2]=e;h=0;return h|0};case 22:case 24:{j=e+1|0;break};case 5:{if((f-e|0)<2){h=-2;return h|0}if((Oc[c[b+340>>2]&255](b,e)|0)!=0){j=e+2|0;break a}c[g>>2]=e;h=0;return h|0};default:{c[g>>2]=e;h=0;return h|0}}}while(0);if((j|0)==(f|0)){h=-1;return h|0}k=f;l=b+328|0;m=b+332|0;n=b+336|0;o=j;b:while(1){switch(d[i+(d[o]|0)|0]|0){case 29:{p=21;break b;break};case 15:{p=65;break b;break};case 21:case 9:case 10:{p=36;break b;break};case 7:{if((k-o|0)<4){h=-2;p=77;break b}if((Oc[c[n>>2]&255](b,o)|0)==0){p=33;break b}q=o+4|0;break};case 5:{if((k-o|0)<2){h=-2;p=77;break b}if((Oc[c[l>>2]&255](b,o)|0)==0){p=25;break b}q=o+2|0;break};case 22:case 24:case 25:case 26:case 27:{q=o+1|0;break};case 6:{if((k-o|0)<3){h=-2;p=77;break b}if((Oc[c[m>>2]&255](b,o)|0)==0){p=29;break b}q=o+3|0;break};default:{r=o;break b}}if((q|0)==(f|0)){h=-1;p=77;break}else{o=q}}do{if((p|0)==21){c[g>>2]=o;h=0;return h|0}else if((p|0)==25){c[g>>2]=o;h=0;return h|0}else if((p|0)==29){c[g>>2]=o;h=0;return h|0}else if((p|0)==33){c[g>>2]=o;h=0;return h|0}else if((p|0)==36){do{if((o-e|0)==3){q=a[e]|0;if((q|0)==88){s=1}else if((q|0)==120){s=0}else{t=11;break}q=a[e+1|0]|0;if((q|0)==109){u=s}else if((q|0)==77){u=1}else{t=11;break}q=a[e+2|0]|0;if((q|0)==108){if((u|0)==0){t=12;break}}else if((q|0)!=76){t=11;break}c[g>>2]=o;h=0;return h|0}else{t=11}}while(0);q=o+1|0;if((q|0)==(f|0)){h=-1;return h|0}m=b+352|0;l=b+356|0;n=b+360|0;j=q;c:while(1){switch(d[i+(d[j]|0)|0]|0){case 0:case 1:case 8:{p=59;break c;break};case 7:{if((k-j|0)<4){h=-2;p=77;break c}if((Oc[c[n>>2]&255](b,j)|0)!=0){p=57;break c}v=j+4|0;break};case 5:{if((k-j|0)<2){h=-2;p=77;break c}if((Oc[c[m>>2]&255](b,j)|0)!=0){p=49;break c}v=j+2|0;break};case 15:{q=j+1|0;if((q|0)==(f|0)){h=-1;p=77;break c}if((a[q]|0)==62){p=63;break c}else{v=q}break};case 6:{if((k-j|0)<3){h=-2;p=77;break c}if((Oc[c[l>>2]&255](b,j)|0)!=0){p=53;break c}v=j+3|0;break};default:{v=j+1|0}}if((v|0)==(f|0)){h=-1;p=77;break}else{j=v}}if((p|0)==49){c[g>>2]=j;h=0;return h|0}else if((p|0)==53){c[g>>2]=j;h=0;return h|0}else if((p|0)==57){c[g>>2]=j;h=0;return h|0}else if((p|0)==59){c[g>>2]=j;h=0;return h|0}else if((p|0)==63){c[g>>2]=j+2;h=t;return h|0}else if((p|0)==77){return h|0}}else if((p|0)==65){do{if((o-e|0)==3){l=a[e]|0;if((l|0)==120){w=0}else if((l|0)==88){w=1}else{x=11;break}l=a[e+1|0]|0;if((l|0)==77){y=1}else if((l|0)==109){y=w}else{x=11;break}l=a[e+2|0]|0;if((l|0)==108){if((y|0)==0){x=12;break}}else if((l|0)!=76){x=11;break}c[g>>2]=o;h=0;return h|0}else{x=11}}while(0);j=o+1|0;if((j|0)==(f|0)){h=-1;return h|0}if((a[j]|0)!=62){r=j;break}c[g>>2]=o+2;h=x;return h|0}else if((p|0)==77){return h|0}}while(0);c[g>>2]=r;h=0;return h|0}function sg(a,b,e,f,g){a=a|0;b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;if((e|0)==(f|0)){h=-1;return h|0}i=b+72|0;j=f;k=b+352|0;l=b+356|0;m=b+360|0;n=e;a:while(1){e=d[i+(d[n]|0)|0]|0;switch(e|0){case 0:case 1:case 8:{o=16;break a;break};case 6:{if((j-n|0)<3){h=-2;o=23;break a}if((Oc[c[l>>2]&255](b,n)|0)!=0){o=10;break a}p=n+3|0;break};case 12:case 13:{q=n+1|0;if((e|0)==(a|0)){o=18;break a}else{p=q}break};case 7:{if((j-n|0)<4){h=-2;o=23;break a}if((Oc[c[m>>2]&255](b,n)|0)!=0){o=14;break a}p=n+4|0;break};case 5:{if((j-n|0)<2){h=-2;o=23;break a}if((Oc[c[k>>2]&255](b,n)|0)!=0){o=6;break a}p=n+2|0;break};default:{p=n+1|0}}if((p|0)==(f|0)){h=-1;o=23;break}else{n=p}}if((o|0)==6){c[g>>2]=n;h=0;return h|0}else if((o|0)==10){c[g>>2]=n;h=0;return h|0}else if((o|0)==14){c[g>>2]=n;h=0;return h|0}else if((o|0)==16){c[g>>2]=n;h=0;return h|0}else if((o|0)==18){if((q|0)==(f|0)){h=-27;return h|0}c[g>>2]=q;switch(d[i+(d[q]|0)|0]|0|0){case 21:case 9:case 10:case 11:case 30:case 20:{h=27;return h|0};default:{}}h=0;return h|0}else if((o|0)==23){return h|0}return 0}function tg(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0;b=c[d>>2]|0;if((b|0)==(e|0)){return}else{h=b}while(1){if((c[f>>2]|0)==(g|0)){i=4;break}c[d>>2]=h+1;b=a[h]|0;j=c[f>>2]|0;c[f>>2]=j+1;a[j]=b;b=c[d>>2]|0;if((b|0)==(e|0)){i=4;break}else{h=b}}if((i|0)==4){return}}function ug(a,e,f,g,h){a=a|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0;a=c[e>>2]|0;if((a|0)==(f|0)){return}else{i=a}while(1){if((c[g>>2]|0)==(h|0)){j=4;break}c[e>>2]=i+1;a=d[i]|0;k=c[g>>2]|0;c[g>>2]=k+2;b[k>>1]=a;a=c[e>>2]|0;if((a|0)==(f|0)){j=4;break}else{i=a}}if((j|0)==4){return}}function vg(b,d,e,f,g,h,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0;k=i;i=i+120|0;l=k|0;m=k+8|0;n=k+16|0;o=k+24|0;p=k+32|0;q=k+40|0;r=k+48|0;s=k+56|0;t=k+64|0;u=k+72|0;v=k+80|0;w=k+88|0;x=k+96|0;y=k+104|0;z=k+112|0;if((d|0)==(e|0)){c[f>>2]=0;A=1;i=k;return A|0}B=y|0;c[x>>2]=d;c[z>>2]=B;C=b+56|0;D=y+1|0;Bc[c[C>>2]&63](b,x,e,z,D);do{if((c[z>>2]|0)!=(B|0)){x=a[B]|0;if(!((x|0)==32|(x|0)==13|(x|0)==10|(x|0)==9)){break}x=b+64|0;y=d+(c[x>>2]|0)|0;c[t>>2]=y;c[u>>2]=B;Bc[c[C>>2]&63](b,t,e,u,D);a:do{if((c[u>>2]|0)==(B|0)){E=y}else{F=y;while(1){G=a[B]|0;if(!((G|0)==32|(G|0)==13|(G|0)==10|(G|0)==9)){E=F;break a}G=F+(c[x>>2]|0)|0;c[t>>2]=G;c[u>>2]=B;Bc[c[C>>2]&63](b,t,e,u,D);if((c[u>>2]|0)==(B|0)){E=G;break}else{F=G}}}}while(0);if((E|0)==(e|0)){c[f>>2]=0;A=1;i=k;return A|0}c[f>>2]=E;c[p>>2]=E;c[q>>2]=B;Bc[c[C>>2]&63](b,p,e,q,D);b:do{if((c[q>>2]|0)==(B|0)){H=E}else{y=E;c:while(1){switch(a[B]|0){case-1:{H=y;break b;break};case 32:case 13:case 10:case 9:{I=15;break c;break};case 61:{I=14;break c;break};default:{}}F=y+(c[x>>2]|0)|0;c[p>>2]=F;c[q>>2]=B;Bc[c[C>>2]&63](b,p,e,q,D);if((c[q>>2]|0)==(B|0)){H=F;break b}else{y=F}}d:do{if((I|0)==14){c[g>>2]=y;J=y}else if((I|0)==15){c[g>>2]=y;F=y+(c[x>>2]|0)|0;c[l>>2]=F;c[m>>2]=B;Bc[c[C>>2]&63](b,l,e,m,D);e:do{if((c[m>>2]|0)==(B|0)){K=F}else{G=F;while(1){switch(a[B]|0){case 61:{J=G;break d;break};case 32:case 13:case 10:case 9:{break};default:{K=G;break e}}L=G+(c[x>>2]|0)|0;c[l>>2]=L;c[m>>2]=B;Bc[c[C>>2]&63](b,l,e,m,D);if((c[m>>2]|0)==(B|0)){K=L;break e}else{G=L}}}}while(0);c[j>>2]=K;A=0;i=k;return A|0}}while(0);if((J|0)==(c[f>>2]|0)){c[j>>2]=J;A=0;i=k;return A|0}y=J+(c[x>>2]|0)|0;c[n>>2]=y;c[o>>2]=B;Bc[c[C>>2]&63](b,n,e,o,D);if((c[o>>2]|0)==(B|0)){M=-1}else{M=a[B]|0}F=M;G=y;f:while(1){switch(F|0){case 39:case 34:{break f;break};case 32:case 13:case 10:case 9:{break};default:{I=28;break f}}y=G+(c[x>>2]|0)|0;c[r>>2]=y;c[s>>2]=B;Bc[c[C>>2]&63](b,r,e,s,D);if((c[s>>2]|0)==(B|0)){F=-1;G=y;continue}F=a[B]|0;G=y}if((I|0)==28){c[j>>2]=G;A=0;i=k;return A|0}y=G+(c[x>>2]|0)|0;c[h>>2]=y;L=y;while(1){c[v>>2]=L;c[w>>2]=B;Bc[c[C>>2]&63](b,v,e,w,D);if((c[w>>2]|0)==(B|0)){N=-1}else{N=a[B]|0}if((N|0)==(F|0)){I=37;break}if((N-65|0)>>>0>25>>>0&(N-97|0)>>>0>25>>>0&(N-48|0)>>>0>9>>>0){if(!((N|0)==95|(N|0)==46|(N|0)==45)){I=35;break}}L=L+(c[x>>2]|0)|0}if((I|0)==35){c[j>>2]=L;A=0;i=k;return A|0}else if((I|0)==37){c[j>>2]=L+(c[x>>2]|0);A=1;i=k;return A|0}}}while(0);c[j>>2]=H;A=0;i=k;return A|0}}while(0);c[j>>2]=d;A=0;i=k;return A|0}function wg(b,e,f,g,h){b=b|0;e=e|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0;if((f|0)==(g|0)){i=-4;return i|0}j=c[b+72>>2]|0;k=f+1|0;a:do{if((k|0)==(g|0)){if((e|0)!=1){i=-1;return i|0}l=a[b+69|0]|0;if(((l<<24>>24)-3|0)>>>0<3>>>0){i=-1;return i|0}switch(d[f]|0){case 254:case 255:case 239:{break};case 0:case 60:{i=-1;return i|0};default:{break a}}if(l<<24>>24==0){break}else{i=-1}return i|0}else{l=a[f]|0;m=a[k]|0;n=(l&255)<<8|m&255;if((n|0)==61371){if((e|0)==1){o=a[b+69|0]|0;if((o&-5)<<24>>24==0|o<<24>>24==5|o<<24>>24==3){break}}o=f+2|0;if((o|0)==(g|0)){i=-1;return i|0}if((a[o]|0)!=-65){break}c[h>>2]=f+3;c[j>>2]=600;i=14;return i|0}else if((n|0)==65534){if((a[b+69|0]|0)==0&(e|0)==1){break}c[h>>2]=f+2;c[j>>2]=20048;i=14;return i|0}else if((n|0)==65279){if((a[b+69|0]|0)==0&(e|0)==1){break}c[h>>2]=f+2;c[j>>2]=71352;i=14;return i|0}else if((n|0)==15360){if(((a[b+69|0]|0)-3&255)>>>0<2>>>0&(e|0)==1){break}c[j>>2]=20048;i=Sc[c[20048+(e<<2)>>2]&127](20048,f,g,h)|0;return i|0}else{if(l<<24>>24!=0){if(m<<24>>24!=0|(e|0)==1){break}c[j>>2]=20048;i=Sc[c[20048+(e<<2)>>2]&127](20048,f,g,h)|0;return i|0}if((e|0)==1){if((a[b+69|0]|0)==5){break}}c[j>>2]=71352;i=Sc[c[71352+(e<<2)>>2]&127](71352,f,g,h)|0;return i|0}}}while(0);k=c[28632+(a[b+69|0]<<2)>>2]|0;c[j>>2]=k;i=Sc[c[k+(e<<2)>>2]&127](k,f,g,h)|0;return i|0}function xg(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0;b=g;h=c[d>>2]|0;if((h|0)==(e|0)){return}else{i=h}while(1){h=a[i]|0;j=c[f>>2]|0;if(h<<24>>24>-1){if((j|0)==(g|0)){k=8;break}c[d>>2]=i+1;l=a[i]|0;m=c[f>>2]|0;c[f>>2]=m+1;a[m]=l;n=c[d>>2]|0}else{if((b-j|0)<2){k=8;break}c[f>>2]=j+1;a[j]=(h&255)>>>6|-64;j=c[f>>2]|0;c[f>>2]=j+1;a[j]=h&63|-128;h=(c[d>>2]|0)+1|0;c[d>>2]=h;n=h}if((n|0)==(e|0)){k=8;break}else{i=n}}if((k|0)==8){return}}function yg(a,b,c){a=a|0;b=b|0;c=c|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0;e=a>>>16;f=a&65535;if((c|0)==1){a=(d[b]|0)+f|0;g=a>>>0>65520>>>0?a-65521|0:a;a=g+e|0;h=(a>>>0>65520>>>0?a+15|0:a)<<16|g;return h|0}if((b|0)==0){h=1;return h|0}if(c>>>0<16>>>0){if((c|0)==0){i=f;j=e}else{g=f;a=b;k=c;l=e;while(1){m=k-1|0;n=(d[a]|0)+g|0;o=n+l|0;if((m|0)==0){i=n;j=o;break}else{g=n;a=a+1|0;k=m;l=o}}}h=((j>>>0)%65521|0)<<16|(i>>>0>65520>>>0?i-65521|0:i);return h|0}do{if(c>>>0>5551>>>0){i=f;j=b;l=c;k=e;do{l=l-5552|0;a=347;g=k;o=j;m=i;while(1){n=(d[o]|0)+m|0;p=n+(d[o+1|0]|0)|0;q=p+(d[o+2|0]|0)|0;r=q+(d[o+3|0]|0)|0;s=r+(d[o+4|0]|0)|0;t=s+(d[o+5|0]|0)|0;u=t+(d[o+6|0]|0)|0;v=u+(d[o+7|0]|0)|0;w=v+(d[o+8|0]|0)|0;x=w+(d[o+9|0]|0)|0;y=x+(d[o+10|0]|0)|0;z=y+(d[o+11|0]|0)|0;A=z+(d[o+12|0]|0)|0;B=A+(d[o+13|0]|0)|0;C=B+(d[o+14|0]|0)|0;D=C+(d[o+15|0]|0)|0;E=n+g+p+q+r+s+t+u+v+w+x+y+z+A+B+C+D|0;C=a-1|0;if((C|0)==0){break}else{a=C;g=E;o=o+16|0;m=D}}j=j+5552|0;i=(D>>>0)%65521|0;k=(E>>>0)%65521|0;}while(l>>>0>5551>>>0);if((l|0)==0){F=k;G=i;break}if(l>>>0>15>>>0){H=i;I=j;J=l;K=k;L=15}else{M=i;N=j;O=l;P=k;L=16}}else{H=f;I=b;J=c;K=e;L=15}}while(0);if((L|0)==15){while(1){L=0;Q=J-16|0;e=(d[I]|0)+H|0;c=e+(d[I+1|0]|0)|0;b=c+(d[I+2|0]|0)|0;f=b+(d[I+3|0]|0)|0;E=f+(d[I+4|0]|0)|0;D=E+(d[I+5|0]|0)|0;m=D+(d[I+6|0]|0)|0;o=m+(d[I+7|0]|0)|0;g=o+(d[I+8|0]|0)|0;a=g+(d[I+9|0]|0)|0;C=a+(d[I+10|0]|0)|0;B=C+(d[I+11|0]|0)|0;A=B+(d[I+12|0]|0)|0;z=A+(d[I+13|0]|0)|0;y=z+(d[I+14|0]|0)|0;R=y+(d[I+15|0]|0)|0;S=e+K+c+b+f+E+D+m+o+g+a+C+B+A+z+y+R|0;T=I+16|0;if(Q>>>0>15>>>0){H=R;I=T;J=Q;K=S;L=15}else{break}}if((Q|0)==0){U=R;V=S;L=17}else{M=R;N=T;O=Q;P=S;L=16}}if((L|0)==16){while(1){L=0;S=O-1|0;Q=(d[N]|0)+M|0;T=Q+P|0;if((S|0)==0){U=Q;V=T;L=17;break}else{M=Q;N=N+1|0;O=S;P=T;L=16}}}if((L|0)==17){F=(V>>>0)%65521|0;G=(U>>>0)%65521|0}h=F<<16|G;return h|0}function zg(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;if((b|0)==0){f=0;return f|0}g=~a;a:do{if((e|0)==0){h=g}else{a=b;i=e;j=g;while(1){if((a&3|0)==0){break}k=c[29760+(((d[a]|0)^j&255)<<2)>>2]^j>>>8;l=i-1|0;if((l|0)==0){h=k;break a}else{a=a+1|0;i=l;j=k}}k=a;if(i>>>0>31>>>0){l=i;m=j;n=k;while(1){o=c[n>>2]^m;p=c[31808+((o>>>8&255)<<2)>>2]^c[32832+((o&255)<<2)>>2]^c[30784+((o>>>16&255)<<2)>>2]^c[29760+(o>>>24<<2)>>2]^c[n+4>>2];o=c[31808+((p>>>8&255)<<2)>>2]^c[32832+((p&255)<<2)>>2]^c[30784+((p>>>16&255)<<2)>>2]^c[29760+(p>>>24<<2)>>2]^c[n+8>>2];p=c[31808+((o>>>8&255)<<2)>>2]^c[32832+((o&255)<<2)>>2]^c[30784+((o>>>16&255)<<2)>>2]^c[29760+(o>>>24<<2)>>2]^c[n+12>>2];o=c[31808+((p>>>8&255)<<2)>>2]^c[32832+((p&255)<<2)>>2]^c[30784+((p>>>16&255)<<2)>>2]^c[29760+(p>>>24<<2)>>2]^c[n+16>>2];p=c[31808+((o>>>8&255)<<2)>>2]^c[32832+((o&255)<<2)>>2]^c[30784+((o>>>16&255)<<2)>>2]^c[29760+(o>>>24<<2)>>2]^c[n+20>>2];o=c[31808+((p>>>8&255)<<2)>>2]^c[32832+((p&255)<<2)>>2]^c[30784+((p>>>16&255)<<2)>>2]^c[29760+(p>>>24<<2)>>2]^c[n+24>>2];p=n+32|0;q=c[31808+((o>>>8&255)<<2)>>2]^c[32832+((o&255)<<2)>>2]^c[30784+((o>>>16&255)<<2)>>2]^c[29760+(o>>>24<<2)>>2]^c[n+28>>2];o=c[31808+((q>>>8&255)<<2)>>2]^c[32832+((q&255)<<2)>>2]^c[30784+((q>>>16&255)<<2)>>2]^c[29760+(q>>>24<<2)>>2];q=l-32|0;if(q>>>0>31>>>0){l=q;m=o;n=p}else{r=q;s=o;t=p;break}}}else{r=i;s=j;t=k}if(r>>>0>3>>>0){n=r;m=s;l=t;while(1){a=l+4|0;p=c[l>>2]^m;o=c[31808+((p>>>8&255)<<2)>>2]^c[32832+((p&255)<<2)>>2]^c[30784+((p>>>16&255)<<2)>>2]^c[29760+(p>>>24<<2)>>2];p=n-4|0;if(p>>>0>3>>>0){n=p;m=o;l=a}else{u=p;v=o;w=a;break}}}else{u=r;v=s;w=t}if((u|0)==0){h=v;break}l=v;m=u;n=w;while(1){k=c[29760+(((d[n]|0)^l&255)<<2)>>2]^l>>>8;j=m-1|0;if((j|0)==0){h=k;break}else{l=k;m=j;n=n+1|0}}}}while(0);f=~h;return f|0}function Ag(d,f,g,h,i,j,k,l){d=d|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;if((k|0)==0){m=-6;return m|0}if(!((a[k]|0)==49&(l|0)==56)){m=-6;return m|0}if((d|0)==0){m=-2;return m|0}l=d+24|0;c[l>>2]=0;k=d+32|0;n=c[k>>2]|0;if((n|0)==0){c[k>>2]=36;c[d+40>>2]=0;o=36}else{o=n}n=d+36|0;if((c[n>>2]|0)==0){c[n>>2]=4}n=(f|0)==-1?6:f;if((h|0)<0){p=0;q=-h|0}else{f=(h|0)>15;p=f?2:1;q=f?h-16|0:h}if(!((i-1|0)>>>0<9>>>0&(g|0)==8)){m=-2;return m|0}if((q-8|0)>>>0>7>>>0|n>>>0>9>>>0|j>>>0>4>>>0){m=-2;return m|0}g=(q|0)==8?9:q;q=d+40|0;h=Hc[o&63](c[q>>2]|0,1,5828)|0;if((h|0)==0){m=-4;return m|0}o=d+28|0;c[o>>2]=h;c[h>>2]=d;c[h+24>>2]=p;c[h+28>>2]=0;c[h+48>>2]=g;p=1<<g;g=h+44|0;c[g>>2]=p;c[h+52>>2]=p-1;f=i+7|0;c[h+80>>2]=f;r=1<<f;f=h+76|0;c[f>>2]=r;c[h+84>>2]=r-1;c[h+88>>2]=((i+9|0)>>>0)/3|0;r=h+56|0;c[r>>2]=Hc[c[k>>2]&63](c[q>>2]|0,p,2)|0;p=h+64|0;c[p>>2]=Hc[c[k>>2]&63](c[q>>2]|0,c[g>>2]|0,2)|0;g=h+68|0;c[g>>2]=Hc[c[k>>2]&63](c[q>>2]|0,c[f>>2]|0,2)|0;c[h+5824>>2]=0;f=1<<i+6;i=h+5788|0;c[i>>2]=f;s=Hc[c[k>>2]&63](c[q>>2]|0,f,4)|0;f=s;c[h+8>>2]=s;q=c[i>>2]|0;c[h+12>>2]=q<<2;do{if((c[r>>2]|0)!=0){if((c[p>>2]|0)==0){break}if((c[g>>2]|0)==0|(s|0)==0){break}c[h+5796>>2]=f+(q>>>1<<1);c[h+5784>>2]=s+(q*3|0);c[h+132>>2]=n;c[h+136>>2]=j;a[h+36|0]=8;i=Dg(d)|0;if((i|0)!=0){m=i;return m|0}i=c[o>>2]|0;c[i+60>>2]=c[i+44>>2]<<1;k=i+76|0;t=i+68|0;b[(c[t>>2]|0)+((c[k>>2]|0)-1<<1)>>1]=0;vF(c[t>>2]|0,0,(c[k>>2]<<1)-2|0)|0;k=c[i+132>>2]|0;c[i+128>>2]=e[40330+(k*12|0)>>1]|0;c[i+140>>2]=e[40328+(k*12|0)>>1]|0;c[i+144>>2]=e[40332+(k*12|0)>>1]|0;c[i+124>>2]=e[40334+(k*12|0)>>1]|0;c[i+108>>2]=0;c[i+92>>2]=0;c[i+116>>2]=0;c[i+5812>>2]=0;c[i+120>>2]=2;c[i+96>>2]=2;c[i+104>>2]=0;c[i+72>>2]=0;m=0;return m|0}}while(0);c[h+4>>2]=666;c[l>>2]=c[12];Bg(d)|0;m=-4;return m|0}function Bg(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;if((a|0)==0){b=-2;return b|0}d=a+28|0;e=c[d>>2]|0;if((e|0)==0){b=-2;return b|0}f=c[e+4>>2]|0;switch(f|0){case 666:case 113:case 103:case 91:case 73:case 69:case 42:{break};default:{b=-2;return b|0}}g=c[e+8>>2]|0;if((g|0)==0){h=e}else{Dc[c[a+36>>2]&63](c[a+40>>2]|0,g);h=c[d>>2]|0}g=c[h+68>>2]|0;if((g|0)==0){i=h}else{Dc[c[a+36>>2]&63](c[a+40>>2]|0,g);i=c[d>>2]|0}g=c[i+64>>2]|0;if((g|0)==0){j=i}else{Dc[c[a+36>>2]&63](c[a+40>>2]|0,g);j=c[d>>2]|0}g=c[j+56>>2]|0;i=a+36|0;if((g|0)==0){k=j;l=a+40|0}else{j=a+40|0;Dc[c[i>>2]&63](c[j>>2]|0,g);k=c[d>>2]|0;l=j}Dc[c[i>>2]&63](c[l>>2]|0,k);c[d>>2]=0;b=(f|0)==113?-3:0;return b|0}function Cg(a){a=a|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0;f=a+44|0;g=c[f>>2]|0;h=a+60|0;i=a+116|0;j=a+108|0;k=g-262|0;l=a|0;m=a+56|0;n=a+5812|0;o=a+72|0;p=a+88|0;q=a+84|0;r=a+68|0;s=a+52|0;t=a+64|0;u=a+112|0;v=a+92|0;w=a+76|0;x=c[i>>2]|0;y=g;while(1){z=c[j>>2]|0;A=(c[h>>2]|0)-x-z|0;if(z>>>0<(k+y|0)>>>0){B=A}else{z=c[m>>2]|0;tF(z|0,z+g|0,g)|0;c[u>>2]=(c[u>>2]|0)-g;c[j>>2]=(c[j>>2]|0)-g;c[v>>2]=(c[v>>2]|0)-g;z=c[w>>2]|0;C=z;D=(c[r>>2]|0)+(z<<1)|0;do{D=D-2|0;z=e[D>>1]|0;if(z>>>0<g>>>0){E=0}else{E=z-g&65535}b[D>>1]=E;C=C-1|0;}while((C|0)!=0);C=g;D=(c[t>>2]|0)+(g<<1)|0;do{D=D-2|0;z=e[D>>1]|0;if(z>>>0<g>>>0){F=0}else{F=z-g&65535}b[D>>1]=F;C=C-1|0;}while((C|0)!=0);B=A+g|0}C=c[l>>2]|0;D=C+4|0;z=c[D>>2]|0;if((z|0)==0){break}G=c[i>>2]|0;H=(c[m>>2]|0)+(G+(c[j>>2]|0))|0;I=z>>>0>B>>>0?B:z;if((I|0)==0){J=0;K=G}else{c[D>>2]=z-I;z=C|0;tF(H|0,c[z>>2]|0,I)|0;D=c[(c[C+28>>2]|0)+24>>2]|0;if((D|0)==1){G=C+48|0;c[G>>2]=yg(c[G>>2]|0,H,I)|0}else if((D|0)==2){D=C+48|0;c[D>>2]=zg(c[D>>2]|0,H,I)|0}c[z>>2]=(c[z>>2]|0)+I;z=C+8|0;c[z>>2]=(c[z>>2]|0)+I;J=I;K=c[i>>2]|0}I=K+J|0;c[i>>2]=I;z=c[n>>2]|0;a:do{if((I+z|0)>>>0>2>>>0){C=(c[j>>2]|0)-z|0;H=c[m>>2]|0;D=d[H+C|0]|0;c[o>>2]=D;c[o>>2]=((d[H+(C+1)|0]|0)^D<<c[p>>2])&c[q>>2];D=C;C=z;H=I;while(1){if((C|0)==0){L=H;break a}G=((d[(c[m>>2]|0)+(D+2)|0]|0)^c[o>>2]<<c[p>>2])&c[q>>2];c[o>>2]=G;b[(c[t>>2]|0)+((c[s>>2]&D)<<1)>>1]=b[(c[r>>2]|0)+(G<<1)>>1]|0;b[(c[r>>2]|0)+(c[o>>2]<<1)>>1]=D;G=(c[n>>2]|0)-1|0;c[n>>2]=G;M=c[i>>2]|0;if((M+G|0)>>>0<3>>>0){L=M;break}else{D=D+1|0;C=G;H=M}}}else{L=I}}while(0);if(L>>>0>=262>>>0){break}if((c[(c[l>>2]|0)+4>>2]|0)==0){break}x=L;y=c[f>>2]|0}f=a+5824|0;a=c[f>>2]|0;y=c[h>>2]|0;if(a>>>0>=y>>>0){return}h=(c[i>>2]|0)+(c[j>>2]|0)|0;if(a>>>0<h>>>0){j=y-h|0;i=j>>>0>258>>>0?258:j;vF((c[m>>2]|0)+h|0,0,i|0)|0;c[f>>2]=i+h;return}i=h+258|0;if(a>>>0>=i>>>0){return}h=i-a|0;i=y-a|0;y=h>>>0>i>>>0?i:h;vF((c[m>>2]|0)+a|0,0,y|0)|0;c[f>>2]=(c[f>>2]|0)+y;return}function Dg(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0;if((a|0)==0){b=-2;return b|0}d=c[a+28>>2]|0;if((d|0)==0){b=-2;return b|0}if((c[a+32>>2]|0)==0){b=-2;return b|0}if((c[a+36>>2]|0)==0){b=-2;return b|0}c[a+20>>2]=0;c[a+8>>2]=0;c[a+24>>2]=0;c[a+44>>2]=2;c[d+20>>2]=0;c[d+16>>2]=c[d+8>>2];e=d+24|0;f=c[e>>2]|0;if((f|0)<0){g=-f|0;c[e>>2]=g;h=g}else{h=f}c[d+4>>2]=(h|0)!=0?42:113;if((h|0)==2){i=zg(0,0,0)|0}else{i=yg(0,0,0)|0}c[a+48>>2]=i;c[d+40>>2]=0;Jg(d);b=0;return b|0}function Eg(e,f){e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0;if((e|0)==0){g=-2;return g|0}h=e+28|0;i=c[h>>2]|0;if((i|0)==0|f>>>0>5>>>0){g=-2;return g|0}j=e+12|0;do{if((c[j>>2]|0)!=0){if((c[e>>2]|0)==0){if((c[e+4>>2]|0)!=0){break}}k=i+4|0;l=c[k>>2]|0;m=(f|0)==4;if(!((l|0)!=666|m)){break}n=e+16|0;if((c[n>>2]|0)==0){c[e+24>>2]=c[13];g=-5;return g|0}o=i|0;c[o>>2]=e;p=i+40|0;q=c[p>>2]|0;c[p>>2]=f;do{if((l|0)==42){if((c[i+24>>2]|0)!=2){r=(c[i+48>>2]<<12)-30720|0;do{if((c[i+136>>2]|0)>1){s=0}else{t=c[i+132>>2]|0;if((t|0)<2){s=0;break}if((t|0)<6){s=64;break}s=(t|0)==6?128:192}}while(0);t=s|r;u=i+108|0;v=(c[u>>2]|0)==0?t:t|32;c[k>>2]=113;t=i+20|0;w=c[t>>2]|0;c[t>>2]=w+1;x=i+8|0;a[(c[x>>2]|0)+w|0]=v>>>8;w=c[t>>2]|0;c[t>>2]=w+1;a[(c[x>>2]|0)+w|0]=(v|((v>>>0)%31|0))^31;v=e+48|0;if((c[u>>2]|0)!=0){u=c[v>>2]|0;w=c[t>>2]|0;c[t>>2]=w+1;a[(c[x>>2]|0)+w|0]=u>>>24;w=c[t>>2]|0;c[t>>2]=w+1;a[(c[x>>2]|0)+w|0]=u>>>16;u=c[v>>2]|0;w=c[t>>2]|0;c[t>>2]=w+1;a[(c[x>>2]|0)+w|0]=u>>>8;w=c[t>>2]|0;c[t>>2]=w+1;a[(c[x>>2]|0)+w|0]=u}c[v>>2]=yg(0,0,0)|0;y=c[k>>2]|0;z=32;break}v=e+48|0;c[v>>2]=zg(0,0,0)|0;u=i+20|0;w=c[u>>2]|0;c[u>>2]=w+1;x=i+8|0;a[(c[x>>2]|0)+w|0]=31;w=c[u>>2]|0;c[u>>2]=w+1;a[(c[x>>2]|0)+w|0]=-117;w=c[u>>2]|0;c[u>>2]=w+1;a[(c[x>>2]|0)+w|0]=8;w=i+28|0;t=c[w>>2]|0;if((t|0)==0){A=c[u>>2]|0;c[u>>2]=A+1;a[(c[x>>2]|0)+A|0]=0;A=c[u>>2]|0;c[u>>2]=A+1;a[(c[x>>2]|0)+A|0]=0;A=c[u>>2]|0;c[u>>2]=A+1;a[(c[x>>2]|0)+A|0]=0;A=c[u>>2]|0;c[u>>2]=A+1;a[(c[x>>2]|0)+A|0]=0;A=c[u>>2]|0;c[u>>2]=A+1;a[(c[x>>2]|0)+A|0]=0;A=c[i+132>>2]|0;do{if((A|0)==9){B=2}else{if((c[i+136>>2]|0)>1){B=4;break}B=(A|0)<2?4:0}}while(0);A=c[u>>2]|0;c[u>>2]=A+1;a[(c[x>>2]|0)+A|0]=B;A=c[u>>2]|0;c[u>>2]=A+1;a[(c[x>>2]|0)+A|0]=3;c[k>>2]=113;break}A=((c[t+44>>2]|0)!=0?2:0)|(c[t>>2]|0)!=0|((c[t+16>>2]|0)==0?0:4)|((c[t+28>>2]|0)==0?0:8)|((c[t+36>>2]|0)==0?0:16);r=c[u>>2]|0;c[u>>2]=r+1;a[(c[x>>2]|0)+r|0]=A;A=c[(c[w>>2]|0)+4>>2]&255;r=c[u>>2]|0;c[u>>2]=r+1;a[(c[x>>2]|0)+r|0]=A;A=(c[(c[w>>2]|0)+4>>2]|0)>>>8&255;r=c[u>>2]|0;c[u>>2]=r+1;a[(c[x>>2]|0)+r|0]=A;A=(c[(c[w>>2]|0)+4>>2]|0)>>>16&255;r=c[u>>2]|0;c[u>>2]=r+1;a[(c[x>>2]|0)+r|0]=A;A=(c[(c[w>>2]|0)+4>>2]|0)>>>24&255;r=c[u>>2]|0;c[u>>2]=r+1;a[(c[x>>2]|0)+r|0]=A;A=c[i+132>>2]|0;do{if((A|0)==9){C=2}else{if((c[i+136>>2]|0)>1){C=4;break}C=(A|0)<2?4:0}}while(0);A=c[u>>2]|0;c[u>>2]=A+1;a[(c[x>>2]|0)+A|0]=C;A=c[(c[w>>2]|0)+12>>2]&255;t=c[u>>2]|0;c[u>>2]=t+1;a[(c[x>>2]|0)+t|0]=A;A=c[w>>2]|0;if((c[A+16>>2]|0)==0){D=A}else{t=c[A+20>>2]&255;A=c[u>>2]|0;c[u>>2]=A+1;a[(c[x>>2]|0)+A|0]=t;t=(c[(c[w>>2]|0)+20>>2]|0)>>>8&255;A=c[u>>2]|0;c[u>>2]=A+1;a[(c[x>>2]|0)+A|0]=t;D=c[w>>2]|0}if((c[D+44>>2]|0)!=0){c[v>>2]=zg(c[v>>2]|0,c[x>>2]|0,c[u>>2]|0)|0}c[i+32>>2]=0;c[k>>2]=69;E=w;z=34}else{y=l;z=32}}while(0);do{if((z|0)==32){if((y|0)!=69){F=y;z=55;break}E=i+28|0;z=34}}while(0);do{if((z|0)==34){l=c[E>>2]|0;if((c[l+16>>2]|0)==0){c[k>>2]=73;G=l;z=57;break}t=i+20|0;A=c[t>>2]|0;r=i+32|0;H=c[r>>2]|0;a:do{if(H>>>0<(c[l+20>>2]&65535)>>>0){I=i+12|0;J=e+48|0;K=i+8|0;L=e+20|0;M=A;N=l;O=A;P=H;while(1){if((O|0)==(c[I>>2]|0)){if((c[N+44>>2]|0)!=0&O>>>0>M>>>0){c[J>>2]=zg(c[J>>2]|0,(c[K>>2]|0)+M|0,O-M|0)|0}Q=c[h>>2]|0;Mg(Q);R=Q+20|0;S=c[R>>2]|0;T=c[n>>2]|0;U=S>>>0>T>>>0?T:S;do{if((U|0)!=0){S=Q+16|0;tF(c[j>>2]|0,c[S>>2]|0,U)|0;c[j>>2]=(c[j>>2]|0)+U;c[S>>2]=(c[S>>2]|0)+U;c[L>>2]=(c[L>>2]|0)+U;c[n>>2]=(c[n>>2]|0)-U;T=c[R>>2]|0;c[R>>2]=T-U;if((T|0)!=(U|0)){break}c[S>>2]=c[Q+8>>2]}}while(0);V=c[t>>2]|0;if((V|0)==(c[I>>2]|0)){break}W=V;X=V;Y=c[r>>2]|0;Z=c[E>>2]|0}else{W=M;X=O;Y=P;Z=N}Q=a[(c[Z+16>>2]|0)+Y|0]|0;c[t>>2]=X+1;a[(c[K>>2]|0)+X|0]=Q;Q=(c[r>>2]|0)+1|0;c[r>>2]=Q;U=c[E>>2]|0;if(Q>>>0>=(c[U+20>>2]&65535)>>>0){_=W;$=U;break a}M=W;N=U;O=c[t>>2]|0;P=Q}_=V;$=c[E>>2]|0}else{_=A;$=l}}while(0);do{if((c[$+44>>2]|0)==0){aa=$}else{l=c[t>>2]|0;if(l>>>0<=_>>>0){aa=$;break}A=e+48|0;c[A>>2]=zg(c[A>>2]|0,(c[i+8>>2]|0)+_|0,l-_|0)|0;aa=c[E>>2]|0}}while(0);if((c[r>>2]|0)==(c[aa+20>>2]|0)){c[r>>2]=0;c[k>>2]=73;G=aa;z=57;break}else{F=c[k>>2]|0;z=55;break}}}while(0);do{if((z|0)==55){if((F|0)!=73){ba=F;z=75;break}G=c[i+28>>2]|0;z=57}}while(0);do{if((z|0)==57){t=i+28|0;if((c[G+28>>2]|0)==0){c[k>>2]=91;ca=t;z=77;break}l=i+20|0;A=c[l>>2]|0;H=i+12|0;w=e+48|0;u=i+8|0;x=e+20|0;v=i+32|0;P=A;O=A;while(1){if((O|0)==(c[H>>2]|0)){if((c[(c[t>>2]|0)+44>>2]|0)!=0&O>>>0>P>>>0){c[w>>2]=zg(c[w>>2]|0,(c[u>>2]|0)+P|0,O-P|0)|0}A=c[h>>2]|0;Mg(A);N=A+20|0;M=c[N>>2]|0;K=c[n>>2]|0;I=M>>>0>K>>>0?K:M;do{if((I|0)!=0){M=A+16|0;tF(c[j>>2]|0,c[M>>2]|0,I)|0;c[j>>2]=(c[j>>2]|0)+I;c[M>>2]=(c[M>>2]|0)+I;c[x>>2]=(c[x>>2]|0)+I;c[n>>2]=(c[n>>2]|0)-I;K=c[N>>2]|0;c[N>>2]=K-I;if((K|0)!=(I|0)){break}c[M>>2]=c[A+8>>2]}}while(0);A=c[l>>2]|0;if((A|0)==(c[H>>2]|0)){da=1;ea=A;break}else{fa=A;ga=A}}else{fa=P;ga=O}A=c[v>>2]|0;c[v>>2]=A+1;I=a[(c[(c[t>>2]|0)+28>>2]|0)+A|0]|0;c[l>>2]=ga+1;a[(c[u>>2]|0)+ga|0]=I;if(I<<24>>24==0){da=I&255;ea=fa;break}P=fa;O=c[l>>2]|0}do{if((c[(c[t>>2]|0)+44>>2]|0)!=0){O=c[l>>2]|0;if(O>>>0<=ea>>>0){break}c[w>>2]=zg(c[w>>2]|0,(c[u>>2]|0)+ea|0,O-ea|0)|0}}while(0);if((da|0)==0){c[v>>2]=0;c[k>>2]=91;ca=t;z=77;break}else{ba=c[k>>2]|0;z=75;break}}}while(0);do{if((z|0)==75){if((ba|0)!=91){ha=ba;z=95;break}ca=i+28|0;z=77}}while(0);do{if((z|0)==77){if((c[(c[ca>>2]|0)+36>>2]|0)==0){c[k>>2]=103;ia=ca;z=97;break}u=i+20|0;w=c[u>>2]|0;l=i+12|0;O=e+48|0;P=i+8|0;H=e+20|0;x=i+32|0;r=w;I=w;while(1){if((I|0)==(c[l>>2]|0)){if((c[(c[ca>>2]|0)+44>>2]|0)!=0&I>>>0>r>>>0){c[O>>2]=zg(c[O>>2]|0,(c[P>>2]|0)+r|0,I-r|0)|0}w=c[h>>2]|0;Mg(w);A=w+20|0;N=c[A>>2]|0;M=c[n>>2]|0;K=N>>>0>M>>>0?M:N;do{if((K|0)!=0){N=w+16|0;tF(c[j>>2]|0,c[N>>2]|0,K)|0;c[j>>2]=(c[j>>2]|0)+K;c[N>>2]=(c[N>>2]|0)+K;c[H>>2]=(c[H>>2]|0)+K;c[n>>2]=(c[n>>2]|0)-K;M=c[A>>2]|0;c[A>>2]=M-K;if((M|0)!=(K|0)){break}c[N>>2]=c[w+8>>2]}}while(0);w=c[u>>2]|0;if((w|0)==(c[l>>2]|0)){ja=1;ka=w;break}else{la=w;ma=w}}else{la=r;ma=I}w=c[x>>2]|0;c[x>>2]=w+1;K=a[(c[(c[ca>>2]|0)+36>>2]|0)+w|0]|0;c[u>>2]=ma+1;a[(c[P>>2]|0)+ma|0]=K;if(K<<24>>24==0){ja=K&255;ka=la;break}r=la;I=c[u>>2]|0}do{if((c[(c[ca>>2]|0)+44>>2]|0)!=0){I=c[u>>2]|0;if(I>>>0<=ka>>>0){break}c[O>>2]=zg(c[O>>2]|0,(c[P>>2]|0)+ka|0,I-ka|0)|0}}while(0);if((ja|0)==0){c[k>>2]=103;ia=ca;z=97;break}else{ha=c[k>>2]|0;z=95;break}}}while(0);do{if((z|0)==95){if((ha|0)!=103){break}ia=i+28|0;z=97}}while(0);do{if((z|0)==97){if((c[(c[ia>>2]|0)+44>>2]|0)==0){c[k>>2]=113;break}P=i+20|0;O=i+12|0;do{if(((c[P>>2]|0)+2|0)>>>0>(c[O>>2]|0)>>>0){u=c[h>>2]|0;Mg(u);I=u+20|0;r=c[I>>2]|0;x=c[n>>2]|0;l=r>>>0>x>>>0?x:r;if((l|0)==0){break}r=u+16|0;tF(c[j>>2]|0,c[r>>2]|0,l)|0;c[j>>2]=(c[j>>2]|0)+l;c[r>>2]=(c[r>>2]|0)+l;x=e+20|0;c[x>>2]=(c[x>>2]|0)+l;c[n>>2]=(c[n>>2]|0)-l;x=c[I>>2]|0;c[I>>2]=x-l;if((x|0)!=(l|0)){break}c[r>>2]=c[u+8>>2]}}while(0);u=c[P>>2]|0;if((u+2|0)>>>0>(c[O>>2]|0)>>>0){break}r=e+48|0;l=c[r>>2]&255;c[P>>2]=u+1;x=i+8|0;a[(c[x>>2]|0)+u|0]=l;l=(c[r>>2]|0)>>>8&255;u=c[P>>2]|0;c[P>>2]=u+1;a[(c[x>>2]|0)+u|0]=l;c[r>>2]=zg(0,0,0)|0;c[k>>2]=113}}while(0);r=i+20|0;do{if((c[r>>2]|0)==0){if((c[e+4>>2]|0)!=0){break}if(((f<<1)-((f|0)>4?9:0)|0)>((q<<1)-((q|0)>4?9:0)|0)|m){break}c[e+24>>2]=c[13];g=-5;return g|0}else{l=c[h>>2]|0;Mg(l);u=l+20|0;x=c[u>>2]|0;I=c[n>>2]|0;H=x>>>0>I>>>0?I:x;if((H|0)==0){na=I}else{I=l+16|0;tF(c[j>>2]|0,c[I>>2]|0,H)|0;c[j>>2]=(c[j>>2]|0)+H;c[I>>2]=(c[I>>2]|0)+H;x=e+20|0;c[x>>2]=(c[x>>2]|0)+H;c[n>>2]=(c[n>>2]|0)-H;x=c[u>>2]|0;c[u>>2]=x-H;if((x|0)==(H|0)){c[I>>2]=c[l+8>>2]}na=c[n>>2]|0}if((na|0)!=0){break}c[p>>2]=-1;g=0;return g|0}}while(0);q=(c[k>>2]|0)==666;l=(c[e+4>>2]|0)==0;do{if(q){if(l){z=119;break}c[e+24>>2]=c[13];g=-5;return g|0}else{if(l){z=119}else{z=122}}}while(0);do{if((z|0)==119){if((c[i+116>>2]|0)!=0){z=122;break}if((f|0)==0){g=0;return g|0}else{if(q){break}else{z=122;break}}}}while(0);b:do{if((z|0)==122){q=c[i+136>>2]|0;c:do{if((q|0)==2){l=i+116|0;I=i+96|0;H=i+108|0;x=i+56|0;u=i+5792|0;t=i+5796|0;v=i+5784|0;K=i+5788|0;w=i+92|0;while(1){if((c[l>>2]|0)==0){Cg(i);if((c[l>>2]|0)==0){break}}c[I>>2]=0;A=a[(c[x>>2]|0)+(c[H>>2]|0)|0]|0;b[(c[t>>2]|0)+(c[u>>2]<<1)>>1]=0;N=c[u>>2]|0;c[u>>2]=N+1;a[(c[v>>2]|0)+N|0]=A;N=i+148+((A&255)<<2)|0;b[N>>1]=(b[N>>1]|0)+1;N=(c[u>>2]|0)==((c[K>>2]|0)-1|0);c[l>>2]=(c[l>>2]|0)-1;A=(c[H>>2]|0)+1|0;c[H>>2]=A;if(!N){continue}N=c[w>>2]|0;if((N|0)>-1){oa=(c[x>>2]|0)+N|0}else{oa=0}Og(i,oa,A-N|0,0);c[w>>2]=c[H>>2];N=c[o>>2]|0;A=c[N+28>>2]|0;Mg(A);M=A+20|0;L=c[M>>2]|0;J=N+16|0;Q=c[J>>2]|0;U=L>>>0>Q>>>0?Q:L;do{if((U|0)!=0){L=N+12|0;Q=A+16|0;tF(c[L>>2]|0,c[Q>>2]|0,U)|0;c[L>>2]=(c[L>>2]|0)+U;c[Q>>2]=(c[Q>>2]|0)+U;L=N+20|0;c[L>>2]=(c[L>>2]|0)+U;c[J>>2]=(c[J>>2]|0)-U;L=c[M>>2]|0;c[M>>2]=L-U;if((L|0)!=(U|0)){break}c[Q>>2]=c[A+8>>2]}}while(0);if((c[(c[o>>2]|0)+16>>2]|0)==0){z=195;break c}}if((f|0)==0){z=195;break}c[i+5812>>2]=0;if(m){l=c[w>>2]|0;if((l|0)>-1){pa=(c[x>>2]|0)+l|0}else{pa=0}Og(i,pa,(c[H>>2]|0)-l|0,1);c[w>>2]=c[H>>2];l=c[o>>2]|0;K=c[l+28>>2]|0;Mg(K);v=K+20|0;t=c[v>>2]|0;I=l+16|0;A=c[I>>2]|0;U=t>>>0>A>>>0?A:t;do{if((U|0)!=0){t=l+12|0;A=K+16|0;tF(c[t>>2]|0,c[A>>2]|0,U)|0;c[t>>2]=(c[t>>2]|0)+U;c[A>>2]=(c[A>>2]|0)+U;t=l+20|0;c[t>>2]=(c[t>>2]|0)+U;c[I>>2]=(c[I>>2]|0)-U;t=c[v>>2]|0;c[v>>2]=t-U;if((t|0)!=(U|0)){break}c[A>>2]=c[K+8>>2]}}while(0);qa=(c[(c[o>>2]|0)+16>>2]|0)==0?2:3;z=192;break}if((c[u>>2]|0)==0){break}K=c[w>>2]|0;if((K|0)>-1){ra=(c[x>>2]|0)+K|0}else{ra=0}Og(i,ra,(c[H>>2]|0)-K|0,0);c[w>>2]=c[H>>2];K=c[o>>2]|0;U=c[K+28>>2]|0;Mg(U);v=U+20|0;I=c[v>>2]|0;l=K+16|0;A=c[l>>2]|0;t=I>>>0>A>>>0?A:I;do{if((t|0)!=0){I=K+12|0;A=U+16|0;tF(c[I>>2]|0,c[A>>2]|0,t)|0;c[I>>2]=(c[I>>2]|0)+t;c[A>>2]=(c[A>>2]|0)+t;I=K+20|0;c[I>>2]=(c[I>>2]|0)+t;c[l>>2]=(c[l>>2]|0)-t;I=c[v>>2]|0;c[v>>2]=I-t;if((I|0)!=(t|0)){break}c[A>>2]=c[U+8>>2]}}while(0);if((c[(c[o>>2]|0)+16>>2]|0)==0){z=195}}else if((q|0)==3){U=i+116|0;t=(f|0)==0;v=i+96|0;l=i+108|0;K=i+5792|0;H=i+5796|0;w=i+5784|0;x=i+2440+(d[169256]<<2)|0;u=i+5788|0;A=i+56|0;I=i+92|0;d:while(1){M=c[U>>2]|0;do{if(M>>>0<259>>>0){Cg(i);J=c[U>>2]|0;if(J>>>0<259>>>0&t){z=195;break c}if((J|0)==0){break d}c[v>>2]=0;if(J>>>0>2>>>0){sa=J;z=155;break}ta=c[l>>2]|0;z=170}else{c[v>>2]=0;sa=M;z=155}}while(0);do{if((z|0)==155){z=0;M=c[l>>2]|0;if((M|0)==0){ta=0;z=170;break}J=c[A>>2]|0;N=a[J+(M-1)|0]|0;if(N<<24>>24!=(a[J+M|0]|0)){ta=M;z=170;break}if(N<<24>>24!=(a[J+(M+1)|0]|0)){ta=M;z=170;break}Q=J+(M+2)|0;if(N<<24>>24!=(a[Q]|0)){ta=M;z=170;break}L=J+(M+258)|0;J=Q;while(1){Q=J+1|0;if(N<<24>>24!=(a[Q]|0)){ua=Q;break}Q=J+2|0;if(N<<24>>24!=(a[Q]|0)){ua=Q;break}Q=J+3|0;if(N<<24>>24!=(a[Q]|0)){ua=Q;break}Q=J+4|0;if(N<<24>>24!=(a[Q]|0)){ua=Q;break}Q=J+5|0;if(N<<24>>24!=(a[Q]|0)){ua=Q;break}Q=J+6|0;if(N<<24>>24!=(a[Q]|0)){ua=Q;break}Q=J+7|0;if(N<<24>>24!=(a[Q]|0)){ua=Q;break}Q=J+8|0;if(N<<24>>24==(a[Q]|0)&Q>>>0<L>>>0){J=Q}else{ua=Q;break}}J=ua-L+258|0;N=J>>>0>sa>>>0?sa:J;c[v>>2]=N;if(N>>>0<=2>>>0){ta=M;z=170;break}J=N+253|0;b[(c[H>>2]|0)+(c[K>>2]<<1)>>1]=1;N=c[K>>2]|0;c[K>>2]=N+1;a[(c[w>>2]|0)+N|0]=J;N=i+148+((d[169e3+(J&255)|0]|256)+1<<2)|0;b[N>>1]=(b[N>>1]|0)+1;b[x>>1]=(b[x>>1]|0)+1;N=(c[K>>2]|0)==((c[u>>2]|0)-1|0);J=c[v>>2]|0;c[U>>2]=(c[U>>2]|0)-J;Q=(c[l>>2]|0)+J|0;c[l>>2]=Q;c[v>>2]=0;if(N){va=Q}else{continue d}}}while(0);if((z|0)==170){z=0;Q=a[(c[A>>2]|0)+ta|0]|0;b[(c[H>>2]|0)+(c[K>>2]<<1)>>1]=0;N=c[K>>2]|0;c[K>>2]=N+1;a[(c[w>>2]|0)+N|0]=Q;N=i+148+((Q&255)<<2)|0;b[N>>1]=(b[N>>1]|0)+1;N=(c[K>>2]|0)==((c[u>>2]|0)-1|0);c[U>>2]=(c[U>>2]|0)-1;Q=(c[l>>2]|0)+1|0;c[l>>2]=Q;if(N){va=Q}else{continue}}Q=c[I>>2]|0;if((Q|0)>-1){wa=(c[A>>2]|0)+Q|0}else{wa=0}Og(i,wa,va-Q|0,0);c[I>>2]=c[l>>2];Q=c[o>>2]|0;N=c[Q+28>>2]|0;Mg(N);J=N+20|0;R=c[J>>2]|0;S=Q+16|0;T=c[S>>2]|0;xa=R>>>0>T>>>0?T:R;do{if((xa|0)!=0){R=Q+12|0;T=N+16|0;tF(c[R>>2]|0,c[T>>2]|0,xa)|0;c[R>>2]=(c[R>>2]|0)+xa;c[T>>2]=(c[T>>2]|0)+xa;R=Q+20|0;c[R>>2]=(c[R>>2]|0)+xa;c[S>>2]=(c[S>>2]|0)-xa;R=c[J>>2]|0;c[J>>2]=R-xa;if((R|0)!=(xa|0)){break}c[T>>2]=c[N+8>>2]}}while(0);if((c[(c[o>>2]|0)+16>>2]|0)==0){z=195;break c}}c[i+5812>>2]=0;if(m){U=c[I>>2]|0;if((U|0)>-1){ya=(c[A>>2]|0)+U|0}else{ya=0}Og(i,ya,(c[l>>2]|0)-U|0,1);c[I>>2]=c[l>>2];U=c[o>>2]|0;u=c[U+28>>2]|0;Mg(u);w=u+20|0;H=c[w>>2]|0;v=U+16|0;x=c[v>>2]|0;t=H>>>0>x>>>0?x:H;do{if((t|0)!=0){H=U+12|0;x=u+16|0;tF(c[H>>2]|0,c[x>>2]|0,t)|0;c[H>>2]=(c[H>>2]|0)+t;c[x>>2]=(c[x>>2]|0)+t;H=U+20|0;c[H>>2]=(c[H>>2]|0)+t;c[v>>2]=(c[v>>2]|0)-t;H=c[w>>2]|0;c[w>>2]=H-t;if((H|0)!=(t|0)){break}c[x>>2]=c[u+8>>2]}}while(0);qa=(c[(c[o>>2]|0)+16>>2]|0)==0?2:3;z=192;break}if((c[K>>2]|0)==0){break}u=c[I>>2]|0;if((u|0)>-1){za=(c[A>>2]|0)+u|0}else{za=0}Og(i,za,(c[l>>2]|0)-u|0,0);c[I>>2]=c[l>>2];u=c[o>>2]|0;t=c[u+28>>2]|0;Mg(t);w=t+20|0;v=c[w>>2]|0;U=u+16|0;x=c[U>>2]|0;H=v>>>0>x>>>0?x:v;do{if((H|0)!=0){v=u+12|0;x=t+16|0;tF(c[v>>2]|0,c[x>>2]|0,H)|0;c[v>>2]=(c[v>>2]|0)+H;c[x>>2]=(c[x>>2]|0)+H;v=u+20|0;c[v>>2]=(c[v>>2]|0)+H;c[U>>2]=(c[U>>2]|0)-H;v=c[w>>2]|0;c[w>>2]=v-H;if((v|0)!=(H|0)){break}c[x>>2]=c[t+8>>2]}}while(0);if((c[(c[o>>2]|0)+16>>2]|0)==0){z=195}}else{qa=Oc[c[40336+((c[i+132>>2]|0)*12|0)>>2]&255](i,f)|0;z=192}}while(0);do{if((z|0)==192){if((qa&-2|0)==2){c[k>>2]=666}if((qa&-3|0)==0){z=195;break}if((qa|0)!=1){break b}}}while(0);if((z|0)==195){if((c[n>>2]|0)!=0){g=0;return g|0}c[p>>2]=-1;g=0;return g|0}do{if((f|0)==1){Ng(i)}else if((f|0)!=5){Lg(i,0,0,0);if((f|0)!=3){break}q=i+76|0;P=i+68|0;b[(c[P>>2]|0)+((c[q>>2]|0)-1<<1)>>1]=0;vF(c[P>>2]|0,0,(c[q>>2]<<1)-2|0)|0;if((c[i+116>>2]|0)!=0){break}c[i+108>>2]=0;c[i+92>>2]=0;c[i+5812>>2]=0}}while(0);q=c[h>>2]|0;Mg(q);P=q+20|0;O=c[P>>2]|0;t=c[n>>2]|0;H=O>>>0>t>>>0?t:O;if((H|0)==0){Aa=t}else{t=q+16|0;tF(c[j>>2]|0,c[t>>2]|0,H)|0;c[j>>2]=(c[j>>2]|0)+H;c[t>>2]=(c[t>>2]|0)+H;O=e+20|0;c[O>>2]=(c[O>>2]|0)+H;c[n>>2]=(c[n>>2]|0)-H;O=c[P>>2]|0;c[P>>2]=O-H;if((O|0)==(H|0)){c[t>>2]=c[q+8>>2]}Aa=c[n>>2]|0}if((Aa|0)!=0){break}c[p>>2]=-1;g=0;return g|0}}while(0);if(!m){g=0;return g|0}p=i+24|0;k=c[p>>2]|0;if((k|0)<1){g=1;return g|0}o=e+48|0;q=c[o>>2]|0;if((k|0)==2){k=c[r>>2]|0;c[r>>2]=k+1;t=i+8|0;a[(c[t>>2]|0)+k|0]=q;k=(c[o>>2]|0)>>>8&255;H=c[r>>2]|0;c[r>>2]=H+1;a[(c[t>>2]|0)+H|0]=k;k=(c[o>>2]|0)>>>16&255;H=c[r>>2]|0;c[r>>2]=H+1;a[(c[t>>2]|0)+H|0]=k;k=(c[o>>2]|0)>>>24&255;H=c[r>>2]|0;c[r>>2]=H+1;a[(c[t>>2]|0)+H|0]=k;k=e+8|0;H=c[k>>2]&255;O=c[r>>2]|0;c[r>>2]=O+1;a[(c[t>>2]|0)+O|0]=H;H=(c[k>>2]|0)>>>8&255;O=c[r>>2]|0;c[r>>2]=O+1;a[(c[t>>2]|0)+O|0]=H;H=(c[k>>2]|0)>>>16&255;O=c[r>>2]|0;c[r>>2]=O+1;a[(c[t>>2]|0)+O|0]=H;H=(c[k>>2]|0)>>>24&255;k=c[r>>2]|0;c[r>>2]=k+1;a[(c[t>>2]|0)+k|0]=H}else{H=c[r>>2]|0;c[r>>2]=H+1;k=i+8|0;a[(c[k>>2]|0)+H|0]=q>>>24;H=c[r>>2]|0;c[r>>2]=H+1;a[(c[k>>2]|0)+H|0]=q>>>16;q=c[o>>2]|0;o=c[r>>2]|0;c[r>>2]=o+1;a[(c[k>>2]|0)+o|0]=q>>>8;o=c[r>>2]|0;c[r>>2]=o+1;a[(c[k>>2]|0)+o|0]=q}q=c[h>>2]|0;Mg(q);o=q+20|0;k=c[o>>2]|0;H=c[n>>2]|0;t=k>>>0>H>>>0?H:k;do{if((t|0)!=0){k=q+16|0;tF(c[j>>2]|0,c[k>>2]|0,t)|0;c[j>>2]=(c[j>>2]|0)+t;c[k>>2]=(c[k>>2]|0)+t;H=e+20|0;c[H>>2]=(c[H>>2]|0)+t;c[n>>2]=(c[n>>2]|0)-t;H=c[o>>2]|0;c[o>>2]=H-t;if((H|0)!=(t|0)){break}c[k>>2]=c[q+8>>2]}}while(0);q=c[p>>2]|0;if((q|0)>0){c[p>>2]=-q}g=(c[r>>2]|0)==0|0;return g|0}}while(0);c[e+24>>2]=c[10];g=-2;return g|0}function Fg(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;d=(c[a+12>>2]|0)-5|0;e=d>>>0<65535>>>0?d:65535;d=a+116|0;f=a+108|0;g=a+92|0;h=a+44|0;i=a+56|0;j=a|0;while(1){k=c[d>>2]|0;if(k>>>0<2>>>0){Cg(a);l=c[d>>2]|0;if((l|b|0)==0){m=0;n=35;break}if((l|0)==0){n=20;break}else{o=l}}else{o=k}k=(c[f>>2]|0)+o|0;c[f>>2]=k;c[d>>2]=0;l=c[g>>2]|0;p=l+e|0;if((k|0)!=0&k>>>0<p>>>0){q=k;r=l}else{c[d>>2]=k-p;c[f>>2]=p;if((l|0)>-1){s=(c[i>>2]|0)+l|0}else{s=0}Og(a,s,e,0);c[g>>2]=c[f>>2];l=c[j>>2]|0;p=c[l+28>>2]|0;Mg(p);k=p+20|0;t=c[k>>2]|0;u=l+16|0;v=c[u>>2]|0;w=t>>>0>v>>>0?v:t;do{if((w|0)!=0){t=l+12|0;v=p+16|0;tF(c[t>>2]|0,c[v>>2]|0,w)|0;c[t>>2]=(c[t>>2]|0)+w;c[v>>2]=(c[v>>2]|0)+w;t=l+20|0;c[t>>2]=(c[t>>2]|0)+w;c[u>>2]=(c[u>>2]|0)-w;t=c[k>>2]|0;c[k>>2]=t-w;if((t|0)!=(w|0)){break}c[v>>2]=c[p+8>>2]}}while(0);if((c[(c[j>>2]|0)+16>>2]|0)==0){m=0;n=35;break}q=c[f>>2]|0;r=c[g>>2]|0}p=q-r|0;if(p>>>0<((c[h>>2]|0)-262|0)>>>0){continue}if((r|0)>-1){x=(c[i>>2]|0)+r|0}else{x=0}Og(a,x,p,0);c[g>>2]=c[f>>2];p=c[j>>2]|0;w=c[p+28>>2]|0;Mg(w);k=w+20|0;u=c[k>>2]|0;l=p+16|0;v=c[l>>2]|0;t=u>>>0>v>>>0?v:u;do{if((t|0)!=0){u=p+12|0;v=w+16|0;tF(c[u>>2]|0,c[v>>2]|0,t)|0;c[u>>2]=(c[u>>2]|0)+t;c[v>>2]=(c[v>>2]|0)+t;u=p+20|0;c[u>>2]=(c[u>>2]|0)+t;c[l>>2]=(c[l>>2]|0)-t;u=c[k>>2]|0;c[k>>2]=u-t;if((u|0)!=(t|0)){break}c[v>>2]=c[w+8>>2]}}while(0);if((c[(c[j>>2]|0)+16>>2]|0)==0){m=0;n=35;break}}if((n|0)==20){c[a+5812>>2]=0;if((b|0)==4){b=c[g>>2]|0;if((b|0)>-1){y=(c[i>>2]|0)+b|0}else{y=0}Og(a,y,(c[f>>2]|0)-b|0,1);c[g>>2]=c[f>>2];b=c[j>>2]|0;y=c[b+28>>2]|0;Mg(y);x=y+20|0;r=c[x>>2]|0;h=b+16|0;q=c[h>>2]|0;e=r>>>0>q>>>0?q:r;do{if((e|0)!=0){r=b+12|0;q=y+16|0;tF(c[r>>2]|0,c[q>>2]|0,e)|0;c[r>>2]=(c[r>>2]|0)+e;c[q>>2]=(c[q>>2]|0)+e;r=b+20|0;c[r>>2]=(c[r>>2]|0)+e;c[h>>2]=(c[h>>2]|0)-e;r=c[x>>2]|0;c[x>>2]=r-e;if((r|0)!=(e|0)){break}c[q>>2]=c[y+8>>2]}}while(0);m=(c[(c[j>>2]|0)+16>>2]|0)==0?2:3;return m|0}y=c[f>>2]|0;e=c[g>>2]|0;do{if((y|0)>(e|0)){if((e|0)>-1){z=(c[i>>2]|0)+e|0}else{z=0}Og(a,z,y-e|0,0);c[g>>2]=c[f>>2];x=c[j>>2]|0;h=c[x+28>>2]|0;Mg(h);b=h+20|0;q=c[b>>2]|0;r=x+16|0;s=c[r>>2]|0;d=q>>>0>s>>>0?s:q;do{if((d|0)!=0){q=x+12|0;s=h+16|0;tF(c[q>>2]|0,c[s>>2]|0,d)|0;c[q>>2]=(c[q>>2]|0)+d;c[s>>2]=(c[s>>2]|0)+d;q=x+20|0;c[q>>2]=(c[q>>2]|0)+d;c[r>>2]=(c[r>>2]|0)-d;q=c[b>>2]|0;c[b>>2]=q-d;if((q|0)!=(d|0)){break}c[s>>2]=c[h+8>>2]}}while(0);if((c[(c[j>>2]|0)+16>>2]|0)==0){m=0}else{break}return m|0}}while(0);m=1;return m|0}else if((n|0)==35){return m|0}return 0}function Gg(e,f){e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0;g=e+116|0;h=(f|0)==0;i=e+72|0;j=e+88|0;k=e+108|0;l=e+56|0;m=e+84|0;n=e+68|0;o=e+52|0;p=e+64|0;q=e+44|0;r=e+96|0;s=e+112|0;t=e+5792|0;u=e+5796|0;v=e+5784|0;w=e+5788|0;x=e+128|0;y=e+92|0;z=e|0;while(1){if((c[g>>2]|0)>>>0<262>>>0){Cg(e);A=c[g>>2]|0;if(A>>>0<262>>>0&h){B=0;C=41;break}if((A|0)==0){C=26;break}if(A>>>0>2>>>0){C=6}else{C=9}}else{C=6}do{if((C|0)==6){C=0;A=c[k>>2]|0;D=((d[(c[l>>2]|0)+(A+2)|0]|0)^c[i>>2]<<c[j>>2])&c[m>>2];c[i>>2]=D;E=b[(c[n>>2]|0)+(D<<1)>>1]|0;b[(c[p>>2]|0)+((c[o>>2]&A)<<1)>>1]=E;A=E&65535;b[(c[n>>2]|0)+(c[i>>2]<<1)>>1]=c[k>>2];if(E<<16>>16==0){C=9;break}if(((c[k>>2]|0)-A|0)>>>0>((c[q>>2]|0)-262|0)>>>0){C=9;break}E=Ig(e,A)|0;c[r>>2]=E;F=E}}while(0);if((C|0)==9){C=0;F=c[r>>2]|0}do{if(F>>>0>2>>>0){E=F+253|0;A=(c[k>>2]|0)-(c[s>>2]|0)&65535;b[(c[u>>2]|0)+(c[t>>2]<<1)>>1]=A;D=c[t>>2]|0;c[t>>2]=D+1;a[(c[v>>2]|0)+D|0]=E;D=A-1&65535;A=e+148+((d[169e3+(E&255)|0]|0|256)+1<<2)|0;b[A>>1]=(b[A>>1]|0)+1;A=D&65535;if((D&65535)>>>0<256>>>0){G=A}else{G=(A>>>7)+256|0}A=e+2440+((d[169256+G|0]|0)<<2)|0;b[A>>1]=(b[A>>1]|0)+1;A=(c[t>>2]|0)==((c[w>>2]|0)-1|0)|0;D=c[r>>2]|0;E=(c[g>>2]|0)-D|0;c[g>>2]=E;if(!(D>>>0<=(c[x>>2]|0)>>>0&E>>>0>2>>>0)){E=(c[k>>2]|0)+D|0;c[k>>2]=E;c[r>>2]=0;H=c[l>>2]|0;I=d[H+E|0]|0;c[i>>2]=I;c[i>>2]=((d[H+(E+1)|0]|0)^I<<c[j>>2])&c[m>>2];J=A;K=E;break}c[r>>2]=D-1;do{D=c[k>>2]|0;E=D+1|0;c[k>>2]=E;I=((d[(c[l>>2]|0)+(D+3)|0]|0)^c[i>>2]<<c[j>>2])&c[m>>2];c[i>>2]=I;b[(c[p>>2]|0)+((c[o>>2]&E)<<1)>>1]=b[(c[n>>2]|0)+(I<<1)>>1]|0;b[(c[n>>2]|0)+(c[i>>2]<<1)>>1]=c[k>>2];I=(c[r>>2]|0)-1|0;c[r>>2]=I;}while((I|0)!=0);I=(c[k>>2]|0)+1|0;c[k>>2]=I;J=A;K=I}else{I=a[(c[l>>2]|0)+(c[k>>2]|0)|0]|0;b[(c[u>>2]|0)+(c[t>>2]<<1)>>1]=0;E=c[t>>2]|0;c[t>>2]=E+1;a[(c[v>>2]|0)+E|0]=I;E=e+148+((I&255)<<2)|0;b[E>>1]=(b[E>>1]|0)+1;E=(c[t>>2]|0)==((c[w>>2]|0)-1|0)|0;c[g>>2]=(c[g>>2]|0)-1;I=(c[k>>2]|0)+1|0;c[k>>2]=I;J=E;K=I}}while(0);if((J|0)==0){continue}I=c[y>>2]|0;if((I|0)>-1){L=(c[l>>2]|0)+I|0}else{L=0}Og(e,L,K-I|0,0);c[y>>2]=c[k>>2];I=c[z>>2]|0;E=c[I+28>>2]|0;Mg(E);D=E+20|0;H=c[D>>2]|0;M=I+16|0;N=c[M>>2]|0;O=H>>>0>N>>>0?N:H;do{if((O|0)!=0){H=I+12|0;N=E+16|0;tF(c[H>>2]|0,c[N>>2]|0,O)|0;c[H>>2]=(c[H>>2]|0)+O;c[N>>2]=(c[N>>2]|0)+O;H=I+20|0;c[H>>2]=(c[H>>2]|0)+O;c[M>>2]=(c[M>>2]|0)-O;H=c[D>>2]|0;c[D>>2]=H-O;if((H|0)!=(O|0)){break}c[N>>2]=c[E+8>>2]}}while(0);if((c[(c[z>>2]|0)+16>>2]|0)==0){B=0;C=41;break}}if((C|0)==26){K=c[k>>2]|0;c[e+5812>>2]=K>>>0<2>>>0?K:2;if((f|0)==4){f=c[y>>2]|0;if((f|0)>-1){P=(c[l>>2]|0)+f|0}else{P=0}Og(e,P,K-f|0,1);c[y>>2]=c[k>>2];f=c[z>>2]|0;P=c[f+28>>2]|0;Mg(P);L=P+20|0;J=c[L>>2]|0;g=f+16|0;w=c[g>>2]|0;v=J>>>0>w>>>0?w:J;do{if((v|0)!=0){J=f+12|0;w=P+16|0;tF(c[J>>2]|0,c[w>>2]|0,v)|0;c[J>>2]=(c[J>>2]|0)+v;c[w>>2]=(c[w>>2]|0)+v;J=f+20|0;c[J>>2]=(c[J>>2]|0)+v;c[g>>2]=(c[g>>2]|0)-v;J=c[L>>2]|0;c[L>>2]=J-v;if((J|0)!=(v|0)){break}c[w>>2]=c[P+8>>2]}}while(0);B=(c[(c[z>>2]|0)+16>>2]|0)==0?2:3;return B|0}do{if((c[t>>2]|0)!=0){P=c[y>>2]|0;if((P|0)>-1){Q=(c[l>>2]|0)+P|0}else{Q=0}Og(e,Q,K-P|0,0);c[y>>2]=c[k>>2];P=c[z>>2]|0;v=c[P+28>>2]|0;Mg(v);L=v+20|0;g=c[L>>2]|0;f=P+16|0;w=c[f>>2]|0;J=g>>>0>w>>>0?w:g;do{if((J|0)!=0){g=P+12|0;w=v+16|0;tF(c[g>>2]|0,c[w>>2]|0,J)|0;c[g>>2]=(c[g>>2]|0)+J;c[w>>2]=(c[w>>2]|0)+J;g=P+20|0;c[g>>2]=(c[g>>2]|0)+J;c[f>>2]=(c[f>>2]|0)-J;g=c[L>>2]|0;c[L>>2]=g-J;if((g|0)!=(J|0)){break}c[w>>2]=c[v+8>>2]}}while(0);if((c[(c[z>>2]|0)+16>>2]|0)==0){B=0}else{break}return B|0}}while(0);B=1;return B|0}else if((C|0)==41){return B|0}return 0}function Hg(e,f){e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0;g=e+116|0;h=(f|0)==0;i=e+72|0;j=e+88|0;k=e+108|0;l=e+56|0;m=e+84|0;n=e+68|0;o=e+52|0;p=e+64|0;q=e+96|0;r=e+120|0;s=e+112|0;t=e+100|0;u=e+5792|0;v=e+5796|0;w=e+5784|0;x=e+5788|0;y=e+104|0;z=e+92|0;A=e|0;B=e+128|0;C=e+44|0;D=e+136|0;a:while(1){E=c[g>>2]|0;while(1){do{if(E>>>0<262>>>0){Cg(e);F=c[g>>2]|0;if(F>>>0<262>>>0&h){G=0;H=57;break a}if((F|0)==0){H=40;break a}if(F>>>0>2>>>0){H=8;break}c[r>>2]=c[q>>2];c[t>>2]=c[s>>2];c[q>>2]=2;I=2;H=16}else{H=8}}while(0);do{if((H|0)==8){H=0;F=c[k>>2]|0;J=((d[(c[l>>2]|0)+(F+2)|0]|0)^c[i>>2]<<c[j>>2])&c[m>>2];c[i>>2]=J;K=b[(c[n>>2]|0)+(J<<1)>>1]|0;b[(c[p>>2]|0)+((c[o>>2]&F)<<1)>>1]=K;F=K&65535;b[(c[n>>2]|0)+(c[i>>2]<<1)>>1]=c[k>>2];J=c[q>>2]|0;c[r>>2]=J;c[t>>2]=c[s>>2];c[q>>2]=2;if(K<<16>>16==0){I=2;H=16;break}if(J>>>0>=(c[B>>2]|0)>>>0){L=J;M=2;break}if(((c[k>>2]|0)-F|0)>>>0>((c[C>>2]|0)-262|0)>>>0){I=2;H=16;break}J=Ig(e,F)|0;c[q>>2]=J;if(J>>>0>=6>>>0){I=J;H=16;break}if((c[D>>2]|0)!=1){if((J|0)!=3){I=J;H=16;break}if(((c[k>>2]|0)-(c[s>>2]|0)|0)>>>0<=4096>>>0){I=3;H=16;break}}c[q>>2]=2;I=2;H=16}}while(0);if((H|0)==16){H=0;L=c[r>>2]|0;M=I}if(!(L>>>0<3>>>0|M>>>0>L>>>0)){break}if((c[y>>2]|0)==0){c[y>>2]=1;c[k>>2]=(c[k>>2]|0)+1;J=(c[g>>2]|0)-1|0;c[g>>2]=J;E=J;continue}J=a[(c[l>>2]|0)+((c[k>>2]|0)-1)|0]|0;b[(c[v>>2]|0)+(c[u>>2]<<1)>>1]=0;F=c[u>>2]|0;c[u>>2]=F+1;a[(c[w>>2]|0)+F|0]=J;F=e+148+((J&255)<<2)|0;b[F>>1]=(b[F>>1]|0)+1;do{if((c[u>>2]|0)==((c[x>>2]|0)-1|0)){F=c[z>>2]|0;if((F|0)>-1){N=(c[l>>2]|0)+F|0}else{N=0}Og(e,N,(c[k>>2]|0)-F|0,0);c[z>>2]=c[k>>2];F=c[A>>2]|0;J=c[F+28>>2]|0;Mg(J);K=J+20|0;O=c[K>>2]|0;P=F+16|0;Q=c[P>>2]|0;R=O>>>0>Q>>>0?Q:O;if((R|0)==0){break}O=F+12|0;Q=J+16|0;tF(c[O>>2]|0,c[Q>>2]|0,R)|0;c[O>>2]=(c[O>>2]|0)+R;c[Q>>2]=(c[Q>>2]|0)+R;O=F+20|0;c[O>>2]=(c[O>>2]|0)+R;c[P>>2]=(c[P>>2]|0)-R;P=c[K>>2]|0;c[K>>2]=P-R;if((P|0)!=(R|0)){break}c[Q>>2]=c[J+8>>2]}}while(0);c[k>>2]=(c[k>>2]|0)+1;J=(c[g>>2]|0)-1|0;c[g>>2]=J;if((c[(c[A>>2]|0)+16>>2]|0)==0){G=0;H=57;break a}else{E=J}}E=c[k>>2]|0;J=E-3+(c[g>>2]|0)|0;Q=L+253|0;R=E+65535-(c[t>>2]|0)&65535;b[(c[v>>2]|0)+(c[u>>2]<<1)>>1]=R;E=c[u>>2]|0;c[u>>2]=E+1;a[(c[w>>2]|0)+E|0]=Q;E=R-1&65535;R=e+148+((d[169e3+(Q&255)|0]|0|256)+1<<2)|0;b[R>>1]=(b[R>>1]|0)+1;R=E&65535;if((E&65535)>>>0<256>>>0){S=R}else{S=(R>>>7)+256|0}R=e+2440+((d[169256+S|0]|0)<<2)|0;b[R>>1]=(b[R>>1]|0)+1;R=c[u>>2]|0;E=(c[x>>2]|0)-1|0;Q=c[r>>2]|0;c[g>>2]=1-Q+(c[g>>2]|0);P=Q-2|0;c[r>>2]=P;Q=P;do{P=c[k>>2]|0;K=P+1|0;c[k>>2]=K;if(K>>>0>J>>>0){T=Q}else{O=((d[(c[l>>2]|0)+(P+3)|0]|0)^c[i>>2]<<c[j>>2])&c[m>>2];c[i>>2]=O;b[(c[p>>2]|0)+((c[o>>2]&K)<<1)>>1]=b[(c[n>>2]|0)+(O<<1)>>1]|0;b[(c[n>>2]|0)+(c[i>>2]<<1)>>1]=c[k>>2];T=c[r>>2]|0}Q=T-1|0;c[r>>2]=Q;}while((Q|0)!=0);c[y>>2]=0;c[q>>2]=2;Q=(c[k>>2]|0)+1|0;c[k>>2]=Q;if((R|0)!=(E|0)){continue}J=c[z>>2]|0;if((J|0)>-1){U=(c[l>>2]|0)+J|0}else{U=0}Og(e,U,Q-J|0,0);c[z>>2]=c[k>>2];J=c[A>>2]|0;Q=c[J+28>>2]|0;Mg(Q);O=Q+20|0;K=c[O>>2]|0;P=J+16|0;F=c[P>>2]|0;V=K>>>0>F>>>0?F:K;do{if((V|0)!=0){K=J+12|0;F=Q+16|0;tF(c[K>>2]|0,c[F>>2]|0,V)|0;c[K>>2]=(c[K>>2]|0)+V;c[F>>2]=(c[F>>2]|0)+V;K=J+20|0;c[K>>2]=(c[K>>2]|0)+V;c[P>>2]=(c[P>>2]|0)-V;K=c[O>>2]|0;c[O>>2]=K-V;if((K|0)!=(V|0)){break}c[F>>2]=c[Q+8>>2]}}while(0);if((c[(c[A>>2]|0)+16>>2]|0)==0){G=0;H=57;break}}if((H|0)==40){if((c[y>>2]|0)!=0){U=a[(c[l>>2]|0)+((c[k>>2]|0)-1)|0]|0;b[(c[v>>2]|0)+(c[u>>2]<<1)>>1]=0;v=c[u>>2]|0;c[u>>2]=v+1;a[(c[w>>2]|0)+v|0]=U;v=e+148+((U&255)<<2)|0;b[v>>1]=(b[v>>1]|0)+1;c[y>>2]=0}y=c[k>>2]|0;c[e+5812>>2]=y>>>0<2>>>0?y:2;if((f|0)==4){f=c[z>>2]|0;if((f|0)>-1){W=(c[l>>2]|0)+f|0}else{W=0}Og(e,W,y-f|0,1);c[z>>2]=c[k>>2];f=c[A>>2]|0;W=c[f+28>>2]|0;Mg(W);v=W+20|0;U=c[v>>2]|0;w=f+16|0;q=c[w>>2]|0;r=U>>>0>q>>>0?q:U;do{if((r|0)!=0){U=f+12|0;q=W+16|0;tF(c[U>>2]|0,c[q>>2]|0,r)|0;c[U>>2]=(c[U>>2]|0)+r;c[q>>2]=(c[q>>2]|0)+r;U=f+20|0;c[U>>2]=(c[U>>2]|0)+r;c[w>>2]=(c[w>>2]|0)-r;U=c[v>>2]|0;c[v>>2]=U-r;if((U|0)!=(r|0)){break}c[q>>2]=c[W+8>>2]}}while(0);G=(c[(c[A>>2]|0)+16>>2]|0)==0?2:3;return G|0}do{if((c[u>>2]|0)!=0){W=c[z>>2]|0;if((W|0)>-1){X=(c[l>>2]|0)+W|0}else{X=0}Og(e,X,y-W|0,0);c[z>>2]=c[k>>2];W=c[A>>2]|0;r=c[W+28>>2]|0;Mg(r);v=r+20|0;w=c[v>>2]|0;f=W+16|0;q=c[f>>2]|0;U=w>>>0>q>>>0?q:w;do{if((U|0)!=0){w=W+12|0;q=r+16|0;tF(c[w>>2]|0,c[q>>2]|0,U)|0;c[w>>2]=(c[w>>2]|0)+U;c[q>>2]=(c[q>>2]|0)+U;w=W+20|0;c[w>>2]=(c[w>>2]|0)+U;c[f>>2]=(c[f>>2]|0)-U;w=c[v>>2]|0;c[v>>2]=w-U;if((w|0)!=(U|0)){break}c[q>>2]=c[r+8>>2]}}while(0);if((c[(c[A>>2]|0)+16>>2]|0)==0){G=0}else{break}return G|0}}while(0);G=1;return G|0}else if((H|0)==57){return G|0}return 0}function Ig(b,d){b=b|0;d=d|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;f=c[b+124>>2]|0;g=c[b+56>>2]|0;h=c[b+108>>2]|0;i=g+h|0;j=c[b+120>>2]|0;k=c[b+144>>2]|0;l=(c[b+44>>2]|0)-262|0;m=h>>>0>l>>>0?h-l|0:0;l=c[b+64>>2]|0;n=c[b+52>>2]|0;o=g+(h+258)|0;p=c[b+116>>2]|0;q=k>>>0>p>>>0?p:k;k=b+112|0;r=g+(h+1)|0;s=g+(h+2)|0;t=o;u=h+257|0;v=a[g+(j+h)|0]|0;w=a[g+(h-1+j)|0]|0;x=d;d=j>>>0<(c[b+140>>2]|0)>>>0?f:f>>>2;f=j;a:while(1){j=g+x|0;do{if((a[g+(x+f)|0]|0)==v<<24>>24){if((a[g+(f-1+x)|0]|0)!=w<<24>>24){y=v;z=w;A=f;break}if((a[j]|0)!=(a[i]|0)){y=v;z=w;A=f;break}if((a[g+(x+1)|0]|0)!=(a[r]|0)){y=v;z=w;A=f;break}b=s;B=g+(x+2)|0;while(1){C=b+1|0;if((a[C]|0)!=(a[B+1|0]|0)){D=C;break}C=b+2|0;if((a[C]|0)!=(a[B+2|0]|0)){D=C;break}C=b+3|0;if((a[C]|0)!=(a[B+3|0]|0)){D=C;break}C=b+4|0;if((a[C]|0)!=(a[B+4|0]|0)){D=C;break}C=b+5|0;if((a[C]|0)!=(a[B+5|0]|0)){D=C;break}C=b+6|0;if((a[C]|0)!=(a[B+6|0]|0)){D=C;break}C=b+7|0;if((a[C]|0)!=(a[B+7|0]|0)){D=C;break}C=b+8|0;E=B+8|0;if((a[C]|0)==(a[E]|0)&C>>>0<o>>>0){b=C;B=E}else{D=C;break}}B=D-t|0;b=B+258|0;if((b|0)<=(f|0)){y=v;z=w;A=f;break}c[k>>2]=x;if((b|0)>=(q|0)){F=b;G=20;break a}y=a[g+(b+h)|0]|0;z=a[g+(u+B)|0]|0;A=b}else{y=v;z=w;A=f}}while(0);j=e[l+((x&n)<<1)>>1]|0;if(j>>>0<=m>>>0){F=A;G=20;break}b=d-1|0;if((b|0)==0){F=A;G=20;break}else{v=y;w=z;x=j;d=b;f=A}}if((G|0)==20){return(F>>>0>p>>>0?p:F)|0}return 0}function Jg(a){a=a|0;c[a+2840>>2]=a+148;c[a+2848>>2]=11576;c[a+2852>>2]=a+2440;c[a+2860>>2]=11720;c[a+2864>>2]=a+2684;c[a+2872>>2]=11744;b[a+5816>>1]=0;c[a+5820>>2]=0;Kg(a);return}function Kg(a){a=a|0;var d=0;d=0;do{b[a+148+(d<<2)>>1]=0;d=d+1|0;}while((d|0)<286);b[a+2440>>1]=0;b[a+2444>>1]=0;b[a+2448>>1]=0;b[a+2452>>1]=0;b[a+2456>>1]=0;b[a+2460>>1]=0;b[a+2464>>1]=0;b[a+2468>>1]=0;b[a+2472>>1]=0;b[a+2476>>1]=0;b[a+2480>>1]=0;b[a+2484>>1]=0;b[a+2488>>1]=0;b[a+2492>>1]=0;b[a+2496>>1]=0;b[a+2500>>1]=0;b[a+2504>>1]=0;b[a+2508>>1]=0;b[a+2512>>1]=0;b[a+2516>>1]=0;b[a+2520>>1]=0;b[a+2524>>1]=0;b[a+2528>>1]=0;b[a+2532>>1]=0;b[a+2536>>1]=0;b[a+2540>>1]=0;b[a+2544>>1]=0;b[a+2548>>1]=0;b[a+2552>>1]=0;b[a+2556>>1]=0;b[a+2684>>1]=0;b[a+2688>>1]=0;b[a+2692>>1]=0;b[a+2696>>1]=0;b[a+2700>>1]=0;b[a+2704>>1]=0;b[a+2708>>1]=0;b[a+2712>>1]=0;b[a+2716>>1]=0;b[a+2720>>1]=0;b[a+2724>>1]=0;b[a+2728>>1]=0;b[a+2732>>1]=0;b[a+2736>>1]=0;b[a+2740>>1]=0;b[a+2744>>1]=0;b[a+2748>>1]=0;b[a+2752>>1]=0;b[a+2756>>1]=0;b[a+1172>>1]=1;c[a+5804>>2]=0;c[a+5800>>2]=0;c[a+5808>>2]=0;c[a+5792>>2]=0;return}function Lg(d,f,g,h){d=d|0;f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;i=d+5820|0;j=c[i>>2]|0;k=h&65535;h=d+5816|0;l=e[h>>1]|0|k<<j;b[h>>1]=l;if((j|0)>13){m=d+20|0;n=c[m>>2]|0;c[m>>2]=n+1;o=d+8|0;a[(c[o>>2]|0)+n|0]=l;n=(e[h>>1]|0)>>>8&255;p=c[m>>2]|0;c[m>>2]=p+1;a[(c[o>>2]|0)+p|0]=n;n=c[i>>2]|0;p=k>>>((16-n|0)>>>0);b[h>>1]=p;q=n-13|0;r=p&255}else{q=j+3|0;r=l&255}c[i>>2]=q;do{if((q|0)>8){l=d+20|0;j=c[l>>2]|0;c[l>>2]=j+1;p=d+8|0;a[(c[p>>2]|0)+j|0]=r;j=(e[h>>1]|0)>>>8&255;n=c[l>>2]|0;c[l>>2]=n+1;a[(c[p>>2]|0)+n|0]=j;s=l;t=p}else{p=d+20|0;if((q|0)>0){l=c[p>>2]|0;c[p>>2]=l+1;j=d+8|0;a[(c[j>>2]|0)+l|0]=r;s=p;t=j;break}else{s=p;t=d+8|0;break}}}while(0);b[h>>1]=0;c[i>>2]=0;i=c[s>>2]|0;c[s>>2]=i+1;a[(c[t>>2]|0)+i|0]=g;i=c[s>>2]|0;c[s>>2]=i+1;a[(c[t>>2]|0)+i|0]=g>>>8;i=g&65535^65535;h=c[s>>2]|0;c[s>>2]=h+1;a[(c[t>>2]|0)+h|0]=i;h=c[s>>2]|0;c[s>>2]=h+1;a[(c[t>>2]|0)+h|0]=i>>>8;if((g|0)==0){return}else{u=g;v=f}while(1){f=u-1|0;g=a[v]|0;i=c[s>>2]|0;c[s>>2]=i+1;a[(c[t>>2]|0)+i|0]=g;if((f|0)==0){break}else{u=f;v=v+1|0}}return}function Mg(d){d=d|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0;f=d+5820|0;g=c[f>>2]|0;if((g|0)==16){h=d+5816|0;i=b[h>>1]&255;j=d+20|0;k=c[j>>2]|0;c[j>>2]=k+1;l=d+8|0;a[(c[l>>2]|0)+k|0]=i;i=(e[h>>1]|0)>>>8&255;k=c[j>>2]|0;c[j>>2]=k+1;a[(c[l>>2]|0)+k|0]=i;b[h>>1]=0;c[f>>2]=0;return}if((g|0)<=7){return}g=d+5816|0;h=b[g>>1]&255;i=d+20|0;k=c[i>>2]|0;c[i>>2]=k+1;a[(c[d+8>>2]|0)+k|0]=h;b[g>>1]=(e[g>>1]|0)>>>8;c[f>>2]=(c[f>>2]|0)-8;return}function Ng(d){d=d|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;f=d+5820|0;g=c[f>>2]|0;h=d+5816|0;i=e[h>>1]|0|2<<g;b[h>>1]=i;if((g|0)>13){j=d+20|0;k=c[j>>2]|0;c[j>>2]=k+1;l=d+8|0;a[(c[l>>2]|0)+k|0]=i;k=(e[h>>1]|0)>>>8&255;m=c[j>>2]|0;c[j>>2]=m+1;a[(c[l>>2]|0)+m|0]=k;k=c[f>>2]|0;m=2>>>((16-k|0)>>>0);b[h>>1]=m;n=k-13|0;o=m&255}else{n=g+3|0;o=i&255}c[f>>2]=n;if((n|0)>9){i=d+20|0;g=c[i>>2]|0;c[i>>2]=g+1;m=d+8|0;a[(c[m>>2]|0)+g|0]=o;g=(e[h>>1]|0)>>>8&255;k=c[i>>2]|0;c[i>>2]=k+1;a[(c[m>>2]|0)+k|0]=g;b[h>>1]=0;p=(c[f>>2]|0)-9|0;q=0}else{p=n+7|0;q=o}c[f>>2]=p;if((p|0)==16){o=d+20|0;n=c[o>>2]|0;c[o>>2]=n+1;g=d+8|0;a[(c[g>>2]|0)+n|0]=q;n=(e[h>>1]|0)>>>8&255;k=c[o>>2]|0;c[o>>2]=k+1;a[(c[g>>2]|0)+k|0]=n;b[h>>1]=0;c[f>>2]=0;return}if((p|0)<=7){return}p=d+20|0;n=c[p>>2]|0;c[p>>2]=n+1;a[(c[d+8>>2]|0)+n|0]=q;b[h>>1]=(e[h>>1]|0)>>>8;c[f>>2]=(c[f>>2]|0)-8;return}function Og(f,g,h,i){f=f|0;g=g|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;if((c[f+132>>2]|0)>0){j=(c[f>>2]|0)+44|0;if((c[j>>2]|0)==2){k=-201342849;l=0;while(1){if((k&1|0)!=0){if((b[f+148+(l<<2)>>1]|0)!=0){m=0;break}}n=l+1|0;if((n|0)<32){k=k>>>1;l=n}else{o=6;break}}a:do{if((o|0)==6){if((b[f+184>>1]|0)!=0){m=1;break}if((b[f+188>>1]|0)!=0){m=1;break}if((b[f+200>>1]|0)==0){p=32}else{m=1;break}while(1){l=p+1|0;if((b[f+148+(p<<2)>>1]|0)!=0){m=1;break a}if((l|0)<256){p=l}else{m=0;break}}}}while(0);c[j>>2]=m}Pg(f,f+2840|0);Pg(f,f+2852|0);Sg(f,f+148|0,c[f+2844>>2]|0);Sg(f,f+2440|0,c[f+2856>>2]|0);Pg(f,f+2864|0);m=18;while(1){j=m-1|0;if((b[f+2684+(d[71328+m|0]<<2)+2>>1]|0)!=0){q=m;break}if((j|0)>2){m=j}else{q=j;break}}m=f+5800|0;j=(q*3|0)+17+(c[m>>2]|0)|0;c[m>>2]=j;m=(j+10|0)>>>3;j=((c[f+5804>>2]|0)+10|0)>>>3;r=j>>>0>m>>>0?m:j;s=j;t=q}else{q=h+5|0;r=q;s=q;t=0}do{if((h+4|0)>>>0>r>>>0|(g|0)==0){q=f+5820|0;j=c[q>>2]|0;m=(j|0)>13;if((c[f+136>>2]|0)==4|(s|0)==(r|0)){p=i+2&65535;o=f+5816|0;l=e[o>>1]|p<<j;b[o>>1]=l;if(m){k=f+20|0;n=c[k>>2]|0;c[k>>2]=n+1;u=f+8|0;a[(c[u>>2]|0)+n|0]=l;l=(e[o>>1]|0)>>>8&255;n=c[k>>2]|0;c[k>>2]=n+1;a[(c[u>>2]|0)+n|0]=l;l=c[q>>2]|0;b[o>>1]=p>>>((16-l|0)>>>0);v=l-13|0}else{v=j+3|0}c[q>>2]=v;Qg(f,10424,11600);break}l=i+4&65535;p=f+5816|0;o=e[p>>1]|l<<j;n=o&65535;b[p>>1]=n;if(m){m=f+20|0;u=c[m>>2]|0;c[m>>2]=u+1;k=f+8|0;a[(c[k>>2]|0)+u|0]=o;o=(e[p>>1]|0)>>>8&255;u=c[m>>2]|0;c[m>>2]=u+1;a[(c[k>>2]|0)+u|0]=o;o=c[q>>2]|0;u=l>>>((16-o|0)>>>0)&65535;b[p>>1]=u;w=o-13|0;x=u}else{w=j+3|0;x=n}c[q>>2]=w;n=c[f+2844>>2]|0;j=c[f+2856>>2]|0;u=n+65280&65535;o=x&65535|u<<w;l=o&65535;b[p>>1]=l;if((w|0)>11){k=f+20|0;m=c[k>>2]|0;c[k>>2]=m+1;y=f+8|0;a[(c[y>>2]|0)+m|0]=o;o=(e[p>>1]|0)>>>8&255;m=c[k>>2]|0;c[k>>2]=m+1;a[(c[y>>2]|0)+m|0]=o;o=c[q>>2]|0;m=u>>>((16-o|0)>>>0)&65535;b[p>>1]=m;z=o-11|0;A=m}else{z=w+5|0;A=l}c[q>>2]=z;l=j&65535;m=l<<z|A&65535;o=m&65535;b[p>>1]=o;if((z|0)>11){u=f+20|0;y=c[u>>2]|0;c[u>>2]=y+1;k=f+8|0;a[(c[k>>2]|0)+y|0]=m;m=(e[p>>1]|0)>>>8&255;y=c[u>>2]|0;c[u>>2]=y+1;a[(c[k>>2]|0)+y|0]=m;m=c[q>>2]|0;y=l>>>((16-m|0)>>>0)&65535;b[p>>1]=y;B=m-11|0;C=y}else{B=z+5|0;C=o}c[q>>2]=B;o=t+65533&65535;y=o<<B|C&65535;m=y&65535;b[p>>1]=m;if((B|0)>12){l=f+20|0;k=c[l>>2]|0;c[l>>2]=k+1;u=f+8|0;a[(c[u>>2]|0)+k|0]=y;y=(e[p>>1]|0)>>>8&255;k=c[l>>2]|0;c[l>>2]=k+1;a[(c[u>>2]|0)+k|0]=y;y=c[q>>2]|0;k=o>>>((16-y|0)>>>0)&65535;b[p>>1]=k;D=y-12|0;E=k}else{D=B+4|0;E=m}c[q>>2]=D;if((t|0)>-1){m=f+20|0;k=f+8|0;y=0;o=D;u=E;while(1){l=e[f+2684+(d[71328+y|0]<<2)+2>>1]|0;F=l<<o|u&65535;G=F&65535;b[p>>1]=G;if((o|0)>13){H=c[m>>2]|0;c[m>>2]=H+1;a[(c[k>>2]|0)+H|0]=F;F=(e[p>>1]|0)>>>8&255;H=c[m>>2]|0;c[m>>2]=H+1;a[(c[k>>2]|0)+H|0]=F;F=c[q>>2]|0;H=l>>>((16-F|0)>>>0)&65535;b[p>>1]=H;I=F-13|0;J=H}else{I=o+3|0;J=G}c[q>>2]=I;if((y|0)<(t|0)){y=y+1|0;o=I;u=J}else{break}}}u=f+148|0;Rg(f,u,n);o=f+2440|0;Rg(f,o,j);Qg(f,u,o)}else{Lg(f,g,h,i)}}while(0);Kg(f);if((i|0)==0){return}i=f+5820|0;h=c[i>>2]|0;do{if((h|0)>8){g=f+5816|0;J=b[g>>1]&255;I=f+20|0;t=c[I>>2]|0;c[I>>2]=t+1;E=f+8|0;a[(c[E>>2]|0)+t|0]=J;J=(e[g>>1]|0)>>>8&255;t=c[I>>2]|0;c[I>>2]=t+1;a[(c[E>>2]|0)+t|0]=J;K=g}else{g=f+5816|0;if((h|0)<=0){K=g;break}J=b[g>>1]&255;t=f+20|0;E=c[t>>2]|0;c[t>>2]=E+1;a[(c[f+8>>2]|0)+E|0]=J;K=g}}while(0);b[K>>1]=0;c[i>>2]=0;return}function Pg(f,g){f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;h=i;i=i+32|0;j=h|0;k=g|0;l=c[k>>2]|0;m=g+8|0;n=c[m>>2]|0;o=c[n>>2]|0;p=c[n+12>>2]|0;n=f+5200|0;c[n>>2]=0;q=f+5204|0;c[q>>2]=573;if((p|0)>0){r=0;s=-1;while(1){if((b[l+(r<<2)>>1]|0)==0){b[l+(r<<2)+2>>1]=0;t=s}else{u=(c[n>>2]|0)+1|0;c[n>>2]=u;c[f+2908+(u<<2)>>2]=r;a[f+5208+r|0]=0;t=r}u=r+1|0;if((u|0)<(p|0)){r=u;s=t}else{break}}s=c[n>>2]|0;if((s|0)<2){v=s;w=t;x=3}else{y=t}}else{v=0;w=-1;x=3}if((x|0)==3){x=f+5800|0;t=f+5804|0;if((o|0)==0){s=w;r=v;while(1){u=(s|0)<2;z=s+1|0;A=u?z:s;B=u?z:0;z=r+1|0;c[n>>2]=z;c[f+2908+(z<<2)>>2]=B;b[l+(B<<2)>>1]=1;a[f+5208+B|0]=0;c[x>>2]=(c[x>>2]|0)-1;B=c[n>>2]|0;if((B|0)<2){s=A;r=B}else{y=A;break}}}else{r=w;w=v;while(1){v=(r|0)<2;s=r+1|0;A=v?s:r;B=v?s:0;s=w+1|0;c[n>>2]=s;c[f+2908+(s<<2)>>2]=B;b[l+(B<<2)>>1]=1;a[f+5208+B|0]=0;c[x>>2]=(c[x>>2]|0)-1;c[t>>2]=(c[t>>2]|0)-(e[o+(B<<2)+2>>1]|0);B=c[n>>2]|0;if((B|0)<2){r=A;w=B}else{y=A;break}}}}w=g+4|0;c[w>>2]=y;g=c[n>>2]|0;if((g|0)>1){r=(g|0)/2|0;o=g;while(1){t=c[f+2908+(r<<2)>>2]|0;x=f+5208+t|0;A=r<<1;a:do{if((A|0)>(o|0)){C=r}else{B=l+(t<<2)|0;s=r;v=A;z=o;while(1){do{if((v|0)<(z|0)){u=v|1;D=c[f+2908+(u<<2)>>2]|0;E=b[l+(D<<2)>>1]|0;F=c[f+2908+(v<<2)>>2]|0;G=b[l+(F<<2)>>1]|0;if((E&65535)>>>0>=(G&65535)>>>0){if(E<<16>>16!=G<<16>>16){H=v;break}if((d[f+5208+D|0]|0)>>>0>(d[f+5208+F|0]|0)>>>0){H=v;break}}H=u}else{H=v}}while(0);u=b[B>>1]|0;F=c[f+2908+(H<<2)>>2]|0;D=b[l+(F<<2)>>1]|0;if((u&65535)>>>0<(D&65535)>>>0){C=s;break a}if(u<<16>>16==D<<16>>16){if((d[x]|0)>>>0<=(d[f+5208+F|0]|0)>>>0){C=s;break a}}c[f+2908+(s<<2)>>2]=F;F=H<<1;D=c[n>>2]|0;if((F|0)>(D|0)){C=H;break}else{s=H;v=F;z=D}}}}while(0);c[f+2908+(C<<2)>>2]=t;x=r-1|0;A=c[n>>2]|0;if((x|0)>0){r=x;o=A}else{I=A;break}}}else{I=g}g=f+2912|0;o=p;p=I;while(1){I=c[g>>2]|0;r=p-1|0;c[n>>2]=r;C=c[f+2908+(p<<2)>>2]|0;c[g>>2]=C;H=f+5208+C|0;b:do{if((p|0)<3){J=1}else{A=l+(C<<2)|0;x=1;z=2;v=r;while(1){do{if((z|0)<(v|0)){s=z|1;B=c[f+2908+(s<<2)>>2]|0;D=b[l+(B<<2)>>1]|0;F=c[f+2908+(z<<2)>>2]|0;u=b[l+(F<<2)>>1]|0;if((D&65535)>>>0>=(u&65535)>>>0){if(D<<16>>16!=u<<16>>16){K=z;break}if((d[f+5208+B|0]|0)>>>0>(d[f+5208+F|0]|0)>>>0){K=z;break}}K=s}else{K=z}}while(0);s=b[A>>1]|0;F=c[f+2908+(K<<2)>>2]|0;B=b[l+(F<<2)>>1]|0;if((s&65535)>>>0<(B&65535)>>>0){J=x;break b}if(s<<16>>16==B<<16>>16){if((d[H]|0)>>>0<=(d[f+5208+F|0]|0)>>>0){J=x;break b}}c[f+2908+(x<<2)>>2]=F;F=K<<1;B=c[n>>2]|0;if((F|0)>(B|0)){J=K;break}else{x=K;z=F;v=B}}}}while(0);c[f+2908+(J<<2)>>2]=C;H=c[g>>2]|0;r=(c[q>>2]|0)-1|0;c[q>>2]=r;c[f+2908+(r<<2)>>2]=I;r=(c[q>>2]|0)-1|0;c[q>>2]=r;c[f+2908+(r<<2)>>2]=H;r=l+(o<<2)|0;b[r>>1]=(b[l+(H<<2)>>1]|0)+(b[l+(I<<2)>>1]|0);t=a[f+5208+I|0]|0;v=a[f+5208+H|0]|0;z=f+5208+o|0;a[z]=((t&255)>>>0<(v&255)>>>0?v:t)+1;t=o&65535;b[l+(H<<2)+2>>1]=t;b[l+(I<<2)+2>>1]=t;t=o+1|0;c[g>>2]=o;H=c[n>>2]|0;c:do{if((H|0)<2){L=1}else{v=1;x=2;A=H;while(1){do{if((x|0)<(A|0)){B=x|1;F=c[f+2908+(B<<2)>>2]|0;s=b[l+(F<<2)>>1]|0;u=c[f+2908+(x<<2)>>2]|0;D=b[l+(u<<2)>>1]|0;if((s&65535)>>>0>=(D&65535)>>>0){if(s<<16>>16!=D<<16>>16){M=x;break}if((d[f+5208+F|0]|0)>>>0>(d[f+5208+u|0]|0)>>>0){M=x;break}}M=B}else{M=x}}while(0);B=b[r>>1]|0;u=c[f+2908+(M<<2)>>2]|0;F=b[l+(u<<2)>>1]|0;if((B&65535)>>>0<(F&65535)>>>0){L=v;break c}if(B<<16>>16==F<<16>>16){if((d[z]|0)>>>0<=(d[f+5208+u|0]|0)>>>0){L=v;break c}}c[f+2908+(v<<2)>>2]=u;u=M<<1;F=c[n>>2]|0;if((u|0)>(F|0)){L=M;break}else{v=M;x=u;A=F}}}}while(0);c[f+2908+(L<<2)>>2]=o;z=c[n>>2]|0;if((z|0)>1){o=t;p=z}else{break}}p=c[g>>2]|0;g=(c[q>>2]|0)-1|0;c[q>>2]=g;c[f+2908+(g<<2)>>2]=p;p=c[k>>2]|0;k=c[w>>2]|0;w=c[m>>2]|0;m=c[w>>2]|0;g=c[w+4>>2]|0;o=c[w+8>>2]|0;n=c[w+16>>2]|0;w=f+2876|0;vF(w|0,0,32)|0;b[p+(c[f+2908+(c[q>>2]<<2)>>2]<<2)+2>>1]=0;L=(c[q>>2]|0)+1|0;d:do{if((L|0)<573){q=f+5800|0;M=f+5804|0;if((m|0)==0){J=0;K=L;while(1){z=c[f+2908+(K<<2)>>2]|0;r=p+(z<<2)+2|0;H=e[p+(e[r>>1]<<2)+2>>1]|0;I=(H|0)<(n|0);C=I?H+1|0:n;H=(I&1^1)+J|0;b[r>>1]=C;if((z|0)<=(k|0)){r=f+2876+(C<<1)|0;b[r>>1]=(b[r>>1]|0)+1;if((z|0)<(o|0)){N=0}else{N=c[g+(z-o<<2)>>2]|0}r=da(e[p+(z<<2)>>1]|0,N+C|0)|0;c[q>>2]=r+(c[q>>2]|0)}r=K+1|0;if((r|0)<573){J=H;K=r}else{O=H;break}}}else{K=0;J=L;while(1){t=c[f+2908+(J<<2)>>2]|0;H=p+(t<<2)+2|0;r=e[p+(e[H>>1]<<2)+2>>1]|0;C=(r|0)<(n|0);z=C?r+1|0:n;r=(C&1^1)+K|0;b[H>>1]=z;if((t|0)<=(k|0)){H=f+2876+(z<<1)|0;b[H>>1]=(b[H>>1]|0)+1;if((t|0)<(o|0)){P=0}else{P=c[g+(t-o<<2)>>2]|0}H=e[p+(t<<2)>>1]|0;C=da(H,P+z|0)|0;c[q>>2]=C+(c[q>>2]|0);C=da((e[m+(t<<2)+2>>1]|0)+P|0,H)|0;c[M>>2]=C+(c[M>>2]|0)}C=J+1|0;if((C|0)<573){K=r;J=C}else{O=r;break}}}if((O|0)==0){break}J=f+2876+(n<<1)|0;K=O;do{M=n;while(1){r=M-1|0;Q=f+2876+(r<<1)|0;R=b[Q>>1]|0;if(R<<16>>16==0){M=r}else{break}}b[Q>>1]=R-1;r=f+2876+(M<<1)|0;b[r>>1]=(b[r>>1]|0)+2;S=(b[J>>1]|0)-1&65535;b[J>>1]=S;K=K-2|0;}while((K|0)>0);if((n|0)==0){break}else{T=n;U=573;V=S}while(1){K=T&65535;if(V<<16>>16==0){W=U}else{J=V&65535;r=U;while(1){C=r;do{C=C-1|0;X=c[f+2908+(C<<2)>>2]|0;}while((X|0)>(k|0));H=p+(X<<2)+2|0;t=e[H>>1]|0;if((t|0)!=(T|0)){z=da(e[p+(X<<2)>>1]|0,T-t|0)|0;c[q>>2]=z+(c[q>>2]|0);b[H>>1]=K}H=J-1|0;if((H|0)==0){W=C;break}else{J=H;r=C}}}r=T-1|0;if((r|0)==0){break d}T=r;U=W;V=b[f+2876+(r<<1)>>1]|0}}}while(0);V=b[w>>1]<<1;b[j+2>>1]=V;w=((b[f+2878>>1]|0)+V&65535)<<1;b[j+4>>1]=w;V=(w+(b[f+2880>>1]|0)&65535)<<1;b[j+6>>1]=V;w=(V+(b[f+2882>>1]|0)&65535)<<1;b[j+8>>1]=w;V=(w+(b[f+2884>>1]|0)&65535)<<1;b[j+10>>1]=V;w=(V+(b[f+2886>>1]|0)&65535)<<1;b[j+12>>1]=w;V=(w+(b[f+2888>>1]|0)&65535)<<1;b[j+14>>1]=V;w=(V+(b[f+2890>>1]|0)&65535)<<1;b[j+16>>1]=w;V=(w+(b[f+2892>>1]|0)&65535)<<1;b[j+18>>1]=V;w=(V+(b[f+2894>>1]|0)&65535)<<1;b[j+20>>1]=w;V=(w+(b[f+2896>>1]|0)&65535)<<1;b[j+22>>1]=V;w=(V+(b[f+2898>>1]|0)&65535)<<1;b[j+24>>1]=w;V=(w+(b[f+2900>>1]|0)&65535)<<1;b[j+26>>1]=V;w=(V+(b[f+2902>>1]|0)&65535)<<1;b[j+28>>1]=w;b[j+30>>1]=(w+(b[f+2904>>1]|0)&65535)<<1;if((y|0)<0){Y=32;Z=0;i=h;return}else{_=0}while(1){f=b[l+(_<<2)+2>>1]|0;w=f&65535;if(f<<16>>16!=0){f=j+(w<<1)|0;V=b[f>>1]|0;b[f>>1]=V+1;f=0;W=w;w=V&65535;while(1){$=f|w&1;V=W-1|0;if((V|0)>0){f=$<<1;W=V;w=w>>>1}else{break}}b[l+(_<<2)>>1]=$}if((_|0)<(y|0)){_=_+1|0}else{break}}Y=32;Z=0;i=h;return}function Qg(f,g,h){f=f|0;g=g|0;h=h|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0;i=f+5792|0;if((c[i>>2]|0)==0){j=c[f+5820>>2]|0;k=b[f+5816>>1]|0}else{l=f+5796|0;m=f+5784|0;n=f+5820|0;o=f+5816|0;p=f+20|0;q=f+8|0;r=0;while(1){s=b[(c[l>>2]|0)+(r<<1)>>1]|0;t=s&65535;u=r+1|0;v=d[(c[m>>2]|0)+r|0]|0;do{if(s<<16>>16==0){w=e[g+(v<<2)+2>>1]|0;x=c[n>>2]|0;y=e[g+(v<<2)>>1]|0;z=e[o>>1]|0|y<<x;A=z&65535;b[o>>1]=A;if((x|0)>(16-w|0)){B=c[p>>2]|0;c[p>>2]=B+1;a[(c[q>>2]|0)+B|0]=z;z=(e[o>>1]|0)>>>8&255;B=c[p>>2]|0;c[p>>2]=B+1;a[(c[q>>2]|0)+B|0]=z;z=c[n>>2]|0;B=y>>>((16-z|0)>>>0)&65535;b[o>>1]=B;y=w-16+z|0;c[n>>2]=y;C=y;D=B;break}else{B=x+w|0;c[n>>2]=B;C=B;D=A;break}}else{A=d[169e3+v|0]|0;B=(A|256)+1|0;w=e[g+(B<<2)+2>>1]|0;x=c[n>>2]|0;y=e[g+(B<<2)>>1]|0;B=e[o>>1]|0|y<<x;z=B&65535;b[o>>1]=z;if((x|0)>(16-w|0)){E=c[p>>2]|0;c[p>>2]=E+1;a[(c[q>>2]|0)+E|0]=B;B=(e[o>>1]|0)>>>8&255;E=c[p>>2]|0;c[p>>2]=E+1;a[(c[q>>2]|0)+E|0]=B;B=c[n>>2]|0;E=y>>>((16-B|0)>>>0)&65535;b[o>>1]=E;F=w-16+B|0;G=E}else{F=x+w|0;G=z}c[n>>2]=F;z=c[26200+(A<<2)>>2]|0;do{if((A-8|0)>>>0<20>>>0){w=v-(c[71720+(A<<2)>>2]|0)&65535;x=w<<F|G&65535;E=x&65535;b[o>>1]=E;if((F|0)>(16-z|0)){B=c[p>>2]|0;c[p>>2]=B+1;a[(c[q>>2]|0)+B|0]=x;x=(e[o>>1]|0)>>>8&255;B=c[p>>2]|0;c[p>>2]=B+1;a[(c[q>>2]|0)+B|0]=x;x=c[n>>2]|0;B=w>>>((16-x|0)>>>0)&65535;b[o>>1]=B;w=z-16+x|0;c[n>>2]=w;H=w;I=B;break}else{B=F+z|0;c[n>>2]=B;H=B;I=E;break}}else{H=F;I=G}}while(0);z=t-1|0;if(z>>>0<256>>>0){J=z}else{J=(z>>>7)+256|0}A=d[169256+J|0]|0;E=e[h+(A<<2)+2>>1]|0;B=e[h+(A<<2)>>1]|0;w=I&65535|B<<H;x=w&65535;b[o>>1]=x;if((H|0)>(16-E|0)){y=c[p>>2]|0;c[p>>2]=y+1;a[(c[q>>2]|0)+y|0]=w;w=(e[o>>1]|0)>>>8&255;y=c[p>>2]|0;c[p>>2]=y+1;a[(c[q>>2]|0)+y|0]=w;w=c[n>>2]|0;y=B>>>((16-w|0)>>>0)&65535;b[o>>1]=y;K=E-16+w|0;L=y}else{K=H+E|0;L=x}c[n>>2]=K;x=c[26320+(A<<2)>>2]|0;if((A-4|0)>>>0>=26>>>0){C=K;D=L;break}E=z-(c[71840+(A<<2)>>2]|0)&65535;A=E<<K|L&65535;z=A&65535;b[o>>1]=z;if((K|0)>(16-x|0)){y=c[p>>2]|0;c[p>>2]=y+1;a[(c[q>>2]|0)+y|0]=A;A=(e[o>>1]|0)>>>8&255;y=c[p>>2]|0;c[p>>2]=y+1;a[(c[q>>2]|0)+y|0]=A;A=c[n>>2]|0;y=E>>>((16-A|0)>>>0)&65535;b[o>>1]=y;E=x-16+A|0;c[n>>2]=E;C=E;D=y;break}else{y=K+x|0;c[n>>2]=y;C=y;D=z;break}}}while(0);if(u>>>0<(c[i>>2]|0)>>>0){r=u}else{j=C;k=D;break}}}D=e[g+1026>>1]|0;C=f+5820|0;r=e[g+1024>>1]|0;g=f+5816|0;i=k&65535|r<<j;b[g>>1]=i;if((j|0)>(16-D|0)){k=f+20|0;n=c[k>>2]|0;c[k>>2]=n+1;K=f+8|0;a[(c[K>>2]|0)+n|0]=i;i=(e[g>>1]|0)>>>8&255;n=c[k>>2]|0;c[k>>2]=n+1;a[(c[K>>2]|0)+n|0]=i;i=c[C>>2]|0;b[g>>1]=r>>>((16-i|0)>>>0);M=D-16+i|0;c[C>>2]=M;return}else{M=j+D|0;c[C>>2]=M;return}}function Rg(d,f,g){d=d|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0;h=b[f+2>>1]|0;i=h<<16>>16==0;j=d+2754|0;k=d+5820|0;l=d+2752|0;m=d+5816|0;n=d+20|0;o=d+8|0;p=d+2758|0;q=d+2756|0;r=d+2750|0;s=d+2748|0;t=0;u=-1;v=h&65535;h=i?138:7;w=i?3:4;a:while(1){i=t;x=0;while(1){if((i|0)>(g|0)){break a}y=i+1|0;z=b[f+(y<<2)+2>>1]|0;A=z&65535;B=x+1|0;C=(v|0)==(A|0);if((B|0)<(h|0)&C){i=y;x=B}else{break}}do{if((B|0)<(w|0)){i=d+2684+(v<<2)+2|0;D=d+2684+(v<<2)|0;E=B;F=c[k>>2]|0;G=b[m>>1]|0;while(1){H=e[i>>1]|0;I=e[D>>1]|0;J=G&65535|I<<F;K=J&65535;b[m>>1]=K;if((F|0)>(16-H|0)){L=c[n>>2]|0;c[n>>2]=L+1;a[(c[o>>2]|0)+L|0]=J;J=(e[m>>1]|0)>>>8&255;L=c[n>>2]|0;c[n>>2]=L+1;a[(c[o>>2]|0)+L|0]=J;J=c[k>>2]|0;L=I>>>((16-J|0)>>>0)&65535;b[m>>1]=L;M=H-16+J|0;N=L}else{M=F+H|0;N=K}c[k>>2]=M;K=E-1|0;if((K|0)==0){break}else{E=K;F=M;G=N}}}else{if((v|0)!=0){if((v|0)==(u|0)){O=B;P=c[k>>2]|0;Q=b[m>>1]|0}else{G=e[d+2684+(v<<2)+2>>1]|0;F=c[k>>2]|0;E=e[d+2684+(v<<2)>>1]|0;D=e[m>>1]|0|E<<F;i=D&65535;b[m>>1]=i;if((F|0)>(16-G|0)){K=c[n>>2]|0;c[n>>2]=K+1;a[(c[o>>2]|0)+K|0]=D;D=(e[m>>1]|0)>>>8&255;K=c[n>>2]|0;c[n>>2]=K+1;a[(c[o>>2]|0)+K|0]=D;D=c[k>>2]|0;K=E>>>((16-D|0)>>>0)&65535;b[m>>1]=K;R=G-16+D|0;S=K}else{R=F+G|0;S=i}c[k>>2]=R;O=x;P=R;Q=S}i=e[r>>1]|0;G=e[s>>1]|0;F=Q&65535|G<<P;K=F&65535;b[m>>1]=K;if((P|0)>(16-i|0)){D=c[n>>2]|0;c[n>>2]=D+1;a[(c[o>>2]|0)+D|0]=F;F=(e[m>>1]|0)>>>8&255;D=c[n>>2]|0;c[n>>2]=D+1;a[(c[o>>2]|0)+D|0]=F;F=c[k>>2]|0;D=G>>>((16-F|0)>>>0)&65535;b[m>>1]=D;T=i-16+F|0;U=D}else{T=P+i|0;U=K}c[k>>2]=T;K=O+65533&65535;i=U&65535|K<<T;b[m>>1]=i;if((T|0)>14){D=c[n>>2]|0;c[n>>2]=D+1;a[(c[o>>2]|0)+D|0]=i;i=(e[m>>1]|0)>>>8&255;D=c[n>>2]|0;c[n>>2]=D+1;a[(c[o>>2]|0)+D|0]=i;i=c[k>>2]|0;b[m>>1]=K>>>((16-i|0)>>>0);c[k>>2]=i-14;break}else{c[k>>2]=T+2;break}}if((B|0)<11){i=e[j>>1]|0;K=c[k>>2]|0;D=e[l>>1]|0;F=e[m>>1]|0|D<<K;G=F&65535;b[m>>1]=G;if((K|0)>(16-i|0)){E=c[n>>2]|0;c[n>>2]=E+1;a[(c[o>>2]|0)+E|0]=F;F=(e[m>>1]|0)>>>8&255;E=c[n>>2]|0;c[n>>2]=E+1;a[(c[o>>2]|0)+E|0]=F;F=c[k>>2]|0;E=D>>>((16-F|0)>>>0)&65535;b[m>>1]=E;V=i-16+F|0;W=E}else{V=K+i|0;W=G}c[k>>2]=V;G=x+65534&65535;i=W&65535|G<<V;b[m>>1]=i;if((V|0)>13){K=c[n>>2]|0;c[n>>2]=K+1;a[(c[o>>2]|0)+K|0]=i;i=(e[m>>1]|0)>>>8&255;K=c[n>>2]|0;c[n>>2]=K+1;a[(c[o>>2]|0)+K|0]=i;i=c[k>>2]|0;b[m>>1]=G>>>((16-i|0)>>>0);c[k>>2]=i-13;break}else{c[k>>2]=V+3;break}}else{i=e[p>>1]|0;G=c[k>>2]|0;K=e[q>>1]|0;E=e[m>>1]|0|K<<G;F=E&65535;b[m>>1]=F;if((G|0)>(16-i|0)){D=c[n>>2]|0;c[n>>2]=D+1;a[(c[o>>2]|0)+D|0]=E;E=(e[m>>1]|0)>>>8&255;D=c[n>>2]|0;c[n>>2]=D+1;a[(c[o>>2]|0)+D|0]=E;E=c[k>>2]|0;D=K>>>((16-E|0)>>>0)&65535;b[m>>1]=D;X=i-16+E|0;Y=D}else{X=G+i|0;Y=F}c[k>>2]=X;F=x+65526&65535;i=Y&65535|F<<X;b[m>>1]=i;if((X|0)>9){G=c[n>>2]|0;c[n>>2]=G+1;a[(c[o>>2]|0)+G|0]=i;i=(e[m>>1]|0)>>>8&255;G=c[n>>2]|0;c[n>>2]=G+1;a[(c[o>>2]|0)+G|0]=i;i=c[k>>2]|0;b[m>>1]=F>>>((16-i|0)>>>0);c[k>>2]=i-9;break}else{c[k>>2]=X+7;break}}}}while(0);if(z<<16>>16==0){t=y;u=v;v=A;h=138;w=3;continue}t=y;u=v;v=A;h=C?6:7;w=C?3:4}return}function Sg(a,c,d){a=a|0;c=c|0;d=d|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;f=b[c+2>>1]|0;g=f<<16>>16==0;b[c+(d+1<<2)+2>>1]=-1;h=a+2752|0;i=a+2756|0;j=a+2748|0;k=g?3:4;l=g?138:7;g=f&65535;f=0;m=-1;a:while(1){n=0;o=f;do{if((o|0)>(d|0)){break a}o=o+1|0;p=b[c+(o<<2)+2>>1]|0;q=p&65535;n=n+1|0;r=(g|0)==(q|0);}while((n|0)<(l|0)&r);do{if((n|0)<(k|0)){s=a+2684+(g<<2)|0;b[s>>1]=(e[s>>1]|0)+n}else{if((g|0)==0){if((n|0)<11){b[h>>1]=(b[h>>1]|0)+1;break}else{b[i>>1]=(b[i>>1]|0)+1;break}}else{if((g|0)!=(m|0)){s=a+2684+(g<<2)|0;b[s>>1]=(b[s>>1]|0)+1}b[j>>1]=(b[j>>1]|0)+1;break}}}while(0);if(p<<16>>16==0){k=3;l=138;m=g;g=q;f=o;continue}k=r?3:4;l=r?6:7;m=g;g=q;f=o}return}function Tg(a,b,c){a=a|0;b=b|0;c=c|0;return dF(da(c,b)|0)|0}function Ug(a,b){a=a|0;b=b|0;eF(b);return}function Vg(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;if((a|0)==0){b=-1;return b|0}if((c[a+24>>2]|0)>0){b=-1;return b|0}d=c[a+4>>2]|0;e=d+32|0;f=c[e>>2]|0;do{if((f|0)==0){g=0}else{h=Sc[f&127](a,2,0,d)|0;if((h|0)<0){b=-1}else{g=h;break}return b|0}}while(0);if((c[a+28>>2]|0)!=0){fh(a,0)|0}f=(g|0)==0;if(f){Hc[c[c[a+16>>2]>>2]&63](a,0,64)|0;if((bh(a)|0)>0){b=-1;return b|0}g=a+8|0;h=c[g>>2]|0;i=a+12|0;if((c[h+12>>2]|0)>0){Sc[c[i>>2]&127](a,c[h+8>>2]|0,0,d)|0;j=c[g>>2]|0}else{j=h}Sc[c[i>>2]&127](a,j,0,d)|0}j=c[a+20>>2]|0;do{if((j|0)==0){eF(a)}else{if(!(f&(j|0)==1)){break}Sc[c[a+12>>2]&127](a,a,0,d)|0}}while(0);j=c[e>>2]|0;if((j|0)==0){b=0;return b|0}Sc[j&127](a,6,0,d)|0;b=0;return b|0}function Wg(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;e=a+4|0;f=c[e>>2]|0;if((f|0)==0){c[e>>2]=b;g=c[b+28>>2]|0;c[a+12>>2]=(g|0)==0?40:g;h=b;return h|0}if((b|0)==0){h=f;return h|0}g=c[c[a+16>>2]>>2]|0;i=a+8|0;if((c[c[i>>2]>>2]&4096|0)!=0){ah(a,0)|0}j=c[f+32>>2]|0;do{if((j|0)!=0){if((Sc[j&127](a,3,b,f)|0)<0){h=0}else{break}return h|0}}while(0);c[e>>2]=b;e=c[b+28>>2]|0;c[a+12>>2]=(e|0)==0?40:e;e=c[c[i>>2]>>2]|0;if((e&112|0)!=0){h=f;return h|0}do{if((e&2|0)==0){if((e&3|0)==0){if((d&1|0)==0){break}else{h=f}return h|0}else{if((d&3|0)==3){h=f}else{break}return h|0}}else{if((d&2|0)==0){break}else{h=f}return h|0}}while(0);e=Zg(a)|0;j=c[i>>2]|0;c[j>>2]=c[j>>2]&-4097;c[(c[i>>2]|0)+4>>2]=0;c[(c[i>>2]|0)+16>>2]=0;j=c[i>>2]|0;do{if((c[j>>2]&3|0)!=0){i=c[j+8>>2]|0;k=c[j+12>>2]|0;l=i+(k<<2)|0;if((k|0)>0){m=i}else{break}while(1){i=m+4|0;c[m>>2]=0;if(i>>>0<l>>>0){m=i}else{break}}}}while(0);if((e|0)==0){h=f;return h|0}m=b+8|0;j=b+4|0;l=b|0;i=b+24|0;if((d&2|0)==0){n=e}else{d=e;while(1){e=c[d>>2]|0;Hc[g&63](a,d,32)|0;if((e|0)==0){h=f;break}else{d=e}}return h|0}while(1){d=c[n>>2]|0;e=c[m>>2]|0;if((e|0)<0){o=c[n+8>>2]|0}else{o=n+(-e|0)|0}e=c[j>>2]|0;k=o+(c[l>>2]|0)|0;if((e|0)<0){p=c[k>>2]|0}else{p=k}k=c[i>>2]|0;if((k|0)==0){q=dh(0,p,e)|0}else{q=Hc[k&63](a,p,b)|0}c[n+4>>2]=q;Hc[g&63](a,n,32)|0;if((d|0)==0){h=f;break}else{n=d}}return h|0}function Xg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;d=(c|0)==0;do{if((b|0)==0){if(d){e=0;break}e=dF(c)|0}else{if(d){eF(b);e=0;break}else{e=gF(b,c)|0;break}}}while(0);return e|0}function Yg(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;b=a+8|0;d=c[b>>2]|0;e=c[d>>2]|0;do{if((e&12|0)==0){if((e&3|0)==0){f=d+8|0;g=c[f>>2]|0;c[f>>2]=0;h=g;break}g=Zg(a)|0;f=c[b>>2]|0;i=c[f+8>>2]|0;j=c[f+12>>2]|0;f=i+(j<<2)|0;if((j|0)>0){k=i}else{h=g;break}while(1){c[k>>2]=0;i=k+4|0;if(i>>>0<f>>>0){k=i}else{h=g;break}}}else{h=c[d+4>>2]|0}}while(0);d=c[b>>2]|0;c[d>>2]=c[d>>2]&-4097;c[(c[b>>2]|0)+16>>2]=0;c[(c[b>>2]|0)+4>>2]=0;return h|0}function Zg(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;b=a+8|0;a=c[b>>2]|0;d=c[a>>2]|0;if((d&4096|0)!=0){e=c[a+4>>2]|0;return e|0}do{if((d&3|0)==0){if((d&112|0)!=0){f=c[a+8>>2]|0;break}g=c[a+4>>2]|0;if((g|0)==0){f=0;break}h=g+4|0;i=c[h>>2]|0;if((i|0)==0){j=g;k=c[g>>2]|0}else{l=g;g=h;h=i;while(1){i=h|0;c[g>>2]=c[i>>2];c[i>>2]=l;i=h+4|0;m=c[i>>2]|0;if((m|0)==0){j=h;k=l;break}else{l=h;g=i;h=m}}}if((k|0)==0){f=j;break}h=j|0;g=k;while(1){l=c[g+4>>2]|0;if((l|0)==0){n=g}else{m=g;i=l;while(1){l=i|0;c[m+4>>2]=c[l>>2];c[l>>2]=m;l=c[i+4>>2]|0;if((l|0)==0){break}else{m=i;i=l}}c[h>>2]=i;n=i}m=n|0;l=c[m>>2]|0;if((l|0)==0){f=j;break}else{h=m;g=l}}}else{g=c[a+8>>2]|0;h=c[a+12>>2]|0;l=g+(h<<2)|0;if((h|0)>0){o=0;p=0;q=g}else{f=0;break}while(1){g=c[q>>2]|0;if((g|0)==0){r=p;s=o}else{if((p|0)==0){t=g;u=g}else{c[p>>2]=g;t=p;u=o}g=t;while(1){h=c[g>>2]|0;if((h|0)==0){break}else{g=h}}c[q>>2]=g;r=g;s=u}i=q+4|0;if(i>>>0<l>>>0){o=s;p=r;q=i}else{f=s;break}}}}while(0);c[(c[b>>2]|0)+4>>2]=f;s=c[b>>2]|0;c[s>>2]=c[s>>2]|4096;e=f;return e|0}function _g(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0;e=a+8|0;if((c[c[e>>2]>>2]&4096|0)!=0){ah(a,0)|0}f=c[a+4>>2]|0;g=c[f>>2]|0;h=c[f+4>>2]|0;i=f+8|0;j=c[i>>2]|0;k=c[f+20>>2]|0;l=a+20|0;c[l>>2]=c[l>>2]&-32769;do{if((b|0)==0){if((d&384|0)!=0){m=c[e>>2]|0;n=c[m+8>>2]|0;if((n|0)==0){o=0;return o|0}do{if((d&256|0)==0){c[m+4>>2]=n;p=n}else{q=c[n+4>>2]|0;c[m+4>>2]=q;if((q|0)==0){o=0}else{p=q;break}return o|0}}while(0);if((j|0)<0){o=c[p+8>>2]|0;return o|0}else{o=p+(-j|0)|0;return o|0}}if((d&4098|0)!=0){m=c[e>>2]|0;if((c[m>>2]&144|0)!=0){o=0;return o|0}n=c[m+8>>2]|0;if((n|0)==0){o=0}else{r=n;break}return o|0}if((d&64|0)==0){o=0;return o|0}n=f+16|0;m=c[n>>2]|0;if((m|0)==0){if((c[i>>2]|0)<0){s=18}}else{s=18}a:do{if((s|0)==18){q=c[(c[e>>2]|0)+8>>2]|0;if((q|0)==0){break}t=a+12|0;u=-j|0;if((j|0)<0){v=q;w=m;while(1){x=c[v>>2]|0;if((w|0)!=0){Tc[w&127](a,c[v+8>>2]|0,f)}if((c[i>>2]|0)<0){Sc[c[t>>2]&127](a,v,0,f)|0}if((x|0)==0){break a}v=x;w=c[n>>2]|0}}else{w=q;v=m;while(1){x=c[w>>2]|0;if((v|0)!=0){Tc[v&127](a,w+u|0,f)}if((c[i>>2]|0)<0){Sc[c[t>>2]&127](a,w,0,f)|0}if((x|0)==0){break a}w=x;v=c[n>>2]|0}}}}while(0);c[(c[e>>2]|0)+4>>2]=0;c[(c[e>>2]|0)+8>>2]=0;c[(c[e>>2]|0)+16>>2]=0;o=0;return o|0}else{if((d&2049|0)!=0){n=f+12|0;m=c[n>>2]|0;do{if((m|0)==0){y=b}else{if((d&1|0)==0){y=b;break}v=Hc[m&63](a,b,f)|0;if((v|0)==0){o=0}else{y=v;break}return o|0}}while(0);do{if((j|0)>-1){z=y+j|0}else{m=Sc[c[a+12>>2]&127](a,0,12,f)|0;if((m|0)!=0){c[m+8>>2]=y;z=m;break}if((c[n>>2]|0)==0){o=0;return o|0}m=c[f+16>>2]|0;if((m|0)==0){o=0;return o|0}if((d&1|0)==0){o=0;return o|0}Tc[m&127](a,y,f);o=0;return o|0}}while(0);n=z;m=c[e>>2]|0;v=c[m>>2]|0;do{if((v&128|0)==0){if((v&16|0)==0){if((v&32|0)==0){s=60;break}else{s=56;break}}w=c[m+4>>2]|0;t=(w|0)!=0;if((d&8192|0)==0){if(!t){s=56;break}if((w|0)==(c[m+8>>2]|0)){s=56;break}u=w+4|0;q=c[u>>2]|0;c[z+4>>2]=q;c[q>>2]=n;c[z>>2]=w;c[u>>2]=z;break}else{if(!t){s=60;break}t=w|0;u=c[t>>2]|0;if((u|0)==0){s=60;break}c[z>>2]=u;c[u+4>>2]=z;c[z+4>>2]=w;c[t>>2]=n;break}}else{if((d&8192|0)==0){s=56}else{s=60}}}while(0);if((s|0)==56){v=c[m+8>>2]|0;t=z;c[t>>2]=v;if((v|0)==0){c[z+4>>2]=n}else{w=v+4|0;c[z+4>>2]=c[w>>2];c[w>>2]=z}c[(c[e>>2]|0)+8>>2]=t}else if((s|0)==60){t=m+8|0;w=c[t>>2]|0;if((w|0)==0){v=z;c[t>>2]=v;c[z+4>>2]=n;A=v}else{v=w+4|0;w=v;c[c[w>>2]>>2]=n;c[z+4>>2]=c[w>>2];c[v>>2]=z;A=z}c[A>>2]=0}v=c[e>>2]|0;w=v+16|0;t=c[w>>2]|0;if((t|0)>-1){c[w>>2]=t+1;B=c[e>>2]|0}else{B=v}c[B+4>>2]=n;if((j|0)<0){o=c[z+8>>2]|0;return o|0}else{o=z+(-j|0)|0;return o|0}}v=c[e>>2]|0;do{if((d&512|0)==0){t=c[v+4>>2]|0;if((t|0)!=0){if((j|0)<0){C=c[t+8>>2]|0}else{C=t+(-j|0)|0}if((C|0)==(b|0)){D=t;break}}t=b+g|0;if((h|0)>=0){E=t;s=77;break}E=c[t>>2]|0;s=77}else{E=b;s=77}}while(0);b:do{if((s|0)==77){n=c[v+8>>2]|0;if((n|0)==0){o=0;return o|0}m=(h|0)<0;t=(k|0)==0;w=(h|0)<1;if((j|0)<0){u=n;while(1){q=(c[u+8>>2]|0)+g|0;if(m){F=c[q>>2]|0}else{F=q}do{if(t){if(w){G=Ya(E|0,F|0)|0;break}else{G=wF(E|0,F|0,h|0)|0;break}}else{G=Sc[k&127](a,E,F,f)|0}}while(0);if((G|0)==0){D=u;break b}q=c[u>>2]|0;if((q|0)==0){o=0;break}else{u=q}}return o|0}else{u=n;while(1){q=u+(g-j)|0;if(m){H=c[q>>2]|0}else{H=q}do{if(t){if(w){I=Ya(E|0,H|0)|0;break}else{I=wF(E|0,H|0,h|0)|0;break}}else{I=Sc[k&127](a,E,H,f)|0}}while(0);if((I|0)==0){D=u;break b}q=c[u>>2]|0;if((q|0)==0){o=0;break}else{u=q}}return o|0}}}while(0);if((D|0)==0){o=0;return o|0}c[l>>2]=c[l>>2]|32768;if((d&4098|0)!=0){r=D;break}do{if((d&8|0)==0){if((d&16|0)==0){J=D;break}v=c[e>>2]|0;if((D|0)!=(c[v+8>>2]|0)){J=c[D+4>>2]|0;break}c[v+4>>2]=0;o=0;return o|0}else{J=c[D>>2]|0}}while(0);c[(c[e>>2]|0)+4>>2]=J;if((J|0)==0){o=0;return o|0}if((j|0)<0){o=c[J+8>>2]|0;return o|0}else{o=J+(-j|0)|0;return o|0}}}while(0);J=r|0;D=c[J>>2]|0;if((D|0)==0){K=0}else{c[D+4>>2]=c[r+4>>2];K=c[J>>2]|0}D=(c[e>>2]|0)+8|0;l=c[D>>2]|0;do{if((r|0)==(l|0)){c[D>>2]=K;I=c[(c[e>>2]|0)+8>>2]|0;if((I|0)==0){break}c[I+4>>2]=c[r+4>>2]}else{I=r+4|0;c[c[I>>2]>>2]=K;H=l+4|0;if((r|0)!=(c[H>>2]|0)){break}c[H>>2]=c[I>>2]}}while(0);l=(c[e>>2]|0)+4|0;if((r|0)==(c[l>>2]|0)){L=c[J>>2]|0}else{L=0}c[l>>2]=L;L=(c[e>>2]|0)+16|0;c[L>>2]=(c[L>>2]|0)-1;if((j|0)<0){M=c[r+8>>2]|0}else{M=r+(-j|0)|0}j=c[f+16>>2]|0;do{if((j|0)!=0){if((d&2|0)==0){break}Tc[j&127](a,M,f)}}while(0);if((c[i>>2]|0)>=0){o=M;return o|0}Sc[c[a+12>>2]&127](a,r,0,f)|0;o=M;return o|0}function $g(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=i;i=i+8|0;e=d|0;if((a|0)==0|(b|0)==0){f=0;i=d;return f|0}g=dF(40)|0;h=g;if((g|0)==0){f=0;i=d;return f|0}c[g>>2]=0;c[g+16>>2]=0;c[g+4>>2]=0;Wg(h,a,0)|0;j=a+32|0;vF(g+20|0,0,20)|0;k=c[j>>2]|0;do{if((k|0)==0){l=h;m=11}else{c[e>>2]=0;n=Sc[k&127](h,1,e,a)|0;if((n|0)<0){o=h;m=12;break}if((n|0)<=0){l=h;m=11;break}n=c[e>>2]|0;if((n|0)!=0){if((c[b+4>>2]&c[n>>2]|0)==0){o=h;m=12;break}else{p=h;q=n;break}}n=a+28|0;if((c[n>>2]|0)==0){o=h;m=12;break}eF(g);r=Sc[c[n>>2]&127](0,0,40,a)|0;n=r;if((r|0)==0){f=0;i=d;return f|0}else{c[r>>2]=0;c[r+16>>2]=0;c[r+4>>2]=0;Wg(n,a,0)|0;c[r+20>>2]=1;c[r+24>>2]=0;c[r+32>>2]=0;c[r+28>>2]=0;l=n;m=11;break}}}while(0);do{if((m|0)==11){g=Sc[c[l+12>>2]&127](l,0,28,a)|0;c[e>>2]=g;if((g|0)==0){o=l;m=12;break}c[g>>2]=c[b+4>>2];c[(c[e>>2]|0)+4>>2]=0;c[(c[e>>2]|0)+8>>2]=0;c[(c[e>>2]|0)+20>>2]=0;c[(c[e>>2]|0)+16>>2]=0;c[(c[e>>2]|0)+12>>2]=0;c[(c[e>>2]|0)+24>>2]=0;p=l;q=c[e>>2]|0}}while(0);if((m|0)==12){eF(o);f=0;i=d;return f|0}c[p+8>>2]=q;c[p>>2]=c[b>>2];c[p+16>>2]=b;b=c[j>>2]|0;if((b|0)==0){f=p;i=d;return f|0}Sc[b&127](p,5,p,a)|0;f=p;i=d;return f|0}function ah(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;d=c[c[a+16>>2]>>2]|0;e=a+8|0;f=c[e>>2]|0;g=f|0;h=c[g>>2]|0;i=h&4096;do{if((b|0)==0){if((i|0)==0){j=-1;return j|0}else{k=i;l=c[f+4>>2]|0;break}}else{if((c[f+16>>2]|0)==0){k=0;l=b;break}else{j=-1}return j|0}}while(0);c[g>>2]=h&-4097;h=c[e>>2]|0;g=c[h>>2]|0;if((g&3|0)==0){b=h+4|0;if((g&12|0)==0){c[b>>2]=0;c[(c[e>>2]|0)+8>>2]=l}else{c[b>>2]=l}if((k|0)!=0){j=0;return j|0}c[(c[e>>2]|0)+16>>2]=-1;j=0;return j|0}c[h+4>>2]=0;h=c[e>>2]|0;if((k|0)==0){c[h+16>>2]=0;if((l|0)==0){j=0;return j|0}else{m=l}while(1){k=c[m>>2]|0;Hc[d&63](a,m,32)|0;if((k|0)==0){j=0;break}else{m=k}}return j|0}m=c[h+8>>2]|0;a=c[h+12>>2]|0;h=m+(a<<2)|0;if((a|0)>0){n=m;o=l}else{j=0;return j|0}while(1){l=c[n>>2]|0;if((l|0)==0){p=o}else{c[n>>2]=o;m=l|0;l=c[m>>2]|0;c[m>>2]=0;p=l}l=n+4|0;if(l>>>0<h>>>0){n=l;o=p}else{j=0;break}}return j|0}function bh(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0;b=a+8|0;d=c[b>>2]|0;if((c[d>>2]&4096|0)==0){e=d}else{ah(a,0)|0;e=c[b>>2]|0}a=e+16|0;do{if((c[a>>2]|0)<0){d=c[e>>2]|0;if((d&12|0)!=0){c[a>>2]=ch(c[e+4>>2]|0)|0;break}if((d&112|0)==0){break}d=c[e+8>>2]|0;if((d|0)==0){f=0}else{g=0;h=d;while(1){d=g+1|0;i=c[h>>2]|0;if((i|0)==0){f=d;break}else{g=d;h=i}}}c[a>>2]=f}}while(0);return c[(c[b>>2]|0)+16>>2]|0}function ch(a){a=a|0;var b=0;if((a|0)==0){return 0}else{b=ch(c[a+4>>2]|0)|0;return b+1+(ch(c[a>>2]|0)|0)|0}return 0}function dh(b,c,e){b=b|0;c=c|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;if((e|0)<1){f=a[c]|0;if(f<<24>>24==0){g=c;h=b}else{i=c;j=b;k=f;while(1){f=a[i+1|0]|0;l=da(((k&255)<<8)+j+(f&255)|0,17109811)|0;m=i+(f<<24>>24!=0?2:1)|0;f=a[m]|0;if(f<<24>>24==0){g=m;h=l;break}else{i=m;j=l;k=f}}}n=h;o=g-c|0;p=n+o|0;q=da(p,17109811)|0;return q|0}g=e-1|0;h=c+g|0;if((g|0)>0){g=c;k=b;while(1){j=da(((d[g]|0)<<8)+k+(d[g+1|0]|0)|0,17109811)|0;i=g+2|0;if(i>>>0<h>>>0){g=i;k=j}else{r=i;s=j;break}}}else{r=c;s=b}if(r>>>0>h>>>0){n=s;o=e;p=n+o|0;q=da(p,17109811)|0;return q|0}n=da(((d[r]|0)<<8)+s|0,17109811)|0;o=e;p=n+o|0;q=da(p,17109811)|0;return q|0}
-
-
-
-function Mz(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0.0,G=0.0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0.0,Q=0.0,S=0,T=0,U=0.0,V=0.0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,_a=0,$a=0.0,ab=0.0,bb=0.0,cb=0,db=0.0,eb=0.0,fb=0,gb=0.0,hb=0.0,ib=0.0,jb=0,kb=0.0,lb=0.0,mb=0.0,nb=0,ob=0.0,pb=0.0,qb=0.0,rb=0,sb=0.0,tb=0.0,ub=0.0,vb=0,wb=0.0,xb=0.0,yb=0.0,zb=0,Ab=0.0,Bb=0.0,Cb=0.0,Db=0,Eb=0.0,Fb=0.0,Gb=0.0,Hb=0,Ib=0.0,Jb=0.0,Kb=0.0,Lb=0,Mb=0.0,Nb=0.0,Ob=0.0,Pb=0.0,Qb=0,Rb=0.0,Sb=0.0,Tb=0,Ub=0.0,Vb=0.0,Wb=0.0,Xb=0.0,Yb=0,Zb=0.0,_b=0.0,$b=0,ac=0.0,bc=0.0,dc=0.0,ec=0,fc=0.0,gc=0.0,hc=0.0,ic=0.0,jc=0,kc=0.0,lc=0.0,mc=0.0,nc=0,oc=0.0,pc=0.0,qc=0.0,rc=0.0,sc=0,tc=0.0,uc=0.0,vc=0,wc=0.0,xc=0.0,yc=0.0,zc=0;j=i;i=i+424|0;k=j|0;l=j+40|0;m=j+72|0;n=j+104|0;p=j+136|0;q=j+168|0;r=j+200|0;s=j+232|0;t=j+264|0;u=j+296|0;v=j+328|0;w=j+360|0;x=j+392|0;y=jk(28)|0;z=y;A=$g(173192,c[43332]|0)|0;B=y+20|0;c[B>>2]=A;do{if((A|0)==0){Ma(84568,14,1,c[o>>2]|0)|0;C=6}else{D=tz()|0;c[y+24>>2]=D;if((D|0)==0){Ma(84568,14,1,c[o>>2]|0)|0;C=6;break}else{c[y>>2]=b;c[y+4>>2]=d;c[y+8>>2]=e;c[y+12>>2]=f;c[y+16>>2]=g;E=z;break}}}while(0);if((C|0)==6){z=c[B>>2]|0;if((z|0)!=0){Vg(z)|0}z=c[y+24>>2]|0;if((z|0)!=0){uz(z)|0}eF(y);E=0}y=c[E+16>>2]|0;F=+h[y+16>>3];G=+h[y+24>>3];y=~~(F>G?F:G);if((y|0)==0){H=0}else{z=y>>>0>65535>>>0;B=z?y>>>16:y;y=z?16:0;if(B>>>0>255>>>0){I=y|8;J=B>>>8}else{I=y;J=B}if(J>>>0>15>>>0){K=I+4|0;L=J>>>4}else{K=I;L=J}if(L>>>0>3>>>0){M=K+2|0;N=L>>>2}else{M=K;N=L}H=M+1+(N>>>0>1>>>0)|0}N=E+4|0;a:do{if((c[N>>2]|0)>0){M=E|0;L=E+20|0;if((H|0)>0){O=0}else{K=0;while(1){J=jk(32)|0;c[J+28>>2]=(c[M>>2]|0)+(K*40|0);I=c[M>>2]|0;B=c[I+(K*40|0)+32>>2]|0;if((B|0)==0){P=0.0;Q=0.0}else{P=+h[B>>3];Q=+h[B+8>>3]}G=+h[I+(K*40|0)>>3];B=~~+R(G-P);F=+h[I+(K*40|0)+8>>3];y=~~+R(F-Q);z=~~+ca(P+(G+ +h[I+(K*40|0)+16>>3]));if((z|0)==2147483647){C=34;break}f=~~+ca(Q+(F+ +h[I+(K*40|0)+24>>3]));if((f|0)==2147483647){C=36;break}c[J+12>>2]=B;c[J+16>>2]=y;c[J+20>>2]=z;c[J+24>>2]=f;c[J+8>>2]=0;f=c[L>>2]|0;z=K+1|0;if((Hc[c[f>>2]&63](f,J,1)|0)==0){S=-1;C=123;break}if((z|0)<(c[N>>2]|0)){K=z}else{T=L;break a}}if((C|0)==34){cc(94960,147512,264,170168);return 0}else if((C|0)==36){cc(89528,147512,266,170168);return 0}else if((C|0)==123){i=j;return S|0}}while(1){K=jk(32)|0;c[K+28>>2]=(c[M>>2]|0)+(O*40|0);z=c[M>>2]|0;J=c[z+(O*40|0)+32>>2]|0;if((J|0)==0){U=0.0;V=0.0}else{U=+h[J>>3];V=+h[J+8>>3]}F=+h[z+(O*40|0)>>3];J=~~+R(F-U);G=+h[z+(O*40|0)+8>>3];f=~~+R(G-V);y=~~+ca(U+(F+ +h[z+(O*40|0)+16>>3]));if((y|0)==2147483647){C=34;break}B=~~+ca(V+(G+ +h[z+(O*40|0)+24>>3]));if((B|0)==2147483647){C=36;break}c[K+12>>2]=J;c[K+16>>2]=f;c[K+20>>2]=y;c[K+24>>2]=B;z=((B-f|0)/2|0)+f|0;f=((y-J|0)/2|0)+J|0;J=0;y=H;while(1){B=y-1|0;I=f>>>(B>>>0)&1;e=z>>>(B>>>0)&1;W=I<<1|J<<2|e^I;A=e-1|0;e=A&(z^f);D=A&-I;if((B|0)>0){z=e^z^D;f=e^f^D;J=W;y=B}else{break}}c[K+8>>2]=W;y=c[L>>2]|0;J=O+1|0;if((Hc[c[y>>2]&63](y,K,1)|0)==0){S=-1;C=123;break}if((J|0)<(c[N>>2]|0)){O=J}else{T=L;break a}}if((C|0)==34){cc(94960,147512,264,170168);return 0}else if((C|0)==36){cc(89528,147512,266,170168);return 0}else if((C|0)==123){i=j;return S|0}}else{T=E+20|0}}while(0);O=c[T>>2]|0;N=Hc[c[O>>2]&63](O,0,128)|0;if((N|0)!=0){O=E+24|0;W=N;do{N=c[O>>2]|0;xz(N,W+12|0,c[W+28>>2]|0,N|0,0)|0;N=c[T>>2]|0;W=Hc[c[N>>2]&63](N,W,8)|0;}while((W|0)!=0)}W=bh(c[T>>2]|0)|0;b:do{if((bh(c[T>>2]|0)|0)==0){X=0}else{O=0;while(1){N=c[T>>2]|0;H=c[(c[N+8>>2]|0)+4>>2]|0;if((H|0)==0){C=47;break}L=c[(c[N+4>>2]|0)+8>>2]|0;if((L|0)<0){Y=c[H+8>>2]|0}else{Y=H+(-L|0)|0}if((Y|0)==0){C=47;break}Hc[c[N>>2]&63](N,Y,4096)|0;eF(Y);N=O+1|0;if((bh(c[T>>2]|0)|0)==0){X=N;break b}else{O=N}}if((C|0)==47){cc(106312,147512,616,169816);return 0}}}while(0);if((W|0)!=(X|0)){cc(100584,147512,623,169816);return 0}X=Vg(c[T>>2]|0)|0;if((X|0)<0){S=X;i=j;return S|0}if((d|0)>0){X=k;T=k|0;W=l|0;Y=l+8|0;O=l+16|0;N=l+24|0;L=g+32|0;g=m|0;H=m+8|0;M=m+16|0;J=m+24|0;y=n|0;f=n+8|0;z=n+16|0;B=n+24|0;D=p|0;e=p+8|0;I=p+16|0;A=p+24|0;Z=q|0;_=q+8|0;$=q+16|0;aa=q+24|0;ba=r|0;da=r+8|0;ea=r+16|0;fa=r+24|0;ga=s|0;ha=s+8|0;ia=s+16|0;ja=s+24|0;ka=t|0;la=t+8|0;ma=t+16|0;na=t+24|0;oa=k+24|0;pa=k+28|0;qa=k+32|0;ra=k+12|0;sa=k+8|0;ta=k+4|0;ua=k+20|0;k=w|0;va=w+8|0;wa=w+16|0;xa=w+24|0;ya=x|0;za=x+8|0;Aa=x+16|0;Ba=x+24|0;Ca=u|0;Da=u+8|0;Ea=u+16|0;Fa=u+24|0;Ga=v|0;Ha=v+8|0;Ia=v+16|0;Ja=v+24|0;Ka=0;La=0;while(1){Na=b+(Ka*40|0)+32|0;Oa=c[Na>>2]|0;do{if((Oa|0)==0){Pa=La}else{Qa=b+(Ka*40|0)|0;Ra=Oa|0;V=+h[Ra>>3];Sa=b+(Ka*40|0)+16|0;U=(V*2.0+ +h[Sa>>3])*.125;Ta=Oa+8|0;Ua=b+(Ka*40|0)+24|0;Q=(+h[Ta>>3]*2.0+ +h[Ua>>3])*.5;vF(X|0,0,36)|0;Va=Qa|0;Wa=Oa+16|0;h[Wa>>3]=+h[Va>>3]-V;Xa=b+(Ka*40|0)+8|0;Ya=Oa+24|0;h[Ya>>3]=+h[Xa>>3]+ +h[Ua>>3];Nz(l,E,Qa,T);Za=c[W>>2]|0;V=+h[Y>>3];P=+h[O>>3];G=+h[N>>3];c:do{if((Za|0)==0){_a=0;$a=V;ab=P;bb=G}else{h[Ya>>3]=+h[Xa>>3];Nz(m,E,Qa,T);cb=c[g>>2]|0;F=+h[H>>3];db=+h[M>>3];eb=+h[J>>3];if((cb|0)==0){_a=0;$a=F;ab=db;bb=eb;break}if(F<V){fb=cb;gb=F;hb=db;ib=eb}else{fb=Za;gb=V;hb=P;ib=G}h[Ya>>3]=+h[Xa>>3]- +h[Ta>>3];Nz(n,E,Qa,T);cb=c[y>>2]|0;eb=+h[f>>3];db=+h[z>>3];F=+h[B>>3];if((cb|0)==0){_a=0;$a=eb;ab=db;bb=F;break}if(eb<gb){jb=cb;kb=eb;lb=db;mb=F}else{jb=fb;kb=gb;lb=hb;mb=ib}h[Wa>>3]=+h[Va>>3];h[Ya>>3]=+h[Xa>>3]+ +h[Ua>>3];Nz(p,E,Qa,T);cb=c[D>>2]|0;F=+h[e>>3];db=+h[I>>3];eb=+h[A>>3];if((cb|0)==0){_a=0;$a=F;ab=db;bb=eb;break}if(F<kb){nb=cb;ob=F;pb=db;qb=eb}else{nb=jb;ob=kb;pb=lb;qb=mb}h[Ya>>3]=+h[Xa>>3]- +h[Ta>>3];Nz(q,E,Qa,T);cb=c[Z>>2]|0;eb=+h[_>>3];db=+h[$>>3];F=+h[aa>>3];if((cb|0)==0){_a=0;$a=eb;ab=db;bb=F;break}if(eb<ob){rb=cb;sb=eb;tb=db;ub=F}else{rb=nb;sb=ob;tb=pb;ub=qb}h[Wa>>3]=+h[Va>>3]+ +h[Sa>>3];h[Ya>>3]=+h[Xa>>3]+ +h[Ua>>3];Nz(r,E,Qa,T);cb=c[ba>>2]|0;F=+h[da>>3];db=+h[ea>>3];eb=+h[fa>>3];if((cb|0)==0){_a=0;$a=F;ab=db;bb=eb;break}if(F<sb){vb=cb;wb=F;xb=db;yb=eb}else{vb=rb;wb=sb;xb=tb;yb=ub}h[Ya>>3]=+h[Xa>>3];Nz(s,E,Qa,T);cb=c[ga>>2]|0;eb=+h[ha>>3];db=+h[ia>>3];F=+h[ja>>3];if((cb|0)==0){_a=0;$a=eb;ab=db;bb=F;break}if(eb<wb){zb=cb;Ab=eb;Bb=db;Cb=F}else{zb=vb;Ab=wb;Bb=xb;Cb=yb}h[Ya>>3]=+h[Xa>>3]- +h[Ta>>3];Nz(t,E,Qa,T);cb=c[ka>>2]|0;F=+h[la>>3];db=+h[ma>>3];eb=+h[na>>3];if((cb|0)==0){_a=0;$a=F;ab=db;bb=eb;break}if(F<Ab){Db=cb;Eb=F;Fb=db;Gb=eb}else{Db=zb;Eb=Ab;Fb=Bb;Gb=Cb}cb=(c[pa>>2]|0)==0;do{if((c[oa>>2]|0)==0){if(!cb){Hb=Db;Ib=Eb;Jb=Fb;Kb=Gb;C=89;break}if((c[qa>>2]|0)!=0){Hb=Db;Ib=Eb;Jb=Fb;Kb=Gb;C=89;break}if((c[ra>>2]|0)!=0){C=84;break}if((c[T>>2]|0)==0){Lb=Db;Mb=Eb;Nb=Fb;Ob=Gb}else{C=84}}else{if(!cb){Hb=Db;Ib=Eb;Jb=Fb;Kb=Gb;C=89;break}if((c[qa>>2]|0)==0){C=84}else{Hb=Db;Ib=Eb;Jb=Fb;Kb=Gb;C=89}}}while(0);do{if((C|0)==84){C=0;eb=+h[Va>>3]- +h[Ra>>3];h[Wa>>3]=eb;h[Ya>>3]=+h[Xa>>3]+ +h[Ua>>3];if(eb>+h[Va>>3]+ +h[Sa>>3]){Hb=Db;Ib=Eb;Jb=Fb;Kb=Gb;C=89;break}else{Pb=Eb;Qb=Db;Rb=Fb;Sb=Gb}while(1){Nz(u,E,Qa,T);cb=c[Ca>>2]|0;eb=+h[Da>>3];db=+h[Ea>>3];F=+h[Fa>>3];if((cb|0)==0){_a=0;$a=eb;ab=db;bb=F;break c}if(eb<Pb){Tb=cb;Ub=eb;Vb=db;Wb=F}else{Tb=Qb;Ub=Pb;Vb=Rb;Wb=Sb}F=U+ +h[Wa>>3];h[Wa>>3]=F;if(F>+h[Va>>3]+ +h[Sa>>3]){Hb=Tb;Ib=Ub;Jb=Vb;Kb=Wb;C=89;break}else{Pb=Ub;Qb=Tb;Rb=Vb;Sb=Wb}}}}while(0);do{if((C|0)==89){C=0;if((c[ra>>2]|0)!=0){Lb=Hb;Mb=Ib;Nb=Jb;Ob=Kb;break}if((c[T>>2]|0)!=0){Lb=Hb;Mb=Ib;Nb=Jb;Ob=Kb;break}h[Wa>>3]=+h[Va>>3]- +h[Ra>>3];F=+h[Xa>>3]+ +h[Ua>>3];h[Ya>>3]=F;if(F<+h[Xa>>3]- +h[Ta>>3]){Lb=Hb;Mb=Ib;Nb=Jb;Ob=Kb;break}else{Xb=Ib;Yb=Hb;Zb=Jb;_b=Kb}while(1){Nz(v,E,Qa,T);cb=c[Ga>>2]|0;F=+h[Ha>>3];db=+h[Ia>>3];eb=+h[Ja>>3];if((cb|0)==0){_a=0;$a=F;ab=db;bb=eb;break c}if(F<Xb){$b=cb;ac=F;bc=db;dc=eb}else{$b=Yb;ac=Xb;bc=Zb;dc=_b}eb=+h[Ya>>3]-Q;h[Ya>>3]=eb;if(eb<+h[Xa>>3]- +h[Ta>>3]){Lb=$b;Mb=ac;Nb=bc;Ob=dc;break}else{Xb=ac;Yb=$b;Zb=bc;_b=dc}}}}while(0);h[Wa>>3]=+h[Va>>3]+ +h[Sa>>3];eb=+h[Ta>>3];h[Ya>>3]=+h[Xa>>3]-eb;cb=(c[ta>>2]|0)==0;do{if((c[sa>>2]|0)==0){if(!cb){ec=Lb;fc=Mb;gc=Nb;hc=Ob;break}if((c[T>>2]|0)!=0){ec=Lb;fc=Mb;gc=Nb;hc=Ob;break}if((c[ua>>2]|0)!=0){C=103;break}if((c[qa>>2]|0)==0){_a=Lb;$a=Mb;ab=Nb;bb=Ob;break c}else{C=103}}else{if(!cb){ec=Lb;fc=Mb;gc=Nb;hc=Ob;break}if((c[T>>2]|0)==0){C=103}else{ec=Lb;fc=Mb;gc=Nb;hc=Ob}}}while(0);do{if((C|0)==103){C=0;db=+h[Va>>3]+ +h[Sa>>3];h[Wa>>3]=db;h[Ya>>3]=+h[Xa>>3]-eb;if(db<+h[Va>>3]- +h[Ra>>3]){ec=Lb;fc=Mb;gc=Nb;hc=Ob;break}else{ic=Mb;jc=Lb;kc=Nb;lc=Ob}while(1){Nz(w,E,Qa,T);cb=c[k>>2]|0;db=+h[va>>3];F=+h[wa>>3];mc=+h[xa>>3];if((cb|0)==0){_a=0;$a=db;ab=F;bb=mc;break c}if(db<ic){nc=cb;oc=db;pc=F;qc=mc}else{nc=jc;oc=ic;pc=kc;qc=lc}mc=+h[Wa>>3]-U;h[Wa>>3]=mc;if(mc<+h[Va>>3]- +h[Ra>>3]){ec=nc;fc=oc;gc=pc;hc=qc;break}else{ic=oc;jc=nc;kc=pc;lc=qc}}}}while(0);if((c[ua>>2]|0)!=0){_a=ec;$a=fc;ab=gc;bb=hc;break}if((c[qa>>2]|0)!=0){_a=ec;$a=fc;ab=gc;bb=hc;break}h[Wa>>3]=+h[Va>>3]+ +h[Sa>>3];eb=+h[Xa>>3]- +h[Ta>>3];h[Ya>>3]=eb;if(eb>+h[Xa>>3]+ +h[Ua>>3]){_a=ec;$a=fc;ab=gc;bb=hc;break}else{rc=fc;sc=ec;tc=gc;uc=hc}while(1){Nz(x,E,Qa,T);cb=c[ya>>2]|0;eb=+h[za>>3];mc=+h[Aa>>3];F=+h[Ba>>3];if((cb|0)==0){_a=0;$a=eb;ab=mc;bb=F;break c}if(eb<rc){vc=cb;wc=eb;xc=mc;yc=F}else{vc=sc;wc=rc;xc=tc;yc=uc}F=Q+ +h[Ya>>3];h[Ya>>3]=F;if(F>+h[Xa>>3]+ +h[Ua>>3]){_a=vc;$a=wc;ab=xc;bb=yc;break}else{rc=wc;sc=vc;tc=xc;uc=yc}}}}while(0);if((_a|0)==0){a[(c[Na>>2]|0)+36|0]=1;Pa=La;break}if($a==0.0){h[(c[Na>>2]|0)+16>>3]=ab;h[(c[Na>>2]|0)+24>>3]=bb;a[(c[Na>>2]|0)+36|0]=1;Pa=La;break}if((a[L]|0)!=1){Pa=1;break}h[(c[Na>>2]|0)+16>>3]=ab;h[(c[Na>>2]|0)+24>>3]=bb;a[(c[Na>>2]|0)+36|0]=1;Pa=La}}while(0);Na=Ka+1|0;if((Na|0)<(d|0)){Ka=Na;La=Pa}else{zc=Pa;break}}}else{zc=0}uz(c[E+24>>2]|0)|0;eF(E);S=zc;i=j;return S|0}function Nz(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0.0,t=0,u=0.0,v=0,w=0.0,x=0.0,y=0,z=0,A=0,B=0.0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0.0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0.0,S=0.0,T=0,U=0.0,V=0,W=0,X=0,Y=0.0,Z=0.0,_=0.0,$=0,aa=0.0,ba=0,ca=0.0,da=0.0,ea=0.0,fa=0.0;g=i;i=i+32|0;j=g|0;k=e+32|0;l=c[k>>2]|0;if((l|0)==0){cc(101272,147512,382,169800)}m=l+16|0;n=g+16|0;c[n>>2]=c[m>>2];c[n+4>>2]=c[m+4>>2];c[n+8>>2]=c[m+8>>2];c[n+12>>2]=c[m+12>>2];m=c[d+4>>2]|0;a:do{if((m|0)>0){o=c[d>>2]|0;p=0;q=0;b:while(1){do{if((o+(q*40|0)|0)==(e|0)){r=p}else{s=+h[o+(q*40|0)+16>>3];if(s>0.0){if(+h[o+(q*40|0)+24>>3]>0.0){r=p;break}}if(s!=0.0){t=10;break b}if(+h[o+(q*40|0)+24>>3]!=0.0){t=10;break b}s=+h[o+(q*40|0)>>3];u=+h[l+16>>3];do{if(s>u){if(s>=u+ +h[l>>3]){v=0;break}w=+h[o+(q*40|0)+8>>3];x=+h[l+24>>3];if(w<=x){v=0;break}v=w<x+ +h[l+8>>3]|0}else{v=0}}while(0);r=v+p|0}}while(0);y=q+1|0;if((y|0)<(m|0)){p=r;q=y}else{z=r;break a}}if((t|0)==10){cc(112928,147512,219,170448)}}else{z=0}}while(0);r=l+16|0;m=j|0;c[m>>2]=~~+h[r>>3];v=l+24|0;q=j+4|0;c[q>>2]=~~+h[v>>3];p=j+8|0;c[p>>2]=~~(+h[r>>3]+ +h[l>>3]);r=j+12|0;c[r>>2]=~~(+h[v>>3]+ +h[l+8>>3]);l=c[d+24>>2]|0;d=wz(l,c[l>>2]|0,j)|0;if((d|0)==0){c[b>>2]=z;h[b+8>>3]=0.0;j=b+16|0;c[j>>2]=c[n>>2];c[j+4>>2]=c[n+4>>2];c[j+8>>2]=c[n+8>>2];c[j+12>>2]=c[n+12>>2];i=g;return}j=e|0;l=e+8|0;v=d;u=0.0;o=z;c:while(1){z=c[(c[v+4>>2]|0)+16>>2]|0;y=z;do{if((y|0)==(e|0)){A=o;B=u}else{C=z;s=+h[C>>3];D=~~s;E=z+8|0;x=+h[E>>3];F=~~x;G=~~(s+ +h[z+16>>3]);H=~~(x+ +h[z+24>>3]);I=c[p>>2]|0;do{if((I|0)<(D|0)){J=o;K=u}else{L=c[m>>2]|0;if((L|0)>(G|0)){J=o;K=u;break}M=c[r>>2]|0;if((M|0)<(F|0)){J=o;K=u;break}N=c[q>>2]|0;if((N|0)>(H|0)){J=o;K=u;break}w=(+(((I|0)<(G|0)?I:G)|0)- +(((L|0)>(D|0)?L:D)|0))*(+(((M|0)<(H|0)?M:H)|0)- +(((N|0)>(F|0)?N:F)|0));if(w<=0.0){J=o;K=u;break}O=c[k>>2]|0;P=c[z+32>>2]|0;if((O|0)==(P|0)){t=27;break c}do{if((a[O+36|0]|0)==0){Q=-1}else{if((a[P+36|0]|0)==0){Q=-1;break}R=+h[j>>3];if(R==0.0){if(+h[l>>3]==0.0){Q=-1;break}}if(s==0.0&x==0.0){Q=-1;break}S=+h[l>>3];if(x<S){if(s<R){Q=0;break}Q=s>R?2:1;break}T=s<R;if(x>S){if(T){Q=6;break}Q=s>R?8:7;break}if(T){Q=3;break}if(s<=R){Q=-1;break}Q=5}}while(0);P=f+(((Q|0)<0?5:Q)<<2)|0;O=c[P>>2]|0;do{if((O|0)==0){c[P>>2]=y;U=w}else{R=+h[O>>3];T=~~R;S=+h[O+8>>3];V=~~S;W=~~(R+ +h[O+16>>3]);X=~~(S+ +h[O+24>>3]);if((I|0)<(T|0)|(L|0)>(W|0)|(M|0)<(V|0)|(N|0)>(X|0)){Y=0.0}else{Y=(+(((I|0)<(W|0)?I:W)|0)- +(((L|0)>(T|0)?L:T)|0))*(+(((M|0)<(X|0)?M:X)|0)- +(((N|0)>(V|0)?N:V)|0))}S=Y>w?Y:0.0;V=c[O+32>>2]|0;do{if((V|0)==0){Z=S}else{R=+h[V+16>>3];X=~~R;_=+h[V+24>>3];T=~~_;W=~~(R+ +h[V>>3]);$=~~(_+ +h[V+8>>3]);if((I|0)<(X|0)|(L|0)>(W|0)|(M|0)<(T|0)|(N|0)>($|0)){aa=0.0}else{aa=(+(((I|0)<(W|0)?I:W)|0)- +(((L|0)>(X|0)?L:X)|0))*(+(((M|0)<($|0)?M:$)|0)- +(((N|0)>(T|0)?N:T)|0))}if(aa<=w){Z=S;break}Z=aa>S?aa:S}}while(0);if(Z>0.0){U=Z;break}c[P>>2]=y;U=w}}while(0);J=o+1|0;K=u+U}}while(0);F=c[z+32>>2]|0;if((F|0)==0){A=J;B=K;break}if((a[F+36|0]|0)==0){A=J;B=K;break}s=+h[F+16>>3];H=~~s;x=+h[F+24>>3];D=~~x;G=~~(s+ +h[F>>3]);P=~~(x+ +h[F+8>>3]);if((I|0)<(H|0)){A=J;B=K;break}N=c[m>>2]|0;if((N|0)>(G|0)){A=J;B=K;break}M=c[r>>2]|0;if((M|0)<(D|0)){A=J;B=K;break}L=c[q>>2]|0;if((L|0)>(P|0)){A=J;B=K;break}x=(+(((I|0)<(G|0)?I:G)|0)- +(((N|0)>(H|0)?N:H)|0))*(+(((M|0)<(P|0)?M:P)|0)- +(((L|0)>(D|0)?L:D)|0));if(x<=0.0){A=J;B=K;break}D=c[k>>2]|0;if((D|0)==(F|0)){t=62;break c}do{if((a[D+36|0]|0)==0){ba=-1}else{s=+h[j>>3];if(s==0.0){if(+h[l>>3]==0.0){ba=-1;break}}w=+h[C>>3];S=+h[E>>3];if(w==0.0&S==0.0){ba=-1;break}_=+h[l>>3];if(S<_){if(w<s){ba=0;break}ba=w>s?2:1;break}F=w<s;if(S>_){if(F){ba=6;break}ba=w>s?8:7;break}if(F){ba=3;break}if(w<=s){ba=-1;break}ba=5}}while(0);E=f+(((ba|0)<0?5:ba)<<2)|0;C=c[E>>2]|0;do{if((C|0)==0){c[E>>2]=y;ca=x}else{s=+h[C>>3];D=~~s;w=+h[C+8>>3];F=~~w;P=~~(s+ +h[C+16>>3]);H=~~(w+ +h[C+24>>3]);if((I|0)<(D|0)|(N|0)>(P|0)|(M|0)<(F|0)|(L|0)>(H|0)){da=0.0}else{da=(+(((I|0)<(P|0)?I:P)|0)- +(((N|0)>(D|0)?N:D)|0))*(+(((M|0)<(H|0)?M:H)|0)- +(((L|0)>(F|0)?L:F)|0))}w=da>x?da:0.0;F=c[C+32>>2]|0;do{if((F|0)==0){ea=w}else{s=+h[F+16>>3];H=~~s;_=+h[F+24>>3];D=~~_;P=~~(s+ +h[F>>3]);G=~~(_+ +h[F+8>>3]);if((I|0)<(H|0)|(N|0)>(P|0)|(M|0)<(D|0)|(L|0)>(G|0)){fa=0.0}else{fa=(+(((I|0)<(P|0)?I:P)|0)- +(((N|0)>(H|0)?N:H)|0))*(+(((M|0)<(G|0)?M:G)|0)- +(((L|0)>(D|0)?L:D)|0))}if(fa<=x){ea=w;break}ea=fa>w?fa:w}}while(0);if(ea>0.0){ca=ea;break}c[E>>2]=y;ca=x}}while(0);A=J+1|0;B=K+ca}}while(0);y=c[v>>2]|0;if((y|0)==0){t=89;break}else{v=y;u=B;o=A}}if((t|0)==27){cc(121496,147512,276,170536)}else if((t|0)==62){cc(121496,147512,276,170536)}else if((t|0)==89){sz(d);c[b>>2]=A;h[b+8>>3]=B;A=b+16|0;c[A>>2]=c[n>>2];c[A+4>>2]=c[n+4>>2];c[A+8>>2]=c[n+8>>2];c[A+12>>2]=c[n+12>>2];i=g;return}}function Oz(){var a=0;Wv(0,1,167424,164312)|0;a=Wz(0,1)|0;Vz(a,0);return a|0}function Pz(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0;f=i;i=i+256|0;if((HA(b,e)|0)==999){g=NA(b,1,e)|0;Fv(1,131864,(j=i,i=i+16|0,c[j>>2]=e,c[j+8>>2]=g,j)|0)|0;i=j;k=-1;i=f;return k|0}if((IA(b,d)|0)==-1){k=-1;i=f;return k|0}b=c[d+8>>2]|0;g=f|0;if((a[(c[b+8>>2]|0)+81|0]|0)==0){l=+h[b+16>>3];if(l<0.0){m=l+-.5}else{m=l+.5}l=+h[b+24>>3];if(l<0.0){n=l+-.5}else{n=l+.5}l=+h[b+32>>3];if(l<0.0){o=l+-.5}else{o=l+.5}l=+h[b+40>>3];if(l<0.0){p=l+-.5}else{p=l+.5}nb(g|0,116720,(j=i,i=i+32|0,c[j>>2]=~~m,c[j+8>>2]=~~n,c[j+16>>2]=~~o,c[j+24>>2]=~~p,j)|0)|0;i=j}else{p=+h[b+24>>3];if(p<0.0){q=p+-.5}else{q=p+.5}p=+h[b+16>>3];if(p<0.0){r=p+-.5}else{r=p+.5}p=+h[b+40>>3];if(p<0.0){s=p+-.5}else{s=p+.5}p=+h[b+32>>3];if(p<0.0){t=p+-.5}else{t=p+.5}nb(g|0,116720,(j=i,i=i+32|0,c[j>>2]=~~q,c[j+8>>2]=~~r,c[j+16>>2]=~~s,c[j+24>>2]=~~t,j)|0)|0;i=j}iw(d|0,109272,g,213384)|0;k=0;i=f;return k|0}function Qz(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0;f=c[b+48>>2]|0;CA(a,d)|0;d=c[a+164>>2]|0;c[d+56>>2]=OA(d,c[d+52>>2]|0)|0;do{if((c[(c[f+8>>2]|0)+8>>2]|0)==0){if((c[d+152>>2]&67108864|0)!=0){break}Ma(92216,20,1,c[o>>2]|0)|0;g=-1;return g|0}}while(0);BA(a,e);e=_h(a,f)|0;QA(d);cA(d);GA(a);g=e;return g|0}function Rz(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0;g=i;h=c[b+48>>2]|0;CA(a,d)|0;d=c[a+164>>2]|0;c[d+56>>2]=OA(d,c[d+52>>2]|0)|0;do{if((c[(c[h+8>>2]|0)+8>>2]|0)==0){if((c[d+152>>2]&67108864|0)!=0){break}Ma(92216,20,1,c[o>>2]|0)|0;j=-1;i=g;return j|0}}while(0);do{if((e|0)!=0){b=dF(4096)|0;c[e>>2]=b;if((b|0)==0){break}k=d+40|0;c[k>>2]=b;c[d+44>>2]=4096;b=d+48|0;c[b>>2]=0;l=_h(a,h)|0;QA(d);if((l|0)==0){c[e>>2]=c[k>>2];c[f>>2]=c[b>>2]}GA(a);j=l;i=g;return j|0}}while(0);Fv(1,86872,(a=i,i=i+1|0,i=i+7&-8,c[a>>2]=0,a)|0)|0;i=a;j=-1;i=g;return j|0}function Sz(a){a=a|0;eF(a);return}function Tz(a,b){a=a|0;b=b|0;Uz(a,0,b);return}function Uz(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;e=c[d>>2]|0;f=kk(12)|0;g=f;if((b|0)==0){h=0}else{h=Lb(b|0)|0}c[f+4>>2]=h;c[f+8>>2]=Lb(e|0)|0;e=a+100|0;c[f>>2]=c[e>>2];c[e>>2]=g;e=c[d+4>>2]|0;d=c[e+4>>2]|0;if((d|0)==0){return}else{i=e;j=d}while(1){d=c[j+4>>2]|0;if((d|0)!=0){e=i|0;f=0;h=d;do{LA(a,c[e>>2]|0,h,c[j+(f*20|0)+8>>2]|0,g,j+(f*20|0)|0)|0;f=f+1|0;h=c[j+(f*20|0)+4>>2]|0;}while((h|0)!=0)}h=c[i+12>>2]|0;if((h|0)==0){break}else{i=i+8|0;j=h}}return}function Vz(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;d=c[b+32>>2]|0;if((d|0)==0){e=b+44|0;a[e]=0;f=zB(b)|0;g=tm(b)|0;return}h=c[d>>2]|0;if((h|0)==0){e=b+44|0;a[e]=0;f=zB(b)|0;g=tm(b)|0;return}i=b+100|0;j=d;d=h;do{do{if((a[d]|0)==103){if((Ua(d|0,138896)|0)==0){break}h=c[j+4>>2]|0;k=c[h>>2]|0;l=kk(12)|0;m=l;c[l+4>>2]=0;c[l+8>>2]=Lb(k|0)|0;c[l>>2]=c[i>>2];c[i>>2]=m;l=c[h+4>>2]|0;h=c[l+4>>2]|0;if((h|0)==0){break}else{n=l;o=h}while(1){h=c[o+4>>2]|0;if((h|0)!=0){l=n|0;k=0;p=h;do{LA(b,c[l>>2]|0,p,c[o+(k*20|0)+8>>2]|0,m,o+(k*20|0)|0)|0;k=k+1|0;p=c[o+(k*20|0)+4>>2]|0;}while((p|0)!=0)}p=c[n+12>>2]|0;if((p|0)==0){break}else{n=n+8|0;o=p}}}}while(0);j=j+8|0;d=c[j>>2]|0;}while((d|0)!=0);e=b+44|0;a[e]=0;f=zB(b)|0;g=tm(b)|0;return}function Wz(a,b){a=a|0;b=b|0;var d=0,e=0;d=jk(392)|0;e=d;if((d|0)==0){return e|0}c[d>>2]=172736;c[d+16>>2]=24;c[d+32>>2]=a;c[d+36>>2]=b;return e|0}function Xz(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0,r=0,s=0,t=0,u=0;d=i;i=i+104|0;e=d|0;f=c[b+76>>2]|0;g=c[b>>2]|0;do{if((f|0)==0){h=4}else{j=c[f>>2]|0;if((j|0)==0){h=4;break}Cc[j&255](b)}}while(0);do{if((h|0)==4){if((c[b+40>>2]|0)!=0){break}f=b+36|0;if((c[f>>2]|0)!=0){break}if((a[g+13|0]|0)==0){k=c[b+32>>2]|0}else{j=e|0;l=c[b+24>>2]|0;if((l|0)==0){a[j]=0}else{nb(j|0,154200,(m=i,i=i+8|0,c[m>>2]=l+1,m)|0)|0;i=m}l=c[b+20>>2]|0;n=(l|0)!=0?l:151040;l=xF(n|0)|0;o=xF(j|0)|0;q=b+52|0;r=l+1+o+(xF(c[q>>2]|0)|0)|0;if((c[53236]|0)>>>0<(r+1|0)>>>0){o=r+11|0;c[53236]=o;r=gF(c[53238]|0,o)|0;c[53238]=r;s=r}else{s=c[53238]|0}zF(s|0,n|0)|0;AF(c[53238]|0,j|0)|0;j=c[53238]|0;n=j+(xF(j|0)|0)|0;z=46;a[n]=z;z=z>>8;a[n+1|0]=z;n=Lb(c[q>>2]|0)|0;q=ob(n|0,58)|0;j=c[53238]|0;if((q|0)==0){t=j}else{r=q;q=j;while(1){AF(q|0,r+1|0)|0;j=c[53238]|0;o=j+(xF(j|0)|0)|0;z=46;a[o]=z;z=z>>8;a[o+1|0]=z;a[r]=0;o=ob(n|0,58)|0;j=c[53238]|0;if((o|0)==0){t=j;break}else{r=o;q=j}}}AF(t|0,n|0)|0;eF(n);q=c[53238]|0;c[b+32>>2]=q;k=q}if((k|0)==0){c[f>>2]=c[p>>2];break}q=Eb(k|0,119272)|0;c[f>>2]=q;if((q|0)!=0){break}q=c[(c[b+12>>2]|0)+16>>2]|0;r=c[b+32>>2]|0;j=Wb(c[(Vb()|0)>>2]|0)|0;Dc[q&63](156928,(m=i,i=i+16|0,c[m>>2]=r,c[m+8>>2]=j,m)|0);i=m;u=1;i=d;return u|0}}while(0);if((c[b+152>>2]&1024|0)==0){u=0;i=d;return u|0}c[43600]=0;c[43601]=0;c[43602]=0;c[43592]=0;c[43595]=0;c[43593]=0;c[45196]=zg(0,0,0)|0;if((Ag(174368,-1,8,-15,9,0,127008,56)|0)==0){Yz(b,8,10)|0;u=0;i=d;return u|0}else{Dc[c[(c[b+12>>2]|0)+16>>2]&63](114832,(m=i,i=i+1|0,i=i+7&-8,c[m>>2]=0,m)|0);i=m;u=1;i=d;return u|0}return 0}function Yz(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;f=i;g=c[(c[b>>2]|0)+104>>2]|0;if((g|0)!=0){h=Hc[g&63](b,d,e)|0;i=f;return h|0}g=b+40|0;j=c[g>>2]|0;if((j|0)==0){h=Ma(d|0,1,e|0,c[b+36>>2]|0)|0;i=f;return h|0}k=b+44|0;l=b+48|0;m=c[l>>2]|0;do{if(((c[k>>2]|0)-1-m|0)>>>0<e>>>0){n=e+4096+m&-4096;c[k>>2]=n;o=gF(j,n)|0;c[g>>2]=o;if((o|0)==0){Dc[c[(c[b+12>>2]|0)+16>>2]&63](107728,(n=i,i=i+1|0,i=i+7&-8,c[n>>2]=0,n)|0);i=n;mb(1);return 0}else{p=o;q=c[l>>2]|0;break}}else{p=j;q=m}}while(0);tF(p+q|0,d|0,e)|0;d=(c[l>>2]|0)+e|0;c[l>>2]=d;a[(c[g>>2]|0)+d|0]=0;h=e;i=f;return h|0}function Zz(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;e=i;if((d|0)==0|(b|0)==0){f=0;i=e;return f|0}if((c[a+152>>2]&1024|0)==0){if((Yz(a,b,d)|0)==(d|0)){f=d;i=e;return f|0}else{Dc[c[(c[a+12>>2]|0)+16>>2]&63](96176,(g=i,i=i+8|0,c[g>>2]=d,g)|0);i=g;mb(1);return 0}}h=c[45188]|0;j=h+(d<<1)-(c[43596]|0)|0;do{if(h>>>0<j>>>0){k=j+4096&-4096;c[45188]=k;l=gF(c[45190]|0,k)|0;c[45190]=l;if((l|0)!=0){break}Dc[c[(c[a+12>>2]|0)+16>>2]&63](107728,(g=i,i=i+1|0,i=i+7&-8,c[g>>2]=0,g)|0);i=g;mb(1);return 0}}while(0);c[45196]=zg(c[45196]|0,b,d)|0;c[43592]=b;c[43593]=d;while(1){c[43595]=c[45190];c[43596]=c[45188];m=Eg(174368,0)|0;if((m|0)!=0){n=9;break}b=c[43595]|0;j=c[45190]|0;h=b-j|0;if((b|0)!=(j|0)){o=Yz(a,j,h)|0;if((o|0)!=(h|0)){n=12;break}}if((c[43593]|0)==0){f=d;n=15;break}}if((n|0)==9){Dc[c[(c[a+12>>2]|0)+16>>2]&63](102016,(g=i,i=i+8|0,c[g>>2]=m,g)|0);i=g;mb(1);return 0}else if((n|0)==12){Dc[c[(c[a+12>>2]|0)+16>>2]&63](96176,(g=i,i=i+8|0,c[g>>2]=o,g)|0);i=g;mb(1);return 0}else if((n|0)==15){i=e;return f|0}return 0}function _z(a,b){a=a|0;b=b|0;var c=0,d=0;c=xF(b|0)|0;d=(Zz(a,b,c)|0)==(c|0);return(d?1:-1)|0}function $z(b,c){b=b|0;c=c|0;var d=0,e=0,f=0;d=i;i=i+8|0;e=d|0;a[e]=c;f=(Zz(b,e,1)|0)==1;i=d;return(f?c:-1)|0}function aA(b){b=b|0;var d=0,e=0;d=c[b+36>>2]|0;do{if((d|0)==0){e=0}else{if((a[b+144|0]|0)!=0){e=0;break}if((c[(c[b>>2]|0)+104>>2]|0)!=0){e=0;break}e=Ia(d|0)|0}}while(0);return e|0}function bA(b){b=b|0;var d=0,e=0;d=c[b+76>>2]|0;do{if((d|0)!=0){e=c[d+4>>2]|0;if((e|0)==0){break}Cc[e&255](b)}}while(0);d=c[b+36>>2]|0;if((d|0)==0){return}if((a[b+144|0]|0)!=0){return}if((c[(c[b>>2]|0)+104>>2]|0)!=0){return}Ia(d|0)|0;return}function cA(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,q=0;d=i;i=i+8|0;e=d|0;f=e;g=c[b+76>>2]|0;do{if((c[b+152>>2]&1024|0)!=0){c[e>>2]=0;c[e+4>>2]=0;h=e;c[43592]=h;c[43593]=0;j=0;while(1){c[43595]=c[45190];c[43596]=c[45188];k=Eg(174368,4)|0;if((k|0)==1){l=7;break}else if((k|0)!=0){m=j;n=k;l=6;break}k=j+1|0;if((j|0)>=101){m=k;n=0;l=6;break}o=c[45190]|0;Yz(b,o,(c[43595]|0)-o|0)|0;j=k}if((l|0)==6){Dc[c[(c[b+12>>2]|0)+16>>2]&63](80992,(q=i,i=i+16|0,c[q>>2]=n,c[q+8>>2]=m,q)|0);i=q;mb(1)}else if((l|0)==7){j=c[45190]|0;Yz(b,j,(c[43595]|0)-j|0)|0;j=Bg(174368)|0;if((j|0)==0){k=c[45196]|0;a[h]=k;a[f+1|0]=k>>>8;a[f+2|0]=k>>>16;a[f+3|0]=k>>>24;k=c[43594]|0;a[f+4|0]=k;a[f+5|0]=k>>>8;a[f+6|0]=k>>>16;a[f+7|0]=k>>>24;Yz(b,h,8)|0;break}else{Dc[c[(c[b+12>>2]|0)+16>>2]&63](167120,(q=i,i=i+8|0,c[q>>2]=j,q)|0);i=q;mb(1)}}}}while(0);do{if((g|0)!=0){q=c[g+8>>2]|0;if((q|0)==0){break}Cc[q&255](b);i=d;return}}while(0);g=b+36|0;q=c[g>>2]|0;do{if((q|0)!=0){if((a[b+144|0]|0)!=0){break}if((c[(c[b>>2]|0)+104>>2]|0)!=0){break}Ia(q|0)|0}}while(0);q=b+32|0;if((c[q>>2]|0)==0){i=d;return}f=c[g>>2]|0;if((f|0)==(c[p>>2]|0)){i=d;return}if((a[b+144|0]|0)!=0){i=d;return}if((f|0)!=0){Ha(f|0)|0;c[g>>2]=0}c[q>>2]=0;i=d;return}function dA(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+1040|0;f=e+1024|0;g=e|0;h=f;c[h>>2]=d;c[h+4>>2]=0;Zz(a,g,_b(g|0,b|0,f|0)|0)|0;i=e;return}function eA(b,c){b=b|0;c=+c;var d=0,e=0,f=0,g=0.0,h=0.0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;if(c<-1.0e15){d=19856;e=19;f=Zz(b,d,e)|0;return}if(c>1.0e15){d=19857;e=18;f=Zz(b,d,e)|0;return}g=c*100.0;if(g<0.0){h=g+-.5}else{h=g+.5}i=~~h;if((i|0)==0){d=159152;e=1;f=Zz(b,d,e)|0;return}j=(i|0)<0;k=178892;l=j?-i|0:i;i=0;m=2;while(1){n=(l|0)%10|0;o=(l|0)/10|0;if((n|0)==0&i<<24>>24==0){p=0;q=k}else{r=k-1|0;a[r]=n|48;p=1;q=r}do{if((m|0)==1){if(p<<24>>24==0){s=1;t=q;break}r=q-1|0;a[r]=46;s=1;t=r}else{s=p;t=q}}while(0);r=m-1|0;if((l+9|0)>>>0>18>>>0|(r|0)>0){k=t;l=o;i=s;m=r}else{break}}if(j){j=t-1|0;a[j]=45;u=j}else{u=t}d=u;e=178892-u|0;f=Zz(b,d,e)|0;return}function fA(b,d){b=b|0;d=d|0;var e=0,f=0,g=0.0,j=0,k=0,l=0.0,m=0.0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0.0,D=0,E=0,F=0,G=0,H=0;e=i;f=d;d=i;i=i+16|0;c[d>>2]=c[f>>2];c[d+4>>2]=c[f+4>>2];c[d+8>>2]=c[f+8>>2];c[d+12>>2]=c[f+12>>2];g=+h[d>>3];do{if(g<-1.0e15){j=19856;k=19}else{if(g>1.0e15){j=19857;k=18;break}l=g*100.0;if(l<0.0){m=l+-.5}else{m=l+.5}f=~~m;if((f|0)==0){j=159152;k=1;break}n=(f|0)<0;o=178892;p=n?-f|0:f;f=0;q=2;while(1){r=(p|0)%10|0;s=(p|0)/10|0;if((r|0)==0&f<<24>>24==0){t=0;u=o}else{v=o-1|0;a[v]=r|48;t=1;u=v}do{if((q|0)==1){if(t<<24>>24==0){w=1;x=u;break}v=u-1|0;a[v]=46;w=1;x=v}else{w=t;x=u}}while(0);v=q-1|0;if((p+9|0)>>>0>18>>>0|(v|0)>0){o=x;p=s;f=w;q=v}else{break}}if(n){q=x-1|0;a[q]=45;y=q}else{y=x}j=y;k=178892-y|0}}while(0);Zz(b,j,k)|0;Zz(b,163208,1)|0;m=+h[d+8>>3];if(m<-1.0e15){z=19856;A=19;B=Zz(b,z,A)|0;i=e;return}if(m>1.0e15){z=19857;A=18;B=Zz(b,z,A)|0;i=e;return}g=m*100.0;if(g<0.0){C=g+-.5}else{C=g+.5}d=~~C;if((d|0)==0){z=159152;A=1;B=Zz(b,z,A)|0;i=e;return}k=(d|0)<0;j=178892;y=k?-d|0:d;d=0;x=2;while(1){w=(y|0)%10|0;u=(y|0)/10|0;if((w|0)==0&d<<24>>24==0){D=0;E=j}else{t=j-1|0;a[t]=w|48;D=1;E=t}do{if((x|0)==1){if(D<<24>>24==0){F=1;G=E;break}t=E-1|0;a[t]=46;F=1;G=t}else{F=D;G=E}}while(0);n=x-1|0;if((y+9|0)>>>0>18>>>0|(n|0)>0){j=G;y=u;d=F;x=n}else{break}}if(k){k=G-1|0;a[k]=45;H=k}else{H=G}z=H;A=178892-H|0;B=Zz(b,z,A)|0;i=e;return}function gA(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;fA(a,b);if((c|0)>1){d=1}else{return}do{Zz(a,163208,1)|0;fA(a,b+(d<<4)|0);d=d+1|0;}while((d|0)<(c|0));return}function hA(a){a=a|0;return 1}function iA(b){b=b|0;var c=0;a[b+536|0]=0;c=b+336|0;h[c>>3]=10.0/+h[b+352>>3]+ +h[c>>3];a[b+537|0]=1;return 0}function jA(b){b=b|0;var c=0;a[b+536|0]=0;c=b+336|0;h[c>>3]=+h[c>>3]-10.0/+h[b+352>>3];a[b+537|0]=1;return 0}function kA(b){b=b|0;var c=0;a[b+536|0]=0;c=b+344|0;h[c>>3]=+h[c>>3]-10.0/+h[b+352>>3];a[b+537|0]=1;return 0}function lA(b){b=b|0;var c=0;a[b+536|0]=0;c=b+344|0;h[c>>3]=10.0/+h[b+352>>3]+ +h[c>>3];a[b+537|0]=1;return 0}function mA(b){b=b|0;var c=0;a[b+536|0]=0;c=b+352|0;h[c>>3]=+h[c>>3]*1.1;a[b+537|0]=1;return 0}function nA(b){b=b|0;var c=0;a[b+536|0]=0;c=b+352|0;h[c>>3]=+h[c>>3]/1.1;a[b+537|0]=1;return 0}function oA(b){b=b|0;var d=0,e=0,f=0.0,g=0.0;d=b+536|0;e=(a[d]|0)==0;a[d]=e&1;if(!e){return 0}e=c[b+448>>2]|0;d=c[b+452>>2]|0;f=+(e>>>0>>>0)/+(e|0);g=+(d>>>0>>>0)/+(d|0);h[b+352>>3]=f<g?f:g;vF(b+336|0,0,16)|0;a[b+537|0]=1;return 0}function pA(b){b=b|0;var d=0,e=0,f=0;d=c[(c[b>>2]|0)+168>>2]|0;e=b+580|0;if((c[e>>2]|0)!=0){Rh(b,d);f=b+540|0;a[f]=1;return}c[e>>2]=d;e=(c[d+8>>2]|0)+112|0;a[e]=a[e]|2;AA(b,d);Rh(b,d);f=b+540|0;a[f]=1;return}function qA(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0.0,n=0.0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;f=i;g=e;e=i;i=i+16|0;c[e>>2]=c[g>>2];c[e+4>>2]=c[g+4>>2];c[e+8>>2]=c[g+8>>2];c[e+12>>2]=c[g+12>>2];switch(d|0){case 2:{a[b+538|0]=1;a[b+541|0]=2;a[b+537|0]=1;j=b+560|0;k=j;l=e;c[k>>2]=c[l>>2];c[k+4>>2]=c[l+4>>2];c[k+8>>2]=c[l+8>>2];c[k+12>>2]=c[l+12>>2];i=f;return};case 3:{yA(b,+h[e>>3],+h[e+8>>3]);a[b+538|0]=1;a[b+541|0]=3;a[b+537|0]=1;j=b+560|0;k=j;l=e;c[k>>2]=c[l>>2];c[k+4>>2]=c[l+4>>2];c[k+8>>2]=c[l+8>>2];c[k+12>>2]=c[l+12>>2];i=f;return};case 4:{a[b+536|0]=0;if((c[b+360>>2]|0)==0){m=+h[b+352>>3];d=b+336|0;h[d>>3]=(+h[e>>3]- +((c[b+448>>2]|0)>>>0>>>0)*.5)*.10000000000000009/(m*+h[b+520>>3])+ +h[d>>3];d=b+344|0;h[d>>3]=(+h[e+8>>3]- +((c[b+452>>2]|0)>>>0>>>0)*.5)*.10000000000000009/(m*+h[b+528>>3])+ +h[d>>3];n=m}else{m=+h[b+352>>3];d=b+336|0;h[d>>3]=+h[d>>3]-(+h[e+8>>3]- +((c[b+452>>2]|0)>>>0>>>0)*.5)*.10000000000000009/(m*+h[b+528>>3]);d=b+344|0;h[d>>3]=(+h[e>>3]- +((c[b+448>>2]|0)>>>0>>>0)*.5)*.10000000000000009/(m*+h[b+520>>3])+ +h[d>>3];n=m}h[b+352>>3]=n*1.1;a[b+537|0]=1;j=b+560|0;k=j;l=e;c[k>>2]=c[l>>2];c[k+4>>2]=c[l+4>>2];c[k+8>>2]=c[l+8>>2];c[k+12>>2]=c[l+12>>2];i=f;return};case 5:{a[b+536|0]=0;d=b+352|0;n=+h[d>>3]/1.1;h[d>>3]=n;if((c[b+360>>2]|0)==0){d=b+336|0;h[d>>3]=+h[d>>3]-(+h[e>>3]- +((c[b+448>>2]|0)>>>0>>>0)*.5)*.10000000000000009/(n*+h[b+520>>3]);d=b+344|0;h[d>>3]=+h[d>>3]-(+h[e+8>>3]- +((c[b+452>>2]|0)>>>0>>>0)*.5)*.10000000000000009/(n*+h[b+528>>3])}else{d=b+336|0;h[d>>3]=(+h[e+8>>3]- +((c[b+452>>2]|0)>>>0>>>0)*.5)*.10000000000000009/(n*+h[b+528>>3])+ +h[d>>3];d=b+344|0;h[d>>3]=+h[d>>3]-(+h[e>>3]- +((c[b+448>>2]|0)>>>0>>>0)*.5)*.10000000000000009/(n*+h[b+520>>3])}a[b+537|0]=1;j=b+560|0;k=j;l=e;c[k>>2]=c[l>>2];c[k+4>>2]=c[l+4>>2];c[k+8>>2]=c[l+8>>2];c[k+12>>2]=c[l+12>>2];i=f;return};case 1:{yA(b,+h[e>>3],+h[e+8>>3]);d=b+580|0;g=c[d>>2]|0;do{if((g|0)!=0){o=Sx(g)|0;if((o|0)==0){p=g+8|0;q=(c[p>>2]|0)+112|0;a[q]=a[q]|4;q=(c[p>>2]|0)+112|0;a[q]=a[q]&-3;break}else if((o|0)==2){q=g+8|0;p=(c[q>>2]|0)+115|0;a[p]=a[p]|4;p=(c[q>>2]|0)+115|0;a[p]=a[p]&-3;break}else if((o|0)==1){o=g+8|0;p=(c[o>>2]|0)+117|0;a[p]=a[p]|4;p=(c[o>>2]|0)+117|0;a[p]=a[p]&-3;break}else{break}}}while(0);g=b+588|0;p=c[g>>2]|0;if((p|0)!=0){eF(p);c[g>>2]=0}p=c[b+576>>2]|0;c[d>>2]=p;do{if((p|0)!=0){d=Sx(p)|0;if((d|0)==1){o=(c[p+8>>2]|0)+117|0;a[o]=a[o]|2;o=b+592|0;FA(o,0,118592);FA(o,1,$w(p)|0);c[b+596>>2]=2;o=b+604|0;q=Ix(Hx(p)|0)|0;r=Xv(q,1,0)|0;if((r|0)==0){s=2}else{t=2;u=r;while(1){FA(o,t,c[u+8>>2]|0);r=t+2|0;FA(o,t|1,fw(p,u)|0);v=Xv(q,1,u)|0;if((v|0)==0){s=r;break}else{t=r;u=v}}}c[b+608>>2]=s;u=Wv(Hx(p)|0,1,123512,0)|0;if((u|0)==0){t=Wv(Hx(p)|0,1,125272,0)|0;if((t|0)==0){break}else{w=t}}else{w=u}c[g>>2]=fk(fw(p,w)|0,p)|0;break}else if((d|0)==2){u=p;t=(c[p+8>>2]|0)+115|0;a[t]=a[t]|2;t=b+592|0;FA(t,0,119112);q=p;o=p+32|0;FA(t,1,$w(c[((c[q>>2]&3|0)==3?u:o)+28>>2]|0)|0);v=(Nw(Hx(c[((c[q>>2]&3|0)==3?u:o)+28>>2]|0)|0)|0)!=0;FA(t,3,v?131448:129144);v=p-32|0;FA(t,4,$w(c[((c[q>>2]&3|0)==2?u:v)+28>>2]|0)|0);c[b+596>>2]=7;o=b+604|0;r=Ix(Hx(c[((c[q>>2]&3|0)==2?u:v)+28>>2]|0)|0)|0;x=Xv(r,2,0)|0;a:do{if((x|0)==0){y=7}else{z=7;A=x;while(1){B=A;while(1){C=B+8|0;D=c[C>>2]|0;if((Ya(D|0,120056)|0)==0){E=20;break}if((Ya(D|0,120832)|0)==0){E=22;break}if((Ya(D|0,121680)|0)!=0){break}FA(t,6,fw(p,B)|0);D=Xv(r,2,B)|0;if((D|0)==0){y=z;break a}else{B=D}}if((E|0)==20){E=0;FA(t,2,fw(p,B)|0)}else if((E|0)==22){E=0;FA(t,5,fw(p,B)|0)}FA(o,z,c[C>>2]|0);D=z+2|0;FA(o,z+1|0,fw(p,B)|0);F=Xv(r,2,B)|0;if((F|0)==0){y=D;break}else{z=D;A=F}}}}while(0);c[b+608>>2]=y;r=Wv(Hx(c[((c[q>>2]&3|0)==2?u:v)+28>>2]|0)|0,2,123512,0)|0;if((r|0)==0){o=Wv(Hx(c[((c[q>>2]&3|0)==2?u:v)+28>>2]|0)|0,2,125272,0)|0;if((o|0)==0){break}else{G=o}}else{G=r}c[g>>2]=fk(fw(p,G)|0,p)|0;break}else if((d|0)==0){r=(c[p+8>>2]|0)+112|0;a[r]=a[r]|2;AA(b,p);break}else{break}}}while(0);a[b+538|0]=1;a[b+541|0]=1;a[b+537|0]=1;j=b+560|0;k=j;l=e;c[k>>2]=c[l>>2];c[k+4>>2]=c[l+4>>2];c[k+8>>2]=c[l+8>>2];c[k+12>>2]=c[l+12>>2];i=f;return};default:{j=b+560|0;k=j;l=e;c[k>>2]=c[l>>2];c[k+4>>2]=c[l+4>>2];c[k+8>>2]=c[l+8>>2];c[k+12>>2]=c[l+12>>2];i=f;return}}}function rA(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;d=i;f=e;e=i;i=i+16|0;c[e>>2]=c[f>>2];c[e+4>>2]=c[f+4>>2];c[e+8>>2]=c[f+8>>2];c[e+12>>2]=c[f+12>>2];a[b+538|0]=0;a[b+541|0]=0;i=d;return}function sA(b,e){b=b|0;e=e|0;var f=0,g=0,j=0.0,k=0.0,l=0.0,m=0.0,n=0,o=0;f=i;g=e;e=i;i=i+16|0;c[e>>2]=c[g>>2];c[e+4>>2]=c[g+4>>2];c[e+8>>2]=c[g+8>>2];c[e+12>>2]=c[g+12>>2];j=+h[e>>3];g=b+560|0;k=(j- +h[g>>3])/+h[b+520>>3];l=+h[e+8>>3];m=(l- +h[b+568>>3])/+h[b+528>>3];n=~~k;do{if((((n|0)>-1?n:-n|0)|0)<1){o=~~m;if((((o|0)>-1?o:-o|0)|0)>=1){break}i=f;return}}while(0);n=d[b+541|0]|0;if((n|0)==0){yA(b,j,l)}else if((n|0)==2){l=+h[b+352>>3];if((c[b+360>>2]|0)==0){n=b+336|0;h[n>>3]=+h[n>>3]-k/l;n=b+344|0;h[n>>3]=+h[n>>3]-m/l}else{n=b+336|0;h[n>>3]=+h[n>>3]-m/l;n=b+344|0;h[n>>3]=k/l+ +h[n>>3]}a[b+537|0]=1}b=g;g=e;c[b>>2]=c[g>>2];c[b+4>>2]=c[g+4>>2];c[b+8>>2]=c[g+8>>2];c[b+12>>2]=c[g+12>>2];i=f;return}function tA(a,b,c){a=a|0;b=b|0;c=c|0;return}function uA(a){a=a|0;return}function vA(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;f=c[b>>2]|0;do{if((d|0)==0){g=Hw(150416,173944,0)|0;c[b+32>>2]=148120;h=g}else{g=Eb(d|0,144944)|0;if((g|0)==0){return}else{i=Dw(g,0)|0;Ha(g|0)|0;h=i;break}}}while(0);if((h|0)==0){return}d=f+168|0;i=c[d>>2]|0;if((i|0)!=0){g=c[f+172>>2]|0;do{if((g|0)==0){j=i}else{k=c[g+4>>2]|0;if((k|0)==0){j=i;break}Cc[k&255](i);j=c[d>>2]|0}}while(0);Sj(j);Kw(c[d>>2]|0)|0}Zx(h,0,142024,272,1);Zx(h,1,138264,304,1);Zx(h,2,136288,176,1);c[d>>2]=h;c[(c[h+8>>2]|0)+136>>2]=f;if((Pz(f,h,e)|0)==-1){return}c[b+580>>2]=0;c[b+576>>2]=0;a[b+537|0]=1;return}function wA(a,b){a=a|0;b=b|0;var d=0;d=c[a>>2]|0;Pz(d,c[d+168>>2]|0,b)|0;return}function xA(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=c[a>>2]|0;Qz(e,c[e+168>>2]|0,b,d)|0;return}function yA(b,d,e){b=b|0;d=+d;e=+e;var f=0,g=0,j=0.0,k=0.0,l=0.0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;f=i;i=i+32|0;g=f|0;j=+h[b+352>>3];if((c[b+360>>2]|0)==0){k=d/(j*+h[b+520>>3])- +h[b+504>>3];l=e/(j*+h[b+528>>3])- +h[b+512>>3]}else{k=e/(j*+h[b+528>>3])- +h[b+504>>3];l=(-0.0-d)/(j*+h[b+520>>3])- +h[b+512>>3]}d=1.0/j;m=c[(c[b>>2]|0)+168>>2]|0;h[g>>3]=k-d;h[g+8>>3]=l-d;h[g+16>>3]=k+d;h[g+24>>3]=l+d;n=ux(m)|0;a:do{if((n|0)==0){o=10}else{p=n;b:while(1){q=mw(m,p)|0;if((q|0)!=0){r=q;while(1){if((on(r,g)|0)<<24>>24!=0){break b}q=ow(m,r)|0;if((q|0)==0){break}else{r=q}}}q=vx(m,p)|0;if((q|0)==0){o=10;break a}else{p=q}}s=r|0}}while(0);c:do{if((o|0)==10){r=wx(m)|0;d:do{if((r|0)!=0){n=r;while(1){if((mn(n,g)|0)<<24>>24!=0){break}p=xx(m,n)|0;if((p|0)==0){break d}else{n=p}}s=n|0;break c}}while(0);r=zA(m,g)|0;if((r|0)==0){s=m|0;break}else{s=r|0;break}}}while(0);m=b+576|0;g=c[m>>2]|0;if((s|0)==(g|0)){i=f;return}do{if((g|0)!=0){o=Sx(g)|0;if((o|0)==0){r=(c[g+8>>2]|0)+112|0;a[r]=a[r]&-2;break}else if((o|0)==1){r=(c[g+8>>2]|0)+117|0;a[r]=a[r]&-2;break}else if((o|0)==2){o=(c[g+8>>2]|0)+115|0;a[o]=a[o]&-2;break}else{break}}}while(0);g=b+584|0;c[g>>2]=0;c[m>>2]=s;do{if((s|0)!=0){m=Sx(s)|0;if((m|0)==0){o=(c[s+8>>2]|0)+112|0;a[o]=a[o]|1;o=Wv(s,0,133568,0)|0;if((o|0)==0){break}c[g>>2]=fk(fw(s,o)|0,s)|0;break}else if((m|0)==2){o=(c[s+8>>2]|0)+115|0;a[o]=a[o]|1;o=Wv(Hx(c[((c[s>>2]&3|0)==2?s:s-32|0)+28>>2]|0)|0,2,133568,0)|0;if((o|0)==0){break}c[g>>2]=fk(fw(s,o)|0,s)|0;break}else if((m|0)==1){m=(c[s+8>>2]|0)+117|0;a[m]=a[m]|1;m=Wv(Hx(s)|0,1,133568,0)|0;if((m|0)==0){break}c[g>>2]=fk(fw(s,m)|0,s)|0;break}else{break}}}while(0);a[b+537|0]=1;i=f;return}function zA(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0.0,n=0.0;d=i;e=b;b=i;i=i+32|0;tF(b,e,32)|0;e=c[a+8>>2]|0;f=c[e+172>>2]|0;a:do{if((f|0)>=1){g=c[e+176>>2]|0;j=1;while(1){k=zA(c[g+(j<<2)>>2]|0,b)|0;if((k|0)!=0){l=k;break}if((j|0)<(f|0)){j=j+1|0}else{break a}}i=d;return l|0}}while(0);m=+h[e+24>>3];n=+h[e+40>>3];do{if(+h[b+16>>3]>=+h[e+16>>3]){if(+h[e+32>>3]<+h[b>>3]){break}if(+h[b+24>>3]<m){break}if(n<+h[b+8>>3]){break}else{l=a}i=d;return l|0}}while(0);l=0;i=d;return l|0}function AA(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;d=a+592|0;e=b|0;do{if((Ix(e)|0)==(b|0)){if((Nw(b)|0)==0){FA(d,0,116736);break}else{FA(d,0,115792);break}}else{FA(d,0,117648)}}while(0);FA(d,1,$w(e)|0);c[a+596>>2]=2;d=a+604|0;f=Xv(b,0,0)|0;if((f|0)==0){g=2}else{h=2;i=f;while(1){FA(d,h,c[i+8>>2]|0);FA(d,h+1|0,fw(e,i)|0);f=h+3|0;FA(d,h+2|0,0);j=Xv(b,0,i)|0;if((j|0)==0){g=f;break}else{h=f;i=j}}}c[a+608>>2]=g;g=Wv(b,0,123512,0)|0;do{if((g|0)==0){i=Wv(b,0,125272,0)|0;if((i|0)!=0){k=i;break}return}else{k=g}}while(0);c[a+588>>2]=fk(fw(e,k)|0,e)|0;return}function BA(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;d=a+160|0;e=c[d>>2]|0;do{if((e|0)==0){f=jk(632)|0;c[d>>2]=f;c[a+164>>2]=f;c[44216]=f;g=f}else{f=c[44216]|0;if((f|0)==0){c[44216]=e;g=e;break}h=c[f+4>>2]|0;if((h|0)==0){f=jk(632)|0;c[(c[44216]|0)+4>>2]=f;i=c[(c[44216]|0)+4>>2]|0}else{i=h}c[44216]=i;g=i}}while(0);c[g+32>>2]=b;c[c[44216]>>2]=a;return}function CA(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;d=a+160|0;e=c[d>>2]|0;do{if((e|0)==0){f=jk(632)|0;c[d>>2]=f;c[a+164>>2]=f;c[44214]=f;g=f}else{f=c[44214]|0;if((f|0)==0){c[44214]=e;g=e;break}h=c[f+4>>2]|0;if((h|0)==0){f=jk(632)|0;c[(c[44214]|0)+4>>2]=f;i=c[(c[44214]|0)+4>>2]|0}else{i=h}c[44214]=i;g=i}}while(0);c[g+52>>2]=b;c[c[44214]>>2]=a;return(MA(a,3,b)|0)!=0|0}function DA(a){a=a|0;var b=0;b=c[a+160>>2]|0;c[a+164>>2]=b;return b|0}function EA(a){a=a|0;var b=0,d=0,e=0;b=a+164|0;a=c[b>>2]|0;d=c[a+4>>2]|0;do{if((d|0)!=0){e=d+52|0;if((c[e>>2]|0)!=0){break}c[e>>2]=c[a+52>>2]}}while(0);c[b>>2]=d;return d|0}function FA(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=a+8|0;if((c[e>>2]|0)>(b|0)){f=c[a>>2]|0;g=f+(b<<2)|0;c[g>>2]=d;return}else{h=b+10|0;c[e>>2]=h;e=a|0;a=mk(c[e>>2]|0,h<<2)|0;c[e>>2]=a;f=a;g=f+(b<<2)|0;c[g>>2]=d;return}}function GA(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=a+160|0;d=c[b>>2]|0;if((d|0)!=0){e=d;while(1){d=c[e+4>>2]|0;f=e+604|0;g=c[f>>2]|0;if((g|0)!=0){eF(g)}c[f>>2]=0;c[e+612>>2]=0;c[e+608>>2]=0;f=e+592|0;g=c[f>>2]|0;if((g|0)!=0){eF(g)}c[f>>2]=0;c[e+600>>2]=0;c[e+596>>2]=0;f=c[e+584>>2]|0;if((f|0)!=0){eF(f)}f=c[e+588>>2]|0;if((f|0)!=0){eF(f)}eF(e);if((d|0)==0){break}else{e=d}}}c[44214]=0;c[44216]=0;c[a+192>>2]=0;c[a+164>>2]=0;c[b>>2]=0;c[a+28>>2]=0;return}function HA(a,b){a=a|0;b=b|0;var d=0,e=0;d=MA(a,1,b)|0;if((d|0)==0){e=999;return e|0}b=c[d+16>>2]|0;c[a+184>>2]=c[b+4>>2];c[a+172>>2]=c[b+12>>2];c[a+176>>2]=c[b>>2];c[a+180>>2]=c[b+16>>2];e=300;return e|0}function IA(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;d=i;e=b|0;Wx(e,95216,272,1)|0;f=b+8|0;g=a;c[(c[f>>2]|0)+136>>2]=g;if((Ix(e)|0)!=(b|0)){c[(c[(Ix(e)|0)+8>>2]|0)+136>>2]=g}g=ew(e,144120)|0;h=a+172|0;do{if((g|0)==0){j=c[h>>2]|0}else{c[h>>2]=0;k=MA(a,1,g)|0;if((k|0)!=0){l=c[k+16>>2]|0;c[a+184>>2]=c[l+4>>2];k=c[l+12>>2]|0;c[h>>2]=k;c[a+176>>2]=c[l>>2];c[a+180>>2]=c[l+16>>2];j=k;break}k=NA(a,1,g)|0;Fv(1,120552,(l=i,i=i+16|0,c[l>>2]=g,c[l+8>>2]=k,l)|0)|0;i=l;m=-1;i=d;return m|0}}while(0);if((j|0)==0){m=-1;i=d;return m|0}Zh(1);Pj(b,c[c[a+180>>2]>>2]&1);a=c[(c[f>>2]|0)+8>>2]|0;c[(c[(Ix(e)|0)+8>>2]|0)+8>>2]=a;a=c[j>>2]|0;do{if((a|0)!=0){Cc[a&255](b);e=c[j+4>>2]|0;if((e|0)==0){break}c[(c[f>>2]|0)+140>>2]=e}}while(0);Zh(0);m=0;i=d;return m|0}function JA(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;if((Wx(b|0,95216,0,1)|0)==0){return 0}a=b+8|0;d=c[a>>2]|0;e=c[d+140>>2]|0;if((e|0)==0){f=d}else{Cc[e&255](b);c[(c[a>>2]|0)+140>>2]=0;f=c[a>>2]|0}if((c[f+8>>2]|0)==0){return 0}Sj(b);return 0}function KA(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0;h=i;i=i+128|0;j=e;e=i;i=i+32|0;tF(e,j,32)|0;j=h|0;k=j|0;zF(k|0,c[d+28>>2]|0)|0;l=j+(xF(k|0)|0)|0;z=58;a[l]=z;z=z>>8;a[l+1|0]=z;AF(k|0,g|0)|0;g=MA(c[b>>2]|0,4,k)|0;if((g|0)==0){Fv(0,142448,(l=i,i=i+8|0,c[l>>2]=k,l)|0)|0;i=l;m=c[b+92>>2]|0}else{l=c[g+16>>2]|0;g=c[l+12>>2]|0;c[b+92>>2]=g;c[b+96>>2]=c[l>>2];m=g}if((m|0)==0){i=h;return}g=c[m>>2]|0;if((g|0)==0){i=h;return}Vc[g&63](b,d,e,f);i=h;return}function LA(b,d,e,f,g,h){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;j=i;i=i+128|0;k=j+64|0;l=j|0;DF(l|0,e|0,63)|0;m=gb(l|0,58)|0;if((m|0)!=0){a[m]=0}m=b+60+(d<<2)|0;d=c[m>>2]|0;a:do{if((d|0)==0){n=m}else{b=k|0;o=m;p=d;while(1){DF(b|0,c[p+4>>2]|0,63)|0;q=gb(b|0,58)|0;if((q|0)!=0){a[q]=0}q=(Ya(l|0,b|0)|0)<1;r=c[o>>2]|0;if(q){break}q=r|0;s=c[q>>2]|0;if((s|0)==0){n=q;break a}else{o=q;p=s}}if((r|0)==0){n=o;break}p=k|0;b=o;s=r;while(1){DF(p|0,c[s+4>>2]|0,63)|0;q=gb(p|0,58)|0;if((q|0)!=0){a[q]=0}if((Ya(l|0,p|0)|0)!=0){n=b;break a}q=c[b>>2]|0;t=q|0;if((c[q+8>>2]|0)<=(f|0)){n=b;break a}q=c[t>>2]|0;if((q|0)==0){n=t;break}else{b=t;s=q}}}}while(0);l=kk(20)|0;c[l>>2]=c[n>>2];c[n>>2]=l;c[l+4>>2]=e;c[l+8>>2]=f;c[l+12>>2]=g;c[l+16>>2]=h;i=j;return 1}function MA(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;f=i;i=i+128|0;g=f+64|0;h=(d-3|0)>>>0<2>>>0?0:d;j=f|0;DF(j|0,e|0,63)|0;e=gb(j|0,58)|0;do{if((e|0)==0){k=0;l=0}else{m=e+1|0;a[e]=0;n=gb(m|0,58)|0;if((n|0)==0){k=0;l=m;break}a[n]=0;k=n+1|0;l=m}}while(0);e=b+60+(d<<2)|0;m=c[e>>2]|0;if((m|0)==0){p=0;q=b+80+(d<<2)|0;c[q>>2]=p;i=f;return p|0}n=g|0;g=(k|0)==0;r=(h|0)==(d|0);a:do{if((l|0)==0){s=e;t=m;while(1){DF(n|0,c[t+4>>2]|0,63)|0;u=gb(n|0,58)|0;if((u|0)==0){v=0}else{a[u]=0;v=u+1|0}do{if((Ya(n|0,j|0)|0)==0){u=(v|0)==0;if(!g){if((Ya(k|0,c[(c[(c[s>>2]|0)+12>>2]|0)+8>>2]|0)|0)!=0){break}}if(u|r){w=s;break a}if((MA(b,h,v)|0)!=0){w=s;break a}}}while(0);u=c[s>>2]|0;x=c[u>>2]|0;if((x|0)==0){p=0;break}else{s=u;t=x}}q=b+80+(d<<2)|0;c[q>>2]=p;i=f;return p|0}else{if(g){t=e;s=m;while(1){DF(n|0,c[s+4>>2]|0,63)|0;x=gb(n|0,58)|0;if((x|0)==0){y=0}else{a[x]=0;y=x+1|0}do{if((Ya(n|0,j|0)|0)==0){x=(y|0)==0;if(x){w=t;break a}if((Ya(y|0,l|0)|0)!=0){break}if(x|r){w=t;break a}if((MA(b,h,y)|0)!=0){w=t;break a}}}while(0);x=c[t>>2]|0;u=c[x>>2]|0;if((u|0)==0){p=0;break}else{t=x;s=u}}q=b+80+(d<<2)|0;c[q>>2]=p;i=f;return p|0}else{z=e;A=m}while(1){DF(n|0,c[A+4>>2]|0,63)|0;s=gb(n|0,58)|0;if((s|0)==0){B=0}else{a[s]=0;B=s+1|0}do{if((Ya(n|0,j|0)|0)==0){s=(B|0)==0;if(!s){if((Ya(B|0,l|0)|0)!=0){break}}if((Ya(k|0,c[(c[(c[z>>2]|0)+12>>2]|0)+8>>2]|0)|0)!=0){break}if(s|r){w=z;break a}if((MA(b,h,B)|0)!=0){w=z;break a}}}while(0);s=c[z>>2]|0;t=c[s>>2]|0;if((t|0)==0){p=0;break}else{z=s;A=t}}q=b+80+(d<<2)|0;c[q>>2]=p;i=f;return p|0}}while(0);A=c[w>>2]|0;if((A|0)==0){p=0;q=b+80+(d<<2)|0;c[q>>2]=p;i=f;return p|0}w=A+16|0;z=c[w>>2]|0;if((z|0)==0){Fv(1,91016,(C=i,i=i+1|0,i=i+7&-8,c[C>>2]=0,C)|0)|0;i=C;D=c[w>>2]|0}else{D=z}z=(D|0)==0?0:A;if((z|0)==0){p=0;q=b+80+(d<<2)|0;c[q>>2]=p;i=f;return p|0}if((c[b+8>>2]|0)<=0){p=z;q=b+80+(d<<2)|0;c[q>>2]=p;i=f;return p|0}A=c[z+4>>2]|0;D=c[(c[z+12>>2]|0)+8>>2]|0;gc(c[o>>2]|0,112008,(C=i,i=i+24|0,c[C>>2]=c[74600+(d<<2)>>2],c[C+8>>2]=A,c[C+16>>2]=D,C)|0)|0;i=C;p=z;q=b+80+(d<<2)|0;c[q>>2]=p;i=f;return p|0}function NA(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;if((e|0)==0){f=0;return f|0}if(!(a[23360]|0)){Iv(178896,0,0);a[23360]=1}g=Lb(e|0)|0;e=gb(g|0,58)|0;do{if((e|0)==0){eF(g);h=1;i=b+60+(d<<2)|0;j=19}else{a[e]=0;k=b+60+(d<<2)|0;l=c[k>>2]|0;if((l|0)==0){eF(g);h=1;i=k;j=19;break}else{m=k;n=1;o=l}while(1){l=Lb(c[o+4>>2]|0)|0;p=gb(l|0,58)|0;if((p|0)!=0){a[p]=0}if((a[g]|0)==0){j=12}else{if((pm(g,l)|0)==0){j=12}else{q=n}}if((j|0)==12){j=0;p=c[44725]|0;if(p>>>0<(c[44726]|0)>>>0){r=p}else{Jv(178896,1)|0;r=c[44725]|0}c[44725]=r+1;a[r]=32;Lv(178896,c[(c[m>>2]|0)+4>>2]|0)|0;p=c[44725]|0;if(p>>>0<(c[44726]|0)>>>0){s=p}else{Jv(178896,1)|0;s=c[44725]|0}c[44725]=s+1;a[s]=58;Lv(178896,c[(c[(c[m>>2]|0)+12>>2]|0)+8>>2]|0)|0;q=0}eF(l);l=c[m>>2]|0;p=c[l>>2]|0;if((p|0)==0){break}else{m=l;n=q;o=p}}eF(g);if(q<<24>>24!=0){h=q;i=k;j=19}}}while(0);do{if((j|0)==19){q=c[i>>2]|0;if((q|0)==0){t=h}else{g=i;o=0;n=h;m=q;while(1){q=Lb(c[m+4>>2]|0)|0;s=gb(q|0,58)|0;if((s|0)!=0){a[s]=0}if((o|0)==0){j=24}else{if((pm(o,q)|0)==0){u=n}else{j=24}}if((j|0)==24){j=0;s=c[44725]|0;if(s>>>0<(c[44726]|0)>>>0){v=s}else{Jv(178896,1)|0;v=c[44725]|0}c[44725]=v+1;a[v]=32;Lv(178896,q)|0;u=0}s=c[g>>2]|0;r=c[s>>2]|0;if((r|0)==0){t=u;break}else{g=s;o=q;n=u;m=r}}}if(t<<24>>24==0){break}else{f=213392}return f|0}}while(0);t=c[44725]|0;if(t>>>0<(c[44726]|0)>>>0){w=t}else{Jv(178896,1)|0;w=c[44725]|0}a[w]=0;w=c[44724]|0;c[44725]=w;f=w;return f|0}function OA(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;d=c[a>>2]|0;MA(d,3,b)|0;b=c[d+92>>2]|0;if((b|0)==0){e=999;return e|0}f=c[b+16>>2]|0;g=c[f+12>>2]|0;c[a+76>>2]=g;h=c[f+16>>2]|0;c[a+84>>2]=h;i=c[f>>2]|0;c[a+80>>2]=i;c[a+88>>2]=c[b+4>>2];b=a+152|0;f=c[b>>2]|c[h>>2];c[b>>2]=f;h=c[d+80>>2]|0;if((h|0)==0){c[a+60>>2]=0;e=999;return e|0}d=c[h+16>>2]|0;c[a+60>>2]=c[d+12>>2];j=c[d+16>>2]|0;c[a+68>>2]=j;c[a+72>>2]=c[h+4>>2];c[b>>2]=f|c[j>>2];if((g|0)==0){c[a+64>>2]=i;e=300;return e|0}else{c[a+64>>2]=c[d>>2];e=300;return e|0}return 0}function PA(a){a=a|0;var b=0,d=0,e=0;b=c[a+60>>2]|0;do{if((Xz(a)|0)==0){if((b|0)==0){d=0;break}e=c[b>>2]|0;if((e|0)==0){d=0;break}Cc[e&255](a);d=0}else{d=1}}while(0);return d|0}function QA(a){a=a|0;var b=0,d=0;b=c[a+60>>2]|0;do{if((b|0)!=0){d=c[b+4>>2]|0;if((d|0)==0){break}Cc[d&255](a)}}while(0);c[(c[a>>2]|0)+24>>2]=0;cA(a);return}function RA(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0.0,g=0.0,i=0.0,j=0.0,k=0.0,l=0,m=0,n=0;f=+h[a+504>>3];g=+h[a+512>>3];i=+h[a+352>>3];j=i*+h[a+520>>3];k=i*+h[a+528>>3];l=(e|0)>0;if((c[a+360>>2]|0)==0){if(l){m=0}else{return d|0}do{h[d+(m<<4)>>3]=j*(f+ +h[b+(m<<4)>>3]);h[d+(m<<4)+8>>3]=k*(g+ +h[b+(m<<4)+8>>3]);m=m+1|0;}while((m|0)<(e|0));return d|0}else{if(l){n=0}else{return d|0}do{i=-0.0-j*(g+ +h[b+(n<<4)+8>>3]);h[d+(n<<4)+8>>3]=k*(f+ +h[b+(n<<4)>>3]);h[d+(n<<4)>>3]=i;n=n+1|0;}while((n|0)<(e|0));return d|0}return 0}function SA(a,b){a=a|0;b=b|0;var d=0;b=c[a+60>>2]|0;if((b|0)==0){return}d=c[b+8>>2]|0;if((d|0)==0){return}Cc[d&255](a);return}function TA(a){a=a|0;var b=0,d=0;b=c[a+60>>2]|0;do{if((b|0)!=0){d=c[b+12>>2]|0;if((d|0)==0){break}Cc[d&255](a)}}while(0);bA(a);return}function UA(a){a=a|0;var b=0,d=0;b=c[a+60>>2]|0;if((b|0)==0){return}d=c[b+24>>2]|0;if((d|0)==0){return}Cc[d&255](a);return}function VA(a){a=a|0;var b=0,d=0;b=c[a+60>>2]|0;if((b|0)==0){return}d=c[b+28>>2]|0;if((d|0)==0){return}Cc[d&255](a);return}function WA(a){a=a|0;var b=0,d=0;b=c[a+60>>2]|0;if((b|0)==0){return}d=c[b+16>>2]|0;if((d|0)==0){return}b=c[a+160>>2]|0;Vc[d&63](a,c[(c[(c[a>>2]|0)+308>>2]|0)+(b<<2)>>2]|0,b,c[a+156>>2]|0);return}function XA(a){a=a|0;var b=0,d=0;b=c[a+60>>2]|0;if((b|0)==0){return}d=c[b+20>>2]|0;if((d|0)==0){return}Cc[d&255](a);return}function YA(a,b){a=a|0;b=b|0;var d=0;b=c[a+60>>2]|0;if((b|0)==0){return}d=c[b+32>>2]|0;if((d|0)==0){return}Cc[d&255](a);return}function ZA(a,b){a=a|0;b=b|0;var d=0;b=c[a+60>>2]|0;if((b|0)==0){return}d=c[b+36>>2]|0;if((d|0)==0){return}Cc[d&255](a);return}function _A(a){a=a|0;var b=0,d=0;b=c[a+60>>2]|0;if((b|0)==0){return}d=c[b+40>>2]|0;if((d|0)==0){return}Cc[d&255](a);return}function $A(a){a=a|0;var b=0,d=0;b=c[a+60>>2]|0;if((b|0)==0){return}d=c[b+44>>2]|0;if((d|0)==0){return}Cc[d&255](a);return}function aB(a){a=a|0;var b=0,d=0;b=c[a+60>>2]|0;if((b|0)==0){return}d=c[b+48>>2]|0;if((d|0)==0){return}Cc[d&255](a);return}function bB(a){a=a|0;var b=0,d=0;b=c[a+60>>2]|0;if((b|0)==0){return}d=c[b+52>>2]|0;if((d|0)==0){return}Cc[d&255](a);return}function cB(a,b){a=a|0;b=b|0;var d=0;b=c[a+60>>2]|0;if((b|0)==0){return}d=c[b+56>>2]|0;if((d|0)==0){return}Cc[d&255](a);return}function dB(a){a=a|0;var b=0,d=0;b=c[a+60>>2]|0;if((b|0)==0){return}d=c[b+60>>2]|0;if((d|0)==0){return}Cc[d&255](a);return}function eB(a,b){a=a|0;b=b|0;var d=0;b=c[a+60>>2]|0;if((b|0)==0){return}d=c[b+64>>2]|0;if((d|0)==0){return}Cc[d&255](a);return}function fB(a){a=a|0;var b=0,d=0;b=c[a+60>>2]|0;if((b|0)==0){return}d=c[b+68>>2]|0;if((d|0)==0){return}Cc[d&255](a);return}function gB(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=c[a+60>>2]|0;if((g|0)==0){return}h=c[g+72>>2]|0;if((h|0)==0){return}Bc[h&63](a,b,d,e,f);return}function hB(a){a=a|0;var b=0,d=0;b=c[a+60>>2]|0;if((b|0)==0){return}d=c[b+76>>2]|0;if((d|0)==0){return}Cc[d&255](a);return}function iB(a,b){a=a|0;b=b|0;var d=0,e=0;d=c[a+60>>2]|0;if((d|0)==0){return}e=c[d+80>>2]|0;if((e|0)==0){return}Dc[e&63](a,b);return}function jB(a){a=a|0;var b=0,d=0;b=c[a+60>>2]|0;if((b|0)==0){return}d=c[b+84>>2]|0;if((d|0)==0){return}Cc[d&255](a);return}function kB(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,j=0,l=0,m=0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0;g=i;i=i+16|0;j=e;e=i;i=i+16|0;c[e>>2]=c[j>>2];c[e+4>>2]=c[j+4>>2];c[e+8>>2]=c[j+8>>2];c[e+12>>2]=c[j+12>>2];j=g|0;l=c[b+60>>2]|0;m=c[f>>2]|0;if((m|0)==0){i=g;return}if((a[m]|0)==0){i=g;return}m=c[b+16>>2]|0;do{if((m|0)!=0){if((c[m+144>>2]|0)!=0){break}i=g;return}}while(0);if((c[b+152>>2]&8192|0)==0){m=e|0;n=(c[k>>2]=d[m]|d[m+1|0]<<8|d[m+2|0]<<16|d[m+3|0]<<24,c[k+4>>2]=d[m+4|0]|d[m+5|0]<<8|d[m+6|0]<<16|d[m+7|0]<<24,+h[k>>3]);m=e+8|0;o=(c[k>>2]=d[m]|d[m+1|0]<<8|d[m+2|0]<<16|d[m+3|0]<<24,c[k+4>>2]=d[m+4|0]|d[m+5|0]<<8|d[m+6|0]<<16|d[m+7|0]<<24,+h[k>>3]);p=+h[b+504>>3];q=+h[b+512>>3];r=+h[b+352>>3];if((c[b+360>>2]|0)==0){s=o+q;t=n+p}else{s=n+p;t=-0.0-(o+q)}q=r*+h[b+528>>3]*s;h[j>>3]=r*+h[b+520>>3]*t;h[j+8>>3]=q}else{m=j;u=e;c[m>>2]=c[u>>2];c[m+4>>2]=c[u+4>>2];c[m+8>>2]=c[u+8>>2];c[m+12>>2]=c[u+12>>2]}if((l|0)==0){i=g;return}u=c[l+88>>2]|0;if((u|0)==0){i=g;return}Tc[u&127](b,j,f);i=g;return}function lB(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=c[b+60>>2]|0;f=(c[b+16>>2]|0)+16|0;g=gb(d|0,58)|0;h=(g|0)!=0;if(h){a[g]=0}do{if((e|0)!=0){mB(c[b+68>>2]|0,d,f);i=c[e+92>>2]|0;if((i|0)==0){break}Dc[i&63](b,f)}}while(0);if(!h){return}a[g]=58;return}function mB(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+8|0;f=e|0;c[d>>2]=b;c[d+32>>2]=5;c[f>>2]=zh(b)|0;g=c[a+16>>2]|0;do{if((g|0)!=0){if((vb(f|0,g|0,c[a+20>>2]|0,4,22)|0)==0){break}i=e;return}}while(0);g=Ah(b,d,c[a+24>>2]|0)|0;if((g|0)==0){i=e;return}else if((g|0)==1){g=kk((xF(b|0)|0)+16|0)|0;nb(g|0,149e3,(h=i,i=i+8|0,c[h>>2]=b,h)|0)|0;i=h;if((Sh(g)|0)!=0){Fv(0,145840,(h=i,i=i+8|0,c[h>>2]=b,h)|0)|0;i=h}eF(g);i=e;return}else{Fv(1,142848,(h=i,i=i+1|0,i=i+7&-8,c[h>>2]=0,h)|0)|0;i=h;i=e;return}}function nB(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=c[b+60>>2]|0;f=(c[b+16>>2]|0)+56|0;g=gb(d|0,58)|0;h=(g|0)!=0;if(h){a[g]=0}do{if((e|0)!=0){mB(c[b+68>>2]|0,d,f);i=c[e+92>>2]|0;if((i|0)==0){break}Dc[i&63](b,f)}}while(0);if(!h){return}a[g]=58;return}function oB(a,b,d,e){a=a|0;b=b|0;d=d|0;e=+e;var f=0,h=0,i=0,j=0;f=c[a+60>>2]|0;h=a+16|0;i=(c[h>>2]|0)+96|0;do{if((f|0)!=0){mB(c[a+68>>2]|0,b,i);j=c[f+92>>2]|0;if((j|0)==0){break}Dc[j&63](a,i)}}while(0);c[(c[h>>2]|0)+136>>2]=d;g[(c[h>>2]|0)+140>>2]=e;return}function pB(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;e=i;f=c[b+60>>2]|0;g=c[b+16>>2]|0;c[g+160>>2]=d;if((f|0)==0|(d|0)==0){i=e;return}f=c[d>>2]|0;if((f|0)==0){i=e;return}b=g+144|0;j=g+152|0;k=g+148|0;g=d;d=f;do{g=g+4|0;f=a[d]|0;l=f<<24>>24==115;a:do{if(l){if((Ya(d|0,164472)|0)!=0){m=20;break}c[b>>2]=3}else{do{if((f<<24>>24|0)==100){if((Ya(d|0,132280)|0)==0){c[b>>2]=1;break a}if((Ya(d|0,117240)|0)==0){c[b>>2]=2;break a}else{if((f<<24>>24|0)==105){m=14;break}else if((f<<24>>24|0)==98){break}else{m=20;break a}}}else if((f<<24>>24|0)==105){m=14}else if((f<<24>>24|0)!=98){m=20;break a}}while(0);b:do{if((m|0)==14){m=0;do{if((Ya(d|0,109680)|0)!=0){if((Ya(d|0,103848)|0)==0){break}if(f<<24>>24==98){break b}else{m=20;break a}}}while(0);c[b>>2]=0;break a}}while(0);if((Ya(d|0,98216)|0)!=0){m=20;break}h[j>>3]=2.0}}while(0);c:do{if((m|0)==20){m=0;do{if(l){if((Ya(d|0,92648)|0)==0){n=d;o=0}else{break}while(1){p=n+1|0;if(o){break}n=p;o=(a[p]|0)==0}h[j>>3]=+rF(p);break c}else{if((f<<24>>24|0)==116){if((Ya(d|0,168568)|0)==0){break c}else{break}}else if((f<<24>>24|0)==102){if((Ya(d|0,87288)|0)!=0){break}c[k>>2]=1;break c}else if((f<<24>>24|0)==117){if((Ya(d|0,82552)|0)!=0){break}c[k>>2]=0;break c}else{break}}}while(0);Fv(0,164352,(q=i,i=i+8|0,c[q>>2]=d,q)|0)|0;i=q}}while(0);d=c[g>>2]|0;}while((d|0)!=0);i=e;return}function qB(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0.0,l=0,m=0,n=0.0,o=0,p=0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0;d=i;i=i+32|0;f=d|0;g=c[a+60>>2]|0;if((g|0)==0){i=d;return}j=g+96|0;if((c[j>>2]|0)==0){i=d;return}if((c[(c[a+16>>2]|0)+144>>2]|0)==0){i=d;return}g=b+16|0;k=(+h[b>>3]+ +h[g>>3])*.5;l=f|0;m=f|0;h[m>>3]=k;n=(+h[b+8>>3]+ +h[b+24>>3])*.5;b=f+8|0;h[b>>3]=n;o=f+16|0;p=g;c[o>>2]=c[p>>2];c[o+4>>2]=c[p+4>>2];c[o+8>>2]=c[p+8>>2];c[o+12>>2]=c[p+12>>2];do{if((c[a+152>>2]&8192|0)==0){q=+h[a+504>>3];r=+h[a+512>>3];s=+h[a+352>>3];t=s*+h[a+520>>3];u=s*+h[a+528>>3];if((c[a+360>>2]|0)==0){h[m>>3]=t*(q+k);h[b>>3]=u*(r+n);p=f+16|0;h[p>>3]=t*(q+ +h[p>>3]);p=f+24|0;h[p>>3]=u*(r+ +h[p>>3]);break}else{h[b>>3]=u*(q+k);h[m>>3]=-0.0-t*(r+n);p=f+24|0;s=-0.0-t*(r+ +h[p>>3]);o=f+16|0;h[p>>3]=u*(q+ +h[o>>3]);h[o>>3]=s;break}}}while(0);Tc[c[j>>2]&127](a,l,e);i=d;return}function rB(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0,x=0;f=i;i=i+40|0;g=f|0;j=c[a+60>>2]|0;if((j|0)==0){i=f;return}k=j+100|0;if((c[k>>2]|0)==0){i=f;return}j=a+16|0;l=c[j>>2]|0;if((c[l+144>>2]|0)==0){i=f;return}if((e&4|0)==0){m=e;n=0}else{o=g;p=l+16|0;c[o>>2]=c[p>>2];c[o+4>>2]=c[p+4>>2];c[o+8>>2]=c[p+8>>2];c[o+12>>2]=c[p+12>>2];c[o+16>>2]=c[p+16>>2];c[o+20>>2]=c[p+20>>2];c[o+24>>2]=c[p+24>>2];c[o+28>>2]=c[p+28>>2];c[o+32>>2]=c[p+32>>2];c[o+36>>2]=c[p+36>>2];o=l+56|0;c[p>>2]=c[o>>2];c[p+4>>2]=c[o+4>>2];c[p+8>>2]=c[o+8>>2];c[p+12>>2]=c[o+12>>2];c[p+16>>2]=c[o+16>>2];c[p+20>>2]=c[o+20>>2];c[p+24>>2]=c[o+24>>2];c[p+28>>2]=c[o+28>>2];c[p+32>>2]=c[o+32>>2];c[p+36>>2]=c[o+36>>2];m=e&-5;n=1}if((c[a+152>>2]&8192|0)==0){if((c[43760]|0)<(d|0)){e=d+10|0;c[43760]=e;o=mk(c[53856]|0,e<<4)|0;c[53856]=o;q=o}else{q=c[53856]|0}r=+h[a+504>>3];s=+h[a+512>>3];t=+h[a+352>>3];u=t*+h[a+520>>3];v=t*+h[a+528>>3];o=(d|0)>0;do{if((c[a+360>>2]|0)==0){if(o){w=0}else{break}do{h[q+(w<<4)>>3]=u*(r+ +h[b+(w<<4)>>3]);h[q+(w<<4)+8>>3]=v*(s+ +h[b+(w<<4)+8>>3]);w=w+1|0;}while((w|0)<(d|0))}else{if(o){x=0}else{break}do{t=-0.0-u*(s+ +h[b+(x<<4)+8>>3]);h[q+(x<<4)+8>>3]=v*(r+ +h[b+(x<<4)>>3]);h[q+(x<<4)>>3]=t;x=x+1|0;}while((x|0)<(d|0))}}while(0);Vc[c[k>>2]&63](a,q,d,m)}else{Vc[c[k>>2]&63](a,b,d,m)}if((n|0)==0){i=f;return}n=(c[j>>2]|0)+16|0;j=g;c[n>>2]=c[j>>2];c[n+4>>2]=c[j+4>>2];c[n+8>>2]=c[j+8>>2];c[n+12>>2]=c[j+12>>2];c[n+16>>2]=c[j+16>>2];c[n+20>>2]=c[j+20>>2];c[n+24>>2]=c[j+24>>2];c[n+28>>2]=c[j+28>>2];c[n+32>>2]=c[j+32>>2];c[n+36>>2]=c[j+36>>2];i=f;return}function sB(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0;e=i;i=i+64|0;f=b;b=i;i=i+32|0;tF(b,f,32)|0;f=e|0;g=f;j=b;c[g>>2]=c[j>>2];c[g+4>>2]=c[j+4>>2];c[g+8>>2]=c[j+8>>2];c[g+12>>2]=c[j+12>>2];j=f+32|0;g=j;k=b+16|0;c[g>>2]=c[k>>2];c[g+4>>2]=c[k+4>>2];c[g+8>>2]=c[k+8>>2];c[g+12>>2]=c[k+12>>2];h[f+16>>3]=+h[f>>3];h[f+24>>3]=+h[f+40>>3];h[f+48>>3]=+h[j>>3];h[f+56>>3]=+h[f+8>>3];rB(a,f|0,4,d);i=e;return}function tB(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var i=0,j=0,k=0,l=0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0,s=0;i=c[a+60>>2]|0;if((i|0)==0){return}j=i+104|0;i=c[j>>2]|0;if((i|0)==0){return}if((c[(c[a+16>>2]|0)+144>>2]|0)==0){return}if((c[a+152>>2]&8192|0)!=0){Ic[i&15](a,b,d,e,f,g&255);return}if((c[43760]|0)<(d|0)){i=d+10|0;c[43760]=i;k=mk(c[53856]|0,i<<4)|0;c[53856]=k;l=k}else{l=c[53856]|0}m=+h[a+504>>3];n=+h[a+512>>3];o=+h[a+352>>3];p=o*+h[a+520>>3];q=o*+h[a+528>>3];k=(d|0)>0;do{if((c[a+360>>2]|0)==0){if(k){r=0}else{break}do{h[l+(r<<4)>>3]=p*(m+ +h[b+(r<<4)>>3]);h[l+(r<<4)+8>>3]=q*(n+ +h[b+(r<<4)+8>>3]);r=r+1|0;}while((r|0)<(d|0))}else{if(k){s=0}else{break}do{o=-0.0-p*(n+ +h[b+(s<<4)+8>>3]);h[l+(s<<4)+8>>3]=q*(m+ +h[b+(s<<4)>>3]);h[l+(s<<4)>>3]=o;s=s+1|0;}while((s|0)<(d|0))}}while(0);Ic[c[j>>2]&15](a,l,d,e,f,g&255);return}function uB(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0,p=0;e=c[a+60>>2]|0;if((e|0)==0){return}f=e+108|0;e=c[f>>2]|0;if((e|0)==0){return}if((c[(c[a+16>>2]|0)+144>>2]|0)==0){return}if((c[a+152>>2]&8192|0)!=0){Tc[e&127](a,b,d);return}if((c[43760]|0)<(d|0)){e=d+10|0;c[43760]=e;g=mk(c[53856]|0,e<<4)|0;c[53856]=g;i=g}else{i=c[53856]|0}j=+h[a+504>>3];k=+h[a+512>>3];l=+h[a+352>>3];m=l*+h[a+520>>3];n=l*+h[a+528>>3];g=(d|0)>0;do{if((c[a+360>>2]|0)==0){if(g){o=0}else{break}do{h[i+(o<<4)>>3]=m*(j+ +h[b+(o<<4)>>3]);h[i+(o<<4)+8>>3]=n*(k+ +h[b+(o<<4)+8>>3]);o=o+1|0;}while((o|0)<(d|0))}else{if(g){p=0}else{break}do{l=-0.0-m*(k+ +h[b+(p<<4)+8>>3]);h[i+(p<<4)+8>>3]=n*(j+ +h[b+(p<<4)>>3]);h[i+(p<<4)>>3]=l;p=p+1|0;}while((p|0)<(d|0))}}while(0);Tc[c[f>>2]&127](a,i,d);return}function vB(b,d){b=b|0;d=d|0;var e=0,f=0;e=c[b+60>>2]|0;if((d|0)==0){return}if((a[d]|0)==0|(e|0)==0){return}f=c[e+112>>2]|0;if((f|0)==0){return}Dc[f&63](b,d);return}function wB(b,d,e,f,g,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0;k=i;i=i+40|0;l=k|0;m=k+32|0;n=c[b+60>>2]|0;o=BB(d)|0;if((o|0)==0){if((ul(d)|0)==0|(n|0)==0){i=k;return}p=c[n+116>>2]|0;if((p|0)==0){i=k;return}Bc[p&63](b,d,e,f,g&255);i=k;return}EB(m,o,b+432|0);d=c[m>>2]|0;p=c[m+4>>2]|0;if((d|0)<1&(p|0)<1){i=k;return}m=l+16|0;q=m;r=e;c[q>>2]=c[r>>2];c[q+4>>2]=c[r+4>>2];c[q+8>>2]=c[r+8>>2];c[q+12>>2]=c[r+12>>2];q=l;c[q>>2]=c[r>>2];c[q+4>>2]=c[r+4>>2];c[q+8>>2]=c[r+8>>2];c[q+12>>2]=c[r+12>>2];if((f|0)>1){r=l|0;q=l+8|0;s=m|0;t=l+24|0;u=1;v=+h[r>>3];w=+h[q>>3];x=+h[s>>3];y=+h[t>>3];do{z=+h[e+(u<<4)>>3];v=v<z?v:z;A=+h[e+(u<<4)+8>>3];w=w<A?w:A;x=x>z?x:z;y=y>A?y:A;u=u+1|0;}while((u|0)<(f|0));h[r>>3]=v;h[q>>3]=w;h[s>>3]=x;h[t>>3]=y;B=x;C=v;D=y;E=w}else{B=+h[m>>3];C=+h[l>>3];D=+h[l+24>>3];E=+h[l+8>>3]}t=m|0;m=l|0;w=B-C;s=l+24|0;q=l+8|0;C=D-E;E=+(p|0);D=+(d|0);B=w/D;y=C/E;do{if((a[j]|0)==0){F=D;G=E}else{if((pm(j,160408)|0)==0){F=D*B;G=E;break}if((pm(j,155480)|0)==0){F=D;G=E*y;break}if((pm(j,151816)|0)==0){F=D*B;G=E*y;break}if((Km(j)|0)<<24>>24==0){F=D;G=E;break}if(B<y){F=D*B;G=E*B;break}else{F=D*y;G=E*y;break}}}while(0);if(F<w){y=(w-F)*.5;h[m>>3]=y+ +h[m>>3];h[t>>3]=+h[t>>3]-y}if(G<C){y=(C-G)*.5;h[q>>3]=y+ +h[q>>3];h[s>>3]=+h[s>>3]-y}y=+h[m>>3];if((c[b+152>>2]&8192|0)==0){G=+h[q>>3];C=+h[b+504>>3];F=+h[b+512>>3];w=+h[b+352>>3];E=w*+h[b+520>>3];D=w*+h[b+528>>3];j=(c[b+360>>2]|0)==0;if(j){H=G+F;I=y+C}else{H=y+C;I=-0.0-(G+F)}G=E*I;h[m>>3]=G;h[q>>3]=D*H;d=l+16|0;H=+h[d>>3];I=+h[s>>3];if(j){J=I+F;K=H+C}else{J=H+C;K=-0.0-(I+F)}F=E*K;h[d>>3]=F;h[s>>3]=D*J;L=G;M=F}else{L=y;M=+h[t>>3]}if(L>M){h[m>>3]=M;h[t>>3]=L}L=+h[q>>3];M=+h[s>>3];if(L>M){h[q>>3]=M;h[s>>3]=L}if((n|0)==0){i=k;return}KA(b,o,l,g,c[b+72>>2]|0);i=k;return}function xB(a,b){a=a|0;b=+b;if((c[a+60>>2]|0)==0){return}h[(c[a+16>>2]|0)+152>>3]=b;return}function yB(a,b){a=a|0;b=b|0;return Ya(c[a>>2]|0,c[b>>2]|0)|0}function zB(a){a=a|0;var b=0,d=0;b=MA(a,2,155360)|0;if((b|0)==0){d=999;return d|0}c[a+148>>2]=c[(c[b+16>>2]|0)+12>>2];d=300;return d|0}function AB(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=c[a+148>>2]|0;if((e|0)==0){f=0;return f|0}a=c[e>>2]|0;if((a|0)==0){f=0;return f|0}f=Oc[a&255](b,d)|0;return f|0}function BB(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;i=i+64|0;d=b|0;e=c[53676]|0;if((e|0)==0){f=0;i=b;return f|0}c[d+8>>2]=a;f=Hc[c[e>>2]&63](e,d,4)|0;i=b;return f|0}function CB(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;if((b|0)==0){cc(153800,163008,590,170512);return 0}e=c[b+8>>2]|0;if((e|0)==0){cc(131336,163008,591,170512);return 0}f=b+20|0;g=c[f>>2]|0;if((g|0)!=0){mc(g|0,0,0)|0;h=1;i=d;return h|0}g=Sm(e)|0;if((g|0)==0){h=1;i=d;return h|0}e=Eb(g|0,116680)|0;c[f>>2]=e;if((e|0)==0){e=Wb(c[(Vb()|0)>>2]|0)|0;Fv(0,109336,(f=i,i=i+16|0,c[f>>2]=e,c[f+8>>2]=g,f)|0)|0;i=f;h=0;i=d;return h|0}f=c[44710]|0;if((f|0)>49){a[b+17|0]=1;h=1;i=d;return h|0}else{c[44710]=f+1;h=1;i=d;return h|0}return 0}function DB(b){b=b|0;var d=0;if((a[b+17|0]|0)==0){return}d=b+20|0;b=c[d>>2]|0;if((b|0)==0){return}Ha(b|0)|0;c[d>>2]=0;return}function EB(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0.0,l=0.0,m=0.0;e=i;f=d;d=i;i=i+16|0;c[d>>2]=c[f>>2];c[d+4>>2]=c[f+4>>2];c[d+8>>2]=c[f+8>>2];c[d+12>>2]=c[f+12>>2];if((b|0)==0){g=-1;j=-1}else{f=c[b+48>>2]|0;if((f|0)==0){k=+h[d>>3];l=+h[d+8>>3]}else{m=+(f|0);h[d+8>>3]=m;h[d>>3]=m;k=m;l=m}g=~~(+((c[b+40>>2]|0)*72|0|0)/k);j=~~(+((c[b+44>>2]|0)*72|0|0)/l)}c[a>>2]=g;c[a+4>>2]=j;i=e;return}function FB(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0.0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ia=0.0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Ra=0,Sa=0.0,Ta=0,Va=0,Wa=0,Xa=0,Za=0,_a=0,$a=0,bb=0,cb=0,eb=0,fb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0.0;g=i;i=i+2488|0;j=g|0;k=g+8|0;l=g+16|0;m=g+24|0;n=g+32|0;o=g+1056|0;p=g+1064|0;q=g+1072|0;r=g+1080|0;s=g+1088|0;t=g+1096|0;u=g+1112|0;v=g+1144|0;w=g+2168|0;x=g+2176|0;y=g+2184|0;z=g+2192|0;A=g+2200|0;B=g+2224|0;C=g+2424|0;do{if((f|0)!=0){if((a[f]|0)==0){break}do{if((c[53686]|0)==0){D=c[53702]|0;if((c[44708]|0)==(D|0)){break}c[44708]=D;D=c[53676]|0;if((D|0)==0){break}Vg(D)|0;c[53676]=0}}while(0);E=+h[(c[(c[e+8>>2]|0)+8>>2]|0)+24>>3];F=E<1.0?96.0:E;D=c[53676]|0;if((D|0)==0){G=$g(173112,c[43326]|0)|0;c[53676]=G;if((G|0)==0){H=12}else{I=G;J=C;H=11}}else{I=D;J=C;H=11}if((H|0)==11){c[C+8>>2]=f;D=Hc[c[I>>2]&63](I,J,4)|0;if((D|0)==0){H=12}else{K=D;H=191}}a:do{if((H|0)==12){D=jk(64)|0;G=D;if((D|0)==0){L=-1;M=-1;break}N=D+8|0;c[N>>2]=f;if((CB(G)|0)<<24>>24==0){L=-1;M=-1;break}O=A|0;P=B|0;Q=D+20|0;R=c[Q>>2]|0;b:do{if((R|0)==0){H=25}else{if((Nb(O|0,1,20,R|0)|0)==20){S=0}else{H=25;break}while(1){T=S+1|0;if((wF(O|0,c[20792+(S<<4)>>2]|0,c[20796+(S<<4)>>2]|0)|0)==0){break}if(T>>>0<10>>>0){S=T}else{H=25;break b}}T=D+28|0;c[T>>2]=c[20804+(S<<4)>>2];U=c[20800+(S<<4)>>2]|0;V=D+24|0;c[V>>2]=U;do{if((S|0)==8){if((wF(A+8|0,121160,4)|0)!=0){W=U;H=26;break}c[T>>2]=120288;c[V>>2]=11;H=90}else if((S|0)==7){while(1){if((db(P|0,200,c[Q>>2]|0)|0)==0){H=24;break}if((wF(P|0,124064,4)|0)==0){H=21;break}}if((H|0)==21){c[T>>2]=121952;c[V>>2]=8;H=105;break}else if((H|0)==24){W=c[V>>2]|0;H=26;break}}else{W=U;H=26}}while(0);c:do{if((H|0)==26){switch(W|0){case 1:{c[D+48>>2]=0;mc(c[Q>>2]|0,16,0)|0;U=c[Q>>2]|0;V=0;T=0;do{X=ab(U|0)|0;if((bc(U|0)|0)!=0){break c}T=X<<(V<<3)|T;V=V+1|0;}while(V>>>0<2>>>0);V=c[Q>>2]|0;U=0;X=0;do{Y=ab(V|0)|0;if((bc(V|0)|0)!=0){break c}X=Y<<(U<<3)|X;U=U+1|0;}while(U>>>0<2>>>0);U=c[Q>>2]|0;V=0;Y=0;do{Z=ab(U|0)|0;if((bc(U|0)|0)!=0){break c}Y=Z<<(V<<3)|Y;V=V+1|0;}while(V>>>0<2>>>0);V=c[Q>>2]|0;U=0;Z=0;do{_=ab(V|0)|0;if((bc(V|0)|0)!=0){break c}Z=_<<(U<<3)|Z;U=U+1|0;}while(U>>>0<2>>>0);c[D+40>>2]=X|T<<16;c[D+44>>2]=Z|Y<<16;break c;break};case 5:{c[D+48>>2]=0;mc(c[Q>>2]|0,0,0)|0;U=c[Q>>2]|0;V=n|0;do{if((db(V|0,1024,U|0)|0)==0){break c}$=Ua(V|0,97936)|0;}while(($|0)==0);Y=v|0;Z=$+9|0;while(1){T=a[Z]|0;if(T<<24>>24==0){if((db(V|0,1024,U|0)|0)==0){aa=Z;break}X=a[V]|0;if(X<<24>>24==0){aa=V;break}else{ba=X;ca=V}}else{ba=T;ca=Z}if((Qa(ba&255|0)|0)==0){aa=ca;break}else{Z=ca+1|0}}Z=a[aa]|0;if(Z<<24>>24==0){if((db(V|0,1024,U|0)|0)==0){break c}da=d[V]|0;ea=V}else{da=Z<<24>>24;ea=aa}if((da|0)==91){fa=ea}else{break c}while(1){Z=fa+1|0;T=a[Z]|0;if(T<<24>>24==0){if((db(V|0,1024,U|0)|0)==0){ga=0;ha=Z;break}X=a[V]|0;if(X<<24>>24==0){ga=0;ha=V;break}else{ia=X;ja=V}}else{ia=T;ja=Z}if((Qa(ia&255|0)|0)==0){ga=0;ha=ja;break}else{fa=ja}}while(1){Z=a[ha]|0;if(Z<<24>>24==0){if((db(V|0,1024,U|0)|0)==0){ka=ga;la=ha;break}T=a[V]|0;if(T<<24>>24==0){ka=ga;la=V;break}else{ma=T;na=V}}else{ma=Z;na=ha}if(!(((ma<<24>>24)-48|0)>>>0<10>>>0|ma<<24>>24==46)){ka=ga;la=na;break}Z=ga+1|0;a[v+ga|0]=ma;T=na+1|0;if((Z|0)==1023){ka=1023;la=T;break}else{ga=Z;ha=T}}a[v+ka|0]=0;E=+sF(Y,m);if((c[m>>2]|0)==(Y|0)){break c}else{oa=la}while(1){T=a[oa]|0;if(T<<24>>24==0){if((db(V|0,1024,U|0)|0)==0){pa=0;qa=oa;break}Z=a[V]|0;if(Z<<24>>24==0){pa=0;qa=V;break}else{ra=Z;sa=V}}else{ra=T;sa=oa}if((Qa(ra&255|0)|0)==0){pa=0;qa=sa;break}else{oa=sa+1|0}}while(1){T=a[qa]|0;if(T<<24>>24==0){if((db(V|0,1024,U|0)|0)==0){ta=pa;ua=qa;break}Z=a[V]|0;if(Z<<24>>24==0){ta=pa;ua=V;break}else{va=Z;wa=V}}else{va=T;wa=qa}if(!(((va<<24>>24)-48|0)>>>0<10>>>0|va<<24>>24==46)){ta=pa;ua=wa;break}T=pa+1|0;a[v+pa|0]=va;Z=wa+1|0;if((T|0)==1023){ta=1023;ua=Z;break}else{pa=T;qa=Z}}a[v+ta|0]=0;xa=+sF(Y,l);if((c[l>>2]|0)==(Y|0)){break c}else{ya=ua}while(1){Z=a[ya]|0;if(Z<<24>>24==0){if((db(V|0,1024,U|0)|0)==0){za=0;Aa=ya;break}T=a[V]|0;if(T<<24>>24==0){za=0;Aa=V;break}else{Ba=T;Ca=V}}else{Ba=Z;Ca=ya}if((Qa(Ba&255|0)|0)==0){za=0;Aa=Ca;break}else{ya=Ca+1|0}}while(1){Z=a[Aa]|0;if(Z<<24>>24==0){if((db(V|0,1024,U|0)|0)==0){Da=za;Ea=Aa;break}T=a[V]|0;if(T<<24>>24==0){Da=za;Ea=V;break}else{Fa=T;Ga=V}}else{Fa=Z;Ga=Aa}if(!(((Fa<<24>>24)-48|0)>>>0<10>>>0|Fa<<24>>24==46)){Da=za;Ea=Ga;break}Z=za+1|0;a[v+za|0]=Fa;T=Ga+1|0;if((Z|0)==1023){Da=1023;Ea=T;break}else{za=Z;Aa=T}}a[v+Da|0]=0;Ia=+sF(Y,k);if((c[k>>2]|0)==(Y|0)){break c}else{Ja=Ea}while(1){T=a[Ja]|0;if(T<<24>>24==0){if((db(V|0,1024,U|0)|0)==0){Ka=0;La=Ja;break}Z=a[V]|0;if(Z<<24>>24==0){Ka=0;La=V;break}else{Ma=Z;Na=V}}else{Ma=T;Na=Ja}if((Qa(Ma&255|0)|0)==0){Ka=0;La=Na;break}else{Ja=Na+1|0}}while(1){T=a[La]|0;if(T<<24>>24==0){if((db(V|0,1024,U|0)|0)==0){Oa=Ka;break}Z=a[V]|0;if(Z<<24>>24==0){Oa=Ka;break}else{Pa=Z;Ra=V}}else{Pa=T;Ra=La}if(!(((Pa<<24>>24)-48|0)>>>0<10>>>0|Pa<<24>>24==46)){Oa=Ka;break}T=Ka+1|0;a[v+Ka|0]=Pa;if((T|0)==1023){Oa=1023;break}Ka=T;La=Ra+1|0}a[v+Oa|0]=0;Sa=+sF(Y,j);if((c[j>>2]|0)==(Y|0)){break c}c[D+32>>2]=~~E;c[D+36>>2]=~~xa;c[D+40>>2]=~~(Ia-E);c[D+44>>2]=~~(Sa-xa);break c;break};case 3:{c[D+48>>2]=0;mc(c[Q>>2]|0,16,0)|0;V=c[Q>>2]|0;U=0;T=0;do{Z=ab(V|0)|0;if((bc(V|0)|0)!=0){break c}T=Z|T<<8;U=U+1|0;}while(U>>>0<4>>>0);U=c[Q>>2]|0;V=0;Y=0;do{Z=ab(U|0)|0;if((bc(U|0)|0)!=0){break c}Y=Z|Y<<8;V=V+1|0;}while(V>>>0<4>>>0);c[D+40>>2]=T;c[D+44>>2]=Y;break c;break};case 11:{H=90;break c;break};case 6:{V=v|0;c[D+48>>2]=0;mc(c[Q>>2]|0,0,0)|0;if((db(V|0,1024,c[Q>>2]|0)|0)==0){break c}while(1){U=Ua(V|0,129848)|0;if((U|0)!=0){Z=ac(U|0,126552,(Ta=i,i=i+32|0,c[Ta>>2]=w,c[Ta+8>>2]=x,c[Ta+16>>2]=y,c[Ta+24>>2]=z,Ta)|0)|0;i=Ta;if((Z|0)==4){break}}if((db(V|0,1024,c[Q>>2]|0)|0)==0){break c}}V=c[w>>2]|0;c[D+32>>2]=V;Y=c[x>>2]|0;c[D+36>>2]=Y;c[D+40>>2]=(c[y>>2]|0)-V;c[D+44>>2]=(c[z>>2]|0)-Y;break c;break};case 4:{c[D+48>>2]=0;Y=c[Q>>2]|0;V=ab(Y|0)|0;if((bc(Y|0)|0)==0){Va=V}else{break c}d:while(1){do{if((Va|0)!=255){if((gb(20952,Va|0)|0)!=0){break}if((Va|0)==192){break d}Wa=c[Q>>2]|0;if((Va|0)==194){Xa=0;H=73;break d}else{Za=0;_a=0}do{V=ab(Wa|0)|0;if((bc(Wa|0)|0)!=0){break c}_a=V|_a<<8;Za=Za+1|0;}while(Za>>>0<2>>>0);mc(c[Q>>2]|0,_a-2|0,1)|0}}while(0);V=c[Q>>2]|0;Va=ab(V|0)|0;if((bc(V|0)|0)!=0){break c}}if((H|0)==73){while(1){H=0;ab(Wa|0)|0;if((bc(Wa|0)|0)!=0){break c}V=Xa+1|0;if(V>>>0<3>>>0){Xa=V;H=73}else{break}}V=c[Q>>2]|0;Y=0;T=0;do{Z=ab(V|0)|0;if((bc(V|0)|0)!=0){break c}T=Z|T<<8;Y=Y+1|0;}while(Y>>>0<2>>>0);Y=c[Q>>2]|0;V=0;Z=0;do{U=ab(Y|0)|0;if((bc(Y|0)|0)!=0){break c}Z=U|Z<<8;V=V+1|0;}while(V>>>0<2>>>0);c[D+44>>2]=T;c[D+40>>2]=Z;break c}V=c[Q>>2]|0;Y=0;do{ab(V|0)|0;if((bc(V|0)|0)!=0){break c}Y=Y+1|0;}while(Y>>>0<3>>>0);Y=c[Q>>2]|0;V=0;Z=0;do{T=ab(Y|0)|0;if((bc(Y|0)|0)!=0){break c}Z=T|Z<<8;V=V+1|0;}while(V>>>0<2>>>0);V=c[Q>>2]|0;Y=0;T=0;do{U=ab(V|0)|0;if((bc(V|0)|0)!=0){break c}T=U|T<<8;Y=Y+1|0;}while(Y>>>0<2>>>0);c[D+44>>2]=Z;c[D+40>>2]=T;break c;break};case 0:{break b;break};case 8:{H=105;break c;break};case 2:{c[D+48>>2]=0;mc(c[Q>>2]|0,6,0)|0;Y=c[Q>>2]|0;V=0;U=0;do{X=ab(Y|0)|0;if((bc(Y|0)|0)!=0){break c}U=X<<(V<<3)|U;V=V+1|0;}while(V>>>0<2>>>0);V=c[Q>>2]|0;Y=0;T=0;do{Z=ab(V|0)|0;if((bc(V|0)|0)!=0){break c}T=Z<<(Y<<3)|T;Y=Y+1|0;}while(Y>>>0<2>>>0);c[D+40>>2]=U;c[D+44>>2]=T;break c;break};case 12:{c[D+48>>2]=0;mc(c[Q>>2]|0,6,0)|0;Y=c[Q>>2]|0;V=ab(Y|0)|0;if((bc(Y|0)|0)!=0){break c}Y=c[Q>>2]|0;Z=ab(Y|0)|0;if((bc(Y|0)|0)!=0){break c}c[D+40>>2]=V;c[D+44>>2]=Z;break c;break};default:{break c}}}}while(0);e:do{if((H|0)==90){c[D+48>>2]=0;mc(c[Q>>2]|0,15,0)|0;Z=(ab(c[Q>>2]|0)|0)==88;V=c[Q>>2]|0;if(Z){mc(V|0,24,0)|0;Z=c[Q>>2]|0;Y=0;X=0;do{_=ab(Z|0)|0;if((bc(Z|0)|0)!=0){break e}X=_<<(Y<<3)|X;Y=Y+1|0;}while(Y>>>0<4>>>0);Y=c[Q>>2]|0;Z=0;T=0;do{U=ab(Y|0)|0;if((bc(Y|0)|0)!=0){break e}T=U<<(Z<<3)|T;Z=Z+1|0;}while(Z>>>0<4>>>0);c[D+40>>2]=X;c[D+44>>2]=T;break}else{mc(V|0,26,0)|0;Z=c[Q>>2]|0;Y=0;U=0;do{_=ab(Z|0)|0;if((bc(Z|0)|0)!=0){break e}U=_<<(Y<<3)|U;Y=Y+1|0;}while(Y>>>0<2>>>0);Y=c[Q>>2]|0;Z=0;V=0;do{T=ab(Y|0)|0;if((bc(Y|0)|0)!=0){break e}V=T<<(Z<<3)|V;Z=Z+1|0;}while(Z>>>0<2>>>0);c[D+40>>2]=U;c[D+44>>2]=V;break}}else if((H|0)==105){Z=t|0;if((c[43816]|0)==0){if((LE(175160,132080,1)|0)!=0){Fv(1,92408,(Ta=i,i=i+8|0,c[Ta>>2]=132080,Ta)|0)|0;i=Ta}c[43816]=175160}mc(c[Q>>2]|0,0,0)|0;f:do{if((db(P|0,200,c[Q>>2]|0)|0)==0){$a=0;bb=0}else{Y=u|0;T=u+12|0;X=u+20|0;_=u+8|0;cb=u+16|0;eb=u+4|0;fb=0;hb=0;ib=0;jb=0;while(1){if(ib<<24>>24==0|jb<<24>>24==0){kb=jb;lb=ib;mb=P;nb=hb;ob=fb}else{$a=fb;bb=hb;break f}g:while(1){pb=kb;qb=lb;rb=mb;sb=nb;h:while(1){if((YE(175160,rb,4,Y,0)|0)==0){tb=rb}else{ub=pb;vb=qb;wb=sb;xb=ob;break g}while(1){a[tb+(c[T>>2]|0)|0]=0;a[tb+(c[X>>2]|0)|0]=0;yb=tb+(c[_>>2]|0)|0;zb=tb+(c[cb>>2]|0)|0;Ab=tb+((c[eb>>2]|0)+1)|0;if((Ya(yb|0,87080)|0)==0){break}if((Ya(yb|0,160280)|0)==0){break h}if((Ya(yb|0,155296)|0)==0){yb=ac(zb|0,151720,(Ta=i,i=i+32|0,c[Ta>>2]=p,c[Ta+8>>2]=q,c[Ta+16>>2]=r,c[Ta+24>>2]=s,Ta)|0)|0;i=Ta;if((yb|0)==4){H=129;break g}}if((YE(175160,Ab,4,Y,0)|0)==0){tb=Ab}else{ub=pb;vb=qb;wb=sb;xb=ob;break g}}yb=ac(zb|0,82328,(Ta=i,i=i+16|0,c[Ta>>2]=o,c[Ta+8>>2]=Z,Ta)|0)|0;i=Ta;do{if((yb|0)==2){Bb=1;Cb=GB(+h[o>>3],Z)|0}else{Db=ac(zb|0,168376,(Ta=i,i=i+8|0,c[Ta>>2]=o,Ta)|0)|0;i=Ta;if((Db|0)!=1){Bb=qb;Cb=sb;break}Bb=1;Cb=GB(+h[o>>3],164232)|0}}while(0);if(pb<<24>>24==0){pb=0;qb=Bb;rb=Ab;sb=Cb}else{ub=pb;vb=Bb;wb=Cb;xb=ob;break g}}rb=ac(zb|0,82328,(Ta=i,i=i+16|0,c[Ta>>2]=o,c[Ta+8>>2]=Z,Ta)|0)|0;i=Ta;do{if((rb|0)==2){Eb=1;Fb=GB(+h[o>>3],Z)|0}else{yb=ac(zb|0,168376,(Ta=i,i=i+8|0,c[Ta>>2]=o,Ta)|0)|0;i=Ta;if((yb|0)!=1){Eb=pb;Fb=ob;break}Eb=1;Fb=GB(+h[o>>3],164232)|0}}while(0);if(qb<<24>>24==0){kb=Eb;lb=0;mb=Ab;nb=sb;ob=Fb}else{ub=Eb;vb=qb;wb=sb;xb=Fb;break}}if((H|0)==129){H=0;ub=1;vb=1;wb=~~(+h[r>>3]- +h[p>>3]+1.0);xb=~~(+h[s>>3]- +h[q>>3]+1.0)}if((db(P|0,200,c[Q>>2]|0)|0)==0){$a=xb;bb=wb;break}else{fb=xb;hb=wb;ib=vb;jb=ub}}}}while(0);c[D+48>>2]=0;c[D+40>>2]=bb;c[D+44>>2]=$a;}}while(0);Z=c[53676]|0;Hc[c[Z>>2]&63](Z,D,1)|0;K=G;H=191;break a}}while(0);if((H|0)==25){c[D+28>>2]=119560;c[D+24>>2]=0;}G=ul(c[N>>2]|0)|0;c[D+52>>2]=G;if((G|0)==0){Fv(0,103432,(Ta=i,i=i+8|0,c[Ta>>2]=c[N>>2],Ta)|0)|0;i=Ta}eF(D);L=-1;M=-1}}while(0);i:do{if((H|0)==191){do{if((a[K+17|0]|0)==0){if((K|0)==0){L=-1;M=-1;break i}}else{G=K+20|0;Q=c[G>>2]|0;if((Q|0)==0){break}Ha(Q|0)|0;c[G>>2]=0}}while(0);D=c[K+48>>2]|0;if((D|0)==0){Gb=F}else{Gb=+(D|0)}L=~~(+((c[K+40>>2]|0)*72|0|0)/Gb);M=~~(+((c[K+44>>2]|0)*72|0|0)/Gb)}}while(0);c[b>>2]=L;c[b+4>>2]=M;i=g;return}}while(0);c[b>>2]=-1;c[b+4>>2]=-1;i=g;return}function GB(a,b){a=+a;b=b|0;var c=0.0,d=0.0,e=0,f=0.0,g=0.0,h=0.0,i=0.0,j=0.0;if((Ya(b|0,148872)|0)==0){c=a*72.0;if(c<0.0){d=c+-.5}else{d=c+.5}e=~~d;return e|0}if((Ya(b|0,145712)|0)==0){d=a*72.0/96.0;if(d<0.0){f=d+-.5}else{f=d+.5}e=~~f;return e|0}if((Ya(b|0,142696)|0)==0){f=a*72.0/6.0;if(f<0.0){g=f+-.5}else{g=f+.5}e=~~g;return e|0}do{if((Ya(b|0,164232)|0)!=0){if((Ya(b|0,139624)|0)==0){break}if((Ya(b|0,136976)|0)==0){g=a*28.346456664;if(g<0.0){h=g+-.5}else{h=g+.5}e=~~h;return e|0}if((Ya(b|0,134064)|0)!=0){e=0;return e|0}g=a*2.8346456663999997;if(g<0.0){i=g+-.5}else{i=g+.5}e=~~i;return e|0}}while(0);if(a<0.0){j=a+-.5}else{j=a+.5}e=~~j;return e|0}function HB(a,b,d){a=a|0;b=b|0;d=d|0;d=c[b+20>>2]|0;if((d|0)!=0){Ha(d|0)|0}if((c[b+52>>2]|0)==0){eF(b);return}d=c[b+60>>2]|0;if((d|0)==0){eF(b);return}Cc[d&255](b);eF(b);return}function IB(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;d=dF(28)|0;e=d;if((d|0)==0){f=0;return f|0}g=(b|0)>0;do{if(g){h=0;i=0;do{h=(c[(c[a+(i<<2)>>2]|0)+4>>2]|0)+h|0;i=i+1|0;}while((i|0)<(b|0));i=h<<4;if((i|0)==0){j=0;k=h;break}j=dF(i)|0;k=h}else{j=0;k=0}}while(0);i=d+8|0;c[i>>2]=j;j=(b<<2)+4|0;if((j|0)==0){l=0}else{l=dF(j)|0}j=d+12|0;c[j>>2]=l;m=k<<2;if((m|0)==0){n=d+16|0;c[n>>2]=0;o=0;p=n}else{n=d+16|0;c[n>>2]=dF(m)|0;o=dF(m)|0;p=n}n=d+20|0;c[n>>2]=o;c[d+4>>2]=k;c[d>>2]=b;c[l>>2]=0;if(g){g=0;l=0;while(1){d=a+(l<<2)|0;k=c[d>>2]|0;o=c[k+4>>2]|0;m=g-1+o|0;if((o|0)>0){o=0;q=g;r=k;while(1){k=(c[i>>2]|0)+(q<<4)|0;s=(c[r>>2]|0)+(o<<4)|0;c[k>>2]=c[s>>2];c[k+4>>2]=c[s+4>>2];c[k+8>>2]=c[s+8>>2];c[k+12>>2]=c[s+12>>2];s=q+1|0;c[(c[p>>2]|0)+(q<<2)>>2]=s;c[(c[n>>2]|0)+(q<<2)>>2]=q-1;k=o+1|0;t=c[d>>2]|0;if((k|0)<(c[t+4>>2]|0)){o=k;q=s;r=t}else{u=s;break}}}else{u=g}c[(c[p>>2]|0)+(m<<2)>>2]=g;c[(c[n>>2]|0)+(g<<2)>>2]=m;r=l+1|0;c[(c[j>>2]|0)+(r<<2)>>2]=u;if((r|0)<(b|0)){g=u;l=r}else{break}}}aC(e);f=e;return f|0}function JB(a){a=a|0;var b=0,d=0,e=0;eF(c[a+8>>2]|0);eF(c[a+12>>2]|0);eF(c[a+16>>2]|0);eF(c[a+20>>2]|0);b=a+24|0;d=c[b>>2]|0;if((d|0)==0){e=a;eF(e);return}eF(c[d>>2]|0);eF(c[b>>2]|0);e=a;eF(e);return}function KB(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;h=i;j=b;b=i;i=i+16|0;c[b>>2]=c[j>>2];c[b+4>>2]=c[j+4>>2];c[b+8>>2]=c[j+8>>2];c[b+12>>2]=c[j+12>>2];j=e;e=i;i=i+16|0;c[e>>2]=c[j>>2];c[e+4>>2]=c[j+4>>2];c[e+8>>2]=c[j+8>>2];c[e+12>>2]=c[j+12>>2];j=bC(a,d,b)|0;k=bC(a,f,e)|0;l=WB(b,d,j,e,f,k,a)|0;f=c[a+4>>2]|0;d=f+1|0;m=f;n=1;while(1){o=c[l+(m<<2)>>2]|0;p=n+1|0;if((o|0)==(d|0)){break}else{m=o;n=p}}m=dF(p<<4)|0;o=m+(n<<4)|0;q=e;c[o>>2]=c[q>>2];c[o+4>>2]=c[q+4>>2];c[o+8>>2]=c[q+8>>2];c[o+12>>2]=c[q+12>>2];q=c[l+(f<<2)>>2]|0;f=n-1|0;n=m+(f<<4)|0;if((q|0)==(d|0)){r=f;s=n}else{o=c[a+8>>2]|0;a=q;q=f;f=n;while(1){n=f;e=o+(a<<4)|0;c[n>>2]=c[e>>2];c[n+4>>2]=c[e+4>>2];c[n+8>>2]=c[e+8>>2];c[n+12>>2]=c[e+12>>2];e=c[l+(a<<2)>>2]|0;n=q-1|0;t=m+(n<<4)|0;if((e|0)==(d|0)){r=n;s=t;break}else{a=e;q=n;f=t}}}f=s;s=b;c[f>>2]=c[s>>2];c[f+4>>2]=c[s+4>>2];c[f+8>>2]=c[s+8>>2];c[f+12>>2]=c[s+12>>2];if((r|0)!=0){cc(113416,153568,148,171208);return 0}if((j|0)!=0){eF(j)}if((k|0)==0){u=g+4|0;c[u>>2]=p;v=g|0;c[v>>2]=m;w=l;eF(w);i=h;return 1}eF(k);u=g+4|0;c[u>>2]=p;v=g|0;c[v>>2]=m;w=l;eF(w);i=h;return 1}function LB(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;e=a;a=i;i=i+8|0;c[a>>2]=c[e>>2];c[a+4>>2]=c[e+4>>2];e=b;b=i;i=i+16|0;c[b>>2]=c[e>>2];c[b+4>>2]=c[e+4>>2];c[b+8>>2]=c[e+8>>2];c[b+12>>2]=c[e+12>>2];e=c[a>>2]|0;f=c[a+4>>2]|0;a=f-1|0;if((f|0)>0){g=0}else{h=1;i=d;return h|0}while(1){j=g+1|0;if((_B(e+(((a+g|0)%(f|0)|0)<<4)|0,e+(g<<4)|0,b)|0)==1){h=0;k=4;break}if((j|0)<(f|0)){g=j}else{h=1;k=4;break}}if((k|0)==4){i=d;return h|0}return 0}function MB(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0.0,s=0,t=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0,B=0.0,C=0,D=0.0,E=0.0,F=0.0,G=0.0,H=0,I=0;g=i;j=d;d=i;i=i+8|0;c[d>>2]=c[j>>2];c[d+4>>2]=c[j+4>>2];j=1;k=0;l=i;i=i+168|0;c[l>>2]=0;while(1)switch(j|0){case 1:m=c[d>>2]|0;n=c[d+4>>2]|0;o=BF(177752,j,l)|0;j=9;break;case 9:if((o|0)==0){j=2;break}else{p=-1;j=8;break};case 2:q=e|0;r=+h[q>>3];s=e+8|0;t=+h[s>>3];w=r*r+t*t;if(w>1.0e-6){j=3;break}else{x=r;y=t;j=4;break};case 3:z=+ta(2,w);if((u|0)!=0&(v|0)!=0){k=CF(c[u>>2]|0,l)|0;if((k|0)>0){j=-1;break}else return 0}u=v=0;x=r/z;y=t/z;j=4;break;case 4:h[q>>3]=x;h[s>>3]=y;A=e+16|0;B=+h[A>>3];C=e+24|0;D=+h[C>>3];E=B*B+D*D;if(E>1.0e-6){j=5;break}else{F=B;G=D;j=6;break};case 5:z=+ta(2,E);if((u|0)!=0&(v|0)!=0){k=CF(c[u>>2]|0,l)|0;if((k|0)>0){j=-1;break}else return 0}u=v=0;F=B/z;G=D/z;j=6;break;case 6:h[A>>3]=F;h[C>>3]=G;c[44262]=0;ka(168,4);if((u|0)!=0&(v|0)!=0){k=CF(c[u>>2]|0,l)|0;if((k|0)>0){j=-1;break}else return 0}u=v=0;H=c[44262]|0;c[44262]=H+1;I=(c[44256]|0)+(H<<4)|0;H=m;c[I>>2]=c[H>>2];c[I+4>>2]=c[H+4>>2];c[I+8>>2]=c[H+8>>2];c[I+12>>2]=c[H+12>>2];H=ra(2,a|0,b|0,m|0,n|0,+(+h[q>>3]),+(+h[s>>3]),+(+h[A>>3]),+(+h[C>>3]))|0;if((u|0)!=0&(v|0)!=0){k=CF(c[u>>2]|0,l)|0;if((k|0)>0){j=-1;break}else return 0}u=v=0;if((H|0)==-1){p=-1;j=8;break}else{j=7;break};case 7:c[f+4>>2]=c[44262];c[f>>2]=c[44256];p=0;j=8;break;case 8:i=g;return p|0;case-1:if((k|0)==1){o=v;j=9}u=v=0;break}return 0}function NB(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;if((c[44260]|0)>=(a|0)){i=b;return}d=c[44256]|0;do{if((d|0)==0){e=dF(a<<4)|0;c[44256]=e;if((e|0)!=0){break}gc(c[o>>2]|0,125472,(f=i,i=i+24|0,c[f>>2]=154064,c[f+8>>2]=531,c[f+16>>2]=123408,f)|0)|0;i=f;rc(177752,1)}else{e=gF(d,a<<4)|0;c[44256]=e;if((e|0)!=0){break}gc(c[o>>2]|0,125472,(f=i,i=i+24|0,c[f>>2]=154064,c[f+8>>2]=537,c[f+16>>2]=114304,f)|0)|0;i=f;rc(177752,1)}}while(0);c[44260]=a;i=b;return}function OB(a,b,d,e,f,g,j,k){a=a|0;b=b|0;d=d|0;e=e|0;f=+f;g=+g;j=+j;k=+k;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,P=0.0,Q=0.0,R=0.0,S=0.0,U=0.0,V=0.0,W=0.0,X=0.0,Y=0.0,Z=0.0,_=0.0,$=0.0,aa=0.0,ba=0.0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0.0,ka=0.0,la=0.0,ma=0.0,na=0,oa=0.0,pa=0,qa=0.0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0.0,Qa=0.0,Ra=0.0,Sa=0.0,Ta=0.0,Ua=0.0;l=i;i=i+112|0;m=l|0;n=l+32|0;o=l+56|0;p=l+80|0;q=c[43786]|0;if((c[43788]|0)<(e|0)){do{if((q|0)==0){r=dF(e*40|0)|0;s=r;c[43786]=s;if((r|0)==0){t=-1}else{u=s;break}i=l;return t|0}else{s=gF(q,e*40|0)|0;r=s;c[43786]=r;if((s|0)==0){t=-1}else{u=r;break}i=l;return t|0}}while(0);c[43788]=e;v=u}else{v=q}h[v>>3]=0.0;q=(e|0)>1;do{if(q){u=1;w=0.0;do{r=u-1|0;x=+h[d+(r<<4)>>3]- +h[d+(u<<4)>>3];y=+h[d+(r<<4)+8>>3]- +h[d+(u<<4)+8>>3];w=w+ +T(x*x+y*y);h[v+(u*40|0)>>3]=w;u=u+1|0;}while((u|0)<(e|0));if(!q){break}u=v+((e-1|0)*40|0)|0;r=1;do{s=v+(r*40|0)|0;h[s>>3]=+h[s>>3]/+h[u>>3];r=r+1|0;}while((r|0)<(e|0))}}while(0);r=(e|0)>0;a:do{if(r){u=0;do{w=+h[v+(u*40|0)>>3];y=1.0-w;x=w*3.0;z=y*x*y;h[v+(u*40|0)+8>>3]=z*f;h[v+(u*40|0)+16>>3]=z*g;z=y*w*x;h[v+(u*40|0)+24>>3]=z*j;h[v+(u*40|0)+32>>3]=z*k;u=u+1|0;}while((u|0)<(e|0));if(!r){A=0.0;B=0.0;C=0.0;D=0.0;E=0.0;break}z=+h[d>>3];x=+h[d+8>>3];u=e-1|0;w=+h[d+(u<<4)>>3];y=+h[d+(u<<4)+8>>3];F=0.0;G=0.0;H=0.0;I=0.0;J=0.0;u=0;K=z;L=x;while(1){M=+h[v+(u*40|0)+8>>3];N=+h[v+(u*40|0)+16>>3];O=H+(M*M+N*N);P=+h[v+(u*40|0)+24>>3];Q=+h[v+(u*40|0)+32>>3];R=I+(M*P+N*Q);S=J+(P*P+Q*Q);U=+h[v+(u*40|0)>>3];V=1.0-U;W=V*V*(V+U*3.0);X=U*U*(U+V*3.0);V=K-(z*W+w*X);U=L-(x*W+y*X);X=G+(M*V+N*U);N=F+(P*V+Q*U);s=u+1|0;if((s|0)>=(e|0)){A=N;B=X;C=O;D=R;E=S;break a}F=N;G=X;H=O;I=R;J=S;u=s;K=+h[d+(s<<4)>>3];L=+h[d+(s<<4)+8>>3]}}else{A=0.0;B=0.0;C=0.0;D=0.0;E=0.0}}while(0);L=E*C-D*D;v=L>=0.0;if(v){Y=L}else{Y=-0.0-L}if(Y<1.0e-6){Z=0.0;_=0.0}else{Z=(C*A-D*B)/L;_=(E*B-D*A)/L}if(v){$=L}else{$=-0.0-L}v=e-1|0;L=+h[d>>3];A=+h[d+8>>3];D=+h[d+(v<<4)>>3];B=+h[d+(v<<4)+8>>3];if($>=1.0e-6&_>0.0&Z>0.0){aa=Z;ba=_}else{_=D-L;Z=B-A;$=+T(_*_+Z*Z)/3.0;aa=$;ba=$}r=d|0;u=d+8|0;$=ba*f;Z=ba*g;ba=aa*j;_=aa*k;s=(e|0)==2;ca=(b|0)>0;da=m|0;ea=m+24|0;fa=m+16|0;ga=m+8|0;m=n|0;ha=o|0;aa=L*3.0;E=A*3.0;ia=1;C=4.0;Y=4.0;b:while(1){ja=L+$*Y/3.0;ka=A+Z*Y/3.0;la=D-ba*C/3.0;ma=B-_*C/3.0;if(ia){K=ja-L;J=ka-A;I=la-ja;H=ma-ka;G=D-la;F=B-ma;y=+T(K*K+J*J)+0.0+ +T(I*I+H*H)+ +T(G*G+F*F);if(q){na=1;F=0.0;G=+h[r>>3];H=+h[u>>3];while(1){I=+h[d+(na<<4)>>3];J=I-G;K=+h[d+(na<<4)+8>>3];x=K-H;oa=F+ +T(J*J+x*x);pa=na+1|0;if((pa|0)<(e|0)){na=pa;F=oa;G=I;H=K}else{break}}qa=oa+-.001}else{qa=-.001}if(y<qa){break}}if(!ca){ra=71;break}H=la*3.0;G=D+ja*3.0-(L+H);F=aa+H-ja*6.0;H=(ja-L)*3.0;K=ma*3.0;I=B+ka*3.0-(A+K);x=E+K-ka*6.0;K=(ka-A)*3.0;na=0;c:while(1){J=+h[a+(na<<5)>>3];w=+h[a+(na<<5)+8>>3];z=+h[a+(na<<5)+16>>3];S=+h[a+(na<<5)+24>>3];R=z-J;O=S-w;d:do{if(R==0.0){h[ea>>3]=G;h[fa>>3]=F;h[ga>>3]=H;h[da>>3]=L-J;pa=XB(da,m)|0;if(O!=0.0){if((pa|0)==4){sa=4;break}if((pa|0)>0){ta=0;ua=0}else{sa=0;break}while(1){X=+h[n+(ua<<3)>>3];do{if(X>=0.0&X<=1.0){h[ea>>3]=I;h[fa>>3]=x;h[ga>>3]=K;h[da>>3]=A;N=(A+X*(K+X*(x+I*X))-w)/O;if(!(N>=0.0&N<=1.0)){va=ta;break}h[p+(ta<<3)>>3]=X;va=ta+1|0}else{va=ta}}while(0);wa=ua+1|0;if((wa|0)<(pa|0)){ta=va;ua=wa}else{sa=va;break d}}}h[ea>>3]=I;h[fa>>3]=x;h[ga>>3]=K;h[da>>3]=A-w;wa=XB(da,ha)|0;xa=(wa|0)==4;if((pa|0)==4){if(xa){sa=4;break}if((wa|0)>0){ya=0;za=0}else{sa=0;break}while(1){X=+h[o+(za<<3)>>3];if(X>=0.0&X<=1.0){h[p+(ya<<3)>>3]=X;Aa=ya+1|0}else{Aa=ya}Ba=za+1|0;if((Ba|0)<(wa|0)){ya=Aa;za=Ba}else{sa=Aa;break d}}}Ba=(pa|0)>0;if(xa){if(Ba){Ca=0;Da=0}else{sa=0;break}while(1){X=+h[n+(Da<<3)>>3];if(X>=0.0&X<=1.0){h[p+(Ca<<3)>>3]=X;Ea=Ca+1|0}else{Ea=Ca}Fa=Da+1|0;if((Fa|0)<(pa|0)){Ca=Ea;Da=Fa}else{sa=Ea;break d}}}if(Ba&(wa|0)>0){Ga=0;Ha=0}else{sa=0;break}while(1){X=+h[n+(Ha<<3)>>3];if(X>=0.0&X<=1.0){xa=Ga;Fa=0;while(1){if(X==+h[o+(Fa<<3)>>3]){h[p+(xa<<3)>>3]=X;Ia=xa+1|0}else{Ia=xa}Ja=Fa+1|0;if((Ja|0)<(wa|0)){xa=Ia;Fa=Ja}else{Ka=Ia;break}}}else{Ka=Ga}Fa=Ha+1|0;if((Fa|0)<(pa|0)){Ga=Ka;Ha=Fa}else{sa=Ka;break}}}else{X=O/R;N=A-L*X;U=ka-ja*X;Q=(ma-la*X)*3.0;h[ea>>3]=B-D*X+U*3.0-(N+Q);h[fa>>3]=N*3.0+Q-U*6.0;h[ga>>3]=(U-N)*3.0;h[da>>3]=J*X-w+N;pa=XB(da,m)|0;if((pa|0)==4){sa=4;break}if((pa|0)>0){La=0;Ma=0}else{sa=0;break}while(1){N=+h[n+(Ma<<3)>>3];do{if(N>=0.0&N<=1.0){h[ea>>3]=G;h[fa>>3]=F;h[ga>>3]=H;h[da>>3]=L;X=(L+N*(H+N*(F+G*N))-J)/R;if(!(X>=0.0&X<=1.0)){Na=La;break}h[p+(La<<3)>>3]=N;Na=La+1|0}else{Na=La}}while(0);wa=Ma+1|0;if((wa|0)<(pa|0)){La=Na;Ma=wa}else{sa=Na;break}}}}while(0);if((sa|0)!=4&(sa|0)>0){pa=0;do{R=+h[p+(pa<<3)>>3];do{if(!(R<1.0e-6|R>.999999)){O=R*R*R;N=R*3.0;X=1.0-R;U=X*R*N;Q=X*N*X;N=X*X*X;X=D*O+(la*U+(L*N+ja*Q));V=B*O+(ma*U+(A*N+ka*Q));Q=X-J;N=V-w;if(Q*Q+N*N<.001){break}N=X-z;X=V-S;if(N*N+X*X>=.001){break c}}}while(0);pa=pa+1|0;}while((pa|0)<(sa|0))}pa=na+1|0;if((pa|0)<(b|0)){na=pa}else{ra=71;break b}}if(Y==0.0&C==0.0){ra=73;break}if(Y<=.01){ia=0;C=0.0;Y=0.0;continue}ia=0;C=C*.5;Y=Y*.5}if((ra|0)==71){NB((c[44262]|0)+4|0);ia=c[44256]|0;sa=c[44262]|0;h[ia+(sa<<4)>>3]=ja;p=sa+1|0;h[ia+(sa<<4)+8>>3]=ka;h[ia+(p<<4)>>3]=la;Na=sa+2|0;h[ia+(p<<4)+8>>3]=ma;h[ia+(Na<<4)>>3]=D;h[ia+(Na<<4)+8>>3]=B;c[44262]=sa+3;t=0;i=l;return t|0}do{if((ra|0)==73){if(!s){break}NB((c[44262]|0)+4|0);sa=c[44256]|0;Na=c[44262]|0;h[sa+(Na<<4)>>3]=ja;ia=Na+1|0;h[sa+(Na<<4)+8>>3]=ka;h[sa+(ia<<4)>>3]=la;p=Na+2|0;h[sa+(ia<<4)+8>>3]=ma;h[sa+(p<<4)>>3]=D;h[sa+(p<<4)+8>>3]=B;c[44262]=Na+3;t=0;i=l;return t|0}}while(0);ma=L+$*.3333333333333333;$=Z*.3333333333333333+A;Z=D-ba*.3333333333333333;ba=B-_*.3333333333333333;if((v|0)>1){s=c[43786]|0;_=-1.0;ra=-1;Na=1;while(1){la=+h[s+(Na*40|0)>>3];ka=1.0-la;ja=ka*ka*ka;Y=la*3.0;C=ka*Y*ka;E=ka*la*Y;Y=la*la*la;la=+h[d+(Na<<4)>>3]-(D*Y+(Z*E+(L*ja+ma*C)));ka=+h[d+(Na<<4)+8>>3]-(B*Y+(ba*E+(A*ja+$*C)));C=+T(la*la+ka*ka);p=C>_;sa=p?Na:ra;ia=Na+1|0;if((ia|0)<(v|0)){_=p?C:_;ra=sa;Na=ia}else{Oa=sa;break}}}else{Oa=-1}Na=d+(Oa<<4)|0;ra=Oa-1|0;_=+h[Na>>3];$=+h[d+(Oa<<4)+8>>3];A=_- +h[d+(ra<<4)>>3];ba=$- +h[d+(ra<<4)+8>>3];B=A*A+ba*ba;if(B>1.0e-6){ma=+T(B);Pa=A/ma;Qa=ba/ma}else{Pa=A;Qa=ba}ra=Oa+1|0;ba=+h[d+(ra<<4)>>3]-_;_=+h[d+(ra<<4)+8>>3]-$;$=ba*ba+_*_;if($>1.0e-6){A=+T($);Ra=ba/A;Sa=_/A}else{Ra=ba;Sa=_}_=Pa+Ra;Ra=Qa+Sa;Sa=Ra*Ra+_*_;if(Sa>1.0e-6){Qa=+T(Sa);Ta=_/Qa;Ua=Ra/Qa}else{Ta=_;Ua=Ra}OB(a,b,d,ra,f,g,Ta,Ua)|0;OB(a,b,Na,e-Oa|0,Ta,Ua,j,k)|0;t=0;i=l;return t|0}function PB(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0,G=0,H=0,I=0.0,J=0,K=0,L=0.0,M=0.0,N=0,O=0.0,P=0.0,Q=0.0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0.0,ia=0.0,ja=0.0,na=0.0,oa=0.0,qa=0.0,ra=0.0,sa=0.0,ta=0,ua=0.0,va=0.0,xa=0.0,ya=0.0,za=0.0,Aa=0.0,Ca=0.0,Da=0.0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0.0,Ja=0.0,Ka=0.0,La=0,Ma=0,Na=0.0,Oa=0.0,Pa=0.0,Qa=0.0,Ra=0.0,Sa=0.0,Ta=0.0,Ua=0.0,Va=0.0,Wa=0.0,Xa=0.0,Ya=0.0,Za=0.0,_a=0.0,$a=0.0,ab=0.0,bb=0.0,cb=0.0,db=0.0,eb=0.0,fb=0.0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,_b=0,$b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0;e=i;i=i+16|0;f=1;g=0;j=i;i=i+168|0;c[j>>2]=0;while(1)switch(f|0){case 1:k=e|0;l=BF(177592,f,j)|0;f=150;break;case 150:if((l|0)==0){f=2;break}else{m=-2;f=149;break};case 2:n=a+4|0;p=c[n>>2]|0;if((c[44104]|0)<(p|0)){f=3;break}else{f=13;break};case 3:q=c[44100]|0;if((q|0)==0){f=4;break}else{f=8;break};case 4:r=ma(6,p<<3|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;c[44100]=r;if((r|0)==0){f=5;break}else{f=6;break};case 5:pa(30,c[o>>2]|0,96136,(s=i,i=i+24|0,c[s>>2]=141896,c[s+8>>2]=523,c[s+16>>2]=81032,s)|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;i=s;la(40,177592,1);if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;return 0;case 6:r=ma(6,p<<2|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;c[44102]=r;if((r|0)==0){f=7;break}else{f=12;break};case 7:pa(30,c[o>>2]|0,96136,(s=i,i=i+24|0,c[s>>2]=141896,c[s+8>>2]=527,c[s+16>>2]=167232,s)|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;i=s;la(40,177592,1);if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;return 0;case 8:r=wa(202,q|0,p<<3|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;c[44100]=r;if((r|0)==0){f=9;break}else{f=10;break};case 9:pa(30,c[o>>2]|0,96136,(s=i,i=i+24|0,c[s>>2]=141896,c[s+8>>2]=533,c[s+16>>2]=163024,s)|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;i=s;la(40,177592,1);if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;return 0;case 10:r=wa(202,c[44102]|0,p<<2|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;c[44102]=r;if((r|0)==0){f=11;break}else{f=12;break};case 11:pa(30,c[o>>2]|0,96136,(s=i,i=i+24|0,c[s>>2]=141896,c[s+8>>2]=539,c[s+16>>2]=158976,s)|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;i=s;la(40,177592,1);if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;return 0;case 12:c[44104]=p;f=13;break;case 13:c[44106]=0;c[43660]=0;w=c[n>>2]|0;x=w<<1;r=c[45178]|0;if((r|0)<(x|0)){f=14;break}else{y=r;f=20;break};case 14:z=c[45180]|0;if((z|0)==0){f=15;break}else{f=17;break};case 15:r=ma(6,w<<3|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;c[45180]=r;if((r|0)==0){f=16;break}else{f=19;break};case 16:pa(30,c[o>>2]|0,96136,(s=i,i=i+24|0,c[s>>2]=141896,c[s+8>>2]=573,c[s+16>>2]=90928,s)|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;i=s;la(40,177592,1);if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;return 0;case 17:r=wa(202,z|0,w<<3|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;c[45180]=r;if((r|0)==0){f=18;break}else{f=19;break};case 18:pa(30,c[o>>2]|0,96136,(s=i,i=i+24|0,c[s>>2]=141896,c[s+8>>2]=580,c[s+16>>2]=85648,s)|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;i=s;la(40,177592,1);if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;return 0;case 19:c[45178]=x;y=x;f=20;break;case 20:r=(y|0)/2|0;c[45176]=r;c[45174]=r-1;A=c[n>>2]|0;B=(A|0)>0;C=a|0;D=c[C>>2]|0;if(B){E=t;F=-1;G=0;f=21;break}else{H=-1;f=22;break};case 21:I=+h[D+(G<<4)>>3];r=E>I;J=r?G:F;K=G+1|0;if((K|0)<(A|0)){E=r?I:E;F=J;G=K;f=21;break}else{H=J;f=22;break};case 22:L=+h[D+(H<<4)>>3];M=+h[D+(H<<4)+8>>3];N=((H|0)==0?A:H)-1|0;O=+h[D+(N<<4)>>3];J=(H|0)==(A-1|0)?0:H+1|0;P=+h[D+(J<<4)>>3];Q=+h[D+(J<<4)+8>>3];if(O==L&L==P&Q>M){f=25;break}else{f=23;break};case 23:if((P-L)*(+h[D+(N<<4)+8>>3]-M)-(O-L)*(Q-M)>0.0){f=24;break}else{f=25;break};case 24:if(B){R=0;S=A;f=32;break}else{f=37;break};case 25:if(B){T=A;U=A;f=26;break}else{f=37;break};case 26:V=T-1|0;W=c[C>>2]|0;if((T|0)>(U-1|0)){f=31;break}else{f=27;break};case 27:if(+h[W+(V<<4)>>3]==+h[W+(T<<4)>>3]){f=28;break}else{f=31;break};case 28:if(+h[W+(V<<4)+8>>3]==+h[W+(T<<4)+8>>3]){f=29;break}else{f=31;break};case 29:if((V|0)>0){f=30;break}else{f=37;break};case 30:T=V;U=c[n>>2]|0;f=26;break;case 31:c[(c[44100]|0)+(c[44106]<<3)>>2]=W+(V<<4);J=c[44106]|0;K=c[44100]|0;c[K+(J<<3)+4>>2]=K+(((J|0)%(c[n>>2]|0)|0)<<3);J=c[44106]|0;c[(c[44102]|0)+(J<<2)>>2]=(c[44100]|0)+(J<<3);c[44106]=(c[44106]|0)+1;f=29;break;case 32:X=c[C>>2]|0;if((R|0)>0){f=33;break}else{f=35;break};case 33:Y=R-1|0;if(+h[X+(R<<4)>>3]==+h[X+(Y<<4)>>3]){f=34;break}else{f=35;break};case 34:if(+h[X+(R<<4)+8>>3]==+h[X+(Y<<4)+8>>3]){Z=S;f=36;break}else{f=35;break};case 35:c[(c[44100]|0)+(c[44106]<<3)>>2]=X+(R<<4);J=c[44106]|0;K=c[44100]|0;c[K+(J<<3)+4>>2]=K+(((J|0)%(c[n>>2]|0)|0)<<3);J=c[44106]|0;c[(c[44102]|0)+(J<<2)>>2]=(c[44100]|0)+(J<<3);c[44106]=(c[44106]|0)+1;Z=c[n>>2]|0;f=36;break;case 36:J=R+1|0;if((J|0)<(Z|0)){R=J;S=Z;f=32;break}else{f=37;break};case 37:_=c[44102]|0;J=c[44106]|0;if((J|0)>3){$=J;f=39;break}else{f=74;break};case 38:if((aa|0)>3){$=aa;f=39;break}else{f=74;break};case 39:aa=$-1|0;ba=0;f=40;break;case 40:ca=ba+1|0;da=(ca|0)==($|0)?0:ca;ea=(ba+2|0)%($|0)|0;J=c[c[_+(((ba+aa|0)%($|0)|0)<<2)>>2]>>2]|0;fa=c[_+(ba<<2)>>2]|0;K=c[fa>>2]|0;ga=c[_+(da<<2)>>2]|0;r=c[ga>>2]|0;ha=+h[J>>3];ia=+h[J+8>>3];ja=+h[K>>3];na=+h[K+8>>3];oa=+h[r>>3];qa=+h[r+8>>3];ra=oa-ja;sa=qa-na;ta=c[_+(ea<<2)>>2]|0;r=c[ta>>2]|0;ua=+h[r>>3];va=+h[r+8>>3];xa=na-va;if((ia-na)*ra-(ha-ja)*sa>0.0){f=41;break}else{f=43;break};case 41:if((ha-ua)*xa-(ja-ua)*(ia-va)>0.0){f=42;break}else{f=45;break};case 42:I=va-na;ya=ua-ja;if(ra*I-sa*ya>0.0){za=ya;Aa=I;f=46;break}else{f=45;break};case 43:I=(oa-ua)*xa-(ja-ua)*(qa-va);if(I<=0.0&I<0.0){f=44;break}else{f=45;break};case 44:za=ua-ja;Aa=va-na;f=46;break;case 45:if((ca|0)<($|0)){ba=ca;f=40;break}else{f=73;break};case 46:Ca=ja-ua;Da=za*za+Aa*Aa;Ea=0;f=47;break;case 47:Fa=Ea+1|0;Ga=(Fa|0)==($|0)?0:Fa;if((Ea|0)==(ba|0)|(Ga|0)==(ba|0)|(Ea|0)==(ea|0)|(Ga|0)==(ea|0)){f=48;break}else{f=49;break};case 48:if((Fa|0)<($|0)){Ea=Fa;f=47;break}else{f=71;break};case 49:r=c[c[_+(Ea<<2)>>2]>>2]|0;Ha=c[c[_+(Ga<<2)>>2]>>2]|0;Ia=+h[r>>3];Ja=+h[r+8>>3];Ka=xa*(Ia-ua)-Ca*(Ja-va);La=Ka>0.0;Ma=Ka>=0.0;if(Ma&(La^1)){f=53;break}else{f=50;break};case 50:Na=+h[Ha>>3];Oa=+h[Ha+8>>3];Pa=xa*(Na-ua)-Ca*(Oa-va);if(Pa<=0.0&Pa>=0.0){f=53;break}else{f=51;break};case 51:Qa=Ja-Oa;Ra=Ia-Na;Sa=(ja-Na)*Qa-Ra*(na-Oa);if(Sa<=0.0&Sa>=0.0){f=53;break}else{f=52;break};case 52:Ta=(ua-Na)*Qa-Ra*(va-Oa);if(Ta<=0.0&Ta>=0.0){f=53;break}else{f=65;break};case 53:Ua=Ia-ja;Va=Ja-na;if(Ka<=0.0&Ma){f=54;break}else{f=56;break};case 54:if(za*Ua+Aa*Va<0.0){f=56;break}else{f=55;break};case 55:if(Ua*Ua+Va*Va>Da){f=56;break}else{f=45;break};case 56:Wa=+h[Ha>>3];Xa=+h[Ha+8>>3];Ya=Wa-ja;Za=Xa-na;I=xa*(Wa-ua)-Ca*(Xa-va);if(I<=0.0&I>=0.0){f=57;break}else{f=59;break};case 57:if(za*Ya+Aa*Za<0.0){f=59;break}else{f=58;break};case 58:if(Ya*Ya+Za*Za>Da){f=59;break}else{f=45;break};case 59:_a=Wa-Ia;$a=Xa-Ja;ab=ja-Ia;bb=na-Ja;cb=Ja-Xa;db=Ia-Wa;I=(ja-Wa)*cb-db*(na-Xa);if(I<=0.0&I>=0.0){f=60;break}else{f=62;break};case 60:if(ab*_a+bb*$a<0.0){f=62;break}else{f=61;break};case 61:if(ab*ab+bb*bb>_a*_a+$a*$a){f=62;break}else{f=45;break};case 62:eb=ua-Ia;fb=va-Ja;I=(ua-Wa)*cb-db*(va-Xa);if(I<=0.0&I>=0.0){f=63;break}else{f=48;break};case 63:if(eb*_a+fb*$a<0.0){f=48;break}else{f=64;break};case 64:if(eb*eb+fb*fb>_a*_a+$a*$a){f=48;break}else{f=45;break};case 65:gb=Pa>0.0;if(Sa>0.0){hb=1;f=67;break}else{f=66;break};case 66:hb=Sa<0.0?2:3;f=67;break;case 67:if(Ta>0.0){ib=1;f=69;break}else{f=68;break};case 68:ib=Ta<0.0?2:3;f=69;break;case 69:if(La^gb){f=70;break}else{f=48;break};case 70:if((hb|0)==1^(ib|0)==1){f=45;break}else{f=48;break};case 71:Ba(58,fa|0,ga|0,ta|0);if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;if((da|0)<(aa|0)){jb=da;f=72;break}else{f=38;break};case 72:r=jb+1|0;c[_+(jb<<2)>>2]=c[_+(r<<2)>>2];if((r|0)<(aa|0)){jb=r;f=72;break}else{f=38;break};case 73:pa(30,c[o>>2]|0,96136,(s=i,i=i+24|0,c[s>>2]=141896,c[s+8>>2]=324,c[s+16>>2]=155376,s)|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;i=s;f=75;break;case 74:Ba(58,c[_>>2]|0,c[_+4>>2]|0,c[_+8>>2]|0);if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;f=75;break;case 75:r=c[43660]|0;if((r|0)>0){kb=0;lb=r;f=78;break}else{mb=0;nb=r;ob=0;f=102;break};case 76:if((pb|0)<(qb|0)){kb=pb;lb=qb;f=78;break}else{f=77;break};case 77:rb=(qb|0)>0;if(rb){sb=0;f=101;break}else{mb=0;nb=qb;ob=0;f=102;break};case 78:pb=kb+1|0;if((pb|0)<(lb|0)){tb=pb;f=79;break}else{qb=lb;f=76;break};case 79:ub=0;f=80;break;case 80:vb=c[43656]|0;wb=vb+(kb*52|0)|0;xb=vb+(tb*52|0)|0;yb=c[c[vb+(kb*52|0)+4+(ub<<4)>>2]>>2]|0;zb=c[c[vb+(tb*52|0)+4>>2]>>2]|0;if((yb|0)==(zb|0)){f=82;break}else{f=81;break};case 81:Ab=c[c[vb+(tb*52|0)+8>>2]>>2]|0;f=83;break;case 82:r=c[c[vb+(tb*52|0)+8>>2]>>2]|0;if((c[c[vb+(kb*52|0)+4+(ub<<4)+4>>2]>>2]|0)==(r|0)){f=85;break}else{Ab=r;f=83;break};case 83:if((yb|0)==(Ab|0)){f=84;break}else{Bb=vb;Cb=yb;f=86;break};case 84:if((c[c[vb+(kb*52|0)+4+(ub<<4)+4>>2]>>2]|0)==(zb|0)){f=85;break}else{Bb=vb;Cb=yb;f=86;break};case 85:c[vb+(kb*52|0)+4+(ub<<4)+12>>2]=xb;c[vb+(tb*52|0)+16>>2]=wb;r=c[43656]|0;Bb=r;Cb=c[c[r+(kb*52|0)+4+(ub<<4)>>2]>>2]|0;f=86;break;case 86:Db=Bb+(kb*52|0)|0;Eb=Bb+(tb*52|0)|0;Fb=c[c[Bb+(tb*52|0)+20>>2]>>2]|0;if((Cb|0)==(Fb|0)){f=88;break}else{f=87;break};case 87:Gb=c[c[Bb+(tb*52|0)+24>>2]>>2]|0;f=89;break;case 88:r=c[c[Bb+(tb*52|0)+24>>2]>>2]|0;if((c[c[Bb+(kb*52|0)+4+(ub<<4)+4>>2]>>2]|0)==(r|0)){f=91;break}else{Gb=r;f=89;break};case 89:if((Cb|0)==(Gb|0)){f=90;break}else{Hb=Bb;Ib=Cb;f=92;break};case 90:if((c[c[Bb+(kb*52|0)+4+(ub<<4)+4>>2]>>2]|0)==(Fb|0)){f=91;break}else{Hb=Bb;Ib=Cb;f=92;break};case 91:c[Bb+(kb*52|0)+4+(ub<<4)+12>>2]=Eb;c[Bb+(tb*52|0)+32>>2]=Db;r=c[43656]|0;Hb=r;Ib=c[c[r+(kb*52|0)+4+(ub<<4)>>2]>>2]|0;f=92;break;case 92:Jb=Hb+(kb*52|0)|0;Kb=Hb+(tb*52|0)|0;Lb=c[c[Hb+(tb*52|0)+36>>2]>>2]|0;if((Ib|0)==(Lb|0)){f=94;break}else{f=93;break};case 93:Mb=c[c[Hb+(tb*52|0)+40>>2]>>2]|0;f=95;break;case 94:r=c[c[Hb+(tb*52|0)+40>>2]>>2]|0;if((c[c[Hb+(kb*52|0)+4+(ub<<4)+4>>2]>>2]|0)==(r|0)){f=97;break}else{Mb=r;f=95;break};case 95:if((Ib|0)==(Mb|0)){f=96;break}else{f=98;break};case 96:if((c[c[Hb+(kb*52|0)+4+(ub<<4)+4>>2]>>2]|0)==(Lb|0)){f=97;break}else{f=98;break};case 97:c[Hb+(kb*52|0)+4+(ub<<4)+12>>2]=Kb;c[Hb+(tb*52|0)+48>>2]=Jb;f=98;break;case 98:r=ub+1|0;if((r|0)<3){ub=r;f=80;break}else{f=99;break};case 99:r=tb+1|0;K=c[43660]|0;if((r|0)<(K|0)){tb=r;f=79;break}else{qb=K;f=76;break};case 100:if((Nb|0)<(qb|0)){sb=Nb;f=101;break}else{mb=Nb;nb=qb;ob=rb;f=102;break};case 101:K=wa(168,sb|0,b|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;Nb=sb+1|0;if((K|0)==0){f=100;break}else{mb=sb;nb=qb;ob=rb;f=102;break};case 102:if((mb|0)==(nb|0)){f=104;break}else{f=103;break};case 103:Ob=b+16|0;if(ob){Pb=0;f=106;break}else{Qb=0;f=107;break};case 104:pa(30,c[o>>2]|0,96136,(s=i,i=i+24|0,c[s>>2]=141896,c[s+8>>2]=192,c[s+16>>2]=119192,s)|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;i=s;m=-1;f=149;break;case 105:if((Rb|0)<(nb|0)){Pb=Rb;f=106;break}else{Qb=Rb;f=107;break};case 106:K=wa(168,Pb|0,Ob|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;Rb=Pb+1|0;if((K|0)==0){f=105;break}else{Qb=Pb;f=107;break};case 107:if((Qb|0)==(nb|0)){f=108;break}else{f=109;break};case 108:pa(30,c[o>>2]|0,96136,(s=i,i=i+24|0,c[s>>2]=141896,c[s+8>>2]=200,c[s+16>>2]=110712,s)|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;i=s;m=-1;f=149;break;case 109:K=wa(182,mb|0,Qb|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;if((K|0)==0){f=110;break}else{f=111;break};case 110:pa(30,c[o>>2]|0,96136,(s=i,i=i+24|0,c[s>>2]=141896,c[s+8>>2]=207,c[s+16>>2]=107328,s)|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;i=s;ka(68,2);if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;c[d+4>>2]=2;K=c[44254]|0;r=K;J=b;c[r>>2]=c[J>>2];c[r+4>>2]=c[J+4>>2];c[r+8>>2]=c[J+8>>2];c[r+12>>2]=c[J+12>>2];J=K+16|0;r=Ob;c[J>>2]=c[r>>2];c[J+4>>2]=c[r+4>>2];c[J+8>>2]=c[r+8>>2];c[J+12>>2]=c[r+12>>2];c[d>>2]=K;m=0;f=149;break;case 111:if((mb|0)==(Qb|0)){f=112;break}else{f=113;break};case 112:ka(68,2);if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;c[d+4>>2]=2;K=c[44254]|0;r=K;J=b;c[r>>2]=c[J>>2];c[r+4>>2]=c[J+4>>2];c[r+8>>2]=c[J+8>>2];c[r+12>>2]=c[J+12>>2];J=K+16|0;r=Ob;c[J>>2]=c[r>>2];c[J+4>>2]=c[r+4>>2];c[J+8>>2]=c[r+8>>2];c[J+12>>2]=c[r+12>>2];c[d>>2]=K;m=0;f=149;break;case 113:Sb=k|0;c[k>>2]=b;Tb=k+4|0;c[Tb>>2]=0;Ub=k+8|0;c[Ub>>2]=Ob;c[k+12>>2]=0;Vb=c[45176]|0;Wb=c[45180]|0;if(((c[45174]|0)-Vb|0)>-1){f=114;break}else{f=115;break};case 114:c[Tb>>2]=c[Wb+(Vb<<2)>>2];f=115;break;case 115:K=Vb-1|0;c[45176]=K;c[Wb+(K<<2)>>2]=Sb;c[45172]=c[45176];if((mb|0)==-1){Xb=0;Yb=Ub;f=145;break}else{f=116;break};case 116:Zb=Ob|0;_b=b+24|0;$b=mb;f=117;break;case 117:ac=c[43656]|0;c[ac+($b*52|0)>>2]=2;bc=0;f=118;break;case 118:cc=c[ac+($b*52|0)+4+(bc<<4)+12>>2]|0;if((cc|0)==0){f=120;break}else{f=119;break};case 119:if((c[cc>>2]|0)==1){dc=bc;f=121;break}else{f=120;break};case 120:K=bc+1|0;if((K|0)<3){bc=K;f=118;break}else{dc=K;f=121;break};case 121:if((dc|0)==3){f=122;break}else{f=123;break};case 122:K=c[45180]|0;r=c[c[K+(c[45176]<<2)>>2]>>2]|0;J=c[K+(c[45174]<<2)>>2]|0;K=c[J>>2]|0;I=+h[r>>3];ya=+h[r+8>>3];r=(+h[_b>>3]-ya)*(+h[K>>3]-I)-(+h[Zb>>3]-I)*(+h[K+8>>3]-ya)>0.0;ec=r?Ub:J;fc=r?J:Ub;f=125;break;case 123:gc=c[ac+($b*52|0)+4+(dc<<4)>>2]|0;J=c[gc>>2]|0;r=c[c[ac+($b*52|0)+4+(((dc+1|0)%3|0)<<4)+4>>2]>>2]|0;hc=c[ac+($b*52|0)+4+(dc<<4)+4>>2]|0;K=c[hc>>2]|0;ya=+h[r>>3];I=+h[r+8>>3];if((+h[J+8>>3]-I)*(+h[K>>3]-ya)-(+h[J>>3]-ya)*(+h[K+8>>3]-I)>0.0){ec=gc;fc=hc;f=125;break}else{f=124;break};case 124:ec=hc;fc=gc;f=125;break;case 125:if(($b|0)==(mb|0)){f=126;break}else{f=131;break};case 126:ic=c[45174]|0;if((ic-(c[45176]|0)|0)>-1){f=127;break}else{jc=ic;f=128;break};case 127:c[fc+4>>2]=c[(c[45180]|0)+(ic<<2)>>2];jc=c[45174]|0;f=128;break;case 128:K=jc+1|0;c[45174]=K;c[(c[45180]|0)+(K<<2)>>2]=fc;kc=c[45176]|0;if(((c[45174]|0)-kc|0)>-1){f=129;break}else{lc=kc;f=130;break};case 129:c[ec+4>>2]=c[(c[45180]|0)+(kc<<2)>>2];lc=c[45176]|0;f=130;break;case 130:K=lc-1|0;c[45176]=K;c[(c[45180]|0)+(K<<2)>>2]=ec;mc=0;f=141;break;case 131:nc=c[45176]|0;oc=c[45180]|0;if((c[oc+(nc<<2)>>2]|0)==(ec|0)){f=137;break}else{f=132;break};case 132:pc=c[45174]|0;if((c[oc+(pc<<2)>>2]|0)==(ec|0)){f=137;break}else{f=133;break};case 133:qc=ma(8,ec|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;c[45176]=qc;if((pc-qc|0)>-1){f=134;break}else{rc=qc;sc=oc;f=135;break};case 134:c[ec+4>>2]=c[oc+(qc<<2)>>2];rc=c[45176]|0;sc=c[45180]|0;f=135;break;case 135:K=rc-1|0;c[45176]=K;c[sc+(K<<2)>>2]=ec;if((qc|0)>(c[45172]|0)){f=136;break}else{mc=0;f=141;break};case 136:c[45172]=qc;mc=0;f=141;break;case 137:tc=ma(8,fc|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;c[45174]=tc;if((tc-nc|0)>-1){f=138;break}else{uc=tc;vc=oc;f=139;break};case 138:c[fc+4>>2]=c[oc+(tc<<2)>>2];uc=c[45174]|0;vc=c[45180]|0;f=139;break;case 139:K=uc+1|0;c[45174]=K;c[vc+(K<<2)>>2]=fc;if((tc|0)<(c[45172]|0)){f=140;break}else{mc=0;f=141;break};case 140:c[45172]=tc;mc=0;f=141;break;case 141:wc=c[ac+($b*52|0)+4+(mc<<4)+12>>2]|0;if((wc|0)==0){f=144;break}else{f=142;break};case 142:if((c[wc>>2]|0)==1){f=143;break}else{f=144;break};case 143:K=wc-(c[43656]|0)|0;if((K|0)==-52){Xb=0;Yb=Ub;f=145;break}else{$b=(K|0)/52|0;f=117;break};case 144:K=mc+1|0;if((K|0)<3){mc=K;f=141;break}else{Xb=0;Yb=Ub;f=145;break};case 145:xc=Xb+1|0;K=c[Yb+4>>2]|0;if((K|0)==0){f=146;break}else{Xb=xc;Yb=K;f=145;break};case 146:ka(68,xc|0);if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;c[d+4>>2]=xc;yc=c[44254]|0;zc=Ub;Ac=Xb;f=147;break;case 147:K=yc+(Ac<<4)|0;J=c[zc>>2]|0;c[K>>2]=c[J>>2];c[K+4>>2]=c[J+4>>2];c[K+8>>2]=c[J+8>>2];c[K+12>>2]=c[J+12>>2];J=c[zc+4>>2]|0;if((J|0)==0){f=148;break}else{zc=J;Ac=Ac-1|0;f=147;break};case 148:c[d>>2]=yc;m=0;f=149;break;case 149:i=e;return m|0;case-1:if((g|0)==1){l=v;f=150}u=v=0;break}return 0}function QB(a,b){a=a|0;b=b|0;var d=0,e=0.0,f=0.0,g=0,i=0.0,j=0.0,k=0.0,l=0,m=0,n=0,o=0;d=c[43656]|0;e=+h[b>>3];f=+h[b+8>>3];b=c[c[d+(a*52|0)+4>>2]>>2]|0;g=c[c[d+(a*52|0)+8>>2]>>2]|0;i=+h[g>>3];j=+h[g+8>>3];k=(+h[b+8>>3]-j)*(e-i)-(+h[b>>3]-i)*(f-j);if(k>0.0){l=1}else{l=k>=0.0|0}b=c[c[d+(a*52|0)+20>>2]>>2]|0;g=c[c[d+(a*52|0)+24>>2]>>2]|0;k=+h[g>>3];j=+h[g+8>>3];i=(+h[b+8>>3]-j)*(e-k)-(+h[b>>3]-k)*(f-j);if(i>0.0){m=1}else{m=i>=0.0|0}b=c[c[d+(a*52|0)+36>>2]>>2]|0;g=c[c[d+(a*52|0)+40>>2]>>2]|0;i=+h[g>>3];j=+h[g+8>>3];k=(+h[b+8>>3]-j)*(e-i)-(+h[b>>3]-i)*(f-j);if(k>0.0){n=1}else{n=k>=0.0|0}b=n+(m+l)|0;if((b|0)==3){o=1;return o|0}o=(b|0)==0|0;return o|0}function RB(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;d=(c[43656]|0)+(a*52|0)|0;if((c[d>>2]|0)!=0){e=0;return e|0}c[d>>2]=1;if((a|0)==(b|0)){e=1;return e|0}d=0;f=c[43656]|0;while(1){g=c[f+(a*52|0)+4+(d<<4)+12>>2]|0;if((g|0)==0){h=f}else{if((RB((g-f|0)/52|0,b)|0)!=0){e=1;i=9;break}h=c[43656]|0}g=d+1|0;if((g|0)<3){d=g;f=h}else{break}}if((i|0)==9){return e|0}c[h+(a*52|0)>>2]=0;e=0;return e|0}function SB(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;if((c[44258]|0)>=(a|0)){i=b;return}d=c[44254]|0;do{if((d|0)==0){e=dF(a<<4)|0;c[44254]=e;if((e|0)!=0){break}gc(c[o>>2]|0,96136,(f=i,i=i+24|0,c[f>>2]=141896,c[f+8>>2]=593,c[f+16>>2]=101744,f)|0)|0;i=f;rc(177592,1)}else{e=gF(d,a<<4)|0;c[44254]=e;if((e|0)!=0){break}gc(c[o>>2]|0,96136,(f=i,i=i+24|0,c[f>>2]=141896,c[f+8>>2]=599,c[f+16>>2]=98176,f)|0)|0;i=f;rc(177592,1)}}while(0);c[44258]=a;i=b;return}function TB(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,i=0,j=0,k=0.0,l=0.0,m=0,n=0,o=0.0;b=c[45172]|0;d=c[45180]|0;e=a|0;a=c[45176]|0;while(1){if((a|0)>=(b|0)){break}f=a+1|0;g=c[c[d+(f<<2)>>2]>>2]|0;i=c[c[d+(a<<2)>>2]>>2]|0;j=c[e>>2]|0;k=+h[i>>3];l=+h[i+8>>3];if((+h[g+8>>3]-l)*(+h[j>>3]-k)-(+h[g>>3]-k)*(+h[j+8>>3]-l)>0.0){m=a;n=7;break}else{a=f}}if((n|0)==7){return m|0}a=c[45174]|0;while(1){if((a|0)<=(b|0)){m=b;n=7;break}f=a-1|0;j=c[c[d+(f<<2)>>2]>>2]|0;g=c[c[d+(a<<2)>>2]>>2]|0;i=c[e>>2]|0;l=+h[g>>3];k=+h[g+8>>3];o=(+h[j+8>>3]-k)*(+h[i>>3]-l)-(+h[j>>3]-l)*(+h[i+8>>3]-k);if(o<=0.0&o<0.0){m=a;n=7;break}else{a=f}}if((n|0)==7){return m|0}return 0}function UB(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0;e=i;f=c[43660]|0;g=c[43658]|0;if((f|0)<(g|0)){h=f;j=c[43656]|0}else{k=g+20|0;g=c[43656]|0;do{if((g|0)==0){l=dF(k*52|0)|0;m=l;c[43656]=m;if((l|0)!=0){n=m;p=f;break}gc(c[o>>2]|0,96136,(q=i,i=i+24|0,c[q>>2]=141896,c[q+8>>2]=552,c[q+16>>2]=150848,q)|0)|0;i=q;rc(177592,1)}else{m=gF(g,k*52|0)|0;l=m;c[43656]=l;if((m|0)==0){gc(c[o>>2]|0,96136,(q=i,i=i+24|0,c[q>>2]=141896,c[q+8>>2]=558,c[q+16>>2]=147984,q)|0)|0;i=q;rc(177592,1)}else{n=l;p=c[43660]|0;break}}}while(0);c[43658]=k;h=p;j=n}c[43660]=h+1;n=j+(h*52|0)|0;c[n>>2]=0;c[j+(h*52|0)+4>>2]=a;c[j+(h*52|0)+8>>2]=b;c[j+(h*52|0)+16>>2]=0;c[j+(h*52|0)+20>>2]=b;c[j+(h*52|0)+24>>2]=d;c[j+(h*52|0)+32>>2]=0;c[j+(h*52|0)+36>>2]=d;c[j+(h*52|0)+40>>2]=a;c[j+(h*52|0)+48>>2]=0;c[j+(h*52|0)+12>>2]=n;c[j+(h*52|0)+28>>2]=n;c[j+(h*52|0)+44>>2]=n;i=e;return}function VB(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,i=0,j=0,k=0,l=0,m=0.0,n=0,o=0,p=0,q=0.0,r=0.0,s=0.0,t=0;f=dF(d<<2)|0;g=f;i=dF((d<<3)+8|0)|0;j=i+8|0;k=(d|0)>0;if(k){vF(f|0,-1|0,d<<2|0)|0;f=0;do{h[j+(f<<3)>>3]=-2147483647.0;f=f+1|0;}while((f|0)<(d|0))}h[i>>3]=-2147483648.0;if((a|0)==(b|0)){eF(i);return g|0}if(k){l=a}else{k=a;while(1){a=j+(k<<3)|0;m=+h[a>>3]*-1.0;h[a>>3]=m==2147483647.0?0.0:m;if((b|0)==-1){break}else{k=-1}}eF(i);return g|0}while(1){k=j+(l<<3)|0;m=+h[k>>3]*-1.0;h[k>>3]=m==2147483647.0?0.0:m;a=e+(l<<2)|0;f=0;n=-1;while(1){o=j+(f<<3)|0;m=+h[o>>3];do{if(m<0.0){if((l|0)<(f|0)){p=(c[e+(f<<2)>>2]|0)+(l<<3)|0}else{p=(c[a>>2]|0)+(f<<3)|0}q=+h[p>>3];r=-0.0-(q+ +h[k>>3]);if(q!=0.0&m<r){h[o>>3]=r;c[g+(f<<2)>>2]=l;s=r}else{s=m}if(s<=+h[j+(n<<3)>>3]){t=n;break}t=f}else{t=n}}while(0);o=f+1|0;if((o|0)<(d|0)){f=o;n=t}else{break}}if((t|0)==(b|0)){break}else{l=t}}eF(i);return g|0}function WB(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0;j=i;k=a;a=i;i=i+16|0;c[a>>2]=c[k>>2];c[a+4>>2]=c[k+4>>2];c[a+8>>2]=c[k+8>>2];c[a+12>>2]=c[k+12>>2];k=e;e=i;i=i+16|0;c[e>>2]=c[k>>2];c[e+4>>2]=c[k+4>>2];c[e+8>>2]=c[k+8>>2];c[e+12>>2]=c[k+12>>2];k=c[h+4>>2]|0;if((cC(a,b,e,f,h)|0)==0){f=c[h+24>>2]|0;c[f+(k<<2)>>2]=g;g=k+1|0;c[f+(g<<2)>>2]=d;l=VB(g,k,k+2|0,f)|0;i=j;return l|0}else{f=dF((k<<2)+8|0)|0;g=k+1|0;c[f+(k<<2)>>2]=g;c[f+(g<<2)>>2]=-1;l=f;i=j;return l|0}return 0}function XB(a,b){a=a|0;b=b|0;var c=0.0,d=0.0,e=0,f=0.0,g=0.0,i=0,j=0.0,k=0.0,l=0.0,m=0.0,n=0,o=0.0,p=0.0,q=0.0;c=+h[a+24>>3];if(c<1.0e-7&c>-1.0e-7){d=+h[a+16>>3];e=a+8|0;if(d<1.0e-7&d>-1.0e-7){f=+h[e>>3];g=+h[a>>3];if(f<1.0e-7&f>-1.0e-7){i=g<1.0e-7&g>-1.0e-7?4:0;return i|0}else{h[b>>3]=(-0.0-g)/f;i=1;return i|0}}f=+h[e>>3]/(d*2.0);g=f*f- +h[a>>3]/d;if(g<0.0){i=0;return i|0}if(g==0.0){h[b>>3]=-0.0-f;i=1;return i|0}else{d=+T(g)-f;h[b>>3]=d;h[b+8>>3]=f*-2.0-d;i=2;return i|0}}d=+h[a+16>>3]/(c*3.0);f=+h[a+8>>3]/c;g=d*d;j=+h[a>>3]/c+(d*2.0*g-d*f);c=f/3.0-g;g=j*j;f=g+c*c*c*4.0;do{if(f<0.0){c=+T(g-f)*.5;k=+$(+(+T(-0.0-f)),+(-0.0-j));if(c<0.0){l=+U(+(-0.0-c),+.3333333333333333)*-1.0}else{l=+U(+c,+.3333333333333333)}c=l*2.0;m=c*+V(k/3.0);h[b>>3]=m;h[b+8>>3]=c*+V((k+6.283185307179586)/3.0);h[b+16>>3]=c*+V((k+ -3.141592653589793+ -3.141592653589793)/3.0);n=3;o=m}else{m=(+T(f)-j)*.5;k=-0.0-j-m;if(m<0.0){p=+U(+(-0.0-m),+.3333333333333333)*-1.0}else{p=+U(+m,+.3333333333333333)}if(k<0.0){q=+U(+(-0.0-k),+.3333333333333333)*-1.0}else{q=+U(+k,+.3333333333333333)}k=p+q;h[b>>3]=k;if(f>0.0){n=1;o=k;break}m=k*-.5;h[b+16>>3]=m;h[b+8>>3]=m;n=3;o=k}}while(0);a=0;f=o;while(1){h[b+(a<<3)>>3]=f-d;e=a+1|0;if((e|0)>=(n|0)){i=n;break}a=e;f=+h[b+(e<<3)>>3]}return i|0}function YB(a){a=a|0;eF(c[a>>2]|0);eF(a);return}function ZB(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;d=i;e=a;a=i;i=i+8|0;c[a>>2]=c[e>>2];c[a+4>>2]=c[e+4>>2];e=c[a+4>>2]|0;f=(e*3|0)-2|0;g=c[44388]|0;if((f|0)>(c[44386]|0)){if((g|0)==0){h=dF(f<<4)|0}else{h=gF(g,f<<4)|0}j=h;c[44388]=j;c[44386]=f;k=j}else{k=g}g=c[a>>2]|0;a=k;j=g;c[a>>2]=c[j>>2];c[a+4>>2]=c[j+4>>2];c[a+8>>2]=c[j+8>>2];c[a+12>>2]=c[j+12>>2];uF(k+16|0,j|0,16)|0;j=e-1|0;if((j|0)>1){e=(j|0)>2?j:2;a=e*3|0;h=2;l=1;while(1){m=k+(h<<4)|0;n=g+(l<<4)|0;c[m>>2]=c[n>>2];c[m+4>>2]=c[n+4>>2];c[m+8>>2]=c[n+8>>2];c[m+12>>2]=c[n+12>>2];m=k+(h+1<<4)|0;uF(m|0,n|0,16)|0;n=k+(h+2<<4)|0;c[n>>2]=c[m>>2];c[n+4>>2]=c[m+4>>2];c[n+8>>2]=c[m+8>>2];c[n+12>>2]=c[m+12>>2];m=l+1|0;if((m|0)<(j|0)){h=h+3|0;l=m}else{break}}o=a-1|0;p=e}else{o=2;p=1}e=k+(o<<4)|0;a=g+(p<<4)|0;c[e>>2]=c[a>>2];c[e+4>>2]=c[a+4>>2];c[e+8>>2]=c[a+8>>2];c[e+12>>2]=c[a+12>>2];uF(k+(o+1<<4)|0,a|0,16)|0;c[b+4>>2]=f;c[b>>2]=c[44388];i=d;return}function _B(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0.0,j=0.0,k=0.0,l=0;e=i;f=a;a=i;i=i+16|0;c[a>>2]=c[f>>2];c[a+4>>2]=c[f+4>>2];c[a+8>>2]=c[f+8>>2];c[a+12>>2]=c[f+12>>2];f=b;b=i;i=i+16|0;c[b>>2]=c[f>>2];c[b+4>>2]=c[f+4>>2];c[b+8>>2]=c[f+8>>2];c[b+12>>2]=c[f+12>>2];f=d;d=i;i=i+16|0;c[d>>2]=c[f>>2];c[d+4>>2]=c[f+4>>2];c[d+8>>2]=c[f+8>>2];c[d+12>>2]=c[f+12>>2];g=+h[b+8>>3];j=+h[b>>3];k=(+h[a+8>>3]-g)*(+h[d>>3]-j)-(+h[d+8>>3]-g)*(+h[a>>3]-j);if(k>1.0e-4){l=1;i=e;return l|0}l=(k<-1.0e-4)<<31>>31;i=e;return l|0}function $B(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0,t=0,u=0.0,v=0.0,w=0,x=0,y=0;f=i;g=a;a=i;i=i+16|0;c[a>>2]=c[g>>2];c[a+4>>2]=c[g+4>>2];c[a+8>>2]=c[g+8>>2];c[a+12>>2]=c[g+12>>2];g=b;b=i;i=i+16|0;c[b>>2]=c[g>>2];c[b+4>>2]=c[g+4>>2];c[b+8>>2]=c[g+8>>2];c[b+12>>2]=c[g+12>>2];g=d;d=i;i=i+16|0;c[d>>2]=c[g>>2];c[d+4>>2]=c[g+4>>2];c[d+8>>2]=c[g+8>>2];c[d+12>>2]=c[g+12>>2];g=e;e=i;i=i+16|0;c[e>>2]=c[g>>2];c[e+4>>2]=c[g+4>>2];c[e+8>>2]=c[g+8>>2];c[e+12>>2]=c[g+12>>2];j=+h[a+8>>3];k=+h[b+8>>3];l=j-k;m=+h[d>>3];n=+h[b>>3];o=+h[d+8>>3];p=+h[a>>3];q=p-n;r=l*(m-n)-(o-k)*q;do{if(r>1.0e-4){s=1}else{a=r<-1.0e-4;d=a<<31>>31;if(a){s=d;break}if(p!=n){if(p<m&m<n){t=1;i=f;return t|0}if(n<m&m<p){t=1}else{s=d;break}i=f;return t|0}else{if(j<o&o<k){t=1;i=f;return t|0}if(k<o&o<j){t=1}else{s=d;break}i=f;return t|0}}}while(0);r=+h[e>>3];u=+h[e+8>>3];v=l*(r-n)-(u-k)*q;do{if(v>1.0e-4){w=1}else{e=v<-1.0e-4;d=e<<31>>31;if(e){w=d;break}if(p!=n){if(p<r&r<n){t=1;i=f;return t|0}if(n<r&r<p){t=1}else{w=d;break}i=f;return t|0}else{if(j<u&u<k){t=1;i=f;return t|0}if(k<u&u<j){t=1}else{w=d;break}i=f;return t|0}}}while(0);v=o-u;o=m-r;m=v*(p-r)-(j-u)*o;if(m>1.0e-4){x=1}else{x=(m<-1.0e-4)<<31>>31}m=v*(n-r)-(k-u)*o;if(m>1.0e-4){y=1}else{y=(m<-1.0e-4)<<31>>31}if((da(w,s)|0)>=0){t=0;i=f;return t|0}t=(da(y,x)|0)>>>31;i=f;return t|0}function aC(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,i=0,j=0,k=0,l=0,m=0.0,n=0.0,o=0.0,p=0,q=0,r=0,s=0,t=0,u=0.0,v=0.0,w=0.0,x=0.0,y=0,z=0.0,A=0.0,B=0,C=0,D=0,E=0.0,F=0.0,G=0,H=0,I=0,J=0,K=0,L=0,M=0.0,N=0.0,O=0,P=0,Q=0,R=0,S=0,U=0;b=c[a+4>>2]|0;d=b+2|0;e=dF(d<<2)|0;f=e;g=fF(da(b,b)|0,8)|0;i=(b|0)>0;if(i){j=0;k=g;while(1){c[f+(j<<2)>>2]=k;g=j+1|0;if((g|0)<(b|0)){j=g;k=k+(b<<3)|0}else{break}}}k=b+1|0;vF(e+(b<<2)|0,0,((d|0)>(k|0)?d:k)-b<<2|0)|0;c[a+24>>2]=f;k=c[a+8>>2]|0;d=c[a+16>>2]|0;e=c[a+20>>2]|0;if(i){l=0}else{return}do{i=e+(l<<2)|0;a=c[i>>2]|0;j=k+(l<<4)|0;g=k+(l<<4)+8|0;m=+h[j>>3]- +h[k+(a<<4)>>3];n=+h[g>>3]- +h[k+(a<<4)+8>>3];o=+T(m*m+n*n);p=f+(l<<2)|0;h[(c[p>>2]|0)+(a<<3)>>3]=o;h[(c[f+(a<<2)>>2]|0)+(l<<3)>>3]=o;q=l-1|0;r=(a|0)==(q|0)?l-2|0:q;a:do{if((r|0)>-1){q=d+(l<<2)|0;a=r;while(1){s=c[i>>2]|0;t=c[q>>2]|0;o=+h[k+(s<<4)>>3];n=+h[k+(s<<4)+8>>3];m=+h[j>>3];u=+h[g>>3];v=+h[k+(a<<4)>>3];w=+h[k+(a<<4)+8>>3];x=(m-o)*(w-n)-(u-n)*(v-o);if(x>1.0e-4){y=1}else{y=(x<-1.0e-4)<<31>>31}x=+h[k+(t<<4)>>3]-m;z=+h[k+(t<<4)+8>>3]-u;A=x*(w-u)-z*(v-m);if(A>1.0e-4){B=1}else{B=(A<-1.0e-4)<<31>>31>>>31^1}t=(y|0)>-1;if((n-u)*x-(o-m)*z>1.0e-4){C=t?B:0}else{C=t?1:B}b:do{if((C|0)!=0){t=c[e+(a<<2)>>2]|0;s=c[d+(a<<2)>>2]|0;z=+h[k+(t<<4)>>3];o=+h[k+(t<<4)+8>>3];x=(v-z)*(u-o)-(m-z)*(w-o);if(x>1.0e-4){D=1}else{D=(x<-1.0e-4)<<31>>31}x=u-w;n=+h[k+(s<<4)>>3]-v;A=+h[k+(s<<4)+8>>3]-w;E=m-v;F=x*n-E*A;if(F>1.0e-4){G=1}else{G=(F<-1.0e-4)<<31>>31>>>31^1}s=(D|0)>-1;if((o-w)*n-(z-v)*A>1.0e-4){H=s?G:0}else{H=s?1:G}if((H|0)==0){break}if(m!=v){s=0;do{t=c[d+(s<<2)>>2]|0;A=+h[k+(s<<4)>>3];z=+h[k+(s<<4)+8>>3];n=x*(A-v)-E*(z-w);do{if(n>1.0e-4){I=1}else{J=n<-1.0e-4;K=J<<31>>31;if(J){I=K;break}if(m<A&A<v){break b}if(v<A&A<m){break b}else{I=K}}}while(0);n=+h[k+(t<<4)>>3];o=+h[k+(t<<4)+8>>3];F=x*(n-v)-E*(o-w);do{if(F>1.0e-4){L=1}else{K=F<-1.0e-4;J=K<<31>>31;if(K){L=J;break}if(m<n&n<v){break b}if(v<n&n<m){break b}else{L=J}}}while(0);F=z-o;M=A-n;N=(m-n)*F-M*(u-o);if(N>1.0e-4){O=1}else{O=(N<-1.0e-4)<<31>>31}N=(v-n)*F-M*(w-o);if(N>1.0e-4){P=1}else{P=(N<-1.0e-4)<<31>>31}if((da(L,I)|0)<0){if((da(P,O)|0)<=-1){break b}}s=s+1|0;}while((s|0)<(b|0))}else{s=0;do{t=c[d+(s<<2)>>2]|0;N=+h[k+(s<<4)>>3];M=+h[k+(s<<4)+8>>3];F=x*(N-v)-E*(M-w);do{if(F>1.0e-4){Q=1}else{J=F<-1.0e-4;K=J<<31>>31;if(J){Q=K;break}if(u<M&M<w){break b}if(w<M&M<u){break b}else{Q=K}}}while(0);F=+h[k+(t<<4)>>3];o=+h[k+(t<<4)+8>>3];n=x*(F-v)-E*(o-w);do{if(n>1.0e-4){R=1}else{K=n<-1.0e-4;J=K<<31>>31;if(K){R=J;break}if(u<o&o<w){break b}if(w<o&o<u){break b}else{R=J}}}while(0);n=M-o;A=N-F;z=(m-F)*n-A*(u-o);if(z>1.0e-4){S=1}else{S=(z<-1.0e-4)<<31>>31}z=(v-F)*n-A*(w-o);if(z>1.0e-4){U=1}else{U=(z<-1.0e-4)<<31>>31}if((da(R,Q)|0)<0){if((da(U,S)|0)<=-1){break b}}s=s+1|0;}while((s|0)<(b|0))}z=+T(E*E+x*x);h[(c[p>>2]|0)+(a<<3)>>3]=z;h[(c[f+(a<<2)>>2]|0)+(l<<3)>>3]=z}}while(0);if((a|0)<=0){break a}a=a-1|0}}}while(0);l=l+1|0;}while((l|0)<(b|0));return}function bC(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0,K=0.0,L=0.0,M=0.0,N=0.0,O=0,P=0,Q=0,R=0,S=0.0,U=0.0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,ea=0.0,fa=0.0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0;e=i;i=i+24|0;f=d;d=i;i=i+16|0;c[d>>2]=c[f>>2];c[d+4>>2]=c[f+4>>2];c[d+8>>2]=c[f+8>>2];c[d+12>>2]=c[f+12>>2];f=e|0;g=e+16|0;j=c[a+4>>2]|0;k=a+8|0;l=c[k>>2]|0;m=c[a+16>>2]|0;n=c[a+20>>2]|0;o=dF((j<<3)+16|0)|0;p=o;a:do{if((b|0)==-2222){q=+h[d+8>>3];h[f>>3]=+h[d>>3];h[f+8>>3]=q;r=a+12|0;s=a|0;t=g|0;u=g+4|0;v=0;while(1){if((v|0)>=(c[s>>2]|0)){w=j;x=j;break a}y=c[r>>2]|0;z=y+(v<<2)|0;c[t>>2]=(c[k>>2]|0)+(c[z>>2]<<4);A=v+1|0;c[u>>2]=(c[y+(A<<2)>>2]|0)-(c[z>>2]|0);if((LB(g,f)|0)==0){v=A}else{B=v;C=5;break}}}else{B=b;C=5}}while(0);do{if((C|0)==5){if((B|0)<=-1){w=j;x=j;break}b=c[a+12>>2]|0;w=c[b+(B+1<<2)>>2]|0;x=c[b+(B<<2)>>2]|0}}while(0);B=(x|0)>0;if(B){q=+h[d>>3];D=+h[d+8>>3];a=(w|0)<(j|0);b=0;do{E=+h[l+(b<<4)>>3];F=+h[l+(b<<4)+8>>3];f=c[n+(b<<2)>>2]|0;g=c[m+(b<<2)>>2]|0;G=+h[l+(f<<4)>>3];H=+h[l+(f<<4)+8>>3];I=(E-G)*(D-H)-(F-H)*(q-G);if(I>1.0e-4){J=1}else{J=(I<-1.0e-4)<<31>>31}I=D-F;K=+h[l+(g<<4)>>3]-E;L=+h[l+(g<<4)+8>>3]-F;M=q-E;N=K*I-L*M;if(N>1.0e-4){O=1}else{O=(N<-1.0e-4)<<31>>31>>>31^1}g=(J|0)>-1;if((H-F)*K-(G-E)*L>1.0e-4){P=g?O:0}else{P=g?1:O}b:do{if((P|0)==0){C=65}else{g=q!=E;f=0;do{k=c[m+(f<<2)>>2]|0;L=+h[l+(f<<4)>>3];G=+h[l+(f<<4)+8>>3];K=I*(L-E)-M*(G-F);do{if(K>1.0e-4){Q=1}else{v=K<-1.0e-4;u=v<<31>>31;if(v){Q=u;break}if(g){if(q<L&L<E){C=65;break b}if(E<L&L<q){C=65;break b}else{Q=u;break}}else{if(D<G&G<F){C=65;break b}if(F<G&G<D){C=65;break b}else{Q=u;break}}}}while(0);K=+h[l+(k<<4)>>3];H=+h[l+(k<<4)+8>>3];N=I*(K-E)-M*(H-F);do{if(N>1.0e-4){R=1}else{u=N<-1.0e-4;v=u<<31>>31;if(u){R=v;break}if(g){if(q<K&K<E){C=65;break b}if(E<K&K<q){C=65;break b}else{R=v;break}}else{if(D<H&H<F){C=65;break b}if(F<H&H<D){C=65;break b}else{R=v;break}}}}while(0);N=G-H;S=L-K;U=(q-K)*N-S*(D-H);if(U>1.0e-4){V=1}else{V=(U<-1.0e-4)<<31>>31}U=(E-K)*N-S*(F-H);if(U>1.0e-4){W=1}else{W=(U<-1.0e-4)<<31>>31}if((da(R,Q)|0)<0){if((da(W,V)|0)<=-1){C=65;break b}}f=f+1|0;}while((f|0)<(x|0));if(a){f=q!=E;g=w;do{k=c[m+(g<<2)>>2]|0;U=+h[l+(g<<4)>>3];S=+h[l+(g<<4)+8>>3];N=I*(U-E)-M*(S-F);do{if(N>1.0e-4){X=1}else{v=N<-1.0e-4;u=v<<31>>31;if(v){X=u;break}if(f){if(q<U&U<E){C=65;break b}if(E<U&U<q){C=65;break b}else{X=u;break}}else{if(D<S&S<F){C=65;break b}if(F<S&S<D){C=65;break b}else{X=u;break}}}}while(0);N=+h[l+(k<<4)>>3];H=+h[l+(k<<4)+8>>3];K=I*(N-E)-M*(H-F);do{if(K>1.0e-4){Y=1}else{u=K<-1.0e-4;v=u<<31>>31;if(u){Y=v;break}if(f){if(q<N&N<E){C=65;break b}if(E<N&N<q){C=65;break b}else{Y=v;break}}else{if(D<H&H<F){C=65;break b}if(F<H&H<D){C=65;break b}else{Y=v;break}}}}while(0);K=S-H;L=U-N;G=(q-N)*K-L*(D-H);if(G>1.0e-4){Z=1}else{Z=(G<-1.0e-4)<<31>>31}G=(E-N)*K-L*(F-H);if(G>1.0e-4){_=1}else{_=(G<-1.0e-4)<<31>>31}if((da(Y,X)|0)<0){if((da(_,Z)|0)<=-1){C=65;break b}}g=g+1|0;}while((g|0)<(j|0))}h[p+(b<<3)>>3]=+T(M*M+I*I)}}while(0);if((C|0)==65){C=0;h[p+(b<<3)>>3]=0.0}b=b+1|0;}while((b|0)<(x|0))}if((x|0)<(w|0)){vF(o+(x<<3)|0,0,w-x<<3|0)|0}if((w|0)>=(j|0)){$=p+(j<<3)|0;h[$>>3]=0.0;aa=j+1|0;ba=p+(aa<<3)|0;h[ba>>3]=0.0;i=e;return p|0}D=+h[d>>3];q=+h[d+8>>3];d=w;do{I=+h[l+(d<<4)>>3];M=+h[l+(d<<4)+8>>3];o=c[n+(d<<2)>>2]|0;b=c[m+(d<<2)>>2]|0;F=+h[l+(o<<4)>>3];E=+h[l+(o<<4)+8>>3];G=(I-F)*(q-E)-(M-E)*(D-F);if(G>1.0e-4){ca=1}else{ca=(G<-1.0e-4)<<31>>31}G=q-M;L=+h[l+(b<<4)>>3]-I;K=+h[l+(b<<4)+8>>3]-M;ea=D-I;fa=L*G-K*ea;if(fa>1.0e-4){ga=1}else{ga=(fa<-1.0e-4)<<31>>31>>>31^1}b=(ca|0)>-1;if((E-M)*L-(F-I)*K>1.0e-4){ha=b?ga:0}else{ha=b?1:ga}c:do{if((ha|0)==0){C=123}else{if(B){b=D!=I;o=0;do{Z=c[m+(o<<2)>>2]|0;K=+h[l+(o<<4)>>3];F=+h[l+(o<<4)+8>>3];L=G*(K-I)-ea*(F-M);do{if(L>1.0e-4){ia=1}else{_=L<-1.0e-4;X=_<<31>>31;if(_){ia=X;break}if(b){if(D<K&K<I){C=123;break c}if(I<K&K<D){C=123;break c}else{ia=X;break}}else{if(q<F&F<M){C=123;break c}if(M<F&F<q){C=123;break c}else{ia=X;break}}}}while(0);L=+h[l+(Z<<4)>>3];H=+h[l+(Z<<4)+8>>3];N=G*(L-I)-ea*(H-M);do{if(N>1.0e-4){ja=1}else{X=N<-1.0e-4;_=X<<31>>31;if(X){ja=_;break}if(b){if(D<L&L<I){C=123;break c}if(I<L&L<D){C=123;break c}else{ja=_;break}}else{if(q<H&H<M){C=123;break c}if(M<H&H<q){C=123;break c}else{ja=_;break}}}}while(0);N=F-H;U=K-L;S=(D-L)*N-U*(q-H);if(S>1.0e-4){ka=1}else{ka=(S<-1.0e-4)<<31>>31}S=(I-L)*N-U*(M-H);if(S>1.0e-4){la=1}else{la=(S<-1.0e-4)<<31>>31}if((da(ja,ia)|0)<0){if((da(la,ka)|0)<=-1){C=123;break c}}o=o+1|0;}while((o|0)<(x|0))}o=D!=I;b=w;do{Z=c[m+(b<<2)>>2]|0;S=+h[l+(b<<4)>>3];U=+h[l+(b<<4)+8>>3];N=G*(S-I)-ea*(U-M);do{if(N>1.0e-4){ma=1}else{_=N<-1.0e-4;X=_<<31>>31;if(_){ma=X;break}if(o){if(D<S&S<I){C=123;break c}if(I<S&S<D){C=123;break c}else{ma=X;break}}else{if(q<U&U<M){C=123;break c}if(M<U&U<q){C=123;break c}else{ma=X;break}}}}while(0);N=+h[l+(Z<<4)>>3];H=+h[l+(Z<<4)+8>>3];L=G*(N-I)-ea*(H-M);do{if(L>1.0e-4){na=1}else{X=L<-1.0e-4;_=X<<31>>31;if(X){na=_;break}if(o){if(D<N&N<I){C=123;break c}if(I<N&N<D){C=123;break c}else{na=_;break}}else{if(q<H&H<M){C=123;break c}if(M<H&H<q){C=123;break c}else{na=_;break}}}}while(0);L=U-H;K=S-N;F=(D-N)*L-K*(q-H);if(F>1.0e-4){oa=1}else{oa=(F<-1.0e-4)<<31>>31}F=(I-N)*L-K*(M-H);if(F>1.0e-4){pa=1}else{pa=(F<-1.0e-4)<<31>>31}if((da(na,ma)|0)<0){if((da(pa,oa)|0)<=-1){C=123;break c}}b=b+1|0;}while((b|0)<(j|0));h[p+(d<<3)>>3]=+T(ea*ea+G*G)}}while(0);if((C|0)==123){C=0;h[p+(d<<3)>>3]=0.0}d=d+1|0;}while((d|0)<(j|0));$=p+(j<<3)|0;h[$>>3]=0.0;aa=j+1|0;ba=p+(aa<<3)|0;h[ba>>3]=0.0;i=e;return p|0}function cC(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;g=i;h=a;a=i;i=i+16|0;c[a>>2]=c[h>>2];c[a+4>>2]=c[h+4>>2];c[a+8>>2]=c[h+8>>2];c[a+12>>2]=c[h+12>>2];h=d;d=i;i=i+16|0;c[d>>2]=c[h>>2];c[d+4>>2]=c[h+4>>2];c[d+8>>2]=c[h+8>>2];c[d+12>>2]=c[h+12>>2];h=c[f+4>>2]|0;j=c[f+8>>2]|0;k=c[f+16>>2]|0;l=(e|0)<0;a:do{if((b|0)<0){if(l){m=0;break}n=c[f+12>>2]|0;o=0;p=c[n+(e<<2)>>2]|0;q=c[n+(e+1<<2)>>2]|0;r=11}else{if(l){n=c[f+12>>2]|0;o=0;p=c[n+(b<<2)>>2]|0;q=c[n+(b+1<<2)>>2]|0;r=11;break}n=c[f+12>>2]|0;if((b|0)>(e|0)){s=b;t=b;u=e;v=e}else{s=e;t=e;u=b;v=b}w=c[n+(s+1<<2)>>2]|0;x=c[n+(t<<2)>>2]|0;y=c[n+(u+1<<2)>>2]|0;z=c[n+(v<<2)>>2]|0;if((z|0)>0){A=0}else{o=y;p=x;q=w;r=11;break}while(1){n=A+1|0;if(($B(a,d,j+(A<<4)|0,j+(c[k+(A<<2)>>2]<<4)|0)|0)!=0){B=0;break}if((n|0)<(z|0)){A=n}else{o=y;p=x;q=w;r=11;break a}}i=g;return B|0}}while(0);b:do{if((r|0)==11){if((o|0)<(p|0)){C=o}else{m=q;break}while(1){A=C+1|0;if(($B(a,d,j+(C<<4)|0,j+(c[k+(C<<2)>>2]<<4)|0)|0)!=0){B=0;break}if((A|0)<(p|0)){C=A}else{m=q;break b}}i=g;return B|0}}while(0);if((m|0)<(h|0)){D=m}else{B=1;i=g;return B|0}while(1){m=D+1|0;if(($B(a,d,j+(D<<4)|0,j+(c[k+(D<<2)>>2]<<4)|0)|0)!=0){B=0;r=18;break}if((m|0)<(h|0)){D=m}else{B=1;r=18;break}}if((r|0)==18){i=g;return B|0}return 0}function dC(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0.0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;f=i;i=i+2048|0;g=e;e=i;i=i+32|0;tF(e,g,32)|0;g=f|0;j=f+1024|0;k=b+16|0;b=c[248+(c[(c[k>>2]|0)+12>>2]<<2)>>2]|0;Lv(b,153400)|0;l=+h[e>>3];m=e+8|0;eC(b,l,+h[m>>3]);n=j|0;nb(n|0,107520,(o=i,i=i+8|0,h[o>>3]=+h[e+16>>3]-l,o)|0)|0;i=o;p=gb(n|0,46)|0;do{if((p|0)==0){q=j+(xF(n|0)|0)|0}else{r=p;while(1){s=r+1|0;if((a[s]|0)==0){t=r;break}else{r=s}}while(1){r=a[t]|0;if((r<<24>>24|0)==46){u=5;break}else if((r<<24>>24|0)!=48){u=6;break}a[t]=0;t=t-1|0}if((u|0)==5){a[t]=0;q=t;break}else if((u|0)==6){q=t+1|0;break}}}while(0);a[q]=32;a[q+1|0]=0;Lv(b,n)|0;nb(n|0,107520,(o=i,i=i+8|0,h[o>>3]=+h[e+24>>3]- +h[m>>3],o)|0)|0;i=o;m=gb(n|0,46)|0;do{if((m|0)==0){v=j+(xF(n|0)|0)|0}else{e=m;while(1){q=e+1|0;if((a[q]|0)==0){w=e;break}else{e=q}}while(1){e=a[w]|0;if((e<<24>>24|0)==46){u=12;break}else if((e<<24>>24|0)!=48){u=13;break}a[w]=0;w=w-1|0}if((u|0)==12){a[w]=0;v=w;break}else if((u|0)==13){v=w+1|0;break}}}while(0);a[v]=32;a[v+1|0]=0;Lv(b,n)|0;n=c[d+8>>2]|0;d=c[248+(c[(c[k>>2]|0)+12>>2]<<2)>>2]|0;k=g|0;g=xF(n|0)|0;nb(k|0,121624,(o=i,i=i+16|0,c[o>>2]=213464,c[o+8>>2]=g,o)|0)|0;i=o;Lv(d,k)|0;Lv(d,n)|0;n=d+4|0;k=c[n>>2]|0;if(k>>>0<(c[d+8>>2]|0)>>>0){x=k;y=x+1|0;c[n>>2]=y;a[x]=32;z=1024;A=0;i=f;return}Jv(d,1)|0;x=c[n>>2]|0;y=x+1|0;c[n>>2]=y;a[x]=32;z=1024;A=0;i=f;return}function eC(b,c,d){b=b|0;c=+c;d=+d;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=i;i=i+1024|0;f=e|0;g=f|0;nb(g|0,107520,(j=i,i=i+8|0,h[j>>3]=c,j)|0)|0;i=j;k=gb(g|0,46)|0;do{if((k|0)==0){l=f+(xF(g|0)|0)|0}else{m=k;while(1){n=m+1|0;if((a[n]|0)==0){o=m;break}else{m=n}}while(1){m=a[o]|0;if((m<<24>>24|0)==46){p=5;break}else if((m<<24>>24|0)!=48){p=6;break}a[o]=0;o=o-1|0}if((p|0)==5){a[o]=0;l=o;break}else if((p|0)==6){l=o+1|0;break}}}while(0);a[l]=32;a[l+1|0]=0;Lv(b,g)|0;c=+wk(d);nb(g|0,107520,(j=i,i=i+8|0,h[j>>3]=c,j)|0)|0;i=j;j=gb(g|0,46)|0;do{if((j|0)==0){q=f+(xF(g|0)|0)|0}else{l=j;while(1){o=l+1|0;if((a[o]|0)==0){r=l;break}else{l=o}}while(1){l=a[r]|0;if((l<<24>>24|0)==46){p=12;break}else if((l<<24>>24|0)!=48){p=13;break}a[r]=0;r=r-1|0}if((p|0)==12){a[r]=0;q=r;break}else if((p|0)==13){q=r+1|0;break}}}while(0);a[q]=32;a[q+1|0]=0;Lv(b,g)|0;i=e;return}function fC(d){d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;e=i;i=i+1040|0;f=e|0;g=e+1024|0;h=e+1032|0;j=c[(c[d+16>>2]|0)+8>>2]|0;k=d+64|0;switch(c[k>>2]|0){case 1:{if((b[(c[j+8>>2]|0)+128>>1]&1)==0){i=e;return}dn(j);i=e;return};case 6:case 5:case 4:{zk(j,h,g);d=c[h>>2]|0;h=c[g>>2]|0;g=c[k>>2]|0;k=dF(8240)|0;c[43614]=k;a:do{if((g|0)==5){b[k+8232>>1]=12;c[k+8236>>2]=113088}else if((g|0)==6){b[k+8232>>1]=14;c[k+8236>>2]=113640}else{l=ew(j|0,114376)|0;do{if((l|0)!=0){if((a[l]|0)==0){break}m=f|0;n=0;o=l;b:while(1){p=o;while(1){q=p+1|0;r=a[p]|0;if(r<<24>>24==0){break b}if(((r<<24>>24)-48|0)>>>0<10>>>0){break}else{p=q}}if((n|0)>=1023){s=16;break}a[f+n|0]=r;n=n+1|0;o=q}if((s|0)==16){Fv(0,108536,(t=i,i=i+8|0,c[t>>2]=l,t)|0)|0;i=t}a[f+n|0]=0;o=(Rb(m|0)|0)&65535;if((o&65535)>>>0<=10>>>0){break}b[(c[43614]|0)+8232>>1]=o;c[(c[43614]|0)+8236>>2]=l;break a}}while(0);l=f|0;o=0;p=112568;c:while(1){u=p;while(1){v=u+1|0;w=a[u]|0;if(w<<24>>24==0){break c}if(((w<<24>>24)-48|0)>>>0<10>>>0){break}else{u=v}}if((o|0)>=1023){s=25;break}a[f+o|0]=w;o=o+1|0;p=v}if((s|0)==25){Fv(0,108536,(t=i,i=i+8|0,c[t>>2]=112568,t)|0)|0;i=t}a[f+o|0]=0;p=(Rb(l|0)|0)&65535;b[(c[43614]|0)+8232>>1]=p;c[(c[43614]|0)+8236>>2]=112568}}while(0);f=j+8|0;if((c[(c[f>>2]|0)+172>>2]|0)==0){c[c[43614]>>2]=0}else{t=en(j,0,115752,213464)|0;c[c[43614]>>2]=t}if((a[(c[f>>2]|0)+113|0]&8)==0){c[(c[43614]|0)+4>>2]=0}else{t=en(j,0,112048,213464)|0;c[(c[43614]|0)+4>>2]=t}t=en(j,1,115752,213464)|0;c[(c[43614]|0)+8>>2]=t;t=en(j,1,112048,213464)|0;c[(c[43614]|0)+12>>2]=t;t=en(j,2,115752,213464)|0;c[(c[43614]|0)+16>>2]=t;if((h|0)==0){c[(c[43614]|0)+20>>2]=0}else{h=en(j,2,111448,213464)|0;c[(c[43614]|0)+20>>2]=h}if((d|0)==0){c[(c[43614]|0)+24>>2]=0}else{d=en(j,2,110704,213464)|0;c[(c[43614]|0)+24>>2]=d}if((a[(c[f>>2]|0)+113|0]&33)==0){c[(c[43614]|0)+28>>2]=0}else{d=en(j,2,112048,213464)|0;c[(c[43614]|0)+28>>2]=d}if((a[(c[f>>2]|0)+113|0]&2)==0){c[(c[43614]|0)+32>>2]=0}else{d=en(j,2,110056,213464)|0;c[(c[43614]|0)+32>>2]=d}if((a[(c[f>>2]|0)+113|0]&4)==0){c[(c[43614]|0)+36>>2]=0}else{f=en(j,2,109368,213464)|0;c[(c[43614]|0)+36>>2]=f}Iv(174464,1024,(c[43614]|0)+40|0);Iv(174480,1024,(c[43614]|0)+1064|0);Iv(174496,1024,(c[43614]|0)+2088|0);Iv(174512,1024,(c[43614]|0)+3112|0);Iv(174528,1024,(c[43614]|0)+4136|0);Iv(174544,1024,(c[43614]|0)+5160|0);Iv(174560,1024,(c[43614]|0)+6184|0);Iv(174576,1024,(c[43614]|0)+7208|0);i=e;return};case 0:{Ck(j);i=e;return};default:{i=e;return}}}function gC(b){b=b|0;var d=0,e=0,f=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=c[(c[b+16>>2]|0)+8>>2]|0;if((c[45182]|0)==0){c[45182]=c[43564];c[45183]=30;c[45184]=34}e=d+52|0;f=(c[e>>2]|0)+8|0;g=c[f>>2]|0;c[f>>2]=180728;switch(c[b+64>>2]|0){case 0:case 1:{if((c[b+152>>2]&134217728|0)!=0){i=c[e>>2]|0;j=i+8|0;c[j>>2]=g;return}Fy(d,b)|0;i=c[e>>2]|0;j=i+8|0;c[j>>2]=g;return};case 2:{xk(b,d,b,0);i=c[e>>2]|0;j=i+8|0;c[j>>2]=g;return};case 3:{xk(b,d,b,1);i=c[e>>2]|0;j=i+8|0;c[j>>2]=g;return};case 4:case 5:case 6:{f=c[43617]|0;if((f|0)==(c[43616]|0)){k=d|0}else{l=c[c[43614]>>2]|0;if((l|0)==0){m=en(d,0,115752,213464)|0;c[c[43614]>>2]=m;n=c[c[43614]>>2]|0;o=c[43617]|0}else{n=l;o=f}f=d|0;if(o>>>0<(c[43618]|0)>>>0){p=o}else{Jv(174464,1)|0;p=c[43617]|0}a[p]=0;p=c[43616]|0;c[43617]=p;hw(f,n,p)|0;k=f}if((c[(c[d+8>>2]|0)+12>>2]|0)!=0){f=c[(c[43614]|0)+4>>2]|0;p=c[43633]|0;if(p>>>0<(c[43634]|0)>>>0){q=p}else{Jv(174528,1)|0;q=c[43633]|0}a[q]=0;q=c[43632]|0;c[43633]=q;hw(k,f,q)|0}iw(k,114376,c[(c[43614]|0)+8236>>2]|0,213464)|0;Mv(174464);Mv(174480);Mv(174496);Mv(174512);Mv(174528);Mv(174544);Mv(174560);Mv(174576);eF(c[43614]|0);h[1836]=1.0;h[1840]=1.0;c[43682]=0;c[43686]=0;if((c[b+152>>2]&134217728|0)!=0){i=c[e>>2]|0;j=i+8|0;c[j>>2]=g;return}Fy(d,b)|0;i=c[e>>2]|0;j=i+8|0;c[j>>2]=g;return};default:{i=c[e>>2]|0;j=i+8|0;c[j>>2]=g;return}}}function hC(b){b=b|0;var d=0,e=0,f=0,g=0,i=0;d=c[(c[b+16>>2]|0)+8>>2]|0;b=d|0;e=c[c[43614]>>2]|0;f=c[43621]|0;if(f>>>0<(c[43622]|0)>>>0){g=f}else{Jv(174480,1)|0;g=c[43621]|0}a[g]=0;g=c[43620]|0;c[43621]=g;hw(b,e,g)|0;if((c[(c[d+8>>2]|0)+12>>2]|0)==0){h[1837]=1.0;h[1841]=1.0;c[43683]=0;c[43687]=0;return}d=c[(c[43614]|0)+4>>2]|0;g=c[43637]|0;if(g>>>0<(c[43638]|0)>>>0){i=g}else{Jv(174544,1)|0;i=c[43637]|0}a[i]=0;i=c[43636]|0;c[43637]=i;hw(b,d,i)|0;h[1837]=1.0;h[1841]=1.0;c[43683]=0;c[43687]=0;return}function iC(b){b=b|0;var d=0,e=0,f=0,g=0;d=c[(c[b+16>>2]|0)+8>>2]|0;b=c[43621]|0;if((b|0)!=(c[43620]|0)){e=c[(c[43614]|0)+8>>2]|0;if(b>>>0<(c[43622]|0)>>>0){f=b}else{Jv(174480,1)|0;f=c[43621]|0}a[f]=0;f=c[43620]|0;c[43621]=f;hw(d|0,e,f)|0}f=c[43637]|0;if((f|0)==(c[43636]|0)){h[1844]=1.0;h[1846]=1.0;c[43690]=0;c[43692]=0;return}e=c[(c[43614]|0)+12>>2]|0;if(f>>>0<(c[43638]|0)>>>0){g=f}else{Jv(174544,1)|0;g=c[43637]|0}a[g]=0;g=c[43636]|0;c[43637]=g;hw(d|0,e,g)|0;h[1844]=1.0;h[1846]=1.0;c[43690]=0;c[43692]=0;return}function jC(b){b=b|0;var d=0,e=0,f=0,g=0,i=0,j=0,k=0,l=0;d=c[(c[b+16>>2]|0)+8>>2]|0;b=c[43621]|0;if((b|0)!=(c[43620]|0)){e=c[(c[43614]|0)+16>>2]|0;if(b>>>0<(c[43622]|0)>>>0){f=b}else{Jv(174480,1)|0;f=c[43621]|0}a[f]=0;f=c[43620]|0;c[43621]=f;hw(d|0,e,f)|0}f=c[43625]|0;if((f|0)!=(c[43624]|0)){e=c[(c[43614]|0)+24>>2]|0;if(f>>>0<(c[43626]|0)>>>0){g=f}else{Jv(174496,1)|0;g=c[43625]|0}a[g]=0;g=c[43624]|0;c[43625]=g;hw(d|0,e,g)|0}g=c[43629]|0;if((g|0)!=(c[43628]|0)){e=c[(c[43614]|0)+20>>2]|0;if(g>>>0<(c[43630]|0)>>>0){i=g}else{Jv(174512,1)|0;i=c[43629]|0}a[i]=0;i=c[43628]|0;c[43629]=i;hw(d|0,e,i)|0}i=c[43637]|0;if((i|0)!=(c[43636]|0)){e=c[(c[43614]|0)+28>>2]|0;if(i>>>0<(c[43638]|0)>>>0){j=i}else{Jv(174544,1)|0;j=c[43637]|0}a[j]=0;j=c[43636]|0;c[43637]=j;hw(d|0,e,j)|0}j=c[43641]|0;if((j|0)!=(c[43640]|0)){e=c[(c[43614]|0)+36>>2]|0;if(j>>>0<(c[43642]|0)>>>0){k=j}else{Jv(174560,1)|0;k=c[43641]|0}a[k]=0;k=c[43640]|0;c[43641]=k;hw(d|0,e,k)|0}k=c[43645]|0;if((k|0)==(c[43644]|0)){h[1845]=1.0;h[1847]=1.0;h[1838]=1.0;h[1839]=1.0;h[1842]=1.0;h[1843]=1.0;c[43691]=0;c[43693]=0;c[43684]=0;c[43685]=0;c[43688]=0;c[43689]=0;return}e=c[(c[43614]|0)+32>>2]|0;if(k>>>0<(c[43646]|0)>>>0){l=k}else{Jv(174576,1)|0;l=c[43645]|0}a[l]=0;l=c[43644]|0;c[43645]=l;hw(d|0,e,l)|0;h[1845]=1.0;h[1847]=1.0;h[1838]=1.0;h[1839]=1.0;h[1842]=1.0;h[1843]=1.0;c[43691]=0;c[43693]=0;c[43684]=0;c[43685]=0;c[43688]=0;c[43689]=0;return}function kC(e,f,g){e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0.0,D=0,E=0,F=0,G=0,H=0,I=0;j=i;i=i+3072|0;k=f;f=i;i=i+16|0;c[f>>2]=c[k>>2];c[f+4>>2]=c[k+4>>2];c[f+8>>2]=c[k+8>>2];c[f+12>>2]=c[k+12>>2];k=j|0;l=j+1024|0;m=j+2048|0;n=e+16|0;e=c[(c[n>>2]|0)+12>>2]|0;o=c[248+(e<<2)>>2]|0;Lv(o,119184)|0;p=m|0;q=g+4|0;nb(p|0,107520,(r=i,i=i+8|0,h[r>>3]=+h[(c[q>>2]|0)+16>>3],r)|0)|0;i=r;s=gb(p|0,46)|0;do{if((s|0)==0){t=m+(xF(p|0)|0)|0}else{u=s;while(1){v=u+1|0;if((a[v]|0)==0){w=u;break}else{u=v}}while(1){u=a[w]|0;if((u<<24>>24|0)==46){x=5;break}else if((u<<24>>24|0)!=48){x=6;break}a[w]=0;w=w-1|0}if((x|0)==5){a[w]=0;t=w;break}else if((x|0)==6){t=w+1|0;break}}}while(0);a[t]=32;a[t+1|0]=0;Lv(o,p)|0;t=c[c[q>>2]>>2]|0;w=c[248+(c[(c[n>>2]|0)+12>>2]<<2)>>2]|0;s=l|0;l=xF(t|0)|0;nb(s|0,121624,(r=i,i=i+16|0,c[r>>2]=213464,c[r+8>>2]=l,r)|0)|0;i=r;Lv(w,s)|0;Lv(w,t)|0;t=w+4|0;l=c[t>>2]|0;if(l>>>0<(c[w+8>>2]|0)>>>0){y=l}else{Jv(w,1)|0;y=c[t>>2]|0}c[t>>2]=y+1;a[y]=32;y=(c[n>>2]|0)+16|0;t=a[y+3|0]|0;w=d[y]|0;l=d[y+1|0]|0;u=d[y+2|0]|0;if(t<<24>>24==-1){nb(180832,150832,(r=i,i=i+24|0,c[r>>2]=w,c[r+8>>2]=l,c[r+16>>2]=u,r)|0)|0;i=r}else{nb(180832,147960,(r=i,i=i+32|0,c[r>>2]=w,c[r+8>>2]=l,c[r+16>>2]=u,c[r+24>>2]=t&255,r)|0)|0;i=r}t=c[248+(c[(c[n>>2]|0)+12>>2]<<2)>>2]|0;u=k|0;k=xF(180832)|0;nb(u|0,121624,(r=i,i=i+16|0,c[r>>2]=154040,c[r+8>>2]=k,r)|0)|0;i=r;Lv(t,u)|0;Lv(t,180832)|0;u=t+4|0;k=c[u>>2]|0;if(k>>>0<(c[t+8>>2]|0)>>>0){z=k}else{Jv(t,1)|0;z=c[u>>2]|0}c[u>>2]=z+1;a[z]=32;z=a[g+48|0]|0;if((z|0)==114){A=1}else if((z|0)==108){A=-1}else{A=0}z=c[q>>2]|0;if((z|0)==0){B=0}else{B=c[z+24>>2]<<25>>25}z=b[(c[43614]|0)+8232>>1]|0;do{if((z&65535)>>>0>14>>>0){q=((z&65535)>>>0>15>>>0?63:31)&B;u=174728+(e<<2)|0;if((c[u>>2]|0)==(q|0)){break}nb(p|0,118560,(r=i,i=i+8|0,c[r>>2]=q,r)|0)|0;i=r;Lv(o,p)|0;c[u>>2]=q}}while(0);e=f+8|0;C=+h[g+24>>3]+ +h[e>>3];h[e>>3]=C;Lv(o,117608)|0;eC(o,+h[f>>3],C);nb(p|0,116688,(r=i,i=i+8|0,c[r>>2]=A,r)|0)|0;i=r;Lv(o,p)|0;nb(p|0,107520,(r=i,i=i+8|0,h[r>>3]=+h[g+32>>3],r)|0)|0;i=r;A=gb(p|0,46)|0;do{if((A|0)==0){D=m+(xF(p|0)|0)|0}else{f=A;while(1){e=f+1|0;if((a[e]|0)==0){E=f;break}else{f=e}}while(1){f=a[E]|0;if((f<<24>>24|0)==46){x=27;break}else if((f<<24>>24|0)!=48){x=28;break}a[E]=0;E=E-1|0}if((x|0)==27){a[E]=0;D=E;break}else if((x|0)==28){D=E+1|0;break}}}while(0);a[D]=32;a[D+1|0]=0;Lv(o,p)|0;p=c[g>>2]|0;g=c[248+(c[(c[n>>2]|0)+12>>2]<<2)>>2]|0;n=xF(p|0)|0;nb(s|0,121624,(r=i,i=i+16|0,c[r>>2]=213464,c[r+8>>2]=n,r)|0)|0;i=r;Lv(g,s)|0;Lv(g,p)|0;p=g+4|0;s=c[p>>2]|0;if(s>>>0<(c[g+8>>2]|0)>>>0){F=s;G=F+1|0;c[p>>2]=G;a[F]=32;H=1024;I=0;i=j;return}Jv(g,1)|0;F=c[p>>2]|0;G=F+1|0;c[p>>2]=G;a[F]=32;H=1024;I=0;i=j;return}function lC(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;g=i;i=i+3072|0;j=g|0;k=g+2048|0;l=b+16|0;m=c[(c[l>>2]|0)+12>>2]|0;pC(b);n=(c[l>>2]|0)+16|0;o=a[n+3|0]|0;p=d[n]|0;q=d[n+1|0]|0;r=d[n+2|0]|0;if(o<<24>>24==-1){nb(180832,150832,(s=i,i=i+24|0,c[s>>2]=p,c[s+8>>2]=q,c[s+16>>2]=r,s)|0)|0;i=s}else{nb(180832,147960,(s=i,i=i+32|0,c[s>>2]=p,c[s+8>>2]=q,c[s+16>>2]=r,c[s+24>>2]=o&255,s)|0)|0;i=s}o=c[248+(c[(c[l>>2]|0)+12>>2]<<2)>>2]|0;r=g+1024|0;q=xF(180832)|0;nb(r|0,121624,(s=i,i=i+16|0,c[s>>2]=154040,c[s+8>>2]=q,s)|0)|0;i=s;Lv(o,r)|0;Lv(o,180832)|0;r=o+4|0;q=c[r>>2]|0;if(q>>>0<(c[o+8>>2]|0)>>>0){t=q}else{Jv(o,1)|0;t=c[r>>2]|0}c[r>>2]=t+1;a[t]=32;if((f|0)==0){t=c[248+(m<<2)>>2]|0;Lv(t,120024)|0;u=t}else{if((f&-2|0)==2){qC(b,f,e,2)}else{f=(c[l>>2]|0)+56|0;b=a[f+3|0]|0;t=d[f]|0;r=d[f+1|0]|0;o=d[f+2|0]|0;if(b<<24>>24==-1){nb(180832,150832,(s=i,i=i+24|0,c[s>>2]=t,c[s+8>>2]=r,c[s+16>>2]=o,s)|0)|0;i=s}else{nb(180832,147960,(s=i,i=i+32|0,c[s>>2]=t,c[s+8>>2]=r,c[s+16>>2]=o,c[s+24>>2]=b&255,s)|0)|0;i=s}b=c[248+(c[(c[l>>2]|0)+12>>2]<<2)>>2]|0;l=j|0;j=xF(180832)|0;nb(l|0,121624,(s=i,i=i+16|0,c[s>>2]=128936,c[s+8>>2]=j,s)|0)|0;i=s;Lv(b,l)|0;Lv(b,180832)|0;l=b+4|0;j=c[l>>2]|0;if(j>>>0<(c[b+8>>2]|0)>>>0){v=j}else{Jv(b,1)|0;v=c[l>>2]|0}c[l>>2]=v+1;a[v]=32;}v=c[248+(m<<2)>>2]|0;Lv(v,120792)|0;u=v}v=e|0;m=e+8|0;eC(u,+h[v>>3],+h[m>>3]);l=k|0;nb(l|0,107520,(s=i,i=i+8|0,h[s>>3]=+h[e+16>>3]- +h[v>>3],s)|0)|0;i=s;v=gb(l|0,46)|0;do{if((v|0)==0){w=k+(xF(l|0)|0)|0}else{b=v;while(1){j=b+1|0;if((a[j]|0)==0){x=b;break}else{b=j}}while(1){b=a[x]|0;if((b<<24>>24|0)==46){y=21;break}else if((b<<24>>24|0)!=48){y=22;break}a[x]=0;x=x-1|0}if((y|0)==21){a[x]=0;w=x;break}else if((y|0)==22){w=x+1|0;break}}}while(0);a[w]=32;a[w+1|0]=0;Lv(u,l)|0;nb(l|0,107520,(s=i,i=i+8|0,h[s>>3]=+h[e+24>>3]- +h[m>>3],s)|0)|0;i=s;s=gb(l|0,46)|0;if((s|0)==0){z=k+(xF(l|0)|0)|0;A=z+1|0;a[z]=32;a[A]=0;B=Lv(u,l)|0;i=g;return}else{C=s}while(1){s=C+1|0;if((a[s]|0)==0){D=C;break}else{C=s}}while(1){C=a[D]|0;if((C<<24>>24|0)==46){y=28;break}else if((C<<24>>24|0)!=48){y=29;break}a[D]=0;D=D-1|0}if((y|0)==28){a[D]=0;z=D;A=z+1|0;a[z]=32;a[A]=0;B=Lv(u,l)|0;i=g;return}else if((y|0)==29){z=D+1|0;A=z+1|0;a[z]=32;a[A]=0;B=Lv(u,l)|0;i=g;return}}function mC(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;j=i;i=i+3072|0;k=j|0;l=j+2048|0;pC(b);m=b+16|0;n=(c[m>>2]|0)+16|0;o=a[n+3|0]|0;p=d[n]|0;q=d[n+1|0]|0;r=d[n+2|0]|0;if(o<<24>>24==-1){nb(180832,150832,(s=i,i=i+24|0,c[s>>2]=p,c[s+8>>2]=q,c[s+16>>2]=r,s)|0)|0;i=s}else{nb(180832,147960,(s=i,i=i+32|0,c[s>>2]=p,c[s+8>>2]=q,c[s+16>>2]=r,c[s+24>>2]=o&255,s)|0)|0;i=s}o=c[248+(c[(c[m>>2]|0)+12>>2]<<2)>>2]|0;r=j+1024|0;q=xF(180832)|0;nb(r|0,121624,(s=i,i=i+16|0,c[s>>2]=154040,c[s+8>>2]=q,s)|0)|0;i=s;Lv(o,r)|0;Lv(o,180832)|0;r=o+4|0;q=c[r>>2]|0;if(q>>>0<(c[o+8>>2]|0)>>>0){t=q}else{Jv(o,1)|0;t=c[r>>2]|0}c[r>>2]=t+1;a[t]=32;if((g|0)==0){t=l|0;r=c[248+(c[(c[m>>2]|0)+12>>2]<<2)>>2]|0;o=r+4|0;q=c[o>>2]|0;if(q>>>0<(c[r+8>>2]|0)>>>0){u=q}else{Jv(r,1)|0;u=c[o>>2]|0}c[o>>2]=u+1;a[u]=112;nb(t|0,157816,(s=i,i=i+8|0,c[s>>2]=f,s)|0)|0;i=s;Lv(r,t)|0;if((f|0)>0){v=0}else{i=j;return}do{eC(r,+h[e+(v<<4)>>3],+h[e+(v<<4)+8>>3]);v=v+1|0;}while((v|0)<(f|0));i=j;return}if((g&-2|0)==2){qC(b,g,e,f)}else{g=(c[m>>2]|0)+56|0;b=a[g+3|0]|0;v=d[g]|0;r=d[g+1|0]|0;t=d[g+2|0]|0;if(b<<24>>24==-1){nb(180832,150832,(s=i,i=i+24|0,c[s>>2]=v,c[s+8>>2]=r,c[s+16>>2]=t,s)|0)|0;i=s}else{nb(180832,147960,(s=i,i=i+32|0,c[s>>2]=v,c[s+8>>2]=r,c[s+16>>2]=t,c[s+24>>2]=b&255,s)|0)|0;i=s}b=c[248+(c[(c[m>>2]|0)+12>>2]<<2)>>2]|0;t=k|0;k=xF(180832)|0;nb(t|0,121624,(s=i,i=i+16|0,c[s>>2]=128936,c[s+8>>2]=k,s)|0)|0;i=s;Lv(b,t)|0;Lv(b,180832)|0;t=b+4|0;k=c[t>>2]|0;if(k>>>0<(c[b+8>>2]|0)>>>0){w=k}else{Jv(b,1)|0;w=c[t>>2]|0}c[t>>2]=w+1;a[w]=32;}w=l|0;l=c[248+(c[(c[m>>2]|0)+12>>2]<<2)>>2]|0;m=l+4|0;t=c[m>>2]|0;if(t>>>0<(c[l+8>>2]|0)>>>0){x=t}else{Jv(l,1)|0;x=c[m>>2]|0}c[m>>2]=x+1;a[x]=80;nb(w|0,157816,(s=i,i=i+8|0,c[s>>2]=f,s)|0)|0;i=s;Lv(l,w)|0;if((f|0)>0){y=0}else{i=j;return}do{eC(l,+h[e+(y<<4)>>3],+h[e+(y<<4)+8>>3]);y=y+1|0;}while((y|0)<(f|0));i=j;return}function nC(b,e,f,g,j,k){b=b|0;e=e|0;f=f|0;g=g|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;j=i;i=i+3072|0;g=j|0;l=j+2048|0;pC(b);m=b+16|0;n=(c[m>>2]|0)+16|0;o=a[n+3|0]|0;p=d[n]|0;q=d[n+1|0]|0;r=d[n+2|0]|0;if(o<<24>>24==-1){nb(180832,150832,(s=i,i=i+24|0,c[s>>2]=p,c[s+8>>2]=q,c[s+16>>2]=r,s)|0)|0;i=s}else{nb(180832,147960,(s=i,i=i+32|0,c[s>>2]=p,c[s+8>>2]=q,c[s+16>>2]=r,c[s+24>>2]=o&255,s)|0)|0;i=s}o=c[248+(c[(c[m>>2]|0)+12>>2]<<2)>>2]|0;r=j+1024|0;q=xF(180832)|0;nb(r|0,121624,(s=i,i=i+16|0,c[s>>2]=154040,c[s+8>>2]=q,s)|0)|0;i=s;Lv(o,r)|0;Lv(o,180832)|0;r=o+4|0;q=c[r>>2]|0;if(q>>>0<(c[o+8>>2]|0)>>>0){t=q}else{Jv(o,1)|0;t=c[r>>2]|0}c[r>>2]=t+1;a[t]=32;if((k|0)==0){t=l|0;r=c[248+(c[(c[m>>2]|0)+12>>2]<<2)>>2]|0;o=r+4|0;q=c[o>>2]|0;if(q>>>0<(c[r+8>>2]|0)>>>0){u=q}else{Jv(r,1)|0;u=c[o>>2]|0}c[o>>2]=u+1;a[u]=66;nb(t|0,157816,(s=i,i=i+8|0,c[s>>2]=f,s)|0)|0;i=s;Lv(r,t)|0;if((f|0)>0){v=0}else{i=j;return}do{eC(r,+h[e+(v<<4)>>3],+h[e+(v<<4)+8>>3]);v=v+1|0;}while((v|0)<(f|0));i=j;return}if((k&-2|0)==2){qC(b,k,e,f)}else{k=(c[m>>2]|0)+56|0;b=a[k+3|0]|0;v=d[k]|0;r=d[k+1|0]|0;t=d[k+2|0]|0;if(b<<24>>24==-1){nb(180832,150832,(s=i,i=i+24|0,c[s>>2]=v,c[s+8>>2]=r,c[s+16>>2]=t,s)|0)|0;i=s}else{nb(180832,147960,(s=i,i=i+32|0,c[s>>2]=v,c[s+8>>2]=r,c[s+16>>2]=t,c[s+24>>2]=b&255,s)|0)|0;i=s}b=c[248+(c[(c[m>>2]|0)+12>>2]<<2)>>2]|0;t=g|0;g=xF(180832)|0;nb(t|0,121624,(s=i,i=i+16|0,c[s>>2]=128936,c[s+8>>2]=g,s)|0)|0;i=s;Lv(b,t)|0;Lv(b,180832)|0;t=b+4|0;g=c[t>>2]|0;if(g>>>0<(c[b+8>>2]|0)>>>0){w=g}else{Jv(b,1)|0;w=c[t>>2]|0}c[t>>2]=w+1;a[w]=32;}w=l|0;l=c[248+(c[(c[m>>2]|0)+12>>2]<<2)>>2]|0;m=l+4|0;t=c[m>>2]|0;if(t>>>0<(c[l+8>>2]|0)>>>0){x=t}else{Jv(l,1)|0;x=c[m>>2]|0}c[m>>2]=x+1;a[x]=98;nb(w|0,157816,(s=i,i=i+8|0,c[s>>2]=f,s)|0)|0;i=s;Lv(l,w)|0;if((f|0)>0){y=0}else{i=j;return}do{eC(l,+h[e+(y<<4)>>3],+h[e+(y<<4)+8>>3]);y=y+1|0;}while((y|0)<(f|0));i=j;return}function oC(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;g=i;i=i+2048|0;pC(b);j=b+16|0;b=(c[j>>2]|0)+16|0;k=a[b+3|0]|0;l=d[b]|0;m=d[b+1|0]|0;n=d[b+2|0]|0;if(k<<24>>24==-1){nb(180832,150832,(o=i,i=i+24|0,c[o>>2]=l,c[o+8>>2]=m,c[o+16>>2]=n,o)|0)|0;i=o}else{nb(180832,147960,(o=i,i=i+32|0,c[o>>2]=l,c[o+8>>2]=m,c[o+16>>2]=n,c[o+24>>2]=k&255,o)|0)|0;i=o}k=c[248+(c[(c[j>>2]|0)+12>>2]<<2)>>2]|0;n=g|0;m=xF(180832)|0;nb(n|0,121624,(o=i,i=i+16|0,c[o>>2]=154040,c[o+8>>2]=m,o)|0)|0;i=o;Lv(k,n)|0;Lv(k,180832)|0;n=k+4|0;m=c[n>>2]|0;if(m>>>0<(c[k+8>>2]|0)>>>0){p=m}else{Jv(k,1)|0;p=c[n>>2]|0}c[n>>2]=p+1;a[p]=32;p=g+1024|0;n=c[248+(c[(c[j>>2]|0)+12>>2]<<2)>>2]|0;j=n+4|0;k=c[j>>2]|0;if(k>>>0<(c[n+8>>2]|0)>>>0){q=k}else{Jv(n,1)|0;q=c[j>>2]|0}c[j>>2]=q+1;a[q]=76;nb(p|0,157816,(o=i,i=i+8|0,c[o>>2]=f,o)|0)|0;i=o;Lv(n,p)|0;if((f|0)>0){r=0}else{s=1024;t=0;i=g;return}do{eC(n,+h[e+(r<<4)>>3],+h[e+(r<<4)+8>>3]);r=r+1|0;}while((r|0)<(f|0));s=1024;t=0;i=g;return}function pC(b){b=b|0;var d=0,e=0,f=0,g=0,j=0.0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;d=i;i=i+2192|0;e=d|0;f=d+2176|0;Iv(f,1024,d+1024|0);g=b+16|0;b=c[g>>2]|0;j=+h[b+152>>3];k=14688+(c[b+12>>2]<<3)|0;if(j!=+h[k>>3]){h[k>>3]=j;Lv(f,144824)|0;k=d+2048|0;nb(k|0,141888,(l=i,i=i+8|0,h[l>>3]=+h[(c[g>>2]|0)+152>>3],l)|0)|0;i=l;m=gb(k|0,46)|0;a:do{if((m|0)!=0){n=m;while(1){o=n+1|0;if((a[o]|0)==0){p=n;break}else{n=o}}while(1){n=a[p]|0;if((n<<24>>24|0)==46){break}else if((n<<24>>24|0)!=48){break a}a[p]=0;p=p-1|0}a[p]=0}}while(0);Lv(f,k)|0;k=f+4|0;p=c[k>>2]|0;m=f+8|0;if(p>>>0<(c[m>>2]|0)>>>0){q=p}else{Jv(f,1)|0;q=c[k>>2]|0}c[k>>2]=q+1;a[q]=41;q=c[k>>2]|0;if(q>>>0<(c[m>>2]|0)>>>0){r=q}else{Jv(f,1)|0;r=c[k>>2]|0}a[r]=0;r=c[f>>2]|0;c[k>>2]=r;k=c[248+(c[(c[g>>2]|0)+12>>2]<<2)>>2]|0;q=e|0;m=xF(r|0)|0;nb(q|0,121624,(l=i,i=i+16|0,c[l>>2]=138744,c[l+8>>2]=m,l)|0)|0;i=l;Lv(k,q)|0;Lv(k,r)|0;r=k+4|0;q=c[r>>2]|0;if(q>>>0<(c[k+8>>2]|0)>>>0){s=q}else{Jv(k,1)|0;s=c[r>>2]|0}c[r>>2]=s+1;a[s]=32;t=c[g>>2]|0}else{t=b}b=c[t+160>>2]|0;if((b|0)==0){i=d;return}t=c[b>>2]|0;if((t|0)!=0){s=f+4|0;r=f+8|0;k=f|0;q=e|0;e=b;b=t;do{e=e+4|0;t=a[b]|0;if((t<<24>>24|0)==98){if((Ya(b|0,133480)|0)!=0){u=21}}else if((t<<24>>24|0)==102){if((Ya(b|0,136176)|0)!=0){u=21}}else if((t<<24>>24|0)==115){if((Ya(b|0,131360)|0)!=0){u=21}}else{u=21}if((u|0)==21){u=0;Lv(f,b)|0;t=b;while(1){v=t+1|0;if((a[t]|0)==0){break}else{t=v}}if((a[v]|0)!=0){t=c[s>>2]|0;if(t>>>0<(c[r>>2]|0)>>>0){w=t}else{Jv(f,1)|0;w=c[s>>2]|0}c[s>>2]=w+1;a[w]=40;if((a[v]|0)!=0){t=v;m=0;while(1){if((m|0)!=0){p=c[s>>2]|0;if(p>>>0<(c[r>>2]|0)>>>0){x=p}else{Jv(f,1)|0;x=c[s>>2]|0}c[s>>2]=x+1;a[x]=44}Lv(f,t)|0;p=t;while(1){y=p+1|0;if((a[p]|0)==0){break}else{p=y}}if((a[y]|0)==0){break}else{t=y;m=m+1|0}}}m=c[s>>2]|0;if(m>>>0<(c[r>>2]|0)>>>0){z=m}else{Jv(f,1)|0;z=c[s>>2]|0}c[s>>2]=z+1;a[z]=41}m=c[s>>2]|0;if(m>>>0<(c[r>>2]|0)>>>0){A=m}else{Jv(f,1)|0;A=c[s>>2]|0}a[A]=0;m=c[k>>2]|0;c[s>>2]=m;t=c[248+(c[(c[g>>2]|0)+12>>2]<<2)>>2]|0;p=xF(m|0)|0;nb(q|0,121624,(l=i,i=i+16|0,c[l>>2]=138744,c[l+8>>2]=p,l)|0)|0;i=l;Lv(t,q)|0;Lv(t,m)|0;m=t+4|0;p=c[m>>2]|0;if(p>>>0<(c[t+8>>2]|0)>>>0){B=p}else{Jv(t,1)|0;B=c[m>>2]|0}c[m>>2]=B+1;a[B]=32;}b=c[e>>2]|0;}while((b|0)!=0)}Mv(f);i=d;return}function qC(b,f,j,k){b=b|0;f=f|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0.0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0;l=i;i=i+3120|0;m=l|0;n=l+1024|0;o=l+2048|0;p=l+3072|0;q=l+3088|0;r=b+16|0;b=c[r>>2]|0;s=+(c[b+136>>2]|0)*3.141592653589793/180.0;if((e[(c[43614]|0)+8232>>1]|0)>>>0<14>>>0){t=b+56|0;u=a[t+3|0]|0;v=d[t]|0;w=d[t+1|0]|0;x=d[t+2|0]|0;if(u<<24>>24==-1){nb(180832,150832,(y=i,i=i+24|0,c[y>>2]=v,c[y+8>>2]=w,c[y+16>>2]=x,y)|0)|0;i=y}else{nb(180832,147960,(y=i,i=i+32|0,c[y>>2]=v,c[y+8>>2]=w,c[y+16>>2]=x,c[y+24>>2]=u&255,y)|0)|0;i=y}u=c[248+(c[(c[r>>2]|0)+12>>2]<<2)>>2]|0;x=m|0;m=xF(180832)|0;nb(x|0,121624,(y=i,i=i+16|0,c[y>>2]=128936,c[y+8>>2]=m,y)|0)|0;i=y;Lv(u,x)|0;Lv(u,180832)|0;x=u+4|0;m=c[x>>2]|0;if(m>>>0<(c[u+8>>2]|0)>>>0){z=m}else{Jv(u,1)|0;z=c[x>>2]|0}c[x>>2]=z+1;a[z]=32;i=l;return}Iv(p,1024,o|0);o=(f|0)==2;f=q|0;if(o){rn(j,f,k,s,2);z=p+4|0;x=c[z>>2]|0;if(x>>>0<(c[p+8>>2]|0)>>>0){A=x}else{Jv(p,1)|0;A=c[z>>2]|0}c[z>>2]=A+1;a[A]=91;eC(p,+h[q>>3],+h[q+8>>3]);eC(p,+h[q+16>>3],+h[q+24>>3])}else{rn(j,f,k,0.0,3);B=+h[q+24>>3];C=+h[q>>3];if(s==0.0){D=+h[q+8>>3];E=C;F=D;G=D;H=B*.25}else{D=B*.25;I=D;J=s;s=C+I*+V(J);K=+h[q+8>>3];E=s;F=K+I*+W(J);G=K;H=D}q=p+4|0;k=c[q>>2]|0;if(k>>>0<(c[p+8>>2]|0)>>>0){L=k}else{Jv(p,1)|0;L=c[q>>2]|0}c[q>>2]=L+1;a[L]=40;eC(p,E,F);L=n|0;nb(L|0,107520,(y=i,i=i+8|0,h[y>>3]=H,y)|0)|0;i=y;q=gb(L|0,46)|0;do{if((q|0)==0){M=n+(xF(L|0)|0)|0}else{k=q;while(1){f=k+1|0;if((a[f]|0)==0){N=k;break}else{k=f}}while(1){k=a[N]|0;if((k<<24>>24|0)==46){O=21;break}else if((k<<24>>24|0)!=48){O=22;break}a[N]=0;N=N-1|0}if((O|0)==21){a[N]=0;M=N;break}else if((O|0)==22){M=N+1|0;break}}}while(0);a[M]=32;a[M+1|0]=0;Lv(p,L)|0;eC(p,C,G);nb(L|0,107520,(y=i,i=i+8|0,h[y>>3]=B,y)|0)|0;i=y;M=gb(L|0,46)|0;do{if((M|0)==0){P=n+(xF(L|0)|0)|0}else{N=M;while(1){q=N+1|0;if((a[q]|0)==0){Q=N;break}else{N=q}}while(1){N=a[Q]|0;if((N<<24>>24|0)==46){O=28;break}else if((N<<24>>24|0)!=48){O=29;break}a[Q]=0;Q=Q-1|0}if((O|0)==28){a[Q]=0;P=Q;break}else if((O|0)==29){P=Q+1|0;break}}}while(0);a[P]=32;a[P+1|0]=0;Lv(p,L)|0;}Lv(p,125744)|0;L=b+140|0;B=+g[L>>2];P=b+56|0;if(B>0.0){rC(p,B,P);rC(p,+g[L>>2],b+96|0)}else{rC(p,0.0,P);rC(p,1.0,b+96|0)}Nv(p)|0;b=p+4|0;P=c[b>>2]|0;L=p+8|0;Q=P>>>0>=(c[L>>2]|0)>>>0;if(o){if(Q){Jv(p,1)|0;R=c[b>>2]|0}else{R=P}c[b>>2]=R+1;a[R]=93}else{if(Q){Jv(p,1)|0;S=c[b>>2]|0}else{S=P}c[b>>2]=S+1;a[S]=41}S=c[b>>2]|0;if(S>>>0<(c[L>>2]|0)>>>0){T=S}else{Jv(p,1)|0;T=c[b>>2]|0}a[T]=0;T=c[p>>2]|0;c[b>>2]=T;b=c[248+(c[(c[r>>2]|0)+12>>2]<<2)>>2]|0;r=n|0;n=xF(T|0)|0;nb(r|0,121624,(y=i,i=i+16|0,c[y>>2]=128936,c[y+8>>2]=n,y)|0)|0;i=y;Lv(b,r)|0;Lv(b,T)|0;T=b+4|0;r=c[T>>2]|0;if(r>>>0<(c[b+8>>2]|0)>>>0){U=r}else{Jv(b,1)|0;U=c[T>>2]|0}c[T>>2]=U+1;a[U]=32;Mv(p);i=l;return}function rC(b,e,f){b=b|0;e=+e;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;g=i;i=i+2048|0;j=g|0;k=g+1024|0;l=k|0;nb(l|0,123384,(m=i,i=i+8|0,h[m>>3]=e,m)|0)|0;i=m;n=gb(l|0,46)|0;do{if((n|0)==0){o=k+(xF(l|0)|0)|0}else{p=n;while(1){q=p+1|0;if((a[q]|0)==0){r=p;break}else{p=q}}while(1){p=a[r]|0;if((p<<24>>24|0)==46){s=5;break}else if((p<<24>>24|0)!=48){s=6;break}a[r]=0;r=r-1|0}if((s|0)==5){a[r]=0;o=r;break}else if((s|0)==6){o=r+1|0;break}}}while(0);a[o]=32;a[o+1|0]=0;o=f;f=a[o+3|0]|0;r=d[o]|0;s=d[o+1|0]|0;n=d[o+2|0]|0;if(f<<24>>24==-1){nb(180832,150832,(m=i,i=i+24|0,c[m>>2]=r,c[m+8>>2]=s,c[m+16>>2]=n,m)|0)|0;i=m}else{nb(180832,147960,(m=i,i=i+32|0,c[m>>2]=r,c[m+8>>2]=s,c[m+16>>2]=n,c[m+24>>2]=f&255,m)|0)|0;i=m}f=j|0;j=xF(180832)|0;nb(f|0,121624,(m=i,i=i+16|0,c[m>>2]=l,c[m+8>>2]=j,m)|0)|0;i=m;Lv(b,f)|0;Lv(b,180832)|0;f=b+4|0;m=c[f>>2]|0;if(m>>>0<(c[b+8>>2]|0)>>>0){t=m;u=t+1|0;c[f>>2]=u;a[t]=32;v=1024;w=0;i=g;return}Jv(b,1)|0;t=c[f>>2]|0;u=t+1|0;c[f>>2]=u;a[t]=32;v=1024;w=0;i=g;return}function sC(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=i;d=c[a+16>>2]|0;_z(a,121432)|0;e=c[c[a+12>>2]>>2]|0;f=c[e+4>>2]|0;g=c[e+8>>2]|0;dA(a,120504,(h=i,i=i+24|0,c[h>>2]=c[e>>2],c[h+8>>2]=f,c[h+16>>2]=g,h)|0);i=h;g=$w(c[d+8>>2]|0)|0;dA(a,119856,(h=i,i=i+8|0,c[h>>2]=g,h)|0);i=h;g=da(c[a+168>>2]|0,c[a+164>>2]|0)|0;dA(a,119024,(h=i,i=i+8|0,c[h>>2]=g,h)|0);i=h;_z(a,118192)|0;_z(a,117384)|0;_z(a,116304)|0;_z(a,115360)|0;_z(a,114160)|0;_z(a,113456)|0;_z(a,112904)|0;_z(a,112424)|0;_z(a,111856)|0;i=b;return}function tC(a){a=a|0;_z(a,122640)|0;return}function uC(a){a=a|0;c[53842]=2;return}function vC(a){a=a|0;c[53842]=1;return}function wC(a){a=a|0;c[53842]=2;return}function xC(a){a=a|0;c[53842]=0;return}function yC(a){a=a|0;c[53842]=2;return}function zC(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0.0,m=0.0,n=0,o=0,p=0,q=0.0,r=0.0,s=0.0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;f=i;g=d;d=i;i=i+16|0;c[d>>2]=c[g>>2];c[d+4>>2]=c[g+4>>2];c[d+8>>2]=c[g+8>>2];c[d+12>>2]=c[g+12>>2];g=c[(c[b+16>>2]|0)+16>>2]|0;j=c[53842]|0;k=c[e+4>>2]|0;l=+h[k+16>>3]*+h[b+352>>3];m=(c[b+360>>2]|0)!=0?1.5707963267948966:0.0;n=c[k+8>>2]|0;if((n|0)==0){o=-1}else{o=c[n+20>>2]|0}n=a[e+48|0]|0;if((n|0)==108){p=0}else if((n|0)==114){p=2}else{p=1}q=+h[d>>3];if(q<0.0){r=q+-.5}else{r=q+.5}n=~~r;r=+h[d+8>>3];if(r<0.0){s=r+-.5}else{s=r+.5}d=~~s;k=c[e>>2]|0;e=c[44766]|0;if((e|0)==0){c[44764]=64;t=dF(64)|0;c[44766]=t;u=t}else{u=e}e=a[k]|0;if(e<<24>>24==0){v=u}else{t=0;w=u;u=k;k=e;while(1){e=u+1|0;x=c[44764]|0;if((t|0)>(x-8|0)){y=x<<1;c[44764]=y;x=gF(c[44766]|0,y)|0;c[44766]=x;z=x+t|0}else{z=w}if(k<<24>>24>-1){if(k<<24>>24==92){a[z]=92;A=z+1|0;B=t+1|0}else{A=z;B=t}a[A]=k;C=A+1|0;D=B+1|0}else{a[z]=92;nb(z+1|0,124960,(E=i,i=i+8|0,c[E>>2]=k&255,E)|0)|0;i=E;C=z+4|0;D=t+4|0}x=a[e]|0;if(x<<24>>24==0){v=C;break}else{t=D;w=C;u=e;k=x}}}a[v]=0;v=c[44766]|0;dA(b,127968,(E=i,i=i+112|0,c[E>>2]=4,c[E+8>>2]=p,c[E+16>>2]=g,c[E+24>>2]=j,c[E+32>>2]=0,c[E+40>>2]=o,h[E+48>>3]=l,h[E+56>>3]=m,c[E+64>>2]=6,h[E+72>>3]=0.0,h[E+80>>3]=0.0,c[E+88>>2]=n,c[E+96>>2]=d,c[E+104>>2]=v,E)|0);i=E;i=f;return}function AC(e,f){e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;g=i;h=f+32|0;j=c[h>>2]|0;if((j|0)==5){k=c[f>>2]|0;l=a[k]|0;m=0;n=122104;while(1){if((a[n]|0)==l<<24>>24){if((Ya(n|0,k|0)|0)==0){break}}o=m+1|0;if((o|0)==8){p=17;break}else{m=o;n=c[25944+(o<<2)>>2]|0}}if((p|0)==17){c[h>>2]=6;i=g;return}c[f>>2]=m;c[h>>2]=6;i=g;return}else if((j|0)==1){j=f;m=f;n=a[m]|0;k=n&255;l=j+1|0;o=a[l]|0;q=o&255;r=j+2|0;j=a[r]|0;s=j&255;t=c[44768]|0;do{if((t|0)>0){u=-1;v=0;w=195075;while(1){x=(b[179080+(v<<1)>>1]|0)-k|0;y=(b[179592+(v<<1)>>1]|0)-q|0;z=(b[180104+(v<<1)>>1]|0)-s|0;A=(da(y,y)|0)+(da(x,x)|0)+(da(z,z)|0)|0;if((A|0)<(w|0)){if((A|0)==0){B=v;break}else{C=A;D=v}}else{C=w;D=u}E=v+1|0;if((E|0)<(t|0)){u=D;v=E;w=C}else{p=12;break}}if((p|0)==12){c[44768]=t+1;if((t|0)==256){B=D}else{F=E;p=14;break}}G=B+32|0}else{c[44768]=t+1;F=0;p=14}}while(0);if((p|0)==14){b[179080+(F<<1)>>1]=n&255;b[179592+(F<<1)>>1]=o&255;b[180104+(F<<1)>>1]=j&255;j=F+32|0;F=d[m]|0;m=d[l]|0;l=d[r]|0;dA(e,132936,(e=i,i=i+40|0,c[e>>2]=0,c[e+8>>2]=j,c[e+16>>2]=F,c[e+24>>2]=m,c[e+32>>2]=l,e)|0);i=e;G=j}c[f>>2]=G;c[h>>2]=6;i=g;return}else{cc(130760,147224,165,170632)}}function BC(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0.0,o=0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0;e=i;f=c[a+16>>2]|0;g=~~+h[f+152>>3];j=c[f+16>>2]|0;k=c[f+56>>2]|0;l=c[53842]|0;m=(d|0)!=0?20:-1;d=c[f+144>>2]|0;if((d|0)==1){n=10.0;o=1}else if((d|0)==2){n=10.0;o=2}else{n=0.0;o=0}p=+h[b>>3];if(p<0.0){q=p+-.5}else{q=p+.5}d=~~q;q=+h[b+8>>3];if(q<0.0){r=q+-.5}else{r=q+.5}f=~~r;r=+h[b+16>>3];s=r-p;if(s<0.0){t=s+-.5}else{t=s+.5}s=+h[b+24>>3];p=s-q;if(p<0.0){u=p+-.5}else{u=p+.5}if(r<0.0){v=r+-.5}else{v=r+.5}if(s<0.0){w=s+-.5}else{w=s+.5}dA(a,135256,(a=i,i=i+160|0,c[a>>2]=1,c[a+8>>2]=1,c[a+16>>2]=o,c[a+24>>2]=g,c[a+32>>2]=j,c[a+40>>2]=k,c[a+48>>2]=l,c[a+56>>2]=0,c[a+64>>2]=m,h[a+72>>3]=n,c[a+80>>2]=0,h[a+88>>3]=0.0,c[a+96>>2]=d,c[a+104>>2]=f,c[a+112>>2]=~~t,c[a+120>>2]=~~u,c[a+128>>2]=d,c[a+136>>2]=f,c[a+144>>2]=~~v,c[a+152>>2]=~~w,a)|0);i=a;i=e;return}function CC(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0.0,q=0;f=i;g=c[a+16>>2]|0;j=~~+h[g+152>>3];k=c[g+16>>2]|0;l=c[g+56>>2]|0;m=c[53842]|0;n=(e|0)!=0?20:-1;e=d+1|0;o=c[g+144>>2]|0;if((o|0)==1){p=10.0;q=1}else if((o|0)==2){p=10.0;q=2}else{p=0.0;q=0}dA(a,162144,(o=i,i=i+128|0,c[o>>2]=2,c[o+8>>2]=3,c[o+16>>2]=q,c[o+24>>2]=j,c[o+32>>2]=k,c[o+40>>2]=l,c[o+48>>2]=m,c[o+56>>2]=0,c[o+64>>2]=n,h[o+72>>3]=p,c[o+80>>2]=0,c[o+88>>2]=0,c[o+96>>2]=0,c[o+104>>2]=0,c[o+112>>2]=0,c[o+120>>2]=e,o)|0);i=o;GC(a,b,d,1);i=f;return}function DC(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0,s=0,t=0,u=0,v=0.0,w=0.0,x=0.0,y=0.0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0.0,K=0.0,L=0,M=0,N=0;f=i;i=i+80|0;e=f|0;j=f+64|0;k=c[a+16>>2]|0;l=~~+h[k+152>>3];m=c[k+16>>2]|0;n=c[53842]|0;if((d|0)<=3){cc(150216,147224,356,170656)}o=dF((d*140|0)+140|0)|0;p=c[k+144>>2]|0;if((p|0)==2){q=10.0;r=2}else if((p|0)==1){q=10.0;r=1}else{q=0.0;r=0}if((g|0)==0){s=4;t=0;u=-1}else{s=5;t=c[k+56>>2]|0;u=20}v=+h[b>>3];k=e+48|0;h[k>>3]=v;w=+h[b+8>>3];g=e+56|0;h[g>>3]=w;if(v<0.0){x=v+-.5}else{x=v+.5}if(w<0.0){y=w+-.5}else{y=w+.5}p=nb(o|0,158264,(z=i,i=i+16|0,c[z>>2]=~~x,c[z+8>>2]=~~y,z)|0)|0;i=z;A=e|0;B=e;C=k;k=j|0;D=j+8|0;E=0;F=1;G=o+p|0;p=3;while(1){c[B>>2]=c[C>>2];c[B+4>>2]=c[C+4>>2];c[B+8>>2]=c[C+8>>2];c[B+12>>2]=c[C+12>>2];H=E+1|0;h[e+16>>3]=+h[b+(H<<4)>>3];h[e+24>>3]=+h[b+(H<<4)+8>>3];H=E+2|0;h[e+32>>3]=+h[b+(H<<4)>>3];h[e+40>>3]=+h[b+(H<<4)+8>>3];H=E+3|0;h[e+48>>3]=+h[b+(H<<4)>>3];h[g>>3]=+h[b+(H<<4)+8>>3];H=1;I=G;do{Qm(j,A,3,+(H|0)/6.0,0,0);y=+h[k>>3];x=+h[D>>3];if(y<0.0){J=y+-.5}else{J=y+.5}if(x<0.0){K=x+-.5}else{K=x+.5}L=nb(I|0,158264,(z=i,i=i+16|0,c[z>>2]=~~J,c[z+8>>2]=~~K,z)|0)|0;i=z;I=I+L|0;H=H+1|0;}while((H|0)<7);M=F+6|0;H=p+3|0;if((H|0)<(d|0)){E=p;F=M;G=I;p=H}else{break}}dA(a,144016,(z=i,i=i+112|0,c[z>>2]=3,c[z+8>>2]=s,c[z+16>>2]=r,c[z+24>>2]=l,c[z+32>>2]=m,c[z+40>>2]=t,c[z+48>>2]=n,c[z+56>>2]=0,c[z+64>>2]=u,h[z+72>>3]=q,c[z+80>>2]=0,c[z+88>>2]=0,c[z+96>>2]=0,c[z+104>>2]=M,z)|0);i=z;dA(a,140952,(z=i,i=i+8|0,c[z>>2]=o,z)|0);i=z;eF(o);if((M|0)<=0){N=_z(a,153232)|0;i=f;return}o=F+5|0;F=0;do{dA(a,138080,(z=i,i=i+8|0,c[z>>2]=((F|0)%(o|0)|0|0)!=0,z)|0);i=z;F=F+1|0;}while((F|0)<(M|0));N=_z(a,153232)|0;i=f;return}function EC(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0.0,n=0,o=0,p=0,q=0.0,r=0.0;e=i;f=c[a+16>>2]|0;g=~~+h[f+152>>3];j=c[f+16>>2]|0;k=c[53842]|0;l=c[f+144>>2]|0;if((l|0)==1){m=10.0;n=1}else if((l|0)==2){m=10.0;n=2}else{m=0.0;n=0}dA(a,162144,(l=i,i=i+128|0,c[l>>2]=2,c[l+8>>2]=1,c[l+16>>2]=n,c[l+24>>2]=g,c[l+32>>2]=j,c[l+40>>2]=0,c[l+48>>2]=k,c[l+56>>2]=0,c[l+64>>2]=0,h[l+72>>3]=m,c[l+80>>2]=0,c[l+88>>2]=0,c[l+96>>2]=0,c[l+104>>2]=0,c[l+112>>2]=0,c[l+120>>2]=d,l)|0);i=l;if((d|0)>0){o=0}else{p=_z(a,153232)|0;i=e;return}do{m=+h[b+(o<<4)>>3];if(m<0.0){q=m+-.5}else{q=m+.5}m=+h[b+(o<<4)+8>>3];if(m<0.0){r=m+-.5}else{r=m+.5}dA(a,158264,(l=i,i=i+16|0,c[l>>2]=~~q,c[l+8>>2]=~~r,l)|0);i=l;o=o+1|0;}while((o|0)<(d|0));p=_z(a,153232)|0;i=e;return}function FC(a,b){a=a|0;b=b|0;var d=0;d=i;dA(a,166272,(a=i,i=i+8|0,c[a>>2]=b,a)|0);i=a;i=d;return}function GC(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0.0,k=0.0,l=0.0,m=0,n=0,o=0.0,p=0.0;f=i;if((d|0)>0){g=0;do{j=+h[b+(g<<4)>>3];if(j<0.0){k=j+-.5}else{k=j+.5}j=+h[b+(g<<4)+8>>3];if(j<0.0){l=j+-.5}else{l=j+.5}dA(a,158264,(m=i,i=i+16|0,c[m>>2]=~~k,c[m+8>>2]=~~l,m)|0);i=m;g=g+1|0;}while((g|0)<(d|0))}if((e|0)==0){n=_z(a,153232)|0;i=f;return}l=+h[b>>3];if(l<0.0){o=l+-.5}else{o=l+.5}l=+h[b+8>>3];if(l<0.0){p=l+-.5}else{p=l+.5}dA(a,158264,(m=i,i=i+16|0,c[m>>2]=~~o,c[m+8>>2]=~~p,m)|0);i=m;n=_z(a,153232)|0;i=f;return}function HC(b){b=b|0;var d=0,e=0,f=0,g=0;d=c[b+16>>2]|0;e=c[b+64>>2]|0;if((e|0)==0){_z(b,116088)|0;f=d+208|0;g=c[f>>2]|0;if((g|0)==0){return}if((a[g]|0)==0){return}_z(b,114904)|0;_z(b,gk(c[f>>2]|0)|0)|0;_z(b,164480)|0;return}else if((e|0)==3){f=gk($w(c[d+8>>2]|0)|0)|0;_z(b,113328)|0;_z(b,f)|0;_z(b,112792)|0;_z(b,f)|0;_z(b,117936)|0;return}else if((e|0)==1){e=d+208|0;f=c[e>>2]|0;if((f|0)==0){return}if((a[f]|0)==0){return}_z(b,114904)|0;_z(b,gk(c[e>>2]|0)|0)|0;_z(b,114024)|0;_z(b,gk($w(c[d+8>>2]|0)|0)|0)|0;_z(b,164480)|0;return}else{return}}function IC(a){a=a|0;var b=0,d=0;b=c[a+16>>2]|0;d=c[a+64>>2]|0;if((d|0)==3){KC(a,c[b+264>>2]|0,c[b+272>>2]|0,c[b+268>>2]|0,c[b+208>>2]|0,c[b+228>>2]|0,c[b+244>>2]|0,c[b+212>>2]|0);_z(a,117232)|0;return}else if((d|0)==2){KC(a,c[b+264>>2]|0,c[b+272>>2]|0,c[b+268>>2]|0,c[b+208>>2]|0,c[b+228>>2]|0,c[b+244>>2]|0,c[b+212>>2]|0);return}else{return}}function JC(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;g=c[a+16>>2]|0;KC(a,c[g+264>>2]|0,c[g+272>>2]|0,c[g+268>>2]|0,b,d,e,f);return}function KC(b,d,e,f,g,j,k,l){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;j=j|0;k=k|0;l=l|0;var m=0,n=0,o=0,p=0.0,q=0.0,r=0.0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;m=i;if((e|0)==0|(f|0)==0){i=m;return}if((c[44374]|0)<(f|0)){n=f+10|0;c[44374]=n;c[44376]=gF(c[44376]|0,n<<3)|0}n=(f|0)>0;if(n){o=0;do{p=+h[e+(o<<4)>>3];if(p<0.0){q=p+-.5}else{q=p+.5}c[(c[44376]|0)+(o<<3)>>2]=~~q;p=+h[e+(o<<4)+8>>3];if(p<0.0){r=p+-.5}else{r=p+.5}c[(c[44376]|0)+(o<<3)+4>>2]=~~r;o=o+1|0;}while((o|0)<(f|0))}o=b+64|0;e=c[o>>2]|0;s=(g|0)==0;do{if(!((e|0)!=0|s)){if((a[g]|0)==0){break}if((d|0)==2){dA(b,78672,(t=i,i=i+8|0,c[t>>2]=g,t)|0);i=t;if(n){u=0;do{v=c[44376]|0;w=c[v+(u<<3)+4>>2]|0;dA(b,168600,(t=i,i=i+16|0,c[t>>2]=c[v+(u<<3)>>2],c[t+8>>2]=w,t)|0);i=t;u=u+1|0;}while((u|0)<(f|0))}_z(b,164480)|0;i=m;return}else if((d|0)==1){u=c[44376]|0;w=c[u>>2]|0;v=c[u+4>>2]|0;x=(c[u+8>>2]|0)-w|0;dA(b,83016,(t=i,i=i+32|0,c[t>>2]=g,c[t+8>>2]=w,c[t+16>>2]=v,c[t+24>>2]=x,t)|0);i=t;i=m;return}else if((d|0)==0){x=c[44376]|0;v=c[x>>2]|0;w=c[x+12>>2]|0;u=c[x+8>>2]|0;y=c[x+4>>2]|0;dA(b,87896,(t=i,i=i+40|0,c[t>>2]=g,c[t+8>>2]=v,c[t+16>>2]=w,c[t+24>>2]=u,c[t+32>>2]=y,t)|0);i=t;i=m;return}else{cc(160496,156352,65,170312)}}}while(0);do{if(!((e|0)!=1|s)){if((a[g]|0)==0){break}if((d|0)!=0){cc(160496,156352,77,170312)}n=c[44376]|0;y=c[n+12>>2]|0;u=c[n+8>>2]|0;w=c[n+4>>2]|0;dA(b,151872,(t=i,i=i+48|0,c[t>>2]=c[n>>2],c[t+8>>2]=y,c[t+16>>2]=u,c[t+24>>2]=w,c[t+32>>2]=g,c[t+40>>2]=j,t)|0);i=t;i=m;return}}while(0);if((e-2|0)>>>0>=2>>>0){i=m;return}if((d|0)==2){_z(b,142952)|0}else if((d|0)==1){_z(b,149056)|0}else if((d|0)==0){_z(b,145920)|0}else{cc(160496,156352,93,170312)}do{if((l|0)!=0){if((a[l]|0)==0){break}_z(b,139840)|0;_z(b,ik(l)|0)|0;_z(b,137160)|0}}while(0);do{if(!s){if((a[g]|0)==0){break}_z(b,134264)|0;_z(b,ik(g)|0)|0;_z(b,137160)|0}}while(0);do{if((k|0)!=0){if((a[k]|0)==0){break}_z(b,132288)|0;_z(b,gk(k)|0)|0;_z(b,137160)|0}}while(0);do{if((j|0)!=0){if((a[j]|0)==0){break}_z(b,129944)|0;_z(b,gk(j)|0)|0;_z(b,137160)|0}}while(0);_z(b,126808)|0;_z(b,124240)|0;do{if((d|0)==0){j=c[44376]|0;k=c[j+12>>2]|0;g=c[j+8>>2]|0;s=c[j+4>>2]|0;dA(b,121200,(t=i,i=i+32|0,c[t>>2]=c[j>>2],c[t+8>>2]=k,c[t+16>>2]=g,c[t+24>>2]=s,t)|0);i=t}else if((d|0)==2){s=c[44376]|0;g=c[s+4>>2]|0;dA(b,120328,(t=i,i=i+16|0,c[t>>2]=c[s>>2],c[t+8>>2]=g,t)|0);i=t;if((f|0)>1){z=1}else{break}do{g=c[44376]|0;s=c[g+(z<<3)+4>>2]|0;dA(b,119600,(t=i,i=i+16|0,c[t>>2]=c[g+(z<<3)>>2],c[t+8>>2]=s,t)|0);i=t;z=z+1|0;}while((z|0)<(f|0))}else if((d|0)==1){s=c[44376]|0;g=c[s>>2]|0;k=c[s+4>>2]|0;j=(c[s+8>>2]|0)-g|0;dA(b,122008,(t=i,i=i+24|0,c[t>>2]=g,c[t+8>>2]=k,c[t+16>>2]=j,t)|0);i=t}}while(0);if((c[o>>2]|0)==3){_z(b,118832)|0;i=m;return}else{_z(b,117936)|0;i=m;return}}function LC(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;_z(a,132568)|0;if((c[a+64>>2]|0)==2){_z(a,132408)|0}else{_z(a,136984)|0}d=c[c[a+12>>2]>>2]|0;e=c[d+4>>2]|0;f=c[d+8>>2]|0;dA(a,132168,(a=i,i=i+24|0,c[a>>2]=c[d>>2],c[a+8>>2]=e,c[a+16>>2]=f,a)|0);i=a;i=b;return}function MC(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0;b=i;_z(a,133184)|0;d=a+64|0;e=a+12|0;if((c[d>>2]|0)!=2){dA(a,133040,(f=i,i=i+8|0,c[f>>2]=c[(c[e>>2]|0)+28>>2],f)|0);i=f}if((c[(c[e>>2]|0)+20>>2]|0)!=0){g=_z(a,132856)|0;h=_z(a,132728)|0;i=b;return}if((c[d>>2]|0)==2){g=_z(a,132856)|0;h=_z(a,132728)|0;i=b;return}d=c[a+476>>2]|0;e=c[a+480>>2]|0;j=c[a+484>>2]|0;dA(a,99424,(f=i,i=i+32|0,c[f>>2]=c[a+472>>2],c[f+8>>2]=d,c[f+16>>2]=e,c[f+24>>2]=j,f)|0);i=f;g=_z(a,132856)|0;h=_z(a,132728)|0;i=b;return}function NC(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;d=i;i=i+8|0;e=d|0;f=c[b+16>>2]|0;a[11864]=0;g=b+12|0;h=f+8|0;do{if((c[(c[g>>2]|0)+28>>2]|0)==0){j=$w(c[h>>2]|0)|0;dA(b,101240,(k=i,i=i+8|0,c[k>>2]=j,k)|0);i=k;j=b+64|0;if((c[j>>2]|0)==2){_z(b,100376)|0}else{_z(b,100784)|0}do{if((c[(c[g>>2]|0)+20>>2]|0)==0){if((c[j>>2]|0)==2){l=c[b+460>>2]|0;m=c[b+464>>2]|0;n=c[b+468>>2]|0;dA(b,99424,(k=i,i=i+32|0,c[k>>2]=c[b+456>>2],c[k+8>>2]=l,c[k+16>>2]=m,c[k+24>>2]=n,k)|0);i=k;break}else{_z(b,99824)|0;break}}}while(0);_z(b,99008)|0;al(b,c[(c[g>>2]|0)+24>>2]|0,12448);cl(b);j=c[(c[g>>2]|0)+20>>2]|0;if((j|0)==0){break}n=e|0;c[n>>2]=c[j>>2];c[e+4>>2]=0;al(b,0,n)}}while(0);c[44678]=(a[(c[(c[h>>2]|0)+8>>2]|0)+115|0]|0)==1;if(!(a[11864]|0)){_z(b,98584)|0;a[11864]=1}h=c[f+208>>2]|0;if((h|0)==0){i=d;return}dA(b,97984,(k=i,i=i+8|0,c[k>>2]=h,k)|0);i=k;i=d;return}function OC(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;b=i;dA(a,101960,(a=i,i=i+16|0,c[a>>2]=d,c[a+8>>2]=e,a)|0);i=a;i=b;return}function PC(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0.0,q=0.0,r=0.0;b=i;d=c[a+456>>2]|0;e=c[a+460>>2]|0;f=c[a+464>>2]|0;g=c[a+468>>2]|0;j=a+12|0;k=(c[(c[j>>2]|0)+28>>2]|0)+1|0;dA(a,108832,(l=i,i=i+16|0,c[l>>2]=k,c[l+8>>2]=k,l)|0);i=l;if((c[(c[j>>2]|0)+20>>2]|0)==0){dA(a,107856,(l=i,i=i+32|0,c[l>>2]=d,c[l+8>>2]=e,c[l+16>>2]=f,c[l+24>>2]=g,l)|0);i=l}k=a+360|0;dA(a,107112,(l=i,i=i+8|0,c[l>>2]=(c[k>>2]|0)!=0?106440:106024,l)|0);i=l;m=a+64|0;if((c[m>>2]|0)==1){dA(a,105504,(l=i,i=i+16|0,c[l>>2]=f,c[l+8>>2]=g,l)|0);i=l}n=c[a+200>>2]|0;o=c[a+204>>2]|0;dA(a,105112,(l=i,i=i+24|0,c[l>>2]=c[a+196>>2],c[l+8>>2]=n,c[l+16>>2]=o,l)|0);i=l;if((c[(c[j>>2]|0)+20>>2]|0)==0){dA(a,104664,(l=i,i=i+32|0,c[l>>2]=d,c[l+8>>2]=e,c[l+16>>2]=f-d,c[l+24>>2]=g-e,l)|0);i=l}p=+h[a+496>>3];o=c[k>>2]|0;q=+h[a+504>>3];r=+h[a+512>>3];dA(a,104176,(l=i,i=i+40|0,h[l>>3]=+h[a+488>>3],h[l+8>>3]=p,c[l+16>>2]=o,h[l+24>>3]=q,h[l+32>>3]=r,l)|0);i=l;if((c[m>>2]|0)!=1){i=b;return}if((f|0)>14399|(g|0)>14399){Dc[c[(c[j>>2]|0)+16>>2]&63](103504,(l=i,i=i+24|0,c[l>>2]=f,c[l+8>>2]=g,c[l+16>>2]=14400,l)|0);i=l}dA(a,102872,(l=i,i=i+32|0,c[l>>2]=d,c[l+8>>2]=e,c[l+16>>2]=f,c[l+24>>2]=g,l)|0);i=l;i=b;return}function QC(a){a=a|0;var b=0,d=0;b=i;d=a+12|0;if((c[(c[d>>2]|0)+20>>2]|0)!=0){_z(a,111704)|0;al(a,0,(c[(c[d>>2]|0)+20>>2]|0)+4|0)}_z(a,111072)|0;_z(a,110400)|0;dA(a,109656,(a=i,i=i+8|0,c[a>>2]=c[(c[d>>2]|0)+28>>2],a)|0);i=a;i=b;return}function RC(a){a=a|0;var b=0,d=0,e=0;b=i;d=$w(c[(c[a+16>>2]|0)+8>>2]|0)|0;dA(a,112328,(e=i,i=i+8|0,c[e>>2]=d,e)|0);i=e;_z(a,112784)|0;i=b;return}function SC(a){a=a|0;_z(a,113304)|0;return}function TC(a){a=a|0;_z(a,112784)|0;return}function UC(a){a=a|0;_z(a,113304)|0;return}function VC(a){a=a|0;_z(a,112784)|0;return}function WC(a){a=a|0;_z(a,113304)|0;return}function XC(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;f=i;if((b|0)==0){i=f;return}e=(c[a+16>>2]|0)+272|0;if((c[e>>2]|0)==0){i=f;return}_z(a,116072)|0;gA(a,c[e>>2]|0,2);_z(a,114760)|0;e=dl(b,c[44678]|0)|0;dA(a,113928,(a=i,i=i+8|0,c[a>>2]=e,a)|0);i=a;i=f;return}function YC(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0.0,m=0.0,n=0,o=0,p=0;f=i;g=d;d=i;i=i+16|0;c[d>>2]=c[g>>2];c[d+4>>2]=c[g+4>>2];c[d+8>>2]=c[g+8>>2];c[d+12>>2]=c[g+12>>2];g=c[b+16>>2]|0;if(+h[g+40>>3]<.5){i=f;return}j=c[g+4>>2]|0;if((j|0)==0|(j|0)==1){k=155304}else if((j|0)==2){k=151736}else if((j|0)==3){k=148880}else{k=145744}l=+h[g+24>>3];m=+h[g+32>>3];dA(b,142720,(j=i,i=i+32|0,h[j>>3]=+h[g+16>>3],h[j+8>>3]=l,h[j+16>>3]=m,c[j+24>>2]=k,j)|0);i=j;k=e+4|0;eA(b,+h[(c[k>>2]|0)+16>>3]);dA(b,118808,(j=i,i=i+8|0,c[j>>2]=c[c[k>>2]>>2],j)|0);i=j;k=dl(c[e>>2]|0,c[44678]|0)|0;g=a[e+48|0]|0;if((g|0)==114){n=e+32|0;o=d|0;h[o>>3]=+h[o>>3]- +h[n>>3];p=n}else if((g|0)==108){p=e+32|0}else{g=e+32|0;n=d|0;h[n>>3]=+h[n>>3]- +h[g>>3]*.5;p=g}g=d+8|0;h[g>>3]=+h[e+24>>3]+ +h[g>>3];fA(b,d);_z(b,117912)|0;eA(b,+h[p>>3]);dA(b,117208,(j=i,i=i+8|0,c[j>>2]=k,j)|0);i=j;i=f;return}function ZC(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0.0,n=0.0,o=0,p=0;e=i;i=i+32|0;f=e|0;g=f|0;j=f;k=b;c[j>>2]=c[k>>2];c[j+4>>2]=c[k+4>>2];c[j+8>>2]=c[k+8>>2];c[j+12>>2]=c[k+12>>2];h[f+16>>3]=+h[b+16>>3]- +h[b>>3];h[f+24>>3]=+h[b+24>>3]- +h[b+8>>3];b=a+16|0;do{if((d|0)!=0){f=c[b>>2]|0;if(+h[f+80>>3]<=.5){break}k=c[f+4>>2]|0;if((k|0)==3){l=148880}else if((k|0)==0|(k|0)==1){l=155304}else if((k|0)==2){l=151736}else{l=145744}m=+h[f+64>>3];n=+h[f+72>>3];dA(a,142720,(o=i,i=i+32|0,h[o>>3]=+h[f+56>>3],h[o+8>>3]=m,h[o+16>>3]=n,c[o+24>>2]=l,o)|0);i=o;gA(a,g,2);_z(a,120296)|0}}while(0);if(+h[(c[b>>2]|0)+40>>3]<=.5){i=e;return}dD(a);l=c[b>>2]|0;b=c[l+4>>2]|0;if((b|0)==0|(b|0)==1){p=155304}else if((b|0)==2){p=151736}else if((b|0)==3){p=148880}else{p=145744}n=+h[l+24>>3];m=+h[l+32>>3];dA(a,142720,(o=i,i=i+32|0,h[o>>3]=+h[l+16>>3],h[o+8>>3]=n,h[o+16>>3]=m,c[o+24>>2]=p,o)|0);i=o;gA(a,g,2);_z(a,119568)|0;i=e;return}function _C(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0.0,n=0.0,o=0,p=0;f=i;g=a+16|0;do{if((e|0)!=0){j=c[g>>2]|0;if(+h[j+80>>3]<=.5){break}k=c[j+4>>2]|0;if((k|0)==0|(k|0)==1){l=155304}else if((k|0)==3){l=148880}else if((k|0)==2){l=151736}else{l=145744}m=+h[j+64>>3];n=+h[j+72>>3];dA(a,142720,(o=i,i=i+32|0,h[o>>3]=+h[j+56>>3],h[o+8>>3]=m,h[o+16>>3]=n,c[o+24>>2]=l,o)|0);i=o;_z(a,134072)|0;fA(a,b);_z(a,132112)|0;if((d|0)>1){j=1;do{fA(a,b+(j<<4)|0);_z(a,129864)|0;j=j+1|0;}while((j|0)<(d|0))}_z(a,121960)|0}}while(0);if(+h[(c[g>>2]|0)+40>>3]<=.5){i=f;return}dD(a);l=c[g>>2]|0;g=c[l+4>>2]|0;if((g|0)==3){p=148880}else if((g|0)==0|(g|0)==1){p=155304}else if((g|0)==2){p=151736}else{p=145744}n=+h[l+24>>3];m=+h[l+32>>3];dA(a,142720,(o=i,i=i+32|0,h[o>>3]=+h[l+16>>3],h[o+8>>3]=n,h[o+16>>3]=m,c[o+24>>2]=p,o)|0);i=o;_z(a,134072)|0;fA(a,b);_z(a,132112)|0;if((d|0)>1){o=1;do{fA(a,b+(o<<4)|0);_z(a,129864)|0;o=o+1|0;}while((o|0)<(d|0))}_z(a,121168)|0;i=f;return}function $C(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0.0,n=0.0,o=0,p=0;f=i;e=a+16|0;do{if((g|0)!=0){j=c[e>>2]|0;if(+h[j+80>>3]<=.5){break}k=c[j+4>>2]|0;if((k|0)==3){l=148880}else if((k|0)==0|(k|0)==1){l=155304}else if((k|0)==2){l=151736}else{l=145744}m=+h[j+64>>3];n=+h[j+72>>3];dA(a,142720,(o=i,i=i+32|0,h[o>>3]=+h[j+56>>3],h[o+8>>3]=m,h[o+16>>3]=n,c[o+24>>2]=l,o)|0);i=o;_z(a,134072)|0;fA(a,b);_z(a,132112)|0;if((d|0)>1){j=1;do{gA(a,b+(j<<4)|0,3);_z(a,124072)|0;j=j+3|0;}while((j|0)<(d|0))}_z(a,121960)|0}}while(0);if(+h[(c[e>>2]|0)+40>>3]<=.5){i=f;return}dD(a);l=c[e>>2]|0;e=c[l+4>>2]|0;if((e|0)==0|(e|0)==1){p=155304}else if((e|0)==3){p=148880}else if((e|0)==2){p=151736}else{p=145744}n=+h[l+24>>3];m=+h[l+32>>3];dA(a,142720,(o=i,i=i+32|0,h[o>>3]=+h[l+16>>3],h[o+8>>3]=n,h[o+16>>3]=m,c[o+24>>2]=p,o)|0);i=o;_z(a,134072)|0;fA(a,b);_z(a,132112)|0;if((d|0)>1){o=1;do{gA(a,b+(o<<4)|0,3);_z(a,124072)|0;o=o+3|0;}while((o|0)<(d|0))}_z(a,126584)|0;i=f;return}function aD(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0.0,l=0.0;e=i;f=a+16|0;if(+h[(c[f>>2]|0)+40>>3]<=.5){i=e;return}dD(a);g=c[f>>2]|0;f=c[g+4>>2]|0;if((f|0)==0|(f|0)==1){j=155304}else if((f|0)==2){j=151736}else if((f|0)==3){j=148880}else{j=145744}k=+h[g+24>>3];l=+h[g+32>>3];dA(a,142720,(f=i,i=i+32|0,h[f>>3]=+h[g+16>>3],h[f+8>>3]=k,h[f+16>>3]=l,c[f+24>>2]=j,f)|0);i=f;_z(a,134072)|0;fA(a,b);_z(a,132112)|0;if((d|0)>1){f=1;do{fA(a,b+(f<<4)|0);_z(a,129864)|0;f=f+1|0;}while((f|0)<(d|0))}_z(a,126584)|0;i=e;return}function bD(a,b){a=a|0;b=b|0;_z(a,139632)|0;_z(a,b)|0;_z(a,136984)|0;return}function cD(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0.0,o=0.0,p=0,q=0;g=i;j=a+16|0;do{if((f|0)!=0){k=c[j>>2]|0;if(+h[k+80>>3]<=.5){break}l=c[k+4>>2]|0;if((l|0)==3){m=148880}else if((l|0)==2){m=151736}else if((l|0)==0|(l|0)==1){m=155304}else{m=145744}n=+h[k+64>>3];o=+h[k+72>>3];dA(a,142720,(p=i,i=i+32|0,h[p>>3]=+h[k+56>>3],h[p+8>>3]=n,h[p+16>>3]=o,c[p+24>>2]=m,p)|0);i=p;_z(a,109360)|0;gA(a,d,e);_z(a,103496)|0;fA(a,d);dA(a,97968,(p=i,i=i+16|0,c[p>>2]=e,c[p+8>>2]=b,p)|0);i=p}}while(0);if(+h[(c[j>>2]|0)+40>>3]<=.5){i=g;return}dD(a);m=c[j>>2]|0;j=c[m+4>>2]|0;if((j|0)==3){q=148880}else if((j|0)==0|(j|0)==1){q=155304}else if((j|0)==2){q=151736}else{q=145744}o=+h[m+24>>3];n=+h[m+32>>3];dA(a,142720,(p=i,i=i+32|0,h[p>>3]=+h[m+16>>3],h[p+8>>3]=o,h[p+16>>3]=n,c[p+24>>2]=q,p)|0);i=p;_z(a,109360)|0;gA(a,d,e);_z(a,103496)|0;fA(a,d);dA(a,92464,(p=i,i=i+16|0,c[p>>2]=e,c[p+8>>2]=b,p)|0);i=p;i=g;return}function dD(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;d=i;e=b+16|0;f=c[e>>2]|0;g=c[f+160>>2]|0;eA(b,+h[f+152>>3]);_z(b,87088)|0;if((g|0)==0){i=d;return}else{j=g}while(1){g=j+4|0;f=c[j>>2]|0;if((f|0)==0){break}if((Ya(f|0,82336)|0)==0){j=g;continue}else{k=f}while(1){l=k+1|0;if((a[k]|0)==0){break}else{k=l}}if((a[l]|0)!=0){m=l;while(1){dA(b,168384,(n=i,i=i+8|0,c[n>>2]=m,n)|0);i=n;o=m;while(1){p=o+1|0;if((a[o]|0)==0){break}else{o=p}}if((a[p]|0)==0){break}else{m=p}}}if((Ya(f|0,164240)|0)==0){h[(c[e>>2]|0)+152>>3]=0.0}dA(b,160288,(n=i,i=i+8|0,c[n>>2]=f,n)|0);i=n;j=g}i=d;return}
-
-
-
-function fq(d,e){d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;f=e+8|0;g=(c[f>>2]|0)+157|0;if((a[g]|0)!=0){return}a[g]=1;a[(c[f>>2]|0)+158|0]=1;g=mw(d,e)|0;if((g|0)!=0){e=g;while(1){g=ow(d,e)|0;h=e;i=c[h>>2]&3;j=e-32|0;k=c[((i|0)==2?e:j)+28>>2]|0;l=c[k+8>>2]|0;do{if((a[l+158|0]|0)==0){if((a[l+157|0]|0)!=0){break}fq(d,k)}else{m=e+32|0;n=uw(d,k,c[((i|0)==3?e:m)+28>>2]|0,0,0)|0;if((n|0)==0){o=c[h>>2]&3;p=uw(d,c[((o|0)==2?e:j)+28>>2]|0,c[((o|0)==3?e:m)+28>>2]|0,0,1)|0}else{p=n}n=c[e+8>>2]|0;m=b[n+170>>1]|0;o=c[n+156>>2]|0;n=p+8|0;q=(c[n>>2]|0)+170|0;r=b[q>>1]|0;b[q>>1]=(r&65535)>>>0>(m&65535)>>>0?r:m;m=(c[n>>2]|0)+156|0;c[m>>2]=(c[m>>2]|0)+o;Gx(d,e|0)|0}}while(0);if((g|0)==0){break}else{e=g}}}a[(c[f>>2]|0)+158|0]=0;return}function gq(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0;g=i;h=uw(a,d,e,0,0)|0;do{if((h|0)==0){j=uw(a,e,d,0,0)|0;if((j|0)!=0){k=j;break}j=uw(a,d,e,0,1)|0;if((j|0)!=0){k=j;break}j=$w(d|0)|0;l=$w(e|0)|0;Fv(1,160112,(m=i,i=i+16|0,c[m>>2]=j,c[m+8>>2]=l,m)|0)|0;i=m;i=g;return}else{k=h}}while(0);h=c[f+8>>2]|0;f=b[h+170>>1]|0;e=c[h+156>>2]|0;h=k+8|0;k=(c[h>>2]|0)+170|0;d=b[k>>1]|0;b[k>>1]=(d&65535)>>>0>(f&65535)>>>0?d:f;f=(c[h>>2]|0)+156|0;c[f>>2]=(c[f>>2]|0)+e;i=g;return}function hq(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=ux(d)|0;if((e|0)!=0){f=b+8|0;b=e;while(1){e=vx(d,b)|0;g=b+8|0;if((a[(c[g>>2]|0)+159|0]|0)==0){h=c[f>>2]|0;i=c[h+172>>2]|0;a:do{if((i|0)>1){j=b|0;k=1;l=h;while(1){m=(Rx(c[(c[l+176>>2]|0)+(k<<2)>>2]|0,j)|0)==0;n=k+1|0;o=c[f>>2]|0;p=c[o+172>>2]|0;if(!m){q=k;r=p;break a}if((n|0)<(p|0)){k=n;l=o}else{q=n;r=p;break}}}else{q=1;r=i}}while(0);if((q|0)<(r|0)){Gx(d,b|0)|0}c[(c[g>>2]|0)+212>>2]=0}else{Gx(d,b|0)|0}if((e|0)==0){break}else{b=e}}}b=ux(d)|0;if((b|0)==0){return}r=d|0;q=b;do{b=mw(Ix(r)|0,q)|0;if((b|0)!=0){f=b;do{if((Rx(d,c[((c[f>>2]&3|0)==2?f:f-32|0)+28>>2]|0)|0)!=0){xw(d,f,1)|0}f=ow(Ix(r)|0,f)|0;}while((f|0)!=0)}q=vx(d,q)|0;}while((q|0)!=0);return}function iq(a,b,d){a=a|0;b=b|0;d=d|0;Wx(b|0,103336,c[d>>2]|0,1)|0;return}function jq(a,b,d){a=a|0;b=b|0;d=d|0;Wx(b|0,132048,c[d+4>>2]|0,1)|0;return}function kq(a,b,d){a=a|0;b=b|0;d=d|0;Wx(b|0,134032,c[d+8>>2]|0,1)|0;return}function lq(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;e=sy(d)|0;if((e|0)==0){return}d=b+8|0;f=e;do{e=f|0;do{if((Za($w(e)|0,116432,7)|0)==0){g=7;h=5}else{i=Um(ew(e,151672)|0,12248,12272)|0;a[(c[f+8>>2]|0)+262|0]=i;if((i|0)!=0){g=i;h=5;break}lq(b,f)}}while(0);a:do{if((h|0)==5){h=0;if((g|0)==7&(c[53850]|0)==100){oq(b,f);break}e=ux(f)|0;if((e|0)==0){break}i=g&255;j=e+8|0;a[(c[j>>2]|0)+159|0]=i;k=vx(f,e)|0;if((k|0)!=0){l=k;do{Mm(e,l)|0;a[(c[l+8>>2]|0)+159|0]=a[(c[j>>2]|0)+159|0]|0;l=vx(f,l)|0;}while((l|0)!=0)}do{if((g|0)==2|(g|0)==3){l=(c[d>>2]|0)+212|0;j=c[l>>2]|0;if((j|0)==0){c[l>>2]=e;break}else{l=Mm(j,e)|0;c[(c[d>>2]|0)+212>>2]=l;break}}else if((g|0)==4|(g|0)==5){l=(c[d>>2]|0)+216|0;j=c[l>>2]|0;if((j|0)==0){c[l>>2]=e;break}else{l=Mm(j,e)|0;c[(c[d>>2]|0)+216>>2]=l;break}}else{break a}}while(0);if((g|0)==3){a[(c[(c[(c[d>>2]|0)+212>>2]|0)+8>>2]|0)+159|0]=i;break}else if((g|0)==5){a[(c[(c[(c[d>>2]|0)+216>>2]|0)+8>>2]|0)+159|0]=i;break}else{break}}}while(0);f=ty(f)|0;}while((f|0)!=0);return}function mq(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;e=d+8|0;d=c[e>>2]|0;f=c[d+216>>2]|0;g=c[d+212>>2]|0;d=(g|0)==0;do{if((f|0)==0){if(!d){h=5;break}c[b>>2]=0;c[b+4>>2]=0;return}else{if(d){i=f;h=6}else{h=5}}}while(0);if((h|0)==5){f=Lm(g)|0;c[(c[e>>2]|0)+212>>2]=f;f=c[e>>2]|0;g=c[f+216>>2]|0;if((g|0)==0){j=0;k=f}else{i=g;h=6}}do{if((h|0)==6){g=Lm(i)|0;c[(c[e>>2]|0)+216>>2]=g;g=c[e>>2]|0;f=c[g+216>>2]|0;if((f|0)==0){j=0;k=g;break}d=f+8|0;f=c[d>>2]|0;l=(a[f+159|0]|0)==5|0;m=c[c[f+180>>2]>>2]|0;if((m|0)==0){j=l;k=g;break}else{n=m}while(1){m=c[((c[n>>2]&3|0)==2?n:n-32|0)+28>>2]|0;if((m|0)!=(Lm(m)|0)){h=9;break}Kn(n);m=c[c[(c[d>>2]|0)+180>>2]>>2]|0;if((m|0)==0){h=11;break}else{n=m}}if((h|0)==9){cc(121920,126496,346,170232)}else if((h|0)==11){j=l;k=c[e>>2]|0;break}}}while(0);e=c[k+212>>2]|0;a:do{if((e|0)==0){o=0}else{k=e+8|0;h=c[k>>2]|0;n=(a[h+159|0]|0)==3|0;i=c[c[h+172>>2]>>2]|0;if((i|0)==0){o=n;break}else{p=i}while(1){i=c[((c[p>>2]&3|0)==3?p:p+32|0)+28>>2]|0;if((i|0)!=(Lm(i)|0)){break}Kn(p);i=c[c[(c[k>>2]|0)+172>>2]>>2]|0;if((i|0)==0){o=n;break a}else{p=i}}cc(121128,126496,353,170232)}}while(0);c[b>>2]=o;c[b+4>>2]=j;return}function nq(a){a=a|0;var d=0,f=0,g=0,h=0;d=a+8|0;a=c[d>>2]|0;f=a+224|0;b[f>>1]=(e[f>>1]|0)+(c[(c[(c[a+252>>2]|0)+8>>2]|0)+232>>2]|0);a=c[d>>2]|0;f=a+226|0;b[f>>1]=(e[f>>1]|0)+(c[(c[(c[a+252>>2]|0)+8>>2]|0)+232>>2]|0);a=c[d>>2]|0;if((c[a+172>>2]|0)<1){return}else{g=1;h=a}while(1){nq(c[(c[h+176>>2]|0)+(g<<2)>>2]|0);a=c[d>>2]|0;if((g|0)<(c[a+172>>2]|0)){g=g+1|0;h=a}else{break}}return}function oq(d,e){d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;f=e+8|0;g=(c[f>>2]|0)+188|0;if((c[g>>2]|0)!=0){return}c[g>>2]=d;hq(d,e);if((ux(e)|0)==0){return}g=d+8|0;d=(c[g>>2]|0)+172|0;h=c[d>>2]|0;i=h+1|0;c[d>>2]=i;d=c[g>>2]|0;j=c[d+176>>2]|0;if((j|0)==0){k=jk((h<<2)+8|0)|0}else{k=lk(j,h+2|0,4,c[d+172>>2]|0)|0}c[(c[g>>2]|0)+176>>2]=k;c[(c[(c[g>>2]|0)+176>>2]|0)+(i<<2)>>2]=e;Rj(e);if((c[53850]|0)!=100){b[(c[f>>2]|0)+224>>1]=32767;b[(c[f>>2]|0)+226>>1]=-1;i=ux(e)|0;g=c[f>>2]|0;if((i|0)==0){l=0;m=g}else{k=i;i=0;d=g;while(1){g=d+226|0;h=k+8|0;j=c[(c[h>>2]|0)+232>>2]|0;if((b[g>>1]|0)<(j|0)){b[g>>1]=j;n=c[f>>2]|0;o=c[(c[h>>2]|0)+232>>2]|0}else{n=d;o=j}j=n+224|0;if((b[j>>1]|0)>(o|0)){b[j>>1]=o}if((i|0)==0){p=k}else{p=(c[(c[h>>2]|0)+232>>2]|0)<(c[(c[i+8>>2]|0)+232>>2]|0)?k:i}h=vx(e,k)|0;j=c[f>>2]|0;if((h|0)==0){l=p;m=j;break}else{k=h;i=p;d=j}}}c[m+252>>2]=l;return}_p(e,0);l=c[f>>2]|0;f=c[l+180>>2]|0;if((f|0)==0){cc(129800,126496,238,170984)}else{q=0;r=f}while(1){f=c[r+8>>2]|0;if((c[f+232>>2]|0)==0){s=(a[f+156|0]|0)==0?r:q}else{s=q}m=c[f+164>>2]|0;if((m|0)==0){break}else{q=s;r=m}}if((s|0)==0){cc(129800,126496,238,170984)}c[l+252>>2]=s;l=ux(e)|0;if((l|0)==0){return}else{t=l}while(1){l=t+8|0;if(!((c[(c[l>>2]|0)+216>>2]|0)<2|(t|0)==(s|0))){u=15;break}Mm(t,s)|0;a[(c[l>>2]|0)+159|0]=7;l=vx(e,t)|0;if((l|0)==0){u=26;break}else{t=l}}if((u|0)==15){cc(124e3,126496,242,170984)}else if((u|0)==26){return}}function pq(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;d=i;i=i+240|0;e=d|0;f=d+120|0;c[53770]=Wv(b,2,137312,0)|0;g=Wv(b,2,161104,0)|0;c[53768]=g;if(!((c[53770]|0)!=0|(g|0)!=0)){i=d;return}g=ux(b)|0;if((g|0)==0){i=d;return}h=e|0;j=f|0;k=g;do{g=rw(b,k)|0;do{if((g|0)!=0){l=g;m=0;n=0;while(1){o=l;p=c[o>>2]|0;q=p&3;r=c[((q|0)==2?l:l-32|0)+28>>2]|0;s=l+32|0;a:do{if((r|0)==(c[((q|0)==3?l:s)+28>>2]|0)){t=n;u=m}else{v=c[53770]|0;do{if((r|0)==(k|0)&(v|0)!=0){w=fw(l|0,v)|0;if((a[w]|0)==0){x=c[o>>2]|0;break}else{t=n;u=qq(h,m,k,l,w)|0;break a}}else{x=p}}while(0);v=c[53768]|0;if(!((c[((x&3|0)==3?l:s)+28>>2]|0)==(k|0)&(v|0)!=0)){t=n;u=m;break}w=fw(l|0,v)|0;if((a[w]|0)==0){t=n;u=m;break}t=qq(j,n,k,l,w)|0;u=m}}while(0);s=sw(b,l,k)|0;if((s|0)==0){break}else{l=s;m=u;n=t}}if((u|0)>0){n=0;do{m=e+(n*24|0)+4|0;if((c[e+(n*24|0)+8>>2]|0)>1){rq(k,m)}l=c[m>>2]|0;if((l|0)!=0){eF(l)}n=n+1|0;}while((n|0)<(u|0))}if((t|0)>0){y=0}else{break}do{n=f+(y*24|0)+4|0;if((c[f+(y*24|0)+8>>2]|0)>1){rq(k,n)}l=c[n>>2]|0;if((l|0)!=0){eF(l)}y=y+1|0;}while((y|0)<(t|0))}}while(0);k=vx(b,k)|0;}while((k|0)!=0);i=d;return}function qq(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0.0;j=i;i=i+16|0;k=j|0;l=j+8|0;do{if((d|0)>0){m=a[g]|0;n=0;while(1){o=c[b+(n*24|0)>>2]|0;if((a[o]|0)==m<<24>>24){if((Ya(o|0,g|0)|0)==0){break}}p=n+1|0;if((p|0)<(d|0)){n=p}else{q=10;break}}if((q|0)==10){if((d|0)<=4){r=p;q=12;break}m=$w(e|0)|0;Fv(1,130352,(o=i,i=i+16|0,c[o>>2]=5,c[o+8>>2]=m,o)|0)|0;i=o;s=d;i=j;return s|0}o=b+(n*24|0)+4|0;m=c[o>>2]|0;if((m|0)==0){t=kk((c[b+(n*24|0)+8>>2]<<2)+8|0)|0}else{t=mk(m,(c[b+(n*24|0)+8>>2]<<2)+8|0)|0}m=t;c[o>>2]=m;u=b+(n*24|0)+8|0;v=c[u>>2]|0;c[u>>2]=v+1;c[m+(v<<2)>>2]=f;c[(c[o>>2]|0)+(c[u>>2]<<2)>>2]=0;w=d;x=n}else{r=0;q=12}}while(0);if((q|0)==12){q=b+(r*24|0)+8|0;c[q>>2]=0;t=jk(8)|0;p=b+(r*24|0)+4|0;c[p>>2]=t;u=c[q>>2]|0;c[q>>2]=u+1;c[t+(u<<2)>>2]=f;c[(c[p>>2]|0)+(c[q>>2]<<2)>>2]=0;c[b+(r*24|0)>>2]=g;c[b+(r*24|0)+12>>2]=0;h[b+(r*24|0)+16>>3]=0.0;w=d+1|0;x=r}ih(f,k,l);r=(c[((c[f>>2]&3|0)==2?f:f-32|0)+28>>2]|0)==(e|0)?c[l>>2]|0:c[k>>2]|0;if((r|0)==0){s=w;i=j;return s|0}k=b+(x*24|0)+12|0;l=c[k>>2]|0;c[k>>2]=l+1;if((l|0)==0){y=+kh(f,r)}else{y=0.0}h[b+(x*24|0)+16>>3]=y;s=w;i=j;return s|0}function rq(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0.0,o=0.0,p=0,q=0,r=0,s=0,t=0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0,B=0.0,C=0,D=0.0,E=0.0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;e=i;i=i+80|0;f=e|0;g=e+8|0;j=e+16|0;k=d+4|0;if((c[k>>2]|0)>0){l=d|0;m=b+8|0;n=0.0;o=0.0;p=0;while(1){q=c[(c[l>>2]|0)+(p<<2)>>2]|0;r=c[q>>2]&3;s=c[((r|0)==2?q:q-32|0)+28>>2]|0;if((s|0)==(b|0)){t=c[((r|0)==3?q:q+32|0)+28>>2]|0}else{t=s}s=c[t+8>>2]|0;q=c[m>>2]|0;u=+h[s+16>>3]- +h[q+16>>3];v=+h[s+24>>3]- +h[q+24>>3];w=+cb(+u,+v);x=o+u/w;u=n+v/w;q=p+1|0;if((q|0)<(c[k>>2]|0)){n=u;o=x;p=q}else{y=u;z=x;A=m;break}}}else{y=0.0;z=0.0;A=b+8|0}o=+cb(+z,+y);m=c[A>>2]|0;n=+h[m+16>>3];x=+h[m+24>>3];u=+h[m+88>>3]+ +h[m+96>>3];w=+h[m+80>>3];m=b|0;p=u>w+ +(c[(c[(Hx(m)|0)+8>>2]|0)+240>>2]|0);t=c[A>>2]|0;if(p){B=+h[t+88>>3]+ +h[t+96>>3];C=t}else{w=+h[t+80>>3];u=w+ +(c[(c[(Hx(m)|0)+8>>2]|0)+240>>2]|0);B=u;C=c[A>>2]|0}u=z/o*B+ +h[C+16>>3];z=y/o*B+ +h[C+24>>3];C=j|0;h[C>>3]=n;m=j+8|0;h[m>>3]=x;h[j+16>>3]=(n*2.0+u)/3.0;h[j+24>>3]=(x*2.0+z)/3.0;h[j+32>>3]=(n+u*2.0)/3.0;h[j+40>>3]=(x+z*2.0)/3.0;h[j+48>>3]=u;h[j+56>>3]=z;$l(b,j|0);j=c[A>>2]|0;z=+h[C>>3]- +h[j+16>>3];u=+h[m>>3]- +h[j+24>>3];if(z<0.0){D=z+-.5}else{D=z+.5}z=+(~~D|0);if(u<0.0){E=u+-.5}else{E=u+.5}u=+(~~E|0);E=+h[j+88>>3];m=~~((z+E)*256.0/(E+ +h[j+96>>3]));if((c[k>>2]|0)<=0){F=j;G=F;H=G+145|0;a[H]=1;i=e;return}j=d|0;d=0;do{C=c[(c[j>>2]|0)+(d<<2)>>2]|0;ih(C,f,g);if((C|0)!=0){t=C;do{C=(t|0)==0;a:do{if(!C){p=t;do{l=p;q=c[l>>2]|0;s=p-32|0;if((c[((q&3|0)==2?p:s)+28>>2]|0)==(b|0)){r=c[p+8>>2]|0;I=r;h[r+56>>3]=z;h[r+64>>3]=u;h[r+72>>3]=0.0;c[r+80>>2]=0;a[r+84|0]=1;a[I+85|0]=0;a[I+86|0]=0;a[I+87|0]=0;a[r+88|0]=m;a[I+89|0]=0;c[r+92>>2]=0;J=c[l>>2]|0}else{J=q}q=p+8|0;if((c[((J&3|0)==3?p:p+32|0)+28>>2]|0)==(b|0)){r=c[q>>2]|0;I=r;h[r+16>>3]=z;h[r+24>>3]=u;h[r+32>>3]=0.0;c[r+40>>2]=0;a[r+44|0]=1;a[I+45|0]=0;a[I+46|0]=0;a[I+47|0]=0;a[r+48|0]=m;a[I+49|0]=0;c[r+52>>2]=0}if((a[(c[q>>2]|0)+112|0]|0)!=1){break}q=c[(c[((c[l>>2]&3|0)==2?p:s)+28>>2]|0)+8>>2]|0;if((a[q+156|0]|0)!=1){break}s=q+180|0;if((c[s+4>>2]|0)!=1){break}p=c[c[s>>2]>>2]|0;}while((p|0)!=0);if(C){break}else{K=t}do{p=K;s=c[p>>2]|0;if((c[((s&3|0)==2?K:K-32|0)+28>>2]|0)==(b|0)){q=c[K+8>>2]|0;l=q;h[q+56>>3]=z;h[q+64>>3]=u;h[q+72>>3]=0.0;c[q+80>>2]=0;a[q+84|0]=1;a[l+85|0]=0;a[l+86|0]=0;a[l+87|0]=0;a[q+88|0]=m;a[l+89|0]=0;c[q+92>>2]=0;L=c[p>>2]|0}else{L=s}s=K+32|0;q=K+8|0;if((c[((L&3|0)==3?K:s)+28>>2]|0)==(b|0)){l=c[q>>2]|0;r=l;h[l+16>>3]=z;h[l+24>>3]=u;h[l+32>>3]=0.0;c[l+40>>2]=0;a[l+44|0]=1;a[r+45|0]=0;a[r+46|0]=0;a[r+47|0]=0;a[l+48|0]=m;a[r+49|0]=0;c[l+52>>2]=0}if((a[(c[q>>2]|0)+112|0]|0)!=1){break a}q=c[(c[((c[p>>2]&3|0)==3?K:s)+28>>2]|0)+8>>2]|0;if((a[q+156|0]|0)!=1){break a}s=q+172|0;if((c[s+4>>2]|0)!=1){break a}K=c[c[s>>2]>>2]|0;}while((K|0)!=0)}}while(0);t=c[(c[t+8>>2]|0)+172>>2]|0;}while((t|0)!=0)}d=d+1|0;}while((d|0)<(c[k>>2]|0));F=c[A>>2]|0;G=F;H=G+145|0;a[H]=1;i=e;return}function sq(a){a=a|0;c[a>>2]=0;c[a+4>>2]=0;return}function tq(a){a=a|0;var b=0;b=jk(64)|0;c[b+36>>2]=0;c[b+40>>2]=0;c[b+8>>2]=a;return b|0}function uq(a){a=a|0;if((a|0)==0){return}br(c[a+32>>2]|0);eF(a);return}function vq(a){a=a|0;return Lw(c[a+8>>2]|0)|0}function wq(a,b){a=a|0;b=b|0;var d=0,e=0;c[b+4>>2]=0;d=a+4|0;e=c[d>>2]|0;if((e|0)==0){c[a>>2]=b;c[d>>2]=b;return}else{c[e+4>>2]=b;c[d>>2]=b;return}}function xq(a,b){a=a|0;b=b|0;var d=0,e=0;d=a|0;e=c[d>>2]|0;if((e|0)==0){c[d>>2]=b;c[a+4>>2]=b;return}else{c[b+4>>2]=e;c[d>>2]=b;return}}function yq(a,b,d){a=a|0;b=b|0;d=+d;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0.0,sa=0.0,ta=0.0,ua=0.0,va=0.0,wa=0.0,xa=0,ya=0.0,za=0,Aa=0,Ba=0;e=i;i=i+128|0;f=e|0;g=c[b+8>>2]|0;j=ux(g)|0;if((j|0)!=0){k=j;do{j=mw(a,k)|0;if((j|0)!=0){l=j;do{if((c[(c[(c[(c[((c[l>>2]&3|0)==2?l:l-32|0)+28>>2]|0)+8>>2]|0)+112>>2]|0)+12>>2]|0)==(b|0)){xw(g,l,1)|0}l=ow(a,l)|0;}while((l|0)!=0)}k=vx(g,k)|0;}while((k|0)!=0)}k=f|0;f=c[45214]|0;c[45214]=f+1;nb(k|0,115440,(a=i,i=i+8|0,c[a>>2]=f,a)|0)|0;i=a;f=ry(g,k,1)|0;Wx(f|0,158088,272,1)|0;l=c[45214]|0;c[45214]=l+1;nb(k|0,115440,(a=i,i=i+8|0,c[a>>2]=l,a)|0)|0;i=a;l=Hw(k,g+12|0,0)|0;j=ux(g)|0;if((j|0)!=0){m=j;do{zx(f,m,1)|0;j=Ax(l,$w(m|0)|0,1)|0;Wx(j|0,108392,304,1)|0;c[(c[(c[m+8>>2]|0)+112>>2]|0)+16>>2]=j;m=vx(g,m)|0;}while((m|0)!=0)}m=ux(g)|0;if((m|0)!=0){j=m;do{m=c[(c[(c[j+8>>2]|0)+112>>2]|0)+16>>2]|0;n=mw(g,j)|0;if((n|0)!=0){o=m+8|0;p=n;do{xw(f,p,1)|0;n=c[(c[(c[(c[((c[p>>2]&3|0)==2?p:p-32|0)+28>>2]|0)+8>>2]|0)+112>>2]|0)+16>>2]|0;q=uw(l,m,n,0,1)|0;Wx(q|0,128120,176,1)|0;c[(c[q+8>>2]|0)+116>>2]=p;q=(c[o>>2]|0)+236|0;c[q>>2]=(c[q>>2]|0)+1;q=(c[n+8>>2]|0)+236|0;c[q>>2]=(c[q>>2]|0)+1;p=ow(g,p)|0;}while((p|0)!=0)}j=vx(g,j)|0;}while((j|0)!=0)}j=Lw(l)|0;p=Nq()|0;o=ux(l)|0;if((o|0)!=0){m=o;do{Pq(p,m);m=vx(l,m)|0;}while((m|0)!=0)}m=j-3|0;if((m|0)>0){j=0;do{o=Rq(p)|0;q=rw(l,o)|0;if((q|0)!=0){n=q;do{q=c[n>>2]&3;r=c[((q|0)==2?n:n-32|0)+28>>2]|0;if((o|0)==(r|0)){s=c[((q|0)==3?n:n+32|0)+28>>2]|0}else{s=r}Qq(p,s);n=sw(l,n,o)|0;}while((n|0)!=0)}n=c[(c[o+8>>2]|0)+236>>2]|0;r=n<<2;q=kk(r)|0;t=q;u=kk(r)|0;r=u;v=rw(l,o)|0;if((v|0)==0){w=0;x=0}else{y=0;z=0;A=v;v=0;while(1){B=c[A>>2]&3;C=c[((B|0)==2?A:A-32|0)+28>>2]|0;if((C|0)==(o|0)){D=c[((B|0)==3?A:A+32|0)+28>>2]|0}else{D=C}C=rw(l,o)|0;do{if((C|0)==0){E=v;F=35}else{B=C;G=0;H=v;while(1){do{if((B|0)==(A|0)){I=H;J=G}else{K=c[B>>2]&3;L=c[((K|0)==2?B:B-32|0)+28>>2]|0;if((L|0)==(o|0)){M=c[((K|0)==3?B:B+32|0)+28>>2]|0}else{M=L}L=uw(l,D,M,0,0)|0;if((L|0)==0){I=H;J=G;break}if(D>>>0>=M>>>0){I=H;J=1;break}K=H+1|0;N=L+8|0;L=c[(c[N>>2]|0)+116>>2]|0;if((L|0)==0){I=K;J=1;break}Gx(f,L)|0;c[(c[N>>2]|0)+116>>2]=0;I=K;J=1}}while(0);K=sw(l,B,o)|0;if((K|0)==0){break}else{B=K;G=J;H=I}}if((J|0)==0){E=I;F=35;break}c[t+(y<<2)>>2]=D;O=z;P=y+1|0;Q=I}}while(0);if((F|0)==35){F=0;c[r+(z<<2)>>2]=D;O=z+1|0;P=y;Q=E}C=sw(l,A,o)|0;if((C|0)==0){w=O;x=Q;break}else{y=P;z=O;A=C;v=Q}}}v=n-1-x|0;a:do{if((v|0)>0){if((v|0)>=(w|0)){if((v|0)!=(w|0)){break}A=c[t>>2]|0;if((w|0)<=0){break}z=A+8|0;y=0;while(1){C=c[r+(y<<2)>>2]|0;Wx(uw(l,A,C,0,1)|0,128120,176,1)|0;H=(c[z>>2]|0)+236|0;c[H>>2]=(c[H>>2]|0)+1;H=(c[C+8>>2]|0)+236|0;c[H>>2]=(c[H>>2]|0)+1;y=y+1|0;if((y|0)>=(w|0)){break a}}}b:do{if((w|0)>0){y=v;z=0;while(1){A=z|1;if((A|0)>=(w|0)){R=y;break b}H=c[r+(z<<2)>>2]|0;C=c[r+(A<<2)>>2]|0;Wx(uw(l,H,C,0,1)|0,128120,176,1)|0;A=(c[H+8>>2]|0)+236|0;c[A>>2]=(c[A>>2]|0)+1;A=(c[C+8>>2]|0)+236|0;c[A>>2]=(c[A>>2]|0)+1;A=y-1|0;C=z+2|0;if((C|0)<(w|0)){y=A;z=C}else{R=A;break}}}else{R=v}}while(0);if((R|0)>0){S=R;T=2}else{break}while(1){z=c[r>>2]|0;y=c[r+(T<<2)>>2]|0;Wx(uw(l,z,y,0,1)|0,128120,176,1)|0;A=(c[z+8>>2]|0)+236|0;c[A>>2]=(c[A>>2]|0)+1;A=(c[y+8>>2]|0)+236|0;c[A>>2]=(c[A>>2]|0)+1;A=S-1|0;if((A|0)>0){S=A;T=T+1|0}else{break}}}}while(0);eF(u);eF(q);r=rw(l,o)|0;if((r|0)!=0){v=r;do{r=c[v>>2]&3;t=c[((r|0)==2?v:v-32|0)+28>>2]|0;if((o|0)==(t|0)){U=c[((r|0)==3?v:v+32|0)+28>>2]|0}else{U=t}t=(c[U+8>>2]|0)+236|0;c[t>>2]=(c[t>>2]|0)-1;Pq(p,U);v=sw(l,v,o)|0;}while((v|0)!=0)}Gx(l,o|0)|0;j=j+1|0;}while((j|0)<(m|0))}Kw(l)|0;Oq(p);p=c[43748]|0;c[43748]=p+1;nb(k|0,120712,(a=i,i=i+8|0,c[a>>2]=p,a)|0)|0;i=a;a=ry(f,k,1)|0;Wx(a|0,158088,272,1)|0;k=ux(f)|0;if((k|0)!=0){p=k;do{zx(a,p,1)|0;k=p+8|0;c[(c[(c[k>>2]|0)+112>>2]|0)+28>>2]=0;c[(c[(c[k>>2]|0)+112>>2]|0)+32>>2]=0;l=(c[(c[k>>2]|0)+112>>2]|0)+4|0;c[l>>2]=c[l>>2]&-2;p=vx(f,p)|0;}while((p|0)!=0)}p=ux(f)|0;if((p|0)!=0){l=p;do{p=c[(c[l+8>>2]|0)+112>>2]|0;if((c[p+4>>2]&1|0)==0){c[p+16>>2]=0;Aq(f,l,a)}l=vx(f,l)|0;}while((l|0)!=0)}do{if((Lw(a)|0)==1){l=ar()|0;p=ux(a)|0;cr(l,0,p);k=(c[(c[p+8>>2]|0)+112>>2]|0)+4|0;c[k>>2]=c[k>>2]|16;X=l}else{l=ux(a)|0;if((l|0)!=0){k=l;do{l=rw(a,k)|0;c:do{if((l|0)!=0){p=l;m=0;while(1){j=sw(a,p,k)|0;if((j|0)==0){break}else{p=j;m=m+1|0}}if((m|0)!=0){break}p=c[(c[(c[k+8>>2]|0)+112>>2]|0)+16>>2]|0;if((p|0)==0){break}else{Y=0;Z=0;_=p}while(1){$=Y+1|0;aa=_+8|0;ba=c[(c[aa>>2]|0)+112>>2]|0;p=c[ba+28>>2]|0;if((p|0)==0){c[ba+20>>2]=k;c[(c[(c[aa>>2]|0)+112>>2]|0)+28>>2]=$;ca=Z}else{if((p|0)>(Y|0)){break}p=c[ba+20>>2]|0;if((p|0)==(Z|0)){da=Z;ea=ba}else{j=ba+24|0;if((c[ba+32>>2]|0)==0){F=72}else{if((c[j>>2]|0)==(Z|0)){fa=Z}else{F=72}}if((F|0)==72){F=0;fa=p}c[j>>2]=p;p=c[(c[aa>>2]|0)+112>>2]|0;c[p+32>>2]=c[p+28>>2];da=fa;ea=c[(c[aa>>2]|0)+112>>2]|0}c[ea+20>>2]=k;c[(c[(c[aa>>2]|0)+112>>2]|0)+28>>2]=$;ca=da}p=c[(c[(c[aa>>2]|0)+112>>2]|0)+16>>2]|0;if((p|0)==0){break c}else{Y=$;Z=ca;_=p}}if((c[ba+32>>2]|0)>(Y|0)){break}c[ba+24>>2]=k;c[(c[(c[aa>>2]|0)+112>>2]|0)+32>>2]=$}}while(0);k=vx(a,k)|0;}while((k|0)!=0)}k=ux(a)|0;if((k|0)==0){ga=0}else{o=0;l=k;k=0;while(1){m=c[(c[l+8>>2]|0)+112>>2]|0;p=(c[m+32>>2]|0)+(c[m+28>>2]|0)|0;m=(p|0)>(k|0);j=m?l:o;U=vx(a,l)|0;if((U|0)==0){ga=j;break}else{o=j;l=U;k=m?p:k}}}k=ar()|0;l=ga+8|0;o=c[(c[(c[l>>2]|0)+112>>2]|0)+20>>2]|0;if((o|0)!=(ga|0)){p=o;do{cr(k,0,p);o=p+8|0;m=(c[(c[o>>2]|0)+112>>2]|0)+4|0;c[m>>2]=c[m>>2]|16;p=c[(c[(c[o>>2]|0)+112>>2]|0)+16>>2]|0;}while((p|0)!=(ga|0))}cr(k,0,ga);p=(c[(c[l>>2]|0)+112>>2]|0)+4|0;c[p>>2]=c[p>>2]|16;if((c[(c[(c[l>>2]|0)+112>>2]|0)+32>>2]|0)==0){X=k;break}p=ar()|0;o=c[(c[(c[l>>2]|0)+112>>2]|0)+24>>2]|0;if((o|0)!=(ga|0)){m=o;do{cr(p,0,m);o=m+8|0;U=(c[(c[o>>2]|0)+112>>2]|0)+4|0;c[U>>2]=c[U>>2]|16;m=c[(c[(c[o>>2]|0)+112>>2]|0)+16>>2]|0;}while((m|0)!=(ga|0))}hr(k,p);X=k}}while(0);ga=ux(g)|0;if((ga|0)!=0){a=X|0;$=X+4|0;aa=ga;do{if((c[(c[(c[aa+8>>2]|0)+112>>2]|0)+4>>2]&16|0)==0){ga=ar()|0;ba=mw(g,aa)|0;if((ba|0)!=0){Y=ba;do{ba=Y;_=Y-32|0;cr(ga,0,c[((c[ba>>2]&3|0)==2?Y:_)+28>>2]|0);ca=(c[(c[(c[((c[ba>>2]&3|0)==2?Y:_)+28>>2]|0)+8>>2]|0)+112>>2]|0)+4|0;c[ca>>2]=c[ca>>2]|32;Y=ow(g,Y)|0;}while((Y|0)!=0)}Y=pw(g,aa)|0;if((Y|0)!=0){k=Y;do{Y=k;p=k+32|0;cr(ga,0,c[((c[Y>>2]&3|0)==3?k:p)+28>>2]|0);ca=(c[(c[(c[((c[Y>>2]&3|0)==3?k:p)+28>>2]|0)+8>>2]|0)+112>>2]|0)+4|0;c[ca>>2]=c[ca>>2]|32;k=qw(g,k)|0;}while((k|0)!=0)}d:do{if((gr(ga)|0)>1){k=c[a>>2]|0;if((k|0)==0){F=100;break}else{ha=k}while(1){k=ha+4|0;if((c[(c[(c[(c[ha>>2]|0)+8>>2]|0)+112>>2]|0)+4>>2]&32|0)!=0){if((c[(c[(c[(c[c[((ha|0)==(c[$>>2]|0)?a:k)>>2]>>2]|0)+8>>2]|0)+112>>2]|0)+4>>2]&32|0)!=0){break}}ca=c[k>>2]|0;if((ca|0)==0){F=100;break d}else{ha=ca}}cr(X,ha,aa)}else{F=100}}while(0);e:do{if((F|0)==100){F=0;f:do{if((gr(ga)|0)>0){ca=c[a>>2]|0;if((ca|0)==0){break}else{ia=ca}while(1){if((c[(c[(c[(c[ia>>2]|0)+8>>2]|0)+112>>2]|0)+4>>2]&32|0)!=0){break}ca=c[ia+4>>2]|0;if((ca|0)==0){break f}else{ia=ca}}cr(X,ia,aa);break e}}while(0);cr(X,0,aa)}}while(0);ca=c[ga>>2]|0;if((ca|0)!=0){k=ca;do{ca=(c[(c[(c[k>>2]|0)+8>>2]|0)+112>>2]|0)+4|0;c[ca>>2]=c[ca>>2]&-33;k=c[k+4>>2]|0;}while((k|0)!=0)}br(ga)}aa=vx(g,aa)|0;}while((aa|0)!=0)}aa=zq(X,g)|0;g:do{if((aa|0)==0){ja=X}else{ia=aa;a=X;ha=0;while(1){$=ux(g)|0;if(($|0)==0){ka=a;la=ia}else{k=$;$=a;ca=ia;while(1){p=rw(g,k)|0;if((p|0)==0){ma=$;na=ca}else{Y=p;p=$;_=ca;while(1){ba=c[Y>>2]&3;Z=c[((ba|0)==3?Y:Y+32|0)+28>>2]|0;if((Z|0)==(k|0)){oa=c[((ba|0)==2?Y:Y-32|0)+28>>2]|0}else{oa=Z}Z=p;ba=_;da=0;while(1){ea=er(Z)|0;fr(Z,k,oa,da);fa=zq(Z,g)|0;if((fa|0)<(ba|0)){br(ea);if((fa|0)==0){ja=Z;break g}else{pa=fa;qa=Z}}else{br(Z);pa=ba;qa=ea}ea=da+1|0;if((ea|0)<2){Z=qa;ba=pa;da=ea}else{break}}da=sw(g,Y,k)|0;if((da|0)==0){ma=qa;na=pa;break}else{Y=da;p=qa;_=pa}}}_=vx(g,k)|0;if((_|0)==0){ka=ma;la=na;break}else{k=_;$=ma;ca=na}}}ca=ha+1|0;if((la|0)!=0&(ia|0)!=(la|0)&(ca|0)<10){ia=la;a=ka;ha=ca}else{ja=ka;break}}}}while(0);ka=gr(ja)|0;la=ja|0;na=c[la>>2]|0;ma=(na|0)==0;if(ma){ra=0.0}else{sa=0.0;g=na;while(1){pa=c[(c[c[(c[(c[g>>2]|0)+8>>2]|0)+112>>2]>>2]|0)+8>>2]|0;ta=+h[pa+32>>3];ua=ta>sa?ta:sa;ta=+h[pa+40>>3];va=ta>ua?ta:ua;pa=c[g+4>>2]|0;if((pa|0)==0){ra=va;break}else{sa=va;g=pa}}}g=(ka|0)==1;if(g){wa=0.0}else{wa=+(ka|0)*(ra+d)/6.283185307179586}do{if(!ma){pa=na;while(1){if((c[(c[(c[(c[pa>>2]|0)+8>>2]|0)+112>>2]|0)+4>>2]&8|0)!=0){F=130;break}qa=c[pa+4>>2]|0;if((qa|0)==0){xa=na;break}else{pa=qa}}if((F|0)==130){dr(ja,pa);xa=c[la>>2]|0}if((xa|0)==0){break}d=6.283185307179586/+(ka|0);qa=0;oa=xa;while(1){X=(c[oa>>2]|0)+8|0;c[(c[(c[X>>2]|0)+112>>2]|0)+16>>2]=qa;h[(c[(c[X>>2]|0)+112>>2]|0)+24>>3]=0.0;sa=+(qa|0)*d;va=wa*+V(sa);h[c[(c[X>>2]|0)+132>>2]>>3]=va;va=wa*+W(sa);h[(c[(c[X>>2]|0)+132>>2]|0)+8>>3]=va;X=c[oa+4>>2]|0;if((X|0)==0){break}else{qa=qa+1|0;oa=X}}}}while(0);if(g){d=ra*.5;h[b+16>>3]=d;ya=d;za=b+24|0;h[za>>3]=ya;Aa=b+48|0;h[Aa>>3]=-1.0;Ba=Kw(f)|0;i=e;return ja|0}else{h[b+16>>3]=wa;ya=wa;za=b+24|0;h[za>>3]=ya;Aa=b+48|0;h[Aa>>3]=-1.0;Ba=Kw(f)|0;i=e;return ja|0}return 0}function zq(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=Vq()|0;e=ux(b)|0;if((e|0)!=0){f=e;do{e=mw(b,f)|0;if((e|0)!=0){g=e;do{c[c[(c[g+8>>2]|0)+120>>2]>>2]=0;g=ow(b,g)|0;}while((g|0)!=0)}f=vx(b,f)|0;}while((f|0)!=0)}f=c[a>>2]|0;if((f|0)==0){h=0;Wq(d);return h|0}a=d|0;g=0;e=1;i=f;while(1){f=c[i>>2]|0;j=rw(b,f)|0;if((j|0)==0){k=g}else{l=j;j=g;while(1){m=l+8|0;if((c[c[(c[m>>2]|0)+120>>2]>>2]|0)>0){n=Hc[c[a>>2]&63](d,0,128)|0;if((n|0)==0){o=j}else{p=j;q=n;while(1){n=c[q+8>>2]|0;do{if((c[c[(c[n+8>>2]|0)+120>>2]>>2]|0)>(c[c[(c[m>>2]|0)+120>>2]>>2]|0)){r=c[n>>2]&3;if((c[((r|0)==2?n:n-32|0)+28>>2]|0)==(f|0)){s=p;break}s=((c[((r|0)==3?n:n+32|0)+28>>2]|0)!=(f|0))+p|0}else{s=p}}while(0);n=Hc[c[a>>2]&63](d,q,8)|0;if((n|0)==0){o=s;break}else{p=s;q=n}}}Yq(d,l);t=o}else{t=j}q=sw(b,l,f)|0;if((q|0)==0){k=t;break}else{l=q;j=t}}}j=rw(b,f)|0;if((j|0)!=0){l=j;do{j=c[(c[l+8>>2]|0)+120>>2]|0;if((c[j>>2]|0)==0){c[j>>2]=e;Xq(d,l)}l=sw(b,l,f)|0;}while((l|0)!=0)}l=c[i+4>>2]|0;if((l|0)==0){h=k;break}else{g=k;e=e+1|0;i=l}}Wq(d);return h|0}function Aq(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=(c[(c[b+8>>2]|0)+112>>2]|0)+4|0;c[e>>2]=c[e>>2]|1;e=rw(a,b)|0;if((e|0)==0){return}else{f=e}do{e=c[f>>2]&3;g=c[((e|0)==2?f:f-32|0)+28>>2]|0;if((g|0)==(b|0)){h=c[((e|0)==3?f:f+32|0)+28>>2]|0}else{h=g}g=h+8|0;if((c[(c[(c[g>>2]|0)+112>>2]|0)+4>>2]&1|0)==0){xw(d,f,1)|0;c[(c[(c[g>>2]|0)+112>>2]|0)+16>>2]=b;Aq(a,h,d)}f=sw(a,f,b)|0;}while((f|0)!=0);return}function Bq(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0;e=i;i=i+8|0;f=e|0;g=c[d+24>>2]|0;if((g|0)==0){h=3}else{j=Ax(b,g,0)|0;if((j|0)==0){h=3}else{k=j}}a:do{if((h|0)==3){j=d+20|0;do{if((c[j>>2]|0)!=0){g=ux(b)|0;if((g|0)==0){break}else{l=g}do{if((Jm(c[c[(c[l+8>>2]|0)+112>>2]>>2]|0,c[j>>2]|0,0)|0)<<24>>24!=0){k=l;break a}l=vx(b,l)|0;}while((l|0)!=0)}}while(0);k=ux(b)|0}}while(0);if((a[213992]|0)!=0){l=c[o>>2]|0;h=$w(k|0)|0;gc(l|0,102768,(l=i,i=i+8|0,c[l>>2]=h,l)|0)|0;i=l}c[f+4>>2]=0;c[f>>2]=0;Dq(b,k,d,1,f);f=d|0;k=c[d>>2]|0;d=c[k+4>>2]|0;if((d|0)==0){sq(f);i=e;return k|0}else{m=d}while(1){d=c[m+8>>2]|0;b=ux(d)|0;l=c[(c[b+8>>2]|0)+112>>2]|0;h=c[l+20>>2]|0;j=c[l+8>>2]|0;l=vx(d,b)|0;if((l|0)==0){n=j;p=b}else{g=h;h=l;l=j;j=b;while(1){b=c[(c[h+8>>2]|0)+112>>2]|0;q=c[b+20>>2]|0;if((q|0)<(g|0)){r=h;s=c[b+8>>2]|0;t=q}else{r=j;s=l;t=g}q=vx(d,h)|0;if((q|0)==0){n=s;p=r;break}else{g=t;h=q;l=s;j=r}}}j=n+8|0;l=(c[(c[j>>2]|0)+112>>2]|0)+4|0;c[l>>2]=c[l>>2]|8;c[m>>2]=p;l=c[m+4>>2]|0;wq((c[(c[(c[j>>2]|0)+112>>2]|0)+12>>2]|0)+36|0,m);if((l|0)==0){break}else{m=l}}sq(f);i=e;return k|0}function Cq(a){a=a|0;var b=0,d=0;b=c[a+36>>2]|0;if((b|0)==0){uq(a);return}else{d=b}while(1){b=c[d+4>>2]|0;Cq(d);if((b|0)==0){break}else{d=b}}uq(a);return}function Dq(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;g=i;i=i+128|0;h=g|0;j=d+8|0;k=c[j>>2]|0;c[j>>2]=k+1;j=b+8|0;c[(c[(c[j>>2]|0)+112>>2]|0)+20>>2]=k;c[(c[(c[j>>2]|0)+112>>2]|0)+24>>2]=k;k=rw(a,b)|0;a:do{if((k|0)!=0){l=f|0;m=f+4|0;n=h|0;o=d+12|0;p=(e|0)==0;q=d|0;r=k;b:while(1){s=c[r>>2]&3;t=c[((s|0)==2?r:r-32|0)+28>>2]|0;do{if((t|0)==(b|0)){u=c[((s|0)==3?r:r+32|0)+28>>2]|0;v=c[(c[r+8>>2]|0)+120>>2]|0;if((c[v>>2]|0)!=0){w=u;break}c[v>>2]=-1;w=u}else{u=c[(c[r+8>>2]|0)+120>>2]|0;if((c[u>>2]|0)!=0){w=t;break}c[u>>2]=1;w=t}}while(0);t=w+8|0;s=c[(c[t>>2]|0)+112>>2]|0;u=c[s+20>>2]|0;c:do{if((u|0)==0){c[s+8>>2]=b;c[(c[(c[r+8>>2]|0)+120>>2]|0)+4>>2]=c[l>>2];c[l>>2]=r;c[m>>2]=(c[m>>2]|0)+1;Dq(a,w,d,0,f);v=(c[(c[j>>2]|0)+112>>2]|0)+24|0;x=c[v>>2]|0;y=c[(c[(c[t>>2]|0)+112>>2]|0)+24>>2]|0;c[v>>2]=(x|0)<(y|0)?x:y;if((c[(c[(c[t>>2]|0)+112>>2]|0)+24>>2]|0)<(c[(c[(c[j>>2]|0)+112>>2]|0)+20>>2]|0)){break}else{z=0}while(1){y=c[l>>2]|0;if((y|0)==0){A=13;break b}x=c[m>>2]|0;if((x|0)<=0){A=12;break b}v=y+8|0;c[l>>2]=c[(c[(c[v>>2]|0)+120>>2]|0)+4>>2];c[m>>2]=x-1;x=c[y>>2]&3;if((c[c[(c[v>>2]|0)+120>>2]>>2]|0)==1){B=(x|0)==2?y:y-32|0}else{B=(x|0)==3?y:y+32|0}x=c[B+28>>2]|0;v=x+8|0;if((c[(c[(c[v>>2]|0)+112>>2]|0)+12>>2]|0)==0){if((z|0)==0){C=c[o>>2]|0;c[o>>2]=C+1;nb(n|0,145288,(D=i,i=i+8|0,c[D>>2]=C,D)|0)|0;i=D;C=ry(a,n,1)|0;Wx(C|0,120200,272,1)|0;E=tq(C)|0}else{E=z}zx(c[E+8>>2]|0,x,1)|0;c[(c[(c[v>>2]|0)+112>>2]|0)+12>>2]=E;F=E}else{F=z}if((y|0)==(r|0)){break}else{z=F}}if((F|0)==0){break}do{if((c[(c[(c[j>>2]|0)+112>>2]|0)+12>>2]|0)==0){if((vq(F)|0)<=1){break}zx(c[F+8>>2]|0,b,1)|0;c[(c[(c[j>>2]|0)+112>>2]|0)+12>>2]=F}}while(0);do{if(!p){if((c[(c[(c[j>>2]|0)+112>>2]|0)+12>>2]|0)!=(F|0)){break}xq(q,F);break c}}while(0);wq(q,F)}else{y=c[(c[j>>2]|0)+112>>2]|0;if((c[y+8>>2]|0)==(w|0)){break}v=y+24|0;y=c[v>>2]|0;c[v>>2]=(y|0)<(u|0)?y:u}}while(0);r=sw(a,r,b)|0;if((r|0)==0){break a}}if((A|0)==12){cc(111616,104840,61,170096)}else if((A|0)==13){cc(103904,104840,65,170096)}}}while(0);if((e|0)==0){i=g;return}if((c[(c[(c[j>>2]|0)+112>>2]|0)+12>>2]|0)!=0){i=g;return}e=h|0;h=d+12|0;A=c[h>>2]|0;c[h>>2]=A+1;nb(e|0,145288,(D=i,i=i+8|0,c[D>>2]=A,D)|0)|0;i=D;D=ry(a,e,1)|0;Wx(D|0,120200,272,1)|0;e=tq(D)|0;zx(c[e+8>>2]|0,b,1)|0;c[(c[(c[j>>2]|0)+112>>2]|0)+12>>2]=e;xq(d|0,e);i=g;return}function Eq(a,b,c){a=a|0;b=b|0;c=c|0;Fq(a,b,+h[c+32>>3]);return}function Fq(a,b,d){a=a|0;b=b|0;d=+d;var e=0,f=0,g=0,i=0,j=0,k=0,l=0.0,m=0,n=0.0,o=0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0,w=0,x=0,y=0,z=0,A=0.0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0,H=0,I=0,J=0,K=0,L=0.0,M=0,N=0.0,O=0.0,P=0,Q=0.0,R=0,S=0.0,U=0,X=0.0,Y=0.0,_=0.0,aa=0.0,ba=0.0,ca=0.0,da=0.0,ea=0.0,fa=0,ga=0.0,ha=0,ia=0.0,ja=0.0,ka=0,la=0,ma=0,na=0,oa=0.0,pa=0.0,qa=0,ra=0.0,sa=0.0,ta=0,ua=0.0,va=0.0,wa=0.0,xa=0.0,ya=0.0,za=0.0,Aa=0.0,Ba=0,Ca=0.0,Da=0.0,Ea=0,Fa=0,Ga=0,Ha=0.0,Ia=0.0,Ja=0,Ka=0,La=0,Ma=0.0,Na=0.0,Oa=0,Pa=0.0,Qa=0.0,Ra=0.0,Sa=0.0;e=b+36|0;f=c[e>>2]|0;if((f|0)==0){g=0}else{i=0;j=f;while(1){Fq(a,j,d);f=i+1|0;k=c[j+4>>2]|0;if((k|0)==0){g=f;break}else{i=f;j=k}}}j=yq(a,b,d)|0;c[b+32>>2]=j;a=gr(j)|0;if((g|0)>0){i=jk(g*56|0)|0;k=i;f=c[e>>2]|0;e=b+16|0;l=+h[e>>3];m=c[b>>2]|0;n=6.283185307179586/+(a|0);o=c[j>>2]|0;a:do{if((o|0)==0){p=-1.0;q=-1.0;r=l;s=0.0}else{j=(f|0)==0;t=l+d;if(j){u=t+0.0;v=0;w=0;x=o;while(1){y=c[x>>2]|0;if((c[(c[(c[y+8>>2]|0)+112>>2]|0)+4>>2]&8|0)==0){z=w}else{c[k+(w*56|0)>>2]=y;h[k+(w*56|0)+8>>3]=n*+(v|0);h[k+(w*56|0)+32>>3]=0.0;c[k+(w*56|0)+48>>2]=0;h[k+(w*56|0)+16>>3]=u;h[k+(w*56|0)+24>>3]=0.0;z=w+1|0}y=c[x+4>>2]|0;if((y|0)==0){A=0.0;B=z;break}else{v=v+1|0;w=z;x=y}}}else{x=0;u=0.0;w=0;v=o;while(1){y=c[v>>2]|0;C=x+1|0;if((c[(c[(c[y+8>>2]|0)+112>>2]|0)+4>>2]&8|0)==0){D=w;E=u}else{c[k+(w*56|0)>>2]=y;h[k+(w*56|0)+8>>3]=n*+(x|0);F=0.0;G=0.0;H=0;I=f;while(1){J=c[I>>2]|0;if((J|0)==0){K=0}else{K=c[(c[(c[J+8>>2]|0)+112>>2]|0)+8>>2]|0}if((K|0)==(y|0)){L=+h[I+16>>3];M=H+1|0;N=G+(L*2.0+d);O=F<L?L:F}else{M=H;N=G;O=F}J=c[I+4>>2]|0;if((J|0)==0){break}else{F=O;G=N;H=M;I=J}}h[k+(w*56|0)+32>>3]=N;c[k+(w*56|0)+48>>2]=M;h[k+(w*56|0)+16>>3]=t+O;h[k+(w*56|0)+24>>3]=O;D=w+1|0;E=O}I=c[v+4>>2]|0;if((I|0)==0){A=E;B=D;break}else{x=C;u=E;w=D;v=I}}}do{if((B|0)==1){h[i+40>>3]=1.0;P=1}else if((B|0)==2){u=+h[i+64>>3]- +h[i+8>>3];if(u>3.141592653589793){Q=6.283185307179586-u}else{Q=u}u=+h[i+72>>3];t=+h[i+16>>3];G=(+h[i+32>>3]*u+ +h[i+88>>3]*t)/(u*Q*2.0*t);t=G<1.0?1.0:G;v=i+40|0;if(t>+h[v>>3]){h[v>>3]=t}v=i+96|0;if(t<=+h[v>>3]){R=29;break}h[v>>3]=t;R=29}else{if((B|0)<=0){p=-1.0;q=-1.0;r=l;s=A;break a}v=i+8|0;w=0;x=k;while(1){I=w+1|0;if((I|0)==(B|0)){S=+h[v>>3]- +h[x+8>>3]+6.283185307179586;U=k}else{S=+h[x+64>>3]- +h[x+8>>3];U=x+56|0}t=+h[U+16>>3];G=+h[x+16>>3];u=(+h[x+32>>3]*t+ +h[U+32>>3]*G)/(t*S*2.0*G);G=u<1.0?1.0:u;H=x+40|0;if(G>+h[H>>3]){h[H>>3]=G}H=U+40|0;if(G>+h[H>>3]){h[H>>3]=G}if((I|0)<(B|0)){w=I;x=x+56|0}else{R=29;break}}}}while(0);if((R|0)==29){if((B|0)>0){P=B}else{p=-1.0;q=-1.0;r=l;s=A;break}}x=(a|0)==1;w=(a|0)>1;v=m+8|0;G=-1.0;u=-1.0;t=l;C=0;while(1){I=k+(C*56|0)|0;F=+h[k+(C*56|0)+40>>3]*+h[k+(C*56|0)+16>>3];do{if(x){L=+h[k+(C*56|0)+32>>3];X=L/6.283185307179586;Y=F>X?F:X;X=Y*6.283185307179586-L;if(X<=0.0){_=d;aa=0.0;ba=Y;break}_=X/+(c[k+(C*56|0)+48>>2]|0)+d;aa=0.0;ba=Y}else{_=d;aa=+h[k+(C*56|0)+8>>3]- +h[k+(C*56|0)+32>>3]/(F*2.0);ba=F}}while(0);F=ba+ +h[k+(C*56|0)+24>>3];Y=F>t?F:t;F=_/ba;H=k+(C*56|0)+48|0;y=((c[H>>2]|0)+1|0)/2|0;if(j){ca=0.0;da=u;ea=G}else{J=I|0;X=F*.5;fa=k+(C*56|0)+8|0;L=x?F:X;F=0.0;ga=aa;ha=0;ia=u;ja=G;ka=f;while(1){la=ka|0;ma=c[la>>2]|0;if((ma|0)==0){na=0}else{na=c[(c[(c[ma+8>>2]|0)+112>>2]|0)+8>>2]|0}do{if((na|0)==(c[J>>2]|0)){ma=ka+32|0;if((gr(c[ma>>2]|0)|0)<1){oa=ja;pa=ia;qa=ha;ra=ga;sa=F;break}ta=ka+16|0;ua=+h[ta>>3]/ba;do{if(x){do{if(ga!=0.0){if((c[H>>2]|0)==2){va=3.141592653589793;break}va=ga+ua}else{va=ga}}while(0);wa=va;xa=ia<0.0?va:ia;ya=va}else{if((c[H>>2]|0)==1){wa=ja;xa=ia;ya=+h[fa>>3];break}else{wa=ja;xa=ia;ya=ga+(X+ua);break}}}while(0);za=ba*+V(ya);Aa=ba*+W(ya);Ba=c[ka+8>>2]|0;Ca=+h[ka+48>>3];b:do{if(Ca<0.0){if((gr(c[ma>>2]|0)|0)==2){Da=ya+ -1.5707963267948966;break}Ea=c[la>>2]|0;Fa=Ea+8|0;Ga=c[(c[Fa>>2]|0)+132>>2]|0;Ha=za+ +h[Ga>>3];Ia=Aa+ +h[Ga+8>>3];Ga=ux(Ba)|0;if((Ga|0)==0){Ja=Ea}else{Ka=Ea;La=Ga;Ma=Ha*Ha+Ia*Ia;while(1){do{if((La|0)==(Ea|0)){Na=Ma;Oa=Ka}else{Ga=c[(c[La+8>>2]|0)+132>>2]|0;Ia=za+ +h[Ga>>3];Ha=Aa+ +h[Ga+8>>3];Pa=Ia*Ia+Ha*Ha;if(Pa>=Ma){Na=Ma;Oa=Ka;break}Na=Pa;Oa=La}}while(0);Ga=vx(Ba,La)|0;if((Ga|0)==0){Ja=Oa;break}else{Ka=Oa;La=Ga;Ma=Na}}}if((Ea|0)==(Ja|0)){Da=0.0;break}Ma=+h[ka+24>>3];Pa=+h[ta>>3]-Ma;La=c[Fa>>2]|0;Ka=c[La+132>>2]|0;Ha=+h[Ka>>3];do{if((c[ka+56>>2]&1|0)!=0){if(Ha<=-0.0-Pa){break}Ia=+T(za*za+Aa*Aa);Qa=+$(+(+h[Ka+8>>3]),+(Pa+Ha));Ra=+V(Qa);Da=ya+(1.5707963267948966-Qa- +Z(Ra*((Pa-Ma/Ra)/Ia)));break b}}while(0);Ma=3.141592653589793- +$(+(+h[Ka+8>>3]),+Ha);Pa=ya+(Ma- +h[(c[La+112>>2]|0)+24>>3]);if(Pa<=6.283185307179586){Da=Pa;break}Da=Pa+ -6.283185307179586}else{Pa=ya+(3.141592653589793-Ca);if(Pa>=0.0){Da=Pa;break}Da=Pa+6.283185307179586}}while(0);Gq(ka,za,Aa,Da);Ca=L+ua+ya;ta=ha+1|0;oa=wa;pa=xa;qa=ta;ra=Ca;sa=(ta|0)==(y|0)?Ca:F}else{oa=ja;pa=ia;qa=ha;ra=ga;sa=F}}while(0);la=c[ka+4>>2]|0;if((la|0)==0){ca=sa;da=pa;ea=oa;break}else{F=sa;ga=ra;ha=qa;ia=pa;ja=oa;ka=la}}}do{if(w){if((c[I>>2]|0)!=(m|0)){break}h[(c[(c[v>>2]|0)+112>>2]|0)+24>>3]=ca}}while(0);I=C+1|0;if((I|0)<(P|0)){G=ea;u=da;t=Y;C=I}else{p=ea;q=da;r=Y;s=A;break}}}}while(0);eF(i);if((g|0)==1){A=d*.5+s;Gq(b,-0.0-A,0.0,0.0);h[e>>3]=A+ +h[e>>3];g=b+56|0;c[g>>2]=c[g>>2]|1}else{h[e>>3]=r}Sa=(q+p)*.5+ -3.141592653589793}else{Sa=3.141592653589793}if((a|0)!=1){return}a=c[b>>2]|0;if((a|0)==0){return}if((c[(c[(c[a+8>>2]|0)+112>>2]|0)+8>>2]|0)==0){return}a=b+48|0;h[a>>3]=Sa;if(Sa>=0.0){return}h[a>>3]=Sa+6.283185307179586;return}function Gq(a,b,d,e){a=a|0;b=+b;d=+d;e=+e;var f=0,g=0,i=0,j=0,k=0,l=0,m=0.0,n=0.0,o=0.0,p=0.0,q=0;f=c[a+8>>2]|0;g=ux(f)|0;if((g|0)!=0){if(e!=0.0){i=g;do{j=i+8|0;k=c[(c[j>>2]|0)+132>>2]|0;l=k;m=+h[l>>3];n=+h[k+8>>3];o=+V(e);p=+W(e);h[l>>3]=m*o-n*p+b;h[(c[(c[j>>2]|0)+132>>2]|0)+8>>3]=n*o+m*p+d;i=vx(f,i)|0;}while((i|0)!=0)}else{i=g;do{g=i+8|0;j=c[(c[g>>2]|0)+132>>2]|0;l=j;p=+h[j+8>>3];h[l>>3]=+h[l>>3]+b;h[(c[(c[g>>2]|0)+132>>2]|0)+8>>3]=p+d;i=vx(f,i)|0;}while((i|0)!=0)}}i=c[a+36>>2]|0;if((i|0)==0){return}else{q=i}do{Gq(q,b,d,e);q=c[q+4>>2]|0;}while((q|0)!=0);return}function Hq(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0;d=i;i=i+128|0;e=(Lw(a)|0)==1;f=(ux(a)|0)+8|0;g=c[f>>2]|0;if(e){h[c[g+132>>2]>>3]=0.0;h[(c[(c[f>>2]|0)+132>>2]|0)+8>>3]=0.0;i=d;return}f=Hx(c[c[g+112>>2]>>2]|0)|0;if((f|0)==(c[44682]|0)){j=0;k=f}else{c[45219]=0;c[44682]=f;g=Wv(f,0,131232,0)|0;c[44686]=Wv(c[44682]|0,1,116448,0)|0;c[44684]=Wv(c[44682]|0,1,109176,0)|0;j=g;k=c[44682]|0}c[44680]=ew(k|0,109176)|0;h[2694]=+Fm(c[44682]|0,j,1.0,0.0);sq(180864);c[45218]=1;h[22612]=+h[2694];c[45220]=c[44686];c[45221]=c[44684];c[45222]=c[44680];do{if((Km(ew(b|0,159688)|0)|0)<<24>>24==0){l=Bq(a,180864)|0}else{j=d|0;k=c[45219]|0;c[45219]=k+1;nb(j|0,163248,(g=i,i=i+8|0,c[g>>2]=k,g)|0)|0;i=g;g=tq(ry(a,j,1)|0)|0;j=ux(a)|0;if((j|0)==0){l=g;break}k=g+8|0;f=j;while(1){zx(c[k>>2]|0,f,1)|0;c[(c[(c[f+8>>2]|0)+112>>2]|0)+12>>2]=g;j=vx(a,f)|0;if((j|0)==0){l=g;break}else{f=j}}}}while(0);Eq(a,l,180864);Cq(l);i=d;return}function Iq(a){a=a|0;var d=0,e=0,f=0,g=0,i=0,j=0,k=0.0;qn(a,2);d=a+8|0;b[(c[d>>2]|0)+168>>1]=2;c[53568]=2;e=jk((Lw(a)|0)<<2)|0;f=jk(((Lw(a)|0)<<2)+4|0)|0;c[(c[d>>2]|0)+144>>2]=f;f=ux(a)|0;if((f|0)!=0){g=0;i=f;while(1){qt(i);c[(c[i+8>>2]|0)+112>>2]=e+(g<<2);c[(c[(c[d>>2]|0)+144>>2]|0)+(g<<2)>>2]=i;f=vx(a,i)|0;if((f|0)==0){break}else{g=g+1|0;i=f}}}i=ux(a)|0;if((i|0)==0){return}else{j=i}do{i=mw(a,j)|0;if((i|0)!=0){g=i;do{i=g|0;Wx(i,130336,176,1)|0;Zm(g)|0;k=+Fm(i,c[53750]|0,1.0,0.0);h[(c[g+8>>2]|0)+128>>3]=k;g=ow(a,g)|0;}while((g|0)!=0)}j=vx(a,j)|0;}while((j|0)!=0);return}function Jq(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=i;i=i+8|0;e=d|0;f=Hw(142352,173928,0)|0;Wx(f|0,161376,272,1)|0;c[(c[a+8>>2]|0)+132>>2]=f;g=ux(a)|0;if((g|0)!=0){j=g;do{g=j+8|0;if((c[c[(c[g>>2]|0)+112>>2]>>2]|0)==0){k=Ax(f,$w(j|0)|0,1)|0;Wx(k|0,108856,304,1)|0;l=jk(40)|0;m=k+8|0;c[(c[m>>2]|0)+112>>2]=l;l=jk(c[53568]<<3)|0;c[(c[m>>2]|0)+132>>2]=l;l=j+8|0;h[(c[m>>2]|0)+88>>3]=+h[(c[l>>2]|0)+88>>3];h[(c[m>>2]|0)+96>>3]=+h[(c[l>>2]|0)+96>>3];h[(c[m>>2]|0)+80>>3]=+h[(c[l>>2]|0)+80>>3];c[c[(c[m>>2]|0)+112>>2]>>2]=j;c[c[(c[g>>2]|0)+112>>2]>>2]=k}j=vx(a,j)|0;}while((j|0)!=0)}j=ux(a)|0;if((j|0)!=0){k=j;do{j=mw(a,k)|0;if((j|0)!=0){g=j;do{j=c[g>>2]&3;m=c[c[(c[(c[((j|0)==3?g:g+32|0)+28>>2]|0)+8>>2]|0)+112>>2]>>2]|0;l=c[c[(c[(c[((j|0)==2?g:g-32|0)+28>>2]|0)+8>>2]|0)+112>>2]>>2]|0;if((m|0)!=(l|0)){Wx(uw(f,m,l,0,1)|0,130336,176,1)|0}g=ow(a,g)|0;}while((g|0)!=0)}k=vx(a,k)|0;}while((k|0)!=0)}k=iv(f,e,0)|0;if((c[e>>2]|0)>0){g=0;do{l=c[k+(g<<2)>>2]|0;m=ux(l)|0;if((m|0)!=0){j=m;do{m=mw(a,c[c[(c[j+8>>2]|0)+112>>2]>>2]|0)|0;if((m|0)!=0){n=m;do{m=c[c[(c[(c[((c[n>>2]&3|0)==2?n:n-32|0)+28>>2]|0)+8>>2]|0)+112>>2]>>2]|0;if((j|0)!=(m|0)){o=uw(f,j,m,0,1)|0;Wx(o|0,130336,176,1)|0;xw(l,o,1)|0}n=ow(a,n)|0;}while((n|0)!=0)}j=vx(l,j)|0;}while((j|0)!=0)}g=g+1|0;}while((g|0)<(c[e>>2]|0))}g=ux(f)|0;if((g|0)==0){p=c[e>>2]|0;c[b>>2]=p;i=d;return k|0}else{q=g}do{g=mw(f,q)|0;if((g|0)!=0){a=g;do{g=jk(8)|0;c[(c[a+8>>2]|0)+120>>2]=g;a=ow(f,a)|0;}while((a|0)!=0)}q=vx(f,q)|0;}while((q|0)!=0);p=c[e>>2]|0;c[b>>2]=p;i=d;return k|0}function Kq(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;b=i;i=i+40|0;d=b|0;e=b+8|0;if((Lw(a)|0)==0){i=b;return}f=Jq(a,d)|0;g=c[d>>2]|0;d=c[f>>2]|0;do{if((g|0)==1){Hq(d,a);j=c[f>>2]|0;k=ux(j)|0;if((k|0)!=0){l=k;do{k=l+8|0;m=c[k>>2]|0;n=(c[c[m+112>>2]>>2]|0)+8|0;h[c[(c[n>>2]|0)+132>>2]>>3]=+h[c[m+132>>2]>>3];h[(c[(c[n>>2]|0)+132>>2]|0)+8>>3]=+h[(c[(c[k>>2]|0)+132>>2]|0)+8>>3];l=vx(j,l)|0;}while((l|0)!=0)}nr(a)|0}else{l=c[d+48>>2]|0;tv(a,2,8,e)|0;j=(g|0)>0;if(j){o=0}else{sv(g,f,l,e)|0;break}do{k=c[f+(o<<2)>>2]|0;Hq(k,a);nr(k)|0;o=o+1|0;}while((o|0)<(g|0));sv(g,f,l,e)|0;if(j){p=0}else{break}do{k=c[f+(p<<2)>>2]|0;n=ux(k)|0;if((n|0)!=0){m=n;do{n=m+8|0;q=c[n>>2]|0;r=(c[c[q+112>>2]>>2]|0)+8|0;h[c[(c[r>>2]|0)+132>>2]>>3]=+h[c[q+132>>2]>>3];h[(c[(c[r>>2]|0)+132>>2]|0)+8>>3]=+h[(c[(c[n>>2]|0)+132>>2]|0)+8>>3];m=vx(k,m)|0;}while((m|0)!=0)}p=p+1|0;}while((p|0)<(g|0))}}while(0);eF(f);i=b;return}function Lq(a){a=a|0;if((Lw(a)|0)==0){return}Iq(a);Kq(a);eF(c[(c[(ux(a)|0)+8>>2]|0)+112>>2]|0);Pt(a);Xk(a);return}function Mq(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=ux(a)|0;if((b|0)==0){return}d=a+8|0;e=c[(c[d>>2]|0)+132>>2]|0;f=ux(e)|0;if((f|0)!=0){g=f;do{f=mw(e,g)|0;if((f|0)!=0){h=f;do{eF(c[(c[h+8>>2]|0)+120>>2]|0);h=ow(e,h)|0;}while((h|0)!=0)}h=g+8|0;eF(c[(c[h>>2]|0)+112>>2]|0);eF(c[(c[h>>2]|0)+132>>2]|0);g=vx(e,g)|0;}while((g|0)!=0)}Kw(e)|0;e=b;do{b=mw(a,e)|0;if((b|0)!=0){g=b;do{tn(g);g=ow(a,g)|0;}while((g|0)!=0)}un(e);e=vx(a,e)|0;}while((e|0)!=0);eF(c[(c[d>>2]|0)+144>>2]|0);if((Ix(a|0)|0)==(a|0)){return}_x(a,0,116128);return}function Nq(){return $g(17840,c[43330]|0)|0}function Oq(a){a=a|0;Vg(a)|0;return}function Pq(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=i;i=i+16|0;e=d|0;f=b+8|0;c[e+8>>2]=c[(c[f>>2]|0)+236>>2];g=(Hc[c[a>>2]&63](a,e,1)|0)+12|0;c[(c[f>>2]|0)+164>>2]=c[g>>2];c[g>>2]=b;i=d;return}function Qq(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;d=i;i=i+16|0;e=d|0;f=b+8|0;c[e+8>>2]=c[(c[f>>2]|0)+236>>2];g=a|0;h=Hc[c[g>>2]&63](a,e,4)|0;if((h|0)==0){cc(129488,159160,107,170032)}e=h+12|0;j=c[e>>2]|0;if((j|0)==(b|0)){k=c[(c[f>>2]|0)+164>>2]|0;c[e>>2]=k;if((k|0)!=0){i=d;return}Hc[c[g>>2]&63](a,h,2)|0;i=d;return}h=c[(c[j+8>>2]|0)+164>>2]|0;a=h;g=(h|0)!=0;if(g&(a|0)!=(b|0)){k=h;e=a;while(1){a=c[(c[k+8>>2]|0)+164>>2]|0;f=a;l=(a|0)!=0;if(l&(f|0)!=(b|0)){k=a;e=f}else{m=e;n=a;o=l;break}}}else{m=j;n=h;o=g}if(!o){i=d;return}c[(c[m+8>>2]|0)+164>>2]=c[(c[n+8>>2]|0)+164>>2];i=d;return}function Rq(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=a|0;d=Hc[c[b>>2]&63](a,0,128)|0;if((d|0)==0){e=0;return e|0}f=d+12|0;g=c[f>>2]|0;h=c[(c[g+8>>2]|0)+164>>2]|0;c[f>>2]=h;if((h|0)!=0){e=g;return e|0}Hc[c[b>>2]&63](a,d,2)|0;e=g;return e|0}function Sq(a,b,d){a=a|0;b=b|0;d=d|0;d=kk(16)|0;c[d+12>>2]=0;c[d+8>>2]=c[b+8>>2];return d|0}function Tq(a,b,c){a=a|0;b=b|0;c=c|0;eF(b);return}function Uq(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0;e=c[b>>2]|0;b=c[d>>2]|0;if((e|0)<(b|0)){f=-1;return f|0}f=(e|0)>(b|0)|0;return f|0}function Vq(){return $g(173264,c[43330]|0)|0}function Wq(a){a=a|0;Vg(a)|0;return}function Xq(a,b){a=a|0;b=b|0;var d=0,e=0;d=i;i=i+16|0;e=d|0;c[e+8>>2]=b;Hc[c[a>>2]&63](a,e,1)|0;i=d;return}function Yq(a,b){a=a|0;b=b|0;var d=0,e=0;d=i;i=i+16|0;e=d|0;c[e+8>>2]=b;Hc[c[a>>2]&63](a,e,2)|0;i=d;return}function Zq(a,b,d){a=a|0;b=b|0;d=d|0;d=kk(12)|0;c[d+8>>2]=c[b+8>>2];return d|0}function _q(a,b,c){a=a|0;b=b|0;c=c|0;eF(b);return}function $q(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0;e=c[b>>2]|0;b=c[d>>2]|0;if(e>>>0>b>>>0){f=1;return f|0}f=(e>>>0<b>>>0)<<31>>31;return f|0}function ar(){return jk(12)|0}function br(a){a=a|0;var b=0,d=0;if((a|0)==0){return}b=c[a>>2]|0;if((b|0)!=0){d=b;while(1){b=c[d+4>>2]|0;eF(d);if((b|0)==0){break}else{d=b}}}eF(a);return}function cr(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=jk(12)|0;f=e;c[e>>2]=d;d=a+8|0;c[d>>2]=(c[d>>2]|0)+1;d=c[a+4>>2]|0;if(!((b|0)==0|(d|0)==(b|0))){g=b+4|0;h=c[g>>2]|0;c[g>>2]=f;c[e+8>>2]=b;c[h+8>>2]=f;c[e+4>>2]=h;return}if((d|0)==0){c[a>>2]=f}else{c[d+4>>2]=f}c[e+8>>2]=d;c[e+4>>2]=0;c[a+4>>2]=f;return}function dr(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=a|0;e=c[d>>2]|0;if((e|0)==(b|0)){return}f=b+8|0;g=c[f>>2]|0;c[d>>2]=b;c[f>>2]=0;f=a+4|0;c[(c[f>>2]|0)+4>>2]=e;c[e+8>>2]=c[f>>2];c[f>>2]=g;c[g+4>>2]=0;return}function er(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;b=jk(12)|0;d=b;e=c[a>>2]|0;if((e|0)==0){return d|0}a=b+8|0;f=b+4|0;g=b;b=0;h=e;while(1){e=c[h>>2]|0;i=jk(12)|0;j=i;c[i>>2]=e;c[a>>2]=(c[a>>2]|0)+1;e=c[f>>2]|0;if((b|0)==0|(e|0)==(b|0)){if((e|0)==0){c[g>>2]=j}else{c[e+4>>2]=j}c[i+8>>2]=e;c[i+4>>2]=0;c[f>>2]=j;k=j}else{e=b+4|0;l=c[e>>2]|0;c[e>>2]=j;c[i+8>>2]=b;c[l+8>>2]=j;c[i+4>>2]=l;k=c[f>>2]|0}l=c[h+4>>2]|0;if((l|0)==0){break}else{b=k;h=l}}return d|0}function fr(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;f=a|0;g=c[f>>2]|0;if((g|0)==0){cc(107032,150440,217,170480)}else{h=g}while(1){if((c[h>>2]|0)==(b|0)){break}g=c[h+4>>2]|0;if((g|0)==0){i=12;break}else{h=g}}if((i|0)==12){cc(107032,150440,217,170480)}b=h+8|0;g=c[b>>2]|0;j=h+4|0;k=c[j>>2]|0;if((g|0)==0){c[f>>2]=k}else{c[g+4>>2]=k}if((k|0)==0){c[a+4>>2]=g}else{c[k+8>>2]=g}if((h|0)==0){cc(107032,150440,217,170480)}g=c[f>>2]|0;if((g|0)==0){return}else{l=0;m=g}while(1){if((c[m>>2]|0)==(d|0)){break}k=c[m+4>>2]|0;if((k|0)==0){i=22;break}else{l=m;m=k}}if((i|0)==22){return}if((e|0)==0){if((m|0)==(g|0)){c[f>>2]=h;c[j>>2]=g;c[b>>2]=0;c[g+8>>2]=h;return}else{c[l+4>>2]=h;c[b>>2]=l;c[j>>2]=m;c[m+8>>2]=h;return}}else{l=a+4|0;if((m|0)==(c[l>>2]|0)){c[l>>2]=h;c[j>>2]=0;c[b>>2]=m;c[m+4>>2]=h;return}else{c[b>>2]=m;b=m+4|0;c[j>>2]=c[b>>2];c[(c[b>>2]|0)+8>>2]=h;c[b>>2]=h;return}}}function gr(a){a=a|0;return c[a+8>>2]|0}function hr(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;d=b|0;e=c[d>>2]|0;if((e|0)==0){f=0}else{g=e;while(1){e=g+4|0;h=c[e>>2]|0;i=g+8|0;c[e>>2]=c[i>>2];c[i>>2]=h;if((h|0)==0){break}else{g=h}}f=c[d>>2]|0}g=b+4|0;h=c[g>>2]|0;c[g>>2]=f;c[d>>2]=h;if((h|0)==0){j=b;eF(j);return}f=a+4|0;c[(c[f>>2]|0)+4>>2]=h;c[(c[d>>2]|0)+8>>2]=c[f>>2];c[f>>2]=c[g>>2];g=a+8|0;c[g>>2]=(c[g>>2]|0)+(c[b+8>>2]|0);j=b;eF(j);return}function ir(b){b=b|0;var d=0,e=0,f=0,g=0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0,q=0,r=0,s=0,t=0;d=i;i=i+8|0;e=d|0;f=ew(b|0,105224)|0;if((f|0)==0){g=0;i=d;return g|0}if((a[f]|0)==0){g=0;i=d;return g|0}j=+sF(f,e);do{if((c[e>>2]|0)==(f|0)){if((Km(f)|0)<<24>>24==0){g=0}else{k=0.0;break}i=d;return g|0}else{if(j>180.0){l=j;while(1){m=l+-360.0;if(m>180.0){l=m}else{n=m;break}}}else{n=j}if(n>-180.0){k=n;break}else{o=n}while(1){l=o+360.0;if(l>-180.0){k=l;break}else{o=l}}}}while(0);o=k/180.0*3.141592653589793;f=c[(c[(ux(b)|0)+8>>2]|0)+132>>2]|0;k=+h[f>>3];n=+h[f+8>>3];f=ux(b)|0;if((f|0)!=0){e=f;do{f=e+8|0;p=c[(c[f>>2]|0)+132>>2]|0;h[p>>3]=+h[p>>3]-k;p=(c[(c[f>>2]|0)+132>>2]|0)+8|0;h[p>>3]=+h[p>>3]-n;e=vx(b,e)|0;}while((e|0)!=0)}e=(k!=0.0|n!=0.0)&1;p=ux(b)|0;if((p|0)==0){g=e;i=d;return g|0}else{q=p}while(1){r=mw(b,q)|0;if((r|0)!=0){break}p=vx(b,q)|0;if((p|0)==0){g=e;s=17;break}else{q=p}}if((s|0)==17){i=d;return g|0}s=c[r>>2]&3;q=c[(c[(c[((s|0)==2?r:r-32|0)+28>>2]|0)+8>>2]|0)+132>>2]|0;p=c[(c[(c[((s|0)==3?r:r+32|0)+28>>2]|0)+8>>2]|0)+132>>2]|0;n=+h[p+8>>3];k=+h[p>>3];j=o- +$(+(+h[q+8>>3]-n),+(+h[q>>3]-k));if(j==0.0){g=e;i=d;return g|0}o=+V(j);l=+W(j);e=ux(b)|0;if((e|0)==0){g=1;i=d;return g|0}else{t=e}while(1){e=t+8|0;q=c[(c[e>>2]|0)+132>>2]|0;p=q;j=+h[p>>3]-k;m=+h[q+8>>3]-n;h[p>>3]=k+(o*j-l*m);h[(c[(c[e>>2]|0)+132>>2]|0)+8>>3]=n+(l*j+o*m);e=vx(b,t)|0;if((e|0)==0){g=1;break}else{t=e}}i=d;return g|0}function jr(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;d=ew(a|0,108352)|0;if((d|0)==0){e=(c|0)!=0?c:213376}else{e=d}return kr(a,e,b)|0}function kr(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;f=i;i=i+8|0;g=f|0;do{if((d|0)!=0){if((a[d]|0)==0){break}else{j=74640;k=129464}while(1){l=j+16|0;if((qm(d,k,c[j+8>>2]|0)|0)==0){m=6;break}n=c[j+20>>2]|0;if((n|0)==0){o=l;break}else{j=l;k=n}}do{if((m|0)==6){if((c[j+12>>2]|0)==0){Fv(0,142304,(p=i,i=i+8|0,c[p>>2]=k,p)|0)|0;i=p;q=74640}else{q=j}n=q|0;c[e>>2]=c[n>>2];c[e+4>>2]=c[q+12>>2];if((c[n>>2]|0)!=18){o=q;break}n=ac(d+(c[q+8>>2]|0)|0,136656,(p=i,i=i+8|0,c[p>>2]=g,p)|0)|0;i=p;l=c[g>>2]|0;c[e+8>>2]=(n|0)>0&(l|0)>-1?l:1e3;h[e+16>>3]=+Fm(b|0,Wv(b,0,133752,0)|0,-4.0,-1.0e10);o=q}}while(0);if((c[o+4>>2]|0)!=0){i=f;return e|0}l=Vm(d,63)|0;do{if(l<<24>>24==63){Fv(0,139200,(p=i,i=i+8|0,c[p>>2]=d,p)|0)|0;i=p;r=e|0}else{n=e|0;if(l<<24>>24==0){r=n;break}c[n>>2]=0;c[e+4>>2]=131664;i=f;return e|0}}while(0);c[r>>2]=1;c[e+4>>2]=126224;i=f;return e|0}}while(0);c[e>>2]=0;c[e+4>>2]=131664;i=f;return e|0}function lr(b,d){b=b|0;d=d|0;var e=0,f=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0.0,u=0.0,v=0,w=0.0,x=0.0,y=0,z=0,A=0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0,P=0.0,Q=0.0,R=0.0,T=0.0,U=0.0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0.0,ma=0.0,na=0.0,oa=0,pa=0,qa=0,ra=0.0,sa=0.0,ta=0.0,ua=0.0,va=0.0,wa=0,xa=0,ya=0;e=i;i=i+16|0;f=e|0;if((Lw(b)|0)<2){j=0;i=e;return j|0}k=ir(b)|0;l=d|0;m=c[l>>2]|0;if((m|0)==0){j=k;i=e;return j|0}if((a[213992]|0)==0){n=m}else{m=c[o>>2]|0;p=$w(b|0)|0;q=c[d+4>>2]|0;gc(m|0,97152,(r=i,i=i+16|0,c[r>>2]=p,c[r+8>>2]=q,r)|0)|0;i=r;n=c[l>>2]|0}if(n>>>0>2>>>0){switch(n|0){case 4:{s=Jr(b,0)|0;break};case 12:case 11:case 13:case 14:case 8:case 7:case 9:case 10:{Cr(b,n)|0;s=0;break};case 5:case 6:{s=0;break};case 3:{s=Jr(b,1)|0;break};case 15:{s=Jr(b,-1)|0;break};default:{Fv(0,91656,(r=i,i=i+8|0,c[r>>2]=c[d+4>>2],r)|0)|0;i=r;s=0}}j=s+k|0;i=e;return j|0}c[44272]=Lw(b)|0;Zr();c[44274]=kk((c[44272]|0)*96|0)|0;s=ux(b)|0;d=c[44274]|0;or(f,b);t=+g[f>>2];u=+g[f+4>>2];if((a[f+8|0]|0)==0){v=4;w=t;x=u}else{v=2;w=t/72.0;x=u/72.0}f=c[44272]|0;a:do{if((f|0)>0){n=s;q=0;p=d;while(1){m=n+8|0;h[p+8>>3]=+h[c[(c[m>>2]|0)+132>>2]>>3];h[p+16>>3]=+h[(c[(c[m>>2]|0)+132>>2]|0)+8>>3];if((Fc[v&7](p+40|0,n,w,x)|0)!=0){break}c[p+24>>2]=q;c[p+28>>2]=1;c[p>>2]=n;c[p+88>>2]=0;m=vx(b,n)|0;y=q+1|0;z=c[44272]|0;if((y|0)<(z|0)){n=m;q=y;p=p+96|0}else{A=z;break a}}eF(c[44274]|0);c[44274]=0;if((c[44272]|0)>0){p=0;q=0;while(1){Xt(q+40|0);n=p+1|0;if((n|0)<(c[44272]|0)){p=n;q=q+96|0}else{break}}}Wt();xs();eF(c[44274]|0);eF(c[43762]|0);c[43762]=0;j=k;i=e;return j|0}else{A=f}}while(0);f=c[44274]|0;x=+h[f+8>>3];w=+h[f+16>>3];u=x+ +h[f+40>>3];t=w+ +h[f+48>>3];B=x+ +h[f+56>>3];x=w+ +h[f+64>>3];if((A|0)>1){w=x;C=t;D=B;E=u;v=1;d=f;while(1){F=+h[d+104>>3];G=+h[d+112>>3];H=F+ +h[d+136>>3];I=G+ +h[d+144>>3];J=F+ +h[d+152>>3];F=G+ +h[d+160>>3];G=H<E?H:E;H=I<C?I:C;I=J>D?J:D;J=F>w?F:w;f=v+1|0;if((f|0)<(A|0)){w=J;C=H;D=I;E=G;v=f;d=d+96|0}else{K=J;L=H;M=I;N=G;break}}}else{K=x;L=t;M=B;N=u}d=ew(b|0,145272)|0;do{if((d|0)!=0){if((a[d]|0)==0){break}h[2485]=+rF(d)}}while(0);u=+h[2485];B=(K-L)*u;t=(M-N)*u;u=N-t;N=L-B;L=M+t;t=K+B;h[1539]=u;h[1540]=L;h[1537]=N;h[1538]=t;h[21847]=u;h[22132]=u;h[21884]=L;h[22143]=L;h[22144]=t;h[22133]=t;h[21885]=N;h[21848]=N;d=(c[l>>2]|0)==2;l=qr(0)|0;b=(l|0)==0;do{if(d){if(b){O=71;break}rr();v=0;do{if((c[44272]|0)>0){A=c[44274]|0;f=0;while(1){s=A+8|0;h[s>>3]=+h[s>>3]*1.05;s=A+16|0;h[s>>3]=+h[s>>3]*1.05;s=f+1|0;if((s|0)<(c[44272]|0)){A=A+96|0;f=s}else{break}}}v=v+1|0;}while((qr(v)|0)!=0);if((a[213992]|0)==0){O=72;break}gc(c[o>>2]|0,154672,(r=i,i=i+8|0,c[r>>2]=v,r)|0)|0;i=r;O=72}else{if(b){O=71;break}rr();f=c[43762]|0;N=+h[c[f>>2]>>3];h[10]=N;t=+h[c[f>>2]>>3];h[11]=t;A=c[44272]|0;if((A|0)>1){s=1;L=N;u=t;while(1){q=f+(s<<2)|0;B=+h[c[q>>2]>>3];if(B<L){h[10]=B;P=B;Q=+h[c[q>>2]>>3]}else{P=L;Q=B}if(Q>u){h[11]=Q;R=Q}else{R=u}q=s+1|0;if((q|0)<(A|0)){s=q;L=P;u=R}else{T=R;U=P;break}}}else{T=t;U=N}u=+h[(c[f>>2]|0)+8>>3];h[8]=u;L=+h[(c[f+(A-1<<2)>>2]|0)+8>>3];h[9]=L;h[3711]=L-u;h[3712]=T-U;Iu(0,2);s=0;v=1;q=l;p=1;while(1){n=c[44274]|0;z=n+8|0;u=+_r(z,174776);L=+_r(z,177056);B=+_r(z,175072);K=+_r(z,177144);if((c[44272]|0)>1){z=n;y=n;m=n;V=n;M=u;u=L;L=B;B=K;W=1;X=n;while(1){Y=X+96|0;Z=X+104|0;K=+_r(Z,174776);_=K<M;$=_?Y:z;x=+_r(Z,175072);aa=x<L;ba=aa?Y:m;E=+_r(Z,177056);ca=E<u;da=ca?Y:y;D=+_r(Z,177144);Z=D<B;ea=Z?Y:V;fa=W+1|0;if((fa|0)<(c[44272]|0)){z=$;y=da;m=ba;V=ea;M=_?K:M;u=ca?E:u;L=aa?x:L;B=Z?D:B;W=fa;X=Y}else{ga=$;ha=da;ia=ba;ja=ea;break}}}else{ga=n;ha=n;ia=n;ja=n}ys(ga+8|0,+h[21847],+h[21848]);ys(ia+8|0,+h[21884],+h[21885]);ys(ha+8|0,+h[22132],+h[22133]);ys(ja+8|0,+h[22143],+h[22144]);X=c[44272]|0;if((X|0)>0){W=a[28952]|0;V=0;m=n;y=X;while(1){if(W){O=49}else{if((c[m+32>>2]|0)==0){ka=y}else{O=49}}if((O|0)==49){O=0;X=c[m+88>>2]|0;z=c[X>>2]|0;ea=c[z>>2]|0;if((ea|0)==0){la=0.0;ma=0.0;na=0.0}else{B=+h[X+8>>3];L=+h[X+16>>3];u=0.0;M=0.0;D=0.0;X=ea;x=+h[z+8>>3];E=+h[z+16>>3];while(1){K=+h[X+8>>3];C=+h[X+16>>3];w=+S(+((L-E)*K+(B*(E-C)+x*(C-L))))*.5;G=M+w*((B+x+K)/3.0);I=D+w*((L+E+C)/3.0);H=u+w;z=c[X>>2]|0;if((z|0)==0){la=H;ma=G;na=I;break}else{u=H;M=G;D=I;X=z;x=K;E=C}}}h[m+8>>3]=ma/la;h[m+16>>3]=na/la;ka=c[44272]|0}X=V+1|0;if((X|0)<(ka|0)){V=X;m=m+96|0;y=ka}else{break}}}y=qr(p)|0;if((y|0)==0){break}m=(y|0)<(q|0)?0:v;a[28952]=1;if((m|0)==0){oa=s}else{E=+h[1540];x=+h[1538];D=+h[1539];M=+h[1537];u=(x-M)*.05;L=(E-D)*.05;B=E+L;E=x+u;x=D-L;L=M-u;h[1539]=x;h[1540]=B;h[1537]=L;h[1538]=E;h[21847]=x;h[22132]=x;h[21884]=B;h[22143]=B;h[22144]=E;h[22133]=E;h[21885]=L;h[21848]=L;oa=s+1|0}V=c[43762]|0;if((V|0)==0){W=kk(c[44272]<<2)|0;c[43762]=W;c[45154]=W+(c[44272]<<2);pa=W}else{pa=V}V=c[44274]|0;xs();W=c[44272]|0;if((W|0)>0){n=0;X=pa;z=V;while(1){c[X>>2]=z+8;c[z+88>>2]=0;c[z+28>>2]=1;V=n+1|0;ea=c[44272]|0;if((V|0)<(ea|0)){n=V;X=X+4|0;z=z+96|0}else{qa=ea;break}}}else{qa=W}Jb(c[43762]|0,qa|0,4,138);z=c[43762]|0;c[44278]=z;L=+h[c[z>>2]>>3];h[10]=L;E=+h[c[z>>2]>>3];h[11]=E;X=c[44272]|0;if((X|0)>1){n=1;B=L;x=E;while(1){ea=z+(n<<2)|0;u=+h[c[ea>>2]>>3];if(u<B){h[10]=u;ra=u;sa=+h[c[ea>>2]>>3]}else{ra=B;sa=u}if(sa>x){h[11]=sa;ta=sa}else{ta=x}ea=n+1|0;if((ea|0)<(X|0)){n=ea;B=ra;x=ta}else{ua=ta;va=ra;break}}}else{ua=E;va=L}x=+h[(c[z>>2]|0)+8>>3];h[8]=x;B=+h[(c[z+(X-1<<2)>>2]|0)+8>>3];h[9]=B;h[3711]=B-x;h[3712]=ua-va;Iu(0,2);s=oa;v=m+1|0;q=y;p=p+1|0}if((a[213992]|0)!=0){q=c[o>>2]|0;gc(q|0,154672,(r=i,i=i+8|0,c[r>>2]=p,r)|0)|0;i=r;gc(q|0,151384,(r=i,i=i+8|0,c[r>>2]=s,r)|0)|0;i=r}js();ls();au();Tr();O=72}}while(0);do{if((O|0)==71){wa=0;xa=c[44272]|0;O=75}else if((O|0)==72){if((c[44272]|0)<=0){ya=1;break}r=0;oa=c[44274]|0;while(1){qa=oa|0;h[c[(c[(c[qa>>2]|0)+8>>2]|0)+132>>2]>>3]=+h[oa+8>>3];h[(c[(c[(c[qa>>2]|0)+8>>2]|0)+132>>2]|0)+8>>3]=+h[oa+16>>3];qa=r+1|0;pa=c[44272]|0;if((qa|0)<(pa|0)){r=qa;oa=oa+96|0}else{wa=1;xa=pa;O=75;break}}}}while(0);do{if((O|0)==75){if((xa|0)<=0){ya=wa;break}oa=0;r=c[44274]|0;while(1){Xt(r+40|0);s=oa+1|0;if((s|0)<(c[44272]|0)){oa=s;r=r+96|0}else{ya=wa;break}}}}while(0);Wt();xs();eF(c[44274]|0);eF(c[43762]|0);c[43762]=0;j=ya+k|0;i=e;return j|0}function mr(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=i;i=i+24|0;d=c|0;if((Lw(a)|0)<2){e=0}else{kr(a,b,d)|0;e=lr(a,d)|0}i=c;return e|0}function nr(a){a=a|0;var b=0,c=0,d=0,e=0;b=i;i=i+24|0;c=b|0;d=ew(a|0,108352)|0;if((Lw(a)|0)<2){e=0}else{kr(a,d,c)|0;e=lr(a,c)|0}i=b;return e|0}function or(b,d){b=b|0;d=d|0;var e=0,f=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0.0,x=0.0,y=0.0,z=0.0,A=0,B=0,C=0.0;e=i;i=i+40|0;f=e|0;j=e+8|0;k=e+16|0;l=e+24|0;m=e+32|0;n=d|0;d=ew(n,86424)|0;do{if((d|0)==0){p=10}else{q=d;while(1){r=q+1|0;if((Qa(a[q]|0)|0)==0){break}else{q=r}}s=(a[q]|0)==43;t=s&1;u=ac((s?r:q)|0,159680,(v=i,i=i+16|0,c[v>>2]=k,c[v+8>>2]=l,v)|0)|0;i=v;if((u|0)==1){w=+g[k>>2];g[l>>2]=w;x=w}else if((u|0)==0){p=10;break}else{x=+g[k>>2]}if(s){y=x;z=+g[l>>2];A=t;break}else{y=x+1.0;z=+g[l>>2]+1.0;A=t;break}}}while(0);do{if((p|0)==10){l=ew(n,81608)|0;if((l|0)==0){y=4.0;z=4.0;A=1;break}k=l;while(1){B=k+1|0;if((Qa(a[k]|0)|0)==0){break}else{k=B}}q=(a[k]|0)==43;l=q&1;r=ac((q?B:k)|0,159680,(v=i,i=i+16|0,c[v>>2]=f,c[v+8>>2]=j,v)|0)|0;i=v;if((r|0)==1){x=+g[f>>2];g[j>>2]=x;C=x}else if((r|0)==0){y=4.0;z=4.0;A=1;break}else{C=+g[f>>2]}x=C/.800000011920929;if(q){y=x;z=+g[j>>2]/.800000011920929;A=l;break}else{y=x+1.0;z=+g[j>>2]/.800000011920929+1.0;A=l;break}}}while(0);if((a[213992]|0)!=0){gc(c[o>>2]|0,167864,(v=i,i=i+24|0,c[v>>2]=A&255,h[v+8>>3]=y,h[v+16>>3]=z,v)|0)|0;i=v}g[b>>2]=y;g[b+4>>2]=z;a[b+8|0]=A;A=b+9|0;b=m|0;a[A]=a[b]|0;a[A+1|0]=a[b+1|0]|0;a[A+2|0]=a[b+2|0]|0;i=e;return}function pr(b,d){b=b|0;d=d|0;var e=0,f=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0.0,x=0.0,y=0.0,z=0.0,A=0,B=0,C=0.0;e=i;i=i+40|0;f=e|0;j=e+8|0;k=e+16|0;l=e+24|0;m=e+32|0;n=d|0;d=ew(n,81608)|0;do{if((d|0)==0){p=10}else{q=d;while(1){r=q+1|0;if((Qa(a[q]|0)|0)==0){break}else{q=r}}s=(a[q]|0)==43;t=s&1;u=ac((s?r:q)|0,159680,(v=i,i=i+16|0,c[v>>2]=k,c[v+8>>2]=l,v)|0)|0;i=v;if((u|0)==0){p=10;break}else if((u|0)==1){w=+g[k>>2];g[l>>2]=w;x=w}else{x=+g[k>>2]}if(s){y=x;z=+g[l>>2];A=t;break}else{y=x+1.0;z=+g[l>>2]+1.0;A=t;break}}}while(0);do{if((p|0)==10){l=ew(n,86424)|0;if((l|0)==0){y=3.200000047683716;z=3.200000047683716;A=1;break}k=l;while(1){B=k+1|0;if((Qa(a[k]|0)|0)==0){break}else{k=B}}q=(a[k]|0)==43;l=q&1;r=ac((q?B:k)|0,159680,(v=i,i=i+16|0,c[v>>2]=f,c[v+8>>2]=j,v)|0)|0;i=v;if((r|0)==1){x=+g[f>>2];g[j>>2]=x;C=x}else if((r|0)==0){y=3.200000047683716;z=3.200000047683716;A=1;break}else{C=+g[f>>2]}x=C/1.25;if(q){y=x;z=+g[j>>2]/1.25;A=l;break}else{y=x+1.0;z=+g[j>>2]/1.25+1.0;A=l;break}}}while(0);if((a[213992]|0)!=0){gc(c[o>>2]|0,163688,(v=i,i=i+24|0,c[v>>2]=A&255,h[v+8>>3]=y,h[v+16>>3]=z,v)|0)|0;i=v}g[b>>2]=y;g[b+4>>2]=z;a[b+8|0]=A;A=b+9|0;b=m|0;a[A]=a[b]|0;a[A+1|0]=a[b+1|0]|0;a[A+2|0]=a[b+2|0]|0;i=e;return}function qr(a){a=a|0;var b=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;b=i;e=c[44274]|0;f=c[44272]|0;a:do{if((f|0)>0){g=0;h=e;while(1){c[h+(g*96|0)+32>>2]=0;j=g+1|0;k=c[44272]|0;if((j|0)>=(k|0)){l=k;break a}g=j;h=c[44274]|0}}else{l=f}}while(0);if((l-1|0)>0){f=0;h=0;g=e;e=l;while(1){l=g+96|0;j=h+1|0;if((j|0)<(e|0)){k=g+8|0;m=g+40|0;n=g+32|0;p=f;q=j;r=l;while(1){if((_t(k,m,r+8|0,r+40|0)|0)==0){s=p}else{c[n>>2]=1;c[r+32>>2]=1;s=p+1|0}t=q+1|0;u=c[44272]|0;if((t|0)<(u|0)){p=s;q=t;r=r+96|0}else{v=s;w=u;break}}}else{v=f;w=e}if((j|0)<(w-1|0)){f=v;h=j;g=l;e=w}else{x=v;break}}}else{x=0}if((d[213992]|0)>>>0<=1>>>0){i=b;return x|0}gc(c[o>>2]|0,148496,(v=i,i=i+16|0,c[v>>2]=a,c[v+8>>2]=x,v)|0)|0;i=v;i=b;return x|0}function rr(){var a=0,b=0,d=0,e=0,f=0,g=0,i=0,j=0,k=0.0,l=0.0,m=0,n=0.0,o=0,p=0,q=0,r=0,s=0.0,t=0,u=0,v=0,w=0.0,x=0,y=0,z=0,A=0,B=0.0;a=c[43762]|0;if((a|0)==0){b=kk(c[44272]<<2)|0;c[43762]=b;c[45154]=b+(c[44272]<<2);d=b}else{d=a}a=c[44274]|0;xs();b=c[44272]|0;if((b|0)>0){e=0;f=d;d=a;while(1){c[f>>2]=d+8;c[d+88>>2]=0;c[d+28>>2]=1;a=e+1|0;g=c[44272]|0;if((a|0)<(g|0)){e=a;f=f+4|0;d=d+96|0}else{i=g;break}}}else{i=b}Jb(c[43762]|0,i|0,4,138);i=c[43762]|0;c[44278]=i;b=c[45154]|0;if(i>>>0<b>>>0){j=i}else{return}while(1){i=j+4|0;a:do{if(i>>>0<b>>>0){d=c[i>>2]|0;k=+h[d>>3];f=c[j>>2]|0;l=+h[f>>3];if(k!=l){m=i;break}n=+h[f+8>>3];if(+h[d+8>>3]!=n){m=i;break}e=j+8|0;b:do{if(e>>>0<b>>>0){g=2;a=e;while(1){o=c[a>>2]|0;if(+h[o>>3]!=l){p=g;q=a;break b}if(+h[o+8>>3]!=n){p=g;q=a;break b}o=g+1|0;r=a+4|0;if(r>>>0<b>>>0){g=o;a=r}else{p=o;q=r;break}}}else{p=2;q=e}}while(0);do{if(q>>>0<b>>>0){e=c[q>>2]|0;if(+h[e+8>>3]!=n){break}s=(+h[e>>3]-l)/+(p|0);if(i>>>0<q>>>0){t=i;u=1;v=d;w=k}else{m=q;break a}while(1){h[v>>3]=s*+(u|0)+w;e=t+4|0;if(e>>>0>=q>>>0){m=q;break a}a=c[e>>2]|0;t=e;u=u+1|0;v=a;w=+h[a>>3]}}}while(0);if(i>>>0<q>>>0){x=j;y=i;z=f;A=d;B=l}else{m=q;break}while(1){a=c[44274]|0;e=c[z+16>>2]|0;g=c[A+16>>2]|0;h[A>>3]=B+(+h[a+(e*96|0)+56>>3]- +h[a+(e*96|0)+40>>3]+(+h[a+(g*96|0)+56>>3]- +h[a+(g*96|0)+40>>3]))*.5;g=x+4|0;a=y+4|0;if(a>>>0>=q>>>0){m=q;break a}e=c[g>>2]|0;x=g;y=a;z=e;A=c[a>>2]|0;B=+h[e>>3]}}else{m=i}}while(0);if(m>>>0<b>>>0){j=m}else{break}}return}function sr(){var a=0,b=0;a=c[44278]|0;if(a>>>0>=(c[45154]|0)>>>0){b=0;return b|0}c[44278]=a+4;b=c[a>>2]|0;return b|0}function tr(a,b){a=a|0;b=b|0;var d=0,e=0.0,f=0.0,g=0,i=0.0,j=0.0;d=c[a>>2]|0;a=c[b>>2]|0;e=+h[d+8>>3];f=+h[a+8>>3];do{if(e<f){g=-1}else{if(e>f){g=1;break}i=+h[d>>3];j=+h[a>>3];if(i<j){g=-1;break}g=i>j|0}}while(0);return g|0}function ur(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;h=(d|0)>0;if(h){vF(e|0,-1|0,d<<2|0)|0}c[e+(a<<2)>>2]=0;i=f|0;c[c[i>>2]>>2]=a;a=f+12|0;c[a>>2]=0;j=f+8|0;c[j>>2]=1;k=f+4|0;if((c[b+8>>2]|0)==0){f=0;l=1;while(1){m=f+1|0;c[a>>2]=m;n=c[(c[i>>2]|0)+(f<<2)>>2]|0;o=c[e+(n<<2)>>2]|0;p=b+(n<<4)|0;if((c[p>>2]|0)>1){q=b+(n<<4)+4|0;n=o+1|0;r=1;do{s=c[(c[q>>2]|0)+(r<<2)>>2]|0;t=e+(s<<2)|0;do{if((c[t>>2]|0)<0){c[t>>2]=n;u=c[j>>2]|0;if((u|0)>=(c[k>>2]|0)){break}c[j>>2]=u+1;c[(c[i>>2]|0)+(u<<2)>>2]=s}}while(0);r=r+1|0;}while((r|0)<(c[p>>2]|0));v=c[a>>2]|0;w=c[j>>2]|0}else{v=m;w=l}if((v|0)<(w|0)){f=v;l=w}else{x=o;break}}}else{w=0;l=1;while(1){v=w+1|0;c[a>>2]=v;f=c[(c[i>>2]|0)+(w<<2)>>2]|0;p=c[e+(f<<2)>>2]|0;r=b+(f<<4)|0;if((c[r>>2]|0)>1){n=b+(f<<4)+4|0;q=b+(f<<4)+8|0;f=1;do{s=c[(c[n>>2]|0)+(f<<2)>>2]|0;t=e+(s<<2)|0;do{if((c[t>>2]|0)<0){c[t>>2]=~~+g[(c[q>>2]|0)+(f<<2)>>2]+p;u=c[j>>2]|0;if((u|0)>=(c[k>>2]|0)){break}c[j>>2]=u+1;c[(c[i>>2]|0)+(u<<2)>>2]=s}}while(0);f=f+1|0;}while((f|0)<(c[r>>2]|0));y=c[a>>2]|0;z=c[j>>2]|0}else{y=v;z=l}if((y|0)<(z|0)){w=y;l=z}else{x=p;break}}}if(!h){return}h=x+10|0;x=0;do{z=e+(x<<2)|0;if((c[z>>2]|0)<0){c[z>>2]=h}x=x+1|0;}while((x|0)<(d|0));return}function vr(a,b){a=a|0;b=b|0;c[a>>2]=kk(b<<2)|0;c[a+4>>2]=b;c[a+8>>2]=0;c[a+12>>2]=0;return}function wr(a){a=a|0;eF(c[a>>2]|0);return}function xr(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,i=0,j=0,k=0.0,l=0,m=0.0,n=0;if((a[213992]|0)!=0){Ma(104808,25,1,c[o>>2]|0)|0}if((b|0)>0){f=0}else{g=b-1|0;i=Ms(d,e,g)|0;return i|0}do{j=d+(f<<2)|0;k=0.0;l=0;while(1){if((f|0)==(l|0)){m=k}else{m=k+ +h[(c[j>>2]|0)+(l<<3)>>3]}n=l+1|0;if((n|0)<(b|0)){k=m;l=n}else{break}}h[(c[j>>2]|0)+(f<<3)>>3]=-0.0-m;f=f+1|0;}while((f|0)<(b|0));g=b-1|0;i=Ms(d,e,g)|0;return i|0}function yr(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0,l=0,m=0.0,n=0.0,p=0;e=pu(d,d,0.0)|0;f=pu(d,d,0.0)|0;g=ux(b)|0;if((g|0)!=0){i=g;do{g=rw(b,i)|0;if((g|0)!=0){j=g;do{g=c[j>>2]&3;k=(c[c[((g|0)==3?j:j+32|0)+28>>2]>>2]|0)>>>4;l=(c[c[((g|0)==2?j:j-32|0)+28>>2]>>2]|0)>>>4;if((k|0)!=(l|0)){m=-1.0/+h[(c[j+8>>2]|0)+136>>3];h[(c[e+(l<<2)>>2]|0)+(k<<3)>>3]=m;h[(c[e+(k<<2)>>2]|0)+(l<<3)>>3]=m}j=sw(b,j,i)|0;}while((j|0)!=0)}i=vx(b,i)|0;}while((i|0)!=0)}if((a[213992]|0)!=0){Ma(104808,25,1,c[o>>2]|0)|0}i=(d|0)>0;if(i){j=0;do{l=e+(j<<2)|0;m=0.0;k=0;while(1){if((j|0)==(k|0)){n=m}else{n=m+ +h[(c[l>>2]|0)+(k<<3)>>3]}g=k+1|0;if((g|0)<(d|0)){m=n;k=g}else{break}}h[(c[l>>2]|0)+(j<<3)>>3]=-0.0-n;j=j+1|0;}while((j|0)<(d|0))}j=Ms(e,f,d-1|0)|0;if((j|0)==0|i^1){qu(e);qu(f);return j|0}i=b+8|0;b=0;do{k=f+(b<<2)|0;g=0;do{p=c[k>>2]|0;h[(c[(c[(c[i>>2]|0)+152>>2]|0)+(b<<2)>>2]|0)+(g<<3)>>3]=+h[p+(b<<3)>>3]+ +h[(c[f+(g<<2)>>2]|0)+(g<<3)>>3]- +h[p+(g<<3)>>3]*2.0;g=g+1|0;}while((g|0)<(d|0));b=b+1|0;}while((b|0)<(d|0));qu(e);qu(f);return j|0}function zr(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0.0,G=0.0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0.0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0.0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0;f=i;i=i+64|0;j=f|0;k=f+16|0;l=f+32|0;m=f+48|0;n=kk(d<<4)|0;o=b<<2;p=kk(o)|0;q=p;r=kk(o)|0;s=r;t=kk(o)|0;u=t;v=kk(o)|0;w=v;x=(b|0)>0;if(x){y=0;do{c[u+(y<<2)>>2]=y;y=y+1|0;}while((y|0)<(b|0));y=b-1|0;Gs(a,u,0,y);z=0;while(1){c[w+(c[u+(z<<2)>>2]<<2)>>2]=z;A=z+1|0;if((A|0)<(b|0)){z=A}else{B=y;break}}}else{y=b-1|0;Gs(a,u,0,y);B=y}y=kk(B<<4)|0;z=(B|0)>0;if(z){A=0;while(1){C=c[u+(A<<2)>>2]|0;D=A+1|0;E=c[u+(D<<2)>>2]|0;F=+h[a+(E<<3)>>3]- +h[a+(C<<3)>>3];c[y+(A<<4)>>2]=C;c[y+(A<<4)+4>>2]=E;h[y+(A<<4)+8>>3]=F;if((D|0)<(B|0)){A=D}else{break}}}if((B|0)>-2){A=m;m=(B|0)/2|0;while(1){D=m;while(1){E=D<<1;C=E|1;do{if((E|0)<(B|0)){F=+h[y+(E<<4)+8>>3];G=+h[y+(D<<4)+8>>3];if(F<G){H=E;break}if(F!=G){I=15;break}if(((yb()|0)&1|0)==0){I=15}else{H=E}}else{I=15}}while(0);if((I|0)==15){I=0;H=D}do{if((C|0)<(B|0)){G=+h[y+(C<<4)+8>>3];F=+h[y+(H<<4)+8>>3];if(G>=F){if(G!=F){J=H;break}if(((yb()|0)&1|0)==0){J=H;break}}J=C}else{J=H}}while(0);if((J|0)==(D|0)){break}C=y+(J<<4)|0;c[A>>2]=c[C>>2];c[A+4>>2]=c[C+4>>2];c[A+8>>2]=c[C+8>>2];c[A+12>>2]=c[C+12>>2];E=y+(D<<4)|0;c[C>>2]=c[E>>2];c[C+4>>2]=c[E+4>>2];c[C+8>>2]=c[E+8>>2];c[C+12>>2]=c[E+12>>2];c[E>>2]=c[A>>2];c[E+4>>2]=c[A+4>>2];c[E+8>>2]=c[A+8>>2];c[E+12>>2]=c[A+12>>2];D=J}if((m|0)>0){m=m-1|0}else{break}}}if((b|0)>1){m=1;do{c[q+(c[u+(m<<2)>>2]<<2)>>2]=c[u+(m-1<<2)>>2];m=m+1|0;}while((m|0)<(b|0))}if(z){z=0;while(1){m=z+1|0;c[s+(c[u+(z<<2)>>2]<<2)>>2]=c[u+(m<<2)>>2];if((m|0)<(B|0)){z=m}else{break}}}if((d|0)<1|(B|0)==0){K=y;L=n;M=0}else{z=l;l=k;k=j;j=B;m=B;J=y;y=n;n=d;A=0;while(1){H=c[J>>2]|0;D=c[J+4>>2]|0;F=+h[J+8>>3];E=m-1|0;C=J;N=J+(E<<4)|0;c[C>>2]=c[N>>2];c[C+4>>2]=c[N+4>>2];c[C+8>>2]=c[N+8>>2];c[C+12>>2]=c[N+12>>2];N=0;while(1){O=N<<1;P=O|1;do{if((O|0)<(E|0)){G=+h[J+(O<<4)+8>>3];Q=+h[J+(N<<4)+8>>3];if(G<Q){R=O;break}if(G!=Q){I=35;break}if(((yb()|0)&1|0)==0){I=35}else{R=O}}else{I=35}}while(0);if((I|0)==35){I=0;R=N}do{if((P|0)<(E|0)){Q=+h[J+(P<<4)+8>>3];G=+h[J+(R<<4)+8>>3];if(Q>=G){if(Q!=G){S=R;break}if(((yb()|0)&1|0)==0){S=R;break}}S=P}else{S=R}}while(0);if((S|0)==(N|0)){break}P=J+(S<<4)|0;c[z>>2]=c[P>>2];c[z+4>>2]=c[P+4>>2];c[z+8>>2]=c[P+8>>2];c[z+12>>2]=c[P+12>>2];O=J+(N<<4)|0;c[P>>2]=c[O>>2];c[P+4>>2]=c[O+4>>2];c[P+8>>2]=c[O+8>>2];c[P+12>>2]=c[O+12>>2];c[O>>2]=c[z>>2];c[O+4>>2]=c[z+4>>2];c[O+8>>2]=c[z+8>>2];c[O+12>>2]=c[z+12>>2];N=S}if((A|0)<(n|0)){T=y;U=n}else{T=gF(y,n<<5)|0;U=n<<1}N=A+1|0;c[T+(A<<4)>>2]=H;c[T+(A<<4)+4>>2]=D;h[T+(A<<4)+8>>3]=F;O=c[w+(H<<2)>>2]|0;P=c[w+(D<<2)>>2]|0;do{if((O|0)>0){V=c[u+(O-1<<2)>>2]|0;W=s+(V<<2)|0;if((c[w+(c[W>>2]<<2)>>2]|0)>=(P|0)){X=J;Y=E;Z=j;break}G=+h[a+(D<<3)>>3]- +h[a+(V<<3)>>3];if((E|0)==(j|0)){_=gF(C,j<<5)|0;$=j<<1}else{_=J;$=j}c[_+(E<<4)>>2]=V;c[_+(E<<4)+4>>2]=D;h[_+(E<<4)+8>>3]=G;a:do{if((E|0)>0){aa=E;Q=G;while(1){ba=(aa|0)/2|0;ca=_+(ba<<4)+8|0;da=+h[ca>>3];if(Q>=da){if(Q!=da){break a}if(((yb()|0)&1|0)==0){break a}}ea=_+(aa<<4)|0;c[l>>2]=c[ea>>2];c[l+4>>2]=c[ea+4>>2];c[l+8>>2]=c[ea+8>>2];c[l+12>>2]=c[ea+12>>2];fa=_+(ba<<4)|0;c[ea>>2]=c[fa>>2];c[ea+4>>2]=c[fa+4>>2];c[ea+8>>2]=c[fa+8>>2];c[ea+12>>2]=c[fa+12>>2];c[fa>>2]=c[l>>2];c[fa+4>>2]=c[l+4>>2];c[fa+8>>2]=c[l+8>>2];c[fa+12>>2]=c[l+12>>2];if((aa|0)<=1){break a}aa=ba;Q=+h[ca>>3]}}}while(0);c[W>>2]=D;c[q+(D<<2)>>2]=V;X=_;Y=m;Z=$}else{X=J;Y=E;Z=j}}while(0);do{if((P|0)<(B|0)){E=c[u+(P+1<<2)>>2]|0;D=q+(E<<2)|0;if((c[w+(c[D>>2]<<2)>>2]|0)<=(O|0)){ga=X;ha=Y;ia=Z;break}F=+h[a+(E<<3)>>3]- +h[a+(H<<3)>>3];if((Y|0)==(Z|0)){ja=gF(X,Z<<5)|0;ka=Z<<1}else{ja=X;ka=Z}C=Y+1|0;c[ja+(Y<<4)>>2]=H;c[ja+(Y<<4)+4>>2]=E;h[ja+(Y<<4)+8>>3]=F;b:do{if((Y|0)>0){aa=Y;G=F;while(1){ca=(aa|0)/2|0;ba=ja+(ca<<4)+8|0;Q=+h[ba>>3];if(G>=Q){if(G!=Q){break b}if(((yb()|0)&1|0)==0){break b}}fa=ja+(aa<<4)|0;c[k>>2]=c[fa>>2];c[k+4>>2]=c[fa+4>>2];c[k+8>>2]=c[fa+8>>2];c[k+12>>2]=c[fa+12>>2];ea=ja+(ca<<4)|0;c[fa>>2]=c[ea>>2];c[fa+4>>2]=c[ea+4>>2];c[fa+8>>2]=c[ea+8>>2];c[fa+12>>2]=c[ea+12>>2];c[ea>>2]=c[k>>2];c[ea+4>>2]=c[k+4>>2];c[ea+8>>2]=c[k+8>>2];c[ea+12>>2]=c[k+12>>2];if((aa|0)<=1){break b}aa=ca;G=+h[ba>>3]}}}while(0);c[D>>2]=H;c[s+(H<<2)>>2]=E;ga=ja;ha=C;ia=ka}else{ga=X;ha=Y;ia=Z}}while(0);if((N|0)>=(d|0)|(ha|0)==0){K=ga;L=T;M=N;break}else{j=ia;m=ha;J=ga;y=T;n=U;A=N}}}eF(p);eF(r);eF(t);eF(v);eF(K);K=kk(o)|0;o=K;v=(M<<1)+b|0;t=v<<2;r=kk(t)|0;p=kk(t)|0;if(x){t=0;do{c[o+(t<<2)>>2]=1;t=t+1|0;}while((t|0)<(b|0))}if((M|0)>0){t=0;do{A=c[L+(t<<4)+4>>2]|0;U=o+(c[L+(t<<4)>>2]<<2)|0;c[U>>2]=(c[U>>2]|0)+1;U=o+(A<<2)|0;c[U>>2]=(c[U>>2]|0)+1;t=t+1|0;}while((t|0)<(M|0))}if((v|0)>0){t=0;do{g[p+(t<<2)>>2]=1.0;t=t+1|0;}while((t|0)<(v|0))}v=kk(b<<4)|0;t=v;c[e>>2]=t;if(x){x=0;e=r;r=p;while(1){c[t+(x<<4)>>2]=1;c[t+(x<<4)+8>>2]=r;c[t+(x<<4)+4>>2]=e;c[e>>2]=x;g[r>>2]=0.0;p=c[o+(x<<2)>>2]|0;U=x+1|0;if((U|0)<(b|0)){x=U;e=e+(p<<2)|0;r=r+(p<<2)|0}else{break}}}eF(K);if((M|0)==0){la=L;eF(la);i=f;return}K=v+8|0;v=M;do{v=v-1|0;M=c[L+(v<<4)>>2]|0;r=c[L+(v<<4)+4>>2]|0;e=t+(M<<4)|0;x=c[e>>2]|0;b=c[t+(M<<4)+4>>2]|0;c:do{if((x|0)>0){o=0;while(1){p=o+1|0;if((c[b+(o<<2)>>2]|0)==(r|0)){break c}if((p|0)<(x|0)){o=p}else{I=81;break}}}else{I=81}}while(0);do{if((I|0)==81){I=0;c[e>>2]=x+1;c[b+(x<<2)>>2]=r;N=t+(r<<4)|0;o=c[N>>2]|0;c[N>>2]=o+1;c[(c[t+(r<<4)+4>>2]|0)+(o<<2)>>2]=M;if((c[K>>2]|0)==0){break}o=c[t+(M<<4)+8>>2]|0;g[o>>2]=+g[o>>2]+-1.0;o=c[t+(r<<4)+8>>2]|0;g[o>>2]=+g[o>>2]+-1.0}}while(0);}while((v|0)!=0);la=L;eF(la);i=f;return}function Ar(a,b,d,e,f,g,h){a=a|0;b=b|0;d=d|0;e=e|0;f=+f;g=g|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0.0,x=0.0,y=0,z=0.0,A=0.0,B=0.0;j=i;k=e<<3;l=kk(k)|0;m=l;n=kk(k)|0;o=n;p=kk(k)|0;q=p;r=kk(k)|0;s=r;t=kk(k)|0;u=t;v=kk(k)|0;k=v;Xs(e,d,k);if(h<<24>>24!=0){Ss(e,k);Ss(e,b)}Ts(a,e,b,s);Us(e,k,s,m);Xs(e,m,o);w=+Ys(e,m,m);a:do{if((g|0)>0){s=g-1|0;x=w;k=0;while(1){if(+Zs(e,m)<=f){y=0;break a}Ts(a,e,o,q);z=+Ys(e,o,q);if(z==0.0){y=0;break a}A=x/z;Ws(e,o,A,u);Vs(e,b,u,b);if((k|0)<(s|0)){Ws(e,q,A,q);Us(e,m,q,m);A=+Ys(e,m,m);if(x==0.0){break}Ws(e,o,A/x,o);Vs(e,m,o,o);B=A}else{B=x}h=k+1|0;if((h|0)<(g|0)){x=B;k=h}else{y=0;break a}}Fv(1,104304,(k=i,i=i+1|0,i=i+7&-8,c[k>>2]=0,k)|0)|0;i=k;y=1}else{y=0}}while(0);eF(l);eF(n);eF(p);eF(r);eF(t);eF(v);i=j;return y|0}function Br(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=+f;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0.0,s=0.0,t=0,u=0.0,v=0.0,w=0.0,x=0;h=i;j=e<<2;k=jk(j)|0;l=k;m=jk(j)|0;n=m;o=jk(j)|0;p=o;q=jk(j)|0;j=q;$s(e,b);$s(e,d);at(a,e,b,j);$s(e,j);bt(e,d,j,l);ft(e,l,n);r=+gt(e,l,l);a:do{if((g|0)>0){j=g-1|0;s=r;d=0;while(1){if(+it(e,l)<=f){t=0;break a}$s(e,n);$s(e,b);$s(e,l);at(a,e,n,p);$s(e,p);u=+gt(e,n,p);if(u==0.0){t=0;break a}v=s/u;dt(e,b,v,n);if((d|0)<(j|0)){dt(e,l,-0.0-v,p);v=+gt(e,l,l);if(s==0.0){break}et(e,n,v/s,n);ct(e,l,n,n);w=v}else{w=s}x=d+1|0;if((x|0)<(g|0)){s=w;d=x}else{t=0;break a}}Fv(1,104304,(d=i,i=i+1|0,i=i+7&-8,c[d>>2]=0,d)|0)|0;i=d;t=1}else{t=0}}while(0);eF(k);eF(m);eF(o);eF(q);i=h;return t|0}function Cr(b,d){b=b|0;d=d|0;var e=0,f=0,j=0,k=0,l=0,m=0.0,n=0.0,o=0,p=0.0,q=0.0,r=0,s=0,t=0,u=0.0,v=0.0,w=0,x=0.0,y=0.0,z=0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0;e=i;i=i+16|0;f=e|0;j=Lw(b)|0;k=kk(j*48|0)|0;l=k;or(f,b);m=+g[f>>2];n=+g[f+4>>2];o=a[f+8|0]|0;f=ux(b)|0;if((f|0)!=0){p=m*5.0;q=n*5.0;if(o<<24>>24==0){o=l;r=f;while(1){s=c[r+8>>2]|0;t=c[s+132>>2]|0;u=+h[t>>3]*10.0*72.0;if(u<0.0){v=u+-.5}else{v=u+.5}w=~~v;u=+h[t+8>>3]*10.0*72.0;if(u<0.0){x=u+-.5}else{x=u+.5}t=~~x;u=p*+h[s+32>>3]*72.0;if(u<0.0){y=u+-.5}else{y=u+.5}z=~~y;u=q*+h[s+40>>3]*72.0;if(u<0.0){A=u+-.5}else{A=u+.5}s=~~A;c[o+12>>2]=w;c[o+16>>2]=t;c[o+20>>2]=r;c[o+32>>2]=w-z;c[o+36>>2]=t-s;c[o+40>>2]=z+w;c[o+44>>2]=s+t;t=vx(b,r)|0;if((t|0)==0){break}else{o=o+48|0;r=t}}}else{r=l;o=f;while(1){f=c[o+8>>2]|0;t=c[f+132>>2]|0;A=+h[t>>3]*10.0*72.0;if(A<0.0){B=A+-.5}else{B=A+.5}s=~~B;A=+h[t+8>>3]*10.0*72.0;if(A<0.0){C=A+-.5}else{C=A+.5}t=~~C;A=+h[f+32>>3]*.5*72.0;if(A<0.0){D=A+-.5}else{D=A+.5}w=~~((m+ +(~~D|0))*10.0);A=+h[f+40>>3]*.5*72.0;if(A<0.0){E=A+-.5}else{E=A+.5}f=~~((n+ +(~~E|0))*10.0);c[r+12>>2]=s;c[r+16>>2]=t;c[r+20>>2]=o;c[r+32>>2]=s-w;c[r+36>>2]=t-f;c[r+40>>2]=w+s;c[r+44>>2]=f+t;t=vx(b,o)|0;if((t|0)==0){break}else{r=r+48|0;o=t}}}}o=j-1|0;if((o|0)>0){F=0;G=l}else{H=0;eF(k);i=e;return H|0}a:while(1){r=G+48|0;t=F+1|0;if((t|0)<(j|0)){f=c[G+32>>2]|0;s=G+40|0;w=G+36|0;z=G+44|0;I=t;J=r;while(1){do{if((f|0)<=(c[J+40>>2]|0)){if((c[J+32>>2]|0)>(c[s>>2]|0)){break}if((c[w>>2]|0)>(c[J+44>>2]|0)){break}if((c[J+36>>2]|0)<=(c[z>>2]|0)){break a}}}while(0);K=I+1|0;if((K|0)<(j|0)){I=K;J=J+48|0}else{break}}}if((t|0)<(o|0)){F=t;G=r}else{H=0;L=49;break}}if((L|0)==49){eF(k);i=e;return H|0}switch(d|0){case 9:{Dr(b,l,j,140,1);Fr(b,l,j,142,1);break};case 10:{Fr(b,l,j,142,1);Dr(b,l,j,140,1);break};case 7:{Dr(b,l,j,204,1);Fr(b,l,j,142,1);L=42;break};case 8:{L=42;break};case 13:{L=43;break};case 14:{Fr(b,l,j,142,0);Dr(b,l,j,140,0);break};case 12:{Fr(b,l,j,162,0);Dr(b,l,j,140,0);break};default:{Dr(b,l,j,204,0);Fr(b,l,j,142,0)}}if((L|0)==42){Fr(b,l,j,162,1);Dr(b,l,j,140,1);L=43}if((L|0)==43){Dr(b,l,j,140,0);Fr(b,l,j,142,0)}if((j|0)>0){M=l;N=0}else{H=1;eF(k);i=e;return H|0}while(1){l=c[M+16>>2]|0;b=(c[M+20>>2]|0)+8|0;h[c[(c[b>>2]|0)+132>>2]>>3]=+(c[M+12>>2]|0)/72.0/10.0;h[(c[(c[b>>2]|0)+132>>2]|0)+8>>3]=+(l|0)/72.0/10.0;l=N+1|0;if((l|0)<(j|0)){M=M+48|0;N=l}else{H=1;break}}eF(k);i=e;return H|0}function Dr(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;g=$g(40288,c[43332]|0)|0;h=(d|0)>0;if(h){i=g|0;j=0;k=b;while(1){c[k+8>>2]=c[k+12>>2];Hc[c[i>>2]&63](g,k,1)|0;l=j+1|0;if((l|0)<(d|0)){j=l;k=k+48|0}else{break}}}if((f|0)==0){m=Or(a,g,e,178)|0}else{m=Nr(g,e,178)|0}ok(m,2,2147483647)|0;if(h){h=0;e=b;while(1){b=e+12|0;a=c[(c[(c[e+24>>2]|0)+8>>2]|0)+232>>2]|0;f=a-(c[b>>2]|0)|0;c[b>>2]=a;a=e+32|0;c[a>>2]=(c[a>>2]|0)+f;a=e+40|0;c[a>>2]=(c[a>>2]|0)+f;f=h+1|0;if((f|0)<(d|0)){h=f;e=e+48|0}else{break}}}e=ux(m)|0;if((e|0)==0){n=Kw(m)|0;o=Vg(g)|0;return}else{p=e}do{e=p+8|0;h=c[e>>2]|0;d=c[h+172>>2]|0;if((d|0)==0){q=h}else{eF(d);q=c[e>>2]|0}e=c[q+180>>2]|0;if((e|0)!=0){eF(e)}p=vx(m,p)|0;}while((p|0)!=0);n=Kw(m)|0;o=Vg(g)|0;return}function Er(a,b){a=a|0;b=b|0;var d=0;if((c[a+36>>2]|0)>(c[b+44>>2]|0)){d=0;return d|0}d=(c[b+36>>2]|0)<=(c[a+44>>2]|0)|0;return d|0}function Fr(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;g=$g(40288,c[43332]|0)|0;h=(d|0)>0;if(h){i=g|0;j=0;k=b;while(1){c[k+8>>2]=c[k+16>>2];Hc[c[i>>2]&63](g,k,1)|0;l=j+1|0;if((l|0)<(d|0)){j=l;k=k+48|0}else{break}}}if((f|0)==0){m=Or(a,g,e,98)|0}else{m=Nr(g,e,98)|0}ok(m,2,2147483647)|0;if(h){h=0;e=b;while(1){b=e+16|0;a=c[(c[(c[e+24>>2]|0)+8>>2]|0)+232>>2]|0;f=a-(c[b>>2]|0)|0;c[b>>2]=a;a=e+36|0;c[a>>2]=(c[a>>2]|0)+f;a=e+44|0;c[a>>2]=(c[a>>2]|0)+f;f=h+1|0;if((f|0)<(d|0)){h=f;e=e+48|0}else{break}}}e=ux(m)|0;if((e|0)==0){n=Kw(m)|0;o=Vg(g)|0;return}else{p=e}do{e=p+8|0;h=c[e>>2]|0;d=c[h+172>>2]|0;if((d|0)==0){q=h}else{eF(d);q=c[e>>2]|0}e=c[q+180>>2]|0;if((e|0)!=0){eF(e)}p=vx(m,p)|0;}while((p|0)!=0);n=Kw(m)|0;o=Vg(g)|0;return}function Gr(a,b){a=a|0;b=b|0;var d=0;if((c[a+32>>2]|0)>(c[b+40>>2]|0)){d=0;return d|0}d=(c[b+32>>2]|0)<=(c[a+40>>2]|0)|0;return d|0}function Hr(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;d=c[a+36>>2]|0;e=c[b+44>>2]|0;if((d|0)>(e|0)){f=0;return f|0}g=c[b+36>>2]|0;h=c[a+44>>2]|0;if((g|0)>(h|0)){f=0;return f|0}i=c[a+40>>2]|0;j=c[b+32>>2]|0;if((i|0)<(j|0)){f=1;return f|0}k=c[b+16>>2]|0;l=c[a+16>>2]|0;f=(((i-j-(c[a+32>>2]|0)+(c[b+40>>2]|0)|0)/2|0)-(c[b+12>>2]|0)+(c[a+12>>2]|0)|0)<=(((h-d+e-g|0)/2|0)+((k|0)<(l|0)?k-l|0:l-k|0)|0)|0;return f|0}function Ir(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;d=c[a+32>>2]|0;e=c[b+40>>2]|0;if((d|0)>(e|0)){f=0;return f|0}g=c[b+32>>2]|0;h=c[a+40>>2]|0;if((g|0)>(h|0)){f=0;return f|0}i=c[a+44>>2]|0;j=c[b+36>>2]|0;if((i|0)<(j|0)){f=1;return f|0}k=c[b+12>>2]|0;l=c[a+12>>2]|0;f=(((i-(c[a+36>>2]|0)+(c[b+44>>2]|0)-j|0)/2|0)-(c[b+16>>2]|0)+(c[a+16>>2]|0)|0)<=(((h-(g+d)+e|0)/2|0)+((k|0)<(l|0)?k-l|0:l-k|0)|0)|0;return f|0}function Jr(b,d){b=b|0;d=d|0;var e=0,f=0,j=0,k=0,l=0,m=0.0,n=0.0,p=0,q=0.0,r=0.0,s=0,u=0,v=0.0,w=0.0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0.0,G=0.0,H=0,I=0.0,J=0.0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0.0,aa=0.0,ba=0,ca=0,da=0.0,ea=0,fa=0.0,ga=0.0,ha=0.0,ia=0.0,ja=0,ka=0;e=i;i=i+16|0;f=e|0;j=Lw(b)|0;k=kk(j*72|0)|0;l=k;or(f,b);m=+g[f>>2];n=+g[f+4>>2];p=(a[f+8|0]|0)!=0;if(p){q=m/72.0;r=n/72.0}else{q=m;r=n}f=ux(b)|0;if((f|0)!=0){n=q;q=r;s=f;f=l;while(1){u=c[s+8>>2]|0;r=+h[u+32>>3];if(p){v=q+ +h[u+40>>3]*.5;w=n+r*.5}else{v=q*+h[u+40>>3]*.5;w=n*r*.5}r=+h[c[u+132>>2]>>3];h[f>>3]=r;m=+h[(c[(c[s+8>>2]|0)+132>>2]|0)+8>>3];h[f+8>>3]=m;h[f+16>>3]=r-w;h[f+24>>3]=m-v;h[f+32>>3]=w+r;h[f+40>>3]=v+m;h[f+48>>3]=w;h[f+56>>3]=v;c[f+64>>2]=s;u=vx(b,s)|0;if((u|0)==0){break}else{s=u;f=f+72|0}}}a:do{if((d|0)<0){b:do{if((j|0)>0){f=l;s=0;v=0.0;c:while(1){b=f+72|0;p=s+1|0;if((p|0)>=(j|0)){break}w=+h[f+16>>3];u=f|0;x=f+8|0;y=f+56|0;z=f+48|0;A=f+32|0;B=f+24|0;C=f+40|0;D=b;E=p;n=v;while(1){do{if(w<=+h[D+32>>3]){if(+h[D+16>>3]>+h[A>>3]){break}if(+h[B>>3]>+h[D+40>>3]){break}if(+h[D+24>>3]<=+h[C>>3]){break b}}}while(0);q=+h[u>>3];m=+h[D>>3];if(q==m){F=t}else{F=(+h[z>>3]+ +h[D+48>>3])/+S(+(q-m))}m=+h[x>>3];q=+h[D+8>>3];if(m==q){G=t}else{G=(+h[y>>3]+ +h[D+56>>3])/+S(+(m-q))}q=G<F?G:F;m=q>n?q:n;H=E+1|0;if((H|0)<(j|0)){D=D+72|0;E=H;n=m}else{f=b;s=p;v=m;continue c}}}if(v==0.0){break}gc(c[o>>2]|0,103696,(s=i,i=i+8|0,h[s>>3]=v,s)|0)|0;i=s;I=v;J=v;break a}}while(0);eF(k);K=0;i=e;return K|0}else{s=kk((j<<4)+16|0)|0;d:do{if((j|0)>0){f=l;p=j;b=s;E=0;D=0;e:while(1){y=f+72|0;x=E+1|0;if((x|0)>=(j|0)){L=b;M=D;break d}z=f+16|0;u=f+32|0;C=f+24|0;B=f+40|0;A=f|0;H=f+8|0;N=f+56|0;O=f+48|0;P=y;Q=p;R=b;T=x;U=D;while(1){do{if(+h[z>>3]>+h[P+32>>3]){V=U;W=R;X=Q}else{if(+h[P+16>>3]>+h[u>>3]){V=U;W=R;X=Q;break}if(+h[C>>3]>+h[P+40>>3]){V=U;W=R;X=Q;break}if(+h[P+24>>3]>+h[B>>3]){V=U;W=R;X=Q;break}if((U|0)==(Q|0)){Y=U+j|0;Z=mk(R,(Y<<4)+16|0)|0;_=Y}else{Z=R;_=Q}n=+h[A>>3];w=+h[P>>3];do{if(n==w){$=t}else{m=(+h[O>>3]+ +h[P+48>>3])/+S(+(n-w));if(m>=1.0){$=m;break}$=1.0}}while(0);w=+h[H>>3];n=+h[P+8>>3];do{if(w==n){aa=t}else{m=(+h[N>>3]+ +h[P+56>>3])/+S(+(w-n));if(m>=1.0){aa=m;break}aa=1.0}}while(0);Y=U+1|0;h[Z+(Y<<4)>>3]=$;h[Z+(Y<<4)+8>>3]=aa;V=Y;W=Z;X=_}}while(0);Y=T+1|0;if((Y|0)>=(j|0)){f=y;p=X;b=W;E=x;D=V;continue e}P=P+72|0;Q=X;R=W;T=Y;U=V}}}else{L=s;M=0}}while(0);s=(M<<4)+16|0;D=mk(L,s)|0;E=D;if((M|0)==0){eF(D);eF(k);K=0;i=e;return K|0}do{if((d|0)==0){h[D>>3]=1.0;h[D+8>>3]=t;Jb(D+16|0,M|0,16,60);b=kk(s)|0;h[b+(M<<4)>>3]=+h[E+(M<<4)>>3];h[b+(M<<4)+8>>3]=1.0;if((M|0)>0){p=M;v=1.0;while(1){f=p-1|0;h[b+(f<<4)>>3]=+h[E+(f<<4)>>3];n=+h[E+(p<<4)+8>>3];w=n>v?n:v;h[b+(f<<4)+8>>3]=w;if((f|0)>0){p=f;v=w}else{break}}}if((M|0)<0){cc(148680,121688,834,170968);return 0}else{ba=0;ca=0;da=t}while(1){v=+h[b+(ca<<4)>>3]*+h[b+(ca<<4)+8>>3];p=v<da;ea=p?ca:ba;fa=p?v:da;if((ca|0)<(M|0)){ba=ea;ca=ca+1|0;da=fa}else{break}}if(fa<t){ga=+h[b+(ea<<4)>>3];ha=+h[b+(ea<<4)+8>>3];break}else{cc(148680,121688,834,170968);return 0}}else{if((M|0)<1){ga=0.0;ha=0.0;break}else{ia=0.0;ja=1;ka=E}while(1){p=ka+16|0;v=+h[p>>3];w=+h[ka+24>>3];n=v<w?v:w;w=n>ia?n:ia;if((ja|0)<(M|0)){ia=w;ja=ja+1|0;ka=p}else{ga=w;ha=w;break}}}}while(0);eF(D);I=ga;J=ha}}while(0);if((j|0)>0){ka=0;ja=l;while(1){l=ja+64|0;h[c[(c[(c[l>>2]|0)+8>>2]|0)+132>>2]>>3]=I*+h[ja>>3];h[(c[(c[(c[l>>2]|0)+8>>2]|0)+132>>2]|0)+8>>3]=J*+h[ja+8>>3];l=ka+1|0;if((l|0)<(j|0)){ka=l;ja=ja+72|0}else{break}}}eF(k);K=1;i=e;return K|0}function Kr(a,b){a=a|0;b=b|0;var c=0.0,d=0.0,e=0,f=0.0,g=0.0;c=+h[a>>3];d=+h[b>>3];do{if(c<d){e=-1}else{if(c>d){e=1;break}f=+h[a+8>>3];g=+h[b+8>>3];if(f<g){e=-1;break}e=f>g|0}}while(0);return e|0}function Lr(a,b){a=a|0;b=b|0;return((c[a+12>>2]|0)-(c[a+4>>2]|0)+(c[b+12>>2]|0)-(c[b+4>>2]|0)|0)/2|0|0}function Mr(a,b){a=a|0;b=b|0;return((c[a+8>>2]|0)-(c[a>>2]|0)+(c[b+8>>2]|0)-(c[b>>2]|0)|0)/2|0|0}function Nr(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0;f=Hw(113056,173936,0)|0;Wx(f|0,106384,272,1)|0;g=Zg(a)|0;if((g|0)==0){h=0}else{i=0;j=-2147483647;k=g;while(1){g=c[k+8>>2]|0;l=((j|0)!=(g|0))+i|0;m=c[k>>2]|0;if((m|0)==0){h=l;break}else{i=l;j=g;k=m}}}k=f+8|0;j=(h<<3)-4|0;i=0;m=0;g=0;l=0;n=-2147483647;o=0;p=Zg(a)|0;while(1){q=c[p+8>>2]|0;do{if((n|0)==(q|0)){r=o;s=n;t=l;u=g;v=m;w=i}else{x=Ax(f,$w(c[p+20>>2]|0)|0,1)|0;Wx(x|0,100712,304,1)|0;y=x+8|0;c[(c[y>>2]|0)+112>>2]=p;if((m|0)==0){c[(c[k>>2]|0)+180>>2]=x;z=x}else{c[(c[o+8>>2]|0)+164>>2]=x;z=m}c[(c[y>>2]|0)+176>>2]=0;A=l+1|0;B=jk(A<<2)|0;c[(c[y>>2]|0)+172>>2]=B;if((i|0)==0){r=x;s=q;t=A;u=x;v=z;w=x;break}B=i+8|0;c[(c[B>>2]|0)+184>>2]=0;if((i|0)==(z|0)){C=jk(j)|0;c[(c[B>>2]|0)+180>>2]=C}else{C=jk(h-l<<2)|0;c[(c[B>>2]|0)+180>>2]=C}C=uw(f,i,x,0,1)|0;Wx(C|0,95048,176,1)|0;D=C+8|0;b[(c[D>>2]|0)+170>>1]=10;c[(c[D>>2]|0)+156>>2]=1;D=(c[B>>2]|0)+180|0;E=c[D>>2]|0;if((E|0)==0){F=kk((c[D+4>>2]<<2)+8|0)|0}else{F=mk(E,(c[D+4>>2]<<2)+8|0)|0}c[(c[B>>2]|0)+180>>2]=F;D=(c[B>>2]|0)+184|0;E=c[D>>2]|0;c[D>>2]=E+1;c[(c[(c[B>>2]|0)+180>>2]|0)+(E<<2)>>2]=C;E=(c[B>>2]|0)+180|0;c[(c[E>>2]|0)+(c[E+4>>2]<<2)>>2]=0;E=(c[y>>2]|0)+172|0;B=c[E>>2]|0;if((B|0)==0){G=kk((c[E+4>>2]<<2)+8|0)|0}else{G=mk(B,(c[E+4>>2]<<2)+8|0)|0}c[(c[y>>2]|0)+172>>2]=G;E=(c[y>>2]|0)+176|0;B=c[E>>2]|0;c[E>>2]=B+1;c[(c[(c[y>>2]|0)+172>>2]|0)+(B<<2)>>2]=C;C=(c[y>>2]|0)+172|0;c[(c[C>>2]|0)+(c[C+4>>2]<<2)>>2]=0;r=x;s=q;t=A;u=x;v=z;w=x}}while(0);c[p+24>>2]=u;q=c[p>>2]|0;if((q|0)==0){break}else{i=w;m=v;g=u;l=t;n=s;o=r;p=q}}p=w+8|0;c[(c[p>>2]|0)+184>>2]=0;w=jk(4)|0;c[(c[p>>2]|0)+180>>2]=w;w=Hw(84680,173936,0)|0;p=Zg(a)|0;if((p|0)!=0){r=p;do{p=Ax(w,$w(c[r+20>>2]|0)|0,1)|0;Wx(p|0,100712,304,1)|0;c[r+28>>2]=p;c[(c[p+8>>2]|0)+112>>2]=r;r=c[r>>2]|0;}while((r|0)!=0)}r=Zg(a)|0;a:do{if((r|0)!=0){a=0;p=-2147483647;o=r;while(1){s=o;n=c[o+8>>2]|0;if((p|0)==(n|0)){H=p;I=a}else{t=o;do{t=c[t>>2]|0;if((t|0)==0){break a}}while((c[t+8>>2]|0)==(n|0));H=n;I=t}if((I|0)!=0){l=o+28|0;u=I;do{if((Oc[d&255](s,u)|0)!=0){uw(w,c[l>>2]|0,c[u+28>>2]|0,0,1)|0}u=c[u>>2]|0;}while((u|0)!=0)}u=c[o>>2]|0;if((u|0)==0){break}else{a=I;p=H;o=u}}}}while(0);H=ux(w)|0;if((H|0)==0){J=Kw(w)|0;return f|0}else{K=H}do{H=c[(c[K+8>>2]|0)+112>>2]|0;I=c[H+24>>2]|0;d=mw(w,K)|0;if((d|0)!=0){r=H+32|0;H=I+8|0;o=d;do{d=c[(c[(c[((c[o>>2]&3|0)==2?o:o-32|0)+28>>2]|0)+8>>2]|0)+112>>2]|0;p=Oc[e&255](r,d+32|0)|0;a=c[d+24>>2]|0;d=uw(f,I,a,0,1)|0;Wx(d|0,95048,176,1)|0;u=d+8|0;c[(c[u>>2]|0)+156>>2]=1;l=c[u>>2]|0;s=b[l+170>>1]|0;if((s&65535|0)<(p|0)){if(s<<16>>16==0){s=(c[H>>2]|0)+180|0;t=c[s>>2]|0;if((t|0)==0){L=kk((c[s+4>>2]<<2)+8|0)|0}else{L=mk(t,(c[s+4>>2]<<2)+8|0)|0}c[(c[H>>2]|0)+180>>2]=L;s=(c[H>>2]|0)+184|0;t=c[s>>2]|0;c[s>>2]=t+1;c[(c[(c[H>>2]|0)+180>>2]|0)+(t<<2)>>2]=d;t=(c[H>>2]|0)+180|0;c[(c[t>>2]|0)+(c[t+4>>2]<<2)>>2]=0;t=a+8|0;a=(c[t>>2]|0)+172|0;s=c[a>>2]|0;if((s|0)==0){M=kk((c[a+4>>2]<<2)+8|0)|0}else{M=mk(s,(c[a+4>>2]<<2)+8|0)|0}c[(c[t>>2]|0)+172>>2]=M;a=(c[t>>2]|0)+176|0;s=c[a>>2]|0;c[a>>2]=s+1;c[(c[(c[t>>2]|0)+172>>2]|0)+(s<<2)>>2]=d;d=(c[t>>2]|0)+172|0;c[(c[d>>2]|0)+(c[d+4>>2]<<2)>>2]=0;N=c[u>>2]|0}else{N=l}b[N+170>>1]=p}o=ow(w,o)|0;}while((o|0)!=0)}K=vx(w,K)|0;}while((K|0)!=0);J=Kw(w)|0;return f|0}function Or(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;g=Hw(113056,173936,0)|0;Wx(g|0,106384,272,1)|0;h=Zg(d)|0;if((h|0)!=0){i=g+8|0;j=0;k=h;while(1){h=Ax(g,$w(c[k+20>>2]|0)|0,1)|0;Wx(h|0,100712,304,1)|0;l=h+8|0;c[(c[l>>2]|0)+112>>2]=k;c[k+24>>2]=h;c[(c[l>>2]|0)+176>>2]=0;m=jk(4)|0;c[(c[l>>2]|0)+172>>2]=m;c[(c[l>>2]|0)+184>>2]=0;m=jk(4)|0;c[(c[l>>2]|0)+180>>2]=m;if((j|0)==0){c[(c[i>>2]|0)+180>>2]=h}else{c[(c[j+8>>2]|0)+164>>2]=h}m=c[k>>2]|0;if((m|0)==0){break}else{j=h;k=m}}}k=Zg(d)|0;a:do{if((k|0)!=0){j=k;b:while(1){i=j;m=j|0;h=c[m>>2]|0;if((h|0)==0){break a}l=j+32|0;n=j+24|0;o=j+20|0;p=h;do{do{if((Oc[e&255](i,p)|0)!=0){h=Oc[f&255](l,p+32|0)|0;q=uw(g,c[n>>2]|0,c[p+24>>2]|0,0,1)|0;Wx(q|0,95048,176,1)|0;if((h|0)>=65536){break b}r=q+8|0;b[(c[r>>2]|0)+170>>1]=~~+(h|0);c[(c[r>>2]|0)+156>>2]=1;if((q|0)==0){break}if((uw(a,c[o>>2]|0,c[p+20>>2]|0,0,0)|0)==0){break}c[(c[r>>2]|0)+156>>2]=100}}while(0);p=c[p>>2]|0;}while((p|0)!=0);j=c[m>>2]|0;if((j|0)==0){break a}}cc(89688,121688,256,170216);return 0}}while(0);a=Zg(d)|0;if((a|0)==0){return g|0}else{s=a}do{a=c[s+24>>2]|0;d=mw(g,a)|0;if((d|0)!=0){f=a+8|0;a=d;do{d=(c[f>>2]|0)+180|0;e=c[d>>2]|0;if((e|0)==0){t=kk((c[d+4>>2]<<2)+8|0)|0}else{t=mk(e,(c[d+4>>2]<<2)+8|0)|0}c[(c[f>>2]|0)+180>>2]=t;d=(c[f>>2]|0)+184|0;e=c[d>>2]|0;c[d>>2]=e+1;c[(c[(c[f>>2]|0)+180>>2]|0)+(e<<2)>>2]=a;e=(c[f>>2]|0)+180|0;c[(c[e>>2]|0)+(c[e+4>>2]<<2)>>2]=0;e=a;d=a-32|0;k=(c[(c[((c[e>>2]&3|0)==2?a:d)+28>>2]|0)+8>>2]|0)+172|0;j=c[k>>2]|0;if((j|0)==0){u=kk((c[k+4>>2]<<2)+8|0)|0}else{u=mk(j,(c[k+4>>2]<<2)+8|0)|0}c[(c[(c[((c[e>>2]&3|0)==2?a:d)+28>>2]|0)+8>>2]|0)+172>>2]=u;k=(c[(c[((c[e>>2]&3|0)==2?a:d)+28>>2]|0)+8>>2]|0)+176|0;j=c[k>>2]|0;c[k>>2]=j+1;c[(c[(c[(c[((c[e>>2]&3|0)==2?a:d)+28>>2]|0)+8>>2]|0)+172>>2]|0)+(j<<2)>>2]=a;j=(c[(c[((c[e>>2]&3|0)==2?a:d)+28>>2]|0)+8>>2]|0)+172|0;c[(c[j>>2]|0)+(c[j+4>>2]<<2)>>2]=0;a=ow(g,a)|0;}while((a|0)!=0)}s=c[s>>2]|0;}while((s|0)!=0);return g|0}function Pr(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;return(c[b>>2]|0)-(c[d>>2]|0)|0}function Qr(a){a=a|0;var b=0;if((a|0)==0){return}b=c[a+4>>2]|0;if((b|0)!=0){eF(b)}b=c[a+8>>2]|0;if((b|0)!=0){eF(b)}eF(a);return}function Rr(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;f=d<<2;c[45186]=gF(c[45186]|0,f)|0;h=(d|0)>0;if(h){i=0;do{c[e+(i<<2)>>2]=2147483647;i=i+1|0;}while((i|0)<(d|0))}c[e+(a<<2)>>2]=0;i=b+(a<<4)|0;if((c[i>>2]|0)>1){j=b+(a<<4)+8|0;k=b+(a<<4)+4|0;l=1;do{c[e+(c[(c[k>>2]|0)+(l<<2)>>2]<<2)>>2]=~~+g[(c[j>>2]|0)+(l<<2)>>2];l=l+1|0;}while((l|0)<(c[i>>2]|0))}i=c[45186]|0;if((d|0)==1){m=0;n=0;o=8}else{l=kk(f-4|0)|0;f=d-1|0;if(h){m=f;n=l;o=8}else{p=f;q=l}}if((o|0)==8){l=0;f=0;while(1){if((l|0)==(a|0)){r=f}else{c[n+(f<<2)>>2]=l;c[i+(l<<2)>>2]=f;r=f+1|0}j=l+1|0;if((j|0)<(d|0)){l=j;f=r}else{p=m;q=n;break}}}if((p|0)>-2){n=(p|0)/2|0;while(1){m=n;while(1){r=m<<1;f=r|1;if((r|0)<(p|0)){if((c[e+(c[q+(r<<2)>>2]<<2)>>2]|0)<(c[e+(c[q+(m<<2)>>2]<<2)>>2]|0)){s=r}else{o=17}}else{o=17}if((o|0)==17){o=0;s=m}if((f|0)<(p|0)){t=(c[e+(c[q+(f<<2)>>2]<<2)>>2]|0)<(c[e+(c[q+(s<<2)>>2]<<2)>>2]|0)?f:s}else{t=s}if((t|0)==(m|0)){break}f=q+(t<<2)|0;r=c[f>>2]|0;l=q+(m<<2)|0;c[f>>2]=c[l>>2];c[l>>2]=r;c[i+(c[f>>2]<<2)>>2]=t;c[i+(c[l>>2]<<2)>>2]=m;m=t}if((n|0)>0){n=n-1|0}else{break}}if((p|0)==0){u=-2147483639}else{v=p;w=-2147483639;o=25}}else{v=p;w=-2147483639;o=25}a:do{if((o|0)==25){while(1){o=0;p=c[45186]|0;n=c[q>>2]|0;t=v-1|0;i=c[q+(t<<2)>>2]|0;c[q>>2]=i;c[p+(i<<2)>>2]=0;i=0;while(1){s=i<<1;m=s|1;if((s|0)<(t|0)){if((c[e+(c[q+(s<<2)>>2]<<2)>>2]|0)<(c[e+(c[q+(i<<2)>>2]<<2)>>2]|0)){x=s}else{o=28}}else{o=28}if((o|0)==28){o=0;x=i}if((m|0)<(t|0)){y=(c[e+(c[q+(m<<2)>>2]<<2)>>2]|0)<(c[e+(c[q+(x<<2)>>2]<<2)>>2]|0)?m:x}else{y=x}if((y|0)==(i|0)){break}m=q+(y<<2)|0;s=c[m>>2]|0;l=q+(i<<2)|0;c[m>>2]=c[l>>2];c[l>>2]=s;c[p+(c[m>>2]<<2)>>2]=y;c[p+(c[l>>2]<<2)>>2]=i;i=y}i=c[e+(n<<2)>>2]|0;if((i|0)==2147483647){u=w;break a}p=b+(n<<4)|0;l=c[p>>2]|0;if((l|0)>1){m=b+(n<<4)+4|0;s=b+(n<<4)+8|0;f=1;r=l;while(1){l=c[(c[m>>2]|0)+(f<<2)>>2]|0;a=~~+g[(c[s>>2]|0)+(f<<2)>>2]+i|0;j=c[45186]|0;k=e+(l<<2)|0;if((c[k>>2]|0)>(a|0)){z=j+(l<<2)|0;A=c[z>>2]|0;c[k>>2]=a;b:do{if((A|0)>0){k=A;while(1){B=(k|0)/2|0;C=c[q+(B<<2)>>2]|0;if((c[e+(C<<2)>>2]|0)<=(a|0)){D=k;break b}c[q+(k<<2)>>2]=C;c[j+(C<<2)>>2]=k;if((k|0)>1){k=B}else{D=B;break}}}else{D=A}}while(0);c[q+(D<<2)>>2]=l;c[z>>2]=D;E=c[p>>2]|0}else{E=r}A=f+1|0;if((A|0)<(E|0)){f=A;r=E}else{break}}}r=i+10|0;if((t|0)==0){u=r;break}else{v=t;w=r;o=25}}}}while(0);if(h){h=0;do{o=e+(h<<2)|0;if((c[o>>2]|0)==2147483647){c[o>>2]=u}h=h+1|0;}while((h|0)<(d|0))}if((q|0)==0){return}eF(q);return}function Sr(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0.0,w=0.0,x=0,y=0,z=0,A=0,B=0,C=0;f=kk(d<<2)|0;h=f;i=(d|0)>0;if(i){j=0;do{g[e+(j<<2)>>2]=3.4028234663852886e+38;j=j+1|0;}while((j|0)<(d|0))}g[e+(a<<2)>>2]=0.0;j=b+(a<<4)|0;if((c[j>>2]|0)>1){k=b+(a<<4)+8|0;l=b+(a<<4)+4|0;m=1;do{g[e+(c[(c[l>>2]|0)+(m<<2)>>2]<<2)>>2]=+g[(c[k>>2]|0)+(m<<2)>>2];m=m+1|0;}while((m|0)<(c[j>>2]|0))}j=d-1|0;m=kk(j<<2)|0;k=m;if(i){i=0;l=0;while(1){if((i|0)==(a|0)){n=l}else{c[k+(l<<2)>>2]=i;c[h+(i<<2)>>2]=l;n=l+1|0}o=i+1|0;if((o|0)<(d|0)){i=o;l=n}else{break}}}if((j|0)>-2){n=(j|0)/2|0;while(1){l=n;while(1){i=l<<1;d=i|1;if((i|0)<(j|0)){if(+g[e+(c[k+(i<<2)>>2]<<2)>>2]<+g[e+(c[k+(l<<2)>>2]<<2)>>2]){p=i}else{q=15}}else{q=15}if((q|0)==15){q=0;p=l}do{if((d|0)<(j|0)){if(+g[e+(c[k+(d<<2)>>2]<<2)>>2]>=+g[e+(c[k+(p<<2)>>2]<<2)>>2]){r=p;break}r=d}else{r=p}}while(0);if((r|0)==(l|0)){break}d=k+(r<<2)|0;i=c[d>>2]|0;a=k+(l<<2)|0;c[d>>2]=c[a>>2];c[a>>2]=i;c[h+(c[d>>2]<<2)>>2]=r;c[h+(c[a>>2]<<2)>>2]=l;l=r}if((n|0)>0){n=n-1|0}else{break}}if((j|0)!=0){s=j;q=24}}else{s=j;q=24}a:do{if((q|0)==24){while(1){q=0;j=c[k>>2]|0;n=s-1|0;r=c[k+(n<<2)>>2]|0;c[k>>2]=r;c[h+(r<<2)>>2]=0;r=0;while(1){p=r<<1;l=p|1;if((p|0)<(n|0)){if(+g[e+(c[k+(p<<2)>>2]<<2)>>2]<+g[e+(c[k+(r<<2)>>2]<<2)>>2]){t=p}else{q=27}}else{q=27}if((q|0)==27){q=0;t=r}do{if((l|0)<(n|0)){if(+g[e+(c[k+(l<<2)>>2]<<2)>>2]>=+g[e+(c[k+(t<<2)>>2]<<2)>>2]){u=t;break}u=l}else{u=t}}while(0);if((u|0)==(r|0)){break}l=k+(u<<2)|0;p=c[l>>2]|0;a=k+(r<<2)|0;c[l>>2]=c[a>>2];c[a>>2]=p;c[h+(c[l>>2]<<2)>>2]=u;c[h+(c[a>>2]<<2)>>2]=r;r=u}v=+g[e+(j<<2)>>2];if(v==3.4028234663852886e+38){break a}r=b+(j<<4)|0;a=c[r>>2]|0;if((a|0)>1){l=b+(j<<4)+4|0;p=b+(j<<4)+8|0;d=1;i=a;while(1){a=c[(c[l>>2]|0)+(d<<2)>>2]|0;w=v+ +g[(c[p>>2]|0)+(d<<2)>>2];o=e+(a<<2)|0;if(+g[o>>2]>w){x=h+(a<<2)|0;y=c[x>>2]|0;g[o>>2]=w;b:do{if((y|0)>0){o=y;while(1){z=(o|0)/2|0;A=c[k+(z<<2)>>2]|0;if(+g[e+(A<<2)>>2]<=w){B=o;break b}c[k+(o<<2)>>2]=A;c[h+(A<<2)>>2]=o;if((o|0)>1){o=z}else{B=z;break}}}else{B=y}}while(0);c[k+(B<<2)>>2]=a;c[x>>2]=B;C=c[r>>2]|0}else{C=i}y=d+1|0;if((y|0)<(C|0)){d=y;i=C}else{break}}}if((n|0)==0){break}else{s=n;q=24}}}}while(0);if((m|0)==0){eF(f);return}eF(m);eF(f);return}function Tr(){nt(180656,48);c[44280]=0;return}function Ur(a,b){a=a|0;b=b|0;var d=0,e=0,f=0.0,g=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0,q=0,r=0,s=0,t=0;d=ot(180656)|0;e=d;c[d+32>>2]=a;c[d+36>>2]=b;fu(a);fu(b);c[d+24>>2]=0;c[d+28>>2]=0;f=+h[a>>3];g=+h[b>>3]-f;i=+h[a+8>>3];j=+h[b+8>>3]-i;if(g>0.0){k=g}else{k=-0.0-g}if(j>0.0){l=j}else{l=-0.0-j}m=(g*g+j*j)*.5+(g*f+j*i);b=d+16|0;h[b>>3]=m;if(k>l){h[d>>3]=1.0;h[d+8>>3]=j/g;n=g;o=m/n;h[b>>3]=o;p=c[44280]|0;q=d+40|0;r=q;c[r>>2]=p;s=c[44280]|0;t=s+1|0;c[44280]=t;return e|0}else{h[d+8>>3]=1.0;h[d>>3]=g/j;n=j;o=m/n;h[b>>3]=o;p=c[44280]|0;q=d+40|0;r=q;c[r>>2]=p;s=c[44280]|0;t=s+1|0;c[44280]=t;return e|0}return 0}function Vr(a){a=a|0;var b=0.0,d=0,e=0,f=0,g=0,i=0,j=0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0;b=+h[a>>3];do{if(b==1.0){if(+h[a+8>>3]<0.0){d=c[a+28>>2]|0;e=c[a+24>>2]|0;if((e|0)==0){f=d;g=9}else{i=e;j=d;g=5}}else{d=c[a+24>>2]|0;e=c[a+28>>2]|0;if((e|0)==0){f=d;g=9}else{i=e;j=d;g=5}}do{if((g|0)==5){k=+h[i+8>>3];if(k>+h[1538]){return}l=+h[1537];if(k<l){m=l;n=+h[a+16>>3]-l*+h[a+8>>3];o=l;p=j;break}else{m=k;n=+h[i>>3];o=l;p=j;break}}else if((g|0)==9){l=+h[1537];m=l;n=+h[a+16>>3]-l*+h[a+8>>3];o=l;p=f}}while(0);do{if((p|0)==0){l=+h[1538];q=l;r=+h[a+16>>3]-l*+h[a+8>>3]}else{l=+h[p+8>>3];if(l<o){return}k=+h[1538];if(l>k){q=k;r=+h[a+16>>3]-k*+h[a+8>>3];break}else{q=l;r=+h[p>>3];break}}}while(0);l=+h[1540];d=n>l;e=r>l;k=+h[1539];if(d&e|n<k&r<k){return}if(d){s=(+h[a+16>>3]-l)/+h[a+8>>3];t=l}else{s=m;t=n}if(t<k){u=(+h[a+16>>3]-k)/+h[a+8>>3];v=k}else{u=s;v=t}if(e){w=(+h[a+16>>3]-l)/+h[a+8>>3];x=l}else{w=q;x=r}if(x>=k){y=w;z=u;A=x;B=v;break}y=(+h[a+16>>3]-k)/+h[a+8>>3];z=u;A=k;B=v}else{e=c[a+28>>2]|0;d=c[a+24>>2]|0;do{if((d|0)==0){k=+h[1539];C=+h[a+16>>3]-b*k;D=k;E=k}else{k=+h[d>>3];if(k>+h[1540]){return}l=+h[1539];if(k<l){C=+h[a+16>>3]-b*l;D=l;E=l;break}else{C=+h[d+8>>3];D=k;E=l;break}}}while(0);do{if((e|0)==0){l=+h[1540];F=+h[a+16>>3]-l*b;G=l}else{l=+h[e>>3];if(l<E){return}k=+h[1540];if(l>k){F=+h[a+16>>3]-k*b;G=k;break}else{F=+h[e+8>>3];G=l;break}}}while(0);l=+h[1538];e=C>l;d=F>l;k=+h[1537];if(e&d|C<k&F<k){return}if(e){H=l;I=(+h[a+16>>3]-l)/b}else{H=C;I=D}if(H<k){J=k;K=(+h[a+16>>3]-k)/b}else{J=H;K=I}if(d){L=l;M=(+h[a+16>>3]-l)/b}else{L=F;M=G}if(L>=k){y=L;z=J;A=M;B=K;break}y=k;z=J;A=(+h[a+16>>3]-k)/b;B=K}}while(0);p=a+32|0;ys(c[p>>2]|0,B,z);ys(c[p>>2]|0,A,y);p=a+36|0;ys(c[p>>2]|0,B,z);ys(c[p>>2]|0,A,y);return}function Wr(a,b,d){a=a|0;b=b|0;d=d|0;c[a+24+(b<<2)>>2]=d;fu(d);if((c[a+24+(1-b<<2)>>2]|0)==0){return}Vr(a);eu(c[a+32>>2]|0);eu(c[a+36>>2]|0);pt(a,180656);return}function Xr(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;g=i;i=i+16|0;h=g|0;j=b<<2;k=kk(da(j,d)|0)|0;l=c[e>>2]|0;m=kk(j)|0;j=m;n=c[a+8>>2]|0;if((l|0)!=0){eF(c[l>>2]|0);eF(l)}l=kk(d<<2)|0;c[e>>2]=l;if((d|0)>0){e=0;do{c[l+(e<<2)>>2]=k+((da(e,b)|0)<<2);e=e+1|0;}while((e|0)<(d|0))}e=(f|0)!=0;if(e){Ds(a,b)}f=(yb()|0)%(b|0)|0;vr(h,b);k=c[l>>2]|0;if(e){Rr(f,a,b,k)}else{ur(f,a,b,k,h)}k=(b|0)>0;if(k){o=f;p=0;q=0;while(1){r=c[(c[l>>2]|0)+(p<<2)>>2]|0;c[j+(p<<2)>>2]=r;s=(r|0)>(q|0);t=s?p:o;u=p+1|0;if((u|0)<(b|0)){o=t;p=u;q=s?r:q}else{v=t;break}}}else{v=f}a:do{if((d|0)>1){if(e){f=v;q=1;while(1){p=l+(q<<2)|0;Rr(f,a,b,c[p>>2]|0);if(k){o=f;t=0;r=0;while(1){s=j+(t<<2)|0;u=c[s>>2]|0;w=c[(c[p>>2]|0)+(t<<2)>>2]|0;x=(u|0)<(w|0)?u:w;c[s>>2]=x;s=(x|0)>(r|0);w=s?t:o;u=t+1|0;if((u|0)<(b|0)){o=w;t=u;r=s?x:r}else{y=w;break}}}else{y=f}r=q+1|0;if((r|0)<(d|0)){f=y;q=r}else{break a}}}if(k){z=v;A=1}else{q=1;while(1){ur(v,a,b,c[l+(q<<2)>>2]|0,h);q=q+1|0;if((q|0)>=(d|0)){break a}}}while(1){q=l+(A<<2)|0;ur(z,a,b,c[q>>2]|0,h);f=z;r=0;t=0;while(1){o=j+(r<<2)|0;p=c[o>>2]|0;w=c[(c[q>>2]|0)+(r<<2)>>2]|0;x=(p|0)<(w|0)?p:w;c[o>>2]=x;o=(x|0)>(t|0);B=o?r:f;w=r+1|0;if((w|0)<(b|0)){f=B;r=w;t=o?x:t}else{break}}t=A+1|0;if((t|0)<(d|0)){z=B;A=t}else{break}}}}while(0);eF(m);if(!e){i=g;return}Es(a,b,n);i=g;return}function Yr(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0.0,g=0,h=0,i=0,j=0.0,k=0,l=0;if((d|0)<=0){return}e=(b|0)>0;f=+(b|0);g=0;do{do{if(e){h=c[a+(g<<2)>>2]|0;i=0;j=0.0;do{j=j+ +(c[h+(i<<2)>>2]|0);i=i+1|0;}while((i|0)<(b|0));if(!e){break}i=~~(j/f);h=a+(g<<2)|0;k=0;do{l=(c[h>>2]|0)+(k<<2)|0;c[l>>2]=(c[l>>2]|0)-i;k=k+1|0;}while((k|0)<(b|0))}}while(0);g=g+1|0;}while((g|0)<(d|0));return}function Zr(){c[43746]=~~+T(+((c[44272]|0)+4|0));return}function _r(a,b){a=a|0;b=b|0;var c=0.0,d=0.0;c=+h[a>>3]- +h[b>>3];d=+h[a+8>>3]- +h[b+8>>3];return+(c*c+d*d)}function $r(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=i;f=b;b=i;i=i+16|0;c[b>>2]=c[f>>2];c[b+4>>2]=c[f+4>>2];c[b+8>>2]=c[f+8>>2];c[b+12>>2]=c[f+12>>2];f=d;d=i;i=i+16|0;c[d>>2]=c[f>>2];c[d+4>>2]=c[f+4>>2];c[d+8>>2]=c[f+8>>2];c[d+12>>2]=c[f+12>>2];h[a>>3]=+h[b>>3]- +h[d>>3];h[a+8>>3]=+h[b+8>>3]- +h[d+8>>3];i=e;return}function as(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=i;f=b;b=i;i=i+16|0;c[b>>2]=c[f>>2];c[b+4>>2]=c[f+4>>2];c[b+8>>2]=c[f+8>>2];c[b+12>>2]=c[f+12>>2];f=d;d=i;i=i+16|0;c[d>>2]=c[f>>2];c[d+4>>2]=c[f+4>>2];c[d+8>>2]=c[f+8>>2];c[d+12>>2]=c[f+12>>2];h[a>>3]=+h[b>>3]+ +h[d>>3];h[a+8>>3]=+h[b+8>>3]+ +h[d+8>>3];i=e;return}function bs(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0.0,j=0.0;e=i;f=a;a=i;i=i+16|0;c[a>>2]=c[f>>2];c[a+4>>2]=c[f+4>>2];c[a+8>>2]=c[f+8>>2];c[a+12>>2]=c[f+12>>2];f=b;b=i;i=i+16|0;c[b>>2]=c[f>>2];c[b+4>>2]=c[f+4>>2];c[b+8>>2]=c[f+8>>2];c[b+12>>2]=c[f+12>>2];f=d;d=i;i=i+16|0;c[d>>2]=c[f>>2];c[d+4>>2]=c[f+4>>2];c[d+8>>2]=c[f+8>>2];c[d+12>>2]=c[f+12>>2];g=+h[b+8>>3];j=+h[b>>3];i=e;return+((+h[a+8>>3]-g)*(+h[d>>3]-j)-(+h[d+8>>3]-g)*(+h[a>>3]-j))}function cs(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0.0,j=0.0;e=i;f=a;a=i;i=i+16|0;c[a>>2]=c[f>>2];c[a+4>>2]=c[f+4>>2];c[a+8>>2]=c[f+8>>2];c[a+12>>2]=c[f+12>>2];f=b;b=i;i=i+16|0;c[b>>2]=c[f>>2];c[b+4>>2]=c[f+4>>2];c[b+8>>2]=c[f+8>>2];c[b+12>>2]=c[f+12>>2];f=d;d=i;i=i+16|0;c[d>>2]=c[f>>2];c[d+4>>2]=c[f+4>>2];c[d+8>>2]=c[f+8>>2];c[d+12>>2]=c[f+12>>2];g=+h[b+8>>3];j=+h[b>>3];i=e;return(+h[a+8>>3]-g)*(+h[d>>3]-j)-(+h[d+8>>3]-g)*(+h[a>>3]-j)>0.0|0}function ds(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,j=0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0,w=0.0;g=i;j=a;a=i;i=i+16|0;c[a>>2]=c[j>>2];c[a+4>>2]=c[j+4>>2];c[a+8>>2]=c[j+8>>2];c[a+12>>2]=c[j+12>>2];j=b;b=i;i=i+16|0;c[b>>2]=c[j>>2];c[b+4>>2]=c[j+4>>2];c[b+8>>2]=c[j+8>>2];c[b+12>>2]=c[j+12>>2];j=d;d=i;i=i+16|0;c[d>>2]=c[j>>2];c[d+4>>2]=c[j+4>>2];c[d+8>>2]=c[j+8>>2];c[d+12>>2]=c[j+12>>2];j=e;e=i;i=i+16|0;c[e>>2]=c[j>>2];c[e+4>>2]=c[j+4>>2];c[e+8>>2]=c[j+8>>2];c[e+12>>2]=c[j+12>>2];k=+h[a>>3];l=+h[e+8>>3];m=+h[d+8>>3];n=k*(l-m);o=+h[b>>3];p=+h[e>>3];q=+h[b+8>>3];r=+h[a+8>>3];s=q-r;t=+h[d>>3];u=t*(r-q)+(n+o*(m-l)+p*s);if(u==0.0){v=0;i=g;return v|0}w=(p*(m-r)+(n+t*(r-l)))/u;l=(-0.0-(t*s+(k*(m-q)+o*(r-m))))/u;h[f>>3]=k+(o-k)*w;h[f+8>>3]=r+w*s;do{if(w>=0.0&w<=1.0){if(l>=0.0&l<=1.0){v=1}else{break}i=g;return v|0}}while(0);v=0;i=g;return v|0}function es(a,b,d){a=a|0;b=b|0;d=+d;var e=0.0,f=0,g=0.0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;c[a+20>>2]=b;fu(b);e=+h[b+8>>3]+d;h[a+24>>3]=e;f=c[53556]|0;d=+(f|0);g=(e- +h[8])/+h[3711]*d;do{if(g<0.0){i=0}else{if(g<d){i=~~g;break}else{i=f-1|0;break}}}while(0);if((i|0)<(c[53554]|0)){c[53554]=i}f=b|0;b=(c[53558]|0)+(i*40|0)+32|0;i=c[b>>2]|0;a:do{if((i|0)==0){j=b;k=0}else{l=b;m=i;while(1){g=+h[m+24>>3];if(e<=g){if(e!=g){j=l;k=m;break a}if(+h[f>>3]<=+h[c[m+20>>2]>>3]){j=l;k=m;break a}}n=m+32|0;o=c[n>>2]|0;if((o|0)==0){j=n;k=0;break}else{l=n;m=o}}}}while(0);c[a+32>>2]=k;c[j>>2]=a;c[53560]=(c[53560]|0)+1;return}function fs(a){a=a|0;var b=0,d=0,e=0.0,f=0.0,g=0,i=0;b=a+20|0;if((c[b>>2]|0)==0){return}d=c[53556]|0;e=+(d|0);f=(+h[a+24>>3]- +h[8])/+h[3711]*e;do{if(f<0.0){g=0}else{if(f<e){g=~~f;break}else{g=d-1|0;break}}}while(0);if((g|0)<(c[53554]|0)){c[53554]=g}d=(c[53558]|0)+(g*40|0)|0;do{i=d+32|0;d=c[i>>2]|0;}while((d|0)!=(a|0));c[i>>2]=c[a+32>>2];c[53560]=(c[53560]|0)-1;eu(c[b>>2]|0);c[b>>2]=0;return}function gs(){return(c[53560]|0)==0|0}function hs(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,i=0,j=0.0;b=c[53554]|0;d=c[53558]|0;e=c[d+(b*40|0)+32>>2]|0;if((e|0)==0){f=b;while(1){b=f+1|0;c[53554]=b;g=c[d+(b*40|0)+32>>2]|0;if((g|0)==0){f=b}else{i=g;break}}}else{i=e}j=+h[i+24>>3];h[a>>3]=+h[c[i+20>>2]>>3];h[a+8>>3]=j;return}function is(){var a=0,b=0;a=(c[53558]|0)+((c[53554]|0)*40|0)+32|0;b=c[a>>2]|0;c[a>>2]=c[b+32>>2];c[53560]=(c[53560]|0)-1;return b|0}function js(){eF(c[53558]|0);c[53558]=0;return}function ks(){var a=0,b=0,d=0,e=0,f=0,g=0,h=0,i=0;c[53560]=0;c[53554]=0;a=c[43746]|0;b=a<<2;c[53556]=b;d=c[53558]|0;if((d|0)==0){e=kk(a*160|0)|0;c[53558]=e;f=c[53556]|0;g=e}else{f=b;g=d}if((f|0)>0){h=0;i=g}else{return}while(1){c[i+(h*40|0)+32>>2]=0;g=h+1|0;if((g|0)>=(c[53556]|0)){break}h=g;i=c[53558]|0}return}function ls(){nt(178816,40);eF(c[53836]|0);c[53836]=0;return}function ms(){var b=0,d=0,e=0,f=0,g=0,h=0;nt(178816,40);b=c[43746]|0;d=b<<1;c[53834]=d;e=c[53836]|0;if((e|0)==0){f=kk(b<<3)|0;c[53836]=f;g=c[53834]|0;h=f}else{g=d;h=e}a:do{if((g|0)>0){e=0;d=h;while(1){c[d+(e<<2)>>2]=0;f=e+1|0;if((f|0)>=(c[53834]|0)){break a}e=f;d=c[53836]|0}}}while(0);h=ot(178816)|0;c[h+8>>2]=0;a[h+16|0]=0;c[h+32>>2]=0;c[h+20>>2]=0;c[h+12>>2]=0;c[53832]=h;h=ot(178816)|0;c[h+8>>2]=0;a[h+16|0]=0;c[h+32>>2]=0;c[h+20>>2]=0;c[h+12>>2]=0;c[53830]=h;c[c[53832]>>2]=0;c[(c[53832]|0)+4>>2]=c[53830];c[c[53830]>>2]=c[53832];c[(c[53830]|0)+4>>2]=0;c[c[53836]>>2]=c[53832];c[(c[53836]|0)+((c[53834]|0)-1<<2)>>2]=c[53830];return}function ns(b,d){b=b|0;d=d|0;var e=0;e=ot(178816)|0;c[e+8>>2]=b;a[e+16|0]=d;c[e+32>>2]=0;c[e+20>>2]=0;c[e+12>>2]=0;return e|0}function os(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0,t=0;e=c[b+8>>2]|0;f=c[d+8>>2]|0;if((e|0)==0|(f|0)==0){g=0;return g|0}i=c[e+36>>2]|0;j=c[f+36>>2]|0;if((i|0)==(j|0)){g=0;return g|0}k=+h[e>>3];l=+h[f+8>>3];m=+h[e+8>>3];n=+h[f>>3];o=k*l-m*n;if(o>-1.0e-10&o<1.0e-10){g=0;return g|0}p=+h[e+16>>3];q=+h[f+16>>3];r=(l*p-m*q)/o;m=(k*q-n*p)/o;o=+h[i+8>>3];p=+h[j+8>>3];do{if(o<p){s=b;t=i}else{if(o==p){if(+h[i>>3]<+h[j>>3]){s=b;t=i;break}}s=d;t=j}}while(0);j=a[s+16|0]|0;do{if(r<+h[t>>3]){if(j<<24>>24==1){g=0}else{break}return g|0}else{if(j<<24>>24==0){g=0}else{break}return g|0}}while(0);j=bu()|0;c[j+20>>2]=0;h[j>>3]=r;h[j+8>>3]=m;g=j;return g|0}function ps(b,d){b=b|0;d=d|0;var e=0,f=0,g=0.0,i=0.0,j=0,k=0,l=0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0,s=0,t=0.0,u=0.0,v=0.0;e=c[b+8>>2]|0;f=c[e+36>>2]|0;g=+h[d>>3];i=+h[f>>3];j=g>i;k=a[b+16|0]|0;do{if(j){if(k<<24>>24==0){l=1}else{break}return l|0}else{if(k<<24>>24==1){l=0}else{break}return l|0}}while(0);m=+h[e>>3];a:do{if(m==1.0){n=+h[d+8>>3];o=n- +h[f+8>>3];p=g-i;q=+h[e+8>>3];b=q<0.0;do{if((b&1&(j&1^1)|j&q>=0.0&1|0)==0){r=g+n*q>+h[e+16>>3];if(b){if(r){s=r&1^1;break a}else{break}}else{if(r){break}else{s=r&1;break a}}}else{r=o>=q*p;if(r){s=r&1;break a}}}while(0);n=i- +h[c[e+32>>2]>>3];r=(p*p-o*o)*q<o*n*(q*q+(p*2.0/n+1.0))|0;if(!b){s=r;break}s=r^1}else{n=+h[e+16>>3]-m*g;t=+h[d+8>>3]-n;u=g-i;v=n- +h[f+8>>3];s=t*t>u*u+v*v|0}}while(0);if(k<<24>>24==0){l=s;return l|0}l=(s|0)==0|0;return l|0}function qs(a,b){a=a|0;b=b|0;var d=0;c[b>>2]=a;d=a+4|0;c[b+4>>2]=c[d>>2];c[c[d>>2]>>2]=b;c[d>>2]=b;return}function rs(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;b=c[53834]|0;d=~~((+h[a>>3]- +h[10])/+h[3712]*+(b|0));e=(d|0)<0?0:d;d=(e|0)<(b|0)?e:b-1|0;do{if((d|0)>-1){e=c[53836]|0;f=e+(d<<2)|0;g=c[f>>2]|0;if((g|0)==0){i=1;j=6;break}if((c[g+8>>2]|0)!=-2){k=g;l=b;m=e;break}c[f>>2]=0;f=g+12|0;e=(c[f>>2]|0)-1|0;c[f>>2]=e;if((e|0)!=0){i=1;j=6;break}pt(g,178816);i=1;j=6}else{i=1;j=6}}while(0);if((j|0)==6){a:while(1){j=0;b=d-i|0;g=c[53834]|0;do{if((b|0)>-1&(g|0)>(b|0)){e=c[53836]|0;f=e+(b<<2)|0;n=c[f>>2]|0;if((n|0)==0){break}if((c[n+8>>2]|0)!=-2){o=n;p=g;q=e;break a}c[f>>2]=0;f=n+12|0;e=(c[f>>2]|0)-1|0;c[f>>2]=e;if((e|0)!=0){break}pt(n,178816)}}while(0);g=i+d|0;b=c[53834]|0;do{if((g|0)>-1&(b|0)>(g|0)){n=c[53836]|0;e=n+(g<<2)|0;f=c[e>>2]|0;if((f|0)==0){break}if((c[f+8>>2]|0)!=-2){o=f;p=b;q=n;break a}c[e>>2]=0;e=f+12|0;n=(c[e>>2]|0)-1|0;c[e>>2]=n;if((n|0)!=0){break}pt(f,178816)}}while(0);i=i+1|0;j=6}c[43680]=(c[43680]|0)+i;k=o;l=p;m=q}c[44270]=(c[44270]|0)+1;q=c[53832]|0;p=c[53830]|0;b:do{if((k|0)==(q|0)){j=21}else{if((k|0)==(p|0)){r=k}else{if((ps(k,a)|0)==0){r=k}else{j=21;break}}while(1){o=c[r>>2]|0;if((o|0)==(q|0)){s=q;break b}if((ps(o,a)|0)==0){r=o}else{s=o;break}}}}while(0);if((j|0)==21){j=k;do{j=c[j+4>>2]|0;if((j|0)==(p|0)){break}}while((ps(j,a)|0)!=0);s=c[j>>2]|0}if((d|0)<=0){return s|0}if((d|0)>=(l-1|0)){return s|0}l=c[m+(d<<2)>>2]|0;if((l|0)==0){t=m}else{m=l+12|0;c[m>>2]=(c[m>>2]|0)-1;t=c[53836]|0}c[t+(d<<2)>>2]=s;t=(c[(c[53836]|0)+(d<<2)>>2]|0)+12|0;c[t>>2]=(c[t>>2]|0)+1;return s|0}function ss(a){a=a|0;var b=0,d=0;b=a+4|0;d=a|0;c[(c[d>>2]|0)+4>>2]=c[b>>2];c[c[b>>2]>>2]=c[d>>2];c[a+8>>2]=-2;return}function ts(a){a=a|0;return c[a+4>>2]|0}function us(a){a=a|0;return c[a>>2]|0}function vs(b){b=b|0;var d=0,e=0;d=c[b+8>>2]|0;if((d|0)==0){e=212936}else{e=(a[b+16|0]|0)==0?d+32|0:d+36|0}return c[e>>2]|0}function ws(b){b=b|0;var d=0,e=0;d=c[b+8>>2]|0;if((d|0)==0){e=212936}else{e=(a[b+16|0]|0)==0?d+36|0:d+32|0}return c[e>>2]|0}function xs(){nt(176456,24);return}function ys(a,b,d){a=a|0;b=+b;d=+d;var e=0,f=0,g=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0,p=0.0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;e=(c[44274]|0)+((c[a+16>>2]|0)*96|0)+88|0;f=c[e>>2]|0;a:do{if((f|0)!=0){g=+h[f+8>>3];i=+h[f+16>>3];if(g==b&i==d){return}j=+h[a>>3];k=b-j;l=+h[a+8>>3];m=d-l;n=g-j;g=i-l;o=k<0.0;do{if(o){if(n>=0.0){break}i=g/n;p=m/k;if(p<i){break a}if(p>i){break}q=k>n?-1:1;r=21}else{if(n<0.0){break a}s=n>0.0;if(k>0.0){if(!s){q=g>0.0?-1:1;r=21;break}i=g/n;p=m/k;if(p<i){break a}if(p>i){break}q=k<n?-1:1;r=21;break}else{if(s){q=m>0.0?1:-1;r=21;break}if(m<g){q=g>0.0?-1:1;r=21;break}else{q=m>0.0?1:-1;r=21;break}}}}while(0);if((r|0)==21){if((q|0)<0){break}}s=f|0;t=c[s>>2]|0;b:do{if((t|0)==0){u=s;v=0}else{w=s;x=t;while(1){g=+h[x+8>>3];n=+h[x+16>>3];if(g==b&n==d){break}i=g-j;g=n-l;do{if(o){if(i>=0.0){break}n=g/i;p=m/k;if(p<n){u=w;v=x;break b}if(p>n){break}y=k>i?-1:1;r=41}else{if(i<0.0){u=w;v=x;break b}z=i>0.0;if(k>0.0){if(!z){y=g>0.0?-1:1;r=41;break}n=g/i;p=m/k;if(p<n){u=w;v=x;break b}if(p>n){break}y=k<i?-1:1;r=41;break}else{if(z){y=m>0.0?1:-1;r=41;break}if(m<g){y=g>0.0?-1:1;r=41;break}else{y=m>0.0?1:-1;r=41;break}}}}while(0);if((r|0)==41){r=0;if((y|0)<=0){u=w;v=x;break b}}z=x|0;A=c[z>>2]|0;if((A|0)==0){u=z;v=0;break b}else{w=z;x=A}}return}}while(0);o=ot(176456)|0;h[o+8>>3]=b;h[o+16>>3]=d;c[u>>2]=o;c[o>>2]=v;return}}while(0);v=ot(176456)|0;h[v+8>>3]=b;h[v+16>>3]=d;c[v>>2]=f;c[e>>2]=v;return}function zs(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;b=c[a+(d<<4)>>2]|0;if((b|0)<=1){f=0;return f|0}g=c[a+(d<<4)+4>>2]|0;d=0;a=1;while(1){h=((c[e+(c[g+(a<<2)>>2]<<2)>>2]|0)>0)+d|0;i=a+1|0;if((i|0)<(b|0)){d=h;a=i}else{f=h;break}}return f|0}function As(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=a+(b<<4)|0;if((c[e>>2]|0)<=1){return}f=a+(b<<4)+4|0;b=1;do{c[d+(c[(c[f>>2]|0)+(b<<2)>>2]<<2)>>2]=1;b=b+1|0;}while((b|0)<(c[e>>2]|0));return}function Bs(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=a+(b<<4)|0;if((c[e>>2]|0)<=1){return}f=a+(b<<4)+4|0;b=1;do{c[d+(c[(c[f>>2]|0)+(b<<2)>>2]<<2)>>2]=0;b=b+1|0;}while((b|0)<(c[e>>2]|0));return}function Cs(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;d=a+8|0;e=c[d>>2]|0;Ds(a,b);f=b<<2;g=kk(da(f,b)|0)|0;h=kk(f)|0;f=(b|0)>0;if(f){i=0;while(1){c[h+(i<<2)>>2]=g+((da(i,b)|0)<<2);j=i+1|0;if((j|0)<(b|0)){i=j}else{k=0;break}}do{Rr(k,a,b,c[h+(k<<2)>>2]|0);k=k+1|0;}while((k|0)<(b|0))}eF(c[d>>2]|0);c[d>>2]=0;if((e|0)!=0&f){l=e;m=0}else{return h|0}while(1){c[a+(m<<4)+8>>2]=l;e=m+1|0;if((e|0)<(b|0)){l=l+(c[a+(m<<4)>>2]<<2)|0;m=e}else{break}}return h|0}function Ds(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;d=kk(b<<2)|0;e=d;f=(b|0)>0;if(f){h=0;i=0}else{kk(0)|0;eF(d);return}do{h=(c[a+(i<<4)>>2]|0)+h|0;i=i+1|0;}while((i|0)<(b|0));i=kk(h<<2)|0;if(!f){eF(d);return}vF(d|0,0,b<<2|0)|0;f=i;i=0;while(1){c[a+(i<<4)+8>>2]=f;h=a+(i<<4)|0;j=c[h>>2]|0;do{if((j|0)>1){k=a+(i<<4)+4|0;l=1;do{c[e+(c[(c[k>>2]|0)+(l<<2)>>2]<<2)>>2]=1;l=l+1|0;m=c[h>>2]|0;}while((l|0)<(m|0));l=m-1|0;if((m|0)<2){n=m;break}k=a+(i<<4)+4|0;o=m-2|0;p=1;while(1){q=c[(c[k>>2]|0)+(p<<2)>>2]|0;r=c[a+(q<<4)>>2]|0;if((r|0)>1){s=c[a+(q<<4)+4>>2]|0;q=0;t=1;do{q=((c[e+(c[s+(t<<2)>>2]<<2)>>2]|0)>0)+q|0;t=t+1|0;}while((t|0)<(r|0));u=q<<1}else{u=0}g[f+(p<<2)>>2]=+(o+r-u|0);if((p|0)<(l|0)){p=p+1|0}else{break}}p=c[h>>2]|0;if((p|0)<=1){n=p;break}p=a+(i<<4)+4|0;l=1;while(1){c[e+(c[(c[p>>2]|0)+(l<<2)>>2]<<2)>>2]=0;o=l+1|0;k=c[h>>2]|0;if((o|0)<(k|0)){l=o}else{n=k;break}}}else{n=j}}while(0);j=i+1|0;if((j|0)<(b|0)){f=f+(n<<2)|0;i=j}else{break}}eF(d);return}function Es(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;e=a+8|0;eF(c[e>>2]|0);c[e>>2]=0;if((d|0)!=0&(b|0)>0){f=d;g=0}else{return}while(1){c[a+(g<<4)+8>>2]=f;d=g+1|0;if((d|0)<(b|0)){f=f+(c[a+(g<<4)>>2]<<2)|0;g=d}else{break}}return}function Fs(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0.0,g=0,i=0.0,j=0.0,k=0,l=0.0,m=0.0;if((b|0)>0){f=0.0;g=0}else{i=0.0;j=+T(i);return+j}while(1){k=c[a+(g<<2)>>2]|0;l=+h[k+(d<<3)>>3]- +h[k+(e<<3)>>3];m=f+l*l;k=g+1|0;if((k|0)<(b|0)){f=m;g=k}else{i=m;break}}j=+T(i);return+j}function Gs(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,i=0,j=0,k=0,l=0,m=0.0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0.0,y=0,z=0.0,A=0,B=0,C=0;f=e+1|0;g=d;while(1){if((g|0)>=(e|0)){i=21;break}d=yb()|0;j=g+1|0;k=b+(((((yb()|0)<<16|d)>>>0)%((f-g|0)>>>0)|0)+g<<2)|0;d=c[k>>2]|0;l=b+(g<<2)|0;c[k>>2]=c[l>>2];c[l>>2]=d;m=+h[a+(d<<3)>>3];if((j|0)<(e|0)){k=e;n=j;while(1){a:do{if((n|0)<(k|0)){o=n;while(1){p=o+1|0;if(+h[a+(c[b+(o<<2)>>2]<<3)>>3]>m){q=o;break a}if((p|0)<(k|0)){o=p}else{q=p;break}}}else{q=n}}while(0);b:do{if((q|0)<(k|0)){o=k;while(1){r=b+(o<<2)|0;s=c[r>>2]|0;t=o-1|0;if(+h[a+(s<<3)>>3]<=m){break}if((q|0)<(t|0)){o=t}else{u=q;v=t;break b}}o=b+(q<<2)|0;p=c[o>>2]|0;c[o>>2]=s;c[r>>2]=p;u=q+1|0;v=t}else{u=q;v=k}}while(0);if((u|0)<(v|0)){k=v;n=u}else{w=u;break}}}else{w=j}n=((+h[a+(c[b+(w<<2)>>2]<<3)>>3]>m)<<31>>31)+w|0;k=b+(n<<2)|0;c[l>>2]=c[k>>2];c[k>>2]=d;k=n-1|0;Gs(a,b,g,k);p=n+1|0;Gs(a,b,p,e);do{if((k|0)>(g|0)){n=1;o=g;x=+h[a+(c[l>>2]<<3)>>3];while(1){y=o+1|0;z=+h[a+(c[b+(y<<2)>>2]<<3)>>3];A=x>z?0:n;B=(A|0)==0;if((y|0)>=(k|0)|B){break}else{n=A;o=y;x=z}}if(!B){break}Gs(a,b,g,k)}}while(0);if((p|0)>=(e|0)){i=21;break}k=1;l=p;m=+h[a+(c[b+(p<<2)>>2]<<3)>>3];while(1){d=l+1|0;x=+h[a+(c[b+(d<<2)>>2]<<3)>>3];j=m>x?0:k;C=(j|0)==0;if((d|0)>=(e|0)|C){break}else{k=j;l=d;m=x}}if(C){g=p}else{i=21;break}}if((i|0)==21){return}}function Hs(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0.0,J=0.0,K=0.0,L=0.0,M=0,N=0,O=0.0,P=0.0,Q=0.0,R=0.0,S=0.0,T=0.0,U=0.0,V=0.0,W=0.0,X=0.0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,na=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,xa=0,ya=0,za=0,Aa=0.0,Ba=0,Ca=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0.0,Pa=0,Qa=0.0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0.0,Xa=0.0,Ya=0.0,Za=0.0,_a=0.0,$a=0.0,ab=0,bb=0,cb=0,db=0,eb=0.0,fb=0.0,gb=0.0,hb=0,ib=0.0,jb=0,kb=0,lb=0,mb=0,nb=0.0,ob=0.0,pb=0.0,qb=0.0,rb=0,sb=0,tb=0.0,ub=0.0,vb=0.0,wb=0,xb=0.0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0.0,Eb=0.0,Fb=0,Gb=0.0,Hb=0.0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0.0,Nb=0.0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0.0,Ub=0.0,Vb=0,Wb=0.0,Xb=0.0,Yb=0,Zb=0,_b=0,$b=0,ac=0,bc=0.0,cc=0.0,dc=0,ec=0,fc=0,gc=0,hc=0.0,ic=0.0,jc=0,kc=0.0,lc=0.0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0.0,tc=0.0,uc=0,vc=0.0,wc=0.0,xc=0,yc=0,zc=0,Ac=0.0,Bc=0.0,Cc=0.0,Dc=0.0,Ec=0,Fc=0,Gc=0.0,Hc=0.0,Ic=0.0,Jc=0.0,Kc=0,Lc=0,Mc=0.0,Nc=0.0,Oc=0,Pc=0,Qc=0,Rc=0,Sc=0,Tc=0.0,Uc=0.0,Vc=0,Wc=0,Xc=0,Yc=0.0,Zc=0.0,_c=0,$c=0,ad=0,bd=0,cd=0,dd=0,ed=0,fd=0,gd=0,hd=0,id=0,jd=0,kd=0,ld=0,md=0,nd=0,od=0,pd=0,qd=0,rd=0,sd=0,td=0,ud=0,vd=0,wd=0,xd=0,yd=0.0,zd=0.0,Ad=0,Bd=0.0,Cd=0.0,Dd=0.0,Ed=0.0,Fd=0.0,Gd=0.0,Hd=0.0,Id=0.0;e=i;i=i+32|0;f=1;g=0;j=i;i=i+168|0;c[j>>2]=0;while(1)switch(f|0){case 1:k=e|0;l=e+16|0;m=e+24|0;n=ma(54,b*40|0|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;p=n;q=(b|0)>0;if(q){r=0;s=0;f=3;break}else{f=2;break};case 2:t=ma(54,0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;w=0;x=t;y=t;f=8;break;case 3:z=(c[(c[a+(s<<2)>>2]|0)+4>>2]|0)+r|0;t=s+1|0;if((t|0)<(b|0)){r=z;s=t;f=3;break}else{f=4;break};case 4:A=ma(54,z*24|0|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;B=A;if(q){C=0;D=0;f=5;break}else{w=z;x=A;y=B;f=8;break};case 5:E=p+(D*40|0)|0;c[E>>2]=B+(C*24|0);F=a+(D<<2)|0;t=c[F>>2]|0;if((c[t+4>>2]|0)>0){G=C;H=0;I=-1.7976931348623157e+308;J=-1.7976931348623157e+308;K=1.7976931348623157e+308;L=1.7976931348623157e+308;M=t;f=6;break}else{N=C;O=-1.7976931348623157e+308;P=-1.7976931348623157e+308;Q=1.7976931348623157e+308;R=1.7976931348623157e+308;f=7;break};case 6:t=c[M>>2]|0;S=+h[t+(H<<4)>>3];T=+h[t+(H<<4)+8>>3];U=L<S?L:S;V=K<T?K:T;W=J>S?J:S;X=I>T?I:T;h[B+(G*24|0)>>3]=S;h[B+(G*24|0)+8>>3]=T;c[B+(G*24|0)+16>>2]=E;c[B+(G*24|0)+20>>2]=0;t=G+1|0;Y=H+1|0;Z=c[F>>2]|0;if((Y|0)<(c[Z+4>>2]|0)){G=t;H=Y;I=X;J=W;K=V;L=U;M=Z;f=6;break}else{N=t;O=X;P=W;Q=V;R=U;f=7;break};case 7:c[p+(D*40|0)+4>>2]=B+((N-1|0)*24|0);h[p+(D*40|0)+8>>3]=R;h[p+(D*40|0)+16>>3]=Q;h[p+(D*40|0)+24>>3]=P;h[p+(D*40|0)+32>>3]=O;t=D+1|0;if((t|0)<(b|0)){C=N;D=t;f=5;break}else{w=z;x=A;y=B;f=8;break};case 8:_=BF(178232,f,j)|0;f=209;break;case 209:if((_|0)==0){f=10;break}else{f=9;break};case 9:ka(150,n|0);if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;ka(150,x|0);if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;$=0;f=208;break;case 10:aa=ma(54,w<<2|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;ba=aa;if((w|0)>0){ca=0;f=11;break}else{f=189;break};case 11:c[ba+(ca<<2)>>2]=y+(ca*24|0);t=ca+1|0;if((t|0)<(w|0)){ca=t;f=11;break}else{f=12;break};case 12:Da(40,aa|0,w|0,4,34);if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;ea=0;fa=0;ga=0;ha=0;f=13;break;case 13:ia=ba+(ha<<2)|0;ja=c[ia>>2]|0;na=c[ja+16>>2]|0;if((ja|0)==(c[na>>2]|0)){f=14;break}else{f=15;break};case 14:qa=c[na+4>>2]|0;f=16;break;case 15:qa=ja-24|0;f=16;break;case 16:ra=ja|0;sa=ja+8|0;ta=qa;ua=1;va=ea;xa=fa;ya=ga;za=qa;f=17;break;case 17:U=+h[ra>>3]- +h[ta>>3];if(U!=0.0){Aa=U;f=19;break}else{f=18;break};case 18:U=+h[sa>>3]- +h[ta+8>>3];if(U==0.0){Ba=ya;Ca=xa;Ea=va;f=181;break}else{Aa=U;f=19;break};case 19:if(Aa>0.0){f=172;break}else{f=20;break};case 20:if((va|0)>0){f=21;break}else{f=168;break};case 21:Fa=za|0;Ga=za+8|0;Ha=za+16|0;Ia=za+24|0;Ja=za+24|0;Ka=0;La=ya;f=22;break;case 22:Ma=c[La>>2]|0;Na=Ma|0;Oa=+h[Na>>3];Pa=Ma+8|0;Qa=+h[Pa>>3];Ra=Ma+16|0;Sa=c[Ra>>2]|0;Ta=(c[Sa+4>>2]|0)==(Ma|0);if(Ta){f=23;break}else{f=24;break};case 23:t=c[Sa>>2]|0;Ua=t;Va=t|0;f=25;break;case 24:Ua=Ma+24|0;Va=Ma+24|0;f=25;break;case 25:Wa=+h[Va>>3]-Oa;Xa=+h[Ua+8>>3]-Qa;Ya=+h[Fa>>3];Za=Ya-Oa;_a=+h[Ga>>3];$a=_a-Qa;ab=c[Ha>>2]|0;bb=(c[ab+4>>2]|0)==(za|0);if(bb){f=26;break}else{cb=Ia;db=Ja;f=27;break};case 26:t=c[ab>>2]|0;cb=t;db=t|0;f=27;break;case 27:eb=+h[db>>3]-Oa;fb=+h[cb+8>>3]-Qa;gb=Wa*$a-Xa*Za;if(gb==0.0){hb=0;f=29;break}else{f=28;break};case 28:hb=gb>0.0?1:-1;f=29;break;case 29:ib=Wa*fb-Xa*eb;if(ib==0.0){jb=0;f=31;break}else{f=30;break};case 30:jb=ib>0.0?1:-1;f=31;break;case 31:kb=da(jb,hb)|0;if((kb|0)>0){f=167;break}else{f=32;break};case 32:if((kb|0)<0){f=33;break}else{f=63;break};case 33:if(bb){f=34;break}else{lb=Ia;mb=Ja;f=35;break};case 34:t=c[ab>>2]|0;lb=t;mb=t|0;f=35;break;case 35:nb=+h[mb>>3]-Ya;ob=+h[lb+8>>3]-_a;pb=Oa-Ya;qb=Qa-_a;if(Ta){f=36;break}else{f=37;break};case 36:t=c[Sa>>2]|0;rb=t;sb=t|0;f=38;break;case 37:rb=Ma+24|0;sb=Ma+24|0;f=38;break;case 38:tb=+h[sb>>3]-Ya;ub=+h[rb+8>>3]-_a;vb=qb*nb-pb*ob;if(vb==0.0){wb=0;f=40;break}else{f=39;break};case 39:wb=vb>0.0?1:-1;f=40;break;case 40:xb=nb*ub-ob*tb;if(xb==0.0){yb=0;f=42;break}else{f=41;break};case 41:yb=xb>0.0?1:-1;f=42;break;case 42:zb=da(yb,wb)|0;if((zb|0)>0){f=167;break}else{f=43;break};case 43:if((zb|0)<0){Ab=3;f=62;break}else{f=44;break};case 44:Bb=(wb|0)>-1?wb:-wb|0;if(bb){f=45;break}else{Cb=Ia;f=46;break};case 45:Cb=c[ab>>2]|0;f=46;break;case 46:Db=+h[Cb>>3];Eb=+h[Cb+8>>3];if((Bb|0)==0){Fb=Ma;f=50;break}else{f=47;break};case 47:if(Ta){f=48;break}else{f=49;break};case 48:Fb=c[Sa>>2]|0;f=50;break;case 49:Fb=Ma+24|0;f=50;break;case 50:Gb=+h[Fb>>3];Hb=+h[Fb+8>>3];Ib=Ya==Gb;if(Ya==Db){f=51;break}else{f=57;break};case 51:if(Ib){f=52;break}else{Ab=0;f=62;break};case 52:if(_a==Hb|Hb==Eb){Jb=1;f=56;break}else{f=53;break};case 53:if(_a<Hb){f=54;break}else{f=55;break};case 54:Jb=Hb<Eb;f=56;break;case 55:Jb=Eb<Hb;f=56;break;case 56:Ab=Jb&1;f=62;break;case 57:if(Ib|Gb==Db){Ab=0;f=62;break}else{f=58;break};case 58:if(Ya<Gb){f=59;break}else{f=60;break};case 59:Kb=Gb<Db;f=61;break;case 60:Kb=Db<Gb;f=61;break;case 61:Ab=Kb?1:-1;f=62;break;case 62:t=oa(4,Ma|0,za|0,l|0,m|0,Ab|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;if((t|0)==0){f=167;break}else{f=148;break};case 63:if((hb|0)==(jb|0)){f=64;break}else{f=130;break};case 64:if(Ta){f=65;break}else{f=66;break};case 65:Lb=c[Sa>>2]|0;f=67;break;case 66:Lb=Ma+24|0;f=67;break;case 67:Mb=+h[Lb>>3];Nb=+h[Lb+8>>3];Ob=Oa==Ya;if(Oa==Mb){f=68;break}else{f=74;break};case 68:if(Ob){f=69;break}else{Pb=0;f=79;break};case 69:if(Qa==_a|_a==Nb){Qb=1;f=73;break}else{f=70;break};case 70:if(Qa<_a){f=71;break}else{f=72;break};case 71:Qb=_a<Nb;f=73;break;case 72:Qb=Nb<_a;f=73;break;case 73:Pb=Qb&1;f=79;break;case 74:if(Ob|Ya==Mb){Pb=0;f=79;break}else{f=75;break};case 75:if(Oa<Ya){f=76;break}else{f=77;break};case 76:Rb=Ya<Mb;f=78;break;case 77:Rb=Mb<Ya;f=78;break;case 78:Pb=Rb?1:-1;f=79;break;case 79:if(Ta){f=80;break}else{f=81;break};case 80:Sb=c[Sa>>2]|0;f=82;break;case 81:Sb=Ma+24|0;f=82;break;case 82:Tb=+h[Sb>>3];Ub=+h[Sb+8>>3];if(bb){f=83;break}else{Vb=Ia;f=84;break};case 83:Vb=c[ab>>2]|0;f=84;break;case 84:Wb=+h[Vb>>3];Xb=+h[Vb+8>>3];Yb=Oa==Wb;if(Oa==Tb){f=85;break}else{f=91;break};case 85:if(Yb){f=86;break}else{Zb=0;f=96;break};case 86:if(Qa==Xb|Xb==Ub){_b=1;f=90;break}else{f=87;break};case 87:if(Qa<Xb){f=88;break}else{f=89;break};case 88:_b=Xb<Ub;f=90;break;case 89:_b=Ub<Xb;f=90;break;case 90:Zb=_b&1;f=96;break;case 91:if(Yb|Wb==Tb){Zb=0;f=96;break}else{f=92;break};case 92:if(Oa<Wb){f=93;break}else{f=94;break};case 93:$b=Wb<Tb;f=95;break;case 94:$b=Tb<Wb;f=95;break;case 95:Zb=$b?1:-1;f=96;break;case 96:if((Pb|0)>(Zb|0)){f=97;break}else{f=112;break};case 97:if(Ta){f=98;break}else{f=99;break};case 98:ac=c[Sa>>2]|0;f=100;break;case 99:ac=Ma+24|0;f=100;break;case 100:bc=+h[ac>>3];cc=+h[ac+8>>3];if(Oa==bc){f=101;break}else{f=107;break};case 101:if(Ob){f=102;break}else{dc=0;f=129;break};case 102:if(Qa==_a|_a==cc){ec=1;f=106;break}else{f=103;break};case 103:if(Qa<_a){f=104;break}else{f=105;break};case 104:ec=_a<cc;f=106;break;case 105:ec=cc<_a;f=106;break;case 106:dc=ec&1;f=129;break;case 107:if(Ob|Ya==bc){dc=0;f=129;break}else{f=108;break};case 108:if(Oa<Ya){f=109;break}else{f=110;break};case 109:fc=Ya<bc;f=111;break;case 110:fc=bc<Ya;f=111;break;case 111:dc=fc?1:-1;f=129;break;case 112:if(Ta){f=113;break}else{f=114;break};case 113:gc=c[Sa>>2]|0;f=115;break;case 114:gc=Ma+24|0;f=115;break;case 115:hc=+h[gc>>3];ic=+h[gc+8>>3];if(bb){f=116;break}else{jc=Ia;f=117;break};case 116:jc=c[ab>>2]|0;f=117;break;case 117:kc=+h[jc>>3];lc=+h[jc+8>>3];mc=Oa==kc;if(Oa==hc){f=118;break}else{f=124;break};case 118:if(mc){f=119;break}else{dc=0;f=129;break};case 119:if(Qa==lc|lc==ic){nc=1;f=123;break}else{f=120;break};case 120:if(Qa<lc){f=121;break}else{f=122;break};case 121:nc=lc<ic;f=123;break;case 122:nc=ic<lc;f=123;break;case 123:dc=nc&1;f=129;break;case 124:if(mc|kc==hc){dc=0;f=129;break}else{f=125;break};case 125:if(Oa<kc){f=126;break}else{f=127;break};case 126:oc=kc<hc;f=128;break;case 127:oc=hc<kc;f=128;break;case 128:dc=oc?1:-1;f=129;break;case 129:pc=dc<<1;f=147;break;case 130:qc=(hb|0)>-1?hb:-hb|0;if(Ta){f=131;break}else{f=132;break};case 131:rc=c[Sa>>2]|0;f=133;break;case 132:rc=Ma+24|0;f=133;break;case 133:sc=+h[rc>>3];tc=+h[rc+8>>3];t=(qc|0)==0;if(t|bb^1){uc=t?za:Ia;f=135;break}else{f=134;break};case 134:uc=c[ab>>2]|0;f=135;break;case 135:vc=+h[uc>>3];wc=+h[uc+8>>3];xc=Oa==vc;if(Oa==sc){f=136;break}else{f=142;break};case 136:if(xc){f=137;break}else{pc=0;f=147;break};case 137:if(Qa==wc|wc==tc){yc=1;f=141;break}else{f=138;break};case 138:if(Qa<wc){f=139;break}else{f=140;break};case 139:yc=wc<tc;f=141;break;case 140:yc=tc<wc;f=141;break;case 141:pc=yc&1;f=147;break;case 142:if(xc|vc==sc){pc=0;f=147;break}else{f=143;break};case 143:if(Oa<vc){f=144;break}else{f=145;break};case 144:zc=vc<sc;f=146;break;case 145:zc=sc<vc;f=146;break;case 146:pc=zc?1:-1;f=147;break;case 147:t=oa(4,Ma|0,za|0,l|0,m|0,pc|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;if((t|0)==0){f=167;break}else{f=148;break};case 148:Ac=+h[l>>3];Bc=+h[m>>3];Cc=+h[Na>>3];Dc=+h[Pa>>3];Ec=c[Ra>>2]|0;if((c[Ec+4>>2]|0)==(Ma|0)){f=149;break}else{f=150;break};case 149:Fc=c[Ec>>2]|0;f=151;break;case 150:Fc=Ma+24|0;f=151;break;case 151:Gc=+h[Fc>>3];Hc=+h[Fc+8>>3];Ic=+h[Fa>>3];Jc=+h[Ga>>3];Kc=c[Ha>>2]|0;if((c[Kc+4>>2]|0)==(za|0)){f=152;break}else{Lc=Ia;f=153;break};case 152:Lc=c[Kc>>2]|0;f=153;break;case 153:Mc=+h[Lc>>3];Nc=+h[Lc+8>>3];if(Cc!=Gc&Ic!=Mc){f=160;break}else{f=154;break};case 154:if(Cc==Gc){f=155;break}else{f=157;break};case 155:if(Cc==Ac&Dc==Bc){f=157;break}else{f=156;break};case 156:if(Gc==Ac&Hc==Bc){f=157;break}else{f=160;break};case 157:if(Ic==Mc){f=158;break}else{f=167;break};case 158:if(Ic==Ac&Jc==Bc){f=167;break}else{f=159;break};case 159:if(Mc==Ac&Nc==Bc){f=167;break}else{f=160;break};case 160:if((d[213992]|0)>>>0>1>>>0){f=161;break}else{Oc=ya;Pc=va;Qc=1;f=187;break};case 161:Rc=c[o>>2]|0;pa(30,Rc|0,163936,(Sc=i,i=i+16|0,h[Sc>>3]=Ac,h[Sc+8>>3]=Bc,Sc)|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;i=Sc;Tc=+h[Na>>3];Uc=+h[Pa>>3];Vc=c[Ra>>2]|0;if((c[Vc+4>>2]|0)==(Ma|0)){f=162;break}else{f=163;break};case 162:t=c[Vc>>2]|0;Wc=t;Xc=t|0;f=164;break;case 163:Wc=Ma+24|0;Xc=Ma+24|0;f=164;break;case 164:U=+h[Xc>>3];V=+h[Wc+8>>3];pa(30,Rc|0,131784,(Sc=i,i=i+40|0,c[Sc>>2]=1,h[Sc+8>>3]=Tc,h[Sc+16>>3]=Uc,h[Sc+24>>3]=U,h[Sc+32>>3]=V,Sc)|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;i=Sc;Yc=+h[Fa>>3];Zc=+h[Ga>>3];_c=c[Ha>>2]|0;if((c[_c+4>>2]|0)==(za|0)){f=165;break}else{$c=Ia;ad=Ja;f=166;break};case 165:t=c[_c>>2]|0;$c=t;ad=t|0;f=166;break;case 166:V=+h[ad>>3];U=+h[$c+8>>3];pa(30,Rc|0,131784,(Sc=i,i=i+40|0,c[Sc>>2]=2,h[Sc+8>>3]=Yc,h[Sc+16>>3]=Zc,h[Sc+24>>3]=V,h[Sc+32>>3]=U,Sc)|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;i=Sc;Oc=ya;Pc=va;Qc=1;f=187;break;case 167:t=Ka+1|0;if((t|0)<(va|0)){Ka=t;La=c[La+4>>2]|0;f=22;break}else{f=168;break};case 168:bd=ma(54,12)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;cd=bd;if((va|0)==0){f=169;break}else{f=170;break};case 169:c[bd+8>>2]=0;dd=cd;f=171;break;case 170:c[xa+4>>2]=cd;c[bd+8>>2]=xa;dd=ya;f=171;break;case 171:c[bd>>2]=za;c[bd+4>>2]=0;c[za+20>>2]=cd;Ba=dd;Ca=cd;Ea=va+1|0;f=181;break;case 172:ed=za+20|0;fd=c[ed>>2]|0;if((fd|0)==0){f=173;break}else{f=174;break};case 173:pa(16,1,159880,(Sc=i,i=i+1|0,i=i+7&-8,c[Sc>>2]=0,Sc)|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;i=Sc;la(40,178232,1);if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;return 0;case 174:if((va|0)==1){gd=0;hd=0;f=180;break}else{f=175;break};case 175:if((fd|0)==(ya|0)){f=176;break}else{f=177;break};case 176:t=c[ya+4>>2]|0;c[t+8>>2]=0;gd=t;hd=xa;f=180;break;case 177:if((fd|0)==(xa|0)){f=178;break}else{f=179;break};case 178:t=c[xa+8>>2]|0;c[t+4>>2]=0;gd=ya;hd=t;f=180;break;case 179:t=fd+4|0;Z=fd+8|0;c[(c[Z>>2]|0)+4>>2]=c[t>>2];c[(c[t>>2]|0)+8>>2]=c[Z>>2];gd=ya;hd=xa;f=180;break;case 180:ka(150,fd|0);if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;c[ed>>2]=0;Ba=gd;Ca=hd;Ea=va-1|0;f=181;break;case 181:id=c[ia>>2]|0;jd=c[id+16>>2]|0;if((id|0)==(c[jd+4>>2]|0)){f=182;break}else{f=183;break};case 182:kd=c[jd>>2]|0;f=184;break;case 183:kd=id+24|0;f=184;break;case 184:if((ua|0)<2){f=185;break}else{f=186;break};case 185:ta=kd;ua=ua+1|0;va=Ea;xa=Ca;ya=Ba;za=id;f=17;break;case 186:Z=ha+1|0;if((Z|0)<(w|0)){ea=Ea;fa=Ca;ga=Ba;ha=Z;f=13;break}else{Oc=Ba;Pc=Ea;Qc=0;f=187;break};case 187:if((Pc|0)>0){ld=0;md=Oc;f=188;break}else{f=190;break};case 188:Z=c[md+4>>2]|0;ka(150,md|0);if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;t=ld+1|0;if((t|0)<(Pc|0)){ld=t;md=Z;f=188;break}else{f=190;break};case 189:Da(40,aa|0,w|0,4,34);if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;ka(150,aa|0);if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;f=191;break;case 190:ka(150,aa|0);if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;if((Qc|0)==0){f=191;break}else{nd=Qc;f=207;break};case 191:od=k;if(q){pd=0;f=192;break}else{nd=0;f=207;break};case 192:qd=c[a+(pd<<2)>>2]|0;Z=c[qd>>2]|0;c[od>>2]=c[Z>>2];c[od+4>>2]=c[Z+4>>2];c[od+8>>2]=c[Z+8>>2];c[od+12>>2]=c[Z+12>>2];rd=pd+1|0;if((rd|0)<(b|0)){f=193;break}else{nd=0;f=207;break};case 193:sd=p+(pd*40|0)+8|0;td=p+(pd*40|0)+24|0;ud=p+(pd*40|0)+32|0;vd=p+(pd*40|0)+16|0;wd=rd;f=194;break;case 194:xd=c[a+(wd<<2)>>2]|0;yd=+h[sd>>3];zd=+h[p+(wd*40|0)+24>>3];Ad=yd>zd;Bd=+h[p+(wd*40|0)+8>>3];if(Ad|yd<Bd){f=200;break}else{f=195;break};case 195:Cd=+h[vd>>3];Dd=+h[p+(wd*40|0)+32>>3];if(Cd>Dd){f=200;break}else{f=196;break};case 196:Ed=+h[p+(wd*40|0)+16>>3];if(Cd<Ed){f=200;break}else{f=197;break};case 197:U=+h[td>>3];if(U>zd|U<Bd){f=200;break}else{f=198;break};case 198:U=+h[ud>>3];if(U>Dd|U<Ed){f=200;break}else{f=199;break};case 199:Z=wa(200,xd|0,k|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;if((Z|0)==0){f=206;break}else{nd=1;f=207;break};case 200:Fd=+h[td>>3];if(Bd>Fd|Bd<yd){f=206;break}else{f=201;break};case 201:Gd=+h[p+(wd*40|0)+16>>3];Hd=+h[ud>>3];if(Gd>Hd){f=206;break}else{f=202;break};case 202:Id=+h[vd>>3];if(Gd<Id){f=206;break}else{f=203;break};case 203:if(zd>Fd|Ad){f=206;break}else{f=204;break};case 204:U=+h[p+(wd*40|0)+32>>3];if(U>Hd|U<Id){f=206;break}else{f=205;break};case 205:Z=wa(200,qd|0,c[xd>>2]|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;if((Z|0)==0){f=206;break}else{nd=1;f=207;break};case 206:Z=wd+1|0;if((Z|0)<(b|0)){wd=Z;f=194;break}else{pd=rd;f=192;break};case 207:ka(150,n|0);if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;ka(150,x|0);if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,j)|0;if((g|0)>0){f=-1;break}else return 0}u=v=0;$=(nd|0)==0|0;f=208;break;case 208:i=e;return $|0;case-1:if((g|0)==8){_=v;f=209}u=v=0;break}return 0}function Is(a,b){a=a|0;b=b|0;var d=0,e=0.0,f=0;d=c[a>>2]|0;a=c[b>>2]|0;e=+h[d>>3]- +h[a>>3];if(e!=0.0){f=e>0.0?1:-1;return f|0}e=+h[d+8>>3]- +h[a+8>>3];if(e==0.0){f=0;return f|0}f=e>0.0?1:-1;return f|0}function Js(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,i=0.0,j=0.0,k=0,l=0,m=0,n=0.0,o=0.0,p=0.0,q=0.0,r=0,s=0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0,H=0.0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0;if((f|0)<1){g=0;return g|0}i=+h[a>>3];j=+h[a+8>>3];k=c[a+16>>2]|0;l=(c[k+4>>2]|0)==(a|0);if(l){m=c[k>>2]|0}else{m=a+24|0}n=+h[m>>3];o=+h[m+8>>3];p=+h[b>>3];q=+h[b+8>>3];m=c[b+16>>2]|0;r=(c[m+4>>2]|0)==(b|0);if(r){s=c[m>>2]|0}else{s=b+24|0}t=+h[s>>3];u=+h[s+8>>3];if((f|0)==3){if(i==n){h[d>>3]=i;h[e>>3]=u+(i-t)*((q-u)/(p-t));g=1;return g|0}if(p==t){h[d>>3]=p;h[e>>3]=o+(p-n)*((j-o)/(i-n));g=1;return g|0}else{v=(q-u)/(p-t);w=(j-o)/(i-n);x=q-p*v;y=j-i*w;z=v-w;h[d>>3]=(y-x)/z;h[e>>3]=(v*y-w*x)/z;g=1;return g|0}}else if((f|0)==1){if((i-n)*(q-j)==(j-o)*(p-i)){h[d>>3]=p;h[e>>3]=q;g=1;return g|0}else{h[d>>3]=t;h[e>>3]=u;g=1;return g|0}}else if((f|0)==2){if(l){A=c[k>>2]|0}else{A=a+24|0}z=+h[A>>3];A=i==p;do{if(i==z){B=42}else{if(A|p==z){B=42;break}if(i<p){if(p<z){B=42;break}}else{if(z<p){B=42;break}}if(r){C=c[m>>2]|0}else{C=b+24|0}x=+h[C>>3];if(l){D=c[k>>2]|0}else{D=a+24|0}w=+h[D>>3];if(p==x){E=q;F=p;G=u;H=t;break}if(p==w|w==x){E=q;F=p;G=u;H=t;break}if(p<w){if(w<x){E=q;F=p;G=u;H=t;break}}else{if(x<w){E=q;F=p;G=u;H=t;break}}if(r){I=c[m>>2]|0}else{I=b+24|0}w=+h[I>>3];if(p==w|i==w){J=0}else{if(p<i){K=i<w}else{K=w<i}J=K^1}E=q;F=p;G=J?o:j;H=J?n:i}}while(0);a:do{if((B|0)==42){if(l){L=c[k>>2]|0}else{L=a+24|0}z=+h[L>>3];if(r){M=c[m>>2]|0}else{M=b+24|0}w=+h[M>>3];do{if(i!=z){if(i==w|w==z){break}if(i<w){if(w<z){break}}else{if(z<w){break}}if(l){N=c[k>>2]|0}else{N=a+24|0}x=+h[N>>3];if(i==x){E=u;F=t;G=q;H=p;break a}if(A|p==x){E=u;F=t;G=q;H=p;break a}if(i<p){if(p<x){E=u;F=t;G=q;H=p;break a}}else{if(x<p){E=u;F=t;G=q;H=p;break a}}if(r){O=c[m>>2]|0}else{O=b+24|0}x=+h[O>>3];if(p==x|i==x){P=0}else{if(p<i){Q=i<x}else{Q=x<i}P=Q^1}E=u;F=t;G=P?o:j;H=P?n:i;break a}}while(0);if(r){R=c[m>>2]|0}else{R=b+24|0}w=+h[R>>3];if(p==w){g=0;return g|0}if(A|i==w){g=0;return g|0}if(p<i){if(i<w){g=0}else{E=j;F=i;G=o;H=n;break}return g|0}else{if(w<i){g=0}else{E=j;F=i;G=o;H=n;break}return g|0}}}while(0);h[d>>3]=(H+F)*.5;h[e>>3]=(G+E)*.5;g=1;return g|0}else{g=1;return g|0}return 0}function Ks(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,i=0.0,j=0.0,k=0.0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0.0,t=0,u=0,v=0,w=0,x=0;d=c[44390]|0;if((d|0)!=0){qu(d)}c[44390]=pu(b,b,0.0)|0;d=c[43812]|0;if((d|0)!=0){eF(d)}c[43812]=jk(b<<2)|0;d=c[43772]|0;if((d|0)!=0){eF(d)}c[43772]=jk(b<<3)|0;a:do{if((b|0)>0){d=0;while(1){e=a+(d<<2)|0;f=c[44390]|0;g=0;i=0.0;do{j=+h[(c[e>>2]|0)+(g<<3)>>3];h[(c[f+(d<<2)>>2]|0)+(g<<3)>>3]=j;k=+S(+j);i=i<k?k:i;g=g+1|0;}while((g|0)<(b|0));if(i==0.0){break}h[(c[43772]|0)+(d<<3)>>3]=1.0/i;c[(c[43812]|0)+(d<<2)>>2]=d;g=d+1|0;if((g|0)<(b|0)){d=g}else{break a}}h[(c[43772]|0)+(d<<3)>>3]=0.0;l=0;return l|0}}while(0);a=b-1|0;b:do{if((a|0)>0){g=0;f=0;while(1){if((g|0)>=(b|0)){l=0;m=27;break}e=c[43812]|0;n=c[44390]|0;o=c[43772]|0;p=f;q=g;k=0.0;do{r=c[e+(q<<2)>>2]|0;j=+S(+(+h[(c[n+(r<<2)>>2]|0)+(g<<3)>>3]));s=j*+h[o+(r<<3)>>3];r=k<s;p=r?q:p;k=r?s:k;q=q+1|0;}while((q|0)<(b|0));if(k==0.0){l=0;m=27;break}if((p|0)!=(g|0)){q=c[43812]|0;o=q+(g<<2)|0;n=c[o>>2]|0;c[o>>2]=c[q+(p<<2)>>2];c[(c[43812]|0)+(p<<2)>>2]=n}n=c[43812]|0;q=n+(g<<2)|0;o=c[44390]|0;i=+h[(c[o+(c[q>>2]<<2)>>2]|0)+(g<<3)>>3];e=g+1|0;if((e|0)<(b|0)){r=e;do{t=n+(r<<2)|0;u=(c[o+(c[t>>2]<<2)>>2]|0)+(g<<3)|0;s=+h[u>>3]/i;h[u>>3]=s;if(s!=0.0){u=e;do{v=(c[o+(c[t>>2]<<2)>>2]|0)+(u<<3)|0;h[v>>3]=+h[v>>3]-s*+h[(c[o+(c[q>>2]<<2)>>2]|0)+(u<<3)>>3];u=u+1|0;}while((u|0)<(b|0))}r=r+1|0;}while((r|0)<(b|0))}if((e|0)<(a|0)){g=e;f=p}else{w=n;x=o;break b}}if((m|0)==27){return l|0}}else{w=c[43812]|0;x=c[44390]|0}}while(0);l=+h[(c[x+(c[w+(a<<2)>>2]<<2)>>2]|0)+(a<<3)>>3]!=0.0|0;return l|0}function Ls(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0,l=0.0,m=0.0,n=0,o=0.0,p=0,q=0.0;e=(d|0)>0;if(!e){return}f=c[43812]|0;g=0;do{i=c[f+(g<<2)>>2]|0;if((g|0)>0){j=c[(c[44390]|0)+(i<<2)>>2]|0;k=0;l=0.0;while(1){m=l+ +h[j+(k<<3)>>3]*+h[a+(k<<3)>>3];n=k+1|0;if((n|0)<(g|0)){k=n;l=m}else{o=m;break}}}else{o=0.0}h[a+(g<<3)>>3]=+h[b+(i<<3)>>3]-o;g=g+1|0;}while((g|0)<(d|0));if(e){p=d}else{return}while(1){e=p-1|0;g=c[(c[44390]|0)+(c[(c[43812]|0)+(e<<2)>>2]<<2)>>2]|0;if((p|0)<(d|0)){b=p;o=0.0;while(1){l=o+ +h[g+(b<<3)>>3]*+h[a+(b<<3)>>3];f=b+1|0;if((f|0)<(d|0)){b=f;o=l}else{q=l;break}}}else{q=0.0}b=a+(e<<3)|0;h[b>>3]=(+h[b>>3]-q)/+h[g+(e<<3)>>3];if((e|0)>0){p=e}else{break}}return}function Ms(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0,l=0.0;if((Ks(a,d)|0)==0){e=0;return e|0}a=jk(d<<3)|0;f=a;g=(d|0)>0;if(!g){eF(a);e=1;return e|0}i=d<<3;j=0;do{vF(a|0,0,i|0)|0;h[f+(j<<3)>>3]=1.0;Ls(c[b+(j<<2)>>2]|0,f,d);j=j+1|0;}while((j|0)<(d|0));eF(a);if(g){k=0}else{e=1;return e|0}while(1){if((k|0)>0){g=b+(k<<2)|0;a=0;do{j=(c[g>>2]|0)+(a<<3)|0;l=+h[j>>3];f=b+(a<<2)|0;h[j>>3]=+h[(c[f>>2]|0)+(k<<3)>>3];h[(c[f>>2]|0)+(k<<3)>>3]=l;a=a+1|0;}while((a|0)<(k|0))}a=k+1|0;if((a|0)<(d|0)){k=a}else{e=1;break}}return e|0}function Ns(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0.0,z=0.0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0,H=0.0,I=0,J=0,K=0,L=0,M=0,N=0.0,O=0,P=0,Q=0,R=0.0,U=0.0,V=0,W=0,X=0.0,Y=0,Z=0,_=0,$=0.0,aa=0,ba=0.0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0.0,ja=0.0,ka=0,la=0,ma=0;i=b<<3;j=kk(i)|0;k=j;l=kk(i)|0;i=l;m=b*30|0;n=(d|0)<(b|0)?d:b;a:do{if((n|0)>0){d=(g|0)==0;o=(b|0)>0;p=(b|0)==0;q=0;while(1){r=c[e+(q<<2)>>2]|0;s=(q|0)>0;do{if(!(d|o^1)){t=0;do{h[r+(t<<3)>>3]=+((yb()|0)%100|0|0);t=t+1|0;}while((t|0)<(b|0))}if(s){t=0;do{if(!p){u=c[e+(t<<2)>>2]|0;v=u;w=r;x=b;y=0.0;while(1){z=y+ +h[v>>3]*+h[w>>3];A=x-1|0;if((A|0)==0){B=r;C=u;D=b;break}else{v=v+8|0;w=w+8|0;x=A;y=z}}while(1){h[B>>3]=+h[B>>3]-z*+h[C>>3];x=D-1|0;if((x|0)==0){break}else{B=B+8|0;C=C+8|0;D=x}}}t=t+1|0;}while((t|0)<(q|0))}if(p){E=0.0}else{t=r;x=b;y=0.0;while(1){F=+h[t>>3];G=y+F*F;w=x-1|0;if((w|0)==0){E=G;break}else{t=t+8|0;x=w;y=G}}}H=+T(E);}while(H<1.0e-10);y=1.0/H;if(p){I=0}else{x=r;t=b;while(1){h[x>>3]=y*+h[x>>3];w=t-1|0;if((w|0)==0){I=0;break}else{x=x+8|0;t=w}}}while(1){J=I+1|0;if(!p){t=i;x=r;w=b;while(1){h[t>>3]=+h[x>>3];v=w-1|0;if((v|0)==0){break}else{t=t+8|0;x=x+8|0;w=v}}if(o){w=0;while(1){x=c[a+(w<<2)>>2]|0;t=0;y=0.0;do{y=y+ +h[x+(t<<3)>>3]*+h[r+(t<<3)>>3];t=t+1|0;}while((t|0)<(b|0));h[k+(w<<3)>>3]=y;t=w+1|0;if((t|0)<(b|0)){w=t}else{K=r;L=k;M=b;break}}}else{K=r;L=k;M=b}while(1){h[K>>3]=+h[L>>3];w=M-1|0;if((w|0)==0){break}else{K=K+8|0;L=L+8|0;M=w}}}if(s){w=0;do{if(!p){t=c[e+(w<<2)>>2]|0;x=t;v=r;u=b;G=0.0;while(1){N=G+ +h[x>>3]*+h[v>>3];A=u-1|0;if((A|0)==0){O=r;P=t;Q=b;break}else{x=x+8|0;v=v+8|0;u=A;G=N}}while(1){h[O>>3]=+h[O>>3]-N*+h[P>>3];u=Q-1|0;if((u|0)==0){break}else{O=O+8|0;P=P+8|0;Q=u}}}w=w+1|0;}while((w|0)<(q|0))}if(p){R=0.0}else{w=r;u=b;G=0.0;while(1){y=+h[w>>3];F=G+y*y;v=u-1|0;if((v|0)==0){R=F;break}else{w=w+8|0;u=v;G=F}}}U=+T(R);if(!(U>=1.0e-10&(I|0)<(m|0))){V=J;W=q;break a}G=1.0/U;if(p){X=0.0}else{u=r;w=b;while(1){h[u>>3]=G*+h[u>>3];v=w-1|0;if((v|0)==0){Y=r;Z=i;_=b;$=0.0;break}else{u=u+8|0;w=v}}while(1){G=$+ +h[Y>>3]*+h[Z>>3];w=_-1|0;if((w|0)==0){X=G;break}else{Y=Y+8|0;Z=Z+8|0;_=w;$=G}}}if(+S(+X)<.999){I=J}else{break}}h[f+(q<<3)>>3]=U*X;r=q+1|0;if((r|0)<(n|0)){q=r}else{V=J;W=r;break}}}else{V=0;W=0}}while(0);if((W|0)<(n|0)){J=(b|0)>0;I=(b|0)==0;_=W;do{W=c[e+(_<<2)>>2]|0;if(J){Z=0;do{h[W+(Z<<3)>>3]=+((yb()|0)%100|0|0);Z=Z+1|0;}while((Z|0)<(b|0))}do{if((_|0)>0){if(I){break}else{aa=0}while(1){Z=c[e+(aa<<2)>>2]|0;Y=Z;i=W;Q=b;X=0.0;while(1){ba=X+ +h[Y>>3]*+h[i>>3];P=Q-1|0;if((P|0)==0){ca=W;da=Z;ea=b;break}else{Y=Y+8|0;i=i+8|0;Q=P;X=ba}}while(1){h[ca>>3]=+h[ca>>3]-ba*+h[da>>3];Q=ea-1|0;if((Q|0)==0){break}else{ca=ca+8|0;da=da+8|0;ea=Q}}Q=aa+1|0;if((Q|0)<(_|0)){aa=Q}else{fa=55;break}}}else{fa=55}}while(0);do{if((fa|0)==55){fa=0;if(I){break}else{ga=W;ha=b;ia=0.0}while(1){X=+h[ga>>3];ja=ia+X*X;Q=ha-1|0;if((Q|0)==0){break}else{ga=ga+8|0;ha=Q;ia=ja}}X=1.0/+T(ja);Q=W;i=b;while(1){h[Q>>3]=X*+h[Q>>3];Y=i-1|0;if((Y|0)==0){break}else{Q=Q+8|0;i=Y}}}}while(0);h[f+(_<<3)>>3]=0.0;_=_+1|0;}while((_|0)<(n|0))}_=n-1|0;if((_|0)<=0){eF(j);eF(l);ka=(V|0)<=(m|0);la=ka&1;return la|0}if((b|0)==0){ha=0;while(1){ga=f+(ha<<3)|0;ja=+h[ga>>3];I=ha+1|0;do{if((I|0)<(n|0)){fa=I;aa=ha;ia=ja;do{ba=+h[f+(fa<<3)>>3];ea=ia<ba;aa=ea?fa:aa;ia=ea?ba:ia;fa=fa+1|0;}while((fa|0)<(n|0));if((aa|0)==(ha|0)){break}h[f+(aa<<3)>>3]=ja;h[ga>>3]=ia}}while(0);if((I|0)<(_|0)){ha=I}else{break}}eF(j);eF(l);ka=(V|0)<=(m|0);la=ka&1;return la|0}else{ma=0}while(1){ha=f+(ma<<3)|0;ga=ma+1|0;do{if((ga|0)<(n|0)){fa=ga;ea=ma;ja=+h[ha>>3];do{ba=+h[f+(fa<<3)>>3];da=ja<ba;ea=da?fa:ea;ja=da?ba:ja;fa=fa+1|0;}while((fa|0)<(n|0));if((ea|0)==(ma|0)){break}fa=e+(ma<<2)|0;aa=k;da=c[fa>>2]|0;ca=b;while(1){h[aa>>3]=+h[da>>3];J=ca-1|0;if((J|0)==0){break}else{aa=aa+8|0;da=da+8|0;ca=J}}ca=e+(ea<<2)|0;da=c[fa>>2]|0;aa=c[ca>>2]|0;J=b;while(1){h[da>>3]=+h[aa>>3];W=J-1|0;if((W|0)==0){break}else{da=da+8|0;aa=aa+8|0;J=W}}J=c[ca>>2]|0;aa=k;da=b;while(1){h[J>>3]=+h[aa>>3];fa=da-1|0;if((fa|0)==0){break}else{J=J+8|0;aa=aa+8|0;da=fa}}h[f+(ea<<3)>>3]=+h[ha>>3];h[ha>>3]=ja}}while(0);if((ga|0)<(_|0)){ma=ga}else{break}}eF(j);eF(l);ka=(V|0)<=(m|0);la=ka&1;return la|0}function Os(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,i=0,j=0,k=0.0;if((b|0)<=0){return}if((d|0)>0){g=0}else{vF(f|0,0,b<<3|0)|0;return}do{i=c[a+(g<<2)>>2]|0;j=0;k=0.0;do{k=k+ +h[i+(j<<3)>>3]*+h[e+(j<<3)>>3];j=j+1|0;}while((j|0)<(d|0));h[f+(g<<3)>>3]=k;g=g+1|0;}while((g|0)<(b|0));return}function Ps(a,b,d,e,f,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0,s=0.0;j=c[i>>2]|0;if((j|0)==0){k=d<<2;l=dF(da(k,f)|0)|0;m=l;n=dF(k)|0}else{k=d<<2;l=gF(c[j>>2]|0,da(k,f)|0)|0;m=l;n=gF(j,k)|0}k=n;c[i>>2]=k;i=(d|0)>0;if(!i){return}n=0;j=m;while(1){c[k+(n<<2)>>2]=j;m=n+1|0;if((m|0)<(d|0)){n=m;j=j+(f<<2)|0}else{break}}if(!i){return}i=(f|0)>0;j=(e|0)>0;n=0;do{if(i){m=k+(n<<2)|0;l=a+(n<<2)|0;o=0;do{if(j){p=c[l>>2]|0;q=0.0;r=0;do{q=q+ +h[p+(r<<3)>>3]*+g[(c[b+(r<<2)>>2]|0)+(o<<2)>>2];r=r+1|0;}while((r|0)<(e|0));s=q}else{s=0.0}g[(c[m>>2]|0)+(o<<2)>>2]=s;o=o+1|0;}while((o|0)<(f|0))}n=n+1|0;}while((n|0)<(d|0));return}function Qs(a,b,d,e,f,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0.0,s=0.0,t=0,u=0.0;j=c[i>>2]|0;if((j|0)==0){k=dF(da(d<<3,f)|0)|0;l=k;m=dF(d<<2)|0}else{k=gF(c[j>>2]|0,da(d<<3,f)|0)|0;l=k;m=gF(j,d<<2)|0}j=m;c[i>>2]=j;i=(d|0)>0;if(!i){return}m=l;l=0;while(1){c[j+(l<<2)>>2]=m;k=l+1|0;if((k|0)<(d|0)){m=m+(f<<3)|0;l=k}else{break}}if(!i){return}i=(f|0)>0;l=(e|0)>0;m=0;do{if(i){k=j+(m<<2)|0;n=a+(m<<2)|0;o=0;do{if(l){p=c[n>>2]|0;q=0;r=0.0;while(1){s=r+ +h[p+(q<<3)>>3]*+g[(c[b+(q<<2)>>2]|0)+(o<<2)>>2];t=q+1|0;if((t|0)<(e|0)){q=t;r=s}else{u=s;break}}}else{u=0.0}h[(c[k>>2]|0)+(o<<3)>>3]=u;o=o+1|0;}while((o|0)<(f|0))}m=m+1|0;}while((m|0)<(d|0));return}function Rs(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0.0,t=0.0;i=c[f>>2]|0;if((i|0)==0){j=dF(da(d<<4,e)|0)|0;k=j;l=dF(d<<2)|0}else{j=gF(c[i>>2]|0,da(d<<4,e)|0)|0;k=j;l=gF(i,d<<2)|0}i=l;c[f>>2]=i;f=(d|0)>0;if(!f){return}l=0;j=k;while(1){c[i+(l<<2)>>2]=j;k=l+1|0;if((k|0)<(d|0)){l=k;j=j+(e<<2)|0}else{break}}if(!f){return}f=(e|0)>0;j=0;do{l=c[a+(j<<4)+4>>2]|0;k=c[a+(j<<4)+8>>2]|0;m=c[a+(j<<4)>>2]|0;if(f){n=(m|0)>0;o=i+(j<<2)|0;p=0;do{if(n){q=c[b+(p<<2)>>2]|0;r=0;s=0.0;do{s=s+ +g[k+(r<<2)>>2]*+h[q+(c[l+(r<<2)>>2]<<3)>>3];r=r+1|0;}while((r|0)<(m|0));t=s}else{t=0.0}g[(c[o>>2]|0)+(p<<2)>>2]=t;p=p+1|0;}while((p|0)<(e|0))}j=j+1|0;}while((j|0)<(d|0));return}function Ss(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0.0,g=0.0,i=0,j=0,k=0;c=(a|0)==0;if(c){return}else{d=a;e=b;f=0.0}while(1){g=f+ +h[e>>3];i=d-1|0;if((i|0)==0){break}else{d=i;e=e+8|0;f=g}}f=g/+(a|0);if(c){return}else{j=a;k=b}while(1){h[k>>3]=+h[k>>3]-f;b=j-1|0;if((b|0)==0){break}else{j=b;k=k+8|0}}return}function Ts(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,i=0,j=0,k=0.0;if((b|0)>0){f=0}else{return}do{i=c[a+(f<<2)>>2]|0;j=0;k=0.0;do{k=k+ +g[i+(j<<2)>>2]*+h[d+(j<<3)>>3];j=j+1|0;}while((j|0)<(b|0));h[e+(f<<3)>>3]=k;f=f+1|0;}while((f|0)<(b|0));return}function Us(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;if((a|0)>0){e=0}else{return}do{h[d+(e<<3)>>3]=+h[b+(e<<3)>>3]- +h[c+(e<<3)>>3];e=e+1|0;}while((e|0)<(a|0));return}function Vs(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;if((a|0)>0){e=0}else{return}do{h[d+(e<<3)>>3]=+h[b+(e<<3)>>3]+ +h[c+(e<<3)>>3];e=e+1|0;}while((e|0)<(a|0));return}function Ws(a,b,c,d){a=a|0;b=b|0;c=+c;d=d|0;var e=0;if((a|0)>0){e=0}else{return}do{h[d+(e<<3)>>3]=+h[b+(e<<3)>>3]*c;e=e+1|0;}while((e|0)<(a|0));return}function Xs(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;if((a|0)>0){d=0}else{return}do{h[c+(d<<3)>>3]=+h[b+(d<<3)>>3];d=d+1|0;}while((d|0)<(a|0));return}function Ys(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0.0,f=0.0,g=0.0,i=0;if((a|0)>0){d=0;e=0.0}else{f=0.0;return+f}while(1){g=e+ +h[b+(d<<3)>>3]*+h[c+(d<<3)>>3];i=d+1|0;if((i|0)<(a|0)){d=i;e=g}else{f=g;break}}return+f}function Zs(a,b){a=a|0;b=b|0;var c=0.0,d=0,e=0.0,f=0.0,g=0.0,i=0;if((a|0)>0){c=-1.0e+50;d=0}else{e=-1.0e+50;return+e}while(1){f=+S(+(+h[b+(d<<3)>>3]));g=f>c?f:c;i=d+1|0;if((i|0)<(a|0)){c=g;d=i}else{e=g;break}}return+e}function _s(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,i=0,j=0,k=0.0,l=0.0,m=0,n=0.0;if((b|0)<=0){return}g=(d|0)>0;i=0;do{if(g){j=0;k=0.0;while(1){l=k+ +h[(c[a+(j<<2)>>2]|0)+(i<<3)>>3]*+h[e+(j<<3)>>3];m=j+1|0;if((m|0)<(d|0)){j=m;k=l}else{n=l;break}}}else{n=0.0}h[f+(i<<3)>>3]=n;i=i+1|0;}while((i|0)<(b|0));return}function $s(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0.0,h=0.0,i=0,j=0,k=0;c=(a|0)==0;if(c){return}else{d=a;e=b;f=0.0}while(1){h=f+ +g[e>>2];i=d-1|0;if((i|0)==0){break}else{d=i;e=e+4|0;f=h}}f=h/+(a|0);if(c){return}else{j=a;k=b}while(1){g[k>>2]=+g[k>>2]-f;b=j-1|0;if((b|0)==0){break}else{j=b;k=k+4|0}}return}function at(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,h=0,i=0.0,j=0.0,k=0,l=0,m=0,n=0.0,o=0,p=0.0,q=0,r=0;if((b|0)<=0){return}vF(d|0,0,b<<2|0)|0;e=0;f=0;h=b;while(1){i=+g[c+(f<<2)>>2];j=i*+g[a+(e<<2)>>2]+0.0;k=f+1|0;l=(k|0)<(b|0);if(l){m=k;n=j;o=e}else{break}do{o=o+1|0;p=+g[a+(o<<2)>>2];n=n+p*+g[c+(m<<2)>>2];q=d+(m<<2)|0;g[q>>2]=i*p+ +g[q>>2];m=m+1|0;}while((m|0)<(b|0));q=d+(f<<2)|0;g[q>>2]=n+ +g[q>>2];if(l){e=e+h|0;f=k;h=h-1|0}else{r=7;break}}if((r|0)==7){return}r=d+(f<<2)|0;g[r>>2]=j+ +g[r>>2];return}function bt(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;if((a|0)>0){e=0}else{return}do{g[d+(e<<2)>>2]=+g[b+(e<<2)>>2]- +g[c+(e<<2)>>2];e=e+1|0;}while((e|0)<(a|0));return}function ct(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;if((a|0)>0){e=0}else{return}do{g[d+(e<<2)>>2]=+g[b+(e<<2)>>2]+ +g[c+(e<<2)>>2];e=e+1|0;}while((e|0)<(a|0));return}function dt(a,b,c,d){a=a|0;b=b|0;c=+c;d=d|0;var e=0,f=0;if((a|0)>0){e=0}else{return}do{f=b+(e<<2)|0;g[f>>2]=+g[f>>2]+ +g[d+(e<<2)>>2]*c;e=e+1|0;}while((e|0)<(a|0));return}function et(a,b,c,d){a=a|0;b=b|0;c=+c;d=d|0;var e=0;if((a|0)>0){e=0}else{return}do{g[d+(e<<2)>>2]=+g[b+(e<<2)>>2]*c;e=e+1|0;}while((e|0)<(a|0));return}function ft(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;if((a|0)>0){d=0}else{return}do{g[c+(d<<2)>>2]=+g[b+(d<<2)>>2];d=d+1|0;}while((d|0)<(a|0));return}function gt(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0.0,f=0.0,h=0.0,i=0;if((a|0)>0){d=0;e=0.0}else{f=0.0;return+f}while(1){h=e+ +g[b+(d<<2)>>2]*+g[c+(d<<2)>>2];i=d+1|0;if((i|0)<(a|0)){d=i;e=h}else{f=h;break}}return+f}function ht(a,b,c){a=a|0;b=+b;c=c|0;var d=0;if((a|0)>0){d=0}else{return}do{g[c+(d<<2)>>2]=b;d=d+1|0;}while((d|0)<(a|0));return}function it(a,b){a=a|0;b=b|0;var c=0,d=0.0,e=0.0,f=0.0;if((a|0)>0){c=0;d=-1.0000000150474662e+30}else{e=-1.0000000150474662e+30;return+e}do{f=+S(+(+g[b+(c<<2)>>2]));d=f>d?f:d;c=c+1|0;}while((c|0)<(a|0));e=d;return+e}function jt(a,b){a=a|0;b=b|0;var c=0,d=0,e=0.0;if((a|0)>0){c=0}else{return}do{d=b+(c<<2)|0;e=+g[d>>2];g[d>>2]=e*e;c=c+1|0;}while((c|0)<(a|0));return}function kt(a,b){a=a|0;b=b|0;var c=0,d=0,e=0.0;if((a|0)>0){c=0}else{return}do{d=b+(c<<2)|0;e=+g[d>>2];if(e!=0.0){g[d>>2]=1.0/e}c=c+1|0;}while((c|0)<(a|0));return}function lt(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0.0;if((a|0)>0){d=0}else{return}do{e=+g[b+(d<<2)>>2];if(e>=0.0){g[c+(d<<2)>>2]=+T(e)}d=d+1|0;}while((d|0)<(a|0));return}function mt(a,b){a=a|0;b=b|0;var c=0,d=0,e=0.0;if((a|0)>0){c=0}else{return}do{d=b+(c<<2)|0;e=+g[d>>2];if(e>0.0){g[d>>2]=1.0/+T(e)}c=c+1|0;}while((c|0)<(a|0));return}function nt(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;c[a>>2]=0;do{if((b&3|0)==0){d=b}else{if((4%(b>>>0)|0|0)==0){d=4;break}a:do{if((b|0)==4){e=4}else{f=b;g=4;while(1){h=g;while(1){i=h-f|0;if((f|0)>=(h|0)){break}if((i|0)==(f|0)){e=f;break a}else{h=i}}i=f-h|0;if((h|0)==(i|0)){e=h;break}else{f=i;g=h}}}}while(0);d=da(4/(e>>>0)|0,b)|0}}while(0);c[a+8>>2]=d;d=a+4|0;a=c[d>>2]|0;if((a|0)==0){c[d>>2]=0;return}else{j=a}while(1){a=c[j>>2]|0;eF(c[j+4>>2]|0);eF(j);if((a|0)==0){break}else{j=a}}c[d>>2]=0;return}function ot(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;b=a|0;d=c[b>>2]|0;if((d|0)!=0){e=d;f=e|0;g=c[f>>2]|0;c[b>>2]=g;h=e;return h|0}d=c[a+8>>2]|0;i=kk(8)|0;j=i;k=kk(da(c[43746]|0,d)|0)|0;c[i+4>>2]=k;if((c[43746]|0)>0){l=0;m=c[b>>2]|0;while(1){n=k+(da(l,d)|0)|0;o=n;c[n>>2]=m;c[b>>2]=o;n=l+1|0;if((n|0)<(c[43746]|0)){l=n;m=o}else{break}}}m=a+4|0;c[i>>2]=c[m>>2];c[m>>2]=j;e=c[b>>2]|0;f=e|0;g=c[f>>2]|0;c[b>>2]=g;h=e;return h|0}function pt(a,b){a=a|0;b=b|0;var d=0;d=b|0;c[a>>2]=c[d>>2];c[d>>2]=a;return}function qt(a){a=a|0;var b=0,d=0;b=a|0;Wx(b,141360,304,1)|0;Ym(a);d=jk((e[(c[(Hx(b)|0)+8>>2]|0)+168>>1]|0)<<3)|0;c[(c[a+8>>2]|0)+132>>2]=d;vn(a,c[(c[(Hx(b)|0)+8>>2]|0)+116>>2]&1);return}function rt(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0.0,t=0,u=0.0,v=0,w=0,x=0,y=0,z=0,A=0.0,B=0;g=i;i=i+16|0;j=g|0;k=g+8|0;if((b|0)==0){l=0;i=g;return l|0}m=e+8|0;n=c[(c[m>>2]|0)+132>>2]|0;o=e|0;p=fw(o,b)|0;if((a[p]|0)==0){l=0;i=g;return l|0}a[j]=0;b=n+8|0;do{if((c[53568]|0)>2){q=ac(p|0,161560,(r=i,i=i+32|0,c[r>>2]=n,c[r+8>>2]=b,c[r+16>>2]=n+16,c[r+24>>2]=j,r)|0)|0;i=r;if((q|0)<=2){break}a[(c[m>>2]|0)+119|0]=1;s=+h[21580];q=c[53568]|0;a:do{if(s>0.0){if((q|0)>0){t=0;u=s}else{break}while(1){v=n+(t<<3)|0;h[v>>3]=+h[v>>3]/u;v=t+1|0;w=c[53568]|0;if((v|0)>=(w|0)){x=w;y=9;break a}t=v;u=+h[21580]}}else{x=q;y=9}}while(0);do{if((y|0)==9){if((x|0)<=3){break}vu(e,f,3)}}while(0);do{if((a[j]|0)!=33){if((d|0)==0){l=1;i=g;return l|0}if((Km(fw(o,d)|0)|0)<<24>>24==0){l=1}else{break}i=g;return l|0}}while(0);a[(c[m>>2]|0)+119|0]=3;l=1;i=g;return l|0}}while(0);x=ac(p|0,130648,(r=i,i=i+24|0,c[r>>2]=n,c[r+8>>2]=b,c[r+16>>2]=j,r)|0)|0;i=r;if((x|0)<=1){x=$w(o)|0;Fv(1,109024,(r=i,i=i+16|0,c[r>>2]=x,c[r+8>>2]=p,r)|0)|0;i=r;l=0;i=g;return l|0}a[(c[m>>2]|0)+119|0]=1;u=+h[21580];p=c[53568]|0;b:do{if(u>0.0){if((p|0)>0){z=0;A=u}else{break}while(1){x=n+(z<<3)|0;h[x>>3]=+h[x>>3]/A;x=z+1|0;b=c[53568]|0;if((x|0)>=(b|0)){B=b;y=20;break b}z=x;A=+h[21580]}}else{B=p;y=20}}while(0);c:do{if((y|0)==20){if((B|0)<=2){break}p=c[53570]|0;do{if((p|0)!=0){z=fw(o,p)|0;if((z|0)==0){break}x=ac(z|0,116320,(r=i,i=i+8|0,c[r>>2]=k,r)|0)|0;i=r;if((x|0)!=1){break}A=+h[21580];u=+h[k>>3];if(A>0.0){h[n+16>>3]=u/A}else{h[n+16>>3]=u}vu(e,f,3);break c}}while(0);wu(e,f)}}while(0);do{if((a[j]|0)!=33){if((d|0)==0){l=1;i=g;return l|0}if((Km(fw(o,d)|0)|0)<<24>>24==0){l=1}else{break}i=g;return l|0}}while(0);a[(c[m>>2]|0)+119|0]=3;l=1;i=g;return l|0}function st(a){a=a|0;var b=0,d=0,e=0;b=ux(a)|0;if((b|0)!=0){d=b;do{b=mw(a,d)|0;if((b|0)!=0){e=b;do{tn(e);e=ow(a,e)|0;}while((e|0)!=0)}un(d);d=vx(a,d)|0;}while((d|0)!=0)}if((c[53566]|0)!=0|(c[53552]|0)<0){uu(a)}if((Ix(a|0)|0)==(a|0)){return}_x(a,0,139536);return}function tt(b,e){b=b|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0.0,L=0,M=0,N=0,O=0,P=0.0,Q=0.0,R=0.0,S=0.0,T=0.0,U=0,V=0,W=0.0,X=0.0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0;f=i;i=i+152|0;g=f|0;j=f+8|0;k=f+16|0;l=f+24|0;m=f+32|0;n=f+40|0;o=f+48|0;p=f+56|0;q=f+64|0;r=f+72|0;s=f+80|0;t=f+88|0;u=f+96|0;v=f+104|0;w=f+112|0;x=f+120|0;y=Wv(b,0,103264,0)|0;z=Wv(b,0,97632,0)|0;if((z|0)==0){A=Wv(b,0,97632,213344)|0}else{A=z}tu(b)|0;z=b+8|0;B=c[c[(c[z>>2]|0)+144>>2]>>2]|0;a:do{if((B|0)!=0){C=0;D=B;while(1){E=D+8|0;F=c[E>>2]|0;if((a[F+119|0]|0)==0){G=D|0;if((Za($w(G)|0,86848,7)|0)!=0){break}H=c[E>>2]|0}else{H=F}F=c[H+108>>2]|0;do{if((F|0)!=0){E=ew(D|0,168264)|0;if((E|0)==0){break}I=ac(E|0,98704,(J=i,i=i+16|0,c[J>>2]=v,c[J+8>>2]=w,J)|0)|0;i=J;if((I|0)!=2){break}K=+h[w>>3];h[F+56>>3]=+h[v>>3];h[F+64>>3]=K;a[F+81|0]=1}}while(0);C=C+1|0;D=c[(c[(c[z>>2]|0)+144>>2]|0)+(C<<2)>>2]|0;if((D|0)==0){break a}}D=$w(G)|0;C=$w(b|0)|0;Fv(1,82048,(J=i,i=i+16|0,c[J>>2]=D,c[J+8>>2]=C,J)|0)|0;i=J;L=-1;i=f;return L|0}}while(0);ut(b,y,A);do{if((Mw(b)|0)==0){M=2}else{A=Wv(b,2,104384,0)|0;if((A|0)==0|(c[53566]|0)<2){M=0;break}y=ux(b)|0;if((y|0)==0){M=0;break}G=y;y=0;while(1){v=mw(b,G)|0;if((v|0)==0){N=y}else{w=v;v=y;while(1){H=w|0;B=fw(H,A)|0;do{if((a[B]|0)==0){O=0}else{ih(w,t,u);C=1;K=0.0;P=0.0;Q=0.0;R=0.0;D=0;F=0;I=B;b:while(1){E=ac(I|0,102080,(J=i,i=i+24|0,c[J>>2]=r,c[J+8>>2]=s,c[J+16>>2]=q,J)|0)|0;i=J;if((E|0)==2){S=+h[r>>3];T=+h[s>>3];U=1;V=I+(c[q>>2]|0)|0}else{S=Q;T=R;U=F;V=I}E=ac(V|0,101336,(J=i,i=i+24|0,c[J>>2]=r,c[J+8>>2]=s,c[J+16>>2]=q,J)|0)|0;i=J;if((E|0)==2){W=+h[r>>3];X=+h[s>>3];Y=1;Z=V+(c[q>>2]|0)|0}else{W=K;X=P;Y=D;Z=V}E=0;_=Z;while(1){$=_;while(1){if((Qa(d[$]|0)|0)==0){break}else{$=$+1|0}}aa=a[$]|0;c:do{if(aa<<24>>24==0){ba=0;ca=E;da=$}else{ea=E+1|0;fa=$;ga=aa;while(1){ha=fa+1|0;if((Qa(ga&255|0)|0)!=0|ga<<24>>24==59){ba=ga;ca=ea;da=fa;break c}ia=a[ha]|0;if(ia<<24>>24==0){ba=0;ca=ea;da=ha;break}else{fa=ha;ga=ia}}}}while(0);if((Qa(ba&255|0)|0)==0){break}else{E=ca;_=da}}if(!((ca|0)>3&((ca|0)%3|0|0)==1)){ja=34;break}ka=kk(ca<<4)|0;_=ka;if((ca|0)==0){la=Z}else{E=ca;aa=Z;$=_;while(1){ga=ac(aa|0,100472,(J=i,i=i+24|0,c[J>>2]=r,c[J+8>>2]=s,c[J+16>>2]=q,J)|0)|0;i=J;if((ga|0)<2){ja=38;break b}ga=aa+(c[q>>2]|0)|0;h[$>>3]=+h[r>>3];h[$+8>>3]=+h[s>>3];fa=E-1|0;if((fa|0)==0){la=ga;break}else{E=fa;aa=ga;$=$+16|0}}}while(1){ma=la+1|0;if((Qa(a[la]|0)|0)==0){break}else{la=ma}}$=(a[la]|0)==0;aa=$?la:ma;E=$?0:C;$=bm(w,ca)|0;if((U|0)!=0){c[$+8>>2]=c[t>>2];h[$+16>>3]=S;h[$+24>>3]=T}if((Y|0)!=0){c[$+12>>2]=c[u>>2];h[$+32>>3]=W;h[$+40>>3]=X}if((ca|0)>0){ga=$|0;$=0;do{fa=(c[ga>>2]|0)+($<<4)|0;ea=_+($<<4)|0;c[fa>>2]=c[ea>>2];c[fa+4>>2]=c[ea+4>>2];c[fa+8>>2]=c[ea+8>>2];c[fa+12>>2]=c[ea+12>>2];$=$+1|0;}while(($|0)<(ca|0))}eF(ka);if((E|0)==0){ja=51;break}else{C=E;K=W;P=X;Q=S;R=T;D=Y;F=U;I=aa}}if((ja|0)==34){ja=0;sn(w);if(a[976]|0){O=0;break}a[976]=1;I=w;F=$w(c[((c[I>>2]&3|0)==3?w:w+32|0)+28>>2]|0)|0;D=$w(c[((c[I>>2]&3|0)==2?w:w-32|0)+28>>2]|0)|0;Fv(0,100880,(J=i,i=i+16|0,c[J>>2]=F,c[J+8>>2]=D,J)|0)|0;i=J;O=0;break}else if((ja|0)==38){ja=0;if(!(a[976]|0)){a[976]=1;D=w;F=$w(c[((c[D>>2]&3|0)==3?w:w+32|0)+28>>2]|0)|0;I=$w(c[((c[D>>2]&3|0)==2?w:w-32|0)+28>>2]|0)|0;Fv(0,99912,(J=i,i=i+16|0,c[J>>2]=F,c[J+8>>2]=I,J)|0)|0;i=J}eF(ka);sn(w);O=0;break}else if((ja|0)==51){ja=0;I=w+8|0;F=c[(c[I>>2]|0)+96>>2]|0;do{if((F|0)!=0){D=ew(H,103264)|0;if((D|0)==0){break}C=ac(D|0,98704,(J=i,i=i+16|0,c[J>>2]=o,c[J+8>>2]=p,J)|0)|0;i=J;if((C|0)!=2){break}R=+h[p>>3];h[F+56>>3]=+h[o>>3];h[F+64>>3]=R;a[F+81|0]=1}}while(0);F=c[(c[I>>2]|0)+108>>2]|0;do{if((F|0)!=0){C=ew(H,168264)|0;if((C|0)==0){break}D=ac(C|0,98704,(J=i,i=i+16|0,c[J>>2]=m,c[J+8>>2]=n,J)|0)|0;i=J;if((D|0)!=2){break}R=+h[n>>3];h[F+56>>3]=+h[m>>3];h[F+64>>3]=R;a[F+81|0]=1}}while(0);F=c[(c[I>>2]|0)+100>>2]|0;do{if((F|0)!=0){D=ew(H,99528)|0;if((D|0)==0){break}C=ac(D|0,98704,(J=i,i=i+16|0,c[J>>2]=k,c[J+8>>2]=l,J)|0)|0;i=J;if((C|0)!=2){break}R=+h[l>>3];h[F+56>>3]=+h[k>>3];h[F+64>>3]=R;a[F+81|0]=1}}while(0);F=c[(c[I>>2]|0)+104>>2]|0;if((F|0)==0){O=1;break}C=ew(H,99144)|0;if((C|0)==0){O=1;break}D=ac(C|0,98704,(J=i,i=i+16|0,c[J>>2]=g,c[J+8>>2]=j,J)|0)|0;i=J;if((D|0)!=2){O=1;break}R=+h[j>>3];h[F+56>>3]=+h[g>>3];h[F+64>>3]=R;a[F+81|0]=1;O=1;break}}}while(0);H=O+v|0;B=ow(b,w)|0;if((B|0)==0){N=H;break}else{w=B;v=H}}}v=vx(b,G)|0;if((v|0)==0){break}else{G=v;y=N}}if((N|0)==0){M=0;break}y=(N|0)==(Mw(b)|0);M=y?2:1}}while(0);N=c[(c[z>>2]|0)+8>>2]|0;d:do{if((c[N+88>>2]|0)==0){O=(e|0)!=0;do{if(O&(c[53566]|0)==1){if((nr(b)|0)==0){break}g=c[(c[z>>2]|0)+12>>2]|0;if((g|0)==0){break}a[g+81|0]=0}}while(0);$m(b);if(!O){na=0;ja=115;break}g=c[z>>2]|0;T=+h[g+16>>3];j=~~T;J=(j|0)>-1?j:-j|0;S=+(J|0);if((J|0)>-1){if((~~(S+.5)|0)==0){ja=81}}else{if((~~(S+-.5)|0)==0){ja=81}}do{if((ja|0)==81){J=~~+h[g+24>>3];j=(J|0)>-1?J:-J|0;S=+(j|0);if((j|0)>-1){if((~~(S+.5)|0)==0){oa=0;break d}else{break}}else{if((~~(S+-.5)|0)==0){oa=0;break d}else{break}}}}while(0);S=+h[g+24>>3];X=T/72.0;W=S/72.0;O=ux(b)|0;if((O|0)!=0){j=O;do{O=j+8|0;J=c[(c[O>>2]|0)+132>>2]|0;h[J>>3]=+h[J>>3]-X;J=(c[(c[O>>2]|0)+132>>2]|0)+8|0;h[J>>3]=+h[J>>3]-W;j=vx(b,j)|0;}while((j|0)!=0)}do{if((M|0)!=0){j=ux(b)|0;if((j|0)==0){break}else{pa=j}do{j=mw(b,pa)|0;if((j|0)!=0){g=j;do{j=g+8|0;J=c[j>>2]|0;O=c[J+8>>2]|0;do{if((O|0)!=0){if((c[O+4>>2]|0)>0){k=0;l=c[O>>2]|0;while(1){m=l+4|0;if((c[m>>2]|0)>0){n=0;o=c[l>>2]|0;while(1){p=o|0;h[p>>3]=+h[p>>3]-T;p=o+8|0;h[p>>3]=+h[p>>3]-S;p=n+1|0;if((p|0)<(c[m>>2]|0)){n=p;o=o+16|0}else{break}}}if((c[l+8>>2]|0)!=0){o=l+16|0;h[o>>3]=+h[o>>3]-T;o=l+24|0;h[o>>3]=+h[o>>3]-S}if((c[l+12>>2]|0)!=0){o=l+32|0;h[o>>3]=+h[o>>3]-T;o=l+40|0;h[o>>3]=+h[o>>3]-S}o=k+1|0;n=c[j>>2]|0;if((o|0)<(c[(c[n+8>>2]|0)+4>>2]|0)){k=o;l=l+48|0}else{qa=n;break}}}else{qa=J}l=c[qa+96>>2]|0;do{if((l|0)==0){ra=qa}else{if((a[l+81|0]|0)==0){ra=qa;break}k=l+56|0;h[k>>3]=+h[k>>3]-T;k=(c[(c[j>>2]|0)+96>>2]|0)+64|0;h[k>>3]=+h[k>>3]-S;ra=c[j>>2]|0}}while(0);l=c[ra+108>>2]|0;do{if((l|0)==0){sa=ra}else{if((a[l+81|0]|0)==0){sa=ra;break}k=l+56|0;h[k>>3]=+h[k>>3]-T;k=(c[(c[j>>2]|0)+108>>2]|0)+64|0;h[k>>3]=+h[k>>3]-S;sa=c[j>>2]|0}}while(0);l=c[sa+100>>2]|0;do{if((l|0)==0){ta=sa}else{if((a[l+81|0]|0)==0){ta=sa;break}k=l+56|0;h[k>>3]=+h[k>>3]-T;k=(c[(c[j>>2]|0)+100>>2]|0)+64|0;h[k>>3]=+h[k>>3]-S;ta=c[j>>2]|0}}while(0);l=c[ta+104>>2]|0;if((l|0)==0){break}if((a[l+81|0]|0)==0){break}k=l+56|0;h[k>>3]=+h[k>>3]-T;k=(c[(c[j>>2]|0)+104>>2]|0)+64|0;h[k>>3]=+h[k>>3]-S}}while(0);g=ow(b,g)|0;}while((g|0)!=0)}pa=vx(b,pa)|0;}while((pa|0)!=0)}}while(0);Bt(b,T,S);oa=0}else{c[N+84>>2]=0;$m(b);g=(c[z>>2]|0)+16|0;Ph(x,b);j=g;g=x;c[j>>2]=c[g>>2];c[j+4>>2]=c[g+4>>2];c[j+8>>2]=c[g+8>>2];c[j+12>>2]=c[g+12>>2];c[j+16>>2]=c[g+16>>2];c[j+20>>2]=c[g+20>>2];c[j+24>>2]=c[g+24>>2];c[j+28>>2]=c[g+28>>2];if((e|0)==0){na=1;ja=115}else{oa=1}}}while(0);if((ja|0)==115){c[53522]=1;ja=ux(b)|0;if((ja|0)==0){L=na;i=f;return L|0}else{ua=ja}while(1){ja=ua+8|0;e=c[ja>>2]|0;h[e+16>>3]=+h[c[e+132>>2]>>3]*72.0;e=c[ja>>2]|0;h[e+24>>3]=+h[(c[e+132>>2]|0)+8>>3]*72.0;e=vx(b,ua)|0;if((e|0)==0){L=na;break}else{ua=e}}i=f;return L|0}if((M|0)==2){c[53522]=1;Ot(b);L=oa;i=f;return L|0}else{Nt(b);L=oa;i=f;return L|0}return 0}function ut(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0.0,o=0;f=i;i=i+16|0;g=f|0;j=f+8|0;k=b+8|0;do{if(!((c[(c[k>>2]|0)+12>>2]|0)==0|(d|0)==0)){l=ac(fw(b|0,d)|0,98704,(m=i,i=i+16|0,c[m>>2]=g,c[m+8>>2]=j,m)|0)|0;i=m;if((l|0)!=2){break}l=c[(c[k>>2]|0)+12>>2]|0;n=+h[j>>3];h[l+56>>3]=+h[g>>3];h[l+64>>3]=n;a[(c[(c[k>>2]|0)+12>>2]|0)+81|0]=1}}while(0);if((e|0)==0){i=f;return}k=sy(b)|0;if((k|0)==0){i=f;return}else{o=k}do{Ct(o,b,d,e);o=ty(o)|0;}while((o|0)!=0);i=f;return}function vt(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;g=i;i=i+40|0;h=g|0;j=g+32|0;k=b|0;b=ew(k,164128)|0;if((b|0)==0){l=e;i=g;return l|0}m=a[b]|0;if(m<<24>>24==0){l=e;i=g;return l|0}do{if((Kb(m&255|0)|0)==0){n=b;o=((d[b]|0)-48|0)>>>0<10>>>0}else{if((Za(b|0,160072,4)|0)==0){l=0;i=g;return l|0}if((Za(b|0,155040,7)|0)==0){l=1;i=g;return l|0}else{p=(Za(b|0,151632,6)|0)==0;n=p?b+6|0:b;o=p;break}}}while(0);b=o?2:e;if((b|0)!=2){l=b;i=g;return l|0}if(((d[n]|0)-48|0)>>>0<10>>>0){b=ac(n|0,148776,(q=i,i=i+8|0,c[q>>2]=j,q)|0)|0;i=q;if((b|0)<1){r=11}}else{r=11}if((r|0)==11){r=fb()|0;b=(zc(0)|0)^r;c[j>>2]=b;r=h|0;nb(r|0,148776,(q=i,i=i+8|0,c[q>>2]=b,q)|0)|0;i=q;gw(k,164128,r)|0}c[f>>2]=c[j>>2];l=2;i=g;return l|0}function wt(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0.0,m=0.0,n=0.0,o=0,p=0.0;f=i;i=i+8|0;g=f|0;c[g>>2]=1;j=vt(b,e,g)|0;if(!((c[53596]|0)==0|(j|0)==2)){Fv(0,145560,(e=i,i=i+1|0,i=i+7&-8,c[e>>2]=0,e)|0)|0;i=e}if((j|0)!=1){k=c[g>>2]|0;dc(k|0);i=f;return j|0}l=+(d|0);m=6.283185307179586/l;e=ux(b)|0;if((e|0)==0){k=c[g>>2]|0;dc(k|0);i=f;return j|0}else{n=0.0;o=e}while(1){p=l*+V(n);e=o+8|0;h[c[(c[e>>2]|0)+132>>2]>>3]=p;p=l*+W(n);h[(c[(c[e>>2]|0)+132>>2]|0)+8>>3]=p;a[(c[e>>2]|0)+119|0]=1;if((c[53568]|0)>2){wu(o,d)}e=vx(b,o)|0;if((e|0)==0){break}else{n=m+n;o=e}}k=c[g>>2]|0;dc(k|0);i=f;return j|0}function xt(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0.0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;d=i;i=i+1096|0;e=d|0;f=d+1024|0;g=d+1056|0;j=d+1080|0;k=d+1088|0;l=+h[21580];do{if((c[53566]|0)==0){h[21580]=+Gm(b);yt(b);m=b|0;n=ew(m,107080)|0;do{if((n|0)==0){o=1}else{p=a[n]|0;if((p<<24>>24|0)==0){o=1;break}else if((p<<24>>24|0)==75){if((Ya(n|0,106624)|0)==0){o=0;break}}else if((p<<24>>24|0)==109){if((Ya(n|0,106200)|0)==0){o=1;break}}p=$w(m)|0;Fv(0,105680,(q=i,i=i+16|0,c[q>>2]=n,c[q+8>>2]=p,q)|0)|0;i=q;o=1}}while(0);jr(b,g,0)|0;n=ew(m,112752)|0;a:do{if((n|0)==0){r=0}else{p=a[n]|0;do{if((p<<24>>24|0)==99){if((Ya(n|0,112296)|0)==0){r=1;break a}}else if((p<<24>>24|0)==115){if((Ya(n|0,111672)|0)==0){r=2;break a}if((Ya(n|0,111032)|0)==0){r=0;break a}}else if((p<<24>>24|0)==109){if((Ya(n|0,110368)|0)!=0){break}if((Wv(b,2,121896,0)|0)!=0){r=3;break a}s=$w(m)|0;Fv(0,109568,(q=i,i=i+8|0,c[q>>2]=s,q)|0)|0;i=q;Fv(3,108728,(q=i,i=i+1|0,i=i+7&-8,c[q>>2]=0,q)|0)|0;i=q;r=0;break a}else if((p<<24>>24|0)==0){r=0;break a}}while(0);p=$w(m)|0;Fv(0,107760,(q=i,i=i+16|0,c[q>>2]=n,c[q+8>>2]=p,q)|0)|0;i=q;r=0}}while(0);n=vv(b,0,f)|0;m=wv(b,-1,8)|0;c[53552]=m;p=(m|0)<0;do{if((n|0)==0){if(!((o|0)==0|p^1)){c[53552]=8;c[f+16>>2]=2;t=28;break}c[f+16>>2]=2;if((m|0)>-1){t=28;break}zt(b,o,r);lr(b,g)|0;s=e|0;do{if((c[53568]|0)>2&(c[53570]|0)!=0){u=ux(b)|0;if((u|0)==0){break}else{v=u}do{nb(s|0,116320,(q=i,i=i+8|0,h[q>>3]=+h[(c[(c[v+8>>2]|0)+132>>2]|0)+16>>3]*72.0,q)|0)|0;i=q;hw(v|0,c[53570]|0,s)|0;v=vx(b,v)|0;}while((v|0)!=0)}}while(0);Pt(b)}else{if(!p){t=28;break}c[53552]=8;t=28}}while(0);if((t|0)==28){p=fv(b,j,113264,k)|0;do{if((c[j>>2]|0)>1){m=0;do{n=c[p+(m<<2)>>2]|0;jv(n)|0;zt(n,o,r);lr(n,g)|0;qn(n,2);Pt(n);m=m+1|0;w=c[j>>2]|0;}while((m|0)<(w|0));if((a[k]|0)==0){x=0;y=w}else{m=jk(w)|0;a[m]=1;x=m;y=c[j>>2]|0}c[f+8>>2]=c[53552];c[f+20>>2]=x;c[f+12>>2]=1;rv(y,p,b,f)|0;if((x|0)==0){break}eF(x)}else{zt(b,o,r);lr(b,g)|0;Pt(b)}}while(0);$m(b);m=e|0;do{if((c[53568]|0)>2&(c[53570]|0)!=0){n=ux(b)|0;if((n|0)==0){break}else{z=n}do{nb(m|0,116320,(q=i,i=i+8|0,h[q>>3]=+h[(c[(c[z+8>>2]|0)+132>>2]|0)+16>>3]*72.0,q)|0)|0;i=q;hw(z|0,c[53570]|0,m)|0;z=vx(b,z)|0;}while((z|0)!=0)}}while(0);if((c[j>>2]|0)>0){m=0;do{n=c[p+(m<<2)>>2]|0;uu(n);s=n|0;Xx(s,139536)|0;Gx(b,s)|0;m=m+1|0;}while((m|0)<(c[j>>2]|0))}eF(p)}Xk(b)}else{h[21580]=72.0;yt(b);m=e|0;do{if((c[53568]|0)>2&(c[53570]|0)!=0){s=ux(b)|0;if((s|0)==0){break}else{A=s}do{nb(m|0,116320,(q=i,i=i+8|0,h[q>>3]=+h[(c[(c[A+8>>2]|0)+132>>2]|0)+16>>3]*72.0,q)|0)|0;i=q;hw(A|0,c[53570]|0,m)|0;A=vx(b,A)|0;}while((A|0)!=0)}}while(0);m=tt(b,1)|0;if((m|0)>=0){Uk(b,(m|0)==0|0);break}Fv(3,142592,(q=i,i=i+1|0,i=i+7&-8,c[q>>2]=0,q)|0)|0;i=q;i=d;return}}while(0);h[21580]=l;i=d;return}function yt(a){a=a|0;var d=0,f=0,g=0,i=0,j=0,k=0,l=0.0;qn(a,2);d=a|0;f=Em(d,Wv(a,0,105272,0)|0,2,2)|0;g=(Em(d,Wv(a,0,104896,0)|0,f,2)|0)&65535;b[(c[(Ix(d)|0)+8>>2]|0)+168>>1]=g;g=a+48|0;d=(c[(c[g>>2]|0)+8>>2]|0)+168|0;i=b[d>>1]|0;j=(i&65535)>>>0<10>>>0?i:10;b[d>>1]=j;d=j&65535;c[53568]=d;b[(c[(c[g>>2]|0)+8>>2]|0)+170>>1]=(f|0)<(d|0)?f:d;d=Lw(a)|0;c[53596]=Wv(a,1,104384,0)|0;f=Wv(a,1,103824,0)|0;g=ux(a)|0;if((g|0)!=0){j=g;do{g=j|0;Wx(g,141360,304,1)|0;Ym(j);i=jk((e[(c[(Hx(g)|0)+8>>2]|0)+168>>1]|0)<<3)|0;c[(c[j+8>>2]|0)+132>>2]=i;vn(j,c[(c[(Hx(g)|0)+8>>2]|0)+116>>2]&1);rt(c[53596]|0,f,j,d)|0;j=vx(a,j)|0;}while((j|0)!=0)}j=ux(a)|0;if((j|0)==0){return}else{k=j}do{j=mw(a,k)|0;if((j|0)!=0){d=j;do{j=d|0;Wx(j,103024,176,1)|0;Zm(d)|0;l=+Fm(j,c[53750]|0,1.0,1.0);h[(c[d+8>>2]|0)+128>>3]=l;d=ow(a,d)|0;}while((d|0)!=0)}k=vx(a,k)|0;}while((k|0)!=0);return}function zt(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0.0,y=0,z=0;f=i;i=i+24|0;g=f|0;j=f+8|0;k=f+16|0;l=b|0;m=ew(l,136896)|0;do{if((m|0)==0){if((d|0)==1){c[53660]=200;break}else{c[53660]=(Lw(b)|0)*100|0;break}}else{c[53660]=Rb(m|0)|0}}while(0);m=ru(b,d)|0;if((m|0)<2|(c[53660]|0)<0){i=f;return}if((d|0)!=0){n=c[53568]|0;p=wt(b,m,(d|0)==2?0:2)|0;q=Em(l,Wv(b,0,114704,0)|0,2,0)|0;if((q|0)==0|(q|0)>2){Fv(0,113856,(r=i,i=i+8|0,c[r>>2]=114704,r)|0)|0;i=r;s=2}else{s=q}q=(p|0)==0;p=q?s|4:s;s=kk(n<<2)|0;t=s;u=kk(da(m<<3,n)|0)|0;c[t>>2]=u;a:do{if((c[53568]|0)>1){c[s+4>>2]=u+(m<<3);if((c[53568]|0)>2){v=2;w=u}else{break}while(1){c[t+(v<<2)>>2]=w+((da(v,m)|0)<<3);n=v+1|0;if((n|0)>=(c[53568]|0)){break a}v=n;w=c[t>>2]|0}}}while(0);if((a[213992]|0)!=0){w=c[o>>2]|0;v=c[53660]|0;x=+h[21657];gc(w|0,119480,(r=i,i=i+40|0,c[r>>2]=e,c[r+8>>2]=q&1,c[r+16>>2]=p&3,c[r+24>>2]=v,h[r+32>>3]=x,r)|0)|0;i=r;Ma(118760,15,1,w|0)|0;ym();Ma(117848,13,1,w|0)|0}w=At(b,m,j,d,e,k)|0;if((a[213992]|0)!=0){d=c[o>>2]|0;x=+zm();gc(d|0,116936,(r=i,i=i+16|0,c[r>>2]=m,h[r+8>>3]=x,r)|0)|0;i=r}do{if((nu(w,m,c[j>>2]|0,t,c[k>>2]|0,c[53568]|0,p,e,c[53660]|0)|0)<0){Fv(3,116016,(r=i,i=i+1|0,i=i+7&-8,c[r>>2]=0,r)|0)|0;i=r}else{d=ux(b)|0;if((d|0)==0){break}else{y=d}do{d=y+8|0;v=c[d>>2]|0;q=c[v+120>>2]|0;do{if((c[53568]|0)>0){h[c[v+132>>2]>>3]=+h[(c[t>>2]|0)+(q<<3)>>3];if((c[53568]|0)>1){z=1}else{break}do{h[(c[(c[d>>2]|0)+132>>2]|0)+(z<<3)>>3]=+h[(c[t+(z<<2)>>2]|0)+(q<<3)>>3];z=z+1|0;}while((z|0)<(c[53568]|0))}}while(0);y=vx(b,y)|0;}while((y|0)!=0)}}while(0);Qr(w);eF(c[t>>2]|0);eF(s);eF(c[k>>2]|0);i=f;return}do{if((e|0)==2){k=At(b,m,g,0,2,0)|0;s=Cs(k,m)|0;if((m|0)>0){t=b+8|0;w=0;do{y=s+(w<<2)|0;z=0;do{h[(c[(c[(c[t>>2]|0)+152>>2]|0)+(w<<2)>>2]|0)+(z<<3)>>3]=+(c[(c[y>>2]|0)+(z<<2)>>2]|0);z=z+1|0;}while((z|0)<(m|0));w=w+1|0;}while((w|0)<(m|0))}eF(c[s>>2]|0);eF(s);Qr(k);}else if((e|0)==1){if((yr(b,m)|0)!=0){break}w=$w(l)|0;Fv(0,133960,(r=i,i=i+8|0,c[r>>2]=w,r)|0)|0;i=r;Fv(3,131976,(r=i,i=i+1|0,i=i+7&-8,c[r>>2]=0,r)|0)|0;i=r;Fv(3,129712,(r=i,i=i+1|0,i=i+7&-8,c[r>>2]=0,r)|0)|0;i=r;Fv(3,126424,(r=i,i=i+1|0,i=i+7&-8,c[r>>2]=0,r)|0)|0;i=r;Gu(b,m)}else{Gu(b,m);if((e|0)!=3){break}w=ux(b)|0;if((w|0)==0){break}t=b+8|0;z=w;do{w=mw(b,z)|0;if((w|0)!=0){y=w;do{w=c[y>>2]&3;p=(c[c[((w|0)==3?y:y+32|0)+28>>2]>>2]|0)>>>4;j=(c[c[((w|0)==2?y:y-32|0)+28>>2]>>2]|0)>>>4;if((p|0)!=(j|0)){x=+h[(c[y+8>>2]|0)+136>>3];h[(c[(c[(c[t>>2]|0)+152>>2]|0)+(j<<2)>>2]|0)+(p<<3)>>3]=x;h[(c[(c[(c[t>>2]|0)+152>>2]|0)+(p<<2)>>2]|0)+(j<<3)>>3]=x}y=ow(b,y)|0;}while((y|0)!=0)}z=vx(b,z)|0;}while((z|0)!=0)}}while(0);xu(b,m);yu(b,m);if((a[213992]|0)!=0){l=c[53660]|0;x=+h[21657];gc(c[o>>2]|0,123944,(r=i,i=i+24|0,c[r>>2]=e,c[r+8>>2]=l,h[r+16>>3]=x,r)|0)|0;i=r;ym()}zu(b,m);i=f;return}function At(a,b,d,e,f,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0.0,ia=0.0,ja=0,ka=0,la=0,ma=0,na=0;j=Mw(a)|0;k=Lk()|0;if((f|0)==2){l=0;m=0}else{f=Wv(a,2,121896,0)|0;l=(c[53750]|0)!=0|0;m=(f|0)!=0}f=(e&-2|0)==2;e=kk(b<<4)|0;n=e;o=kk(b<<2)|0;p=o;q=(j<<1)+b<<2;j=kk(q)|0;r=m|f;if(r){s=kk(q)|0}else{s=0}t=(l|0)!=0;if(t){u=kk(q)|0}else{u=0}q=ux(a)|0;a:do{if((q|0)==0){v=u;w=s;x=0}else{l=u;y=0;z=q;A=s;B=j;C=0;while(1){Mk(k);if((c[(c[z+8>>2]|0)+120>>2]|0)!=(y|0)){break}c[p+(y<<2)>>2]=z;D=B+4|0;E=n+(y<<4)+4|0;c[E>>2]=B;if(r){c[n+(y<<4)+8>>2]=A;F=A+4|0}else{c[n+(y<<4)+8>>2]=0;F=A}if(t){c[n+(y<<4)+12>>2]=l;G=l+4|0}else{c[n+(y<<4)+12>>2]=0;G=l}H=rw(a,z)|0;if((H|0)==0){I=G;J=1;K=F;L=D;M=C}else{N=n+(y<<4)+12|0;O=n+(y<<4)+8|0;P=G;Q=H;H=1;R=1;S=F;T=D;D=C;while(1){U=Q;V=c[U>>2]&3;W=Q-32|0;X=c[((V|0)==2?Q:W)+28>>2]|0;Y=Q+32|0;Z=c[((V|0)==3?Q:Y)+28>>2]|0;do{if((X|0)==(Z|0)){_=D;$=T;aa=S;ba=R;ca=H;da=P}else{V=c[(c[Z+8>>2]|0)+120>>2]|0;ea=c[(c[X+8>>2]|0)+120>>2]|0;fa=(V|0)>(ea|0);ga=Ok(k,fa?ea:V,fa?V:ea,R)|0;if((ga|0)!=(R|0)){if(t){ea=(c[N>>2]|0)+(ga<<2)|0;g[ea>>2]=+h[(c[Q+8>>2]|0)+128>>3]+ +g[ea>>2]}if(!m){_=D;$=T;aa=S;ba=R;ca=H;da=P;break}ea=(c[O>>2]|0)+(ga<<2)|0;ha=+h[(c[Q+8>>2]|0)+136>>3];ia=+(~~+g[ea>>2]|0);g[ea>>2]=ha>ia?ha:ia;_=D;$=T;aa=S;ba=R;ca=H;da=P;break}ea=c[U>>2]&3;ga=c[((ea|0)==3?Q:Y)+28>>2]|0;if((ga|0)==(z|0)){ja=c[((ea|0)==2?Q:W)+28>>2]|0}else{ja=ga}ga=D+1|0;ea=R+1|0;V=T+4|0;c[T>>2]=c[(c[ja+8>>2]|0)+120>>2];if(t){g[P>>2]=+h[(c[Q+8>>2]|0)+128>>3];ka=P+4|0}else{ka=P}do{if(m){g[S>>2]=+h[(c[Q+8>>2]|0)+136>>3];la=S+4|0}else{if(!f){la=S;break}g[S>>2]=1.0;la=S+4|0}}while(0);_=ga;$=V;aa=la;ba=ea;ca=H+1|0;da=ka}}while(0);W=sw(a,Q,z)|0;if((W|0)==0){I=da;J=ca;K=aa;L=$;M=_;break}else{P=da;Q=W;H=ca;R=ba;S=aa;T=$;D=_}}}c[n+(y<<4)>>2]=J;c[c[E>>2]>>2]=y;D=vx(a,z)|0;if((D|0)==0){v=I;w=K;x=M;break a}else{l=I;y=y+1|0;z=D;A=K;B=L;C=M}}cc(121096,120256,895,170408);return 0}}while(0);M=(x|0)/2|0;do{if((M|0)!=(Mw(a)|0)){x=(M<<1)+b<<2;L=mk(c[e+4>>2]|0,x)|0;if(m){ma=mk(c[e+8>>2]|0,x)|0}else{ma=w}if(t){na=mk(c[e+12>>2]|0,x)|0}else{na=v}if((b|0)<=0){break}if(m){if(t){x=na;K=0;I=ma;J=L;while(1){_=c[n+(K<<4)>>2]|0;c[n+(K<<4)+4>>2]=J;c[n+(K<<4)+8>>2]=I;c[n+(K<<4)+12>>2]=x;$=K+1|0;if(($|0)<(b|0)){x=x+(_<<2)|0;K=$;I=I+(_<<2)|0;J=J+(_<<2)|0}else{break}}}else{J=0;I=ma;K=L;while(1){x=c[n+(J<<4)>>2]|0;c[n+(J<<4)+4>>2]=K;c[n+(J<<4)+8>>2]=I;_=J+1|0;if((_|0)<(b|0)){J=_;I=I+(x<<2)|0;K=K+(x<<2)|0}else{break}}}}else{if(t){K=na;I=0;J=L;while(1){x=c[n+(I<<4)>>2]|0;c[n+(I<<4)+4>>2]=J;c[n+(I<<4)+12>>2]=K;_=I+1|0;if((_|0)<(b|0)){K=K+(x<<2)|0;I=_;J=J+(x<<2)|0}else{break}}}else{J=0;I=L;while(1){K=c[n+(J<<4)>>2]|0;c[n+(J<<4)+4>>2]=I;x=J+1|0;if((x|0)<(b|0)){J=x;I=I+(K<<2)|0}else{break}}}}}}while(0);c[d>>2]=M;if((i|0)==0){eF(o);Nk(k);return n|0}else{c[i>>2]=p;Nk(k);return n|0}return 0}function Bt(b,d,e){b=b|0;d=+d;e=+e;var f=0,g=0,i=0,j=0,k=0,l=0;f=b+8|0;b=(c[f>>2]|0)+32|0;h[b>>3]=+h[b>>3]-d;b=(c[f>>2]|0)+40|0;h[b>>3]=+h[b>>3]-e;b=(c[f>>2]|0)+16|0;h[b>>3]=+h[b>>3]-d;b=(c[f>>2]|0)+24|0;h[b>>3]=+h[b>>3]-e;b=c[f>>2]|0;g=c[b+12>>2]|0;do{if((g|0)==0){i=b}else{if((a[g+81|0]|0)==0){i=b;break}j=g+56|0;h[j>>3]=+h[j>>3]-d;j=(c[(c[f>>2]|0)+12>>2]|0)+64|0;h[j>>3]=+h[j>>3]-e;i=c[f>>2]|0}}while(0);if((c[i+172>>2]|0)<1){return}else{k=1;l=i}while(1){Bt(c[(c[l+176>>2]|0)+(k<<2)>>2]|0,d,e);i=c[f>>2]|0;if((k|0)<(c[i+172>>2]|0)){k=k+1|0;l=i}else{break}}return}function Ct(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0.0,s=0,t=0;f=i;i=i+64|0;g=f|0;j=f+32|0;k=a|0;do{if((Za($w(k)|0,86848,7)|0)==0){l=g;m=g+8|0;n=g+24|0;o=ac(fw(k,e)|0,98144,(p=i,i=i+32|0,c[p>>2]=g,c[p+8>>2]=m,c[p+16>>2]=g+16,c[p+24>>2]=n,p)|0)|0;i=p;if((o|0)!=4){break}q=+h[m>>3];r=+h[n>>3];if(q>r){h[m>>3]=r;h[n>>3]=q}n=j;c[n>>2]=c[l>>2];c[n+4>>2]=c[l+4>>2];c[n+8>>2]=c[l+8>>2];c[n+12>>2]=c[l+12>>2];c[n+16>>2]=c[l+16>>2];c[n+20>>2]=c[l+20>>2];c[n+24>>2]=c[l+24>>2];c[n+28>>2]=c[l+28>>2];Wx(k,139536,272,1)|0;l=(c[a+8>>2]|0)+16|0;c[l>>2]=c[n>>2];c[l+4>>2]=c[n+4>>2];c[l+8>>2]=c[n+8>>2];c[l+12>>2]=c[n+12>>2];c[l+16>>2]=c[n+16>>2];c[l+20>>2]=c[n+20>>2];c[l+24>>2]=c[n+24>>2];c[l+28>>2]=c[n+28>>2];n=b+8|0;l=(c[n>>2]|0)+172|0;m=c[l>>2]|0;o=m+1|0;c[l>>2]=o;l=c[n>>2]|0;p=c[l+176>>2]|0;if((p|0)==0){s=jk((m<<2)+8|0)|0}else{s=lk(p,m+2|0,4,c[l+172>>2]|0)|0}c[(c[n>>2]|0)+176>>2]=s;c[(c[(c[n>>2]|0)+176>>2]|0)+(o<<2)>>2]=a;Rj(a);ut(a,d,e);i=f;return}}while(0);s=sy(a)|0;if((s|0)==0){i=f;return}else{t=s}do{Ct(t,b,d,e);t=ty(t)|0;}while((t|0)!=0);i=f;return}function Dt(a,d,e){a=a|0;d=d|0;e=e|0;var f=0;e=jk(64)|0;a=e+8|0;f=d+8|0;c[a>>2]=c[f>>2];c[a+4>>2]=c[f+4>>2];c[a+8>>2]=c[f+8>>2];c[a+12>>2]=c[f+12>>2];c[a+16>>2]=c[f+16>>2];c[a+20>>2]=c[f+20>>2];c[a+24>>2]=c[f+24>>2];c[a+28>>2]=c[f+28>>2];c[a+32>>2]=c[f+32>>2];c[a+36>>2]=c[f+36>>2];c[a+40>>2]=c[f+40>>2];c[a+44>>2]=c[f+44>>2];f=c[d+56>>2]|0;c[e+56>>2]=f;b[(c[f+8>>2]|0)+168>>1]=1;return e|0}function Et(a,b,c){a=a|0;b=b|0;c=c|0;eF(b);return}function Ft(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0;e=c[b>>2]|0;a=c[d>>2]|0;if(e>>>0>a>>>0){f=1;return f|0}if(e>>>0<a>>>0){f=-1;return f|0}a=c[b+24>>2]|0;e=c[d+24>>2]|0;if(a>>>0>e>>>0){f=1;return f|0}if(a>>>0<e>>>0){f=-1;return f|0}e=~~(+h[b+8>>3]- +h[d+8>>3]);if((e|0)!=0){f=e;return f|0}e=~~(+h[b+16>>3]- +h[d+16>>3]);if((e|0)!=0){f=e;return f|0}e=~~(+h[b+32>>3]- +h[d+32>>3]);if((e|0)!=0){f=e;return f|0}f=~~(+h[b+40>>3]- +h[d+40>>3]);return f|0}function Gt(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0.0,n=0,o=0,p=0,q=0;g=i;i=i+8|0;h=e+8|0;j=b[(c[h>>2]|0)+168>>1]|0;k=j<<16>>16;if(!(j<<16>>16!=1&(a[215376]|0)==0)){l=g|0;c[l>>2]=e;m=+(f|0);im(d,l,0,1,m,m,11832);if((c[(c[h>>2]|0)+96>>2]|0)!=0){l=Hx(c[((c[e>>2]&3|0)==3?e:e+32|0)+28>>2]|0)|0;_m(l,c[(c[h>>2]|0)+96>>2]|0)}km(e);i=g;return}h=kk(k<<2)|0;l=h;n=j<<16>>16>0;do{if(n){j=0;o=e;while(1){c[l+(j<<2)>>2]=o;p=j+1|0;if((p|0)<(k|0)){j=p;o=c[(c[o+8>>2]|0)+172>>2]|0}else{break}}m=+(f|0);im(d,l,0,k,m,m,11832);if(n){q=0}else{break}do{o=c[l+(q<<2)>>2]|0;j=o+8|0;if((c[(c[j>>2]|0)+96>>2]|0)!=0){p=Hx(c[((c[o>>2]&3|0)==3?o:o+32|0)+28>>2]|0)|0;_m(p,c[(c[j>>2]|0)+96>>2]|0)}km(o);q=q+1|0;}while((q|0)<(k|0))}else{m=+(f|0);im(d,l,0,k,m,m,11832)}}while(0);eF(h);i=g;return}
-
-
-
-function Ht(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0.0,s=0.0,t=0,u=0,v=0.0,w=0,x=0,y=0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0,H=0,I=0,J=0.0,K=0.0,L=0,M=0.0,N=0.0,O=0.0,P=0.0;f=i;i=i+64|0;j=f|0;k=pl(b)|0;if((k|0)==4){l=b+8|0;m=jk(8)|0;n=m;c[m+4>>2]=4;o=jk(64)|0;p=m;c[p>>2]=o;m=c[l>>2]|0;q=+h[m+16>>3];r=+h[m+24>>3];s=-0.0- +h[m+88>>3];if((a[d+8|0]|0)==0){t=d|0;u=d+4|0;v=r- +h[m+80>>3]*+g[u>>2];h[o>>3]=q+ +g[t>>2]*s;h[o+8>>3]=v;w=c[p>>2]|0;x=c[l>>2]|0;v=r+ +h[x+80>>3]*+g[u>>2];h[w+16>>3]=q- +h[x+88>>3]*+g[t>>2];h[w+24>>3]=v;w=c[p>>2]|0;x=c[l>>2]|0;v=r+ +h[x+80>>3]*+g[u>>2];h[w+32>>3]=q+ +h[x+96>>3]*+g[t>>2];h[w+40>>3]=v;w=c[p>>2]|0;x=c[l>>2]|0;v=r- +h[x+80>>3]*+g[u>>2];h[w+48>>3]=q+ +h[x+96>>3]*+g[t>>2];h[w+56>>3]=v;y=n;i=f;return y|0}else{w=d|0;t=d+4|0;v=r+(-0.0- +h[m+80>>3]- +g[t>>2]);h[o>>3]=q+(s- +g[w>>2]);h[o+8>>3]=v;o=c[p>>2]|0;m=c[l>>2]|0;v=r+(+h[m+80>>3]+ +g[t>>2]);h[o+16>>3]=q+(-0.0- +h[m+88>>3]- +g[w>>2]);h[o+24>>3]=v;o=c[p>>2]|0;m=c[l>>2]|0;v=r+(+h[m+80>>3]+ +g[t>>2]);h[o+32>>3]=q+(+h[m+96>>3]+ +g[w>>2]);h[o+40>>3]=v;o=c[p>>2]|0;p=c[l>>2]|0;v=r+(-0.0- +h[p+80>>3]- +g[t>>2]);h[o+48>>3]=q+(+h[p+96>>3]+ +g[w>>2]);h[o+56>>3]=v;y=n;i=f;return y|0}}else if((k|0)==2){n=b+8|0;o=c[(c[n>>2]|0)+12>>2]|0;v=+h[o+16>>3];q=+h[o+24>>3];r=+h[o+32>>3];s=+h[o+40>>3];o=jk(8)|0;w=o;c[o+4>>2]=4;p=jk(64)|0;t=o;c[t>>2]=p;o=c[n>>2]|0;z=+h[o+16>>3];A=+h[o+24>>3];o=d|0;B=+g[o>>2];if((a[d+8|0]|0)==0){n=d+4|0;C=A+q*+g[n>>2];h[p>>3]=z+v*B;h[p+8>>3]=C;l=c[t>>2]|0;C=A+s*+g[n>>2];h[l+16>>3]=z+v*+g[o>>2];h[l+24>>3]=C;l=c[t>>2]|0;C=A+s*+g[n>>2];h[l+32>>3]=z+r*+g[o>>2];h[l+40>>3]=C;l=c[t>>2]|0;C=A+q*+g[n>>2];h[l+48>>3]=z+r*+g[o>>2];h[l+56>>3]=C;y=w;i=f;return y|0}else{l=d+4|0;C=A+(q- +g[l>>2]);h[p>>3]=z+(v-B);h[p+8>>3]=C;p=c[t>>2]|0;C=A+(s+ +g[l>>2]);h[p+16>>3]=z+(v- +g[o>>2]);h[p+24>>3]=C;p=c[t>>2]|0;C=A+(s+ +g[l>>2]);h[p+32>>3]=z+(r+ +g[o>>2]);h[p+40>>3]=C;p=c[t>>2]|0;C=A+(q- +g[l>>2]);h[p+48>>3]=z+(r+ +g[o>>2]);h[p+56>>3]=C;y=w;i=f;return y|0}}else if((k|0)==1|(k|0)==3){k=jk(8)|0;w=k;p=b+8|0;b=c[p>>2]|0;o=c[b+12>>2]|0;do{if(e<<24>>24==0){l=c[o+8>>2]|0;if((l|0)>2){D=0.0;E=+g[d>>2];F=+g[d+4>>2];G=l;H=c[o+44>>2]|0;I=1;break}else{D=+wn()*.01;E=0.0;F=0.0;G=8;H=0;I=0;break}}else{C=+h[b+88>>3];r=-0.0-C;z=+h[b+80>>3];q=z*-.5;h[j>>3]=r;h[j+8>>3]=q;h[j+16>>3]=C;h[j+24>>3]=q;q=z*.5;h[j+32>>3]=C;h[j+40>>3]=q;h[j+48>>3]=r;h[j+56>>3]=q;D=0.0;E=0.0;F=0.0;G=4;H=j|0;I=1}}while(0);c[k+4>>2]=G;j=k;c[j>>2]=jk(G<<4)|0;if((G|0)<=0){y=w;i=f;return y|0}q=+(G|0);k=d+8|0;b=d|0;o=d+4|0;d=(G|0)==4;r=-0.0-E;C=-0.0-F;if((I|0)==0){I=0;while(1){z=D+ +(I|0)*6.283185307179586/q;A=+V(z);s=+W(z);if((a[k]|0)==0){e=c[p>>2]|0;J=A*+g[b>>2]*(+h[e+88>>3]+ +h[e+96>>3]);K=+h[e+80>>3]*s*+g[o>>2]}else{e=c[p>>2]|0;J=A*(+h[e+88>>3]+ +h[e+96>>3]+ +g[b>>2]);K=s*(+h[e+80>>3]+ +g[o>>2])}e=G-I-1|0;h[(c[j>>2]|0)+(e<<4)>>3]=J*.5+ +h[(c[p>>2]|0)+16>>3];h[(c[j>>2]|0)+(e<<4)+8>>3]=K*.5+ +h[(c[p>>2]|0)+24>>3];e=I+1|0;if((e|0)<(G|0)){I=e}else{y=w;break}}i=f;return y|0}else{L=0}while(1){do{if((a[k]|0)==0){M=F*+h[H+(L<<4)+8>>3];N=E*+h[H+(L<<4)>>3]}else{if(!d){K=+h[H+(L<<4)>>3];J=+h[H+(L<<4)+8>>3];q=+T(K*K+J*J);M=J*(F/q+1.0);N=K*(E/q+1.0);break}if((L|0)==2){O=C;P=r}else if((L|0)==1){O=F;P=r}else if((L|0)==3){O=C;P=E}else if((L|0)==0){O=F;P=E}else{O=0.0;P=0.0}M=O+ +h[H+(L<<4)+8>>3];N=P+ +h[H+(L<<4)>>3]}}while(0);I=G-L-1|0;h[(c[j>>2]|0)+(I<<4)>>3]=N+ +h[(c[p>>2]|0)+16>>3];h[(c[j>>2]|0)+(I<<4)+8>>3]=M+ +h[(c[p>>2]|0)+24>>3];I=L+1|0;if((I|0)<(G|0)){L=I}else{y=w;break}}i=f;return y|0}else{y=0;i=f;return y|0}return 0}function It(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;g=i;i=i+8|0;f=g|0;j=f;k=i;i=i+16|0;l=i;i=i+16|0;m=c[b>>2]&3;n=(c[((m|0)==3?b:b+32|0)+28>>2]|0)+8|0;o=c[n>>2]|0;p=c[b+8>>2]|0;q=+h[o+24>>3]+ +h[p+24>>3];h[k>>3]=+h[o+16>>3]+ +h[p+16>>3];h[k+8>>3]=q;o=(c[((m|0)==2?b:b-32|0)+28>>2]|0)+8|0;b=c[o>>2]|0;q=+h[b+24>>3]+ +h[p+64>>3];h[l>>3]=+h[b+16>>3]+ +h[p+56>>3];h[l+8>>3]=q;if((e|0)==0){r=-1111;s=-1111;t=KB(d,k,s,l,r,j)|0;u=a;v=f|0;w=c[v>>2]|0;x=f+4|0;y=c[x>>2]|0;z=u|0;c[z>>2]=w;A=u+4|0;c[A>>2]=y;i=g;return}r=c[(c[o>>2]|0)+284>>2]|0;s=c[(c[n>>2]|0)+284>>2]|0;t=KB(d,k,s,l,r,j)|0;u=a;v=f|0;w=c[v>>2]|0;x=f+4|0;y=c[x>>2]|0;z=u|0;c[z>>2]=w;A=u+4|0;c[A>>2]=y;i=g;return}function Jt(a,b,e,f,g){a=a|0;b=b|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0;h=i;i=i+8|0;j=h|0;k=j;l=i;i=i+8|0;m=i;i=i+32|0;n=i;i=i+16|0;p=i;i=i+16|0;q=(c[b+8>>2]|0)+144|0;r=c[q>>2]|0;s=c[q+4>>2]|0;c[j>>2]=r;c[j+4>>2]=s;j=r;r=n;q=j;c[r>>2]=c[q>>2];c[r+4>>2]=c[q+4>>2];c[r+8>>2]=c[q+8>>2];c[r+12>>2]=c[q+12>>2];q=p;r=j+(s-1<<4)|0;c[q>>2]=c[r>>2];c[q+4>>2]=c[r+4>>2];c[q+8>>2]=c[r+8>>2];c[q+12>>2]=c[r+12>>2];do{if(g<<24>>24==0){t=-1111;u=-1111;v=8}else{if((f|0)>0){w=0;x=-1111;y=-1111}else{v=9;break}while(1){if((x|0)==-1111){r=(LB(c[e+(w<<2)>>2]|0,n)|0)==0;z=r?-1111:w}else{z=x}if((y|0)==-1111){r=(LB(c[e+(w<<2)>>2]|0,p)|0)==0;A=r?-1111:w}else{A=y}r=w+1|0;if((r|0)<(f|0)){w=r;x=z;y=A}else{t=A;u=z;v=8;break}}}}while(0);do{if((v|0)==8){if((f|0)>0){B=0;C=0}else{v=9;break}while(1){if((C|0)==(u|0)|(C|0)==(t|0)){D=B}else{D=(c[(c[e+(C<<2)>>2]|0)+4>>2]|0)+B|0}z=C+1|0;if((z|0)<(f|0)){B=D;C=z}else{break}}z=kk(D<<5)|0;A=0;y=0;while(1){do{if((y|0)==(u|0)|(y|0)==(t|0)){E=A}else{x=e+(y<<2)|0;w=c[x>>2]|0;g=c[w+4>>2]|0;if((g|0)>0){F=0;G=A;H=w;I=g}else{E=A;break}while(1){g=F+1|0;w=z+(G<<5)|0;r=(c[H>>2]|0)+(F<<4)|0;c[w>>2]=c[r>>2];c[w+4>>2]=c[r+4>>2];c[w+8>>2]=c[r+8>>2];c[w+12>>2]=c[r+12>>2];r=z+(G<<5)+16|0;w=(c[c[x>>2]>>2]|0)+(((g|0)<(I|0)?g:0)<<4)|0;c[r>>2]=c[w>>2];c[r+4>>2]=c[w+4>>2];c[r+8>>2]=c[w+8>>2];c[r+12>>2]=c[w+12>>2];w=G+1|0;r=c[x>>2]|0;q=c[r+4>>2]|0;if((g|0)<(q|0)){F=g;G=w;H=r;I=q}else{E=w;break}}}}while(0);x=y+1|0;if((x|0)<(f|0)){A=E;y=x}else{break}}if((E|0)==(D|0)){J=z;K=D;break}cc(151464,108624,79,170376)}}while(0);if((v|0)==9){J=kk(0)|0;K=0}vF(m|0,0,32)|0;if((MB(J,K,k,m|0,l)|0)<0){m=b;k=$w(c[((c[m>>2]&3|0)==3?b:b+32|0)+28>>2]|0)|0;K=$w(c[((c[m>>2]&3|0)==2?b:b-32|0)+28>>2]|0)|0;Fv(1,127880,(L=i,i=i+16|0,c[L>>2]=k,c[L+8>>2]=K,L)|0)|0;i=L;i=h;return}if((d[213992]|0)>>>0>1>>>0){K=c[o>>2]|0;k=b;m=$w(c[((c[k>>2]&3|0)==3?b:b+32|0)+28>>2]|0)|0;v=b-32|0;D=$w(c[((c[k>>2]&3|0)==2?b:v)+28>>2]|0)|0;gc(K|0,159536,(L=i,i=i+16|0,c[L>>2]=m,c[L+8>>2]=D,L)|0)|0;i=L;M=k;N=v}else{M=b;N=b-32|0}cm(b,c[((c[M>>2]&3|0)==2?b:N)+28>>2]|0,c[l>>2]|0,c[l+4>>2]|0,11832);eF(J);nm(a,b,n,p);i=h;return}function Kt(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0.0,z=0.0,A=0.0,B=0.0,C=0,D=0,E=0.0,F=0.0,G=0.0,H=0.0,I=0;f=i;i=i+96|0;g=f|0;j=f+64|0;k=f+80|0;pr(k,a);l=j;m=k;c[l>>2]=c[m>>2];c[l+4>>2]=c[m+4>>2];c[l+8>>2]=c[m+8>>2];m=ux(a)|0;if((m|0)!=0){l=m;do{m=mw(a,l)|0;if((m|0)!=0){k=m;do{yl(k);k=ow(a,k)|0;}while((k|0)!=0)}l=vx(a,l)|0;}while((l|0)!=0)}l=$g(28664,c[43330]|0)|0;k=ux(a)|0;if((k|0)!=0){m=g;n=g+8|0;o=g+16|0;p=g+24|0;q=g+32|0;r=g+40|0;s=g+48|0;t=g+56|0;g=l|0;u=k;do{k=mw(a,u)|0;if((k|0)!=0){v=k;do{k=c[v>>2]&3;w=c[((k|0)==3?v:v+32|0)+28>>2]|0;x=c[((k|0)==2?v:v-32|0)+28>>2]|0;do{if(w>>>0<x>>>0){k=c[v+8>>2]|0;y=+h[k+24>>3];z=+h[k+16>>3];A=+h[k+64>>3];B=+h[k+56>>3];C=x;D=w}else{k=c[v+8>>2]|0;if(w>>>0>x>>>0){y=+h[k+64>>3];z=+h[k+56>>3];A=+h[k+24>>3];B=+h[k+16>>3];C=w;D=x;break}E=+h[k+56>>3];F=+h[k+64>>3];G=+h[k+16>>3];H=+h[k+24>>3];if(G<E){y=H;z=G;A=F;B=E;C=w;D=w;break}if(G>E){y=F;z=E;A=H;B=G;C=w;D=w;break}if(H<F){y=H;z=G;A=F;B=E;C=w;D=w;break}k=H>F;y=k?F:H;z=k?E:G;A=H;B=G;C=w;D=w}}while(0);c[n>>2]=D;h[o>>3]=z;h[p>>3]=y;c[q>>2]=C;h[r>>3]=B;h[s>>3]=A;c[t>>2]=v;w=c[(Hc[c[g>>2]&63](l,m,1)|0)+56>>2]|0;if((w|0)!=(v|0)){x=w+8|0;w=(c[x>>2]|0)+168|0;b[w>>1]=(b[w>>1]|0)+1;c[(c[v+8>>2]|0)+172>>2]=c[(c[x>>2]|0)+172>>2];c[(c[x>>2]|0)+172>>2]=v}v=ow(a,v)|0;}while((v|0)!=0)}u=vx(a,u)|0;}while((u|0)!=0)}Vg(l)|0;if((Hc[d&63](a,j,e)|0)!=0){I=1;i=f;return I|0}c[53522]=1;I=0;i=f;return I|0}function Lt(a,b){a=a|0;b=b|0;return Kt(a,4,b)|0}function Mt(e,f,j){e=e|0;f=f|0;j=j|0;var k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0.0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0;k=i;i=i+120|0;l=k|0;m=k+8|0;n=k+16|0;p=k+32|0;q=k+48|0;r=k+56|0;s=k+72|0;t=k+88|0;u=k+104|0;v=(c[53566]|0)>1;do{if((j|0)>5){w=jk((Lw(e)|0)<<2)|0;x=w;y=ux(e)|0;if((y|0)==0){z=0}else{A=(j|0)==8|0;B=0;C=y;while(1){y=Ht(C,f,A)|0;D=(c[C+8>>2]|0)+284|0;if((y|0)==0){c[D>>2]=-1111;E=B}else{c[D>>2]=B;c[x+(B<<2)>>2]=y;E=B+1|0}y=vx(e,C)|0;if((y|0)==0){z=E;break}else{B=E;C=y}}}if((w|0)==0){F=0;G=0;H=z;I=0;J=0;break}C=Hs(x,z)|0;B=(j|0)==8;if((C|0)!=0){if(B){F=C;G=0;H=z;I=x;J=1;break}F=C;G=IB(x,z)|0;H=z;I=x;J=1;break}if(B){Fv(0,97328,(K=i,i=i+1|0,i=i+7&-8,c[K>>2]=0,K)|0)|0;i=K;F=0;G=0;H=z;I=x;J=1;break}else{L=+g[f+4>>2];Fv(0,91824,(K=i,i=i+16|0,h[K>>3]=+g[f>>2],h[K+8>>3]=L,K)|0)|0;i=K;F=0;G=0;H=z;I=x;J=1;break}}else{F=0;G=0;H=0;I=0;J=0}}while(0);if((a[213992]|0)!=0){z=c[o>>2]|0;do{if((F|0)!=0&(j|0)==8){M=81792}else{if((G|0)==0){M=159792;break}M=(j|0)==10?168024:163872}}while(0);gc(z|0,86592,(K=i,i=i+8|0,c[K>>2]=M,K)|0)|0;i=K}M=(G|0)!=0;do{if(M){z=ux(e)|0;if((z|0)==0){break}F=q;f=r|0;E=r+8|0;B=s|0;C=s+8|0;A=z;do{z=mw(e,A)|0;if((z|0)!=0){y=z;do{z=c[y+8>>2]|0;D=c[y>>2]&3;N=(c[((D|0)==3?y:y+32|0)+28>>2]|0)+8|0;O=c[N>>2]|0;L=+h[O+24>>3]+ +h[z+24>>3];h[f>>3]=+h[O+16>>3]+ +h[z+16>>3];h[E>>3]=L;O=(c[((D|0)==2?y:y-32|0)+28>>2]|0)+8|0;D=c[O>>2]|0;L=+h[D+24>>3]+ +h[z+64>>3];h[B>>3]=+h[D+16>>3]+ +h[z+56>>3];h[C>>3]=L;KB(G,r,c[(c[N>>2]|0)+284>>2]|0,s,c[(c[O>>2]|0)+284>>2]|0,F)|0;O=c[q+4>>2]|0;N=z+144|0;c[N>>2]=c[q>>2];c[N+4>>2]=O;y=ow(e,y)|0;}while((y|0)!=0)}A=vx(e,A)|0;}while((A|0)!=0)}}while(0);q=ux(e)|0;if((q|0)==0){P=0}else{s=t|0;r=t+8|0;A=u|0;F=u+8|0;C=e+48|0;B=(j|0)==10;E=n;f=p;x=m;w=c[o>>2]|0;y=l|0;O=l+4|0;N=0;z=q;while(1){q=mw(e,z)|0;if((q|0)==0){Q=N}else{D=z+8|0;R=N;S=q;while(1){q=c[((c[S>>2]&3|0)==2?S:S-32|0)+28>>2]|0;T=S+8|0;U=c[T>>2]|0;do{if(v){if((c[U+8>>2]|0)==0){V=33;break}W=c[D>>2]|0;L=+h[W+24>>3]+ +h[U+24>>3];h[s>>3]=+h[W+16>>3]+ +h[U+16>>3];h[r>>3]=L;W=c[q+8>>2]|0;X=c[T>>2]|0;L=+h[W+24>>3]+ +h[X+64>>3];h[A>>3]=+h[W+16>>3]+ +h[X+56>>3];h[F>>3]=L;nm(e,S,t,u);Y=R}else{V=33}}while(0);do{if((V|0)==33){V=0;T=b[U+168>>1]|0;X=T<<16>>16;if(T<<16>>16==0){Y=R;break}if((z|0)==(q|0)){if((R|0)==0){T=jk(96)|0;c[T+84>>2]=jk(((Lw(e)|0)<<5)+11520|0)|0;Z=T}else{Z=R}Gt(Z,S,c[(c[(c[C>>2]|0)+8>>2]|0)+236>>2]|0);Y=Z;break}if(!M){ll(e,S,j,11832);Y=R;break}T=(a[215376]|0)!=0?1:X;if((T|0)>0){_=0;$=S}else{Y=R;break}while(1){if(B){Jt(e,$,I,H,1);aa=$+8|0}else{X=$+8|0;W=(c[X>>2]|0)+144|0;ba=c[W>>2]|0;ca=c[W+4>>2]|0;c[m>>2]=ba;c[m+4>>2]=ca;W=ba;ba=W;c[E>>2]=c[ba>>2];c[E+4>>2]=c[ba+4>>2];c[E+8>>2]=c[ba+8>>2];c[E+12>>2]=c[ba+12>>2];ba=W+(ca-1<<4)|0;c[f>>2]=c[ba>>2];c[f+4>>2]=c[ba+4>>2];c[f+8>>2]=c[ba+8>>2];c[f+12>>2]=c[ba+12>>2];ZB(x,l);ba=$;if((d[213992]|0)>>>0>1>>>0){ca=$w(c[((c[ba>>2]&3|0)==3?$:$+32|0)+28>>2]|0)|0;W=$-32|0;da=$w(c[((c[ba>>2]&3|0)==2?$:W)+28>>2]|0)|0;gc(w|0,154792,(K=i,i=i+16|0,c[K>>2]=ca,c[K+8>>2]=da,K)|0)|0;i=K;ea=W}else{ea=$-32|0}cm($,c[((c[ba>>2]&3|0)==2?$:ea)+28>>2]|0,c[y>>2]|0,c[O>>2]|0,11832);nm(e,$,n,p);aa=X}X=_+1|0;if((X|0)<(T|0)){_=X;$=c[(c[aa>>2]|0)+172>>2]|0}else{Y=R;break}}}}while(0);q=ow(e,S)|0;if((q|0)==0){Q=Y;break}else{R=Y;S=q}}}S=vx(e,z)|0;if((S|0)==0){P=Q;break}else{N=Q;z=S}}}if(M){JB(G)}if((P|0)!=0){eF(c[P+84>>2]|0);eF(P)}if(!J){i=k;return 0}if((H|0)>0){J=0;do{eF(c[I+(J<<2)>>2]|0);J=J+1|0;}while((J|0)<(H|0))}eF(I);i=k;return 0}function Nt(a){a=a|0;var d=0,e=0,f=0,g=0,h=0;d=i;e=b[(c[a+8>>2]|0)+128>>1]&14;Ot(a);if((e|0)==8){Fv(0,129344,(f=i,i=i+1|0,i=i+7&-8,c[f>>2]=0,f)|0)|0;i=f;f=a+48|0;g=(c[(c[f>>2]|0)+8>>2]|0)+128|0;b[g>>1]=b[g>>1]&-9;g=(c[(c[f>>2]|0)+8>>2]|0)+128|0;b[g>>1]=b[g>>1]|6;h=6}else if((e|0)==0){i=d;return}else{h=e}Kt(a,4,h)|0;i=d;return}function Ot(b){b=b|0;var d=0,e=0,f=0,g=0,i=0.0,j=0.0,k=0.0,l=0,m=0,n=0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0,u=0,v=0,w=0.0,x=0.0,y=0.0,z=0.0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;a:do{if((c[b+48>>2]|0)==(b|0)){d=b+8|0;e=c[d>>2]|0;f=c[e+8>>2]|0;g=c[f+84>>2]|0;if((g|0)==0){break}i=+h[e+16>>3];if(i<0.0){j=i+-.5}else{j=i+.5}if((~~j|0)!=0){cc(115816,108624,893,171072)}i=+h[e+24>>3];if(i<0.0){k=i+-.5}else{k=i+.5}if((~~k|0)!=0){cc(102968,108624,894,171072)}if((c[e+116>>2]&1|0)==0){l=e;m=f;n=g}else{g=e+32|0;i=+h[g>>3];h[g>>3]=+h[e+40>>3];h[(c[d>>2]|0)+40>>3]=i;e=c[d>>2]|0;d=c[e+8>>2]|0;l=e;m=d;n=c[d+84>>2]|0}do{if((n|0)==2){i=+h[m+64>>3];if(i<=0.0){break a}o=i/+h[l+32>>3];i=+h[m+72>>3]/+h[l+40>>3];if(!(o<1.0|i<1.0)){p=o;q=i;break}if(o<i){p=1.0;q=i/o;break}else{p=o/i;q=1.0;break}}else if((n|0)==1){i=+h[m+16>>3];o=+h[l+40>>3]/+h[l+32>>3];if(o<i){p=1.0;q=i/o;break}else{p=o/i;q=1.0;break}}else if((n|0)==5){i=+h[m+64>>3];if(i<=0.0){break a}o=i/+h[l+32>>3];i=+h[m+72>>3]/+h[l+40>>3];if(!(o>1.0&i>1.0)){break a}r=o<i?o:i;p=r;q=r}else{break a}}while(0);d=(c[l+116>>2]&1|0)==0;r=d?q:p;i=d?p:q;do{if((c[53566]|0)>1){d=ux(b)|0;if((d|0)==0){break}o=i+-1.0;s=r+-1.0;e=d;do{d=mw(b,e)|0;if((d|0)!=0){g=d;do{d=g+8|0;f=c[d>>2]|0;t=c[f+8>>2]|0;do{if((t|0)!=0){u=c[g>>2]&3;v=c[(c[(c[((u|0)==2?g:g-32|0)+28>>2]|0)+8>>2]|0)+132>>2]|0;w=o*+h[v>>3]*72.0;x=s*+h[v+8>>3]*72.0;v=c[(c[(c[((u|0)==3?g:g+32|0)+28>>2]|0)+8>>2]|0)+132>>2]|0;y=o*+h[v>>3]*72.0;z=s*+h[v+8>>3]*72.0;if((c[t+4>>2]|0)>0){v=c[t>>2]|0;u=0;while(1){A=v+4|0;B=c[A>>2]|0;if((B|0)>0){C=c[v>>2]|0;D=0;E=B;while(1){b:do{if((D|u|0)==0){B=C|0;h[B>>3]=y+ +h[B>>3];B=C+8|0;h[B>>3]=z+ +h[B>>3]}else{do{if((u|0)==((c[(c[(c[d>>2]|0)+8>>2]|0)+4>>2]|0)-1|0)){if((D|0)!=(E-1|0)){break}B=C|0;h[B>>3]=w+ +h[B>>3];B=C+8|0;h[B>>3]=x+ +h[B>>3];break b}}while(0);B=C|0;h[B>>3]=i*+h[B>>3];B=C+8|0;h[B>>3]=r*+h[B>>3]}}while(0);B=D+1|0;F=c[A>>2]|0;if((B|0)<(F|0)){C=C+16|0;D=B;E=F}else{break}}}if((c[v+8>>2]|0)!=0){E=v+16|0;h[E>>3]=y+ +h[E>>3];E=v+24|0;h[E>>3]=z+ +h[E>>3]}if((c[v+12>>2]|0)!=0){E=v+32|0;h[E>>3]=w+ +h[E>>3];E=v+40|0;h[E>>3]=x+ +h[E>>3]}E=u+1|0;D=c[d>>2]|0;if((E|0)<(c[(c[D+8>>2]|0)+4>>2]|0)){v=v+48|0;u=E}else{G=D;break}}}else{G=f}u=c[G+96>>2]|0;do{if((u|0)==0){H=G}else{if((a[u+81|0]|0)==0){H=G;break}v=u+56|0;h[v>>3]=i*+h[v>>3];v=(c[(c[d>>2]|0)+96>>2]|0)+64|0;h[v>>3]=r*+h[v>>3];H=c[d>>2]|0}}while(0);u=c[H+100>>2]|0;do{if((u|0)==0){I=H}else{if((a[u+81|0]|0)==0){I=H;break}v=u+56|0;h[v>>3]=w+ +h[v>>3];v=(c[(c[d>>2]|0)+100>>2]|0)+64|0;h[v>>3]=x+ +h[v>>3];I=c[d>>2]|0}}while(0);u=c[I+104>>2]|0;if((u|0)==0){break}if((a[u+81|0]|0)==0){break}v=u+56|0;h[v>>3]=y+ +h[v>>3];v=(c[(c[d>>2]|0)+104>>2]|0)+64|0;h[v>>3]=z+ +h[v>>3]}}while(0);g=ow(b,g)|0;}while((g|0)!=0)}e=vx(b,e)|0;}while((e|0)!=0)}}while(0);e=ux(b)|0;if((e|0)!=0){g=e;do{e=g+8|0;d=c[(c[e>>2]|0)+132>>2]|0;h[d>>3]=i*+h[d>>3];d=(c[(c[e>>2]|0)+132>>2]|0)+8|0;h[d>>3]=r*+h[d>>3];g=vx(b,g)|0;}while((g|0)!=0)}Rt(b,i,r)}}while(0);I=ux(b)|0;if((I|0)==0){return}else{J=I}do{I=J+8|0;H=c[I>>2]|0;h[H+16>>3]=+h[c[H+132>>2]>>3]*72.0;H=c[I>>2]|0;h[H+24>>3]=+h[(c[H+132>>2]|0)+8>>3]*72.0;J=vx(b,J)|0;}while((J|0)!=0);return}function Pt(a){a=a|0;var d=0,e=0,f=0,g=0.0,j=0.0,k=0,l=0,m=0;d=i;$m(a);e=a+8|0;f=c[e>>2]|0;g=+h[f+16>>3]/72.0;j=+h[f+24>>3]/72.0;f=ux(a)|0;if((f|0)!=0){k=f;do{f=k+8|0;l=c[(c[f>>2]|0)+132>>2]|0;h[l>>3]=+h[l>>3]-g;l=(c[(c[f>>2]|0)+132>>2]|0)+8|0;h[l>>3]=+h[l>>3]-j;k=vx(a,k)|0;}while((k|0)!=0)}k=c[e>>2]|0;Qt(a,+h[k+16>>3],+h[k+24>>3]);k=b[(c[e>>2]|0)+128>>1]&14;Ot(a);if((k|0)==0){i=d;return}else if((k|0)==8){Fv(0,129344,(e=i,i=i+1|0,i=i+7&-8,c[e>>2]=0,e)|0)|0;i=e;e=a+48|0;l=(c[(c[e>>2]|0)+8>>2]|0)+128|0;b[l>>1]=b[l>>1]&-9;l=(c[(c[e>>2]|0)+8>>2]|0)+128|0;b[l>>1]=b[l>>1]|6;m=6}else{m=k}Kt(a,4,m)|0;i=d;return}function Qt(a,b,d){a=a|0;b=+b;d=+d;var e=0,f=0,g=0,i=0;e=a+8|0;a=c[e>>2]|0;if((c[a+172>>2]|0)<1){f=a}else{g=1;i=a;while(1){Qt(c[(c[i+176>>2]|0)+(g<<2)>>2]|0,b,d);a=c[e>>2]|0;if((g|0)<(c[a+172>>2]|0)){g=g+1|0;i=a}else{f=a;break}}}i=f+32|0;h[i>>3]=+h[i>>3]-b;i=(c[e>>2]|0)+40|0;h[i>>3]=+h[i>>3]-d;i=(c[e>>2]|0)+16|0;h[i>>3]=+h[i>>3]-b;i=(c[e>>2]|0)+24|0;h[i>>3]=+h[i>>3]-d;return}function Rt(b,d,e){b=b|0;d=+d;e=+e;var f=0,g=0,i=0,j=0,k=0,l=0;f=b+8|0;b=(c[f>>2]|0)+32|0;h[b>>3]=+h[b>>3]*d;b=(c[f>>2]|0)+40|0;h[b>>3]=+h[b>>3]*e;b=(c[f>>2]|0)+16|0;h[b>>3]=+h[b>>3]*d;b=(c[f>>2]|0)+24|0;h[b>>3]=+h[b>>3]*e;b=c[f>>2]|0;g=c[b+12>>2]|0;do{if((g|0)==0){i=b}else{if((a[g+81|0]|0)==0){i=b;break}j=g+56|0;h[j>>3]=+h[j>>3]*d;j=(c[(c[f>>2]|0)+12>>2]|0)+64|0;h[j>>3]=+h[j>>3]*e;i=c[f>>2]|0}}while(0);if((c[i+172>>2]|0)<1){return}else{k=1;l=i}while(1){Rt(c[(c[l+176>>2]|0)+(k<<2)>>2]|0,d,e);i=c[f>>2]|0;if((k|0)<(c[i+172>>2]|0)){k=k+1|0;l=i}else{break}}return}function St(a){a=a|0;return 0}function Tt(a){a=a|0;return 0}function Ut(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0.0,y=0,z=0.0,A=0,B=0.0,C=0,D=0,E=0;g=kk(f<<2)|0;i=g;j=(f|0)>0;k=b<<3;if(j){l=0;do{c[i+(l<<2)>>2]=kk(k)|0;l=l+1|0;}while((l|0)<(f|0))}l=kk(f<<3)|0;m=l;n=kk(b<<2)|0;o=n;p=kk(da(k,b)|0)|0;k=(b|0)>0;do{if(k){q=0;r=p;while(1){c[o+(q<<2)>>2]=r;s=q+1|0;if((s|0)<(b|0)){q=s;r=r+(b<<3)|0}else{break}}if(!k){break}r=(d|0)>0;q=0;do{s=o+(q<<2)|0;t=a+(q<<2)|0;u=0;while(1){if(r){v=c[t>>2]|0;w=c[a+(u<<2)>>2]|0;x=0.0;y=0;while(1){z=x+ +(da(c[w+(y<<2)>>2]|0,c[v+(y<<2)>>2]|0)|0);A=y+1|0;if((A|0)<(d|0)){x=z;y=A}else{B=z;break}}}else{B=0.0}h[(c[o+(u<<2)>>2]|0)+(q<<3)>>3]=B;h[(c[s>>2]|0)+(u<<3)>>3]=B;if((u|0)<(q|0)){u=u+1|0}else{break}}q=q+1|0;}while((q|0)<(b|0))}}while(0);Ns(o,b,f,i,m,1)|0;if(!j){eF(g);eF(l);C=c[o>>2]|0;D=C;eF(D);eF(n);return}do{if((d|0)>0){m=0;do{p=e+(m<<2)|0;q=i+(m<<2)|0;if(k){r=0;do{u=c[q>>2]|0;B=0.0;s=0;do{B=B+ +(c[(c[a+(s<<2)>>2]|0)+(r<<2)>>2]|0)*+h[u+(s<<3)>>3];s=s+1|0;}while((s|0)<(b|0));h[(c[p>>2]|0)+(r<<3)>>3]=B;r=r+1|0;}while((r|0)<(d|0))}else{r=0;do{h[(c[p>>2]|0)+(r<<3)>>3]=0.0;r=r+1|0;}while((r|0)<(d|0))}m=m+1|0;}while((m|0)<(f|0));if(j){E=0;break}eF(g);eF(l);C=c[o>>2]|0;D=C;eF(D);eF(n);return}else{E=0}}while(0);do{eF(c[i+(E<<2)>>2]|0);E=E+1|0;}while((E|0)<(f|0));eF(g);eF(l);C=c[o>>2]|0;D=C;eF(D);eF(n);return}function Vt(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+40|0;g=f|0;h=f+8|0;j=f+16|0;k=f+24|0;c[g>>2]=e;c[j>>2]=0;c[k>>2]=0;zr(c[a>>2]|0,d,d<<2,h);Rs(c[h>>2]|0,a,d,b,j);Qs(a,c[j>>2]|0,b,d,b,k);eF(c[c[j>>2]>>2]|0);eF(c[j>>2]|0);j=(Ns(c[k>>2]|0,b,1,g,f+32|0,1)|0)&255;i=f;return j|0}function Wt(){c[44372]=0;eF(c[43678]|0);eF(c[43676]|0);eF(c[43674]|0);c[43678]=0;c[43676]=0;c[43674]=0;return}function Xt(a){a=a|0;eF(c[a+36>>2]|0);return}function Yt(b,d,e,f){b=b|0;d=d|0;e=+e;f=+f;var g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0.0,t=0,u=0.0,v=0,w=0,x=0.0,y=0.0,z=0.0,A=0,B=0,C=0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0;g=i;j=d+8|0;k=c[j>>2]|0;a:do{if((c[k+212>>2]|0)==0){l=pl(d)|0;if((l|0)==1){m=c[j>>2]|0;n=c[m+12>>2]|0;o=c[n+8>>2]|0;p=c[c[m+8>>2]>>2]|0;m=a[p]|0;do{if((m<<24>>24|0)==112){if((Ya(p|0,158472)|0)!=0){q=18;break}r=c[n+44>>2]|0;if((o|0)!=4){q=18;break}s=+h[r+8>>3];t=r+16|0;u=+h[r+24>>3];if(s==u){if(+h[r+40>>3]!=+h[r+56>>3]){q=18;break}if(+h[r>>3]!=+h[r+48>>3]){q=18;break}if(+h[t>>3]!=+h[r+32>>3]){q=18;break}}else{if(+h[r>>3]!=+h[t>>3]){q=21;break}if(+h[r+32>>3]!=+h[r+48>>3]){q=18;break}if(s!=+h[r+56>>3]){q=18;break}if(u!=+h[r+40>>3]){q=18;break}}c[b+40>>2]=1;q=22}else if((m<<24>>24|0)==98){if((Ya(p|0,121888)|0)!=0){q=18;break}c[b+40>>2]=1;q=22}else{q=18}}while(0);do{if((q|0)==18){if((o|0)>=3){q=21;break}if((c[n>>2]|0)==0){q=21;break}c[b+40>>2]=2}}while(0);if((q|0)==21){c[b+40>>2]=0;q=22}do{if((q|0)==22){if((o|0)<=2){break}p=kk(o<<4)|0;m=p;if((c[b+40>>2]|0)==1){r=n+44|0;u=e;h[p>>3]=u+ +h[c[r>>2]>>3]/72.0;s=f;h[p+8>>3]=s+ +h[(c[r>>2]|0)+8>>3]/72.0;h[p+16>>3]=+h[(c[r>>2]|0)+16>>3]/72.0-u;h[p+24>>3]=s+ +h[(c[r>>2]|0)+24>>3]/72.0;h[p+32>>3]=+h[(c[r>>2]|0)+32>>3]/72.0-u;h[p+40>>3]=+h[(c[r>>2]|0)+40>>3]/72.0-s;h[p+48>>3]=u+ +h[(c[r>>2]|0)+48>>3]/72.0;h[p+56>>3]=+h[(c[r>>2]|0)+56>>3]/72.0-s;v=m;w=o;break a}if((o|0)<=0){v=m;w=o;break a}r=n+44|0;s=e;u=f;p=0;while(1){t=c[r>>2]|0;x=+h[t+(p<<4)>>3];y=+h[t+(p<<4)+8>>3];z=+T(x*x+y*y);y=x*(s/z+1.0);t=m+(p<<4)|0;h[t>>3]=y;x=+h[(c[r>>2]|0)+(p<<4)+8>>3]*(u/z+1.0);h[t>>3]=y/72.0;h[m+(p<<4)+8>>3]=x/72.0;t=p+1|0;if((t|0)<(o|0)){p=t}else{v=m;w=o;break a}}}}while(0);o=ew(d|0,108448)|0;if((o|0)==0){A=0}else{A=Rb(o|0)|0}o=(A|0)<3?20:A;n=kk(o<<4)|0;if((o|0)<=0){v=n;w=o;break}u=e;s=+(o|0);x=f;m=0;while(1){y=+(m|0)/s*3.141592653589793*2.0;h[n+(m<<4)>>3]=(u+ +h[(c[j>>2]|0)+32>>3]*.5)*+V(y);h[n+(m<<4)+8>>3]=+W(y)*(x+ +h[(c[j>>2]|0)+40>>3]*.5);p=m+1|0;if((p|0)<(o|0)){m=p}else{v=n;w=o;break}}}else if((l|0)==2){o=kk(64)|0;n=c[(c[j>>2]|0)+12>>2]|0;x=+h[n+32>>3];u=+h[n+40>>3];s=-0.0-e+ +(~~+h[n+16>>3]|0)/72.0;y=-0.0-f+ +(~~+h[n+24>>3]|0)/72.0;h[o>>3]=s;h[o+8>>3]=y;z=e+ +(~~x|0)/72.0;h[o+16>>3]=z;h[o+24>>3]=y;y=f+ +(~~u|0)/72.0;h[o+32>>3]=z;h[o+40>>3]=y;h[o+48>>3]=s;h[o+56>>3]=y;c[b+40>>2]=1;v=o;w=4;break}else if((l|0)==3){c[b+40>>2]=2;o=ew(d|0,108448)|0;if((o|0)==0){B=0}else{B=Rb(o|0)|0}o=(B|0)<3?20:B;n=kk(o<<4)|0;if((o|0)<=0){v=n;w=o;break}y=e;s=+(o|0);z=f;m=0;while(1){u=+(m|0)/s*3.141592653589793*2.0;h[n+(m<<4)>>3]=(y+ +h[(c[j>>2]|0)+32>>3]*.5)*+V(u);h[n+(m<<4)+8>>3]=+W(u)*(z+ +h[(c[j>>2]|0)+40>>3]*.5);p=m+1|0;if((p|0)<(o|0)){m=p}else{v=n;w=o;break}}}else{Fv(1,128392,(o=i,i=i+8|0,c[o>>2]=c[c[(c[j>>2]|0)+8>>2]>>2],o)|0)|0;i=o;C=1;i=g;return C|0}}else{z=e+ +h[k+32>>3]*.5;y=f+ +h[k+40>>3]*.5;c[b+40>>2]=1;o=kk(64)|0;h[o>>3]=z;h[o+8>>3]=y;s=-0.0-z;h[o+16>>3]=s;h[o+24>>3]=y;h[o+32>>3]=s;s=-0.0-y;h[o+40>>3]=s;h[o+48>>3]=z;h[o+56>>3]=s;v=o;w=4}}while(0);c[b+36>>2]=v;c[b+32>>2]=w;f=+h[v>>3];e=+h[v+8>>3];if((w|0)>1){k=v;s=f;z=e;y=f;u=e;v=1;while(1){j=k+16|0;x=+h[j>>3];D=x<s?x:s;E=+h[k+24>>3];F=E<z?E:z;G=x>y?x:y;x=E>u?E:u;B=v+1|0;if((B|0)<(w|0)){k=j;s=D;z=F;y=G;u=x;v=B}else{H=D;I=F;J=G;K=x;break}}}else{H=f;I=e;J=f;K=e}h[b>>3]=H;h[b+8>>3]=I;h[b+16>>3]=J;h[b+24>>3]=K;if((w|0)<=(c[44372]|0)){C=0;i=g;return C|0}c[44372]=w;C=0;i=g;return C|0}function Zt(b,d,e,f){b=b|0;d=d|0;e=+e;f=+f;var g=0,j=0,k=0,l=0,m=0,n=0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,P=0.0;g=i;j=d+8|0;k=c[j>>2]|0;a:do{if((c[k+212>>2]|0)==0){l=pl(d)|0;if((l|0)==2){m=kk(64)|0;n=c[(c[j>>2]|0)+12>>2]|0;o=+h[n+32>>3];p=+h[n+40>>3];q=+h[n+16>>3]/72.0;r=+h[n+24>>3]/72.0;h[m>>3]=q;h[m+8>>3]=r;s=o/72.0;h[m+16>>3]=s;h[m+24>>3]=r;r=p/72.0;h[m+32>>3]=s;h[m+40>>3]=r;h[m+48>>3]=q;h[m+56>>3]=r;c[b+40>>2]=1;t=m;u=4;v=36;break}else if((l|0)==1){m=c[(c[j>>2]|0)+12>>2]|0;n=m+8|0;w=c[n>>2]|0;do{if((w|0)>2){x=kk(w<<4)|0;y=m+44|0;z=0;while(1){h[x+(z<<4)>>3]=+h[(c[y>>2]|0)+(z<<4)>>3]/72.0;h[x+(z<<4)+8>>3]=+h[(c[y>>2]|0)+(z<<4)+8>>3]/72.0;A=z+1|0;if((A|0)<(w|0)){z=A}else{B=x;C=w;break}}}else{x=ew(d|0,108448)|0;if((x|0)==0){D=0}else{D=Rb(x|0)|0}x=(D|0)<3?20:D;z=kk(x<<4)|0;if((x|0)<=0){B=z;C=x;break}r=+(x|0);y=0;while(1){q=+(y|0)/r*3.141592653589793*2.0;h[z+(y<<4)>>3]=(+h[(c[j>>2]|0)+32>>3]*.5+0.0)*+V(q);h[z+(y<<4)+8>>3]=+W(q)*(+h[(c[j>>2]|0)+40>>3]*.5+0.0);A=y+1|0;if((A|0)<(x|0)){y=A}else{B=z;C=x;break}}}}while(0);w=c[c[(c[j>>2]|0)+8>>2]>>2]|0;x=a[w]|0;do{if((x<<24>>24|0)==98){if((Ya(w|0,121888)|0)!=0){break}c[b+40>>2]=1;t=B;u=C;v=36;break a}else if((x<<24>>24|0)==112){if(!((Ya(w|0,158472)|0)==0&(C|0)==4)){break}r=+h[B+8>>3];z=B+16|0;q=+h[B+24>>3];if(r==q){if(+h[B+40>>3]!=+h[B+56>>3]){break}if(+h[B>>3]!=+h[B+48>>3]){break}if(+h[z>>3]!=+h[B+32>>3]){break}}else{if(+h[B>>3]!=+h[z>>3]){break}if(+h[B+32>>3]!=+h[B+48>>3]){break}if(r!=+h[B+56>>3]){break}if(q!=+h[B+40>>3]){break}}c[b+40>>2]=1;t=B;u=4;v=36;break a}}while(0);do{if((c[n>>2]|0)<3){if((c[m>>2]|0)==0){break}c[b+40>>2]=2;t=B;u=C;v=36;break a}}while(0);c[b+40>>2]=0;t=B;u=C;v=36;break}else if((l|0)==3){c[b+40>>2]=2;m=ew(d|0,108448)|0;if((m|0)==0){E=0}else{E=Rb(m|0)|0}m=(E|0)<3?20:E;n=kk(m<<4)|0;if((m|0)<=0){F=m;G=n;break}q=+(m|0);w=0;while(1){r=+(w|0)/q*3.141592653589793*2.0;h[n+(w<<4)>>3]=(+h[(c[j>>2]|0)+32>>3]*.5+0.0)*+V(r);h[n+(w<<4)+8>>3]=+W(r)*(+h[(c[j>>2]|0)+40>>3]*.5+0.0);x=w+1|0;if((x|0)<(m|0)){w=x}else{t=n;u=m;v=36;break}}}else{Fv(1,115584,(m=i,i=i+8|0,c[m>>2]=c[c[(c[j>>2]|0)+8>>2]>>2],m)|0)|0;i=m;H=1;i=g;return H|0}}else{q=+h[k+32>>3]*.5;r=+h[k+40>>3]*.5;c[b+40>>2]=1;m=kk(64)|0;h[m>>3]=q;h[m+8>>3]=r;s=-0.0-q;h[m+16>>3]=s;h[m+24>>3]=r;h[m+32>>3]=s;s=-0.0-r;h[m+40>>3]=s;h[m+48>>3]=q;h[m+56>>3]=s;t=m;u=4;v=36}}while(0);do{if((v|0)==36){if(!((e!=1.0|f!=1.0)&(u|0)>0)){F=u;G=t;break}s=e;q=f;k=0;j=t;while(1){E=j|0;h[E>>3]=s*+h[E>>3];E=j+8|0;h[E>>3]=q*+h[E>>3];E=k+1|0;if((E|0)<(u|0)){k=E;j=j+16|0}else{F=u;G=t;break}}}}while(0);c[b+36>>2]=G;c[b+32>>2]=F;f=+h[G>>3];e=+h[G+8>>3];if((F|0)>1){t=G;q=f;s=e;r=f;p=e;G=1;while(1){u=t+16|0;o=+h[u>>3];I=o<q?o:q;J=+h[t+24>>3];K=J<s?J:s;L=o>r?o:r;o=J>p?J:p;v=G+1|0;if((v|0)<(F|0)){t=u;q=I;s=K;r=L;p=o;G=v}else{M=I;N=K;O=L;P=o;break}}}else{M=f;N=e;O=f;P=e}h[b>>3]=M;h[b+8>>3]=N;h[b+16>>3]=O;h[b+24>>3]=P;if((F|0)<=(c[44372]|0)){H=0;i=g;return H|0}c[44372]=F;H=0;i=g;return H|0}function _t(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0.0,y=0.0,z=0.0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0;f=i;i=i+112|0;g=a;a=i;i=i+16|0;c[a>>2]=c[g>>2];c[a+4>>2]=c[g+4>>2];c[a+8>>2]=c[g+8>>2];c[a+12>>2]=c[g+12>>2];g=d;d=i;i=i+16|0;c[d>>2]=c[g>>2];c[d+4>>2]=c[g+4>>2];c[d+8>>2]=c[g+8>>2];c[d+12>>2]=c[g+12>>2];g=f|0;j=f+16|0;k=f+32|0;l=f+48|0;m=f+64|0;n=f+80|0;o=f+96|0;as(l,a,b|0);p=b+16|0;as(m,a,p);as(n,d,e|0);q=e+16|0;as(o,d,q);r=l|0;s=l+8|0;l=m|0;t=m+8|0;m=n|0;u=n+8|0;n=o|0;v=o+8|0;if(+h[r>>3]>+h[n>>3]|+h[m>>3]>+h[l>>3]|+h[s>>3]>+h[v>>3]){w=0;i=f;return w|0}if(+h[u>>3]>+h[t>>3]){w=0;i=f;return w|0}o=c[b+40>>2]|0;do{if((o&1|0)!=0){if((c[e+40>>2]&1|0)==0){break}else{w=1}i=f;return w|0}}while(0);do{if((o&2|0)!=0){if((c[e+40>>2]&2|0)==0){break}x=+h[p>>3]- +h[b>>3]+ +h[q>>3]- +h[e>>3];y=+h[a>>3]- +h[d>>3];z=+h[a+8>>3]- +h[d+8>>3];w=y*y+z*z<=x*x*.25|0;i=f;return w|0}}while(0);if((c[43678]|0)==0){c[43678]=kk(c[44372]<<4)|0;c[43676]=kk(c[44372]<<4)|0}q=b+32|0;p=c[q>>2]|0;x=+h[a>>3];z=+h[a+8>>3];if((p|0)>0){a=c[b+36>>2]|0;b=c[43678]|0;o=0;while(1){h[b>>3]=x+ +h[a>>3];h[b+8>>3]=z+ +h[a+8>>3];A=o+1|0;if((A|0)<(p|0)){a=a+16|0;b=b+16|0;o=A}else{break}}}o=e+32|0;b=c[o>>2]|0;z=+h[d>>3];x=+h[d+8>>3];if((b|0)>0){d=c[43676]|0;a=c[e+36>>2]|0;e=d;p=0;while(1){h[e>>3]=z+ +h[a>>3];h[e+8>>3]=x+ +h[a+8>>3];A=p+1|0;if((A|0)<(b|0)){a=a+16|0;e=e+16|0;p=A}else{break}}B=c[o>>2]|0;C=d}else{B=b;C=c[43676]|0}b=c[43678]|0;d=c[q>>2]|0;p=d-1|0;e=B-1|0;a=d<<1;A=B<<1;D=0;E=0;F=0;G=0;while(1){H=b+(D<<4)|0;I=b+(((p+D|0)%(d|0)|0)<<4)|0;$r(g,H,I);J=C+(E<<4)|0;K=C+(((e+E|0)%(B|0)|0)<<4)|0;$r(j,J,K);x=+bs(177e3,g,j);L=cs(I,H,J)|0;M=cs(K,J,H)|0;if((ds(I,H,K,J,k)|0)!=0){w=1;N=36;break}J=(L|0)==0;L=(M|0)==0;do{if(x==0.0&J&L){O=(D+1|0)%(d|0)|0;P=E;Q=F+1|0;R=G}else{if(x<0.0){if(L){O=(D+1|0)%(d|0)|0;P=E;Q=F+1|0;R=G;break}else{O=D;P=(E+1|0)%(B|0)|0;Q=F;R=G+1|0;break}}else{if(J){O=D;P=(E+1|0)%(B|0)|0;Q=F;R=G+1|0;break}else{O=(D+1|0)%(d|0)|0;P=E;Q=F+1|0;R=G;break}}}}while(0);if(((Q|0)<(d|0)|(R|0)<(B|0))&(Q|0)<(a|0)&(R|0)<(A|0)){D=O;E=P;F=Q;G=R}else{break}}if((N|0)==36){i=f;return w|0}N=c[43678]|0;x=+h[N>>3];z=+h[N+8>>3];do{if(!(x>+h[n>>3]|x<+h[m>>3]|z>+h[v>>3])){if(z<+h[u>>3]){break}if(($t(c[43676]|0,c[o>>2]|0,x,z)|0)==0){break}else{w=1}i=f;return w|0}}while(0);o=c[43676]|0;z=+h[o>>3];x=+h[o+8>>3];if(z>+h[l>>3]|z<+h[r>>3]|x>+h[t>>3]){w=0;i=f;return w|0}if(x<+h[s>>3]){w=0;i=f;return w|0}w=($t(c[43678]|0,c[q>>2]|0,z,x)|0)!=0|0;i=f;return w|0}function $t(a,b,d,e){a=a|0;b=b|0;d=+d;e=+e;var f=0,g=0,i=0,j=0.0,k=0,l=0.0,m=0,n=0.0,o=0,p=0,q=0,r=0.0,s=0.0,t=0.0;f=c[43674]|0;if((f|0)==0){g=kk(c[44372]<<4)|0;c[43674]=g;i=g}else{i=f}f=(b|0)>0;a:do{if(f){g=0;do{h[i+(g<<4)>>3]=+h[a+(g<<4)>>3]-d;h[i+(g<<4)+8>>3]=+h[a+(g<<4)+8>>3]-e;g=g+1|0;}while((g|0)<(b|0));if(!f){j=0.0;break}g=b-1|0;k=0;l=0.0;b:while(1){m=(g+k|0)%(b|0)|0;n=+h[i+(k<<4)+8>>3];o=n==0.0;do{if(o){if(+h[i+(m<<4)+8>>3]!=0.0){p=10;break}if(+h[i+(k<<4)>>3]*+h[i+(m<<4)>>3]<0.0){q=1;p=19;break b}else{r=l}}else{p=10}}while(0);do{if((p|0)==10){p=0;s=+h[i+(m<<4)+8>>3];if(n<0.0|s>0.0){if(s<0.0|n>0.0){r=l;break}}t=(+h[i+(k<<4)>>3]*s- +h[i+(m<<4)>>3]*n)/(s-n);if(t==0.0){q=1;p=19;break b}if(t<=0.0){r=l;break}if(o|s==0.0){r=l+.5;break}else{r=l+1.0;break}}}while(0);o=k+1|0;if((o|0)<(b|0)){k=o;l=r}else{j=r;break a}}if((p|0)==19){return q|0}}else{j=0.0}}while(0);q=((~~j|0)%2|0|0)==1|0;return q|0}function au(){nt(175056,24);c[44268]=0;return}function bu(){return ot(175056)|0}function cu(a,b){a=a|0;b=b|0;var c=0.0,d=0.0;c=+h[a>>3]- +h[b>>3];d=+h[a+8>>3]- +h[b+8>>3];return+(+T(c*c+d*d))}function du(a){a=a|0;c[a+16>>2]=c[44268];c[44268]=(c[44268]|0)+1;return}function eu(a){a=a|0;var b=0,d=0;b=a+20|0;d=(c[b>>2]|0)-1|0;c[b>>2]=d;if((d|0)!=0){return}pt(a,175056);return}function fu(a){a=a|0;var b=0;b=a+20|0;c[b>>2]=(c[b>>2]|0)+1;return}function gu(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0.0,u=0.0,v=0,w=0,x=0,y=0,z=0,A=0,B=0.0,C=0.0,D=0.0,E=0,F=0;e=da(d,d)|0;f=kk(e<<3)|0;g=f;i=kk(d<<3)|0;j=i;k=(d|0)>0;if(k){l=0;do{h[j+(l<<3)>>3]=+h[c+(l<<3)>>3];l=l+1|0;}while((l|0)<(d|0))}l=(e|0)==0;if(!l){m=0;do{h[g+(m<<3)>>3]=+h[a+(m<<3)>>3];m=m+1|0;}while((m|0)<(e|0))}m=d-1|0;n=(m|0)>0;a:do{if(n){o=0;p=0;while(1){q=(p|0)<(d|0);if(q){r=o;s=p;t=0.0}else{break a}do{u=+S(+(+h[a+((da(s,d)|0)+p<<3)>>3]));v=u<t;r=v?r:s;t=v?t:u;s=s+1|0;}while((s|0)<(d|0));if(t<1.0e-10){break a}if(q){v=da(r,d)|0;w=da(p,d)|0;x=p;do{y=a+(x+v<<3)|0;u=+h[y>>3];z=a+(x+w<<3)|0;h[y>>3]=+h[z>>3];h[z>>3]=u;x=x+1|0;}while((x|0)<(d|0))}x=c+(r<<3)|0;u=+h[x>>3];w=c+(p<<3)|0;h[x>>3]=+h[w>>3];h[w>>3]=u;x=p+1|0;b:do{if((x|0)<(d|0)){v=da(p,d)|0;q=a+(v+p<<3)|0;if(k){A=x;B=u}else{z=x;C=u;while(1){D=+h[a+((da(z,d)|0)+p<<3)>>3];y=c+(z<<3)|0;h[y>>3]=+h[y>>3]-D/+h[q>>3]*C;y=z+1|0;if((y|0)>=(d|0)){break b}z=y;C=+h[w>>3]}}while(1){z=da(A,d)|0;C=+h[a+(z+p<<3)>>3]/+h[q>>3];y=c+(A<<3)|0;h[y>>3]=+h[y>>3]-C*B;y=0;do{E=a+(y+z<<3)|0;h[E>>3]=+h[E>>3]-C*+h[a+(y+v<<3)>>3];y=y+1|0;}while((y|0)<(d|0));y=A+1|0;if((y|0)>=(d|0)){break b}A=y;B=+h[w>>3]}}}while(0);if((x|0)<(m|0)){o=r;p=x}else{F=21;break}}}else{F=21}}while(0);do{if((F|0)==21){B=+h[a+(e-1<<3)>>3];if(+S(+B)<1.0e-10){break}h[b+(m<<3)>>3]=+h[c+(m<<3)>>3]/B;if(n){r=0;do{A=d-r|0;s=A-2|0;B=+h[c+(s<<3)>>3];p=b+(s<<3)|0;h[p>>3]=B;o=da(s,d)|0;w=A-1|0;t=B;do{t=t- +h[a+(w+o<<3)>>3]*+h[b+(w<<3)>>3];h[p>>3]=t;w=w+1|0;}while((w|0)<(d|0));h[p>>3]=t/+h[a+(o+s<<3)>>3];r=r+1|0;}while((r|0)<(m|0))}if(k){r=0;do{h[c+(r<<3)>>3]=+h[j+(r<<3)>>3];r=r+1|0;}while((r|0)<(d|0))}if(!l){r=0;do{h[a+(r<<3)>>3]=+h[g+(r<<3)>>3];r=r+1|0;}while((r|0)<(e|0))}eF(f);eF(i);return}}while(0);ib(10408)|0;eF(f);eF(i);return}function hu(b,e,f,g,i){b=b|0;e=e|0;f=f|0;g=g|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0.0,y=0,z=0;b=c[g>>2]|0;j=c[g+4>>2]|0;a:do{if((e|0)>0){if((f|0)>2){k=b;l=j;m=0;n=0}else{o=b;p=j;q=0;r=0;while(1){s=(c[i+(q<<2)>>2]|0)+8|0;t=c[s>>2]|0;if((a[t+119|0]|0)==0){h[o>>3]=+wn();h[p>>3]=+wn();u=r}else{v=c[t+132>>2]|0;h[o>>3]=+h[v>>3];h[p>>3]=+h[v+8>>3];u=(d[(c[s>>2]|0)+119|0]|0)>>>0>1>>>0?1:r}s=q+1|0;if((s|0)<(e|0)){o=o+8|0;p=p+8|0;q=s;r=u}else{w=u;break a}}}while(1){r=(c[i+(m<<2)>>2]|0)+8|0;q=c[r>>2]|0;if((a[q+119|0]|0)==0){h[k>>3]=+wn();h[l>>3]=+wn();p=2;while(1){x=+wn();h[(c[g+(p<<2)>>2]|0)+(m<<3)>>3]=x;o=p+1|0;if((o|0)<(f|0)){p=o}else{y=n;break}}}else{p=c[q+132>>2]|0;h[k>>3]=+h[p>>3];h[l>>3]=+h[p+8>>3];o=p+16|0;p=2;while(1){h[(c[g+(p<<2)>>2]|0)+(m<<3)>>3]=+h[o>>3];s=p+1|0;if((s|0)<(f|0)){o=o+8|0;p=s}else{break}}y=(d[(c[r>>2]|0)+119|0]|0)>>>0>1>>>0?1:n}p=m+1|0;if((p|0)<(e|0)){k=k+8|0;l=l+8|0;m=p;n=y}else{w=y;break}}}else{w=0}}while(0);if((f|0)>0){z=0}else{return w|0}do{Ss(e,c[g+(z<<2)>>2]|0);z=z+1|0;}while((z|0)<(f|0));return w|0}function iu(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0.0,t=0,u=0,v=0,w=0,x=0.0;d=jk(((da(b+1|0,b)|0)/2|0)<<2)|0;e=d;f=pu(b,b,0.0)|0;i=pu(b,b,0.0)|0;j=(b|0)>0;do{if((c[a+8>>2]|0)==0){if(j){k=0}else{break}do{l=a+(k<<4)|0;if((c[l>>2]|0)>1){m=a+(k<<4)+4|0;n=f+(k<<2)|0;o=1;do{p=c[(c[m>>2]|0)+(o<<2)>>2]|0;h[(c[f+(p<<2)>>2]|0)+(k<<3)>>3]=-1.0;h[(c[n>>2]|0)+(p<<3)>>3]=-1.0;o=o+1|0;}while((o|0)<(c[l>>2]|0))}k=k+1|0;}while((k|0)<(b|0))}else{if(j){q=0}else{break}do{l=a+(q<<4)|0;if((c[l>>2]|0)>1){o=a+(q<<4)+4|0;n=a+(q<<4)+8|0;m=f+(q<<2)|0;p=1;do{r=c[(c[o>>2]|0)+(p<<2)>>2]|0;s=-1.0/+g[(c[n>>2]|0)+(p<<2)>>2];h[(c[f+(r<<2)>>2]|0)+(q<<3)>>3]=s;h[(c[m>>2]|0)+(r<<3)>>3]=s;p=p+1|0;}while((p|0)<(c[l>>2]|0))}q=q+1|0;}while((q|0)<(b|0))}}while(0);if((xr(b,f,i)|0)==0){eF(d);t=0;qu(f);qu(i);return t|0}if((b|0)>0){u=0;v=0;w=b}else{t=e;qu(f);qu(i);return t|0}while(1){d=i+(v<<2)|0;q=u;a=v;while(1){if((v|0)==(a|0)){x=0.0}else{j=c[d>>2]|0;x=+h[j+(v<<3)>>3]+ +h[(c[i+(a<<2)>>2]|0)+(a<<3)>>3]- +h[j+(a<<3)>>3]*2.0}g[e+(q<<2)>>2]=x;j=a+1|0;if((j|0)<(b|0)){q=q+1|0;a=j}else{break}}a=v+1|0;if((a|0)<(b|0)){u=u+w|0;v=a;w=w-1|0}else{t=e;break}}qu(f);qu(i);return t|0}function ju(b,d){b=b|0;d=d|0;var e=0,f=0,j=0,k=0,l=0,m=0.0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0.0,w=0,x=0.0,y=0,z=0,A=0.0,B=0.0,C=0.0;e=i;if((c[b+8>>2]|0)==0){f=0;i=e;return f|0}j=ku(b,d)|0;if((d|0)>0){k=0;l=0;m=0.0;while(1){n=l+k|0;p=b+(k<<4)|0;q=c[p>>2]|0;if((q|0)>1){r=b+(k<<4)+4|0;s=(da(k,d)|0)-n|0;t=b+(k<<4)+8|0;u=1;v=m;w=q;while(1){q=c[(c[r>>2]|0)+(u<<2)>>2]|0;if((q|0)<(k|0)){x=v;y=w}else{z=j+(s+q<<2)|0;A=+g[(c[t>>2]|0)+(u<<2)>>2];q=~~(+g[z>>2]-A);g[z>>2]=A;x=v+ +(((q|0)>-1?q:-q|0)|0);y=c[p>>2]|0}q=u+1|0;if((q|0)<(y|0)){u=q;v=x;w=y}else{B=x;break}}}else{B=m}w=k+1|0;if((w|0)<(d|0)){k=w;l=n;m=B}else{C=B;break}}}else{C=0.0}if((a[213992]|0)==0){f=j;i=e;return f|0}gc(c[o>>2]|0,119712,(l=i,i=i+8|0,h[l>>3]=C,l)|0)|0;i=l;f=j;i=e;return f|0}function ku(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;c=i;i=i+16|0;d=c|0;e=jk(((da(b+1|0,b)|0)/2|0)<<2)|0;f=jk(b<<2)|0;h=f;vr(d,b);if((b|0)>0){j=0;k=0;l=b}else{eF(f);wr(d);i=c;return e|0}while(1){Sr(k,a,b,h);m=j;n=k;while(1){g[e+(m<<2)>>2]=+g[h+(n<<2)>>2];o=n+1|0;if((o|0)<(b|0)){m=m+1|0;n=o}else{break}}n=k+1|0;if((n|0)<(b|0)){j=j+l|0;k=n;l=l-1|0}else{break}}eF(f);wr(d);i=c;return e|0}function lu(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;d=i;i=i+16|0;e=d|0;f=jk(((da(b+1|0,b)|0)/2|0)<<2)|0;h=jk(b<<2)|0;j=h;vr(e,b);if((b|0)>0){k=0;l=0;m=b}else{eF(h);wr(e);i=d;return f|0}while(1){ur(l,a,b,j,e);n=k;o=l;while(1){g[f+(n<<2)>>2]=+(c[j+(o<<2)>>2]|0);p=o+1|0;if((p|0)<(b|0)){n=n+1|0;o=p}else{break}}o=l+1|0;if((o|0)<(b|0)){k=k+m|0;l=o;m=m-1|0}else{break}}eF(h);wr(e);i=d;return f|0}function mu(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0.0,q=0,r=0,s=0.0,t=0,u=0,v=0,w=0,x=0,y=0.0,z=0,A=0;d=a+8|0;e=c[d>>2]|0;f=(b|0)>0;if(f){h=0;i=0;do{i=(c[a+(h<<4)>>2]|0)+i|0;h=h+1|0;}while((h|0)<(b|0));j=i<<2}else{j=0}i=jk(j)|0;j=b<<2;h=jk(j)|0;k=h;if(f){vF(h|0,0,j|0)|0}if((c[d>>2]|0)==0){if(f){j=0;l=i;while(1){c[a+(j<<4)+8>>2]=l;As(a,j,k);m=a+(j<<4)|0;n=c[m>>2]|0;o=n-1|0;if((n|0)>=2){n=a+(j<<4)+4|0;p=+(o|0);q=1;while(1){r=c[(c[n>>2]|0)+(q<<2)>>2]|0;s=p+ +((c[a+(r<<4)>>2]|0)-1|0);g[l+(q<<2)>>2]=s- +((zs(a,j,r,k)|0)<<1|0);if((q|0)<(o|0)){q=q+1|0}else{break}}}Bs(a,j,k);q=j+1|0;if((q|0)<(b|0)){j=q;l=l+(c[m>>2]<<2)|0}else{break}}}t=lu(a,b)|0}else{if(f){l=0;j=i;while(1){As(a,l,k);i=a+(l<<4)|0;q=c[i>>2]|0;o=q-1|0;if((q|0)<2){u=a+(l<<4)+8|0}else{n=a+(l<<4)+4|0;r=q-2|0;q=a+(l<<4)+8|0;v=1;while(1){w=c[(c[n>>2]|0)+(v<<2)>>2]|0;x=r+(c[a+(w<<4)>>2]|0)|0;p=+(x-((zs(a,l,w,k)|0)<<1)|0);s=+g[(c[q>>2]|0)+(v<<2)>>2];if(p>s){y=+(x-((zs(a,l,w,k)|0)<<1)|0)}else{y=s}g[j+(v<<2)>>2]=y;if((v|0)<(o|0)){v=v+1|0}else{u=q;break}}}Bs(a,l,k);c[u>>2]=j;q=l+1|0;if((q|0)<(b|0)){l=q;j=j+(c[i>>2]<<2)|0}else{break}}}t=ku(a,b)|0}eF(h);eF(c[d>>2]|0);c[d>>2]=0;if((e|0)==0|f^1){return t|0}else{z=0;A=e}do{c[a+(z<<4)+8>>2]=A;A=A+(c[a+(z<<4)>>2]<<2)|0;z=z+1|0;}while((z|0)<(b|0));return t|0}function nu(b,e,f,j,k,l,m,n,p){b=b|0;e=e|0;f=f|0;j=j|0;k=k|0;l=l|0;m=m|0;n=n|0;p=p|0;var q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0.0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0.0,za=0.0,Aa=0.0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0.0,Ia=0.0,Ja=0.0,La=0.0,Na=0,Oa=0,Pa=0.0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,_a=0,$a=0,ab=0.0,bb=0,cb=0,db=0,eb=0.0,fb=0,gb=0,hb=0.0,ib=0.0,jb=0,kb=0.0,lb=0.0,mb=0.0,nb=0,ob=0.0,pb=0,qb=0.0,rb=0.0,sb=0.0,tb=0,ub=0.0,vb=0,wb=0.0,xb=0.0,zb=0,Ab=0,Bb=0,Cb=0.0,Db=0.0,Eb=0.0,Fb=0.0,Gb=0,Hb=0.0,Ib=0;f=i;i=i+40|0;q=f|0;r=f+8|0;s=f+24|0;t=f+32|0;u=m&4;v=m&3;if((p|0)<0){w=0;i=f;return w|0}if((a[213992]|0)!=0){ym()}m=(n|0)==2;do{if(m){if((a[213992]|0)!=0){Ma(157464,24,1,c[o>>2]|0)|0}x=mu(b,e)|0;y=14}else{if((n|0)==1){z=iu(b,e)|0;if((z|0)!=0){A=z;break}Fv(0,127544,(B=i,i=i+1|0,i=i+7&-8,c[B>>2]=0,B)|0)|0;i=B;Fv(3,115272,(B=i,i=i+1|0,i=i+7&-8,c[B>>2]=0,B)|0)|0;i=B;y=15;break}else if((n|0)!=3){y=15;break}if((a[213992]|0)!=0){Ma(108184,21,1,c[o>>2]|0)|0}x=ju(b,e)|0;y=14}}while(0);if((y|0)==14){if((x|0)==0){y=15}else{A=x}}do{if((y|0)==15){if((a[213992]|0)!=0){Ma(102560,26,1,c[o>>2]|0)|0}if((c[b+8>>2]|0)==0){A=lu(b,e)|0;break}else{A=ku(b,e)|0;break}}}while(0);if((a[213992]|0)!=0){x=c[o>>2]|0;C=+zm();gc(x|0,96864,(B=i,i=i+8|0,h[B>>3]=C,B)|0)|0;i=B;Ma(91480,25,1,x|0)|0;ym()}do{if((u|0)!=0&(e|0)>1){x=m&1;n=(e|0)>50?50:e;z=kk(n<<2)|0;D=z;E=e<<3;F=kk(da(n,E)|0)|0;G=(n|0)>0;if(G){H=0;do{c[D+(H<<2)>>2]=F+((da(H,e)|0)<<3);H=H+1|0;}while((H|0)<(n|0))}H=n<<1;F=(H|0)>50?H:50;H=(F|0)>(e|0)?e:F;c[q>>2]=0;Xr(b,e,H,q,x);Yr(c[q>>2]|0,e,H);Ut(c[q>>2]|0,H,e,D,n);eF(c[c[q>>2]>>2]|0);eF(c[q>>2]|0);H=e<<2;F=kk(H)|0;I=F;J=(e|0)>0;if(J){vF(F|0,-1|0,H|0)|0}vr(r,e);K=c[b+8>>2]|0;if(m){Ds(b,e)}L=kk(H)|0;M=kk(160)|0;N=kk(e*160|0)|0;O=kk(160)|0;P=O;Q=0;do{c[P+(Q<<2)>>2]=N+((da(Q,e)|0)<<2);Q=Q+1|0;}while((Q|0)<40);Q=L;N=M;x=(yb()|0)%(e|0)|0;c[I+(x<<2)>>2]=0;c[N>>2]=x;R=c[P>>2]|0;if(m){Rr(x,b,e,R)}else{ur(x,b,e,R,r)}if(J){R=0;U=x;V=0;while(1){W=c[(c[P>>2]|0)+(V<<2)>>2]|0;c[Q+(V<<2)>>2]=W;X=(W|0)>(R|0);Y=X?V:U;Z=V+1|0;if((Z|0)<(e|0)){R=X?W:R;U=Y;V=Z}else{_=Y;$=1;break}}}else{_=x;$=1}while(1){c[I+(_<<2)>>2]=$;c[N+($<<2)>>2]=_;V=P+($<<2)|0;U=c[V>>2]|0;if(m){Rr(_,b,e,U)}else{ur(_,b,e,U,r)}if(J){U=0;R=_;Y=0;while(1){Z=Q+(Y<<2)|0;W=c[Z>>2]|0;X=c[(c[V>>2]|0)+(Y<<2)>>2]|0;aa=(W|0)<(X|0)?W:X;c[Z>>2]=aa;do{if((aa|0)>(U|0)){ba=Y;ca=aa}else{if((aa|0)!=(U|0)){ba=R;ca=U;break}if(((yb()|0)%(Y+1|0)|0|0)!=0){ba=R;ca=U;break}ba=Y;ca=c[Z>>2]|0}}while(0);Z=Y+1|0;if((Z|0)<(e|0)){U=ca;R=ba;Y=Z}else{ea=ba;break}}}else{ea=_}Y=$+1|0;if((Y|0)<40){_=ea;$=Y}else{break}}if(J){vF(L|0,-1|0,H|0)|0}Q=kk(H)|0;x=e<<4;Y=kk(x)|0;R=Y;if(J){U=e-1|0;V=U<<2;Z=0;aa=0;X=0;W=0;fa=0;while(1){ga=I+(fa<<2)|0;do{if((c[ga>>2]|0)>-1){ha=R+(fa<<4)+4|0;c[ha>>2]=kk(V)|0;ia=R+(fa<<4)+8|0;c[ia>>2]=kk(V)|0;c[R+(fa<<4)>>2]=U;a[R+(fa<<4)+12|0]=1;ja=c[ga>>2]|0;if((fa|0)>0){ka=P+(ja<<2)|0;la=0;do{c[(c[ha>>2]|0)+(la<<2)>>2]=la;c[(c[ia>>2]|0)+(la<<2)>>2]=c[(c[ka>>2]|0)+(la<<2)>>2];la=la+1|0;}while((la|0)<(fa|0))}la=fa+1|0;if((la|0)>=(e|0)){ma=U;na=X;oa=aa;pa=Z;qa=la;break}ka=P+(ja<<2)|0;ra=fa;sa=la;while(1){c[(c[ha>>2]|0)+(ra<<2)>>2]=sa;c[(c[ia>>2]|0)+(ra<<2)>>2]=c[(c[ka>>2]|0)+(sa<<2)>>2];ta=sa+1|0;if((ta|0)<(e|0)){ra=sa;sa=ta}else{ma=U;na=X;oa=aa;pa=Z;qa=la;break}}}else{if((Z|0)<40){la=kk(H)|0;sa=kk(H)|0;a[R+(fa<<4)+12|0]=1;ua=sa;va=la;wa=e}else{a[R+(fa<<4)+12|0]=0;ua=X;va=aa;wa=Z}c[R+(fa<<4)+4>>2]=va;c[R+(fa<<4)+8>>2]=ua;c[R+(fa<<4)>>2]=40;la=0;do{c[va+(la<<2)>>2]=c[N+(la<<2)>>2];c[ua+(la<<2)>>2]=c[(c[P+(la<<2)>>2]|0)+(fa<<2)>>2];la=la+1|0;}while((la|0)<40);ma=40;na=ua+160|0;oa=va+160|0;pa=wa-40|0;qa=fa+1|0}}while(0);ga=ma+W|0;if((qa|0)<(e|0)){Z=pa;aa=oa;X=na;W=ga;fa=qa}else{xa=ga;break}}}else{xa=0}eF(L);eF(Q);if((O|0)!=0){eF(c[P>>2]|0);eF(O)}fa=kk(x)|0;W=fa;X=xa+e<<2;aa=kk(X)|0;Z=kk(X)|0;if(J){X=(v|0)==2;N=aa;aa=Z;Z=0;while(1){c[W+(Z<<4)+4>>2]=N;c[W+(Z<<4)+8>>2]=aa;H=c[R+(Z<<4)>>2]|0;U=W+(Z<<4)|0;c[U>>2]=H+1;V=c[R+(Z<<4)+8>>2]|0;I=(H|0)>0;do{if(X){if(!I){ya=0.0;break}H=R+(Z<<4)+4|0;C=0.0;ga=1;while(1){la=ga-1|0;c[N+(ga<<2)>>2]=c[(c[H>>2]|0)+(la<<2)>>2];za=+(c[V+(la<<2)>>2]|0);Aa=-1.0/(za*za);g[aa+(ga<<2)>>2]=Aa;za=C-Aa;la=ga+1|0;if((la|0)<(c[U>>2]|0)){C=za;ga=la}else{ya=za;break}}}else{if(!I){ya=0.0;break}ga=R+(Z<<4)+4|0;C=0.0;H=1;while(1){la=H-1|0;c[N+(H<<2)>>2]=c[(c[ga>>2]|0)+(la<<2)>>2];za=-1.0/+(c[V+(la<<2)>>2]|0);g[aa+(H<<2)>>2]=za;Aa=C-za;la=H+1|0;if((la|0)<(c[U>>2]|0)){C=Aa;H=la}else{ya=Aa;break}}}}while(0);c[N>>2]=Z;g[aa>>2]=ya;V=c[U>>2]|0;I=Z+1|0;if((I|0)<(e|0)){N=N+(V<<2)|0;aa=aa+(V<<2)|0;Z=I}else{break}}}Z=kk(l<<2)|0;aa=Z;N=n<<3;X=kk(da(N,l)|0)|0;c[aa>>2]=X;a:do{if((l|0)>1){c[Z+4>>2]=X+(n<<3);if((l|0)>2){Ba=2;Ca=X}else{Da=0;y=81;break}while(1){c[aa+(Ba<<2)>>2]=Ca+((da(Ba,n)|0)<<3);x=Ba+1|0;if((x|0)>=(l|0)){y=80;break a}Ba=x;Ca=c[aa>>2]|0}}else{y=80}}while(0);if((y|0)==80){if((l|0)>0){Da=0;y=81}else{Ea=0}}if((y|0)==81){while(1){y=0;if(G){X=aa+(Da<<2)|0;U=0;do{h[(c[X>>2]|0)+(U<<3)>>3]=0.0;U=U+1|0;}while((U|0)<(n|0))}U=Da+1|0;if((U|0)<(l|0)){Da=U;y=81}else{break}}do{if((l|0)==2){h[c[aa>>2]>>3]=1.0;U=Z+4|0;if((Vt(D,n,e,c[U>>2]|0)|0)<<24>>24!=0){Fa=0;break}X=c[U>>2]|0;if(G){x=0;O=X;while(1){h[O+(x<<3)>>3]=0.0;P=x+1|0;Q=c[U>>2]|0;if((P|0)<(n|0)){x=P;O=Q}else{Ga=Q;break}}}else{Ga=X}h[Ga+8>>3]=1.0;Fa=0}else{O=0;while(1){h[(c[aa+(O<<2)>>2]|0)+(O<<3)>>3]=1.0;x=O+1|0;if((x|0)<(l|0)){O=x}else{Fa=0;break}}}}while(0);while(1){_s(D,e,n,c[aa+(Fa<<2)>>2]|0,c[j+(Fa<<2)>>2]|0);G=Fa+1|0;if((G|0)<(l|0)){Fa=G}else{Ea=1;break}}}c[s>>2]=0;c[t>>2]=0;Rs(W,D,e,n,s);Ps(D,c[s>>2]|0,n,e,n,t);eF(c[c[s>>2]>>2]|0);eF(c[s>>2]|0);G=kk(E)|0;O=G;X=kk(N)|0;x=X;C=+ou(j,R,l,e,v);U=0;b:while(1){if(Ea){Q=0;do{if(J){P=j+(Q<<2)|0;L=0;do{I=O+(L<<3)|0;h[I>>3]=0.0;V=c[R+(L<<4)+8>>2]|0;H=c[W+(L<<4)+4>>2]|0;ga=c[W+(L<<4)+8>>2]|0;la=W+(L<<4)|0;if((c[la>>2]|0)>1){Aa=0.0;sa=1;while(1){ra=c[H+(sa<<2)>>2]|0;za=+Fs(j,l,L,ra);if(za>1.0e-30){Ha=(-0.0- +g[ga+(sa<<2)>>2]*+(c[V+(sa-1<<2)>>2]|0))/za;h[I>>3]=+h[I>>3]+Ha*+h[(c[P>>2]|0)+(ra<<3)>>3];Ia=Aa-Ha}else{Ia=Aa}ra=sa+1|0;if((ra|0)<(c[la>>2]|0)){Aa=Ia;sa=ra}else{break}}Ja=Ia;La=+h[I>>3]}else{Ja=0.0;La=0.0}h[I>>3]=La+Ja*+h[(c[P>>2]|0)+(L<<3)>>3];L=L+1|0;}while((L|0)<(e|0))}Os(D,n,e,O,x);L=aa+(Q<<2)|0;if((Ar(c[t>>2]|0,c[L>>2]|0,x,n,.001,n,0)|0)!=0){Na=-1;break b}_s(D,e,n,c[L>>2]|0,c[j+(Q<<2)>>2]|0);Q=Q+1|0;}while((Q|0)<(l|0))}if((U&1|0)==0){Aa=+ou(j,R,l,e,v);Ha=+S(+(Aa-C))/(Aa+1.0e-10);Oa=Ha>=+h[21657];Pa=Aa}else{Oa=1;Pa=C}Q=U+1|0;if((Q|0)<50&Oa){C=Pa;U=Q}else{Na=Q;break}}eF(X);eF(G);if(m){Es(b,e,K)}if(J){U=0;do{if((a[R+(U<<4)+12|0]|0)!=0){eF(c[R+(U<<4)+4>>2]|0);eF(c[R+(U<<4)+8>>2]|0)}U=U+1|0;}while((U|0)<(e|0))}eF(Y);eF(c[fa+4>>2]|0);eF(c[fa+8>>2]|0);eF(fa);eF(F);eF(M);eF(c[aa>>2]|0);eF(Z);U=c[t>>2]|0;if((U|0)!=0){eF(c[U>>2]|0);eF(c[t>>2]|0)}eF(c[D>>2]|0);eF(z);wr(r);if((Na|0)<0){Qa=-1;Ra=0;Sa=0;Ta=0;Ua=0;Va=0;Wa=0;Xa=0;Ya=0;break}if(Ea){Za=0}else{_a=0;y=129;break}while(1){do{if(J){U=c[j+(Za<<2)>>2]|0;R=0;C=1.0;do{Aa=+S(+(+h[U+(R<<3)>>3]));C=Aa>C?Aa:C;R=R+1|0;}while((R|0)<(e|0));if(!J){y=124;break}R=j+(Za<<2)|0;U=0;do{K=(c[R>>2]|0)+(U<<3)|0;h[K>>3]=+h[K>>3]/C;U=U+1|0;}while((U|0)<(e|0));if(!J){y=124;break}U=j+(Za<<2)|0;R=0;while(1){C=(+wn()+-.5)*1.0e-6;K=(c[U>>2]|0)+(R<<3)|0;h[K>>3]=+h[K>>3]+C;K=R+1|0;if((K|0)<(e|0)){R=K}else{$a=U;break}}}else{y=124}}while(0);if((y|0)==124){y=0;$a=j+(Za<<2)|0}Ss(e,c[$a>>2]|0);U=Za+1|0;if((U|0)<(l|0)){Za=U}else{_a=0;y=129;break}}}else{_a=hu(0,e,l,j,k)|0;y=129}}while(0);c:do{if((y|0)==129){if((a[213992]|0)!=0){Za=c[o>>2]|0;Pa=+zm();gc(Za|0,86240,(B=i,i=i+8|0,h[B>>3]=Pa,B)|0)|0;i=B}if((e|0)==1|(p|0)==0){w=0;i=f;return w|0}if((a[213992]|0)!=0){Za=c[o>>2]|0;Pa=+zm();gc(Za|0,96864,(B=i,i=i+8|0,h[B>>3]=Pa,B)|0)|0;i=B;Ma(81504,26,1,Za|0)|0;ym()}Za=l<<2;$a=jk(Za)|0;Ea=e<<2;Na=da(Ea,l)|0;r=jk(Na)|0;t=(l|0)>0;if(t){b=(e|0)>0;m=0;do{Oa=r+((da(m,e)|0)<<2)|0;s=$a+(m<<2)|0;c[s>>2]=Oa;d:do{if(b){Fa=j+(m<<2)|0;Ga=0;Da=Oa;while(1){g[Da+(Ga<<2)>>2]=+h[(c[Fa>>2]|0)+(Ga<<3)>>3];Ca=Ga+1|0;if((Ca|0)>=(e|0)){break d}Ga=Ca;Da=c[s>>2]|0}}}while(0);m=m+1|0;}while((m|0)<(l|0))}do{if((v|0)==0){m=e-1|0;if((m|0)>0){ab=0.0;bb=0;cb=0;db=e}else{eb=0.0;fb=(da(e+1|0,e)|0)/2|0;gb=0;break}while(1){b=bb+1|0;s=e-cb|0;if((s|0)>1){Pa=ab;Oa=1;Da=b;while(1){hb=Pa+ +g[A+(Da<<2)>>2];Ga=Oa+1|0;if((Ga|0)<(s|0)){Pa=hb;Oa=Ga;Da=Da+1|0}else{break}}ib=hb;jb=bb+db|0}else{ib=ab;jb=b}Da=cb+1|0;if((Da|0)<(m|0)){ab=ib;bb=jb;cb=Da;db=db-1|0}else{kb=ib;y=149;break}}}else{kb=+(e|0)*+(e-1|0)*.5;y=149}}while(0);do{if((y|0)==149){m=(da(e+1|0,e)|0)/2|0;if((v|0)!=2){eb=kb;fb=m;gb=0;break}jt(m,A);eb=kb;fb=m;gb=1}}while(0);kt(fb,A);m=e<<3;Da=jk(m)|0;Oa=Da;vF(Da|0,0,m|0)|0;s=e-1|0;Ga=(s|0)>0;if(Ga){Fa=0;Ca=0;Ba=e;while(1){xa=Fa+1|0;qa=e-Ca|0;if((qa|0)>1){Pa=0.0;na=1;oa=xa;while(1){Ja=+g[A+(oa<<2)>>2];lb=Pa+Ja;pa=Oa+(na+Ca<<3)|0;h[pa>>3]=+h[pa>>3]-Ja;pa=na+1|0;if((pa|0)<(qa|0)){Pa=lb;na=pa;oa=oa+1|0}else{break}}mb=lb;nb=Fa+Ba|0}else{mb=0.0;nb=xa}oa=Oa+(Ca<<3)|0;h[oa>>3]=+h[oa>>3]-mb;oa=Ca+1|0;if((oa|0)<(s|0)){Fa=nb;Ca=oa;Ba=Ba-1|0}else{break}}}Ba=(e|0)>0;if(Ba){Ca=0;Fa=e;oa=0;while(1){g[A+(Ca<<2)>>2]=+h[Oa+(oa<<3)>>3];na=oa+1|0;if((na|0)<(e|0)){Ca=Fa+Ca|0;Fa=Fa-1|0;oa=na}else{break}}}oa=jk(Za)|0;Fa=jk(Na)|0;c[oa>>2]=Fa;e:do{if((l|0)>1){Ca=1;na=Fa;while(1){c[oa+(Ca<<2)>>2]=na+((da(Ca,e)|0)<<2);qa=Ca+1|0;if((qa|0)>=(l|0)){break e}Ca=qa;na=c[oa>>2]|0}}}while(0);Fa=jk(Ea)|0;Na=jk(Ea)|0;Za=jk(fb<<2)|0;if((a[213992]|0)!=0){na=c[o>>2]|0;Pa=+zm();gc(na|0,96864,(B=i,i=i+8|0,h[B>>3]=Pa,B)|0)|0;i=B;Ma(167776,15,1,na|0)|0;ym()}if((p|0)>0){Pa=eb;na=c[o>>2]|0;Ca=(_a|0)==0;Ja=1.7976931348623157e+308;xa=0;while(1){vF(Da|0,0,m|0)|0;if(gb){lt(fb,A,Za)}if(Ga){qa=0;pa=0;ma=e;while(1){wa=e-pa-1|0;ht(wa,0.0,Na);if(t){va=pa+1|0;ua=0;do{$=$a+(ua<<2)|0;ht(wa,+g[(c[$>>2]|0)+(pa<<2)>>2],Fa);dt(wa,Fa,-1.0,(c[$>>2]|0)+(va<<2)|0);jt(wa,Fa);ct(wa,Fa,Na,Na);ua=ua+1|0;}while((ua|0)<(l|0))}mt(wa,Na);ua=(wa|0)>0;if(ua){va=0;do{b=Na+(va<<2)|0;La=+g[b>>2];if(La>=3.4028234663852886e+38|La<0.0){g[b>>2]=0.0}va=va+1|0;}while((va|0)<(wa|0))}va=qa+1|0;do{if(gb){if(!ua){ob=0.0;pb=va;break}b=pa+1|0;$=va;La=0.0;ea=0;while(1){_=Za+($<<2)|0;Ia=+g[Na+(ea<<2)>>2]*+g[_>>2];g[_>>2]=Ia;ya=Ia;qb=La+ya;_=Oa+(b+ea<<3)|0;h[_>>3]=+h[_>>3]-ya;_=ea+1|0;if((_|0)<(wa|0)){$=$+1|0;La=qb;ea=_}else{break}}ob=qb;pb=qa+ma|0}else{if(!ua){ob=0.0;pb=va;break}ea=pa+1|0;$=va;La=0.0;b=0;while(1){ya=+g[Na+(b<<2)>>2];g[Za+($<<2)>>2]=ya;Ia=ya;rb=La+Ia;I=Oa+(ea+b<<3)|0;h[I>>3]=+h[I>>3]-Ia;I=b+1|0;if((I|0)<(wa|0)){$=$+1|0;La=rb;b=I}else{break}}ob=rb;pb=qa+ma|0}}while(0);wa=Oa+(pa<<3)|0;h[wa>>3]=+h[wa>>3]-ob;wa=pa+1|0;if((wa|0)<(s|0)){qa=pb;pa=wa;ma=ma-1|0}else{break}}}if(Ba){ma=0;pa=e;qa=0;while(1){g[Za+(ma<<2)>>2]=+h[Oa+(qa<<3)>>3];wa=qa+1|0;if((wa|0)<(e|0)){ma=pa+ma|0;pa=pa-1|0;qa=wa}else{break}}}do{if(t){qa=0;do{at(Za,e,c[$a+(qa<<2)>>2]|0,c[oa+(qa<<2)>>2]|0);qa=qa+1|0;}while((qa|0)<(l|0));if(t){sb=0.0;tb=0}else{y=191;break}do{sb=sb+ +gt(e,c[$a+(tb<<2)>>2]|0,c[oa+(tb<<2)>>2]|0);tb=tb+1|0;}while((tb|0)<(l|0));La=Pa+sb*2.0;if(t){ub=La;vb=0}else{wb=La;break}while(1){qa=$a+(vb<<2)|0;at(A,e,c[qa>>2]|0,Fa);La=ub- +gt(e,c[qa>>2]|0,Fa);qa=vb+1|0;if((qa|0)<(l|0)){ub=La;vb=qa}else{wb=La;break}}}else{y=191}}while(0);if((y|0)==191){y=0;wb=Pa+0.0}La=Ja-wb;if(La<0.0){xb=-0.0-La}else{xb=La}La=+h[21657];if(xb/Ja<La){zb=1}else{zb=wb<La|0}if(t){qa=0;do{pa=$a+(qa<<2)|0;ma=c[pa>>2]|0;do{if(Ca){if((Br(A,ma,c[oa+(qa<<2)>>2]|0,e,.001,e)|0)<0){Qa=-1;Ra=Za;Sa=Na;Ta=Fa;Ua=oa;Va=Oa;Wa=A;Xa=$a;Ya=r;break c}}else{ft(e,ma,Fa);if((Br(A,Fa,c[oa+(qa<<2)>>2]|0,e,.001,e)|0)<0){Qa=-1;Ra=Za;Sa=Na;Ta=Fa;Ua=oa;Va=Oa;Wa=A;Xa=$a;Ya=r;break c}if(Ba){Ab=0}else{break}do{if((d[(c[(c[k+(Ab<<2)>>2]|0)+8>>2]|0)+119|0]|0)>>>0<=1>>>0){g[(c[pa>>2]|0)+(Ab<<2)>>2]=+g[Fa+(Ab<<2)>>2]}Ab=Ab+1|0;}while((Ab|0)<(e|0))}}while(0);qa=qa+1|0;}while((qa|0)<(l|0))}do{if((a[213992]|0)!=0){if(((xa|0)%5|0|0)!=0){break}gc(na|0,163608,(B=i,i=i+8|0,h[B>>3]=wb,B)|0)|0;i=B;if(((xa+5|0)%50|0|0)!=0){break}Ka(10,na|0)|0}}while(0);qa=xa+1|0;if((qa|0)<(p|0)&zb<<24>>24==0){Ja=wb;xa=qa}else{Bb=qa;break}}}else{Bb=0}if((a[213992]|0)!=0){xa=c[o>>2]|0;if(Ga){na=0;Ca=0;Ja=0.0;m=e;while(1){Da=Ca+1|0;Ea=e-na|0;if((Ea|0)>1){qa=1;Pa=Ja;pa=Da;while(1){ma=qa+na|0;if(t){wa=0;La=0.0;while(1){va=c[$a+(wa<<2)>>2]|0;Ia=+g[va+(na<<2)>>2]- +g[va+(ma<<2)>>2];ya=La+Ia*Ia;va=wa+1|0;if((va|0)<(l|0)){wa=va;La=ya}else{Cb=ya;break}}}else{Cb=0.0}La=+T(Cb);ya=+g[A+(pa<<2)>>2];if(gb){Ia=1.0/+T(ya)-La;Db=Ia*Ia}else{Ia=1.0/ya-La;Db=Ia*Ia}Eb=Pa+ya*Db;wa=qa+1|0;if((wa|0)<(Ea|0)){qa=wa;Pa=Eb;pa=pa+1|0}else{break}}Fb=Eb;Gb=Ca+m|0}else{Fb=Ja;Gb=Da}pa=na+1|0;if((pa|0)<(s|0)){na=pa;Ca=Gb;Ja=Fb;m=m-1|0}else{Hb=Fb;break}}}else{Hb=0.0}Ja=+zm();gc(xa|0,154504,(B=i,i=i+24|0,h[B>>3]=Hb,c[B+8>>2]=Bb,h[B+16>>3]=Ja,B)|0)|0;i=B}if(t){Ib=0}else{Qa=Bb;Ra=Za;Sa=Na;Ta=Fa;Ua=oa;Va=Oa;Wa=A;Xa=$a;Ya=r;break}while(1){if(Ba){m=$a+(Ib<<2)|0;Ca=j+(Ib<<2)|0;na=0;do{h[(c[Ca>>2]|0)+(na<<3)>>3]=+g[(c[m>>2]|0)+(na<<2)>>2];na=na+1|0;}while((na|0)<(e|0))}na=Ib+1|0;if((na|0)<(l|0)){Ib=na}else{Qa=Bb;Ra=Za;Sa=Na;Ta=Fa;Ua=oa;Va=Oa;Wa=A;Xa=$a;Ya=r;break}}}}while(0);eF(Ya);eF(Xa);eF(Wa);if((Ua|0)!=0){eF(c[Ua>>2]|0);eF(Ua)}eF(Ta);eF(Sa);eF(Va);eF(Ra);w=Qa;i=f;return w|0}function ou(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,i=0.0,j=0,k=0.0,l=0,m=0,n=0,o=0,p=0.0,q=0,r=0,s=0.0,t=0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0;g=(e|0)>0;if((f|0)==2){if(!g){i=0.0;return+i}f=(d|0)>0;j=0;k=0.0;while(1){l=c[b+(j<<4)>>2]|0;if((l|0)>0){m=c[b+(j<<4)+4>>2]|0;n=b+(j<<4)+8|0;o=0;p=k;while(1){q=c[m+(o<<2)>>2]|0;if((q|0)>(j|0)){if(f){r=0;s=0.0;while(1){t=c[a+(r<<2)>>2]|0;u=+h[t+(j<<3)>>3]- +h[t+(q<<3)>>3];v=s+u*u;t=r+1|0;if((t|0)<(d|0)){r=t;s=v}else{w=v;break}}}else{w=0.0}s=+T(w);v=+(c[(c[n>>2]|0)+(o<<2)>>2]|0);u=v-s;x=p+u*u/(v*v)}else{x=p}r=o+1|0;if((r|0)<(l|0)){o=r;p=x}else{y=x;break}}}else{y=k}o=j+1|0;if((o|0)<(e|0)){j=o;k=y}else{i=y;break}}return+i}else{if(!g){i=0.0;return+i}g=(d|0)>0;j=0;y=0.0;while(1){f=c[b+(j<<4)>>2]|0;if((f|0)>0){o=c[b+(j<<4)+4>>2]|0;l=b+(j<<4)+8|0;n=0;k=y;while(1){m=c[o+(n<<2)>>2]|0;if((m|0)>(j|0)){if(g){r=0;x=0.0;while(1){q=c[a+(r<<2)>>2]|0;w=+h[q+(j<<3)>>3]- +h[q+(m<<3)>>3];p=x+w*w;q=r+1|0;if((q|0)<(d|0)){r=q;x=p}else{z=p;break}}}else{z=0.0}x=+T(z);p=+(c[(c[l>>2]|0)+(n<<2)>>2]|0);w=p-x;A=k+w*w/p}else{A=k}r=n+1|0;if((r|0)<(f|0)){n=r;k=A}else{B=A;break}}}else{B=y}n=j+1|0;if((n|0)<(e|0)){j=n;y=B}else{i=B;break}}return+i}return 0.0}function pu(a,b,d){a=a|0;b=b|0;d=+d;var e=0,f=0,g=0,i=0,j=0,k=0,l=0,m=0;e=jk(a<<2)|0;f=jk(da(a<<3,b)|0)|0;if((a|0)<=0){return e|0}if((b|0)>0){g=f;i=0}else{j=f;f=0;while(1){c[e+(f<<2)>>2]=j;k=f+1|0;if((k|0)<(a|0)){j=j+(b<<3)|0;f=k}else{break}}return e|0}while(1){f=e+(i<<2)|0;c[f>>2]=g;j=g+(b<<3)|0;k=0;l=g;while(1){h[l+(k<<3)>>3]=d;m=k+1|0;if((m|0)>=(b|0)){break}k=m;l=c[f>>2]|0}f=i+1|0;if((f|0)<(a|0)){g=j;i=f}else{break}}return e|0}function qu(a){a=a|0;if((a|0)==0){return}eF(c[a>>2]|0);eF(a);return}function ru(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0.0,P=0.0,Q=0,R=0.0,S=0,U=0.0,V=0,W=0.0,X=0,Y=0.0,Z=0,_=0,$=0;e=i;if((a[213992]|0)!=0){f=c[o>>2]|0;g=$w(b|0)|0;j=Lw(b)|0;gc(f|0,118408,(f=i,i=i+16|0,c[f>>2]=g,c[f+8>>2]=j,f)|0)|0;i=f}do{if((a[214184]|0)!=0){f=ux(b)|0;if((f|0)==0){break}j=b+48|0;g=0;k=f;while(1){f=vx(b,k)|0;l=rw(b,k)|0;a:do{if((l|0)==0){m=g;n=15}else{p=l;q=0;r=0;s=g;while(1){t=c[p>>2]&3;u=c[((t|0)==2?p:p-32|0)+28>>2]|0;v=c[((t|0)==3?p:p+32|0)+28>>2]|0;do{if((u|0)==(v|0)){w=r;x=q;y=s}else{t=(v|0)==(k|0);if((q|0)!=1){z=t?u:v;w=z;x=q+1|0;y=z;break}if(t&(u|0)==(r|0)){w=r;x=1;y=s;break}if((v|0)==(r|0)&(u|0)==(k|0)){w=r;x=1;y=s}else{A=f;B=s;break a}}}while(0);u=sw(b,p,k)|0;if((u|0)==0){break}else{p=u;q=x;r=w;s=y}}if((x|0)==0){m=y;n=15;break}else if((x|0)!=1){A=f;B=y;break}Gx(c[j>>2]|0,k|0)|0;if((y|0)==0){A=f;B=0;break}else{C=0;D=f;E=y}while(1){s=rw(b,E)|0;if((s|0)==0){break}else{F=s;G=0;H=0;I=C}while(1){s=c[F>>2]&3;r=c[((s|0)==2?F:F-32|0)+28>>2]|0;q=c[((s|0)==3?F:F+32|0)+28>>2]|0;do{if((r|0)==(q|0)){J=H;K=G;L=I}else{s=(q|0)==(E|0);if((G|0)!=1){p=s?r:q;J=p;K=G+1|0;L=p;break}if(s&(r|0)==(H|0)){J=H;K=1;L=I;break}if((q|0)==(H|0)&(r|0)==(E|0)){J=H;K=1;L=I}else{A=D;B=y;break a}}}while(0);r=sw(b,F,E)|0;if((r|0)==0){break}else{F=r;G=K;H=J;I=L}}if((K|0)==0){break}else if((K|0)!=1){A=D;B=y;break a}if((D|0)==(E|0)){M=vx(b,E)|0}else{M=D}Gx(c[j>>2]|0,E|0)|0;if((L|0)==0){A=M;B=y;break a}else{C=L;D=M;E=L}}if((D|0)==(E|0)){N=vx(b,E)|0}else{N=D}Gx(c[j>>2]|0,E|0)|0;A=N;B=y}}while(0);if((n|0)==15){n=0;Gx(c[j>>2]|0,k|0)|0;A=f;B=m}if((A|0)==0){break}else{g=B;k=A}}}}while(0);A=Lw(b)|0;B=Mw(b)|0;m=Wv(b,2,156808,0)|0;y=(d|0)==0;do{if(y){h[21657]=+(A|0)*1.0e-4;Oj(b,127200,173256);d=ew(c[b+48>>2]|0,115168)|0;if((d|0)==0){O=.99}else{O=+rF(d)}h[21674]=O;d=jk((A<<2)+4|0)|0;N=b+8|0;c[(c[N>>2]|0)+144>>2]=d;d=ux(b)|0;if((d|0)==0){P=0.0;break}else{Q=d;R=0.0;S=0}while(1){c[(c[(c[N>>2]|0)+144>>2]|0)+(S<<2)>>2]=Q;d=Q+8|0;c[(c[d>>2]|0)+120>>2]=S;c[(c[d>>2]|0)+124>>2]=-1;U=R+ +su(b,Q,m);d=vx(b,Q)|0;if((d|0)==0){P=U;break}else{Q=d;R=U;S=S+1|0}}}else{h[21657]=1.0e-4;Oj(b,127200,173256);N=ux(b)|0;if((N|0)==0){P=0.0;break}else{V=N;W=0.0;X=0}while(1){c[(c[V+8>>2]|0)+120>>2]=X;U=W+ +su(b,V,m);N=vx(b,V)|0;if((N|0)==0){P=U;break}else{V=N;W=U;X=X+1|0}}}}while(0);X=ew(b|0,108128)|0;do{if((X|0)==0){n=42}else{if((a[X]|0)==0){n=42;break}W=+h[21657];R=+rF(X);if(W>R){Y=W;break}Y=R}}while(0);if((n|0)==42){Y=P/((B|0)<1?1.0:+(B|0))*+T(+(A|0))+1.0}h[21638]=Y;if((c[53566]|0)!=0|y^1){i=e;return A|0}y=A<<2;B=jk(y)|0;n=B;X=A<<3;V=da(X,A)|0;m=jk(V)|0;S=(A|0)>0;if(S){Q=(A|0)>1;N=m;m=0;while(1){d=n+(m<<2)|0;c[d>>2]=N;E=N+(A<<3)|0;h[N>>3]=Y;if(Q){D=1;do{h[(c[d>>2]|0)+(D<<3)>>3]=Y;D=D+1|0;}while((D|0)<(A|0))}D=m+1|0;if((D|0)<(A|0)){N=E;m=D}else{break}}}m=b+8|0;c[(c[m>>2]|0)+152>>2]=B;B=jk(y)|0;b=B;N=jk(V)|0;if(S){V=(A|0)>1;Q=N;N=0;while(1){n=b+(N<<2)|0;c[n>>2]=Q;D=Q+(A<<3)|0;h[Q>>3]=1.0;if(V){d=1;do{h[(c[n>>2]|0)+(d<<3)>>3]=1.0;d=d+1|0;}while((d|0)<(A|0))}d=N+1|0;if((d|0)<(A|0)){Q=D;N=d}else{break}}}c[(c[m>>2]|0)+156>>2]=B;B=c[53568]|0;N=jk(y)|0;Q=N;V=jk(da(B,X)|0)|0;b:do{if(S){if((B|0)<=0){X=V;b=0;while(1){c[Q+(b<<2)>>2]=X;d=b+1|0;if((d|0)<(A|0)){X=X+(B<<3)|0;b=d}else{break b}}}if((B|0)>1){Z=V;_=0}else{b=V;X=0;while(1){c[Q+(X<<2)>>2]=b;h[b>>3]=1.0;D=X+1|0;if((D|0)<(A|0)){b=b+(B<<3)|0;X=D}else{break b}}}while(1){X=Q+(_<<2)|0;c[X>>2]=Z;b=Z+(B<<3)|0;h[Z>>3]=1.0;D=1;do{h[(c[X>>2]|0)+(D<<3)>>3]=1.0;D=D+1|0;}while((D|0)<(B|0));D=_+1|0;if((D|0)<(A|0)){Z=b;_=D}else{break}}}}while(0);c[(c[m>>2]|0)+160>>2]=N;N=c[53568]|0;_=y+4|0;y=jk(_)|0;Z=y;if(S){S=N<<3;B=(N|0)>0;Q=0;while(1){V=Z+(Q<<2)|0;c[V>>2]=jk(_)|0;if(B){D=0;do{X=jk(S)|0;c[(c[V>>2]|0)+(D<<2)>>2]=X;X=0;do{h[(c[(c[V>>2]|0)+(D<<2)>>2]|0)+(X<<3)>>3]=0.0;X=X+1|0;}while((X|0)<(N|0));D=D+1|0;}while((D|0)<(A|0))}else{D=0;do{X=jk(S)|0;c[(c[V>>2]|0)+(D<<2)>>2]=X;D=D+1|0;}while((D|0)<(A|0))}c[(c[V>>2]|0)+(A<<2)>>2]=0;D=Q+1|0;if((D|0)<(A|0)){Q=D}else{$=A;break}}}else{$=0}c[Z+($<<2)>>2]=0;c[(c[m>>2]|0)+164>>2]=y;i=e;return A|0}function su(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0.0,l=0.0,m=0,n=0.0,o=0,p=0.0,q=0,r=0,s=0.0;f=i;i=i+8|0;g=f|0;j=mw(b,d)|0;if((j|0)==0){k=0.0;i=f;return+k}d=b|0;if((e|0)==0){l=0.0;m=j;while(1){h[g>>3]=1.0;h[(c[m+8>>2]|0)+136>>3]=1.0;n=l+ +h[g>>3];o=ow(b,m)|0;if((o|0)==0){k=n;break}else{l=n;m=o}}i=f;return+k}else{p=0.0;q=j}while(1){j=fw(q|0,e)|0;a:do{if((a[j]|0)==0){r=9}else{m=ac(j|0,129224,(o=i,i=i+8|0,c[o>>2]=g,o)|0)|0;i=o;do{if((m|0)>=1){l=+h[g>>3];if(l<0.0){break}if(l!=0.0|(c[53566]|0)!=0){s=l;break a}}}while(0);Fv(0,126024,(o=i,i=i+8|0,c[o>>2]=j,o)|0)|0;i=o;m=$w(d)|0;Fv(3,131512,(o=i,i=i+16|0,c[o>>2]=m,h[o+8>>3]=1.0,o)|0)|0;i=o;r=9}}while(0);if((r|0)==9){r=0;h[g>>3]=1.0;s=1.0}h[(c[q+8>>2]|0)+136>>3]=s;l=p+ +h[g>>3];j=ow(b,q)|0;if((j|0)==0){k=l;break}else{p=l;q=j}}i=f;return+k}function tu(a){a=a|0;return ru(a,0)|0}function uu(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;b=a+8|0;eF(c[(c[b>>2]|0)+144>>2]|0);if((c[53566]|0)!=0){return}a=c[b>>2]|0;d=c[a+152>>2]|0;if((d|0)==0){e=a}else{eF(c[d>>2]|0);eF(d);e=c[b>>2]|0}d=c[e+156>>2]|0;if((d|0)==0){f=e}else{eF(c[d>>2]|0);eF(d);f=c[b>>2]|0}d=c[f+160>>2]|0;if((d|0)==0){g=f}else{eF(c[d>>2]|0);eF(d);g=c[b>>2]|0}d=c[g+164>>2]|0;f=d;if((d|0)==0){h=g}else{g=c[f>>2]|0;if((g|0)!=0){e=0;a=f;i=g;do{g=c[i>>2]|0;if((g|0)==0){j=i}else{k=0;l=g;while(1){eF(l);g=k+1|0;m=c[a>>2]|0;n=c[m+(g<<2)>>2]|0;if((n|0)==0){j=m;break}else{k=g;l=n}}}eF(j);e=e+1|0;a=f+(e<<2)|0;i=c[a>>2]|0;}while((i|0)!=0)}eF(d);h=c[b>>2]|0}c[h+164>>2]=0;return}function vu(a,b,d){a=a|0;b=b|0;d=d|0;var e=0.0,f=0.0;if((c[53568]|0)<=(d|0)){return}e=+(b|0);b=a+8|0;a=d;do{f=e*+wn();h[(c[(c[b>>2]|0)+132>>2]|0)+(a<<3)>>3]=f;a=a+1|0;}while((a|0)<(c[53568]|0));return}function wu(a,b){a=a|0;b=b|0;var d=0.0,e=0.0;if((c[53568]|0)<=2){return}d=+(b|0);b=a+8|0;a=2;do{e=d*+wn();h[(c[(c[b>>2]|0)+132>>2]|0)+(a<<3)>>3]=e;a=a+1|0;}while((a|0)<(c[53568]|0));return}function xu(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0.0,l=0;e=i;if((a[213992]|0)!=0){Ma(102424,26,1,c[o>>2]|0)|0}f=wt(b,d,2)|0;if((f|0)==1){i=e;return}if((f|0)==0&(a[21544]^1)){Fv(0,96704,(f=i,i=i+1|0,i=i+7&-8,c[f>>2]=0,f)|0)|0;i=f;a[21544]=1}f=b+8|0;b=c[c[(c[f>>2]|0)+144>>2]>>2]|0;if((b|0)==0){i=e;return}else{g=0;j=b}do{b=j+8|0;do{if((a[(c[b>>2]|0)+119|0]|0)==0){k=+wn();h[c[(c[b>>2]|0)+132>>2]>>3]=k;k=+wn();h[(c[(c[b>>2]|0)+132>>2]|0)+8>>3]=k;if((c[53568]|0)>2){l=2}else{break}do{k=+wn();h[(c[(c[b>>2]|0)+132>>2]|0)+(l<<3)>>3]=k;l=l+1|0;}while((l|0)<(c[53568]|0))}}while(0);g=g+1|0;j=c[(c[(c[f>>2]|0)+144>>2]|0)+(g<<2)>>2]|0;}while((j|0)!=0);i=e;return}function yu(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0.0,s=0.0,t=0,u=0,v=0.0,w=0,x=0,y=0.0,z=0,A=0,B=0;e=i;i=i+80|0;f=e|0;if((a[213992]|0)!=0){Ma(91336,25,1,c[o>>2]|0)|0;ym()}g=b+8|0;j=c[g>>2]|0;k=c[j+156>>2]|0;l=c[j+152>>2]|0;j=(d|0)>0;do{if(j){m=0;do{if((m|0)>0){n=l+(m<<2)|0;p=k+(m<<2)|0;q=0;do{r=+h[(c[n>>2]|0)+(q<<3)>>3];s=1.0/(r*r);t=c[(c[g>>2]|0)+144>>2]|0;u=uw(b,c[t+(m<<2)>>2]|0,c[t+(q<<2)>>2]|0,0,0)|0;if((u|0)==0){v=s}else{v=s*+h[(c[u+8>>2]|0)+128>>3]}h[(c[k+(q<<2)>>2]|0)+(m<<3)>>3]=v;h[(c[p>>2]|0)+(q<<3)>>3]=v;q=q+1|0;}while((q|0)<(m|0))}m=m+1|0;}while((m|0)<(d|0));if(!j){break}m=0;q=c[53568]|0;while(1){if((q|0)>0){p=0;while(1){h[(c[(c[(c[g>>2]|0)+160>>2]|0)+(m<<2)>>2]|0)+(p<<3)>>3]=0.0;n=p+1|0;u=c[53568]|0;if((n|0)<(u|0)){p=n}else{w=u;break}}}else{w=q}p=m+1|0;if((p|0)<(d|0)){m=p;q=w}else{break}}}}while(0);w=c[g>>2]|0;k=c[c[w+144>>2]>>2]|0;if((k|0)!=0){b=0;l=k;k=w;while(1){if(j){w=l+8|0;q=0;do{a:do{if((b|0)!=(q|0)){m=c[g>>2]|0;p=c[(c[w>>2]|0)+132>>2]|0;u=c[(c[(c[(c[m+144>>2]|0)+(q<<2)>>2]|0)+8>>2]|0)+132>>2]|0;n=c[53568]|0;t=(n|0)>0;if(t){x=0;y=0.0}else{break}do{v=+h[p+(x<<3)>>3]- +h[u+(x<<3)>>3];h[f+(x<<3)>>3]=v;y=y+v*v;x=x+1|0;}while((x|0)<(n|0));v=+T(y);if(t){z=0;A=m}else{break}while(1){s=+h[f+(z<<3)>>3];h[(c[(c[(c[A+164>>2]|0)+(b<<2)>>2]|0)+(q<<2)>>2]|0)+(z<<3)>>3]=+h[(c[(c[A+156>>2]|0)+(b<<2)>>2]|0)+(q<<3)>>3]*(s-s*+h[(c[(c[A+152>>2]|0)+(b<<2)>>2]|0)+(q<<3)>>3]/v);n=c[g>>2]|0;u=(c[(c[n+160>>2]|0)+(b<<2)>>2]|0)+(z<<3)|0;h[u>>3]=+h[(c[(c[(c[n+164>>2]|0)+(b<<2)>>2]|0)+(q<<2)>>2]|0)+(z<<3)>>3]+ +h[u>>3];u=z+1|0;if((u|0)>=(c[53568]|0)){break a}z=u;A=c[g>>2]|0}}}while(0);q=q+1|0;}while((q|0)<(d|0));B=c[g>>2]|0}else{B=k}q=b+1|0;w=c[(c[B+144>>2]|0)+(q<<2)>>2]|0;if((w|0)==0){break}else{b=q;l=w;k=B}}}if((a[213992]|0)==0){i=e;return}B=c[o>>2]|0;y=+zm();gc(B|0,86160,(B=i,i=i+8|0,h[B>>3]=y,B)|0)|0;i=B;i=e;return}function zu(b,d){b=b|0;d=d|0;var e=0,f=0.0,g=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0.0,y=0,z=0,A=0,B=0.0,C=0,D=0.0,E=0.0,F=0,G=0.0,H=0.0,I=0.0,J=0;e=i;f=+h[21657];h[21656]=f*f;g=Au(b,d)|0;if((g|0)!=0){j=g;do{Bu(b,d,j);j=Au(b,d)|0;}while((j|0)!=0)}if((a[213992]|0)==0){k=b+8|0}else{j=c[o>>2]|0;g=d-1|0;l=b+8|0;if((g|0)>0){m=c[l>>2]|0;n=c[m+144>>2]|0;p=c[53568]|0;q=(p|0)>0;r=m+156|0;s=m+152|0;f=0.0;m=0;while(1){t=m+1|0;if((t|0)<(d|0)){u=c[(c[r>>2]|0)+(m<<2)>>2]|0;v=c[(c[s>>2]|0)+(m<<2)>>2]|0;w=(c[n+(m<<2)>>2]|0)+8|0;x=f;y=t;while(1){if(q){z=c[(c[w>>2]|0)+132>>2]|0;A=c[(c[(c[n+(y<<2)>>2]|0)+8>>2]|0)+132>>2]|0;B=0.0;C=0;while(1){D=+h[z+(C<<3)>>3]- +h[A+(C<<3)>>3];E=B+D*D;F=C+1|0;if((F|0)<(p|0)){B=E;C=F}else{G=E;break}}}else{G=0.0}B=+h[v+(y<<3)>>3];E=x+ +h[u+(y<<3)>>3]*(G+B*B-B*2.0*+T(G));C=y+1|0;if((C|0)<(d|0)){x=E;y=C}else{H=E;break}}}else{H=f}if((t|0)<(g|0)){f=H;m=t}else{I=H;break}}}else{I=0.0}gc(j|0,81416,(J=i,i=i+8|0,h[J>>3]=I,J)|0)|0;i=J;m=c[(c[l>>2]|0)+148>>2]|0;g=(m|0)==(c[53660]|0)?163488:213472;I=+zm();gc(j|0,167648,(J=i,i=i+24|0,c[J>>2]=m,c[J+8>>2]=g,h[J+16>>3]=I,J)|0)|0;i=J;k=l}l=c[(c[k>>2]|0)+148>>2]|0;if((l|0)!=(c[53660]|0)){i=e;return}k=$w(b|0)|0;Fv(0,154336,(J=i,i=i+16|0,c[J>>2]=l,c[J+8>>2]=k,J)|0)|0;i=J;i=e;return}function Au(b,e){b=b|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,p=0.0,q=0,r=0,s=0,t=0.0,u=0,v=0,w=0.0,x=0.0,y=0.0,z=0,A=0.0,B=0.0,C=0;f=i;g=(c[45226]|0)+1|0;c[45226]=g;j=c[b+8>>2]|0;if((c[j+148>>2]|0)>=(c[53660]|0)){k=0;i=f;return k|0}if((e|0)>0){b=c[j+144>>2]|0;l=c[53568]|0;m=(l|0)>0;n=0;p=0.0;q=0;while(1){r=c[b+(n<<2)>>2]|0;do{if((d[(c[r+8>>2]|0)+119|0]|0)>>>0>1>>>0){s=q;t=p}else{if(m){u=c[(c[j+160>>2]|0)+(n<<2)>>2]|0;v=0;w=0.0;while(1){x=+h[u+(v<<3)>>3];y=w+x*x;z=v+1|0;if((z|0)<(l|0)){v=z;w=y}else{A=y;break}}}else{A=0.0}if(A<=p){s=q;t=p;break}s=r;t=A}}while(0);r=n+1|0;if((r|0)<(e|0)){n=r;p=t;q=s}else{B=t;C=s;break}}}else{B=0.0;C=0}if(B<+h[21656]){k=0;i=f;return k|0}if((a[213992]|0)==0){k=C;i=f;return k|0}if(((g|0)%100|0|0)!=0){k=C;i=f;return k|0}g=c[o>>2]|0;t=+T(B);gc(g|0,148240,(s=i,i=i+8|0,h[s>>3]=t,s)|0)|0;i=s;if(((c[45226]|0)%1e3|0|0)!=0){k=C;i=f;return k|0}Ka(10,g|0)|0;k=C;i=f;return k|0}function Bu(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0.0,n=0.0,p=0.0;e=i;f=d+8|0;g=c[(c[f>>2]|0)+120>>2]|0;j=c[44368]|0;if((j|0)==0){k=c[53568]|0;l=kk(da(k<<3,k)|0)|0}else{k=c[53568]|0;l=mk(j,da(k<<3,k)|0)|0}k=l;c[44368]=k;Du(a,b,g,k);k=c[53568]|0;if((k|0)>0){l=a+8|0;j=0;do{h[177312+(j<<3)>>3]=-0.0- +h[(c[(c[(c[l>>2]|0)+160>>2]|0)+(g<<2)>>2]|0)+(j<<3)>>3];j=j+1|0;}while((j|0)<(k|0))}gu(c[44368]|0,177392,177312,k);if((c[53568]|0)>0){k=0;do{m=+h[21674];n=m+ +wn()*(1.0-m)*2.0;j=177392+(k<<3)|0;m=+h[j>>3]*n;h[j>>3]=m;j=(c[(c[f>>2]|0)+132>>2]|0)+(k<<3)|0;h[j>>3]=+h[j>>3]+m;k=k+1|0;}while((k|0)<(c[53568]|0))}k=(c[a+8>>2]|0)+148|0;c[k>>2]=(c[k>>2]|0)+1;Cu(a,b,g);if((Xm()|0)==0){i=e;return}g=c[53568]|0;if((g|0)>0){b=0;m=0.0;while(1){n=m+ +S(+(+h[177392+(b<<3)>>3]));a=b+1|0;if((a|0)<(g|0)){b=a;m=n}else{p=n;break}}}else{p=0.0}m=+T(p);b=c[o>>2]|0;g=$w(d|0)|0;gc(b|0,142112,(b=i,i=i+16|0,c[b>>2]=g,h[b+8>>3]=m,b)|0)|0;i=b;i=e;return}function Cu(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0.0,t=0.0,u=0,v=0,w=0.0;e=i;i=i+80|0;f=e|0;g=a+8|0;a=c[g>>2]|0;j=c[(c[a+144>>2]|0)+(d<<2)>>2]|0;k=c[53568]|0;a:do{if((k|0)>0){l=0;m=a;while(1){h[(c[(c[m+160>>2]|0)+(d<<2)>>2]|0)+(l<<3)>>3]=0.0;n=l+1|0;o=c[53568]|0;if((n|0)>=(o|0)){p=o;break a}l=n;m=c[g>>2]|0}}else{p=k}}while(0);if((b|0)<=0){i=e;return}k=j+8|0;j=0;a=p;while(1){b:do{if((j|0)==(d|0)){q=a}else{p=c[g>>2]|0;m=c[(c[k>>2]|0)+132>>2]|0;l=c[(c[(c[(c[p+144>>2]|0)+(j<<2)>>2]|0)+8>>2]|0)+132>>2]|0;n=(a|0)>0;if(n){r=0;s=0.0}else{q=a;break}do{t=+h[m+(r<<3)>>3]- +h[l+(r<<3)>>3];h[f+(r<<3)>>3]=t;s=s+t*t;r=r+1|0;}while((r|0)<(a|0));t=+T(s);if(n){u=0;v=p}else{q=a;break}while(1){w=+h[f+(u<<3)>>3];h[(c[(c[(c[v+164>>2]|0)+(d<<2)>>2]|0)+(j<<2)>>2]|0)+(u<<3)>>3]=+h[(c[(c[v+156>>2]|0)+(d<<2)>>2]|0)+(j<<3)>>3]*(w-w*+h[(c[(c[v+152>>2]|0)+(d<<2)>>2]|0)+(j<<3)>>3]/t);l=c[g>>2]|0;m=(c[(c[l+160>>2]|0)+(d<<2)>>2]|0)+(u<<3)|0;h[m>>3]=+h[(c[(c[(c[l+164>>2]|0)+(d<<2)>>2]|0)+(j<<2)>>2]|0)+(u<<3)>>3]+ +h[m>>3];m=c[(c[g>>2]|0)+164>>2]|0;l=(c[(c[m+(j<<2)>>2]|0)+(d<<2)>>2]|0)+(u<<3)|0;w=+h[l>>3];h[l>>3]=-0.0- +h[(c[(c[m+(d<<2)>>2]|0)+(j<<2)>>2]|0)+(u<<3)>>3];m=c[g>>2]|0;l=(c[(c[m+160>>2]|0)+(j<<2)>>2]|0)+(u<<3)|0;h[l>>3]=+h[(c[(c[(c[m+164>>2]|0)+(j<<2)>>2]|0)+(d<<2)>>2]|0)+(u<<3)>>3]-w+ +h[l>>3];l=u+1|0;m=c[53568]|0;if((l|0)>=(m|0)){q=m;break b}u=l;v=c[g>>2]|0}}}while(0);p=j+1|0;if((p|0)<(b|0)){j=p;a=q}else{break}}i=e;return}function Du(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0.0,y=0.0,z=0.0,A=0.0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0;f=i;i=i+80|0;g=f|0;j=a+8|0;a=c[j>>2]|0;k=c[a+156>>2]|0;l=c[a+152>>2]|0;m=c[(c[a+144>>2]|0)+(d<<2)>>2]|0;a=c[53568]|0;if((a|0)>0){n=0;o=a;while(1){if((o|0)>0){p=0;q=o;while(1){h[e+((da(q,n)|0)+p<<3)>>3]=0.0;r=p+1|0;s=c[53568]|0;if((r|0)<(s|0)){p=r;q=s}else{t=s;break}}}else{t=o}q=n+1|0;if((q|0)<(t|0)){n=q;o=t}else{u=t;break}}}else{u=a}if((b|0)>0){a=k+(d<<2)|0;k=l+(d<<2)|0;l=m+8|0;m=0;t=u;o=u;while(1){do{if((m|0)==(d|0)){v=t;w=o}else{n=(t|0)>0;if(n){q=c[(c[l>>2]|0)+132>>2]|0;p=c[(c[(c[(c[(c[j>>2]|0)+144>>2]|0)+(m<<2)>>2]|0)+8>>2]|0)+132>>2]|0;s=0;x=0.0;while(1){y=+h[q+(s<<3)>>3]- +h[p+(s<<3)>>3];h[g+(s<<3)>>3]=y;z=x+y*y;r=s+1|0;if((r|0)<(t|0)){s=r;x=z}else{A=z;break}}}else{A=0.0}x=+T(A);z=1.0/(x*x*x);if(n){B=0;C=t;D=o}else{v=t;w=o;break}while(1){x=+h[(c[a>>2]|0)+(m<<3)>>3];y=+h[(c[k>>2]|0)+(m<<3)>>3];E=+h[g+(B<<3)>>3];if((B|0)>0){s=0;F=x;G=y;p=D;while(1){q=e+((da(p,s)|0)+B<<3)|0;h[q>>3]=+h[q>>3]+z*F*G*E*+h[g+(s<<3)>>3];q=s+1|0;H=+h[(c[a>>2]|0)+(m<<3)>>3];I=+h[(c[k>>2]|0)+(m<<3)>>3];r=c[53568]|0;if((q|0)<(B|0)){s=q;F=H;G=I;p=r}else{J=H;K=I;L=r;break}}}else{J=x;K=y;L=C}p=e+((da(L,B)|0)+B<<3)|0;h[p>>3]=+h[p>>3]+J*(1.0-z*K*(A-E*E));p=B+1|0;s=c[53568]|0;if((p|0)<(s|0)){B=p;C=s;D=s}else{v=s;w=s;break}}}}while(0);n=m+1|0;if((n|0)<(b|0)){m=n;t=v;o=w}else{M=v;N=w;break}}}else{M=u;N=u}if((M|0)>1){O=1;P=M;Q=N}else{i=f;return}while(1){if((O|0)>0){N=0;M=Q;while(1){h[e+((da(M,O)|0)+N<<3)>>3]=+h[e+((da(M,N)|0)+O<<3)>>3];u=N+1|0;w=c[53568]|0;if((u|0)<(O|0)){N=u;M=w}else{R=w;S=w;break}}}else{R=P;S=Q}M=O+1|0;if((M|0)<(R|0)){O=M;P=R;Q=S}else{break}}i=f;return}function Eu(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;b=a+8|0;if((c[(c[b>>2]|0)+124>>2]|0)>=0){cc(139008,136472,645,170200)}d=c[53680]|0;c[53680]=d+1;c[(c[b>>2]|0)+124>>2]=d;c[(c[53682]|0)+(d<<2)>>2]=a;if((d|0)<=0){return}d=c[b>>2]|0;e=c[d+124>>2]|0;if((e|0)<=0){return}f=e-1|0;g=(f|0)/2|0;i=(c[53682]|0)+(g<<2)|0;j=c[i>>2]|0;k=j+8|0;if(+h[(c[k>>2]|0)+136>>3]>+h[d+136>>3]){l=e;m=f;n=g;o=i;p=j;q=k}else{return}while(1){c[o>>2]=a;c[(c[b>>2]|0)+124>>2]=n;c[(c[53682]|0)+(l<<2)>>2]=p;c[(c[q>>2]|0)+124>>2]=l;if((m|0)<=1){r=8;break}k=n-1|0;j=(k|0)/2|0;i=(c[53682]|0)+(j<<2)|0;g=c[i>>2]|0;f=g+8|0;if(+h[(c[f>>2]|0)+136>>3]>+h[(c[b>>2]|0)+136>>3]){l=n;m=k;n=j;o=i;p=g;q=f}else{r=8;break}}if((r|0)==8){return}}function Fu(){var a=0,b=0,d=0,e=0,f=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0.0,o=0,p=0.0,q=0,r=0,s=0.0,t=0,u=0.0,v=0;a=c[53680]|0;if((a|0)==0){b=0;return b|0}d=c[53682]|0;e=c[d>>2]|0;f=a-1|0;c[53680]=f;a=c[d+(f<<2)>>2]|0;c[d>>2]=a;d=a+8|0;c[(c[d>>2]|0)+124>>2]=0;a:do{if((f|0)>1){g=c[(c[d>>2]|0)+124>>2]|0;i=g<<1|1;j=c[53680]|0;if((i|0)<(j|0)){k=g;l=i;m=j}else{break}while(1){j=l+1|0;i=c[53682]|0;if((j|0)<(m|0)){g=c[i+(j<<2)>>2]|0;n=+h[(c[g+8>>2]|0)+136>>3];o=c[i+(l<<2)>>2]|0;p=+h[(c[o+8>>2]|0)+136>>3];if(n<p){q=j;r=g;s=n}else{t=o;u=p;v=7}}else{o=c[i+(l<<2)>>2]|0;t=o;u=+h[(c[o+8>>2]|0)+136>>3];v=7}if((v|0)==7){v=0;q=l;r=t;s=u}if(+h[(c[d>>2]|0)+136>>3]<=s){break a}c[i+(q<<2)>>2]=a;c[(c[d>>2]|0)+124>>2]=q;c[(c[53682]|0)+(k<<2)>>2]=r;c[(c[r+8>>2]|0)+124>>2]=k;i=q<<1|1;o=c[53680]|0;if((i|0)<(o|0)){k=q;l=i;m=o}else{break}}}}while(0);c[(c[e+8>>2]|0)+124>>2]=-1;b=e;return b|0}function Gu(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0.0;e=i;c[53682]=jk((d<<2)+4|0)|0;if((a[213992]|0)!=0){Ma(133632,28,1,c[o>>2]|0)|0;ym()}d=ux(b)|0;if((d|0)!=0){f=d;do{Hu(b,f);f=vx(b,f)|0;}while((f|0)!=0)}if((a[213992]|0)==0){g=c[53682]|0;j=g;eF(j);i=e;return}f=c[o>>2]|0;k=+zm();gc(f|0,86160,(f=i,i=i+8|0,h[f>>3]=k,f)|0)|0;i=f;g=c[53682]|0;j=g;eF(j);i=e;return}function Hu(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,i=0,j=0.0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;d=a+8|0;e=c[c[(c[d>>2]|0)+144>>2]>>2]|0;if((e|0)!=0){f=0;g=e;do{h[(c[g+8>>2]|0)+136>>3]=+h[21638];f=f+1|0;g=c[(c[(c[d>>2]|0)+144>>2]|0)+(f<<2)>>2]|0;}while((g|0)!=0)}c[53524]=b;g=b+8|0;h[(c[g>>2]|0)+136>>3]=0.0;c[(c[g>>2]|0)+128>>2]=0;Eu(c[53524]|0);g=Fu()|0;if((g|0)==0){return}else{i=g}do{g=c[53524]|0;if((i|0)!=(g|0)){b=c[i+8>>2]|0;j=+h[b+136>>3];f=c[(c[g+8>>2]|0)+120>>2]|0;g=c[b+120>>2]|0;h[(c[(c[(c[d>>2]|0)+152>>2]|0)+(g<<2)>>2]|0)+(f<<3)>>3]=j;h[(c[(c[(c[d>>2]|0)+152>>2]|0)+(f<<2)>>2]|0)+(g<<3)>>3]=j}g=rw(a,i)|0;if((g|0)!=0){f=i+8|0;b=g;do{g=c[b>>2]&3;e=c[((g|0)==3?b:b+32|0)+28>>2]|0;if((e|0)==(i|0)){k=c[((g|0)==2?b:b-32|0)+28>>2]|0}else{k=e}j=+h[(c[f>>2]|0)+136>>3]+ +h[(c[b+8>>2]|0)+136>>3];e=k+8|0;g=(c[e>>2]|0)+136|0;a:do{if(+h[g>>3]>j){h[g>>3]=j;l=c[e>>2]|0;m=c[l+124>>2]|0;if((m|0)<=-1){c[l+128>>2]=(c[(c[f>>2]|0)+128>>2]|0)+1;Eu(k);break}if((m|0)<=0){break}n=m-1|0;o=(n|0)/2|0;p=(c[53682]|0)+(o<<2)|0;q=c[p>>2]|0;r=q+8|0;if(+h[(c[r>>2]|0)+136>>3]>+h[l+136>>3]){s=m;t=n;u=o;v=p;w=q;x=r}else{break}while(1){c[v>>2]=k;c[(c[e>>2]|0)+124>>2]=u;c[(c[53682]|0)+(s<<2)>>2]=w;c[(c[x>>2]|0)+124>>2]=s;if((t|0)<=1){break a}r=u-1|0;q=(r|0)/2|0;p=(c[53682]|0)+(q<<2)|0;o=c[p>>2]|0;n=o+8|0;if(+h[(c[n>>2]|0)+136>>3]>+h[(c[e>>2]|0)+136>>3]){s=u;t=r;u=q;v=p;w=o;x=n}else{break}}}}while(0);b=sw(a,b,i)|0;}while((b|0)!=0)}i=Fu()|0;}while((i|0)!=0);return}function Iu(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0.0,l=0.0,m=0,n=0,o=0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;b=i;i=i+16|0;e=b|0;Tr();au();ks();c[53234]=Qc[d&3]()|0;ms();f=e|0;g=e+8|0;j=Qc[d&3]()|0;k=0.0;l=0.0;a:while(1){m=j+8|0;n=j|0;if((j|0)==0){o=3;break}else{p=k;q=l}while(1){if((gs()|0)==0){hs(e);r=+h[f>>3];s=+h[g>>3]}else{r=p;s=q}if((gs()|0)!=0){break}t=+h[m>>3];if(t<s){break}if(t==s){if(+h[n>>3]<r){break}}if((gs()|0)!=0){break a}u=is()|0;v=us(u)|0;w=ts(u)|0;x=ts(w)|0;y=vs(u)|0;z=ws(w)|0;A=c[u+20>>2]|0;du(A);Wr(c[u+8>>2]|0,a[u+16|0]|0,A);Wr(c[w+8>>2]|0,a[w+16|0]|0,A);ss(u);fs(w);ss(w);w=+h[y+8>>3]>+h[z+8>>3];u=w?z:y;B=Ur(u,w?y:z)|0;z=ns(B,w&1)|0;qs(v,z);Wr(B,w&1^1,A);eu(A);A=os(v,z)|0;if((A|0)!=0){fs(v);es(v,A,+cu(A,u))}A=os(z,x)|0;if((A|0)==0){p=r;q=s;continue}es(z,A,+cu(A,u));p=r;q=s}n=rs(j|0)|0;m=ts(n)|0;u=Ur(ws(n)|0,j)|0;A=ns(u,0)|0;qs(n,A);z=os(n,A)|0;if((z|0)!=0){fs(n);es(n,z,+cu(z,j))}z=ns(u,1)|0;qs(A,z);A=os(z,m)|0;if((A|0)!=0){es(z,A,+cu(A,j))}j=Qc[d&3]()|0;k=r;l=s}b:do{if((o|0)==3){while(1){o=0;if((gs()|0)==0){hs(e)}if((gs()|0)!=0){break b}d=is()|0;j=us(d)|0;g=ts(d)|0;f=ts(g)|0;A=vs(d)|0;z=ws(g)|0;m=c[d+20>>2]|0;du(m);Wr(c[d+8>>2]|0,a[d+16|0]|0,m);Wr(c[g+8>>2]|0,a[g+16|0]|0,m);ss(d);fs(g);ss(g);g=+h[A+8>>3]>+h[z+8>>3];d=g?z:A;u=Ur(d,g?A:z)|0;z=ns(u,g&1)|0;qs(j,z);Wr(u,g&1^1,m);eu(m);m=os(j,z)|0;if((m|0)!=0){fs(j);es(j,m,+cu(m,d))}m=os(z,f)|0;if((m|0)==0){o=3;continue}es(z,m,+cu(m,d));o=3}}}while(0);o=ts(c[53832]|0)|0;if((o|0)==(c[53830]|0)){i=b;return}else{C=o}do{Vr(c[C+8>>2]|0);C=ts(C)|0;}while((C|0)!=(c[53830]|0));i=b;return}function Ju(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,X=0.0,Y=0.0,Z=0,_=0,$=0.0,aa=0.0,ba=0,ca=0.0,ea=0.0,fa=0;e=i;i=i+8|0;f=e|0;if((Lw(b)|0)==1){g=(ux(b)|0)+8|0;h[c[(c[g>>2]|0)+132>>2]>>3]=0.0;h[(c[(c[g>>2]|0)+132>>2]|0)+8>>3]=0.0;j=d;i=e;return j|0}g=Lw(b)|0;k=da(g,g)|0;g=ux(b)|0;if((g|0)!=0){l=g;do{g=l+8|0;c[(c[(c[g>>2]|0)+112>>2]|0)+12>>2]=k;h[(c[(c[g>>2]|0)+112>>2]|0)+32>>3]=10.0;m=rw(b,l)|0;a:do{if((m|0)==0){n=11}else{p=m;q=0;b:while(1){r=c[p>>2]&3;s=c[((r|0)==3?p:p+32|0)+28>>2]|0;if((s|0)==(l|0)){t=c[((r|0)==2?p:p-32|0)+28>>2]|0}else{t=s}do{if((t|0)==(l|0)){u=q}else{if((q|0)==0){u=t;break}if((q|0)==(t|0)){u=q}else{break b}}}while(0);s=sw(b,p,l)|0;if((s|0)==0){n=11;break a}else{p=s;q=u}}c[c[(c[g>>2]|0)+112>>2]>>2]=k}}while(0);if((n|0)==11){n=0;c[c[(c[g>>2]|0)+112>>2]>>2]=0}l=vx(b,l)|0;}while((l|0)!=0)}do{if((d|0)==0){l=(Lw(b)|0)<3;k=ux(b)|0;if(l){v=k;break}if((k|0)!=0){l=k;do{if((c[c[(c[l+8>>2]|0)+112>>2]>>2]|0)==0){Mu(b,l,0)}l=vx(b,l)|0;}while((l|0)!=0)}l=ux(b)|0;if((l|0)==0){v=0;break}else{w=l;x=0;y=0}while(1){l=c[c[(c[w+8>>2]|0)+112>>2]>>2]|0;g=l>>>0>y>>>0;k=g?w:x;u=vx(b,w)|0;if((u|0)==0){v=k;break}else{w=u;x=k;y=g?l:y}}}else{v=d}}while(0);if((a[213992]|0)==0){z=v|0}else{d=c[o>>2]|0;y=v|0;x=$w(y)|0;gc(d|0,119768,(A=i,i=i+8|0,c[A>>2]=x,A)|0)|0;i=A;z=y}y=v+8|0;x=(c[(c[y>>2]|0)+112>>2]|0)+12|0;d=c[x>>2]|0;c[x>>2]=0;c[(c[(c[y>>2]|0)+112>>2]|0)+16>>2]=0;x=Wv(b,2,97008,0)|0;w=jk(8)|0;l=w;c[w>>2]=z;c:do{if((w|0)!=0){z=(x|0)==0;g=l;k=l;while(1){u=c[k>>2]|0;t=c[k+4>>2]|0;eF(k);m=u;if((u|0)==0){break c}q=(t|0)==0?0:g;p=u+8|0;u=(c[(c[(c[p>>2]|0)+112>>2]|0)+12>>2]|0)+1|0;s=rw(b,m)|0;d:do{if((s|0)==0){B=q;C=t}else{if(z){r=q;D=t;E=s;while(1){F=c[E>>2]&3;G=c[((F|0)==3?E:E+32|0)+28>>2]|0;if((G|0)==(m|0)){H=c[((F|0)==2?E:E-32|0)+28>>2]|0}else{H=G}G=H+8|0;F=(c[(c[G>>2]|0)+112>>2]|0)+12|0;do{if(u>>>0<(c[F>>2]|0)>>>0){c[F>>2]=u;c[(c[(c[G>>2]|0)+112>>2]|0)+16>>2]=m;I=(c[(c[p>>2]|0)+112>>2]|0)+8|0;c[I>>2]=(c[I>>2]|0)+1;I=jk(8)|0;J=I;c[I>>2]=H;if((r|0)==0){K=J;L=J;break}c[r+4>>2]=J;K=D;L=J}else{K=D;L=r}}while(0);G=sw(b,E,m)|0;if((G|0)==0){B=L;C=K;break d}else{r=L;D=K;E=G}}}else{M=q;N=t;O=s}while(1){E=O|0;if((a[fw(E,x)|0]|0)==48){if((Ya(fw(E,x)|0,91552)|0)==0){P=N;Q=M}else{n=39}}else{n=39}do{if((n|0)==39){n=0;E=c[O>>2]&3;D=c[((E|0)==3?O:O+32|0)+28>>2]|0;if((D|0)==(m|0)){R=c[((E|0)==2?O:O-32|0)+28>>2]|0}else{R=D}D=R+8|0;E=(c[(c[D>>2]|0)+112>>2]|0)+12|0;if(u>>>0>=(c[E>>2]|0)>>>0){P=N;Q=M;break}c[E>>2]=u;c[(c[(c[D>>2]|0)+112>>2]|0)+16>>2]=m;D=(c[(c[p>>2]|0)+112>>2]|0)+8|0;c[D>>2]=(c[D>>2]|0)+1;D=jk(8)|0;E=D;c[D>>2]=R;if((M|0)==0){P=E;Q=E;break}c[M+4>>2]=E;P=N;Q=E}}while(0);E=sw(b,O,m)|0;if((E|0)==0){B=Q;C=P;break}else{M=Q;N=P;O=E}}}}while(0);if((C|0)==0){break}else{g=B;k=C}}}}while(0);C=ux(b)|0;do{if((C|0)==0){S=0}else{B=C;O=0;while(1){P=c[(c[(c[B+8>>2]|0)+112>>2]|0)+12>>2]|0;if((P|0)==(d|0)){break}T=P>>>0>O>>>0?P:O;P=vx(b,B)|0;if((P|0)==0){n=48;break}else{B=P;O=T}}if((n|0)==48){if((T|0)>=0){S=T;break}}Fv(1,157624,(A=i,i=i+1|0,i=i+7&-8,c[A>>2]=0,A)|0)|0;i=A;j=v;i=e;return j|0}}while(0);T=ux(b)|0;if((T|0)!=0){n=T;do{T=n+8|0;d=c[(c[T>>2]|0)+112>>2]|0;do{if((c[d+8>>2]|0)==0){C=d+4|0;c[C>>2]=(c[C>>2]|0)+1;C=c[(c[(c[T>>2]|0)+112>>2]|0)+16>>2]|0;if((C|0)==0){break}else{U=C}do{C=U+8|0;O=(c[(c[C>>2]|0)+112>>2]|0)+4|0;c[O>>2]=(c[O>>2]|0)+1;U=c[(c[(c[C>>2]|0)+112>>2]|0)+16>>2]|0;}while((U|0)!=0)}}while(0);n=vx(b,n)|0;}while((n|0)!=0)}h[(c[(c[y>>2]|0)+112>>2]|0)+24>>3]=6.283185307179586;Lu(b,v);h[(c[(c[y>>2]|0)+112>>2]|0)+32>>3]=0.0;Ku(b,v);y=jk((S<<3)+8|0)|0;n=y;U=Hm(b|0,Wv(c[b+48>>2]|0,0,102688,0)|0,0)|0;e:do{if((U|0)==0){X=1.0;Y=0.0;Z=1}else{if((S|0)<1){X=0.0;Y=0.0;Z=1;break}else{_=1;$=0.0;aa=0.0;ba=U}while(1){ca=+sF(ba,f);if(ca<=0.0){X=aa;Y=$;Z=_;break e}ea=ca>.02?ca:.02;ca=$+ea;T=_+1|0;h[n+(_<<3)>>3]=ca;d=c[f>>2]|0;C=a[d]|0;f:do{if(C<<24>>24==0){fa=d}else{O=d;B=C;while(1){P=O+1|0;if(!((Qa(B<<24>>24|0)|0)!=0|B<<24>>24==58)){fa=O;break f}N=a[P]|0;if(N<<24>>24==0){fa=P;break}else{O=P;B=N}}}}while(0);if((_|0)<(S|0)){_=T;$=ca;aa=ea;ba=fa}else{X=ea;Y=ca;Z=T;break}}}}while(0);if((Z|0)<=(S|0)){fa=Z;aa=Y;while(1){Y=X+aa;h[n+(fa<<3)>>3]=Y;if((fa|0)<(S|0)){fa=fa+1|0;aa=Y}else{break}}}if((a[213992]|0)!=0){fa=c[o>>2]|0;Ma(127712,18,1,fa|0)|0;Z=0;while(1){gc(fa|0,115384,(A=i,i=i+8|0,h[A>>3]=+h[n+(Z<<3)>>3],A)|0)|0;i=A;if((Z|0)<(S|0)){Z=Z+1|0}else{break}}Ka(10,fa|0)|0}fa=ux(b)|0;if((fa|0)!=0){Z=fa;do{fa=Z+8|0;S=c[fa>>2]|0;A=c[S+112>>2]|0;aa=+h[n+(c[A+12>>2]<<3)>>3];X=aa*+V(+h[A+32>>3]);h[c[S+132>>2]>>3]=X;S=c[fa>>2]|0;X=aa*+W(+h[(c[S+112>>2]|0)+32>>3]);h[(c[S+132>>2]|0)+8>>3]=X;Z=vx(b,Z)|0;}while((Z|0)!=0)}eF(y);j=v;i=e;return j|0}function Ku(a,b){a=a|0;b=b|0;var d=0,e=0.0,f=0,g=0.0,i=0,j=0,k=0,l=0.0;d=c[(c[b+8>>2]|0)+112>>2]|0;if((c[d+16>>2]|0)==0){e=0.0}else{e=+h[d+32>>3]- +h[d+24>>3]*.5}d=rw(a,b)|0;if((d|0)==0){return}else{f=d;g=e}while(1){d=c[f>>2]&3;i=c[((d|0)==3?f:f+32|0)+28>>2]|0;if((i|0)==(b|0)){j=c[((d|0)==2?f:f-32|0)+28>>2]|0}else{j=i}i=j+8|0;d=c[(c[i>>2]|0)+112>>2]|0;do{if((c[d+16>>2]|0)==(b|0)){k=d+32|0;if(+h[k>>3]!=10.0){l=g;break}h[k>>3]=g+ +h[d+24>>3]*.5;k=c[(c[i>>2]|0)+112>>2]|0;e=g+ +h[k+24>>3];if((c[k+8>>2]|0)==0){l=e;break}Ku(a,j);l=e}else{l=g}}while(0);i=sw(a,f,b)|0;if((i|0)==0){break}else{f=i;g=l}}return}function Lu(a,b){a=a|0;b=b|0;var d=0,e=0.0,f=0,g=0,i=0,j=0;d=c[(c[b+8>>2]|0)+112>>2]|0;e=+h[d+24>>3]/+((c[d+4>>2]|0)>>>0>>>0);d=rw(a,b)|0;if((d|0)==0){return}else{f=d}do{d=c[f>>2]&3;g=c[((d|0)==3?f:f+32|0)+28>>2]|0;if((g|0)==(b|0)){i=c[((d|0)==2?f:f-32|0)+28>>2]|0}else{i=g}g=i+8|0;d=c[(c[g>>2]|0)+112>>2]|0;do{if((c[d+16>>2]|0)==(b|0)){j=d+24|0;if(+h[j>>3]!=0.0){break}h[j>>3]=e*+((c[d+4>>2]|0)>>>0>>>0);if((c[(c[(c[g>>2]|0)+112>>2]|0)+8>>2]|0)==0){break}Lu(a,i)}}while(0);f=sw(a,f,b)|0;}while((f|0)!=0);return}function Mu(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=(c[c[(c[b+8>>2]|0)+112>>2]>>2]|0)+1|0;f=rw(a,b)|0;if((f|0)==0){return}else{g=f}do{f=c[g>>2]&3;h=c[((f|0)==3?g:g+32|0)+28>>2]|0;if((h|0)==(b|0)){i=c[((f|0)==2?g:g-32|0)+28>>2]|0}else{i=h}do{if((i|0)!=(d|0)){h=c[(c[i+8>>2]|0)+112>>2]|0;if(e>>>0>=(c[h>>2]|0)>>>0){break}c[h>>2]=e;Mu(a,i,b)}}while(0);g=sw(a,g,b)|0;}while((g|0)!=0);return}function Nu(a){a=a|0;var d=0,e=0,f=0,g=0,i=0,j=0,k=0.0;qn(a,2);d=a+8|0;b[(c[d>>2]|0)+168>>1]=2;c[53568]=2;e=Lw(a)|0;f=jk(e*40|0)|0;g=jk((e<<2)+4|0)|0;c[(c[d>>2]|0)+144>>2]=g;g=ux(a)|0;if((g|0)!=0){e=0;i=g;while(1){qt(i);c[(c[i+8>>2]|0)+112>>2]=f+(e*40|0);c[(c[(c[d>>2]|0)+144>>2]|0)+(e<<2)>>2]=i;g=vx(a,i)|0;if((g|0)==0){break}else{e=e+1|0;i=g}}}i=ux(a)|0;if((i|0)==0){return}else{j=i}do{i=mw(a,j)|0;if((i|0)!=0){e=i;do{i=e|0;Wx(i,92664,176,1)|0;Zm(e)|0;k=+Fm(i,c[53750]|0,1.0,0.0);h[(c[e+8>>2]|0)+128>>3]=k;e=ow(a,e)|0;}while((e|0)!=0)}j=vx(a,j)|0;}while((j|0)!=0);return}function Ou(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0.0,u=0,v=0.0,w=0.0,x=0.0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;d=i;i=i+56|0;e=d|0;f=d+16|0;g=d+24|0;if((Lw(b)|0)==0){i=d;return}Nu(b);j=b|0;ew(j,108264)|0;k=ew(j,108264)|0;do{if((k|0)==0){l=0;m=0}else{if((a[k]|0)==0){l=0;m=1;break}n=Ax(b,k,0)|0;if((n|0)!=0){l=n;m=0;break}Fv(0,148416,(p=i,i=i+8|0,c[p>>2]=k,p)|0)|0;i=p;Fv(3,120912,(p=i,i=i+1|0,i=i+7&-8,c[p>>2]=0,p)|0)|0;i=p;l=0;m=1}}while(0);k=ew(j,112160)|0;do{if((k|0)==0){q=0}else{if((a[k]|0)==0){q=0;break}n=e|0;r=e+8|0;s=ac(k|0,105200,(p=i,i=i+16|0,c[p>>2]=n,c[p+8>>2]=r,p)|0)|0;i=p;if((s|0)==0){q=0;break}else if((s|0)==1){h[r>>3]=+h[n>>3]}if((a[213992]|0)==0){q=1;break}t=+h[r>>3];gc(c[o>>2]|0,99120,(p=i,i=i+16|0,h[p>>3]=+h[n>>3],h[p+8>>3]=t,p)|0)|0;i=p;q=1}}while(0);if((Lw(b)|0)==0){u=l}else{p=iv(b,f,0)|0;if((c[f>>2]|0)==1){k=Ju(b,l)|0;n=(m|0)!=0&(l|0)==0?k:l;r=(ux(b)|0)+8|0;eF(c[(c[r>>2]|0)+112>>2]|0);c[(c[r>>2]|0)+112>>2]=0;do{if((q|0)!=0){t=+h[e>>3];v=+h[e+8>>3];r=c[(c[k+8>>2]|0)+132>>2]|0;w=+h[r>>3];x=+h[r+8>>3];r=ux(b)|0;if((r|0)==0){break}else{y=r}do{if((y|0)!=(k|0)){r=y+8|0;s=c[(c[r>>2]|0)+132>>2]|0;h[s>>3]=w+t*(+h[s>>3]-w);s=(c[(c[r>>2]|0)+132>>2]|0)+8|0;h[s>>3]=x+v*(+h[s>>3]-x)}y=vx(b,y)|0;}while((y|0)!=0)}}while(0);nr(b)|0;Pt(b);z=n}else{tv(b,2,8,g)|0;c[g+12>>2]=0;if((c[f>>2]|0)>0){n=(q|0)==0;q=e|0;y=e+8|0;if((m|0)==0){e=0;while(1){k=c[p+(e<<2)>>2]|0;if((l|0)==0){A=24}else{if((Rx(k,l|0)|0)==0){A=24}else{B=l}}if((A|0)==24){A=0;B=0}jv(k)|0;s=Ju(k,B)|0;do{if(!n){x=+h[q>>3];v=+h[y>>3];r=c[(c[s+8>>2]|0)+132>>2]|0;w=+h[r>>3];t=+h[r+8>>3];r=ux(k)|0;if((r|0)==0){break}else{C=r}do{if((C|0)!=(s|0)){r=C+8|0;D=c[(c[r>>2]|0)+132>>2]|0;h[D>>3]=w+x*(+h[D>>3]-w);D=(c[(c[r>>2]|0)+132>>2]|0)+8|0;h[D>>3]=t+v*(+h[D>>3]-t)}C=vx(k,C)|0;}while((C|0)!=0)}}while(0);nr(k)|0;s=e+1|0;if((s|0)<(c[f>>2]|0)){e=s}else{E=l;break}}}else{e=l;C=0;while(1){B=c[p+(C<<2)>>2]|0;s=(e|0)!=0;if(s){if((Rx(B,e|0)|0)==0){A=33}else{F=e}}else{A=33}if((A|0)==33){A=0;F=0}jv(B)|0;D=Ju(B,F)|0;r=s?e:D;do{if(!n){t=+h[q>>3];v=+h[y>>3];s=c[(c[D+8>>2]|0)+132>>2]|0;w=+h[s>>3];x=+h[s+8>>3];s=ux(B)|0;if((s|0)==0){break}else{G=s}do{if((G|0)!=(D|0)){s=G+8|0;H=c[(c[s>>2]|0)+132>>2]|0;h[H>>3]=w+t*(+h[H>>3]-w);H=(c[(c[s>>2]|0)+132>>2]|0)+8|0;h[H>>3]=x+v*(+h[H>>3]-x)}G=vx(B,G)|0;}while((G|0)!=0)}}while(0);nr(B)|0;D=C+1|0;if((D|0)<(c[f>>2]|0)){e=r;C=D}else{E=r;break}}}}else{E=l}l=(ux(b)|0)+8|0;eF(c[(c[l>>2]|0)+112>>2]|0);c[(c[l>>2]|0)+112>>2]=0;sv(c[f>>2]|0,p,b,g)|0;Pt(b);z=E}if((c[f>>2]|0)>0){E=0;do{Gx(b,c[p+(E<<2)>>2]|0)|0;E=E+1|0;}while((E|0)<(c[f>>2]|0))}eF(p);u=z}if((m|0)!=0){gw(j,108264,$w(u|0)|0)|0}Xk(b);i=d;return}function Pu(a){a=a|0;var b=0,d=0,e=0;b=ux(a)|0;if((b|0)==0){return}else{d=b}do{b=mw(a,d)|0;if((b|0)!=0){e=b;do{tn(e);e=ow(a,e)|0;}while((e|0)!=0)}un(d);d=vx(a,d)|0;}while((d|0)!=0);eF(c[(c[a+8>>2]|0)+144>>2]|0);if((Ix(a|0)|0)==(a|0)){return}_x(a,0,98352);return}function Qu(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0.0;b=i;i=i+32|0;d=b|0;e=Wv(a,1,119608,0)|0;f=Wv(a,0,119608,0)|0;g=Ru(a,f,e,Wv(a,0,157512,0)|0)|0;j=+T(+h[g>>3]+.1);_u(d,0.0,0.0,j,j);a=g+16|0;e=d;c[a>>2]=c[e>>2];c[a+4>>2]=c[e+4>>2];c[a+8>>2]=c[e+8>>2];c[a+12>>2]=c[e+12>>2];c[a+16>>2]=c[e+16>>2];c[a+20>>2]=c[e+20>>2];c[a+24>>2]=c[e+24>>2];c[a+28>>2]=c[e+28>>2];Su(g);Tu(g);Uu(g);i=b;return}function Ru(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0.0,p=0,q=0,r=0,s=0,t=0.0,u=0,v=0,w=0.0,x=0,y=0,z=0,A=0,B=0.0,C=0.0,D=0,E=0,F=0,G=0,H=0,I=0.0;f=jk(72)|0;g=f;c[f+60>>2]=0;i=f+56|0;c[i>>2]=a;j=a+8|0;k=c[j>>2]|0;if((c[k+172>>2]|0)<1){l=0;m=0;n=0;o=0.0}else{p=0;q=0;r=1;s=0;t=0.0;u=k;while(1){k=Ru(c[(c[u+176>>2]|0)+(r<<2)>>2]|0,b,d,e)|0;v=s+1|0;w=t+ +h[k>>3];x=(p|0)==0?k:p;if((q|0)!=0){c[q+52>>2]=k}y=c[j>>2]|0;if((r|0)<(c[y+172>>2]|0)){p=x;q=k;r=r+1|0;s=v;t=w;u=y}else{l=x;m=k;n=v;o=w;break}}}u=ux(a)|0;if((u|0)==0){z=l;A=n;B=o}else{s=u;u=l;l=m;m=n;t=o;while(1){n=s+8|0;if((c[c[(c[n>>2]|0)+112>>2]>>2]|0)==0){r=jk(72)|0;q=r;o=+Fm(s|0,d,1.0,0.0);w=o==0.0?1.0e3:o*1.0e3;h[r>>3]=w;c[r+60>>2]=1;c[r+56>>2]=s;if((l|0)!=0){c[l+52>>2]=q}c[c[(c[n>>2]|0)+112>>2]>>2]=a;C=t+w;D=m+1|0;E=q;F=(u|0)==0?q:u}else{C=t;D=m;E=l;F=u}q=vx(a,s)|0;if((q|0)==0){z=F;A=D;B=C;break}else{s=q;u=F;l=E;m=D;t=C}}}c[f+64>>2]=A;if((A|0)==0){C=+Fm(a|0,b,1.0,0.0);h[f>>3]=C==0.0?1.0e3:C*1.0e3;G=f+48|0;H=G;c[H>>2]=z;return g|0}b=f+8|0;h[b>>3]=B;B=+Fm(c[i>>2]|0,e,0.0,0.0);if(B==0.0){I=+h[b>>3]}else{C=B*2.0+ +T(+h[b>>3]);I=C*C}h[f>>3]=I;G=f+48|0;H=G;c[H>>2]=z;return g|0}function Su(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0.0,s=0,t=0.0,u=0.0,v=0.0,w=0.0,x=0,y=0,z=0.0,A=0,B=0;d=i;i=i+32|0;e=d|0;f=c[b+64>>2]|0;if((f|0)==0){i=d;return}g=jk(f<<2)|0;j=g;k=b+48|0;l=(f|0)>0;if(l){m=0;n=k;while(1){p=c[n>>2]|0;c[j+(m<<2)>>2]=p;q=m+1|0;if((q|0)<(f|0)){m=q;n=p+52|0}else{break}}}Jb(g|0,f|0,4,80);n=jk(f<<3)|0;m=n;if(l){p=0;do{h[m+(p<<3)>>3]=+h[c[j+(p<<2)>>2]>>3];p=p+1|0;}while((p|0)<(f|0))}r=+h[b+8>>3];if(+h[b>>3]==r){s=Zu(f,m,b+16|0)|0}else{t=+h[b+40>>3];u=+h[b+32>>3];h[e>>3]=+h[b+16>>3];h[e+8>>3]=+h[b+24>>3];v=t-u;w=(t+u- +T(v*v+r*4.0))*.5;h[e+16>>3]=u-w;h[e+24>>3]=t-w;s=Zu(f,m,e)|0}if((a[213992]|0)!=0){w=+h[b+24>>3];t=+h[b+32>>3];u=+h[b+40>>3];gc(c[o>>2]|0,108224,(x=i,i=i+32|0,h[x>>3]=+h[b+16>>3],h[x+8>>3]=w,h[x+16>>3]=t,h[x+24>>3]=u,x)|0)|0;i=x}if(!l){eF(g);eF(n);eF(s);i=d;return}b=c[o>>2]|0;e=0;do{p=s+(e<<5)|0;q=(c[j+(e<<2)>>2]|0)+16|0;y=p;c[q>>2]=c[y>>2];c[q+4>>2]=c[y+4>>2];c[q+8>>2]=c[y+8>>2];c[q+12>>2]=c[y+12>>2];c[q+16>>2]=c[y+16>>2];c[q+20>>2]=c[y+20>>2];c[q+24>>2]=c[y+24>>2];c[q+28>>2]=c[y+28>>2];if((a[213992]|0)!=0){u=+h[p>>3];t=+h[s+(e<<5)+16>>3];w=t*.5;r=+h[s+(e<<5)+8>>3];v=+h[s+(e<<5)+24>>3];z=v*.5;gc(b|0,102600,(x=i,i=i+80|0,h[x>>3]=+h[m+(e<<3)>>3],h[x+8>>3]=u-w,h[x+16>>3]=r-z,h[x+24>>3]=u+w,h[x+32>>3]=r+z,h[x+40>>3]=t*v,h[x+48>>3]=u,h[x+56>>3]=r,h[x+64>>3]=t,h[x+72>>3]=v,x)|0)|0;i=x}e=e+1|0;}while((e|0)<(f|0));eF(g);eF(n);eF(s);if(l){A=0;B=k}else{i=d;return}while(1){k=c[B>>2]|0;if((c[k+60>>2]|0)==0){Su(k)}l=A+1|0;if((l|0)<(f|0)){A=l;B=k+52|0}else{break}}i=d;return}function Tu(b){b=b|0;var d=0,e=0,f=0,g=0,j=0.0,k=0.0,l=0.0,m=0.0,n=0,p=0;d=i;i=i+40|0;e=d|0;if((c[b+60>>2]|0)==0){f=c[b+48>>2]|0;if((f|0)!=0){g=f;do{Tu(g);g=c[g+52>>2]|0;}while((g|0)!=0)}j=+h[b+32>>3];k=+h[b+40>>3];l=+h[b+16>>3]-j*.5;m=+h[b+24>>3]-k*.5;g=c[(c[b+56>>2]|0)+8>>2]|0;h[g+16>>3]=l;h[g+24>>3]=m;h[g+32>>3]=j+l;h[g+40>>3]=k+m;i=d;return}m=+h[b+24>>3];k=+h[b+32>>3];l=+h[b+40>>3];g=c[b+56>>2]|0;f=g+8|0;n=c[f>>2]|0;h[n+16>>3]=+h[b+16>>3];h[n+24>>3]=m;h[(c[f>>2]|0)+32>>3]=k/72.0;h[(c[f>>2]|0)+40>>3]=l/72.0;n=g|0;vn(g,c[(c[(Hx(n)|0)+8>>2]|0)+116>>2]&1);b=e|0;e=c[53624]|0;do{if((e|0)!=0){if((a[fw(n,e)|0]|0)!=0){break}nb(b|0,115344,(p=i,i=i+8|0,h[p>>3]=+h[(c[f>>2]|0)+80>>3]*.7,p)|0)|0;i=p;hw(n,c[53624]|0,b)|0}}while(0);Ym(g);if((a[213992]|0)==0){i=d;return}g=c[o>>2]|0;b=$w(n)|0;n=c[f>>2]|0;l=+h[n+16>>3];k=+h[n+24>>3];m=+h[n+80>>3];j=+h[n+88>>3]+ +h[n+96>>3];gc(g|0,127608,(p=i,i=i+40|0,c[p>>2]=b,h[p+8>>3]=l,h[p+16>>3]=k,h[p+24>>3]=m,h[p+32>>3]=j,p)|0)|0;i=p;i=d;return}function Uu(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=c[a+64>>2]|0;if((b|0)<=0){d=a;eF(d);return}e=0;f=a+48|0;while(1){g=c[f>>2]|0;Uu(g);h=e+1|0;if((h|0)<(b|0)){e=h;f=g+52|0}else{break}}d=a;eF(d);return}function Vu(a,b){a=a|0;b=b|0;var d=0.0,e=0;d=+h[c[a>>2]>>3]- +h[c[b>>2]>>3];if(d<0.0){e=1;return e|0}e=(d>0.0)<<31>>31;return e|0}function Wu(a){a=a|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;c[53590]=Wv(a,1,142256,119360)|0;qn(a,2);d=a+8|0;b[(c[d>>2]|0)+168>>1]=2;c[53568]=2;Yu(a,0);e=jk((Lw(a)|0)<<2)|0;f=jk(((Lw(a)|0)<<2)+4|0)|0;c[(c[d>>2]|0)+144>>2]=f;f=ux(a)|0;if((f|0)!=0){g=0;h=f;while(1){f=h|0;Wx(f,110896,304,1)|0;c[(c[h+8>>2]|0)+112>>2]=e+(g<<2);i=g+1|0;c[(c[(c[d>>2]|0)+144>>2]|0)+(g<<2)>>2]=h;gw(f,142256,119360)|0;f=mw(a,h)|0;if((f|0)!=0){j=f;do{Wx(j|0,109720,304,1)|0;j=ow(a,j)|0;}while((j|0)!=0)}j=vx(a,h)|0;if((j|0)==0){break}else{g=i;h=j}}}do{if((Lw(a)|0)==0){if((c[(c[d>>2]|0)+172>>2]|0)!=0){break}return}}while(0);Qu(a);Xk(a);return}function Xu(a){a=a|0;var b=0,d=0,e=0;b=ux(a)|0;if((b|0)==0){return}eF(c[(c[b+8>>2]|0)+112>>2]|0);d=b;do{b=mw(a,d)|0;if((b|0)!=0){e=b;do{tn(e);e=ow(a,e)|0;}while((e|0)!=0)}un(d);d=vx(a,d)|0;}while((d|0)!=0);eF(c[(c[a+8>>2]|0)+144>>2]|0);if((Ix(a|0)|0)==(a|0)){return}_x(a,0,96984);return}function Yu(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;d=i;i=i+16|0;e=d|0;f=(b|0)==0;if(f){c[e>>2]=0;c[e+4>>2]=0;c[e+8>>2]=0;g=e}else{g=b}b=sy(a)|0;if((b|0)!=0){h=g+8|0;j=g+4|0;k=g|0;l=b;do{b=l|0;if((Za($w(b)|0,103864,7)|0)==0){Wx(b,96984,272,1)|0;b=(c[h>>2]|0)+1|0;c[h>>2]=b;m=c[j>>2]|0;if((b|0)<(m|0)){n=b;o=c[k>>2]|0}else{b=m+10|0;c[j>>2]=b;m=mk(c[k>>2]|0,b<<2)|0;c[k>>2]=m;n=c[h>>2]|0;o=m}c[o+(n<<2)>>2]=l;Yu(l,0)}else{Yu(l,g)}l=ty(l)|0;}while((l|0)!=0)}if(!f){i=d;return}f=e+8|0;l=a+8|0;c[(c[l>>2]|0)+172>>2]=c[f>>2];a=c[f>>2]|0;if((a|0)==0){i=d;return}f=mk(c[e>>2]|0,(a<<2)+4|0)|0;c[(c[l>>2]|0)+176>>2]=f;i=d;return}function Zu(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,j=0,l=0.0,m=0.0,n=0,p=0.0,q=0,r=0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0,L=0,M=0,N=0.0,O=0.0,P=0.0,Q=0.0,R=0.0,S=0.0,T=0.0,U=0.0,V=0.0,W=0.0,X=0.0,Y=0.0;g=i;j=f;f=i;i=i+32|0;tF(f,j,32)|0;if((b|0)>0){l=0.0;j=0;while(1){m=l+ +h[e+(j<<3)>>3];n=j+1|0;if((n|0)<(b|0)){l=m;j=n}else{p=m;break}}}else{p=0.0}l=+h[f+16>>3];m=+h[f+24>>3];if(p>l*m+.001){q=0;i=g;return q|0}j=jk(b<<5)|0;if((b|0)<1){q=j;i=g;return q|0}n=f+8|0;r=f|0;p=(c[k>>2]=d[n]|d[n+1|0]<<8|d[n+2|0]<<16|d[n+3|0]<<24,c[k+4>>2]=d[n+4|0]|d[n+5|0]<<8|d[n+6|0]<<16|d[n+7|0]<<24,+h[k>>3]);n=c[o>>2]|0;f=b;b=e;e=j;s=1.0;t=l;u=m;v=l<m?l:m;w=(c[k>>2]=d[r]|d[r+1|0]<<8|d[r+2|0]<<16|d[r+3|0]<<24,c[k+4>>2]=d[r+4|0]|d[r+5|0]<<8|d[r+6|0]<<16|d[r+7|0]<<24,+h[k>>3]);x=p;p=l;l=m;while(1){m=t<u?t:u;r=0;y=0.0;z=s;A=0.0;B=1.0;C=v;while(1){if((a[213992]|0)!=0){gc(n|0,159552,(D=i,i=i+32|0,h[D>>3]=w,h[D+8>>3]=t,h[D+16>>3]=x,h[D+24>>3]=u,D)|0)|0;i=D;gc(n|0,163216,(D=i,i=i+8|0,c[D>>2]=r,D)|0)|0;i=D}if((r|0)==0){E=+h[b>>3];F=C*C;G=E/F;H=F/E;r=1;y=E;z=E;A=E;B=G>H?G:H;C=m;continue}if((r|0)>=(f|0)){break}H=+h[b+(r<<3)>>3];G=H<y?y:H;E=H>z?z:H;F=A+H;H=F/C;I=H/(E/H);J=G/H/H;H=I>J?I:J;if(H>B){break}r=r+1|0;y=G;z=E;A=F;B=H;C=m}m=A/C;if((a[213992]|0)!=0){gc(n|0,131176,(D=i,i=i+32|0,c[D>>2]=r,h[D+8>>3]=A,h[D+16>>3]=C,h[D+24>>3]=m,D)|0)|0;i=D}K=(r|0)>0;if(C==t){if(K){B=m*.5;z=l*.5+x-B;L=0;y=w-t*.5;while(1){h[e+(L<<5)+24>>3]=m;H=+h[b+(L<<3)>>3]/m;h[e+(L<<5)+16>>3]=H;h[e+(L<<5)+8>>3]=z;h[e+(L<<5)>>3]=y+H*.5;M=L+1|0;if((M|0)<(r|0)){L=M;y=y+H}else{N=l;O=p;P=B;break}}}else{N=u;O=t;P=m*.5}B=N-m;Q=O;R=B;S=w;T=x-P;U=p;V=B}else{if(K){B=m*.5;y=w-p*.5+B;L=0;z=x+u*.5;while(1){h[e+(L<<5)+16>>3]=m;C=+h[b+(L<<3)>>3]/m;h[e+(L<<5)+24>>3]=C;h[e+(L<<5)>>3]=y;h[e+(L<<5)+8>>3]=z-C*.5;M=L+1|0;if((M|0)<(r|0)){L=M;z=z-C}else{W=p;X=l;Y=B;break}}}else{W=t;X=u;Y=m*.5}B=W-m;Q=B;R=X;S=w+Y;T=x;U=B;V=l}L=f-r|0;if((L|0)<1){q=j;break}else{f=L;b=b+(r<<3)|0;e=e+(r<<5)|0;s=0.0;t=Q;u=R;v=Q<R?Q:R;w=S;x=T;p=U;l=V}}i=g;return q|0}function _u(a,b,c,d,e){a=a|0;b=+b;c=+c;d=+d;e=+e;h[a>>3]=b;h[a+8>>3]=c;h[a+16>>3]=d;h[a+24>>3]=e;return}function $u(a){a=a|0;var d=0,e=0,f=0,g=0;qn(a,2);d=a+8|0;b[(c[d>>2]|0)+168>>1]=2;c[53568]=2;e=ux(a)|0;if((e|0)!=0){f=e;do{qt(f);f=vx(a,f)|0;}while((f|0)!=0)}f=ux(a)|0;if((f|0)!=0){e=f;do{f=mw(a,e)|0;if((f|0)!=0){g=f;do{Wx(g|0,81536,176,1)|0;Zm(g)|0;g=ow(a,g)|0;}while((g|0)!=0)}e=vx(a,e)|0;}while((e|0)!=0)}av(a,0);bv(a,0);cv(a,0);e=c[d>>2]|0;if((c[(c[e+8>>2]|0)+84>>2]|0)==0){d=b[e+128>>1]&14;if((d|0)==0){Xk(a);return}Lt(a,d)|0;Xk(a);return}else{d=ux(a)|0;if((d|0)!=0){e=d;do{d=e+8|0;g=c[d>>2]|0;h[c[g+132>>2]>>3]=+h[g+16>>3]/72.0;g=c[d>>2]|0;h[(c[g+132>>2]|0)+8>>3]=+h[g+24>>3]/72.0;e=vx(a,e)|0;}while((e|0)!=0)}Nt(a);Xk(a);return}}function av(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;d=i;i=i+16|0;e=d|0;f=(b|0)==0;if(f){c[e>>2]=0;c[e+4>>2]=0;c[e+8>>2]=0;g=e}else{g=b}b=sy(a)|0;if((b|0)!=0){h=g+8|0;j=g+4|0;k=g|0;l=b;do{b=l|0;if((Za($w(b)|0,91512,7)|0)==0){Wx(b,86256,272,1)|0;Rj(l);b=(c[h>>2]|0)+1|0;c[h>>2]=b;m=c[j>>2]|0;if((b|0)<(m|0)){n=b;o=c[k>>2]|0}else{b=m+10|0;c[j>>2]=b;m=mk(c[k>>2]|0,b<<2)|0;c[k>>2]=m;n=c[h>>2]|0;o=m}c[o+(n<<2)>>2]=l;av(l,0)}else{av(l,g)}l=ty(l)|0;}while((l|0)!=0)}if(!f){i=d;return}f=e+8|0;l=a+8|0;c[(c[l>>2]|0)+172>>2]=c[f>>2];a=c[f>>2]|0;if((a|0)==0){i=d;return}f=mk(c[e>>2]|0,(a<<2)+4|0)|0;c[(c[l>>2]|0)+176>>2]=f;i=d;return}function bv(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0.0,E=0.0,F=0,G=0,H=0,I=0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,P=0.0,Q=0.0,R=0.0,S=0.0,T=0.0,U=0.0,V=0.0,W=0.0,X=0.0,Y=0.0,Z=0.0,_=0.0,$=0.0,aa=0.0,ba=0.0,ca=0.0,da=0.0,ea=0.0,fa=0.0,ga=0,ha=0,ia=0;e=i;i=i+32|0;f=e|0;g=c[a+48>>2]|0;if((d[213992]|0)>>>0>1>>>0){j=c[o>>2]|0;if((b|0)>0){k=b;do{Ma(115328,2,1,j|0)|0;k=k-1|0;}while((k|0)>0)}k=$w(a|0)|0;gc(j|0,108208,(l=i,i=i+8|0,c[l>>2]=k,l)|0)|0;i=l}k=a+8|0;j=c[k>>2]|0;if((c[j+172>>2]|0)<1){m=0}else{n=b+1|0;p=0;q=1;r=j;while(1){j=c[(c[r+176>>2]|0)+(q<<2)>>2]|0;bv(j,n);s=(Lw(j)|0)+p|0;j=c[k>>2]|0;if((q|0)<(c[j+172>>2]|0)){p=s;q=q+1|0;r=j}else{m=s;break}}}r=(Lw(a)|0)-m|0;m=c[k>>2]|0;q=(c[m+172>>2]|0)+r|0;p=(q|0)==0;do{if(p){if((c[m+12>>2]|0)!=0){break}h[m+24>>3]=0.0;h[(c[k>>2]|0)+16>>3]=0.0;h[(c[k>>2]|0)+40>>3]=18.0;h[(c[k>>2]|0)+32>>3]=18.0;i=e;return}}while(0);m=f+16|0;do{if((tv(a,4,4,f)|0)>>>0<3>>>0){c[m>>2]=3;t=0;u=0}else{if((c[m>>2]|0)!=4){t=0;u=0;break}if((c[f+28>>2]&2|0)==0){t=0;u=0;break}n=Wv(g,0,102592,0)|0;s=Wv(g,1,102592,0)|0;if((n|0)==0&(s|0)==0){j=$w(a|0)|0;Fv(0,96896,(l=i,i=i+8|0,c[l>>2]=j,l)|0)|0;i=l;t=0;u=0;break}else{c[f+24>>2]=jk(q)|0;t=s;u=n;break}}}while(0);g=jk(q<<5)|0;m=g;n=jk(q<<2)|0;s=n;j=c[k>>2]|0;if((c[j+172>>2]|0)<1){v=0}else{w=f+24|0;x=(u|0)==0;y=0;z=1;A=j;while(1){j=c[(c[A+176>>2]|0)+(z<<2)>>2]|0;B=m+(y<<5)|0;C=(c[j+8>>2]|0)+16|0;c[B>>2]=c[C>>2];c[B+4>>2]=c[C+4>>2];c[B+8>>2]=c[C+8>>2];c[B+12>>2]=c[C+12>>2];c[B+16>>2]=c[C+16>>2];c[B+20>>2]=c[C+20>>2];c[B+24>>2]=c[C+24>>2];c[B+28>>2]=c[C+28>>2];C=j|0;if(!((c[w>>2]|0)==0|x)){j=Em(C,u,0,0)|0;c[(c[w>>2]|0)+(y<<2)>>2]=j}j=y+1|0;c[s+(y<<2)>>2]=C;C=c[k>>2]|0;if((z|0)<(c[C+172>>2]|0)){y=j;z=z+1|0;A=C}else{v=j;break}}}a:do{if((r|0)>0){A=ux(a)|0;if((A|0)==0){break}z=a|0;y=f+24|0;if((t|0)==0){w=A;u=v;while(1){x=w+8|0;j=(c[x>>2]|0)+112|0;if((c[j>>2]|0)==0){c[j>>2]=z;j=c[x>>2]|0;D=+h[j+88>>3]+ +h[j+96>>3];E=+h[j+80>>3];vF(m+(u<<5)|0,0,16)|0;h[m+(u<<5)+16>>3]=D;h[m+(u<<5)+24>>3]=E;c[s+(u<<2)>>2]=w;F=u+1|0}else{F=u}j=vx(a,w)|0;if((j|0)==0){break a}else{w=j;u=F}}}else{G=A;H=v}while(1){u=G+8|0;w=(c[u>>2]|0)+112|0;if((c[w>>2]|0)==0){c[w>>2]=z;w=c[u>>2]|0;E=+h[w+88>>3]+ +h[w+96>>3];D=+h[w+80>>3];vF(m+(H<<5)|0,0,16)|0;h[m+(H<<5)+16>>3]=E;h[m+(H<<5)+24>>3]=D;w=G|0;if((c[y>>2]|0)!=0){u=Em(w,t,0,0)|0;c[(c[y>>2]|0)+(H<<2)>>2]=u}c[s+(H<<2)>>2]=w;I=H+1|0}else{I=H}w=vx(a,G)|0;if((w|0)==0){break}else{G=w;H=I}}}}while(0);I=ov(q,m,f)|0;H=c[f+24>>2]|0;if((H|0)!=0){eF(H)}H=(q|0)>0;if(H){G=(b|0)>0;t=c[o>>2]|0;D=-2147483647.0;E=-2147483647.0;J=2147483647.0;K=2147483647.0;v=0;while(1){L=+(c[I+(v<<3)>>2]|0);M=+(c[I+(v<<3)+4>>2]|0);N=L+ +h[m+(v<<5)>>3];O=L+ +h[m+(v<<5)+16>>3];L=M+ +h[m+(v<<5)+8>>3];P=M+ +h[m+(v<<5)+24>>3];M=K<N?K:N;Q=J<L?J:L;R=E>O?E:O;S=D>P?D:P;F=c[s+(v<<2)>>2]|0;r=F+8|0;y=c[r>>2]|0;z=y+16|0;do{if((v|0)<(c[(c[k>>2]|0)+172>>2]|0)){h[z>>3]=N;h[y+24>>3]=L;h[y+32>>3]=O;h[y+40>>3]=P;if((d[213992]|0)>>>0<=1>>>0){break}if(G){A=b;do{Ma(115328,2,1,t|0)|0;A=A-1|0;}while((A|0)>0)}A=$w(F)|0;gc(t|0,127520,(l=i,i=i+40|0,c[l>>2]=A,h[l+8>>3]=N,h[l+16>>3]=L,h[l+24>>3]=O,h[l+32>>3]=P,l)|0)|0;i=l}else{h[z>>3]=(N+O)*.5;h[y+24>>3]=(L+P)*.5;if((d[213992]|0)>>>0<=1>>>0){break}if(G){A=b;do{Ma(115328,2,1,t|0)|0;A=A-1|0;}while((A|0)>0)}A=$w(F)|0;w=c[r>>2]|0;T=+h[w+16>>3];U=+h[w+24>>3];gc(t|0,157320,(l=i,i=i+24|0,c[l>>2]=A,h[l+8>>3]=T,h[l+16>>3]=U,l)|0)|0;i=l}}while(0);r=v+1|0;if((r|0)<(q|0)){D=S;E=R;J=Q;K=M;v=r}else{V=S;W=R;X=Q;Y=M;break}}}else{V=-2147483647.0;W=-2147483647.0;X=2147483647.0;Y=2147483647.0}v=c[k>>2]|0;t=c[v+12>>2]|0;do{if((t|0)==0){Z=Y;_=X;$=W;aa=V}else{K=+h[t+24>>3];if(p){ba=0.0;ca=0.0;da=K;ea=+h[t+32>>3]}else{ba=Y;ca=X;da=W;ea=V}J=K-(da-ba);if(J<=0.0){Z=ba;_=ca;$=da;aa=ea;break}K=J*.5;Z=ba-K;_=ca;$=da+K;aa=ea}}while(0);t=(b|0)>0;if(t){fa=+((c[f+8>>2]|0)>>>0>>>0)*.5}else{fa=0.0}ea=Z-fa;Z=$+fa;$=_-(fa+ +h[v+56>>3]);_=aa+(fa+ +h[v+88>>3]);if((d[213992]|0)>>>0>1>>>0){if(t){v=c[o>>2]|0;f=b;do{Ma(115328,2,1,v|0)|0;f=f-1|0;}while((f|0)>0)}f=c[o>>2]|0;v=$w(a|0)|0;gc(f|0,127520,(l=i,i=i+40|0,c[l>>2]=v,h[l+8>>3]=ea,h[l+16>>3]=$,h[l+24>>3]=Z,h[l+32>>3]=_,l)|0)|0;i=l}b:do{if(H){v=c[o>>2]|0;if(t){ga=0}else{f=0;while(1){p=c[s+(f<<2)>>2]|0;G=p+8|0;m=c[G>>2]|0;r=m+16|0;fa=+h[r>>3];F=m+24|0;aa=+h[F>>3];do{if((f|0)<(c[(c[k>>2]|0)+172>>2]|0)){y=m+32|0;z=m+40|0;da=fa-ea;ca=aa-$;ba=+h[y>>3]-ea;V=+h[z>>3]-$;h[r>>3]=da;h[F>>3]=ca;h[y>>3]=ba;h[z>>3]=V;if((d[213992]|0)>>>0<=1>>>0){break}z=$w(p)|0;gc(v|0,127520,(l=i,i=i+40|0,c[l>>2]=z,h[l+8>>3]=da,h[l+16>>3]=ca,h[l+24>>3]=ba,h[l+32>>3]=V,l)|0)|0;i=l}else{h[r>>3]=fa-ea;h[F>>3]=aa-$;if((d[213992]|0)>>>0<=1>>>0){break}z=$w(p)|0;y=c[G>>2]|0;V=+h[y+16>>3];ba=+h[y+24>>3];gc(v|0,157320,(l=i,i=i+24|0,c[l>>2]=z,h[l+8>>3]=V,h[l+16>>3]=ba,l)|0)|0;i=l}}while(0);f=f+1|0;if((f|0)>=(q|0)){break b}}}do{f=c[s+(ga<<2)>>2]|0;G=f+8|0;p=c[G>>2]|0;F=p+16|0;M=+h[F>>3];r=p+24|0;Q=+h[r>>3];do{if((ga|0)<(c[(c[k>>2]|0)+172>>2]|0)){m=p+32|0;z=p+40|0;R=M-ea;S=Q-$;aa=+h[m>>3]-ea;fa=+h[z>>3]-$;h[F>>3]=R;h[r>>3]=S;h[m>>3]=aa;h[z>>3]=fa;if((d[213992]|0)>>>0>1>>>0){ha=b}else{break}do{Ma(115328,2,1,v|0)|0;ha=ha-1|0;}while((ha|0)>0);z=$w(f)|0;gc(v|0,127520,(l=i,i=i+40|0,c[l>>2]=z,h[l+8>>3]=R,h[l+16>>3]=S,h[l+24>>3]=aa,h[l+32>>3]=fa,l)|0)|0;i=l}else{h[F>>3]=M-ea;h[r>>3]=Q-$;if((d[213992]|0)>>>0>1>>>0){ia=b}else{break}do{Ma(115328,2,1,v|0)|0;ia=ia-1|0;}while((ia|0)>0);z=$w(f)|0;m=c[G>>2]|0;fa=+h[m+16>>3];aa=+h[m+24>>3];gc(v|0,157320,(l=i,i=i+24|0,c[l>>2]=z,h[l+8>>3]=fa,h[l+16>>3]=aa,l)|0)|0;i=l}}while(0);ga=ga+1|0;}while((ga|0)<(q|0))}}while(0);Q=Z-ea;Z=_-$;_=ea-ea;ea=$-$;q=c[k>>2]|0;h[q+16>>3]=_;h[q+24>>3]=ea;h[q+32>>3]=Q;h[q+40>>3]=Z;if((d[213992]|0)>>>0>1>>>0){if(t){t=c[o>>2]|0;q=b;do{Ma(115328,2,1,t|0)|0;q=q-1|0;}while((q|0)>0)}q=c[o>>2]|0;t=$w(a|0)|0;gc(q|0,127520,(l=i,i=i+40|0,c[l>>2]=t,h[l+8>>3]=_,h[l+16>>3]=ea,h[l+24>>3]=Q,h[l+32>>3]=Z,l)|0)|0;i=l}eF(g);eF(n);eF(I);i=e;return}function cv(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,j=0.0,k=0.0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0.0,v=0.0,w=0.0,x=0.0,y=0,z=0;e=i;f=a+8|0;g=c[f>>2]|0;j=+h[g+16>>3];k=+h[g+24>>3];if((d[213992]|0)>>>0>1>>>0){g=c[o>>2]|0;if((b|0)>0){l=b;do{Ma(115328,2,1,g|0)|0;l=l-1|0;}while((l|0)>0)}l=$w(a|0)|0;gc(g|0,119416,(m=i,i=i+8|0,c[m>>2]=l,m)|0)|0;i=m}l=(b|0)!=0;do{if(l){g=ux(a)|0;if((g|0)==0){break}n=(b|0)>0;p=c[o>>2]|0;q=g;do{g=q+8|0;r=c[g>>2]|0;do{if((c[r+112>>2]|0)==(a|0)){s=r+16|0;h[s>>3]=j+ +h[s>>3];s=(c[g>>2]|0)+24|0;h[s>>3]=k+ +h[s>>3];if((d[213992]|0)>>>0<=1>>>0){break}if(n){s=b;do{Ma(115328,2,1,p|0)|0;s=s-1|0;}while((s|0)>0)}s=$w(q|0)|0;t=c[g>>2]|0;u=+h[t+16>>3];v=+h[t+24>>3];gc(p|0,157320,(m=i,i=i+24|0,c[m>>2]=s,h[m+8>>3]=u,h[m+16>>3]=v,m)|0)|0;i=m}}while(0);q=vx(a,q)|0;}while((q|0)!=0)}}while(0);a=c[f>>2]|0;if((c[a+172>>2]|0)<1){i=e;return}q=(b|0)>0;p=c[o>>2]|0;n=b+1|0;g=1;r=a;while(1){a=c[(c[r+176>>2]|0)+(g<<2)>>2]|0;if(l){s=a+8|0;t=c[s>>2]|0;v=j+ +h[t+16>>3];u=k+ +h[t+24>>3];w=j+ +h[t+32>>3];x=k+ +h[t+40>>3];if((d[213992]|0)>>>0>1>>>0){if(q){y=b;do{Ma(115328,2,1,p|0)|0;y=y-1|0;}while((y|0)>0)}y=$w(a|0)|0;gc(p|0,127520,(m=i,i=i+40|0,c[m>>2]=y,h[m+8>>3]=v,h[m+16>>3]=u,h[m+24>>3]=w,h[m+32>>3]=x,m)|0)|0;i=m;z=c[s>>2]|0}else{z=t}h[z+16>>3]=v;h[z+24>>3]=u;h[z+32>>3]=w;h[z+40>>3]=x}cv(a,n);y=c[f>>2]|0;if((g|0)<(c[y+172>>2]|0)){g=g+1|0;r=y}else{break}}i=e;return}function dv(a){a=a|0;var b=0,c=0;b=ux(a)|0;if((b|0)==0){ev(a);return}else{c=b}do{un(c);c=vx(a,c)|0;}while((c|0)!=0);ev(a);return}function ev(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=a+8|0;a=c[b>>2]|0;d=c[a+176>>2]|0;if((c[a+172>>2]|0)<1){e=d;f=e;eF(f);return}else{g=1;h=d}while(1){d=c[h+(g<<2)>>2]|0;dk(c[(c[d+8>>2]|0)+12>>2]|0);ev(d);d=c[b>>2]|0;a=c[d+176>>2]|0;if((g|0)<(c[d+172>>2]|0)){g=g+1|0;h=a}else{e=a;break}}f=e;eF(f);return}function fv(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,la=0,na=0,oa=0,qa=0,ra=0;g=i;i=i+4256|0;h=1;j=0;k=i;i=i+168|0;c[k>>2]=0;while(1)switch(h|0){case 1:l=g|0;m=g+128|0;n=g+144|0;o=g+160|0;p=ma(20,b|0)|0;if((u|0)!=0&(v|0)!=0){j=CF(c[u>>2]|0,k)|0;if((j|0)>0){h=-1;break}else return 0}u=v=0;if((p|0)==0){h=2;break}else{h=3;break};case 2:c[d>>2]=0;q=0;h=37;break;case 3:if((e|0)==0){r=118752;h=6;break}else{s=e;h=4;break};case 4:t=s+1|0;w=a[s]|0;if((w<<24>>24|0)==95){s=t;h=4;break}else if((w<<24>>24|0)==0){r=e;h=6;break}else{h=5;break};case 5:p=ma(2,w&255|0)|0;if((u|0)!=0&(v|0)!=0){j=CF(c[u>>2]|0,k)|0;if((j|0)>0){h=-1;break}else return 0}u=v=0;if((p|0)==0){r=118752;h=6;break}else{s=t;h=4;break};case 6:x=ma(24,r|0)|0;if((u|0)!=0&(v|0)!=0){j=CF(c[u>>2]|0,k)|0;if((j|0)>0){h=-1;break}else return 0}u=v=0;y=x+25|0;if((y|0)<129){h=7;break}else{h=8;break};case 7:z=l|0;h=9;break;case 8:p=ma(54,y|0)|0;if((u|0)!=0&(v|0)!=0){j=CF(c[u>>2]|0,k)|0;if((j|0)>0){h=-1;break}else return 0}u=v=0;z=p;h=9;break;case 9:wa(172,z|0,r|0)|0;if((u|0)!=0&(v|0)!=0){j=CF(c[u>>2]|0,k)|0;if((j|0)>0){h=-1;break}else return 0}u=v=0;p=ma(18,b|0)|0;if((u|0)!=0&(v|0)!=0){j=CF(c[u>>2]|0,k)|0;if((j|0)>0){h=-1;break}else return 0}u=v=0;if((p|0)==0){h=11;break}else{A=p;h=10;break};case 10:a[(c[A+8>>2]|0)+157|0]=0;p=wa(88,b|0,A|0)|0;if((u|0)!=0&(v|0)!=0){j=CF(c[u>>2]|0,k)|0;if((j|0)>0){h=-1;break}else return 0}u=v=0;if((p|0)==0){h=11;break}else{A=p;h=10;break};case 11:p=ma(54,40)|0;if((u|0)!=0&(v|0)!=0){j=CF(c[u>>2]|0,k)|0;if((j|0)>0){h=-1;break}else return 0}u=v=0;B=p;p=o|0;c[n>>2]=p;c[n+4>>2]=o+4096;c[n+12>>2]=0;c[n+8>>2]=0;C=m|0;c[C>>2]=n;c[m+4>>2]=n;c[m+8>>2]=p;D=BF(178072,h,k)|0;h=38;break;case 38:if((D|0)==0){h=12;break}else{E=1;F=0;G=B;H=0;I=n;h=28;break};case 12:J=ma(18,b|0)|0;if((u|0)!=0&(v|0)!=0){j=CF(c[u>>2]|0,k)|0;if((j|0)>0){h=-1;break}else return 0}u=v=0;if((J|0)==0){K=0;L=0;h=20;break}else{h=13;break};case 13:M=z+x|0;N=0;O=0;P=J;Q=0;h=14;break;case 14:R=c[P+8>>2]|0;if((a[R+157|0]|0)==0){h=15;break}else{S=Q;T=O;U=N;h=19;break};case 15:if((a[R+119|0]|0)==3){h=16;break}else{S=Q;T=O;U=N;h=19;break};case 16:if((O|0)==0){h=17;break}else{V=Q;W=O;X=N;h=18;break};case 17:pa(6,M|0,156992,(Y=i,i=i+8|0,c[Y>>2]=N,Y)|0)|0;if((u|0)!=0&(v|0)!=0){j=CF(c[u>>2]|0,k)|0;if((j|0)>0){h=-1;break}else return 0}u=v=0;i=Y;p=pa(38,b|0,z|0,1)|0;if((u|0)!=0&(v|0)!=0){j=CF(c[u>>2]|0,k)|0;if((j|0)>0){h=-1;break}else return 0}u=v=0;Aa(60,p|0,127304,272,1)|0;if((u|0)!=0&(v|0)!=0){j=CF(c[u>>2]|0,k)|0;if((j|0)>0){h=-1;break}else return 0}u=v=0;c[B+(N<<2)>>2]=p;V=1;W=p;X=N+1|0;h=18;break;case 18:ja(26,b|0,P|0,26,W|0,m|0);if((u|0)!=0&(v|0)!=0){j=CF(c[u>>2]|0,k)|0;if((j|0)>0){h=-1;break}else return 0}u=v=0;S=V;T=W;U=X;h=19;break;case 19:p=wa(88,b|0,P|0)|0;if((u|0)!=0&(v|0)!=0){j=CF(c[u>>2]|0,k)|0;if((j|0)>0){h=-1;break}else return 0}u=v=0;if((p|0)==0){K=U;L=S;h=20;break}else{N=U;O=T;P=p;Q=S;h=14;break};case 20:Z=ma(18,b|0)|0;if((u|0)!=0&(v|0)!=0){j=CF(c[u>>2]|0,k)|0;if((j|0)>0){h=-1;break}else return 0}u=v=0;if((Z|0)==0){_=K;$=B;h=27;break}else{h=21;break};case 21:aa=z+x|0;ba=K;ca=Z;da=B;ea=10;h=22;break;case 22:if((a[(c[ca+8>>2]|0)+157|0]|0)==0){h=23;break}else{fa=ea;ga=da;ha=ba;h=26;break};case 23:pa(6,aa|0,156992,(Y=i,i=i+8|0,c[Y>>2]=ba,Y)|0)|0;if((u|0)!=0&(v|0)!=0){j=CF(c[u>>2]|0,k)|0;if((j|0)>0){h=-1;break}else return 0}u=v=0;i=Y;ia=pa(38,b|0,z|0,1)|0;if((u|0)!=0&(v|0)!=0){j=CF(c[u>>2]|0,k)|0;if((j|0)>0){h=-1;break}else return 0}u=v=0;p=ia|0;Aa(60,p|0,127304,272,1)|0;if((u|0)!=0&(v|0)!=0){j=CF(c[u>>2]|0,k)|0;if((j|0)>0){h=-1;break}else return 0}u=v=0;ja(26,b|0,ca|0,26,p|0,m|0);if((u|0)!=0&(v|0)!=0){j=CF(c[u>>2]|0,k)|0;if((j|0)>0){h=-1;break}else return 0}u=v=0;if((ba|0)==(ea|0)){h=24;break}else{la=ea;na=da;h=25;break};case 24:p=ea<<1;oa=wa(206,da|0,ea<<3|0)|0;if((u|0)!=0&(v|0)!=0){j=CF(c[u>>2]|0,k)|0;if((j|0)>0){h=-1;break}else return 0}u=v=0;la=p;na=oa;h=25;break;case 25:c[na+(ba<<2)>>2]=ia;fa=la;ga=na;ha=ba+1|0;h=26;break;case 26:oa=wa(88,b|0,ca|0)|0;if((u|0)!=0&(v|0)!=0){j=CF(c[u>>2]|0,k)|0;if((j|0)>0){h=-1;break}else return 0}u=v=0;if((oa|0)==0){_=ha;$=ga;h=27;break}else{ba=ha;ca=oa;da=ga;ea=fa;h=22;break};case 27:E=0;F=L;G=$;H=_;I=c[C>>2]|0;h=28;break;case 28:oa=c[I+12>>2]|0;if((oa|0)==0){h=30;break}else{qa=oa;h=29;break};case 29:oa=c[qa+12>>2]|0;ka(150,c[qa>>2]|0);if((u|0)!=0&(v|0)!=0){j=CF(c[u>>2]|0,k)|0;if((j|0)>0){h=-1;break}else return 0}u=v=0;ka(150,qa|0);if((u|0)!=0&(v|0)!=0){j=CF(c[u>>2]|0,k)|0;if((j|0)>0){h=-1;break}else return 0}u=v=0;if((oa|0)==0){h=30;break}else{qa=oa;h=29;break};case 30:if((z|0)==(l|0)){h=32;break}else{h=31;break};case 31:ka(150,z|0);if((u|0)!=0&(v|0)!=0){j=CF(c[u>>2]|0,k)|0;if((j|0)>0){h=-1;break}else return 0}u=v=0;h=32;break;case 32:if((E|0)==0){h=36;break}else{h=33;break};case 33:c[d>>2]=0;if((H|0)>0){ra=0;h=34;break}else{h=35;break};case 34:ma(38,c[G+(ra<<2)>>2]|0)|0;if((u|0)!=0&(v|0)!=0){j=CF(c[u>>2]|0,k)|0;if((j|0)>0){h=-1;break}else return 0}u=v=0;oa=ra+1|0;if((oa|0)<(H|0)){ra=oa;h=34;break}else{h=35;break};case 35:ka(150,G|0);if((u|0)!=0&(v|0)!=0){j=CF(c[u>>2]|0,k)|0;if((j|0)>0){h=-1;break}else return 0}u=v=0;q=0;h=37;break;case 36:oa=wa(206,G|0,H<<2|0)|0;if((u|0)!=0&(v|0)!=0){j=CF(c[u>>2]|0,k)|0;if((j|0)>0){h=-1;break}else return 0}u=v=0;c[d>>2]=H;a[f]=F;q=oa;h=37;break;case 37:i=g;return q|0;case-1:if((j|0)==11){D=v;h=38}u=v=0;break}return 0}function gv(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;kv(g,d);d=g|0;h=g+8|0;i=g+4|0;a:while(1){j=c[h>>2]|0;k=c[i>>2]|0;if((j|0)==(c[k>>2]|0)){if((k|0)==(c[d>>2]|0)){l=12;break}m=c[k+8>>2]|0;c[i>>2]=m;k=c[m+4>>2]|0;c[h>>2]=k;n=k}else{n=j}j=n-4|0;c[h>>2]=j;k=c[j>>2]|0;if((k|0)==0){l=12;break}a[(c[k+8>>2]|0)+157|0]=1;Dc[e&63](k,f);j=rw(b,k)|0;if((j|0)==0){continue}else{o=j}while(1){j=c[o>>2]&3;m=c[((j|0)==3?o:o+32|0)+28>>2]|0;if((m|0)==(k|0)){p=c[((j|0)==2?o:o-32|0)+28>>2]|0}else{p=m}if((a[(c[p+8>>2]|0)+157|0]|0)==0){kv(g,p)}m=sw(b,o,k)|0;if((m|0)==0){continue a}else{o=m}}}if((l|0)==12){return}}function hv(a,b){a=a|0;b=b|0;zx(b,a,1)|0;return}function iv(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0;f=i;i=i+4256|0;g=1;h=0;j=i;i=i+168|0;c[j>>2]=0;while(1)switch(g|0){case 1:k=f|0;l=f+128|0;m=f+144|0;n=f+160|0;o=ma(20,b|0)|0;if((u|0)!=0&(v|0)!=0){h=CF(c[u>>2]|0,j)|0;if((h|0)>0){g=-1;break}else return 0}u=v=0;if((o|0)==0){g=2;break}else{g=3;break};case 2:c[d>>2]=0;p=0;g=30;break;case 3:if((e|0)==0){q=118752;g=6;break}else{r=e;g=4;break};case 4:s=r+1|0;t=a[r]|0;if((t<<24>>24|0)==95){r=s;g=4;break}else if((t<<24>>24|0)==0){q=e;g=6;break}else{g=5;break};case 5:o=ma(2,t&255|0)|0;if((u|0)!=0&(v|0)!=0){h=CF(c[u>>2]|0,j)|0;if((h|0)>0){g=-1;break}else return 0}u=v=0;if((o|0)==0){q=118752;g=6;break}else{r=s;g=4;break};case 6:w=ma(24,q|0)|0;if((u|0)!=0&(v|0)!=0){h=CF(c[u>>2]|0,j)|0;if((h|0)>0){g=-1;break}else return 0}u=v=0;x=w+25|0;if((x|0)<129){g=7;break}else{g=8;break};case 7:y=k|0;g=9;break;case 8:o=ma(54,x|0)|0;if((u|0)!=0&(v|0)!=0){h=CF(c[u>>2]|0,j)|0;if((h|0)>0){g=-1;break}else return 0}u=v=0;if((o|0)==0){p=0;g=30;break}else{y=o;g=9;break};case 9:wa(172,y|0,q|0)|0;if((u|0)!=0&(v|0)!=0){h=CF(c[u>>2]|0,j)|0;if((h|0)>0){g=-1;break}else return 0}u=v=0;o=ma(18,b|0)|0;if((u|0)!=0&(v|0)!=0){h=CF(c[u>>2]|0,j)|0;if((h|0)>0){g=-1;break}else return 0}u=v=0;if((o|0)==0){g=11;break}else{z=o;g=10;break};case 10:a[(c[z+8>>2]|0)+157|0]=0;o=wa(88,b|0,z|0)|0;if((u|0)!=0&(v|0)!=0){h=CF(c[u>>2]|0,j)|0;if((h|0)>0){g=-1;break}else return 0}u=v=0;if((o|0)==0){g=11;break}else{z=o;g=10;break};case 11:A=ma(54,40)|0;if((u|0)!=0&(v|0)!=0){h=CF(c[u>>2]|0,j)|0;if((h|0)>0){g=-1;break}else return 0}u=v=0;o=n|0;c[m>>2]=o;c[m+4>>2]=n+4096;B=m+12|0;c[B>>2]=0;c[m+8>>2]=0;C=l|0;c[C>>2]=m;c[l+4>>2]=m;c[l+8>>2]=o;D=BF(178072,g,j)|0;g=31;break;case 31:if((D|0)==0){g=17;break}else{g=12;break};case 12:o=c[B>>2]|0;if((o|0)==0){g=14;break}else{E=o;g=13;break};case 13:o=c[E+12>>2]|0;ka(150,c[E>>2]|0);if((u|0)!=0&(v|0)!=0){h=CF(c[u>>2]|0,j)|0;if((h|0)>0){g=-1;break}else return 0}u=v=0;ka(150,E|0);if((u|0)!=0&(v|0)!=0){h=CF(c[u>>2]|0,j)|0;if((h|0)>0){g=-1;break}else return 0}u=v=0;if((o|0)==0){g=14;break}else{E=o;g=13;break};case 14:ka(150,A|0);if((u|0)!=0&(v|0)!=0){h=CF(c[u>>2]|0,j)|0;if((h|0)>0){g=-1;break}else return 0}u=v=0;if((y|0)==(k|0)){g=16;break}else{g=15;break};case 15:ka(150,y|0);if((u|0)!=0&(v|0)!=0){h=CF(c[u>>2]|0,j)|0;if((h|0)>0){g=-1;break}else return 0}u=v=0;g=16;break;case 16:c[d>>2]=0;p=0;g=30;break;case 17:F=A;G=ma(18,b|0)|0;if((u|0)!=0&(v|0)!=0){h=CF(c[u>>2]|0,j)|0;if((h|0)>0){g=-1;break}else return 0}u=v=0;if((G|0)==0){H=0;I=F;J=m;g=25;break}else{g=18;break};case 18:K=y+w|0;L=0;M=G;N=F;O=10;g=19;break;case 19:if((a[(c[M+8>>2]|0)+157|0]|0)==0){g=20;break}else{P=O;Q=N;R=L;g=23;break};case 20:pa(6,K|0,156992,(o=i,i=i+8|0,c[o>>2]=L,o)|0)|0;if((u|0)!=0&(v|0)!=0){h=CF(c[u>>2]|0,j)|0;if((h|0)>0){g=-1;break}else return 0}u=v=0;i=o;S=pa(38,b|0,y|0,1)|0;if((u|0)!=0&(v|0)!=0){h=CF(c[u>>2]|0,j)|0;if((h|0)>0){g=-1;break}else return 0}u=v=0;o=S|0;Aa(60,o|0,127304,272,1)|0;if((u|0)!=0&(v|0)!=0){h=CF(c[u>>2]|0,j)|0;if((h|0)>0){g=-1;break}else return 0}u=v=0;ja(26,b|0,M|0,26,o|0,l|0);if((u|0)!=0&(v|0)!=0){h=CF(c[u>>2]|0,j)|0;if((h|0)>0){g=-1;break}else return 0}u=v=0;if((L|0)==(O|0)){g=21;break}else{T=O;U=N;g=22;break};case 21:o=O<<1;V=wa(206,N|0,O<<3|0)|0;if((u|0)!=0&(v|0)!=0){h=CF(c[u>>2]|0,j)|0;if((h|0)>0){g=-1;break}else return 0}u=v=0;T=o;U=V;g=22;break;case 22:c[U+(L<<2)>>2]=S;P=T;Q=U;R=L+1|0;g=23;break;case 23:V=wa(88,b|0,M|0)|0;if((u|0)!=0&(v|0)!=0){h=CF(c[u>>2]|0,j)|0;if((h|0)>0){g=-1;break}else return 0}u=v=0;if((V|0)==0){g=24;break}else{L=R;M=V;N=Q;O=P;g=19;break};case 24:H=R;I=Q;J=c[C>>2]|0;g=25;break;case 25:V=c[J+12>>2]|0;if((V|0)==0){g=27;break}else{W=V;g=26;break};case 26:V=c[W+12>>2]|0;ka(150,c[W>>2]|0);if((u|0)!=0&(v|0)!=0){h=CF(c[u>>2]|0,j)|0;if((h|0)>0){g=-1;break}else return 0}u=v=0;ka(150,W|0);if((u|0)!=0&(v|0)!=0){h=CF(c[u>>2]|0,j)|0;if((h|0)>0){g=-1;break}else return 0}u=v=0;if((V|0)==0){g=27;break}else{W=V;g=26;break};case 27:V=wa(206,I|0,H<<2|0)|0;if((u|0)!=0&(v|0)!=0){h=CF(c[u>>2]|0,j)|0;if((h|0)>0){g=-1;break}else return 0}u=v=0;X=V;if((y|0)==(k|0)){g=29;break}else{g=28;break};case 28:ka(150,y|0);if((u|0)!=0&(v|0)!=0){h=CF(c[u>>2]|0,j)|0;if((h|0)>0){g=-1;break}else return 0}u=v=0;g=29;break;case 29:c[d>>2]=H;p=X;g=30;break;case 30:i=f;return p|0;case-1:if((h|0)==11){D=v;g=31}u=v=0;break}return 0}function jv(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;b=c[a+48>>2]|0;d=ux(a)|0;if((d|0)==0){e=0;return e|0}else{f=d;g=0}while(1){d=mw(b,f)|0;if((d|0)==0){h=g}else{i=d;d=g;while(1){if((Rx(a,c[((c[i>>2]&3|0)==2?i:i-32|0)+28>>2]|0)|0)==0){j=d}else{xw(a,i,1)|0;j=d+1|0}k=ow(b,i)|0;if((k|0)==0){h=j;break}else{i=k;d=j}}}d=vx(a,f)|0;if((d|0)==0){e=h;break}else{f=d;g=h}}return e|0}function kv(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=i;f=b+8|0;g=b+4|0;b=c[g>>2]|0;if((c[f>>2]|0)!=(c[b+4>>2]|0)){h=d+8|0;j=c[h>>2]|0;k=j;l=k+157|0;a[l]=1;m=c[f>>2]|0;n=m+4|0;c[f>>2]=n;c[m>>2]=d;i=e;return}o=c[b+12>>2]|0;do{if((o|0)==0){b=kk(16)|0;if((b|0)==0){Fv(1,115176,(p=i,i=i+1|0,i=i+7&-8,c[p>>2]=0,p)|0)|0;i=p;rc(178072,1)}c[b+8>>2]=c[g>>2];c[b+12>>2]=0;q=kk(4e6)|0;c[b>>2]=q;if((q|0)==0){Fv(1,115176,(p=i,i=i+1|0,i=i+7&-8,c[p>>2]=0,p)|0)|0;i=p;rc(178072,1)}else{c[b+4>>2]=q+4e6;c[(c[g>>2]|0)+12>>2]=b;r=c[(c[g>>2]|0)+12>>2]|0;break}}else{r=o}}while(0);c[g>>2]=r;c[f>>2]=c[r>>2];h=d+8|0;j=c[h>>2]|0;k=j;l=k+157|0;a[l]=1;m=c[f>>2]|0;n=m+4|0;c[f>>2]=n;c[m>>2]=d;i=e;return}function lv(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0.0,j=0.0,k=0.0,l=0.0,m=0,n=0.0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;e=i;f=a;a=i;i=i+16|0;c[a>>2]=c[f>>2];c[a+4>>2]=c[f+4>>2];c[a+8>>2]=c[f+8>>2];c[a+12>>2]=c[f+12>>2];f=b;b=i;i=i+16|0;c[b>>2]=c[f>>2];c[b+4>>2]=c[f+4>>2];c[b+8>>2]=c[f+8>>2];c[b+12>>2]=c[f+12>>2];g=+h[a>>3];if(g<0.0){j=g+-.5}else{j=g+.5}f=~~j;j=+h[a+8>>3];if(j<0.0){k=j+-.5}else{k=j+.5}a=~~k;k=+h[b>>3];if(k<0.0){l=k+-.5}else{l=k+.5}m=~~l;l=+h[b+8>>3];if(l<0.0){n=l+-.5}else{n=l+.5}b=~~n;o=m-f|0;p=((o|0)>-1?o:-o|0)<<1;q=o>>31|1;o=b-a|0;r=((o|0)>-1?o:-o|0)<<1;s=o>>31|1;Gk(d,f,a);if((p|0)>(r|0)){if((f|0)==(m|0)){i=e;return}o=a;t=f;u=r-(p>>1)|0;while(1){if((u|0)>-1){v=u-p|0;w=o+s|0}else{v=u;w=o}x=t+q|0;Gk(d,x,w);if((x|0)==(m|0)){break}else{o=w;t=x;u=v+r|0}}i=e;return}else{if((a|0)==(b|0)){i=e;return}v=a;a=f;f=p-(r>>1)|0;while(1){if((f|0)>-1){y=f-r|0;z=a+q|0}else{y=f;z=a}u=v+s|0;Gk(d,z,u);if((u|0)==(b|0)){break}else{v=u;a=z;f=y+p|0}}i=e;return}}function mv(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0.0,I=0.0,J=0,K=0.0,L=0,M=0.0,N=0,O=0.0,P=0,Q=0,R=0,S=0,T=0.0,U=0.0,V=0.0,W=0,X=0,Y=0.0,Z=0,_=0.0,$=0,aa=0,ba=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0.0,la=0,ma=0.0,na=0,oa=0.0,pa=0,qa=0.0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0.0,ya=0.0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0.0,Ka=0.0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0;j=i;i=i+40|0;k=j|0;l=j+16|0;m=j+32|0;if((b|0)<1){n=0;i=j;return n|0}p=g+16|0;if((c[p>>2]|0)>>>0>=4>>>0){q=kk(b<<5)|0;r=q;s=(b|0)>0;if(s){t=0;do{u=c[e+(t<<2)>>2]|0;$m(u);v=r+(t<<5)|0;w=(c[u+8>>2]|0)+16|0;c[v>>2]=c[w>>2];c[v+4>>2]=c[w+4>>2];c[v+8>>2]=c[w+8>>2];c[v+12>>2]=c[w+12>>2];c[v+16>>2]=c[w+16>>2];c[v+20>>2]=c[w+20>>2];c[v+24>>2]=c[w+24>>2];c[v+28>>2]=c[w+28>>2];t=t+1|0;}while((t|0)<(b|0))}do{if((c[p>>2]|0)==4){t=g+28|0;do{if((c[t>>2]&2|0)!=0){w=g+24|0;c[w>>2]=jk(b<<2)|0;if(s){x=0}else{break}do{v=ew(c[e+(x<<2)>>2]|0,108152)|0;do{if((v|0)!=0){u=ac(v|0,148336,(y=i,i=i+8|0,c[y>>2]=m,y)|0)|0;i=y;z=c[m>>2]|0;if(!((u|0)>0&(z|0)>-1)){break}c[(c[w>>2]|0)+(x<<2)>>2]=z}}while(0);x=x+1|0;}while((x|0)<(b|0))}}while(0);w=nv(b,r,g)|0;if((c[t>>2]&2|0)==0){A=w;break}eF(c[g+24>>2]|0);A=w}else{A=0}}while(0);eF(q);n=A;i=j;return n|0}A=c[g+20>>2]|0;q=(A|0)==0;r=c[o>>2]|0;x=0;m=0;s=0;w=0;v=0;z=0;while(1){u=c[e+(z<<2)>>2]|0;$m(u);do{if(q){B=v;C=w;D=s;E=m;F=x}else{if((a[A+z|0]|0)==0){B=v;C=w;D=s;E=m;F=x;break}G=c[u+8>>2]|0;H=+h[G+16>>3];if(H<0.0){I=H+-.5}else{I=H+.5}J=~~I;H=+h[G+24>>3];if(H<0.0){K=H+-.5}else{K=H+.5}L=~~K;H=+h[G+32>>3];if(H<0.0){M=H+-.5}else{M=H+.5}N=~~M;H=+h[G+40>>3];if(H<0.0){O=H+-.5}else{O=H+.5}G=~~O;if((v|0)==0){P=J;Q=L;R=N;S=G}else{P=(J|0)<(w|0)?J:w;Q=(L|0)<(s|0)?L:s;R=(N|0)>(m|0)?N:m;S=(G|0)>(x|0)?G:x}B=v+1|0;C=P;D=Q;E=R;F=S}}while(0);if((d[213992]|0)>>>0>2>>>0){t=$w(u|0)|0;G=c[u+8>>2]|0;H=+h[G+16>>3];T=+h[G+24>>3];U=+h[G+32>>3];V=+h[G+40>>3];gc(r|0,114504,(y=i,i=i+40|0,c[y>>2]=t,h[y+8>>3]=H,h[y+16>>3]=T,h[y+24>>3]=U,h[y+32>>3]=V,y)|0)|0;i=y}t=z+1|0;if((t|0)<(b|0)){x=F;m=E;s=D;w=C;v=B;z=t}else{break}}z=kk(b<<5)|0;B=z;v=0;do{w=B+(v<<5)|0;s=(c[(c[e+(v<<2)>>2]|0)+8>>2]|0)+16|0;c[w>>2]=c[s>>2];c[w+4>>2]=c[s+4>>2];c[w+8>>2]=c[s+8>>2];c[w+12>>2]=c[s+12>>2];c[w+16>>2]=c[s+16>>2];c[w+20>>2]=c[s+20>>2];c[w+24>>2]=c[s+24>>2];c[w+28>>2]=c[s+28>>2];v=v+1|0;}while((v|0)<(b|0));v=g+8|0;s=xv(b,B,c[v>>2]|0)|0;if((a[213992]|0)!=0){gc(r|0,136576,(y=i,i=i+8|0,c[y>>2]=s,y)|0)|0;i=y}if((s|0)<1){n=0;i=j;return n|0}w=(A|0)!=0;if(w){W=(C+E|0)/2|0;X=(D+F|0)/2|0}else{W=0;X=0}F=jk(b<<4)|0;D=F;E=g+12|0;g=(f|0)==0;C=k|0;m=k+8|0;O=+(s|0);x=l|0;S=l+8|0;R=0;do{Q=e+(R<<2)|0;P=c[Q>>2]|0;q=D+(R<<4)|0;c[D+(R<<4)+12>>2]=R;if((c[p>>2]|0)==3){t=(c[P+8>>2]|0)+16|0;G=c[v>>2]|0;yv(t,q,s,G,W,X,$w(P|0)|0)}else{P=c[Q>>2]|0;Q=c[v>>2]|0;G=c[E>>2]|0;t=g?P:f;N=Dk()|0;L=P+8|0;J=c[L>>2]|0;M=+h[J+16>>3];if(M<0.0){Y=M+-.5}else{Y=M+.5}Z=W-~~Y|0;M=+h[J+24>>3];if(M<0.0){_=M+-.5}else{_=M+.5}J=X-~~_|0;do{if((c[p>>2]|0)==1){$=kk((Lw(P)|0)<<2)|0;aa=$;ba=ux(P)|0;if((ba|0)!=0){da=ba;ba=0;while(1){ea=da+8|0;c[aa+(ba<<2)>>2]=c[(c[ea>>2]|0)+112>>2];c[(c[ea>>2]|0)+112>>2]=0;ea=vx(P,da)|0;if((ea|0)==0){break}else{da=ea;ba=ba+1|0}}}ba=c[L>>2]|0;if((c[ba+172>>2]|0)>=1){da=Z-Q|0;ea=J-Q|0;fa=Z+Q|0;ga=J+Q|0;ha=1;ia=ba;while(1){ba=c[(c[ia+176>>2]|0)+(ha<<2)>>2]|0;ja=c[ba+8>>2]|0;M=+h[ja+16>>3];if(M<0.0){ka=M+-.5}else{ka=M+.5}la=~~ka;M=+h[ja+24>>3];if(M<0.0){ma=M+-.5}else{ma=M+.5}na=~~ma;M=+h[ja+32>>3];if(M<0.0){oa=M+-.5}else{oa=M+.5}pa=~~oa;M=+h[ja+40>>3];if(M<0.0){qa=M+-.5}else{qa=M+.5}ja=~~qa;if((pa|0)>(la|0)&(ja|0)>(na|0)){ra=la+da|0;la=na+ea|0;na=fa+pa|0;pa=ga+ja|0;if((ra|0)>-1){sa=(ra|0)/(s|0)|0}else{sa=((ra+1|0)/(s|0)|0)-1|0}if((la|0)>-1){ta=(la|0)/(s|0)|0}else{ta=((la+1|0)/(s|0)|0)-1|0}if((na|0)>-1){ua=(na|0)/(s|0)|0}else{ua=((na+1|0)/(s|0)|0)-1|0}if((pa|0)>-1){va=(pa|0)/(s|0)|0}else{va=((pa+1|0)/(s|0)|0)-1|0}if(!((sa|0)>(ua|0)|(ta|0)>(va|0))){pa=sa;while(1){na=ta;while(1){Gk(N,pa,na);if((na|0)<(va|0)){na=na+1|0}else{break}}if((pa|0)<(ua|0)){pa=pa+1|0}else{break}}}pa=ux(ba)|0;if((pa|0)!=0){na=ba;la=pa;do{c[(c[la+8>>2]|0)+212>>2]=na;la=vx(ba,la)|0;}while((la|0)!=0)}wa=c[L>>2]|0}else{wa=ia}if((ha|0)<(c[wa+172>>2]|0)){ha=ha+1|0;ia=wa}else{break}}}ia=ux(P)|0;if((ia|0)!=0){M=+(Q|0);ha=ia;do{Pm(k,ha);K=+h[C>>3];I=+h[m>>3];if(K<0.0){xa=K+-.5}else{xa=K+.5}if(I<0.0){ya=I+-.5}else{ya=I+.5}ia=~~xa+Z|0;ga=~~ya+J|0;fa=ha+8|0;ea=c[fa>>2]|0;do{if((c[ea+212>>2]|0)==0){da=~~(M+(+h[ea+88>>3]+ +h[ea+96>>3])*.5);la=~~(M+ +h[ea+80>>3]*.5);ba=ia-da|0;na=ga-la|0;pa=da+ia|0;da=la+ga|0;if((ba|0)>-1){za=(ba|0)/(s|0)|0}else{za=((ba+1|0)/(s|0)|0)-1|0}if((na|0)>-1){Aa=(na|0)/(s|0)|0}else{Aa=((na+1|0)/(s|0)|0)-1|0}if((pa|0)>-1){Ba=(pa|0)/(s|0)|0}else{Ba=((pa+1|0)/(s|0)|0)-1|0}if((da|0)>-1){Ca=(da|0)/(s|0)|0}else{Ca=((da+1|0)/(s|0)|0)-1|0}if(!((za|0)>(Ba|0)|(Aa|0)>(Ca|0))){da=za;while(1){pa=Aa;while(1){Gk(N,da,pa);if((pa|0)<(Ca|0)){pa=pa+1|0}else{break}}if((da|0)<(Ba|0)){da=da+1|0}else{break}}}if((ia|0)>-1){Da=(ia|0)/(s|0)|0}else{Da=((ia+1|0)/(s|0)|0)-1|0}if((ga|0)>-1){Ea=(ga|0)/(s|0)|0}else{Ea=((ga+1|0)/(s|0)|0)-1|0}da=mw(t,ha)|0;if((da|0)==0){break}else{Fa=da}do{Ev(Fa,Da,Ea,N,Z,J,s,G);Fa=ow(t,Fa)|0;}while((Fa|0)!=0)}else{if((ia|0)>-1){Ga=(ia|0)/(s|0)|0}else{Ga=((ia+1|0)/(s|0)|0)-1|0}if((ga|0)>-1){Ha=(ga|0)/(s|0)|0}else{Ha=((ga+1|0)/(s|0)|0)-1|0}da=mw(t,ha)|0;if((da|0)==0){break}else{Ia=da}do{if((c[(c[fa>>2]|0)+212>>2]|0)!=(c[(c[(c[((c[Ia>>2]&3|0)==2?Ia:Ia-32|0)+28>>2]|0)+8>>2]|0)+212>>2]|0)){Ev(Ia,Ga,Ha,N,Z,J,s,G)}Ia=ow(t,Ia)|0;}while((Ia|0)!=0)}}while(0);ha=vx(P,ha)|0;}while((ha|0)!=0)}ha=ux(P)|0;if((ha|0)!=0){fa=ha;ha=0;while(1){c[(c[fa+8>>2]|0)+112>>2]=c[aa+(ha<<2)>>2];ga=vx(P,fa)|0;if((ga|0)==0){break}else{fa=ga;ha=ha+1|0}}}eF($)}else{ha=ux(P)|0;if((ha|0)==0){break}M=+(Q|0);fa=ha;do{Pm(l,fa);I=+h[x>>3];K=+h[S>>3];if(I<0.0){Ja=I+-.5}else{Ja=I+.5}if(K<0.0){Ka=K+-.5}else{Ka=K+.5}ha=~~Ja+Z|0;aa=~~Ka+J|0;ga=c[fa+8>>2]|0;ia=~~(M+(+h[ga+88>>3]+ +h[ga+96>>3])*.5);ea=~~(M+ +h[ga+80>>3]*.5);ga=ha-ia|0;da=aa-ea|0;pa=ia+ha|0;ia=ea+aa|0;if((ga|0)>-1){La=(ga|0)/(s|0)|0}else{La=((ga+1|0)/(s|0)|0)-1|0}if((da|0)>-1){Ma=(da|0)/(s|0)|0}else{Ma=((da+1|0)/(s|0)|0)-1|0}if((pa|0)>-1){Na=(pa|0)/(s|0)|0}else{Na=((pa+1|0)/(s|0)|0)-1|0}if((ia|0)>-1){Oa=(ia|0)/(s|0)|0}else{Oa=((ia+1|0)/(s|0)|0)-1|0}if(!((La|0)>(Na|0)|(Ma|0)>(Oa|0))){ia=La;while(1){pa=Ma;while(1){Gk(N,ia,pa);if((pa|0)<(Oa|0)){pa=pa+1|0}else{break}}if((ia|0)<(Na|0)){ia=ia+1|0}else{break}}}if((ha|0)>-1){Pa=(ha|0)/(s|0)|0}else{Pa=((ha+1|0)/(s|0)|0)-1|0}if((aa|0)>-1){Qa=(aa|0)/(s|0)|0}else{Qa=((aa+1|0)/(s|0)|0)-1|0}ia=mw(t,fa)|0;if((ia|0)!=0){pa=ia;do{Ev(pa,Pa,Qa,N,Z,J,s,G);pa=ow(t,pa)|0;}while((pa|0)!=0)}fa=vx(P,fa)|0;}while((fa|0)!=0)}}while(0);t=D+(R<<4)+4|0;c[t>>2]=Kk(N)|0;G=D+(R<<4)+8|0;c[G>>2]=Jk(N)|0;J=c[L>>2]|0;M=+(Q<<1|0);Z=~~+ca((M+(+h[J+32>>3]- +h[J+16>>3]))/O);u=~~+ca((M+(+h[J+40>>3]- +h[J+24>>3]))/O);c[q>>2]=u+Z;do{if((d[213992]|0)>>>0>2>>>0){J=$w(P|0)|0;fa=c[G>>2]|0;gc(r|0,126120,(y=i,i=i+32|0,c[y>>2]=J,c[y+8>>2]=fa,c[y+16>>2]=Z,c[y+24>>2]=u,y)|0)|0;i=y;if((c[G>>2]|0)>0){Ra=0}else{break}do{fa=c[t>>2]|0;J=c[fa+(Ra<<3)+4>>2]|0;gc(r|0,123640,(y=i,i=i+16|0,c[y>>2]=c[fa+(Ra<<3)>>2],c[y+8>>2]=J,y)|0)|0;i=y;Ra=Ra+1|0;}while((Ra|0)<(c[G>>2]|0))}}while(0);Ek(N);}R=R+1|0;}while((R|0)<(b|0));R=jk(b<<2)|0;Ra=R;Qa=0;do{c[Ra+(Qa<<2)>>2]=D+(Qa<<4);Qa=Qa+1|0;}while((Qa|0)<(b|0));Jb(R|0,b|0,4,180);Qa=Dk()|0;Pa=jk(b<<3)|0;if(w){w=-W|0;W=-X|0;X=0;while(1){do{if((a[A+X|0]|0)!=0){Na=c[Ra+(X<<2)>>2]|0;Oa=c[Na+12>>2]|0;Ma=c[Na+4>>2]|0;La=c[Na+8>>2]|0;Na=Pa+(Oa<<3)|0;c[Na>>2]=w;S=Pa+(Oa<<3)+4|0;c[S>>2]=W;if((La|0)>0){Oa=Ma;Ma=0;while(1){Fk(Qa,Oa);x=Ma+1|0;if((x|0)<(La|0)){Oa=Oa+8|0;Ma=x}else{break}}}if((d[213992]|0)>>>0<=1>>>0){break}Ma=c[Na>>2]|0;Oa=c[S>>2]|0;gc(r|0,113712,(y=i,i=i+24|0,c[y>>2]=La,c[y+8>>2]=Ma,c[y+16>>2]=Oa,y)|0)|0;i=y}}while(0);N=X+1|0;if((N|0)<(b|0)){X=N}else{Sa=0;break}}do{if((a[A+Sa|0]|0)==0){X=c[Ra+(Sa<<2)>>2]|0;Av(Sa,X,Qa,Pa+(c[X+12>>2]<<3)|0,s,c[v>>2]|0,B)}Sa=Sa+1|0;}while((Sa|0)<(b|0))}else{Sa=0;do{A=c[Ra+(Sa<<2)>>2]|0;Av(Sa,A,Qa,Pa+(c[A+12>>2]<<3)|0,s,c[v>>2]|0,B);Sa=Sa+1|0;}while((Sa|0)<(b|0))}eF(R);R=0;do{eF(c[D+(R<<4)+4>>2]|0);R=R+1|0;}while((R|0)<(b|0));eF(F);Ek(Qa);eF(z);if((d[213992]|0)>>>0>1>>>0){Ta=0}else{n=Pa;i=j;return n|0}while(1){z=c[Pa+(Ta<<3)>>2]|0;Qa=c[Pa+(Ta<<3)+4>>2]|0;gc(r|0,131600,(y=i,i=i+24|0,c[y>>2]=Ta,c[y+8>>2]=z,c[y+16>>2]=Qa,y)|0)|0;i=y;Qa=Ta+1|0;if((Qa|0)<(b|0)){Ta=Qa}else{n=Pa;break}}i=j;return n|0}function nv(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0.0,z=0.0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0,H=0;f=i;g=jk(b<<3)|0;j=c[e+4>>2]|0;k=e+28|0;l=(j|0)>0;do{if((c[k>>2]&1|0)==0){if(l){m=1;n=(b-1+j|0)/(j|0)|0;p=j;break}else{q=~~+ca(+T(+(b|0)));m=1;n=(b-1+q|0)/(q|0)|0;p=q;break}}else{if(l){m=0;n=j;p=(b-1+j|0)/(j|0)|0;break}else{q=~~+ca(+T(+(b|0)));m=0;n=q;p=(b-1+q|0)/(q|0)|0;break}}}while(0);if((a[213992]|0)!=0){gc(c[o>>2]|0,117712,(j=i,i=i+24|0,c[j>>2]=(m|0)!=0?116800:115864,c[j+8>>2]=n,c[j+16>>2]=p,j)|0)|0;i=j}j=jk((p<<3)+8|0)|0;l=j;q=jk((n<<3)+8|0)|0;r=q;s=jk(b*24|0)|0;t=s;u=(b|0)>0;do{if(u){v=e+8|0;w=t;x=0;while(1){y=+h[d+(x<<5)+8>>3];z=+h[d+(x<<5)+24>>3];h[w>>3]=+h[d+(x<<5)+16>>3]- +h[d+(x<<5)>>3]+ +((c[v>>2]|0)>>>0>>>0);h[w+8>>3]=z-y+ +((c[v>>2]|0)>>>0>>>0);c[w+16>>2]=x;A=x+1|0;if((A|0)<(b|0)){w=w+24|0;x=A}else{break}}x=jk(b<<2)|0;w=x;if(u){B=0}else{C=x;D=w;break}while(1){c[w+(B<<2)>>2]=t+(B*24|0);v=B+1|0;if((v|0)<(b|0)){B=v}else{C=x;D=w;break}}}else{w=jk(b<<2)|0;C=w;D=w}}while(0);B=c[e+24>>2]|0;do{if((B|0)==0){if((c[k>>2]&64|0)!=0){break}Jb(C|0,b|0,4,24)}else{c[43654]=B;Jb(C|0,b|0,4,160)}}while(0);if(u){if((m|0)==0){B=0;e=0;t=0;while(1){w=c[D+(t<<2)>>2]|0;x=l+(B<<3)|0;y=+h[x>>3];z=+h[w>>3];h[x>>3]=y>z?y:z;x=r+(e<<3)|0;z=+h[x>>3];y=+h[w+8>>3];h[x>>3]=z>y?z:y;x=e+1|0;w=(x|0)==(n|0);v=t+1|0;if((v|0)<(b|0)){B=(w&1)+B|0;e=w?0:x;t=v}else{break}}}else{t=0;e=0;B=0;while(1){v=c[D+(B<<2)>>2]|0;x=l+(t<<3)|0;y=+h[x>>3];z=+h[v>>3];h[x>>3]=y>z?y:z;x=r+(e<<3)|0;z=+h[x>>3];y=+h[v+8>>3];h[x>>3]=z>y?z:y;x=t+1|0;v=(x|0)==(p|0);w=B+1|0;if((w|0)<(b|0)){t=v?0:x;e=(v&1)+e|0;B=w}else{break}}}}if((p|0)>=0){y=0.0;B=0;while(1){e=l+(B<<3)|0;z=+h[e>>3];h[e>>3]=y;if((B|0)<(p|0)){y=y+z;B=B+1|0}else{break}}}if((n|0)>0){y=0.0;B=n;while(1){e=B-1|0;z=+h[r+(e<<3)>>3];h[r+(B<<3)>>3]=y;E=y+z;if((e|0)>0){y=E;B=e}else{F=E;break}}}else{F=0.0}h[r>>3]=F;if(!u){eF(s);eF(C);eF(j);eF(q);i=f;return g|0}u=(m|0)==0;m=0;B=0;e=0;while(1){t=c[(c[D+(e<<2)>>2]|0)+16>>2]|0;F=+h[d+(t<<5)>>3];y=+h[d+(t<<5)+8>>3];E=+h[d+(t<<5)+16>>3];z=+h[d+(t<<5)+24>>3];w=c[k>>2]|0;do{if((w&4|0)==0){if((w&8|0)==0){c[g+(t<<3)>>2]=~~((+h[l+(m<<3)>>3]+ +h[l+(m+1<<3)>>3]-E-F)*.5);break}else{c[g+(t<<3)>>2]=~~(+h[l+(m+1<<3)>>3]-(E-F));break}}else{c[g+(t<<3)>>2]=~~+h[l+(m<<3)>>3]}}while(0);w=c[k>>2]|0;do{if((w&16|0)==0){if((w&32|0)==0){c[g+(t<<3)+4>>2]=~~((+h[r+(B<<3)>>3]+ +h[r+(B+1<<3)>>3]-z-y)*.5);break}else{c[g+(t<<3)+4>>2]=~~+h[r+(B+1<<3)>>3];break}}else{c[g+(t<<3)+4>>2]=~~(+h[r+(B<<3)>>3]-(z-y))}}while(0);if(u){t=B+1|0;w=(t|0)==(n|0);G=w?0:t;H=(w&1)+m|0}else{w=m+1|0;t=(w|0)==(p|0);G=(t&1)+B|0;H=t?0:w}w=e+1|0;if((w|0)<(b|0)){m=H;B=G;e=w}else{break}}eF(s);eF(C);eF(j);eF(q);i=f;return g|0}function ov(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;g=i;if((b|0)<1){h=0;i=g;return h|0}j=c[f+16>>2]|0;if((j|0)==3){k=f+8|0;l=xv(b,e,c[k>>2]|0)|0;if((a[213992]|0)!=0){gc(c[o>>2]|0,136576,(m=i,i=i+8|0,c[m>>2]=l,m)|0)|0;i=m}if((l|0)<1){h=0;i=g;return h|0}n=jk(b<<4)|0;p=n;q=(b|0)>0;if(q){r=0;do{c[p+(r<<4)+12>>2]=r;yv(e+(r<<5)|0,p+(r<<4)|0,l,c[k>>2]|0,0,0,213416);r=r+1|0;}while((r|0)<(b|0));r=jk(b<<2)|0;s=r;t=0;while(1){c[s+(t<<2)>>2]=p+(t<<4);u=t+1|0;if((u|0)<(b|0)){t=u}else{v=r;w=s;break}}}else{s=jk(b<<2)|0;v=s;w=s}Jb(v|0,b|0,4,180);s=Dk()|0;r=jk(b<<3)|0;if(q){t=0;do{u=c[w+(t<<2)>>2]|0;Av(t,u,s,r+(c[u+12>>2]<<3)|0,l,c[k>>2]|0,e);t=t+1|0;}while((t|0)<(b|0));eF(v);t=0;do{eF(c[p+(t<<4)+4>>2]|0);t=t+1|0;}while((t|0)<(b|0))}else{eF(v)}eF(n);Ek(s);if((d[213992]|0)>>>0<2>>>0|q^1){h=r;i=g;return h|0}q=c[o>>2]|0;s=0;while(1){n=c[r+(s<<3)>>2]|0;v=c[r+(s<<3)+4>>2]|0;gc(q|0,131600,(m=i,i=i+24|0,c[m>>2]=s,c[m+8>>2]=n,c[m+16>>2]=v,m)|0)|0;i=m;v=s+1|0;if((v|0)<(b|0)){s=v}else{h=r;break}}i=g;return h|0}else if((j|0)==4){h=nv(b,e,f)|0;i=g;return h|0}else{h=0;i=g;return h|0}return 0}function pv(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0.0,p=0.0,q=0.0,r=0.0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;if((a|0)<1){g=(a|0)>-1?a:-a|0;return g|0}i=(e|0)==0;j=(f|0)==0;f=0;while(1){k=c[b+(f<<2)>>2]|0;l=i?k:e;m=c[d+(f<<3)>>2]|0;n=c[d+(f<<3)+4>>2]|0;o=+(m|0);p=o/72.0;q=+(n|0);r=q/72.0;s=ux(k)|0;if((s|0)!=0){t=s;do{s=t+8|0;u=c[(c[s>>2]|0)+132>>2]|0;h[u>>3]=p+ +h[u>>3];u=(c[(c[s>>2]|0)+132>>2]|0)+8|0;h[u>>3]=r+ +h[u>>3];u=(c[s>>2]|0)+16|0;h[u>>3]=o+ +h[u>>3];u=(c[s>>2]|0)+24|0;h[u>>3]=q+ +h[u>>3];u=c[(c[s>>2]|0)+108>>2]|0;if((u|0)!=0){v=u+56|0;h[v>>3]=o+ +h[v>>3];v=(c[(c[s>>2]|0)+108>>2]|0)+64|0;h[v>>3]=q+ +h[v>>3]}do{if(!j){v=mw(l,t)|0;if((v|0)==0){break}else{w=v}do{v=w+8|0;s=c[v>>2]|0;u=c[s+96>>2]|0;if((u|0)==0){x=s}else{s=u+56|0;h[s>>3]=o+ +h[s>>3];s=(c[(c[v>>2]|0)+96>>2]|0)+64|0;h[s>>3]=q+ +h[s>>3];x=c[v>>2]|0}s=c[x+108>>2]|0;if((s|0)==0){y=x}else{u=s+56|0;h[u>>3]=o+ +h[u>>3];u=(c[(c[v>>2]|0)+108>>2]|0)+64|0;h[u>>3]=q+ +h[u>>3];y=c[v>>2]|0}u=c[y+100>>2]|0;if((u|0)==0){z=y}else{s=u+56|0;h[s>>3]=o+ +h[s>>3];s=(c[(c[v>>2]|0)+100>>2]|0)+64|0;h[s>>3]=q+ +h[s>>3];z=c[v>>2]|0}s=c[z+104>>2]|0;if((s|0)==0){A=z}else{u=s+56|0;h[u>>3]=o+ +h[u>>3];u=(c[(c[v>>2]|0)+104>>2]|0)+64|0;h[u>>3]=q+ +h[u>>3];A=c[v>>2]|0}u=c[A+8>>2]|0;do{if((u|0)!=0){if((c[u+4>>2]|0)>0){B=0;C=u}else{break}do{s=c[C>>2]|0;D=c[s+(B*48|0)>>2]|0;E=c[s+(B*48|0)+4>>2]|0;F=c[s+(B*48|0)+8>>2]|0;G=c[s+(B*48|0)+12>>2]|0;if((E|0)>0){s=0;do{H=D+(s<<4)|0;h[H>>3]=o+ +h[H>>3];H=D+(s<<4)+8|0;h[H>>3]=q+ +h[H>>3];s=s+1|0;}while((s|0)<(E|0))}if((F|0)!=0){E=(c[c[(c[v>>2]|0)+8>>2]>>2]|0)+(B*48|0)+16|0;h[E>>3]=o+ +h[E>>3];E=(c[c[(c[v>>2]|0)+8>>2]>>2]|0)+(B*48|0)+24|0;h[E>>3]=q+ +h[E>>3]}if((G|0)!=0){E=(c[c[(c[v>>2]|0)+8>>2]>>2]|0)+(B*48|0)+32|0;h[E>>3]=o+ +h[E>>3];E=(c[c[(c[v>>2]|0)+8>>2]>>2]|0)+(B*48|0)+40|0;h[E>>3]=q+ +h[E>>3]}B=B+1|0;C=c[(c[v>>2]|0)+8>>2]|0;}while((B|0)<(c[C+4>>2]|0))}}while(0);w=ow(l,w)|0;}while((w|0)!=0)}}while(0);t=vx(k,t)|0;}while((t|0)!=0)}qv(k,m,n);t=f+1|0;if((t|0)<(a|0)){f=t}else{g=0;break}}return g|0}function qv(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0,q=0,r=0;e=a+8|0;a=c[e>>2]|0;f=a+16|0;g=a+24|0;i=a+32|0;j=a+40|0;k=+(b|0);l=k+ +h[i>>3];m=+(d|0);n=m+ +h[g>>3];o=m+ +h[j>>3];h[f>>3]=k+ +h[f>>3];h[g>>3]=n;h[i>>3]=l;h[j>>3]=o;j=c[e>>2]|0;i=c[j+12>>2]|0;if((i|0)==0){p=j}else{j=i+56|0;h[j>>3]=k+ +h[j>>3];j=(c[(c[e>>2]|0)+12>>2]|0)+64|0;h[j>>3]=m+ +h[j>>3];p=c[e>>2]|0}if((c[p+172>>2]|0)<1){return}else{q=1;r=p}while(1){qv(c[(c[r+176>>2]|0)+(q<<2)>>2]|0,b,d);p=c[e>>2]|0;if((q|0)<(c[p+172>>2]|0)){q=q+1|0;r=p}else{break}}return}function rv(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;f=mv(a,b,d,e)|0;if((f|0)==0){g=1;return g|0}h=pv(a,b,f,d,c[e+12>>2]|0)|0;eF(f);g=h;return g|0}function sv(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,i=0,j=0.0,k=0.0,l=0.0,m=0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0,t=0,u=0.0,v=0.0,w=0.0,x=0.0,y=0,z=0.0,A=0.0,B=0.0,C=0.0,D=0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0;f=mv(a,b,d,e)|0;if((f|0)==0){g=1;return g|0}i=pv(a,b,f,d,c[e+12>>2]|0)|0;eF(f);if((i|0)!=0){g=i;return g|0}$m(d);i=c[d+8>>2]|0;d=i+16|0;j=+h[d>>3];f=i+24|0;k=+h[f>>3];e=i+32|0;l=+h[e>>3];m=i+40|0;n=+h[m>>3];if((a|0)>0){o=n;p=l;q=k;r=j;i=0;while(1){s=c[(c[b+(i<<2)>>2]|0)+8>>2]|0;t=c[s+172>>2]|0;if((t|0)<1){u=o;v=p;w=q;x=r}else{y=c[s+176>>2]|0;s=1;z=o;A=p;B=q;C=r;while(1){D=c[(c[y+(s<<2)>>2]|0)+8>>2]|0;E=+h[D+16>>3];F=C<E?C:E;E=+h[D+24>>3];G=B<E?B:E;E=+h[D+32>>3];H=A>E?A:E;E=+h[D+40>>3];I=z>E?z:E;if((s|0)<(t|0)){s=s+1|0;z=I;A=H;B=G;C=F}else{u=I;v=H;w=G;x=F;break}}}s=i+1|0;if((s|0)<(a|0)){o=u;p=v;q=w;r=x;i=s}else{J=u;K=v;L=w;M=x;break}}}else{J=n;K=l;L=k;M=j}h[d>>3]=M;h[f>>3]=L;h[e>>3]=K;h[m>>3]=J;g=0;return g|0}function tv(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0;g=i;i=i+8|0;h=g|0;if((f|0)==0){cc(120888,112128,1400,170552);return 0}j=b|0;b=ew(j,145176)|0;if((b|0)==0){k=e}else{l=ac(b|0,148336,(m=i,i=i+8|0,c[m>>2]=h,m)|0)|0;i=m;b=c[h>>2]|0;k=(l|0)==1&(b|0)>-1?b:e}c[f+8>>2]=k;if((a[213992]|0)!=0){gc(c[o>>2]|0,142208,(m=i,i=i+8|0,c[m>>2]=k,m)|0)|0;i=m}c[f+12>>2]=0;c[f+20>>2]=0;uv(ew(j,146488)|0,d,f)|0;i=g;return c[f+16>>2]|0}function uv(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0.0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;f=i;i=i+16|0;j=f|0;k=f+8|0;if((e|0)==0){cc(120888,112128,1292,170128);return 0}l=e+28|0;c[l>>2]=0;m=e+16|0;c[m>>2]=d;d=e+4|0;c[d>>2]=0;c[e+24>>2]=0;do{if((b|0)!=0){n=a[b]|0;if(n<<24>>24==0){break}p=n<<24>>24;if((p|0)==97){if((Za(b|0,105176,5)|0)!=0){if((Za(b|0,102536,6)|0)!=0){break}c[m>>2]=5;q=ac(b+5|0,96840,(r=i,i=i+8|0,c[r>>2]=j,r)|0)|0;i=r;s=+g[j>>2];t=e|0;if((q|0)>0&s>0.0){g[t>>2]=s;break}else{g[t>>2]=1.0;break}}c[m>>2]=4;t=b+5|0;a:do{if((a[t]|0)==95){q=b+6|0;u=a[q]|0;if(u<<24>>24==0){v=q;break}else{w=q;x=u;y=0}while(1){switch(x<<24>>24|0){case 116:{u=y|16;c[l>>2]=u;z=u;break};case 108:{u=y|4;c[l>>2]=u;z=u;break};case 98:{u=y|32;c[l>>2]=u;z=u;break};case 105:{u=y|64;c[l>>2]=u;z=u;break};case 114:{u=y|8;c[l>>2]=u;z=u;break};case 99:{u=y|1;c[l>>2]=u;z=u;break};case 117:{u=y|2;c[l>>2]=u;z=u;break};default:{v=w;break a}}u=w+1|0;q=a[u]|0;if(q<<24>>24==0){v=u;break a}else{w=u;x=q;y=z}}}else{v=t}}while(0);t=ac(v|0,148336,(r=i,i=i+8|0,c[r>>2]=k,r)|0)|0;i=r;q=c[k>>2]|0;if(!((t|0)>0&(q|0)>0)){break}c[d>>2]=q;break}else if((p|0)==103){if(n<<24>>24!=103){break}if((Ya(b|0,86216)|0)!=0){break}c[m>>2]=3;break}else if((p|0)==110){if(n<<24>>24!=110){break}if((Ya(b|0,81480)|0)!=0){break}c[m>>2]=2;break}else if((p|0)==99){if(n<<24>>24!=99){break}if((Ya(b|0,91456)|0)!=0){break}c[m>>2]=1;break}else{break}}}while(0);if((a[213992]|0)==0){A=c[m>>2]|0;i=f;return A|0}b=c[o>>2]|0;Ma(167760,11,1,b|0)|0;switch(c[m>>2]|0){case 2:{B=81480;break};case 3:{B=86216;break};case 4:{B=105176;break};case 5:{B=102536;break};case 1:{B=91456;break};default:{B=139120}}gc(b|0,163592,(r=i,i=i+8|0,c[r>>2]=B,r)|0)|0;i=r;if((c[m>>2]|0)==5){gc(b|0,159504,(r=i,i=i+8|0,h[r>>3]=+g[e>>2],r)|0)|0;i=r}gc(b|0,154488,(r=i,i=i+8|0,c[r>>2]=c[d>>2],r)|0)|0;i=r;gc(b|0,151272,(r=i,i=i+8|0,c[r>>2]=c[l>>2],r)|0)|0;i=r;A=c[m>>2]|0;i=f;return A|0}function vv(a,b,c){a=a|0;b=b|0;c=c|0;return uv(ew(a|0,146488)|0,b,c)|0}function wv(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+8|0;g=f|0;h=ew(b|0,145176)|0;do{if((h|0)==0){j=d}else{b=ac(h|0,148336,(k=i,i=i+8|0,c[k>>2]=g,k)|0)|0;i=k;k=c[g>>2]|0;if((b|0)==1&(k|0)>-1){j=k;break}k=a[h]|0;if(!((k<<24>>24|0)==116|(k<<24>>24|0)==84)){j=d;break}j=e}}while(0);i=f;return j|0}function xv(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,p=0.0,q=0.0,r=0,s=0.0,t=0.0,u=0,v=0;f=i;g=+((a*100|0)-1|0);if((a|0)>0){j=+(e<<1|0);e=0;k=0.0;l=0.0;while(1){m=j+(+h[b+(e<<5)+16>>3]- +h[b+(e<<5)>>3]);n=j+(+h[b+(e<<5)+24>>3]- +h[b+(e<<5)+8>>3]);p=l-(m+n);q=k-m*n;r=e+1|0;if((r|0)<(a|0)){e=r;k=q;l=p}else{s=q;t=p;break}}}else{s=0.0;t=0.0}l=t*t-g*4.0*s;if(l<0.0){Fv(1,121760,(u=i,i=i+8|0,h[u>>3]=l,u)|0)|0;i=u;v=-1;i=f;return v|0}k=+T(l);j=g*2.0;p=(k-t)/j;q=(-0.0-t-k)/j;e=~~p;a=(e|0)==0?1:e;if((d[213992]|0)>>>0<=2>>>0){v=a;i=f;return v|0}e=c[o>>2]|0;Ma(121216,27,1,e|0)|0;gc(e|0,120144,(u=i,i=i+40|0,h[u>>3]=g,h[u+8>>3]=t,h[u+16>>3]=s,h[u+24>>3]=l,h[u+32>>3]=k,u)|0)|0;i=u;gc(e|0,119328,(u=i,i=i+32|0,c[u>>2]=a,h[u+8>>3]=p,c[u+16>>2]=~~q,h[u+24>>3]=q,u)|0)|0;i=u;gc(e|0,118664,(u=i,i=i+16|0,h[u>>3]=s+(t*p+p*g*p),h[u+8>>3]=s+(t*q+q*g*q),u)|0)|0;i=u;v=a;i=f;return v|0}function yv(a,b,e,f,g,j,k){a=a|0;b=b|0;e=e|0;f=f|0;g=g|0;j=j|0;k=k|0;var l=0,m=0,n=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;l=i;m=a;a=i;i=i+32|0;tF(a,m,32)|0;n=+h[a>>3];if(n<0.0){p=n+-.5}else{p=n+.5}q=+h[a+8>>3];if(q<0.0){r=q+-.5}else{r=q+.5}s=+h[a+16>>3];if(s<0.0){t=s+-.5}else{t=s+.5}u=+h[a+24>>3];if(u<0.0){v=u+-.5}else{v=u+.5}a=Dk()|0;m=g-f|0;w=j-f|0;x=g+f-~~p+~~t|0;g=j+f-~~r+~~v|0;if((m|0)>-1){y=(m|0)/(e|0)|0}else{y=((m+1|0)/(e|0)|0)-1|0}if((w|0)>-1){z=(w|0)/(e|0)|0}else{z=((w+1|0)/(e|0)|0)-1|0}if((x|0)>-1){A=(x|0)/(e|0)|0}else{A=((x+1|0)/(e|0)|0)-1|0}if((g|0)>-1){B=(g|0)/(e|0)|0}else{B=((g+1|0)/(e|0)|0)-1|0}if(!((y|0)>(A|0)|(z|0)>(B|0))){g=y;while(1){y=z;while(1){Gk(a,g,y);if((y|0)<(B|0)){y=y+1|0}else{break}}if((g|0)<(A|0)){g=g+1|0}else{break}}}g=b+4|0;c[g>>2]=Kk(a)|0;A=Jk(a)|0;B=b+8|0;c[B>>2]=A;v=+(f<<1|0);r=+(e|0);e=~~+ca((v+(s-n))/r);f=~~+ca((v+(u-q))/r);c[b>>2]=f+e;if((d[213992]|0)>>>0<=2>>>0){Ek(a);i=l;return}b=c[o>>2]|0;gc(b|0,126120,(z=i,i=i+32|0,c[z>>2]=k,c[z+8>>2]=A,c[z+16>>2]=e,c[z+24>>2]=f,z)|0)|0;i=z;if((c[B>>2]|0)>0){C=0}else{Ek(a);i=l;return}do{f=c[g>>2]|0;e=c[f+(C<<3)+4>>2]|0;gc(b|0,123640,(z=i,i=i+16|0,c[z>>2]=c[f+(C<<3)>>2],c[z+8>>2]=e,z)|0)|0;i=z;C=C+1|0;}while((C|0)<(c[B>>2]|0));Ek(a);i=l;return}function zv(a,b){a=a|0;b=b|0;return(c[c[b>>2]>>2]|0)-(c[c[a>>2]>>2]|0)|0}function Av(a,b,d,e,f,g,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;i=i|0;var j=0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;j=c[b+12>>2]|0;k=+h[i+(j<<5)>>3];l=+h[i+(j<<5)+8>>3];m=+h[i+(j<<5)+16>>3];n=+h[i+(j<<5)+24>>3];do{if((a|0)==0){o=+(g<<1|0);p=+(f|0);if((Bv((~~+ca((o+(m-k))/p)|0)/-2|0,(~~+ca((o+(n-l))/p)|0)/-2|0,b,d,e,f,i)|0)==0){break}return}}while(0);if((Bv(0,0,b,d,e,f,i)|0)!=0){return}if((~~+ca(m-k)|0)<(~~+ca(n-l)|0)){g=1;a:while(1){a=-g|0;if((g|0)>0){j=0;while(1){q=j-1|0;if((Bv(a,j,b,d,e,f,i)|0)!=0){r=37;break a}if((q|0)>(a|0)){j=q}else{s=q;break}}}else{s=0}if((g|0)>(a|0)){j=a;while(1){q=j+1|0;if((Bv(j,s,b,d,e,f,i)|0)!=0){r=37;break a}if((q|0)<(g|0)){j=q}else{t=q;break}}}else{t=a}if((s|0)<(g|0)){j=s;while(1){q=j+1|0;if((Bv(t,j,b,d,e,f,i)|0)!=0){r=37;break a}if((q|0)<(g|0)){j=q}else{u=q;break}}}else{u=s}if((t|0)>(a|0)){j=t;while(1){q=j-1|0;if((Bv(j,u,b,d,e,f,i)|0)!=0){r=37;break a}if((q|0)>(a|0)){j=q}else{v=q;break}}}else{v=t}if((u|0)>0){j=u;while(1){a=j-1|0;if((Bv(v,j,b,d,e,f,i)|0)!=0){r=37;break a}if((a|0)>0){j=a}else{break}}}g=g+1|0}if((r|0)==37){return}}else{g=1;b:while(1){v=-g|0;if((g|0)>0){u=0;while(1){t=u+1|0;if((Bv(u,v,b,d,e,f,i)|0)!=0){r=37;break b}if((t|0)<(g|0)){u=t}else{w=t;break}}}else{w=0}if((g|0)>(v|0)){u=v;while(1){t=u+1|0;if((Bv(w,u,b,d,e,f,i)|0)!=0){r=37;break b}if((t|0)<(g|0)){u=t}else{x=t;break}}}else{x=v}if((w|0)>(v|0)){u=w;while(1){t=u-1|0;if((Bv(u,x,b,d,e,f,i)|0)!=0){r=37;break b}if((t|0)>(v|0)){u=t}else{y=t;break}}}else{y=w}if((x|0)>(v|0)){u=x;while(1){t=u-1|0;if((Bv(y,u,b,d,e,f,i)|0)!=0){r=37;break b}if((t|0)>(v|0)){u=t}else{z=t;break}}}else{z=x}if((y|0)<0){u=y;while(1){v=u+1|0;if((Bv(u,z,b,d,e,f,i)|0)!=0){r=37;break b}if((v|0)<0){u=v}else{break}}}g=g+1|0}if((r|0)==37){return}}}function Bv(a,b,e,f,g,j,k){a=a|0;b=b|0;e=e|0;f=f|0;g=g|0;j=j|0;k=k|0;var l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0.0,B=0.0,C=0.0;l=i;i=i+8|0;m=l|0;n=m;p=e+4|0;q=c[e+8>>2]|0;r=(q|0)>0;a:do{if(r){s=m;t=n+4|0;u=0;v=c[p>>2]|0;while(1){w=v;x=c[w>>2]|0;y=c[w+4>>2]|0;c[m>>2]=x;c[m+4>>2]=y;c[s>>2]=x+a;c[t>>2]=y+b;if((Hk(f,n)|0)!=0){z=0;break}y=u+1|0;if((y|0)<(q|0)){u=y;v=v+8|0}else{break a}}i=l;return z|0}}while(0);v=c[e+12>>2]|0;A=+h[k+(v<<5)>>3];if(A<0.0){B=A+-.5}else{B=A+.5}A=+h[k+(v<<5)+8>>3];if(A<0.0){C=A+-.5}else{C=A+.5}v=g|0;c[v>>2]=(da(j,a)|0)-~~B;k=g+4|0;c[k>>2]=(da(j,b)|0)-~~C;if(r){r=m;j=n+4|0;g=0;e=c[p>>2]|0;while(1){p=e;u=c[p>>2]|0;t=c[p+4>>2]|0;c[m>>2]=u;c[m+4>>2]=t;c[r>>2]=u+a;c[j>>2]=t+b;Fk(f,n);t=g+1|0;if((t|0)<(q|0)){g=t;e=e+8|0}else{break}}}if((d[213992]|0)>>>0<=1>>>0){z=1;i=l;return z|0}e=c[v>>2]|0;v=c[k>>2]|0;gc(c[o>>2]|0,129304,(k=i,i=i+40|0,c[k>>2]=q,c[k+8>>2]=a,c[k+16>>2]=b,c[k+24>>2]=e,c[k+32>>2]=v,k)|0)|0;i=k;z=1;i=l;return z|0}function Cv(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=c[43654]|0;e=c[d+(c[(c[a>>2]|0)+16>>2]<<2)>>2]|0;a=c[d+(c[(c[b>>2]|0)+16>>2]<<2)>>2]|0;if((e|0)>(a|0)){f=1;return f|0}f=((e|0)<(a|0))<<31>>31;return f|0}function Dv(a,b){a=a|0;b=b|0;var d=0,e=0.0,f=0.0,g=0;d=c[a>>2]|0;a=c[b>>2]|0;e=+h[d+8>>3]+ +h[d>>3];f=+h[a+8>>3]+ +h[a>>3];if(e<f){g=1;return g|0}g=(e>f)<<31>>31;return g|0}function Ev(a,b,d,e,f,g,j,k){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0.0,v=0.0,w=0.0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,P=0.0,Q=0.0,R=0.0,S=0.0,T=0.0;l=i;i=i+64|0;m=l|0;n=l+32|0;o=l+48|0;p=n|0;h[p>>3]=+(b|0);b=n+8|0;h[b>>3]=+(d|0);do{if((k|0)!=0){d=a+8|0;q=c[(c[d>>2]|0)+8>>2]|0;if((q|0)==0){break}if((c[q+4>>2]|0)<=0){i=l;return}r=m;s=n;t=o;u=+(f|0);v=+(g|0);w=+(j|0);x=o|0;y=o+8|0;z=m+16|0;A=0;B=q;do{q=c[B>>2]|0;C=c[q+(A*48|0)>>2]|0;D=c[q+(A*48|0)+4>>2]|0;E=c[q+(A*48|0)+8>>2]|0;F=c[q+(A*48|0)+12>>2]|0;G=q+(A*48|0)+16|0;c[r>>2]=c[G>>2];c[r+4>>2]=c[G+4>>2];c[r+8>>2]=c[G+8>>2];c[r+12>>2]=c[G+12>>2];c[r+16>>2]=c[G+16>>2];c[r+20>>2]=c[G+20>>2];c[r+24>>2]=c[G+24>>2];c[r+28>>2]=c[G+28>>2];if((E|0)==0){E=C;c[s>>2]=c[E>>2];c[s+4>>2]=c[E+4>>2];c[s+8>>2]=c[E+8>>2];c[s+12>>2]=c[E+12>>2];E=C+16|0;c[t>>2]=c[E>>2];c[t+4>>2]=c[E+4>>2];c[t+8>>2]=c[E+8>>2];c[t+12>>2]=c[E+12>>2];H=2}else{c[s>>2]=c[r>>2];c[s+4>>2]=c[r+4>>2];c[s+8>>2]=c[r+8>>2];c[s+12>>2]=c[r+12>>2];E=C;c[t>>2]=c[E>>2];c[t+4>>2]=c[E+4>>2];c[t+8>>2]=c[E+8>>2];c[t+12>>2]=c[E+12>>2];H=1}I=u+ +h[p>>3];h[p>>3]=I;J=v+ +h[b>>3];h[b>>3]=J;if(I<0.0){K=(I+1.0)/w+-1.0}else{K=I/w}h[p>>3]=K;if(J<0.0){L=(J+1.0)/w+-1.0}else{L=J/w}h[b>>3]=L;J=u+ +h[x>>3];h[x>>3]=J;I=v+ +h[y>>3];h[y>>3]=I;if(J<0.0){M=(J+1.0)/w+-1.0}else{M=J/w}h[x>>3]=M;if(I<0.0){N=(I+1.0)/w+-1.0}else{N=I/w}h[y>>3]=N;lv(n,o,e);if((H|0)<(D|0)){E=H;do{c[s>>2]=c[t>>2];c[s+4>>2]=c[t+4>>2];c[s+8>>2]=c[t+8>>2];c[s+12>>2]=c[t+12>>2];G=C+(E<<4)|0;c[t>>2]=c[G>>2];c[t+4>>2]=c[G+4>>2];c[t+8>>2]=c[G+8>>2];c[t+12>>2]=c[G+12>>2];I=u+ +h[x>>3];h[x>>3]=I;J=v+ +h[y>>3];h[y>>3]=J;if(I<0.0){O=(I+1.0)/w+-1.0}else{O=I/w}h[x>>3]=O;if(J<0.0){P=(J+1.0)/w+-1.0}else{P=J/w}h[y>>3]=P;lv(n,o,e);E=E+1|0;}while((E|0)<(D|0))}if((F|0)!=0){c[s>>2]=c[t>>2];c[s+4>>2]=c[t+4>>2];c[s+8>>2]=c[t+8>>2];c[s+12>>2]=c[t+12>>2];c[t>>2]=c[z>>2];c[t+4>>2]=c[z+4>>2];c[t+8>>2]=c[z+8>>2];c[t+12>>2]=c[z+12>>2];J=u+ +h[x>>3];h[x>>3]=J;I=v+ +h[y>>3];h[y>>3]=I;if(J<0.0){Q=(J+1.0)/w+-1.0}else{Q=J/w}h[x>>3]=Q;if(I<0.0){R=(I+1.0)/w+-1.0}else{R=I/w}h[y>>3]=R;lv(n,o,e)}A=A+1|0;B=c[(c[d>>2]|0)+8>>2]|0;}while((A|0)<(c[B+4>>2]|0));i=l;return}}while(0);Pm(o,c[((c[a>>2]&3|0)==2?a:a-32|0)+28>>2]|0);a=o|0;R=+(f|0)+ +h[a>>3];h[a>>3]=R;f=o+8|0;Q=+(g|0)+ +h[f>>3];h[f>>3]=Q;if(R<0.0){S=(R+1.0)/+(j|0)+-1.0}else{S=R/+(j|0)}h[a>>3]=S;if(Q<0.0){T=(Q+1.0)/+(j|0)+-1.0}else{T=Q/+(j|0)}h[f>>3]=T;lv(n,o,e);i=l;return}function Fv(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;e=i;i=i+16|0;f=e|0;g=f;c[g>>2]=d;c[g+4>>2]=0;g=Gv(a,b,f|0)|0;i=e;return g|0}function Gv(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;e=i;f=(a|0)==3;if(f){g=c[53280]|0}else{g=(a|0)==2?1:a}c[53280]=g;h=c[53250]|0;c[53250]=h>>>0>g>>>0?h:g;if(g>>>0<(c[53282]|0)>>>0){g=c[53278]|0;do{if((g|0)==0){h=_a()|0;c[53278]=h;if((h|0)==0){j=1}else{k=h;break}i=e;return j|0}else{k=g}}while(0);if(f){l=k}else{c[53252]=lb(k|0)|0;l=c[53278]|0}Sb(l|0,b|0,d|0)|0;j=0;i=e;return j|0}l=c[43652]|0;if((l|0)==0){k=c[o>>2]|0;if(!f){gc(k|0,118168,(g=i,i=i+8|0,c[g>>2]=(a|0)==1?156768:127176,g)|0)|0;i=g}Sb(k|0,b|0,d|0)|0;j=0;i=e;return j|0}do{if((c[43650]|0)==0){k=dF(c[242]|0)|0;c[43650]=k;if((k|0)!=0){break}Ma(115128,35,1,c[o>>2]|0)|0;j=0;i=e;return j|0}}while(0);if(!f){Ec[l&63]((a|0)==1?156768:127176)|0;Ec[c[43652]&63](108144)|0}while(1){a=$b(c[43650]|0,c[242]|0,b|0,d|0)|0;l=c[242]|0;if((a|0)>-1&(a|0)<(l|0)){m=12;break}f=l<<1;l=a+1|0;a=(f|0)>(l|0)?f:l;c[242]=a;if((gF(c[43650]|0,a)|0)==0){m=14;break}}if((m|0)==12){Ec[c[43652]&63](c[43650]|0)|0;j=0;i=e;return j|0}else if((m|0)==14){Ma(115128,35,1,c[o>>2]|0)|0;j=0;i=e;return j|0}return 0}function Hv(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+16|0;e=d|0;f=e;c[f>>2]=b;c[f+4>>2]=0;Gv(1,a,e|0)|0;i=d;return}function Iv(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;if((e|0)==0){f=(d|0)==0?1024:d;c[b+12>>2]=1;g=dF(f)|0;c[b>>2]=g;h=f;i=g}else{c[b>>2]=e;c[b+12>>2]=0;h=d;i=e}c[b+8>>2]=i+h;c[b+4>>2]=i;a[i]=0;return}function Jv(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;d=a+8|0;e=a|0;f=c[e>>2]|0;g=f;h=(c[d>>2]|0)-g|0;i=h<<1;j=h+b|0;b=(j|0)>(i|0)?j:i;i=a+4|0;j=(c[i>>2]|0)-g|0;g=a+12|0;if((c[g>>2]|0)==0){a=dF(b)|0;tF(a|0,f|0,j)|0;c[g>>2]=1;k=a}else{k=gF(f,b)|0}c[e>>2]=k;c[i>>2]=k+j;c[d>>2]=k+b;return 0}function Kv(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;e=a+4|0;f=c[e>>2]|0;g=a+8|0;h=c[g>>2]|0;if((f+d|0)>>>0<=h>>>0){i=f;tF(i|0,b|0,d)|0;j=c[e>>2]|0;k=j+d|0;c[e>>2]=k;return d|0}l=a|0;m=c[l>>2]|0;n=m;o=h-n|0;h=o<<1;p=o+d|0;o=(p|0)>(h|0)?p:h;h=f-n|0;n=a+12|0;if((c[n>>2]|0)==0){a=dF(o)|0;tF(a|0,m|0,h)|0;c[n>>2]=1;q=a}else{q=gF(m,o)|0}c[l>>2]=q;l=q+h|0;c[e>>2]=l;c[g>>2]=q+o;i=l;tF(i|0,b|0,d)|0;j=c[e>>2]|0;k=j+d|0;c[e>>2]=k;return d|0}function Lv(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=xF(b|0)|0;e=a+4|0;f=c[e>>2]|0;g=a+8|0;h=c[g>>2]|0;if((f+d|0)>>>0<=h>>>0){i=f;tF(i|0,b|0,d)|0;j=c[e>>2]|0;k=j+d|0;c[e>>2]=k;return d|0}l=a|0;m=c[l>>2]|0;n=m;o=h-n|0;h=o<<1;p=o+d|0;o=(p|0)>(h|0)?p:h;h=f-n|0;n=a+12|0;if((c[n>>2]|0)==0){a=dF(o)|0;tF(a|0,m|0,h)|0;c[n>>2]=1;q=a}else{q=gF(m,o)|0}c[l>>2]=q;l=q+h|0;c[e>>2]=l;c[g>>2]=q+o;i=l;tF(i|0,b|0,d)|0;j=c[e>>2]|0;k=j+d|0;c[e>>2]=k;return d|0}function Mv(a){a=a|0;if((c[a+12>>2]|0)==0){return}eF(c[a>>2]|0);return}function Nv(a){a=a|0;var b=0,e=0,f=0;b=a+4|0;e=c[b>>2]|0;if(e>>>0<=(c[a>>2]|0)>>>0){f=-1;return f|0}c[b>>2]=e-1;f=d[e]|0;return f|0}function Ov(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0;g=i;h=c[b>>2]&3;if((h|0)==0){j=2}else if((h|0)==2|(h|0)==3){j=8}else if((h|0)==1){j=122}else{Fv(1,102488,(k=i,i=i+8|0,c[k>>2]=h,k)|0)|0;i=k;l=-1;i=g;return l|0}k=Oc[j&255](a,b)|0;if((k|0)==0){l=-1;i=g;return l|0}Sv(a,k,d,e,j,f);l=0;i=g;return l|0}function Pv(a,b){a=a|0;b=b|0;return a|0}function Qv(a,b){a=a|0;b=b|0;var c=0;if((Hx(b|0)|0)==(a|0)){c=b;return c|0}c=zx(a,b,0)|0;return c|0}function Rv(a,b){a=a|0;b=b|0;var c=0;if((Hx(b|0)|0)==(a|0)){c=b;return c|0}c=xw(a,b,0)|0;return c|0}function Sv(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0;g=(f|0)!=0;if(g){Tc[c&127](a,b,d)}h=sy(a)|0;if((h|0)!=0){i=h;do{h=Oc[e&255](i,b)|0;if((h|0)!=0){Sv(i,h,c,d,e,f)}i=ty(i)|0;}while((i|0)!=0)}if(g){return}Tc[c&127](a,b,d);return}function Tv(a,b,d){a=a|0;b=b|0;d=d|0;fy(c[53854]|0,c[b+8>>2]|0)|0;fy(c[53854]|0,c[b+12>>2]|0)|0;tx(c[53854]|0,b);return}function Uv(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;d=a|0;e=Vx(d,173376,0)|0;if((e|0)!=0|(b|0)==0){f=e;g=f;return g|0}e=Ix(d)|0;Ov(e,e|0,64,0,1)|0;b=ux(e)|0;if((b|0)!=0){h=b;do{b=h|0;i=Vx(b,c[43580]|0,0)|0;if((i|0)==0){j=5}else{if((c[i+8>>2]|0)==0){j=5}}if((j|0)==5){j=0;Zv(a,b)}b=mw(e,h)|0;if((b|0)!=0){i=b;do{b=i|0;k=Vx(b,c[43580]|0,0)|0;if((k|0)==0){j=9}else{if((c[k+8>>2]|0)==0){j=9}}if((j|0)==9){j=0;Zv(a,b)}i=ow(e,i)|0;}while((i|0)!=0)}h=vx(e,h)|0;}while((h|0)!=0)}f=Vx(d,173376,0)|0;g=f;return g|0}function Vv(a){a=a|0;return Vx(a,c[43580]|0,0)|0}function Wv(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;g=i;i=i+72|0;h=g|0;j=g+24|0;k=g+48|0;do{if((b|0)==0){l=c[53550]|0;if((l|0)!=0){m=l;break}l=Hw(0,172632,0)|0;c[53550]=l;m=l}else{m=b}}while(0);b=m|0;if((f|0)==0){l=Vx(b,173376,0)|0;if((l|0)==0){n=0;i=g;return n|0}if((d|0)==0){o=c[l+16>>2]|0}else if((d|0)==1){o=c[l+8>>2]|0}else if((d|0)==3|(d|0)==2){o=c[l+12>>2]|0}else{Fv(1,96792,(p=i,i=i+8|0,c[p>>2]=d,p)|0)|0;i=p;n=0;i=g;return n|0}if((o|0)==0){n=0;i=g;return n|0}c[h+8>>2]=e;n=Hc[c[o>>2]&63](o,h,4)|0;i=g;return n|0}h=Ix(b)|0;Uv(m,1)|0;o=Vx(b,173376,0)|0;do{if((o|0)==0){q=0}else{if((d|0)==0){q=c[o+16>>2]|0;break}else if((d|0)==3|(d|0)==2){q=c[o+12>>2]|0;break}else if((d|0)==1){q=c[o+8>>2]|0;break}else{Fv(1,96792,(p=i,i=i+8|0,c[p>>2]=d,p)|0)|0;i=p;q=0;break}}}while(0);o=fh(q,0)|0;c[k+8>>2]=e;l=q|0;r=Hc[c[l>>2]&63](q,k,4)|0;fh(q,o)|0;do{if((r|0)==0){c[j+8>>2]=e;o=Hc[c[l>>2]&63](q,j,4)|0;if((o|0)!=0){k=c[o+16>>2]|0;o=sx(m,24)|0;a[o+20|0]=d;c[o+8>>2]=dy(m,e)|0;c[o+12>>2]=dy(m,f)|0;c[o+16>>2]=k;Hc[c[l>>2]&63](q,o,1)|0;s=o;t=37;break}o=Vx(h|0,173376,0)|0;do{if((o|0)==0){u=0}else{if((d|0)==0){u=c[o+16>>2]|0;break}else if((d|0)==1){u=c[o+8>>2]|0;break}else if((d|0)==3|(d|0)==2){u=c[o+12>>2]|0;break}else{Fv(1,96792,(p=i,i=i+8|0,c[p>>2]=d,p)|0)|0;i=p;u=0;break}}}while(0);o=bh(u)|0;k=sx(m,24)|0;v=k;a[k+20|0]=d;c[k+8>>2]=dy(m,e)|0;w=k+12|0;c[w>>2]=dy(m,f)|0;x=k+16|0;c[x>>2]=o;Hc[c[u>>2]&63](u,k,1)|0;if((d|0)==0){Ov(h,h|0,76,k,1)|0;s=v;t=37;break}else if((d|0)==3|(d|0)==2){k=ux(h)|0;if((k|0)==0){s=v;t=37;break}o=m+52|0;y=k;while(1){k=mw(h,y)|0;if((k|0)!=0){z=k;do{k=Vx(z|0,c[43580]|0,0)|0;A=c[x>>2]|0;if((A|0)>3){B=c[o>>2]|0;C=k+12|0;D=A<<2;c[C>>2]=Sc[c[(c[B>>2]|0)+8>>2]&127](c[B+12>>2]|0,c[C>>2]|0,D,D+4|0)|0;E=C}else{E=k+12|0}k=dy(m,c[w>>2]|0)|0;c[(c[E>>2]|0)+(c[x>>2]<<2)>>2]=k;z=ow(h,z)|0;}while((z|0)!=0)}z=vx(h,y)|0;if((z|0)==0){s=v;t=37;break}else{y=z}}}else if((d|0)==1){y=ux(h)|0;if((y|0)==0){F=v;break}o=m+52|0;z=y;while(1){y=Vx(z|0,c[43580]|0,0)|0;k=c[x>>2]|0;if((k|0)>3){C=c[o>>2]|0;D=y+12|0;B=k<<2;c[D>>2]=Sc[c[(c[C>>2]|0)+8>>2]&127](c[C+12>>2]|0,c[D>>2]|0,B,B+4|0)|0;G=D}else{G=y+12|0}y=dy(m,c[w>>2]|0)|0;c[(c[G>>2]|0)+(c[x>>2]<<2)>>2]=y;y=vx(h,z)|0;if((y|0)==0){s=v;t=37;break}else{z=y}}}else{F=v;break}}else{z=r+12|0;fy(m,c[z>>2]|0)|0;c[z>>2]=dy(m,f)|0;s=r;t=37}}while(0);do{if((t|0)==37){if(!((s|0)!=0&(d|0)==0)){F=s;break}hw(b,s,f)|0;F=s}}while(0);Lx(m,b,F);n=F;i=g;return n|0}function Xv(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;f=Vx(a|0,173376,0)|0;if((f|0)==0){g=0;i=e;return g|0}if((b|0)==0){h=c[f+16>>2]|0}else if((b|0)==3|(b|0)==2){h=c[f+12>>2]|0}else if((b|0)==1){h=c[f+8>>2]|0}else{Fv(1,96792,(f=i,i=i+8|0,c[f>>2]=b,f)|0)|0;i=f;g=0;i=e;return g|0}if((h|0)==0){g=0;i=e;return g|0}f=c[h>>2]|0;if((d|0)==0){g=Hc[f&63](h,0,128)|0;i=e;return g|0}else{g=Hc[f&63](h,d,8)|0;i=e;return g|0}return 0}function Yv(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;d=b+12|0;a[d]=a[d]|64;d=b|0;e=Wx(d,173376,20,0)|0;f=e+8|0;c[f>>2]=yy(b,174328,c[43326]|0)|0;g=e+12|0;c[g>>2]=yy(b,174328,c[43326]|0)|0;h=e+16|0;c[h>>2]=yy(b,174328,c[43326]|0)|0;e=uy(b)|0;if((e|0)!=0){i=Vx(e|0,173376,0)|0;fh(c[f>>2]|0,c[i+8>>2]|0)|0;fh(c[g>>2]|0,c[i+12>>2]|0)|0;fh(c[h>>2]|0,c[i+16>>2]|0)|0;j=uy(b)|0;k=(j|0)==0;l=k?b:j;Zv(l,d);return}i=c[53550]|0;if((i|0)==0|(i|0)==(b|0)){j=uy(b)|0;k=(j|0)==0;l=k?b:j;Zv(l,d);return}e=Vx(i|0,173376,0)|0;i=c[e+8>>2]|0;m=c[f>>2]|0;f=i|0;n=Hc[c[f>>2]&63](i,0,128)|0;if((n|0)!=0){o=m|0;p=n;do{n=c[p+8>>2]|0;q=c[p+12>>2]|0;r=c[p+16>>2]|0;s=sx(b,24)|0;a[s+20|0]=1;c[s+8>>2]=dy(b,n)|0;c[s+12>>2]=dy(b,q)|0;c[s+16>>2]=r;a[s+22|0]=a[p+22|0]|0;a[s+21|0]=a[p+21|0]|0;Hc[c[o>>2]&63](m,s,1)|0;p=Hc[c[f>>2]&63](i,p,8)|0;}while((p|0)!=0)}p=c[e+12>>2]|0;i=p;f=c[g>>2]|0;g=p;p=Hc[c[g>>2]&63](i,0,128)|0;if((p|0)!=0){m=f|0;o=p;do{p=c[o+8>>2]|0;s=c[o+12>>2]|0;r=c[o+16>>2]|0;q=sx(b,24)|0;a[q+20|0]=2;c[q+8>>2]=dy(b,p)|0;c[q+12>>2]=dy(b,s)|0;c[q+16>>2]=r;a[q+22|0]=a[o+22|0]|0;a[q+21|0]=a[o+21|0]|0;Hc[c[m>>2]&63](f,q,1)|0;o=Hc[c[g>>2]&63](i,o,8)|0;}while((o|0)!=0)}o=c[e+16>>2]|0;e=c[h>>2]|0;h=o|0;i=Hc[c[h>>2]&63](o,0,128)|0;if((i|0)==0){j=uy(b)|0;k=(j|0)==0;l=k?b:j;Zv(l,d);return}g=e|0;f=i;do{i=c[f+8>>2]|0;m=c[f+12>>2]|0;q=c[f+16>>2]|0;r=sx(b,24)|0;a[r+20|0]=0;c[r+8>>2]=dy(b,i)|0;c[r+12>>2]=dy(b,m)|0;c[r+16>>2]=q;a[r+22|0]=a[f+22|0]|0;a[r+21|0]=a[f+21|0]|0;Hc[c[g>>2]&63](e,r,1)|0;f=Hc[c[h>>2]&63](o,f,8)|0;}while((f|0)!=0);j=uy(b)|0;k=(j|0)==0;l=k?b:j;Zv(l,d);return}function Zv(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;d=i;e=Wx(b,c[43580]|0,16,0)|0;f=b;g=c[f>>2]&3;h=a|0;a=Vx(h,173376,0)|0;do{if((a|0)==0){j=0}else{if((g|0)==3|(g|0)==2){j=c[a+12>>2]|0;break}else if((g|0)==0){j=c[a+16>>2]|0;break}else if((g|0)==1){j=c[a+8>>2]|0;break}else{Fv(1,96792,(k=i,i=i+8|0,c[k>>2]=g,k)|0)|0;i=k;j=0;break}}}while(0);g=e+8|0;if((c[g>>2]|0)!=0){i=d;return}a=Ix(h)|0;h=c[f>>2]&3;l=Vx(a|0,173376,0)|0;do{if((l|0)==0){m=0}else{if((h|0)==0){m=c[l+16>>2]|0;break}else if((h|0)==1){m=c[l+8>>2]|0;break}else if((h|0)==3|(h|0)==2){m=c[l+12>>2]|0;break}else{Fv(1,96792,(k=i,i=i+8|0,c[k>>2]=h,k)|0)|0;i=k;m=0;break}}}while(0);c[g>>2]=m;m=Ix(Hx(b)|0)|0;g=c[f>>2]&3;f=Vx(m|0,173376,0)|0;do{if((f|0)==0){n=0}else{if((g|0)==0){o=c[f+16>>2]|0}else if((g|0)==1){o=c[f+8>>2]|0}else if((g|0)==3|(g|0)==2){o=c[f+12>>2]|0}else{Fv(1,96792,(k=i,i=i+8|0,c[k>>2]=g,k)|0)|0;i=k;n=0;break}if((o|0)==0){n=0;break}n=bh(o)|0}}while(0);o=Hx(b)|0;k=e+12|0;c[k>>2]=sx(o,(n|0)<4?16:n<<2)|0;n=j|0;o=Hc[c[n>>2]&63](j,0,128)|0;if((o|0)==0){i=d;return}else{p=o}do{o=Hx(b)|0;e=dy(o,c[p+12>>2]|0)|0;c[(c[k>>2]|0)+(c[p+16>>2]<<2)>>2]=e;p=Hc[c[n>>2]&63](j,p,8)|0;}while((p|0)!=0);i=d;return}function _v(a){a=a|0;var b=0,d=0,e=0;c[53854]=a;b=a|0;d=Vx(b,c[43580]|0,0)|0;if((d|0)!=0){$v(a|0,d);Xx(b,c[d>>2]|0)|0}d=Vx(b,173376,0)|0;if((d|0)==0){e=0;return e|0}if((Ay(a,c[d+8>>2]|0)|0)!=0){e=1;return e|0}if((Ay(a,c[d+12>>2]|0)|0)!=0){e=1;return e|0}if((Ay(a,c[d+16>>2]|0)|0)!=0){e=1;return e|0}Xx(b,c[d>>2]|0)|0;e=0;return e|0}function $v(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;d=i;e=a|0;f=Hx(e)|0;g=Ix(Hx(e)|0)|0;e=c[a>>2]&3;a=Vx(g|0,173376,0)|0;do{if((a|0)!=0){if((e|0)==3|(e|0)==2){h=c[a+12>>2]|0}else if((e|0)==1){h=c[a+8>>2]|0}else if((e|0)==0){h=c[a+16>>2]|0}else{Fv(1,96792,(g=i,i=i+8|0,c[g>>2]=e,g)|0)|0;i=g;break}if((h|0)==0){break}g=bh(h)|0;j=b+12|0;k=c[j>>2]|0;if((g|0)>0){l=0;m=k}else{n=k;o=n;tx(f,o);i=d;return}while(1){fy(f,c[m+(l<<2)>>2]|0)|0;k=l+1|0;p=c[j>>2]|0;if((k|0)<(g|0)){l=k;m=p}else{n=p;break}}o=n;tx(f,o);i=d;return}}while(0);n=c[b+12>>2]|0;o=n;tx(f,o);i=d;return}function aw(a,b){a=a|0;b=b|0;var d=0;d=b|0;b=Vx(d,c[43580]|0,0)|0;do{if((b|0)!=0){if((c[b+8>>2]|0)==0){break}return}}while(0);Zv(a,d);return}function bw(a){a=a|0;var b=0,d=0;b=a|0;d=Vx(b,c[43580]|0,0)|0;if((d|0)==0){return}$v(a|0,d);Xx(b,c[43580]|0)|0;return}function cw(a,b){a=a|0;b=b|0;var d=0;d=b|0;b=Vx(d,c[43580]|0,0)|0;do{if((b|0)!=0){if((c[b+8>>2]|0)==0){break}return}}while(0);Zv(a,d);return}function dw(a){a=a|0;var b=0,d=0;b=a|0;d=Vx(b,c[43580]|0,0)|0;if((d|0)==0){return}$v(a|0,d);Xx(b,c[43580]|0)|0;return}function ew(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;i=i+24|0;e=d|0;f=Vx(a,c[43580]|0,0)|0;if((f|0)==0){g=0;i=d;return g|0}h=c[f+8>>2]|0;c[e+8>>2]=b;b=Hc[c[h>>2]&63](h,e,4)|0;if((b|0)==0){g=0;i=d;return g|0}e=Vx(a,c[43580]|0,0)|0;g=c[(c[e+12>>2]|0)+(c[b+16>>2]<<2)>>2]|0;i=d;return g|0}function fw(a,b){a=a|0;b=b|0;var d=0;d=Vx(a,c[43580]|0,0)|0;return c[(c[d+12>>2]|0)+(c[b+16>>2]<<2)>>2]|0}function gw(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+24|0;f=e|0;g=Vx(a,c[43580]|0,0)|0;if((g|0)==0){h=-1;i=e;return h|0}j=c[g+8>>2]|0;c[f+8>>2]=b;b=Hc[c[j>>2]&63](j,f,4)|0;if((b|0)==0){h=-1;i=e;return h|0}hw(a,b,d)|0;h=0;i=e;return h|0}function hw(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;f=i;i=i+24|0;g=f|0;h=Hx(b)|0;j=Vx(b,c[43580]|0,0)|0;k=d+16|0;l=j+12|0;fy(h,c[(c[l>>2]|0)+(c[k>>2]<<2)>>2]|0)|0;j=dy(h,e)|0;c[(c[l>>2]|0)+(c[k>>2]<<2)>>2]=j;j=b;if((c[j>>2]&3|0)!=0){Lx(h,b,d);i=f;return 0}l=c[(Vx(h|0,173376,0)|0)+16>>2]|0;m=d+8|0;n=c[m>>2]|0;o=fh(l,0)|0;c[g+8>>2]=n;n=l|0;p=Hc[c[n>>2]&63](l,g,4)|0;fh(l,o)|0;if((p|0)==0){o=c[m>>2]|0;m=c[k>>2]|0;k=c[j>>2]|0;j=sx(h,24)|0;a[j+20|0]=k&3;c[j+8>>2]=dy(h,o)|0;c[j+12>>2]=dy(h,e)|0;c[j+16>>2]=m;Hc[c[n>>2]&63](l,j,1)|0;Lx(h,b,d);i=f;return 0}else{j=p+12|0;fy(h,c[j>>2]|0)|0;c[j>>2]=dy(h,e)|0;Lx(h,b,d);i=f;return 0}return 0}function iw(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;f=i;i=i+24|0;g=f|0;h=Hx(a)|0;j=a;k=c[j>>2]&3;do{if((h|0)==0){l=c[53550]|0;if((l|0)!=0){m=l;break}l=Hw(0,172632,0)|0;c[53550]=l;m=l}else{m=h}}while(0);h=Vx(m|0,173376,0)|0;do{if((h|0)!=0){if((k|0)==3|(k|0)==2){n=c[h+12>>2]|0}else if((k|0)==1){n=c[h+8>>2]|0}else if((k|0)==0){n=c[h+16>>2]|0}else{Fv(1,96792,(m=i,i=i+8|0,c[m>>2]=k,m)|0)|0;i=m;break}if((n|0)==0){break}c[g+8>>2]=b;m=Hc[c[n>>2]&63](n,g,4)|0;if((m|0)==0){break}else{o=m}p=hw(a,o,d)|0;i=f;return 0}}while(0);g=Hx(a)|0;o=Wv(g,c[j>>2]&3,b,e)|0;p=hw(a,o,d)|0;i=f;return 0}function jw(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;d=i;i=i+24|0;e=d|0;f=Hx(a)|0;g=a;h=c[g>>2]|0;if(((c[b>>2]^h)&3|0)!=0){j=1;i=d;return j|0}k=f|0;f=Vx(k,173376,0)|0;if((f|0)==0){j=1;i=d;return j|0}l=e;m=e+8|0;e=0;n=1;o=h;h=f;while(1){p=o&3;if((p|0)==0){q=c[h+16>>2]|0}else if((p|0)==3|(p|0)==2){q=c[h+12>>2]|0}else if((p|0)==1){q=c[h+8>>2]|0}else{r=8;break}if((q|0)==0){j=n;r=19;break}f=c[q>>2]|0;if((e|0)==0){s=Hc[f&63](q,0,128)|0}else{s=Hc[f&63](q,e,8)|0}if((s|0)==0){j=n;r=19;break}f=c[s+8>>2]|0;t=Vx(b,c[43580]|0,0)|0;if((t|0)==0){j=1;r=19;break}u=c[t+8>>2]|0;c[m>>2]=f;f=Hc[c[u>>2]&63](u,l,4)|0;if((f|0)==0){j=1;r=19;break}u=Vx(a,c[43580]|0,0)|0;t=c[(c[u+12>>2]|0)+(c[s+16>>2]<<2)>>2]|0;hw(b,f,t)|0;if((gy(t)|0)!=0){t=Vx(b,c[43580]|0,0)|0;hy(c[(c[t+12>>2]|0)+(c[f+16>>2]<<2)>>2]|0)}f=c[g>>2]|0;t=Vx(k,173376,0)|0;if((t|0)==0){j=0;r=19;break}else{e=s;n=0;o=f;h=t}}if((r|0)==8){Fv(1,96792,(h=i,i=i+8|0,c[h>>2]=p,h)|0)|0;i=h;j=n;i=d;return j|0}else if((r|0)==19){i=d;return j|0}return 0}function kw(a,b,c){a=a|0;b=b|0;c=c|0;Yv(a);return}function lw(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;e=Vx(b|0,c[43580]|0,0)|0;b=d+16|0;f=c[b>>2]|0;if((f|0)>3){g=c[a+52>>2]|0;h=e+12|0;i=f<<2;c[h>>2]=Sc[c[(c[g>>2]|0)+8>>2]&127](c[g+12>>2]|0,c[h>>2]|0,i,i+4|0)|0;j=h}else{j=e+12|0}e=dy(a,c[d+12>>2]|0)|0;c[(c[j>>2]|0)+(c[b>>2]<<2)>>2]=e;return}function mw(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0;d=i;i=i+40|0;e=d|0;do{if((c[b+12>>2]|0)==(a|0)){f=b+16|0}else{c[e+16>>2]=b;g=c[a+28>>2]|0;h=Hc[c[g>>2]&63](g,e,4)|0;if((h|0)==0){j=0}else{f=h;break}i=d;return j|0}}while(0);e=a+32|0;a=f+32|0;ah(c[e>>2]|0,c[a>>2]|0)|0;f=c[e>>2]|0;b=Hc[c[f>>2]&63](f,0,128)|0;c[a>>2]=Yg(c[e>>2]|0)|0;j=b;i=d;return j|0}function nw(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;i=i+40|0;e=d|0;if((c[b+12>>2]|0)==(a|0)){f=b+16|0;i=d;return f|0}else{c[e+16>>2]=b;b=c[a+28>>2]|0;f=Hc[c[b>>2]&63](b,e,4)|0;i=d;return f|0}return 0}function ow(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;i=i+40|0;e=d|0;f=c[((c[b>>2]&3|0)==3?b:b+32|0)+28>>2]|0;do{if((c[f+12>>2]|0)==(a|0)){g=f+16|0}else{c[e+16>>2]=f;h=c[a+28>>2]|0;j=Hc[c[h>>2]&63](h,e,4)|0;if((j|0)==0){k=0}else{g=j;break}i=d;return k|0}}while(0);e=a+32|0;a=g+32|0;ah(c[e>>2]|0,c[a>>2]|0)|0;g=c[e>>2]|0;f=Hc[c[g>>2]&63](g,b|0,8)|0;c[a>>2]=Yg(c[e>>2]|0)|0;k=f;i=d;return k|0}function pw(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0;d=i;i=i+40|0;e=d|0;do{if((c[b+12>>2]|0)==(a|0)){f=b+16|0}else{c[e+16>>2]=b;g=c[a+28>>2]|0;h=Hc[c[g>>2]&63](g,e,4)|0;if((h|0)==0){j=0}else{f=h;break}i=d;return j|0}}while(0);e=a+32|0;a=f+28|0;ah(c[e>>2]|0,c[a>>2]|0)|0;f=c[e>>2]|0;b=Hc[c[f>>2]&63](f,0,128)|0;c[a>>2]=Yg(c[e>>2]|0)|0;j=b;i=d;return j|0}function qw(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;i=i+40|0;e=d|0;f=c[((c[b>>2]&3|0)==2?b:b-32|0)+28>>2]|0;do{if((c[f+12>>2]|0)==(a|0)){g=f+16|0}else{c[e+16>>2]=f;h=c[a+28>>2]|0;j=Hc[c[h>>2]&63](h,e,4)|0;if((j|0)==0){k=0}else{g=j;break}i=d;return k|0}}while(0);e=a+32|0;a=g+28|0;ah(c[e>>2]|0,c[a>>2]|0)|0;g=c[e>>2]|0;f=Hc[c[g>>2]&63](g,b|0,8)|0;c[a>>2]=Yg(c[e>>2]|0)|0;k=f;i=d;return k|0}function rw(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;d=i;i=i+80|0;e=d|0;f=d+40|0;g=b+12|0;if((c[g>>2]|0)==(a|0)){h=b+16|0;j=4}else{c[f+16>>2]=b;k=c[a+28>>2]|0;l=Hc[c[k>>2]&63](k,f,4)|0;if((l|0)!=0){h=l;j=4}}do{if((j|0)==4){l=a+32|0;f=h+32|0;ah(c[l>>2]|0,c[f>>2]|0)|0;k=c[l>>2]|0;m=Hc[c[k>>2]&63](k,0,128)|0;c[f>>2]=Yg(c[l>>2]|0)|0;if((m|0)==0){break}else{n=m}i=d;return n|0}}while(0);do{if((c[g>>2]|0)==(a|0)){o=b+16|0}else{c[e+16>>2]=b;h=c[a+28>>2]|0;j=Hc[c[h>>2]&63](h,e,4)|0;if((j|0)==0){n=0}else{o=j;break}i=d;return n|0}}while(0);e=a+32|0;a=o+28|0;ah(c[e>>2]|0,c[a>>2]|0)|0;o=c[e>>2]|0;b=Hc[c[o>>2]&63](o,0,128)|0;c[a>>2]=Yg(c[e>>2]|0)|0;n=b;i=d;return n|0}function sw(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;e=i;i=i+160|0;f=e|0;g=e+40|0;h=e+80|0;j=e+120|0;k=c[b>>2]|0;if((k&3|0)!=2){l=f+16|0;m=f;f=a+32|0;n=a+28|0;o=b;p=k;while(1){k=c[((p&3|0)==2?o:o-32|0)+28>>2]|0;if((c[k+12>>2]|0)==(a|0)){q=k+16|0}else{c[l>>2]=k;k=c[n>>2]|0;r=Hc[c[k>>2]&63](k,m,4)|0;if((r|0)==0){s=0;t=26;break}else{q=r}}r=q+28|0;ah(c[f>>2]|0,c[r>>2]|0)|0;k=c[f>>2]|0;u=Hc[c[k>>2]&63](k,o|0,8)|0;k=u;c[r>>2]=Yg(c[f>>2]|0)|0;if((u|0)==0){s=0;t=26;break}if((c[u+28>>2]|0)!=(d|0)){s=k;t=26;break}o=k;p=c[u>>2]|0}if((t|0)==26){i=e;return s|0}}p=c[b+60>>2]|0;do{if((c[p+12>>2]|0)==(a|0)){v=p+16|0;t=7}else{c[j+16>>2]=p;o=a+28|0;f=c[o>>2]|0;q=Hc[c[f>>2]&63](f,j,4)|0;if((q|0)!=0){v=q;t=7;break}w=a+32|0;x=o}}while(0);do{if((t|0)==7){j=a+32|0;p=v+32|0;ah(c[j>>2]|0,c[p>>2]|0)|0;o=c[j>>2]|0;q=Hc[c[o>>2]&63](o,b|0,8)|0;c[p>>2]=Yg(c[j>>2]|0)|0;if((q|0)==0){w=j;x=a+28|0;break}else{s=q;i=e;return s|0}}}while(0);b=g+16|0;v=h+16|0;q=h;h=d+12|0;j=d+16|0;p=g;g=0;while(1){if((g|0)==0){if((c[h>>2]|0)==(a|0)){y=j}else{c[v>>2]=d;o=c[x>>2]|0;f=Hc[c[o>>2]&63](o,q,4)|0;if((f|0)==0){s=0;t=26;break}else{y=f}}f=y+28|0;ah(c[w>>2]|0,c[f>>2]|0)|0;o=c[w>>2]|0;m=Hc[c[o>>2]&63](o,0,128)|0;c[f>>2]=Yg(c[w>>2]|0)|0;z=m}else{m=c[((c[g>>2]&3|0)==2?g:g-32|0)+28>>2]|0;if((c[m+12>>2]|0)==(a|0)){A=m+16|0}else{c[b>>2]=m;m=c[x>>2]|0;f=Hc[c[m>>2]&63](m,p,4)|0;if((f|0)==0){s=0;t=26;break}else{A=f}}f=A+28|0;ah(c[w>>2]|0,c[f>>2]|0)|0;m=c[w>>2]|0;o=Hc[c[m>>2]&63](m,g|0,8)|0;c[f>>2]=Yg(c[w>>2]|0)|0;z=o}o=z;if((z|0)==0){s=0;t=26;break}if((c[z+28>>2]|0)==(d|0)){g=o}else{s=o;t=26;break}}if((t|0)==26){i=e;return s|0}return 0}function tw(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0;zx(b,d,1)|0;zx(b,e,1)|0;g=sx(b,64)|0;h=g;i=Jw(b,2)|0;j=g+32|0;k=c[j>>2]|0;l=g;m=c[l>>2]|0;c[g+4>>2]=f;c[g+36>>2]=f;f=i<<4;c[l>>2]=m&12|f|2;c[j>>2]=k&12|f|3;c[g+60>>2]=d;c[g+28>>2]=e;yw(b,h);if((a[b+12|0]&64)==0){Jx(b,g);return h|0}Wx(g,c[43580]|0,16,0)|0;cw(b,h);Jx(b,g);return h|0}function uw(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0;h=i;i=i+368|0;j=h|0;k=h+40|0;l=h+72|0;m=h+112|0;n=h+144|0;o=h+184|0;p=h+216|0;q=h+256|0;r=h+288|0;s=h+328|0;t=h+360|0;do{if((Yw(b,2,f,t,0)|0)==0){if((f|0)!=0){break}if((g|0)==0){u=0;v=0;w=0;x=0;y=6;break}if((Pw(b)|0)!=0){u=0;v=0;w=0;x=0;y=6}}else{u=0;v=2;w=c[t>>2]|0;x=0;y=6}}while(0);do{if((y|0)==6){z=s|0;A=(d|0)==0|(e|0)==0;do{if(!A){B=s;c[B>>2]=v|x;c[B+4>>2]=u|w;c[s+28>>2]=d;if((c[e+12>>2]|0)==(b|0)){C=e+16|0}else{c[r+16>>2]=e;B=c[b+28>>2]|0;D=Hc[c[B>>2]&63](B,r,4)|0;if((D|0)==0){break}else{C=D}}D=b+36|0;B=C+20|0;ah(c[D>>2]|0,c[B>>2]|0)|0;E=c[D>>2]|0;F=Hc[c[E>>2]&63](E,z,4)|0;c[B>>2]=Yg(c[D>>2]|0)|0;if((F|0)==0){break}else{G=F}i=h;return G|0}}while(0);do{if((Ow(b)|0)!=0){z=q|0;if(A){break}F=q;c[F>>2]=v|x;c[F+4>>2]=u|w;c[q+28>>2]=e;if((c[d+12>>2]|0)==(b|0)){H=d+16|0}else{c[p+16>>2]=d;F=c[b+28>>2]|0;D=Hc[c[F>>2]&63](F,p,4)|0;if((D|0)==0){break}else{H=D}}D=b+36|0;F=H+20|0;ah(c[D>>2]|0,c[F>>2]|0)|0;B=c[D>>2]|0;E=Hc[c[B>>2]&63](B,z,4)|0;c[F>>2]=Yg(c[D>>2]|0)|0;if((E|0)==0){break}else{G=E}i=h;return G|0}}while(0);if((g|0)==0){G=0;i=h;return G|0}E=b|0;D=Ix(E)|0;F=o|0;do{if(A){y=23}else{z=o;c[z>>2]=v|x;c[z+4>>2]=u|w;c[o+28>>2]=d;if((c[e+12>>2]|0)==(D|0)){I=e+16|0}else{c[n+16>>2]=e;z=c[D+28>>2]|0;B=Hc[c[z>>2]&63](z,n,4)|0;if((B|0)==0){y=23;break}else{I=B}}B=D+36|0;z=I+20|0;ah(c[B>>2]|0,c[z>>2]|0)|0;J=c[B>>2]|0;K=Hc[c[J>>2]&63](J,F,4)|0;c[z>>2]=Yg(c[B>>2]|0)|0;if((K|0)==0){y=23}else{L=K}}}while(0);if((y|0)==23){if((Ow(b)|0)==0){break}F=Ix(E)|0;D=m|0;if(A){break}K=m;c[K>>2]=v|x;c[K+4>>2]=u|w;c[m+28>>2]=e;if((c[d+12>>2]|0)==(F|0)){M=d+16|0}else{c[l+16>>2]=d;K=c[F+28>>2]|0;B=Hc[c[K>>2]&63](K,l,4)|0;if((B|0)==0){break}else{M=B}}B=F+36|0;F=M+20|0;ah(c[B>>2]|0,c[F>>2]|0)|0;K=c[B>>2]|0;z=Hc[c[K>>2]&63](K,D,4)|0;c[F>>2]=Yg(c[B>>2]|0)|0;if((z|0)==0){break}else{L=z}}z=L;yw(b,z);G=z;i=h;return G|0}}while(0);if((g|0)==0){G=0;i=h;return G|0}do{if((Pw(b)|0)!=0){if((a[b+12|0]&4)!=0&(d|0)==(e|0)){G=0;i=h;return G|0}g=k|0;if((d|0)==0|(e|0)==0){break}L=k;c[L>>2]=0;c[L+4>>2]=0;c[k+28>>2]=d;if((c[e+12>>2]|0)==(b|0)){N=e+16|0}else{c[j+16>>2]=e;L=c[b+28>>2]|0;M=Hc[c[L>>2]&63](L,j,4)|0;if((M|0)==0){break}else{N=M}}M=b+36|0;L=N+20|0;ah(c[M>>2]|0,c[L>>2]|0)|0;l=c[M>>2]|0;m=Hc[c[l>>2]&63](l,g,4)|0;c[L>>2]=Yg(c[M>>2]|0)|0;if((m|0)==0){break}else{G=0}i=h;return G|0}}while(0);if((Yw(b,2,f,t,1)|0)==0){G=0;i=h;return G|0}f=tw(b,d,e,c[t>>2]|0)|0;ax(b,2,f|0);G=f;i=h;return G|0}function vw(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;d=i;i=i+80|0;e=d|0;f=d+40|0;g=(c[b>>2]&3|0)==3;h=g?b-32|0:b;j=g?b:b+32|0;b=c[j+28>>2]|0;g=c[h+28>>2]|0;if((c[b+12>>2]|0)==(a|0)){k=b+16|0}else{c[f+16>>2]=b;b=c[a+28>>2]|0;k=Hc[c[b>>2]&63](b,f,4)|0}f=a+32|0;b=c[f>>2]|0;l=k+32|0;ah(b,c[l>>2]|0)|0;m=h|0;Hc[c[b>>2]&63](b,m,2)|0;c[l>>2]=Yg(b)|0;b=a+36|0;l=c[b>>2]|0;h=k+24|0;ah(l,c[h>>2]|0)|0;Hc[c[l>>2]&63](l,m,2)|0;c[h>>2]=Yg(l)|0;if((c[g+12>>2]|0)==(a|0)){n=g+16|0}else{c[e+16>>2]=g;g=c[a+28>>2]|0;n=Hc[c[g>>2]&63](g,e,4)|0}e=c[f>>2]|0;f=n+28|0;ah(e,c[f>>2]|0)|0;g=j|0;Hc[c[e>>2]&63](e,g,2)|0;c[f>>2]=Yg(e)|0;e=c[b>>2]|0;b=n+20|0;ah(e,c[b>>2]|0)|0;Hc[c[e>>2]&63](e,g,2)|0;c[b>>2]=Yg(e)|0;i=d;return}
-
-
-
-function eh(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Za=0,_a=0,$a=0,ab=0,bb=0;e=i;i=i+128|0;f=e|0;g=e+8|0;h=a+8|0;j=c[h>>2]|0;if((c[j>>2]&4096|0)==0){k=j}else{ah(a,0)|0;k=c[h>>2]|0}j=c[a+4>>2]|0;l=c[j>>2]|0;m=c[j+4>>2]|0;n=j+8|0;o=c[n>>2]|0;p=c[j+20>>2]|0;q=a+20|0;c[q>>2]=c[q>>2]&-32769;r=c[k+4>>2]|0;if((b|0)==0){if((r|0)==0){s=0;i=e;return s|0}if((d&448|0)==0){s=0;i=e;return s|0}if((d&64|0)==0){do{if((d&256|0)==0){t=r+4|0;u=c[t>>2]|0;if((u|0)==0){v=r;break}else{w=r;x=t;y=u}while(1){u=y|0;c[x>>2]=c[u>>2];c[u>>2]=w;u=y+4|0;t=c[u>>2]|0;if((t|0)==0){v=y;break}else{w=y;x=u;y=t}}}else{t=r|0;u=c[t>>2]|0;if((u|0)==0){v=r;break}else{z=r;A=t;B=u}while(1){u=B+4|0;c[A>>2]=c[u>>2];c[u>>2]=z;u=B|0;t=c[u>>2]|0;if((t|0)==0){v=B;break}else{z=B;A=u;B=t}}}}while(0);c[(c[h>>2]|0)+4>>2]=v;if((o|0)<0){s=c[v+8>>2]|0;i=e;return s|0}else{s=v+(-o|0)|0;i=e;return s|0}}v=j+16|0;if((c[v>>2]|0)==0){if((c[n>>2]|0)<0){C=9}else{D=k}}else{C=9}if((C|0)==9){k=a+12|0;B=-o|0;if((o|0)<0){A=r;while(1){z=A+4|0;y=c[z>>2]|0;if((y|0)!=0){x=y|0;c[z>>2]=c[x>>2];c[x>>2]=A;A=y;continue}y=c[A>>2]|0;x=c[v>>2]|0;if((x|0)!=0){Tc[x&127](a,c[A+8>>2]|0,j)}if((c[n>>2]|0)<0){Sc[c[k>>2]&127](a,A,0,j)|0}if((y|0)==0){break}else{A=y}}}else{A=r;while(1){y=A+4|0;x=c[y>>2]|0;if((x|0)!=0){z=x|0;c[y>>2]=c[z>>2];c[z>>2]=A;A=x;continue}x=c[A>>2]|0;z=c[v>>2]|0;if((z|0)!=0){Tc[z&127](a,A+B|0,j)}if((c[n>>2]|0)<0){Sc[c[k>>2]&127](a,A,0,j)|0}if((x|0)==0){break}else{A=x}}}D=c[h>>2]|0}c[D+16>>2]=0;c[(c[h>>2]|0)+4>>2]=0;s=0;i=e;return s|0}D=a+16|0;a:do{if((c[(c[D>>2]|0)+4>>2]|0)==8){if((d&4098|0)==0){C=51;break}A=(m|0)<0;k=b+l|0;if(A){E=c[k>>2]|0}else{E=k}k=a;B=Hc[c[k>>2]&63](a,b,4)|0;if((B|0)==0){C=51;break}v=(p|0)==0;x=(m|0)<1;z=B;while(1){B=z+l|0;if(A){F=c[B>>2]|0}else{F=B}do{if(v){if(x){G=Ya(E|0,F|0)|0;break}else{G=wF(E|0,F|0,m|0)|0;break}}else{G=Sc[p&127](a,E,F,j)|0}}while(0);if((G|0)!=0){C=51;break a}if((z|0)==(b|0)){break}B=Hc[c[k>>2]&63](a,z,8)|0;if((B|0)==0){C=51;break a}else{z=B}}z=c[(c[h>>2]|0)+4>>2]|0;c[f>>2]=c[z+4>>2];c[f+4>>2]=c[z>>2];H=z;I=f;C=202}else{C=51}}while(0);b:do{if((C|0)==51){do{if((d&2565|0)==0){if((d&32|0)!=0){G=b;if((o|0)<0){J=c[b+8>>2]|0}else{J=b+(-o|0)|0}F=J+l|0;if((m|0)<0){K=c[F>>2]|0}else{K=F}if((r|0)==0){L=f;M=f;N=G;O=J;C=222;break}else{P=J;Q=G;R=K;C=70;break}}if((r|0)==0){L=f;M=f;N=0;O=b;C=222;break}if((o|0)<0){S=c[r+8>>2]|0}else{S=r+(-o|0)|0}if((S|0)==(b|0)){T=b;U=r;V=0;W=f;X=f;C=151;break}G=b+l|0;if((m|0)>=0){P=b;Q=0;R=G;C=70;break}P=b;Q=0;R=c[G>>2]|0;C=70}else{do{if((d&512|0)==0){G=b+l|0;if((m|0)>=0){Y=G;break}Y=c[G>>2]|0}else{Y=b}}while(0);if((r|0)==0){L=f;M=f;N=0;O=b;C=222}else{P=b;Q=0;R=Y;C=70}}}while(0);c:do{if((C|0)==70){do{if((c[(c[D>>2]|0)+4>>2]|0)==4){G=c[(c[h>>2]|0)+24>>2]|0;if((G|0)==0){Z=r;_=f;$=f;break}if((d&516|0)==0){Z=r;_=f;$=f;break}F=(G|0)>0;if(!F){Z=r;_=f;$=f;break}E=(o|0)<0;z=(m|0)<0;k=(p|0)==0;x=(m|0)<1;v=-o|0;A=r;B=0;while(1){if(E){aa=c[A+8>>2]|0}else{aa=A+v|0}y=aa+l|0;if(z){ba=c[y>>2]|0}else{ba=y}do{if(k){if(x){ca=Ya(R|0,ba|0)|0;break}else{ca=wF(R|0,ba|0,m|0)|0;break}}else{ca=Sc[p&127](a,R,ba,j)|0}}while(0);if((ca|0)==0){C=89;break}c[g+(B<<2)>>2]=ca;if((ca|0)<0){da=A+4|0}else{da=A|0}y=c[da>>2]|0;w=B+1|0;if((y|0)==0){s=0;C=246;break}if((w|0)<(G|0)){A=y;B=w}else{C=77;break}}if((C|0)==77){if(F){ea=f;fa=f;ga=0;ha=r}else{Z=r;_=f;$=f;break}while(1){do{if((c[g+(ga<<2)>>2]|0)<0){B=ha+4|0;x=c[B>>2]|0;if((c[g+((ga|1)<<2)>>2]|0)<0){k=x|0;c[B>>2]=c[k>>2];c[k>>2]=ha;c[fa+4>>2]=x;ia=x+4|0;ja=x;ka=ea;break}else{c[ea>>2]=x;c[fa+4>>2]=ha;ia=x|0;ja=ha;ka=x;break}}else{x=ha|0;k=c[x>>2]|0;if((c[g+((ga|1)<<2)>>2]|0)>0){B=k+4|0;c[x>>2]=c[B>>2];c[B>>2]=ha;c[ea>>2]=k;ia=k|0;ja=fa;ka=k;break}else{c[fa+4>>2]=k;c[ea>>2]=ha;ia=k+4|0;ja=k;ka=ha;break}}}while(0);k=c[ia>>2]|0;B=ga+2|0;if((B|0)<(G|0)){ea=ka;fa=ja;ga=B;ha=k}else{Z=k;_=ja;$=ka;break}}}else if((C|0)==89){if(E){s=c[A+8>>2]|0;i=e;return s|0}else{s=A+v|0;i=e;return s|0}}else if((C|0)==246){i=e;return s|0}}else{Z=r;_=f;$=f}}while(0);G=(o|0)<0;F=(m|0)<0;k=(p|0)!=0;B=(m|0)<1;x=-o|0;z=Z;w=_;y=$;d:while(1){la=z;ma=w;while(1){if(G){na=c[la+8>>2]|0}else{na=la+x|0}t=na+l|0;if(F){oa=c[t>>2]|0}else{oa=t}do{if(k){pa=Sc[p&127](a,R,oa,j)|0}else{if(B){pa=Ya(R|0,oa|0)|0;break}else{pa=wF(R|0,oa|0,m|0)|0;break}}}while(0);if((pa|0)==0){T=P;U=la;V=Q;W=ma;X=y;C=151;break c}if((pa|0)>=0){break}t=la+4|0;qa=c[t>>2]|0;if((qa|0)==0){C=132;break d}if(G){ra=c[qa+8>>2]|0}else{ra=qa+x|0}u=ra+l|0;if(F){sa=c[u>>2]|0}else{sa=u}do{if(k){ta=Sc[p&127](a,R,sa,j)|0}else{if(B){ta=Ya(R|0,sa|0)|0;break}else{ta=wF(R|0,sa|0,m|0)|0;break}}}while(0);if((ta|0)>=0){C=129;break}u=qa|0;c[t>>2]=c[u>>2];c[u>>2]=la;c[ma+4>>2]=qa;u=c[qa+4>>2]|0;if((u|0)==0){L=y;M=qa;N=Q;O=P;C=222;break c}else{la=u;ma=qa}}if((C|0)==129){C=0;if((ta|0)==0){C=130;break}c[y>>2]=qa;c[ma+4>>2]=la;v=c[qa>>2]|0;if((v|0)==0){L=qa;M=la;N=Q;O=P;C=222;break c}else{z=v;w=la;y=qa;continue}}v=la|0;ua=c[v>>2]|0;if((ua|0)==0){C=150;break}if(G){va=c[ua+8>>2]|0}else{va=ua+x|0}A=va+l|0;if(F){wa=c[A>>2]|0}else{wa=A}do{if(k){xa=Sc[p&127](a,R,wa,j)|0}else{if(B){xa=Ya(R|0,wa|0)|0;break}else{xa=wF(R|0,wa|0,m|0)|0;break}}}while(0);if((xa|0)>0){A=ua+4|0;c[v>>2]=c[A>>2];c[A>>2]=la;c[y>>2]=ua;A=c[ua>>2]|0;if((A|0)==0){L=ua;M=ma;N=Q;O=P;C=222;break c}else{z=A;w=ma;y=ua;continue}}if((xa|0)==0){C=148;break}c[ma+4>>2]=ua;c[y>>2]=la;A=c[ua+4>>2]|0;if((A|0)==0){L=la;M=ua;N=Q;O=P;C=222;break c}else{z=A;w=ua;y=la}}if((C|0)==130){c[ma+4>>2]=la;T=P;U=qa;V=Q;W=la;X=y;C=151;break}else if((C|0)==132){c[ma+4>>2]=la;L=y;M=la;N=Q;O=P;C=222;break}else if((C|0)==148){c[y>>2]=la;T=P;U=ua;V=Q;W=ma;X=la;C=151;break}else if((C|0)==150){c[y>>2]=la;L=la;M=ma;N=Q;O=P;C=222;break}}}while(0);do{if((C|0)==151){if((U|0)==0){L=X;M=W;N=V;O=T;C=222;break}c[q>>2]=c[q>>2]|32768;w=U+4|0;c[X>>2]=c[w>>2];z=U|0;c[W+4>>2]=c[z>>2];if((d&516|0)!=0){ya=U;break}if((d&8|0)!=0){B=f|0;c[w>>2]=c[B>>2];c[z>>2]=0;c[B>>2]=U;za=W;Aa=T;C=189;break}if((d&16|0)!=0){B=f+4|0;c[z>>2]=c[B>>2];c[w>>2]=0;c[B>>2]=U;Ba=W;Ca=T;C=196;break}if((d&4098|0)!=0){H=U;I=W;C=202;break b}if((d&2049|0)!=0){if((c[(c[D>>2]|0)+4>>2]&4|0)!=0){ya=U;break}c[w>>2]=0;w=f+4|0;c[z>>2]=c[w>>2];c[w>>2]=U;Da=W;Ea=U;Fa=T;C=229;break}if((d&32|0)==0){s=0;i=e;return s|0}if((c[(c[D>>2]|0)+4>>2]&4|0)==0){c[V+4>>2]=0;w=f+4|0;c[V>>2]=c[w>>2];c[w>>2]=V;w=(c[h>>2]|0)+16|0;c[w>>2]=(c[w>>2]|0)+1;ya=U;break}w=c[j+16>>2]|0;if((w|0)!=0){Tc[w&127](a,T,j)}if((c[n>>2]|0)>=0){ya=U;break}Sc[c[a+12>>2]&127](a,V,0,j)|0;ya=U}}while(0);do{if((C|0)==222){c[M+4>>2]=0;c[L>>2]=0;if((d&8|0)!=0){za=M;Aa=O;C=189;break}if((d&16|0)!=0){Ba=M;Ca=O;C=196;break}if((d&516|0)!=0){Ga=O;Ha=M;break b}if((d&2049|0)!=0){Da=M;Ea=0;Fa=O;C=229;break}if((d&32|0)==0){Ga=0;Ha=M;break b}w=(c[h>>2]|0)+16|0;c[w>>2]=(c[w>>2]|0)+1;ya=N}}while(0);do{if((C|0)==189){w=f+4|0;z=c[w>>2]|0;if((z|0)==0){Ga=Aa;Ha=za;break b}B=z+4|0;k=c[B>>2]|0;if((k|0)==0){Ia=z;Ja=c[z>>2]|0}else{F=z;z=B;B=k;while(1){k=B|0;c[z>>2]=c[k>>2];c[k>>2]=F;k=B+4|0;x=c[k>>2]|0;if((x|0)==0){Ia=B;Ja=F;break}else{F=B;z=k;B=x}}}c[w>>2]=Ja;ya=Ia}else if((C|0)==196){B=f|0;z=c[B>>2]|0;if((z|0)==0){Ga=Ca;Ha=Ba;break b}F=z|0;y=c[F>>2]|0;if((y|0)==0){Ka=z;La=c[z+4>>2]|0}else{x=z;z=F;F=y;while(1){y=F+4|0;c[z>>2]=c[y>>2];c[y>>2]=x;y=F|0;k=c[y>>2]|0;if((k|0)==0){Ka=F;La=x;break}else{x=F;z=y;F=k}}}c[B>>2]=La;ya=Ka}else if((C|0)==229){F=j+12|0;z=c[F>>2]|0;do{if((z|0)==0){Ma=Fa}else{if((d&1|0)==0){Ma=Fa;break}Ma=Hc[z&63](a,Fa,j)|0}}while(0);do{if((Ma|0)==0){Na=Ea}else{if((o|0)>-1){Na=Ma+o|0;break}z=Sc[c[a+12>>2]&127](a,0,12,j)|0;B=z;if((z|0)!=0){c[z+8>>2]=Ma;Na=B;break}if((c[F>>2]|0)==0){Na=B;break}z=c[j+16>>2]|0;if((z|0)==0){Na=B;break}if((d&1|0)==0){Na=B;break}Tc[z&127](a,Ma,j);Na=B}}while(0);if((Na|0)==0){Ga=Ma;Ha=Da;break b}F=(c[h>>2]|0)+16|0;B=c[F>>2]|0;if((B|0)<=-1){ya=Na;break}c[F>>2]=B+1;ya=Na}}while(0);B=c[f>>2]|0;c[ya+4>>2]=B;c[ya>>2]=c[f+4>>2];e:do{if((c[(c[D>>2]|0)+4>>2]&8|0)==0){Oa=ya}else{if((d&516|0)==0){Oa=ya;break}F=(o|0)<0;if(F){Pa=c[ya+8>>2]|0}else{Pa=ya+(-o|0)|0}z=(m|0)<0;x=Pa+l|0;if(z){Qa=c[x>>2]|0}else{Qa=x}x=ya+4|0;if((B|0)==0){Oa=ya;break}w=(p|0)==0;k=(m|0)<1;if(F){F=ya;y=x;G=B;while(1){A=G|0;E=c[A>>2]|0;if((E|0)==0){Ra=G;Sa=A}else{u=G;Ta=A;A=E;while(1){E=A+4|0;c[Ta>>2]=c[E>>2];c[E>>2]=u;E=A|0;Ua=c[E>>2]|0;if((Ua|0)==0){Ra=A;Sa=E;break}else{u=A;Ta=E;A=Ua}}}A=y|0;c[A>>2]=Ra;Ta=(c[Ra+8>>2]|0)+l|0;if(z){Va=c[Ta>>2]|0}else{Va=Ta}do{if(w){if(k){Wa=Ya(Qa|0,Va|0)|0;break}else{Wa=wF(Qa|0,Va|0,m|0)|0;break}}else{Wa=Sc[p&127](a,Qa,Va,j)|0}}while(0);if((Wa|0)!=0){Oa=F;break e}c[A>>2]=c[Sa>>2];c[Sa>>2]=F;Ta=Ra+4|0;u=c[Ta>>2]|0;if((u|0)==0){Oa=Ra;break}else{F=Ra;y=Ta;G=u}}}else{G=ya;y=x;F=B;while(1){u=F|0;Ta=c[u>>2]|0;if((Ta|0)==0){Xa=F;Za=u}else{v=F;Ua=u;u=Ta;while(1){Ta=u+4|0;c[Ua>>2]=c[Ta>>2];c[Ta>>2]=v;Ta=u|0;E=c[Ta>>2]|0;if((E|0)==0){Xa=u;Za=Ta;break}else{v=u;Ua=Ta;u=E}}}u=y|0;c[u>>2]=Xa;Ua=Xa+(l-o)|0;if(z){_a=c[Ua>>2]|0}else{_a=Ua}do{if(w){if(k){$a=Ya(Qa|0,_a|0)|0;break}else{$a=wF(Qa|0,_a|0,m|0)|0;break}}else{$a=Sc[p&127](a,Qa,_a,j)|0}}while(0);if(($a|0)!=0){Oa=G;break e}c[u>>2]=c[Za>>2];c[Za>>2]=G;Ua=Xa+4|0;v=c[Ua>>2]|0;if((v|0)==0){Oa=Xa;break}else{G=Xa;y=Ua;F=v}}}}}while(0);c[(c[h>>2]|0)+4>>2]=Oa;if((o|0)<0){s=c[Oa+8>>2]|0;i=e;return s|0}else{s=Oa+(-o|0)|0;i=e;return s|0}}}while(0);do{if((C|0)==202){if((o|0)<0){ab=c[H+8>>2]|0}else{ab=H+(-o|0)|0}Oa=c[j+16>>2]|0;do{if((Oa|0)!=0){if((d&2|0)==0){break}Tc[Oa&127](a,ab,j)}}while(0);if((c[n>>2]|0)<0){Sc[c[a+12>>2]&127](a,H,0,j)|0}Oa=(c[h>>2]|0)+16|0;Xa=c[Oa>>2]|0;c[Oa>>2]=Xa-1;if((Xa|0)>=1){Ga=ab;Ha=I;break}c[(c[h>>2]|0)+16>>2]=-1;Ga=ab;Ha=I}}while(0);I=Ha;do{bb=I+4|0;I=c[bb>>2]|0;}while((I|0)!=0);c[bb>>2]=c[f>>2];c[(c[h>>2]|0)+4>>2]=c[f+4>>2];s=(d&2|0)!=0?Ga:0;i=e;return s|0}function fh(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;if((c[c[a+8>>2]>>2]&4096|0)!=0){ah(a,0)|0}d=(b|0)!=0;a:do{if(d){if((c[c[b+8>>2]>>2]&4096|0)!=0){ah(b,0)|0}if((c[b+16>>2]|0)!=(c[a+16>>2]|0)){e=0;return e|0}if((b|0)==0){break}else{f=b}while(1){if((f|0)==(a|0)){e=0;break}f=c[f+28>>2]|0;if((f|0)==0){break a}}return e|0}}while(0);f=a+28|0;g=c[f>>2]|0;if((g|0)!=0){h=g+24|0;c[h>>2]=(c[h>>2]|0)-1}c[a+32>>2]=0;c[f>>2]=0;if(d){c[f>>2]=b;c[a>>2]=62;f=b+24|0;c[f>>2]=(c[f>>2]|0)+1;e=b;return e|0}else{c[a>>2]=c[c[a+16>>2]>>2];e=g;return e|0}return 0}function gh(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0;if((d&99|0)!=0){e=Hc[c[c[a+16>>2]>>2]&63](a,b,d)|0;return e|0}do{if((d&516|0)==0){f=c[a+16>>2]|0;g=c[f+4>>2]|0;if((d&384|0)!=0){if((g&12|0)==0){break}}if((g&12|0)==0){if((d&24|0)==0){e=0;return e|0}g=a+32|0;h=c[g>>2]|0;if((h|0)==0){i=47}else{j=c[(c[h+4>>2]|0)+8>>2]|0;k=c[(c[h+8>>2]|0)+4>>2]|0;if((j|0)<0){l=c[k+8>>2]|0}else{l=k+(-j|0)|0}if((l|0)==(b|0)){m=b;n=h}else{i=47}}a:do{if((i|0)==47){b:do{if((a|0)!=0){h=a;j=f;while(1){o=Hc[c[j>>2]&63](h,b,4)|0;if((o|0)!=0){break}k=c[h+28>>2]|0;if((k|0)==0){break b}h=k;j=c[k+16>>2]|0}c[g>>2]=h;m=o;n=h;break a}}while(0);c[g>>2]=0;e=0;return e|0}}while(0);j=(d&8|0)==0;k=Hc[c[c[n+16>>2]>>2]&63](n,m,d)|0;p=n;c:while(1){if((k|0)!=0){q=p+16|0;if((p|0)==(a|0)){e=k;i=64;break}else{r=k}do{s=a;while(1){if((Hc[c[c[s+16>>2]>>2]&63](s,r,4)|0)!=0){break}t=c[s+28>>2]|0;if((t|0)==(p|0)){e=r;i=64;break c}else{s=t}}r=Hc[c[c[q>>2]>>2]&63](p,r,d)|0;}while((r|0)!=0)}q=c[p+28>>2]|0;c[g>>2]=q;if((q|0)==0){e=0;i=64;break}s=c[c[q+16>>2]>>2]|0;if(j){k=Hc[s&63](q,0,256)|0;p=q;continue}else{k=Hc[s&63](q,0,128)|0;p=q;continue}}if((i|0)==64){return e|0}}if((d&408|0)==0){e=0;return e|0}d:do{if((a|0)==0){u=0;v=0}else{p=(d&272|0)!=0;if((d&136|0)==0){k=0;j=0;g=0;q=a;s=f;while(1){h=Hc[c[s>>2]&63](q,b,d)|0;do{if((h|0)==0){w=g;x=j;y=k}else{t=c[q+4>>2]|0;z=c[t+4>>2]|0;A=c[t+20>>2]|0;B=h+(c[t>>2]|0)|0;if((z|0)<0){C=c[B>>2]|0}else{C=B}if((k|0)!=0){do{if((A|0)==0){if((z|0)<1){D=Ya(C|0,j|0)|0;break}else{D=wF(C|0,j|0,z|0)|0;break}}else{D=Sc[A&127](q,C,j,t)|0}}while(0);if(!(p&(D|0)>0)){w=g;x=j;y=k;break}}w=q;x=C;y=h}}while(0);h=c[q+28>>2]|0;if((h|0)==0){u=y;v=w;break d}k=y;j=x;g=w;q=h;s=c[h+16>>2]|0}}else{s=0;q=0;g=0;j=a;k=f;while(1){h=Hc[c[k>>2]&63](j,b,d)|0;do{if((h|0)==0){E=g;F=q;G=s}else{t=c[j+4>>2]|0;A=c[t+4>>2]|0;z=c[t+20>>2]|0;B=h+(c[t>>2]|0)|0;if((A|0)<0){H=c[B>>2]|0}else{H=B}if((s|0)!=0){do{if((z|0)==0){if((A|0)<1){I=Ya(H|0,q|0)|0;break}else{I=wF(H|0,q|0,A|0)|0;break}}else{I=Sc[z&127](j,H,q,t)|0}}while(0);if(!((I|0)<0|p&(I|0)>0)){E=g;F=q;G=s;break}}E=j;F=H;G=h}}while(0);h=c[j+28>>2]|0;if((h|0)==0){u=G;v=E;break d}s=G;q=F;g=E;j=h;k=c[h+16>>2]|0}}}}while(0);c[a+32>>2]=v;e=u;return e|0}}while(0);e:do{if((a|0)==0){J=0;K=0}else{u=a;while(1){v=Hc[c[c[u+16>>2]>>2]&63](u,b,d)|0;if((v|0)!=0){J=v;K=u;break e}v=c[u+28>>2]|0;if((v|0)==0){J=0;K=0;break}else{u=v}}}}while(0);c[a+32>>2]=K;e=J;return e|0}function hh(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;e=a|0;f=a+32|0;g=Hc[c[e>>2]&63](a,0,128)|0;while(1){if((g|0)==0){h=0;i=4;break}j=c[f>>2]|0;k=Hc[c[e>>2]&63](a,g,8)|0;l=Hc[b&63]((j|0)==0?a:j,g,d)|0;if((l|0)<0){h=l;i=4;break}else{g=k}}if((i|0)==4){return h|0}return 0}function ih(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;f=i;i=i+16|0;g=f|0;h=f+8|0;c[d>>2]=0;j=b|0;c[e>>2]=(Nw(Hx(j)|0)|0)!=0;k=c[53804]|0;a:do{if((k|0)!=0){l=fw(j,k)|0;m=a[l]|0;if(m<<24>>24==0){break}else{n=173856;o=134728}while(1){if(m<<24>>24==(a[o]|0)){if((Ya(l|0,o|0)|0)==0){break}}p=n+12|0;q=c[p>>2]|0;if((q|0)==0){break a}else{n=p;o=q}}c[d>>2]=c[n+4>>2];c[e>>2]=c[n+8>>2]}}while(0);n=c[53822]|0;do{if((n|0)!=0){if((c[e>>2]|0)!=1){break}o=fw(j,n)|0;if((a[o]|0)==0){break}jh(o,e)}}while(0);n=c[53818]|0;do{if((n|0)!=0){if((c[d>>2]|0)!=1){break}o=fw(j,n)|0;if((a[o]|0)==0){break}jh(o,d)}}while(0);if((a[(c[b+8>>2]|0)+153|0]|0)==0){i=f;return}n=b;j=b-32|0;o=Hx(c[((c[n>>2]&3|0)==2?b:j)+28>>2]|0)|0;k=c[n>>2]&3;ih(uw(o,c[((k|0)==2?b:j)+28>>2]|0,c[((k|0)==3?b:b+32|0)+28>>2]|0,0,0)|0,g,h);c[e>>2]=c[g>>2]|c[e>>2];c[d>>2]=c[h>>2]|c[d>>2];i=f;return}function jh(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0;e=i;c[d>>2]=0;if((a[b]|0)==0){i=e;return}else{f=b;g=0;h=0}a:while(1){b=c[43422]|0;j=c[43452]|0;k=(j|0)==0;l=c[43426]|0;m=(l|0)==0;do{if((b|0)==0){if(k){n=0;o=f}else{p=f;q=0;while(1){r=173808;s=j;while(1){t=xF(s|0)|0;u=r+8|0;if((Za(p|0,s|0,t|0)|0)==0){v=7;break}w=c[u>>2]|0;if((w|0)==0){x=p;y=q;break}else{r=u;s=w}}if((v|0)==7){v=0;x=p+t|0;y=c[r+4>>2]|q}if((p|0)==(x|0)){n=y;o=p;break}else{p=x;q=y}}}b:do{if(m){z=o;A=n}else{q=173704;p=l;while(1){B=xF(p|0)|0;s=q+8|0;if((Za(o|0,p|0,B|0)|0)==0){break}w=c[s>>2]|0;if((w|0)==0){z=o;A=n;break b}else{q=s;p=w}}z=o+B|0;A=c[q+4>>2]|n}}while(0);p=(A|0)!=0&(A&15|0)==0&1|A;if((p|0)==0){v=30;break a}else if((p|0)!=8){C=p;D=z;v=33;break}if((g|0)==3){E=3;F=z;G=h;break}else if((g|0)!=0){C=8;D=z;v=33;break}if((a[z]|0)==0){v=35;break a}else{C=8;D=z;v=33}}else{p=173688;r=b;while(1){H=xF(r|0)|0;w=p+8|0;if((Za(f|0,r|0,H|0)|0)==0){v=18;break}s=c[w>>2]|0;if((s|0)==0){I=f;J=0;v=19;break}else{p=w;r=s}}if((v|0)==18){v=0;r=c[p+4>>2]|0;s=f+H|0;if((H|0)==0){I=s;J=r;v=19}else{K=s;L=r}}c:do{if((v|0)==19){v=0;if(k){M=J;N=I}else{r=I;s=J;while(1){w=173808;u=j;while(1){O=xF(u|0)|0;P=w+8|0;if((Za(r|0,u|0,O|0)|0)==0){v=23;break}Q=c[P>>2]|0;if((Q|0)==0){R=r;S=s;break}else{w=P;u=Q}}if((v|0)==23){v=0;R=r+O|0;S=c[w+4>>2]|s}if((r|0)==(R|0)){M=S;N=r;break}else{r=R;s=S}}}if(m){K=N;L=M;break}else{T=173704;U=l}while(1){V=xF(U|0)|0;s=T+8|0;if((Za(N|0,U|0,V|0)|0)==0){break}r=c[s>>2]|0;if((r|0)==0){K=N;L=M;break c}else{T=s;U=r}}K=N+V|0;L=c[T+4>>2]|M}}while(0);p=(L|0)!=0&(L&15|0)==0&1|L;if((p|0)==0){v=30;break a}else if((p|0)!=8){C=p;D=K;v=33;break}if((g|0)==3){E=3;F=K;G=h;break}else if((g|0)!=0){C=8;D=K;v=33;break}if((a[K]|0)==0){v=35;break a}else{C=8;D=K;v=33}}}while(0);if((v|0)==33){v=0;l=h|C<<(g<<3);c[d>>2]=l;E=g+1|0;F=D;G=l}if((a[F]|0)!=0&(E|0)<4){f=F;g=E;h=G}else{v=35;break}}if((v|0)==30){Fv(0,105792,(G=i,i=i+8|0,c[G>>2]=f,G)|0)|0;i=G;i=e;return}else if((v|0)==35){i=e;return}}function kh(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0,n=0,o=0.0,p=0.0;d=b&15;e=173472;while(1){if((d|0)==(c[e>>2]|0)){f=4;break}if((c[e+40>>2]|0)==0){g=0.0;break}else{e=e+24|0}}if((f|0)==4){g=+h[e+8>>3]+0.0}e=b>>>8&15;d=173472;while(1){if((e|0)==(c[d>>2]|0)){f=8;break}if((c[d+40>>2]|0)==0){i=g;break}else{d=d+24|0}}if((f|0)==8){i=g+ +h[d+8>>3]}d=b>>>16&15;e=173472;while(1){if((d|0)==(c[e>>2]|0)){f=12;break}if((c[e+40>>2]|0)==0){j=i;break}else{e=e+24|0}}if((f|0)==12){j=i+ +h[e+8>>3]}e=b>>>24&15;b=173472;while(1){if((e|0)==(c[b>>2]|0)){break}if((c[b+40>>2]|0)==0){k=j;f=17;break}else{b=b+24|0}}if((f|0)==17){l=k*10.0;m=a|0;n=c[53820]|0;o=+Fm(m,n,1.0,0.0);p=l*o;return+p}k=j+ +h[b+8>>3];l=k*10.0;m=a|0;n=c[53820]|0;o=+Fm(m,n,1.0,0.0);p=l*o;return+p}function lh(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0.0,o=0.0,p=0,q=0.0,r=0,s=0,t=0,u=0;j=i;i=i+80|0;k=j|0;l=j+8|0;m=j+72|0;n=+kh(a,g);o=n*n;h[m>>3]=o;c[f+12>>2]=g;g=e+3|0;a=b+(g<<4)|0;p=f+32|0;f=a;c[p>>2]=c[f>>2];c[p+4>>2]=c[f+4>>2];c[p+8>>2]=c[f+8>>2];c[p+12>>2]=c[f+12>>2];do{if((e|0)>(d|0)){n=+h[b+(e<<4)>>3]- +h[a>>3];q=+h[b+(e<<4)+8>>3]- +h[b+(g<<4)+8>>3];if(n*n+q*q>=o){r=e;break}r=e-3|0}else{r=e}}while(0);e=l+48|0;g=b+(r<<4)|0;c[e>>2]=c[g>>2];c[e+4>>2]=c[g+4>>2];c[e+8>>2]=c[g+8>>2];c[e+12>>2]=c[g+12>>2];a=l+32|0;d=b+(r+1<<4)|0;c[a>>2]=c[d>>2];c[a+4>>2]=c[d+4>>2];c[a+8>>2]=c[d+8>>2];c[a+12>>2]=c[d+12>>2];f=l+16|0;s=b+(r+2<<4)|0;c[f>>2]=c[s>>2];c[f+4>>2]=c[s+4>>2];c[f+8>>2]=c[s+8>>2];c[f+12>>2]=c[s+12>>2];t=l|0;u=l;c[u>>2]=c[p>>2];c[u+4>>2]=c[p+4>>2];c[u+8>>2]=c[p+8>>2];c[u+12>>2]=c[p+12>>2];c[k>>2]=t;c[k+4>>2]=m;_l(k,198,t,1);c[g>>2]=c[e>>2];c[g+4>>2]=c[e+4>>2];c[g+8>>2]=c[e+8>>2];c[g+12>>2]=c[e+12>>2];c[d>>2]=c[a>>2];c[d+4>>2]=c[a+4>>2];c[d+8>>2]=c[a+8>>2];c[d+12>>2]=c[a+12>>2];c[s>>2]=c[f>>2];c[s+4>>2]=c[f+4>>2];c[s+8>>2]=c[f+8>>2];c[s+12>>2]=c[f+12>>2];f=b+(r+3<<4)|0;c[f>>2]=c[u>>2];c[f+4>>2]=c[u+4>>2];c[f+8>>2]=c[u+8>>2];c[f+12>>2]=c[u+12>>2];i=j;return r|0}function mh(a,b){a=a|0;b=b|0;var d=0,e=0,f=0.0,g=0.0;d=i;e=b;b=i;i=i+16|0;c[b>>2]=c[e>>2];c[b+4>>2]=c[e+4>>2];c[b+8>>2]=c[e+8>>2];c[b+12>>2]=c[e+12>>2];e=c[a>>2]|0;f=+h[b>>3]- +h[e>>3];g=+h[b+8>>3]- +h[e+8>>3];i=d;return f*f+g*g<=+h[c[a+4>>2]>>3]|0}function nh(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0.0,o=0.0,p=0.0,q=0,r=0,s=0,t=0,u=0;j=i;i=i+80|0;k=j|0;l=j+8|0;m=j+72|0;n=+kh(a,g);o=n*n;h[m>>3]=o;c[f+8>>2]=g;g=b+(d<<4)|0;a=f+16|0;f=g;c[a>>2]=c[f>>2];c[a+4>>2]=c[f+4>>2];c[a+8>>2]=c[f+8>>2];c[a+12>>2]=c[f+12>>2];do{if((e|0)>(d|0)){f=d+3|0;n=+h[g>>3]- +h[b+(f<<4)>>3];p=+h[b+(d<<4)+8>>3]- +h[b+(f<<4)+8>>3];if(n*n+p*p>=o){q=d;break}q=f}else{q=d}}while(0);d=l;g=b+(q+3<<4)|0;c[d>>2]=c[g>>2];c[d+4>>2]=c[g+4>>2];c[d+8>>2]=c[g+8>>2];c[d+12>>2]=c[g+12>>2];e=l+16|0;f=b+(q+2<<4)|0;c[e>>2]=c[f>>2];c[e+4>>2]=c[f+4>>2];c[e+8>>2]=c[f+8>>2];c[e+12>>2]=c[f+12>>2];r=l+32|0;s=b+(q+1<<4)|0;c[r>>2]=c[s>>2];c[r+4>>2]=c[s+4>>2];c[r+8>>2]=c[s+8>>2];c[r+12>>2]=c[s+12>>2];t=l+48|0;u=t;c[u>>2]=c[a>>2];c[u+4>>2]=c[a+4>>2];c[u+8>>2]=c[a+8>>2];c[u+12>>2]=c[a+12>>2];c[k>>2]=t;c[k+4>>2]=m;_l(k,198,l|0,0);l=b+(q<<4)|0;c[l>>2]=c[u>>2];c[l+4>>2]=c[u+4>>2];c[l+8>>2]=c[u+8>>2];c[l+12>>2]=c[u+12>>2];c[s>>2]=c[r>>2];c[s+4>>2]=c[r+4>>2];c[s+8>>2]=c[r+8>>2];c[s+12>>2]=c[r+12>>2];c[f>>2]=c[e>>2];c[f+4>>2]=c[e+4>>2];c[f+8>>2]=c[e+8>>2];c[f+12>>2]=c[e+12>>2];c[g>>2]=c[d>>2];c[g+4>>2]=c[d+4>>2];c[g+8>>2]=c[d+8>>2];c[g+12>>2]=c[d+12>>2];i=j;return q|0}function oh(a,b,d,e,f,g,i){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;i=i|0;var j=0,k=0,l=0,m=0.0,n=0.0,o=0,p=0,q=0,r=0.0,s=0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0,G=0.0,H=0.0,I=0.0,J=0.0;j=(g|0)!=0;k=(i|0)==0;if(j&(k^1)&(e|0)==(d|0)){l=b+(e<<4)|0;m=+h[l>>3];n=+h[b+(e<<4)+8>>3];o=e+3|0;p=b+(o<<4)|0;q=p|0;r=+h[q>>3];s=b+(o<<4)+8|0;t=+h[s>>3];u=+kh(a,g);v=+kh(a,i);w=m-r;x=n-t;y=+T(w*w+x*x);if(u+v<y){z=v;A=u}else{u=y/3.0;z=u;A=u}do{if(n==t){if(m<r){B=r-z;C=n;D=m+A;E=n;break}else{B=r+z;C=n;D=m-A;E=n;break}}else{if(n<t){B=m;C=t-z;D=m;E=n+A;break}else{B=m;C=t+z;D=m;E=n-A;break}}}while(0);o=e+1|0;F=b+(o<<4)|0;h[F>>3]=D;h[b+(o<<4)+8>>3]=E;o=l;l=F;c[o>>2]=c[l>>2];c[o+4>>2]=c[l+4>>2];c[o+8>>2]=c[l+8>>2];c[o+12>>2]=c[l+12>>2];h[q>>3]=B;h[s>>3]=C;s=b+(e+2<<4)|0;q=p;c[s>>2]=c[q>>2];c[s+4>>2]=c[q+4>>2];c[s+8>>2]=c[q+8>>2];c[s+12>>2]=c[q+12>>2];c[f+12>>2]=i;h[f+32>>3]=m;h[f+40>>3]=n;c[f+8>>2]=g;h[f+16>>3]=r;h[f+24>>3]=t;return}if(!k){t=+kh(a,i);r=+h[b+(e<<4)>>3];n=+h[b+(e<<4)+8>>3];k=e+3|0;q=b+(k<<4)|0;s=q|0;m=+h[s>>3];p=b+(k<<4)+8|0;C=+h[p>>3];B=r-m;E=n-C;D=+T(B*B+E*E)*.9;E=t<D?t:D;do{if(n==C){if(r<m){G=m-E;H=n;break}else{G=m+E;H=n;break}}else{if(n<C){G=r;H=C-E;break}else{G=r;H=C+E;break}}}while(0);k=e+1|0;h[b+(k<<4)>>3]=r;h[b+(k<<4)+8>>3]=n;h[s>>3]=G;h[p>>3]=H;p=b+(e+2<<4)|0;e=q;c[p>>2]=c[e>>2];c[p+4>>2]=c[e+4>>2];c[p+8>>2]=c[e+8>>2];c[p+12>>2]=c[e+12>>2];c[f+12>>2]=i;h[f+32>>3]=m;h[f+40>>3]=C}if(!j){return}C=+kh(a,g);a=b+(d<<4)|0;m=+h[a>>3];H=+h[b+(d<<4)+8>>3];j=d+3|0;G=+h[b+(j<<4)>>3];n=+h[b+(j<<4)+8>>3];r=m-G;E=H-n;D=+T(r*r+E*E)*.9;E=C<D?C:D;do{if(H==n){if(m<G){I=m+E;J=H;break}else{I=m-E;J=H;break}}else{if(H<n){I=m;J=H+E;break}else{I=m;J=H-E;break}}}while(0);j=d+1|0;i=b+(j<<4)|0;h[i>>3]=I;h[b+(j<<4)+8>>3]=J;j=a;a=i;c[j>>2]=c[a>>2];c[j+4>>2]=c[a+4>>2];c[j+8>>2]=c[a+8>>2];c[j+12>>2]=c[a+12>>2];a=d+2|0;h[b+(a<<4)>>3]=G;h[b+(a<<4)+8>>3]=n;c[f+8>>2]=g;h[f+16>>3]=m;h[f+24>>3]=H;return}function ph(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=+e;f=f|0;var g=0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0;f=i;g=b;b=i;i=i+16|0;c[b>>2]=c[g>>2];c[b+4>>2]=c[g+4>>2];c[b+8>>2]=c[g+8>>2];c[b+12>>2]=c[g+12>>2];g=d;d=i;i=i+16|0;c[d>>2]=c[g>>2];c[d+4>>2]=c[g+4>>2];c[d+8>>2]=c[g+8>>2];c[d+12>>2]=c[g+12>>2];j=+h[b>>3];k=+h[d>>3]-j;l=+h[b+8>>3];m=+h[d+8>>3]-l;n=e*10.0/(+T(k*k+m*m)+1.0e-4);e=n*(k+(k>=0.0?1.0e-4:-1.0e-4));k=n*(m+(m>=0.0?1.0e-4:-1.0e-4));m=e*.5;n=k*.5;o=j-n;p=l-m;q=j+n;n=m+l;l=e+o;m=k+p;j=e+q;e=k+n;k=l>j?l:j;r=q>k?q:k;k=m>e?m:e;s=n>k?n:k;k=l<j?l:j;j=q<k?q:k;k=m<e?m:e;e=n<k?n:k;h[a>>3]=o<j?o:j;h[a+8>>3]=p<e?p:e;h[a+16>>3]=o>r?o:r;h[a+24>>3]=p>s?p:s;i=f;return}function qh(a,b,d,e,f,g,j){a=a|0;b=b|0;d=d|0;e=e|0;f=+f;g=+g;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0,s=0,t=0.0,u=0.0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0;k=i;i=i+48|0;l=d;d=i;i=i+16|0;c[d>>2]=c[l>>2];c[d+4>>2]=c[l+4>>2];c[d+8>>2]=c[l+8>>2];c[d+12>>2]=c[l+12>>2];l=e;e=i;i=i+16|0;c[e>>2]=c[l>>2];c[e+4>>2]=c[l+4>>2];c[e+8>>2]=c[l+8>>2];c[e+12>>2]=c[l+12>>2];l=k|0;m=k+16|0;n=(c[a+16>>2]|0)+12|0;o=c[n>>2]|0;c[n>>2]=b;pB(a,c[(c[a>>2]|0)+336>>2]|0);xB(a,g);b=d|0;p=e|0;q=+h[p>>3]- +h[b>>3];r=d+8|0;s=e+8|0;t=+h[s>>3]- +h[r>>3];u=10.0/(+T(q*q+t*t)+1.0e-4);v=u*(q+(q>=0.0?1.0e-4:-1.0e-4));h[p>>3]=v;q=u*(t+(t>=0.0?1.0e-4:-1.0e-4));h[s>>3]=q;s=m;p=l|0;e=l+8|0;w=m|0;x=m+8|0;y=k+32|0;z=d;d=0;while(1){A=j>>(d<<3);B=A&255;if((B|0)==0){C=8;break}t=+h[b>>3];u=+h[r>>3];h[p>>3]=v;h[e>>3]=q;h[w>>3]=t;h[x>>3]=u;D=A&15;A=173472;E=1;while(1){F=A+24|0;if((D|0)==(E|0)){C=6;break}G=c[F>>2]|0;if((G|0)==0){break}else{A=F;E=G}}if((C|0)==6){C=0;E=A+8|0;h[p>>3]=v*+h[E>>3]*f;h[e>>3]=q*+h[E>>3]*f;Rc[c[A+16>>2]&31](a,m,l,f,g,B);h[w>>3]=+h[w>>3]+ +h[p>>3];h[x>>3]=+h[x>>3]+ +h[e>>3]}c[y>>2]=c[s>>2];c[y+4>>2]=c[s+4>>2];c[y+8>>2]=c[s+8>>2];c[y+12>>2]=c[s+12>>2];c[z>>2]=c[y>>2];c[z+4>>2]=c[y+4>>2];c[z+8>>2]=c[y+8>>2];c[z+12>>2]=c[y+12>>2];E=d+1|0;if((E|0)<4){d=E}else{C=8;break}}if((C|0)==8){c[n>>2]=o;i=k;return}}function rh(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=+e;f=+f;g=g|0;var j=0,k=0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0,r=0;j=i;i=i+80|0;k=b;b=i;i=i+16|0;c[b>>2]=c[k>>2];c[b+4>>2]=c[k+4>>2];c[b+8>>2]=c[k+8>>2];c[b+12>>2]=c[k+12>>2];k=d;d=i;i=i+16|0;c[d>>2]=c[k>>2];c[d+4>>2]=c[k+4>>2];c[d+8>>2]=c[k+8>>2];c[d+12>>2]=c[k+12>>2];k=j|0;if(f>4.0){l=f*.25*.35}else{l=.35}f=+h[d+8>>3];e=l*f;m=+h[d>>3];n=l*m;l=+h[b>>3];o=m+l;m=+h[b+8>>3];p=f+m;d=k+64|0;if((g&32|0)==0){h[k+64>>3]=o;h[k+72>>3]=p;q=k;c[q>>2]=c[d>>2];c[q+4>>2]=c[d+4>>2];c[q+8>>2]=c[d+8>>2];c[q+12>>2]=c[d+12>>2];h[k+16>>3]=e+o;h[k+24>>3]=p-n;q=k+32|0;r=b;c[q>>2]=c[r>>2];c[q+4>>2]=c[r+4>>2];c[q+8>>2]=c[r+8>>2];c[q+12>>2]=c[r+12>>2];h[k+48>>3]=o-e;h[k+56>>3]=n+p}else{r=b;c[d>>2]=c[r>>2];c[d+4>>2]=c[r+4>>2];c[d+8>>2]=c[r+8>>2];c[d+12>>2]=c[r+12>>2];d=k;c[d>>2]=c[r>>2];c[d+4>>2]=c[r+4>>2];c[d+8>>2]=c[r+8>>2];c[d+12>>2]=c[r+12>>2];h[k+16>>3]=e+l;h[k+24>>3]=m-n;h[k+32>>3]=o;h[k+40>>3]=p;h[k+48>>3]=l-e;h[k+56>>3]=n+m}if((g&64|0)!=0){rB(a,k|0,3,g>>>4&1^1);i=j;return}if((g&128|0)==0){rB(a,k+16|0,3,g>>>4&1^1);i=j;return}else{rB(a,k+32|0,3,g>>>4&1^1);i=j;return}}function sh(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=+e;f=+f;g=g|0;var j=0,k=0,l=0.0,m=0.0,n=0,o=0.0,p=0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0;j=i;i=i+144|0;k=b;b=i;i=i+16|0;c[b>>2]=c[k>>2];c[b+4>>2]=c[k+4>>2];c[b+8>>2]=c[k+8>>2];c[b+12>>2]=c[k+12>>2];k=d;d=i;i=i+16|0;c[d>>2]=c[k>>2];c[d+4>>2]=c[k+4>>2];c[d+8>>2]=c[k+8>>2];c[d+12>>2]=c[k+12>>2];k=j|0;l=e*4.0;do{if(l<f){if((g&32|0)==0){m=.45;break}m=f/l*.45}else{m=.45}}while(0);n=g&32;do{if(f>1.0){if((n|0)==0){o=0.0;p=0;break}o=(f+-1.0)*.05/e;p=n}else{o=0.0;p=n}}while(0);e=+h[d+8>>3];f=-0.0-e;l=m*f;q=+h[d>>3];r=m*q;m=o*f;f=o*q;o=+h[b>>3];s=q+o;t=+h[b+8>>3];u=e+t;v=o+q*.5;q=e*.5+t;d=k|0;n=k+128|0;if((p|0)==0){h[k+128>>3]=s;h[k+136>>3]=u;p=k;c[p>>2]=c[n>>2];c[p+4>>2]=c[n+4>>2];c[p+8>>2]=c[n+8>>2];c[p+12>>2]=c[n+12>>2];h[k+16>>3]=o-l;h[k+24>>3]=t-r;h[k+32>>3]=v-m;h[k+40>>3]=q-f;h[k+48>>3]=o;h[k+56>>3]=t;p=k+64|0;w=b;c[p>>2]=c[w>>2];c[p+4>>2]=c[w+4>>2];c[p+8>>2]=c[w+8>>2];c[p+12>>2]=c[w+12>>2];h[k+80>>3]=o;h[k+88>>3]=t;h[k+96>>3]=m+v;h[k+104>>3]=f+q;h[k+112>>3]=l+o;h[k+120>>3]=r+t}else{w=b;c[n>>2]=c[w>>2];c[n+4>>2]=c[w+4>>2];c[n+8>>2]=c[w+8>>2];c[n+12>>2]=c[w+12>>2];n=k;c[n>>2]=c[w>>2];c[n+4>>2]=c[w+4>>2];c[n+8>>2]=c[w+8>>2];c[n+12>>2]=c[w+12>>2];h[k+16>>3]=s-l;h[k+24>>3]=u-r;h[k+32>>3]=v-m;h[k+40>>3]=q-f;h[k+48>>3]=s-m;h[k+56>>3]=u-f;h[k+64>>3]=s;h[k+72>>3]=u;h[k+80>>3]=m+s;h[k+88>>3]=f+u;h[k+96>>3]=m+v;h[k+104>>3]=f+q;h[k+112>>3]=l+s;h[k+120>>3]=r+u}if((g&64|0)!=0){rB(a,d,6,1);i=j;return}if((g&128|0)==0){rB(a,d,9,1);i=j;return}else{rB(a,k+48|0,6,1);i=j;return}}function th(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=+e;f=+f;g=g|0;var j=0,k=0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;j=i;i=i+64|0;k=b;b=i;i=i+16|0;c[b>>2]=c[k>>2];c[b+4>>2]=c[k+4>>2];c[b+8>>2]=c[k+8>>2];c[b+12>>2]=c[k+12>>2];k=d;d=i;i=i+16|0;c[d>>2]=c[k>>2];c[d+4>>2]=c[k+4>>2];c[d+8>>2]=c[k+8>>2];c[d+12>>2]=c[k+12>>2];k=j|0;f=+h[d+8>>3];e=+h[d>>3];l=+h[b>>3];m=e+l;n=+h[b+8>>3];o=f+n;p=l+e*.2;q=f*.2+n;r=l+e*.6;l=f*.6+n;d=k|0;s=k|0;h[s>>3]=p-f;t=k+8|0;h[t>>3]=e+q;u=k+16|0;h[u>>3]=f+p;v=k+24|0;h[v>>3]=q-e;w=k+32|0;h[w>>3]=f+r;x=k+40|0;h[x>>3]=l-e;y=k+48|0;h[y>>3]=r-f;z=k+56|0;h[z>>3]=e+l;do{if((g&64|0)==0){if((g&128|0)==0){break}h[u>>3]=p;h[v>>3]=q;h[w>>3]=r;h[x>>3]=l}else{h[s>>3]=p;h[t>>3]=q;h[y>>3]=r;h[z>>3]=l}}while(0);rB(a,d,4,1);z=k;k=b;c[z>>2]=c[k>>2];c[z+4>>2]=c[k+4>>2];c[z+8>>2]=c[k+8>>2];c[z+12>>2]=c[k+12>>2];h[u>>3]=m;h[v>>3]=o;uB(a,d,2);i=j;return}function uh(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=+e;f=+f;g=g|0;var j=0,k=0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;j=i;i=i+64|0;k=b;b=i;i=i+16|0;c[b>>2]=c[k>>2];c[b+4>>2]=c[k+4>>2];c[b+8>>2]=c[k+8>>2];c[b+12>>2]=c[k+12>>2];k=d;d=i;i=i+16|0;c[d>>2]=c[k>>2];c[d+4>>2]=c[k+4>>2];c[d+8>>2]=c[k+8>>2];c[d+12>>2]=c[k+12>>2];k=j|0;f=+h[d+8>>3];e=f*-.4;l=+h[d>>3];m=l*.4;n=+h[b>>3];o=n+l*.8;p=+h[b+8>>3];q=f*.8+p;r=l+n;l=f+p;d=k|0;s=k|0;h[s>>3]=e+n;t=k+8|0;h[t>>3]=m+p;u=k+16|0;h[u>>3]=n-e;v=k+24|0;h[v>>3]=p-m;w=k+32|0;h[w>>3]=o-e;x=k+40|0;h[x>>3]=q-m;y=k+48|0;h[y>>3]=e+o;z=k+56|0;h[z>>3]=m+q;do{if((g&64|0)==0){if((g&128|0)==0){break}A=u;B=b;c[A>>2]=c[B>>2];c[A+4>>2]=c[B+4>>2];c[A+8>>2]=c[B+8>>2];c[A+12>>2]=c[B+12>>2];h[w>>3]=o;h[x>>3]=q}else{B=k;A=b;c[B>>2]=c[A>>2];c[B+4>>2]=c[A+4>>2];c[B+8>>2]=c[A+8>>2];c[B+12>>2]=c[A+12>>2];h[y>>3]=o;h[z>>3]=q}}while(0);rB(a,d,4,g>>>4&1^1);h[s>>3]=o;h[t>>3]=q;h[k+16>>3]=r;h[v>>3]=l;uB(a,d,2);i=j;return}function vh(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=+e;f=+f;g=g|0;var j=0,k=0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0,s=0,t=0;j=i;i=i+80|0;k=b;b=i;i=i+16|0;c[b>>2]=c[k>>2];c[b+4>>2]=c[k+4>>2];c[b+8>>2]=c[k+8>>2];c[b+12>>2]=c[k+12>>2];k=d;d=i;i=i+16|0;c[d>>2]=c[k>>2];c[d+4>>2]=c[k+4>>2];c[d+8>>2]=c[k+8>>2];c[d+12>>2]=c[k+12>>2];k=j|0;f=+h[d+8>>3];e=(-0.0-f)/3.0;l=+h[d>>3];m=l/3.0;n=+h[b>>3];o=l*.5+n;p=+h[b+8>>3];q=f*.5+p;d=k|0;h[k+64>>3]=l+n;h[k+72>>3]=f+p;r=k;s=k+64|0;c[r>>2]=c[s>>2];c[r+4>>2]=c[s+4>>2];c[r+8>>2]=c[s+8>>2];c[r+12>>2]=c[s+12>>2];h[k+16>>3]=e+o;h[k+24>>3]=m+q;s=k+32|0;r=s;t=b;c[r>>2]=c[t>>2];c[r+4>>2]=c[t+4>>2];c[r+8>>2]=c[t+8>>2];c[r+12>>2]=c[t+12>>2];h[k+48>>3]=o-e;h[k+56>>3]=q-m;if((g&64|0)!=0){rB(a,s,3,g>>>4&1^1);i=j;return}s=g>>>4&1^1;if((g&128|0)==0){rB(a,d,4,s);i=j;return}else{rB(a,d,3,s);i=j;return}}function wh(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=+e;f=+f;g=g|0;var j=0,k=0,l=0.0,m=0.0;j=i;i=i+32|0;k=b;b=i;i=i+16|0;c[b>>2]=c[k>>2];c[b+4>>2]=c[k+4>>2];c[b+8>>2]=c[k+8>>2];c[b+12>>2]=c[k+12>>2];k=d;d=i;i=i+16|0;c[d>>2]=c[k>>2];c[d+4>>2]=c[k+4>>2];c[d+8>>2]=c[k+8>>2];c[d+12>>2]=c[k+12>>2];k=j|0;f=+h[d>>3];e=+h[d+8>>3];l=+T(f*f+e*e)*.5;m=f*.5+ +h[b>>3];h[k>>3]=m-l;f=+h[b+8>>3]+e*.5;h[k+8>>3]=f-l;h[k+16>>3]=l+m;h[k+24>>3]=l+f;qB(a,k|0,2,g>>>4&1^1);i=j;return}function xh(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=+e;f=+f;g=g|0;var j=0,k=0,l=0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0,s=0.0;j=i;i=i+128|0;k=b;b=i;i=i+16|0;c[b>>2]=c[k>>2];c[b+4>>2]=c[k+4>>2];c[b+8>>2]=c[k+8>>2];c[b+12>>2]=c[k+12>>2];k=d;d=i;i=i+16|0;c[d>>2]=c[k>>2];c[d+4>>2]=c[k+4>>2];c[d+8>>2]=c[k+8>>2];c[d+12>>2]=c[k+12>>2];k=j|0;l=j+64|0;if(f>4.0){m=f*.5*.25}else{m=.5}f=+h[b>>3];e=+h[d>>3];n=+h[b+8>>3];o=+h[d+8>>3];p=m*o;q=m*e;d=l;r=b;c[d>>2]=c[r>>2];c[d+4>>2]=c[r+4>>2];c[d+8>>2]=c[r+8>>2];c[d+12>>2]=c[r+12>>2];h[l+16>>3]=f+e;h[l+24>>3]=n+o;r=k|0;h[k>>3]=q+(f-p);o=p+(q+n);h[k+8>>3]=o;h[k+48>>3]=q+(p+f);e=p+(n-q);h[k+56>>3]=e;n=p*-.95;m=q*4.0/3.0;h[k+16>>3]=q+(n+f)-m;s=p*4.0/3.0;h[k+24>>3]=o-s;h[k+32>>3]=q+(f-n)-m;h[k+40>>3]=e-s;uB(a,l|0,2);if((g&64|0)!=0){Qm(j+96|0,r,3,.5,0,r);tB(a,r,4,0,0,0);i=j;return}if((g&128|0)==0){tB(a,r,4,0,0,0);i=j;return}Qm(j+112|0,r,3,.5,r,0);tB(a,r,4,0,0,0);i=j;return}function yh(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=+e;f=+f;g=g|0;var j=0,k=0;g=i;i=i+32|0;j=b;b=i;i=i+16|0;c[b>>2]=c[j>>2];c[b+4>>2]=c[j+4>>2];c[b+8>>2]=c[j+8>>2];c[b+12>>2]=c[j+12>>2];j=d;d=i;i=i+16|0;c[d>>2]=c[j>>2];c[d+4>>2]=c[j+4>>2];c[d+8>>2]=c[j+8>>2];c[d+12>>2]=c[j+12>>2];j=g|0;f=+h[b>>3]+ +h[d>>3];e=+h[b+8>>3]+ +h[d+8>>3];d=j;k=b;c[d>>2]=c[k>>2];c[d+4>>2]=c[k+4>>2];c[d+8>>2]=c[k+8>>2];c[d+12>>2]=c[k+12>>2];h[j+16>>3]=f;h[j+24>>3]=e;uB(a,j|0,2);i=g;return}function zh(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;d=xF(b|0)|0;do{if((d|0)<(c[45230]|0)){e=c[45228]|0}else{f=d+11|0;c[45230]=f;g=mk(c[45228]|0,f)|0;c[45228]=g;if((g|0)==0){h=0}else{e=g;break}return h|0}}while(0);d=a[b]|0;if(d<<24>>24==0){i=e}else{g=e;e=b;b=d;while(1){d=e+1|0;f=b&255;if((xb(f|0)|0)==0){j=b}else{j=(yF(f|0)|0)&255}f=g+1|0;a[g]=j;k=a[d]|0;if(k<<24>>24==0){i=f;break}else{g=f;e=d;b=k}}}a[i]=0;h=c[45228]|0;return h|0}function Ah(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0.0,x=0.0,y=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0.0,S=0.0,T=0.0,U=0.0,V=0.0,W=0.0,X=0.0,Y=0.0,Z=0.0,_=0.0,$=0.0,aa=0.0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0;g=i;i=i+72|0;j=g|0;k=g+16|0;l=g+24|0;m=g+32|0;n=g+40|0;o=g+48|0;p=g+56|0;q=g+64|0;c[e+32>>2]=f;r=b;while(1){s=r+1|0;if((a[r]|0)==32){r=s}else{break}}c[q>>2]=255;b=a[r]|0;do{if(b<<24>>24==35){t=ac(r|0,127384,(u=i,i=i+32|0,c[u>>2]=n,c[u+8>>2]=o,c[u+16>>2]=p,c[u+24>>2]=q,u)|0)|0;i=u;if((t|0)<=2){v=a[r]|0;break}switch(f|0){case 0:{w=+((c[n>>2]|0)>>>0>>>0)/255.0;x=+((c[o>>2]|0)>>>0>>>0)/255.0;y=+((c[p>>2]|0)>>>0>>>0)/255.0;A=+((c[q>>2]|0)>>>0>>>0)/255.0;B=x<y?x:y;C=x>y?x:y;D=C<w?w:C;do{if(D>0.0){C=D-(B>w?w:B);E=C/D;if(E<=0.0){F=0.0;G=E;break}H=(D-w)/C;I=(D-x)/C;J=(D-y)/C;do{if(D==w){K=J-I}else{if(D==x){K=H+2.0-J;break}if(D!=y){K=0.0;break}K=I+4.0-H}}while(0);H=K*60.0;if(H>=0.0){F=H;G=E;break}F=H+360.0;G=E}else{F=0.0;G=0.0}}while(0);y=F/360.0;h[k>>3]=y;h[m>>3]=D;h[l>>3]=G;h[e>>3]=y;h[e+8>>3]=G;h[e+16>>3]=D;h[e+24>>3]=A;L=0;i=g;return L|0};case 2:{t=e;c[e>>2]=(((c[n>>2]|0)*65535|0)>>>0)/255|0;c[t+4>>2]=(((c[o>>2]|0)*65535|0)>>>0)/255|0;c[e+8>>2]=(((c[p>>2]|0)*65535|0)>>>0)/255|0;c[t+12>>2]=(((c[q>>2]|0)*65535|0)>>>0)/255|0;L=0;i=g;return L|0};case 4:{h[e>>3]=+((c[n>>2]|0)>>>0>>>0)/255.0;h[e+8>>3]=+((c[o>>2]|0)>>>0>>>0)/255.0;h[e+16>>3]=+((c[p>>2]|0)>>>0>>>0)/255.0;h[e+24>>3]=+((c[q>>2]|0)>>>0>>>0)/255.0;L=0;i=g;return L|0};case 3:{y=1.0- +((c[n>>2]|0)>>>0>>>0)/255.0;x=1.0- +((c[o>>2]|0)>>>0>>>0)/255.0;w=1.0- +((c[p>>2]|0)>>>0>>>0)/255.0;B=y<x?y:x;H=w<B?w:B;t=e;a[e]=~~(y-H)*255|0;a[t+1|0]=~~(x-H)*255|0;a[t+2|0]=~~(w-H)*255|0;a[t+3|0]=~~H*255|0;L=0;i=g;return L|0};case 1:{t=e;a[e]=c[n>>2];a[t+1|0]=c[o>>2];a[t+2|0]=c[p>>2];a[t+3|0]=c[q>>2];L=0;i=g;return L|0};default:{L=0;i=g;return L|0}}}else{v=b}}while(0);if(v<<24>>24==46){M=24}else{if(((v&255)-48|0)>>>0<10>>>0){M=24}else{N=v}}do{if((M|0)==24){v=xF(r|0)|0;do{if((v|0)<(c[45204]|0)){O=c[45202]|0;P=r}else{b=v+11|0;c[45204]=b;q=mk(c[45202]|0,b)|0;c[45202]=q;if((q|0)==0){L=-1}else{O=q;P=r;break}i=g;return L|0}}while(0);while(1){v=P+1|0;q=a[P]|0;if((q<<24>>24|0)==0){break}else if((q<<24>>24|0)==44){Q=32}else{Q=q}a[O]=Q;O=O+1|0;P=v}a[O]=0;v=ac(c[45202]|0,159488,(u=i,i=i+24|0,c[u>>2]=k,c[u+8>>2]=l,c[u+16>>2]=m,u)|0)|0;i=u;if((v|0)!=3){N=a[r]|0;break}A=+h[k>>3];D=A<1.0?A:1.0;A=D>0.0?D:0.0;h[k>>3]=A;D=+h[l>>3];G=D<1.0?D:1.0;D=G>0.0?G:0.0;h[l>>3]=D;G=+h[m>>3];F=G<1.0?G:1.0;G=F>0.0?F:0.0;h[m>>3]=G;switch(f|0){case 2:{a:do{if(D>0.0){F=A<1.0?A*6.0:0.0;v=~~F;K=F- +(v|0);F=G*(1.0-D);H=G*(1.0-D*K);w=G*(1.0-D*(1.0-K));switch(v|0){case 3:{R=G;S=H;T=F;break a;break};case 4:{R=G;S=F;T=w;break a;break};case 0:{R=F;S=w;T=G;break a;break};case 1:{R=F;S=G;T=H;break a;break};case 2:{R=w;S=G;T=F;break a;break};case 5:{R=H;S=F;T=G;break a;break};default:{R=0.0;S=0.0;T=0.0;break a}}}else{R=G;S=G;T=G}}while(0);v=e;c[e>>2]=~~(T*65535.0);c[v+4>>2]=~~(S*65535.0);c[e+8>>2]=~~(R*65535.0);c[v+12>>2]=65535;L=0;i=g;return L|0};case 1:{b:do{if(D>0.0){F=A<1.0?A*6.0:0.0;v=~~F;H=F- +(v|0);F=G*(1.0-D);w=G*(1.0-D*H);K=G*(1.0-D*(1.0-H));switch(v|0){case 2:{U=K;V=G;W=F;break b;break};case 1:{U=F;V=G;W=w;break b;break};case 4:{U=G;V=F;W=K;break b;break};case 3:{U=G;V=w;W=F;break b;break};case 0:{U=F;V=K;W=G;break b;break};case 5:{U=w;V=F;W=G;break b;break};default:{U=0.0;V=0.0;W=0.0;break b}}}else{U=G;V=G;W=G}}while(0);v=e;a[e]=~~(W*255.0);a[v+1|0]=~~(V*255.0);a[v+2|0]=~~(U*255.0);a[v+3|0]=-1;L=0;i=g;return L|0};case 3:{c:do{if(D>0.0){F=A<1.0?A*6.0:0.0;v=~~F;w=F- +(v|0);F=G*(1.0-D);K=G*(1.0-D*w);H=G*(1.0-D*(1.0-w));switch(v|0){case 2:{X=H;Y=G;Z=F;break c;break};case 4:{X=G;Y=F;Z=H;break c;break};case 1:{X=F;Y=G;Z=K;break c;break};case 5:{X=K;Y=F;Z=G;break c;break};case 0:{X=F;Y=H;Z=G;break c;break};case 3:{X=G;Y=K;Z=F;break c;break};default:{X=0.0;Y=0.0;Z=0.0;break c}}}else{X=G;Y=G;Z=G}}while(0);F=1.0-Z;K=1.0-Y;H=1.0-X;w=F<K?F:K;x=H<w?H:w;v=e;a[e]=~~(F-x)*255|0;a[v+1|0]=~~(K-x)*255|0;a[v+2|0]=~~(H-x)*255|0;a[v+3|0]=~~x*255|0;L=0;i=g;return L|0};case 4:{d:do{if(D>0.0){x=A<1.0?A*6.0:0.0;v=~~x;H=x- +(v|0);x=G*(1.0-D);K=G*(1.0-D*H);F=G*(1.0-D*(1.0-H));switch(v|0){case 1:{_=x;$=G;aa=K;break d;break};case 4:{_=G;$=x;aa=F;break d;break};case 5:{_=K;$=x;aa=G;break d;break};case 0:{_=x;$=F;aa=G;break d;break};case 2:{_=F;$=G;aa=x;break d;break};case 3:{_=G;$=K;aa=x;break d;break};default:{_=0.0;$=0.0;aa=0.0;break d}}}else{_=G;$=G;aa=G}}while(0);h[e>>3]=aa;h[e+8>>3]=$;h[e+16>>3]=_;h[e+24>>3]=1.0;L=0;i=g;return L|0};case 0:{h[e>>3]=A;h[e+8>>3]=D;h[e+16>>3]=G;h[e+24>>3]=1.0;L=0;i=g;return L|0};default:{L=0;i=g;return L|0}}}}while(0);do{if(N<<24>>24==98){ba=r}else{if((Za(s|0,122280,4)|0)==0|N<<24>>24==119){ba=r;break}if((Za(s|0,122216,4)|0)==0|N<<24>>24==108){ba=r;break}if((Za(s|0,122200,8)|0)==0){ba=r;break}e:do{if(N<<24>>24==47){m=gb(s|0,47)|0;if((m|0)==0){ca=s;break}if((a[s]|0)!=47){l=(qm(122192,s,4)|0)==0;ca=l?m+1|0:r;break}m=c[45206]|0;do{if((m|0)!=0){if((a[m]|0)==0){break}if((qm(122192,m,3)|0)==0){break}l=r+2|0;k=xF(m|0)|0;O=(xF(l|0)|0)+k|0;if((O+3|0)<(c[44758]|0)){da=c[44756]|0}else{k=O+13|0;c[44758]=k;O=mk(c[44756]|0,k)|0;c[44756]=O;da=O}nb(da|0,122184,(u=i,i=i+16|0,c[u>>2]=m,c[u+8>>2]=l,u)|0)|0;i=u;ca=c[44756]|0;break e}}while(0);ca=r+2|0}else{m=c[45206]|0;if((m|0)==0){ca=r;break}if((a[m]|0)==0){ca=r;break}if((qm(122192,m,3)|0)==0){ca=r;break}l=xF(m|0)|0;O=(xF(r|0)|0)+l|0;if((O+3|0)<(c[44758]|0)){ea=c[44756]|0}else{l=O+13|0;c[44758]=l;O=mk(c[44756]|0,l)|0;c[44756]=O;ea=O}nb(ea|0,122184,(u=i,i=i+16|0,c[u>>2]=m,c[u+8>>2]=r,u)|0)|0;i=u;ca=c[44756]|0}}while(0);m=xF(ca|0)|0;do{if((m|0)<(c[45230]|0)){fa=c[45228]|0}else{O=m+11|0;c[45230]=O;l=mk(c[45228]|0,O)|0;c[45228]=l;if((l|0)!=0){fa=l;break}c[j>>2]=0;L=-1;i=g;return L|0}}while(0);m=a[ca]|0;if(m<<24>>24==0){ga=fa}else{l=fa;O=ca;k=m;while(1){m=O+1|0;P=k&255;if((xb(P|0)|0)==0){ha=k}else{ha=(yF(P|0)|0)&255}P=l+1|0;a[l]=ha;Q=a[m]|0;if(Q<<24>>24==0){ga=P;break}else{l=P;O=m;k=Q}}}a[ga]=0;ba=c[45228]|0}}while(0);c[j>>2]=ba;if((ba|0)==0){L=-1;i=g;return L|0}ga=c[45200]|0;do{if((ga|0)==0){M=106}else{ha=c[ga>>2]|0;if((a[ha]|0)!=(a[ba]|0)){M=106;break}if((Ya(ha|0,ba|0)|0)==0){ia=ga}else{M=106}}}while(0);if((M|0)==106){M=vb(j|0,40448,2491,12,44)|0;c[45200]=M;ia=M}if((ia|0)==0){switch(f|0){case 3:{M=e;z=0;a[M]=z;z=z>>8;a[M+1|0]=z;z=z>>8;a[M+2|0]=z;z=z>>8;a[M+3|0]=z;L=1;i=g;return L|0};case 2:{M=e;c[e+8>>2]=0;c[M+4>>2]=0;c[e>>2]=0;c[M+12>>2]=65535;L=1;i=g;return L|0};case 4:{vF(e|0,0,24)|0;h[e+24>>3]=1.0;L=1;i=g;return L|0};case 0:{vF(e|0,0,24)|0;h[e+24>>3]=1.0;L=1;i=g;return L|0};case 1:{M=e;a[M+2|0]=0;a[M+1|0]=0;a[e]=0;a[M+3|0]=-1;L=1;i=g;return L|0};default:{L=1;i=g;return L|0}}}else{switch(f|0){case 0:{h[e>>3]=+((d[ia+4|0]|0)>>>0)/255.0;h[e+8>>3]=+((d[ia+5|0]|0)>>>0)/255.0;h[e+16>>3]=+((d[ia+6|0]|0)>>>0)/255.0;h[e+24>>3]=+((d[ia+10|0]|0)>>>0)/255.0;L=0;i=g;return L|0};case 1:{f=e;a[e]=a[ia+7|0]|0;a[f+1|0]=a[(c[45200]|0)+8|0]|0;a[f+2|0]=a[(c[45200]|0)+9|0]|0;a[f+3|0]=a[(c[45200]|0)+10|0]|0;L=0;i=g;return L|0};case 3:{G=1.0- +(d[ia+7|0]|0)/255.0;D=1.0- +(d[ia+8|0]|0)/255.0;A=1.0- +(d[ia+9|0]|0)/255.0;E=G<D?G:D;_=A<E?A:E;f=e;a[e]=~~(G-_)*255|0;a[f+1|0]=~~(D-_)*255|0;a[f+2|0]=~~(A-_)*255|0;a[f+3|0]=~~_*255|0;L=0;i=g;return L|0};case 2:{f=e;c[e>>2]=(((d[ia+7|0]|0)*65535|0)>>>0)/255|0;c[f+4>>2]=(((d[(c[45200]|0)+8|0]|0)*65535|0)>>>0)/255|0;c[e+8>>2]=(((d[(c[45200]|0)+9|0]|0)*65535|0)>>>0)/255|0;c[f+12>>2]=(((d[(c[45200]|0)+10|0]|0)*65535|0)>>>0)/255|0;L=0;i=g;return L|0};case 4:{h[e>>3]=+(d[ia+7|0]|0)/255.0;h[e+8>>3]=+(d[ia+8|0]|0)/255.0;h[e+16>>3]=+(d[ia+9|0]|0)/255.0;h[e+24>>3]=+(d[ia+10|0]|0)/255.0;L=0;i=g;return L|0};default:{L=0;i=g;return L|0}}}return 0}function Bh(a,b){a=a|0;b=b|0;return pm(c[a>>2]|0,c[b>>2]|0)|0}function Ch(a){a=a|0;c[45206]=a;return}function Dh(a,b,d,e,f){a=a|0;b=+b;d=+d;e=+e;f=+f;var g=0,j=0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,S=0,U=0,Y=0,Z=0,_=0,ba=0,ca=0,da=0.0,ea=0,fa=0,ga=0.0,ha=0.0,ia=0.0,ja=0.0,ka=0.0,la=0.0,ma=0.0,na=0.0,oa=0,pa=0.0,qa=0.0,ra=0.0,sa=0.0,ta=0.0,ua=0.0,va=0,wa=0,xa=0,ya=0.0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,_a=0,$a=0,ab=0,bb=0;g=i;j=a;a=i;i=i+16|0;c[a>>2]=c[j>>2];c[a+4>>2]=c[j+4>>2];c[a+8>>2]=c[j+8>>2];c[a+12>>2]=c[j+12>>2];k=+h[a>>3];l=+h[a+8>>3];m=+$(+(+W(e)/d),+(+V(e)/b));n=+$(+(+W(f)/d),+(+V(f)/b));o=n- +R((n-m)/6.283185307179586)*6.283185307179586;do{if(f-e>3.141592653589793){if(o-m>=3.141592653589793){p=o;break}p=o+6.283185307179586}else{p=o}}while(0);o=+V(m);e=o*b;f=+W(m);n=f*d;q=k+e-n*0.0;r=n+(l+e*0.0);e=d/b;a=jk(8)|0;n=p-m;j=e<.25?70344:70600;s=j+160|0;t=j+192|0;u=j+168|0;v=j+128|0;w=j+32|0;x=j+224|0;y=j+200|0;z=j+136|0;A=j+64|0;B=j+40|0;C=j|0;D=j+232|0;E=j+184|0;F=j+176|0;G=j+96|0;H=j+72|0;I=j+8|0;J=j+216|0;K=j+208|0;L=j+152|0;M=j+144|0;N=j+104|0;O=j+56|0;P=j+48|0;Q=j+248|0;S=j+240|0;U=j+88|0;Y=j+80|0;Z=j+24|0;_=j+16|0;ba=j+120|0;ca=j+112|0;p=(e*(e*.001+4.98)+.207)/(e+.0067)*b;j=1;da=n;while(1){if(da>1.5707963267948966){ea=1}else{if((j|0)<=0){fa=7;break}ga=(e*(e*+h[s>>3]+ +h[u>>3])+ +h[F>>3])/(e+ +h[E>>3]);ha=(e*(e*+h[t>>3]+ +h[y>>3])+ +h[K>>3])/(e+ +h[J>>3]);ia=(e*(e*+h[v>>3]+ +h[z>>3])+ +h[M>>3])/(e+ +h[L>>3]);ja=(e*(e*+h[w>>3]+ +h[B>>3])+ +h[P>>3])/(e+ +h[O>>3]);ka=(e*(e*+h[x>>3]+ +h[D>>3])+ +h[S>>3])/(e+ +h[Q>>3]);la=(e*(e*+h[A>>3]+ +h[H>>3])+ +h[Y>>3])/(e+ +h[U>>3]);ma=(e*(e*+h[C>>3]+ +h[I>>3])+ +h[_>>3])/(e+ +h[Z>>3]);na=(e*(e*+h[G>>3]+ +h[N>>3])+ +h[ca>>3])/(e+ +h[ba>>3]);oa=0;pa=m;while(1){qa=da+pa;ra=(pa+qa)*.5;sa=+V(ra*2.0);ta=+V(ra*4.0);ua=+V(ra*6.0);va=p*+aa(la*ta+(ma+ja*sa)+na*ua+(qa-pa)*(ha*ta+(ia+ga*sa)+ka*ua))<=1.0e-5;wa=oa+1|0;if(va&(wa|0)<(j|0)){oa=wa;pa=qa}else{break}}ea=va^1}oa=j<<1;pa=n/+(oa|0);if(ea&(oa|0)<1024){j=oa;da=pa}else{xa=oa;ya=pa;break}}if((fa|0)==7){fa=j<<1;xa=fa;ya=n/+(fa|0)}fa=a;n=f*b;f=o*d;c[45232]=100;j=jk(1600)|0;ea=a;c[ea>>2]=j;h[j>>3]=k;h[(c[ea>>2]|0)+8>>3]=l;j=a+4|0;c[j>>2]=1;a=c[ea>>2]|0;o=+h[a>>3];da=+h[a+8>>3];va=c[45232]|0;if((va|0)>4){za=1;Aa=a}else{c[45232]=va<<1;a=gF(c[ea>>2]|0,va<<5)|0;c[ea>>2]=a;za=c[j>>2]|0;Aa=a}h[Aa+(za<<4)>>3]=o;za=c[j>>2]|0;c[j>>2]=za+1;h[(c[ea>>2]|0)+(za<<4)+8>>3]=da;h[(c[ea>>2]|0)+(c[j>>2]<<4)>>3]=q;za=c[j>>2]|0;c[j>>2]=za+1;h[(c[ea>>2]|0)+(za<<4)+8>>3]=r;h[(c[ea>>2]|0)+(c[j>>2]<<4)>>3]=q;za=c[j>>2]|0;c[j>>2]=za+1;h[(c[ea>>2]|0)+(za<<4)+8>>3]=r;da=+X(ya*.5);o=+W(ya)*(+T(da*da*3.0+4.0)+-1.0)/3.0;if((xa|0)>0){da=-0.0-n-f*0.0;p=f+n*-0.0;n=r;r=q;za=0;q=m;while(1){m=ya+q;f=+V(m);e=+W(m);pa=f*b;ka=e*d;ga=e*b;e=f*d;f=k+pa-ka*0.0;ia=ka+(l+pa*0.0);pa=-0.0-ga-e*0.0;ka=e+ga*-0.0;Aa=c[j>>2]|0;a=c[45232]|0;if((Aa+3|0)<(a|0)){Ba=Aa;Ca=c[ea>>2]|0}else{c[45232]=a<<1;Aa=gF(c[ea>>2]|0,a<<5)|0;c[ea>>2]=Aa;Ba=c[j>>2]|0;Ca=Aa}h[Ca+(Ba<<4)>>3]=r+o*da;Aa=c[j>>2]|0;c[j>>2]=Aa+1;h[(c[ea>>2]|0)+(Aa<<4)+8>>3]=n+o*p;h[(c[ea>>2]|0)+(c[j>>2]<<4)>>3]=f-o*pa;Aa=c[j>>2]|0;c[j>>2]=Aa+1;h[(c[ea>>2]|0)+(Aa<<4)+8>>3]=ia-o*ka;h[(c[ea>>2]|0)+(c[j>>2]<<4)>>3]=f;Aa=c[j>>2]|0;c[j>>2]=Aa+1;h[(c[ea>>2]|0)+(Aa<<4)+8>>3]=ia;Aa=za+1|0;if((Aa|0)<(xa|0)){da=pa;p=ka;n=ia;r=f;za=Aa;q=m}else{break}}}za=c[ea>>2]|0;q=+h[za>>3];r=+h[za+8>>3];xa=c[j>>2]|0;Ba=xa-1|0;n=+h[za+(Ba<<4)>>3];p=+h[za+(Ba<<4)+8>>3];Ba=c[45232]|0;if((xa+3|0)<(Ba|0)){Da=xa;Ea=za;Fa=Ea+(Da<<4)|0;h[Fa>>3]=n;Ga=c[j>>2]|0;Ha=Ga+1|0;c[j>>2]=Ha;Ia=c[ea>>2]|0;Ja=Ia+(Ga<<4)+8|0;h[Ja>>3]=p;Ka=c[j>>2]|0;La=c[ea>>2]|0;Ma=La+(Ka<<4)|0;h[Ma>>3]=q;Na=c[j>>2]|0;Oa=Na+1|0;c[j>>2]=Oa;Pa=c[ea>>2]|0;Qa=Pa+(Na<<4)+8|0;h[Qa>>3]=r;Ra=c[j>>2]|0;Sa=c[ea>>2]|0;Ta=Sa+(Ra<<4)|0;h[Ta>>3]=q;Ua=c[j>>2]|0;Va=Ua+1|0;c[j>>2]=Va;Wa=c[ea>>2]|0;Xa=Wa+(Ua<<4)+8|0;h[Xa>>3]=r;Ya=c[ea>>2]|0;Za=Ya;_a=c[j>>2]|0;$a=_a<<4;ab=gF(Za,$a)|0;bb=ab;c[ea>>2]=bb;c[45232]=0;i=g;return fa|0}c[45232]=Ba<<1;za=gF(c[ea>>2]|0,Ba<<5)|0;c[ea>>2]=za;Da=c[j>>2]|0;Ea=za;Fa=Ea+(Da<<4)|0;h[Fa>>3]=n;Ga=c[j>>2]|0;Ha=Ga+1|0;c[j>>2]=Ha;Ia=c[ea>>2]|0;Ja=Ia+(Ga<<4)+8|0;h[Ja>>3]=p;Ka=c[j>>2]|0;La=c[ea>>2]|0;Ma=La+(Ka<<4)|0;h[Ma>>3]=q;Na=c[j>>2]|0;Oa=Na+1|0;c[j>>2]=Oa;Pa=c[ea>>2]|0;Qa=Pa+(Na<<4)+8|0;h[Qa>>3]=r;Ra=c[j>>2]|0;Sa=c[ea>>2]|0;Ta=Sa+(Ra<<4)|0;h[Ta>>3]=q;Ua=c[j>>2]|0;Va=Ua+1|0;c[j>>2]=Va;Wa=c[ea>>2]|0;Xa=Wa+(Ua<<4)+8|0;h[Xa>>3]=r;Ya=c[ea>>2]|0;Za=Ya;_a=c[j>>2]|0;$a=_a<<4;ab=gF(Za,$a)|0;bb=ab;c[ea>>2]=bb;c[45232]=0;i=g;return fa|0}function Eh(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;e=b|0;b=ew(e,122168)|0;do{if((b|0)==0){f=0}else{if((a[b]|0)==0){f=0;break}g=Gn(b,0,120)|0;if((g|0)!=0){f=g;break}g=$w(e)|0;Fv(0,158584,(h=i,i=i+8|0,c[h>>2]=g,h)|0)|0;i=h;Fv(3,128528,(h=i,i=i+8|0,c[h>>2]=b,h)|0)|0;i=h;f=0}}while(0);i=d;return f|0}function Fh(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=i;d=jk(304)|0;e=d;if((d|0)==0){Fv(1,115680,(f=i,i=i+1|0,i=i+7&-8,c[f>>2]=0,f)|0)|0;i=f}f=a+16|0;a=c[f>>2]|0;c[d>>2]=a;c[f>>2]=e;if((a|0)==0){c[d+144>>2]=3;c[d+148>>2]=0;h[d+152>>3]=1.0;i=b;return e|0}else{f=d+16|0;g=a+16|0;c[f>>2]=c[g>>2];c[f+4>>2]=c[g+4>>2];c[f+8>>2]=c[g+8>>2];c[f+12>>2]=c[g+12>>2];c[f+16>>2]=c[g+16>>2];c[f+20>>2]=c[g+20>>2];c[f+24>>2]=c[g+24>>2];c[f+28>>2]=c[g+28>>2];c[f+32>>2]=c[g+32>>2];c[f+36>>2]=c[g+36>>2];g=d+56|0;f=a+56|0;c[g>>2]=c[f>>2];c[g+4>>2]=c[f+4>>2];c[g+8>>2]=c[f+8>>2];c[g+12>>2]=c[f+12>>2];c[g+16>>2]=c[f+16>>2];c[g+20>>2]=c[f+20>>2];c[g+24>>2]=c[f+24>>2];c[g+28>>2]=c[f+28>>2];c[g+32>>2]=c[f+32>>2];c[g+36>>2]=c[f+36>>2];c[d+144>>2]=c[a+144>>2];c[d+148>>2]=c[a+148>>2];h[d+152>>3]=+h[a+152>>3];c[d+136>>2]=c[a+136>>2];f=d+96|0;d=a+96|0;c[f>>2]=c[d>>2];c[f+4>>2]=c[d+4>>2];c[f+8>>2]=c[d+8>>2];c[f+12>>2]=c[d+12>>2];c[f+16>>2]=c[d+16>>2];c[f+20>>2]=c[d+20>>2];c[f+24>>2]=c[d+24>>2];c[f+28>>2]=c[d+28>>2];c[f+32>>2]=c[d+32>>2];c[f+36>>2]=c[d+36>>2];i=b;return e|0}return 0}function Gh(a){a=a|0;var b=0;b=a+16|0;a=c[b>>2]|0;if((a|0)==0){cc(108512,102832,116,170080)}else{eF(c[a+212>>2]|0);eF(c[a+208>>2]|0);eF(c[a+216>>2]|0);eF(c[a+220>>2]|0);eF(c[a+224>>2]|0);eF(c[a+228>>2]|0);eF(c[a+232>>2]|0);eF(c[a+236>>2]|0);eF(c[a+240>>2]|0);eF(c[a+244>>2]|0);eF(c[a+248>>2]|0);eF(c[a+252>>2]|0);eF(c[a+256>>2]|0);eF(c[a+272>>2]|0);eF(c[a+284>>2]|0);eF(c[a+280>>2]|0);c[b>>2]=c[a>>2];eF(a);return}}function Hh(d,e,f,g,h,i,j){d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0;k=c[d+16>>2]|0;l=c[d+152>>2]|0;if(!((l&32768|0)==0|(e|0)==0)){c[k+192>>2]=e}do{if((l&65536|0)==0){m=0}else{c[k+212>>2]=fk(i,j)|0;if((f|0)==0){m=0;break}if((a[f]|0)==0){m=0;break}c[k+208>>2]=fk(f,j)|0;m=1}}while(0);a:do{if((l&4194304|0)==0){n=m}else{do{if((g|0)!=0){if((a[g]|0)==0){break}c[k+228>>2]=fk(g,j)|0;f=k+260|0;b[f>>1]=b[f>>1]|1;n=1;break a}}while(0);f=c[k+192>>2]|0;if((f|0)==0){n=m;break}c[k+228>>2]=Lb(f|0)|0;n=1}}while(0);if((l&8388608|0)==0|(h|0)==0){o=n;return o|0}if((a[h]|0)==0){o=n;return o|0}c[k+244>>2]=fk(h,j)|0;o=1;return o|0}function Ih(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;f=i;i=i+64|0;g=f|0;h=c[(c[b>>2]|0)+168>>2]|0;j=c[(c[(c[h+8>>2]|0)+8>>2]|0)+92>>2]|0;Jh(b,e);b=ew(d,97248)|0;do{if((b|0)!=0){if((a[b]|0)==0){break}Lv(e,b)|0;k=e+4|0;l=c[k>>2]|0;if(l>>>0<(c[e+8>>2]|0)>>>0){m=l}else{Jv(e,1)|0;m=c[k>>2]|0}a[m]=0;l=c[e>>2]|0;c[k>>2]=l;n=l;i=f;return n|0}}while(0);if(!((h|0)==(d|0)|(j|0)==0)){Lv(e,j)|0;j=e+4|0;m=c[j>>2]|0;if(m>>>0<(c[e+8>>2]|0)>>>0){o=m}else{Jv(e,1)|0;o=c[j>>2]|0}c[j>>2]=o+1;a[o]=95}o=Sx(d)|0;if((o|0)==0){p=(h|0)==(d|0)?91736:86520;q=(c[d>>2]|0)>>>4}else if((o|0)==2){p=167984;q=(c[d>>2]|0)>>>4}else if((o|0)==1){p=81736;q=(c[d>>2]|0)>>>4}else{p=0;q=0}Lv(e,p)|0;p=g|0;nb(p|0,163832,(g=i,i=i+8|0,c[g>>2]=q,g)|0)|0;i=g;Lv(e,p)|0;p=e+4|0;g=c[p>>2]|0;if(g>>>0<(c[e+8>>2]|0)>>>0){r=g}else{Jv(e,1)|0;r=c[p>>2]|0}a[r]=0;r=c[e>>2]|0;c[p>>2]=r;n=r;i=f;return n|0}function Jh(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0;e=i;i=i+128|0;f=e|0;g=c[b+160>>2]|0;do{if((g|0)>1){if((c[b+152>>2]&64|0)==0){break}Lv(d,c[(c[(c[b>>2]|0)+308>>2]|0)+(g<<2)>>2]|0)|0;h=d+4|0;j=c[h>>2]|0;if(j>>>0<(c[d+8>>2]|0)>>>0){k=j}else{Jv(d,1)|0;k=c[h>>2]|0}c[h>>2]=k+1;a[k]=95}}while(0);k=c[b+196>>2]|0;if((k|0)<=0){i=e;return}g=f|0;f=c[b+200>>2]|0;nb(g|0,159176,(b=i,i=i+16|0,c[b>>2]=k,c[b+8>>2]=f,b)|0)|0;i=b;Lv(d,g)|0;i=e;return}function Kh(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,j=0,k=0.0,l=0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0,s=0,t=0,u=0.0,v=0.0,w=0;e=i;i=i+24|0;f=e|0;j=e+8|0;k=+h[(c[a+16>>2]|0)+152>>3];l=Lh(d,0,f)|0;if((l-1|0)>>>0<2>>>0){i=e;return l|0}m=+h[b+16>>3];n=(+h[b>>3]+m)*.5;h[j>>3]=n;o=+h[b+24>>3];p=(+h[b+8>>3]+o)*.5;h[j+8>>3]=p;q=m-n;n=o-p;b=k>.5;if(b){xB(a,.5)}d=c[f>>2]|0;f=d+8|0;r=c[f>>2]|0;s=c[r>>2]|0;if((s|0)!=0){t=r;p=0.0;r=s;while(1){s=t+4|0;if(+g[s>>2]==0.0){u=p}else{nB(a,r);if((c[t+12>>2]|0)==0){v=6.283185307179586}else{v=p+ +g[s>>2]*6.283185307179586}s=Dh(j,q,n,p,v)|0;tB(a,c[s>>2]|0,c[s+4>>2]|0,0,0,1);YB(s);u=v}s=t+12|0;w=c[s>>2]|0;if((w|0)==0){break}else{t=s;p=u;r=w}}}if(b){xB(a,k)}eF(c[d+4>>2]|0);eF(c[f>>2]|0);eF(d);i=e;return l|0}function Lh(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0.0,t=0,u=0,v=0.0,w=0,x=0.0,y=0,z=0.0,A=0.0,B=0,C=0.0,D=0,E=0.0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;f=i;i=i+8|0;h=f|0;j=jk(12)|0;k=j;l=Lb(b|0)|0;a:do{if((d|0)==0){m=1;n=l;while(1){o=a[n]|0;if((o<<24>>24|0)==0){p=m;break a}else if((o<<24>>24|0)==58){q=m+1|0}else{q=m}m=q;n=n+1|0}}else{p=d}}while(0);d=j+4|0;c[d>>2]=l;q=jk((p*12|0)+12|0)|0;p=j+8|0;c[p>>2]=q;n=La(l|0,87264)|0;b:do{if((n|0)==0){r=0;s=1.0;t=0;u=31}else{l=n;m=0;v=1.0;o=0;while(1){w=gb(l|0,59)|0;if((w|0)==0){x=0.0}else{y=w+1|0;a[w]=0;z=+sF(y,h);A=(c[h>>2]|0)==(y|0)|z<0.0?-1.0:z;if(A<0.0){u=18;break}else{x=A}}A=x-v;do{if(A>0.0){if(a[14800]|0){B=o;C=v;break}if(A<1.0e-5&A>-1.0e-5){B=o;C=v;break}Fv(0,160368,(D=i,i=i+8|0,c[D>>2]=b,D)|0)|0;i=D;a[14800]=1;B=3;C=v}else{B=o;C=x}}while(0);E=v-C;if(C>0.0){a[q+(m*12|0)+8|0]=1}if((a[l]|0)!=0){c[q+(m*12|0)>>2]=l}F=m+1|0;g[q+(m*12|0)+4>>2]=C;if(E<1.0e-5&E>-1.0e-5){G=F;H=B;break b}y=La(0,87264)|0;if((y|0)==0){break}else{l=y;m=F;v=E;o=B}}if((u|0)==18){if(a[14800]|0){I=1}else{Fv(1,159912,(D=i,i=i+8|0,c[D>>2]=b,D)|0)|0;i=D;a[14800]=1;I=2}eF(c[d>>2]|0);eF(c[p>>2]|0);eF(j);J=I;i=f;return J|0}if(E<=0.0){G=F;H=B;break}o=(m|0)>-1;if(o){K=0;L=0}else{r=B;s=E;t=F;u=31;break}do{L=(+g[q+(K*12|0)+4>>2]==0.0)+L|0;K=K+1|0;}while((K|0)<(F|0));if((L|0)<=0){r=B;s=E;t=F;u=31;break}if(!o){G=F;H=B;break}v=E/+(L|0);m=0;while(1){l=q+(m*12|0)+4|0;if(+g[l>>2]==0.0){g[l>>2]=v}l=m+1|0;if((l|0)<(F|0)){m=l}else{G=F;H=B;break}}}}while(0);if((u|0)==31){u=q+((t-1|0)*12|0)+4|0;g[u>>2]=s+ +g[u>>2];G=t;H=r}r=G;while(1){G=r-1|0;if((r|0)<=0){break}if(+g[q+(G*12|0)+4>>2]>0.0){break}else{r=G}}c[q+(r*12|0)>>2]=0;c[j>>2]=r;c[e>>2]=k;J=H;i=f;return J|0}function Mh(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,j=0,k=0,l=0.0,m=0,n=0,o=0.0,p=0.0,q=0.0,r=0,s=0,t=0,u=0,v=0,w=0.0;f=i;i=i+72|0;j=f|0;k=f+8|0;l=+h[(c[a+16>>2]|0)+152>>3];m=Lh(d,0,j)|0;if((m-1|0)>>>0<2>>>0){i=f;return m|0}d=k|0;if((e|0)==0){e=k;n=b;c[e>>2]=c[n>>2];c[e+4>>2]=c[n+4>>2];c[e+8>>2]=c[n+8>>2];c[e+12>>2]=c[n+12>>2];n=k+16|0;e=b+16|0;c[n>>2]=c[e>>2];c[n+4>>2]=c[e+4>>2];c[n+8>>2]=c[e+8>>2];c[n+12>>2]=c[e+12>>2];e=k+32|0;n=b+32|0;c[e>>2]=c[n>>2];c[e+4>>2]=c[n+4>>2];c[e+8>>2]=c[n+8>>2];c[e+12>>2]=c[n+12>>2];n=k+48|0;e=b+48|0;c[n>>2]=c[e>>2];c[n+4>>2]=c[e+4>>2];c[n+8>>2]=c[e+8>>2];c[n+12>>2]=c[e+12>>2]}else{e=k;n=b+32|0;c[e>>2]=c[n>>2];c[e+4>>2]=c[n+4>>2];c[e+8>>2]=c[n+8>>2];c[e+12>>2]=c[n+12>>2];n=k+16|0;e=b+48|0;c[n>>2]=c[e>>2];c[n+4>>2]=c[e+4>>2];c[n+8>>2]=c[e+8>>2];c[n+12>>2]=c[e+12>>2];e=k+32|0;n=b;c[e>>2]=c[n>>2];c[e+4>>2]=c[n+4>>2];c[e+8>>2]=c[n+8>>2];c[e+12>>2]=c[n+12>>2];n=k+48|0;e=b+16|0;c[n>>2]=c[e>>2];c[n+4>>2]=c[e+4>>2];c[n+8>>2]=c[e+8>>2];c[n+12>>2]=c[e+12>>2]}e=k+16|0;o=+h[e>>3];n=k|0;p=+h[n>>3];q=o-p;b=k+32|0;h[b>>3]=p;h[e>>3]=p;r=l>.5;if(r){xB(a,.5)}s=c[j>>2]|0;j=s+8|0;t=c[j>>2]|0;u=c[t>>2]|0;if((u|0)!=0){v=k+48|0;k=t;t=u;do{u=k+4|0;if(+g[u>>2]!=0.0){nB(a,t);if((c[k+12>>2]|0)==0){w=o}else{w=+h[n>>3]+q*+g[u>>2]}h[b>>3]=w;h[e>>3]=w;rB(a,d,4,1);p=+h[e>>3];h[v>>3]=p;h[n>>3]=p}k=k+12|0;t=c[k>>2]|0;}while((t|0)!=0)}if(r){xB(a,l)}eF(c[s+4>>2]|0);eF(c[j>>2]|0);eF(s);i=f;return m|0}function Nh(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0;d=i;e=b;b=i;i=i+32|0;tF(b,e,32)|0;e=c[a+16>>2]|0;f=c[a+152>>2]|0;if((f&4259840|0)==0){i=d;return}g=(f&131072|0)!=0;h=e+264|0;if(g){c[h>>2]=0;c[e+268>>2]=2}else{c[h>>2]=2;c[e+268>>2]=4}h=e+272|0;eF(c[h>>2]|0);j=jk(c[e+268>>2]<<4)|0;e=j;c[h>>2]=e;h=b;c[j>>2]=c[h>>2];c[j+4>>2]=c[h+4>>2];c[j+8>>2]=c[h+8>>2];c[j+12>>2]=c[h+12>>2];h=j+16|0;j=b+16|0;c[h>>2]=c[j>>2];c[h+4>>2]=c[j+4>>2];c[h+8>>2]=c[j+8>>2];c[h+12>>2]=c[j+12>>2];if((f&8192|0)==0){RA(a,e,e,2)|0}if(g){i=d;return}qi(e);i=d;return}function Oh(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0,g=0,j=0.0,k=0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0;c=i;i=i+144|0;d=c|0;e=c+64|0;f=c+128|0;g=b|0;j=+h[g>>3];k=a+16|0;l=+h[k>>3];do{if(j<=l){m=+h[a>>3];if(j<m){break}n=+h[b+8>>3];o=+h[a+24>>3];if(n>o){break}p=+h[a+8>>3];if(n<p){break}n=+h[b+16>>3];if(n>l|n<m){break}n=+h[b+24>>3];if(n>o|n<p){break}n=+h[b+32>>3];if(n>l|n<m){break}n=+h[b+40>>3];if(n>o|n<p){break}n=+h[b+48>>3];if(n>l|n<m){break}m=+h[b+56>>3];if(m>o|m<p){break}i=c;return}}while(0);q=b+48|0;l=+ui(b,q,b+16|0);if(!(l<4.0&+ui(b,q,b+32|0)<4.0)){q=d|0;d=e|0;Qm(f,b,3,.5,q,d);Oh(a,q);Oh(a,d);i=c;return}d=a+24|0;q=a+8|0;f=a|0;l=+h[g>>3];j=+h[k>>3];do{if(l>j){h[k>>3]=l;r=l}else{if(l>=+h[f>>3]){r=j;break}h[f>>3]=l;r=j}}while(0);j=+h[b+8>>3];l=+h[d>>3];do{if(j>l){h[d>>3]=j;s=j}else{if(j>=+h[q>>3]){s=l;break}h[q>>3]=j;s=l}}while(0);l=+h[b+16>>3];do{if(l>r){h[k>>3]=l;t=l}else{if(l>=+h[f>>3]){t=r;break}h[f>>3]=l;t=r}}while(0);r=+h[b+24>>3];do{if(r>s){h[d>>3]=r;u=r}else{if(r>=+h[q>>3]){u=s;break}h[q>>3]=r;u=s}}while(0);s=+h[b+32>>3];do{if(s>t){h[k>>3]=s;v=s}else{if(s>=+h[f>>3]){v=t;break}h[f>>3]=s;v=t}}while(0);t=+h[b+40>>3];do{if(t>u){h[d>>3]=t;w=t}else{if(t>=+h[q>>3]){w=u;break}h[q>>3]=t;w=u}}while(0);u=+h[b+48>>3];do{if(u>v){h[k>>3]=u}else{if(u>=+h[f>>3]){break}h[f>>3]=u}}while(0);u=+h[b+56>>3];if(u>w){h[d>>3]=u;i=c;return}if(u>=+h[q>>3]){i=c;return}h[q>>3]=u;i=c;return}function Ph(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0.0,l=0.0,m=0.0,n=0.0,o=0,p=0.0,q=0,r=0,s=0,t=0,u=0,v=0.0,w=0.0,x=0.0,y=0,z=0.0,A=0,B=0,C=0,D=0,E=0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0,M=0.0,N=0.0,O=0.0,P=0.0,Q=0.0,R=0,S=0.0,T=0.0,U=0.0,V=0.0,W=0,X=0.0,Y=0.0,Z=0.0,_=0.0,$=0.0,aa=0.0,ba=0.0,ca=0.0,da=0.0,ea=0.0,fa=0.0,ga=0.0,ha=0.0,ia=0.0,ja=0.0,ka=0.0,la=0.0,ma=0.0,na=0.0,oa=0.0,pa=0.0,qa=0.0,ra=0.0,sa=0.0,ta=0.0,ua=0.0,va=0.0,wa=0.0,xa=0.0;e=i;i=i+48|0;f=e|0;g=e+32|0;j=c[d+8>>2]|0;d=c[j+136>>2]|0;k=+h[j+16>>3];l=+h[j+24>>3];m=+h[j+32>>3];n=+h[j+40>>3];o=c[(c[j+8>>2]|0)+88>>2]|0;if((o|0)==0){h[b>>3]=k;h[b+8>>3]=l;h[b+16>>3]=m;h[b+24>>3]=n;i=e;return}j=k==m&l==n;p=j?-1.7976931348623157e+308:n;n=j?-1.7976931348623157e+308:m;m=j?1.7976931348623157e+308:l;l=j?1.7976931348623157e+308:k;j=o;a:do{if((c[j>>2]|0)>0){q=f;r=f|0;s=f+16|0;t=d+144|0;u=o+12|0;k=p;v=n;w=m;x=l;y=0;z=0.0;A=0;B=c[o+8>>2]|0;while(1){c[q>>2]=c[54];c[q+4>>2]=c[55];c[q+8>>2]=c[56];c[q+12>>2]=c[57];c[q+16>>2]=c[58];c[q+20>>2]=c[59];c[q+24>>2]=c[60];c[q+28>>2]=c[61];b:do{switch(c[B>>2]|0){case 4:case 5:{C=B+8|0;D=c[C+4>>2]|0;E=c[C>>2]|0;F=+h[D>>3];G=+h[D+8>>3];if((E|0)>1){H=G;I=F;J=G;K=F;C=D;D=1;while(1){L=C+24|0;M=+h[L>>3];do{if(M<K){N=M;O=I}else{if(M<=I){N=K;O=I;break}N=K;O=M}}while(0);M=+h[C+32>>3];do{if(M<J){P=M;Q=H}else{if(M<=H){P=J;Q=H;break}P=J;Q=M}}while(0);R=D+1|0;if((R|0)<(E|0)){H=Q;I=O;J=P;K=N;C=L;D=R}else{S=Q;T=O;U=P;V=N;break}}}else{S=G;T=F;U=G;V=F}K=v<V?V:v;J=x>V?V:x;I=k<U?U:k;H=w>U?U:w;h[B+80>>3]=V;h[B+88>>3]=U;h[B+96>>3]=T;h[B+104>>3]=S;W=A;X=z;Y=J>T?T:J;Z=H>S?S:H;_=K<T?T:K;$=I<S?S:I;break};case 7:{D=B+112|0;c[D>>2]=jk(56)|0;C=Lb(c[B+40>>2]|0)|0;c[c[D>>2]>>2]=C;a[(c[D>>2]|0)+48|0]=a[74912+(c[B+24>>2]|0)|0]|0;c[r>>2]=A;h[s>>3]=z;C=c[t>>2]|0;E=Hc[c[C>>2]&63](C,q,1)|0;c[(c[D>>2]|0)+4>>2]=E;sm(g,d,c[D>>2]|0);I=+h[B+8>>3];K=+h[B+16>>3];E=c[D>>2]|0;H=+h[E+32>>3];J=+h[E+40>>3];D=a[E+48|0]|0;if((D|0)==114){aa=I;ba=I-H}else if((D|0)==110){M=H*.5;aa=I+M;ba=I-M}else if((D|0)==108){aa=I+H;ba=I}else{aa=0.0;ba=0.0}I=K+ +h[E+16>>3];K=I-J;h[B+80>>3]=ba;h[B+88>>3]=K;h[B+96>>3]=aa;h[B+104>>3]=I;J=v<ba?ba:v;H=x>ba?ba:x;M=k<K?K:k;ca=w>K?K:w;K=J<aa?aa:J;J=H>aa?aa:H;H=M<I?I:M;M=ca>I?I:ca;if((c[u>>2]|0)!=0){W=A;X=z;Y=J;Z=M;_=K;$=H;break b}c[u>>2]=130;W=A;X=z;Y=J;Z=M;_=K;$=H;break};case 10:{W=c[B+16>>2]|0;X=+h[B+8>>3];Y=x;Z=w;_=v;$=k;break};case 2:case 3:{E=B+8|0;D=c[E+4>>2]|0;C=c[E>>2]|0;H=+h[D>>3];K=+h[D+8>>3];if((C|0)>1){M=K;J=H;ca=K;I=H;E=D;D=1;while(1){R=E+24|0;da=+h[R>>3];do{if(da<I){ea=da;fa=J}else{if(da<=J){ea=I;fa=J;break}ea=I;fa=da}}while(0);da=+h[E+32>>3];do{if(da<ca){ga=da;ha=M}else{if(da<=M){ga=ca;ha=M;break}ga=ca;ha=da}}while(0);L=D+1|0;if((L|0)<(C|0)){M=ha;J=fa;ca=ga;I=ea;E=R;D=L}else{ia=ha;ja=fa;ka=ga;la=ea;break}}}else{ia=K;ja=H;ka=K;la=H}I=v<la?la:v;ca=x>la?la:x;J=k<ka?ka:k;M=w>ka?ka:w;h[B+80>>3]=la;h[B+88>>3]=ka;h[B+96>>3]=ja;h[B+104>>3]=ia;W=A;X=z;Y=ca>ja?ja:ca;Z=M>ia?ia:M;_=I<ja?ja:I;$=J<ia?ia:J;break};case 0:case 1:{J=+h[B+8>>3];I=+h[B+24>>3];M=J-I;ca=+h[B+16>>3];F=+h[B+32>>3];G=ca-F;da=J+I;I=ca+F;h[B+80>>3]=M;h[B+88>>3]=G;h[B+96>>3]=da;h[B+104>>3]=I;F=v<M?M:v;ca=x>M?M:x;M=k<G?G:k;J=w>G?G:w;G=F<da?da:F;F=ca>da?da:ca;ca=M<I?I:M;if(J<=I){W=A;X=z;Y=F;Z=J;_=G;$=ca;break b}W=A;X=z;Y=F;Z=I;_=G;$=ca;break};case 6:{D=B+8|0;E=c[D+4>>2]|0;C=c[D>>2]|0;ca=+h[E>>3];G=+h[E+8>>3];if((C|0)>1){I=G;F=ca;J=G;M=ca;D=E;E=1;while(1){L=D+24|0;da=+h[L>>3];do{if(da<M){ma=da;na=F}else{if(da<=F){ma=M;na=F;break}ma=M;na=da}}while(0);da=+h[D+32>>3];do{if(da<J){oa=da;pa=I}else{if(da<=I){oa=J;pa=I;break}oa=J;pa=da}}while(0);R=E+1|0;if((R|0)<(C|0)){I=pa;F=na;J=oa;M=ma;D=L;E=R}else{qa=pa;ra=na;sa=oa;ta=ma;break}}}else{qa=G;ra=ca;sa=G;ta=ca}M=v<ta?ta:v;J=x>ta?ta:x;F=k<sa?sa:k;I=w>sa?sa:w;h[B+80>>3]=ta;h[B+88>>3]=sa;h[B+96>>3]=ra;h[B+104>>3]=qa;W=A;X=z;Y=J>ra?ra:J;Z=I>qa?qa:I;_=M<ra?ra:M;$=F<qa?qa:F;break};default:{W=A;X=z;Y=x;Z=w;_=v;$=k}}}while(0);E=y+1|0;if((E|0)<(c[j>>2]|0)){k=$;v=_;w=Z;x=Y;y=E;z=X;A=W;B=B+120|0}else{ua=$;va=_;wa=Z;xa=Y;break a}}}else{ua=p;va=n;wa=m;xa=l}}while(0);h[b>>3]=xa;h[b+8>>3]=wa;h[b+16>>3]=va;h[b+24>>3]=ua;i=e;return}function Qh(a){a=a|0;if((c[a>>2]|0)!=7){return}ck(c[a+112>>2]|0,1);return}function Rh(d,e){d=d|0;e=e|0;var f=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Za=0,_a=0.0,$a=0.0,ab=0.0,bb=0.0,cb=0.0,db=0.0,eb=0,fb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0;f=i;i=i+200|0;j=f|0;k=f+8|0;l=f+16|0;m=f+24|0;n=f+56|0;o=f+184|0;p=d+152|0;q=c[p>>2]|0;r=d+352|0;s=+h[r>>3];t=+h[d+432>>3];u=s*t/72.0;h[d+488>>3]=u;v=+h[d+440>>3];w=s*v/72.0;h[d+496>>3]=w;h[d+520>>3]=t/72.0;t=v/72.0;x=d+528|0;h[x>>3]=t;if((q&4096|c[53492]|0)!=0){h[x>>3]=t*-1.0}x=d+360|0;t=+((c[d+448>>2]|0)>>>0>>>0);if((c[x>>2]|0)==0){h[d+368>>3]=t/u;h[d+376>>3]=+((c[d+452>>2]|0)>>>0>>>0)/w}else{h[d+376>>3]=t/w;h[d+368>>3]=+((c[d+452>>2]|0)>>>0>>>0)/u}y=e|0;vB(d,Hm(y,Wv(e,0,154768,0)|0,213440)|0);z=d+160|0;c[z>>2]=0;A=jk(304)|0;if((A|0)==0){Fv(1,115680,(B=i,i=i+1|0,i=i+7&-8,c[B>>2]=0,B)|0)|0;i=B}C=d+16|0;D=c[C>>2]|0;c[A>>2]=D;c[C>>2]=A;if((D|0)==0){c[A+144>>2]=3;c[A+148>>2]=0;h[A+152>>3]=1.0}else{E=A+16|0;F=D+16|0;c[E>>2]=c[F>>2];c[E+4>>2]=c[F+4>>2];c[E+8>>2]=c[F+8>>2];c[E+12>>2]=c[F+12>>2];c[E+16>>2]=c[F+16>>2];c[E+20>>2]=c[F+20>>2];c[E+24>>2]=c[F+24>>2];c[E+28>>2]=c[F+28>>2];c[E+32>>2]=c[F+32>>2];c[E+36>>2]=c[F+36>>2];F=A+56|0;E=D+56|0;c[F>>2]=c[E>>2];c[F+4>>2]=c[E+4>>2];c[F+8>>2]=c[E+8>>2];c[F+12>>2]=c[E+12>>2];c[F+16>>2]=c[E+16>>2];c[F+20>>2]=c[E+20>>2];c[F+24>>2]=c[E+24>>2];c[F+28>>2]=c[E+28>>2];c[F+32>>2]=c[E+32>>2];c[F+36>>2]=c[E+36>>2];c[A+144>>2]=c[D+144>>2];c[A+148>>2]=c[D+148>>2];h[A+152>>3]=+h[D+152>>3];c[A+136>>2]=c[D+136>>2];E=A+96|0;F=D+96|0;c[E>>2]=c[F>>2];c[E+4>>2]=c[F+4>>2];c[E+8>>2]=c[F+8>>2];c[E+12>>2]=c[F+12>>2];c[E+16>>2]=c[F+16>>2];c[E+20>>2]=c[F+20>>2];c[E+24>>2]=c[F+24>>2];c[E+28>>2]=c[F+28>>2];c[E+32>>2]=c[F+32>>2];c[E+36>>2]=c[F+36>>2]}c[A+4>>2]=0;c[A+8>>2]=e;c[A+12>>2]=0;A=e+8|0;mi(d,c[(c[A>>2]|0)+12>>2]|0,y);SA(d,e);do{if((q&2|0)!=0){nB(d,119400);F=ew(y,120224)|0;do{if((F|0)!=0){if((a[F]|0)==0){break}nB(d,F)}}while(0);F=ew(y,160752)|0;do{if((F|0)!=0){if((a[F]|0)==0){break}lB(d,F)}}while(0);oi(d,e);F=ux(e)|0;if((F|0)==0){break}else{G=F}do{F=G|0;E=ew(F,123768)|0;do{if((E|0)!=0){if((a[E]|0)==0){break}lB(d,E)}}while(0);E=ew(F,121832)|0;do{if((E|0)!=0){if((a[E]|0)==0){break}nB(d,E)}}while(0);E=ew(F,121048)|0;do{if((E|0)!=0){if((a[E]|0)==0){break}if((gb(E|0,58)|0)==0){lB(d,E);break}D=Lb(E|0)|0;H=La(D|0,87264)|0;if((H|0)!=0){I=H;do{if((a[I]|0)!=0){lB(d,I)}I=La(0,87264)|0;}while((I|0)!=0)}eF(D)}}while(0);E=ew(F,160752)|0;do{if((E|0)!=0){if((a[E]|0)==0){break}lB(d,E)}}while(0);E=mw(e,G)|0;if((E|0)!=0){F=E;do{E=F|0;I=ew(E,123768)|0;do{if((I|0)!=0){if((a[I]|0)==0){break}if((gb(I|0,58)|0)==0){lB(d,I);break}H=Lb(I|0)|0;J=La(H|0,87264)|0;if((J|0)!=0){K=J;do{if((a[K]|0)!=0){lB(d,K)}K=La(0,87264)|0;}while((K|0)!=0)}eF(H)}}while(0);I=ew(E,160752)|0;do{if((I|0)!=0){if((a[I]|0)==0){break}lB(d,I)}}while(0);F=ow(e,F)|0;}while((F|0)!=0)}G=vx(e,G)|0;}while((G|0)!=0)}}while(0);G=ux(e)|0;if((G|0)!=0){q=G;do{a[(c[q+8>>2]|0)+116|0]=0;q=vx(e,q)|0;}while((q|0)!=0)}q=d|0;G=c[q>>2]|0;F=c[G+312>>2]|0;I=d+156|0;c[I>>2]=F;E=c[G+316>>2]|0;do{if((E|0)==0){if((F|0)<=1){L=0;M=1;N=F;O=62;break}if((c[p>>2]&64|0)!=0){L=0;M=1;N=F;O=62;break}Fv(0,161048,(B=i,i=i+8|0,c[B>>2]=c[d+52>>2],B)|0)|0;i=B;c[I>>2]=1;c[z>>2]=1;P=0}else{G=E+4|0;do{if((c[E>>2]|0)>1){if((c[p>>2]&64|0)!=0){Q=F;break}Fv(0,161048,(B=i,i=i+8|0,c[B>>2]=c[d+52>>2],B)|0)|0;i=B;c[E+8>>2]=(c[I>>2]|0)+1;Q=c[I>>2]|0}else{Q=F}}while(0);L=E+8|0;M=c[G>>2]|0;N=Q;O=62}}while(0);do{if((O|0)==62){c[z>>2]=M;if((M|0)<=(N|0)){P=L;break}TA(d);Gh(d);i=f;return}}while(0);L=d+196|0;N=d+172|0;M=L;Q=d+164|0;E=d+200|0;F=d+168|0;D=m;K=n|0;n=o+4|0;J=o+8|0;R=o|0;S=d+164|0;T=d+320|0;U=d+240|0;V=d+288|0;W=d+328|0;X=d+248|0;Z=d+296|0;_=d+304|0;aa=d+312|0;ba=d+12|0;ca=d+472|0;da=ca;ea=d+456|0;fa=d+336|0;ga=d+256|0;ha=d+344|0;ia=d+264|0;ja=d+272|0;ka=d+280|0;la=d+384|0;ma=d+504|0;na=d+392|0;oa=d+512|0;pa=j|0;qa=d+256|0;ra=j+4|0;j=L|0;L=d+188|0;sa=d+192|0;ta=d+184|0;ua=d+176|0;va=d+180|0;wa=d+172|0;xa=qa;ya=m+16|0;m=d+288|0;za=d+304|0;Aa=d+384|0;Ba=d+504|0;Ca=d+368|0;Da=d+376|0;Ea=ca|0;ca=d+456|0;Fa=d+476|0;Ga=d+460|0;Ha=d+480|0;Ia=d+464|0;Ja=d+484|0;Ka=d+468|0;Ma=P;while(1){P=c[(c[q>>2]|0)+316>>2]|0;if((c[((P|0)==0?I:P)>>2]|0)>1){WA(d)}P=c[N>>2]|0;Na=c[N+4>>2]|0;c[M>>2]=P;c[M+4>>2]=Na;Oa=P;a:do{if((Oa|0)>-1){P=Na;Pa=Oa;while(1){if(!((Pa|0)<(c[Q>>2]|0)&(P|0)>-1)){break a}if((P|0)>=(c[F>>2]|0)){break a}Qa=c[C>>2]|0;Ra=c[p>>2]|0;if((c[z>>2]|0)>1|(Pa|0)>0){Iv(o,128,K);Sa=Qa+212|0;Ta=c[Sa>>2]|0;Jh(d,o);Lv(o,Ta)|0;Ua=c[n>>2]|0;if(Ua>>>0<(c[J>>2]|0)>>>0){Va=Ua}else{Jv(o,1)|0;Va=c[n>>2]|0}a[Va]=0;Ua=c[R>>2]|0;c[n>>2]=Ua;c[Sa>>2]=Ua;Wa=Ta}else{Wa=0}Ch(ew(y,148552)|0);Ta=c[M>>2]|0;Ua=c[M+4>>2]|0;Sa=c[S>>2]|0;Xa=c[S+4>>2]|0;Za=(c[x>>2]|0)==0;u=+((Za?Ta:Ua)|0);w=+h[T>>3];t=w*u- +h[U>>3];h[V>>3]=t;v=+((Za?Ua:Ta)|0);s=+h[W>>3];_a=v*s- +h[X>>3];h[Z>>3]=_a;h[_>>3]=w+t;h[aa>>3]=s+_a;if((c[(c[ba>>2]|0)+28>>2]|0)==0){c[da>>2]=c[ea>>2];c[da+4>>2]=c[ea+4>>2];c[da+8>>2]=c[ea+8>>2];c[da+12>>2]=c[ea+12>>2]}else{Ta=c[Ea>>2]|0;Ua=c[ca>>2]|0;c[Ea>>2]=(Ta|0)<(Ua|0)?Ta:Ua;Ua=c[Fa>>2]|0;Ta=c[Ga>>2]|0;c[Fa>>2]=(Ua|0)<(Ta|0)?Ua:Ta;Ta=c[Ha>>2]|0;Ua=c[Ia>>2]|0;c[Ha>>2]=(Ta|0)>(Ua|0)?Ta:Ua;Ua=c[Ja>>2]|0;Ta=c[Ka>>2]|0;c[Ja>>2]=(Ua|0)>(Ta|0)?Ua:Ta}Ta=c[p>>2]|0;_a=+h[fa>>3];if((Ta&128|0)==0){t=w*(u- +((Za?Sa:Xa)|0)*.5)+_a;h[ga>>3]=t;u=s*(v- +((Za?Xa:Sa)|0)*.5)+ +h[ha>>3];h[ia>>3]=u;v=w+t;h[ja>>3]=v;$a=t;ab=u;bb=v;cb=s+u}else{u=+h[Ca>>3]*.5;s=_a-u;h[ga>>3]=s;v=+h[ha>>3];t=+h[Da>>3]*.5;w=v-t;h[ia>>3]=w;db=_a+u;h[ja>>3]=db;$a=s;ab=w;bb=db;cb=v+t}h[ka>>3]=cb;do{if(Za){t=+h[r>>3];h[ma>>3]=+h[la>>3]/t-$a;if((c[53492]|Ta&4096|0)==0){h[oa>>3]=+h[na>>3]/t-ab;break}else{h[oa>>3]=-0.0-cb- +h[na>>3]/t;break}}else{t=+h[r>>3];h[oa>>3]=-0.0-cb- +h[na>>3]/t;if((c[53492]|Ta&4096|0)==0){h[Ba>>3]=+h[Aa>>3]/t-$a;break}else{h[Ba>>3]=-0.0-bb- +h[Aa>>3]/t;break}}}while(0);UA(d);lB(d,159752);nB(d,119400);do{if((Ra&4259840|0)!=0){if((c[Qa+208>>2]|0)==0){if((b[Qa+260>>1]&1)==0){break}}do{if((Ra&655360|0)==0){eb=0;fb=0}else{Ta=Ra&131072;Za=Ta>>>16^2;Sa=Za+2|0;c[Qa+264>>2]=Za;Za=jk(Sa<<4)|0;Xa=Za;c[Za>>2]=c[m>>2];c[Za+4>>2]=c[m+4>>2];c[Za+8>>2]=c[m+8>>2];c[Za+12>>2]=c[m+12>>2];Ua=Za+16|0;c[Ua>>2]=c[za>>2];c[Ua+4>>2]=c[za+4>>2];c[Ua+8>>2]=c[za+8>>2];c[Ua+12>>2]=c[za+12>>2];if((Ta|0)!=0){eb=Xa;fb=Sa;break}qi(Xa);eb=Xa;fb=Sa}}while(0);if((Ra&8192|0)==0){RA(d,eb,eb,fb)|0}c[Qa+272>>2]=eb;c[Qa+268>>2]=fb}}while(0);do{if((Ra&32768|0)!=0){H=c[(c[A>>2]|0)+12>>2]|0;if((H|0)==0){break}c[Qa+192>>2]=c[H>>2]}}while(0);H=(Ra&4|0)!=0;do{if(!H){Sa=Qa+208|0;if((c[Sa>>2]|0)==0){if((b[Qa+260>>1]&1)==0){break}}tF(D|0,xa|0,32)|0;Xa=c[C>>2]|0;Ta=c[p>>2]|0;do{if((Ta&4259840|0)!=0){Ua=(Ta&131072|0)!=0;Za=Xa+264|0;if(Ua){c[Za>>2]=0;c[Xa+268>>2]=2}else{c[Za>>2]=2;c[Xa+268>>2]=4}Za=Xa+272|0;eF(c[Za>>2]|0);hb=jk(c[Xa+268>>2]<<4)|0;ib=hb;c[Za>>2]=ib;c[hb>>2]=c[D>>2];c[hb+4>>2]=c[D+4>>2];c[hb+8>>2]=c[D+8>>2];c[hb+12>>2]=c[D+12>>2];Za=hb+16|0;c[Za>>2]=c[ya>>2];c[Za+4>>2]=c[ya+4>>2];c[Za+8>>2]=c[ya+8>>2];c[Za+12>>2]=c[ya+12>>2];if((Ta&8192|0)==0){RA(d,ib,ib,2)|0}if(Ua){break}qi(ib)}}while(0);gB(d,c[Sa>>2]|0,c[Qa+228>>2]|0,c[Qa+244>>2]|0,c[Qa+212>>2]|0)}}while(0);Ta=ew(y,120224)|0;if((Ta|0)==0){jb=1;kb=162072}else{Xa=(a[Ta]|0)==0;jb=Xa&1;kb=Xa?162072:Ta}Ta=c[p>>2]|0;Xa=(a[kb]|0)==116;do{if((Ta&256|0)==0){if(!Xa){lb=kb;mb=jb;O=118;break}ib=(Ya(kb|0,118712)|0)==0;lb=ib?162072:kb;mb=ib?1:jb;O=118}else{if(!Xa){lb=kb;mb=jb;O=118;break}if((Ya(kb|0,118712)|0)!=0){lb=kb;mb=jb;O=118}}}while(0);do{if((O|0)==118){O=0;if(!((Ta&33554432|0)==0|(mb|0)==0)){break}if((Vh(lb,pa,k)|0)<<24>>24==0){nB(d,lb);lB(d,118712);sB(d,qa,1);break}c[l>>2]=0;Xa=c[pa>>2]|0;nB(d,Xa);lB(d,118712);Uh(e,l)|0;ib=c[ra>>2]|0;Ua=Em(y,c[53722]|0,0,0)|0;t=+g[k>>2];if((ib|0)==0){oB(d,159752,Ua,t)}else{oB(d,ib,Ua,t)}sB(d,qa,(c[l>>2]|0)>>>1&1|2);eF(Xa)}}while(0);Ta=c[A>>2]|0;Xa=c[(c[Ta+8>>2]|0)+88>>2]|0;if((Xa|0)==0){nb=Ta}else{Ta=kk(16e3)|0;Ua=Xa;do{if((c[Ua>>2]|0)>0){ib=1e3;Za=c[Xa+8>>2]|0;hb=0;ob=0;pb=1;qb=Ta;rb=1;while(1){sb=Za|0;b:do{switch(c[sb>>2]|0){case 0:case 1:{if(+h[Za+96>>3]<+h[ga>>3]){tb=rb;ub=qb;vb=pb;wb=ob;xb=ib;break b}if(+h[ja>>3]<+h[Za+80>>3]){tb=rb;ub=qb;vb=pb;wb=ob;xb=ib;break b}if(+h[Za+104>>3]<+h[ia>>3]){tb=rb;ub=qb;vb=pb;wb=ob;xb=ib;break b}if(+h[ka>>3]<+h[Za+88>>3]){tb=rb;ub=qb;vb=pb;wb=ob;xb=ib;break b}yb=Za+24|0;h[qb>>3]=+h[Za+8>>3]- +h[yb>>3];zb=Za+32|0;h[qb+8>>3]=+h[Za+16>>3]- +h[zb>>3];h[qb+16>>3]=+h[yb>>3];h[qb+24>>3]=+h[zb>>3];qB(d,qb,2,(c[sb>>2]|0)==0?pb:0);tb=rb;ub=qb;vb=pb;wb=ob;xb=ib;break};case 7:{if(+h[Za+96>>3]<+h[ga>>3]){tb=rb;ub=qb;vb=pb;wb=ob;xb=ib;break b}if(+h[ja>>3]<+h[Za+80>>3]){tb=rb;ub=qb;vb=pb;wb=ob;xb=ib;break b}if(+h[Za+104>>3]<+h[ia>>3]){tb=rb;ub=qb;vb=pb;wb=ob;xb=ib;break b}if(+h[ka>>3]<+h[Za+88>>3]){tb=rb;ub=qb;vb=pb;wb=ob;xb=ib;break b}h[qb>>3]=+h[Za+8>>3];h[qb+8>>3]=+h[Za+16>>3];kB(d,qb,c[Za+112>>2]|0);tb=rb;ub=qb;vb=pb;wb=ob;xb=ib;break};case 14:{Fv(0,161720,(B=i,i=i+1|0,i=i+7&-8,c[B>>2]=0,B)|0)|0;i=B;tb=rb;ub=qb;vb=pb;wb=ob;xb=ib;break};case 2:case 3:{if(+h[Za+96>>3]<+h[ga>>3]){tb=rb;ub=qb;vb=pb;wb=ob;xb=ib;break b}if(+h[ja>>3]<+h[Za+80>>3]){tb=rb;ub=qb;vb=pb;wb=ob;xb=ib;break b}if(+h[Za+104>>3]<+h[ia>>3]){tb=rb;ub=qb;vb=pb;wb=ob;xb=ib;break b}if(+h[ka>>3]<+h[Za+88>>3]){tb=rb;ub=qb;vb=pb;wb=ob;xb=ib;break b}zb=Za+8|0;yb=c[zb+4>>2]|0;Ab=zb|0;zb=c[Ab>>2]|0;if((ib|0)<(zb|0)){Bb=ib<<1;Cb=(Bb|0)>(zb|0)?Bb:zb;Db=mk(qb,Cb<<4)|0;Eb=Cb}else{Db=qb;Eb=ib}if((zb|0)>0){Cb=0;do{h[Db+(Cb<<4)>>3]=+h[yb+(Cb*24|0)>>3];h[Db+(Cb<<4)+8>>3]=+h[yb+(Cb*24|0)+8>>3];Cb=Cb+1|0;}while((Cb|0)<(zb|0))}rB(d,Db,c[Ab>>2]|0,(c[sb>>2]|0)==2?pb:0);tb=rb;ub=Db;vb=pb;wb=ob;xb=Eb;break};case 8:{nB(d,c[Za+8>>2]|0);tb=rb;ub=qb;vb=1;wb=ob;xb=ib;break};case 9:{lB(d,c[Za+8>>2]|0);tb=rb;ub=qb;vb=1;wb=ob;xb=ib;break};case 4:case 5:{if(+h[Za+96>>3]<+h[ga>>3]){tb=rb;ub=qb;vb=pb;wb=ob;xb=ib;break b}if(+h[ja>>3]<+h[Za+80>>3]){tb=rb;ub=qb;vb=pb;wb=ob;xb=ib;break b}if(+h[Za+104>>3]<+h[ia>>3]){tb=rb;ub=qb;vb=pb;wb=ob;xb=ib;break b}if(+h[ka>>3]<+h[Za+88>>3]){tb=rb;ub=qb;vb=pb;wb=ob;xb=ib;break b}zb=Za+8|0;Cb=c[zb+4>>2]|0;yb=zb|0;zb=c[yb>>2]|0;if((ib|0)<(zb|0)){Bb=ib<<1;Fb=(Bb|0)>(zb|0)?Bb:zb;Gb=mk(qb,Fb<<4)|0;Hb=Fb}else{Gb=qb;Hb=ib}if((zb|0)>0){Fb=0;do{h[Gb+(Fb<<4)>>3]=+h[Cb+(Fb*24|0)>>3];h[Gb+(Fb<<4)+8>>3]=+h[Cb+(Fb*24|0)+8>>3];Fb=Fb+1|0;}while((Fb|0)<(zb|0))}tB(d,Gb,c[yb>>2]|0,0,0,(c[sb>>2]|0)==4?pb&255:0);tb=rb;ub=Gb;vb=pb;wb=ob;xb=Hb;break};case 6:{if(+h[Za+96>>3]<+h[ga>>3]){tb=rb;ub=qb;vb=pb;wb=ob;xb=ib;break b}if(+h[ja>>3]<+h[Za+80>>3]){tb=rb;ub=qb;vb=pb;wb=ob;xb=ib;break b}if(+h[Za+104>>3]<+h[ia>>3]){tb=rb;ub=qb;vb=pb;wb=ob;xb=ib;break b}if(+h[ka>>3]<+h[Za+88>>3]){tb=rb;ub=qb;vb=pb;wb=ob;xb=ib;break b}zb=Za+8|0;Fb=c[zb+4>>2]|0;Cb=zb|0;zb=c[Cb>>2]|0;if((ib|0)<(zb|0)){Ab=ib<<1;Bb=(Ab|0)>(zb|0)?Ab:zb;Ib=mk(qb,Bb<<4)|0;Jb=Bb}else{Ib=qb;Jb=ib}if((zb|0)>0){Bb=0;do{h[Ib+(Bb<<4)>>3]=+h[Fb+(Bb*24|0)>>3];h[Ib+(Bb<<4)+8>>3]=+h[Fb+(Bb*24|0)+8>>3];Bb=Bb+1|0;}while((Bb|0)<(zb|0))}uB(d,Ib,c[Cb>>2]|0);tb=rb;ub=Ib;vb=pb;wb=ob;xb=Jb;break};case 12:{if((rb|0)==0){tb=0;ub=qb;vb=pb;wb=ob;xb=ib;break b}Fv(0,161384,(B=i,i=i+1|0,i=i+7&-8,c[B>>2]=0,B)|0)|0;i=B;tb=0;ub=qb;vb=pb;wb=ob;xb=ib;break};case 13:{zb=Za+16|0;if((c[Za+8>>2]|0)!=2){Bb=c[zb+36>>2]|0;Fb=c[Bb+12>>2]|0;t=+g[Bb+8>>2];yb=~~(+$(+(+h[Za+40>>3]- +h[Za+24>>3]),+(+h[Za+32>>3]- +h[zb>>3]))*180.0/3.141592653589793);nB(d,c[Bb+4>>2]|0);oB(d,Fb,yb,t);tb=rb;ub=qb;vb=2;wb=ob;xb=ib;break b}yb=c[Za+68>>2]|0;Fb=c[yb+4>>2]|0;Bb=c[yb+12>>2]|0;t=+g[yb+8>>2];v=+h[Za+40>>3];db=+h[zb>>3];if(v==db){if(+h[Za+48>>3]==+h[Za+24>>3]){Kb=0}else{O=171}}else{O=171}if((O|0)==171){O=0;Kb=~~(+Y((db-v)/+h[Za+32>>3])*180.0/3.141592653589793)}nB(d,Fb);oB(d,Bb,Kb,t);tb=rb;ub=qb;vb=3;wb=ob;xb=ib;break};case 11:{Yh(c[Za+8>>2]|0)|0;pB(d,176472);tb=rb;ub=qb;vb=pb;wb=176472;xb=ib;break};default:{tb=rb;ub=qb;vb=pb;wb=ob;xb=ib}}}while(0);sb=hb+1|0;if((sb|0)<(c[Ua>>2]|0)){ib=xb;Za=Za+120|0;hb=sb;ob=wb;pb=vb;qb=ub;rb=tb}else{break}}if((wb|0)==0){Mb=ub;break}pB(d,c[(c[q>>2]|0)+336>>2]|0);Mb=ub}else{Mb=Ta}}while(0);eF(Mb);nb=c[A>>2]|0}Ta=c[nb+12>>2]|0;if((Ta|0)!=0){ek(d,4,Ta)}if(H){Ta=(c[q>>2]|0)+28|0;c[Ta>>2]=(c[Ta>>2]|0)+1}else{if((c[Qa+208>>2]|0)==0){if((b[Qa+260>>1]&1)!=0){O=188}}else{O=188}if((O|0)==188){O=0;hB(d)}Ta=(c[q>>2]|0)+28|0;c[Ta>>2]=(c[Ta>>2]|0)+1;Th(d,e,Ra)}c:do{if((Ra&1|0)==0){if((Ra&16|0)!=0){aB(d);Ta=ux(e)|0;if((Ta|0)!=0){Ua=Ta;do{Ta=mw(e,Ua)|0;if((Ta|0)!=0){Xa=Ta;do{Xh(d,Xa);Xa=ow(e,Xa)|0;}while((Xa|0)!=0)}Ua=vx(e,Ua)|0;}while((Ua|0)!=0)}bB(d);_A(d);Ua=ux(e)|0;if((Ua|0)!=0){Xa=Ua;do{Wh(d,Xa);Xa=vx(e,Xa)|0;}while((Xa|0)!=0)}$A(d);break}if((Ra&8|0)==0){Xa=ux(e)|0;if((Xa|0)==0){break}else{Nb=Xa}while(1){Wh(d,Nb);Xa=mw(e,Nb)|0;if((Xa|0)!=0){Ua=Xa;do{Wh(d,c[((c[Ua>>2]&3|0)==2?Ua:Ua-32|0)+28>>2]|0);Xh(d,Ua);Ua=ow(e,Ua)|0;}while((Ua|0)!=0)}Nb=vx(e,Nb)|0;if((Nb|0)==0){break c}}}_A(d);Ua=ux(e)|0;if((Ua|0)!=0){Xa=Ua;do{Ua=c[A>>2]|0;d:do{if((c[Ua+172>>2]|0)<1){O=212}else{Ta=Xa|0;rb=1;qb=Ua;while(1){if((Rx(c[(c[qb+176>>2]|0)+(rb<<2)>>2]|0,Ta)|0)!=0){break d}pb=c[A>>2]|0;if((rb|0)<(c[pb+172>>2]|0)){rb=rb+1|0;qb=pb}else{O=212;break}}}}while(0);if((O|0)==212){O=0;Wh(d,Xa)}Xa=vx(e,Xa)|0;}while((Xa|0)!=0)}$A(d);aB(d);Xa=ux(e)|0;if((Xa|0)!=0){Ua=Xa;do{Xa=mw(e,Ua)|0;if((Xa|0)!=0){qb=Xa;do{Xa=c[A>>2]|0;e:do{if((c[Xa+172>>2]|0)<1){O=220}else{rb=qb|0;Ta=1;Cb=Xa;while(1){if((Rx(c[(c[Cb+176>>2]|0)+(Ta<<2)>>2]|0,rb)|0)!=0){break e}pb=c[A>>2]|0;if((Ta|0)<(c[pb+172>>2]|0)){Ta=Ta+1|0;Cb=pb}else{O=220;break}}}}while(0);if((O|0)==220){O=0;Xh(d,qb)}qb=ow(e,qb)|0;}while((qb|0)!=0)}Ua=vx(e,Ua)|0;}while((Ua|0)!=0)}bB(d)}else{_A(d);Ua=ux(e)|0;if((Ua|0)!=0){qb=Ua;do{Wh(d,qb);qb=vx(e,qb)|0;}while((qb|0)!=0)}$A(d);aB(d);qb=ux(e)|0;if((qb|0)!=0){Ua=qb;do{qb=mw(e,Ua)|0;if((qb|0)!=0){Xa=qb;do{Xh(d,Xa);Xa=ow(e,Xa)|0;}while((Xa|0)!=0)}Ua=vx(e,Ua)|0;}while((Ua|0)!=0)}bB(d)}}while(0);if(H){Th(d,e,Ra)}VA(d);if((Wa|0)!=0){Mv(o);c[Qa+212>>2]=Wa}Ua=(c[L>>2]|0)+(c[j>>2]|0)|0;Xa=(c[sa>>2]|0)+(c[E>>2]|0)|0;c[M>>2]=Ua;c[M+4>>2]=Xa;do{if((Ua|0)>-1){if(!((Ua|0)<(c[Q>>2]|0)&(Xa|0)>-1)){O=236;break}if((Xa|0)<(c[F>>2]|0)){Ob=Xa;Pb=Ua}else{O=236}}else{O=236}}while(0);if((O|0)==236){O=0;Qa=c[ta>>2]|0;if((Qa|0)==0){Ra=c[ua>>2]|0;c[E>>2]=Ra;Qb=Ua;Rb=Ra}else{Ra=c[wa>>2]|0;c[j>>2]=Ra;Qb=Ra;Rb=Xa}Ra=(c[va>>2]|0)+Qb|0;H=Rb+Qa|0;c[M>>2]=Ra;c[M+4>>2]=H;Ob=H;Pb=Ra}if((Pb|0)>-1){P=Ob;Pa=Pb}else{break}}}}while(0);Oa=c[(c[q>>2]|0)+316>>2]|0;if((c[((Oa|0)==0?I:Oa)>>2]|0)>1){XA(d)}if((Ma|0)==0){Sb=0;Tb=(c[z>>2]|0)+1|0}else{Sb=Ma+4|0;Tb=c[Ma>>2]|0}c[z>>2]=Tb;if((Tb|0)>(c[I>>2]|0)){break}else{Ma=Sb}}TA(d);Gh(d);i=f;return}function Sh(a){a=a|0;var b=0,d=0,e=0,f=0;b=c[43702]|0;if((b|0)==0){d=$g(10328,c[43330]|0)|0;c[43702]=d;e=d}else{e=b}if((Hc[c[e>>2]&63](e,a,4)|0)!=0){f=0;return f|0}e=c[43702]|0;b=c[e>>2]|0;d=Lb(a|0)|0;Hc[b&63](e,d,1)|0;f=1;return f|0}function Th(e,f,j){e=e|0;f=f|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0.0,qa=0;k=i;i=i+152|0;l=k|0;m=k+32|0;n=k+64|0;o=k+72|0;p=k+136|0;q=k+144|0;r=f+8|0;s=c[r>>2]|0;if((c[s+172>>2]|0)<1){i=k;return}t=e+156|0;u=(j&4|0)!=0;v=e+16|0;w=p|0;x=o|0;y=o;z=o+32|0;A=z;B=z|0;z=o+16|0;C=o+8|0;D=o+24|0;E=o|0;F=o+48|0;G=o+40|0;H=o+56|0;o=l;I=e+152|0;J=l+16|0;l=(j&8|0)==0;K=p+4|0;p=m;L=m+16|0;m=e|0;M=e+160|0;N=1;O=s;while(1){s=c[(c[O+176>>2]|0)+(N<<2)>>2]|0;a:do{if((c[t>>2]|0)<2){P=9}else{Q=Hm(s|0,Wv(s,0,162416,0)|0,213440)|0;if(($h(c[m>>2]|0,c[M>>2]|0,c[t>>2]|0,Q)|0)<<24>>24!=0){P=9;break}if((a[Q]|0)!=0){break}Q=ux(s)|0;if((Q|0)==0){break}else{R=Q}do{if((li(e,s,R)|0)<<24>>24!=0){P=9;break a}R=vx(s,R)|0;}while((R|0)!=0)}}while(0);do{if((P|0)==9){P=0;if(u){Th(e,s,j)}Q=jk(304)|0;if((Q|0)==0){Fv(1,115680,(S=i,i=i+1|0,i=i+7&-8,c[S>>2]=0,S)|0)|0;i=S}T=c[v>>2]|0;c[Q>>2]=T;c[v>>2]=Q;if((T|0)==0){c[Q+144>>2]=3;c[Q+148>>2]=0;h[Q+152>>3]=1.0}else{U=Q+16|0;V=T+16|0;c[U>>2]=c[V>>2];c[U+4>>2]=c[V+4>>2];c[U+8>>2]=c[V+8>>2];c[U+12>>2]=c[V+12>>2];c[U+16>>2]=c[V+16>>2];c[U+20>>2]=c[V+20>>2];c[U+24>>2]=c[V+24>>2];c[U+28>>2]=c[V+28>>2];c[U+32>>2]=c[V+32>>2];c[U+36>>2]=c[V+36>>2];V=Q+56|0;U=T+56|0;c[V>>2]=c[U>>2];c[V+4>>2]=c[U+4>>2];c[V+8>>2]=c[U+8>>2];c[V+12>>2]=c[U+12>>2];c[V+16>>2]=c[U+16>>2];c[V+20>>2]=c[U+20>>2];c[V+24>>2]=c[U+24>>2];c[V+28>>2]=c[U+28>>2];c[V+32>>2]=c[U+32>>2];c[V+36>>2]=c[U+36>>2];c[Q+144>>2]=c[T+144>>2];c[Q+148>>2]=c[T+148>>2];h[Q+152>>3]=+h[T+152>>3];c[Q+136>>2]=c[T+136>>2];U=Q+96|0;V=T+96|0;c[U>>2]=c[V>>2];c[U+4>>2]=c[V+4>>2];c[U+8>>2]=c[V+8>>2];c[U+12>>2]=c[V+12>>2];c[U+16>>2]=c[V+16>>2];c[U+20>>2]=c[V+20>>2];c[U+24>>2]=c[V+24>>2];c[U+28>>2]=c[V+28>>2];c[U+32>>2]=c[V+32>>2];c[U+36>>2]=c[V+36>>2]}c[Q+4>>2]=1;c[Q+8>>2]=s;c[Q+12>>2]=1;Q=s+8|0;V=s|0;mi(e,c[(c[Q>>2]|0)+12>>2]|0,V);YA(e,s);U=c[v>>2]|0;T=U+208|0;if((c[T>>2]|0)==0){W=(b[U+260>>1]&1)!=0}else{W=1}Ch(ew(V,148552)|0);if(!(u|W^1)){tF(p|0,(c[Q>>2]|0)+16|0,32)|0;X=c[v>>2]|0;Y=c[I>>2]|0;do{if((Y&4259840|0)!=0){Z=(Y&131072|0)!=0;_=X+264|0;if(Z){c[_>>2]=0;c[X+268>>2]=2}else{c[_>>2]=2;c[X+268>>2]=4}_=X+272|0;eF(c[_>>2]|0);$=jk(c[X+268>>2]<<4)|0;aa=$;c[_>>2]=aa;c[$>>2]=c[p>>2];c[$+4>>2]=c[p+4>>2];c[$+8>>2]=c[p+8>>2];c[$+12>>2]=c[p+12>>2];_=$+16|0;c[_>>2]=c[L>>2];c[_+4>>2]=c[L+4>>2];c[_+8>>2]=c[L+8>>2];c[_+12>>2]=c[L+12>>2];if((Y&8192|0)==0){RA(e,aa,aa,2)|0}if(Z){break}qi(aa)}}while(0);gB(e,c[T>>2]|0,c[U+228>>2]|0,c[U+244>>2]|0,c[U+212>>2]|0)}c[n>>2]=0;Y=Uh(s,n)|0;if((Y|0)==0){ba=0}else{pB(e,Y);ba=c[n>>2]&1}Y=d[(c[Q>>2]|0)+112|0]|0;do{if((Y&1|0)==0){if((Y&2|0)!=0){X=Im(V,c[53728]|0,139280)|0;ca=Im(V,c[53730]|0,136712)|0;da=X;P=47;break}if((Y&8|0)!=0){X=Im(V,c[53724]|0,133792)|0;ca=Im(V,c[53726]|0,131744)|0;da=X;P=47;break}if((Y&4|0)!=0){X=Im(V,c[53710]|0,129560)|0;ca=Im(V,c[53712]|0,126280)|0;da=X;P=47;break}X=ew(V,123768)|0;if((X|0)==0){ea=0}else{ea=(a[X]|0)==0?0:X}X=ew(V,121832)|0;if((X|0)==0){fa=ea}else{fa=(a[X]|0)==0?ea:X}X=ew(V,121048)|0;if((X|0)==0){ga=ea}else{ga=(a[X]|0)==0?ea:X}do{if((ba|0)==0|(ga|0)==0){X=ew(V,120224)|0;if((X|0)==0){ha=ba;ia=ga;break}aa=(a[X]|0)==0;ha=aa?ba:1;ia=aa?ga:X}else{ha=ba;ia=ga}}while(0);X=(fa|0)==0?159752:fa;aa=(ia|0)==0?119400:ia;c[w>>2]=0;if((ha|0)==0){ja=0;ka=X;la=aa}else{ma=ha;na=X;oa=aa;P=49}}else{aa=Im(V,c[53728]|0,145328)|0;ca=Im(V,c[53730]|0,142384)|0;da=aa;P=47}}while(0);if((P|0)==47){P=0;c[w>>2]=0;ma=1;na=(da|0)==0?159752:da;oa=(ca|0)==0?119400:ca;P=49}do{if((P|0)==49){P=0;if((Vh(oa,w,q)|0)<<24>>24==0){nB(e,oa);ja=ma;ka=na;la=oa;break}nB(e,c[w>>2]|0);Y=c[K>>2]|0;aa=Em(V,c[53722]|0,0,0)|0;pa=+g[q>>2];if((Y|0)==0){oB(e,159752,aa,pa)}else{oB(e,Y,aa,pa)}ja=(c[n>>2]|0)>>>1&1|2;ka=na;la=oa}}while(0);aa=c[53716]|0;do{if((aa|0)!=0){Y=fw(V,aa)|0;if((Y|0)==0){break}if((a[Y]|0)==0){break}xB(e,+Fm(V,c[53716]|0,1.0,0.0))}}while(0);aa=c[n>>2]|0;do{if((aa&4|0)==0){if((aa&64|0)==0){if((Em(V,c[53714]|0,1,0)|0)!=0){lB(e,ka);sB(e,(c[Q>>2]|0)+16|0,ja);break}if((ja|0)==0){break}lB(e,118712);sB(e,(c[Q>>2]|0)+16|0,ja);break}Y=(c[Q>>2]|0)+16|0;c[y>>2]=c[Y>>2];c[y+4>>2]=c[Y+4>>2];c[y+8>>2]=c[Y+8>>2];c[y+12>>2]=c[Y+12>>2];Y=(c[Q>>2]|0)+32|0;c[A>>2]=c[Y>>2];c[A+4>>2]=c[Y+4>>2];c[A+8>>2]=c[Y+8>>2];c[A+12>>2]=c[Y+12>>2];h[z>>3]=+h[B>>3];h[D>>3]=+h[C>>3];h[F>>3]=+h[E>>3];h[H>>3]=+h[G>>3];if((Em(V,c[53714]|0,1,0)|0)==0){lB(e,118712)}else{lB(e,ka)}if((Mh(e,x,la,0)|0)>1){Y=$w(V)|0;Fv(3,117808,(S=i,i=i+8|0,c[S>>2]=Y,S)|0)|0;i=S}sB(e,(c[Q>>2]|0)+16|0,0)}else{Y=(Em(V,c[53714]|0,1,0)|0)!=0;if((ja|0)==0&(Y^1)){break}X=(c[Q>>2]|0)+16|0;c[y>>2]=c[X>>2];c[y+4>>2]=c[X+4>>2];c[y+8>>2]=c[X+8>>2];c[y+12>>2]=c[X+12>>2];X=(c[Q>>2]|0)+32|0;c[A>>2]=c[X>>2];c[A+4>>2]=c[X+4>>2];c[A+8>>2]=c[X+8>>2];c[A+12>>2]=c[X+12>>2];h[z>>3]=+h[B>>3];h[D>>3]=+h[C>>3];h[F>>3]=+h[E>>3];h[H>>3]=+h[G>>3];if(Y){lB(e,ka)}else{lB(e,118712)}ol(e,x,4,aa,ja)}}while(0);eF(c[w>>2]|0);aa=c[(c[Q>>2]|0)+12>>2]|0;if((aa|0)!=0){ek(e,5,aa)}if(W){if(u){tF(o|0,(c[Q>>2]|0)+16|0,32)|0;aa=c[v>>2]|0;V=c[I>>2]|0;do{if((V&4259840|0)!=0){Y=(V&131072|0)!=0;X=aa+264|0;if(Y){c[X>>2]=0;c[aa+268>>2]=2}else{c[X>>2]=2;c[aa+268>>2]=4}X=aa+272|0;eF(c[X>>2]|0);Z=jk(c[aa+268>>2]<<4)|0;_=Z;c[X>>2]=_;c[Z>>2]=c[o>>2];c[Z+4>>2]=c[o+4>>2];c[Z+8>>2]=c[o+8>>2];c[Z+12>>2]=c[o+12>>2];X=Z+16|0;c[X>>2]=c[J>>2];c[X+4>>2]=c[J+4>>2];c[X+8>>2]=c[J+8>>2];c[X+12>>2]=c[J+12>>2];if((V&8192|0)==0){RA(e,_,_,2)|0}if(Y){break}qi(_)}}while(0);gB(e,c[T>>2]|0,c[U+228>>2]|0,c[U+244>>2]|0,c[U+212>>2]|0)}hB(e)}do{if(!l){V=ux(s)|0;if((V|0)==0){break}else{qa=V}do{Wh(e,qa);V=mw(s,qa)|0;if((V|0)!=0){aa=V;do{Xh(e,aa);aa=ow(s,aa)|0;}while((aa|0)!=0)}qa=vx(s,qa)|0;}while((qa|0)!=0)}}while(0);ZA(e,f);Gh(e);if(u){break}Th(e,s,j)}}while(0);s=c[r>>2]|0;if((N|0)<(c[s+172>>2]|0)){N=N+1|0;O=s}else{break}}i=k;return}function Uh(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;e=ew(b|0,164344)|0;a:do{if((e|0)==0){f=0;g=0}else{if((a[e]|0)==0){f=0;g=0;break}Yh(e)|0;b=c[44118]|0;if((b|0)==0){f=176472;g=0;break}else{h=0;i=176472;j=b}while(1){b=i;k=j;while(1){if((Ya(k|0,164776)|0)==0){l=10;break}if((Ya(k|0,164016)|0)==0){m=b;l=13;break}if((Ya(k|0,163264)|0)==0){n=b;l=15;break}o=b+4|0;if((Ya(k|0,162776)|0)==0){p=b;l=17;break}q=c[o>>2]|0;if((q|0)==0){f=176472;g=h;break a}else{b=o;k=q}}if((l|0)==10){l=0;r=b+4|0;s=h|1}else if((l|0)==13){while(1){l=0;k=m+4|0;q=c[k>>2]|0;c[m>>2]=q;if((q|0)==0){break}else{m=k;l=13}}r=b;s=h|3}else if((l|0)==15){while(1){l=0;k=n+4|0;q=c[k>>2]|0;c[n>>2]=q;if((q|0)==0){break}else{n=k;l=15}}r=b;s=h|64}else if((l|0)==17){while(1){l=0;k=p+4|0;q=c[k>>2]|0;c[p>>2]=q;if((q|0)==0){break}else{p=k;l=17}}r=b;s=h|4}k=c[r>>2]|0;if((k|0)==0){f=176472;g=s;break}else{h=s;i=r;j=k}}}}while(0);c[d>>2]=g;return f|0}function Vh(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,h=0,j=0,k=0,l=0,m=0,n=0;f=i;i=i+8|0;h=f|0;do{if((Lh(b,0,h)|0)==0){j=c[h>>2]|0;k=c[j>>2]|0;if((k|0)<2){break}l=j+8|0;if((c[c[l>>2]>>2]|0)==0){break}if((k|0)>2){Fv(0,110296,(k=i,i=i+1|0,i=i+7&-8,c[k>>2]=0,k)|0)|0;i=k}k=kk((xF(b|0)|0)+1|0)|0;c[d>>2]=k;zF(k|0,c[c[l>>2]>>2]|0)|0;if((c[(c[l>>2]|0)+12>>2]|0)==0){c[d+4>>2]=0}else{k=c[d>>2]|0;m=k+((xF(k|0)|0)+1)|0;c[d+4>>2]=m;zF(m|0,c[(c[l>>2]|0)+12>>2]|0)|0}m=c[l>>2]|0;do{if((a[m+8|0]|0)==0){if((a[m+20|0]|0)==0){g[e>>2]=0.0;break}else{g[e>>2]=1.0- +g[m+16>>2];break}}else{g[e>>2]=+g[m+4>>2]}}while(0);eF(c[j+4>>2]|0);eF(c[l>>2]|0);eF(j);n=1;i=f;return n|0}}while(0);c[d>>2]=0;n=0;i=f;return n|0}function Wh(d,f){d=d|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0.0,s=0,t=0,u=0,v=0,w=0,x=0,y=0.0,z=0.0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0.0,N=0.0,O=0,P=0.0,Q=0,R=0,S=0,T=0;g=i;j=c[d>>2]|0;k=f+8|0;if((c[(c[k>>2]|0)+8>>2]|0)==0){i=g;return}l=f|0;if((li(d,Hx(l)|0,f)|0)<<24>>24==0){i=g;return}m=c[k>>2]|0;if(+h[m+64>>3]<+h[d+256>>3]){i=g;return}if(+h[d+272>>3]<+h[m+48>>3]){i=g;return}if(+h[m+72>>3]<+h[d+264>>3]){i=g;return}if(+h[d+280>>3]<+h[m+56>>3]){i=g;return}n=m+116|0;m=c[j+28>>2]|0;if((a[n]|0)==(m|0)){i=g;return}a[n]=m;vB(d,$w(l)|0);m=Hm(l,c[53642]|0,213440)|0;if((a[m]|0)!=0){vB(d,m)}m=Hm(l,c[53582]|0,213440)|0;a:do{if((a[m]|0)!=0){Yh(m)|0;n=c[44118]|0;if((n|0)==0){break}else{o=176476;p=n}while(1){if((a[p]|0)==105){if((Ya(p|0,91128)|0)==0){break}}n=c[o>>2]|0;if((n|0)==0){break a}else{o=o+4|0;p=n}}i=g;return}}while(0);p=c[d+152>>2]|0;o=jk(304)|0;if((o|0)==0){Fv(1,115680,(m=i,i=i+1|0,i=i+7&-8,c[m>>2]=0,m)|0)|0;i=m}m=d+16|0;n=c[m>>2]|0;c[o>>2]=n;c[m>>2]=o;if((n|0)==0){c[o+144>>2]=3;c[o+148>>2]=0;h[o+152>>3]=1.0}else{m=o+16|0;j=n+16|0;c[m>>2]=c[j>>2];c[m+4>>2]=c[j+4>>2];c[m+8>>2]=c[j+8>>2];c[m+12>>2]=c[j+12>>2];c[m+16>>2]=c[j+16>>2];c[m+20>>2]=c[j+20>>2];c[m+24>>2]=c[j+24>>2];c[m+28>>2]=c[j+28>>2];c[m+32>>2]=c[j+32>>2];c[m+36>>2]=c[j+36>>2];j=o+56|0;m=n+56|0;c[j>>2]=c[m>>2];c[j+4>>2]=c[m+4>>2];c[j+8>>2]=c[m+8>>2];c[j+12>>2]=c[m+12>>2];c[j+16>>2]=c[m+16>>2];c[j+20>>2]=c[m+20>>2];c[j+24>>2]=c[m+24>>2];c[j+28>>2]=c[m+28>>2];c[j+32>>2]=c[m+32>>2];c[j+36>>2]=c[m+36>>2];c[o+144>>2]=c[n+144>>2];c[o+148>>2]=c[n+148>>2];h[o+152>>3]=+h[n+152>>3];c[o+136>>2]=c[n+136>>2];m=o+96|0;j=n+96|0;c[m>>2]=c[j>>2];c[m+4>>2]=c[j+4>>2];c[m+8>>2]=c[j+8>>2];c[m+12>>2]=c[j+12>>2];c[m+16>>2]=c[j+16>>2];c[m+20>>2]=c[j+20>>2];c[m+24>>2]=c[j+24>>2];c[m+28>>2]=c[j+28>>2];c[m+32>>2]=c[j+32>>2];c[m+36>>2]=c[j+36>>2]}c[o+4>>2]=2;c[o+8>>2]=f;c[o+12>>2]=8;do{if((p&16777216|0)!=0){if((e[(c[(Hx(l)|0)+8>>2]|0)+170>>1]|0)>>>0<=2>>>0){h[o+168>>3]=0.0;break}q=+h[(c[(c[k>>2]|0)+132>>2]|0)+16>>3]*72.0;if(q<0.0){r=q+-.5}else{r=q+.5}h[o+168>>3]=+(~~r|0)}}while(0);mi(d,c[(c[k>>2]|0)+104>>2]|0,l);do{if((p&4259840|0)!=0){if((c[o+208>>2]|0)==0){if((b[o+260>>1]&1)==0){break}}j=pl(f)|0;m=c[k>>2]|0;r=+h[m+16>>3];q=+h[m+24>>3];m=Im(l,c[53582]|0,213440)|0;do{if((a[m]|0)==0){s=0}else{Yh(m)|0;n=c[44118]|0;if((n|0)==0){s=0;break}else{t=176472;u=0;v=n}while(1){n=(Ya(v|0,164776)|0)==0;w=n?1:u;n=t+4|0;x=c[n>>2]|0;if((x|0)==0){s=w;break}else{t=n;u=w;v=x}}}}while(0);b:do{if((j&-3|0)==1){m=c[(c[k>>2]|0)+12>>2]|0;x=m+8|0;w=c[x>>2]|0;do{if((w|0)==4){y=+h[m+16>>3];if(y<0.0){z=y+-.5}else{z=y+.5}if(((~~z|0)%90|0|0)!=0){A=1;break}if(+h[m+24>>3]!=0.0){A=1;break}if(+h[m+32>>3]!=0.0){A=1;break}A=(c[m+4>>2]|s|0)==0}else{A=1}}while(0);if(!((m|0)!=0&A)){B=61;break}if((p&524288|0)==0){B=61;break}n=(w|0)<3?1:w;C=m+4|0;D=c[C>>2]|0;E=(D|0)>1?D:1;D=c[m+44>>2]|0;F=ew(l,165160)|0;if((F|0)==0){G=0}else{G=Rb(F|0)|0}F=(G-4|0)>>>0>56>>>0?20:G;if((c[C>>2]|s|0)==0){c[o+264>>2]=0;C=jk(32)|0;h[C>>3]=r- +h[(c[k>>2]|0)+88>>3];h[C+8>>3]=q- +h[(c[k>>2]|0)+80>>3]*.5;h[C+16>>3]=r+ +h[(c[k>>2]|0)+88>>3];h[C+24>>3]=q+ +h[(c[k>>2]|0)+80>>3]*.5;H=C;I=2;break}C=c[x>>2]|0;do{if((C|0)<3){if(+h[m+32>>3]!=0.0){break}if(+h[m+24>>3]!=0.0){break}J=o+264|0;if((c[m>>2]|0)!=0){c[J>>2]=1;K=jk(32)|0;h[K>>3]=r;h[K+8>>3]=q;L=(E<<1)-1|0;h[K+16>>3]=r+ +h[D+(L<<4)>>3];h[K+24>>3]=q+ +h[D+(L<<4)+8>>3];H=K;I=2;break b}c[J>>2]=2;J=(E<<1)-1|0;y=+h[D+(J<<4)>>3];M=+h[D+(J<<4)+8>>3];N=6.283185307179586/+(F|0);J=jk(F<<4)|0;if((F|0)>0){O=0;P=0.0}else{H=J;I=F;break b}while(1){h[J+(O<<4)>>3]=y*+V(P);h[J+(O<<4)+8>>3]=M*+W(P);K=O+1|0;if((K|0)<(F|0)){O=K;P=N+P}else{Q=0;break}}while(1){K=J+(Q<<4)|0;h[K>>3]=r+ +h[K>>3];K=J+(Q<<4)+8|0;h[K>>3]=q+ +h[K>>3];K=Q+1|0;if((K|0)<(F|0)){Q=K}else{H=J;I=F;break b}}}}while(0);m=da(C,E-1|0)|0;c[o+264>>2]=2;w=c[x>>2]|0;if((w|0)<(F|0)){J=jk(n<<4)|0;if((n|0)>0){R=0}else{H=J;I=n;break}while(1){K=R+m|0;h[J+(R<<4)>>3]=r+ +h[D+(K<<4)>>3];h[J+(R<<4)+8>>3]=q+ +h[D+(K<<4)+8>>3];K=R+1|0;if((K|0)<(n|0)){R=K}else{H=J;I=n;break}}}else{n=(w|0)/(F|0)|0;J=jk(F<<4)|0;if((F|0)>0){S=0;T=0}else{H=J;I=F;break}while(1){x=T+m|0;h[J+(S<<4)>>3]=r+ +h[D+(x<<4)>>3];h[J+(S<<4)+8>>3]=q+ +h[D+(x<<4)+8>>3];x=S+1|0;if((x|0)<(F|0)){S=x;T=T+n|0}else{H=J;I=F;break}}}}else{B=61}}while(0);if((B|0)==61){c[o+264>>2]=0;j=jk(32)|0;h[j>>3]=r- +h[(c[k>>2]|0)+88>>3];h[j+8>>3]=q- +h[(c[k>>2]|0)+80>>3]*.5;h[j+16>>3]=r+ +h[(c[k>>2]|0)+96>>3];h[j+24>>3]=q+ +h[(c[k>>2]|0)+80>>3]*.5;H=j;I=2}if((p&8192|0)==0){RA(d,H,H,I)|0}c[o+272>>2]=H;c[o+268>>2]=I}}while(0);Ch(ew(l,148552)|0);cB(d,f);Dc[c[(c[(c[(c[k>>2]|0)+8>>2]|0)+4>>2]|0)+20>>2]&63](d,f);f=c[(c[k>>2]|0)+108>>2]|0;k=f;do{if((f|0)!=0){if((a[k+81|0]|0)==0){break}ek(d,10,k)}}while(0);dB(d);Gh(d);i=g;return}function Xh(f,j){f=f|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0.0,M=0.0,N=0.0,O=0,P=0,Q=0,R=0,S=0,U=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0.0,oa=0.0,pa=0.0,qa=0.0,ra=0.0,sa=0.0,ta=0.0,ua=0.0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Za=0,_a=0,$a=0,ab=0.0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0.0,mb=0.0,nb=0.0,ob=0.0,pb=0.0,qb=0.0,rb=0.0,sb=0.0,tb=0.0,ub=0.0,vb=0.0,wb=0.0,xb=0.0,yb=0.0,zb=0.0,Ab=0.0,Bb=0.0,Cb=0.0,Db=0.0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0;k=i;i=i+2088|0;l=k|0;m=k+48|0;n=k+96|0;o=k+144|0;p=k+192|0;q=k+200|0;r=k+248|0;s=k+312|0;t=k+1112|0;u=k+1912|0;v=k+1928|0;w=k+2056|0;tF(w|0,f+256|0,32)|0;x=j+8|0;y=c[x>>2]|0;z=c[y+8>>2]|0;do{if((z|0)==0){A=6}else{if(+h[z+24>>3]<+h[w>>3]){A=6;break}if(+h[w+16>>3]<+h[z+8>>3]){A=6;break}if(+h[z+32>>3]<+h[w+8>>3]){A=6;break}if(+h[w+24>>3]<+h[z+16>>3]){A=6}}}while(0);do{if((A|0)==6){z=c[y+96>>2]|0;if((z|0)==0){B=y}else{if((nn(z,w)|0)<<24>>24!=0){break}B=c[x>>2]|0}z=c[B+108>>2]|0;C=z;if((z|0)==0){i=k;return}if((a[C+81|0]|0)==0){i=k;return}if((nn(C,w)|0)<<24>>24!=0){break}i=k;return}}while(0);w=j;B=j-32|0;Hx(c[((c[w>>2]&3|0)==2?j:B)+28>>2]|0)|0;y=f+156|0;a:do{if((c[y>>2]|0)>=2){C=Hm(j|0,c[53776]|0,213440)|0;z=f|0;D=f+160|0;if(($h(c[z>>2]|0,c[D>>2]|0,c[y>>2]|0,C)|0)<<24>>24!=0){break}if((a[C]|0)!=0){i=k;return}C=j+32|0;E=0;do{F=c[w>>2]&3;if((E|0)<1){G=(F|0)==3?j:C}else{G=(F|0)==2?j:B}F=Hm(c[G+28>>2]|0,c[53612]|0,213440)|0;if((a[F]|0)==0){break a}E=E+1|0;if(($h(c[z>>2]|0,c[D>>2]|0,c[y>>2]|0,F)|0)<<24>>24!=0){break a}}while((E|0)<2);i=k;return}}while(0);y=j+32|0;G=xF($w(c[((c[w>>2]&3|0)==3?j:y)+28>>2]|0)|0)|0;E=dF(G+3+(xF($w(c[((c[w>>2]&3|0)==2?j:B)+28>>2]|0)|0)|0)|0)|0;zF(E|0,$w(c[((c[w>>2]&3|0)==3?j:y)+28>>2]|0)|0)|0;G=(Nw(Hx(c[((c[w>>2]&3|0)==2?j:B)+28>>2]|0)|0)|0)==0;D=E+(xF(E|0)|0)|0;if(G){a[D]=a[91968]|0;a[D+1|0]=a[91969]|0;a[D+2|0]=a[91970]|0}else{a[D]=a[92624]|0;a[D+1|0]=a[92625]|0;a[D+2|0]=a[92626]|0}AF(E|0,$w(c[((c[w>>2]&3|0)==2?j:B)+28>>2]|0)|0)|0;vB(f,E);eF(E);E=j|0;D=Hm(E,c[53814]|0,213440)|0;if((a[D]|0)!=0){vB(f,D)}D=Hm(E,c[53760]|0,213440)|0;b:do{if((a[D]|0)==0){H=0}else{Yh(D)|0;G=c[44118]|0;if((G|0)==0){H=176472;break}else{I=176476;J=G}while(1){if((a[J]|0)==105){if((Ya(J|0,91128)|0)==0){break}}G=c[I>>2]|0;if((G|0)==0){H=176472;break b}else{I=I+4|0;J=G}}i=k;return}}while(0);J=v|0;v=f+152|0;I=c[v>>2]|0;D=jk(304)|0;if((D|0)==0){Fv(1,115680,(K=i,i=i+1|0,i=i+7&-8,c[K>>2]=0,K)|0)|0;i=K}G=f+16|0;z=c[G>>2]|0;c[D>>2]=z;c[G>>2]=D;if((z|0)==0){c[D+144>>2]=3;c[D+148>>2]=0;h[D+152>>3]=1.0}else{C=D+16|0;F=z+16|0;c[C>>2]=c[F>>2];c[C+4>>2]=c[F+4>>2];c[C+8>>2]=c[F+8>>2];c[C+12>>2]=c[F+12>>2];c[C+16>>2]=c[F+16>>2];c[C+20>>2]=c[F+20>>2];c[C+24>>2]=c[F+24>>2];c[C+28>>2]=c[F+28>>2];c[C+32>>2]=c[F+32>>2];c[C+36>>2]=c[F+36>>2];F=D+56|0;C=z+56|0;c[F>>2]=c[C>>2];c[F+4>>2]=c[C+4>>2];c[F+8>>2]=c[C+8>>2];c[F+12>>2]=c[C+12>>2];c[F+16>>2]=c[C+16>>2];c[F+20>>2]=c[C+20>>2];c[F+24>>2]=c[C+24>>2];c[F+28>>2]=c[C+28>>2];c[F+32>>2]=c[C+32>>2];c[F+36>>2]=c[C+36>>2];c[D+144>>2]=c[z+144>>2];c[D+148>>2]=c[z+148>>2];h[D+152>>3]=+h[z+152>>3];c[D+136>>2]=c[z+136>>2];C=D+96|0;F=z+96|0;c[C>>2]=c[F>>2];c[C+4>>2]=c[F+4>>2];c[C+8>>2]=c[F+8>>2];c[C+12>>2]=c[F+12>>2];c[C+16>>2]=c[F+16>>2];c[C+20>>2]=c[F+20>>2];c[C+24>>2]=c[F+24>>2];c[C+28>>2]=c[F+28>>2];c[C+32>>2]=c[F+32>>2];c[C+36>>2]=c[F+36>>2]}c[D+4>>2]=3;c[D+8>>2]=j;c[D+12>>2]=9;F=(H|0)==0;do{if(!F){if((c[(c[x>>2]|0)+8>>2]|0)==0){break}pB(f,H)}}while(0);C=c[53772]|0;do{if((C|0)!=0){z=fw(E,C)|0;if((z|0)==0){break}if((a[z]|0)==0){break}xB(f,+Fm(E,c[53772]|0,1.0,0.0))}}while(0);do{if((I&16777216|0)!=0){if((e[(c[(Hx(c[((c[w>>2]&3|0)==3?j:y)+28>>2]|0)|0)+8>>2]|0)+170>>1]|0)>>>0<=2>>>0){vF(D+176|0,0,16)|0;break}L=+h[(c[(c[(c[((c[w>>2]&3|0)==3?j:y)+28>>2]|0)+8>>2]|0)+132>>2]|0)+16>>3]*72.0;if(L<0.0){M=L+-.5}else{M=L+.5}h[D+176>>3]=+(~~M|0);L=+h[(c[(c[(c[((c[w>>2]&3|0)==2?j:B)+28>>2]|0)+8>>2]|0)+132>>2]|0)+16>>3]*72.0;if(L<0.0){N=L+-.5}else{N=L+.5}h[D+184>>3]=+(~~N|0)}}while(0);do{if((I&32768|0)!=0){C=c[(c[x>>2]|0)+96>>2]|0;if((C|0)==0){O=c[D+192>>2]|0}else{z=c[C>>2]|0;c[D+192>>2]=z;O=z}z=D+196|0;c[z>>2]=O;C=D+204|0;c[C>>2]=O;P=D+200|0;c[P>>2]=O;Q=c[x>>2]|0;R=c[Q+108>>2]|0;if((R|0)==0){S=Q}else{c[z>>2]=c[R>>2];S=c[x>>2]|0}R=c[S+104>>2]|0;if((R|0)==0){U=S}else{c[P>>2]=c[R>>2];U=c[x>>2]|0}R=c[U+100>>2]|0;if((R|0)==0){break}c[C>>2]=c[R>>2]}}while(0);c:do{if((I&65536|0)==0){X=0}else{Iv(u,128,J);c[D+212>>2]=fk(Ih(f,E,u)|0,E)|0;Mv(u);U=ew(E,83344)|0;if((U|0)==0){A=67}else{if((a[U]|0)==0){A=67}else{Y=U;A=69}}do{if((A|0)==67){U=ew(E,82904)|0;if((U|0)==0){Z=0;break}if((a[U]|0)==0){Z=0}else{Y=U;A=69}}}while(0);if((A|0)==69){Z=fk(Y,E)|0}U=ew(E,82520)|0;if((U|0)==0){A=72}else{if((a[U]|0)==0){A=72}else{_=U;A=74}}do{if((A|0)==72){U=ew(E,81944)|0;if((U|0)!=0){if((a[U]|0)!=0){_=U;A=74;break}}if((Z|0)==0){break}c[D+208>>2]=Lb(Z|0)|0}}while(0);if((A|0)==74){c[D+208>>2]=fk(_,E)|0}U=ew(E,81232)|0;if((U|0)==0){A=79}else{if((a[U]|0)==0){A=79}else{aa=U;A=81}}do{if((A|0)==79){U=ew(E,80736)|0;if((U|0)!=0){if((a[U]|0)!=0){aa=U;A=81;break}}if((Z|0)==0){break}c[D+216>>2]=Lb(Z|0)|0}}while(0);if((A|0)==81){c[D+216>>2]=fk(aa,E)|0}U=ew(E,80256)|0;if((U|0)==0){A=86}else{if((a[U]|0)==0){A=86}else{ba=U;A=88}}do{if((A|0)==86){U=ew(E,79928)|0;if((U|0)!=0){if((a[U]|0)!=0){ba=U;A=88;break}}if((Z|0)==0){break}c[D+220>>2]=Lb(Z|0)|0}}while(0);if((A|0)==88){c[D+220>>2]=fk(ba,E)|0;U=D+260|0;b[U>>1]=b[U>>1]|128}U=ew(E,79504)|0;if((U|0)==0){A=93}else{if((a[U]|0)==0){A=93}else{ca=U}}do{if((A|0)==93){U=ew(E,79152)|0;if((U|0)!=0){if((a[U]|0)!=0){ca=U;break}}if((Z|0)==0){X=0;break c}c[D+224>>2]=Lb(Z|0)|0;X=Z;break c}}while(0);c[D+224>>2]=fk(ca,E)|0;U=D+260|0;b[U>>1]=b[U>>1]|256;X=Z}}while(0);d:do{if((I&8388608|0)==0){da=0}else{Z=ew(E,78880)|0;do{if((Z|0)==0){ea=0}else{if((a[Z]|0)==0){ea=0;break}ea=fk(Z,E)|0}}while(0);Z=ew(E,168888)|0;do{if((Z|0)==0){A=105}else{if((a[Z]|0)==0){A=105;break}ca=D+260|0;b[ca>>1]=b[ca>>1]|64;c[D+244>>2]=fk(Z,E)|0}}while(0);do{if((A|0)==105){if((ea|0)==0){break}c[D+244>>2]=Lb(ea|0)|0}}while(0);Z=ew(E,168536)|0;do{if((Z|0)==0){A=110}else{if((a[Z]|0)==0){A=110;break}c[D+248>>2]=fk(Z,E)|0}}while(0);do{if((A|0)==110){if((ea|0)==0){break}c[D+248>>2]=Lb(ea|0)|0}}while(0);Z=ew(E,168152)|0;do{if((Z|0)==0){A=115}else{if((a[Z]|0)==0){A=115;break}c[D+252>>2]=fk(Z,E)|0;ca=D+260|0;b[ca>>1]=b[ca>>1]|16}}while(0);do{if((A|0)==115){if((ea|0)==0){break}c[D+252>>2]=Lb(ea|0)|0}}while(0);Z=ew(E,167432)|0;do{if((Z|0)!=0){if((a[Z]|0)==0){break}ca=D+260|0;b[ca>>1]=b[ca>>1]|32;c[D+256>>2]=fk(Z,E)|0;da=ea;break d}}while(0);if((ea|0)==0){da=0;break}c[D+256>>2]=Lb(ea|0)|0;da=ea}}while(0);e:do{if((I&4194304|0)!=0){ea=ew(E,166968)|0;if((ea|0)==0){A=125}else{if((a[ea]|0)==0){A=125}else{fa=ea;A=127}}do{if((A|0)==125){ea=ew(E,166528)|0;if((ea|0)!=0){if((a[ea]|0)!=0){fa=ea;A=127;break}}ea=c[D+192>>2]|0;if((ea|0)==0){break}c[D+228>>2]=Lb(ea|0)|0}}while(0);if((A|0)==127){c[D+228>>2]=fk(fa,E)|0;ea=D+260|0;b[ea>>1]=b[ea>>1]|1}ea=ew(E,166176)|0;do{if((ea|0)==0){A=133}else{if((a[ea]|0)==0){A=133;break}c[D+232>>2]=fk(ea,E)|0;Z=D+260|0;b[Z>>1]=b[Z>>1]|8}}while(0);do{if((A|0)==133){ea=c[D+192>>2]|0;if((ea|0)==0){break}c[D+232>>2]=Lb(ea|0)|0}}while(0);ea=ew(E,165800)|0;do{if((ea|0)==0){A=138}else{if((a[ea]|0)==0){A=138;break}c[D+236>>2]=fk(ea,E)|0;Z=D+260|0;b[Z>>1]=b[Z>>1]|2}}while(0);do{if((A|0)==138){ea=c[D+200>>2]|0;if((ea|0)==0){break}c[D+236>>2]=Lb(ea|0)|0}}while(0);ea=ew(E,165472)|0;do{if((ea|0)!=0){if((a[ea]|0)==0){break}c[D+240>>2]=fk(ea,E)|0;Z=D+260|0;b[Z>>1]=b[Z>>1]|4;break e}}while(0);ea=c[D+204>>2]|0;if((ea|0)==0){break}c[D+240>>2]=Lb(ea|0)|0}}while(0);eF(X);eF(da);do{if((I&4259840|0)!=0){da=c[(c[x>>2]|0)+8>>2]|0;if((da|0)==0){break}if((c[D+208>>2]|0)==0){if((c[D+228>>2]|0)==0){break}}if((I&524288|0)==0){break}N=+h[(c[G>>2]|0)+152>>3]*.5;M=N>2.0?N:2.0;X=c[da+4>>2]|0;if((X|0)>0){fa=da|0;da=r;ea=s;Z=t;ca=r|0;ba=r+16|0;aa=r+32|0;_=r+48|0;Y=0;u=0;J=0;U=0;while(1){S=c[fa>>2]|0;O=kk(24)|0;R=O;c[O+16>>2]=1;C=(c[S+(U*48|0)+4>>2]|0)-1|0;P=(C|0)/3|0;if((C|0)>2){C=S+(U*48|0)|0;S=R;z=0;do{Q=z*3|0;ga=c[C>>2]|0;ha=ga+(Q<<4)|0;c[da>>2]=c[ha>>2];c[da+4>>2]=c[ha+4>>2];c[da+8>>2]=c[ha+8>>2];c[da+12>>2]=c[ha+12>>2];ha=ga+(Q+1<<4)|0;c[ba>>2]=c[ha>>2];c[ba+4>>2]=c[ha+4>>2];c[ba+8>>2]=c[ha+8>>2];c[ba+12>>2]=c[ha+12>>2];ha=ga+(Q+2<<4)|0;c[aa>>2]=c[ha>>2];c[aa+4>>2]=c[ha+4>>2];c[aa+8>>2]=c[ha+8>>2];c[aa+12>>2]=c[ha+12>>2];ha=ga+(Q+3<<4)|0;c[_>>2]=c[ha>>2];c[_+4>>2]=c[ha+4>>2];c[_+8>>2]=c[ha+8>>2];c[_+12>>2]=c[ha+12>>2];S=ki(ca,S)|0;z=z+1|0;}while((z|0)<(P|0))}if((O|0)==0){ia=J;ja=u;ka=Y}else{P=0;z=R;S=0;C=J;ha=u;Q=Y;while(1){ga=c[z+16>>2]|0;la=s+(S<<4)|0;ma=t+(S<<4)|0;N=+h[z>>3];L=+h[z+8>>3];do{if((P|0)==0){na=+h[ga>>3];oa=+h[ga+8>>3];pa=na;qa=oa;ra=N*2.0-na;sa=L*2.0-oa}else{oa=+h[P>>3];na=+h[P+8>>3];if((ga|0)==0){pa=N*2.0-oa;qa=L*2.0-na;ra=oa;sa=na;break}else{pa=+h[ga>>3];qa=+h[ga+8>>3];ra=oa;sa=na;break}}}while(0);na=+$(+(sa-L),+(ra-N));oa=+$(+(qa-L),+(pa-N))-na;if(oa>0.0){ta=oa+ -6.283185307179586}else{ta=oa}oa=na+ta*.5;na=M*+V(oa);ua=M*+W(oa);h[la>>3]=N+na;h[s+(S<<4)+8>>3]=L+ua;h[ma>>3]=N-na;h[t+(S<<4)+8>>3]=L-ua;va=S+1|0;wa=(ga|0)==0;if(wa|(va|0)==50){xa=va<<1;ya=xa-1|0;if((C|0)>0){za=0;Aa=0;do{za=(c[ha+(Aa<<2)>>2]|0)+za|0;Aa=Aa+1|0;}while((Aa|0)<(C|0));Ba=za;Ca=(C|0)>1?C:1}else{Ba=0;Ca=0}Aa=C+1|0;Da=mk(ha,Aa<<2)|0;c[Da+(Ca<<2)>>2]=xa;Ea=mk(Q,Ba+xa<<4)|0;do{if((S|0)>-1){Fa=ya+Ba|0;Ga=Ea+(Ba<<4)|0;c[Ga>>2]=c[ea>>2];c[Ga+4>>2]=c[ea+4>>2];c[Ga+8>>2]=c[ea+8>>2];c[Ga+12>>2]=c[ea+12>>2];Ga=Ea+(Fa<<4)|0;c[Ga>>2]=c[Z>>2];c[Ga+4>>2]=c[Z+4>>2];c[Ga+8>>2]=c[Z+8>>2];c[Ga+12>>2]=c[Z+12>>2];if((S|0)>0){Ha=1}else{break}do{Ga=Ea+(Ha+Ba<<4)|0;Ia=s+(Ha<<4)|0;c[Ga>>2]=c[Ia>>2];c[Ga+4>>2]=c[Ia+4>>2];c[Ga+8>>2]=c[Ia+8>>2];c[Ga+12>>2]=c[Ia+12>>2];Ia=Ea+(Fa-Ha<<4)|0;Ga=t+(Ha<<4)|0;c[Ia>>2]=c[Ga>>2];c[Ia+4>>2]=c[Ga+4>>2];c[Ia+8>>2]=c[Ga+8>>2];c[Ia+12>>2]=c[Ga+12>>2];Ha=Ha+1|0;}while((Ha|0)<(va|0))}}while(0);ya=la;c[ea>>2]=c[ya>>2];c[ea+4>>2]=c[ya+4>>2];c[ea+8>>2]=c[ya+8>>2];c[ea+12>>2]=c[ya+12>>2];ya=ma;c[Z>>2]=c[ya>>2];c[Z+4>>2]=c[ya+4>>2];c[Z+8>>2]=c[ya+8>>2];c[Z+12>>2]=c[ya+12>>2];Ja=1;Ka=Aa;Ma=Da;Na=Ea}else{Ja=va;Ka=C;Ma=ha;Na=Q}if(wa){Oa=R;break}else{P=z;z=ga;S=Ja;C=Ka;ha=Ma;Q=Na}}while(1){Q=c[Oa+16>>2]|0;eF(Oa);if((Q|0)==0){ia=Ka;ja=Ma;ka=Na;break}else{Oa=Q}}}Q=U+1|0;if((Q|0)<(X|0)){Y=ka;u=ja;J=ia;U=Q}else{Pa=ka;Qa=ja;Ra=ia;break}}}else{Pa=0;Qa=0;Ra=0}c[D+276>>2]=Ra;c[D+280>>2]=Qa;if((I&8192|0)==0){if((Ra|0)>0){U=0;J=0;while(1){u=(c[Qa+(U<<2)>>2]|0)+J|0;Y=U+1|0;if((Y|0)<(Ra|0)){U=Y;J=u}else{Sa=u;break}}}else{Sa=0}RA(f,Pa,Pa,Sa)|0}c[D+284>>2]=Pa;c[D+264>>2]=2;c[D+272>>2]=Pa;c[D+268>>2]=c[Qa>>2]}}while(0);eB(f,j);Qa=c[D+208>>2]|0;if((Qa|0)==0){if((b[D+260>>1]&1)!=0){A=181}}else{A=181}if((A|0)==181){gB(f,Qa,c[D+228>>2]|0,c[D+244>>2]|0,c[D+212>>2]|0)}D=q;ta=+h[(c[G>>2]|0)+152>>3];Ch(ew(E,148552)|0);f:do{if((c[(c[x>>2]|0)+8>>2]|0)!=0){pa=+Fm(E,c[53820]|0,1.0,0.0);Qa=Hm(E,c[53816]|0,213440)|0;Pa=(H|0)!=0;g:do{if(Pa){Sa=c[H>>2]|0;if((Sa|0)==0){Ta=0;break}else{Ua=H;Va=Sa}while(1){Sa=Ua+4|0;if((a[Va]|0)==116){if((Ya(Va|0,87744)|0)==0){Ta=1;break g}}Ra=c[Sa>>2]|0;if((Ra|0)==0){Ta=0;break}else{Ua=Sa;Va=Ra}}}else{Ta=0}}while(0);Ra=Qa;Sa=0;I=0;while(1){ia=a[Ra]|0;if((ia<<24>>24|0)==58){Wa=Sa+1|0;Xa=I}else if((ia<<24>>24|0)==59){Wa=Sa;Xa=I+1|0}else if((ia<<24>>24|0)==0){break}else{Wa=Sa;Xa=I}Ra=Ra+1|0;Sa=Wa;I=Xa}Ra=(Sa|0)==0;do{if((I|0)==0|Ra){Za=Qa}else{ia=l;ja=m;ka=o;Oa=Lh(Qa,Sa+1|0,p)|0;if((Oa|0)>1){Na=Hx(c[((c[w>>2]&3|0)==3?j:y)+28>>2]|0)|0;Ma=$w(c[((c[w>>2]&3|0)==3?j:y)+28>>2]|0)|0;Ka=(Nw(Na)|0)!=0;Na=$w(c[((c[w>>2]&3|0)==2?j:B)+28>>2]|0)|0;Fv(3,84552,(K=i,i=i+24|0,c[K>>2]=Ma,c[K+8>>2]=Ka?84144:83704,c[K+16>>2]=Na,K)|0)|0;i=K;if((Oa|0)==2){Za=159752;break}}else{if((Oa|0)==1){Za=159752;break}}Oa=c[(c[x>>2]|0)+8>>2]|0;if((c[Oa+4>>2]|0)>0){Na=l+8|0;Ka=l+12|0;Ma=l+32|0;Ja=l+4|0;Ha=l|0;t=l+16|0;s=m|0;Ba=n|0;Ca=n+4|0;r=o|0;J=o+4|0;U=c[p>>2]|0;u=U+8|0;Y=0;X=0;Z=Oa;while(1){Oa=(c[Z>>2]|0)+(Y*48|0)|0;c[ia>>2]=c[Oa>>2];c[ia+4>>2]=c[Oa+4>>2];c[ia+8>>2]=c[Oa+8>>2];c[ia+12>>2]=c[Oa+12>>2];c[ia+16>>2]=c[Oa+16>>2];c[ia+20>>2]=c[Oa+20>>2];c[ia+24>>2]=c[Oa+24>>2];c[ia+28>>2]=c[Oa+28>>2];c[ia+32>>2]=c[Oa+32>>2];c[ia+36>>2]=c[Oa+36>>2];c[ia+40>>2]=c[Oa+40>>2];c[ia+44>>2]=c[Oa+44>>2];Oa=c[u>>2]|0;ea=c[Oa>>2]|0;h:do{if((ea|0)==0){_a=X}else{ca=X;qa=1.0;_=1;aa=Oa;ba=ea;i:while(1){da=aa+4|0;ra=+g[da>>2];do{if(ra<1.0e-5&ra>-1.0e-5){$a=_;ab=qa;bb=ca}else{lB(f,ba);sa=+g[da>>2];M=qa-sa;cb=c[aa>>2]|0;if((_|0)!=0){ji(l,sa,n,o);fa=c[Ba>>2]|0;tB(f,fa,c[Ca>>2]|0,0,0,0);eF(fa);if(M<1.0e-5&M>-1.0e-5){A=204;break i}else{$a=0;ab=M;bb=cb;break}}if(M<1.0e-5&M>-1.0e-5){A=206;break i}c[ja>>2]=c[ka>>2];c[ja+4>>2]=c[ka+4>>2];c[ja+8>>2]=c[ka+8>>2];c[ja+12>>2]=c[ka+12>>2];c[ja+16>>2]=c[ka+16>>2];c[ja+20>>2]=c[ka+20>>2];c[ja+24>>2]=c[ka+24>>2];c[ja+28>>2]=c[ka+28>>2];c[ja+32>>2]=c[ka+32>>2];c[ja+36>>2]=c[ka+36>>2];c[ja+40>>2]=c[ka+40>>2];c[ja+44>>2]=c[ka+44>>2];sa=+g[da>>2];ji(m,sa/(M+sa),n,o);eF(c[s>>2]|0);fa=c[Ba>>2]|0;tB(f,fa,c[Ca>>2]|0,0,0,0);eF(fa);$a=0;ab=M;bb=cb}}while(0);da=aa+12|0;fa=c[da>>2]|0;if((fa|0)==0){_a=bb;break h}else{ca=bb;qa=ab;_=$a;aa=da;ba=fa}}if((A|0)==204){A=0;eF(c[r>>2]|0);_a=cb;break}else if((A|0)==206){A=0;ba=c[r>>2]|0;tB(f,ba,c[J>>2]|0,0,0,0);eF(ba);_a=cb;break}}}while(0);if((c[Na>>2]|0)!=0){lB(f,c[c[u>>2]>>2]|0);nB(f,c[c[u>>2]>>2]|0);qh(f,2,t,c[Ha>>2]|0,pa,ta,c[Na>>2]|0)}if((c[Ka>>2]|0)!=0){lB(f,_a);nB(f,_a);qh(f,3,Ma,(c[Ha>>2]|0)+((c[Ja>>2]|0)-1<<4)|0,pa,ta,c[Ka>>2]|0)}ea=c[(c[x>>2]|0)+8>>2]|0;Oa=c[ea+4>>2]|0;do{if((Oa|0)>1){if((c[Na>>2]|0)==0){if((c[Ka>>2]|0)==0|F){db=ea;eb=Oa;break}}else{if(F){db=ea;eb=Oa;break}}pB(f,H);ga=c[(c[x>>2]|0)+8>>2]|0;db=ga;eb=c[ga+4>>2]|0}else{db=ea;eb=Oa}}while(0);Oa=Y+1|0;if((Oa|0)<(eb|0)){Y=Oa;X=_a;Z=db}else{fb=U;break}}}else{fb=c[p>>2]|0}eF(fb);break f}}while(0);Qa=d[(c[x>>2]|0)+115|0]|0;do{if((Qa&1|0)==0){if((Qa&2|0)!=0){I=c[53764]|0;U=Im(E,I,ei(Za,139280)|0)|0;gb=U;hb=Im(E,c[53766]|0,136712)|0;A=229;break}if((Qa&8|0)!=0){U=c[53806]|0;I=Im(E,U,ei(Za,133792)|0)|0;gb=I;hb=Im(E,c[53808]|0,131744)|0;A=229;break}if((Qa&4|0)==0){ib=Im(E,c[53802]|0,Za)|0;jb=Za;break}else{I=c[53752]|0;U=Im(E,I,ei(Za,129560)|0)|0;gb=U;hb=Im(E,c[53754]|0,126280)|0;A=229;break}}else{U=c[53824]|0;I=Im(E,U,ei(Za,145328)|0)|0;gb=I;hb=Im(E,c[53826]|0,142384)|0;A=229}}while(0);do{if((A|0)==229){if((gb|0)==(Za|0)){ib=hb;jb=Za;break}lB(f,gb);ib=hb;jb=gb}}while(0);if((ib|0)!=(Za|0)){nB(f,ib)}if(Ta<<24>>24!=0){Qa=(a[jb]|0)==0?159752:jb;I=(a[ib]|0)==0?159752:ib;lB(f,118712);nB(f,Qa);U=c[c[(c[x>>2]|0)+8>>2]>>2]|0;c[D>>2]=c[U>>2];c[D+4>>2]=c[U+4>>2];c[D+8>>2]=c[U+8>>2];c[D+12>>2]=c[U+12>>2];c[D+16>>2]=c[U+16>>2];c[D+20>>2]=c[U+20>>2];c[D+24>>2]=c[U+24>>2];c[D+28>>2]=c[U+28>>2];c[D+32>>2]=c[U+32>>2];c[D+36>>2]=c[U+36>>2];c[D+40>>2]=c[U+40>>2];c[D+44>>2]=c[U+44>>2];U=c[53804]|0;do{if((U|0)==0){A=240}else{Z=fw(E,U)|0;X=a[Z]|0;if((X<<24>>24|0)==102){if((Ya(Z|0,86688)|0)==0){kb=6;break}else{A=240;break}}else if((X<<24>>24|0)==98){if((Ya(Z|0,85856)|0)==0){kb=8;break}if((Ya(Z|0,85384)|0)==0){kb=4;break}else{A=240;break}}else if((X<<24>>24|0)==110){if((Ya(Z|0,84920)|0)==0){kb=2;break}else{A=240;break}}else{A=240;break}}}while(0);if((A|0)==240){U=(Nw(Hx(c[((c[w>>2]&3|0)==2?j:B)+28>>2]|0)|0)|0)!=0;kb=U?6:2}U=rm(q,kb,ta,0,0)|0;Z=U+8|0;rB(f,c[Z>>2]|0,c[U>>2]|0,1);if((U|0)!=0){eF(c[Z>>2]|0);eF(U)}lB(f,Qa);if((I|0)!=(Qa|0)){nB(f,I)}U=c[q+8>>2]|0;if((U|0)!=0){qh(f,2,q+16|0,c[q>>2]|0,pa,ta,U)}U=c[q+12>>2]|0;if((U|0)==0){break}qh(f,3,q+32|0,(c[q>>2]|0)+((c[q+4>>2]|0)-1<<4)|0,pa,ta,U);break}U=c[x>>2]|0;if(Ra){do{if((a[U+115|0]&3)==0){if((a[jb]|0)!=0){lB(f,jb);nB(f,ib);break}lB(f,159752);if((a[ib]|0)==0){nB(f,159752);break}else{nB(f,ib);break}}}while(0);Ra=c[(c[x>>2]|0)+8>>2]|0;if((c[Ra+4>>2]|0)<=0){break}I=q|0;Qa=q+4|0;Z=q+8|0;X=q+12|0;Y=Pa^1;Ka=q+32|0;Na=q+16|0;if(Pa){Ja=0;Ha=Ra;while(1){Ma=(c[Ha>>2]|0)+(Ja*48|0)|0;c[D>>2]=c[Ma>>2];c[D+4>>2]=c[Ma+4>>2];c[D+8>>2]=c[Ma+8>>2];c[D+12>>2]=c[Ma+12>>2];c[D+16>>2]=c[Ma+16>>2];c[D+20>>2]=c[Ma+20>>2];c[D+24>>2]=c[Ma+24>>2];c[D+28>>2]=c[Ma+28>>2];c[D+32>>2]=c[Ma+32>>2];c[D+36>>2]=c[Ma+36>>2];c[D+40>>2]=c[Ma+40>>2];c[D+44>>2]=c[Ma+44>>2];Ma=c[I>>2]|0;t=c[Qa>>2]|0;do{if((c[v>>2]&16384|0)==0){tB(f,Ma,t,0,0,0);u=c[Z>>2]|0;if((u|0)!=0){qh(f,2,Na,c[I>>2]|0,pa,ta,u)}u=c[X>>2]|0;if((u|0)!=0){qh(f,3,Ka,(c[I>>2]|0)+((c[Qa>>2]|0)-1<<4)|0,pa,ta,u)}if((c[(c[(c[x>>2]|0)+8>>2]|0)+4>>2]|0)<=1){break}if((c[Z>>2]|0)==0){if((c[X>>2]|0)==0|Y){break}}pB(f,H)}else{tB(f,Ma,t,c[Z>>2]|0,c[X>>2]|0,0)}}while(0);Ja=Ja+1|0;Ha=c[(c[x>>2]|0)+8>>2]|0;if((Ja|0)>=(c[Ha+4>>2]|0)){break f}}}else{Ha=0;Ja=Ra;while(1){Pa=(c[Ja>>2]|0)+(Ha*48|0)|0;c[D>>2]=c[Pa>>2];c[D+4>>2]=c[Pa+4>>2];c[D+8>>2]=c[Pa+8>>2];c[D+12>>2]=c[Pa+12>>2];c[D+16>>2]=c[Pa+16>>2];c[D+20>>2]=c[Pa+20>>2];c[D+24>>2]=c[Pa+24>>2];c[D+28>>2]=c[Pa+28>>2];c[D+32>>2]=c[Pa+32>>2];c[D+36>>2]=c[Pa+36>>2];c[D+40>>2]=c[Pa+40>>2];c[D+44>>2]=c[Pa+44>>2];Pa=c[I>>2]|0;t=c[Qa>>2]|0;do{if((c[v>>2]&16384|0)==0){tB(f,Pa,t,0,0,0);Ma=c[Z>>2]|0;if((Ma|0)!=0){qh(f,2,Na,c[I>>2]|0,pa,ta,Ma)}Ma=c[X>>2]|0;if((Ma|0)!=0){qh(f,3,Ka,(c[I>>2]|0)+((c[Qa>>2]|0)-1<<4)|0,pa,ta,Ma)}if((c[(c[(c[x>>2]|0)+8>>2]|0)+4>>2]|0)<=1){break}if((c[Z>>2]|0)!=0){break}if((c[X>>2]|0)==0|Y){break}pB(f,0)}else{tB(f,Pa,t,c[Z>>2]|0,c[X>>2]|0,0)}}while(0);Ha=Ha+1|0;Ja=c[(c[x>>2]|0)+8>>2]|0;if((Ha|0)>=(c[Ja+4>>2]|0)){break f}}}}Ja=U+8|0;Ha=c[Ja>>2]|0;X=c[Ha+4>>2]|0;Z=X*48|0;Y=dF(Z)|0;Qa=Y;I=dF(Z)|0;Z=I;qa=+(Sa+2|0)*.5;Ka=(X|0)>0;j:do{if(Ka){Na=q+4|0;Ra=q|0;ra=0.0;M=0.0;t=0;Pa=Ha;while(1){Ma=(c[Pa>>2]|0)+(t*48|0)|0;c[D>>2]=c[Ma>>2];c[D+4>>2]=c[Ma+4>>2];c[D+8>>2]=c[Ma+8>>2];c[D+12>>2]=c[Ma+12>>2];c[D+16>>2]=c[Ma+16>>2];c[D+20>>2]=c[Ma+20>>2];c[D+24>>2]=c[Ma+24>>2];c[D+28>>2]=c[Ma+28>>2];c[D+32>>2]=c[Ma+32>>2];c[D+36>>2]=c[Ma+36>>2];c[D+40>>2]=c[Ma+40>>2];c[D+44>>2]=c[Ma+44>>2];Ma=c[Na>>2]|0;c[Qa+(t*48|0)+4>>2]=Ma;c[Z+(t*48|0)+4>>2]=Ma;u=Ma<<4;J=dF(u)|0;r=J;c[Qa+(t*48|0)>>2]=r;Ca=dF(u)|0;c[Z+(t*48|0)>>2]=Ca;u=c[Ra>>2]|0;sa=+h[u>>3];L=+h[u+8>>3];Ba=Ma-1|0;if((Ba|0)>0){Ma=J+8|0;N=ra;ua=M;na=L;oa=sa;J=0;while(1){s=J+1|0;lb=+h[u+(s<<4)>>3];mb=+h[u+(s<<4)+8>>3];ka=r+(J<<4)|0;if((J|0)==0){nb=oa-lb;ob=na-mb;pb=2.0/+T(nb*nb+ob*ob+1.0e-4);qb=ob*pb;h[ka>>3]=qb;h[Ma>>3]=-0.0-nb*pb;rb=qb}else{qb=ua-lb;pb=N-mb;nb=2.0/+T(qb*qb+pb*pb+1.0e-4);ob=pb*nb;h[ka>>3]=ob;h[r+(J<<4)+8>>3]=-0.0-qb*nb;rb=ob}ka=J+2|0;ob=+h[u+(ka<<4)>>3];nb=+h[u+(ka<<4)+8>>3];ja=J+3|0;qb=+h[u+(ja<<4)>>3];pb=+h[u+(ja<<4)+8>>3];ia=r+(s<<4)|0;Oa=r+(ka<<4)|0;sb=lb-ob;tb=mb-nb;ub=+T(sb*sb+tb*tb);if(ub<1.0e-4){vb=oa-qb;wb=na-pb;xb=wb;yb=vb;zb=+T(vb*vb+wb*wb+1.0e-4)}else{xb=tb;yb=sb;zb=ub}ub=2.0/zb;sb=xb*ub;tb=-0.0-yb*ub;ea=Oa;h[Oa>>3]=sb;h[r+(ka<<4)+8>>3]=tb;Oa=ia;c[Oa>>2]=c[ea>>2];c[Oa+4>>2]=c[ea+4>>2];c[Oa+8>>2]=c[ea+8>>2];c[Oa+12>>2]=c[ea+12>>2];h[Ca+(J<<4)>>3]=oa-qa*rb;h[Ca+(J<<4)+8>>3]=na-qa*+h[r+(J<<4)+8>>3];h[Ca+(s<<4)>>3]=lb-qa*+h[ia>>3];h[Ca+(s<<4)+8>>3]=mb-qa*+h[r+(s<<4)+8>>3];h[Ca+(ka<<4)>>3]=ob-qa*sb;h[Ca+(ka<<4)+8>>3]=nb-qa*tb;if((ja|0)<(Ba|0)){N=nb;ua=ob;na=pb;oa=qb;J=ja}else{Ab=nb;Bb=ob;Cb=pb;Db=qb;Eb=ja;break}}}else{Ab=ra;Bb=M;Cb=L;Db=sa;Eb=0}oa=Bb-Db;na=Ab-Cb;ua=2.0/+T(oa*oa+na*na+1.0e-4);N=na*ua;na=-0.0-oa*ua;h[r+(Eb<<4)>>3]=N;h[r+(Eb<<4)+8>>3]=na;h[Ca+(Eb<<4)>>3]=Db-qa*N;h[Ca+(Eb<<4)+8>>3]=Cb-qa*na;J=t+1|0;if((J|0)>=(X|0)){break j}ra=Ab;M=Bb;t=J;Pa=c[Ja>>2]|0}}}while(0);Ja=Lb(jb|0)|0;Ha=La(Ja|0,87264)|0;if((Ha|0)==0){Fb=jb;Gb=jb}else{Sa=jb;U=jb;Pa=jb;t=Ha;Ha=0;while(1){Ra=(a[t]|0)==0?159752:t;do{if((Ra|0)==(Pa|0)){Hb=Pa}else{if((a[(c[x>>2]|0)+115|0]&3)!=0){Hb=Ra;break}lB(f,Ra);nB(f,Ra);Hb=Ra}}while(0);Na=(Ha|0)==0;J=Na?Ra:Sa;Ba=(Ha|0)==1?Ra:Na?Ra:U;if(Ka){Na=0;do{u=c[Z+(Na*48|0)>>2]|0;Ma=c[Qa+(Na*48|0)>>2]|0;ja=c[Z+(Na*48|0)+4>>2]|0;if((ja|0)>0){ka=0;do{s=u+(ka<<4)|0;h[s>>3]=+h[Ma+(ka<<4)>>3]+ +h[s>>3];s=u+(ka<<4)+8|0;h[s>>3]=+h[Ma+(ka<<4)+8>>3]+ +h[s>>3];ka=ka+1|0;}while((ka|0)<(ja|0))}tB(f,u,ja,0,0,0);Na=Na+1|0;}while((Na|0)<(X|0))}Na=La(0,87264)|0;if((Na|0)==0){Fb=J;Gb=Ba;break}else{Sa=J;U=Ba;Pa=Hb;t=Na;Ha=Ha+1|0}}}Ha=q+8|0;t=c[Ha>>2]|0;if((t|0)==0){Ib=0}else{do{if((Gb|0)==0){Jb=0;Kb=t}else{if((a[(c[x>>2]|0)+115|0]&3)!=0){Jb=Gb;Kb=t;break}lB(f,Gb);nB(f,Gb);Jb=Gb;Kb=c[Ha>>2]|0}}while(0);qh(f,2,q+16|0,c[q>>2]|0,pa,ta,Kb);Ib=Jb}Ha=q+12|0;t=c[Ha>>2]|0;if((t|0)!=0){do{if((Ib|0)==(Fb|0)){Mb=t}else{if((a[(c[x>>2]|0)+115|0]&3)!=0){Mb=t;break}lB(f,Fb);nB(f,Fb);Mb=c[Ha>>2]|0}}while(0);qh(f,3,q+32|0,(c[q>>2]|0)+((c[q+4>>2]|0)-1<<4)|0,pa,ta,Mb)}eF(Ja);if(Ka){Ha=0;do{eF(c[Qa+(Ha*48|0)>>2]|0);eF(c[Z+(Ha*48|0)>>2]|0);Ha=Ha+1|0;}while((Ha|0)<(X|0))}eF(Y);eF(I)}}while(0);Mb=c[G>>2]|0;G=c[Mb+8>>2]|0;q=Mb+208|0;if((c[q>>2]|0)==0){if((b[Mb+260>>1]&1)!=0){A=316}}else{A=316}do{if((A|0)==316){hB(f);Fb=Mb+276|0;x=c[Fb>>2]|0;if((x|0)==0){break}Ib=Mb+280|0;if((x|0)<=1){break}x=c[Ib>>2]|0;Jb=Mb+268|0;Kb=Mb+284|0;Gb=Mb+272|0;Hb=Mb+228|0;jb=Mb+244|0;Eb=Mb+212|0;D=1;v=c[x>>2]|0;H=x;do{c[Jb>>2]=c[H+(D<<2)>>2];c[Gb>>2]=(c[Kb>>2]|0)+(v<<4);gB(f,c[q>>2]|0,c[Hb>>2]|0,c[jb>>2]|0,c[Eb>>2]|0);hB(f);H=c[Ib>>2]|0;v=(c[H+(D<<2)>>2]|0)+v|0;D=D+1|0;}while((D|0)<(c[Fb>>2]|0))}}while(0);c[Mb+268>>2]=0;c[Mb+272>>2]=0;q=G+8|0;A=c[q>>2]|0;Fb=c[A+8>>2]|0;if((Fb|0)==0){Nb=A;Ob=Mb+260|0}else{A=c[Fb>>2]|0;Fb=c[A>>2]|0;if((c[A+8>>2]|0)==0){Pb=Fb|0;Qb=Fb+8|0}else{Pb=A+16|0;Qb=A+24|0}A=Mb+260|0;Fb=b[A>>1]|0;bi(f,+h[Pb>>3],+h[Qb>>3],Fb<<8<<16>>16>>15&255,c[Mb+220>>2]|0,Fb<<14<<16>>16>>15&255,Fb<<11<<16>>16>>15&255);Fb=c[(c[q>>2]|0)+8>>2]|0;Qb=(c[Fb+4>>2]|0)-1|0;Pb=c[Fb>>2]|0;Fb=Pb+(Qb*48|0)+16|0;if((c[Pb+(Qb*48|0)+12>>2]|0)==0){D=c[Pb+(Qb*48|0)>>2]|0;v=(c[Pb+(Qb*48|0)+4>>2]|0)-1|0;Rb=D+(v<<4)|0;Sb=D+(v<<4)+8|0}else{Rb=Fb+16|0;Sb=Fb+24|0}Fb=b[A>>1]|0;bi(f,+h[Rb>>3],+h[Sb>>3],Fb<<7<<16>>16>>15&255,c[Mb+224>>2]|0,Fb<<13<<16>>16>>15&255,Fb<<10<<16>>16>>15&255);Nb=c[q>>2]|0;Ob=A}A=c[Nb+96>>2]|0;Nb=b[Ob>>1]<<12<<16>>16>>15<<16>>16;Fb=Mb+216|0;Sb=c[Fb>>2]|0;Rb=Mb+232|0;v=c[Rb>>2]|0;D=Mb+248|0;Qb=c[D>>2]|0;Pb=Mb+212|0;H=c[Pb>>2]|0;Ib=G|0;if((Km(Hm(Ib,c[53810]|0,90608)|0)|0)<<24>>24==0){Tb=0}else{Tb=c[(c[q>>2]|0)+8>>2]|0}ci(f,A,11,Nb,Sb,v,Qb,H,Tb);Tb=c[(c[q>>2]|0)+108>>2]|0;H=b[Ob>>1]<<12<<16>>16>>15<<16>>16;Qb=c[Fb>>2]|0;Fb=c[Rb>>2]|0;Rb=c[D>>2]|0;D=c[Pb>>2]|0;if((Km(Hm(Ib,c[53810]|0,90608)|0)|0)<<24>>24==0){Ub=0}else{Ub=c[(c[q>>2]|0)+8>>2]|0}ci(f,Tb,11,H,Qb,Fb,Rb,D,Ub);ci(f,c[(c[q>>2]|0)+100>>2]|0,7,b[Ob>>1]<<13<<16>>16>>15<<16>>16,c[Mb+224>>2]|0,c[Mb+240>>2]|0,c[Mb+256>>2]|0,c[Pb>>2]|0,0);ci(f,c[(c[q>>2]|0)+104>>2]|0,6,b[Ob>>1]<<14<<16>>16>>15<<16>>16,c[Mb+220>>2]|0,c[Mb+236>>2]|0,c[Mb+252>>2]|0,c[Pb>>2]|0,0);fB(f);Gh(f);i=k;return}function Yh(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0;d=i;i=i+144|0;e=d+128|0;if(!(a[14792]|0)){Iv(175216,128,176872);a[14792]=1}Iv(e,128,d|0);f=e+4|0;g=e+8|0;h=e|0;j=0;k=0;l=b;a:while(1){m=j;n=l;while(1){o=a[n]|0;b:do{if(o<<24>>24==0){p=n;q=0}else{r=n;s=o;while(1){if((Qa(s<<24>>24|0)|0)==0){t=a[r]|0;if(t<<24>>24!=44){p=r;q=t;break b}}t=r+1|0;u=a[t]|0;if(u<<24>>24==0){p=t;q=0;break}else{r=t;s=u}}}}while(0);o=q<<24>>24;if((o|0)==0){v=30;break a}else if(!((o|0)==40|(o|0)==41)){w=p;x=q;v=10;break}s=p+1|0;if((o|0)==40){if(m<<24>>24==0){m=1;n=s;continue}else{v=16;break a}}else if((o|0)==41){if(m<<24>>24==0){v=18;break a}else{m=0;n=s;continue}}else{y=s;break}}c:do{if((v|0)==10){while(1){v=0;n=x<<24>>24;if((n|0)==40|(n|0)==41|(n|0)==44|(n|0)==0){y=w;break c}n=c[f>>2]|0;if(n>>>0<(c[g>>2]|0)>>>0){z=n}else{Jv(e,1)|0;z=c[f>>2]|0}c[f>>2]=z+1;a[z]=x;n=w+1|0;w=n;x=a[n]|0;v=10}}}while(0);if(m<<24>>24==0){if((k|0)==63){v=21;break}n=c[43805]|0;if(n>>>0<(c[43806]|0)>>>0){A=n}else{Jv(175216,1)|0;A=c[43805]|0}c[43805]=A+1;a[A]=0;c[176472+(k<<2)>>2]=c[43805];B=k+1|0}else{B=k}n=c[f>>2]|0;if(n>>>0<(c[g>>2]|0)>>>0){C=n}else{Jv(e,1)|0;C=c[f>>2]|0}a[C]=0;n=c[h>>2]|0;c[f>>2]=n;Lv(175216,n)|0;n=c[43805]|0;if(n>>>0<(c[43806]|0)>>>0){D=n}else{Jv(175216,1)|0;D=c[43805]|0}c[43805]=D+1;a[D]=0;j=m;k=B;l=y}if((v|0)==16){Fv(1,116872,(E=i,i=i+8|0,c[E>>2]=b,E)|0)|0;i=E;c[44118]=0;Mv(e);i=d;return 176472}else if((v|0)==18){Fv(1,115968,(E=i,i=i+8|0,c[E>>2]=b,E)|0)|0;i=E;c[44118]=0;Mv(e);i=d;return 176472}else if((v|0)==21){Fv(0,114648,(E=i,i=i+8|0,c[E>>2]=b,E)|0)|0;i=E;c[44181]=0;Mv(e);i=d;return 176472}else if((v|0)==30){if(m<<24>>24!=0){Fv(1,113800,(E=i,i=i+8|0,c[E>>2]=b,E)|0)|0;i=E;c[44118]=0;Mv(e);i=d;return 176472}c[176472+(k<<2)>>2]=0;Mv(e);e=c[43805]|0;if(e>>>0<(c[43806]|0)>>>0){F=e}else{Jv(175216,1)|0;F=c[43805]|0}a[F]=0;c[43805]=c[43804];i=d;return 176472}return 0}function Zh(a){a=a|0;var b=0;b=c[44736]|0;if((a|0)!=0){c[44736]=b+1;if((b|0)!=0){return}c[44734]=Lb(Ab(1,0)|0)|0;Ab(1,113248)|0;return}if((b|0)<=0){return}a=b-1|0;c[44736]=a;if((a|0)!=0){return}Ab(1,c[44734]|0)|0;eF(c[44734]|0);return}function _h(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0.0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0.0,ba=0.0,ca=0.0,ea=0.0,fa=0.0,ga=0.0,ha=0.0,ia=0,ja=0.0,ka=0.0,la=0.0,ma=0.0,na=0.0,oa=0.0,pa=0.0,qa=0.0,ra=0.0,sa=0.0,ta=0.0,ua=0.0,va=0.0,wa=0.0,xa=0.0,ya=0.0,za=0.0,Aa=0.0,Ba=0.0,Ca=0.0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,Ma=0,Na=0,Oa=0,Pa=0.0,Qa=0.0,Ra=0.0,Sa=0.0,Ta=0.0,Ua=0,Va=0,Wa=0.0,Xa=0.0,Za=0.0,_a=0.0,$a=0,ab=0,bb=0.0,cb=0.0,db=0.0,eb=0.0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0.0,ob=0.0,pb=0.0,qb=0.0,rb=0.0,sb=0.0,tb=0.0;e=i;i=i+232|0;f=e|0;g=e+8|0;j=e+16|0;k=e+24|0;l=e+32|0;m=e+40|0;n=e+48|0;p=e+56|0;q=e+104|0;r=e+136|0;s=e+168|0;t=e+200|0;if((a[213992]|0)!=0){ym()}u=d+8|0;if((c[(c[u>>2]|0)+8>>2]|0)==0){Fv(1,112688,(v=i,i=i+1|0,i=i+7&-8,c[v>>2]=0,v)|0)|0;i=v;if((a[213992]|0)==0){w=-1;i=e;return w|0}x=c[o>>2]|0;y=$w(d|0)|0;z=+zm();gc(x|0,112248,(v=i,i=i+16|0,c[v>>2]=y,h[v+8>>3]=z,v)|0)|0;i=v;w=-1;i=e;return w|0}y=ux(d)|0;a:do{if((y|0)!=0){x=p;A=q|0;B=q+8|0;C=q+16|0;D=q+24|0;E=r|0;F=r+8|0;G=r+16|0;H=r+24|0;I=p+8|0;J=p+12|0;K=p+32|0;L=p+4|0;M=p|0;N=t|0;O=t+8|0;P=t+16|0;Q=t+24|0;R=p+16|0;S=s|0;T=s+8|0;U=s+16|0;V=s+24|0;W=y;b:while(1){X=W+8|0;Y=c[X>>2]|0;h[Y+48>>3]=+h[Y+16>>3]- +h[Y+88>>3];Y=c[X>>2]|0;h[Y+56>>3]=+h[Y+24>>3]- +h[Y+80>>3]*.5;Y=c[X>>2]|0;h[Y+64>>3]=+h[Y+16>>3]+ +h[Y+96>>3];Y=c[X>>2]|0;h[Y+72>>3]=+h[Y+24>>3]+ +h[Y+80>>3]*.5;Y=mw(d,W)|0;if((Y|0)!=0){X=Y;do{Y=c[(c[X+8>>2]|0)+8>>2]|0;if((Y|0)!=0){Z=Y+4|0;if((c[Z>>2]|0)<=0){break b}_=Y|0;$=c[_>>2]|0;c[x>>2]=c[$>>2];c[x+4>>2]=c[$+4>>2];c[x+8>>2]=c[$+8>>2];c[x+12>>2]=c[$+12>>2];c[x+16>>2]=c[$+16>>2];c[x+20>>2]=c[$+20>>2];c[x+24>>2]=c[$+24>>2];c[x+28>>2]=c[$+28>>2];c[x+32>>2]=c[$+32>>2];c[x+36>>2]=c[$+36>>2];c[x+40>>2]=c[$+40>>2];c[x+44>>2]=c[$+44>>2];ai(q,p);z=+h[A>>3];aa=+h[B>>3];ba=+h[C>>3];ca=+h[D>>3];if((c[Z>>2]|0)>0){$=0;ea=ca;fa=ba;ga=aa;ha=z;while(1){if(($|0)>0){ia=(c[_>>2]|0)+($*48|0)|0;c[x>>2]=c[ia>>2];c[x+4>>2]=c[ia+4>>2];c[x+8>>2]=c[ia+8>>2];c[x+12>>2]=c[ia+12>>2];c[x+16>>2]=c[ia+16>>2];c[x+20>>2]=c[ia+20>>2];c[x+24>>2]=c[ia+24>>2];c[x+28>>2]=c[ia+28>>2];c[x+32>>2]=c[ia+32>>2];c[x+36>>2]=c[ia+36>>2];c[x+40>>2]=c[ia+40>>2];c[x+44>>2]=c[ia+44>>2];ai(r,p);ja=+h[E>>3];ka=+h[F>>3];la=+h[G>>3];ma=+h[H>>3];na=ha<ja?ha:ja;oa=ga<ka?ga:ka;pa=fa>la?fa:la;qa=ea>ma?ea:ma}else{na=ha;oa=ga;pa=fa;qa=ea}ia=c[I>>2]|0;if((ia|0)==0){ra=na;sa=oa;ta=pa;ua=qa}else{ph(s,R,c[M>>2]|0,1.0,ia);ma=+h[S>>3];la=+h[T>>3];ka=+h[U>>3];ja=+h[V>>3];ra=na<ma?na:ma;sa=oa<la?oa:la;ta=pa>ka?pa:ka;ua=qa>ja?qa:ja}ia=c[J>>2]|0;if((ia|0)==0){va=ra;wa=sa;xa=ta;ya=ua}else{ph(t,K,(c[M>>2]|0)+((c[L>>2]|0)-1<<4)|0,1.0,ia);ja=+h[N>>3];ka=+h[O>>3];la=+h[P>>3];ma=+h[Q>>3];va=ra<ja?ra:ja;wa=sa<ka?sa:ka;xa=ta>la?ta:la;ya=ua>ma?ua:ma}ia=$+1|0;if((ia|0)<(c[Z>>2]|0)){$=ia;ea=ya;fa=xa;ga=wa;ha=va}else{za=ya;Aa=xa;Ba=wa;Ca=va;break}}}else{za=ca;Aa=ba;Ba=aa;Ca=z}h[Y+8>>3]=Ca;h[Y+16>>3]=Ba;h[Y+24>>3]=Aa;h[Y+32>>3]=za;}X=ow(d,X)|0;}while((X|0)!=0)}W=vx(d,W)|0;if((W|0)==0){break a}}cc(94032,102832,3891,170496);return 0}}while(0);c[b+168>>2]=d;t=b+293|0;a[t]=0;s=d|0;p=ew(s,99560)|0;do{if((p|0)!=0){r=ac(p|0,99168,(v=i,i=i+16|0,c[v>>2]=m,c[v+8>>2]=n,v)|0)|0;i=v;if((r|0)<=0){break}za=+h[m>>3]*72.0;q=b+208|0;h[q>>3]=za;h[b+200>>3]=za;if((r|0)>1){h[q>>3]=+h[n>>3]*72.0}a[t]=1}}while(0);t=b+292|0;a[t]=0;p=ew(s,98736)|0;do{if((p|0)!=0){q=ac(p|0,99168,(v=i,i=i+16|0,c[v>>2]=m,c[v+8>>2]=n,v)|0)|0;i=v;if((q|0)<=0){break}za=+h[m>>3]*72.0;r=b+224|0;h[r>>3]=za;h[b+216>>3]=za;if((q|0)>1){h[r>>3]=+h[n>>3]*72.0}a[t]=1}}while(0);t=b+294|0;a[t]=0;n=b+232|0;m=(c[(c[u>>2]|0)+8>>2]|0)+48|0;c[n>>2]=c[m>>2];c[n+4>>2]=c[m+4>>2];c[n+8>>2]=c[m+8>>2];c[n+12>>2]=c[m+12>>2];m=c[(c[u>>2]|0)+8>>2]|0;do{if(+h[m+48>>3]>.001){if(+h[m+56>>3]<=.001){Da=m;break}a[t]=1;Da=c[(c[u>>2]|0)+8>>2]|0}else{Da=m}}while(0);c[b+288>>2]=(a[Da+81|0]|0)==0?0:90;Da=b+196|0;c[Da>>2]=98168;m=ew(s,97472)|0;do{if((m|0)!=0){if((a[m]|0)==0){break}c[Da>>2]=m}}while(0);m=b+256|0;Da=(c[u>>2]|0)+16|0;c[m>>2]=c[Da>>2];c[m+4>>2]=c[Da+4>>2];c[m+8>>2]=c[Da+8>>2];c[m+12>>2]=c[Da+12>>2];c[m+16>>2]=c[Da+16>>2];c[m+20>>2]=c[Da+20>>2];c[m+24>>2]=c[Da+24>>2];c[m+28>>2]=c[Da+28>>2];c[53714]=Wv(d,0,96360,0)|0;c[53716]=Wv(d,0,95840,0)|0;c[b+320>>2]=Im(0,c[53626]|0,95312)|0;h[b+328>>3]=+Fm(0,c[53624]|0,14.0,1.0);c[b+336>>2]=29704;c[b+188>>2]=$w(s)|0;Da=b+304|0;m=c[Da>>2]|0;if((m|0)!=0){eF(m);c[Da>>2]=0}m=b+308|0;t=c[m>>2]|0;if((t|0)!=0){eF(t);c[m>>2]=0}t=b+316|0;n=c[t>>2]|0;if((n|0)!=0){eF(n);c[t>>2]=0}n=ew(s,104872)|0;do{if((n|0)==0){c[m>>2]=0;c[b+312>>2]=1}else{p=ew(s,102120)|0;r=b+296|0;c[r>>2]=(p|0)==0?101368:p;p=ew(s,100968)|0;q=b+300|0;y=(p|0)==0?100504:p;c[q>>2]=y;p=sc(c[r>>2]|0,y|0)|0;if((p|0)!=0){Fv(0,99976,(v=i,i=i+8|0,c[v>>2]=a[p]|0,v)|0)|0;i=v;c[q>>2]=213440}q=Lb(n|0)|0;c[Da>>2]=q;p=La(q|0,c[r>>2]|0)|0;do{if((p|0)==0){Ea=0}else{q=0;y=p;W=0;while(1){Fa=q+1|0;if((q|0)<(W|0)){Ga=W;Ha=c[m>>2]|0}else{Q=W+128|0;P=c[m>>2]|0;if((P|0)==0){Ia=kk(Q<<2)|0}else{Ia=mk(P,Q<<2)|0}P=Ia;c[m>>2]=P;Ga=Q;Ha=P}c[Ha+(Fa<<2)>>2]=y;P=La(0,c[r>>2]|0)|0;if((P|0)==0){break}else{q=Fa;y=P;W=Ga}}if((Fa|0)==0){Ea=0;break}W=mk(c[m>>2]|0,(Fa<<2)+8|0)|0;c[m>>2]=W;c[W>>2]=0;c[(c[m>>2]|0)+(q+2<<2)>>2]=0;Ea=Fa}}while(0);r=b+312|0;c[r>>2]=Ea;p=ew(s,104368)|0;if((p|0)==0){break}if((a[p]|0)==0){break}W=kk((c[r>>2]<<2)+8|0)|0;y=W;P=c[r>>2]|0;do{if((P|0)<1){Ja=66}else{Q=1;O=0;N=P;while(1){if(($h(b,Q,N,p)|0)<<24>>24==0){Ka=O}else{L=O+1|0;c[y+(L<<2)>>2]=Q;Ka=L}L=c[r>>2]|0;if((Q|0)<(L|0)){Q=Q+1|0;O=Ka;N=L}else{break}}if((Ka|0)==0){Ja=66;break}c[y>>2]=Ka;c[y+(Ka+1<<2)>>2]=(c[r>>2]|0)+1;Ma=y}}while(0);if((Ja|0)==66){Fv(0,103720,(v=i,i=i+8|0,c[v>>2]=p,v)|0)|0;i=v;eF(W);Ma=0}c[t>>2]=Ma}}while(0);Ma=c[44736]|0;c[44736]=Ma+1;if((Ma|0)==0){c[44734]=Lb(Ab(1,0)|0)|0;Ab(1,113248)|0}Ma=DA(b)|0;c:do{if((Ma|0)!=0){t=b+56|0;Ka=b|0;Ea=b+184|0;Fa=b+192|0;m=d+48|0;Ga=b+28|0;Ha=Ma;while(1){Ia=c[t>>2]|0;if((Ia|0)==0){c[Ha+20>>2]=0;c[Ha+24>>2]=0}else{c[Ha+20>>2]=c[Ia+8>>2];c[Ha+24>>2]=c[(c[t>>2]|0)+12>>2]}c[Ha+12>>2]=Ka;c[Ha+28>>2]=c[Ea>>2];c[Ha+620>>2]=24632;c[Ha+624>>2]=c[6156];if((c[(c[u>>2]|0)+8>>2]|0)==0){Ja=77;break}Na=Ha+52|0;Ia=OA(Ha,c[Na>>2]|0)|0;Da=Ha+56|0;c[Da>>2]=Ia;if((Ia|0)==24){n=Ha+152|0;c[n>>2]=c[n>>2]|520}else if((Ia|0)==21){n=Ha+152|0;c[n>>2]=c[n>>2]|1}else if((Ia|0)==999){Ja=83;break}else{Ia=ew(s,106184)|0;do{if((Ia|0)==0){Ja=94}else{n=a[Ia]|0;if((n<<24>>24|0)==101){if((Ya(Ia+1|0,105256)|0)==0){Oa=16;break}else{Ja=94;break}}else if((n<<24>>24|0)==110){if((Ya(Ia+1|0,105664)|0)==0){Oa=1;break}else{Ja=94;break}}else{Ja=94;break}}}while(0);if((Ja|0)==94){Ja=0;Oa=0}Ia=Ha+152|0;c[Ia>>2]=c[Ia>>2]|Oa}Ia=c[Fa>>2]|0;d:do{if((Ia|0)==0){c[44738]=0;Ja=103}else{do{if((c[Ia+152>>2]&32|0)!=0){if((Ya(c[Na>>2]|0,c[Ia+52>>2]|0)|0)!=0){break}n=c[44738]|0;if((n|0)==0){Ja=103;break d}c[n+8>>2]=Ha;c[Ha+36>>2]=c[(c[44738]|0)+36>>2];Ja=105;break d}}while(0);QA(Ia);c[Fa>>2]=0;c[Ga>>2]=0;c[44738]=0;Ja=103}}while(0);do{if((Ja|0)==103){Ja=0;if((PA(Ha)|0)!=0){break}c[Fa>>2]=Ha;Ja=105}}while(0);if((Ja|0)==105){Ja=0;c[Ha+8>>2]=0;c[Ha+104>>2]=25400;Ia=Ha|0;Y=c[Ia>>2]|0;do{if((a[Y+292|0]|0)==0){if((c[Da>>2]|0)==300){z=+h[(c[Ha+68>>2]|0)+8>>3];h[Ha+248>>3]=z;h[Ha+240>>3]=z;break}else{h[Ha+248>>3]=4.0;h[Ha+240>>3]=4.0;break}}else{n=Ha+240|0;y=Y+216|0;c[n>>2]=c[y>>2];c[n+4>>2]=c[y+4>>2];c[n+8>>2]=c[y+8>>2];c[n+12>>2]=c[y+12>>2]}}while(0);e:do{if((a[Y+293|0]|0)==0){switch(c[Da>>2]|0){case 2:case 3:case 4:case 22:case 21:case 30:{h[Ha+424>>3]=36.0;h[Ha+416>>3]=36.0;break e;break};case 300:{y=Ha+416|0;n=(c[Ha+84>>2]|0)+8|0;c[y>>2]=c[n>>2];c[y+4>>2]=c[n+4>>2];c[y+8>>2]=c[n+8>>2];c[y+12>>2]=c[n+12>>2];break e;break};default:{vF(Ha+416|0,0,16)|0;break e}}}else{n=Ha+416|0;y=Y+200|0;c[n>>2]=c[y>>2];c[n+4>>2]=c[y+4>>2];c[n+8>>2]=c[y+8>>2];c[n+12>>2]=c[y+12>>2]}}while(0);y=c[Y+192>>2]|0;z=+h[(c[(c[u>>2]|0)+8>>2]|0)+24>>3];f:do{if(z!=0.0){h[Ha+440>>3]=z;h[Ha+432>>3]=z}else{do{if((y|0)!=0){if((a[y+128|0]|0)==0){break}n=Ha+432|0;r=y+112|0;c[n>>2]=c[r>>2];c[n+4>>2]=c[r+4>>2];c[n+8>>2]=c[r+8>>2];c[n+12>>2]=c[r+12>>2];break f}}while(0);r=Ha+432|0;if((c[Da>>2]|0)==300){n=r;P=(c[Ha+84>>2]|0)+40|0;c[n>>2]=c[P>>2];c[n+4>>2]=c[P+4>>2];c[n+8>>2]=c[P+8>>2];c[n+12>>2]=c[P+12>>2];break}else{h[Ha+440>>3]=96.0;h[r>>3]=96.0;break}}}while(0);z=+h[Y+272>>3];aa=+h[Y+280>>3];ba=+h[Y+256>>3];ca=+h[Y+264>>3];za=+h[Ha+240>>3];Aa=ba-za;h[Ha+208>>3]=Aa;Ba=+h[Ha+248>>3];Ca=ca-Ba;h[Ha+216>>3]=Ca;va=z+za;h[Ha+224>>3]=va;za=aa+Ba;h[Ha+232>>3]=za;Ba=va-Aa;Aa=za-Ca;h[j>>3]=1.0;Da=c[(c[u>>2]|0)+8>>2]|0;Ca=+h[Da+64>>3];do{if(Ca>.001){za=+h[Da+72>>3];if(za<=.001){Pa=Aa;Qa=Ba;Ra=1.0;break}va=Ba==0.0?Ca:Ba;wa=Aa==0.0?za:Aa;if(!(Ca<va|za<wa)){if(!((a[Da+80|0]|0)!=0&Ca>va&za>wa)){Pa=wa;Qa=va;Ra=1.0;break}}xa=Ca/va;ya=za/wa;za=xa<ya?xa:ya;h[j>>3]=za;Pa=wa;Qa=va;Ra=za}else{Pa=Aa;Qa=Ba;Ra=1.0}}while(0);Ba=(z+ba)*.5;h[k>>3]=Ba;Aa=(aa+ca)*.5;h[l>>3]=Aa;Da=Ha+360|0;c[Da>>2]=c[Y+288>>2];h[f>>3]=Ra*Qa;h[g>>3]=Ra*Pa;y=ew(s,108712)|0;if((y|0)==0){Sa=Ba;Ta=Aa}else{r=dF((xF(y|0)|0)+1|0)|0;P=dF((xF(y|0)|0)+1|0)|0;n=ac(y|0,107704,(v=i,i=i+32|0,c[v>>2]=f,c[v+8>>2]=g,c[v+16>>2]=j,c[v+24>>2]=r,v)|0)|0;i=v;do{if((n|0)==4){N=Ax(c[m>>2]|0,r,0)|0;if((N|0)==0){break}O=N+8|0;h[k>>3]=+h[(c[O>>2]|0)+16>>3];h[l>>3]=+h[(c[O>>2]|0)+24>>3]}else{O=ac(y|0,107056,(v=i,i=i+40|0,c[v>>2]=f,c[v+8>>2]=g,c[v+16>>2]=j,c[v+24>>2]=r,c[v+32>>2]=P,v)|0)|0;i=v;if((O|0)!=4){ac(y|0,106592,(v=i,i=i+40|0,c[v>>2]=f,c[v+8>>2]=g,c[v+16>>2]=j,c[v+24>>2]=k,c[v+32>>2]=l,v)|0)|0;i=v;break}O=Ax(c[m>>2]|0,r,0)|0;if((O|0)==0){break}N=O+8|0;h[k>>3]=+h[(c[N>>2]|0)+16>>3];h[l>>3]=+h[(c[N>>2]|0)+24>>3]}}while(0);eF(r);eF(P);Sa=+h[k>>3];Ta=+h[l>>3]}y=Ha+368|0;h[y>>3]=+h[f>>3];n=Ha+376|0;h[n>>3]=+h[g>>3];Y=Ha+352|0;h[Y>>3]=+h[j>>3];h[Ha+336>>3]=Sa;h[Ha+344>>3]=Ta;N=c[Ia>>2]|0;ca=+h[y>>3];aa=+h[n>>3];n=(c[Da>>2]|0)==0;ba=n?aa:ca;z=n?ca:aa;aa=+h[Ha+416>>3];ca=+h[Ha+424>>3];do{if((a[N+294|0]|0)==0){Ja=149}else{if((c[Ha+152>>2]&32|0)==0){Ja=149;break}Aa=+h[N+232>>3]-aa*2.0;Ba=+h[N+240>>3]-ca*2.0;do{if(Aa<1.0e-4){c[Ha+164>>2]=1;Ua=1}else{n=~~(z/Aa);y=Ha+164|0;c[y>>2]=n;if(z-Aa*+(n|0)<=1.0e-4){Ua=n;break}O=n+1|0;c[y>>2]=O;Ua=O}}while(0);do{if(Ba<1.0e-4){c[Ha+168>>2]=1;Va=1}else{O=~~(ba/Ba);y=Ha+168|0;c[y>>2]=O;if(ba-Ba*+(O|0)<=1.0e-4){Va=O;break}n=O+1|0;c[y>>2]=n;Va=n}}while(0);c[Ha+204>>2]=da(Va,Ua)|0;Wa=z<Aa?z:Aa;Xa=ba<Ba?ba:Ba;Za=Aa;_a=Ba;$a=Va;ab=Ua}}while(0);do{if((Ja|0)==149){Ja=0;do{if((c[Ha+68>>2]|0)==0){bb=0.0;cb=0.0}else{Ia=c[Ha+84>>2]|0;Ca=+h[Ia+24>>3]-aa*2.0;za=Ca<0.0?0.0:Ca;Ca=+h[Ia+32>>3]-ca*2.0;if(Ca>=0.0){bb=za;cb=Ca;break}bb=za;cb=0.0}}while(0);c[Ha+204>>2]=1;c[Ha+168>>2]=1;c[Ha+164>>2]=1;Ba=bb<z?z:bb;if(cb>=ba){Wa=z;Xa=ba;Za=Ba;_a=cb;$a=1;ab=1;break}Wa=z;Xa=ba;Za=Ba;_a=ba;$a=1;ab=1}}while(0);Ia=Ha+432|0;ba=(aa*2.0+Za)*+h[Ia>>3]/72.0;if(ba<0.0){db=ba+-.5}else{db=ba+.5}c[Ha+448>>2]=~~db;P=Ha+440|0;ba=(ca*2.0+_a)*+h[P>>3]/72.0;if(ba<0.0){eb=ba+-.5}else{eb=ba+.5}c[Ha+452>>2]=~~eb;r=Ha+188|0;n=Ha+180|0;y=Ha+176|0;O=Ha+172|0;Q=N+196|0;vF(O|0,0,24)|0;q=a[c[Q>>2]|0]|0;if((q|0)==66){fb=0;gb=0;hb=1;ib=0}else if((q|0)==76){fb=0;gb=1;hb=0;ib=0}else if((q|0)==82){c[O>>2]=ab-1;fb=0;gb=-1;hb=0;ib=0}else if((q|0)==84){c[y>>2]=$a-1;fb=0;gb=0;hb=-1;ib=0}else{fb=0;gb=0;hb=0;ib=0}q=n;c[q>>2]=gb|ib;c[q+4>>2]=fb|hb;n=a[(c[Q>>2]|0)+1|0]|0;L=gb;M=hb;if((n|0)==66){jb=0;kb=0;lb=1;mb=0}else if((n|0)==76){jb=0;kb=1;lb=0;mb=0}else if((n|0)==82){c[O>>2]=ab-1;jb=0;kb=-1;lb=0;mb=0}else if((n|0)==84){c[y>>2]=$a-1;jb=0;kb=0;lb=-1;mb=0}else{jb=0;kb=0;lb=0;mb=0}y=r;c[y>>2]=kb|mb;c[y+4>>2]=jb|lb;r=kb+L|0;if((((r|0)>-1?r:-r|0)|0)==1){r=lb+M|0;if((((r|0)>-1?r:-r|0)|0)!=1){Ja=172}}else{Ja=172}if((Ja|0)==172){Ja=0;c[q>>2]=0;c[q+4>>2]=1;c[y>>2]=1;c[y+4>>2]=0;Fv(0,109544,(v=i,i=i+8|0,c[v>>2]=c[Q>>2],v)|0)|0;i=v}do{if((a[(c[(c[u>>2]|0)+8>>2]|0)+82|0]|0)==0){nb=0.0;ob=0.0}else{if(Za>Wa){pb=(Za-Wa)*.5}else{pb=0.0}if(_a<=Xa){nb=pb;ob=0.0;break}nb=pb;ob=(_a-Xa)*.5}}while(0);N=(c[Da>>2]|0)==0;ba=N?Xa:Wa;z=N?Wa:Xa;Ba=(N?aa:ca)+(N?nb:ob);h[Ha+384>>3]=Ba;Aa=(N?ca:aa)+(N?ob:nb);h[Ha+392>>3]=Aa;za=z+Ba;h[Ha+400>>3]=za;Ca=ba+Aa;h[Ha+408>>3]=Ca;va=+h[Y>>3];h[Ha+320>>3]=z/va;h[Ha+328>>3]=ba/va;va=+h[Ia>>3];ba=Ba*va/72.0;if(ba<0.0){qb=ba+-.5}else{qb=ba+.5}Q=~~qb;y=Ha+456|0;c[y>>2]=Q;ba=+h[P>>3];Ba=Aa*ba/72.0;if(Ba<0.0){rb=Ba+-.5}else{rb=Ba+.5}q=~~rb;c[Ha+460>>2]=q;Ba=za*va/72.0;if(Ba<0.0){sb=Ba+-.5}else{sb=Ba+.5}r=~~sb;M=Ha+464|0;c[M>>2]=r;Ba=Ca*ba/72.0;if(Ba<0.0){tb=Ba+-.5}else{tb=Ba+.5}L=~~tb;c[Ha+468>>2]=L;if(!N){N=y;c[N>>2]=q;c[N+4>>2]=Q;Q=M;c[Q>>2]=L;c[Q+4>>2]=r}if((c[Ha+152>>2]&128|0)==0){Rh(Ha,d)}c[44738]=Ha}Ha=EA(b)|0;if((Ha|0)==0){break c}}if((Ja|0)==77){Fv(1,111648,(v=i,i=i+1|0,i=i+7&-8,c[v>>2]=0,v)|0)|0;i=v;Ha=c[44736]|0;do{if((Ha|0)>0){m=Ha-1|0;c[44736]=m;if((m|0)!=0){break}Ab(1,c[44734]|0)|0;eF(c[44734]|0)}}while(0);if((a[213992]|0)==0){w=-1;i=e;return w|0}Ha=c[o>>2]|0;m=$w(s)|0;Ba=+zm();gc(Ha|0,112248,(v=i,i=i+16|0,c[v>>2]=m,h[v+8>>3]=Ba,v)|0)|0;i=v;w=-1;i=e;return w|0}else if((Ja|0)==83){Fv(1,111e3,(v=i,i=i+8|0,c[v>>2]=c[Na>>2],v)|0)|0;i=v;m=c[44736]|0;do{if((m|0)>0){Ha=m-1|0;c[44736]=Ha;if((Ha|0)!=0){break}Ab(1,c[44734]|0)|0;eF(c[44734]|0)}}while(0);if((a[213992]|0)==0){w=-1;i=e;return w|0}m=c[o>>2]|0;Ha=$w(s)|0;Ba=+zm();gc(m|0,112248,(v=i,i=i+16|0,c[v>>2]=Ha,h[v+8>>3]=Ba,v)|0)|0;i=v;w=-1;i=e;return w|0}}}while(0);Na=c[44736]|0;do{if((Na|0)>0){Ja=Na-1|0;c[44736]=Ja;if((Ja|0)!=0){break}Ab(1,c[44734]|0)|0;eF(c[44734]|0)}}while(0);if((a[213992]|0)==0){w=0;i=e;return w|0}Na=c[o>>2]|0;Ja=$w(s)|0;tb=+zm();gc(Na|0,112248,(v=i,i=i+16|0,c[v>>2]=Ja,h[v+8>>3]=tb,v)|0)|0;i=v;w=0;i=e;return w|0}function $h(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;g=i;i=i+160|0;h=g+128|0;j=g+136|0;k=g+144|0;c[h>>2]=0;c[j>>2]=0;Iv(k,128,g|0);Lv(k,f)|0;f=k+4|0;l=c[f>>2]|0;if(l>>>0<(c[k+8>>2]|0)>>>0){m=l}else{Jv(k,1)|0;m=c[f>>2]|0}a[m]=0;m=c[k>>2]|0;c[f>>2]=m;f=b+300|0;l=b+296|0;n=b+308|0;o=b+312|0;b=m;while(1){m=ec(b|0,c[f>>2]|0,h|0)|0;if((m|0)==0){p=0;q=43;break}r=ec(m|0,c[l>>2]|0,j|0)|0;m=(r|0)!=0;if(m){s=ec(0,c[l>>2]|0,j|0)|0}else{s=0}t=((s|0)!=0)+(m&1)|0;if((t|0)==1){m=a[r]|0;if((m<<24>>24|0)==0){q=12}else if((m<<24>>24|0)==97){if((Ya(r|0,103064)|0)==0){u=d}else{v=97;w=r;q=10}}else{v=m;w=r;q=10}a:do{if((q|0)==10){while(1){q=0;x=w+1|0;if(((v&255)-48|0)>>>0>=10>>>0){break}y=a[x]|0;if(y<<24>>24==0){q=12;break a}else{v=y;w=x;q=10}}x=c[n>>2]|0;if((x|0)==0){u=-1;break}y=c[o>>2]|0;if((y|0)<1){u=-1;break}else{z=1}while(1){A=c[x+(z<<2)>>2]|0;if(m<<24>>24==(a[A]|0)){if((Ya(r|0,A|0)|0)==0){u=z;break a}}if((z|0)<(y|0)){z=z+1|0}else{u=-1;break}}}}while(0);if((q|0)==12){q=0;u=Rb(r|0)|0}B=(u|0)==(d|0)}else if((t|0)==2){m=a[r]|0;if((m<<24>>24|0)==97){if((Ya(r|0,103064)|0)==0){C=0}else{D=97;E=r;q=21}}else if((m<<24>>24|0)==0){q=23}else{D=m;E=r;q=21}b:do{if((q|0)==21){while(1){q=0;y=E+1|0;if(((D&255)-48|0)>>>0>=10>>>0){break}x=a[y]|0;if(x<<24>>24==0){q=23;break b}else{D=x;E=y;q=21}}y=c[n>>2]|0;if((y|0)==0){C=-1;break}x=c[o>>2]|0;if((x|0)<1){C=-1;break}else{F=1}while(1){A=c[y+(F<<2)>>2]|0;if(m<<24>>24==(a[A]|0)){if((Ya(r|0,A|0)|0)==0){C=F;break b}}if((F|0)<(x|0)){F=F+1|0}else{C=-1;break}}}}while(0);if((q|0)==23){q=0;C=Rb(r|0)|0}m=a[s]|0;if((m<<24>>24|0)==97){if((Ya(s|0,103064)|0)==0){G=e}else{H=97;I=s;q=31}}else if((m<<24>>24|0)==0){q=33}else{H=m;I=s;q=31}c:do{if((q|0)==31){while(1){q=0;t=I+1|0;if(((H&255)-48|0)>>>0>=10>>>0){break}x=a[t]|0;if(x<<24>>24==0){q=33;break c}else{H=x;I=t;q=31}}t=c[n>>2]|0;if((t|0)==0){G=-1;break}x=c[o>>2]|0;if((x|0)<1){G=-1;break}else{J=1}while(1){y=c[t+(J<<2)>>2]|0;if(m<<24>>24==(a[y]|0)){if((Ya(s|0,y|0)|0)==0){G=J;break c}}if((J|0)<(x|0)){J=J+1|0}else{G=-1;break}}}}while(0);if((q|0)==33){q=0;G=Rb(s|0)|0}if((G&C|0)<=-1){b=0;continue}m=(C|0)>(G|0);if(((m?G:C)|0)>(d|0)){b=0;continue}B=((m?C:G)|0)>=(d|0)}else{b=0;continue}if(B){p=B&1;q=43;break}else{b=0}}if((q|0)==43){Mv(k);i=g;return p|0}return 0}function ai(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0.0,j=0.0,k=0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0,u=0,v=0,w=0,x=0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0;d=i;e=b;b=i;i=i+48|0;tF(b,e,48)|0;e=c[b+4>>2]|0;if((e|0)<=0){cc(93584,102832,3865,171016)}if(((e|0)%3|0|0)!=1){cc(93080,102832,3866,171016)}f=c[b>>2]|0;g=+h[f>>3];j=+h[f+8>>3];if((e|0)>1){k=1;l=j;m=g;n=j;o=g}else{p=j;q=g;r=j;s=g;t=a|0;h[t>>3]=q;u=a+8|0;h[u>>3]=p;v=a+16|0;h[v>>3]=s;w=a+24|0;h[w>>3]=r;i=d;return}while(1){b=k+1|0;x=k+2|0;g=(+h[f+(k<<4)>>3]+ +h[f+(b<<4)>>3])*.5;j=(+h[f+(k<<4)+8>>3]+ +h[f+(b<<4)+8>>3])*.5;y=m<g?m:g;z=l<j?l:j;A=o>g?o:g;g=n>j?n:j;j=+h[f+(x<<4)>>3];B=+h[f+(x<<4)+8>>3];C=y<j?y:j;y=z<B?z:B;z=A>j?A:j;j=g>B?g:B;x=k+3|0;if((x|0)<(e|0)){k=x;l=y;m=C;n=j;o=z}else{p=y;q=C;r=j;s=z;break}}t=a|0;h[t>>3]=q;u=a+8|0;h[u>>3]=p;v=a+16|0;h[v>>3]=s;w=a+24|0;h[w>>3]=r;i=d;return}function bi(a,d,e,f,g,i,j){a=a|0;d=+d;e=+e;f=f|0;g=g|0;i=i|0;j=j|0;var k=0;j=c[a+16>>2]|0;if(f<<24>>24==0){k=c[j+208>>2]|0}else{k=g}do{if(i<<24>>24==0){if(!((k|0)==0&(b[j+260>>1]&1)==0)){break}return}}while(0);k=c[a+152>>2]|0;if((k&4259840|0)==0){return}i=(k&131072|0)!=0;g=j+264|0;if(i){c[g>>2]=0;c[j+268>>2]=2}else{c[g>>2]=2;c[j+268>>2]=4}g=j+272|0;eF(c[g>>2]|0);f=jk(c[j+268>>2]<<4)|0;j=f;c[g>>2]=j;h[f>>3]=d+-3.0;h[f+8>>3]=e+-3.0;h[f+16>>3]=d+3.0;h[f+24>>3]=e+3.0;if((k&8192|0)==0){RA(a,j,j,2)|0}if(i){return}qi(j);return}function ci(b,d,e,f,g,j,k,l,m){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;j=j|0;k=k|0;l=l|0;m=m|0;var n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0.0,y=0.0,z=0.0;n=i;i=i+64|0;o=n|0;p=n+48|0;q=c[b+152>>2]|0;if((d|0)==0){i=n;return}if((a[d+81|0]|0)==0){i=n;return}if((l|0)==0){r=0}else{s=jk((xF(l|0)|0)+11|0)|0;if((e|0)==7){t=89496}else if((e|0)==11){t=90024}else if((e|0)==6){t=89080}else{cc(88624,102832,2642,170728)}nb(s|0,88176,(u=i,i=i+16|0,c[u>>2]=l,c[u+8>>2]=t,u)|0)|0;i=u;r=s}s=b+16|0;u=(c[s>>2]|0)+12|0;t=c[u>>2]|0;c[u>>2]=e;u=(g|0)==0&(f|0)==0;do{if(!u){if((q&4|0)!=0){break}di(b,d);gB(b,g,j,k,r)}}while(0);ek(b,e,d);a:do{if((m|0)!=0){e=p;f=c[d>>2]|0;l=a[f]|0;if(l<<24>>24==0){break}else{v=f;w=l}while(1){l=v+1|0;if((Qa(w&255|0)|0)==0){break}f=a[l]|0;if(f<<24>>24==0){break a}else{v=l;w=f}}if((a[v]|0)==0){break}x=+h[d+24>>3];f=d+56|0;y=x*.5+ +h[f>>3];z=+h[d+64>>3]- +h[d+32>>3]*.5;h[o>>3]=y;h[o+8>>3]=z;h[o+16>>3]=y-x;h[o+24>>3]=z;Wm(p,m,f);f=o+32|0;c[f>>2]=c[e>>2];c[f+4>>2]=c[e+4>>2];c[f+8>>2]=c[e+8>>2];c[f+12>>2]=c[e+12>>2];pB(b,c[(c[b>>2]|0)+336>>2]|0);lB(b,c[d+8>>2]|0);uB(b,o|0,3)}}while(0);if(!u){if((q&4|0)!=0){di(b,d);gB(b,g,j,k,r)}hB(b)}if((r|0)!=0){eF(r)}c[(c[s>>2]|0)+12>>2]=t;i=n;return}function di(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,i=0,j=0,k=0,l=0;d=c[a+16>>2]|0;e=c[a+152>>2]|0;if((e&4259840|0)==0){return}f=(e&131072|0)!=0;g=d+264|0;if(f){c[g>>2]=0;c[d+268>>2]=2}else{c[g>>2]=2;c[d+268>>2]=4}g=d+272|0;eF(c[g>>2]|0);i=jk(c[d+268>>2]<<4)|0;d=i;c[g>>2]=d;g=b+56|0;j=b+24|0;h[i>>3]=+h[g>>3]- +h[j>>3]*.5;k=b+64|0;l=b+32|0;h[i+8>>3]=+h[k>>3]- +h[l>>3]*.5;h[i+16>>3]=+h[g>>3]+ +h[j>>3]*.5;h[i+24>>3]=+h[k>>3]+ +h[l>>3]*.5;if((e&8192|0)==0){RA(a,d,d,2)|0}if(f){return}qi(d);return}function ei(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;e=1;f=b;while(1){b=a[f]|0;if((b<<24>>24|0)==0){break}else if((b<<24>>24|0)==58){g=e+1|0}else{g=e}e=g;f=f+1|0}f=da((xF(d|0)|0)+1|0,e)|0;if((c[45192]|0)<(f|0)){g=f+10|0;c[45192]=g;c[45194]=gF(c[45194]|0,g)|0}zF(c[45194]|0,d|0)|0;g=e-1|0;e=c[45194]|0;if((g|0)==0){h=e;return h|0}else{i=g;j=e}while(1){e=j+(xF(j|0)|0)|0;z=58;a[e]=z;z=z>>8;a[e+1|0]=z;AF(c[45194]|0,d|0)|0;e=i-1|0;g=c[45194]|0;if((e|0)==0){h=g;break}else{i=e;j=g}}return h|0}function fi(a,b,c){a=+a;b=+b;c=+c;return+((1.0-a/b)*c*.5)}function gi(a,b,c){a=+a;b=+b;c=+c;return+(a/b*c*.5)}function hi(a,b,c){a=+a;b=+b;c=+c;var d=0.0,e=0.0;d=a/b;if(d>.5){e=1.0-d}else{e=d}return+(e*c)}function ii(a,b,c){a=+a;b=+b;c=+c;return+(c*.5)}function ji(a,b,d,e){a=a|0;b=+b;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0.0,p=0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0,y=0.0,z=0,A=0.0,B=0,C=0.0,D=0;f=i;i=i+32|0;g=f+16|0;j=c[a+4>>2]|0;k=j-1|0;l=(k|0)/3|0;if((j-4|0)>>>0<3>>>0){c[d+4>>2]=4;j=d|0;c[j>>2]=jk(64)|0;c[e+4>>2]=4;m=jk(64)|0;c[e>>2]=m;Qm(f|0,c[a>>2]|0,3,b,c[j>>2]|0,m);i=f;return}m=jk(l<<3)|0;j=m;n=a|0;a=(k|0)>2;a:do{if(a){o=0.0;k=c[n>>2]|0;p=0;while(1){q=+h[k+16>>3];r=+h[k>>3]-q;s=+h[k+24>>3];t=+h[k+8>>3]-s;u=+T(r*r+t*t);t=+h[k+32>>3];r=q-t;q=+h[k+40>>3];v=s-q;s=u+ +T(r*r+v*v);v=t- +h[k+48>>3];t=q- +h[k+56>>3];q=s+ +T(v*v+t*t);h[j+(p<<3)>>3]=q;w=o+q;x=p+1|0;if((x|0)<(l|0)){o=w;k=k+48|0;p=x}else{break}}o=b*w;if(a){y=0.0;z=0}else{A=0.0;B=0;C=o;break}while(1){q=y+ +h[j+(z<<3)>>3];p=z+1|0;if(q>=o){A=q;B=z;C=o;break a}if((p|0)<(l|0)){y=q;z=p}else{A=q;B=p;C=o;break}}}else{A=0.0;B=0;C=b*0.0}}while(0);z=B*3|0;a=z+4|0;p=d+4|0;c[p>>2]=a;k=d|0;c[k>>2]=jk(a<<4)|0;a=((l-B|0)*3|0)+1|0;l=e+4|0;c[l>>2]=a;d=e|0;c[d>>2]=jk(a<<4)|0;if((c[p>>2]|0)>0){a=0;while(1){e=(c[k>>2]|0)+(a<<4)|0;x=(c[n>>2]|0)+(a<<4)|0;c[e>>2]=c[x>>2];c[e+4>>2]=c[x+4>>2];c[e+8>>2]=c[x+8>>2];c[e+12>>2]=c[x+12>>2];x=a+1|0;if((x|0)<(c[p>>2]|0)){a=x}else{break}}D=a-3|0}else{D=-4}b:do{if((c[l>>2]|0)>0){a=D;p=0;while(1){x=(c[d>>2]|0)+(p<<4)|0;e=(c[n>>2]|0)+(a<<4)|0;c[x>>2]=c[e>>2];c[x+4>>2]=c[e+4>>2];c[x+8>>2]=c[e+8>>2];c[x+12>>2]=c[e+12>>2];e=p+1|0;if((e|0)>=(c[l>>2]|0)){break b}a=a+1|0;p=e}}}while(0);b=+h[j+(B<<3)>>3];Qm(g,(c[n>>2]|0)+(z<<4)|0,3,(C-(A-b))/b,(c[k>>2]|0)+(z<<4)|0,c[d>>2]|0);eF(m);i=f;return}function ki(a,b){a=a|0;b=b|0;var d=0,e=0,f=0.0,g=0,j=0,k=0,l=0.0;d=i;i=i+144|0;e=a+48|0;f=+ui(a,e,a+16|0);if(!(f<4.0&+ui(a,e,a+32|0)<4.0)){g=d|0;j=d+64|0;Qm(d+128|0,a,3,.5,g,j);k=ki(j,ki(g,b)|0)|0;i=d;return k|0}g=b+16|0;if((c[g>>2]|0)==1){c[g>>2]=0;j=b;b=a;c[j>>2]=c[b>>2];c[j+4>>2]=c[b+4>>2];c[j+8>>2]=c[b+8>>2];c[j+12>>2]=c[b+12>>2]}f=+h[e>>3];l=+h[a+56>>3];a=kk(24)|0;e=a;c[a+16>>2]=0;h[a>>3]=f;h[a+8>>3]=l;c[g>>2]=e;k=e;i=d;return k|0}function li(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0;f=b+156|0;if((c[f>>2]|0)<2){g=1;return g|0}h=Hm(e|0,c[53612]|0,213440)|0;i=b|0;j=b+160|0;if(($h(c[i>>2]|0,c[j>>2]|0,c[f>>2]|0,h)|0)<<24>>24!=0){g=1;return g|0}if((a[h]|0)!=0){g=0;return g|0}if((rw(d,e)|0)==0){g=1;return g|0}h=rw(d,e)|0;if((h|0)==0){g=0;return g|0}else{k=h}while(1){h=Hm(k|0,c[53776]|0,213440)|0;if((a[h]|0)==0){g=1;l=9;break}if(($h(c[i>>2]|0,c[j>>2]|0,c[f>>2]|0,h)|0)<<24>>24!=0){g=1;l=9;break}h=sw(d,k,e)|0;if((h|0)==0){g=0;l=9;break}else{k=h}}if((l|0)==9){return g|0}return 0}function mi(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;f=i;i=i+144|0;g=f+128|0;h=ew(e,83344)|0;j=ew(e,166968)|0;k=ew(e,78880)|0;Iv(g,128,f|0);if((d|0)==0){l=0}else{l=c[d>>2]|0}if((h|0)==0){m=5}else{if((a[h]|0)==0){m=5}else{n=h}}if((m|0)==5){n=ew(e,82904)|0}Hh(b,l,n,j,k,Ih(b,e,g)|0,e)|0;Mv(g);i=f;return}function ni(a,b,c){a=a|0;b=b|0;c=c|0;eF(b);return}function oi(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=d+8|0;d=c[e>>2]|0;if((c[d+172>>2]|0)<1){return}else{f=1;g=d}while(1){d=c[(c[g+176>>2]|0)+(f<<2)>>2]|0;oi(b,d);h=d|0;d=ew(h,123768)|0;do{if((d|0)!=0){if((a[d]|0)==0){break}lB(b,d)}}while(0);d=ew(h,121832)|0;do{if((d|0)!=0){if((a[d]|0)==0){break}lB(b,d)}}while(0);d=ew(h,120224)|0;do{if((d|0)!=0){if((a[d]|0)==0){break}lB(b,d)}}while(0);d=ew(h,121048)|0;do{if((d|0)!=0){if((a[d]|0)==0){break}nB(b,d)}}while(0);d=ew(h,160752)|0;do{if((d|0)!=0){if((a[d]|0)==0){break}lB(b,d)}}while(0);d=c[e>>2]|0;if((f|0)<(c[d+172>>2]|0)){f=f+1|0;g=d}else{break}}return}function pi(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0.0,j=0.0,k=0,l=0.0,m=0,n=0.0,o=0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0;e=i;f=a;a=i;i=i+16|0;c[a>>2]=c[f>>2];c[a+4>>2]=c[f+4>>2];c[a+8>>2]=c[f+8>>2];c[a+12>>2]=c[f+12>>2];f=b;b=i;i=i+16|0;c[b>>2]=c[f>>2];c[b+4>>2]=c[f+4>>2];c[b+8>>2]=c[f+8>>2];c[b+12>>2]=c[f+12>>2];f=d;d=i;i=i+32|0;tF(d,f,32)|0;g=+h[a>>3];j=+h[d>>3];f=g<j;do{if(f){k=0}else{if(g>+h[d+16>>3]){k=0;break}l=+h[a+8>>3];if(l<+h[d+8>>3]){k=0;break}k=l<=+h[d+24>>3]|0}}while(0);l=+h[b>>3];do{if(l<j){m=0}else{if(l>+h[d+16>>3]){m=0;break}n=+h[b+8>>3];if(n<+h[d+8>>3]){m=0;break}m=n<=+h[d+24>>3]|0}}while(0);if((k|0)!=(m|0)){o=0;i=e;return o|0}if((k|0)!=0){o=1;i=e;return o|0}n=+h[a+8>>3];do{if(g==l){p=+h[d+8>>3];if(f|n>=p^+h[b+8>>3]>=p^1){break}if(g>+h[d+16>>3]){break}else{o=0}i=e;return o|0}else{p=+h[b+8>>3];if(n==p){if(!(g>=j^l>=j)){break}if(n<+h[d+8>>3]){break}if(n>+h[d+24>>3]){break}else{o=0}i=e;return o|0}q=(p-n)/(l-g);a=g<l;r=a?g:l;s=a?l:g;t=n+q*(j-g);u=+h[d+8>>3];do{if(!(j<r|j>s|t<u)){if(t>+h[d+24>>3]){break}else{o=0}i=e;return o|0}}while(0);v=+h[d+16>>3];w=t+q*(v-j);do{if(w>=u){if(w>+h[d+24>>3]|v<r|v>s){break}else{o=0}i=e;return o|0}}while(0);a=n<p;s=a?n:p;r=a?p:n;w=g+(u-n)/q;do{if(w>=j){if(w>v|u<s|u>r){break}else{o=0}i=e;return o|0}}while(0);p=+h[d+24>>3];t=w+(p-u)/q;if(t<j){break}if(t>v|p<s|p>r){break}else{o=0}i=e;return o|0}}while(0);o=-1;i=e;return o|0}function qi(a){a=a|0;var b=0,c=0.0;b=a+16|0;c=+h[b>>3];h[a+32>>3]=c;h[a+48>>3]=c;h[a+40>>3]=+h[a+24>>3];h[a+56>>3]=+h[a+8>>3];h[b>>3]=+h[a>>3];return}function ri(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0.0,j=0,k=0.0,l=0,m=0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0;e=i;f=b;b=i;i=i+16|0;c[b>>2]=c[f>>2];c[b+4>>2]=c[f+4>>2];c[b+8>>2]=c[f+8>>2];c[b+12>>2]=c[f+12>>2];f=b|0;g=+h[f>>3];j=b+8|0;k=+h[j>>3];l=d;while(1){if((l|0)==0){break}else if((l|0)==270){m=5;break}else if((l|0)==90){m=3;break}else if((l|0)==180){m=4;break}if((l|0)<0){m=7;break}if((l|0)<=360){m=10;break}l=(l|0)%360|0}if((m|0)==3){h[f>>3]=k;h[j>>3]=-0.0-g}else if((m|0)==4){h[f>>3]=g;h[j>>3]=-0.0-k}else if((m|0)==5){h[f>>3]=k;h[j>>3]=g}else if((m|0)==7){si(a,b,-l|0);i=e;return}else if((m|0)==10){if((c[43782]|0)==(l|0)){n=+h[1491];o=+h[1490]}else{p=+(l|0)/6.283185307179586;q=+W(p);h[1490]=q;r=+V(p);h[1491]=r;c[43782]=l;n=r;o=q}h[a>>3]=g*n-k*o;h[a+8>>3]=g*o+k*n;i=e;return}l=a;a=b;c[l>>2]=c[a>>2];c[l+4>>2]=c[a+4>>2];c[l+8>>2]=c[a+8>>2];c[l+12>>2]=c[a+12>>2];i=e;return}function si(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0.0,j=0,k=0.0,l=0,m=0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0;e=i;f=b;b=i;i=i+16|0;c[b>>2]=c[f>>2];c[b+4>>2]=c[f+4>>2];c[b+8>>2]=c[f+8>>2];c[b+12>>2]=c[f+12>>2];f=b|0;g=+h[f>>3];j=b+8|0;k=+h[j>>3];l=d;while(1){if((l|0)==90){m=3;break}else if((l|0)==0){break}else if((l|0)==270){m=5;break}else if((l|0)==180){m=4;break}if((l|0)<0){m=7;break}if((l|0)<=360){m=10;break}l=(l|0)%360|0}if((m|0)==3){h[f>>3]=-0.0-k;h[j>>3]=g}else if((m|0)==4){h[f>>3]=g;h[j>>3]=-0.0-k}else if((m|0)==5){h[f>>3]=k;h[j>>3]=g}else if((m|0)==7){ri(a,b,-l|0);i=e;return}else if((m|0)==10){m=360-l|0;if((c[43782]|0)==(m|0)){n=+h[1491];o=+h[1490]}else{p=+(m|0)/6.283185307179586;q=+W(p);h[1490]=q;r=+V(p);h[1491]=r;c[43782]=m;n=r;o=q}h[a>>3]=g*n-k*o;h[a+8>>3]=g*o+k*n;i=e;return}m=a;a=b;c[m>>2]=c[a>>2];c[m+4>>2]=c[a+4>>2];c[m+8>>2]=c[a+8>>2];c[m+12>>2]=c[a+12>>2];i=e;return}function ti(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0.0,j=0.0,k=0.0,l=0.0,m=0.0;e=i;f=b;b=i;i=i+32|0;tF(b,f,32)|0;f=d;d=i;i=i+16|0;c[d>>2]=c[f>>2];c[d+4>>2]=c[f+4>>2];c[d+8>>2]=c[f+8>>2];c[d+12>>2]=c[f+12>>2];g=+h[d>>3];j=+h[d+8>>3];k=+h[b>>3]+j;l=+h[b+24>>3]+g;m=+h[b+16>>3]+j;h[a>>3]=+h[b+8>>3]+g;h[a+8>>3]=k;h[a+16>>3]=l;h[a+24>>3]=m;i=e;return}function ui(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0;e=i;f=a;a=i;i=i+16|0;c[a>>2]=c[f>>2];c[a+4>>2]=c[f+4>>2];c[a+8>>2]=c[f+8>>2];c[a+12>>2]=c[f+12>>2];f=b;b=i;i=i+16|0;c[b>>2]=c[f>>2];c[b+4>>2]=c[f+4>>2];c[b+8>>2]=c[f+8>>2];c[b+12>>2]=c[f+12>>2];f=d;d=i;i=i+16|0;c[d>>2]=c[f>>2];c[d+4>>2]=c[f+4>>2];c[d+8>>2]=c[f+8>>2];c[d+12>>2]=c[f+12>>2];g=+h[a>>3];j=+h[b>>3]-g;k=+h[a+8>>3];l=+h[b+8>>3]-k;m=j*(+h[d+8>>3]-k)-l*(+h[d>>3]-g);g=m*m;if(g<1.0e-10){n=0.0;i=e;return+n}n=g/(j*j+l*l);i=e;return+n}function vi(b){b=b|0;var d=0,e=0,f=0;d=i;if((a[174897]|0)!=0){i=d;return}a[174897]=1;e=zd(c[43716]|0)|0;Fv(1,120352,(f=i,i=i+16|0,c[f>>2]=b,c[f+8>>2]=e,f)|0)|0;i=f;wi();i=d;return}function wi(){var b=0,d=0,e=0,f=0,g=0;b=i;d=c[43719]|0;c[d+4>>2]=c[d>>2];d=c[43728]|0;if((d|0)>0){Kv(c[43719]|0,c[43726]|0,d)|0}Kv(c[43719]|0,c[43725]|0,c[43727]|0)|0;d=c[43719]|0;e=c[d+4>>2]|0;if(e>>>0<(c[d+8>>2]|0)>>>0){f=d;g=e}else{Jv(d,1)|0;d=c[43719]|0;f=d;g=c[d+4>>2]|0}c[f+4>>2]=g+1;a[g]=0;g=c[43719]|0;f=c[g>>2]|0;c[g+4>>2]=f;Fv(3,79472,(g=i,i=i+8|0,c[g>>2]=f,g)|0)|0;i=g;i=b;return}function xi(b,e,f){b=b|0;e=e|0;f=f|0;c[43719]=e;Iv(174880,128,0);c[43717]=b;a[174899]=0;a[174896]=0;a[174897]=0;c[43727]=0;c[43728]=0;a[174898]=1;b=f+52|0;f=md(Tj(d[(c[(c[b>>2]|0)+8>>2]|0)+115|0]|0)|0)|0;c[43716]=f;rd(f,c[(c[(c[b>>2]|0)+8>>2]|0)+136>>2]|0);sd(c[43716]|0,98,8);td(c[43716]|0,70);return 0}function yi(e,f,g){e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;j=i;i=i+264|0;k=j|0;l=j+8|0;m=j+16|0;n=j+24|0;o=j+56|0;p=j+88|0;q=j+120|0;r=j+152|0;s=j+184|0;t=j+216|0;u=j+248|0;v=j+256|0;if((pm(f,97048)|0)==0){w=jk(120)|0;c[w+100>>2]=-1;a[w+88|0]=-1;x=v;y=c[g>>2]|0;if((y|0)!=0){z=v|0;v=g;A=y;while(1){y=v+8|0;B=c[v+4>>2]|0;c[z>>2]=A;C=vb(x|0,3264,21,8,28)|0;if((C|0)==0){Fv(0,120960,(D=i,i=i+16|0,c[D>>2]=A,c[D+8>>2]=82896,D)|0)|0;i=D;E=1}else{F=Oc[c[C+4>>2]&255](w,B)|0;E=(d[174896]|0|F)&255}a[174896]=E;F=c[y>>2]|0;if((F|0)==0){break}else{v=y;A=F}}}c[44692]=w;a[174898]=0;c[43718]=285;i=j;return}do{if((pm(f,91560)|0)!=0){if((pm(f,86296)|0)==0){break}if((pm(f,81584)|0)==0){a[174898]=1;w=jk(104)|0;b[w+80>>1]=1;b[w+82>>1]=1;A=u;v=c[g>>2]|0;if((v|0)!=0){E=u|0;x=g;z=v;while(1){v=x+8|0;F=c[x+4>>2]|0;c[E>>2]=z;y=vb(A|0,70864,21,8,28)|0;if((y|0)==0){Fv(0,120960,(D=i,i=i+16|0,c[D>>2]=z,c[D+8>>2]=109488,D)|0)|0;i=D;G=1}else{B=Oc[c[y+4>>2]&255](w,F)|0;G=(d[174896]|0|B)&255}a[174896]=G;B=c[v>>2]|0;if((B|0)==0){break}else{x=v;z=B}}}c[44692]=w;c[43718]=286;i=j;return}if((pm(f,163664)|0)==0){z=t;c[z>>2]=c[4952];c[z+4>>2]=c[4953];c[z+8>>2]=c[4954];c[z+12>>2]=c[4955];c[z+16>>2]=c[4956];c[z+20>>2]=c[4957];c[z+24>>2]=c[4958];c[z+28>>2]=c[4959];h[t+16>>3]=-1.0;c[t+24>>2]=0;do{if((g|0)!=0){x=k;A=c[g>>2]|0;if((A|0)==0){break}E=k|0;B=g;v=A;while(1){A=B+8|0;F=c[B+4>>2]|0;c[E>>2]=v;y=vb(x|0,25920,3,8,28)|0;if((y|0)==0){Fv(0,120960,(D=i,i=i+16|0,c[D>>2]=v,c[D+8>>2]=114616,D)|0)|0;i=D;H=1}else{C=Oc[c[y+4>>2]&255](z,F)|0;H=(d[174896]|0|C)&255}a[174896]=H;C=c[A>>2]|0;if((C|0)==0){break}else{B=A;v=C}}}}while(0);w=c[e+144>>2]|0;c[44692]=Hc[c[w>>2]&63](w,z,1)|0;c[43718]=287;i=j;return}if((pm(f,159656)|0)==0){w=s;c[w>>2]=c[4952];c[w+4>>2]=c[4953];c[w+8>>2]=c[4954];c[w+12>>2]=c[4955];c[w+16>>2]=c[4956];c[w+20>>2]=c[4957];c[w+24>>2]=c[4958];c[w+28>>2]=c[4959];h[s+16>>3]=-1.0;c[s+24>>2]=1;v=c[e+144>>2]|0;c[44692]=Hc[c[v>>2]&63](v,w,1)|0;c[43718]=289;i=j;return}if((pm(f,142280)|0)==0){w=r;c[w>>2]=c[4952];c[w+4>>2]=c[4953];c[w+8>>2]=c[4954];c[w+12>>2]=c[4955];c[w+16>>2]=c[4956];c[w+20>>2]=c[4957];c[w+24>>2]=c[4958];c[w+28>>2]=c[4959];h[r+16>>3]=-1.0;c[r+24>>2]=32;v=c[e+144>>2]|0;c[44692]=Hc[c[v>>2]&63](v,w,1)|0;c[43718]=293;i=j;return}if((pm(f,154648)|0)==0){w=q;c[w>>2]=c[4952];c[w+4>>2]=c[4953];c[w+8>>2]=c[4954];c[w+12>>2]=c[4955];c[w+16>>2]=c[4956];c[w+20>>2]=c[4957];c[w+24>>2]=c[4958];c[w+28>>2]=c[4959];h[q+16>>3]=-1.0;c[q+24>>2]=4;v=c[e+144>>2]|0;c[44692]=Hc[c[v>>2]&63](v,w,1)|0;c[43718]=290;i=j;return}if((pm(f,151360)|0)==0){w=p;c[w>>2]=c[4952];c[w+4>>2]=c[4953];c[w+8>>2]=c[4954];c[w+12>>2]=c[4955];c[w+16>>2]=c[4956];c[w+20>>2]=c[4957];c[w+24>>2]=c[4958];c[w+28>>2]=c[4959];h[p+16>>3]=-1.0;c[p+24>>2]=2;v=c[e+144>>2]|0;c[44692]=Hc[c[v>>2]&63](v,w,1)|0;c[43718]=288;i=j;return}if((pm(f,148472)|0)==0){w=o;c[w>>2]=c[4952];c[w+4>>2]=c[4953];c[w+8>>2]=c[4954];c[w+12>>2]=c[4955];c[w+16>>2]=c[4956];c[w+20>>2]=c[4957];c[w+24>>2]=c[4958];c[w+28>>2]=c[4959];h[o+16>>3]=-1.0;c[o+24>>2]=8;v=c[e+144>>2]|0;c[44692]=Hc[c[v>>2]&63](v,w,1)|0;c[43718]=291;i=j;return}if((pm(f,145248)|0)==0){w=n;c[w>>2]=c[4952];c[w+4>>2]=c[4953];c[w+8>>2]=c[4954];c[w+12>>2]=c[4955];c[w+16>>2]=c[4956];c[w+20>>2]=c[4957];c[w+24>>2]=c[4958];c[w+28>>2]=c[4959];h[n+16>>3]=-1.0;c[n+24>>2]=16;v=c[e+144>>2]|0;c[44692]=Hc[c[v>>2]&63](v,w,1)|0;c[43718]=292;i=j;return}if((pm(f,139176)|0)==0){c[44692]=0;w=m;v=c[g>>2]|0;if((v|0)!=0){B=m|0;x=g;E=v;while(1){v=x+8|0;C=c[x+4>>2]|0;c[B>>2]=E;A=vb(w|0,71320,1,8,28)|0;if((A|0)==0){Fv(0,120960,(D=i,i=i+16|0,c[D>>2]=E,c[D+8>>2]=120184,D)|0)|0;i=D;I=1}else{F=Oc[c[A+4>>2]&255](178768,C)|0;I=(d[174896]|0|F)&255}a[174896]=I;F=c[v>>2]|0;if((F|0)==0){break}else{x=v;E=F}}}c[43718]=282;i=j;return}if((pm(f,136632)|0)==0){c[43718]=276;i=j;return}if((pm(f,133736)|0)==0){c[43718]=279;i=j;return}if((pm(f,131648)|0)!=0){if((pm(f,167840)|0)==0){c[43718]=262;i=j;return}else{c[43718]=268;a[174897]=1;E=zd(c[43716]|0)|0;Fv(1,129424,(D=i,i=i+16|0,c[D>>2]=f,c[D+8>>2]=E,D)|0)|0;i=D;i=j;return}}E=jk(40)|0;x=l;w=c[g>>2]|0;if((w|0)!=0){B=l|0;z=g;F=w;while(1){w=z+8|0;v=c[z+4>>2]|0;c[B>>2]=F;C=vb(x|0,21624,2,8,28)|0;if((C|0)==0){Fv(0,120960,(D=i,i=i+16|0,c[D>>2]=F,c[D+8>>2]=126216,D)|0)|0;i=D;J=1}else{A=Oc[c[C+4>>2]&255](E,v)|0;J=(d[174896]|0|A)&255}a[174896]=J;A=c[w>>2]|0;if((A|0)==0){break}else{z=w;F=A}}}c[44692]=E;c[43718]=284;i=j;return}}while(0);a[174898]=0;c[43718]=260;i=j;return}function zi(b,d){b=b|0;d=d|0;var e=0,f=0;b=i;if((pm(d,97048)|0)==0){c[43718]=264;a[174898]=1;i=b;return}do{if((pm(d,91560)|0)!=0){if((pm(d,86296)|0)==0){break}if((pm(d,81584)|0)==0){c[43718]=265;a[174898]=0;i=b;return}if((pm(d,167840)|0)==0){c[43718]=263;i=b;return}if((pm(d,163664)|0)==0){c[43718]=266;i=b;return}if((pm(d,159656)|0)==0){c[43718]=270;i=b;return}if((pm(d,154648)|0)==0){c[43718]=271;i=b;return}if((pm(d,151360)|0)==0){c[43718]=269;i=b;return}if((pm(d,148472)|0)==0){c[43718]=272;i=b;return}if((pm(d,145248)|0)==0){c[43718]=273;i=b;return}if((pm(d,142280)|0)==0){c[43718]=274;i=b;return}if((pm(d,139176)|0)==0){if((c[43718]|0)==282){c[43718]=281;i=b;return}else{c[43718]=258;i=b;return}}if((pm(d,136632)|0)==0){if((c[43718]|0)==276){c[43718]=275;i=b;return}else{c[43718]=277;i=b;return}}if((pm(d,133736)|0)==0){if((c[43718]|0)==279){c[43718]=278;i=b;return}else{c[43718]=280;i=b;return}}if((pm(d,131648)|0)!=0){c[43718]=268;a[174897]=1;e=zd(c[43716]|0)|0;Fv(1,129424,(f=i,i=i+16|0,c[f>>2]=d,c[f+8>>2]=e,f)|0)|0;i=f;i=b;return}if((c[43718]|0)==284){c[43718]=283;i=b;return}else{c[43718]=259;i=b;return}}}while(0);c[43718]=261;i=b;return}function Ai(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0;if((a[174898]|0)==0|(e|0)==0){return}else{f=e;g=0;h=d}while(1){d=h+1|0;e=a[h]|0;if((e&255)>>>0>31>>>0){b=c[43719]|0;i=c[b+4>>2]|0;if(i>>>0<(c[b+8>>2]|0)>>>0){j=b;k=i}else{Jv(b,1)|0;b=c[43719]|0;j=b;k=c[b+4>>2]|0}c[j+4>>2]=k+1;a[k]=e;l=g+1|0}else{l=g}e=f-1|0;if((e|0)==0){break}else{f=e;g=l;h=d}}if((l|0)==0){return}c[43718]=267;return}function Bi(){var b=0;b=(a[174897]|a[174896])<<24>>24;qd(c[43716]|0);Mv(174880);return b|0}function Ci(){var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;b=i;c[43718]=0;d=0;a:while(1){e=a[174899]|0;do{if((e<<24>>24|0)==2){f=-1;g=41;break a}else if((e<<24>>24|0)==0){a[174899]=1;h=6;j=0;k=157976}else{l=c[43717]|0;m=a[l]|0;if(m<<24>>24==0){a[174899]=2;h=7;j=d;k=127960;break}n=l+1|0;b:do{if(m<<24>>24==60){o=a[n]|0;c:do{if(o<<24>>24==33){if((Za(l+2|0,115392,2)|0)!=0){p=n;q=33;g=18;break}r=l+4|0;s=r;t=1;while(1){u=s;while(1){v=u+1|0;w=a[u]|0;if((w<<24>>24|0)==0){x=u;break c}else if((w<<24>>24|0)==62){g=14;break}else if((w<<24>>24|0)==60){g=12;break}else{u=v}}if((g|0)==12){g=0;y=t+1|0;z=60}else if((g|0)==14){g=0;y=t-1|0;z=62}if((y|0)==0){break}else{s=v;t=y}}t=u-2|0;if(t>>>0>=r>>>0){if((Za(t|0,115392,2)|0)==0){A=u;B=z;g=20;break}}Fv(0,102712,(C=i,i=i+1|0,i=i+7&-8,c[C>>2]=0,C)|0)|0;i=C;a[174896]=1;A=u;B=a[u]|0;g=20}else{p=n;q=o;g=18}}while(0);d:do{if((g|0)==18){while(1){g=0;if((q<<24>>24|0)==0|(q<<24>>24|0)==62){A=p;B=q;g=20;break d}o=p+1|0;p=o;q=a[o]|0;g=18}}}while(0);do{if((g|0)==20){g=0;if(B<<24>>24!=62){x=A;break}D=A+1|0;break b}}while(0);Fv(0,108288,(C=i,i=i+1|0,i=i+7&-8,c[C>>2]=0,C)|0)|0;i=C;a[174896]=1;D=x}else{r=l;o=m;while(1){do{if((o<<24>>24|0)==38){t=r+1|0;if((a[t]|0)==35){g=26;break}E=fn(t,174880)|0}else if((o<<24>>24|0)==0|(o<<24>>24|0)==60){D=r;break b}else{g=26}}while(0);if((g|0)==26){g=0;t=c[43721]|0;if(t>>>0<(c[43722]|0)>>>0){F=t}else{Jv(174880,1)|0;F=c[43721]|0}c[43721]=F+1;a[F]=o;E=r+1|0}r=E;o=a[E]|0}}}while(0);h=D-l|0;j=D;k=l}}while(0);c[43726]=c[43725];c[43728]=c[43727];c[43725]=k;c[43727]=h;e=c[43721]|0;m=c[43720]|0;n=e-m|0;o=c[43716]|0;if((e|0)==(m|0)){G=ud(o,k,h,(h|0)==0|0)|0}else{if(e>>>0<(c[43722]|0)>>>0){H=e}else{Jv(174880,1)|0;H=c[43721]|0}a[H]=0;e=c[43720]|0;c[43721]=e;G=ud(o,e,n,0)|0}if(!((G|0)!=0|(a[174897]|0)!=0)){n=Ad(yd(c[43716]|0)|0)|0;e=zd(c[43716]|0)|0;Fv(1,120352,(C=i,i=i+16|0,c[C>>2]=n,c[C+8>>2]=e,C)|0)|0;i=C;wi();a[174897]=1;c[43718]=268}if((j|0)!=0){c[43717]=j}e=c[43718]|0;if((e|0)==0){d=j}else{f=e;g=41;break}}if((g|0)==41){i=b;return f|0}return 0}function Di(a,b){a=a|0;b=b|0;c[a+36>>2]=Lb(b|0)|0;return 0}function Ei(a,b){a=a|0;b=b|0;c[a+32>>2]=Lb(b|0)|0;return 0}function Fi(a,b){a=a|0;b=b|0;return pm(c[a>>2]|0,c[b>>2]|0)|0}function Gi(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0;e=i;f=(Cb(a[d]|0)|0)<<24>>24;do{if((f|0)==82){g=d+1|0;if((pm(g,118688)|0)!=0){h=g;j=5;break}c[b>>2]=114;k=0;i=e;return k|0}else if((f|0)!=76){h=d+1|0;j=5}}while(0);do{if((j|0)==5){if((pm(h,117768)|0)==0){break}do{if((f|0)!=67){if((pm(h,116848)|0)!=0){break}Fv(0,115896,(g=i,i=i+8|0,c[g>>2]=d,g)|0)|0;i=g;k=1;i=e;return k|0}}while(0);c[b>>2]=110;k=0;i=e;return k|0}}while(0);c[b>>2]=108;k=0;i=e;return k|0}function Hi(a,b){a=a|0;b=b|0;c[a+4>>2]=b;return 0}function Ii(a,b){a=a|0;b=b|0;c[a>>2]=b;return 0}function Ji(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,j=0;d=i;i=i+8|0;e=d|0;f=Ja(b|0,e|0,10)|0;if((c[e>>2]|0)==(b|0)){Fv(0,111576,(g=i,i=i+16|0,c[g>>2]=112168,c[g+8>>2]=b,g)|0)|0;i=g;j=1;i=d;return j|0}if((f|0)>255){Fv(0,110912,(g=i,i=i+24|0,c[g>>2]=112168,c[g+8>>2]=b,c[g+16>>2]=255,g)|0)|0;i=g;j=1;i=d;return j|0}if((f|0)<0){Fv(0,110160,(g=i,i=i+24|0,c[g>>2]=112168,c[g+8>>2]=b,c[g+16>>2]=0,g)|0)|0;i=g;j=1;i=d;return j|0}else{h[a+16>>3]=+(f|0);j=0;i=d;return j|0}return 0}function Ki(d,e){d=d|0;e=e|0;var f=0,g=0,h=0,j=0;f=i;g=(Cb(a[e]|0)|0)<<24>>24;do{if((g|0)==67){if((pm(e+1|0,116848)|0)==0){h=0}else{break}i=f;return h|0}else if((g|0)==82){if((pm(e+1|0,118688)|0)!=0){break}j=d+36|0;b[j>>1]=b[j>>1]|2;h=0;i=f;return h|0}else if((g|0)==76){if((pm(e+1|0,117768)|0)!=0){break}j=d+36|0;b[j>>1]=b[j>>1]|4;h=0;i=f;return h|0}else if((g|0)==84){if((pm(e+1|0,83696)|0)!=0){break}j=d+36|0;b[j>>1]=b[j>>1]|6;h=0;i=f;return h|0}}while(0);Fv(0,83296,(d=i,i=i+8|0,c[d>>2]=e,d)|0)|0;i=d;h=1;i=f;return h|0}function Li(d,e){d=d|0;e=e|0;var f=0,g=0,h=0,j=0;f=i;g=(Cb(a[e]|0)|0)<<24>>24;do{if((g|0)==76){if((pm(e+1|0,117768)|0)!=0){break}h=d+36|0;b[h>>1]=b[h>>1]|512;j=0;i=f;return j|0}else if((g|0)==67){if((pm(e+1|0,116848)|0)==0){j=0}else{break}i=f;return j|0}else if((g|0)==82){if((pm(e+1|0,118688)|0)!=0){break}h=d+36|0;b[h>>1]=b[h>>1]|256;j=0;i=f;return j|0}}while(0);Fv(0,84096,(d=i,i=i+8|0,c[d>>2]=e,d)|0)|0;i=d;j=1;i=f;return j|0}function Mi(a,b){a=a|0;b=b|0;c[a+20>>2]=Lb(b|0)|0;return 0}function Ni(d,e){d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+8|0;g=f|0;h=Ja(e|0,g|0,10)|0;if((c[g>>2]|0)==(e|0)){Fv(0,111576,(j=i,i=i+16|0,c[j>>2]=84544,c[j+8>>2]=e,j)|0)|0;i=j;k=1;i=f;return k|0}if((h|0)>255){Fv(0,110912,(j=i,i=i+24|0,c[j>>2]=84544,c[j+8>>2]=e,c[j+16>>2]=255,j)|0)|0;i=j;k=1;i=f;return k|0}if((h|0)<0){Fv(0,110160,(j=i,i=i+24|0,c[j>>2]=84544,c[j+8>>2]=e,c[j+16>>2]=0,j)|0)|0;i=j;k=1;i=f;return k|0}else{a[d+33|0]=h;h=d+36|0;b[h>>1]=b[h>>1]|32;k=0;i=f;return k|0}return 0}function Oi(d,e){d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+8|0;g=f|0;h=Ja(e|0,g|0,10)|0;if((c[g>>2]|0)==(e|0)){Fv(0,111576,(j=i,i=i+16|0,c[j>>2]=84904,c[j+8>>2]=e,j)|0)|0;i=j;k=1;i=f;return k|0}if((h|0)>255){Fv(0,110912,(j=i,i=i+24|0,c[j>>2]=84904,c[j+8>>2]=e,c[j+16>>2]=255,j)|0)|0;i=j;k=1;i=f;return k|0}if((h|0)<0){Fv(0,110160,(j=i,i=i+24|0,c[j>>2]=84904,c[j+8>>2]=e,c[j+16>>2]=0,j)|0)|0;i=j;k=1;i=f;return k|0}else{a[d+34|0]=h;h=d+36|0;b[h>>1]=b[h>>1]|64;k=0;i=f;return k|0}return 0}function Pi(d,e){d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0;f=i;i=i+8|0;g=f|0;h=Ja(e|0,g|0,10)|0;if((c[g>>2]|0)==(e|0)){Fv(0,111576,(j=i,i=i+16|0,c[j>>2]=85368,c[j+8>>2]=e,j)|0)|0;i=j;k=1;i=f;return k|0}if((h|0)>127){Fv(0,110912,(j=i,i=i+24|0,c[j>>2]=85368,c[j+8>>2]=e,c[j+16>>2]=127,j)|0)|0;i=j;k=1;i=f;return k|0}if((h|0)<-128){Fv(0,110160,(j=i,i=i+24|0,c[j>>2]=85368,c[j+8>>2]=e,c[j+16>>2]=-128,j)|0)|0;i=j;k=1;i=f;return k|0}else{a[d+32|0]=h;h=d+36|0;b[h>>1]=b[h>>1]|128;k=0;i=f;return k|0}return 0}function Qi(a,b){a=a|0;b=b|0;c[a+24>>2]=Lb(b|0)|0;return 0}function Ri(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+8|0;f=e|0;g=Ja(d|0,f|0,10)|0;if((c[f>>2]|0)==(d|0)){Fv(0,111576,(h=i,i=i+16|0,c[h>>2]=86680,c[h+8>>2]=d,h)|0)|0;i=h;j=1;i=e;return j|0}if((g|0)>65535){Fv(0,110912,(h=i,i=i+24|0,c[h>>2]=86680,c[h+8>>2]=d,c[h+16>>2]=65535,h)|0)|0;i=h;j=1;i=e;return j|0}if((g|0)<0){Fv(0,110160,(h=i,i=i+24|0,c[h>>2]=86680,c[h+8>>2]=d,c[h+16>>2]=0,h)|0)|0;i=h;j=1;i=e;return j|0}if((g|0)==0){Fv(0,85816,(h=i,i=i+1|0,i=i+7&-8,c[h>>2]=0,h)|0)|0;i=h;j=1;i=e;return j|0}else{b[a+80>>1]=g;j=0;i=e;return j|0}return 0}function Si(a,e){a=a|0;e=e|0;var f=0,g=0,h=0,j=0;f=i;g=(Cb(d[e]|0|0)|0)<<24>>24;do{if((g|0)==70){if((pm(e+1|0,87736)|0)==0){h=0}else{break}i=f;return h|0}else if((g|0)==84){if((pm(e+1|0,88168)|0)!=0){break}j=a+36|0;b[j>>1]=b[j>>1]|1;h=0;i=f;return h|0}}while(0);Fv(0,87216,(a=i,i=i+8|0,c[a>>2]=e,a)|0)|0;i=a;h=1;i=f;return h|0}function Ti(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;i=i+8|0;e=d|0;f=Ja(b|0,e|0,10)|0;if((c[e>>2]|0)==(b|0)){Fv(0,111576,(g=i,i=i+16|0,c[g>>2]=88608,c[g+8>>2]=b,g)|0)|0;i=g;h=1;i=d;return h|0}if((f|0)>360){Fv(0,110912,(g=i,i=i+24|0,c[g>>2]=88608,c[g+8>>2]=b,c[g+16>>2]=360,g)|0)|0;i=g;h=1;i=d;return h|0}if((f|0)<0){Fv(0,110160,(g=i,i=i+24|0,c[g>>2]=88608,c[g+8>>2]=b,c[g+16>>2]=0,g)|0)|0;i=g;h=1;i=d;return h|0}else{c[a+28>>2]=f&65535;h=0;i=d;return h|0}return 0}function Ui(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+8|0;f=e|0;g=Ja(d|0,f|0,10)|0;if((c[f>>2]|0)==(d|0)){Fv(0,111576,(h=i,i=i+16|0,c[h>>2]=89072,c[h+8>>2]=d,h)|0)|0;i=h;j=1;i=e;return j|0}if((g|0)>65535){Fv(0,110912,(h=i,i=i+24|0,c[h>>2]=89072,c[h+8>>2]=d,c[h+16>>2]=65535,h)|0)|0;i=h;j=1;i=e;return j|0}if((g|0)<0){Fv(0,110160,(h=i,i=i+24|0,c[h>>2]=89072,c[h+8>>2]=d,c[h+16>>2]=0,h)|0)|0;i=h;j=1;i=e;return j|0}else{b[a+40>>1]=g;j=0;i=e;return j|0}return 0}function Vi(a,b){a=a|0;b=b|0;c[a>>2]=Lb(b|0)|0;return 0}function Wi(a,b){a=a|0;b=b|0;c[a+16>>2]=Lb(b|0)|0;return 0}function Xi(a,b){a=a|0;b=b|0;c[a+4>>2]=Lb(b|0)|0;return 0}function Yi(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+8|0;f=e|0;g=Ja(d|0,f|0,10)|0;if((c[f>>2]|0)==(d|0)){Fv(0,111576,(h=i,i=i+16|0,c[h>>2]=90016,c[h+8>>2]=d,h)|0)|0;i=h;j=1;i=e;return j|0}if((g|0)>65535){Fv(0,110912,(h=i,i=i+24|0,c[h>>2]=90016,c[h+8>>2]=d,c[h+16>>2]=65535,h)|0)|0;i=h;j=1;i=e;return j|0}if((g|0)<0){Fv(0,110160,(h=i,i=i+24|0,c[h>>2]=90016,c[h+8>>2]=d,c[h+16>>2]=0,h)|0)|0;i=h;j=1;i=e;return j|0}if((g|0)==0){Fv(0,89456,(h=i,i=i+1|0,i=i+7&-8,c[h>>2]=0,h)|0)|0;i=h;j=1;i=e;return j|0}else{b[a+82>>1]=g;j=0;i=e;return j|0}return 0}function Zi(d,e){d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0;f=i;g=Lb(e|0)|0;e=La(g|0,94896)|0;if((e|0)==0){h=0;eF(g);i=f;return h|0}j=d+42|0;d=e;e=0;while(1){a:do{if(((Cb(a[d]|0)|0)&255|0)==82){k=d+1|0;if((pm(k,94416)|0)==0){b[j>>1]=b[j>>1]|4;l=e;break}if((pm(k,94024)|0)==0){b[j>>1]=b[j>>1]|2;l=e;break}else{Fv(0,93544,(m=i,i=i+8|0,c[m>>2]=d,m)|0)|0;i=m;l=1;break}}else{if((pm(d,93072)|0)==0){b[j>>1]=b[j>>1]&-385;l=e;break}do{if((pm(d,92608)|0)!=0){if((pm(d,91960)|0)==0){break}if((pm(d,91120)|0)==0){b[j>>1]=b[j>>1]|128;l=e;break a}if((pm(d,90600)|0)==0){b[j>>1]=b[j>>1]|256;l=e;break a}else{Fv(0,93544,(m=i,i=i+8|0,c[m>>2]=d,m)|0)|0;i=m;l=1;break a}}}while(0);b[j>>1]=b[j>>1]|32;l=e}}while(0);k=La(0,94896)|0;if((k|0)==0){h=l;break}else{d=k;e=l}}eF(g);i=f;return h|0}function _i(a,b){a=a|0;b=b|0;c[a+8>>2]=Lb(b|0)|0;return 0}function $i(a,b){a=a|0;b=b|0;c[a+12>>2]=Lb(b|0)|0;return 0}function aj(d,e){d=d|0;e=e|0;var f=0,g=0,h=0,j=0;f=i;g=(Cb(a[e]|0)|0)<<24>>24;do{if((g|0)==77){if((pm(e+1|0,95816)|0)==0){h=0}else{break}i=f;return h|0}else if((g|0)==66){if((pm(e+1|0,97464)|0)!=0){break}j=d+36|0;b[j>>1]=b[j>>1]|16;h=0;i=f;return h|0}else if((g|0)==84){if((pm(e+1|0,96352)|0)!=0){break}j=d+36|0;b[j>>1]=b[j>>1]|8;h=0;i=f;return h|0}}while(0);Fv(0,95272,(d=i,i=i+8|0,c[d>>2]=e,d)|0)|0;i=d;h=1;i=f;return h|0}function bj(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+8|0;f=e|0;g=Ja(d|0,f|0,10)|0;if((c[f>>2]|0)==(d|0)){Fv(0,111576,(h=i,i=i+16|0,c[h>>2]=98160,c[h+8>>2]=d,h)|0)|0;i=h;j=1;i=e;return j|0}if((g|0)>65535){Fv(0,110912,(h=i,i=i+24|0,c[h>>2]=98160,c[h+8>>2]=d,c[h+16>>2]=65535,h)|0)|0;i=h;j=1;i=e;return j|0}if((g|0)<0){Fv(0,110160,(h=i,i=i+24|0,c[h>>2]=98160,c[h+8>>2]=d,c[h+16>>2]=0,h)|0)|0;i=h;j=1;i=e;return j|0}else{b[a+38>>1]=g;j=0;i=e;return j|0}return 0}function cj(d,e){d=d|0;e=e|0;var f=0,g=0,h=0,j=0;f=i;g=(Cb(a[e]|0)|0)<<24>>24;do{if((g|0)==67){if((pm(e+1|0,116848)|0)==0){h=0}else{break}i=f;return h|0}else if((g|0)==76){if((pm(e+1|0,117768)|0)!=0){break}j=d+36|0;b[j>>1]=b[j>>1]|4;h=0;i=f;return h|0}else if((g|0)==82){if((pm(e+1|0,118688)|0)!=0){break}j=d+36|0;b[j>>1]=b[j>>1]|2;h=0;i=f;return h|0}}while(0);Fv(0,115896,(d=i,i=i+8|0,c[d>>2]=e,d)|0)|0;i=d;h=1;i=f;return h|0}function dj(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+8|0;f=e|0;g=Ja(d|0,f|0,10)|0;if((c[f>>2]|0)==(d|0)){Fv(0,111576,(h=i,i=i+16|0,c[h>>2]=79912,c[h+8>>2]=d,h)|0)|0;i=h;j=1;i=e;return j|0}if((g|0)>127){Fv(0,110912,(h=i,i=i+24|0,c[h>>2]=79912,c[h+8>>2]=d,c[h+16>>2]=127,h)|0)|0;i=h;j=1;i=e;return j|0}if((g|0)<0){Fv(0,110160,(h=i,i=i+24|0,c[h>>2]=79912,c[h+8>>2]=d,c[h+16>>2]=0,h)|0)|0;i=h;j=1;i=e;return j|0}else{a[b+88|0]=g;j=0;i=e;return j|0}return 0}function ej(b,d){b=b|0;d=d|0;var e=0,f=0,g=0;e=i;if((a[d]|0)==42){f=b+112|0;a[f]=a[f]|1;g=0;i=e;return g|0}else{Fv(0,80216,(f=i,i=i+8|0,c[f>>2]=d,f)|0)|0;i=f;g=1;i=e;return g|0}return 0}function fj(b,d){b=b|0;d=d|0;var e=0,f=0,g=0;e=i;if((a[d]|0)==42){f=b+112|0;a[f]=a[f]|2;g=0;i=e;return g|0}else{Fv(0,80672,(f=i,i=i+8|0,c[f>>2]=d,f)|0)|0;i=f;g=1;i=e;return g|0}return 0}
-
-
-
-function eD(b){b=b|0;var d=0;_z(b,122952)|0;d=ew(c[(c[b>>2]|0)+168>>2]|0,122800)|0;do{if((d|0)!=0){if((a[d]|0)==0){break}_z(b,122592)|0;_z(b,d)|0;_z(b,122416)|0}}while(0);_z(b,122224)|0;_z(b,122040)|0;_z(b,121976)|0;d=b+12|0;_z(b,gk(c[c[c[d>>2]>>2]>>2]|0)|0)|0;_z(b,121864)|0;_z(b,gk(c[(c[c[d>>2]>>2]|0)+4>>2]|0)|0)|0;_z(b,121640)|0;_z(b,gk(c[(c[c[d>>2]>>2]|0)+8>>2]|0)|0)|0;_z(b,121592)|0;_z(b,148920)|0;return}function fD(b){b=b|0;var d=0,e=0,f=0,g=0.0,j=0.0,k=0.0,l=0.0,m=0.0;d=i;e=c[b+16>>2]|0;_z(b,124800)|0;f=e+8|0;if((a[$w(c[f>>2]|0)|0]|0)!=0){_z(b,124616)|0;_z(b,gk($w(c[f>>2]|0)|0)|0)|0}f=da(c[b+168>>2]|0,c[b+164>>2]|0)|0;dA(b,124384,(e=i,i=i+8|0,c[e>>2]=f,e)|0);i=e;f=c[b+452>>2]|0;dA(b,124120,(e=i,i=i+16|0,c[e>>2]=c[b+448>>2],c[e+8>>2]=f,e)|0);i=e;g=+h[b+432>>3]/72.0;j=+h[b+440>>3]/72.0;k=+h[b+392>>3]*j;l=g*+h[b+400>>3];m=j*+h[b+408>>3];dA(b,123832,(e=i,i=i+32|0,h[e>>3]=+h[b+384>>3]*g,h[e+8>>3]=k,h[e+16>>3]=l,h[e+24>>3]=m,e)|0);i=e;_z(b,123456)|0;_z(b,123208)|0;_z(b,128448)|0;i=d;return}function gD(a){a=a|0;_z(a,124920)|0;return}function hD(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;_z(a,128192)|0;_z(a,gk(b)|0)|0;_z(a,125096)|0;return}function iD(a){a=a|0;_z(a,130512)|0;return}function jD(b){b=b|0;var d=0,e=0,f=0.0,g=0,j=0.0,k=0.0,l=0;d=i;e=c[b+16>>2]|0;_z(b,128192)|0;_z(b,gk(c[e+212>>2]|0)|0)|0;_z(b,125592)|0;f=+h[b+496>>3];g=-(c[b+360>>2]|0)|0;j=+h[b+504>>3];k=-0.0- +h[b+512>>3];dA(b,125320,(l=i,i=i+40|0,h[l>>3]=+h[b+488>>3],h[l+8>>3]=f,c[l+16>>2]=g,h[l+24>>3]=j,h[l+32>>3]=k,l)|0);i=l;l=e+8|0;if((a[$w(c[l>>2]|0)|0]|0)==0){i=d;return}_z(b,127488)|0;_z(b,gk($w(c[l>>2]|0)|0)|0)|0;_z(b,126984)|0;i=d;return}function kD(a){a=a|0;_z(a,130512)|0;return}function lD(a){a=a|0;var b=0;b=c[a+16>>2]|0;_z(a,128192)|0;_z(a,gk(c[b+212>>2]|0)|0)|0;_z(a,125880)|0;_z(a,127488)|0;_z(a,gk($w(c[b+8>>2]|0)|0)|0)|0;_z(a,126984)|0;return}function mD(a){a=a|0;_z(a,130512)|0;return}function nD(a){a=a|0;var b=0,d=0,e=0,f=0;b=i;d=c[a+16>>2]|0;_z(a,128192)|0;_z(a,gk(c[d+212>>2]|0)|0)|0;e=c[a+160>>2]|0;if((e|0)>1){f=gk(c[(c[(c[a>>2]|0)+308>>2]|0)+(e<<2)>>2]|0)|0;dA(a,126656,(e=i,i=i+8|0,c[e>>2]=f,e)|0);i=e}_z(a,126312)|0;_z(a,127488)|0;_z(a,gk($w(c[d+8>>2]|0)|0)|0)|0;_z(a,126984)|0;i=b;return}function oD(a){a=a|0;_z(a,130512)|0;return}function pD(a){a=a|0;var b=0,d=0;b=c[a+16>>2]|0;_z(a,128192)|0;_z(a,gk(c[b+212>>2]|0)|0)|0;_z(a,127832)|0;_z(a,127488)|0;d=fk(127272,c[b+8>>2]|0)|0;_z(a,gk(d)|0)|0;eF(d);_z(a,126984)|0;return}function qD(a){a=a|0;_z(a,130512)|0;return}function rD(b,c,d,e,f){b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;var g=0;_z(b,130304)|0;if((f|0)!=0){_z(b,130072)|0;_z(b,gk(f)|0)|0;_z(b,144328)|0}_z(b,130984)|0;_z(b,129896)|0;do{if((c|0)!=0){if((a[c]|0)==0){break}_z(b,129608)|0;_z(b,c)|0;_z(b,144328)|0}}while(0);do{if((d|0)!=0){if((a[d]|0)==0){break}_z(b,129104)|0;_z(b,gk(d)|0)|0;_z(b,144328)|0}}while(0);if((e|0)==0){g=_z(b,128448)|0;return}if((a[e]|0)==0){g=_z(b,128448)|0;return}_z(b,128728)|0;_z(b,gk(e)|0)|0;_z(b,144328)|0;g=_z(b,128448)|0;return}function sD(a){a=a|0;_z(a,130696)|0;_z(a,130512)|0;return}function tD(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0.0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;g=i;j=e;e=i;i=i+16|0;c[e>>2]=c[j>>2];c[e+4>>2]=c[j+4>>2];c[e+8>>2]=c[j+8>>2];c[e+12>>2]=c[j+12>>2];j=c[b+16>>2]|0;_z(b,136736)|0;k=a[f+48|0]|0;if((k|0)==114){_z(b,135944)|0}else if((k|0)==108){_z(b,136200)|0}else{_z(b,135672)|0}k=e+8|0;l=+h[f+24>>3]+ +h[k>>3];h[k>>3]=l;dA(b,135392,(k=i,i=i+16|0,h[k>>3]=+h[e>>3],h[k+8>>3]=-0.0-l,k)|0);i=k;e=f+4|0;m=c[e>>2]|0;n=c[m+8>>2]|0;do{if((n|0)==0){dA(b,133808,(k=i,i=i+8|0,c[k>>2]=c[m>>2],k)|0);i=k;o=0;p=0}else{q=c[(c[(c[(c[b>>2]|0)+168>>2]|0)+8>>2]|0)+232>>2]|0;if((q|0)==2){r=n+24|0;s=n+32|0;t=n+28|0}else if((q|0)==1){r=n|0;s=n+16|0;t=n+8|0}else{r=n+4|0;s=n+16|0;t=n+8|0}q=c[s>>2]|0;u=c[t>>2]|0;v=c[n+12>>2]|0;dA(b,135008,(k=i,i=i+8|0,c[k>>2]=c[r>>2],k)|0);i=k;w=c[n+24>>2]|0;if((w|0)!=0){dA(b,134752,(k=i,i=i+8|0,c[k>>2]=w,k)|0);i=k}_z(b,144328)|0;if((u|0)!=0){dA(b,134552,(k=i,i=i+8|0,c[k>>2]=u,k)|0);i=k}if((v|0)!=0){dA(b,134344,(k=i,i=i+8|0,c[k>>2]=v,k)|0);i=k}if((q|0)==0){o=0;p=u;break}dA(b,134096,(k=i,i=i+8|0,c[k>>2]=q,k)|0);i=k;o=q;p=u}}while(0);n=c[e>>2]|0;do{if((n|0)!=0){r=c[n+24>>2]<<25>>25;if((r|0)==0){break}if((r&1|0)!=0&(p|0)==0){dA(b,133496,(k=i,i=i+1|0,i=i+7&-8,c[k>>2]=0,k)|0);i=k}if((r&2|0)!=0&(o|0)==0){dA(b,133328,(k=i,i=i+1|0,i=i+7&-8,c[k>>2]=0,k)|0);i=k}if((r&36|0)!=0){dA(b,133152,(k=i,i=i+1|0,i=i+7&-8,c[k>>2]=0,k)|0);i=k;if((r&4|0)==0){x=0}else{dA(b,133016,(k=i,i=i+1|0,i=i+7&-8,c[k>>2]=0,k)|0);i=k;x=1}if((r&32|0)!=0){dA(b,132832,(k=i,i=i+8|0,c[k>>2]=(x|0)!=0?132712:213408,k)|0);i=k}dA(b,144328,(k=i,i=i+1|0,i=i+7&-8,c[k>>2]=0,k)|0);i=k}if((r&8|0)!=0){dA(b,132376,(k=i,i=i+1|0,i=i+7&-8,c[k>>2]=0,k)|0);i=k}if((r&16|0)==0){break}dA(b,132136,(k=i,i=i+1|0,i=i+7&-8,c[k>>2]=0,k)|0);i=k}}while(0);dA(b,131760,(k=i,i=i+8|0,h[k>>3]=+h[(c[e>>2]|0)+16>>3],k)|0);i=k;e=j+16|0;x=c[j+48>>2]|0;if((x|0)==5){j=c[e>>2]|0;if((pm(j,168168)|0)==0){y=_z(b,130984)|0;z=f|0;A=c[z>>2]|0;B=hk(A,1)|0;C=_z(b,B)|0;D=_z(b,130832)|0;i=g;return}dA(b,131400,(k=i,i=i+8|0,c[k>>2]=j,k)|0);i=k;y=_z(b,130984)|0;z=f|0;A=c[z>>2]|0;B=hk(A,1)|0;C=_z(b,B)|0;D=_z(b,130832)|0;i=g;return}else if((x|0)==1){x=e;j=d[x+1|0]|0;o=d[x+2|0]|0;dA(b,131112,(k=i,i=i+24|0,c[k>>2]=d[e]|0,c[k+8>>2]=j,c[k+16>>2]=o,k)|0);i=k;y=_z(b,130984)|0;z=f|0;A=c[z>>2]|0;B=hk(A,1)|0;C=_z(b,B)|0;D=_z(b,130832)|0;i=g;return}else{cc(143376,143104,436,169944)}}function uD(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0.0,g=0;d=i;if((c|0)==3){e=BD(a)|0}else if((c|0)==2){e=AD(a,b,2)|0}else{e=0}_z(a,137720)|0;zD(a,c,e);e=b|0;c=b+8|0;f=-0.0- +h[c>>3];dA(a,137472,(g=i,i=i+16|0,h[g>>3]=+h[e>>3],h[g+8>>3]=f,g)|0);i=g;f=+h[b+24>>3]- +h[c>>3];dA(a,137240,(g=i,i=i+16|0,h[g>>3]=+h[b+16>>3]- +h[e>>3],h[g+8>>3]=f,g)|0);i=g;_z(a,137008)|0;i=d;return}function vD(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0.0,j=0;e=i;if((d|0)==2){f=AD(a,b,c)|0}else if((d|0)==3){f=BD(a)|0}else{f=0}_z(a,138128)|0;zD(a,d,f);_z(a,148072)|0;if((c|0)>0){f=0;do{g=-0.0- +h[b+(f<<4)+8>>3];dA(a,147760,(j=i,i=i+16|0,h[j>>3]=+h[b+(f<<4)>>3],h[j+8>>3]=g,j)|0);i=j;f=f+1|0;}while((f|0)<(c|0))}g=-0.0- +h[b+8>>3];dA(a,137944,(j=i,i=i+16|0,h[j>>3]=+h[b>>3],h[j+8>>3]=g,j)|0);i=j;_z(a,147496)|0;i=e;return}function wD(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0.0,o=0.0;f=i;if((g|0)==2){j=AD(a,b,d)|0}else if((g|0)==3){j=BD(a)|0}else{j=0}_z(a,142760)|0;zD(a,g,j);_z(a,142424)|0;if((d|0)>0){k=0;l=77}else{m=_z(a,147496)|0;i=f;return}do{n=+h[b+(k<<4)>>3];o=-0.0- +h[b+(k<<4)+8>>3];dA(a,141960,(j=i,i=i+24|0,c[j>>2]=l&255,h[j+8>>3]=n,h[j+16>>3]=o,j)|0);i=j;l=(k|0)==0?67:32;k=k+1|0;}while((k|0)<(d|0));m=_z(a,147496)|0;i=f;return}function xD(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0,f=0,g=0.0,j=0;d=i;_z(a,148624)|0;zD(a,0,0);_z(a,148072)|0;if((c|0)>0){e=0}else{f=_z(a,147496)|0;i=d;return}do{g=-0.0- +h[b+(e<<4)+8>>3];dA(a,147760,(j=i,i=i+16|0,h[j>>3]=+h[b+(e<<4)>>3],h[j+8>>3]=g,j)|0);i=j;e=e+1|0;}while((e|0)<(c|0));f=_z(a,147496)|0;i=d;return}function yD(a,b){a=a|0;b=b|0;_z(a,149224)|0;_z(a,gk(b)|0)|0;_z(a,148920)|0;return}function zD(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0;g=i;j=c[b+16>>2]|0;_z(b,147208)|0;do{if((e|0)==2){dA(b,146920,(k=i,i=i+8|0,c[k>>2]=f,k)|0);i=k}else if((e|0)==0){_z(b,146088)|0}else if((e|0)==3){dA(b,146680,(k=i,i=i+8|0,c[k>>2]=f,k)|0);i=k}else{l=j+56|0;m=l;n=d[m]|d[m+1|0]<<8|d[m+2|0]<<16|d[m+3|0]<<24|0;m=j+88|0;o=d[m]|d[m+1|0]<<8|d[m+2|0]<<16|d[m+3|0]<<24|0;do{if((o|0)==5){_z(b,n)|0}else if((o|0)==1){p=n;if(n>>>0<16777216>>>0){_z(b,146088)|0;break}else{dA(b,143600,(k=i,i=i+24|0,c[k>>2]=p&255,c[k+8>>2]=p>>>8&255,c[k+16>>2]=p>>>16&255,k)|0);i=k;break}}else{cc(143376,143104,83,169960)}}while(0);if((c[m>>2]|0)!=1){break}n=a[l+3|0]|0;if((n<<24>>24|0)==0|(n<<24>>24|0)==(-1|0)){break}dA(b,146408,(k=i,i=i+8|0,h[k>>3]=+((n&255)>>>0)/255.0,k)|0);i=k}}while(0);_z(b,145776)|0;f=j+16|0;e=f;n=d[e]|d[e+1|0]<<8|d[e+2|0]<<16|d[e+3|0]<<24|0;e=j+48|0;o=d[e]|d[e+1|0]<<8|d[e+2|0]<<16|d[e+3|0]<<24|0;do{if((o|0)==1){p=n;if(n>>>0<16777216>>>0){_z(b,146088)|0;break}else{dA(b,143600,(k=i,i=i+24|0,c[k>>2]=p&255,c[k+8>>2]=p>>>8&255,c[k+16>>2]=p>>>16&255,k)|0);i=k;break}}else if((o|0)==5){_z(b,n)|0}else{cc(143376,143104,83,169960)}}while(0);q=+h[j+152>>3];if(q!=1.0){dA(b,145368,(k=i,i=i+8|0,h[k>>3]=q,k)|0);i=k}n=c[j+144>>2]|0;if((n|0)==1){dA(b,144880,(k=i,i=i+8|0,c[k>>2]=143816,k)|0);i=k}else if((n|0)==2){dA(b,144880,(k=i,i=i+8|0,c[k>>2]=144088,k)|0);i=k}if((c[e>>2]|0)!=1){r=_z(b,144328)|0;i=g;return}e=a[f+3|0]|0;if((e<<24>>24|0)==0|(e<<24>>24|0)==(-1|0)){r=_z(b,144328)|0;i=g;return}dA(b,144616,(k=i,i=i+8|0,h[k>>3]=+((e&255)>>>0)/255.0,k)|0);i=k;r=_z(b,144328)|0;i=g;return}function AD(b,e,f){b=b|0;e=e|0;f=f|0;var j=0,k=0,l=0,m=0,n=0.0,o=0.0,p=0.0,q=0,r=0,s=0,t=0,u=0,v=0;j=i;i=i+32|0;k=j|0;l=c[43700]|0;c[43700]=l+1;m=c[b+16>>2]|0;n=+(c[m+136>>2]|0)*3.141592653589793/180.0;vF(k|0,0,32)|0;rn(e,k|0,f,n,0);dA(b,139320,(f=i,i=i+8|0,c[f>>2]=l,f)|0);i=f;n=+h[k+8>>3];o=+h[k+16>>3];p=+h[k+24>>3];dA(b,138784,(f=i,i=i+32|0,h[f>>3]=+h[k>>3],h[f+8>>3]=n,h[f+16>>3]=o,h[f+24>>3]=p,f)|0);i=f;k=m+140|0;p=+g[k>>2];if(p>0.0){dA(b,138496,(f=i,i=i+8|0,h[f>>3]=p+-.001,f)|0);i=f}else{_z(b,141248)|0}e=m+56|0;q=e;r=d[q]|d[q+1|0]<<8|d[q+2|0]<<16|d[q+3|0]<<24|0;q=m+88|0;s=d[q]|d[q+1|0]<<8|d[q+2|0]<<16|d[q+3|0]<<24|0;do{if((s|0)==1){t=r;if(r>>>0<16777216>>>0){_z(b,146088)|0;break}else{dA(b,143600,(f=i,i=i+24|0,c[f>>2]=t&255,c[f+8>>2]=t>>>8&255,c[f+16>>2]=t>>>16&255,f)|0);i=f;break}}else if((s|0)==5){_z(b,r)|0}else{cc(143376,143104,83,169960);return 0}}while(0);_z(b,141008)|0;do{if((c[q>>2]|0)==1){r=a[e+3|0]|0;if((r<<24>>24|0)==0|(r<<24>>24|0)==(-1|0)){u=13;break}dA(b,140760,(f=i,i=i+8|0,h[f>>3]=+((r&255)>>>0)/255.0,f)|0);i=f}else{u=13}}while(0);if((u|0)==13){_z(b,140536)|0}_z(b,140288)|0;p=+g[k>>2];if(p>0.0){dA(b,138496,(f=i,i=i+8|0,h[f>>3]=p,f)|0);i=f}else{_z(b,139976)|0}k=m+96|0;u=k;e=d[u]|d[u+1|0]<<8|d[u+2|0]<<16|d[u+3|0]<<24|0;u=m+128|0;m=d[u]|d[u+1|0]<<8|d[u+2|0]<<16|d[u+3|0]<<24|0;do{if((m|0)==1){q=e;if(e>>>0<16777216>>>0){_z(b,146088)|0;break}else{dA(b,143600,(f=i,i=i+24|0,c[f>>2]=q&255,c[f+8>>2]=q>>>8&255,c[f+16>>2]=q>>>16&255,f)|0);i=f;break}}else if((m|0)==5){_z(b,e)|0}else{cc(143376,143104,83,169960);return 0}}while(0);_z(b,141008)|0;do{if((c[u>>2]|0)==1){e=a[k+3|0]|0;if((e<<24>>24|0)==0|(e<<24>>24|0)==(-1|0)){break}dA(b,140760,(f=i,i=i+8|0,h[f>>3]=+((e&255)>>>0)/255.0,f)|0);i=f;v=_z(b,138280)|0;i=j;return l|0}}while(0);_z(b,140536)|0;v=_z(b,138280)|0;i=j;return l|0}function BD(b){b=b|0;var e=0,f=0,g=0,j=0.0,k=0.0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;e=i;f=c[43698]|0;c[43698]=f+1;g=c[b+16>>2]|0;j=+(c[g+136>>2]|0)*3.141592653589793/180.0;k=j;if(j==0.0){l=50;m=50}else{l=~~((+V(k)+1.0)*50.0);m=~~((1.0- +W(k))*50.0)}dA(b,141568,(n=i,i=i+24|0,c[n>>2]=f,c[n+8>>2]=l,c[n+16>>2]=m,n)|0);i=n;_z(b,141248)|0;m=g+56|0;l=m;o=d[l]|d[l+1|0]<<8|d[l+2|0]<<16|d[l+3|0]<<24|0;l=g+88|0;p=d[l]|d[l+1|0]<<8|d[l+2|0]<<16|d[l+3|0]<<24|0;do{if((p|0)==1){q=o;if(o>>>0<16777216>>>0){_z(b,146088)|0;break}else{dA(b,143600,(n=i,i=i+24|0,c[n>>2]=q&255,c[n+8>>2]=q>>>8&255,c[n+16>>2]=q>>>16&255,n)|0);i=n;break}}else if((p|0)==5){_z(b,o)|0}else{cc(143376,143104,83,169960);return 0}}while(0);_z(b,141008)|0;do{if((c[l>>2]|0)==1){o=a[m+3|0]|0;if((o<<24>>24|0)==0|(o<<24>>24|0)==(-1|0)){r=12;break}dA(b,140760,(n=i,i=i+8|0,h[n>>3]=+((o&255)>>>0)/255.0,n)|0);i=n}else{r=12}}while(0);if((r|0)==12){_z(b,140536)|0}_z(b,140288)|0;_z(b,139976)|0;r=g+96|0;m=r;l=d[m]|d[m+1|0]<<8|d[m+2|0]<<16|d[m+3|0]<<24|0;m=g+128|0;g=d[m]|d[m+1|0]<<8|d[m+2|0]<<16|d[m+3|0]<<24|0;do{if((g|0)==5){_z(b,l)|0}else if((g|0)==1){o=l;if(l>>>0<16777216>>>0){_z(b,146088)|0;break}else{dA(b,143600,(n=i,i=i+24|0,c[n>>2]=o&255,c[n+8>>2]=o>>>8&255,c[n+16>>2]=o>>>16&255,n)|0);i=n;break}}else{cc(143376,143104,83,169960);return 0}}while(0);_z(b,141008)|0;do{if((c[m>>2]|0)==1){l=a[r+3|0]|0;if((l<<24>>24|0)==0|(l<<24>>24|0)==(-1|0)){break}dA(b,140760,(n=i,i=i+8|0,h[n>>3]=+((l&255)>>>0)/255.0,n)|0);i=n;s=_z(b,139672)|0;i=e;return f|0}}while(0);_z(b,140536)|0;s=_z(b,139672)|0;i=e;return f|0}function CD(a){a=a|0;var b=0;_z(a,113040)|0;b=a+12|0;_z(a,c[c[c[b>>2]>>2]>>2]|0)|0;_z(a,112536)|0;_z(a,c[(c[c[b>>2]>>2]|0)+4>>2]|0)|0;_z(a,111984)|0;_z(a,c[(c[c[b>>2]>>2]|0)+8>>2]|0)|0;_z(a,111408)|0;return}function DD(b){b=b|0;var d=0,e=0,f=0;d=i;e=c[b+16>>2]|0;_z(b,115728)|0;f=e+8|0;if((a[$w(c[f>>2]|0)|0]|0)!=0){_z(b,114328)|0;_z(b,$w(c[f>>2]|0)|0)|0}f=da(c[b+168>>2]|0,c[b+164>>2]|0)|0;dA(b,113600,(b=i,i=i+8|0,c[b>>2]=f,b)|0);i=b;i=d;return}function ED(a){a=a|0;c[44760]=1;return}function FD(a){a=a|0;c[44760]=-1;return}function GD(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;g=i;j=e;e=i;i=i+16|0;c[e>>2]=c[j>>2];c[e+4>>2]=c[j+4>>2];c[e+8>>2]=c[j+8>>2];c[e+12>>2]=c[j+12>>2];j=b+16|0;k=c[j>>2]|0;if((c[k+144>>2]|0)==0){i=g;return}l=f+4|0;m=~~(+h[(c[l>>2]|0)+16>>3]*+h[b+352>>3]);if((m|0)==0){i=g;return}if((a[b+144|0]|0)==0){_z(b,141528)|0}else{_z(b,c[b+148>>2]|0)|0}_z(b,123160)|0;n=e+8|0;h[n>>3]=+h[n>>3]- +(m|0)*.55;fA(b,e);_z(b,121576)|0;_z(b,c[f>>2]|0)|0;_z(b,120744)|0;_z(b,101232)|0;e=k+16|0;n=d[e]|d[e+1|0]<<8|d[e+2|0]<<16|d[e+3|0]<<24|0;e=k+48|0;k=d[e]|d[e+1|0]<<8|d[e+2|0]<<16|d[e+3|0]<<24|0;do{if((k|0)==5){_z(b,n)|0}else if((k|0)==1){e=n;if(n>>>0<16777216>>>0){_z(b,147720)|0;break}else{dA(b,144560,(o=i,i=i+24|0,c[o>>2]=e&255,c[o+8>>2]=e>>>8&255,c[o+16>>2]=e>>>16&255,o)|0);i=o;break}}else{cc(158736,153704,51,169904)}}while(0);_z(b,119984)|0;n=c[l>>2]|0;l=c[n+8>>2]|0;k=c[((l|0)==0?n|0:l+4|0)>>2]|0;_z(b,119152)|0;_z(b,k)|0;_z(b,119152)|0;dA(b,118496,(o=i,i=i+8|0,c[o>>2]=m,o)|0);i=o;m=a[f+48|0]|0;if((m|0)==114){_z(b,116632)|0}else if((m|0)==108){_z(b,117568)|0}m=c[j>>2]|0;switch(c[m+12>>2]|0){case 1:{p=1;q=166792;r=(c[c[m+8>>2]>>2]|0)>>>4;break};case 11:case 6:case 7:{p=0;q=80504;r=(c[c[m+8>>2]>>2]|0)>>>4;break};case 8:{p=1;q=85248;r=(c[c[m+8>>2]>>2]|0)>>>4;break};case 0:{p=1;q=166792;r=-1;break};case 5:{p=0;q=166792;r=(c[c[m+8>>2]>>2]|0)>>>4;break};case 10:{p=0;q=85248;r=(c[c[m+8>>2]>>2]|0)>>>4;break};case 4:{p=0;q=162648;r=-1;break};case 9:case 2:case 3:{p=1;q=80504;r=(c[c[m+8>>2]>>2]|0)>>>4;break};default:{cc(158736,153704,108,169880)}}dA(b,150608,(o=i,i=i+24|0,c[o>>2]=p,c[o+8>>2]=q,c[o+16>>2]=r,o)|0);i=o;_z(b,113632)|0;i=g;return}function HD(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0.0,o=0,p=0.0,q=0.0,r=0,s=0,t=0,u=0,v=0;g=i;j=b+16|0;k=c[j>>2]|0;l=k+144|0;if((c[l>>2]|0)==0){i=g;return}m=e|0;n=+h[m>>3];o=e+8|0;p=+h[o>>3];q=+h[e+24>>3]-p;h[m>>3]=n-(+h[e+16>>3]-n);h[o>>3]=p-q;if((a[b+144|0]|0)==0){_z(b,141528)|0}else{_z(b,c[b+148>>2]|0)|0}_z(b,125560)|0;gA(b,e,2);_z(b,101232)|0;do{if((f|0)==0){if((c[44760]|0)==0){_z(b,147720)|0;break}else{_z(b,131088)|0;break}}else{e=k+56|0;o=d[e]|d[e+1|0]<<8|d[e+2|0]<<16|d[e+3|0]<<24|0;e=k+88|0;m=d[e]|d[e+1|0]<<8|d[e+2|0]<<16|d[e+3|0]<<24|0;if((m|0)==1){e=o;if(o>>>0<16777216>>>0){_z(b,147720)|0;break}else{dA(b,144560,(r=i,i=i+24|0,c[r>>2]=e&255,c[r+8>>2]=e>>>8&255,c[r+16>>2]=e>>>16&255,r)|0);i=r;break}}else if((m|0)==5){_z(b,o)|0;break}else{cc(158736,153704,51,169904)}}}while(0);if((c[44760]|0)==1){c[44760]=0}_z(b,138464)|0;eA(b,+h[k+152>>3]);_z(b,128648)|0;f=k+16|0;o=d[f]|d[f+1|0]<<8|d[f+2|0]<<16|d[f+3|0]<<24|0;f=k+48|0;k=d[f]|d[f+1|0]<<8|d[f+2|0]<<16|d[f+3|0]<<24|0;do{if((k|0)==1){f=o;if(o>>>0<16777216>>>0){_z(b,147720)|0;break}else{dA(b,144560,(r=i,i=i+24|0,c[r>>2]=f&255,c[r+8>>2]=f>>>8&255,c[r+16>>2]=f>>>16&255,r)|0);i=r;break}}else if((k|0)==5){_z(b,o)|0}else{cc(158736,153704,51,169904)}}while(0);o=c[l>>2]|0;if((o|0)==1){_z(b,95704)|0;s=c[l>>2]|0}else{s=o}if((s|0)==2){_z(b,90464)|0}s=c[j>>2]|0;switch(c[s+12>>2]|0){case 5:{t=0;u=166792;v=(c[c[s+8>>2]>>2]|0)>>>4;break};case 8:{t=1;u=85248;v=(c[c[s+8>>2]>>2]|0)>>>4;break};case 9:case 2:case 3:{t=1;u=80504;v=(c[c[s+8>>2]>>2]|0)>>>4;break};case 11:case 6:case 7:{t=0;u=80504;v=(c[c[s+8>>2]>>2]|0)>>>4;break};case 0:{t=1;u=166792;v=-1;break};case 4:{t=0;u=162648;v=-1;break};case 1:{t=1;u=166792;v=(c[c[s+8>>2]>>2]|0)>>>4;break};case 10:{t=0;u=85248;v=(c[c[s+8>>2]>>2]|0)>>>4;break};default:{cc(158736,153704,108,169880)}}dA(b,150608,(r=i,i=i+24|0,c[r>>2]=t,c[r+8>>2]=u,c[r+16>>2]=v,r)|0);i=r;_z(b,113632)|0;i=g;return}function ID(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;j=i;k=b+16|0;l=c[k>>2]|0;m=l+144|0;if((c[m>>2]|0)==0){i=j;return}if((a[b+144|0]|0)==0){_z(b,141528)|0}else{_z(b,c[b+148>>2]|0)|0}_z(b,133296)|0;gA(b,e,f);_z(b,101232)|0;do{if((g|0)==0){if((c[44760]|0)==0){_z(b,147720)|0;break}else{_z(b,131088)|0;break}}else{f=l+56|0;e=d[f]|d[f+1|0]<<8|d[f+2|0]<<16|d[f+3|0]<<24|0;f=l+88|0;n=d[f]|d[f+1|0]<<8|d[f+2|0]<<16|d[f+3|0]<<24|0;if((n|0)==1){f=e;if(e>>>0<16777216>>>0){_z(b,147720)|0;break}else{dA(b,144560,(o=i,i=i+24|0,c[o>>2]=f&255,c[o+8>>2]=f>>>8&255,c[o+16>>2]=f>>>16&255,o)|0);i=o;break}}else if((n|0)==5){_z(b,e)|0;break}else{cc(158736,153704,51,169904)}}}while(0);if((c[44760]|0)==1){c[44760]=0}_z(b,138464)|0;eA(b,+h[l+152>>3]);_z(b,128648)|0;g=l+16|0;e=d[g]|d[g+1|0]<<8|d[g+2|0]<<16|d[g+3|0]<<24|0;g=l+48|0;l=d[g]|d[g+1|0]<<8|d[g+2|0]<<16|d[g+3|0]<<24|0;do{if((l|0)==1){g=e;if(e>>>0<16777216>>>0){_z(b,147720)|0;break}else{dA(b,144560,(o=i,i=i+24|0,c[o>>2]=g&255,c[o+8>>2]=g>>>8&255,c[o+16>>2]=g>>>16&255,o)|0);i=o;break}}else if((l|0)==5){_z(b,e)|0}else{cc(158736,153704,51,169904)}}while(0);e=c[m>>2]|0;if((e|0)==1){_z(b,95704)|0;p=c[m>>2]|0}else{p=e}if((p|0)==2){_z(b,90464)|0}p=c[k>>2]|0;switch(c[p+12>>2]|0){case 4:{q=0;r=162648;s=-1;break};case 0:{q=1;r=166792;s=-1;break};case 10:{q=0;r=85248;s=(c[c[p+8>>2]>>2]|0)>>>4;break};case 9:case 2:case 3:{q=1;r=80504;s=(c[c[p+8>>2]>>2]|0)>>>4;break};case 5:{q=0;r=166792;s=(c[c[p+8>>2]>>2]|0)>>>4;break};case 1:{q=1;r=166792;s=(c[c[p+8>>2]>>2]|0)>>>4;break};case 11:case 6:case 7:{q=0;r=80504;s=(c[c[p+8>>2]>>2]|0)>>>4;break};case 8:{q=1;r=85248;s=(c[c[p+8>>2]>>2]|0)>>>4;break};default:{cc(158736,153704,108,169880)}}dA(b,150608,(o=i,i=i+24|0,c[o>>2]=q,c[o+8>>2]=r,c[o+16>>2]=s,o)|0);i=o;_z(b,113632)|0;i=j;return}function JD(b,e,f,g,j,k){b=b|0;e=e|0;f=f|0;g=g|0;j=j|0;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0;k=i;j=b+16|0;g=c[j>>2]|0;l=g+144|0;if((c[l>>2]|0)==0){i=k;return}if((a[b+144|0]|0)==0){_z(b,141528)|0}else{_z(b,c[b+148>>2]|0)|0}_z(b,106864)|0;gA(b,e,f);_z(b,101232)|0;f=g+16|0;e=d[f]|d[f+1|0]<<8|d[f+2|0]<<16|d[f+3|0]<<24|0;f=g+48|0;m=d[f]|d[f+1|0]<<8|d[f+2|0]<<16|d[f+3|0]<<24|0;do{if((m|0)==5){_z(b,e)|0}else if((m|0)==1){f=e;if(e>>>0<16777216>>>0){_z(b,147720)|0;break}else{dA(b,144560,(n=i,i=i+24|0,c[n>>2]=f&255,c[n+8>>2]=f>>>8&255,c[n+16>>2]=f>>>16&255,n)|0);i=n;break}}else{cc(158736,153704,51,169904)}}while(0);_z(b,138464)|0;eA(b,+h[g+152>>3]);g=c[l>>2]|0;if((g|0)==1){_z(b,95704)|0;o=c[l>>2]|0}else{o=g}if((o|0)==2){_z(b,90464)|0}_z(b,135904)|0;o=c[j>>2]|0;switch(c[o+12>>2]|0){case 10:{p=0;q=85248;r=(c[c[o+8>>2]>>2]|0)>>>4;break};case 9:case 2:case 3:{p=1;q=80504;r=(c[c[o+8>>2]>>2]|0)>>>4;break};case 5:{p=0;q=166792;r=(c[c[o+8>>2]>>2]|0)>>>4;break};case 1:{p=1;q=166792;r=(c[c[o+8>>2]>>2]|0)>>>4;break};case 0:{p=1;q=166792;r=-1;break};case 11:case 6:case 7:{p=0;q=80504;r=(c[c[o+8>>2]>>2]|0)>>>4;break};case 8:{p=1;q=85248;r=(c[c[o+8>>2]>>2]|0)>>>4;break};case 4:{p=0;q=162648;r=-1;break};default:{cc(158736,153704,108,169880)}}dA(b,150608,(n=i,i=i+24|0,c[n>>2]=p,c[n+8>>2]=q,c[n+16>>2]=r,n)|0);i=n;_z(b,113632)|0;i=k;return}function KD(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;g=i;h=b+16|0;j=c[h>>2]|0;k=j+144|0;if((c[k>>2]|0)==0){i=g;return}if((a[b+144|0]|0)==0){_z(b,141528)|0}else{_z(b,c[b+148>>2]|0)|0}_z(b,106864)|0;gA(b,e,f);_z(b,101232)|0;f=j+16|0;e=d[f]|d[f+1|0]<<8|d[f+2|0]<<16|d[f+3|0]<<24|0;f=j+48|0;j=d[f]|d[f+1|0]<<8|d[f+2|0]<<16|d[f+3|0]<<24|0;do{if((j|0)==5){_z(b,e)|0}else if((j|0)==1){f=e;if(e>>>0<16777216>>>0){_z(b,147720)|0;break}else{dA(b,144560,(l=i,i=i+24|0,c[l>>2]=f&255,c[l+8>>2]=f>>>8&255,c[l+16>>2]=f>>>16&255,l)|0);i=l;break}}else{cc(158736,153704,51,169904)}}while(0);e=c[k>>2]|0;if((e|0)==1){_z(b,95704)|0;m=c[k>>2]|0}else{m=e}if((m|0)==2){_z(b,90464)|0}m=c[h>>2]|0;switch(c[m+12>>2]|0){case 9:case 2:case 3:{n=1;o=80504;p=(c[c[m+8>>2]>>2]|0)>>>4;break};case 11:case 6:case 7:{n=0;o=80504;p=(c[c[m+8>>2]>>2]|0)>>>4;break};case 4:{n=0;o=162648;p=-1;break};case 8:{n=1;o=85248;p=(c[c[m+8>>2]>>2]|0)>>>4;break};case 0:{n=1;o=166792;p=-1;break};case 10:{n=0;o=85248;p=(c[c[m+8>>2]>>2]|0)>>>4;break};case 5:{n=0;o=166792;p=(c[c[m+8>>2]>>2]|0)>>>4;break};case 1:{n=1;o=166792;p=(c[c[m+8>>2]>>2]|0)>>>4;break};default:{cc(158736,153704,108,169880)}}dA(b,150608,(l=i,i=i+24|0,c[l>>2]=n,c[l+8>>2]=o,c[l+16>>2]=p,l)|0);i=l;_z(b,113632)|0;i=g;return}function LD(a,b){a=a|0;b=b|0;_z(a,123360)|0;_z(a,b)|0;_z(a,113632)|0;return}function MD(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0;d=i;i=i+16|0;e=d|0;f=c[44698]|0;if((f|0)==0){c[44696]=64;g=kk(64)|0;c[44698]=g;h=g}else{h=f}if((b|0)==0){j=h;a[j]=0;k=c[44698]|0;i=d;return k|0}f=e+15|0;g=e+14|0;e=h;h=0;l=0;m=b;b=0;n=0;a:while(1){b:do{if((h|0)==0){p=e;q=m;r=b;s=n;while(1){t=a[q]|0;if(t<<24>>24==0){j=p;u=67;break a}v=c[44696]|0;if((l|0)>(v-8|0)){w=v<<1;c[44696]=w;v=mk(c[44698]|0,w)|0;c[44698]=v;x=v+l|0;y=a[q]|0}else{x=p;y=t}if((y<<24>>24|0)==62){z=x;A=q;B=122560;C=4;D=r;E=s;u=62;break b}else if((y<<24>>24|0)==38){t=a[q+1|0]|0;c:do{if(t<<24>>24==35){v=a[q+2|0]|0;if((v<<24>>24|0)==120|(v<<24>>24|0)==88){w=q+3|0;while(1){F=a[w]|0;if((F-48&255)>>>0<10>>>0|(F-97&255)>>>0<6>>>0|(F-65&255)>>>0<6>>>0){w=w+1|0}else{G=F;break c}}}if((v-48&255)>>>0>=10>>>0){G=v;break}w=q+3|0;while(1){F=a[w]|0;if((F-48&255)>>>0<10>>>0){w=w+1|0}else{G=F;break}}}else{if(!((t-97&255)>>>0<26>>>0|(t-65&255)>>>0<26>>>0)){G=t;break}w=q+2|0;while(1){v=a[w]|0;if((v-97&255)>>>0<26>>>0|(v-65&255)>>>0<26>>>0){w=w+1|0}else{G=v;break}}}}while(0);if(G<<24>>24!=59){H=5;I=105552;J=q;K=r;L=s;M=x;u=60;break b}if((y<<24>>24|0)==62){z=x;A=q;B=122560;C=4;D=r;E=s;u=62;break b}else if((y<<24>>24|0)==45){N=q;O=r;P=s;Q=x;u=47;break b}else if((y<<24>>24|0)==60){H=4;I=149904;J=q;K=r;L=s;M=x;u=60;break b}}else if((y<<24>>24|0)==45){N=q;O=r;P=s;Q=x;u=47;break b}else if((y<<24>>24|0)==60){H=4;I=149904;J=q;K=r;L=s;M=x;u=60;break b}if((y<<24>>24|0)==39){z=x;A=q;B=95432;C=5;D=r;E=s;u=62;break b}else if((y<<24>>24|0)==34){H=6;I=101104;J=q;K=r;L=s;M=x;u=60;break b}if(y<<24>>24>=0){H=1;I=q;J=q;K=r;L=s;M=x;u=60;break b}t=0;w=127;v=y&255;while(1){R=t+1|0;S=v&w;F=w>>>1;if(F>>>0<S>>>0){t=R;w=F;v=S}else{break}}if((t|0)>0){T=S;U=R}else{T=S+(s<<6)|0;U=r}v=U-1|0;if((v|0)<=0){V=q;W=x;X=T;Y=v;u=56;break b}p=x;q=q+1|0;r=v;s=T}}else{s=e;r=m;q=b;p=n;d:while(1){v=a[r]|0;if(v<<24>>24==0){j=s;u=67;break a}w=c[44696]|0;if((l|0)>(w-8|0)){F=w<<1;c[44696]=F;w=mk(c[44698]|0,F)|0;c[44698]=w;Z=w+l|0;_=a[r]|0}else{Z=s;_=v}switch(_<<24>>24){case 62:{z=Z;A=r;B=122560;C=4;D=q;E=p;u=62;break b;break};case 45:{N=r;O=q;P=p;Q=Z;u=47;break b;break};case 38:{v=a[r+1|0]|0;e:do{if(v<<24>>24==35){w=a[r+2|0]|0;if((w<<24>>24|0)==120|(w<<24>>24|0)==88){F=r+3|0;while(1){$=a[F]|0;if(($-48&255)>>>0<10>>>0|($-97&255)>>>0<6>>>0|($-65&255)>>>0<6>>>0){F=F+1|0}else{aa=$;break e}}}if((w-48&255)>>>0>=10>>>0){aa=w;break}F=r+3|0;while(1){$=a[F]|0;if(($-48&255)>>>0<10>>>0){F=F+1|0}else{aa=$;break}}}else{if(!((v-97&255)>>>0<26>>>0|(v-65&255)>>>0<26>>>0)){aa=v;break}F=r+2|0;while(1){w=a[F]|0;if((w-97&255)>>>0<26>>>0|(w-65&255)>>>0<26>>>0){F=F+1|0}else{aa=w;break}}}}while(0);if(aa<<24>>24!=59){H=5;I=105552;J=r;K=q;L=p;M=Z;u=60;break b}if((_<<24>>24|0)==62){z=Z;A=r;B=122560;C=4;D=q;E=p;u=62;break b}else if((_<<24>>24|0)==45){N=r;O=q;P=p;Q=Z;u=47;break b}else if((_<<24>>24|0)==60){H=4;I=149904;J=r;K=q;L=p;M=Z;u=60;break b}else if((_<<24>>24|0)==32){break d}break};case 60:{H=4;I=149904;J=r;K=q;L=p;M=Z;u=60;break b;break};case 32:{break d;break};default:{}}if((_<<24>>24|0)==39){z=Z;A=r;B=95432;C=5;D=q;E=p;u=62;break b}else if((_<<24>>24|0)==34){H=6;I=101104;J=r;K=q;L=p;M=Z;u=60;break b}if(_<<24>>24>=0){H=1;I=r;J=r;K=q;L=p;M=Z;u=60;break b}v=0;t=127;F=_&255;while(1){ba=v+1|0;ca=F&t;w=t>>>1;if(w>>>0<ca>>>0){v=ba;t=w;F=ca}else{break}}if((v|0)>0){da=ca;ea=ba}else{da=ca+(p<<6)|0;ea=q}F=ea-1|0;if((F|0)<=0){V=r;W=Z;X=da;Y=F;u=56;break b}s=Z;r=r+1|0;q=F;p=da}s=(a[h]|0)==32;H=s?6:1;I=s?106736:r;J=r;K=q;L=p;M=Z;u=60}}while(0);if((u|0)==47){u=0;z=Q;A=N;B=113480;C=5;D=O;E=P;u=62}else if((u|0)==56){u=0;a[f]=59;s=X;F=3;t=g;while(1){fa=t-1|0;a[t]=(s>>>0)%10|0|48;ga=(s>>>0)/10|0;ha=F+1|0;if((F|0)>11){u=58;break a}if(s>>>0>9>>>0){s=ga;F=ha;t=fa}else{break}}F=t-2|0;a[fa]=35;a[F]=38;if((ha|0)==0){ia=W;ja=l;ka=V;la=Y;ma=ga}else{z=W;A=V;B=F;C=ha;D=Y;E=ga;u=62}}else if((u|0)==60){u=0;z=M;A=J;B=I;C=H;D=K;E=L;u=62}if((u|0)==62){u=0;F=C+l|0;s=z;w=B;$=C;while(1){na=$-1|0;a[s]=a[w]|0;if((na|0)==0){break}s=s+1|0;w=w+1|0;$=na}ia=z+C|0;ja=F;ka=A;la=D;ma=E}e=ia;h=ka;l=ja;m=ka+1|0;b=la;n=ma}if((u|0)==58){Ma(90208,46,1,c[o>>2]|0)|0;mb(1);return 0}else if((u|0)==67){a[j]=0;k=c[44698]|0;i=d;return k|0}return 0}function ND(a){a=a|0;var b=0;_z(a,152832)|0;_z(a,152536)|0;b=a+12|0;_z(a,MD(c[c[c[b>>2]>>2]>>2]|0)|0)|0;_z(a,152296)|0;_z(a,MD(c[(c[c[b>>2]>>2]|0)+4>>2]|0)|0)|0;_z(a,151992)|0;_z(a,MD(c[(c[c[b>>2]>>2]|0)+8>>2]|0)|0)|0;_z(a,151680)|0;return}function OD(b){b=b|0;var d=0,e=0,f=0;d=i;e=c[b+16>>2]|0;c[44746]=~~(+h[b+232>>3]- +h[b+216>>3]);c[44742]=~~(+h[b+224>>3]- +h[b+208>>3]);_z(b,80072)|0;_z(b,79648)|0;f=$w(c[e+8>>2]|0)|0;if((a[f]|0)!=0){_z(b,79296)|0;_z(b,MD(f)|0)|0;_z(b,79024)|0}f=da(c[b+168>>2]|0,c[b+164>>2]|0)|0;dA(b,78744,(e=i,i=i+8|0,c[e>>2]=f,e)|0);i=e;_z(b,168704)|0;_z(b,168328)|0;_z(b,167920)|0;_z(b,167168)|0;_z(b,166728)|0;_z(b,166328)|0;_z(b,165944)|0;_z(b,165624)|0;_z(b,165320)|0;_z(b,164952)|0;_z(b,164584)|0;_z(b,164200)|0;_z(b,163744)|0;_z(b,162960)|0;_z(b,162576)|0;_z(b,162264)|0;_z(b,161896)|0;_z(b,161592)|0;_z(b,161248)|0;_z(b,160920)|0;_z(b,160600)|0;_z(b,162264)|0;_z(b,160208)|0;_z(b,161592)|0;_z(b,161248)|0;_z(b,159720)|0;_z(b,162960)|0;_z(b,162576)|0;_z(b,162264)|0;_z(b,160208)|0;_z(b,161592)|0;_z(b,161248)|0;_z(b,160920)|0;_z(b,160600)|0;_z(b,162264)|0;_z(b,161896)|0;_z(b,161592)|0;_z(b,161248)|0;_z(b,158952)|0;_z(b,158696)|0;_z(b,158352)|0;_z(b,158064)|0;_z(b,157728)|0;_z(b,157128)|0;f=(c[44746]|0)+10|0;dA(b,156816,(e=i,i=i+16|0,c[e>>2]=c[44742],c[e+8>>2]=f,e)|0);i=e;_z(b,156496)|0;_z(b,155096)|0;_z(b,154704)|0;_z(b,153936)|0;_z(b,153632)|0;f=c[44746]|0;dA(b,153336,(e=i,i=i+16|0,c[e>>2]=c[44742],c[e+8>>2]=f,e)|0);i=e;f=c[44746]|0;dA(b,153048,(e=i,i=i+16|0,c[e>>2]=c[44742],c[e+8>>2]=f,e)|0);i=e;i=d;return}function PD(a){a=a|0;_z(a,84768)|0;_z(a,84376)|0;_z(a,83904)|0;_z(a,83544)|0;_z(a,84376)|0;_z(a,83120)|0;_z(a,82704)|0;_z(a,82200)|0;_z(a,84376)|0;_z(a,81632)|0;_z(a,80920)|0;_z(a,84376)|0;_z(a,80464)|0;return}function QD(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0;g=i;_z(b,87568)|0;do{if((d|0)!=0){if((a[d]|0)==0){break}h=MD(d)|0;dA(b,87040,(j=i,i=i+8|0,c[j>>2]=h,j)|0);i=j}}while(0);do{if((e|0)!=0){if((a[e]|0)==0){break}d=MD(e)|0;dA(b,86448,(j=i,i=i+8|0,c[j>>2]=d,j)|0);i=j}}while(0);if((f|0)==0){k=_z(b,85224)|0;i=g;return}if((a[f]|0)==0){k=_z(b,85224)|0;i=g;return}e=MD(f)|0;dA(b,85608,(j=i,i=i+8|0,c[j>>2]=e,j)|0);i=j;k=_z(b,85224)|0;i=g;return}function RD(a){a=a|0;_z(a,88048)|0;return}function SD(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0.0,m=0.0,n=0.0,o=0,p=0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;g=i;j=e;e=i;i=i+16|0;c[e>>2]=c[j>>2];c[e+4>>2]=c[j+4>>2];c[e+8>>2]=c[j+8>>2];c[e+12>>2]=c[j+12>>2];j=c[b+16>>2]|0;k=a[f+48|0]|0;if((k|0)==108){l=+h[e>>3];m=+h[f+32>>3]}else if((k|0)==114){n=+h[f+32>>3];l=+h[e>>3]-n;m=n}else{n=+h[f+32>>3];l=+h[e>>3]-n*.5;m=n}k=f+40|0;n=+h[k>>3];o=f+4|0;p=(c[o>>2]|0)+16|0;q=+h[p>>3];if(n<q){r=q*1.1+1.0;h[k>>3]=r;s=r;t=+h[p>>3]}else{s=n;t=q}q=l+-8.0;n=+((c[44746]|0)>>>0>>>0)- +h[e+8>>3];r=t/5.0;if(t<12.0){u=r+1.4}else{u=r+2.0}r=n-s+u;dA(b,94736,(e=i,i=i+1|0,i=i+7&-8,c[e>>2]=0,e)|0);i=e;dA(b,96112,(e=i,i=i+16|0,h[e>>3]=q,h[e+8>>3]=r,e)|0);i=e;dA(b,95648,(e=i,i=i+16|0,h[e>>3]=l+m+8.0-q,h[e+8>>3]=n+u-r,e)|0);i=e;_z(b,94264)|0;_z(b,93808)|0;p=c[o>>2]|0;k=c[p+8>>2]|0;do{if((k|0)==0){dA(b,93384,(e=i,i=i+8|0,c[e>>2]=c[p>>2],e)|0);i=e}else{dA(b,93384,(e=i,i=i+8|0,c[e>>2]=c[k+4>>2],e)|0);i=e;v=c[k+8>>2]|0;if((v|0)!=0){dA(b,92904,(e=i,i=i+8|0,c[e>>2]=v,e)|0);i=e}v=c[k+12>>2]|0;if((v|0)!=0){dA(b,92288,(e=i,i=i+8|0,c[e>>2]=v,e)|0);i=e}v=c[k+16>>2]|0;if((v|0)==0){break}dA(b,91720,(e=i,i=i+8|0,c[e>>2]=v,e)|0);i=e}}while(0);dA(b,90888,(e=i,i=i+8|0,h[e>>3]=+h[(c[o>>2]|0)+16>>3],e)|0);i=e;o=j+16|0;k=c[j+48>>2]|0;if((k|0)==5){j=c[o>>2]|0;if((pm(j,158656)|0)==0){w=_z(b,89320)|0;x=f|0;y=c[x>>2]|0;z=MD(y)|0;A=_z(b,z)|0;B=_z(b,88912)|0;C=_z(b,88456)|0;i=g;return}dA(b,90432,(e=i,i=i+8|0,c[e>>2]=j,e)|0);i=e;w=_z(b,89320)|0;x=f|0;y=c[x>>2]|0;z=MD(y)|0;A=_z(b,z)|0;B=_z(b,88912)|0;C=_z(b,88456)|0;i=g;return}else if((k|0)==1){k=o;j=d[k+1|0]|0;p=d[k+2|0]|0;dA(b,89832,(e=i,i=i+24|0,c[e>>2]=d[o]|0,c[e+8>>2]=j,c[e+16>>2]=p,e)|0);i=e;w=_z(b,89320)|0;x=f|0;y=c[x>>2]|0;z=MD(y)|0;A=_z(b,z)|0;B=_z(b,88912)|0;C=_z(b,88456)|0;i=g;return}else{cc(106400,105968,439,169832)}}function TD(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0,o=0,p=0,q=0;f=i;_z(a,97208)|0;g=+h[b>>3];j=+h[b+16>>3]-g;k=+h[b+8>>3];l=+h[b+24>>3]-k;m=+((c[44746]|0)>>>0>>>0)-(k+l);dA(a,96112,(b=i,i=i+16|0,h[b>>3]=g-j,h[b+8>>3]=m,b)|0);i=b;dA(a,95648,(b=i,i=i+16|0,h[b>>3]=j*2.0,h[b+8>>3]=l*2.0,b)|0);i=b;if((e|0)==0){_z(a,99360)|0;n=_z(a,105056)|0;YD(a);o=_z(a,95136)|0;i=f;return}e=c[a+16>>2]|0;_z(a,100312)|0;p=e+56|0;q=d[p]|d[p+1|0]<<8|d[p+2|0]<<16|d[p+3|0]<<24|0;p=e+88|0;e=d[p]|d[p+1|0]<<8|d[p+2|0]<<16|d[p+3|0]<<24|0;do{if((e|0)==5){_z(a,q)|0}else if((e|0)==1){p=q;if(q>>>0<16777216>>>0){_z(a,107320)|0;break}else{dA(a,106800,(b=i,i=i+24|0,c[b>>2]=p&255,c[b+8>>2]=p>>>8&255,c[b+16>>2]=p>>>16&255,b)|0);i=b;break}}else{cc(106400,105968,95,169848)}}while(0);_z(a,99776)|0;n=_z(a,105056)|0;YD(a);o=_z(a,95136)|0;i=f;return}function UD(a,b,e,f){a=a|0;b=b|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0.0,o=0.0;g=i;_z(a,118440)|0;j=c[44746]|0;dA(a,105448,(k=i,i=i+16|0,c[k>>2]=c[44742],c[k+8>>2]=j,k)|0);i=k;if((f|0)==0){_z(a,99360)|0}else{f=c[a+16>>2]|0;_z(a,100312)|0;j=f+56|0;l=d[j]|d[j+1|0]<<8|d[j+2|0]<<16|d[j+3|0]<<24|0;j=f+88|0;f=d[j]|d[j+1|0]<<8|d[j+2|0]<<16|d[j+3|0]<<24|0;do{if((f|0)==1){j=l;if(l>>>0<16777216>>>0){_z(a,107320)|0;break}else{dA(a,106800,(k=i,i=i+24|0,c[k>>2]=j&255,c[k+8>>2]=j>>>8&255,c[k+16>>2]=j>>>16&255,k)|0);i=k;break}}else if((f|0)==5){_z(a,l)|0}else{cc(106400,105968,95,169848)}}while(0);_z(a,99776)|0}_z(a,105056)|0;YD(a);_z(a,104616)|0;if((e|0)<=0){m=_z(a,111952)|0;i=g;return}l=e-1|0;f=0;do{n=+h[b+(f<<4)>>3];o=+((c[44746]|0)>>>0>>>0)- +h[b+(f<<4)+8>>3];if((f|0)==0){_z(a,103368)|0;dA(a,98960,(k=i,i=i+16|0,h[k>>3]=n,h[k+8>>3]=o,k)|0);i=k;_z(a,98544)|0}else{dA(a,98960,(k=i,i=i+16|0,h[k>>3]=n,h[k+8>>3]=o,k)|0);i=k}if((f|0)==(l|0)){_z(a,97832)|0}f=f+1|0;}while((f|0)<(e|0));m=_z(a,111952)|0;i=g;return}function VD(a,b,e,f,g,j){a=a|0;b=b|0;e=e|0;f=f|0;g=g|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0.0;g=i;_z(a,118440)|0;f=c[44746]|0;dA(a,105448,(k=i,i=i+16|0,c[k>>2]=c[44742],c[k+8>>2]=f,k)|0);i=k;if((j|0)==0){_z(a,99360)|0}else{j=c[a+16>>2]|0;_z(a,100312)|0;f=j+56|0;l=d[f]|d[f+1|0]<<8|d[f+2|0]<<16|d[f+3|0]<<24|0;f=j+88|0;j=d[f]|d[f+1|0]<<8|d[f+2|0]<<16|d[f+3|0]<<24|0;do{if((j|0)==1){f=l;if(l>>>0<16777216>>>0){_z(a,107320)|0;break}else{dA(a,106800,(k=i,i=i+24|0,c[k>>2]=f&255,c[k+8>>2]=f>>>8&255,c[k+16>>2]=f>>>16&255,k)|0);i=k;break}}else if((j|0)==5){_z(a,l)|0}else{cc(106400,105968,95,169848)}}while(0);_z(a,99776)|0}_z(a,105056)|0;YD(a);_z(a,104616)|0;if((e|0)>0){m=0;n=103368}else{o=_z(a,100744)|0;p=_z(a,104128)|0;i=g;return}do{q=+h[b+(m<<4)>>3];r=+((c[44746]|0)>>>0>>>0)- +h[b+(m<<4)+8>>3];dA(a,102816,(k=i,i=i+24|0,c[k>>2]=n,h[k+8>>3]=q,h[k+16>>3]=r,k)|0);i=k;n=(m|0)==0?101736:213360;m=m+1|0;}while((m|0)<(e|0));o=_z(a,100744)|0;p=_z(a,104128)|0;i=g;return}function WD(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0.0;e=i;_z(a,118440)|0;f=c[44746]|0;dA(a,117512,(g=i,i=i+16|0,c[g>>2]=c[44742],c[g+8>>2]=f,g)|0);i=g;_z(a,116472)|0;if((d|0)<=0){j=_z(a,112512)|0;YD(a);k=_z(a,111952)|0;i=e;return}f=d-1|0;l=0;do{if((l|0)==0){_z(a,115672)|0;m=+((c[44746]|0)>>>0>>>0)- +h[b+8>>3];dA(a,114272,(g=i,i=i+16|0,h[g>>3]=+h[b>>3],h[g+8>>3]=m,g)|0);i=g;_z(a,113576)|0}else{m=+((c[44746]|0)>>>0>>>0)- +h[b+(l<<4)+8>>3];dA(a,114272,(g=i,i=i+16|0,h[g>>3]=+h[b+(l<<4)>>3],h[g+8>>3]=m,g)|0);i=g}if((l|0)==(f|0)){_z(a,113016)|0}l=l+1|0;}while((l|0)<(d|0));j=_z(a,112512)|0;YD(a);k=_z(a,111952)|0;i=e;return}function XD(a,b){a=a|0;b=b|0;_z(a,119952)|0;_z(a,MD(b)|0)|0;_z(a,119128)|0;return}function YD(a){a=a|0;var b=0,e=0,f=0,g=0,j=0,k=0,l=0.0,m=0;b=i;e=c[a+16>>2]|0;_z(a,111360)|0;f=e+16|0;g=d[f]|d[f+1|0]<<8|d[f+2|0]<<16|d[f+3|0]<<24|0;f=e+48|0;j=d[f]|d[f+1|0]<<8|d[f+2|0]<<16|d[f+3|0]<<24|0;do{if((j|0)==5){_z(a,g)|0}else if((j|0)==1){f=g;if(g>>>0<16777216>>>0){_z(a,107320)|0;break}else{dA(a,106800,(k=i,i=i+24|0,c[k>>2]=f&255,c[k+8>>2]=f>>>8&255,c[k+16>>2]=f>>>16&255,k)|0);i=k;break}}else{cc(106400,105968,95,169848)}}while(0);l=+h[e+152>>3];if(l!=1.0){dA(a,110648,(k=i,i=i+8|0,h[k>>3]=l,k)|0);i=k}k=c[e+144>>2]|0;if((k|0)==1){_z(a,11e4)|0;m=_z(a,108488)|0;i=b;return}else if((k|0)==2){_z(a,109232)|0;m=_z(a,108488)|0;i=b;return}else{m=_z(a,108488)|0;i=b;return}}function ZD(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=i;d=c[a+16>>2]|0;e=c[c[a+12>>2]>>2]|0;f=c[e>>2]|0;g=c[e+4>>2]|0;h=c[e+8>>2]|0;dA(a,83056,(e=i,i=i+32|0,c[e>>2]=112680,c[e+8>>2]=f,c[e+16>>2]=g,c[e+24>>2]=h,e)|0);i=e;h=$w(c[d+8>>2]|0)|0;dA(a,82656,(e=i,i=i+16|0,c[e>>2]=112680,c[e+8>>2]=h,e)|0);i=e;dA(a,82104,(e=i,i=i+8|0,c[e>>2]=112680,e)|0);i=e;i=b;return}function _D(a){a=a|0;var b=0;b=i;dA(a,83456,(a=i,i=i+8|0,c[a>>2]=112680,a)|0);i=a;i=b;return}function $D(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0;d=i;e=c[b+456>>2]|0;f=c[b+460>>2]|0;g=c[b+464>>2]|0;j=c[b+468>>2]|0;k=b+360|0;do{if(!(a[17808]|0)){l=c[k>>2]|0;if((l|0)==0|(l|0)==90){break}Fv(0,83856,(m=i,i=i+16|0,c[m>>2]=14536,c[m+8>>2]=103320,m)|0)|0;i=m;a[17808]=1}}while(0);n=(+(j|0)- +(f|0))/72.0;o=(+(g|0)- +(e|0))/72.0;e=(c[k>>2]|0)==90;p=e?n:o;q=e?o:n;dA(b,102752,(m=i,i=i+16|0,h[m>>3]=p,h[m+8>>3]=q,m)|0);i=m;dA(b,101536,(m=i,i=i+8|0,c[m>>2]=112680,m)|0);i=m;if(p>0.0){n=+Mb(+p);r=n+(3.0- +(~~n|0))}else{r=3.0}h[21655]=r;n=+U(+10.0,+r);h[21655]=n;dA(b,101128,(m=i,i=i+16|0,h[m>>3]=n,h[m+8>>3]=n,m)|0);i=m;dA(b,100648,(m=i,i=i+8|0,c[m>>2]=112680,m)|0);i=m;dA(b,100232,(m=i,i=i+8|0,c[m>>2]=112680,m)|0);i=m;dA(b,99704,(m=i,i=i+8|0,c[m>>2]=112680,m)|0);i=m;dA(b,99304,(m=i,i=i+8|0,c[m>>2]=112680,m)|0);i=m;dA(b,98888,(m=i,i=i+8|0,c[m>>2]=112680,m)|0);i=m;dA(b,98464,(m=i,i=i+8|0,c[m>>2]=112680,m)|0);i=m;dA(b,97688,(m=i,i=i+8|0,c[m>>2]=112680,m)|0);i=m;dA(b,97056,(m=i,i=i+8|0,c[m>>2]=112680,m)|0);i=m;dA(b,96024,(m=i,i=i+8|0,c[m>>2]=112680,m)|0);i=m;dA(b,95552,(m=i,i=i+8|0,c[m>>2]=112680,m)|0);i=m;dA(b,95080,(m=i,i=i+8|0,c[m>>2]=112680,m)|0);i=m;dA(b,94592,(m=i,i=i+1|0,i=i+7&-8,c[m>>2]=0,m)|0);i=m;dA(b,94216,(m=i,i=i+8|0,c[m>>2]=112680,m)|0);i=m;dA(b,93752,(m=i,i=i+8|0,c[m>>2]=112680,m)|0);i=m;dA(b,93272,(m=i,i=i+1|0,i=i+7&-8,c[m>>2]=0,m)|0);i=m;dA(b,92824,(m=i,i=i+8|0,c[m>>2]=112680,m)|0);i=m;dA(b,92128,(m=i,i=i+8|0,c[m>>2]=112680,m)|0);i=m;dA(b,91584,(m=i,i=i+8|0,c[m>>2]=112680,m)|0);i=m;dA(b,90776,(m=i,i=i+1|0,i=i+7&-8,c[m>>2]=0,m)|0);i=m;dA(b,90296,(m=i,i=i+8|0,c[m>>2]=112680,m)|0);i=m;dA(b,89736,(m=i,i=i+8|0,c[m>>2]=112680,m)|0);i=m;dA(b,89264,(m=i,i=i+8|0,c[m>>2]=112680,m)|0);i=m;dA(b,88768,(m=i,i=i+8|0,c[m>>2]=112680,m)|0);i=m;dA(b,88376,(m=i,i=i+8|0,c[m>>2]=112680,m)|0);i=m;dA(b,87920,(m=i,i=i+8|0,c[m>>2]=112680,m)|0);i=m;dA(b,87488,(m=i,i=i+1|0,i=i+7&-8,c[m>>2]=0,m)|0);i=m;dA(b,86912,(m=i,i=i+8|0,c[m>>2]=112680,m)|0);i=m;dA(b,86304,(m=i,i=i+8|0,c[m>>2]=112680,m)|0);i=m;dA(b,85512,(m=i,i=i+8|0,c[m>>2]=112680,m)|0);i=m;dA(b,85160,(m=i,i=i+16|0,h[m>>3]=q,h[m+8>>3]=p,m)|0);i=m;dA(b,84720,(m=i,i=i+1|0,i=i+7&-8,c[m>>2]=0,m)|0);i=m;dA(b,84248,(m=i,i=i+1|0,i=i+7&-8,c[m>>2]=0,m)|0);i=m;i=d;return}function aE(a){a=a|0;var b=0;b=i;dA(a,104104,(a=i,i=i+1|0,i=i+7&-8,c[a>>2]=0,a)|0);i=a;i=b;return}function bE(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0.0,k=0.0,l=0.0,m=0.0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0.0,z=0.0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;f=i;g=d;d=i;i=i+16|0;c[d>>2]=c[g>>2];c[d+4>>2]=c[g+4>>2];c[d+8>>2]=c[g+8>>2];c[d+12>>2]=c[g+12>>2];g=a[e+48|0]|0;if((g|0)==108){j=+h[e+32>>3];k=+h[d>>3]}else if((g|0)==114){l=+h[e+32>>3];g=d|0;m=+h[g>>3]-l;h[g>>3]=m;j=l;k=m}else{m=+h[e+32>>3];g=d|0;l=+h[g>>3]-m*.5;h[g>>3]=l;j=m;k=l}g=e+4|0;n=c[g>>2]|0;o=d+8|0;h[o>>3]=+h[n+16>>3]/216.0+ +h[o>>3];p=d|0;h[p>>3]=j/144.0+k;d=c[n>>2]|0;do{if((d|0)!=0){n=c[44108]|0;if((n|0)==0){q=25648}else{if((Ya(n|0,d|0)|0)==0){break}else{q=25648}}while(1){n=c[q+4>>2]|0;if((n|0)==0){Fv(1,147152,(r=i,i=i+16|0,c[r>>2]=14536,c[r+8>>2]=d,r)|0)|0;i=r;s=ob(d|0,45)|0;if((s|0)==0){t=144080;break}a[s]=0;q=25648;continue}else{if((Ya(n|0,d|0)|0)==0){u=11;break}q=q+8|0;continue}}if((u|0)==11){t=q|0}dA(b,162024,(r=i,i=i+8|0,c[r>>2]=t,r)|0);i=r;c[44108]=c[c[g>>2]>>2]}}while(0);if(!(a[14560]|0)){k=+h[21655];dA(b,158160,(r=i,i=i+16|0,c[r>>2]=1,h[r+8>>3]=k,r)|0);i=r;a[14560]=1}g=c[e>>2]|0;e=c[44112]|0;if((e|0)==0){c[44110]=64;t=dF(64)|0;c[44112]=t;v=t}else{v=e}e=a[g]|0;if(e<<24>>24==0){w=v;a[w]=0;x=c[44112]|0;y=+h[p>>3];z=+h[o>>3];dA(b,153160,(r=i,i=i+24|0,c[r>>2]=x,h[r+8>>3]=y,h[r+16>>3]=z,r)|0);i=r;i=f;return}else{A=0;B=v;C=g;D=e}while(1){e=C+1|0;g=c[44110]|0;if((A|0)>(g-8|0)){v=g<<1;c[44110]=v;g=gF(c[44112]|0,v)|0;c[44112]=g;E=g+A|0}else{E=B}if(D<<24>>24>-1){if(D<<24>>24==92){a[E]=92;F=E+1|0;G=A+1|0}else{F=E;G=A}a[F]=D;H=F+1|0;I=G+1|0}else{a[E]=92;nb(E+1|0,150176,(r=i,i=i+8|0,c[r>>2]=D&255,r)|0)|0;i=r;H=E+4|0;I=A+4|0}g=a[e]|0;if(g<<24>>24==0){w=H;break}else{A=I;B=H;C=e;D=g}}a[w]=0;x=c[44112]|0;y=+h[p>>3];z=+h[o>>3];dA(b,153160,(r=i,i=i+24|0,c[r>>2]=x,h[r+8>>3]=y,h[r+16>>3]=z,r)|0);i=r;i=f;return}function cE(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0.0,g=0.0,j=0.0,k=0.0;e=i;f=+h[b>>3];g=(+h[b+16>>3]-f)*2.0/72.0;j=+h[b+8>>3];k=(+h[b+24>>3]-j)*2.0/72.0;dA(a,84448,(a=i,i=i+48|0,c[a>>2]=1,c[a+8>>2]=(d|0)!=0?79808:213480,h[a+16>>3]=g,h[a+24>>3]=k,h[a+32>>3]=f/72.0,h[a+40>>3]=j/72.0,a)|0);i=a;i=e;return}function dE(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;hE(a,b,c,1);return}function eE(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var j=0,k=0.0,l=0,m=0.0,n=0,o=0.0,p=0.0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0.0,C=0.0,D=0,E=0,F=0;g=i;i=i+80|0;f=g|0;e=g+64|0;j=dF((d*140|0)+140|0)|0;k=+h[b>>3];l=f+48|0;h[l>>3]=k;m=+h[b+8>>3];n=f+56|0;h[n>>3]=m;if(k<0.0){o=k+-.5}else{o=k+.5}if(m<0.0){p=m+-.5}else{p=m+.5}q=nb(j|0,106168,(r=i,i=i+16|0,c[r>>2]=~~o,c[r+8>>2]=~~p,r)|0)|0;i=r;if((d|0)>3){s=f|0;t=f;u=l;l=e|0;v=e+8|0;w=0;x=1;y=j+q|0;q=3;while(1){c[t>>2]=c[u>>2];c[t+4>>2]=c[u+4>>2];c[t+8>>2]=c[u+8>>2];c[t+12>>2]=c[u+12>>2];z=w+1|0;h[f+16>>3]=+h[b+(z<<4)>>3];h[f+24>>3]=+h[b+(z<<4)+8>>3];z=w+2|0;h[f+32>>3]=+h[b+(z<<4)>>3];h[f+40>>3]=+h[b+(z<<4)+8>>3];z=w+3|0;h[f+48>>3]=+h[b+(z<<4)>>3];h[n>>3]=+h[b+(z<<4)+8>>3];z=1;A=y;do{Qm(e,s,3,+(z|0)/6.0,0,0);p=+h[l>>3];o=+h[v>>3];if(p<0.0){B=p+-.5}else{B=p+.5}if(o<0.0){C=o+-.5}else{C=o+.5}D=nb(A|0,106168,(r=i,i=i+16|0,c[r>>2]=~~B,c[r+8>>2]=~~C,r)|0)|0;i=r;A=A+D|0;z=z+1|0;}while((z|0)<7);z=x+6|0;D=q+3|0;if((D|0)<(d|0)){w=q;x=z;y=A;q=D}else{E=z;break}}}else{E=1}dA(a,94872,(r=i,i=i+8|0,c[r>>2]=j,r)|0);i=r;eF(j);if((E|0)<=0){F=_z(a,100464)|0;i=g;return}j=E-1|0;q=0;do{dA(a,89408,(r=i,i=i+8|0,c[r>>2]=((q|0)%(j|0)|0|0)!=0,r)|0);i=r;q=q+1|0;}while((q|0)<(E|0));F=_z(a,100464)|0;i=g;return}function fE(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,j=0.0,k=0.0,l=0.0,m=0;e=i;if((d|0)>0){f=0}else{g=_z(a,100464)|0;i=e;return}do{j=+h[b+(f<<4)>>3];if(j<0.0){k=j+-.5}else{k=j+.5}j=+h[b+(f<<4)+8>>3];if(j<0.0){l=j+-.5}else{l=j+.5}dA(a,106168,(m=i,i=i+16|0,c[m>>2]=~~k,c[m+8>>2]=~~l,m)|0);i=m;f=f+1|0;}while((f|0)<(d|0));g=_z(a,100464)|0;i=e;return}function gE(a,b){a=a|0;b=b|0;var d=0;d=i;dA(a,121064,(a=i,i=i+16|0,c[a>>2]=112680,c[a+8>>2]=b,a)|0);i=a;i=d;return}function hE(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0.0,k=0.0,l=0.0,m=0,n=0,o=0.0,p=0.0;f=i;if((d|0)>0){g=0;do{j=+h[b+(g<<4)>>3];if(j<0.0){k=j+-.5}else{k=j+.5}j=+h[b+(g<<4)+8>>3];if(j<0.0){l=j+-.5}else{l=j+.5}dA(a,106168,(m=i,i=i+16|0,c[m>>2]=~~k,c[m+8>>2]=~~l,m)|0);i=m;g=g+1|0;}while((g|0)<(d|0))}if((e|0)==0){n=_z(a,100464)|0;i=f;return}l=+h[b>>3];if(l<0.0){o=l+-.5}else{o=l+.5}l=+h[b+8>>3];if(l<0.0){p=l+-.5}else{p=l+.5}dA(a,106168,(m=i,i=i+16|0,c[m>>2]=~~o,c[m+8>>2]=~~p,m)|0);i=m;n=_z(a,100464)|0;i=f;return}function iE(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;d=i;b=c;c=i;i=i+32|0;tF(c,b,32)|0;i=d;return}function jE(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0.0,k=0.0;e=i;f=d;d=i;i=i+32|0;tF(d,f,32)|0;f=b+8|0;b=c[f>>2]|0;dA(a,104488,(g=i,i=i+16|0,c[g>>2]=b,c[g+8>>2]=b,g)|0);i=g;j=(+h[d+16>>3]+ +h[d>>3])*.5;k=(+h[d+24>>3]+ +h[d+8>>3])*.5;dA(a,104008,(g=i,i=i+24|0,c[g>>2]=c[f>>2],h[g+8>>3]=j,h[g+16>>3]=k,g)|0);i=g;i=e;return}function kE(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0.0,j=0.0,k=0.0,l=0.0,m=0.0;e=i;f=d;d=i;i=i+32|0;tF(d,f,32)|0;g=+h[d>>3];j=+h[d+16>>3]-g;k=+h[d+24>>3];l=k- +h[d+8>>3];m=+(~~(+h[a+232>>3]- +h[a+216>>3])>>>0>>>0)-k;dA(a,103144,(d=i,i=i+40|0,c[d>>2]=c[b+8>>2],h[d+8>>3]=j,h[d+16>>3]=l,h[d+24>>3]=g,h[d+32>>3]=m,d)|0);i=d;_z(a,102528)|0;i=e;return}function lE(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0.0,n=0.0,o=0.0,p=0.0,q=0,r=0,s=0.0,t=0.0;f=i;i=i+64|0;g=d;d=i;i=i+32|0;tF(d,g,32)|0;g=f|0;if((a|0)==0){cc(101464,101048,216,170880)}if((b|0)==0){cc(100576,101048,217,170880)}j=b+8|0;if((c[j>>2]|0)==0){cc(100144,101048,218,170880)}if((c[b+52>>2]|0)==0){i=f;return}b=g;k=d;c[b>>2]=c[k>>2];c[b+4>>2]=c[k+4>>2];c[b+8>>2]=c[k+8>>2];c[b+12>>2]=c[k+12>>2];k=g+32|0;b=k;l=d+16|0;c[b>>2]=c[l>>2];c[b+4>>2]=c[l+4>>2];c[b+8>>2]=c[l+8>>2];c[b+12>>2]=c[l+12>>2];l=g|0;m=+h[l>>3];b=g+16|0;h[b>>3]=m;n=+h[g+40>>3];d=g+24|0;h[d>>3]=n;o=+h[k>>3];h[g+48>>3]=o;k=g+8|0;p=+h[k>>3];h[g+56>>3]=p;if(e<<24>>24==0){q=g+32|0}else{dA(a,99632,(r=i,i=i+1|0,i=i+7&-8,c[r>>2]=0,r)|0);i=r;dA(a,99240,(r=i,i=i+16|0,h[r>>3]=m,h[r+8>>3]=p,r)|0);i=r;dA(a,99240,(r=i,i=i+16|0,h[r>>3]=m,h[r+8>>3]=n,r)|0);i=r;dA(a,99240,(r=i,i=i+16|0,h[r>>3]=o,h[r+8>>3]=n,r)|0);i=r;dA(a,99240,(r=i,i=i+16|0,h[r>>3]=o,h[r+8>>3]=p,r)|0);i=r;dA(a,99240,(r=i,i=i+16|0,h[r>>3]=m,h[r+8>>3]=p,r)|0);i=r;e=c[j>>2]|0;dA(a,98824,(r=i,i=i+16|0,c[r>>2]=4,c[r+8>>2]=e,r)|0);i=r;q=g+32|0}dA(a,99632,(r=i,i=i+1|0,i=i+7&-8,c[r>>2]=0,r)|0);i=r;m=+h[l>>3];s=+h[k>>3];dA(a,99240,(r=i,i=i+16|0,h[r>>3]=m,h[r+8>>3]=s,r)|0);i=r;t=+h[d>>3];dA(a,99240,(r=i,i=i+16|0,h[r>>3]=+h[b>>3],h[r+8>>3]=t,r)|0);i=r;dA(a,99240,(r=i,i=i+16|0,h[r>>3]=+h[q>>3],h[r+8>>3]=n,r)|0);i=r;dA(a,99240,(r=i,i=i+16|0,h[r>>3]=o,h[r+8>>3]=p,r)|0);i=r;dA(a,99240,(r=i,i=i+16|0,h[r>>3]=m,h[r+8>>3]=s,r)|0);i=r;q=c[j>>2]|0;dA(a,98400,(r=i,i=i+16|0,c[r>>2]=4,c[r+8>>2]=q,r)|0);i=r;i=f;return}function mE(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0.0;f=i;i=i+80|0;g=e;e=i;i=i+32|0;tF(e,g,32)|0;g=f|0;if((b|0)==0){cc(101464,101048,157,170904)}if((d|0)==0){cc(100576,101048,158,170904)}if((c[d+8>>2]|0)==0){cc(100144,101048,159,170904)}j=d+52|0;do{if((c[j>>2]|0)==0){k=10}else{l=d+60|0;m=c[l>>2]|0;if((m|0)==156){break}Cc[m&255](d);c[j>>2]=0;c[l>>2]=0;c[d+56>>2]=0;k=10}}while(0);do{if((k|0)==10){if((CB(d)|0)<<24>>24==0){i=f;return}l=Ta(c[d+20>>2]|0)|0;if(((c[d+24>>2]|0)-6|0)>>>0<2>>>0){Xb(l|0,g|0)|0;m=c[g+36>>2]|0;c[d+56>>2]=m;n=dF(m)|0;c[j>>2]=n;Ra(l|0,n|0,m|0)|0;a[d+16|0]=1}if((c[j>>2]|0)!=0){c[d+60>>2]=156}DB(d);if((c[j>>2]|0)!=0){break}i=f;return}}while(0);o=+h[e+8>>3]- +(c[d+36>>2]|0);dA(b,97560,(j=i,i=i+16|0,h[j>>3]=+h[e>>3]- +(c[d+32>>2]|0),h[j+8>>3]=o,j)|0);i=j;if((a[d+16|0]|0)==0){dA(b,96824,(j=i,i=i+8|0,c[j>>2]=c[d+12>>2],j)|0);i=j}else{bl(b,d)}dA(b,95920,(j=i,i=i+1|0,i=i+7&-8,c[j>>2]=0,j)|0);i=j;i=f;return}function nE(a){a=a|0;eF(c[a+52>>2]|0);return}function oE(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0;e=i;f=d;d=i;i=i+32|0;tF(d,f,32)|0;if((a|0)==0){cc(101464,101048,125,170832)}f=c[a+16>>2]|0;if((f|0)==0){cc(95392,101048,127,170832)}if((b|0)==0){cc(100576,101048,128,170832)}d=b+8|0;if((c[d>>2]|0)==0){cc(100144,101048,129,170832)}if((c[f+8>>2]|0)==0){cc(95008,101048,132,170832)}else{dA(a,94528,(f=i,i=i+1|0,i=i+7&-8,c[f>>2]=0,f)|0);i=f;dA(a,94136,(f=i,i=i+1|0,i=i+7&-8,c[f>>2]=0,f)|0);i=f;dA(a,93664,(f=i,i=i+1|0,i=i+7&-8,c[f>>2]=0,f)|0);i=f;dA(a,93192,(f=i,i=i+1|0,i=i+7&-8,c[f>>2]=0,f)|0);i=f;dA(a,92744,(f=i,i=i+1|0,i=i+7&-8,c[f>>2]=0,f)|0);i=f;dA(a,92048,(f=i,i=i+1|0,i=i+7&-8,c[f>>2]=0,f)|0);i=f;dA(a,91416,(f=i,i=i+8|0,c[f>>2]=c[d>>2],f)|0);i=f;dA(a,90696,(f=i,i=i+1|0,i=i+7&-8,c[f>>2]=0,f)|0);i=f;dA(a,90096,(f=i,i=i+1|0,i=i+7&-8,c[f>>2]=0,f)|0);i=f;i=e;return}}function pE(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0.0,j=0.0,k=0.0,l=0,m=0.0,n=0,o=0.0,p=0;e=i;f=d;d=i;i=i+32|0;tF(d,f,32)|0;if((a|0)==0){cc(101464,101048,101,170928)}if((b|0)==0){cc(100576,101048,102,170928)}f=c[b+8>>2]|0;if((f|0)==0){cc(100144,101048,103,170928)}g=+h[d>>3];if(g<0.0){j=g+-.5}else{j=g+.5}b=~~j;j=+h[d+8>>3];if(j<0.0){k=j+-.5}else{k=j+.5}l=~~k;k=+h[d+16>>3];if(k<0.0){m=k+-.5}else{m=k+.5}n=~~m;m=+h[d+24>>3];if(m<0.0){o=m+-.5}else{o=m+.5}d=~~o;dA(a,89608,(p=i,i=i+144|0,c[p>>2]=2,c[p+8>>2]=5,c[p+16>>2]=0,c[p+24>>2]=0,c[p+32>>2]=0,c[p+40>>2]=-1,c[p+48>>2]=1,c[p+56>>2]=-1,c[p+64>>2]=0,h[p+72>>3]=0.0,c[p+80>>2]=0,c[p+88>>2]=0,c[p+96>>2]=0,c[p+104>>2]=0,c[p+112>>2]=0,c[p+120>>2]=5,c[p+128>>2]=0,c[p+136>>2]=f,p)|0);i=p;dA(a,89184,(p=i,i=i+80|0,c[p>>2]=b,c[p+8>>2]=l,c[p+16>>2]=b,c[p+24>>2]=d,c[p+32>>2]=n,c[p+40>>2]=d,c[p+48>>2]=n,c[p+56>>2]=l,c[p+64>>2]=b,c[p+72>>2]=l,p)|0);i=p;i=e;return}function qE(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0,q=0;e=i;f=d;d=i;i=i+32|0;tF(d,f,32)|0;g=+h[d+16>>3];j=+h[d>>3];k=(g-j)*72.0/96.0;l=+h[d+24>>3];m=+h[d+8>>3];n=(l-m)*72.0/96.0;o=(g+j-k)*.5;if((a|0)==0){cc(101464,101048,57,170856)}if((b|0)==0){cc(100576,101048,58,170856)}d=b+8|0;if((c[d>>2]|0)==0){cc(100144,101048,59,170856)}_z(a,88712)|0;_z(a,c[d>>2]|0)|0;d=a+360|0;j=-0.0-(l+m+n)*.5;if((c[d>>2]|0)==0){dA(a,87376,(p=i,i=i+32|0,h[p>>3]=k,h[p+8>>3]=n,h[p+16>>3]=o,h[p+24>>3]=j,p)|0);i=p;q=_z(a,86816)|0;i=e;return}else{dA(a,88248,(p=i,i=i+32|0,h[p>>3]=n,h[p+8>>3]=k,h[p+16>>3]=o,h[p+24>>3]=j,p)|0);i=p;dA(a,87832,(p=i,i=i+24|0,c[p>>2]=c[d>>2],h[p+8>>3]=o,h[p+16>>3]=j,p)|0);i=p;q=_z(a,86816)|0;i=e;return}}function rE(a){a=a|0;c[53566]=1;xt(a);c[53566]=0;return}function sE(a){a=a|0;c[53566]=2;xt(a);c[53566]=0;return}function tE(a){a=a|0;var b=0;if((zE(a)|0)!=0){b=1;return b|0}b=(uE(a)|0)!=0|0;return b|0}function uE(a){a=a|0;var b=0;if(a>>>0<131072>>>0){b=(d[3432+((d[3432+(a>>>8)|0]|0)<<5|a>>>3&31)|0]|0)>>>((a&7)>>>0)&1;return b|0}else{b=a>>>0<196606>>>0|0;return b|0}return 0}function vE(a){a=a|0;return Wa(a|0)|0}function wE(a){a=a|0;var b=0;if(a>>>0<32>>>0|(a-127|0)>>>0<33>>>0|(a-8232|0)>>>0<2>>>0){b=1;return b|0}b=(a-65529|0)>>>0<3>>>0|0;return b|0}function xE(a,b){a=a|0;b=b|0;var c=0;switch(b|0){case 6:{c=AE(a)|0;break};case 1:{c=tE(a)|0;break};case 8:{c=CE(a)|0;break};case 2:{c=uE(a)|0;break};case 4:{c=wE(a)|0;break};case 11:{c=FE(a)|0;break};case 12:{c=GE(a)|0;break};case 3:{c=vE(a)|0;break};case 10:{c=EE(a)|0;break};case 5:{c=zE(a)|0;break};case 9:{c=DE(a)|0;break};case 7:{c=BE(a)|0;break};default:{c=0}}return c|0}function yE(b){b=b|0;var c=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;c=a[b]|0;d=1;e=336;f=97;while(1){if(c<<24>>24==f<<24>>24){if((Ya(b|0,e|0)|0)==0){g=d;h=5;break}}i=e+6|0;j=a[i]|0;if(j<<24>>24==0){g=0;h=5;break}else{d=d+1|0;e=i;f=j}}if((h|0)==5){return g|0}return 0}function zE(a){a=a|0;return(a-48|0)>>>0<10>>>0|0}function AE(a){a=a|0;var b=0;if((EE(a)|0)!=0){b=0;return b|0}b=(CE(a)|0)!=0|0;return b|0}function BE(a){a=a|0;var b=0;if((HE(a)|0)!=(a|0)){b=1;return b|0}b=(a|0)==223|0;return b|0}function CE(a){a=a|0;var b=0;if(a>>>0<255>>>0){b=(a+1&127)>>>0>32>>>0|0;return b|0}if(a>>>0<8232>>>0|(a-8234|0)>>>0<47062>>>0|(a-57344|0)>>>0<8185>>>0){b=1;return b|0}else{return((a-65532|0)>>>0>1048579>>>0|(a&65534|0)==65534)&1^1|0}return 0}function DE(a){a=a|0;var b=0;if(a>>>0>=131072>>>0){b=0;return b|0}b=(d[6408+((d[6408+(a>>>8)|0]|0)<<5|a>>>3&31)|0]|0)>>>((a&7)>>>0)&1;return b|0}function EE(a){a=a|0;return(bF(20968,a)|0)!=0|0}function FE(a){a=a|0;return(JE(a)|0)!=(a|0)|0}function GE(a){a=a|0;var b=0;if((a-48|0)>>>0<10>>>0){b=1;return b|0}b=((a|32)-97|0)>>>0<6>>>0|0;return b|0}function HE(a){a=a|0;return IE(a,0)|0}function IE(c,f){c=c|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;g=(f<<1)-1|0;h=f-1|0;if((uE(c)|0)==0|(c-1536|0)>>>0<2560>>>0|(c-11776|0)>>>0<30784>>>0|(c-43008|0)>>>0<22272>>>0){i=c;return i|0}do{if((f|0)==0){if((c-11520|0)>>>0>=38>>>0){j=0;break}i=c-7264|0;return i|0}else{if((c-4256|0)>>>0>=46>>>0){j=0;break}do{if((c|0)>4293){if((c|0)==4301|(c|0)==4295){break}else{i=c}return i|0}}while(0);i=c+7264|0;return i|0}}while(0);while(1){k=a[71074+(j<<2)|0]|0;l=k<<24>>24;m=c-(e[71072+(j<<2)>>1]|0)|0;n=j+1|0;if((m-(l&h)|0)>>>0<(d[71075+(j<<2)|0]|0)>>>0){o=12;break}if((n|0)==61){break}else{j=n}}if((o|0)==12){if(k<<24>>24==1){i=f+c-(m&1)|0;return i|0}else{i=(da(l,g)|0)+c|0;return i|0}}g=1-f|0;l=b[14808+(g<<1)>>1]|0;a:do{if(l<<16>>16!=0){m=0;k=l;while(1){o=m+1|0;if((k&65535|0)==(c|0)){break}j=b[14808+(o<<2)+(g<<1)>>1]|0;if(j<<16>>16==0){break a}else{m=o;k=j}}i=e[14808+(m<<2)+(f<<1)>>1]|0;return i|0}}while(0);if((c-66600+(f*40|0)|0)>>>0>=40>>>0){i=c;return i|0}i=c-40+(f*80|0)|0;return i|0}function JE(a){a=a|0;return IE(a,1)|0}function KE(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0;g=i;i=i+8|0;h=g|0;c[h>>2]=b;if((e|0)==0){j=0;i=g;return j|0}do{if((f|0)!=0){if((b|0)==0){k=h;c[h>>2]=k;l=k}else{l=b}k=a[e]|0;m=k&255;if(k<<24>>24>-1){c[l>>2]=m;j=k<<24>>24!=0|0;i=g;return j|0}k=m-194|0;if(k>>>0>50>>>0){break}m=e+1|0;n=c[r+(k<<2)>>2]|0;if(f>>>0<4>>>0){if((n&-2147483648>>>(((f*6|0)-6|0)>>>0)|0)!=0){break}}k=d[m]|0;m=k>>>3;if((m-16|m+(n>>26))>>>0>7>>>0){break}m=k-128|n<<6;if((m|0)>=0){c[l>>2]=m;j=2;i=g;return j|0}n=(d[e+2|0]|0)-128|0;if(n>>>0>63>>>0){break}k=n|m<<6;if((k|0)>=0){c[l>>2]=k;j=3;i=g;return j|0}m=(d[e+3|0]|0)-128|0;if(m>>>0>63>>>0){break}c[l>>2]=m|k<<6;j=4;i=g;return j|0}}while(0);c[(Vb()|0)>>2]=84;j=-1;i=g;return j|0}function LE(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0;f=i;i=i+104|0;g=f|0;h=f+8|0;j=f+16|0;k=f+24|0;l=f+32|0;m=f+40|0;n=f+48|0;o=f+56|0;p=dF(20)|0;q=p;if((p|0)==0){r=12;i=f;return r|0}s=dF(2048)|0;c[p+16>>2]=s;if((s|0)==0){eF(p);r=12;i=f;return r|0}c[p>>2]=512;c[p+4>>2]=10240;c[p+8>>2]=128;c[p+12>>2]=0;s=_E(0,0)|0;if((s|0)==0){eF(c[p+16>>2]|0);eF(p);r=12;i=f;return r|0}vF(o|0,0,44)|0;c[o>>2]=s;c[o+4>>2]=q;c[o+12>>2]=d;c[o+36>>2]=e;d=o+28|0;c[d>>2]=-1;t=ME(o)|0;a:do{if((t|0)==0){u=o+20|0;v=c[u>>2]|0;w=v-1|0;c[b>>2]=w;x=c[o+8>>2]|0;y=c[d>>2]|0;if((y|0)>-1){if((c[o+32>>2]|0)!=0){z=2;A=0;B=0;C=0;break}}if((y|0)>(w|0)){z=6;A=0;B=0;C=0;break}w=fF(1,68)|0;D=w;if((w|0)==0){z=12;A=D;B=0;C=0;break}E=y>>>31;c[w+60>>2]=E^1;c[w+64>>2]=c[o+32>>2];c[w+28>>2]=v;if((E|0)==1){if((e&8|0)==0){F=13}else{G=0}}else{F=13}if((F|0)==13){E=NE(0,q,x,D)|0;if((E|0)!=0){z=E;A=D;B=0;C=0;break}E=c[w+40>>2]|0;if((E|0)>0){v=(E<<2)+4|0;y=dF(v)|0;H=y;if((y|0)==0){z=12;A=D;B=0;C=0;break}c[w+32>>2]=H;vF(y|0,-1|0,v|0)|0;I=H}else{I=0}H=fF(E<<1|1,4)|0;c[w+36>>2]=H;if((H|0)==0){z=12;A=D;B=0;C=0;break}H=fF(c[u>>2]|0,12)|0;if((H|0)==0){z=12;A=D;B=0;C=0;break}c[w+16>>2]=H;H=NE(s,q,x,D)|0;if((H|0)==0){G=I}else{z=H;A=D;B=0;C=0;break}}H=o+24|0;u=p+12|0;E=c[u>>2]|0;c[j>>2]=0;c[k>>2]=0;v=TE(q,x)|0;b:do{if((v|0)==0){y=TE(q,0)|0;if((y|0)!=0){J=y;break}y=p+16|0;K=c[u>>2]|0;c:do{if((K|0)>(E|0)){L=0;M=0;N=0;O=K;d:while(1){P=O-1|0;c[u>>2]=P;Q=c[y>>2]|0;R=c[Q+(P<<2)>>2]|0;P=O-2|0;c[u>>2]=P;S=c[Q+(P<<2)>>2]|0;do{if((R|0)==0){P=c[S>>2]|0;if((P|0)==2){T=c[S+4>>2]|0;U=TE(q,L)|0;if((U|0)!=0){V=U;W=M;break c}U=TE(q,S)|0;if((U|0)!=0){V=U;W=M;break c}U=TE(q,1)|0;if((U|0)!=0){V=U;W=M;break c}U=TE(q,c[T>>2]|0)|0;if((U|0)!=0){V=U;W=M;break c}U=TE(q,0)|0;if((U|0)!=0){V=U;W=M;break c}if((c[T+4>>2]|0)>1){F=45}else{if((c[T+8>>2]|0)>1){F=45}else{X=L}}if((F|0)==45){F=0;c[j>>2]=0;X=0}Y=N+1|0;Z=M;_=X;break}else if((P|0)==0){T=c[S+4>>2]|0;U=c[T>>2]|0;if(!((U|0)>-1|(U|0)==-4)){Y=N;Z=M;_=L;break}U=T+8|0;T=(c[U>>2]|0)+L|0;c[U>>2]=T;if((T|0)<=(c[k>>2]|0)){Y=N;Z=M;_=L;break}c[k>>2]=T;Y=N;Z=M;_=L;break}else if((P|0)==1){T=c[S+4>>2]|0;U=TE(q,c[T+4>>2]|0)|0;if((U|0)!=0){V=U;W=M;break c}U=TE(q,0)|0;if((U|0)!=0){V=U;W=M;break c}U=TE(q,c[T>>2]|0)|0;if((U|0)!=0){V=U;W=M;break c}$=TE(q,0)|0}else if((P|0)==3){P=c[S+4>>2]|0;U=TE(q,c[P+4>>2]|0)|0;if((U|0)!=0){V=U;W=M;break c}U=TE(q,0)|0;if((U|0)!=0){V=U;W=M;break c}U=TE(q,c[P>>2]|0)|0;if((U|0)!=0){V=U;W=M;break c}$=TE(q,0)|0}else{Y=N;Z=M;_=L;break}if(($|0)==0){Y=N;Z=M;_=L}else{V=$;W=M;break c}}else if((R|0)==1){U=S+4|0;P=c[U>>2]|0;T=O-3|0;c[u>>2]=T;aa=c[Q+(T<<2)>>2]|0;c[j>>2]=aa;T=P+4|0;ba=c[T>>2]|0;do{if((ba|0)>1){c[l>>2]=0;ca=P;F=51}else{if((c[P+8>>2]|0)<=1){da=aa;break}c[l>>2]=0;ea=P;if((ba|0)>0){ca=ea;F=51}else{fa=ba;ga=0;ha=aa;ia=ea;F=60}}}while(0);e:do{if((F|0)==51){F=0;ea=ba;ja=0;ka=1;la=aa;while(1){ma=UE(s,q,c[ca>>2]|0,(ka|0)<(ea|0)?1:2,j,G,m,k)|0;if((ma|0)!=0){J=ma;break b}ma=c[m>>2]|0;if((ja|0)==0){na=ma}else{oa=aF(s,0,0,1,32)|0;if((oa|0)==0){J=12;break b}pa=aF(s,0,0,1,8)|0;qa=oa+4|0;c[qa>>2]=pa;if((pa|0)==0){J=12;break b}c[oa>>2]=1;c[oa+8>>2]=-1;c[oa+12>>2]=-1;c[pa>>2]=ja;c[(c[qa>>2]|0)+4>>2]=ma;c[oa+16>>2]=(c[ma+16>>2]|0)+(c[ja+16>>2]|0);na=oa}if((na|0)==0){J=12;break b}oa=c[T>>2]|0;if((ka|0)>=(oa|0)){fa=oa;ga=na;ha=la;ia=ca;F=60;break e}ea=oa;ja=na;ka=ka+1|0;la=c[j>>2]|0}}}while(0);if((F|0)==60){F=0;T=P+8|0;ba=c[T>>2]|0;do{if((ba|0)==-1){la=c[j>>2]|0;ka=UE(s,q,c[ia>>2]|0,0,j,0,l,k)|0;if((ka|0)!=0){J=ka;break b}ka=c[l>>2]|0;ja=aF(s,0,0,1,32)|0;ea=ja;if((ja|0)==0){F=65;break d}oa=aF(s,0,0,1,16)|0;c[ja+4>>2]=oa;if((oa|0)==0){F=65;break d}c[ja>>2]=2;c[ja+8>>2]=-1;c[ja+12>>2]=-1;c[oa>>2]=ka;c[oa+4>>2]=0;c[oa+8>>2]=-1;ma=oa+12|0;a[ma]=a[ma]&-2;c[ja+16>>2]=c[ka+16>>2];c[l>>2]=ea;ra=la;sa=ea}else{if((fa|0)<(ba|0)){ta=fa;ua=0}else{ra=ha;sa=0;break}while(1){ea=c[j>>2]|0;la=UE(s,q,c[ia>>2]|0,0,j,0,n,k)|0;if((la|0)!=0){J=la;break b}la=c[n>>2]|0;if((ua|0)==0){va=la}else{ka=aF(s,0,0,1,32)|0;if((ka|0)==0){F=73;break d}ja=aF(s,0,0,1,8)|0;ma=ka+4|0;c[ma>>2]=ja;if((ja|0)==0){F=73;break d}c[ka>>2]=1;c[ka+8>>2]=-1;c[ka+12>>2]=-1;c[ja>>2]=la;c[(c[ma>>2]|0)+4>>2]=ua;c[ka+16>>2]=(c[ua+16>>2]|0)+(c[la+16>>2]|0);va=ka}c[l>>2]=va;if((va|0)==0){J=12;break b}ka=aF(s,0,0,1,32)|0;if((ka|0)==0){J=12;break b}la=aF(s,0,0,1,20)|0;c[ka+4>>2]=la;if((la|0)==0){J=12;break b}c[ka>>2]=0;c[ka+8>>2]=-1;c[ka+12>>2]=-1;c[la>>2]=-1;c[la+4>>2]=-1;c[la+8>>2]=-1;la=aF(s,0,0,1,32)|0;ma=la;if((la|0)==0){F=79;break d}ja=aF(s,0,0,1,8)|0;oa=la+4|0;c[oa>>2]=ja;if((ja|0)==0){F=79;break d}c[la>>2]=3;c[la+8>>2]=-1;c[la+12>>2]=-1;c[ja>>2]=ka;c[(c[oa>>2]|0)+4>>2]=va;c[la+16>>2]=(c[va+16>>2]|0)+(c[ka+16>>2]|0);c[l>>2]=ma;ka=ta+1|0;if((ka|0)<(c[T>>2]|0)){ta=ka;ua=ma}else{ra=ea;sa=ma;break}}}}while(0);c[j>>2]=ra;do{if((ga|0)==0){wa=sa;F=85}else{if((sa|0)==0){xa=ga;break}T=aF(s,0,0,1,32)|0;if((T|0)==0){J=12;break b}ba=aF(s,0,0,1,8)|0;P=T+4|0;c[P>>2]=ba;if((ba|0)==0){J=12;break b}c[T>>2]=1;c[T+8>>2]=-1;c[T+12>>2]=-1;c[ba>>2]=ga;c[(c[P>>2]|0)+4>>2]=sa;c[T+16>>2]=(c[sa+16>>2]|0)+(c[ga+16>>2]|0);wa=T;F=85}}while(0);if((F|0)==85){F=0;if((wa|0)==0){J=12;break b}else{xa=wa}}c[U>>2]=c[xa+4>>2];c[S>>2]=c[xa>>2];da=ra}T=N-1|0;P=da-aa+M|0;if((T|0)!=0){Y=T;Z=P;_=da;break}c[j>>2]=P;Y=0;Z=P;_=P}else{Y=N;Z=M;_=L}}while(0);S=c[u>>2]|0;if((S|0)>(E|0)){L=_;M=Z;N=Y;O=S}else{V=0;W=Z;break c}}if((F|0)==65){c[l>>2]=0;J=12;break b}else if((F|0)==73){c[l>>2]=0;J=12;break b}else if((F|0)==79){c[l>>2]=0;J=12;break b}}else{V=0;W=0}}while(0);y=(c[H>>2]|0)+W|0;K=c[k>>2]|0;c[H>>2]=(K|0)>(y|0)?K:y;J=V}else{J=v}}while(0);if((J|0)!=0){z=J;A=D;B=0;C=0;break}v=c[H>>2]|0;c[H>>2]=v+1;E=aF(s,0,0,1,32)|0;if((E|0)==0){z=12;A=D;B=0;C=0;break}y=aF(s,0,0,1,20)|0;c[E+4>>2]=y;if((y|0)==0){z=12;A=D;B=0;C=0;break}c[E>>2]=0;c[E+8>>2]=-1;c[E+12>>2]=-1;c[y>>2]=0;c[y+4>>2]=0;c[y+8>>2]=v;v=aF(s,0,0,1,32)|0;y=v;if((v|0)==0){z=12;A=D;B=0;C=0;break}K=aF(s,0,0,1,8)|0;O=v+4|0;c[O>>2]=K;if((K|0)==0){z=12;A=D;B=0;C=0;break}c[v>>2]=1;c[v+8>>2]=-1;c[v+12>>2]=-1;c[K>>2]=x;c[(c[O>>2]|0)+4>>2]=E;c[v+16>>2]=(c[E+16>>2]|0)+(c[x+16>>2]|0);E=c[u>>2]|0;O=TE(q,v)|0;if((O|0)!=0){z=O;A=D;B=0;C=0;break}O=TE(q,0)|0;if((O|0)!=0){z=O;A=D;B=0;C=0;break}O=c[u>>2]|0;f:do{if((O|0)>(E|0)){K=p+16|0;N=O;g:while(1){M=N-1|0;c[u>>2]=M;L=c[K>>2]|0;S=c[L+(M<<2)>>2]|0;M=N-2|0;c[u>>2]=M;ya=c[L+(M<<2)>>2]|0;do{if((S|0)==3){M=c[ya+4>>2]|0;L=M;do{if((c[M+4>>2]|0)==0){F=141}else{if((c[(c[L>>2]|0)+8>>2]|0)!=0){F=141;break}c[ya+8>>2]=0}}while(0);if((F|0)==141){F=0;c[ya+8>>2]=1}c[ya+24>>2]=c[(c[L>>2]|0)+24>>2];c[ya+28>>2]=c[(c[L>>2]|0)+28>>2]}else if((S|0)==2){M=c[ya+4>>2]|0;Q=M;if((c[(c[Q>>2]|0)+8>>2]|0)==0){za=0}else{za=(c[(c[M+4>>2]|0)+8>>2]|0)!=0|0}c[ya+8>>2]=za;R=c[Q>>2]|0;if((c[R+8>>2]|0)==0){c[ya+24>>2]=c[R+24>>2];Aa=M+4|0}else{P=SE(q,R,0,0,g)|0;if((P|0)!=0){z=P;A=D;B=0;C=0;break a}Ba=dF((c[g>>2]<<2)+4|0)|0;P=Ba;if((Ba|0)==0){z=12;A=D;B=0;C=0;break a}c[P>>2]=-1;c[h>>2]=0;Ca=SE(q,c[Q>>2]|0,P,h,0)|0;if((Ca|0)!=0){F=150;break g}R=M+4|0;M=ya+24|0;c[M>>2]=RE(s,c[(c[R>>2]|0)+24>>2]|0,c[(c[Q>>2]|0)+24>>2]|0,P,c[h>>2]|0)|0;eF(Ba);if((c[M>>2]|0)==0){z=12;A=D;B=0;C=0;break a}else{Aa=R}}R=c[Aa>>2]|0;if((c[R+8>>2]|0)==0){c[ya+28>>2]=c[R+28>>2];break}M=SE(q,R,0,0,g)|0;if((M|0)!=0){z=M;A=D;B=0;C=0;break a}Da=dF((c[g>>2]<<2)+4|0)|0;M=Da;if((Da|0)==0){z=12;A=D;B=0;C=0;break a}c[M>>2]=-1;c[h>>2]=0;Ea=SE(q,c[Aa>>2]|0,M,h,0)|0;if((Ea|0)!=0){F=157;break g}R=ya+28|0;c[R>>2]=RE(s,c[(c[Q>>2]|0)+28>>2]|0,c[(c[Aa>>2]|0)+28>>2]|0,M,c[h>>2]|0)|0;eF(Da);if((c[R>>2]|0)==0){z=12;A=D;B=0;C=0;break a}}else if((S|0)==1){R=c[ya+4>>2]|0;M=R;Q=R+4|0;if((c[(c[M>>2]|0)+8>>2]|0)==0){Fa=(c[(c[Q>>2]|0)+8>>2]|0)!=0|0}else{Fa=1}c[ya+8>>2]=Fa;R=RE(s,c[(c[M>>2]|0)+24>>2]|0,c[(c[Q>>2]|0)+24>>2]|0,0,0)|0;c[ya+24>>2]=R;if((R|0)==0){z=12;A=D;B=0;C=0;break a}R=RE(s,c[(c[M>>2]|0)+28>>2]|0,c[(c[Q>>2]|0)+28>>2]|0,0,0)|0;c[ya+28>>2]=R;if((R|0)==0){z=12;A=D;B=0;C=0;break a}}else if((S|0)==0){R=c[ya>>2]|0;if((R|0)==1){Q=TE(q,ya)|0;if((Q|0)!=0){z=Q;A=D;B=0;C=0;break a}Q=TE(q,2)|0;if((Q|0)!=0){z=Q;A=D;B=0;C=0;break a}Q=ya+4|0;M=TE(q,c[(c[Q>>2]|0)+4>>2]|0)|0;if((M|0)!=0){z=M;A=D;B=0;C=0;break a}M=TE(q,0)|0;if((M|0)!=0){z=M;A=D;B=0;C=0;break a}M=TE(q,c[c[Q>>2]>>2]|0)|0;if((M|0)!=0){z=M;A=D;B=0;C=0;break a}M=TE(q,0)|0;if((M|0)==0){break}else{z=M;A=D;B=0;C=0;break a}}else if((R|0)==2){M=TE(q,ya)|0;if((M|0)!=0){z=M;A=D;B=0;C=0;break a}M=TE(q,3)|0;if((M|0)!=0){z=M;A=D;B=0;C=0;break a}M=TE(q,c[c[ya+4>>2]>>2]|0)|0;if((M|0)!=0){z=M;A=D;B=0;C=0;break a}M=TE(q,0)|0;if((M|0)==0){break}else{z=M;A=D;B=0;C=0;break a}}else if((R|0)==0){M=c[ya+4>>2]|0;Q=M;P=c[Q>>2]|0;if((P|0)==-4){c[ya+8>>2]=0;T=M+8|0;ba=c[T>>2]|0;ma=aF(s,0,0,1,64)|0;if((ma|0)==0){F=104;break g}c[ma>>2]=ba;c[ma+4>>2]=0;c[ma+8>>2]=1114111;c[ma+20>>2]=0;c[ma+24>>2]=0;vF(ma+28|0,-1|0,16)|0;c[ya+24>>2]=ma;ma=c[T>>2]|0;T=c[M+4>>2]|0;ba=aF(s,0,0,1,64)|0;if((ba|0)==0){F=106;break g}c[ba>>2]=ma;c[ba+4>>2]=0;c[ba+8>>2]=1114111;c[ba+20>>2]=0;c[ba+24>>2]=0;c[ba+28>>2]=T;c[ba+32>>2]=-1;c[ba+36>>2]=-1;c[ba+40>>2]=-1;c[ya+28>>2]=ba;break}ba=ya+8|0;if((P|0)<0){c[ba>>2]=1;P=aF(s,0,0,1,32)|0;if((P|0)==0){F=110;break g}c[P>>2]=-1;c[P+4>>2]=-1;c[P+8>>2]=-1;c[ya+24>>2]=P;P=aF(s,0,0,1,32)|0;if((P|0)==0){F=112;break g}c[P>>2]=-1;c[P+4>>2]=-1;c[P+8>>2]=-1;c[ya+28>>2]=P;break}else{c[ba>>2]=0;ba=M+8|0;P=c[ba>>2]|0;T=c[Q>>2]|0;ma=M+4|0;ea=c[ma>>2]|0;ka=aF(s,0,0,1,64)|0;if((ka|0)==0){F=115;break g}c[ka>>2]=P;c[ka+4>>2]=T;c[ka+8>>2]=ea;c[ka+20>>2]=0;c[ka+24>>2]=0;vF(ka+28|0,-1|0,16)|0;c[ya+24>>2]=ka;ka=c[ba>>2]|0;ba=c[Q>>2]|0;Q=c[ma>>2]|0;ma=c[M+12>>2]|0;ea=c[M+16>>2]|0;M=aF(s,0,0,1,64)|0;if((M|0)==0){F=117;break g}c[M>>2]=ka;c[M+4>>2]=ba;c[M+8>>2]=Q;c[M+20>>2]=ma;c[M+24>>2]=ea;vF(M+28|0,-1|0,16)|0;c[ya+28>>2]=M;break}}else if((R|0)==3){R=TE(q,ya)|0;if((R|0)!=0){z=R;A=D;B=0;C=0;break a}R=TE(q,1)|0;if((R|0)!=0){z=R;A=D;B=0;C=0;break a}R=ya+4|0;M=TE(q,c[(c[R>>2]|0)+4>>2]|0)|0;if((M|0)!=0){z=M;A=D;B=0;C=0;break a}M=TE(q,0)|0;if((M|0)!=0){z=M;A=D;B=0;C=0;break a}M=TE(q,c[c[R>>2]>>2]|0)|0;if((M|0)!=0){z=M;A=D;B=0;C=0;break a}M=TE(q,0)|0;if((M|0)==0){break}else{z=M;A=D;B=0;C=0;break a}}else{break}}}while(0);N=c[u>>2]|0;if((N|0)<=(E|0)){break f}}if((F|0)==104){c[ya+24>>2]=0;z=12;A=D;B=0;C=0;break a}else if((F|0)==106){c[ya+28>>2]=0;z=12;A=D;B=0;C=0;break a}else if((F|0)==110){c[ya+24>>2]=0;z=12;A=D;B=0;C=0;break a}else if((F|0)==112){c[ya+28>>2]=0;z=12;A=D;B=0;C=0;break a}else if((F|0)==115){c[ya+24>>2]=0;z=12;A=D;B=0;C=0;break a}else if((F|0)==117){c[ya+28>>2]=0;z=12;A=D;B=0;C=0;break a}else if((F|0)==150){eF(Ba);z=Ca;A=D;B=0;C=0;break a}else if((F|0)==157){eF(Da);z=Ea;A=D;B=0;C=0;break a}}}while(0);E=c[H>>2]|0;u=E<<2;O=dF(u)|0;x=O;if((O|0)==0){z=12;A=D;B=x;C=0;break}N=dF(u)|0;u=N;if((N|0)==0){z=12;A=D;B=x;C=u;break}if((E|0)>0){vF(O|0,0,((E|0)>1?E<<2:4)|0)|0}OE(y,0,x,0)|0;E=c[H>>2]|0;if((E|0)>0){K=0;S=0;while(1){c[u+(K<<2)>>2]=S;M=x+(K<<2)|0;R=S+1+(c[M>>2]|0)|0;c[M>>2]=0;M=K+1|0;if((M|0)<(E|0)){K=M;S=R}else{Ga=R;break}}}else{Ga=0}S=fF(Ga+1|0,32)|0;K=S;if((S|0)==0){z=12;A=D;B=x;C=u;break}c[w>>2]=K;S=w+4|0;c[S>>2]=Ga;E=OE(y,K,x,u)|0;if((E|0)!=0){z=E;A=D;B=x;C=u;break}c[w+20>>2]=0;E=v+24|0;R=c[E>>2]|0;if((c[R>>2]|0)>-1){M=1;ea=R;while(1){R=ea+32|0;ma=M+1|0;if((c[R>>2]|0)>-1){M=ma;ea=R}else{Ha=ma;break}}}else{Ha=1}ea=fF(Ha,32)|0;M=ea;if((ea|0)==0){z=12;A=D;B=x;C=u;break}c[w+8>>2]=M;ea=c[E>>2]|0;y=c[ea>>2]|0;if((y|0)>-1){ma=0;R=ea;ea=y;while(1){c[M+(ma<<5)+8>>2]=K+(c[u+(ea<<2)>>2]<<5);c[M+(ma<<5)+12>>2]=c[R>>2];y=M+(ma<<5)+16|0;c[y>>2]=0;Q=R+12|0;ba=c[Q>>2]|0;if((ba|0)!=0){ka=0;while(1){Ia=ka+1|0;if((c[ba+(ka<<2)>>2]|0)>-1){ka=Ia}else{break}}ka=Ia<<2;ba=dF(ka)|0;c[y>>2]=ba;if((ba|0)==0){z=12;A=D;B=x;C=u;break a}tF(ba|0,c[Q>>2]|0,ka)|0}c[M+(ma<<5)+20>>2]=c[R+16>>2];ka=ma+1|0;ba=R+32|0;T=c[ba>>2]|0;if((T|0)>-1){ma=ka;R=ba;ea=T}else{Ja=ka;break}}}else{Ja=0}c[M+(Ja<<5)+8>>2]=0;c[S>>2]=Ga;c[w+12>>2]=K+(c[u+(c[c[v+28>>2]>>2]<<2)>>2]<<5);c[w+52>>2]=c[H>>2];c[w+56>>2]=e;$E(s);eF(c[p+16>>2]|0);eF(p);eF(O);eF(N);c[b+4>>2]=w;r=0;i=f;return r|0}else{z=t;A=0;B=0;C=0}}while(0);$E(s);eF(c[p+16>>2]|0);eF(p);if((B|0)!=0){eF(B)}if((C|0)!=0){eF(C)}c[b+4>>2]=A;PE(b);r=z;i=f;return r|0}function ME(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,_a=0,$a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,_b=0,$b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0;d=i;i=i+424|0;e=d|0;f=d+8|0;g=d+72|0;h=d+328|0;j=d+336|0;k=d+384|0;l=d+392|0;m=c[b+4>>2]|0;n=m+12|0;o=c[n>>2]|0;if((c[b+40>>2]|0)==0){p=b+20|0;TE(m,c[p>>2]|0)|0;TE(m,2)|0;c[p>>2]=(c[p>>2]|0)+1}p=TE(m,0)|0;q=b+12|0;r=b+16|0;c[r>>2]=c[q>>2];s=c[n>>2]|0;t=(p|0)==0;a:do{if((s|0)>(o|0)&t){u=m+16|0;v=b+36|0;w=b|0;x=b+24|0;y=b+20|0;z=f|0;A=b+28|0;B=l|0;C=k|0;D=k+1|0;E=j;F=b;G=j+12|0;H=j+40|0;I=j+24|0;J=j+8|0;K=0;L=0;M=s;b:while(1){N=M-1|0;c[n>>2]=N;O=c[u>>2]|0;c:do{switch(c[O+(N<<2)>>2]|0){case 7:{P=c[q>>2]|0;Q=a[P]|0;if((Q|0)==41){c[q>>2]=P+1;R=0;S=L;T=K;break c}else if((Q|0)!=124){R=0;S=L;T=K;break c}Q=TE(m,7)|0;if((Q|0)!=0){U=Q;V=L;W=6;break b}Q=TE(m,K)|0;if((Q|0)!=0){U=Q;V=L;W=6;break b}Q=TE(m,8)|0;if((Q|0)!=0){U=Q;V=L;W=6;break b}Q=TE(m,3)|0;if((Q|0)!=0){U=Q;V=L;W=6;break b}c[q>>2]=(c[q>>2]|0)+1;R=0;S=L;T=K;break};case 4:{Q=TE(m,9)|0;if((Q|0)!=0){U=Q;V=L;W=6;break b}R=TE(m,1)|0;S=L;T=K;break};case 5:{Q=c[q>>2]|0;P=a[Q]|0;if(P<<24>>24==0){R=0;S=L;T=K;break c}X=c[v>>2]&1;Y=(X|0)!=0;if(Y&P<<24>>24==124){R=0;S=L;T=K;break c}do{if(!(Y&P<<24>>24==41&(L|0)>0)){if((X|0)==0&P<<24>>24==92){if((a[Q+1|0]|0)==41){break}}Z=TE(m,5)|0;if((Z|0)!=0){U=Z;V=L;W=6;break b}Z=TE(m,K)|0;if((Z|0)!=0){U=Z;V=L;W=6;break b}Z=TE(m,6)|0;if((Z|0)!=0){U=Z;V=L;W=6;break b}R=TE(m,4)|0;S=L;T=K;break c}}while(0);P=(X|L|0)==0?8:0;Y=L-1|0;if((X|0)!=0){R=P;S=Y;T=K;break c}c[q>>2]=Q+2;R=P;S=Y;T=K;break};case 1:{Y=c[q>>2]|0;d:do{switch(a[Y]|0){case 91:{P=Y+1|0;c[q>>2]=P;Z=dF(128)|0;if((Z|0)==0){_=12;W=297;break b}if((a[P]|0)==94){$=Y+2|0;c[q>>2]=$;aa=1;ba=$}else{aa=0;ba=P}P=(aa|0)==0;$=ba;ca=32;da=0;ea=0;fa=Z;e:while(1){Z=a[$]|0;if((Z<<24>>24|0)==0){ga=$;ha=7;ia=fa;W=140;break}else if((Z<<24>>24|0)==93){if($>>>0>(c[q>>2]|0)>>>0){W=85;break}}Z=KE(e,$,-1)|0;if((Z|0)<0){c[e>>2]=-1;ja=1}else{ja=Z}Z=$+ja|0;do{if((a[Z]|0)==45){ka=ja+1|0;la=$+ka|0;if((a[la]|0)==93){W=94;break}ma=c[e>>2]|0;na=KE(e,la,-1)|0;if((na|0)<0){c[e>>2]=-1;oa=1;pa=-1}else{oa=na;pa=c[e>>2]|0}qa=$+(oa+ka)|0;ra=pa;sa=ma;ta=ma>>>0>pa>>>0?11:0;ua=0}else{W=94}}while(0);f:do{if((W|0)==94){W=0;ma=a[$]|0;do{if((ma<<24>>24|0)==91){ka=a[$+1|0]|0;if((ka<<24>>24|0)==46|(ka<<24>>24|0)==61){ga=$;ha=3;ia=fa;W=140;break e}else if((ka<<24>>24|0)!=58){va=0;break}ka=$+2|0;na=ka;while(1){la=a[na]|0;wa=la<<24>>24==0;if(la<<24>>24!=58&(wa^1)){na=na+1|0}else{break}}if(wa){ga=$;ha=4;ia=fa;W=140;break e}la=na-$-2|0;xa=(la|0)>63?63:la;DF(z|0,ka|0,xa|0)|0;a[f+xa|0]=0;xa=yE(z)|0;qa=na+2|0;ra=1114111;sa=0;ta=(xa|0)==0?4:0;ua=xa;break f}else if((ma<<24>>24|0)==45){if((a[$+1|0]|0)==93){va=0;break}va=(c[q>>2]|0)==($|0)?0:11}else{va=0}}while(0);ma=c[e>>2]|0;qa=Z;ra=ma;sa=ma;ta=va;ua=0}}while(0);if((ta|0)!=0){ga=qa;ha=ta;ia=fa;W=140;break}Z=(ua|0)!=0;do{if(P|Z^1){ma=c[w>>2]|0;if((da|0)<(ca|0)){ya=ca;za=fa}else{if((ca|0)>1024){ga=qa;ha=12;ia=fa;W=140;break e}xa=gF(fa,ca<<3)|0;if((xa|0)==0){ga=qa;ha=12;ia=fa;W=140;break e}else{ya=ca<<1;za=xa}}xa=aF(ma,0,0,1,32)|0;if((xa|0)==0){W=112;break e}la=aF(ma,0,0,1,20)|0;ma=xa+4|0;c[ma>>2]=la;if((la|0)==0){W=112;break e}c[xa>>2]=0;c[xa+8>>2]=-1;c[xa+12>>2]=-1;c[la>>2]=sa;c[la+4>>2]=ra;c[la+8>>2]=-1;c[za+(da<<2)>>2]=xa;c[(c[ma>>2]|0)+12>>2]=ua;Aa=0;Ba=ya;Ca=da+1|0;Da=ea;Ea=za}else{if((ea|0)>63){Aa=12;Ba=ca;Ca=da;Da=ea;Ea=fa;break}c[g+(ea<<2)>>2]=ua;Aa=0;Ba=ca;Ca=da;Da=ea+1|0;Ea=fa}}while(0);ma=(Aa|0)==0;if(ma&(((c[v>>2]&2|0)==0|Z)^1)){Fa=sa;Ga=Ba;Ha=Ca;Ia=Ea}else{if(ma){$=qa;ca=Ba;da=Ca;ea=Da;fa=Ea;continue}else{ga=qa;ha=Aa;ia=Ea;W=140;break}}while(1){ma=Fa;while(1){if(ma>>>0>ra>>>0){$=qa;ca=Ga;da=Ha;ea=Da;fa=Ia;continue e}if((BE(ma)|0)!=0){W=118;break}Ka=ma+1|0;if((FE(ma)|0)==0){ma=Ka}else{W=129;break}}if((W|0)==118){W=0;xa=HE(ma)|0;la=ma+1|0;g:do{if((BE(la)|0)==0){La=xa;Ma=la}else{Na=xa;Oa=la;while(1){if((HE(Oa)|0)!=(Na+1|0)|Oa>>>0>ra>>>0){La=Na;Ma=Oa;break g}Pa=HE(Oa)|0;Qa=Oa+1|0;if((BE(Qa)|0)==0){La=Pa;Ma=Qa;break}else{Na=Pa;Oa=Qa}}}}while(0);la=c[w>>2]|0;if((Ha|0)<(Ga|0)){Ra=Ga;Sa=Ia}else{if((Ga|0)>1024){ga=qa;ha=12;ia=Ia;W=140;break e}Oa=gF(Ia,Ga<<3)|0;if((Oa|0)==0){ga=qa;ha=12;ia=Ia;W=140;break e}else{Ra=Ga<<1;Sa=Oa}}Oa=aF(la,0,0,1,32)|0;Na=Oa;do{if((Oa|0)==0){Ta=0}else{na=aF(la,0,0,1,20)|0;c[Oa+4>>2]=na;if((na|0)==0){Ta=0;break}c[Oa>>2]=0;c[Oa+8>>2]=-1;c[Oa+12>>2]=-1;c[na>>2]=xa;c[na+4>>2]=La;c[na+8>>2]=-1;Ta=Na}}while(0);c[Sa+(Ha<<2)>>2]=Ta;Ua=Ma;Va=Ra;Wa=Ta;Xa=Sa}else if((W|0)==129){W=0;Na=JE(ma)|0;h:do{if((FE(Ka)|0)==0){Ya=Ka;Za=Na}else{xa=Ka;Oa=Na;while(1){if((JE(xa)|0)!=(Oa+1|0)|xa>>>0>ra>>>0){Ya=xa;Za=Oa;break h}la=xa+1|0;na=JE(xa)|0;if((FE(la)|0)==0){Ya=la;Za=na;break}else{xa=la;Oa=na}}}}while(0);ma=c[w>>2]|0;if((Ha|0)<(Ga|0)){_a=Ga;$a=Ia}else{if((Ga|0)>1024){ga=qa;ha=12;ia=Ia;W=140;break e}Oa=gF(Ia,Ga<<3)|0;if((Oa|0)==0){ga=qa;ha=12;ia=Ia;W=140;break e}else{_a=Ga<<1;$a=Oa}}Oa=aF(ma,0,0,1,32)|0;xa=Oa;do{if((Oa|0)==0){ab=0}else{na=aF(ma,0,0,1,20)|0;c[Oa+4>>2]=na;if((na|0)==0){ab=0;break}c[Oa>>2]=0;c[Oa+8>>2]=-1;c[Oa+12>>2]=-1;c[na>>2]=Na;c[na+4>>2]=Za;c[na+8>>2]=-1;ab=xa}}while(0);c[$a+(Ha<<2)>>2]=ab;Ua=Ya;Va=_a;Wa=ab;Xa=$a}if((Wa|0)==0){W=141;break e}else{Fa=Ua;Ga=Va;Ha=Ha+1|0;Ia=Xa}}}i:do{if((W|0)==85){W=0;c[q>>2]=$+1;ca=(aa|0)!=0;if(ca){Jb(fa|0,da|0,4,148)}j:do{if((da|0)>0){P=(ea|0)>0;Z=(ea<<2)+4|0;if(ca){bb=0;cb=0;db=0;eb=0}else{xa=0;Na=0;while(1){Oa=fa+(xa<<2)|0;ma=c[(c[Oa>>2]|0)+4>>2]|0;do{if((ma|0)==0){fb=Na;gb=0}else{c[ma+8>>2]=c[x>>2];if(P){na=aF(c[w>>2]|0,0,0,0,Z)|0;la=na;ka=ma+16|0;c[ka>>2]=la;if((na|0)==0){hb=Na;ib=12;jb=fa;break i}else{kb=0;lb=la}do{c[lb+(kb<<2)>>2]=c[g+(kb<<2)>>2];kb=kb+1|0;lb=c[ka>>2]|0}while((kb|0)<(ea|0));c[lb+(ea<<2)>>2]=0}else{c[ma+16>>2]=0}if((Na|0)==0){fb=c[Oa>>2]|0;gb=0;break}ka=c[w>>2]|0;la=c[Oa>>2]|0;na=aF(ka,0,0,1,32)|0;Qa=na;do{if((na|0)==0){mb=0}else{Pa=aF(ka,0,0,1,8)|0;nb=na+4|0;c[nb>>2]=Pa;if((Pa|0)==0){mb=0;break}c[na>>2]=3;c[na+8>>2]=-1;c[na+12>>2]=-1;c[Pa>>2]=Na;c[(c[nb>>2]|0)+4>>2]=la;c[na+16>>2]=(c[la+16>>2]|0)+(c[Na+16>>2]|0);mb=Qa}}while(0);fb=mb;gb=(mb|0)==0?12:0}}while(0);Oa=xa+1|0;if((Oa|0)<(da|0)&(gb|0)==0){xa=Oa;Na=fb}else{ob=gb;pb=0;qb=fb;break j}}}while(1){Na=fa+(bb<<2)|0;xa=c[(c[Na>>2]|0)+4>>2]|0;Oa=xa;ma=c[Oa>>2]|0;Qa=xa+4|0;la=c[Qa>>2]|0;do{if((ma|0)<(cb|0)){na=la+1|0;rb=eb;sb=0;tb=(na|0)<(cb|0)?cb:na;ub=db}else{if((ma|0)<=(db|0)){na=la+1|0;rb=eb;sb=0;tb=na;ub=na;break}c[Oa>>2]=db;c[Qa>>2]=ma-1;na=la+1|0;if((xa|0)==0){rb=eb;sb=0;tb=na;ub=na;break}c[xa+8>>2]=c[x>>2];if(P){ka=aF(c[w>>2]|0,0,0,0,Z)|0;nb=ka;Pa=xa+16|0;c[Pa>>2]=nb;if((ka|0)==0){hb=eb;ib=12;jb=fa;break i}else{vb=0;wb=nb}do{c[wb+(vb<<2)>>2]=c[g+(vb<<2)>>2];vb=vb+1|0;wb=c[Pa>>2]|0}while((vb|0)<(ea|0));c[wb+(ea<<2)>>2]=0}else{c[xa+16>>2]=0}if((eb|0)==0){rb=c[Na>>2]|0;sb=0;tb=na;ub=na;break}Pa=c[w>>2]|0;nb=c[Na>>2]|0;ka=aF(Pa,0,0,1,32)|0;xb=ka;do{if((ka|0)==0){yb=0}else{zb=aF(Pa,0,0,1,8)|0;Ab=ka+4|0;c[Ab>>2]=zb;if((zb|0)==0){yb=0;break}c[ka>>2]=3;c[ka+8>>2]=-1;c[ka+12>>2]=-1;c[zb>>2]=eb;c[(c[Ab>>2]|0)+4>>2]=nb;c[ka+16>>2]=(c[nb+16>>2]|0)+(c[eb+16>>2]|0);yb=xb}}while(0);rb=yb;sb=(yb|0)==0?12:0;tb=na;ub=na}}while(0);Na=bb+1|0;if((Na|0)<(da|0)&(sb|0)==0){bb=Na;cb=tb;db=ub;eb=rb}else{ob=sb;pb=ub;qb=rb;break}}}else{ob=0;pb=0;qb=0}}while(0);if((ob|0)!=0|ca^1){hb=qb;ib=ob;jb=fa;break}Z=c[w>>2]|0;P=c[x>>2]|0;Na=aF(Z,0,0,1,32)|0;xa=Na;if((Na|0)==0){hb=qb;ib=12;jb=fa;break}la=aF(Z,0,0,1,20)|0;Z=Na+4|0;c[Z>>2]=la;if((la|0)==0){hb=qb;ib=12;jb=fa;break}c[Na>>2]=0;c[Na+8>>2]=-1;c[Na+12>>2]=-1;c[la>>2]=pb;c[la+4>>2]=1114111;c[la+8>>2]=P;P=c[Z>>2]|0;if((ea|0)>0){Z=aF(c[w>>2]|0,0,0,0,(ea<<2)+4|0)|0;la=Z;ma=P+16|0;c[ma>>2]=la;if((Z|0)==0){hb=qb;ib=12;jb=fa;break}else{Bb=0;Cb=la}do{c[Cb+(Bb<<2)>>2]=c[g+(Bb<<2)>>2];Bb=Bb+1|0;Cb=c[ma>>2]|0}while((Bb|0)<(ea|0));c[Cb+(ea<<2)>>2]=0}else{c[P+16>>2]=0}if((qb|0)==0){hb=xa;ib=0;jb=fa;break}ma=c[w>>2]|0;ca=aF(ma,0,0,1,32)|0;la=ca;do{if((ca|0)==0){Db=0}else{Z=aF(ma,0,0,1,8)|0;Qa=ca+4|0;c[Qa>>2]=Z;if((Z|0)==0){Db=0;break}c[ca>>2]=3;c[ca+8>>2]=-1;c[ca+12>>2]=-1;c[Z>>2]=qb;c[(c[Qa>>2]|0)+4>>2]=xa;c[ca+16>>2]=(c[Na+16>>2]|0)+(c[qb+16>>2]|0);Db=la}}while(0);hb=Db;ib=(Db|0)==0?12:0;jb=fa}else if((W|0)==112){W=0;c[za+(da<<2)>>2]=0;ga=qa;ha=12;ia=za;W=140}else if((W|0)==141){W=0;c[q>>2]=qa;hb=0;ib=12;jb=Xa}}while(0);if((W|0)==140){W=0;c[q>>2]=ga;hb=0;ib=ha;jb=ia}eF(jb);c[x>>2]=(c[x>>2]|0)+1;if((ib|0)==0){R=0;S=L;T=hb;break c}else{_=ib;W=297;break b}break};case 40:{if((c[v>>2]&1|0)!=0){Eb=Y;W=74}break};case 46:{da=(c[v>>2]&4|0)==0;fa=c[w>>2]|0;ea=c[x>>2]|0;$=aF(fa,0,0,1,32)|0;la=$;Na=($|0)==0;if(da){if(Na){_=12;W=297;break b}da=aF(fa,0,0,1,20)|0;c[$+4>>2]=da;if((da|0)==0){_=12;W=297;break b}c[$>>2]=0;c[$+8>>2]=-1;c[$+12>>2]=-1;c[da>>2]=0;c[da+4>>2]=1114111;c[da+8>>2]=ea;Fb=(c[x>>2]|0)+1|0;Gb=la}else{if(Na){_=12;W=297;break b}Na=aF(fa,0,0,1,20)|0;c[$+4>>2]=Na;if((Na|0)==0){_=12;W=297;break b}c[$>>2]=0;c[$+8>>2]=-1;c[$+12>>2]=-1;c[Na>>2]=0;c[Na+4>>2]=9;c[Na+8>>2]=ea;ea=c[w>>2]|0;Na=(c[x>>2]|0)+1|0;fa=aF(ea,0,0,1,32)|0;if((fa|0)==0){_=12;W=297;break b}da=aF(ea,0,0,1,20)|0;c[fa+4>>2]=da;if((da|0)==0){_=12;W=297;break b}c[fa>>2]=0;c[fa+8>>2]=-1;c[fa+12>>2]=-1;c[da>>2]=11;c[da+4>>2]=1114111;c[da+8>>2]=Na;Na=c[w>>2]|0;da=aF(Na,0,0,1,32)|0;if((da|0)==0){_=12;W=297;break b}ea=aF(Na,0,0,1,8)|0;Na=da+4|0;c[Na>>2]=ea;if((ea|0)==0){_=12;W=297;break b}c[da>>2]=3;c[da+8>>2]=-1;c[da+12>>2]=-1;c[ea>>2]=la;c[(c[Na>>2]|0)+4>>2]=fa;c[da+16>>2]=(c[fa+16>>2]|0)+(c[$+16>>2]|0);Fb=(c[x>>2]|0)+2|0;Gb=da}c[x>>2]=Fb;c[q>>2]=(c[q>>2]|0)+1;R=0;S=L;T=Gb;break c;break};case 94:{if((c[v>>2]&1|0)==0){if((Y|0)!=(c[r>>2]|0)){break d}da=TE(m,5)|0;if((da|0)!=0){U=da;V=L;W=6;break b}}da=c[w>>2]|0;$=aF(da,0,0,1,32)|0;if(($|0)==0){_=12;W=297;break b}fa=aF(da,0,0,1,20)|0;c[$+4>>2]=fa;if((fa|0)==0){_=12;W=297;break b}c[$>>2]=0;c[$+8>>2]=-1;c[$+12>>2]=-1;c[fa>>2]=-2;c[fa+4>>2]=1;c[fa+8>>2]=-1;c[q>>2]=(c[q>>2]|0)+1;R=0;S=L;T=$;break c;break};case 36:{if((c[v>>2]&1|0)==0){if((a[Y+1|0]|0)!=0){break d}}$=c[w>>2]|0;fa=aF($,0,0,1,32)|0;if((fa|0)==0){_=12;W=297;break b}da=aF($,0,0,1,20)|0;c[fa+4>>2]=da;if((da|0)==0){_=12;W=297;break b}c[fa>>2]=0;c[fa+8>>2]=-1;c[fa+12>>2]=-1;c[da>>2]=-2;c[da+4>>2]=2;c[da+8>>2]=-1;c[q>>2]=(c[q>>2]|0)+1;R=0;S=L;T=fa;break c;break};case 92:{fa=Y+1|0;da=a[fa]|0;do{if((c[v>>2]&1|0)==0){if(da<<24>>24==40){c[q>>2]=fa;Eb=fa;W=74;break d}else{$=a[Y+1|0]|0;if($<<24>>24==41){W=268;break d}else{Hb=$;break}}}else{Hb=da}}while(0);da=Y+1|0;fa=Hb<<24>>24==0;if(fa){_=5;W=297;break b}else{Ib=0;Kb=996}while(1){$=Ib+1|0;if((a[992+(Ib<<3)|0]|0)==Hb<<24>>24){Lb=Kb;break}Na=996+($<<3)|0;if(($|0)==12){Lb=Na;break}else{Ib=$;Kb=Na}}Na=c[Lb>>2]|0;if((Na|0)!=0){tF(E|0,F|0,40)|0;c[G>>2]=Na;c[H>>2]=1;Na=ME(j)|0;if((Na|0)!=0){_=Na;W=297;break b}c[q>>2]=(c[q>>2]|0)+2;c[x>>2]=c[I>>2];R=0;S=L;T=c[J>>2]|0;break c}if(fa){_=5;W=297;break b}c[q>>2]=da;Na=a[da]|0;k:do{switch(Na|0){case 60:{$=c[w>>2]|0;la=aF($,0,0,1,32)|0;ea=la;do{if((la|0)==0){Mb=0}else{ca=aF($,0,0,1,20)|0;c[la+4>>2]=ca;if((ca|0)==0){Mb=0;break}c[la>>2]=0;c[la+8>>2]=-1;c[la+12>>2]=-1;c[ca>>2]=-2;c[ca+4>>2]=16;c[ca+8>>2]=-1;Mb=ea}}while(0);c[q>>2]=(c[q>>2]|0)+1;Nb=Mb;break};case 62:{ea=c[w>>2]|0;la=aF(ea,0,0,1,32)|0;$=la;do{if((la|0)==0){Ob=0}else{ca=aF(ea,0,0,1,20)|0;c[la+4>>2]=ca;if((ca|0)==0){Ob=0;break}c[la>>2]=0;c[la+8>>2]=-1;c[la+12>>2]=-1;c[ca>>2]=-2;c[ca+4>>2]=32;c[ca+8>>2]=-1;Ob=$}}while(0);c[q>>2]=(c[q>>2]|0)+1;Nb=Ob;break};case 120:{$=Y+2|0;c[q>>2]=$;la=a[$]|0;if(la<<24>>24==123){$=Y+3|0;c[q>>2]=$;ea=0;ca=$;while(1){$=a[ca]|0;if(($<<24>>24|0)==125|($<<24>>24|0)==0){Pb=ca;Qb=ea;break}if((GE($<<24>>24)|0)==0){_=9;W=297;break b}$=c[q>>2]|0;a[l+ea|0]=a[$]|0;xa=ea+1|0;ma=$+1|0;c[q>>2]=ma;if(xa>>>0>31>>>0){Pb=ma;Qb=xa;break}else{ea=xa;ca=ma}}c[q>>2]=Pb+1;a[l+Qb|0]=0;ca=Ja(B|0,0,16)|0;ea=c[w>>2]|0;ma=c[x>>2]|0;xa=aF(ea,0,0,1,32)|0;$=xa;do{if((xa|0)==0){Rb=0}else{P=aF(ea,0,0,1,20)|0;c[xa+4>>2]=P;if((P|0)==0){Rb=0;break}c[xa>>2]=0;c[xa+8>>2]=-1;c[xa+12>>2]=-1;c[P>>2]=ca;c[P+4>>2]=ca;c[P+8>>2]=ma;Rb=$}}while(0);c[x>>2]=(c[x>>2]|0)+1;Nb=Rb;break k}else{vF(C|0,0,3)|0;$=(GE(la<<24>>24)|0)==0;ma=c[q>>2]|0;if($){Sb=ma}else{a[C]=a[ma]|0;$=ma+1|0;c[q>>2]=$;Sb=$}if((GE(a[Sb]|0)|0)!=0){$=c[q>>2]|0;a[D]=a[$]|0;c[q>>2]=$+1}$=Ja(C|0,0,16)|0;ma=c[w>>2]|0;ca=c[x>>2]|0;xa=aF(ma,0,0,1,32)|0;ea=xa;do{if((xa|0)==0){Tb=0}else{P=aF(ma,0,0,1,20)|0;c[xa+4>>2]=P;if((P|0)==0){Tb=0;break}c[xa>>2]=0;c[xa+8>>2]=-1;c[xa+12>>2]=-1;c[P>>2]=$;c[P+4>>2]=$;c[P+8>>2]=ca;Tb=ea}}while(0);c[x>>2]=(c[x>>2]|0)+1;Nb=Tb;break k}break};case 98:{ea=c[w>>2]|0;ca=aF(ea,0,0,1,32)|0;$=ca;do{if((ca|0)==0){Ub=0}else{xa=aF(ea,0,0,1,20)|0;c[ca+4>>2]=xa;if((xa|0)==0){Ub=0;break}c[ca>>2]=0;c[ca+8>>2]=-1;c[ca+12>>2]=-1;c[xa>>2]=-2;c[xa+4>>2]=64;c[xa+8>>2]=-1;Ub=$}}while(0);c[q>>2]=(c[q>>2]|0)+1;Nb=Ub;break};case 66:{$=c[w>>2]|0;ca=aF($,0,0,1,32)|0;ea=ca;do{if((ca|0)==0){Vb=0}else{xa=aF($,0,0,1,20)|0;c[ca+4>>2]=xa;if((xa|0)==0){Vb=0;break}c[ca>>2]=0;c[ca+8>>2]=-1;c[ca+12>>2]=-1;c[xa>>2]=-2;c[xa+4>>2]=128;c[xa+8>>2]=-1;Vb=ea}}while(0);c[q>>2]=(c[q>>2]|0)+1;Nb=Vb;break};default:{if((zE(Na)|0)!=0){ea=(a[c[q>>2]|0]|0)-48|0;ca=c[w>>2]|0;$=c[x>>2]|0;xa=aF(ca,0,0,1,32)|0;if((xa|0)==0){_=12;W=297;break b}ma=aF(ca,0,0,1,20)|0;c[xa+4>>2]=ma;if((ma|0)==0){_=12;W=297;break b}c[xa>>2]=0;c[xa+8>>2]=-1;c[xa+12>>2]=-1;c[ma>>2]=-4;c[ma+4>>2]=ea;c[ma+8>>2]=$;c[x>>2]=(c[x>>2]|0)+1;$=c[A>>2]|0;c[A>>2]=(ea|0)<($|0)?$:ea;c[q>>2]=(c[q>>2]|0)+1;R=0;S=L;T=xa;break c}xa=c[w>>2]|0;ea=a[c[q>>2]|0]|0;$=c[x>>2]|0;ma=aF(xa,0,0,1,32)|0;ca=ma;do{if((ma|0)==0){Wb=0}else{la=aF(xa,0,0,1,20)|0;c[ma+4>>2]=la;if((la|0)==0){Wb=0;break}c[ma>>2]=0;c[ma+8>>2]=-1;c[ma+12>>2]=-1;c[la>>2]=ea;c[la+4>>2]=ea;c[la+8>>2]=$;Wb=ca}}while(0);c[x>>2]=(c[x>>2]|0)+1;c[q>>2]=(c[q>>2]|0)+1;Nb=Wb}}}while(0);if((Nb|0)==0){_=12;W=297;break b}else{R=0;S=L;T=Nb;break c}break};case 41:{if((L|0)!=0){W=267}break};case 42:case 124:case 123:case 43:case 63:{W=267;break};case 0:{W=268;break};default:{}}}while(0);if((W|0)==74){W=0;Q=L+1|0;c[q>>2]=Eb+1;X=TE(m,c[y>>2]|0)|0;if((X|0)!=0){U=X;V=Q;W=6;break b}X=TE(m,2)|0;if((X|0)!=0){U=X;V=Q;W=6;break b}X=TE(m,0)|0;if((X|0)!=0){U=X;V=Q;W=6;break b}c[y>>2]=(c[y>>2]|0)+1;R=0;S=Q;T=K;break c}else if((W|0)==267){W=0;if((c[v>>2]&1|0)!=0){W=268}}if((W|0)==268){W=0;Q=c[w>>2]|0;X=aF(Q,0,0,1,32)|0;if((X|0)==0){_=12;W=297;break b}Na=aF(Q,0,0,1,20)|0;c[X+4>>2]=Na;if((Na|0)==0){_=12;W=297;break b}c[X>>2]=0;c[X+8>>2]=-1;c[X+12>>2]=-1;c[Na>>2]=-1;c[Na+4>>2]=-1;c[Na+8>>2]=-1;R=0;S=L;T=X;break c}X=KE(h,Y,-1)|0;if((X|0)<0){c[h>>2]=-1;Xb=1}else{Xb=X}do{if((c[v>>2]&2|0)==0){W=283}else{if((FE(c[h>>2]|0)|0)==0){if((BE(c[h>>2]|0)|0)==0){W=283;break}}X=c[w>>2]|0;Na=HE(c[h>>2]|0)|0;Q=HE(c[h>>2]|0)|0;da=c[x>>2]|0;fa=aF(X,0,0,1,32)|0;if((fa|0)==0){_=12;W=297;break b}ca=aF(X,0,0,1,20)|0;c[fa+4>>2]=ca;if((ca|0)==0){_=12;W=297;break b}c[fa>>2]=0;c[fa+8>>2]=-1;c[fa+12>>2]=-1;c[ca>>2]=Na;c[ca+4>>2]=Q;c[ca+8>>2]=da;da=c[w>>2]|0;ca=JE(c[h>>2]|0)|0;Q=JE(c[h>>2]|0)|0;Na=c[x>>2]|0;X=aF(da,0,0,1,32)|0;if((X|0)==0){_=12;W=297;break b}$=aF(da,0,0,1,20)|0;c[X+4>>2]=$;if(($|0)==0){_=12;W=297;break b}c[X>>2]=0;c[X+8>>2]=-1;c[X+12>>2]=-1;c[$>>2]=ca;c[$+4>>2]=Q;c[$+8>>2]=Na;Na=c[w>>2]|0;$=aF(Na,0,0,1,32)|0;if(($|0)==0){_=12;W=297;break b}Q=aF(Na,0,0,1,8)|0;Na=$+4|0;c[Na>>2]=Q;if((Q|0)==0){_=12;W=297;break b}c[$>>2]=3;c[$+8>>2]=-1;c[$+12>>2]=-1;c[Q>>2]=fa;c[(c[Na>>2]|0)+4>>2]=X;c[$+16>>2]=(c[X+16>>2]|0)+(c[fa+16>>2]|0);Yb=$}}while(0);if((W|0)==283){W=0;Y=c[w>>2]|0;$=c[h>>2]|0;fa=c[x>>2]|0;X=aF(Y,0,0,1,32)|0;if((X|0)==0){_=12;W=297;break b}Na=aF(Y,0,0,1,20)|0;c[X+4>>2]=Na;if((Na|0)==0){_=12;W=297;break b}c[X>>2]=0;c[X+8>>2]=-1;c[X+12>>2]=-1;c[Na>>2]=$;c[Na+4>>2]=$;c[Na+8>>2]=fa;Yb=X}c[x>>2]=(c[x>>2]|0)+1;c[q>>2]=(c[q>>2]|0)+Xb;R=0;S=L;T=Yb;break};case 3:{X=TE(m,5)|0;if((X|0)!=0){U=X;V=L;W=6;break b}R=TE(m,4)|0;S=L;T=K;break};case 0:{if((c[v>>2]&1|0)!=0){X=TE(m,7)|0;if((X|0)!=0){U=X;V=L;W=6;break b}}R=TE(m,3)|0;S=L;T=K;break};case 8:{X=M-2|0;c[n>>2]=X;fa=c[O+(X<<2)>>2]|0;X=c[w>>2]|0;Na=aF(X,0,0,1,32)|0;if((Na|0)==0){_=12;W=297;break b}$=aF(X,0,0,1,8)|0;X=Na+4|0;c[X>>2]=$;if(($|0)==0){_=12;W=297;break b}c[Na>>2]=3;c[Na+8>>2]=-1;c[Na+12>>2]=-1;c[$>>2]=fa;c[(c[X>>2]|0)+4>>2]=K;c[Na+16>>2]=(c[K+16>>2]|0)+(c[fa+16>>2]|0);R=0;S=L;T=Na;break};case 9:{Na=c[q>>2]|0;fa=a[Na]|0;switch(fa<<24>>24|0){case 43:case 63:{if((c[v>>2]&1|0)==0){R=0;S=L;T=K;break c}else{W=41}break};case 42:{W=41;break};case 92:{X=c[v>>2]|0;if((X&1|0)!=0){R=0;S=L;T=K;break c}$=Na+1|0;if((a[$]|0)!=123){R=0;S=L;T=K;break c}c[q>>2]=$;Zb=$;_b=X;break};case 123:{X=c[v>>2]|0;if((X&1|0)==0){R=0;S=L;T=K;break c}else{Zb=Na;_b=X}break};default:{R=0;S=L;T=K;break c}}if((W|0)==41){W=0;c[q>>2]=Na+1;Na=c[w>>2]|0;X=aF(Na,0,0,1,32)|0;if((X|0)==0){_=12;W=297;break b}$=aF(Na,0,0,1,16)|0;c[X+4>>2]=$;if(($|0)==0){_=12;W=297;break b}c[X>>2]=2;c[X+8>>2]=-1;c[X+12>>2]=-1;c[$>>2]=K;c[$+4>>2]=fa<<24>>24==43;c[$+8>>2]=fa<<24>>24==63?1:-1;fa=$+12|0;a[fa]=a[fa]&-2;c[X+16>>2]=c[K+16>>2];R=TE(m,9)|0;S=L;T=X;break c}X=Zb+1|0;c[q>>2]=X;fa=a[X]|0;if((fa-48&255)>>>0<10>>>0){$=fa<<24>>24;if(($-48|0)>>>0<10>>>0){$b=-1;ac=X;bc=$}else{_=10;W=297;break b}while(1){$=(($b|0)<0?-48:($b*10|0)-48|0)+bc|0;Na=ac+1|0;Y=a[Na]|0;Q=Y<<24>>24;if((Q-48|0)>>>0<10>>>0){$b=$;ac=Na;bc=Q}else{cc=$;dc=Na;ec=Y;break}}}else{cc=-1;dc=X;ec=fa}do{if(ec<<24>>24==44){Y=dc+1|0;Na=a[Y]|0;$=Na<<24>>24;if(($-48|0)>>>0<10>>>0){fc=-1;gc=Y;hc=$}else{ic=Y;jc=-1;kc=Na;break}while(1){Na=((fc|0)<0?-48:(fc*10|0)-48|0)+hc|0;Y=gc+1|0;$=a[Y]|0;Q=$<<24>>24;if((Q-48|0)>>>0<10>>>0){fc=Na;gc=Y;hc=Q}else{lc=Na;mc=Y;nc=$;W=54;break}}}else{lc=cc;mc=dc;nc=ec;W=54}}while(0);do{if((W|0)==54){W=0;if((lc|0)<=-1){ic=mc;jc=lc;kc=nc;break}if((cc|0)>(lc|0)|(lc|0)>255){_=10;W=297;break b}else{ic=mc;jc=lc;kc=nc}}}while(0);if(kc<<24>>24==0){_=9;W=297;break b}if((ic|0)==(X|0)){_=10;W=297;break b}if((_b&1|0)==0){if(kc<<24>>24!=92){_=10;W=297;break b}if((a[ic+1|0]|0)!=125){_=10;W=297;break b}oc=ic+2|0}else{if(kc<<24>>24!=125){_=10;W=297;break b}oc=ic+1|0}if((jc|cc|0)==0){fa=c[w>>2]|0;$=aF(fa,0,0,1,32)|0;if(($|0)==0){_=12;W=297;break b}Y=aF(fa,0,0,1,20)|0;c[$+4>>2]=Y;if((Y|0)==0){_=12;W=297;break b}c[$>>2]=0;c[$+8>>2]=-1;c[$+12>>2]=-1;c[Y>>2]=-1;c[Y+4>>2]=-1;c[Y+8>>2]=-1;pc=$}else{$=(jc&cc|0)<0;Y=c[w>>2]|0;fa=aF(Y,0,0,1,32)|0;if((fa|0)==0){_=12;W=297;break b}Na=aF(Y,0,0,1,16)|0;c[fa+4>>2]=Na;if((Na|0)==0){_=12;W=297;break b}c[fa>>2]=2;c[fa+8>>2]=-1;c[fa+12>>2]=-1;c[Na>>2]=K;c[Na+4>>2]=$?1:cc;c[Na+8>>2]=$?1:jc;$=Na+12|0;a[$]=a[$]&-2;c[fa+16>>2]=c[K+16>>2];pc=fa}c[q>>2]=oc;R=TE(m,9)|0;S=L;T=pc;break};case 6:{fa=M-2|0;c[n>>2]=fa;$=c[O+(fa<<2)>>2]|0;fa=c[w>>2]|0;Na=aF(fa,0,0,1,32)|0;if((Na|0)==0){_=12;W=297;break b}Y=aF(fa,0,0,1,8)|0;fa=Na+4|0;c[fa>>2]=Y;if((Y|0)==0){_=12;W=297;break b}c[Na>>2]=1;c[Na+8>>2]=-1;c[Na+12>>2]=-1;c[Y>>2]=$;c[(c[fa>>2]|0)+4>>2]=K;c[Na+16>>2]=(c[K+16>>2]|0)+(c[$+16>>2]|0);R=0;S=L;T=Na;break};case 2:{Na=M-2|0;c[n>>2]=Na;$=c[O+(Na<<2)>>2]|0;if((c[K+12>>2]|0)>-1){Na=c[w>>2]|0;fa=aF(Na,0,0,1,32)|0;if((fa|0)==0){_=12;W=297;break b}Y=aF(Na,0,0,1,20)|0;c[fa+4>>2]=Y;if((Y|0)==0){_=12;W=297;break b}c[fa>>2]=0;c[fa+8>>2]=-1;c[fa+12>>2]=-1;c[Y>>2]=-1;c[Y+4>>2]=-1;c[Y+8>>2]=-1;Y=c[w>>2]|0;Na=aF(Y,0,0,1,32)|0;if((Na|0)==0){_=12;W=297;break b}Q=aF(Y,0,0,1,8)|0;Y=Na+4|0;c[Y>>2]=Q;if((Q|0)==0){_=12;W=297;break b}c[Na>>2]=1;c[Na+8>>2]=-1;c[Na+12>>2]=-1;c[Q>>2]=fa;c[(c[Y>>2]|0)+4>>2]=K;Y=K+16|0;Q=Na+16|0;c[Q>>2]=(c[Y>>2]|0)+(c[fa+16>>2]|0);c[Q>>2]=c[Y>>2];qc=Na}else{qc=K}c[qc+12>>2]=$;$=qc+16|0;c[$>>2]=(c[$>>2]|0)+1;R=0;S=L;T=qc;break};case 10:{$=M-2|0;c[n>>2]=$;c[v>>2]=c[O+($<<2)>>2];R=0;S=L;T=K;break};default:{R=0;S=L;T=K}}}while(0);O=c[n>>2]|0;N=(R|0)==0;if((O|0)>(o|0)&N){K=T;L=S;M=O}else{rc=T;sc=S;tc=R;uc=N;break a}}if((W|0)==6){rc=K;sc=V;tc=U;uc=(U|0)==0;break}else if((W|0)==297){i=d;return _|0}}else{rc=0;sc=0;tc=p;uc=t}}while(0);t=(sc|0)>0;if(t|uc^1){_=t?8:tc;i=d;return _|0}c[b+8>>2]=rc;_=0;i=d;return _|0}function NE(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0;g=d+12|0;h=c[g>>2]|0;i=(b|0)==0|(f|0)==0;if(!i){c[f+48>>2]=0;c[c[f+36>>2]>>2]=-1}j=c[f+28>>2]|0;k=dF((j<<3)+8|0)|0;l=k;if((k|0)==0){m=12;return m|0}c[l>>2]=-1;n=dF((j<<2)+4|0)|0;o=n;if((n|0)==0){eF(k);m=12;return m|0}c[o>>2]=-1;p=0;while(1){if(p>>>0>j>>>0){break}else{p=p+1|0}}TE(d,e)|0;e=TE(d,0)|0;p=c[g>>2]|0;a:do{if((p|0)>(h|0)&(e|0)==0){j=d+16|0;q=f+32|0;r=f+16|0;s=f+36|0;t=0;u=-1;v=1;w=0;x=0;y=0;z=l;A=p;while(1){B=A-1|0;c[g>>2]=B;C=c[j>>2]|0;b:do{switch(c[C+(B<<2)>>2]|0){case 1:{D=A-2|0;c[g>>2]=D;E=c[C+(D<<2)>>2]|0;if(i){D=c[(c[c[E+4>>2]>>2]|0)+20>>2]|0;F=A-3|0;c[g>>2]=F;c[E+20>>2]=(c[C+(F<<2)>>2]|0)+D;G=0;H=z;I=y;J=x;K=w;L=v;M=-1;N=t;break b}else{D=A-3|0;c[g>>2]=D;F=c[C+(D<<2)>>2]|0;D=A-4|0;c[g>>2]=D;E=(F|0)==0;G=0;H=z;I=y;J=x;K=w;L=v;M=E?u:c[C+(D<<2)>>2]|0;N=E&1;break b}break};case 6:{E=A-2|0;c[g>>2]=E;D=c[C+(E<<2)>>2]|0;E=0;do{O=z+(E<<2)|0;E=E+1|0}while((c[O>>2]|0)>-1);c[O>>2]=D<<1|1;c[z+(E<<2)>>2]=-1;F=0;while(1){if((c[o+(F<<2)>>2]|0)>-1){F=F+1|0}else{break}}c[o+(F-1<<2)>>2]=-1;G=0;H=z;I=y;J=x;K=w;L=v;M=u;N=t;break};case 0:{E=A-2|0;c[g>>2]=E;D=c[C+(E<<2)>>2]|0;E=D;P=D+12|0;Q=c[P>>2]|0;if((Q|0)>-1){R=0;do{S=z+(R<<2)|0;R=R+1|0}while((c[S>>2]|0)>-1);c[S>>2]=Q<<1;c[z+(R<<2)>>2]=-1;do{if(!i){F=0;while(1){if((c[o+(F<<2)>>2]|0)>-1){F=F+1|0}else{break}}c[(c[r>>2]|0)+(Q*12|0)+8>>2]=0;if((F|0)<=0){break}T=dF((F<<2)+4|0)|0;U=T;if((T|0)==0){V=u;W=w;X=x;Y=y;Z=z;_=12;break a}c[(c[r>>2]|0)+(Q*12|0)+8>>2]=U;T=c[o>>2]|0;if((T|0)>-1){$=0;aa=T;T=U;while(1){c[T>>2]=aa;ba=$+1|0;ca=c[o+(ba<<2)>>2]|0;da=U+(ba<<2)|0;if((ca|0)>-1){$=ba;aa=ca;T=da}else{ea=da;break}}}else{ea=U}c[ea>>2]=-1}}while(0);Q=TE(d,c[P>>2]|0)|0;if((Q|0)!=0){V=u;W=w;X=x;Y=y;Z=z;_=Q;break a}Q=TE(d,6)|0;if((Q|0)!=0){V=u;W=w;X=x;Y=y;Z=z;_=Q;break a}}Q=c[D>>2]|0;do{if((Q|0)==3){R=c[D+4>>2]|0;T=c[R>>2]|0;aa=c[R+4>>2]|0;R=(c[z>>2]|0)>-1;$=v+1|0;F=TE(d,R?$:v)|0;if((F|0)!=0){fa=F;ga=y;ha=x;ia=w;ja=v;ka=u;la=t;break}F=TE(d,R?v:w)|0;if((F|0)!=0){fa=F;ga=y;ha=x;ia=w;ja=v;ka=u;la=t;break}F=TE(d,z)|0;if((F|0)!=0){fa=F;ga=y;ha=x;ia=w;ja=v;ka=u;la=t;break}F=TE(d,(c[z>>2]|0)>>>31^1)|0;if((F|0)!=0){fa=F;ga=y;ha=x;ia=w;ja=v;ka=u;la=t;break}F=TE(d,D)|0;if((F|0)!=0){fa=F;ga=y;ha=x;ia=w;ja=v;ka=u;la=t;break}F=aa;aa=TE(d,F)|0;if((aa|0)!=0){fa=aa;ga=y;ha=x;ia=w;ja=v;ka=u;la=t;break}aa=T;T=TE(d,aa)|0;if((T|0)!=0){fa=T;ga=y;ha=x;ia=w;ja=v;ka=u;la=t;break}T=TE(d,3)|0;if((T|0)!=0){fa=T;ga=y;ha=x;ia=w;ja=v;ka=u;la=t;break}T=TE(d,F)|0;if((T|0)!=0){fa=T;ga=y;ha=x;ia=w;ja=v;ka=u;la=t;break}T=TE(d,0)|0;if((T|0)!=0){fa=T;ga=y;ha=x;ia=w;ja=v;ka=u;la=t;break}T=TE(d,2)|0;if((T|0)!=0){fa=T;ga=y;ha=x;ia=w;ja=v;ka=u;la=t;break}T=TE(d,aa)|0;if((T|0)!=0){fa=T;ga=y;ha=x;ia=w;ja=v;ka=u;la=t;break}T=TE(d,0)|0;if((T|0)!=0){fa=T;ga=y;ha=x;ia=w;ja=v;ka=u;la=t;break}if((c[z>>2]|0)>-1){if(i){ma=0;na=x;oa=u}else{T=VE(b,E,w)|0;c[(c[q>>2]|0)+(w<<2)>>2]=t;if((u|0)>-1){aa=c[s>>2]|0;F=0;while(1){pa=aa+(F<<2)|0;qa=F+1|0;if((c[pa>>2]|0)>-1){F=qa}else{break}}c[pa>>2]=w;c[(c[s>>2]|0)+(qa<<2)>>2]=u;c[(c[s>>2]|0)+(F+2<<2)>>2]=-1;ra=x+1|0;sa=-1}else{ra=x;sa=u}aa=c[z>>2]|0;if((aa|0)>-1){U=0;R=aa;do{aa=(R|0)/2|0;da=c[r>>2]|0;if((R&1|0)==0){c[da+(aa*12|0)>>2]=w}else{c[da+(aa*12|0)+4>>2]=w}U=U+1|0;R=c[z+(U<<2)>>2]|0;}while((R|0)>-1)}c[z>>2]=-1;ma=T;na=ra;oa=sa}c[z>>2]=-1;ta=ma;ua=y+1|0;va=na;wa=v;xa=$;ya=oa}else{ta=0;ua=y;va=x;wa=w;xa=v;ya=u}if((c[D+16>>2]|0)<=0){fa=ta;ga=ua;ha=va;ia=wa;ja=xa;ka=ya;la=t;break}fa=ta;ga=ua;ha=va;ia=xa+1|0;ja=xa+2|0;ka=ya;la=t}else if((Q|0)==2){R=c[D+4>>2]|0;if(i){if((c[z>>2]|0)>-1){za=1}else{za=a[R+12|0]&1}U=TE(d,za)|0;if((U|0)!=0){fa=U;ga=y;ha=x;ia=w;ja=v;ka=u;la=t;break}}else{U=TE(d,w)|0;if((U|0)!=0){fa=U;ga=y;ha=x;ia=w;ja=v;ka=u;la=t;break}U=TE(d,a[R+12|0]&1)|0;if((U|0)!=0){fa=U;ga=y;ha=x;ia=w;ja=v;ka=u;la=t;break}}U=TE(d,D)|0;if((U|0)!=0){fa=U;ga=y;ha=x;ia=w;ja=v;ka=u;la=t;break}U=TE(d,1)|0;if((U|0)!=0){fa=U;ga=y;ha=x;ia=w;ja=v;ka=u;la=t;break}U=TE(d,c[R>>2]|0)|0;if((U|0)!=0){fa=U;ga=y;ha=x;ia=w;ja=v;ka=u;la=t;break}U=TE(d,0)|0;if((U|0)!=0){fa=U;ga=y;ha=x;ia=w;ja=v;ka=u;la=t;break}if((c[z>>2]|0)<=-1){if((a[R+12|0]&1)==0){fa=0;ga=y;ha=x;ia=w;ja=v;ka=u;la=0;break}}if(i){Aa=0;Ba=x;Ca=u}else{U=VE(b,E,w)|0;c[(c[q>>2]|0)+(w<<2)>>2]=(a[R+12|0]&1)==0?t:1;if((u|0)>-1){R=c[s>>2]|0;F=0;while(1){Da=R+(F<<2)|0;Ea=F+1|0;if((c[Da>>2]|0)>-1){F=Ea}else{break}}c[Da>>2]=w;c[(c[s>>2]|0)+(Ea<<2)>>2]=u;c[(c[s>>2]|0)+(F+2<<2)>>2]=-1;Fa=x+1|0;Ga=-1}else{Fa=x;Ga=u}R=c[z>>2]|0;if((R|0)>-1){$=0;T=R;do{R=(T|0)/2|0;aa=c[r>>2]|0;if((T&1|0)==0){c[aa+(R*12|0)>>2]=w}else{c[aa+(R*12|0)+4>>2]=w}$=$+1|0;T=c[z+($<<2)>>2]|0;}while((T|0)>-1)}c[z>>2]=-1;Aa=U;Ba=Fa;Ca=Ga}c[z>>2]=-1;fa=Aa;ga=y+1|0;ha=Ba;ia=v;ja=v+1|0;ka=Ca;la=0}else if((Q|0)==0){T=c[c[D+4>>2]>>2]|0;if(!((T|0)>-1|(T|0)==-4)){fa=0;ga=y;ha=x;ia=w;ja=v;ka=u;la=t;break}if((c[z>>2]|0)<=-1){fa=0;ga=y;ha=x;ia=w;ja=v;ka=u;la=t;break}if(i){c[D+20>>2]=1;Ha=0;Ia=x;Ja=u}else{T=VE(b,E,w)|0;c[(c[q>>2]|0)+(w<<2)>>2]=t;if((u|0)>-1){$=c[s>>2]|0;F=0;while(1){Ka=$+(F<<2)|0;La=F+1|0;if((c[Ka>>2]|0)>-1){F=La}else{break}}c[Ka>>2]=w;c[(c[s>>2]|0)+(La<<2)>>2]=u;c[(c[s>>2]|0)+(F+2<<2)>>2]=-1;Ma=x+1|0;Na=-1}else{Ma=x;Na=u}$=c[z>>2]|0;if(($|0)>-1){U=0;R=$;do{$=(R|0)/2|0;aa=c[r>>2]|0;if((R&1|0)==0){c[aa+($*12|0)>>2]=w}else{c[aa+($*12|0)+4>>2]=w}U=U+1|0;R=c[z+(U<<2)>>2]|0;}while((R|0)>-1)}c[z>>2]=-1;Ha=T;Ia=Ma;Ja=Na}c[z>>2]=-1;fa=Ha;ga=y+1|0;ha=Ia;ia=v;ja=v+1|0;ka=Ja;la=t}else if((Q|0)==1){R=c[D+4>>2]|0;U=c[R>>2]|0;F=c[R+4>>2]|0;R=TE(d,D)|0;if((R|0)!=0){fa=R;ga=y;ha=x;ia=w;ja=v;ka=u;la=t;break}R=TE(d,5)|0;if((R|0)!=0){fa=R;ga=y;ha=x;ia=w;ja=v;ka=u;la=t;break}R=TE(d,F)|0;if((R|0)!=0){fa=R;ga=y;ha=x;ia=w;ja=v;ka=u;la=t;break}R=TE(d,0)|0;if((R|0)!=0){fa=R;ga=y;ha=x;ia=w;ja=v;ka=u;la=t;break}R=U+20|0;$=TE(d,(c[R>>2]|0)+v|0)|0;if(($|0)!=0){fa=$;ga=y;ha=x;ia=w;ja=v;ka=u;la=t;break}if((c[R>>2]|0)>0){R=(c[F+20>>2]|0)>0;Oa=(R&1)+v|0;Pa=R?v:-1}else{Oa=v;Pa=-1}R=TE(d,Pa)|0;if((R|0)!=0){fa=R;ga=y;ha=x;ia=w;ja=Oa;ka=u;la=t;break}R=TE(d,4)|0;if((R|0)!=0){fa=R;ga=y;ha=x;ia=w;ja=Oa;ka=u;la=t;break}R=TE(d,U)|0;if((R|0)!=0){fa=R;ga=y;ha=x;ia=w;ja=Oa;ka=u;la=t;break}fa=TE(d,0)|0;ga=y;ha=x;ia=w;ja=Oa;ka=u;la=t}else{fa=0;ga=y;ha=x;ia=w;ja=v;ka=u;la=t}}while(0);D=c[P>>2]|0;if((D|0)>-1){Qa=0}else{G=fa;H=z;I=ga;J=ha;K=ia;L=ja;M=ka;N=la;break b}do{Ra=o+(Qa<<2)|0;Qa=Qa+1|0}while((c[Ra>>2]|0)>-1);c[Ra>>2]=D;c[o+(Qa<<2)>>2]=-1;G=fa;H=z;I=ga;J=ha;K=ia;L=ja;M=ka;N=la;break};case 4:{P=A-2|0;c[g>>2]=P;Q=c[C+(P<<2)>>2]|0;P=A-3|0;c[g>>2]=P;G=0;H=z;I=y;J=x;K=(Q|0)>-1?Q:w;L=c[C+(P<<2)>>2]|0;M=u;N=t;break};case 5:{P=A-2|0;c[g>>2]=P;Q=c[C+(P<<2)>>2]|0;if(!i){G=0;H=z;I=y;J=x;K=w;L=v;M=u;N=t;break b}P=c[Q+4>>2]|0;c[Q+20>>2]=(c[(c[P+4>>2]|0)+20>>2]|0)+(c[(c[P>>2]|0)+20>>2]|0);G=0;H=z;I=y;J=x;K=w;L=v;M=u;N=t;break};case 2:{P=z;while(1){if((c[P>>2]|0)>-1){P=P+4|0}else{G=0;H=P;I=y;J=x;K=w;L=v;M=u;N=t;break}}break};case 3:{P=A-2|0;c[g>>2]=P;D=c[C+(P<<2)>>2]|0;P=A-3|0;c[g>>2]=P;Q=c[C+(P<<2)>>2]|0;P=A-4|0;c[g>>2]=P;E=c[C+(P<<2)>>2]|0;P=A-5|0;c[g>>2]=P;if(i){R=c[E+4>>2]|0;U=E+16|0;c[E+20>>2]=(c[(c[R>>2]|0)+20>>2]|0)+(c[C+(P<<2)>>2]|0)+(c[(c[R+4>>2]|0)+20>>2]|0)+((c[U>>2]|0)>0?2:0);Sa=c[g>>2]|0;Ta=c[j>>2]|0;Ua=U}else{Sa=P;Ta=C;Ua=E+16|0}E=Sa-1|0;c[g>>2]=E;P=c[Ta+(E<<2)>>2]|0;E=Sa-2|0;c[g>>2]=E;U=c[Ta+(E<<2)>>2]|0;E=Sa-3|0;c[g>>2]=E;R=c[Ta+(E<<2)>>2]|0;if((c[Ua>>2]|0)<=0){G=0;H=P;I=y;J=x;K=w;L=v;M=u;N=1;break b}if(i){Va=0}else{WE(b,D,U)|0;c[(c[q>>2]|0)+(U<<2)>>2]=1;U=WE(b,Q,R)|0;c[(c[q>>2]|0)+(R<<2)>>2]=1;Va=U}G=Va;H=P;I=y+2|0;J=x;K=w;L=v;M=u;N=1;break};default:{G=0;H=z;I=y;J=x;K=w;L=v;M=u;N=t}}}while(0);C=c[g>>2]|0;if((C|0)>(h|0)&(G|0)==0){t=N;u=M;v=L;w=K;x=J;y=I;z=H;A=C}else{V=M;W=K;X=J;Y=I;Z=H;_=G;break a}}}else{V=-1;W=0;X=0;Y=0;Z=l;_=e}}while(0);do{if(i){Wa=X}else{e=c[Z>>2]|0;if((e|0)>-1){l=f+16|0;G=0;H=e;do{e=(H|0)/2|0;I=c[l>>2]|0;if((H&1|0)==0){c[I+(e*12|0)>>2]=W}else{c[I+(e*12|0)+4>>2]=W}G=G+1|0;H=c[Z+(G<<2)>>2]|0;}while((H|0)>-1)}c[Z>>2]=-1;if((V|0)<=-1){Wa=X;break}H=f+36|0;G=c[H>>2]|0;l=0;while(1){Xa=G+(l<<2)|0;Ya=l+1|0;if((c[Xa>>2]|0)>-1){l=Ya}else{break}}c[Xa>>2]=W;c[(c[H>>2]|0)+(Ya<<2)>>2]=V;c[(c[H>>2]|0)+(l+2<<2)>>2]=-1;Wa=X+1|0}}while(0);c[f+48>>2]=Y;c[f+40>>2]=Y;c[f+44>>2]=Wa;eF(k);eF(n);m=_;return m|0}function OE(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0;f=a;a:while(1){a=c[f>>2]|0;do{if((a|0)==1){g=c[f+4>>2]|0;h=g;i=g+4|0;g=QE(c[(c[h>>2]|0)+28>>2]|0,c[(c[i>>2]|0)+24>>2]|0,b,d,e)|0;if((g|0)!=0){j=g;k=10;break a}g=OE(c[h>>2]|0,b,d,e)|0;if((g|0)==0){l=i}else{j=g;k=10;break a}}else if((a|0)==3){g=c[f+4>>2]|0;i=OE(c[g>>2]|0,b,d,e)|0;if((i|0)!=0){j=i;k=10;break a}l=g+4|0}else if((a|0)==2){g=c[f+4>>2]|0;i=g;if((c[g+8>>2]|0)!=-1){l=i;break}g=c[i>>2]|0;h=QE(c[g+28>>2]|0,c[g+24>>2]|0,b,d,e)|0;if((h|0)==0){l=i}else{j=h;k=10;break a}}else{j=0;k=10;break a}}while(0);f=c[l>>2]|0}if((k|0)==10){return j|0}return 0}function PE(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;b=c[a+4>>2]|0;if((b|0)==0){return}a=b+4|0;d=b;e=c[d>>2]|0;if((c[a>>2]|0)==0){f=e}else{g=0;h=e;while(1){do{if((c[h+(g<<5)+8>>2]|0)==0){i=h}else{e=c[h+(g<<5)+16>>2]|0;if((e|0)==0){j=h}else{eF(e);j=c[d>>2]|0}e=c[j+(g<<5)+28>>2]|0;if((e|0)==0){i=j;break}eF(e);i=c[d>>2]|0}}while(0);e=g+1|0;if(e>>>0<(c[a>>2]|0)>>>0){g=e;h=i}else{f=i;break}}}if((f|0)!=0){eF(f)}f=b+8|0;i=c[f>>2]|0;if((i|0)!=0){if((c[i+8>>2]|0)==0){k=i}else{h=i;while(1){i=c[h+16>>2]|0;if((i|0)!=0){eF(i)}if((c[h+40>>2]|0)==0){break}else{h=h+32|0}}k=c[f>>2]|0}eF(k)}k=b+16|0;f=c[k>>2]|0;if((f|0)!=0){h=b+28|0;i=c[h>>2]|0;if((i|0)==0){l=f}else{g=0;a=f;f=i;while(1){i=c[a+(g*12|0)+8>>2]|0;if((i|0)==0){m=f;n=a}else{eF(i);m=c[h>>2]|0;n=c[k>>2]|0}i=g+1|0;if(i>>>0<m>>>0){g=i;a=n;f=m}else{l=n;break}}}eF(l)}l=c[b+32>>2]|0;if((l|0)!=0){eF(l)}l=c[b+20>>2]|0;if((l|0)!=0){eF(l)}l=c[b+36>>2]|0;if((l|0)!=0){eF(l)}eF(b);return}function QE(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0;g=a|0;a=c[g>>2]|0;h=(a|0)>-1;if((d|0)==0){if(!h){i=0;return i|0}j=b|0;k=g;l=a;while(1){a:do{if((c[j>>2]|0)>-1){a=b;m=l;while(1){n=e+(m<<2)|0;c[n>>2]=(c[n>>2]|0)+1;n=a+32|0;if((c[n>>2]|0)<=-1){break a}a=n;m=c[k>>2]|0}}}while(0);m=k+32|0;a=c[m>>2]|0;if((a|0)>-1){k=m;l=a}else{i=0;break}}return i|0}if(!h){i=0;return i|0}h=b|0;l=g;b:while(1){g=c[h>>2]|0;c:do{if((g|0)>-1){k=l+4|0;e=l+8|0;j=l+16|0;a=l+20|0;m=l+24|0;n=l+28|0;o=l+12|0;p=b;q=-1;r=h;s=g;while(1){t=p;u=r;v=s;while(1){w=t+32|0;if((v|0)!=(q|0)){break}x=w|0;y=c[x>>2]|0;if((y|0)>-1){t=w;u=x;v=y}else{break c}}y=d+(c[f+(c[l>>2]<<2)>>2]<<5)|0;while(1){z=y+8|0;if((c[z>>2]|0)==0){break}else{y=y+32|0}}c[y+40>>2]=0;c[y>>2]=c[k>>2];c[y+4>>2]=c[e>>2];c[z>>2]=d+(c[f+(c[u>>2]<<2)>>2]<<5);c[y+12>>2]=c[u>>2];x=c[t+16>>2]|c[j>>2]|((c[a>>2]|0)!=0?4:0)|((c[m>>2]|0)!=0?8:0);A=y+20|0;c[A>>2]=x;B=c[n>>2]|0;if((B|0)>-1){c[y+24>>2]=B;c[A>>2]=x|256}else{c[y+24>>2]=c[a>>2]}x=c[m>>2]|0;if((x|0)==0){c[y+28>>2]=0}else{A=0;while(1){C=A+1|0;if((c[x+(A<<2)>>2]|0)==0){break}else{A=C}}A=dF(C<<2)|0;x=A;u=y+28|0;c[u>>2]=x;if((A|0)==0){i=12;D=50;break b}A=c[c[m>>2]>>2]|0;if((A|0)==0){E=x}else{B=0;F=A;A=x;while(1){c[A>>2]=F;x=B+1|0;G=c[(c[m>>2]|0)+(x<<2)>>2]|0;H=(c[u>>2]|0)+(x<<2)|0;if((G|0)==0){E=H;break}else{B=x;F=G;A=H}}}c[E>>2]=0}A=c[o>>2]|0;if((A|0)==0){I=0}else{F=0;while(1){if((c[A+(F<<2)>>2]|0)>-1){F=F+1|0}else{I=F;break}}}F=t+12|0;A=c[F>>2]|0;if((A|0)==0){J=0}else{B=0;while(1){if((c[A+(B<<2)>>2]|0)>-1){B=B+1|0}else{J=B;break}}}B=y+16|0;A=c[B>>2]|0;if((A|0)!=0){eF(A)}c[B>>2]=0;A=J+I|0;if((A|0)>0){t=dF((A<<2)+4|0)|0;A=t;c[B>>2]=A;if((t|0)==0){i=12;D=50;break b}t=c[o>>2]|0;d:do{if((t|0)==0){K=0}else{u=c[t>>2]|0;if((u|0)>-1){L=0;M=u;N=A}else{K=0;break}while(1){c[N+(L<<2)>>2]=M;u=L+1|0;H=c[(c[o>>2]|0)+(u<<2)>>2]|0;if((H|0)<=-1){K=u;break d}L=u;M=H;N=c[B>>2]|0}}}while(0);A=c[F>>2]|0;do{if((A|0)==0){O=K}else{t=c[A>>2]|0;if((t|0)<=-1){O=K;break}y=(K|0)>0;H=0;u=K;G=A;x=t;while(1){t=c[B>>2]|0;e:do{if(y){P=0;while(1){Q=P+1|0;if((c[t+(P<<2)>>2]|0)==(x|0)){R=u;S=G;break e}if((Q|0)<(K|0)){P=Q}else{D=41;break}}}else{D=41}}while(0);if((D|0)==41){D=0;c[t+(u<<2)>>2]=x;R=u+1|0;S=c[F>>2]|0}P=H+1|0;Q=c[S+(P<<2)>>2]|0;if((Q|0)>-1){H=P;u=R;G=S;x=Q}else{O=R;break}}}}while(0);c[(c[B>>2]|0)+(O<<2)>>2]=-1}F=w|0;A=c[F>>2]|0;if((A|0)>-1){p=w;q=v;r=F;s=A}else{break}}}}while(0);g=l+32|0;if((c[g>>2]|0)>-1){l=g}else{i=0;D=50;break}}if((D|0)==50){return i|0}return 0}function RE(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;g=(e|0)==0;a:do{if(g){h=0}else{i=0;while(1){if((c[e+(i<<2)>>2]|0)<=-1){h=i;break a}i=i+1|0}}}while(0);i=0;while(1){if((c[b+(i<<5)>>2]|0)>-1){i=i+1|0}else{j=0;break}}while(1){if((c[d+(j<<5)>>2]|0)>-1){j=j+1|0}else{break}}k=aF(a,0,0,1,(j+i<<5)+32|0)|0;i=k;if((k|0)==0){l=0;return l|0}k=c[b>>2]|0;b:do{if((k|0)>-1){j=(h|0)>0;m=0;n=k;while(1){c[i+(m<<5)>>2]=n;c[i+(m<<5)+4>>2]=c[b+(m<<5)+4>>2];c[i+(m<<5)+8>>2]=c[b+(m<<5)+8>>2];c[i+(m<<5)+16>>2]=c[b+(m<<5)+16>>2]|f;c[i+(m<<5)+20>>2]=c[b+(m<<5)+20>>2];c[i+(m<<5)+24>>2]=c[b+(m<<5)+24>>2];c[i+(m<<5)+28>>2]=c[b+(m<<5)+28>>2];o=b+(m<<5)+12|0;p=c[o>>2]|0;q=(p|0)==0;if(q&g){c[i+(m<<5)+12>>2]=0}else{c:do{if(q){r=0}else{s=0;while(1){if((c[p+(s<<2)>>2]|0)<=-1){r=s;break c}s=s+1|0}}}while(0);p=aF(a,0,0,0,(r+h<<2)+4|0)|0;q=p;if((p|0)==0){l=0;break}if((r|0)>0){p=0;while(1){c[q+(p<<2)>>2]=c[(c[o>>2]|0)+(p<<2)>>2];s=p+1|0;if((s|0)<(r|0)){p=s}else{t=r;break}}}else{t=0}if(j){p=0;while(1){c[q+(p+t<<2)>>2]=c[e+(p<<2)>>2];o=p+1|0;if((o|0)<(h|0)){p=o}else{u=h;break}}}else{u=0}c[q+(u+t<<2)>>2]=-1;c[i+(m<<5)+12>>2]=q}p=m+1|0;o=c[b+(p<<5)>>2]|0;if((o|0)>-1){m=p;n=o}else{v=p;break b}}return l|0}else{v=0}}while(0);b=c[d>>2]|0;t=i+(v<<5)|0;d:do{if((b|0)>-1){u=0;h=b;e=v;r=t;while(1){c[r>>2]=h;c[i+(e<<5)+4>>2]=c[d+(u<<5)+4>>2];c[i+(e<<5)+8>>2]=c[d+(u<<5)+8>>2];c[i+(e<<5)+16>>2]=c[d+(u<<5)+16>>2];c[i+(e<<5)+20>>2]=c[d+(u<<5)+20>>2];c[i+(e<<5)+24>>2]=c[d+(u<<5)+24>>2];c[i+(e<<5)+28>>2]=c[d+(u<<5)+28>>2];g=d+(u<<5)+12|0;f=c[g>>2]|0;if((f|0)==0){c[i+(e<<5)+12>>2]=0}else{k=0;while(1){if((c[f+(k<<2)>>2]|0)>-1){k=k+1|0}else{break}}f=aF(a,0,0,0,(k<<2)+4|0)|0;q=f;if((f|0)==0){l=0;break}if((k|0)>0){f=0;while(1){c[q+(f<<2)>>2]=c[(c[g>>2]|0)+(f<<2)>>2];n=f+1|0;if((n|0)<(k|0)){f=n}else{w=k;break}}}else{w=0}c[q+(w<<2)>>2]=-1;c[i+(e<<5)+12>>2]=q}k=u+1|0;f=c[d+(k<<5)>>2]|0;g=k+v|0;n=i+(g<<5)|0;if((f|0)>-1){u=k;h=f;e=g;r=n}else{x=n;break d}}return l|0}else{x=t}}while(0);c[x>>2]=-1;l=i;return l|0}function SE(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;g=a+12|0;h=c[g>>2]|0;i=(f|0)!=0;if(i){c[f>>2]=0}j=TE(a,b)|0;if((j|0)!=0){k=j;return k|0}j=a+16|0;b=(d|0)==0;l=(e|0)==0;a:while(1){m=c[g>>2]|0;if((m|0)<=(h|0)){k=0;n=28;break}o=m-1|0;c[g>>2]=o;m=c[(c[j>>2]|0)+(o<<2)>>2]|0;o=c[m>>2]|0;do{if((o|0)==1){p=c[m+4>>2]|0;q=TE(a,c[p>>2]|0)|0;if((q|0)!=0){k=q;n=28;break a}r=TE(a,c[p+4>>2]|0)|0}else if((o|0)==3){p=c[m+4>>2]|0;q=c[p>>2]|0;if((c[q+8>>2]|0)!=0){r=TE(a,q)|0;break}q=c[p+4>>2]|0;if((c[q+8>>2]|0)==0){continue a}r=TE(a,q)|0}else if((o|0)==0){q=c[m+4>>2]|0;p=c[q>>2]|0;if((p|0)==(-2|0)){if(l){continue a}c[e>>2]=c[e>>2]|c[q+4>>2];continue a}else if((p|0)!=(-3|0)){continue a}p=c[q+4>>2]|0;if((p|0)<=-1){continue a}b:do{if(!b){q=c[d>>2]|0;c:do{if((q|0)>-1){s=0;t=d;u=q;while(1){v=s+1|0;if((u|0)==(p|0)){break}w=d+(v<<2)|0;x=c[w>>2]|0;if((x|0)>-1){s=v;t=w;u=x}else{y=v;z=w;break c}}if((p|0)<0){y=s;z=t}else{break b}}else{y=0;z=d}}while(0);c[z>>2]=p;c[d+(y+1<<2)>>2]=-1}}while(0);if(!i){continue a}c[f>>2]=(c[f>>2]|0)+1;continue a}else if((o|0)==2){p=c[c[m+4>>2]>>2]|0;if((c[p+8>>2]|0)==0){continue a}r=TE(a,p)|0}else{continue a}}while(0);if((r|0)!=0){k=r;n=28;break}}if((n|0)==28){return k|0}return 0}function TE(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=a+12|0;e=c[d>>2]|0;f=a|0;g=c[f>>2]|0;if((e|0)<(g|0)){c[(c[a+16>>2]|0)+(e<<2)>>2]=b;c[d>>2]=(c[d>>2]|0)+1;h=0;return h|0}d=c[a+4>>2]|0;if((g|0)>=(d|0)){h=12;return h|0}e=(c[a+8>>2]|0)+g|0;g=(e|0)>(d|0)?d:e;e=a+16|0;d=gF(c[e>>2]|0,g<<2)|0;if((d|0)==0){h=12;return h|0}else{c[f>>2]=g;c[e>>2]=d;TE(a,b)|0;return 0}return 0}function UE(b,d,e,f,g,h,i,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0;k=d+12|0;l=c[k>>2]|0;TE(d,e)|0;e=TE(d,0)|0;a:do{if((e|0)==0){m=d+16|0;n=(f&1|0)==0;o=(f&2|0)==0;p=i;q=1;r=0;b:while(1){s=c[k>>2]|0;if((s|0)<=(l|0)){t=r;u=0;break a}v=s-1|0;c[k>>2]=v;w=c[m>>2]|0;x=c[w+(v<<2)>>2]|0;if((x|0)==1){v=s-2|0;c[k>>2]=v;p=c[w+(v<<2)>>2]|0;q=q;r=r;continue}else if((x|0)!=0){p=p;q=q;r=r;continue}x=s-2|0;c[k>>2]=x;s=c[w+(x<<2)>>2]|0;x=c[s>>2]|0;do{if((x|0)==0){w=c[s+4>>2]|0;v=c[w+8>>2]|0;y=c[w>>2]|0;z=c[w+4>>2]|0;do{if((y|0)>-1|(y|0)==-4){A=r+1|0;B=q;C=z;D=y;E=(c[g>>2]|0)+v|0}else{if((y|0)!=-3){A=r;B=q;C=z;D=y;E=v;break}if(!n){A=r;B=q;C=-1;D=-1;E=-1;break}if(o|(q|0)==0){A=r;B=q;C=z;D=-3;E=v;break}c[h+(z<<2)>>2]=1;A=r;B=0;C=z;D=-3;E=v}}while(0);v=aF(b,0,0,1,32)|0;z=v;do{if((v|0)==0){F=0}else{y=aF(b,0,0,1,20)|0;c[v+4>>2]=y;if((y|0)==0){F=0;break}c[v>>2]=0;c[v+8>>2]=-1;c[v+12>>2]=-1;c[y>>2]=D;c[y+4>>2]=C;c[y+8>>2]=E;F=z}}while(0);c[p>>2]=F;z=(F|0)==0?12:0;if((E|0)<=(c[j>>2]|0)){G=z;H=A;I=B;J=p;break}c[j>>2]=E;G=z;H=A;I=B;J=p}else if((x|0)==1){z=c[s+4>>2]|0;v=z;y=c[v>>2]|0;w=z+4|0;z=c[w>>2]|0;K=aF(b,0,0,1,32)|0;if((K|0)==0){L=29;break b}M=aF(b,0,0,1,8)|0;N=K+4|0;c[N>>2]=M;if((M|0)==0){L=29;break b}c[K>>2]=1;c[K+8>>2]=-1;c[K+12>>2]=-1;c[M>>2]=y;c[(c[N>>2]|0)+4>>2]=z;c[K+16>>2]=(c[z+16>>2]|0)+(c[y+16>>2]|0);c[p>>2]=K;K=c[N>>2]|0;N=K;c[N>>2]=0;y=K+4|0;c[y>>2]=0;K=TE(d,c[w>>2]|0)|0;if((K|0)!=0){t=r;u=K;break a}K=TE(d,0)|0;if((K|0)!=0){t=r;u=K;break a}K=TE(d,y)|0;if((K|0)!=0){t=r;u=K;break a}K=TE(d,1)|0;if((K|0)!=0){t=r;u=K;break a}K=TE(d,c[v>>2]|0)|0;if((K|0)!=0){t=r;u=K;break a}G=TE(d,0)|0;H=r;I=q;J=N}else if((x|0)==2){N=c[s+4>>2]|0;K=N;v=TE(d,c[K>>2]|0)|0;if((v|0)!=0){t=r;u=v;break a}v=TE(d,0)|0;if((v|0)!=0){t=r;u=v;break a}v=c[K>>2]|0;K=c[N+4>>2]|0;y=c[N+8>>2]|0;w=a[N+12|0]|0;N=aF(b,0,0,1,32)|0;if((N|0)==0){L=40;break b}z=aF(b,0,0,1,16)|0;M=N+4|0;c[M>>2]=z;if((z|0)==0){L=40;break b}c[N>>2]=2;c[N+8>>2]=-1;c[N+12>>2]=-1;c[z>>2]=v;c[z+4>>2]=K;c[z+8>>2]=y;y=z+12|0;a[y]=a[y]&-2|w&1;c[N+16>>2]=c[v+16>>2];c[p>>2]=N;p=c[M>>2]|0;q=q;r=r;continue b}else if((x|0)==3){M=c[s+4>>2]|0;N=M;v=c[N>>2]|0;w=M+4|0;M=c[w>>2]|0;y=aF(b,0,0,1,32)|0;if((y|0)==0){L=20;break b}z=aF(b,0,0,1,8)|0;K=y+4|0;c[K>>2]=z;if((z|0)==0){L=20;break b}c[y>>2]=3;c[y+8>>2]=-1;c[y+12>>2]=-1;c[z>>2]=v;c[(c[K>>2]|0)+4>>2]=M;c[y+16>>2]=(c[M+16>>2]|0)+(c[v+16>>2]|0);c[p>>2]=y;y=c[K>>2]|0;K=TE(d,c[w>>2]|0)|0;if((K|0)!=0){t=r;u=K;break a}K=TE(d,0)|0;if((K|0)!=0){t=r;u=K;break a}K=TE(d,y+4|0)|0;if((K|0)!=0){t=r;u=K;break a}K=TE(d,1)|0;if((K|0)!=0){t=r;u=K;break a}K=TE(d,c[N>>2]|0)|0;if((K|0)!=0){t=r;u=K;break a}G=TE(d,0)|0;H=r;I=q;J=y}else{p=p;q=q;r=r;continue b}}while(0);if((G|0)==0){p=J;q=I;r=H}else{t=H;u=G;break a}}if((L|0)==20){c[p>>2]=0;t=r;u=12;break}else if((L|0)==29){c[p>>2]=0;t=r;u=12;break}else if((L|0)==40){c[p>>2]=0;t=r;u=12;break}}else{t=0;u=e}}while(0);c[g>>2]=(c[g>>2]|0)+t;return u|0}function VE(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;e=aF(a,0,0,0,8)|0;if((e|0)==0){f=12;return f|0}g=aF(a,0,0,1,32)|0;h=g;do{if((g|0)!=0){i=aF(a,0,0,1,20)|0;c[g+4>>2]=i;if((i|0)==0){break}c[g>>2]=0;c[g+8>>2]=-1;c[g+12>>2]=-1;c[i>>2]=-3;c[i+4>>2]=d;c[i+8>>2]=-1;c[e>>2]=h;i=aF(a,0,0,0,32)|0;j=e+4|0;c[j>>2]=i;if((i|0)==0){f=12;return f|0}k=b+4|0;c[i+4>>2]=c[k>>2];i=b|0;c[c[j>>2]>>2]=c[i>>2];c[(c[j>>2]|0)+8>>2]=-1;c[(c[j>>2]|0)+12>>2]=-1;c[(c[j>>2]|0)+24>>2]=0;c[(c[j>>2]|0)+28>>2]=0;c[(c[j>>2]|0)+20>>2]=0;c[k>>2]=e;c[i>>2]=1;f=0;return f|0}}while(0);c[e>>2]=0;f=12;return f|0}function WE(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;e=aF(a,0,0,0,8)|0;if((e|0)==0){f=12;return f|0}g=aF(a,0,0,1,32)|0;h=g;do{if((g|0)!=0){i=aF(a,0,0,1,20)|0;c[g+4>>2]=i;if((i|0)==0){break}c[g>>2]=0;c[g+8>>2]=-1;c[g+12>>2]=-1;c[i>>2]=-3;c[i+4>>2]=d;c[i+8>>2]=-1;c[e+4>>2]=h;i=aF(a,0,0,0,32)|0;j=e;c[j>>2]=i;if((i|0)==0){f=12;return f|0}k=b+4|0;c[i+4>>2]=c[k>>2];i=b|0;c[c[j>>2]>>2]=c[i>>2];c[(c[j>>2]|0)+8>>2]=-1;c[(c[j>>2]|0)+12>>2]=-1;c[(c[j>>2]|0)+24>>2]=0;c[(c[j>>2]|0)+28>>2]=0;c[(c[j>>2]|0)+20>>2]=0;c[k>>2]=e;c[i>>2]=1;f=0;return f|0}}while(0);c[e+4>>2]=0;f=12;return f|0}function XE(a,b){a=a|0;b=b|0;var d=0,e=0;d=c[c[(c[a>>2]|0)+4>>2]>>2]|0;a=c[c[(c[b>>2]|0)+4>>2]>>2]|0;if((d|0)<(a|0)){e=-1;return e|0}e=(d|0)>(a|0)|0;return e|0}function YE(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,_a=0,$a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,_b=0,$b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Ec=0,Fc=0,Gc=0,Hc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0;g=i;i=i+16|0;h=g|0;j=g+8|0;k=c[a+4>>2]|0;a=k;l=k+40|0;m=c[l>>2]|0;do{if((m|0)<1|(d|0)==0){n=0}else{o=dF(m<<2)|0;if((o|0)==0){p=12}else{n=o;break}i=g;return p|0}}while(0);m=n;a:do{if((c[k+60>>2]|0)==0){c[h>>2]=0;o=f&1;q=f&2;r=k+56|0;s=c[r>>2]&4;if((n|0)==0){t=0}else{t=c[l>>2]|0}u=t<<2;v=c[k+52>>2]|0;w=v<<3;x=w+8|0;y=u+12+w+(x+(da(u,v)|0)<<1)|0;z=dF(y)|0;if((z|0)==0){A=12;break}vF(z|0,0,y|0)|0;y=z;B=z+u&3;C=((B|0)==0?0:4-B|0)+u|0;B=z+C|0;D=C+x|0;C=z+D&3;E=((C|0)==0?0:4-C|0)+D|0;D=z+E|0;C=E+x|0;x=z+C&3;E=((x|0)==0?0:4-x|0)+C|0;C=z+E|0;x=E+w|0;w=z+x&3;if((v|0)>0){E=t<<3;F=0;G=z+(((w|0)==0?0:4-w|0)+x)|0;while(1){c[D+(F<<3)+4>>2]=G;c[B+(F<<3)+4>>2]=G+u;x=F+1|0;if((x|0)<(v|0)){F=x;G=G+E|0}else{H=0;break}}do{c[C+(H<<3)>>2]=-1;H=H+1|0;}while((H|0)<(v|0))}v=KE(h,b,4)|0;if((v|0)<1){if((v|0)<0){A=1;break}I=v+1|0}else{I=v}v=k+8|0;E=(s|0)==0;G=(o|0)==0;F=(t|0)>0;u=k+12|0;x=k+44|0;w=k+32|0;J=k+36|0;K=(t|0)==0;L=F^1;M=0;N=b+I|0;O=0;P=I;Q=D;R=y;S=0;T=-1;U=B;V=B;while(1){if((T|0)<0){W=c[v>>2]|0;X=W+8|0;b:do{if((c[X>>2]|0)==0){Y=V;Z=T;_=S}else{$=(O|0)==0;aa=(M|0)==95;ba=(O|0)<1&G;ca=((M|0)!=10|E)^1;ea=V;fa=T;ga=S;ha=W;ia=X;while(1){ja=ha;ka=ia;c:while(1){la=ja+12|0;if((c[C+(c[la>>2]<<3)>>2]|0)>=(O|0)){ma=ga;na=fa;oa=ea;break}pa=ja+20|0;qa=c[pa>>2]|0;if((qa|0)==0){ra=260;break}d:do{if((qa&1|0)==0|ba|ca){if((qa&2|0)!=0){sa=c[h>>2]|0;if((sa|q|0)!=0&((sa|0)!=10|E)){break}}do{if((qa&16|0)!=0){if(aa){break d}if((tE(M)|0)!=0){break d}sa=c[h>>2]|0;if((sa|0)==95){break}if((tE(sa)|0)==0){break d}}}while(0);sa=c[pa>>2]|0;if((sa&32|0)==0){ta=sa}else{if(!aa){if((tE(M)|0)==0){break}}sa=c[h>>2]|0;if((sa|0)==95){break}if((tE(sa)|0)!=0){break}ta=c[pa>>2]|0}do{if((ta&64|0)==0|$){ua=ta}else{sa=c[h>>2]|0;if((sa|0)==0){ua=ta;break}if(aa){va=1;wa=sa}else{sa=(tE(M)|0)!=0|0;va=sa;wa=c[h>>2]|0}if((wa|0)==95){xa=1}else{xa=(tE(wa)|0)!=0|0}if((va|0)==(xa|0)){break d}ua=c[pa>>2]|0}}while(0);if((ua&128|0)==0){ra=260;break c}if($){break}sa=c[h>>2]|0;if((sa|0)==0){break}if(aa){ya=1;za=sa}else{sa=(tE(M)|0)!=0|0;ya=sa;za=c[h>>2]|0}if((za|0)==95){Aa=1}else{Aa=(tE(za)|0)!=0|0}if((ya|0)==(Aa|0)){ra=260;break c}}}while(0);pa=ja+40|0;if((c[pa>>2]|0)==0){Y=ea;Z=fa;_=ga;break b}else{ja=ja+32|0;ka=pa}}if((ra|0)==260){ra=0;pa=ea|0;c[pa>>2]=c[ka>>2];if(F){qa=ea+4|0;sa=0;do{c[(c[qa>>2]|0)+(sa<<2)>>2]=-1;sa=sa+1|0;}while((sa|0)<(t|0))}sa=c[ja+16>>2]|0;do{if((sa|0)!=0){qa=c[sa>>2]|0;if((qa|0)<=-1){break}ka=ea+4|0;Ba=sa;Ca=qa;do{if((Ca|0)<(t|0)){c[(c[ka>>2]|0)+(Ca<<2)>>2]=O}Ba=Ba+4|0;Ca=c[Ba>>2]|0;}while((Ca|0)>-1)}}while(0);sa=(c[pa>>2]|0)!=(c[u>>2]|0);if(sa|L){Da=sa?ga:1;Ea=sa?fa:O;Fa=ea+4|0}else{sa=ea+4|0;Ca=0;while(1){c[n+(Ca<<2)>>2]=c[(c[sa>>2]|0)+(Ca<<2)>>2];Ba=Ca+1|0;if((Ba|0)<(t|0)){Ca=Ba}else{Da=1;Ea=O;Fa=sa;break}}}c[C+(c[la>>2]<<3)>>2]=O;c[C+(c[la>>2]<<3)+4>>2]=Fa;ma=Da;na=Ea;oa=ea+8|0}sa=ja+40|0;if((c[sa>>2]|0)==0){Y=oa;Z=na;_=ma;break}else{ea=oa;fa=na;ga=ma;ha=ja+32|0;ia=sa}}}}while(0);c[Y>>2]=0;Ga=_;Ha=Z}else{if(K|(V|0)==(U|0)){Ia=T;break}else{Ga=S;Ha=T}}X=c[h>>2]|0;if((X|0)==0){Ia=Ha;break}W=O+P|0;ia=KE(h,N,4)|0;if((ia|0)<1){if((ia|0)<0){A=1;break a}Ja=ia+1|0}else{Ja=ia}ia=N+Ja|0;if((c[x>>2]|0)==0|(Ga|0)==0){Ka=U;La=Ga;Ma=Q}else{ha=U|0;ga=c[ha>>2]|0;if((ga|0)==0){Na=Q}else{fa=Q;ea=ha;ha=ga;while(1){ga=c[J>>2]|0;aa=c[ga>>2]|0;$=ea+4|0;e:do{if((aa|0)>-1){ca=0;ba=aa;while(1){sa=c[ga+((ca|1)<<2)>>2]|0;if((ba|0)>=(t|0)){Oa=fa;break e}Ca=c[$>>2]|0;if((c[Ca+(sa<<2)>>2]|0)==(c[n+(sa<<2)>>2]|0)){if((c[Ca+(ba<<2)>>2]|0)<(c[n+(ba<<2)>>2]|0)){Oa=fa;break e}}Ca=ca+2|0;sa=c[ga+(Ca<<2)>>2]|0;if((sa|0)>-1){ca=Ca;ba=sa}else{ra=288;break}}}else{ra=288}}while(0);if((ra|0)==288){ra=0;c[fa>>2]=ha;ga=fa+4|0;aa=c[ga>>2]|0;c[ga>>2]=c[$>>2];c[$>>2]=aa;Oa=fa+8|0}aa=ea+8|0;ga=c[aa>>2]|0;if((ga|0)==0){Na=Oa;break}else{fa=Oa;ea=aa;ha=ga}}}c[Na>>2]=0;Ka=Q;La=0;Ma=U}ha=c[Ka>>2]|0;if((ha|0)==0){Pa=Ma;Qa=Ha;Ra=La;Sa=R}else{ea=(W|0)==0;fa=(X|0)==95;ga=(W|0)<1&G;aa=((X|0)!=10|E)^1;ba=Ka;ca=Ma;ja=Ha;sa=La;Ca=R;pa=ha;while(1){ha=pa+8|0;if((c[ha>>2]|0)==0){Ta=ca;Ua=ja;Va=sa;Wa=Ca}else{Ba=ba+4|0;ka=ca;qa=ja;Xa=sa;Ya=Ca;_a=pa;$a=ha;while(1){f:do{if((c[_a>>2]|0)>>>0>X>>>0){ab=Ya;bb=Xa;cb=qa;db=ka}else{if((c[_a+4>>2]|0)>>>0<X>>>0){ab=Ya;bb=Xa;cb=qa;db=ka;break}ha=_a+20|0;eb=c[ha>>2]|0;g:do{if((eb|0)!=0){if(!((eb&1|0)==0|ga|aa)){ab=Ya;bb=Xa;cb=qa;db=ka;break f}if((eb&2|0)!=0){fb=c[h>>2]|0;if((fb|q|0)!=0&((fb|0)!=10|E)){ab=Ya;bb=Xa;cb=qa;db=ka;break f}}do{if((eb&16|0)!=0){if(fa){ab=Ya;bb=Xa;cb=qa;db=ka;break f}if((tE(X)|0)!=0){ab=Ya;bb=Xa;cb=qa;db=ka;break f}fb=c[h>>2]|0;if((fb|0)==95){break}if((tE(fb)|0)==0){ab=Ya;bb=Xa;cb=qa;db=ka;break f}}}while(0);fb=c[ha>>2]|0;if((fb&32|0)==0){gb=fb}else{if(!fa){if((tE(X)|0)==0){ab=Ya;bb=Xa;cb=qa;db=ka;break f}}fb=c[h>>2]|0;if((fb|0)==95){ab=Ya;bb=Xa;cb=qa;db=ka;break f}if((tE(fb)|0)!=0){ab=Ya;bb=Xa;cb=qa;db=ka;break f}gb=c[ha>>2]|0}do{if((gb&64|0)==0|ea){hb=gb}else{fb=c[h>>2]|0;if((fb|0)==0){hb=gb;break}if(fa){ib=1;jb=fb}else{fb=(tE(X)|0)!=0|0;ib=fb;jb=c[h>>2]|0}if((jb|0)==95){kb=1}else{kb=(tE(jb)|0)!=0|0}if((ib|0)==(kb|0)){ab=Ya;bb=Xa;cb=qa;db=ka;break f}hb=c[ha>>2]|0}}while(0);if((hb&128|0)==0){lb=hb}else{if(ea){ab=Ya;bb=Xa;cb=qa;db=ka;break f}fb=c[h>>2]|0;if((fb|0)==0){ab=Ya;bb=Xa;cb=qa;db=ka;break f}if(fa){mb=1;nb=fb}else{fb=(tE(X)|0)!=0|0;mb=fb;nb=c[h>>2]|0}if((nb|0)==95){ob=1}else{ob=(tE(nb)|0)!=0|0}if((mb|0)!=(ob|0)){ab=Ya;bb=Xa;cb=qa;db=ka;break f}lb=c[ha>>2]|0}do{if((lb&4|0)==0){pb=lb}else{if((c[r>>2]&2|0)!=0){pb=lb;break}if((xE(X,c[_a+24>>2]|0)|0)==0){ab=Ya;bb=Xa;cb=qa;db=ka;break f}pb=c[ha>>2]|0}}while(0);do{if((pb&4|0)!=0){if((c[r>>2]&2|0)==0){break}fb=JE(X)|0;qb=_a+24|0;if((xE(fb,c[qb>>2]|0)|0)!=0){break}fb=HE(X)|0;if((xE(fb,c[qb>>2]|0)|0)==0){ab=Ya;bb=Xa;cb=qa;db=ka;break f}}}while(0);if((c[ha>>2]&8|0)==0){break}qb=c[_a+28>>2]|0;fb=c[qb>>2]|0;if((fb|0)==0){break}if((c[r>>2]&2|0)==0){rb=qb;sb=fb;while(1){if((xE(X,sb)|0)!=0){ab=Ya;bb=Xa;cb=qa;db=ka;break f}rb=rb+4|0;sb=c[rb>>2]|0;if((sb|0)==0){break g}}}else{tb=qb}do{sb=HE(X)|0;if((xE(sb,c[tb>>2]|0)|0)!=0){ab=Ya;bb=Xa;cb=qa;db=ka;break f}sb=JE(X)|0;if((xE(sb,c[tb>>2]|0)|0)!=0){ab=Ya;bb=Xa;cb=qa;db=ka;break f}tb=tb+4|0;}while((c[tb>>2]|0)!=0)}}while(0);if(F){ha=0;do{c[Ya+(ha<<2)>>2]=c[(c[Ba>>2]|0)+(ha<<2)>>2];ha=ha+1|0;}while((ha|0)<(t|0))}ha=c[_a+16>>2]|0;do{if((ha|0)!=0){eb=c[ha>>2]|0;if((eb|0)>-1){ub=ha;vb=eb}else{break}do{if((vb|0)<(t|0)){c[Ya+(vb<<2)>>2]=W}ub=ub+4|0;vb=c[ub>>2]|0;}while((vb|0)>-1)}}while(0);ha=_a+12|0;eb=c[ha>>2]|0;if((c[C+(eb<<3)>>2]|0)<(W|0)){qb=ka|0;c[qb>>2]=c[$a>>2];sb=ka+4|0;rb=c[sb>>2]|0;c[sb>>2]=Ya;c[C+(c[ha>>2]<<3)>>2]=W;c[C+(c[ha>>2]<<3)+4>>2]=sb;do{if((c[qb>>2]|0)==(c[u>>2]|0)){if((qa|0)==-1){if(F){wb=0}else{xb=1;yb=W;break}}else{if(!F){xb=Xa;yb=qa;break}if((c[c[sb>>2]>>2]|0)>(c[n>>2]|0)){xb=Xa;yb=qa;break}else{wb=0}}while(1){c[n+(wb<<2)>>2]=c[(c[sb>>2]|0)+(wb<<2)>>2];ha=wb+1|0;if((ha|0)<(t|0)){wb=ha}else{xb=1;yb=W;break}}}else{xb=Xa;yb=qa}}while(0);ab=rb;bb=xb;cb=yb;db=ka+8|0;break}sb=c[w>>2]|0;qb=c[C+(eb<<3)+4>>2]|0;ha=c[qb>>2]|0;if(F){zb=0}else{ab=Ya;bb=Xa;cb=qa;db=ka;break}while(1){fb=c[Ya+(zb<<2)>>2]|0;Ab=c[ha+(zb<<2)>>2]|0;if((c[sb+(zb<<2)>>2]|0)==0){if((fb|0)<(Ab|0)){break}if((fb|0)>(Ab|0)){ab=Ya;bb=Xa;cb=qa;db=ka;break f}}else{if((fb|0)>(Ab|0)){break}if((fb|0)<(Ab|0)){ab=Ya;bb=Xa;cb=qa;db=ka;break f}}Ab=zb+1|0;if((Ab|0)<(t|0)){zb=Ab}else{ab=Ya;bb=Xa;cb=qa;db=ka;break f}}c[qb>>2]=Ya;if((c[$a>>2]|0)==(c[u>>2]|0)){Bb=0}else{ab=ha;bb=Xa;cb=qa;db=ka;break}while(1){c[n+(Bb<<2)>>2]=c[Ya+(Bb<<2)>>2];sb=Bb+1|0;if((sb|0)<(t|0)){Bb=sb}else{ab=ha;bb=1;cb=W;db=ka;break}}}}while(0);ha=_a+40|0;if((c[ha>>2]|0)==0){Ta=db;Ua=cb;Va=bb;Wa=ab;break}else{ka=db;qa=cb;Xa=bb;Ya=ab;_a=_a+32|0;$a=ha}}}$a=ba+8|0;_a=c[$a>>2]|0;if((_a|0)==0){Pa=Ta;Qa=Ua;Ra=Va;Sa=Wa;break}else{ba=$a;ca=Ta;ja=Ua;sa=Va;Ca=Wa;pa=_a}}}c[Pa>>2]=0;M=X;N=ia;O=W;P=Ja;Q=Ka;R=Sa;S=Ra;T=Qa;U=Ma;V=Pa}eF(z);Cb=Ia>>>31;Db=Ia;ra=373}else{c[j>>2]=0;V=f&1;U=f&2;T=k+56|0;S=c[T>>2]&4;R=_E(0,0)|0;if((R|0)==0){A=12;break}Q=aF(R,0,0,0,32)|0;P=Q;if((Q|0)==0){$E(R);A=12;break}c[Q+24>>2]=0;c[Q+28>>2]=0;Q=c[l>>2]|0;if((Q|0)==0){Eb=0;ra=9}else{O=dF(Q<<2)|0;N=O;if((O|0)==0){Fb=12;Gb=0;Hb=0;Ib=N;Jb=0}else{Eb=N;ra=9}}do{if((ra|0)==9){N=Eb;O=c[k+28>>2]|0;if((O|0)==0){Kb=0}else{M=dF(O<<3)|0;O=M;if((M|0)==0){Fb=12;Gb=O;Hb=0;Ib=Eb;Jb=0;break}else{Kb=O}}O=k+52|0;M=c[O>>2]|0;if((M|0)==0){Lb=0}else{u=dF(M<<2)|0;M=u;if((u|0)==0){Fb=12;Gb=Kb;Hb=M;Ib=Eb;Jb=0;break}else{Lb=M}}M=Lb;u=(n|0)==0;F=k+8|0;C=k+12|0;w=k+32|0;r=(S|0)==0;E=(V|0)==0;q=b;G=1;J=-1;x=-1;K=P;L=Q;h:while(1){do{if((L|0)>0){if(u){vF(N|0,-1|0,L<<2|0)|0;break}else{v=0;do{c[Eb+(v<<2)>>2]=-1;c[n+(v<<2)>>2]=-1;v=v+1|0;}while((v|0)<(c[l>>2]|0))}}}while(0);v=c[O>>2]|0;if((v|0)>0){vF(M|0,0,v<<2|0)|0}v=c[j>>2]|0;B=G+J|0;y=KE(j,q,4)|0;if((y|0)<1){if((y|0)<0){A=1;break a}Mb=y+1|0}else{Mb=y}y=q+Mb|0;D=c[j>>2]|0;o=c[F>>2]|0;s=o+8|0;if((c[s>>2]|0)==0){Nb=Mb;Ob=x;Pb=K;Qb=0;ra=195}else{pa=(B|0)==0;Ca=(v|0)==95;sa=(B|0)<1&E;ja=((v|0)!=10|r)^1;ca=0;ba=0;fa=K;ea=o;o=s;while(1){s=ea+20|0;aa=c[s>>2]|0;i:do{if((aa|0)==0){ra=56}else{if(!((aa&1|0)==0|sa|ja)){Rb=fa;Sb=ba;Tb=ca;break}if((aa&2|0)!=0){ga=c[j>>2]|0;if((ga|U|0)!=0&((ga|0)!=10|r)){Rb=fa;Sb=ba;Tb=ca;break}}do{if((aa&16|0)!=0){if(Ca){Rb=fa;Sb=ba;Tb=ca;break i}if((tE(v)|0)!=0){Rb=fa;Sb=ba;Tb=ca;break i}ga=c[j>>2]|0;if((ga|0)==95){break}if((tE(ga)|0)==0){Rb=fa;Sb=ba;Tb=ca;break i}}}while(0);ga=c[s>>2]|0;if((ga&32|0)==0){Ub=ga}else{if(!Ca){if((tE(v)|0)==0){Rb=fa;Sb=ba;Tb=ca;break}}ga=c[j>>2]|0;if((ga|0)==95){Rb=fa;Sb=ba;Tb=ca;break}if((tE(ga)|0)!=0){Rb=fa;Sb=ba;Tb=ca;break}Ub=c[s>>2]|0}do{if((Ub&64|0)==0|pa){Vb=Ub}else{ga=c[j>>2]|0;if((ga|0)==0){Vb=Ub;break}if(Ca){Wb=1;Xb=ga}else{ga=(tE(v)|0)!=0|0;Wb=ga;Xb=c[j>>2]|0}if((Xb|0)==95){Yb=1}else{Yb=(tE(Xb)|0)!=0|0}if((Wb|0)==(Yb|0)){Rb=fa;Sb=ba;Tb=ca;break i}Vb=c[s>>2]|0}}while(0);if((Vb&128|0)==0){ra=56;break}if(pa){Rb=fa;Sb=ba;Tb=ca;break}ga=c[j>>2]|0;if((ga|0)==0){Rb=fa;Sb=ba;Tb=ca;break}if(Ca){Zb=1;_b=ga}else{ga=(tE(v)|0)!=0|0;Zb=ga;_b=c[j>>2]|0}if((_b|0)==95){$b=1}else{$b=(tE(_b)|0)!=0|0}if((Zb|0)==($b|0)){ra=56}else{Rb=fa;Sb=ba;Tb=ca}}}while(0);do{if((ra|0)==56){ra=0;if((ca|0)==0){Rb=fa;Sb=c[ea+16>>2]|0;Tb=c[o>>2]|0;break}s=fa+28|0;aa=c[s>>2]|0;if((aa|0)==0){ga=aF(R,0,0,0,32)|0;_a=ga;if((ga|0)==0){ra=60;break h}c[ga+24>>2]=fa;c[ga+28>>2]=0;$a=aF(R,0,0,0,c[l>>2]<<2)|0;c[ga+20>>2]=$a;if(($a|0)==0){ra=67;break h}c[s>>2]=_a;ac=_a}else{ac=aa}c[ac>>2]=B;c[ac+4>>2]=y;c[ac+8>>2]=c[o>>2];c[ac+12>>2]=c[ea+12>>2];c[ac+16>>2]=c[j>>2];if((c[l>>2]|0)>0){aa=ac+20|0;_a=0;do{c[(c[aa>>2]|0)+(_a<<2)>>2]=c[Eb+(_a<<2)>>2];_a=_a+1|0;}while((_a|0)<(c[l>>2]|0))}_a=c[ea+16>>2]|0;if((_a|0)==0){Rb=ac;Sb=ba;Tb=ca;break}aa=c[_a>>2]|0;if((aa|0)<=-1){Rb=ac;Sb=ba;Tb=ca;break}s=ac+20|0;$a=_a;_a=aa;while(1){aa=$a+4|0;c[(c[s>>2]|0)+(_a<<2)>>2]=B;ga=c[aa>>2]|0;if((ga|0)>-1){$a=aa;_a=ga}else{Rb=ac;Sb=ba;Tb=ca;break}}}}while(0);_a=ea+40|0;if((c[_a>>2]|0)==0){break}else{ca=Tb;ba=Sb;fa=Rb;ea=ea+32|0;o=_a}}do{if((Sb|0)==0){bc=0}else{o=c[Sb>>2]|0;if((o|0)>-1){cc=Sb;dc=o}else{bc=Sb;break}while(1){c[Eb+(dc<<2)>>2]=B;o=cc+4|0;ea=c[o>>2]|0;if((ea|0)>-1){cc=o;dc=ea}else{bc=o;break}}}}while(0);if((Tb|0)==0){Nb=Mb;Ob=x;Pb=Rb;Qb=bc;ra=195}else{ec=y;fc=B;gc=Mb;hc=x;ic=Rb;jc=bc;kc=Tb}}j:while(1){if((ra|0)==195){ra=0;o=Pb+24|0;if((c[o>>2]|0)==0){break}ea=Pb+8|0;fa=c[ea>>2]|0;if((c[fa+20>>2]&256|0)==0){lc=fa}else{c[Lb+(c[Pb+12>>2]<<2)>>2]=0;lc=c[ea>>2]|0}ea=c[Pb>>2]|0;fa=c[Pb+4>>2]|0;c[j>>2]=c[Pb+16>>2];ba=c[l>>2]|0;if((ba|0)>0){ca=Pb+20|0;v=0;do{c[Eb+(v<<2)>>2]=c[(c[ca>>2]|0)+(v<<2)>>2];v=v+1|0;}while((v|0)<(ba|0))}ec=fa;fc=ea;gc=Nb;hc=Ob;ic=c[o>>2]|0;jc=Qb;kc=lc}if((kc|0)==(c[C>>2]|0)){mc=jc;nc=ic;oc=gc;pc=fc}else{ba=kc;v=jc;ca=ic;Ca=gc;pa=fc;ja=ec;while(1){sa=ba+8|0;do{if((c[sa>>2]|0)==0){ra=109}else{if((c[ba+20>>2]&256|0)==0){ra=109;break}_a=c[ba+24>>2]|0;ZE(_a+1|0,Kb,c[T>>2]&-9,a,Eb,pa);$a=c[Kb+(_a<<3)>>2]|0;s=c[Kb+(_a<<3)+4>>2]|0;_a=s-$a|0;if((Za(b+$a|0,ja-1|0,_a|0)|0)!=0){Nb=Ca;Ob=hc;Pb=ca;Qb=v;ra=195;continue j}ga=(s|0)==($a|0);$a=ga&1;s=Lb+(c[ba+12>>2]<<2)|0;if(ga){if((c[s>>2]|0)!=0){Nb=Ca;Ob=hc;Pb=ca;Qb=v;ra=195;continue j}}c[s>>2]=$a;$a=_a-1|0;_a=$a+pa|0;s=c[j>>2]|0;ga=KE(j,ja+$a|0,4)|0;if((ga|0)<1){if((ga|0)<0){A=1;break a}qc=ga+1|0}else{qc=ga}rc=s;sc=qc+$a|0;tc=_a;uc=qc}}while(0);do{if((ra|0)==109){ra=0;_a=c[j>>2]|0;if((_a|0)==0){Nb=Ca;Ob=hc;Pb=ca;Qb=v;ra=195;continue j}$a=KE(j,ja,4)|0;if(($a|0)>=1){rc=_a;sc=$a;tc=pa;uc=$a;break}if(($a|0)<0){A=1;break a}s=$a+1|0;rc=_a;sc=s;tc=pa;uc=s}}while(0);s=ja+sc|0;_a=tc+Ca|0;if((c[sa>>2]|0)==0){Nb=uc;Ob=hc;Pb=ca;Qb=v;ra=195;continue j}$a=(_a|0)==0;ga=(rc|0)==95;aa=(_a|0)<1&E;Ya=((rc|0)!=10|r)^1;Xa=v;qa=ca;ka=ba;Ba=0;$=sa;while(1){k:do{if((c[ka>>2]|0)>>>0>rc>>>0){vc=Ba;wc=qa;xc=Xa}else{if((c[ka+4>>2]|0)>>>0<rc>>>0){vc=Ba;wc=qa;xc=Xa;break}ha=ka+20|0;qb=c[ha>>2]|0;l:do{if((qb|0)!=0){if(!((qb&1|0)==0|aa|Ya)){vc=Ba;wc=qa;xc=Xa;break k}if((qb&2|0)!=0){sb=c[j>>2]|0;if((sb|U|0)!=0&((sb|0)!=10|r)){vc=Ba;wc=qa;xc=Xa;break k}}do{if((qb&16|0)!=0){if(ga){vc=Ba;wc=qa;xc=Xa;break k}if((tE(rc)|0)!=0){vc=Ba;wc=qa;xc=Xa;break k}sb=c[j>>2]|0;if((sb|0)==95){break}if((tE(sb)|0)==0){vc=Ba;wc=qa;xc=Xa;break k}}}while(0);sb=c[ha>>2]|0;if((sb&32|0)==0){yc=sb}else{if(!ga){if((tE(rc)|0)==0){vc=Ba;wc=qa;xc=Xa;break k}}sb=c[j>>2]|0;if((sb|0)==95){vc=Ba;wc=qa;xc=Xa;break k}if((tE(sb)|0)!=0){vc=Ba;wc=qa;xc=Xa;break k}yc=c[ha>>2]|0}do{if((yc&64|0)==0|$a){zc=yc}else{sb=c[j>>2]|0;if((sb|0)==0){zc=yc;break}if(ga){Ac=1;Bc=sb}else{sb=(tE(rc)|0)!=0|0;Ac=sb;Bc=c[j>>2]|0}if((Bc|0)==95){Cc=1}else{Cc=(tE(Bc)|0)!=0|0}if((Ac|0)==(Cc|0)){vc=Ba;wc=qa;xc=Xa;break k}zc=c[ha>>2]|0}}while(0);if((zc&128|0)==0){Dc=zc}else{if($a){vc=Ba;wc=qa;xc=Xa;break k}sb=c[j>>2]|0;if((sb|0)==0){vc=Ba;wc=qa;xc=Xa;break k}if(ga){Ec=1;Fc=sb}else{sb=(tE(rc)|0)!=0|0;Ec=sb;Fc=c[j>>2]|0}if((Fc|0)==95){Gc=1}else{Gc=(tE(Fc)|0)!=0|0}if((Ec|0)!=(Gc|0)){vc=Ba;wc=qa;xc=Xa;break k}Dc=c[ha>>2]|0}do{if((Dc&4|0)==0){Hc=Dc}else{if((c[T>>2]&2|0)!=0){Hc=Dc;break}if((xE(rc,c[ka+24>>2]|0)|0)==0){vc=Ba;wc=qa;xc=Xa;break k}Hc=c[ha>>2]|0}}while(0);do{if((Hc&4|0)!=0){if((c[T>>2]&2|0)==0){break}sb=JE(rc)|0;eb=ka+24|0;if((xE(sb,c[eb>>2]|0)|0)!=0){break}sb=HE(rc)|0;if((xE(sb,c[eb>>2]|0)|0)==0){vc=Ba;wc=qa;xc=Xa;break k}}}while(0);if((c[ha>>2]&8|0)==0){break}eb=c[ka+28>>2]|0;sb=c[eb>>2]|0;if((sb|0)==0){break}if((c[T>>2]&2|0)==0){rb=eb;Ab=sb;while(1){if((xE(rc,Ab)|0)!=0){vc=Ba;wc=qa;xc=Xa;break k}rb=rb+4|0;Ab=c[rb>>2]|0;if((Ab|0)==0){break l}}}else{Ic=eb}do{Ab=HE(rc)|0;if((xE(Ab,c[Ic>>2]|0)|0)!=0){vc=Ba;wc=qa;xc=Xa;break k}Ab=JE(rc)|0;if((xE(Ab,c[Ic>>2]|0)|0)!=0){vc=Ba;wc=qa;xc=Xa;break k}Ic=Ic+4|0;}while((c[Ic>>2]|0)!=0)}}while(0);if((Ba|0)==0){vc=c[$>>2]|0;wc=qa;xc=c[ka+16>>2]|0;break}ha=qa+28|0;qb=c[ha>>2]|0;if((qb|0)==0){eb=aF(R,0,0,0,32)|0;Ab=eb;if((eb|0)==0){ra=169;break h}c[eb+24>>2]=qa;c[eb+28>>2]=0;rb=aF(R,0,0,0,c[l>>2]<<2)|0;c[eb+20>>2]=rb;if((rb|0)==0){ra=176;break h}c[ha>>2]=Ab;Jc=Ab}else{Jc=qb}c[Jc>>2]=_a;c[Jc+4>>2]=s;c[Jc+8>>2]=c[$>>2];c[Jc+12>>2]=c[ka+12>>2];c[Jc+16>>2]=c[j>>2];if((c[l>>2]|0)>0){qb=Jc+20|0;Ab=0;do{c[(c[qb>>2]|0)+(Ab<<2)>>2]=c[Eb+(Ab<<2)>>2];Ab=Ab+1|0;}while((Ab|0)<(c[l>>2]|0))}Ab=c[ka+16>>2]|0;if((Ab|0)==0){vc=Ba;wc=Jc;xc=Xa;break}qb=Jc+20|0;ha=c[Ab>>2]|0;if((ha|0)>-1){Kc=Ab;Lc=ha}else{vc=Ba;wc=Jc;xc=Xa;break}while(1){c[(c[qb>>2]|0)+(Lc<<2)>>2]=_a;ha=Kc+4|0;Ab=c[ha>>2]|0;if((Ab|0)>-1){Kc=ha;Lc=Ab}else{vc=Ba;wc=Jc;xc=Xa;break}}}}while(0);qb=ka+40|0;if((c[qb>>2]|0)==0){break}else{Xa=xc;qa=wc;ka=ka+32|0;Ba=vc;$=qb}}if((vc|0)==0){Nb=uc;Ob=hc;Pb=wc;Qb=xc;ra=195;continue j}do{if((xc|0)==0){Mc=0}else{$=c[xc>>2]|0;if(($|0)>-1){Nc=xc;Oc=$}else{Mc=xc;break}while(1){$=Nc+4|0;c[Eb+(Oc<<2)>>2]=_a;Ba=c[$>>2]|0;if((Ba|0)>-1){Nc=$;Oc=Ba}else{Mc=$;break}}}}while(0);if((vc|0)==(c[C>>2]|0)){mc=Mc;nc=wc;oc=uc;pc=_a;break}else{ba=vc;v=Mc;ca=wc;Ca=uc;pa=_a;ja=s}}}m:do{if((hc|0)<(pc|0)){ra=96}else{if((hc|0)!=(pc|0)|u){Nb=oc;Ob=hc;Pb=nc;Qb=mc;ra=195;continue j}ja=c[l>>2]|0;pa=c[w>>2]|0;if((ja|0)>0){Pc=0}else{Nb=oc;Ob=hc;Pb=nc;Qb=mc;ra=195;continue j}while(1){Ca=c[Eb+(Pc<<2)>>2]|0;ca=c[n+(Pc<<2)>>2]|0;if((c[pa+(Pc<<2)>>2]|0)==0){if((Ca|0)<(ca|0)){ra=96;break m}if((Ca|0)>(ca|0)){Nb=oc;Ob=hc;Pb=nc;Qb=mc;ra=195;continue j}}else{if((Ca|0)>(ca|0)){Qc=ja;break m}if((Ca|0)<(ca|0)){Nb=oc;Ob=hc;Pb=nc;Qb=mc;ra=195;continue j}}ca=Pc+1|0;if((ca|0)<(ja|0)){Pc=ca}else{Nb=oc;Ob=hc;Pb=nc;Qb=mc;ra=195;continue j}}}}while(0);if((ra|0)==96){ra=0;if(u){Nb=oc;Ob=pc;Pb=nc;Qb=mc;ra=195;continue}Qc=c[l>>2]|0}if((Qc|0)>0){Rc=0}else{Nb=oc;Ob=pc;Pb=nc;Qb=mc;ra=195;continue}while(1){c[n+(Rc<<2)>>2]=c[Eb+(Rc<<2)>>2];ja=Rc+1|0;if((ja|0)<(c[l>>2]|0)){Rc=ja}else{Nb=oc;Ob=pc;Pb=nc;Qb=mc;ra=195;continue j}}}if((Ob|0)>=0){ra=205;break}if((c[j>>2]|0)==0){ra=205;break}c[j>>2]=D;q=y;G=Nb;J=B;x=Ob;K=Pb;L=c[l>>2]|0}if((ra|0)==60){$E(R);if((Eb|0)!=0){eF(N)}if((Kb|0)!=0){eF(Kb)}if((Lb|0)==0){A=12;break a}eF(M);A=12;break a}else if((ra|0)==67){$E(R);if((Eb|0)!=0){eF(N)}if((Kb|0)!=0){eF(Kb)}if((Lb|0)==0){A=12;break a}eF(M);A=12;break a}else if((ra|0)==169){$E(R);if((Eb|0)!=0){eF(N)}if((Kb|0)!=0){eF(Kb)}if((Lb|0)==0){A=12;break a}eF(M);A=12;break a}else if((ra|0)==176){$E(R);if((Eb|0)!=0){eF(N)}if((Kb|0)!=0){eF(Kb)}if((Lb|0)==0){A=12;break a}eF(M);A=12;break a}else if((ra|0)==205){Fb=Ob>>>31;Gb=Kb;Hb=Lb;Ib=Eb;Jb=Ob;break}}}while(0);$E(R);if((Ib|0)!=0){eF(Ib)}if((Gb|0)!=0){eF(Gb)}if((Hb|0)==0){Cb=Fb;Db=Jb;ra=373;break}eF(Hb);Cb=Fb;Db=Jb;ra=373}}while(0);do{if((ra|0)==373){if((Cb|0)!=0){A=Cb;break}ZE(d,e,c[k+56>>2]|0,a,n,Db);A=0}}while(0);if((n|0)==0){p=A;i=g;return p|0}eF(m);p=A;i=g;return p|0}function ZE(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0;do{if((g|0)>-1){if((d&8|0)!=0){h=0;break}i=c[e+16>>2]|0;j=e+28|0;k=c[j>>2]|0;l=(a|0)!=0;if((k|0)!=0&l){m=e+48|0;n=0;while(1){o=c[i+(n*12|0)>>2]|0;if((o|0)==(c[m>>2]|0)){c[b+(n<<3)>>2]=g;p=g}else{q=c[f+(o<<2)>>2]|0;c[b+(n<<3)>>2]=q;p=q}q=c[i+(n*12|0)+4>>2]|0;if((q|0)==(c[m>>2]|0)){c[b+(n<<3)+4>>2]=g;r=g}else{o=c[f+(q<<2)>>2]|0;c[b+(n<<3)+4>>2]=o;r=o}if((p|0)==-1|(r|0)==-1){c[b+(n<<3)+4>>2]=-1;c[b+(n<<3)>>2]=-1}o=n+1|0;q=c[j>>2]|0;if(o>>>0<q>>>0&o>>>0<a>>>0){n=o}else{s=q;break}}}else{s=k}if((s|0)!=0&l){t=0;u=s}else{h=0;break}while(1){n=b+(t<<3)+4|0;m=c[i+(t*12|0)+8>>2]|0;do{if((m|0)==0){v=u}else{q=c[m>>2]|0;if((q|0)<=-1){v=u;break}o=b+(t<<3)|0;w=0;x=q;q=c[o>>2]|0;while(1){if((q|0)<(c[b+(x<<3)>>2]|0)){y=21}else{if((c[n>>2]|0)>(c[b+(x<<3)+4>>2]|0)){y=21}else{z=q}}if((y|0)==21){y=0;c[n>>2]=-1;c[o>>2]=-1;z=-1}A=w+1|0;B=c[m+(A<<2)>>2]|0;if((B|0)>-1){w=A;x=B;q=z}else{break}}v=c[j>>2]|0}}while(0);m=t+1|0;if(m>>>0<v>>>0&m>>>0<a>>>0){t=m;u=v}else{h=m;break}}}else{h=0}}while(0);if(h>>>0<a>>>0){C=h}else{return}do{c[b+(C<<3)>>2]=-1;c[b+(C<<3)+4>>2]=-1;C=C+1|0;}while(C>>>0<a>>>0);return}function _E(a,b){a=a|0;b=b|0;var c=0,d=0;if((a|0)==0){c=fF(1,24)|0}else{vF(b|0,0,24)|0;c=b}if((c|0)==0){d=0;return d|0}d=c;return d|0}function $E(a){a=a|0;var b=0,d=0,e=0;b=c[a>>2]|0;if((b|0)==0){d=a;eF(d);return}else{e=b}while(1){eF(c[e>>2]|0);b=c[e+4>>2]|0;eF(e);if((b|0)==0){break}else{e=b}}d=a;eF(d);return}function aF(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;g=a+16|0;if((c[g>>2]|0)!=0){h=0;return h|0}i=a+12|0;j=c[i>>2]|0;do{if(j>>>0<f>>>0){if((b|0)!=0){if((d|0)!=0){c[a+8>>2]=d;c[i>>2]=1024;k=1024;l=d;break}c[g>>2]=1;h=0;return h|0}m=f<<3;n=m>>>0>1024>>>0?m:1024;m=dF(8)|0;o=m;if((m|0)==0){c[g>>2]=1;h=0;return h|0}p=dF(n)|0;q=m;c[q>>2]=p;if((p|0)==0){eF(m);c[g>>2]=1;h=0;return h|0}c[m+4>>2]=0;m=a+4|0;p=c[m>>2]|0;if((p|0)!=0){c[p+4>>2]=o}p=a|0;if((c[p>>2]|0)==0){c[p>>2]=o}c[m>>2]=o;o=c[q>>2]|0;c[a+8>>2]=o;c[i>>2]=n;k=n;l=o}else{k=j;l=c[a+8>>2]|0}}while(0);j=l+f&3;g=((j|0)==0?0:4-j|0)+f|0;c[a+8>>2]=l+g;c[i>>2]=k-g;if((e|0)==0){h=l;return h|0}vF(l|0,0,g|0)|0;h=l;return h|0}function bF(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;if((b|0)==0){d=a+((cF(a)|0)<<2)|0;return d|0}else{e=a}while(1){f=c[e>>2]|0;if((f|0)==0|(f|0)==(b|0)){break}else{e=e+4|0}}d=(f|0)!=0?e:0;return d|0}function cF(a){a=a|0;var b=0;b=a;while(1){if((c[b>>2]|0)==0){break}else{b=b+4|0}}return b-a>>2|0}function dF(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0;do{if(a>>>0<245>>>0){if(a>>>0<11>>>0){b=16}else{b=a+11&-8}d=b>>>3;e=c[53374]|0;f=e>>>(d>>>0);if((f&3|0)!=0){g=(f&1^1)+d|0;h=g<<1;i=213536+(h<<2)|0;j=213536+(h+2<<2)|0;h=c[j>>2]|0;k=h+8|0;l=c[k>>2]|0;do{if((i|0)==(l|0)){c[53374]=e&~(1<<g)}else{if(l>>>0<(c[53378]|0)>>>0){fc();return 0}m=l+12|0;if((c[m>>2]|0)==(h|0)){c[m>>2]=i;c[j>>2]=l;break}else{fc();return 0}}}while(0);l=g<<3;c[h+4>>2]=l|3;j=h+(l|4)|0;c[j>>2]=c[j>>2]|1;n=k;return n|0}if(b>>>0<=(c[53376]|0)>>>0){o=b;break}if((f|0)!=0){j=2<<d;l=f<<d&(j|-j);j=(l&-l)-1|0;l=j>>>12&16;i=j>>>(l>>>0);j=i>>>5&8;m=i>>>(j>>>0);i=m>>>2&4;p=m>>>(i>>>0);m=p>>>1&2;q=p>>>(m>>>0);p=q>>>1&1;r=(j|l|i|m|p)+(q>>>(p>>>0))|0;p=r<<1;q=213536+(p<<2)|0;m=213536+(p+2<<2)|0;p=c[m>>2]|0;i=p+8|0;l=c[i>>2]|0;do{if((q|0)==(l|0)){c[53374]=e&~(1<<r)}else{if(l>>>0<(c[53378]|0)>>>0){fc();return 0}j=l+12|0;if((c[j>>2]|0)==(p|0)){c[j>>2]=q;c[m>>2]=l;break}else{fc();return 0}}}while(0);l=r<<3;m=l-b|0;c[p+4>>2]=b|3;q=p;e=q+b|0;c[q+(b|4)>>2]=m|1;c[q+l>>2]=m;l=c[53376]|0;if((l|0)!=0){q=c[53379]|0;d=l>>>3;l=d<<1;f=213536+(l<<2)|0;k=c[53374]|0;h=1<<d;do{if((k&h|0)==0){c[53374]=k|h;s=f;t=213536+(l+2<<2)|0}else{d=213536+(l+2<<2)|0;g=c[d>>2]|0;if(g>>>0>=(c[53378]|0)>>>0){s=g;t=d;break}fc();return 0}}while(0);c[t>>2]=q;c[s+12>>2]=q;c[q+8>>2]=s;c[q+12>>2]=f}c[53376]=m;c[53379]=e;n=i;return n|0}l=c[53375]|0;if((l|0)==0){o=b;break}h=(l&-l)-1|0;l=h>>>12&16;k=h>>>(l>>>0);h=k>>>5&8;p=k>>>(h>>>0);k=p>>>2&4;r=p>>>(k>>>0);p=r>>>1&2;d=r>>>(p>>>0);r=d>>>1&1;g=c[213800+((h|l|k|p|r)+(d>>>(r>>>0))<<2)>>2]|0;r=g;d=g;p=(c[g+4>>2]&-8)-b|0;while(1){g=c[r+16>>2]|0;if((g|0)==0){k=c[r+20>>2]|0;if((k|0)==0){break}else{u=k}}else{u=g}g=(c[u+4>>2]&-8)-b|0;k=g>>>0<p>>>0;r=u;d=k?u:d;p=k?g:p}r=d;i=c[53378]|0;if(r>>>0<i>>>0){fc();return 0}e=r+b|0;m=e;if(r>>>0>=e>>>0){fc();return 0}e=c[d+24>>2]|0;f=c[d+12>>2]|0;do{if((f|0)==(d|0)){q=d+20|0;g=c[q>>2]|0;if((g|0)==0){k=d+16|0;l=c[k>>2]|0;if((l|0)==0){v=0;break}else{w=l;x=k}}else{w=g;x=q}while(1){q=w+20|0;g=c[q>>2]|0;if((g|0)!=0){w=g;x=q;continue}q=w+16|0;g=c[q>>2]|0;if((g|0)==0){break}else{w=g;x=q}}if(x>>>0<i>>>0){fc();return 0}else{c[x>>2]=0;v=w;break}}else{q=c[d+8>>2]|0;if(q>>>0<i>>>0){fc();return 0}g=q+12|0;if((c[g>>2]|0)!=(d|0)){fc();return 0}k=f+8|0;if((c[k>>2]|0)==(d|0)){c[g>>2]=f;c[k>>2]=q;v=f;break}else{fc();return 0}}}while(0);a:do{if((e|0)!=0){f=d+28|0;i=213800+(c[f>>2]<<2)|0;do{if((d|0)==(c[i>>2]|0)){c[i>>2]=v;if((v|0)!=0){break}c[53375]=c[53375]&~(1<<c[f>>2]);break a}else{if(e>>>0<(c[53378]|0)>>>0){fc();return 0}q=e+16|0;if((c[q>>2]|0)==(d|0)){c[q>>2]=v}else{c[e+20>>2]=v}if((v|0)==0){break a}}}while(0);if(v>>>0<(c[53378]|0)>>>0){fc();return 0}c[v+24>>2]=e;f=c[d+16>>2]|0;do{if((f|0)!=0){if(f>>>0<(c[53378]|0)>>>0){fc();return 0}else{c[v+16>>2]=f;c[f+24>>2]=v;break}}}while(0);f=c[d+20>>2]|0;if((f|0)==0){break}if(f>>>0<(c[53378]|0)>>>0){fc();return 0}else{c[v+20>>2]=f;c[f+24>>2]=v;break}}}while(0);if(p>>>0<16>>>0){e=p+b|0;c[d+4>>2]=e|3;f=r+(e+4)|0;c[f>>2]=c[f>>2]|1}else{c[d+4>>2]=b|3;c[r+(b|4)>>2]=p|1;c[r+(p+b)>>2]=p;f=c[53376]|0;if((f|0)!=0){e=c[53379]|0;i=f>>>3;f=i<<1;q=213536+(f<<2)|0;k=c[53374]|0;g=1<<i;do{if((k&g|0)==0){c[53374]=k|g;y=q;z=213536+(f+2<<2)|0}else{i=213536+(f+2<<2)|0;l=c[i>>2]|0;if(l>>>0>=(c[53378]|0)>>>0){y=l;z=i;break}fc();return 0}}while(0);c[z>>2]=e;c[y+12>>2]=e;c[e+8>>2]=y;c[e+12>>2]=q}c[53376]=p;c[53379]=m}n=d+8|0;return n|0}else{if(a>>>0>4294967231>>>0){o=-1;break}f=a+11|0;g=f&-8;k=c[53375]|0;if((k|0)==0){o=g;break}r=-g|0;i=f>>>8;do{if((i|0)==0){A=0}else{if(g>>>0>16777215>>>0){A=31;break}f=(i+1048320|0)>>>16&8;l=i<<f;h=(l+520192|0)>>>16&4;j=l<<h;l=(j+245760|0)>>>16&2;B=14-(h|f|l)+(j<<l>>>15)|0;A=g>>>((B+7|0)>>>0)&1|B<<1}}while(0);i=c[213800+(A<<2)>>2]|0;b:do{if((i|0)==0){C=0;D=r;E=0}else{if((A|0)==31){F=0}else{F=25-(A>>>1)|0}d=0;m=r;p=i;q=g<<F;e=0;while(1){B=c[p+4>>2]&-8;l=B-g|0;if(l>>>0<m>>>0){if((B|0)==(g|0)){C=p;D=l;E=p;break b}else{G=p;H=l}}else{G=d;H=m}l=c[p+20>>2]|0;B=c[p+16+(q>>>31<<2)>>2]|0;j=(l|0)==0|(l|0)==(B|0)?e:l;if((B|0)==0){C=G;D=H;E=j;break}else{d=G;m=H;p=B;q=q<<1;e=j}}}}while(0);if((E|0)==0&(C|0)==0){i=2<<A;r=k&(i|-i);if((r|0)==0){o=g;break}i=(r&-r)-1|0;r=i>>>12&16;e=i>>>(r>>>0);i=e>>>5&8;q=e>>>(i>>>0);e=q>>>2&4;p=q>>>(e>>>0);q=p>>>1&2;m=p>>>(q>>>0);p=m>>>1&1;I=c[213800+((i|r|e|q|p)+(m>>>(p>>>0))<<2)>>2]|0}else{I=E}if((I|0)==0){J=D;K=C}else{p=I;m=D;q=C;while(1){e=(c[p+4>>2]&-8)-g|0;r=e>>>0<m>>>0;i=r?e:m;e=r?p:q;r=c[p+16>>2]|0;if((r|0)!=0){p=r;m=i;q=e;continue}r=c[p+20>>2]|0;if((r|0)==0){J=i;K=e;break}else{p=r;m=i;q=e}}}if((K|0)==0){o=g;break}if(J>>>0>=((c[53376]|0)-g|0)>>>0){o=g;break}q=K;m=c[53378]|0;if(q>>>0<m>>>0){fc();return 0}p=q+g|0;k=p;if(q>>>0>=p>>>0){fc();return 0}e=c[K+24>>2]|0;i=c[K+12>>2]|0;do{if((i|0)==(K|0)){r=K+20|0;d=c[r>>2]|0;if((d|0)==0){j=K+16|0;B=c[j>>2]|0;if((B|0)==0){L=0;break}else{M=B;N=j}}else{M=d;N=r}while(1){r=M+20|0;d=c[r>>2]|0;if((d|0)!=0){M=d;N=r;continue}r=M+16|0;d=c[r>>2]|0;if((d|0)==0){break}else{M=d;N=r}}if(N>>>0<m>>>0){fc();return 0}else{c[N>>2]=0;L=M;break}}else{r=c[K+8>>2]|0;if(r>>>0<m>>>0){fc();return 0}d=r+12|0;if((c[d>>2]|0)!=(K|0)){fc();return 0}j=i+8|0;if((c[j>>2]|0)==(K|0)){c[d>>2]=i;c[j>>2]=r;L=i;break}else{fc();return 0}}}while(0);c:do{if((e|0)!=0){i=K+28|0;m=213800+(c[i>>2]<<2)|0;do{if((K|0)==(c[m>>2]|0)){c[m>>2]=L;if((L|0)!=0){break}c[53375]=c[53375]&~(1<<c[i>>2]);break c}else{if(e>>>0<(c[53378]|0)>>>0){fc();return 0}r=e+16|0;if((c[r>>2]|0)==(K|0)){c[r>>2]=L}else{c[e+20>>2]=L}if((L|0)==0){break c}}}while(0);if(L>>>0<(c[53378]|0)>>>0){fc();return 0}c[L+24>>2]=e;i=c[K+16>>2]|0;do{if((i|0)!=0){if(i>>>0<(c[53378]|0)>>>0){fc();return 0}else{c[L+16>>2]=i;c[i+24>>2]=L;break}}}while(0);i=c[K+20>>2]|0;if((i|0)==0){break}if(i>>>0<(c[53378]|0)>>>0){fc();return 0}else{c[L+20>>2]=i;c[i+24>>2]=L;break}}}while(0);d:do{if(J>>>0<16>>>0){e=J+g|0;c[K+4>>2]=e|3;i=q+(e+4)|0;c[i>>2]=c[i>>2]|1}else{c[K+4>>2]=g|3;c[q+(g|4)>>2]=J|1;c[q+(J+g)>>2]=J;i=J>>>3;if(J>>>0<256>>>0){e=i<<1;m=213536+(e<<2)|0;r=c[53374]|0;j=1<<i;do{if((r&j|0)==0){c[53374]=r|j;O=m;P=213536+(e+2<<2)|0}else{i=213536+(e+2<<2)|0;d=c[i>>2]|0;if(d>>>0>=(c[53378]|0)>>>0){O=d;P=i;break}fc();return 0}}while(0);c[P>>2]=k;c[O+12>>2]=k;c[q+(g+8)>>2]=O;c[q+(g+12)>>2]=m;break}e=p;j=J>>>8;do{if((j|0)==0){Q=0}else{if(J>>>0>16777215>>>0){Q=31;break}r=(j+1048320|0)>>>16&8;i=j<<r;d=(i+520192|0)>>>16&4;B=i<<d;i=(B+245760|0)>>>16&2;l=14-(d|r|i)+(B<<i>>>15)|0;Q=J>>>((l+7|0)>>>0)&1|l<<1}}while(0);j=213800+(Q<<2)|0;c[q+(g+28)>>2]=Q;c[q+(g+20)>>2]=0;c[q+(g+16)>>2]=0;m=c[53375]|0;l=1<<Q;if((m&l|0)==0){c[53375]=m|l;c[j>>2]=e;c[q+(g+24)>>2]=j;c[q+(g+12)>>2]=e;c[q+(g+8)>>2]=e;break}l=c[j>>2]|0;if((Q|0)==31){R=0}else{R=25-(Q>>>1)|0}e:do{if((c[l+4>>2]&-8|0)==(J|0)){S=l}else{j=l;m=J<<R;while(1){T=j+16+(m>>>31<<2)|0;i=c[T>>2]|0;if((i|0)==0){break}if((c[i+4>>2]&-8|0)==(J|0)){S=i;break e}else{j=i;m=m<<1}}if(T>>>0<(c[53378]|0)>>>0){fc();return 0}else{c[T>>2]=e;c[q+(g+24)>>2]=j;c[q+(g+12)>>2]=e;c[q+(g+8)>>2]=e;break d}}}while(0);l=S+8|0;m=c[l>>2]|0;i=c[53378]|0;if(S>>>0<i>>>0){fc();return 0}if(m>>>0<i>>>0){fc();return 0}else{c[m+12>>2]=e;c[l>>2]=e;c[q+(g+8)>>2]=m;c[q+(g+12)>>2]=S;c[q+(g+24)>>2]=0;break}}}while(0);n=K+8|0;return n|0}}while(0);K=c[53376]|0;if(o>>>0<=K>>>0){S=K-o|0;T=c[53379]|0;if(S>>>0>15>>>0){J=T;c[53379]=J+o;c[53376]=S;c[J+(o+4)>>2]=S|1;c[J+K>>2]=S;c[T+4>>2]=o|3}else{c[53376]=0;c[53379]=0;c[T+4>>2]=K|3;S=T+(K+4)|0;c[S>>2]=c[S>>2]|1}n=T+8|0;return n|0}T=c[53377]|0;if(o>>>0<T>>>0){S=T-o|0;c[53377]=S;T=c[53380]|0;K=T;c[53380]=K+o;c[K+(o+4)>>2]=S|1;c[T+4>>2]=o|3;n=T+8|0;return n|0}do{if((c[44322]|0)==0){T=Hb(30)|0;if((T-1&T|0)==0){c[44324]=T;c[44323]=T;c[44325]=-1;c[44326]=-1;c[44327]=0;c[53485]=0;c[44322]=(zc(0)|0)&-16^1431655768;break}else{fc();return 0}}}while(0);T=o+48|0;S=c[44324]|0;K=o+47|0;J=S+K|0;R=-S|0;S=J&R;if(S>>>0<=o>>>0){n=0;return n|0}Q=c[53484]|0;do{if((Q|0)!=0){O=c[53482]|0;P=O+S|0;if(P>>>0<=O>>>0|P>>>0>Q>>>0){n=0}else{break}return n|0}}while(0);f:do{if((c[53485]&4|0)==0){Q=c[53380]|0;g:do{if((Q|0)==0){U=182}else{P=Q;O=213944;while(1){V=O|0;L=c[V>>2]|0;if(L>>>0<=P>>>0){W=O+4|0;if((L+(c[W>>2]|0)|0)>>>0>P>>>0){break}}L=c[O+8>>2]|0;if((L|0)==0){U=182;break g}else{O=L}}if((O|0)==0){U=182;break}P=J-(c[53377]|0)&R;if(P>>>0>=2147483647>>>0){X=0;break}e=Ub(P|0)|0;L=(e|0)==((c[V>>2]|0)+(c[W>>2]|0)|0);Y=L?e:-1;Z=L?P:0;_=e;$=P;U=191}}while(0);do{if((U|0)==182){Q=Ub(0)|0;if((Q|0)==-1){X=0;break}P=Q;e=c[44323]|0;L=e-1|0;if((L&P|0)==0){aa=S}else{aa=S-P+(L+P&-e)|0}e=c[53482]|0;P=e+aa|0;if(!(aa>>>0>o>>>0&aa>>>0<2147483647>>>0)){X=0;break}L=c[53484]|0;if((L|0)!=0){if(P>>>0<=e>>>0|P>>>0>L>>>0){X=0;break}}L=Ub(aa|0)|0;P=(L|0)==(Q|0);Y=P?Q:-1;Z=P?aa:0;_=L;$=aa;U=191}}while(0);h:do{if((U|0)==191){L=-$|0;if((Y|0)!=-1){ba=Z;ca=Y;U=202;break f}do{if((_|0)!=-1&$>>>0<2147483647>>>0&$>>>0<T>>>0){P=c[44324]|0;Q=K-$+P&-P;if(Q>>>0>=2147483647>>>0){da=$;break}if((Ub(Q|0)|0)==-1){Ub(L|0)|0;X=Z;break h}else{da=Q+$|0;break}}else{da=$}}while(0);if((_|0)==-1){X=Z}else{ba=da;ca=_;U=202;break f}}}while(0);c[53485]=c[53485]|4;ea=X;U=199}else{ea=0;U=199}}while(0);do{if((U|0)==199){if(S>>>0>=2147483647>>>0){break}X=Ub(S|0)|0;_=Ub(0)|0;if(!((_|0)!=-1&(X|0)!=-1&X>>>0<_>>>0)){break}da=_-X|0;_=da>>>0>(o+40|0)>>>0;if(_){ba=_?da:ea;ca=X;U=202}}}while(0);do{if((U|0)==202){ea=(c[53482]|0)+ba|0;c[53482]=ea;if(ea>>>0>(c[53483]|0)>>>0){c[53483]=ea}ea=c[53380]|0;i:do{if((ea|0)==0){S=c[53378]|0;if((S|0)==0|ca>>>0<S>>>0){c[53378]=ca}c[53486]=ca;c[53487]=ba;c[53489]=0;c[53383]=c[44322];c[53382]=-1;S=0;do{X=S<<1;da=213536+(X<<2)|0;c[213536+(X+3<<2)>>2]=da;c[213536+(X+2<<2)>>2]=da;S=S+1|0;}while(S>>>0<32>>>0);S=ca+8|0;if((S&7|0)==0){fa=0}else{fa=-S&7}S=ba-40-fa|0;c[53380]=ca+fa;c[53377]=S;c[ca+(fa+4)>>2]=S|1;c[ca+(ba-36)>>2]=40;c[53381]=c[44326]}else{S=213944;while(1){ga=c[S>>2]|0;ha=S+4|0;ia=c[ha>>2]|0;if((ca|0)==(ga+ia|0)){U=214;break}da=c[S+8>>2]|0;if((da|0)==0){break}else{S=da}}do{if((U|0)==214){if((c[S+12>>2]&8|0)!=0){break}da=ea;if(!(da>>>0>=ga>>>0&da>>>0<ca>>>0)){break}c[ha>>2]=ia+ba;da=c[53380]|0;X=(c[53377]|0)+ba|0;_=da;Z=da+8|0;if((Z&7|0)==0){ja=0}else{ja=-Z&7}Z=X-ja|0;c[53380]=_+ja;c[53377]=Z;c[_+(ja+4)>>2]=Z|1;c[_+(X+4)>>2]=40;c[53381]=c[44326];break i}}while(0);if(ca>>>0<(c[53378]|0)>>>0){c[53378]=ca}S=ca+ba|0;X=213944;while(1){ka=X|0;if((c[ka>>2]|0)==(S|0)){U=224;break}_=c[X+8>>2]|0;if((_|0)==0){break}else{X=_}}do{if((U|0)==224){if((c[X+12>>2]&8|0)!=0){break}c[ka>>2]=ca;S=X+4|0;c[S>>2]=(c[S>>2]|0)+ba;S=ca+8|0;if((S&7|0)==0){la=0}else{la=-S&7}S=ca+(ba+8)|0;if((S&7|0)==0){ma=0}else{ma=-S&7}S=ca+(ma+ba)|0;_=S;Z=la+o|0;da=ca+Z|0;$=da;K=S-(ca+la)-o|0;c[ca+(la+4)>>2]=o|3;j:do{if((_|0)==(c[53380]|0)){T=(c[53377]|0)+K|0;c[53377]=T;c[53380]=$;c[ca+(Z+4)>>2]=T|1}else{if((_|0)==(c[53379]|0)){T=(c[53376]|0)+K|0;c[53376]=T;c[53379]=$;c[ca+(Z+4)>>2]=T|1;c[ca+(T+Z)>>2]=T;break}T=ba+4|0;Y=c[ca+(T+ma)>>2]|0;if((Y&3|0)==1){aa=Y&-8;W=Y>>>3;k:do{if(Y>>>0<256>>>0){V=c[ca+((ma|8)+ba)>>2]|0;R=c[ca+(ba+12+ma)>>2]|0;J=213536+(W<<1<<2)|0;do{if((V|0)!=(J|0)){if(V>>>0<(c[53378]|0)>>>0){fc();return 0}if((c[V+12>>2]|0)==(_|0)){break}fc();return 0}}while(0);if((R|0)==(V|0)){c[53374]=c[53374]&~(1<<W);break}do{if((R|0)==(J|0)){na=R+8|0}else{if(R>>>0<(c[53378]|0)>>>0){fc();return 0}L=R+8|0;if((c[L>>2]|0)==(_|0)){na=L;break}fc();return 0}}while(0);c[V+12>>2]=R;c[na>>2]=V}else{J=S;L=c[ca+((ma|24)+ba)>>2]|0;O=c[ca+(ba+12+ma)>>2]|0;do{if((O|0)==(J|0)){Q=ma|16;P=ca+(T+Q)|0;e=c[P>>2]|0;if((e|0)==0){M=ca+(Q+ba)|0;Q=c[M>>2]|0;if((Q|0)==0){oa=0;break}else{pa=Q;qa=M}}else{pa=e;qa=P}while(1){P=pa+20|0;e=c[P>>2]|0;if((e|0)!=0){pa=e;qa=P;continue}P=pa+16|0;e=c[P>>2]|0;if((e|0)==0){break}else{pa=e;qa=P}}if(qa>>>0<(c[53378]|0)>>>0){fc();return 0}else{c[qa>>2]=0;oa=pa;break}}else{P=c[ca+((ma|8)+ba)>>2]|0;if(P>>>0<(c[53378]|0)>>>0){fc();return 0}e=P+12|0;if((c[e>>2]|0)!=(J|0)){fc();return 0}M=O+8|0;if((c[M>>2]|0)==(J|0)){c[e>>2]=O;c[M>>2]=P;oa=O;break}else{fc();return 0}}}while(0);if((L|0)==0){break}O=ca+(ba+28+ma)|0;V=213800+(c[O>>2]<<2)|0;do{if((J|0)==(c[V>>2]|0)){c[V>>2]=oa;if((oa|0)!=0){break}c[53375]=c[53375]&~(1<<c[O>>2]);break k}else{if(L>>>0<(c[53378]|0)>>>0){fc();return 0}R=L+16|0;if((c[R>>2]|0)==(J|0)){c[R>>2]=oa}else{c[L+20>>2]=oa}if((oa|0)==0){break k}}}while(0);if(oa>>>0<(c[53378]|0)>>>0){fc();return 0}c[oa+24>>2]=L;J=ma|16;O=c[ca+(J+ba)>>2]|0;do{if((O|0)!=0){if(O>>>0<(c[53378]|0)>>>0){fc();return 0}else{c[oa+16>>2]=O;c[O+24>>2]=oa;break}}}while(0);O=c[ca+(T+J)>>2]|0;if((O|0)==0){break}if(O>>>0<(c[53378]|0)>>>0){fc();return 0}else{c[oa+20>>2]=O;c[O+24>>2]=oa;break}}}while(0);ra=ca+((aa|ma)+ba)|0;sa=aa+K|0}else{ra=_;sa=K}T=ra+4|0;c[T>>2]=c[T>>2]&-2;c[ca+(Z+4)>>2]=sa|1;c[ca+(sa+Z)>>2]=sa;T=sa>>>3;if(sa>>>0<256>>>0){W=T<<1;Y=213536+(W<<2)|0;O=c[53374]|0;L=1<<T;do{if((O&L|0)==0){c[53374]=O|L;ta=Y;ua=213536+(W+2<<2)|0}else{T=213536+(W+2<<2)|0;V=c[T>>2]|0;if(V>>>0>=(c[53378]|0)>>>0){ta=V;ua=T;break}fc();return 0}}while(0);c[ua>>2]=$;c[ta+12>>2]=$;c[ca+(Z+8)>>2]=ta;c[ca+(Z+12)>>2]=Y;break}W=da;L=sa>>>8;do{if((L|0)==0){va=0}else{if(sa>>>0>16777215>>>0){va=31;break}O=(L+1048320|0)>>>16&8;aa=L<<O;T=(aa+520192|0)>>>16&4;V=aa<<T;aa=(V+245760|0)>>>16&2;R=14-(T|O|aa)+(V<<aa>>>15)|0;va=sa>>>((R+7|0)>>>0)&1|R<<1}}while(0);L=213800+(va<<2)|0;c[ca+(Z+28)>>2]=va;c[ca+(Z+20)>>2]=0;c[ca+(Z+16)>>2]=0;Y=c[53375]|0;R=1<<va;if((Y&R|0)==0){c[53375]=Y|R;c[L>>2]=W;c[ca+(Z+24)>>2]=L;c[ca+(Z+12)>>2]=W;c[ca+(Z+8)>>2]=W;break}R=c[L>>2]|0;if((va|0)==31){wa=0}else{wa=25-(va>>>1)|0}l:do{if((c[R+4>>2]&-8|0)==(sa|0)){xa=R}else{L=R;Y=sa<<wa;while(1){ya=L+16+(Y>>>31<<2)|0;aa=c[ya>>2]|0;if((aa|0)==0){break}if((c[aa+4>>2]&-8|0)==(sa|0)){xa=aa;break l}else{L=aa;Y=Y<<1}}if(ya>>>0<(c[53378]|0)>>>0){fc();return 0}else{c[ya>>2]=W;c[ca+(Z+24)>>2]=L;c[ca+(Z+12)>>2]=W;c[ca+(Z+8)>>2]=W;break j}}}while(0);R=xa+8|0;Y=c[R>>2]|0;J=c[53378]|0;if(xa>>>0<J>>>0){fc();return 0}if(Y>>>0<J>>>0){fc();return 0}else{c[Y+12>>2]=W;c[R>>2]=W;c[ca+(Z+8)>>2]=Y;c[ca+(Z+12)>>2]=xa;c[ca+(Z+24)>>2]=0;break}}}while(0);n=ca+(la|8)|0;return n|0}}while(0);X=ea;Z=213944;while(1){za=c[Z>>2]|0;if(za>>>0<=X>>>0){Aa=c[Z+4>>2]|0;Ba=za+Aa|0;if(Ba>>>0>X>>>0){break}}Z=c[Z+8>>2]|0}Z=za+(Aa-39)|0;if((Z&7|0)==0){Ca=0}else{Ca=-Z&7}Z=za+(Aa-47+Ca)|0;da=Z>>>0<(ea+16|0)>>>0?X:Z;Z=da+8|0;$=ca+8|0;if(($&7|0)==0){Da=0}else{Da=-$&7}$=ba-40-Da|0;c[53380]=ca+Da;c[53377]=$;c[ca+(Da+4)>>2]=$|1;c[ca+(ba-36)>>2]=40;c[53381]=c[44326];c[da+4>>2]=27;c[Z>>2]=c[53486];c[Z+4>>2]=c[53487];c[Z+8>>2]=c[53488];c[Z+12>>2]=c[53489];c[53486]=ca;c[53487]=ba;c[53489]=0;c[53488]=Z;Z=da+28|0;c[Z>>2]=7;if((da+32|0)>>>0<Ba>>>0){$=Z;while(1){Z=$+4|0;c[Z>>2]=7;if(($+8|0)>>>0<Ba>>>0){$=Z}else{break}}}if((da|0)==(X|0)){break}$=da-ea|0;Z=X+($+4)|0;c[Z>>2]=c[Z>>2]&-2;c[ea+4>>2]=$|1;c[X+$>>2]=$;Z=$>>>3;if($>>>0<256>>>0){K=Z<<1;_=213536+(K<<2)|0;S=c[53374]|0;j=1<<Z;do{if((S&j|0)==0){c[53374]=S|j;Ea=_;Fa=213536+(K+2<<2)|0}else{Z=213536+(K+2<<2)|0;Y=c[Z>>2]|0;if(Y>>>0>=(c[53378]|0)>>>0){Ea=Y;Fa=Z;break}fc();return 0}}while(0);c[Fa>>2]=ea;c[Ea+12>>2]=ea;c[ea+8>>2]=Ea;c[ea+12>>2]=_;break}K=ea;j=$>>>8;do{if((j|0)==0){Ga=0}else{if($>>>0>16777215>>>0){Ga=31;break}S=(j+1048320|0)>>>16&8;X=j<<S;da=(X+520192|0)>>>16&4;Z=X<<da;X=(Z+245760|0)>>>16&2;Y=14-(da|S|X)+(Z<<X>>>15)|0;Ga=$>>>((Y+7|0)>>>0)&1|Y<<1}}while(0);j=213800+(Ga<<2)|0;c[ea+28>>2]=Ga;c[ea+20>>2]=0;c[ea+16>>2]=0;_=c[53375]|0;Y=1<<Ga;if((_&Y|0)==0){c[53375]=_|Y;c[j>>2]=K;c[ea+24>>2]=j;c[ea+12>>2]=ea;c[ea+8>>2]=ea;break}Y=c[j>>2]|0;if((Ga|0)==31){Ha=0}else{Ha=25-(Ga>>>1)|0}m:do{if((c[Y+4>>2]&-8|0)==($|0)){Ia=Y}else{j=Y;_=$<<Ha;while(1){Ja=j+16+(_>>>31<<2)|0;X=c[Ja>>2]|0;if((X|0)==0){break}if((c[X+4>>2]&-8|0)==($|0)){Ia=X;break m}else{j=X;_=_<<1}}if(Ja>>>0<(c[53378]|0)>>>0){fc();return 0}else{c[Ja>>2]=K;c[ea+24>>2]=j;c[ea+12>>2]=ea;c[ea+8>>2]=ea;break i}}}while(0);$=Ia+8|0;Y=c[$>>2]|0;_=c[53378]|0;if(Ia>>>0<_>>>0){fc();return 0}if(Y>>>0<_>>>0){fc();return 0}else{c[Y+12>>2]=K;c[$>>2]=K;c[ea+8>>2]=Y;c[ea+12>>2]=Ia;c[ea+24>>2]=0;break}}}while(0);ea=c[53377]|0;if(ea>>>0<=o>>>0){break}Y=ea-o|0;c[53377]=Y;ea=c[53380]|0;$=ea;c[53380]=$+o;c[$+(o+4)>>2]=Y|1;c[ea+4>>2]=o|3;n=ea+8|0;return n|0}}while(0);c[(Vb()|0)>>2]=12;n=0;return n|0}function eF(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0;if((a|0)==0){return}b=a-8|0;d=b;e=c[53378]|0;if(b>>>0<e>>>0){fc()}f=c[a-4>>2]|0;g=f&3;if((g|0)==1){fc()}h=f&-8;i=a+(h-8)|0;j=i;a:do{if((f&1|0)==0){k=c[b>>2]|0;if((g|0)==0){return}l=-8-k|0;m=a+l|0;n=m;o=k+h|0;if(m>>>0<e>>>0){fc()}if((n|0)==(c[53379]|0)){p=a+(h-4)|0;if((c[p>>2]&3|0)!=3){q=n;r=o;break}c[53376]=o;c[p>>2]=c[p>>2]&-2;c[a+(l+4)>>2]=o|1;c[i>>2]=o;return}p=k>>>3;if(k>>>0<256>>>0){k=c[a+(l+8)>>2]|0;s=c[a+(l+12)>>2]|0;t=213536+(p<<1<<2)|0;do{if((k|0)!=(t|0)){if(k>>>0<e>>>0){fc()}if((c[k+12>>2]|0)==(n|0)){break}fc()}}while(0);if((s|0)==(k|0)){c[53374]=c[53374]&~(1<<p);q=n;r=o;break}do{if((s|0)==(t|0)){u=s+8|0}else{if(s>>>0<e>>>0){fc()}v=s+8|0;if((c[v>>2]|0)==(n|0)){u=v;break}fc()}}while(0);c[k+12>>2]=s;c[u>>2]=k;q=n;r=o;break}t=m;p=c[a+(l+24)>>2]|0;v=c[a+(l+12)>>2]|0;do{if((v|0)==(t|0)){w=a+(l+20)|0;x=c[w>>2]|0;if((x|0)==0){y=a+(l+16)|0;z=c[y>>2]|0;if((z|0)==0){A=0;break}else{B=z;C=y}}else{B=x;C=w}while(1){w=B+20|0;x=c[w>>2]|0;if((x|0)!=0){B=x;C=w;continue}w=B+16|0;x=c[w>>2]|0;if((x|0)==0){break}else{B=x;C=w}}if(C>>>0<e>>>0){fc()}else{c[C>>2]=0;A=B;break}}else{w=c[a+(l+8)>>2]|0;if(w>>>0<e>>>0){fc()}x=w+12|0;if((c[x>>2]|0)!=(t|0)){fc()}y=v+8|0;if((c[y>>2]|0)==(t|0)){c[x>>2]=v;c[y>>2]=w;A=v;break}else{fc()}}}while(0);if((p|0)==0){q=n;r=o;break}v=a+(l+28)|0;m=213800+(c[v>>2]<<2)|0;do{if((t|0)==(c[m>>2]|0)){c[m>>2]=A;if((A|0)!=0){break}c[53375]=c[53375]&~(1<<c[v>>2]);q=n;r=o;break a}else{if(p>>>0<(c[53378]|0)>>>0){fc()}k=p+16|0;if((c[k>>2]|0)==(t|0)){c[k>>2]=A}else{c[p+20>>2]=A}if((A|0)==0){q=n;r=o;break a}}}while(0);if(A>>>0<(c[53378]|0)>>>0){fc()}c[A+24>>2]=p;t=c[a+(l+16)>>2]|0;do{if((t|0)!=0){if(t>>>0<(c[53378]|0)>>>0){fc()}else{c[A+16>>2]=t;c[t+24>>2]=A;break}}}while(0);t=c[a+(l+20)>>2]|0;if((t|0)==0){q=n;r=o;break}if(t>>>0<(c[53378]|0)>>>0){fc()}else{c[A+20>>2]=t;c[t+24>>2]=A;q=n;r=o;break}}else{q=d;r=h}}while(0);d=q;if(d>>>0>=i>>>0){fc()}A=a+(h-4)|0;e=c[A>>2]|0;if((e&1|0)==0){fc()}do{if((e&2|0)==0){if((j|0)==(c[53380]|0)){B=(c[53377]|0)+r|0;c[53377]=B;c[53380]=q;c[q+4>>2]=B|1;if((q|0)!=(c[53379]|0)){return}c[53379]=0;c[53376]=0;return}if((j|0)==(c[53379]|0)){B=(c[53376]|0)+r|0;c[53376]=B;c[53379]=q;c[q+4>>2]=B|1;c[d+B>>2]=B;return}B=(e&-8)+r|0;C=e>>>3;b:do{if(e>>>0<256>>>0){u=c[a+h>>2]|0;g=c[a+(h|4)>>2]|0;b=213536+(C<<1<<2)|0;do{if((u|0)!=(b|0)){if(u>>>0<(c[53378]|0)>>>0){fc()}if((c[u+12>>2]|0)==(j|0)){break}fc()}}while(0);if((g|0)==(u|0)){c[53374]=c[53374]&~(1<<C);break}do{if((g|0)==(b|0)){D=g+8|0}else{if(g>>>0<(c[53378]|0)>>>0){fc()}f=g+8|0;if((c[f>>2]|0)==(j|0)){D=f;break}fc()}}while(0);c[u+12>>2]=g;c[D>>2]=u}else{b=i;f=c[a+(h+16)>>2]|0;t=c[a+(h|4)>>2]|0;do{if((t|0)==(b|0)){p=a+(h+12)|0;v=c[p>>2]|0;if((v|0)==0){m=a+(h+8)|0;k=c[m>>2]|0;if((k|0)==0){E=0;break}else{F=k;G=m}}else{F=v;G=p}while(1){p=F+20|0;v=c[p>>2]|0;if((v|0)!=0){F=v;G=p;continue}p=F+16|0;v=c[p>>2]|0;if((v|0)==0){break}else{F=v;G=p}}if(G>>>0<(c[53378]|0)>>>0){fc()}else{c[G>>2]=0;E=F;break}}else{p=c[a+h>>2]|0;if(p>>>0<(c[53378]|0)>>>0){fc()}v=p+12|0;if((c[v>>2]|0)!=(b|0)){fc()}m=t+8|0;if((c[m>>2]|0)==(b|0)){c[v>>2]=t;c[m>>2]=p;E=t;break}else{fc()}}}while(0);if((f|0)==0){break}t=a+(h+20)|0;u=213800+(c[t>>2]<<2)|0;do{if((b|0)==(c[u>>2]|0)){c[u>>2]=E;if((E|0)!=0){break}c[53375]=c[53375]&~(1<<c[t>>2]);break b}else{if(f>>>0<(c[53378]|0)>>>0){fc()}g=f+16|0;if((c[g>>2]|0)==(b|0)){c[g>>2]=E}else{c[f+20>>2]=E}if((E|0)==0){break b}}}while(0);if(E>>>0<(c[53378]|0)>>>0){fc()}c[E+24>>2]=f;b=c[a+(h+8)>>2]|0;do{if((b|0)!=0){if(b>>>0<(c[53378]|0)>>>0){fc()}else{c[E+16>>2]=b;c[b+24>>2]=E;break}}}while(0);b=c[a+(h+12)>>2]|0;if((b|0)==0){break}if(b>>>0<(c[53378]|0)>>>0){fc()}else{c[E+20>>2]=b;c[b+24>>2]=E;break}}}while(0);c[q+4>>2]=B|1;c[d+B>>2]=B;if((q|0)!=(c[53379]|0)){H=B;break}c[53376]=B;return}else{c[A>>2]=e&-2;c[q+4>>2]=r|1;c[d+r>>2]=r;H=r}}while(0);r=H>>>3;if(H>>>0<256>>>0){d=r<<1;e=213536+(d<<2)|0;A=c[53374]|0;E=1<<r;do{if((A&E|0)==0){c[53374]=A|E;I=e;J=213536+(d+2<<2)|0}else{r=213536+(d+2<<2)|0;h=c[r>>2]|0;if(h>>>0>=(c[53378]|0)>>>0){I=h;J=r;break}fc()}}while(0);c[J>>2]=q;c[I+12>>2]=q;c[q+8>>2]=I;c[q+12>>2]=e;return}e=q;I=H>>>8;do{if((I|0)==0){K=0}else{if(H>>>0>16777215>>>0){K=31;break}J=(I+1048320|0)>>>16&8;d=I<<J;E=(d+520192|0)>>>16&4;A=d<<E;d=(A+245760|0)>>>16&2;r=14-(E|J|d)+(A<<d>>>15)|0;K=H>>>((r+7|0)>>>0)&1|r<<1}}while(0);I=213800+(K<<2)|0;c[q+28>>2]=K;c[q+20>>2]=0;c[q+16>>2]=0;r=c[53375]|0;d=1<<K;c:do{if((r&d|0)==0){c[53375]=r|d;c[I>>2]=e;c[q+24>>2]=I;c[q+12>>2]=q;c[q+8>>2]=q}else{A=c[I>>2]|0;if((K|0)==31){L=0}else{L=25-(K>>>1)|0}d:do{if((c[A+4>>2]&-8|0)==(H|0)){M=A}else{J=A;E=H<<L;while(1){N=J+16+(E>>>31<<2)|0;h=c[N>>2]|0;if((h|0)==0){break}if((c[h+4>>2]&-8|0)==(H|0)){M=h;break d}else{J=h;E=E<<1}}if(N>>>0<(c[53378]|0)>>>0){fc()}else{c[N>>2]=e;c[q+24>>2]=J;c[q+12>>2]=q;c[q+8>>2]=q;break c}}}while(0);A=M+8|0;B=c[A>>2]|0;E=c[53378]|0;if(M>>>0<E>>>0){fc()}if(B>>>0<E>>>0){fc()}else{c[B+12>>2]=e;c[A>>2]=e;c[q+8>>2]=B;c[q+12>>2]=M;c[q+24>>2]=0;break}}}while(0);q=(c[53382]|0)-1|0;c[53382]=q;if((q|0)==0){O=213952}else{return}while(1){q=c[O>>2]|0;if((q|0)==0){break}else{O=q+8|0}}c[53382]=-1;return}function fF(a,b){a=a|0;b=b|0;var d=0,e=0;do{if((a|0)==0){d=0}else{e=da(b,a)|0;if((b|a)>>>0<=65535>>>0){d=e;break}d=((e>>>0)/(a>>>0)|0|0)==(b|0)?e:-1}}while(0);b=dF(d)|0;if((b|0)==0){return b|0}if((c[b-4>>2]&3|0)==0){return b|0}vF(b|0,0,d|0)|0;return b|0}function gF(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;if((a|0)==0){d=dF(b)|0;return d|0}if(b>>>0>4294967231>>>0){c[(Vb()|0)>>2]=12;d=0;return d|0}if(b>>>0<11>>>0){e=16}else{e=b+11&-8}f=hF(a-8|0,e)|0;if((f|0)!=0){d=f+8|0;return d|0}f=dF(b)|0;if((f|0)==0){d=0;return d|0}e=c[a-4>>2]|0;g=(e&-8)-((e&3|0)==0?8:4)|0;tF(f|0,a|0,g>>>0<b>>>0?g:b)|0;eF(a);d=f;return d|0}function hF(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;d=a+4|0;e=c[d>>2]|0;f=e&-8;g=a;h=g+f|0;i=h;j=c[53378]|0;if(g>>>0<j>>>0){fc();return 0}k=e&3;if(!((k|0)!=1&g>>>0<h>>>0)){fc();return 0}l=g+(f|4)|0;m=c[l>>2]|0;if((m&1|0)==0){fc();return 0}if((k|0)==0){if(b>>>0<256>>>0){n=0;return n|0}do{if(f>>>0>=(b+4|0)>>>0){if((f-b|0)>>>0>c[44324]<<1>>>0){break}else{n=a}return n|0}}while(0);n=0;return n|0}if(f>>>0>=b>>>0){k=f-b|0;if(k>>>0<=15>>>0){n=a;return n|0}c[d>>2]=e&1|b|2;c[g+(b+4)>>2]=k|3;c[l>>2]=c[l>>2]|1;iF(g+b|0,k);n=a;return n|0}if((i|0)==(c[53380]|0)){k=(c[53377]|0)+f|0;if(k>>>0<=b>>>0){n=0;return n|0}l=k-b|0;c[d>>2]=e&1|b|2;c[g+(b+4)>>2]=l|1;c[53380]=g+b;c[53377]=l;n=a;return n|0}if((i|0)==(c[53379]|0)){l=(c[53376]|0)+f|0;if(l>>>0<b>>>0){n=0;return n|0}k=l-b|0;if(k>>>0>15>>>0){c[d>>2]=e&1|b|2;c[g+(b+4)>>2]=k|1;c[g+l>>2]=k;o=g+(l+4)|0;c[o>>2]=c[o>>2]&-2;p=g+b|0;q=k}else{c[d>>2]=e&1|l|2;e=g+(l+4)|0;c[e>>2]=c[e>>2]|1;p=0;q=0}c[53376]=q;c[53379]=p;n=a;return n|0}if((m&2|0)!=0){n=0;return n|0}p=(m&-8)+f|0;if(p>>>0<b>>>0){n=0;return n|0}q=p-b|0;e=m>>>3;a:do{if(m>>>0<256>>>0){l=c[g+(f+8)>>2]|0;k=c[g+(f+12)>>2]|0;o=213536+(e<<1<<2)|0;do{if((l|0)!=(o|0)){if(l>>>0<j>>>0){fc();return 0}if((c[l+12>>2]|0)==(i|0)){break}fc();return 0}}while(0);if((k|0)==(l|0)){c[53374]=c[53374]&~(1<<e);break}do{if((k|0)==(o|0)){r=k+8|0}else{if(k>>>0<j>>>0){fc();return 0}s=k+8|0;if((c[s>>2]|0)==(i|0)){r=s;break}fc();return 0}}while(0);c[l+12>>2]=k;c[r>>2]=l}else{o=h;s=c[g+(f+24)>>2]|0;t=c[g+(f+12)>>2]|0;do{if((t|0)==(o|0)){u=g+(f+20)|0;v=c[u>>2]|0;if((v|0)==0){w=g+(f+16)|0;x=c[w>>2]|0;if((x|0)==0){y=0;break}else{z=x;A=w}}else{z=v;A=u}while(1){u=z+20|0;v=c[u>>2]|0;if((v|0)!=0){z=v;A=u;continue}u=z+16|0;v=c[u>>2]|0;if((v|0)==0){break}else{z=v;A=u}}if(A>>>0<j>>>0){fc();return 0}else{c[A>>2]=0;y=z;break}}else{u=c[g+(f+8)>>2]|0;if(u>>>0<j>>>0){fc();return 0}v=u+12|0;if((c[v>>2]|0)!=(o|0)){fc();return 0}w=t+8|0;if((c[w>>2]|0)==(o|0)){c[v>>2]=t;c[w>>2]=u;y=t;break}else{fc();return 0}}}while(0);if((s|0)==0){break}t=g+(f+28)|0;l=213800+(c[t>>2]<<2)|0;do{if((o|0)==(c[l>>2]|0)){c[l>>2]=y;if((y|0)!=0){break}c[53375]=c[53375]&~(1<<c[t>>2]);break a}else{if(s>>>0<(c[53378]|0)>>>0){fc();return 0}k=s+16|0;if((c[k>>2]|0)==(o|0)){c[k>>2]=y}else{c[s+20>>2]=y}if((y|0)==0){break a}}}while(0);if(y>>>0<(c[53378]|0)>>>0){fc();return 0}c[y+24>>2]=s;o=c[g+(f+16)>>2]|0;do{if((o|0)!=0){if(o>>>0<(c[53378]|0)>>>0){fc();return 0}else{c[y+16>>2]=o;c[o+24>>2]=y;break}}}while(0);o=c[g+(f+20)>>2]|0;if((o|0)==0){break}if(o>>>0<(c[53378]|0)>>>0){fc();return 0}else{c[y+20>>2]=o;c[o+24>>2]=y;break}}}while(0);if(q>>>0<16>>>0){c[d>>2]=p|c[d>>2]&1|2;y=g+(p|4)|0;c[y>>2]=c[y>>2]|1;n=a;return n|0}else{c[d>>2]=c[d>>2]&1|b|2;c[g+(b+4)>>2]=q|3;d=g+(p|4)|0;c[d>>2]=c[d>>2]|1;iF(g+b|0,q);n=a;return n|0}return 0}
-
-
-
-function ol(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0.0,t=0,u=0,v=0,w=0.0,x=0.0,y=0.0,z=0.0,A=0,B=0,C=0,D=0,E=0,F=0,G=0.0,H=0,I=0.0,J=0,K=0,L=0,M=0,N=0,O=0.0,P=0,Q=0,R=0;g=i;i=i+80|0;j=g|0;k=e&2130706432;if((e&8|0)==0){l=(k|0)==0?4:k}else{l=8}m=jk((d<<6)+64|0)|0;n=m;o=(d|0)>0;a:do{if(o){p=d-1|0;q=b+8|0;r=0;s=12.0;while(1){t=r+1|0;if((r|0)<(p|0)){u=b+(t<<4)|0;v=b+(t<<4)+8|0}else{u=b;v=q}w=+h[u>>3]- +h[b+(r<<4)>>3];x=+h[v>>3]- +h[b+(r<<4)+8>>3];y=+T(w*w+x*x)/3.0;z=s<y?s:y;if((t|0)<(d|0)){r=t;s=z}else{break}}if(!o){A=0;break}r=d-1|0;q=(l|0)==4;p=(k|0)==16777216;t=b+8|0;if((e&2113929216|0)==67108864){B=0;C=0;while(1){s=+h[b+(C<<4)>>3];y=+h[b+(C<<4)+8>>3];if((C|0)<(r|0)){D=C+1|0;E=b+(D<<4)|0;F=b+(D<<4)+8|0}else{E=b;F=t}x=+h[E>>3]-s;w=+h[F>>3]-y;G=z/+T(x*x+w*w)/3.0;D=B+1|0;H=n+(B<<4)|0;if(q){I=G*.5;h[H>>3]=s+x*I;h[n+(B<<4)+8>>3]=y+w*I}else{h[H>>3]=s;h[n+(B<<4)+8>>3]=y}H=B+2|0;h[n+(D<<4)>>3]=s+x*G;h[n+(D<<4)+8>>3]=y+w*G;D=B+3|0;I=1.0-G;h[n+(H<<4)>>3]=s+x*I;h[n+(H<<4)+8>>3]=y+w*I;if(q){I=1.0-G*.5;h[n+(D<<4)>>3]=s+x*I;h[n+(D<<4)+8>>3]=y+w*I;J=B+4|0}else{J=D}D=C+1|0;if((D|0)<(d|0)){B=J;C=D}else{A=J;break a}}}else{K=0;L=0}while(1){I=+h[b+(L<<4)>>3];w=+h[b+(L<<4)+8>>3];if((L|0)<(r|0)){C=L+1|0;M=b+(C<<4)|0;N=b+(C<<4)+8|0}else{M=b;N=t}y=+h[M>>3]-I;x=+h[N>>3]-w;s=z/+T(y*y+x*x);if(p){O=s*.5}else{O=s}C=K+1|0;B=n+(K<<4)|0;if(q){s=O*.5;h[B>>3]=I+y*s;h[n+(K<<4)+8>>3]=w+x*s}else{h[B>>3]=I;h[n+(K<<4)+8>>3]=w}B=K+2|0;h[n+(C<<4)>>3]=I+y*O;h[n+(C<<4)+8>>3]=w+x*O;C=K+3|0;s=1.0-O;h[n+(B<<4)>>3]=I+y*s;h[n+(B<<4)+8>>3]=w+x*s;if(q){s=1.0-O*.5;h[n+(C<<4)>>3]=I+y*s;h[n+(C<<4)+8>>3]=w+x*s;P=K+4|0}else{P=C}C=L+1|0;if((C|0)<(d|0)){K=P;L=C}else{A=P;break}}}else{A=0}}while(0);P=n+(A<<4)|0;c[P>>2]=c[m>>2];c[P+4>>2]=c[m+4>>2];c[P+8>>2]=c[m+8>>2];c[P+12>>2]=c[m+12>>2];P=m+16|0;L=n+(A+1<<4)|0;c[L>>2]=c[P>>2];c[L+4>>2]=c[P+4>>2];c[L+8>>2]=c[P+8>>2];c[L+12>>2]=c[P+12>>2];L=m+32|0;K=n+(A+2<<4)|0;c[K>>2]=c[L>>2];c[K+4>>2]=c[L+4>>2];c[K+8>>2]=c[L+8>>2];c[K+12>>2]=c[L+12>>2];if((l|0)==4){K=d*96|0;A=kk(K+32|0)|0;N=A;if(o){M=A+K|0;K=d*6|0;J=0;F=0;E=1;e=N;while(1){k=F<<2;v=e;u=n+(k<<4)|0;c[v>>2]=c[u>>2];c[v+4>>2]=c[u+4>>2];c[v+8>>2]=c[u+8>>2];c[v+12>>2]=c[u+12>>2];u=N+(E<<4)|0;v=n+((k|1)<<4)|0;c[u>>2]=c[v>>2];c[u+4>>2]=c[v+4>>2];c[u+8>>2]=c[v+8>>2];c[u+12>>2]=c[v+12>>2];u=N+(J+2<<4)|0;c[u>>2]=c[v>>2];c[u+4>>2]=c[v+4>>2];c[u+8>>2]=c[v+8>>2];c[u+12>>2]=c[v+12>>2];v=N+(J+3<<4)|0;u=n+((k|2)<<4)|0;c[v>>2]=c[u>>2];c[v+4>>2]=c[u+4>>2];c[v+8>>2]=c[u+8>>2];c[v+12>>2]=c[u+12>>2];v=N+(J+4<<4)|0;c[v>>2]=c[u>>2];c[v+4>>2]=c[u+4>>2];c[v+8>>2]=c[u+8>>2];c[v+12>>2]=c[u+12>>2];u=J+6|0;v=N+(J+5<<4)|0;q=n+((k|3)<<4)|0;c[v>>2]=c[q>>2];c[v+4>>2]=c[q+4>>2];c[v+8>>2]=c[q+8>>2];c[v+12>>2]=c[q+12>>2];q=F+1|0;if((q|0)<(d|0)){J=u;F=q;E=u|1;e=N+(u<<4)|0}else{break}}Q=K|1;R=M}else{Q=1;R=N}M=R;c[M>>2]=c[A>>2];c[M+4>>2]=c[A+4>>2];c[M+8>>2]=c[A+8>>2];c[M+12>>2]=c[A+12>>2];M=A+16|0;R=N+(Q<<4)|0;c[R>>2]=c[M>>2];c[R+4>>2]=c[M+4>>2];c[R+8>>2]=c[M+8>>2];c[R+12>>2]=c[M+12>>2];tB(a,M,Q,0,0,f&255);eF(A);eF(m);i=g;return}else if((l|0)==8){rB(a,b,d,f);if(!o){eF(m);i=g;return}o=j|0;A=j;Q=j+16|0;M=0;do{R=M*3|0;N=n+(R+2<<4)|0;c[A>>2]=c[N>>2];c[A+4>>2]=c[N+4>>2];c[A+8>>2]=c[N+8>>2];c[A+12>>2]=c[N+12>>2];N=n+(R+4<<4)|0;c[Q>>2]=c[N>>2];c[Q+4>>2]=c[N+4>>2];c[Q+8>>2]=c[N+8>>2];c[Q+12>>2]=c[N+12>>2];uB(a,o,2);M=M+1|0;}while((M|0)<(d|0));eF(m);i=g;return}else if((l|0)==16777216){M=d+1|0;o=jk(M<<4)|0;Q=o;if((d|0)>1){A=1;do{N=Q+(A<<4)|0;R=b+(A<<4)|0;c[N>>2]=c[R>>2];c[N+4>>2]=c[R+4>>2];c[N+8>>2]=c[R+8>>2];c[N+12>>2]=c[R+12>>2];A=A+1|0;}while((A|0)<(d|0))}A=d*3|0;R=n+(A+1<<4)|0;c[o>>2]=c[R>>2];c[o+4>>2]=c[R+4>>2];c[o+8>>2]=c[R+8>>2];c[o+12>>2]=c[R+12>>2];N=Q+(d<<4)|0;K=n+(A-1<<4)|0;c[N>>2]=c[K>>2];c[N+4>>2]=c[K+4>>2];c[N+8>>2]=c[K+8>>2];c[N+12>>2]=c[K+12>>2];rB(a,Q,M,f);eF(o);o=j;c[o>>2]=c[K>>2];c[o+4>>2]=c[K+4>>2];c[o+8>>2]=c[K+8>>2];c[o+12>>2]=c[K+12>>2];K=j+16|0;o=K;c[o>>2]=c[R>>2];c[o+4>>2]=c[R+4>>2];c[o+8>>2]=c[R+8>>2];c[o+12>>2]=c[R+12>>2];R=j+32|0;h[R>>3]=+h[K>>3]+(+h[j>>3]- +h[n+(A<<4)>>3]);h[j+40>>3]=+h[j+24>>3]+(+h[j+8>>3]- +h[n+(A<<4)+8>>3]);uB(a,K,2);K=R;c[o>>2]=c[K>>2];c[o+4>>2]=c[K+4>>2];c[o+8>>2]=c[K+8>>2];c[o+12>>2]=c[K+12>>2];uB(a,j|0,2);eF(m);i=g;return}else if((l|0)==33554432){K=d+2|0;o=jk(K<<4)|0;R=o;A=b;c[o>>2]=c[A>>2];c[o+4>>2]=c[A+4>>2];c[o+8>>2]=c[A+8>>2];c[o+12>>2]=c[A+12>>2];A=o+16|0;c[A>>2]=c[L>>2];c[A+4>>2]=c[L+4>>2];c[A+8>>2]=c[L+8>>2];c[A+12>>2]=c[L+12>>2];A=m+48|0;n=A;M=m+64|0;h[o+32>>3]=+h[L>>3]+(+h[n>>3]- +h[M>>3])/3.0;Q=m+56|0;N=m+72|0;h[o+40>>3]=+h[m+40>>3]+(+h[Q>>3]- +h[N>>3])/3.0;O=+h[n>>3];h[o+48>>3]=O+(O- +h[M>>3])/3.0;O=+h[Q>>3];h[o+56>>3]=O+(O- +h[N>>3])/3.0;if((K|0)>4){N=4;do{Q=R+(N<<4)|0;M=b+(N-2<<4)|0;c[Q>>2]=c[M>>2];c[Q+4>>2]=c[M+4>>2];c[Q+8>>2]=c[M+8>>2];c[Q+12>>2]=c[M+12>>2];N=N+1|0;}while((N|0)<(K|0))}rB(a,R,K,f);eF(o);o=j;c[o>>2]=c[A>>2];c[o+4>>2]=c[A+4>>2];c[o+8>>2]=c[A+8>>2];c[o+12>>2]=c[A+12>>2];A=j+16|0;c[A>>2]=c[L>>2];c[A+4>>2]=c[L+4>>2];c[A+8>>2]=c[L+8>>2];c[A+12>>2]=c[L+12>>2];uB(a,j|0,2);eF(m);i=g;return}else if((l|0)==50331648){A=d+3|0;o=jk(A<<4)|0;K=o;R=b;c[o>>2]=c[R>>2];c[o+4>>2]=c[R+4>>2];c[o+8>>2]=c[R+8>>2];c[o+12>>2]=c[R+12>>2];R=b|0;O=+h[R>>3];N=P;h[o+16>>3]=O-(O- +h[N>>3])*.25;M=m+56|0;O=+h[b+8>>3]+(+h[M>>3]- +h[m+72>>3])/3.0;h[o+24>>3]=O;z=+h[R>>3];h[o+32>>3]=z-(z- +h[N>>3])*2.0;h[o+40>>3]=O;O=+h[R>>3];h[o+48>>3]=O-(O- +h[N>>3])*2.25;h[o+56>>3]=+h[M>>3];h[o+64>>3]=+h[m+48>>3];h[o+72>>3]=+h[M>>3];if((A|0)>4){M=4;do{N=K+(M<<4)|0;R=b+(M-3<<4)|0;c[N>>2]=c[R>>2];c[N+4>>2]=c[R+4>>2];c[N+8>>2]=c[R+8>>2];c[N+12>>2]=c[R+12>>2];M=M+1|0;}while((M|0)<(A|0))}rB(a,K,A,f);eF(o);eF(m);i=g;return}else if((l|0)==67108864){if((d|0)!=4){cc(155064,126504,688,169992)}o=jk(96)|0;A=b;c[o>>2]=c[A>>2];c[o+4>>2]=c[A+4>>2];c[o+8>>2]=c[A+8>>2];c[o+12>>2]=c[A+12>>2];A=o+16|0;c[A>>2]=c[L>>2];c[A+4>>2]=c[L+4>>2];c[A+8>>2]=c[L+8>>2];c[A+12>>2]=c[L+12>>2];A=o+32|0;K=m+64|0;c[A>>2]=c[K>>2];c[A+4>>2]=c[K+4>>2];c[A+8>>2]=c[K+8>>2];c[A+12>>2]=c[K+12>>2];A=o+48|0;M=b+32|0;c[A>>2]=c[M>>2];c[A+4>>2]=c[M+4>>2];c[A+8>>2]=c[M+8>>2];c[A+12>>2]=c[M+12>>2];M=o+64|0;A=m+128|0;c[M>>2]=c[A>>2];c[M+4>>2]=c[A+4>>2];c[M+8>>2]=c[A+8>>2];c[M+12>>2]=c[A+12>>2];M=o+80|0;R=m+160|0;c[M>>2]=c[R>>2];c[M+4>>2]=c[R+4>>2];c[M+8>>2]=c[R+8>>2];c[M+12>>2]=c[R+12>>2];rB(a,o,6,f);eF(o);o=j|0;h[j>>3]=+h[P>>3]+(+h[m+176>>3]- +h[m>>3]);h[j+8>>3]=+h[m+24>>3]+(+h[m+184>>3]- +h[m+8>>3]);R=j+16|0;c[R>>2]=c[K>>2];c[R+4>>2]=c[K+4>>2];c[R+8>>2]=c[K+8>>2];c[R+12>>2]=c[K+12>>2];uB(a,o,2);c[R>>2]=c[A>>2];c[R+4>>2]=c[A+4>>2];c[R+8>>2]=c[A+8>>2];c[R+12>>2]=c[A+12>>2];uB(a,o,2);c[R>>2]=c[m>>2];c[R+4>>2]=c[m+4>>2];c[R+8>>2]=c[m+8>>2];c[R+12>>2]=c[m+12>>2];uB(a,o,2);eF(m);i=g;return}else if((l|0)==83886080){if((d|0)!=4){cc(155064,126504,711,169992)}o=jk(192)|0;R=b;c[o>>2]=c[R>>2];c[o+4>>2]=c[R+4>>2];c[o+8>>2]=c[R+8>>2];c[o+12>>2]=c[R+12>>2];R=o+16|0;A=b+16|0;c[R>>2]=c[A>>2];c[R+4>>2]=c[A+4>>2];c[R+8>>2]=c[A+8>>2];c[R+12>>2]=c[A+12>>2];A=m+48|0;O=+h[A>>3];R=m+64|0;z=O+(+h[R>>3]-O);K=o+32|0;M=K;h[M>>3]=z;N=m+56|0;O=+h[N>>3];Q=m+72|0;s=O+(+h[Q>>3]-O);n=o+40|0;h[n>>3]=s;O=z+(+h[A>>3]- +h[L>>3]);e=o+48|0;h[e>>3]=O;x=s+(+h[N>>3]- +h[m+40>>3]);E=o+56|0;h[E>>3]=x;w=O+(+h[R>>3]- +h[A>>3]);A=o+64|0;h[A>>3]=w;y=x+(+h[Q>>3]- +h[N>>3]);N=o+72|0;h[N>>3]=y;Q=o+80|0;h[Q>>3]=w+(z-O);h[o+88>>3]=y+(s-x);R=m+96|0;x=+h[R>>3];F=m+80|0;s=x+(+h[F>>3]-x);J=o+144|0;h[J>>3]=s;u=m+104|0;x=+h[u>>3];q=m+88|0;y=x+(+h[q>>3]-x);h[o+152>>3]=y;x=s+(+h[R>>3]- +h[m+112>>3]);v=o+128|0;h[v>>3]=x;O=y+(+h[u>>3]- +h[m+120>>3]);k=o+136|0;h[k>>3]=O;z=x+(+h[F>>3]- +h[R>>3]);R=o+112|0;h[R>>3]=z;w=O+(+h[q>>3]- +h[u>>3]);u=o+120|0;h[u>>3]=w;q=o+96|0;F=q;h[F>>3]=z+(s-x);p=o+104|0;h[p>>3]=w+(y-O);t=o+160|0;r=b+32|0;c[t>>2]=c[r>>2];c[t+4>>2]=c[r+4>>2];c[t+8>>2]=c[r+8>>2];c[t+12>>2]=c[r+12>>2];r=o+176|0;t=b+48|0;c[r>>2]=c[t>>2];c[r+4>>2]=c[t+4>>2];c[r+8>>2]=c[t+8>>2];c[r+12>>2]=c[t+12>>2];rB(a,o,12,f);t=j|0;r=j;c[r>>2]=c[K>>2];c[r+4>>2]=c[K+4>>2];c[r+8>>2]=c[K+8>>2];c[r+12>>2]=c[K+12>>2];O=+h[M>>3];y=O-(+h[e>>3]-O);M=j+16|0;h[M>>3]=y;O=+h[n>>3];w=O-(+h[E>>3]-O);n=j+24|0;h[n>>3]=w;K=j+32|0;h[K>>3]=y+(+h[A>>3]- +h[e>>3]);e=j+40|0;h[e>>3]=w+(+h[N>>3]- +h[E>>3]);E=j+48|0;c[E>>2]=c[Q>>2];c[E+4>>2]=c[Q+4>>2];c[E+8>>2]=c[Q+8>>2];c[E+12>>2]=c[Q+12>>2];uB(a,t,4);c[r>>2]=c[q>>2];c[r+4>>2]=c[q+4>>2];c[r+8>>2]=c[q+8>>2];c[r+12>>2]=c[q+12>>2];w=+h[F>>3];y=w-(+h[R>>3]-w);h[M>>3]=y;w=+h[p>>3];O=w-(+h[u>>3]-w);h[n>>3]=O;h[K>>3]=y+(+h[v>>3]- +h[R>>3]);h[e>>3]=O+(+h[k>>3]- +h[u>>3]);c[E>>2]=c[J>>2];c[E+4>>2]=c[J+4>>2];c[E+8>>2]=c[J+8>>2];c[E+12>>2]=c[J+12>>2];uB(a,t,4);eF(o);eF(m);i=g;return}else if((l|0)==100663296){o=d+5|0;t=jk(o<<4)|0;J=b+16|0;O=+h[J>>3];E=b|0;y=+h[E>>3]-O;w=y*.125+(O+y*.5);u=t;h[u>>3]=w;k=b+40|0;y=+h[k>>3];e=b+24|0;R=m+56|0;v=m+72|0;O=y+(+h[e>>3]-y)*.5+(+h[R>>3]- +h[v>>3])*3.0*.5;h[t+8>>3]=O;y=+h[J>>3];x=+h[E>>3]-y;s=y+x*.5-x*.25;h[t+16>>3]=s;h[t+24>>3]=O;h[t+32>>3]=s;x=+h[k>>3];h[t+40>>3]=x+(+h[e>>3]-x)*.5;K=L;n=m+48|0;x=s+(+h[K>>3]- +h[n>>3])*.5;h[t+48>>3]=x;s=+h[k>>3];h[t+56>>3]=s+(+h[e>>3]-s)*.5;h[t+64>>3]=x;x=+h[k>>3];s=x+(+h[e>>3]-x)*.5+(+h[R>>3]- +h[v>>3]);h[t+72>>3]=s;h[t+80>>3]=w;h[t+88>>3]=s;h[t+96>>3]=w;x=s-(+h[R>>3]- +h[v>>3])*.25;h[t+104>>3]=x;h[t+112>>3]=w+(+h[K>>3]- +h[n>>3]);h[t+120>>3]=x+(+h[R>>3]- +h[v>>3])*.5;h[t+128>>3]=+h[u>>3];h[t+136>>3]=O+(+h[R>>3]- +h[v>>3])*.25;rB(a,t,o,f);h[j>>3]=+h[J>>3];O=+h[k>>3];h[j+8>>3]=O+(+h[e>>3]-O)*.5;h[j+16>>3]=+h[E>>3];h[j+24>>3]=O+(+h[b+8>>3]- +h[b+56>>3])*.5;uB(a,j|0,2);eF(t);eF(m);i=g;return}else if((l|0)==117440512){t=d+1|0;E=jk(t<<4)|0;e=P;h[E>>3]=+h[e>>3];k=m+56|0;J=m+72|0;h[E+8>>3]=+h[m+24>>3]-(+h[k>>3]- +h[J>>3])*.5;h[E+16>>3]=+h[m+48>>3];O=+h[k>>3];h[E+24>>3]=O-(O- +h[J>>3])*.5;h[E+32>>3]=+h[b+32>>3];o=b+40|0;h[E+40>>3]=+h[o>>3]+(+h[k>>3]- +h[J>>3])*.5;h[E+48>>3]=+h[e>>3];h[E+56>>3]=+h[o>>3]+(+h[k>>3]- +h[J>>3])*.5;O=+h[b+8>>3];h[E+72>>3]=O-(O- +h[b+56>>3])*.5;h[E+64>>3]=+h[b>>3];rB(a,E,t,f);eF(E);eF(m);i=g;return}else if((l|0)==134217728){E=d+4|0;t=jk(E<<4)|0;J=b+16|0;O=+h[J>>3];k=b|0;o=L;e=m+48|0;x=O+(+h[k>>3]-O)*.5+(+h[o>>3]- +h[e>>3])*.25;h[t>>3]=x;v=b+40|0;O=+h[v>>3];R=b+24|0;w=O+(+h[R>>3]-O)*.5;h[t+8>>3]=w;h[t+16>>3]=x;u=m+56|0;n=m+72|0;O=w+(+h[u>>3]- +h[n>>3])*.5;h[t+24>>3]=O;s=x+(+h[o>>3]- +h[e>>3])*.5;h[t+32>>3]=s;h[t+40>>3]=O;h[t+48>>3]=s;s=O+(+h[u>>3]- +h[n>>3])*.5;h[t+56>>3]=s;x=+h[J>>3];y=x+(+h[k>>3]-x)*.5-(+h[o>>3]- +h[e>>3])*3.0*.25;h[t+64>>3]=y;h[t+72>>3]=s;h[t+80>>3]=y;h[t+88>>3]=O;y=+h[J>>3];s=y+(+h[k>>3]-y)*.5-(+h[o>>3]- +h[e>>3])*.25;h[t+96>>3]=s;h[t+104>>3]=O;h[t+112>>3]=s;h[t+120>>3]=w;rB(a,t,E,f);h[j>>3]=+h[J>>3];w=+h[v>>3];h[j+8>>3]=w+(+h[R>>3]-w)*.5;h[j+16>>3]=+h[k>>3];h[j+24>>3]=w+(+h[b+8>>3]- +h[b+56>>3])*.5;uB(a,j|0,2);eF(t);eF(m);i=g;return}else if((l|0)==150994944){t=d+2|0;k=jk(t<<4)|0;R=b+16|0;w=+h[R>>3];v=b|0;J=L;E=m+48|0;s=w+(+h[v>>3]-w)*.5+(+h[J>>3]- +h[E>>3])*3.0*.25;h[k>>3]=s;e=b+40|0;w=+h[e>>3];o=b+24|0;O=w+(+h[o>>3]-w)*.5;h[k+8>>3]=O;h[k+16>>3]=s;n=m+56|0;u=m+72|0;s=O+(+h[n>>3]- +h[u>>3])*.25;h[k+24>>3]=s;w=+h[R>>3];h[k+32>>3]=w+(+h[v>>3]-w)*.5+(+h[J>>3]- +h[E>>3])*.25;w=s+(+h[n>>3]- +h[u>>3])*.5;h[k+40>>3]=w;y=+h[R>>3];h[k+48>>3]=y+(+h[v>>3]-y)*.5-(+h[J>>3]- +h[E>>3])*.25;h[k+56>>3]=w;w=+h[R>>3];y=w+(+h[v>>3]-w)*.5-(+h[J>>3]- +h[E>>3])*3.0*.25;h[k+64>>3]=y;h[k+72>>3]=s;h[k+80>>3]=y;h[k+88>>3]=O;rB(a,k,t,f);h[j>>3]=+h[R>>3];O=+h[e>>3];h[j+8>>3]=O+(+h[o>>3]-O)*.5;h[j+16>>3]=+h[v>>3];h[j+24>>3]=O+(+h[b+8>>3]- +h[b+56>>3])*.5;uB(a,j|0,2);eF(k);eF(m);i=g;return}else if((l|0)==167772160){k=d+1|0;v=jk(k<<4)|0;o=b+16|0;O=+h[o>>3];e=b|0;R=L;t=m+48|0;y=O+(+h[e>>3]-O)*.5+(+h[R>>3]- +h[t>>3]);h[v>>3]=y;E=b+40|0;O=+h[E>>3];J=b+24|0;u=m+56|0;n=m+72|0;s=O+(+h[J>>3]-O)*.5+(+h[u>>3]- +h[n>>3])*.25;h[v+8>>3]=s;O=y-(+h[R>>3]- +h[t>>3]);h[v+16>>3]=O;h[v+24>>3]=s+(+h[u>>3]- +h[n>>3]);h[v+32>>3]=O;O=s+(+h[u>>3]- +h[n>>3])*.5;h[v+40>>3]=O;y=+h[o>>3];w=+h[e>>3]-y;x=y+w*.5-w*.25;h[v+48>>3]=x;h[v+56>>3]=O;h[v+64>>3]=x;h[v+72>>3]=s;rB(a,v,k,f);h[j>>3]=+h[o>>3];s=+h[E>>3];h[j+8>>3]=s+(+h[J>>3]-s)*.5;h[j+16>>3]=+h[e>>3];h[j+24>>3]=s+(+h[b+8>>3]- +h[b+56>>3])*.5;uB(a,j|0,2);eF(v);eF(m);i=g;return}else if((l|0)==184549376){v=d+4|0;e=jk(v<<4)|0;J=b+16|0;s=+h[J>>3];E=b|0;x=+h[E>>3]-s;o=L;k=m+48|0;O=x*.125+(s+x*.5)+(+h[o>>3]- +h[k>>3])*.5;h[e>>3]=O;n=b+40|0;x=+h[n>>3];u=b+24|0;t=m+56|0;R=m+72|0;s=x+(+h[u>>3]-x)*.5+(+h[t>>3]- +h[R>>3])*.25;h[e+8>>3]=s;x=+h[J>>3];w=+h[E>>3]-x;y=x+w*.5-w*.125;h[e+16>>3]=y;h[e+24>>3]=s;h[e+32>>3]=y;w=s+(+h[t>>3]- +h[R>>3])*.5;h[e+40>>3]=w;s=y-(+h[o>>3]- +h[k>>3])*.5;h[e+48>>3]=s;h[e+56>>3]=w;K=e+64|0;h[K>>3]=s;s=+h[n>>3];w=s+(+h[u>>3]-s)*.5-(+h[t>>3]- +h[R>>3])*.25;h[e+72>>3]=w;s=O-(+h[o>>3]- +h[k>>3])*.5;h[e+80>>3]=s;h[e+88>>3]=w;h[e+96>>3]=s;s=w-(+h[t>>3]- +h[R>>3])*.5;h[e+104>>3]=s;R=e+112|0;h[R>>3]=O;h[e+120>>3]=s;rB(a,e,v,f);v=j|0;t=j|0;h[t>>3]=+h[J>>3];s=+h[n>>3];J=j+8|0;h[J>>3]=s+(+h[u>>3]-s)*.5;k=j+16|0;h[k>>3]=+h[K>>3];K=b+8|0;o=b+56|0;p=j+24|0;h[p>>3]=s+(+h[K>>3]- +h[o>>3])*.5;uB(a,v,2);h[t>>3]=+h[R>>3];s=+h[n>>3];h[J>>3]=s+(+h[u>>3]-s)*.5;h[k>>3]=+h[E>>3];h[p>>3]=s+(+h[K>>3]- +h[o>>3])*.5;uB(a,v,2);eF(e);eF(m);i=g;return}else if((l|0)==201326592){e=d<<4;v=jk(e)|0;o=b+16|0;s=+h[o>>3];h[v>>3]=s;K=b+40|0;O=+h[K>>3];p=b+24|0;E=m+56|0;k=m+72|0;w=O+(+h[p>>3]-O)*.5+(+h[E>>3]- +h[k>>3])*.125;h[v+8>>3]=w;u=L;J=m+48|0;O=s+(+h[u>>3]- +h[J>>3])*2.0;h[v+16>>3]=O;h[v+24>>3]=w;h[v+32>>3]=O;O=w+(+h[E>>3]- +h[k>>3])*.5;h[v+40>>3]=O;h[v+48>>3]=s;h[v+56>>3]=O;rB(a,v,d,f);eF(v);v=jk(e)|0;O=+h[o>>3]+(+h[u>>3]- +h[J>>3]);h[v>>3]=O;s=+h[K>>3];w=s+(+h[p>>3]-s)*.5-(+h[E>>3]- +h[k>>3])*5.0*.125;h[v+8>>3]=w;s=O+(+h[u>>3]- +h[J>>3]);J=v+16|0;h[J>>3]=s;h[v+24>>3]=w;h[v+32>>3]=s;s=w+(+h[E>>3]- +h[k>>3])*.5;h[v+40>>3]=s;h[v+48>>3]=O;h[v+56>>3]=s;rB(a,v,d,f);h[j>>3]=+h[J>>3];s=+h[K>>3];h[j+8>>3]=s+(+h[p>>3]-s)*.5;h[j+16>>3]=+h[b>>3];h[j+24>>3]=s+(+h[b+8>>3]- +h[b+56>>3])*.5;uB(a,j|0,2);eF(v);eF(m);i=g;return}else if((l|0)==218103808){v=d<<4;p=jk(v)|0;K=b|0;s=+h[K>>3];h[p>>3]=s;J=b+40|0;O=+h[J>>3];k=b+24|0;E=m+56|0;u=m+72|0;w=O+(+h[k>>3]-O)*.5+(+h[E>>3]- +h[u>>3])*.125;h[p+8>>3]=w;h[p+16>>3]=s;O=w+(+h[E>>3]- +h[u>>3])*.5;h[p+24>>3]=O;y=s-(+h[E>>3]- +h[u>>3])*2.0;h[p+32>>3]=y;h[p+40>>3]=O;h[p+48>>3]=y;h[p+56>>3]=w;rB(a,p,d,f);eF(p);p=jk(v)|0;w=+h[K>>3]-(+h[L>>3]- +h[m+48>>3]);h[p>>3]=w;y=+h[J>>3];O=y+(+h[k>>3]-y)*.5-(+h[E>>3]- +h[u>>3])*5.0*.125;h[p+8>>3]=O;h[p+16>>3]=w;y=O+(+h[E>>3]- +h[u>>3])*.5;h[p+24>>3]=y;s=w-(+h[E>>3]- +h[u>>3]);h[p+32>>3]=s;h[p+40>>3]=y;u=p+48|0;h[u>>3]=s;h[p+56>>3]=O;rB(a,p,d,f);h[j>>3]=+h[b+16>>3];O=+h[J>>3];h[j+8>>3]=O+(+h[k>>3]-O)*.5;h[j+16>>3]=+h[u>>3];h[j+24>>3]=O+(+h[b+8>>3]- +h[b+56>>3])*.5;uB(a,j|0,2);eF(p);eF(m);i=g;return}else if((l|0)==234881024){p=d<<4;u=jk(p)|0;k=b+16|0;O=+h[k>>3];J=b|0;E=L;K=m+48|0;s=O+(+h[J>>3]-O)*.5-(+h[E>>3]- +h[K>>3])*9.0*.125;h[u>>3]=s;v=b+40|0;O=+h[v>>3];o=b+24|0;e=m+56|0;n=m+72|0;y=O+(+h[o>>3]-O)*.5+(+h[e>>3]- +h[n>>3])*.125;h[u+8>>3]=y;O=s+(+h[E>>3]- +h[K>>3]);h[u+16>>3]=O;h[u+24>>3]=y;h[u+32>>3]=O;O=y+(+h[e>>3]- +h[n>>3])*.5;h[u+40>>3]=O;h[u+48>>3]=s;h[u+56>>3]=O;rB(a,u,d,f);eF(u);u=jk(p)|0;O=+h[k>>3];s=O+(+h[J>>3]-O)*.5-(+h[E>>3]- +h[K>>3])*9.0*.125;h[u>>3]=s;O=+h[v>>3];y=O+(+h[o>>3]-O)*.5-(+h[e>>3]- +h[n>>3])*5.0*.125;h[u+8>>3]=y;O=s+(+h[E>>3]- +h[K>>3]);h[u+16>>3]=O;h[u+24>>3]=y;h[u+32>>3]=O;O=y+(+h[e>>3]- +h[n>>3])*.5;h[u+40>>3]=O;h[u+48>>3]=s;h[u+56>>3]=O;rB(a,u,d,f);eF(u);u=jk(p)|0;O=+h[k>>3];s=O+(+h[J>>3]-O)*.5+(+h[E>>3]- +h[K>>3])*.125;h[u>>3]=s;O=+h[v>>3];y=O+(+h[o>>3]-O)*.5-(+h[e>>3]- +h[n>>3])*5.0*.125;h[u+8>>3]=y;O=s+(+h[E>>3]- +h[K>>3]);h[u+16>>3]=O;h[u+24>>3]=y;h[u+32>>3]=O;O=y+(+h[e>>3]- +h[n>>3])*.5;h[u+40>>3]=O;h[u+48>>3]=s;h[u+56>>3]=O;rB(a,u,d,f);eF(u);u=jk(p)|0;O=+h[k>>3];s=O+(+h[J>>3]-O)*.5+(+h[E>>3]- +h[K>>3])*.125;h[u>>3]=s;O=+h[v>>3];y=O+(+h[o>>3]-O)*.5+(+h[e>>3]- +h[n>>3])*.125;h[u+8>>3]=y;O=s+(+h[E>>3]- +h[K>>3]);p=u+16|0;h[p>>3]=O;h[u+24>>3]=y;h[u+32>>3]=O;O=y+(+h[e>>3]- +h[n>>3])*.5;h[u+40>>3]=O;h[u+48>>3]=s;h[u+56>>3]=O;rB(a,u,d,f);n=j|0;e=j|0;h[e>>3]=+h[p>>3];O=+h[v>>3];p=j+8|0;h[p>>3]=O+(+h[o>>3]-O)*.5;R=j+16|0;h[R>>3]=+h[J>>3];t=b+8|0;M=b+56|0;F=j+24|0;h[F>>3]=O+(+h[t>>3]- +h[M>>3])*.5;uB(a,n,2);O=+h[k>>3];h[e>>3]=O+(+h[J>>3]-O)*.5-(+h[E>>3]- +h[K>>3])*9.0*.125;s=+h[v>>3];h[p>>3]=s+(+h[o>>3]-s)*.5;h[R>>3]=O;h[F>>3]=s+(+h[t>>3]- +h[M>>3])*.5;uB(a,n,2);eF(u);eF(m);i=g;return}else if((l|0)==251658240){u=d<<4;n=jk(u)|0;M=b+16|0;s=+h[M>>3];t=b|0;F=L;R=m+48|0;O=s+(+h[t>>3]-s)*.5-(+h[F>>3]- +h[R>>3]);h[n>>3]=O;o=b+40|0;s=+h[o>>3];p=b+24|0;v=m+56|0;K=m+72|0;y=s+(+h[p>>3]-s)*.5+(+h[v>>3]- +h[K>>3])*.125;h[n+8>>3]=y;s=O+(+h[F>>3]- +h[R>>3])*2.0;h[n+16>>3]=s;h[n+24>>3]=y;h[n+32>>3]=s;s=y+(+h[v>>3]- +h[K>>3])*.5;h[n+40>>3]=s;h[n+48>>3]=O;h[n+56>>3]=s;rB(a,n,d,f);eF(n);n=jk(u)|0;s=+h[M>>3];O=s+(+h[t>>3]-s)*.5-(+h[F>>3]- +h[R>>3]);u=n;h[u>>3]=O;s=+h[o>>3];y=s+(+h[p>>3]-s)*.5-(+h[v>>3]- +h[K>>3])*5.0*.125;h[n+8>>3]=y;s=O+(+h[F>>3]- +h[R>>3])*2.0;R=n+16|0;h[R>>3]=s;h[n+24>>3]=y;h[n+32>>3]=s;s=y+(+h[v>>3]- +h[K>>3])*.5;h[n+40>>3]=s;h[n+48>>3]=O;h[n+56>>3]=s;rB(a,n,d,f);K=j|0;v=j|0;h[v>>3]=+h[R>>3];s=+h[o>>3];R=j+8|0;h[R>>3]=s+(+h[p>>3]-s)*.5;F=j+16|0;h[F>>3]=+h[t>>3];t=b+8|0;E=b+56|0;J=j+24|0;h[J>>3]=s+(+h[t>>3]- +h[E>>3])*.5;uB(a,K,2);h[v>>3]=+h[M>>3];s=+h[o>>3];h[R>>3]=s+(+h[p>>3]-s)*.5;h[F>>3]=+h[u>>3];h[J>>3]=s+(+h[t>>3]- +h[E>>3])*.5;uB(a,K,2);eF(n);eF(m);i=g;return}else if((l|0)==268435456){n=jk(d<<4)|0;K=b|0;h[n>>3]=+h[K>>3];E=m+56|0;t=m+72|0;h[n+8>>3]=+h[m+24>>3]-(+h[E>>3]- +h[t>>3])*.5;J=m+48|0;h[n+16>>3]=+h[J>>3];s=+h[E>>3];h[n+24>>3]=s-(s- +h[t>>3])*.5;h[n+32>>3]=+h[b+32>>3];u=b+40|0;h[n+40>>3]=+h[u>>3]+(+h[E>>3]- +h[t>>3])*.5;h[n+48>>3]=+h[K>>3];h[n+56>>3]=+h[u>>3]+(+h[E>>3]- +h[t>>3])*.5;rB(a,n,d,f);F=b+16|0;p=L;s=+h[F>>3]+(+h[p>>3]- +h[J>>3])*.25;R=j|0;o=j|0;h[o>>3]=s;O=+h[u>>3];M=b+24|0;y=O+(+h[M>>3]-O)*.5+(+h[E>>3]- +h[t>>3])*.125;v=j+8|0;h[v>>3]=y;e=j+16|0;h[e>>3]=s+(+h[p>>3]- +h[J>>3])*.25;k=j+24|0;h[k>>3]=y-(+h[E>>3]- +h[t>>3])*.25;uB(a,R,2);y=+h[F>>3]+(+h[p>>3]- +h[J>>3])*.25;h[o>>3]=y;s=+h[u>>3];O=s+(+h[M>>3]-s)*.5-(+h[E>>3]- +h[t>>3])*.125;h[v>>3]=O;h[e>>3]=y+(+h[p>>3]- +h[J>>3])*.25;h[k>>3]=O+(+h[E>>3]- +h[t>>3])*.25;uB(a,R,2);h[o>>3]=+h[F>>3]+(+h[p>>3]- +h[J>>3])*.25;O=+h[u>>3]+(+h[E>>3]- +h[t>>3])*3.0*.25;h[v>>3]=O;h[e>>3]=+h[K>>3]-(+h[p>>3]- +h[J>>3])*.25;h[k>>3]=O;uB(a,R,2);eF(n);eF(m);i=g;return}else if((l|0)==285212672){n=jk(d<<4)|0;R=b+16|0;O=+h[R>>3];k=b|0;J=L;p=m+48|0;y=O+(+h[k>>3]-O)*.5+(+h[J>>3]- +h[p>>3])*.5;h[n>>3]=y;K=b+40|0;O=+h[K>>3];e=b+24|0;s=O+(+h[e>>3]-O)*.5+(+h[J>>3]- +h[p>>3])*.5;h[n+8>>3]=s;h[n+16>>3]=y;y=+h[K>>3];O=y+(+h[e>>3]-y)*.5-(+h[J>>3]- +h[p>>3])*.5;h[n+24>>3]=O;y=+h[R>>3];w=y+(+h[k>>3]-y)*.5-(+h[J>>3]- +h[p>>3])*.5;h[n+32>>3]=w;h[n+40>>3]=O;h[n+48>>3]=w;h[n+56>>3]=s;rB(a,n,d,f);eF(n);s=+h[R>>3];w=s+(+h[k>>3]-s)*.5;s=w+(+h[J>>3]- +h[p>>3])*3.0*.25;n=j|0;v=j|0;h[v>>3]=s;O=+h[K>>3];y=O+(+h[e>>3]-O)*.5;O=y+(+h[J>>3]- +h[p>>3])*3.0*.25;t=j+8|0;h[t>>3]=O;E=j+16|0;h[E>>3]=s;s=y-(+h[J>>3]- +h[p>>3])*3.0*.25;u=j+24|0;h[u>>3]=s;y=w-(+h[J>>3]- +h[p>>3])*3.0*.25;h[j+32>>3]=y;h[j+40>>3]=s;h[j+48>>3]=y;h[j+56>>3]=O;F=j+64|0;o=j;c[F>>2]=c[o>>2];c[F+4>>2]=c[o+4>>2];c[F+8>>2]=c[o+8>>2];c[F+12>>2]=c[o+12>>2];uB(a,n,5);O=+h[R>>3];y=+h[k>>3];h[v>>3]=O+(y-O)*.5+(+h[J>>3]- +h[p>>3])*3.0*.25;O=+h[K>>3];h[t>>3]=O+(+h[e>>3]-O)*.5;h[E>>3]=y;o=b+8|0;F=b+56|0;h[u>>3]=O+(+h[o>>3]- +h[F>>3])*.5;uB(a,n,2);O=+h[R>>3];h[v>>3]=O;y=+h[K>>3];h[t>>3]=y+(+h[e>>3]-y)*.5;h[E>>3]=O+(+h[k>>3]-O)*.5-(+h[J>>3]- +h[p>>3])*3.0*.25;h[u>>3]=y+(+h[o>>3]- +h[F>>3])*.5;uB(a,n,2);eF(m);i=g;return}else if((l|0)==301989888){n=d+12|0;F=jk(n<<4)|0;o=b+16|0;y=+h[o>>3];u=b|0;p=L;J=m+48|0;O=y+(+h[u>>3]-y)*.5+(+h[p>>3]- +h[J>>3])*.25;h[F>>3]=O;k=b+40|0;y=+h[k>>3];E=b+24|0;e=m+56|0;t=m+72|0;s=y+(+h[E>>3]-y)*.5+(+h[e>>3]- +h[t>>3])*.5;K=F+8|0;h[K>>3]=s;h[F+16>>3]=O;y=s+(+h[e>>3]- +h[t>>3])*.125;v=F+24|0;h[v>>3]=y;s=O-(+h[p>>3]- +h[J>>3])*.125;R=F+32|0;h[R>>3]=s;w=y+(+h[e>>3]- +h[t>>3])*.125;h[F+40>>3]=w;h[F+48>>3]=O;x=w+(+h[e>>3]- +h[t>>3])*.125;h[F+56>>3]=x;h[F+64>>3]=O;O=x+(+h[e>>3]- +h[t>>3])*.125;h[F+72>>3]=O;h[F+80>>3]=s;h[F+88>>3]=O;s=+h[o>>3];z=s+(+h[u>>3]-s)*.5;h[F+96>>3]=z;h[F+104>>3]=x;s=z-(+h[p>>3]- +h[J>>3])*.125;h[F+112>>3]=s;h[F+120>>3]=O;I=s-(+h[p>>3]- +h[J>>3])*.125;h[F+128>>3]=I;h[F+136>>3]=O;h[F+144>>3]=I;h[F+152>>3]=x;x=I+(+h[p>>3]- +h[J>>3])*.125;h[F+160>>3]=x;h[F+168>>3]=w;h[F+176>>3]=I;h[F+184>>3]=y;h[F+192>>3]=I;I=+h[K>>3];h[F+200>>3]=I;h[F+208>>3]=x;h[F+216>>3]=I;K=F+224|0;h[K>>3]=z;h[F+232>>3]=+h[v>>3];h[F+240>>3]=+h[R>>3];h[F+248>>3]=I;rB(a,F,n,f);I=+h[K>>3];n=j|0;R=j|0;h[R>>3]=I;z=+h[k>>3];x=z+(+h[E>>3]-z)*.5;v=j+8|0;h[v>>3]=x;J=j+16|0;h[J>>3]=I;p=j+24|0;h[p>>3]=x+(+h[e>>3]- +h[t>>3])*.125;uB(a,n,2);x=+h[K>>3];h[R>>3]=x;I=+h[k>>3];z=I+(+h[E>>3]-I)*.5+(+h[e>>3]- +h[t>>3])*.25;h[v>>3]=z;h[J>>3]=x;h[p>>3]=z+(+h[e>>3]- +h[t>>3])*.125;uB(a,n,2);h[R>>3]=+h[o>>3];z=+h[k>>3];h[v>>3]=z+(+h[E>>3]-z)*.5;h[J>>3]=+h[u>>3];h[p>>3]=z+(+h[b+8>>3]- +h[b+56>>3])*.5;uB(a,n,2);eF(F);eF(m);i=g;return}else if((l|0)==318767104){F=d+4|0;n=jk(F<<4)|0;p=b+16|0;z=+h[p>>3];u=b|0;J=L;E=m+48|0;x=z+(+h[u>>3]-z)*.5+(+h[J>>3]- +h[E>>3])*.125;h[n>>3]=x;v=b+40|0;z=+h[v>>3];k=b+24|0;o=m+56|0;R=m+72|0;I=z+(+h[k>>3]-z)*.5+(+h[o>>3]- +h[R>>3])*.5;h[n+8>>3]=I;z=x+(+h[J>>3]- +h[E>>3])*.125;h[n+16>>3]=z;y=I+(+h[o>>3]- +h[R>>3])*.125;h[n+24>>3]=y;h[n+32>>3]=z;z=y+(+h[o>>3]- +h[R>>3])*.25;h[n+40>>3]=z;h[n+48>>3]=x;w=z+(+h[o>>3]- +h[R>>3])*.125;h[n+56>>3]=w;O=x-(+h[J>>3]- +h[E>>3])*.25;h[n+64>>3]=O;h[n+72>>3]=w;w=O-(+h[J>>3]- +h[E>>3])*.125;h[n+80>>3]=w;h[n+88>>3]=z;h[n+96>>3]=w;h[n+104>>3]=y;h[n+112>>3]=O;h[n+120>>3]=I;rB(a,n,F,f);I=+h[p>>3];O=I+(+h[u>>3]-I)*.5;F=j|0;E=j|0;h[E>>3]=O;I=+h[v>>3];y=I+(+h[k>>3]-I)*.5;J=j+8|0;h[J>>3]=y;t=j+16|0;h[t>>3]=O;e=j+24|0;h[e>>3]=y+(+h[o>>3]- +h[R>>3])*.125;uB(a,F,2);y=+h[p>>3];O=y+(+h[u>>3]-y)*.5;h[E>>3]=O;y=+h[v>>3];I=y+(+h[k>>3]-y)*.5+(+h[o>>3]- +h[R>>3])*.25;h[J>>3]=I;h[t>>3]=O;h[e>>3]=I+(+h[o>>3]- +h[R>>3])*.125;uB(a,F,2);h[E>>3]=+h[p>>3];I=+h[v>>3];h[J>>3]=I+(+h[k>>3]-I)*.5;h[t>>3]=+h[u>>3];h[e>>3]=I+(+h[b+8>>3]- +h[b+56>>3])*.5;uB(a,F,2);eF(n);eF(m);i=g;return}else if((l|0)==335544320){n=d+12|0;F=jk(n<<4)|0;e=b+16|0;I=+h[e>>3];u=b|0;t=L;k=m+48|0;O=I+(+h[u>>3]-I)*.5+(+h[t>>3]- +h[k>>3])*.25;h[F>>3]=O;J=b+40|0;I=+h[J>>3];v=b+24|0;p=m+56|0;E=m+72|0;y=I+(+h[v>>3]-I)*.5+(+h[p>>3]- +h[E>>3])*.5;R=F+8|0;h[R>>3]=y;h[F+16>>3]=O;I=y+(+h[p>>3]- +h[E>>3])*.125;o=F+24|0;h[o>>3]=I;y=O-(+h[t>>3]- +h[k>>3])*.125;K=F+32|0;h[K>>3]=y;w=I+(+h[p>>3]- +h[E>>3])*.125;h[F+40>>3]=w;h[F+48>>3]=O;z=w+(+h[p>>3]- +h[E>>3])*.125;h[F+56>>3]=z;h[F+64>>3]=O;O=z+(+h[p>>3]- +h[E>>3])*.125;h[F+72>>3]=O;h[F+80>>3]=y;h[F+88>>3]=O;y=+h[e>>3];x=y+(+h[u>>3]-y)*.5;h[F+96>>3]=x;h[F+104>>3]=z;y=x-(+h[t>>3]- +h[k>>3])*.125;h[F+112>>3]=y;h[F+120>>3]=O;s=y-(+h[t>>3]- +h[k>>3])*.125;h[F+128>>3]=s;h[F+136>>3]=O;h[F+144>>3]=s;h[F+152>>3]=z;z=s+(+h[t>>3]- +h[k>>3])*.125;h[F+160>>3]=z;h[F+168>>3]=w;h[F+176>>3]=s;h[F+184>>3]=I;h[F+192>>3]=s;s=+h[R>>3];h[F+200>>3]=s;h[F+208>>3]=z;h[F+216>>3]=s;R=F+224|0;h[R>>3]=x;h[F+232>>3]=+h[o>>3];h[F+240>>3]=+h[K>>3];h[F+248>>3]=s;rB(a,F,n,f);n=j|0;K=j;c[K>>2]=c[R>>2];c[K+4>>2]=c[R+4>>2];c[K+8>>2]=c[R+8>>2];c[K+12>>2]=c[R+12>>2];R=j|0;K=j+16|0;h[K>>3]=+h[R>>3];s=+h[J>>3];o=j+24|0;h[o>>3]=s+(+h[v>>3]-s)*.5;uB(a,n,2);h[R>>3]=+h[e>>3];s=+h[J>>3];h[j+8>>3]=s+(+h[v>>3]-s)*.5;h[K>>3]=+h[u>>3];h[o>>3]=s+(+h[b+8>>3]- +h[b+56>>3])*.5;uB(a,n,2);eF(F);eF(m);i=g;return}else if((l|0)==352321536){F=d+4|0;n=jk(F<<4)|0;o=b+16|0;s=+h[o>>3];u=b|0;K=L;v=m+48|0;x=s+(+h[u>>3]-s)*.5+(+h[K>>3]- +h[v>>3])*.125;h[n>>3]=x;J=b+40|0;s=+h[J>>3];e=b+24|0;R=m+56|0;k=m+72|0;z=s+(+h[e>>3]-s)*.5+(+h[R>>3]- +h[k>>3])*.5;t=n+8|0;h[t>>3]=z;s=x+(+h[K>>3]- +h[v>>3])*.125;h[n+16>>3]=s;I=z+(+h[R>>3]- +h[k>>3])*.125;h[n+24>>3]=I;h[n+32>>3]=s;s=I+(+h[R>>3]- +h[k>>3])*.25;h[n+40>>3]=s;h[n+48>>3]=x;w=s+(+h[R>>3]- +h[k>>3])*.125;h[n+56>>3]=w;O=x-(+h[K>>3]- +h[v>>3])*.25;h[n+64>>3]=O;h[n+72>>3]=w;w=O-(+h[K>>3]- +h[v>>3])*.125;h[n+80>>3]=w;h[n+88>>3]=s;h[n+96>>3]=w;h[n+104>>3]=I;h[n+112>>3]=O;h[n+120>>3]=z;rB(a,n,F,f);z=+h[o>>3];O=z+(+h[u>>3]-z)*.5;F=j|0;v=j|0;h[v>>3]=O;K=j+8|0;h[K>>3]=+h[t>>3];t=j+16|0;h[t>>3]=O;O=+h[J>>3];k=j+24|0;h[k>>3]=O+(+h[e>>3]-O)*.5;uB(a,F,2);h[v>>3]=+h[o>>3];O=+h[J>>3];h[K>>3]=O+(+h[e>>3]-O)*.5;h[t>>3]=+h[u>>3];h[k>>3]=O+(+h[b+8>>3]- +h[b+56>>3])*.5;uB(a,F,2);eF(n);eF(m);i=g;return}else if((l|0)==369098752){n=d+5|0;F=jk(n<<4)|0;k=P;u=L;t=m+48|0;h[F>>3]=+h[k>>3]-(+h[u>>3]- +h[t>>3])*.5;e=m+56|0;K=m+72|0;h[F+8>>3]=+h[m+24>>3]-(+h[e>>3]- +h[K>>3])*.5;h[F+16>>3]=+h[t>>3];O=+h[e>>3];h[F+24>>3]=O-(O- +h[K>>3])*.5;h[F+32>>3]=+h[b+32>>3];J=b+40|0;h[F+40>>3]=+h[J>>3];O=+h[u>>3];h[F+48>>3]=O+(O- +h[t>>3])*.5;h[F+56>>3]=+h[J>>3];O=+h[u>>3];h[F+64>>3]=O+(O- +h[t>>3])*.5;h[F+72>>3]=+h[J>>3]+(+h[e>>3]- +h[K>>3])*.5;h[F+80>>3]=+h[k>>3]-(+h[u>>3]- +h[t>>3])*.5;h[F+88>>3]=+h[J>>3]+(+h[e>>3]- +h[K>>3])*.5;h[F+96>>3]=+h[k>>3]-(+h[u>>3]- +h[t>>3])*.5;K=b+56|0;h[F+104>>3]=+h[K>>3];e=b+8|0;O=+h[e>>3];h[F+120>>3]=O-(O- +h[K>>3])*.5;h[F+112>>3]=+h[b>>3];h[F+136>>3]=+h[e>>3];h[F+128>>3]=+h[k>>3]-(+h[u>>3]- +h[t>>3])*.5;rB(a,F,n,f);eF(F);eF(m);i=g;return}else if((l|0)==385875968){F=d+3|0;n=jk(F<<4)|0;t=P;u=L;k=m+48|0;h[n>>3]=+h[t>>3]-(+h[u>>3]- +h[k>>3])*.5;e=m+56|0;K=m+72|0;h[n+8>>3]=+h[m+24>>3]-(+h[e>>3]- +h[K>>3])*.5;h[n+16>>3]=+h[k>>3];O=+h[e>>3];h[n+24>>3]=O-(O- +h[K>>3])*.5;h[n+32>>3]=+h[b+32>>3];J=b+40|0;h[n+40>>3]=+h[J>>3]+(+h[e>>3]- +h[K>>3])*.5;h[n+48>>3]=+h[t>>3]-(+h[u>>3]- +h[k>>3])*.5;h[n+56>>3]=+h[J>>3]+(+h[e>>3]- +h[K>>3])*.5;h[n+64>>3]=+h[t>>3]-(+h[u>>3]- +h[k>>3])*.5;K=b+56|0;h[n+72>>3]=+h[K>>3];e=b+8|0;O=+h[e>>3];h[n+88>>3]=O-(O- +h[K>>3])*.5;h[n+80>>3]=+h[b>>3];h[n+104>>3]=+h[e>>3];h[n+96>>3]=+h[t>>3]-(+h[u>>3]- +h[k>>3])*.5;rB(a,n,F,f);eF(n);eF(m);i=g;return}else if((l|0)==402653184){n=d+3|0;F=jk(n<<4)|0;k=b|0;h[F>>3]=+h[k>>3];u=b+8|0;t=m+56|0;e=m+72|0;h[F+8>>3]=+h[u>>3]-(+h[t>>3]- +h[e>>3])*.5;K=L;O=+h[K>>3];J=m+48|0;h[F+16>>3]=O+(O- +h[J>>3])*.5;h[F+24>>3]=+h[u>>3]-(+h[t>>3]- +h[e>>3])*.5;O=+h[K>>3];h[F+32>>3]=O+(O- +h[J>>3])*.5;h[F+40>>3]=+h[m+40>>3];h[F+48>>3]=+h[b+16>>3];O=+h[b+24>>3];u=b+40|0;h[F+56>>3]=O-(O- +h[u>>3])*.5;O=+h[K>>3];h[F+64>>3]=O+(O- +h[J>>3])*.5;h[F+72>>3]=+h[u>>3];h[F+88>>3]=+h[u>>3]+(+h[t>>3]- +h[e>>3])*.5;O=+h[K>>3];h[F+80>>3]=O+(O- +h[J>>3])*.5;h[F+104>>3]=+h[b+56>>3]+(+h[t>>3]- +h[e>>3])*.5;h[F+96>>3]=+h[k>>3];rB(a,F,n,f);eF(F);eF(m);i=g;return}else if((l|0)==419430400){l=d+5|0;d=jk(l<<4)|0;h[d>>3]=+h[b>>3];F=b+8|0;n=m+56|0;k=m+72|0;h[d+8>>3]=+h[F>>3]-(+h[n>>3]- +h[k>>3])*.5;e=L;O=+h[e>>3];L=m+48|0;h[d+16>>3]=O+(O- +h[L>>3])*.5;h[d+24>>3]=+h[F>>3]-(+h[n>>3]- +h[k>>3])*.5;O=+h[e>>3];h[d+32>>3]=O+(O- +h[L>>3])*.5;h[d+40>>3]=+h[m+40>>3];h[d+48>>3]=+h[b+16>>3];O=+h[b+24>>3];F=b+40|0;h[d+56>>3]=O-(O- +h[F>>3])*.5;O=+h[e>>3];h[d+64>>3]=O+(O- +h[L>>3])*.5;h[d+72>>3]=+h[F>>3];h[d+88>>3]=+h[F>>3]+(+h[n>>3]- +h[k>>3])*.5;O=+h[e>>3];h[d+80>>3]=O+(O- +h[L>>3])*.5;F=b+56|0;h[d+104>>3]=+h[F>>3]+(+h[n>>3]- +h[k>>3])*.5;k=P;h[d+96>>3]=+h[k>>3]-(+h[e>>3]- +h[L>>3])*.5;h[d+112>>3]=+h[k>>3]-(+h[e>>3]- +h[L>>3])*.5;h[d+120>>3]=+h[F>>3];h[d+128>>3]=+h[b+48>>3];h[d+136>>3]=+h[F>>3];rB(a,d,l,f);eF(d);eF(m);i=g;return}else{eF(m);i=g;return}}function pl(a){a=a|0;var b=0,d=0;b=c[(c[a+8>>2]|0)+8>>2]|0;do{if((b|0)==0){d=0}else{a=c[c[b+4>>2]>>2]|0;if((a|0)==80){d=1;break}if((a|0)==56){d=2;break}if((a|0)==4){d=3;break}d=(a|0)==76?4:0}}while(0);return d|0}function ql(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0,G=0.0,H=0.0,I=0,J=0.0,K=0.0,L=0,M=0.0,N=0.0,O=0.0,P=0.0,Q=0.0,R=0.0,U=0.0,X=0.0,Y=0,Z=0,_=0,aa=0,ba=0.0,ca=0,ea=0.0,fa=0.0,ga=0.0,ha=0.0,ia=0.0,ja=0.0,ka=0.0,la=0.0,ma=0,na=0,oa=0.0,pa=0,qa=0,ra=0.0,sa=0.0,ta=0.0,ua=0.0,va=0.0,wa=0.0,xa=0.0,ya=0;d=i;i=i+64|0;e=d|0;f=d+16|0;g=d+24|0;j=d+32|0;k=d+40|0;l=d+48|0;m=jk(48)|0;n=b+8|0;o=c[(c[(c[n>>2]|0)+8>>2]|0)+8>>2]|0;p=c[o>>2]|0;q=c[o+4>>2]|0;r=c[o+8>>2]|0;s=+h[o+16>>3];t=+h[o+32>>3];u=+h[o+24>>3];o=b|0;b=(Km(ew(o,168440)|0)|0)&255|p;p=(b|0)!=0;do{if(p){v=+Fm(o,c[53574]|0,0.0,.01);w=+Fm(o,c[53618]|0,0.0,.02);x=(v>w?v:w)*72.0;if(x<0.0){y=x+-.5}else{y=x+.5}z=~~y;x=+(z|0);if((z|0)>0){A=x;B=x;break}z=c[n>>2]|0;x=+h[z+32>>3];w=+h[z+40>>3];v=(x<w?x:w)*72.0;if(v<0.0){C=v+-.5}else{C=v+.5}v=+(~~C|0);A=v;B=v}else{z=c[n>>2]|0;v=+h[z+32>>3]*72.0;if(v<0.0){D=v+-.5}else{D=v+.5}v=+h[z+40>>3]*72.0;if(v<0.0){E=v+-.5}else{E=v+.5}A=+(~~E|0);B=+(~~D|0)}}while(0);z=Em(o,c[53598]|0,q,0)|0;D=s+ +Fm(o,c[53602]|0,0.0,-360.0);if((r|0)==0){s=+Fm(o,c[53584]|0,0.0,-100.0);q=Em(o,c[53586]|0,4,0)|0;F=q;G=s;H=+Fm(o,c[53636]|0,0.0,-100.0)}else{F=r;G=t;H=u}r=c[(c[n>>2]|0)+104>>2]|0;u=+h[r+24>>3];t=+h[r+32>>3];r=~~u;q=(r|0)>-1?r:-r|0;s=+(q|0);if((q|0)>-1){if((~~(s+.5)|0)==0){I=22}else{I=25}}else{if((~~(s+-.5)|0)==0){I=22}else{I=25}}do{if((I|0)==22){q=~~t;r=(q|0)>-1?q:-q|0;s=+(r|0);if((r|0)>-1){if((~~(s+.5)|0)==0){J=t;K=u;break}else{I=25;break}}else{if((~~(s+-.5)|0)==0){J=t;K=u;break}else{I=25;break}}}}while(0);do{if((I|0)==25){r=ew(o,78824)|0;if((r|0)==0){J=t+8.0;K=u+16.0;break}q=ac(r|0,168832,(L=i,i=i+16|0,c[L>>2]=f,c[L+8>>2]=g,L)|0)|0;i=L;s=+h[f>>3];if(s<0.0){h[f>>3]=0.0;M=0.0}else{M=s}s=+h[g>>3];if(s<0.0){h[g>>3]=0.0;N=0.0}else{N=s}if((q|0)<=0){J=t+8.0;K=u+16.0;break}s=M*72.0;r=s<0.0;if(r){O=s+-.5}else{O=s+.5}E=u+ +(~~O<<1|0);if((q|0)>1){C=N*72.0;if(C<0.0){P=C+-.5}else{P=C+.5}J=t+ +(~~P<<1|0);K=E;break}else{if(r){Q=s+-.5}else{Q=s+.5}J=t+ +(~~Q<<1|0);K=E;break}}}while(0);Q=K- +h[(c[(c[n>>2]|0)+104>>2]|0)+24>>3];t=+h[c[(c[(Hx(o)|0)+8>>2]|0)+8>>2]>>3];if(t>0.0){P=t*72.0;if(P<0.0){R=P+-.5}else{R=P+.5}P=+(~~R|0);g=~~(K/P);f=~~(J/P);U=P*+((P*+(f|0)+1.0e-5<J)+f|0);X=P*+((P*+(g|0)+1.0e-5<K)+g|0)}else{U=J;X=K}g=c[(c[n>>2]|0)+8>>2]|0;do{if((a[g+12|0]|0)==0){f=ew(o,87160)|0;if((f|0)==0){Y=0;Z=0;break}if((a[f]|0)==0){Y=0;Z=0;break}FB(k,Hx(o)|0,f);r=c[k>>2]|0;q=c[k+4>>2]|0;if((r|0)==-1&(q|0)==-1){_=$w(o)|0;Fv(0,166888,(L=i,i=i+16|0,c[L>>2]=f,c[L+8>>2]=_,L)|0)|0;i=L;Y=0;Z=0;break}else{a[(c[(Hx(o)|0)+8>>2]|0)+114|0]=1;Y=q+2|0;Z=r+2|0;break}}else{r=c[g>>2]|0;if((a[r]|0)!=99){Y=0;Z=0;break}if((Ya(r|0,102208)|0)!=0){Y=0;Z=0;break}r=ew(o,114736)|0;FB(j,Hx(o)|0,r);q=c[j>>2]|0;_=c[j+4>>2]|0;if((q|0)==-1&(_|0)==-1){f=$w(o)|0;Fv(0,168056,(L=i,i=i+16|0,c[L>>2]=(r|0)!=0?r:167344,c[L+8>>2]=f,L)|0)|0;i=L;Y=0;Z=0;break}else{a[(c[(Hx(o)|0)+8>>2]|0)+114|0]=1;Y=_+2|0;Z=q+2|0;break}}}while(0);K=+(Z|0);Z=e|0;h[Z>>3]=X>K?X:K;K=+(Y|0);Y=e+8|0;h[Y>>3]=U>K?U:K;if((F|0)<3){aa=H!=0.0|G!=0.0?120:F}else{aa=F}F=ew(o,166472)|0;do{if((F|0)==0){I=66}else{j=a[F]|0;if(!((j<<24>>24|0)==116|(j<<24>>24|0)==98)){I=66;break}a[(c[(c[n>>2]|0)+104>>2]|0)+80|0]=j}}while(0);if((I|0)==66){a[(c[(c[n>>2]|0)+104>>2]|0)+80|0]=99}if((aa|0)==4){if(D<0.0){ba=D+-.5}else{ba=D+.5}if(((~~ba|0)%90|0|0)==0&H==0.0&G==0.0){ca=1}else{I=72}}else{I=72}do{if((I|0)==72){F=c[n>>2]|0;j=c[(c[(c[F+8>>2]|0)+8>>2]|0)+44>>2]|0;if((j|0)!=0){Dc[c[j>>2]&63](l,e);j=e;g=l;c[j>>2]=c[g>>2];c[j+4>>2]=c[g+4>>2];c[j+8>>2]=c[g+8>>2];c[j+12>>2]=c[g+12>>2];ca=0;break}ba=+h[Y>>3];J=ba*1.4142135623730951;do{if(A>J){if((a[(c[F+104>>2]|0)+80|0]|0)!=99){I=77;break}P=ba/A;R=+T(1.0/(1.0-P*P));P=R*+h[Z>>3];h[Z>>3]=P;ea=P;fa=ba}else{I=77}}while(0);if((I|0)==77){ba=+h[Z>>3]*1.4142135623730951;h[Z>>3]=ba;h[Y>>3]=J;ea=ba;fa=J}if((aa|0)<=2){ca=0;break}ba=+V(3.141592653589793/+(aa|0));h[Z>>3]=ea/ba;h[Y>>3]=fa/ba;ca=0}}while(0);fa=+h[Y>>3];if((Km(Hm(o,c[53630]|0,86632)|0)|0)<<24>>24==0){ea=+h[Z>>3];ba=B>ea?B:ea;h[Z>>3]=ba;ea=+h[Y>>3];ga=ba;ha=A>ea?A:ea}else{l=c[(c[n>>2]|0)+104>>2]|0;if(B<+h[l+24>>3]){I=83}else{if(A<+h[l+32>>3]){I=83}}if((I|0)==83){I=$w(o)|0;l=$w(Hx(o)|0)|0;Fv(0,166096,(L=i,i=i+16|0,c[L>>2]=I,c[L+8>>2]=l,L)|0)|0;i=L}h[Z>>3]=B;ga=B;ha=A}h[Y>>3]=ha;if(p){A=ga>ha?ga:ha;h[Y>>3]=A;h[Z>>3]=A;ia=A;ja=A}else{ia=ha;ja=ga}do{if((Km(Hm(o,c[53606]|0,86632)|0)|0)<<24>>24==0){if(ca){ga=+h[Z>>3];h[(c[(c[n>>2]|0)+104>>2]|0)+40>>3]=(X>ga?X:ga)-Q;break}ga=+h[Y>>3];if(U<ga){ha=+h[Z>>3]*+T(1.0-U*U/(ga*ga));h[(c[(c[n>>2]|0)+104>>2]|0)+40>>3]=(X>ha?X:ha)-Q;break}else{h[(c[(c[n>>2]|0)+104>>2]|0)+40>>3]=X-Q;break}}else{h[(c[(c[n>>2]|0)+104>>2]|0)+40>>3]=X-Q}}while(0);Q=+h[Y>>3]-fa;if(U<K){ka=K-U+Q}else{ka=Q}h[(c[(c[n>>2]|0)+104>>2]|0)+48>>3]=U+ka;o=(z|0)<1?1:z;do{if((aa|0)<3){p=jk(o<<5)|0;L=p;ka=+h[Z>>3]*.5;U=+h[Y>>3]*.5;h[p>>3]=-0.0-ka;h[p+8>>3]=-0.0-U;h[p+16>>3]=ka;h[p+24>>3]=U;if((z|0)>1){la=ka;ma=2;na=1;oa=U}else{pa=2;qa=L;break}while(1){ra=la+4.0;sa=oa+4.0;h[L+(ma<<4)>>3]=-0.0-ra;h[L+(ma<<4)+8>>3]=-0.0-sa;p=ma|1;h[L+(p<<4)>>3]=ra;h[L+(p<<4)+8>>3]=sa;p=na+1|0;if((p|0)<(z|0)){la=ra;ma=ma+2|0;na=p;oa=sa}else{break}}h[Z>>3]=ra*2.0;h[Y>>3]=sa*2.0;pa=2;qa=L}else{p=jk(da(o<<4,aa)|0)|0;l=p;I=c[(c[(c[(c[n>>2]|0)+8>>2]|0)+8>>2]|0)+44>>2]|0;do{if((I|0)==0){J=6.283185307179586/+(aa|0);U=J*.5;ka=+W(U);Q=+cb(+(+S(+H)+ +S(+G)),+1.0);K=H*1.4142135623730951/+V(U);U=G*.5;fa=(J+ -3.141592653589793)*.5;X=+V(fa)*.5;ha=+W(fa)*.5;ga=fa+(3.141592653589793-J)*.5;if((aa|0)<=0){ta=0.0;ua=0.0;break}fa=D/180.0*3.141592653589793;if(ca){A=J+ga;B=ha+ka*+W(A);ea=U*B+(X+ka*+V(A))*(Q+K*B);A=fa+ +$(+B,+ea);ba=+W(A);P=+V(A);A=+cb(+ea,+B);B=P*A*+h[Z>>3];P=ba*A*+h[Y>>3];h[p>>3]=B;h[p+8>>3]=P;A=+S(+P);ba=+S(+B);ea=-0.0-B;h[p+16>>3]=ea;h[p+24>>3]=P;h[p+32>>3]=ea;ea=-0.0-P;h[p+40>>3]=ea;h[p+48>>3]=B;h[p+56>>3]=ea;ta=P!=0.0?A:0.0;ua=B!=0.0?ba:0.0;break}else{ba=X;X=ha;ha=ga;ga=0.0;B=0.0;F=0;while(1){A=J+ha;P=ba+ka*+V(A);ea=X+ka*+W(A);R=U*ea+P*(Q+K*ea);t=fa+ +$(+ea,+R);N=+W(t);O=+V(t);t=+cb(+R,+ea);R=O*t*+h[Z>>3];O=N*t*+h[Y>>3];t=+S(+R);N=t>ga?t:ga;t=+S(+O);u=t>B?t:B;h[l+(F<<4)>>3]=R;h[l+(F<<4)+8>>3]=O;g=F+1|0;if((g|0)<(aa|0)){ba=P;X=ea;ha=A;ga=N;B=u;F=g}else{ta=u;ua=N;break}}}}else{Dc[c[I+4>>2]&63](l,e);ta=+h[Y>>3]*.5;ua=+h[Z>>3]*.5}}while(0);B=ua*2.0;ga=ta*2.0;ha=ja>B?ja:B;h[Z>>3]=ha;X=ia>ga?ia:ga;h[Y>>3]=X;ba=ha/B;B=X/ga;I=(aa|0)>0;if(I){L=0;do{F=l+(L<<4)|0;g=l+(L<<4)+8|0;ga=B*+h[g>>3];h[F>>3]=ba*+h[F>>3];h[g>>3]=ga;L=L+1|0;}while((L|0)<(aa|0))}if((z|0)<=1){pa=aa;qa=l;break}L=aa-1|0;ba=+h[p>>3];B=+h[p+8>>3];ga=+$(+(B- +h[l+(L<<4)+8>>3]),+(ba- +h[l+(L<<4)>>3]));if(I){va=ga;wa=ba;xa=B;ya=0}else{pa=aa;qa=l;break}while(1){L=ya+1|0;g=(L|0)==(aa|0)?0:L;B=+h[l+(g<<4)>>3];ba=+h[l+(g<<4)+8>>3];ga=+$(+(ba-xa),+(B-wa));X=(va+3.141592653589793-ga)*.5;ha=4.0/+W(X);fa=va-X;X=ha*+W(fa);K=ha*+V(fa);fa=wa;ha=xa;g=1;do{fa=K+fa;ha=X+ha;F=(da(g,aa)|0)+ya|0;h[l+(F<<4)>>3]=fa;h[l+(F<<4)+8>>3]=ha;g=g+1|0;}while((g|0)<(z|0));if((L|0)<(aa|0)){va=ga;wa=B;xa=ba;ya=L}else{break}}if(!I){pa=aa;qa=l;break}p=da(aa,z-1|0)|0;g=0;ha=+h[Z>>3];fa=+h[Y>>3];while(1){F=g+p|0;X=+h[l+(F<<4)+8>>3];K=+S(+(+h[l+(F<<4)>>3]))*2.0;Q=K>ha?K:ha;h[Z>>3]=Q;K=+S(+X)*2.0;X=K>fa?K:fa;h[Y>>3]=X;F=g+1|0;if((F|0)<(aa|0)){g=F;ha=Q;fa=X}else{pa=aa;qa=l;break}}}}while(0);c[m>>2]=b;c[m+4>>2]=z;c[m+8>>2]=pa;h[m+16>>3]=D;h[m+32>>3]=G;h[m+24>>3]=H;c[m+44>>2]=qa;h[(c[n>>2]|0)+32>>3]=+h[Z>>3]/72.0;h[(c[n>>2]|0)+40>>3]=+h[Y>>3]/72.0;c[(c[n>>2]|0)+12>>2]=m;i=d;return}function rl(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0;b=i;i=i+16|0;d=a|0;e=(c[(c[(Hx(d)|0)+8>>2]|0)+116>>2]|0)>>>2&1^1;f=a+8|0;g=c[c[(c[f>>2]|0)+104>>2]>>2]|0;c[43784]=g;j=xF(g|0)|0;g=jk((j|0)>1?j+1|0:2)|0;j=Wl(a,e,1,g)|0;if((j|0)==0){Fv(1,79400,(k=i,i=i+8|0,c[k>>2]=c[c[(c[f>>2]|0)+104>>2]>>2],k)|0)|0;i=k;c[43784]=79104;l=Wl(a,e,1,g)|0}else{l=j}eF(g);Xl(b|0,a,l);a=c[f>>2]|0;m=+h[a+32>>3]*72.0;if(m<0.0){n=m+-.5}else{n=m+.5}m=+(~~n|0);n=+h[a+40>>3]*72.0;if(n<0.0){o=n+-.5}else{o=n+.5}n=+(~~o|0);a=l|0;if((Km(Hm(d,c[53630]|0,86632)|0)|0)<<24>>24==0){o=+h[a>>3];g=l+8|0;p=+h[g>>3];q=o>m?o:m;r=p>n?p:n;s=g}else{q=m;r=n;s=l+8|0}Yl(l,q,r,(Km(Hm(d,c[53606]|0,86632)|0)|0)&255);Zl(l,q*-.5,r*.5,15);h[(c[f>>2]|0)+32>>3]=+h[a>>3]/72.0;h[(c[f>>2]|0)+40>>3]=(+h[s>>3]+1.0)/72.0;c[(c[f>>2]|0)+12>>2]=l;i=b;return}function sl(a){a=a|0;var b=0,d=0,e=0,f=0,g=0.0,i=0.0,j=0.0,k=0.0,l=0,m=0.0,n=0,o=0.0;b=jk(48)|0;d=a+8|0;e=c[(c[(c[(c[d>>2]|0)+8>>2]|0)+8>>2]|0)+4>>2]|0;f=a|0;g=+Fm(f,c[53574]|0,1.7976931348623157e+308,0.0);i=+Fm(f,c[53618]|0,1.7976931348623157e+308,0.0);j=g<i?g:i;if(j==1.7976931348623157e+308&i==1.7976931348623157e+308){h[(c[d>>2]|0)+40>>3]=.05;h[(c[d>>2]|0)+32>>3]=.05}else{if(j>0.0){k=j>3.0e-4?j:3.0e-4}else{k=j}h[(c[d>>2]|0)+40>>3]=k;h[(c[d>>2]|0)+32>>3]=k}k=+h[(c[d>>2]|0)+32>>3]*72.0;a=Em(f,c[53598]|0,e,0)|0;e=jk((a|0)<1?32:a<<5)|0;f=e;j=k*.5;i=-0.0-j;h[e>>3]=i;h[e+8>>3]=i;h[e+16>>3]=j;h[e+24>>3]=j;if((a|0)>1){i=j;g=j;e=2;l=1;while(1){m=g+4.0;j=i+4.0;h[f+(e<<4)>>3]=-0.0-m;h[f+(e<<4)+8>>3]=-0.0-j;n=e|1;h[f+(n<<4)>>3]=m;h[f+(n<<4)+8>>3]=j;n=l+1|0;if((n|0)<(a|0)){i=j;g=m;e=e+2|0;l=n}else{break}}o=m*2.0}else{o=k}c[b>>2]=1;c[b+4>>2]=a;c[b+8>>2]=2;vF(b+16|0,0,24)|0;c[b+44>>2]=f;k=o/72.0;h[(c[d>>2]|0)+32>>3]=k;h[(c[d>>2]|0)+40>>3]=k;c[(c[d>>2]|0)+12>>2]=b;return}function tl(a){a=a|0;var b=0,d=0;b=c[(c[a+8>>2]|0)+8>>2]|0;if((b|0)==0){d=0;return d|0}d=(c[c[b+4>>2]>>2]|0)==80|0;return d|0}function ul(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;d=c[53500]|0;if((d|0)==0){e=0;return e|0}f=c[53650]|0;if((f|0)<=0){e=0;return e|0}g=a[b]|0;h=0;while(1){i=c[d+(h<<2)>>2]|0;j=c[i>>2]|0;if((a[j]|0)==g<<24>>24){if((Ya(j|0,b|0)|0)==0){e=i;k=7;break}}i=h+1|0;if((i|0)<(f|0)){h=i}else{e=0;k=7;break}}if((k|0)==7){return e|0}return 0}function vl(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;e=i;do{if((Sm(ew(d|0,114736)|0)|0)==0){f=b}else{if((a[b]|0)==101){if((Ya(b|0,107896)|0)==0){f=b;break}}f=102208}}while(0);b=a[f]|0;if(b<<24>>24==99){if((Ya(f|0,102208)|0)==0){g=99}else{h=7}}else{h=7}a:do{if((h|0)==7){d=c[42902]|0;if((d|0)==0){g=b;break}else{j=171608;k=d}while(1){if((a[k]|0)==b<<24>>24){if((Ya(k|0,f|0)|0)==0){l=j;break}}d=j+16|0;m=c[d>>2]|0;if((m|0)==0){g=b;break a}else{j=d;k=m}}i=e;return l|0}}while(0);k=c[53500]|0;j=c[53650]|0;if((k|0)==0){b=j+1|0;c[53650]=b;n=kk(b<<2)|0}else{b:do{if((j|0)>0){b=0;while(1){o=c[k+(b<<2)>>2]|0;h=c[o>>2]|0;if((a[h]|0)==g<<24>>24){if((Ya(h|0,f|0)|0)==0){break}}b=b+1|0;if((b|0)>=(j|0)){break b}}if((o|0)==0){break}else{l=o}i=e;return l|0}}while(0);o=j+1|0;c[53650]=o;n=mk(k,o<<2)|0}c[53500]=n;n=jk(16)|0;o=n;c[(c[53500]|0)+(j<<2)>>2]=o;c[n>>2]=c[42902];c[n+4>>2]=c[42903];c[n+8>>2]=c[42904];c[n+12>>2]=c[42905];j=Lb(f|0)|0;c[n>>2]=j;do{if((c[53666]|0)==0){if((a[f]|0)==99){if((Ya(f|0,102208)|0)==0){break}}Fv(0,167480,(k=i,i=i+16|0,c[k>>2]=c[42902],c[k+8>>2]=j,k)|0)|0;i=k;a[n+12|0]=0;l=o;i=e;return l|0}}while(0);a[n+12|0]=1;l=o;i=e;return l|0}function wl(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0.0,q=0.0,r=0.0,s=0.0,t=0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0,A=0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0,J=0,K=0,L=0,M=0,N=0.0,O=0.0,P=0.0,Q=0.0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0;j=i;i=i+40|0;k=j|0;l=e|0;m=c[(c[(c[(Hx(l)|0)+48>>2]|0)+8>>2]|0)+116>>2]&3;n=e+8|0;o=c[n>>2]|0;p=+h[o+16>>3];q=+h[o+24>>3];if((m|0)==3){r=p;s=q;t=5}else if((m|0)==0){r=q;s=p;t=5}else if((m|0)==1){r=p;s=-0.0-q;t=5}else if((m|0)==2){r=-0.0-q;s=p;t=5}else{u=0.0;v=0.0;t=6}do{if((t|0)==5){if(s>=0.0){u=s;v=r;t=6;break}w=s+-.5;x=r}}while(0);if((t|0)==6){w=u+.5;x=v}o=~~w;if(x<0.0){y=x+-.5}else{y=x+.5}z=~~y;A=c[f+8>>2]|0;y=+h[A+16>>3];x=+h[A+24>>3];if((m|0)==2){B=-0.0-x;C=y;t=15}else if((m|0)==1){B=y;C=-0.0-x;t=15}else if((m|0)==3){B=y;C=x;t=15}else if((m|0)==0){B=x;C=y;t=15}else{D=0.0;E=0.0;t=16}do{if((t|0)==15){if(C>=0.0){D=C;E=B;t=16;break}F=C+-.5;G=B}}while(0);if((t|0)==16){F=D+.5;G=E}t=~~F;if(G<0.0){H=G+-.5}else{H=G+.5}m=~~H;A=g+33|0;f=a[A]|0;I=f&255;do{if((f<<24>>24|0)==15|(f<<24>>24|0)==0){J=0}else{K=c[g+24>>2]|0;if((K|0)==0){L=(c[(c[(Hx(l)|0)+8>>2]|0)+116>>2]&1|0)==0;M=c[n>>2]|0;H=+h[M+80>>3]*.5;G=-0.0-H;F=+h[M+88>>3];E=-0.0-F;N=L?H:F;O=L?F:H;P=L?E:G;Q=L?G:E}else{N=+h[K+24>>3];O=+h[K+16>>3];P=+h[K>>3];Q=+h[K+8>>3]}K=~~((P+O)*.5);L=~~((Q+N)*.5);if((I&1|0)==0){R=0;S=0}else{M=o-t+K|0;T=z-m+~~Q|0;R=(da(M,M)|0)+(da(T,T)|0)|0;S=96440}if((I&2|0)==0){U=R;V=S}else{T=o-t+~~O|0;M=z-m+L|0;W=(da(M,M)|0)+(da(T,T)|0)|0;T=(S|0)==0|(W|0)<(R|0);U=T?W:R;V=T?91152:S}if((I&4|0)==0){X=U;Y=V}else{T=o-t+K|0;K=z-m+~~N|0;W=(da(T,T)|0)+(da(K,K)|0)|0;K=(V|0)==0|(W|0)<(U|0);X=K?W:U;Y=K?85880:V}if((I&8|0)==0){J=Y;break}K=o-t+~~P|0;W=z-m+L|0;L=(Y|0)==0|((da(W,W)|0)+(da(K,K)|0)|0)<(X|0);J=L?81272:Y}}while(0);c[k+36>>2]=c[g+36>>2];xl(e,c[g+24>>2]|0,k,J,d[A]|0,0)|0;A=b;b=k;c[A>>2]=c[b>>2];c[A+4>>2]=c[b+4>>2];c[A+8>>2]=c[b+8>>2];c[A+12>>2]=c[b+12>>2];c[A+16>>2]=c[b+16>>2];c[A+20>>2]=c[b+20>>2];c[A+24>>2]=c[b+24>>2];c[A+28>>2]=c[b+28>>2];c[A+32>>2]=c[b+32>>2];c[A+36>>2]=c[b+36>>2];i=j;return}function xl(b,d,e,f,g,j){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;j=j|0;var k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0.0,y=0.0,z=0.0,A=0.0,B=0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0,L=0,M=0,N=0,O=0,P=0.0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0.0,X=0.0,Y=0.0,Z=0,_=0,aa=0,ba=0,ca=0.0;k=i;i=i+160|0;l=k|0;m=k+16|0;n=k+32|0;o=k+48|0;p=k+64|0;q=k+80|0;r=k+96|0;s=k+112|0;t=k+128|0;u=k+144|0;if((d|0)==0){vF(l|0,0,16)|0;v=(c[(c[(Hx(b|0)|0)+8>>2]|0)+116>>2]&1|0)==0;w=c[b+8>>2]|0;x=+h[w+80>>3]*.5;y=+h[w+88>>3];z=v?y:x;A=v?x:y;B=0;C=A;D=-0.0-z;E=-0.0-A;F=z;G=+h[l>>3];H=+h[l+8>>3]}else{z=+h[d>>3];A=+h[d+8>>3];y=+h[d+16>>3];x=+h[d+24>>3];I=(z+y)*.5;J=(A+x)*.5;h[l>>3]=I;h[l+8>>3]=J;B=1;C=x;D=z;E=A;F=y;G=I;H=J}J=(F>C?F:C)*4.0;v=l|0;w=l+8|0;a:do{if((f|0)==0){K=B;L=1;M=0;N=0;O=0;P=0.0;Q=0}else{R=a[f]|0;if(R<<24>>24==0){K=B;L=1;M=0;N=0;O=0;P=0.0;Q=0;break}S=f+1|0;switch(R<<24>>24|0){case 101:{if((a[S]|0)!=0){K=B;L=1;M=0;N=0;O=0;P=0.0;Q=1;break a}if((j|0)==0){h[v>>3]=F}else{zl(m,j,H,J);R=l;T=m;c[R>>2]=c[T>>2];c[R+4>>2]=c[T+4>>2];c[R+8>>2]=c[T+8>>2];c[R+12>>2]=c[T+12>>2]}K=1;L=0;M=g&2;N=0;O=1;P=0.0;Q=0;break a;break};case 115:{h[w>>3]=E;T=a[S]|0;if((T|0)==0){if((j|0)==0){h[v>>3]=G}else{zl(n,j,-0.0-J,G);R=l;U=n;c[R>>2]=c[U>>2];c[R+4>>2]=c[U+4>>2];c[R+8>>2]=c[U+8>>2];c[R+12>>2]=c[U+12>>2]}K=1;L=0;M=g&1;N=0;O=1;P=-1.5707963267948966;Q=0;break a}else if((T|0)==101){if((j|0)==0){h[v>>3]=F}else{zl(o,j,-0.0-J,J);U=l;R=o;c[U>>2]=c[R>>2];c[U+4>>2]=c[R+4>>2];c[U+8>>2]=c[R+8>>2];c[U+12>>2]=c[R+12>>2]}K=1;L=0;M=g&3;N=0;O=1;P=-.7853981633974483;Q=0;break a}else if((T|0)==119){if((j|0)==0){h[v>>3]=D}else{I=-0.0-J;zl(p,j,I,I);T=l;R=p;c[T>>2]=c[R>>2];c[T+4>>2]=c[R+4>>2];c[T+8>>2]=c[R+8>>2];c[T+12>>2]=c[R+12>>2]}K=1;L=0;M=g&9;N=0;O=1;P=-2.356194490192345;Q=0;break a}else{h[w>>3]=H;K=B;L=1;M=0;N=0;O=0;P=0.0;Q=1;break a}break};case 119:{if((a[S]|0)!=0){K=B;L=1;M=0;N=0;O=0;P=0.0;Q=1;break a}if((j|0)==0){h[v>>3]=D}else{zl(q,j,H,-0.0-J);R=l;T=q;c[R>>2]=c[T>>2];c[R+4>>2]=c[T+4>>2];c[R+8>>2]=c[T+8>>2];c[R+12>>2]=c[T+12>>2]}K=1;L=0;M=g&8;N=0;O=1;P=3.141592653589793;Q=0;break a;break};case 110:{h[w>>3]=C;T=a[S]|0;if((T|0)==0){if((j|0)==0){h[v>>3]=G}else{zl(r,j,J,G);S=l;R=r;c[S>>2]=c[R>>2];c[S+4>>2]=c[R+4>>2];c[S+8>>2]=c[R+8>>2];c[S+12>>2]=c[R+12>>2]}K=1;L=0;M=g&4;N=0;O=1;P=1.5707963267948966;Q=0;break a}else if((T|0)==101){if((j|0)==0){h[v>>3]=F}else{zl(s,j,J,J);R=l;S=s;c[R>>2]=c[S>>2];c[R+4>>2]=c[S+4>>2];c[R+8>>2]=c[S+8>>2];c[R+12>>2]=c[S+12>>2]}K=1;L=0;M=g&6;N=0;O=1;P=.7853981633974483;Q=0;break a}else if((T|0)==119){if((j|0)==0){h[v>>3]=D}else{zl(t,j,J,-0.0-J);T=l;S=t;c[T>>2]=c[S>>2];c[T+4>>2]=c[S+4>>2];c[T+8>>2]=c[S+8>>2];c[T+12>>2]=c[S+12>>2]}K=1;L=0;M=g&12;N=0;O=1;P=2.356194490192345;Q=0;break a}else{h[w>>3]=H;K=B;L=1;M=0;N=0;O=0;P=0.0;Q=1;break a}break};case 95:{K=B;L=1;M=g;N=1;O=0;P=0.0;Q=0;break a;break};case 99:{K=B;L=1;M=0;N=0;O=0;P=0.0;Q=0;break a;break};default:{K=B;L=1;M=0;N=0;O=0;P=0.0;Q=1;break a}}}}while(0);B=b|0;ri(u,l,(c[(c[(Hx(B)|0)+8>>2]|0)+116>>2]&3)*90|0);b=l;l=u;c[b>>2]=c[l>>2];c[b+4>>2]=c[l+4>>2];c[b+8>>2]=c[l+8>>2];c[b+12>>2]=c[l+12>>2];if(N<<24>>24==0){l=c[(c[(Hx(B)|0)+8>>2]|0)+116>>2]&3;b=M&255;do{if((l|0)==2){if((M|0)==4){V=1;break}else if((M|0)==1){V=4;break}else{V=b;break}}else if((l|0)==1){if((M|0)==4){V=2;break}else if((M|0)==1){V=8;break}else if((M|0)==8){V=4;break}else if((M|0)==2){V=1;break}else{V=b;break}}else if((l|0)==3){if((M|0)==4){V=2;break}else if((M|0)==1){V=8;break}else if((M|0)==8){V=1;break}else if((M|0)==2){V=4;break}else{V=b;break}}else{V=b}}while(0);a[e+33|0]=V}else{a[e+33|0]=M}c[e+24>>2]=d;H=+h[v>>3];if(H<0.0){W=H+-.5}else{W=H+.5}h[e>>3]=+(~~W|0);W=+h[w>>3];if(W<0.0){X=W+-.5}else{X=W+.5}h[e+8>>3]=+(~~X|0);d=c[(c[(Hx(B)|0)+8>>2]|0)+116>>2]&3;do{if((d|0)==2){Y=P*-1.0}else if((d|0)==1){Y=P+ -1.5707963267948966}else if((d|0)==3){if(P==3.141592653589793){Y=-1.5707963267948966;break}if(P==2.356194490192345){Y=-.7853981633974483;break}if(P==1.5707963267948966){Y=0.0;break}if(P==0.0){Y=1.5707963267948966;break}if(P==-.7853981633974483){Y=2.356194490192345;break}if(P!=-1.5707963267948966){Y=P;break}Y=3.141592653589793}else{Y=P}}while(0);h[e+16>>3]=Y;Y=+h[v>>3];P=+h[w>>3];if(Y==0.0&P==0.0){a[e+32|0]=-128;Z=e+29|0;a[Z]=O;_=e+28|0;a[_]=K;aa=e+30|0;a[aa]=L;ba=e+31|0;a[ba]=N;i=k;return Q|0}X=+$(+P,+Y)+4.71238898038469;if(X<6.283185307179586){ca=X}else{ca=X+ -6.283185307179586}a[e+32|0]=~~(ca*256.0/6.283185307179586);Z=e+29|0;a[Z]=O;_=e+28|0;a[_]=K;aa=e+30|0;a[aa]=L;ba=e+31|0;a[ba]=N;i=k;return Q|0}function yl(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;d=i;i=i+80|0;e=d|0;f=d+40|0;g=b+8|0;h=c[g>>2]|0;j=h+16|0;k=j;if((a[k+31|0]|0)==0){l=h}else{h=c[b>>2]&3;wl(e,c[((h|0)==3?b:b+32|0)+28>>2]|0,c[((h|0)==2?b:b-32|0)+28>>2]|0,k);k=j;j=e;c[k>>2]=c[j>>2];c[k+4>>2]=c[j+4>>2];c[k+8>>2]=c[j+8>>2];c[k+12>>2]=c[j+12>>2];c[k+16>>2]=c[j+16>>2];c[k+20>>2]=c[j+20>>2];c[k+24>>2]=c[j+24>>2];c[k+28>>2]=c[j+28>>2];c[k+32>>2]=c[j+32>>2];c[k+36>>2]=c[j+36>>2];l=c[g>>2]|0}g=l+56|0;l=g;if((a[l+31|0]|0)==0){i=d;return}j=c[b>>2]&3;wl(f,c[((j|0)==2?b:b-32|0)+28>>2]|0,c[((j|0)==3?b:b+32|0)+28>>2]|0,l);l=g;g=f;c[l>>2]=c[g>>2];c[l+4>>2]=c[g+4>>2];c[l+8>>2]=c[g+8>>2];c[l+12>>2]=c[g+12>>2];c[l+16>>2]=c[g+16>>2];c[l+20>>2]=c[g+20>>2];c[l+24>>2]=c[g+24>>2];c[l+28>>2]=c[g+28>>2];c[l+32>>2]=c[g+32>>2];c[l+36>>2]=c[g+36>>2];i=d;return}function zl(a,b,d,e){a=a|0;b=b|0;d=+d;e=+e;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;f=i;i=i+112|0;g=f|0;j=f+64|0;k=f+80|0;l=f+96|0;m=c[b>>2]|0;n=c[(c[(Hx(m|0)|0)+8>>2]|0)+116>>2]&3;h[j>>3]=e;h[j+8>>3]=d;o=(n|0)!=0;if(o){ri(k,j,n*90|0);p=j;q=k;c[p>>2]=c[q>>2];c[p+4>>2]=c[q+4>>2];c[p+8>>2]=c[q+8>>2];c[p+12>>2]=c[q+12>>2];r=p}else{r=j}j=g|0;p=g+16|0;q=g;vF(g|0,0,16)|0;c[p>>2]=c[q>>2];c[p+4>>2]=c[q+4>>2];c[p+8>>2]=c[q+8>>2];c[p+12>>2]=c[q+12>>2];p=g+32|0;c[p>>2]=c[r>>2];c[p+4>>2]=c[r+4>>2];c[p+8>>2]=c[r+8>>2];c[p+12>>2]=c[r+12>>2];p=g+48|0;c[p>>2]=c[r>>2];c[p+4>>2]=c[r+4>>2];c[p+8>>2]=c[r+8>>2];c[p+12>>2]=c[r+12>>2];_l(b,c[(c[(c[(c[m+8>>2]|0)+8>>2]|0)+4>>2]|0)+12>>2]|0,j,1);if(!o){s=a;c[s>>2]=c[q>>2];c[s+4>>2]=c[q+4>>2];c[s+8>>2]=c[q+8>>2];c[s+12>>2]=c[q+12>>2];i=f;return}si(l,j,n*90|0);n=l;c[q>>2]=c[n>>2];c[q+4>>2]=c[n+4>>2];c[q+8>>2]=c[n+8>>2];c[q+12>>2]=c[n+12>>2];s=a;c[s>>2]=c[q>>2];c[s+4>>2]=c[q+4>>2];c[s+8>>2]=c[q+8>>2];c[s+12>>2]=c[q+12>>2];i=f;return}function Al(a,b){a=a|0;b=b|0;var d=0,e=0,f=0.0,g=0.0,j=0.0;d=i;e=b;b=i;i=i+16|0;c[b>>2]=c[e>>2];c[b+4>>2]=c[e+4>>2];c[b+8>>2]=c[e+8>>2];c[b+12>>2]=c[e+12>>2];f=+h[b>>3]/1.902113032590307;g=+h[b+8>>3]/1.1180339887498947;j=(f>g?f:g)*.9510565162951535*.8090169943749475/.29389262614623657;h[a>>3]=j*2.0*.9510565162951535;h[a+8>>3]=j*1.8090169943749475;i=d;return}function Bl(a,b){a=a|0;b=b|0;var c=0,d=0.0,e=0,f=0.0,g=0.0,i=0.0,j=0.0,k=0.0;c=b|0;d=+h[c>>3];e=b+8|0;f=+h[e>>3];g=f/d;do{if(g>.9510565162951536){i=f;j=f/.9510565162951536}else{if(g>=.9510565162951536){i=f;j=d;break}i=d*.9510565162951536;j=d}}while(0);d=j/1.902113032590307;f=d*.9510565162951535;g=f*.30901699437494745/.7694208842938134;k=d*.19098300562505266*.5;h[a>>3]=f;h[a+8>>3]=d*.3090169943749474-k;h[a+16>>3]=g*.5877852522924732;h[a+24>>3]=g*.8090169943749473-k;h[a+32>>3]=d*6.123233995736766e-17;h[a+40>>3]=d-k;h[a+48>>3]=g*-.587785252292473;h[a+56>>3]=g*.8090169943749475-k;h[a+64>>3]=d*-.9510565162951535;h[a+72>>3]=d*.3090169943749475-k;h[a+80>>3]=g*-.9510565162951536;h[a+88>>3]=g*-.3090169943749473-k;h[a+96>>3]=d*-.5877852522924732;h[a+104>>3]=d*-.8090169943749473-k;h[a+112>>3]=g*-1.8369701987210297e-16;h[a+120>>3]=g*-1.0-k;h[a+128>>3]=d*.5877852522924729;h[a+136>>3]=d*-.8090169943749476-k;h[a+144>>3]=g*.9510565162951535;h[a+152>>3]=g*-.3090169943749476-k;h[c>>3]=j;h[e>>3]=i;return}function Cl(a){a=a|0;var b=0;b=c[(c[a+8>>2]|0)+12>>2]|0;if((b|0)==0){return}eF(c[b+44>>2]|0);eF(b);return}function Dl(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;g=i;i=i+56|0;h=g|0;j=g+40|0;k=g+48|0;if((a[e]|0)==0){l=b;c[l>>2]=c[43356];c[l+4>>2]=c[43357];c[l+8>>2]=c[43358];c[l+12>>2]=c[43359];c[l+16>>2]=c[43360];c[l+20>>2]=c[43361];c[l+24>>2]=c[43362];c[l+28>>2]=c[43363];c[l+32>>2]=c[43364];c[l+36>>2]=c[43365];i=g;return}l=(f|0)==0?82448:f;c[j>>2]=15;f=d+8|0;m=c[f>>2]|0;do{if((a[(c[m+104>>2]|0)+82|0]|0)==0){n=m;o=8}else{p=xj(d,e,j)|0;if((p|0)==0){n=c[f>>2]|0;o=8;break}if((xl(d,p,h,l,c[j>>2]|0,0)|0)==0){break}p=$w(d|0)|0;Fv(0,81824,(q=i,i=i+24|0,c[q>>2]=p,c[q+8>>2]=e,c[q+16>>2]=l,q)|0)|0;i=q}}while(0);do{if((o|0)==8){if((c[(c[n+8>>2]|0)+8>>2]|0)==17560){r=0}else{c[k>>2]=d;c[k+4>>2]=0;r=k}if((xl(d,0,h,e,c[j>>2]|0,r)|0)==0){break}l=$w(d|0)|0;Fv(0,81120,(q=i,i=i+16|0,c[q>>2]=l,c[q+8>>2]=e,q)|0)|0;i=q}}while(0);q=b;b=h;c[q>>2]=c[b>>2];c[q+4>>2]=c[b+4>>2];c[q+8>>2]=c[b+8>>2];c[q+12>>2]=c[b+12>>2];c[q+16>>2]=c[b+16>>2];c[q+20>>2]=c[b+20>>2];c[q+24>>2]=c[b+24>>2];c[q+28>>2]=c[b+28>>2];c[q+32>>2]=c[b+32>>2];c[q+36>>2]=c[b+36>>2];i=g;return}function El(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,j=0.0,k=0.0,l=0,m=0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0,v=0;d=i;i=i+16|0;e=b;b=i;i=i+16|0;c[b>>2]=c[e>>2];c[b+4>>2]=c[e+4>>2];c[b+8>>2]=c[e+8>>2];c[b+12>>2]=c[e+12>>2];e=d|0;f=c[a+4>>2]|0;g=c[a>>2]|0;si(e,b,(c[(c[(Hx(g|0)|0)+8>>2]|0)+116>>2]&3)*90|0);j=+h[e>>3];k=+h[e+8>>3];if((f|0)!=0){if(+h[f>>3]>j){l=0;i=d;return l|0}if(j>+h[f+16>>3]|+h[f+8>>3]>k){l=0;i=d;return l|0}l=k<=+h[f+24>>3]|0;i=d;return l|0}if((g|0)==(c[43740]|0)){m=c[43734]|0}else{f=c[(c[g+8>>2]|0)+12>>2]|0;c[43736]=f;c[43732]=c[f+44>>2];e=c[f+8>>2]|0;c[43734]=e;b=da((c[f+4>>2]|0)-1|0,e)|0;c[43738]=(b|0)<0?0:b;c[43740]=g;m=e}if((m|0)<=0){l=1;i=d;return l|0}e=c[43738]|0;g=c[43732]|0;n=+h[21871];o=+h[21872];b=0;f=0;while(1){a=e+f|0;p=+h[g+(a<<4)>>3];q=+h[g+(a<<4)+8>>3];a=((f+4|0)%(m|0)|0)+e|0;r=-0.0-(+h[g+(a<<4)+8>>3]-q);s=+h[g+(a<<4)>>3]-p;t=q*s+p*r;a=((k*s+j*r-t>=0.0^s*o+n*r-t>=0.0)&1)+b|0;u=f+2|0;if((a|0)==2){l=0;v=12;break}if((u|0)<(m|0)){b=a;f=u}else{l=1;v=12;break}}if((v|0)==12){i=d;return l|0}return 0}function Fl(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0;e=c[b+8>>2]|0;if((a[(c[e+104>>2]|0)+82|0]|0)==0){h=0;return h|0}if((a[e+145|0]|0)==0){h=0;return h|0}h=zj(b,d,0,f,g)|0;return h|0}function Gl(e,f){e=e|0;f=f|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0.0,B=0.0,C=0.0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0.0,_=0.0,$=0.0,aa=0,ba=0,ca=0;j=i;i=i+48|0;k=j|0;l=j+32|0;m=j+40|0;n=c[e+16>>2]|0;o=n+208|0;p=c[o>>2]|0;if((p|0)==0){if((b[n+260>>1]&1)==0){q=0}else{r=3}}else{r=3}do{if((r|0)==3){if((c[e+152>>2]&4|0)!=0){q=1;break}gB(e,p,c[n+228>>2]|0,c[n+244>>2]|0,c[n+212>>2]|0);q=1}}while(0);p=f+8|0;s=c[p>>2]|0;t=c[s+12>>2]|0;u=c[t+44>>2]|0;v=c[t+8>>2]|0;w=c[t+4>>2]|0;if((c[44090]|0)<(v|0)){t=v+5|0;c[44090]=t;x=c[44092]|0;if((x|0)==0){y=kk(t<<4)|0}else{y=mk(x,t<<4)|0}c[44092]=y;z=c[p>>2]|0}else{z=s}s=(c[z+104>>2]|0)+56|0;y=z+16|0;c[s>>2]=c[y>>2];c[s+4>>2]=c[y+4>>2];c[s+8>>2]=c[y+8>>2];c[s+12>>2]=c[y+12>>2];y=c[p>>2]|0;A=+h[y+32>>3]*72.0;if(A<0.0){B=A+-.5}else{B=A+.5}A=(+h[y+88>>3]+ +h[y+96>>3])/+(~~B|0);B=+h[y+40>>3]*72.0;if(B<0.0){C=B+-.5}else{C=B+.5}B=+h[y+80>>3]/+(~~C|0);y=Hl(e,f)|0;s=l|0;c[s>>2]=0;z=d[(c[p>>2]|0)+117|0]|0;do{if((z&1|0)==0){if((z&2|0)!=0){t=f|0;x=Im(t,c[53592]|0,91912)|0;lB(e,x);nB(e,Im(t,c[53594]|0,91048)|0);D=x;E=0;F=1;break}if((z&8|0)!=0){x=f|0;t=Im(x,c[53638]|0,90552)|0;lB(e,t);nB(e,Im(x,c[53640]|0,89960)|0);D=t;E=0;F=1;break}if((z&4|0)!=0){t=f|0;x=Im(t,c[53576]|0,89400)|0;lB(e,x);nB(e,Im(t,c[53578]|0,89016)|0);D=x;E=0;F=1;break}do{if((y&1|0)==0){x=f|0;if((y&576|0)==0){G=0;H=0;I=x;break}t=Im(x,c[53632]|0,213320)|0;if((a[t]|0)!=0){G=t;H=1;I=x;break}t=Im(x,c[53644]|0,213320)|0;G=(a[t]|0)==0?116344:t;H=1;I=x}else{x=f|0;t=Im(x,c[53632]|0,213320)|0;if((a[t]|0)==0){J=Im(x,c[53644]|0,213320)|0;K=(a[J]|0)==0?116344:J}else{K=t}if((Vh(K,s,m)|0)<<24>>24==0){nB(e,K);G=K;H=1;I=x;break}nB(e,c[s>>2]|0);t=c[l+4>>2]|0;J=Em(x,c[53622]|0,0,0)|0;C=+g[m>>2];if((t|0)==0){oB(e,88552,J,C)}else{oB(e,t,J,C)}G=K;H=(y&2|0)==0?2:3;I=x}}while(0);x=Im(I,c[53644]|0,213320)|0;J=(a[x]|0)!=0?x:88552;lB(e,J);D=J;E=G;F=H}else{J=f|0;x=Im(J,c[53646]|0,93016)|0;lB(e,x);nB(e,Im(J,c[53648]|0,92528)|0);D=x;E=0;F=1}}while(0);H=c[(c[p>>2]|0)+8>>2]|0;do{if((a[H+12|0]|0)==0){L=0;r=40}else{G=c[H>>2]|0;if((a[G]|0)!=99){M=1;r=42;break}L=(Ya(G|0,102208)|0)!=0;r=40}}while(0);do{if((r|0)==40){if((w|0)!=0|F<<24>>24==0|L){M=L;r=42;break}lB(e,88104);N=0;O=1;r=43}}while(0);if((r|0)==42){if((w|0)>0){N=M;O=w;r=43}else{P=F;Q=0;R=M}}if((r|0)==43){M=(v|0)>0;w=(v|0)<3;L=(y&512|0)!=0;H=f|0;G=(y&8|0)==0;I=k|0;K=k|0;m=k+8|0;l=k+24|0;z=k+16|0;x=(y&64|0)==0;J=(y&1024|0)==0;t=(y&2130706444|0)==0;S=F;F=0;while(1){if(M){T=da(F,v)|0;U=c[44092]|0;V=0;do{W=V+T|0;C=+h[u+(W<<4)+8>>3];h[U+(V<<4)>>3]=A*+h[u+(W<<4)>>3]+ +h[(c[p>>2]|0)+16>>3];h[U+(V<<4)+8>>3]=B*C+ +h[(c[p>>2]|0)+24>>3];V=V+1|0;}while((V|0)<(v|0))}do{if(w){do{if(L&(F|0)==0){if((gb(E|0,58)|0)==0){X=S;break}if((Kh(e,c[44092]|0,E)|0)<=1){X=0;break}V=$w(H)|0;Fv(3,87648,(Y=i,i=i+8|0,c[Y>>2]=V,Y)|0)|0;i=Y;X=0}else{X=S}}while(0);qB(e,c[44092]|0,v,X&255);if(G){break}V=c[p>>2]|0;C=+h[V+80>>3]*.75*.5;Z=+h[V+96>>3]*.6614;_=Z+ +h[V+16>>3];$=C+ +h[V+24>>3];h[K>>3]=_;h[m>>3]=$;h[l>>3]=$;h[z>>3]=_-Z*2.0;uB(e,I,2);Z=+h[m>>3]-C*2.0;h[m>>3]=Z;h[l>>3]=Z;uB(e,I,2);}else{if(!x){do{if((F|0)==0){if((Mh(e,c[44092]|0,E,1)|0)<=1){break}V=$w(H)|0;Fv(3,87648,(Y=i,i=i+8|0,c[Y>>2]=V,Y)|0)|0;i=Y}}while(0);rB(e,c[44092]|0,v,0);break}if(!J){lB(e,88104);rB(e,c[44092]|0,v,S&255);lB(e,D);uB(e,(c[44092]|0)+32|0,2);break}V=c[44092]|0;U=S&255;if(t){rB(e,V,v,U);break}else{ol(e,V,v,y,U);break}}}while(0);U=F+1|0;if((U|0)<(O|0)){S=0;F=U}else{P=0;Q=O;R=N;break}}}N=c[(c[p>>2]|0)+8>>2]|0;do{if((a[N+12|0]|0)==0){O=ew(f|0,87160)|0;if((O|0)!=0){aa=O;r=70}}else{O=c[N>>2]|0;if((a[O]|0)!=99){aa=O;r=70;break}if((Ya(O|0,102208)|0)!=0){aa=O;r=70;break}aa=ew(f|0,114736)|0;r=70}}while(0);if((r|0)==70){if((v|0)>0){r=c[44092]|0;N=0;do{Z=+h[u+(N<<4)+8>>3];h[r+(N<<4)>>3]=A*+h[u+(N<<4)>>3]+ +h[(c[p>>2]|0)+16>>3];h[r+(N<<4)+8>>3]=B*Z+ +h[(c[p>>2]|0)+24>>3];N=N+1|0;}while((N|0)<(v|0))}N=P&255;do{if(P<<24>>24==0|R){ba=P}else{if((v|0)<3){do{if((y&512|0)!=0&(Q|0)==0){if((gb(E|0,58)|0)==0){ca=P;break}if((Kh(e,c[44092]|0,E)|0)<=1){ca=0;break}r=$w(f|0)|0;Fv(3,87648,(Y=i,i=i+8|0,c[Y>>2]=r,Y)|0)|0;i=Y;ca=0}else{ca=P}}while(0);qB(e,c[44092]|0,v,ca&255);if((y&8|0)==0){ba=ca;break}r=c[p>>2]|0;B=+h[r+80>>3]*.75*.5;A=+h[r+96>>3]*.6614;u=k|0;Z=A+ +h[r+16>>3];C=B+ +h[r+24>>3];h[k>>3]=Z;r=k+8|0;h[r>>3]=C;O=k+24|0;h[O>>3]=C;h[k+16>>3]=Z-A*2.0;uB(e,u,2);A=+h[r>>3]-B*2.0;h[r>>3]=A;h[O>>3]=A;uB(e,u,2);ba=ca;break}if((y&64|0)==0){u=c[44092]|0;if((y&12|0)==0){rB(e,u,v,N);ba=P;break}else{ol(e,u,v,y,N);ba=P;break}}else{if((Mh(e,c[44092]|0,E,1)|0)>1){u=$w(f|0)|0;Fv(3,87648,(Y=i,i=i+8|0,c[Y>>2]=u,Y)|0)|0;i=Y}rB(e,c[44092]|0,v,0);ba=P;break}}}while(0);P=c[44092]|0;wB(e,aa,P,v,ba,Hm(f|0,c[53616]|0,86632)|0)}eF(c[s>>2]|0);ek(e,10,c[(c[p>>2]|0)+104>>2]|0);if(!q){i=j;return}if((c[e+152>>2]&4|0)!=0){gB(e,c[o>>2]|0,c[n+228>>2]|0,c[n+244>>2]|0,c[n+212>>2]|0)}hB(e);i=j;return}function Hl(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+8|0;f=e|0;g=Il(d,f)|0;if((g|0)!=0){pB(b,g)}g=c[53600]|0;do{if((g|0)!=0){h=d|0;j=fw(h,g)|0;if((j|0)==0){break}if((a[j]|0)==0){break}xB(b,+Fm(h,c[53600]|0,1.0,0.0))}}while(0);i=e;return c[f>>2]|0}function Il(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0.0,x=0.0,y=0,z=0,A=0;e=Im(b|0,c[53582]|0,213320)|0;a:do{if((a[e]|0)==0){f=0;g=0}else{i=Yh(e)|0;j=c[i>>2]|0;if((j|0)==0){f=i;g=0;break}k=b+8|0;l=0;m=i;n=j;while(1){j=a[n]|0;b:do{switch(j<<24>>24){case 114:{if((Ya(n|0,84864)|0)==0){o=m;while(1){p=o+4|0;q=c[p>>2]|0;c[o>>2]=q;if((q|0)==0){break}else{o=p}}r=m;s=l|4;break b}if((Ya(n|0,83656)|0)==0){t=m}else{u=21;break b}while(1){o=t+4|0;p=c[o>>2]|0;c[t>>2]=p;if((p|0)==0){break}else{t=o}}r=m;s=l|3;break};case 100:{if((Ya(n|0,84432)|0)==0){v=m}else{u=37;break b}while(1){o=v+4|0;p=c[o>>2]|0;c[v>>2]=p;if((p|0)==0){break}else{v=o}}r=m;s=l|8;break};case 105:{if((Ya(n|0,84048)|0)!=0){u=21;break b}r=m+4|0;s=l|32;break};case 115:{u=22;break};case 119:{u=33;break};case 102:{if((Ya(n|0,85312)|0)!=0){u=21;break b}r=m+4|0;s=l|1;break};default:{u=37}}}while(0);if((u|0)==21){u=0;if((j<<24>>24|0)==115){u=22}else if((j<<24>>24|0)==119){u=33}else{u=37}}c:do{if((u|0)==22){u=0;if((Ya(n|0,83248)|0)!=0){u=37;break}o=c[(c[(c[k>>2]|0)+8>>2]|0)+8>>2]|0;do{if((o|0)!=0){if((c[o+8>>2]|0)!=4){break}w=+h[o+16>>3];if(w<0.0){x=w+-.5}else{x=w+.5}if(((~~x|0)%90|0|0)!=0){break}if(+h[o+24>>3]!=0.0){break}if(+h[o+32>>3]==0.0){y=m}else{break}while(1){p=y+4|0;q=c[p>>2]|0;c[y>>2]=q;if((q|0)==0){break}else{y=p}}r=m;s=l|64;break c}}while(0);if(j<<24>>24==119){u=33}else{u=37}}}while(0);do{if((u|0)==33){u=0;if((Ya(n|0,82832)|0)!=0){u=37;break}j=c[(c[(c[k>>2]|0)+8>>2]|0)+8>>2]|0;if((j|0)==0){u=37;break}if((c[j+8>>2]|0)<3){z=m}else{u=37;break}while(1){j=z+4|0;o=c[j>>2]|0;c[z>>2]=o;if((o|0)==0){break}else{z=j}}r=m;s=l|512}}while(0);if((u|0)==37){u=0;r=m+4|0;s=l}j=c[r>>2]|0;if((j|0)==0){f=i;g=s;break a}else{l=s;m=r;n=j}}}}while(0);r=c[(c[(c[b+8>>2]|0)+8>>2]|0)+8>>2]|0;if((r|0)==0){A=g;c[d>>2]=A;return f|0}A=c[r+40>>2]|g;c[d>>2]=A;return f|0}function Jl(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0.0,j=0.0,k=0.0,l=0;d=i;i=i+16|0;e=b;b=i;i=i+16|0;c[b>>2]=c[e>>2];c[b+4>>2]=c[e+4>>2];c[b+8>>2]=c[e+8>>2];c[b+12>>2]=c[e+12>>2];e=d|0;f=c[a>>2]|0;si(e,b,(c[(c[(Hx(f|0)|0)+8>>2]|0)+116>>2]&3)*90|0);g=+h[e>>3];j=+h[e+8>>3];e=c[f+8>>2]|0;k=+h[e+80>>3]*.5;if(j<-0.0-k|j>k){l=0;i=d;return l|0}if(g<-0.0- +h[e+88>>3]){l=0;i=d;return l|0}l=g<=+h[e+96>>3]|0;i=d;return l|0}function Kl(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0.0;e=i;f=c[a+16>>2]|0;g=f+208|0;j=c[g>>2]|0;if((j|0)==0){k=(b[f+260>>1]&1)!=0}else{k=1}l=d+8|0;d=c[l>>2]|0;m=c[d+12>>2]|0;if((m|0)==0){i=e;return}if(k){if((c[a+152>>2]&4|0)==0){gB(a,j,c[f+228>>2]|0,c[f+244>>2]|0,c[f+212>>2]|0)}n=c[l>>2]|0}else{n=d}d=m+4|0;o=+h[n+24>>3]+ +(c[d+4>>2]|0);j=c[m>>2]|0;gc(c[a+36>>2]|0,80576,(m=i,i=i+24|0,h[m>>3]=+h[n+16>>3]+ +(c[d>>2]|0),h[m+8>>3]=o,c[m+16>>2]=j,m)|0)|0;i=m;m=c[l>>2]|0;j=(c[m+104>>2]|0)+56|0;d=m+16|0;c[j>>2]=c[d>>2];c[j+4>>2]=c[d+4>>2];c[j+8>>2]=c[d+8>>2];c[j+12>>2]=c[d+12>>2];ek(a,10,c[(c[l>>2]|0)+104>>2]|0);if(!k){i=e;return}if((c[a+152>>2]&4|0)!=0){gB(a,c[g>>2]|0,c[f+228>>2]|0,c[f+244>>2]|0,c[f+212>>2]|0)}hB(a);i=e;return}function Ll(a){a=a|0;Sl(c[(c[a+8>>2]|0)+12>>2]|0);return}function Ml(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0;h=i;i=i+40|0;j=h|0;if((a[f]|0)==0){k=b;c[k>>2]=c[43356];c[k+4>>2]=c[43357];c[k+8>>2]=c[43358];c[k+12>>2]=c[43359];c[k+16>>2]=c[43360];c[k+20>>2]=c[43361];c[k+24>>2]=c[43362];c[k+28>>2]=c[43363];c[k+32>>2]=c[43364];c[k+36>>2]=c[43365];i=h;return}k=(g|0)==0?82448:g;g=c[(c[e+8>>2]|0)+12>>2]|0;l=Rl(g,f)|0;do{if((l|0)==0){if((xl(e,g+16|0,j,f,15,0)|0)==0){break}m=$w(e|0)|0;Fv(0,81120,(n=i,i=i+16|0,c[n>>2]=m,c[n+8>>2]=f,n)|0)|0;i=n}else{if((xl(e,l+16|0,j,k,d[l+65|0]|0,0)|0)==0){break}m=$w(e|0)|0;Fv(0,81824,(n=i,i=i+24|0,c[n>>2]=m,c[n+8>>2]=f,c[n+16>>2]=k,n)|0)|0;i=n}}while(0);n=b;b=j;c[n>>2]=c[b>>2];c[n+4>>2]=c[b+4>>2];c[n+8>>2]=c[b+8>>2];c[n+12>>2]=c[b+12>>2];c[n+16>>2]=c[b+16>>2];c[n+20>>2]=c[b+20>>2];c[n+24>>2]=c[b+24>>2];c[n+28>>2]=c[b+28>>2];c[n+32>>2]=c[b+32>>2];c[n+36>>2]=c[b+36>>2];i=h;return}function Nl(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0.0,p=0;d=i;i=i+16|0;e=b;b=i;i=i+16|0;c[b>>2]=c[e>>2];c[b+4>>2]=c[e+4>>2];c[b+8>>2]=c[e+8>>2];c[b+12>>2]=c[e+12>>2];e=d|0;f=c[a+4>>2]|0;g=c[a>>2]|0;si(e,b,(c[(c[(Hx(g|0)|0)+8>>2]|0)+116>>2]&3)*90|0);a=b;j=e;c[a>>2]=c[j>>2];c[a+4>>2]=c[j+4>>2];c[a+8>>2]=c[j+8>>2];c[a+12>>2]=c[j+12>>2];if((f|0)==0){j=c[(c[g+8>>2]|0)+12>>2]|0;k=j+16|0;l=j+24|0;m=j+32|0;n=j+40|0}else{k=f;l=f+8|0;m=f+16|0;n=f+24|0}o=+h[b>>3];if(+h[k>>3]>o){p=0;i=d;return p|0}if(o>+h[m>>3]){p=0;i=d;return p|0}o=+h[b+8>>3];if(+h[l>>3]>o){p=0;i=d;return p|0}p=o<=+h[n>>3]|0;i=d;return p|0}function Ol(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0.0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0.0,v=0.0,w=0;j=i;i=i+32|0;k=j|0;if((a[d+28|0]|0)==0){l=0;i=j;return l|0}m=+h[d>>3];d=b+8|0;n=c[(c[d>>2]|0)+12>>2]|0;o=n+48|0;if((c[o>>2]|0)<=0){l=e;i=j;return l|0}p=b|0;b=n+56|0;n=0;while(1){q=(c[(c[(Hx(p)|0)+8>>2]|0)+116>>2]&1|0)==0;r=c[(c[b>>2]|0)+(n<<2)>>2]|0;if(q){s=r+16|0;t=r+32|0}else{s=r+24|0;t=r+40|0}u=+(~~+h[s>>3]|0);if(u<=m){v=+(~~+h[t>>3]|0);if(m<=v){break}}r=n+1|0;if((r|0)<(c[o>>2]|0)){n=r}else{l=e;w=14;break}}if((w|0)==14){i=j;return l|0}if((c[(c[(Hx(p)|0)+8>>2]|0)+116>>2]&1|0)==0){h[f>>3]=u+ +h[(c[d>>2]|0)+16>>3];p=c[d>>2]|0;h[f+8>>3]=+h[p+24>>3]- +h[p+80>>3]*.5;h[f+16>>3]=v+ +h[(c[d>>2]|0)+16>>3]}else{ti(k,(c[(c[b>>2]|0)+(n<<2)>>2]|0)+16|0,(c[d>>2]|0)+16|0);n=f;b=k;c[n>>2]=c[b>>2];c[n+4>>2]=c[b+4>>2];c[n+8>>2]=c[b+8>>2];c[n+12>>2]=c[b+12>>2];c[n+16>>2]=c[b+16>>2];c[n+20>>2]=c[b+20>>2];c[n+24>>2]=c[b+24>>2];c[n+28>>2]=c[b+28>>2]}b=c[d>>2]|0;h[f+24>>3]=+h[b+24>>3]+ +h[b+80>>3]*.5;c[g>>2]=1;l=e;i=j;return l|0}function Pl(d,e){d=d|0;e=e|0;var f=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0.0,C=0;f=i;i=i+112|0;j=f|0;k=f+32|0;l=f+96|0;m=f+104|0;n=c[d+16>>2]|0;o=n+208|0;if((c[o>>2]|0)==0){p=(b[n+260>>1]&1)!=0}else{p=1}q=e+8|0;r=c[q>>2]|0;s=c[r+12>>2]|0;t=s;u=j;v=s+16|0;c[u>>2]=c[v>>2];c[u+4>>2]=c[v+4>>2];c[u+8>>2]=c[v+8>>2];c[u+12>>2]=c[v+12>>2];c[u+16>>2]=c[v+16>>2];c[u+20>>2]=c[v+20>>2];c[u+24>>2]=c[v+24>>2];c[u+28>>2]=c[v+28>>2];v=r+16|0;s=j|0;h[s>>3]=+h[v>>3]+ +h[s>>3];s=r+24|0;r=j+8|0;h[r>>3]=+h[s>>3]+ +h[r>>3];r=j+16|0;w=r|0;h[w>>3]=+h[v>>3]+ +h[w>>3];w=j+24|0;h[w>>3]=+h[s>>3]+ +h[w>>3];do{if(p){if((c[d+152>>2]&4|0)!=0){break}gB(d,c[o>>2]|0,c[n+228>>2]|0,c[n+244>>2]|0,c[n+212>>2]|0)}}while(0);w=Hl(d,e)|0;s=e|0;v=Im(s,c[53644]|0,213320)|0;lB(d,(a[v]|0)!=0?v:88552);do{if((w&1|0)==0){x=0}else{v=Im(s,c[53632]|0,213320)|0;if((a[v]|0)==0){y=Im(s,c[53644]|0,213320)|0;z=(a[y]|0)==0?116344:y}else{z=v}v=l|0;if((Vh(z,v,m)|0)<<24>>24==0){nB(d,z);x=1;break}nB(d,c[v>>2]|0);y=c[l+4>>2]|0;A=Em(s,c[53622]|0,0,0)|0;B=+g[m>>2];if((y|0)==0){oB(d,88552,A,B)}else{oB(d,y,A,B)}eF(c[v>>2]|0);x=w>>>1&1|2}}while(0);m=c[c[(c[q>>2]|0)+8>>2]>>2]|0;if((a[m]|0)==77){q=(Ya(m|0,93976)|0)==0;C=q?w|4:w}else{C=w}if((C&2130706444|0)==0){sB(d,j,x)}else{j=k;c[j>>2]=c[u>>2];c[j+4>>2]=c[u+4>>2];c[j+8>>2]=c[u+8>>2];c[j+12>>2]=c[u+12>>2];u=k+32|0;j=u;w=r;c[j>>2]=c[w>>2];c[j+4>>2]=c[w+4>>2];c[j+8>>2]=c[w+8>>2];c[j+12>>2]=c[w+12>>2];h[k+16>>3]=+h[u>>3];h[k+24>>3]=+h[k+8>>3];h[k+48>>3]=+h[k>>3];h[k+56>>3]=+h[k+40>>3];ol(d,k|0,4,C,x)}Ql(d,e,t);if(!p){i=f;return}if((c[d+152>>2]&4|0)!=0){gB(d,c[o>>2]|0,c[n+228>>2]|0,c[n+244>>2]|0,c[n+212>>2]|0)}hB(d);i=f;return}function Ql(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0.0,p=0.0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0;f=i;i=i+32|0;g=f|0;j=e+52|0;k=c[j>>2]|0;if((k|0)==0){l=d+8|0}else{m=d+8|0;n=c[m>>2]|0;o=(+h[e+24>>3]+ +h[e+40>>3])*.5+ +h[n+24>>3];h[k+56>>3]=(+h[e+16>>3]+ +h[e+32>>3])*.5+ +h[n+16>>3];h[k+64>>3]=o;ek(b,10,c[j>>2]|0);j=Im(d|0,c[53644]|0,213320)|0;lB(b,(a[j]|0)!=0?j:88552);l=m}m=c[l>>2]|0;o=+h[m+16>>3];p=+h[m+24>>3];m=e+48|0;if((c[m>>2]|0)<=0){i=f;return}l=e+64|0;j=e+56|0;e=g+16|0;k=g|0;n=g+24|0;q=g+8|0;r=g|0;s=g+16|0;t=g;g=0;do{if((g|0)>0){u=(c[j>>2]|0)+(g<<2)|0;v=c[u>>2]|0;if((a[l]|0)==0){w=v+32|0;c[e>>2]=c[w>>2];c[e+4>>2]=c[w+4>>2];c[e+8>>2]=c[w+8>>2];c[e+12>>2]=c[w+12>>2];x=+h[(c[u>>2]|0)+16>>3];h[k>>3]=x;y=+h[n>>3];h[q>>3]=y;z=x;A=y;B=+h[s>>3];C=y}else{w=v+16|0;c[t>>2]=c[w>>2];c[t+4>>2]=c[w+4>>2];c[t+8>>2]=c[w+8>>2];c[t+12>>2]=c[w+12>>2];y=+h[k>>3];h[s>>3]=y;x=+h[(c[u>>2]|0)+40>>3];h[n>>3]=x;z=y;A=+h[q>>3];B=y;C=x}h[k>>3]=o+z;h[q>>3]=p+A;h[s>>3]=o+B;h[n>>3]=p+C;uB(b,r,2)}Ql(b,d,c[(c[j>>2]|0)+(g<<2)>>2]|0);g=g+1|0;}while((g|0)<(c[m>>2]|0));i=f;return}function Rl(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;e=c[b+60>>2]|0;do{if((e|0)!=0){if((a[e]|0)!=(a[d]|0)){break}if((Ya(e|0,d|0)|0)==0){f=b}else{break}return f|0}}while(0);e=c[b+48>>2]|0;if((e|0)<=0){f=0;return f|0}g=c[b+56>>2]|0;b=0;while(1){h=Rl(c[g+(b<<2)>>2]|0,d)|0;i=b+1|0;if((h|0)!=0){f=h;j=8;break}if((i|0)<(e|0)){b=i}else{f=0;j=8;break}}if((j|0)==8){return f|0}return 0}function Sl(a){a=a|0;var b=0,d=0,e=0;b=a+48|0;d=a+56|0;if((c[b>>2]|0)>0){e=0;do{Sl(c[(c[d>>2]|0)+(e<<2)>>2]|0);e=e+1|0;}while((e|0)<(c[b>>2]|0))}eF(c[a+60>>2]|0);dk(c[a+52>>2]|0);eF(c[d>>2]|0);eF(a);return}function Tl(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0.0,j=0.0,k=0.0,l=0.0,m=0;d=i;i=i+16|0;e=b;b=i;i=i+16|0;c[b>>2]=c[e>>2];c[b+4>>2]=c[e+4>>2];c[b+8>>2]=c[e+8>>2];c[b+12>>2]=c[e+12>>2];e=d|0;f=c[a>>2]|0;si(e,b,(c[(c[(Hx(f|0)|0)+8>>2]|0)+116>>2]&3)*90|0);g=+h[e>>3];j=+h[e+8>>3];if((f|0)==(c[44094]|0)){k=+h[1813]}else{e=c[(c[f+8>>2]|0)+12>>2]|0;b=(c[e+4>>2]<<1)-2|0;l=+h[(c[e+44>>2]|0)+(((b|0)<0?1:b|1)<<4)>>3];h[1813]=l;c[44094]=f;k=l}if(+S(+g)>k){m=0;i=d;return m|0}if(+S(+j)>k){m=0;i=d;return m|0}k=+cb(+g,+j);m=k<=+h[1813]|0;i=d;return m|0}function Ul(e,f){e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0.0,z=0;g=i;i=i+8|0;j=g|0;k=c[e+16>>2]|0;l=k+208|0;m=c[l>>2]|0;if((m|0)==0){if((b[k+260>>1]&1)==0){n=0}else{o=3}}else{o=3}do{if((o|0)==3){if((c[e+152>>2]&4|0)!=0){n=1;break}gB(e,m,c[k+228>>2]|0,c[k+244>>2]|0,c[k+212>>2]|0);n=1}}while(0);m=f+8|0;p=c[(c[m>>2]|0)+12>>2]|0;q=c[p+44>>2]|0;r=c[p+8>>2]|0;s=c[p+4>>2]|0;if((c[44096]|0)<(r|0)){p=r+2|0;c[44096]=p;t=c[44098]|0;if((t|0)==0){u=kk(p<<4)|0}else{u=mk(t,p<<4)|0}c[44098]=u}Il(f,j)|0;if((c[j>>2]&32|0)==0){pB(e,14492)}else{pB(e,14488)}j=d[(c[m>>2]|0)+117|0]|0;do{if((j&1|0)==0){if((j&2|0)!=0){u=f|0;lB(e,Im(u,c[53592]|0,91912)|0);p=Im(u,c[53594]|0,91048)|0;nB(e,p);v=p;break}if((j&8|0)!=0){p=f|0;lB(e,Im(p,c[53638]|0,90552)|0);u=Im(p,c[53640]|0,89960)|0;nB(e,u);v=u;break}u=f|0;if((j&4|0)!=0){lB(e,Im(u,c[53576]|0,89400)|0);p=Im(u,c[53578]|0,89016)|0;nB(e,p);v=p;break}p=Im(u,c[53632]|0,213320)|0;if((a[p]|0)==0){t=Im(u,c[53644]|0,213320)|0;w=(a[t]|0)==0?88552:t}else{w=p}nB(e,w);p=Im(u,c[53644]|0,213320)|0;lB(e,(a[p]|0)!=0?p:88552);v=w}else{p=f|0;lB(e,Im(p,c[53646]|0,93016)|0);u=Im(p,c[53648]|0,92528)|0;nB(e,u);v=u}}while(0);do{if((s|0)==0){if((a[v]|0)==0){x=1;o=28;break}lB(e,v);x=1;o=28}else{if((s|0)>0){x=s;o=28}}}while(0);if((o|0)==28){o=(r|0)>0;s=0;v=1;while(1){if(o){f=da(s,r)|0;w=c[44098]|0;j=0;while(1){u=j+f|0;y=+h[q+(u<<4)+8>>3];h[w+(j<<4)>>3]=+h[q+(u<<4)>>3]+ +h[(c[m>>2]|0)+16>>3];h[w+(j<<4)+8>>3]=y+ +h[(c[m>>2]|0)+24>>3];u=j+1|0;if((u|0)<(r|0)){j=u}else{z=w;break}}}else{z=c[44098]|0}qB(e,z,r,v);w=s+1|0;if((w|0)<(x|0)){s=w;v=0}else{break}}}if(!n){i=g;return}if((c[e+152>>2]&4|0)!=0){gB(e,c[l>>2]|0,c[k+228>>2]|0,c[k+244>>2]|0,c[k+212>>2]|0)}hB(e);i=g;return}function Vl(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,j=0.0,k=0.0,l=0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0;d=i;i=i+16|0;e=b;b=i;i=i+16|0;c[b>>2]=c[e>>2];c[b+4>>2]=c[e+4>>2];c[b+8>>2]=c[e+8>>2];c[b+12>>2]=c[e+12>>2];e=d|0;f=c[a+4>>2]|0;g=c[a>>2]|0;a=g|0;si(e,b,(c[(c[(Hx(a)|0)+8>>2]|0)+116>>2]&3)*90|0);j=+h[e>>3];k=+h[e+8>>3];if((f|0)!=0){if(+h[f>>3]>j){l=0;i=d;return l|0}if(j>+h[f+16>>3]|+h[f+8>>3]>k){l=0;i=d;return l|0}l=k<=+h[f+24>>3]|0;i=d;return l|0}if((g|0)==(c[44082]|0)){m=+h[1805];n=+h[1804];o=+h[1807]}else{f=g+8|0;e=c[(c[f>>2]|0)+12>>2]|0;c[44078]=e;c[44074]=c[e+44>>2];c[44076]=c[e+8>>2];e=(c[(c[(Hx(a)|0)+8>>2]|0)+116>>2]&1|0)==0;a=c[f>>2]|0;p=+h[a+88>>3]+ +h[a+96>>3];if(e){h[1803]=p;q=+h[(c[f>>2]|0)+80>>3];h[1802]=q;r=p;s=q}else{h[1802]=p;q=+h[(c[f>>2]|0)+80>>3];h[1803]=q;r=q;s=p}if(r==0.0){h[1803]=1.0;t=1.0}else{t=r}if(s==0.0){h[1802]=1.0;u=1.0}else{u=s}s=+h[(c[f>>2]|0)+32>>3]*72.0;if(s<0.0){v=s+-.5}else{v=s+.5}s=+(~~v|0)/t;h[1805]=s;t=+h[(c[f>>2]|0)+40>>3]*72.0;if(t<0.0){w=t+-.5}else{w=t+.5}t=+(~~w|0)/u;h[1804]=t;u=+h[(c[f>>2]|0)+32>>3]*72.0;if(u<0.0){x=u+-.5}else{x=u+.5}u=+(~~x|0)*.5;h[1807]=u;x=+h[(c[f>>2]|0)+40>>3]*72.0;if(x<0.0){y=x+-.5}else{y=x+.5}h[1806]=+(~~y|0)*.5;f=da((c[(c[44078]|0)+4>>2]|0)-1|0,c[44076]|0)|0;c[44080]=(f|0)<0?0:f;c[44082]=g;m=s;n=t;o=u}u=j*m;m=k*n;if(+S(+u)>o){l=0;i=d;return l|0}n=+S(+m);k=+h[1806];if(n>k){l=0;i=d;return l|0}g=c[44076]|0;if((g|0)<3){l=+cb(+(u/o),+(m/k))<1.0|0;i=d;return l|0}f=(c[44084]|0)%(g|0)|0;e=(f+1|0)%(g|0)|0;a=c[44080]|0;b=a+f|0;z=c[44074]|0;k=+h[z+(b<<4)>>3];o=+h[z+(b<<4)+8>>3];b=a+e|0;n=+h[z+(b<<4)>>3];j=+h[z+(b<<4)+8>>3];t=+h[22043];s=+h[22044];y=-0.0-(j-o);x=n-k;w=o*x+k*y;if(m*x+u*y-w>=0.0^x*s+t*y-w>=0.0){l=0;i=d;return l|0}w=-0.0-(s-j);y=t-n;x=j*y+n*w;b=m*y+u*w-x>=0.0^o*y+k*w-x>=0.0;do{if(!b){x=-0.0-(o-s);w=k-t;y=w*s+t*x;if(m*w+u*x-y>=0.0^j*w+n*x-y>=0.0){break}else{l=1}i=d;return l|0}}while(0);a:do{if((g|0)>1){A=1;B=e;C=f;while(1){if(b){D=(C-1+g|0)%(g|0)|0;E=C}else{D=B;E=(B+1|0)%(g|0)|0}F=a+D|0;G=a+E|0;n=+h[z+(F<<4)>>3];j=+h[z+(F<<4)+8>>3];k=-0.0-(+h[z+(G<<4)+8>>3]-j);o=+h[z+(G<<4)>>3]-n;y=j*o+n*k;G=A+1|0;if(m*o+u*k-y>=0.0^s*o+t*k-y>=0.0){break}if((G|0)<(g|0)){A=G;B=E;C=D}else{H=D;break a}}c[44084]=D;l=0;i=d;return l|0}else{H=f}}while(0);c[44084]=H;l=1;i=d;return l|0}function Wl(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0;g=jk(72)|0;i=g;j=c[(c[b+8>>2]|0)+104>>2]|0;k=0;l=1;m=c[43784]|0;while(1){n=a[m]|0;if((n<<24>>24|0)==92){o=m+1|0;p=a[o]|0;if((p<<24>>24|0)==92|(p<<24>>24|0)==123|(p<<24>>24|0)==125|(p<<24>>24|0)==124){q=k;r=l;s=o}else{t=o;u=p;v=4}}else if((n<<24>>24|0)==0){w=l;break}else{t=m;u=n;v=4}if((v|0)==4){v=0;if((u<<24>>24|0)==123){x=k+1|0;y=l}else if((u<<24>>24|0)==124){x=k;y=((k|0)==0)+l|0}else if((u<<24>>24|0)==125){x=k-1|0;y=l}else{x=k;y=l}if((x|0)<0){w=y;break}else{q=x;r=y;s=t}}k=q;l=r;m=s+1|0}s=g+56|0;c[s>>2]=jk(w<<2)|0;a[g+64|0]=d;w=(d|0)==0|0;d=j+82|0;m=f+1|0;r=(e|0)==0;e=b|0;l=j+16|0;q=j+4|0;k=j+8|0;j=0;t=0;y=0;x=0;u=0;n=f;p=0;o=f;z=0;a:while(1){A=j;B=t;C=x;D=u;E=n;F=p;G=o;H=z;while(1){I=A;J=B;K=C;L=0;M=D;N=E;O=F;P=G;b:while(1){Q=I;R=K;S=L;T=M;U=O;c:while(1){V=Q;W=R;X=S;Y=U;d:while(1){Z=V;_=W;e:while(1){if(y){v=81;break a}$=c[43784]|0;aa=a[$]|0;switch(aa<<24>>24|0){case 92:{v=56;break c;break};case 60:{break d;break};case 125:case 124:case 0:{break b;break};case 123:{break};case 62:{break e;break};default:{ba=J;ca=_;da=P;ea=$;break c}}fa=$+1|0;c[43784]=fa;if((_|0)!=0){v=33;break a}if((a[fa]|0)==0){v=33;break a}fa=Wl(b,w,0,f)|0;c[(c[s>>2]|0)+(Z<<2)>>2]=fa;if((fa|0)==0){v=36;break a}else{Z=Z+1|0;_=4}}if((a[d]|0)!=0){ba=J;ca=_;da=P;ea=$;break c}if((_&16|0)==0){v=25;break a}do{if(Y>>>0>m>>>0){fa=Y-1|0;if((fa|0)==(T|0)){ga=Y;break}ga=(a[fa]|0)==32?fa:Y}else{ga=Y}}while(0);a[ga]=0;fa=Lb(f|0)|0;c[43784]=(c[43784]|0)+1;V=Z;W=_&-17;X=fa;Y=ga}if((_&6|0)!=0){v=19;break a}if((a[d]|0)!=0){ba=J;ca=_;da=P;ea=$;break}c[43784]=$+1;Q=Z;R=_|18;S=X;T=f;U=f}f:do{if((v|0)==56){v=0;U=$+1|0;switch(a[U]|0){case 123:case 125:case 124:case 60:case 62:{c[43784]=U;ba=J;ca=_;da=P;ea=U;break f;break};case 32:{v=58;break};case 0:{ba=J;ca=_;da=P;ea=$;break f;break};default:{}}do{if((v|0)==58){v=0;if((a[d]|0)!=0){break}c[43784]=U;ba=1;ca=_;da=P;ea=U;break f}}while(0);a[P]=92;U=(c[43784]|0)+1|0;c[43784]=U;ba=J;ca=_|9;da=P+1|0;ea=U}}while(0);if((ca&4|0)!=0){if((a[ea]|0)!=32){v=63;break a}}if((ca&24|0)==0){ha=(a[ea]|0)==32?ca:ca|9}else{ha=ca}do{if((ha&8|0)==0){if((ha&16|0)==0){ia=T;ja=N;ka=Y;la=da;break}U=a[ea]|0;S=(ba|0)==0;do{if(U<<24>>24==32&S){if((Y|0)==(f|0)){ma=f;break}if((a[Y-1|0]|0)==32){ma=Y}else{v=77}}else{v=77}}while(0);if((v|0)==77){v=0;a[Y]=U;ma=Y+1|0}ia=S?T:ma-1|0;ja=N;ka=ma;la=da}else{R=a[ea]|0;Q=(ba|0)==0;do{if(R<<24>>24==32&Q){if((a[da-1|0]|0)!=32){v=71;break}if((a[d]|0)==0){na=da}else{v=71}}else{v=71}}while(0);if((v|0)==71){v=0;a[da]=R;na=da+1|0}ia=T;ja=Q?N:na-1|0;ka=Y;la=na}}while(0);S=(c[43784]|0)+1|0;c[43784]=S;if((a[S]|0)<0){oa=la;pa=S}else{I=Z;J=ba;K=ha;L=X;M=ia;N=ja;O=ka;P=la;continue}while(1){c[43784]=pa+1;S=oa+1|0;a[oa]=a[pa]|0;U=c[43784]|0;if((a[U]|0)<0){oa=S;pa=U}else{I=Z;J=ba;K=ha;L=X;M=ia;N=ja;O=ka;P=S;continue b}}}if(aa<<24>>24==0&r){v=40;break a}if((_&16|0)!=0){v=40;break a}if((_&4|0)==0){O=jk(72)|0;c[(c[s>>2]|0)+(Z<<2)>>2]=O;qa=Z+1|0;ra=O}else{qa=Z;ra=H}if((X|0)!=0){c[ra+60>>2]=X}if((_&5|0)==0){a[P]=32;sa=_|1;ta=P+1|0}else{sa=_;ta=P}if((sa&1|0)==0){ua=N;va=ta}else{do{if(ta>>>0>m>>>0){O=ta-1|0;if((O|0)==(N|0)){wa=ta;break}wa=(a[O]|0)==32?O:ta}else{wa=ta}}while(0);a[wa]=0;N=Lb(f|0)|0;c[ra+52>>2]=ak(e,N,(a[d]|0)!=0?2:0,+h[l>>3],c[q>>2]|0,c[k>>2]|0)|0;a[ra+64|0]=1;ua=f;va=f}xa=c[43784]|0;N=a[xa]|0;if((N<<24>>24|0)==0){j=qa;t=J;y=1;x=sa;u=T;n=ua;p=Y;o=va;z=ra;continue a}else if((N<<24>>24|0)==125){v=54;break a}c[43784]=xa+1;A=qa;B=J;C=0;D=T;E=ua;F=Y;G=va;H=ra}}if((v|0)==19){Sl(i);if((X|0)==0){ya=0;return ya|0}eF(X);ya=0;return ya|0}else if((v|0)==25){Sl(i);if((X|0)==0){ya=0;return ya|0}eF(X);ya=0;return ya|0}else if((v|0)==33){Sl(i);if((X|0)==0){ya=0;return ya|0}eF(X);ya=0;return ya|0}else if((v|0)==36){Sl(i);if((X|0)==0){ya=0;return ya|0}eF(X);ya=0;return ya|0}else if((v|0)==40){Sl(i);if((X|0)==0){ya=0;return ya|0}eF(X);ya=0;return ya|0}else if((v|0)==54){c[43784]=xa+1;c[g+48>>2]=qa;ya=i;return ya|0}else if((v|0)==63){Sl(i);if((X|0)==0){ya=0;return ya|0}eF(X);ya=0;return ya|0}else if((v|0)==81){c[g+48>>2]=Z;ya=i;return ya|0}return 0}function Xl(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0.0,o=0.0,p=0,q=0,r=0,s=0,t=0.0,u=0.0,v=0,w=0.0,x=0.0,y=0.0,z=0.0,A=0,B=0.0,C=0.0,D=0.0;f=i;i=i+32|0;g=f|0;j=f+8|0;k=f+16|0;l=c[e+52>>2]|0;do{if((l|0)==0){m=e+48|0;if((c[m>>2]|0)<=0){n=0.0;o=0.0;break}p=e+56|0;q=k|0;r=k+8|0;s=e+64|0;t=0.0;u=0.0;v=0;while(1){Xl(k,d,c[(c[p>>2]|0)+(v<<2)>>2]|0);w=+h[q>>3];x=+h[r>>3];if((a[s]|0)==0){y=u+x;z=t>w?t:w}else{y=u>x?u:x;z=t+w}A=v+1|0;if((A|0)<(c[m>>2]|0)){t=z;u=y;v=A}else{n=y;o=z;break}}}else{u=+h[l+24>>3];t=+h[l+32>>3];if(!(u>0.0|t>0.0)){n=t;o=u;break}v=ew(d|0,78824)|0;if((v|0)==0){n=t+8.0;o=u+16.0;break}m=ac(v|0,168832,(v=i,i=i+16|0,c[v>>2]=g,c[v+8>>2]=j,v)|0)|0;i=v;if((m|0)<=0){n=t+8.0;o=u+16.0;break}w=+h[g>>3]*72.0;if(w<0.0){B=w+-.5}else{B=w+.5}w=u+ +(~~B<<1|0);u=+h[j>>3]*72.0;v=u>=0.0;if((m|0)>1){if(v){C=u+.5}else{C=u+-.5}n=t+ +(~~C<<1|0);o=w;break}else{if(v){D=u+.5}else{D=u+-.5}n=t+ +(~~D<<1|0);o=w;break}}}while(0);h[e>>3]=o;h[e+8>>3]=n;h[b>>3]=o;h[b+8>>3]=n;i=f;return}function Yl(b,d,e,f){b=b|0;d=+d;e=+e;f=f|0;var g=0,i=0.0,j=0,k=0.0,l=0,m=0,n=0.0,o=0,p=0,q=0,r=0.0,s=0.0;g=b|0;i=d- +h[g>>3];j=b+8|0;k=e- +h[j>>3];h[g>>3]=d;h[j>>3]=e;j=b+52|0;g=c[j>>2]|0;if((g|0)!=0&(f|0)==0){l=g+40|0;h[l>>3]=i+ +h[l>>3];l=(c[j>>2]|0)+48|0;h[l>>3]=k+ +h[l>>3]}l=b+48|0;j=c[l>>2]|0;if((j|0)==0){return}g=b+64|0;m=a[g]|0;n=(m<<24>>24==0?k:i)/+(j|0);if((j|0)<=0){return}j=b+56|0;b=0;o=m;while(1){m=c[(c[j>>2]|0)+(b<<2)>>2]|0;p=b+1|0;q=~~(n*+(p|0))-~~(n*+(b|0))|0;if(o<<24>>24==0){r=d;s=+(q|0)+ +h[m+8>>3]}else{r=+(q|0)+ +h[m>>3];s=e}Yl(m,r,s,f);if((p|0)>=(c[l>>2]|0)){break}b=p;o=a[g]|0}return}function Zl(b,d,e,f){b=b|0;d=+d;e=+e;f=f|0;var g=0.0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0.0,q=0.0;a[b+65|0]=f;g=e- +h[b+8>>3];h[b+16>>3]=d;h[b+24>>3]=g;h[b+32>>3]=+h[b>>3]+d;h[b+40>>3]=e;i=c[b+48>>2]|0;j=i-1|0;if((i|0)<1){return}i=(f|0)==0;k=b+56|0;l=b+64|0;g=e;e=d;b=0;while(1){do{if(i){m=0}else{n=(b|0)==0;o=(b|0)==(j|0);if((a[l]|0)==0){if(n){m=o?15:14;break}else{m=o?11:10;break}}else{if(n){m=o?15:13;break}else{m=o?7:5;break}}}}while(0);Zl(c[(c[k>>2]|0)+(b<<2)>>2]|0,e,g,m&f);o=c[(c[k>>2]|0)+(b<<2)>>2]|0;if((a[l]|0)==0){p=e;q=g- +h[o+8>>3]}else{p=e+ +h[o>>3];q=g}if((b|0)<(j|0)){g=q;e=p;b=b+1|0}else{break}}return}function _l(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0;f=i;i=i+176|0;g=f|0;j=f+64|0;k=f+128|0;l=f+144|0;m=f+152|0;n=f+160|0;o=g|0;if(e<<24>>24==0){e=k;p=d+48|0;c[e>>2]=c[p>>2];c[e+4>>2]=c[p+4>>2];c[e+8>>2]=c[p+8>>2];c[e+12>>2]=c[p+12>>2];q=l;r=m;s=o;t=0}else{p=k;e=d;c[p>>2]=c[e>>2];c[p+4>>2]=c[e+4>>2];c[p+8>>2]=c[e+8>>2];c[p+12>>2]=c[e+12>>2];q=m;r=l;s=0;t=o}h[l>>3]=0.0;h[m>>3]=1.0;o=k|0;e=k+8|0;p=k;u=n;v=0;w=+h[o>>3];x=1.0;y=0.0;while(1){z=+h[e>>3];A=(x+y)*.5;Qm(n,d,3,A,s,t);c[p>>2]=c[u>>2];c[p+4>>2]=c[u+4>>2];c[p+8>>2]=c[u+8>>2];c[p+12>>2]=c[u+12>>2];if((Oc[b&255](a,k)|0)<<24>>24==0){B=j;C=g;c[B>>2]=c[C>>2];c[B+4>>2]=c[C+4>>2];c[B+8>>2]=c[C+8>>2];c[B+12>>2]=c[C+12>>2];C=j+16|0;B=g+16|0;c[C>>2]=c[B>>2];c[C+4>>2]=c[B+4>>2];c[C+8>>2]=c[B+8>>2];c[C+12>>2]=c[B+12>>2];B=j+32|0;C=g+32|0;c[B>>2]=c[C>>2];c[B+4>>2]=c[C+4>>2];c[B+8>>2]=c[C+8>>2];c[B+12>>2]=c[C+12>>2];C=j+48|0;B=g+48|0;c[C>>2]=c[B>>2];c[C+4>>2]=c[B+4>>2];c[C+8>>2]=c[B+8>>2];c[C+12>>2]=c[B+12>>2];h[q>>3]=A;D=1}else{h[r>>3]=A;D=v}A=+h[o>>3];E=w-A;if(E<0.0){F=-0.0-E}else{F=E}if(F<=.5){E=z- +h[e>>3];if(E<0.0){G=-0.0-E}else{G=E}if(G<=.5){break}}v=D;w=A;x=+h[m>>3];y=+h[l>>3]}l=d;if(D<<24>>24==0){D=g;c[l>>2]=c[D>>2];c[l+4>>2]=c[D+4>>2];c[l+8>>2]=c[D+8>>2];c[l+12>>2]=c[D+12>>2];D=d+16|0;m=g+16|0;c[D>>2]=c[m>>2];c[D+4>>2]=c[m+4>>2];c[D+8>>2]=c[m+8>>2];c[D+12>>2]=c[m+12>>2];m=d+32|0;D=g+32|0;c[m>>2]=c[D>>2];c[m+4>>2]=c[D+4>>2];c[m+8>>2]=c[D+8>>2];c[m+12>>2]=c[D+12>>2];D=d+48|0;m=g+48|0;c[D>>2]=c[m>>2];c[D+4>>2]=c[m+4>>2];c[D+8>>2]=c[m+8>>2];c[D+12>>2]=c[m+12>>2];i=f;return}else{m=j;c[l>>2]=c[m>>2];c[l+4>>2]=c[m+4>>2];c[l+8>>2]=c[m+8>>2];c[l+12>>2]=c[m+12>>2];m=d+16|0;l=j+16|0;c[m>>2]=c[l>>2];c[m+4>>2]=c[l+4>>2];c[m+8>>2]=c[l+8>>2];c[m+12>>2]=c[l+12>>2];l=d+32|0;m=j+32|0;c[l>>2]=c[m>>2];c[l+4>>2]=c[m+4>>2];c[l+8>>2]=c[m+8>>2];c[l+12>>2]=c[m+12>>2];m=d+48|0;d=j+48|0;c[m>>2]=c[d>>2];c[m+4>>2]=c[d+4>>2];c[m+8>>2]=c[d+8>>2];c[m+12>>2]=c[d+12>>2];i=f;return}}function $l(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0.0;d=i;i=i+24|0;e=d|0;f=d+16|0;g=a+8|0;j=c[g>>2]|0;k=j+8|0;l=c[k>>2]|0;if((l|0)==0){i=d;return}if((c[(c[l+4>>2]|0)+12>>2]|0)==0){i=d;return}c[f>>2]=a;c[f+4>>2]=0;m=+h[j+96>>3];h[e>>3]=+h[b>>3]- +h[j+16>>3];h[e+8>>3]=+h[b+8>>3]- +h[j+24>>3];j=Oc[c[(c[(c[k>>2]|0)+4>>2]|0)+12>>2]&255](f,e)|0;h[(c[g>>2]|0)+96>>3]=m;am(f,a,b,j);i=d;return}function am(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0.0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;f=i;i=i+64|0;g=f|0;j=b+8|0;b=c[j>>2]|0;k=+h[b+96>>3];l=d|0;m=b+16|0;n=g|0;h[n>>3]=+h[l>>3]- +h[m>>3];o=d+8|0;p=b+24|0;q=g+8|0;h[q>>3]=+h[o>>3]- +h[p>>3];r=d+16|0;s=g+16|0;h[s>>3]=+h[r>>3]- +h[m>>3];t=d+24|0;u=g+24|0;h[u>>3]=+h[t>>3]- +h[p>>3];v=d+32|0;w=g+32|0;h[w>>3]=+h[v>>3]- +h[m>>3];x=d+40|0;y=g+40|0;h[y>>3]=+h[x>>3]- +h[p>>3];z=d+48|0;A=g+48|0;h[A>>3]=+h[z>>3]- +h[m>>3];m=d+56|0;d=g+56|0;h[d>>3]=+h[m>>3]- +h[p>>3];_l(a,c[(c[(c[b+8>>2]|0)+4>>2]|0)+12>>2]|0,g|0,e);h[l>>3]=+h[n>>3]+ +h[(c[j>>2]|0)+16>>3];h[o>>3]=+h[q>>3]+ +h[(c[j>>2]|0)+24>>3];h[r>>3]=+h[s>>3]+ +h[(c[j>>2]|0)+16>>3];h[t>>3]=+h[u>>3]+ +h[(c[j>>2]|0)+24>>3];h[v>>3]=+h[w>>3]+ +h[(c[j>>2]|0)+16>>3];h[x>>3]=+h[y>>3]+ +h[(c[j>>2]|0)+24>>3];h[z>>3]=+h[A>>3]+ +h[(c[j>>2]|0)+16>>3];h[m>>3]=+h[d>>3]+ +h[(c[j>>2]|0)+24>>3];h[(c[j>>2]|0)+96>>3]=k;i=f;return}function bm(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;e=b+8|0;b=c[e>>2]|0;if((a[b+112|0]|0)==0){f=e;g=b}else{e=b;while(1){b=(c[e+116>>2]|0)+8|0;h=c[b>>2]|0;if((a[h+112|0]|0)==0){f=b;g=h;break}else{e=h}}}if((c[g+8>>2]|0)==0){e=jk(40)|0;c[(c[f>>2]|0)+8>>2]=e;i=c[f>>2]|0}else{i=g}g=c[i+8>>2]|0;i=c[g>>2]|0;if((i|0)==0){j=kk(((c[g+4>>2]|0)*48|0)+48|0)|0}else{j=mk(i,((c[g+4>>2]|0)*48|0)+48|0)|0}c[c[(c[f>>2]|0)+8>>2]>>2]=j;j=(c[(c[f>>2]|0)+8>>2]|0)+4|0;g=c[j>>2]|0;c[j>>2]=g+1;j=c[c[(c[f>>2]|0)+8>>2]>>2]|0;f=j+(g*48|0)|0;c[f>>2]=jk(d<<4)|0;c[j+(g*48|0)+4>>2]=d;vF(j+(g*48|0)+8|0,0,40)|0;return f|0}function cm(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0.0,M=0.0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0;j=i;i=i+104|0;k=j|0;l=j+8|0;m=j+16|0;n=j+32|0;o=j+40|0;p=b;q=b+32|0;r=c[((c[p>>2]&3|0)==3?b:q)+28>>2]|0;s=Hx(r|0)|0;t=bm(b,f)|0;u=b+8|0;v=c[u>>2]|0;if((a[v+112|0]|0)==0){w=b;x=v}else{y=v;do{z=c[y+116>>2]|0;y=c[z+8>>2]|0;}while((a[y+112|0]|0)!=0);w=z;x=y}y=g+8|0;do{if((a[y]|0)==0){z=c[r+8>>2]|0;v=c[d+8>>2]|0;if((c[z+232>>2]|0)!=(c[v+232>>2]|0)){A=d;B=r;break}C=(c[z+236>>2]|0)>(c[v+236>>2]|0);A=C?r:d;B=C?d:r}else{A=d;B=r}}while(0);if((B|0)==(c[((c[w>>2]&3|0)==3?w:w+32|0)+28>>2]|0)){D=x+80|0;E=x+40|0;F=x+56|0;G=x+16|0}else{D=x+40|0;E=x+80|0;F=x+16|0;G=x+56|0}x=a[F+30|0]|0;F=c[D>>2]|0;D=c[E>>2]|0;do{if((a[G+30|0]|0)==0){H=0}else{E=B+8|0;w=c[(c[E>>2]|0)+8>>2]|0;if((w|0)==0){H=0;break}if((c[(c[w+4>>2]|0)+12>>2]|0)==0){H=0;break}c[n>>2]=B;c[n+4>>2]=D;w=f-4|0;r=m|0;d=m+8|0;C=0;while(1){if((C|0)>=(w|0)){break}v=C+3|0;h[r>>3]=+h[e+(v<<4)>>3]- +h[(c[E>>2]|0)+16>>3];h[d>>3]=+h[e+(v<<4)+8>>3]- +h[(c[E>>2]|0)+24>>3];if((Oc[c[(c[(c[(c[E>>2]|0)+8>>2]|0)+4>>2]|0)+12>>2]&255](n,m)|0)<<24>>24==0){break}else{C=v}}am(n,B,e+(C<<4)|0,1);H=C}}while(0);do{if(x<<24>>24==0){I=25}else{B=A+8|0;D=c[(c[B>>2]|0)+8>>2]|0;if((D|0)==0){I=25;break}if((c[(c[D+4>>2]|0)+12>>2]|0)==0){I=25;break}c[n>>2]=A;c[n+4>>2]=F;D=f-4|0;a:do{if((D|0)>0){G=m|0;E=m+8|0;d=D;while(1){h[G>>3]=+h[e+(d<<4)>>3]- +h[(c[B>>2]|0)+16>>3];h[E>>3]=+h[e+(d<<4)+8>>3]- +h[(c[B>>2]|0)+24>>3];r=d-3|0;if((Oc[c[(c[(c[(c[B>>2]|0)+8>>2]|0)+4>>2]|0)+12>>2]&255](n,m)|0)<<24>>24==0){J=d;break a}if((r|0)>0){d=r}else{J=r;break}}}else{J=D}}while(0);am(n,A,e+(J<<4)|0,0);K=J}}while(0);if((I|0)==25){K=f-4|0}J=f-4|0;f=H;while(1){if((f|0)>=(J|0)){break}H=f+3|0;L=+h[e+(f<<4)>>3]- +h[e+(H<<4)>>3];M=+h[e+(f<<4)+8>>3]- +h[e+(H<<4)+8>>3];if(L*L+M*M<1.0e-6){f=H}else{break}}b:do{if((K|0)>0){J=K;while(1){H=J+3|0;M=+h[e+(J<<4)>>3]- +h[e+(H<<4)>>3];L=+h[e+(J<<4)+8>>3]- +h[e+(H<<4)+8>>3];H=J-3|0;if(M*M+L*L>=1.0e-6){N=J;break b}if((H|0)>0){J=H}else{N=H;break}}}else{N=K}}while(0);K=c[(c[u>>2]|0)+116>>2]|0;if((K|0)==0){O=b}else{u=K;while(1){K=c[(c[u+8>>2]|0)+116>>2]|0;if((K|0)==0){break}else{u=K}}O=u}if((a[y]|0)==0){P=(Ec[c[g>>2]&63](O)|0)&255}else{P=0}ih(O,k,l);y=g+4|0;if((Ec[c[y>>2]&63](A)|0)<<24>>24!=0){c[l>>2]=0}if((Ec[c[y>>2]&63](c[((c[p>>2]&3|0)==3?b:q)+28>>2]|0)|0)<<24>>24!=0){c[k>>2]=0}if((P|0)!=0){P=c[k>>2]|0;c[k>>2]=c[l>>2];c[l>>2]=P}do{if((a[g+9|0]|0)==0){P=c[k>>2]|0;if((P|0)==0){Q=f}else{Q=nh(O,e,f,N,t,P)|0}P=c[l>>2]|0;if((P|0)==0){R=N;S=Q;break}R=lh(O,e,Q,N,t,P)|0;S=Q}else{P=c[l>>2]|0;q=c[k>>2]|0;if((q|P|0)==0){R=N;S=f;break}oh(O,e,f,N,t,q,P);R=N;S=f}}while(0);f=R+4|0;if((S|0)>=(f|0)){T=4-S|0;U=T+R|0;V=t+4|0;c[V>>2]=U;i=j;return}N=t|0;O=o;k=R+3|0;l=o|0;Q=o+16|0;g=o+32|0;P=o+48|0;o=s+8|0;s=S;while(1){q=(c[N>>2]|0)+(s-S<<4)|0;b=e+(s<<4)|0;c[q>>2]=c[b>>2];c[q+4>>2]=c[b+4>>2];c[q+8>>2]=c[b+8>>2];c[q+12>>2]=c[b+12>>2];c[O>>2]=c[b>>2];c[O+4>>2]=c[b+4>>2];c[O+8>>2]=c[b+8>>2];c[O+12>>2]=c[b+12>>2];b=s+1|0;if((s|0)>=(k|0)){I=54;break}q=(c[N>>2]|0)+(b-S<<4)|0;p=e+(b<<4)|0;c[q>>2]=c[p>>2];c[q+4>>2]=c[p+4>>2];c[q+8>>2]=c[p+8>>2];c[q+12>>2]=c[p+12>>2];c[Q>>2]=c[p>>2];c[Q+4>>2]=c[p+4>>2];c[Q+8>>2]=c[p+8>>2];c[Q+12>>2]=c[p+12>>2];p=s+2|0;q=(c[N>>2]|0)+(p-S<<4)|0;b=e+(p<<4)|0;c[q>>2]=c[b>>2];c[q+4>>2]=c[b+4>>2];c[q+8>>2]=c[b+8>>2];c[q+12>>2]=c[b+12>>2];c[g>>2]=c[b>>2];c[g+4>>2]=c[b+4>>2];c[g+8>>2]=c[b+8>>2];c[g+12>>2]=c[b+12>>2];b=s+3|0;q=e+(b<<4)|0;c[P>>2]=c[q>>2];c[P+4>>2]=c[q+4>>2];c[P+8>>2]=c[q+8>>2];c[P+12>>2]=c[q+12>>2];Oh((c[o>>2]|0)+16|0,l);if((b|0)<(f|0)){s=b}else{I=54;break}}if((I|0)==54){T=4-S|0;U=T+R|0;V=t+4|0;c[V>>2]=U;i=j;return}}function dm(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=i;e=b;b=i;i=i+32|0;tF(b,e,32)|0;if(+h[b>>3]>=+h[b+16>>3]){i=d;return}if(+h[b+8>>3]>=+h[b+24>>3]){i=d;return}e=a+80|0;f=c[e>>2]|0;c[e>>2]=f+1;e=(c[a+84>>2]|0)+(f<<5)|0;f=b;c[e>>2]=c[f>>2];c[e+4>>2]=c[f+4>>2];c[e+8>>2]=c[f+8>>2];c[e+12>>2]=c[f+12>>2];c[e+16>>2]=c[f+16>>2];c[e+20>>2]=c[f+20>>2];c[e+24>>2]=c[f+24>>2];c[e+28>>2]=c[f+28>>2];i=d;return}function em(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0.0,u=0,v=0,w=0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0,M=0,N=0,O=0.0,P=0.0,Q=0.0,R=0.0,S=0.0,T=0.0,U=0.0,V=0.0,W=0.0,X=0.0,Y=0,Z=0,_=0,$=0,aa=0;j=i;i=i+40|0;k=j|0;l=d;m=c[l>>2]&3;n=d+32|0;o=c[((m|0)==3?d:n)+28>>2]|0;p=d+8|0;q=(c[p>>2]|0)+16|0;r=q;if((a[r+31|0]|0)!=0){wl(k,o,c[((m|0)==2?d:d-32|0)+28>>2]|0,r);r=q;q=k;c[r>>2]=c[q>>2];c[r+4>>2]=c[q+4>>2];c[r+8>>2]=c[q+8>>2];c[r+12>>2]=c[q+12>>2];c[r+16>>2]=c[q+16>>2];c[r+20>>2]=c[q+20>>2];c[r+24>>2]=c[q+24>>2];c[r+28>>2]=c[q+28>>2];c[r+32>>2]=c[q+32>>2];c[r+36>>2]=c[q+36>>2]}q=o+8|0;r=c[q>>2]|0;k=c[r+8>>2]|0;if((k|0)==0){s=0}else{s=c[(c[k+4>>2]|0)+16>>2]|0}k=c[p>>2]|0;t=+h[r+24>>3]+ +h[k+24>>3];m=b;u=b|0;h[u>>3]=+h[r+16>>3]+ +h[k+16>>3];k=b+8|0;h[k>>3]=t;do{if(g<<24>>24==0){r=c[p>>2]|0;if((a[r+45|0]|0)==0){a[b+29|0]=0;break}else{h[b+16>>3]=+h[r+32>>3];a[b+29|0]=1;break}}else{h[b+16>>3]=+fm(c[((c[l>>2]&3|0)==3?d:n)+28>>2]|0);a[b+29|0]=1}}while(0);c[b+80>>2]=0;c[b+88>>2]=d;b=f+32|0;c[b>>2]=c[m>>2];c[b+4>>2]=c[m+4>>2];c[b+8>>2]=c[m+8>>2];c[b+12>>2]=c[m+12>>2];m=(e|0)==1;do{if(m){if((a[(c[q>>2]|0)+156|0]|0)!=0){v=1;break}b=a[(c[p>>2]|0)+49|0]|0;n=b&255;if(b<<24>>24==0){w=47;break}t=+h[f>>3];x=+h[f+8>>3];y=+h[f+16>>3];z=+h[f+24>>3];do{if((n&4|0)==0){if((n&1|0)!=0){c[f+48>>2]=1;A=+h[k>>3];h[f+56>>3]=t;h[f+64>>3]=x;h[f+72>>3]=y;h[f+80>>3]=z>A?z:A;c[f+52>>2]=1;h[k>>3]=+h[k>>3]+-1.0;break}b=f+48|0;if((n&8|0)==0){c[b>>2]=2;l=c[q>>2]|0;A=+h[l+80>>3];if(A<0.0){B=A+-.5}else{B=A+.5}A=+h[l+24>>3]- +((~~B+1|0)/2|0|0);C=+h[k>>3];h[f+56>>3]=+h[u>>3];h[f+64>>3]=A;h[f+72>>3]=y;h[f+80>>3]=C;c[f+52>>2]=1;h[u>>3]=+h[u>>3]+1.0;break}else{c[b>>2]=8;C=+h[u>>3];b=c[q>>2]|0;A=+h[b+80>>3];if(A<0.0){D=A+-.5}else{D=A+.5}A=+h[b+24>>3]- +((~~D+1|0)/2|0|0);E=+h[k>>3];h[f+56>>3]=t;h[f+64>>3]=A;h[f+72>>3]=C;h[f+80>>3]=E;c[f+52>>2]=1;h[u>>3]=+h[u>>3]+-1.0;break}}else{c[f+48>>2]=4;b=c[q>>2]|0;if(+h[u>>3]<+h[b+16>>3]){E=t+-1.0;C=+h[k>>3];A=+h[b+80>>3];if(A<0.0){F=A+-.5}else{F=A+.5}A=+h[b+24>>3]+ +((~~F+1|0)/2|0|0);G=A+ +((c[(c[(Hx(o|0)|0)+8>>2]|0)+240>>2]|0)/2|0|0);l=c[q>>2]|0;A=+h[l+16>>3]- +h[l+88>>3];H=+h[l+80>>3];if(H<0.0){I=H+-.5}else{I=H+.5}H=+h[l+24>>3]- +((~~I+1|0)/2|0|0);h[f+56>>3]=E;h[f+64>>3]=C;h[f+72>>3]=y;h[f+80>>3]=G;h[f+88>>3]=E;h[f+96>>3]=H;h[f+104>>3]=A;h[f+112>>3]=C}else{C=+h[k>>3];A=y+1.0;H=+h[b+80>>3];if(H<0.0){J=H+-.5}else{J=H+.5}H=+h[b+24>>3]+ +((~~J+1|0)/2|0|0);E=H+ +((c[(c[(Hx(o|0)|0)+8>>2]|0)+240>>2]|0)/2|0|0);b=c[q>>2]|0;H=+h[b+16>>3]+ +h[b+96>>3]+0.0;G=+h[b+80>>3];if(G<0.0){K=G+-.5}else{K=G+.5}G=+h[b+24>>3]- +((~~K+1|0)/2|0|0);h[f+56>>3]=t;h[f+64>>3]=C;h[f+72>>3]=A;h[f+80>>3]=E;h[f+88>>3]=H;h[f+96>>3]=G;h[f+104>>3]=A;h[f+112>>3]=C}h[k>>3]=+h[k>>3]+1.0;c[f+52>>2]=2}}while(0);n=c[p>>2]|0;if((a[n+112|0]|0)==0){L=d;M=n}else{b=n;do{N=c[b+116>>2]|0;b=c[N+8>>2]|0;}while((a[b+112|0]|0)!=0);L=N;M=b}if((o|0)==(c[((c[L>>2]&3|0)==3?L:L+32|0)+28>>2]|0)){a[M+46|0]=0;i=j;return}else{a[M+86|0]=0;i=j;return}}else{w=47}}while(0);do{if((w|0)==47){do{if((e|0)==2){M=a[(c[p>>2]|0)+49|0]|0;L=M&255;if(M<<24>>24==0){break}K=+h[f>>3];J=+h[f+8>>3];I=+h[f+16>>3];F=+h[f+24>>3];do{if((L&4|0)==0){if((L&1|0)!=0){if((c[f+48>>2]|0)==4){M=c[q>>2]|0;D=+h[M+80>>3];if(D<0.0){O=D+-.5}else{O=D+.5}D=+h[M+24>>3]- +((~~O+1|0)/2|0|0);B=I+1.0;t=+h[u>>3];y=D- +((c[(c[(Hx(o|0)|0)+8>>2]|0)+240>>2]|0)/2|0|0);M=c[q>>2]|0;z=+h[M+16>>3]+ +h[M+96>>3]+0.0;x=+h[M+80>>3];if(x<0.0){P=x+-.5}else{P=x+.5}x=+h[M+24>>3]+ +((~~P+1|0)/2|0|0);h[f+56>>3]=t;h[f+64>>3]=y;h[f+72>>3]=B;h[f+80>>3]=D;h[f+88>>3]=z;h[f+96>>3]=D;h[f+104>>3]=B;h[f+112>>3]=x;c[f+52>>2]=2}else{x=+h[k>>3];h[f+56>>3]=K;h[f+64>>3]=J;h[f+72>>3]=I;h[f+80>>3]=F>x?F:x;c[f+52>>2]=1}h[k>>3]=+h[k>>3]+-1.0;break}x=+h[u>>3];if((L&8|0)==0){M=c[q>>2]|0;B=+h[M+24>>3];D=+h[M+80>>3];M=D>=0.0;if((c[f+48>>2]|0)==4){if(M){Q=D+.5}else{Q=D+-.5}R=+h[k>>3];S=B+ +((~~Q+1|0)/2|0|0)}else{if(M){T=D+.5}else{T=D+-.5}R=B- +((~~T+1|0)/2|0|0);S=+h[k>>3]+1.0}h[f+56>>3]=x;h[f+64>>3]=R;h[f+72>>3]=I;h[f+80>>3]=S;c[f+52>>2]=1;h[u>>3]=+h[u>>3]+1.0;break}else{B=x+1.0;M=c[q>>2]|0;x=+h[M+24>>3];D=+h[M+80>>3];M=D>=0.0;if((c[f+48>>2]|0)==4){if(M){U=D+.5}else{U=D+-.5}V=+h[k>>3]+-1.0;W=x+ +((~~U+1|0)/2|0|0)}else{if(M){X=D+.5}else{X=D+-.5}V=x- +((~~X+1|0)/2|0|0);W=+h[k>>3]+1.0}h[f+56>>3]=K;h[f+64>>3]=V;h[f+72>>3]=B;h[f+80>>3]=W;c[f+52>>2]=1;h[u>>3]=+h[u>>3]+-1.0;break}}else{B=+h[k>>3];h[f+56>>3]=K;h[f+64>>3]=J<B?J:B;h[f+72>>3]=I;h[f+80>>3]=F;c[f+52>>2]=1;h[k>>3]=+h[k>>3]+1.0}}while(0);M=c[p>>2]|0;if((a[M+112|0]|0)==0){Y=d;Z=M}else{N=M;do{_=c[N+116>>2]|0;N=c[_+8>>2]|0;}while((a[N+112|0]|0)!=0);Y=_;Z=N}if((o|0)==(c[((c[Y>>2]&3|0)==3?Y:Y+32|0)+28>>2]|0)){a[Z+46|0]=0}else{a[Z+86|0]=0}c[f+48>>2]=L;i=j;return}}while(0);if(m){v=1;break}v=c[f+48>>2]|0}}while(0);do{if((s|0)==0){$=f+56|0;aa=f+52|0}else{m=f+56|0;Z=f+52|0;Y=Gc[s&127](o,(c[p>>2]|0)+16|0,v,m,Z)|0;if((Y|0)==0){$=m;aa=Z;break}c[f+48>>2]=Y;i=j;return}}while(0);v=$;$=f;c[v>>2]=c[$>>2];c[v+4>>2]=c[$+4>>2];c[v+8>>2]=c[$+8>>2];c[v+12>>2]=c[$+12>>2];c[v+16>>2]=c[$+16>>2];c[v+20>>2]=c[$+20>>2];c[v+24>>2]=c[$+24>>2];c[v+28>>2]=c[$+28>>2];c[aa>>2]=1;if((e|0)==8){cc(115336,154560,571,171032)}else if((e|0)==2){W=+h[k>>3];if((c[f+48>>2]|0)==4){h[f+64>>3]=W;i=j;return}else{h[f+80>>3]=W;i=j;return}}else if((e|0)==1){h[f+80>>3]=+h[k>>3];c[f+48>>2]=1;h[k>>3]=+h[k>>3]+-1.0;i=j;return}else{i=j;return}}function fm(a){a=a|0;var b=0,d=0,e=0.0,f=0.0,g=0,i=0.0,j=0,k=0.0,l=0.0,m=0,n=0,o=0.0,p=0.0;b=c[a+8>>2]|0;a=c[b+172>>2]|0;d=c[a>>2]|0;if((d|0)==0){e=0.0;f=0.0}else{g=0;i=0.0;j=d;do{i=i+ +h[(c[(c[((c[j>>2]&3|0)==3?j:j+32|0)+28>>2]|0)+8>>2]|0)+16>>3];g=g+1|0;j=c[a+(g<<2)>>2]|0;}while((j|0)!=0);e=+(g|0);f=i}g=c[b+180>>2]|0;j=c[g>>2]|0;if((j|0)==0){k=0.0;l=0.0;m=0}else{a=0;i=0.0;n=j;do{i=i+ +h[(c[(c[((c[n>>2]&3|0)==2?n:n-32|0)+28>>2]|0)+8>>2]|0)+16>>3];a=a+1|0;n=c[g+(a<<2)>>2]|0;}while((n|0)!=0);k=+(a|0);l=i;m=j}i=+h[b+16>>3];o=+h[b+24>>3];p=+$(+(o- +h[(c[(c[((c[d>>2]&3|0)==3?d:d+32|0)+28>>2]|0)+8>>2]|0)+24>>3]),+(i-f/e));return+((p+ +$(+(+h[(c[(c[((c[m>>2]&3|0)==2?m:m-32|0)+28>>2]|0)+8>>2]|0)+24>>3]-o),+(l/k-i)))*.5)}function gm(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0.0,u=0,v=0,w=0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0,L=0,M=0,N=0.0,O=0.0,P=0.0,Q=0.0,R=0.0,S=0.0,T=0.0,U=0.0,V=0.0,W=0.0,X=0,Y=0,Z=0,_=0,$=0;j=i;i=i+40|0;k=j|0;l=d;m=c[l>>2]&3;n=d-32|0;o=c[((m|0)==2?d:n)+28>>2]|0;p=d+8|0;q=(c[p>>2]|0)+56|0;r=q;if((a[r+31|0]|0)!=0){wl(k,o,c[((m|0)==3?d:d+32|0)+28>>2]|0,r);r=q;q=k;c[r>>2]=c[q>>2];c[r+4>>2]=c[q+4>>2];c[r+8>>2]=c[q+8>>2];c[r+12>>2]=c[q+12>>2];c[r+16>>2]=c[q+16>>2];c[r+20>>2]=c[q+20>>2];c[r+24>>2]=c[q+24>>2];c[r+28>>2]=c[q+28>>2];c[r+32>>2]=c[q+32>>2];c[r+36>>2]=c[q+36>>2]}q=o+8|0;r=c[q>>2]|0;k=c[r+8>>2]|0;if((k|0)==0){s=0}else{s=c[(c[k+4>>2]|0)+16>>2]|0}k=b+40|0;m=c[p>>2]|0;t=+h[r+24>>3]+ +h[m+64>>3];u=k;h[b+40>>3]=+h[r+16>>3]+ +h[m+56>>3];m=b+48|0;h[m>>3]=t;do{if(g<<24>>24==0){r=c[p>>2]|0;if((a[r+85|0]|0)==0){a[b+69|0]=0;break}else{h[b+56>>3]=+h[r+72>>3];a[b+69|0]=1;break}}else{t=+fm(c[((c[l>>2]&3|0)==2?d:n)+28>>2]|0)+3.141592653589793;h[b+56>>3]=t;if(t<6.283185307179586){a[b+69|0]=1;break}else{cc(126168,154560,608,170720)}}}while(0);n=f+32|0;c[n>>2]=c[u>>2];c[n+4>>2]=c[u+4>>2];c[n+8>>2]=c[u+8>>2];c[n+12>>2]=c[u+12>>2];u=(e|0)==1;do{if(u){if((a[(c[q>>2]|0)+156|0]|0)!=0){v=4;break}n=a[(c[p>>2]|0)+89|0]|0;l=n&255;if(n<<24>>24==0){w=50;break}t=+h[f>>3];x=+h[f+8>>3];y=+h[f+16>>3];do{if((l&4|0)==0){if((l&1|0)==0){n=f+48|0;if((l&8|0)==0){c[n>>2]=2;g=k|0;r=c[q>>2]|0;z=+h[r+80>>3];if(z<0.0){A=z+-.5}else{A=z+.5}z=+h[r+24>>3]+ +((~~A+1|0)/2|0|0);B=+h[m>>3];h[f+56>>3]=+h[g>>3];h[f+64>>3]=B;h[f+72>>3]=y;h[f+80>>3]=z;c[f+52>>2]=1;h[g>>3]=+h[g>>3]+1.0;break}else{c[n>>2]=8;n=k|0;z=+h[n>>3];g=c[q>>2]|0;B=+h[g+80>>3];if(B<0.0){C=B+-.5}else{C=B+.5}B=+h[g+24>>3]+ +((~~C+1|0)/2|0|0);D=+h[m>>3];h[f+56>>3]=t;h[f+64>>3]=D;h[f+72>>3]=z;h[f+80>>3]=B;c[f+52>>2]=1;h[n>>3]=+h[n>>3]+-1.0;break}}c[f+48>>2]=1;n=c[q>>2]|0;if(+h[k>>3]<+h[n+16>>3]){B=t+-1.0;z=+h[m>>3];D=+h[n+80>>3];if(D<0.0){E=D+-.5}else{E=D+.5}D=+h[n+24>>3]- +((~~E+1|0)/2|0|0);F=D- +((c[(c[(Hx(o|0)|0)+8>>2]|0)+240>>2]|0)/2|0|0);g=c[q>>2]|0;D=+h[g+16>>3]- +h[g+88>>3];G=+h[g+80>>3];if(G<0.0){H=G+-.5}else{H=G+.5}G=+h[g+24>>3]+ +((~~H+1|0)/2|0|0);h[f+56>>3]=B;h[f+64>>3]=F;h[f+72>>3]=y;h[f+80>>3]=z;h[f+88>>3]=B;h[f+96>>3]=z;h[f+104>>3]=D;h[f+112>>3]=G}else{G=+h[m>>3];D=y+1.0;z=+h[n+80>>3];if(z<0.0){I=z+-.5}else{I=z+.5}z=+h[n+24>>3]- +((~~I+1|0)/2|0|0);B=z- +((c[(c[(Hx(o|0)|0)+8>>2]|0)+240>>2]|0)/2|0|0);n=c[q>>2]|0;z=+h[n+16>>3]+ +h[n+96>>3]+0.0;F=+h[n+80>>3];if(F<0.0){J=F+-.5}else{J=F+.5}F=+h[n+24>>3]+ +((~~J+1|0)/2|0|0);h[f+56>>3]=t;h[f+64>>3]=B;h[f+72>>3]=D;h[f+80>>3]=G;h[f+88>>3]=z;h[f+96>>3]=G;h[f+104>>3]=D;h[f+112>>3]=F}c[f+52>>2]=2;h[m>>3]=+h[m>>3]+-1.0}else{F=+h[f+24>>3];c[f+48>>2]=4;D=+h[m>>3];h[f+56>>3]=t;h[f+64>>3]=x<D?x:D;h[f+72>>3]=y;h[f+80>>3]=F;c[f+52>>2]=1;h[m>>3]=+h[m>>3]+1.0}}while(0);n=c[p>>2]|0;if((a[n+112|0]|0)==0){K=d;L=n}else{g=n;do{M=c[g+116>>2]|0;g=c[M+8>>2]|0;}while((a[g+112|0]|0)!=0);K=M;L=g}if((o|0)==(c[((c[K>>2]&3|0)==2?K:K-32|0)+28>>2]|0)){a[L+86|0]=0}else{a[L+46|0]=0}c[f+48>>2]=l;i=j;return}else{w=50}}while(0);do{if((w|0)==50){do{if((e|0)==2){L=a[(c[p>>2]|0)+89|0]|0;K=L&255;if(L<<24>>24==0){break}J=+h[f>>3];I=+h[f+8>>3];H=+h[f+16>>3];E=+h[f+24>>3];do{if((K&4|0)==0){if((K&1|0)!=0){if((c[f+48>>2]|0)==4){C=J+-1.0;L=c[q>>2]|0;A=+h[L+80>>3];if(A<0.0){N=A+-.5}else{N=A+.5}A=+h[L+24>>3]- +((~~N+1|0)/2|0|0);y=+h[k>>3];x=A- +((c[(c[(Hx(o|0)|0)+8>>2]|0)+240>>2]|0)/2|0|0);L=c[q>>2]|0;t=+h[L+16>>3]- +h[L+88>>3]+-2.0;F=+h[L+80>>3];if(F<0.0){O=F+-.5}else{O=F+.5}F=+h[L+24>>3]+ +((~~O+1|0)/2|0|0);h[f+56>>3]=C;h[f+64>>3]=x;h[f+72>>3]=y;h[f+80>>3]=A;h[f+88>>3]=C;h[f+96>>3]=A;h[f+104>>3]=t;h[f+112>>3]=F;c[f+52>>2]=2}else{F=+h[b+8>>3];h[f+56>>3]=J;h[f+64>>3]=I;h[f+72>>3]=H;h[f+80>>3]=E>F?E:F;c[f+52>>2]=1}h[m>>3]=+h[m>>3]+-1.0;break}L=k|0;F=+h[L>>3];if((K&8|0)==0){t=F+-1.0;M=c[q>>2]|0;A=+h[M+24>>3];C=+h[M+80>>3];M=C>=0.0;if((c[f+48>>2]|0)==4){if(M){P=C+.5}else{P=C+-.5}Q=+h[m>>3]+-1.0;R=A+ +((~~P+1|0)/2|0|0)}else{if(M){S=C+.5}else{S=C+-.5}Q=A- +((~~S+1|0)/2|0|0);R=+h[m>>3]}h[f+56>>3]=t;h[f+64>>3]=Q;h[f+72>>3]=H;h[f+80>>3]=R;c[f+52>>2]=1;h[L>>3]=+h[L>>3]+1.0;break}else{t=F+1.0;M=c[q>>2]|0;F=+h[M+24>>3];A=+h[M+80>>3];M=A>=0.0;if((c[f+48>>2]|0)==4){if(M){T=A+.5}else{T=A+-.5}U=+h[m>>3]+-1.0;V=F+ +((~~T+1|0)/2|0|0)}else{if(M){W=A+.5}else{W=A+-.5}U=F- +((~~W+1|0)/2|0|0);V=+h[m>>3]+1.0}h[f+56>>3]=J;h[f+64>>3]=U;h[f+72>>3]=t;h[f+80>>3]=V;c[f+52>>2]=1;h[L>>3]=+h[L>>3]+-1.0;break}}else{t=+h[m>>3];h[f+56>>3]=J;h[f+64>>3]=I<t?I:t;h[f+72>>3]=H;h[f+80>>3]=E;c[f+52>>2]=1;h[m>>3]=+h[m>>3]+1.0}}while(0);L=c[p>>2]|0;if((a[L+112|0]|0)==0){X=d;Y=L}else{M=L;do{Z=c[M+116>>2]|0;M=c[Z+8>>2]|0;}while((a[M+112|0]|0)!=0);X=Z;Y=M}if((o|0)==(c[((c[X>>2]&3|0)==2?X:X-32|0)+28>>2]|0)){a[Y+86|0]=0}else{a[Y+46|0]=0}c[f+48>>2]=K;i=j;return}}while(0);if(u){v=4;break}v=c[f+48>>2]|0}}while(0);do{if((s|0)==0){_=f+56|0;$=f+52|0}else{u=f+56|0;Y=f+52|0;X=Gc[s&127](o,(c[p>>2]|0)+56|0,v,u,Y)|0;if((X|0)==0){_=u;$=Y;break}c[f+48>>2]=X;i=j;return}}while(0);v=_;_=f;c[v>>2]=c[_>>2];c[v+4>>2]=c[_+4>>2];c[v+8>>2]=c[_+8>>2];c[v+12>>2]=c[_+12>>2];c[v+16>>2]=c[_+16>>2];c[v+20>>2]=c[_+20>>2];c[v+24>>2]=c[_+24>>2];c[v+28>>2]=c[_+28>>2];c[$>>2]=1;if((e|0)==8){cc(115336,154560,767,170720)}else if((e|0)==2){V=+h[m>>3];if((c[f+48>>2]|0)==4){h[f+64>>3]=V;i=j;return}else{h[f+80>>3]=V;i=j;return}}else if((e|0)==1){h[f+64>>3]=+h[m>>3];c[f+48>>2]=4;h[m>>3]=+h[m>>3]+1.0;i=j;return}else{i=j;return}}function hm(b){b=b|0;var d=0,e=0,f=0,g=0,i=0,j=0,k=0;d=c[b+8>>2]|0;e=c[d+96>>2]|0;if((a[d+44|0]|0)==0){if((a[d+84|0]|0)!=0){f=3}}else{f=3}do{if((f|0)==3){g=a[d+49|0]|0;i=g&255;if((i&8|0)!=0){j=0;return j|0}k=a[d+89|0]|0;if((k&8)!=0){j=0;return j|0}if(g<<24>>24!=k<<24>>24){break}if((i&5|0)==0){break}else{j=0}return j|0}}while(0);if((e|0)==0){j=18;return j|0}d=(c[(c[(Hx(c[((c[b>>2]&3|0)==2?b:b-32|0)+28>>2]|0)|0)+8>>2]|0)+116>>2]&1|0)==0;j=~~(+h[(d?e+24|0:e+32|0)>>3]+18.0);return j|0}function im(b,d,e,f,g,j,k){b=b|0;d=d|0;e=e|0;f=f|0;g=+g;j=+j;k=k|0;var l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0.0,y=0.0,z=0,A=0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0,H=0,I=0,J=0.0,K=0.0,L=0.0,M=0,N=0,O=0,P=0,Q=0.0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0.0,aa=0.0,ba=0,ca=0,da=0.0,ea=0.0,fa=0.0,ga=0.0,ha=0.0,ia=0.0,ja=0,ka=0,la=0.0,ma=0,na=0,oa=0,pa=0,qa=0.0,ra=0.0,sa=0.0,ta=0.0,ua=0,va=0,wa=0.0;b=i;i=i+16e3|0;l=b|0;m=c[d+(e<<2)>>2]|0;n=c[m+8>>2]|0;do{if((a[n+44|0]|0)==0){if((a[n+84|0]|0)!=0){o=4;break}p=a[n+49|0]|0;q=a[n+89|0]|0}else{o=4}}while(0);a:do{if((o|0)==4){r=n+16|0;s=a[r+33|0]|0;t=s&255;u=(t&8|0)==0;do{if(u){v=a[n+89|0]|0;if((v&8)==0){if(s<<24>>24!=v<<24>>24){p=s;q=v;break a}if((t&5|0)==0){p=s;q=s;break a}if(!u){break}}v=n+56|0;w=a[v+33|0]|0;if((w&8)!=0){break}if((t&4|0)!=0){jm(d,e,f,g,j,k);i=b;return}if((t&1|0)==0){cc(115336,154560,1233,170392)}x=g*.5/+(f|0);y=x>2.0?x:2.0;z=(c[((c[m>>2]&3|0)==3?m:m+32|0)+28>>2]|0)+8|0;A=c[z>>2]|0;x=+h[A+16>>3];B=+h[A+24>>3];C=x+ +h[r>>3];D=B+ +h[n+24>>3];E=x+ +h[v>>3];x=B+ +h[n+64>>3];v=C<E?-1:1;F=+h[A+80>>3]*.5;A=w&255;w=0;while(1){G=w+1|0;if((c[4e4+(w<<2)>>2]|0)==(A|0)){H=w;break}if((G|0)<8){w=G}else{H=-1;break}}w=0;while(1){A=w+1|0;if((c[4e4+(w<<2)>>2]|0)==(t|0)){o=56;break}if((A|0)<8){w=A}else{I=0;break}}do{if((o|0)==56){if((w|H|0)<0){I=0;break}I=(c[40032+(w<<5)+(H<<2)>>2]|0)==67}}while(0);J=(D+F-B)*3.0;K=(x+F-B)*3.0;if((f|0)<=0){i=b;return}L=y*+((I?-v|0:v)|0);w=l|0;A=l|0;G=l+8|0;M=l+16|0;N=l+24|0;O=l+32|0;P=l+40|0;Q=(C+E)*.5;R=l+48|0;S=l+56|0;T=l+64|0;U=l+72|0;V=l+80|0;W=l+88|0;X=l+96|0;Y=l+104|0;Z=1;_=e;$=F<K?F:K;K=F<J?F:J;J=0.0;aa=F;ba=m;while(1){ca=_+1|0;da=aa+j;ea=K+j;fa=$+j;ga=L+J;h[A>>3]=C;h[G>>3]=D;ha=C+ga;h[M>>3]=ha;h[N>>3]=D-ea/3.0;ia=B-da;h[O>>3]=ha;h[P>>3]=ia;h[R>>3]=Q;h[S>>3]=ia;ha=E-ga;h[T>>3]=ha;h[U>>3]=ia;h[V>>3]=ha;h[W>>3]=x-fa/3.0;h[X>>3]=E;h[Y>>3]=x;ja=ba+8|0;ka=ba;do{if((c[(c[ja>>2]|0)+96>>2]|0)==0){la=da}else{ma=(c[(c[(Hx(c[((c[ka>>2]&3|0)==3?ba:ba+32|0)+28>>2]|0)|0)+8>>2]|0)+116>>2]&1|0)==0;na=c[(c[ja>>2]|0)+96>>2]|0;ha=+h[(ma?na+32|0:na+24|0)>>3];h[na+64>>3]=+h[(c[z>>2]|0)+24>>3]-da-ha*.5;h[(c[(c[ja>>2]|0)+96>>2]|0)+56>>3]=+h[(c[z>>2]|0)+16>>3];a[(c[(c[ja>>2]|0)+96>>2]|0)+81|0]=1;if(ha<=j){la=da;break}la=da+(ha-j)}}while(0);cm(ba,c[((c[ka>>2]&3|0)==2?ba:ba-32|0)+28>>2]|0,w,7,k);if((Z|0)>=(f|0)){break}Z=Z+1|0;_=ca;$=fa;K=ea;J=ga;aa=la;ba=c[d+(ca<<2)>>2]|0}i=b;return}}while(0);do{if((s&2)==0){u=n+56|0;ba=a[u+33|0]|0;if((ba&2)!=0){break}aa=j*.5/+(f|0);J=aa>2.0?aa:2.0;_=(c[((c[m>>2]&3|0)==3?m:m+32|0)+28>>2]|0)+8|0;Z=c[_>>2]|0;aa=+h[Z+16>>3];K=+h[Z+24>>3];$=aa+ +h[r>>3];x=K+ +h[n+24>>3];E=aa+ +h[u>>3];Q=K+ +h[n+64>>3];u=x<Q?-1:1;K=+h[Z+88>>3];Z=ba&255;ba=0;while(1){w=ba+1|0;if((c[4e4+(ba<<2)>>2]|0)==(Z|0)){oa=ba;break}if((w|0)<8){ba=w}else{oa=-1;break}}ba=0;while(1){Z=ba+1|0;if((c[4e4+(ba<<2)>>2]|0)==(t|0)){o=36;break}if((Z|0)<8){ba=Z}else{pa=u;break}}do{if((o|0)==36){if((ba|oa|0)<0){pa=u;break}Z=c[40032+(ba<<5)+(oa<<2)>>2]|0;if(!((Z|0)==12|(Z|0)==67)){pa=u;break}if(x!=Q){pa=u;break}pa=-u|0}}while(0);B=($+K-aa)*3.0;D=(E+K-aa)*3.0;if((f|0)<=0){i=b;return}C=J*+(pa|0);u=l|0;ba=l|0;Z=l+8|0;w=l+16|0;z=l+24|0;Y=l+32|0;X=l+40|0;L=(x+Q)*.5;W=l+48|0;V=l+56|0;U=l+64|0;T=l+72|0;S=l+80|0;R=l+88|0;P=l+96|0;O=l+104|0;F=K<D?K:D;D=K<B?K:B;B=K;y=0.0;N=1;M=e;G=m;while(1){A=M+1|0;da=B+g;ha=D+g;ia=F+g;qa=C+y;h[ba>>3]=$;h[Z>>3]=x;ra=x+qa;h[w>>3]=$-ha/3.0;h[z>>3]=ra;sa=aa-da;h[Y>>3]=sa;h[X>>3]=ra;h[W>>3]=sa;h[V>>3]=L;ra=Q-qa;h[U>>3]=sa;h[T>>3]=ra;h[S>>3]=E-ia/3.0;h[R>>3]=ra;h[P>>3]=E;h[O>>3]=Q;v=G+8|0;ja=G;do{if((c[(c[v>>2]|0)+96>>2]|0)==0){ta=da}else{na=(c[(c[(Hx(c[((c[ja>>2]&3|0)==3?G:G+32|0)+28>>2]|0)|0)+8>>2]|0)+116>>2]&1|0)==0;ma=c[(c[v>>2]|0)+96>>2]|0;ra=+h[(na?ma+24|0:ma+32|0)>>3];h[ma+56>>3]=+h[(c[_>>2]|0)+16>>3]-da-ra*.5;h[(c[(c[v>>2]|0)+96>>2]|0)+64>>3]=+h[(c[_>>2]|0)+24>>3];a[(c[(c[v>>2]|0)+96>>2]|0)+81|0]=1;if(ra<=g){ta=da;break}ta=da+(ra-g)}}while(0);cm(G,c[((c[ja>>2]&3|0)==2?G:G-32|0)+28>>2]|0,u,7,k);if((N|0)>=(f|0)){break}F=ia;D=ha;B=ta;y=qa;N=N+1|0;M=A;G=c[d+(A<<2)>>2]|0}i=b;return}}while(0);jm(d,e,f,g,j,k);i=b;return}}while(0);ta=j*.5/+(f|0);j=ta>2.0?ta:2.0;pa=(c[((c[m>>2]&3|0)==3?m:m+32|0)+28>>2]|0)+8|0;oa=c[pa>>2]|0;ta=+h[oa+16>>3];la=+h[oa+24>>3];y=ta+ +h[n+16>>3];B=la+ +h[n+24>>3];D=ta+ +h[n+56>>3];F=la+ +h[n+64>>3];n=B<F?-1:1;la=+h[oa+96>>3];oa=p&255;p=q&255;q=0;while(1){I=q+1|0;if((c[4e4+(q<<2)>>2]|0)==(p|0)){ua=q;break}if((I|0)<8){q=I}else{ua=-1;break}}q=0;while(1){p=q+1|0;if((c[4e4+(q<<2)>>2]|0)==(oa|0)){o=14;break}if((p|0)<8){q=p}else{va=n;break}}do{if((o|0)==14){if((q|ua|0)<0){va=n;break}oa=c[40032+(q<<5)+(ua<<2)>>2]|0;if(!((oa|0)==32|(oa|0)==65)){va=n;break}if(B!=F){va=n;break}va=-n|0}}while(0);Q=ta+la;E=(Q-y)*3.0;L=(Q-D)*3.0;if((f|0)<=0){i=b;return}Q=j*+(va|0);va=l|0;n=l|0;ua=l+8|0;q=l+16|0;o=l+24|0;oa=l+32|0;p=l+40|0;j=(B+F)*.5;I=l+48|0;H=l+56|0;t=l+64|0;r=l+72|0;s=l+80|0;G=l+88|0;M=l+96|0;N=l+104|0;aa=la<L?la:L;L=la<E?la:E;E=la;la=0.0;l=1;u=e;e=m;while(1){m=u+1|0;$=E+g;x=L+g;C=aa+g;K=Q+la;h[n>>3]=y;h[ua>>3]=B;J=B+K;h[q>>3]=y+x/3.0;h[o>>3]=J;da=ta+$;h[oa>>3]=da;h[p>>3]=J;h[I>>3]=da;h[H>>3]=j;J=F-K;h[t>>3]=da;h[r>>3]=J;h[s>>3]=D+C/3.0;h[G>>3]=J;h[M>>3]=D;h[N>>3]=F;_=e+8|0;O=e;do{if((c[(c[_>>2]|0)+96>>2]|0)==0){wa=$}else{P=(c[(c[(Hx(c[((c[O>>2]&3|0)==3?e:e+32|0)+28>>2]|0)|0)+8>>2]|0)+116>>2]&1|0)==0;R=c[(c[_>>2]|0)+96>>2]|0;J=+h[(P?R+24|0:R+32|0)>>3];h[R+56>>3]=J*.5+($+ +h[(c[pa>>2]|0)+16>>3]);h[(c[(c[_>>2]|0)+96>>2]|0)+64>>3]=+h[(c[pa>>2]|0)+24>>3];a[(c[(c[_>>2]|0)+96>>2]|0)+81|0]=1;if(J<=g){wa=$;break}wa=$+(J-g)}}while(0);cm(e,c[((c[O>>2]&3|0)==2?e:e-32|0)+28>>2]|0,va,7,k);if((l|0)>=(f|0)){break}aa=C;L=x;E=wa;la=K;l=l+1|0;u=m;e=c[d+(m<<2)>>2]|0}i=b;return}function jm(b,e,f,g,j,k){b=b|0;e=e|0;f=f|0;g=+g;j=+j;k=k|0;var l=0,m=0,n=0,o=0.0,p=0,q=0,r=0.0,s=0,t=0,u=0.0,v=0.0,w=0,x=0.0,y=0.0,z=0.0,A=0.0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0.0,R=0.0,S=0.0,T=0.0,U=0.0,V=0,W=0,X=0.0,Y=0,Z=0;l=i;i=i+16e3|0;m=l|0;n=c[b+(e<<2)>>2]|0;o=g*.5/+(f|0);g=o>2.0?o:2.0;p=(c[((c[n>>2]&3|0)==3?n:n+32|0)+28>>2]|0)+8|0;q=c[p>>2]|0;o=+h[q+16>>3];r=+h[q+24>>3];s=c[n+8>>2]|0;t=s+16|0;u=o+ +h[t>>3];v=r+ +h[s+24>>3];w=s+56|0;x=o+ +h[w>>3];y=r+ +h[s+64>>3];z=u<x?-1.0:1.0;A=+h[q+80>>3]*.5;s=d[t+33|0]|0;t=d[w+33|0]|0;w=0;while(1){B=w+1|0;if((c[4e4+(w<<2)>>2]|0)==(t|0)){C=w;break}if((B|0)<8){w=B}else{C=-1;break}}w=0;while(1){t=w+1|0;if((c[4e4+(w<<2)>>2]|0)==(s|0)){D=7;break}if((t|0)<8){w=t}else{E=0.0;break}}a:do{if((D|0)==7){if((w|C|0)<0){E=0.0;break}switch(c[40032+(w<<5)+(C<<2)>>2]|0){case 74:case 75:case 85:{E=z*(g*2.0+(+h[q+88>>3]-(o-u)+(+h[q+96>>3]-(x-o)))*.5);break a;break};case 41:{E=z*(g+(+h[q+96>>3]-(u-o)));break a;break};case 83:{E=z*(+h[q+88>>3]-(o-u));break a;break};case 15:{E=z*(g+(+h[q+96>>3]-(x-o)));break a;break};case 48:{E=z*(g+(+h[q+96>>3]-(u-o)));break a;break};case 14:case 37:case 47:case 51:case 57:case 58:{E=z*((+h[q+88>>3]-(o-u)+(+h[q+96>>3]-(x-o)))/3.0);break a;break};case 84:{E=z*(g+(+h[q+88>>3]-(o-u)+(+h[q+96>>3]-(x-o)))*.5);break a;break};case 38:{E=z*(g+(+h[q+88>>3]-(o-x)));break a;break};case 73:{E=z*(g+(+h[q+88>>3]-(o-u)));break a;break};default:{E=0.0;break a}}}}while(0);o=r+A;F=(o-v)*3.0;G=(o-y)*3.0;if((f|0)<=0){i=l;return}o=g*z;q=m|0;C=m|0;w=m+8|0;D=m+16|0;s=m+24|0;t=m+32|0;B=m+40|0;z=(u+x)*.5;H=m+48|0;I=m+56|0;J=m+64|0;K=m+72|0;L=m+80|0;M=m+88|0;N=m+96|0;O=m+104|0;g=A<G?A:G;G=A<F?A:F;F=E;E=A;m=1;P=e;e=n;while(1){n=P+1|0;A=E+j;Q=G+j;R=g+j;S=o+F;h[C>>3]=u;h[w>>3]=v;T=u+S;h[D>>3]=T;h[s>>3]=v+Q/3.0;U=r+A;h[t>>3]=T;h[B>>3]=U;h[H>>3]=z;h[I>>3]=U;T=x-S;h[J>>3]=T;h[K>>3]=U;h[L>>3]=T;h[M>>3]=y+R/3.0;h[N>>3]=x;h[O>>3]=y;V=e+8|0;W=e;do{if((c[(c[V>>2]|0)+96>>2]|0)==0){X=A}else{Y=(c[(c[(Hx(c[((c[W>>2]&3|0)==3?e:e+32|0)+28>>2]|0)|0)+8>>2]|0)+116>>2]&1|0)==0;Z=c[(c[V>>2]|0)+96>>2]|0;T=+h[(Y?Z+32|0:Z+24|0)>>3];h[Z+64>>3]=T*.5+(A+ +h[(c[p>>2]|0)+24>>3]);h[(c[(c[V>>2]|0)+96>>2]|0)+56>>3]=+h[(c[p>>2]|0)+16>>3];a[(c[(c[V>>2]|0)+96>>2]|0)+81|0]=1;if(T<=j){X=A;break}X=A+(T-j)}}while(0);cm(e,c[((c[W>>2]&3|0)==2?e:e-32|0)+28>>2]|0,q,7,k);if((m|0)>=(f|0)){break}g=R;G=Q;F=S;E=X;m=m+1|0;P=n;e=c[b+(n<<2)>>2]|0}i=l;return}function km(b){b=b|0;var d=0,e=0,f=0;if(!((c[53786]|0)!=0|(c[53784]|0)!=0)){return}d=b+8|0;e=c[(c[d>>2]|0)+100>>2]|0;do{if((e|0)!=0){if((a[e+81|0]|0)!=0){break}if((lm(b,1)|0)==0){break}f=Hx(c[((c[b>>2]&3|0)==3?b:b+32|0)+28>>2]|0)|0;_m(f,c[(c[d>>2]|0)+100>>2]|0)}}while(0);e=c[(c[d>>2]|0)+104>>2]|0;if((e|0)==0){return}if((a[e+81|0]|0)!=0){return}if((lm(b,0)|0)==0){return}e=Hx(c[((c[b>>2]&3|0)==3?b:b+32|0)+28>>2]|0)|0;_m(e,c[(c[d>>2]|0)+104>>2]|0);return}function lm(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0,z=0,A=0,B=0;e=i;i=i+96|0;f=e|0;g=e+64|0;j=e+80|0;k=b+8|0;if((a[(c[k>>2]|0)+112|0]|0)==6){l=0;i=e;return l|0}m=c[53786]|0;if((m|0)==0){n=4}else{if((a[fw(b|0,m)|0]|0)==0){n=4}}do{if((n|0)==4){m=c[53784]|0;if((m|0)==0){l=0;i=e;return l|0}if((a[fw(b|0,m)|0]|0)==0){l=0}else{break}i=e;return l|0}}while(0);n=d<<24>>24==0;d=c[k>>2]|0;if(n){o=d+104|0}else{o=d+100|0}k=c[o>>2]|0;o=c[d+8>>2]|0;a:do{if((o|0)==0){m=d;while(1){if((a[m+112|0]|0)==0){break}p=c[(c[m+116>>2]|0)+8>>2]|0;q=c[p+8>>2]|0;if((q|0)==0){m=p}else{r=q;break a}}m=b;q=$w(c[((c[m>>2]&3|0)==3?b:b+32|0)+28>>2]|0)|0;p=$w(c[((c[m>>2]&3|0)==2?b:b-32|0)+28>>2]|0)|0;Fv(1,114544,(m=i,i=i+16|0,c[m>>2]=q,c[m+8>>2]=p,m)|0)|0;i=m;l=0;i=e;return l|0}else{r=o}}while(0);do{if(n){o=c[r>>2]|0;if((c[o+8>>2]|0)==0){d=o|0;m=c[d>>2]|0;s=+h[m>>3];t=+h[m+8>>3];p=f;q=m;c[p>>2]=c[q>>2];c[p+4>>2]=c[q+4>>2];c[p+8>>2]=c[q+8>>2];c[p+12>>2]=c[q+12>>2];q=f+16|0;p=(c[d>>2]|0)+16|0;c[q>>2]=c[p>>2];c[q+4>>2]=c[p+4>>2];c[q+8>>2]=c[p+8>>2];c[q+12>>2]=c[p+12>>2];p=f+32|0;q=(c[d>>2]|0)+32|0;c[p>>2]=c[q>>2];c[p+4>>2]=c[q+4>>2];c[p+8>>2]=c[q+8>>2];c[p+12>>2]=c[q+12>>2];q=f+48|0;p=(c[d>>2]|0)+48|0;c[q>>2]=c[p>>2];c[q+4>>2]=c[p+4>>2];c[q+8>>2]=c[p+8>>2];c[q+12>>2]=c[p+12>>2];Qm(g,f|0,3,.1,0,0);u=+h[g>>3];v=+h[g+8>>3];w=s;x=t;break}else{p=c[o>>2]|0;u=+h[p>>3];v=+h[p+8>>3];w=+h[o+16>>3];x=+h[o+24>>3];break}}else{o=(c[r+4>>2]|0)-1|0;p=c[r>>2]|0;q=p+(o*48|0)|0;if((c[p+(o*48|0)+12>>2]|0)==0){d=p+(o*48|0)+4|0;m=c[d>>2]|0;y=m-1|0;z=q|0;A=c[z>>2]|0;t=+h[A+(y<<4)>>3];s=+h[A+(y<<4)+8>>3];y=f;B=A+(m-4<<4)|0;c[y>>2]=c[B>>2];c[y+4>>2]=c[B+4>>2];c[y+8>>2]=c[B+8>>2];c[y+12>>2]=c[B+12>>2];B=f+16|0;y=(c[z>>2]|0)+((c[d>>2]|0)-3<<4)|0;c[B>>2]=c[y>>2];c[B+4>>2]=c[y+4>>2];c[B+8>>2]=c[y+8>>2];c[B+12>>2]=c[y+12>>2];y=f+32|0;B=(c[z>>2]|0)+((c[d>>2]|0)-2<<4)|0;c[y>>2]=c[B>>2];c[y+4>>2]=c[B+4>>2];c[y+8>>2]=c[B+8>>2];c[y+12>>2]=c[B+12>>2];B=f+48|0;y=(c[z>>2]|0)+((c[d>>2]|0)-1<<4)|0;c[B>>2]=c[y>>2];c[B+4>>2]=c[y+4>>2];c[B+8>>2]=c[y+8>>2];c[B+12>>2]=c[y+12>>2];Qm(j,f|0,3,.9,0,0);u=+h[j>>3];v=+h[j+8>>3];w=t;x=s;break}else{y=(c[p+(o*48|0)+4>>2]|0)-1|0;B=c[q>>2]|0;u=+h[B+(y<<4)>>3];v=+h[B+(y<<4)+8>>3];w=+h[p+(o*48|0)+32>>3];x=+h[p+(o*48|0)+40>>3];break}}}while(0);s=+$(+(v-x),+(u-w));j=b|0;u=s+ +Fm(j,c[53786]|0,-25.0,-180.0)/180.0*3.141592653589793;s=+Fm(j,c[53784]|0,1.0,0.0)*10.0;h[k+56>>3]=w+s*+V(u);h[k+64>>3]=x+s*+W(u);a[k+81|0]=1;l=1;i=e;return l|0}function mm(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0.0,q=0.0,r=0,s=0,t=0,u=0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0,C=0,D=0,E=0.0,F=0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0;f=i;i=i+32|0;g=f|0;j=f+16|0;k=b[(c[d+8>>2]|0)+128>>1]&14;d=(c[e+8>>2]|0)+8|0;e=c[d>>2]|0;l=c[e>>2]|0;m=c[l>>2]|0;if((c[l+8>>2]|0)==0){n=m|0;o=m+8|0}else{n=l+16|0;o=l+24|0}p=+h[n>>3];q=+h[o>>3];o=c[e+4>>2]|0;e=o-1|0;n=l+(e*48|0)+16|0;if((c[l+(e*48|0)+12>>2]|0)==0){r=c[l+(e*48|0)>>2]|0;s=(c[l+(e*48|0)+4>>2]|0)-1|0;t=r+(s<<4)|0;u=r+(s<<4)+8|0}else{t=n+16|0;u=n+24|0}v=+h[t>>3];w=+h[u>>3];x=p-v;y=q-w;if(x*x+y*y<1.0e-6){z=p;A=q;B=a|0;h[B>>3]=z;C=a+8|0;h[C>>3]=A;i=f;return}if((k|0)==10|(k|0)==4){h[g>>3]=(p+v)*.5;h[g+8>>3]=(q+w)*.5;Wm(j,c[d>>2]|0,g);z=+h[j>>3];A=+h[j+8>>3];B=a|0;h[B>>3]=z;C=a+8|0;h[C>>3]=A;i=f;return}if((o|0)>0){D=0;E=0.0;F=m}else{cc(107648,154560,1318,170104)}while(1){j=c[l+(D*48|0)+4>>2]|0;if((j|0)>3){g=0;d=3;w=E;while(1){q=+h[F+(g<<4)>>3]- +h[F+(d<<4)>>3];v=+h[F+(g<<4)+8>>3]- +h[F+(d<<4)+8>>3];p=w+ +T(q*q+v*v);k=d+3|0;if((k|0)<(j|0)){g=g+3|0;d=k;w=p}else{G=p;break}}}else{G=E}d=D+1|0;if((d|0)>=(o|0)){break}D=d;E=G;F=c[l+(d*48|0)>>2]|0}F=0;E=G*.5;D=m;a:while(1){m=c[l+(F*48|0)+4>>2]|0;if((m|0)>3){d=0;g=3;H=E;while(1){I=+h[D+(d<<4)>>3];J=+h[D+(d<<4)+8>>3];K=+h[D+(g<<4)>>3];L=+h[D+(g<<4)+8>>3];G=I-K;w=J-L;M=+T(G*G+w*w);if(M>=H){break a}w=H-M;j=g+3|0;if((j|0)<(m|0)){d=d+3|0;g=j;H=w}else{N=w;break}}}else{N=E}g=F+1|0;if((g|0)>=(o|0)){O=19;break}F=g;E=N;D=c[l+(g*48|0)>>2]|0}if((O|0)==19){cc(107648,154560,1318,170104)}N=M-H;z=(H*K+I*N)/M;A=(H*L+J*N)/M;B=a|0;h[B>>3]=z;C=a+8|0;h[C>>3]=A;i=f;return}function nm(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0;a=i;f=d;d=i;i=i+16|0;c[d>>2]=c[f>>2];c[d+4>>2]=c[f+4>>2];c[d+8>>2]=c[f+8>>2];c[d+12>>2]=c[f+12>>2];f=e;e=i;i=i+16|0;c[e>>2]=c[f>>2];c[e+4>>2]=c[f+4>>2];c[e+8>>2]=c[f+8>>2];c[e+12>>2]=c[f+12>>2];km(b);i=a;return}function om(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0;d=i;e=c[b+8>>2]|0;f=c[e+8>>2]|0;if((f|0)==0){g=e}else{h=f;i=d;return h|0}while(1){if((a[g+112|0]|0)==0){break}f=c[(c[g+116>>2]|0)+8>>2]|0;e=c[f+8>>2]|0;if((e|0)==0){g=f}else{h=e;j=5;break}}if((j|0)==5){i=d;return h|0}j=b;g=$w(c[((c[j>>2]&3|0)==3?b:b+32|0)+28>>2]|0)|0;e=$w(c[((c[j>>2]&3|0)==2?b:b-32|0)+28>>2]|0)|0;Fv(1,114544,(b=i,i=i+16|0,c[b>>2]=g,c[b+8>>2]=e,b)|0)|0;i=b;h=0;i=d;return h|0}function pm(b,c){b=b|0;c=c|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;e=a[b]|0;a:do{if(e<<24>>24==0){f=c;g=0}else{h=b;i=c;j=e;while(1){k=yF(j&255|0)|0;if((k|0)!=(yF(d[i]|0|0)|0)){break}k=h+1|0;l=i+1|0;m=a[k]|0;if(m<<24>>24==0){f=l;g=0;break a}else{h=k;i=l;j=m}}f=i;g=d[h]|0}}while(0);e=yF(g|0)|0;return e-(yF(d[f]|0|0)|0)|0}function qm(b,c,e){b=b|0;c=c|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;if((e|0)==0){f=0;return f|0}else{g=b;h=c;i=e}while(1){e=i-1|0;c=yF(d[g]|0)|0;if((c|0)!=(yF(d[h]|0)|0)){j=7;break}if((e|0)==0){f=0;j=8;break}if((a[g]|0)==0){f=0;j=8;break}if((a[h]|0)==0){f=0;j=8;break}g=g+1|0;h=h+1|0;i=e}if((j|0)==7){i=yF(d[g]|0)|0;f=i-(yF(d[h]|0)|0)|0;return f|0}else if((j|0)==8){return f|0}return 0}function rm(b,d,e,f,g){b=b|0;d=d|0;e=+e;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0.0,w=0.0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0,M=0,N=0,O=0,P=0.0,Q=0.0,S=0.0,U=0.0,X=0,Y=0.0,Z=0.0,_=0.0,aa=0.0,ba=0.0,ca=0.0,da=0.0,ea=0.0,fa=0.0,ga=0.0,ha=0.0,ia=0.0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0.0,ra=0,sa=0,ta=0.0,ua=0,va=0,wa=0.0,xa=0.0,ya=0.0,za=0.0,Aa=0.0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0.0,Ha=0.0,Ia=0.0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0.0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0.0,Xa=0.0,Ya=0,Za=0,_a=0.0,$a=0.0,ab=0.0,bb=0.0,cb=0,db=0,eb=0,fb=0,gb=0.0,hb=0.0,ib=0,jb=0;j=i;i=i+80|0;k=j|0;l=j+64|0;m=k;n=jk(12)|0;o=n+4|0;c[o>>2]=0;p=n+8|0;c[p>>2]=2e3;q=jk(128e3)|0;r=q;s=n;c[s>>2]=r;t=c[b+4>>2]|0;u=c[b>>2]|0;v=+h[u>>3];w=+h[u+8>>3];b=c[o>>2]|0;x=c[p>>2]|0;if((b|0)<(x|0)){y=b;z=r}else{c[p>>2]=x<<1;r=mk(q,x<<7)|0;c[s>>2]=r;y=c[o>>2]|0;z=r}h[z+(y<<6)>>3]=v;h[(c[s>>2]|0)+(c[o>>2]<<6)+8>>3]=w;y=c[o>>2]|0;c[o>>2]=y+1;h[(c[s>>2]|0)+(y<<6)+16>>3]=0.0;y=k+48|0;z=u;c[y>>2]=c[z>>2];c[y+4>>2]=c[z+4>>2];c[y+8>>2]=c[z+8>>2];c[y+12>>2]=c[z+12>>2];if((t|0)>3){z=k|0;r=k|0;x=k+8|0;q=l|0;b=l+8|0;A=k+16|0;B=k+32|0;w=0.0;k=0;C=3;while(1){c[m>>2]=c[y>>2];c[m+4>>2]=c[y+4>>2];c[m+8>>2]=c[y+8>>2];c[m+12>>2]=c[y+12>>2];D=u+(k+1<<4)|0;c[A>>2]=c[D>>2];c[A+4>>2]=c[D+4>>2];c[A+8>>2]=c[D+8>>2];c[A+12>>2]=c[D+12>>2];D=u+(k+2<<4)|0;c[B>>2]=c[D>>2];c[B+4>>2]=c[D+4>>2];c[B+8>>2]=c[D+8>>2];c[B+12>>2]=c[D+12>>2];D=u+(k+3<<4)|0;c[y>>2]=c[D>>2];c[y+4>>2]=c[D+4>>2];c[y+8>>2]=c[D+8>>2];c[y+12>>2]=c[D+12>>2];v=+h[x>>3];E=+h[r>>3];F=w;D=1;while(1){Qm(l,z,3,+(D|0)/20.0,0,0);G=+h[q>>3];H=+h[b>>3];I=E-G;J=v-H;K=F+ +T(I*I+J*J);L=c[o>>2]|0;M=c[p>>2]|0;if((L|0)<(M|0)){N=L;O=c[s>>2]|0}else{c[p>>2]=M<<1;L=mk(c[s>>2]|0,M<<7)|0;c[s>>2]=L;N=c[o>>2]|0;O=L}h[O+(N<<6)>>3]=G;h[(c[s>>2]|0)+(c[o>>2]<<6)+8>>3]=H;L=c[o>>2]|0;c[o>>2]=L+1;h[(c[s>>2]|0)+(L<<6)+16>>3]=K;L=D+1|0;if((L|0)<21){v=H;E=G;F=K;D=L}else{break}}D=C+3|0;if((D|0)<(t|0)){w=K;k=C;C=D}else{break}}}C=c[o>>2]|0;if((c[p>>2]|0)>(C|0)){c[s>>2]=mk(c[s>>2]|0,C<<6)|0}C=c[o>>2]|0;o=c[s>>2]|0;p=C-1|0;K=+h[o+(p<<6)+16>>3];k=(C|0)>0;do{if(k){w=+(C|0);t=(g|0)==2;N=(f|0)==0;O=0;while(1){F=+(O-1|0);if((O|0)>0&F<w){P=F}else{P=F-w*+R(F/w)}b=~~P;q=O+1|0;F=+(q|0);if(F<w){Q=F}else{Q=F-w*+R(F/w)}z=~~Q;l=o+(O<<6)|0;F=+h[l>>3];r=o+(O<<6)+8|0;E=+h[r>>3];x=o+(O<<6)+16|0;v=+h[x>>3];y=o+(O<<6)+24|0;u=o+(O<<6)+32|0;B=o+(O<<6)+40|0;A=o+(O<<6)+48|0;m=o+(O<<6)+56|0;G=+h[o+(z<<6)+8>>3]-E;H=+h[o+(z<<6)>>3]-F;do{if(H==0.0&G==0.0){S=0.0}else{J=+$(+G,+H);if(J>=0.0){S=J;break}S=J+6.283185307179586}}while(0);H=+h[o+(b<<6)+8>>3]-E;G=+h[o+(b<<6)>>3]-F;do{if(G==0.0&H==0.0){U=0.0}else{J=+$(+H,+G);if(J>=0.0){U=J;break}U=J+6.283185307179586}}while(0);G=+Mc[d&15](v,K,e);do{if((O|0)==0){H=S+1.5707963267948966;if(!t){X=0;Y=G;Z=H;_=H;aa=E;ba=F;break}X=0;Y=G;Z=H;_=H;aa=E-G*+W(S);ba=F-G*+V(S)}else{if((O|0)==(p|0)){H=U+ -1.5707963267948966;if(!t){X=0;Y=G;Z=H;_=H;aa=E;ba=F;break}X=0;Y=G;Z=H;_=H;aa=E-G*+W(U);ba=F-G*+V(U);break}H=S-U;if(H<0.0){ca=H+6.283185307179586}else{ca=H}H=1.5707963267948966-ca*.5;J=+V(H);if(J==0.0){da=0.0}else{da=G/J}J=S+1.5707963267948966;I=J+H;if(N){if(da<=G*10.0){X=0;Y=da;Z=I;_=I;aa=E;ba=F;break}}I=U+ -1.5707963267948966;if(I>=0.0&I<6.283185307179586){ea=I}else{ea=I- +R(I/6.283185307179586)*6.283185307179586}if(J>=0.0&J<6.283185307179586){X=1;Y=G;Z=ea;_=J;aa=E;ba=F;break}X=1;Y=G;Z=ea;_=J- +R(J/6.283185307179586)*6.283185307179586;aa=E;ba=F}}while(0);h[l>>3]=ba;h[r>>3]=aa;h[x>>3]=v;a[y]=108;h[u>>3]=Z;h[B>>3]=Y;c[A>>2]=X;h[m>>3]=_;if((q|0)<(C|0)){O=q}else{break}}O=jk(12)|0;N=O;if(!k){fa=ba;ga=aa;ha=Z;ia=Y;ja=O;ka=N;break}t=O;b=O+4|0;z=O+8|0;D=(f|0)==1;L=0;while(1){w=+h[o+(L<<6)>>3];F=+h[o+(L<<6)+8>>3];E=+h[o+(L<<6)+32>>3];G=+h[o+(L<<6)+40>>3];M=c[o+(L<<6)+48>>2]|0;J=+h[o+(L<<6)+56>>3];I=w+G*+V(E);H=F+G*+W(E);la=c[t>>2]|0;if((la|0)<(c[b>>2]|0)){ma=la;na=c[z>>2]|0}else{c[b>>2]=2e3;la=mk(c[z>>2]|0,32e3)|0;c[z>>2]=la;ma=c[t>>2]|0;na=la}c[t>>2]=ma+1;h[na+(ma<<4)>>3]=I;h[na+(ma<<4)+8>>3]=H;do{if((M|0)!=0){if(!D){H=w+G*+V(J);I=w+G*+W(J);la=c[t>>2]|0;if((la|0)<(c[b>>2]|0)){oa=la;pa=c[z>>2]|0}else{c[b>>2]=2e3;la=mk(c[z>>2]|0,32e3)|0;c[z>>2]=la;oa=c[t>>2]|0;pa=la}c[t>>2]=oa+1;h[pa+(oa<<4)>>3]=H;h[pa+(oa<<4)+8>>3]=I;break}I=E-J;if(I>.0017453292519943296){qa=I}else{qa=I+6.283185307179586}if(qa>=3.141592653589793){I=w+G*+V(J);H=w+G*+W(J);la=c[t>>2]|0;if((la|0)<(c[b>>2]|0)){ra=la;sa=c[z>>2]|0}else{c[b>>2]=2e3;la=mk(c[z>>2]|0,32e3)|0;c[z>>2]=la;ra=c[t>>2]|0;sa=la}c[t>>2]=ra+1;h[sa+(ra<<4)>>3]=I;h[sa+(ra<<4)+8>>3]=H;break}H=J+qa;I=w+G*+V(H);ta=F+G*+W(H);la=c[t>>2]|0;if((la|0)<(c[b>>2]|0)){ua=la;va=c[z>>2]|0}else{c[b>>2]=2e3;la=mk(c[z>>2]|0,32e3)|0;c[z>>2]=la;ua=c[t>>2]|0;va=la}c[t>>2]=ua+1;h[va+(ua<<4)>>3]=I;h[va+(ua<<4)+8>>3]=ta;if(G==0.0){break}if(J>H){ta=J;while(1){I=ta+ -6.283185307179586;if(I>H){ta=I}else{wa=I;break}}}else{wa=J}ta=H-wa;if(ta>6.283185307179586){I=ta;while(1){xa=I+ -6.283185307179586;if(xa>6.283185307179586){I=xa}else{ya=xa;break}}}else{ya=ta}I=ya/19.0;la=1;do{xa=H-I*+(la|0);za=w+G*+V(xa);Aa=F+G*+W(xa);Ba=c[t>>2]|0;if((Ba|0)<(c[b>>2]|0)){Ca=Ba;Da=c[z>>2]|0}else{c[b>>2]=2e3;Ba=mk(c[z>>2]|0,32e3)|0;c[z>>2]=Ba;Ca=c[t>>2]|0;Da=Ba}c[t>>2]=Ca+1;h[Da+(Ca<<4)>>3]=za;h[Da+(Ca<<4)+8>>3]=Aa;la=la+1|0;}while((la|0)<20)}}while(0);M=L+1|0;if((M|0)<(C|0)){L=M}else{fa=w;ga=F;ha=E;ia=G;ja=O;ka=N;break}}}else{N=jk(12)|0;fa=0.0;ga=0.0;ha=0.0;ia=0.0;ja=N;ka=N}}while(0);Ca=(g|0)==1;ya=ha+3.141592653589793;do{if(Ca){wa=fa+ia*+V(ha);qa=ga+ia*+W(ha);g=ja;Da=c[g>>2]|0;ua=ja+4|0;if((Da|0)<(c[ua>>2]|0)){Ea=Da;Fa=c[ja+8>>2]|0}else{c[ua>>2]=2e3;Da=ja+8|0;va=mk(c[Da>>2]|0,32e3)|0;c[Da>>2]=va;Ea=c[g>>2]|0;Fa=va}c[g>>2]=Ea+1;h[Fa+(Ea<<4)>>3]=wa;h[Fa+(Ea<<4)+8>>3]=qa;if(ia==0.0){Ga=ha;break}if(ya>ha){qa=ya;while(1){wa=qa+ -6.283185307179586;if(wa>ha){qa=wa}else{Ha=wa;break}}}else{Ha=ya}qa=ha-Ha;if(qa>6.283185307179586){wa=qa;while(1){Y=wa+ -6.283185307179586;if(Y>6.283185307179586){wa=Y}else{Ia=Y;break}}}else{Ia=qa}wa=Ia/19.0;va=ja+8|0;Da=1;while(1){Y=ha-wa*+(Da|0);Z=fa+ia*+V(Y);aa=ga+ia*+W(Y);ra=c[g>>2]|0;if((ra|0)<(c[ua>>2]|0)){Ja=ra;Ka=c[va>>2]|0}else{c[ua>>2]=2e3;ra=mk(c[va>>2]|0,32e3)|0;c[va>>2]=ra;Ja=c[g>>2]|0;Ka=ra}c[g>>2]=Ja+1;h[Ka+(Ja<<4)>>3]=Z;h[Ka+(Ja<<4)+8>>3]=aa;ra=Da+1|0;if((ra|0)<20){Da=ra}else{Ga=ha;break}}}else{wa=fa+ia*+V(ya);qa=ga+ia*+W(ya);Da=ja;g=c[Da>>2]|0;va=ja+4|0;if((g|0)<(c[va>>2]|0)){La=g;Ma=c[ja+8>>2]|0}else{c[va>>2]=2e3;va=ja+8|0;g=mk(c[va>>2]|0,32e3)|0;c[va>>2]=g;La=c[Da>>2]|0;Ma=g}c[Da>>2]=La+1;h[Ma+(La<<4)>>3]=wa;h[Ma+(La<<4)+8>>3]=qa;Ga=ya}}while(0);La=C-2|0;if((La|0)>-1){C=ja;Ma=ja+4|0;Ja=ja+8|0;Ka=(f|0)==1;f=La;while(1){ya=+h[o+(f<<6)>>3];ha=+h[o+(f<<6)+8>>3];Ia=+h[o+(f<<6)+40>>3];La=c[o+(f<<6)+48>>2]|0;Ha=+h[o+(f<<6)+32>>3]+3.141592653589793;qa=+h[o+(f<<6)+56>>3]+3.141592653589793;wa=ya+Ia*+V(qa);aa=ha+Ia*+W(qa);Ea=c[C>>2]|0;if((Ea|0)<(c[Ma>>2]|0)){Na=Ea;Oa=c[Ja>>2]|0}else{c[Ma>>2]=2e3;Ea=mk(c[Ja>>2]|0,32e3)|0;c[Ja>>2]=Ea;Na=c[C>>2]|0;Oa=Ea}c[C>>2]=Na+1;h[Oa+(Na<<4)>>3]=wa;h[Oa+(Na<<4)+8>>3]=aa;do{if((La|0)!=0){if(!Ka){aa=ya+Ia*+V(Ha);wa=ya+Ia*+W(Ha);Ea=c[C>>2]|0;if((Ea|0)<(c[Ma>>2]|0)){Pa=Ea;Qa=c[Ja>>2]|0}else{c[Ma>>2]=2e3;Ea=mk(c[Ja>>2]|0,32e3)|0;c[Ja>>2]=Ea;Pa=c[C>>2]|0;Qa=Ea}c[C>>2]=Pa+1;h[Qa+(Pa<<4)>>3]=aa;h[Qa+(Pa<<4)+8>>3]=wa;break}wa=qa-Ha;if(wa>.0017453292519943296){Ra=wa}else{Ra=wa+6.283185307179586}if(Ra>=3.141592653589793){wa=ya+Ia*+V(Ha);aa=ya+Ia*+W(Ha);Ea=c[C>>2]|0;if((Ea|0)<(c[Ma>>2]|0)){Sa=Ea;Ta=c[Ja>>2]|0}else{c[Ma>>2]=2e3;Ea=mk(c[Ja>>2]|0,32e3)|0;c[Ja>>2]=Ea;Sa=c[C>>2]|0;Ta=Ea}c[C>>2]=Sa+1;h[Ta+(Sa<<4)>>3]=wa;h[Ta+(Sa<<4)+8>>3]=aa;break}aa=Ha+Ra;wa=ya+Ia*+V(aa);Z=ha+Ia*+W(aa);Ea=c[C>>2]|0;if((Ea|0)<(c[Ma>>2]|0)){Ua=Ea;Va=c[Ja>>2]|0}else{c[Ma>>2]=2e3;Ea=mk(c[Ja>>2]|0,32e3)|0;c[Ja>>2]=Ea;Ua=c[C>>2]|0;Va=Ea}c[C>>2]=Ua+1;h[Va+(Ua<<4)>>3]=wa;h[Va+(Ua<<4)+8>>3]=Z;if(Ia==0.0){break}if(Ha>aa){Z=Ha;while(1){wa=Z+ -6.283185307179586;if(wa>aa){Z=wa}else{Wa=wa;break}}}else{Wa=Ha}Z=aa-Wa;if(Z>6.283185307179586){G=Z;while(1){E=G+ -6.283185307179586;if(E>6.283185307179586){G=E}else{Xa=E;break}}}else{Xa=Z}G=Xa/19.0;Ea=1;do{E=aa-G*+(Ea|0);F=ya+Ia*+V(E);w=ha+Ia*+W(E);Fa=c[C>>2]|0;if((Fa|0)<(c[Ma>>2]|0)){Ya=Fa;Za=c[Ja>>2]|0}else{c[Ma>>2]=2e3;Fa=mk(c[Ja>>2]|0,32e3)|0;c[Ja>>2]=Fa;Ya=c[C>>2]|0;Za=Fa}c[C>>2]=Ya+1;h[Za+(Ya<<4)>>3]=F;h[Za+(Ya<<4)+8>>3]=w;Ea=Ea+1|0;}while((Ea|0)<20)}}while(0);if((f|0)>0){f=f-1|0}else{_a=ya;$a=ha;ab=Ha;bb=Ia;break}}}else{_a=fa;$a=ga;ab=Ga;bb=ia}if(!Ca){cb=c[s>>2]|0;db=cb;eF(db);eF(n);i=j;return ka|0}ia=ab+3.141592653589793;Ga=_a+bb*+V(ab);ga=$a+bb*+W(ab);Ca=ja;f=c[Ca>>2]|0;Ya=ja+4|0;if((f|0)<(c[Ya>>2]|0)){eb=f;fb=c[ja+8>>2]|0}else{c[Ya>>2]=2e3;f=ja+8|0;Za=mk(c[f>>2]|0,32e3)|0;c[f>>2]=Za;eb=c[Ca>>2]|0;fb=Za}c[Ca>>2]=eb+1;h[fb+(eb<<4)>>3]=Ga;h[fb+(eb<<4)+8>>3]=ga;if(bb==0.0){cb=c[s>>2]|0;db=cb;eF(db);eF(n);i=j;return ka|0}if(ia>ab){ga=ia;while(1){Ga=ga+ -6.283185307179586;if(Ga>ab){ga=Ga}else{gb=Ga;break}}}else{gb=ia}ia=ab-gb;if(ia>6.283185307179586){gb=ia;while(1){ga=gb+ -6.283185307179586;if(ga>6.283185307179586){gb=ga}else{hb=ga;break}}}else{hb=ia}ia=hb/19.0;eb=ja+8|0;ja=1;do{hb=ab-ia*+(ja|0);gb=_a+bb*+V(hb);ga=$a+bb*+W(hb);fb=c[Ca>>2]|0;if((fb|0)<(c[Ya>>2]|0)){ib=fb;jb=c[eb>>2]|0}else{c[Ya>>2]=2e3;fb=mk(c[eb>>2]|0,32e3)|0;c[eb>>2]=fb;ib=c[Ca>>2]|0;jb=fb}c[Ca>>2]=ib+1;h[jb+(ib<<4)>>3]=gb;h[jb+(ib<<4)+8>>3]=ga;ja=ja+1|0;}while((ja|0)<20);cb=c[s>>2]|0;db=cb;eF(db);eF(n);i=j;return ka|0}function sm(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0.0,t=0,u=0,v=0.0,w=0.0,x=0.0,y=0,z=0,A=0,B=0;f=i;i=i+8|0;g=f|0;c[g>>2]=0;j=e+4|0;k=c[j>>2]|0;if((k|0)==0){cc(115016,154384,202,169928)}l=k|0;m=c[l>>2]|0;if((m|0)==0){cc(126064,154384,205,169928)}n=k+8|0;if((c[n>>2]|0)==0){k=c[43664]|0;do{if((k|0)==0){p=9}else{if((pm(k,m)|0)!=0){p=9;break}q=c[43662]|0}}while(0);if((p|0)==9){c[43664]=m;m=vb(174656,13152,35,36,48)|0;c[43662]=m;q=m}c[n>>2]=q}if((a[213992]|0)==0){r=0}else{q=(Sh(c[l>>2]|0)|0)==0;r=q?0:g}do{if((AB(d,e,r)|0)<<24>>24==0){q=c[j>>2]|0;n=c[q>>2]|0;s=+h[q+16>>3];q=e+32|0;h[q>>3]=0.0;h[e+40>>3]=s*1.2;h[e+16>>3]=0.0;h[e+24>>3]=s*.1;c[e+8>>2]=0;c[e+12>>2]=0;do{if((qm(n,102048,4)|0)==0){t=37952;u=96296}else{if((qm(n,91056,5)|0)==0){t=72360;u=81152;break}if((qm(n,85760,9)|0)==0){t=72360;u=81152;break}t=1216;u=167368}}while(0);if((r|0)!=0){c[r>>2]=u}n=c[e>>2]|0;if((n|0)==0){break}m=a[n]|0;if(m<<24>>24==0){v=0.0}else{p=n;n=m;w=0.0;while(1){m=p+1|0;x=w+ +h[t+((n&255)<<3)>>3];h[q>>3]=x;k=a[m]|0;if(k<<24>>24==0){v=x;break}else{p=m;n=k;w=x}}}h[q>>3]=s*v}}while(0);if((r|0)==0){y=e+32|0;z=b;A=y;c[z>>2]=c[A>>2];c[z+4>>2]=c[A+4>>2];c[z+8>>2]=c[A+8>>2];c[z+12>>2]=c[A+12>>2];i=f;return}r=c[g>>2]|0;g=c[o>>2]|0;t=c[l>>2]|0;if((r|0)==0){gc(g|0,107584,(B=i,i=i+8|0,c[B>>2]=t,B)|0)|0;i=B;y=e+32|0;z=b;A=y;c[z>>2]=c[A>>2];c[z+4>>2]=c[A+4>>2];c[z+8>>2]=c[A+8>>2];c[z+12>>2]=c[A+12>>2];i=f;return}else{gc(g|0,114456,(B=i,i=i+16|0,c[B>>2]=t,c[B+8>>2]=r,B)|0)|0;i=B;y=e+32|0;z=b;A=y;c[z>>2]=c[A>>2];c[z+4>>2]=c[A+4>>2];c[z+8>>2]=c[A+8>>2];c[z+12>>2]=c[A+12>>2];i=f;return}}function tm(a){a=a|0;var b=0,d=0;b=a+108|0;c[b>>2]=0;c[a+112>>2]=32;c[a+116>>2]=-1;c[a+120>>2]=44;c[a+124>>2]=6;c[a+128>>2]=72;c[a+132>>2]=0;c[a+136>>2]=0;c[a+140>>2]=0;d=$g(b,c[43330]|0)|0;c[a+144>>2]=d;return d|0}function um(a,b,d){a=a|0;b=b|0;d=d|0;d=fF(1,32)|0;a=c[b>>2]|0;if((a|0)!=0){c[d>>2]=Lb(a|0)|0}a=c[b+4>>2]|0;if((a|0)!=0){c[d+4>>2]=Lb(a|0)|0}a=d+24|0;c[a>>2]=c[a>>2]&-128|c[b+24>>2]&127;h[d+16>>3]=+h[b+16>>3];c[d+8>>2]=c[b+8>>2];return d|0}function vm(a,b,d){a=a|0;b=b|0;d=d|0;d=c[b>>2]|0;if((d|0)!=0){eF(d)}d=c[b+4>>2]|0;if((d|0)==0){eF(b);return}eF(d);eF(b);return}function wm(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,i=0,j=0,k=0.0,l=0.0;e=c[b>>2]|0;a=c[d>>2]|0;f=(a|0)==0;do{if((e|0)==0){if(f){g=5}else{i=-1}}else{if(f){i=1;break}j=Ya(e|0,a|0)|0;if((j|0)==0){g=5}else{i=j}}}while(0);do{if((g|0)==5){a=c[b+4>>2]|0;e=c[d+4>>2]|0;f=(e|0)==0;if((a|0)==0){if(!f){i=-1;break}}else{if(f){i=1;break}f=Ya(a|0,e|0)|0;if((f|0)!=0){i=f;break}}f=c[b+24>>2]<<25>>25;e=c[d+24>>2]<<25>>25;if((f|0)!=(e|0)){i=f-e|0;break}k=+h[b+16>>3];l=+h[d+16>>3];if(k<l){i=-1;break}i=k>l|0}}while(0);return i|0}function xm(a,b){a=a|0;b=b|0;return pm(c[a>>2]|0,c[b>>2]|0)|0}function ym(){ub(214072)|0;return}function zm(){var a=0,b=0;a=i;i=i+16|0;b=a|0;ub(b|0)|0;i=a;return+(+((c[b+4>>2]|0)+(c[b>>2]|0)-(c[53518]|0)-(c[53519]|0)|0)/60.0)}function Am(a){a=a|0;var b=0,d=0;b=jk(16)|0;d=(a|0)<2?2:a;a=jk(d<<2)|0;c[b>>2]=a;c[b+12>>2]=a;c[b+8>>2]=a;c[b+4>>2]=a+(d<<2);return b|0}function Bm(a){a=a|0;eF(c[a>>2]|0);eF(a);return}function Cm(a,b){a=a|0;b=b|0;var d=0,e=0;d=a+12|0;e=c[d>>2]|0;c[d>>2]=e+4;c[e>>2]=b;if((c[d>>2]|0)>>>0<(c[a+4>>2]|0)>>>0){return}c[d>>2]=c[a>>2];return}function Dm(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=a+8|0;d=c[b>>2]|0;if((d|0)==(c[a+12>>2]|0)){e=0;return e|0}f=d+4|0;c[b>>2]=f;g=c[d>>2]|0;if(f>>>0<(c[a+4>>2]|0)>>>0){e=g;return e|0}c[b>>2]=c[a>>2];e=g;return e|0}function Em(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0;g=i;i=i+8|0;h=g|0;do{if((d|0)==0){j=e}else{k=fw(b,d)|0;if((k|0)==0){j=e;break}if((a[k]|0)==0){j=e;break}l=Ja(k|0,h|0,10)|0;if((k|0)==(c[h>>2]|0)){j=e;break}j=(l|0)<(f|0)?f:l}}while(0);i=g;return j|0}function Fm(b,d,e,f){b=b|0;d=d|0;e=+e;f=+f;var g=0,h=0,j=0.0,k=0,l=0.0;g=i;i=i+8|0;h=g|0;do{if((d|0)==0|(b|0)==0){j=e}else{k=fw(b,d)|0;if((k|0)==0){j=e;break}if((a[k]|0)==0){j=e;break}l=+sF(k,h);if((k|0)==(c[h>>2]|0)){j=e;break}j=l<f?f:l}}while(0);i=g;return+j}function Gm(b){b=b|0;var d=0,e=0,f=0.0,g=0.0,j=0,k=0.0,l=0;d=i;i=i+8|0;e=d|0;f=+h[21580];if(f>0.0){g=f;i=d;return+g}j=Wv(b,0,114184,0)|0;do{if((j|0)==0|(b|0)==0){k=-1.0}else{l=fw(b|0,j)|0;if((l|0)==0){k=-1.0;break}if((a[l]|0)==0){k=-1.0;break}f=+sF(l,e);if((l|0)==(c[e>>2]|0)){k=-1.0;break}k=f<0.0?0.0:f}}while(0);g=k==0.0?72.0:k;i=d;return+g}function Hm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;if((b|0)==0|(a|0)==0){d=c;return d|0}d=fw(a,b)|0;return d|0}function Im(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0;if((c|0)==0|(b|0)==0){e=d}else{e=fw(b,c)|0}do{if((e|0)!=0){if((a[e]|0)==0){break}else{f=e}return f|0}}while(0);f=d;return f|0}function Jm(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;if((b|0)==0){d=c&255;return d|0}else{d=Vm(fw(a,b)|0,0)|0;return d|0}return 0}function Km(a){a=a|0;return Vm(a,0)|0}function Lm(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;b=a+8|0;d=c[b>>2]|0;e=d+220|0;f=c[e>>2]|0;if((f|0)!=0&(f|0)!=(a|0)){g=b;h=e;i=f;j=d}else{k=a;return k|0}do{a=c[(c[i+8>>2]|0)+220>>2]|0;if((a|0)==0){l=j}else{c[h>>2]=a;l=c[g>>2]|0}m=c[l+220>>2]|0;g=m+8|0;j=c[g>>2]|0;h=j+220|0;i=c[h>>2]|0;}while((i|0)!=0&(i|0)!=(m|0));k=m;return k|0}function Mm(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;if((a|0)==(b|0)){d=a;return d|0}e=a+8|0;f=c[e>>2]|0;g=f+220|0;h=c[g>>2]|0;do{if((h|0)==0){c[g>>2]=a;c[(c[e>>2]|0)+216>>2]=1;i=a}else{if((h|0)==(a|0)){i=a;break}else{j=e;k=g;l=h;m=f}do{n=c[(c[l+8>>2]|0)+220>>2]|0;if((n|0)==0){o=m}else{c[k>>2]=n;o=c[j>>2]|0}p=c[o+220>>2]|0;j=p+8|0;m=c[j>>2]|0;k=m+220|0;l=c[k>>2]|0;}while((l|0)!=0&(l|0)!=(p|0));i=p}}while(0);p=b+8|0;l=c[p>>2]|0;k=l+220|0;m=c[k>>2]|0;do{if((m|0)==0){c[k>>2]=b;c[(c[p>>2]|0)+216>>2]=1;q=b}else{if((m|0)==(b|0)){q=b;break}else{r=p;s=k;t=m;u=l}do{j=c[(c[t+8>>2]|0)+220>>2]|0;if((j|0)==0){v=u}else{c[s>>2]=j;v=c[r>>2]|0}w=c[v+220>>2]|0;r=w+8|0;u=c[r>>2]|0;s=u+220|0;t=c[s>>2]|0;}while((t|0)!=0&(t|0)!=(w|0));q=w}}while(0);w=i+8|0;t=c[w>>2]|0;s=q+8|0;u=c[s>>2]|0;if((c[t+120>>2]|0)>(c[u+120>>2]|0)){c[t+220>>2]=q;t=(c[s>>2]|0)+216|0;c[t>>2]=(c[t>>2]|0)+(c[(c[w>>2]|0)+216>>2]|0);d=q;return d|0}else{c[u+220>>2]=i;u=(c[w>>2]|0)+216|0;c[u>>2]=(c[u>>2]|0)+(c[(c[s>>2]|0)+216>>2]|0);d=i;return d|0}return 0}function Nm(b){b=b|0;var d=0;d=b+8|0;c[(c[d>>2]|0)+216>>2]=1;c[(c[d>>2]|0)+220>>2]=0;a[(c[d>>2]|0)+159|0]=0;return}function Om(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;d=a+8|0;e=c[d>>2]|0;f=e+220|0;g=c[f>>2]|0;do{if((g|0)!=0&(g|0)!=(a|0)){h=d;i=f;j=g;k=e;do{l=c[(c[j+8>>2]|0)+220>>2]|0;if((l|0)==0){m=k}else{c[i>>2]=l;m=c[h>>2]|0}n=c[m+220>>2]|0;h=n+8|0;k=c[h>>2]|0;i=k+220|0;j=c[i>>2]|0;}while((j|0)!=0&(j|0)!=(n|0));if((n|0)==(a|0)){o=c[d>>2]|0;break}else{cc(114360,125704,195,171112)}}else{o=e}}while(0);c[o+220>>2]=b;o=(c[b+8>>2]|0)+216|0;c[o>>2]=(c[o>>2]|0)+(c[(c[d>>2]|0)+216>>2]|0);return}function Pm(a,b){a=a|0;b=b|0;var d=0,e=0.0;d=c[(c[b+8>>2]|0)+132>>2]|0;e=+h[d+8>>3]*72.0;h[a>>3]=+h[d>>3]*72.0;h[a+8>>3]=e;return}function Qm(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=+e;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0.0,q=0,r=0.0,s=0.0,t=0,u=0.0,v=0.0,w=0,x=0,y=0,z=0;j=i;i=i+576|0;k=j|0;l=(d|0)<0;do{if(!l){m=0;while(1){n=k+(m<<4)|0;o=b+(m<<4)|0;c[n>>2]=c[o>>2];c[n+4>>2]=c[o+4>>2];c[n+8>>2]=c[o+8>>2];c[n+12>>2]=c[o+12>>2];if((m|0)<(d|0)){m=m+1|0}else{break}}if((d|0)<1){break}p=1.0-e;m=1;while(1){o=d-m|0;if((o|0)>=0){n=m-1|0;q=0;r=+h[k+(n*96|0)>>3];s=+h[k+(n*96|0)+8>>3];while(1){t=q+1|0;u=+h[k+(n*96|0)+(t<<4)>>3];h[k+(m*96|0)+(q<<4)>>3]=p*r+u*e;v=+h[k+(n*96|0)+(t<<4)+8>>3];h[k+(m*96|0)+(q<<4)+8>>3]=p*s+v*e;if((q|0)<(o|0)){q=t;r=u;s=v}else{break}}}if((m|0)<(d|0)){m=m+1|0}else{break}}}}while(0);if(!((f|0)==0|l)){b=0;while(1){m=f+(b<<4)|0;q=k+(b*96|0)|0;c[m>>2]=c[q>>2];c[m+4>>2]=c[q+4>>2];c[m+8>>2]=c[q+8>>2];c[m+12>>2]=c[q+12>>2];if((b|0)<(d|0)){b=b+1|0}else{break}}}if((g|0)==0|l){w=k+(d*96|0)|0;x=a;y=w;c[x>>2]=c[y>>2];c[x+4>>2]=c[y+4>>2];c[x+8>>2]=c[y+8>>2];c[x+12>>2]=c[y+12>>2];i=j;return}else{z=0}while(1){l=g+(z<<4)|0;b=k+((d-z|0)*96|0)+(z<<4)|0;c[l>>2]=c[b>>2];c[l+4>>2]=c[b+4>>2];c[l+8>>2]=c[b+8>>2];c[l+12>>2]=c[b+12>>2];if((z|0)<(d|0)){z=z+1|0}else{break}}w=k+(d*96|0)|0;x=a;y=w;c[x>>2]=c[y>>2];c[x+4>>2]=c[y+4>>2];c[x+8>>2]=c[y+8>>2];c[x+12>>2]=c[y+12>>2];i=j;return}function Rm(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;d=0;while(1){e=c[53742]|0;if((e-d|0)<1024){f=e+1024|0;c[53742]=f;g=mk(c[53740]|0,f)|0;c[53740]=g;h=c[53742]|0;i=g}else{h=e;i=c[53740]|0}e=db(i+d|0,h-d|0,b|0)|0;if((e|0)==0){break}g=(xF(e|0)|0)+d|0;e=c[53740]|0;if((a[e+(g-1)|0]|0)==10){j=g;k=e;l=8;break}else{d=g}}if((l|0)==8){m=(j|0)>0;n=m?k:0;return n|0}j=d;k=c[53740]|0;m=(j|0)>0;n=m?k:0;return n|0}function Sm(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;d=i;if((b|0)==0){e=0;i=d;return e|0}if((a[b]|0)==0){e=0;i=d;return e|0}f=c[53686]|0;if((f|0)==0){g=c[53702]|0;h=c[43778]|0;do{if((c[43774]|0)==(g|0)){j=h}else{if((h|0)==0){k=g}else{eF(c[h>>2]|0);eF(c[43778]|0);c[43778]=0;k=c[53702]|0}c[43774]=k;if((k|0)==0){e=b;i=d;return e|0}if((a[k]|0)==0){e=b;i=d;return e|0}else{l=Tm(k)|0;c[43778]=l;j=l;break}}}while(0);if(!((a[b]|0)!=47&(j|0)!=0)){e=b;i=d;return e|0}k=c[43776]|0;h=c[44762]|0;g=gF(h,k+2+(xF(b|0)|0)|0)|0;c[44762]=g;k=c[j>>2]|0;if((k|0)==0){e=0;i=d;return e|0}nb(g|0,117488,(m=i,i=i+24|0,c[m>>2]=k,c[m+8>>2]=96224,c[m+16>>2]=b,m)|0)|0;i=m;a:do{if((kb(c[44762]|0,4)|0)!=0){k=j;while(1){k=k+4|0;g=c[k>>2]|0;if((g|0)==0){e=0;break}nb(c[44762]|0,117488,(m=i,i=i+24|0,c[m>>2]=g,c[m+8>>2]=96224,c[m+16>>2]=b,m)|0)|0;i=m;if((kb(c[44762]|0,4)|0)==0){break a}}i=d;return e|0}}while(0);e=c[44762]|0;i=d;return e|0}else{j=c[53704]|0;do{if((j|0)!=0){if((a[j]|0)==0){break}if((c[43774]|0)==0){c[43778]=Tm(j)|0;k=c[53704]|0;c[43774]=k;n=k}else{n=j}k=ob(b|0,47)|0;g=(k|0)==0?b:k+1|0;k=ob(g|0,92)|0;h=(k|0)==0?g:k+1|0;k=ob(h|0,58)|0;g=(k|0)==0?h:k+1|0;if(!(a[11872]|(g|0)==(b|0))){Fv(0,101800,(m=i,i=i+16|0,c[m>>2]=b,c[m+8>>2]=n,m)|0)|0;i=m;a[11872]=1}k=c[43778]|0;h=c[43776]|0;l=c[44762]|0;o=gF(l,h+2+(xF(g|0)|0)|0)|0;c[44762]=o;h=c[k>>2]|0;if((h|0)==0){e=0;i=d;return e|0}nb(o|0,117488,(m=i,i=i+24|0,c[m>>2]=h,c[m+8>>2]=96224,c[m+16>>2]=g,m)|0)|0;i=m;b:do{if((kb(c[44762]|0,4)|0)!=0){h=k;while(1){h=h+4|0;o=c[h>>2]|0;if((o|0)==0){e=0;break}nb(c[44762]|0,117488,(m=i,i=i+24|0,c[m>>2]=o,c[m+8>>2]=96224,c[m+16>>2]=g,m)|0)|0;i=m;if((kb(c[44762]|0,4)|0)==0){break b}}i=d;return e|0}}while(0);e=c[44762]|0;i=d;return e|0}}while(0);if(a[11872]|0){e=0;i=d;return e|0}Fv(0,107392,(m=i,i=i+8|0,c[m>>2]=f,m)|0)|0;i=m;a[11872]=1;e=0;i=d;return e|0}return 0}function Tm(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;b=0;d=La(Lb(a|0)|0,117440)|0;a=0;e=0;while(1){if((a|0)==0){f=kk((b<<2)+8|0)|0}else{f=mk(a,(b<<2)+8|0)|0}g=f;h=b+1|0;c[g+(b<<2)>>2]=d;i=xF(d|0)|0;j=e>>>0>i>>>0?e:i;i=La(0,117440)|0;if((i|0)==0){break}else{b=h;d=i;a=g;e=j}}c[g+(h<<2)>>2]=0;c[43776]=j;return g|0}function Um(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;f=c[d>>2]|0;a:do{if((f|0)==0){g=0}else{if((b|0)==0){h=0;while(1){i=h+1|0;if((c[d+(i<<2)>>2]|0)==0){g=i;break a}else{h=i}}}else{j=0;k=f}while(1){if((a[b]|0)==(a[k]|0)){if((Ya(b|0,k|0)|0)==0){g=j;break a}}h=j+1|0;i=c[d+(h<<2)>>2]|0;if((i|0)==0){g=h;break}else{j=h;k=i}}}}while(0);return c[e+(g<<2)>>2]|0}function Vm(b,c){b=b|0;c=c|0;var d=0,e=0;do{if((b|0)==0){d=c}else{e=a[b]|0;if(e<<24>>24==0){d=c;break}if((pm(b,90984)|0)==0){d=0;break}if((pm(b,85704)|0)==0){d=0;break}if((pm(b,81088)|0)==0){d=1;break}if((pm(b,167288)|0)==0){d=1;break}if(((e<<24>>24)-48|0)>>>0>=10>>>0){d=c;break}d=(Rb(b|0)|0)&255}}while(0);return d|0}function Wm(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0.0,m=0.0,n=0.0,o=0,p=0,q=0,r=0.0,s=0,t=0,u=0,v=0.0,w=0.0,x=0.0,y=0,z=0,A=0,B=0.0,C=0,D=0,E=0,F=0,G=0.0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0;e=i;i=i+640|0;f=d;d=i;i=i+16|0;c[d>>2]=c[f>>2];c[d+4>>2]=c[f+4>>2];c[d+8>>2]=c[f+8>>2];c[d+12>>2]=c[f+12>>2];f=e|0;g=e+576|0;j=c[b+4>>2]|0;k=c[b>>2]|0;l=+h[d>>3];m=+h[d+8>>3];if((j|0)>0){n=1.0e+38;d=-1;b=-1;o=0;while(1){p=c[k+(o*48|0)>>2]|0;q=c[k+(o*48|0)+4>>2]|0;if((q|0)>0){r=n;s=d;t=b;u=0;while(1){v=+h[p+(u<<4)>>3]-l;w=+h[p+(u<<4)+8>>3]-m;x=v*v+w*w;y=(s|0)==-1|x<r;w=y?x:r;z=y?u:s;A=y?o:t;y=u+1|0;if((y|0)<(q|0)){r=w;s=z;t=A;u=y}else{B=w;C=z;D=A;break}}}else{B=n;C=d;D=b}u=o+1|0;if((u|0)<(j|0)){n=B;d=C;b=D;o=u}else{E=C;F=D;break}}}else{E=-1;F=-1}D=c[k+(F*48|0)>>2]|0;C=(((E|0)==((c[k+(F*48|0)+4>>2]|0)-1|0))<<31>>31)+E|0;E=C-((C|0)%3|0)|0;B=+h[D+(E<<4)>>3];h[g>>3]=B;n=+h[D+(E<<4)+8>>3];h[g+8>>3]=n;C=E+1|0;h[g+16>>3]=+h[D+(C<<4)>>3];h[g+24>>3]=+h[D+(C<<4)+8>>3];C=E+2|0;h[g+32>>3]=+h[D+(C<<4)>>3];h[g+40>>3]=+h[D+(C<<4)+8>>3];C=E+3|0;r=+h[D+(C<<4)>>3];h[g+48>>3]=r;w=+h[D+(C<<4)+8>>3];h[g+56>>3]=w;x=B-l;B=n-m;n=r-l;r=w-m;C=f+288|0;w=1.0;v=0.0;G=n*n+r*r;r=x*x+B*B;while(1){D=f;E=g;c[D>>2]=c[E>>2];c[D+4>>2]=c[E+4>>2];c[D+8>>2]=c[E+8>>2];c[D+12>>2]=c[E+12>>2];E=f+16|0;D=g+16|0;c[E>>2]=c[D>>2];c[E+4>>2]=c[D+4>>2];c[E+8>>2]=c[D+8>>2];c[E+12>>2]=c[D+12>>2];D=f+32|0;E=g+32|0;c[D>>2]=c[E>>2];c[D+4>>2]=c[E+4>>2];c[D+8>>2]=c[E+8>>2];c[D+12>>2]=c[E+12>>2];E=f+48|0;D=g+48|0;c[E>>2]=c[D>>2];c[E+4>>2]=c[D+4>>2];c[E+8>>2]=c[D+8>>2];c[E+12>>2]=c[D+12>>2];B=(v+w)*.5;x=1.0-B;D=0;n=+h[f>>3];H=+h[f+8>>3];while(1){E=D+1|0;I=+h[f+(E<<4)>>3];h[f+96+(D<<4)>>3]=x*n+B*I;J=+h[f+(E<<4)+8>>3];h[f+96+(D<<4)+8>>3]=x*H+B*J;if((D|0)<2){D=E;n=I;H=J}else{break}}D=0;H=+h[f+96>>3];n=+h[f+104>>3];while(1){E=D+1|0;J=+h[f+96+(E<<4)>>3];h[f+192+(D<<4)>>3]=x*H+B*J;I=+h[f+96+(E<<4)+8>>3];h[f+192+(D<<4)+8>>3]=x*n+B*I;if((D|0)<1){D=E;H=J;n=I}else{break}}n=+h[f+200>>3];h[f+288>>3]=x*+h[f+192>>3]+B*+h[f+208>>3];K=x*n+B*+h[f+216>>3];h[f+296>>3]=K;L=+h[C>>3];if(+S(+(r-G))<1.0){M=10;break}if(+S(+(w-v))<1.0e-5){M=10;break}D=r<G;n=L-l;H=K-m;I=n*n+H*H;w=D?B:w;v=D?v:B;G=D?I:G;r=D?r:I}if((M|0)==10){h[a>>3]=L;h[a+8>>3]=K;i=e;return}}function Xm(){return c[53510]|0}function Ym(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0.0,o=0,p=0.0,q=0.0,r=0,s=0,t=0,u=0.0,v=0,w=0,x=0,y=0,z=0;d=i;i=i+32|0;e=d|0;f=d+8|0;g=d+16|0;j=d+24|0;k=b|0;l=c[53574]|0;m=(b|0)==0;do{if((l|0)==0|m){n=.75}else{o=fw(k,l)|0;if((o|0)==0){n=.75;break}if((a[o]|0)==0){n=.75;break}p=+sF(o,j);if((o|0)==(c[j>>2]|0)){n=.75;break}n=p<.01?.01:p}}while(0);j=b+8|0;h[(c[j>>2]|0)+32>>3]=n;l=c[53618]|0;do{if((l|0)==0|m){q=.5}else{o=fw(k,l)|0;if((o|0)==0){q=.5;break}if((a[o]|0)==0){q=.5;break}n=+sF(o,g);if((o|0)==(c[g>>2]|0)){q=.5;break}q=n<.02?.02:n}}while(0);h[(c[j>>2]|0)+40>>3]=q;g=c[53590]|0;if((g|0)==0|m){r=159064;s=13}else{l=fw(k,g)|0;if((l|0)==0){s=14}else{r=l;s=13}}if((s|0)==13){if((a[r]|0)==0){s=14}else{t=r}}if((s|0)==14){t=159064}r=vl(t,b)|0;c[(c[j>>2]|0)+8>>2]=r;r=fw(k,c[53614]|0)|0;t=c[53624]|0;do{if((t|0)==0|m){u=14.0}else{l=fw(k,t)|0;if((l|0)==0){u=14.0;break}if((a[l]|0)==0){u=14.0;break}q=+sF(l,f);if((l|0)==(c[f>>2]|0)){u=14.0;break}u=q<1.0?1.0:q}}while(0);f=c[53626]|0;if((f|0)==0|m){v=154088;s=22}else{t=fw(k,f)|0;if((t|0)==0){s=23}else{v=t;s=22}}if((s|0)==22){if((a[v]|0)==0){s=23}else{w=v}}if((s|0)==23){w=154088}v=c[53628]|0;if((v|0)==0|m){x=150904;s=26}else{m=fw(k,v)|0;if((m|0)==0){s=27}else{x=m;s=26}}if((s|0)==26){if((a[x]|0)==0){s=27}else{y=x}}if((s|0)==27){y=150904}s=(gy(r)|0)!=0;x=(pl(b)|0)==2;m=ak(k,r,(x?4:0)|(s?2:0),u,w,y)|0;c[(c[j>>2]|0)+104>>2]=m;m=c[53572]|0;do{if((m|0)!=0){s=fw(k,m)|0;if((s|0)==0){break}if((a[s]|0)==0){break}x=(gy(s)|0)!=0;r=ak(k,s,x?2:0,u,w,y)|0;c[(c[j>>2]|0)+108>>2]=r;r=(c[(Hx(k)|0)+8>>2]|0)+113|0;a[r]=a[r]|16}}while(0);y=c[53588]|0;do{if((y|0)==0){z=0}else{w=fw(k,y)|0;if((w|0)==0){z=0;break}if((a[w]|0)==0){z=0;break}m=Ja(w|0,e|0,10)|0;if((w|0)==(c[e>>2]|0)){z=0;break}z=(m|0)<0?0:m&255}}while(0);a[(c[j>>2]|0)+144|0]=z;Cc[c[c[(c[(c[j>>2]|0)+8>>2]|0)+4>>2]>>2]&255](b);i=d;return}function Zm(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0.0,y=0,z=0,A=0,B=0,C=0,D=0,E=0.0,F=0,G=0.0,H=0,I=0,J=0,K=0,L=0,M=0,N=0.0,O=0,P=0,Q=0.0,R=0,S=0,T=0,U=0.0,V=0,W=0,X=0.0,Y=0,Z=0,_=0.0,$=0,aa=0,ba=0.0,ca=0,da=0,ea=0,fa=0.0,ga=0,ha=0,ia=0.0,ja=0,ka=0,la=0,ma=0,na=0.0,oa=0,pa=0,qa=0,ra=0.0,sa=0,ta=0,ua=0.0,va=0,wa=0,xa=0,ya=0.0,za=0,Aa=0,Ba=0;d=i;i=i+328|0;e=d|0;f=d+8|0;g=d+16|0;h=d+24|0;j=d+32|0;k=d+72|0;l=d+112|0;m=d+152|0;n=d+192|0;o=d+232|0;p=d+240|0;q=d+248|0;r=d+288|0;s=b;t=b+32|0;u=Hx(c[((c[s>>2]&3|0)==3?b:t)+28>>2]|0)|0;v=c[53790]|0;do{if((v|0)==0){w=0;x=0.0;y=0;z=0}else{A=b|0;B=fw(A,v)|0;if((B|0)==0){w=0;x=0.0;y=0;z=0;break}if((a[B]|0)==0){w=0;x=0.0;y=0;z=0;break}C=c[53796]|0;D=(b|0)==0;do{if((C|0)==0|D){E=14.0}else{F=fw(A,C)|0;if((F|0)==0){E=14.0;break}if((a[F]|0)==0){E=14.0;break}G=+sF(F,p);if((F|0)==(c[p>>2]|0)){E=14.0;break}E=G<1.0?1.0:G}}while(0);C=c[53798]|0;if((C|0)==0|D){H=154088;I=11}else{F=fw(A,C)|0;if((F|0)==0){I=12}else{H=F;I=11}}if((I|0)==11){if((a[H]|0)==0){I=12}else{J=H}}if((I|0)==12){J=154088}F=c[53800]|0;if((F|0)==0|D){K=150904;I=15}else{C=fw(A,F)|0;if((C|0)==0){I=16}else{K=C;I=15}}if((I|0)==15){if((a[K]|0)==0){I=16}else{L=K}}if((I|0)==16){L=150904}C=(gy(B)|0)!=0;F=ak(A,B,C?2:0,E,J,L)|0;C=b+8|0;c[(c[C>>2]|0)+96>>2]=F;F=(c[u+8>>2]|0)+113|0;a[F]=a[F]|1;F=c[53788]|0;if((F|0)==0|D){M=90984}else{M=fw(A,F)|0}F=Vm(M,0)|0;a[(c[C>>2]|0)+114|0]=F;w=1;x=E;y=J;z=L}}while(0);L=c[53748]|0;do{if((L|0)==0){N=x;O=y;P=z}else{J=b|0;M=fw(J,L)|0;if((M|0)==0){N=x;O=y;P=z;break}if((a[M]|0)==0){N=x;O=y;P=z;break}do{if((y|0)==0){K=c[53796]|0;H=(b|0)==0;do{if((K|0)==0|H){Q=14.0}else{p=fw(J,K)|0;if((p|0)==0){Q=14.0;break}if((a[p]|0)==0){Q=14.0;break}E=+sF(p,o);if((p|0)==(c[o>>2]|0)){Q=14.0;break}Q=E<1.0?1.0:E}}while(0);K=c[53798]|0;if((K|0)==0|H){R=154088;I=31}else{p=fw(J,K)|0;if((p|0)==0){I=32}else{R=p;I=31}}if((I|0)==31){if((a[R]|0)==0){I=32}else{S=R}}if((I|0)==32){S=154088}p=c[53800]|0;if((p|0)==0|H){T=150904;I=35}else{K=fw(J,p)|0;if((K|0)!=0){T=K;I=35}}if((I|0)==35){if((a[T]|0)!=0){U=Q;V=S;W=T;break}}U=Q;V=S;W=150904}else{U=x;V=y;W=z}}while(0);A=(gy(M)|0)!=0;D=ak(J,M,A?2:0,U,V,W)|0;c[(c[b+8>>2]|0)+108>>2]=D;D=(c[u+8>>2]|0)+113|0;a[D]=a[D]|32;N=U;O=V;P=W}}while(0);W=c[53792]|0;do{if((W|0)==0){X=0.0;Y=0;Z=0;_=N;$=O;aa=P}else{V=b|0;z=fw(V,W)|0;if((z|0)==0){X=0.0;Y=0;Z=0;_=N;$=O;aa=P;break}if((a[z]|0)==0){X=0.0;Y=0;Z=0;_=N;$=O;aa=P;break}do{if((O|0)==0){y=c[53796]|0;S=(b|0)==0;do{if((y|0)==0|S){ba=14.0}else{T=fw(V,y)|0;if((T|0)==0){ba=14.0;break}if((a[T]|0)==0){ba=14.0;break}U=+sF(T,h);if((T|0)==(c[h>>2]|0)){ba=14.0;break}ba=U<1.0?1.0:U}}while(0);y=c[53798]|0;if((y|0)==0|S){ca=154088;I=49}else{H=fw(V,y)|0;if((H|0)==0){I=50}else{ca=H;I=49}}if((I|0)==49){if((a[ca]|0)==0){I=50}else{da=ca}}if((I|0)==50){da=154088}H=c[53800]|0;if((H|0)==0|S){ea=150904;I=53}else{y=fw(V,H)|0;if((y|0)!=0){ea=y;I=53}}if((I|0)==53){if((a[ea]|0)!=0){fa=ba;ga=da;ha=ea;break}}fa=ba;ga=da;ha=150904}else{fa=N;ga=O;ha=P}}while(0);M=c[53778]|0;J=(b|0)==0;do{if((M|0)==0|J){ia=fa}else{y=fw(V,M)|0;if((y|0)==0){ia=fa;break}if((a[y]|0)==0){ia=fa;break}U=+sF(y,g);if((y|0)==(c[g>>2]|0)){ia=fa;break}ia=U<1.0?1.0:U}}while(0);M=c[53780]|0;if((M|0)==0|J){ja=ga}else{ja=fw(V,M)|0}if((ja|0)==0){I=64}else{if((a[ja]|0)==0){I=64}else{ka=ja}}if((I|0)==64){ka=ga}M=c[53782]|0;if((M|0)==0|J){la=ha}else{la=fw(V,M)|0}if((la|0)==0){I=69}else{if((a[la]|0)==0){I=69}else{ma=la}}if((I|0)==69){ma=ha}M=(gy(z)|0)!=0;y=ak(V,z,M?2:0,ia,ka,ma)|0;c[(c[b+8>>2]|0)+100>>2]=y;y=(c[u+8>>2]|0)+113|0;a[y]=a[y]|2;X=ia;Y=ka;Z=ma;_=fa;$=ga;aa=ha}}while(0);ha=c[53756]|0;ga=b|0;do{if((ha|0)!=0){ma=fw(ga,ha)|0;if((ma|0)==0){break}if((a[ma]|0)==0){break}do{if((Y|0)==0){do{if(($|0)==0){ka=c[53796]|0;la=(b|0)==0;do{if((ka|0)==0|la){na=14.0}else{ja=fw(ga,ka)|0;if((ja|0)==0){na=14.0;break}if((a[ja]|0)==0){na=14.0;break}fa=+sF(ja,f);if((ja|0)==(c[f>>2]|0)){na=14.0;break}na=fa<1.0?1.0:fa}}while(0);ka=c[53798]|0;if((ka|0)==0|la){oa=154088;I=83}else{ja=fw(ga,ka)|0;if((ja|0)==0){I=84}else{oa=ja;I=83}}if((I|0)==83){if((a[oa]|0)==0){I=84}else{pa=oa}}if((I|0)==84){pa=154088}ja=c[53800]|0;if((ja|0)==0|la){qa=150904;I=87}else{ka=fw(ga,ja)|0;if((ka|0)!=0){qa=ka;I=87}}if((I|0)==87){if((a[qa]|0)!=0){ra=na;sa=pa;ta=qa;break}}ra=na;sa=pa;ta=150904}else{ra=_;sa=$;ta=aa}}while(0);S=c[53778]|0;ka=(b|0)==0;do{if((S|0)==0|ka){ua=ra}else{ja=fw(ga,S)|0;if((ja|0)==0){ua=ra;break}if((a[ja]|0)==0){ua=ra;break}fa=+sF(ja,e);if((ja|0)==(c[e>>2]|0)){ua=ra;break}ua=fa<1.0?1.0:fa}}while(0);S=c[53780]|0;if((S|0)==0|ka){va=sa}else{va=fw(ga,S)|0}if((va|0)==0){I=98}else{if((a[va]|0)==0){I=98}else{wa=va}}if((I|0)==98){wa=sa}S=c[53782]|0;if((S|0)==0|ka){xa=ta}else{xa=fw(ga,S)|0}if((xa|0)!=0){if((a[xa]|0)!=0){ya=ua;za=wa;Aa=xa;break}}ya=ua;za=wa;Aa=ta}else{ya=X;za=Y;Aa=Z}}while(0);z=(gy(ma)|0)!=0;V=ak(ga,ma,z?2:0,ya,za,Aa)|0;c[(c[b+8>>2]|0)+104>>2]=V;V=(c[u+8>>2]|0)+113|0;a[V]=a[V]|4}}while(0);u=ew(ga,148040)|0;Aa=(u|0)!=0?u:213424;if((a[Aa]|0)!=0){a[(c[(c[((c[s>>2]&3|0)==3?b:t)+28>>2]|0)+8>>2]|0)+145|0]=1}u=b+8|0;za=c[u>>2]|0;Z=za+16|0;Y=c[((c[s>>2]&3|0)==3?b:t)+28>>2]|0;t=c[(c[(c[(c[Y+8>>2]|0)+8>>2]|0)+4>>2]|0)+8>>2]|0;ta=l|0;l=m;wa=n;do{if((Aa|0)==0){I=110}else{xa=gb(Aa|0,58)|0;if((xa|0)==0){I=110;break}a[xa]=0;Vc[t&63](m,Y,Aa,xa+1|0);c[ta>>2]=c[l>>2];c[ta+4>>2]=c[l+4>>2];c[ta+8>>2]=c[l+8>>2];c[ta+12>>2]=c[l+12>>2];c[ta+16>>2]=c[l+16>>2];c[ta+20>>2]=c[l+20>>2];c[ta+24>>2]=c[l+24>>2];c[ta+28>>2]=c[l+28>>2];c[ta+32>>2]=c[l+32>>2];a[xa]=58}}while(0);if((I|0)==110){Vc[t&63](n,Y,Aa,0);c[ta>>2]=c[wa>>2];c[ta+4>>2]=c[wa+4>>2];c[ta+8>>2]=c[wa+8>>2];c[ta+12>>2]=c[wa+12>>2];c[ta+16>>2]=c[wa+16>>2];c[ta+20>>2]=c[wa+20>>2];c[ta+24>>2]=c[wa+24>>2];c[ta+28>>2]=c[wa+28>>2];c[ta+32>>2]=c[wa+32>>2]}wa=q|0;c[wa>>2]=c[ta>>2];c[wa+4>>2]=c[ta+4>>2];c[wa+8>>2]=c[ta+8>>2];c[wa+12>>2]=c[ta+12>>2];c[wa+16>>2]=c[ta+16>>2];c[wa+20>>2]=c[ta+20>>2];c[wa+24>>2]=c[ta+24>>2];c[wa+28>>2]=c[ta+28>>2];c[wa+32>>2]=c[ta+32>>2];q=Z;c[q>>2]=c[wa>>2];c[q+4>>2]=c[wa+4>>2];c[q+8>>2]=c[wa+8>>2];c[q+12>>2]=c[wa+12>>2];c[q+16>>2]=c[wa+16>>2];c[q+20>>2]=c[wa+20>>2];c[q+24>>2]=c[wa+24>>2];c[q+28>>2]=c[wa+28>>2];c[q+32>>2]=c[wa+32>>2];c[za+52>>2]=Aa;Aa=c[53758]|0;do{if((Aa|0)!=0){za=fw(ga,Aa)|0;if((za|0)==0){break}if((a[za]|0)==0){break}if((Vm(za,0)|0)<<24>>24!=0){break}a[(c[u>>2]|0)+46|0]=0}}while(0);Aa=ew(ga,141944)|0;za=(Aa|0)!=0?Aa:213424;if((a[za]|0)==0){Ba=b-32|0}else{Aa=b-32|0;a[(c[(c[((c[s>>2]&3|0)==2?b:Aa)+28>>2]|0)+8>>2]|0)+145|0]=1;Ba=Aa}Aa=c[u>>2]|0;wa=Aa+56|0;q=c[((c[s>>2]&3|0)==2?b:Ba)+28>>2]|0;Ba=c[(c[(c[(c[q+8>>2]|0)+8>>2]|0)+4>>2]|0)+8>>2]|0;b=j;s=k;do{if((za|0)==0){I=122}else{Z=gb(za|0,58)|0;if((Z|0)==0){I=122;break}a[Z]=0;Vc[Ba&63](j,q,za,Z+1|0);c[ta>>2]=c[b>>2];c[ta+4>>2]=c[b+4>>2];c[ta+8>>2]=c[b+8>>2];c[ta+12>>2]=c[b+12>>2];c[ta+16>>2]=c[b+16>>2];c[ta+20>>2]=c[b+20>>2];c[ta+24>>2]=c[b+24>>2];c[ta+28>>2]=c[b+28>>2];c[ta+32>>2]=c[b+32>>2];a[Z]=58}}while(0);if((I|0)==122){Vc[Ba&63](k,q,za,0);c[ta>>2]=c[s>>2];c[ta+4>>2]=c[s+4>>2];c[ta+8>>2]=c[s+8>>2];c[ta+12>>2]=c[s+12>>2];c[ta+16>>2]=c[s+16>>2];c[ta+20>>2]=c[s+20>>2];c[ta+24>>2]=c[s+24>>2];c[ta+28>>2]=c[s+28>>2];c[ta+32>>2]=c[s+32>>2]}s=r|0;c[s>>2]=c[ta>>2];c[s+4>>2]=c[ta+4>>2];c[s+8>>2]=c[ta+8>>2];c[s+12>>2]=c[ta+12>>2];c[s+16>>2]=c[ta+16>>2];c[s+20>>2]=c[ta+20>>2];c[s+24>>2]=c[ta+24>>2];c[s+28>>2]=c[ta+28>>2];c[s+32>>2]=c[ta+32>>2];ta=wa;c[ta>>2]=c[s>>2];c[ta+4>>2]=c[s+4>>2];c[ta+8>>2]=c[s+8>>2];c[ta+12>>2]=c[s+12>>2];c[ta+16>>2]=c[s+16>>2];c[ta+20>>2]=c[s+20>>2];c[ta+24>>2]=c[s+24>>2];c[ta+28>>2]=c[s+28>>2];c[ta+32>>2]=c[s+32>>2];c[Aa+92>>2]=za;za=c[53794]|0;if((za|0)==0){i=d;return w|0}Aa=fw(ga,za)|0;if((Aa|0)==0){i=d;return w|0}if((a[Aa]|0)==0){i=d;return w|0}if((Vm(Aa,0)|0)<<24>>24!=0){i=d;return w|0}a[(c[u>>2]|0)+86|0]=0;i=d;return w|0}function _m(a,b){a=a|0;b=b|0;var e=0,f=0,g=0.0,i=0,j=0.0,l=0,m=0.0,n=0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0;e=c[a+8>>2]|0;a=c[e+116>>2]|0;f=e+16|0;g=(c[k>>2]=d[f]|d[f+1|0]<<8|d[f+2|0]<<16|d[f+3|0]<<24,c[k+4>>2]=d[f+4|0]|d[f+5|0]<<8|d[f+6|0]<<16|d[f+7|0]<<24,+h[k>>3]);i=e+24|0;j=(c[k>>2]=d[i]|d[i+1|0]<<8|d[i+2|0]<<16|d[i+3|0]<<24,c[k+4>>2]=d[i+4|0]|d[i+5|0]<<8|d[i+6|0]<<16|d[i+7|0]<<24,+h[k>>3]);l=e+32|0;m=(c[k>>2]=d[l]|d[l+1|0]<<8|d[l+2|0]<<16|d[l+3|0]<<24,c[k+4>>2]=d[l+4|0]|d[l+5|0]<<8|d[l+6|0]<<16|d[l+7|0]<<24,+h[k>>3]);n=e+40|0;o=(c[k>>2]=d[n]|d[n+1|0]<<8|d[n+2|0]<<16|d[n+3|0]<<24,c[k+4>>2]=d[n+4|0]|d[n+5|0]<<8|d[n+6|0]<<16|d[n+7|0]<<24,+h[k>>3]);p=+h[b+56>>3];q=+h[b+64>>3];e=(a&1|0)==0;r=+h[b+24>>3];s=+h[b+32>>3];t=(e?r:s)*.5;u=p-t;v=p+t;t=(e?s:r)*.5;r=q-t;s=q+t;h[f>>3]=u<g?u:g;h[i>>3]=r<j?r:j;h[l>>3]=v>m?v:m;h[n>>3]=s>o?s:o;return}function $m(b){b=b|0;var d=0,e=0,f=0.0,g=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0,p=0,q=0.0,r=0.0,s=0.0,t=0.0,u=0.0,v=0.0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0.0,J=0,K=0.0,L=0.0,M=0.0,N=0.0,O=0,P=0,Q=0,R=0,S=0,T=0.0,U=0,V=0.0,W=0.0,X=0.0,Y=0.0,Z=0.0,_=0,$=0.0,aa=0.0,ba=0.0,ca=0.0,da=0.0,ea=0.0,fa=0.0,ga=0.0,ha=0.0,ia=0.0,ja=0.0,ka=0.0,la=0.0,ma=0.0,na=0.0,oa=0.0,pa=0.0,qa=0.0,ra=0.0,sa=0.0,ta=0.0,ua=0.0,va=0.0,wa=0.0,xa=0.0,ya=0.0,za=0.0,Aa=0.0;do{if((Lw(b)|0)==0){if((c[(c[b+8>>2]|0)+172>>2]|0)!=0){break}return}}while(0);d=ux(b)|0;e=b+8|0;if((d|0)==0){f=-2147483647.0;g=-2147483647.0;i=2147483647.0;j=2147483647.0}else{k=-2147483647.0;l=-2147483647.0;m=2147483647.0;n=2147483647.0;o=d;while(1){d=c[o+8>>2]|0;p=c[d+132>>2]|0;q=+h[p>>3]*72.0;r=+h[p+8>>3]*72.0;s=(+h[d+88>>3]+ +h[d+96>>3])*.5;t=+h[d+80>>3]*.5;u=q-s;v=r-t;w=q+s;s=r+t;t=n<u?n:u;u=m<v?m:v;v=l>w?l:w;w=k>s?k:s;p=c[d+108>>2]|0;do{if((p|0)==0){x=t;y=u;z=v;A=w}else{if((a[p+81|0]|0)==0){x=t;y=u;z=v;A=w;break}s=+h[p+56>>3];r=+h[p+64>>3];d=(c[(c[e>>2]|0)+116>>2]&1|0)==0;q=+h[p+24>>3];B=+h[p+32>>3];C=(d?q:B)*.5;D=s-C;E=s+C;C=D<t?D:t;D=E>v?E:v;E=(d?B:q)*.5;q=r-E;B=r+E;E=q<u?q:u;if(B<=w){x=C;y=E;z=D;A=w;break}x=C;y=E;z=D;A=B}}while(0);p=mw(b,o)|0;if((p|0)==0){F=A;G=z;H=y;I=x}else{w=A;u=z;v=y;t=x;d=p;while(1){p=c[d+8>>2]|0;J=c[p+8>>2]|0;do{if((J|0)==0){K=t;L=v;M=u;N=w}else{O=c[J+4>>2]|0;if((O|0)>0){P=c[J>>2]|0;B=w;D=u;E=v;C=t;Q=0;while(1){R=c[P+(Q*48|0)+4>>2]|0;if((R|0)>0){S=c[P+(Q*48|0)>>2]|0;q=B;r=D;s=E;T=C;U=0;while(1){V=+h[S+(U<<4)>>3];W=+h[S+(U<<4)+8>>3];X=T<V?T:V;Y=s<W?s:W;Z=r>V?r:V;V=q>W?q:W;_=U+1|0;if((_|0)<(R|0)){q=V;r=Z;s=Y;T=X;U=_}else{$=V;aa=Z;ba=Y;ca=X;break}}}else{$=B;aa=D;ba=E;ca=C}U=Q+1|0;if((U|0)<(O|0)){B=$;D=aa;E=ba;C=ca;Q=U}else{da=$;ea=aa;fa=ba;ga=ca;break}}}else{da=w;ea=u;fa=v;ga=t}Q=c[p+96>>2]|0;do{if((Q|0)==0){ha=ga;ia=fa;ja=ea;ka=da}else{if((a[Q+81|0]|0)==0){ha=ga;ia=fa;ja=ea;ka=da;break}C=+h[Q+56>>3];E=+h[Q+64>>3];O=(c[(c[e>>2]|0)+116>>2]&1|0)==0;D=+h[Q+24>>3];B=+h[Q+32>>3];T=(O?D:B)*.5;s=C-T;r=C+T;T=s<ga?s:ga;s=r>ea?r:ea;r=(O?B:D)*.5;D=E-r;B=E+r;r=D<fa?D:fa;if(B<=da){ha=T;ia=r;ja=s;ka=da;break}ha=T;ia=r;ja=s;ka=B}}while(0);Q=c[p+100>>2]|0;do{if((Q|0)==0){la=ha;ma=ia;na=ja;oa=ka}else{if((a[Q+81|0]|0)==0){la=ha;ma=ia;na=ja;oa=ka;break}B=+h[Q+56>>3];s=+h[Q+64>>3];O=(c[(c[e>>2]|0)+116>>2]&1|0)==0;r=+h[Q+24>>3];T=+h[Q+32>>3];D=(O?r:T)*.5;E=B-D;C=B+D;D=E<ha?E:ha;E=C>ja?C:ja;C=(O?T:r)*.5;r=s-C;T=s+C;C=r<ia?r:ia;if(T<=ka){la=D;ma=C;na=E;oa=ka;break}la=D;ma=C;na=E;oa=T}}while(0);Q=c[p+104>>2]|0;do{if((Q|0)==0){pa=la;qa=ma;ra=na;sa=oa}else{if((a[Q+81|0]|0)==0){pa=la;qa=ma;ra=na;sa=oa;break}T=+h[Q+56>>3];E=+h[Q+64>>3];O=(c[(c[e>>2]|0)+116>>2]&1|0)==0;C=+h[Q+24>>3];D=+h[Q+32>>3];r=(O?C:D)*.5;s=T-r;B=T+r;r=s<la?s:la;s=B>na?B:na;B=(O?D:C)*.5;C=E-B;D=E+B;B=C<ma?C:ma;if(D<=oa){pa=r;qa=B;ra=s;sa=oa;break}pa=r;qa=B;ra=s;sa=D}}while(0);Q=c[p+108>>2]|0;if((Q|0)==0){K=pa;L=qa;M=ra;N=sa;break}if((a[Q+81|0]|0)==0){K=pa;L=qa;M=ra;N=sa;break}D=+h[Q+56>>3];s=+h[Q+64>>3];O=(c[(c[e>>2]|0)+116>>2]&1|0)==0;B=+h[Q+24>>3];r=+h[Q+32>>3];C=(O?B:r)*.5;E=D-C;T=D+C;C=E<pa?E:pa;E=T>ra?T:ra;T=(O?r:B)*.5;B=s-T;r=s+T;T=B<qa?B:qa;if(r<=sa){K=C;L=T;M=E;N=sa;break}K=C;L=T;M=E;N=r}}while(0);p=ow(b,d)|0;if((p|0)==0){F=N;G=M;H=L;I=K;break}else{w=N;u=M;v=L;t=K;d=p}}}d=vx(b,o)|0;if((d|0)==0){f=F;g=G;i=H;j=I;break}else{k=F;l=G;m=H;n=I;o=d}}}o=c[e>>2]|0;e=c[o+172>>2]|0;if((e|0)<1){ta=f;ua=g;va=i;wa=j}else{b=c[o+176>>2]|0;I=f;f=g;g=i;i=j;d=1;while(1){p=c[(c[b+(d<<2)>>2]|0)+8>>2]|0;j=+h[p+16>>3];n=+h[p+24>>3];H=+h[p+32>>3];m=+h[p+40>>3];G=i<j?i:j;j=g<n?g:n;n=f>H?f:H;H=I>m?I:m;if((d|0)<(e|0)){I=H;f=n;g=j;i=G;d=d+1|0}else{ta=H;ua=n;va=j;wa=G;break}}}d=c[o+12>>2]|0;do{if((d|0)==0){xa=wa;ya=va;za=ua;Aa=ta}else{if((a[d+81|0]|0)==0){xa=wa;ya=va;za=ua;Aa=ta;break}i=+h[d+56>>3];g=+h[d+64>>3];e=(c[o+116>>2]&1|0)==0;f=+h[d+24>>3];I=+h[d+32>>3];G=(e?f:I)*.5;j=i-G;n=i+G;G=j<wa?j:wa;j=n>ua?n:ua;n=(e?I:f)*.5;f=g-n;I=g+n;n=f<va?f:va;if(I<=ta){xa=G;ya=n;za=j;Aa=ta;break}xa=G;ya=n;za=j;Aa=I}}while(0);h[o+16>>3]=xa;h[o+24>>3]=ya;h[o+32>>3]=za;h[o+40>>3]=Aa;return}function an(a){a=a|0;var b=0;if((c[a+48>>2]|0)==(a|0)){b=1;return b|0}b=(qm($w(a|0)|0,138824,7)|0)==0|0;return b|0}
-
-
-
-function bn(d){d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0;e=i;i=i+224|0;f=e|0;g=e+24|0;h=e+48|0;j=e+72|0;k=e+80|0;l=$g(10368,c[43330]|0)|0;xn(d,l);m=$g(20008,c[43330]|0)|0;n=ry(d,136240,1)|0;Wx(n|0,133528,272,1)|0;Iv(k,128,e+96|0);o=ux(d)|0;if((o|0)!=0){p=l|0;q=j;r=j|0;s=j+4|0;j=m|0;t=f;u=f+8|0;v=f+12|0;w=f+16|0;x=f+20|0;f=h;y=h+8|0;z=h+12|0;A=h+16|0;B=h+20|0;h=g;C=g+8|0;D=g+12|0;E=g+16|0;F=g+20|0;g=o;do{do{if((a[(c[g+8>>2]|0)+118|0]|0)==0){o=mw(d,g)|0;if((o|0)==0){break}else{G=o}do{o=G;H=c[o>>2]&3;I=G+32|0;J=c[((H|0)==3?G:I)+28>>2]|0;K=G-32|0;L=c[((H|0)==2?G:K)+28>>2]|0;do{if((a[(c[L+8>>2]|0)+118|0]|0)==0){H=J|0;do{if((Za($w(H)|0,138824,7)|0)==0){M=$w(H)|0;N=Hc[c[p>>2]&63](l,M,512)|0;if((N|0)==0){O=0;break}O=c[N+12>>2]|0}else{O=0}}while(0);N=L|0;do{if((Za($w(N)|0,138824,7)|0)==0){M=$w(N)|0;P=Hc[c[p>>2]&63](l,M,512)|0;if((P|0)==0){Q=0;break}Q=c[P+12>>2]|0}else{Q=0}}while(0);P=(O|0)!=0;M=(Q|0)==0;if(M&(P^1)){break}if((O|0)==(Q|0)){R=$w(H)|0;S=$w(H)|0;Fv(0,118504,(T=i,i=i+16|0,c[T>>2]=R,c[T+8>>2]=S,T)|0)|0;i=T;break}S=c[o>>2]&3;c[r>>2]=c[((S|0)==3?G:I)+28>>2];c[s>>2]=c[((S|0)==2?G:K)+28>>2];S=Hc[c[j>>2]&63](m,q,512)|0;if((S|0)!=0){R=c[S+16>>2]|0;U=c[S+20>>2]|0;S=uw(Hx(R|0)|0,R,U,0,1)|0;Wx(S,112056,176,1)|0;jw(G|0,S)|0;break}if(M){if((Rx(O,N)|0)==0){M=Bn(J,O,k,n)|0;S=uw(Hx(M|0)|0,M,L,0,1)|0;M=S|0;Wx(M,112056,176,1)|0;jw(G|0,M)|0;c[u>>2]=H;c[v>>2]=N;M=S;U=c[M>>2]&3;R=S+32|0;c[w>>2]=c[((U|0)==3?S:R)+28>>2];V=S-32|0;c[x>>2]=c[((U|0)==2?S:V)+28>>2];Hc[c[j>>2]&63](m,t,1)|0;c[u>>2]=N;c[v>>2]=H;U=c[M>>2]&3;c[w>>2]=c[((U|0)==2?S:V)+28>>2];c[x>>2]=c[((U|0)==3?S:R)+28>>2];Hc[c[j>>2]&63](m,t,1)|0;break}else{R=$w(N)|0;S=$w(O|0)|0;Fv(0,118128,(T=i,i=i+16|0,c[T>>2]=R,c[T+8>>2]=S,T)|0)|0;i=T;break}}if(!P){if((Rx(Q,H)|0)==0){P=Bn(L,Q,k,n)|0;S=uw(Hx(H)|0,J,P,0,1)|0;P=S|0;Wx(P,112056,176,1)|0;jw(G|0,P)|0;c[C>>2]=H;c[D>>2]=N;P=S;R=c[P>>2]&3;U=S+32|0;c[E>>2]=c[((R|0)==3?S:U)+28>>2];V=S-32|0;c[F>>2]=c[((R|0)==2?S:V)+28>>2];Hc[c[j>>2]&63](m,h,1)|0;c[C>>2]=N;c[D>>2]=H;R=c[P>>2]&3;c[E>>2]=c[((R|0)==2?S:V)+28>>2];c[F>>2]=c[((R|0)==3?S:U)+28>>2];Hc[c[j>>2]&63](m,h,1)|0;break}else{U=$w(H)|0;S=$w(Q|0)|0;Fv(0,118208,(T=i,i=i+16|0,c[T>>2]=U,c[T+8>>2]=S,T)|0)|0;i=T;break}}S=O|0;if((Rx(Q,S)|0)!=0){U=$w(S)|0;R=$w(Q|0)|0;Fv(0,118368,(T=i,i=i+16|0,c[T>>2]=U,c[T+8>>2]=R,T)|0)|0;i=T;break}R=Q|0;if((Rx(O,R)|0)==0){U=Bn(J,O,k,n)|0;V=Bn(L,Q,k,n)|0;P=uw(Hx(U|0)|0,U,V,0,1)|0;V=P|0;Wx(V,112056,176,1)|0;jw(G|0,V)|0;c[y>>2]=H;c[z>>2]=N;V=P;U=c[V>>2]&3;M=P+32|0;c[A>>2]=c[((U|0)==3?P:M)+28>>2];W=P-32|0;c[B>>2]=c[((U|0)==2?P:W)+28>>2];Hc[c[j>>2]&63](m,f,1)|0;c[y>>2]=N;c[z>>2]=H;U=c[V>>2]&3;c[A>>2]=c[((U|0)==2?P:W)+28>>2];c[B>>2]=c[((U|0)==3?P:M)+28>>2];Hc[c[j>>2]&63](m,f,1)|0;break}else{M=$w(R)|0;R=$w(S)|0;Fv(0,118288,(T=i,i=i+16|0,c[T>>2]=M,c[T+8>>2]=R,T)|0)|0;i=T;break}}}while(0);G=ow(d,G)|0;}while((G|0)!=0)}}while(0);g=vx(d,g)|0;}while((g|0)!=0)}Mv(k);Vg(m)|0;m=Lw(n)|0;k=ux(n)|0;if((k|0)!=0){g=k;while(1){k=vx(n,g)|0;Gx(d,g|0)|0;if((k|0)==0){break}else{g=k}}}Kw(n)|0;if((m|0)==0){X=Vg(l)|0;i=e;return m|0}n=(c[d+8>>2]|0)+128|0;b[n>>1]=b[n>>1]|1;X=Vg(l)|0;i=e;return m|0}function cn(a){a=a|0;var b=0;b=$g(10368,c[43330]|0)|0;xn(a,b);return b|0}function dn(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;d=ry(b,136240,1)|0;Wx(d|0,133528,272,1)|0;e=ux(b)|0;if((e|0)!=0){f=e;do{e=mw(b,f)|0;if((e|0)!=0){g=e;do{e=c[g>>2]&3;h=c[((e|0)==3?g:g+32|0)+28>>2]|0;i=c[((e|0)==2?g:g-32|0)+28>>2]|0;if((a[(c[h+8>>2]|0)+118|0]|0)==0){if((a[(c[i+8>>2]|0)+118|0]|0)!=0){j=5}}else{j=5}if((j|0)==5){j=0;e=An(h,d)|0;h=An(i,d)|0;i=uw(Hx(e|0)|0,e,h,0,1)|0;Wx(i,112056,176,1)|0;jw(g|0,i)|0}g=ow(b,g)|0;}while((g|0)!=0)}f=vx(b,f)|0;}while((f|0)!=0)}f=ux(d)|0;if((f|0)==0){k=Kw(d)|0;return}else{l=f}do{Gx(b,l|0)|0;l=vx(d,l)|0;}while((l|0)!=0);k=Kw(d)|0;return}function en(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=Wv(a,b,c,0)|0;if((e|0)!=0){f=e;return f|0}f=Wv(a,b,c,d)|0;return f|0}function fn(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;e=i;i=i+24|0;f=e|0;g=e+8|0;h=gb(b|0,59)|0;j=d+4|0;k=c[j>>2]|0;l=d+8|0;if(k>>>0<(c[l>>2]|0)>>>0){m=k}else{Jv(d,1)|0;m=c[j>>2]|0}c[j>>2]=m+1;a[m]=38;if((h|0)==0){n=b;i=e;return n|0}m=h-b|0;if((m-2|0)>>>0>6>>>0){n=b;i=e;return n|0}k=g|0;DF(k|0,b|0,m|0)|0;a[g+m|0]=0;c[f>>2]=k;m=vb(f|0,26544,252,8,120)|0;if((m|0)==0){n=b;i=e;return n|0}nb(k|0,131392,(b=i,i=i+8|0,c[b>>2]=c[m+4>>2],b)|0)|0;i=b;b=c[j>>2]|0;if(b>>>0<(c[l>>2]|0)>>>0){o=b}else{Jv(d,1)|0;o=c[j>>2]|0}c[j>>2]=o+1;a[o]=35;Lv(d,k)|0;k=c[j>>2]|0;if(k>>>0<(c[l>>2]|0)>>>0){p=k}else{Jv(d,1)|0;p=c[j>>2]|0}c[j>>2]=p+1;a[p]=59;n=h+1|0;i=e;return n|0}function gn(a,b){a=a|0;b=b|0;return Ya(c[a>>2]|0,c[b>>2]|0)|0}function hn(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;e=i;i=i+1056|0;f=e|0;g=e+8|0;h=e+16|0;c[g>>2]=b;if((c[44702]|0)!=(d|0)){c[44702]=d;a[23e3]=0}Iv(h,1024,e+32|0);j=b+1|0;c[g>>2]=j;k=a[b]|0;b=h+4|0;l=h+8|0;if(k<<24>>24!=0){m=f|0;n=f+1|0;f=d|0;d=k;k=j;do{a:do{if((d&255)>>>0<192>>>0){if(d<<24>>24!=38){o=d;break}j=jn(g)|0;if((j|0)==0){o=38;break}if(j>>>0<127>>>0){o=j&255;break}p=c[b>>2]|0;q=p>>>0>=(c[l>>2]|0)>>>0;if(j>>>0<2047>>>0){if(q){Jv(h,1)|0;r=c[b>>2]|0}else{r=p}c[b>>2]=r+1;a[r]=j>>>6|192;o=(j&63|128)&255;break}if(q){Jv(h,1)|0;s=c[b>>2]|0}else{s=p}c[b>>2]=s+1;a[s]=j>>>12|224;p=c[b>>2]|0;if(p>>>0<(c[l>>2]|0)>>>0){t=p}else{Jv(h,1)|0;t=c[b>>2]|0}c[b>>2]=t+1;a[t]=j>>>6&63|128;o=(j&63|128)&255}else{do{if((d&255)>>>0<224>>>0){u=1}else{if((d&255)>>>0<240>>>0){u=2;break}if((d&255)>>>0<248>>>0){u=3;break}if(!(a[23e3]|0)){j=$w(f)|0;Fv(0,128976,(v=i,i=i+8|0,c[v>>2]=j,v)|0)|0;i=v;a[23e3]=1}a[m]=d;a[n]=0;j=kn(m)|0;p=xF(j|0)|0;if((p|0)>1){q=j;w=p;while(1){x=w-1|0;y=c[b>>2]|0;if(y>>>0<(c[l>>2]|0)>>>0){z=y}else{Jv(h,1)|0;z=c[b>>2]|0}y=a[q]|0;c[b>>2]=z+1;a[z]=y;if((x|0)>1){q=q+1|0;w=x}else{break}}A=j+(p-1)|0}else{A=j}w=a[A]|0;eF(j);o=w;break a}}while(0);w=d;q=0;x=k;while(1){if((a[x]&-64)<<24>>24!=-128){break}y=c[b>>2]|0;if(y>>>0<(c[l>>2]|0)>>>0){B=y}else{Jv(h,1)|0;B=c[b>>2]|0}c[b>>2]=B+1;a[B]=w;y=x+1|0;c[g>>2]=y;C=a[x]|0;D=q+1|0;if((D|0)<(u|0)){w=C;q=D;x=y}else{o=C;break a}}if(!(a[23e3]|0)){x=$w(f)|0;Fv(0,125768,(v=i,i=i+16|0,c[v>>2]=u+1,c[v+8>>2]=x,v)|0)|0;i=v;a[23e3]=1}a[m]=w;a[n]=0;x=kn(m)|0;q=xF(x|0)|0;if((q|0)>1){C=x;y=q;while(1){D=y-1|0;E=c[b>>2]|0;if(E>>>0<(c[l>>2]|0)>>>0){F=E}else{Jv(h,1)|0;F=c[b>>2]|0}E=a[C]|0;c[b>>2]=F+1;a[F]=E;if((D|0)>1){C=C+1|0;y=D}else{break}}G=x+(q-1)|0}else{G=x}y=a[G]|0;eF(x);o=y}}while(0);y=c[b>>2]|0;if(y>>>0<(c[l>>2]|0)>>>0){H=y}else{Jv(h,1)|0;H=c[b>>2]|0}c[b>>2]=H+1;a[H]=o;y=c[g>>2]|0;k=y+1|0;c[g>>2]=k;d=a[y]|0;}while(d<<24>>24!=0)}d=c[b>>2]|0;if(d>>>0<(c[l>>2]|0)>>>0){I=d;a[I]=0;J=h|0;K=c[J>>2]|0;c[b>>2]=K;L=Lb(K|0)|0;Mv(h);i=e;return L|0}Jv(h,1)|0;I=c[b>>2]|0;a[I]=0;J=h|0;K=c[J>>2]|0;c[b>>2]=K;L=Lb(K|0)|0;Mv(h);i=e;return L|0}function jn(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;d=i;i=i+24|0;e=d|0;f=c[b>>2]|0;if((a[f]|0)!=35){g=d+8|0;c[e>>2]=g;h=g;g=0;while(1){j=a[f+g|0]|0;if((j<<24>>24|0)==59){k=17;break}else if((j<<24>>24|0)==0){l=0;m=f;k=20;break}a[h]=j;j=g+1|0;if((j|0)<8){h=h+1|0;g=j}else{l=0;m=f;k=20;break}}if((k|0)==17){a[h]=0;h=vb(e|0,26544,252,8,120)|0;if((h|0)==0){l=0;m=f;c[b>>2]=m;i=d;return l|0}l=c[h+4>>2]|0;m=f+(g+1)|0;c[b>>2]=m;i=d;return l|0}else if((k|0)==20){c[b>>2]=m;i=d;return l|0}}k=a[f+1|0]|0;a:do{if((k&-33)<<24>>24==88){g=2;h=0;while(1){e=a[f+g|0]|0;j=e&255;do{if((e-65&255)>>>0<6>>>0){n=j-55|0}else{if((e-97&255)>>>0<6>>>0){n=j-87|0;break}if((e-48&255)>>>0>=10>>>0){o=h;p=g;q=j;break a}n=j-48|0}}while(0);j=n+(h<<4)|0;e=g+1|0;if((e|0)<8){g=e;h=j}else{o=j;p=e;q=n;break}}}else{h=1;g=0;e=k;while(1){j=e&255;if((e-48&255)>>>0>=10>>>0){o=g;p=h;q=j;break a}r=(g*10|0)-48+j|0;s=h+1|0;if((s|0)>=8){o=r;p=s;q=j;break a}h=s;g=r;e=a[f+s|0]|0}}}while(0);if((q|0)!=59){l=0;m=f;c[b>>2]=m;i=d;return l|0}l=o;m=f+(p+1)|0;c[b>>2]=m;i=d;return l|0}function kn(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;d=i;i=i+1048|0;e=d|0;f=d+8|0;Iv(f,1024,d+24|0);c[e>>2]=b+1;g=a[b]|0;b=f+4|0;h=f+8|0;if(g<<24>>24!=0){j=g;do{if(j<<24>>24==38){g=jn(e)|0;k=(g|0)!=0?g:38}else{k=j&255}do{if(k>>>0<127>>>0){g=c[b>>2]|0;if(g>>>0<(c[h>>2]|0)>>>0){l=g}else{Jv(f,1)|0;l=c[b>>2]|0}c[b>>2]=l+1;a[l]=k}else{g=c[b>>2]|0;m=g>>>0>=(c[h>>2]|0)>>>0;if(k>>>0<2047>>>0){if(m){Jv(f,1)|0;n=c[b>>2]|0}else{n=g}c[b>>2]=n+1;a[n]=k>>>6|192;o=c[b>>2]|0;if(o>>>0<(c[h>>2]|0)>>>0){p=o}else{Jv(f,1)|0;p=c[b>>2]|0}c[b>>2]=p+1;a[p]=k&63|128;break}if(m){Jv(f,1)|0;q=c[b>>2]|0}else{q=g}c[b>>2]=q+1;a[q]=k>>>12|224;g=c[b>>2]|0;if(g>>>0<(c[h>>2]|0)>>>0){r=g}else{Jv(f,1)|0;r=c[b>>2]|0}c[b>>2]=r+1;a[r]=k>>>6&63|128;g=c[b>>2]|0;if(g>>>0<(c[h>>2]|0)>>>0){s=g}else{Jv(f,1)|0;s=c[b>>2]|0}c[b>>2]=s+1;a[s]=k&63|128}}while(0);g=c[e>>2]|0;c[e>>2]=g+1;j=a[g]|0;}while(j<<24>>24!=0)}j=c[b>>2]|0;if(j>>>0<(c[h>>2]|0)>>>0){t=j;a[t]=0;u=f|0;v=c[u>>2]|0;c[b>>2]=v;w=Lb(v|0)|0;Mv(f);i=d;return w|0}Jv(f,1)|0;t=c[b>>2]|0;a[t]=0;u=f|0;v=c[u>>2]|0;c[b>>2]=v;w=Lb(v|0)|0;Mv(f);i=d;return w|0}function ln(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;d=i;i=i+1040|0;e=d|0;Iv(e,1024,d+16|0);f=a[b]|0;g=e+4|0;h=e+8|0;if(f<<24>>24!=0){j=b;b=f;while(1){f=j+1|0;if((b&255)>>>0<127>>>0){k=c[g>>2]|0;if(k>>>0<(c[h>>2]|0)>>>0){l=k}else{Jv(e,1)|0;l=c[g>>2]|0}c[g>>2]=l+1;a[l]=b;m=f}else{k=a[f]&63|b<<6;f=c[g>>2]|0;if(f>>>0<(c[h>>2]|0)>>>0){n=f}else{Jv(e,1)|0;n=c[g>>2]|0}c[g>>2]=n+1;a[n]=k;m=j+2|0}k=a[m]|0;if(k<<24>>24==0){break}else{j=m;b=k}}}b=c[g>>2]|0;if(b>>>0<(c[h>>2]|0)>>>0){o=b;a[o]=0;p=e|0;q=c[p>>2]|0;c[g>>2]=q;r=Lb(q|0)|0;Mv(e);i=d;return r|0}Jv(e,1)|0;o=c[g>>2]|0;a[o]=0;p=e|0;q=c[p>>2]|0;c[g>>2]=q;r=Lb(q|0)|0;Mv(e);i=d;return r|0}function mn(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0.0,j=0,k=0,l=0.0,m=0.0,n=0.0,o=0.0;d=i;i=i+24|0;e=b;b=i;i=i+32|0;tF(b,e,32)|0;e=d|0;f=d+8|0;g=+h[b+16>>3];j=c[a+8>>2]|0;if(g<+h[j+48>>3]){k=0;i=d;return k|0}l=+h[b>>3];if(+h[j+64>>3]<l){k=0;i=d;return k|0}m=+h[b+24>>3];if(m<+h[j+56>>3]){k=0;i=d;return k|0}n=+h[b+8>>3];if(+h[j+72>>3]<n){k=0;i=d;return k|0}o=+h[j+24>>3]-(m+n)*.5;h[f>>3]=+h[j+16>>3]-(g+l)*.5;h[f+8>>3]=o;c[e>>2]=a;c[e+4>>2]=0;k=Oc[c[(c[(c[j+8>>2]|0)+4>>2]|0)+12>>2]&255](e,f)|0;i=d;return k|0}function nn(a,b){a=a|0;b=b|0;var c=0,d=0,e=0.0,f=0.0,g=0.0,j=0.0,k=0;c=i;d=b;b=i;i=i+32|0;tF(b,d,32)|0;e=+h[a+24>>3]*.5;f=+h[a+32>>3]*.5;g=+h[a+56>>3];j=+h[a+64>>3];if(+h[b+16>>3]<g-e){k=0;i=c;return k|0}if(e+g<+h[b>>3]){k=0;i=c;return k|0}if(+h[b+24>>3]<j-f){k=0;i=c;return k|0}k=f+j>=+h[b+8>>3]|0;i=c;return k|0}function on(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,j=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0.0,ga=0.0,ha=0.0,ia=0.0,ja=0,ka=0,la=0.0,ma=0.0,na=0.0,oa=0.0,pa=0.0;e=i;i=i+384|0;f=b;b=i;i=i+32|0;tF(b,f,32)|0;f=e|0;g=e+16|0;j=e+32|0;l=e+64|0;m=e+96|0;n=e+128|0;o=e+160|0;p=e+176|0;q=e+192|0;r=e+224|0;s=e+256|0;t=e+288|0;u=e+320|0;v=e+336|0;w=e+352|0;x=a+8|0;a=c[x>>2]|0;y=c[a+8>>2]|0;do{if((y|0)==0){z=a}else{if(+h[y+24>>3]<+h[b>>3]){z=a;break}if(+h[b+16>>3]<+h[y+8>>3]){z=a;break}if(+h[y+32>>3]<+h[b+8>>3]){z=a;break}if(+h[b+24>>3]<+h[y+16>>3]){z=a;break}A=y+4|0;if((c[A>>2]|0)<=0){z=a;break}B=y|0;C=w;D=b;E=u;F=v;G=w|0;H=w+8|0;I=w+16|0;J=w+24|0;K=f|0;L=f+8|0;M=g|0;N=g+8|0;O=j|0;P=l+16|0;Q=m+8|0;R=n+24|0;S=o|0;T=o+8|0;U=p|0;V=p+8|0;W=q|0;X=r+16|0;Y=s+8|0;Z=t+24|0;_=0;a:while(1){$=c[B>>2]|0;aa=$+(_*48|0)|0;ba=d[aa]|d[aa+1|0]<<8|d[aa+2|0]<<16|d[aa+3|0]<<24|0;aa=$+(_*48|0)+4|0;ca=d[aa]|d[aa+1|0]<<8|d[aa+2|0]<<16|d[aa+3|0]<<24|0;aa=$+(_*48|0)+8|0;da=d[aa]|d[aa+1|0]<<8|d[aa+2|0]<<16|d[aa+3|0]<<24|0;aa=$+(_*48|0)+12|0;ea=d[aa]|d[aa+1|0]<<8|d[aa+2|0]<<16|d[aa+3|0]<<24|0;aa=$+(_*48|0)+16|0;fa=(c[k>>2]=d[aa]|d[aa+1|0]<<8|d[aa+2|0]<<16|d[aa+3|0]<<24,c[k+4>>2]=d[aa+4|0]|d[aa+5|0]<<8|d[aa+6|0]<<16|d[aa+7|0]<<24,+h[k>>3]);aa=$+(_*48|0)+24|0;ga=(c[k>>2]=d[aa]|d[aa+1|0]<<8|d[aa+2|0]<<16|d[aa+3|0]<<24,c[k+4>>2]=d[aa+4|0]|d[aa+5|0]<<8|d[aa+6|0]<<16|d[aa+7|0]<<24,+h[k>>3]);aa=$+(_*48|0)+32|0;ha=(c[k>>2]=d[aa]|d[aa+1|0]<<8|d[aa+2|0]<<16|d[aa+3|0]<<24,c[k+4>>2]=d[aa+4|0]|d[aa+5|0]<<8|d[aa+6|0]<<16|d[aa+7|0]<<24,+h[k>>3]);aa=$+(_*48|0)+40|0;ia=(c[k>>2]=d[aa]|d[aa+1|0]<<8|d[aa+2|0]<<16|d[aa+3|0]<<24,c[k+4>>2]=d[aa+4|0]|d[aa+5|0]<<8|d[aa+6|0]<<16|d[aa+7|0]<<24,+h[k>>3]);tF(C|0,D|0,32)|0;if((ca|0)==0){ja=9;break}aa=ba;c[F>>2]=c[aa>>2];c[F+4>>2]=c[aa+4>>2];c[F+8>>2]=c[aa+8>>2];c[F+12>>2]=c[aa+12>>2];if((ca|0)>1){aa=1;do{$=ba+(aa<<4)|0;c[E>>2]=c[$>>2];c[E+4>>2]=c[$+4>>2];c[E+8>>2]=c[$+8>>2];c[E+12>>2]=c[$+12>>2];if((pi(u,v,w)|0)!=-1){ka=1;ja=31;break a}c[F>>2]=c[E>>2];c[F+4>>2]=c[E+4>>2];c[F+8>>2]=c[E+8>>2];c[F+12>>2]=c[E+12>>2];aa=aa+1|0;}while((aa|0)<(ca|0))}do{if((da|0)!=0){la=+h[ba+8>>3];ma=+h[G>>3];na=+h[H>>3];oa=+h[I>>3];pa=+h[J>>3];h[S>>3]=+h[ba>>3];h[T>>3]=la;h[U>>3]=fa;h[V>>3]=ga;ph(q,p,o,1.0,da);if(oa<+h[W>>3]){break}ph(r,p,o,1.0,da);if(+h[X>>3]<ma){break}ph(s,p,o,1.0,da);if(pa<+h[Y>>3]){break}ph(t,p,o,1.0,da);if(+h[Z>>3]>=na){ka=1;ja=31;break a}}}while(0);do{if((ea|0)!=0){da=ca-1|0;ga=+h[ba+(da<<4)+8>>3];fa=+h[G>>3];na=+h[H>>3];pa=+h[I>>3];ma=+h[J>>3];h[K>>3]=+h[ba+(da<<4)>>3];h[L>>3]=ga;h[M>>3]=ha;h[N>>3]=ia;ph(j,g,f,1.0,ea);if(pa<+h[O>>3]){break}ph(l,g,f,1.0,ea);if(+h[P>>3]<fa){break}ph(m,g,f,1.0,ea);if(ma<+h[Q>>3]){break}ph(n,g,f,1.0,ea);if(+h[R>>3]>=na){ka=1;ja=31;break a}}}while(0);ea=_+1|0;if((ea|0)<(c[A>>2]|0)){_=ea}else{ja=24;break}}if((ja|0)==9){cc(110072,125704,1607,170152);return 0}else if((ja|0)==24){z=c[x>>2]|0;break}else if((ja|0)==31){i=e;return ka|0}}}while(0);ja=c[z+96>>2]|0;do{if((ja|0)!=0){ia=+h[ja+24>>3]*.5;ha=+h[ja+32>>3]*.5;na=+h[ja+56>>3];ma=+h[ja+64>>3];if(+h[b+16>>3]<na-ia){break}if(ia+na<+h[b>>3]){break}if(+h[b+24>>3]<ma-ha){break}if(ha+ma<+h[b+8>>3]){break}else{ka=1}i=e;return ka|0}}while(0);ka=0;i=e;return ka|0}function pn(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0;e=i;a:do{if((b|0)==0){f=d}else{g=a[b]|0;if(g<<24>>24==0){f=d;break}switch(g<<24>>24|0){case 121:case 89:{g=(pm(b+1|0,113648)|0)==0;h=g?10:0;j=16;break};case 116:case 84:{g=(pm(b+1|0,114392)|0)==0;h=g?10:0;j=16;break};case 111:case 79:{g=(pm(b+1|0,117616)|0)==0;h=g?8:0;j=16;break};case 108:case 76:{g=(pm(b+1|0,120032)|0)==0;h=g?2:0;j=16;break};case 102:case 70:{g=(pm(b+1|0,120800)|0)==0;h=g?2:0;j=16;break};case 110:case 78:{g=b+1|0;if((pm(g,119232)|0)==0){f=0;break a}if((pm(g,118568)|0)==0){f=2;break a}break};case 99:case 67:{g=b+1|0;if((pm(g,123448)|0)==0){f=4;break a}k=(pm(g,121632)|0)==0;h=k?12:0;j=16;break};case 112:case 80:{k=(pm(b+1|0,116696)|0)==0;h=k?6:0;j=16;break};case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:{f=10;break a;break};case 48:{f=2;break a;break};case 115:case 83:{k=(pm(b+1|0,115760)|0)==0;h=k?10:0;j=16;break};default:{}}if((j|0)==16){if((h|0)!=0){f=h;break}}Fv(0,113096,(k=i,i=i+8|0,c[k>>2]=b,k)|0)|0;i=k;f=d}}while(0);i=e;return f|0}function qn(d,f){d=d|0;f=f|0;var g=0,h=0;g=ew(d|0,112576)|0;do{if((g|0)==0){h=f}else{if((a[g]|0)==0){h=0;break}h=pn(g,f)|0}}while(0);f=(c[d+8>>2]|0)+128|0;b[f>>1]=e[f>>1]|h;return}function rn(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=+d;e=e|0;var f=0,g=0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0.0,u=0,v=0.0,w=0.0,x=0.0,y=0.0;f=e&1;g=e&2;a:do{if((c|0)==2){i=+h[a>>3];j=+h[a+16>>3]-i;k=+h[a+8>>3];l=+h[a+24>>3]-k;m=k-l;n=i-j;o=k+l;p=i+j}else{j=+h[a>>3];i=+h[a+8>>3];if((c|0)>0){q=j;r=i;s=j;t=i;u=1;v=j;w=i}else{m=i;n=j;o=i;p=j;break}while(1){j=v<s?v:s;i=w<t?w:t;l=v>q?v:q;k=w>r?w:r;if((u|0)>=(c|0)){m=i;n=j;o=k;p=l;break a}x=+h[a+(u<<4)>>3];y=+h[a+(u<<4)+8>>3];q=l;r=k;s=j;t=i;u=u+1|0;v=x;w=y}}}while(0);w=n+(p-n)*.5;v=m+(o-m)*.5;if((f|0)==0){t=o-v;o=d;d=+W(o);s=+V(o);if((g|0)==0){h[b+8>>3]=t*d-v;h[b+24>>3]=-0.0-v-(v-m)*d}else{o=t*d;h[b+8>>3]=v-o;h[b+24>>3]=v+o}o=(p-w)*s;h[b>>3]=w-o;h[b+16>>3]=w+o;return}else{o=w-n;n=v-m;m=+T(o*o+n*n);if((g|0)==0){h[b+8>>3]=-0.0-v}else{h[b+8>>3]=v}h[b>>3]=w;h[b+16>>3]=m*.25;h[b+24>>3]=m;return}}function sn(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;b=a+8|0;a=c[b>>2]|0;d=c[a+8>>2]|0;if((d|0)==0){e=a;f=e+8|0;c[f>>2]=0;return}a=c[d>>2]|0;if((c[d+4>>2]|0)>0){d=0;g=a;while(1){eF(c[g+(d*48|0)>>2]|0);h=d+1|0;i=c[(c[b>>2]|0)+8>>2]|0;j=c[i>>2]|0;if((h|0)<(c[i+4>>2]|0)){d=h;g=j}else{k=j;break}}}else{k=a}eF(k);eF(c[(c[b>>2]|0)+8>>2]|0);e=c[b>>2]|0;f=e+8|0;c[f>>2]=0;return}function tn(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;b=a+8|0;eF(c[(c[b>>2]|0)+144>>2]|0);d=c[b>>2]|0;e=c[d+8>>2]|0;if((e|0)==0){f=d}else{d=c[e>>2]|0;if((c[e+4>>2]|0)>0){e=0;g=d;while(1){eF(c[g+(e*48|0)>>2]|0);h=e+1|0;i=c[(c[b>>2]|0)+8>>2]|0;j=c[i>>2]|0;if((h|0)<(c[i+4>>2]|0)){e=h;g=j}else{k=j;break}}}else{k=d}eF(k);eF(c[(c[b>>2]|0)+8>>2]|0);f=c[b>>2]|0}c[f+8>>2]=0;dk(c[(c[b>>2]|0)+96>>2]|0);dk(c[(c[b>>2]|0)+108>>2]|0);dk(c[(c[b>>2]|0)+100>>2]|0);dk(c[(c[b>>2]|0)+104>>2]|0);Xx(a|0,112056)|0;return}function un(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=a+8|0;d=c[b>>2]|0;e=c[d+132>>2]|0;if((e|0)==0){f=d}else{eF(e);f=c[b>>2]|0}e=c[f+8>>2]|0;if((e|0)==0){g=f}else{Cc[c[(c[e+4>>2]|0)+4>>2]&255](a);g=c[b>>2]|0}dk(c[g+104>>2]|0);dk(c[(c[b>>2]|0)+108>>2]|0);Xx(a|0,111456)|0;return}function vn(a,b){a=a|0;b=b|0;var d=0,e=0.0;d=a+8|0;a=c[d>>2]|0;if(b<<24>>24==0){e=+h[a+32>>3]*72.0*.5;h[a+96>>3]=e;h[(c[d>>2]|0)+88>>3]=e;b=c[d>>2]|0;h[b+80>>3]=+h[b+40>>3]*72.0;return}else{e=+h[a+40>>3]*72.0*.5;h[a+96>>3]=e;h[(c[d>>2]|0)+88>>3]=e;a=c[d>>2]|0;h[a+80>>3]=+h[a+32>>3]*72.0;return}}function wn(){return+(+(yb()|0)/2147483647.0)}function xn(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;d=i;i=i+8|0;e=d|0;f=a+8|0;a=c[f>>2]|0;if((c[a+172>>2]|0)<1){i=d;return}g=b|0;h=e;j=1;k=a;while(1){a=c[(c[k+176>>2]|0)+(j<<2)>>2]|0;c[e>>2]=$w(a|0)|0;if((Hc[c[g>>2]&63](b,h,512)|0)==0){l=jk(16)|0;c[l+8>>2]=c[e>>2];c[l+12>>2]=a;Hc[c[g>>2]&63](b,l,1)|0}else{Fv(0,110752,(l=i,i=i+8|0,c[l>>2]=c[e>>2],l)|0)|0;i=l}xn(a,b);a=c[f>>2]|0;if((j|0)<(c[a+172>>2]|0)){j=j+1|0;k=a}else{break}}i=d;return}function yn(a,b){a=a|0;b=b|0;var d=0,e=0;d=Hc[c[a>>2]&63](a,b,512)|0;if((d|0)==0){e=0;return e|0}e=c[d+12>>2]|0;return e|0}function zn(a,b,c){a=a|0;b=b|0;c=c|0;eF(b);return}function An(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=b|0;f=Hx(e)|0;if((a[(c[b+8>>2]|0)+118|0]|0)==0){g=b;return g|0}zx(d,b,1)|0;b=gb($w(e)|0,58)|0;if((b|0)==0){cc(118576,125704,1203,170336);return 0}e=b+1|0;b=Ax(f,e,0)|0;if((b|0)!=0){g=b;return g|0}b=Ax(f,e,1)|0;e=b|0;Wx(e,111456,304,1)|0;d=Xv(f,1,0)|0;if((d|0)==0){g=b;return g|0}else{h=d}while(1){d=fw(e,h)|0;i=c[h+12>>2]|0;if((d|0)!=(i|0)){hw(e,h,i)|0}i=Xv(f,1,h)|0;if((i|0)==0){g=b;break}else{h=i}}return g|0}function Bn(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;g=i;i=i+104|0;Lv(e,118056)|0;h=g|0;j=c[45212]|0;c[45212]=j+1;nb(h|0,131392,(k=i,i=i+8|0,c[k>>2]=j,k)|0)|0;i=k;Lv(e,h)|0;h=e+4|0;k=c[h>>2]|0;j=e+8|0;if(k>>>0<(c[j>>2]|0)>>>0){l=k}else{Jv(e,1)|0;l=c[h>>2]|0}c[h>>2]=l+1;a[l]=58;l=d|0;Lv(e,$w(l)|0)|0;k=Ix(l)|0;l=c[h>>2]|0;if(l>>>0<(c[j>>2]|0)>>>0){m=l}else{Jv(e,1)|0;m=c[h>>2]|0}a[m]=0;m=c[e>>2]|0;c[h>>2]=m;h=Ax(k,m,1)|0;m=h|0;Wx(m,111456,304,1)|0;a[(c[h+8>>2]|0)+118|0]=1;zx(d,h,1)|0;zx(f,b,1)|0;b=Hx(m)|0;f=c[53614]|0;do{if((f|0)==0){d=Sx(m)|0;if((d|0)==2){n=Wv(b,2,117960,213424)|0;break}else if((d|0)==1){n=Wv(b,1,117960,213424)|0;break}else if((d|0)==0){n=Wv(b,0,117960,213424)|0;break}else{n=0;break}}else{n=f}}while(0);hw(m,n,213424)|0;c[53614]=n;n=Hx(m)|0;f=c[53582]|0;do{if((f|0)==0){b=Sx(m)|0;if((b|0)==2){o=Wv(n,2,117928,213424)|0;break}else if((b|0)==1){o=Wv(n,1,117928,213424)|0;break}else if((b|0)==0){o=Wv(n,0,117928,213424)|0;break}else{o=0;break}}else{o=f}}while(0);hw(m,o,117840)|0;c[53582]=o;o=Hx(m)|0;f=c[53590]|0;do{if((f|0)==0){n=Sx(m)|0;if((n|0)==1){p=Wv(o,1,117624,213424)|0;break}else if((n|0)==2){p=Wv(o,2,117624,213424)|0;break}else if((n|0)==0){p=Wv(o,0,117624,213424)|0;break}else{p=0;break}}else{p=f}}while(0);hw(m,p,117584)|0;c[53590]=p;i=g;return h|0}function Cn(a,b,d){a=a|0;b=b|0;d=d|0;d=jk(24)|0;c[d+8>>2]=c[b+8>>2];c[d+12>>2]=c[b+12>>2];c[d+16>>2]=c[b+16>>2];c[d+20>>2]=c[b+20>>2];return d|0}function Dn(a,b,c){a=a|0;b=b|0;c=c|0;eF(b);return}function En(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;e=c[b>>2]|0;a=c[d>>2]|0;do{if(e>>>0<a>>>0){f=-1}else{if(e>>>0>a>>>0){f=1;break}g=c[b+4>>2]|0;h=c[d+4>>2]|0;if(g>>>0<h>>>0){f=-1;break}f=g>>>0>h>>>0|0}}while(0);return f|0}function Fn(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ka=0,La=0.0,Ma=0,Na=0,Oa=0,Pa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0;g=i;i=i+264|0;j=g|0;k=g+8|0;l=g+16|0;m=g+24|0;n=g+32|0;o=g+40|0;p=g+48|0;q=g+56|0;r=g+64|0;s=g+72|0;t=g+80|0;u=g+88|0;v=g+96|0;w=g+104|0;x=g+112|0;y=g+120|0;z=g+184|0;if((b|0)==0){A=f;i=g;return A|0}if((f|0)==0){B=fF(1,20)|0;c[B+4>>2]=e>>>0>80>>>0?e:80;C=B}else{C=f}f=C|0;B=c[f>>2]|0;e=c[C+4>>2]|0;if((B|0)==0){D=100;E=fF(100,e)|0}else{F=B+100|0;G=gF(c[C+8>>2]|0,da(F,e)|0)|0;vF(G+(da(e,B)|0)|0,0,e*100|0|0)|0;D=F;E=G}G=y;F=z|0;B=z+8|0;H=B;I=z+16|0;J=z+24|0;K=z+32|0;L=(d|0)==0;M=z+72|0;N=z;O=B;B=d+4|0;P=d+8|0;Q=y|0;R=y+8|0;S=z+8|0;T=d+24|0;U=z+8|0;V=d+40|0;W=d+20|0;X=d+12|0;Y=J;Z=z+40|0;_=d+16|0;$=z+16|0;z=d+28|0;aa=d+32|0;ba=d+36|0;ca=d+44|0;ea=D;D=b;b=E;a:while(1){E=D;while(1){fa=E+1|0;if((Qa(a[E]|0)|0)==0){break}else{E=fa}}b:do{switch(a[E]|0){case 76:{c[F>>2]=6;ga=Jn(fa,O)|0;if((ga|0)==0){ha=125;break a}if(L){ia=ga;break b}c[M>>2]=c[X>>2];ja=ga;ha=121;break};case 112:{c[F>>2]=3;ga=Jn(fa,O)|0;if((ga|0)==0){ha=125;break a}if(L){ia=ga;break b}c[M>>2]=c[B>>2];ja=ga;ha=121;break};case 99:{ga=Ja(fa|0,v|0,10)|0;ka=c[v>>2]|0;la=(ka|0)==(fa|0)?0:ka;if((la|0)==0|(ga|0)<1){ha=125;break a}else{ma=la}do{la=a[ma]|0;na=la<<24>>24==0;ma=ma+1|0}while(la<<24>>24!=45&(na^1));if(na){ha=125;break a}oa=fF(ga+1|0,1)|0;if((ga|0)>0){la=ga;ka=oa;pa=ma;while(1){qa=a[pa]|0;if(qa<<24>>24==0){ha=41;break a}ra=ka+1|0;a[ka]=qa;qa=la-1|0;sa=pa+1|0;if((qa|0)>0){la=qa;ka=ra;pa=sa}else{ta=ra;ua=sa;break}}}else{ta=oa;ua=ma}a[ta]=0;if((In(oa,y)|0)==0){ha=125;break a}if((c[Q>>2]|0)==0){c[F>>2]=9;c[S>>2]=c[R>>2];if(L){ia=ua;break b}c[M>>2]=c[T>>2];ia=ua;break b}else{c[F>>2]=14;tF(U|0,G|0,64)|0;if(L){ia=ua;break b}c[M>>2]=c[V>>2];ia=ua;break b}break};case 83:{c[F>>2]=11;pa=Ja(fa|0,m|0,10)|0;ka=c[m>>2]|0;la=(ka|0)==(fa|0)?0:ka;if((la|0)==0|(pa|0)<1){ha=125;break a}else{va=la}do{la=a[va]|0;wa=la<<24>>24==0;va=va+1|0}while(la<<24>>24!=45&(wa^1));if(wa){ha=125;break a}xa=fF(pa+1|0,1)|0;if((pa|0)>0){la=pa;ka=xa;ga=va;while(1){sa=a[ga]|0;if(sa<<24>>24==0){ha=102;break a}ra=ka+1|0;a[ka]=sa;sa=la-1|0;qa=ga+1|0;if((sa|0)>0){la=sa;ka=ra;ga=qa}else{ya=ra;za=qa;break}}}else{ya=xa;za=va}a[ya]=0;c[S>>2]=xa;if(L){ia=za;break b}c[M>>2]=c[aa>>2];ia=za;break};case 73:{c[F>>2]=12;h[H>>3]=+sF(fa,l);ga=c[l>>2]|0;if((ga|0)==(fa|0)){ha=125;break a}h[I>>3]=+sF(ga,l);ka=c[l>>2]|0;if((ga|0)==(ka|0)){ha=125;break a}h[J>>3]=+sF(ka,l);ga=c[l>>2]|0;if((ka|0)==(ga|0)){ha=125;break a}h[K>>3]=+sF(ga,l);ka=c[l>>2]|0;la=(ga|0)==(ka|0)?0:ka;if((la|0)==0){ha=125;break a}ka=Ja(la|0,k|0,10)|0;ga=c[k>>2]|0;pa=(ga|0)==(la|0)?0:ga;if((pa|0)==0|(ka|0)<1){ha=125;break a}else{Aa=pa}do{pa=a[Aa]|0;Ba=pa<<24>>24==0;Aa=Aa+1|0}while(pa<<24>>24!=45&(Ba^1));if(Ba){ha=125;break a}Ca=fF(ka+1|0,1)|0;if((ka|0)>0){pa=ka;ga=Ca;la=Aa;while(1){qa=a[la]|0;if(qa<<24>>24==0){ha=115;break a}ra=ga+1|0;a[ga]=qa;qa=pa-1|0;sa=la+1|0;if((qa|0)>0){pa=qa;ga=ra;la=sa}else{Da=ra;Ea=sa;break}}}else{Da=Ca;Ea=Aa}a[Da]=0;c[Z>>2]=Ca;if(L){ia=Ea;break b}c[M>>2]=c[ba>>2];ia=Ea;break};case 101:{c[F>>2]=1;h[H>>3]=+sF(fa,w);la=c[w>>2]|0;if((la|0)==(fa|0)){ha=125;break a}h[I>>3]=+sF(la,w);ga=c[w>>2]|0;if((la|0)==(ga|0)){ha=125;break a}h[J>>3]=+sF(ga,w);la=c[w>>2]|0;if((ga|0)==(la|0)){ha=125;break a}h[K>>3]=+sF(la,w);ga=c[w>>2]|0;pa=(la|0)==(ga|0)?0:ga;if((pa|0)==0){ha=125;break a}if(L){ia=pa;break b}c[M>>2]=c[d>>2];ja=pa;ha=121;break};case 67:{pa=Ja(fa|0,u|0,10)|0;ga=c[u>>2]|0;la=(ga|0)==(fa|0)?0:ga;if((la|0)==0|(pa|0)<1){ha=125;break a}else{Fa=la}do{la=a[Fa]|0;Ga=la<<24>>24==0;Fa=Fa+1|0}while(la<<24>>24!=45&(Ga^1));if(Ga){ha=125;break a}Ha=fF(pa+1|0,1)|0;if((pa|0)>0){la=pa;ga=Ha;ka=Fa;while(1){sa=a[ka]|0;if(sa<<24>>24==0){ha=54;break a}ra=ga+1|0;a[ga]=sa;sa=la-1|0;qa=ka+1|0;if((sa|0)>0){la=sa;ga=ra;ka=qa}else{Ia=ra;Ka=qa;break}}}else{Ia=Ha;Ka=Fa}a[Ia]=0;if((In(Ha,y)|0)==0){ha=125;break a}if((c[Q>>2]|0)==0){c[F>>2]=8;c[S>>2]=c[R>>2];if(L){ia=Ka;break b}c[M>>2]=c[W>>2];ia=Ka;break b}else{c[F>>2]=13;tF(U|0,G|0,64)|0;if(L){ia=Ka;break b}c[M>>2]=c[V>>2];ia=Ka;break b}break};case 70:{c[F>>2]=10;La=+sF(fa,o);ka=c[o>>2]|0;if((ka|0)==(fa|0)){ha=125;break a}h[H>>3]=La;if((ka|0)==0){ha=125;break a}ga=Ja(ka|0,n|0,10)|0;la=c[n>>2]|0;pa=(la|0)==(ka|0)?0:la;if((pa|0)==0|(ga|0)<1){ha=125;break a}else{Ma=pa}do{pa=a[Ma]|0;Na=pa<<24>>24==0;Ma=Ma+1|0}while(pa<<24>>24!=45&(Na^1));if(Na){ha=125;break a}Oa=fF(ga+1|0,1)|0;if((ga|0)>0){pa=ga;la=Oa;ka=Ma;while(1){qa=a[ka]|0;if(qa<<24>>24==0){ha=93;break a}ra=la+1|0;a[la]=qa;qa=pa-1|0;sa=ka+1|0;if((qa|0)>0){pa=qa;la=ra;ka=sa}else{Pa=ra;Ra=sa;break}}}else{Pa=Oa;Ra=Ma}a[Pa]=0;c[$>>2]=Oa;if(L){ia=Ra;break b}c[M>>2]=c[z>>2];ia=Ra;break};case 116:{c[F>>2]=15;c[S>>2]=Ja(fa|0,j|0,10)|0;ka=c[j>>2]|0;la=(ka|0)==(fa|0)?0:ka;if((la|0)==0){ha=125;break a}if(L){ia=la;break b}c[M>>2]=c[ca>>2];ja=la;ha=121;break};case 66:{c[F>>2]=5;la=Jn(fa,O)|0;if((la|0)==0){ha=125;break a}if(L){ia=la;break b}c[M>>2]=c[P>>2];ja=la;ha=121;break};case 80:{c[F>>2]=2;la=Jn(fa,O)|0;if((la|0)==0){ha=125;break a}if(L){ia=la;break b}c[M>>2]=c[B>>2];ja=la;ha=121;break};case 0:{break a;break};case 98:{c[F>>2]=4;la=Jn(fa,O)|0;if((la|0)==0){ha=125;break a}if(L){ia=la;break b}c[M>>2]=c[P>>2];ja=la;ha=121;break};case 84:{c[F>>2]=7;La=+sF(fa,t);la=c[t>>2]|0;if((la|0)==(fa|0)){ha=125;break a}h[H>>3]=La;if((la|0)==0){ha=125;break a}La=+sF(la,s);ka=c[s>>2]|0;if((ka|0)==(la|0)){ha=125;break a}h[I>>3]=La;if((ka|0)==0){ha=125;break a}la=Ja(ka|0,r|0,10)|0;pa=c[r>>2]|0;ga=(pa|0)==(ka|0)?0:pa;do{if((la|0)<0){c[Y>>2]=0}else{if((la|0)>0){c[Y>>2]=2;break}else{c[Y>>2]=1;break}}}while(0);if((ga|0)==0){ha=125;break a}La=+sF(ga,q);la=c[q>>2]|0;if((la|0)==(ga|0)){ha=125;break a}h[K>>3]=La;if((la|0)==0){ha=125;break a}pa=Ja(la|0,p|0,10)|0;ka=c[p>>2]|0;sa=(ka|0)==(la|0)?0:ka;if((sa|0)==0|(pa|0)<1){ha=125;break a}else{Sa=sa}do{sa=a[Sa]|0;Ta=sa<<24>>24==0;Sa=Sa+1|0}while(sa<<24>>24!=45&(Ta^1));if(Ta){ha=125;break a}Ua=fF(pa+1|0,1)|0;if((pa|0)>0){ga=pa;sa=Ua;ka=Sa;while(1){la=a[ka]|0;if(la<<24>>24==0){ha=82;break a}ra=sa+1|0;a[sa]=la;la=ga-1|0;qa=ka+1|0;if((la|0)>0){ga=la;sa=ra;ka=qa}else{Va=ra;Wa=qa;break}}}else{Va=Ua;Wa=Sa}a[Va]=0;c[Z>>2]=Ua;if(L){ia=Wa;break b}c[M>>2]=c[_>>2];ia=Wa;break};case 69:{c[F>>2]=0;h[H>>3]=+sF(fa,x);ka=c[x>>2]|0;if((ka|0)==(fa|0)){ha=125;break a}h[I>>3]=+sF(ka,x);sa=c[x>>2]|0;if((ka|0)==(sa|0)){ha=125;break a}h[J>>3]=+sF(sa,x);ka=c[x>>2]|0;if((sa|0)==(ka|0)){ha=125;break a}h[K>>3]=+sF(ka,x);sa=c[x>>2]|0;ga=(ka|0)==(sa|0)?0:sa;if((ga|0)==0){ha=125;break a}if(L){ia=ga;break b}c[M>>2]=c[d>>2];ja=ga;ha=121;break};default:{ha=125;break a}}}while(0);if((ha|0)==121){ha=0;if((ja|0)==0){break}else{ia=ja}}E=c[f>>2]|0;if((E|0)==(ea|0)){ga=ea<<1;sa=gF(b,da(ga,e)|0)|0;ka=da(ea,e)|0;vF(sa+ka|0,0,ka|0)|0;Xa=ga;Ya=sa;Za=c[f>>2]|0}else{Xa=ea;Ya=b;Za=E}tF(Ya+(da(Za,e)|0)|0,N|0,80)|0;c[f>>2]=(c[f>>2]|0)+1;ea=Xa;D=ia;b=Ya}if((ha|0)==41){eF(oa);ha=125}else if((ha|0)==54){eF(Ha);ha=125}else if((ha|0)==82){eF(Ua);ha=125}else if((ha|0)==93){eF(Oa);ha=125}else if((ha|0)==102){eF(xa);ha=125}else if((ha|0)==115){eF(Ca);ha=125}if((ha|0)==125){ha=C+16|0;c[ha>>2]=c[ha>>2]|1}ha=c[f>>2]|0;if((ha|0)==0){eF(b);eF(C);A=0;i=g;return A|0}else{c[C+8>>2]=gF(b,da(ha,e)|0)|0;A=C;i=g;return A|0}return 0}function Gn(a,b,c){a=a|0;b=b|0;c=c|0;return Fn(a,b,c,0)|0}function Hn(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;b=c[a+12>>2]|0;if((a|0)==0){return}d=c[a+8>>2]|0;e=a|0;a:do{if((c[e>>2]|0)>0){f=a+4|0;g=(b|0)==0;h=0;while(1){i=da(c[f>>2]|0,h)|0;j=d+i|0;if(!g){Cc[b&255](j)}b:do{switch(c[j>>2]|0){case 13:case 14:{k=c[d+(i+8)>>2]|0;if((k|0)==1){l=d+(i+48)|0;m=d+(i+52)|0;n=c[m>>2]|0;if((c[l>>2]|0)>0){o=0;p=n;while(1){eF(c[p+(o<<3)+4>>2]|0);q=o+1|0;r=c[m>>2]|0;if((q|0)<(c[l>>2]|0)){o=q;p=r}else{s=r;break}}}else{s=n}eF(s);break b}else if((k|0)==2){p=d+(i+64)|0;o=d+(i+68)|0;l=c[o>>2]|0;if((c[p>>2]|0)>0){m=0;r=l;while(1){eF(c[r+(m<<3)+4>>2]|0);q=m+1|0;t=c[o>>2]|0;if((q|0)<(c[p>>2]|0)){m=q;r=t}else{u=t;break}}}else{u=l}eF(u);break b}else{break b}break};case 8:case 9:{eF(c[d+(i+8)>>2]|0);break};case 4:case 5:{eF(c[d+(i+12)>>2]|0);break};case 6:{eF(c[d+(i+12)>>2]|0);break};case 2:case 3:{eF(c[d+(i+12)>>2]|0);break};case 7:{eF(c[d+(i+40)>>2]|0);break};case 10:{eF(c[d+(i+16)>>2]|0);break};case 11:{eF(c[d+(i+8)>>2]|0);break};case 12:{eF(c[d+(i+40)>>2]|0);break};default:{}}}while(0);h=h+1|0;if((h|0)>=(c[e>>2]|0)){break a}}}}while(0);eF(d);eF(a);return}function In(b,d){b=b|0;d=d|0;var e=0,f=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0.0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0;e=i;i=i+128|0;f=e|0;j=e+8|0;k=e+16|0;l=e+24|0;m=e+32|0;n=e+40|0;o=e+48|0;p=e+56|0;q=e+64|0;r=e+72|0;s=e+80|0;t=e+88|0;u=e+96|0;v=e+104|0;w=e+112|0;x=e+120|0;y=a[b]|0;if((y|0)==91){z=b+1|0;c[d>>2]=1;A=d+8|0;B=A;C=+sF(z,x);D=c[x>>2]|0;if((D|0)==(z|0)){E=0;i=e;return E|0}h[A>>3]=C;if((D|0)==0){E=0;i=e;return E|0}C=+sF(D,w);A=c[w>>2]|0;if((A|0)==(D|0)){E=0;i=e;return E|0}h[d+16>>3]=C;if((A|0)==0){E=0;i=e;return E|0}C=+sF(A,v);D=c[v>>2]|0;if((D|0)==(A|0)){E=0;i=e;return E|0}h[d+24>>3]=C;if((D|0)==0){E=0;i=e;return E|0}C=+sF(D,u);A=c[u>>2]|0;if((A|0)==(D|0)){E=0;i=e;return E|0}h[d+32>>3]=C;if((A|0)==0){E=0;i=e;return E|0}D=d+40|0;u=Ja(A|0,t|0,10)|0;c[D>>2]=u;v=c[t>>2]|0;t=(v|0)==(A|0)?0:v;if((t|0)==0){E=0;i=e;return E|0}v=fF(u,8)|0;A=v;a:do{if((u|0)>0){w=t;x=0;b:while(1){C=+sF(w,s);F=c[s>>2]|0;if((F|0)==(w|0)|(F|0)==0){G=14;break}g[A+(x<<3)>>2]=C;H=A+(x<<3)+4|0;I=Ja(F|0,r|0,10)|0;J=c[r>>2]|0;K=(J|0)==(F|0)?0:J;if((K|0)==0|(I|0)<1){break}else{L=K}do{K=a[L]|0;M=K<<24>>24==0;L=L+1|0}while(K<<24>>24!=45&(M^1));if(M){break}N=fF(I+1|0,1)|0;if((I|0)>0){K=I;J=N;F=L;while(1){O=a[F]|0;if(O<<24>>24==0){G=21;break b}P=J+1|0;a[J]=O;O=K-1|0;Q=F+1|0;if((O|0)>0){K=O;J=P;F=Q}else{R=P;S=Q;break}}}else{R=N;S=L}a[R]=0;c[H>>2]=N;F=x+1|0;if((F|0)<(c[D>>2]|0)){w=S;x=F}else{break a}}if((G|0)==14){eF(v);E=0;i=e;return E|0}else if((G|0)==21){eF(N)}eF(v);E=0;i=e;return E|0}}while(0);c[B+36>>2]=A;E=z;i=e;return E|0}else if((y|0)==40){z=b+1|0;c[d>>2]=2;C=+sF(z,q);A=c[q>>2]|0;if((A|0)==(z|0)){E=0;i=e;return E|0}h[d+8>>3]=C;if((A|0)==0){E=0;i=e;return E|0}C=+sF(A,p);q=c[p>>2]|0;if((q|0)==(A|0)){E=0;i=e;return E|0}h[d+16>>3]=C;if((q|0)==0){E=0;i=e;return E|0}C=+sF(q,o);A=c[o>>2]|0;if((A|0)==(q|0)){E=0;i=e;return E|0}h[d+24>>3]=C;if((A|0)==0){E=0;i=e;return E|0}C=+sF(A,n);q=c[n>>2]|0;if((q|0)==(A|0)){E=0;i=e;return E|0}h[d+32>>3]=C;if((q|0)==0){E=0;i=e;return E|0}C=+sF(q,m);A=c[m>>2]|0;if((A|0)==(q|0)){E=0;i=e;return E|0}h[d+40>>3]=C;if((A|0)==0){E=0;i=e;return E|0}C=+sF(A,l);q=c[l>>2]|0;if((q|0)==(A|0)){E=0;i=e;return E|0}h[d+48>>3]=C;if((q|0)==0){E=0;i=e;return E|0}A=d+56|0;l=Ja(q|0,k|0,10)|0;c[A>>2]=l;m=c[k>>2]|0;k=(m|0)==(q|0)?0:m;if((k|0)==0){E=0;i=e;return E|0}m=fF(l,8)|0;q=m;c:do{if((l|0)>0){n=k;o=0;d:while(1){C=+sF(n,j);p=c[j>>2]|0;if((p|0)==(n|0)|(p|0)==0){G=41;break}g[q+(o<<3)>>2]=C;B=q+(o<<3)+4|0;v=Ja(p|0,f|0,10)|0;N=c[f>>2]|0;S=(N|0)==(p|0)?0:N;if((S|0)==0|(v|0)<1){break}else{T=S}do{S=a[T]|0;U=S<<24>>24==0;T=T+1|0}while(S<<24>>24!=45&(U^1));if(U){break}V=fF(v+1|0,1)|0;if((v|0)>0){H=v;S=V;N=T;while(1){p=a[N]|0;if(p<<24>>24==0){G=48;break d}D=S+1|0;a[S]=p;p=H-1|0;R=N+1|0;if((p|0)>0){H=p;S=D;N=R}else{W=D;X=R;break}}}else{W=V;X=T}a[W]=0;c[B>>2]=V;N=o+1|0;if((N|0)<(c[A>>2]|0)){n=X;o=N}else{break c}}if((G|0)==41){eF(m);E=0;i=e;return E|0}else if((G|0)==48){eF(V)}eF(m);E=0;i=e;return E|0}}while(0);c[d+60>>2]=q;E=z;i=e;return E|0}else if((y|0)==35|(y|0)==47){c[d>>2]=0;c[d+8>>2]=b;E=b;i=e;return E|0}else{if((tb(y|0)|0)==0){E=0;i=e;return E|0}c[d>>2]=0;c[d+8>>2]=b;E=b;i=e;return E|0}return 0}function Jn(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;d=i;i=i+16|0;e=d|0;f=d+8|0;g=Ja(a|0,e|0,10)|0;j=c[e>>2]|0;e=(j|0)==(a|0)?0:j;if((e|0)==0){k=0;i=d;return k|0}j=fF(g,24)|0;a=j;l=b|0;c[l>>2]=g;a:do{if((g|0)>0){m=0;n=e;o=a;while(1){h[o>>3]=+sF(n,f);p=c[f>>2]|0;if((n|0)==(p|0)){q=4;break}h[o+8>>3]=+sF(p,f);r=c[f>>2]|0;if((p|0)==(r|0)){q=6;break}h[o+16>>3]=0.0;p=m+1|0;if((p|0)<(c[l>>2]|0)){m=p;n=r;o=o+24|0}else{s=r;break a}}if((q|0)==4){eF(j);k=0;i=d;return k|0}else if((q|0)==6){eF(j);k=0;i=d;return k|0}}else{s=e}}while(0);c[b+4>>2]=a;k=s;i=d;return k|0}function Kn(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;Vo(a);b=a;d=c[b>>2]&3;e=a-32|0;f=a+32|0;g=So(c[((d|0)==2?a:e)+28>>2]|0,c[((d|0)==3?a:f)+28>>2]|0)|0;if((g|0)==0){d=c[b>>2]&3;Zo(c[((d|0)==2?a:e)+28>>2]|0,c[((d|0)==3?a:f)+28>>2]|0,a)|0;return}else{ep(a,g);return}}function Ln(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;d=b+8|0;b=c[d>>2]|0;e=b+204|0;if((c[e+4>>2]|0)>0){f=0;g=b;h=e}else{return}while(1){c[g+180>>2]=c[(c[h>>2]|0)+(f<<2)>>2];e=c[d>>2]|0;b=c[e+180>>2]|0;do{if((b|0)==0){i=e}else{j=b;do{k=j+8|0;a[(c[k>>2]|0)+157|0]=0;j=c[(c[k>>2]|0)+164>>2]|0;}while((j|0)!=0);j=c[d>>2]|0;k=c[j+180>>2]|0;if((k|0)==0){i=j;break}else{l=k}do{Mn(l);l=c[(c[l+8>>2]|0)+164>>2]|0;}while((l|0)!=0);i=c[d>>2]|0}}while(0);b=f+1|0;e=i+204|0;if((b|0)<(c[e+4>>2]|0)){f=b;g=i;h=e}else{break}}return}function Mn(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;d=b+8|0;b=(c[d>>2]|0)+157|0;if((a[b]|0)!=0){return}a[b]=1;a[(c[d>>2]|0)+158|0]=1;b=c[d>>2]|0;e=c[c[b+180>>2]>>2]|0;if((e|0)==0){f=b}else{b=0;g=e;while(1){e=g;h=g-32|0;i=c[((c[e>>2]&3|0)==2?g:h)+28>>2]|0;j=c[i+8>>2]|0;do{if((a[j+158|0]|0)==0){if((a[j+157|0]|0)!=0){k=b;break}Mn(i);k=b}else{Vo(g);l=c[e>>2]&3;m=g+32|0;n=So(c[((l|0)==2?g:h)+28>>2]|0,c[((l|0)==3?g:m)+28>>2]|0)|0;if((n|0)==0){l=c[e>>2]&3;Zo(c[((l|0)==2?g:h)+28>>2]|0,c[((l|0)==3?g:m)+28>>2]|0,g)|0}else{ep(g,n)}k=b-1|0}}while(0);h=k+1|0;e=c[d>>2]|0;i=c[(c[e+180>>2]|0)+(h<<2)>>2]|0;if((i|0)==0){f=e;break}else{b=h;g=i}}}a[f+158|0]=0;return}function Nn(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;b=ux(a)|0;if((b|0)==0){d=0;return d|0}else{e=0;f=b}while(1){b=mw(a,f)|0;if((b|0)==0){g=e}else{h=e;i=b;while(1){b=c[i>>2]&3;j=c[(c[(c[((b|0)==2?i:i-32|0)+28>>2]|0)+8>>2]|0)+232>>2]|0;k=c[(c[(c[((b|0)==3?i:i+32|0)+28>>2]|0)+8>>2]|0)+232>>2]|0;if((j|0)==(k|0)){l=h}else{b=j-k|0;l=h-1+((b|0)>-1?b:-b|0)|0}b=ow(a,i)|0;if((b|0)==0){g=l;break}else{h=l;i=b}}}i=vx(a,f)|0;if((i|0)==0){d=g;break}else{e=g;f=i}}return d|0}function On(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;d=ux(b)|0;if((d|0)==0){return}else{e=d}do{d=e+8|0;f=(c[d>>2]|0)+172|0;if((c[f+4>>2]|0)>0){g=0;h=f;do{a[(c[(c[(c[h>>2]|0)+(g<<2)>>2]|0)+8>>2]|0)+112|0]=0;g=g+1|0;h=(c[d>>2]|0)+172|0;}while((g|0)<(c[h+4>>2]|0))}e=vx(b,e)|0;}while((e|0)!=0);return}function Pn(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0.0,s=0.0,t=0,u=0,v=0,w=0.0,x=0.0,y=0.0,z=0.0,A=0,B=0.0,C=0.0,D=0.0,E=0,F=0.0,G=0,H=0,I=0,J=0.0,K=0.0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0.0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0.0,qa=0.0,ra=0.0,sa=0;e=i;f=c[d+24>>2]|0;c[44276]=kk((Lw(b)|0)*24|0)|0;c[44318]=0;g=ux(b)|0;if((g|0)!=0){j=g;do{c[(c[j+8>>2]|0)+120>>2]=-1;j=vx(b,j)|0;}while((j|0)!=0)}j=ux(b)|0;if((j|0)!=0){g=j;do{j=g+8|0;do{if((c[(c[j>>2]|0)+216>>2]|0)==0){k=jk(4)|0;c[(c[44276]|0)+((c[44318]|0)*24|0)>>2]=k;c[c[(c[44276]|0)+((c[44318]|0)*24|0)>>2]>>2]=g;c[(c[44276]|0)+((c[44318]|0)*24|0)+4>>2]=1;k=c[44318]|0;l=c[44276]|0;h[l+(k*24|0)+8>>3]=+h[(c[j>>2]|0)+32>>3];h[l+(k*24|0)+16>>3]=+h[(c[j>>2]|0)+40>>3];c[(c[j>>2]|0)+120>>2]=k;c[44318]=(c[44318]|0)+1}else{k=Lm(g)|0;l=k+8|0;m=c[l>>2]|0;n=c[m+120>>2]|0;if((n|0)>-1){p=(c[44276]|0)+(n*24|0)+4|0;q=c[p>>2]|0;c[p>>2]=q+1;c[(c[(c[44276]|0)+(n*24|0)>>2]|0)+(q<<2)>>2]=g;q=c[44276]|0;p=q+(n*24|0)+8|0;h[p>>3]=+h[(c[j>>2]|0)+32>>3]+ +h[p>>3];p=q+(n*24|0)+16|0;r=+h[p>>3];s=+h[(c[j>>2]|0)+40>>3];h[p>>3]=r<s?s:r;c[(c[j>>2]|0)+120>>2]=n;break}n=jk(c[m+216>>2]<<2)|0;c[(c[44276]|0)+((c[44318]|0)*24|0)>>2]=n;c[c[(c[44276]|0)+((c[44318]|0)*24|0)>>2]>>2]=k;n=c[44318]|0;m=c[44276]|0;if((k|0)==(g|0)){c[m+(n*24|0)+4>>2]=1;k=c[44318]|0;p=c[44276]|0;h[p+(k*24|0)+8>>3]=+h[(c[l>>2]|0)+32>>3];h[p+(k*24|0)+16>>3]=+h[(c[l>>2]|0)+40>>3];t=k}else{c[(c[m+(n*24|0)>>2]|0)+4>>2]=g;c[(c[44276]|0)+((c[44318]|0)*24|0)+4>>2]=2;n=c[44318]|0;m=c[44276]|0;h[m+(n*24|0)+8>>3]=+h[(c[l>>2]|0)+32>>3]+ +h[(c[j>>2]|0)+32>>3];r=+h[(c[l>>2]|0)+40>>3];s=+h[(c[j>>2]|0)+40>>3];h[m+(n*24|0)+16>>3]=r<s?s:r;t=n}c[(c[l>>2]|0)+120>>2]=t;c[(c[j>>2]|0)+120>>2]=c[44318];c[44318]=(c[44318]|0)+1}}while(0);g=vx(b,g)|0;}while((g|0)!=0)}g=(f|0)==-1;a:do{if((f|0)>0|g){t=b+8|0;j=d+8|0;l=d|0;n=g^1;m=c[o>>2]|0;k=0;r=1.7976931348623157e+308;while(1){p=ux(b)|0;if((p|0)!=0){q=p;do{c[(c[q+8>>2]|0)+232>>2]=0;q=vx(b,q)|0;}while((q|0)!=0)}Yp(b);Qn(b);q=c[44320]|0;p=c[t>>2]|0;s=+(da(c[p+240>>2]|0,q-1|0)|0);if((q|0)>0){u=c[44394]|0;v=c[p+236>>2]|0;w=0.0;x=s;p=0;while(1){y=+h[u+(p*40|0)+24>>3]+ +(da(c[u+(p*40|0)+16>>2]|0,v)|0);z=w<y?y:w;y=x+ +h[u+(p*40|0)+32>>3];A=p+1|0;if((A|0)<(q|0)){w=z;x=y;p=A}else{B=z;C=y;break}}}else{B=0.0;C=s}x=B/C;h[j>>3]=x;if((a[213992]|0)==0){D=x}else{gc(m|0,121560,(p=i,i=i+8|0,h[p>>3]=x,p)|0)|0;i=p;D=+h[j>>3]}if(D<=+h[l>>3]){break}if(!(r>D|n)){break}c[43750]=jk((Lw(b)|0)<<2)|0;if((Lw(b)|0)>0){p=0;do{c[(c[43750]|0)+(p<<2)>>2]=p;p=p+1|0;}while((p|0)<(Lw(b)|0))}Qn(b);p=c[43750]|0;Jb(p|0,Lw(b)|0,4,166);p=c[44320]|0;q=c[43750]|0;u=c[44394]|0;v=0;while(1){if((v|0)>=(p|0)){E=0;F=0.0;break}G=c[q+(v<<2)>>2]|0;H=v+1|0;if((c[u+(G*40|0)+12>>2]|0)<2){v=H}else{I=30;break}}do{if((I|0)==30){I=0;if((p|0)<=(H|0)){E=G;F=0.0;break}E=G;F=+h[u+((c[q+(H<<2)>>2]|0)*40|0)+24>>3]}}while(0);do{if((v|0)!=(p|0)){Jb(c[u+(E*40|0)+4>>2]|0,c[u+(E*40|0)+12>>2]|0,4,104);q=c[44394]|0;s=+h[q+(E*40|0)+24>>3];if(F>s*.25){if(F<s*3.0*.25){J=F}else{I=35}}else{I=35}if((I|0)==35){I=0;J=s*.5}A=c[q+(E*40|0)+12>>2]|0;if((A|0)>0){K=0.0;L=0;M=0;N=0;O=0;P=q}else{break}while(1){q=c[P+(E*40|0)+8>>2]|0;do{if((c[q+(O<<2)>>2]|0)==0){Q=c[(c[P+(E*40|0)+4>>2]|0)+(O<<2)>>2]|0;R=Q+8|0;s=+h[R>>3]*72.0;x=K>0.0?+(c[(c[t>>2]|0)+236>>2]|0):0.0;S=(L|0)==0;if(K+s+x<=J|S){T=N;U=S?Q:M;V=S?1:L;W=K+(s+x);X=P;break}S=M+4|0;Y=c[S>>2]|0;if((Y|0)>0){Z=Q+4|0;_=M|0;$=Q|0;Q=0;aa=c[Z>>2]|0;ba=Y;while(1){if((aa|0)>0){Y=0;do{a[(c[(Zo(c[(c[_>>2]|0)+(Q<<2)>>2]|0,c[(c[$>>2]|0)+(Y<<2)>>2]|0,0)|0)+8>>2]|0)+112|0]=1;Y=Y+1|0;ca=c[Z>>2]|0;}while((Y|0)<(ca|0));ea=ca;fa=c[S>>2]|0}else{ea=aa;fa=ba}Y=Q+1|0;if((Y|0)<(fa|0)){Q=Y;aa=ea;ba=fa}else{break}}ga=c[(c[44394]|0)+(E*40|0)+8>>2]|0}else{ga=q}c[ga+(O<<2)>>2]=1;ba=(c[44394]|0)+(E*40|0)+12|0;c[ba>>2]=(c[ba>>2]|0)-1;ba=(c[44394]|0)+(E*40|0)+16|0;c[ba>>2]=(c[ba>>2]|0)+1;ba=c[44394]|0;aa=ba+(E*40|0)+24|0;h[aa>>3]=+h[aa>>3]-(+h[R>>3]*72.0+ +(c[(c[t>>2]|0)+236>>2]|0));T=N;U=M;V=L;W=K;X=ba}else{T=N+1|0;U=M;V=L;W=K;X=P}}while(0);q=O+1|0;if((q|0)<(T+A|0)){K=W;L=V;M=U;N=T;O=q;P=X}else{break}}}}while(0);u=k+1|0;if((u|0)<(f|0)|g){k=u;r=D}else{break a}}t=d+20|0;c[d+16>>2]=c[t>>2];c[t>>2]=k}}while(0);Yp(b);Qn(b);g=c[44320]|0;if((g|0)>0){f=0;X=0;P=0;O=c[44394]|0;T=g;while(1){g=O+(P*40|0)|0;N=c[O+(P*40|0)+12>>2]|0;U=(X|0)==0;do{if((N|0)==0){if(U){ha=c[g>>2]|0}else{ha=f}ia=X+1|0;ja=ha;ka=O;la=T}else{if(U){ia=0;ja=f;ka=O;la=T;break}if((c[g>>2]|0)>(f|0)&(N|0)>0){ma=0;na=O}else{ia=X;ja=f;ka=O;la=T;break}while(1){M=c[(c[na+(P*40|0)+4>>2]|0)+(ma<<2)>>2]|0;V=M+4|0;if((c[V>>2]|0)>0){L=M|0;M=0;do{E=(c[(c[(c[L>>2]|0)+(M<<2)>>2]|0)+8>>2]|0)+232|0;c[E>>2]=(c[E>>2]|0)-X;M=M+1|0;}while((M|0)<(c[V>>2]|0));oa=c[44394]|0}else{oa=na}V=ma+1|0;if((V|0)<(c[oa+(P*40|0)+12>>2]|0)){ma=V;na=oa}else{break}}ia=X;ja=f;ka=oa;la=c[44320]|0}}while(0);N=P+1|0;if((N|0)<(la|0)){f=ja;X=ia;P=N;O=ka;T=la}else{break}}}Qn(b);la=c[44320]|0;T=c[b+8>>2]|0;D=+(da(c[T+240>>2]|0,la-1|0)|0);if((la|0)<=0){pa=0.0;qa=D;ra=pa/qa;sa=d+8|0;h[sa>>3]=ra;i=e;return}b=c[44394]|0;ka=c[T+236>>2]|0;W=0.0;K=D;T=0;while(1){D=+h[b+(T*40|0)+24>>3]+ +(da(c[b+(T*40|0)+16>>2]|0,ka)|0);J=W<D?D:W;D=K+ +h[b+(T*40|0)+32>>3];O=T+1|0;if((O|0)<(la|0)){W=J;K=D;T=O}else{pa=J;qa=D;break}}ra=pa/qa;sa=d+8|0;h[sa>>3]=ra;i=e;return}function Qn(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,i=0,j=0,k=0,l=0.0,m=0;c[44320]=0;b=c[44394]|0;if((b|0)!=0){if((c[44318]|0)>0){d=0;e=b;while(1){f=c[e+(d*40|0)+4>>2]|0;if((f|0)==0){g=e}else{eF(f);g=c[44394]|0}f=c[g+(d*40|0)+8>>2]|0;if((f|0)==0){i=g}else{eF(f);i=c[44394]|0}f=d+1|0;if((f|0)<(c[44318]|0)){d=f;e=i}else{j=i;break}}}else{j=b}eF(j)}c[44394]=jk((c[44318]|0)*40|0)|0;j=c[44318]|0;if((j|0)>0){b=0;i=j;while(1){j=jk(i<<2)|0;c[(c[44394]|0)+(b*40|0)+4>>2]=j;j=jk(c[44318]<<2)|0;c[(c[44394]|0)+(b*40|0)+8>>2]=j;c[(c[44394]|0)+(b*40|0)>>2]=b;c[(c[44394]|0)+(b*40|0)+12>>2]=0;c[(c[44394]|0)+(b*40|0)+16>>2]=0;j=b+1|0;vF((c[44394]|0)+(b*40|0)+24|0,0,16)|0;e=c[44318]|0;if((j|0)<(e|0)){b=j;i=e}else{break}}}i=ux(a)|0;if((i|0)!=0){b=i;do{i=mw(a,b)|0;if((i|0)!=0){e=i;do{i=e;j=c[i>>2]&3;d=(c[(c[(c[((j|0)==3?e:e+32|0)+28>>2]|0)+8>>2]|0)+232>>2]|0)+1|0;g=e-32|0;if((d|0)<(c[(c[(c[((j|0)==2?e:g)+28>>2]|0)+8>>2]|0)+232>>2]|0)){j=d;do{d=(c[44394]|0)+(j*40|0)+16|0;c[d>>2]=(c[d>>2]|0)+1;j=j+1|0;}while((j|0)<(c[(c[(c[((c[i>>2]&3|0)==2?e:g)+28>>2]|0)+8>>2]|0)+232>>2]|0))}e=ow(a,e)|0;}while((e|0)!=0)}b=vx(a,b)|0;}while((b|0)!=0)}if((c[44318]|0)<=0){return}b=a+8|0;a=0;do{e=c[44276]|0;g=(c[c[e+(a*24|0)>>2]>>2]|0)+8|0;i=c[(c[g>>2]|0)+232>>2]|0;if((i|0)<(c[44320]|0)){k=i}else{c[44320]=i+1;k=c[(c[g>>2]|0)+232>>2]|0}i=c[44394]|0;j=i+(k*40|0)+24|0;l=+h[j>>3];h[j>>3]=l+(+h[e+(a*24|0)+8>>3]*72.0+(l>0.0?+(c[(c[b>>2]|0)+236>>2]|0):0.0));j=c[(c[g>>2]|0)+232>>2]|0;d=i+(j*40|0)+32|0;l=+h[e+(a*24|0)+16>>3]*72.0;if(+h[d>>3]<l){h[d>>3]=l;m=c[(c[g>>2]|0)+232>>2]|0}else{m=j}c[(c[i+(m*40|0)+4>>2]|0)+(c[i+(m*40|0)+12>>2]<<2)>>2]=e+(a*24|0);e=(c[44394]|0)+((c[(c[g>>2]|0)+232>>2]|0)*40|0)+12|0;c[e>>2]=(c[e>>2]|0)+1;a=a+1|0;}while((a|0)<(c[44318]|0));return}function Rn(a){a=a|0;var b=0,d=0;b=ux(a)|0;if((b|0)==0){return}else{d=b}do{c[(c[d+8>>2]|0)+216>>2]=0;d=vx(a,d)|0;}while((d|0)!=0);return}function Sn(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=i;i=i+16|0;e=d+8|0;c[e>>2]=5;f=ew(a|0,158384)|0;do{if((f|0)!=0){a=ac(f|0,128368,(g=i,i=i+16|0,c[g>>2]=d,c[g+8>>2]=e,g)|0)|0;i=g;if((a|0)<1){break}Fv(0,115472,(g=i,i=i+1|0,i=i+7&-8,c[g>>2]=0,g)|0)|0;i=g;c[b+24>>2]=0;c[b+32>>2]=0;i=d;return 0}}while(0);c[b+24>>2]=0;c[b+32>>2]=0;i=d;return 0}function Tn(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=b;b=c[a>>2]|0;a=b+4|0;if((c[a>>2]|0)>0){e=b|0;b=0;f=0;while(1){g=c[(c[e>>2]|0)+(f<<2)>>2]|0;h=Hx(g|0)|0;i=mw(h,g)|0;if((i|0)==0){j=b}else{g=b;k=i;while(1){i=g+1|0;l=ow(h,k)|0;if((l|0)==0){j=i;break}else{g=i;k=l}}}k=f+1|0;if((k|0)<(c[a>>2]|0)){b=j;f=k}else{m=j;break}}}else{m=0}j=c[d>>2]|0;d=j+4|0;if((c[d>>2]|0)<=0){n=0;o=(n|0)<(m|0);p=o&1;q=(n|0)>(m|0);r=q&1;s=p-r|0;return s|0}f=j|0;j=0;b=0;while(1){a=c[(c[f>>2]|0)+(b<<2)>>2]|0;e=Hx(a|0)|0;k=mw(e,a)|0;if((k|0)==0){t=j}else{a=j;g=k;while(1){k=a+1|0;h=ow(e,g)|0;if((h|0)==0){t=k;break}else{a=k;g=h}}}g=b+1|0;if((g|0)<(c[d>>2]|0)){j=t;b=g}else{n=t;break}}o=(n|0)<(m|0);p=o&1;q=(n|0)>(m|0);r=q&1;s=p-r|0;return s|0}function Un(a,b){a=a|0;b=b|0;var d=0,e=0.0,f=0.0;d=c[44394]|0;e=+h[d+((c[b>>2]|0)*40|0)+24>>3];f=+h[d+((c[a>>2]|0)*40|0)+24>>3];return(e>f)-(e<f)|0}function Vn(b){b=b|0;var d=0,e=0,f=0;d=c[53812]|0;do{if((d|0)!=0){e=fw(b|0,d)|0;if((e|0)==0){break}if((a[e]|0)==0){break}if((Km(e)|0)<<24>>24==0){f=1}else{break}return f|0}}while(0);f=0;return f|0}function Wn(b){b=b|0;var d=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0.0;co(b);d=ux(b)|0;if((d|0)==0){return}else{f=d}do{d=mw(b,f)|0;if((d|0)!=0){g=d;do{d=g+8|0;a:do{if((c[(c[d>>2]|0)+172>>2]|0)==0){h=c[53812]|0;do{if((h|0)!=0){i=fw(g|0,h)|0;if((i|0)==0){break}if((a[i]|0)==0){break}if((Km(i)|0)<<24>>24==0){break a}}}while(0);h=g;i=g+32|0;j=Lm(c[((c[h>>2]&3|0)==3?g:i)+28>>2]|0)|0;k=g-32|0;l=Lm(c[((c[h>>2]&3|0)==2?g:k)+28>>2]|0)|0;if((j|0)==(l|0)){break}do{if((c[(c[j+8>>2]|0)+212>>2]|0)==0){if((c[(c[l+8>>2]|0)+212>>2]|0)!=0){break}m=So(j,l)|0;if((m|0)==0){Zo(j,l,g)|0;break a}else{ep(g,m);break a}}}while(0);l=c[h>>2]&3;j=c[((l|0)==3?g:i)+28>>2]|0;m=c[((l|0)==2?g:k)+28>>2]|0;l=c[j+8>>2]|0;n=c[l+212>>2]|0;if((n|0)==0){o=0}else{o=(c[l+232>>2]|0)-(c[(c[(c[(c[n+8>>2]|0)+252>>2]|0)+8>>2]|0)+232>>2]|0)|0}n=c[m+8>>2]|0;l=c[n+212>>2]|0;if((l|0)==0){p=0}else{p=(c[n+232>>2]|0)-(c[(c[(c[(c[l+8>>2]|0)+252>>2]|0)+8>>2]|0)+232>>2]|0)|0}l=(e[(c[d>>2]|0)+170>>1]|0)+(o-p)|0;if((l|0)>0){q=0.0;r=+(l|0)}else{q=+(-l|0);r=0.0}l=bp(b)|0;a[(c[l+8>>2]|0)+156|0]=2;n=Lm(j)|0;j=Lm(m)|0;m=Jp(l,n,q,(c[(c[d>>2]|0)+156>>2]|0)*10|0)|0;n=g;c[(c[(Jp(l,j,r,c[(c[d>>2]|0)+156>>2]|0)|0)+8>>2]|0)+116>>2]=n;c[(c[m+8>>2]|0)+116>>2]=n}}while(0);g=ow(b,g)|0;}while((g|0)!=0)}f=vx(b,f)|0;}while((f|0)!=0);return}function Xn(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,i=0,j=0,k=0,l=0,m=0,n=0.0,o=0;g=c[d>>2]&3;i=c[(c[(c[((g|0)==3?d:d+32|0)+28>>2]|0)+8>>2]|0)+232>>2]|0;j=c[(c[(c[((g|0)==2?d:d-32|0)+28>>2]|0)+8>>2]|0)+232>>2]|0;g=(i|0)>(j|0)?i:j;j=d+8|0;d=(c[j>>2]|0)+172|0;if((c[d>>2]|0)!=0){cc(108464,148536,149,170280)}c[d>>2]=e;d=a+8|0;if((f|0)==0){f=e;while(1){a=f+8|0;i=(c[a>>2]|0)+154|0;b[i>>1]=(b[i>>1]|0)+(b[(c[j>>2]|0)+154>>1]|0);i=(c[a>>2]|0)+156|0;c[i>>2]=(c[i>>2]|0)+(c[(c[j>>2]|0)+156>>2]|0);i=f;a=f-32|0;k=(c[((c[i>>2]&3|0)==2?f:a)+28>>2]|0)+8|0;l=c[k>>2]|0;if((c[l+232>>2]|0)==(g|0)){m=8;break}n=+((c[(c[d>>2]|0)+236>>2]|0)/2|0|0);o=l+88|0;h[o>>3]=n+ +h[o>>3];o=(c[k>>2]|0)+96|0;h[o>>3]=n+ +h[o>>3];o=c[c[(c[(c[((c[i>>2]&3|0)==2?f:a)+28>>2]|0)+8>>2]|0)+180>>2]>>2]|0;if((o|0)==0){m=8;break}else{f=o}}if((m|0)==8){return}}else{f=e;while(1){e=f+8|0;o=(c[e>>2]|0)+168|0;b[o>>1]=(b[o>>1]|0)+(b[(c[j>>2]|0)+168>>1]|0);o=(c[e>>2]|0)+154|0;b[o>>1]=(b[o>>1]|0)+(b[(c[j>>2]|0)+154>>1]|0);o=(c[e>>2]|0)+156|0;c[o>>2]=(c[o>>2]|0)+(c[(c[j>>2]|0)+156>>2]|0);o=f;e=f-32|0;a=(c[((c[o>>2]&3|0)==2?f:e)+28>>2]|0)+8|0;i=c[a>>2]|0;if((c[i+232>>2]|0)==(g|0)){m=8;break}n=+((c[(c[d>>2]|0)+236>>2]|0)/2|0|0);k=i+88|0;h[k>>3]=n+ +h[k>>3];k=(c[a>>2]|0)+96|0;h[k>>3]=n+ +h[k>>3];k=c[c[(c[(c[((c[o>>2]&3|0)==2?f:e)+28>>2]|0)+8>>2]|0)+180>>2]>>2]|0;if((k|0)==0){m=8;break}else{f=k}}if((m|0)==8){return}}}function Yn(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;do{if(!((a|0)==0|(b|0)==0)){d=c[a>>2]&3;e=c[b>>2]&3;if((c[((d|0)==3?a:a+32|0)+28>>2]|0)!=(c[((e|0)==3?b:b+32|0)+28>>2]|0)){break}if((c[((d|0)==2?a:a-32|0)+28>>2]|0)!=(c[((e|0)==2?b:b-32|0)+28>>2]|0)){break}if((c[(c[a+8>>2]|0)+96>>2]|0)!=(c[(c[b+8>>2]|0)+96>>2]|0)){break}if((Kp(a,b)|0)==0){break}else{f=1}return f|0}}while(0);f=0;return f|0}function Zn(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;d=b+8|0;c[(c[d>>2]|0)+180>>2]=0;c[(c[d>>2]|0)+220>>2]=0;co(b);e=c[d>>2]|0;if((c[e+172>>2]|0)>=1){f=1;g=e;while(1){eo(b,c[(c[g+176>>2]|0)+(f<<2)>>2]|0);e=c[d>>2]|0;if((f|0)<(c[e+172>>2]|0)){f=f+1|0;g=e}else{break}}}g=ux(b)|0;if((g|0)!=0){f=g;do{g=mw(b,f)|0;if((g|0)!=0){e=g;do{g=e;h=c[g>>2]|0;i=(c[(c[((h&3|0)==2?e:e-32|0)+28>>2]|0)+8>>2]|0)+160|0;j=a[i]|0;if(j<<24>>24<3){a[i]=j+1;k=c[g>>2]|0}else{k=h}h=(c[(c[((k&3|0)==3?e:e+32|0)+28>>2]|0)+8>>2]|0)+160|0;g=a[h]|0;if(g<<24>>24<3){a[h]=g+1}e=ow(b,e)|0;}while((e|0)!=0)}f=vx(b,f)|0;}while((f|0)!=0)}f=ux(b)|0;if((f|0)!=0){k=f;do{do{if((c[(c[k+8>>2]|0)+212>>2]|0)==0){if((k|0)!=(Lm(k)|0)){break}_o(b,k);f=(c[d>>2]|0)+220|0;c[f>>2]=(c[f>>2]|0)+1}}while(0);f=mw(b,k)|0;if((f|0)!=0){e=f;f=0;while(1){g=e+8|0;h=c[g>>2]|0;a:do{if((c[h+172>>2]|0)==0){j=e;i=c[j>>2]|0;l=i&3;m=e+32|0;n=c[((l|0)==3?e:m)+28>>2]|0;o=c[n+8>>2]|0;do{if((a[o+159|0]|0)!=7){p=e-32|0;q=c[((l|0)==2?e:p)+28>>2]|0;r=c[q+8>>2]|0;if((a[r+159|0]|0)==7){break}do{if((f|0)==0){s=i}else{t=c[f>>2]&3;if((n|0)!=(c[((t|0)==3?f:f+32|0)+28>>2]|0)){s=i;break}if((q|0)!=(c[((t|0)==2?f:f-32|0)+28>>2]|0)){s=i;break}if((c[o+232>>2]|0)==(c[r+232>>2]|0)){ep(e,f);Wo(e);u=f;break a}if((c[h+96>>2]|0)!=0){s=i;break}t=f+8|0;if((c[(c[t>>2]|0)+96>>2]|0)!=0){s=i;break}if((Kp(e,f)|0)==0){s=c[j>>2]|0;break}if((a[215376]|0)==0){Xn(b,e,c[(c[t>>2]|0)+172>>2]|0,1);Wo(e);u=f;break a}else{a[(c[g>>2]|0)+112|0]=6;u=f;break a}}}while(0);r=s&3;q=c[((r|0)==3?e:m)+28>>2]|0;if((q|0)==(c[((r|0)==2?e:p)+28>>2]|0)){Wo(e);u=e;break a}r=Lm(q)|0;q=Lm(c[((c[j>>2]&3|0)==2?e:p)+28>>2]|0)|0;t=c[j>>2]&3;if((c[((t|0)==3?e:m)+28>>2]|0)!=(r|0)){u=f;break a}if((c[((t|0)==2?e:p)+28>>2]|0)!=(q|0)){u=f;break a}t=c[(c[r+8>>2]|0)+232>>2]|0;v=c[(c[q+8>>2]|0)+232>>2]|0;if((t|0)==(v|0)){cp(b,e);u=e;break a}if((v|0)>(t|0)){_n(b,r,q,e);u=e;break a}t=uw(b,q,r,0,0)|0;do{if((t|0)!=0){r=c[t>>2]&3;q=c[((r|0)==2?t:t-32|0)+28>>2]|0;if((q|0)==(c[((c[j>>2]&3|0)==2?e:p)+28>>2]|0)){break}v=t+8|0;if((c[(c[v>>2]|0)+172>>2]|0)==0){_n(b,c[((r|0)==3?t:t+32|0)+28>>2]|0,q,t)}if((c[(c[g>>2]|0)+96>>2]|0)!=0){break}if((c[(c[v>>2]|0)+96>>2]|0)!=0){break}if((Kp(e,t)|0)==0){break}if((a[215376]|0)==0){Wo(e);Xn(b,e,c[(c[v>>2]|0)+172>>2]|0,1);u=f;break a}else{a[(c[g>>2]|0)+112|0]=6;a[(c[v>>2]|0)+153|0]=1;u=f;break a}}}while(0);t=c[j>>2]&3;_n(b,c[((t|0)==2?e:p)+28>>2]|0,c[((t|0)==3?e:m)+28>>2]|0,e);u=e;break a}}while(0);do{if((f|0)==0){w=i}else{o=c[f>>2]&3;if((c[((o|0)==3?f:f+32|0)+28>>2]|0)!=(n|0)){w=i;break}t=e-32|0;if((c[((o|0)==2?f:f-32|0)+28>>2]|0)!=(c[((l|0)==2?e:t)+28>>2]|0)){w=i;break}o=f+8|0;if((c[(c[o>>2]|0)+96>>2]|0)!=(c[h+96>>2]|0)){w=i;break}if((Kp(f,e)|0)==0){w=c[j>>2]|0;break}v=c[(c[o>>2]|0)+172>>2]|0;if((v|0)!=0){Xn(b,e,v,0);Wo(e);u=f;break a}v=c[j>>2]&3;if((c[(c[(c[((v|0)==3?e:m)+28>>2]|0)+8>>2]|0)+232>>2]|0)!=(c[(c[(c[((v|0)==2?e:t)+28>>2]|0)+8>>2]|0)+232>>2]|0)){u=f;break a}ep(e,f);Wo(e);u=f;break a}}while(0);i=c[((w&3|0)==3?e:m)+28>>2]|0;l=c[i+8>>2]|0;if((a[l+159|0]|0)==7){x=c[(c[(c[(c[l+212>>2]|0)+8>>2]|0)+256>>2]|0)+(c[l+232>>2]<<2)>>2]|0;y=w}else{l=Lm(i)|0;x=l;y=c[j>>2]|0}l=c[((y&3|0)==2?e:e-32|0)+28>>2]|0;i=c[l+8>>2]|0;if((a[i+159|0]|0)==7){z=c[(c[(c[(c[i+212>>2]|0)+8>>2]|0)+256>>2]|0)+(c[i+232>>2]<<2)>>2]|0}else{z=Lm(l)|0}l=(c[(c[x+8>>2]|0)+232>>2]|0)>(c[(c[z+8>>2]|0)+232>>2]|0);i=l?x:z;n=l?z:x;l=n+8|0;t=i+8|0;if((c[(c[l>>2]|0)+212>>2]|0)==(c[(c[t>>2]|0)+212>>2]|0)){u=e;break}v=So(n,i)|0;if((v|0)!=0){Xn(b,e,v,1);u=e;break}if((c[(c[l>>2]|0)+232>>2]|0)==(c[(c[t>>2]|0)+232>>2]|0)){u=e;break}_n(b,n,i,e);i=c[(c[g>>2]|0)+172>>2]|0;if((i|0)==0){u=e;break}n=i;while(1){i=n;l=n-32|0;if((c[(c[(c[((c[i>>2]&3|0)==2?n:l)+28>>2]|0)+8>>2]|0)+232>>2]|0)>(c[(c[t>>2]|0)+232>>2]|0)){u=e;break a}a[(c[n+8>>2]|0)+112|0]=5;v=c[c[(c[(c[((c[i>>2]&3|0)==2?n:l)+28>>2]|0)+8>>2]|0)+180>>2]>>2]|0;if((v|0)==0){u=e;break}else{n=v}}}else{u=e}}while(0);g=ow(b,e)|0;if((g|0)==0){break}else{e=g;f=u}}}k=vx(b,k)|0;}while((k|0)!=0)}if((Ix(b|0)|0)==(b|0)){return}b=c[(c[d>>2]|0)+204>>2]|0;if((b|0)==0){A=kk(4)|0}else{A=mk(b,4)|0}c[(c[d>>2]|0)+204>>2]=A;A=c[d>>2]|0;c[c[A+204>>2]>>2]=c[A+180>>2];return}function _n(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0.0,s=0,t=0.0,u=0,v=0,w=0,x=0;g=f+8|0;i=c[g>>2]|0;if((c[i+96>>2]|0)==0){j=-1}else{j=((c[(c[e+8>>2]|0)+232>>2]|0)+(c[(c[d+8>>2]|0)+232>>2]|0)|0)/2|0}if((c[i+172>>2]|0)!=0){cc(121016,148536,90,170360)}i=c[(c[d+8>>2]|0)+232>>2]|0;k=e+8|0;l=c[(c[k>>2]|0)+232>>2]|0;if((i|0)>=(l|0)){cc(112216,148536,104,170360)}m=b|0;n=b+8|0;o=d;d=i;i=l;while(1){l=d+1|0;if((l|0)<(i|0)){do{if((l|0)==(j|0)){p=c[(c[g>>2]|0)+96>>2]|0;q=+h[p+24>>3];r=+h[p+32>>3];p=bp(b)|0;s=p+8|0;c[(c[s>>2]|0)+104>>2]=c[(c[g>>2]|0)+96>>2];t=+(c[(c[(Ix(Hx(p|0)|0)|0)+8>>2]|0)+236>>2]|0);h[(c[s>>2]|0)+88>>3]=t;if((a[(c[g>>2]|0)+114|0]|0)!=0){u=p;break}v=(c[(c[(Ix(m)|0)+8>>2]|0)+116>>2]&1|0)==0;w=(c[s>>2]|0)+80|0;if(v){h[w>>3]=r;h[(c[s>>2]|0)+96>>3]=q;u=p;break}else{h[w>>3]=q;h[(c[s>>2]|0)+96>>3]=r;u=p;break}}else{p=bp(b)|0;r=+((c[(c[n>>2]|0)+236>>2]|0)/2|0|0);s=p+8|0;w=(c[s>>2]|0)+88|0;h[w>>3]=r+ +h[w>>3];w=(c[s>>2]|0)+96|0;h[w>>3]=r+ +h[w>>3];u=p}}while(0);c[(c[u+8>>2]|0)+232>>2]=l;x=u}else{x=e}wp(Zo(o,x,f)|0);p=c[(c[k>>2]|0)+232>>2]|0;if((l|0)<(p|0)){o=x;d=l;i=p}else{break}}if((c[(c[g>>2]|0)+172>>2]|0)==0){cc(112216,148536,104,170360)}else{return}}function $n(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;b=a|0;d=Ix(b)|0;e=ux(a)|0;if((e|0)==0){return}else{f=e}do{e=rw(Ix(b)|0,f)|0;if((e|0)!=0){g=0;h=e;while(1){e=sw(Ix(b)|0,h,f)|0;do{if((Rx(a,h|0)|0)==0){i=(c[h>>2]&3|0)==2?h:h-32|0;j=(Yn(g,i)|0)==0;k=c[i>>2]&3;l=c[((k|0)==3?i:i+32|0)+28>>2]|0;m=c[(c[l+8>>2]|0)+232>>2]|0;n=c[((k|0)==2?i:i-32|0)+28>>2]|0;k=c[(c[n+8>>2]|0)+232>>2]|0;o=(m|0)==(k|0);if(!j){if(o){p=g}else{p=0}c[(c[i+8>>2]|0)+172>>2]=p;j=c[(c[g+8>>2]|0)+172>>2]|0;if((j|0)==0){q=g;break}Xn(a,i,j,0);Xo(i);q=g;break}if(!o){if((k|0)>(m|0)){ao(l,n,i);q=i;break}else{ao(n,l,i);q=i;break}}m=To(l,n)|0;if((m|0)==0){cp(d,i);q=i;break}if((i|0)==(m|0)){q=g;break}Xo(i);if((c[(c[i+8>>2]|0)+172>>2]|0)!=0){q=g;break}ep(i,m);q=g}else{q=g}}while(0);if((e|0)==0){break}else{g=q;h=e}}}f=vx(a,f)|0;}while((f|0)!=0);return}function ao(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;g=c[d+8>>2]|0;i=c[g+212>>2]|0;do{if((i|0)==0){j=d}else{k=c[i+8>>2]|0;if((a[k+260|0]|0)!=0){j=d;break}j=c[(c[k+256>>2]|0)+(c[g+232>>2]<<2)>>2]|0}}while(0);g=c[e+8>>2]|0;i=c[g+212>>2]|0;do{if((i|0)==0){l=e;m=g}else{k=c[i+8>>2]|0;if((a[k+260|0]|0)!=0){l=e;m=g;break}n=c[(c[k+256>>2]|0)+(c[g+232>>2]<<2)>>2]|0;l=n;m=c[n+8>>2]|0}}while(0);g=(j|0)==(d|0)&(l|0)==(e|0)?1:5;e=f+8|0;d=(c[e>>2]|0)+172|0;i=c[d>>2]|0;n=i;k=j+8|0;o=c[(c[k>>2]|0)+232>>2]|0;p=l+8|0;q=c[m+232>>2]|0;if((o|0)>=(q|0)){cc(136680,132440,81,170296)}m=c[i>>2]&3;do{if((c[((m|0)==3?n:i+32|0)+28>>2]|0)==(j|0)){if((c[((m|0)==2?n:i-32|0)+28>>2]|0)!=(l|0)){break}return}}while(0);if((b[(c[i+8>>2]|0)+168>>1]|0)<=1){a:do{if((q-o|0)==1){i=So(j,l)|0;do{if((i|0)!=0){if((Kp(f,i)|0)==0){break}c[(c[e>>2]|0)+172>>2]=i;m=i+8|0;a[(c[m>>2]|0)+112|0]=g;r=(c[m>>2]|0)+168|0;b[r>>1]=(b[r>>1]|0)+1;if((a[(c[k>>2]|0)+156|0]|0)!=0){s=i;break a}if((a[(c[p>>2]|0)+156|0]|0)!=0){s=i;break a}Wo(f);s=i;break a}}while(0);c[(c[e>>2]|0)+172>>2]=0;i=Zo(j,l,f)|0;a[(c[i+8>>2]|0)+112|0]=g;s=i}else{s=n}}while(0);o=c[(c[p>>2]|0)+232>>2]|0;if((o-(c[(c[k>>2]|0)+232>>2]|0)|0)<=1){return}q=s;i=c[q>>2]|0;if((c[((i&3|0)==3?s:s+32|0)+28>>2]|0)==(j|0)){t=s;u=i;v=o}else{c[(c[e>>2]|0)+172>>2]=0;o=Zo(j,c[((c[q>>2]&3|0)==2?s:s-32|0)+28>>2]|0,f)|0;c[(c[e>>2]|0)+172>>2]=o;Vo(s);t=o;u=c[o>>2]|0;v=c[(c[p>>2]|0)+232>>2]|0}o=u&3;u=c[((o|0)==2?t:t-32|0)+28>>2]|0;s=c[u+8>>2]|0;if((c[s+232>>2]|0)==(v|0)){w=t;x=o;y=u}else{u=s;while(1){s=c[c[u+180>>2]>>2]|0;o=c[s>>2]&3;t=c[((o|0)==2?s:s-32|0)+28>>2]|0;e=c[t+8>>2]|0;if((c[e+232>>2]|0)==(v|0)){w=s;x=o;y=t;break}else{u=e}}}if((y|0)==(l|0)){return}a[(c[(Zo(c[((x|0)==3?w:w+32|0)+28>>2]|0,l,f)|0)+8>>2]|0)+112|0]=g;Vo(w);return}c[d>>2]=0;do{if(((c[(c[p>>2]|0)+232>>2]|0)-(c[(c[k>>2]|0)+232>>2]|0)|0)==1){d=So(j,l)|0;if((d|0)==0){break}if((Kp(f,d)|0)==0){break}ep(f,d);if((a[(c[k>>2]|0)+156|0]|0)!=0){return}if((a[(c[p>>2]|0)+156|0]|0)!=0){return}Wo(f);return}}while(0);d=c[(c[k>>2]|0)+232>>2]|0;k=c[(c[p>>2]|0)+232>>2]|0;if((d|0)>=(k|0)){return}w=j|0;x=g&255;g=n;n=d;d=j;j=k;while(1){if((n|0)<(j-1|0)){k=Hx(w)|0;y=g;u=g-32|0;v=(c[((c[y>>2]&3|0)==2?g:u)+28>>2]|0)+8|0;e=c[v>>2]|0;t=c[e+232>>2]|0;o=c[e+236>>2]|0;e=k+8|0;s=c[(c[e>>2]|0)+184>>2]|0;q=c[s+(t*44|0)+4>>2]|0;i=(c[s+(t*44|0)>>2]|0)-1|0;if((i|0)>(o|0)){s=i;do{i=c[q+(s<<2)>>2]|0;r=i+8|0;c[(c[r>>2]|0)+236>>2]=s+1;c[q+(c[(c[r>>2]|0)+236>>2]<<2)>>2]=i;s=s-1|0;}while((s|0)>(o|0))}s=o+1|0;if((s|0)<(o+2|0)){c[q+(s<<2)>>2]=0}s=(c[(c[e>>2]|0)+184>>2]|0)+(t*44|0)|0;c[s>>2]=(c[s>>2]|0)+1;s=bp(k)|0;i=s+8|0;h[(c[i>>2]|0)+88>>3]=+h[(c[v>>2]|0)+88>>3];h[(c[i>>2]|0)+96>>3]=+h[(c[v>>2]|0)+96>>3];c[(c[i>>2]|0)+232>>2]=c[(c[v>>2]|0)+232>>2];c[(c[i>>2]|0)+236>>2]=(c[(c[v>>2]|0)+236>>2]|0)+1;c[(c[(c[(c[e>>2]|0)+184>>2]|0)+(t*44|0)+4>>2]|0)+(c[(c[i>>2]|0)+236>>2]<<2)>>2]=s;z=s;A=y;B=u}else{z=l;A=g;B=g-32|0}a[(c[(Zo(d,z,f)|0)+8>>2]|0)+112|0]=x;s=(c[g+8>>2]|0)+168|0;b[s>>1]=(b[s>>1]|0)-1;s=n+1|0;i=c[(c[p>>2]|0)+232>>2]|0;if((s|0)<(i|0)){g=c[c[(c[(c[((c[A>>2]&3|0)==2?g:B)+28>>2]|0)+8>>2]|0)+180>>2]>>2]|0;n=s;d=z;j=i}else{break}}return}function bo(d){d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;Zn(d);e=d+8|0;c[(c[e>>2]|0)+208>>2]=1;f=c[e>>2]|0;c[c[f+204>>2]>>2]=c[f+180>>2];qp(d);sp(d,0);f=d|0;g=Ix(f)|0;h=c[e>>2]|0;i=b[h+224>>1]|0;if(i<<16>>16>0){j=g+8|0;a[(c[(c[j>>2]|0)+184>>2]|0)+(((i<<16>>16)-1|0)*44|0)+33|0]=0;k=c[e>>2]|0;l=k;m=b[k+224>>1]|0;n=j}else{l=h;m=i;n=g+8|0}i=m<<16>>16;if(m<<16>>16>(b[l+226>>1]|0)){o=i;p=l}else{m=i;i=l;while(1){l=c[(c[i+184>>2]|0)+(m*44|0)>>2]|0;h=c[(c[(c[(c[i+256>>2]|0)+(m<<2)>>2]|0)+8>>2]|0)+236>>2]|0;j=c[n>>2]|0;k=c[j+184>>2]|0;q=c[k+(m*44|0)+4>>2]|0;do{if((l|0)<1){r=h-l|0;s=r+1|0;t=c[k+(m*44|0)>>2]|0;if((s|0)<(t|0)){u=r;r=s;while(1){s=c[q+(r<<2)>>2]|0;v=s+8|0;c[(c[v>>2]|0)+236>>2]=u+l;c[q+(c[(c[v>>2]|0)+236>>2]<<2)>>2]=s;s=r+1|0;v=c[n>>2]|0;w=c[(c[v+184>>2]|0)+(m*44|0)>>2]|0;if((s|0)<(w|0)){u=r;r=s}else{x=v;y=w;break}}}else{x=j;y=t}r=l-1|0;u=y+r|0;if((u|0)<(y|0)){z=u}else{A=x;B=r;break}while(1){c[q+(z<<2)>>2]=0;u=z+1|0;w=c[n>>2]|0;if((u|0)<(c[(c[w+184>>2]|0)+(m*44|0)>>2]|0)){z=u}else{A=w;B=r;break}}}else{r=(c[k+(m*44|0)>>2]|0)-1|0;if((r|0)>(h|0)){t=l-1|0;w=r;do{r=c[q+(w<<2)>>2]|0;u=r+8|0;c[(c[u>>2]|0)+236>>2]=t+w;c[q+(c[(c[u>>2]|0)+236>>2]<<2)>>2]=r;w=w-1|0;}while((w|0)>(h|0))}w=h+1|0;if((w|0)<(h+l|0)){vF(q+(w<<2)|0,0,(l<<2)-4|0)|0}A=c[n>>2]|0;B=l-1|0}}while(0);l=(c[A+184>>2]|0)+(m*44|0)|0;c[l>>2]=(c[l>>2]|0)+B;l=c[(c[e>>2]|0)+184>>2]|0;if((c[l+(m*44|0)>>2]|0)>0){q=h;k=0;j=l;while(1){w=c[(c[j+(m*44|0)+4>>2]|0)+(k<<2)>>2]|0;c[(c[(c[(c[n>>2]|0)+184>>2]|0)+(m*44|0)+4>>2]|0)+(q<<2)>>2]=w;t=w+8|0;c[(c[t>>2]|0)+236>>2]=q;if((a[(c[t>>2]|0)+156|0]|0)==1){c[w+12>>2]=g}ap(d,w);_o(Ix(f)|0,w);w=(c[(Ix(f)|0)+8>>2]|0)+220|0;c[w>>2]=(c[w>>2]|0)+1;w=k+1|0;t=c[(c[e>>2]|0)+184>>2]|0;if((w|0)<(c[t+(m*44|0)>>2]|0)){q=q+1|0;k=w;j=t}else{C=t;break}}}else{C=l}c[C+(m*44|0)+4>>2]=(c[(c[(c[n>>2]|0)+184>>2]|0)+(m*44|0)+4>>2]|0)+(h<<2);a[(c[(c[n>>2]|0)+184>>2]|0)+(m*44|0)+33|0]=0;j=m+1|0;k=c[e>>2]|0;if((m|0)<(b[k+226>>1]|0)){m=j;i=k}else{o=j;p=k;break}}}i=c[n>>2]|0;if((o|0)<(b[i+226>>1]|0)){a[(c[i+184>>2]|0)+(o*44|0)+33|0]=0;D=c[e>>2]|0}else{D=p}a[D+260|0]=1;$n(d);d=c[e>>2]|0;D=b[d+224>>1]|0;if(D<<16>>16>(b[d+226>>1]|0)){return}p=D<<16>>16;D=d;while(1){d=c[(c[D+256>>2]|0)+(p<<2)>>2]|0;o=d+8|0;i=c[o>>2]|0;n=c[c[i+180>>2]>>2]|0;if((n|0)==0){E=i}else{i=n;while(1){Vo(i);n=c[o>>2]|0;m=c[c[n+180>>2]>>2]|0;if((m|0)==0){E=n;break}else{i=m}}}i=c[c[E+172>>2]>>2]|0;if((i|0)!=0){h=i;do{Vo(h);h=c[c[(c[o>>2]|0)+172>>2]>>2]|0;}while((h|0)!=0)}ap(Ix(f)|0,d);c[(c[(c[e>>2]|0)+256>>2]|0)+(p<<2)>>2]=0;h=c[e>>2]|0;if((p|0)<(b[h+226>>1]|0)){p=p+1|0;D=h}else{break}}return}function co(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;d=i;e=ux(b)|0;if((e|0)!=0){f=e;do{e=f+8|0;g=c[e>>2]|0;if((a[g+159|0]|0)==7){Nm(f);h=c[e>>2]|0}else{h=g}c[h+212>>2]=0;f=vx(b,f)|0;}while((f|0)!=0)}f=b+8|0;h=c[f>>2]|0;if((c[h+172>>2]|0)<1){i=d;return}g=b|0;b=1;e=h;while(1){h=c[(c[e+176>>2]|0)+(b<<2)>>2]|0;j=ux(h)|0;if((j|0)!=0){k=h+8|0;l=h;m=j;while(1){j=vx(h,m)|0;n=m+8|0;do{if((a[(c[n>>2]|0)+159|0]|0)==0){Om(m,c[(c[k>>2]|0)+252>>2]|0);c[(c[n>>2]|0)+212>>2]=l;a[(c[n>>2]|0)+159|0]=7;o=mw(h,m)|0;if((o|0)==0){break}else{p=o}do{o=c[(c[p+8>>2]|0)+172>>2]|0;a:do{if((o|0)!=0){q=o;do{r=q;s=q-32|0;t=c[(c[((c[r>>2]&3|0)==2?q:s)+28>>2]|0)+8>>2]|0;if((a[t+156|0]|0)!=1){break a}c[t+212>>2]=l;q=c[c[(c[(c[((c[r>>2]&3|0)==2?q:s)+28>>2]|0)+8>>2]|0)+180>>2]>>2]|0;}while((q|0)!=0)}}while(0);p=ow(h,p)|0;}while((p|0)!=0)}else{o=m|0;q=$w(o)|0;s=$w(g)|0;Fv(0,86464,(r=i,i=i+16|0,c[r>>2]=q,c[r+8>>2]=s,r)|0)|0;i=r;Gx(h,o)|0}}while(0);if((j|0)==0){break}else{m=j}}}m=c[f>>2]|0;if((b|0)<(c[m+172>>2]|0)){b=b+1|0;e=m}else{break}}i=d;return}function eo(d,e){d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;f=e+8|0;g=jk((b[(c[f>>2]|0)+226>>1]<<2)+8|0)|0;c[(c[f>>2]|0)+256>>2]=g;g=c[f>>2]|0;h=b[g+224>>1]|0;if(h<<16>>16<=(b[g+226>>1]|0)){g=e;i=h<<16>>16;h=0;while(1){j=bp(d)|0;c[(c[(c[f>>2]|0)+256>>2]|0)+(i<<2)>>2]=j;k=j+8|0;c[(c[k>>2]|0)+232>>2]=i;a[(c[k>>2]|0)+159|0]=7;c[(c[k>>2]|0)+212>>2]=g;if((h|0)!=0){k=(c[(Zo(h,j,0)|0)+8>>2]|0)+154|0;b[k>>1]=(b[k>>1]|0)*1e3}if((i|0)<(b[(c[f>>2]|0)+226>>1]|0)){i=i+1|0;h=j}else{break}}}h=ux(e)|0;if((h|0)!=0){i=h;do{h=(c[(c[(c[f>>2]|0)+256>>2]|0)+(c[(c[i+8>>2]|0)+232>>2]<<2)>>2]|0)+8|0;g=(c[h>>2]|0)+216|0;c[g>>2]=(c[g>>2]|0)+1;g=mw(e,i)|0;if((g|0)!=0){d=g;do{g=d;j=c[g>>2]&3;k=c[(c[(c[((j|0)==3?d:d+32|0)+28>>2]|0)+8>>2]|0)+232>>2]|0;l=d-32|0;if((k|0)<(c[(c[(c[((j|0)==2?d:l)+28>>2]|0)+8>>2]|0)+232>>2]|0)){j=k;do{k=(c[(c[c[(c[h>>2]|0)+180>>2]>>2]|0)+8>>2]|0)+168|0;b[k>>1]=(b[k>>1]|0)+1;j=j+1|0;}while((j|0)<(c[(c[(c[((c[g>>2]&3|0)==2?d:l)+28>>2]|0)+8>>2]|0)+232>>2]|0))}d=ow(e,d)|0;}while((d|0)!=0)}i=vx(e,i)|0;}while((i|0)!=0)}i=c[f>>2]|0;e=b[i+224>>1]|0;if(e<<16>>16>(b[i+226>>1]|0)){return}d=e<<16>>16;e=i;while(1){i=(c[(c[(c[e+256>>2]|0)+(d<<2)>>2]|0)+8>>2]|0)+216|0;h=c[i>>2]|0;if((h|0)>1){c[i>>2]=h-1;m=c[f>>2]|0}else{m=e}if((d|0)<(b[m+226>>1]|0)){d=d+1|0;e=m}else{break}}return}function fo(d,e,f,g){d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;h=(c[(c[e+8>>2]|0)+212>>2]|0)+8|0;e=c[h>>2]|0;i=e;j=f+1|0;if((a[i+261|0]|0)==(j|0)){return}k=b[e+224>>1]|0;l=b[i+226>>1]|0;if(k<<16>>16>l<<16>>16){m=k;n=e;o=l}else{l=k<<16>>16;k=e;while(1){rp(d,c[(c[k+256>>2]|0)+(l<<2)>>2]|0);p=c[h>>2]|0;q=b[p+226>>1]|0;if((l|0)<(q<<16>>16|0)){l=l+1|0;k=p}else{break}}m=b[p+224>>1]|0;n=p;o=q}if(m<<16>>16>o<<16>>16){r=n}else{o=m<<16>>16;m=n;while(1){tp(g,c[(c[m+256>>2]|0)+(o<<2)>>2]|0,f);n=c[h>>2]|0;q=n;if((o|0)<(b[q+226>>1]|0)){o=o+1|0;m=n}else{r=q;break}}}a[r+261|0]=j;return}function go(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;d=ux(b)|0;if((d|0)==0){ho(b);return}else{e=d}do{c[(c[e+8>>2]|0)+212>>2]=0;d=mw(b,e)|0;if((d|0)!=0){f=d;do{d=c[(c[f+8>>2]|0)+172>>2]|0;a:do{if((d|0)!=0){g=d;do{h=g;i=g-32|0;j=c[(c[((c[h>>2]&3|0)==2?g:i)+28>>2]|0)+8>>2]|0;if((a[j+156|0]|0)!=1){break a}c[j+212>>2]=0;g=c[c[(c[(c[((c[h>>2]&3|0)==2?g:i)+28>>2]|0)+8>>2]|0)+180>>2]>>2]|0;}while((g|0)!=0)}}while(0);f=ow(b,f)|0;}while((f|0)!=0)}e=vx(b,e)|0;}while((e|0)!=0);ho(b);return}function ho(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;d=b+8|0;e=c[d>>2]|0;if((c[e+172>>2]|0)>=1){f=1;g=e;while(1){ho(c[(c[g+176>>2]|0)+(f<<2)>>2]|0);e=c[d>>2]|0;if((f|0)<(c[e+172>>2]|0)){f=f+1|0;g=e}else{break}}}g=ux(b)|0;if((g|0)==0){return}f=b;d=g;do{g=(c[d+8>>2]|0)+212|0;if((c[g>>2]|0)==0){c[g>>2]=f}g=mw(b,d)|0;if((g|0)!=0){e=g;do{g=c[(c[e+8>>2]|0)+172>>2]|0;a:do{if((g|0)!=0){h=g;do{i=h;j=c[i>>2]|0;k=h-32|0;l=c[(c[((j&3|0)==2?h:k)+28>>2]|0)+8>>2]|0;if((a[l+156|0]|0)!=1){break a}m=l+212|0;if((c[m>>2]|0)==0){c[m>>2]=f;n=c[i>>2]|0}else{n=j}h=c[c[(c[(c[((n&3|0)==2?h:k)+28>>2]|0)+8>>2]|0)+180>>2]>>2]|0;}while((h|0)!=0)}}while(0);e=ow(b,e)|0;}while((e|0)!=0)}d=vx(b,d)|0;}while((d|0)!=0);return}function io(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0.0,X=0.0,Y=0.0,Z=0.0,_=0.0,$=0.0,aa=0.0,ba=0.0,ca=0,da=0.0,ea=0.0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0;d=i;i=i+128|0;e=d|0;f=d+64|0;g=d+80|0;j=d+96|0;k=d+112|0;l=cn(b)|0;m=ux(b)|0;if((m|0)==0){n=Vg(l)|0;i=d;return}o=e;p=g;q=k;r=e|0;s=e+16|0;t=e+32|0;u=e+48|0;e=j|0;v=j+8|0;w=f|0;x=f+8|0;y=m;a:while(1){m=mw(b,y)|0;if((m|0)!=0){z=m;do{m=z|0;A=ew(m,145320)|0;do{if((A|0)==0){B=0}else{if((a[A]|0)==0){B=0;break}C=yn(l,A)|0;if((C|0)!=0){B=C;break}Fv(0,154736,(D=i,i=i+8|0,c[D>>2]=A,D)|0)|0;i=D;B=0}}while(0);A=ew(m,161760)|0;do{if((A|0)==0){E=13}else{if((a[A]|0)==0){E=13;break}C=yn(l,A)|0;if((C|0)==0){Fv(0,154736,(D=i,i=i+8|0,c[D>>2]=A,D)|0)|0;i=D;E=13;break}else{F=C;G=1;H=(B|0)==0;E=14;break}}}while(0);if((E|0)==13){E=0;if((B|0)!=0){F=0;G=0;H=0;E=14}}do{if((E|0)==14){E=0;A=z+8|0;C=c[(c[A>>2]|0)+8>>2]|0;if((C|0)==0){break}if((c[C+4>>2]|0)>1){I=z;J=$w(c[((c[I>>2]&3|0)==3?z:z+32|0)+28>>2]|0)|0;K=$w(c[((c[I>>2]&3|0)==2?z:z-32|0)+28>>2]|0)|0;Fv(0,130536,(D=i,i=i+16|0,c[D>>2]=J,c[D+8>>2]=K,D)|0)|0;i=D;break}K=c[C>>2]|0;C=c[K+4>>2]|0;J=z;I=c[J>>2]&3;L=z-32|0;M=c[((I|0)==2?z:L)+28>>2]|0;N=z+32|0;O=c[((I|0)==3?z:N)+28>>2]|0;I=kk(48)|0;P=I;Q=K+12|0;c[I+12>>2]=c[Q>>2];R=K+8|0;c[I+8>>2]=c[R>>2];b:do{if(H){E=41}else{S=c[B+8>>2]|0;T=S+16|0;U=T;V=c[M+8>>2]|0;W=+h[V+16>>3];X=+h[V+24>>3];Y=+h[T>>3];do{if(Y<=W){Z=+h[S+32>>3];if(Z<W){break}_=+h[S+24>>3];if(_>X){break}$=+h[S+40>>3];if($<X){break}T=K|0;V=c[T>>2]|0;aa=+h[V>>3];ba=+h[V+8>>3];if(!(Y>aa|Z<aa|_>ba|$<ba)){ca=c[O+8>>2]|0;da=+h[ca+16>>3];ea=+h[ca+24>>3];if(!(Y>da|Z<da|_>ea|$<ea)){ca=$w(c[((c[J>>2]&3|0)==3?z:N)+28>>2]|0)|0;fa=$w(c[((c[J>>2]&3|0)==2?z:L)+28>>2]|0)|0;ga=ew(m,145320)|0;Fv(0,108904,(D=i,i=i+24|0,c[D>>2]=ca,c[D+8>>2]=fa,c[D+16>>2]=ga,D)|0)|0;i=D;E=41;break b}if((c[R>>2]|0)==0){E=29;break a}ga=K+16|0;fa=K+24|0;jo(f,aa,ba,+h[ga>>3],+h[fa>>3],U);ba=+h[w>>3];aa=+h[x>>3];ca=c[T>>2]|0;h[ca+48>>3]=ba;h[ca+56>>3]=aa;ca=c[T>>2]|0;ea=(aa+ +h[fa>>3])*.5;h[ca+16>>3]=(ba+ +h[ga>>3])*.5;h[ca+24>>3]=ea;ca=c[T>>2]|0;ea=(+h[ca+24>>3]+ +h[fa>>3])*.5;h[ca>>3]=(+h[ca+16>>3]+ +h[ga>>3])*.5;h[ca+8>>3]=ea;ca=c[T>>2]|0;ea=(aa+ +h[ca+24>>3])*.5;h[ca+32>>3]=(ba+ +h[ca+16>>3])*.5;h[ca+40>>3]=ea;ca=c[Q>>2]|0;if((ca|0)==0){ha=3;break b}ha=(lh(z,c[T>>2]|0,0,0,P,ca)|0)+3|0;break b}ca=C-1|0;c:do{if((ca|0)>0){if((ko(V,U)|0)==0){ia=3}else{ja=0;break}while(1){if((ia|0)>=(ca|0)){ja=ia;break c}if((ko((c[T>>2]|0)+(ia<<4)|0,U)|0)==0){ia=ia+3|0}else{ja=ia;break}}}else{ja=0}}while(0);V=c[Q>>2]|0;ga=(V|0)!=0;if((ja|0)==(ca|0)){if(!ga){E=36;break a}fa=I+32|0;ka=c[T>>2]|0;jo(g,+h[K+32>>3],+h[K+40>>3],+h[ka+(ca<<4)>>3],+h[ka+(ca<<4)+8>>3],U);c[fa>>2]=c[p>>2];c[fa+4>>2]=c[p+4>>2];c[fa+8>>2]=c[p+8>>2];c[fa+12>>2]=c[p+12>>2];ha=ca;break b}if(ga){la=lh(z,c[T>>2]|0,0,ja,P,V)|0}else{la=ja}ha=la+3|0;break b}}while(0);U=$w(c[((c[J>>2]&3|0)==3?z:N)+28>>2]|0)|0;S=$w(c[((c[J>>2]&3|0)==2?z:L)+28>>2]|0)|0;V=ew(m,145320)|0;Fv(0,116216,(D=i,i=i+24|0,c[D>>2]=U,c[D+8>>2]=S,c[D+16>>2]=V,D)|0)|0;i=D;E=41}}while(0);do{if((E|0)==41){E=0;V=C-1|0;if((c[Q>>2]|0)==0){ha=V;break}S=I+32|0;U=K+32|0;c[S>>2]=c[U>>2];c[S+4>>2]=c[U+4>>2];c[S+8>>2]=c[U+8>>2];c[S+12>>2]=c[U+12>>2];ha=V}}while(0);d:do{if(G){C=c[F+8>>2]|0;V=C+16|0;U=V;S=c[O+8>>2]|0;Y=+h[S+16>>3];X=+h[S+24>>3];W=+h[V>>3];do{if(W<=Y){ea=+h[C+32>>3];if(ea<Y){break}ba=+h[C+24>>3];if(ba>X){break}aa=+h[C+40>>3];if(aa<X){break}V=K|0;S=c[V>>2]|0;$=+h[S+(ha<<4)>>3];_=+h[S+(ha<<4)+8>>3];if(!(W>$|ea<$|ba>_|aa<_)){ga=c[M+8>>2]|0;da=+h[ga+16>>3];Z=+h[ga+24>>3];if(!(W>da|ea<da|ba>Z|aa<Z)){ga=$w(c[((c[J>>2]&3|0)==3?z:N)+28>>2]|0)|0;fa=$w(c[((c[J>>2]&3|0)==2?z:L)+28>>2]|0)|0;ka=ew(m,161760)|0;Fv(0,81688,(D=i,i=i+24|0,c[D>>2]=ga,c[D+8>>2]=fa,c[D+16>>2]=ka,D)|0)|0;i=D;E=67;break d}if((c[Q>>2]|0)==0){E=54;break a}ka=I+32|0;fa=I+40|0;jo(j,$,_,+h[ka>>3],+h[fa>>3],U);_=+h[e>>3];$=+h[v>>3];ga=ha-3|0;ma=c[V>>2]|0;h[ma+(ga<<4)>>3]=_;h[ma+(ga<<4)+8>>3]=$;ma=ha-1|0;na=c[V>>2]|0;Z=($+ +h[fa>>3])*.5;h[na+(ma<<4)>>3]=(_+ +h[ka>>3])*.5;h[na+(ma<<4)+8>>3]=Z;na=c[V>>2]|0;Z=(+h[na+(ma<<4)+8>>3]+ +h[fa>>3])*.5;h[na+(ha<<4)>>3]=(+h[na+(ma<<4)>>3]+ +h[ka>>3])*.5;h[na+(ha<<4)+8>>3]=Z;na=ha-2|0;ka=c[V>>2]|0;Z=($+ +h[ka+(ma<<4)+8>>3])*.5;h[ka+(na<<4)>>3]=(_+ +h[ka+(ma<<4)>>3])*.5;h[ka+(na<<4)+8>>3]=Z;na=c[R>>2]|0;if((na|0)==0){oa=ga;break d}oa=nh(z,c[V>>2]|0,ga,ga,P,na)|0;break d}e:do{if((ha|0)>0){na=ha;ga=S;while(1){ka=ga+(na<<4)|0;c[o>>2]=c[ka>>2];c[o+4>>2]=c[ka+4>>2];c[o+8>>2]=c[ka+8>>2];c[o+12>>2]=c[ka+12>>2];pa=na-1|0;ka=(c[V>>2]|0)+(pa<<4)|0;c[s>>2]=c[ka>>2];c[s+4>>2]=c[ka+4>>2];c[s+8>>2]=c[ka+8>>2];c[s+12>>2]=c[ka+12>>2];qa=na-2|0;ka=(c[V>>2]|0)+(qa<<4)|0;c[t>>2]=c[ka>>2];c[t+4>>2]=c[ka+4>>2];c[t+8>>2]=c[ka+8>>2];c[t+12>>2]=c[ka+12>>2];ra=na-3|0;ka=(c[V>>2]|0)+(ra<<4)|0;c[u>>2]=c[ka>>2];c[u+4>>2]=c[ka+4>>2];c[u+8>>2]=c[ka+8>>2];c[u+12>>2]=c[ka+12>>2];if((ko(r,U)|0)!=0){break}if((ra|0)<=0){sa=ra;break e}na=ra;ga=c[V>>2]|0}ga=(c[V>>2]|0)+(na<<4)|0;c[ga>>2]=c[o>>2];c[ga+4>>2]=c[o+4>>2];c[ga+8>>2]=c[o+8>>2];c[ga+12>>2]=c[o+12>>2];ga=(c[V>>2]|0)+(pa<<4)|0;c[ga>>2]=c[s>>2];c[ga+4>>2]=c[s+4>>2];c[ga+8>>2]=c[s+8>>2];c[ga+12>>2]=c[s+12>>2];ga=(c[V>>2]|0)+(qa<<4)|0;c[ga>>2]=c[t>>2];c[ga+4>>2]=c[t+4>>2];c[ga+8>>2]=c[t+8>>2];c[ga+12>>2]=c[t+12>>2];ga=(c[V>>2]|0)+(ra<<4)|0;c[ga>>2]=c[u>>2];c[ga+4>>2]=c[u+4>>2];c[ga+8>>2]=c[u+8>>2];c[ga+12>>2]=c[u+12>>2];sa=na}else{sa=ha}}while(0);if((sa|0)==0){if((c[R>>2]|0)==0){E=63;break a}S=I+16|0;T=c[V>>2]|0;jo(k,+h[K+16>>3],+h[K+24>>3],+h[T>>3],+h[T+8>>3],U);c[S>>2]=c[q>>2];c[S+4>>2]=c[q+4>>2];c[S+8>>2]=c[q+8>>2];c[S+12>>2]=c[q+12>>2];oa=0;break d}else{S=sa-3|0;T=c[R>>2]|0;if((T|0)==0){oa=S;break d}oa=nh(z,c[V>>2]|0,S,ha-3|0,P,T)|0;break d}}}while(0);U=$w(c[((c[J>>2]&3|0)==3?z:N)+28>>2]|0)|0;C=$w(c[((c[J>>2]&3|0)==2?z:L)+28>>2]|0)|0;T=ew(m,161760)|0;Fv(0,86720,(D=i,i=i+24|0,c[D>>2]=U,c[D+8>>2]=C,c[D+16>>2]=T,D)|0)|0;i=D;E=67}else{E=67}}while(0);do{if((E|0)==67){E=0;if((c[R>>2]|0)==0){oa=0;break}L=I+16|0;J=K+16|0;c[L>>2]=c[J>>2];c[L+4>>2]=c[J+4>>2];c[L+8>>2]=c[J+8>>2];c[L+12>>2]=c[J+12>>2];oa=0}}while(0);R=ha-oa+1|0;J=I+4|0;c[J>>2]=R;L=kk(R<<4)|0;R=I;c[R>>2]=L;N=K|0;do{if((c[J>>2]|0)>0){Q=(c[N>>2]|0)+(oa<<4)|0;c[L>>2]=c[Q>>2];c[L+4>>2]=c[Q+4>>2];c[L+8>>2]=c[Q+8>>2];c[L+12>>2]=c[Q+12>>2];if((c[J>>2]|0)>1){ta=oa;ua=1}else{break}do{ta=ta+1|0;Q=(c[R>>2]|0)+(ua<<4)|0;M=(c[N>>2]|0)+(ta<<4)|0;c[Q>>2]=c[M>>2];c[Q+4>>2]=c[M+4>>2];c[Q+8>>2]=c[M+8>>2];c[Q+12>>2]=c[M+12>>2];ua=ua+1|0;}while((ua|0)<(c[J>>2]|0))}}while(0);eF(c[N>>2]|0);eF(K);c[c[(c[A>>2]|0)+8>>2]>>2]=P}}while(0);z=ow(b,z)|0;}while((z|0)!=0)}z=vx(b,y)|0;if((z|0)==0){E=75;break}else{y=z}}if((E|0)==29){cc(102800,97192,361,170424)}else if((E|0)==36){cc(91704,97192,379,170424)}else if((E|0)==54){cc(91704,97192,421,170424)}else if((E|0)==63){cc(102800,97192,444,170424)}else if((E|0)==75){n=Vg(l)|0;i=d;return}}function jo(a,b,d,e,f,g){a=a|0;b=+b;d=+d;e=+e;f=+f;g=g|0;var j=0,k=0,l=0,m=0,n=0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0;j=i;i=i+416|0;k=j|0;l=j+104|0;m=j+208|0;n=j+312|0;o=+h[g>>3];p=+h[g+8>>3];q=+h[g+16>>3];r=+h[g+24>>3];do{if(o>e){s=+(~~((d-f)*(o-b)/(b-e))|0)+d;if(s<p|s>r){break}h[a>>3]=o;h[a+8>>3]=s;i=j;return}}while(0);do{if(q<e){s=+(~~((d-f)*(q-b)/(b-e))|0)+d;if(s<p|s>r){break}h[a>>3]=q;h[a+8>>3]=s;i=j;return}}while(0);do{if(p>f){s=+(~~((b-e)*(p-d)/(d-f))|0)+b;if(s<o|s>q){break}h[a>>3]=s;h[a+8>>3]=p;i=j;return}}while(0);do{if(r<f){s=+(~~((b-e)*(r-d)/(d-f))|0)+b;if(s<o|s>q){break}h[a>>3]=s;h[a+8>>3]=r;i=j;return}}while(0);j=k|0;nb(j|0,159736,(k=i,i=i+16|0,h[k>>3]=b,h[k+8>>3]=d,k)|0)|0;i=k;a=l|0;nb(a|0,159736,(k=i,i=i+16|0,h[k>>3]=e,h[k+8>>3]=f,k)|0)|0;i=k;l=m|0;nb(l|0,159736,(k=i,i=i+16|0,h[k>>3]=o,h[k+8>>3]=p,k)|0)|0;i=k;m=n|0;nb(m|0,159736,(k=i,i=i+16|0,h[k>>3]=q,h[k+8>>3]=r,k)|0)|0;i=k;Fv(1,167928,(k=i,i=i+32|0,c[k>>2]=j,c[k+8>>2]=a,c[k+16>>2]=l,c[k+24>>2]=m,k)|0)|0;i=k;cc(163768,97192,78,171e3)}function ko(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0.0,l=0.0,m=0,n=0.0,o=0.0,p=0.0,q=0,r=0;d=i;i=i+128|0;e=d|0;f=e|0;g=e;j=a;c[g>>2]=c[j>>2];c[g+4>>2]=c[j+4>>2];c[g+8>>2]=c[j+8>>2];c[g+12>>2]=c[j+12>>2];j=e+16|0;g=a+16|0;c[j>>2]=c[g>>2];c[j+4>>2]=c[g+4>>2];c[j+8>>2]=c[g+8>>2];c[j+12>>2]=c[g+12>>2];g=e+32|0;j=a+32|0;c[g>>2]=c[j>>2];c[g+4>>2]=c[j+4>>2];c[g+8>>2]=c[j+8>>2];c[g+12>>2]=c[j+12>>2];j=e+48|0;e=a+48|0;c[j>>2]=c[e>>2];c[j+4>>2]=c[e+4>>2];c[j+8>>2]=c[e+8>>2];c[j+12>>2]=c[e+12>>2];e=b|0;j=b+8|0;g=b+24|0;k=+lo(a,0.0,1.0,+h[e>>3],+h[j>>3],+h[g>>3]);if(k>=0.0&k<2.0){Qm(d+64|0,f,3,k,a,0);l=k}else{l=2.0}m=b+16|0;k=+lo(a,0.0,l>1.0?1.0:l,+h[m>>3],+h[j>>3],+h[g>>3]);if(k>=0.0&k<l){Qm(d+80|0,f,3,k,a,0);n=k}else{n=l}l=+mo(a,0.0,n>1.0?1.0:n,+h[j>>3],+h[e>>3],+h[m>>3]);if(l>=0.0&l<n){Qm(d+96|0,f,3,l,a,0);o=l}else{o=n}n=+mo(a,0.0,o>1.0?1.0:o,+h[g>>3],+h[e>>3],+h[m>>3]);if(!(n>=0.0&n<o)){p=o;q=p<2.0;r=q&1;i=d;return r|0}Qm(d+112|0,f,3,n,a,0);p=n;q=p<2.0;r=q&1;i=d;return r|0}function lo(a,b,c,d,e,f){a=a|0;b=+b;c=+c;d=+d;e=+e;f=+f;var g=0,j=0,k=0,l=0,m=0.0,n=0,o=0,p=0,q=0,r=0,s=0.0,t=0,u=0.0,v=0.0,w=0.0;g=i;i=i+144|0;j=g|0;k=g+64|0;l=g+128|0;m=+h[a>>3];if(m<d){n=-1}else{n=m>d|0}m=+h[a+16>>3];if(m<d){o=-1}else{o=m>d|0}m=+h[a+32>>3];if(m<d){p=-1}else{p=m>d|0}m=+h[a+48>>3];if(m<d){q=-1}else{q=m>d|0}r=((o|0)!=(n|0)&(n|0)!=0&1)+((n|0)==0)+((p|0)!=(o|0)&(o|0)!=0&1)+((q|0)!=(p|0)&(p|0)!=0&1)|0;if((r|0)==0){s=-1.0;i=g;return+s}else if((r|0)==1){t=10}do{if((t|0)==10){if(m<0.0){u=m+-.5}else{u=m+.5}if(d<0.0){v=d+-.5}else{v=d+.5}if((~~u|0)!=(~~v|0)){break}w=+h[a+56>>3];i=g;return+(w<e|w>f?-1.0:c)}}while(0);t=j|0;j=k|0;Qm(l,a,3,.5,t,j);v=(b+c)*.5;u=+lo(t,b,v,d,e,f);if(u>=0.0){s=u;i=g;return+s}s=+lo(j,v,c,d,e,f);i=g;return+s}function mo(a,b,c,d,e,f){a=a|0;b=+b;c=+c;d=+d;e=+e;f=+f;var g=0,j=0,k=0,l=0,m=0.0,n=0,o=0,p=0,q=0,r=0,s=0,t=0.0,u=0.0,v=0.0,w=0.0;g=i;i=i+144|0;j=g|0;k=g+64|0;l=g+128|0;m=+h[a+8>>3];if(m<d){n=-1}else{n=m>d|0}m=+h[a+24>>3];if(m<d){o=-1}else{o=m>d|0}m=+h[a+40>>3];if(m<d){p=-1}else{p=m>d|0}m=+h[a+56>>3];if(m<d){q=-1}else{q=m>d|0}r=((o|0)!=(n|0)&(n|0)!=0&1)+((n|0)==0)+((p|0)!=(o|0)&(o|0)!=0&1)+((q|0)!=(p|0)&(p|0)!=0&1)|0;if((r|0)==1){s=10}else if((r|0)==0){t=-1.0;i=g;return+t}do{if((s|0)==10){if(m<0.0){u=m+-.5}else{u=m+.5}if(d<0.0){v=d+-.5}else{v=d+.5}if((~~u|0)!=(~~v|0)){break}w=+h[a+48>>3];i=g;return+(w<e|w>f?-1.0:c)}}while(0);s=j|0;j=k|0;Qm(l,a,3,.5,s,j);v=(b+c)*.5;u=+mo(s,b,v,d,e,f);if(u>=0.0){t=u;i=g;return+t}t=+mo(j,v,c,d,e,f);i=g;return+t}function no(d){d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,ea=0,fa=0,ga=0,ha=0,ia=0,la=0,ma=0,na=0,oa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0;e=i;f=1;g=0;h=i;i=i+168|0;c[h>>2]=0;while(1)switch(f|0){case 1:j=d+8|0;k=c[j>>2]|0;if(((b[k+226>>1]|0)-(b[k+224>>1]|0)|0)<2){f=60;break}else{f=2;break};case 2:l=c[k+184>>2]|0;if((c[l+88>>2]|0)==0){m=1;n=k;f=30;break}else{o=1;p=2;q=k;r=l;f=4;break};case 3:l=p+1|0;if((c[s+(l*44|0)>>2]|0)==0){f=5;break}else{o=p;p=l;q=t;r=s;f=4;break};case 4:if((c[r+(o*44|0)>>2]|0)>0){w=0;x=r;y=q;f=6;break}else{t=q;s=r;f=3;break};case 5:if((p|0)>0){m=p;n=t;f=30;break}else{f=56;break};case 6:z=(c[(c[x+(o*44|0)+4>>2]|0)+(w<<2)>>2]|0)+8|0;A=c[z>>2]|0;if((a[A+156|0]|0)==1){f=7;break}else{f=29;break};case 7:if((c[A+176>>2]|0)==1){f=8;break}else{f=29;break};case 8:if((c[A+184>>2]|0)==1){f=9;break}else{f=29;break};case 9:if((c[A+104>>2]|0)==0){B=w;C=y;f=10;break}else{f=29;break};case 10:D=B+1|0;E=c[C+184>>2]|0;if((D|0)<(c[E+(o*44|0)>>2]|0)){f=11;break}else{f=27;break};case 11:F=c[(c[(c[E+(o*44|0)+4>>2]|0)+(D<<2)>>2]|0)+8>>2]|0;G=c[c[(c[z>>2]|0)+172>>2]>>2]|0;H=F+172|0;I=c[c[H>>2]>>2]|0;if((a[F+156|0]|0)==1){f=12;break}else{f=27;break};case 12:if((c[H+4>>2]|0)==1){f=13;break}else{f=27;break};case 13:if((c[F+184>>2]|0)==1){f=14;break}else{f=27;break};case 14:if((c[F+104>>2]|0)==0){f=15;break}else{f=27;break};case 15:if((c[((c[G>>2]&3|0)==3?G:G+32|0)+28>>2]|0)==(c[((c[I>>2]&3|0)==3?I:I+32|0)+28>>2]|0)){f=16;break}else{f=27;break};case 16:J=c[G+8>>2]|0;if((a[J+112|0]|0)==0){K=G;L=J;f=18;break}else{M=J;f=19;break};case 17:K=N;L=O;f=18;break;case 18:P=c[I+8>>2]|0;if((a[P+112|0]|0)==0){Q=I;R=P;f=22;break}else{S=P;f=20;break};case 19:N=c[M+116>>2]|0;O=c[N+8>>2]|0;if((a[O+112|0]|0)==0){f=17;break}else{M=O;f=19;break};case 20:T=c[S+116>>2]|0;U=c[T+8>>2]|0;if((a[U+112|0]|0)==0){f=21;break}else{S=U;f=20;break};case 21:Q=T;R=U;f=22;break;case 22:if((a[L+153|0]|0)==0){f=23;break}else{f=27;break};case 23:if((a[R+153|0]|0)==0){f=24;break}else{f=27;break};case 24:l=c[Q>>2]&3;V=c[K>>2]&3;if((da((c[(c[(c[((V|0)==3?K:K+32|0)+28>>2]|0)+8>>2]|0)+232>>2]|0)-(c[(c[(c[((V|0)==2?K:K-32|0)+28>>2]|0)+8>>2]|0)+232>>2]|0)|0,(c[(c[(c[((l|0)==3?Q:Q+32|0)+28>>2]|0)+8>>2]|0)+232>>2]|0)-(c[(c[(c[((l|0)==2?Q:Q-32|0)+28>>2]|0)+8>>2]|0)+232>>2]|0)|0)|0)>0){f=25;break}else{f=27;break};case 25:l=wa(26,J+16|0,P+16|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,h)|0;if((g|0)>0){f=-1;break}else return}u=v=0;if((l|0)==0){f=26;break}else{f=27;break};case 26:B=D;C=c[j>>2]|0;f=10;break;case 27:if((D-w|0)>1){f=28;break}else{f=29;break};case 28:ja(8,d|0,o|0,w|0,B|0,1);if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,h)|0;if((g|0)>0){f=-1;break}else return}u=v=0;f=29;break;case 29:l=w+1|0;V=c[j>>2]|0;W=c[V+184>>2]|0;if((l|0)<(c[W+(o*44|0)>>2]|0)){w=l;x=W;y=V;f=6;break}else{t=V;s=W;f=3;break};case 30:W=c[n+184>>2]|0;if((c[W+(m*44|0)>>2]|0)>0){X=0;Y=W;Z=n;f=31;break}else{_=n;f=55;break};case 31:$=(c[(c[Y+(m*44|0)+4>>2]|0)+(X<<2)>>2]|0)+8|0;aa=c[$>>2]|0;if((a[aa+156|0]|0)==1){f=32;break}else{f=54;break};case 32:if((c[aa+184>>2]|0)==1){f=33;break}else{f=54;break};case 33:if((c[aa+176>>2]|0)==1){f=34;break}else{f=54;break};case 34:if((c[aa+104>>2]|0)==0){ba=X;ca=Z;f=35;break}else{f=54;break};case 35:ea=ba+1|0;fa=c[ca+184>>2]|0;if((ea|0)<(c[fa+(m*44|0)>>2]|0)){f=36;break}else{f=52;break};case 36:ga=c[(c[(c[fa+(m*44|0)+4>>2]|0)+(ea<<2)>>2]|0)+8>>2]|0;ha=c[c[(c[$>>2]|0)+180>>2]>>2]|0;ia=ga+180|0;la=c[c[ia>>2]>>2]|0;if((a[ga+156|0]|0)==1){f=37;break}else{f=52;break};case 37:if((c[ia+4>>2]|0)==1){f=38;break}else{f=52;break};case 38:if((c[ga+176>>2]|0)==1){f=39;break}else{f=52;break};case 39:if((c[ga+104>>2]|0)==0){f=40;break}else{f=52;break};case 40:if((c[((c[ha>>2]&3|0)==2?ha:ha-32|0)+28>>2]|0)==(c[((c[la>>2]&3|0)==2?la:la-32|0)+28>>2]|0)){f=41;break}else{f=52;break};case 41:ma=c[ha+8>>2]|0;if((a[ma+112|0]|0)==0){na=ha;oa=ma;f=43;break}else{qa=ma;f=44;break};case 42:na=ra;oa=sa;f=43;break;case 43:ta=c[la+8>>2]|0;if((a[ta+112|0]|0)==0){ua=la;va=ta;f=47;break}else{xa=ta;f=45;break};case 44:ra=c[qa+116>>2]|0;sa=c[ra+8>>2]|0;if((a[sa+112|0]|0)==0){f=42;break}else{qa=sa;f=44;break};case 45:ya=c[xa+116>>2]|0;za=c[ya+8>>2]|0;if((a[za+112|0]|0)==0){f=46;break}else{xa=za;f=45;break};case 46:ua=ya;va=za;f=47;break;case 47:if((a[oa+153|0]|0)==0){f=48;break}else{f=52;break};case 48:if((a[va+153|0]|0)==0){f=49;break}else{f=52;break};case 49:W=c[ua>>2]&3;V=c[na>>2]&3;if((da((c[(c[(c[((V|0)==3?na:na+32|0)+28>>2]|0)+8>>2]|0)+232>>2]|0)-(c[(c[(c[((V|0)==2?na:na-32|0)+28>>2]|0)+8>>2]|0)+232>>2]|0)|0,(c[(c[(c[((W|0)==3?ua:ua+32|0)+28>>2]|0)+8>>2]|0)+232>>2]|0)-(c[(c[(c[((W|0)==2?ua:ua-32|0)+28>>2]|0)+8>>2]|0)+232>>2]|0)|0)|0)>0){f=50;break}else{f=52;break};case 50:W=wa(26,ma+56|0,ta+56|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,h)|0;if((g|0)>0){f=-1;break}else return}u=v=0;if((W|0)==0){f=51;break}else{f=52;break};case 51:ba=ea;ca=c[j>>2]|0;f=35;break;case 52:if((ea-X|0)>1){f=53;break}else{f=54;break};case 53:ja(8,d|0,m|0,X|0,ba|0,0);if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,h)|0;if((g|0)>0){f=-1;break}else return}u=v=0;f=54;break;case 54:W=X+1|0;V=c[j>>2]|0;l=c[V+184>>2]|0;if((W|0)<(c[l+(m*44|0)>>2]|0)){X=W;Y=l;Z=V;f=31;break}else{_=V;f=55;break};case 55:V=m-1|0;if((V|0)>0){m=V;n=_;f=30;break}else{f=56;break};case 56:Aa=BF(178392,f,h)|0;f=61;break;case 61:if((Aa|0)==0){f=57;break}else{f=58;break};case 57:V=c[j>>2]|0;if((c[V+172>>2]|0)<1){f=60;break}else{Ba=1;Ca=V;f=59;break};case 58:pa(16,3,129512,(V=i,i=i+1|0,i=i+7&-8,c[V>>2]=0,V)|0)|0;if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,h)|0;if((g|0)>0){f=-1;break}else return}u=v=0;i=V;f=60;break;case 59:ka(106,c[(c[Ca+176>>2]|0)+(Ba<<2)>>2]|0);if((u|0)!=0&(v|0)!=0){g=CF(c[u>>2]|0,h)|0;if((g|0)>0){f=-1;break}else return}u=v=0;V=c[j>>2]|0;if((Ba|0)<(c[V+172>>2]|0)){Ba=Ba+1|0;Ca=V;f=59;break}else{f=60;break};case 60:i=e;return;case-1:if((g|0)==56){Aa=v;f=61}u=v=0;break}}function oo(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0;g=a+8|0;h=c[(c[g>>2]|0)+184>>2]|0;i=c[h+(b*44|0)+4>>2]|0;j=c[i+(d<<2)>>2]|0;k=d+1|0;do{if((d|0)<(e|0)){l=(f|0)==1;m=j+8|0;n=k;o=i;while(1){p=c[o+(n<<2)>>2]|0;q=p+8|0;r=c[q>>2]|0;do{if(l){s=c[c[r+180>>2]>>2]|0;if((s|0)==0){t=r;break}else{u=s;v=r}while(1){s=c[(c[m>>2]|0)+180>>2]|0;w=c[s>>2]|0;x=c[u>>2]|0;a:do{if((w|0)==0){y=u-32|0;z=14}else{A=u-32|0;B=c[((x&3|0)==2?u:A)+28>>2]|0;C=0;D=w;while(1){E=C+1|0;if((c[((c[D>>2]&3|0)==2?D:D-32|0)+28>>2]|0)==(B|0)){break}F=c[s+(E<<2)>>2]|0;if((F|0)==0){y=A;z=14;break a}else{C=E;D=F}}if((D|0)==0){y=A;z=14}else{G=D;H=v}}}while(0);if((z|0)==14){z=0;s=Zo(j,c[((x&3|0)==2?u:y)+28>>2]|0,u)|0;G=s;H=c[q>>2]|0}s=c[c[H+172>>2]>>2]|0;if((s|0)!=0){w=s;do{ep(w,G);Vo(w);w=c[c[(c[q>>2]|0)+172>>2]>>2]|0;}while((w|0)!=0)}Vo(u);w=c[q>>2]|0;x=c[c[w+180>>2]>>2]|0;if((x|0)==0){t=w;break}else{u=x;v=w}}}else{w=c[c[r+172>>2]>>2]|0;if((w|0)==0){t=r;break}else{I=w;J=r}while(1){w=c[(c[m>>2]|0)+172>>2]|0;x=c[w>>2]|0;s=c[I>>2]|0;b:do{if((x|0)==0){K=I+32|0;z=24}else{C=I+32|0;B=c[((s&3|0)==3?I:C)+28>>2]|0;F=0;E=x;while(1){L=F+1|0;if((c[((c[E>>2]&3|0)==3?E:E+32|0)+28>>2]|0)==(B|0)){break}M=c[w+(L<<2)>>2]|0;if((M|0)==0){K=C;z=24;break b}else{F=L;E=M}}if((E|0)==0){K=C;z=24}else{N=E;O=J}}}while(0);if((z|0)==24){z=0;w=Zo(c[((s&3|0)==3?I:K)+28>>2]|0,j,I)|0;N=w;O=c[q>>2]|0}w=c[c[O+180>>2]>>2]|0;if((w|0)!=0){x=w;do{ep(x,N);Vo(x);x=c[c[(c[q>>2]|0)+180>>2]>>2]|0;}while((x|0)!=0)}Vo(I);x=c[q>>2]|0;s=c[c[x+172>>2]>>2]|0;if((s|0)==0){t=x;break}else{I=s;J=x}}}}while(0);if((c[t+176>>2]|0)!=(-(c[t+184>>2]|0)|0)){z=29;break}ap(a,p);if((n|0)>=(e|0)){z=3;break}n=n+1|0;o=c[(c[(c[g>>2]|0)+184>>2]|0)+(b*44|0)+4>>2]|0}if((z|0)==3){P=c[(c[g>>2]|0)+184>>2]|0;break}else if((z|0)==29){cc(115624,108424,115,170248)}}else{P=h}}while(0);h=e+1|0;e=P+(b*44|0)|0;if((h|0)<(c[e>>2]|0)){Q=k;R=h;S=P}else{T=k;U=e;c[U>>2]=T;V=c[g>>2]|0;W=V+184|0;X=W;Y=c[X>>2]|0;Z=Y+(b*44|0)+4|0;_=c[Z>>2]|0;$=_+(T<<2)|0;c[$>>2]=0;return}while(1){e=c[S+(b*44|0)+4>>2]|0;k=c[e+(R<<2)>>2]|0;c[e+(Q<<2)>>2]=k;c[(c[k+8>>2]|0)+236>>2]=Q;k=Q+1|0;e=R+1|0;P=c[(c[g>>2]|0)+184>>2]|0;h=P+(b*44|0)|0;if((e|0)<(c[h>>2]|0)){Q=k;R=e;S=P}else{T=k;U=h;break}}c[U>>2]=T;V=c[g>>2]|0;W=V+184|0;X=W;Y=c[X>>2]|0;Z=Y+(b*44|0)+4|0;_=c[Z>>2]|0;$=_+(T<<2)|0;c[$>>2]=0;return}function po(d){d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0;e=i;f=d+8|0;g=c[f>>2]|0;h=b[g+224>>1]|0;if(h<<16>>16<=(b[g+226>>1]|0)){j=h<<16>>16;h=g;while(1){c[(c[h+256>>2]|0)+(j<<2)>>2]=0;g=c[f>>2]|0;if((j|0)<(b[g+226>>1]|0)){j=j+1|0;h=g}else{break}}}Xp(d);h=ux(d)|0;if((h|0)!=0){j=h;do{h=c[j+8>>2]|0;g=(c[(c[f>>2]|0)+256>>2]|0)+(c[h+232>>2]<<2)|0;k=c[g>>2]|0;if((k|0)==0){l=7}else{if((c[(c[k+8>>2]|0)+236>>2]|0)>(c[h+236>>2]|0)){l=7}}if((l|0)==7){l=0;c[g>>2]=j}g=mw(d,j)|0;if((g|0)!=0){h=g;do{g=c[(c[h+8>>2]|0)+172>>2]|0;if((g|0)==0){m=h}else{k=g;while(1){g=c[(c[k+8>>2]|0)+172>>2]|0;if((g|0)==0){break}else{k=g}}m=k}g=m;n=c[g>>2]|0;o=m-32|0;p=c[((n&3|0)==2?m:o)+28>>2]|0;q=c[p+8>>2]|0;r=c[q+232>>2]|0;s=h;t=c[s>>2]|0;u=h-32|0;if((r|0)<(c[(c[(c[((t&3|0)==2?h:u)+28>>2]|0)+8>>2]|0)+232>>2]|0)){v=m;w=g;g=o;o=p;p=q;q=r;r=n;n=t;while(1){t=(c[(c[f>>2]|0)+256>>2]|0)+(q<<2)|0;x=c[t>>2]|0;if((x|0)==0){l=15}else{if((c[(c[x+8>>2]|0)+236>>2]|0)>(c[p+236>>2]|0)){l=15}else{y=r;z=n}}if((l|0)==15){l=0;c[t>>2]=o;y=c[w>>2]|0;z=c[s>>2]|0}t=c[c[(c[(c[((y&3|0)==2?v:g)+28>>2]|0)+8>>2]|0)+180>>2]>>2]|0;x=t;A=c[x>>2]|0;B=t-32|0;C=c[((A&3|0)==2?t:B)+28>>2]|0;D=c[C+8>>2]|0;E=c[D+232>>2]|0;if((E|0)<(c[(c[(c[((z&3|0)==2?h:u)+28>>2]|0)+8>>2]|0)+232>>2]|0)){v=t;w=x;g=B;o=C;p=D;q=E;r=A;n=z}else{break}}}h=ow(d,h)|0;}while((h|0)!=0)}j=vx(d,j)|0;}while((j|0)!=0)}j=c[f>>2]|0;z=b[j+224>>1]|0;a:do{if(z<<16>>16>(b[j+226>>1]|0)){F=j}else{y=d|0;m=z<<16>>16;h=j;while(1){G=c[(c[h+256>>2]|0)+(m<<2)>>2]|0;H=G+8|0;n=c[(c[H>>2]|0)+236>>2]|0;if((c[(c[(c[(c[(Ix(y)|0)+8>>2]|0)+184>>2]|0)+(m*44|0)+4>>2]|0)+(n<<2)>>2]|0)!=(G|0)){break}n=c[(c[(c[(Ix(y)|0)+8>>2]|0)+184>>2]|0)+(m*44|0)+4>>2]|0;r=c[f>>2]|0;c[(c[r+184>>2]|0)+(m*44|0)+4>>2]=n+(c[(c[(c[(c[r+256>>2]|0)+(m<<2)>>2]|0)+8>>2]|0)+236>>2]<<2);r=c[(c[f>>2]|0)+184>>2]|0;if((c[r+(m*44|0)>>2]|0)>0){n=0;q=-1;p=r;b:while(1){r=c[(c[p+(m*44|0)+4>>2]|0)+(n<<2)>>2]|0;if((r|0)==0){I=q;break}o=c[r+8>>2]|0;do{if((a[o+156|0]|0)==0){if((Rx(d,r|0)|0)==0){I=q;break b}else{J=n}}else{g=c[c[o+172>>2]>>2]|0;if((g|0)==0){J=q;break}else{K=g}while(1){g=c[(c[K+8>>2]|0)+116>>2]|0;if((g|0)==0){break}K=g}g=K;if((Rx(d,c[((c[g>>2]&3|0)==3?K:K+32|0)+28>>2]|0)|0)==0){J=q;break}w=(Rx(d,c[((c[g>>2]&3|0)==2?K:K-32|0)+28>>2]|0)|0)==0;J=w?q:n}}while(0);o=n+1|0;r=c[(c[f>>2]|0)+184>>2]|0;if((o|0)<(c[r+(m*44|0)>>2]|0)){n=o;q=J;p=r}else{I=J;break}}if((I|0)==-1){l=35}else{L=I}}else{l=35}if((l|0)==35){l=0;p=$w(y)|0;Fv(0,128768,(M=i,i=i+16|0,c[M>>2]=p,c[M+8>>2]=m,M)|0)|0;i=M;L=-1}c[(c[(c[f>>2]|0)+184>>2]|0)+(m*44|0)>>2]=L+1;p=c[f>>2]|0;if((m|0)<(b[p+226>>1]|0)){m=m+1|0;h=p}else{F=p;break a}}h=$w(G|0)|0;y=c[(c[H>>2]|0)+236>>2]|0;Fv(1,159192,(M=i,i=i+24|0,c[M>>2]=h,c[M+8>>2]=y,c[M+16>>2]=m,M)|0)|0;i=M;rc(178392,1)}}while(0);if((c[F+172>>2]|0)<1){i=e;return}else{N=1;O=F}while(1){po(c[(c[O+176>>2]|0)+(N<<2)>>2]|0);F=c[f>>2]|0;if((N|0)<(c[F+172>>2]|0)){N=N+1|0;O=F}else{break}}i=e;return}function qo(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;c[53734]=b;e=(a[215384]|0)+1&255;a[215384]=e<<24>>24==0?1:e;e=b+8|0;c[(c[e>>2]|0)+208>>2]=0;c[(c[e>>2]|0)+220>>2]=0;e=ux(b)|0;if((e|0)==0){return}if((d|0)>0){f=e}else{d=e;do{do{if((d|0)==(Lm(d)|0)){if((a[(c[d+8>>2]|0)+157|0]|0)==(a[215384]|0)){break}c[(c[(c[53734]|0)+8>>2]|0)+180>>2]=0;c[53672]=0;ro(d);e=(c[(c[53734]|0)+8>>2]|0)+208|0;g=c[e>>2]|0;c[e>>2]=g+1;e=(c[(c[53734]|0)+8>>2]|0)+204|0;h=c[e>>2]|0;if((h|0)==0){i=kk(c[e+4>>2]<<2)|0}else{i=mk(h,c[e+4>>2]<<2)|0}c[(c[(c[53734]|0)+8>>2]|0)+204>>2]=i;e=c[(c[53734]|0)+8>>2]|0;c[(c[e+204>>2]|0)+(g<<2)>>2]=c[e+180>>2]}}while(0);d=vx(b,d)|0;}while((d|0)!=0);return}do{d=c[f+8>>2]|0;i=c[d+212>>2]|0;if((i|0)==0){if((f|0)==(Lm(f)|0)){j=f;k=6}}else{j=c[(c[(c[i+8>>2]|0)+256>>2]|0)+(c[d+232>>2]<<2)>>2]|0;k=6}do{if((k|0)==6){k=0;if((a[(c[j+8>>2]|0)+157|0]|0)==(a[215384]|0)){break}c[(c[(c[53734]|0)+8>>2]|0)+180>>2]=0;c[53672]=0;ro(j);d=(c[(c[53734]|0)+8>>2]|0)+208|0;i=c[d>>2]|0;c[d>>2]=i+1;d=(c[(c[53734]|0)+8>>2]|0)+204|0;e=c[d>>2]|0;if((e|0)==0){l=kk(c[d+4>>2]<<2)|0}else{l=mk(e,c[d+4>>2]<<2)|0}c[(c[(c[53734]|0)+8>>2]|0)+204>>2]=l;d=c[(c[53734]|0)+8>>2]|0;c[(c[d+204>>2]|0)+(i<<2)>>2]=c[d+180>>2]}}while(0);f=vx(b,f)|0;}while((f|0)!=0);return}function ro(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;d=i;i=i+32|0;e=d|0;f=(c[(c[53734]|0)+8>>2]|0)+220|0;c[f>>2]=(c[f>>2]|0)+1;f=b+8|0;a[(c[f>>2]|0)+157|0]=a[215384]|0;g=c[53672]|0;h=(c[f>>2]|0)+168|0;if((g|0)==0){c[h>>2]=0;c[(c[(c[53734]|0)+8>>2]|0)+180>>2]=b}else{c[h>>2]=g;c[(c[(c[53672]|0)+8>>2]|0)+164>>2]=b}c[53672]=b;c[(c[f>>2]|0)+164>>2]=0;g=c[f>>2]|0;f=g+180|0;h=e;j=c[f+4>>2]|0;c[h>>2]=c[f>>2];c[h+4>>2]=j;j=g+172|0;h=e+8|0;f=c[j+4>>2]|0;c[h>>2]=c[j>>2];c[h+4>>2]=f;f=g+188|0;h=e+16|0;j=c[f+4>>2]|0;c[h>>2]=c[f>>2];c[h+4>>2]=j;j=g+196|0;g=e+24|0;h=c[j+4>>2]|0;c[g>>2]=c[j>>2];c[g+4>>2]=h;h=0;do{g=c[e+(h<<3)>>2]|0;do{if((g|0)!=0){j=c[g>>2]|0;if((j|0)==0){break}else{k=0;l=j}do{j=c[l>>2]&3;f=c[((j|0)==2?l:l-32|0)+28>>2]|0;if((f|0)==(b|0)){m=c[((j|0)==3?l:l+32|0)+28>>2]|0}else{m=f}do{if((a[(c[m+8>>2]|0)+157|0]|0)!=(a[215384]|0)){if((m|0)!=(Lm(m)|0)){break}ro(m)}}while(0);k=k+1|0;l=c[g+(k<<2)>>2]|0;}while((l|0)!=0)}}while(0);h=h+1|0;}while((h|0)<4);i=d;return}function so(d){d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;e=ux(d)|0;if((e|0)!=0){f=e;do{e=f|0;Wx(e,162896,304,1)|0;Ym(f);vn(f,c[(c[(Hx(e)|0)+8>>2]|0)+116>>2]&1);e=f+8|0;c[(c[e>>2]|0)+176>>2]=0;g=jk(20)|0;c[(c[e>>2]|0)+172>>2]=g;c[(c[e>>2]|0)+184>>2]=0;g=jk(20)|0;c[(c[e>>2]|0)+180>>2]=g;c[(c[e>>2]|0)+200>>2]=0;g=jk(12)|0;c[(c[e>>2]|0)+196>>2]=g;c[(c[e>>2]|0)+192>>2]=0;g=jk(12)|0;c[(c[e>>2]|0)+188>>2]=g;c[(c[e>>2]|0)+208>>2]=0;g=jk(12)|0;c[(c[e>>2]|0)+204>>2]=g;c[(c[e>>2]|0)+216>>2]=1;f=vx(d,f)|0;}while((f|0)!=0)}f=ux(d)|0;if((f|0)==0){return}else{h=f}do{f=mw(d,h)|0;if((f|0)!=0){e=f;do{f=e|0;Wx(f,158888,176,1)|0;Zm(e)|0;g=Em(f,c[53750]|0,1,0)|0;i=e+8|0;c[(c[i>>2]|0)+156>>2]=g;g=e;j=Hm(c[((c[g>>2]&3|0)==3?e:e+32|0)+28>>2]|0,c[53620]|0,213336)|0;k=Hm(c[((c[g>>2]&3|0)==2?e:e-32|0)+28>>2]|0,c[53620]|0,213336)|0;b[(c[i>>2]|0)+154>>1]=1;b[(c[i>>2]|0)+168>>1]=1;if((a[j]|0)!=0&(j|0)==(k|0)){b[(c[i>>2]|0)+154>>1]=1e3;k=(c[i>>2]|0)+156|0;c[k>>2]=(c[k>>2]|0)*100|0}if((Vn(e)|0)!=0){b[(c[i>>2]|0)+154>>1]=0;c[(c[i>>2]|0)+156>>2]=0}k=(Em(f,c[53762]|0,0,0)|0)&255;a[(c[i>>2]|0)+152|0]=k;k=(Em(f,c[53774]|0,1,0)|0)&65535;b[(c[i>>2]|0)+170>>1]=k;e=ow(d,e)|0;}while((e|0)!=0)}h=vx(d,h)|0;}while((h|0)!=0);return}function to(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;d=c[(c[b+8>>2]|0)+180>>2]|0;if((d|0)!=0){e=d;while(1){d=e+8|0;f=c[d>>2]|0;g=c[f+164>>2]|0;h=c[f+176>>2]|0;if((h|0)>0){i=h;h=f;while(1){j=i-1|0;k=c[(c[h+172>>2]|0)+(j<<2)>>2]|0;Vo(k);eF(c[k+8>>2]|0);eF(k|0);k=c[d>>2]|0;if((j|0)>0){i=j;h=k}else{l=k;break}}}else{l=f}h=l+180|0;i=c[h+4>>2]|0;if((i|0)>0){k=i-1|0;i=c[(c[h>>2]|0)+(k<<2)>>2]|0;Vo(i);eF(c[i+8>>2]|0);eF(i|0);if((k|0)>0){i=k;do{i=i-1|0;k=c[(c[(c[d>>2]|0)+180>>2]|0)+(i<<2)>>2]|0;Vo(k);eF(c[k+8>>2]|0);eF(k|0);}while((i|0)>0)}m=c[d>>2]|0}else{m=l}if((a[m+156|0]|0)==1){i=c[m+180>>2]|0;if((i|0)==0){n=m}else{eF(i);n=c[d>>2]|0}i=c[n+172>>2]|0;if((i|0)==0){o=n}else{eF(i);o=c[d>>2]|0}eF(o);eF(e)}if((g|0)==0){break}else{e=g}}}e=ux(b)|0;if((e|0)==0){vo(b);return}else{p=e}do{e=mw(b,p)|0;if((e|0)!=0){o=e;do{tn(o);o=ow(b,o)|0;}while((o|0)!=0)}uo(p);p=vx(b,p)|0;}while((p|0)!=0);vo(b);return}function uo(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;b=a+8|0;d=c[b>>2]|0;e=c[d+172>>2]|0;if((e|0)==0){f=d}else{eF(e);f=c[b>>2]|0}e=c[f+180>>2]|0;if((e|0)==0){g=f}else{eF(e);g=c[b>>2]|0}e=c[g+188>>2]|0;if((e|0)==0){h=g}else{eF(e);h=c[b>>2]|0}e=c[h+196>>2]|0;if((e|0)==0){i=h}else{eF(e);i=c[b>>2]|0}e=c[i+204>>2]|0;if((e|0)==0){j=i}else{eF(e);j=c[b>>2]|0}dk(c[j+104>>2]|0);j=c[(c[b>>2]|0)+8>>2]|0;if((j|0)==0){k=a|0;l=Xx(k,162896)|0;return}Cc[c[(c[j+4>>2]|0)+4>>2]&255](a);k=a|0;l=Xx(k,162896)|0;return}function vo(a){a=a|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;d=sy(a)|0;if((d|0)!=0){e=d;do{vo(e);e=ty(e)|0;}while((e|0)!=0)}e=a+8|0;d=c[e>>2]|0;f=c[d+176>>2]|0;if((f|0)==0){g=d}else{eF(f);g=c[e>>2]|0}f=c[g+256>>2]|0;if((f|0)==0){h=g}else{eF(f);h=c[e>>2]|0}f=c[h+204>>2]|0;if((f|0)==0){i=h}else{eF(f);i=c[e>>2]|0}f=c[i+184>>2]|0;do{if((f|0)!=0){h=b[i+224>>1]|0;if(h<<16>>16>(b[i+226>>1]|0)){j=h;k=f}else{g=h<<16>>16;h=f;while(1){eF(c[h+(g*44|0)+12>>2]|0);l=c[e>>2]|0;if((g|0)>=(b[l+226>>1]|0)){break}g=g+1|0;h=c[l+184>>2]|0}j=b[l+224>>1]|0;k=c[l+184>>2]|0}if(j<<16>>16==-1){eF(k-44|0);break}else{eF(k);break}}}while(0);k=a|0;if((Ix(k)|0)==(a|0)){return}Xx(k,167088)|0;return}function wo(a){a=a|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;d=i;i=i+40|0;e=d|0;f=a|0;g=Em(f,Wv(a,0,120216,0)|0,-1,1)|0;qn(a,10);h=Sn(a,e)|0;xo(a);so(a);j=e+32|0;k=(g|0)==2;l=(g|0)==3;m=e+28|0;n=e+24|0;if((g|0)==1){Zp(a,h);yo(a,1);i=d;return}else{o=h}while(1){Zp(a,o);if((c[j>>2]|0)==0){p=o}else{Fv(0,157336,(h=i,i=i+1|0,i=i+7&-8,c[h>>2]=0,h)|0)|0;i=h;c[n>>2]=0;p=0}jp(a,(p|0)!=0|0);if(k){q=6;break}Hp(a,p);if(l){q=8;break}h=(c[m>>2]|0)-1|0;c[m>>2]=h;if((c[n>>2]|0)==0|(h|0)==0){q=10;break}else{o=p}}if((q|0)==6){yo(a,2);i=d;return}else if((q|0)==8){yo(a,2);i=d;return}else if((q|0)==10){p=a+8|0;do{if((b[(c[p>>2]|0)+128>>1]&16)!=0){o=ry(a,115032,0)|0;if((o|0)==0){break}n=ux(o)|0;a:do{if((n|0)!=0){m=n;while(1){l=vx(o,m)|0;ap(a,m);k=c[(c[m+8>>2]|0)+232>>2]|0;j=c[(c[p>>2]|0)+184>>2]|0;h=j+(k*44|0)|0;g=c[h>>2]|0;e=j+(k*44|0)+4|0;j=0;r=0;while(1){if((r|0)>=(g|0)){q=20;break}s=c[e>>2]|0;t=s+(r<<2)|0;u=c[t>>2]|0;v=r+1|0;if((u|0)==(m|0)){q=16;break}else{j=u;r=v}}if((q|0)==16){q=0;do{if((v|0)<(g|0)){c[t>>2]=c[s+(v<<2)>>2];e=r+2|0;u=c[(c[p>>2]|0)+184>>2]|0;w=u+(k*44|0)|0;x=c[w>>2]|0;if((e|0)<(x|0)){y=e;z=u}else{A=w;B=x;break}while(1){x=c[z+(k*44|0)+4>>2]|0;c[x+(y-1<<2)>>2]=c[x+(y<<2)>>2];x=y+1|0;w=c[(c[p>>2]|0)+184>>2]|0;u=w+(k*44|0)|0;e=c[u>>2]|0;if((x|0)<(e|0)){y=x;z=w}else{A=u;B=e;break}}}else{A=h;B=g}}while(0);c[A>>2]=B-1}else if((q|0)==20){q=0;if((j|0)!=(m|0)){break}}uo(m);Cx(a,m)|0;if((l|0)==0){break a}else{m=l}}cc(107992,102136,238,170008)}}while(0);vy(a,o)|0}}while(0);pq(a);Ao(a);if((Km(ew(f,127320)|0)|0)<<24>>24!=0){io(a)}Xk(a);i=d;return}}function xo(a){a=a|0;var b=0,c=0;b=a|0;if((Ix(b)|0)!=(a|0)){Wx(b,167088,272,1)|0}b=sy(a)|0;if((b|0)==0){return}else{c=b}do{xo(c);c=ty(c)|0;}while((c|0)!=0);return}function yo(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;d=i;i=i+1024|0;e=Wv(a,1,96272,213336)|0;f=Wv(a,1,85640,213336)|0;g=ux(a)|0;if((g|0)==0){i=d;return}h=d|0;if((b|0)<=0){j=g;do{j=vx(a,j)|0;}while((j|0)!=0);i=d;return}if((b|0)>1){b=g;do{j=b+8|0;nb(h|0,80896,(k=i,i=i+8|0,c[k>>2]=c[(c[j>>2]|0)+232>>2],k)|0)|0;i=k;l=b|0;hw(l,e,h)|0;nb(h|0,80896,(k=i,i=i+8|0,c[k>>2]=c[(c[j>>2]|0)+236>>2],k)|0)|0;i=k;hw(l,f,h)|0;b=vx(a,b)|0;}while((b|0)!=0);i=d;return}else{b=g;do{nb(h|0,80896,(k=i,i=i+8|0,c[k>>2]=c[(c[b+8>>2]|0)+232>>2],k)|0)|0;i=k;hw(b|0,e,h)|0;b=vx(a,b)|0;}while((b|0)!=0);i=d;return}}function zo(b,c){b=b|0;c=c|0;var d=0,e=0,f=0,g=0;d=i;e=b;b=i;i=i+40|0;tF(b,e,40)|0;e=c;c=i;i=i+40|0;tF(c,e,40)|0;e=a[b+28|0]|0;do{if((a[c+28|0]|0)==0){f=e<<24>>24!=0|0}else{if(e<<24>>24==0){f=-1;break}g=~~(+h[b>>3]- +h[c>>3]);if((g|0)!=0){f=g;break}f=~~(+h[b+8>>3]- +h[c+8>>3])}}while(0);i=d;return f|0}function Ao(a){a=a|0;Bo(a,1);return}function Bo(d,e){d=d|0;e=e|0;var f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0.0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0.0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,_a=0,$a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Vb=0,Wb=0,Xb=0,Yb=0,Zb=0,_b=0,$b=0,ac=0,bc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0,xc=0,yc=0,zc=0,Ac=0,Bc=0,Cc=0,Dc=0,Fc=0,Gc=0,Hc=0,Ic=0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0,Pc=0,Qc=0,Rc=0,Sc=0,Tc=0,Uc=0,Vc=0,Wc=0,Xc=0,Yc=0,Zc=0,_c=0,$c=0,ad=0,bd=0,cd=0,dd=0,ed=0,fd=0,gd=0.0,hd=0.0,id=0.0,jd=0,kd=0,ld=0.0,md=0,nd=0.0,od=0,pd=0.0,qd=0.0,rd=0,sd=0.0,td=0,ud=0,vd=0,wd=0,xd=0,yd=0,zd=0,Ad=0,Bd=0,Cd=0,Dd=0,Ed=0,Fd=0.0,Gd=0.0,Hd=0.0,Id=0.0,Jd=0,Kd=0,Ld=0,Md=0,Nd=0.0,Od=0.0,Pd=0,Qd=0,Rd=0,Sd=0,Td=0,Ud=0,Vd=0,Wd=0,Xd=0,Yd=0,Zd=0,_d=0,$d=0,ae=0,be=0,ce=0,de=0,ee=0,fe=0,ge=0,he=0,ie=0,je=0,ke=0,le=0,me=0,ne=0.0,oe=0.0,pe=0.0,qe=0.0,re=0.0,se=0.0,te=0.0,ue=0,ve=0,we=0,xe=0,ye=0,ze=0,Ae=0,Be=0,Ce=0,De=0,Ee=0,Fe=0,Ge=0,He=0,Ie=0,Je=0,Ke=0.0,Le=0.0,Me=0.0,Ne=0.0,Oe=0,Pe=0,Qe=0,Re=0,Se=0,Te=0,Ue=0,Ve=0,We=0,Xe=0,Ye=0,Ze=0,_e=0,$e=0,af=0,bf=0,cf=0,df=0;f=i;i=i+7336|0;g=f|0;j=f+8|0;k=f+704|0;l=f+1400|0;m=f+2096|0;n=f+2792|0;o=f+2800|0;p=f+2912|0;q=f+3088|0;r=f+3152|0;s=f+3160|0;t=f+3856|0;u=f+4552|0;v=f+4728|0;w=f+4904|0;x=f+5080|0;y=f+5144|0;z=f+5208|0;A=f+5272|0;B=f+5968|0;C=f+6664|0;D=f+6672|0;E=f+6704|0;F=f+6736|0;G=f+6768|0;H=f+6800|0;I=f+7184|0;J=f+7248|0;K=f+7312|0;L=d+8|0;M=b[(c[L>>2]|0)+128>>1]&14;N=I|0;O=I+8|0;c[O>>2]=f+6832;P=J|0;Q=J+8|0;c[Q>>2]=f+7008;do{if((M|0)==4){R=ux(d)|0;if((R|0)!=0){S=R;do{R=S+8|0;T=c[R>>2]|0;if((c[T+204>>2]|0)!=0){U=T+96|0;V=+h[U>>3];h[U>>3]=+(c[T+240>>2]|0);c[(c[R>>2]|0)+240>>2]=~~V}S=vx(d,S)|0;}while((S|0)!=0)}if((a[(c[L>>2]|0)+113|0]&1)!=0){Fv(0,110208,(S=i,i=i+1|0,i=i+7&-8,c[S>>2]=0,S)|0)|0;i=S}S=ux(d)|0;if((S|0)==0){W=0;X=0;break}else{Y=S}while(1){S=mw(d,Y)|0;if((S|0)!=0){R=S;do{ll(d,R,4,11848);R=ow(d,R)|0;}while((R|0)!=0)}R=vx(d,Y)|0;if((R|0)==0){W=0;X=0;break}else{Y=R}}}else if((M|0)==0){i=f;return}else{go(d);if((gl()|0)!=0){i=f;return}R=jk(96)|0;S=R;T=c[(c[L>>2]|0)+236>>2]|0;c[K+8>>2]=(T|0)/4|0;U=K+12|0;c[U>>2]=T;T=jk(512)|0;Z=K+4|0;c[Z>>2]=0;_=K|0;c[_>>2]=0;$=c[L>>2]|0;aa=b[$+224>>1]|0;ba=aa<<16>>16;do{if(aa<<16>>16>(b[$+226>>1]|0)){ca=T;ea=0;fa=11520;ga=ba}else{ha=T;ia=0;ja=0;ka=ba;la=$;a:while(1){ma=c[la+184>>2]|0;na=c[ma+(ka*44|0)>>2]|0;oa=na+ja|0;pa=c[ma+(ka*44|0)+4>>2]|0;ma=c[pa>>2]|0;if((ma|0)!=0){V=+(c[_>>2]|0);qa=c[ma+8>>2]|0;ra=+h[qa+16>>3]- +h[qa+88>>3];c[_>>2]=~~(V<ra?V:ra)}do{if((na|0)!=0){qa=c[pa+(na-1<<2)>>2]|0;if((qa|0)==0){break}ra=+(c[Z>>2]|0);sa=c[qa+8>>2]|0;V=+h[sa+16>>3]+ +h[sa+96>>3];c[Z>>2]=~~(ra>V?ra:V)}}while(0);c[_>>2]=(c[_>>2]|0)-16;c[Z>>2]=(c[Z>>2]|0)+16;b:do{if((na|0)>0){pa=ha;sa=ia;qa=1;ta=ma;while(1){ua=ta+8|0;va=c[ua>>2]|0;wa=c[va+112>>2]|0;if((wa|0)==0){xa=va}else{ya=wa+8|0;wa=c[(c[ya>>2]|0)+96>>2]|0;if((wa|0)==0){za=22;break a}Aa=wa+56|0;wa=va+16|0;c[Aa>>2]=c[wa>>2];c[Aa+4>>2]=c[wa+4>>2];c[Aa+8>>2]=c[wa+8>>2];c[Aa+12>>2]=c[wa+12>>2];a[(c[(c[ya>>2]|0)+96>>2]|0)+81|0]=1;xa=c[ua>>2]|0}do{if((a[xa+156|0]|0)==0){Ba=xa;za=27}else{if((Ec[c[2963]&63](ta)|0)<<24>>24==0){Ca=sa;Da=pa;break}Ba=c[ua>>2]|0;za=27}}while(0);do{if((za|0)==27){za=0;ya=c[c[Ba+180>>2]>>2]|0;if((ya|0)==0){Ea=pa;Fa=sa;Ga=Ba}else{wa=pa;Aa=sa;va=0;Ha=ya;while(1){ya=c[Ha+8>>2]|0;Ia=a[ya+112|0]|0;do{if((Ia<<24>>24|0)==4|(Ia<<24>>24|0)==6){Ja=Aa;Ka=wa}else{c[ya+164>>2]=81;La=Aa+1|0;c[wa+(Aa<<2)>>2]=Ha;if((La&127|0)!=0){Ja=La;Ka=wa;break}if((wa|0)==0){Ma=kk((Aa<<2)+516|0)|0}else{Ma=mk(wa,(Aa<<2)+516|0)|0}Ja=La;Ka=Ma}}while(0);ya=va+1|0;Ia=c[ua>>2]|0;La=c[(c[Ia+180>>2]|0)+(ya<<2)>>2]|0;if((La|0)==0){Ea=Ka;Fa=Ja;Ga=Ia;break}else{wa=Ka;Aa=Ja;va=ya;Ha=La}}}do{if((c[Ga+188>>2]|0)==0){Na=Fa;Oa=Ea;Pa=Ga}else{Ha=c[c[Ga+188>>2]>>2]|0;if((Ha|0)==0){Na=Fa;Oa=Ea;Pa=Ga;break}else{Qa=Ea;Ra=Fa;Sa=0;Ta=Ha}while(1){Ha=c[Ta>>2]&3;c[(c[Ta+8>>2]|0)+164>>2]=(c[(c[(c[((Ha|0)==3?Ta:Ta+32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0)<(c[(c[(c[((Ha|0)==2?Ta:Ta-32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0)?146:162;Ha=Ra+1|0;c[Qa+(Ra<<2)>>2]=Ta;if((Ha&127|0)==0){if((Qa|0)==0){Ua=kk((Ra<<2)+516|0)|0}else{Ua=mk(Qa,(Ra<<2)+516|0)|0}Va=Ua}else{Va=Qa}va=Sa+1|0;Aa=c[ua>>2]|0;wa=c[(c[Aa+188>>2]|0)+(va<<2)>>2]|0;if((wa|0)==0){Na=Ha;Oa=Va;Pa=Aa;break}else{Qa=Va;Ra=Ha;Sa=va;Ta=wa}}}}while(0);wa=c[Pa+204>>2]|0;if((wa|0)==0){Ca=Na;Da=Oa;break}if((a[Pa+156|0]|0)==0){va=Pa+96|0;V=+h[va>>3];h[va>>3]=+(c[Pa+240>>2]|0);c[(c[ua>>2]|0)+240>>2]=~~V;Wa=c[(c[ua>>2]|0)+204>>2]|0}else{Wa=wa}wa=c[Wa>>2]|0;if((wa|0)==0){Ca=Na;Da=Oa;break}else{Xa=Oa;Ya=Na;Za=0;_a=wa}while(1){wa=c[_a>>2]&3;va=c[((wa|0)==3?_a:_a+32|0)+28>>2]|0;Ha=c[((wa|0)==2?_a:_a-32|0)+28>>2]|0;do{if((va|0)==(Ha|0)){wa=c[_a+8>>2]|0;if((a[wa+44|0]|0)!=0){$a=16;ab=4;break}bb=(a[wa+84|0]|0)==0?8:4;za=51}else{bb=(c[(c[va+8>>2]|0)+232>>2]|0)==(c[(c[Ha+8>>2]|0)+232>>2]|0)?2:1;za=51}}while(0);do{if((za|0)==51){za=0;if((bb|0)==1){$a=(c[(c[va+8>>2]|0)+232>>2]|0)<(c[(c[Ha+8>>2]|0)+232>>2]|0)?16:32;ab=1;break}else if((bb|0)==2){$a=(c[(c[va+8>>2]|0)+236>>2]|0)<(c[(c[Ha+8>>2]|0)+236>>2]|0)?16:32;ab=2;break}else{$a=16;ab=bb;break}}}while(0);c[(c[_a+8>>2]|0)+164>>2]=ab|$a|128;Ha=Ya+1|0;c[Xa+(Ya<<2)>>2]=_a;if((Ha&127|0)==0){if((Xa|0)==0){cb=kk((Ya<<2)+516|0)|0}else{cb=mk(Xa,(Ya<<2)+516|0)|0}db=cb}else{db=Xa}va=Za+1|0;wa=c[(c[(c[ua>>2]|0)+204>>2]|0)+(va<<2)>>2]|0;if((wa|0)==0){Ca=Ha;Da=db;break}else{Xa=db;Ya=Ha;Za=va;_a=wa}}}}while(0);ua=c[L>>2]|0;wa=c[ua+184>>2]|0;if((qa|0)>=(c[wa+(ka*44|0)>>2]|0)){eb=Da;fb=Ca;gb=ua;break b}ua=c[(c[wa+(ka*44|0)+4>>2]|0)+(qa<<2)>>2]|0;pa=Da;sa=Ca;qa=qa+1|0;ta=ua}}else{eb=ha;fb=ia;gb=la}}while(0);hb=ka+1|0;if((ka|0)<(b[gb+226>>1]|0)){ha=eb;ia=fb;ja=oa;ka=hb;la=gb}else{za=63;break}}if((za|0)==22){cc(151800,123888,319,171096)}else if((za|0)==63){ca=eb;ea=fb;fa=(oa<<5)+11520|0;ga=hb;break}}}while(0);Jb(ca|0,ea|0,4,194);c[R+84>>2]=jk(fa)|0;$=K+16|0;c[$>>2]=jk(ga<<5)|0;ba=(M|0)==2;do{if(ba){T=c[(c[L>>2]|0)+180>>2]|0;if((T|0)==0){break}else{ib=T}do{T=ib+8|0;aa=c[T>>2]|0;do{if((a[aa+156|0]|0)==1){if((c[aa+104>>2]|0)==0){jb=aa;break}if((c[aa+176>>2]|0)==0){jb=aa;break}la=(c[c[aa+180>>2]>>2]|0)+8|0;ka=c[la>>2]|0;if((a[ka+112|0]|0)==0){kb=la;lb=ka}else{la=ka;while(1){ka=(c[la+116>>2]|0)+8|0;ja=c[ka>>2]|0;if((a[ja+112|0]|0)==0){kb=ka;lb=ja;break}else{la=ja}}}la=c[lb+96>>2]|0;V=+h[la+24>>3];ra=+h[la+32>>3];la=(c[(c[(Hx(ib)|0)+8>>2]|0)+116>>2]&1|0)==0;h[(c[(c[kb>>2]|0)+96>>2]|0)+56>>3]=+h[(c[T>>2]|0)+16>>3]+(la?V:ra)*.5;h[(c[(c[kb>>2]|0)+96>>2]|0)+64>>3]=+h[(c[T>>2]|0)+24>>3];a[(c[(c[kb>>2]|0)+96>>2]|0)+81|0]=1;jb=c[T>>2]|0}else{jb=aa}}while(0);ib=c[jb+164>>2]|0;}while((ib|0)!=0)}}while(0);if((ea|0)>0){aa=p;T=q|0;la=p|0;ja=q|0;ka=q+8|0;ia=s+52|0;ha=t+52|0;ma=(M|0)==10;na=R+80|0;ta=j+52|0;qa=k+52|0;sa=o;pa=o|0;ua=o|0;wa=o+8|0;va=o+16|0;Ha=o+64|0;Aa=o+72|0;La=o+48|0;ya=o+64|0;Ia=o+32|0;mb=o+96|0;nb=o+96|0;ob=o+104|0;pb=o+80|0;qb=l+52|0;rb=m+52|0;sb=q;tb=ja+32|0;ub=ja-32|0;vb=u;wb=v;xb=x|0;yb=y|0;zb=z|0;Ab=A;Bb=B;Cb=D;Db=E;Eb=F;Fb=G;Gb=H;Hb=u|0;Ib=x|0;Kb=x+8|0;Lb=v|0;Mb=y|0;Nb=y+8|0;Ob=w|0;Pb=z|0;Qb=z+8|0;Rb=x;Sb=Ib+32|0;Tb=Ib-32|0;Ub=y;Vb=Mb+32|0;Wb=Mb-32|0;Xb=z;Yb=Pb+32|0;Zb=Pb-32|0;_b=A|0;$b=A+16|0;ac=A+52|0;bc=B+52|0;dc=R+56|0;ec=R+69|0;fc=R+16|0;gc=R+29|0;hc=B|0;ic=B+16|0;jc=J|0;kc=J;lc=P+32|0;mc=P-32|0;nc=I|0;oc=I;pc=N+32|0;qc=N-32|0;rc=0;while(1){sc=ca+(rc<<2)|0;tc=c[sc>>2]|0;uc=tc+8|0;vc=c[uc>>2]|0;wc=c[vc+172>>2]|0;if((wc|0)==0){xc=tc;yc=vc}else{zc=wc;while(1){Ac=c[zc+8>>2]|0;wc=c[Ac+172>>2]|0;if((wc|0)==0){break}else{zc=wc}}xc=zc;yc=Ac}wc=c[yc+116>>2]|0;if((wc|0)==0){Bc=xc}else{Cc=wc;while(1){wc=c[(c[Cc+8>>2]|0)+116>>2]|0;if((wc|0)==0){break}else{Cc=wc}}Bc=Cc}if((a[vc+44|0]|0)==0){zc=(a[vc+84|0]|0)==0?Bc:tc;Dc=zc;Fc=c[zc+8>>2]|0}else{Dc=tc;Fc=vc}zc=Dc+8|0;if((c[Fc+164>>2]&32|0)==0){Gc=Dc}else{wc=c[O>>2]|0;tF(wc|0,Fc|0,176)|0;tF(nc|0,Dc|0,32)|0;c[O>>2]=wc;wc=Dc;c[((c[oc>>2]&3|0)==3?N:pc)+28>>2]=c[((c[wc>>2]&3|0)==2?Dc:Dc-32|0)+28>>2];c[((c[oc>>2]&3|0)==2?N:qc)+28>>2]=c[((c[wc>>2]&3|0)==3?Dc:Dc+32|0)+28>>2];wc=c[O>>2]|0;Hc=wc+16|0;Ic=(c[zc>>2]|0)+56|0;c[Hc>>2]=c[Ic>>2];c[Hc+4>>2]=c[Ic+4>>2];c[Hc+8>>2]=c[Ic+8>>2];c[Hc+12>>2]=c[Ic+12>>2];c[Hc+16>>2]=c[Ic+16>>2];c[Hc+20>>2]=c[Ic+20>>2];c[Hc+24>>2]=c[Ic+24>>2];c[Hc+28>>2]=c[Ic+28>>2];c[Hc+32>>2]=c[Ic+32>>2];c[Hc+36>>2]=c[Ic+36>>2];Ic=wc+56|0;Hc=(c[zc>>2]|0)+16|0;c[Ic>>2]=c[Hc>>2];c[Ic+4>>2]=c[Hc+4>>2];c[Ic+8>>2]=c[Hc+8>>2];c[Ic+12>>2]=c[Hc+12>>2];c[Ic+16>>2]=c[Hc+16>>2];c[Ic+20>>2]=c[Hc+20>>2];c[Ic+24>>2]=c[Hc+24>>2];c[Ic+28>>2]=c[Hc+28>>2];c[Ic+32>>2]=c[Hc+32>>2];c[Ic+36>>2]=c[Hc+36>>2];a[wc+112|0]=1;c[wc+116>>2]=Dc;Gc=N}wc=rc+1|0;c:do{if((wc|0)<(ea|0)){Hc=Gc+8|0;Ic=1;zc=wc;while(1){Jc=ca+(zc<<2)|0;Kc=c[Jc>>2]|0;Lc=Kc+8|0;Mc=c[Lc>>2]|0;Nc=c[Mc+172>>2]|0;if((Nc|0)==0){Oc=Kc;Pc=Mc}else{Qc=Nc;while(1){Rc=c[Qc+8>>2]|0;Nc=c[Rc+172>>2]|0;if((Nc|0)==0){break}else{Qc=Nc}}Oc=Qc;Pc=Rc}Nc=c[Pc+116>>2]|0;if((Nc|0)==0){Sc=Oc}else{Tc=Nc;while(1){Nc=c[(c[Tc+8>>2]|0)+116>>2]|0;if((Nc|0)==0){break}else{Tc=Nc}}Sc=Tc}if((Bc|0)!=(Sc|0)){Uc=Ic;Vc=zc;break c}if((a[(c[uc>>2]|0)+113|0]|0)==0){if((a[Mc+44|0]|0)==0){Qc=(a[Mc+84|0]|0)==0?Bc:Kc;Wc=Qc;Xc=c[Qc+8>>2]|0}else{Wc=Kc;Xc=Mc}Qc=Wc+8|0;if((c[Xc+164>>2]&32|0)==0){Yc=Xc}else{Nc=c[Q>>2]|0;tF(Nc|0,Xc|0,176)|0;tF(jc|0,Wc|0,32)|0;c[Q>>2]=Nc;Nc=Wc;c[((c[kc>>2]&3|0)==3?P:lc)+28>>2]=c[((c[Nc>>2]&3|0)==2?Wc:Wc-32|0)+28>>2];c[((c[kc>>2]&3|0)==2?P:mc)+28>>2]=c[((c[Nc>>2]&3|0)==3?Wc:Wc+32|0)+28>>2];Nc=c[Q>>2]|0;Zc=Nc+16|0;_c=(c[Qc>>2]|0)+56|0;c[Zc>>2]=c[_c>>2];c[Zc+4>>2]=c[_c+4>>2];c[Zc+8>>2]=c[_c+8>>2];c[Zc+12>>2]=c[_c+12>>2];c[Zc+16>>2]=c[_c+16>>2];c[Zc+20>>2]=c[_c+20>>2];c[Zc+24>>2]=c[_c+24>>2];c[Zc+28>>2]=c[_c+28>>2];c[Zc+32>>2]=c[_c+32>>2];c[Zc+36>>2]=c[_c+36>>2];_c=Nc+56|0;Zc=(c[Qc>>2]|0)+16|0;c[_c>>2]=c[Zc>>2];c[_c+4>>2]=c[Zc+4>>2];c[_c+8>>2]=c[Zc+8>>2];c[_c+12>>2]=c[Zc+12>>2];c[_c+16>>2]=c[Zc+16>>2];c[_c+20>>2]=c[Zc+20>>2];c[_c+24>>2]=c[Zc+24>>2];c[_c+28>>2]=c[Zc+28>>2];c[_c+32>>2]=c[Zc+32>>2];c[_c+36>>2]=c[Zc+36>>2];a[Nc+112|0]=1;c[Nc+116>>2]=Wc;Yc=Nc}Nc=c[Hc>>2]|0;Zc=Nc+16|0;_c=Yc+16|0;Qc=a[Nc+44|0]|0;if((a[Yc+44|0]|0)==0){$c=Qc<<24>>24!=0|0}else{if(Qc<<24>>24==0){Uc=Ic;Vc=zc;break c}if((~~(+h[Zc>>3]- +h[_c>>3])|0)!=0){Uc=Ic;Vc=zc;break c}$c=~~(+h[Nc+24>>3]- +h[Yc+24>>3])}if(($c|0)!=0){Uc=Ic;Vc=zc;break c}_c=Nc+56|0;Zc=Yc+56|0;Qc=a[Nc+84|0]|0;if((a[Yc+84|0]|0)==0){ad=Qc<<24>>24!=0|0}else{if(Qc<<24>>24==0){Uc=Ic;Vc=zc;break c}if((~~(+h[_c>>3]- +h[Zc>>3])|0)!=0){Uc=Ic;Vc=zc;break c}ad=~~(+h[Nc+64>>3]- +h[Yc+64>>3])}if((ad|0)!=0){Uc=Ic;Vc=zc;break c}Nc=c[uc>>2]|0;if((c[Nc+164>>2]&15|0)==2){if((c[Nc+96>>2]|0)!=(c[(c[Lc>>2]|0)+96>>2]|0)){Uc=Ic;Vc=zc;break c}}if((c[(c[(c[Jc>>2]|0)+8>>2]|0)+164>>2]&64|0)!=0){Uc=Ic;Vc=zc;break c}}Nc=Ic+1|0;Zc=zc+1|0;if((Zc|0)<(ea|0)){Ic=Nc;zc=Zc}else{Uc=Nc;Vc=Zc;break}}}else{Uc=1;Vc=wc}}while(0);wc=c[tc>>2]&3;uc=c[((wc|0)==3?tc:tc+32|0)+28>>2]|0;vc=c[((wc|0)==2?tc:tc-32|0)+28>>2]|0;wc=c[uc+8>>2]|0;Cc=c[wc+232>>2]|0;d:do{if((uc|0)==(vc|0)){zc=c[L>>2]|0;do{if((Cc|0)==(b[zc+226>>1]|0)){if((Cc|0)>0){bd=~~(+h[(c[(c[c[(c[zc+184>>2]|0)+((Cc-1|0)*44|0)+4>>2]>>2]|0)+8>>2]|0)+24>>3]- +h[wc+24>>3]);break}else{bd=~~+h[wc+80>>3];break}}else{if((Cc|0)==(b[zc+224>>1]|0)){bd=~~(+h[wc+24>>3]- +h[(c[(c[c[(c[zc+184>>2]|0)+((Cc+1|0)*44|0)+4>>2]>>2]|0)+8>>2]|0)+24>>3]);break}else{Ic=c[zc+184>>2]|0;ra=+h[wc+24>>3];Hc=~~(+h[(c[(c[c[Ic+((Cc-1|0)*44|0)+4>>2]>>2]|0)+8>>2]|0)+24>>3]-ra);Zc=~~(ra- +h[(c[(c[c[Ic+((Cc+1|0)*44|0)+4>>2]>>2]|0)+8>>2]|0)+24>>3]);bd=(Hc|0)<(Zc|0)?Hc:Zc;break}}}while(0);im(S,ca,rc,Uc,+(c[U>>2]|0),+((bd|0)/2|0|0),11848);if((Uc|0)>0){cd=0}else{break}do{zc=c[(c[(c[ca+(cd+rc<<2)>>2]|0)+8>>2]|0)+96>>2]|0;if((zc|0)!=0){_m(d,zc)}cd=cd+1|0;}while((cd|0)<(Uc|0))}else{if((Cc|0)==(c[(c[vc+8>>2]|0)+232>>2]|0)){c[ka>>2]=la;zc=c[sc>>2]|0;Zc=zc+8|0;Hc=c[Zc>>2]|0;Ic=a[Hc+113|0]|0;if((c[Hc+164>>2]&32|0)==0){dd=zc}else{tF(aa|0,Hc|0,176)|0;tF(T|0,zc|0,32)|0;c[ka>>2]=la;Hc=zc;c[((c[sb>>2]&3|0)==3?ja:tb)+28>>2]=c[((c[Hc>>2]&3|0)==2?zc:zc-32|0)+28>>2];c[((c[sb>>2]&3|0)==2?ja:ub)+28>>2]=c[((c[Hc>>2]&3|0)==3?zc:zc+32|0)+28>>2];Hc=(c[ka>>2]|0)+16|0;Nc=(c[Zc>>2]|0)+56|0;c[Hc>>2]=c[Nc>>2];c[Hc+4>>2]=c[Nc+4>>2];c[Hc+8>>2]=c[Nc+8>>2];c[Hc+12>>2]=c[Nc+12>>2];c[Hc+16>>2]=c[Nc+16>>2];c[Hc+20>>2]=c[Nc+20>>2];c[Hc+24>>2]=c[Nc+24>>2];c[Hc+28>>2]=c[Nc+28>>2];c[Hc+32>>2]=c[Nc+32>>2];c[Hc+36>>2]=c[Nc+36>>2];Nc=(c[ka>>2]|0)+56|0;Hc=(c[Zc>>2]|0)+16|0;c[Nc>>2]=c[Hc>>2];c[Nc+4>>2]=c[Hc+4>>2];c[Nc+8>>2]=c[Hc+8>>2];c[Nc+12>>2]=c[Hc+12>>2];c[Nc+16>>2]=c[Hc+16>>2];c[Nc+20>>2]=c[Hc+20>>2];c[Nc+24>>2]=c[Hc+24>>2];c[Nc+28>>2]=c[Hc+28>>2];c[Nc+32>>2]=c[Hc+32>>2];c[Nc+36>>2]=c[Hc+36>>2];a[(c[ka>>2]|0)+112|0]=1;c[(c[ka>>2]|0)+116>>2]=zc;dd=ja}e:do{if((Uc|0)>1){zc=1;while(1){Hc=zc+1|0;if((a[(c[(c[ca+(zc+rc<<2)>>2]|0)+8>>2]|0)+113|0]|0)!=0){break e}if((Hc|0)<(Uc|0)){zc=Hc}else{za=133;break}}}else{za=133}}while(0);do{if((za|0)==133){za=0;if(Ic<<24>>24!=0){break}zc=dd+8|0;Jc=c[zc>>2]|0;if((c[Jc+96>>2]|0)!=0){Lc=dd;Mc=c[Lc>>2]&3;Kc=c[((Mc|0)==3?dd:dd+32|0)+28>>2]|0;Tc=dd-32|0;Hc=c[((Mc|0)==2?dd:Tc)+28>>2]|0;Mc=Hx(Kc|0)|0;Nc=c[zc>>2]|0;Zc=c[Nc+172>>2]|0;while(1){_c=c[(c[Zc+8>>2]|0)+172>>2]|0;if((_c|0)==0){break}else{Zc=_c}}_c=(c[((c[Zc>>2]&3|0)==3?Zc:Zc+32|0)+28>>2]|0)+8|0;Qc=(c[Nc+96>>2]|0)+56|0;ed=(c[_c>>2]|0)+16|0;c[Qc>>2]=c[ed>>2];c[Qc+4>>2]=c[ed+4>>2];c[Qc+8>>2]=c[ed+8>>2];c[Qc+12>>2]=c[ed+12>>2];a[(c[(c[zc>>2]|0)+96>>2]|0)+81|0]=1;if(ba){ed=c[Kc+8>>2]|0;Qc=c[zc>>2]|0;ra=+h[ed+24>>3]+ +h[Qc+24>>3];fd=c[Hc+8>>2]|0;V=+h[fd+16>>3]+ +h[Qc+56>>3];gd=+h[fd+24>>3]+ +h[Qc+64>>3];fd=c[Qc+96>>2]|0;hd=+h[fd+56>>3];id=+h[fd+64>>3]- +h[fd+32>>3]*.5;h[ua>>3]=+h[ed+16>>3]+ +h[Qc+16>>3];h[wa>>3]=ra;c[va>>2]=c[sa>>2];c[va+4>>2]=c[sa+4>>2];c[va+8>>2]=c[sa+8>>2];c[va+12>>2]=c[sa+12>>2];h[Ha>>3]=hd;h[Aa>>3]=id;c[La>>2]=c[ya>>2];c[La+4>>2]=c[ya+4>>2];c[La+8>>2]=c[ya+8>>2];c[La+12>>2]=c[ya+12>>2];c[Ia>>2]=c[ya>>2];c[Ia+4>>2]=c[ya+4>>2];c[Ia+8>>2]=c[ya+8>>2];c[Ia+12>>2]=c[ya+12>>2];h[nb>>3]=V;h[ob>>3]=gd;c[pb>>2]=c[mb>>2];c[pb+4>>2]=c[mb+4>>2];c[pb+8>>2]=c[mb+8>>2];c[pb+12>>2]=c[mb+12>>2];c[n>>2]=7;jd=pa;kd=7}else{Qc=c[_c>>2]|0;gd=+h[Qc+16>>3];V=gd- +h[Qc+88>>3];id=gd+ +h[Qc+96>>3];gd=+h[Qc+24>>3];hd=gd+ +h[Qc+80>>3]*.5;Qc=c[Kc+8>>2]|0;_c=c[Qc+232>>2]|0;ed=c[(c[Mc+8>>2]|0)+184>>2]|0;fd=~~(+(~~(gd- +(c[ed+(_c*44|0)+16>>2]|0)- +h[Qc+24>>3]+ +(c[ed+(_c*44|0)+20>>2]|0))|0)/6.0);if((fd|0)<5){ld=5.0}else{ld=+(fd|0)}gd=hd-ld;No(K,S,Kc,dd,l,1);No(K,S,Hc,dd,m,0);fd=c[qb>>2]|0;_c=fd-1|0;ra=+h[l+56+(_c<<5)>>3];h[22617]=ra;h[22618]=+h[l+56+(_c<<5)+24>>3];h[22619]=V;h[22620]=gd;h[22621]=ra;h[22622]=gd;_c=(c[rb>>2]|0)-1|0;ra=+h[m+56+(_c<<5)+16>>3];h[22623]=ra;h[22624]=hd;h[22625]=id;h[22628]=gd;h[22626]=+h[m+56+(_c<<5)+24>>3];h[22627]=ra;if((fd|0)>0){fd=0;do{dm(S,l+56+(fd<<5)|0);fd=fd+1|0;}while((fd|0)<(c[qb>>2]|0))}dm(S,180936);dm(S,180968);dm(S,181e3);fd=c[rb>>2]|0;if((fd|0)>0){Hc=fd;do{Hc=Hc-1|0;dm(S,m+56+(Hc<<5)|0);}while((Hc|0)>0)}if(ma){md=il(S,n)|0}else{md=kl(S,n)|0}Hc=c[n>>2]|0;if((Hc|0)==0){break d}else{jd=md;kd=Hc}}cm(dd,c[((c[Lc>>2]&3|0)==2?dd:Tc)+28>>2]|0,jd,kd,11848);break d}if(ba){Hc=c[dd>>2]&3;Mo(c[(c[((Hc|0)==3?dd:dd+32|0)+28>>2]|0)+8>>2]|0,c[(c[((Hc|0)==2?dd:dd-32|0)+28>>2]|0)+8>>2]|0,ca,rc,Uc,2);break d}Hc=a[Jc+49|0]|0;fd=a[Jc+89|0]|0;do{if(Hc<<24>>24!=1|fd<<24>>24==4){if(!(fd<<24>>24!=1|Hc<<24>>24==4)){break}Kc=c[dd>>2]&3;Mc=c[((Kc|0)==3?dd:dd+32|0)+28>>2]|0;zc=c[((Kc|0)==2?dd:dd-32|0)+28>>2]|0;Kc=Hx(Mc|0)|0;Nc=c[Mc+8>>2]|0;Zc=c[Nc+232>>2]|0;_c=c[Kc+8>>2]|0;if((Zc|0)>0){Kc=c[_c+184>>2]|0;ed=((a[_c+113|0]&1)==0?-1:-2)+Zc|0;nd=+h[(c[(c[c[Kc+(ed*44|0)+4>>2]>>2]|0)+8>>2]|0)+24>>3]- +(c[Kc+(ed*44|0)+16>>2]|0)- +h[Nc+24>>3]- +(c[Kc+(Zc*44|0)+20>>2]|0)}else{nd=+(c[_c+240>>2]|0)}ra=+(Uc+1|0);gd=+(c[U>>2]|0)/ra;id=nd/ra;No(K,S,Mc,dd,s,1);No(K,S,zc,dd,t,0);if((Uc|0)>0){od=0}else{break d}while(1){zc=c[ca+(od+rc<<2)>>2]|0;Mc=c[ia>>2]|0;_c=Mc-1|0;ra=+h[s+56+(_c<<5)>>3];hd=+h[s+56+(_c<<5)+16>>3];V=+h[s+56+(_c<<5)+24>>3];h[22617]=ra;h[22618]=V;od=od+1|0;pd=+(od|0);qd=gd*pd;h[22619]=qd+hd;hd=id*pd+V;h[22620]=hd;h[22621]=ra;h[22622]=hd;_c=(c[ha>>2]|0)-1|0;ra=+h[t+56+(_c<<5)+16>>3];h[22623]=ra;h[22624]=id+hd;V=+h[t+56+(_c<<5)>>3];pd=+h[t+56+(_c<<5)+24>>3];h[22627]=ra;h[22626]=pd;h[22625]=V-qd;h[22628]=hd;if((Mc|0)>0){Mc=0;do{dm(S,s+56+(Mc<<5)|0);Mc=Mc+1|0;}while((Mc|0)<(c[ia>>2]|0))}dm(S,180936);dm(S,180968);dm(S,181e3);Mc=c[ha>>2]|0;if((Mc|0)>0){_c=Mc;do{_c=_c-1|0;dm(S,t+56+(_c<<5)|0);}while((_c|0)>0)}if(ma){rd=il(S,r)|0}else{rd=kl(S,r)|0}_c=c[r>>2]|0;if((_c|0)==0){break d}cm(zc,c[((c[zc>>2]&3|0)==2?zc:zc-32|0)+28>>2]|0,rd,_c,11848);c[na>>2]=0;if((od|0)>=(Uc|0)){break d}}}}while(0);Hc=c[dd>>2]&3;fd=c[((Hc|0)==3?dd:dd+32|0)+28>>2]|0;Jc=c[((Hc|0)==2?dd:dd-32|0)+28>>2]|0;Hc=Hx(fd|0)|0;Tc=c[fd+8>>2]|0;Lc=c[Tc+232>>2]|0;_c=c[Hc+8>>2]|0;if((Lc|0)<(b[_c+226>>1]|0)){Hc=c[_c+184>>2]|0;Mc=Lc+1|0;sd=+h[Tc+24>>3]- +(c[Hc+(Lc*44|0)+24>>2]|0)-(+h[(c[(c[c[Hc+(Mc*44|0)+4>>2]>>2]|0)+8>>2]|0)+24>>3]+ +(c[Hc+(Mc*44|0)+28>>2]|0))}else{sd=+(c[_c+240>>2]|0)}id=+(Uc+1|0);gd=+(c[U>>2]|0)/id;hd=sd/id;Oo(K,S,fd,dd,j,1);Oo(K,S,Jc,dd,k,0);if((Uc|0)<=0){break d}if(ma){Jc=0;while(1){fd=c[ca+(Jc+rc<<2)>>2]|0;_c=c[ta>>2]|0;Mc=_c-1|0;id=+h[j+56+(Mc<<5)>>3];qd=+h[j+56+(Mc<<5)+8>>3];V=+h[j+56+(Mc<<5)+16>>3];h[22617]=id;h[22620]=qd;Jc=Jc+1|0;pd=+(Jc|0);ra=gd*pd;h[22619]=ra+V;V=qd-hd*pd;h[22618]=V;h[22621]=id;h[22624]=V;Mc=(c[qa>>2]|0)-1|0;id=+h[k+56+(Mc<<5)+16>>3];h[22623]=id;h[22622]=V-hd;pd=+h[k+56+(Mc<<5)>>3];qd=+h[k+56+(Mc<<5)+8>>3];h[22627]=id;h[22628]=qd;h[22625]=pd-ra;h[22626]=V;if((_c|0)>0){_c=0;do{dm(S,j+56+(_c<<5)|0);_c=_c+1|0;}while((_c|0)<(c[ta>>2]|0))}dm(S,180936);dm(S,180968);dm(S,181e3);_c=c[qa>>2]|0;if((_c|0)>0){Mc=_c;do{Mc=Mc-1|0;dm(S,k+56+(Mc<<5)|0);}while((Mc|0)>0)}Mc=il(S,g)|0;_c=c[g>>2]|0;if((_c|0)==0){break d}cm(fd,c[((c[fd>>2]&3|0)==2?fd:fd-32|0)+28>>2]|0,Mc,_c,11848);c[na>>2]=0;if((Jc|0)>=(Uc|0)){break d}}}else{Jc=0;while(1){_c=c[ca+(Jc+rc<<2)>>2]|0;Mc=c[ta>>2]|0;Hc=Mc-1|0;V=+h[j+56+(Hc<<5)>>3];ra=+h[j+56+(Hc<<5)+8>>3];pd=+h[j+56+(Hc<<5)+16>>3];h[22617]=V;h[22620]=ra;Jc=Jc+1|0;qd=+(Jc|0);id=gd*qd;h[22619]=id+pd;pd=ra-hd*qd;h[22618]=pd;h[22621]=V;h[22624]=pd;Hc=(c[qa>>2]|0)-1|0;V=+h[k+56+(Hc<<5)+16>>3];h[22623]=V;h[22622]=pd-hd;qd=+h[k+56+(Hc<<5)>>3];ra=+h[k+56+(Hc<<5)+8>>3];h[22627]=V;h[22628]=ra;h[22625]=qd-id;h[22626]=pd;if((Mc|0)>0){Mc=0;do{dm(S,j+56+(Mc<<5)|0);Mc=Mc+1|0;}while((Mc|0)<(c[ta>>2]|0))}dm(S,180936);dm(S,180968);dm(S,181e3);Mc=c[qa>>2]|0;if((Mc|0)>0){fd=Mc;do{fd=fd-1|0;dm(S,k+56+(fd<<5)|0);}while((fd|0)>0)}fd=kl(S,g)|0;Mc=c[g>>2]|0;if((Mc|0)==0){break d}cm(_c,c[((c[_c>>2]&3|0)==2?_c:_c-32|0)+28>>2]|0,fd,Mc,11848);c[na>>2]=0;if((Jc|0)>=(Uc|0)){break d}}}}}while(0);Lo(ca,rc,Uc,dd,M);break}c[Kb>>2]=Hb;c[Nb>>2]=Lb;c[Qb>>2]=Ob;if((c[44380]|0)==0){c[44380]=kk(32e3)|0;c[44378]=kk(32e3)|0;c[44384]=2e3;c[44382]=2e3}Ic=c[sc>>2]|0;Jc=Ic;Mc=Ic+32|0;fd=Hx(c[((c[Jc>>2]&3|0)==3?Ic:Mc)+28>>2]|0)|0;Hc=c[Jc>>2]&3;Lc=Ic-32|0;Tc=(c[(c[(c[((Hc|0)==3?Ic:Mc)+28>>2]|0)+8>>2]|0)+232>>2]|0)-(c[(c[(c[((Hc|0)==2?Ic:Lc)+28>>2]|0)+8>>2]|0)+232>>2]|0)|0;Hc=Ic+8|0;Zc=c[Hc>>2]|0;do{if((((Tc|0)>-1?Tc:-Tc|0)|0)>1){tF(vb|0,Zc|0,176)|0;Kc=Ic|0;tF(xb|0,Kc|0,32)|0;c[Kb>>2]=Hb;Nc=c[Hc>>2]|0;if((c[Nc+164>>2]&32|0)==0){tF(wb|0,Nc|0,176)|0;tF(yb|0,Kc|0,32)|0;c[Nb>>2]=Lb;c[((c[Rb>>2]&3|0)==3?Ib:Sb)+28>>2]=c[((c[Jc>>2]&3|0)==3?Ic:Mc)+28>>2]}else{ed=c[Nb>>2]|0;tF(ed|0,Nc|0,176)|0;tF(yb|0,Kc|0,32)|0;c[Nb>>2]=ed;c[((c[Ub>>2]&3|0)==3?Mb:Vb)+28>>2]=c[((c[Jc>>2]&3|0)==2?Ic:Lc)+28>>2];c[((c[Ub>>2]&3|0)==2?Mb:Wb)+28>>2]=c[((c[Jc>>2]&3|0)==3?Ic:Mc)+28>>2];ed=(c[Nb>>2]|0)+16|0;Kc=(c[Hc>>2]|0)+56|0;c[ed>>2]=c[Kc>>2];c[ed+4>>2]=c[Kc+4>>2];c[ed+8>>2]=c[Kc+8>>2];c[ed+12>>2]=c[Kc+12>>2];c[ed+16>>2]=c[Kc+16>>2];c[ed+20>>2]=c[Kc+20>>2];c[ed+24>>2]=c[Kc+24>>2];c[ed+28>>2]=c[Kc+28>>2];c[ed+32>>2]=c[Kc+32>>2];c[ed+36>>2]=c[Kc+36>>2];Kc=(c[Nb>>2]|0)+56|0;ed=(c[Hc>>2]|0)+16|0;c[Kc>>2]=c[ed>>2];c[Kc+4>>2]=c[ed+4>>2];c[Kc+8>>2]=c[ed+8>>2];c[Kc+12>>2]=c[ed+12>>2];c[Kc+16>>2]=c[ed+16>>2];c[Kc+20>>2]=c[ed+20>>2];c[Kc+24>>2]=c[ed+24>>2];c[Kc+28>>2]=c[ed+28>>2];c[Kc+32>>2]=c[ed+32>>2];c[Kc+36>>2]=c[ed+36>>2];a[(c[Nb>>2]|0)+112|0]=1;c[(c[Nb>>2]|0)+116>>2]=Ic;c[((c[Rb>>2]&3|0)==3?Ib:Sb)+28>>2]=c[((c[Jc>>2]&3|0)==2?Ic:Lc)+28>>2];ed=(c[Kb>>2]|0)+16|0;Kc=(c[Hc>>2]|0)+56|0;c[ed>>2]=c[Kc>>2];c[ed+4>>2]=c[Kc+4>>2];c[ed+8>>2]=c[Kc+8>>2];c[ed+12>>2]=c[Kc+12>>2];c[ed+16>>2]=c[Kc+16>>2];c[ed+20>>2]=c[Kc+20>>2];c[ed+24>>2]=c[Kc+24>>2];c[ed+28>>2]=c[Kc+28>>2];c[ed+32>>2]=c[Kc+32>>2];c[ed+36>>2]=c[Kc+36>>2]}Kc=c[Hc>>2]|0;ed=c[Kc+172>>2]|0;if((ed|0)==0){td=Ic;ud=Kc}else{Kc=ed;while(1){vd=c[Kc+8>>2]|0;ed=c[vd+172>>2]|0;if((ed|0)==0){break}else{Kc=ed}}td=Kc;ud=vd}ed=c[ud+116>>2]|0;if((ed|0)==0){wd=td}else{Nc=ed;while(1){ed=c[(c[Nc+8>>2]|0)+116>>2]|0;if((ed|0)==0){break}else{Nc=ed}}wd=Nc}Kc=c[(c[wd+8>>2]|0)+172>>2]|0;if((Kc|0)==0){xd=wd}else{ed=Kc;while(1){Kc=c[(c[ed+8>>2]|0)+172>>2]|0;if((Kc|0)==0){break}else{ed=Kc}}xd=ed}c[((c[Rb>>2]&3|0)==2?Ib:Tb)+28>>2]=c[((c[xd>>2]&3|0)==2?xd:xd-32|0)+28>>2];a[(c[Kb>>2]|0)+84|0]=0;a[(c[Kb>>2]|0)+112|0]=1;h[(c[Kb>>2]|0)+64>>3]=0.0;h[(c[Kb>>2]|0)+56>>3]=0.0;c[(c[Kb>>2]|0)+116>>2]=Ic;yd=Ib;zd=1}else{if((c[Zc+164>>2]&32|0)==0){yd=Ic;zd=0;break}Nc=c[Kb>>2]|0;tF(Nc|0,Zc|0,176)|0;tF(xb|0,Ic|0,32)|0;c[Kb>>2]=Nc;c[((c[Rb>>2]&3|0)==3?Ib:Sb)+28>>2]=c[((c[Jc>>2]&3|0)==2?Ic:Lc)+28>>2];c[((c[Rb>>2]&3|0)==2?Ib:Tb)+28>>2]=c[((c[Jc>>2]&3|0)==3?Ic:Mc)+28>>2];Nc=(c[Kb>>2]|0)+16|0;Kc=(c[Hc>>2]|0)+56|0;c[Nc>>2]=c[Kc>>2];c[Nc+4>>2]=c[Kc+4>>2];c[Nc+8>>2]=c[Kc+8>>2];c[Nc+12>>2]=c[Kc+12>>2];c[Nc+16>>2]=c[Kc+16>>2];c[Nc+20>>2]=c[Kc+20>>2];c[Nc+24>>2]=c[Kc+24>>2];c[Nc+28>>2]=c[Kc+28>>2];c[Nc+32>>2]=c[Kc+32>>2];c[Nc+36>>2]=c[Kc+36>>2];Kc=(c[Kb>>2]|0)+56|0;Nc=(c[Hc>>2]|0)+16|0;c[Kc>>2]=c[Nc>>2];c[Kc+4>>2]=c[Nc+4>>2];c[Kc+8>>2]=c[Nc+8>>2];c[Kc+12>>2]=c[Nc+12>>2];c[Kc+16>>2]=c[Nc+16>>2];c[Kc+20>>2]=c[Nc+20>>2];c[Kc+24>>2]=c[Nc+24>>2];c[Kc+28>>2]=c[Nc+28>>2];c[Kc+32>>2]=c[Nc+32>>2];c[Kc+36>>2]=c[Nc+36>>2];a[(c[Kb>>2]|0)+112|0]=1;c[(c[Kb>>2]|0)+116>>2]=Ic;yd=Ib;zd=0}}while(0);do{if(ba){Ic=c[44380]|0;Hc=yd+8|0;Mc=c[Hc>>2]|0;if((a[Mc+112|0]|0)==0){Ad=yd;Bd=Hc}else{Hc=Mc;do{Cd=c[Hc+116>>2]|0;Dd=Cd+8|0;Hc=c[Dd>>2]|0;}while((a[Hc+112|0]|0)!=0);Ad=Cd;Bd=Dd}Hc=Ad;ed=c[Hc>>2]|0;Mc=ed&3;Jc=c[((Mc|0)==2?Ad:Ad-32|0)+28>>2]|0;Lc=Ad+32|0;Zc=c[((Mc|0)==3?Ad:Lc)+28>>2]|0;Mc=Jc+8|0;Tc=Zc+8|0;Nc=(c[(c[Mc>>2]|0)+232>>2]|0)-(c[(c[Tc>>2]|0)+232>>2]|0)|0;Kc=(Nc|0)>-1?Nc:-Nc|0;if((Kc|0)==2){if((a[(c[(Hx(Jc|0)|0)+8>>2]|0)+113|0]&1)!=0){za=220;break}Ed=c[Hc>>2]|0}else if((Kc|0)==1){za=220;break}else{Ed=ed}if((c[((c[yd>>2]&3|0)==3?yd:yd+32|0)+28>>2]|0)==(c[((Ed&3|0)==3?Ad:Lc)+28>>2]|0)){Lc=c[Tc>>2]|0;ed=c[Bd>>2]|0;Kc=c[Mc>>2]|0;Fd=+h[Kc+16>>3]+ +h[ed+56>>3];Gd=+h[Kc+24>>3]+ +h[ed+64>>3];Hd=+h[Lc+16>>3]+ +h[ed+16>>3];Id=+h[Lc+24>>3]+ +h[ed+24>>3];Jd=ed;Kd=Jc}else{ed=c[Mc>>2]|0;Mc=c[Bd>>2]|0;Lc=c[Tc>>2]|0;Fd=+h[Lc+16>>3]+ +h[Mc+16>>3];Gd=+h[Lc+24>>3]+ +h[Mc+24>>3];Hd=+h[ed+16>>3]+ +h[Mc+56>>3];Id=+h[ed+24>>3]+ +h[Mc+64>>3];Jd=Mc;Kd=Zc}Zc=c[Jd+96>>2]|0;if((Zc|0)==0){Mc=Ic;h[Ic>>3]=Hd;h[Ic+8>>3]=Id;ed=Ic+16|0;c[ed>>2]=c[Mc>>2];c[ed+4>>2]=c[Mc+4>>2];c[ed+8>>2]=c[Mc+8>>2];c[ed+12>>2]=c[Mc+12>>2];Mc=Ic+32|0;h[Ic+32>>3]=Fd;h[Ic+40>>3]=Gd;ed=Ic+48|0;c[ed>>2]=c[Mc>>2];c[ed+4>>2]=c[Mc+4>>2];c[ed+8>>2]=c[Mc+8>>2];c[ed+12>>2]=c[Mc+12>>2];Ld=4;Md=Kd;break}hd=+h[Zc+24>>3];gd=+h[Zc+32>>3];Zc=(c[(c[(Hx(Jc|0)|0)+8>>2]|0)+116>>2]&1|0)==0;pd=Zc?gd:hd;Jc=c[(c[Bd>>2]|0)+96>>2]|0;id=+h[Jc+56>>3];qd=+h[Jc+64>>3];ra=(Zc?hd:gd)*.5;if((~~((Gd-Id)*(id-Hd)-(Fd-Hd)*(qd-Id))|0)>0){Nd=id+ra;Od=qd-pd*.5}else{Nd=id-ra;Od=qd+pd*.5}Zc=Ic;h[Ic>>3]=Hd;h[Ic+8>>3]=Id;Jc=Ic+16|0;c[Jc>>2]=c[Zc>>2];c[Jc+4>>2]=c[Zc+4>>2];c[Jc+8>>2]=c[Zc+8>>2];c[Jc+12>>2]=c[Zc+12>>2];Zc=Ic+64|0;h[Ic+64>>3]=Nd;h[Ic+72>>3]=Od;Jc=Ic+48|0;c[Jc>>2]=c[Zc>>2];c[Jc+4>>2]=c[Zc+4>>2];c[Jc+8>>2]=c[Zc+8>>2];c[Jc+12>>2]=c[Zc+12>>2];Jc=Ic+32|0;c[Jc>>2]=c[Zc>>2];c[Jc+4>>2]=c[Zc+4>>2];c[Jc+8>>2]=c[Zc+8>>2];c[Jc+12>>2]=c[Zc+12>>2];Zc=Ic+96|0;h[Ic+96>>3]=Fd;h[Ic+104>>3]=Gd;Jc=Ic+80|0;c[Jc>>2]=c[Zc>>2];c[Jc+4>>2]=c[Zc+4>>2];c[Jc+8>>2]=c[Zc+8>>2];c[Jc+12>>2]=c[Zc+12>>2];Ld=7;Md=Kd}else{za=220}}while(0);if((za|0)==220){za=0;Zc=c[yd>>2]&3;Jc=c[((Zc|0)==3?yd:yd+32|0)+28>>2]|0;Mc=c[((Zc|0)==2?yd:yd-32|0)+28>>2]|0;Do(D,K,Jc,0,yd);c[Ab>>2]=c[Cb>>2];c[Ab+4>>2]=c[Cb+4>>2];c[Ab+8>>2]=c[Cb+8>>2];c[Ab+12>>2]=c[Cb+12>>2];c[Ab+16>>2]=c[Cb+16>>2];c[Ab+20>>2]=c[Cb+20>>2];c[Ab+24>>2]=c[Cb+24>>2];c[Ab+28>>2]=c[Cb+28>>2];pd=+h[_b>>3];qd=+h[$b>>3];Zc=Jc+8|0;ed=c[Zc>>2]|0;do{if((a[ed+156|0]|0)==1){if((c[ed+176>>2]|0)>1){Pd=1;break}Pd=(c[ed+184>>2]|0)>1|0}else{Pd=0}}while(0);em(S,yd,1,A,Pd);ra=+h[A+56+((c[ac>>2]|0)-1<<5)+8>>3];ed=c[Zc>>2]|0;id=+h[ed+24>>3];Lc=c[ed+232>>2]|0;gd=+(~~(id- +(c[(c[(c[(Hx(Jc|0)|0)+8>>2]|0)+184>>2]|0)+(Lc*44|0)+16>>2]|0))|0);if(pd<qd&gd<ra){Lc=c[ac>>2]|0;c[ac>>2]=Lc+1;h[A+56+(Lc<<5)>>3]=pd;h[A+56+(Lc<<5)+8>>3]=gd;h[A+56+(Lc<<5)+16>>3]=qd;h[A+56+(Lc<<5)+24>>3]=ra}Lc=Mc+8|0;f:do{if((a[(c[Lc>>2]|0)+156|0]|0)==1){ed=fd+8|0;Tc=Mc;Kc=0;Hc=-1;Nc=0;Qc=yd;Qd=Jc;Rd=Lc;while(1){Sd=Tc;Td=0;Ud=Hc;Vd=Nc;Wd=0;Xd=Qc;Yd=Qd;Zd=Rd;while(1){if((Ec[c[2963]&63](Sd)|0)<<24>>24!=0){_d=Sd;$d=Wd;ae=Xd;be=Yd;ce=Zd;de=Kc;ee=Qc;break f}fe=Wd|1;ge=c[(c[Yd+8>>2]|0)+232>>2]|0;he=c[$>>2]|0;ie=he+(ge<<5)|0;ra=+h[ie>>3];je=he+(ge<<5)+8|0;gd=+h[je>>3];ke=he+(ge<<5)+16|0;id=+h[ke>>3];le=he+(ge<<5)+24|0;hd=+h[le>>3];if(ra==id){he=c[(c[ed>>2]|0)+184>>2]|0;me=ge+1|0;V=+(c[_>>2]|0);ne=+h[(c[(c[c[he+(me*44|0)+4>>2]>>2]|0)+8>>2]|0)+24>>3]+ +(c[he+(me*44|0)+20>>2]|0);oe=+(c[Z>>2]|0);pe=+h[(c[(c[c[he+(ge*44|0)+4>>2]>>2]|0)+8>>2]|0)+24>>3]- +(c[he+(ge*44|0)+16>>2]|0);h[ie>>3]=V;h[je>>3]=ne;h[ke>>3]=oe;h[le>>3]=pe;qe=pe;re=oe;se=V;te=ne}else{qe=hd;re=id;se=ra;te=gd}h[180936+(Wd<<5)>>3]=se;h[180944+(Wd<<5)>>3]=te;h[180952+(Wd<<5)>>3]=re;h[180960+(Wd<<5)>>3]=qe;if((Td|0)==0){le=c[Zd>>2]|0;ke=c[c[le+180>>2]>>2]|0;je=c[(c[((c[ke>>2]&3|0)==2?ke:ke-32|0)+28>>2]|0)+8>>2]|0;g:do{if((a[je+156|0]|0)==1){ke=le+16|0;ie=0;ge=je;while(1){he=ge+180|0;if((c[he+4>>2]|0)!=1){ue=ie;break g}if((c[ge+176>>2]|0)!=1){ue=ie;break g}me=ie+1|0;if(+h[ge+16>>3]!=+h[ke>>3]){ue=ie;break g}ve=c[c[he>>2]>>2]|0;he=c[(c[((c[ve>>2]&3|0)==2?ve:ve-32|0)+28>>2]|0)+8>>2]|0;if((a[he+156|0]|0)==1){ie=me;ge=he}else{ue=me;break}}}else{ue=0}}while(0);je=(ue|0)<(((a[(c[ed>>2]|0)+113|0]&1)!=0?5:3)|0);we=je?ue:ue-2|0;xe=je?Ud:1;ye=je&1^1}else{we=Vd;xe=Ud;ye=Td}if(!((ye|0)==0|(xe|0)>0)){break}je=Wd+2|0;Do(E,K,Sd,Xd,c[c[(c[Zd>>2]|0)+180>>2]>>2]|0);le=180936+(fe<<5)|0;c[le>>2]=c[Db>>2];c[le+4>>2]=c[Db+4>>2];c[le+8>>2]=c[Db+8>>2];c[le+12>>2]=c[Db+12>>2];c[le+16>>2]=c[Db+16>>2];c[le+20>>2]=c[Db+20>>2];c[le+24>>2]=c[Db+24>>2];c[le+28>>2]=c[Db+28>>2];le=c[c[(c[Zd>>2]|0)+180>>2]>>2]|0;zc=c[le>>2]&3;ge=c[((zc|0)==3?le:le+32|0)+28>>2]|0;ie=c[((zc|0)==2?le:le-32|0)+28>>2]|0;zc=ie+8|0;if((a[(c[zc>>2]|0)+156|0]|0)==1){Sd=ie;Td=ye;Ud=xe-1|0;Vd=we;Wd=je;Xd=le;Yd=ge;Zd=zc}else{_d=ie;$d=je;ae=le;be=ge;ce=zc;de=Kc;ee=Qc;break f}}Do(F,K,Sd,Xd,c[c[(c[Zd>>2]|0)+180>>2]>>2]|0);c[Bb>>2]=c[Eb>>2];c[Bb+4>>2]=c[Eb+4>>2];c[Bb+8>>2]=c[Eb+8>>2];c[Bb+12>>2]=c[Eb+12>>2];c[Bb+16>>2]=c[Eb+16>>2];c[Bb+20>>2]=c[Eb+20>>2];c[Bb+24>>2]=c[Eb+24>>2];c[Bb+28>>2]=c[Eb+28>>2];Yd=c[(c[((c[Xd>>2]&3|0)==2?Xd:Xd-32|0)+28>>2]|0)+8>>2]|0;do{if((a[Yd+156|0]|0)==1){if((c[Yd+176>>2]|0)>1){ze=1;break}ze=(c[Yd+184>>2]|0)>1|0}else{ze=0}}while(0);gm(S,Xd,1,B,ze);Yd=(c[bc>>2]|0)-1|0;Wd=c[Zd>>2]|0;gd=+h[Wd+24>>3];Vd=c[Wd+232>>2]|0;Wd=~~(gd+ +(c[(c[(c[(Hx(Sd|0)|0)+8>>2]|0)+184>>2]|0)+(Vd*44|0)+20>>2]|0));gd=+h[B+56+(Yd<<5)>>3];ra=+h[B+56+(Yd<<5)+16>>3];id=+h[B+56+(Yd<<5)+24>>3];hd=+(Wd|0);if(gd<ra&id<hd){Wd=c[bc>>2]|0;c[bc>>2]=Wd+1;h[B+56+(Wd<<5)>>3]=gd;h[B+56+(Wd<<5)+8>>3]=id;h[B+56+(Wd<<5)+16>>3]=ra;h[B+56+(Wd<<5)+24>>3]=hd}h[dc>>3]=1.5707963267948966;a[ec]=1;Fo(S,Qc,Xd,A,B,fe);do{if(ma){Ae=il(S,C)|0;za=251}else{Wd=kl(S,C)|0;if(!ba){Ae=Wd;za=251;break}Yd=c[C>>2]|0;if((Yd|0)<=4){Be=Wd;Ce=Yd;za=252;break}Vd=Wd+16|0;Ud=Wd;c[Vd>>2]=c[Ud>>2];c[Vd+4>>2]=c[Ud+4>>2];c[Vd+8>>2]=c[Ud+8>>2];c[Vd+12>>2]=c[Ud+12>>2];Ud=Wd+32|0;Vd=Wd+(Yd-1<<4)|0;c[Ud>>2]=c[Vd>>2];c[Ud+4>>2]=c[Vd+4>>2];c[Ud+8>>2]=c[Vd+8>>2];c[Ud+12>>2]=c[Vd+12>>2];uF(Wd+48|0,Vd|0,16)|0;c[C>>2]=4;De=4;Ee=Wd}}while(0);if((za|0)==251){za=0;Be=Ae;Ce=c[C>>2]|0;za=252}if((za|0)==252){za=0;if((Ce|0)==0){break d}else{De=Ce;Ee=Be}}Xd=De+Kc|0;if((Xd|0)>(c[44384]|0)){c[44384]=Xd<<1;Sd=mk(c[44380]|0,Xd<<5)|0;c[44380]=Sd;Fe=c[C>>2]|0;Ge=Sd}else{Fe=De;Ge=c[44380]|0}if((Fe|0)>0){Sd=(Fe|0)>1;Xd=Kc;Wd=0;while(1){Vd=Ge+(Xd<<4)|0;Ud=Ee+(Wd<<4)|0;c[Vd>>2]=c[Ud>>2];c[Vd+4>>2]=c[Ud+4>>2];c[Vd+8>>2]=c[Ud+8>>2];c[Vd+12>>2]=c[Ud+12>>2];Ud=Wd+1|0;if((Ud|0)<(Fe|0)){Xd=Xd+1|0;Wd=Ud}else{break}}He=(Sd?Fe:1)+Kc|0}else{He=Kc}Wd=c[c[(c[Zd>>2]|0)+180>>2]>>2]|0;if((we|0)==0){Ie=Wd}else{Xd=we;Ud=Wd;while(1){Wd=Xd-1|0;Vd=c[c[(c[(c[((c[Ud>>2]&3|0)==2?Ud:Ud-32|0)+28>>2]|0)+8>>2]|0)+180>>2]>>2]|0;if((Wd|0)==0){Ie=Vd;break}else{Xd=Wd;Ud=Vd}}}Ud=Ge+(He<<4)|0;Xd=Ge+(He-1<<4)|0;c[Ud>>2]=c[Xd>>2];c[Ud+4>>2]=c[Xd+4>>2];c[Ud+8>>2]=c[Xd+8>>2];c[Ud+12>>2]=c[Xd+12>>2];Ud=He+2|0;Zd=Ge+(He+1<<4)|0;c[Zd>>2]=c[Xd>>2];c[Zd+4>>2]=c[Xd+4>>2];c[Zd+8>>2]=c[Xd+8>>2];c[Zd+12>>2]=c[Xd+12>>2];Xd=Ie;Zd=Ie+32|0;Sd=Ge+(Ud<<4)|0;Vd=(c[(c[((c[Xd>>2]&3|0)==3?Ie:Zd)+28>>2]|0)+8>>2]|0)+16|0;c[Sd>>2]=c[Vd>>2];c[Sd+4>>2]=c[Vd+4>>2];c[Sd+8>>2]=c[Vd+8>>2];c[Sd+12>>2]=c[Vd+12>>2];Go(Qc,S);Vd=c[Xd>>2]&3;Xd=c[((Vd|0)==3?Ie:Zd)+28>>2]|0;Zd=c[((Vd|0)==2?Ie:Ie-32|0)+28>>2]|0;Vd=Xd+8|0;Do(G,K,Xd,c[c[(c[Vd>>2]|0)+172>>2]>>2]|0,Ie);c[Ab>>2]=c[Fb>>2];c[Ab+4>>2]=c[Fb+4>>2];c[Ab+8>>2]=c[Fb+8>>2];c[Ab+12>>2]=c[Fb+12>>2];c[Ab+16>>2]=c[Fb+16>>2];c[Ab+20>>2]=c[Fb+20>>2];c[Ab+24>>2]=c[Fb+24>>2];c[Ab+28>>2]=c[Fb+28>>2];Sd=c[Vd>>2]|0;do{if((a[Sd+156|0]|0)==1){if((c[Sd+176>>2]|0)>1){Je=1;break}Je=(c[Sd+184>>2]|0)>1|0}else{Je=0}}while(0);em(S,Ie,1,A,Je);Sd=(c[ac>>2]|0)-1|0;Wd=c[Vd>>2]|0;hd=+h[Wd+24>>3];Yd=c[Wd+232>>2]|0;Wd=~~(hd- +(c[(c[(c[(Hx(Xd|0)|0)+8>>2]|0)+184>>2]|0)+(Yd*44|0)+16>>2]|0));hd=+h[A+56+(Sd<<5)>>3];ra=+h[A+56+(Sd<<5)+8>>3];id=+h[A+56+(Sd<<5)+16>>3];gd=+(Wd|0);if(hd<id&gd<ra){Wd=c[ac>>2]|0;c[ac>>2]=Wd+1;h[A+56+(Wd<<5)>>3]=hd;h[A+56+(Wd<<5)+8>>3]=gd;h[A+56+(Wd<<5)+16>>3]=id;h[A+56+(Wd<<5)+24>>3]=ra}h[fc>>3]=-1.5707963267948966;a[gc]=1;Wd=Zd+8|0;if((a[(c[Wd>>2]|0)+156|0]|0)==1){Tc=Zd;Kc=Ud;Hc=xe;Nc=we;Qc=Ie;Qd=Xd;Rd=Wd}else{_d=Zd;$d=0;ae=Ie;be=Xd;ce=Wd;de=Ud;ee=Ie;break}}}else{_d=Mc;$d=0;ae=yd;be=Jc;ce=Lc;de=0;ee=yd}}while(0);Lc=$d+1|0;Jc=c[(c[be+8>>2]|0)+232>>2]|0;Mc=c[$>>2]|0;Zc=Mc+(Jc<<5)|0;qd=+h[Zc>>3];Rd=Mc+(Jc<<5)+8|0;pd=+h[Rd>>3];Qd=Mc+(Jc<<5)+16|0;ra=+h[Qd>>3];Qc=Mc+(Jc<<5)+24|0;id=+h[Qc>>3];if(qd==ra){Mc=c[(c[fd+8>>2]|0)+184>>2]|0;Nc=Jc+1|0;gd=+(c[_>>2]|0);hd=+h[(c[(c[c[Mc+(Nc*44|0)+4>>2]>>2]|0)+8>>2]|0)+24>>3]+ +(c[Mc+(Nc*44|0)+20>>2]|0);ne=+(c[Z>>2]|0);V=+h[(c[(c[c[Mc+(Jc*44|0)+4>>2]>>2]|0)+8>>2]|0)+24>>3]- +(c[Mc+(Jc*44|0)+16>>2]|0);h[Zc>>3]=gd;h[Rd>>3]=hd;h[Qd>>3]=ne;h[Qc>>3]=V;Ke=V;Le=ne;Me=gd;Ne=hd}else{Ke=id;Le=ra;Me=qd;Ne=pd}h[180936+($d<<5)>>3]=Me;h[180944+($d<<5)>>3]=Ne;h[180952+($d<<5)>>3]=Le;h[180960+($d<<5)>>3]=Ke;Do(H,K,_d,ae,0);c[Bb>>2]=c[Gb>>2];c[Bb+4>>2]=c[Gb+4>>2];c[Bb+8>>2]=c[Gb+8>>2];c[Bb+12>>2]=c[Gb+12>>2];c[Bb+16>>2]=c[Gb+16>>2];c[Bb+20>>2]=c[Gb+20>>2];c[Bb+24>>2]=c[Gb+24>>2];c[Bb+28>>2]=c[Gb+28>>2];pd=+h[hc>>3];qd=+h[ic>>3];Qc=(zd|0)!=0;Qd=Qc?Mb:ae;Rd=ae;Zc=ae-32|0;Jc=c[(c[((c[Rd>>2]&3|0)==2?ae:Zc)+28>>2]|0)+8>>2]|0;do{if((a[Jc+156|0]|0)==1){if((c[Jc+176>>2]|0)>1){Oe=1;break}Oe=(c[Jc+184>>2]|0)>1|0}else{Oe=0}}while(0);gm(S,Qd,1,B,Oe);ra=+h[B+56+((c[bc>>2]|0)-1<<5)+24>>3];Jc=c[ce>>2]|0;id=+h[Jc+24>>3];fd=c[Jc+232>>2]|0;hd=+(~~(id+ +(c[(c[(c[(Hx(_d|0)|0)+8>>2]|0)+184>>2]|0)+(fd*44|0)+20>>2]|0))|0);if(pd<qd&ra<hd){fd=c[bc>>2]|0;c[bc>>2]=fd+1;h[B+56+(fd<<5)>>3]=pd;h[B+56+(fd<<5)+8>>3]=ra;h[B+56+(fd<<5)+16>>3]=qd;h[B+56+(fd<<5)+24>>3]=hd}Fo(S,ee,ae,A,B,Lc);if(ma){Pe=il(S,C)|0}else{Pe=kl(S,C)|0}fd=c[C>>2]|0;if(ba&(fd|0)>4){Jc=Pe+16|0;Mc=Pe;c[Jc>>2]=c[Mc>>2];c[Jc+4>>2]=c[Mc+4>>2];c[Jc+8>>2]=c[Mc+8>>2];c[Jc+12>>2]=c[Mc+12>>2];Mc=Pe+32|0;Jc=Pe+(fd-1<<4)|0;c[Mc>>2]=c[Jc>>2];c[Mc+4>>2]=c[Jc+4>>2];c[Mc+8>>2]=c[Jc+8>>2];c[Mc+12>>2]=c[Jc+12>>2];uF(Pe+48|0,Jc|0,16)|0;c[C>>2]=4;Qe=4}else{if((fd|0)==0){break}else{Qe=fd}}fd=Qe+de|0;if((fd|0)>(c[44384]|0)){c[44384]=fd<<1;c[44380]=mk(c[44380]|0,fd<<5)|0;Re=c[C>>2]|0}else{Re=Qe}if((Re|0)>0){fd=c[44380]|0;Jc=(Re|0)>1;Mc=de;Nc=0;while(1){Hc=fd+(Mc<<4)|0;Kc=Pe+(Nc<<4)|0;c[Hc>>2]=c[Kc>>2];c[Hc+4>>2]=c[Kc+4>>2];c[Hc+8>>2]=c[Kc+8>>2];c[Hc+12>>2]=c[Kc+12>>2];Kc=Nc+1|0;if((Kc|0)<(Re|0)){Mc=Mc+1|0;Nc=Kc}else{break}}Se=(Jc?Re:1)+de|0}else{Se=de}Go(ee,S);if(Qc){Te=(c[Ub>>2]&3|0)==2?Mb:Wb}else{Te=(c[Rd>>2]&3|0)==2?ae:Zc}Ld=Se;Md=c[Te+28>>2]|0}if((Uc|0)==1){cm(yd,Md,c[44380]|0,Ld,11848);break}Nc=Ld-1|0;Mc=(Nc|0)>1;if(Mc){qd=+((da(c[U>>2]|0,Uc-1|0)|0)/2|0|0);fd=c[44380]|0;Lc=1;do{Qd=fd+(Lc<<4)|0;h[Qd>>3]=+h[Qd>>3]-qd;Lc=Lc+1|0;}while((Lc|0)<(Nc|0))}Lc=c[44384]|0;if((Lc|0)>(c[44382]|0)){c[44382]=Lc;fd=mk(c[44378]|0,Lc<<4)|0;c[44378]=fd;Ue=fd}else{Ue=c[44378]|0}fd=(Ld|0)>0;if(fd){Lc=c[44380]|0;Zc=0;do{Rd=Ue+(Zc<<4)|0;Qc=Lc+(Zc<<4)|0;c[Rd>>2]=c[Qc>>2];c[Rd+4>>2]=c[Qc+4>>2];c[Rd+8>>2]=c[Qc+8>>2];c[Rd+12>>2]=c[Qc+12>>2];Zc=Zc+1|0;}while((Zc|0)<(Ld|0))}cm(yd,Md,Ue,Ld,11848);if((Uc|0)>1){Ve=1}else{break}do{Zc=c[ca+(Ve+rc<<2)>>2]|0;Lc=Zc+8|0;Qc=c[Lc>>2]|0;if((c[Qc+164>>2]&32|0)==0){We=Zc}else{Rd=c[Qb>>2]|0;tF(Rd|0,Qc|0,176)|0;tF(zb|0,Zc|0,32)|0;c[Qb>>2]=Rd;Rd=Zc;c[((c[Xb>>2]&3|0)==3?Pb:Yb)+28>>2]=c[((c[Rd>>2]&3|0)==2?Zc:Zc-32|0)+28>>2];c[((c[Xb>>2]&3|0)==2?Pb:Zb)+28>>2]=c[((c[Rd>>2]&3|0)==3?Zc:Zc+32|0)+28>>2];Rd=(c[Qb>>2]|0)+16|0;Qc=(c[Lc>>2]|0)+56|0;c[Rd>>2]=c[Qc>>2];c[Rd+4>>2]=c[Qc+4>>2];c[Rd+8>>2]=c[Qc+8>>2];c[Rd+12>>2]=c[Qc+12>>2];c[Rd+16>>2]=c[Qc+16>>2];c[Rd+20>>2]=c[Qc+20>>2];c[Rd+24>>2]=c[Qc+24>>2];c[Rd+28>>2]=c[Qc+28>>2];c[Rd+32>>2]=c[Qc+32>>2];c[Rd+36>>2]=c[Qc+36>>2];Qc=(c[Qb>>2]|0)+56|0;Rd=(c[Lc>>2]|0)+16|0;c[Qc>>2]=c[Rd>>2];c[Qc+4>>2]=c[Rd+4>>2];c[Qc+8>>2]=c[Rd+8>>2];c[Qc+12>>2]=c[Rd+12>>2];c[Qc+16>>2]=c[Rd+16>>2];c[Qc+20>>2]=c[Rd+20>>2];c[Qc+24>>2]=c[Rd+24>>2];c[Qc+28>>2]=c[Rd+28>>2];c[Qc+32>>2]=c[Rd+32>>2];c[Qc+36>>2]=c[Rd+36>>2];a[(c[Qb>>2]|0)+112|0]=1;c[(c[Qb>>2]|0)+116>>2]=Zc;We=Pb}if(Mc){Zc=c[44380]|0;qd=+(c[U>>2]|0);Rd=1;do{Qc=Zc+(Rd<<4)|0;h[Qc>>3]=qd+ +h[Qc>>3];Rd=Rd+1|0;}while((Rd|0)<(Nc|0))}Rd=c[44378]|0;if(fd){Zc=c[44380]|0;Qc=0;do{Lc=Rd+(Qc<<4)|0;Jc=Zc+(Qc<<4)|0;c[Lc>>2]=c[Jc>>2];c[Lc+4>>2]=c[Jc+4>>2];c[Lc+8>>2]=c[Jc+8>>2];c[Lc+12>>2]=c[Jc+12>>2];Qc=Qc+1|0;}while((Qc|0)<(Ld|0))}cm(We,c[((c[We>>2]&3|0)==2?We:We-32|0)+28>>2]|0,Rd,Ld,11848);Ve=Ve+1|0;}while((Ve|0)<(Uc|0))}}while(0);if((Vc|0)<(ea|0)){rc=Vc}else{break}}}rc=c[(c[L>>2]|0)+180>>2]|0;if((rc|0)!=0){U=rc;do{rc=U+8|0;Pb=c[rc>>2]|0;do{if((a[Pb+156|0]|0)==1){Qb=c[Pb+104>>2]|0;if((Qb|0)==0){Xe=Pb;break}if((c[Pb+176>>2]|0)==0){Ye=Qb}else{Qb=(c[c[Pb+180>>2]>>2]|0)+8|0;Zb=c[Qb>>2]|0;if((a[Zb+112|0]|0)==0){Ze=Qb;_e=Zb}else{Qb=Zb;while(1){Zb=(c[Qb+116>>2]|0)+8|0;Xb=c[Zb>>2]|0;if((a[Xb+112|0]|0)==0){Ze=Zb;_e=Xb;break}else{Qb=Xb}}}Qb=c[_e+96>>2]|0;qd=+h[Qb+24>>3];pd=+h[Qb+32>>3];Qb=(c[(c[(Hx(U)|0)+8>>2]|0)+116>>2]&1|0)==0;h[(c[(c[Ze>>2]|0)+96>>2]|0)+56>>3]=+h[(c[rc>>2]|0)+16>>3]+(Qb?qd:pd)*.5;h[(c[(c[Ze>>2]|0)+96>>2]|0)+64>>3]=+h[(c[rc>>2]|0)+24>>3];a[(c[(c[Ze>>2]|0)+96>>2]|0)+81|0]=1;Ye=c[(c[rc>>2]|0)+104>>2]|0}_m(d,Ye);Xe=c[rc>>2]|0}else{Xe=Pb}}while(0);U=c[Xe+164>>2]|0;}while((U|0)!=0)}if((e|0)==0){W=S;X=ca;break}U=ux(d)|0;if((U|0)==0){W=S;X=ca;break}else{$e=U}while(1){U=mw(d,$e)|0;if((U|0)!=0){Pb=U;do{do{if((Ec[c[2962]&63](Pb)|0)<<24>>24!=0){U=c[(c[Pb+8>>2]|0)+8>>2]|0;if((U|0)==0){break}rc=c[U+4>>2]|0;Qb=kk(rc*48|0)|0;Xb=U|0;if((rc|0)>0){U=(c[Xb>>2]|0)+((rc-1|0)*48|0)|0;Zb=0;Yb=Qb;while(1){zb=U-48|0;Wb=Yb+48|0;Mb=c[U+4>>2]|0;Ub=kk(Mb<<4)|0;if((Mb|0)>0){ba=(c[U>>2]|0)+(Mb-1<<4)|0;ma=0;bc=Ub;while(1){ic=bc;hc=ba;c[ic>>2]=c[hc>>2];c[ic+4>>2]=c[hc+4>>2];c[ic+8>>2]=c[hc+8>>2];c[ic+12>>2]=c[hc+12>>2];hc=ma+1|0;if((hc|0)<(Mb|0)){ba=ba-16|0;ma=hc;bc=bc+16|0}else{break}}}c[Yb>>2]=Ub;c[Yb+4>>2]=Mb;c[Yb+8>>2]=c[U+12>>2];c[Yb+12>>2]=c[U+8>>2];bc=Yb+16|0;ma=U+32|0;c[bc>>2]=c[ma>>2];c[bc+4>>2]=c[ma+4>>2];c[bc+8>>2]=c[ma+8>>2];c[bc+12>>2]=c[ma+12>>2];ma=Yb+32|0;bc=U+16|0;c[ma>>2]=c[bc>>2];c[ma+4>>2]=c[bc+4>>2];c[ma+8>>2]=c[bc+8>>2];c[ma+12>>2]=c[bc+12>>2];bc=Zb+1|0;if((bc|0)<(rc|0)){U=zb;Zb=bc;Yb=Wb}else{break}}Yb=0;Zb=c[Xb>>2]|0;while(1){eF(c[Zb+(Yb*48|0)>>2]|0);U=Yb+1|0;Rd=c[Xb>>2]|0;if((U|0)<(rc|0)){Yb=U;Zb=Rd}else{af=Rd;break}}}else{af=c[Xb>>2]|0}eF(af);c[Xb>>2]=Qb}}while(0);Pb=ow(d,Pb)|0;}while((Pb|0)!=0)}Pb=vx(d,$e)|0;if((Pb|0)==0){W=S;X=ca;break}else{$e=Pb}}}}while(0);do{if((c[53792]|0)!=0|(c[53756]|0)!=0){if(!((c[53786]|0)!=0|(c[53784]|0)!=0)){break}$e=ux(d)|0;if(($e|0)==0){break}else{bf=$e}do{do{if((c[53792]|0)!=0){$e=pw(d,bf)|0;if(($e|0)==0){break}else{cf=$e}do{$e=cf;ca=cf-32|0;af=(c[$e>>2]&3|0)==2?cf:ca;if((c[(c[af+8>>2]|0)+100>>2]|0)!=0){lm(af,1)|0;_m(d,c[(c[((c[$e>>2]&3|0)==2?cf:ca)+8>>2]|0)+100>>2]|0)}cf=qw(d,cf)|0;}while((cf|0)!=0)}}while(0);do{if((c[53756]|0)!=0){ca=mw(d,bf)|0;if((ca|0)==0){break}else{df=ca}do{ca=df+8|0;do{if((c[(c[ca>>2]|0)+104>>2]|0)!=0){if((lm(df,0)|0)==0){break}_m(d,c[(c[ca>>2]|0)+104>>2]|0)}}while(0);df=ow(d,df)|0;}while((df|0)!=0)}}while(0);bf=vx(d,bf)|0;}while((bf|0)!=0)}}while(0);if((M|0)!=4){eF(X);eF(c[W+84>>2]|0);eF(W);eF(c[K+16>>2]|0);hl()}c[53522]=1;c[53746]=1;i=f;return}function Co(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0;e=i;i=i+480|0;f=e|0;g=e+176|0;j=e+352|0;k=e+416|0;l=f|0;m=j|0;n=j+8|0;c[n>>2]=l;o=g|0;p=k|0;q=k+8|0;c[q>>2]=o;r=c[b>>2]|0;b=c[d>>2]|0;d=r+8|0;s=c[d>>2]|0;t=c[s+164>>2]|0;u=t&15;v=b+8|0;w=c[v>>2]|0;x=c[w+164>>2]&15;if((u|0)!=(x|0)){y=x-u|0;i=e;return y|0}u=c[s+172>>2]|0;if((u|0)==0){z=r;A=s}else{x=u;while(1){B=c[x+8>>2]|0;u=c[B+172>>2]|0;if((u|0)==0){break}else{x=u}}z=x;A=B}B=c[A+116>>2]|0;if((B|0)==0){C=z}else{z=B;while(1){B=c[(c[z+8>>2]|0)+116>>2]|0;if((B|0)==0){break}else{z=B}}C=z}z=c[w+172>>2]|0;if((z|0)==0){D=b;E=w}else{B=z;while(1){F=c[B+8>>2]|0;z=c[F+172>>2]|0;if((z|0)==0){break}else{B=z}}D=B;E=F}F=c[E+116>>2]|0;if((F|0)==0){G=D}else{D=F;while(1){F=c[(c[D+8>>2]|0)+116>>2]|0;if((F|0)==0){break}else{D=F}}G=D}D=c[C>>2]|0;F=D&3;E=c[(c[((F|0)==3?C:C+32|0)+28>>2]|0)+8>>2]|0;B=c[(c[((F|0)==2?C:C-32|0)+28>>2]|0)+8>>2]|0;F=(c[E+232>>2]|0)-(c[B+232>>2]|0)|0;z=c[G>>2]|0;A=z&3;x=c[(c[((A|0)==3?G:G+32|0)+28>>2]|0)+8>>2]|0;u=c[(c[((A|0)==2?G:G-32|0)+28>>2]|0)+8>>2]|0;A=(c[x+232>>2]|0)-(c[u+232>>2]|0)|0;H=(F|0)>-1?F:-F|0;F=(A|0)>-1?A:-A|0;if((H|0)!=(F|0)){y=H-F|0;i=e;return y|0}F=~~(+h[E+16>>3]- +h[B+16>>3]);B=(F|0)>-1?F:-F|0;F=~~(+h[x+16>>3]- +h[u+16>>3]);u=(F|0)>-1?F:-F|0;if((B|0)!=(u|0)){y=B-u|0;i=e;return y|0}u=D>>>4;D=z>>>4;if((u|0)!=(D|0)){y=u-D|0;i=e;return y|0}if((a[s+44|0]|0)==0){D=(a[s+84|0]|0)==0?C:r;C=c[D+8>>2]|0;I=D;J=C;K=c[C+164>>2]|0}else{I=r;J=s;K=t}t=I+8|0;if((K&32|0)==0){L=I;M=w}else{tF(f|0,J|0,176)|0;tF(j|0,I|0,32)|0;c[n>>2]=l;l=I;J=j;c[((c[J>>2]&3|0)==3?m:m+32|0)+28>>2]=c[((c[l>>2]&3|0)==2?I:I-32|0)+28>>2];c[((c[J>>2]&3|0)==2?m:m-32|0)+28>>2]=c[((c[l>>2]&3|0)==3?I:I+32|0)+28>>2];l=c[n>>2]|0;n=l+16|0;J=(c[t>>2]|0)+56|0;c[n>>2]=c[J>>2];c[n+4>>2]=c[J+4>>2];c[n+8>>2]=c[J+8>>2];c[n+12>>2]=c[J+12>>2];c[n+16>>2]=c[J+16>>2];c[n+20>>2]=c[J+20>>2];c[n+24>>2]=c[J+24>>2];c[n+28>>2]=c[J+28>>2];c[n+32>>2]=c[J+32>>2];c[n+36>>2]=c[J+36>>2];J=l+56|0;n=(c[t>>2]|0)+16|0;c[J>>2]=c[n>>2];c[J+4>>2]=c[n+4>>2];c[J+8>>2]=c[n+8>>2];c[J+12>>2]=c[n+12>>2];c[J+16>>2]=c[n+16>>2];c[J+20>>2]=c[n+20>>2];c[J+24>>2]=c[n+24>>2];c[J+28>>2]=c[n+28>>2];c[J+32>>2]=c[n+32>>2];c[J+36>>2]=c[n+36>>2];a[l+112|0]=1;c[l+116>>2]=I;L=m;M=c[v>>2]|0}if((a[M+44|0]|0)==0){m=(a[M+84|0]|0)==0?G:b;N=m;O=c[m+8>>2]|0}else{N=b;O=M}M=N+8|0;if((c[O+164>>2]&32|0)==0){P=O}else{tF(g|0,O|0,176)|0;tF(k|0,N|0,32)|0;c[q>>2]=o;o=N;O=k;c[((c[O>>2]&3|0)==3?p:p+32|0)+28>>2]=c[((c[o>>2]&3|0)==2?N:N-32|0)+28>>2];c[((c[O>>2]&3|0)==2?p:p-32|0)+28>>2]=c[((c[o>>2]&3|0)==3?N:N+32|0)+28>>2];o=c[q>>2]|0;q=o+16|0;p=(c[M>>2]|0)+56|0;c[q>>2]=c[p>>2];c[q+4>>2]=c[p+4>>2];c[q+8>>2]=c[p+8>>2];c[q+12>>2]=c[p+12>>2];c[q+16>>2]=c[p+16>>2];c[q+20>>2]=c[p+20>>2];c[q+24>>2]=c[p+24>>2];c[q+28>>2]=c[p+28>>2];c[q+32>>2]=c[p+32>>2];c[q+36>>2]=c[p+36>>2];p=o+56|0;q=(c[M>>2]|0)+16|0;c[p>>2]=c[q>>2];c[p+4>>2]=c[q+4>>2];c[p+8>>2]=c[q+8>>2];c[p+12>>2]=c[q+12>>2];c[p+16>>2]=c[q+16>>2];c[p+20>>2]=c[q+20>>2];c[p+24>>2]=c[q+24>>2];c[p+28>>2]=c[q+28>>2];c[p+32>>2]=c[q+32>>2];c[p+36>>2]=c[q+36>>2];a[o+112|0]=1;c[o+116>>2]=N;P=o}o=c[L+8>>2]|0;L=o+16|0;N=P+16|0;q=a[o+44|0]|0;do{if((a[P+44|0]|0)==0){Q=q<<24>>24!=0|0}else{if(q<<24>>24==0){y=-1;i=e;return y|0}p=~~(+h[L>>3]- +h[N>>3]);if((p|0)==0){Q=~~(+h[o+24>>3]- +h[P+24>>3]);break}else{y=p;i=e;return y|0}}}while(0);if((Q|0)!=0){y=Q;i=e;return y|0}Q=o+56|0;N=P+56|0;L=a[o+84|0]|0;do{if((a[P+84|0]|0)==0){R=L<<24>>24!=0|0}else{if(L<<24>>24==0){y=-1;i=e;return y|0}q=~~(+h[Q>>3]- +h[N>>3]);if((q|0)==0){R=~~(+h[o+64>>3]- +h[P+64>>3]);break}else{y=q;i=e;return y|0}}}while(0);if((R|0)!=0){y=R;i=e;return y|0}R=c[(c[d>>2]|0)+164>>2]&192;d=c[(c[v>>2]|0)+164>>2]&192;if((R|0)==(d|0)){y=((c[r>>2]|0)>>>4)-((c[b>>2]|0)>>>4)|0;i=e;return y|0}else{y=R-d|0;i=e;return y|0}return 0}function Do(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var i=0,j=0,k=0,l=0.0,m=0,n=0.0,o=0,p=0,q=0.0,r=0.0,s=0.0,t=0.0,u=0,v=0.0,w=0.0,x=0,y=0.0,z=0.0,A=0.0,B=0.0;i=Hx(e|0)|0;j=e+8|0;k=c[j>>2]|0;l=+h[k+16>>3]- +h[k+88>>3]+-4.0;k=Jo(e,f,g,-1)|0;do{if((k|0)==0){m=l>=0.0;if(m){n=l+.5}else{n=l+-.5}o=c[d>>2]|0;if((~~n|0)>=(o|0)){p=o;break}if(m){q=l+.5}else{q=l+-.5}p=~~q}else{m=Ko(c[j>>2]|0,k)|0;do{if((m|0)==0){o=c[k+8>>2]|0;r=+h[o+16>>3]+ +(c[o+240>>2]|0);if((a[o+156|0]|0)==0){s=r+ +(c[(c[i+8>>2]|0)+236>>2]|0)*.5;break}else{s=r+ +(c[d+8>>2]|0);break}}else{s=+h[(c[m+8>>2]|0)+32>>3]+ +(c[d+8>>2]|0)}}while(0);r=s<l?s:l;if(r<0.0){t=r+-.5}else{t=r+.5}p=~~t}}while(0);t=+(p|0);p=c[j>>2]|0;do{if((a[p+156|0]|0)==1){if((c[p+104>>2]|0)==0){u=22;break}v=+h[p+16>>3]+10.0}else{u=22}}while(0);if((u|0)==22){v=+h[p+16>>3]+ +h[p+96>>3]+4.0}p=Jo(e,f,g,1)|0;do{if((p|0)==0){g=v>=0.0;if(g){w=v+.5}else{w=v+-.5}f=c[d+4>>2]|0;if((~~w|0)<=(f|0)){x=f;break}if(g){y=v+.5}else{y=v+-.5}x=~~y}else{g=Ko(c[j>>2]|0,p)|0;do{if((g|0)==0){f=c[p+8>>2]|0;l=+h[f+16>>3]- +h[f+88>>3];if((a[f+156|0]|0)==0){z=l- +(c[(c[i+8>>2]|0)+236>>2]|0)*.5;break}else{z=l- +(c[d+8>>2]|0);break}}else{z=+h[(c[g+8>>2]|0)+16>>3]- +(c[d+8>>2]|0)}}while(0);l=z>v?z:v;if(l<0.0){A=l+-.5}else{A=l+.5}x=~~A}}while(0);A=+(x|0);x=c[j>>2]|0;do{if((a[x+156|0]|0)==1){if((c[x+104>>2]|0)==0){B=A;break}v=A- +h[x+96>>3];if(v>=t){B=v;break}B=+h[x+16>>3]}else{B=A}}while(0);A=+h[x+24>>3];j=c[x+232>>2]|0;x=c[(c[i+8>>2]|0)+184>>2]|0;v=A- +(c[x+(j*44|0)+16>>2]|0);z=A+ +(c[x+(j*44|0)+20>>2]|0);h[b>>3]=t;h[b+8>>3]=v;h[b+16>>3]=B;h[b+24>>3]=z;return}function Eo(b){b=b|0;var d=0,e=0;d=c[b+8>>2]|0;if((a[d+156|0]|0)!=1){e=0;return e|0}if((c[d+176>>2]|0)>1){e=1;return e|0}e=(c[d+184>>2]|0)>1|0;return e|0}function Fo(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var i=0,j=0,k=0,l=0.0,m=0,n=0.0,o=0,p=0;i=Ho(b,-1)|0;j=Ho(b,1)|0;do{if((i|0)!=0){if((om(i)|0)!=0){break}return}}while(0);do{if((j|0)!=0){if((om(j)|0)!=0){break}return}}while(0);j=Io(d,-1)|0;i=Io(d,1)|0;do{if((j|0)!=0){if((om(j)|0)!=0){break}return}}while(0);do{if((i|0)!=0){if((om(i)|0)!=0){break}return}}while(0);i=e+52|0;if((c[i>>2]|0)>0){j=0;do{dm(a,e+56+(j<<5)|0);j=j+1|0;}while((j|0)<(c[i>>2]|0))}i=a+80|0;j=c[i>>2]|0;e=j+1|0;d=e+g|0;b=d-3|0;if((g|0)>0){k=0;do{dm(a,180936+(k<<5)|0);k=k+1|0;}while((k|0)<(g|0))}g=c[f+52>>2]|0;if((g|0)>0){k=g;do{k=k-1|0;dm(a,f+56+(k<<5)|0);}while((k|0)>0)}k=d-2|0;if((k|0)>=(e|0)){d=a+84|0;f=j;do{j=c[d>>2]|0;g=j+(f<<5)|0;l=+h[g>>3];do{if((f-e&1|0)==0){m=j+(f<<5)+16|0;n=+h[m>>3];if(l<n){break}o=~~((l+n)*.5);h[g>>3]=+(o-8|0);h[m>>3]=+(o+8|0)}else{o=j+(f<<5)+16|0;n=+h[o>>3];if(l+16.0<=n){break}m=~~((l+n)*.5);h[g>>3]=+(m-8|0);h[o>>3]=+(m+8|0)}}while(0);f=f+1|0;}while((f|0)<(k|0))}if(((c[i>>2]|0)-1|0)<=0){return}k=a+84|0;a=0;while(1){f=c[k>>2]|0;d=f+(a<<5)|0;g=a+1|0;j=f+(g<<5)|0;do{if((a|0)<(e|0)|(a|0)>(b|0)){p=31}else{if((a-e&1|0)!=0){p=31;break}l=+h[d>>3]+16.0;m=f+(g<<5)+16|0;if(l>+h[m>>3]){h[m>>3]=l}l=+h[f+(a<<5)+16>>3]+-16.0;m=j|0;if(l>=+h[m>>3]){break}h[m>>3]=l}}while(0);do{if((p|0)==31){p=0;if(!((g|0)>=(e|0)&(a|0)<(b|0))){break}if((g-e&1|0)!=0){break}m=d|0;l=+h[f+(g<<5)+16>>3];if(+h[m>>3]+16.0>l){h[m>>3]=l+-16.0}m=f+(a<<5)+16|0;l=+h[j>>3];if(+h[m>>3]+-16.0>=l){break}h[m>>3]=l+16.0}}while(0);if((g|0)<((c[i>>2]|0)-1|0)){a=g}else{break}}return}function Go(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0,l=0.0,m=0,n=0,o=0,p=0.0,q=0,r=0;e=c[((c[b>>2]&3|0)==2?b:b-32|0)+28>>2]|0;b=e+8|0;if((a[(c[b>>2]|0)+156|0]|0)!=1){return}f=d+84|0;g=d+80|0;d=0;i=e;e=b;while(1){if((Ec[c[2963]&63](i)|0)<<24>>24!=0){j=14;break}b=c[g>>2]|0;a:do{if((d|0)<(b|0)){k=c[f>>2]|0;l=+h[(c[e>>2]|0)+24>>3];m=d;while(1){n=m+1|0;if(+h[k+(m<<5)+8>>3]<=l){o=m;break a}if((n|0)<(b|0)){m=n}else{o=n;break}}}else{o=d}}while(0);if((o|0)>=(b|0)){j=14;break}m=c[f>>2]|0;k=c[e>>2]|0;do{if(+h[m+(o<<5)+24>>3]>=+h[k+24>>3]){l=+h[m+(o<<5)>>3];n=~~l;p=+h[m+(o<<5)+16>>3];if((c[k+104>>2]|0)==0){q=~~((l+p)*.5);h[k+16>>3]=+(q|0);h[(c[e>>2]|0)+88>>3]=+(q-n|0);h[(c[e>>2]|0)+96>>3]=+(~~p-q|0);break}else{q=~~p;r=~~(p+ +h[k+96>>3]);h[k+16>>3]=+(q|0);h[(c[e>>2]|0)+88>>3]=+(q-n|0);h[(c[e>>2]|0)+96>>3]=+(r-q|0);break}}}while(0);k=c[c[(c[e>>2]|0)+180>>2]>>2]|0;m=c[((c[k>>2]&3|0)==2?k:k-32|0)+28>>2]|0;k=m+8|0;if((a[(c[k>>2]|0)+156|0]|0)==1){d=o;i=m;e=k}else{j=14;break}}if((j|0)==14){return}}function Ho(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;d=c[a>>2]&3;e=c[(c[(c[((d|0)==3?a:a+32|0)+28>>2]|0)+8>>2]|0)+180>>2]|0;f=c[e>>2]|0;if((f|0)==0){g=0;return g|0}h=a-32|0;i=0;j=0;k=f;while(1){f=c[(c[(c[((c[k>>2]&3|0)==2?k:k-32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0;do{if((da(f-(c[(c[(c[((d|0)==2?a:h)+28>>2]|0)+8>>2]|0)+236>>2]|0)|0,b)|0)<1){l=i}else{m=c[k+8>>2]|0;if((c[m+8>>2]|0)==0){n=c[m+116>>2]|0;if((n|0)==0){l=i;break}if((c[(c[n+8>>2]|0)+8>>2]|0)==0){l=i;break}}if((i|0)!=0){if((da((c[(c[(c[((c[i>>2]&3|0)==2?i:i-32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0)-f|0,b)|0)<=0){l=i;break}}l=k}}while(0);f=j+1|0;n=c[e+(f<<2)>>2]|0;if((n|0)==0){g=l;break}else{i=l;j=f;k=n}}return g|0}function Io(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;d=c[a>>2]&3;e=c[(c[(c[((d|0)==2?a:a-32|0)+28>>2]|0)+8>>2]|0)+172>>2]|0;f=c[e>>2]|0;if((f|0)==0){g=0;return g|0}h=a+32|0;i=0;j=0;k=f;while(1){f=c[(c[(c[((c[k>>2]&3|0)==3?k:k+32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0;do{if((da(f-(c[(c[(c[((d|0)==3?a:h)+28>>2]|0)+8>>2]|0)+236>>2]|0)|0,b)|0)<1){l=i}else{m=c[k+8>>2]|0;if((c[m+8>>2]|0)==0){n=c[m+116>>2]|0;if((n|0)==0){l=i;break}if((c[(c[n+8>>2]|0)+8>>2]|0)==0){l=i;break}}if((i|0)!=0){if((da((c[(c[(c[((c[i>>2]&3|0)==3?i:i+32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0)-f|0,b)|0)<=0){l=i;break}}l=k}}while(0);f=j+1|0;n=c[e+(f<<2)>>2]|0;if((n|0)==0){g=l;break}else{i=l;j=f;k=n}}return g|0}function Jo(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;g=b+8|0;h=c[(c[g>>2]|0)+232>>2]|0;i=c[(c[(Hx(b|0)|0)+8>>2]|0)+184>>2]|0;b=c[(c[g>>2]|0)+236>>2]|0;g=b+f|0;if((g|0)<=-1){j=0;return j|0}k=c[i+(h*44|0)>>2]|0;l=i+(h*44|0)+4|0;h=(e|0)==0;i=(d|0)==0;m=g;a:while(1){if((m|0)>=(k|0)){j=0;n=26;break}g=c[(c[l>>2]|0)+(m<<2)>>2]|0;o=c[g+8>>2]|0;p=a[o+156|0]|0;if((p<<24>>24|0)==0){j=g;n=26;break}else if((p<<24>>24|0)==1){if((c[o+104>>2]|0)!=0){j=g;n=26;break}}p=(c[o+236>>2]|0)>(b|0);q=o+180|0;if((c[q+4>>2]|0)!=1){j=g;n=26;break}b:do{if(h){n=17}else{r=c[c[q>>2]>>2]|0;s=e;t=0;while(1){u=c[((c[r>>2]&3|0)==2?r:r-32|0)+28>>2]|0;v=c[((c[s>>2]&3|0)==2?s:s-32|0)+28>>2]|0;if((u|0)==(v|0)){n=17;break b}w=c[u+8>>2]|0;u=c[v+8>>2]|0;if(p^(c[w+236>>2]|0)>(c[u+236>>2]|0)){break b}v=w+180|0;if((c[v+4>>2]|0)!=1){n=17;break b}if((a[w+156|0]|0)==0){n=17;break b}w=u+180|0;if((c[w+4>>2]|0)!=1){n=17;break b}if((a[u+156|0]|0)==0){n=17;break b}u=t+1|0;if((u|0)<2){r=c[c[v>>2]>>2]|0;s=c[c[w>>2]>>2]|0;t=u}else{n=17;break}}}}while(0);c:do{if((n|0)==17){n=0;q=o+172|0;if((c[q+4>>2]|0)!=1|i){j=g;n=26;break a}t=c[c[q>>2]>>2]|0;q=d;s=0;while(1){r=c[((c[t>>2]&3|0)==3?t:t+32|0)+28>>2]|0;u=c[((c[q>>2]&3|0)==3?q:q+32|0)+28>>2]|0;if((r|0)==(u|0)){j=g;n=26;break a}w=c[r+8>>2]|0;r=c[u+8>>2]|0;if(p^(c[w+236>>2]|0)>(c[r+236>>2]|0)){break c}u=w+172|0;if((c[u+4>>2]|0)!=1){j=g;n=26;break a}if((a[w+156|0]|0)==0){j=g;n=26;break a}w=r+172|0;if((c[w+4>>2]|0)!=1){j=g;n=26;break a}if((a[r+156|0]|0)==0){j=g;n=26;break a}r=s+1|0;if((r|0)<2){t=c[c[u>>2]>>2]|0;q=c[c[w>>2]>>2]|0;s=r}else{j=g;n=26;break a}}}}while(0);g=m+f|0;if((g|0)>-1){m=g}else{j=0;n=26;break}}if((n|0)==26){return j|0}return 0}function Ko(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0;if((a[b+156|0]|0)==0){e=c[b+212>>2]|0;f=e;g=e}else{e=c[(c[(c[c[b+180>>2]>>2]|0)+8>>2]|0)+116>>2]|0;b=e;i=c[e>>2]&3;f=c[(c[(c[((i|0)==2?b:e-32|0)+28>>2]|0)+8>>2]|0)+212>>2]|0;g=c[(c[(c[((i|0)==3?b:e+32|0)+28>>2]|0)+8>>2]|0)+212>>2]|0}e=d+8|0;b=c[e>>2]|0;if((a[b+156|0]|0)==0){i=c[b+212>>2]|0;if((i|0)==(Hx(d|0)|0)){j=0;k=(j|0)==0;l=(j|0)==(g|0);m=k|l;n=(j|0)==(f|0);o=m|n;p=o?0:j;return p|0}j=c[(c[e>>2]|0)+212>>2]|0;k=(j|0)==0;l=(j|0)==(g|0);m=k|l;n=(j|0)==(f|0);o=m|n;p=o?0:j;return p|0}p=c[(c[(c[c[b+180>>2]>>2]|0)+8>>2]|0)+116>>2]|0;b=p;j=p;o=p+32|0;n=c[((c[j>>2]&3|0)==3?b:o)+28>>2]|0;m=c[(c[n+8>>2]|0)+212>>2]|0;l=(m|0)==(Hx(n|0)|0);n=c[j>>2]|0;do{if(!l){m=c[(c[(c[((n&3|0)==3?b:o)+28>>2]|0)+8>>2]|0)+212>>2]|0;k=m;if((m|0)==0|(k|0)==(g|0)|(k|0)==(f|0)){break}d=c[m+8>>2]|0;m=c[e>>2]|0;q=+h[m+16>>3];if(+h[d+16>>3]>q){break}if(q>+h[d+32>>3]){break}q=+h[m+24>>3];if(+h[d+24>>3]>q){break}if(q>+h[d+40>>3]){break}else{r=k}return r|0}}while(0);o=p-32|0;p=c[((n&3|0)==2?b:o)+28>>2]|0;n=c[(c[p+8>>2]|0)+212>>2]|0;if((n|0)==(Hx(p|0)|0)){r=0;return r|0}p=c[(c[(c[((c[j>>2]&3|0)==2?b:o)+28>>2]|0)+8>>2]|0)+212>>2]|0;o=p;if((p|0)==0|(o|0)==(g|0)|(o|0)==(f|0)){r=0;return r|0}f=c[p+8>>2]|0;p=c[e>>2]|0;q=+h[p+16>>3];if(+h[f+16>>3]>q){r=0;return r|0}if(q>+h[f+32>>3]){r=0;return r|0}q=+h[p+24>>3];if(+h[f+24>>3]>q){r=0;return r|0}r=q>+h[f+40>>3]?0:o;return r|0}
-
-
-
-function ww(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;f=i;i=i+72|0;g=f|0;h=f+40|0;j=(c[e>>2]&3|0)==2?e:e-32|0;e=j|0;k=c[j>>2]&3;l=c[((k|0)==3?j:j+32|0)+28>>2]|0;m=c[((k|0)==2?j:j-32|0)+28>>2]|0;k=j;n=k|0;o=k+4|0;k=d[o]|d[o+1|0]<<8|d[o+2|0]<<16|d[o+3|0]<<24|0;o=h|0;if((l|0)==0|(m|0)==0){p=-1;i=f;return p|0}q=h;c[q>>2]=d[n]|d[n+1|0]<<8|d[n+2|0]<<16|d[n+3|0]<<24;c[q+4>>2]=k;c[h+28>>2]=l;do{if((c[m+12>>2]|0)==(b|0)){r=m+16|0}else{c[g+16>>2]=m;l=c[b+28>>2]|0;h=Hc[c[l>>2]&63](l,g,4)|0;if((h|0)==0){p=-1}else{r=h;break}i=f;return p|0}}while(0);g=b+36|0;m=r+20|0;ah(c[g>>2]|0,c[m>>2]|0)|0;r=c[g>>2]|0;h=Hc[c[r>>2]&63](r,o,4)|0;c[m>>2]=Yg(c[g>>2]|0)|0;if((h|0)==0){p=-1;i=f;return p|0}h=b|0;if((Ix(h)|0)==(b|0)){if((a[b+12|0]&64)!=0){dw(j)}Nx(b,j|0);ay(e);_w(b,2,c[j+4>>2]|0)}if((Ov(b,e,36,0,0)|0)!=0){p=-1;i=f;return p|0}if((Ix(h)|0)!=(b|0)){p=0;i=f;return p|0}tx(b,j|0);p=0;i=f;return p|0}function xw(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;f=i;i=i+72|0;g=f|0;h=f+40|0;j=b;k=zx(a,c[((c[j>>2]&3|0)==3?b:b+32|0)+28>>2]|0,e)|0;l=zx(a,c[((c[j>>2]&3|0)==2?b:b-32|0)+28>>2]|0,e)|0;if((k|0)==0|(l|0)==0){m=0;i=f;return m|0}n=b;o=n|0;p=n+4|0;n=d[p]|d[p+1|0]<<8|d[p+2|0]<<16|d[p+3|0]<<24|0;p=h|0;q=h;c[q>>2]=d[o]|d[o+1|0]<<8|d[o+2|0]<<16|d[o+3|0]<<24;c[q+4>>2]=n;c[h+28>>2]=k;if((c[l+12>>2]|0)==(a|0)){r=l+16|0;s=5}else{c[g+16>>2]=l;l=c[a+28>>2]|0;k=Hc[c[l>>2]&63](l,g,4)|0;if((k|0)==0){t=0}else{r=k;s=5}}if((s|0)==5){s=a+36|0;k=r+20|0;ah(c[s>>2]|0,c[k>>2]|0)|0;r=c[s>>2]|0;g=Hc[c[r>>2]&63](r,p,4)|0;c[k>>2]=Yg(c[s>>2]|0)|0;t=g}if((e|0)!=0&(t|0)==0){yw(a,b);u=b}else{u=t}if((u|0)==0){m=0;i=f;return m|0}t=c[u>>2]&3;if((t|0)==(c[j>>2]&3|0)){m=u;i=f;return m|0}m=(t|0)==3?u-32|0:u+32|0;i=f;return m|0}function yw(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;e=i;i=i+152|0;f=e|0;g=e+40|0;h=e+80|0;j=e+120|0;k=c[b>>2]&3;l=(k|0)==2?b:b-32|0;m=(k|0)==3?b:b+32|0;k=c[m+28>>2]|0;n=c[l+28>>2]|0;if((a|0)==0){i=e;return}o=b;b=j|0;p=g;q=k+12|0;r=k+16|0;s=l|0;l=f;t=n+12|0;u=n+16|0;v=m|0;m=f+16|0;f=g+16|0;g=j;w=j+28|0;j=h;x=h+16|0;if((k|0)==0|(n|0)==0){h=a;do{if((c[q>>2]|0)==(h|0)){y=r}else{c[f>>2]=k;z=c[h+28>>2]|0;y=Hc[c[z>>2]&63](z,p,4)|0}z=h+32|0;A=c[z>>2]|0;B=y+32|0;ah(A,c[B>>2]|0)|0;Hc[c[A>>2]&63](A,s,1)|0;c[B>>2]=Yg(A)|0;A=h+36|0;B=c[A>>2]|0;C=y+24|0;ah(B,c[C>>2]|0)|0;Hc[c[B>>2]&63](B,s,1)|0;c[C>>2]=Yg(B)|0;if((c[t>>2]|0)==(h|0)){D=u}else{c[m>>2]=n;B=c[h+28>>2]|0;D=Hc[c[B>>2]&63](B,l,4)|0}B=c[z>>2]|0;z=D+28|0;ah(B,c[z>>2]|0)|0;Hc[c[B>>2]&63](B,v,1)|0;c[z>>2]=Yg(B)|0;B=c[A>>2]|0;A=D+20|0;ah(B,c[A>>2]|0)|0;Hc[c[B>>2]&63](B,v,1)|0;c[A>>2]=Yg(B)|0;h=uy(h)|0;}while((h|0)!=0);i=e;return}else{E=a}while(1){a=o|0;h=o+4|0;D=d[h]|d[h+1|0]<<8|d[h+2|0]<<16|d[h+3|0]<<24|0;c[g>>2]=d[a]|d[a+1|0]<<8|d[a+2|0]<<16|d[a+3|0]<<24;c[g+4>>2]=D;c[w>>2]=k;if((c[t>>2]|0)==(E|0)){F=u;G=10}else{c[x>>2]=n;D=c[E+28>>2]|0;a=Hc[c[D>>2]&63](D,j,4)|0;if((a|0)!=0){F=a;G=10}}if((G|0)==10){G=0;a=E+36|0;D=F+20|0;ah(c[a>>2]|0,c[D>>2]|0)|0;h=c[a>>2]|0;y=Hc[c[h>>2]&63](h,b,4)|0;c[D>>2]=Yg(c[a>>2]|0)|0;if((y|0)!=0){G=16;break}}if((c[q>>2]|0)==(E|0)){H=r}else{c[f>>2]=k;y=c[E+28>>2]|0;H=Hc[c[y>>2]&63](y,p,4)|0}y=E+32|0;a=c[y>>2]|0;D=H+32|0;ah(a,c[D>>2]|0)|0;Hc[c[a>>2]&63](a,s,1)|0;c[D>>2]=Yg(a)|0;a=E+36|0;D=c[a>>2]|0;h=H+24|0;ah(D,c[h>>2]|0)|0;Hc[c[D>>2]&63](D,s,1)|0;c[h>>2]=Yg(D)|0;if((c[t>>2]|0)==(E|0)){I=u}else{c[m>>2]=n;D=c[E+28>>2]|0;I=Hc[c[D>>2]&63](D,l,4)|0}D=c[y>>2]|0;y=I+28|0;ah(D,c[y>>2]|0)|0;Hc[c[D>>2]&63](D,v,1)|0;c[y>>2]=Yg(D)|0;D=c[a>>2]|0;a=I+20|0;ah(D,c[a>>2]|0)|0;Hc[c[D>>2]&63](D,v,1)|0;c[a>>2]=Yg(D)|0;D=uy(E)|0;if((D|0)==0){G=16;break}else{E=D}}if((G|0)==16){i=e;return}}function zw(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;e=c[(c[b+28>>2]|0)+4>>2]|0;a=c[(c[d+28>>2]|0)+4>>2]|0;f=e-a|0;do{if((e|0)==(a|0)){if((c[b>>2]&3|0)==0){g=0;return g|0}if((c[d>>2]&3|0)==0){g=0;return g|0}else{h=(c[b+4>>2]|0)-(c[d+4>>2]|0)|0;break}}else{h=f}}while(0);if((h|0)==0){g=0;return g|0}g=h>>31|1;return g|0}function Aw(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0;e=c[b+28>>2]|0;a=c[d+28>>2]|0;if((e|0)==(a|0)){f=((c[b>>2]|0)>>>4)-((c[d>>2]|0)>>>4)|0}else{f=((c[e>>2]|0)>>>4)-((c[a>>2]|0)>>>4)|0}if((f|0)==0){g=0;return g|0}g=f>>31|1;return g|0}function Bw(){var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0;e=i;i=i+2224|0;f=e+1024|0;g=e+1424|0;c[53298]=0;c[53306]=-2;h=e|0;j=0;k=0;l=f;m=f;n=200;o=g;p=g;a:while(1){b[m>>1]=j;if((l+(n-1<<1)|0)>>>0>m>>>0){q=l;r=m;s=n;t=o;u=p}else{g=m-l>>1;v=g+1|0;if(n>>>0>9999>>>0){w=152;break}x=n<<1;y=x>>>0>1e4>>>0?1e4:x;x=dF(y*6|0|3)|0;if((x|0)==0){w=152;break}z=x;A=l;tF(x|0,A|0,v<<1)|0;B=x+((y>>>1&1073741823)<<2)|0;tF(B|0,p|0,v<<2)|0;if((l|0)!=(f|0)){eF(A)}if((y-1|0)>(g|0)){q=z;r=z+(g<<1)|0;s=y;t=B+(g<<2)|0;u=B}else{C=z;D=1;break}}if((j|0)==6){C=q;D=0;break}z=a[75496+j|0]|0;B=z<<24>>24;do{if(z<<24>>24==-18){w=22}else{g=c[53306]|0;if((g|0)==-2){y=jy()|0;c[53306]=y;E=y}else{E=g}do{if((E|0)<1){c[53306]=0;F=0}else{if(E>>>0>=269>>>0){F=2;break}F=d[74992+E|0]|0}}while(0);g=F+B|0;if(g>>>0>59>>>0){w=22;break}if((d[75696+g|0]|0)!=(F|0)){w=22;break}y=a[75264+g|0]|0;g=y<<24>>24;if(y<<24>>24<1){G=-g|0;w=23;break}else{c[53306]=-2;y=t+4|0;c[y>>2]=c[53300];H=g;I=(k|0)==0?0:k-1|0;J=r;K=y;break}}}while(0);do{if((w|0)==22){w=0;B=a[75616+j|0]|0;if(B<<24>>24!=0){G=B&255;w=23;break}B=c[53306]|0;do{if((k|0)==0){c[53298]=(c[53298]|0)+1;oy(148320);L=r;M=t;N=z}else if((k|0)==3){if((B|0)<1){if((B|0)==0){C=q;D=1;break a}else{L=r;M=t;N=z;break}}else{c[53306]=-2;L=r;M=t;N=z;break}}else{L=r;M=t;N=z}}while(0);while(1){if(N<<24>>24!=-18){B=(N<<24>>24)+1|0;if(N<<24>>24>-2&(B|0)<60&(B|0)==19){break}}if((L|0)==(q|0)){C=q;D=1;break a}B=L-2|0;L=B;M=M-4|0;N=a[75496+(b[B>>1]|0)|0]|0}B=M+4|0;c[B>>2]=c[53300];H=1;I=3;J=L;K=B}}while(0);b:do{if((w|0)==23){w=0;z=d[75328+G|0]|0;B=1-z|0;y=t+(B<<2)|0;g=c[y>>2]|0;c:do{switch(G|0){case 32:{A=c[t-16>>2]|0;v=c[t-8>>2]|0;x=c[t>>2]|0;do{if((x|0)==0){O=v}else{P=xF(v|0)|0;Q=P+2+(xF(x|0)|0)|0;if((Q|0)<1025){R=h}else{R=dF(Q)|0}nb(R|0,81472,(Q=i,i=i+16|0,c[Q>>2]=v,c[Q+8>>2]=x,Q)|0)|0;i=Q;Q=dy(c[53732]|0,R)|0;fy(c[53732]|0,v)|0;fy(c[53732]|0,x)|0;if((R|0)==(h|0)){O=Q;break}eF(R);O=Q}}while(0);x=Ax(c[c[53540]>>2]|0,A,1)|0;v=sx(c[53732]|0,16)|0;Q=v;c[v>>2]=259;c[v+4>>2]=x;c[v+8>>2]=O;v=c[53540]|0;x=v+12|0;P=c[x>>2]|0;if((P|0)!=0){c[P+12>>2]=Q}c[x>>2]=Q;x=v+8|0;if((c[x>>2]|0)==0){c[x>>2]=Q}fy(c[53732]|0,A)|0;S=g;break};case 12:{S=1;break};case 21:{if((c[t-4>>2]|0)==0){Q=c[53540]|0;x=c[Q+24>>2]|0;if((x|0)==0){T=Q}else{v=x;x=Q;while(1){Q=v+4|0;P=c[Q>>2]|0;U=Wv(c[x>>2]|0,1,P,0)|0;V=Q|0;c[V>>2]=U;if((U|0)==0){c[V>>2]=Wv(c[c[53540]>>2]|0,1,P,213328)|0}c[v>>2]=266;fy(c[53732]|0,P)|0;P=c[v+12>>2]|0;V=c[53540]|0;if((P|0)==0){T=V;break}else{v=P;x=V}}}x=c[T+8>>2]|0;if((x|0)==0){W=T;X=0}else{v=x;x=T;while(1){A=c[v+4>>2]|0;V=c[x+24>>2]|0;if((V|0)==0){Y=x}else{P=V;do{do{if((c[P>>2]|0)==266){V=c[P+4>>2]|0;if((V|0)==0){break}hw(A,V,c[P+8>>2]|0)|0}}while(0);P=c[P+12>>2]|0;}while((P|0)!=0);Y=c[53540]|0}P=c[v+12>>2]|0;if((P|0)==0){break}else{v=P;x=Y}}W=Y;X=c[Y+8>>2]|0}Gw(X);c[W+12>>2]=0;c[W+8>>2]=0;x=c[53540]|0;v=x+24|0;Gw(c[v>>2]|0);c[x+28>>2]=0;c[v>>2]=0;v=c[53540]|0;x=v+16|0;Gw(c[x>>2]|0);c[v+20>>2]=0;c[x>>2]=0;c[(c[53540]|0)+4>>2]=0;S=g;break c}Ew(2);x=c[53540]|0;v=c[x+24>>2]|0;if((v|0)==0){Z=0}else{P=a[172752]|0;A=0;V=v;while(1){do{if((c[V>>2]|0)==267){v=c[V+4>>2]|0;if((a[v]|0)!=P<<24>>24){_=A;break}if((Ya(v|0,172752)|0)!=0){_=A;break}_=c[V+8>>2]|0}else{_=A}}while(0);v=c[V+12>>2]|0;if((v|0)==0){Z=_;break}else{A=_;V=v}}}V=c[x+16>>2]|0;A=V+12|0;P=c[A>>2]|0;if((P|0)==0){$=x}else{v=V;V=A;A=P;do{P=v+4|0;do{if((c[v>>2]|0)==262){U=c[P>>2]|0;Q=ux(U)|0;if((Q|0)==0){break}else{aa=Q}do{Q=zx(c[c[53540]>>2]|0,aa,0)|0;Fw(Q,0,c[V>>2]|0,Z);aa=vx(U,aa)|0;}while((aa|0)!=0)}else{U=c[P>>2]|0;if((U|0)==0){break}Fw(c[U+4>>2]|0,c[U+8>>2]|0,A,Z);Q=c[U+12>>2]|0;if((Q|0)==0){break}else{ba=Q}do{Fw(c[ba+4>>2]|0,c[ba+8>>2]|0,c[V>>2]|0,Z);ba=c[ba+12>>2]|0;}while((ba|0)!=0)}}while(0);v=c[V>>2]|0;V=v+12|0;A=c[V>>2]|0;}while((A|0)!=0);$=c[53540]|0}A=$+8|0;Gw(c[A>>2]|0);c[$+12>>2]=0;c[A>>2]=0;A=c[53540]|0;V=A+16|0;Gw(c[V>>2]|0);c[A+20>>2]=0;c[V>>2]=0;V=c[53540]|0;A=V+24|0;Gw(c[A>>2]|0);c[V+28>>2]=0;c[A>>2]=0;c[(c[53540]|0)+4>>2]=0;S=g;break};case 34:{Cw(258,0);S=g;break};case 35:{S=258;break};case 36:{S=259;break};case 37:{S=260;break};case 38:{S=c[t-4>>2]|0;break};case 39:{S=0;break};case 48:{A=c[t-8>>2]|0;V=c[t>>2]|0;v=sx(c[53732]|0,16)|0;x=v;c[v>>2]=267;c[v+4>>2]=A;c[v+8>>2]=V;V=c[53540]|0;v=V+28|0;A=c[v>>2]|0;if((A|0)!=0){c[A+12>>2]=x}c[v>>2]=x;v=V+24|0;if((c[v>>2]|0)!=0){S=g;break c}c[v>>2]=x;S=g;break};case 2:{py();fx(c[53732]|0);S=g;break};case 25:{x=c[53540]|0;v=c[x+8>>2]|0;if((v|0)==0){V=c[x+4>>2]|0;if((V|0)==0){ca=0;da=x}else{x=sx(c[53732]|0,16)|0;c[x>>2]=262;c[x+4>>2]=V;c[x+8>>2]=0;ca=x;da=c[53540]|0}c[da+4>>2]=0;ea=ca}else{x=sx(c[53732]|0,16)|0;c[x>>2]=265;c[x+4>>2]=v;c[x+8>>2]=0;c[(c[53540]|0)+12>>2]=0;c[(c[53540]|0)+8>>2]=0;ea=x}if((ea|0)==0){S=g;break c}x=c[53540]|0;v=x+20|0;V=c[v>>2]|0;if((V|0)!=0){c[V+12>>2]=ea}c[v>>2]=ea;v=x+16|0;if((c[v>>2]|0)!=0){S=g;break c}c[v>>2]=ea;S=g;break};case 3:{v=c[53732]|0;if((v|0)==0){S=g;break c}Kw(v)|0;c[53854]=0;c[53732]=0;S=g;break};case 6:{v=c[t>>2]|0;x=c[53732]|0;if((x|0)==0){a[174920]=(c[t-8>>2]&255)<<1&2|c[t-4>>2]&1|a[174920]&-12|8;V=Hw(v,174920,c[53840]|0)|0;c[53732]=V;fa=V}else{fa=x}c[53854]=fa;x=c[53540]|0;V=sx(fa,36)|0;c[V+32>>2]=x;c[V>>2]=fa;c[53540]=V;fy(0,v)|0;S=g;break};case 55:{S=0;break};case 59:{S=c[t>>2]|0;break};case 60:{S=c[t>>2]|0;break};case 61:{S=c[t>>2]|0;break};case 62:{v=c[t-8>>2]|0;V=c[t>>2]|0;x=xF(v|0)|0;A=x+1+(xF(V|0)|0)|0;if((A|0)<1025){ga=h}else{ga=dF(A)|0}zF(ga|0,v|0)|0;AF(ga|0,V|0)|0;A=dy(c[53732]|0,ga)|0;fy(c[53732]|0,v)|0;fy(c[53732]|0,V)|0;if((ga|0)!=(h|0)){eF(ga)}S=A;break};case 8:{S=0;break};case 9:{S=1;break};case 7:{S=c[t>>2]|0;break};case 49:{A=c[t>>2]|0;V=sx(c[53732]|0,16)|0;v=V;c[V>>2]=267;c[V+4>>2]=A;c[V+8>>2]=0;V=c[53540]|0;A=V+28|0;x=c[A>>2]|0;if((x|0)!=0){c[x+12>>2]=v}c[A>>2]=v;A=V+24|0;if((c[A>>2]|0)!=0){S=g;break c}c[A>>2]=v;S=g;break};case 51:{v=c[t>>2]|0;A=c[53540]|0;V=ry(c[A>>2]|0,v,1)|0;x=sx(c[53732]|0,36)|0;c[x+32>>2]=A;c[x>>2]=V;c[53540]=x;fy(c[53732]|0,v)|0;S=g;break};case 52:{v=c[53540]|0;x=c[v>>2]|0;V=c[v+32>>2]|0;tx(c[53732]|0,v);c[53540]=V;c[V+4>>2]=x;S=g;break};case 53:{S=c[t>>2]|0;break};case 54:{S=0;break};case 26:{S=1;break};case 27:{S=0;break};case 30:{x=c[t>>2]|0;V=Ax(c[c[53540]>>2]|0,x,1)|0;v=sx(c[53732]|0,16)|0;A=v;c[v>>2]=259;c[v+4>>2]=V;c[v+8>>2]=0;v=c[53540]|0;V=v+12|0;P=c[V>>2]|0;if((P|0)!=0){c[P+12>>2]=A}c[V>>2]=A;V=v+8|0;if((c[V>>2]|0)==0){c[V>>2]=A}fy(c[53732]|0,x)|0;S=g;break};case 10:{S=0;break};case 11:{S=0;break};case 24:{x=c[53540]|0;A=c[x+8>>2]|0;if((A|0)==0){V=c[x+4>>2]|0;if((V|0)==0){ha=0;ia=x}else{x=sx(c[53732]|0,16)|0;c[x>>2]=262;c[x+4>>2]=V;c[x+8>>2]=0;ha=x;ia=c[53540]|0}c[ia+4>>2]=0;ja=ha}else{x=sx(c[53732]|0,16)|0;c[x>>2]=265;c[x+4>>2]=A;c[x+8>>2]=0;c[(c[53540]|0)+12>>2]=0;c[(c[53540]|0)+8>>2]=0;ja=x}if((ja|0)==0){S=g;break c}x=c[53540]|0;A=x+20|0;V=c[A>>2]|0;if((V|0)!=0){c[V+12>>2]=ja}c[A>>2]=ja;A=x+16|0;if((c[A>>2]|0)!=0){S=g;break c}c[A>>2]=ja;S=g;break};case 31:{A=c[t-8>>2]|0;x=c[t>>2]|0;V=Ax(c[c[53540]>>2]|0,A,1)|0;v=sx(c[53732]|0,16)|0;P=v;c[v>>2]=259;c[v+4>>2]=V;c[v+8>>2]=x;x=c[53540]|0;v=x+12|0;V=c[v>>2]|0;if((V|0)!=0){c[V+12>>2]=P}c[v>>2]=P;v=x+8|0;if((c[v>>2]|0)==0){c[v>>2]=P}fy(c[53732]|0,A)|0;S=g;break};case 33:{Cw(c[t-8>>2]|0,c[t-4>>2]|0);S=g;break};default:{S=g}}}while(0);g=r+(-z<<1)|0;A=t+(B<<2)|0;c[y>>2]=S;P=(d[75392+G|0]|0)-24|0;v=b[g>>1]|0;x=v+(a[75456+P|0]|0)|0;do{if(x>>>0<60>>>0){if((d[75696+x|0]|0)!=(v|0)){break}H=a[75264+x|0]|0;I=k;J=g;K=A;break b}}while(0);H=a[75576+P|0]|0;I=k;J=g;K=A}}while(0);j=H;k=I;l=q;m=J+2|0;n=s;o=K;p=u}if((w|0)==152){oy(116392);C=l;D=2}if((C|0)==(f|0)){i=e;return D|0}eF(C);i=e;return D|0}function Cw(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;e=i;if((d|0)!=0){Fv(0,167720,(f=i,i=i+1|0,i=i+7&-8,c[f>>2]=0,f)|0)|0;i=f}d=c[(c[53540]|0)+24>>2]|0;if((d|0)!=0){g=d;do{if((c[g+8>>2]|0)==0){Fv(0,167720,(f=i,i=i+1|0,i=i+7&-8,c[f>>2]=0,f)|0)|0;i=f}g=c[g+12>>2]|0;}while((g|0)!=0)}if((b|0)==260){h=2}else if((b|0)==258){h=0}else if((b|0)==259){h=1}else{h=0}Ew(h);b=c[53540]|0;g=c[b+24>>2]|0;if((g|0)==0){j=b;k=0;l=j+24|0;Gw(k);m=j+28|0;c[m>>2]=0;c[l>>2]=0;i=e;return}else{n=g}do{g=c[n+4>>2]|0;b=c[c[53540]>>2]|0;if((a[g+21|0]|0)!=0&(b|0)==(c[53732]|0)){o=g;p=14}else{f=Wv(b,h,c[g+8>>2]|0,c[n+8>>2]|0)|0;if((c[c[53540]>>2]|0)==(c[53732]|0)){o=f;p=14}}if((p|0)==14){p=0;a[o+22|0]=1}n=c[n+12>>2]|0;}while((n|0)!=0);n=c[53540]|0;j=n;k=c[n+24>>2]|0;l=j+24|0;Gw(k);m=j+28|0;c[m>>2]=0;c[l>>2]=0;i=e;return}function Dw(a,b){a=a|0;b=b|0;var d=0,e=0;c[53304]=a;c[53732]=0;c[53854]=0;d=(b|0)!=0?b:174304;c[53840]=d;iy(d,a);Bw()|0;a=c[53854]|0;if((a|0)!=0){e=a;return e|0}qy();e=c[53854]|0;return e|0}function Ew(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;d=c[(c[53540]|0)+24>>2]|0;if((d|0)==0){return}if((b|0)==2){e=d}else{f=d;do{d=f+4|0;g=c[d>>2]|0;h=Wv(c[c[53540]>>2]|0,b,g,0)|0;i=d|0;c[i>>2]=h;if((h|0)==0){c[i>>2]=Wv(c[c[53540]>>2]|0,b,g,213328)|0}c[f>>2]=266;fy(c[53732]|0,g)|0;f=c[f+12>>2]|0;}while((f|0)!=0);return}do{f=e+4|0;b=c[f>>2]|0;if((a[b]|0)==(a[172752]|0)){if((Ya(b|0,172752)|0)!=0){j=5}}else{j=5}if((j|0)==5){j=0;g=Wv(c[c[53540]>>2]|0,2,b,0)|0;i=f|0;c[i>>2]=g;if((g|0)==0){c[i>>2]=Wv(c[c[53540]>>2]|0,2,b,213328)|0}c[e>>2]=266;fy(c[53732]|0,b)|0}e=c[e+12>>2]|0;}while((e|0)!=0);return}function Fw(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;f=d+4|0;if((c[d>>2]|0)==262){d=c[f>>2]|0;g=ux(d)|0;if((g|0)==0){return}else{h=g}do{g=zx(c[c[53540]>>2]|0,h,0)|0;i=uw(c[c[53540]>>2]|0,a,g,e,1)|0;do{if((i|0)!=0){g=c[i>>2]&3;j=c[((g|0)==2?i:i-32|0)+28>>2]|0;k=(c[((g|0)==3?i:i+32|0)+28>>2]|0)!=(j|0)&(j|0)==(a|0);j=k?b:0;g=k?0:b;if((g|0)!=0){k=Wv(c[c[53540]>>2]|0,2,97656,0)|0;if((k|0)==0){l=Wv(c[c[53540]>>2]|0,2,97656,213328)|0}else{l=k}hw(i|0,l,g)|0}if((j|0)==0){m=i|0}else{g=Wv(c[c[53540]>>2]|0,2,91384,0)|0;if((g|0)==0){n=Wv(c[c[53540]>>2]|0,2,91384,213328)|0}else{n=g}g=i|0;hw(g,n,j)|0;m=g}g=c[(c[53540]|0)+24>>2]|0;if((g|0)==0){break}else{o=g}do{do{if((c[o>>2]|0)==266){g=c[o+4>>2]|0;if((g|0)==0){break}hw(m,g,c[o+8>>2]|0)|0}}while(0);o=c[o+12>>2]|0;}while((o|0)!=0)}}while(0);h=vx(d,h)|0;}while((h|0)!=0);return}else{h=c[f>>2]|0;if((h|0)==0){return}else{p=h}do{h=zx(c[c[53540]>>2]|0,c[p+4>>2]|0,0)|0;f=c[p+8>>2]|0;d=uw(c[c[53540]>>2]|0,a,h,e,1)|0;do{if((d|0)!=0){h=c[d>>2]&3;o=c[((h|0)==2?d:d-32|0)+28>>2]|0;m=(c[((h|0)==3?d:d+32|0)+28>>2]|0)!=(o|0)&(o|0)==(a|0);o=m?b:f;h=m?f:b;if((h|0)!=0){m=Wv(c[c[53540]>>2]|0,2,97656,0)|0;if((m|0)==0){q=Wv(c[c[53540]>>2]|0,2,97656,213328)|0}else{q=m}hw(d|0,q,h)|0}if((o|0)==0){r=d|0}else{h=Wv(c[c[53540]>>2]|0,2,91384,0)|0;if((h|0)==0){s=Wv(c[c[53540]>>2]|0,2,91384,213328)|0}else{s=h}h=d|0;hw(h,s,o)|0;r=h}h=c[(c[53540]|0)+24>>2]|0;if((h|0)==0){break}else{t=h}do{do{if((c[t>>2]|0)==266){h=c[t+4>>2]|0;if((h|0)==0){break}hw(r,h,c[t+8>>2]|0)|0}}while(0);t=c[t+12>>2]|0;}while((t|0)!=0)}}while(0);p=c[p+12>>2]|0;}while((p|0)!=0);return}}function Gw(a){a=a|0;var b=0,d=0;if((a|0)==0){return}else{b=a}while(1){a=c[b+12>>2]|0;d=c[b>>2]|0;if((d|0)==267|(d|0)==266){fy(c[53732]|0,c[b+8>>2]|0)|0}else if((d|0)==265){Gw(c[b+4>>2]|0)}tx(c[53732]|0,b);if((a|0)==0){break}else{b=a}}return}function Hw(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;f=i;i=i+8|0;g=d;d=i;i=i+4|0;i=i+7&-8;c[d>>2]=c[g>>2];g=f|0;h=(e|0)!=0;if(h){j=c[e>>2]|0;k=(j|0)==0?174232:j}else{k=174232}j=Ec[c[k>>2]&63](e)|0;l=k+4|0;m=Oc[c[l>>2]&255](j,68)|0;c[m>>2]=k;c[m+12>>2]=j;if(h){h=c[e+4>>2]|0;c[m+4>>2]=(h|0)==0?174272:h;h=c[e+8>>2]|0;n=(h|0)==0?174256:h}else{c[m+4>>2]=174272;n=174256}c[m+8>>2]=n;a[m+40|0]=1;n=Oc[c[l>>2]&255](j,56)|0;j=n;l=n;c[l>>2]=c[l>>2]&-4;l=n+52|0;c[l>>2]=m;h=n+12|0;k=c[d>>2]|0;c[h>>2]=k;a[h]=k&255|8;c[n+48>>2]=j;k=Oc[c[c[m+4>>2]>>2]&255](j,e)|0;c[(c[l>>2]|0)+16>>2]=k;if((Yw(j,0,b,g,1)|0)==0){o=Iw(j)|0;p=o|0;ax(o,0,p);i=f;return o|0}c[n+4>>2]=c[g>>2];o=Iw(j)|0;p=o|0;ax(o,0,p);i=f;return o|0}function Iw(b){b=b|0;var d=0,e=0,f=0,g=0;c[b+24>>2]=yy(b,173952,c[43326]|0)|0;c[b+28>>2]=yy(b,173992,c[43326]|0)|0;d=b|0;e=(Ix(d)|0)==(b|0);c[b+32>>2]=yy(b,e?174152:174072,c[43326]|0)|0;e=(Ix(d)|0)==(b|0);c[b+36>>2]=yy(b,e?174192:174112,c[43326]|0)|0;c[b+40>>2]=yy(b,174032,c[43326]|0)|0;e=uy(b)|0;do{if((e|0)!=0){f=(c[e+52>>2]|0)+24|0;g=(c[f>>2]|0)+1|0;c[f>>2]=g;f=b;c[f>>2]=c[f>>2]&15|g<<4;g=c[e+40>>2]|0;Hc[c[g>>2]&63](g,d,1)|0;if((a[e+12|0]&64)!=0){break}Jx(b,d);return b|0}}while(0);Yv(b);Jx(b,d);return b|0}function Jw(a,b){a=a|0;b=b|0;var d=0;d=(c[a+52>>2]|0)+24+(b<<2)|0;b=(c[d>>2]|0)+1|0;c[d>>2]=b;return b|0}function Kw(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0;d=uy(b)|0;e=(d|0)==0;do{if(e){f=b+52|0;if((c[(c[c[f>>2]>>2]|0)+16>>2]|0)==0){break}Nx(b,b|0);_w(b,0,c[b+4>>2]|0);g=c[f>>2]|0;Cc[c[(c[g>>2]|0)+16>>2]&255](c[g+12>>2]|0);h=0;return h|0}}while(0);g=sy(b)|0;if((g|0)!=0){f=g;while(1){g=ty(f)|0;Kw(f)|0;if((g|0)==0){break}else{f=g}}}f=ux(b)|0;if((f|0)!=0){g=f;while(1){f=vx(b,g)|0;Cx(b,g)|0;if((f|0)==0){break}else{g=f}}}gx(b);g=b|0;Nx(b,g);if((Ay(b,c[b+28>>2]|0)|0)!=0){h=-1;return h|0}if((Ay(b,c[b+24>>2]|0)|0)!=0){h=-1;return h|0}if((Ay(b,c[b+36>>2]|0)|0)!=0){h=-1;return h|0}if((Ay(b,c[b+32>>2]|0)|0)!=0){h=-1;return h|0}if((Ay(b,c[b+40>>2]|0)|0)!=0){h=-1;return h|0}do{if((a[b+12|0]&64)!=0){if((_v(b)|0)==0){break}else{h=-1}return h|0}}while(0);ay(b|0);_w(b,0,c[b+4>>2]|0);if(!e){vy(d,b)|0;tx(d,g);h=0;return h|0}d=b+52|0;e=c[d>>2]|0;f=c[e+36>>2]|0;if((f|0)==0){i=e}else{e=f;while(1){Qx(b,c[e>>2]|0)|0;f=c[d>>2]|0;j=c[f+36>>2]|0;if((j|0)==0){i=f;break}else{e=j}}}Cc[c[(c[i+4>>2]|0)+20>>2]&255](c[i+16>>2]|0);if((by(b)|0)!=0){h=-1;return h|0}b=c[d>>2]|0;d=c[b+12>>2]|0;i=(c[b>>2]|0)+12|0;Dc[c[i>>2]&63](d,g);Dc[c[i>>2]&63](d,b);h=0;return h|0}function Lw(a){a=a|0;return bh(c[a+28>>2]|0)|0}function Mw(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0;b=ux(a)|0;if((b|0)==0){d=0;return d|0}e=a+32|0;f=b;b=0;while(1){g=nw(a,f)|0;if((g|0)==0){h=0}else{i=c[e>>2]|0;j=g+32|0;ah(i,c[j>>2]|0)|0;g=bh(i)|0;c[j>>2]=Yg(i)|0;h=g}g=h+b|0;i=vx(a,f)|0;if((i|0)==0){d=g;break}else{f=i;b=g}}return d|0}function Nw(b){b=b|0;return a[b+12|0]&1|0}function Ow(b){b=b|0;return(a[b+12|0]&1^1)&255|0}function Pw(a){a=a|0;return(d[a+12|0]|0)>>>1&1|0}function Qw(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0;e=c[b+4>>2]|0;b=c[d+4>>2]|0;if((e|0)==(b|0)){f=0;return f|0}f=e-b>>31|1;return f|0}function Rw(a,b){a=a|0;b=b|0;return a|0}function Sw(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0;if((d|0)==0){c[e>>2]=c[5410];c[5410]=(c[5410]|0)+2;return 1}b=a;if((f|0)==0){g=cy(b,d)|0}else{g=dy(b,d)|0}c[e>>2]=g;return 1}function Tw(a,b,c){a=a|0;b=b|0;c=c|0;return 0}function Uw(a,b,c){a=a|0;b=b|0;c=c|0;if((c&1|0)!=0){return}fy(a,c)|0;return}function Vw(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;if((c&1|0)==0){d=c}else{d=0}return d|0}function Ww(a){a=a|0;return}function Xw(a,b,c){a=a|0;b=b|0;c=c|0;return}function Yw(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0;h=(e|0)!=0;do{if(h){do{if((a[e]|0)!=37){i=c[b+52>>2]|0;j=Gc[c[(c[i+4>>2]|0)+4>>2]&127](c[i+16>>2]|0,d,e,f,g)|0;if((j|0)==0){break}else{k=j}return k|0}}while(0);j=bx(b,d,e,f)|0;if((j|0)==0){break}else{k=j}return k|0}}while(0);if((g|0)==0){k=0;return k|0}j=c[b+52>>2]|0;i=Gc[c[(c[j+4>>2]|0)+4>>2]&127](c[j+16>>2]|0,d,0,f,g)|0;if((i|0)==0|h^1){k=i;return k|0}cx(b,d,e,c[f>>2]|0);k=i;return k|0}function Zw(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=c[a+52>>2]|0;return Hc[c[(c[e+4>>2]|0)+8>>2]&63](c[e+16>>2]|0,b,d)|0}function _w(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;ex(a,b,d)|0;e=c[a+52>>2]|0;Tc[c[(c[e+4>>2]|0)+12>>2]&127](c[e+16>>2]|0,b,d);return}function $w(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=i;d=Hx(a)|0;e=a;f=a+4|0;a=dx(d,c[e>>2]&3,c[f>>2]|0)|0;if((a|0)!=0){g=a;i=b;return g|0}a=c[d+52>>2]|0;d=c[(c[a+4>>2]|0)+16>>2]|0;do{if((d|0)!=0){h=Hc[d&63](c[a+16>>2]|0,c[e>>2]&3,c[f>>2]|0)|0;if((h|0)==0){break}else{g=h}i=b;return g|0}}while(0);if((c[e>>2]&3|0)==2){g=0;i=b;return g|0}e=c[f>>2]|0;nb(212968,113184,(f=i,i=i+16|0,c[f>>2]=37,c[f+8>>2]=e,f)|0)|0;i=f;g=212968;i=b;return g|0}function ax(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=c[a+52>>2]|0;Tc[c[(c[e+4>>2]|0)+24>>2]&127](c[e+16>>2]|0,b,d);return}function bx(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0;f=i;i=i+24|0;g=f|0;h=c[(c[a+52>>2]|0)+44+(((b|0)==3?2:b)<<2)>>2]|0;if((h|0)==0){j=0;i=f;return j|0}b=cy(a,d)|0;if((b|0)==0){j=0;i=f;return j|0}c[g+20>>2]=b;b=Hc[c[h>>2]&63](h,g,4)|0;if((b|0)==0){j=0;i=f;return j|0}c[e>>2]=c[b+16>>2];j=1;i=f;return j|0}function cx(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0;f=sx(a,24)|0;c[f+16>>2]=e;c[f+20>>2]=dy(a,d)|0;d=(b|0)==3?2:b;b=a+52|0;e=c[b>>2]|0;g=c[e+44+(d<<2)>>2]|0;if((g|0)==0){h=yy(a,172656,c[43326]|0)|0;c[(c[b>>2]|0)+44+(d<<2)>>2]=h;i=h;j=c[b>>2]|0}else{i=g;j=e}e=c[j+56+(d<<2)>>2]|0;if((e|0)==0){j=yy(a,172696,c[43326]|0)|0;c[(c[b>>2]|0)+56+(d<<2)>>2]=j;k=j}else{k=e}Hc[c[i>>2]&63](i,f,1)|0;Hc[c[k>>2]&63](k,f,1)|0;return}function dx(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=i;i=i+24|0;f=e|0;g=c[(c[a+52>>2]|0)+56+(((b|0)==3?2:b)<<2)>>2]|0;if((g|0)==0){h=0;i=e;return h|0}c[f+16>>2]=d;d=Hc[c[g>>2]&63](g,f,4)|0;if((d|0)==0){h=0;i=e;return h|0}h=c[d+20>>2]|0;i=e;return h|0}function ex(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0;e=i;i=i+24|0;f=e|0;g=(b|0)==3?2:b;b=a+52|0;h=c[(c[b>>2]|0)+56+(g<<2)>>2]|0;if((h|0)==0){j=0;i=e;return j|0}c[f+16>>2]=d;d=Hc[c[h>>2]&63](h,f,4)|0;if((d|0)==0){j=0;i=e;return j|0}f=c[(c[b>>2]|0)+44+(g<<2)>>2]|0;Hc[c[f>>2]&63](f,d,2)|0;f=c[(c[b>>2]|0)+56+(g<<2)>>2]|0;Hc[c[f>>2]&63](f,d,2)|0;fy(a,c[d+20>>2]|0)|0;tx(a,d);j=1;i=e;return j|0}function fx(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;d=i;i=i+24|0;e=d|0;c[53854]=b;f=b+52|0;g=c[f>>2]|0;h=e;j=e+16|0;e=0;do{k=g+44+(e<<2)|0;l=c[k>>2]|0;do{if((l|0)!=0){m=Hc[c[l>>2]&63](l,0,128)|0;if((m|0)==0){break}else{n=m}while(1){m=c[k>>2]|0;o=Hc[c[m>>2]&63](m,n,8)|0;do{if((a[c[n+20>>2]|0]|0)==37){m=c[(c[f>>2]|0)+56+(e<<2)>>2]|0;if((m|0)==0){break}c[j>>2]=c[n+16>>2];p=Hc[c[m>>2]&63](m,h,4)|0;if((p|0)==0){break}m=c[(c[f>>2]|0)+44+(e<<2)>>2]|0;Hc[c[m>>2]&63](m,p,2)|0;m=c[(c[f>>2]|0)+56+(e<<2)>>2]|0;Hc[c[m>>2]&63](m,p,2)|0;fy(b,c[p+20>>2]|0)|0;tx(b,p)}}while(0);if((o|0)==0){break}else{n=o}}}}while(0);e=e+1|0;}while((e|0)<3);i=d;return}function gx(a){a=a|0;var b=0,d=0,e=0;c[53854]=a;b=a+52|0;a=c[b>>2]|0;d=a+44|0;e=c[d>>2]|0;if((e|0)!=0){Vg(e)|0;c[d>>2]=0}d=a+48|0;e=c[d>>2]|0;if((e|0)!=0){Vg(e)|0;c[d>>2]=0}d=a+52|0;a=c[d>>2]|0;if((a|0)!=0){Vg(a)|0;c[d>>2]=0}d=c[b>>2]|0;b=d+56|0;a=c[b>>2]|0;if((a|0)!=0){Vg(a)|0;c[b>>2]=0}b=d+60|0;a=c[b>>2]|0;if((a|0)!=0){Vg(a)|0;c[b>>2]=0}b=d+64|0;d=c[b>>2]|0;if((d|0)==0){return}Vg(d)|0;c[b>>2]=0;return}function hx(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;return(c[b+16>>2]|0)-(c[d+16>>2]|0)|0}function ix(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;return(c[b+20>>2]|0)-(c[d+20>>2]|0)|0}function jx(a,b,c){a=a|0;b=b|0;c=c|0;var d=0;if((db(b|0,c|0,a|0)|0)==0){d=0;return d|0}d=xF(b|0)|0;return d|0}function kx(a,b){a=a|0;b=b|0;return Oa(b|0,a|0)|0}function lx(a){a=a|0;return Ia(a|0)|0}function mx(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+32|0;d=b|0;e=b+16|0;c[4961]=c[43565];c[4962]=c[43566];c[d>>2]=a;c[d+4>>2]=xF(a|0)|0;c[d+8>>2]=0;c[e>>2]=174232;c[e+4>>2]=174272;c[e+8>>2]=19840;a=Dw(d,e)|0;i=b;return a|0}function nx(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0;if((e|0)==0){f=0;return f|0}g=b+8|0;h=c[g>>2]|0;if((h|0)>=(c[b+4>>2]|0)){f=0;return f|0}i=c[b>>2]|0;b=0;j=a[i+h|0]|0;k=d;d=i+(h+1)|0;while(1){a[k]=j;l=b+1|0;if(!(j<<24>>24!=10&(l|0)<(e|0))){break}h=a[d]|0;if(h<<24>>24==0){break}else{b=l;j=h;k=k+1|0;d=d+1|0}}c[g>>2]=(c[g>>2]|0)+l;f=l;return f|0}function ox(a){a=a|0;return 0}function px(a,b){a=a|0;b=b|0;a=dF(b)|0;vF(a|0,0,b|0)|0;return a|0}function qx(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;a=gF(b,d)|0;if(d>>>0<=c>>>0){return a|0}vF(a+c|0,0,d-c|0)|0;return a|0}function rx(a,b){a=a|0;b=b|0;eF(b);return}function sx(a,b){a=a|0;b=b|0;var d=0,e=0;d=i;e=c[a+52>>2]|0;a=Oc[c[(c[e>>2]|0)+4>>2]&255](c[e+12>>2]|0,b)|0;if((a|0)!=0){i=d;return a|0}Fv(1,98640,(b=i,i=i+1|0,i=i+7&-8,c[b>>2]=0,b)|0)|0;i=b;i=d;return a|0}function tx(a,b){a=a|0;b=b|0;var d=0;if((b|0)==0){return}d=c[a+52>>2]|0;Dc[c[(c[d>>2]|0)+12>>2]&63](c[d+12>>2]|0,b);return}function ux(a){a=a|0;var b=0,d=0;b=c[a+24>>2]|0;a=Hc[c[b>>2]&63](b,0,128)|0;if((a|0)==0){d=0;return d|0}d=c[a+16>>2]|0;return d|0}function vx(a,b){a=a|0;b=b|0;var d=0,e=0;d=nw(a,b)|0;if((d|0)==0){e=0;return e|0}b=c[a+24>>2]|0;a=Hc[c[b>>2]&63](b,d,8)|0;if((a|0)==0){e=0;return e|0}e=c[a+16>>2]|0;return e|0}function wx(a){a=a|0;var b=0,d=0;b=c[a+24>>2]|0;a=Hc[c[b>>2]&63](b,0,256)|0;if((a|0)==0){d=0;return d|0}d=c[a+16>>2]|0;return d|0}function xx(a,b){a=a|0;b=b|0;var d=0,e=0;d=nw(a,b)|0;if((d|0)==0){e=0;return e|0}b=c[a+24>>2]|0;a=Hc[c[b>>2]&63](b,d,16)|0;if((a|0)==0){e=0;return e|0}e=c[a+16>>2]|0;return e|0}function yx(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0;c[53265]=d;c[53258]=213056;f=c[b+28>>2]|0;g=Hc[c[f>>2]&63](f,213016,4)|0;if((g|0)==0){h=0}else{h=c[g+16>>2]|0}if((h|0)!=0|(e|0)==0){i=h;return i|0}h=b|0;e=Ix(h)|0;do{if((e|0)!=(b|0)){c[53265]=d;c[53258]=213056;g=c[e+28>>2]|0;f=Hc[c[g>>2]&63](g,213016,4)|0;if((f|0)==0){break}g=c[f+16>>2]|0;if((g|0)==0){break}zx(b,g,1)|0;i=g;return i|0}}while(0);if((Zw(b,1,d)|0)==0){i=0;return i|0}e=Jw(b,1)|0;g=sx(b,52)|0;f=g;j=g;k=c[j>>2]|0;c[g+4>>2]=d;c[j>>2]=e<<4|k&12|1;c[g+12>>2]=Ix(h)|0;if((a[(Ix(h)|0)+12|0]&64)!=0){Wx(g,c[43580]|0,16,0)|0}k=g+16|0;e=b;do{j=e+28|0;bh(c[j>>2]|0)|0;if((Ix(e|0)|0)==(e|0)){l=k}else{l=sx(e,36)|0}c[l+16>>2]=f;d=c[j>>2]|0;Hc[c[d>>2]&63](d,l,1)|0;d=c[e+24>>2]|0;Hc[c[d>>2]&63](d,l,1)|0;e=uy(e)|0;}while((e|0)!=0);if((a[(Ix(h)|0)+12|0]&64)!=0){aw(b,f)}Jx(b,g);i=f;return i|0}function zx(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0;e=a|0;f=Ix(e)|0;if((f|0)!=(c[b+12>>2]|0)){g=0;return g|0}c[53265]=c[b+4>>2];c[53258]=213056;f=a+28|0;h=c[f>>2]|0;i=Hc[c[h>>2]&63](h,213016,4)|0;if((i|0)==0){j=0}else{j=c[i+16>>2]|0}if((j|0)!=0|(d|0)==0){g=j;return g|0}j=uy(a)|0;if((j|0)==0){g=0;return g|0}i=zx(j,b,d)|0;bh(c[f>>2]|0)|0;if((Ix(e)|0)==(a|0)){k=i+16|0}else{k=sx(a,36)|0}c[k+16>>2]=i;e=c[f>>2]|0;f=k;Hc[c[e>>2]&63](e,f,1)|0;e=c[a+24>>2]|0;Hc[c[e>>2]&63](e,f,1)|0;g=i;return g|0}function Ax(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;f=i;i=i+8|0;g=f|0;h=b|0;j=Ix(h)|0;do{if((Yw(b,1,d,g,0)|0)!=0){c[53265]=c[g>>2];c[53258]=213056;k=c[b+28>>2]|0;l=Hc[c[k>>2]&63](k,213016,4)|0;do{if((l|0)!=0){k=c[l+16>>2]|0;if((k|0)==0){break}else{m=k}i=f;return m|0}}while(0);if((e|0)==0|(j|0)==(b|0)){break}c[53265]=c[g>>2];c[53258]=213056;l=c[j+28>>2]|0;k=Hc[c[l>>2]&63](l,213016,4)|0;if((k|0)==0){break}l=c[k+16>>2]|0;if((l|0)==0){break}m=zx(b,l,1)|0;i=f;return m|0}}while(0);if((e|0)==0){m=0;i=f;return m|0}if((Yw(b,1,d,g,1)|0)==0){m=0;i=f;return m|0}d=c[g>>2]|0;g=Jw(b,1)|0;e=sx(b,52)|0;j=e;l=e;k=c[l>>2]|0;c[e+4>>2]=d;c[l>>2]=g<<4|k&12|1;c[e+12>>2]=Ix(h)|0;if((a[(Ix(h)|0)+12|0]&64)!=0){Wx(e,c[43580]|0,16,0)|0}k=e+16|0;g=b;do{l=g+28|0;bh(c[l>>2]|0)|0;if((Ix(g|0)|0)==(g|0)){n=k}else{n=sx(g,36)|0}c[n+16>>2]=j;d=c[l>>2]|0;Hc[c[d>>2]&63](d,n,1)|0;d=c[g+24>>2]|0;Hc[c[d>>2]&63](d,n,1)|0;g=uy(g)|0;}while((g|0)!=0);if((a[(Ix(h)|0)+12|0]&64)!=0){aw(b,j)}Jx(b,e);ax(b,1,e);m=j;i=f;return m|0}function Bx(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;c[53288]=b;d=rw(a,b)|0;if((d|0)!=0){e=d;while(1){d=sw(a,e,b)|0;vw(a,e,0);if((d|0)==0){break}else{e=d}}}e=c[a+28>>2]|0;Hc[c[e>>2]&63](e,213136,2)|0;e=c[a+24>>2]|0;Hc[c[e>>2]&63](e,213136,2)|0;return}function Cx(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;e=d|0;f=d+4|0;c[53265]=c[f>>2];c[53258]=213056;g=c[b+28>>2]|0;h=Hc[c[g>>2]&63](g,213016,4)|0;if((h|0)==0){i=-1;return i|0}if((c[h+16>>2]|0)==0){i=-1;return i|0}h=b|0;if((Ix(h)|0)==(b|0)){g=rw(b,d)|0;if((g|0)!=0){j=g;while(1){g=sw(b,j,d)|0;ww(b,j)|0;if((g|0)==0){break}else{j=g}}}if((a[b+12|0]&64)!=0){bw(d)}Nx(b,d|0);ay(e);_w(b,1,c[f>>2]|0)}if((Ov(b,e,10,0,0)|0)!=0){i=-1;return i|0}if((Ix(h)|0)!=(b|0)){i=0;return i|0}tx(b,d|0);i=0;return i|0}function Dx(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0;e=c[(c[b+16>>2]|0)+4>>2]|0;b=c[(c[d+16>>2]|0)+4>>2]|0;if((e|0)==(b|0)){f=0;return f|0}f=e-b>>31|1;return f|0}function Ex(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0;e=(c[c[b+16>>2]>>2]|0)>>>4;b=(c[c[d+16>>2]>>2]|0)>>>4;if((e|0)==(b|0)){f=0;return f|0}f=e-b>>31|1;return f|0}function Fx(a,b,d){a=a|0;b=b|0;d=d|0;d=c[b+16>>2]|0;if((d+16|0)==(b|0)){return}tx(c[d+12>>2]|0,b);return}function Gx(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0;d=i;e=b;f=c[e>>2]|0;do{if((f&3|0)==0){if((uy(b)|0)==(a|0)){g=c[e>>2]|0;h=5;break}else{Fv(1,87664,(j=i,i=i+1|0,i=i+7&-8,c[j>>2]=0,j)|0)|0;i=j;k=-1;break}}else{g=f;h=5}}while(0);do{if((h|0)==5){f=g&3;if((f|0)==3|(f|0)==2){k=ww(a,b)|0;break}else if((f|0)==1){k=Cx(a,b)|0;break}else if((f|0)==0){k=Kw(b)|0;break}else{Fv(1,139728,(j=i,i=i+1|0,i=i+7&-8,c[j>>2]=0,j)|0)|0;i=j;k=0;break}}}while(0);i=d;return k|0}function Hx(a){a=a|0;var b=0,d=0,e=0;b=i;d=c[a>>2]&3;if((d|0)==1){e=c[a+12>>2]|0}else if((d|0)==3|(d|0)==2){e=c[(c[a+28>>2]|0)+12>>2]|0}else if((d|0)==0){e=a}else{Fv(1,111488,(a=i,i=i+1|0,i=i+7&-8,c[a>>2]=0,a)|0)|0;i=a;e=0}i=b;return e|0}function Ix(a){a=a|0;var b=0,d=0,e=0;b=i;d=c[a>>2]&3;if((d|0)==1){e=c[a+12>>2]|0}else if((d|0)==3|(d|0)==2){e=c[(c[a+28>>2]|0)+12>>2]|0}else if((d|0)==0){e=c[a+48>>2]|0}else{Fv(1,119456,(a=i,i=i+1|0,i=i+7&-8,c[a>>2]=0,a)|0)|0;i=a;e=0}i=b;return e|0}function Jx(b,d){b=b|0;d=d|0;var e=0;e=c[b+52>>2]|0;if((a[e+40|0]|0)==0){Tx(b,d,100,0);return}else{Kx(b,d,c[e+36>>2]|0);return}}function Kx(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;if((d|0)==0){return}Kx(a,b,c[d+8>>2]|0);e=b;f=c[b>>2]&3;if((f|0)==0){g=c[d>>2]|0}else if((f|0)==1){g=(c[d>>2]|0)+12|0}else if((f|0)==2){g=(c[d>>2]|0)+24|0}else{return}f=c[g>>2]|0;if((f|0)==0){return}Tc[f&127](a,e,c[d+4>>2]|0);return}function Lx(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;f=c[b+52>>2]|0;if((a[f+40|0]|0)==0){Tx(b,d,101,e);return}else{Mx(b,d,e,c[f+36>>2]|0);return}}function Mx(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;if((e|0)==0){return}Mx(a,b,d,c[e+8>>2]|0);f=b;g=c[b>>2]&3;if((g|0)==2){h=(c[e>>2]|0)+28|0}else if((g|0)==0){h=(c[e>>2]|0)+4|0}else if((g|0)==1){h=(c[e>>2]|0)+16|0}else{return}g=c[h>>2]|0;if((g|0)==0){return}Vc[g&63](a,f,c[e+4>>2]|0,d);return}function Nx(b,d){b=b|0;d=d|0;var e=0;e=c[b+52>>2]|0;if((a[e+40|0]|0)==0){Tx(b,d,102,0);return}else{Ox(b,d,c[e+36>>2]|0);return}}function Ox(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;if((d|0)==0){return}Ox(a,b,c[d+8>>2]|0);e=b;f=c[b>>2]&3;if((f|0)==2){g=(c[d>>2]|0)+32|0}else if((f|0)==0){g=(c[d>>2]|0)+8|0}else if((f|0)==1){g=(c[d>>2]|0)+20|0}else{return}f=c[g>>2]|0;if((f|0)==0){return}Tc[f&127](a,e,c[d+4>>2]|0);return}function Px(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;e=sx(a,12)|0;c[e>>2]=b;c[e+4>>2]=d;d=a+52|0;c[e+8>>2]=c[(c[d>>2]|0)+36>>2];c[(c[d>>2]|0)+36>>2]=e;return}function Qx(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;d=(c[a+52>>2]|0)+36|0;e=c[d>>2]|0;if((e|0)==0){f=-1;return f|0}do{if((c[e>>2]|0)==(b|0)){c[d>>2]=c[e+8>>2];g=e;h=8}else{i=e;while(1){if((i|0)==0){f=-1;h=10;break}j=i+8|0;k=c[j>>2]|0;if((c[k>>2]|0)==(b|0)){break}else{i=k}}if((h|0)==10){return f|0}if((k|0)==0){l=i;break}c[j>>2]=c[k+8>>2];g=i;h=8}}while(0);do{if((h|0)==8){if((g|0)==0){f=-1}else{l=g;break}return f|0}}while(0);tx(a,l);f=0;return f|0}function Rx(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;d=i;e=c[a>>2]&3;if((e|0)==3|(e|0)==2){f=c[(c[a+28>>2]|0)+12>>2]|0}else if((e|0)==1){f=c[a+12>>2]|0}else if((e|0)==0){f=c[a+48>>2]|0}else{Fv(1,119456,(g=i,i=i+1|0,i=i+7&-8,c[g>>2]=0,g)|0)|0;i=g;f=0}e=b;h=c[e>>2]&3;if((h|0)==0){j=c[b+48>>2]|0}else if((h|0)==3|(h|0)==2){j=c[(c[b+28>>2]|0)+12>>2]|0}else if((h|0)==1){j=c[b+12>>2]|0}else{Fv(1,119456,(g=i,i=i+1|0,i=i+7&-8,c[g>>2]=0,g)|0)|0;i=g;j=0}if((f|0)!=(j|0)){k=0;i=d;return k|0}j=c[e>>2]&3;if((j|0)==1){k=(yx(a,c[b+4>>2]|0,0)|0)!=0|0;i=d;return k|0}else if((j|0)==0){j=b;while(1){if((j|0)==(a|0)){k=1;l=18;break}e=uy(j)|0;if((e|0)==0){k=0;l=18;break}else{j=e}}if((l|0)==18){i=d;return k|0}}else{k=(xw(a,b,0)|0)!=0|0;i=d;return k|0}return 0}function Sx(a){a=a|0;return c[a>>2]&3|0}function Tx(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;f=i;i=i+168|0;g=f|0;h=f+24|0;j=f+48|0;k=f+72|0;l=f+96|0;m=f+120|0;n=f+144|0;o=Wx(a|0,173400,44,0)|0;if((d|0)==100){p=c[b>>2]&3;if((p|0)==1){q=o+12|0}else if((p|0)==2){q=o+16|0}else if((p|0)==0){q=o+8|0}else{Fv(1,135120,(r=i,i=i+1|0,i=i+7&-8,c[r>>2]=0,r)|0)|0;i=r;q=0}p=c[q>>2]|0;if((p|0)==0){s=Hx(b|0)|0;t=yy(s,173336,c[43326]|0)|0;c[q>>2]=t;u=t}else{u=p}p=b+4|0;c[n+8>>2]=c[p>>2];t=u|0;if((Hc[c[t>>2]&63](u,n,4)|0)!=0){i=f;return}n=sx(Hx(b|0)|0,24)|0;c[n+16>>2]=b;c[n+8>>2]=c[p>>2];c[n+12>>2]=a;if((e|0)!=0){p=sx(a,8)|0;c[n+20>>2]=p;c[p>>2]=e}Hc[c[t>>2]&63](u,n,1)|0;i=f;return}else if((d|0)==101){n=b;u=c[n>>2]&3;if((u|0)==0){v=o+8|0}else if((u|0)==1){v=o+12|0}else if((u|0)==2){v=o+16|0}else{Fv(1,135120,(r=i,i=i+1|0,i=i+7&-8,c[r>>2]=0,r)|0)|0;i=r;v=0}u=c[v>>2]|0;if((u|0)==0){t=Hx(b|0)|0;p=yy(t,173336,c[43326]|0)|0;c[v>>2]=p;w=p}else{w=u}u=b+4|0;c[m+8>>2]=c[u>>2];if((Hc[c[w>>2]&63](w,m,4)|0)!=0){i=f;return}m=c[n>>2]&3;if((m|0)==2){x=o+40|0}else if((m|0)==0){x=o+32|0}else if((m|0)==1){x=o+36|0}else{Fv(1,135120,(r=i,i=i+1|0,i=i+7&-8,c[r>>2]=0,r)|0)|0;i=r;x=0}m=c[x>>2]|0;if((m|0)==0){w=Hx(b|0)|0;p=yy(w,173336,c[43326]|0)|0;c[x>>2]=p;y=p}else{y=m}c[l+8>>2]=c[u>>2];if((Hc[c[y>>2]&63](y,l,4)|0)!=0){i=f;return}l=c[n>>2]&3;if((l|0)==0){z=o+20|0}else if((l|0)==1){z=o+24|0}else if((l|0)==2){z=o+28|0}else{Fv(1,135120,(r=i,i=i+1|0,i=i+7&-8,c[r>>2]=0,r)|0)|0;i=r;z=0}l=c[z>>2]|0;if((l|0)==0){n=Hx(b|0)|0;y=yy(n,173336,c[43326]|0)|0;c[z>>2]=y;A=y}else{A=l}c[k+8>>2]=c[u>>2];l=A|0;y=Hc[c[l>>2]&63](A,k,4)|0;if((y|0)==0){k=sx(Hx(b|0)|0,24)|0;c[k+16>>2]=b;c[k+8>>2]=c[u>>2];c[k+12>>2]=a;if((e|0)!=0){u=sx(a,8)|0;c[k+20>>2]=u;c[u>>2]=e}Hc[c[l>>2]&63](A,k,1)|0;B=k}else{B=y}y=c[B+20>>2]|0;if((y|0)==0){i=f;return}else{C=y}while(1){if((c[C>>2]|0)==(e|0)){D=73;break}y=c[C+4>>2]|0;if((y|0)==0){D=73;break}else{C=y}}if((D|0)==73){i=f;return}}else if((d|0)==102){d=b;D=c[d>>2]&3;if((D|0)==0){E=o+8|0}else if((D|0)==1){E=o+12|0}else if((D|0)==2){E=o+16|0}else{Fv(1,135120,(r=i,i=i+1|0,i=i+7&-8,c[r>>2]=0,r)|0)|0;i=r;E=0}D=c[E>>2]|0;if((D|0)==0){C=Hx(b|0)|0;y=yy(C,173336,c[43326]|0)|0;c[E>>2]=y;F=y}else{F=D}D=b+4|0;c[j+8>>2]=c[D>>2];y=F|0;E=Hc[c[y>>2]&63](F,j,4)|0;if((E|0)!=0){Hc[c[y>>2]&63](F,E,2)|0}E=c[d>>2]&3;if((E|0)==0){G=o+20|0}else if((E|0)==1){G=o+24|0}else if((E|0)==2){G=o+28|0}else{Fv(1,135120,(r=i,i=i+1|0,i=i+7&-8,c[r>>2]=0,r)|0)|0;i=r;G=0}E=c[G>>2]|0;if((E|0)==0){F=Hx(b|0)|0;y=yy(F,173336,c[43326]|0)|0;c[G>>2]=y;H=y}else{H=E}c[h+8>>2]=c[D>>2];E=H|0;y=Hc[c[E>>2]&63](H,h,4)|0;if((y|0)!=0){Hc[c[E>>2]&63](H,y,2)|0}y=c[d>>2]&3;if((y|0)==0){I=o+32|0}else if((y|0)==1){I=o+36|0}else if((y|0)==2){I=o+40|0}else{Fv(1,135120,(r=i,i=i+1|0,i=i+7&-8,c[r>>2]=0,r)|0)|0;i=r;I=0}o=c[I>>2]|0;if((o|0)==0){y=Hx(b|0)|0;d=yy(y,173336,c[43326]|0)|0;c[I>>2]=d;J=d}else{J=o}c[g+8>>2]=c[D>>2];o=J|0;if((Hc[c[o>>2]&63](J,g,4)|0)!=0){i=f;return}g=sx(Hx(b|0)|0,24)|0;c[g+16>>2]=b;c[g+8>>2]=c[D>>2];c[g+12>>2]=a;if((e|0)!=0){D=sx(a,8)|0;c[g+20>>2]=D;c[D>>2]=e}Hc[c[o>>2]&63](J,g,1)|0;i=f;return}else{Fv(1,79840,(r=i,i=i+1|0,i=i+7&-8,c[r>>2]=0,r)|0)|0;i=r;i=f;return}}function Ux(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;d=c[b+20>>2]|0;a=b+12|0;if((d|0)==0){e=c[a>>2]|0;tx(e,b);return}else{f=d}while(1){d=c[f+4>>2]|0;tx(c[a>>2]|0,f);if((d|0)==0){break}else{f=d}}e=c[a>>2]|0;tx(e,b);return}function Vx(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0;f=i;g=b+8|0;h=c[g>>2]|0;j=h;while(1){if((j|0)==0){k=0;l=14;break}m=c[j>>2]|0;if((m|0)==(d|0)){l=7;break}if((a[d]|0)==(a[m]|0)){if((Ya(d|0,m|0)|0)==0){l=7;break}}m=c[j+4>>2]|0;if((m|0)==(h|0)){k=0;l=14;break}else{j=m}}if((l|0)==7){d=b;m=c[d>>2]|0;if((m&4|0)==0){if((j|0)==(h|0)&(e|0)==0){k=h;i=f;return k|0}c[g>>2]=j;g=e<<2&4;c[d>>2]=m&-5|g;d=m&3;if((d-2|0)>>>0>=2>>>0){k=j;i=f;return k|0}m=(d|0)==3?b-32|0:b+32|0;c[m+8>>2]=j;b=m;c[b>>2]=c[b>>2]&-5|g;k=j;i=f;return k|0}else{if((e|0)==0){k=j;i=f;return k|0}if((h|0)==(j|0)){k=h;i=f;return k|0}Fv(1,168464,(h=i,i=i+1|0,i=i+7&-8,c[h>>2]=0,h)|0)|0;i=h;k=j;i=f;return k|0}}else if((l|0)==14){i=f;return k|0}return 0}function Wx(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;g=Hx(b)|0;h=b+8|0;i=c[h>>2]|0;j=i;while(1){if((j|0)==0){k=0;break}l=c[j>>2]|0;if((l|0)==(d|0)){m=7;break}if((a[d]|0)==(a[l]|0)){if((Ya(d|0,l|0)|0)==0){m=7;break}}l=c[j+4>>2]|0;if((l|0)==(i|0)){k=0;break}else{j=l}}do{if((m|0)==7){l=b;n=c[l>>2]|0;if((n&4|0)!=0){k=j;break}if((j|0)==(i|0)){k=i;break}c[h>>2]=j;c[l>>2]=n&-5;l=n&3;if((l-2|0)>>>0>=2>>>0){k=j;break}n=(l|0)==3?b-32|0:b+32|0;c[n+8>>2]=j;l=n;c[l>>2]=c[l>>2]&-5;k=j}}while(0);do{if((k|0)!=0|(e|0)==0){o=k}else{j=sx(g,e)|0;i=j;c[j>>2]=dy(g,d)|0;m=b;l=c[m>>2]&3;if((l|0)==1){n=c[h>>2]|0;do{if((n|0)==0){c[j+4>>2]=i}else{p=n+4|0;q=c[p>>2]|0;if((q|0)==(n|0)){c[p>>2]=i;c[j+4>>2]=n;break}else{c[j+4>>2]=q;c[p>>2]=i;break}}}while(0);n=c[m>>2]|0;if((n&4|0)!=0){o=i;break}c[h>>2]=i;c[m>>2]=n&-5;p=n&3;if((p-2|0)>>>0>=2>>>0){o=i;break}n=(p|0)==3?b-32|0:b+32|0;c[n+8>>2]=i;p=n;c[p>>2]=c[p>>2]&-5;o=i;break}else if((l|0)==3|(l|0)==2){p=c[h>>2]|0;do{if((p|0)==0){c[j+4>>2]=i}else{n=p+4|0;q=c[n>>2]|0;if((q|0)==(p|0)){c[n>>2]=i;c[j+4>>2]=p;break}else{c[j+4>>2]=q;c[n>>2]=i;break}}}while(0);p=c[m>>2]|0;if((p&4|0)!=0){o=i;break}c[h>>2]=i;c[m>>2]=p&-5;n=p&3;if((n-2|0)>>>0>=2>>>0){o=i;break}p=(n|0)==3?b-32|0:b+32|0;c[p+8>>2]=i;n=p;c[n>>2]=c[n>>2]&-5;o=i;break}else if((l|0)==0){n=c[h>>2]|0;do{if((n|0)==0){c[j+4>>2]=i}else{p=n+4|0;q=c[p>>2]|0;if((q|0)==(n|0)){c[p>>2]=i;c[j+4>>2]=n;break}else{c[j+4>>2]=q;c[p>>2]=i;break}}}while(0);j=c[m>>2]|0;if((j&4|0)!=0){o=i;break}c[h>>2]=i;c[m>>2]=j&-5;n=j&3;if((n-2|0)>>>0>=2>>>0){o=i;break}j=(n|0)==3?b-32|0:b+32|0;c[j+8>>2]=i;n=j;c[n>>2]=c[n>>2]&-5;o=i;break}else{o=i;break}}}while(0);if((f|0)==0){r=o;return r|0}Vx(b,d,1)|0;r=o;return r|0}function Xx(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=b;f=Hx(b)|0;g=b+8|0;h=c[g>>2]|0;i=h;while(1){if((i|0)==0){j=-1;k=18;break}l=c[i>>2]|0;if((l|0)==(d|0)){k=7;break}if((a[d]|0)==(a[l]|0)){if((Ya(d|0,l|0)|0)==0){k=7;break}}l=c[i+4>>2]|0;if((l|0)==(h|0)){j=-1;k=18;break}else{i=l}}if((k|0)==7){d=b;l=c[d>>2]|0;do{if((l&4|0)==0){if((i|0)==(h|0)){m=h;n=h;break}c[g>>2]=i;c[d>>2]=l&-5;o=l&3;if((o-2|0)>>>0>=2>>>0){m=i;n=i;break}p=(o|0)==3?b-32|0:b+32|0;c[p+8>>2]=i;o=p;c[o>>2]=c[o>>2]&-5;m=i;n=i}else{m=i;n=h}}while(0);if((m|0)==0){j=-1;return j|0}else{q=n}do{r=q+4|0;q=c[r>>2]|0;}while((q|0)!=(m|0));q=m+4|0;c[r>>2]=c[q>>2];r=c[d>>2]|0;n=r&3;do{if((n|0)==1|(n|0)==3|(n|0)==2){Ov(Ix(f|0)|0,e,26,m,0)|0}else if((n|0)==0){if((c[g>>2]|0)!=(m|0)){break}h=c[q>>2]|0;c[g>>2]=(h|0)==(m|0)?0:h;c[d>>2]=r&-5}}while(0);fy(f,c[m>>2]|0)|0;tx(f,m);j=0;return j|0}else if((k|0)==18){return j|0}return 0}function Yx(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;a=d;e=b+8|0;if((c[e>>2]|0)!=(a|0)){return}f=c[d+4>>2]|0;d=(f|0)==(a|0)?0:f;c[e>>2]=d;e=b;f=c[e>>2]|0;c[e>>2]=f&-5;e=f&3;if((e-2|0)>>>0>=2>>>0){return}f=(e|0)==3?b-36+4|0:b+32|0;c[f+8>>2]=d;d=f;c[d>>2]=c[d>>2]&-5;return}function Zx(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;f=(d|0)<0?-d|0:d;if((b|0)==0){Wx(a|0,c,f,e)|0;if((d|0)>-1){return}g=sy(a)|0;if((g|0)==0){return}else{h=g}do{Zx(h,0,c,d,e);h=ty(h)|0;}while((h|0)!=0);return}else if((b|0)==1|(b|0)==2|(b|0)==3){h=ux(a)|0;if((h|0)==0){return}if((b|0)==1){b=h;do{Wx(b|0,c,f,e)|0;b=vx(a,b)|0;}while((b|0)!=0);return}else{i=h}do{h=mw(a,i)|0;if((h|0)!=0){b=h;do{Wx(b|0,c,f,e)|0;b=ow(a,b)|0;}while((b|0)!=0)}i=vx(a,i)|0;}while((i|0)!=0);return}else{return}}function _x(a,b,c){a=a|0;b=b|0;c=c|0;var d=0,e=0;if((b|0)==0){Ov(a,a|0,92,c,1)|0;return}else if((b|0)==1|(b|0)==2|(b|0)==3){d=ux(a)|0;if((d|0)==0){return}if((b|0)==1){b=d;do{Xx(b|0,c)|0;b=vx(a,b)|0;}while((b|0)!=0);return}else{e=d}do{d=mw(a,e)|0;if((d|0)!=0){b=d;do{Xx(b|0,c)|0;b=ow(a,b)|0;}while((b|0)!=0)}e=vx(a,e)|0;}while((e|0)!=0);return}else{return}}function $x(a,b,c){a=a|0;b=b|0;c=c|0;Xx(b|0,c)|0;return}function ay(a){a=a|0;var b=0,d=0,e=0;b=Hx(a|0)|0;d=a+8|0;a=c[d>>2]|0;if((a|0)==0){c[d>>2]=0;return}else{e=a}while(1){a=c[e+4>>2]|0;fy(b,c[e>>2]|0)|0;tx(b,e);if((a|0)==(c[d>>2]|0)){break}else{e=a}}c[d>>2]=0;return}function by(b){b=b|0;var d=0,e=0,f=0,g=0;if((b|0)==0){d=214176}else{d=(c[b+52>>2]|0)+20|0}e=c[d>>2]|0;if((e|0)!=0){f=e;g=Ay(b,f)|0;return g|0}e=yy(b,172584,c[43326]|0)|0;c[d>>2]=e;a[173232]=1;a[173464]=1;f=e;g=Ay(b,f)|0;return g|0}function cy(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0;e=i;i=i+24|0;f=e|0;if((b|0)==0){g=214176}else{g=(c[b+52>>2]|0)+20|0}h=c[g>>2]|0;if((h|0)==0){j=yy(b,172584,c[43326]|0)|0;c[g>>2]=j;a[173232]=1;a[173464]=1;k=j}else{k=h}c[f+12>>2]=d;d=Hc[c[k>>2]&63](k,f,4)|0;if((d|0)==0){l=0;i=e;return l|0}l=c[d+12>>2]|0;i=e;return l|0}function dy(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;e=i;i=i+24|0;f=e|0;if((d|0)==0){g=0;i=e;return g|0}h=(b|0)==0;if(h){j=214176}else{j=(c[b+52>>2]|0)+20|0}k=c[j>>2]|0;if((k|0)==0){l=yy(b,172584,c[43326]|0)|0;c[j>>2]=l;a[173232]=1;a[173464]=1;m=l}else{m=k}c[f+12>>2]=d;k=m|0;l=Hc[c[k>>2]&63](m,f,4)|0;if((l|0)==0){f=(xF(d|0)|0)+20|0;if(h){n=dF(f)|0}else{n=sx(b,f)|0}c[n+8>>2]=1;f=n+16|0;zF(f|0,d|0)|0;c[n+12>>2]=f;Hc[c[k>>2]&63](m,n,1)|0;o=n}else{n=l+8|0;c[n>>2]=(c[n>>2]|0)+1;o=l}g=c[o+12>>2]|0;i=e;return g|0}function ey(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;e=i;i=i+24|0;f=e|0;if((d|0)==0){g=0;i=e;return g|0}h=(b|0)==0;if(h){j=214176}else{j=(c[b+52>>2]|0)+20|0}k=c[j>>2]|0;if((k|0)==0){l=yy(b,172584,c[43326]|0)|0;c[j>>2]=l;a[173232]=1;a[173464]=1;m=l}else{m=k}c[f+12>>2]=d;k=m|0;l=Hc[c[k>>2]&63](m,f,4)|0;if((l|0)==0){f=(xF(d|0)|0)+20|0;if(h){n=dF(f)|0}else{n=sx(b,f)|0}c[n+8>>2]=a[173232]|0?-2147483647:1;f=n+16|0;zF(f|0,d|0)|0;c[n+12>>2]=f;Hc[c[k>>2]&63](m,n,1)|0;o=n}else{n=l+8|0;c[n>>2]=(c[n>>2]|0)+1;o=l}g=c[o+12>>2]|0;i=e;return g|0}function fy(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0;e=i;i=i+24|0;f=e|0;if((d|0)==0){g=-1;i=e;return g|0}if((b|0)==0){h=214176}else{h=(c[b+52>>2]|0)+20|0}j=c[h>>2]|0;if((j|0)==0){k=yy(b,172584,c[43326]|0)|0;c[h>>2]=k;a[173232]=1;a[173464]=1;l=k}else{l=j}c[f+12>>2]=d;j=Hc[c[l>>2]&63](l,f,4)|0;if((j|0)==0){g=-1;i=e;return g|0}if((c[j+12>>2]|0)!=(d|0)){g=0;i=e;return g|0}d=j+8|0;f=(c[d>>2]|0)-1|0;c[d>>2]=f;if(!((f|0)==0|a[173464]^1)){g=0;i=e;return g|0}zy(b,l,j)|0;g=0;i=e;return g|0}function gy(b){b=b|0;var d=0;if((b|0)==0){d=0;return d|0}d=(a[173232]|0?-2147483648:0)&c[b-8>>2];return d|0}function hy(b){b=b|0;var d=0;if((b|0)==0){return}d=b-8|0;c[d>>2]=c[d>>2]|(a[173232]|0?-2147483648:0);return}function iy(a,b){a=a|0;b=b|0;c[53838]=a;c[53678]=b;c[44744]=0;return}function jy(){var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,_a=0,$a=0,ab=0,bb=0;e=i;i=i+2088|0;f=e|0;g=e+1024|0;h=e+2048|0;j=e+2064|0;k=e+2072|0;l=e+2080|0;if(!(a[76488]|0)){a[76488]=1;if((c[53308]|0)==0){c[53308]=1}if((c[53304]|0)==0){c[53304]=c[q>>2]}if((c[53296]|0)==0){c[53296]=c[p>>2]}m=c[53324]|0;if((m|0)==0){n=10}else{o=c[53320]|0;r=c[m+(o<<2)>>2]|0;if((r|0)==0){n=10}else{s=o;t=m;u=r}}if((n|0)==10){ky();r=ly(c[53304]|0,16384)|0;c[(c[53324]|0)+(c[53320]<<2)>>2]=r;r=c[53320]|0;m=c[53324]|0;s=r;t=m;u=c[m+(r<<2)>>2]|0}r=t+(s<<2)|0;c[53310]=c[u+16>>2];u=c[(c[r>>2]|0)+8>>2]|0;c[53318]=u;c[53294]=u;c[53304]=c[c[r>>2]>>2];a[213264]=a[u]|0}u=l|0;a:while(1){l=c[53318]|0;a[l]=a[213264]|0;r=(c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+28>>2]|0)+(c[53308]|0)|0;s=l;t=l;b:while(1){l=r;m=s;while(1){o=c[76496+(d[m]<<2)>>2]&255;if((b[78488+(l<<1)>>1]|0)==0){v=l;w=o}else{c[53312]=l;c[53314]=m;v=l;w=o}c:while(1){o=w&255;x=v;do{y=(b[78280+(x<<1)>>1]|0)+o|0;if((b[77736+(y<<1)>>1]|0)==(x|0)){break c}z=b[77528+(x<<1)>>1]|0;x=z<<16>>16;}while(z<<16>>16<=88);v=x;w=c[76304+(o<<2)>>2]&255}z=b[75760+(y<<1)>>1]|0;A=m+1|0;if((b[78280+(z<<1)>>1]|0)==224){B=z;C=A;D=t;break}else{l=z;m=A}}d:while(1){m=D;l=B;A=C;e:while(1){z=b[78488+(l<<1)>>1]|0;if(z<<16>>16==0){E=c[53314]|0;F=b[78488+(c[53312]<<1)>>1]|0}else{E=A;F=z}c[53294]=D;z=E;c[53302]=z-m;a[213264]=a[E]|0;a[E]=0;c[53318]=E;G=F<<16>>16;f:while(1){switch(G|0){case 4:{n=36;break b;break};case 18:{n=83;break a;break};case 19:{n=86;break a;break};case 5:{n=38;break b;break};case 21:{n=96;break b;break};case 3:{n=33;break b;break};case 15:{n=76;break a;break};case 16:{n=78;break a;break};case 17:{n=80;break a;break};case 2:{n=30;break b;break};case 0:{break f;break};case 14:{n=72;break a;break};case 11:{n=64;break a;break};case 12:{n=66;break a;break};case 24:{n=111;break b;break};case 25:{n=114;break b;break};case 1:{n=28;break a;break};case 9:{n=60;break b;break};case 30:{n=154;break b;break};case 31:{n=162;break a;break};case 32:{n=165;break b;break};case 29:{n=145;break b;break};case 33:{break};case 10:{n=62;break b;break};case 20:{n=89;break a;break};case 6:{n=40;break b;break};case 7:{n=43;break b;break};case 8:{n=45;break b;break};case 28:{n=137;break b;break};case 26:{n=122;break b;break};case 27:{n=127;break b;break};case 13:{n=68;break a;break};case 22:{n=101;break a;break};case 23:{n=104;break b;break};case 34:case 35:case 36:case 37:{H=0;n=238;break a;break};default:{n=237;break a}}I=z-(c[53294]|0)|0;J=I-1|0;a[E]=a[213264]|0;K=c[53320]|0;L=c[53324]|0;M=L+(K<<2)|0;N=c[M>>2]|0;if((c[N+44>>2]|0)==0){c[53310]=c[N+16>>2];c[c[M>>2]>>2]=c[53304];c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+44>>2]=1;M=c[53320]|0;O=c[53324]|0;P=M;Q=O;R=c[O+(M<<2)>>2]|0}else{P=K;Q=L;R=N}N=c[53318]|0;L=c[53310]|0;K=c[R+4>>2]|0;S=c[53294]|0;if(N>>>0<=(K+L|0)>>>0){break e}if(N>>>0>(K+(L+1)|0)>>>0){n=188;break a}L=N-S|0;if((c[R+40>>2]|0)==0){T=(L|0)==1?1:2;U=S;V=P;W=Q}else{N=L-1|0;if((N|0)>0){L=0;M=S;O=K;while(1){a[O]=a[M]|0;K=L+1|0;if((K|0)<(N|0)){L=K;M=M+1|0;O=O+1|0}else{break}}O=c[53320]|0;M=c[53324]|0;X=O;Y=M;Z=c[M+(O<<2)>>2]|0}else{X=P;Y=Q;Z=R}if((c[Z+44>>2]|0)==2){c[53310]=0;c[(c[Y+(X<<2)>>2]|0)+16>>2]=0}else{O=c[Z+12>>2]|0;M=O-N-1|0;if((M|0)==0){L=Z;K=c[53318]|0;_=O;while(1){$=L+4|0;O=c[$>>2]|0;if((c[L+20>>2]|0)==0){n=199;break a}aa=_<<1;if((aa|0)==0){ba=(_>>>3)+_|0}else{ba=aa}c[L+12>>2]=ba;aa=gF(O,ba+2|0)|0;c[$>>2]=aa;if((aa|0)==0){n=203;break a}ca=aa+(K-O)|0;c[53318]=ca;O=c[(c[53324]|0)+(c[53320]<<2)>>2]|0;aa=c[O+12>>2]|0;da=aa-N-1|0;if((da|0)==0){L=O;K=ca;_=aa}else{ea=da;fa=O;break}}}else{ea=M;fa=Z}_=Hc[c[c[(c[53838]|0)+8>>2]>>2]&63](c[53678]|0,(c[fa+4>>2]|0)+N|0,ea>>>0>8192>>>0?8192:ea)|0;c[53310]=_;c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+16>>2]=_}do{if((c[53310]|0)==0){if((N|0)==0){my(c[53304]|0);ga=1;break}else{c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+44>>2]=2;ga=2;break}}else{ga=0}}while(0);M=c[53310]|0;_=M+N|0;K=c[53320]|0;L=c[53324]|0;O=c[L+(K<<2)>>2]|0;if(_>>>0>(c[O+12>>2]|0)>>>0){da=gF(c[O+4>>2]|0,_+(M>>>1)|0)|0;c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+4>>2]=da;da=c[53320]|0;_=c[53324]|0;if((c[(c[_+(da<<2)>>2]|0)+4>>2]|0)==0){n=213;break a}ha=da;ia=_;ja=c[53310]|0}else{ha=K;ia=L;ja=M}M=ja+N|0;c[53310]=M;a[(c[(c[ia+(ha<<2)>>2]|0)+4>>2]|0)+M|0]=0;a[(c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+4>>2]|0)+((c[53310]|0)+1)|0]=0;M=c[53320]|0;L=c[53324]|0;K=c[(c[L+(M<<2)>>2]|0)+4>>2]|0;c[53294]=K;T=ga;U=K;V=M;W=L}if((T|0)==0){break d}else if((T|0)==2){n=227;break e}else if((T|0)!=1){continue a}a[77520]=0;c[53318]=U;G=(((c[53308]|0)-1|0)/2|0)+34|0}a[E]=a[213264]|0;l=c[53312]|0;A=c[53314]|0}if((n|0)==227){n=0;A=W+(V<<2)|0;l=(c[(c[A>>2]|0)+4>>2]|0)+(c[53310]|0)|0;c[53318]=l;m=(c[(c[A>>2]|0)+28>>2]|0)+(c[53308]|0)|0;if(U>>>0<l>>>0){ka=m;la=U}else{B=m;C=l;D=U;continue}while(1){m=a[la]|0;if(m<<24>>24==0){ma=1}else{ma=c[76496+((m&255)<<2)>>2]&255}if((b[78488+(ka<<1)>>1]|0)==0){na=ma;oa=ka}else{c[53312]=ka;c[53314]=la;na=ma;oa=ka}g:while(1){m=na&255;A=oa;do{pa=(b[78280+(A<<1)>>1]|0)+m|0;if((b[77736+(pa<<1)>>1]|0)==(A|0)){break g}G=b[77528+(A<<1)>>1]|0;A=G<<16>>16;}while(G<<16>>16<=88);na=c[76304+(m<<2)>>2]&255;oa=A}N=b[75760+(pa<<1)>>1]|0;G=la+1|0;if(G>>>0<l>>>0){ka=N;la=G}else{B=N;C=l;D=U;continue d}}}l=S+J|0;c[53318]=l;N=(c[(c[Q+(P<<2)>>2]|0)+28>>2]|0)+(c[53308]|0)|0;if((J|0)>0){G=N;z=S;while(1){o=a[z]|0;if(o<<24>>24==0){qa=1}else{qa=c[76496+((o&255)<<2)>>2]&255}if((b[78488+(G<<1)>>1]|0)==0){ra=qa;sa=G}else{c[53312]=G;c[53314]=z;ra=qa;sa=G}h:while(1){o=ra&255;x=sa;do{ta=(b[78280+(x<<1)>>1]|0)+o|0;if((b[77736+(ta<<1)>>1]|0)==(x|0)){break h}L=b[77528+(x<<1)>>1]|0;x=L<<16>>16;}while(L<<16>>16<=88);ra=c[76304+(o<<2)>>2]&255;sa=x}A=b[75760+(ta<<1)>>1]|0;m=z+1|0;if(m>>>0<l>>>0){G=A;z=m}else{ua=A;break}}}else{ua=N}if((b[78488+(ua<<1)>>1]|0)!=0){c[53312]=ua;c[53314]=l}z=b[78280+(ua<<1)>>1]|0;if((b[77736+(z+1<<1)>>1]|0)==(ua|0)){va=z}else{z=ua;while(1){G=b[77528+(z<<1)>>1]|0;A=G<<16>>16;m=b[78280+(A<<1)>>1]|0;if((b[77736+(m+1<<1)>>1]|0)==G<<16>>16){va=m;break}else{z=A}}}z=b[75760+(va+1<<1)>>1]|0;wa=z<<16>>16==88?0:z<<16>>16;if((wa|0)==0){B=ua;C=l;D=S}else{n=186;break}}if((n|0)==186){n=0;z=S+I|0;c[53318]=z;r=wa;s=z;t=S;continue}z=U+J|0;c[53318]=z;N=(c[(c[W+(V<<2)>>2]|0)+28>>2]|0)+(c[53308]|0)|0;if((J|0)>0){xa=N;ya=U}else{r=N;s=z;t=U;continue}while(1){N=a[ya]|0;if(N<<24>>24==0){za=1}else{za=c[76496+((N&255)<<2)>>2]&255}if((b[78488+(xa<<1)>>1]|0)==0){Aa=za;Ba=xa}else{c[53312]=xa;c[53314]=ya;Aa=za;Ba=xa}i:while(1){N=Aa&255;A=Ba;do{Ca=(b[78280+(A<<1)>>1]|0)+N|0;if((b[77736+(Ca<<1)>>1]|0)==(A|0)){break i}m=b[77528+(A<<1)>>1]|0;A=m<<16>>16;}while(m<<16>>16<=88);Aa=c[76304+(N<<2)>>2]&255;Ba=A}l=b[75760+(Ca<<1)>>1]|0;m=ya+1|0;if(m>>>0<z>>>0){xa=l;ya=m}else{r=l;s=z;t=U;continue b}}}if((n|0)==30){n=0;t=c[53302]|0;if((t|0)!=0){c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+28>>2]=(a[(c[53294]|0)+(t-1)|0]|0)==10}c[5104]=(c[5104]|0)+1;continue}else if((n|0)==33){n=0;t=c[53302]|0;if((t|0)!=0){c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+28>>2]=(a[(c[53294]|0)+(t-1)|0]|0)==10}c[53308]=3;continue}else if((n|0)==36){n=0;t=c[53302]|0;if((t|0)==0){continue}c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+28>>2]=(a[(c[53294]|0)+(t-1)|0]|0)==10;continue}else if((n|0)==38){n=0;t=c[53302]|0;if((t|0)==0){continue}c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+28>>2]=(a[(c[53294]|0)+(t-1)|0]|0)==10;continue}else if((n|0)==40){n=0;t=c[53302]|0;if((t|0)!=0){c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+28>>2]=(a[(c[53294]|0)+(t-1)|0]|0)==10}c[53308]=1;continue}else if((n|0)==43){n=0;t=c[53302]|0;if((t|0)==0){continue}c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+28>>2]=(a[(c[53294]|0)+(t-1)|0]|0)==10;continue}else if((n|0)==45){n=0;t=c[53302]|0;if((t|0)!=0){c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+28>>2]=(a[(c[53294]|0)+(t-1)|0]|0)==10}t=c[53294]|0;s=t+1|0;r=(Za(s|0,134168,4)|0)==0;z=r?t+5|0:s;s=ac(z|0,131560,(Da=i,i=i+24|0,c[Da>>2]=k,c[Da+8>>2]=u,c[Da+16>>2]=j,Da)|0)|0;i=Da;if((s|0)<=0){continue}c[5104]=(c[k>>2]|0)-1;if((s|0)<=1){continue}s=z+(c[j>>2]|0)|0;z=s;while(1){t=a[z]|0;if((t<<24>>24|0)==34|(t<<24>>24|0)==0){break}z=z+1|0}if((z|0)==(s|0)){continue}a[z]=0;t=z-s|0;r=c[43712]|0;if((r|0)<(t|0)){if((r|0)==0){Ea=dF(t+1|0)|0}else{Ea=gF(c[43714]|0,t+1|0)|0}c[43714]=Ea;c[43712]=t;Fa=Ea}else{Fa=c[43714]|0}zF(Fa|0,s|0)|0;c[53674]=c[43714];continue}else if((n|0)==60){n=0;t=c[53302]|0;if((t|0)==0){continue}c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+28>>2]=(a[(c[53294]|0)+(t-1)|0]|0)==10;continue}else if((n|0)==62){n=0;t=c[53302]|0;if((t|0)==0){continue}c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+28>>2]=(a[(c[53294]|0)+(t-1)|0]|0)==10;continue}else if((n|0)==96){n=0;t=c[53302]|0;if((t|0)!=0){c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+28>>2]=(a[(c[53294]|0)+(t-1)|0]|0)==10}c[53308]=5;t=c[53536]|0;if((t|0)==0){r=dF(1024)|0;c[53536]=r;c[53532]=r+1024;Ga=r}else{Ga=t}c[53526]=Ga;a[Ga]=0;continue}else if((n|0)==104){n=0;t=c[53302]|0;if((t|0)!=0){c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+28>>2]=(a[(c[53294]|0)+(t-1)|0]|0)==10}t=c[53526]|0;if(t>>>0>(c[53536]|0)>>>0){r=t-1|0;c[53526]=r;Ha=r}else{Ha=t}c[53526]=Ha+1;a[Ha]=34;t=c[53526]|0;r=c[53532]|0;if(t>>>0<r>>>0){Ia=t}else{l=c[53536]|0;m=l;G=r-m<<1;r=gF(l,G)|0;c[53536]=r;c[53532]=r+G;G=r+(t-m)|0;c[53526]=G;Ia=G}c[53526]=Ia+1;a[Ia]=0;continue}else if((n|0)==111){n=0;G=c[53302]|0;if((G|0)!=0){c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+28>>2]=(a[(c[53294]|0)+(G-1)|0]|0)==10}c[5104]=(c[5104]|0)+1;continue}else if((n|0)==114){n=0;G=c[53302]|0;if((G|0)!=0){c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+28>>2]=(a[(c[53294]|0)+(G-1)|0]|0)==10}G=c[53294]|0;m=c[53526]|0;if(m>>>0>(c[53536]|0)>>>0){t=m-1|0;c[53526]=t;Ja=t}else{Ja=m}m=a[G]|0;c[53526]=Ja+1;a[Ja]=m;if(m<<24>>24==0){continue}else{Ka=G}while(1){G=Ka+1|0;m=c[53526]|0;t=c[53532]|0;if(m>>>0<t>>>0){La=m}else{r=c[53536]|0;l=r;L=t-l<<1;t=gF(r,L)|0;c[53536]=t;c[53532]=t+L;L=t+(m-l)|0;c[53526]=L;La=L}L=a[G]|0;c[53526]=La+1;a[La]=L;if(L<<24>>24==0){continue a}else{Ka=G}}}else if((n|0)==122){n=0;s=c[53302]|0;if((s|0)!=0){c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+28>>2]=(a[(c[53294]|0)+(s-1)|0]|0)==10}c[53308]=7;c[44700]=1;s=c[53536]|0;if((s|0)==0){z=dF(1024)|0;c[53536]=z;c[53532]=z+1024;Na=z}else{Na=s}c[53526]=Na;a[Na]=0;continue}else if((n|0)==127){n=0;s=c[53302]|0;if((s|0)!=0){c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+28>>2]=(a[(c[53294]|0)+(s-1)|0]|0)==10}s=(c[44700]|0)-1|0;c[44700]=s;if((s|0)==0){n=136;break}s=c[53294]|0;z=c[53526]|0;if(z>>>0>(c[53536]|0)>>>0){G=z-1|0;c[53526]=G;Oa=G}else{Oa=z}z=a[s]|0;c[53526]=Oa+1;a[Oa]=z;if(z<<24>>24==0){continue}else{Pa=s}while(1){s=Pa+1|0;z=c[53526]|0;G=c[53532]|0;if(z>>>0<G>>>0){Qa=z}else{L=c[53536]|0;l=L;m=G-l<<1;G=gF(L,m)|0;c[53536]=G;c[53532]=G+m;m=G+(z-l)|0;c[53526]=m;Qa=m}m=a[s]|0;c[53526]=Qa+1;a[Qa]=m;if(m<<24>>24==0){continue a}else{Pa=s}}}else if((n|0)==137){n=0;s=c[53302]|0;if((s|0)!=0){c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+28>>2]=(a[(c[53294]|0)+(s-1)|0]|0)==10}c[44700]=(c[44700]|0)+1;s=c[53294]|0;m=c[53526]|0;if(m>>>0>(c[53536]|0)>>>0){l=m-1|0;c[53526]=l;Ra=l}else{Ra=m}m=a[s]|0;c[53526]=Ra+1;a[Ra]=m;if(m<<24>>24==0){continue}else{Sa=s}while(1){s=Sa+1|0;m=c[53526]|0;l=c[53532]|0;if(m>>>0<l>>>0){Ta=m}else{z=c[53536]|0;G=z;L=l-G<<1;l=gF(z,L)|0;c[53536]=l;c[53532]=l+L;L=l+(m-G)|0;c[53526]=L;Ta=L}L=a[s]|0;c[53526]=Ta+1;a[Ta]=L;if(L<<24>>24==0){continue a}else{Sa=s}}}else if((n|0)==145){n=0;s=c[53302]|0;if((s|0)!=0){c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+28>>2]=(a[(c[53294]|0)+(s-1)|0]|0)==10}s=c[53294]|0;L=c[53526]|0;if(L>>>0>(c[53536]|0)>>>0){G=L-1|0;c[53526]=G;Ua=G}else{Ua=L}L=a[s]|0;c[53526]=Ua+1;a[Ua]=L;if(L<<24>>24!=0){L=s;do{L=L+1|0;s=c[53526]|0;G=c[53532]|0;if(s>>>0<G>>>0){Va=s}else{m=c[53536]|0;l=m;z=G-l<<1;G=gF(m,z)|0;c[53536]=G;c[53532]=G+z;z=G+(s-l)|0;c[53526]=z;Va=z}z=a[L]|0;c[53526]=Va+1;a[Va]=z;}while(z<<24>>24!=0)}c[5104]=(c[5104]|0)+1;continue}else if((n|0)==154){n=0;L=c[53302]|0;if((L|0)!=0){c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+28>>2]=(a[(c[53294]|0)+(L-1)|0]|0)==10}L=c[53294]|0;z=c[53526]|0;if(z>>>0>(c[53536]|0)>>>0){l=z-1|0;c[53526]=l;Wa=l}else{Wa=z}z=a[L]|0;c[53526]=Wa+1;a[Wa]=z;if(z<<24>>24==0){continue}else{Xa=L}while(1){L=Xa+1|0;z=c[53526]|0;l=c[53532]|0;if(z>>>0<l>>>0){Ya=z}else{s=c[53536]|0;G=s;m=l-G<<1;l=gF(s,m)|0;c[53536]=l;c[53532]=l+m;m=l+(z-G)|0;c[53526]=m;Ya=m}m=a[L]|0;c[53526]=Ya+1;a[Ya]=m;if(m<<24>>24==0){continue a}else{Xa=L}}}else if((n|0)==165){n=0;L=c[53302]|0;if((L|0)==0){_a=0}else{c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+28>>2]=(a[(c[53294]|0)+(L-1)|0]|0)==10;_a=c[53302]|0}Ma(c[53294]|0,_a|0,1,c[53296]|0)|0;continue}}if((n|0)==28){_a=c[53302]|0;if((_a|0)==0){H=-1;i=e;return H|0}c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+28>>2]=(a[(c[53294]|0)+(_a-1)|0]|0)==10;H=-1;i=e;return H|0}else if((n|0)==64){_a=c[53302]|0;if((_a|0)==0){H=259;i=e;return H|0}c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+28>>2]=(a[(c[53294]|0)+(_a-1)|0]|0)==10;H=259;i=e;return H|0}else if((n|0)==66){_a=c[53302]|0;if((_a|0)==0){H=260;i=e;return H|0}c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+28>>2]=(a[(c[53294]|0)+(_a-1)|0]|0)==10;H=260;i=e;return H|0}else if((n|0)==68){_a=c[53302]|0;if((_a|0)!=0){c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+28>>2]=(a[(c[53294]|0)+(_a-1)|0]|0)==10}if((c[44744]|0)!=0){H=258;i=e;return H|0}c[44744]=258;H=258;i=e;return H|0}else if((n|0)==72){_a=c[53302]|0;if((_a|0)!=0){c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+28>>2]=(a[(c[53294]|0)+(_a-1)|0]|0)==10}if((c[44744]|0)!=0){H=261;i=e;return H|0}c[44744]=261;H=261;i=e;return H|0}else if((n|0)==76){_a=c[53302]|0;if((_a|0)==0){H=263;i=e;return H|0}c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+28>>2]=(a[(c[53294]|0)+(_a-1)|0]|0)==10;H=263;i=e;return H|0}else if((n|0)==78){_a=c[53302]|0;if((_a|0)==0){H=262;i=e;return H|0}c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+28>>2]=(a[(c[53294]|0)+(_a-1)|0]|0)==10;H=262;i=e;return H|0}else if((n|0)==80){_a=c[53302]|0;if((_a|0)!=0){c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+28>>2]=(a[(c[53294]|0)+(_a-1)|0]|0)==10}H=(c[44744]|0)==261?264:45;i=e;return H|0}else if((n|0)==83){_a=c[53302]|0;if((_a|0)!=0){c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+28>>2]=(a[(c[53294]|0)+(_a-1)|0]|0)==10}H=(c[44744]|0)==258?264:45;i=e;return H|0}else if((n|0)==86){_a=c[53302]|0;if((_a|0)!=0){c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+28>>2]=(a[(c[53294]|0)+(_a-1)|0]|0)==10}c[53300]=dy(c[53854]|0,c[53294]|0)|0;H=267;i=e;return H|0}else if((n|0)==89){_a=c[53302]|0;if((_a|0)==0){$a=-1}else{c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+28>>2]=(a[(c[53294]|0)+(_a-1)|0]|0)==10;$a=(c[53302]|0)-1|0}_a=g|0;g=c[53294]|0;Xa=a[g+$a|0]|0;if(((Xa&255)-48|0)>>>0<10>>>0|Xa<<24>>24==46){ab=g}else{g=c[53674]|0;Iv(h,1024,f|0);Lv(h,142776)|0;Lv(h,c[53294]|0)|0;nb(_a|0,139064,(Da=i,i=i+8|0,c[Da>>2]=c[5104],Da)|0)|0;i=Da;Lv(h,_a)|0;Lv(h,(g|0)==0?145136:g)|0;Lv(h,136512)|0;g=h+4|0;_a=c[g>>2]|0;if(_a>>>0<(c[h+8>>2]|0)>>>0){bb=_a}else{Jv(h,1)|0;bb=c[g>>2]|0}a[bb]=0;bb=c[h>>2]|0;c[g>>2]=bb;Fv(0,bb,(Da=i,i=i+1|0,i=i+7&-8,c[Da>>2]=0,Da)|0)|0;i=Da;Mv(h);h=(c[53302]|0)-1|0;a[E]=a[213264]|0;E=D+h|0;c[53318]=E;c[53294]=D;c[53302]=h;a[213264]=a[E]|0;a[E]=0;c[53318]=E;ab=c[53294]|0}c[53300]=dy(c[53854]|0,ab)|0;H=267;i=e;return H|0}else if((n|0)==101){ab=c[53302]|0;if((ab|0)!=0){c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+28>>2]=(a[(c[53294]|0)+(ab-1)|0]|0)==10}c[53308]=1;c[53300]=dy(c[53854]|0,c[53536]|0)|0;H=268;i=e;return H|0}else if((n|0)==136){c[53308]=1;c[53300]=ey(c[53854]|0,c[53536]|0)|0;H=268;i=e;return H|0}else if((n|0)==162){ab=c[53302]|0;if((ab|0)!=0){c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+28>>2]=(a[(c[53294]|0)+(ab-1)|0]|0)==10}H=a[c[53294]|0]|0;i=e;return H|0}else if((n|0)==188){ny(159416);return 0}else if((n|0)==199){c[$>>2]=0;ny(154408);return 0}else if((n|0)==203){ny(154408);return 0}else if((n|0)==213){ny(148936);return 0}else if((n|0)==237){ny(163776);return 0}else if((n|0)==238){i=e;return H|0}return 0}function ky(){var a=0,b=0,d=0;a=c[53324]|0;if((a|0)==0){b=dF(4)|0;d=b;c[53324]=d;if((b|0)==0){ny(163504)}c[d>>2]=0;c[53322]=1;c[53320]=0;return}d=c[53322]|0;if((c[53320]|0)>>>0<(d-1|0)>>>0){return}b=d+8|0;d=gF(a,b<<2)|0;a=d;c[53324]=a;if((d|0)==0){ny(163504)}vF(a+(c[53322]<<2)|0,0,32)|0;c[53322]=b;return}function ly(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;e=dF(48)|0;f=e;if((e|0)==0){ny(131672);return 0}c[e+12>>2]=d;g=dF(d+2|0)|0;c[e+4>>2]=g;if((g|0)==0){ny(131672);return 0}c[e+20>>2]=1;d=Vb()|0;h=c[d>>2]|0;c[e+16>>2]=0;a[g]=0;a[g+1|0]=0;c[e+8>>2]=g;c[e+28>>2]=1;c[e+44>>2]=0;g=c[53324]|0;if((g|0)==0){i=0}else{i=c[g+(c[53320]<<2)>>2]|0}if((i|0)==(f|0)){i=g+(c[53320]<<2)|0;c[53310]=c[(c[i>>2]|0)+16>>2];j=c[(c[i>>2]|0)+8>>2]|0;c[53318]=j;c[53294]=j;c[53304]=c[c[i>>2]>>2];a[213264]=a[j]|0;c[e>>2]=b;c[e+40>>2]=1;k=10}else{c[e>>2]=b;c[e+40>>2]=1;if((g|0)==0){l=0}else{k=10}}if((k|0)==10){l=c[g+(c[53320]<<2)>>2]|0}if((l|0)!=(f|0)){c[e+32>>2]=1;c[e+36>>2]=0}if((b|0)==0){m=0;n=e+24|0;o=n;c[o>>2]=m;c[d>>2]=h;return f|0}m=(Ob(Ta(b|0)|0)|0)>0|0;n=e+24|0;o=n;c[o>>2]=m;c[d>>2]=h;return f|0}function my(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;d=c[53324]|0;if((d|0)==0){e=3}else{if((c[d+(c[53320]<<2)>>2]|0)==0){e=3}else{f=d;e=5}}do{if((e|0)==3){ky();d=ly(c[53304]|0,16384)|0;c[(c[53324]|0)+(c[53320]<<2)>>2]=d;d=c[53324]|0;if((d|0)!=0){f=d;e=5;break}d=Vb()|0;g=0;h=d;i=c[d>>2]|0}}while(0);do{if((e|0)==5){d=c[f+(c[53320]<<2)>>2]|0;j=Vb()|0;k=c[j>>2]|0;if((d|0)==0){g=0;h=j;i=k;break}c[d+16>>2]=0;l=d+4|0;a[c[l>>2]|0]=0;a[(c[l>>2]|0)+1|0]=0;c[d+8>>2]=c[l>>2];c[d+28>>2]=1;c[d+44>>2]=0;l=c[53324]|0;if((l|0)==0){m=0}else{m=c[l+(c[53320]<<2)>>2]|0}if((m|0)!=(d|0)){g=d;h=j;i=k;break}n=l+(c[53320]<<2)|0;c[53310]=c[(c[n>>2]|0)+16>>2];l=c[(c[n>>2]|0)+8>>2]|0;c[53318]=l;c[53294]=l;c[53304]=c[c[n>>2]>>2];a[213264]=a[l]|0;g=d;h=j;i=k}}while(0);c[g>>2]=b;c[g+40>>2]=1;m=c[53324]|0;if((m|0)==0){o=0}else{o=c[m+(c[53320]<<2)>>2]|0}if((o|0)!=(g|0)){c[g+32>>2]=1;c[g+36>>2]=0}if((b|0)==0){p=0}else{p=(Ob(Ta(b|0)|0)|0)>0|0}c[g+24>>2]=p;c[h>>2]=i;i=(c[53324]|0)+(c[53320]<<2)|0;c[53310]=c[(c[i>>2]|0)+16>>2];h=c[(c[i>>2]|0)+8>>2]|0;c[53318]=h;c[53294]=h;c[53304]=c[c[i>>2]>>2];a[213264]=a[h]|0;return}function ny(a){a=a|0;var b=0;gc(c[o>>2]|0,168432,(b=i,i=i+8|0,c[b>>2]=a,b)|0)|0;i=b;mb(2)}function oy(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;d=i;i=i+2064|0;e=d+2048|0;Iv(e,1024,d|0);f=c[53674]|0;if((f|0)!=0){Lv(e,f)|0;Lv(e,98096)|0}Lv(e,b)|0;b=d+1024|0;nb(b|0,92536,(f=i,i=i+8|0,c[f>>2]=c[5104],f)|0)|0;i=f;Lv(e,b)|0;Lv(e,c[53294]|0)|0;Lv(e,87168)|0;b=e+4|0;g=c[b>>2]|0;if(g>>>0<(c[e+8>>2]|0)>>>0){h=g}else{Jv(e,1)|0;h=c[b>>2]|0}a[h]=0;h=c[e>>2]|0;c[b>>2]=h;Fv(0,h,(f=i,i=i+1|0,i=i+7&-8,c[f>>2]=0,f)|0)|0;i=f;Mv(e);i=d;return}function py(){var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;b=c[53294]|0;d=c[53318]|0;a[d]=a[213264]|0;e=c[53320]|0;f=c[53324]|0;g=c[f+(e<<2)>>2]|0;h=c[g+4>>2]|0;if(d>>>0>=(h+2|0)>>>0){i=b;j=d;k=j-1|0;a[k]=64;c[53294]=i;l=a[k]|0;a[213264]=l;c[53318]=k;return}m=(c[53310]|0)+2|0;n=c[g+12>>2]|0;g=h+(n+2)|0;o=h+m|0;if((m|0)>0){m=g;h=o;do{h=h-1|0;m=m-1|0;a[m]=a[h]|0;p=c[53320]|0;q=c[53324]|0;r=c[q+(p<<2)>>2]|0;}while(h>>>0>(c[r+4>>2]|0)>>>0);s=m;t=h;u=c[r+12>>2]|0;v=p;w=q}else{s=g;t=o;u=n;v=e;w=f}f=s-t|0;t=d+f|0;c[53310]=u;c[(c[w+(v<<2)>>2]|0)+16>>2]=u;if(t>>>0<((c[(c[(c[53324]|0)+(c[53320]<<2)>>2]|0)+4>>2]|0)+2|0)>>>0){ny(82416)}else{i=b+f|0;j=t;k=j-1|0;a[k]=64;c[53294]=i;l=a[k]|0;a[213264]=l;c[53318]=k;return}}function qy(){var b=0,d=0,e=0;b=c[53324]|0;if((b|0)==0){return}d=c[b+(c[53320]<<2)>>2]|0;if((d|0)==0){return}c[d+16>>2]=0;b=d+4|0;a[c[b>>2]|0]=0;a[(c[b>>2]|0)+1|0]=0;c[d+8>>2]=c[b>>2];c[d+28>>2]=1;c[d+44>>2]=0;b=c[53324]|0;if((b|0)==0){e=0}else{e=c[b+(c[53320]<<2)>>2]|0}if((e|0)!=(d|0)){return}d=b+(c[53320]<<2)|0;c[53310]=c[(c[d>>2]|0)+16>>2];b=c[(c[d>>2]|0)+8>>2]|0;c[53318]=b;c[53294]=b;c[53304]=c[c[d>>2]>>2];a[213264]=a[b]|0;return}function ry(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;f=i;i=i+120|0;g=f|0;h=f+56|0;j=f+112|0;do{if((d|0)!=0){if((Yw(b,0,d,j,0)|0)==0){break}k=c[j>>2]|0;l=b+40|0;By(b,c[l>>2]|0,174032);c[h+4>>2]=k;k=c[l>>2]|0;l=Hc[c[k>>2]&63](k,h|0,4)|0;if((l|0)==0){break}else{m=l}i=f;return m|0}}while(0);if((e|0)==0){m=0;i=f;return m|0}if((Yw(b,0,d,j,1)|0)==0){m=0;i=f;return m|0}d=c[j>>2]|0;j=b+40|0;By(b,c[j>>2]|0,174032);c[g+4>>2]=d;e=c[j>>2]|0;j=Hc[c[e>>2]&63](e,g|0,4)|0;if((j|0)==0){g=sx(b,56)|0;c[g+52>>2]=c[b+52>>2];e=g+12|0;h=c[b+12>>2]|0;c[e>>2]=h;a[e]=h&255&-9;c[g+44>>2]=b;c[g+48>>2]=c[b+48>>2];c[g+4>>2]=d;n=Iw(g)|0}else{n=j}ax(b,0,n|0);m=n;i=f;return m|0}function sy(a){a=a|0;var b=0;b=c[a+40>>2]|0;return Hc[c[b>>2]&63](b,0,128)|0}function ty(a){a=a|0;var b=0,d=0,e=0;b=c[a+44>>2]|0;if((b|0)==0){d=0;return d|0}e=c[b+40>>2]|0;d=Hc[c[e>>2]&63](e,a|0,8)|0;return d|0}function uy(a){a=a|0;return c[a+44>>2]|0}function vy(a,b){a=a|0;b=b|0;var d=0;d=c[a+40>>2]|0;return Hc[c[d>>2]&63](d,b|0,2)|0}function wy(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0;e=c[53852]|0;a=(b|0)!=0;do{if((e|0)==0){if(a){eF(b);f=0;break}else{f=dF(d)|0;break}}else{if(a){tx(e,b);f=0;break}else{f=sx(e,d)|0;break}}}while(0);return f|0}function xy(a,b,d){a=a|0;b=b|0;d=d|0;d=c[53852]|0;if((d|0)==0){eF(b);return}else{tx(d,b);return}}function yy(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=b+28|0;f=c[e>>2]|0;c[e>>2]=114;c[53852]=a;a=$g(b,d)|0;c[e>>2]=f;c[53852]=0;return a|0}function zy(a,b,d){a=a|0;b=b|0;d=d|0;c[53852]=a;return Hc[c[b>>2]&63](b,d,2)|0}function Ay(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=(Wg(b,0,0)|0)+28|0;e=c[d>>2]|0;c[d>>2]=114;c[53852]=a;if((Vg(b)|0)!=0){f=1;return f|0}c[d>>2]=e;c[53852]=0;f=0;return f|0}function By(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)==0){return}if((Wg(b,0,0)|0)==(c|0)){return}Wg(b,c,0)|0;return}function Cy(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0;if((b|0)==0){e=117688;return e|0}if((a[b]|0)==0){e=117688;return e|0}f=d+1|0;a[d]=34;g=a[b]|0;if(((g&255)-48|0)>>>0<10>>>0|g<<24>>24==46){h=1}else{h=g<<24>>24==45|0}do{if(g<<24>>24==0){a[f]=34;a[d+2|0]=0;i=169768;j=126080}else{k=b+1|0;l=f;m=g;n=0;o=0;p=0;q=h;r=0;a:while(1){b:do{if((r|0)==0){s=k;t=l;u=m;v=n;w=o;x=p;y=q;while(1){z=u&255;do{if(u<<24>>24==34){a[t]=92;A=y;B=1;C=w;D=t+1|0}else{if((y|0)==0){E=u<<24>>24!=95&(tb(z|0)|0)==0&u<<24>>24>-1;A=0;B=E?1:x;C=w;D=t;break}if((u<<24>>24|0)==46){E=(w|0)==0;A=E?y:0;B=E?x:1;C=w+1|0;D=t;break}else if((u<<24>>24|0)==45){E=(v|0)==0;A=E?y:0;B=E?x:1;C=w;D=t;break}else{E=(z-48|0)>>>0<10>>>0;A=E?y:0;B=E?x:1;C=w;D=t;break}}}while(0);z=D+1|0;a[D]=u;E=s+1|0;F=a[s]|0;G=v+1|0;H=c[43162]|0;do{if((H|0)==0){I=B;J=G;K=z}else{if(F<<24>>24==0|(G|0)<(H|0)){I=B;J=G;K=z;break}if((tb(u<<24>>24|0)|0)!=0){L=1;M=A;N=B;O=C;P=G;Q=F;R=z;S=E;break b}T=a[D]|0;if(T<<24>>24<0|(T-45&255)>>>0<2>>>0|T<<24>>24==92){L=1;M=A;N=B;O=C;P=G;Q=F;R=z;S=E;break b}if(F<<24>>24>-1&(((tb(F&255|0)|0)!=0|F<<24>>24==46|F<<24>>24==45)^1)){L=1;M=A;N=B;O=C;P=G;Q=F;R=z;S=E;break b}a[z]=92;a[D+2|0]=10;I=1;J=0;K=D+3|0}}while(0);if(F<<24>>24==0){U=K;V=J;W=I;break a}else{s=E;t=K;u=F;v=J;w=C;x=I;y=A}}}else{y=k;x=l;w=m;v=n;u=o;t=p;s=q;c:while(1){z=w&255;do{if(w<<24>>24==34){a[x]=92;X=s;Y=1;Z=u;_=x+1|0}else{if((s|0)==0){G=w<<24>>24!=95&(tb(z|0)|0)==0&w<<24>>24>-1;X=0;Y=G?1:t;Z=u;_=x;break}if((w<<24>>24|0)==45){G=(v|0)==0;X=G?s:0;Y=G?t:1;Z=u;_=x;break}else if((w<<24>>24|0)==46){G=(u|0)==0;X=G?s:0;Y=G?t:1;Z=u+1|0;_=x;break}else{G=(z-48|0)>>>0<10>>>0;X=G?s:0;Y=G?t:1;Z=u;_=x;break}}}while(0);$=_+1|0;a[_]=w;aa=y+1|0;ba=a[y]|0;z=v+1|0;do{if((c[43162]|0)==0){ca=Y;da=z;ea=$}else{F=ba&255;E=ba<<24>>24==0;if(E){U=$;V=z;W=Y;break a}do{if((tb(w<<24>>24|0)|0)==0){G=a[_]|0;if(G<<24>>24<0|(G-45&255)>>>0<2>>>0|G<<24>>24==92){break}if(!(ba<<24>>24>-1&(((tb(F|0)|0)!=0|ba<<24>>24==46|ba<<24>>24==45)^1))){break c}}}while(0);if(E|(z|0)<(c[43162]|0)){ca=Y;da=z;ea=$;break}if((tb(a[_]|0)|0)!=0){L=1;M=X;N=Y;O=Z;P=z;Q=ba;R=$;S=aa;break b}G=a[_]|0;if(G<<24>>24<0|(G-45&255)>>>0<2>>>0|G<<24>>24==92){L=1;M=X;N=Y;O=Z;P=z;Q=ba;R=$;S=aa;break b}if(ba<<24>>24>-1&(((tb(F|0)|0)!=0|ba<<24>>24==46|ba<<24>>24==45)^1)){L=1;M=X;N=Y;O=Z;P=z;Q=ba;R=$;S=aa;break b}a[$]=92;a[_+2|0]=10;ca=1;da=0;ea=_+3|0}}while(0);if(ba<<24>>24==0){U=ea;V=da;W=ca;break a}else{y=aa;x=ea;w=ba;v=da;u=Z;t=ca;s=X}}a[$]=92;a[_+2|0]=10;L=0;M=X;N=1;O=Z;P=0;Q=ba;R=_+3|0;S=aa}}while(0);if(Q<<24>>24==0){U=R;V=P;W=N;break}else{k=S;l=R;m=Q;n=P;o=O;p=N;q=M;r=L}}a[U]=34;a[U+1|0]=0;if((W|0)!=0){e=d;return e|0}if((V|0)!=1){i=169768;j=126080;break}if(((a[b]|0)-45&255)>>>0<2>>>0){e=d}else{i=169768;j=126080;break}return e|0}}while(0);while(1){V=i+4|0;if((pm(j,b)|0)==0){e=d;fa=49;break}W=c[V>>2]|0;if((W|0)==0){e=b;fa=49;break}else{i=V;j=W}}if((fa|0)==49){return e|0}return 0}function Dy(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;d=((xF(b|0)|0)<<1)+2|0;e=d>>>0>1024>>>0?d:1024;d=c[44748]|0;if((e|0)>(c[44750]|0)){if((d|0)==0){f=dF(e)|0}else{f=gF(d,e)|0}c[44748]=f;c[44750]=e;g=f}else{g=d}if((gy(b)|0)==0){h=Cy(b,g)|0;return h|0}a[g]=60;d=g+1|0;f=a[b]|0;if(f<<24>>24==0){i=g;j=d}else{e=b;b=d;d=f;while(1){f=e+1|0;a[b]=d;k=b+1|0;l=a[f]|0;if(l<<24>>24==0){i=b;j=k;break}else{e=f;b=k;d=l}}}a[j]=62;a[i+2|0]=0;h=g;return h|0}function Ey(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;d=b|0;e=$w(d)|0;do{if((e|0)!=0){if((a[e]|0)==37){break}else{f=0}return f|0}}while(0);e=Vv(d)|0;a:do{if((e|0)!=0){g=Vv(uy(b)|0)|0;if((g|0)==0){break}h=bh(c[(Vv(Ix(d)|0)|0)+8>>2]|0)|0;if((h|0)<=0){break}i=c[e+12>>2]|0;j=g+12|0;g=0;b:while(1){k=c[i+(g<<2)>>2]|0;do{if((k|0)!=0){l=c[(c[j>>2]|0)+(g<<2)>>2]|0;if((l|0)==0){break}if((Ya(k|0,l|0)|0)!=0){f=0;break b}}}while(0);g=g+1|0;if((g|0)>=(h|0)){break a}}return f|0}}while(0);e=Uv(b,0)|0;if((e|0)==0){f=1;return f|0}if((bh(c[e+8>>2]|0)|0)>0){f=0;return f|0}else{return(bh(c[e+12>>2]|0)|0)<1|0}return 0}function Fy(b,d){b=b|0;d=d|0;var e=0,f=0,g=0;c[53668]=0;e=ew(b|0,141056)|0;do{if((e|0)!=0){if(((a[e]|0)-48|0)>>>0>=10>>>0){break}f=Ja(e|0,0,10)|0;if(!((f|0)==0|(f|0)>59)){break}c[43162]=f}}while(0);Gy(b,1);if((Hy(b,d,1)|0)==-1){g=-1;return g|0}if((Iy(b,d)|0)==-1){g=-1;return g|0}e=(c[53668]|0)-1|0;c[53668]=e;f=b+52|0;a:do{if((e|0)>0){b=e;while(1){b=b-1|0;if((Oc[c[(c[(c[f>>2]|0)+8>>2]|0)+4>>2]&255](d,130632)|0)==-1){g=-1;break}if((b|0)<=0){break a}}return g|0}}while(0);if((Oc[c[(c[(c[f>>2]|0)+8>>2]|0)+4>>2]&255](d,161536)|0)==-1){g=-1;return g|0}c[43162]=128;g=Ec[c[(c[(c[f>>2]|0)+8>>2]|0)+8>>2]&63](d)|0;return g|0}function Gy(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=a;c[d>>2]=c[d>>2]&-9;d=sy(a)|0;if((d|0)!=0){e=d;do{Gy(e,0);e=ty(e)|0;}while((e|0)!=0)}if((b|0)==0){return}b=ux(a)|0;if((b|0)==0){return}else{f=b}do{b=f;c[b>>2]=c[b>>2]&-9;b=mw(a,f)|0;if((b|0)!=0){e=b;do{b=e;c[b>>2]=c[b>>2]&-9;e=ow(a,e)|0;}while((e|0)!=0)}f=vx(a,f)|0;}while((f|0)!=0);return}function Hy(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;f=b;if((e|0)==0){if((uy(b)|0)==0){g=3}else{h=0;i=213448;j=151608}}else{g=3}if((g|0)==3){k=(a[b+12|0]&1)==0?213448:148768;l=(Pw(b)|0)==0;c[53512]=Wv(b,2,142576,0)|0;c[53684]=Wv(b,2,139520,0)|0;h=1;i=l?213448:145552;j=k}k=$w(b|0)|0;if((k|0)==0){g=6}else{if((a[k]|0)==37){g=6}else{m=136888;n=k}}if((g|0)==6){m=213448;n=213448}g=c[53668]|0;k=b+52|0;a:do{if((g|0)>0){l=g;while(1){l=l-1|0;if((Oc[c[(c[(c[k>>2]|0)+8>>2]|0)+4>>2]&255](d,130632)|0)==-1){o=-1;break}if((l|0)<=0){break a}}return o|0}}while(0);if((Oc[c[(c[(c[k>>2]|0)+8>>2]|0)+4>>2]&255](d,i)|0)==-1){o=-1;return o|0}do{if(!((a[n]|0)==0&(h|0)==0)){if((Oc[c[(c[(c[k>>2]|0)+8>>2]|0)+4>>2]&255](d,j)|0)==-1){o=-1;return o|0}if((Oc[c[(c[(c[k>>2]|0)+8>>2]|0)+4>>2]&255](d,133952)|0)==-1){o=-1;return o|0}if((a[n]|0)==0){break}i=Dy(n)|0;if((Oc[c[(c[(c[k>>2]|0)+8>>2]|0)+4>>2]&255](d,i)|0)==-1){o=-1}else{break}return o|0}}while(0);if((Oc[c[(c[(c[k>>2]|0)+8>>2]|0)+4>>2]&255](d,m)|0)==-1){o=-1;return o|0}if((Oc[c[(c[(c[k>>2]|0)+8>>2]|0)+4>>2]&255](d,131968)|0)==-1){o=-1;return o|0}c[53668]=(c[53668]|0)+1;k=Uv(b,0)|0;do{if((k|0)!=0){if((Oy(b,d,129280,c[k+16>>2]|0,e)|0)==-1){o=-1;return o|0}if((Oy(b,d,126080,c[k+8>>2]|0,e)|0)==-1){o=-1;return o|0}if((Oy(b,d,123600,c[k+12>>2]|0,e)|0)==-1){o=-1}else{break}return o|0}}while(0);c[f>>2]=c[f>>2]|8;o=0;return o|0}function Iy(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0;e=i;i=i+24|0;if((Jy(b,d)|0)==-1){f=-1;i=e;return f|0}g=Uv(Ix(b|0)|0,0)|0;h=ux(b)|0;if((h|0)==0){f=0;i=e;return f|0}j=(g|0)==0;k=e|0;l=g+12|0;m=g+8|0;g=h;a:while(1){h=g;if((Ky(b,g,(c[h>>2]|0)>>>4)|0)!=0){if(j){n=0}else{n=c[m>>2]|0}if((Ly(g,d,n)|0)==-1){f=-1;o=43;break}}p=mw(b,g)|0;if((p|0)!=0){q=g;r=p;while(1){p=r;s=r-32|0;t=c[((c[p>>2]&3|0)==2?r:s)+28>>2]|0;do{if((q|0)==(t|0)){u=q}else{if((Ky(b,t,(c[h>>2]|0)>>>4)|0)==0){u=q;break}if(j){v=0}else{v=c[m>>2]|0}if((Ly(c[((c[p>>2]&3|0)==2?r:s)+28>>2]|0,d,v)|0)==-1){f=-1;o=43;break a}u=c[((c[p>>2]&3|0)==2?r:s)+28>>2]|0}}while(0);t=sy(b)|0;b:do{if((t|0)==0){o=19}else{w=t;while(1){if((Ey(w)|0)==0){if((xw(w,r,0)|0)!=0){break b}}x=ty(w)|0;if((x|0)==0){o=19;break}else{w=x}}}}while(0);if((o|0)==19){o=0;if(j){y=0}else{y=c[l>>2]|0}t=c[p>>2]&3;w=c[((t|0)==3?r:r+32|0)+28>>2]|0;x=c[((t|0)==2?r:s)+28>>2]|0;t=w|0;z=Hx(t)|0;A=c[53668]|0;B=z+52|0;if((A|0)>0){z=A;do{z=z-1|0;if((Oc[c[(c[(c[B>>2]|0)+8>>2]|0)+4>>2]&255](d,130632)|0)==-1){f=-1;o=43;break a}}while((z|0)>0)}z=$w(t)|0;s=Hx(t)|0;if((z|0)==0){nb(k|0,160056,(C=i,i=i+8|0,c[C>>2]=c[w+4>>2],C)|0)|0;i=C;if((Oc[c[(c[(c[s+52>>2]|0)+8>>2]|0)+4>>2]&255](d,k)|0)==-1){f=-1;o=43;break a}}else{A=Dy(z)|0;if((Oc[c[(c[(c[s+52>>2]|0)+8>>2]|0)+4>>2]&255](d,A)|0)==-1){f=-1;o=43;break a}}if((My(r,d,c[53512]|0)|0)==-1){f=-1;o=43;break a}A=(Nw(Hx(t)|0)|0)!=0;if((Oc[c[(c[(c[B>>2]|0)+8>>2]|0)+4>>2]&255](d,A?116312:109e3)|0)==-1){f=-1;o=43;break a}A=x|0;s=$w(A)|0;z=Hx(A)|0;if((s|0)==0){nb(k|0,160056,(C=i,i=i+8|0,c[C>>2]=c[x+4>>2],C)|0)|0;i=C;if((Oc[c[(c[(c[z+52>>2]|0)+8>>2]|0)+4>>2]&255](d,k)|0)==-1){f=-1;o=43;break a}}else{A=Dy(s)|0;if((Oc[c[(c[(c[z+52>>2]|0)+8>>2]|0)+4>>2]&255](d,A)|0)==-1){f=-1;o=43;break a}}if((My(r,d,c[53684]|0)|0)==-1){f=-1;o=43;break a}A=r|0;do{if((c[p>>2]&8|0)==0){if((Ny(A,d,y)|0)==-1){f=-1;o=43;break a}}else{z=$w(A)|0;s=Hx(A)|0;if((z|0)==0){break}if((a[z]|0)==0){break}D=s+52|0;if((Oc[c[(c[(c[D>>2]|0)+8>>2]|0)+4>>2]&255](d,97624)|0)==-1){f=-1;o=43;break a}s=Dy(z)|0;if((Oc[c[(c[(c[D>>2]|0)+8>>2]|0)+4>>2]&255](d,s)|0)==-1){f=-1;o=43;break a}if((Oc[c[(c[(c[D>>2]|0)+8>>2]|0)+4>>2]&255](d,92088)|0)==-1){f=-1;o=43;break a}}}while(0);if((Oc[c[(c[(c[B>>2]|0)+8>>2]|0)+4>>2]&255](d,103256)|0)==-1){f=-1;o=43;break a}}A=ow(b,r)|0;if((A|0)==0){break}else{q=u;r=A}}}r=vx(b,g)|0;if((r|0)==0){f=0;o=43;break}else{g=r}}if((o|0)==43){i=e;return f|0}return 0}function Jy(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;d=sy(a)|0;if((d|0)==0){e=0;return e|0}else{f=d}a:while(1){if((Ey(f)|0)==0){if((Hy(f,b,0)|0)==-1){e=-1;g=11;break}if((Iy(f,b)|0)==-1){e=-1;g=11;break}d=(c[53668]|0)-1|0;c[53668]=d;a=f+52|0;if((d|0)>0){h=d;do{h=h-1|0;if((Oc[c[(c[(c[a>>2]|0)+8>>2]|0)+4>>2]&255](b,130632)|0)==-1){e=-1;g=11;break a}}while((h|0)>0)}if((Oc[c[(c[(c[a>>2]|0)+8>>2]|0)+4>>2]&255](b,161536)|0)==-1){e=-1;g=11;break}}else{Jy(f,b)|0}h=ty(f)|0;if((h|0)==0){e=0;g=11;break}else{f=h}}if((g|0)==11){return e|0}return 0}function Ky(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=sy(a)|0;a:do{if((e|0)!=0){f=e;while(1){if((Ey(f)|0)==0){if((zx(f,b,0)|0)!=0){g=0;break}}f=ty(f)|0;if((f|0)==0){break a}}return g|0}}while(0);if((c[b>>2]|0)>>>4>>>0<d>>>0){g=0;return g|0}e=pw(a,b)|0;b:do{if((e|0)!=0){f=e;while(1){if((c[c[f+28>>2]>>2]|0)>>>4>>>0<d>>>0){g=0;break}f=qw(a,f)|0;if((f|0)==0){break b}}return g|0}}while(0);do{if((pw(a,b)|0)==0){if((mw(a,b)|0)==0){g=1}else{break}return g|0}}while(0);a=Vv(b|0)|0;if((a|0)==0){g=0;return g|0}b=a+8|0;d=c[b>>2]|0;e=Hc[c[d>>2]&63](d,0,128)|0;if((e|0)==0){g=0;return g|0}d=a+12|0;a=e;while(1){if((c[(c[d>>2]|0)+(c[a+16>>2]<<2)>>2]|0)!=(c[a+12>>2]|0)){g=1;h=16;break}e=c[b>>2]|0;f=Hc[c[e>>2]&63](e,a,8)|0;if((f|0)==0){g=0;h=16;break}else{a=f}}if((h|0)==16){return g|0}return 0}function Ly(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;e=i;i=i+24|0;f=e|0;g=a|0;h=Hx(g)|0;j=c[53668]|0;k=h+52|0;a:do{if((j|0)>0){h=j;while(1){h=h-1|0;if((Oc[c[(c[(c[k>>2]|0)+8>>2]|0)+4>>2]&255](b,130632)|0)==-1){l=-1;break}if((h|0)<=0){break a}}i=e;return l|0}}while(0);j=f|0;f=$w(g)|0;h=Hx(g)|0;do{if((f|0)==0){nb(j|0,160056,(m=i,i=i+8|0,c[m>>2]=c[a+4>>2],m)|0)|0;i=m;if((Oc[c[(c[(c[h+52>>2]|0)+8>>2]|0)+4>>2]&255](b,j)|0)==-1){l=-1}else{break}i=e;return l|0}else{m=Dy(f)|0;if((Oc[c[(c[(c[h+52>>2]|0)+8>>2]|0)+4>>2]&255](b,m)|0)==-1){l=-1}else{break}i=e;return l|0}}while(0);do{if((c[a>>2]&8|0)==0){if((Ny(g,b,d)|0)==-1){l=-1}else{break}i=e;return l|0}}while(0);l=Oc[c[(c[(c[k>>2]|0)+8>>2]|0)+4>>2]&255](b,103256)|0;i=e;return l|0}function My(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;if((e|0)==0){f=0;return f|0}g=b|0;b=Hx(g)|0;h=fw(g,e)|0;if((a[h]|0)==0){f=0;return f|0}e=b+52|0;if((Oc[c[(c[(c[e>>2]|0)+8>>2]|0)+4>>2]&255](d,164120)|0)==-1){f=-1;return f|0}do{if((gy(h)|0)==0){b=gb(h|0,58)|0;if((b|0)==0){g=((xF(h|0)|0)<<1)+2|0;i=g>>>0>1024>>>0?g:1024;g=c[44748]|0;if((i|0)>(c[44750]|0)){if((g|0)==0){j=dF(i)|0}else{j=gF(g,i)|0}c[44748]=j;c[44750]=i;k=j}else{k=g}g=Cy(h,k)|0;if((Oc[c[(c[(c[e>>2]|0)+8>>2]|0)+4>>2]&255](d,g)|0)==-1){f=-1}else{break}return f|0}a[b]=0;g=((xF(h|0)|0)<<1)+2|0;i=g>>>0>1024>>>0?g:1024;g=c[44748]|0;if((i|0)>(c[44750]|0)){if((g|0)==0){l=dF(i)|0}else{l=gF(g,i)|0}c[44748]=l;c[44750]=i;m=l}else{m=g}g=Cy(h,m)|0;if((Oc[c[(c[(c[e>>2]|0)+8>>2]|0)+4>>2]&255](d,g)|0)==-1){f=-1;return f|0}if((Oc[c[(c[(c[e>>2]|0)+8>>2]|0)+4>>2]&255](d,164120)|0)==-1){f=-1;return f|0}g=b+1|0;i=((xF(g|0)|0)<<1)+2|0;n=i>>>0>1024>>>0?i:1024;i=c[44748]|0;if((n|0)>(c[44750]|0)){if((i|0)==0){o=dF(n)|0}else{o=gF(i,n)|0}c[44748]=o;c[44750]=n;p=o}else{p=i}i=Cy(g,p)|0;if((Oc[c[(c[(c[e>>2]|0)+8>>2]|0)+4>>2]&255](d,i)|0)==-1){f=-1;return f|0}else{a[b]=58;break}}else{b=Dy(h)|0;if((Oc[c[(c[(c[e>>2]|0)+8>>2]|0)+4>>2]&255](d,b)|0)==-1){f=-1}else{break}return f|0}}while(0);f=0;return f|0}function Ny(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;f=b;do{if(((c[f>>2]&3)-2|0)>>>0<2>>>0){g=$w(b)|0;h=Hx(b)|0;if((g|0)==0){i=0;break}if((a[g]|0)==0){i=0;break}j=h+52|0;if((Oc[c[(c[(c[j>>2]|0)+8>>2]|0)+4>>2]&255](d,97624)|0)==-1){k=-1;return k|0}h=Dy(g)|0;if((Oc[c[(c[(c[j>>2]|0)+8>>2]|0)+4>>2]&255](d,h)|0)==-1){k=-1}else{i=1;break}return k|0}else{i=0}}while(0);h=Vv(b)|0;j=Hx(b)|0;a:do{if((h|0)==0){l=i}else{b=e|0;g=Hc[c[b>>2]&63](e,0,128)|0;if((g|0)==0){l=i;break}m=h+12|0;n=j+52|0;o=g;g=i;b:while(1){do{if(((c[f>>2]&3)-2|0)>>>0<2>>>0){p=c[53512]|0;if((p|0)!=0){if((c[o+16>>2]|0)==(c[p+16>>2]|0)){q=g;break}}p=c[53684]|0;if((p|0)==0){r=14;break}if((c[o+16>>2]|0)==(c[p+16>>2]|0)){q=g}else{r=14}}else{r=14}}while(0);do{if((r|0)==14){r=0;p=o+16|0;if((c[(c[m>>2]|0)+(c[p>>2]<<2)>>2]|0)==(c[o+12>>2]|0)){q=g;break}s=g+1|0;do{if((g|0)==0){t=c[53668]|0;if((t|0)>0){u=t;do{u=u-1|0;if((Oc[c[(c[(c[n>>2]|0)+8>>2]|0)+4>>2]&255](d,130632)|0)==-1){k=-1;r=33;break b}}while((u|0)>0)}if((Oc[c[(c[(c[n>>2]|0)+8>>2]|0)+4>>2]&255](d,86840)|0)==-1){k=-1;r=33;break b}c[53668]=(c[53668]|0)+1}else{if((Oc[c[(c[(c[n>>2]|0)+8>>2]|0)+4>>2]&255](d,82040)|0)==-1){k=-1;r=33;break b}u=c[53668]|0;if((u|0)>0){v=u}else{break}do{v=v-1|0;if((Oc[c[(c[(c[n>>2]|0)+8>>2]|0)+4>>2]&255](d,130632)|0)==-1){k=-1;r=33;break b}}while((v|0)>0)}}while(0);u=Dy(c[o+8>>2]|0)|0;if((Oc[c[(c[(c[n>>2]|0)+8>>2]|0)+4>>2]&255](d,u)|0)==-1){k=-1;r=33;break b}if((Oc[c[(c[(c[n>>2]|0)+8>>2]|0)+4>>2]&255](d,168256)|0)==-1){k=-1;r=33;break b}u=Dy(c[(c[m>>2]|0)+(c[p>>2]<<2)>>2]|0)|0;if((Oc[c[(c[(c[n>>2]|0)+8>>2]|0)+4>>2]&255](d,u)|0)==-1){k=-1;r=33;break b}else{q=s}}}while(0);u=Hc[c[b>>2]&63](e,o,8)|0;if((u|0)==0){l=q;break a}else{o=u;g=q}}if((r|0)==33){return k|0}}}while(0);do{if((l|0)>0){if((Oc[c[(c[(c[j+52>>2]|0)+8>>2]|0)+4>>2]&255](d,92088)|0)==-1){k=-1;return k|0}else{c[53668]=(c[53668]|0)-1;break}}}while(0);c[f>>2]=c[f>>2]|8;k=0;return k|0}function Oy(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;h=(g|0)!=0;if(h){i=0}else{i=fh(f,0)|0}g=f|0;j=Hc[c[g>>2]&63](f,0,128)|0;do{if((j|0)==0){k=34}else{l=(i|0)==0;m=i|0;n=b+52|0;o=0;p=j;a:while(1){q=p+12|0;r=c[q>>2]|0;if((r|0)==0){k=7}else{if((a[r]|0)==0){k=7}else{k=12}}do{if((k|0)==7){k=0;if((a[p+22|0]|0)!=0){k=12;break}if(l){s=o;break}r=Hc[c[m>>2]&63](i,p,4)|0;t=c[r+12>>2]|0;if((t|0)!=0){if((a[t]|0)!=0){k=12;break}}if((a[r+22|0]|0)==0){k=12}else{s=o}}}while(0);if((k|0)==12){k=0;r=o+1|0;do{if((o|0)==0){t=c[53668]|0;if((t|0)>0){u=t;do{u=u-1|0;if((Oc[c[(c[(c[n>>2]|0)+8>>2]|0)+4>>2]&255](d,130632)|0)==-1){v=-1;k=36;break a}}while((u|0)>0)}if((Oc[c[(c[(c[n>>2]|0)+8>>2]|0)+4>>2]&255](d,e)|0)==-1){v=-1;k=36;break a}if((Oc[c[(c[(c[n>>2]|0)+8>>2]|0)+4>>2]&255](d,86840)|0)==-1){v=-1;k=36;break a}c[53668]=(c[53668]|0)+1}else{if((Oc[c[(c[(c[n>>2]|0)+8>>2]|0)+4>>2]&255](d,82040)|0)==-1){v=-1;k=36;break a}u=c[53668]|0;if((u|0)>0){w=u}else{break}do{w=w-1|0;if((Oc[c[(c[(c[n>>2]|0)+8>>2]|0)+4>>2]&255](d,130632)|0)==-1){v=-1;k=36;break a}}while((w|0)>0)}}while(0);u=Dy(c[p+8>>2]|0)|0;if((Oc[c[(c[(c[n>>2]|0)+8>>2]|0)+4>>2]&255](d,u)|0)==-1){v=-1;k=36;break}if((Oc[c[(c[(c[n>>2]|0)+8>>2]|0)+4>>2]&255](d,168256)|0)==-1){v=-1;k=36;break}u=Dy(c[q>>2]|0)|0;if((Oc[c[(c[(c[n>>2]|0)+8>>2]|0)+4>>2]&255](d,u)|0)==-1){v=-1;k=36;break}else{s=r}}u=Hc[c[g>>2]&63](f,p,8)|0;if((u|0)==0){k=27;break}else{o=s;p=u}}if((k|0)==27){if((s|0)<=0){k=34;break}c[53668]=(c[53668]|0)-1;p=b+52|0;b:do{if((s|0)>1){if((Oc[c[(c[(c[p>>2]|0)+8>>2]|0)+4>>2]&255](d,121736)|0)==-1){v=-1;return v|0}o=c[53668]|0;if((o|0)>0){x=o}else{break}while(1){x=x-1|0;if((Oc[c[(c[(c[p>>2]|0)+8>>2]|0)+4>>2]&255](d,130632)|0)==-1){v=-1;break}if((x|0)<=0){break b}}return v|0}}while(0);r=(Oc[c[(c[(c[p>>2]|0)+8>>2]|0)+4>>2]&255](d,120864)|0)==-1;if(r|h){v=r<<31>>31}else{break}return v|0}else if((k|0)==36){return v|0}}}while(0);do{if((k|0)==34){if(h){v=0}else{break}return v|0}}while(0);fh(f,i)|0;v=0;return v|0}function Py(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0;f=i;i=i+8|0;g=f|0;h=g;j=ux(d)|0;if((j|0)==0){k=0;i=f;return k|0}l=d+8|0;m=c[o>>2]|0;n=0;p=0;q=j;j=0;while(1){r=mw(d,q)|0;if((r|0)==0){s=n;t=p;u=j}else{v=r;r=n;w=p;x=j;while(1){y=c[v>>2]&3;z=c[((y|0)==2?v:v-32|0)+28>>2]|0;A=(b[(c[v+8>>2]|0)+168>>1]|0)==0;do{if((q|0)==(z|0)){if(A){B=x;C=w;D=r;break}if((w|0)==0){E=jk(96)|0;c[E+84>>2]=jk(((Lw(d)|0)<<5)+11520|0)|0;F=E}else{F=w}Gt(F,v,c[(c[l>>2]|0)+236>>2]|0);B=x;C=F;D=r}else{if(A){B=x;C=w;D=r;break}E=c[((y|0)==3?v:v+32|0)+28>>2]|0;G=z+8|0;H=c[(c[G>>2]|0)+212>>2]|0;I=E+8|0;J=c[(c[I>>2]|0)+212>>2]|0;K=jk(12)|0;L=K;if((a[(c[G>>2]|0)+118|0]|0)==0){M=z|0;N=H}else{M=H;N=c[(c[(c[H+8>>2]|0)+132>>2]|0)+48>>2]|0}if((a[(c[I>>2]|0)+118|0]|0)==0){O=E|0;P=J}else{O=J;P=c[(c[(c[J+8>>2]|0)+132>>2]|0)+48>>2]|0}J=c[(c[(c[N+8>>2]|0)+132>>2]|0)+44>>2]|0;E=c[(c[(c[P+8>>2]|0)+132>>2]|0)+44>>2]|0;do{if((J|0)>(E|0)){I=M;H=J;G=N;while(1){Qy(L,G,I,0,e);Q=G|0;R=H-1|0;S=c[(c[(c[G+8>>2]|0)+132>>2]|0)+48>>2]|0;if((R|0)>(E|0)){I=Q;H=R;G=S}else{T=Q;U=O;V=S;W=P;break}}}else{if((E|0)>(J|0)){X=O;Y=E;Z=P}else{T=M;U=O;V=N;W=P;break}while(1){Qy(L,Z,X,0,e);G=Z|0;H=Y-1|0;I=c[(c[(c[Z+8>>2]|0)+132>>2]|0)+48>>2]|0;if((H|0)>(J|0)){X=G;Y=H;Z=I}else{T=M;U=G;V=N;W=I;break}}}}while(0);if((V|0)==(W|0)){_=U;$=T;aa=W}else{J=U;E=T;I=W;G=V;while(1){Qy(L,G,0,E,e);Qy(L,I,J,0,e);H=G|0;S=c[(c[(c[G+8>>2]|0)+132>>2]|0)+48>>2]|0;Q=I|0;R=c[(c[(c[I+8>>2]|0)+132>>2]|0)+48>>2]|0;if((S|0)==(R|0)){_=Q;$=H;aa=S;break}else{J=Q;E=H;I=R;G=S}}}Qy(L,aa,_,$,e);G=K+8|0;I=K;if((Hs(c[G>>2]|0,c[I>>2]|0)|0)==0){if((a[213992]|0)==0){B=1;C=w;D=L;break}Ma(155176,50,1,m|0)|0;B=1;C=w;D=L;break}E=IB(c[G>>2]|0,c[I>>2]|0)|0;if((E|0)==0){Fv(0,116504,(J=i,i=i+1|0,i=i+7&-8,c[J>>2]=0,J)|0)|0;i=J;B=1;C=w;D=L;break}if((v|0)!=0){J=v;do{S=J+8|0;R=(c[S>>2]|0)+144|0;It(h,J,E,0,c[G>>2]|0,c[I>>2]|0);H=R;R=c[g+4>>2]|0;c[H>>2]=c[g>>2];c[H+4>>2]=R;Jt(d,J,c[G>>2]|0,c[I>>2]|0,0);J=c[(c[S>>2]|0)+172>>2]|0;}while((J|0)!=0)}c[I>>2]=0;B=x;C=w;D=L}}while(0);z=ow(d,v)|0;if((z|0)==0){s=D;t=C;u=B;break}else{v=z;r=D;w=C;x=B}}}x=vx(d,q)|0;if((x|0)==0){break}else{n=s;p=t;q=x;j=u}}if((s|0)!=0){eF(c[s+8>>2]|0);eF(s)}if((t|0)==0){k=u;i=f;return k|0}eF(c[t+84>>2]|0);eF(t);k=u;i=f;return k|0}function Qy(b,d,e,f,i){b=b|0;d=d|0;e=e|0;f=f|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0.0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0.0,G=0.0,H=0.0,I=0;j=ux(d)|0;if((j|0)!=0){k=e;l=f;m=b+4|0;n=b|0;o=b+8|0;p=j;do{j=c[p+8>>2]|0;do{if(!((c[j+212>>2]|0)!=(d|0)|(p|0)==(k|0)|(p|0)==(l|0))){if((a[j+118|0]|0)!=0){break}q=Ht(p,i,0)|0;r=c[m>>2]|0;s=c[o>>2]|0;do{if((r|0)==(c[n>>2]|0)){if((s|0)==0){t=kk(400)|0;c[o>>2]=t;c[m>>2]=100;u=t;break}else{c[m>>2]=r<<1;t=mk(s,r<<3)|0;c[o>>2]=t;u=t;break}}else{u=s}}while(0);s=c[n>>2]|0;c[n>>2]=s+1;c[u+(s<<2)>>2]=q}}while(0);p=vx(d,p)|0;}while((p|0)!=0)}p=d+8|0;d=c[p>>2]|0;if((c[d+172>>2]|0)<1){return}u=e;e=f;f=i+8|0;n=i|0;o=i+4|0;i=b+4|0;m=b|0;l=b+8|0;b=1;k=d;while(1){d=c[(c[k+176>>2]|0)+(b<<2)>>2]|0;if((d|0)==(u|0)|(d|0)==(e|0)){v=k}else{j=jk(8)|0;s=j;r=c[d+8>>2]|0;w=+h[r+16>>3];x=+h[r+24>>3];y=+h[r+32>>3];z=+h[r+40>>3];c[j+4>>2]=4;r=jk(64)|0;d=j;c[d>>2]=r;if((a[f]|0)==0){A=+g[n>>2];B=+g[o>>2];C=(w+y)*.5*(A+-1.0);D=(x+z)*.5*(B+-1.0);E=z*B-D;F=y*A-C;G=x*B-D;H=w*A-C}else{C=+g[n>>2];A=+g[o>>2];E=z+A;F=y+C;G=x-A;H=w-C}h[r>>3]=H;h[(c[d>>2]|0)+8>>3]=G;h[(c[d>>2]|0)+16>>3]=H;h[(c[d>>2]|0)+24>>3]=E;h[(c[d>>2]|0)+32>>3]=F;h[(c[d>>2]|0)+40>>3]=E;h[(c[d>>2]|0)+48>>3]=F;h[(c[d>>2]|0)+56>>3]=G;d=c[i>>2]|0;r=c[l>>2]|0;do{if((d|0)==(c[m>>2]|0)){if((r|0)==0){j=kk(400)|0;c[l>>2]=j;c[i>>2]=100;I=j;break}else{c[i>>2]=d<<1;j=mk(r,d<<3)|0;c[l>>2]=j;I=j;break}}else{I=r}}while(0);r=c[m>>2]|0;c[m>>2]=r+1;c[I+(r<<2)>>2]=s;v=c[p>>2]|0}if((b|0)<(c[v+172>>2]|0)){b=b+1|0;k=v}else{break}}return}function Ry(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;f=i;i=i+128|0;g=f|0;h=jk(Lw(b)|0)|0;j=b+8|0;k=c[c[(c[j>>2]|0)+132>>2]>>2]|0;do{if((k|0)==0){l=0;m=0}else{n=g|0;o=$w(b|0)|0;p=c[53848]|0;nb(n|0,126592,(q=i,i=i+16|0,c[q>>2]=o,c[q+8>>2]=p,q)|0)|0;i=q;p=ry(b,n,1)|0;Wx(p|0,154280,272,1)|0;n=jk(56)|0;o=p+8|0;c[(c[o>>2]|0)+132>>2]=n;c[c[(c[o>>2]|0)+132>>2]>>2]=k;c[(c[(c[o>>2]|0)+132>>2]|0)+4>>2]=c[(c[(c[j>>2]|0)+132>>2]|0)+4>>2];o=c[k+4>>2]|0;if((o|0)==0){l=p;m=1;break}else{r=k;s=o}while(1){if((a[h+(c[(c[s+8>>2]|0)+120>>2]|0)|0]|0)==0){Sy(b,s,p,h)}o=c[r+20>>2]|0;if((o|0)==0){l=p;m=1;break}else{r=r+16|0;s=o}}}}while(0);s=ux(b)|0;if((s|0)==0){t=m;u=l;v=0}else{r=g|0;k=b|0;j=m;m=l;l=s;s=0;while(1){p=c[l+8>>2]|0;do{if((a[h+(c[p+120>>2]|0)|0]|0)==0){if((a[p+119|0]|0)!=3){w=s;x=m;y=j;break}if((m|0)==0){o=$w(k)|0;n=(c[53848]|0)+j|0;nb(r|0,126592,(q=i,i=i+16|0,c[q>>2]=o,c[q+8>>2]=n,q)|0)|0;i=q;n=ry(b,r,1)|0;Wx(n|0,154280,272,1)|0;o=jk(56)|0;c[(c[n+8>>2]|0)+132>>2]=o;z=n;A=j+1|0}else{z=m;A=j}Sy(b,l,z,h);w=1;x=z;y=A}else{w=s;x=m;y=j}}while(0);p=vx(b,l)|0;if((p|0)==0){t=y;u=x;v=w;break}else{j=y;m=x;l=p;s=w}}}if((u|0)!=0){jv(u)|0}u=ux(b)|0;if((u|0)==0){B=t}else{w=g|0;g=b|0;s=t;t=u;while(1){if((a[h+(c[(c[t+8>>2]|0)+120>>2]|0)|0]|0)==0){u=$w(g)|0;l=(c[53848]|0)+s|0;nb(w|0,123560,(q=i,i=i+16|0,c[q>>2]=u,c[q+8>>2]=l,q)|0)|0;i=q;l=ry(b,w,1)|0;Wx(l|0,154280,272,1)|0;u=jk(56)|0;c[(c[l+8>>2]|0)+132>>2]=u;Sy(b,t,l,h);jv(l)|0;C=s+1|0}else{C=s}l=vx(b,t)|0;if((l|0)==0){B=C;break}else{s=C;t=l}}}eF(h);c[53848]=(c[53848]|0)+B;if((d|0)!=0){c[d>>2]=B}if((e|0)!=0){c[e>>2]=v}v=jk((B<<2)+4|0)|0;e=sy(b)|0;if((e|0)==0){D=B;E=v}else{b=B;B=e;e=v;while(1){d=e+4|0;c[e>>2]=B;h=b-1|0;t=ty(B)|0;if((t|0)==0){D=h;E=d;break}else{b=h;B=t;e=d}}}if((D|0)==0){c[E>>2]=0;i=f;return v|0}else{cc(114768,107904,134,170616);return 0}return 0}function Sy(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0;a[f+(c[(c[d+8>>2]|0)+120>>2]|0)|0]=1;zx(e,d,1)|0;g=rw(b,d)|0;if((g|0)==0){return}else{h=g}do{g=c[h>>2]&3;i=c[((g|0)==3?h:h+32|0)+28>>2]|0;if((i|0)==(d|0)){j=c[((g|0)==2?h:h-32|0)+28>>2]|0}else{j=i}if((a[f+(c[(c[j+8>>2]|0)+120>>2]|0)|0]|0)==0){Sy(b,j,e,f)}h=sw(b,h,d)|0;}while((h|0)!=0);return}function Ty(b){b=b|0;var d=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,p=0.0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;d=i;i=i+8|0;f=d|0;Zx(b,1,102216,304,1);bn(b)|0;g=jk(((Lw(b)|0)<<2)+4|0)|0;j=b+8|0;c[(c[j>>2]|0)+144>>2]=g;g=ux(b)|0;if((g|0)!=0){k=g;g=0;while(1){Ym(k);l=k|0;m=jk(e[(c[(Hx(l)|0)+8>>2]|0)+168>>1]<<3)|0;n=k+8|0;c[(c[n>>2]|0)+132>>2]=m;vn(k,c[(c[(Hx(l)|0)+8>>2]|0)+116>>2]&1);c[(c[(c[j>>2]|0)+144>>2]|0)+(g<<2)>>2]=k;c[(c[n>>2]|0)+120>>2]=g;n=vx(b,k)|0;if((n|0)==0){break}else{k=n;g=g+1|0}}}g=Wv(b,2,145056,0)|0;k=ux(b)|0;if((k|0)!=0){n=k;do{k=mw(b,n)|0;if((k|0)!=0){l=k;do{k=l|0;Wx(k,91160,176,1)|0;p=+Fm(k,c[53750]|0,1.0,0.0);m=l+8|0;h[(c[m>>2]|0)+128>>3]=p;p=+Fm(k,g,+h[(c[6536]|0)+32>>3],0.0);h[(c[m>>2]|0)+136>>3]=p;Zm(l)|0;l=ow(b,l)|0;}while((l|0)!=0)}n=vx(b,n)|0;}while((n|0)!=0)}n=Wv(b,1,111528,0)|0;if((n|0)==0){q=1;r=0;i=d;return}g=Wv(b,1,104752,0)|0;b=c[c[(c[j>>2]|0)+144>>2]>>2]|0;if((b|0)==0){q=1;r=0;i=d;return}l=c[o>>2]|0;if((g|0)==0){m=0;k=b;do{s=k|0;t=fw(s,n)|0;do{if((a[t]|0)!=0){u=k+8|0;v=c[(c[u>>2]|0)+132>>2]|0;a[f]=0;w=v+8|0;x=ac(t|0,103888,(y=i,i=i+24|0,c[y>>2]=v,c[y+8>>2]=w,c[y+16>>2]=f,y)|0)|0;i=y;if((x|0)<=1){x=$w(s)|0;gc(l|0,96448,(y=i,i=i+16|0,c[y>>2]=x,c[y+8>>2]=t,y)|0)|0;i=y;break}p=+h[21580];if(p>0.0){x=v;h[x>>3]=+h[x>>3]/p;x=w;h[x>>3]=+h[x>>3]/+h[21580]}a[(c[u>>2]|0)+119|0]=1;if((a[f]|0)!=33){break}a[(c[u>>2]|0)+119|0]=3}}while(0);m=m+1|0;k=c[(c[(c[j>>2]|0)+144>>2]|0)+(m<<2)>>2]|0;}while((k|0)!=0);q=1;r=0;i=d;return}else{z=0;A=b}do{b=A|0;k=fw(b,n)|0;do{if((a[k]|0)!=0){m=A+8|0;t=c[(c[m>>2]|0)+132>>2]|0;a[f]=0;s=t+8|0;u=ac(k|0,103888,(y=i,i=i+24|0,c[y>>2]=t,c[y+8>>2]=s,c[y+16>>2]=f,y)|0)|0;i=y;if((u|0)<=1){u=$w(b)|0;gc(l|0,96448,(y=i,i=i+16|0,c[y>>2]=u,c[y+8>>2]=k,y)|0)|0;i=y;break}p=+h[21580];if(p>0.0){u=t;h[u>>3]=+h[u>>3]/p;u=s;h[u>>3]=+h[u>>3]/+h[21580]}a[(c[m>>2]|0)+119|0]=1;if((a[f]|0)!=33){if((Km(fw(b,g)|0)|0)<<24>>24==0){break}}a[(c[m>>2]|0)+119|0]=3}}while(0);z=z+1|0;A=c[(c[(c[j>>2]|0)+144>>2]|0)+(z<<2)>>2]|0;}while((A|0)!=0);q=1;r=0;i=d;return}function Uy(a){a=a|0;var b=0,d=0,e=0;b=ux(a)|0;if((b|0)!=0){d=b;do{b=mw(a,d)|0;if((b|0)!=0){e=b;do{tn(e);e=ow(a,e)|0;}while((e|0)!=0)}un(d);d=vx(a,d)|0;}while((d|0)!=0)}Vy(a);d=a+8|0;eF(c[(c[d>>2]|0)+144>>2]|0);eF(c[(c[d>>2]|0)+132>>2]|0);return}function Vy(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0;b=a+8|0;d=c[b>>2]|0;e=c[d+176>>2]|0;if((c[d+172>>2]|0)<1){f=e}else{d=1;g=e;while(1){e=c[g+(d<<2)>>2]|0;h=e+8|0;dk(c[(c[h>>2]|0)+12>>2]|0);i=c[(c[h>>2]|0)+132>>2]|0;if((i|0)!=0){eF(c[i>>2]|0);eF(c[(c[h>>2]|0)+132>>2]|0)}Vy(e);e=c[b>>2]|0;h=c[e+176>>2]|0;if((d|0)<(c[e+172>>2]|0)){d=d+1|0;g=h}else{f=h;break}}}eF(f);f=a|0;if((Ix(f)|0)==(a|0)){return}Xx(f,120088)|0;return}function Wy(a){a=a|0;var b=0,d=0,e=0,f=0;b=kk(24)|0;d=b;c[53372]=d;c[b>>2]=$g(25440,c[43330]|0)|0;c[b+16>>2]=0;c[b+12>>2]=0;e=kk(16)|0;c[e+12>>2]=0;f=kk(a*20|0)|0;c[e>>2]=f;c[e+8>>2]=f+(a*20|0);c[e+4>>2]=f;c[b+4>>2]=e;return d|0}function Xy(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=a+12|0;e=c[d>>2]|0;if((e|0)>=(b|0)){return}f=e<<1;e=(f|0)<(b|0)?b:f;f=a+16|0;a=c[f>>2]|0;if((a|0)!=0){eF(a)}c[f>>2]=kk(e<<3)|0;c[d>>2]=e;return}function Yy(a){a=a|0;var b=0;b=c[a>>2]|0;Hc[c[b>>2]&63](b,0,64)|0;c[a+20>>2]=c[a+16>>2];b=c[a+4>>2]|0;c[a+8>>2]=b;c[b+4>>2]=c[b>>2];return}function Zy(a){a=a|0;var b=0,d=0;Vg(c[a>>2]|0)|0;b=c[a+4>>2]|0;if((b|0)!=0){d=b;while(1){b=c[d+12>>2]|0;eF(c[d>>2]|0);eF(d);if((b|0)==0){break}else{d=b}}}eF(c[a+16>>2]|0);eF(a);return}function _y(a,b,e,f){a=a|0;b=b|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0;g=i;i=i+24|0;h=g|0;c[h>>2]=b;c[h+4>>2]=e;j=c[a>>2]|0;k=(Hc[c[j>>2]&63](j,h,1)|0)+8|0;h=c[k>>2]|0;j=a+20|0;a=c[j>>2]|0;c[j>>2]=a+8;c[a>>2]=f;c[a+4>>2]=h;c[k>>2]=a;if((d[213992]|0)>>>0<=2>>>0){i=g;return}a=c[o>>2]|0;k=$w(f|0)|0;gc(a|0,163312,(a=i,i=i+24|0,c[a>>2]=b,c[a+8>>2]=e,c[a+16>>2]=k,a)|0)|0;i=a;i=g;return}function $y(a,b){a=a|0;b=b|0;hh(c[a>>2]|0,b,a)|0;return}function az(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=i;i=i+24|0;f=e|0;c[f>>2]=b;c[f+4>>2]=d;d=c[a>>2]|0;a=Hc[c[d>>2]&63](d,f,4)|0;i=e;return a|0}function bz(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;d=(c[53372]|0)+8|0;a=c[d>>2]|0;e=c[a+4>>2]|0;if((e|0)==(c[a+8>>2]|0)){f=a+12|0;g=c[f>>2]|0;if((g|0)==0){h=(e-(c[a>>2]|0)|0)/20|0;i=kk(16)|0;j=i;c[i+12>>2]=0;k=kk(h*40|0)|0;c[i>>2]=k;c[i+8>>2]=k+((h<<1)*20|0);c[i+4>>2]=k;c[f>>2]=j;l=j}else{l=g}c[d>>2]=l;d=c[l>>2]|0;c[l+4>>2]=d;m=l;n=d}else{m=a;n=e}c[m+4>>2]=n+20;c[n>>2]=c[b>>2];c[n+4>>2]=c[b+4>>2];c[n+8>>2]=0;return n|0}function cz(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0;e=c[b>>2]|0;a=c[d>>2]|0;if((e|0)==(a|0)){f=(c[b+4>>2]|0)-(c[d+4>>2]|0)|0;return f|0}else{f=e-a|0;return f|0}return 0}function dz(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;f=i;i=i+16|0;g=f|0;h=(d|0)==0;if(h){c[g>>2]=0;c[g+4>>2]=0;c[g+8>>2]=0;j=g}else{j=d}d=sy(a)|0;if((d|0)!=0){k=e+8|0;l=e|0;m=j+8|0;n=j+4|0;o=j|0;p=d;do{d=p|0;if((Za($w(d)|0,123792,7)|0)==0){Wx(d,92056,272,1)|0;d=jk(56)|0;q=p+8|0;c[(c[q>>2]|0)+132>>2]=d;b[(c[q>>2]|0)+168>>1]=b[(c[k>>2]|0)+168>>1]|0;c[(c[(c[q>>2]|0)+132>>2]|0)+44>>2]=(c[(c[(c[k>>2]|0)+132>>2]|0)+44>>2]|0)+1;c[(c[(c[q>>2]|0)+132>>2]|0)+48>>2]=l;q=(c[m>>2]|0)+1|0;c[m>>2]=q;d=c[n>>2]|0;if((q|0)<(d|0)){r=q;s=c[o>>2]|0}else{q=d+10|0;c[n>>2]=q;d=mk(c[o>>2]|0,q<<2)|0;c[o>>2]=d;r=c[m>>2]|0;s=d}c[s+(r<<2)>>2]=p;dz(p,0,p)}else{dz(p,j,e)}p=ty(p)|0;}while((p|0)!=0)}if(!h){i=f;return}h=g+8|0;p=a+8|0;c[(c[p>>2]|0)+172>>2]=c[h>>2];a=c[h>>2]|0;if((a|0)==0){i=f;return}h=mk(c[g>>2]|0,(a<<2)+4|0)|0;c[(c[p>>2]|0)+176>>2]=h;i=f;return}function ez(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0;d=i;i=i+56|0;e=d|0;c[e+4>>2]=Wv(b,0,159312,0)|0;c[e+8>>2]=Wv(b,0,163152,0)|0;c[e+12>>2]=Wv(b,0,131152,0)|0;c[e>>2]=b;c[e+16>>2]=0;c[e+36>>2]=tv(b,2,4,e+20|0)|0;fz(b,e);e=ux(b)|0;if((e|0)==0){gz(b,b);hz(b);i=d;return}else{f=e}do{e=f+8|0;g=c[e>>2]|0;if((a[g+118|0]|0)!=0){j=c[(c[(c[g+212>>2]|0)+8>>2]|0)+132>>2]|0;k=+h[j+24>>3]- +h[j+8>>3];l=+h[j+32>>3]- +h[j+16>>3];m=k*.5;n=l*.5;o=m*72.0;p=n*72.0;h[c[g+132>>2]>>3]=m;h[(c[(c[e>>2]|0)+132>>2]|0)+8>>3]=n;h[(c[e>>2]|0)+32>>3]=k;h[(c[e>>2]|0)+40>>3]=l;h[(c[e>>2]|0)+96>>3]=o;h[(c[e>>2]|0)+88>>3]=o;h[(c[e>>2]|0)+80>>3]=l*72.0;g=c[e>>2]|0;j=c[(c[g+12>>2]|0)+44>>2]|0;h[j>>3]=+h[g+96>>3];h[j+8>>3]=p;h[j+16>>3]=-0.0- +h[(c[e>>2]|0)+88>>3];h[j+24>>3]=p;h[j+32>>3]=-0.0- +h[(c[e>>2]|0)+88>>3];l=-0.0-p;h[j+40>>3]=l;h[j+48>>3]=+h[(c[e>>2]|0)+96>>3];h[j+56>>3]=l}f=vx(b,f)|0;}while((f|0)!=0);gz(b,b);hz(b);i=d;return}function fz(f,g){f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0.0,L=0.0,M=0.0,N=0.0,O=0,P=0,Q=0.0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0.0,ma=0.0,na=0,oa=0,pa=0.0,qa=0,ra=0,sa=0,ta=0.0,ua=0.0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0.0,Ba=0.0,Ca=0.0,Da=0.0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0.0,Ra=0.0,Sa=0.0,Ta=0.0,Ua=0,Va=0,Wa=0,Xa=0.0,Za=0,_a=0,$a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0;j=i;i=i+200|0;k=j|0;l=j+32|0;m=j+40|0;n=j+144|0;p=j+152|0;q=j+160|0;if((a[213992]|0)!=0){r=c[o>>2]|0;s=$w(f|0)|0;gc(r|0,103288,(t=i,i=i+8|0,c[t>>2]=s,t)|0)|0;i=t}s=ux(f)|0;if((s|0)!=0){r=s;do{c[(c[r+8>>2]|0)+164>>2]=0;r=vx(f,r)|0;}while((r|0)!=0)}r=m|0;m=g+16|0;s=c[m>>2]|0;c[m>>2]=s+1;nb(r|0,154944,(t=i,i=i+8|0,c[t>>2]=s,t)|0)|0;i=t;if((d[213992]|0)>>>0>1>>>0){s=c[o>>2]|0;m=$w(f|0)|0;gc(s|0,151080,(t=i,i=i+16|0,c[t>>2]=r,c[t+8>>2]=m,t)|0)|0;i=t}m=Hw(148168,173936,0)|0;r=m|0;Wx(r,92056,272,1)|0;s=jk(56)|0;u=m+8|0;c[(c[u>>2]|0)+132>>2]=s;s=f+8|0;b[(c[u>>2]|0)+168>>1]=b[(c[s>>2]|0)+168>>1]|0;v=Wv(f,0,145432,0)|0;do{if((v|0)!=0){w=fw(f|0,v)|0;x=Wv(m,0,145432,0)|0;if((x|0)==0){Wv(m,0,145432,w)|0;break}else{hw(r,x,w)|0;break}}}while(0);v=Wv(f,0,142080,0)|0;do{if((v|0)!=0){w=fw(f|0,v)|0;x=Wv(m,0,142080,0)|0;if((x|0)==0){Wv(m,0,142080,w)|0;break}else{hw(r,x,w)|0;break}}}while(0);v=Wv(f,0,138944,0)|0;do{if((v|0)!=0){w=fw(f|0,v)|0;x=Wv(m,0,138944,0)|0;if((x|0)==0){Wv(m,0,138944,w)|0;break}else{hw(r,x,w)|0;break}}}while(0);v=c[s>>2]|0;if((c[v+172>>2]|0)<1){y=0}else{w=g+4|0;x=g|0;z=k|0;A=k+8|0;B=k+16|0;C=k+24|0;k=1;D=0;E=v;while(1){v=c[(c[E+176>>2]|0)+(k<<2)>>2]|0;Rj(v);F=v|0;G=Ax(m,$w(F)|0,1)|0;Wx(G|0,81280,304,1)|0;H=jk(32)|0;I=G+8|0;c[(c[I>>2]|0)+112>>2]=H;H=kk(e[(c[u>>2]|0)+168>>1]<<3)|0;c[(c[I>>2]|0)+132>>2]=H;c[(c[I>>2]|0)+212>>2]=v;H=D+1|0;c[(c[I>>2]|0)+120>>2]=D;J=c[w>>2]|0;do{if((J|0)==0){K=1.7976931348623157e+308;L=1.7976931348623157e+308;M=-1.7976931348623157e+308;N=-1.7976931348623157e+308}else{O=fw(F,J)|0;if((a[O]|0)==0){K=1.7976931348623157e+308;L=1.7976931348623157e+308;M=-1.7976931348623157e+308;N=-1.7976931348623157e+308;break}if((c[x>>2]|0)!=(v|0)){P=fw(uy(v)|0,J)|0;if((P|0)==(O|0)){K=1.7976931348623157e+308;L=1.7976931348623157e+308;M=-1.7976931348623157e+308;N=-1.7976931348623157e+308;break}if((Ya(O|0,P|0)|0)==0){K=1.7976931348623157e+308;L=1.7976931348623157e+308;M=-1.7976931348623157e+308;N=-1.7976931348623157e+308;break}}a[l]=0;P=ac(O|0,129200,(t=i,i=i+40|0,c[t>>2]=z,c[t+8>>2]=A,c[t+16>>2]=B,c[t+24>>2]=C,c[t+32>>2]=l,t)|0)|0;i=t;if((P|0)<=3){P=$w(F)|0;Fv(0,125976,(t=i,i=i+16|0,c[t>>2]=P,c[t+8>>2]=O,t)|0)|0;i=t;K=1.7976931348623157e+308;L=1.7976931348623157e+308;M=-1.7976931348623157e+308;N=-1.7976931348623157e+308;break}Q=+h[21580];if(Q>0.0){h[z>>3]=+h[z>>3]/Q;h[A>>3]=+h[A>>3]/Q;h[B>>3]=+h[B>>3]/Q;h[C>>3]=+h[C>>3]/Q}O=a[l]|0;do{if(O<<24>>24==33){a[(c[I>>2]|0)+119|0]=3}else{P=(c[I>>2]|0)+119|0;if(O<<24>>24==63){a[P]=2;break}else{a[P]=1;break}}}while(0);K=+h[z>>3];L=+h[A>>3];M=+h[B>>3];N=+h[C>>3]}}while(0);F=ux(v)|0;if((F|0)!=0){J=G;O=F;do{c[(c[O+8>>2]|0)+164>>2]=J;O=vx(v,O)|0;}while((O|0)!=0)}O=c[I>>2]|0;if((a[O+119|0]|0)!=0){h[c[O+132>>2]>>3]=(M+K)*.5;h[(c[(c[I>>2]|0)+132>>2]|0)+8>>3]=(N+L)*.5}O=c[s>>2]|0;if((k|0)<(c[O+172>>2]|0)){k=k+1|0;D=H;E=O}else{y=H;break}}}E=ux(f)|0;a:do{if((E|0)==0){R=y}else{D=f;k=y;C=E;b:while(1){S=C+8|0;B=c[S>>2]|0;do{if((c[B+164>>2]|0)==0){A=B+212|0;z=c[A>>2]|0;if((z|0)!=0){if((z|0)!=(c[(c[(c[s>>2]|0)+132>>2]|0)+48>>2]|0)){break b}}c[A>>2]=D;if((a[(c[S>>2]|0)+118|0]|0)!=0){T=k;break}A=Ax(m,$w(C|0)|0,1)|0;Wx(A|0,81280,304,1)|0;z=jk(32)|0;l=A+8|0;c[(c[l>>2]|0)+112>>2]=z;z=kk(e[(c[u>>2]|0)+168>>1]<<3)|0;c[(c[l>>2]|0)+132>>2]=z;c[(c[S>>2]|0)+164>>2]=A;c[(c[l>>2]|0)+120>>2]=k;h[(c[l>>2]|0)+32>>3]=+h[(c[S>>2]|0)+32>>3];h[(c[l>>2]|0)+40>>3]=+h[(c[S>>2]|0)+40>>3];h[(c[l>>2]|0)+88>>3]=+h[(c[S>>2]|0)+88>>3];h[(c[l>>2]|0)+96>>3]=+h[(c[S>>2]|0)+96>>3];h[(c[l>>2]|0)+80>>3]=+h[(c[S>>2]|0)+80>>3];c[(c[l>>2]|0)+8>>2]=c[(c[S>>2]|0)+8>>2];c[(c[l>>2]|0)+12>>2]=c[(c[S>>2]|0)+12>>2];A=c[S>>2]|0;if((a[A+119|0]|0)!=0){h[c[(c[l>>2]|0)+132>>2]>>3]=+h[c[A+132>>2]>>3];h[(c[(c[l>>2]|0)+132>>2]|0)+8>>3]=+h[(c[(c[S>>2]|0)+132>>2]|0)+8>>3];a[(c[l>>2]|0)+119|0]=a[(c[S>>2]|0)+119|0]|0}c[(c[(c[l>>2]|0)+112>>2]|0)+8>>2]=C;T=k+1|0}else{T=k}}while(0);B=vx(f,C)|0;if((B|0)==0){R=T;break a}else{k=T;C=B}}k=$w(C|0)|0;D=$w(f|0)|0;H=$w(c[(c[S>>2]|0)+212>>2]|0)|0;Fv(1,136344,(t=i,i=i+24|0,c[t>>2]=k,c[t+8>>2]=D,c[t+16>>2]=H,t)|0)|0;i=t;rc(177912,1)}}while(0);S=ux(f)|0;if((S|0)!=0){T=S;do{S=c[(c[T+8>>2]|0)+164>>2]|0;E=S;y=mw(f,T)|0;if((y|0)!=0){H=S+8|0;D=y;do{y=c[(c[(c[((c[D>>2]&3|0)==2?D:D-32|0)+28>>2]|0)+8>>2]|0)+164>>2]|0;k=y;if((y|0)!=(S|0)){if(y>>>0>S>>>0){U=uw(m,E,k,0,1)|0}else{U=uw(m,k,E,0,1)|0}Wx(U|0,85888,176,1)|0;k=D+8|0;I=U+8|0;h[(c[I>>2]|0)+136>>3]=+h[(c[k>>2]|0)+136>>3];h[(c[I>>2]|0)+128>>3]=+h[(c[k>>2]|0)+128>>3];k=y+8|0;y=(c[(c[k>>2]|0)+112>>2]|0)+4|0;c[y>>2]=(c[y>>2]|0)+1;y=(c[(c[H>>2]|0)+112>>2]|0)+4|0;c[y>>2]=(c[y>>2]|0)+1;y=c[I>>2]|0;B=c[y+172>>2]|0;do{if((B|0)==0){l=c[(c[k>>2]|0)+112>>2]|0;c[l>>2]=(c[l>>2]|0)+1;l=c[(c[H>>2]|0)+112>>2]|0;c[l>>2]=(c[l>>2]|0)+1;l=c[I>>2]|0;A=c[l+172>>2]|0;z=b[l+168>>1]|0;if((A|0)!=0){V=A;W=z;X=63;break}Y=kk((z<<16>>16<<2)+4|0)|0;Z=z}else{V=B;W=b[y+168>>1]|0;X=63}}while(0);if((X|0)==63){X=0;Y=mk(V,(W<<16>>16<<2)+4|0)|0;Z=W}c[Y+(Z<<16>>16<<2)>>2]=D;c[(c[I>>2]|0)+172>>2]=Y;y=(c[I>>2]|0)+168|0;b[y>>1]=(b[y>>1]|0)+1}D=ow(f,D)|0;}while((D|0)!=0)}T=vx(f,T)|0;}while((T|0)!=0)}T=c[(c[s>>2]|0)+132>>2]|0;Y=c[T>>2]|0;if((Y|0)!=0){Z=jk((c[T+4>>2]<<4)+16|0)|0;c[c[(c[u>>2]|0)+132>>2]>>2]=Z;T=Y|0;Y=c[T>>2]|0;if((Y|0)==0){_=0}else{W=f|0;V=R;R=Z;Z=0;U=T;T=Y;while(1){Y=c[(c[(c[U+4>>2]|0)+8>>2]|0)+164>>2]|0;D=Y;if((Y|0)==0){aa=Z;ba=R;ca=V}else{H=T;E=c[H>>2]&3;S=c[((E|0)==2?T:T-32|0)+28>>2]|0;C=c[((E|0)==3?T:T+32|0)+28>>2]|0;E=xF($w(W)|0)|0;y=S|0;B=xF($w(y)|0)|0;k=C|0;z=(E+8+B+(xF($w(k)|0)|0)|0)>999;B=$w(W)|0;if(z){z=$w(k)|0;k=$w(y)|0;y=(c[H>>2]|0)>>>4;nb(175272,133608,(t=i,i=i+32|0,c[t>>2]=B,c[t+8>>2]=z,c[t+16>>2]=k,c[t+24>>2]=y,t)|0)|0;i=t}else{y=c[(c[C+8>>2]|0)+120>>2]|0;C=c[(c[S+8>>2]|0)+120>>2]|0;S=(c[H>>2]|0)>>>4;nb(175272,131488,(t=i,i=i+32|0,c[t>>2]=B,c[t+8>>2]=y,c[t+16>>2]=C,c[t+24>>2]=S,t)|0)|0;i=t}S=Ax(m,175272,1)|0;Wx(S|0,81280,304,1)|0;C=jk(32)|0;y=S+8|0;c[(c[y>>2]|0)+112>>2]=C;C=kk(e[(c[u>>2]|0)+168>>1]<<3)|0;c[(c[y>>2]|0)+132>>2]=C;c[(c[y>>2]|0)+120>>2]=V;if(S>>>0>D>>>0){da=uw(m,D,S,0,1)|0}else{da=uw(m,S,D,0,1)|0}Wx(da|0,85888,176,1)|0;D=da+8|0;h[(c[D>>2]|0)+136>>3]=+h[(c[(c[U>>2]|0)+8>>2]|0)+136>>3];h[(c[D>>2]|0)+128>>3]=+h[(c[(c[U>>2]|0)+8>>2]|0)+128>>3];C=c[U>>2]|0;B=c[D>>2]|0;H=b[B+168>>1]|0;k=c[B+172>>2]|0;if((k|0)==0){ea=kk((H<<16>>16<<2)+4|0)|0}else{ea=mk(k,(H<<16>>16<<2)+4|0)|0}c[ea+(H<<16>>16<<2)>>2]=C;c[(c[D>>2]|0)+172>>2]=ea;C=(c[D>>2]|0)+168|0;b[C>>1]=(b[C>>1]|0)+1;C=(c[(c[y>>2]|0)+112>>2]|0)+4|0;c[C>>2]=(c[C>>2]|0)+1;C=Y+8|0;Y=(c[(c[C>>2]|0)+112>>2]|0)+4|0;c[Y>>2]=(c[Y>>2]|0)+1;Y=c[(c[y>>2]|0)+112>>2]|0;c[Y>>2]=(c[Y>>2]|0)+1;Y=c[(c[C>>2]|0)+112>>2]|0;c[Y>>2]=(c[Y>>2]|0)+1;c[R+4>>2]=S;h[R+8>>3]=+h[U+8>>3];c[R>>2]=da;aa=Z+1|0;ba=R+16|0;ca=V+1|0}S=U+16|0;Y=c[S>>2]|0;if((Y|0)==0){_=aa;break}else{V=ca;R=ba;Z=aa;U=S;T=Y}}}c[(c[(c[u>>2]|0)+132>>2]|0)+4>>2]=_}_=Ry(m,n,p)|0;T=c[_>>2]|0;c:do{if((T|0)!=0){U=g|0;aa=_;Z=T;d:while(1){aa=aa+4|0;lz(Z,q);ba=ux(Z)|0;if((ba|0)!=0){R=ba;do{ba=R+8|0;ca=c[ba>>2]|0;V=c[ca+212>>2]|0;do{if((V|0)==0){if((c[(c[ca+112>>2]|0)+8>>2]|0)!=0){break}Gx(Z,R|0)|0}else{da=V;ea=c[(c[ca+112>>2]|0)+4>>2]|0;if((ea|0)==0){fa=V+8|0}else{W=jk((ea<<4)+16|0)|0;Y=W;S=c[c[(c[ba>>2]|0)+112>>2]>>2]|0;C=jk((S*24|0)+24|0)|0;y=C;D=rw(Z,R)|0;if((D|0)==0){ga=0}else{H=D;D=0;while(1){k=c[H>>2]&3;B=c[((k|0)==2?H:H-32|0)+28>>2]|0;if((B|0)==(R|0)){ha=c[((k|0)==3?H:H+32|0)+28>>2]|0}else{ha=B}B=c[(c[ha+8>>2]|0)+132>>2]|0;k=c[(c[ba>>2]|0)+132>>2]|0;L=+h[B>>3]- +h[k>>3];N=+h[B+8>>3]- +h[k+8>>3];c[y+(D*24|0)>>2]=H;h[y+(D*24|0)+8>>3]=+$(+N,+L);h[y+(D*24|0)+16>>3]=L*L+N*N;k=D+1|0;B=sw(Z,H,R)|0;if((B|0)==0){ga=k;break}else{H=B;D=k}}}if((ga|0)!=(S|0)){X=95;break d}Jb(C|0,S|0,24,16);do{if((S|0)>1){D=S-1|0;if((D|0)>0){ia=0}else{break}while(1){H=y+(ia*24|0)+8|0;N=+h[H>>3];k=ia+1|0;do{if((k|0)<(S|0)){B=k;while(1){z=B+1|0;if(+h[y+(B*24|0)+8>>3]!=N){ja=B;break}if((z|0)<(S|0)){B=z}else{ja=z;break}}if((ja|0)==(k|0)){ka=k;break}if((ja|0)==(S|0)){la=3.141592653589793}else{la=+h[y+(ja*24|0)+8>>3]}L=(la-N)/+(ja-ia|0);K=L>.03490658503988659?.03490658503988659:L;if((ia|0)>=(ja|0)){ka=ia;break}h[H>>3]=N+0.0;if((k|0)<(ja|0)){ma=0.0;na=k}else{ka=ja;break}while(1){L=K+ma;B=y+(na*24|0)+8|0;h[B>>3]=+h[B>>3]+L;B=na+1|0;if((B|0)<(ja|0)){ma=L;na=B}else{ka=ja;break}}}else{ka=k}}while(0);if((ka|0)<(D|0)){ia=ka}else{break}}}}while(0);y=C;S=c[y>>2]|0;if((S|0)==0){oa=0}else{D=C+8|0;k=0;H=y;y=S;while(1){S=H+24|0;B=c[S>>2]|0;if((B|0)==0){pa=+h[D>>3]+6.283185307179586}else{pa=+h[H+32>>3]}z=y+8|0;E=c[z>>2]|0;A=b[E+168>>1]|0;l=A<<16>>16;x=c[y>>2]&3;w=c[((x|0)==2?y:y-32|0)+28>>2]|0;if((w|0)==(R|0)){qa=c[((x|0)==3?y:y+32|0)+28>>2]|0}else{qa=w}N=+h[H+8>>3];K=(pa-N)/+(A<<16>>16|0);L=K>.03490658503988659?.03490658503988659:K;if(qa>>>0>R>>>0){ra=1;sa=k;ta=L;ua=N}else{ra=-1;sa=k-1+l|0;ta=-0.0-L;ua=N+ +(l-1|0)*L}if(A<<16>>16>0){A=c[E+172>>2]|0;L=ua;E=sa;w=0;while(1){x=c[A>>2]|0;c[Y+(E<<4)>>2]=x;O=c[x>>2]&3;v=c[((O|0)==3?x:x+32|0)+28>>2]|0;if((c[(c[v+8>>2]|0)+164>>2]|0)==(R|0)){va=v}else{va=c[((O|0)==2?x:x-32|0)+28>>2]|0}c[Y+(E<<4)+4>>2]=va;h[Y+(E<<4)+8>>3]=L;x=w+1|0;if((x|0)<(b[(c[z>>2]|0)+168>>1]|0)){A=A+4|0;L=ta+L;E=E+ra|0;w=x}else{break}}wa=c[S>>2]|0}else{wa=B}w=l+k|0;if((wa|0)==0){oa=w;break}else{k=w;H=S;y=wa}}}if((oa|0)!=(ea|0)){X=125;break d}y=V+8|0;c[c[(c[y>>2]|0)+132>>2]>>2]=W;c[(c[(c[y>>2]|0)+132>>2]|0)+4>>2]=ea;eF(C);fa=y}fz(da,g);h[(c[ba>>2]|0)+32>>3]=+h[(c[(c[fa>>2]|0)+132>>2]|0)+24>>3];h[(c[ba>>2]|0)+40>>3]=+h[(c[(c[fa>>2]|0)+132>>2]|0)+32>>3];y=c[(c[fa>>2]|0)+132>>2]|0;L=+h[y+32>>3]*72.0;N=+h[y+24>>3]*72.0*.5;h[(c[ba>>2]|0)+88>>3]=N;h[(c[ba>>2]|0)+96>>3]=N;h[(c[ba>>2]|0)+80>>3]=L}}while(0);R=vx(Z,R)|0;}while((R|0)!=0)}if((Lw(Z)|0)>1){if((c[U>>2]|0)==(f|0)){ir(Z)|0}qz(Z,q)}Z=c[aa>>2]|0;if((Z|0)==0){break c}}if((X|0)==95){cc(159976,164056,643,170568)}else if((X|0)==125){cc(167512,164056,767,170704)}}}while(0);X=c[n>>2]|0;do{if((X|0)>1){if((c[p>>2]|0)==0){xa=0;ya=X}else{q=jk(X)|0;a[q]=1;xa=q;ya=c[n>>2]|0}c[g+40>>2]=xa;q=mv(ya,_,0,g+20|0)|0;if((xa|0)==0){za=q;break}eF(xa);za=q}else{if((X|0)!=1){za=0;break}$m(c[_>>2]|0);za=0}}while(0);X=c[n>>2]|0;n=(c[g>>2]|0)!=(f|0);xa=(X|0)!=0;do{if(xa){ya=c[(c[_>>2]|0)+8>>2]|0;ta=+h[ya+16>>3];if(ta<0.0){Aa=ta+-.5}else{Aa=ta+.5}p=~~Aa;ta=+h[ya+24>>3];if(ta<0.0){Ba=ta+-.5}else{Ba=ta+.5}q=~~Ba;ta=+h[ya+32>>3];if(ta<0.0){Ca=ta+-.5}else{Ca=ta+.5}fa=~~Ca;ta=+h[ya+40>>3];if(ta<0.0){Da=ta+-.5}else{Da=ta+.5}ya=~~Da;if((X|0)<=1){Ea=0;Fa=ya;Ga=fa;Ha=q;Ia=p;break}oa=c[za>>2]|0;wa=c[za+4>>2]|0;ra=oa+p|0;p=wa+q|0;q=oa+fa|0;fa=wa+ya|0;ya=_+4|0;wa=c[ya>>2]|0;if((wa|0)==0){Ea=0;Fa=fa;Ga=q;Ha=p;Ia=ra;break}else{Ja=ra;Ka=p;La=q;Ma=fa;Na=za;Oa=ya;Pa=wa}while(1){wa=Na+8|0;ya=c[Pa+8>>2]|0;ta=+h[ya+16>>3];if(ta<0.0){Qa=ta+-.5}else{Qa=ta+.5}ta=+h[ya+24>>3];if(ta<0.0){Ra=ta+-.5}else{Ra=ta+.5}ta=+h[ya+32>>3];if(ta<0.0){Sa=ta+-.5}else{Sa=ta+.5}ta=+h[ya+40>>3];if(ta<0.0){Ta=ta+-.5}else{Ta=ta+.5}ya=c[wa>>2]|0;fa=c[Na+12>>2]|0;q=ya+~~Qa|0;p=fa+~~Ra|0;ra=ya+~~Sa|0;ya=fa+~~Ta|0;fa=(Ja|0)<(q|0)?Ja:q;q=(Ka|0)<(p|0)?Ka:p;p=(La|0)>(ra|0)?La:ra;ra=(Ma|0)>(ya|0)?Ma:ya;ya=Oa+4|0;oa=c[ya>>2]|0;if((oa|0)==0){Ea=0;Fa=ra;Ga=p;Ha=q;Ia=fa;break}else{Ja=fa;Ka=q;La=p;Ma=ra;Na=wa;Oa=ya;Pa=oa}}}else{oa=c[g+12>>2]|0;ya=f|0;wa=Em(ya,c[g+8>>2]|0,54,3)|0;Ea=1;Fa=Em(ya,oa,36,3)|0;Ga=wa;Ha=0;Ia=0}}while(0);g=c[s>>2]|0;Pa=c[g+12>>2]|0;do{if((Pa|0)==0){Ua=Ea;Va=Ga;Wa=Ia}else{Ta=+h[Pa+24>>3];if(Ta<0.0){Xa=Ta+-.5}else{Xa=Ta+.5}Oa=~~Xa+(Ia-Ga)|0;if((Oa|0)<=0){Ua=0;Va=Ga;Wa=Ia;break}Na=(Oa|0)/2|0;Ua=0;Va=Na+Ga|0;Wa=Ia-Na|0}}while(0);if(n&(Ua|0)==0){Ua=Em(r,c[53720]|0,8,0)|0;Za=Ua;_a=c[s>>2]|0}else{Za=0;_a=g}g=Za-Wa|0;Wa=~~(+h[_a+56>>3]+ +(Za-Ha|0));Ha=Za+Va+g|0;Va=~~(+(Fa|0)+(+h[_a+88>>3]+ +(Wa+Za|0)));do{if(xa){Za=c[_>>2]|0;if((Za|0)==0){break}else{$a=za;ab=_;bb=Za}while(1){Za=ab+4|0;if(($a|0)==0){cb=g;db=Wa;eb=0}else{cb=(c[$a>>2]|0)+g|0;db=(c[$a+4>>2]|0)+Wa|0;eb=$a+8|0}Xa=+(cb|0)/72.0;Ta=+(db|0)/72.0;_a=ux(bb)|0;if((_a|0)!=0){Fa=_a;do{_a=Fa+8|0;Ua=c[(c[_a>>2]|0)+132>>2]|0;h[Ua>>3]=Xa+ +h[Ua>>3];Ua=(c[(c[_a>>2]|0)+132>>2]|0)+8|0;h[Ua>>3]=Ta+ +h[Ua>>3];Fa=vx(bb,Fa)|0;}while((Fa|0)!=0)}Fa=c[Za>>2]|0;if((Fa|0)==0){break}else{$a=eb;ab=Za;bb=Fa}}}}while(0);bb=c[(c[u>>2]|0)+132>>2]|0;vF(bb+8|0,0,16)|0;h[bb+24>>3]=+(Ha|0)/72.0;h[bb+32>>3]=+(Va|0)/72.0;eF(za);za=ux(m)|0;if((za|0)!=0){Va=za;do{za=Va+8|0;bb=c[za>>2]|0;Ha=c[bb+212>>2]|0;do{if((Ha|0)==0){ab=c[(c[bb+112>>2]|0)+8>>2]|0;if((ab|0)==0){break}eb=ab+8|0;h[c[(c[eb>>2]|0)+132>>2]>>3]=+h[c[bb+132>>2]>>3];h[(c[(c[eb>>2]|0)+132>>2]|0)+8>>3]=+h[(c[(c[za>>2]|0)+132>>2]|0)+8>>3]}else{eb=Ha+8|0;h[(c[(c[eb>>2]|0)+132>>2]|0)+8>>3]=+h[c[bb+132>>2]>>3]- +h[bb+32>>3]*.5;ab=c[za>>2]|0;h[(c[(c[eb>>2]|0)+132>>2]|0)+16>>3]=+h[(c[ab+132>>2]|0)+8>>3]- +h[ab+40>>3]*.5;ab=c[(c[eb>>2]|0)+132>>2]|0;h[ab+24>>3]=+h[ab+8>>3]+ +h[(c[za>>2]|0)+32>>3];ab=c[(c[eb>>2]|0)+132>>2]|0;h[ab+32>>3]=+h[ab+16>>3]+ +h[(c[za>>2]|0)+40>>3]}}while(0);Va=vx(m,Va)|0;}while((Va|0)!=0)}Va=(c[(c[s>>2]|0)+132>>2]|0)+8|0;s=(c[(c[u>>2]|0)+132>>2]|0)+8|0;c[Va>>2]=c[s>>2];c[Va+4>>2]=c[s+4>>2];c[Va+8>>2]=c[s+8>>2];c[Va+12>>2]=c[s+12>>2];c[Va+16>>2]=c[s+16>>2];c[Va+20>>2]=c[s+20>>2];c[Va+24>>2]=c[s+24>>2];c[Va+28>>2]=c[s+28>>2];s=c[_>>2]|0;if((s|0)!=0){Va=_;za=s;do{Va=Va+4|0;eF(c[(c[za+8>>2]|0)+132>>2]|0);Xx(za|0,92056)|0;za=c[Va>>2]|0;}while((za|0)!=0)}za=c[(c[u>>2]|0)+132>>2]|0;Va=c[za>>2]|0;if((Va|0)==0){fb=za}else{eF(Va);fb=c[(c[u>>2]|0)+132>>2]|0}eF(fb);Xx(r,92056)|0;r=ux(m)|0;if((r|0)!=0){fb=r;while(1){r=vx(m,fb)|0;u=mw(m,fb)|0;if((u|0)!=0){Va=u;do{eF(c[(c[Va+8>>2]|0)+172>>2]|0);Xx(Va|0,85888)|0;Va=ow(m,Va)|0;}while((Va|0)!=0)}Va=fb+8|0;eF(c[(c[Va>>2]|0)+112>>2]|0);eF(c[(c[Va>>2]|0)+132>>2]|0);Xx(fb|0,81280)|0;if((r|0)==0){break}else{fb=r}}}Kw(m)|0;eF(_);if((a[213992]|0)==0){i=j;return}_=c[o>>2]|0;m=$w(f|0)|0;gc(_|0,97616,(t=i,i=i+8|0,c[t>>2]=m,t)|0)|0;i=t;i=j;return}function gz(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0.0,i=0.0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0.0,r=0.0,s=0.0;d=a+8|0;e=c[d>>2]|0;f=c[e+132>>2]|0;g=+h[f+8>>3];i=+h[f+16>>3];f=(a|0)!=(b|0);if(f){j=ux(a)|0;if((j|0)!=0){k=j;do{j=k+8|0;l=c[j>>2]|0;if((c[l+212>>2]|0)==(a|0)){m=c[l+132>>2]|0;h[m>>3]=g+ +h[m>>3];m=(c[(c[j>>2]|0)+132>>2]|0)+8|0;h[m>>3]=i+ +h[m>>3]}k=vx(a,k)|0;}while((k|0)!=0)}n=c[d>>2]|0}else{n=e}if((c[n+172>>2]|0)<1){return}if(f){f=1;e=n;while(1){k=c[(c[e+176>>2]|0)+(f<<2)>>2]|0;m=c[(c[k+8>>2]|0)+132>>2]|0;j=m+8|0;l=m+16|0;o=m+24|0;p=m+32|0;q=i+ +h[l>>3];r=g+ +h[o>>3];s=i+ +h[p>>3];h[j>>3]=g+ +h[j>>3];h[l>>3]=q;h[o>>3]=r;h[p>>3]=s;gz(k,b);k=c[d>>2]|0;if((f|0)<(c[k+172>>2]|0)){f=f+1|0;e=k}else{break}}return}else{e=1;f=n;while(1){gz(c[(c[f+176>>2]|0)+(e<<2)>>2]|0,a);n=c[d>>2]|0;if((e|0)<(c[n+172>>2]|0)){e=e+1|0;f=n}else{break}}return}}function hz(a){a=a|0;var b=0,d=0,e=0.0,f=0.0,g=0.0,i=0,j=0;b=a+8|0;a=c[b>>2]|0;d=c[a+132>>2]|0;e=+h[d+16>>3]*72.0;f=+h[d+24>>3]*72.0;g=+h[d+32>>3]*72.0;h[a+16>>3]=+h[d+8>>3]*72.0;h[a+24>>3]=e;h[a+32>>3]=f;h[a+40>>3]=g;a=c[b>>2]|0;if((c[a+172>>2]|0)<1){return}else{i=1;j=a}while(1){hz(c[(c[j+176>>2]|0)+(i<<2)>>2]|0);a=c[b>>2]|0;if((i|0)<(c[a+172>>2]|0)){i=i+1|0;j=a}else{break}}return}function iz(a){a=a|0;var d=0,e=0,f=0,g=0,j=0.0,k=0.0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;d=i;e=1;f=0;g=i;i=i+168|0;c[g>>2]=0;while(1)switch(e|0){case 1:j=+h[21580];k=+sa(2,a|0);if((u|0)!=0&(v|0)!=0){f=CF(c[u>>2]|0,g)|0;if((f|0)>0){e=-1;break}else return}u=v=0;h[21580]=k;la(16,a|0,2);if((u|0)!=0&(v|0)!=0){f=CF(c[u>>2]|0,g)|0;if((f|0)>0){e=-1;break}else return}u=v=0;l=ma(12,56)|0;if((u|0)!=0&(v|0)!=0){f=CF(c[u>>2]|0,g)|0;if((f|0)>0){e=-1;break}else return}u=v=0;m=a+8|0;c[(c[m>>2]|0)+132>>2]=l;l=a|0;n=Aa(56,a|0,0,116440,0)|0;if((u|0)!=0&(v|0)!=0){f=CF(c[u>>2]|0,g)|0;if((f|0)>0){e=-1;break}else return}u=v=0;o=Aa(52,l|0,n|0,2,2)|0;if((u|0)!=0&(v|0)!=0){f=CF(c[u>>2]|0,g)|0;if((f|0)>0){e=-1;break}else return}u=v=0;b[(c[m>>2]|0)+168>>1]=o;o=(c[m>>2]|0)+168|0;n=b[o>>1]|0;l=(n&65535)>>>0<10>>>0?n:10;b[o>>1]=l;c[53568]=l&65535;Ba(100,a|0,0,a|0);if((u|0)!=0&(v|0)!=0){f=CF(c[u>>2]|0,g)|0;if((f|0)>0){e=-1;break}else return}u=v=0;ka(90,a|0);if((u|0)!=0&(v|0)!=0){f=CF(c[u>>2]|0,g)|0;if((f|0)>0){e=-1;break}else return}u=v=0;ka(92,a|0);if((u|0)!=0&(v|0)!=0){f=CF(c[u>>2]|0,g)|0;if((f|0)>0){e=-1;break}else return}u=v=0;p=BF(177912,e,g)|0;e=14;break;case 14:if((p|0)==0){e=2;break}else{e=13;break};case 2:ka(132,a|0);if((u|0)!=0&(v|0)!=0){f=CF(c[u>>2]|0,g)|0;if((f|0)>0){e=-1;break}else return}u=v=0;ka(86,a|0);if((u|0)!=0&(v|0)!=0){f=CF(c[u>>2]|0,g)|0;if((f|0)>0){e=-1;break}else return}u=v=0;q=b[(c[m>>2]|0)+128>>1]|0;if((q&14)==0){e=12;break}else{e=3;break};case 3:r=q&14;if((r|0)==2){e=10;break}else if((r|0)==12){e=4;break}else{s=q;e=6;break};case 4:l=pa(58,a|0,12,10)|0;if((u|0)!=0&(v|0)!=0){f=CF(c[u>>2]|0,g)|0;if((f|0)>0){e=-1;break}else return}u=v=0;if((l|0)==0){e=9;break}else{e=5;break};case 5:c[53566]=2;s=b[(c[m>>2]|0)+128>>1]|0;e=6;break;case 6:if((s&1)==0){e=8;break}else{e=7;break};case 7:pa(16,0,109112,(l=i,i=i+1|0,i=i+7&-8,c[l>>2]=0,l)|0)|0;if((u|0)!=0&(v|0)!=0){f=CF(c[u>>2]|0,g)|0;if((f|0)>0){e=-1;break}else return}u=v=0;i=l;e=9;break;case 8:wa(50,a|0,r|0)|0;if((u|0)!=0&(v|0)!=0){f=CF(c[u>>2]|0,g)|0;if((f|0)>0){e=-1;break}else return}u=v=0;e=9;break;case 9:c[53566]=0;e=10;break;case 10:if((c[53522]|0)<1){e=11;break}else{e=12;break};case 11:wa(50,a|0,2)|0;if((u|0)!=0&(v|0)!=0){f=CF(c[u>>2]|0,g)|0;if((f|0)>0){e=-1;break}else return}u=v=0;e=12;break;case 12:ka(44,a|0);if((u|0)!=0&(v|0)!=0){f=CF(c[u>>2]|0,g)|0;if((f|0)>0){e=-1;break}else return}u=v=0;h[21580]=j;e=13;break;case 13:i=d;return;case-1:if((f|0)==1){p=v;e=14}u=v=0;break}}function jz(a,b){a=a|0;b=b|0;var c=0.0,d=0.0,e=0,f=0.0,g=0.0;c=+h[a+8>>3];d=+h[b+8>>3];do{if(c>d){e=1}else{if(c<d){e=-1;break}f=+h[a+16>>3];g=+h[b+16>>3];if(f>g){e=1;break}e=(f<g)<<31>>31}}while(0);return e|0}function kz(a){a=a|0;var b=0,d=0,e=0.0,f=0.0,g=0.0;b=i;d=c[6536]|0;c[44182]=c[d>>2];c[44183]=c[d+4>>2];c[44185]=c[d+8>>2];c[44187]=c[d+12>>2];h[22099]=0.0;h[22094]=+h[d+16>>3];h[22095]=+h[d+24>>3];d=a|0;c[44186]=Em(d,Wv(a,0,121720,0)|0,600,0)|0;e=+Fm(d,Wv(a,0,158192,0)|0,.3,0.0);h[22096]=e;h[(c[6536]|0)+32>>3]=e;e=+h[(c[6536]|0)+40>>3];if(e==-1.0){f=+Fm(d,Wv(a,0,127856,0)|0,-1.0,0.0)}else{f=e}h[22097]=f;c[44184]=1;d=vt(a,2,176736)|0;c[44196]=d;if((d|0)==0){Fv(0,115224,(d=i,i=i+1|0,i=i+7&-8,c[d>>2]=0,d)|0)|0;i=d;c[44184]=2}c[44212]=(da(c[44186]|0,c[44187]|0)|0)/100|0;f=+h[22096];h[22101]=f*f;if((c[44182]|0)==0){i=b;return}e=+h[22099];if(e>0.0){g=e}else{e=f*3.0;h[22099]=e;g=e}h[22100]=g*g;i=b;return}function lz(b,d){b=b|0;d=d|0;var e=0,f=0,g=0.0,i=0,j=0.0,k=0,l=0.0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0.0,I=0.0,J=0.0,K=0.0,L=0.0,M=0.0,N=0.0,O=0.0,P=0.0,Q=0.0,S=0.0,U=0.0,X=0.0,Y=0,Z=0,_=0,aa=0,ba=0,ca=0.0,da=0.0,ea=0,fa=0,ga=0,ha=0,ia=0;e=b+8|0;f=c[c[(c[e>>2]|0)+132>>2]>>2]|0;g=+h[22097];if(g==-1.0){i=Lw(b)|0;j=+h[22095]*+h[22096]*+T(+(i|0))/5.0;h[22097]=j;k=1;l=j}else{k=0;l=g}i=c[44186]|0;h[d+8>>3]=l*+(i-(c[44212]|0)|0)/+(i|0);h[d+16>>3]=+h[22096];h[d+24>>3]=+h[22094];i=d|0;c[i>>2]=(c[44186]|0)-(c[44212]|0);m=c[44185]|0;n=c[44212]|0;do{if((m|0)>-1){if((m|0)<=(n|0)){c[44213]=m;c[d+32>>2]=0;break}if((m|0)>(c[44186]|0)){break}c[44213]=n;c[d+32>>2]=m-n}else{c[44213]=n;c[d+32>>2]=c[i>>2]}}while(0);i=Lw(b)|0;d=i-(c[(c[(c[e>>2]|0)+132>>2]|0)+4>>2]|0)|0;e=ux(b)|0;if((e|0)==0){o=0;p=0;q=0;r=0;s=0}else{i=0;n=0;m=0;t=0;u=0;v=e;while(1){e=c[v+8>>2]|0;if((a[e+119|0]|0)==0){w=u;x=t;y=m;z=n;A=i}else{B=c[e+132>>2]|0;l=+h[B>>3];if((u|0)==0){e=~~l;C=~~+h[B+8>>3];D=C;E=e;F=C;G=e}else{g=+(i|0);j=+h[B+8>>3];H=+(n|0);I=+(m|0);J=+(t|0);D=~~(j>J?j:J);E=~~(l>I?l:I);F=~~(j<H?j:H);G=~~(l<g?l:g)}w=u+1|0;x=D;y=E;z=F;A=G}B=vx(b,v)|0;if((B|0)==0){o=A;p=z;q=y;r=x;s=w;break}else{i=A;n=z;m=y;t=x;u=w;v=B}}}g=+h[22096]*(+T(+(d|0))+1.0)*.5*1.2;h[22103]=g;h[22102]=g;do{if((s|0)==1){K=+(o|0);L=+(p|0);M=g;N=g}else{if((s|0)<=1){K=0.0;L=0.0;M=g;N=g;break}l=+(o+q|0)*.5;H=+(p+r|0)*.5;j=+(q-o|0)*1.2;I=+(r-p|0)*1.2;J=g*g*4.0;O=I*j/J;do{if(O<1.0){if(O>0.0){P=+T(O)*2.0;Q=j/P;h[22102]=Q;S=I/P;h[22103]=S;U=S;X=Q;break}if(j>0.0){Q=j*.5;h[22102]=Q;S=J/j*.5;h[22103]=S;U=S;X=Q;break}if(I<=0.0){U=g;X=g;break}Q=J/I*.5;h[22102]=Q;S=I*.5;h[22103]=S;U=S;X=Q}else{Q=j*.5;h[22102]=Q;S=I*.5;h[22103]=S;U=S;X=Q}}while(0);I=+$(+U,+X);j=X/+V(I);h[22102]=j;J=U/+W(I);h[22103]=J;K=l;L=H;M=j;N=J}}while(0);h[22104]=M*M;h[22105]=N*N;if((c[44196]|0)==2){Y=c[44184]|0}else{p=fb()|0;Y=(zc(0)|0)^p}dc(Y|0);a:do{if((f|0)==0){Y=ux(b)|0;p=(Y|0)==0;if((s|0)==0){if(p){break}else{Z=Y}while(1){N=+h[22102];M=N*(+wn()*2.0+-1.0);r=Z+8|0;h[c[(c[r>>2]|0)+132>>2]>>3]=M;M=+h[22103];N=M*(+wn()*2.0+-1.0);h[(c[(c[r>>2]|0)+132>>2]|0)+8>>3]=N;Z=vx(b,Z)|0;if((Z|0)==0){break a}}}if(p){break}else{_=Y}do{r=_+8|0;o=c[r>>2]|0;if((a[o+119|0]|0)==0){H=+h[22102];l=H*(+wn()*2.0+-1.0);h[c[(c[r>>2]|0)+132>>2]>>3]=l;l=+h[22103];H=l*(+wn()*2.0+-1.0);h[(c[(c[r>>2]|0)+132>>2]|0)+8>>3]=H}else{q=c[o+132>>2]|0;h[q>>3]=+h[q>>3]-K;q=(c[(c[r>>2]|0)+132>>2]|0)+8|0;h[q>>3]=+h[q>>3]-L}_=vx(b,_)|0;}while((_|0)!=0)}else{if((c[f>>2]|0)!=0){Y=f;do{p=Y+8|0;H=K+ +h[22102]*+V(+h[p>>3]);q=(c[Y+4>>2]|0)+8|0;h[c[(c[q>>2]|0)+132>>2]>>3]=H;H=L+ +h[22103]*+W(+h[p>>3]);h[(c[(c[q>>2]|0)+132>>2]|0)+8>>3]=H;a[(c[q>>2]|0)+119|0]=1;Y=Y+16|0;}while((c[Y>>2]|0)!=0)}Y=ux(b)|0;if((Y|0)==0){break}H=K*.1;l=L*.1;q=Y;do{Y=q+8|0;p=c[Y>>2]|0;if((c[(c[p+112>>2]|0)+8>>2]|0)==0){if((c[p+212>>2]|0)!=0){aa=38}}else{aa=38}do{if((aa|0)==38){aa=0;if((a[p+119|0]|0)!=0){r=c[p+132>>2]|0;h[r>>3]=+h[r>>3]-K;r=(c[(c[Y>>2]|0)+132>>2]|0)+8|0;h[r>>3]=+h[r>>3]-L;break}r=rw(b,q)|0;do{if((r|0)==0){aa=51}else{N=0.0;M=0.0;o=0;d=r;while(1){v=c[d>>2]&3;w=c[((v|0)==2?d:d-32|0)+28>>2]|0;u=c[((v|0)==3?d:d+32|0)+28>>2]|0;do{if((w|0)==(u|0)){ba=o;ca=M;da=N}else{v=c[((w|0)==(q|0)?u:w)+8>>2]|0;if((a[v+119|0]|0)==0){ba=o;ca=M;da=N;break}if((o|0)==0){x=c[v+132>>2]|0;ba=1;ca=+h[x>>3];da=+h[x+8>>3];break}else{U=+(o|0);x=c[v+132>>2]|0;v=o+1|0;X=+(v|0);ba=v;ca=(M*U+ +h[x>>3])/X;da=(U*N+ +h[x+8>>3])/X;break}}}while(0);w=sw(b,d,q)|0;if((w|0)==0){break}else{N=da;M=ca;o=ba;d=w}}if((ba|0)>1){h[c[(c[Y>>2]|0)+132>>2]>>3]=ca;h[(c[(c[Y>>2]|0)+132>>2]|0)+8>>3]=da;break}if((ba|0)!=1){aa=51;break}h[c[(c[Y>>2]|0)+132>>2]>>3]=H+ca*.98;h[(c[(c[Y>>2]|0)+132>>2]|0)+8>>3]=l+da*.9}}while(0);if((aa|0)==51){aa=0;M=+wn()*6.283185307179586;N=+wn()*.9;X=N*+h[22102]*+V(M);h[c[(c[Y>>2]|0)+132>>2]>>3]=X;X=N*+h[22103]*+W(M);h[(c[(c[Y>>2]|0)+132>>2]|0)+8>>3]=X}a[(c[Y>>2]|0)+119|0]=1}}while(0);q=vx(b,q)|0;}while((q|0)!=0)}}while(0);do{if((c[44182]|0)==0){aa=c[44213]|0;if((aa|0)>0){ea=0;fa=aa}else{break}while(1){aa=c[44186]|0;da=+h[22097]*+(aa-ea|0)/+(aa|0);if(da>0.0){aa=ux(b)|0;if((aa|0)!=0){ba=aa;do{aa=ba+8|0;h[(c[(c[aa>>2]|0)+112>>2]|0)+24>>3]=0.0;h[(c[(c[aa>>2]|0)+112>>2]|0)+16>>3]=0.0;ba=vx(b,ba)|0;}while((ba|0)!=0)}ba=ux(b)|0;if((ba|0)!=0){aa=ba;do{ba=vx(b,aa)|0;if((ba|0)!=0){_=aa+8|0;Z=ba;do{ba=c[(c[Z+8>>2]|0)+132>>2]|0;s=c[(c[_>>2]|0)+132>>2]|0;ca=+h[ba>>3]- +h[s>>3];l=+h[ba+8>>3]- +h[s+8>>3];oz(aa,Z,ca,l,ca*ca+l*l);Z=vx(b,Z)|0;}while((Z|0)!=0)}Z=mw(b,aa)|0;if((Z|0)!=0){_=Z;do{Z=c[((c[_>>2]&3|0)==2?_:_-32|0)+28>>2]|0;if((aa|0)!=(Z|0)){mz(aa,Z,_)}_=ow(b,_)|0;}while((_|0)!=0)}aa=vx(b,aa)|0;}while((aa|0)!=0)}nz(b,da,f);ga=c[44213]|0}else{ga=fa}aa=ea+1|0;if((aa|0)<(ga|0)){ea=aa;fa=ga}else{break}}}else{aa=Wy(Lw(b)|0)|0;Xy(aa,Lw(b)|0);_=c[44213]|0;if((_|0)>0){Z=0;s=_;while(1){_=c[44186]|0;l=+h[22097]*+(_-Z|0)/+(_|0);if(l>0.0){Yy(aa);_=ux(b)|0;if((_|0)!=0){ba=_;do{_=ba+8|0;h[(c[(c[_>>2]|0)+112>>2]|0)+24>>3]=0.0;h[(c[(c[_>>2]|0)+112>>2]|0)+16>>3]=0.0;q=c[(c[_>>2]|0)+132>>2]|0;ca=+h[22099];_=~~+R(+h[q>>3]/ca);_y(aa,_,~~+R(+h[q+8>>3]/ca),ba);ba=vx(b,ba)|0;}while((ba|0)!=0)}ba=ux(b)|0;if((ba|0)!=0){q=ba;do{ba=mw(b,q)|0;if((ba|0)!=0){_=ba;do{ba=c[((c[_>>2]&3|0)==2?_:_-32|0)+28>>2]|0;if((q|0)!=(ba|0)){mz(q,ba,_)}_=ow(b,_)|0;}while((_|0)!=0)}q=vx(b,q)|0;}while((q|0)!=0)}$y(aa,8);nz(b,l,f);ha=c[44213]|0}else{ha=s}q=Z+1|0;if((q|0)<(ha|0)){Z=q;s=ha}else{break}}}Zy(aa)}}while(0);do{if(K!=0.0|L!=0.0){ha=ux(b)|0;if((ha|0)==0){break}else{ia=ha}do{ha=ia+8|0;f=c[(c[ha>>2]|0)+132>>2]|0;h[f>>3]=K+ +h[f>>3];f=(c[(c[ha>>2]|0)+132>>2]|0)+8|0;h[f>>3]=L+ +h[f>>3];ia=vx(b,ia)|0;}while((ia|0)!=0)}}while(0);if((k|0)==0){return}h[22097]=-1.0;return}function mz(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0;e=b+8|0;b=c[(c[e>>2]|0)+132>>2]|0;f=a+8|0;a=c[(c[f>>2]|0)+132>>2]|0;g=+h[b>>3]- +h[a>>3];i=+h[b+8>>3]- +h[a+8>>3];j=g*g+i*i;if(j==0.0){while(1){k=+(5-((yb()|0)%10|0)|0);l=+(5-((yb()|0)%10|0)|0);m=k*k+l*l;if(m!=0.0){n=l;o=k;p=m;break}}}else{n=i;o=g;p=j}j=+T(p);a=c[d+8>>2]|0;p=+h[a+128>>3];if((c[44183]|0)==0){q=j*p/+h[a+136>>3]}else{q=p*(j- +h[a+136>>3])/j}j=o*q;a=(c[(c[e>>2]|0)+112>>2]|0)+16|0;h[a>>3]=+h[a>>3]-j;o=n*q;a=(c[(c[e>>2]|0)+112>>2]|0)+24|0;h[a>>3]=+h[a>>3]-o;a=(c[(c[f>>2]|0)+112>>2]|0)+16|0;h[a>>3]=j+ +h[a>>3];a=(c[(c[f>>2]|0)+112>>2]|0)+24|0;h[a>>3]=o+ +h[a>>3];return}function nz(b,d,e){b=b|0;d=+d;e=e|0;var f=0.0,g=0,i=0,j=0,k=0,l=0.0,m=0.0,n=0.0,o=0.0,p=0.0,q=0,r=0.0,s=0,t=0.0,u=0.0,v=0;f=d*d;g=ux(b)|0;if((g|0)==0){return}if((e|0)==0){e=g;do{i=e+8|0;j=c[i>>2]|0;if((a[j+119|0]&2)==0){k=c[j+112>>2]|0;l=+h[k+16>>3];m=+h[k+24>>3];n=l*l+m*m;if(n<f){k=c[j+132>>2]|0;o=l+ +h[k>>3];p=m+ +h[k+8>>3];q=k}else{r=d/+T(n);k=c[j+132>>2]|0;o=l*r+ +h[k>>3];p=m*r+ +h[k+8>>3];q=k}h[q>>3]=o;h[(c[(c[i>>2]|0)+132>>2]|0)+8>>3]=p}e=vx(b,e)|0;}while((e|0)!=0);return}else{s=g}do{g=s+8|0;e=c[g>>2]|0;a:do{if((a[e+119|0]&2)==0){q=c[e+112>>2]|0;p=+h[q+16>>3];o=+h[q+24>>3];r=p*p+o*o;if(r<f){i=c[e+132>>2]|0;t=p+ +h[i>>3];u=o+ +h[i+8>>3];v=i}else{m=d/+T(r);i=c[e+132>>2]|0;t=p*m+ +h[i>>3];u=o*m+ +h[i+8>>3];v=i}m=+T(t*t/+h[22104]+u*u/+h[22105]);do{if((c[q+8>>2]|0)==0){if((c[e+212>>2]|0)!=0){break}h[v>>3]=t/m;h[(c[(c[g>>2]|0)+132>>2]|0)+8>>3]=u/m;break a}}while(0);if(m<1.0){h[v>>3]=t;h[(c[(c[g>>2]|0)+132>>2]|0)+8>>3]=u;break}else{h[v>>3]=t*.95/m;h[(c[(c[g>>2]|0)+132>>2]|0)+8>>3]=u*.95/m;break}}}while(0);s=vx(b,s)|0;}while((s|0)!=0);return}function oz(a,b,d,e,f){a=a|0;b=b|0;d=+d;e=+e;f=+f;var g=0.0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0,p=0.0,q=0;if(f==0.0){while(1){g=+(5-((yb()|0)%10|0)|0);i=+(5-((yb()|0)%10|0)|0);j=g*g+i*i;if(j!=0.0){k=i;l=j;m=g;break}}}else{k=e;l=f;m=d}if((c[44183]|0)==0){n=+h[22101]/l}else{d=+T(l);n=+h[22101]/(l*d)}o=a+8|0;a=c[o>>2]|0;do{if((c[(c[a+112>>2]|0)+8>>2]|0)==0){if((c[a+212>>2]|0)!=0){p=n;break}q=c[b+8>>2]|0;if((c[(c[q+112>>2]|0)+8>>2]|0)!=0){p=n;break}if((c[q+212>>2]|0)!=0){p=n;break}p=n*10.0}else{p=n}}while(0);n=m*p;a=b+8|0;b=(c[(c[a>>2]|0)+112>>2]|0)+16|0;h[b>>3]=n+ +h[b>>3];m=k*p;b=(c[(c[a>>2]|0)+112>>2]|0)+24|0;h[b>>3]=m+ +h[b>>3];b=(c[(c[o>>2]|0)+112>>2]|0)+16|0;h[b>>3]=+h[b>>3]-n;b=(c[(c[o>>2]|0)+112>>2]|0)+24|0;h[b>>3]=+h[b>>3]-m;return}function pz(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0.0,p=0.0,q=0,r=0,s=0,t=0.0;a=c[b+8>>2]|0;e=c[b>>2]|0;f=c[b+4>>2]|0;b=(a|0)==0;if(!b){g=a;do{i=g|0;j=a;do{if((g|0)!=(j|0)){k=c[i>>2]|0;l=c[j>>2]|0;m=c[(c[l+8>>2]|0)+132>>2]|0;n=c[(c[k+8>>2]|0)+132>>2]|0;o=+h[m>>3]- +h[n>>3];p=+h[m+8>>3]- +h[n+8>>3];oz(k,l,o,p,o*o+p*p)}j=c[j+4>>2]|0;}while((j|0)!=0);g=c[g+4>>2]|0;}while((g|0)!=0)}g=e-1|0;j=f-1|0;i=az(d,g,j)|0;if(!((i|0)==0|b)){l=i+8|0;i=a;do{k=c[i>>2]|0;n=c[l>>2]|0;if((n|0)!=0){m=k+8|0;q=n;do{n=c[q>>2]|0;r=c[(c[n+8>>2]|0)+132>>2]|0;s=c[(c[m>>2]|0)+132>>2]|0;p=+h[r>>3]- +h[s>>3];o=+h[r+8>>3]- +h[s+8>>3];t=p*p+o*o;if(t<+h[22100]){oz(k,n,p,o,t)}q=c[q+4>>2]|0;}while((q|0)!=0)}i=c[i+4>>2]|0;}while((i|0)!=0)}i=az(d,g,f)|0;if(!((i|0)==0|b)){l=i+8|0;i=a;do{q=c[i>>2]|0;k=c[l>>2]|0;if((k|0)!=0){m=q+8|0;n=k;do{k=c[n>>2]|0;s=c[(c[k+8>>2]|0)+132>>2]|0;r=c[(c[m>>2]|0)+132>>2]|0;t=+h[s>>3]- +h[r>>3];o=+h[s+8>>3]- +h[r+8>>3];p=t*t+o*o;if(p<+h[22100]){oz(q,k,t,o,p)}n=c[n+4>>2]|0;}while((n|0)!=0)}i=c[i+4>>2]|0;}while((i|0)!=0)}i=f+1|0;l=az(d,g,i)|0;if(!((l|0)==0|b)){g=l+8|0;l=a;do{n=c[l>>2]|0;q=c[g>>2]|0;if((q|0)!=0){m=n+8|0;k=q;do{q=c[k>>2]|0;r=c[(c[q+8>>2]|0)+132>>2]|0;s=c[(c[m>>2]|0)+132>>2]|0;p=+h[r>>3]- +h[s>>3];o=+h[r+8>>3]- +h[s+8>>3];t=p*p+o*o;if(t<+h[22100]){oz(n,q,p,o,t)}k=c[k+4>>2]|0;}while((k|0)!=0)}l=c[l+4>>2]|0;}while((l|0)!=0)}l=az(d,e,j)|0;if(!((l|0)==0|b)){g=l+8|0;l=a;do{k=c[l>>2]|0;n=c[g>>2]|0;if((n|0)!=0){m=k+8|0;q=n;do{n=c[q>>2]|0;s=c[(c[n+8>>2]|0)+132>>2]|0;r=c[(c[m>>2]|0)+132>>2]|0;t=+h[s>>3]- +h[r>>3];o=+h[s+8>>3]- +h[r+8>>3];p=t*t+o*o;if(p<+h[22100]){oz(k,n,t,o,p)}q=c[q+4>>2]|0;}while((q|0)!=0)}l=c[l+4>>2]|0;}while((l|0)!=0)}l=az(d,e,i)|0;if(!((l|0)==0|b)){g=l+8|0;l=a;do{q=c[l>>2]|0;k=c[g>>2]|0;if((k|0)!=0){m=q+8|0;n=k;do{k=c[n>>2]|0;r=c[(c[k+8>>2]|0)+132>>2]|0;s=c[(c[m>>2]|0)+132>>2]|0;p=+h[r>>3]- +h[s>>3];o=+h[r+8>>3]- +h[s+8>>3];t=p*p+o*o;if(t<+h[22100]){oz(q,k,p,o,t)}n=c[n+4>>2]|0;}while((n|0)!=0)}l=c[l+4>>2]|0;}while((l|0)!=0)}l=e+1|0;e=az(d,l,j)|0;if(!((e|0)==0|b)){j=e+8|0;e=a;do{g=c[e>>2]|0;n=c[j>>2]|0;if((n|0)!=0){q=g+8|0;m=n;do{n=c[m>>2]|0;k=c[(c[n+8>>2]|0)+132>>2]|0;s=c[(c[q>>2]|0)+132>>2]|0;t=+h[k>>3]- +h[s>>3];o=+h[k+8>>3]- +h[s+8>>3];p=t*t+o*o;if(p<+h[22100]){oz(g,n,t,o,p)}m=c[m+4>>2]|0;}while((m|0)!=0)}e=c[e+4>>2]|0;}while((e|0)!=0)}e=az(d,l,f)|0;if(!((e|0)==0|b)){f=e+8|0;e=a;do{j=c[e>>2]|0;m=c[f>>2]|0;if((m|0)!=0){g=j+8|0;q=m;do{m=c[q>>2]|0;n=c[(c[m+8>>2]|0)+132>>2]|0;s=c[(c[g>>2]|0)+132>>2]|0;p=+h[n>>3]- +h[s>>3];o=+h[n+8>>3]- +h[s+8>>3];t=p*p+o*o;if(t<+h[22100]){oz(j,m,p,o,t)}q=c[q+4>>2]|0;}while((q|0)!=0)}e=c[e+4>>2]|0;}while((e|0)!=0)}e=az(d,l,i)|0;if((e|0)==0|b){return 0}b=e+8|0;e=a;do{a=c[e>>2]|0;i=c[b>>2]|0;if((i|0)!=0){l=a+8|0;d=i;do{i=c[d>>2]|0;f=c[(c[i+8>>2]|0)+132>>2]|0;q=c[(c[l>>2]|0)+132>>2]|0;t=+h[f>>3]- +h[q>>3];o=+h[f+8>>3]- +h[q+8>>3];p=t*t+o*o;if(p<+h[22100]){oz(a,i,t,o,p)}d=c[d+4>>2]|0;}while((d|0)!=0)}e=c[e+4>>2]|0;}while((e|0)!=0);return 0}function qz(b,d){b=b|0;d=d|0;var e=0,f=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0.0,y=0.0,z=0.0,A=0.0,B=0.0,C=0.0,D=0.0,E=0.0,F=0,G=0,H=0.0,I=0.0,J=0.0,K=0,L=0.0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,U=0,V=0,W=0,X=0,Y=0,Z=0.0,_=0.0,$=0.0,aa=0.0,ba=0.0,ca=0.0,ea=0.0,fa=0,ga=0,ha=0.0,ia=0.0,ja=0.0,ka=0,la=0,ma=0.0,na=0.0,oa=0.0,pa=0.0,qa=0.0,ra=0.0,sa=0.0,ta=0.0,ua=0.0,va=0;e=i;i=i+16|0;f=e|0;j=ew(b|0,124936)|0;if((a[213992]|0)!=0){Ma(114144,8,1,c[o>>2]|0)|0}if((j|0)==0){k=5}else{if((a[j]|0)==0){k=5}else{l=j}}if((k|0)==5){l=107192}j=gb(l|0,58)|0;do{if((j|0)==0){m=l;n=0}else{if((j|0)!=(l|0)){if(((a[l]|0)-48|0)>>>0>=10>>>0){m=l;n=0;break}}p=Rb(l|0)|0;m=j+1|0;n=(p|0)<0?0:p}}while(0);if((a[213992]|0)!=0){gc(c[o>>2]|0,101408,(j=i,i=i+16|0,c[j>>2]=n,c[j+8>>2]=m,j)|0)|0;i=j}do{if((n|0)!=0){j=f;l=Lw(b)|0;p=Mw(b)|0;or(f,b);c[53494]=c[j>>2];c[53495]=c[j+4>>2];c[53496]=c[j+8>>2];if((a[213984]|0)!=0){g[53494]=+g[53494]/72.0;g[53495]=+g[53495]/72.0}j=ux(b)|0;if((j|0)==0){i=e;return}else{q=j;r=0}while(1){j=vx(b,q)|0;if((j|0)==0){s=r}else{t=q+8|0;u=j;j=r;while(1){v=(rz(c[t>>2]|0,c[u+8>>2]|0)|0)+j|0;w=vx(b,u)|0;if((w|0)==0){s=v;break}else{u=w;j=v}}}j=vx(b,q)|0;if((j|0)==0){break}else{q=j;r=s}}if((s|0)==0){i=e;return}j=c[d>>2]|0;x=+h[d+8>>3];y=+h[d+16>>3];z=+h[d+24>>3];u=c[d+32>>2]|0;a:do{if((n|0)>0){t=z>0.0;v=x==0.0;A=+(l|0);B=+(p|0);C=+(da(l-1|0,l)|0);w=(u|0)>0;D=+(j|0);E=y;F=s;G=0;b:while(1){h[39]=E;c[74]=j;h[38]=x;c[82]=u;if(t){h[40]=z}H=E*E;h[21637]=H;if(v){I=E*+T(A)/5.0;h[38]=I;J=I}else{J=x}I=H*+h[40];h[21428]=I;h[21429]=B*I*2.0/C;c:do{if(w){I=J*D/D;if(I>0.0){K=0;L=I}else{M=F;break}while(1){N=ux(b)|0;if((N|0)!=0){O=N;do{N=O+8|0;h[(c[(c[N>>2]|0)+112>>2]|0)+24>>3]=0.0;h[(c[(c[N>>2]|0)+112>>2]|0)+16>>3]=0.0;O=vx(b,O)|0;}while((O|0)!=0)}O=ux(b)|0;if((O|0)==0){k=62;break b}else{P=O;Q=0}while(1){O=vx(b,P)|0;if((O|0)==0){R=Q}else{N=P+8|0;S=O;O=Q;while(1){U=S+8|0;V=c[U>>2]|0;W=c[V+132>>2]|0;X=c[N>>2]|0;Y=c[X+132>>2]|0;I=+h[W>>3]- +h[Y>>3];H=+h[W+8>>3]- +h[Y+8>>3];Z=I*I+H*H;if(Z==0.0){do{_=+(5-((yb()|0)%10|0)|0);$=+(5-((yb()|0)%10|0)|0);aa=_*_+$*$;}while(aa==0.0);ba=$;ca=aa;ea=_;fa=c[N>>2]|0;ga=c[U>>2]|0}else{ba=H;ca=Z;ea=I;fa=X;ga=V}Y=rz(fa,ga)|0;ha=((Y|0)==0?+h[21429]:+h[21428])/ca;ia=ea*ha;W=(c[ga+112>>2]|0)+16|0;h[W>>3]=ia+ +h[W>>3];ja=ba*ha;W=(c[(c[U>>2]|0)+112>>2]|0)+24|0;h[W>>3]=ja+ +h[W>>3];W=(c[(c[N>>2]|0)+112>>2]|0)+16|0;h[W>>3]=+h[W>>3]-ia;W=(c[(c[N>>2]|0)+112>>2]|0)+24|0;h[W>>3]=+h[W>>3]-ja;W=Y+O|0;Y=vx(b,S)|0;if((Y|0)==0){R=W;break}else{S=Y;O=W}}}O=mw(b,P)|0;if((O|0)!=0){S=P+8|0;N=O;do{O=c[S>>2]|0;W=(c[((c[N>>2]&3|0)==2?N:N-32|0)+28>>2]|0)+8|0;Y=c[W>>2]|0;if((rz(O,Y)|0)==0){ka=c[Y+132>>2]|0;la=c[O+132>>2]|0;ja=+h[ka>>3]- +h[la>>3];ia=+h[ka+8>>3]- +h[la+8>>3];ha=+T(ja*ja+ia*ia);la=(a[213984]|0)==0;ma=+h[O+32>>3];if(la){na=+g[53494];oa=+g[53495];pa=+h[O+40>>3]*oa*.5;qa=ma*na*.5;ra=na;sa=oa}else{oa=+g[53494];na=+g[53495];pa=+h[O+40>>3]*.5+na;qa=ma*.5+oa;ra=oa;sa=na}na=+T(qa*qa+pa*pa);oa=+h[Y+32>>3];if(la){ta=sa*+h[Y+40>>3]*.5;ua=ra*oa*.5}else{ta=sa+ +h[Y+40>>3]*.5;ua=ra+oa*.5}oa=na+ +T(ua*ua+ta*ta);na=ha-oa;ma=na*na/(ha*(+h[39]+oa));oa=ja*ma;la=(c[Y+112>>2]|0)+16|0;h[la>>3]=+h[la>>3]-oa;ja=ia*ma;la=(c[(c[W>>2]|0)+112>>2]|0)+24|0;h[la>>3]=+h[la>>3]-ja;la=(c[(c[S>>2]|0)+112>>2]|0)+16|0;h[la>>3]=oa+ +h[la>>3];la=(c[(c[S>>2]|0)+112>>2]|0)+24|0;h[la>>3]=ja+ +h[la>>3]}N=ow(b,N)|0;}while((N|0)!=0)}N=vx(b,P)|0;if((N|0)==0){break}else{P=N;Q=R}}if((R|0)==0){k=62;break b}ja=L*L;N=ux(b)|0;if((N|0)!=0){S=N;do{N=S+8|0;la=c[N>>2]|0;do{if((a[la+119|0]|0)!=3){W=c[la+112>>2]|0;oa=+h[W+16>>3];ma=+h[W+24>>3];ia=oa*oa+ma*ma;if(ia<ja){W=c[la+132>>2]|0;h[W>>3]=oa+ +h[W>>3];W=(c[(c[N>>2]|0)+132>>2]|0)+8|0;h[W>>3]=ma+ +h[W>>3];break}else{ha=+T(ia);W=c[la+132>>2]|0;h[W>>3]=L*oa/ha+ +h[W>>3];W=(c[(c[N>>2]|0)+132>>2]|0)+8|0;h[W>>3]=L*ma/ha+ +h[W>>3];break}}}while(0);S=vx(b,S)|0;}while((S|0)!=0)}S=K+1|0;if((S|0)>=(c[82]|0)){M=R;break c}N=c[74]|0;ja=+h[38]*+(N-S|0)/+(N|0);if(ja>0.0){K=S;L=ja}else{M=R;break}}}else{M=F}}while(0);S=G+1|0;if((M|0)!=0&(S|0)<(n|0)){E=y+E;F=M;G=S}else{va=M;break a}}if((k|0)==62){i=e;return}}else{va=s}}while(0);if((va|0)!=0){break}i=e;return}}while(0);mr(b,m)|0;i=e;return}function rz(b,d){b=b|0;d=d|0;var e=0,f=0,i=0.0,j=0.0,k=0.0,l=0.0,m=0.0,n=0.0,o=0,p=0.0,q=0.0;e=c[d+132>>2]|0;f=c[b+132>>2]|0;i=+h[e>>3]- +h[f>>3];if(i<0.0){j=-0.0-i}else{j=i}i=+h[e+8>>3]- +h[f+8>>3];if(i<0.0){k=-0.0-i}else{k=i}f=(a[213984]|0)==0;i=+h[b+32>>3];if(f){l=+g[53494];m=+h[d+32>>3]*l*.5;n=i*l*.5}else{l=+g[53494];m=+h[d+32>>3]*.5+l;n=i*.5+l}if(j>n+m){o=0;return o|0}m=+h[b+40>>3];if(f){n=+g[53495];p=+h[d+40>>3]*n*.5;q=m*n*.5}else{n=+g[53495];p=+h[d+40>>3]*.5+n;q=m*.5+n}o=k<=q+p|0;return o|0}function sz(a){a=a|0;var b=0;b=a;while(1){a=c[b>>2]|0;eF(b);if((a|0)==0){break}else{b=a}}return}function tz(){var a=0,b=0,d=0,e=0;a=jk(1992)|0;b=a;if((a|0)==0){return b|0}d=zz(b)|0;c[d+4>>2]=0;e=a+1972|0;c[e>>2]=(c[e>>2]|0)+1;c[a>>2]=d;return b|0}function uz(a){a=a|0;var b=0;b=a|0;vz(a,c[b>>2]|0);eF(c[b>>2]|0);eF(a);return 0}function vz(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;d=a+1980|0;e=a+1912|0;f=a+1936|0;if((c[b+4>>2]|0)>0){g=0;do{h=b+8+(g*20|0)+16|0;i=c[h>>2]|0;do{if((i|0)!=0){vz(a,i);eF(c[h>>2]|0);Ez(b,g);c[d>>2]=(c[d>>2]|0)-1;if((c[e>>2]|0)==0){break}c[f>>2]=(c[f>>2]|0)+1}}while(0);g=g+1|0;}while((g|0)<64);return}else{g=0;do{do{if((c[b+8+(g*20|0)+16>>2]|0)!=0){Ez(b,g);c[d>>2]=(c[d>>2]|0)-1;if((c[e>>2]|0)==0){break}c[f>>2]=(c[f>>2]|0)+1}}while(0);g=g+1|0;}while((g|0)<64);return}}function wz(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;if((b|0)==0){cc(116120,154984,194,171160);return 0}e=b+4|0;if((c[e>>2]|0)<=-1){cc(126392,154984,195,171160);return 0}if((d|0)==0){cc(114696,154984,196,171160);return 0}f=a+1952|0;c[f>>2]=(c[f>>2]|0)+1;if((c[e>>2]|0)>0){g=0;h=0}else{e=0;f=0;while(1){i=b+8+(f*20|0)|0;do{if((c[b+8+(f*20|0)+16>>2]|0)==0){j=e}else{if((Jz(d,i|0)|0)==0){j=e;break}k=jk(8)|0;c[k+4>>2]=i;c[k>>2]=e;j=k}}while(0);i=f+1|0;if((i|0)<64){e=j;f=i}else{l=j;break}}return l|0}while(1){j=b+8+(h*20|0)+16|0;do{if((c[j>>2]|0)==0){m=g}else{if((Jz(d,b+8+(h*20|0)|0)|0)==0){m=g;break}f=wz(a,c[j>>2]|0,d)|0;if((g|0)==0){m=f;break}else{n=g}do{o=n|0;n=c[o>>2]|0;}while((n|0)!=0);c[o>>2]=f;m=g}}while(0);j=h+1|0;if((j|0)<64){g=m;h=j}else{l=m;break}}return l|0}function xz(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;g=i;i=i+48|0;h=g|0;j=g+8|0;k=g+32|0;c[h>>2]=0;if((b|0)==0|(e|0)==0){cc(107824,154984,247,171192);return 0}if((f|0)<=-1){cc(102152,154984,248,171192);return 0}if((c[(c[e>>2]|0)+4>>2]|0)<(f|0)){cc(102152,154984,248,171192);return 0}else{l=0}while(1){m=l+1|0;if((c[b+(l<<2)>>2]|0)>(c[b+(l+2<<2)>>2]|0)){n=8;break}if((m|0)<2){l=m}else{break}}if((n|0)==8){cc(96376,154984,250,171192);return 0}l=a+1912|0;m=c[a+1908>>2]|0;do{if((c[l>>2]|0)==0){o=a+1908|0;if((m|0)==0){p=o;n=14}else{q=o}}else{if((m|0)==0){o=a+1916|0;c[o>>2]=(c[o>>2]|0)+1;p=a+1908|0;n=14;break}else{o=a+1924|0;c[o>>2]=(c[o>>2]|0)+1;q=a+1908|0;break}}}while(0);if((n|0)==14){n=a+1964|0;c[n>>2]=(c[n>>2]|0)+1;q=p}if((yz(a,b,d,c[e>>2]|0,h,f)|0)==0){r=0;i=g;return r|0}do{if((c[l>>2]|0)!=0){if((c[q>>2]|0)==0){f=a+1944|0;c[f>>2]=(c[f>>2]|0)+1;break}else{f=a+1948|0;c[f>>2]=(c[f>>2]|0)+1;break}}}while(0);q=zz(a)|0;l=a+1976|0;c[l>>2]=(c[l>>2]|0)+1;c[q+4>>2]=(c[(c[e>>2]|0)+4>>2]|0)+1;Bz(j|0,c[e>>2]|0);l=j;f=j+16|0;c[f>>2]=c[e>>2];Dz(a,j,q,0)|0;Bz(k,c[h>>2]|0);d=k;c[l>>2]=c[d>>2];c[l+4>>2]=c[d+4>>2];c[l+8>>2]=c[d+8>>2];c[l+12>>2]=c[d+12>>2];c[f>>2]=c[h>>2];Dz(a,j,q,0)|0;c[e>>2]=q;q=a+1980|0;c[q>>2]=(c[q>>2]|0)+2;r=1;i=g;return r|0}function yz(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;h=i;i=i+80|0;j=h|0;k=h+24|0;l=h+32|0;m=h+48|0;n=h+64|0;c[k>>2]=0;if((b|0)==0|(e|0)==0|(f|0)==0){cc(163272,154984,311,171176);return 0}if((g|0)<=-1){cc(159256,154984,312,171176);return 0}o=e+4|0;if((c[o>>2]|0)<(g|0)){cc(159256,154984,312,171176);return 0}do{if((c[a+1912>>2]|0)!=0){if((c[a+1908>>2]|0)==0){p=a+1944|0;c[p>>2]=(c[p>>2]|0)+1;break}else{p=a+1948|0;c[p>>2]=(c[p>>2]|0)+1;break}}}while(0);p=c[o>>2]|0;if((p|0)<=(g|0)){if((p|0)!=(g|0)){cc(154208,154984,341,171176);return 0}p=j;o=b;c[p>>2]=c[o>>2];c[p+4>>2]=c[o+4>>2];c[p+8>>2]=c[o+8>>2];c[p+12>>2]=c[o+12>>2];c[j+16>>2]=d;o=a+1980|0;c[o>>2]=(c[o>>2]|0)+1;q=Dz(a,j,e,f)|0;i=h;return q|0}o=Cz(b,e)|0;p=e+8+(o*20|0)+16|0;r=e+8+(o*20|0)|0;if((yz(a,b,d,c[p>>2]|0,k,g)|0)==0){Iz(l,b,r);b=r;g=l;c[b>>2]=c[g>>2];c[b+4>>2]=c[g+4>>2];c[b+8>>2]=c[g+8>>2];c[b+12>>2]=c[g+12>>2];q=0;i=h;return q|0}else{Bz(m,c[p>>2]|0);p=r;r=m;c[p>>2]=c[r>>2];c[p+4>>2]=c[r+4>>2];c[p+8>>2]=c[r+8>>2];c[p+12>>2]=c[r+12>>2];r=c[k>>2]|0;c[j+16>>2]=r;Bz(n,r);r=j;k=n;c[r>>2]=c[k>>2];c[r+4>>2]=c[k+4>>2];c[r+8>>2]=c[k+8>>2];c[r+12>>2]=c[k+12>>2];k=a+1980|0;c[k>>2]=(c[k>>2]|0)+1;q=Dz(a,j,e,f)|0;i=h;return q|0}return 0}function zz(a){a=a|0;var b=0;b=a+1968|0;c[b>>2]=(c[b>>2]|0)+1;b=dF(1288)|0;a=b;c[b>>2]=0;c[b+4>>2]=-1;b=0;do{Fz(a+8+(b*20|0)|0);c[a+8+(b*20|0)+16>>2]=0;b=b+1|0;}while((b|0)<64);return a|0}function Az(a){a=a|0;var b=0;c[a>>2]=0;c[a+4>>2]=-1;b=0;do{Fz(a+8+(b*20|0)|0);c[a+8+(b*20|0)+16>>2]=0;b=b+1|0;}while((b|0)<64);return}function Bz(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0;d=i;i=i+32|0;e=d|0;f=d+16|0;if((b|0)==0){cc(81248,164736,99,171248)}Fz(e);g=e;h=f;j=0;k=1;while(1){do{if((c[b+8+(j*20|0)+16>>2]|0)==0){l=k}else{m=b+8+(j*20|0)|0;if((k|0)==0){Iz(f,e,m);c[g>>2]=c[h>>2];c[g+4>>2]=c[h+4>>2];c[g+8>>2]=c[h+8>>2];c[g+12>>2]=c[h+12>>2];l=0;break}else{n=m;c[g>>2]=c[n>>2];c[g+4>>2]=c[n+4>>2];c[g+8>>2]=c[n+8>>2];c[g+12>>2]=c[n+12>>2];l=0;break}}}while(0);n=j+1|0;if((n|0)<64){j=n;k=l}else{break}}l=a;c[l>>2]=c[g>>2];c[l+4>>2]=c[g+4>>2];c[l+8>>2]=c[g+8>>2];c[l+12>>2]=c[g+12>>2];i=d;return}function Cz(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;d=i;i=i+32|0;e=d|0;f=d+16|0;if((a|0)==0|(b|0)==0){cc(132216,164736,125,171224);return 0}g=e;h=f;j=0;k=1;l=0;m=0;n=0;while(1){do{if((c[b+8+(j*20|0)+16>>2]|0)==0){o=n;p=m;q=l;r=k}else{s=b+8+(j*20|0)|0;t=Hz(s)|0;Iz(f,a,s);c[g>>2]=c[h>>2];c[g+4>>2]=c[h+4>>2];c[g+8>>2]=c[h+8>>2];c[g+12>>2]=c[h+12>>2];s=(Hz(e)|0)-t|0;if(!((s|0)>=(l|0)&(k|0)==0)){o=j;p=t;q=s;r=0;break}u=(s|0)==(l|0)&(t|0)<(m|0);o=u?j:n;p=u?t:m;q=u?s:l;r=0}}while(0);s=j+1|0;if((s|0)<64){j=s;k=r;l=q;m=p;n=o}else{break}}i=d;return o|0}function Dz(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;if((b|0)==0){cc(116928,164736,167,171360);return 0}if((d|0)==0){cc(81248,164736,168,171360);return 0}f=d|0;if((c[f>>2]|0)<64){g=0;while(1){h=g+1|0;if((c[d+8+(g*20|0)+16>>2]|0)==0){break}if((h|0)<64){g=h}else{i=9;break}}if((i|0)==9){cc(109424,164736,178,171360);return 0}i=d+8+(g*20|0)|0;g=b;c[i>>2]=c[g>>2];c[i+4>>2]=c[g+4>>2];c[i+8>>2]=c[g+8>>2];c[i+12>>2]=c[g+12>>2];c[i+16>>2]=c[g+16>>2];c[f>>2]=(c[f>>2]|0)+1;j=0;return j|0}do{if((c[a+1912>>2]|0)!=0){if((c[a+1908>>2]|0)==0){f=a+1944|0;c[f>>2]=(c[f>>2]|0)+1;break}else{f=a+1948|0;c[f>>2]=(c[f>>2]|0)+1;break}}}while(0);if((e|0)==0){cc(103392,164736,187,171360);return 0}Kz(a,d,b,e);if((c[d+4>>2]|0)==0){d=a+1972|0;c[d>>2]=(c[d>>2]|0)+1;j=1;return j|0}else{d=a+1976|0;c[d>>2]=(c[d>>2]|0)+1;j=1;return j|0}return 0}function Ez(a,b){a=a|0;b=b|0;var d=0;if(!((a|0)!=0&b>>>0<64>>>0)){cc(97840,164736,201,171312)}d=a+8+(b*20|0)+16|0;if((c[d>>2]|0)==0){cc(92240,164736,202,171312)}else{Fz(a+8+(b*20|0)|0);c[d>>2]=0;d=a|0;c[d>>2]=(c[d>>2]|0)-1;return}}function Fz(a){a=a|0;vF(a|0,0,16)|0;return}function Gz(a){a=a|0;var b=0,d=0,e=0;b=i;i=i+16|0;d=b|0;c[d>>2]=1;c[d+8>>2]=-1;c[d+12>>2]=0;c[d+4>>2]=0;e=a;a=d;c[e>>2]=c[a>>2];c[e+4>>2]=c[a+4>>2];c[e+8>>2]=c[a+8>>2];c[e+12>>2]=c[a+12>>2];i=b;return}function Hz(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;b=i;if((a|0)==0){cc(118600,156592,154,171144);return 0}d=c[a>>2]|0;if((d|0)>(c[a+8>>2]|0)){e=0;i=b;return e|0}else{f=0;g=1;h=d}while(1){d=(c[a+(f+2<<2)>>2]|0)-h|0;j=da(d,g)|0;k=f+1|0;if(((j>>>0)/(d>>>0)|0|0)!=(g|0)){break}if((k|0)>=2){e=j;l=8;break}f=k;g=j;h=c[a+(k<<2)>>2]|0}if((l|0)==8){i=b;return e|0}Fv(1,126672,(l=i,i=i+1|0,i=i+7&-8,c[l>>2]=0,l)|0)|0;i=l;e=-1;i=b;return e|0}function Iz(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0;e=i;i=i+16|0;f=e|0;if((b|0)==0|(d|0)==0){cc(114688,156592,197,171328)}g=c[b>>2]|0;h=c[b+8>>2]|0;if((g|0)>(h|0)){j=a;k=d;c[j>>2]=c[k>>2];c[j+4>>2]=c[k+4>>2];c[j+8>>2]=c[k+8>>2];c[j+12>>2]=c[k+12>>2];i=e;return}k=c[d>>2]|0;j=c[d+8>>2]|0;if((k|0)>(j|0)){l=a;m=b;c[l>>2]=c[m>>2];c[l+4>>2]=c[m+4>>2];c[l+8>>2]=c[m+8>>2];c[l+12>>2]=c[m+12>>2];i=e;return}else{c[f>>2]=(g|0)<(k|0)?g:k;c[f+8>>2]=(h|0)>(j|0)?h:j;j=c[b+4>>2]|0;h=c[d+4>>2]|0;c[f+4>>2]=(j|0)<(h|0)?j:h;h=c[b+12>>2]|0;b=c[d+12>>2]|0;c[f+12>>2]=(h|0)>(b|0)?h:b;b=a;a=f;c[b>>2]=c[a>>2];c[b+4>>2]=c[a+4>>2];c[b+8>>2]=c[a+8>>2];c[b+12>>2]=c[a+12>>2];i=e;return}}function Jz(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0;if((a|0)==0|(b|0)==0){cc(107560,156592,218,171240);return 0}else{d=0}while(1){e=d+2|0;if((c[a+(d<<2)>>2]|0)>(c[b+(e<<2)>>2]|0)){f=0;g=6;break}h=d+1|0;if((c[b+(d<<2)>>2]|0)>(c[a+(e<<2)>>2]|0)){f=0;g=6;break}if((h|0)<2){d=h}else{f=1;g=6;break}}if((g|0)==6){return f|0}return 0}function Kz(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0;f=i;i=i+440|0;h=f|0;j=f+16|0;k=f+32|0;l=f+48|0;m=f+64|0;n=f+328|0;o=f+344|0;p=f+360|0;q=f+376|0;r=f+392|0;s=f+408|0;t=f+424|0;if((b|0)==0){cc(108600,150992,40,171128)}if((d|0)==0){cc(123264,150992,41,171128)}u=a+1912|0;do{if((c[u>>2]|0)!=0){if((c[a+1908>>2]|0)==0){v=a+1928|0;c[v>>2]=(c[v>>2]|0)+1;break}else{v=a+1932|0;c[v>>2]=(c[v>>2]|0)+1;break}}}while(0);v=b+4|0;w=c[v>>2]|0;x=t;y=0;do{if((c[b+8+(y*20|0)+16>>2]|0)==0){z=11;break}A=a+4+(y*20|0)|0;B=b+8+(y*20|0)|0;c[A>>2]=c[B>>2];c[A+4>>2]=c[B+4>>2];c[A+8>>2]=c[B+8>>2];c[A+12>>2]=c[B+12>>2];c[A+16>>2]=c[B+16>>2];y=y+1|0;}while((y|0)<64);if((z|0)==11){cc(166560,150992,111,171296)}y=a+1284|0;B=d;c[y>>2]=c[B>>2];c[y+4>>2]=c[B+4>>2];c[y+8>>2]=c[B+8>>2];c[y+12>>2]=c[B+12>>2];c[y+16>>2]=c[B+16>>2];B=a+1304|0;y=B;d=a+4|0;c[y>>2]=c[d>>2];c[y+4>>2]=c[d+4>>2];c[y+8>>2]=c[d+8>>2];c[y+12>>2]=c[d+12>>2];d=1;do{Iz(t,B,a+4+(d*20|0)|0);c[y>>2]=c[x>>2];c[y+4>>2]=c[x+4>>2];c[y+8>>2]=c[x+8>>2];c[y+12>>2]=c[x+12>>2];d=d+1|0;}while((d|0)<65);d=a+1320|0;c[d>>2]=Hz(B)|0;Az(b);B=q;x=r;y=s;t=p;A=a+1848|0;c[A>>2]=0;C=a+1844|0;c[C>>2]=0;D=a+1868|0;Gz(p);p=D;c[p>>2]=c[t>>2];c[p+4>>2]=c[t+4>>2];c[p+8>>2]=c[t+8>>2];c[p+12>>2]=c[t+12>>2];E=a+1852|0;c[E>>2]=c[t>>2];c[E+4>>2]=c[t+4>>2];c[E+8>>2]=c[t+8>>2];c[E+12>>2]=c[t+12>>2];t=a+1888|0;c[t>>2]=0;E=a+1884|0;c[E>>2]=0;F=0;do{c[a+1584+(F<<2)>>2]=0;c[a+1324+(F<<2)>>2]=-1;F=F+1|0;}while((F|0)<65);F=n;G=o;H=0;while(1){c[m+(H<<2)>>2]=Hz(a+4+(H*20|0)|0)|0;I=H+1|0;if((I|0)<65){H=I}else{J=0;K=0;L=0;M=0;break}}while(1){H=J+1|0;I=a+4+(J*20|0)|0;N=c[m+(J<<2)>>2]|0;O=H;P=K;Q=L;R=M;do{Iz(o,I,a+4+(O*20|0)|0);c[F>>2]=c[G>>2];c[F+4>>2]=c[G+4>>2];c[F+8>>2]=c[G+8>>2];c[F+12>>2]=c[G+12>>2];S=(Hz(n)|0)-N|0;T=S-(c[m+(O<<2)>>2]|0)|0;S=T>>>0>P>>>0;P=S?T:P;Q=S?J:Q;R=S?O:R;O=O+1|0;}while((O|0)<65);if((H|0)<64){J=H;K=P;L=Q;M=R}else{break}}M=l;L=a+1584+(Q<<2)|0;if((c[L>>2]|0)!=0){cc(80304,150992,257,171344)}c[a+1324+(Q<<2)>>2]=0;c[L>>2]=1;L=a+1852|0;K=a+4+(Q*20|0)|0;if((c[C>>2]|0)==0){Q=L;J=K;c[Q>>2]=c[J>>2];c[Q+4>>2]=c[J+4>>2];c[Q+8>>2]=c[J+8>>2];c[Q+12>>2]=c[J+12>>2]}else{Iz(l,K,L);K=L;c[K>>2]=c[M>>2];c[K+4>>2]=c[M+4>>2];c[K+8>>2]=c[M+8>>2];c[K+12>>2]=c[M+12>>2]}c[E>>2]=Hz(L)|0;c[C>>2]=(c[C>>2]|0)+1;M=k;K=a+1584+(R<<2)|0;if((c[K>>2]|0)!=0){cc(80304,150992,257,171344)}c[a+1324+(R<<2)>>2]=1;c[K>>2]=1;K=a+4+(R*20|0)|0;if((c[A>>2]|0)==0){R=K;c[p>>2]=c[R>>2];c[p+4>>2]=c[R+4>>2];c[p+8>>2]=c[R+8>>2];c[p+12>>2]=c[R+12>>2]}else{Iz(k,K,D);c[p>>2]=c[M>>2];c[p+4>>2]=c[M+4>>2];c[p+8>>2]=c[M+8>>2];c[p+12>>2]=c[M+12>>2]}c[t>>2]=Hz(D)|0;M=(c[A>>2]|0)+1|0;c[A>>2]=M;p=c[C>>2]|0;a:do{if((p+M|0)<65){K=a+1892|0;k=j;R=0;l=0;J=p;Q=M;while(1){m=65-(c[K>>2]|0)|0;if((J|0)<(m|0)&(Q|0)<(m|0)){U=0;V=-1;W=R;X=l}else{Y=J;Z=Q;break a}while(1){do{if((c[a+1584+(U<<2)>>2]|0)==0){m=a+4+(U*20|0)|0;Iz(r,m,L);c[B>>2]=c[x>>2];c[B+4>>2]=c[x+4>>2];c[B+8>>2]=c[x+8>>2];c[B+12>>2]=c[x+12>>2];n=Hz(q)|0;G=c[E>>2]|0;Iz(s,m,D);c[B>>2]=c[y>>2];c[B+4>>2]=c[y+4>>2];c[B+8>>2]=c[y+8>>2];c[B+12>>2]=c[y+12>>2];m=Hz(q)|0;F=m-(c[t>>2]|0)+(G-n)|0;n=(F|0)>-1?F:-F|0;G=F>>>31;if((n|0)>(V|0)){_=G;$=U;aa=n;break}if((n|0)!=(V|0)){_=X;$=W;aa=V;break}n=(c[a+1844+(G<<2)>>2]|0)<(c[a+1844+(X<<2)>>2]|0);_=n?G:X;$=n?U:W;aa=V}else{_=X;$=W;aa=V}}while(0);n=U+1|0;if((n|0)<65){U=n;V=aa;W=$;X=_}else{break}}n=a+1584+($<<2)|0;if((c[n>>2]|0)!=0){break}c[a+1324+($<<2)>>2]=_;c[n>>2]=1;n=a+1844+(_<<2)|0;G=a+1852+(_<<4)|0;F=a+4+($*20|0)|0;if((c[n>>2]|0)==0){m=G;o=F;c[m>>2]=c[o>>2];c[m+4>>2]=c[o+4>>2];c[m+8>>2]=c[o+8>>2];c[m+12>>2]=c[o+12>>2]}else{Iz(j,F,G);F=G;c[F>>2]=c[k>>2];c[F+4>>2]=c[k+4>>2];c[F+8>>2]=c[k+8>>2];c[F+12>>2]=c[k+12>>2]}c[a+1884+(_<<2)>>2]=Hz(G)|0;c[n>>2]=(c[n>>2]|0)+1;n=c[C>>2]|0;G=c[A>>2]|0;if((G+n|0)<65){R=$;l=_;J=n;Q=G}else{Y=n;Z=G;break a}}cc(80304,150992,257,171344)}else{Y=p;Z=M}}while(0);if((Y+Z|0)<65){M=(Y|0)>=(65-(c[a+1892>>2]|0)|0)|0;p=h;_=a+1844+(M<<2)|0;$=a+1852+(M<<4)|0;j=$;X=a+1884+(M<<2)|0;W=0;do{aa=a+1584+(W<<2)|0;if((c[aa>>2]|0)==0){c[a+1324+(W<<2)>>2]=M;c[aa>>2]=1;aa=a+4+(W*20|0)|0;if((c[_>>2]|0)==0){V=aa;c[j>>2]=c[V>>2];c[j+4>>2]=c[V+4>>2];c[j+8>>2]=c[V+8>>2];c[j+12>>2]=c[V+12>>2]}else{Iz(h,aa,$);c[j>>2]=c[p>>2];c[j+4>>2]=c[p+4>>2];c[j+8>>2]=c[p+8>>2];c[j+12>>2]=c[p+12>>2]}c[X>>2]=Hz($)|0;c[_>>2]=(c[_>>2]|0)+1;}W=W+1|0;}while((W|0)<65);ba=c[C>>2]|0;ca=c[A>>2]|0}else{ba=Y;ca=Z}if((ba+ca|0)!=65){cc(90120,150992,210,171264)}Z=c[a+1892>>2]|0;if((ba|0)<(Z|0)|(ca|0)<(Z|0)){cc(84992,150992,212,171264)}Z=Hz(L)|0;L=(Hz(D)|0)+Z|0;do{if((c[u>>2]|0)!=0){if((c[a+1908>>2]|0)!=0|(L|0)==0){break}Z=a+1960|0;g[Z>>2]=+((c[d>>2]|0)>>>0>>>0)/+(L|0)+ +g[Z>>2]}}while(0);c[e>>2]=zz(a)|0;c[v>>2]=w;c[(c[e>>2]|0)+4>>2]=w;w=c[e>>2]|0;if((w|0)==0){cc(106776,150992,298,171280)}else{da=0}do{v=c[a+1324+(da<<2)>>2]|0;if(v>>>0>=2>>>0){z=65;break}if((v|0)==0){Dz(a,a+4+(da*20|0)|0,b,0)|0}else if((v|0)==1){Dz(a,a+4+(da*20|0)|0,w,0)|0}da=da+1|0;}while((da|0)<65);if((z|0)==65){cc(95440,150992,303,171280)}if(((c[c[e>>2]>>2]|0)+(c[b>>2]|0)|0)==65){i=f;return}else{cc(113536,150992,86,171128)}}function Lz(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;return(c[b>>2]|0)-(c[d>>2]|0)|0}
-
-
-
-function Lo(b,d,e,f,g){b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0.0,G=0.0,H=0,I=0,J=0,K=0.0,L=0,M=0,N=0,O=0,P=0,Q=0.0,R=0.0,S=0.0,T=0.0,U=0.0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0.0,ja=0,ka=0.0,la=0.0,ma=0,na=0.0,oa=0.0,pa=0.0,qa=0.0,ra=0.0,sa=0.0,ta=0.0,ua=0,va=0,wa=0.0,xa=0.0,ya=0.0,za=0.0,Aa=0,Ba=0.0,Ca=0.0,Da=0.0,Ea=0.0,Fa=0.0,Ga=0.0,Ha=0.0,Ia=0.0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,_a=0,$a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0.0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0.0,sb=0.0,tb=0.0,ub=0.0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0.0,Cb=0.0,Db=0,Eb=0.0,Fb=0.0,Gb=0.0,Hb=0.0,Ib=0.0,Kb=0.0,Lb=0.0,Mb=0.0;j=i;i=i+272|0;k=j|0;l=j+8|0;m=j+16|0;n=j+176|0;o=j+192|0;p=j+208|0;q=f;r=f+32|0;s=Hx(c[((c[q>>2]&3|0)==3?f:r)+28>>2]|0)|0;t=c[q>>2]&3;q=c[((t|0)==3?f:r)+28>>2]|0;r=c[((t|0)==2?f:f-32|0)+28>>2]|0;f=(e|0)>0;do{if(f){t=0;u=0;v=0;while(1){w=c[(c[b+(t+d<<2)>>2]|0)+8>>2]|0;x=((c[w+96>>2]|0)!=0)+v|0;if((a[w+44|0]|0)==0){if((a[w+84|0]|0)==0){y=u}else{z=4}}else{z=4}if((z|0)==4){z=0;y=1}w=t+1|0;if((w|0)<(e|0)){t=w;u=y;v=x}else{break}}if((y|0)==0){if((x|0)==0){break}v=m;u=n;t=o;w=c[b+(d<<2)>>2]|0;A=jk(e<<2)|0;B=A;if(f){C=0;do{c[B+(C<<2)>>2]=c[b+(C+d<<2)>>2];C=C+1|0;}while((C|0)<(e|0))}Jb(A|0,e|0,4,152);C=c[q+8>>2]|0;D=w+8|0;E=c[D>>2]|0;F=+h[C+16>>3]+ +h[E+16>>3];G=+h[C+24>>3]+ +h[E+24>>3];E=n|0;h[E>>3]=F;H=n+8|0;h[H>>3]=G;I=c[r+8>>2]|0;J=c[D>>2]|0;G=+h[I+16>>3]+ +h[J+56>>3];K=+h[I+24>>3]+ +h[J+64>>3];J=o|0;h[J>>3]=G;D=o+8|0;h[D>>3]=K;K=F+ +h[C+96>>3];F=G- +h[I+88>>3];G=(K+F)*.5;I=c[B>>2]|0;C=m|0;c[v>>2]=c[u>>2];c[v+4>>2]=c[u+4>>2];c[v+8>>2]=c[u+8>>2];c[v+12>>2]=c[u+12>>2];L=m+16|0;M=L;c[M>>2]=c[u>>2];c[M+4>>2]=c[u+4>>2];c[M+8>>2]=c[u+8>>2];c[M+12>>2]=c[u+12>>2];M=m+32|0;N=M;c[N>>2]=c[t>>2];c[N+4>>2]=c[t+4>>2];c[N+8>>2]=c[t+8>>2];c[N+12>>2]=c[t+12>>2];N=m+48|0;O=N;c[O>>2]=c[t>>2];c[O+4>>2]=c[t+4>>2];c[O+8>>2]=c[t+8>>2];c[O+12>>2]=c[t+12>>2];cm(I,c[((c[I>>2]&3|0)==2?I:I-32|0)+28>>2]|0,C,4,11848);P=I+8|0;h[(c[(c[P>>2]|0)+96>>2]|0)+56>>3]=G;I=c[(c[P>>2]|0)+96>>2]|0;h[I+64>>3]=+h[H>>3]+(+h[I+32>>3]+6.0)*.5;a[(c[(c[P>>2]|0)+96>>2]|0)+81|0]=1;Q=+h[H>>3]+3.0;I=c[(c[P>>2]|0)+96>>2]|0;R=Q+ +h[I+32>>3];S=+h[I+24>>3]*.5;T=G-S;U=G+S;a:do{if((x|0)>1){I=L|0;P=m+24|0;V=M|0;W=m+40|0;X=N|0;Y=m+56|0;Z=m+64|0;_=m+72|0;$=m+80|0;aa=m+88|0;ba=m+96|0;ca=m+104|0;da=m+112|0;ea=m+120|0;fa=k+4|0;ga=k|0;ha=(g|0)==6|0;S=Q;ia=R;ja=1;ka=0.0;la=0.0;while(1){ma=c[B+(ja<<2)>>2]|0;if((ja&1|0)==0){c[v>>2]=c[u>>2];c[v+4>>2]=c[u+4>>2];c[v+8>>2]=c[u+8>>2];c[v+12>>2]=c[u+12>>2];h[I>>3]=T;h[P>>3]=+h[H>>3];h[V>>3]=T;h[W>>3]=ia;h[X>>3]=U;h[Y>>3]=ia;h[Z>>3]=U;na=+h[D>>3];h[_>>3]=na;oa=+h[J>>3];h[$>>3]=oa;h[aa>>3]=na;h[ba>>3]=oa;oa=ia+6.0;h[ca>>3]=oa;h[da>>3]=+h[E>>3];h[ea>>3]=oa;oa=+h[(c[(c[ma+8>>2]|0)+96>>2]|0)+32>>3];pa=la;qa=ka;ra=ia+(oa+6.0);sa=S;ta=ia+oa*.5+6.0}else{ua=ma+8|0;va=c[(c[ua>>2]|0)+96>>2]|0;if((ja|0)==1){oa=+h[va+24>>3]*.5;wa=G+oa;xa=G-oa}else{wa=la;xa=ka}oa=S-(+h[va+32>>3]+6.0);c[v>>2]=c[u>>2];c[v+4>>2]=c[u+4>>2];c[v+8>>2]=c[u+8>>2];c[v+12>>2]=c[u+12>>2];h[I>>3]=+h[E>>3];na=oa+-6.0;h[P>>3]=na;h[V>>3]=+h[J>>3];h[W>>3]=na;c[O>>2]=c[t>>2];c[O+4>>2]=c[t+4>>2];c[O+8>>2]=c[t+8>>2];c[O+12>>2]=c[t+12>>2];h[Z>>3]=wa;h[_>>3]=+h[D>>3];h[$>>3]=wa;h[aa>>3]=oa;h[ba>>3]=xa;h[ca>>3]=oa;h[da>>3]=xa;h[ea>>3]=+h[H>>3];pa=wa;qa=xa;ra=ia;sa=oa;ta=oa+ +h[(c[(c[ua>>2]|0)+96>>2]|0)+32>>3]*.5}c[fa>>2]=8;c[ga>>2]=C;ua=fl(n,o,k,l,ha)|0;if((c[l>>2]|0)==0){break}va=ma+8|0;h[(c[(c[va>>2]|0)+96>>2]|0)+56>>3]=G;h[(c[(c[va>>2]|0)+96>>2]|0)+64>>3]=ta;a[(c[(c[va>>2]|0)+96>>2]|0)+81|0]=1;cm(ma,c[((c[ma>>2]&3|0)==2?ma:ma-32|0)+28>>2]|0,ua,c[l>>2]|0,11848);ua=ja+1|0;if((ua|0)<(x|0)){S=sa;ia=ra;ja=ua;ka=qa;la=pa}else{ya=sa;za=ra;Aa=ua;Ba=qa;Ca=pa;break a}}i=j;return}else{ya=Q;za=R;Aa=1;Ba=0.0;Ca=0.0}}while(0);b:do{if((Aa|0)<(e|0)){w=L|0;ja=m+24|0;ha=M|0;ga=m+40|0;fa=N|0;ea=m+56|0;da=m+64|0;ca=m+72|0;ba=m+80|0;aa=m+88|0;$=m+96|0;_=m+104|0;Z=m+112|0;W=m+120|0;V=k+4|0;P=k|0;I=(g|0)==6|0;R=(K*2.0+F)/3.0;Q=(K+F*2.0)/3.0;G=ya;la=za;Y=Aa;ka=Ba;ia=Ca;while(1){X=c[B+(Y<<2)>>2]|0;if((Y&1|0)==0){c[v>>2]=c[u>>2];c[v+4>>2]=c[u+4>>2];c[v+8>>2]=c[u+8>>2];c[v+12>>2]=c[u+12>>2];h[w>>3]=T;h[ja>>3]=+h[H>>3];h[ha>>3]=T;h[ga>>3]=la;h[fa>>3]=U;h[ea>>3]=la;h[da>>3]=U;S=+h[D>>3];h[ca>>3]=S;oa=+h[J>>3];h[ba>>3]=oa;h[aa>>3]=S;h[$>>3]=oa;oa=la+6.0;h[_>>3]=oa;h[Z>>3]=+h[E>>3];Da=ia;Ea=ka;Fa=oa;Ga=G;Ha=oa}else{ua=(Y|0)==1;oa=ua?R:ka;S=ua?Q:ia;na=G+-6.0;c[v>>2]=c[u>>2];c[v+4>>2]=c[u+4>>2];c[v+8>>2]=c[u+8>>2];c[v+12>>2]=c[u+12>>2];h[w>>3]=+h[E>>3];Ia=na+-6.0;h[ja>>3]=Ia;h[ha>>3]=+h[J>>3];h[ga>>3]=Ia;c[O>>2]=c[t>>2];c[O+4>>2]=c[t+4>>2];c[O+8>>2]=c[t+8>>2];c[O+12>>2]=c[t+12>>2];h[da>>3]=S;h[ca>>3]=+h[D>>3];h[ba>>3]=S;h[aa>>3]=na;h[$>>3]=oa;h[_>>3]=na;h[Z>>3]=oa;Da=S;Ea=oa;Fa=la;Ga=na;Ha=+h[H>>3]}h[W>>3]=Ha;c[V>>2]=8;c[P>>2]=C;ua=fl(n,o,k,l,I)|0;ma=c[l>>2]|0;if((ma|0)==0){break}cm(X,c[((c[X>>2]&3|0)==2?X:X-32|0)+28>>2]|0,ua,ma,11848);ma=Y+1|0;if((ma|0)<(e|0)){G=Ga;la=Fa;Y=ma;ka=Ea;ia=Da}else{break b}}i=j;return}}while(0);eF(A);i=j;return}C=jk(156)|0;if((Nw(s)|0)==0){Ja=Hw(162440,173920,0)|0}else{Ja=Hw(162440,173944,0)|0}Wx(Ja|0,106832,272,1)|0;Wv(Ja,0,101184,213456)|0;H=jk(96)|0;D=Ja+8|0;c[(c[D>>2]|0)+8>>2]=H;H=s+8|0;h[c[(c[D>>2]|0)+8>>2]>>3]=+h[c[(c[H>>2]|0)+8>>2]>>3];h[(c[(c[D>>2]|0)+8>>2]|0)+24>>3]=+h[(c[(c[H>>2]|0)+8>>2]|0)+24>>3];a[(c[D>>2]|0)+115|0]=a[(c[H>>2]|0)+115|0]|0;c[(c[D>>2]|0)+116>>2]=(c[(c[H>>2]|0)+116>>2]&1|0)==0?1:0;c[(c[D>>2]|0)+236>>2]=c[(c[H>>2]|0)+236>>2];c[(c[D>>2]|0)+240>>2]=c[(c[H>>2]|0)+240>>2];t=s|0;O=Xv(Ix(t)|0,1,0)|0;J=Xv(Ix(t)|0,1,O)|0;if((J|0)!=0){O=J;do{Wv(Ja,1,c[O+8>>2]|0,c[O+12>>2]|0)|0;O=Xv(Ix(t)|0,1,O)|0;}while((O|0)!=0)}O=Xv(Ix(t)|0,2,0)|0;A=Xv(Ix(t)|0,2,O)|0;if((A|0)!=0){O=A;do{Wv(Ja,2,c[O+8>>2]|0,c[O+12>>2]|0)|0;O=Xv(Ix(t)|0,2,O)|0;}while((O|0)!=0)}if((Wv(Ja,2,153464,0)|0)==0){Wv(Ja,2,153464,213456)|0}if((Wv(Ja,2,151416,0)|0)==0){Wv(Ja,2,151416,213456)|0}O=C;c[O>>2]=c[53812];t=C+4|0;c[t>>2]=c[53770];A=C+8|0;c[A>>2]=c[53768];J=C+12|0;c[J>>2]=c[53750];E=C+16|0;c[E>>2]=c[53774];u=C+20|0;c[u>>2]=c[53800];v=C+24|0;c[v>>2]=c[53798];B=C+28|0;c[B>>2]=c[53796];N=C+32|0;c[N>>2]=c[53794];M=C+36|0;c[M>>2]=c[53792];L=C+40|0;c[L>>2]=c[53790];Y=C+44|0;c[Y>>2]=c[53788];I=C+48|0;c[I>>2]=c[53782];P=C+52|0;c[P>>2]=c[53780];V=C+56|0;c[V>>2]=c[53778];W=C+60|0;c[W>>2]=c[53758];Z=C+64|0;c[Z>>2]=c[53756];_=C+68|0;c[_>>2]=c[53748];$=C+72|0;c[$>>2]=c[53618];aa=C+76|0;c[aa>>2]=c[53574];ba=C+80|0;c[ba>>2]=c[53590];ca=C+84|0;c[ca>>2]=c[53582];da=C+88|0;c[da>>2]=c[53624];ga=C+92|0;c[ga>>2]=c[53626];ha=C+96|0;c[ha>>2]=c[53628];ja=C+100|0;c[ja>>2]=c[53614];w=C+104|0;c[w>>2]=c[53572];ea=C+108|0;c[ea>>2]=c[53588];fa=C+112|0;c[fa>>2]=c[53604];ma=C+116|0;c[ma>>2]=c[53586];ua=C+120|0;c[ua>>2]=c[53598];X=C+124|0;c[X>>2]=c[53584];va=C+128|0;c[va>>2]=c[53602];Ka=C+132|0;c[Ka>>2]=c[53636];La=C+136|0;c[La>>2]=c[53630];Ma=C+140|0;c[Ma>>2]=c[53606];Na=C+144|0;c[Na>>2]=c[53620];Oa=C+152|0;c[Oa>>2]=c[53522];Pa=C+148|0;c[Pa>>2]=c[53718];c[53812]=0;c[53770]=Wv(Ja,2,147448,0)|0;c[53768]=Wv(Ja,2,144280,0)|0;Qa=Wv(Ja,2,142360,0)|0;c[53750]=Qa;if((Qa|0)==0){c[53750]=Wv(Ja,2,142360,213456)|0}c[53774]=0;c[53800]=0;c[53798]=Wv(Ja,2,139248,0)|0;c[53796]=Wv(Ja,2,135624,0)|0;c[53794]=Wv(Ja,2,133768,0)|0;c[53792]=0;c[53790]=Wv(Ja,2,166600,0)|0;c[53788]=Wv(Ja,2,131720,0)|0;c[53782]=0;c[53780]=Wv(Ja,2,128320,0)|0;c[53778]=Wv(Ja,2,126248,0)|0;c[53758]=Wv(Ja,2,123736,0)|0;c[53756]=0;c[53748]=0;c[53618]=Wv(Ja,1,121824,0)|0;c[53574]=Wv(Ja,1,120688,0)|0;c[53590]=Wv(Ja,1,119936,0)|0;c[53582]=0;c[53624]=Wv(Ja,1,135624,0)|0;c[53626]=Wv(Ja,1,139248,0)|0;c[53628]=0;c[53614]=Wv(Ja,1,166600,0)|0;c[53572]=0;c[53588]=0;c[53604]=Wv(Ja,1,119384,0)|0;c[53586]=Wv(Ja,1,118704,0)|0;c[53598]=Wv(Ja,1,117792,0)|0;c[53584]=Wv(Ja,1,116864,0)|0;c[53602]=Wv(Ja,1,115952,0)|0;c[53636]=Wv(Ja,1,114632,0)|0;c[53630]=Wv(Ja,1,113792,0)|0;c[53606]=0;c[53620]=0;c[53718]=Wv(Ja,0,119384,0)|0;Qa=ry(Ja,113672,1)|0;Ra=Qa|0;Wx(Ra,106832,272,1)|0;gw(Ra,101184,95624)|0;Ra=~~+h[(c[r+8>>2]|0)+16>>3];Sa=~~+h[(c[q+8>>2]|0)+16>>3];Ta=(c[(c[H>>2]|0)+116>>2]&1|0)==0;Ua=Ta?r:q;Va=Ta?q:r;Ta=Po(Qa,Va)|0;Qa=Po(Ja,Ua)|0;if(f){Wa=0;Xa=0;while(1){Ya=c[b+(Wa+d<<2)>>2]|0;Za=Ya+8|0;_a=c[Za>>2]|0;if((a[_a+112|0]|0)==0){$a=Ya;ab=Za}else{Za=_a;do{bb=c[Za+116>>2]|0;cb=bb+8|0;Za=c[cb>>2]|0;}while((a[Za+112|0]|0)!=0);$a=bb;ab=cb}if((c[((c[$a>>2]&3|0)==3?$a:$a+32|0)+28>>2]|0)==(Va|0)){Za=uw(Ja,Ta,Qa,0,1)|0;jw($a|0,Za|0)|0;db=Za}else{Za=uw(Ja,Qa,Ta,0,1)|0;jw($a|0,Za|0)|0;db=Za}c[(c[ab>>2]|0)+120>>2]=db;do{if((Xa|0)==0){Za=c[ab>>2]|0;if((a[Za+44|0]|0)!=0){eb=0;break}if((a[Za+84|0]|0)!=0){eb=0;break}c[(c[db+8>>2]|0)+120>>2]=$a;eb=db}else{eb=Xa}}while(0);Za=Wa+1|0;if((Za|0)<(e|0)){Wa=Za;Xa=eb}else{break}}if((eb|0)==0){z=54}else{fb=eb}}else{z=54}if((z|0)==54){fb=uw(Ja,Ta,Qa,0,1)|0}hw(fb|0,c[53750]|0,90272)|0;c[(c[D>>2]|0)+136>>2]=c[(c[H>>2]|0)+136>>2];qn(Ja,g);so(Ja);Zp(Ja,0);jp(Ja,0);Hp(Ja,0);Xa=Va+8|0;Wa=c[Xa>>2]|0;Za=c[Ua+8>>2]|0;_a=Ta+8|0;Ya=c[(c[D>>2]|0)+180>>2]|0;if((Ya|0)!=0){U=+(Ra|0);T=+(~~((+h[(c[_a>>2]|0)+16>>3]+ +h[(c[Qa+8>>2]|0)+16>>3])*.5)|0);F=+(Sa|0);K=+(~~((+h[Wa+16>>3]- +h[Wa+96>>3]+ +h[Za+16>>3]+ +h[Za+88>>3])*.5)|0);Za=Ya;do{Ya=Za;do{if((Ya|0)==(Ta|0)){Wa=Za+8|0;h[(c[Wa>>2]|0)+24>>3]=U;h[(c[Wa>>2]|0)+16>>3]=T}else{Wa=Za+8|0;gb=(c[Wa>>2]|0)+24|0;if((Ya|0)==(Qa|0)){h[gb>>3]=F;h[(c[Wa>>2]|0)+16>>3]=T;break}else{h[gb>>3]=K;break}}}while(0);Za=c[(c[Za+8>>2]|0)+164>>2]|0;}while((Za|0)!=0)}pq(Ja);Bo(Ja,0);Xk(Ja);Za=c[Xa>>2]|0;Qa=c[_a>>2]|0;if((c[(c[H>>2]|0)+116>>2]&1|0)==0){hb=Qa+16|0;ib=+h[Za+24>>3]- +h[Qa+24>>3]}else{hb=Qa+24|0;ib=+h[Za+24>>3]+ +h[Qa+16>>3]}K=+h[Za+16>>3]- +h[hb>>3];if(f){Za=p;Qa=p|0;Ta=p+16|0;Sa=p+32|0;Ra=p+48|0;D=p+56|0;Ua=0;do{Va=c[b+(Ua+d<<2)>>2]|0;Ya=Va+8|0;gb=c[Ya>>2]|0;if((a[gb+112|0]|0)==0){jb=Va;kb=Ya;lb=gb}else{Ya=gb;do{mb=c[Ya+116>>2]|0;nb=mb+8|0;Ya=c[nb>>2]|0;}while((a[Ya+112|0]|0)!=0);jb=mb;kb=nb;lb=Ya}gb=c[lb+120>>2]|0;Va=gb+8|0;Wa=c[Va>>2]|0;do{if(!((gb|0)==(fb|0)&(c[Wa+120>>2]|0)==0)){ob=c[c[Wa+8>>2]>>2]|0;pb=ob+4|0;qb=bm(jb,c[pb>>2]|0)|0;c[qb+8>>2]=c[ob+8>>2];T=+h[ob+16>>3];F=+h[ob+24>>3];if((c[(c[H>>2]|0)+116>>2]&1|0)==0){rb=T;sb=F}else{rb=F;sb=-0.0-T}h[qb+16>>3]=K+rb;h[qb+24>>3]=ib+sb;c[qb+12>>2]=c[ob+12>>2];T=+h[ob+32>>3];F=+h[ob+40>>3];if((c[(c[H>>2]|0)+116>>2]&1|0)==0){tb=T;ub=F}else{tb=F;ub=-0.0-T}h[qb+32>>3]=K+tb;h[qb+40>>3]=ib+ub;c:do{if((c[pb>>2]|0)>0){vb=qb|0;wb=ob|0;xb=0;do{yb=c[vb>>2]|0;zb=yb+(xb<<4)|0;Ab=c[wb>>2]|0;T=+h[Ab+(xb<<4)>>3];F=+h[Ab+(xb<<4)+8>>3];if((c[(c[H>>2]|0)+116>>2]&1|0)==0){Bb=T;Cb=F}else{Bb=F;Cb=-0.0-T}Ab=zb;h[zb>>3]=K+Bb;h[yb+(xb<<4)+8>>3]=ib+Cb;c[Za>>2]=c[Ab>>2];c[Za+4>>2]=c[Ab+4>>2];c[Za+8>>2]=c[Ab+8>>2];c[Za+12>>2]=c[Ab+12>>2];Ab=xb+1|0;if((Ab|0)>=(c[pb>>2]|0)){break c}yb=c[vb>>2]|0;zb=yb+(Ab<<4)|0;Db=c[wb>>2]|0;T=+h[Db+(Ab<<4)>>3];F=+h[Db+(Ab<<4)+8>>3];if((c[(c[H>>2]|0)+116>>2]&1|0)==0){Eb=T;Fb=F}else{Eb=F;Fb=-0.0-T}Db=zb;h[zb>>3]=K+Eb;h[yb+(Ab<<4)+8>>3]=ib+Fb;c[Ta>>2]=c[Db>>2];c[Ta+4>>2]=c[Db+4>>2];c[Ta+8>>2]=c[Db+8>>2];c[Ta+12>>2]=c[Db+12>>2];Db=xb+2|0;Ab=c[vb>>2]|0;yb=Ab+(Db<<4)|0;zb=c[wb>>2]|0;T=+h[zb+(Db<<4)>>3];F=+h[zb+(Db<<4)+8>>3];if((c[(c[H>>2]|0)+116>>2]&1|0)==0){Gb=T;Hb=F}else{Gb=F;Hb=-0.0-T}zb=yb;h[yb>>3]=K+Gb;h[Ab+(Db<<4)+8>>3]=ib+Hb;c[Sa>>2]=c[zb>>2];c[Sa+4>>2]=c[zb+4>>2];c[Sa+8>>2]=c[zb+8>>2];c[Sa+12>>2]=c[zb+12>>2];xb=xb+3|0;zb=c[wb>>2]|0;T=+h[zb+(xb<<4)>>3];F=+h[zb+(xb<<4)+8>>3];if((c[(c[H>>2]|0)+116>>2]&1|0)==0){Ib=T;Kb=F}else{Ib=F;Kb=-0.0-T}h[Ra>>3]=K+Ib;h[D>>3]=ib+Kb;Oh((c[H>>2]|0)+16|0,Qa);}while((xb|0)<(c[pb>>2]|0))}}while(0);pb=c[(c[kb>>2]|0)+96>>2]|0;if((pb|0)==0){break}ob=c[(c[Va>>2]|0)+96>>2]|0;T=+h[ob+56>>3];F=+h[ob+64>>3];if((c[(c[H>>2]|0)+116>>2]&1|0)==0){Lb=T;Mb=F}else{Lb=F;Mb=-0.0-T}h[pb+56>>3]=K+Lb;h[pb+64>>3]=ib+Mb;a[(c[(c[kb>>2]|0)+96>>2]|0)+81|0]=1;_m(s,c[(c[kb>>2]|0)+96>>2]|0)}}while(0);Ua=Ua+1|0;}while((Ua|0)<(e|0))}c[53812]=c[O>>2];c[53770]=c[t>>2];c[53768]=c[A>>2];c[53750]=c[J>>2];c[53774]=c[E>>2];c[53800]=c[u>>2];c[53798]=c[v>>2];c[53796]=c[B>>2];c[53794]=c[N>>2];c[53792]=c[M>>2];c[53790]=c[L>>2];c[53788]=c[Y>>2];c[53782]=c[I>>2];c[53780]=c[P>>2];c[53778]=c[V>>2];c[53758]=c[W>>2];c[53756]=c[Z>>2];c[53748]=c[_>>2];c[53618]=c[$>>2];c[53574]=c[aa>>2];c[53590]=c[ba>>2];c[53582]=c[ca>>2];c[53624]=c[da>>2];c[53626]=c[ga>>2];c[53628]=c[ha>>2];c[53614]=c[ja>>2];c[53572]=c[w>>2];c[53588]=c[ea>>2];c[53604]=c[fa>>2];c[53586]=c[ma>>2];c[53598]=c[ua>>2];c[53584]=c[X>>2];c[53602]=c[va>>2];c[53636]=c[Ka>>2];c[53630]=c[La>>2];c[53606]=c[Ma>>2];c[53620]=c[Na>>2];c[53718]=c[Pa>>2];c[53522]=c[Oa>>2];eF(C);to(Ja);Kw(Ja)|0;i=j;return}}while(0);Mo(c[q+8>>2]|0,c[r+8>>2]|0,b,d,e,g);i=j;return}function Mo(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0.0,n=0.0,o=0.0,p=0.0,q=0.0,r=0.0,s=0.0,t=0,u=0,v=0.0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0.0;j=i;i=i+160|0;k=j|0;l=c[(c[d+(e<<2)>>2]|0)+8>>2]|0;m=+h[a+16>>3]+ +h[l+16>>3];n=+h[a+24>>3]+ +h[l+24>>3];o=+h[b+16>>3]+ +h[l+56>>3];p=+h[b+24>>3]+ +h[l+64>>3];do{if((f|0)>1){q=+h[a+80>>3];r=q/+(f-1|0);s=n-q*.5}else{if((f|0)>0){r=0.0;s=n;break}i=j;return}}while(0);a=k|0;l=k|0;b=k+8|0;q=(m*2.0+o)/3.0;t=k+16|0;u=k+24|0;v=(m+o*2.0)/3.0;w=k+32|0;x=k+40|0;y=k+48|0;z=k+56|0;A=k+64|0;B=k+72|0;C=k+80|0;D=k+88|0;E=k+96|0;F=k+104|0;G=k+112|0;H=k+120|0;I=k+128|0;J=k+136|0;K=k+144|0;L=k+152|0;if((g&-9|0)==2){g=0;M=s;while(1){k=c[d+(g+e<<2)>>2]|0;h[l>>3]=m;h[b>>3]=n;h[t>>3]=q;h[u>>3]=M;h[w>>3]=v;h[x>>3]=M;h[y>>3]=o;h[z>>3]=p;cm(k,c[((c[k>>2]&3|0)==2?k:k-32|0)+28>>2]|0,a,4,11848);k=g+1|0;if((k|0)<(f|0)){g=k;M=r+M}else{break}}i=j;return}else{g=0;M=s;while(1){k=c[d+(g+e<<2)>>2]|0;h[l>>3]=m;h[b>>3]=n;h[t>>3]=m;h[u>>3]=n;h[w>>3]=q;h[x>>3]=M;h[y>>3]=q;h[z>>3]=M;h[A>>3]=q;h[B>>3]=M;h[C>>3]=v;h[D>>3]=M;h[E>>3]=v;h[F>>3]=M;h[G>>3]=v;h[H>>3]=M;h[I>>3]=o;h[J>>3]=p;h[K>>3]=o;h[L>>3]=p;cm(k,c[((c[k>>2]&3|0)==2?k:k-32|0)+28>>2]|0,a,10,11848);k=g+1|0;if((k|0)<(f|0)){g=k;M=r+M}else{break}}i=j;return}}function No(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0.0,o=0.0,p=0.0,q=0.0;j=i;i=i+32|0;k=j|0;l=Hx(d|0)|0;Do(k,a,d,0,e);a=f;m=k;c[a>>2]=c[m>>2];c[a+4>>2]=c[m+4>>2];c[a+8>>2]=c[m+8>>2];c[a+12>>2]=c[m+12>>2];c[a+16>>2]=c[m+16>>2];c[a+20>>2]=c[m+20>>2];c[a+24>>2]=c[m+24>>2];c[a+28>>2]=c[m+28>>2];n=+h[f>>3];o=+h[f+16>>3];c[f+48>>2]=4;if(g<<24>>24==0){gm(b,e,2,f,0)}else{em(b,e,2,f,0)}e=f+52|0;b=c[e>>2]|0;p=+h[f+56+(b-1<<5)+24>>3];g=c[d+8>>2]|0;q=+(~~(+h[g+24>>3]+ +(c[(c[(c[l+8>>2]|0)+184>>2]|0)+((c[g+232>>2]|0)*44|0)+20>>2]|0))|0);if(!(n<o&p<q)){i=j;return}c[e>>2]=b+1;h[f+56+(b<<5)>>3]=n;h[f+56+(b<<5)+8>>3]=p;h[f+56+(b<<5)+16>>3]=o;h[f+56+(b<<5)+24>>3]=q;i=j;return}function Oo(a,b,d,e,f,g){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0.0,o=0.0,p=0.0,q=0.0;j=i;i=i+32|0;k=j|0;l=Hx(d|0)|0;Do(k,a,d,0,e);a=f;m=k;c[a>>2]=c[m>>2];c[a+4>>2]=c[m+4>>2];c[a+8>>2]=c[m+8>>2];c[a+12>>2]=c[m+12>>2];c[a+16>>2]=c[m+16>>2];c[a+20>>2]=c[m+20>>2];c[a+24>>2]=c[m+24>>2];c[a+28>>2]=c[m+28>>2];n=+h[f>>3];o=+h[f+16>>3];c[f+48>>2]=1;if(g<<24>>24==0){gm(b,e,2,f,0)}else{em(b,e,2,f,0)}e=f+52|0;b=c[e>>2]|0;p=+h[f+56+(b-1<<5)+8>>3];g=c[d+8>>2]|0;q=+(~~(+h[g+24>>3]- +(c[(c[(c[l+8>>2]|0)+184>>2]|0)+((c[g+232>>2]|0)*44|0)+20>>2]|0))|0);if(!(n<o&q<p)){i=j;return}c[e>>2]=b+1;h[f+56+(b<<5)>>3]=n;h[f+56+(b<<5)+8>>3]=q;h[f+56+(b<<5)+16>>3]=o;h[f+56+(b<<5)+24>>3]=p;i=j;return}function Po(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=i;e=b|0;f=Ax(a,$w(e)|0,1)|0;a=f|0;Wx(a,85112,304,1)|0;jw(e,a)|0;if((pl(b)|0)!=2){i=d;return f|0}e=b+8|0;b=kk((xF(c[c[(c[e>>2]|0)+104>>2]>>2]|0)|0)+3|0)|0;nb(b|0,80376,(g=i,i=i+8|0,c[g>>2]=c[c[(c[e>>2]|0)+104>>2]>>2],g)|0)|0;i=g;gw(a,166600,b)|0;i=d;return f|0}function Qo(a,b){a=a|0;b=b|0;var d=0,e=0,f=0.0,g=0.0,i=0.0,j=0.0;d=c[(c[(c[a>>2]|0)+8>>2]|0)+96>>2]|0;a=c[(c[(c[b>>2]|0)+8>>2]|0)+96>>2]|0;b=(a|0)!=0;if((d|0)==0){e=b&1;return e|0}if(!b){e=-1;return e|0}f=+h[d+24>>3];g=+h[d+32>>3];i=+h[a+24>>3];j=+h[a+32>>3];if(f>i){e=-1;return e|0}if(f<i){e=1;return e|0}if(g>j){e=-1;return e|0}e=g<j|0;return e|0}function Ro(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=c[(c[a+8>>2]|0)+116>>2]|0;if((b|0)==0){d=a}else{a=b;while(1){b=c[(c[a+8>>2]|0)+116>>2]|0;if((b|0)==0){break}else{a=b}}d=a}a=c[d>>2]&3;b=c[(c[((a|0)==2?d:d-32|0)+28>>2]|0)+8>>2]|0;e=c[b+232>>2]|0;f=c[(c[((a|0)==3?d:d+32|0)+28>>2]|0)+8>>2]|0;d=c[f+232>>2]|0;if((e|0)>(d|0)){g=0;return g|0}if((e|0)<(d|0)){g=1;return g|0}g=(c[b+236>>2]|0)<(c[f+236>>2]|0)|0;return g|0}function So(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;d=(c[a+8>>2]|0)+180|0;e=(c[b+8>>2]|0)+172|0;f=c[d>>2]|0;g=c[d+4>>2]|0;d=c[e>>2]|0;h=c[e+4>>2]|0;if(!((g|0)>0&(h|0)>0)){i=0;return i|0}if((g|0)<(h|0)){h=c[f>>2]|0;if((h|0)==0){i=0;return i|0}else{j=0;k=h}while(1){h=j+1|0;if((c[((c[k>>2]&3|0)==2?k:k-32|0)+28>>2]|0)==(b|0)){i=k;l=9;break}g=c[f+(h<<2)>>2]|0;if((g|0)==0){i=0;l=9;break}else{j=h;k=g}}if((l|0)==9){return i|0}}else{k=c[d>>2]|0;if((k|0)==0){i=0;return i|0}else{m=0;n=k}while(1){k=m+1|0;if((c[((c[n>>2]&3|0)==3?n:n+32|0)+28>>2]|0)==(a|0)){i=n;l=9;break}j=c[d+(k<<2)>>2]|0;if((j|0)==0){i=0;l=9;break}else{m=k;n=j}}if((l|0)==9){return i|0}}return 0}function To(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;d=(c[a+8>>2]|0)+188|0;e=(c[b+8>>2]|0)+196|0;f=c[d>>2]|0;g=c[d+4>>2]|0;d=c[e>>2]|0;h=c[e+4>>2]|0;if(!((g|0)>0&(h|0)>0)){i=0;return i|0}if((g|0)<(h|0)){h=c[f>>2]|0;if((h|0)==0){i=0;return i|0}else{j=0;k=h}while(1){h=j+1|0;if((c[((c[k>>2]&3|0)==2?k:k-32|0)+28>>2]|0)==(b|0)){i=k;l=9;break}g=c[f+(h<<2)>>2]|0;if((g|0)==0){i=0;l=9;break}else{j=h;k=g}}if((l|0)==9){return i|0}}else{k=c[d>>2]|0;if((k|0)==0){i=0;return i|0}else{m=0;n=k}while(1){k=m+1|0;if((c[((c[n>>2]&3|0)==3?n:n+32|0)+28>>2]|0)==(a|0)){i=n;l=9;break}j=c[d+(k<<2)>>2]|0;if((j|0)==0){i=0;l=9;break}else{m=k;n=j}}if((l|0)==9){return i|0}}return 0}function Uo(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;b=a;d=a+32|0;e=(c[(c[((c[b>>2]&3|0)==3?a:d)+28>>2]|0)+8>>2]|0)+180|0;f=c[e>>2]|0;if((f|0)==0){g=kk((c[e+4>>2]<<2)+8|0)|0}else{g=mk(f,(c[e+4>>2]<<2)+8|0)|0}c[(c[(c[((c[b>>2]&3|0)==3?a:d)+28>>2]|0)+8>>2]|0)+180>>2]=g;g=(c[(c[((c[b>>2]&3|0)==3?a:d)+28>>2]|0)+8>>2]|0)+184|0;e=c[g>>2]|0;c[g>>2]=e+1;c[(c[(c[(c[((c[b>>2]&3|0)==3?a:d)+28>>2]|0)+8>>2]|0)+180>>2]|0)+(e<<2)>>2]=a;e=(c[(c[((c[b>>2]&3|0)==3?a:d)+28>>2]|0)+8>>2]|0)+180|0;c[(c[e>>2]|0)+(c[e+4>>2]<<2)>>2]=0;e=a-32|0;d=(c[(c[((c[b>>2]&3|0)==2?a:e)+28>>2]|0)+8>>2]|0)+172|0;g=c[d>>2]|0;if((g|0)==0){h=kk((c[d+4>>2]<<2)+8|0)|0}else{h=mk(g,(c[d+4>>2]<<2)+8|0)|0}c[(c[(c[((c[b>>2]&3|0)==2?a:e)+28>>2]|0)+8>>2]|0)+172>>2]=h;h=(c[(c[((c[b>>2]&3|0)==2?a:e)+28>>2]|0)+8>>2]|0)+176|0;d=c[h>>2]|0;c[h>>2]=d+1;c[(c[(c[(c[((c[b>>2]&3|0)==2?a:e)+28>>2]|0)+8>>2]|0)+172>>2]|0)+(d<<2)>>2]=a;d=(c[(c[((c[b>>2]&3|0)==2?a:e)+28>>2]|0)+8>>2]|0)+172|0;c[(c[d>>2]|0)+(c[d+4>>2]<<2)>>2]=0;return a|0}function Vo(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;if((a|0)==0){cc(95824,144408,117,170808)}b=a;d=c[b>>2]|0;e=(c[(c[((d&3|0)==3?a:a+32|0)+28>>2]|0)+8>>2]|0)+180|0;f=e+4|0;g=f;h=c[g>>2]|0;a:do{if((h|0)>0){i=c[e>>2]|0;j=0;while(1){k=i+(j<<2)|0;l=j+1|0;if((c[k>>2]|0)==(a|0)){break}if((l|0)<(h|0)){j=l}else{m=d;break a}}j=h-1|0;c[f>>2]=j;c[k>>2]=c[i+(j<<2)>>2];c[(c[e>>2]|0)+(c[g>>2]<<2)>>2]=0;m=c[b>>2]|0}else{m=d}}while(0);d=(c[(c[((m&3|0)==2?a:a-32|0)+28>>2]|0)+8>>2]|0)+172|0;m=d+4|0;b=m;g=c[b>>2]|0;if((g|0)<=0){return}e=c[d>>2]|0;k=0;while(1){n=e+(k<<2)|0;f=k+1|0;if((c[n>>2]|0)==(a|0)){break}if((f|0)<(g|0)){k=f}else{o=13;break}}if((o|0)==13){return}o=g-1|0;c[m>>2]=o;c[n>>2]=c[e+(o<<2)>>2];c[(c[d>>2]|0)+(c[b>>2]<<2)>>2]=0;return}function Wo(a){a=a|0;var b=0,d=0,e=0,f=0,g=0;b=a;d=a+32|0;e=(c[(c[((c[b>>2]&3|0)==3?a:d)+28>>2]|0)+8>>2]|0)+204|0;f=c[e>>2]|0;if((f|0)==0){g=kk((c[e+4>>2]<<2)+8|0)|0}else{g=mk(f,(c[e+4>>2]<<2)+8|0)|0}c[(c[(c[((c[b>>2]&3|0)==3?a:d)+28>>2]|0)+8>>2]|0)+204>>2]=g;g=(c[(c[((c[b>>2]&3|0)==3?a:d)+28>>2]|0)+8>>2]|0)+208|0;e=c[g>>2]|0;c[g>>2]=e+1;c[(c[(c[(c[((c[b>>2]&3|0)==3?a:d)+28>>2]|0)+8>>2]|0)+204>>2]|0)+(e<<2)>>2]=a;e=(c[(c[((c[b>>2]&3|0)==3?a:d)+28>>2]|0)+8>>2]|0)+204|0;c[(c[e>>2]|0)+(c[e+4>>2]<<2)>>2]=0;return}function Xo(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;b=(c[(c[((c[a>>2]&3|0)==3?a:a+32|0)+28>>2]|0)+8>>2]|0)+204|0;d=b+4|0;e=d;f=c[e>>2]|0;g=c[b>>2]|0;h=g;a:do{if((f|0)>0){i=0;while(1){j=i+1|0;if((c[h+(i<<2)>>2]|0)==(a|0)){break}if((j|0)<(f|0)){i=j}else{break a}}return}}while(0);if((g|0)==0){k=kk((f<<2)+8|0)|0}else{k=mk(g,(f<<2)+8|0)|0}c[b>>2]=k;f=c[e>>2]|0;c[d>>2]=f+1;c[k+(f<<2)>>2]=a;c[(c[b>>2]|0)+(c[e>>2]<<2)>>2]=0;return}function Yo(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;g=jk(64)|0;h=g+32|0;i=h;c[i>>2]=c[i>>2]|3;j=g;k=g;c[k>>2]=c[k>>2]&-4|2;l=g+8|0;c[l>>2]=jk(176)|0;m=h;c[((c[k>>2]&3|0)==3?j:m)+28>>2]=d;d=g-32|0;c[((c[k>>2]&3|0)==2?j:d)+28>>2]=e;a[(c[l>>2]|0)+112|0]=1;if((f|0)==0){c[(c[l>>2]|0)+156>>2]=1;b[(c[l>>2]|0)+154>>1]=1;b[(c[l>>2]|0)+168>>1]=1;b[(c[l>>2]|0)+170>>1]=1;return j|0}e=f;c[k>>2]=c[k>>2]&15|c[e>>2]&-16;c[i>>2]=c[i>>2]&15|c[e>>2]&-16;i=f+8|0;b[(c[l>>2]|0)+168>>1]=b[(c[i>>2]|0)+168>>1]|0;b[(c[l>>2]|0)+154>>1]=b[(c[i>>2]|0)+154>>1]|0;c[(c[l>>2]|0)+156>>2]=c[(c[i>>2]|0)+156>>2];b[(c[l>>2]|0)+170>>1]=b[(c[i>>2]|0)+170>>1]|0;h=c[((c[k>>2]&3|0)==3?j:m)+28>>2]|0;m=c[e>>2]&3;n=f+32|0;do{if((h|0)==(c[((m|0)==3?f:n)+28>>2]|0)){o=(c[l>>2]|0)+16|0;p=(c[i>>2]|0)+16|0;c[o>>2]=c[p>>2];c[o+4>>2]=c[p+4>>2];c[o+8>>2]=c[p+8>>2];c[o+12>>2]=c[p+12>>2];c[o+16>>2]=c[p+16>>2];c[o+20>>2]=c[p+20>>2];c[o+24>>2]=c[p+24>>2];c[o+28>>2]=c[p+28>>2];c[o+32>>2]=c[p+32>>2];c[o+36>>2]=c[p+36>>2];q=f-32|0}else{p=f-32|0;if((h|0)!=(c[((m|0)==2?f:p)+28>>2]|0)){q=p;break}o=(c[l>>2]|0)+16|0;r=(c[i>>2]|0)+56|0;c[o>>2]=c[r>>2];c[o+4>>2]=c[r+4>>2];c[o+8>>2]=c[r+8>>2];c[o+12>>2]=c[r+12>>2];c[o+16>>2]=c[r+16>>2];c[o+20>>2]=c[r+20>>2];c[o+24>>2]=c[r+24>>2];c[o+28>>2]=c[r+28>>2];c[o+32>>2]=c[r+32>>2];c[o+36>>2]=c[r+36>>2];q=p}}while(0);m=c[((c[k>>2]&3|0)==2?j:d)+28>>2]|0;d=c[e>>2]&3;do{if((m|0)==(c[((d|0)==2?f:q)+28>>2]|0)){e=(c[l>>2]|0)+56|0;k=(c[i>>2]|0)+56|0;c[e>>2]=c[k>>2];c[e+4>>2]=c[k+4>>2];c[e+8>>2]=c[k+8>>2];c[e+12>>2]=c[k+12>>2];c[e+16>>2]=c[k+16>>2];c[e+20>>2]=c[k+20>>2];c[e+24>>2]=c[k+24>>2];c[e+28>>2]=c[k+28>>2];c[e+32>>2]=c[k+32>>2];c[e+36>>2]=c[k+36>>2]}else{if((m|0)!=(c[((d|0)==3?f:n)+28>>2]|0)){break}k=(c[l>>2]|0)+56|0;e=(c[i>>2]|0)+16|0;c[k>>2]=c[e>>2];c[k+4>>2]=c[e+4>>2];c[k+8>>2]=c[e+8>>2];c[k+12>>2]=c[e+12>>2];c[k+16>>2]=c[e+16>>2];c[k+20>>2]=c[e+20>>2];c[k+24>>2]=c[e+24>>2];c[k+28>>2]=c[e+28>>2];c[k+32>>2]=c[e+32>>2];c[k+36>>2]=c[e+36>>2]}}while(0);n=(c[i>>2]|0)+172|0;if((c[n>>2]|0)==0){c[n>>2]=g}c[(c[l>>2]|0)+116>>2]=f;return j|0}function Zo(a,b,c){a=a|0;b=b|0;c=c|0;return Uo(Yo(a,b,c)|0)|0}function _o(a,b){a=a|0;b=b|0;var d=0,e=0;d=a+8|0;a=b+8|0;c[(c[a>>2]|0)+164>>2]=c[(c[d>>2]|0)+180>>2];e=c[(c[a>>2]|0)+164>>2]|0;if((e|0)!=0){c[(c[e+8>>2]|0)+168>>2]=b}c[(c[d>>2]|0)+180>>2]=b;c[(c[a>>2]|0)+168>>2]=0;if((c[(c[a>>2]|0)+164>>2]|0)==(b|0)){cc(120656,144408,215,170688)}else{return}}function $o(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;if((a|0)==(b|0)){cc(112448,144408,220,170672)}d=b+8|0;e=(c[d>>2]|0)+164|0;if((c[e>>2]|0)!=0){cc(105872,144408,221,170672)}f=a+8|0;c[e>>2]=c[(c[f>>2]|0)+164>>2];e=c[(c[f>>2]|0)+164>>2]|0;if((e|0)!=0){c[(c[e+8>>2]|0)+168>>2]=b}c[(c[d>>2]|0)+168>>2]=a;c[(c[f>>2]|0)+164>>2]=b;return}function ap(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;d=a+8|0;a=c[(c[d>>2]|0)+180>>2]|0;e=a;if((a|0)==0|(e|0)==(b|0)){f=e}else{e=a;while(1){a=c[(c[e+8>>2]|0)+164>>2]|0;g=a;if((a|0)==0|(g|0)==(b|0)){f=g;break}else{e=a}}}if((f|0)==0){cc(100160,144408,231,170784)}f=b+8|0;b=c[f>>2]|0;e=c[b+164>>2]|0;if((e|0)==0){h=b;i=0}else{c[(c[e+8>>2]|0)+168>>2]=c[b+168>>2];b=c[f>>2]|0;h=b;i=c[b+164>>2]|0}b=c[h+168>>2]|0;if((b|0)==0){c[(c[d>>2]|0)+180>>2]=i;return}else{c[(c[b+8>>2]|0)+164>>2]=i;return}}function bp(b){b=b|0;var d=0,e=0,f=0;d=jk(52)|0;e=d;c[e>>2]=c[e>>2]&-4|1;e=jk(304)|0;f=d+8|0;c[f>>2]=e;c[d+12>>2]=b;a[e+156|0]=1;h[(c[f>>2]|0)+96>>3]=1.0;h[(c[f>>2]|0)+88>>3]=1.0;h[(c[f>>2]|0)+80>>3]=1.0;c[(c[f>>2]|0)+216>>2]=1;c[(c[f>>2]|0)+176>>2]=0;e=jk(20)|0;c[(c[f>>2]|0)+172>>2]=e;c[(c[f>>2]|0)+184>>2]=0;e=jk(20)|0;c[(c[f>>2]|0)+180>>2]=e;e=b+8|0;c[(c[f>>2]|0)+164>>2]=c[(c[e>>2]|0)+180>>2];b=c[(c[f>>2]|0)+164>>2]|0;if((b|0)!=0){c[(c[b+8>>2]|0)+168>>2]=d}b=d;c[(c[e>>2]|0)+180>>2]=b;c[(c[f>>2]|0)+168>>2]=0;if((c[(c[f>>2]|0)+164>>2]|0)==(b|0)){cc(120656,144408,215,170688);return 0}else{b=(c[e>>2]|0)+220|0;c[b>>2]=(c[b>>2]|0)+1;return d|0}return 0}function cp(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;e=d;f=d+32|0;g=(c[(c[((c[e>>2]&3|0)==3?d:f)+28>>2]|0)+8>>2]|0)+188|0;h=c[g>>2]|0;if((h|0)==0){i=kk((c[g+4>>2]<<2)+8|0)|0}else{i=mk(h,(c[g+4>>2]<<2)+8|0)|0}c[(c[(c[((c[e>>2]&3|0)==3?d:f)+28>>2]|0)+8>>2]|0)+188>>2]=i;i=(c[(c[((c[e>>2]&3|0)==3?d:f)+28>>2]|0)+8>>2]|0)+192|0;g=c[i>>2]|0;c[i>>2]=g+1;c[(c[(c[(c[((c[e>>2]&3|0)==3?d:f)+28>>2]|0)+8>>2]|0)+188>>2]|0)+(g<<2)>>2]=d;g=(c[(c[((c[e>>2]&3|0)==3?d:f)+28>>2]|0)+8>>2]|0)+188|0;c[(c[g>>2]|0)+(c[g+4>>2]<<2)>>2]=0;g=d-32|0;f=(c[(c[((c[e>>2]&3|0)==2?d:g)+28>>2]|0)+8>>2]|0)+196|0;i=c[f>>2]|0;if((i|0)==0){j=kk((c[f+4>>2]<<2)+8|0)|0}else{j=mk(i,(c[f+4>>2]<<2)+8|0)|0}c[(c[(c[((c[e>>2]&3|0)==2?d:g)+28>>2]|0)+8>>2]|0)+196>>2]=j;j=(c[(c[((c[e>>2]&3|0)==2?d:g)+28>>2]|0)+8>>2]|0)+200|0;f=c[j>>2]|0;c[j>>2]=f+1;c[(c[(c[(c[((c[e>>2]&3|0)==2?d:g)+28>>2]|0)+8>>2]|0)+196>>2]|0)+(f<<2)>>2]=d;f=(c[(c[((c[e>>2]&3|0)==2?d:g)+28>>2]|0)+8>>2]|0)+196|0;c[(c[f>>2]|0)+(c[f+4>>2]<<2)>>2]=0;a[(c[b+8>>2]|0)+228|0]=1;a[(c[(Ix(b|0)|0)+8>>2]|0)+228|0]=1;return}function dp(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;if((a|0)==0){cc(95824,144408,269,170760)}b=c[(c[a+8>>2]|0)+116>>2]|0;do{if((b|0)!=0){d=(c[b+8>>2]|0)+172|0;if((c[d>>2]|0)!=(a|0)){break}c[d>>2]=0}}while(0);b=a;d=c[b>>2]|0;e=(c[(c[((d&3|0)==3?a:a+32|0)+28>>2]|0)+8>>2]|0)+188|0;f=e+4|0;g=f;h=c[g>>2]|0;a:do{if((h|0)>0){i=c[e>>2]|0;j=0;while(1){k=i+(j<<2)|0;l=j+1|0;if((c[k>>2]|0)==(a|0)){break}if((l|0)<(h|0)){j=l}else{m=d;break a}}j=h-1|0;c[f>>2]=j;c[k>>2]=c[i+(j<<2)>>2];c[(c[e>>2]|0)+(c[g>>2]<<2)>>2]=0;m=c[b>>2]|0}else{m=d}}while(0);d=(c[(c[((m&3|0)==2?a:a-32|0)+28>>2]|0)+8>>2]|0)+196|0;m=d+4|0;b=m;g=c[b>>2]|0;if((g|0)<=0){return}e=c[d>>2]|0;k=0;while(1){n=e+(k<<2)|0;f=k+1|0;if((c[n>>2]|0)==(a|0)){break}if((f|0)<(g|0)){k=f}else{o=16;break}}if((o|0)==16){return}o=g-1|0;c[m>>2]=o;c[n>>2]=c[e+(o<<2)>>2];c[(c[d>>2]|0)+(c[b>>2]<<2)>>2]=0;return}function ep(a,d){a=a|0;d=d|0;var f=0,g=0,h=0,j=0,k=0;f=i;g=a+8|0;a=(c[g>>2]|0)+172|0;h=c[a>>2]|0;if((h|0)==(d|0)){Fv(0,94472,(j=i,i=i+1|0,i=i+7&-8,c[j>>2]=0,j)|0)|0;i=j;i=f;return}if((h|0)!=0){cc(89112,144408,340,170264)}c[a>>2]=d;a=(c[d+8>>2]|0)+170|0;h=b[(c[g>>2]|0)+170>>1]|0;if((e[a>>1]|0)>>>0<(h&65535)>>>0){b[a>>1]=h;k=d}else{k=d}while(1){d=k+8|0;h=(c[d>>2]|0)+168|0;b[h>>1]=(b[h>>1]|0)+(b[(c[g>>2]|0)+168>>1]|0);h=(c[d>>2]|0)+154|0;b[h>>1]=(b[h>>1]|0)+(b[(c[g>>2]|0)+154>>1]|0);h=(c[d>>2]|0)+156|0;c[h>>2]=(c[h>>2]|0)+(c[(c[g>>2]|0)+156>>2]|0);h=c[(c[d>>2]|0)+172>>2]|0;if((h|0)==0){break}k=h}i=f;return}function fp(d){d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0;e=d+8|0;d=c[e>>2]|0;f=c[d+172>>2]|0;if((f|0)==0){g=d;h=g+172|0;c[h>>2]=0;return}else{i=f;j=d}while(1){d=i;f=i+8|0;k=(c[f>>2]|0)+168|0;b[k>>1]=(b[k>>1]|0)-(b[j+168>>1]|0);k=(c[f>>2]|0)+154|0;b[k>>1]=(b[k>>1]|0)-(b[(c[e>>2]|0)+154>>1]|0);k=(c[f>>2]|0)+156|0;c[k>>2]=(c[k>>2]|0)-(c[(c[e>>2]|0)+156>>2]|0);k=c[f>>2]|0;f=c[k+172>>2]|0;do{if((b[k+168>>1]|0)==0){l=i;m=c[l>>2]|0;n=i+32|0;o=(c[(c[((m&3|0)==3?d:n)+28>>2]|0)+8>>2]|0)+180|0;p=c[o>>2]|0;q=c[p>>2]|0;if((q|0)==0){r=m}else{s=0;t=o;o=q;q=p;p=m;while(1){a:do{if((o|0)==(d|0)){m=t+4|0;u=m;v=c[u>>2]|0;if((v|0)<=0){w=p;break}x=q;y=0;while(1){z=x+(y<<2)|0;A=y+1|0;if((c[z>>2]|0)==(d|0)){break}if((A|0)<(v|0)){y=A}else{w=p;break a}}y=v-1|0;c[m>>2]=y;c[z>>2]=c[x+(y<<2)>>2];c[(c[t>>2]|0)+(c[u>>2]<<2)>>2]=0;w=c[l>>2]|0}else{w=p}}while(0);y=s+1|0;A=(c[(c[((w&3|0)==3?d:n)+28>>2]|0)+8>>2]|0)+180|0;B=c[A>>2]|0;C=c[B+(y<<2)>>2]|0;if((C|0)==0){r=w;break}else{s=y;t=A;o=C;q=B;p=w}}}p=i-32|0;q=(c[(c[((r&3|0)==2?d:p)+28>>2]|0)+8>>2]|0)+172|0;o=c[q>>2]|0;t=c[o>>2]|0;if((t|0)==0){break}else{D=0;E=q;F=t;G=o;H=r}while(1){b:do{if((F|0)==(d|0)){o=E+4|0;t=o;q=c[t>>2]|0;if((q|0)<=0){I=H;break}s=G;n=0;while(1){J=s+(n<<2)|0;B=n+1|0;if((c[J>>2]|0)==(d|0)){break}if((B|0)<(q|0)){n=B}else{I=H;break b}}n=q-1|0;c[o>>2]=n;c[J>>2]=c[s+(n<<2)>>2];c[(c[E>>2]|0)+(c[t>>2]<<2)>>2]=0;I=c[l>>2]|0}else{I=H}}while(0);n=D+1|0;u=(c[(c[((I&3|0)==2?d:p)+28>>2]|0)+8>>2]|0)+172|0;x=c[u>>2]|0;m=c[x+(n<<2)>>2]|0;if((m|0)==0){break}else{D=n;E=u;F=m;G=x;H=I}}}}while(0);c:do{if((a[(c[i+8>>2]|0)+112|0]|0)==1){k=d;do{p=c[(c[((c[k>>2]&3|0)==2?k:k-32|0)+28>>2]|0)+8>>2]|0;if((a[p+156|0]|0)!=1){break c}l=p+180|0;if((c[l+4>>2]|0)!=1){break c}k=c[c[l>>2]>>2]|0;l=k+8|0;p=(c[l>>2]|0)+168|0;b[p>>1]=(b[p>>1]|0)-(b[(c[e>>2]|0)+168>>1]|0);p=(c[l>>2]|0)+154|0;b[p>>1]=(b[p>>1]|0)-(b[(c[e>>2]|0)+154>>1]|0);p=(c[l>>2]|0)+156|0;c[p>>2]=(c[p>>2]|0)-(c[(c[e>>2]|0)+156>>2]|0);}while((a[(c[l>>2]|0)+112|0]|0)==1)}}while(0);d=c[e>>2]|0;if((f|0)==0){g=d;break}else{i=f;j=d}}h=g+172|0;c[h>>2]=0;return}function gp(d){d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0.0,Z=0.0;e=d+8|0;f=c[e>>2]|0;g=c[f+180>>2]|0;if((g|0)==0){i=f}else{f=g;do{g=f+8|0;j=c[g>>2]|0;k=c[j+188>>2]|0;do{if((k|0)==0){l=j}else{m=c[k>>2]|0;if((m|0)==0){l=j;break}else{n=0;o=m}while(1){m=c[o>>2]&3;p=c[((m|0)==3?o:o+32|0)+28>>2]|0;q=c[p+8>>2]|0;r=c[q+236>>2]|0;s=c[(c[(c[((m|0)==2?o:o-32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0;m=(r|0)<(s|0);t=m?s:r;u=c[q+232>>2]|0;q=Hx(p|0)|0;p=(m?r:s)+1|0;a:do{if((p|0)<(t|0)){s=c[(c[(c[q+8>>2]|0)+184>>2]|0)+(u*44|0)+4>>2]|0;r=p;while(1){m=c[(c[s+(r<<2)>>2]|0)+8>>2]|0;v=a[m+156|0]|0;if((v<<24>>24|0)==1){if((c[m+104>>2]|0)!=0){w=r;break a}}else if((v<<24>>24|0)==0){w=r;break a}v=r+1|0;if((v|0)<(t|0)){r=v}else{w=v;break}}}else{w=p}}while(0);if((w|0)==(t|0)){p=o;do{u=p+8|0;a[(c[u>>2]|0)+113|0]=1;p=c[(c[u>>2]|0)+172>>2]|0;}while((p|0)!=0)}p=n+1|0;t=c[g>>2]|0;u=c[(c[t+188>>2]|0)+(p<<2)>>2]|0;if((u|0)==0){l=t;break}else{n=p;o=u}}}}while(0);j=l+204|0;if((c[j+4>>2]|0)>0){k=0;u=j;while(1){j=c[(c[u>>2]|0)+(k<<2)>>2]|0;p=c[j>>2]&3;t=c[(c[((p|0)==2?j:j-32|0)+28>>2]|0)+8>>2]|0;q=c[t+232>>2]|0;r=c[((p|0)==3?j:j+32|0)+28>>2]|0;p=c[r+8>>2]|0;do{if((q|0)==(c[p+232>>2]|0)){s=c[p+236>>2]|0;v=c[t+236>>2]|0;m=(s|0)<(v|0);x=m?v:s;y=Hx(r|0)|0;z=(m?s:v)+1|0;b:do{if((z|0)<(x|0)){v=c[(c[(c[y+8>>2]|0)+184>>2]|0)+(q*44|0)+4>>2]|0;s=z;while(1){m=c[(c[v+(s<<2)>>2]|0)+8>>2]|0;A=a[m+156|0]|0;if((A<<24>>24|0)==1){if((c[m+104>>2]|0)!=0){B=s;break b}}else if((A<<24>>24|0)==0){B=s;break b}A=s+1|0;if((A|0)<(x|0)){s=A}else{B=A;break}}}else{B=z}}while(0);if((B|0)==(x|0)){C=j}else{break}do{z=C+8|0;a[(c[z>>2]|0)+113|0]=1;C=c[(c[z>>2]|0)+172>>2]|0;}while((C|0)!=0)}}while(0);j=k+1|0;q=c[g>>2]|0;r=q+204|0;if((j|0)<(c[r+4>>2]|0)){k=j;u=r}else{D=q;break}}}else{D=l}f=c[D+164>>2]|0;}while((f|0)!=0);i=c[e>>2]|0}f=c[i+184>>2]|0;if((c[f+40>>2]|0)==0){if((c[i+172>>2]|0)>0){E=26}}else{E=26}c:do{if((E|0)==26){D=c[f+4>>2]|0;l=c[D>>2]|0;if((l|0)==0){break}else{F=0;G=l}d:while(1){l=c[(c[G+8>>2]|0)+196>>2]|0;C=c[l>>2]|0;if((C|0)!=0){B=0;o=C;do{C=c[o+8>>2]|0;if((c[C+96>>2]|0)!=0){if((a[C+113|0]|0)==0){break d}}B=B+1|0;o=c[l+(B<<2)>>2]|0;}while((o|0)!=0)}F=F+1|0;G=c[D+(F<<2)>>2]|0;if((G|0)==0){break c}}if((b[i+224>>1]|0)!=0){cc(118328,135760,190,171056);return 0}D=(b[i+226>>1]|0)+3|0;if((f|0)==0){H=kk(D*44|0)|0}else{H=mk(f,D*44|0)|0}c[(c[e>>2]|0)+184>>2]=H+44;D=c[e>>2]|0;o=b[D+226>>1]|0;B=o<<16>>16;l=c[D+184>>2]|0;if(o<<16>>16>-1){o=B;D=l;while(1){C=o-1|0;tF(D+(o*44|0)|0,D+(C*44|0)|0,44)|0;n=c[(c[e>>2]|0)+184>>2]|0;if((o|0)>0){o=C;D=n}else{I=-1;J=n;break}}}else{I=B;J=l}c[J+(I*44|0)+8>>2]=0;c[(c[(c[e>>2]|0)+184>>2]|0)+(I*44|0)>>2]=0;D=jk(8)|0;c[(c[(c[e>>2]|0)+184>>2]|0)+(I*44|0)+12>>2]=D;c[(c[(c[e>>2]|0)+184>>2]|0)+(I*44|0)+4>>2]=D;c[(c[(c[e>>2]|0)+184>>2]|0)+(I*44|0)+40>>2]=0;c[(c[(c[e>>2]|0)+184>>2]|0)+(I*44|0)+20>>2]=1;c[(c[(c[e>>2]|0)+184>>2]|0)+(I*44|0)+16>>2]=1;c[(c[(c[e>>2]|0)+184>>2]|0)+(I*44|0)+28>>2]=1;c[(c[(c[e>>2]|0)+184>>2]|0)+(I*44|0)+24>>2]=1;D=(c[e>>2]|0)+224|0;b[D>>1]=(b[D>>1]|0)-1}}while(0);mp(d);I=c[(c[e>>2]|0)+180>>2]|0;if((I|0)==0){K=0;return K|0}else{L=0;M=I}while(1){I=M+8|0;J=c[I>>2]|0;H=c[J+188>>2]|0;do{if((H|0)==0){N=L;O=J}else{f=c[H>>2]|0;if((f|0)==0){P=L;Q=J}else{i=0;G=L;F=f;while(1){f=c[F+8>>2]|0;E=c[f+96>>2]|0;do{if((E|0)==0){R=G}else{if((a[f+113|0]|0)==0){hp(F);R=1;break}if((c[(c[e>>2]|0)+116>>2]&1|0)==0){h[f+136>>3]=+h[E+24>>3];R=G;break}else{h[f+136>>3]=+h[E+32>>3];R=G;break}}}while(0);E=i+1|0;f=c[I>>2]|0;D=c[(c[f+188>>2]|0)+(E<<2)>>2]|0;if((D|0)==0){P=R;Q=f;break}else{i=E;G=R;F=D}}}F=Q+204|0;if((c[F+4>>2]|0)>0){S=0;T=P;U=F}else{N=P;O=Q;break}while(1){F=c[(c[U>>2]|0)+(S<<2)>>2]|0;G=c[F>>2]&3;i=c[((G|0)==3?F:F+32|0)+28>>2]|0;D=c[((G|0)==2?F:F-32|0)+28>>2]|0;do{if((c[(c[i+8>>2]|0)+232>>2]|0)!=(c[(c[D+8>>2]|0)+232>>2]|0)|(i|0)==(D|0)){V=T}else{G=F+8|0;E=c[G>>2]|0;f=c[E+172>>2]|0;if((f|0)==0){W=G;X=E}else{o=f;while(1){f=o+8|0;n=c[f>>2]|0;C=c[n+172>>2]|0;if((C|0)==0){W=f;X=n;break}else{o=C}}}a[E+113|0]=a[X+113|0]|0;o=c[G>>2]|0;C=c[o+96>>2]|0;if((C|0)==0){V=T;break}if((a[o+113|0]|0)==0){hp(F);V=1;break}else{Y=+h[((c[(c[e>>2]|0)+116>>2]&1|0)==0?C+24|0:C+32|0)>>3];C=(c[W>>2]|0)+136|0;Z=+h[C>>3];h[C>>3]=Y>Z?Y:Z;V=T;break}}}while(0);F=S+1|0;D=c[I>>2]|0;i=D+204|0;if((F|0)<(c[i+4>>2]|0)){S=F;T=V;U=i}else{N=V;O=D;break}}}}while(0);I=c[O+164>>2]|0;if((I|0)==0){break}else{L=N;M=I}}if((N|0)==0){K=0;return K|0}np(d);K=N;return K|0}function hp(b){b=b|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0.0,G=0,H=0.0,I=0.0,J=0;d=i;i=i+16|0;e=d|0;f=b+8|0;if((c[(c[f>>2]|0)+96>>2]|0)==0){i=d;return}g=b;j=b+32|0;k=Hx(c[((c[g>>2]&3|0)==3?b:j)+28>>2]|0)|0;l=c[g>>2]&3;m=c[(c[((l|0)==3?b:j)+28>>2]|0)+8>>2]|0;n=c[m+232>>2]|0;o=k+8|0;p=n-1|0;q=c[(c[o>>2]|0)+184>>2]|0;r=c[q+(p*44|0)+4>>2]|0;s=c[q+(p*44|0)>>2]|0;q=e+8|0;c[q>>2]=-1;t=e|0;c[t>>2]=-1;u=e+12|0;c[u>>2]=s;v=e+4|0;c[v>>2]=s;e=b-32|0;w=c[m+236>>2]|0;m=c[(c[(c[((l|0)==2?b:e)+28>>2]|0)+8>>2]|0)+236>>2]|0;l=(w|0)>(m|0);x=l?w:m;y=l?m:w;w=0;m=s;l=-1;z=s;while(1){s=m-1|0;if((w|0)>(s|0)){A=l;B=z;break}ip(c[(c[r+(w<<2)>>2]|0)+8>>2]|0,t,y,x);if((w|0)!=(s|0)){ip(c[(c[r+(s<<2)>>2]|0)+8>>2]|0,t,y,x)}C=c[v>>2]|0;D=c[t>>2]|0;if((C-D|0)<2){A=D;B=C;break}else{w=w+1|0;m=s;l=D;z=C}}if((A|0)>(B|0)){E=(c[u>>2]|0)+(c[q>>2]|0)|0}else{E=A+B|0}B=(E+1|0)/2|0;E=c[o>>2]|0;A=c[E+184>>2]|0;q=c[A+(p*44|0)+4>>2]|0;u=c[q>>2]|0;if((u|0)==0){F=+h[(c[(c[c[A+(n*44|0)+4>>2]>>2]|0)+8>>2]|0)+24>>3]+ +(c[A+(n*44|0)+20>>2]|0)+ +(c[E+240>>2]|0)}else{F=+h[(c[u+8>>2]|0)+24>>3]- +(c[A+(p*44|0)+16>>2]|0)}u=~~F;E=A+(p*44|0)|0;if((q|0)==0){G=kk((c[E>>2]<<2)+8|0)|0}else{G=mk(q,(c[E>>2]<<2)+8|0)|0}E=G;c[(c[(c[o>>2]|0)+184>>2]|0)+(p*44|0)+4>>2]=E;G=c[(c[(c[o>>2]|0)+184>>2]|0)+(p*44|0)>>2]|0;if((G|0)>(B|0)){q=G;while(1){G=q-1|0;A=c[E+(G<<2)>>2]|0;c[E+(q<<2)>>2]=A;n=(c[A+8>>2]|0)+236|0;c[n>>2]=(c[n>>2]|0)+1;if((G|0)>(B|0)){q=G}else{break}}}q=bp(k)|0;k=E+(B<<2)|0;c[k>>2]=q;G=q+8|0;c[(c[G>>2]|0)+236>>2]=B;c[(c[G>>2]|0)+232>>2]=p;G=(c[(c[o>>2]|0)+184>>2]|0)+(p*44|0)|0;B=(c[G>>2]|0)+1|0;c[G>>2]=B;c[E+(B<<2)>>2]=0;B=c[k>>2]|0;k=c[(c[f>>2]|0)+96>>2]|0;F=+h[k+24>>3];H=+h[k+32>>3];k=(c[(c[o>>2]|0)+116>>2]&1|0)==0;E=B+8|0;h[(c[E>>2]|0)+80>>3]=k?H:F;G=c[E>>2]|0;q=~~(+h[G+80>>3]*.5);I=(k?F:H)*.5;h[G+96>>3]=I;h[(c[E>>2]|0)+88>>3]=I;c[(c[E>>2]|0)+104>>2]=c[(c[f>>2]|0)+96>>2];h[(c[E>>2]|0)+24>>3]=+(q+u|0);u=Zo(B,c[((c[g>>2]&3|0)==3?b:j)+28>>2]|0,b)|0;f=u+8|0;h[(c[f>>2]|0)+16>>3]=-0.0- +h[(c[E>>2]|0)+88>>3];h[(c[f>>2]|0)+56>>3]=+h[(c[(c[((c[g>>2]&3|0)==3?b:j)+28>>2]|0)+8>>2]|0)+96>>3];a[(c[f>>2]|0)+112|0]=4;f=Zo(B,c[((c[g>>2]&3|0)==2?b:e)+28>>2]|0,b)|0;B=f+8|0;h[(c[B>>2]|0)+16>>3]=+h[(c[E>>2]|0)+96>>3];h[(c[B>>2]|0)+56>>3]=+h[(c[(c[((c[g>>2]&3|0)==2?b:e)+28>>2]|0)+8>>2]|0)+88>>3];a[(c[B>>2]|0)+112|0]=4;B=c[(c[o>>2]|0)+184>>2]|0;e=B+(p*44|0)+16|0;if((c[e>>2]|0)<(q|0)){c[e>>2]=q;J=c[(c[o>>2]|0)+184>>2]|0}else{J=B}B=J+(p*44|0)+20|0;if((c[B>>2]|0)<(q|0)){c[B>>2]=q}c[(c[E>>2]|0)+112>>2]=b;i=d;return}function ip(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;if((a[b+156|0]|0)!=1){return}g=c[b+236>>2]|0;h=b+180|0;if((c[b+176>>2]|0)!=0){b=c[h>>2]|0;i=c[b>>2]|0;if((i|0)==0){return}else{j=0;k=0;l=0;m=i}while(1){i=c[(c[(c[((c[m>>2]&3|0)==2?m:m-32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0;if((i|0)>(e|0)){n=(i|0)<(f|0)?l:1;o=k}else{n=l;o=1}i=j+1|0;p=c[b+(i<<2)>>2]|0;if((p|0)==0){break}else{j=i;k=o;l=n;m=p}}if(o<<24>>24!=0&n<<24>>24==0){c[d>>2]=g+1}if(!(n<<24>>24!=0&o<<24>>24==0)){return}c[d+4>>2]=g-1;return}if((c[h+4>>2]|0)!=2){cc(80712,135760,63,169976)}o=c[h>>2]|0;h=c[o>>2]|0;n=c[o+4>>2]|0;o=c[(c[(c[((c[h>>2]&3|0)==2?h:h-32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0;h=c[(c[(c[((c[n>>2]&3|0)==2?n:n-32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0;n=(o|0)>(h|0);m=n?o:h;l=n?h:o;if((m|0)<=(e|0)){c[d>>2]=g;c[d+8>>2]=g;return}if((l|0)>=(f|0)){c[d+4>>2]=g;c[d+12>>2]=g;return}o=(l|0)<(e|0);h=(m|0)>(f|0);if(o&h){return}if(o){q=13}else{if((l|0)==(e|0)&(m|0)<(f|0)){q=13}}if((q|0)==13){c[d+8>>2]=g}do{if(!h){if((m|0)==(f|0)&(l|0)>(e|0)){break}return}}while(0);c[d+12>>2]=g;return}function jp(d,e){d=d|0;e=e|0;var f=0,g=0,j=0,k=0.0,l=0.0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0;f=i;if((a[213992]|0)!=0){ym()}a[172624]=0;c[53542]=d;g=d|0;j=((Mw(Ix(g)|0)|0)<<2)+4|0;c[53516]=jk(j)|0;c[53514]=jk(j)|0;c[53656]=8;c[53660]=24;h[21677]=.995;j=ew(g,149032)|0;do{if((j|0)!=0){k=+rF(j);if(k<=0.0){break}l=k*+(c[53656]|0);if(l<1.0){m=1}else{m=~~l}c[53656]=m;l=k*+(c[53660]|0);if(l<1.0){n=1}else{n=~~l}c[53660]=n}}while(0);n=d+8|0;m=c[n>>2]|0;if((b[m+128>>1]&16)!=0){j=(b[m+226>>1]|0)+2|0;m=jk(j<<2)|0;Ap(d,m,j,0)|0;eF(m)}Zn(d);qo(d,1);qp(d);xp(d);c[53706]=b[(c[n>>2]|0)+224>>1]|0;c[53708]=b[(c[n>>2]|0)+226>>1]|0;m=c[n>>2]|0;j=m+204|0;do{if((c[j+4>>2]|0)>0){p=0;q=0;r=m;s=j;do{c[r+180>>2]=c[(c[s>>2]|0)+(q<<2)>>2];do{if((q|0)>0){t=c[n>>2]|0;u=b[t+224>>1]|0;if(u<<16>>16>(b[t+226>>1]|0)){break}v=u<<16>>16;u=t;while(1){t=c[u+184>>2]|0;w=t+(v*44|0)+4|0;c[w>>2]=(c[w>>2]|0)+(c[t+(v*44|0)>>2]<<2);c[(c[(c[n>>2]|0)+184>>2]|0)+(v*44|0)>>2]=0;t=c[n>>2]|0;if((v|0)<(b[t+226>>1]|0)){v=v+1|0;u=t}else{break}}}}while(0);p=(kp(d,0,e)|0)+p|0;q=q+1|0;r=c[n>>2]|0;s=r+204|0;x=c[s+4>>2]|0;}while((q|0)<(x|0));if((x|0)<2){y=r;z=p;break}else{A=0;B=0;C=s}while(1){q=c[(c[C>>2]|0)+(A<<2)>>2]|0;if((B|0)!=0){c[(c[B+8>>2]|0)+164>>2]=q}u=q+8|0;c[(c[u>>2]|0)+168>>2]=B;v=c[(c[u>>2]|0)+164>>2]|0;if((v|0)==0){D=q}else{q=v;while(1){v=c[(c[q+8>>2]|0)+164>>2]|0;if((v|0)==0){break}else{q=v}}D=q}v=A+1|0;u=(c[n>>2]|0)+204|0;E=u+4|0;if((v|0)<(c[E>>2]|0)){A=v;B=D;C=u}else{break}}c[E>>2]=1;s=c[n>>2]|0;c[s+180>>2]=c[c[s+204>>2]>>2];b[(c[n>>2]|0)+224>>1]=c[53706];b[(c[n>>2]|0)+226>>1]=c[53708];y=c[n>>2]|0;z=p}else{y=m;z=0}}while(0);m=b[y+224>>1]|0;if(m<<16>>16>(b[y+226>>1]|0)){F=y}else{E=c[o>>2]|0;C=m<<16>>16;m=y;while(1){y=c[m+184>>2]|0;c[y+(C*44|0)>>2]=c[y+(C*44|0)+8>>2];y=c[(c[n>>2]|0)+184>>2]|0;c[y+(C*44|0)+4>>2]=c[y+(C*44|0)+12>>2];y=c[n>>2]|0;D=c[y+184>>2]|0;a:do{if((c[D+(C*44|0)>>2]|0)>0){B=0;A=D;x=y;while(1){j=c[(c[A+(C*44|0)+4>>2]|0)+(B<<2)>>2]|0;if((j|0)==0){break}c[(c[j+8>>2]|0)+236>>2]=B;j=B+1|0;s=c[n>>2]|0;r=c[s+184>>2]|0;if((j|0)<(c[r+(C*44|0)>>2]|0)){B=j;A=r;x=s}else{G=s;break a}}if((a[213992]|0)==0){H=x}else{A=$w(g)|0;q=c[(c[(c[n>>2]|0)+184>>2]|0)+(C*44|0)>>2]|0;gc(E|0,137088,(I=i,i=i+32|0,c[I>>2]=A,c[I+8>>2]=C,c[I+16>>2]=B,c[I+24>>2]=q,I)|0)|0;i=I;H=c[n>>2]|0}c[(c[H+184>>2]|0)+(C*44|0)>>2]=B;G=c[n>>2]|0}else{G=y}}while(0);if((C|0)<(b[G+226>>1]|0)){C=C+1|0;m=G}else{F=G;break}}}do{if((c[F+172>>2]|0)<1){J=z}else{G=z;m=1;C=F;while(1){K=(lp(c[(c[C+176>>2]|0)+(m<<2)>>2]|0,e)|0)+G|0;H=c[n>>2]|0;L=c[H+172>>2]|0;if((m|0)<(L|0)){G=K;m=m+1|0;C=H}else{break}}if((L|0)<=0){J=K;break}C=ew(g,79488)|0;if((C|0)!=0){if((Km(C)|0)<<24>>24==0){J=K;break}}go(d);a[172624]=1;J=kp(d,2,e)|0}}while(0);e=c[53514]|0;if((e|0)!=0){eF(e);c[53514]=0}e=c[53516]|0;if((e|0)!=0){eF(e);c[53516]=0}e=c[n>>2]|0;if((c[e+172>>2]|0)<1){M=e}else{d=1;K=e;while(1){np(c[(c[K+176>>2]|0)+(d<<2)>>2]|0);e=c[n>>2]|0;if((d|0)<(c[e+172>>2]|0)){d=d+1|0;K=e}else{M=e;break}}}K=b[M+224>>1]|0;if(K<<16>>16<=(b[M+226>>1]|0)){d=K<<16>>16;K=M;while(1){M=c[K+184>>2]|0;if((c[M+(d*44|0)>>2]|0)>0){e=0;L=M;while(1){F=(c[(c[L+(d*44|0)+4>>2]|0)+(e<<2)>>2]|0)+8|0;c[(c[F>>2]|0)+236>>2]=e;z=c[F>>2]|0;C=c[z+188>>2]|0;do{if((C|0)!=0){m=c[C>>2]|0;if((m|0)==0){break}else{N=0;O=m;P=z}while(1){m=O+8|0;if((a[(c[m>>2]|0)+112|0]|0)==4){dp(O);eF(c[m>>2]|0);eF(O|0);Q=N-1|0;R=c[F>>2]|0}else{Q=N;R=P}m=Q+1|0;G=c[(c[R+188>>2]|0)+(m<<2)>>2]|0;if((G|0)==0){break}else{N=m;O=G;P=R}}}}while(0);F=e+1|0;z=c[n>>2]|0;C=c[z+184>>2]|0;if((F|0)<(c[C+(d*44|0)>>2]|0)){e=F;L=C}else{S=C;T=z;break}}}else{S=M;T=K}L=c[S+(d*44|0)+40>>2]|0;if((L|0)==0){U=T}else{eF(c[L+8>>2]|0);eF(L);U=c[n>>2]|0}if((d|0)<(b[U+226>>1]|0)){d=d+1|0;K=U}else{break}}}if((a[213992]|0)==0){i=f;return}U=c[o>>2]|0;K=$w(g)|0;l=+zm();gc(U|0,139784,(I=i,i=i+24|0,c[I>>2]=K,c[I+8>>2]=J,h[I+16>>3]=l,I)|0)|0;i=I;i=f;return}function kp(e,f,g){e=e|0;f=f|0;g=g|0;var j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Xa=0,Ya=0,Za=0,_a=0,$a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,pb=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0;j=i;if((f|0)>1){k=up(0)|0;l=c[(c[e+8>>2]|0)+180>>2]|0;if((l|0)!=0){m=l;do{l=m+8|0;n=c[l>>2]|0;h[n+16>>3]=+(c[n+236>>2]|0);m=c[(c[l>>2]|0)+164>>2]|0;}while((m|0)!=0)}if((f|0)<3){p=k;q=5}else{r=k;s=k;t=0}}else{p=2147483647;q=5}a:do{if((q|0)==5){k=e|0;m=e+8|0;l=c[o>>2]|0;n=f;u=p;v=p;while(1){w=c[53660]|0;do{if((n|0)<2){x=(w|0)>4?4:w;if((Ix(k)|0)==(e|0)){sp(e,n)}if((n|0)==0){Bp(e)}Cp(e);y=up(0)|0;if((y|0)>(v|0)){z=v;A=y;B=x;break}C=c[(c[m>>2]|0)+180>>2]|0;if((C|0)==0){z=y;A=y;B=x;break}else{D=C}while(1){C=D+8|0;E=c[C>>2]|0;h[E+16>>3]=+(c[E+236>>2]|0);E=c[(c[C>>2]|0)+164>>2]|0;if((E|0)==0){z=y;A=y;B=x;break}else{D=E}}}else{if((u|0)<=(v|0)){z=v;A=v;B=w;break}x=c[m>>2]|0;y=c[x+180>>2]|0;if((y|0)==0){F=x}else{x=y;do{y=x+8|0;E=c[y>>2]|0;c[E+236>>2]=~~+h[E+16>>3];x=c[(c[y>>2]|0)+164>>2]|0;}while((x|0)!=0);F=c[m>>2]|0}x=b[F+224>>1]|0;if(x<<16>>16>(b[F+226>>1]|0)){z=v;A=v;B=w;break}y=x<<16>>16;while(1){a[(c[(c[(c[53542]|0)+8>>2]|0)+184>>2]|0)+(y*44|0)+33|0]=0;x=c[(c[m>>2]|0)+184>>2]|0;Jb(c[x+(y*44|0)+4>>2]|0,c[x+(y*44|0)>>2]|0,4,56);if((y|0)<(b[(c[m>>2]|0)+226>>1]|0)){y=y+1|0}else{z=v;A=v;B=w;break}}}}while(0);b:do{if((B|0)>0){w=0;y=0;x=A;E=z;while(1){if((a[213992]|0)!=0){gc(l|0,134200,(C=i,i=i+40|0,c[C>>2]=n,c[C+8>>2]=w,c[C+16>>2]=y,c[C+24>>2]=x,c[C+32>>2]=E,C)|0)|0;i=C}C=y+1|0;if((y|0)>=(c[53656]|0)|(x|0)==0){G=x;H=E;break b}I=((w|0)%4|0|0)<2;J=I&1;K=c[m>>2]|0;if((w&1|0)==0){L=b[K+224>>1]|0;M=1;N=K+226|0;O=(L<<16>>16<=(b[(c[(c[53542]|0)+8>>2]|0)+224>>1]|0))+(L<<16>>16)|0}else{L=b[K+226>>1]|0;M=-1;N=K+224|0;O=((L<<16>>16>=(b[(c[(c[53542]|0)+8>>2]|0)+226>>1]|0))<<31>>31)+(L<<16>>16)|0}L=(b[N>>1]|0)+M|0;c:do{if((O|0)!=(L|0)){P=(M|0)<0;Q=I^1;R=O;S=K;while(1){T=c[53514]|0;U=c[S+184>>2]|0;V=c[U+(R*44|0)+4>>2]|0;do{if((c[U+(R*44|0)>>2]|0)>0){W=T;X=T+4|0;Y=0;do{Z=(c[V+(Y<<2)>>2]|0)+8|0;_=c[Z>>2]|0;do{if(P){$=c[c[_+180>>2]>>2]|0;if(($|0)==0){aa=_;q=44;break}else{ba=0;ca=0;ea=$;fa=_}while(1){$=c[ea+8>>2]|0;if((b[$+154>>1]|0)>0){c[T+(ca<<2)>>2]=d[$+88|0]|c[(c[(c[((c[ea>>2]&3|0)==2?ea:ea-32|0)+28>>2]|0)+8>>2]|0)+236>>2]<<8;ga=ca+1|0;ha=c[Z>>2]|0}else{ga=ca;ha=fa}$=ba+1|0;ia=c[(c[ha+180>>2]|0)+($<<2)>>2]|0;if((ia|0)==0){ja=ga;ka=ha;q=43;break}else{ba=$;ca=ga;ea=ia;fa=ha}}}else{ia=c[c[_+172>>2]>>2]|0;if((ia|0)==0){aa=_;q=44;break}else{la=0;ma=0;na=ia;oa=_}while(1){ia=c[na+8>>2]|0;if((b[ia+154>>1]|0)>0){c[T+(ma<<2)>>2]=d[ia+48|0]|c[(c[(c[((c[na>>2]&3|0)==3?na:na+32|0)+28>>2]|0)+8>>2]|0)+236>>2]<<8;pa=ma+1|0;qa=c[Z>>2]|0}else{pa=ma;qa=oa}ia=la+1|0;$=c[(c[qa+172>>2]|0)+(ia<<2)>>2]|0;if(($|0)==0){ja=pa;ka=qa;q=43;break}else{la=ia;ma=pa;na=$;oa=qa}}}}while(0);do{if((q|0)==43){q=0;if((ja|0)==2){c[ka+240>>2]=((c[X>>2]|0)+(c[T>>2]|0)|0)/2|0;break}else if((ja|0)==0){aa=ka;q=44;break}else if((ja|0)==1){c[ka+240>>2]=c[T>>2];break}else{Jb(W|0,ja|0,4,4);_=(ja|0)/2|0;if((ja&1|0)!=0){c[(c[Z>>2]|0)+240>>2]=c[T+(_<<2)>>2];break}$=c[T+(_<<2)>>2]|0;ia=(c[T+(ja-1<<2)>>2]|0)-$|0;ra=c[T+(_-1<<2)>>2]|0;_=ra-(c[T>>2]|0)|0;if((_|0)==(ia|0)){c[(c[Z>>2]|0)+240>>2]=(ra+$|0)/2|0;break}else{sa=((da(_,$)|0)+(da(ra,ia)|0)|0)/(_+ia|0)|0;c[(c[Z>>2]|0)+240>>2]=sa;break}}}}while(0);if((q|0)==44){q=0;c[aa+240>>2]=-1}Y=Y+1|0;ta=c[m>>2]|0;ua=c[(c[ta+184>>2]|0)+(R*44|0)>>2]|0;}while((Y|0)<(ua|0));if((ua|0)>0){va=0;wa=0;xa=ta}else{break}while(1){Y=c[(c[V+(wa<<2)>>2]|0)+8>>2]|0;do{if((c[Y+184>>2]|0)==0){if((c[Y+176>>2]|0)!=0){ya=va;za=xa;break}W=Y+196|0;do{if((c[W+4>>2]|0)>0){X=c[W>>2]|0;Z=X;sa=c[Z>>2]|0;ia=c[((c[sa>>2]&3|0)==3?sa:sa+32|0)+28>>2]|0;sa=c[X+4>>2]|0;if((sa|0)==0){Aa=ia}else{X=1;_=ia;ia=sa;while(1){sa=c[((c[ia>>2]&3|0)==3?ia:ia+32|0)+28>>2]|0;ra=(c[(c[sa+8>>2]|0)+236>>2]|0)>(c[(c[_+8>>2]|0)+236>>2]|0)?sa:_;sa=X+1|0;$=c[Z+(sa<<2)>>2]|0;if(($|0)==0){Aa=ra;break}else{X=sa;_=ra;ia=$}}}ia=c[(c[Aa+8>>2]|0)+240>>2]|0;if((ia|0)<=-1){Ba=1;break}c[Y+240>>2]=ia+1;Ba=0}else{ia=Y+188|0;if((c[ia+4>>2]|0)<=0){Ba=1;break}_=c[ia>>2]|0;ia=_;X=c[ia>>2]|0;Z=c[((c[X>>2]&3|0)==2?X:X-32|0)+28>>2]|0;X=c[_+4>>2]|0;if((X|0)==0){Ca=Z}else{_=1;$=Z;Z=X;while(1){X=c[((c[Z>>2]&3|0)==2?Z:Z-32|0)+28>>2]|0;ra=(c[(c[X+8>>2]|0)+236>>2]|0)<(c[(c[$+8>>2]|0)+236>>2]|0)?X:$;X=_+1|0;sa=c[ia+(X<<2)>>2]|0;if((sa|0)==0){Ca=ra;break}else{_=X;$=ra;Z=sa}}}Z=c[(c[Ca+8>>2]|0)+240>>2]|0;if((Z|0)<=0){Ba=1;break}c[Y+240>>2]=Z-1;Ba=0}}while(0);ya=Ba|va;za=c[m>>2]|0}else{ya=va;za=xa}}while(0);Y=wa+1|0;Da=c[za+184>>2]|0;Ea=c[Da+(R*44|0)>>2]|0;if((Y|0)<(Ea|0)){va=ya;wa=Y;xa=za}else{break}}Y=c[Da+(R*44|0)+4>>2]|0;if((Ea|0)<=0){break}W=(ya&255|J|0)==0;Z=Y+(Ea<<2)|0;$=0;_=Ea;while(1){ia=_-1|0;d:do{if(Y>>>0<Z>>>0){sa=a[172624]|0;ra=Y;X=$;while(1){Fa=ra;while(1){if(Fa>>>0<Z>>>0){Ga=Fa}else{Ha=X;break d}while(1){Ia=c[Ga>>2]|0;Ja=c[Ia+8>>2]|0;Ka=c[Ja+240>>2]|0;La=Ga+4|0;if((Ka|0)>=0){break}if(La>>>0<Z>>>0){Ga=La}else{Ha=X;break d}}La=Ja+212|0;Ma=Ja+232|0;Na=Ja+159|0;Oa=Ja+156|0;Pa=Ga;Qa=0;e:while(1){if(Qa<<24>>24==0){Ra=Pa+4|0;if(Ra>>>0>=Z>>>0){Ha=X;break d}Sa=c[Ra>>2]|0;Ta=c[Sa+8>>2]|0;Ua=Ra;Va=Sa;Wa=Ta;Xa=c[Ta+212>>2]|0}else{Ta=Pa;while(1){Sa=Ta+4|0;if(Sa>>>0>=Z>>>0){Ha=X;break d}Ra=c[Sa>>2]|0;Ya=c[Ra+8>>2]|0;if((c[Ya+212>>2]|0)==0){Ua=Sa;Va=Ra;Wa=Ya;Xa=0;break}else{Ta=Sa}}}Ta=c[La>>2]|0;Za=Va+8|0;Sa=(Ta|0)!=(Xa|0);do{if(sa){if(Sa){break e}else{q=90}}else{if((Ta|0)==0|Sa^1|(Xa|0)==0){q=90;break}if((a[Na]|0)==7){if((a[Oa]|0)==1){break}}if((a[Wa+159|0]|0)!=7){break e}if((a[Wa+156|0]|0)!=1){break e}}}while(0);do{if((q|0)==90){q=0;Sa=c[m>>2]|0;Ta=c[(c[Sa+184>>2]|0)+((c[Ma>>2]|0)*44|0)+40>>2]|0;if((Ta|0)==0){break}Ya=(c[Sa+116>>2]&1|0)==0;Sa=da(c[Ta+4>>2]|0,c[(c[(Ya?Ia:Va)+8>>2]|0)+280>>2]|0)|0;if((a[(c[Ta+8>>2]|0)+((c[(c[(Ya?Va:Ia)+8>>2]|0)+280>>2]|0)+Sa)|0]|0)!=0){break e}}}while(0);_a=c[Wa+240>>2]|0;if((_a|0)>-1){q=94;break}Pa=Ua;Qa=(Xa|0)==0?Qa:1}if((q|0)==94){q=0;if(!((Ka|0)<=(_a|0)&((Ka|0)!=(_a|0)|Q))){break}}if(Ua>>>0<Z>>>0){Fa=Ua}else{Ha=X;break d}}Fa=c[Ma>>2]|0;Qa=Ja+236|0;Pa=c[Qa>>2]|0;Oa=c[Wa+236>>2]|0;c[Qa>>2]=Oa;c[(c[(c[(c[(c[53542]|0)+8>>2]|0)+184>>2]|0)+(Fa*44|0)+4>>2]|0)+(Oa<<2)>>2]=Ia;c[(c[Za>>2]|0)+236>>2]=Pa;c[(c[(c[(c[(c[53542]|0)+8>>2]|0)+184>>2]|0)+(Fa*44|0)+4>>2]|0)+(Pa<<2)>>2]=Va;Pa=X+1|0;if(Ua>>>0<Z>>>0){ra=Ua;X=Pa}else{Ha=Pa;break}}}else{Ha=$}}while(0);if((ia|0)>0){Z=W?Z-4|0:Z;$=Ha;_=ia}else{break}}if((Ha|0)==0){break}a[(c[(c[(c[53542]|0)+8>>2]|0)+184>>2]|0)+(R*44|0)+33|0]=0;if((R|0)<=0){break}a[(c[(c[(c[53542]|0)+8>>2]|0)+184>>2]|0)+((R-1|0)*44|0)+33|0]=0}}while(0);V=R+M|0;if((V|0)==(L|0)){break c}R=V;S=c[m>>2]|0}}}while(0);vp(e,J^1);L=up(0)|0;if((L|0)>(E|0)){$a=E;ab=C}else{K=c[(c[m>>2]|0)+180>>2]|0;if((K|0)!=0){I=K;do{K=I+8|0;S=c[K>>2]|0;h[S+16>>3]=+(c[S+236>>2]|0);I=c[(c[K>>2]|0)+164>>2]|0;}while((I|0)!=0)}$a=L;ab=+(L|0)<+(E|0)*+h[21677]?0:C}I=w+1|0;if((I|0)<(B|0)){w=I;y=ab;x=L;E=$a}else{G=L;H=$a;break}}}else{G=A;H=z}}while(0);E=n+1|0;if((G|0)==0){r=H;s=0;t=B;break a}if((E|0)<3){n=E;u=G;v=H}else{r=H;s=G;t=B;break}}}}while(0);do{if((s|0)>(r|0)){B=e+8|0;G=c[B>>2]|0;H=c[G+180>>2]|0;if((H|0)==0){bb=G}else{G=H;do{H=G+8|0;z=c[H>>2]|0;c[z+236>>2]=~~+h[z+16>>3];G=c[(c[H>>2]|0)+164>>2]|0;}while((G|0)!=0);bb=c[B>>2]|0}G=b[bb+224>>1]|0;if(G<<16>>16>(b[bb+226>>1]|0)){break}H=G<<16>>16;while(1){a[(c[(c[(c[53542]|0)+8>>2]|0)+184>>2]|0)+(H*44|0)+33|0]=0;G=c[(c[B>>2]|0)+184>>2]|0;Jb(c[G+(H*44|0)+4>>2]|0,c[G+(H*44|0)>>2]|0,4,56);if((H|0)<(b[(c[B>>2]|0)+226>>1]|0)){H=H+1|0}else{break}}}}while(0);if((r|0)>0){vp(e,0);cb=up(0)|0}else{cb=r}if(!((g|0)!=0&(t|0)>0)){i=j;return cb|0}g=e+8|0;e=0;r=c[g>>2]|0;f:while(1){bb=b[r+226>>1]|0;if(bb<<16>>16<(b[r+224>>1]|0)){db=r}else{s=bb<<16>>16;bb=r;while(1){a[(c[bb+184>>2]|0)+(s*44|0)+32|0]=0;H=c[g>>2]|0;B=c[H+184>>2]|0;G=c[B+(s*44|0)>>2]|0;if((G-1|0)>0){z=(s|0)>0;A=s+1|0;$a=0;ab=B;B=H;M=G;while(1){G=c[ab+(s*44|0)+4>>2]|0;Ha=c[G+($a<<2)>>2]|0;Ua=$a+1|0;Va=c[G+(Ua<<2)>>2]|0;Za=Ha+8|0;Ia=c[Za>>2]|0;Wa=Ia+236|0;Ja=c[Wa>>2]|0;Ma=Va+8|0;_a=c[Ma>>2]|0;Ka=c[_a+236>>2]|0;if((Ja|0)>=(Ka|0)){q=125;break f}Xa=Ia;Ga=c[Ia+212>>2]|0;Ea=c[_a+212>>2]|0;ya=(Ga|0)!=(Ea|0);do{if(a[172624]|0){if(ya){eb=B;fb=ab;gb=M}else{q=133}}else{if((Ga|0)==0|ya^1|(Ea|0)==0){q=133;break}if((a[Xa+159|0]|0)==7){if((a[Ia+156|0]|0)==1){q=135;break}}if((a[_a+159|0]|0)!=7){eb=B;fb=ab;gb=M;break}if((a[_a+156|0]|0)==1){q=135}else{eb=B;fb=ab;gb=M}}}while(0);do{if((q|0)==133){q=0;Xa=c[ab+((c[Ia+232>>2]|0)*44|0)+40>>2]|0;if((Xa|0)==0){q=135;break}Ea=(c[B+116>>2]&1|0)==0;ya=da(c[Xa+4>>2]|0,c[(c[(Ea?Ha:Va)+8>>2]|0)+280>>2]|0)|0;if((a[(c[Xa+8>>2]|0)+((c[(c[(Ea?Va:Ha)+8>>2]|0)+280>>2]|0)+ya)|0]|0)==0){q=135}else{eb=B;fb=ab;gb=M}}}while(0);do{if((q|0)==135){q=0;g:do{if(z){ya=c[_a+172>>2]|0;Ea=c[ya>>2]|0;Xa=(Ea|0)==0;Ga=c[Ia+172>>2]|0;Da=Ga;za=c[Da>>2]|0;if(Xa){hb=0}else{if((za|0)==0){xa=ya;while(1){wa=xa+4|0;if((c[wa>>2]|0)==0){ib=0;jb=0;break g}else{xa=wa}}}else{kb=0;lb=ya;mb=Ea}while(1){xa=c[mb+8>>2]|0;wa=b[xa+154>>1]|0;va=c[(c[(c[((c[mb>>2]&3|0)==3?mb:mb+32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0;Ba=xa+16|0;xa=kb;Ca=Da;Aa=za;while(1){ta=c[(c[(c[((c[Aa>>2]&3|0)==3?Aa:Aa+32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0;do{if((ta-va|0)>0){q=143}else{if((ta|0)!=(va|0)){nb=xa;break}if(+h[(c[Aa+8>>2]|0)+16>>3]>+h[Ba>>3]){q=143}else{nb=xa}}}while(0);if((q|0)==143){q=0;nb=(da(b[(c[(c[Ca>>2]|0)+8>>2]|0)+154>>1]|0,wa)|0)+xa|0}ta=Ca+4|0;ua=c[ta>>2]|0;if((ua|0)==0){break}else{xa=nb;Ca=ta;Aa=ua}}Aa=lb+4|0;Ca=c[Aa>>2]|0;if((Ca|0)==0){hb=nb;break}else{kb=nb;lb=Aa;mb=Ca}}}Da=Ga;if((za|0)==0){ib=hb;jb=0;break}if(Xa){Ca=Da;while(1){Aa=Ca+4|0;if((c[Aa>>2]|0)==0){ib=hb;jb=0;break g}else{Ca=Aa}}}else{ob=0;pb=Da;qb=za}while(1){Ca=c[qb+8>>2]|0;Xa=b[Ca+154>>1]|0;Ga=c[(c[(c[((c[qb>>2]&3|0)==3?qb:qb+32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0;Aa=Ca+16|0;Ca=ob;xa=ya;wa=Ea;while(1){Ba=c[(c[(c[((c[wa>>2]&3|0)==3?wa:wa+32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0;do{if((Ba-Ga|0)>0){q=153}else{if((Ba|0)!=(Ga|0)){rb=Ca;break}if(+h[(c[wa+8>>2]|0)+16>>3]>+h[Aa>>3]){q=153}else{rb=Ca}}}while(0);if((q|0)==153){q=0;rb=(da(b[(c[(c[xa>>2]|0)+8>>2]|0)+154>>1]|0,Xa)|0)+Ca|0}Ba=xa+4|0;va=c[Ba>>2]|0;if((va|0)==0){break}else{Ca=rb;xa=Ba;wa=va}}wa=pb+4|0;xa=c[wa>>2]|0;if((xa|0)==0){ib=hb;jb=rb;break}else{ob=rb;pb=wa;qb=xa}}}else{ib=0;jb=0}}while(0);if((c[ab+(A*44|0)>>2]|0)>0){L=c[_a+180>>2]|0;C=c[L>>2]|0;Ea=(C|0)==0;ya=c[Ia+180>>2]|0;za=ya;Da=c[za>>2]|0;if(Ea){sb=0}else{xa=(Da|0)==0;wa=0;Ca=L;Xa=C;while(1){Aa=c[Xa+8>>2]|0;Ga=b[Aa+154>>1]|0;va=c[(c[(c[((c[Xa>>2]&3|0)==2?Xa:Xa-32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0;if(xa){tb=wa}else{Ba=Aa+56|0;Aa=wa;ua=za;ta=Da;while(1){aa=c[(c[(c[((c[ta>>2]&3|0)==2?ta:ta-32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0;do{if((aa-va|0)>0){q=164}else{if((aa|0)!=(va|0)){ub=Aa;break}if(+h[(c[ta+8>>2]|0)+56>>3]>+h[Ba>>3]){q=164}else{ub=Aa}}}while(0);if((q|0)==164){q=0;ub=(da(b[(c[(c[ua>>2]|0)+8>>2]|0)+154>>1]|0,Ga)|0)+Aa|0}aa=ua+4|0;ja=c[aa>>2]|0;if((ja|0)==0){tb=ub;break}else{Aa=ub;ua=aa;ta=ja}}}ta=Ca+4|0;ua=c[ta>>2]|0;if((ua|0)==0){sb=tb;break}else{wa=tb;Ca=ta;Xa=ua}}}Xa=sb+ib|0;if((Da|0)==0){vb=0}else{Ca=0;wa=ya;za=Da;while(1){xa=c[za+8>>2]|0;ua=b[xa+154>>1]|0;ta=c[(c[(c[((c[za>>2]&3|0)==2?za:za-32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0;if(Ea){wb=Ca}else{Aa=xa+56|0;xa=Ca;Ga=L;Ba=C;while(1){va=c[(c[(c[((c[Ba>>2]&3|0)==2?Ba:Ba-32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0;do{if((va-ta|0)>0){q=174}else{if((va|0)!=(ta|0)){xb=xa;break}if(+h[(c[Ba+8>>2]|0)+56>>3]>+h[Aa>>3]){q=174}else{xb=xa}}}while(0);if((q|0)==174){q=0;xb=(da(b[(c[(c[Ga>>2]|0)+8>>2]|0)+154>>1]|0,ua)|0)+xa|0}va=Ga+4|0;ja=c[va>>2]|0;if((ja|0)==0){wb=xb;break}else{xa=xb;Ga=va;Ba=ja}}}Ba=wa+4|0;Ga=c[Ba>>2]|0;if((Ga|0)==0){vb=wb;break}else{Ca=wb;wa=Ba;za=Ga}}}yb=Xa;zb=vb+jb|0}else{yb=ib;zb=jb}if((zb|0)>(yb|0)){eb=B;fb=ab;gb=M;break}za=a[Ia+156|0]|0;if(za<<24>>24==(a[_a+156|0]|0)){eb=B;fb=ab;gb=M;break}wa=(M|0)>0;do{if(wa){Ca=0;C=0;L=0;do{Ea=(a[(c[(c[G+(L<<2)>>2]|0)+8>>2]|0)+156|0]|0)==0|0;Ca=(Ea^1)+Ca|0;C=Ea+C|0;L=L+1|0;}while((L|0)<(M|0));L=za<<24>>24==0;if((C|0)>=(Ca|0)){Ab=L;q=186;break}Bb=L?Ha:Va}else{Ab=za<<24>>24==0;q=186}}while(0);if((q|0)==186){q=0;Bb=Ab?Va:Ha}if(wa){za=0;Xa=0;while(1){L=(c[G+(Xa<<2)>>2]|0)==(Bb|0)?Xa:za;Ea=Xa+1|0;if((Ea|0)<(M|0)){za=L;Xa=Ea}else{Cb=L;break}}}else{Cb=0}Xa=(a[(c[Bb+8>>2]|0)+156|0]|0)==0|0;h:do{if((Cb|0)>0){za=0;wa=Cb;while(1){L=wa-1|0;Ea=za+1|0;if((a[(c[(c[G+(L<<2)>>2]|0)+8>>2]|0)+156|0]|0)!=(Xa|0)){Db=za;break h}if((L|0)>0){za=Ea;wa=L}else{Db=Ea;break}}}else{Db=0}}while(0);wa=Cb+1|0;i:do{if((wa|0)<(M|0)){za=0;Ca=wa;while(1){C=za+1|0;if((a[(c[(c[G+(Ca<<2)>>2]|0)+8>>2]|0)+156|0]|0)!=(Xa|0)){Eb=za;break i}Ea=Ca+1|0;if((Ea|0)<(M|0)){za=C;Ca=Ea}else{Eb=C;break}}}else{Eb=0}}while(0);wa=c[Ia+232>>2]|0;c[Wa>>2]=Ka;c[(c[(c[(c[(c[53542]|0)+8>>2]|0)+184>>2]|0)+(wa*44|0)+4>>2]|0)+(Ka<<2)>>2]=Ha;c[(c[Ma>>2]|0)+236>>2]=Ja;c[(c[(c[(c[(c[53542]|0)+8>>2]|0)+184>>2]|0)+(wa*44|0)+4>>2]|0)+(Ja<<2)>>2]=Va;wa=c[g>>2]|0;Ca=c[wa+184>>2]|0;za=c[Ca+(s*44|0)>>2]|0;if((za|0)>0){C=c[Ca+(s*44|0)+4>>2]|0;Ea=Cb;L=0;while(1){Da=(c[C+(L<<2)>>2]|0)==(Bb|0)?L:Ea;ya=L+1|0;if((ya|0)<(za|0)){Ea=Da;L=ya}else{Fb=Da;break}}}else{Fb=Cb}j:do{if((Fb|0)>0){L=c[Ca+(s*44|0)+4>>2]|0;Ea=0;C=Fb;while(1){Da=C-1|0;ya=Ea+1|0;if((a[(c[(c[L+(Da<<2)>>2]|0)+8>>2]|0)+156|0]|0)!=(Xa|0)){Gb=Ea;break j}if((Da|0)>0){Ea=ya;C=Da}else{Gb=ya;break}}}else{Gb=0}}while(0);C=Fb+1|0;k:do{if((C|0)<(za|0)){Ea=c[Ca+(s*44|0)+4>>2]|0;L=0;ya=C;while(1){Da=L+1|0;if((a[(c[(c[Ea+(ya<<2)>>2]|0)+8>>2]|0)+156|0]|0)!=(Xa|0)){Hb=L;break k}Ga=ya+1|0;if((Ga|0)<(za|0)){L=Da;ya=Ga}else{Hb=Da;break}}}else{Hb=0}}while(0);Xa=Gb-Hb|0;C=Db-Eb|0;if((((Xa|0)>-1?Xa:-Xa|0)|0)<=(((C|0)>-1?C:-C|0)|0)){eb=wa;fb=Ca;gb=za;break}C=c[Za>>2]|0;Xa=c[C+232>>2]|0;ya=C+236|0;C=c[ya>>2]|0;L=c[(c[Ma>>2]|0)+236>>2]|0;c[ya>>2]=L;c[(c[(c[(c[(c[53542]|0)+8>>2]|0)+184>>2]|0)+(Xa*44|0)+4>>2]|0)+(L<<2)>>2]=Ha;c[(c[Ma>>2]|0)+236>>2]=C;c[(c[(c[(c[(c[53542]|0)+8>>2]|0)+184>>2]|0)+(Xa*44|0)+4>>2]|0)+(C<<2)>>2]=Va;C=c[g>>2]|0;Xa=c[C+184>>2]|0;eb=C;fb=Xa;gb=c[Xa+(s*44|0)>>2]|0}}while(0);if((Ua|0)<(gb-1|0)){$a=Ua;ab=fb;B=eb;M=gb}else{Ib=eb;break}}}else{Ib=H}if((s|0)>(b[Ib+224>>1]|0)){s=s-1|0;bb=Ib}else{db=Ib;break}}}bb=e+1|0;if((bb|0)<(t|0)){e=bb;r=db}else{q=210;break}}if((q|0)==125){cc(87312,117264,465,171048);return 0}else if((q|0)==210){i=j;return cb|0}return 0}function lp(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;bo(a);xp(a);Bp(a);Cp(a);e=kp(a,2,d)|0;f=a+8|0;a=c[f>>2]|0;if((c[a+172>>2]|0)<1){g=e;h=a}else{i=1;j=e;e=a;while(1){a=(lp(c[(c[e+176>>2]|0)+(i<<2)>>2]|0,d)|0)+j|0;k=c[f>>2]|0;if((i|0)<(c[k+172>>2]|0)){i=i+1|0;j=a;e=k}else{g=a;h=k;break}}}e=c[h+256>>2]|0;if((e|0)==0){return g|0}j=b[h+224>>1]|0;if(j<<16>>16>(b[h+226>>1]|0)){return g|0}i=j<<16>>16;c[e+(i<<2)>>2]=c[c[(c[h+184>>2]|0)+(i*44|0)+4>>2]>>2];h=c[f>>2]|0;if(j<<16>>16<(b[h+226>>1]|0)){l=i;m=h}else{return g|0}do{l=l+1|0;c[(c[m+256>>2]|0)+(l<<2)>>2]=c[c[(c[m+184>>2]|0)+(l*44|0)+4>>2]>>2];m=c[f>>2]|0;}while((l|0)<(b[m+226>>1]|0));return g|0}function mp(a){a=a|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;d=a+8|0;a=c[d>>2]|0;e=c[a+256>>2]|0;do{if((e|0)==0){f=a}else{g=b[a+224>>1]|0;if(g<<16>>16>(b[a+226>>1]|0)){f=a;break}h=g<<16>>16;c[e+(h<<2)>>2]=c[c[(c[a+184>>2]|0)+(h*44|0)+4>>2]>>2];i=c[d>>2]|0;if(g<<16>>16<(b[i+226>>1]|0)){j=h;k=i}else{f=i;break}while(1){i=j+1|0;c[(c[k+256>>2]|0)+(i<<2)>>2]=c[c[(c[k+184>>2]|0)+(i*44|0)+4>>2]>>2];h=c[d>>2]|0;if((i|0)<(b[h+226>>1]|0)){j=i;k=h}else{f=h;break}}}}while(0);if((c[f+172>>2]|0)<1){return}else{l=1;m=f}while(1){mp(c[(c[m+176>>2]|0)+(l<<2)>>2]|0);f=c[d>>2]|0;if((l|0)<(c[f+172>>2]|0)){l=l+1|0;m=f}else{break}}return}function np(a){a=a|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0;d=a+8|0;e=c[d>>2]|0;if((c[e+172>>2]|0)<1){f=e}else{g=1;h=e;while(1){np(c[(c[h+176>>2]|0)+(g<<2)>>2]|0);e=c[d>>2]|0;if((g|0)<(c[e+172>>2]|0)){g=g+1|0;h=e}else{f=e;break}}}if((c[f+256>>2]|0)==0){return}h=b[f+224>>1]|0;if(h<<16>>16>(b[f+226>>1]|0)){return}g=a|0;e=h<<16>>16;h=f;while(1){f=c[(c[h+256>>2]|0)+(e<<2)>>2]|0;i=op(a,f,-1)|0;j=op(a,f,1)|0;c[(c[(c[d>>2]|0)+256>>2]|0)+(e<<2)>>2]=i;f=c[(c[(c[(Ix(g)|0)+8>>2]|0)+184>>2]|0)+(e*44|0)+4>>2]|0;k=i+8|0;c[(c[(c[d>>2]|0)+184>>2]|0)+(e*44|0)+4>>2]=f+(c[(c[k>>2]|0)+236>>2]<<2);c[(c[(c[d>>2]|0)+184>>2]|0)+(e*44|0)>>2]=(c[(c[j+8>>2]|0)+236>>2]|0)+1-(c[(c[k>>2]|0)+236>>2]|0);k=c[d>>2]|0;if((e|0)<(b[k+226>>1]|0)){e=e+1|0;h=k}else{break}}return}function op(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;if((d|0)==0){cc(145896,117264,754,170184);return 0}f=(e|0)<0;g=d;a:while(1){d=g;while(1){h=c[d+8>>2]|0;i=c[h+236>>2]|0;if(f){if((i|0)<=0){j=22;break a}k=(c[(c[(c[(c[53542]|0)+8>>2]|0)+184>>2]|0)+((c[h+232>>2]|0)*44|0)+4>>2]|0)+(i-1<<2)|0}else{k=(c[(c[(c[(c[53542]|0)+8>>2]|0)+184>>2]|0)+((c[h+232>>2]|0)*44|0)+4>>2]|0)+(i+1<<2)|0}h=c[k>>2]|0;if((h|0)==0){j=22;break a}l=h+8|0;m=c[l>>2]|0;if((da((c[m+236>>2]|0)-i|0,e)|0)<=0){j=11;break a}i=a[m+156|0]|0;if(i<<24>>24==0){if((Rx(b,h|0)|0)!=0){g=h;continue a}n=c[l>>2]|0;o=n;p=a[n+156|0]|0}else{o=m;p=i}if(p<<24>>24!=1){d=h;continue}if((c[o+176>>2]|0)!=1){d=h;continue}i=o+180|0;if((c[i+4>>2]|0)!=1){d=h;continue}m=c[c[i>>2]>>2]|0;i=c[m+8>>2]|0;if((a[i+112|0]|0)==0){q=m}else{m=i;do{r=c[m+116>>2]|0;m=c[r+8>>2]|0;}while((a[m+112|0]|0)!=0);q=r}if((Rx(b,q|0)|0)==0){d=h}else{g=h;continue a}}}if((j|0)==11){cc(142888,117264,760,170184);return 0}else if((j|0)==22){return g|0}return 0}function pp(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;e=d;f=c[e>>2]&3;g=c[((f|0)==2?d:d-32|0)+28>>2]|0;h=c[(c[g+8>>2]|0)+188>>2]|0;a:do{if((h|0)!=0){i=h;j=c[i>>2]|0;if((j|0)==0){break}k=d+32|0;l=0;m=j;while(1){j=l+1|0;if((c[((c[m>>2]&3|0)==2?m:m-32|0)+28>>2]|0)==(c[((f|0)==3?d:k)+28>>2]|0)){break}n=c[i+(j<<2)>>2]|0;if((n|0)==0){break a}else{l=j;m=n}}ep(d,m);l=(c[d+8>>2]|0)+172|0;if((c[l>>2]|0)==0){c[l>>2]=m}l=c[m+8>>2]|0;do{if((a[l+112|0]|0)==4){i=l+116|0;if((c[i>>2]|0)!=0){break}c[i>>2]=d}}while(0);l=(c[(c[((c[e>>2]&3|0)==3?d:k)+28>>2]|0)+8>>2]|0)+204|0;m=c[l>>2]|0;if((m|0)==0){o=kk((c[l+4>>2]<<2)+8|0)|0}else{o=mk(m,(c[l+4>>2]<<2)+8|0)|0}c[(c[(c[((c[e>>2]&3|0)==3?d:k)+28>>2]|0)+8>>2]|0)+204>>2]=o;l=(c[(c[((c[e>>2]&3|0)==3?d:k)+28>>2]|0)+8>>2]|0)+208|0;m=c[l>>2]|0;c[l>>2]=m+1;c[(c[(c[(c[((c[e>>2]&3|0)==3?d:k)+28>>2]|0)+8>>2]|0)+204>>2]|0)+(m<<2)>>2]=d;m=(c[(c[((c[e>>2]&3|0)==3?d:k)+28>>2]|0)+8>>2]|0)+204|0;c[(c[m>>2]|0)+(c[m+4>>2]<<2)>>2]=0;return}}while(0);e=Yo(g,c[((f|0)==3?d:d+32|0)+28>>2]|0,d)|0;f=d+8|0;d=e+8|0;a[(c[d>>2]|0)+112|0]=(a[(c[f>>2]|0)+112|0]|0)==4?4:3;c[(c[d>>2]|0)+96>>2]=c[(c[f>>2]|0)+96>>2];cp(b,e);return}function qp(a){a=a|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0;d=a+8|0;e=jk((b[(c[d>>2]|0)+226>>1]<<2)+8|0)|0;f=e;g=ux(a)|0;if((g|0)!=0){h=g;do{g=f+(c[(c[h+8>>2]|0)+232>>2]<<2)|0;c[g>>2]=(c[g>>2]|0)+1;g=mw(a,h)|0;if((g|0)!=0){i=g;do{g=c[i>>2]&3;j=c[(c[(c[((g|0)==3?i:i+32|0)+28>>2]|0)+8>>2]|0)+232>>2]|0;k=c[(c[(c[((g|0)==2?i:i-32|0)+28>>2]|0)+8>>2]|0)+232>>2]|0;g=(j|0)>(k|0);l=g?j:k;m=(g?k:j)+1|0;if((m|0)<(l|0)){j=m;do{m=f+(j<<2)|0;c[m>>2]=(c[m>>2]|0)+1;j=j+1|0;}while((j|0)<(l|0))}i=ow(a,i)|0;}while((i|0)!=0)}h=vx(a,h)|0;}while((h|0)!=0)}h=jk(((b[(c[d>>2]|0)+226>>1]|0)*44|0)+88|0)|0;c[(c[d>>2]|0)+184>>2]=h;h=c[d>>2]|0;a=b[h+224>>1]|0;if(a<<16>>16>(b[h+226>>1]|0)){eF(e);return}i=a<<16>>16;a=h;while(1){h=f+(i<<2)|0;l=c[h>>2]|0;c[(c[a+184>>2]|0)+(i*44|0)>>2]=l;c[(c[(c[d>>2]|0)+184>>2]|0)+(i*44|0)+8>>2]=l;l=jk((c[h>>2]<<2)+4|0)|0;c[(c[(c[d>>2]|0)+184>>2]|0)+(i*44|0)+4>>2]=l;c[(c[(c[d>>2]|0)+184>>2]|0)+(i*44|0)+12>>2]=l;l=c[d>>2]|0;if((i|0)<(b[l+226>>1]|0)){i=i+1|0;a=l}else{break}}eF(e);return}function rp(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;e=i;f=d+8|0;g=c[(c[f>>2]|0)+232>>2]|0;h=a+8|0;j=c[(c[h>>2]|0)+184>>2]|0;k=c[j+(g*44|0)>>2]|0;if((c[j+(g*44|0)+8>>2]|0)<1){l=$w(a|0)|0;a=$w(d|0)|0;Fv(1,134832,(m=i,i=i+40|0,c[m>>2]=1070,c[m+8>>2]=l,c[m+16>>2]=a,c[m+24>>2]=g,c[m+32>>2]=k,m)|0)|0;i=m;i=e;return}c[(c[j+(g*44|0)+4>>2]|0)+(k<<2)>>2]=d;c[(c[f>>2]|0)+236>>2]=k;k=(c[(c[h>>2]|0)+184>>2]|0)+(g*44|0)|0;c[k>>2]=(c[k>>2]|0)+1;k=c[h>>2]|0;j=c[k+184>>2]|0;if((c[j+(g*44|0)>>2]|0)>(c[j+(g*44|0)+8>>2]|0)){cc(118064,117264,1077,170464)}a=c[(c[f>>2]|0)+236>>2]|0;l=c[(c[(c[(c[53542]|0)+8>>2]|0)+184>>2]|0)+(g*44|0)+8>>2]|0;if((a|0)>(l|0)){n=$w(d|0)|0;o=c[(c[f>>2]|0)+236>>2]|0;p=c[(c[(c[(c[53542]|0)+8>>2]|0)+184>>2]|0)+(g*44|0)+8>>2]|0;Fv(1,109736,(m=i,i=i+40|0,c[m>>2]=1090,c[m+8>>2]=n,c[m+16>>2]=o,c[m+24>>2]=g,c[m+32>>2]=p,m)|0)|0;i=m;i=e;return}p=b[k+224>>1]|0;o=b[k+226>>1]|0;do{if((g|0)>=(p|0)){if((g|0)>(o<<16>>16|0)){break}if(((c[j+(g*44|0)+4>>2]|0)+(a<<2)|0)>>>0<=((c[j+(g*44|0)+12>>2]|0)+(l<<2)|0)>>>0){i=e;return}k=$w(d|0)|0;n=c[(c[h>>2]|0)+184>>2]|0;q=(c[n+(g*44|0)+4>>2]|0)+(c[(c[f>>2]|0)+236>>2]<<2)|0;r=(c[n+(g*44|0)+12>>2]|0)+(c[(c[(c[(c[53542]|0)+8>>2]|0)+184>>2]|0)+(g*44|0)+8>>2]<<2)|0;Fv(1,98240,(m=i,i=i+56|0,c[m>>2]=1101,c[m+8>>2]=g,c[m+16>>2]=k,c[m+24>>2]=q,c[m+32>>2]=g,c[m+40>>2]=g,c[m+48>>2]=r,m)|0)|0;i=m;i=e;return}}while(0);Fv(1,103912,(m=i,i=i+32|0,c[m>>2]=1095,c[m+8>>2]=g,c[m+16>>2]=p,c[m+24>>2]=o<<16>>16,m)|0)|0;i=m;i=e;return}function sp(d,e){d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;f=i;g=d+8|0;h=Am(c[(c[g>>2]|0)+220>>2]|0)|0;j=c[g>>2]|0;k=c[j+180>>2]|0;if((k|0)==0){l=j}else{j=k;do{k=j+8|0;a[(c[k>>2]|0)+157|0]=0;j=c[(c[k>>2]|0)+164>>2]|0;}while((j|0)!=0);l=c[g>>2]|0}j=b[l+224>>1]|0;if(j<<16>>16>(b[l+226>>1]|0)){m=l}else{k=j<<16>>16;j=l;while(1){c[(c[j+184>>2]|0)+(k*44|0)>>2]=0;l=c[g>>2]|0;if((k|0)<(b[l+226>>1]|0)){k=k+1|0;j=l}else{m=l;break}}}j=c[m+180>>2]|0;if((j|0)!=0){m=(e|0)==0;k=j;do{j=k;l=k+8|0;n=c[l>>2]|0;do{if((c[c[(m?n+172|0:n+180|0)>>2]>>2]|0)==0){o=n+157|0;if((a[o]|0)!=0){p=n;break}a[o]=1;Cm(h,j);o=Dm(h)|0;if((o|0)!=0){q=o;do{if((a[(c[q+8>>2]|0)+159|0]|0)==7){fo(d,q,e,h)}else{rp(d,q);tp(h,q,e)}q=Dm(h)|0;}while((q|0)!=0)}p=c[l>>2]|0}else{p=n}}while(0);k=c[p+164>>2]|0;}while((k|0)!=0)}if((Dm(h)|0)!=0){Fv(1,92696,(k=i,i=i+1|0,i=i+7&-8,c[k>>2]=0,k)|0)|0;i=k}k=c[g>>2]|0;p=b[k+224>>1]|0;if(p<<16>>16<=(b[k+226>>1]|0)){k=p<<16>>16;while(1){a[(c[(c[(c[53542]|0)+8>>2]|0)+184>>2]|0)+(k*44|0)+33|0]=0;p=c[g>>2]|0;do{if((c[p+116>>2]&1|0)==0){r=p}else{e=c[p+184>>2]|0;m=c[e+(k*44|0)>>2]|0;if((m|0)<=0){r=p;break}n=c[e+(k*44|0)+4>>2]|0;e=m-1|0;m=(e|0)/2|0;l=0;while(1){j=c[n+(l<<2)>>2]|0;q=c[n+(e-l<<2)>>2]|0;o=c[j+8>>2]|0;s=c[o+232>>2]|0;t=o+236|0;o=c[t>>2]|0;u=q+8|0;v=c[(c[u>>2]|0)+236>>2]|0;c[t>>2]=v;c[(c[(c[(c[(c[53542]|0)+8>>2]|0)+184>>2]|0)+(s*44|0)+4>>2]|0)+(v<<2)>>2]=j;c[(c[u>>2]|0)+236>>2]=o;c[(c[(c[(c[(c[53542]|0)+8>>2]|0)+184>>2]|0)+(s*44|0)+4>>2]|0)+(o<<2)>>2]=q;if((l|0)<(m|0)){l=l+1|0}else{break}}r=c[g>>2]|0}}while(0);if((k|0)<(b[r+226>>1]|0)){k=k+1|0}else{break}}}if((Ix(d|0)|0)!=(d|0)){Bm(h);i=f;return}if((up(0)|0)<=0){Bm(h);i=f;return}vp(d,0);Bm(h);i=f;return}function tp(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;f=d+8|0;d=c[f>>2]|0;if((e|0)==0){e=d+180|0;if((c[e+4>>2]|0)>0){g=0;h=e;i=d}else{return}while(1){e=c[(c[h>>2]|0)+(g<<2)>>2]|0;j=e;k=e-32|0;l=(c[(c[((c[j>>2]&3|0)==2?e:k)+28>>2]|0)+8>>2]|0)+157|0;if((a[l]|0)==0){a[l]=1;Cm(b,c[((c[j>>2]&3|0)==2?e:k)+28>>2]|0);m=c[f>>2]|0}else{m=i}k=g+1|0;e=m+180|0;if((k|0)<(c[e+4>>2]|0)){g=k;h=e;i=m}else{break}}return}else{m=d+172|0;if((c[m+4>>2]|0)>0){n=0;o=m;p=d}else{return}while(1){d=c[(c[o>>2]|0)+(n<<2)>>2]|0;m=d;i=d+32|0;h=(c[(c[((c[m>>2]&3|0)==3?d:i)+28>>2]|0)+8>>2]|0)+157|0;if((a[h]|0)==0){a[h]=1;Cm(b,c[((c[m>>2]&3|0)==3?d:i)+28>>2]|0);q=c[f>>2]|0}else{q=p}i=n+1|0;d=q+172|0;if((i|0)<(c[d+4>>2]|0)){n=i;o=d;p=q}else{break}}return}}function up(d){d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0.0,$=0,aa=0,ba=0,ca=0,ea=0,fa=0,ga=0,ha=0;d=(c[53542]|0)+8|0;e=c[d>>2]|0;f=b[e+224>>1]|0;if(f<<16>>16>=(b[e+226>>1]|0)){g=0;return g|0}i=f<<16>>16;f=0;j=e;while(1){e=c[j+184>>2]|0;if((a[e+(i*44|0)+33|0]|0)==0){k=c[e+(i*44|0)+4>>2]|0;l=i+1|0;m=c[(c[(c[(c[53542]|0)+8>>2]|0)+184>>2]|0)+(l*44|0)>>2]|0;if((c[43800]|0)>(m|0)){n=j;o=e}else{p=m+1|0;c[43800]=p;m=c[43798]|0;if((m|0)==0){q=kk(p<<2)|0}else{q=mk(m,p<<2)|0}c[43798]=q;p=c[d>>2]|0;n=p;o=c[p+184>>2]|0}if((c[o+(l*44|0)>>2]|0)>0){p=0;while(1){c[(c[43798]|0)+(p<<2)>>2]=0;m=p+1|0;r=c[d>>2]|0;s=c[r+184>>2]|0;if((m|0)<(c[s+(l*44|0)>>2]|0)){p=m}else{t=s;u=r;break}}}else{t=o;u=n}do{if((c[t+(i*44|0)>>2]|0)>0){p=0;r=0;s=0;m=u;v=u;while(1){w=k+(s<<2)|0;x=c[(c[(c[w>>2]|0)+8>>2]|0)+180>>2]|0;y=c[x>>2]|0;do{if((r|0)>0){if((y|0)==0){z=r;A=m;B=p;C=v;break}D=c[43798]|0;E=p;F=0;G=y;while(1){H=c[(c[(c[((c[G>>2]&3|0)==2?G:G-32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0;if((H|0)<(r|0)){I=b[(c[G+8>>2]|0)+154>>1]|0;J=E;K=H;while(1){H=K+1|0;L=(da(c[D+(H<<2)>>2]|0,I)|0)+J|0;if((H|0)<(r|0)){J=L;K=H}else{M=L;break}}}else{M=E}K=F+1|0;J=c[x+(K<<2)>>2]|0;if((J|0)==0){N=M;O=22;break}else{E=M;F=K;G=J}}}else{N=p;O=22}}while(0);do{if((O|0)==22){O=0;if((y|0)==0){z=r;A=m;B=N;C=v;break}else{P=r;Q=1;R=y}while(1){x=c[(c[(c[((c[R>>2]&3|0)==2?R:R-32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0;S=(x|0)>(P|0)?x:P;G=(c[43798]|0)+(x<<2)|0;c[G>>2]=(c[G>>2]|0)+(b[(c[R+8>>2]|0)+154>>1]|0);G=c[(c[(c[(c[w>>2]|0)+8>>2]|0)+180>>2]|0)+(Q<<2)>>2]|0;if((G|0)==0){break}P=S;Q=Q+1|0;R=G}G=c[d>>2]|0;z=S;A=G;B=N;C=G}}while(0);w=s+1|0;T=c[A+184>>2]|0;U=c[T+(i*44|0)>>2]|0;if((w|0)<(U|0)){p=B;r=z;s=w;m=A;v=C}else{break}}if((U|0)<=0){V=B;W=T;X=C;break}v=c[T+(i*44|0)+4>>2]|0;m=B;s=0;while(1){r=c[(c[v+(s<<2)>>2]|0)+8>>2]|0;if((a[r+145|0]|0)==0){Y=m}else{p=c[r+180>>2]|0;r=p;w=c[r>>2]|0;do{if((w|0)==0){Z=0}else{y=c[p+4>>2]|0;if((y|0)==0){Z=0;break}G=w;x=0;F=1;E=y;while(1){y=c[(c[(c[((c[G>>2]&3|0)==2?G:G-32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0;D=c[G+8>>2]|0;_=+h[D+16>>3];J=D+154|0;D=F;K=x;I=E;while(1){L=c[I+8>>2]|0;if(+((c[(c[(c[((c[I>>2]&3|0)==2?I:I-32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0)-y|0)*(+h[L+16>>3]-_)<0.0){$=(da(b[L+154>>1]|0,b[J>>1]|0)|0)+K|0}else{$=K}L=D+1|0;H=c[r+(L<<2)>>2]|0;if((H|0)==0){break}else{D=L;K=$;I=H}}I=F+1|0;K=c[r+(I<<2)>>2]|0;if((K|0)==0){Z=$;break}else{G=E;x=$;F=I;E=K}}}}while(0);Y=Z+m|0}r=s+1|0;if((r|0)<(U|0)){m=Y;s=r}else{V=Y;W=T;X=C;break}}}else{V=0;W=t;X=u}}while(0);k=c[W+(l*44|0)>>2]|0;if((k|0)>0){s=c[W+(l*44|0)+4>>2]|0;m=V;v=0;while(1){r=c[(c[s+(v<<2)>>2]|0)+8>>2]|0;if((a[r+145|0]|0)==0){aa=m}else{w=c[r+172>>2]|0;r=w;p=c[r>>2]|0;do{if((p|0)==0){ba=0}else{E=c[w+4>>2]|0;if((E|0)==0){ba=0;break}F=p;x=0;G=1;K=E;while(1){E=c[(c[(c[((c[F>>2]&3|0)==3?F:F+32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0;I=c[F+8>>2]|0;_=+h[I+56>>3];D=I+154|0;I=G;J=x;y=K;while(1){H=c[y+8>>2]|0;if(+((c[(c[(c[((c[y>>2]&3|0)==3?y:y+32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0)-E|0)*(+h[H+56>>3]-_)<0.0){ca=(da(b[H+154>>1]|0,b[D>>1]|0)|0)+J|0}else{ca=J}H=I+1|0;L=c[r+(H<<2)>>2]|0;if((L|0)==0){break}else{I=H;J=ca;y=L}}y=G+1|0;J=c[r+(y<<2)>>2]|0;if((J|0)==0){ba=ca;break}else{F=K;x=ca;G=y;K=J}}}}while(0);aa=ba+m|0}r=v+1|0;if((r|0)<(k|0)){m=aa;v=r}else{ea=aa;break}}}else{ea=V}c[(c[X+184>>2]|0)+(i*44|0)+36>>2]=ea;a[(c[(c[d>>2]|0)+184>>2]|0)+(i*44|0)+33|0]=1;fa=ea;ga=c[d>>2]|0;ha=l}else{fa=c[e+(i*44|0)+36>>2]|0;ga=j;ha=i+1|0}v=fa+f|0;if((ha|0)<(b[ga+226>>1]|0)){i=ha;f=v;j=ga}else{g=v;break}}return g|0}function vp(d,e){d=d|0;e=e|0;var f=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0;f=d+8|0;d=c[f>>2]|0;g=b[d+224>>1]|0;if(g<<16>>16>(b[d+226>>1]|0)){i=d}else{j=g<<16>>16;g=d;while(1){a[(c[g+184>>2]|0)+(j*44|0)+32|0]=1;d=c[f>>2]|0;if((j|0)<(b[d+226>>1]|0)){j=j+1|0;g=d}else{i=d;break}}}g=(e|0)!=0;e=i;a:while(1){i=b[e+224>>1]|0;if(i<<16>>16>(b[e+226>>1]|0)){k=76;break}j=i<<16>>16;i=0;d=e;while(1){l=(c[d+184>>2]|0)+(j*44|0)+32|0;if((a[l]|0)==0){m=i;n=d}else{a[l]=0;l=c[f>>2]|0;o=c[l+184>>2]|0;p=c[o+(j*44|0)>>2]|0;b:do{if((p-1|0)>0){q=(j|0)>0;r=j+1|0;s=j-1|0;t=0;u=0;v=o;w=l;x=p;while(1){y=a[172624]|0;z=c[v+(j*44|0)+4>>2]|0;A=c[z+(u<<2)>>2]|0;B=c[A+8>>2]|0;C=x-1|0;D=w+116|0;E=v+(r*44|0)|0;F=u;G=A;A=B;H=c[B+236>>2]|0;while(1){I=F+1|0;J=c[z+(I<<2)>>2]|0;K=A+236|0;L=J+8|0;B=c[L>>2]|0;M=c[B+236>>2]|0;if((H|0)>=(M|0)){k=12;break a}N=A;O=c[A+212>>2]|0;P=c[B+212>>2]|0;Q=(O|0)!=(P|0);do{if(y){if(!Q){k=20}}else{if((O|0)==0|Q^1|(P|0)==0){k=20;break}if((a[N+159|0]|0)==7){if((a[A+156|0]|0)==1){k=22;break}}if((a[B+159|0]|0)!=7){break}if((a[B+156|0]|0)==1){k=22}}}while(0);do{if((k|0)==20){k=0;N=c[v+((c[A+232>>2]|0)*44|0)+40>>2]|0;if((N|0)==0){k=22;break}P=(c[D>>2]&1|0)==0;Q=da(c[N+4>>2]|0,c[(c[(P?G:J)+8>>2]|0)+280>>2]|0)|0;if((a[(c[N+8>>2]|0)+((c[(c[(P?J:G)+8>>2]|0)+280>>2]|0)+Q)|0]|0)==0){k=22}}}while(0);if((k|0)==22){k=0;c:do{if(q){Q=c[B+172>>2]|0;P=c[Q>>2]|0;N=(P|0)==0;O=c[A+172>>2]|0;R=O;S=c[R>>2]|0;if(N){T=0}else{if((S|0)==0){U=Q;while(1){V=U+4|0;if((c[V>>2]|0)==0){W=0;X=0;break c}else{U=V}}}else{Y=0;Z=Q;_=P}while(1){U=c[_+8>>2]|0;V=b[U+154>>1]|0;$=c[(c[(c[((c[_>>2]&3|0)==3?_:_+32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0;aa=U+16|0;U=Y;ba=R;ca=S;while(1){ea=c[(c[(c[((c[ca>>2]&3|0)==3?ca:ca+32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0;do{if((ea-$|0)>0){k=30}else{if((ea|0)!=($|0)){fa=U;break}if(+h[(c[ca+8>>2]|0)+16>>3]>+h[aa>>3]){k=30}else{fa=U}}}while(0);if((k|0)==30){k=0;fa=(da(b[(c[(c[ba>>2]|0)+8>>2]|0)+154>>1]|0,V)|0)+U|0}ea=ba+4|0;ga=c[ea>>2]|0;if((ga|0)==0){break}else{U=fa;ba=ea;ca=ga}}ca=Z+4|0;ba=c[ca>>2]|0;if((ba|0)==0){T=fa;break}else{Y=fa;Z=ca;_=ba}}}R=O;if((S|0)==0){W=T;X=0;break}if(N){ba=R;while(1){ca=ba+4|0;if((c[ca>>2]|0)==0){W=T;X=0;break c}else{ba=ca}}}else{ha=0;ia=R;ja=S}while(1){ba=c[ja+8>>2]|0;N=b[ba+154>>1]|0;O=c[(c[(c[((c[ja>>2]&3|0)==3?ja:ja+32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0;ca=ba+16|0;ba=ha;U=Q;V=P;while(1){aa=c[(c[(c[((c[V>>2]&3|0)==3?V:V+32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0;do{if((aa-O|0)>0){k=40}else{if((aa|0)!=(O|0)){ka=ba;break}if(+h[(c[V+8>>2]|0)+16>>3]>+h[ca>>3]){k=40}else{ka=ba}}}while(0);if((k|0)==40){k=0;ka=(da(b[(c[(c[U>>2]|0)+8>>2]|0)+154>>1]|0,N)|0)+ba|0}aa=U+4|0;$=c[aa>>2]|0;if(($|0)==0){break}else{ba=ka;U=aa;V=$}}V=ia+4|0;U=c[V>>2]|0;if((U|0)==0){W=T;X=ka;break}else{ha=ka;ia=V;ja=U}}}else{W=0;X=0}}while(0);if((c[E>>2]|0)>0){P=c[B+180>>2]|0;Q=c[P>>2]|0;S=(Q|0)==0;R=c[A+180>>2]|0;U=R;V=c[U>>2]|0;if(S){la=0}else{ba=(V|0)==0;N=0;ca=P;O=Q;while(1){$=c[O+8>>2]|0;aa=b[$+154>>1]|0;ga=c[(c[(c[((c[O>>2]&3|0)==2?O:O-32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0;if(ba){ma=N}else{ea=$+56|0;$=N;na=U;oa=V;while(1){pa=c[(c[(c[((c[oa>>2]&3|0)==2?oa:oa-32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0;do{if((pa-ga|0)>0){k=51}else{if((pa|0)!=(ga|0)){qa=$;break}if(+h[(c[oa+8>>2]|0)+56>>3]>+h[ea>>3]){k=51}else{qa=$}}}while(0);if((k|0)==51){k=0;qa=(da(b[(c[(c[na>>2]|0)+8>>2]|0)+154>>1]|0,aa)|0)+$|0}pa=na+4|0;ra=c[pa>>2]|0;if((ra|0)==0){ma=qa;break}else{$=qa;na=pa;oa=ra}}}oa=ca+4|0;na=c[oa>>2]|0;if((na|0)==0){la=ma;break}else{N=ma;ca=oa;O=na}}}O=la+W|0;if((V|0)==0){sa=0}else{ca=0;N=R;U=V;while(1){ba=c[U+8>>2]|0;na=b[ba+154>>1]|0;oa=c[(c[(c[((c[U>>2]&3|0)==2?U:U-32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0;if(S){ta=ca}else{$=ba+56|0;ba=ca;aa=P;ea=Q;while(1){ga=c[(c[(c[((c[ea>>2]&3|0)==2?ea:ea-32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0;do{if((ga-oa|0)>0){k=61}else{if((ga|0)!=(oa|0)){ua=ba;break}if(+h[(c[ea+8>>2]|0)+56>>3]>+h[$>>3]){k=61}else{ua=ba}}}while(0);if((k|0)==61){k=0;ua=(da(b[(c[(c[aa>>2]|0)+8>>2]|0)+154>>1]|0,na)|0)+ba|0}ga=aa+4|0;ra=c[ga>>2]|0;if((ra|0)==0){ta=ua;break}else{ba=ua;aa=ga;ea=ra}}}ea=N+4|0;aa=c[ea>>2]|0;if((aa|0)==0){sa=ta;break}else{ca=ta;N=ea;U=aa}}}va=O;wa=sa+X|0}else{va=W;wa=X}if((wa|0)<(va|0)){break}if(g&(va|0)>0&(wa|0)==(va|0)){break}}if((I|0)<(C|0)){F=I;G=J;A=B;H=M}else{xa=t;ya=w;break b}}F=c[A+232>>2]|0;c[K>>2]=M;c[(c[(c[(c[(c[53542]|0)+8>>2]|0)+184>>2]|0)+(F*44|0)+4>>2]|0)+(M<<2)>>2]=G;c[(c[L>>2]|0)+236>>2]=H;c[(c[(c[(c[(c[53542]|0)+8>>2]|0)+184>>2]|0)+(F*44|0)+4>>2]|0)+(H<<2)>>2]=J;F=va-wa+t|0;a[(c[(c[(c[53542]|0)+8>>2]|0)+184>>2]|0)+(j*44|0)+33|0]=0;a[(c[(c[f>>2]|0)+184>>2]|0)+(j*44|0)+32|0]=1;C=c[f>>2]|0;if((b[C+224>>1]|0)<(j|0)){a[(c[(c[(c[53542]|0)+8>>2]|0)+184>>2]|0)+(s*44|0)+33|0]=0;a[(c[(c[f>>2]|0)+184>>2]|0)+(s*44|0)+32|0]=1;za=c[f>>2]|0}else{za=C}if((b[za+226>>1]|0)>(j|0)){a[(c[(c[(c[53542]|0)+8>>2]|0)+184>>2]|0)+(r*44|0)+33|0]=0;a[(c[(c[f>>2]|0)+184>>2]|0)+(r*44|0)+32|0]=1;Aa=c[f>>2]|0}else{Aa=za}C=c[Aa+184>>2]|0;E=c[C+(j*44|0)>>2]|0;if((I|0)<(E-1|0)){t=F;u=I;v=C;w=Aa;x=E}else{xa=F;ya=Aa;break}}}else{xa=0;ya=l}}while(0);m=xa+i|0;n=ya}if((j|0)<(b[n+226>>1]|0)){j=j+1|0;i=m;d=n}else{break}}if((m|0)>0){e=n}else{k=76;break}}if((k|0)==12){cc(87312,117264,514,169864)}else if((k|0)==76){return}}function wp(b){b=b|0;var d=0,e=0,f=0,g=0;d=c[b>>2]&3;e=c[(c[((d|0)==2?b:b-32|0)+28>>2]|0)+8>>2]|0;if((a[e+156|0]|0)==1){f=2}else{f=(a[e+160|0]|0)<2|0}e=c[(c[((d|0)==3?b:b+32|0)+28>>2]|0)+8>>2]|0;if((a[e+156|0]|0)==1){g=2}else{g=(a[e+160|0]|0)<2|0}e=(c[b+8>>2]|0)+156|0;c[e>>2]=da(c[e>>2]|0,c[9576+(g*12|0)+(f<<2)>>2]|0)|0;return}function xp(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0;d=i;e=c[53718]|0;if(!((e|0)!=0|(c[53604]|0)!=0)){i=d;return}f=Hm(b|0,e,0)|0;if((f|0)!=0){e=a[f]|0;do{if((e<<24>>24|0)==105){if((Ya(f|0,168592)|0)!=0){break}g=ux(b)|0;if((g|0)==0){i=d;return}else{h=g}do{yp(b,h,0);h=vx(b,h)|0;}while((h|0)!=0);i=d;return}else if((e<<24>>24|0)==111){if((Ya(f|0,82584)|0)!=0){break}g=ux(b)|0;if((g|0)==0){i=d;return}else{j=g}do{yp(b,j,1);j=vx(b,j)|0;}while((j|0)!=0);i=d;return}else if((e<<24>>24|0)==0){i=d;return}}while(0);Fv(1,164440,(k=i,i=i+8|0,c[k>>2]=f,k)|0)|0;i=k;i=d;return}f=sy(b)|0;if((f|0)!=0){e=f;do{if(($p(e)|0)==0){xp(e)}e=ty(e)|0;}while((e|0)!=0)}if((c[53604]|0)==0){i=d;return}e=ux(b)|0;if((e|0)==0){i=d;return}else{l=e}do{e=l|0;f=Hm(e,c[53604]|0,0)|0;a:do{if((f|0)!=0){j=a[f]|0;do{if((j<<24>>24|0)==111){if((Ya(f|0,82584)|0)!=0){break}yp(b,l,1);break a}else if((j<<24>>24|0)==105){if((Ya(f|0,168592)|0)!=0){break}yp(b,l,0);break a}else if((j<<24>>24|0)==0){break a}}while(0);j=$w(e)|0;Fv(1,160448,(k=i,i=i+16|0,c[k>>2]=f,c[k+8>>2]=j,k)|0)|0;i=k}}while(0);l=vx(b,l)|0;}while((l|0)!=0);i=d;return}function yp(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0;f=c[53516]|0;g=d+8|0;d=c[g>>2]|0;if((c[d+212>>2]|0)!=0){return}h=(e|0)!=0;if(h){e=c[c[d+180>>2]>>2]|0;if((e|0)==0){return}else{i=0;j=0;k=e;l=d}while(1){e=c[(c[k+8>>2]|0)+116>>2]|0;if((e|0)==0){m=k}else{n=e;while(1){e=c[(c[n+8>>2]|0)+116>>2]|0;if((e|0)==0){break}else{n=e}}m=n}e=c[m>>2]&3;if((c[(c[(c[((e|0)==3?m:m+32|0)+28>>2]|0)+8>>2]|0)+212>>2]|0)==(c[(c[(c[((e|0)==2?m:m-32|0)+28>>2]|0)+8>>2]|0)+212>>2]|0)){c[f+(i<<2)>>2]=k;o=i+1|0;p=c[g>>2]|0}else{o=i;p=l}e=j+1|0;q=c[(c[p+180>>2]|0)+(e<<2)>>2]|0;if((q|0)==0){r=o;break}else{i=o;j=e;k=q;l=p}}}else{p=c[c[d+172>>2]>>2]|0;if((p|0)==0){return}else{s=0;t=0;u=p;v=d}while(1){d=c[(c[u+8>>2]|0)+116>>2]|0;if((d|0)==0){w=u}else{p=d;while(1){d=c[(c[p+8>>2]|0)+116>>2]|0;if((d|0)==0){break}else{p=d}}w=p}n=c[w>>2]&3;if((c[(c[(c[((n|0)==3?w:w+32|0)+28>>2]|0)+8>>2]|0)+212>>2]|0)==(c[(c[(c[((n|0)==2?w:w-32|0)+28>>2]|0)+8>>2]|0)+212>>2]|0)){c[f+(s<<2)>>2]=u;x=s+1|0;y=c[g>>2]|0}else{x=s;y=v}n=t+1|0;d=c[(c[y+172>>2]|0)+(n<<2)>>2]|0;if((d|0)==0){r=x;break}else{s=x;t=n;u=d;v=y}}}if((r|0)<2){return}c[f+(r<<2)>>2]=0;Jb(f|0,r|0,4,124);r=c[f+4>>2]|0;if((r|0)==0){return}if(h){h=1;y=r;while(1){v=c[f+(h-1<<2)>>2]|0;u=c[((c[v>>2]&3|0)==2?v:v-32|0)+28>>2]|0;v=c[((c[y>>2]&3|0)==2?y:y-32|0)+28>>2]|0;if((To(u,v)|0)!=0){z=24;break}t=Yo(u,v,0)|0;a[(c[t+8>>2]|0)+112|0]=4;cp(b,t);t=h+1|0;v=c[f+(t<<2)>>2]|0;if((v|0)==0){z=24;break}else{h=t;y=v}}if((z|0)==24){return}}else{y=1;h=r;while(1){r=c[f+(y-1<<2)>>2]|0;v=c[((c[r>>2]&3|0)==3?r:r+32|0)+28>>2]|0;r=c[((c[h>>2]&3|0)==3?h:h+32|0)+28>>2]|0;if((To(v,r)|0)!=0){z=24;break}t=Yo(v,r,0)|0;a[(c[t+8>>2]|0)+112|0]=4;cp(b,t);t=y+1|0;r=c[f+(t<<2)>>2]|0;if((r|0)==0){z=24;break}else{y=t;h=r}}if((z|0)==24){return}}}function zp(a,b){a=a|0;b=b|0;return((c[c[a>>2]>>2]|0)>>>4)-((c[c[b>>2]>>2]|0)>>>4)|0}function Ap(a,d,e,f){a=a|0;d=d|0;e=e|0;f=f|0;var g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0;g=a+8|0;i=c[g>>2]|0;if((c[i+172>>2]|0)<1){j=f}else{k=f;f=1;l=i;while(1){i=Ap(c[(c[l+176>>2]|0)+(f<<2)>>2]|0,d,e,k)|0;m=c[g>>2]|0;if((f|0)<(c[m+172>>2]|0)){k=i;f=f+1|0;l=m}else{j=i;break}}}l=a|0;if((Ix(l)|0)==(a|0)){n=j;return n|0}vF(d|0,0,e<<2|0)|0;e=ux(a)|0;if((e|0)!=0){f=e;do{e=f+8|0;c[d+(c[(c[e>>2]|0)+232>>2]<<2)>>2]=1;k=mw(a,f)|0;if((k|0)!=0){i=k;do{k=c[(c[e>>2]|0)+232>>2]|0;m=i;o=i-32|0;if((k|0)<(c[(c[(c[((c[m>>2]&3|0)==2?i:o)+28>>2]|0)+8>>2]|0)+232>>2]|0)){p=k;do{p=p+1|0;c[d+(p<<2)>>2]=1;}while((p|0)<(c[(c[(c[((c[m>>2]&3|0)==2?i:o)+28>>2]|0)+8>>2]|0)+232>>2]|0))}i=ow(a,i)|0;}while((i|0)!=0)}f=vx(a,f)|0;}while((f|0)!=0)}f=c[g>>2]|0;i=b[f+224>>1]|0;if(i<<16>>16>(b[f+226>>1]|0)){n=j;return n|0}e=j;j=i<<16>>16;i=f;while(1){if((c[d+(j<<2)>>2]|0)==0){if((e|0)==0){q=ry(Ix(l)|0,156320,1)|0}else{q=e}f=Ax(q,0,1)|0;Wx(f|0,151840,304,1)|0;o=f+8|0;c[(c[o>>2]|0)+232>>2]=j;h[(c[o>>2]|0)+96>>3]=.5;h[(c[o>>2]|0)+88>>3]=.5;h[(c[o>>2]|0)+80>>3]=1.0;c[(c[o>>2]|0)+216>>2]=1;c[(c[o>>2]|0)+176>>2]=0;m=jk(20)|0;c[(c[o>>2]|0)+172>>2]=m;c[(c[o>>2]|0)+184>>2]=0;m=jk(20)|0;c[(c[o>>2]|0)+180>>2]=m;zx(a,f,1)|0;r=q;s=c[g>>2]|0}else{r=e;s=i}if((j|0)<(b[s+226>>1]|0)){e=r;j=j+1|0;i=s}else{n=r;break}}return n|0}function Bp(d){d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;e=d+8|0;f=c[e>>2]|0;g=b[f+224>>1]|0;if(g<<16>>16>(b[f+226>>1]|0)){return}h=g<<16>>16;g=f;while(1){f=c[g+184>>2]|0;do{if((c[f+(h*44|0)>>2]|0)>0){i=0;j=0;k=f;while(1){l=(c[(c[k+(h*44|0)+4>>2]|0)+(i<<2)>>2]|0)+8|0;a[(c[l>>2]|0)+158|0]=0;a[(c[l>>2]|0)+157|0]=0;c[(c[l>>2]|0)+280>>2]=i;if((c[(c[l>>2]|0)+192>>2]|0)>0&(j|0)==0){l=c[(c[(c[e>>2]|0)+184>>2]|0)+(h*44|0)>>2]|0;m=jk(12)|0;c[m>>2]=l;c[m+4>>2]=l;c[m+8>>2]=jk(da(l,l)|0)|0;c[(c[(c[e>>2]|0)+184>>2]|0)+(h*44|0)+40>>2]=m;n=1}else{n=j}m=i+1|0;o=c[e>>2]|0;p=c[o+184>>2]|0;q=c[p+(h*44|0)>>2]|0;if((m|0)<(q|0)){i=m;j=n;k=p}else{break}}if((n|0)!=0&(q|0)>0){r=0;s=p;t=o}else{u=o;break}while(1){k=c[(c[s+(h*44|0)+4>>2]|0)+(r<<2)>>2]|0;if((a[(c[k+8>>2]|0)+157|0]|0)==0){Gp(d,k);v=c[e>>2]|0}else{v=t}k=r+1|0;j=c[v+184>>2]|0;if((k|0)<(c[j+(h*44|0)>>2]|0)){r=k;s=j;t=v}else{u=v;break}}}else{u=g}}while(0);if((h|0)<(b[u+226>>1]|0)){h=h+1|0;g=u}else{break}}return}function Cp(d){d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0,xa=0,ya=0,za=0,Aa=0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Qa=0,Ra=0,Sa=0;e=d+8|0;f=c[e>>2]|0;if((a[f+228|0]|0)==0){return}g=b[f+224>>1]|0;if(g<<16>>16>(b[f+226>>1]|0)){return}h=g<<16>>16;g=0;i=f;a:while(1){f=c[i+184>>2]|0;j=c[f+(h*44|0)>>2]|0;if((j|0)==0){k=g;l=i}else{m=c[(c[c[f+(h*44|0)+4>>2]>>2]|0)+8>>2]|0;f=c[m+236>>2]|0;if((j|0)>0){j=1;n=m;while(1){a[n+157|0]=0;m=c[(c[e>>2]|0)+184>>2]|0;if((j|0)>=(c[m+(h*44|0)>>2]|0)){break}o=c[(c[(c[m+(h*44|0)+4>>2]|0)+(j<<2)>>2]|0)+8>>2]|0;j=j+1|0;n=o}p=(j<<2)+4|0}else{p=4}if((g|0)==0){q=kk(p)|0}else{q=mk(g,p)|0}n=q;o=c[e>>2]|0;m=c[o+184>>2]|0;r=c[m+(h*44|0)>>2]|0;do{if((r|0)>0){s=0;t=0;u=o;v=m;w=r;while(1){if((c[u+116>>2]&1|0)==0){x=(c[v+(h*44|0)+4>>2]|0)+(w+~t<<2)|0}else{x=(c[v+(h*44|0)+4>>2]|0)+(t<<2)|0}y=c[x>>2]|0;z=y+8|0;A=c[z>>2]|0;B=A+196|0;if((c[B+4>>2]|0)>0){C=0;D=0;E=B;while(1){B=c[(c[E>>2]|0)+(D<<2)>>2]|0;do{if((c[(c[B+8>>2]|0)+156>>2]|0)==0){F=0}else{G=B;H=c[((c[G>>2]&3|0)==3?B:B+32|0)+28>>2]|0;I=H+8|0;J=c[I>>2]|0;K=a[J+156|0]|0;if(K<<24>>24==0){L=(Rx(d,H|0)|0)!=0|0;H=c[I>>2]|0;M=L;N=H;O=a[H+156|0]|0}else{M=0;N=J;O=K}do{if(O<<24>>24==1){if((c[N+176>>2]|0)!=1){P=27;break}K=N+180|0;if((c[K+4>>2]|0)!=1){P=27;break}J=c[c[K>>2]>>2]|0;K=c[J+8>>2]|0;if((a[K+112|0]|0)==0){Q=J}else{J=K;do{R=c[J+116>>2]|0;J=c[R+8>>2]|0;}while((a[J+112|0]|0)!=0);Q=R}if((Rx(d,Q|0)|0)==0){P=27}else{S=1}}else{P=27}}while(0);if((P|0)==27){P=0;S=0}if((S|M|0)==0){F=0;break}J=c[((c[G>>2]&3|0)==2?B:B-32|0)+28>>2]|0;K=J+8|0;H=c[K>>2]|0;L=a[H+156|0]|0;if(L<<24>>24==0){I=(Rx(d,J|0)|0)!=0|0;J=c[K>>2]|0;T=I;U=J;V=a[J+156|0]|0}else{T=0;U=H;V=L}do{if(V<<24>>24==1){if((c[U+176>>2]|0)!=1){P=38;break}L=U+180|0;if((c[L+4>>2]|0)!=1){P=38;break}H=c[c[L>>2]>>2]|0;L=c[H+8>>2]|0;if((a[L+112|0]|0)==0){W=H}else{H=L;do{X=c[H+116>>2]|0;H=c[X+8>>2]|0;}while((a[H+112|0]|0)!=0);W=X}if((Rx(d,W|0)|0)==0){P=38}else{Y=1}}else{P=38}}while(0);if((P|0)==38){P=0;Y=0}F=Y|T}}while(0);B=F+C|0;G=D+1|0;H=c[z>>2]|0;L=H+196|0;if((G|0)<(c[L+4>>2]|0)){C=B;D=G;E=L}else{Z=B;_=H;break}}}else{Z=0;_=A}E=_+188|0;if((c[E+4>>2]|0)>0){D=0;C=0;H=E;while(1){E=c[(c[H>>2]|0)+(C<<2)>>2]|0;do{if((c[(c[E+8>>2]|0)+156>>2]|0)==0){$=0}else{B=E;L=c[((c[B>>2]&3|0)==3?E:E+32|0)+28>>2]|0;G=L+8|0;J=c[G>>2]|0;I=a[J+156|0]|0;if(I<<24>>24==0){K=(Rx(d,L|0)|0)!=0|0;L=c[G>>2]|0;aa=K;ba=L;ca=a[L+156|0]|0}else{aa=0;ba=J;ca=I}do{if(ca<<24>>24==1){if((c[ba+176>>2]|0)!=1){P=52;break}I=ba+180|0;if((c[I+4>>2]|0)!=1){P=52;break}J=c[c[I>>2]>>2]|0;I=c[J+8>>2]|0;if((a[I+112|0]|0)==0){da=J}else{J=I;do{ea=c[J+116>>2]|0;J=c[ea+8>>2]|0;}while((a[J+112|0]|0)!=0);da=ea}if((Rx(d,da|0)|0)==0){P=52}else{fa=1}}else{P=52}}while(0);if((P|0)==52){P=0;fa=0}if((fa|aa|0)==0){$=0;break}J=c[((c[B>>2]&3|0)==2?E:E-32|0)+28>>2]|0;I=J+8|0;L=c[I>>2]|0;K=a[L+156|0]|0;if(K<<24>>24==0){G=(Rx(d,J|0)|0)!=0|0;J=c[I>>2]|0;ga=G;ha=J;ia=a[J+156|0]|0}else{ga=0;ha=L;ia=K}do{if(ia<<24>>24==1){if((c[ha+176>>2]|0)!=1){P=63;break}K=ha+180|0;if((c[K+4>>2]|0)!=1){P=63;break}L=c[c[K>>2]>>2]|0;K=c[L+8>>2]|0;if((a[K+112|0]|0)==0){ja=L}else{L=K;do{ka=c[L+116>>2]|0;L=c[ka+8>>2]|0;}while((a[L+112|0]|0)!=0);ja=ka}if((Rx(d,ja|0)|0)==0){P=63}else{la=1}}else{P=63}}while(0);if((P|0)==63){P=0;la=0}$=la|ga}}while(0);E=$+D|0;B=C+1|0;L=c[z>>2]|0;K=L+188|0;if((B|0)<(c[K+4>>2]|0)){D=E;C=B;H=K}else{ma=E;na=L;break}}}else{ma=0;na=_}do{if((ma|Z|0)==0){c[n+(s<<2)>>2]=y;oa=s+1|0}else{if((a[na+157|0]|0)!=0|(Z|0)!=0){oa=s;break}oa=(Fp(d,y,n+(s<<2)|0,h)|0)+s|0}}while(0);y=t+1|0;pa=c[e>>2]|0;H=c[pa+184>>2]|0;C=c[H+(h*44|0)>>2]|0;if((y|0)<(C|0)){s=oa;t=y;u=pa;v=H;w=C}else{break}}if((oa|0)==0){break}do{if((c[pa+116>>2]&1|0)==0){w=n+(oa-1<<2)|0;if(n>>>0<w>>>0){qa=n;ra=w}else{sa=pa;break}do{w=c[qa>>2]|0;c[qa>>2]=c[ra>>2];c[ra>>2]=w;qa=qa+4|0;ra=ra-4|0;}while(qa>>>0<ra>>>0);sa=c[e>>2]|0}else{sa=pa}}while(0);w=c[sa+184>>2]|0;if((c[w+(h*44|0)>>2]|0)>0){ta=0;ua=w}else{break}do{w=c[n+(ta<<2)>>2]|0;c[(c[ua+(h*44|0)+4>>2]|0)+(ta<<2)>>2]=w;c[(c[w+8>>2]|0)+236>>2]=ta+f;ta=ta+1|0;va=c[e>>2]|0;ua=c[va+184>>2]|0;wa=c[ua+(h*44|0)>>2]|0;}while((ta|0)<(wa|0));if((wa|0)>0){xa=0;ya=ua;za=va}else{break}while(1){w=(c[(c[ya+(h*44|0)+4>>2]|0)+(xa<<2)>>2]|0)+8|0;v=c[w>>2]|0;u=c[v+188>>2]|0;do{if((u|0)==0){Aa=za}else{t=c[u>>2]|0;if((t|0)==0){Aa=za;break}else{Ba=0;Ca=t;Da=v;Ea=za}while(1){t=c[Ca>>2]|0;s=t&3;C=c[(c[(c[((s|0)==2?Ca:Ca-32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0;H=c[(c[(c[((s|0)==3?Ca:Ca+32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0;if((c[Ea+116>>2]&1|0)==0){if((C|0)<(H|0)){P=84}else{Fa=Ba;Ga=Da}}else{if((C|0)>(H|0)){P=84}else{Fa=Ba;Ga=Da}}if((P|0)==84){P=0;do{if((c[(c[Ca+8>>2]|0)+156>>2]|0)!=0){H=Ca;C=c[((t&3|0)==3?Ca:Ca+32|0)+28>>2]|0;s=C+8|0;y=c[s>>2]|0;D=a[y+156|0]|0;if(D<<24>>24==0){z=(Rx(d,C|0)|0)!=0|0;C=c[s>>2]|0;Ha=z;Ia=C;Ja=a[C+156|0]|0}else{Ha=0;Ia=y;Ja=D}do{if(Ja<<24>>24==1){if((c[Ia+176>>2]|0)!=1){P=94;break}D=Ia+180|0;if((c[D+4>>2]|0)!=1){P=94;break}y=c[c[D>>2]>>2]|0;D=c[y+8>>2]|0;if((a[D+112|0]|0)==0){Ka=y}else{y=D;do{La=c[y+116>>2]|0;y=c[La+8>>2]|0;}while((a[y+112|0]|0)!=0);Ka=La}if((Rx(d,Ka|0)|0)==0){P=94}else{Ma=1}}else{P=94}}while(0);if((P|0)==94){P=0;Ma=0}if((Ma|Ha|0)==0){break}y=c[((c[H>>2]&3|0)==2?Ca:Ca-32|0)+28>>2]|0;D=y+8|0;C=c[D>>2]|0;z=a[C+156|0]|0;if(z<<24>>24==0){s=(Rx(d,y|0)|0)!=0|0;y=c[D>>2]|0;Na=s;Oa=y;Pa=a[y+156|0]|0}else{Na=0;Oa=C;Pa=z}do{if(Pa<<24>>24==1){if((c[Oa+176>>2]|0)!=1){P=105;break}z=Oa+180|0;if((c[z+4>>2]|0)!=1){P=105;break}C=c[c[z>>2]>>2]|0;z=c[C+8>>2]|0;if((a[z+112|0]|0)==0){Qa=C}else{C=z;do{Ra=c[C+116>>2]|0;C=c[Ra+8>>2]|0;}while((a[C+112|0]|0)!=0);Qa=Ra}if((Rx(d,Qa|0)|0)==0){P=105}else{Sa=1}}else{P=105}}while(0);if((P|0)==105){P=0;Sa=0}if((Sa|Na|0)!=0){P=107;break a}}}while(0);dp(Ca);pp(d,Ca);Fa=Ba-1|0;Ga=c[w>>2]|0}t=Fa+1|0;H=c[(c[Ga+188>>2]|0)+(t<<2)>>2]|0;C=c[e>>2]|0;if((H|0)==0){Aa=C;break}else{Ba=t;Ca=H;Da=Ga;Ea=C}}}}while(0);w=xa+1|0;v=c[Aa+184>>2]|0;if((w|0)<(c[v+(h*44|0)>>2]|0)){xa=w;ya=v;za=Aa}else{break}}}}while(0);a[(c[(c[(c[53542]|0)+8>>2]|0)+184>>2]|0)+(h*44|0)+33|0]=0;k=n;l=c[e>>2]|0}if((h|0)<(b[l+226>>1]|0)){h=h+1|0;g=k;i=l}else{break}}if((P|0)==107){cc(132240,117264,1292,170600)}if((k|0)==0){return}eF(k);return}function Dp(a,b){a=a|0;b=b|0;return(c[a>>2]|0)-(c[b>>2]|0)|0}function Ep(a,b){a=a|0;b=b|0;return(c[(c[(c[a>>2]|0)+8>>2]|0)+236>>2]|0)-(c[(c[(c[b>>2]|0)+8>>2]|0)+236>>2]|0)|0}function Fp(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;g=d+8|0;a[(c[g>>2]|0)+157|0]=1;h=c[g>>2]|0;i=h+188|0;do{if((c[i+4>>2]|0)>0){j=c[c[i>>2]>>2]|0;if((j|0)==0){k=0;l=h;break}else{m=0;n=0;o=j}while(1){do{if((c[(c[o+8>>2]|0)+156>>2]|0)==0){p=n}else{j=o;q=c[((c[j>>2]&3|0)==3?o:o+32|0)+28>>2]|0;r=q+8|0;s=c[r>>2]|0;t=a[s+156|0]|0;if(t<<24>>24==0){u=(Rx(b,q|0)|0)!=0|0;q=c[r>>2]|0;v=u;w=q;x=a[q+156|0]|0}else{v=0;w=s;x=t}do{if(x<<24>>24==1){if((c[w+176>>2]|0)!=1){y=13;break}t=w+180|0;if((c[t+4>>2]|0)!=1){y=13;break}s=c[c[t>>2]>>2]|0;t=c[s+8>>2]|0;if((a[t+112|0]|0)==0){z=s}else{s=t;do{A=c[s+116>>2]|0;s=c[A+8>>2]|0;}while((a[s+112|0]|0)!=0);z=A}if((Rx(b,z|0)|0)==0){y=13}else{B=1}}else{y=13}}while(0);if((y|0)==13){y=0;B=0}if((B|v|0)==0){p=n;break}s=o-32|0;t=c[((c[j>>2]&3|0)==2?o:s)+28>>2]|0;q=t+8|0;u=c[q>>2]|0;r=a[u+156|0]|0;if(r<<24>>24==0){C=(Rx(b,t|0)|0)!=0|0;t=c[q>>2]|0;D=C;E=t;F=a[t+156|0]|0}else{D=0;E=u;F=r}do{if(F<<24>>24==1){if((c[E+176>>2]|0)!=1){y=24;break}r=E+180|0;if((c[r+4>>2]|0)!=1){y=24;break}u=c[c[r>>2]>>2]|0;r=c[u+8>>2]|0;if((a[r+112|0]|0)==0){G=u}else{u=r;do{H=c[u+116>>2]|0;u=c[H+8>>2]|0;}while((a[u+112|0]|0)!=0);G=H}if((Rx(b,G|0)|0)==0){y=24}else{I=1}}else{y=24}}while(0);if((y|0)==24){y=0;I=0}if((I|D|0)==0){p=n;break}u=c[((c[j>>2]&3|0)==2?o:s)+28>>2]|0;if((a[(c[u+8>>2]|0)+157|0]|0)!=0){p=n;break}p=(Fp(b,u,e+(n<<2)|0,f)|0)+n|0}}while(0);u=m+1|0;r=c[g>>2]|0;t=c[(c[r+188>>2]|0)+(u<<2)>>2]|0;if((t|0)==0){k=p;l=r;break}else{m=u;n=p;o=t}}}else{k=0;l=h}}while(0);if((c[l+232>>2]|0)==(f|0)){c[e+(k<<2)>>2]=d;return k+1|0}else{cc(129928,117264,1221,170048);return 0}return 0}function Gp(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0;e=d+8|0;d=c[e>>2]|0;f=c[(c[(c[b+8>>2]|0)+184>>2]|0)+((c[d+232>>2]|0)*44|0)+40>>2]|0;a[d+157|0]=1;a[(c[e>>2]|0)+158|0]=1;d=(c[(c[(Ix(b|0)|0)+8>>2]|0)+172>>2]|0)>0;g=c[e>>2]|0;h=c[g+188>>2]|0;if((h|0)==0){i=g;j=i;k=j+158|0;a[k]=0;return}l=c[h>>2]|0;if((l|0)==0){i=g;j=i;k=j+158|0;a[k]=0;return}g=f|0;h=f+4|0;m=f+8|0;f=0;n=l;a:while(1){do{if(d){l=n;if((Rx(b,c[((c[l>>2]&3|0)==3?n:n+32|0)+28>>2]|0)|0)==0){o=f;break}if((Rx(b,c[((c[l>>2]&3|0)==2?n:n-32|0)+28>>2]|0)|0)==0){o=f}else{p=7}}else{p=7}}while(0);do{if((p|0)==7){p=0;l=n+8|0;if((c[(c[l>>2]|0)+156>>2]|0)==0){o=f;break}q=n;r=c[q>>2]&3;s=n-32|0;t=c[(c[((r|0)==2?n:s)+28>>2]|0)+8>>2]|0;u=c[t+280>>2]|0;v=(u|0)<(c[g>>2]|0);if((a[t+158|0]|0)==1){if(!v){p=10;break a}t=c[(c[(c[((r|0)==3?n:n+32|0)+28>>2]|0)+8>>2]|0)+280>>2]|0;w=c[h>>2]|0;if((t|0)>=(w|0)){p=12;break a}x=(da(w,u)|0)+t|0;a[(c[m>>2]|0)+x|0]=1;dp(n);x=f-1|0;if((a[(c[l>>2]|0)+112|0]|0)==4){o=x;break}pp(b,n);o=x;break}else{if(!v){p=16;break a}v=c[(c[(c[((r|0)==3?n:n+32|0)+28>>2]|0)+8>>2]|0)+280>>2]|0;r=c[h>>2]|0;if((v|0)>=(r|0)){p=18;break a}x=(da(r,v)|0)+u|0;a[(c[m>>2]|0)+x|0]=1;x=c[((c[q>>2]&3|0)==2?n:s)+28>>2]|0;if((a[(c[x+8>>2]|0)+157|0]|0)!=0){o=f;break}Gp(b,x);o=f;break}}}while(0);x=o+1|0;s=c[e>>2]|0;q=c[(c[s+188>>2]|0)+(x<<2)>>2]|0;if((q|0)==0){i=s;p=22;break}else{f=x;n=q}}if((p|0)==10){cc(126736,117264,982,170584)}else if((p|0)==12){cc(124192,117264,983,170584)}else if((p|0)==16){cc(126736,117264,991,170584)}else if((p|0)==18){cc(124192,117264,992,170584)}else if((p|0)==22){j=i;k=j+158|0;a[k]=0;return}}function Hp(d,f){d=d|0;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0.0,P=0.0,Q=0,R=0,S=0,T=0,U=0.0,V=0.0,W=0.0,X=0.0,Y=0.0,Z=0.0,_=0.0,$=0.0,aa=0,ba=0,ea=0,fa=0,ga=0,ha=0,ia=0,ja=0,ka=0,la=0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0,va=0,wa=0.0,xa=0.0,ya=0,za=0.0,Aa=0.0,Ba=0,Ca=0,Da=0,Ea=0,Fa=0,Ga=0,Ha=0,Ia=0;g=i;i=i+8|0;j=g|0;k=d+8|0;if((c[(c[k>>2]|0)+180>>2]|0)==0){i=g;return}go(d);Ip(d);if((a[215376]|0)!=0){no(d)}l=c[k>>2]|0;m=b[l+224>>1]|0;if(m<<16>>16>(b[l+226>>1]|0)){n=l}else{p=m<<16>>16;m=l;q=l;while(1){l=c[m+184>>2]|0;r=c[l+(p*44|0)>>2]|0;if((r|0)>0){s=0;t=0;u=l;while(1){v=(c[(c[u+(p*44|0)+4>>2]|0)+(s<<2)>>2]|0)+8|0;c[(c[v>>2]|0)+236>>2]=t;w=c[v>>2]|0;if((a[w+159|0]|0)==6){x=c[w+216>>2]|0}else{x=1}w=x+t|0;v=s+1|0;y=c[k>>2]|0;z=c[y+184>>2]|0;A=c[z+(p*44|0)>>2]|0;if((v|0)<(A|0)){s=v;t=w;u=z}else{B=w;C=z;D=A;E=y;F=y;break}}}else{B=0;C=l;D=r;E=m;F=q}if((B|0)>(D|0)){u=c[C+(p*44|0)+4>>2]|0;if((u|0)==0){G=kk((B<<2)+4|0)|0}else{G=mk(u,(B<<2)+4|0)|0}c[(c[(c[k>>2]|0)+184>>2]|0)+(p*44|0)+4>>2]=G;u=c[(c[k>>2]|0)+184>>2]|0;t=c[u+(p*44|0)>>2]|0;if((t|0)>0){s=t;t=u;while(1){y=s-1|0;A=c[t+(p*44|0)+4>>2]|0;z=c[A+(y<<2)>>2]|0;c[A+(c[(c[z+8>>2]|0)+236>>2]<<2)>>2]=z;z=c[(c[k>>2]|0)+184>>2]|0;if((y|0)>0){s=y;t=z}else{H=z;break}}}else{H=u}c[H+(p*44|0)>>2]=B;c[(c[(c[(c[k>>2]|0)+184>>2]|0)+(p*44|0)+4>>2]|0)+(B<<2)>>2]=0;t=c[k>>2]|0;I=t;J=t}else{I=E;J=F}if((p|0)<(b[I+226>>1]|0)){p=p+1|0;m=I;q=J}else{n=J;break}}}J=c[n+180>>2]|0;if((J|0)!=0){n=J;do{J=n+8|0;q=c[J>>2]|0;I=c[q+224>>2]|0;if((I|0)==0){K=q}else{Lp(d,I);K=c[J>>2]|0}I=c[K+228>>2]|0;if((I|0)==0){L=K}else{Lp(d,I);L=c[J>>2]|0}J=c[L+204>>2]|0;if((J|0)!=0){I=J;J=0;while(1){if((c[I+(J<<2)>>2]|0)==0){break}else{J=J+1|0}}}n=c[L+164>>2]|0;}while((n|0)!=0)}if((gp(d)|0)!=0){Ip(d)}n=c[k>>2]|0;L=c[n+180>>2]|0;if((L|0)==0){M=n}else{n=L;do{L=n+8|0;K=c[L>>2]|0;J=K+172|0;I=K+244|0;K=c[J+4>>2]|0;c[I>>2]=c[J>>2];c[I+4>>2]=K;K=c[L>>2]|0;I=K+180|0;J=K+252|0;K=c[I+4>>2]|0;c[J>>2]=c[I>>2];c[J+4>>2]=K;K=c[L>>2]|0;J=c[K+180>>2]|0;I=0;while(1){if((c[J+(I<<2)>>2]|0)==0){break}else{I=I+1|0}}J=K+172|0;u=c[J>>2]|0;q=0;while(1){if((c[u+(q<<2)>>2]|0)==0){break}else{q=q+1|0}}c[J+4>>2]=0;u=jk((q+I<<2)+16|0)|0;c[(c[L>>2]|0)+172>>2]=u;c[(c[L>>2]|0)+184>>2]=0;u=jk(16)|0;c[(c[L>>2]|0)+180>>2]=u;n=c[(c[L>>2]|0)+164>>2]|0;}while((n|0)!=0);M=c[k>>2]|0}n=M;u=c[M+184>>2]|0;K=(a[n+113|0]&1)==0;m=c[M+236>>2]|0;c[j>>2]=m;c[j+4>>2]=K?m:5;m=b[M+224>>1]|0;if(m<<16>>16>(b[n+226>>1]|0)){N=M}else{M=m<<16>>16;while(1){m=u+(M*44|0)+4|0;c[(c[(c[c[m>>2]>>2]|0)+8>>2]|0)+232>>2]=0;n=u+(M*44|0)|0;if((c[n>>2]|0)>0){O=+(c[j+((M&1)<<2)>>2]|0);K=0;P=0.0;while(1){p=c[(c[m>>2]|0)+(K<<2)>>2]|0;F=p+8|0;E=c[F>>2]|0;c[E+240>>2]=~~+h[E+96>>3];E=c[F>>2]|0;B=E+204|0;if((c[B+4>>2]|0)>0){H=c[c[B>>2]>>2]|0;if((H|0)==0){Q=0;R=E}else{B=0;G=0;C=H;H=E;while(1){E=c[C>>2]&3;if((c[((E|0)==3?C:C+32|0)+28>>2]|0)==(c[((E|0)==2?C:C-32|0)+28>>2]|0)){E=(hm(C)|0)+B|0;S=E;T=c[F>>2]|0}else{S=B;T=H}E=G+1|0;D=c[(c[T+204>>2]|0)+(E<<2)>>2]|0;if((D|0)==0){Q=S;R=T;break}else{B=S;G=E;C=D;H=T}}}H=R+96|0;h[H>>3]=+(Q|0)+ +h[H>>3]}H=K+1|0;C=c[(c[m>>2]|0)+(H<<2)>>2]|0;if((C|0)==0){U=P}else{G=C+8|0;V=O+(+h[(c[F>>2]|0)+96>>3]+ +h[(c[G>>2]|0)+88>>3]);Jp(p,C,V,0)|0;C=~~(P+V);c[(c[G>>2]|0)+232>>2]=C;U=+(C|0)}C=c[F>>2]|0;G=c[C+112>>2]|0;do{if((G|0)!=0){B=c[C+252>>2]|0;D=c[B>>2]|0;E=c[B+4>>2]|0;B=E;x=(c[(c[(c[((c[D>>2]&3|0)==2?D:D-32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0)>(c[(c[(c[((c[E>>2]&3|0)==2?B:E-32|0)+28>>2]|0)+8>>2]|0)+236>>2]|0);E=x?B:D;t=x?D:B;B=G+8|0;D=c[B>>2]|0;V=+((da(c[(c[k>>2]|0)+236>>2]|0,e[D+170>>1]|0)|0)/2|0|0);x=c[E>>2]&3;s=c[((x|0)==2?E:E-32|0)+28>>2]|0;r=c[((x|0)==3?E:E+32|0)+28>>2]|0;if((Wp(r,s)|0)==0){Jp(s,r,+(~~(+h[(c[r+8>>2]|0)+88>>3]+(V+ +h[(c[s+8>>2]|0)+96>>3]))|0),c[D+156>>2]|0)|0}D=c[t>>2]&3;s=c[((D|0)==3?t:t+32|0)+28>>2]|0;r=c[((D|0)==2?t:t-32|0)+28>>2]|0;if((Wp(r,s)|0)!=0){break}Jp(s,r,+(~~(+h[(c[r+8>>2]|0)+88>>3]+(V+ +h[(c[s+8>>2]|0)+96>>3]))|0),c[(c[B>>2]|0)+156>>2]|0)|0}}while(0);G=(c[F>>2]|0)+188|0;if((c[G+4>>2]|0)>0){C=0;p=G;do{G=c[(c[p>>2]|0)+(C<<2)>>2]|0;B=c[G>>2]&3;s=c[((B|0)==3?G:G+32|0)+28>>2]|0;r=c[((B|0)==2?G:G-32|0)+28>>2]|0;B=(c[(c[s+8>>2]|0)+236>>2]|0)<(c[(c[r+8>>2]|0)+236>>2]|0);t=B?s:r;D=B?r:s;V=+h[(c[t+8>>2]|0)+96>>3]+ +h[(c[D+8>>2]|0)+88>>3];s=G+8|0;G=~~(V+ +(da(c[(c[k>>2]|0)+236>>2]|0,e[(c[s>>2]|0)+170>>1]|0)|0));r=So(t,D)|0;do{if((r|0)==0){B=c[s>>2]|0;if((c[B+96>>2]|0)!=0){break}Jp(t,D,+(G|0),c[B+156>>2]|0)|0}else{W=+(G|0);X=V+ +(c[(c[k>>2]|0)+236>>2]|0);Y=+h[(c[s>>2]|0)+136>>3];B=Y<0.0;if(B){Z=Y+-.5}else{Z=Y+.5}if(W>X+ +(~~Z|0)){_=W}else{if(B){$=Y+-.5}else{$=Y+.5}_=X+ +(~~$|0)}B=~~_;if((B|0)>65535){Fv(1,92328,(aa=i,i=i+16|0,h[aa>>3]=+(B|0),c[aa+8>>2]=65535,aa)|0)|0;i=aa;ba=65535}else{ba=B}B=(c[r+8>>2]|0)+170|0;E=b[B>>1]|0;b[B>>1]=(E&65535|0)>(ba|0)?E:ba&65535}}while(0);C=C+1|0;p=(c[F>>2]|0)+188|0;}while((C|0)<(c[p+4>>2]|0))}if((H|0)<(c[n>>2]|0)){K=H;P=U}else{break}}}K=c[k>>2]|0;if((M|0)<(b[K+226>>1]|0)){M=M+1|0}else{N=K;break}}}M=c[N+180>>2]|0;if((M|0)==0){ea=N}else{N=M;do{M=N+8|0;ba=c[M>>2]|0;Q=c[ba+252>>2]|0;do{if((Q|0)==0){fa=ba}else{R=c[Q>>2]|0;if((R|0)==0){fa=ba;break}else{ga=0;ha=R}while(1){R=bp(d)|0;T=R+8|0;a[(c[T>>2]|0)+156|0]=2;S=ha+8|0;j=c[S>>2]|0;u=~~(+h[j+56>>3]- +h[j+16>>3]);K=(u|0)>0;n=K?0:-u|0;m=K?u:0;u=ha;K=ha+32|0;Jp(R,c[((c[u>>2]&3|0)==3?ha:K)+28>>2]|0,+(m+1|0),c[j+156>>2]|0)|0;j=ha-32|0;Jp(R,c[((c[u>>2]&3|0)==2?ha:j)+28>>2]|0,+(n+1|0),c[(c[S>>2]|0)+156>>2]|0)|0;S=c[u>>2]&3;u=(c[(c[(c[((S|0)==3?ha:K)+28>>2]|0)+8>>2]|0)+232>>2]|0)-m|0;m=(c[(c[(c[((S|0)==2?ha:j)+28>>2]|0)+8>>2]|0)+232>>2]|0)-n|0;c[(c[T>>2]|0)+232>>2]=((u|0)<(m|0)?u:m)-1;m=ga+1|0;u=c[M>>2]|0;T=c[(c[u+252>>2]|0)+(m<<2)>>2]|0;if((T|0)==0){fa=u;break}else{ga=m;ha=T}}}}while(0);N=c[fa+164>>2]|0;}while((N|0)!=0);ea=c[k>>2]|0}if((c[ea+172>>2]|0)>0){Sp(d);Tp(d);Up(d);Vp(d);ia=c[k>>2]|0}else{ia=ea}ea=c[ia+8>>2]|0;do{if((c[ea+84>>2]|0)==3){U=+h[ea+64>>3];_=+h[ea+72>>3];if(U*_<=1.0){break}Qp(d);ia=c[k>>2]|0;$=(c[ia+116>>2]&1|0)==0?U:_;Jp(c[ia+244>>2]|0,c[ia+248>>2]|0,$<65535.0?$:65535.0,1e3)|0}}while(0);ea=d|0;ia=ew(ea,87072)|0;if((ia|0)==0){ja=2147483647}else{$=+rF(ia);ja=~~($*+(Lw(d)|0))}do{if((ok(d,2,ja)|0)!=0){ia=c[k>>2]|0;N=b[ia+224>>1]|0;fa=b[ia+226>>1]|0;a:do{if(N<<16>>16<=fa<<16>>16){ha=N<<16>>16;ga=ia;M=fa;b:while(1){ba=c[ga+184>>2]|0;Q=c[ba+(ha*44|0)>>2]|0;c:do{if((Q|0)>0){H=c[ba+(ha*44|0)+4>>2]|0;T=0;do{ka=c[H+(T<<2)>>2]|0;m=c[ka+8>>2]|0;u=c[m+252>>2]|0;do{if((u|0)!=0){n=u;j=c[n>>2]|0;if((j|0)==0){break}else{la=0;ma=j}do{j=c[ma>>2]&3;if((c[(c[(c[((j|0)==2?ma:ma-32|0)+28>>2]|0)+8>>2]|0)+232>>2]|0)>(ha|0)){na=ga;oa=M;break c}la=la+1|0;if((c[(c[(c[((j|0)==3?ma:ma+32|0)+28>>2]|0)+8>>2]|0)+232>>2]|0)>(ha|0)){na=ga;oa=M;break c}ma=c[n+(la<<2)>>2]|0;}while((ma|0)!=0)}}while(0);u=c[m+244>>2]|0;do{if((u|0)!=0){n=u;j=c[n>>2]|0;if((j|0)==0){break}else{pa=0;qa=j}do{j=c[qa>>2]&3;if((c[(c[(c[((j|0)==3?qa:qa+32|0)+28>>2]|0)+8>>2]|0)+232>>2]|0)>(ha|0)){na=ga;oa=M;break c}pa=pa+1|0;if((c[(c[(c[((j|0)==2?qa:qa-32|0)+28>>2]|0)+8>>2]|0)+232>>2]|0)>(ha|0)){na=ga;oa=M;break c}qa=c[n+(pa<<2)>>2]|0;}while((qa|0)!=0)}}while(0);T=T+1|0;}while((T|0)<(Q|0));if((ka|0)==0){na=ga;oa=M;break}T=c[H>>2]|0;u=c[c[ba+((((ha|0)<(M<<16>>16|0)?1:-1)+ha|0)*44|0)+4>>2]>>2]|0;if((u|0)==0){break b}m=bp(d)|0;n=m+8|0;a[(c[n>>2]|0)+156|0]=2;Jp(m,T,0.0,0)|0;Jp(m,u,0.0,0)|0;m=c[(c[T+8>>2]|0)+232>>2]|0;T=c[(c[u+8>>2]|0)+232>>2]|0;c[(c[n>>2]|0)+232>>2]=(m|0)<(T|0)?m:T;T=c[k>>2]|0;na=T;oa=b[T+226>>1]|0}else{na=ga;oa=M}}while(0);if((ha|0)<(oa<<16>>16|0)){ha=ha+1|0;ga=na;M=oa}else{break a}}cc(82320,162848,111,170952)}}while(0);fa=ew(ea,87072)|0;if((fa|0)==0){ra=2147483647}else{$=+rF(fa);ra=~~($*+(Lw(d)|0))}if((ok(d,2,ra)|0)==0){break}cc(152680,162848,134,170744)}}while(0);ra=c[k>>2]|0;ea=c[ra+184>>2]|0;oa=b[ra+224>>1]|0;if(oa<<16>>16<=(b[ra+226>>1]|0)){na=oa<<16>>16;oa=ra;while(1){ra=ea+(na*44|0)|0;if((c[ra>>2]|0)>0){ka=ea+(na*44|0)+4|0;qa=na;pa=0;do{ma=(c[(c[ka>>2]|0)+(pa<<2)>>2]|0)+8|0;la=c[ma>>2]|0;h[la+16>>3]=+(c[la+232>>2]|0);c[(c[ma>>2]|0)+232>>2]=qa;pa=pa+1|0;}while((pa|0)<(c[ra>>2]|0));sa=c[k>>2]|0}else{sa=oa}if((na|0)<(b[sa+226>>1]|0)){na=na+1|0;oa=sa}else{break}}}Mp(d,d);sa=c[k>>2]|0;d:do{if((b[sa+226>>1]|0)>0){oa=c[sa+8>>2]|0;na=c[oa+84>>2]|0;if((na|0)==0){break}$=+h[sa+32>>3];ea=~~($- +h[sa+16>>3]);_=+h[sa+40>>3];ra=~~(_- +h[sa+24>>3]);pa=(c[sa+116>>2]&1|0)==0;qa=pa?ra:ea;ka=pa?ea:ra;do{if((na|0)==4){U=+h[oa+48>>3];Z=+h[oa+56>>3];if(U<.001|Z<.001){break d}P=+h[oa+32>>3];O=+h[oa+40>>3];V=U-P-P;P=Z-O-O;O=V/$;Z=P/_;if(!(O<1.0|Z<1.0)){break d}U=O<Z?O:Z;Z=U>.5?U:.5;U=P*+ca(_*Z/P)/_;h[oa+64>>3]=$*(V*+ca($*Z/V)/$);h[(c[(c[k>>2]|0)+8>>2]|0)+72>>3]=_*U;ra=c[k>>2]|0;ta=c[ra+8>>2]|0;ua=ra;va=122}else if((na|0)==2){ta=oa;ua=sa;va=122}else if((na|0)==5){U=+h[oa+64>>3];if(U<=0.0){break d}V=U/$;U=+h[oa+72>>3]/_;if(!(V>1.0&U>1.0)){break d}Z=V<U?V:U;wa=Z;xa=Z;ya=sa}else if((na|0)==1){Z=+h[oa+16>>3];U=+(qa|0)/+(ka|0);if(U<Z){wa=1.0;xa=Z/U;ya=sa;break}else{wa=U/Z;xa=1.0;ya=sa;break}}else{break d}}while(0);do{if((va|0)==122){_=+h[ta+64>>3];if(_<=0.0){break d}$=_/+(ka|0);_=+h[ta+72>>3]/+(qa|0);if(!($<1.0|_<1.0)){wa=$;xa=_;ya=ua;break}if($<_){wa=1.0;xa=_/$;ya=ua;break}else{wa=$/_;xa=1.0;ya=ua;break}}}while(0);qa=(c[ya+116>>2]&1|0)==0;_=qa?xa:wa;$=qa?wa:xa;qa=c[ya+180>>2]|0;if((qa|0)!=0){ka=qa;do{qa=ka+8|0;oa=(c[qa>>2]|0)+16|0;Z=$*+h[oa>>3];if(Z<0.0){za=Z+-.5}else{za=Z+.5}h[oa>>3]=+(~~za|0);oa=(c[qa>>2]|0)+24|0;Z=_*+h[oa>>3];if(Z<0.0){Aa=Z+-.5}else{Aa=Z+.5}h[oa>>3]=+(~~Aa|0);ka=c[(c[qa>>2]|0)+164>>2]|0;}while((ka|0)!=0)}Np(d,$,_)}}while(0);e:do{if((f|0)!=0){ya=c[k>>2]|0;Aa=+h[ya+32>>3]- +h[ya+16>>3];za=+h[ya+40>>3]- +h[ya+24>>3];xa=Aa/za;if((a[213992]|0)!=0){ya=c[o>>2]|0;gc(ya|0,131256,(aa=i,i=i+16|0,h[aa>>3]=xa,h[aa+8>>3]=Aa*za/1.0e4,aa)|0)|0;i=aa;ua=Nn(d)|0;gc(ya|0,116648,(aa=i,i=i+8|0,c[aa>>2]=ua,aa)|0)|0;i=aa}za=+h[f>>3];do{if(xa>za*1.1){c[f+24>>2]=~~(za*+((c[f+20>>2]|0)-(c[f+16>>2]|0)|0)/xa)}else{ua=f+24|0;if(xa>za*.8){c[ua>>2]=0;break}c[ua>>2]=-1;if((a[213992]|0)==0){break e}Ma(109280,34,1,c[o>>2]|0)|0}}while(0);if((a[213992]|0)==0){break}gc(c[o>>2]|0,103400,(aa=i,i=i+8|0,c[aa>>2]=c[f+24>>2],aa)|0)|0;i=aa}}while(0);aa=c[(c[k>>2]|0)+180>>2]|0;f:do{if((aa|0)!=0){f=aa;do{d=f+8|0;ua=c[d>>2]|0;ya=c[ua+180>>2]|0;ta=c[ya>>2]|0;if((ta|0)==0){Ba=ya;Ca=ua}else{ua=0;ya=ta;while(1){eF(c[ya+8>>2]|0);eF(ya|0);ta=ua+1|0;va=c[d>>2]|0;sa=c[va+180>>2]|0;ka=c[sa+(ta<<2)>>2]|0;if((ka|0)==0){Ba=sa;Ca=va;break}else{ua=ta;ya=ka}}}if((Ba|0)==0){Da=Ca}else{eF(Ba);Da=c[d>>2]|0}ya=c[Da+172>>2]|0;if((ya|0)==0){Ea=Da}else{eF(ya);Ea=c[d>>2]|0}ya=Ea+252|0;ua=Ea+180|0;ka=c[ya+4>>2]|0;c[ua>>2]=c[ya>>2];c[ua+4>>2]=ka;ka=c[d>>2]|0;ua=ka+244|0;ya=ka+172|0;ka=c[ua+4>>2]|0;c[ya>>2]=c[ua>>2];c[ya+4>>2]=ka;f=c[(c[d>>2]|0)+164>>2]|0;}while((f|0)!=0);f=c[(c[k>>2]|0)+180>>2]|0;if((f|0)==0){break}else{Fa=f;Ga=0}while(1){f=Ga+8|0;g:do{if((Ga|0)==0){ka=Fa;while(1){ya=ka+8|0;ua=c[ya>>2]|0;ta=c[ua+164>>2]|0;if((a[ua+156|0]|0)!=2){Ha=ka;Ia=ta;break g}c[(c[k>>2]|0)+180>>2]=ta;eF(c[ya>>2]|0);eF(ka);if((ta|0)==0){break f}else{ka=ta}}}else{ka=Fa;while(1){ta=ka+8|0;ya=c[ta>>2]|0;ua=c[ya+164>>2]|0;if((a[ya+156|0]|0)!=2){Ha=ka;Ia=ua;break g}c[(c[f>>2]|0)+164>>2]=ua;eF(c[ta>>2]|0);eF(ka);if((ua|0)==0){break f}else{ka=ua}}}}while(0);if((Ia|0)==0){break}else{Fa=Ia;Ga=Ha}}}}while(0);c[(c[(c[(c[k>>2]|0)+180>>2]|0)+8>>2]|0)+168>>2]=0;i=g;return}function Ip(d){d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0.0,t=0.0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0.0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0;e=d+8|0;f=c[e>>2]|0;g=c[f+184>>2]|0;i=b[f+224>>1]|0;if(i<<16>>16<=(b[f+226>>1]|0)){j=i<<16>>16;i=f;while(1){f=g+(j*44|0)|0;if((c[f>>2]|0)>0){k=g+(j*44|0)+4|0;l=g+(j*44|0)+28|0;m=g+(j*44|0)+20|0;n=g+(j*44|0)+24|0;o=g+(j*44|0)+16|0;p=0;do{q=(c[(c[k>>2]|0)+(p<<2)>>2]|0)+8|0;r=c[q>>2]|0;s=+h[r+80>>3];if(s<0.0){t=s+-.5}else{t=s+.5}u=(~~t+1|0)/2|0;v=c[r+204>>2]|0;do{if((v|0)==0){w=u}else{r=v;x=c[r>>2]|0;if((x|0)==0){w=u;break}else{y=u;z=0;A=x}while(1){x=c[A>>2]&3;do{if((c[((x|0)==3?A:A+32|0)+28>>2]|0)==(c[((x|0)==2?A:A-32|0)+28>>2]|0)){B=c[(c[A+8>>2]|0)+96>>2]|0;if((B|0)==0){C=y;break}s=+(y|0);D=+h[B+32>>3]*.5;C=~~(s>D?s:D)}else{C=y}}while(0);x=z+1|0;B=c[r+(x<<2)>>2]|0;if((B|0)==0){w=C;break}else{y=C;z=x;A=B}}}}while(0);if((c[l>>2]|0)<(w|0)){c[m>>2]=w;c[l>>2]=w}if((c[n>>2]|0)<(w|0)){c[o>>2]=w;c[n>>2]=w}u=c[q>>2]|0;v=c[u+212>>2]|0;do{if((v|0)!=0){if((v|0)==(d|0)){E=0;F=u}else{r=Em(v,c[53720]|0,8,0)|0;E=r;F=c[q>>2]|0}r=c[F+232>>2]|0;B=v+8|0;x=c[B>>2]|0;if((r|0)==(b[x+224>>1]|0)){G=x+124|0;H=c[G>>2]|0;I=E+w|0;c[G>>2]=(H|0)>(I|0)?H:I;J=c[(c[q>>2]|0)+232>>2]|0;K=c[B>>2]|0}else{J=r;K=x}if((J|0)!=(b[K+226>>1]|0)){break}x=c[K+120>>2]|0;r=E+w|0;c[K+120>>2]=(x|0)>(r|0)?x:r}}while(0);p=p+1|0;}while((p|0)<(c[f>>2]|0));L=c[e>>2]|0}else{L=i}if((j|0)<(b[L+226>>1]|0)){j=j+1|0;i=L}else{break}}}L=Op(d)|0;i=b[(c[e>>2]|0)+226>>1]|0;j=i<<16>>16;h[(c[(c[c[g+(j*44|0)+4>>2]>>2]|0)+8>>2]|0)+24>>3]=+(c[g+(j*44|0)+16>>2]|0);K=c[e>>2]|0;if(i<<16>>16>(b[K+224>>1]|0)){i=0;w=j;j=K;while(1){E=w-1|0;J=(c[g+(E*44|0)+24>>2]|0)+(c[g+(w*44|0)+28>>2]|0)+(c[j+240>>2]|0)|0;F=(c[g+(w*44|0)+20>>2]|0)+8+(c[g+(E*44|0)+16>>2]|0)|0;A=(J|0)>(F|0)?J:F;if((c[g+(E*44|0)>>2]|0)>0){h[(c[(c[c[g+(E*44|0)+4>>2]>>2]|0)+8>>2]|0)+24>>3]=+(A|0)+ +h[(c[(c[c[g+(w*44|0)+4>>2]>>2]|0)+8>>2]|0)+24>>3];M=c[e>>2]|0}else{M=j}F=(i|0)>(A|0)?i:A;if((E|0)>(b[M+224>>1]|0)){i=F;w=E;j=M}else{N=F;O=M;break}}}else{N=0;O=K}do{if((L|0)==0){P=N;Q=O}else{if((c[O+116>>2]&1|0)==0){P=N;Q=O;break}Pp(d,0);K=c[e>>2]|0;if((a[K+264|0]|0)==0){P=N;Q=K;break}M=b[K+226>>1]|0;j=M<<16>>16;w=b[K+224>>1]|0;if(M<<16>>16<=w<<16>>16){P=0;Q=K;break}M=w<<16>>16;w=~~+h[(c[(c[c[g+(j*44|0)+4>>2]>>2]|0)+8>>2]|0)+24>>3];i=0;F=j;while(1){j=F-1|0;E=~~+h[(c[(c[c[g+(j*44|0)+4>>2]>>2]|0)+8>>2]|0)+24>>3];A=E-w|0;J=(i|0)>(A|0)?i:A;if((j|0)>(M|0)){w=E;i=J;F=j}else{P=J;Q=K;break}}}}while(0);do{if((a[Q+264|0]|0)==0){R=Q}else{N=b[Q+226>>1]|0;if(N<<16>>16<=(b[Q+224>>1]|0)){R=Q;break}t=+(P|0);d=N<<16>>16;N=Q;while(1){O=d-1|0;if((c[g+(O*44|0)>>2]|0)>0){h[(c[(c[c[g+(O*44|0)+4>>2]>>2]|0)+8>>2]|0)+24>>3]=t+ +h[(c[(c[c[g+(d*44|0)+4>>2]>>2]|0)+8>>2]|0)+24>>3];S=c[e>>2]|0}else{S=N}if((O|0)>(b[S+224>>1]|0)){d=O;N=S}else{R=S;break}}}}while(0);S=c[R+180>>2]|0;if((S|0)==0){return}else{T=S}do{S=T+8|0;R=c[S>>2]|0;h[R+24>>3]=+h[(c[(c[c[g+((c[R+232>>2]|0)*44|0)+4>>2]>>2]|0)+8>>2]|0)+24>>3];T=c[(c[S>>2]|0)+164>>2]|0;}while((T|0)!=0);return}function Jp(a,d,e,f){a=a|0;d=d|0;e=+e;f=f|0;var g=0,j=0,k=0,l=0,m=0,n=0,o=0.0,p=0,q=0.0;g=i;j=jk(64)|0;k=j+32|0;l=k;c[l>>2]=c[l>>2]|3;l=j;m=j;c[m>>2]=c[m>>2]&-4|2;n=j+8|0;c[n>>2]=jk(176)|0;c[((c[m>>2]&3|0)==3?l:k)+28>>2]=a;c[((c[m>>2]&3|0)==2?l:j-32|0)+28>>2]=d;do{if(e>65535.0){Fv(1,92328,(d=i,i=i+16|0,h[d>>3]=e,c[d+8>>2]=65535,d)|0)|0;i=d;o=65535.0;p=4}else{if(e>=0.0){o=e;p=4;break}q=e+-.5}}while(0);if((p|0)==4){q=o+.5}b[(c[n>>2]|0)+170>>1]=~~q;c[(c[n>>2]|0)+156>>2]=f;Uo(l)|0;i=g;return l|0}function Kp(b,d){b=b|0;d=d|0;var e=0,f=0,g=0;e=c[b+8>>2]|0;b=a[e+84|0]|0;f=c[d+8>>2]|0;if(b<<24>>24!=(a[f+84|0]|0)){g=0;return g|0}do{if(+h[e+56>>3]==+h[f+56>>3]){if(+h[e+64>>3]==+h[f+64>>3]|b<<24>>24==0){break}else{g=0}return g|0}else{if(b<<24>>24==0){break}else{g=0}return g|0}}while(0);do{if(+h[e+16>>3]==+h[f+16>>3]){if(+h[e+24>>3]==+h[f+24>>3]){g=1}else{break}return g|0}}while(0);g=(a[e+44|0]|0)==0|0;return g|0}function Lp(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,i=0.0,j=0.0,k=0.0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0;d=b+8|0;e=c[d>>2]|0;if((c[e+216>>2]|0)<2){return}f=~~(+h[e+16>>3]- +h[e+88>>3]);g=~~+h[e+24>>3];e=b|0;vn(b,c[(c[(Hx(e)|0)+8>>2]|0)+116>>2]&1);i=+(g|0);h[(c[d>>2]|0)+24>>3]=i;j=+(f|0);f=c[d>>2]|0;h[f+16>>3]=j+ +h[f+88>>3];f=c[d>>2]|0;k=j+ +h[f+88>>3]+ +h[f+96>>3];f=~~(k+ +(c[(c[(Hx(e)|0)+8>>2]|0)+236>>2]|0));e=c[d>>2]|0;d=e+180|0;if((c[d+4>>2]|0)>0){g=c[c[d>>2]>>2]|0;d=c[e+236>>2]|0;l=pw(a,c[((c[g>>2]&3|0)==2?g:g-32|0)+28>>2]|0)|0;if((l|0)==0){return}g=f;m=l;l=d+1|0;while(1){d=(c[m>>2]&3|0)==2?m:m-32|0;n=d;o=d+32|0;p=c[((c[n>>2]&3|0)==3?d:o)+28>>2]|0;do{if((p|0)==(b|0)){q=l;r=g}else{if((Lm(p)|0)!=(b|0)){q=l;r=g;break}s=c[((c[n>>2]&3|0)==3?d:o)+28>>2]|0;t=s|0;u=Hx(t)|0;v=Lm(s)|0;if((v|0)!=(s|0)){$o(v,s)}w=s+8|0;c[(c[w>>2]|0)+236>>2]=l;c[(c[w>>2]|0)+232>>2]=c[(c[v+8>>2]|0)+232>>2];v=c[w>>2]|0;c[(c[(c[(c[u+8>>2]|0)+184>>2]|0)+((c[v+232>>2]|0)*44|0)+4>>2]|0)+(c[v+236>>2]<<2)>>2]=s;vn(s,c[(c[(Hx(t)|0)+8>>2]|0)+116>>2]&1);h[(c[w>>2]|0)+24>>3]=i;k=+(g|0);s=c[w>>2]|0;h[s+16>>3]=k+ +h[s+88>>3];s=c[w>>2]|0;j=k+ +h[s+88>>3]+ +h[s+96>>3];s=~~(j+ +(c[(c[(Hx(t)|0)+8>>2]|0)+236>>2]|0));fp(d);t=d-32|0;w=(c[(c[((c[n>>2]&3|0)==2?d:t)+28>>2]|0)+8>>2]|0)+172|0;v=c[w>>2]|0;if((v|0)==0){x=kk((c[w+4>>2]<<2)+8|0)|0}else{x=mk(v,(c[w+4>>2]<<2)+8|0)|0}c[(c[(c[((c[n>>2]&3|0)==2?d:t)+28>>2]|0)+8>>2]|0)+172>>2]=x;w=(c[(c[((c[n>>2]&3|0)==2?d:t)+28>>2]|0)+8>>2]|0)+176|0;v=c[w>>2]|0;c[w>>2]=v+1;c[(c[(c[(c[((c[n>>2]&3|0)==2?d:t)+28>>2]|0)+8>>2]|0)+172>>2]|0)+(v<<2)>>2]=d;v=(c[(c[((c[n>>2]&3|0)==2?d:t)+28>>2]|0)+8>>2]|0)+172|0;c[(c[v>>2]|0)+(c[v+4>>2]<<2)>>2]=0;q=l+1|0;r=s}}while(0);d=qw(a,m)|0;if((d|0)==0){break}else{g=r;m=d;l=q}}return}else{q=c[c[e+172>>2]>>2]|0;l=c[e+236>>2]|0;e=mw(a,c[((c[q>>2]&3|0)==3?q:q+32|0)+28>>2]|0)|0;if((e|0)==0){return}q=f;f=e;e=l+1|0;while(1){l=f;m=f-32|0;r=c[((c[l>>2]&3|0)==2?f:m)+28>>2]|0;do{if((r|0)==(b|0)){y=e;z=q}else{if((Lm(r)|0)!=(b|0)){y=e;z=q;break}g=c[((c[l>>2]&3|0)==2?f:m)+28>>2]|0;x=g|0;d=Hx(x)|0;n=Lm(g)|0;if((n|0)!=(g|0)){$o(n,g)}o=g+8|0;c[(c[o>>2]|0)+236>>2]=e;c[(c[o>>2]|0)+232>>2]=c[(c[n+8>>2]|0)+232>>2];n=c[o>>2]|0;c[(c[(c[(c[d+8>>2]|0)+184>>2]|0)+((c[n+232>>2]|0)*44|0)+4>>2]|0)+(c[n+236>>2]<<2)>>2]=g;vn(g,c[(c[(Hx(x)|0)+8>>2]|0)+116>>2]&1);h[(c[o>>2]|0)+24>>3]=i;j=+(q|0);g=c[o>>2]|0;h[g+16>>3]=j+ +h[g+88>>3];g=c[o>>2]|0;k=j+ +h[g+88>>3]+ +h[g+96>>3];g=~~(k+ +(c[(c[(Hx(x)|0)+8>>2]|0)+236>>2]|0));fp(f);x=f+32|0;o=(c[(c[((c[l>>2]&3|0)==3?f:x)+28>>2]|0)+8>>2]|0)+180|0;n=c[o>>2]|0;if((n|0)==0){A=kk((c[o+4>>2]<<2)+8|0)|0}else{A=mk(n,(c[o+4>>2]<<2)+8|0)|0}c[(c[(c[((c[l>>2]&3|0)==3?f:x)+28>>2]|0)+8>>2]|0)+180>>2]=A;o=(c[(c[((c[l>>2]&3|0)==3?f:x)+28>>2]|0)+8>>2]|0)+184|0;n=c[o>>2]|0;c[o>>2]=n+1;c[(c[(c[(c[((c[l>>2]&3|0)==3?f:x)+28>>2]|0)+8>>2]|0)+180>>2]|0)+(n<<2)>>2]=f;n=(c[(c[((c[l>>2]&3|0)==3?f:x)+28>>2]|0)+8>>2]|0)+180|0;c[(c[n>>2]|0)+(c[n+4>>2]<<2)>>2]=0;y=e+1|0;z=g}}while(0);l=ow(a,f)|0;if((l|0)==0){break}else{q=z;f=l;e=y}}return}}function Mp(d,e){d=d|0;e=e|0;var f=0,g=0,i=0,j=0,k=0.0,l=0.0,m=0,n=0,o=0.0,p=0.0,q=0,r=0,s=0.0,t=0.0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0.0,E=0.0,F=0,G=0.0,H=0.0,I=0,J=0,K=0.0,L=0.0;f=d+8|0;g=c[f>>2]|0;if((c[g+172>>2]|0)>=1){i=1;j=g;while(1){Mp(c[(c[j+176>>2]|0)+(i<<2)>>2]|0,e);g=c[f>>2]|0;if((i|0)<(c[g+172>>2]|0)){i=i+1|0;j=g}else{break}}}j=(Ix(d|0)|0)==(d|0);d=c[f>>2]|0;do{if(j){i=b[d+224>>1]|0;g=b[d+226>>1]|0;if(i<<16>>16>g<<16>>16){k=2147483647.0;l=-2147483647.0}else{m=g<<16>>16;n=c[d+184>>2]|0;o=2147483647.0;p=-2147483647.0;q=i<<16>>16;while(1){r=c[n+(q*44|0)>>2]|0;do{if((r|0)==0){s=p;t=o}else{u=c[n+(q*44|0)+4>>2]|0;v=c[u>>2]|0;if((v|0)==0){s=p;t=o;break}w=c[v+8>>2]|0;v=a[w+156|0]|0;if(v<<24>>24!=0&(r|0)>1){x=1;while(1){y=x+1|0;z=c[(c[u+(x<<2)>>2]|0)+8>>2]|0;A=a[z+156|0]|0;if(A<<24>>24!=0&(y|0)<(r|0)){x=y}else{B=z;C=A;break}}}else{B=w;C=v}if(C<<24>>24!=0){s=p;t=o;break}D=+(~~(+h[B+16>>3]- +h[B+88>>3])|0);E=o<D?o:D;x=c[(c[u+(r-1<<2)>>2]|0)+8>>2]|0;if((a[x+156|0]|0)==0){F=x}else{x=r-2|0;while(1){A=c[(c[u+(x<<2)>>2]|0)+8>>2]|0;if((a[A+156|0]|0)==0){F=A;break}else{x=x-1|0}}}D=+(~~(+h[F+16>>3]+ +h[F+96>>3])|0);s=p>D?p:D;t=E}}while(0);if((q|0)<(m|0)){o=t;p=s;q=q+1|0}else{k=t;l=s;break}}}q=c[d+172>>2]|0;if((q|0)<1){G=l;H=k;I=g;J=i;break}m=c[d+176>>2]|0;p=k;n=1;o=l;while(1){r=c[(c[m+(n<<2)>>2]|0)+8>>2]|0;D=+(~~(+h[r+16>>3]+-8.0)|0);K=p<D?p:D;D=+(~~(+h[r+32>>3]+8.0)|0);L=o>D?o:D;if((n|0)<(q|0)){p=K;n=n+1|0;o=L}else{G=L;H=K;I=g;J=i;break}}}else{G=+(c[(c[(c[d+248>>2]|0)+8>>2]|0)+232>>2]|0);H=+(c[(c[(c[d+244>>2]|0)+8>>2]|0)+232>>2]|0);I=b[d+226>>1]|0;J=b[d+224>>1]|0}}while(0);F=c[(c[e+8>>2]|0)+184>>2]|0;l=+h[(c[(c[c[F+((I<<16>>16)*44|0)+4>>2]>>2]|0)+8>>2]|0)+24>>3]- +(c[d+120>>2]|0);k=+h[(c[(c[c[F+((J<<16>>16)*44|0)+4>>2]>>2]|0)+8>>2]|0)+24>>3]+ +(c[d+124>>2]|0);h[d+16>>3]=H;h[d+24>>3]=l;d=c[f>>2]|0;h[d+32>>3]=G;h[d+40>>3]=k;return}function Np(a,b,d){a=a|0;b=+b;d=+d;var e=0,f=0,g=0,i=0;e=a+8|0;a=c[e>>2]|0;if((c[a+172>>2]|0)<1){f=a}else{g=1;i=a;while(1){Np(c[(c[i+176>>2]|0)+(g<<2)>>2]|0,b,d);a=c[e>>2]|0;if((g|0)<(c[a+172>>2]|0)){g=g+1|0;i=a}else{f=a;break}}}i=f+16|0;h[i>>3]=+h[i>>3]*b;i=(c[e>>2]|0)+24|0;h[i>>3]=+h[i>>3]*d;i=(c[e>>2]|0)+32|0;h[i>>3]=+h[i>>3]*b;i=(c[e>>2]|0)+40|0;h[i>>3]=+h[i>>3]*d;return}function Op(a){a=a|0;var d=0,e=0,f=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0;d=a|0;e=c[(c[(Ix(d)|0)+8>>2]|0)+184>>2]|0;if((Ix(d)|0)==(a|0)){f=8}else{f=Em(d,c[53720]|0,8,0)|0}g=a+8|0;i=c[g>>2]|0;j=c[i+120>>2]|0;k=c[i+124>>2]|0;if((c[i+172>>2]|0)<1){l=k;m=j;n=0}else{o=k;k=j;j=1;p=0;q=i;while(1){i=c[(c[q+176>>2]|0)+(j<<2)>>2]|0;r=Op(i)|0|p;s=c[i+8>>2]|0;i=c[g>>2]|0;if((b[s+226>>1]|0)==(b[i+226>>1]|0)){t=(c[s+120>>2]|0)+f|0;u=(k|0)>(t|0)?k:t}else{u=k}if((b[s+224>>1]|0)==(b[i+224>>1]|0)){t=(c[s+124>>2]|0)+f|0;v=(o|0)>(t|0)?o:t}else{v=o}if((j|0)<(c[i+172>>2]|0)){o=v;k=u;j=j+1|0;p=r;q=i}else{l=v;m=u;n=r;break}}}do{if((Ix(d)|0)==(a|0)){w=n;x=m;y=l}else{if((c[(c[g>>2]|0)+12>>2]|0)==0){w=n;x=m;y=l;break}if((c[(c[(Ix(d)|0)+8>>2]|0)+116>>2]&1|0)!=0){w=1;x=m;y=l;break}u=c[g>>2]|0;w=1;x=~~(+(m|0)+ +h[u+56>>3]);y=~~(+(l|0)+ +h[u+88>>3])}}while(0);c[(c[g>>2]|0)+120>>2]=x;c[(c[g>>2]|0)+124>>2]=y;if((Ix(d)|0)==(a|0)){return w|0}a=e+((b[(c[g>>2]|0)+224>>1]|0)*44|0)+20|0;d=c[a>>2]|0;c[a>>2]=(d|0)>(y|0)?d:y;y=e+((b[(c[g>>2]|0)+226>>1]|0)*44|0)+16|0;g=c[y>>2]|0;c[y>>2]=(g|0)>(x|0)?g:x;return w|0}function Pp(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0.0,x=0.0,y=0,z=0,A=0,B=0,C=0;e=a|0;f=c[(c[(Ix(e)|0)+8>>2]|0)+184>>2]|0;if((Ix(e)|0)==(a|0)){g=0}else{g=Em(e,c[53720]|0,8,0)|0}i=a+8|0;j=c[i>>2]|0;k=c[j+120>>2]|0;l=c[j+124>>2]|0;if((c[j+172>>2]|0)<1){m=k;n=l;o=j}else{p=g+d|0;q=k;k=l;l=1;r=j;while(1){j=c[(c[r+176>>2]|0)+(l<<2)>>2]|0;Pp(j,p);s=c[j+8>>2]|0;j=c[i>>2]|0;if((b[s+226>>1]|0)==(b[j+226>>1]|0)){t=(c[s+120>>2]|0)+g|0;u=(q|0)>(t|0)?q:t}else{u=q}if((b[s+224>>1]|0)==(b[j+224>>1]|0)){t=(c[s+124>>2]|0)+g|0;v=(k|0)>(t|0)?k:t}else{v=k}if((l|0)<(c[j+172>>2]|0)){q=u;k=v;l=l+1|0;r=j}else{m=u;n=v;o=j;break}}}c[o+120>>2]=m;c[(c[i>>2]|0)+124>>2]=n;do{if((Ix(e)|0)!=(a|0)){o=c[i>>2]|0;if((c[o+12>>2]|0)==0){break}w=+h[o+104>>3];x=+h[o+72>>3];v=~~(w>x?w:x)-(n+m)-~~(+h[(c[(c[c[f+((b[o+224>>1]|0)*44|0)+4>>2]>>2]|0)+8>>2]|0)+24>>3]- +h[(c[(c[c[f+((b[o+226>>1]|0)*44|0)+4>>2]>>2]|0)+8>>2]|0)+24>>3])|0;if((v|0)<=0){break}o=(Ix(e)|0)+8|0;u=c[(c[o>>2]|0)+184>>2]|0;r=c[i>>2]|0;l=b[r+226>>1]|0;k=l<<16>>16;q=b[r+224>>1]|0;g=q<<16>>16;p=(v+1|0)/2|0;j=(c[r+120>>2]|0)+p+(d-(c[u+(k*44|0)+16>>2]|0))|0;if((j|0)>0){if(l<<16>>16<q<<16>>16){y=r}else{x=+(j|0);l=k;while(1){if((c[u+(l*44|0)>>2]|0)>0){k=(c[(c[c[u+(l*44|0)+4>>2]>>2]|0)+8>>2]|0)+24|0;h[k>>3]=x+ +h[k>>3]}if((l|0)>(g|0)){l=l-1|0}else{break}}y=c[i>>2]|0}z=v+d-p+j+(c[y+124>>2]|0)-(c[u+(g*44|0)+20>>2]|0)|0;A=y}else{z=v+d-p+(c[r+124>>2]|0)-(c[u+(g*44|0)+20>>2]|0)|0;A=r}do{if((z|0)>0){l=c[o>>2]|0;if(q<<16>>16<=(b[l+224>>1]|0)){B=A;break}x=+(z|0);k=g;t=l;while(1){l=k-1|0;if((c[u+(l*44|0)>>2]|0)>0){s=(c[(c[c[u+(l*44|0)+4>>2]>>2]|0)+8>>2]|0)+24|0;h[s>>3]=x+ +h[s>>3];C=c[o>>2]|0}else{C=t}if((l|0)>(b[C+224>>1]|0)){k=l;t=C}else{break}}B=c[i>>2]|0}else{B=A}}while(0);o=B+124|0;c[o>>2]=v-p+(c[o>>2]|0);o=(c[i>>2]|0)+120|0;c[o>>2]=(c[o>>2]|0)+p}}while(0);if((Ix(e)|0)==(a|0)){return}a=c[i>>2]|0;e=f+((b[a+224>>1]|0)*44|0)+20|0;B=c[e>>2]|0;A=c[a+124>>2]|0;c[e>>2]=(B|0)>(A|0)?B:A;A=c[i>>2]|0;i=f+((b[A+226>>1]|0)*44|0)+16|0;f=c[i>>2]|0;B=c[A+120>>2]|0;c[i>>2]=(f|0)>(B|0)?f:B;return}function Qp(a){a=a|0;var d=0,e=0,f=0,g=0,j=0,k=0,l=0,m=0.0,n=0,o=0,p=0;d=i;e=a|0;f=Em(e,c[53720]|0,8,0)|0;Rp(a);g=a+8|0;a=c[g>>2]|0;j=c[a+244>>2]|0;k=c[a+248>>2]|0;l=b[a+224>>1]|0;if(l<<16>>16>(b[a+226>>1]|0)){i=d;return}m=+(f|0);f=l<<16>>16;l=a;while(1){a=c[l+184>>2]|0;do{if((c[a+(f*44|0)>>2]|0)!=0){n=c[c[a+(f*44|0)+4>>2]>>2]|0;if((n|0)==0){o=$w(e)|0;Fv(1,97888,(p=i,i=i+16|0,c[p>>2]=o,c[p+8>>2]=f,p)|0)|0;i=p;break}else{Jp(j,n,m+ +h[(c[n+8>>2]|0)+88>>3]+ +h[l+96>>3],0)|0;n=c[g>>2]|0;p=c[n+184>>2]|0;o=c[(c[p+(f*44|0)+4>>2]|0)+((c[p+(f*44|0)>>2]|0)-1<<2)>>2]|0;Jp(o,k,m+ +h[(c[o+8>>2]|0)+96>>3]+ +h[n+64>>3],0)|0;break}}}while(0);a=c[g>>2]|0;if((f|0)<(b[a+226>>1]|0)){f=f+1|0;l=a}else{break}}i=d;return}function Rp(b){b=b|0;var d=0,e=0,f=0,g=0,i=0,j=0.0,k=0.0;d=b+8|0;if((c[(c[d>>2]|0)+244>>2]|0)!=0){return}e=b|0;f=bp(Ix(e)|0)|0;a[(c[f+8>>2]|0)+156|0]=2;g=bp(Ix(e)|0)|0;a[(c[g+8>>2]|0)+156|0]=2;do{if((c[(c[d>>2]|0)+12>>2]|0)!=0){if((Ix(e)|0)==(b|0)){break}if((c[(c[(Ix(e)|0)+8>>2]|0)+116>>2]&1|0)!=0){break}i=c[d>>2]|0;j=+h[i+48>>3];k=+h[i+80>>3];Jp(f,g,+(~~(j>k?j:k)|0),0)|0}}while(0);c[(c[d>>2]|0)+244>>2]=f;c[(c[d>>2]|0)+248>>2]=g;return}function Sp(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0;do{if((Ix(a|0)|0)==(a|0)){b=a+8|0}else{Qp(a);d=a+8|0;e=c[d>>2]|0;f=So(c[e+244>>2]|0,c[e+248>>2]|0)|0;if((f|0)==0){e=c[d>>2]|0;Jp(c[e+244>>2]|0,c[e+248>>2]|0,1.0,128)|0;b=d;break}else{e=(c[f+8>>2]|0)+156|0;c[e>>2]=(c[e>>2]|0)+128;b=d;break}}}while(0);a=c[b>>2]|0;if((c[a+172>>2]|0)<1){return}else{g=1;h=a}while(1){Sp(c[(c[h+176>>2]|0)+(g<<2)>>2]|0);a=c[b>>2]|0;if((g|0)<(c[a+172>>2]|0)){g=g+1|0;h=a}else{break}}return}function Tp(d){d=d|0;var e=0,f=0,g=0,i=0,j=0,k=0,l=0.0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0;e=d|0;f=Em(e,c[53720]|0,8,0)|0;g=d+8|0;i=c[g>>2]|0;j=b[i+224>>1]|0;if(j<<16>>16>(b[i+226>>1]|0)){k=i}else{l=+(f|0);f=j<<16>>16;j=i;while(1){i=c[j+184>>2]|0;a:do{if((c[i+(f*44|0)>>2]|0)!=0){m=c[c[i+(f*44|0)+4>>2]>>2]|0;if((m|0)==0){break}n=m+8|0;m=c[(c[n>>2]|0)+236>>2]|0;b:do{if((m|0)>0){o=m;c:while(1){o=o-1|0;p=c[(c[(c[(c[(Ix(e)|0)+8>>2]|0)+184>>2]|0)+(f*44|0)+4>>2]|0)+(o<<2)>>2]|0;q=p+8|0;r=c[q>>2]|0;s=a[r+156|0]|0;do{if((s<<24>>24|0)==1){t=c[c[r+252>>2]>>2]|0;u=c[(c[t+8>>2]|0)+116>>2]|0;if((u|0)==0){v=t}else{t=u;while(1){u=c[(c[t+8>>2]|0)+116>>2]|0;if((u|0)==0){break}else{t=u}}v=t}u=v;if((Rx(d,c[((c[u>>2]&3|0)==3?v:v+32|0)+28>>2]|0)|0)!=0){break}if((Rx(d,c[((c[u>>2]&3|0)==2?v:v-32|0)+28>>2]|0)|0)==0){w=14;break c}}else if((s<<24>>24|0)==0){x=r;break c}}while(0);if((o|0)<=0){break b}}if((w|0)==14){w=0;x=c[q>>2]|0}Jp(p,c[(c[g>>2]|0)+244>>2]|0,l+ +h[x+96>>3],0)|0}}while(0);m=(c[(c[(c[g>>2]|0)+184>>2]|0)+(f*44|0)>>2]|0)+(c[(c[n>>2]|0)+236>>2]|0)|0;if((m|0)<(c[(c[(c[(Ix(e)|0)+8>>2]|0)+184>>2]|0)+(f*44|0)>>2]|0)){y=m}else{break}d:while(1){z=c[(c[(c[(c[(Ix(e)|0)+8>>2]|0)+184>>2]|0)+(f*44|0)+4>>2]|0)+(y<<2)>>2]|0;A=z+8|0;m=c[A>>2]|0;o=a[m+156|0]|0;do{if((o<<24>>24|0)==1){r=c[c[m+252>>2]>>2]|0;s=c[(c[r+8>>2]|0)+116>>2]|0;if((s|0)==0){B=r}else{r=s;while(1){s=c[(c[r+8>>2]|0)+116>>2]|0;if((s|0)==0){break}else{r=s}}B=r}s=B;if((Rx(d,c[((c[s>>2]&3|0)==3?B:B+32|0)+28>>2]|0)|0)!=0){break}if((Rx(d,c[((c[s>>2]&3|0)==2?B:B-32|0)+28>>2]|0)|0)==0){w=23;break d}}else if((o<<24>>24|0)==0){C=m;break d}}while(0);y=y+1|0;if((y|0)>=(c[(c[(c[(Ix(e)|0)+8>>2]|0)+184>>2]|0)+(f*44|0)>>2]|0)){break a}}if((w|0)==23){w=0;C=c[A>>2]|0}Jp(c[(c[g>>2]|0)+248>>2]|0,z,l+ +h[C+88>>3],0)|0}}while(0);i=c[g>>2]|0;if((f|0)<(b[i+226>>1]|0)){f=f+1|0;j=i}else{k=i;break}}}if((c[k+172>>2]|0)<1){return}else{D=1;E=k}while(1){Tp(c[(c[E+176>>2]|0)+(D<<2)>>2]|0);k=c[g>>2]|0;if((D|0)<(c[k+172>>2]|0)){D=D+1|0;E=k}else{break}}return}function Up(a){a=a|0;var b=0,d=0,e=0.0,f=0,g=0,i=0;b=Em(a|0,c[53720]|0,8,0)|0;Rp(a);d=a+8|0;a=c[d>>2]|0;if((c[a+172>>2]|0)<1){return}e=+(b|0);b=1;f=a;while(1){a=c[(c[f+176>>2]|0)+(b<<2)>>2]|0;Rp(a);g=c[d>>2]|0;i=a+8|0;Jp(c[g+244>>2]|0,c[(c[i>>2]|0)+244>>2]|0,e+ +h[g+96>>3],0)|0;g=c[d>>2]|0;Jp(c[(c[i>>2]|0)+248>>2]|0,c[g+248>>2]|0,e+ +h[g+64>>3],0)|0;Up(a);a=c[d>>2]|0;if((b|0)<(c[a+172>>2]|0)){b=b+1|0;f=a}else{break}}return}function Vp(a){a=a|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0.0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;d=Em(a|0,c[53720]|0,8,0)|0;e=a+8|0;a=c[e>>2]|0;if((c[a+172>>2]|0)<1){return}else{f=1;g=a}while(1){Rp(c[(c[g+176>>2]|0)+(f<<2)>>2]|0);h=c[e>>2]|0;i=c[h+172>>2]|0;if((f|0)<(i|0)){f=f+1|0;g=h}else{break}}if((i|0)<1){return}j=+(d|0);d=1;g=h;h=i;while(1){i=d+1|0;f=c[g+176>>2]|0;a=c[f+(d<<2)>>2]|0;if((d|0)<(h|0)){k=i;l=f;f=a;m=g;while(1){n=c[l+(k<<2)>>2]|0;o=(b[(c[f+8>>2]|0)+224>>1]|0)>(b[(c[n+8>>2]|0)+224>>1]|0);p=o?n:f;q=o?f:n;n=c[p+8>>2]|0;o=c[q+8>>2]|0;r=b[o+224>>1]|0;s=r<<16>>16;if((b[n+226>>1]|0)<r<<16>>16){t=m}else{r=(c[(c[(c[c[(c[n+184>>2]|0)+(s*44|0)+4>>2]>>2]|0)+8>>2]|0)+236>>2]|0)<(c[(c[(c[c[(c[o+184>>2]|0)+(s*44|0)+4>>2]>>2]|0)+8>>2]|0)+236>>2]|0);Jp(c[(c[(r?p:q)+8>>2]|0)+248>>2]|0,c[(c[(r?q:p)+8>>2]|0)+244>>2]|0,j,0)|0;t=c[e>>2]|0}p=c[t+176>>2]|0;q=c[p+(d<<2)>>2]|0;if((k|0)<(c[t+172>>2]|0)){k=k+1|0;l=p;f=q;m=t}else{u=q;break}}}else{u=a}Vp(u);m=c[e>>2]|0;f=c[m+172>>2]|0;if((d|0)<(f|0)){d=i;g=m;h=f}else{break}}return}function Wp(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0;if((a|0)==(b|0)){d=1;return d|0}e=c[(c[a+8>>2]|0)+180>>2]|0;a=c[e>>2]|0;if((a|0)==0){d=0;return d|0}else{f=0;g=a}while(1){a=f+1|0;if((Wp(c[((c[g>>2]&3|0)==2?g:g-32|0)+28>>2]|0,b)|0)!=0){d=1;h=5;break}i=c[e+(a<<2)>>2]|0;if((i|0)==0){d=0;h=5;break}else{f=a;g=i}}if((h|0)==5){return d|0}return 0}function Xp(a){a=a|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0;d=a+8|0;b[(c[d>>2]|0)+224>>1]=32767;b[(c[d>>2]|0)+226>>1]=-1;e=ux(a)|0;f=c[d>>2]|0;if((e|0)==0){g=0;h=f;i=h+252|0;j=g;c[i>>2]=j;return}else{k=e;l=0;m=f}while(1){f=m+226|0;e=k+8|0;n=c[(c[e>>2]|0)+232>>2]|0;if((b[f>>1]|0)<(n|0)){b[f>>1]=n;o=c[d>>2]|0;p=c[(c[e>>2]|0)+232>>2]|0}else{o=m;p=n}n=o+224|0;if((b[n>>1]|0)>(p|0)){b[n>>1]=p}if((l|0)==0){q=k}else{q=(c[(c[e>>2]|0)+232>>2]|0)<(c[(c[l+8>>2]|0)+232>>2]|0)?k:l}e=vx(a,k)|0;n=c[d>>2]|0;if((e|0)==0){g=q;h=n;break}else{k=e;l=q;m=n}}i=h+252|0;j=g;c[i>>2]=j;return}function Yp(a){a=a|0;var b=0,d=0,e=0.0,f=0,g=0,h=0,i=0,j=0;b=ew(a|0,147792)|0;if((b|0)==0){d=2147483647}else{e=+rF(b);d=~~(e*+(Lw(a)|0))}b=a+8|0;f=c[b>>2]|0;g=f+204|0;if((c[g+4>>2]|0)>0){h=0;i=f;j=g}else{return}do{c[i+180>>2]=c[(c[j>>2]|0)+(h<<2)>>2];ok(a,(c[(c[b>>2]|0)+172>>2]|0)==0|0,d)|0;h=h+1|0;i=c[b>>2]|0;j=i+204|0;}while((h|0)<(c[j+4>>2]|0));return}function Zp(d,e){d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,p=0,q=0.0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,da=0;f=i;i=i+104|0;g=f|0;h=d|0;if((ew(h,162288)|0)==0){_p(d,e)}else{j=d+8|0;k=(c[j>>2]|0)+128|0;b[k>>1]=b[k>>1]|16;c[53670]=0;k=Hw(109200,173936,0)|0;Wx(k|0,103336,272,1)|0;Px(k,19768,21560);if((a[(c[j>>2]|0)+113|0]&1)!=0){l=ux(d)|0;if((l|0)!=0){m=l;do{l=mw(d,m)|0;if((l|0)!=0){n=l;do{l=(c[n+8>>2]|0)+170|0;b[l>>1]=b[l>>1]<<1;n=ow(d,n)|0;}while((n|0)!=0)}m=vx(d,m)|0;}while((m|0)!=0)}m=(c[j>>2]|0)+240|0;c[m>>2]=((c[m>>2]|0)+1|0)/2|0}m=ew(h,147792)|0;if((m|0)==0){p=2147483647}else{q=+rF(m);p=~~(q*+(Lw(d)|0))}aq(d,0);c[53670]=0;m=ux(d)|0;if((m|0)!=0){n=k+8|0;l=m;do{if((cq(l)|0)==(l|0)){m=Ax(k,$w(l|0)|0,1)|0;r=m+8|0;c[(c[r>>2]|0)+176>>2]=0;s=jk(20)|0;c[(c[r>>2]|0)+172>>2]=s;c[(c[r>>2]|0)+184>>2]=0;s=jk(20)|0;c[(c[r>>2]|0)+180>>2]=s;s=c[53670]|0;t=(c[r>>2]|0)+168|0;if((s|0)==0){c[t>>2]=0;c[(c[n>>2]|0)+180>>2]=m}else{c[t>>2]=s;c[(c[(c[53670]|0)+8>>2]|0)+164>>2]=m}c[53670]=m;c[(c[r>>2]|0)+164>>2]=0;c[(c[l+8>>2]|0)+148>>2]=m}l=vx(d,l)|0;}while((l|0)!=0)}l=ux(d)|0;if((l|0)!=0){n=l;do{l=n+8|0;if((c[(c[l>>2]|0)+148>>2]|0)==0){m=c[(c[(cq(n)|0)+8>>2]|0)+148>>2]|0;c[(c[l>>2]|0)+148>>2]=m}n=vx(d,n)|0;}while((n|0)!=0)}n=ux(d)|0;if((n|0)!=0){m=g|0;g=k+8|0;l=n;do{n=c[(c[l+8>>2]|0)+148>>2]|0;r=mw(d,l)|0;if((r|0)!=0){s=n;n=r;while(1){r=c[53812]|0;do{if((r|0)==0){u=30}else{t=fw(n|0,r)|0;if((t|0)==0){u=30;break}if((a[t]|0)==0){u=30;break}if((Km(t)|0)<<24>>24==0){v=s}else{u=30}}}while(0);a:do{if((u|0)==30){u=0;r=n;t=n-32|0;w=c[(c[(cq(c[((c[r>>2]&3|0)==2?n:t)+28>>2]|0)|0)+8>>2]|0)+148>>2]|0;if((s|0)==(w|0)){v=s;break}x=c[r>>2]&3;y=n+32|0;z=c[((x|0)==3?n:y)+28>>2]|0;A=c[(c[z+8>>2]|0)+212>>2]|0;B=c[(c[(c[((x|0)==2?n:t)+28>>2]|0)+8>>2]|0)+212>>2]|0;x=B;C=A;do{if((A|0)!=(B|0)){D=C;E=x;b:while(1){F=c[D+8>>2]|0;G=c[F+192>>2]|0;H=E;while(1){I=c[H+8>>2]|0;if((G|0)>=(c[I+192>>2]|0)){break}J=c[I+188>>2]|0;if((D|0)==(J|0)){K=D;break b}else{H=J}}G=c[F+188>>2]|0;if((G|0)==(H|0)){K=H;break}else{D=G;E=H}}if((K|0)==(C|0)|(K|0)==(x|0)){break}do{if((Vm(ew(A,168304)|0,0)|0)<<24>>24==0){if((Vm(ew(B,168304)|0,0)|0)<<24>>24!=0){break}gq(k,s,w,n);v=s;break a}}while(0);E=pw(k,s)|0;if((E|0)!=0){D=E;do{E=mw(k,c[((c[D>>2]&3|0)==3?D:D+32|0)+28>>2]|0)|0;if((E|0)!=0){if((c[((c[E>>2]&3|0)==2?E:E-32|0)+28>>2]|0)==(w|0)){v=s;break a}}D=qw(k,D)|0;}while((D|0)!=0)}D=c[43648]|0;c[43648]=D+1;nb(m|0,164168,(L=i,i=i+8|0,c[L>>2]=D,L)|0)|0;i=L;D=Ax(k,m,1)|0;E=D+8|0;c[(c[E>>2]|0)+176>>2]=0;G=jk(20)|0;c[(c[E>>2]|0)+172>>2]=G;c[(c[E>>2]|0)+184>>2]=0;G=jk(20)|0;c[(c[E>>2]|0)+180>>2]=G;G=c[53670]|0;J=(c[E>>2]|0)+168|0;if((G|0)==0){c[J>>2]=0;c[(c[g>>2]|0)+180>>2]=D}else{c[J>>2]=G;c[(c[(c[53670]|0)+8>>2]|0)+164>>2]=D}c[53670]=D;c[(c[E>>2]|0)+164>>2]=0;E=uw(k,D,s,0,1)|0;G=uw(k,D,w,0,1)|0;D=n+8|0;J=(c[E+8>>2]|0)+156|0;c[J>>2]=(c[J>>2]|0)+((c[(c[D>>2]|0)+156>>2]|0)*1e3|0);J=G+8|0;G=(c[J>>2]|0)+170|0;E=b[G>>1]|0;I=b[(c[D>>2]|0)+170>>1]|0;b[G>>1]=(E&65535)>>>0>(I&65535)>>>0?E:I;I=(c[J>>2]|0)+156|0;c[I>>2]=(c[I>>2]|0)+(c[(c[D>>2]|0)+156>>2]|0);v=s;break a}}while(0);B=cq(z)|0;A=c[r>>2]&3;if((B|0)==(c[(c[(c[(c[(c[((A|0)==3?n:y)+28>>2]|0)+8>>2]|0)+212>>2]|0)+8>>2]|0)+200>>2]|0)){u=39}else{B=cq(c[((A|0)==2?n:t)+28>>2]|0)|0;if((B|0)==(c[(c[(c[(c[(c[((c[r>>2]&3|0)==2?n:t)+28>>2]|0)+8>>2]|0)+212>>2]|0)+8>>2]|0)+196>>2]|0)){u=39}else{M=s;N=w}}if((u|0)==39){u=0;M=w;N=s}gq(k,M,N,n);v=M}}while(0);B=ow(d,n)|0;if((B|0)==0){break}else{s=v;n=B}}}l=vx(d,l)|0;}while((l|0)!=0)}bq(d,k,0,0);l=ux(k)|0;if((l|0)!=0){v=l;do{l=v+8|0;a[(c[l>>2]|0)+158|0]=0;a[(c[l>>2]|0)+157|0]=0;v=vx(k,v)|0;}while((v|0)!=0)}v=ux(k)|0;if((v|0)!=0){l=v;do{fq(k,l);l=vx(k,l)|0;}while((l|0)!=0)}l=ux(k)|0;if((l|0)!=0){v=l;do{c[(c[v+8>>2]|0)+128>>2]=0;v=vx(k,v)|0;}while((v|0)!=0)}v=ux(k)|0;do{if((v|0)==0){O=0}else{l=v;M=0;while(1){if((c[(c[l+8>>2]|0)+128>>2]|0)==0){N=M+1|0;eq(k,l,N);P=N}else{P=M}N=vx(k,l)|0;if((N|0)==0){break}else{l=N;M=P}}if((P|0)<=1){O=P;break}M=Ax(k,92264,1)|0;l=M+8|0;c[(c[l>>2]|0)+176>>2]=0;N=jk(20)|0;c[(c[l>>2]|0)+172>>2]=N;c[(c[l>>2]|0)+184>>2]=0;N=jk(20)|0;c[(c[l>>2]|0)+180>>2]=N;N=c[53670]|0;u=(c[l>>2]|0)+168|0;if((N|0)==0){c[u>>2]=0;c[(c[k+8>>2]|0)+180>>2]=M}else{c[u>>2]=N;c[(c[(c[53670]|0)+8>>2]|0)+164>>2]=M}c[53670]=M;c[(c[l>>2]|0)+164>>2]=0;l=ux(k)|0;if((l|0)==0){O=P;break}else{Q=l;R=1}while(1){if((c[(c[Q+8>>2]|0)+128>>2]|0)==(R|0)){uw(k,M,Q,0,1)|0;S=R+1|0}else{S=R}l=vx(k,Q)|0;if((l|0)==0){O=P;break}else{Q=l;R=S}}}}while(0);S=ux(k)|0;if((S|0)!=0){R=S;do{S=mw(k,R)|0;if((S|0)!=0){Q=R+8|0;P=S;do{S=(c[Q>>2]|0)+180|0;v=c[S>>2]|0;if((v|0)==0){T=kk((c[S+4>>2]<<2)+8|0)|0}else{T=mk(v,(c[S+4>>2]<<2)+8|0)|0}c[(c[Q>>2]|0)+180>>2]=T;S=(c[Q>>2]|0)+184|0;v=c[S>>2]|0;c[S>>2]=v+1;c[(c[(c[Q>>2]|0)+180>>2]|0)+(v<<2)>>2]=P;v=(c[Q>>2]|0)+180|0;c[(c[v>>2]|0)+(c[v+4>>2]<<2)>>2]=0;v=P;S=P-32|0;M=(c[(c[((c[v>>2]&3|0)==2?P:S)+28>>2]|0)+8>>2]|0)+172|0;l=c[M>>2]|0;if((l|0)==0){U=kk((c[M+4>>2]<<2)+8|0)|0}else{U=mk(l,(c[M+4>>2]<<2)+8|0)|0}c[(c[(c[((c[v>>2]&3|0)==2?P:S)+28>>2]|0)+8>>2]|0)+172>>2]=U;M=(c[(c[((c[v>>2]&3|0)==2?P:S)+28>>2]|0)+8>>2]|0)+176|0;l=c[M>>2]|0;c[M>>2]=l+1;c[(c[(c[(c[((c[v>>2]&3|0)==2?P:S)+28>>2]|0)+8>>2]|0)+172>>2]|0)+(l<<2)>>2]=P;l=(c[(c[((c[v>>2]&3|0)==2?P:S)+28>>2]|0)+8>>2]|0)+172|0;c[(c[l>>2]|0)+(c[l+4>>2]<<2)>>2]=0;P=ow(k,P)|0;}while((P|0)!=0)}R=vx(k,R)|0;}while((R|0)!=0)}if((e|0)!=0){Rn(k);On(k)}e=ew(h,97800)|0;if((e|0)==0){V=-1}else{V=Rb(e|0)|0}nk(k,1,p,V)|0;b[(c[j>>2]|0)+224>>1]=32767;b[(c[j>>2]|0)+226>>1]=-1;if((O|0)>1){V=jk((O<<2)+4|0)|0;p=1;while(1){c[V+(p<<2)>>2]=32767;if((p|0)<(O|0)){p=p+1|0}else{W=V;break}}}else{W=0}V=ux(d)|0;if((V|0)!=0){if((W|0)==0){p=V;do{O=c[(c[(c[(c[(cq(p)|0)+8>>2]|0)+148>>2]|0)+8>>2]|0)+232>>2]|0;e=p+8|0;c[(c[e>>2]|0)+232>>2]=O;O=c[j>>2]|0;h=O+226|0;R=c[(c[e>>2]|0)+232>>2]|0;if((b[h>>1]|0)<(R|0)){b[h>>1]=R;X=c[j>>2]|0;Y=c[(c[e>>2]|0)+232>>2]|0}else{X=O;Y=R}R=X+224|0;if((b[R>>1]|0)>(Y|0)){b[R>>1]=Y}p=vx(d,p)|0;}while((p|0)!=0)}else{p=V;do{V=(c[(c[(cq(p)|0)+8>>2]|0)+148>>2]|0)+8|0;Y=p+8|0;c[(c[Y>>2]|0)+232>>2]=c[(c[V>>2]|0)+232>>2];X=c[j>>2]|0;R=X+226|0;O=c[Y>>2]|0;e=c[O+232>>2]|0;if((b[R>>1]|0)<(e|0)){b[R>>1]=e;R=c[Y>>2]|0;Z=c[j>>2]|0;_=c[R+232>>2]|0;$=R}else{Z=X;_=e;$=O}O=Z+224|0;if((b[O>>1]|0)>(_|0)){b[O>>1]=_;aa=c[Y>>2]|0}else{aa=$}c[aa+128>>2]=c[(c[V>>2]|0)+128>>2];V=c[Y>>2]|0;Y=W+(c[V+128>>2]<<2)|0;O=c[Y>>2]|0;e=c[V+232>>2]|0;c[Y>>2]=(O|0)<(e|0)?O:e;p=vx(d,p)|0;}while((p|0)!=0)}}p=(W|0)!=0;do{if(p){aa=ux(d)|0;if((aa|0)==0){ba=1;break}else{ca=aa}while(1){aa=c[ca+8>>2]|0;$=aa+232|0;c[$>>2]=(c[$>>2]|0)-(c[W+(c[aa+128>>2]<<2)>>2]|0);aa=vx(d,ca)|0;if((aa|0)==0){ba=1;break}else{ca=aa}}}else{aa=b[(c[j>>2]|0)+224>>1]|0;$=aa<<16>>16;if(aa<<16>>16<=0){ba=0;break}_=ux(d)|0;if((_|0)!=0){Z=_;do{_=(c[Z+8>>2]|0)+232|0;c[_>>2]=(c[_>>2]|0)-$;Z=vx(d,Z)|0;}while((Z|0)!=0)}Z=(c[j>>2]|0)+224|0;b[Z>>1]=(b[Z>>1]|0)-aa;Z=(c[j>>2]|0)+226|0;b[Z>>1]=(b[Z>>1]|0)-aa;ba=0}}while(0);dq(d,ba);ba=ux(k)|0;if((ba|0)!=0){j=ba;do{ba=j+8|0;ca=c[ba>>2]|0;Z=c[ca+172>>2]|0;if((Z|0)==0){da=ca}else{eF(Z);da=c[ba>>2]|0}ba=c[da+180>>2]|0;if((ba|0)!=0){eF(ba)}j=vx(k,j)|0;}while((j|0)!=0)}eF(c[(c[(ux(d)|0)+8>>2]|0)+112>>2]|0);j=ux(d)|0;if((j|0)!=0){da=j;do{c[(c[da+8>>2]|0)+112>>2]=0;da=vx(d,da)|0;}while((da|0)!=0)}if(p){eF(W)}Kw(k)|0}if((a[213992]|0)==0){i=f;return}k=c[d+8>>2]|0;d=b[k+224>>1]|0;gc(c[o>>2]|0,130928,(L=i,i=i+16|0,c[L>>2]=b[k+226>>1]|0,c[L+8>>2]=d,L)|0)|0;i=L;i=f;return}function _p(d,e){d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0.0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0;f=i;i=i+8|0;g=f|0;h=g;j=d+8|0;if((a[(c[j>>2]|0)+113|0]&1)!=0){k=ux(d)|0;if((k|0)!=0){l=k;do{k=mw(d,l)|0;if((k|0)!=0){m=k;do{k=(c[m+8>>2]|0)+170|0;b[k>>1]=b[k>>1]<<1;m=ow(d,m)|0;}while((m|0)!=0)}l=vx(d,l)|0;}while((l|0)!=0)}l=(c[j>>2]|0)+240|0;c[l>>2]=((c[l>>2]|0)+1|0)/2|0}do{if((e|0)==0){lq(d,d);Wn(d);mq(h,d);l=c[g>>2]|0;m=c[g+4>>2]|0;qo(d,0);n=0;o=l&65535;p=m&65535}else{Rn(d);On(d);lq(d,d);Wn(d);mq(h,d);m=c[g>>2]|0;l=c[g+4>>2]|0;qo(d,0);k=c[j>>2]|0;if((c[k+208>>2]|0)>1){q=l&65535;r=m&65535}else{s=l&65535;l=m&65535;if((c[k+172>>2]|0)>0){q=s;r=l}else{n=e;o=l;p=s;break}}c[e+32>>2]=1;n=0;o=r;p=q}}while(0);Ln(d);q=c[j>>2]|0;if((c[q+216>>2]|0)==0){if((c[q+212>>2]|0)!=0){t=15}}else{t=15}do{if((t|0)==15){q=ux(d)|0;if((q|0)==0){break}else{u=q;v=0}while(1){do{if((u|0)==(Lm(u)|0)){q=u+8|0;r=c[q>>2]|0;do{if((c[r+184>>2]|0)==0){e=c[(c[j>>2]|0)+216>>2]|0;if((e|0)==0|(u|0)==(e|0)){w=v;x=r;break}g=Zo(u,e,0)|0;e=g+8|0;b[(c[e>>2]|0)+170>>1]=p;c[(c[e>>2]|0)+156>>2]=0;w=g;x=c[q>>2]|0}else{w=v;x=r}}while(0);if((c[x+176>>2]|0)!=0){y=w;break}r=c[(c[j>>2]|0)+212>>2]|0;q=r;if((r|0)==0|(u|0)==(q|0)){y=w;break}r=Zo(q,u,0)|0;q=r+8|0;b[(c[q>>2]|0)+170>>1]=o;c[(c[q>>2]|0)+156>>2]=0;y=r}else{y=v}}while(0);r=vx(d,u)|0;if((r|0)==0){break}else{u=r;v=y}}if((y|0)==0){break}qo(d,0)}}while(0);y=(n|0)==0;do{if(y){v=ew(d|0,147792)|0;if((v|0)==0){z=2147483647}else{A=+rF(v);z=~~(A*+(Lw(d)|0))}v=c[j>>2]|0;u=v+204|0;if((c[u+4>>2]|0)>0){B=0;C=v;D=u}else{break}do{c[C+180>>2]=c[(c[D>>2]|0)+(B<<2)>>2];ok(d,(c[(c[j>>2]|0)+172>>2]|0)==0|0,z)|0;B=B+1|0;C=c[j>>2]|0;D=C+204|0;}while((B|0)<(c[D+4>>2]|0))}else{Pn(d,n)}}while(0);n=ux(d)|0;D=c[j>>2]|0;a:do{if((n|0)==0){b[D+226>>1]=0;b[(c[j>>2]|0)+224>>1]=0}else{b[D+224>>1]=32767;b[(c[j>>2]|0)+226>>1]=-1;B=n;do{C=Lm(B)|0;z=B+8|0;do{if((C|0)==(B|0)){E=z}else{u=c[z>>2]|0;v=c[u+232>>2]|0;if(y){F=v}else{if((v|0)==0){F=0}else{E=z;break}}c[u+232>>2]=F+(c[(c[C+8>>2]|0)+232>>2]|0);E=B+8|0}}while(0);C=c[j>>2]|0;z=C+226|0;u=c[E>>2]|0;v=c[u+232>>2]|0;if((b[z>>1]|0)<(v|0)){b[z>>1]=v;z=c[E>>2]|0;G=c[j>>2]|0;H=z;I=c[z+232>>2]|0}else{G=C;H=u;I=v}v=G+224|0;if((b[v>>1]|0)>(I|0)){b[v>>1]=I;J=c[E>>2]|0}else{J=H}v=a[J+159|0]|0;if(!((v<<24>>24|0)==0|(v<<24>>24|0)==6)){Nm(B)}B=vx(d,B)|0;}while((B|0)!=0);B=d|0;if((Ix(B)|0)!=(d|0)){break}if((c[53850]|0)==100){v=c[j>>2]|0;if((c[v+172>>2]|0)<1){break}else{K=1;L=v}while(1){nq(c[(c[L+176>>2]|0)+(K<<2)>>2]|0);v=c[j>>2]|0;if((K|0)<(c[v+172>>2]|0)){K=K+1|0;L=v}else{break a}}}v=sy(Ix(B)|0)|0;if((v|0)==0){break}else{M=v}do{if((a[(c[M+8>>2]|0)+262|0]|0)==7){oq(d,M)}M=ty(M)|0;}while((M|0)!=0)}}while(0);M=c[j>>2]|0;L=M+204|0;if((c[L+4>>2]|0)>0){K=0;J=M;M=L;while(1){c[J+180>>2]=c[(c[M>>2]|0)+(K<<2)>>2];L=c[j>>2]|0;H=c[L+180>>2]|0;if((H|0)==0){N=L}else{L=H;do{H=L+8|0;E=(c[H>>2]|0)+172|0;I=E+4|0;G=c[I>>2]|0;if((G|0)>-1){F=G;while(1){c[(c[E>>2]|0)+(F<<2)>>2]=0;if((F|0)>0){F=F-1|0}else{break}}}c[I>>2]=0;F=(c[H>>2]|0)+180|0;E=F+4|0;G=c[E>>2]|0;if((G|0)>-1){y=G;while(1){c[(c[F>>2]|0)+(y<<2)>>2]=0;if((y|0)>0){y=y-1|0}else{break}}}c[E>>2]=0;a[(c[H>>2]|0)+157|0]=0;L=c[(c[H>>2]|0)+164>>2]|0;}while((L|0)!=0);N=c[j>>2]|0}L=K+1|0;y=N+204|0;if((L|0)<(c[y+4>>2]|0)){K=L;J=N;M=y}else{break}}}M=ux(d)|0;if((M|0)==0){O=c[j>>2]|0;P=O+204|0;Q=c[P>>2]|0;R=Q;eF(R);S=c[j>>2]|0;T=S+204|0;c[T>>2]=0;U=c[j>>2]|0;V=U+204|0;W=V+4|0;c[W>>2]=0;i=f;return}else{X=M}do{M=mw(d,X)|0;if((M|0)!=0){N=M;do{M=N+8|0;J=c[M>>2]|0;K=c[J+172>>2]|0;do{if((K|0)==0){Y=J}else{y=K+8|0;if((N|0)!=(c[(c[y>>2]|0)+116>>2]|0)){Y=J;break}L=ux(d)|0;if((L|0)!=0){F=L;do{L=mw(d,F)|0;if((L|0)!=0){I=L;do{do{if((N|0)!=(I|0)){L=(c[I+8>>2]|0)+172|0;G=c[L>>2]|0;if(!((G|0)!=0&(K|0)==(G|0))){break}c[L>>2]=0}}while(0);I=ow(d,I)|0;}while((I|0)!=0)}F=vx(d,F)|0;}while((F|0)!=0)}eF(c[y>>2]|0);eF(K);Y=c[M>>2]|0}}while(0);c[Y+172>>2]=0;N=ow(d,N)|0;}while((N|0)!=0)}X=vx(d,X)|0;}while((X|0)!=0);O=c[j>>2]|0;P=O+204|0;Q=c[P>>2]|0;R=Q;eF(R);S=c[j>>2]|0;T=S+204|0;c[T>>2]=0;U=c[j>>2]|0;V=U+204|0;W=V+4|0;c[W>>2]=0;i=f;return}function $p(a){a=a|0;return(Za($w(a|0)|0,116432,7)|0)==0|0}function aq(b,d){b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;if((ux(b)|0)==0){return}do{if((an(b)|0)==0){e=d}else{if((d|0)==0){c[(c[b+8>>2]|0)+192>>2]=0;e=b;break}f=d+8|0;g=b+8|0;c[(c[g>>2]|0)+192>>2]=(c[(c[f>>2]|0)+192>>2]|0)+1;c[(c[g>>2]|0)+188>>2]=d;g=(c[f>>2]|0)+172|0;h=c[g>>2]|0;i=h+1|0;c[g>>2]=i;g=c[f>>2]|0;j=c[g+176>>2]|0;if((j|0)==0){k=jk((h<<2)+8|0)|0}else{k=lk(j,h+2|0,4,c[g+172>>2]|0)|0}c[(c[f>>2]|0)+176>>2]=k;c[(c[(c[f>>2]|0)+176>>2]|0)+(i<<2)>>2]=b;Rj(b);hq(d,b);e=b}}while(0);d=sy(b)|0;if((d|0)!=0){k=d;do{aq(k,e);k=ty(k)|0;}while((k|0)!=0)}do{if((an(b)|0)!=0){k=ux(b)|0;if((k|0)==0){break}d=b;i=k;do{k=(c[i+8>>2]|0)+212|0;if((c[k>>2]|0)==0){c[k>>2]=d}i=vx(b,i)|0;}while((i|0)!=0)}}while(0);i=ew(b|0,151672)|0;a:do{if((i|0)!=0){if((a[i]|0)==0){break}do{if((Ya(i|0,148832)|0)!=0){if((Ya(i|0,145656)|0)==0){a[(c[e+8>>2]|0)+229|0]=1;break}do{if((Ya(i|0,142656)|0)!=0){if((Ya(i|0,139584)|0)==0){a[(c[e+8>>2]|0)+230|0]=1;break}if((Ya(i|0,136936)|0)!=0){break a}d=ux(b)|0;if((d|0)==0){break a}k=cq(d)|0;f=vx(b,d)|0;if((f|0)==0){break a}else{l=f}while(1){f=cq(k)|0;c[(c[(cq(l)|0)+8>>2]|0)+152>>2]=f;l=vx(b,l)|0;if((l|0)==0){break a}}}}while(0);k=ux(b)|0;do{if((k|0)==0){m=0}else{f=cq(k)|0;d=vx(b,k)|0;if((d|0)==0){m=f;break}else{n=d}while(1){d=cq(f)|0;c[(c[(cq(n)|0)+8>>2]|0)+152>>2]=d;d=vx(b,n)|0;if((d|0)==0){m=f;break}else{n=d}}}}while(0);k=e+8|0;f=c[k>>2]|0;d=c[f+200>>2]|0;if((d|0)==0){o=m;p=f}else{f=cq(m)|0;c[(c[(cq(d)|0)+8>>2]|0)+152>>2]=f;o=f;p=c[k>>2]|0}c[p+200>>2]=o;break a}}while(0);k=ux(b)|0;do{if((k|0)==0){q=0}else{f=cq(k)|0;d=vx(b,k)|0;if((d|0)==0){q=f;break}else{r=d}while(1){d=cq(f)|0;c[(c[(cq(r)|0)+8>>2]|0)+152>>2]=d;d=vx(b,r)|0;if((d|0)==0){q=f;break}else{r=d}}}}while(0);k=e+8|0;f=c[k>>2]|0;d=c[f+196>>2]|0;if((d|0)==0){s=q;t=f}else{f=cq(q)|0;c[(c[(cq(d)|0)+8>>2]|0)+152>>2]=f;s=f;t=c[k>>2]|0}c[t+196>>2]=s}}while(0);if((an(b)|0)==0){return}s=b+8|0;t=c[s>>2]|0;q=c[t+196>>2]|0;if((q|0)==0){return}if((q|0)!=(c[t+200>>2]|0)){return}t=ux(b)|0;do{if((t|0)==0){u=0}else{q=cq(t)|0;e=vx(b,t)|0;if((e|0)==0){u=q;break}else{v=e}while(1){e=cq(q)|0;c[(c[(cq(v)|0)+8>>2]|0)+152>>2]=e;e=vx(b,v)|0;if((e|0)==0){u=q;break}else{v=e}}}}while(0);c[(c[s>>2]|0)+196>>2]=u;c[(c[s>>2]|0)+200>>2]=u;return}function bq(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;do{if((an(a)|0)==0){f=d;g=e}else{if((Vm(ew(a|0,168304)|0,0)|0)<<24>>24==0){f=d;g=e;break}h=ux(a)|0;if((h|0)==0){i=e;j=d}else{k=b+8|0;l=e;m=h;h=d;while(1){if((pw(a,m)|0)==0){n=c[(c[(cq(m)|0)+8>>2]|0)+148>>2]|0;if((h|0)==0){o=Ax(b,87016,1)|0;p=o+8|0;c[(c[p>>2]|0)+176>>2]=0;q=jk(20)|0;c[(c[p>>2]|0)+172>>2]=q;c[(c[p>>2]|0)+184>>2]=0;q=jk(20)|0;c[(c[p>>2]|0)+180>>2]=q;q=c[53670]|0;r=(c[p>>2]|0)+168|0;if((q|0)==0){c[r>>2]=0;c[(c[k>>2]|0)+180>>2]=o}else{c[r>>2]=q;c[(c[(c[53670]|0)+8>>2]|0)+164>>2]=o}c[53670]=o;c[(c[p>>2]|0)+164>>2]=0;s=o}else{s=h}uw(b,s,n,0,1)|0;t=s}else{t=h}if((mw(a,m)|0)==0){n=c[(c[(cq(m)|0)+8>>2]|0)+148>>2]|0;if((l|0)==0){o=Ax(b,82176,1)|0;p=o+8|0;c[(c[p>>2]|0)+176>>2]=0;q=jk(20)|0;c[(c[p>>2]|0)+172>>2]=q;c[(c[p>>2]|0)+184>>2]=0;q=jk(20)|0;c[(c[p>>2]|0)+180>>2]=q;q=c[53670]|0;r=(c[p>>2]|0)+168|0;if((q|0)==0){c[r>>2]=0;c[(c[k>>2]|0)+180>>2]=o}else{c[r>>2]=q;c[(c[(c[53670]|0)+8>>2]|0)+164>>2]=o}c[53670]=o;c[(c[p>>2]|0)+164>>2]=0;u=o}else{u=l}uw(b,n,u,0,1)|0;v=u}else{v=l}n=vx(a,m)|0;if((n|0)==0){i=v;j=t;break}else{l=v;m=n;h=t}}}if((j|0)==0|(i|0)==0){f=j;g=i;break}h=(c[(uw(b,j,i,0,1)|0)+8>>2]|0)+156|0;c[h>>2]=(c[h>>2]|0)+1e3;f=j;g=i}}while(0);i=sy(a)|0;if((i|0)==0){return}else{w=i}do{bq(w,b,f,g);w=ty(w)|0;}while((w|0)!=0);return}function cq(a){a=a|0;var b=0,d=0,e=0;b=a+8|0;d=(c[b>>2]|0)+152|0;e=c[d>>2]|0;if((e|0)==0){c[d>>2]=a;return a|0}if((e|0)==(a|0)){return a|0}else{a=cq(e)|0;c[(c[b>>2]|0)+152>>2]=a;return a|0}return 0}function dq(a,d){a=a|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;e=a+8|0;f=c[e>>2]|0;if((c[f+172>>2]|0)<1){g=f}else{h=1;i=f;while(1){dq(c[(c[i+176>>2]|0)+(h<<2)>>2]|0,0);f=c[e>>2]|0;if((h|0)<(c[f+172>>2]|0)){h=h+1|0;i=f}else{g=f;break}}}if((c[g+188>>2]|0)==0&(d|0)==0){return}b[g+224>>1]=32767;b[(c[e>>2]|0)+226>>1]=-1;g=ux(a)|0;if((g|0)==0){j=0}else{d=g;g=0;while(1){i=c[(c[d+8>>2]|0)+232>>2]|0;h=c[e>>2]|0;f=h+226|0;if((b[f>>1]|0)<(i|0)){b[f>>1]=i;k=c[e>>2]|0}else{k=h}h=k+224|0;if((b[h>>1]|0)>(i|0)){b[h>>1]=i;l=d}else{l=g}i=vx(a,d)|0;if((i|0)==0){j=l;break}else{d=i;g=l}}}c[(c[e>>2]|0)+252>>2]=j;return}function eq(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;e=(c[b+8>>2]|0)+128|0;if((c[e>>2]|0)!=0){return}c[e>>2]=d;e=mw(a,b)|0;if((e|0)!=0){f=e;do{eq(a,c[((c[f>>2]&3|0)==2?f:f-32|0)+28>>2]|0,d);f=ow(a,f)|0;}while((f|0)!=0)}f=pw(a,b)|0;if((f|0)==0){return}else{g=f}do{eq(a,c[((c[g>>2]&3|0)==3?g:g+32|0)+28>>2]|0,d);g=qw(a,g)|0;}while((g|0)!=0);return}
-
-
-
-function iF(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;d=a;e=d+b|0;f=e;g=c[a+4>>2]|0;a:do{if((g&1|0)==0){h=c[a>>2]|0;if((g&3|0)==0){return}i=d+(-h|0)|0;j=i;k=h+b|0;l=c[53378]|0;if(i>>>0<l>>>0){fc()}if((j|0)==(c[53379]|0)){m=d+(b+4)|0;if((c[m>>2]&3|0)!=3){n=j;o=k;break}c[53376]=k;c[m>>2]=c[m>>2]&-2;c[d+(4-h)>>2]=k|1;c[e>>2]=k;return}m=h>>>3;if(h>>>0<256>>>0){p=c[d+(8-h)>>2]|0;q=c[d+(12-h)>>2]|0;r=213536+(m<<1<<2)|0;do{if((p|0)!=(r|0)){if(p>>>0<l>>>0){fc()}if((c[p+12>>2]|0)==(j|0)){break}fc()}}while(0);if((q|0)==(p|0)){c[53374]=c[53374]&~(1<<m);n=j;o=k;break}do{if((q|0)==(r|0)){s=q+8|0}else{if(q>>>0<l>>>0){fc()}t=q+8|0;if((c[t>>2]|0)==(j|0)){s=t;break}fc()}}while(0);c[p+12>>2]=q;c[s>>2]=p;n=j;o=k;break}r=i;m=c[d+(24-h)>>2]|0;t=c[d+(12-h)>>2]|0;do{if((t|0)==(r|0)){u=16-h|0;v=d+(u+4)|0;w=c[v>>2]|0;if((w|0)==0){x=d+u|0;u=c[x>>2]|0;if((u|0)==0){y=0;break}else{z=u;A=x}}else{z=w;A=v}while(1){v=z+20|0;w=c[v>>2]|0;if((w|0)!=0){z=w;A=v;continue}v=z+16|0;w=c[v>>2]|0;if((w|0)==0){break}else{z=w;A=v}}if(A>>>0<l>>>0){fc()}else{c[A>>2]=0;y=z;break}}else{v=c[d+(8-h)>>2]|0;if(v>>>0<l>>>0){fc()}w=v+12|0;if((c[w>>2]|0)!=(r|0)){fc()}x=t+8|0;if((c[x>>2]|0)==(r|0)){c[w>>2]=t;c[x>>2]=v;y=t;break}else{fc()}}}while(0);if((m|0)==0){n=j;o=k;break}t=d+(28-h)|0;l=213800+(c[t>>2]<<2)|0;do{if((r|0)==(c[l>>2]|0)){c[l>>2]=y;if((y|0)!=0){break}c[53375]=c[53375]&~(1<<c[t>>2]);n=j;o=k;break a}else{if(m>>>0<(c[53378]|0)>>>0){fc()}i=m+16|0;if((c[i>>2]|0)==(r|0)){c[i>>2]=y}else{c[m+20>>2]=y}if((y|0)==0){n=j;o=k;break a}}}while(0);if(y>>>0<(c[53378]|0)>>>0){fc()}c[y+24>>2]=m;r=16-h|0;t=c[d+r>>2]|0;do{if((t|0)!=0){if(t>>>0<(c[53378]|0)>>>0){fc()}else{c[y+16>>2]=t;c[t+24>>2]=y;break}}}while(0);t=c[d+(r+4)>>2]|0;if((t|0)==0){n=j;o=k;break}if(t>>>0<(c[53378]|0)>>>0){fc()}else{c[y+20>>2]=t;c[t+24>>2]=y;n=j;o=k;break}}else{n=a;o=b}}while(0);a=c[53378]|0;if(e>>>0<a>>>0){fc()}y=d+(b+4)|0;z=c[y>>2]|0;do{if((z&2|0)==0){if((f|0)==(c[53380]|0)){A=(c[53377]|0)+o|0;c[53377]=A;c[53380]=n;c[n+4>>2]=A|1;if((n|0)!=(c[53379]|0)){return}c[53379]=0;c[53376]=0;return}if((f|0)==(c[53379]|0)){A=(c[53376]|0)+o|0;c[53376]=A;c[53379]=n;c[n+4>>2]=A|1;c[n+A>>2]=A;return}A=(z&-8)+o|0;s=z>>>3;b:do{if(z>>>0<256>>>0){g=c[d+(b+8)>>2]|0;t=c[d+(b+12)>>2]|0;h=213536+(s<<1<<2)|0;do{if((g|0)!=(h|0)){if(g>>>0<a>>>0){fc()}if((c[g+12>>2]|0)==(f|0)){break}fc()}}while(0);if((t|0)==(g|0)){c[53374]=c[53374]&~(1<<s);break}do{if((t|0)==(h|0)){B=t+8|0}else{if(t>>>0<a>>>0){fc()}m=t+8|0;if((c[m>>2]|0)==(f|0)){B=m;break}fc()}}while(0);c[g+12>>2]=t;c[B>>2]=g}else{h=e;m=c[d+(b+24)>>2]|0;l=c[d+(b+12)>>2]|0;do{if((l|0)==(h|0)){i=d+(b+20)|0;p=c[i>>2]|0;if((p|0)==0){q=d+(b+16)|0;v=c[q>>2]|0;if((v|0)==0){C=0;break}else{D=v;E=q}}else{D=p;E=i}while(1){i=D+20|0;p=c[i>>2]|0;if((p|0)!=0){D=p;E=i;continue}i=D+16|0;p=c[i>>2]|0;if((p|0)==0){break}else{D=p;E=i}}if(E>>>0<a>>>0){fc()}else{c[E>>2]=0;C=D;break}}else{i=c[d+(b+8)>>2]|0;if(i>>>0<a>>>0){fc()}p=i+12|0;if((c[p>>2]|0)!=(h|0)){fc()}q=l+8|0;if((c[q>>2]|0)==(h|0)){c[p>>2]=l;c[q>>2]=i;C=l;break}else{fc()}}}while(0);if((m|0)==0){break}l=d+(b+28)|0;g=213800+(c[l>>2]<<2)|0;do{if((h|0)==(c[g>>2]|0)){c[g>>2]=C;if((C|0)!=0){break}c[53375]=c[53375]&~(1<<c[l>>2]);break b}else{if(m>>>0<(c[53378]|0)>>>0){fc()}t=m+16|0;if((c[t>>2]|0)==(h|0)){c[t>>2]=C}else{c[m+20>>2]=C}if((C|0)==0){break b}}}while(0);if(C>>>0<(c[53378]|0)>>>0){fc()}c[C+24>>2]=m;h=c[d+(b+16)>>2]|0;do{if((h|0)!=0){if(h>>>0<(c[53378]|0)>>>0){fc()}else{c[C+16>>2]=h;c[h+24>>2]=C;break}}}while(0);h=c[d+(b+20)>>2]|0;if((h|0)==0){break}if(h>>>0<(c[53378]|0)>>>0){fc()}else{c[C+20>>2]=h;c[h+24>>2]=C;break}}}while(0);c[n+4>>2]=A|1;c[n+A>>2]=A;if((n|0)!=(c[53379]|0)){F=A;break}c[53376]=A;return}else{c[y>>2]=z&-2;c[n+4>>2]=o|1;c[n+o>>2]=o;F=o}}while(0);o=F>>>3;if(F>>>0<256>>>0){z=o<<1;y=213536+(z<<2)|0;C=c[53374]|0;b=1<<o;do{if((C&b|0)==0){c[53374]=C|b;G=y;H=213536+(z+2<<2)|0}else{o=213536+(z+2<<2)|0;d=c[o>>2]|0;if(d>>>0>=(c[53378]|0)>>>0){G=d;H=o;break}fc()}}while(0);c[H>>2]=n;c[G+12>>2]=n;c[n+8>>2]=G;c[n+12>>2]=y;return}y=n;G=F>>>8;do{if((G|0)==0){I=0}else{if(F>>>0>16777215>>>0){I=31;break}H=(G+1048320|0)>>>16&8;z=G<<H;b=(z+520192|0)>>>16&4;C=z<<b;z=(C+245760|0)>>>16&2;o=14-(b|H|z)+(C<<z>>>15)|0;I=F>>>((o+7|0)>>>0)&1|o<<1}}while(0);G=213800+(I<<2)|0;c[n+28>>2]=I;c[n+20>>2]=0;c[n+16>>2]=0;o=c[53375]|0;z=1<<I;if((o&z|0)==0){c[53375]=o|z;c[G>>2]=y;c[n+24>>2]=G;c[n+12>>2]=n;c[n+8>>2]=n;return}z=c[G>>2]|0;if((I|0)==31){J=0}else{J=25-(I>>>1)|0}c:do{if((c[z+4>>2]&-8|0)==(F|0)){K=z}else{I=z;G=F<<J;while(1){L=I+16+(G>>>31<<2)|0;o=c[L>>2]|0;if((o|0)==0){break}if((c[o+4>>2]&-8|0)==(F|0)){K=o;break c}else{I=o;G=G<<1}}if(L>>>0<(c[53378]|0)>>>0){fc()}c[L>>2]=y;c[n+24>>2]=I;c[n+12>>2]=n;c[n+8>>2]=n;return}}while(0);L=K+8|0;F=c[L>>2]|0;J=c[53378]|0;if(K>>>0<J>>>0){fc()}if(F>>>0<J>>>0){fc()}c[F+12>>2]=y;c[L>>2]=y;c[n+8>>2]=F;c[n+12>>2]=K;c[n+24>>2]=0;return}function jF(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,j=0,k=0,l=0.0,m=0,n=0,o=0,p=0,q=0,r=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0.0,P=0.0,Q=0,R=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ba=0,ca=0,ea=0.0,fa=0.0,ga=0,ha=0,ia=0.0,ja=0.0,ka=0,la=0.0,ma=0,na=0,oa=0,pa=0,qa=0,ra=0,sa=0,ta=0,ua=0.0,va=0,wa=0.0,xa=0,ya=0.0,za=0,Aa=0,Ba=0,Ca=0.0,Da=0,Ea=0.0,Fa=0.0,Ga=0,Ha=0,Ia=0,Ja=0,Ka=0,La=0,Ma=0,Na=0,Oa=0,Pa=0,Ra=0,Sa=0,Ta=0,Ua=0,Va=0,Wa=0,Ya=0,Za=0,_a=0,$a=0,ab=0,bb=0,cb=0,db=0,eb=0,fb=0,gb=0,hb=0,ib=0,jb=0,kb=0,lb=0,mb=0,nb=0,ob=0,qb=0,rb=0,sb=0,tb=0,ub=0,vb=0,wb=0,xb=0,yb=0,zb=0,Ab=0,Bb=0,Cb=0,Db=0,Eb=0,Fb=0,Gb=0,Hb=0,Ib=0,Jb=0,Kb=0,Lb=0,Mb=0,Nb=0,Ob=0,Pb=0,Qb=0,Rb=0,Sb=0,Tb=0,Ub=0,Wb=0,Xb=0,Yb=0,Zb=0,_b=0,$b=0,ac=0,bc=0,cc=0,dc=0,ec=0,fc=0,gc=0,hc=0,ic=0,jc=0,kc=0,lc=0,mc=0,nc=0,oc=0,pc=0,qc=0,rc=0,sc=0,tc=0,uc=0,vc=0,wc=0.0,xc=0,yc=0,zc=0.0,Ac=0.0,Bc=0.0,Cc=0.0,Dc=0.0,Ec=0.0,Fc=0.0,Gc=0,Hc=0,Ic=0.0,Jc=0,Kc=0,Lc=0,Mc=0,Nc=0,Oc=0;g=i;i=i+512|0;h=g|0;if((e|0)==1){j=-1074;k=53}else if((e|0)==0){j=-149;k=24}else if((e|0)==2){j=-1074;k=53}else{l=0.0;i=g;return+l}e=b+4|0;m=b+100|0;do{n=c[e>>2]|0;if(n>>>0<(c[m>>2]|0)>>>0){c[e>>2]=n+1;o=d[n]|0}else{o=mF(b)|0}}while((Qa(o|0)|0)!=0);do{if((o|0)==45|(o|0)==43){n=1-(((o|0)==45)<<1)|0;p=c[e>>2]|0;if(p>>>0<(c[m>>2]|0)>>>0){c[e>>2]=p+1;q=d[p]|0;r=n;break}else{q=mF(b)|0;r=n;break}}else{q=o;r=1}}while(0);o=0;n=q;while(1){if((n|32|0)!=(a[95936+o|0]|0)){u=o;v=n;break}do{if(o>>>0<7>>>0){q=c[e>>2]|0;if(q>>>0<(c[m>>2]|0)>>>0){c[e>>2]=q+1;w=d[q]|0;break}else{w=mF(b)|0;break}}else{w=n}}while(0);q=o+1|0;if(q>>>0<8>>>0){o=q;n=w}else{u=q;v=w;break}}do{if((u|0)==3){x=23}else if((u|0)!=8){w=(f|0)==0;if(!(u>>>0<4>>>0|w)){if((u|0)==8){break}else{x=23;break}}a:do{if((u|0)==0){n=0;o=v;while(1){if((o|32|0)!=(a[141816+n|0]|0)){y=o;z=n;break a}do{if(n>>>0<2>>>0){q=c[e>>2]|0;if(q>>>0<(c[m>>2]|0)>>>0){c[e>>2]=q+1;A=d[q]|0;break}else{A=mF(b)|0;break}}else{A=o}}while(0);q=n+1|0;if(q>>>0<3>>>0){n=q;o=A}else{y=A;z=q;break}}}else{y=v;z=u}}while(0);if((z|0)==0){do{if((y|0)==48){o=c[e>>2]|0;if(o>>>0<(c[m>>2]|0)>>>0){c[e>>2]=o+1;B=d[o]|0}else{B=mF(b)|0}if((B|32|0)!=120){if((c[m>>2]|0)==0){C=48;break}c[e>>2]=(c[e>>2]|0)-1;C=48;break}o=c[e>>2]|0;if(o>>>0<(c[m>>2]|0)>>>0){c[e>>2]=o+1;D=d[o]|0;E=0}else{D=mF(b)|0;E=0}while(1){if((D|0)==46){x=70;break}else if((D|0)!=48){F=D;G=0;I=0;J=0;K=0;L=E;M=0;N=0;O=1.0;P=0.0;Q=0;break}o=c[e>>2]|0;if(o>>>0<(c[m>>2]|0)>>>0){c[e>>2]=o+1;D=d[o]|0;E=1;continue}else{D=mF(b)|0;E=1;continue}}b:do{if((x|0)==70){o=c[e>>2]|0;if(o>>>0<(c[m>>2]|0)>>>0){c[e>>2]=o+1;R=d[o]|0}else{R=mF(b)|0}if((R|0)==48){T=-1;U=-1}else{F=R;G=0;I=0;J=0;K=0;L=E;M=1;N=0;O=1.0;P=0.0;Q=0;break}while(1){o=c[e>>2]|0;if(o>>>0<(c[m>>2]|0)>>>0){c[e>>2]=o+1;V=d[o]|0}else{V=mF(b)|0}if((V|0)!=48){F=V;G=0;I=0;J=T;K=U;L=1;M=1;N=0;O=1.0;P=0.0;Q=0;break b}o=EF(U,T,-1,-1)|0;T=H;U=o}}}while(0);c:while(1){o=F-48|0;do{if(o>>>0<10>>>0){W=o;x=84}else{n=F|32;q=(F|0)==46;if(!((n-97|0)>>>0<6>>>0|q)){X=F;break c}if(q){if((M|0)==0){Y=G;Z=I;_=G;$=I;aa=L;ba=1;ca=N;ea=O;fa=P;ga=Q;break}else{X=46;break c}}else{W=(F|0)>57?n-87|0:o;x=84;break}}}while(0);if((x|0)==84){x=0;o=0;do{if((G|0)<(o|0)|(G|0)==(o|0)&I>>>0<8>>>0){ha=N;ia=O;ja=P;ka=W+(Q<<4)|0}else{n=0;if((G|0)<(n|0)|(G|0)==(n|0)&I>>>0<14>>>0){la=O*.0625;ha=N;ia=la;ja=P+la*+(W|0);ka=Q;break}if(!((W|0)!=0&(N|0)==0)){ha=N;ia=O;ja=P;ka=Q;break}ha=1;ia=O;ja=P+O*.5;ka=Q}}while(0);o=EF(I,G,1,0)|0;Y=H;Z=o;_=J;$=K;aa=1;ba=M;ca=ha;ea=ia;fa=ja;ga=ka}o=c[e>>2]|0;if(o>>>0<(c[m>>2]|0)>>>0){c[e>>2]=o+1;F=d[o]|0;G=Y;I=Z;J=_;K=$;L=aa;M=ba;N=ca;O=ea;P=fa;Q=ga;continue}else{F=mF(b)|0;G=Y;I=Z;J=_;K=$;L=aa;M=ba;N=ca;O=ea;P=fa;Q=ga;continue}}if((L|0)==0){o=(c[m>>2]|0)==0;if(!o){c[e>>2]=(c[e>>2]|0)-1}do{if(w){lF(b,0)}else{if(o){break}n=c[e>>2]|0;c[e>>2]=n-1;if((M|0)==0){break}c[e>>2]=n-2}}while(0);l=+(r|0)*0.0;i=g;return+l}o=(M|0)==0;n=o?I:K;q=o?G:J;o=0;if((G|0)<(o|0)|(G|0)==(o|0)&I>>>0<8>>>0){o=Q;p=G;ma=I;while(1){na=o<<4;oa=EF(ma,p,1,0)|0;pa=H;qa=0;if((pa|0)<(qa|0)|(pa|0)==(qa|0)&oa>>>0<8>>>0){o=na;p=pa;ma=oa}else{ra=na;break}}}else{ra=Q}do{if((X|32|0)==112){ma=kF(b,f)|0;p=H;if(!((ma|0)==0&(p|0)==(-2147483648|0))){sa=p;ta=ma;break}if(w){lF(b,0);l=0.0;i=g;return+l}else{if((c[m>>2]|0)==0){sa=0;ta=0;break}c[e>>2]=(c[e>>2]|0)-1;sa=0;ta=0;break}}else{if((c[m>>2]|0)==0){sa=0;ta=0;break}c[e>>2]=(c[e>>2]|0)-1;sa=0;ta=0}}while(0);ma=EF(n<<2|0>>>30,q<<2|n>>>30,-32,-1)|0;p=EF(ma,H,ta,sa)|0;ma=H;if((ra|0)==0){l=+(r|0)*0.0;i=g;return+l}o=0;if((ma|0)>(o|0)|(ma|0)==(o|0)&p>>>0>(-j|0)>>>0){c[(Vb()|0)>>2]=34;l=+(r|0)*1.7976931348623157e+308*1.7976931348623157e+308;i=g;return+l}o=j-106|0;na=(o|0)<0|0?-1:0;if((ma|0)<(na|0)|(ma|0)==(na|0)&p>>>0<o>>>0){c[(Vb()|0)>>2]=34;l=+(r|0)*2.2250738585072014e-308*2.2250738585072014e-308;i=g;return+l}if((ra|0)>-1){o=ra;la=P;na=ma;oa=p;while(1){pa=o<<1;if(la<.5){ua=la;va=pa}else{ua=la+-1.0;va=pa|1}wa=la+ua;pa=EF(oa,na,-1,-1)|0;qa=H;if((va|0)>-1){o=va;la=wa;na=qa;oa=pa}else{xa=va;ya=wa;za=qa;Aa=pa;break}}}else{xa=ra;ya=P;za=ma;Aa=p}oa=0;na=FF(32,0,j,(j|0)<0|0?-1:0)|0;o=EF(Aa,za,na,H)|0;na=H;if((oa|0)>(na|0)|(oa|0)==(na|0)&k>>>0>o>>>0){na=o;Ba=(na|0)<0?0:na}else{Ba=k}do{if((Ba|0)<53){la=+(r|0);wa=+pb(+(+nF(1.0,84-Ba|0)),+la);if(!((Ba|0)<32&ya!=0.0)){Ca=ya;Da=xa;Ea=wa;Fa=la;break}na=xa&1;Ca=(na|0)==0?0.0:ya;Da=(na^1)+xa|0;Ea=wa;Fa=la}else{Ca=ya;Da=xa;Ea=0.0;Fa=+(r|0)}}while(0);la=Fa*Ca+(Ea+Fa*+(Da>>>0>>>0))-Ea;if(la==0.0){c[(Vb()|0)>>2]=34}l=+oF(la,Aa);i=g;return+l}else{C=y}}while(0);p=j+k|0;ma=-p|0;na=C;o=0;while(1){if((na|0)==46){x=139;break}else if((na|0)!=48){Ga=na;Ha=0;Ia=o;Ja=0;Ka=0;break}oa=c[e>>2]|0;if(oa>>>0<(c[m>>2]|0)>>>0){c[e>>2]=oa+1;na=d[oa]|0;o=1;continue}else{na=mF(b)|0;o=1;continue}}d:do{if((x|0)==139){na=c[e>>2]|0;if(na>>>0<(c[m>>2]|0)>>>0){c[e>>2]=na+1;La=d[na]|0}else{La=mF(b)|0}if((La|0)==48){Ma=-1;Na=-1}else{Ga=La;Ha=1;Ia=o;Ja=0;Ka=0;break}while(1){na=c[e>>2]|0;if(na>>>0<(c[m>>2]|0)>>>0){c[e>>2]=na+1;Oa=d[na]|0}else{Oa=mF(b)|0}if((Oa|0)!=48){Ga=Oa;Ha=1;Ia=1;Ja=Ma;Ka=Na;break d}na=EF(Na,Ma,-1,-1)|0;Ma=H;Na=na}}}while(0);o=h|0;c[o>>2]=0;na=Ga-48|0;oa=(Ga|0)==46;e:do{if(na>>>0<10>>>0|oa){n=h+496|0;q=Ja;pa=Ka;qa=0;Pa=0;Ra=0;Sa=Ia;Ta=Ha;Ua=0;Va=0;Wa=Ga;Ya=na;Za=oa;while(1){do{if(Za){if((Ta|0)==0){_a=Va;$a=Ua;ab=1;bb=Sa;cb=Ra;db=qa;eb=Pa;fb=qa;gb=Pa}else{hb=q;ib=pa;jb=qa;kb=Pa;lb=Ra;mb=Sa;nb=Ua;ob=Va;qb=Wa;break e}}else{rb=EF(Pa,qa,1,0)|0;sb=H;tb=(Wa|0)!=48;if((Ua|0)>=125){if(!tb){_a=Va;$a=Ua;ab=Ta;bb=Sa;cb=Ra;db=sb;eb=rb;fb=q;gb=pa;break}c[n>>2]=c[n>>2]|1;_a=Va;$a=Ua;ab=Ta;bb=Sa;cb=Ra;db=sb;eb=rb;fb=q;gb=pa;break}ub=h+(Ua<<2)|0;if((Va|0)==0){vb=Ya}else{vb=Wa-48+((c[ub>>2]|0)*10|0)|0}c[ub>>2]=vb;ub=Va+1|0;wb=(ub|0)==9;_a=wb?0:ub;$a=(wb&1)+Ua|0;ab=Ta;bb=1;cb=tb?rb:Ra;db=sb;eb=rb;fb=q;gb=pa}}while(0);rb=c[e>>2]|0;if(rb>>>0<(c[m>>2]|0)>>>0){c[e>>2]=rb+1;xb=d[rb]|0}else{xb=mF(b)|0}rb=xb-48|0;sb=(xb|0)==46;if(rb>>>0<10>>>0|sb){q=fb;pa=gb;qa=db;Pa=eb;Ra=cb;Sa=bb;Ta=ab;Ua=$a;Va=_a;Wa=xb;Ya=rb;Za=sb}else{yb=fb;zb=gb;Ab=db;Bb=eb;Cb=cb;Db=bb;Eb=ab;Fb=$a;Gb=_a;Hb=xb;x=162;break}}}else{yb=Ja;zb=Ka;Ab=0;Bb=0;Cb=0;Db=Ia;Eb=Ha;Fb=0;Gb=0;Hb=Ga;x=162}}while(0);if((x|0)==162){oa=(Eb|0)==0;hb=oa?Ab:yb;ib=oa?Bb:zb;jb=Ab;kb=Bb;lb=Cb;mb=Db;nb=Fb;ob=Gb;qb=Hb}oa=(mb|0)!=0;do{if(oa){if((qb|32|0)!=101){x=171;break}na=kF(b,f)|0;Za=H;do{if((na|0)==0&(Za|0)==(-2147483648|0)){if(w){lF(b,0);l=0.0;i=g;return+l}else{if((c[m>>2]|0)==0){Ib=0;Jb=0;break}c[e>>2]=(c[e>>2]|0)-1;Ib=0;Jb=0;break}}else{Ib=Za;Jb=na}}while(0);na=EF(Jb,Ib,ib,hb)|0;Kb=H;Lb=na}else{x=171}}while(0);do{if((x|0)==171){if((qb|0)<=-1){Kb=hb;Lb=ib;break}if((c[m>>2]|0)==0){Kb=hb;Lb=ib;break}c[e>>2]=(c[e>>2]|0)-1;Kb=hb;Lb=ib}}while(0);if(!oa){c[(Vb()|0)>>2]=22;lF(b,0);l=0.0;i=g;return+l}na=c[o>>2]|0;if((na|0)==0){l=+(r|0)*0.0;i=g;return+l}Za=0;do{if((Lb|0)==(kb|0)&(Kb|0)==(jb|0)&((jb|0)<(Za|0)|(jb|0)==(Za|0)&kb>>>0<10>>>0)){if(k>>>0<=30>>>0){if((na>>>(k>>>0)|0)!=0){break}}l=+(r|0)*+(na>>>0>>>0);i=g;return+l}}while(0);na=(j|0)/-2|0;Za=(na|0)<0|0?-1:0;if((Kb|0)>(Za|0)|(Kb|0)==(Za|0)&Lb>>>0>na>>>0){c[(Vb()|0)>>2]=34;l=+(r|0)*1.7976931348623157e+308*1.7976931348623157e+308;i=g;return+l}na=j-106|0;Za=(na|0)<0|0?-1:0;if((Kb|0)<(Za|0)|(Kb|0)==(Za|0)&Lb>>>0<na>>>0){c[(Vb()|0)>>2]=34;l=+(r|0)*2.2250738585072014e-308*2.2250738585072014e-308;i=g;return+l}if((ob|0)==0){Mb=nb}else{if((ob|0)<9){na=h+(nb<<2)|0;Za=ob;oa=c[na>>2]|0;do{oa=oa*10|0;Za=Za+1|0;}while((Za|0)<9);c[na>>2]=oa}Mb=nb+1|0}Za=Lb;do{if((lb|0)<9){if(!((lb|0)<=(Za|0)&(Za|0)<18)){break}if((Za|0)==9){l=+(r|0)*+((c[o>>2]|0)>>>0>>>0);i=g;return+l}if((Za|0)<9){l=+(r|0)*+((c[o>>2]|0)>>>0>>>0)/+(c[29728+(8-Za<<2)>>2]|0);i=g;return+l}Ya=k+27+(Za*-3|0)|0;Wa=c[o>>2]|0;if((Ya|0)<=30){if((Wa>>>(Ya>>>0)|0)!=0){break}}l=+(r|0)*+(Wa>>>0>>>0)*+(c[29728+(Za-10<<2)>>2]|0);i=g;return+l}}while(0);o=(Za|0)%9|0;if((o|0)==0){Nb=0;Ob=Mb;Pb=0;Qb=Za}else{oa=(Za|0)>-1?o:o+9|0;o=c[29728+(8-oa<<2)>>2]|0;do{if((Mb|0)==0){Rb=0;Sb=0;Tb=Za}else{na=1e9/(o|0)|0;Wa=Za;Ya=0;Va=0;Ua=0;while(1){Ta=h+(Va<<2)|0;Sa=c[Ta>>2]|0;Ra=((Sa>>>0)/(o>>>0)|0)+Ua|0;c[Ta>>2]=Ra;Ub=da((Sa>>>0)%(o>>>0)|0,na)|0;Sa=Va+1|0;if((Va|0)==(Ya|0)&(Ra|0)==0){Wb=Sa&127;Xb=Wa-9|0}else{Wb=Ya;Xb=Wa}if((Sa|0)==(Mb|0)){break}else{Wa=Xb;Ya=Wb;Va=Sa;Ua=Ub}}if((Ub|0)==0){Rb=Mb;Sb=Wb;Tb=Xb;break}c[h+(Mb<<2)>>2]=Ub;Rb=Mb+1|0;Sb=Wb;Tb=Xb}}while(0);Nb=Sb;Ob=Rb;Pb=0;Qb=9-oa+Tb|0}f:while(1){o=h+(Nb<<2)|0;if((Qb|0)<18){Za=Ob;Ua=Pb;while(1){Va=0;Ya=Za+127|0;Wa=Za;while(1){na=Ya&127;Sa=h+(na<<2)|0;Ra=c[Sa>>2]|0;Ta=EF(Ra<<29|0>>>3,0<<29|Ra>>>3,Va,0)|0;Ra=H;Pa=0;if(Ra>>>0>Pa>>>0|Ra>>>0==Pa>>>0&Ta>>>0>1e9>>>0){Pa=PF(Ta,Ra,1e9,0)|0;qa=QF(Ta,Ra,1e9,0)|0;Yb=Pa;Zb=qa}else{Yb=0;Zb=Ta}c[Sa>>2]=Zb;Sa=(na|0)==(Nb|0);if((na|0)!=(Wa+127&127|0)|Sa){_b=Wa}else{_b=(Zb|0)==0?na:Wa}if(Sa){break}else{Va=Yb;Ya=na-1|0;Wa=_b}}Wa=Ua-29|0;if((Yb|0)==0){Za=_b;Ua=Wa}else{$b=Wa;ac=_b;bc=Yb;break}}}else{if((Qb|0)==18){cc=Ob;dc=Pb}else{ec=Nb;fc=Ob;gc=Pb;hc=Qb;break}while(1){if((c[o>>2]|0)>>>0>=9007199>>>0){ec=Nb;fc=cc;gc=dc;hc=18;break f}Ua=0;Za=cc+127|0;Wa=cc;while(1){Ya=Za&127;Va=h+(Ya<<2)|0;na=c[Va>>2]|0;Sa=EF(na<<29|0>>>3,0<<29|na>>>3,Ua,0)|0;na=H;Ta=0;if(na>>>0>Ta>>>0|na>>>0==Ta>>>0&Sa>>>0>1e9>>>0){Ta=PF(Sa,na,1e9,0)|0;qa=QF(Sa,na,1e9,0)|0;ic=Ta;jc=qa}else{ic=0;jc=Sa}c[Va>>2]=jc;Va=(Ya|0)==(Nb|0);if((Ya|0)!=(Wa+127&127|0)|Va){kc=Wa}else{kc=(jc|0)==0?Ya:Wa}if(Va){break}else{Ua=ic;Za=Ya-1|0;Wa=kc}}Wa=dc-29|0;if((ic|0)==0){cc=kc;dc=Wa}else{$b=Wa;ac=kc;bc=ic;break}}}o=Nb+127&127;if((o|0)==(ac|0)){Wa=ac+127&127;Za=h+((ac+126&127)<<2)|0;c[Za>>2]=c[Za>>2]|c[h+(Wa<<2)>>2];lc=Wa}else{lc=ac}c[h+(o<<2)>>2]=bc;Nb=o;Ob=lc;Pb=$b;Qb=Qb+9|0}g:while(1){mc=fc+1&127;oa=h+((fc+127&127)<<2)|0;o=ec;Wa=gc;Za=hc;while(1){Ua=(Za|0)==18;Ya=(Za|0)>27?9:1;nc=o;oc=Wa;while(1){Va=0;while(1){Sa=Va+nc&127;if((Sa|0)==(fc|0)){pc=2;break}qa=c[h+(Sa<<2)>>2]|0;Sa=c[29720+(Va<<2)>>2]|0;if(qa>>>0<Sa>>>0){pc=2;break}Ta=Va+1|0;if(qa>>>0>Sa>>>0){pc=Va;break}if((Ta|0)<2){Va=Ta}else{pc=Ta;break}}if((pc|0)==2&Ua){break g}qc=Ya+oc|0;if((nc|0)==(fc|0)){nc=fc;oc=qc}else{break}}Ua=(1<<Ya)-1|0;Va=1e9>>>(Ya>>>0);rc=Za;sc=nc;Ta=nc;tc=0;do{Sa=h+(Ta<<2)|0;qa=c[Sa>>2]|0;na=(qa>>>(Ya>>>0))+tc|0;c[Sa>>2]=na;tc=da(qa&Ua,Va)|0;qa=(Ta|0)==(sc|0)&(na|0)==0;Ta=Ta+1&127;rc=qa?rc-9|0:rc;sc=qa?Ta:sc;}while((Ta|0)!=(fc|0));if((tc|0)==0){o=sc;Wa=qc;Za=rc;continue}if((mc|0)!=(sc|0)){break}c[oa>>2]=c[oa>>2]|1;o=sc;Wa=qc;Za=rc}c[h+(fc<<2)>>2]=tc;ec=sc;fc=mc;gc=qc;hc=rc}Za=nc&127;if((Za|0)==(fc|0)){c[h+(mc-1<<2)>>2]=0;uc=mc}else{uc=fc}la=+((c[h+(Za<<2)>>2]|0)>>>0>>>0);Za=nc+1&127;if((Za|0)==(uc|0)){Wa=uc+1&127;c[h+(Wa-1<<2)>>2]=0;vc=Wa}else{vc=uc}wa=+(r|0);wc=wa*(la*1.0e9+ +((c[h+(Za<<2)>>2]|0)>>>0>>>0));Za=oc+53|0;Wa=Za-j|0;if((Wa|0)<(k|0)){xc=(Wa|0)<0?0:Wa;yc=1}else{xc=k;yc=0}if((xc|0)<53){la=+pb(+(+nF(1.0,105-xc|0)),+wc);zc=+Xa(+wc,+(+nF(1.0,53-xc|0)));Ac=la;Bc=zc;Cc=la+(wc-zc)}else{Ac=0.0;Bc=0.0;Cc=wc}o=nc+2&127;do{if((o|0)==(vc|0)){Dc=Bc}else{oa=c[h+(o<<2)>>2]|0;do{if(oa>>>0<5e8>>>0){if((oa|0)==0){if((nc+3&127|0)==(vc|0)){Ec=Bc;break}}Ec=wa*.25+Bc}else{if(oa>>>0>5e8>>>0){Ec=wa*.75+Bc;break}if((nc+3&127|0)==(vc|0)){Ec=wa*.5+Bc;break}else{Ec=wa*.75+Bc;break}}}while(0);if((53-xc|0)<=1){Dc=Ec;break}if(+Xa(+Ec,+1.0)!=0.0){Dc=Ec;break}Dc=Ec+1.0}}while(0);wa=Cc+Dc-Ac;do{if((Za&2147483647|0)>(-2-p|0)){if(+S(+wa)<9007199254740992.0){Fc=wa;Gc=yc;Hc=oc}else{Fc=wa*.5;Gc=(yc|0)!=0&(xc|0)==(Wa|0)?0:yc;Hc=oc+1|0}if((Hc+50|0)<=(ma|0)){if(!((Gc|0)!=0&Dc!=0.0)){Ic=Fc;Jc=Hc;break}}c[(Vb()|0)>>2]=34;Ic=Fc;Jc=Hc}else{Ic=wa;Jc=oc}}while(0);l=+oF(Ic,Jc);i=g;return+l}else if((z|0)==3){ma=c[e>>2]|0;if(ma>>>0<(c[m>>2]|0)>>>0){c[e>>2]=ma+1;Kc=d[ma]|0}else{Kc=mF(b)|0}if((Kc|0)==40){Lc=1}else{if((c[m>>2]|0)==0){l=+s;i=g;return+l}c[e>>2]=(c[e>>2]|0)-1;l=+s;i=g;return+l}while(1){ma=c[e>>2]|0;if(ma>>>0<(c[m>>2]|0)>>>0){c[e>>2]=ma+1;Mc=d[ma]|0}else{Mc=mF(b)|0}if(!((Mc-48|0)>>>0<10>>>0|(Mc-65|0)>>>0<26>>>0)){if(!((Mc-97|0)>>>0<26>>>0|(Mc|0)==95)){break}}Lc=Lc+1|0}if((Mc|0)==41){l=+s;i=g;return+l}ma=(c[m>>2]|0)==0;if(!ma){c[e>>2]=(c[e>>2]|0)-1}if(w){c[(Vb()|0)>>2]=22;lF(b,0);l=0.0;i=g;return+l}if((Lc|0)==0|ma){l=+s;i=g;return+l}else{Nc=Lc}while(1){ma=Nc-1|0;c[e>>2]=(c[e>>2]|0)-1;if((ma|0)==0){l=+s;break}else{Nc=ma}}i=g;return+l}else{if((c[m>>2]|0)!=0){c[e>>2]=(c[e>>2]|0)-1}c[(Vb()|0)>>2]=22;lF(b,0);l=0.0;i=g;return+l}}}while(0);do{if((x|0)==23){b=(c[m>>2]|0)==0;if(!b){c[e>>2]=(c[e>>2]|0)-1}if(u>>>0<4>>>0|(f|0)==0|b){break}else{Oc=u}do{c[e>>2]=(c[e>>2]|0)-1;Oc=Oc-1|0;}while(Oc>>>0>3>>>0)}}while(0);l=+(r|0)*t;i=g;return+l}function kF(a,b){a=a|0;b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;e=a+4|0;f=c[e>>2]|0;g=a+100|0;if(f>>>0<(c[g>>2]|0)>>>0){c[e>>2]=f+1;h=d[f]|0}else{h=mF(a)|0}do{if((h|0)==45|(h|0)==43){f=(h|0)==45|0;i=c[e>>2]|0;if(i>>>0<(c[g>>2]|0)>>>0){c[e>>2]=i+1;j=d[i]|0}else{j=mF(a)|0}if((j-48|0)>>>0<10>>>0|(b|0)==0){k=f;l=j;break}if((c[g>>2]|0)==0){k=f;l=j;break}c[e>>2]=(c[e>>2]|0)-1;k=f;l=j}else{k=0;l=h}}while(0);if((l-48|0)>>>0>9>>>0){if((c[g>>2]|0)==0){m=-2147483648;n=0;return(H=m,n)|0}c[e>>2]=(c[e>>2]|0)-1;m=-2147483648;n=0;return(H=m,n)|0}else{o=l;p=0}while(1){q=o-48+p|0;l=c[e>>2]|0;if(l>>>0<(c[g>>2]|0)>>>0){c[e>>2]=l+1;r=d[l]|0}else{r=mF(a)|0}if(!((r-48|0)>>>0<10>>>0&(q|0)<214748364)){break}o=r;p=q*10|0}p=q;o=(q|0)<0|0?-1:0;if((r-48|0)>>>0<10>>>0){q=r;l=o;h=p;while(1){j=OF(h,l,10,0)|0;b=H;f=EF(q,(q|0)<0|0?-1:0,-48,-1)|0;i=EF(f,H,j,b)|0;b=H;j=c[e>>2]|0;if(j>>>0<(c[g>>2]|0)>>>0){c[e>>2]=j+1;s=d[j]|0}else{s=mF(a)|0}j=21474836;if((s-48|0)>>>0<10>>>0&((b|0)<(j|0)|(b|0)==(j|0)&i>>>0<2061584302>>>0)){q=s;l=b;h=i}else{t=s;u=b;v=i;break}}}else{t=r;u=o;v=p}if((t-48|0)>>>0<10>>>0){do{t=c[e>>2]|0;if(t>>>0<(c[g>>2]|0)>>>0){c[e>>2]=t+1;w=d[t]|0}else{w=mF(a)|0}}while((w-48|0)>>>0<10>>>0)}if((c[g>>2]|0)!=0){c[e>>2]=(c[e>>2]|0)-1}e=(k|0)!=0;k=FF(0,0,v,u)|0;m=e?H:u;n=e?k:v;return(H=m,n)|0}function lF(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;c[a+104>>2]=b;d=c[a+8>>2]|0;e=c[a+4>>2]|0;f=d-e|0;c[a+108>>2]=f;if((b|0)!=0&(f|0)>(b|0)){c[a+100>>2]=e+b;return}else{c[a+100>>2]=d;return}}function mF(b){b=b|0;var e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0;e=b+104|0;f=c[e>>2]|0;if((f|0)==0){g=3}else{if((c[b+108>>2]|0)<(f|0)){g=3}}do{if((g|0)==3){f=qF(b)|0;if((f|0)<0){break}h=c[e>>2]|0;i=c[b+8>>2]|0;do{if((h|0)==0){g=8}else{j=c[b+4>>2]|0;k=h-(c[b+108>>2]|0)-1|0;if((i-j|0)<=(k|0)){g=8;break}c[b+100>>2]=j+k}}while(0);if((g|0)==8){c[b+100>>2]=i}h=c[b+4>>2]|0;if((i|0)!=0){k=b+108|0;c[k>>2]=i+1-h+(c[k>>2]|0)}k=h-1|0;if((d[k]|0|0)==(f|0)){l=f;return l|0}a[k]=f;l=f;return l|0}}while(0);c[b+100>>2]=0;l=-1;return l|0}function nF(a,b){a=+a;b=b|0;var d=0.0,e=0,f=0.0,g=0;do{if((b|0)>1023){d=a*8.98846567431158e+307;e=b-1023|0;if((e|0)<=1023){f=d;g=e;break}e=b-2046|0;f=d*8.98846567431158e+307;g=(e|0)>1023?1023:e}else{if((b|0)>=-1022){f=a;g=b;break}d=a*2.2250738585072014e-308;e=b+1022|0;if((e|0)>=-1022){f=d;g=e;break}e=b+2044|0;f=d*2.2250738585072014e-308;g=(e|0)<-1022?-1022:e}}while(0);return+(f*(c[k>>2]=0<<20|0>>>12,c[k+4>>2]=g+1023<<20|0>>>12,+h[k>>3]))}function oF(a,b){a=+a;b=b|0;return+(+nF(a,b))}function pF(b){b=b|0;var d=0,e=0,f=0,g=0,h=0;d=b+74|0;e=a[d]|0;a[d]=e-1&255|e;e=b+20|0;d=b+44|0;if((c[e>>2]|0)>>>0>(c[d>>2]|0)>>>0){Hc[c[b+36>>2]&63](b,0,0)|0}c[b+16>>2]=0;c[b+28>>2]=0;c[e>>2]=0;e=b|0;f=c[e>>2]|0;if((f&20|0)==0){g=c[d>>2]|0;c[b+8>>2]=g;c[b+4>>2]=g;h=0;return h|0}if((f&4|0)==0){h=-1;return h|0}c[e>>2]=f|32;h=-1;return h|0}function qF(a){a=a|0;var b=0,e=0,f=0,g=0;b=i;i=i+8|0;e=b|0;if((c[a+8>>2]|0)==0){if((pF(a)|0)==0){f=3}else{g=-1}}else{f=3}do{if((f|0)==3){if((Hc[c[a+32>>2]&63](a,e,1)|0)!=1){g=-1;break}g=d[e]|0}}while(0);i=b;return g|0}function rF(a){a=a|0;return+(+sF(a,0))}function sF(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0,h=0.0,j=0,k=0,l=0,m=0;d=i;i=i+112|0;e=d|0;vF(e|0,0,112)|0;f=e+4|0;c[f>>2]=a;g=e+8|0;c[g>>2]=-1;c[e+44>>2]=a;c[e+76>>2]=-1;lF(e,0);h=+jF(e,1,1);j=(c[f>>2]|0)-(c[g>>2]|0)+(c[e+108>>2]|0)|0;if((b|0)==0){k=112;l=0;i=d;return+h}if((j|0)==0){m=a}else{m=a+j|0}c[b>>2]=m;k=112;l=0;i=d;return+h}function tF(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;f=b|0;if((b&3)==(d&3)){while(b&3){if((e|0)==0)return f|0;a[b]=a[d]|0;b=b+1|0;d=d+1|0;e=e-1|0}while((e|0)>=4){c[b>>2]=c[d>>2];b=b+4|0;d=d+4|0;e=e-4|0}}while((e|0)>0){a[b]=a[d]|0;b=b+1|0;d=d+1|0;e=e-1|0}return f|0}function uF(b,c,d){b=b|0;c=c|0;d=d|0;var e=0;if((c|0)<(b|0)&(b|0)<(c+d|0)){e=b;c=c+d|0;b=b+d|0;while((d|0)>0){b=b-1|0;c=c-1|0;d=d-1|0;a[b]=a[c]|0}b=e}else{tF(b,c,d)|0}return b|0}function vF(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0;f=b+e|0;if((e|0)>=20){d=d&255;g=b&3;h=d|d<<8|d<<16|d<<24;i=f&~3;if(g){g=b+4-g|0;while((b|0)<(g|0)){a[b]=d;b=b+1|0}}while((b|0)<(i|0)){c[b>>2]=h;b=b+4|0}}while((b|0)<(f|0)){a[b]=d;b=b+1|0}return b-e|0}function wF(a,b,c){a=a|0;b=b|0;c=c|0;var e=0,f=0,g=0;while((e|0)<(c|0)){f=d[a+e|0]|0;g=d[b+e|0]|0;if((f|0)!=(g|0))return((f|0)>(g|0)?1:-1)|0;e=e+1|0}return 0}function xF(b){b=b|0;var c=0;c=b;while(a[c]|0){c=c+1|0}return c-b|0}function yF(a){a=a|0;if((a|0)<65)return a|0;if((a|0)>90)return a|0;return a-65+97|0}function zF(b,c){b=b|0;c=c|0;var d=0;do{a[b+d|0]=a[c+d|0];d=d+1|0}while(a[c+(d-1)|0]|0);return b|0}function AF(b,c){b=b|0;c=c|0;var d=0,e=0;d=b+(xF(b)|0)|0;do{a[d+e|0]=a[c+e|0];e=e+1|0}while(a[c+(e-1)|0]|0);return b|0}function BF(a,b,d){a=a|0;b=b|0;d=d|0;var e=0;w=w+1|0;c[a>>2]=w;while((e|0)<40){if((c[d+(e<<2)>>2]|0)==0){c[d+(e<<2)>>2]=w;c[d+((e<<2)+4)>>2]=b;c[d+((e<<2)+8)>>2]=0;return 0}e=e+2|0}sb(116);sb(111);sb(111);sb(32);sb(109);sb(97);sb(110);sb(121);sb(32);sb(115);sb(101);sb(116);sb(106);sb(109);sb(112);sb(115);sb(32);sb(105);sb(110);sb(32);sb(97);sb(32);sb(102);sb(117);sb(110);sb(99);sb(116);sb(105);sb(111);sb(110);sb(32);sb(99);sb(97);sb(108);sb(108);sb(44);sb(32);sb(98);sb(117);sb(105);sb(108);sb(100);sb(32);sb(119);sb(105);sb(116);sb(104);sb(32);sb(97);sb(32);sb(104);sb(105);sb(103);sb(104);sb(101);sb(114);sb(32);sb(118);sb(97);sb(108);sb(117);sb(101);sb(32);sb(102);sb(111);sb(114);sb(32);sb(77);sb(65);sb(88);sb(95);sb(83);sb(69);sb(84);sb(74);sb(77);sb(80);sb(83);sb(10);ea(0);return 0}function CF(a,b){a=a|0;b=b|0;var d=0,e=0;while((d|0)<20){e=c[b+(d<<2)>>2]|0;if((e|0)==0)break;if((e|0)==(a|0)){return c[b+((d<<2)+4)>>2]|0}d=d+2|0}return 0}function DF(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0;while((e|0)<(d|0)){a[b+e|0]=f?0:a[c+e|0]|0;f=f?1:(a[c+e|0]|0)==0;e=e+1|0}return b|0}function EF(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=a+c>>>0;return(H=b+d+(e>>>0<a>>>0|0)>>>0,e|0)|0}function FF(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=b-d>>>0;e=b-d-(c>>>0>a>>>0|0)>>>0;return(H=e,a-c>>>0|0)|0}function GF(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){H=b<<c|(a&(1<<c)-1<<32-c)>>>32-c;return a<<c}H=a<<c-32;return 0}function HF(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){H=b>>>c;return a>>>c|(b&(1<<c)-1)<<32-c}H=0;return b>>>c-32|0}function IF(a,b,c){a=a|0;b=b|0;c=c|0;if((c|0)<32){H=b>>c;return a>>>c|(b&(1<<c)-1)<<32-c}H=(b|0)<0?-1:0;return b>>c-32|0}function JF(b){b=b|0;var c=0;c=a[n+(b>>>24)|0]|0;if((c|0)<8)return c|0;c=a[n+(b>>16&255)|0]|0;if((c|0)<8)return c+8|0;c=a[n+(b>>8&255)|0]|0;if((c|0)<8)return c+16|0;return(a[n+(b&255)|0]|0)+24|0}function KF(b){b=b|0;var c=0;c=a[m+(b&255)|0]|0;if((c|0)<8)return c|0;c=a[m+(b>>8&255)|0]|0;if((c|0)<8)return c+8|0;c=a[m+(b>>16&255)|0]|0;if((c|0)<8)return c+16|0;return(a[m+(b>>>24)|0]|0)+24|0}function LF(a,b){a=a|0;b=b|0;var c=0,d=0,e=0,f=0;c=a&65535;d=b&65535;e=da(d,c)|0;f=a>>>16;a=(e>>>16)+(da(d,f)|0)|0;d=b>>>16;b=da(d,c)|0;return(H=(a>>>16)+(da(d,f)|0)+(((a&65535)+b|0)>>>16)|0,a+b<<16|e&65535|0)|0}function MF(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=b>>31|((b|0)<0?-1:0)<<1;f=((b|0)<0?-1:0)>>31|((b|0)<0?-1:0)<<1;g=d>>31|((d|0)<0?-1:0)<<1;h=((d|0)<0?-1:0)>>31|((d|0)<0?-1:0)<<1;i=FF(e^a,f^b,e,f)|0;b=H;a=g^e;e=h^f;f=FF((RF(i,b,FF(g^c,h^d,g,h)|0,H,0)|0)^a,H^e,a,e)|0;return(H=H,f)|0}function NF(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0;f=i;i=i+8|0;g=f|0;h=b>>31|((b|0)<0?-1:0)<<1;j=((b|0)<0?-1:0)>>31|((b|0)<0?-1:0)<<1;k=e>>31|((e|0)<0?-1:0)<<1;l=((e|0)<0?-1:0)>>31|((e|0)<0?-1:0)<<1;m=FF(h^a,j^b,h,j)|0;b=H;RF(m,b,FF(k^d,l^e,k,l)|0,H,g)|0;l=FF(c[g>>2]^h,c[g+4>>2]^j,h,j)|0;j=H;i=f;return(H=j,l)|0}function OF(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0,f=0;e=a;a=c;c=LF(e,a)|0;f=H;return(H=(da(b,a)|0)+(da(d,e)|0)+f|f&0,c|0|0)|0}function PF(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;var e=0;e=RF(a,b,c,d,0)|0;return(H=H,e)|0}function QF(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0;f=i;i=i+8|0;g=f|0;RF(a,b,d,e,g)|0;i=f;return(H=c[g+4>>2]|0,c[g>>2]|0)|0}function RF(a,b,d,e,f){a=a|0;b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,I=0,J=0,K=0,L=0,M=0;g=a;h=b;i=h;j=d;k=e;l=k;if((i|0)==0){m=(f|0)!=0;if((l|0)==0){if(m){c[f>>2]=(g>>>0)%(j>>>0);c[f+4>>2]=0}n=0;o=(g>>>0)/(j>>>0)>>>0;return(H=n,o)|0}else{if(!m){n=0;o=0;return(H=n,o)|0}c[f>>2]=a|0;c[f+4>>2]=b&0;n=0;o=0;return(H=n,o)|0}}m=(l|0)==0;do{if((j|0)==0){if(m){if((f|0)!=0){c[f>>2]=(i>>>0)%(j>>>0);c[f+4>>2]=0}n=0;o=(i>>>0)/(j>>>0)>>>0;return(H=n,o)|0}if((g|0)==0){if((f|0)!=0){c[f>>2]=0;c[f+4>>2]=(i>>>0)%(l>>>0)}n=0;o=(i>>>0)/(l>>>0)>>>0;return(H=n,o)|0}p=l-1|0;if((p&l|0)==0){if((f|0)!=0){c[f>>2]=a|0;c[f+4>>2]=p&i|b&0}n=0;o=i>>>((KF(l|0)|0)>>>0);return(H=n,o)|0}p=(JF(l|0)|0)-(JF(i|0)|0)|0;if(p>>>0<=30){q=p+1|0;r=31-p|0;s=q;t=i<<r|g>>>(q>>>0);u=i>>>(q>>>0);v=0;w=g<<r;break}if((f|0)==0){n=0;o=0;return(H=n,o)|0}c[f>>2]=a|0;c[f+4>>2]=h|b&0;n=0;o=0;return(H=n,o)|0}else{if(!m){r=(JF(l|0)|0)-(JF(i|0)|0)|0;if(r>>>0<=31){q=r+1|0;p=31-r|0;x=r-31>>31;s=q;t=g>>>(q>>>0)&x|i<<p;u=i>>>(q>>>0)&x;v=0;w=g<<p;break}if((f|0)==0){n=0;o=0;return(H=n,o)|0}c[f>>2]=a|0;c[f+4>>2]=h|b&0;n=0;o=0;return(H=n,o)|0}p=j-1|0;if((p&j|0)!=0){x=(JF(j|0)|0)+33-(JF(i|0)|0)|0;q=64-x|0;r=32-x|0;y=r>>31;z=x-32|0;A=z>>31;s=x;t=r-1>>31&i>>>(z>>>0)|(i<<r|g>>>(x>>>0))&A;u=A&i>>>(x>>>0);v=g<<q&y;w=(i<<q|g>>>(z>>>0))&y|g<<r&x-33>>31;break}if((f|0)!=0){c[f>>2]=p&g;c[f+4>>2]=0}if((j|0)==1){n=h|b&0;o=a|0|0;return(H=n,o)|0}else{p=KF(j|0)|0;n=i>>>(p>>>0)|0;o=i<<32-p|g>>>(p>>>0)|0;return(H=n,o)|0}}}while(0);if((s|0)==0){B=w;C=v;D=u;E=t;F=0;G=0}else{g=d|0|0;d=k|e&0;e=EF(g,d,-1,-1)|0;k=H;i=w;w=v;v=u;u=t;t=s;s=0;while(1){I=w>>>31|i<<1;J=s|w<<1;j=u<<1|i>>>31|0;a=u>>>31|v<<1|0;FF(e,k,j,a)|0;b=H;h=b>>31|((b|0)<0?-1:0)<<1;K=h&1;L=FF(j,a,h&g,(((b|0)<0?-1:0)>>31|((b|0)<0?-1:0)<<1)&d)|0;M=H;b=t-1|0;if((b|0)==0){break}else{i=I;w=J;v=M;u=L;t=b;s=K}}B=I;C=J;D=M;E=L;F=0;G=K}K=C;C=0;if((f|0)!=0){c[f>>2]=E;c[f+4>>2]=D}n=(K|0)>>>31|(B|C)<<1|(C<<1|K>>>31)&0|F;o=(K<<1|0>>>31)&-2|G;return(H=n,o)|0}function SF(a){a=+a;return+T(+a)}function TF(a,b){a=a|0;b=b|0;rc(a|0,b|0)}function UF(a){a=a|0;return tb(a|0)|0}function VF(a,b,c){a=a|0;b=b|0;c=c|0;return nb(a|0,b|0,c|0)|0}function WF(a,b,c){a=a|0;b=b|0;c=c|0;return gc(a|0,b|0,c|0)|0}function XF(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Ma(a|0,b|0,c|0,d|0)|0}function YF(a,b){a=a|0;b=b|0;return Ka(a|0,b|0)|0}function ZF(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;Jb(a|0,b|0,c|0,d|0)}function _F(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;Bc[a&63](b|0,c|0,d|0,e|0,f|0)}function $F(a,b){a=a|0;b=b|0;Cc[a&255](b|0)}function aG(a,b,c){a=a|0;b=b|0;c=c|0;Dc[a&63](b|0,c|0)}function bG(a,b){a=a|0;b=b|0;return Ec[a&63](b|0)|0}function cG(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=+d;e=+e;return Fc[a&7](b|0,c|0,+d,+e)|0}function dG(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;return Gc[a&127](b|0,c|0,d|0,e|0,f|0)|0}function eG(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;return Hc[a&63](b|0,c|0,d|0)|0}function fG(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;Ic[a&15](b|0,c|0,d|0,e|0,f|0,g|0)}function gG(a,b,c,d,e,f,g,h,i){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=+f;g=+g;h=+h;i=+i;return Jc[a&3](b|0,c|0,d|0,e|0,+f,+g,+h,+i)|0}function hG(a,b){a=a|0;b=b|0;return+Kc[a&3](b|0)}function iG(a,b){a=a|0;b=+b;return+Lc[a&3](+b)}function jG(a,b,c,d){a=a|0;b=+b;c=+c;d=+d;return+Mc[a&15](+b,+c,+d)}function kG(a,b,c,d,e,f,g,h,i,j){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;j=j|0;Nc[a&1](b|0,c|0,d|0,e|0,f|0,g|0,h|0,i|0,j|0)}function lG(a,b,c){a=a|0;b=b|0;c=c|0;return Oc[a&255](b|0,c|0)|0}function mG(a){a=a|0;return+Pc[a&3]()}function nG(a){a=a|0;return Qc[a&3]()|0}function oG(a,b,c,d,e,f,g){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=g|0;Rc[a&31](b|0,c|0,d|0,+e,+f,g|0)}function pG(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return Sc[a&127](b|0,c|0,d|0,e|0)|0}function qG(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;Tc[a&127](b|0,c|0,d|0)}function rG(a){a=a|0;Uc[a&3]()}function sG(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;Vc[a&63](b|0,c|0,d|0,e|0)}function tG(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;ea(0)}function uG(a){a=a|0;ea(1)}function vG(a,b){a=a|0;b=b|0;ea(2)}function wG(a){a=a|0;ea(3);return 0}function xG(a,b,c,d){a=a|0;b=b|0;c=+c;d=+d;ea(4);return 0}function yG(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;ea(5);return 0}function zG(a,b,c){a=a|0;b=b|0;c=c|0;ea(6);return 0}function AG(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;ea(7)}function BG(a,b,c,d,e,f,g,h){a=a|0;b=b|0;c=c|0;d=d|0;e=+e;f=+f;g=+g;h=+h;ea(8);return 0}function CG(a){a=a|0;ea(9);return 0.0}function DG(a){a=+a;ea(10);return 0.0}function EG(a,b,c){a=+a;b=+b;c=+c;ea(11);return 0.0}function FG(a,b,c,d,e,f,g,h,i){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;f=f|0;g=g|0;h=h|0;i=i|0;ea(12)}function GG(a,b){a=a|0;b=b|0;ea(13);return 0}function HG(){ea(14);return 0.0}function IG(){ea(15);return 0}function JG(a,b,c,d,e,f){a=a|0;b=b|0;c=c|0;d=+d;e=+e;f=f|0;ea(16)}function KG(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ea(17);return 0}function LG(a,b,c){a=a|0;b=b|0;c=c|0;ea(18)}function MG(){ea(19)}function NG(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;ea(20)}
-
-
-
-
-// EMSCRIPTEN_END_FUNCS
-var Bc=[tG,tG,Mf,tG,sf,tG,JC,tG,oo,tG,xg,tG,tg,tG,cD,tG,Xe,tG,Ye,tG,eg,tG,tf,tG,ug,tG,gv,tG,XC,tG,QD,tG,fg,tG,rD,tG,Nf,tG,tG,tG,tG,tG,tG,tG,tG,tG,tG,tG,tG,tG,tG,tG,tG,tG,tG,tG,tG,tG,tG,tG,tG,tG,tG,tG];var Cc=[uG,uG,NC,uG,sl,uG,hC,uG,eD,uG,iC,uG,kD,uG,WC,uG,TC,uG,Cl,uG,gC,uG,xC,uG,to,uG,HC,uG,dv,uG,tC,uG,Ll,uG,lD,uG,mD,uG,fC,uG,$D,uG,Xu,uG,Xk,uG,Lq,uG,ND,uG,aE,uG,Pu,uG,ZD,uG,rl,uG,iD,uG,FD,uG,PD,uG,nD,uG,pD,uG,SB,uG,jD,uG,wC,uG,uC,uG,_k,uG,xt,uG,ql,uG,SC,uG,sC,uG,Ot,uG,jC,uG,kz,uG,Ty,uG,vC,uG,sE,uG,IC,uG,Ou,uG,UC,uG,CD,uG,po,uG,QC,uG,VC,uG,MC,uG,Ww,uG,OD,uG,PC,uG,Bm,uG,RD,uG,LC,uG,DD,uG,rE,uG,Qh,uG,ez,uG,_D,uG,ED,uG,sk,uG,qD,uG,Uy,uG,st,uG,wo,uG,pA,uG,eF,uG,$k,uG,Mq,uG,nE,uG,$u,uG,fD,uG,uA,uG,yC,uG,RC,uG,NB,uG,gD,uG,rk,uG,oD,uG,iz,uG,sD,uG,Wu,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG,uG];var Dc=[vG,vG,Kl,vG,Ug,vG,Bl,vG,zi,vG,pk,vG,rx,vG,wA,vG,qn,vG,Cm,vG,gE,vG,sA,vG,Hv,vG,hv,vG,bD,vG,AC,vG,Pl,vG,tk,vG,LD,vG,Ul,vG,TF,vG,XD,vG,FC,vG,Al,vG,Gl,vG,yD,vG,vG,vG,vG,vG,vG,vG,vG,vG,vG,vG,vG,vG];var Ec=[wG,wG,UF,wG,mA,wG,dF,wG,TB,wG,Am,wG,jk,wG,ox,wG,lA,wG,ux,wG,Lw,wG,jA,wG,xF,wG,nA,wG,St,wG,Dm,wG,oA,wG,aA,wG,uk,wG,Kw,wG,kA,wG,Tt,wG,iA,wG,Eo,wG,lx,wG,hA,wG,Ro,wG,kk,wG,$w,wG,wG,wG,wG,wG,wG,wG];var Fc=[xG,xG,Yt,xG,Zt,xG,xG,xG];var Gc=[yG,yG,de,yG,Js,yG,me,yG,ke,yG,ne,yG,oe,yG,pe,yG,$d,yG,Ne,yG,je,yG,Fl,yG,Pe,yG,Oe,yG,Ie,yG,Ke,yG,he,yG,He,yG,Me,yG,Je,yG,Le,yG,Qe,yG,qe,yG,ve,yG,we,yG,xe,yG,se,yG,re,yG,ue,yG,te,yG,Zd,yG,_d,yG,Ge,yG,Ae,yG,Be,yG,De,yG,Fe,yG,Ee,yG,ye,yG,ie,yG,Ce,yG,ze,yG,ge,yG,Ol,yG,ce,yG,ae,yG,Sw,yG,le,yG,be,yG,fe,yG,ee,yG,yG,yG,yG,yG,yG,yG,yG,yG,yG,yG,yG,yG,yG,yG,yG,yG,yG,yG,yG,yG,yG,yG,yG,yG,yG,yG];var Hc=[zG,zG,_g,zG,Mt,zG,VF,zG,pz,zG,jx,zG,Py,zG,Zq,zG,Fv,zG,nx,zG,jf,zG,Tw,zG,pf,zG,Xf,zG,Cn,zG,WF,zG,bz,zG,qk,zG,Tg,zG,ry,zG,Pk,zG,Xj,zG,um,zG,eh,zG,Vw,zG,Jf,zG,Df,zG,bg,zG,Sq,zG,Kt,zG,Dt,zG,gh,zG];var Ic=[AG,AG,$C,AG,DC,AG,nC,AG,JD,AG,eE,AG,wD,AG,VD,AG];var Jc=[BG,BG,OB,BG];var Kc=[CG,CG,Gm,CG];var Lc=[DG,DG,SF,DG];var Mc=[EG,EG,ii,EG,hi,EG,fi,EG,gi,EG,EG,EG,EG,EG,EG,EG];var Nc=[FG,FG];var Oc=[GG,GG,Pv,GG,Dp,GG,Ii,GG,Rv,GG,Pi,GG,jg,GG,kg,GG,jz,GG,Di,GG,Ue,GG,yB,GG,Dv,GG,zo,GG,Fi,GG,_z,GG,Zi,GG,Is,GG,Vi,GG,_i,GG,Li,GG,_f,GG,Bh,GG,Hi,GG,xm,GG,Lt,GG,Tl,GG,Xi,GG,Ep,GG,$i,GG,Kr,GG,Ff,GG,cj,GG,Ei,GG,Gi,GG,lg,GG,mg,GG,ng,GG,Ni,GG,Ui,GG,Vu,GG,El,GG,ig,GG,Fg,GG,vx,GG,Nl,GG,ej,GG,Gf,GG,of,GG,Lr,GG,YF,GG,Qi,GG,Tn,GG,Gg,GG,kx,GG,Ki,GG,ag,GG,Jl,GG,Wi,GG,px,GG,gn,GG,Qv,GG,zp,GG,lf,GG,aj,GG,Si,GG,Hg,GG,Ri,GG,bj,GG,tr,GG,Er,GG,Gr,GG,Mi,GG,mf,GG,XE,GG,Rw,GG,Qo,GG,If,GG,Zf,GG,fj,GG,Cv,GG,Ir,GG,Yi,GG,Un,GG,QB,GG,Ve,GG,zF,GG,dj,GG,We,GG,Mr,GG,zv,GG,RB,GG,Vl,GG,hg,GG,gg,GG,Ti,GG,Ji,GG,Co,GG,Oi,GG,mh,GG,LB,GG,gF,GG,Hr,GG,mk,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG,GG];var Pc=[HG,HG,zm,HG];var Qc=[IG,IG,sr,IG];var Rc=[JG,JG,uh,JG,wh,JG,vh,JG,xh,JG,rh,JG,yh,JG,sh,JG,th,JG,JG,JG,JG,JG,JG,JG,JG,JG,JG,JG,JG,JG,JG,JG];var Sc=[KG,KG,Fd,KG,Yf,KG,Od,KG,Uq,KG,Hf,KG,Rk,KG,En,KG,rf,KG,zf,KG,Lf,KG,Aw,KG,kf,KG,Dx,KG,qx,KG,ef,KG,nf,KG,Af,KG,Uf,KG,Sf,KG,Xg,KG,XF,KG,ix,KG,$e,KG,Lz,KG,Ft,KG,Em,KG,zw,KG,Wv,KG,df,KG,Wx,KG,hx,KG,af,KG,Bf,KG,hf,KG,Wf,KG,wm,KG,dg,KG,ff,KG,cz,KG,Qw,KG,Jd,KG,vd,KG,Sd,KG,gf,KG,Ld,KG,Vd,KG,Ef,KG,Tf,KG,Ex,KG,Vf,KG,Ud,KG,Cf,KG,$f,KG,Pr,KG,$q,KG,Zj,KG,wy,KG,yf,KG,KG,KG,KG,KG,KG,KG,KG,KG,KG,KG];var Tc=[LG,LG,xy,LG,Yj,LG,vm,LG,TD,LG,Bx,LG,qA,LG,ZC,LG,KD,LG,Ux,LG,Fx,LG,nj,LG,el,LG,Yx,LG,EC,LG,qj,LG,Et,LG,bE,LG,vw,LG,kC,LG,zC,LG,SD,LG,jq,LG,Tv,LG,WD,LG,aD,LG,Tq,LG,lC,LG,YC,LG,UB,LG,HD,LG,uD,LG,kw,LG,xD,LG,fE,LG,Ai,LG,oC,LG,Sk,LG,lw,LG,oj,LG,kq,LG,zn,LG,Xw,LG,tA,LG,vA,LG,mj,LG,$x,LG,pj,LG,cE,LG,yi,LG,dz,LG,iq,LG,ni,LG,tD,LG,Qk,LG,xA,LG,HB,LG,Dn,LG,rA,LG,_q,LG,BC,LG,Uw,LG,GD,LG,LG,LG];var Uc=[MG,MG,ym,MG];var Vc=[NG,NG,_C,NG,pE,NG,mE,NG,Ml,NG,oE,NG,kE,NG,bf,NG,iE,NG,jE,NG,qE,NG,CC,NG,dE,NG,qf,NG,cg,NG,lE,NG,hD,NG,Dl,NG,mC,NG,ID,NG,ZF,NG,dC,NG,vD,NG,UD,NG,Kf,NG,OC,NG,NG,NG,NG,NG,NG,NG,NG,NG,NG,NG,NG,NG];return{_vizRenderFromString:ld,_strlen:xF,_strcat:AF,_free:eF,_memcmp:wF,_strncpy:DF,_memmove:uF,_tolower:yF,_saveSetjmp:BF,_memset:vF,_malloc:dF,_memcpy:tF,_realloc:gF,_strcpy:zF,_calloc:fF,_testSetjmp:CF,runPostSets:kd,stackAlloc:Wc,stackSave:Xc,stackRestore:Yc,setThrew:Zc,setTempRet0:ad,setTempRet1:bd,setTempRet2:cd,setTempRet3:dd,setTempRet4:ed,setTempRet5:fd,setTempRet6:gd,setTempRet7:hd,setTempRet8:id,setTempRet9:jd,dynCall_viiiii:_F,dynCall_vi:$F,dynCall_vii:aG,dynCall_ii:bG,dynCall_iiiff:cG,dynCall_iiiiii:dG,dynCall_iiii:eG,dynCall_viiiiii:fG,dynCall_iiiiidddd:gG,dynCall_di:hG,dynCall_dd:iG,dynCall_dddd:jG,dynCall_viiiiiiiii:kG,dynCall_iii:lG,dynCall_d:mG,dynCall_i:nG,dynCall_viiiddi:oG,dynCall_iiiii:pG,dynCall_viii:qG,dynCall_v:rG,dynCall_viiii:sG}
-// EMSCRIPTEN_END_ASM
-
-})({Math:Math,
-Int8Array:Int8Array,Int16Array:Int16Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array},{abort:aa,assert:J,asmPrintInt:function(a,b){e.print("int "+a+","+b)},asmPrintFloat:function(a,b){e.print("float "+a+","+b)},min:va,invoke_viiiii:function(a,b,c,d,g,i){try{e.dynCall_viiiii(a,b,c,d,g,i)}catch(h){"number"!==typeof h&&"longjmp"!==h&&k(h),u.setThrew(1,0)}},invoke_vi:function(a,b){try{e.dynCall_vi(a,b)}catch(c){"number"!==
-typeof c&&"longjmp"!==c&&k(c),u.setThrew(1,0)}},invoke_vii:function(a,b,c){try{e.dynCall_vii(a,b,c)}catch(d){"number"!==typeof d&&"longjmp"!==d&&k(d),u.setThrew(1,0)}},invoke_ii:function(a,b){try{return e.dynCall_ii(a,b)}catch(c){"number"!==typeof c&&"longjmp"!==c&&k(c),u.setThrew(1,0)}},invoke_iiiff:function(a,b,c,d,g){try{return e.dynCall_iiiff(a,b,c,d,g)}catch(i){"number"!==typeof i&&"longjmp"!==i&&k(i),u.setThrew(1,0)}},invoke_iiiiii:function(a,b,c,d,g,i){try{return e.dynCall_iiiiii(a,b,c,d,g,
-i)}catch(h){"number"!==typeof h&&"longjmp"!==h&&k(h),u.setThrew(1,0)}},invoke_iiii:function(a,b,c,d){try{return e.dynCall_iiii(a,b,c,d)}catch(g){"number"!==typeof g&&"longjmp"!==g&&k(g),u.setThrew(1,0)}},invoke_viiiiii:function(a,b,c,d,g,i,h){try{e.dynCall_viiiiii(a,b,c,d,g,i,h)}catch(j){"number"!==typeof j&&"longjmp"!==j&&k(j),u.setThrew(1,0)}},invoke_iiiiidddd:function(a,b,c,d,g,i,h,j,l){try{return e.dynCall_iiiiidddd(a,b,c,d,g,i,h,j,l)}catch(n){"number"!==typeof n&&"longjmp"!==n&&k(n),u.setThrew(1,
-0)}},invoke_di:function(a,b){try{return e.dynCall_di(a,b)}catch(c){"number"!==typeof c&&"longjmp"!==c&&k(c),u.setThrew(1,0)}},invoke_dd:function(a,b){try{return e.dynCall_dd(a,b)}catch(c){"number"!==typeof c&&"longjmp"!==c&&k(c),u.setThrew(1,0)}},invoke_dddd:function(a,b,c,d){try{return e.dynCall_dddd(a,b,c,d)}catch(g){"number"!==typeof g&&"longjmp"!==g&&k(g),u.setThrew(1,0)}},invoke_viiiiiiiii:function(a,b,c,d,g,i,h,j,l,n){try{e.dynCall_viiiiiiiii(a,b,c,d,g,i,h,j,l,n)}catch(m){"number"!==typeof m&&
-"longjmp"!==m&&k(m),u.setThrew(1,0)}},invoke_iii:function(a,b,c){try{return e.dynCall_iii(a,b,c)}catch(d){"number"!==typeof d&&"longjmp"!==d&&k(d),u.setThrew(1,0)}},invoke_d:function(a){try{return e.dynCall_d(a)}catch(b){"number"!==typeof b&&"longjmp"!==b&&k(b),u.setThrew(1,0)}},invoke_i:function(a){try{return e.dynCall_i(a)}catch(b){"number"!==typeof b&&"longjmp"!==b&&k(b),u.setThrew(1,0)}},invoke_viiiddi:function(a,b,c,d,g,i,h){try{e.dynCall_viiiddi(a,b,c,d,g,i,h)}catch(j){"number"!==typeof j&&
-"longjmp"!==j&&k(j),u.setThrew(1,0)}},invoke_iiiii:function(a,b,c,d,g){try{return e.dynCall_iiiii(a,b,c,d,g)}catch(i){"number"!==typeof i&&"longjmp"!==i&&k(i),u.setThrew(1,0)}},invoke_viii:function(a,b,c,d){try{e.dynCall_viii(a,b,c,d)}catch(g){"number"!==typeof g&&"longjmp"!==g&&k(g),u.setThrew(1,0)}},invoke_v:function(a){try{e.dynCall_v(a)}catch(b){"number"!==typeof b&&"longjmp"!==b&&k(b),u.setThrew(1,0)}},invoke_viiii:function(a,b,c,d,g){try{e.dynCall_viiii(a,b,c,d,g)}catch(i){"number"!==typeof i&&
-"longjmp"!==i&&k(i),u.setThrew(1,0)}},_llvm_lifetime_end:M(),_lseek:Pb,__scanString:Q,_fclose:function(a){Mb(a);return Lb(a)},_fflush:M(),_strtol:Ab,_fputc:ra,_strtok:function(a,b){return Fb(a,b,dc)},_fwrite:Db,_send:function(a,b,c){return!K.ae(a)?(H(g.H),-1):Ba(a,b,c)},_fputs:Qb,_tmpnam:Fa,_isspace:yb,_read:fb,_ceil:Hc,_fileno:function(a){return a},_strstr:function(a,b){var c=0,d;do{c||(d=a,c=b);var e=v[a++|0],g=v[c++|0];if(0==g)return d;g!=e&&(a=d+1,c=0)}while(e);return 0},_fsync:Mb,_isblank:function(a){return 32==
-a||9==a},_fmod:function(a,b){return a%b},_strcmp:function(a,b){return xb(a,b,ha)},_strncmp:xb,_tmpfile:Ra,_snprintf:hb,_fgetc:Ea,__getFloat:Bb,_hypot:function(a,b){return Math.sqrt(a*a+b*b)},_fgets:function(a,b,c){var e=d.D(c);if(!e||e.error||e.Ua)return 0;for(var g,i=0;i<b-1&&10!=g;i++){g=Ea(c);if(-1==g){if(e.error||e.Ua&&0==i)return 0;if(e.Ua)break}v[a+i|0]=g}v[a+i|0]=0;return a},_close:Lb,_getgid:function(){return 0},_strchr:function(a,b){a--;do{a++;var c=v[a];if(c==b)return a}while(c);return 0},
-_asin:Ic,_puts:function(a){var b=t[ma>>2],a=Qb(a,b);return 0>a?a:0>ra(10,b)?-1:a+1},___setErrNo:H,_access:function(a,b){a=R(a);if(b&-8)return H(g.B),-1;var c;try{c=d.F(a,{T:q}).k}catch(e){return d.sa(e),-1}var l="";b&4&&(l+="r");b&2&&(l+="w");b&1&&(l+="x");return l&&d.Da(c,l)?(H(g.mc),-1):0},_ftell:function(a){a=d.D(a);return!a?(H(g.H),-1):d.vb(a.k.mode)?(H(g.nb),-1):a.position},_exit:function(a){Gb(a)},_sprintf:Cb,_strrchr:function(a,b){var c=a+Aa(a);do{if(v[c]==b)return c;c--}while(c>=a);return 0},
-_copysign:function(a,b){return Pa(a)===Pa(b)?a:-a},_recv:function(a,b,c){return!K.ae(a)?(H(g.H),-1):fb(a,b,c)},_cos:uc,_putchar:function(a){return ra(a,t[ma>>2])},_isalnum:function(a){return 48<=a&&57>=a||97<=a&&122>=a||65<=a&&90>=a},_times:function(a){0!==a&&cc(a,0,16);return 0},_bsearch:function(a,b,c,d,g){for(var i=0,h,j,l;i<c;)if(h=i+c>>>1,l=b+h*d,j=e.dynCall_iii(g,a,l),0>j)c=h;else if(0<j)i=h+1;else return l;return 0},__exit:Gb,_isupper:function(a){return 65<=a&&90>=a},_rand:function(){return Math.floor(2147483648*
-Math.random())},_fabsf:Jc,_setlocale:Qa,_bcopy:function(a,b,c){bc(b,a,c)},_toupper:function(a){return 97<=a&&122>=a?a-97+65:a},_pread:function(a,b,c,e){a=d.D(a);if(!a)return H(g.H),-1;try{return d.P(a,v,b,c,e)}catch(l){return d.sa(l),-1}},_fopen:Kb,_open:Jb,_sqrtf:Kc,_sysconf:function(a){switch(a){case 30:return 4096;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 79:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:return 200809;
-case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;
-case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1E3;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:return 1}H(g.B);return-1},_putenv:function(a){if(0===a)return H(g.B),-1;var a=R(a),
-b=a.indexOf("=");if(""===a||-1===a.indexOf("="))return H(g.B),-1;var c=a.slice(0,b),a=a.slice(b+1);if(!(c in U)||U[c]!==a)U[c]=a,Ca(U);return 0},_qsort:function(a,b,c,d){if(!(0==b||0==c)){for(var g=[],i=0;i<b;i++)g.push(i);g.sort(function(b,g){return e.dynCall_iii(d,a+b*c,a+g*c)});var h=ia(b*c);Za(h,a,b*c);for(i=0;i<b;i++)g[i]!=i&&Za(a+i*c,h+g[i]*c,c);Ib(h)}},_isalpha:function(a){return 97<=a&&122>=a||65<=a&&90>=a},_strdup:function(a){var b=Aa(a),c=ia(b+1);Za(c,a,b)|0;v[c+b|0]=0;return c},_log10:function(a){return Math.log(a)/
-Math.LN10},_fread:Nb,_isatty:function(a){a=d.D(a);return!a?(H(g.H),0):!a.aa?(H(g.vd),0):1},__formatString:gb,_getenv:Da,_atoi:function(a){return Ab(a,r,10)},_vfprintf:function(a,b,c){return Eb(a,b,t[c>>2])},_llvm_pow_f64:Lc,_sbrk:Rb,___errno_location:function(){return Na},_strerror:ya,_fstat:function(a,b){var c=d.D(a);return!c?(H(g.H),-1):Ob(c.path,b)},_llvm_lifetime_start:M(),__parseInt:zb,_vsprintf:function(a,b,c){return Cb(a,b,t[c>>2])},_vsnprintf:function(a,b,c,d){return hb(a,b,c,t[d>>2])},_sscanf:function(a,
-b,c){var d=0;return Q(b,function(){return v[a+d++|0]},function(){d--},c)},_feof:function(a){a=d.D(a);return Number(a&&a.Ua)},___assert_fail:function(a,b,c,d){ba=q;k("Assertion failed: "+R(a)+", at: "+[b?R(b):"unknown filename",c,d?R(d):"unknown function"]+" at "+bb())},_srand:M(),_strtok_r:Fb,_abort:function(){e.abort()},_fprintf:Eb,_tan:wc,___buildEnvironment:Ca,_fabs:Dc,_floor:zc,__reallyNegative:Pa,_fseek:function(a,b,c){if(-1==Pb(a,b,c))return-1;a=d.D(a);a.Ua=G;return 0},_sqrt:sc,_write:Ba,_sin:vc,
-_stat:Ob,_longjmp:function(a,b){u.setThrew(a,b||1);k("longjmp")},_strpbrk:function(a,b){for(var c,d={};;){c=v[b++|0];if(!c)break;d[c]=1}for(;;){c=v[a];if(!c)break;if(c in d)return a;a++}return 0},_llvm_va_end:M(),_acos:Cc,_pwrite:function(a,b,c,e){a=d.D(a);if(!a)return H(g.H),-1;try{return d.write(a,v,b,c,e)}catch(l){return d.sa(l),-1}},_strerror_r:wb,_atan2:yc,_exp:xc,_time:function(a){var b=Math.floor(Date.now()/1E3);a&&(t[a>>2]=b);return b},STACKTOP:X,STACK_MAX:nb,tempDoublePtr:sa,ABORT:ba,cttz_i8:Nc,
-ctlz_i8:Mc,NaN:NaN,Infinity:Infinity,_stderr:Ha,_stdout:ma,_stdin:Ga,___fsmu8:p},$);e._vizRenderFromString=u._vizRenderFromString;var Aa=e._strlen=u._strlen,Bc=e._strcat=u._strcat,Ib=e._free=u._free,rc=e._memcmp=u._memcmp,Gc=e._strncpy=u._strncpy,bc=e._memmove=u._memmove,tc=e._tolower=u._tolower,Ec=e._saveSetjmp=u._saveSetjmp,cc=e._memset=u._memset,ia=e._malloc=u._malloc,Za=e._memcpy=u._memcpy;e._realloc=u._realloc;var Ac=e._strcpy=u._strcpy;e._calloc=u._calloc;var Fc=e._testSetjmp=u._testSetjmp,
-qc=e.runPostSets=u.runPostSets;e.dynCall_viiiii=u.dynCall_viiiii;e.dynCall_vi=u.dynCall_vi;e.dynCall_vii=u.dynCall_vii;e.dynCall_ii=u.dynCall_ii;e.dynCall_iiiff=u.dynCall_iiiff;e.dynCall_iiiiii=u.dynCall_iiiiii;e.dynCall_iiii=u.dynCall_iiii;e.dynCall_viiiiii=u.dynCall_viiiiii;e.dynCall_iiiiidddd=u.dynCall_iiiiidddd;e.dynCall_di=u.dynCall_di;e.dynCall_dd=u.dynCall_dd;e.dynCall_dddd=u.dynCall_dddd;e.dynCall_viiiiiiiii=u.dynCall_viiiiiiiii;e.dynCall_iii=u.dynCall_iii;e.dynCall_d=u.dynCall_d;e.dynCall_i=
-u.dynCall_i;e.dynCall_viiiddi=u.dynCall_viiiddi;e.dynCall_iiiii=u.dynCall_iiiii;e.dynCall_viii=u.dynCall_viii;e.dynCall_v=u.dynCall_v;e.dynCall_viiii=u.dynCall_viiii;l.hd=function(a){return u.stackAlloc(a)};l.kd=function(){return u.stackSave()};l.jd=function(a){u.stackRestore(a)};var za=function(){function a(a,b){this.C=a|0;this.K=b|0}function b(a,b){a!=r&&("number"==typeof a?this.ea(a):b==r&&"string"!=typeof a?this.Q(a,256):this.Q(a,b))}function c(){return new b(r)}function d(a,b){var c=l[a.charCodeAt(b)];
-return c==r?-1:c}function e(a){var b=c();b.za(a);return b}function g(a){var b=1,c;if(0!=(c=a>>>16))a=c,b+=16;if(0!=(c=a>>8))a=c,b+=8;if(0!=(c=a>>4))a=c,b+=4;if(0!=(c=a>>2))a=c,b+=2;0!=a>>1&&(b+=1);return b}function h(a){this.R=a}function j(a){this.R=a;this.ke=a.Cf();this.le=this.ke&32767;this.Tf=this.ke>>15;this.pg=(1<<a.A-15)-1;this.Uf=2*a.g}a.zd={};a.za=function(b){if(-128<=b&&128>b){var c=a.zd[b];if(c)return c}c=new a(b|0,0>b?-1:0);-128<=b&&128>b&&(a.zd[b]=c);return c};a.ea=function(b){return isNaN(b)||
-!isFinite(b)?a.ZERO:b<=-a.Cd?a.MIN_VALUE:b+1>=a.Cd?a.MAX_VALUE:0>b?a.ea(-b).G():new a(b%a.va|0,b/a.va|0)};a.ra=function(b,c){return new a(b,c)};a.Q=function(b,c){0==b.length&&k(Error("number format error: empty string"));var d=c||10;(2>d||36<d)&&k(Error("radix out of range: "+d));if("-"==b.charAt(0))return a.Q(b.substring(1),d).G();0<=b.indexOf("-")&&k(Error('number format error: interior "-" character: '+b));for(var e=a.ea(Math.pow(d,8)),f=a.ZERO,g=0;g<b.length;g+=8){var i=Math.min(8,b.length-g),
-h=parseInt(b.substring(g,g+i),d);8>i?(i=a.ea(Math.pow(d,i)),f=f.multiply(i).add(a.ea(h))):(f=f.multiply(e),f=f.add(a.ea(h)))}return f};a.rc=65536;a.gi=16777216;a.va=a.rc*a.rc;a.hi=a.va/2;a.ii=a.va*a.rc;a.Te=a.va*a.va;a.Cd=a.Te/2;a.ZERO=a.za(0);a.ONE=a.za(1);a.Ad=a.za(-1);a.MAX_VALUE=a.ra(-1,2147483647);a.MIN_VALUE=a.ra(0,-2147483648);a.Bd=a.za(16777216);a.prototype.kc=function(){return this.K*a.va+this.uf()};a.prototype.toString=function(b){b=b||10;(2>b||36<b)&&k(Error("radix out of range: "+b));
-if(this.Ma())return"0";if(this.U()){if(this.ca(a.MIN_VALUE)){var c=a.ea(b),d=this.Ja(c),c=d.multiply(c).Eb(this);return d.toString(b)+c.C.toString(b)}return"-"+this.G().toString(b)}for(var d=a.ea(Math.pow(b,6)),c=this,e="";;){var f=c.Ja(d),g=c.Eb(f.multiply(d)).C.toString(b),c=f;if(c.Ma())return g+e;for(;6>g.length;)g="0"+g;e=""+g+e}};a.prototype.uf=function(){return 0<=this.C?this.C:a.va+this.C};a.prototype.Ma=function(){return 0==this.K&&0==this.C};a.prototype.U=function(){return 0>this.K};a.prototype.ge=
-function(){return 1==(this.C&1)};a.prototype.ca=function(a){return this.K==a.K&&this.C==a.C};a.prototype.ie=function(a){return 0>this.yc(a)};a.prototype.yf=function(a){return 0<this.yc(a)};a.prototype.zf=function(a){return 0<=this.yc(a)};a.prototype.yc=function(a){if(this.ca(a))return 0;var b=this.U(),c=a.U();return b&&!c?-1:!b&&c?1:this.Eb(a).U()?-1:1};a.prototype.G=function(){return this.ca(a.MIN_VALUE)?a.MIN_VALUE:this.Xf().add(a.ONE)};a.prototype.add=function(b){var c=this.K>>>16,d=this.K&65535,
-e=this.C>>>16,f=b.K>>>16,g=b.K&65535,i=b.C>>>16,h;h=0+((this.C&65535)+(b.C&65535));b=0+(h>>>16);b+=e+i;e=0+(b>>>16);e+=d+g;d=0+(e>>>16);d=d+(c+f)&65535;return a.ra((b&65535)<<16|h&65535,d<<16|e&65535)};a.prototype.Eb=function(a){return this.add(a.G())};a.prototype.multiply=function(b){if(this.Ma()||b.Ma())return a.ZERO;if(this.ca(a.MIN_VALUE))return b.ge()?a.MIN_VALUE:a.ZERO;if(b.ca(a.MIN_VALUE))return this.ge()?a.MIN_VALUE:a.ZERO;if(this.U())return b.U()?this.G().multiply(b.G()):this.G().multiply(b).G();
-if(b.U())return this.multiply(b.G()).G();if(this.ie(a.Bd)&&b.ie(a.Bd))return a.ea(this.kc()*b.kc());var c=this.K>>>16,d=this.K&65535,e=this.C>>>16,f=this.C&65535,g=b.K>>>16,i=b.K&65535,h=b.C>>>16,b=b.C&65535,j,l,m,n;n=0+f*b;m=0+(n>>>16);m+=e*b;l=0+(m>>>16);m=(m&65535)+f*h;l+=m>>>16;m&=65535;l+=d*b;j=0+(l>>>16);l=(l&65535)+e*h;j+=l>>>16;l&=65535;l+=f*i;j+=l>>>16;l&=65535;j=j+(c*b+d*h+e*i+f*g)&65535;return a.ra(m<<16|n&65535,j<<16|l)};a.prototype.Ja=function(b){b.Ma()&&k(Error("division by zero"));
-if(this.Ma())return a.ZERO;if(this.ca(a.MIN_VALUE)){if(b.ca(a.ONE)||b.ca(a.Ad))return a.MIN_VALUE;if(b.ca(a.MIN_VALUE))return a.ONE;var c=this.ng().Ja(b).shiftLeft(1);if(c.ca(a.ZERO))return b.U()?a.ONE:a.Ad;var d=this.Eb(b.multiply(c));return c.add(d.Ja(b))}if(b.ca(a.MIN_VALUE))return a.ZERO;if(this.U())return b.U()?this.G().Ja(b.G()):this.G().Ja(b).G();if(b.U())return this.Ja(b.G()).G();for(var e=a.ZERO,d=this;d.zf(b);){for(var c=Math.max(1,Math.floor(d.kc()/b.kc())),f=Math.ceil(Math.log(c)/Math.LN2),
-f=48>=f?1:Math.pow(2,f-48),g=a.ea(c),i=g.multiply(b);i.U()||i.yf(d);)c-=f,g=a.ea(c),i=g.multiply(b);g.Ma()&&(g=a.ONE);e=e.add(g);d=d.Eb(i)}return e};a.prototype.Xf=function(){return a.ra(~this.C,~this.K)};a.prototype.shiftLeft=function(b){b&=63;if(0==b)return this;var c=this.C;return 32>b?a.ra(c<<b,this.K<<b|c>>>32-b):a.ra(0,c<<b-32)};a.prototype.ng=function(){var b;b=1;if(0==b)return this;var c=this.K;return 32>b?a.ra(this.C>>>b|c<<32-b,c>>b):a.ra(c>>b-32,0<=c?0:-1)};b.prototype.Ga=function(a,b,
-c,d,e,f){for(;0<=--f;){var g=b*this[a++]+c[d]+e,e=Math.floor(g/67108864);c[d++]=g&67108863}return e};b.prototype.A=26;b.prototype.ha=67108863;b.prototype.X=67108864;b.prototype.Qe=Math.pow(2,52);b.prototype.xd=26;b.prototype.yd=0;var l=[],n,m;n=48;for(m=0;9>=m;++m)l[n++]=m;n=97;for(m=10;36>m;++m)l[n++]=m;n=65;for(m=10;36>m;++m)l[n++]=m;h.prototype.Id=function(a){return 0>a.p||0<=a.ya(this.R)?a.Pf(this.R):a};h.prototype.ve=function(a){return a};h.prototype.reduce=function(a){a.tb(this.R,r,a)};h.prototype.me=
-function(a,b,c){a.Vc(b,c);this.reduce(c)};h.prototype.ye=function(a,b){a.ze(b);this.reduce(b)};j.prototype.Id=function(a){var d=c();a.abs().Tb(this.R.g,d);d.tb(this.R,r,d);0>a.p&&0<d.ya(b.ZERO)&&this.R.W(d,d);return d};j.prototype.ve=function(a){var b=c();a.copyTo(b);this.reduce(b);return b};j.prototype.reduce=function(a){for(;a.g<=this.Uf;)a[a.g++]=0;for(var b=0;b<this.R.g;++b){var c=a[b]&32767,d=c*this.le+((c*this.Tf+(a[b]>>15)*this.le&this.pg)<<15)&a.ha,c=b+this.R.g;for(a[c]+=this.R.Ga(0,d,a,b,
-0,this.R.g);a[c]>=a.X;)a[c]-=a.X,a[++c]++}a.ia();a.Qd(this.R.g,a);0<=a.ya(this.R)&&a.W(this.R,a)};j.prototype.me=function(a,b,c){a.Vc(b,c);this.reduce(c)};j.prototype.ye=function(a,b){a.ze(b);this.reduce(b)};b.prototype.copyTo=function(a){for(var b=this.g-1;0<=b;--b)a[b]=this[b];a.g=this.g;a.p=this.p};b.prototype.za=function(a){this.g=1;this.p=0>a?-1:0;0<a?this[0]=a:-1>a?this[0]=a+DV:this.g=0};b.prototype.Q=function(a,c){var e;if(16==c)e=4;else if(8==c)e=3;else if(256==c)e=8;else if(2==c)e=1;else if(32==
-c)e=5;else if(4==c)e=2;else{this.rf(a,c);return}this.p=this.g=0;for(var g=a.length,i=G,h=0;0<=--g;){var j=8==e?a[g]&255:d(a,g);0>j?"-"==a.charAt(g)&&(i=q):(i=G,0==h?this[this.g++]=j:h+e>this.A?(this[this.g-1]|=(j&(1<<this.A-h)-1)<<h,this[this.g++]=j>>this.A-h):this[this.g-1]|=j<<h,h+=e,h>=this.A&&(h-=this.A))}8==e&&0!=(a[0]&128)&&(this.p=-1,0<h&&(this[this.g-1]|=(1<<this.A-h)-1<<h));this.ia();i&&b.ZERO.W(this,this)};b.prototype.ia=function(){for(var a=this.p&this.ha;0<this.g&&this[this.g-1]==a;)--this.g};
-b.prototype.Tb=function(a,b){var c;for(c=this.g-1;0<=c;--c)b[c+a]=this[c];for(c=a-1;0<=c;--c)b[c]=0;b.g=this.g+a;b.p=this.p};b.prototype.Qd=function(a,b){for(var c=a;c<this.g;++c)b[c-a]=this[c];b.g=Math.max(this.g-a,0);b.p=this.p};b.prototype.he=function(a,b){var c=a%this.A,d=this.A-c,e=(1<<d)-1,f=Math.floor(a/this.A),g=this.p<<c&this.ha,i;for(i=this.g-1;0<=i;--i)b[i+f+1]=this[i]>>d|g,g=(this[i]&e)<<c;for(i=f-1;0<=i;--i)b[i]=0;b[f]=g;b.g=this.g+f+1;b.p=this.p;b.ia()};b.prototype.cg=function(a,b){b.p=
-this.p;var c=Math.floor(a/this.A);if(c>=this.g)b.g=0;else{var d=a%this.A,e=this.A-d,f=(1<<d)-1;b[0]=this[c]>>d;for(var g=c+1;g<this.g;++g)b[g-c-1]|=(this[g]&f)<<e,b[g-c]=this[g]>>d;0<d&&(b[this.g-c-1]|=(this.p&f)<<e);b.g=this.g-c;b.ia()}};b.prototype.W=function(a,b){for(var c=0,d=0,e=Math.min(a.g,this.g);c<e;)d+=this[c]-a[c],b[c++]=d&this.ha,d>>=this.A;if(a.g<this.g){for(d-=a.p;c<this.g;)d+=this[c],b[c++]=d&this.ha,d>>=this.A;d+=this.p}else{for(d+=this.p;c<a.g;)d-=a[c],b[c++]=d&this.ha,d>>=this.A;
-d-=a.p}b.p=0>d?-1:0;-1>d?b[c++]=this.X+d:0<d&&(b[c++]=d);b.g=c;b.ia()};b.prototype.Vc=function(a,c){var d=this.abs(),e=a.abs(),f=d.g;for(c.g=f+e.g;0<=--f;)c[f]=0;for(f=0;f<e.g;++f)c[f+d.g]=d.Ga(0,e[f],c,f,0,d.g);c.p=0;c.ia();this.p!=a.p&&b.ZERO.W(c,c)};b.prototype.ze=function(a){for(var b=this.abs(),c=a.g=2*b.g;0<=--c;)a[c]=0;for(c=0;c<b.g-1;++c){var d=b.Ga(c,b[c],a,2*c,0,1);if((a[c+b.g]+=b.Ga(c+1,2*b[c],a,2*c+1,d,b.g-c-1))>=b.X)a[c+b.g]-=b.X,a[c+b.g+1]=1}0<a.g&&(a[a.g-1]+=b.Ga(c,b[c],a,2*c,0,1));
-a.p=0;a.ia()};b.prototype.tb=function(a,d,e){var f=a.abs();if(!(0>=f.g)){var h=this.abs();if(h.g<f.g)d!=r&&d.za(0),e!=r&&this.copyTo(e);else{e==r&&(e=c());var j=c(),l=this.p,a=a.p,m=this.A-g(f[f.g-1]);0<m?(f.he(m,j),h.he(m,e)):(f.copyTo(j),h.copyTo(e));f=j.g;h=j[f-1];if(0!=h){var n=h*(1<<this.xd)+(1<f?j[f-2]>>this.yd:0),s=this.Qe/n,n=(1<<this.xd)/n,u=1<<this.yd,t=e.g,x=t-f,v=d==r?c():d;j.Tb(x,v);0<=e.ya(v)&&(e[e.g++]=1,e.W(v,e));b.ONE.Tb(f,v);for(v.W(j,j);j.g<f;)j[j.g++]=0;for(;0<=--x;){var z=e[--t]==
-h?this.ha:Math.floor(e[t]*s+(e[t-1]+u)*n);if((e[t]+=j.Ga(0,z,e,x,0,f))<z){j.Tb(x,v);for(e.W(v,e);e[t]<--z;)e.W(v,e)}}d!=r&&(e.Qd(f,d),l!=a&&b.ZERO.W(d,d));e.g=f;e.ia();0<m&&e.cg(m,e);0>l&&b.ZERO.W(e,e)}}}};b.prototype.Cf=function(){if(1>this.g)return 0;var a=this[0];if(0==(a&1))return 0;var b=a&3,b=b*(2-(a&15)*b)&15,b=b*(2-(a&255)*b)&255,b=b*(2-((a&65535)*b&65535))&65535,b=b*(2-a*b%this.X)%this.X;return 0<b?this.X-b:-b};b.prototype.exp=function(a,d){if(4294967295<a||1>a)return b.ONE;var e=c(),f=c(),
-h=d.Id(this),j=g(a)-1;for(h.copyTo(e);0<=--j;)if(d.ye(e,f),0<(a&1<<j))d.me(f,h,e);else var l=e,e=f,f=l;return d.ve(e)};b.prototype.toString=function(a){if(0>this.p)return"-"+this.G().toString(a);if(16==a)a=4;else if(8==a)a=3;else if(2==a)a=1;else if(32==a)a=5;else if(4==a)a=2;else return this.og(a);var b=(1<<a)-1,c,d=G,e="",f=this.g,g=this.A-f*this.A%a;if(0<f--){if(g<this.A&&0<(c=this[f]>>g))d=q,e="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c);for(;0<=f;)g<a?(c=(this[f]&(1<<g)-1)<<a-g,c|=this[--f]>>
-(g+=this.A-a)):(c=this[f]>>(g-=a)&b,0>=g&&(g+=this.A,--f)),0<c&&(d=q),d&&(e+="0123456789abcdefghijklmnopqrstuvwxyz".charAt(c))}return d?e:"0"};b.prototype.G=function(){var a=c();b.ZERO.W(this,a);return a};b.prototype.abs=function(){return 0>this.p?this.G():this};b.prototype.ya=function(a){var b=this.p-a.p;if(0!=b)return b;var c=this.g,b=c-a.g;if(0!=b)return 0>this.p?-b:b;for(;0<=--c;)if(0!=(b=this[c]-a[c]))return b;return 0};b.prototype.Pf=function(a){var d=c();this.abs().tb(a,r,d);0>this.p&&0<d.ya(b.ZERO)&&
-a.W(d,d);return d};b.ZERO=e(0);b.ONE=e(1);b.prototype.rf=function(a,c){this.za(0);c==r&&(c=10);for(var e=this.Ob(c),g=Math.pow(c,e),i=G,h=0,j=0,l=0;l<a.length;++l){var m=d(a,l);0>m?"-"==a.charAt(l)&&0==this.gd()&&(i=q):(j=c*j+m,++h>=e&&(this.Nd(g),this.Md(j),j=h=0))}0<h&&(this.Nd(Math.pow(c,h)),this.Md(j));i&&b.ZERO.W(this,this)};b.prototype.Ob=function(a){return Math.floor(Math.LN2*this.A/Math.log(a))};b.prototype.gd=function(){return 0>this.p?-1:0>=this.g||1==this.g&&0>=this[0]?0:1};b.prototype.Nd=
-function(a){this[this.g]=this.Ga(0,a-1,this,0,0,this.g);++this.g;this.ia()};b.prototype.Md=function(a){var b=0;if(0!=a){for(;this.g<=b;)this[this.g++]=0;for(this[b]+=a;this[b]>=this.X;)this[b]-=this.X,++b>=this.g&&(this[this.g++]=0),++this[b]}};b.prototype.og=function(a){a==r&&(a=10);if(0==this.gd()||2>a||36<a)return"0";var b=this.Ob(a),b=Math.pow(a,b),d=e(b),f=c(),g=c(),h="";for(this.tb(d,f,g);0<f.gd();)h=(b+g.fe()).toString(a).substr(1)+h,f.tb(d,f,g);return g.fe().toString(a)+h};b.prototype.fe=
-function(){if(0>this.p){if(1==this.g)return this[0]-this.X;if(0==this.g)return-1}else{if(1==this.g)return this[0];if(0==this.g)return 0}return(this[1]&(1<<32-this.A)-1)<<this.A|this[0]};b.prototype.sc=function(a,b){for(var c=0,d=0,e=Math.min(a.g,this.g);c<e;)d+=this[c]+a[c],b[c++]=d&this.ha,d>>=this.A;if(a.g<this.g){for(d+=a.p;c<this.g;)d+=this[c],b[c++]=d&this.ha,d>>=this.A;d+=this.p}else{for(d+=this.p;c<a.g;)d+=a[c],b[c++]=d&this.ha,d>>=this.A;d+=a.p}b.p=0>d?-1:0;0<d?b[c++]=d:-1>d&&(b[c++]=this.X+
-d);b.g=c;b.ia()};var s={abs:function(b,c){var d=new a(b,c),d=d.U()?d.G():d;t[sa>>2]=d.C;t[sa+4>>2]=d.K},Sd:function(){s.of||(s.of=q,s.Ce=new b,s.Ce.Q("4294967296",10),s.od=new b,s.od.Q("18446744073709551616",10),s.wj=new b,s.xj=new b)},Wi:function(a,c){var d=new b;d.Q(c.toString(),10);var e=new b;d.Vc(s.Ce,e);d=new b;d.Q(a.toString(),10);var f=new b;d.sc(e,f);return f},stringify:function(c,d,e){c=(new a(c,d)).toString();e&&"-"==c[0]&&(s.Sd(),e=new b,e.Q(c,10),c=new b,s.od.sc(e,c),c=c.toString(10));
-return c},Q:function(c,d,e,f,g){s.Sd();var h=new b;h.Q(c,d);c=new b;c.Q(e,10);e=new b;e.Q(f,10);g&&0>h.ya(b.ZERO)&&(f=new b,h.sc(s.od,f),h=f);f=G;0>h.ya(c)?(h=c,f=q):0<h.ya(e)&&(h=e,f=q);h=a.Q(h.toString());t[sa>>2]=h.C;t[sa+4>>2]=h.K;f&&k("range error")}};return s}();jb.prototype=Error();var Tb,Ta=r,xa=function b(){!e.calledRun&&mb&&kb();e.calledRun||(xa=b)};e.callMain=e.vi=function(b){function c(){for(var b=0;3>b;b++)g.push(0)}J(0==fa,"cannot call main when async dependencies remain! (listen on __ATMAIN__)");
-J(0==cb.length,"cannot call main when preRun functions remain to be called");b=b||[];Wa&&Ta!==r&&e.ab("preload time: "+(Date.now()-Ta)+" ms");Sa||(Sa=q,qa(ka));var d=b.length+1,g=[D(V("/bin/this.program"),"i8",ja)];c();for(var i=0;i<d-1;i+=1)g.push(D(V(b[i]),"i8",ja)),c();g.push(0);g=D(g,"i32",ja);Tb=X;try{var h=e._main(d,g,0);e.noExitRuntime||Sb(h)}catch(j){j instanceof jb||("SimulateInfiniteLoop"==j?e.noExitRuntime=q:(j&&("object"===typeof j&&j.stack)&&e.ab("exception thrown: "+[j,j.stack]),k(j)))}finally{}};
-e.run=e.oj=kb;e.exit=e.Di=Sb;e.abort=e.abort=aa;if(e.preInit)for("function"==typeof e.preInit&&(e.preInit=[e.preInit]);0<e.preInit.length;)e.preInit.pop()();var mb=q;e.noInitialRun&&(mb=G);kb();return e.ccall("vizRenderFromString","string",["string","string","string"],[$a,ec,ab])};
-
diff --git a/pkg/analyzer/doc/support/web_app.dart.js b/pkg/analyzer/doc/support/web_app.dart.js
deleted file mode 100644
index 720a137..0000000
--- a/pkg/analyzer/doc/support/web_app.dart.js
+++ /dev/null
@@ -1,4107 +0,0 @@
-(function(){var supportsDirectProtoAccess=function(){var z=function(){}
-z.prototype={p:{}}
-var y=new z()
-return y.__proto__&&y.__proto__.p===z.prototype.p}()
-function map(a){a=Object.create(null)
-a.x=0
-delete a.x
-return a}var A=map()
-var B=map()
-var C=map()
-var D=map()
-var E=map()
-var F=map()
-var G=map()
-var H=map()
-var J=map()
-var K=map()
-var L=map()
-var M=map()
-var N=map()
-var O=map()
-var P=map()
-var Q=map()
-var R=map()
-var S=map()
-var T=map()
-var U=map()
-var V=map()
-var W=map()
-var X=map()
-var Y=map()
-var Z=map()
-function I(){}init()
-function setupProgram(a,b){"use strict"
-function generateAccessor(a9,b0,b1){var g=a9.split("-")
-var f=g[0]
-var e=f.length
-var d=f.charCodeAt(e-1)
-var c
-if(g.length>1)c=true
-else c=false
-d=d>=60&&d<=64?d-59:d>=123&&d<=126?d-117:d>=37&&d<=43?d-27:0
-if(d){var a0=d&3
-var a1=d>>2
-var a2=f=f.substring(0,e-1)
-var a3=f.indexOf(":")
-if(a3>0){a2=f.substring(0,a3)
-f=f.substring(a3+1)}if(a0){var a4=a0&2?"r":""
-var a5=a0&1?"this":"r"
-var a6="return "+a5+"."+f
-var a7=b1+".prototype.g"+a2+"="
-var a8="function("+a4+"){"+a6+"}"
-if(c)b0.push(a7+"$reflectable("+a8+");\n")
-else b0.push(a7+a8+";\n")}if(a1){var a4=a1&2?"r,v":"v"
-var a5=a1&1?"this":"r"
-var a6=a5+"."+f+"=v"
-var a7=b1+".prototype.s"+a2+"="
-var a8="function("+a4+"){"+a6+"}"
-if(c)b0.push(a7+"$reflectable("+a8+");\n")
-else b0.push(a7+a8+";\n")}}return f}function defineClass(a2,a3){var g=[]
-var f="function "+a2+"("
-var e=""
-var d=""
-for(var c=0;c<a3.length;c++){if(c!=0)f+=", "
-var a0=generateAccessor(a3[c],g,a2)
-d+="'"+a0+"',"
-var a1="p_"+a0
-f+=a1
-e+="this."+a0+" = "+a1+";\n"}if(supportsDirectProtoAccess)e+="this."+"$deferredAction"+"();"
-f+=") {\n"+e+"}\n"
-f+=a2+".builtin$cls=\""+a2+"\";\n"
-f+="$desc=$collectedClasses."+a2+"[1];\n"
-f+=a2+".prototype = $desc;\n"
-if(typeof defineClass.name!="string")f+=a2+".name=\""+a2+"\";\n"
-f+=a2+"."+"$__fields__"+"=["+d+"];\n"
-f+=g.join("")
-return f}init.createNewIsolate=function(){return new I()}
-init.classIdExtractor=function(c){return c.constructor.name}
-init.classFieldsExtractor=function(c){var g=c.constructor.$__fields__
-if(!g)return[]
-var f=[]
-f.length=g.length
-for(var e=0;e<g.length;e++)f[e]=c[g[e]]
-return f}
-init.instanceFromClassId=function(c){return new init.allClasses[c]()}
-init.initializeEmptyInstance=function(c,d,e){init.allClasses[c].apply(d,e)
-return d}
-var z=supportsDirectProtoAccess?function(c,d){var g=c.prototype
-g.__proto__=d.prototype
-g.constructor=c
-g["$is"+c.name]=c
-return convertToFastObject(g)}:function(){function tmp(){}return function(a0,a1){tmp.prototype=a1.prototype
-var g=new tmp()
-convertToSlowObject(g)
-var f=a0.prototype
-var e=Object.keys(f)
-for(var d=0;d<e.length;d++){var c=e[d]
-g[c]=f[c]}g["$is"+a0.name]=a0
-g.constructor=a0
-a0.prototype=g
-return g}}()
-function finishClasses(a4){var g=init.allClasses
-a4.combinedConstructorFunction+="return [\n"+a4.constructorsList.join(",\n  ")+"\n]"
-var f=new Function("$collectedClasses",a4.combinedConstructorFunction)(a4.collected)
-a4.combinedConstructorFunction=null
-for(var e=0;e<f.length;e++){var d=f[e]
-var c=d.name
-var a0=a4.collected[c]
-var a1=a0[0]
-a0=a0[1]
-g[c]=d
-a1[c]=d}f=null
-var a2=init.finishedClasses
-function finishClass(c1){if(a2[c1])return
-a2[c1]=true
-var a5=a4.pending[c1]
-if(a5&&a5.indexOf("+")>0){var a6=a5.split("+")
-a5=a6[0]
-var a7=a6[1]
-finishClass(a7)
-var a8=g[a7]
-var a9=a8.prototype
-var b0=g[c1].prototype
-var b1=Object.keys(a9)
-for(var b2=0;b2<b1.length;b2++){var b3=b1[b2]
-if(!u.call(b0,b3))b0[b3]=a9[b3]}}if(!a5||typeof a5!="string"){var b4=g[c1]
-var b5=b4.prototype
-b5.constructor=b4
-b5.$isMh=b4
-b5.$deferredAction=function(){}
-return}finishClass(a5)
-var b6=g[a5]
-if(!b6)b6=existingIsolateProperties[a5]
-var b4=g[c1]
-var b5=z(b4,b6)
-if(a9)b5.$deferredAction=mixinDeferredActionHelper(a9,b5)
-if(Object.prototype.hasOwnProperty.call(b5,"%")){var b7=b5["%"].split(";")
-if(b7[0]){var b8=b7[0].split("|")
-for(var b2=0;b2<b8.length;b2++){init.interceptorsByTag[b8[b2]]=b4
-init.leafTags[b8[b2]]=true}}if(b7[1]){b8=b7[1].split("|")
-if(b7[2]){var b9=b7[2].split("|")
-for(var b2=0;b2<b9.length;b2++){var c0=g[b9[b2]]
-c0.$nativeSuperclassTag=b8[0]}}for(b2=0;b2<b8.length;b2++){init.interceptorsByTag[b8[b2]]=b4
-init.leafTags[b8[b2]]=false}}b5.$deferredAction()}if(b5.$isvB)b5.$deferredAction()}var a3=Object.keys(a4.pending)
-for(var e=0;e<a3.length;e++)finishClass(a3[e])}function finishAddStubsHelper(){var g=this
-while(!g.hasOwnProperty("$deferredAction"))g=g.__proto__
-delete g.$deferredAction
-var f=Object.keys(g)
-for(var e=0;e<f.length;e++){var d=f[e]
-var c=d.charCodeAt(0)
-var a0
-if(d!=="^"&&d!=="$reflectable"&&c!==43&&c!==42&&(a0=g[d])!=null&&a0.constructor===Array&&d!=="<>")addStubs(g,a0,d,false,[])}convertToFastObject(g)
-g=g.__proto__
-g.$deferredAction()}function mixinDeferredActionHelper(c,d){var g
-if(d.hasOwnProperty("$deferredAction"))g=d.$deferredAction
-return function foo(){var f=this
-while(!f.hasOwnProperty("$deferredAction"))f=f.__proto__
-if(g)f.$deferredAction=g
-else{delete f.$deferredAction
-convertToFastObject(f)}c.$deferredAction()
-f.$deferredAction()}}function processClassData(b1,b2,b3){b2=convertToSlowObject(b2)
-var g
-var f=Object.keys(b2)
-var e=false
-var d=supportsDirectProtoAccess&&b1!="Mh"
-for(var c=0;c<f.length;c++){var a0=f[c]
-var a1=a0.charCodeAt(0)
-if(a0==="static"){processStatics(init.statics[b1]=b2.static,b3)
-delete b2.static}else if(a1===43){w[g]=a0.substring(1)
-var a2=b2[a0]
-if(a2>0)b2[g].$reflectable=a2}else if(a1===42){b2[g].$defaultValues=b2[a0]
-var a3=b2.$methodsWithOptionalArguments
-if(!a3)b2.$methodsWithOptionalArguments=a3={}
-a3[a0]=g}else{var a4=b2[a0]
-if(a0!=="^"&&a4!=null&&a4.constructor===Array&&a0!=="<>")if(d)e=true
-else addStubs(b2,a4,a0,false,[])
-else g=a0}}if(e)b2.$deferredAction=finishAddStubsHelper
-var a5=b2["^"],a6,a7,a8=a5
-var a9=a8.split(";")
-a8=a9[1]?a9[1].split(","):[]
-a7=a9[0]
-a6=a7.split(":")
-if(a6.length==2){a7=a6[0]
-var b0=a6[1]
-if(b0)b2.$signature=function(b4){return function(){return init.types[b4]}}(b0)}if(a7)b3.pending[b1]=a7
-b3.combinedConstructorFunction+=defineClass(b1,a8)
-b3.constructorsList.push(b1)
-b3.collected[b1]=[m,b2]
-i.push(b1)}function processStatics(a3,a4){var g=Object.keys(a3)
-for(var f=0;f<g.length;f++){var e=g[f]
-if(e==="^")continue
-var d=a3[e]
-var c=e.charCodeAt(0)
-var a0
-if(c===43){v[a0]=e.substring(1)
-var a1=a3[e]
-if(a1>0)a3[a0].$reflectable=a1
-if(d&&d.length)init.typeInformation[a0]=d}else if(c===42){m[a0].$defaultValues=d
-var a2=a3.$methodsWithOptionalArguments
-if(!a2)a3.$methodsWithOptionalArguments=a2={}
-a2[e]=a0}else if(typeof d==="function"){m[a0=e]=d
-h.push(e)
-init.globalFunctions[e]=d}else if(d.constructor===Array)addStubs(m,d,e,true,h)
-else{a0=e
-processClassData(e,d,a4)}}}function addStubs(b2,b3,b4,b5,b6){var g=0,f=b3[g],e
-if(typeof f=="string")e=b3[++g]
-else{e=f
-f=b4}var d=[b2[b4]=b2[f]=e]
-e.$stubName=b4
-b6.push(b4)
-for(g++;g<b3.length;g++){e=b3[g]
-if(typeof e!="function")break
-if(!b5)e.$stubName=b3[++g]
-d.push(e)
-if(e.$stubName){b2[e.$stubName]=e
-b6.push(e.$stubName)}}for(var c=0;c<d.length;g++,c++)d[c].$callName=b3[g]
-var a0=b3[g]
-b3=b3.slice(++g)
-var a1=b3[0]
-var a2=a1>>1
-var a3=(a1&1)===1
-var a4=a1===3
-var a5=a1===1
-var a6=b3[1]
-var a7=a6>>1
-var a8=(a6&1)===1
-var a9=a2+a7!=d[0].length
-var b0=b3[2]
-if(typeof b0=="number")b3[2]=b0+b
-var b1=2*a7+a2+3
-if(a0){e=tearOff(d,b3,b5,b4,a9)
-b2[b4].$getter=e
-e.$getterStub=true
-if(b5){init.globalFunctions[b4]=e
-b6.push(a0)}b2[a0]=e
-d.push(e)
-e.$stubName=a0
-e.$callName=null}}Function.prototype.$0=function(){return this()}
-Function.prototype.$1=function(c){return this(c)}
-Function.prototype.$2=function(c,d){return this(c,d)}
-Function.prototype.$4=function(c,d,e,f){return this(c,d,e,f)}
-Function.prototype.$3=function(c,d,e){return this(c,d,e)}
-function tearOffGetter(c,d,e,f){return f?new Function("funcs","reflectionInfo","name","H","c","return function tearOff_"+e+y+++"(x) {"+"if (c === null) c = "+"H.qm"+"("+"this, funcs, reflectionInfo, false, [x], name);"+"return new c(this, funcs[0], x, name);"+"}")(c,d,e,H,null):new Function("funcs","reflectionInfo","name","H","c","return function tearOff_"+e+y+++"() {"+"if (c === null) c = "+"H.qm"+"("+"this, funcs, reflectionInfo, false, [], name);"+"return new c(this, funcs[0], null, name);"+"}")(c,d,e,H,null)}function tearOff(c,d,e,f,a0){var g
-return e?function(){if(g===void 0)g=H.qm(this,c,d,true,[],f).prototype
-return g}:tearOffGetter(c,d,f,a0)}var y=0
-if(!init.libraries)init.libraries=[]
-if(!init.mangledNames)init.mangledNames=map()
-if(!init.mangledGlobalNames)init.mangledGlobalNames=map()
-if(!init.statics)init.statics=map()
-if(!init.typeInformation)init.typeInformation=map()
-if(!init.globalFunctions)init.globalFunctions=map()
-var x=init.libraries
-var w=init.mangledNames
-var v=init.mangledGlobalNames
-var u=Object.prototype.hasOwnProperty
-var t=a.length
-var s=map()
-s.collected=map()
-s.pending=map()
-s.constructorsList=[]
-s.combinedConstructorFunction="function $reflectable(fn){fn.$reflectable=1;return fn};\n"+"var $desc;\n"
-for(var r=0;r<t;r++){var q=a[r]
-var p=q[0]
-var o=q[1]
-var n=q[2]
-var m=q[3]
-var l=q[4]
-var k=!!q[5]
-var j=l&&l["^"]
-if(j instanceof Array)j=j[0]
-var i=[]
-var h=[]
-processStatics(l,s)
-x.push([p,o,i,h,n,j,k,m])}finishClasses(s)}I.HU=function(){}
-var dart=[["","",,H,{"^":"",FK:{"^":"Mh;a"}}],["","",,J,{"^":"",
-v:function(a){return void 0},
-Qu:function(a,b,c,d){return{i:a,p:b,e:c,x:d}},
-m:function(a){var z,y,x,w
-z=a[init.dispatchPropertyName]
-if(z==null)if($.M==null){H.u()
-z=a[init.dispatchPropertyName]}if(z!=null){y=z.p
-if(!1===y)return z.i
-if(!0===y)return a
-x=Object.getPrototypeOf(a)
-if(y===x)return z.i
-if(z.e===x)throw H.b(new P.D("Return interceptor for "+H.d(y(a,z))))}w=H.w(a)
-if(w==null){if(typeof a=="function")return C.DG
-y=Object.getPrototypeOf(a)
-if(y==null||y===Object.prototype)return C.ZQ
-else return C.vB}return w},
-vB:{"^":"Mh;",
-D:function(a,b){return a===b},
-gM:function(a){return H.wP(a)},
-w:["UG",function(a){return H.H(a)}],
-"%":"ANGLEInstancedArrays|Animation|AnimationEffect|AnimationNode|AnimationTimeline|AudioListener|AudioParam|AudioTrack|BarProp|Body|CSS|Cache|CacheStorage|Canvas2DContextAttributes|CanvasGradient|CanvasPattern|CanvasRenderingContext2D|CircularGeofencingRegion|ConsoleBase|Coordinates|Counter|Credential|CredentialsContainer|Crypto|CryptoKey|DOMError|DOMFileSystem|DOMFileSystemSync|DOMImplementation|DOMMatrix|DOMMatrixReadOnly|DOMParser|DOMPoint|DOMPointReadOnly|DataTransfer|Database|DeprecatedStorageInfo|DeprecatedStorageQuota|DeviceAcceleration|DeviceRotationRate|DirectoryEntrySync|DirectoryReader|DirectoryReaderSync|EXTBlendMinMax|EXTFragDepth|EXTShaderTextureLOD|EXTTextureFilterAnisotropic|EntrySync|FederatedCredential|FileEntrySync|FileError|FileReaderSync|FileWriterSync|FormData|GamepadButton|Geofencing|GeofencingRegion|Geolocation|Geoposition|HTMLAllCollection|IDBCursor|IDBCursorWithValue|IDBFactory|IDBKeyRange|IDBObjectStore|ImageBitmap|ImageData|InjectedScriptHost|LocalCredential|MIDIInputMap|MIDIOutputMap|MediaDeviceInfo|MediaError|MediaKeyError|MediaKeys|MemoryInfo|MessageChannel|Metadata|MutationObserver|MutationRecord|NavigatorUserMediaError|NodeFilter|NodeIterator|OESElementIndexUint|OESStandardDerivatives|OESTextureFloat|OESTextureFloatLinear|OESTextureHalfFloat|OESTextureHalfFloatLinear|OESVertexArrayObject|PagePopupController|PerformanceEntry|PerformanceMark|PerformanceMeasure|PerformanceNavigation|PerformanceResourceTiming|PerformanceTiming|PeriodicWave|PositionError|PushManager|PushRegistration|RGBColor|RTCIceCandidate|RTCSessionDescription|RTCStatsResponse|Range|ReadableStream|Rect|Request|Response|SQLError|SQLResultSet|SQLTransaction|SVGAngle|SVGAnimatedAngle|SVGAnimatedBoolean|SVGAnimatedEnumeration|SVGAnimatedInteger|SVGAnimatedLength|SVGAnimatedLengthList|SVGAnimatedNumber|SVGAnimatedNumberList|SVGAnimatedPreserveAspectRatio|SVGAnimatedRect|SVGAnimatedString|SVGAnimatedTransformList|SVGMatrix|SVGPoint|SVGPreserveAspectRatio|SVGRect|SVGRenderingIntent|SVGUnitTypes|Screen|Selection|ServiceWorkerClient|ServiceWorkerClients|ServiceWorkerContainer|SourceInfo|SpeechRecognitionAlternative|SpeechSynthesisVoice|StorageInfo|StorageQuota|Stream|StyleMedia|SubtleCrypto|TextMetrics|Timing|TreeWalker|VTTRegion|ValidityState|VideoPlaybackQuality|VideoTrack|WebGLActiveInfo|WebGLBuffer|WebGLCompressedTextureATC|WebGLCompressedTextureETC1|WebGLCompressedTexturePVRTC|WebGLCompressedTextureS3TC|WebGLContextAttributes|WebGLDebugRendererInfo|WebGLDebugShaders|WebGLDepthTexture|WebGLDrawBuffers|WebGLExtensionLoseContext|WebGLFramebuffer|WebGLLoseContext|WebGLProgram|WebGLRenderbuffer|WebGLRenderingContext|WebGLShader|WebGLShaderPrecisionFormat|WebGLTexture|WebGLUniformLocation|WebGLVertexArrayObjectOES|WebKitCSSMatrix|WebKitMutationObserver|WorkerConsole|WorkerPerformance|XMLSerializer|XPathEvaluator|XPathExpression|XPathNSResolver|XPathResult|XSLTProcessor|mozRTCIceCandidate|mozRTCSessionDescription"},
-yE:{"^":"vB;",
-w:function(a){return String(a)},
-gM:function(a){return a?519018:218159},
-$isa2:1},
-PE:{"^":"vB;",
-D:function(a,b){return null==b},
-w:function(a){return"null"},
-gM:function(a){return 0}},
-Ue:{"^":"vB;",
-gM:function(a){return 0},
-w:["tk",function(a){return String(a)}],
-$isvm:1},
-iC:{"^":"Ue;"},
-k:{"^":"Ue;"},
-c5:{"^":"Ue;",
-w:function(a){var z=a[$.$get$fa()]
-return z==null?this.tk(a):J.A(z)}},
-jd:{"^":"vB;",
-uy:function(a,b){if(!!a.immutable$list)throw H.b(new P.ub(b))},
-PP:function(a,b){if(!!a.fixed$length)throw H.b(new P.ub(b))},
-FV:function(a,b){var z
-this.PP(a,"addAll")
-for(z=0;z<2;++z)a.push(b[z])},
-U:function(a,b){var z,y
-z=a.length
-for(y=0;y<z;++y){b.$1(a[y])
-if(a.length!==z)throw H.b(new P.UV(a))}},
-ez:function(a,b){return H.VM(new H.A8(a,b),[null,null])},
-W:function(a,b){return a[b]},
-gtH:function(a){if(a.length>0)return a[0]
-throw H.b(H.Wp())},
-YW:function(a,b,c,d,e){var z,y
-this.uy(a,"set range")
-P.jB(b,c,a.length,null,null,null)
-z=c-b
-if(z===0)return
-if(e<0)H.vh(P.TE(e,0,null,"skipCount",null))
-if(e+z>d.length)throw H.b(H.ar())
-if(e<b)for(y=z-1;y>=0;--y)a[b+y]=d[e+y]
-else for(y=0;y<z;++y)a[b+y]=d[e+y]},
-Vr:function(a,b){var z,y
-z=a.length
-for(y=0;y<z;++y){if(b.$1(a[y]))return!0
-if(a.length!==z)throw H.b(new P.UV(a))}return!1},
-tg:function(a,b){var z
-for(z=0;z<a.length;++z)if(J.RM(a[z],b))return!0
-return!1},
-w:function(a){return P.WE(a,"[","]")},
-gk:function(a){return new J.m1(a,a.length,0,null)},
-gM:function(a){return H.wP(a)},
-gA:function(a){return a.length},
-sA:function(a,b){this.PP(a,"set length")
-if(b<0)throw H.b(P.TE(b,0,null,"newLength",null))
-a.length=b},
-q:function(a,b){if(typeof b!=="number"||Math.floor(b)!==b)throw H.b(H.HY(a,b))
-if(b>=a.length||b<0)throw H.b(H.HY(a,b))
-return a[b]},
-t:function(a,b,c){this.uy(a,"indexed set")
-if(typeof b!=="number"||Math.floor(b)!==b)throw H.b(H.HY(a,b))
-if(b>=a.length||b<0)throw H.b(H.HY(a,b))
-a[b]=c},
-$isDD:1,
-$iszM:1,
-$aszM:null,
-$isqC:1},
-Po:{"^":"jd;"},
-m1:{"^":"Mh;a,b,c,d",
-gl:function(){return this.d},
-F:function(){var z,y,x
-z=this.a
-y=z.length
-if(this.b!==y)throw H.b(H.lk(z))
-x=this.c
-if(x>=y){this.d=null
-return!1}this.d=z[x]
-this.c=x+1
-return!0}},
-jX:{"^":"vB;",
-JV:function(a,b){return a%b},
-yu:function(a){var z
-if(a>=-2147483648&&a<=2147483647)return a|0
-if(isFinite(a)){z=a<0?Math.ceil(a):Math.floor(a)
-return z+0}throw H.b(new P.ub(""+a))},
-w:function(a){if(a===0&&1/a<0)return"-0.0"
-else return""+a},
-gM:function(a){return a&0x1FFFFFFF},
-BU:function(a,b){return(a|0)===a?a/b|0:this.yu(a/b)},
-wG:function(a,b){var z
-if(a>0)z=b>31?0:a>>>b
-else{z=b>31?31:b
-z=a>>z>>>0}return z},
-B:function(a,b){if(typeof b!=="number")throw H.b(H.G(b))
-return a<b},
-$islf:1},
-im:{"^":"jX;",$islf:1,$isKN:1},
-VA:{"^":"jX;",$islf:1},
-Dr:{"^":"vB;",
-J:function(a,b){if(b<0)throw H.b(H.HY(a,b))
-if(b>=a.length)throw H.b(H.HY(a,b))
-return a.charCodeAt(b)},
-Qi:function(a,b,c){var z
-H.fI(c)
-if(c>a.length)throw H.b(P.TE(c,0,a.length,null,null))
-z=c+b.length
-if(z>a.length)return!1
-return b===a.substring(c,z)},
-nC:function(a,b){return this.Qi(a,b,0)},
-C:function(a,b,c){if(c==null)c=a.length
-if(typeof c!=="number"||Math.floor(c)!==c)H.vh(H.G(c))
-if(b<0)throw H.b(P.F(b,null,null))
-if(b>c)throw H.b(P.F(b,null,null))
-if(c>a.length)throw H.b(P.F(c,null,null))
-return a.substring(b,c)},
-G:function(a,b){return this.C(a,b,null)},
-hc:function(a){return a.toLowerCase()},
-bS:function(a){var z,y,x,w,v
-z=a.trim()
-y=z.length
-if(y===0)return z
-if(this.J(z,0)===133){x=J.mm(z,1)
-if(x===y)return""}else x=0
-w=y-1
-v=this.J(z,w)===133?J.r9(z,w):y
-if(x===0&&v===y)return z
-return z.substring(x,v)},
-w:function(a){return a},
-gM:function(a){var z,y,x
-for(z=a.length,y=0,x=0;x<z;++x){y=536870911&y+a.charCodeAt(x)
-y=536870911&y+((524287&y)<<10>>>0)
-y^=y>>6}y=536870911&y+((67108863&y)<<3>>>0)
-y^=y>>11
-return 536870911&y+((16383&y)<<15>>>0)},
-gA:function(a){return a.length},
-q:function(a,b){if(b>=a.length||!1)throw H.b(H.HY(a,b))
-return a[b]},
-$isDD:1,
-$isqU:1,
-static:{
-Ga:function(a){if(a<256)switch(a){case 9:case 10:case 11:case 12:case 13:case 32:case 133:case 160:return!0
-default:return!1}switch(a){case 5760:case 6158:case 8192:case 8193:case 8194:case 8195:case 8196:case 8197:case 8198:case 8199:case 8200:case 8201:case 8202:case 8232:case 8233:case 8239:case 8287:case 12288:case 65279:return!0
-default:return!1}},
-mm:function(a,b){var z,y
-for(z=a.length;b<z;){y=C.xB.J(a,b)
-if(y!==32&&y!==13&&!J.Ga(y))break;++b}return b},
-r9:function(a,b){var z,y
-for(;b>0;b=z){z=b-1
-y=C.xB.J(a,z)
-if(y!==32&&y!==13&&!J.Ga(y))break}return b}}}}],["","",,H,{"^":"",
-zd:function(a,b){var z=a.v(b)
-if(!init.globalState.d.cy)init.globalState.f.bL()
-return z},
-Rq:function(a,b){var z,y,x,w,v,u
-z={}
-z.a=b
-if(b==null){b=[]
-z.a=b
-y=b}else y=b
-if(!J.v(y).$iszM)throw H.b(P.q("Arguments to main must be a List: "+H.d(y)))
-init.globalState=new H.O2(0,0,1,null,null,null,null,null,null,null,null,null,a)
-y=init.globalState
-x=self.window==null
-w=self.Worker
-v=x&&!!self.postMessage
-y.x=v
-v=!v
-if(v)w=w!=null&&$.$get$Kb()!=null
-else w=!0
-y.y=w
-y.r=x&&v
-y.f=new H.cC(P.NZ(null,H.IY),0)
-y.z=H.VM(new H.N5(0,null,null,null,null,null,0),[P.KN,H.aX])
-y.ch=H.VM(new H.N5(0,null,null,null,null,null,0),[P.KN,null])
-if(y.x){x=new H.JH()
-y.Q=x
-self.onmessage=function(c,d){return function(e){c(d,e)}}(H.Mg,x)
-self.dartPrint=self.dartPrint||function(c){return function(d){if(self.console&&self.console.log)self.console.log(d)
-else self.postMessage(c(d))}}(H.wI)}if(init.globalState.x)return
-y=init.globalState.a++
-x=H.VM(new H.N5(0,null,null,null,null,null,0),[P.KN,H.yo])
-w=P.Ls(null,null,null,P.KN)
-v=new H.yo(0,null,!1)
-u=new H.aX(y,x,w,init.createNewIsolate(),v,new H.ku(H.Uh()),new H.ku(H.Uh()),!1,!1,[],P.Ls(null,null,null,null),null,null,!1,!0,P.Ls(null,null,null,null))
-w.AN(0,0)
-u.co(0,v)
-init.globalState.e=u
-init.globalState.d=u
-y=H.N7()
-x=H.KT(y,[y]).Zg(a)
-if(x)u.v(new H.PK(z,a))
-else{y=H.KT(y,[y,y]).Zg(a)
-if(y)u.v(new H.JO(z,a))
-else u.v(a)}init.globalState.f.bL()},
-yl:function(){var z=init.currentScript
-if(z!=null)return String(z.src)
-if(init.globalState.x)return H.mf()
-return},
-mf:function(){var z,y
-z=new Error().stack
-if(z==null){z=function(){try{throw new Error()}catch(x){return x.stack}}()
-if(z==null)throw H.b(new P.ub("No stack trace"))}y=z.match(new RegExp("^ *at [^(]*\\((.*):[0-9]*:[0-9]*\\)$","m"))
-if(y!=null)return y[1]
-y=z.match(new RegExp("^[^@]*@(.*):[0-9]*$","m"))
-if(y!=null)return y[1]
-throw H.b(new P.ub('Cannot extract URI from "'+H.d(z)+'"'))},
-Mg:function(a,b){var z,y,x,w,v,u,t,s,r,q,p,o,n
-z=new H.fP(!0,[]).QS(b.data)
-y=J.U6(z)
-switch(y.q(z,"command")){case"start":init.globalState.b=y.q(z,"id")
-x=y.q(z,"functionName")
-w=x==null?init.globalState.cx:init.globalFunctions[x]()
-v=y.q(z,"args")
-u=new H.fP(!0,[]).QS(y.q(z,"msg"))
-t=y.q(z,"isSpawnUri")
-s=y.q(z,"startPaused")
-r=new H.fP(!0,[]).QS(y.q(z,"replyTo"))
-y=init.globalState.a++
-q=H.VM(new H.N5(0,null,null,null,null,null,0),[P.KN,H.yo])
-p=P.Ls(null,null,null,P.KN)
-o=new H.yo(0,null,!1)
-n=new H.aX(y,q,p,init.createNewIsolate(),o,new H.ku(H.Uh()),new H.ku(H.Uh()),!1,!1,[],P.Ls(null,null,null,null),null,null,!1,!0,P.Ls(null,null,null,null))
-p.AN(0,0)
-n.co(0,o)
-init.globalState.f.a.B7(0,new H.IY(n,new H.jl(w,v,u,t,s,r),"worker-start"))
-init.globalState.d=n
-init.globalState.f.bL()
-break
-case"spawn-worker":break
-case"message":if(y.q(z,"port")!=null)J.TT(y.q(z,"port"),y.q(z,"msg"))
-init.globalState.f.bL()
-break
-case"close":init.globalState.ch.Rz(0,$.$get$jp().q(0,a))
-a.terminate()
-init.globalState.f.bL()
-break
-case"log":H.VL(y.q(z,"msg"))
-break
-case"print":if(init.globalState.x){y=init.globalState.Q
-q=P.Td(["command","print","msg",z])
-q=new H.jP(!0,P.E8(null,P.KN)).a3(q)
-y.toString
-self.postMessage(q)}else P.JS(y.q(z,"msg"))
-break
-case"error":throw H.b(y.q(z,"msg"))}},
-VL:function(a){var z,y,x,w
-if(init.globalState.x){y=init.globalState.Q
-x=P.Td(["command","log","msg",a])
-x=new H.jP(!0,P.E8(null,P.KN)).a3(x)
-y.toString
-self.postMessage(x)}else try{self.console.log(a)}catch(w){H.p(w)
-z=H.ts(w)
-throw H.b(P.FM(z))}},
-Z7:function(a,b,c,d,e,f){var z,y,x,w
-z=init.globalState.d
-y=z.a
-$.te=$.te+("_"+y)
-$.eb=$.eb+("_"+y)
-y=z.e
-x=init.globalState.d.a
-w=z.f
-f.wR(0,["spawned",new H.JM(y,x),w,z.r])
-x=new H.Vg(a,b,c,d,z)
-if(e){z.v8(w,w)
-init.globalState.f.a.B7(0,new H.IY(z,x,"start isolate"))}else x.$0()},
-Gx:function(a){return new H.fP(!0,[]).QS(new H.jP(!1,P.E8(null,P.KN)).a3(a))},
-PK:{"^":"L:0;a,b",
-$0:function(){this.b.$1(this.a.a)}},
-JO:{"^":"L:0;a,b",
-$0:function(){this.b.$2(this.a.a,null)}},
-O2:{"^":"Mh;a,b,c,d,e,f,r,x,y,z,Q,ch,cx",static:{
-wI:function(a){var z=P.Td(["command","print","msg",a])
-return new H.jP(!0,P.E8(null,P.KN)).a3(z)}}},
-aX:{"^":"Mh;a,b,c,En:d<,EE:e<,f,r,x,y,z,Q,ch,cx,cy,db,dx",
-v8:function(a,b){if(!this.f.D(0,a))return
-if(this.Q.AN(0,b)&&!this.y)this.y=!0
-this.Wp()},
-cK:function(a){var z,y,x,w,v
-if(!this.y)return
-z=this.Q
-z.Rz(0,a)
-if(z.a===0){for(z=this.z;z.length!==0;){y=z.pop()
-x=init.globalState.f.a
-w=x.b
-v=x.a
-w=(w-1&v.length-1)>>>0
-x.b=w
-v[w]=y
-if(w===x.c)x.wL();++x.d}this.y=!1}this.Wp()},
-h4:function(a,b){var z,y,x
-if(this.ch==null)this.ch=[]
-for(z=J.v(a),y=0;x=this.ch,y<x.length;y+=2)if(z.D(a,x[y])){this.ch[y+1]=b
-return}x.push(a)
-this.ch.push(b)},
-Hh:function(a){var z,y,x
-if(this.ch==null)return
-for(z=J.v(a),y=0;x=this.ch,y<x.length;y+=2)if(z.D(a,x[y])){z=this.ch
-x=y+2
-z.toString
-if(typeof z!=="object"||z===null||!!z.fixed$length)H.vh(new P.ub("removeRange"))
-P.jB(y,x,z.length,null,null,null)
-z.splice(y,x-y)
-return}},
-MZ:function(a,b){if(!this.r.D(0,a))return
-this.db=b},
-l7:function(a,b,c){var z
-if(b!==0)z=b===1&&!this.cy
-else z=!0
-if(z){a.wR(0,c)
-return}z=this.cx
-if(z==null){z=P.NZ(null,null)
-this.cx=z}z.B7(0,new H.NY(a,c))},
-bc:function(a,b){var z
-if(!this.r.D(0,a))return
-if(b!==0)z=b===1&&!this.cy
-else z=!0
-if(z){this.Dm()
-return}z=this.cx
-if(z==null){z=P.NZ(null,null)
-this.cx=z}z.B7(0,this.gIm())},
-hk:function(a,b){var z,y,x
-z=this.dx
-if(z.a===0){if(this.db&&this===init.globalState.e)return
-if(self.console&&self.console.error)self.console.error(a,b)
-else{P.JS(a)
-if(b!=null)P.JS(b)}return}y=new Array(2)
-y.fixed$length=Array
-y[0]=J.A(a)
-y[1]=b==null?null:b.w(0)
-for(x=new P.lm(z,z.r,null,null),x.c=z.e;x.F();)x.d.wR(0,y)},
-v:function(a){var z,y,x,w,v,u,t
-z=init.globalState.d
-init.globalState.d=this
-$=this.d
-y=null
-x=this.cy
-this.cy=!0
-try{y=a.$0()}catch(u){t=H.p(u)
-w=t
-v=H.ts(u)
-this.hk(w,v)
-if(this.db){this.Dm()
-if(this===init.globalState.e)throw u}}finally{this.cy=x
-init.globalState.d=z
-if(z!=null)$=z.gEn()
-if(this.cx!=null)for(;t=this.cx,!t.gl0(t);)this.cx.Ux().$0()}return y},
-Zt:function(a){return this.b.q(0,a)},
-co:function(a,b){var z=this.b
-if(z.x4(0,a))throw H.b(P.FM("Registry: ports must be registered only once."))
-z.t(0,a,b)},
-Wp:function(){var z=this.b
-if(z.gA(z)-this.c.a>0||this.y||!this.x)init.globalState.z.t(0,this.a,this)
-else this.Dm()},
-Dm:[function(){var z,y,x
-z=this.cx
-if(z!=null)z.V1(0)
-for(z=this.b,y=z.gUQ(z),y=y.gk(y);y.F();)y.gl().EC()
-z.V1(0)
-this.c.V1(0)
-init.globalState.z.Rz(0,this.a)
-this.dx.V1(0)
-if(this.ch!=null){for(x=0;z=this.ch,x<z.length;x+=2)z[x].wR(0,z[x+1])
-this.ch=null}},"$0","gIm",0,0,2]},
-NY:{"^":"L:2;a,b",
-$0:function(){this.a.wR(0,this.b)}},
-cC:{"^":"Mh;a,b",
-Jc:function(){var z=this.a
-if(z.b===z.c)return
-return z.Ux()},
-xB:function(){var z,y,x
-z=this.Jc()
-if(z==null){if(init.globalState.e!=null)if(init.globalState.z.x4(0,init.globalState.e.a))if(init.globalState.r){y=init.globalState.e.b
-y=y.gl0(y)}else y=!1
-else y=!1
-else y=!1
-if(y)H.vh(P.FM("Program exited with open ReceivePorts."))
-y=init.globalState
-if(y.x){x=y.z
-x=x.gl0(x)&&y.f.b===0}else x=!1
-if(x){y=y.Q
-x=P.Td(["command","close"])
-x=new H.jP(!0,H.VM(new P.ey(0,null,null,null,null,null,0),[null,P.KN])).a3(x)
-y.toString
-self.postMessage(x)}return!1}z.VU()
-return!0},
-Ex:function(){if(self.window!=null)new H.RA(this).$0()
-else for(;this.xB(););},
-bL:function(){var z,y,x,w,v
-if(!init.globalState.x)this.Ex()
-else try{this.Ex()}catch(x){w=H.p(x)
-z=w
-y=H.ts(x)
-w=init.globalState.Q
-v=P.Td(["command","error","msg",H.d(z)+"\n"+H.d(y)])
-v=new H.jP(!0,P.E8(null,P.KN)).a3(v)
-w.toString
-self.postMessage(v)}}},
-RA:{"^":"L:2;a",
-$0:function(){if(!this.a.xB())return
-P.ww(C.RT,this)}},
-IY:{"^":"Mh;a,b,c",
-VU:function(){var z=this.a
-if(z.y){z.z.push(this)
-return}z.v(this.b)}},
-JH:{"^":"Mh;"},
-jl:{"^":"L:0;a,b,c,d,e,f",
-$0:function(){H.Z7(this.a,this.b,this.c,this.d,this.e,this.f)}},
-Vg:{"^":"L:2;a,b,c,d,e",
-$0:function(){var z,y,x,w
-z=this.e
-z.x=!0
-if(!this.d)this.a.$1(this.c)
-else{y=this.a
-x=H.N7()
-w=H.KT(x,[x,x]).Zg(y)
-if(w)y.$2(this.b,this.c)
-else{x=H.KT(x,[x]).Zg(y)
-if(x)y.$1(this.b)
-else y.$0()}}z.Wp()}},
-Iy:{"^":"Mh;"},
-JM:{"^":"Iy;b,a",
-wR:function(a,b){var z,y,x,w
-z=init.globalState.z.q(0,this.a)
-if(z==null)return
-y=this.b
-if(y.c)return
-x=H.Gx(b)
-if(z.gEE()===y){y=J.U6(x)
-switch(y.q(x,0)){case"pause":z.v8(y.q(x,1),y.q(x,2))
-break
-case"resume":z.cK(y.q(x,1))
-break
-case"add-ondone":z.h4(y.q(x,1),y.q(x,2))
-break
-case"remove-ondone":z.Hh(y.q(x,1))
-break
-case"set-errors-fatal":z.MZ(y.q(x,1),y.q(x,2))
-break
-case"ping":z.l7(y.q(x,1),y.q(x,2),y.q(x,3))
-break
-case"kill":z.bc(y.q(x,1),y.q(x,2))
-break
-case"getErrors":y=y.q(x,1)
-z.dx.AN(0,y)
-break
-case"stopErrors":y=y.q(x,1)
-z.dx.Rz(0,y)
-break}return}y=init.globalState.f
-w="receive "+H.d(b)
-y.a.B7(0,new H.IY(z,new H.Ua(this,x),w))},
-D:function(a,b){var z,y
-if(b==null)return!1
-if(b instanceof H.JM){z=this.b
-y=b.b
-y=z==null?y==null:z===y
-z=y}else z=!1
-return z},
-gM:function(a){return this.b.a}},
-Ua:{"^":"L:0;a,b",
-$0:function(){var z=this.a.b
-if(!z.c)z.z6(0,this.b)}},
-ns:{"^":"Iy;b,c,a",
-wR:function(a,b){var z,y,x
-z=P.Td(["command","message","port",this,"msg",b])
-y=new H.jP(!0,P.E8(null,P.KN)).a3(z)
-if(init.globalState.x){init.globalState.Q.toString
-self.postMessage(y)}else{x=init.globalState.ch.q(0,this.b)
-if(x!=null)x.postMessage(y)}},
-D:function(a,b){var z,y
-if(b==null)return!1
-if(b instanceof H.ns){z=this.b
-y=b.b
-if(z==null?y==null:z===y){z=this.a
-y=b.a
-if(z==null?y==null:z===y){z=this.c
-y=b.c
-y=z==null?y==null:z===y
-z=y}else z=!1}else z=!1}else z=!1
-return z},
-gM:function(a){return(this.b<<16^this.a<<8^this.c)>>>0}},
-yo:{"^":"Mh;a,b,c",
-EC:function(){this.c=!0
-this.b=null},
-z6:function(a,b){if(this.c)return
-this.mY(b)},
-mY:function(a){return this.b.$1(a)},
-$isaL:1},
-yH:{"^":"Mh;a,b,c",
-Qa:function(a,b){var z,y
-if(a===0)z=self.setTimeout==null||init.globalState.x
-else z=!1
-if(z){this.c=1
-z=init.globalState.f
-y=init.globalState.d
-z.a.B7(0,new H.IY(y,new H.FA(this,b),"timer"))
-this.b=!0}else if(self.setTimeout!=null){++init.globalState.f.b
-this.c=self.setTimeout(H.tR(new H.Av(this,b),0),a)}else throw H.b(new P.ub("Timer greater than 0."))},
-static:{
-cy:function(a,b){var z=new H.yH(!0,!1,null)
-z.Qa(a,b)
-return z}}},
-FA:{"^":"L:2;a,b",
-$0:function(){this.a.c=null
-this.b.$0()}},
-Av:{"^":"L:2;a,b",
-$0:function(){this.a.c=null;--init.globalState.f.b
-this.b.$0()}},
-ku:{"^":"Mh;a",
-gM:function(a){var z=this.a
-z=C.jn.wG(z,0)^C.jn.BU(z,4294967296)
-z=(~z>>>0)+(z<<15>>>0)&4294967295
-z=((z^z>>>12)>>>0)*5&4294967295
-z=((z^z>>>4)>>>0)*2057&4294967295
-return(z^z>>>16)>>>0},
-D:function(a,b){var z,y
-if(b==null)return!1
-if(b===this)return!0
-if(b instanceof H.ku){z=this.a
-y=b.a
-return z==null?y==null:z===y}return!1}},
-jP:{"^":"Mh;a,b",
-a3:[function(a){var z,y,x,w,v
-if(a==null||typeof a==="string"||typeof a==="number"||typeof a==="boolean")return a
-z=this.b
-y=z.q(0,a)
-if(y!=null)return["ref",y]
-z.t(0,a,z.gA(z))
-z=J.v(a)
-if(!!z.$isWZ)return["buffer",a]
-if(!!z.$isET)return["typed",a]
-if(!!z.$isDD)return this.BE(a)
-if(!!z.$isym){x=this.gpC()
-w=z.gvc(a)
-w=H.K1(w,x,H.W8(w,"cX",0),null)
-w=P.PW(w,!0,H.W8(w,"cX",0))
-z=z.gUQ(a)
-z=H.K1(z,x,H.W8(z,"cX",0),null)
-return["map",w,P.PW(z,!0,H.W8(z,"cX",0))]}if(!!z.$isvm)return this.xw(a)
-if(!!z.$isvB)this.jf(a)
-if(!!z.$isaL)this.kz(a,"RawReceivePorts can't be transmitted:")
-if(!!z.$isJM)return this.PE(a)
-if(!!z.$isns)return this.ff(a)
-if(!!z.$isL){v=a.$static_name
-if(v==null)this.kz(a,"Closures can't be transmitted:")
-return["function",v]}if(!!z.$isku)return["capability",a.a]
-if(!(a instanceof P.Mh))this.jf(a)
-return["dart",init.classIdExtractor(a),this.jG(init.classFieldsExtractor(a))]},"$1","gpC",2,0,1],
-kz:function(a,b){throw H.b(new P.ub(H.d(b==null?"Can't transmit:":b)+" "+H.d(a)))},
-jf:function(a){return this.kz(a,null)},
-BE:function(a){var z=this.dY(a)
-if(!!a.fixed$length)return["fixed",z]
-if(!a.fixed$length)return["extendable",z]
-if(!a.immutable$list)return["mutable",z]
-if(a.constructor===Array)return["const",z]
-this.kz(a,"Can't serialize indexable: ")},
-dY:function(a){var z,y
-z=[]
-C.Nm.sA(z,a.length)
-for(y=0;y<a.length;++y)z[y]=this.a3(a[y])
-return z},
-jG:function(a){var z
-for(z=0;z<a.length;++z)C.Nm.t(a,z,this.a3(a[z]))
-return a},
-xw:function(a){var z,y,x
-if(!!a.constructor&&a.constructor!==Object)this.kz(a,"Only plain JS Objects are supported:")
-z=Object.keys(a)
-y=[]
-C.Nm.sA(y,z.length)
-for(x=0;x<z.length;++x)y[x]=this.a3(a[z[x]])
-return["js-object",z,y]},
-ff:function(a){if(this.a)return["sendport",a.b,a.a,a.c]
-return["raw sendport",a]},
-PE:function(a){if(this.a)return["sendport",init.globalState.b,a.a,a.b.a]
-return["raw sendport",a]}},
-fP:{"^":"Mh;a,b",
-QS:[function(a){var z,y,x,w,v
-if(a==null||typeof a==="string"||typeof a==="number"||typeof a==="boolean")return a
-if(typeof a!=="object"||a===null||a.constructor!==Array)throw H.b(P.q("Bad serialized message: "+H.d(a)))
-switch(C.Nm.gtH(a)){case"ref":return this.b[a[1]]
-case"buffer":z=a[1]
-this.b.push(z)
-return z
-case"typed":z=a[1]
-this.b.push(z)
-return z
-case"fixed":z=a[1]
-this.b.push(z)
-y=H.VM(this.NB(z),[null])
-y.fixed$length=Array
-return y
-case"extendable":z=a[1]
-this.b.push(z)
-return H.VM(this.NB(z),[null])
-case"mutable":z=a[1]
-this.b.push(z)
-return this.NB(z)
-case"const":z=a[1]
-this.b.push(z)
-y=H.VM(this.NB(z),[null])
-y.fixed$length=Array
-return y
-case"map":return this.di(a)
-case"sendport":return this.Vf(a)
-case"raw sendport":z=a[1]
-this.b.push(z)
-return z
-case"js-object":return this.ZQ(a)
-case"function":z=init.globalFunctions[a[1]]()
-this.b.push(z)
-return z
-case"capability":return new H.ku(a[1])
-case"dart":x=a[1]
-w=a[2]
-v=init.instanceFromClassId(x)
-this.b.push(v)
-this.NB(w)
-return init.initializeEmptyInstance(x,v,w)
-default:throw H.b("couldn't deserialize: "+H.d(a))}},"$1","gia",2,0,1],
-NB:function(a){var z
-for(z=0;z<a.length;++z)C.Nm.t(a,z,this.QS(a[z]))
-return a},
-di:function(a){var z,y,x,w,v
-z=a[1]
-y=a[2]
-x=P.u5()
-this.b.push(x)
-z=J.iu(z,this.gia()).br(0)
-for(w=J.U6(y),v=0;v<z.length;++v)x.t(0,z[v],this.QS(w.q(y,v)))
-return x},
-Vf:function(a){var z,y,x,w,v,u,t
-z=a[1]
-y=a[2]
-x=a[3]
-w=init.globalState.b
-if(z==null?w==null:z===w){v=init.globalState.z.q(0,y)
-if(v==null)return
-u=v.Zt(x)
-if(u==null)return
-t=new H.JM(u,y)}else t=new H.ns(z,x,y)
-this.b.push(t)
-return t},
-ZQ:function(a){var z,y,x,w,v,u
-z=a[1]
-y=a[2]
-x={}
-this.b.push(x)
-for(w=J.U6(z),v=J.U6(y),u=0;u<w.gA(z);++u)x[w.q(z,u)]=this.QS(v.q(y,u))
-return x}}}],["","",,H,{"^":"",
-e:function(a){return init.types[a]},
-wV:function(a,b){var z
-if(b!=null){z=b.x
-if(z!=null)return z}return!!J.v(a).$isXj},
-d:function(a){var z
-if(typeof a==="string")return a
-if(typeof a==="number"){if(a!==0)return""+a}else if(!0===a)return"true"
-else if(!1===a)return"false"
-else if(a==null)return"null"
-z=J.A(a)
-if(typeof z!=="string")throw H.b(H.G(a))
-return z},
-wP:function(a){var z=a.$identityHash
-if(z==null){z=Math.random()*0x3fffffff|0
-a.$identityHash=z}return z},
-l:function(a){var z,y,x,w,v,u,t,s
-z=J.v(a)
-y=z.constructor
-if(typeof y=="function"){x=y.name
-w=typeof x==="string"?x:null}else w=null
-if(w==null||z===C.Ok||!!J.v(a).$isk){v=C.w2(a)
-if(v==="Object"){u=a.constructor
-if(typeof u=="function"){t=String(u).match(/^\s*function\s*([\w$]*)\s*\(/)
-s=t==null?null:t[1]
-if(typeof s==="string"&&/^\w+$/.test(s))w=s}if(w==null)w=v}else w=v}w=w
-if(w.length>1&&C.xB.J(w,0)===36)w=C.xB.G(w,1)
-return function(b,c){return b.replace(/[^<,> ]+/g,function(d){return c[d]||d})}(w+H.i(H.j(a),0,null),init.mangledGlobalNames)},
-H:function(a){return"Instance of '"+H.l(a)+"'"},
-VK:function(a,b){if(a==null||typeof a==="boolean"||typeof a==="number"||typeof a==="string")throw H.b(H.G(a))
-return a[b]},
-aw:function(a,b,c){if(a==null||typeof a==="boolean"||typeof a==="number"||typeof a==="string")throw H.b(H.G(a))
-a[b]=c},
-HY:function(a,b){var z
-if(typeof b!=="number"||Math.floor(b)!==b)return new P.AT(!0,b,"index",null)
-z=J.Hm(a)
-if(b<0||b>=z)return P.Cf(b,a,"index",null,z)
-return P.F(b,"index",null)},
-G:function(a){return new P.AT(!0,a,null,null)},
-fI:function(a){return a},
-Yx:function(a){return a},
-b:function(a){var z
-if(a==null)a=new P.B()
-z=new Error()
-z.dartException=a
-if("defineProperty" in Object){Object.defineProperty(z,"message",{get:H.J})
-z.name=""}else z.toString=H.J
-return z},
-J:function(){return J.A(this.dartException)},
-vh:function(a){throw H.b(a)},
-lk:function(a){throw H.b(new P.UV(a))},
-p:function(a){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l
-z=new H.Hk(a)
-if(a==null)return
-if(typeof a!=="object")return a
-if("dartException" in a)return z.$1(a.dartException)
-else if(!("message" in a))return a
-y=a.message
-if("number" in a&&typeof a.number=="number"){x=a.number
-w=x&65535
-if((C.jn.wG(x,16)&8191)===10)switch(w){case 438:return z.$1(H.T3(H.d(y)+" (Error "+w+")",null))
-case 445:case 5007:v=H.d(y)+" (Error "+w+")"
-return z.$1(new H.ZQ(v,null))}}if(a instanceof TypeError){u=$.$get$U2()
-t=$.$get$k1()
-s=$.$get$Re()
-r=$.$get$fN()
-q=$.$get$qi()
-p=$.$get$rZ()
-o=$.$get$BX()
-$.$get$tt()
-n=$.$get$dt()
-m=$.$get$A7()
-l=u.qS(y)
-if(l!=null)return z.$1(H.T3(y,l))
-else{l=t.qS(y)
-if(l!=null){l.method="call"
-return z.$1(H.T3(y,l))}else{l=s.qS(y)
-if(l==null){l=r.qS(y)
-if(l==null){l=q.qS(y)
-if(l==null){l=p.qS(y)
-if(l==null){l=o.qS(y)
-if(l==null){l=r.qS(y)
-if(l==null){l=n.qS(y)
-if(l==null){l=m.qS(y)
-v=l!=null}else v=!0}else v=!0}else v=!0}else v=!0}else v=!0}else v=!0}else v=!0
-if(v)return z.$1(new H.ZQ(y,l==null?null:l.method))}}return z.$1(new H.vV(typeof y==="string"?y:""))}if(a instanceof RangeError){if(typeof y==="string"&&y.indexOf("call stack")!==-1)return new P.VS()
-y=function(b){try{return String(b)}catch(k){}return null}(a)
-return z.$1(new P.AT(!1,null,null,typeof y==="string"?y.replace(/^RangeError:\s*/,""):y))}if(typeof InternalError=="function"&&a instanceof InternalError)if(typeof y==="string"&&y==="too much recursion")return new P.VS()
-return a},
-ts:function(a){var z
-if(a==null)return new H.XO(a,null)
-z=a.$cachedTrace
-if(z!=null)return z
-return a.$cachedTrace=new H.XO(a,null)},
-CU:function(a){if(a==null||typeof a!='object')return J.hf(a)
-else return H.wP(a)},
-B7:function(a,b){var z,y,x,w
-z=a.length
-for(y=0;y<z;y=w){x=y+1
-w=x+1
-b.t(0,a[y],a[x])}return b},
-ft:function(a,b,c,d,e,f,g){switch(c){case 0:return H.zd(b,new H.dr(a))
-case 1:return H.zd(b,new H.TL(a,d))
-case 2:return H.zd(b,new H.KX(a,d,e))
-case 3:return H.zd(b,new H.uZ(a,d,e,f))
-case 4:return H.zd(b,new H.OQ(a,d,e,f,g))}throw H.b(P.FM("Unsupported number of arguments for wrapped closure"))},
-tR:function(a,b){var z
-if(a==null)return
-z=a.$identity
-if(!!z)return z
-z=function(c,d,e,f){return function(g,h,i,j){return f(c,e,d,g,h,i,j)}}(a,b,init.globalState.d,H.ft)
-a.$identity=z
-return z},
-iA:function(a,b,c,d,e,f){var z,y,x,w,v,u,t,s,r,q,p,o,n,m
-z=b[0]
-y=z.$callName
-if(!!J.v(c).$iszM){z.$reflectionInfo=c
-x=H.I(z).r}else x=c
-w=d?Object.create(new H.zx().constructor.prototype):Object.create(new H.rT(null,null,null,null).constructor.prototype)
-w.$initialize=w.constructor
-if(d)v=function(){this.$initialize()}
-else{u=$.yj
-$.yj=u+1
-u=new Function("a,b,c,d","this.$initialize(a,b,c,d);"+u)
-v=u}w.constructor=v
-v.prototype=w
-u=!d
-if(u){t=e.length==1&&!0
-s=H.bx(a,z,t)
-s.$reflectionInfo=c}else{w.$static_name=f
-s=z
-t=!1}if(typeof x=="number")r=function(g,h){return function(){return g(h)}}(H.e,x)
-else if(u&&typeof x=="function"){q=t?H.yS:H.DV
-r=function(g,h){return function(){return g.apply({$receiver:h(this)},arguments)}}(x,q)}else throw H.b("Error in reflectionInfo.")
-w.$signature=r
-w[y]=s
-for(u=b.length,p=1;p<u;++p){o=b[p]
-n=o.$callName
-if(n!=null){m=d?o:H.bx(a,o,t)
-w[n]=m}}w["call*"]=s
-w.$requiredArgCount=z.$requiredArgCount
-w.$defaultValues=z.$defaultValues
-return v},
-vq:function(a,b,c,d){var z=H.DV
-switch(b?-1:a){case 0:return function(e,f){return function(){return f(this)[e]()}}(c,z)
-case 1:return function(e,f){return function(g){return f(this)[e](g)}}(c,z)
-case 2:return function(e,f){return function(g,h){return f(this)[e](g,h)}}(c,z)
-case 3:return function(e,f){return function(g,h,i){return f(this)[e](g,h,i)}}(c,z)
-case 4:return function(e,f){return function(g,h,i,j){return f(this)[e](g,h,i,j)}}(c,z)
-case 5:return function(e,f){return function(g,h,i,j,k){return f(this)[e](g,h,i,j,k)}}(c,z)
-default:return function(e,f){return function(){return e.apply(f(this),arguments)}}(d,z)}},
-bx:function(a,b,c){var z,y,x,w,v,u
-if(c)return H.Hf(a,b)
-z=b.$stubName
-y=b.length
-x=a[z]
-w=b==null?x==null:b===x
-v=!w||y>=27
-if(v)return H.vq(y,!w,z,b)
-if(y===0){w=$.mJ
-if(w==null){w=H.E2("self")
-$.mJ=w}w="return function(){return this."+H.d(w)+"."+H.d(z)+"();"
-v=$.yj
-$.yj=v+1
-return new Function(w+H.d(v)+"}")()}u="abcdefghijklmnopqrstuvwxyz".split("").splice(0,y).join(",")
-w="return function("+u+"){return this."
-v=$.mJ
-if(v==null){v=H.E2("self")
-$.mJ=v}v=w+H.d(v)+"."+H.d(z)+"("+u+");"
-w=$.yj
-$.yj=w+1
-return new Function(v+H.d(w)+"}")()},
-Z4:function(a,b,c,d){var z,y
-z=H.DV
-y=H.yS
-switch(b?-1:a){case 0:throw H.b(new H.Eq("Intercepted function with no arguments."))
-case 1:return function(e,f,g){return function(){return f(this)[e](g(this))}}(c,z,y)
-case 2:return function(e,f,g){return function(h){return f(this)[e](g(this),h)}}(c,z,y)
-case 3:return function(e,f,g){return function(h,i){return f(this)[e](g(this),h,i)}}(c,z,y)
-case 4:return function(e,f,g){return function(h,i,j){return f(this)[e](g(this),h,i,j)}}(c,z,y)
-case 5:return function(e,f,g){return function(h,i,j,k){return f(this)[e](g(this),h,i,j,k)}}(c,z,y)
-case 6:return function(e,f,g){return function(h,i,j,k,l){return f(this)[e](g(this),h,i,j,k,l)}}(c,z,y)
-default:return function(e,f,g,h){return function(){h=[g(this)]
-Array.prototype.push.apply(h,arguments)
-return e.apply(f(this),h)}}(d,z,y)}},
-Hf:function(a,b){var z,y,x,w,v,u,t,s
-z=H.oN()
-y=$.P4
-if(y==null){y=H.E2("receiver")
-$.P4=y}x=b.$stubName
-w=b.length
-v=a[x]
-u=b==null?v==null:b===v
-t=!u||w>=28
-if(t)return H.Z4(w,!u,x,b)
-if(w===1){y="return function(){return this."+H.d(z)+"."+H.d(x)+"(this."+H.d(y)+");"
-u=$.yj
-$.yj=u+1
-return new Function(y+H.d(u)+"}")()}s="abcdefghijklmnopqrstuvwxyz".split("").splice(0,w-1).join(",")
-y="return function("+s+"){return this."+H.d(z)+"."+H.d(x)+"(this."+H.d(y)+", "+s+");"
-u=$.yj
-$.yj=u+1
-return new Function(y+H.d(u)+"}")()},
-qm:function(a,b,c,d,e,f){var z
-b.fixed$length=Array
-if(!!J.v(c).$iszM){c.fixed$length=Array
-z=c}else z=c
-return H.iA(a,b,z,!!d,e,f)},
-SE:function(a,b){var z=J.U6(b)
-throw H.b(H.aq(H.l(a),z.C(b,3,z.gA(b))))},
-Go:function(a,b){var z
-if(a!=null)z=(typeof a==="object"||typeof a==="function")&&J.v(a)[b]
-else z=!0
-if(z)return a
-H.SE(a,b)},
-eQ:function(a){throw H.b(new P.t7("Cyclic initialization for static "+H.d(a)))},
-KT:function(a,b,c){return new H.tD(a,b,c,null)},
-N7:function(){return C.KZ},
-Uh:function(){return(Math.random()*0x100000000>>>0)+(Math.random()*0x100000000>>>0)*4294967296},
-VM:function(a,b){a.$builtinTypeInfo=b
-return a},
-j:function(a){if(a==null)return
-return a.$builtinTypeInfo},
-IM:function(a,b){return H.Y9(a["$as"+H.d(b)],H.j(a))},
-W8:function(a,b,c){var z=H.IM(a,b)
-return z==null?null:z[c]},
-Kp:function(a,b){var z=H.j(a)
-return z==null?null:z[b]},
-Ko:function(a,b){if(a==null)return"dynamic"
-else if(typeof a==="object"&&a!==null&&a.constructor===Array)return a[0].builtin$cls+H.i(a,1,b)
-else if(typeof a=="function")return a.builtin$cls
-else if(typeof a==="number"&&Math.floor(a)===a)return C.jn.w(a)
-else return},
-i:function(a,b,c){var z,y,x,w,v,u
-if(a==null)return""
-z=new P.Rn("")
-for(y=b,x=!0,w=!0,v="";y<a.length;++y){if(x)x=!1
-else z.a=v+", "
-u=a[y]
-if(u!=null)w=!1
-v=z.a+=H.d(H.Ko(u,c))}return w?"":"<"+H.d(z)+">"},
-Y9:function(a,b){if(typeof a=="function"){a=a.apply(null,b)
-if(a==null)return a
-if(typeof a==="object"&&a!==null&&a.constructor===Array)return a
-if(typeof a=="function")return a.apply(null,b)}return b},
-hv:function(a,b){var z,y
-if(a==null||b==null)return!0
-z=a.length
-for(y=0;y<z;++y)if(!H.t1(a[y],b[y]))return!1
-return!0},
-IG:function(a,b,c){return a.apply(b,H.IM(b,c))},
-t1:function(a,b){var z,y,x,w,v
-if(a===b)return!0
-if(a==null||b==null)return!0
-if('func' in b)return H.Ly(a,b)
-if('func' in a)return b.builtin$cls==="EH"
-z=typeof a==="object"&&a!==null&&a.constructor===Array
-y=z?a[0]:a
-x=typeof b==="object"&&b!==null&&b.constructor===Array
-w=x?b[0]:b
-if(w!==y){if(!('$is'+H.Ko(w,null) in y.prototype))return!1
-v=y.prototype["$as"+H.d(H.Ko(w,null))]}else v=null
-if(!z&&v==null||!x)return!0
-z=z?a.slice(1):null
-x=x?b.slice(1):null
-return H.hv(H.Y9(v,z),x)},
-Hc:function(a,b,c){var z,y,x,w,v
-z=b==null
-if(z&&a==null)return!0
-if(z)return c
-if(a==null)return!1
-y=a.length
-x=b.length
-if(c){if(y<x)return!1}else if(y!==x)return!1
-for(w=0;w<x;++w){z=a[w]
-v=b[w]
-if(!(H.t1(z,v)||H.t1(v,z)))return!1}return!0},
-Vt:function(a,b){var z,y,x,w,v,u
-if(b==null)return!0
-if(a==null)return!1
-z=Object.getOwnPropertyNames(b)
-z.fixed$length=Array
-y=z
-for(z=y.length,x=0;x<z;++x){w=y[x]
-if(!Object.hasOwnProperty.call(a,w))return!1
-v=b[w]
-u=a[w]
-if(!(H.t1(v,u)||H.t1(u,v)))return!1}return!0},
-Ly:function(a,b){var z,y,x,w,v,u,t,s,r,q,p,o,n,m,l
-if(!('func' in a))return!1
-if("v" in a){if(!("v" in b)&&"ret" in b)return!1}else if(!("v" in b)){z=a.ret
-y=b.ret
-if(!(H.t1(z,y)||H.t1(y,z)))return!1}x=a.args
-w=b.args
-v=a.opt
-u=b.opt
-t=x!=null?x.length:0
-s=w!=null?w.length:0
-r=v!=null?v.length:0
-q=u!=null?u.length:0
-if(t>s)return!1
-if(t+r<s+q)return!1
-if(t===s){if(!H.Hc(x,w,!1))return!1
-if(!H.Hc(v,u,!0))return!1}else{for(p=0;p<t;++p){o=x[p]
-n=w[p]
-if(!(H.t1(o,n)||H.t1(n,o)))return!1}for(m=p,l=0;m<s;++l,++m){o=v[l]
-n=w[m]
-if(!(H.t1(o,n)||H.t1(n,o)))return!1}for(m=0;m<q;++l,++m){o=v[l]
-n=u[m]
-if(!(H.t1(o,n)||H.t1(n,o)))return!1}}return H.Vt(a.named,b.named)},
-F3:function(a){var z=$.n
-return"Instance of "+(z==null?"<Unknown>":z.$1(a))},
-kE:function(a){return H.wP(a)},
-iw:function(a,b,c){Object.defineProperty(a,b,{value:c,enumerable:false,writable:true,configurable:true})},
-w:function(a){var z,y,x,w,v,u
-z=$.n.$1(a)
-y=$.z[z]
-if(y!=null){Object.defineProperty(a,init.dispatchPropertyName,{value:y,enumerable:false,writable:true,configurable:true})
-return y.i}x=$.a[z]
-if(x!=null)return x
-w=init.interceptorsByTag[z]
-if(w==null){z=$.c.$2(a,z)
-if(z!=null){y=$.z[z]
-if(y!=null){Object.defineProperty(a,init.dispatchPropertyName,{value:y,enumerable:false,writable:true,configurable:true})
-return y.i}x=$.a[z]
-if(x!=null)return x
-w=init.interceptorsByTag[z]}}if(w==null)return
-x=w.prototype
-v=z[0]
-if(v==="!"){y=H.C(x)
-$.z[z]=y
-Object.defineProperty(a,init.dispatchPropertyName,{value:y,enumerable:false,writable:true,configurable:true})
-return y.i}if(v==="~"){$.a[z]=x
-return x}if(v==="-"){u=H.C(x)
-Object.defineProperty(Object.getPrototypeOf(a),init.dispatchPropertyName,{value:u,enumerable:false,writable:true,configurable:true})
-return u.i}if(v==="+")return H.Lc(a,x)
-if(v==="*")throw H.b(new P.D(z))
-if(init.leafTags[z]===true){u=H.C(x)
-Object.defineProperty(Object.getPrototypeOf(a),init.dispatchPropertyName,{value:u,enumerable:false,writable:true,configurable:true})
-return u.i}else return H.Lc(a,x)},
-Lc:function(a,b){var z=Object.getPrototypeOf(a)
-Object.defineProperty(z,init.dispatchPropertyName,{value:J.Qu(b,z,null,null),enumerable:false,writable:true,configurable:true})
-return b},
-C:function(a){return J.Qu(a,!1,null,!!a.$isXj)},
-VF:function(a,b,c){var z=b.prototype
-if(init.leafTags[a]===true)return J.Qu(z,!1,null,!!z.$isXj)
-else return J.Qu(z,c,null,null)},
-u:function(){if(!0===$.M)return
-$.M=!0
-H.Z1()},
-Z1:function(){var z,y,x,w,v,u,t,s
-$.z=Object.create(null)
-$.a=Object.create(null)
-H.f()
-z=init.interceptorsByTag
-y=Object.getOwnPropertyNames(z)
-if(typeof window!="undefined"){window
-x=function(){}
-for(w=0;w<y.length;++w){v=y[w]
-u=$.x7.$1(v)
-if(u!=null){t=H.VF(v,z[v],u)
-if(t!=null){Object.defineProperty(u,init.dispatchPropertyName,{value:t,enumerable:false,writable:true,configurable:true})
-x.prototype=u}}}}for(w=0;w<y.length;++w){v=y[w]
-if(/^[A-Za-z_]/.test(v)){s=z[v]
-z["!"+v]=s
-z["~"+v]=s
-z["-"+v]=s
-z["+"+v]=s
-z["*"+v]=s}}},
-f:function(){var z,y,x,w,v,u,t
-z=C.M1()
-z=H.ud(C.Mc,H.ud(C.hQ,H.ud(C.XQ,H.ud(C.XQ,H.ud(C.Jh,H.ud(C.lR,H.ud(C.ur(C.w2),z)))))))
-if(typeof dartNativeDispatchHooksTransformer!="undefined"){y=dartNativeDispatchHooksTransformer
-if(typeof y=="function")y=[y]
-if(y.constructor==Array)for(x=0;x<y.length;++x){w=y[x]
-if(typeof w=="function")z=w(z)||z}}v=z.getTag
-u=z.getUnknownTag
-t=z.prototypeForTag
-$.n=new H.y(v)
-$.c=new H.dC(u)
-$.x7=new H.wN(t)},
-ud:function(a,b){return a(b)||b},
-FD:{"^":"Mh;a,b,c,d,e,f,r,x",static:{
-I:function(a){var z,y,x
-z=a.$reflectionInfo
-if(z==null)return
-z.fixed$length=Array
-z=z
-y=z[0]
-x=z[1]
-return new H.FD(a,z,(y&1)===1,y>>1,x>>1,(x&1)===1,z[2],null)}}},
-Zr:{"^":"Mh;a,b,c,d,e,f",
-qS:function(a){var z,y,x
-z=new RegExp(this.a).exec(a)
-if(z==null)return
-y=Object.create(null)
-x=this.b
-if(x!==-1)y.arguments=z[x+1]
-x=this.c
-if(x!==-1)y.argumentsExpr=z[x+1]
-x=this.d
-if(x!==-1)y.expr=z[x+1]
-x=this.e
-if(x!==-1)y.method=z[x+1]
-x=this.f
-if(x!==-1)y.receiver=z[x+1]
-return y},
-static:{
-cM:function(a){var z,y,x,w,v,u
-a=a.replace(String({}),'$receiver$').replace(/[[\]{}()*+?.\\^$|]/g,"\\$&")
-z=a.match(/\\\$[a-zA-Z]+\\\$/g)
-if(z==null)z=[]
-y=z.indexOf("\\$arguments\\$")
-x=z.indexOf("\\$argumentsExpr\\$")
-w=z.indexOf("\\$expr\\$")
-v=z.indexOf("\\$method\\$")
-u=z.indexOf("\\$receiver\\$")
-return new H.Zr(a.replace('\\$arguments\\$','((?:x|[^x])*)').replace('\\$argumentsExpr\\$','((?:x|[^x])*)').replace('\\$expr\\$','((?:x|[^x])*)').replace('\\$method\\$','((?:x|[^x])*)').replace('\\$receiver\\$','((?:x|[^x])*)'),y,x,w,v,u)},
-S7:function(a){return function($expr$){var $argumentsExpr$='$arguments$'
-try{$expr$.$method$($argumentsExpr$)}catch(z){return z.message}}(a)},
-Mj:function(a){return function($expr$){try{$expr$.$method$}catch(z){return z.message}}(a)}}},
-ZQ:{"^":"Ge;a,b",
-w:function(a){var z=this.b
-if(z==null)return"NullError: "+H.d(this.a)
-return"NullError: method not found: '"+H.d(z)+"' on null"}},
-az:{"^":"Ge;a,b,c",
-w:function(a){var z,y
-z=this.b
-if(z==null)return"NoSuchMethodError: "+H.d(this.a)
-y=this.c
-if(y==null)return"NoSuchMethodError: method not found: '"+H.d(z)+"' ("+H.d(this.a)+")"
-return"NoSuchMethodError: method not found: '"+H.d(z)+"' on '"+H.d(y)+"' ("+H.d(this.a)+")"},
-static:{
-T3:function(a,b){var z,y
-z=b==null
-y=z?null:b.method
-return new H.az(a,y,z?null:b.receiver)}}},
-vV:{"^":"Ge;a",
-w:function(a){var z=this.a
-return z.length===0?"Error":"Error: "+z}},
-Hk:{"^":"L:1;a",
-$1:function(a){if(!!J.v(a).$isGe)if(a.$thrownJsError==null)a.$thrownJsError=this.a
-return a}},
-XO:{"^":"Mh;a,b",
-w:function(a){var z,y
-z=this.b
-if(z!=null)return z
-z=this.a
-y=z!==null&&typeof z==="object"?z.stack:null
-z=y==null?"":y
-this.b=z
-return z}},
-dr:{"^":"L:0;a",
-$0:function(){return this.a.$0()}},
-TL:{"^":"L:0;a,b",
-$0:function(){return this.a.$1(this.b)}},
-KX:{"^":"L:0;a,b,c",
-$0:function(){return this.a.$2(this.b,this.c)}},
-uZ:{"^":"L:0;a,b,c,d",
-$0:function(){return this.a.$3(this.b,this.c,this.d)}},
-OQ:{"^":"L:0;a,b,c,d,e",
-$0:function(){return this.a.$4(this.b,this.c,this.d,this.e)}},
-L:{"^":"Mh;",
-w:function(a){return"Closure '"+H.l(this)+"'"},
-gQl:function(){return this},
-gQl:function(){return this}},
-Bp:{"^":"L;"},
-zx:{"^":"Bp;",
-w:function(a){var z=this.$static_name
-if(z==null)return"Closure of unknown static method"
-return"Closure '"+z+"'"}},
-rT:{"^":"Bp;a,b,c,d",
-D:function(a,b){if(b==null)return!1
-if(this===b)return!0
-if(!(b instanceof H.rT))return!1
-return this.a===b.a&&this.b===b.b&&this.c===b.c},
-gM:function(a){var z,y
-z=this.c
-if(z==null)y=H.wP(this.a)
-else y=typeof z!=="object"?J.hf(z):H.wP(z)
-return(y^H.wP(this.b))>>>0},
-w:function(a){var z=this.c
-if(z==null)z=this.a
-return"Closure '"+H.d(this.d)+"' of "+H.H(z)},
-static:{
-DV:function(a){return a.a},
-yS:function(a){return a.c},
-oN:function(){var z=$.mJ
-if(z==null){z=H.E2("self")
-$.mJ=z}return z},
-E2:function(a){var z,y,x,w,v
-z=new H.rT("self","target","receiver","name")
-y=Object.getOwnPropertyNames(z)
-y.fixed$length=Array
-x=y
-for(y=x.length,w=0;w<y;++w){v=x[w]
-if(z[v]===a)return v}}}},
-Pe:{"^":"Ge;a",
-w:function(a){return this.a},
-static:{
-aq:function(a,b){return new H.Pe("CastError: Casting value of type "+H.d(a)+" to incompatible type "+H.d(b))}}},
-Eq:{"^":"Ge;a",
-w:function(a){return"RuntimeError: "+H.d(this.a)}},
-lb:{"^":"Mh;"},
-tD:{"^":"lb;a,b,c,d",
-Zg:function(a){var z=this.LC(a)
-return z==null?!1:H.Ly(z,this.za())},
-LC:function(a){var z=J.v(a)
-return"$signature" in z?z.$signature():null},
-za:function(){var z,y,x,w,v,u,t
-z={func:"dynafunc"}
-y=this.a
-x=J.v(y)
-if(!!x.$isnr)z.v=true
-else if(!x.$ishJ)z.ret=y.za()
-y=this.b
-if(y!=null&&y.length!==0)z.args=H.Dz(y)
-y=this.c
-if(y!=null&&y.length!==0)z.opt=H.Dz(y)
-y=this.d
-if(y!=null){w=Object.create(null)
-v=H.kU(y)
-for(x=v.length,u=0;u<x;++u){t=v[u]
-w[t]=y[t].za()}z.named=w}return z},
-w:function(a){var z,y,x,w,v,u,t,s
-z=this.b
-if(z!=null)for(y=z.length,x="(",w=!1,v=0;v<y;++v,w=!0){u=z[v]
-if(w)x+=", "
-x+=J.A(u)}else{x="("
-w=!1}z=this.c
-if(z!=null&&z.length!==0){x=(w?x+", ":x)+"["
-for(y=z.length,w=!1,v=0;v<y;++v,w=!0){u=z[v]
-if(w)x+=", "
-x+=J.A(u)}x+="]"}else{z=this.d
-if(z!=null){x=(w?x+", ":x)+"{"
-t=H.kU(z)
-for(y=t.length,w=!1,v=0;v<y;++v,w=!0){s=t[v]
-if(w)x+=", "
-x+=H.d(z[s].za())+" "+s}x+="}"}}return x+(") -> "+J.A(this.a))},
-static:{
-Dz:function(a){var z,y,x
-a=a
-z=[]
-for(y=a.length,x=0;x<y;++x)z.push(a[x].za())
-return z}}},
-hJ:{"^":"lb;",
-w:function(a){return"dynamic"},
-za:function(){return}},
-N5:{"^":"Mh;a,b,c,d,e,f,r",
-gA:function(a){return this.a},
-gl0:function(a){return this.a===0},
-gvc:function(a){return H.VM(new H.i5(this),[H.Kp(this,0)])},
-gUQ:function(a){return H.K1(this.gvc(this),new H.Mw(this),H.Kp(this,0),H.Kp(this,1))},
-x4:function(a,b){var z,y
-if(typeof b==="string"){z=this.b
-if(z==null)return!1
-return this.Xu(z,b)}else if(typeof b==="number"&&(b&0x3ffffff)===b){y=this.c
-if(y==null)return!1
-return this.Xu(y,b)}else return this.CX(b)},
-CX:function(a){var z=this.d
-if(z==null)return!1
-return this.X(this.i(z,this.xi(a)),a)>=0},
-q:function(a,b){var z,y,x
-if(typeof b==="string"){z=this.b
-if(z==null)return
-y=this.i(z,b)
-return y==null?null:y.b}else if(typeof b==="number"&&(b&0x3ffffff)===b){x=this.c
-if(x==null)return
-y=this.i(x,b)
-return y==null?null:y.b}else return this.aa(b)},
-aa:function(a){var z,y,x
-z=this.d
-if(z==null)return
-y=this.i(z,this.xi(a))
-x=this.X(y,a)
-if(x<0)return
-return y[x].b},
-t:function(a,b,c){var z,y,x,w,v,u
-if(typeof b==="string"){z=this.b
-if(z==null){z=this.j()
-this.b=z}this.m(z,b,c)}else if(typeof b==="number"&&(b&0x3ffffff)===b){y=this.c
-if(y==null){y=this.j()
-this.c=y}this.m(y,b,c)}else{x=this.d
-if(x==null){x=this.j()
-this.d=x}w=this.xi(b)
-v=this.i(x,w)
-if(v==null)this.n(x,w,[this.Y(b,c)])
-else{u=this.X(v,b)
-if(u>=0)v[u].b=c
-else v.push(this.Y(b,c))}}},
-Rz:function(a,b){if(typeof b==="string")return this.Vz(this.b,b)
-else if(typeof b==="number"&&(b&0x3ffffff)===b)return this.Vz(this.c,b)
-else return this.WM(b)},
-WM:function(a){var z,y,x,w
-z=this.d
-if(z==null)return
-y=this.i(z,this.xi(a))
-x=this.X(y,a)
-if(x<0)return
-w=y.splice(x,1)[0]
-this.Yp(w)
-return w.b},
-V1:function(a){if(this.a>0){this.f=null
-this.e=null
-this.d=null
-this.c=null
-this.b=null
-this.a=0
-this.r=this.r+1&67108863}},
-U:function(a,b){var z,y
-z=this.e
-y=this.r
-for(;z!=null;){b.$2(z.a,z.b)
-if(y!==this.r)throw H.b(new P.UV(this))
-z=z.c}},
-m:function(a,b,c){var z=this.i(a,b)
-if(z==null)this.n(a,b,this.Y(b,c))
-else z.b=c},
-Vz:function(a,b){var z
-if(a==null)return
-z=this.i(a,b)
-if(z==null)return
-this.Yp(z)
-this.R(a,b)
-return z.b},
-Y:function(a,b){var z,y
-z=new H.db(a,b,null,null)
-if(this.e==null){this.f=z
-this.e=z}else{y=this.f
-z.d=y
-y.c=z
-this.f=z}++this.a
-this.r=this.r+1&67108863
-return z},
-Yp:function(a){var z,y
-z=a.d
-y=a.c
-if(z==null)this.e=y
-else z.c=y
-if(y==null)this.f=z
-else y.d=z;--this.a
-this.r=this.r+1&67108863},
-xi:function(a){return J.hf(a)&0x3ffffff},
-X:function(a,b){var z,y
-if(a==null)return-1
-z=a.length
-for(y=0;y<z;++y)if(J.RM(a[y].a,b))return y
-return-1},
-w:function(a){return P.vW(this)},
-i:function(a,b){return a[b]},
-n:function(a,b,c){a[b]=c},
-R:function(a,b){delete a[b]},
-Xu:function(a,b){return this.i(a,b)!=null},
-j:function(){var z=Object.create(null)
-this.n(z,"<non-identifier-key>",z)
-this.R(z,"<non-identifier-key>")
-return z},
-$isym:1},
-Mw:{"^":"L:1;a",
-$1:function(a){return this.a.q(0,a)}},
-db:{"^":"Mh;a,b,c,d"},
-i5:{"^":"cX;a",
-gA:function(a){return this.a.a},
-gk:function(a){var z,y
-z=this.a
-y=new H.N6(z,z.r,null,null)
-y.c=z.e
-return y},
-U:function(a,b){var z,y,x
-z=this.a
-y=z.e
-x=z.r
-for(;y!=null;){b.$1(y.a)
-if(x!==z.r)throw H.b(new P.UV(z))
-y=y.c}},
-$isqC:1},
-N6:{"^":"Mh;a,b,c,d",
-gl:function(){return this.d},
-F:function(){var z=this.a
-if(this.b!==z.r)throw H.b(new P.UV(z))
-else{z=this.c
-if(z==null){this.d=null
-return!1}else{this.d=z.a
-this.c=z.c
-return!0}}}},
-y:{"^":"L:1;a",
-$1:function(a){return this.a(a)}},
-dC:{"^":"L:8;a",
-$2:function(a,b){return this.a(a,b)}},
-wN:{"^":"L:9;a",
-$1:function(a){return this.a(a)}},
-VR:{"^":"Mh;a,b,c,d",
-w:function(a){return"RegExp/"+this.a+"/"},
-static:{
-v4:function(a,b,c,d){var z,y,x,w
-H.Yx(a)
-z=b?"m":""
-y=c?"":"i"
-x=d?"g":""
-w=function(e,f){try{return new RegExp(e,f)}catch(v){return v}}(a,z+y+x)
-if(w instanceof RegExp)return w
-throw H.b(new P.aE("Illegal RegExp pattern ("+String(w)+")",a,null))}}}}],["","",,H,{"^":"",
-Wp:function(){return new P.lj("No element")},
-Am:function(){return new P.lj("Too many elements")},
-ar:function(){return new P.lj("Too few elements")},
-ho:{"^":"cX;",
-gk:function(a){return new H.a7(this,this.gA(this),0,null)},
-U:function(a,b){var z,y
-z=this.gA(this)
-for(y=0;y<z;++y){b.$1(this.W(0,y))
-if(z!==this.gA(this))throw H.b(new P.UV(this))}},
-S:function(a,b){return this.p(this,b)},
-tt:function(a,b){var z,y
-z=H.VM([],[H.W8(this,"ho",0)])
-C.Nm.sA(z,this.gA(this))
-for(y=0;y<this.gA(this);++y)z[y]=this.W(0,y)
-return z},
-br:function(a){return this.tt(a,!0)},
-$isqC:1},
-a7:{"^":"Mh;a,b,c,d",
-gl:function(){return this.d},
-F:function(){var z,y,x,w
-z=this.a
-y=J.U6(z)
-x=y.gA(z)
-if(this.b!==x)throw H.b(new P.UV(z))
-w=this.c
-if(w>=x){this.d=null
-return!1}this.d=y.W(z,w);++this.c
-return!0}},
-i1:{"^":"cX;a,b",
-gk:function(a){var z=new H.MH(null,J.IT(this.a),this.b)
-z.$builtinTypeInfo=this.$builtinTypeInfo
-return z},
-gA:function(a){return J.Hm(this.a)},
-$ascX:function(a,b){return[b]},
-static:{
-K1:function(a,b,c,d){if(!!J.v(a).$isqC)return H.VM(new H.xy(a,b),[c,d])
-return H.VM(new H.i1(a,b),[c,d])}}},
-xy:{"^":"i1;a,b",$isqC:1},
-MH:{"^":"An;a,b,c",
-F:function(){var z=this.b
-if(z.F()){this.a=this.Mi(z.gl())
-return!0}this.a=null
-return!1},
-gl:function(){return this.a},
-Mi:function(a){return this.c.$1(a)}},
-A8:{"^":"ho;a,b",
-gA:function(a){return J.Hm(this.a)},
-W:function(a,b){return this.Mi(J.GA(this.a,b))},
-Mi:function(a){return this.b.$1(a)},
-$asho:function(a,b){return[b]},
-$ascX:function(a,b){return[b]},
-$isqC:1},
-U5:{"^":"cX;a,b",
-gk:function(a){var z=new H.SO(J.IT(this.a),this.b)
-z.$builtinTypeInfo=this.$builtinTypeInfo
-return z}},
-SO:{"^":"An;a,b",
-F:function(){for(var z=this.a;z.F();)if(this.Mi(z.gl()))return!0
-return!1},
-gl:function(){return this.a.gl()},
-Mi:function(a){return this.b.$1(a)}},
-SU:{"^":"Mh;"}}],["","",,H,{"^":"",
-kU:function(a){var z=H.VM(a?Object.keys(a):[],[null])
-z.fixed$length=Array
-return z}}],["","",,P,{"^":"",
-Oj:function(){var z,y,x
-z={}
-if(self.scheduleImmediate!=null)return P.EX()
-if(self.MutationObserver!=null&&self.document!=null){y=self.document.createElement("div")
-x=self.document.createElement("span")
-z.a=null
-new self.MutationObserver(H.tR(new P.th(z),1)).observe(y,{childList:true})
-return new P.ha(z,y,x)}else if(self.setImmediate!=null)return P.yt()
-return P.qW()},
-ZV:[function(a){++init.globalState.f.b
-self.scheduleImmediate(H.tR(new P.C6(a),0))},"$1","EX",2,0,3],
-oA:[function(a){++init.globalState.f.b
-self.setImmediate(H.tR(new P.Ft(a),0))},"$1","yt",2,0,3],
-Bz:[function(a){P.YF(C.RT,a)},"$1","qW",2,0,3],
-VH:function(a,b){var z=H.N7()
-z=H.KT(z,[z,z]).Zg(a)
-if(z){b.toString
-return a}else{b.toString
-return a}},
-pu:function(){var z,y
-for(;z=$.S6,z!=null;){$.mg=null
-y=z.b
-$.S6=y
-if(y==null)$.k8=null
-z.a.$0()}},
-eN:[function(){$.UD=!0
-try{P.pu()}finally{$.mg=null
-$.UD=!1
-if($.S6!=null)$.$get$Wc().$1(P.UI())}},"$0","UI",0,0,2],
-eW:function(a){var z=new P.OM(a,null)
-if($.S6==null){$.k8=z
-$.S6=z
-if(!$.UD)$.$get$Wc().$1(P.UI())}else{$.k8.b=z
-$.k8=z}},
-rR:function(a){var z,y,x
-z=$.S6
-if(z==null){P.eW(a)
-$.mg=$.k8
-return}y=new P.OM(a,null)
-x=$.mg
-if(x==null){y.b=z
-$.mg=y
-$.S6=y}else{y.b=x.b
-x.b=y
-$.mg=y
-if(y.b==null)$.k8=y}},
-rb:function(a){var z=$.X3
-if(C.NU===z){P.Tk(null,null,C.NU,a)
-return}z.toString
-P.Tk(null,null,z,z.kb(a,!0))},
-FE:function(a,b,c){var z,y,x,w,v,u,t
-try{b.$1(a.$0())}catch(u){t=H.p(u)
-z=t
-y=H.ts(u)
-$.X3.toString
-x=null
-if(x==null)c.$2(z,y)
-else{t=J.YA(x)
-w=t
-v=x.gII()
-c.$2(w,v)}}},
-NX:function(a,b,c,d){var z=a.Gv(0)
-if(!!J.v(z).$isb8)z.wM(new P.v1(b,c,d))
-else b.ZL(c,d)},
-TB:function(a,b){return new P.uR(a,b)},
-ww:function(a,b){var z=$.X3
-if(z===C.NU){z.toString
-return P.YF(a,b)}return P.YF(a,z.kb(b,!0))},
-YF:function(a,b){var z=C.jn.BU(a.a,1000)
-return H.cy(z<0?0:z,b)},
-L2:function(a,b,c,d,e){var z={}
-z.a=d
-P.rR(new P.pK(z,e))},
-T8:function(a,b,c,d){var z,y
-y=$.X3
-if(y===c)return d.$0()
-$.X3=c
-z=y
-try{y=d.$0()
-return y}finally{$.X3=z}},
-yv:function(a,b,c,d,e){var z,y
-y=$.X3
-if(y===c)return d.$1(e)
-$.X3=c
-z=y
-try{y=d.$1(e)
-return y}finally{$.X3=z}},
-Qx:function(a,b,c,d,e,f){var z,y
-y=$.X3
-if(y===c)return d.$2(e,f)
-$.X3=c
-z=y
-try{y=d.$2(e,f)
-return y}finally{$.X3=z}},
-Tk:function(a,b,c,d){var z=C.NU!==c
-if(z)d=c.kb(d,!(!z||!1))
-P.eW(d)},
-th:{"^":"L:1;a",
-$1:function(a){var z,y;--init.globalState.f.b
-z=this.a
-y=z.a
-z.a=null
-y.$0()}},
-ha:{"^":"L:10;a,b,c",
-$1:function(a){var z,y;++init.globalState.f.b
-this.a.a=a
-z=this.b
-y=this.c
-z.firstChild?z.removeChild(y):z.appendChild(y)}},
-C6:{"^":"L:0;a",
-$0:function(){--init.globalState.f.b
-this.a.$0()}},
-Ft:{"^":"L:0;a",
-$0:function(){--init.globalState.f.b
-this.a.$0()}},
-b8:{"^":"Mh;"},
-Fe:{"^":"Mh;a,b,c,d,e"},
-vs:{"^":"Mh;YM:a@,b,O1:c<",
-Rx:function(a,b){var z,y
-z=$.X3
-if(z!==C.NU){z.toString
-if(b!=null)b=P.VH(b,z)}y=H.VM(new P.vs(0,z,null),[null])
-this.xf(new P.Fe(null,y,b==null?1:3,a,b))
-return y},
-ml:function(a){return this.Rx(a,null)},
-wM:function(a){var z,y
-z=$.X3
-y=new P.vs(0,z,null)
-y.$builtinTypeInfo=this.$builtinTypeInfo
-if(z!==C.NU)z.toString
-this.xf(new P.Fe(null,y,8,a,null))
-return y},
-xf:function(a){var z,y
-z=this.a
-if(z<=1){a.a=this.c
-this.c=a}else{if(z===2){z=this.c
-y=z.a
-if(y<4){z.xf(a)
-return}this.a=y
-this.c=z.c}z=this.b
-z.toString
-P.Tk(null,null,z,new P.da(this,a))}},
-jQ:function(a){var z,y,x,w,v,u
-z={}
-z.a=a
-if(a==null)return
-y=this.a
-if(y<=1){x=this.c
-this.c=a
-if(x!=null){for(w=a;v=w.a,v!=null;w=v);w.a=x}}else{if(y===2){y=this.c
-u=y.a
-if(u<4){y.jQ(a)
-return}this.a=u
-this.c=y.c}z.a=this.N8(a)
-y=this.b
-y.toString
-P.Tk(null,null,y,new P.oQ(z,this))}},
-ah:function(){var z=this.c
-this.c=null
-return this.N8(z)},
-N8:function(a){var z,y,x
-for(z=a,y=null;z!=null;y=z,z=x){x=z.a
-z.a=y}return y},
-HH:function(a){var z
-if(!!J.v(a).$isb8)P.A9(a,this)
-else{z=this.ah()
-this.a=4
-this.c=a
-P.HZ(this,z)}},
-X2:function(a){var z=this.ah()
-this.a=4
-this.c=a
-P.HZ(this,z)},
-ZL:[function(a,b){var z=this.ah()
-this.a=8
-this.c=new P.OH(a,b)
-P.HZ(this,z)},function(a){return this.ZL(a,null)},"yk","$2","$1","gFa",2,2,11,0],
-$isb8:1,
-static:{
-k3:function(a,b){var z,y,x,w
-b.sYM(1)
-try{a.Rx(new P.pV(b),new P.U7(b))}catch(x){w=H.p(x)
-z=w
-y=H.ts(x)
-P.rb(new P.vr(b,z,y))}},
-A9:function(a,b){var z,y,x
-for(;z=a.a,z===2;)a=a.c
-y=b.c
-if(z>=4){b.c=null
-x=b.N8(y)
-b.a=a.a
-b.c=a.c
-P.HZ(b,x)}else{b.a=2
-b.c=a
-a.jQ(y)}},
-HZ:function(a,b){var z,y,x,w,v,u,t,s,r,q,p,o,n
-z={}
-z.a=a
-for(y=a;!0;){x={}
-w=y.a===8
-if(b==null){if(w){z=y.c
-y=y.b
-x=z.a
-z=z.b
-y.toString
-P.L2(null,null,y,x,z)}return}for(;v=b.a,v!=null;b=v){b.a=null
-P.HZ(z.a,b)}y=z.a
-u=y.c
-x.a=w
-x.b=u
-t=!w
-if(t){s=b.c
-s=(s&1)!==0||s===8}else s=!0
-if(s){s=b.b
-r=s.b
-if(w){q=y.b
-q.toString
-q=q==null?r==null:q===r
-if(!q)r.toString
-else q=!0
-q=!q}else q=!1
-if(q){z=y.b
-y=u.a
-x=u.b
-z.toString
-P.L2(null,null,z,y,x)
-return}p=$.X3
-if(p==null?r!=null:p!==r)$.X3=r
-else p=null
-y=b.c
-if(y===8)new P.RT(z,x,w,b,r).$0()
-else if(t){if((y&1)!==0)new P.rq(x,w,b,u,r).$0()}else if((y&2)!==0)new P.RW(z,x,b,r).$0()
-if(p!=null)$.X3=p
-y=x.b
-t=J.v(y)
-if(!!t.$isb8){if(!!t.$isvs)if(y.a>=4){o=s.c
-s.c=null
-b=s.N8(o)
-s.a=y.a
-s.c=y.c
-z.a=y
-continue}else P.A9(y,s)
-else P.k3(y,s)
-return}}n=b.b
-o=n.c
-n.c=null
-b=n.N8(o)
-y=x.a
-x=x.b
-if(!y){n.a=4
-n.c=x}else{n.a=8
-n.c=x}z.a=n
-y=n}}}},
-da:{"^":"L:0;a,b",
-$0:function(){P.HZ(this.a,this.b)}},
-oQ:{"^":"L:0;a,b",
-$0:function(){P.HZ(this.b,this.a.a)}},
-pV:{"^":"L:1;a",
-$1:function(a){this.a.X2(a)}},
-U7:{"^":"L:12;a",
-$2:function(a,b){this.a.ZL(a,b)},
-$1:function(a){return this.$2(a,null)}},
-vr:{"^":"L:0;a,b,c",
-$0:function(){this.a.ZL(this.b,this.c)}},
-rq:{"^":"L:2;a,b,c,d,e",
-$0:function(){var z,y,x,w
-try{x=this.a
-x.b=this.e.FI(this.c.d,this.d)
-x.a=!1}catch(w){x=H.p(w)
-z=x
-y=H.ts(w)
-x=this.a
-x.b=new P.OH(z,y)
-x.a=!0}}},
-RW:{"^":"L:2;a,b,c,d",
-$0:function(){var z,y,x,w,v,u,t,s,r,q,p,o,n,m
-z=this.a.a.c
-y=!0
-r=this.c
-if(r.c===6){x=r.d
-try{y=this.d.FI(x,J.YA(z))}catch(q){r=H.p(q)
-w=r
-v=H.ts(q)
-r=J.YA(z)
-p=w
-o=(r==null?p==null:r===p)?z:new P.OH(w,v)
-r=this.b
-r.b=o
-r.a=!0
-return}}u=r.e
-if(y&&u!=null)try{r=u
-p=H.N7()
-p=H.KT(p,[p,p]).Zg(r)
-n=this.d
-m=this.b
-if(p)m.b=n.mg(u,J.YA(z),z.gII())
-else m.b=n.FI(u,J.YA(z))
-m.a=!1}catch(q){r=H.p(q)
-t=r
-s=H.ts(q)
-r=J.YA(z)
-p=t
-o=(r==null?p==null:r===p)?z:new P.OH(t,s)
-r=this.b
-r.b=o
-r.a=!0}}},
-RT:{"^":"L:2;a,b,c,d,e",
-$0:function(){var z,y,x,w,v,u
-z=null
-try{z=this.e.Gr(this.d.d)}catch(w){v=H.p(w)
-y=v
-x=H.ts(w)
-if(this.c){v=this.a.a.c.a
-u=y
-u=v==null?u==null:v===u
-v=u}else v=!1
-u=this.b
-if(v)u.b=this.a.a.c
-else u.b=new P.OH(y,x)
-u.a=!0
-return}if(!!J.v(z).$isb8){if(z instanceof P.vs&&z.gYM()>=4){if(z.gYM()===8){v=this.b
-v.b=z.gO1()
-v.a=!0}return}v=this.b
-v.b=z.ml(new P.jZ(this.a.a))
-v.a=!1}}},
-jZ:{"^":"L:1;a",
-$1:function(a){return this.a}},
-OM:{"^":"Mh;a,b"},
-qh:{"^":"Mh;",
-U:function(a,b){var z,y
-z={}
-y=H.VM(new P.vs(0,$.X3,null),[null])
-z.a=null
-z.a=this.X5(new P.lz(z,this,b,y),!0,new P.M4(y),y.gFa())
-return y},
-gA:function(a){var z,y
-z={}
-y=H.VM(new P.vs(0,$.X3,null),[P.KN])
-z.a=0
-this.X5(new P.B5(z),!0,new P.PI(z,y),y.gFa())
-return y}},
-lz:{"^":"L;a,b,c,d",
-$1:function(a){P.FE(new P.Rl(this.c,a),new P.Jb(),P.TB(this.a.a,this.d))},
-$signature:function(){return H.IG(function(a){return{func:1,args:[a]}},this.b,"qh")}},
-Rl:{"^":"L:0;a,b",
-$0:function(){return this.a.$1(this.b)}},
-Jb:{"^":"L:1;",
-$1:function(a){}},
-M4:{"^":"L:0;a",
-$0:function(){this.a.HH(null)}},
-B5:{"^":"L:1;a",
-$1:function(a){++this.a.a}},
-PI:{"^":"L:0;a,b",
-$0:function(){this.b.HH(this.a.a)}},
-MO:{"^":"Mh;"},
-NO:{"^":"Mh;"},
-aA:{"^":"Mh;"},
-v1:{"^":"L:0;a,b,c",
-$0:function(){return this.a.ZL(this.b,this.c)}},
-uR:{"^":"L:13;a,b",
-$2:function(a,b){return P.NX(this.a,this.b,a,b)}},
-OH:{"^":"Mh;kc:a>,II:b<",
-w:function(a){return H.d(this.a)},
-$isGe:1},
-m0:{"^":"Mh;"},
-pK:{"^":"L:0;a,b",
-$0:function(){var z,y,x
-z=this.a
-y=z.a
-if(y==null){x=new P.B()
-z.a=x
-z=x}else z=y
-y=this.b
-if(y==null)throw H.b(z)
-x=H.b(z)
-x.stack=J.A(y)
-throw x}},
-R8:{"^":"m0;",
-bH:function(a){var z,y,x,w
-try{if(C.NU===$.X3){x=a.$0()
-return x}x=P.T8(null,null,this,a)
-return x}catch(w){x=H.p(w)
-z=x
-y=H.ts(w)
-return P.L2(null,null,this,z,y)}},
-m1:function(a,b){var z,y,x,w
-try{if(C.NU===$.X3){x=a.$1(b)
-return x}x=P.yv(null,null,this,a,b)
-return x}catch(w){x=H.p(w)
-z=x
-y=H.ts(w)
-return P.L2(null,null,this,z,y)}},
-kb:function(a,b){if(b)return new P.hj(this,a)
-else return new P.MK(this,a)},
-oj:function(a,b){return new P.pQ(this,a)},
-q:function(a,b){return},
-Gr:function(a){if($.X3===C.NU)return a.$0()
-return P.T8(null,null,this,a)},
-FI:function(a,b){if($.X3===C.NU)return a.$1(b)
-return P.yv(null,null,this,a,b)},
-mg:function(a,b,c){if($.X3===C.NU)return a.$2(b,c)
-return P.Qx(null,null,this,a,b,c)}},
-hj:{"^":"L:0;a,b",
-$0:function(){return this.a.bH(this.b)}},
-MK:{"^":"L:0;a,b",
-$0:function(){return this.a.Gr(this.b)}},
-pQ:{"^":"L:1;a,b",
-$1:function(a){return this.a.m1(this.b,a)}}}],["","",,P,{"^":"",
-u5:function(){return H.VM(new H.N5(0,null,null,null,null,null,0),[null,null])},
-Td:function(a){return H.B7(a,H.VM(new H.N5(0,null,null,null,null,null,0),[null,null]))},
-EP:function(a,b,c){var z,y
-if(P.hB(a)){if(b==="("&&c===")")return"(...)"
-return b+"..."+c}z=[]
-y=$.$get$xg()
-y.push(a)
-try{P.Vr(a,z)}finally{y.pop()}y=P.vg(b,z,", ")+c
-return y.charCodeAt(0)==0?y:y},
-WE:function(a,b,c){var z,y,x
-if(P.hB(a))return b+"..."+c
-z=new P.Rn(b)
-y=$.$get$xg()
-y.push(a)
-try{x=z
-x.a=P.vg(x.gI(),a,", ")}finally{y.pop()}y=z
-y.a=y.gI()+c
-y=z.gI()
-return y.charCodeAt(0)==0?y:y},
-hB:function(a){var z,y
-for(z=0;y=$.$get$xg(),z<y.length;++z)if(a===y[z])return!0
-return!1},
-Vr:function(a,b){var z,y,x,w,v,u,t,s,r,q
-z=a.gk(a)
-y=0
-x=0
-while(!0){if(!(y<80||x<3))break
-if(!z.F())return
-w=H.d(z.gl())
-b.push(w)
-y+=w.length+2;++x}if(!z.F()){if(x<=5)return
-v=b.pop()
-u=b.pop()}else{t=z.gl();++x
-if(!z.F()){if(x<=4){b.push(H.d(t))
-return}v=H.d(t)
-u=b.pop()
-y+=v.length+2}else{s=z.gl();++x
-for(;z.F();t=s,s=r){r=z.gl();++x
-if(x>100){while(!0){if(!(y>75&&x>3))break
-y-=b.pop().length+2;--x}b.push("...")
-return}}u=H.d(t)
-v=H.d(s)
-y+=v.length+u.length+4}}if(x>b.length+2){y+=5
-q="..."}else q=null
-while(!0){if(!(y>80&&b.length>3))break
-y-=b.pop().length+2
-if(q==null){y+=5
-q="..."}}if(q!=null)b.push(q)
-b.push(u)
-b.push(v)},
-Ls:function(a,b,c,d){return H.VM(new P.b6(0,null,null,null,null,null,0),[d])},
-tM:function(a,b){var z,y,x
-z=P.Ls(null,null,null,b)
-for(y=a.length,x=0;x<a.length;a.length===y||(0,H.lk)(a),++x)z.AN(0,a[x])
-return z},
-vW:function(a){var z,y,x
-z={}
-if(P.hB(a))return"{...}"
-y=new P.Rn("")
-try{$.$get$xg().push(a)
-x=y
-x.a=x.gI()+"{"
-z.a=!0
-J.hE(a,new P.W0(z,y))
-z=y
-z.a=z.gI()+"}"}finally{$.$get$xg().pop()}z=y.gI()
-return z.charCodeAt(0)==0?z:z},
-ey:{"^":"N5;a,b,c,d,e,f,r",
-xi:function(a){return H.CU(a)&0x3ffffff},
-X:function(a,b){var z,y,x
-if(a==null)return-1
-z=a.length
-for(y=0;y<z;++y){x=a[y].a
-if(x==null?b==null:x===b)return y}return-1},
-static:{
-E8:function(a,b){return H.VM(new P.ey(0,null,null,null,null,null,0),[a,b])}}},
-b6:{"^":"u3;a,b,c,d,e,f,r",
-gk:function(a){var z=new P.lm(this,this.r,null,null)
-z.c=this.e
-return z},
-gA:function(a){return this.a},
-tg:function(a,b){var z,y
-if(typeof b==="string"&&b!=="__proto__"){z=this.b
-if(z==null)return!1
-return z[b]!=null}else if(typeof b==="number"&&(b&0x3ffffff)===b){y=this.c
-if(y==null)return!1
-return y[b]!=null}else return this.PR(b)},
-PR:function(a){var z=this.d
-if(z==null)return!1
-return this.DF(z[this.rk(a)],a)>=0},
-Zt:function(a){var z=typeof a==="number"&&(a&0x3ffffff)===a
-if(z)return this.tg(0,a)?a:null
-else return this.vR(a)},
-vR:function(a){var z,y,x
-z=this.d
-if(z==null)return
-y=z[this.rk(a)]
-x=this.DF(y,a)
-if(x<0)return
-return J.w2(y,x).gSk()},
-U:function(a,b){var z,y
-z=this.e
-y=this.r
-for(;z!=null;){b.$1(z.a)
-if(y!==this.r)throw H.b(new P.UV(this))
-z=z.b}},
-AN:function(a,b){var z,y,x
-if(typeof b==="string"&&b!=="__proto__"){z=this.b
-if(z==null){y=Object.create(null)
-y["<non-identifier-key>"]=y
-delete y["<non-identifier-key>"]
-this.b=y
-z=y}return this.cW(z,b)}else if(typeof b==="number"&&(b&0x3ffffff)===b){x=this.c
-if(x==null){y=Object.create(null)
-y["<non-identifier-key>"]=y
-delete y["<non-identifier-key>"]
-this.c=y
-x=y}return this.cW(x,b)}else return this.B7(0,b)},
-B7:function(a,b){var z,y,x
-z=this.d
-if(z==null){z=P.T2()
-this.d=z}y=this.rk(b)
-x=z[y]
-if(x==null)z[y]=[this.dg(b)]
-else{if(this.DF(x,b)>=0)return!1
-x.push(this.dg(b))}return!0},
-Rz:function(a,b){if(typeof b==="string"&&b!=="__proto__")return this.H4(this.b,b)
-else if(typeof b==="number"&&(b&0x3ffffff)===b)return this.H4(this.c,b)
-else return this.qg(0,b)},
-qg:function(a,b){var z,y,x
-z=this.d
-if(z==null)return!1
-y=z[this.rk(b)]
-x=this.DF(y,b)
-if(x<0)return!1
-this.GS(y.splice(x,1)[0])
-return!0},
-V1:function(a){if(this.a>0){this.f=null
-this.e=null
-this.d=null
-this.c=null
-this.b=null
-this.a=0
-this.r=this.r+1&67108863}},
-cW:function(a,b){if(a[b]!=null)return!1
-a[b]=this.dg(b)
-return!0},
-H4:function(a,b){var z
-if(a==null)return!1
-z=a[b]
-if(z==null)return!1
-this.GS(z)
-delete a[b]
-return!0},
-dg:function(a){var z,y
-z=new P.bn(a,null,null)
-if(this.e==null){this.f=z
-this.e=z}else{y=this.f
-z.c=y
-y.b=z
-this.f=z}++this.a
-this.r=this.r+1&67108863
-return z},
-GS:function(a){var z,y
-z=a.c
-y=a.b
-if(z==null)this.e=y
-else z.b=y
-if(y==null)this.f=z
-else y.c=z;--this.a
-this.r=this.r+1&67108863},
-rk:function(a){return J.hf(a)&0x3ffffff},
-DF:function(a,b){var z,y
-if(a==null)return-1
-z=a.length
-for(y=0;y<z;++y)if(J.RM(a[y].a,b))return y
-return-1},
-$isqC:1,
-static:{
-T2:function(){var z=Object.create(null)
-z["<non-identifier-key>"]=z
-delete z["<non-identifier-key>"]
-return z}}},
-bn:{"^":"Mh;Sk:a<,b,c"},
-lm:{"^":"Mh;a,b,c,d",
-gl:function(){return this.d},
-F:function(){var z=this.a
-if(this.b!==z.r)throw H.b(new P.UV(z))
-else{z=this.c
-if(z==null){this.d=null
-return!1}else{this.d=z.a
-this.c=z.b
-return!0}}}},
-u3:{"^":"Vj;"},
-LU:{"^":"E9;"},
-E9:{"^":"Mh+lD;",$iszM:1,$aszM:null,$isqC:1},
-lD:{"^":"Mh;",
-gk:function(a){return new H.a7(a,this.gA(a),0,null)},
-W:function(a,b){return this.q(a,b)},
-U:function(a,b){var z,y
-z=this.gA(a)
-for(y=0;y<z;++y){b.$1(this.q(a,y))
-if(z!==this.gA(a))throw H.b(new P.UV(a))}},
-S:function(a,b){return H.VM(new H.U5(a,b),[H.W8(a,"lD",0)])},
-ez:function(a,b){return H.VM(new H.A8(a,b),[null,null])},
-w:function(a){return P.WE(a,"[","]")},
-$iszM:1,
-$aszM:null,
-$isqC:1},
-W0:{"^":"L:14;a,b",
-$2:function(a,b){var z,y
-z=this.a
-if(!z.a)this.b.a+=", "
-z.a=!1
-z=this.b
-y=z.a+=H.d(a)
-z.a=y+": "
-z.a+=H.d(b)}},
-Sw:{"^":"cX;a,b,c,d",
-gk:function(a){return new P.o0(this,this.c,this.d,this.b,null)},
-U:function(a,b){var z,y
-z=this.d
-for(y=this.b;y!==this.c;y=(y+1&this.a.length-1)>>>0){b.$1(this.a[y])
-if(z!==this.d)H.vh(new P.UV(this))}},
-gl0:function(a){return this.b===this.c},
-gA:function(a){return(this.c-this.b&this.a.length-1)>>>0},
-V1:function(a){var z,y,x,w
-z=this.b
-y=this.c
-if(z!==y){for(x=this.a,w=x.length-1;z!==y;z=(z+1&w)>>>0)x[z]=null
-this.c=0
-this.b=0;++this.d}},
-w:function(a){return P.WE(this,"{","}")},
-Ux:function(){var z,y,x
-z=this.b
-if(z===this.c)throw H.b(H.Wp());++this.d
-y=this.a
-x=y[z]
-y[z]=null
-this.b=(z+1&y.length-1)>>>0
-return x},
-B7:function(a,b){var z,y
-z=this.a
-y=this.c
-z[y]=b
-z=(y+1&z.length-1)>>>0
-this.c=z
-if(this.b===z)this.wL();++this.d},
-wL:function(){var z,y,x,w
-z=new Array(this.a.length*2)
-z.fixed$length=Array
-y=H.VM(z,[H.Kp(this,0)])
-z=this.a
-x=this.b
-w=z.length-x
-C.Nm.YW(y,0,w,z,x)
-C.Nm.YW(y,w,w+this.b,this.a,0)
-this.b=0
-this.c=this.a.length
-this.a=y},
-Eo:function(a,b){var z=new Array(8)
-z.fixed$length=Array
-this.a=H.VM(z,[b])},
-$isqC:1,
-static:{
-NZ:function(a,b){var z=H.VM(new P.Sw(null,0,0,0),[b])
-z.Eo(a,b)
-return z}}},
-o0:{"^":"Mh;a,b,c,d,e",
-gl:function(){return this.e},
-F:function(){var z,y
-z=this.a
-if(this.c!==z.d)H.vh(new P.UV(z))
-y=this.d
-if(y===this.b){this.e=null
-return!1}z=z.a
-this.e=z[y]
-this.d=(y+1&z.length-1)>>>0
-return!0}},
-Ma:{"^":"Mh;",
-FV:function(a,b){var z
-for(z=J.IT(b);z.F();)this.AN(0,z.gl())},
-w:function(a){return P.WE(this,"{","}")},
-U:function(a,b){var z
-for(z=new P.lm(this,this.r,null,null),z.c=this.e;z.F();)b.$1(z.d)},
-zV:function(a,b){var z,y,x
-z=new P.lm(this,this.r,null,null)
-z.c=this.e
-if(!z.F())return""
-y=new P.Rn("")
-if(b===""){do y.a+=H.d(z.d)
-while(z.F())}else{y.a=H.d(z.d)
-for(;z.F();){y.a+=b
-y.a+=H.d(z.d)}}x=y.a
-return x.charCodeAt(0)==0?x:x},
-$isqC:1},
-Vj:{"^":"Ma;"}}],["","",,P,{"^":"",zF:{"^":"Mh;"},fU:{"^":"Mh;a,b,c,d,e",
-w:function(a){return this.a}},Rc:{"^":"zF;a",
-h:function(a,b,c){var z,y,x,w
-for(z=b,y=null;z<c;++z){switch(a[z]){case"&":x="&amp;"
-break
-case'"':x="&quot;"
-break
-case"'":x="&#39;"
-break
-case"<":x="&lt;"
-break
-case">":x="&gt;"
-break
-case"/":x="&#47;"
-break
-default:x=null}if(x!=null){if(y==null)y=new P.Rn("")
-if(z>b){w=C.xB.C(a,b,z)
-y.a=y.a+w}y.a=y.a+x
-b=z+1}}if(y==null)return
-if(c>b)y.a+=J.ld(a,b,c)
-w=y.a
-return w.charCodeAt(0)==0?w:w}}}],["","",,P,{"^":"",
-h:function(a){if(typeof a==="number"||typeof a==="boolean"||null==a)return J.A(a)
-if(typeof a==="string")return JSON.stringify(a)
-return P.o(a)},
-o:function(a){var z=J.v(a)
-if(!!z.$isL)return z.w(a)
-return H.H(a)},
-FM:function(a){return new P.CD(a)},
-PW:function(a,b,c){var z,y
-z=H.VM([],[c])
-for(y=J.IT(a);y.F();)z.push(y.gl())
-if(b)return z
-z.fixed$length=Array
-return z},
-JS:function(a){var z=H.d(a)
-H.qw(z)},
-a2:{"^":"Mh;"},
-"+bool":0,
-iP:{"^":"Mh;"},
-CP:{"^":"lf;"},
-"+double":0,
-a6:{"^":"Mh;a",
-B:function(a,b){return C.jn.B(this.a,b.gm5())},
-D:function(a,b){if(b==null)return!1
-if(!(b instanceof P.a6))return!1
-return this.a===b.a},
-gM:function(a){return this.a&0x1FFFFFFF},
-w:function(a){var z,y,x,w,v
-z=new P.DW()
-y=this.a
-if(y<0)return"-"+new P.a6(-y).w(0)
-x=z.$1(C.jn.JV(C.jn.BU(y,6e7),60))
-w=z.$1(C.jn.JV(C.jn.BU(y,1e6),60))
-v=new P.P7().$1(C.jn.JV(y,1e6))
-return""+C.jn.BU(y,36e8)+":"+H.d(x)+":"+H.d(w)+"."+H.d(v)}},
-P7:{"^":"L:4;",
-$1:function(a){if(a>=1e5)return""+a
-if(a>=1e4)return"0"+a
-if(a>=1000)return"00"+a
-if(a>=100)return"000"+a
-if(a>=10)return"0000"+a
-return"00000"+a}},
-DW:{"^":"L:4;",
-$1:function(a){if(a>=10)return""+a
-return"0"+a}},
-Ge:{"^":"Mh;",
-gII:function(){return H.ts(this.$thrownJsError)}},
-B:{"^":"Ge;",
-w:function(a){return"Throw of null."}},
-AT:{"^":"Ge;a,b,c,d",
-gZ:function(){return"Invalid argument"+(!this.a?"(s)":"")},
-gu:function(){return""},
-w:function(a){var z,y,x,w,v,u
-z=this.c
-y=z!=null?" ("+H.d(z)+")":""
-z=this.d
-x=z==null?"":": "+H.d(z)
-w=this.gZ()+y+x
-if(!this.a)return w
-v=this.gu()
-u=P.h(this.b)
-return w+v+": "+H.d(u)},
-static:{
-q:function(a){return new P.AT(!1,null,null,a)},
-L3:function(a,b,c){return new P.AT(!0,a,b,c)},
-hG:function(a){return new P.AT(!1,null,a,"Must not be null")}}},
-bJ:{"^":"AT;e,f,a,b,c,d",
-gZ:function(){return"RangeError"},
-gu:function(){var z,y,x
-z=this.e
-if(z==null){z=this.f
-y=z!=null?": Not less than or equal to "+H.d(z):""}else{x=this.f
-if(x==null)y=": Not greater than or equal to "+H.d(z)
-else if(x>z)y=": Not in range "+H.d(z)+".."+H.d(x)+", inclusive"
-else y=x<z?": Valid value range is empty":": Only valid value is "+H.d(z)}return y},
-static:{
-F:function(a,b,c){return new P.bJ(null,null,!0,a,b,"Value not in range")},
-TE:function(a,b,c,d,e){return new P.bJ(b,c,!0,a,d,"Invalid value")},
-jB:function(a,b,c,d,e,f){if(0>a||a>c)throw H.b(P.TE(a,0,c,"start",f))
-if(a>b||b>c)throw H.b(P.TE(b,a,c,"end",f))
-return b}}},
-eY:{"^":"AT;e,A:f>,a,b,c,d",
-gZ:function(){return"RangeError"},
-gu:function(){if(J.aa(this.b,0))return": index must not be negative"
-var z=this.f
-if(z===0)return": no indices are valid"
-return": index should be less than "+H.d(z)},
-static:{
-Cf:function(a,b,c,d,e){var z=e!=null?e:J.Hm(b)
-return new P.eY(b,z,!0,a,c,"Index out of range")}}},
-ub:{"^":"Ge;a",
-w:function(a){return"Unsupported operation: "+this.a}},
-D:{"^":"Ge;a",
-w:function(a){var z=this.a
-return z!=null?"UnimplementedError: "+H.d(z):"UnimplementedError"}},
-lj:{"^":"Ge;a",
-w:function(a){return"Bad state: "+this.a}},
-UV:{"^":"Ge;a",
-w:function(a){var z=this.a
-if(z==null)return"Concurrent modification during iteration."
-return"Concurrent modification during iteration: "+H.d(P.h(z))+"."}},
-VS:{"^":"Mh;",
-w:function(a){return"Stack Overflow"},
-gII:function(){return},
-$isGe:1},
-t7:{"^":"Ge;a",
-w:function(a){return"Reading static variable '"+this.a+"' during its initialization"}},
-CD:{"^":"Mh;a",
-w:function(a){var z=this.a
-if(z==null)return"Exception"
-return"Exception: "+H.d(z)}},
-aE:{"^":"Mh;a,b,c",
-w:function(a){var z,y
-z=""!==this.a?"FormatException: "+this.a:"FormatException"
-y=this.b
-if(y.length>78)y=C.xB.C(y,0,75)+"..."
-return z+"\n"+y}},
-kM:{"^":"Mh;a",
-w:function(a){return"Expando:"+H.d(this.a)},
-q:function(a,b){var z=H.VK(b,"expando$values")
-return z==null?null:H.VK(z,this.KV(0))},
-KV:function(a){var z,y
-z=H.VK(this,"expando$key")
-if(z==null){y=$.Ss
-$.Ss=y+1
-z="expando$key$"+y
-H.aw(this,"expando$key",z)}return z}},
-EH:{"^":"Mh;"},
-KN:{"^":"lf;"},
-"+int":0,
-cX:{"^":"Mh;",
-S:["p",function(a,b){return H.VM(new H.U5(this,b),[H.W8(this,"cX",0)])}],
-U:function(a,b){var z
-for(z=this.gk(this);z.F();)b.$1(z.gl())},
-gA:function(a){var z,y
-z=this.gk(this)
-for(y=0;z.F();)++y
-return y},
-gV:function(a){var z,y
-z=this.gk(this)
-if(!z.F())throw H.b(H.Wp())
-y=z.gl()
-if(z.F())throw H.b(H.Am())
-return y},
-W:function(a,b){var z,y,x
-if(typeof b!=="number"||Math.floor(b)!==b)throw H.b(P.hG("index"))
-if(b<0)H.vh(P.TE(b,0,null,"index",null))
-for(z=this.gk(this),y=0;z.F();){x=z.gl()
-if(b===y)return x;++y}throw H.b(P.Cf(b,this,"index",null,y))},
-w:function(a){return P.EP(this,"(",")")}},
-An:{"^":"Mh;"},
-zM:{"^":"Mh;",$aszM:null,$isqC:1},
-"+List":0,
-L8:{"^":"Mh;"},
-c8:{"^":"Mh;",
-w:function(a){return"null"}},
-"+Null":0,
-lf:{"^":"Mh;"},
-"+num":0,
-Mh:{"^":";",
-D:function(a,b){return this===b},
-gM:function(a){return H.wP(this)},
-w:function(a){return H.H(this)},
-toString:function(){return this.w(this)}},
-Gz:{"^":"Mh;"},
-qU:{"^":"Mh;"},
-"+String":0,
-Rn:{"^":"Mh;I:a<",
-gA:function(a){return this.a.length},
-w:function(a){var z=this.a
-return z.charCodeAt(0)==0?z:z},
-static:{
-vg:function(a,b,c){var z=J.IT(b)
-if(!z.F())return a
-if(c.length===0){do a+=H.d(z.gl())
-while(z.F())}else{a+=H.d(z.gl())
-for(;z.F();)a=a+c+H.d(z.gl())}return a}}}}],["","",,W,{"^":"",
-U9:function(a,b,c){var z,y
-z=document.body
-y=(z&&C.RY).O(z,a,b,c)
-y.toString
-z=new W.e7(y)
-z=z.S(z,new W.wJ())
-return z.gV(z)},
-rS:function(a){var z,y,x
-z="element tag unavailable"
-try{y=J.Ob(a)
-if(typeof y==="string")z=J.Ob(a)}catch(x){H.p(x)}return z},
-C0:function(a,b){a=536870911&a+b
-a=536870911&a+((524287&a)<<10>>>0)
-return a^a>>>6},
-Up:function(a){a=536870911&a+((67108863&a)<<3>>>0)
-a^=a>>>11
-return 536870911&a+((16383&a)<<15>>>0)},
-qc:function(a){var z
-if(a==null)return
-if("postMessage" in a){z=W.P1(a)
-if(!!J.v(z).$isD0)return z
-return}else return a},
-aF:function(a){var z=$.X3
-if(z===C.NU)return a
-return z.oj(a,!0)},
-Z0:function(a){return document.querySelector(a)},
-qE:{"^":"cv;",$isqE:1,$iscv:1,$isK:1,$isMh:1,"%":"HTMLAppletElement|HTMLBRElement|HTMLCanvasElement|HTMLContentElement|HTMLDListElement|HTMLDataListElement|HTMLDetailsElement|HTMLDialogElement|HTMLDirectoryElement|HTMLDivElement|HTMLFontElement|HTMLFrameElement|HTMLHRElement|HTMLHeadElement|HTMLHeadingElement|HTMLHtmlElement|HTMLImageElement|HTMLLIElement|HTMLLabelElement|HTMLLegendElement|HTMLMarqueeElement|HTMLMenuElement|HTMLMenuItemElement|HTMLMeterElement|HTMLModElement|HTMLOListElement|HTMLOptGroupElement|HTMLOptionElement|HTMLParagraphElement|HTMLPictureElement|HTMLPreElement|HTMLProgressElement|HTMLQuoteElement|HTMLShadowElement|HTMLSourceElement|HTMLSpanElement|HTMLStyleElement|HTMLTableCaptionElement|HTMLTableCellElement|HTMLTableColElement|HTMLTableDataCellElement|HTMLTableHeaderCellElement|HTMLTitleElement|HTMLTrackElement|HTMLUListElement|HTMLUnknownElement|PluginPlaceholderElement;HTMLElement"},
-Yy:{"^":"vB;",$iszM:1,
-$aszM:function(){return[W.M5]},
-$isqC:1,
-"%":"EntryArray"},
-Gh:{"^":"qE;LU:href}",
-w:function(a){return String(a)},
-$isvB:1,
-"%":"HTMLAnchorElement"},
-fY:{"^":"qE;LU:href}",
-w:function(a){return String(a)},
-$isvB:1,
-"%":"HTMLAreaElement"},
-fo:{"^":"D0;A:length=","%":"AudioTrackList"},
-nB:{"^":"qE;LU:href}","%":"HTMLBaseElement"},
-Az:{"^":"vB;","%":";Blob"},
-QP:{"^":"qE;",$isQP:1,$isD0:1,$isvB:1,"%":"HTMLBodyElement"},
-IF:{"^":"qE;oc:name=",$isIF:1,"%":"HTMLButtonElement"},
-nx:{"^":"K;A:length=",$isvB:1,"%":"CDATASection|CharacterData|Comment|ProcessingInstruction|Text"},
-lw:{"^":"vB;",$isMh:1,"%":"CSSCharsetRule|CSSFontFaceRule|CSSImportRule|CSSKeyframeRule|CSSKeyframesRule|CSSMediaRule|CSSPageRule|CSSRule|CSSStyleRule|CSSSupportsRule|CSSUnknownRule|CSSViewportRule|MozCSSKeyframeRule|MozCSSKeyframesRule|WebKitCSSFilterRule|WebKitCSSKeyframeRule|WebKitCSSKeyframesRule"},
-oJ:{"^":"BV;A:length=","%":"CSS2Properties|CSSStyleDeclaration|MSStyleCSSProperties"},
-BV:{"^":"vB+id;"},
-id:{"^":"Mh;"},
-Wv:{"^":"vB;",$isWv:1,$isMh:1,"%":"DataTransferItem"},
-Sb:{"^":"vB;A:length=",
-q:function(a,b){return a[b]},
-"%":"DataTransferItemList"},
-QF:{"^":"K;",
-Wk:function(a,b){return a.querySelector(b)},
-"%":"Document|HTMLDocument|XMLDocument"},
-hs:{"^":"K;",
-Wk:function(a,b){return a.querySelector(b)},
-$isvB:1,
-"%":"DocumentFragment|ShadowRoot"},
-Nh:{"^":"vB;",
-w:function(a){return String(a)},
-"%":"DOMException"},
-tk:{"^":"vB;",$istk:1,$isMh:1,"%":"Iterator"},
-IB:{"^":"vB;L:height=,H:left=,T:top=,P:width=",
-w:function(a){return"Rectangle ("+H.d(a.left)+", "+H.d(a.top)+") "+H.d(this.gP(a))+" x "+H.d(this.gL(a))},
-D:function(a,b){var z,y,x
-if(b==null)return!1
-z=J.v(b)
-if(!z.$istn)return!1
-y=a.left
-x=z.gH(b)
-if(y==null?x==null:y===x){y=a.top
-x=z.gT(b)
-if(y==null?x==null:y===x){y=this.gP(a)
-x=z.gP(b)
-if(y==null?x==null:y===x){y=this.gL(a)
-z=z.gL(b)
-z=y==null?z==null:y===z}else z=!1}else z=!1}else z=!1
-return z},
-gM:function(a){var z,y,x,w
-z=J.hf(a.left)
-y=J.hf(a.top)
-x=J.hf(this.gP(a))
-w=J.hf(this.gL(a))
-return W.Up(W.C0(W.C0(W.C0(W.C0(0,z),y),x),w))},
-$istn:1,
-$astn:I.HU,
-"%":";DOMRectReadOnly"},
-Yl:{"^":"ec;",
-gA:function(a){return a.length},
-q:function(a,b){if(b>>>0!==b||b>=a.length)throw H.b(P.Cf(b,a,null,null,null))
-return a[b]},
-W:function(a,b){return a[b]},
-$iszM:1,
-$aszM:function(){return[P.qU]},
-$isqC:1,
-$isXj:1,
-$isDD:1,
-"%":"DOMStringList"},
-nN:{"^":"vB+lD;",$iszM:1,
-$aszM:function(){return[P.qU]},
-$isqC:1},
-ec:{"^":"nN+Gm;",$iszM:1,
-$aszM:function(){return[P.qU]},
-$isqC:1},
-NQ:{"^":"vB;A:length=","%":"DOMSettableTokenList|DOMTokenList"},
-wz:{"^":"LU;a",
-gA:function(a){return this.a.length},
-q:function(a,b){return this.a[b]},
-$asLU:I.HU,
-$aszM:I.HU,
-$iszM:1,
-$isqC:1},
-cv:{"^":"K;jO:id},ns:tagName=",
-gQg:function(a){return new W.i7(a)},
-gDD:function(a){return new W.I4(a)},
-w:function(a){return a.localName},
-N:function(a,b,c,d,e){var z
-if(d instanceof W.x)a.insertAdjacentHTML(b,c)
-else{z=this.O(a,c,d,e)
-switch(b.toLowerCase()){case"beforebegin":a.parentNode.insertBefore(z,a)
-break
-case"afterbegin":a.insertBefore(z,a.childNodes.length>0?a.childNodes[0]:null)
-break
-case"beforeend":a.appendChild(z)
-break
-case"afterend":a.parentNode.insertBefore(z,a.nextSibling)
-break
-default:H.vh(P.q("Invalid position "+b))}}},
-O:["DW",function(a,b,c,d){var z,y,x,w,v
-if(c==null){z=$.lt
-if(z==null){z=H.VM([],[W.kF])
-y=new W.vD(z)
-z.push(W.Tw(null))
-z.push(W.Bl())
-$.lt=y
-d=y}else d=z
-z=$.EU
-if(z==null){z=new W.MM(d)
-$.EU=z
-c=z}else{z.a=d
-c=z}}if($.xo==null){z=document.implementation.createHTMLDocument("")
-$.xo=z
-$.BO=z.createRange()
-z=$.xo
-z.toString
-x=z.createElement("base")
-J.Gq(x,document.baseURI)
-$.xo.head.appendChild(x)}z=$.xo
-if(!!this.$isQP)w=z.body
-else{y=a.tagName
-z.toString
-w=z.createElement(y)
-$.xo.body.appendChild(w)}if("createContextualFragment" in window.Range.prototype&&!C.Nm.tg(C.Sq,a.tagName)){$.BO.selectNodeContents(w)
-v=$.BO.createContextualFragment(b)}else{w.innerHTML=b
-v=$.xo.createDocumentFragment()
-for(;z=w.firstChild,z!=null;)v.appendChild(z)}z=$.xo.body
-if(w==null?z!=null:w!==z)J.Ns(w)
-c.Pn(v)
-document.adoptNode(v)
-return v},function(a,b,c){return this.O(a,b,c,null)},"E",null,null,"gkf",2,5,null,0,0],
-a7:function(a,b,c){return a.setAttribute(b,c)},
-Wk:function(a,b){return a.querySelector(b)},
-$iscv:1,
-$isK:1,
-$isMh:1,
-$isvB:1,
-$isD0:1,
-"%":";Element"},
-wJ:{"^":"L:1;",
-$1:function(a){return!!J.v(a).$iscv}},
-Fs:{"^":"qE;oc:name=","%":"HTMLEmbedElement"},
-M5:{"^":"vB;",$isMh:1,"%":"DirectoryEntry|Entry|FileEntry"},
-hY:{"^":"ea;kc:error=","%":"ErrorEvent"},
-ea:{"^":"vB;","%":"AnimationPlayerEvent|ApplicationCacheErrorEvent|AudioProcessingEvent|AutocompleteErrorEvent|BeforeUnloadEvent|CloseEvent|CustomEvent|DeviceLightEvent|DeviceMotionEvent|DeviceOrientationEvent|ExtendableEvent|FetchEvent|FontFaceSetLoadEvent|GamepadEvent|HashChangeEvent|IDBVersionChangeEvent|InstallEvent|MIDIConnectionEvent|MIDIMessageEvent|MediaKeyEvent|MediaKeyMessageEvent|MediaKeyNeededEvent|MediaQueryListEvent|MediaStreamEvent|MediaStreamTrackEvent|MessageEvent|MutationEvent|OfflineAudioCompletionEvent|OverflowEvent|PageTransitionEvent|PopStateEvent|ProgressEvent|PushEvent|RTCDTMFToneChangeEvent|RTCDataChannelEvent|RTCIceCandidateEvent|RTCPeerConnectionIceEvent|RelatedEvent|ResourceProgressEvent|SecurityPolicyViolationEvent|SpeechRecognitionEvent|SpeechSynthesisEvent|StorageEvent|TrackEvent|TransitionEvent|WebGLContextEvent|WebKitAnimationEvent|WebKitTransitionEvent|XMLHttpRequestProgressEvent;ClipboardEvent|Event|InputEvent"},
-D0:{"^":"vB;",
-On:function(a,b,c,d){if(c!=null)this.v0(a,b,c,!1)},
-Y9:function(a,b,c,d){if(c!=null)this.Ci(a,b,c,!1)},
-v0:function(a,b,c,d){return a.addEventListener(b,H.tR(c,1),!1)},
-Ci:function(a,b,c,d){return a.removeEventListener(b,H.tR(c,1),!1)},
-$isD0:1,
-"%":"AnalyserNode|AnimationPlayer|ApplicationCache|AudioBufferSourceNode|AudioChannelMerger|AudioChannelSplitter|AudioContext|AudioDestinationNode|AudioGainNode|AudioNode|AudioPannerNode|AudioSourceNode|BatteryManager|BiquadFilterNode|ChannelMergerNode|ChannelSplitterNode|ConvolverNode|DOMApplicationCache|DelayNode|DynamicsCompressorNode|EventSource|GainNode|IDBDatabase|InputMethodContext|JavaScriptAudioNode|MIDIAccess|MediaController|MediaElementAudioSourceNode|MediaQueryList|MediaSource|MediaStream|MediaStreamAudioDestinationNode|MediaStreamAudioSourceNode|MediaStreamTrack|MessagePort|NetworkInformation|Notification|OfflineAudioContext|OfflineResourceList|Oscillator|OscillatorNode|PannerNode|Performance|Presentation|RTCDTMFSender|RTCPeerConnection|RealtimeAnalyserNode|ScreenOrientation|ScriptProcessorNode|ServiceWorkerRegistration|SpeechRecognition|SpeechSynthesis|SpeechSynthesisUtterance|WaveShaperNode|mozRTCPeerConnection|webkitAudioContext|webkitAudioPannerNode;EventTarget;Vc|mr|KS|bD"},
-as:{"^":"qE;oc:name=","%":"HTMLFieldSetElement"},
-dU:{"^":"Az;",$isMh:1,"%":"File"},
-XV:{"^":"x5;",
-gA:function(a){return a.length},
-q:function(a,b){if(b>>>0!==b||b>=a.length)throw H.b(P.Cf(b,a,null,null,null))
-return a[b]},
-W:function(a,b){return a[b]},
-$iszM:1,
-$aszM:function(){return[W.dU]},
-$isqC:1,
-$isXj:1,
-$isDD:1,
-"%":"FileList"},
-zL:{"^":"vB+lD;",$iszM:1,
-$aszM:function(){return[W.dU]},
-$isqC:1},
-x5:{"^":"zL+Gm;",$iszM:1,
-$aszM:function(){return[W.dU]},
-$isqC:1},
-H0:{"^":"D0;kc:error=","%":"FileReader"},
-Bf:{"^":"D0;kc:error=,A:length=","%":"FileWriter"},
-n5:{"^":"vB;",$isn5:1,$isMh:1,"%":"FontFace"},
-CV:{"^":"D0;",
-K:function(a,b,c){return a.forEach(H.tR(b,3),c)},
-U:function(a,b){b=H.tR(b,3)
-return a.forEach(b)},
-"%":"FontFaceSet"},
-Yu:{"^":"qE;A:length=,oc:name=","%":"HTMLFormElement"},
-GO:{"^":"vB;",$isMh:1,"%":"Gamepad"},
-F1:{"^":"vB;",
-K:function(a,b,c){return a.forEach(H.tR(b,3),c)},
-U:function(a,b){b=H.tR(b,3)
-return a.forEach(b)},
-"%":"Headers"},
-br:{"^":"vB;A:length=","%":"History"},
-xn:{"^":"HR;",
-gA:function(a){return a.length},
-q:function(a,b){if(b>>>0!==b||b>=a.length)throw H.b(P.Cf(b,a,null,null,null))
-return a[b]},
-W:function(a,b){return a[b]},
-$iszM:1,
-$aszM:function(){return[W.K]},
-$isqC:1,
-$isXj:1,
-$isDD:1,
-"%":"HTMLCollection|HTMLFormControlsCollection|HTMLOptionsCollection"},
-dx:{"^":"vB+lD;",$iszM:1,
-$aszM:function(){return[W.K]},
-$isqC:1},
-HR:{"^":"dx+Gm;",$iszM:1,
-$aszM:function(){return[W.K]},
-$isqC:1},
-zU:{"^":"wa;",
-wR:function(a,b){return a.send(b)},
-"%":"XMLHttpRequest"},
-wa:{"^":"D0;","%":"XMLHttpRequestUpload;XMLHttpRequestEventTarget"},
-tX:{"^":"qE;oc:name=","%":"HTMLIFrameElement"},
-Mi:{"^":"qE;oc:name=",$iscv:1,$isvB:1,$isD0:1,"%":"HTMLInputElement"},
-MX:{"^":"qE;oc:name=","%":"HTMLKeygenElement"},
-Og:{"^":"qE;LU:href}","%":"HTMLLinkElement"},
-u8:{"^":"vB;",
-w:function(a){return String(a)},
-"%":"Location"},
-M6:{"^":"qE;oc:name=","%":"HTMLMapElement"},
-eL:{"^":"qE;kc:error=","%":"HTMLAudioElement|HTMLMediaElement|HTMLVideoElement"},
-G9:{"^":"D0;kc:error=","%":"MediaKeySession"},
-tL:{"^":"vB;A:length=","%":"MediaList"},
-Ee:{"^":"qE;oc:name=","%":"HTMLMetaElement"},
-Lk:{"^":"Im;",
-LV:function(a,b,c){return a.send(b,c)},
-wR:function(a,b){return a.send(b)},
-"%":"MIDIOutput"},
-Im:{"^":"D0;","%":"MIDIInput;MIDIPort"},
-AW:{"^":"vB;",$isMh:1,"%":"MimeType"},
-bw:{"^":"rr;",
-gA:function(a){return a.length},
-q:function(a,b){if(b>>>0!==b||b>=a.length)throw H.b(P.Cf(b,a,null,null,null))
-return a[b]},
-W:function(a,b){return a[b]},
-$iszM:1,
-$aszM:function(){return[W.AW]},
-$isqC:1,
-$isXj:1,
-$isDD:1,
-"%":"MimeTypeArray"},
-hm:{"^":"vB+lD;",$iszM:1,
-$aszM:function(){return[W.AW]},
-$isqC:1},
-rr:{"^":"hm+Gm;",$iszM:1,
-$aszM:function(){return[W.AW]},
-$isqC:1},
-Aj:{"^":"w6;",$isAj:1,$isMh:1,"%":"DragEvent|MSPointerEvent|MouseEvent|PointerEvent|WheelEvent"},
-oU:{"^":"vB;",$isvB:1,"%":"Navigator"},
-e7:{"^":"LU;a",
-gV:function(a){var z,y
-z=this.a
-y=z.childNodes.length
-if(y===0)throw H.b(new P.lj("No elements"))
-if(y>1)throw H.b(new P.lj("More than one element"))
-return z.firstChild},
-FV:function(a,b){var z,y,x,w
-z=b.a
-y=this.a
-if(z!==y)for(x=z.childNodes.length,w=0;w<x;++w)y.appendChild(z.firstChild)
-return},
-gk:function(a){return C.t5.gk(this.a.childNodes)},
-gA:function(a){return this.a.childNodes.length},
-q:function(a,b){return this.a.childNodes[b]},
-$asLU:function(){return[W.K]},
-$aszM:function(){return[W.K]}},
-K:{"^":"D0;",
-wg:function(a){var z=a.parentNode
-if(z!=null)z.removeChild(a)},
-w:function(a){var z=a.nodeValue
-return z==null?this.UG(a):z},
-$isK:1,
-$isMh:1,
-"%":";Node"},
-BH:{"^":"Gb;",
-gA:function(a){return a.length},
-q:function(a,b){if(b>>>0!==b||b>=a.length)throw H.b(P.Cf(b,a,null,null,null))
-return a[b]},
-W:function(a,b){return a[b]},
-$iszM:1,
-$aszM:function(){return[W.K]},
-$isqC:1,
-$isXj:1,
-$isDD:1,
-"%":"NodeList|RadioNodeList"},
-xt:{"^":"vB+lD;",$iszM:1,
-$aszM:function(){return[W.K]},
-$isqC:1},
-Gb:{"^":"xt+Gm;",$iszM:1,
-$aszM:function(){return[W.K]},
-$isqC:1},
-G7:{"^":"qE;oc:name=","%":"HTMLObjectElement"},
-wL:{"^":"qE;oc:name=","%":"HTMLOutputElement"},
-HD:{"^":"qE;oc:name=","%":"HTMLParamElement"},
-O4:{"^":"vB;",$isvB:1,"%":"Path2D"},
-qp:{"^":"vB;A:length=",$isMh:1,"%":"Plugin"},
-Ev:{"^":"ma;",
-gA:function(a){return a.length},
-q:function(a,b){if(b>>>0!==b||b>=a.length)throw H.b(P.Cf(b,a,null,null,null))
-return a[b]},
-W:function(a,b){return a[b]},
-$iszM:1,
-$aszM:function(){return[W.qp]},
-$isqC:1,
-$isXj:1,
-$isDD:1,
-"%":"PluginArray"},
-nj:{"^":"vB+lD;",$iszM:1,
-$aszM:function(){return[W.qp]},
-$isqC:1},
-ma:{"^":"nj+Gm;",$iszM:1,
-$aszM:function(){return[W.qp]},
-$isqC:1},
-dK:{"^":"D0;",
-wR:function(a,b){return a.send(b)},
-"%":"DataChannel|RTCDataChannel"},
-p8:{"^":"vB;",$isp8:1,$isMh:1,"%":"RTCStatsReport"},
-qI:{"^":"qE;",$isqI:1,"%":"HTMLScriptElement"},
-lp:{"^":"qE;A:length=,oc:name=","%":"HTMLSelectElement"},
-Ji:{"^":"D0;",$isD0:1,$isvB:1,"%":"SharedWorker"},
-x8:{"^":"D0;",$isMh:1,"%":"SourceBuffer"},
-Mk:{"^":"mr;",
-gA:function(a){return a.length},
-q:function(a,b){if(b>>>0!==b||b>=a.length)throw H.b(P.Cf(b,a,null,null,null))
-return a[b]},
-W:function(a,b){return a[b]},
-$iszM:1,
-$aszM:function(){return[W.x8]},
-$isqC:1,
-$isXj:1,
-$isDD:1,
-"%":"SourceBufferList"},
-Vc:{"^":"D0+lD;",$iszM:1,
-$aszM:function(){return[W.x8]},
-$isqC:1},
-mr:{"^":"Vc+Gm;",$iszM:1,
-$aszM:function(){return[W.x8]},
-$isqC:1},
-Y4:{"^":"vB;",$isMh:1,"%":"SpeechGrammar"},
-Nn:{"^":"ecX;",
-gA:function(a){return a.length},
-q:function(a,b){if(b>>>0!==b||b>=a.length)throw H.b(P.Cf(b,a,null,null,null))
-return a[b]},
-W:function(a,b){return a[b]},
-$iszM:1,
-$aszM:function(){return[W.Y4]},
-$isqC:1,
-$isXj:1,
-$isDD:1,
-"%":"SpeechGrammarList"},
-qb:{"^":"vB+lD;",$iszM:1,
-$aszM:function(){return[W.Y4]},
-$isqC:1},
-ecX:{"^":"qb+Gm;",$iszM:1,
-$aszM:function(){return[W.Y4]},
-$isqC:1},
-zD:{"^":"ea;kc:error=","%":"SpeechRecognitionError"},
-vK:{"^":"vB;A:length=",$isMh:1,"%":"SpeechRecognitionResult"},
-As:{"^":"vB;",
-q:function(a,b){return a.getItem(b)},
-U:function(a,b){var z,y
-for(z=0;!0;++z){y=a.key(z)
-if(y==null)return
-b.$2(y,a.getItem(y))}},
-gA:function(a){return a.length},
-"%":"Storage"},
-WW:{"^":"vB;",$isMh:1,"%":"CSSStyleSheet|StyleSheet"},
-Tb:{"^":"qE;",
-O:function(a,b,c,d){var z,y
-if("createContextualFragment" in window.Range.prototype)return this.DW(a,b,c,d)
-z=W.U9("<table>"+H.d(b)+"</table>",c,d)
-y=document.createDocumentFragment()
-y.toString
-z.toString
-new W.e7(y).FV(0,new W.e7(z))
-return y},
-"%":"HTMLTableElement"},
-Iv:{"^":"qE;",
-O:function(a,b,c,d){var z,y,x,w
-if("createContextualFragment" in window.Range.prototype)return this.DW(a,b,c,d)
-z=document.createDocumentFragment()
-y=document
-y=C.Ie.O(y.createElement("table"),b,c,d)
-y.toString
-y=new W.e7(y)
-x=y.gV(y)
-x.toString
-y=new W.e7(x)
-w=y.gV(y)
-z.toString
-w.toString
-new W.e7(z).FV(0,new W.e7(w))
-return z},
-"%":"HTMLTableRowElement"},
-BT:{"^":"qE;",
-O:function(a,b,c,d){var z,y,x
-if("createContextualFragment" in window.Range.prototype)return this.DW(a,b,c,d)
-z=document.createDocumentFragment()
-y=document
-y=C.Ie.O(y.createElement("table"),b,c,d)
-y.toString
-y=new W.e7(y)
-x=y.gV(y)
-z.toString
-x.toString
-new W.e7(z).FV(0,new W.e7(x))
-return z},
-"%":"HTMLTableSectionElement"},
-yY:{"^":"qE;",$isyY:1,"%":"HTMLTemplateElement"},
-FB:{"^":"qE;oc:name=","%":"HTMLTextAreaElement"},
-A1:{"^":"D0;",$isMh:1,"%":"TextTrack"},
-MN:{"^":"D0;",$isMh:1,"%":"TextTrackCue|VTTCue"},
-K8:{"^":"w1p;",
-gA:function(a){return a.length},
-q:function(a,b){if(b>>>0!==b||b>=a.length)throw H.b(P.Cf(b,a,null,null,null))
-return a[b]},
-W:function(a,b){return a[b]},
-$isXj:1,
-$isDD:1,
-$iszM:1,
-$aszM:function(){return[W.MN]},
-$isqC:1,
-"%":"TextTrackCueList"},
-RAp:{"^":"vB+lD;",$iszM:1,
-$aszM:function(){return[W.MN]},
-$isqC:1},
-w1p:{"^":"RAp+Gm;",$iszM:1,
-$aszM:function(){return[W.MN]},
-$isqC:1},
-nJ:{"^":"bD;",
-gA:function(a){return a.length},
-q:function(a,b){if(b>>>0!==b||b>=a.length)throw H.b(P.Cf(b,a,null,null,null))
-return a[b]},
-W:function(a,b){return a[b]},
-$iszM:1,
-$aszM:function(){return[W.A1]},
-$isqC:1,
-$isXj:1,
-$isDD:1,
-"%":"TextTrackList"},
-KS:{"^":"D0+lD;",$iszM:1,
-$aszM:function(){return[W.A1]},
-$isqC:1},
-bD:{"^":"KS+Gm;",$iszM:1,
-$aszM:function(){return[W.A1]},
-$isqC:1},
-M0:{"^":"vB;A:length=","%":"TimeRanges"},
-a3:{"^":"vB;",$isMh:1,"%":"Touch"},
-o4:{"^":"kEI;",
-gA:function(a){return a.length},
-q:function(a,b){if(b>>>0!==b||b>=a.length)throw H.b(P.Cf(b,a,null,null,null))
-return a[b]},
-W:function(a,b){return a[b]},
-$iszM:1,
-$aszM:function(){return[W.a3]},
-$isqC:1,
-$isXj:1,
-$isDD:1,
-"%":"TouchList"},
-nNL:{"^":"vB+lD;",$iszM:1,
-$aszM:function(){return[W.a3]},
-$isqC:1},
-kEI:{"^":"nNL+Gm;",$iszM:1,
-$aszM:function(){return[W.a3]},
-$isqC:1},
-w6:{"^":"ea;","%":"CompositionEvent|FocusEvent|KeyboardEvent|SVGZoomEvent|TextEvent|TouchEvent;UIEvent"},
-Fj:{"^":"vB;",
-w:function(a){return String(a)},
-$isvB:1,
-"%":"URL"},
-vX:{"^":"D0;A:length=","%":"VideoTrackList"},
-wf:{"^":"vB;A:length=","%":"VTTRegionList"},
-EK:{"^":"D0;",
-wR:function(a,b){return a.send(b)},
-"%":"WebSocket"},
-K5:{"^":"D0;",$isvB:1,$isD0:1,"%":"DOMWindow|Window"},
-ny:{"^":"D0;",$isD0:1,$isvB:1,"%":"Worker"},
-Cm:{"^":"D0;",$isvB:1,"%":"DedicatedWorkerGlobalScope|ServiceWorkerGlobalScope|SharedWorkerGlobalScope|WorkerGlobalScope"},
-RX:{"^":"K;oc:name=","%":"Attr"},
-ia:{"^":"vB;",$isMh:1,"%":"CSSPrimitiveValue;CSSValue;hw|lS"},
-YC:{"^":"vB;L:height=,H:left=,T:top=,P:width=",
-w:function(a){return"Rectangle ("+H.d(a.left)+", "+H.d(a.top)+") "+H.d(a.width)+" x "+H.d(a.height)},
-D:function(a,b){var z,y,x
-if(b==null)return!1
-z=J.v(b)
-if(!z.$istn)return!1
-y=a.left
-x=z.gH(b)
-if(y==null?x==null:y===x){y=a.top
-x=z.gT(b)
-if(y==null?x==null:y===x){y=a.width
-x=z.gP(b)
-if(y==null?x==null:y===x){y=a.height
-z=z.gL(b)
-z=y==null?z==null:y===z}else z=!1}else z=!1}else z=!1
-return z},
-gM:function(a){var z,y,x,w
-z=J.hf(a.left)
-y=J.hf(a.top)
-x=J.hf(a.width)
-w=J.hf(a.height)
-return W.Up(W.C0(W.C0(W.C0(W.C0(0,z),y),x),w))},
-$istn:1,
-$astn:I.HU,
-"%":"ClientRect"},
-S3:{"^":"x5e;",
-gA:function(a){return a.length},
-q:function(a,b){if(b>>>0!==b||b>=a.length)throw H.b(P.Cf(b,a,null,null,null))
-return a[b]},
-W:function(a,b){return a[b]},
-$isXj:1,
-$isDD:1,
-$iszM:1,
-$aszM:function(){return[P.tn]},
-$isqC:1,
-"%":"ClientRectList|DOMRectList"},
-yoo:{"^":"vB+lD;",$iszM:1,
-$aszM:function(){return[P.tn]},
-$isqC:1},
-x5e:{"^":"yoo+Gm;",$iszM:1,
-$aszM:function(){return[P.tn]},
-$isqC:1},
-PR:{"^":"HRa;",
-gA:function(a){return a.length},
-q:function(a,b){if(b>>>0!==b||b>=a.length)throw H.b(P.Cf(b,a,null,null,null))
-return a[b]},
-W:function(a,b){return a[b]},
-$iszM:1,
-$aszM:function(){return[W.lw]},
-$isqC:1,
-$isXj:1,
-$isDD:1,
-"%":"CSSRuleList"},
-zLC:{"^":"vB+lD;",$iszM:1,
-$aszM:function(){return[W.lw]},
-$isqC:1},
-HRa:{"^":"zLC+Gm;",$iszM:1,
-$aszM:function(){return[W.lw]},
-$isqC:1},
-VE:{"^":"lS;",
-gA:function(a){return a.length},
-q:function(a,b){if(b>>>0!==b||b>=a.length)throw H.b(P.Cf(b,a,null,null,null))
-return a[b]},
-W:function(a,b){return a[b]},
-$iszM:1,
-$aszM:function(){return[W.ia]},
-$isqC:1,
-$isXj:1,
-$isDD:1,
-"%":"CSSValueList|WebKitCSSFilterValue|WebKitCSSTransformValue"},
-hw:{"^":"ia+lD;",$iszM:1,
-$aszM:function(){return[W.ia]},
-$isqC:1},
-lS:{"^":"hw+Gm;",$iszM:1,
-$aszM:function(){return[W.ia]},
-$isqC:1},
-hq:{"^":"K;",$isvB:1,"%":"DocumentType"},
-w4:{"^":"IB;",
-gL:function(a){return a.height},
-gP:function(a){return a.width},
-"%":"DOMRect"},
-Ij:{"^":"t7i;",
-gA:function(a){return a.length},
-q:function(a,b){if(b>>>0!==b||b>=a.length)throw H.b(P.Cf(b,a,null,null,null))
-return a[b]},
-W:function(a,b){return a[b]},
-$iszM:1,
-$aszM:function(){return[W.GO]},
-$isqC:1,
-$isXj:1,
-$isDD:1,
-"%":"GamepadList"},
-dxW:{"^":"vB+lD;",$iszM:1,
-$aszM:function(){return[W.GO]},
-$isqC:1},
-t7i:{"^":"dxW+Gm;",$iszM:1,
-$aszM:function(){return[W.GO]},
-$isqC:1},
-Nf:{"^":"qE;",$isD0:1,$isvB:1,"%":"HTMLFrameSetElement"},
-rh:{"^":"rrb;",
-gA:function(a){return a.length},
-q:function(a,b){if(b>>>0!==b||b>=a.length)throw H.b(P.Cf(b,a,null,null,null))
-return a[b]},
-W:function(a,b){return a[b]},
-$iszM:1,
-$aszM:function(){return[W.K]},
-$isqC:1,
-$isXj:1,
-$isDD:1,
-"%":"MozNamedAttrMap|NamedNodeMap"},
-hmZ:{"^":"vB+lD;",$iszM:1,
-$aszM:function(){return[W.K]},
-$isqC:1},
-rrb:{"^":"hmZ+Gm;",$iszM:1,
-$aszM:function(){return[W.K]},
-$isqC:1},
-XT:{"^":"D0;",$isD0:1,$isvB:1,"%":"ServiceWorker"},
-LO:{"^":"rla;",
-gA:function(a){return a.length},
-q:function(a,b){if(b>>>0!==b||b>=a.length)throw H.b(P.Cf(b,a,null,null,null))
-return a[b]},
-W:function(a,b){return a[b]},
-$iszM:1,
-$aszM:function(){return[W.vK]},
-$isqC:1,
-$isXj:1,
-$isDD:1,
-"%":"SpeechRecognitionResultList"},
-xth:{"^":"vB+lD;",$iszM:1,
-$aszM:function(){return[W.vK]},
-$isqC:1},
-rla:{"^":"xth+Gm;",$iszM:1,
-$aszM:function(){return[W.vK]},
-$isqC:1},
-i9:{"^":"Gba;",
-gA:function(a){return a.length},
-q:function(a,b){if(b>>>0!==b||b>=a.length)throw H.b(P.Cf(b,a,null,null,null))
-return a[b]},
-W:function(a,b){return a[b]},
-$iszM:1,
-$aszM:function(){return[W.WW]},
-$isqC:1,
-$isXj:1,
-$isDD:1,
-"%":"StyleSheetList"},
-Ocb:{"^":"vB+lD;",$iszM:1,
-$aszM:function(){return[W.WW]},
-$isqC:1},
-Gba:{"^":"Ocb+Gm;",$iszM:1,
-$aszM:function(){return[W.WW]},
-$isqC:1},
-jx:{"^":"vB;",$isvB:1,"%":"WorkerLocation"},
-Iz:{"^":"vB;",$isvB:1,"%":"WorkerNavigator"},
-D9:{"^":"Mh;dA:a<",
-U:function(a,b){var z,y,x,w,v
-for(z=this.gvc(this),y=z.length,x=this.a,w=0;w<z.length;z.length===y||(0,H.lk)(z),++w){v=z[w]
-b.$2(v,x.getAttribute(v))}},
-gvc:function(a){var z,y,x,w,v
-z=this.a.attributes
-y=H.VM([],[P.qU])
-for(x=z.length,w=0;w<x;++w){v=z[w]
-if(v.namespaceURI==null)y.push(J.Ay(v))}return y}},
-i7:{"^":"D9;a",
-q:function(a,b){return this.a.getAttribute(b)},
-gA:function(a){return this.gvc(this).length}},
-I4:{"^":"hx;dA:a<",
-DG:function(){var z,y,x,w,v
-z=P.Ls(null,null,null,P.qU)
-for(y=this.a.className.split(" "),x=y.length,w=0;w<y.length;y.length===x||(0,H.lk)(y),++w){v=J.T0(y[w])
-if(v.length!==0)z.AN(0,v)}return z},
-p5:function(a){this.a.className=a.zV(0," ")},
-gA:function(a){return this.a.classList.length},
-tg:function(a,b){return typeof b==="string"&&this.a.classList.contains(b)},
-AN:function(a,b){var z,y
-z=this.a.classList
-y=z.contains(b)
-z.add(b)
-return!y},
-Rz:function(a,b){var z,y,x
-z=this.a.classList
-y=z.contains(b)
-z.remove(b)
-x=y
-return x}},
-RO:{"^":"qh;",
-X5:function(a,b,c,d){var z=new W.xC(0,this.a,this.b,W.aF(a),!1)
-z.$builtinTypeInfo=this.$builtinTypeInfo
-z.DN()
-return z}},
-Cq:{"^":"RO;a,b,c"},
-xC:{"^":"MO;a,b,c,d,e",
-Gv:function(a){if(this.b==null)return
-this.EO()
-this.b=null
-this.d=null
-return},
-DN:function(){var z=this.d
-if(z!=null&&this.a<=0)J.dZ(this.b,this.c,z,!1)},
-EO:function(){var z=this.d
-if(z!=null)J.EJ(this.b,this.c,z,!1)}},
-JQ:{"^":"Mh;a",
-i0:function(a){return $.$get$zX().tg(0,W.rS(a))},
-Eb:function(a,b,c){var z,y,x
-z=W.rS(a)
-y=$.$get$or()
-x=y.q(0,H.d(z)+"::"+b)
-if(x==null)x=y.q(0,"*::"+b)
-if(x==null)return!1
-return x.$4(a,b,c,this)},
-CY:function(a){var z,y
-z=$.$get$or()
-if(z.gl0(z)){for(y=0;y<262;++y)z.t(0,C.cm[y],W.pS())
-for(y=0;y<12;++y)z.t(0,C.BI[y],W.V4())}},
-$iskF:1,
-static:{
-Tw:function(a){var z,y
-z=document
-y=z.createElement("a")
-z=new W.mk(y,window.location)
-z=new W.JQ(z)
-z.CY(a)
-return z},
-qD:[function(a,b,c,d){return!0},"$4","pS",8,0,7],
-QW:[function(a,b,c,d){var z,y,x,w,v
-z=d.a
-y=z.a
-y.href=c
-x=y.hostname
-z=z.b
-w=z.hostname
-if(x==null?w==null:x===w){w=y.port
-v=z.port
-if(w==null?v==null:w===v){w=y.protocol
-z=z.protocol
-z=w==null?z==null:w===z}else z=!1}else z=!1
-if(!z)if(x==="")if(y.port===""){z=y.protocol
-z=z===":"||z===""}else z=!1
-else z=!1
-else z=!0
-return z},"$4","V4",8,0,7]}},
-Gm:{"^":"Mh;",
-gk:function(a){return new W.W9(a,this.gA(a),-1,null)},
-$iszM:1,
-$aszM:null,
-$isqC:1},
-vD:{"^":"Mh;a",
-i0:function(a){return C.Nm.Vr(this.a,new W.mD(a))},
-Eb:function(a,b,c){return C.Nm.Vr(this.a,new W.Eg(a,b,c))}},
-mD:{"^":"L:1;a",
-$1:function(a){return a.i0(this.a)}},
-Eg:{"^":"L:1;a,b,c",
-$1:function(a){return a.Eb(this.a,this.b,this.c)}},
-m6:{"^":"Mh;",
-i0:function(a){return this.a.tg(0,W.rS(a))},
-Eb:["jF",function(a,b,c){var z,y
-z=W.rS(a)
-y=this.c
-if(y.tg(0,H.d(z)+"::"+b))return this.d.Dt(c)
-else if(y.tg(0,"*::"+b))return this.d.Dt(c)
-else{y=this.b
-if(y.tg(0,H.d(z)+"::"+b))return!0
-else if(y.tg(0,"*::"+b))return!0
-else if(y.tg(0,H.d(z)+"::*"))return!0
-else if(y.tg(0,"*::*"))return!0}return!1}],
-CY:function(a,b,c,d){var z,y,x
-this.a.FV(0,c)
-z=b.S(0,new W.Eo())
-y=b.S(0,new W.Wk())
-this.b.FV(0,z)
-x=this.c
-x.FV(0,C.xD)
-x.FV(0,y)}},
-Eo:{"^":"L:1;",
-$1:function(a){return!C.Nm.tg(C.BI,a)}},
-Wk:{"^":"L:1;",
-$1:function(a){return C.Nm.tg(C.BI,a)}},
-ct:{"^":"m6;e,a,b,c,d",
-Eb:function(a,b,c){if(this.jF(a,b,c))return!0
-if(b==="template"&&c==="")return!0
-if(a.getAttribute("template")==="")return this.e.tg(0,b)
-return!1},
-static:{
-Bl:function(){var z,y,x,w
-z=H.VM(new H.A8(C.Qx,new W.IA()),[null,null])
-y=P.Ls(null,null,null,P.qU)
-x=P.Ls(null,null,null,P.qU)
-w=P.Ls(null,null,null,P.qU)
-w=new W.ct(P.tM(C.Qx,P.qU),y,x,w,null)
-w.CY(null,z,["TEMPLATE"],null)
-return w}}},
-IA:{"^":"L:1;",
-$1:function(a){return"TEMPLATE::"+H.d(a)}},
-Ow:{"^":"Mh;",
-i0:function(a){var z=J.v(a)
-if(!!z.$isj2)return!1
-z=!!z.$isd5
-if(z&&W.rS(a)==="foreignObject")return!1
-if(z)return!0
-return!1},
-Eb:function(a,b,c){if(b==="is"||C.xB.nC(b,"on"))return!1
-return this.i0(a)}},
-W9:{"^":"Mh;a,b,c,d",
-F:function(){var z,y
-z=this.c+1
-y=this.b
-if(z<y){this.d=J.w2(this.a,z)
-this.c=z
-return!0}this.d=null
-this.c=y
-return!1},
-gl:function(){return this.d}},
-dW:{"^":"Mh;a",
-On:function(a,b,c,d){return H.vh(new P.ub("You can only attach EventListeners to your own window."))},
-Y9:function(a,b,c,d){return H.vh(new P.ub("You can only attach EventListeners to your own window."))},
-$isD0:1,
-$isvB:1,
-static:{
-P1:function(a){if(a===window)return a
-else return new W.dW(a)}}},
-kF:{"^":"Mh;"},
-x:{"^":"Mh;",
-Pn:function(a){}},
-mk:{"^":"Mh;a,b"},
-MM:{"^":"Mh;a",
-Pn:function(a){new W.fm(this).$2(a,null)},
-EP:function(a,b){if(b==null)J.Ns(a)
-else b.removeChild(a)},
-I4:function(a,b){var z,y,x,w,v,u,t,s
-z=!0
-y=null
-x=null
-try{y=J.Q1(a)
-x=y.gdA().getAttribute("is")
-w=function(c){if(!(c.attributes instanceof NamedNodeMap))return true
-var r=c.childNodes
-if(c.lastChild&&c.lastChild!==r[r.length-1])return true
-if(c.children)if(!(c.children instanceof HTMLCollection||c.children instanceof NodeList))return true
-var q=0
-if(c.children)q=c.children.length
-for(var p=0;p<q;p++){var o=c.children[p]
-if(o.id=='attributes'||o.name=='attributes'||o.id=='lastChild'||o.name=='lastChild'||o.id=='children'||o.name=='children')return true}return false}(a)
-z=w?!0:!(a.attributes instanceof NamedNodeMap)}catch(t){H.p(t)}v="element unprintable"
-try{v=J.A(a)}catch(t){H.p(t)}try{u=W.rS(a)
-this.kR(a,b,z,v,u,y,x)}catch(t){if(H.p(t) instanceof P.AT)throw t
-else{this.EP(a,b)
-window
-s="Removing corrupted element "+H.d(v)
-if(typeof console!="undefined")console.warn(s)}}},
-kR:function(a,b,c,d,e,f,g){var z,y,x,w,v
-if(c){this.EP(a,b)
-window
-z="Removing element due to corrupted attributes on <"+d+">"
-if(typeof console!="undefined")console.warn(z)
-return}if(!this.a.i0(a)){this.EP(a,b)
-window
-z="Removing disallowed element <"+H.d(e)+"> from "+J.A(b)
-if(typeof console!="undefined")console.warn(z)
-return}if(g!=null)if(!this.a.Eb(a,"is",g)){this.EP(a,b)
-window
-z="Removing disallowed type extension <"+H.d(e)+' is="'+g+'">'
-if(typeof console!="undefined")console.warn(z)
-return}z=f.gvc(f)
-y=H.VM(z.slice(),[H.Kp(z,0)])
-for(x=f.gvc(f).length-1,z=f.a;x>=0;--x){w=y[x]
-if(!this.a.Eb(a,J.cH(w),z.getAttribute(w))){window
-v="Removing disallowed attribute <"+H.d(e)+" "+w+'="'+H.d(z.getAttribute(w))+'">'
-if(typeof console!="undefined")console.warn(v)
-z.getAttribute(w)
-z.removeAttribute(w)}}if(!!J.v(a).$isyY)this.Pn(a.content)}},
-fm:{"^":"L:15;a",
-$2:function(a,b){var z,y,x
-z=this.a
-switch(a.nodeType){case 1:z.I4(a,b)
-break
-case 8:case 11:case 3:case 4:break
-default:z.EP(a,b)}y=a.lastChild
-for(;y!=null;y=x){x=y.previousSibling
-this.$2(y,a)}}}}],["","",,P,{"^":"",tK:{"^":"vB;",$istK:1,$isMh:1,"%":"IDBIndex"},m9:{"^":"D0;kc:error=","%":"IDBOpenDBRequest|IDBRequest|IDBVersionChangeRequest"},nq:{"^":"D0;kc:error=","%":"IDBTransaction"}}],["","",,P,{"^":"",Y0:{"^":"tp;",$isvB:1,"%":"SVGAElement"},ZJ:{"^":"Pt;",$isvB:1,"%":"SVGAltGlyphElement"},ui:{"^":"d5;",$isvB:1,"%":"SVGAnimateElement|SVGAnimateMotionElement|SVGAnimateTransformElement|SVGAnimationElement|SVGSetElement"},jw:{"^":"d5;",$isvB:1,"%":"SVGFEBlendElement"},lv:{"^":"d5;",$isvB:1,"%":"SVGFEColorMatrixElement"},pf:{"^":"d5;",$isvB:1,"%":"SVGFEComponentTransferElement"},py:{"^":"d5;",$isvB:1,"%":"SVGFECompositeElement"},Ef:{"^":"d5;",$isvB:1,"%":"SVGFEConvolveMatrixElement"},zo:{"^":"d5;",$isvB:1,"%":"SVGFEDiffuseLightingElement"},q6:{"^":"d5;",$isvB:1,"%":"SVGFEDisplacementMapElement"},ih:{"^":"d5;",$isvB:1,"%":"SVGFEFloodElement"},v6:{"^":"d5;",$isvB:1,"%":"SVGFEGaussianBlurElement"},me:{"^":"d5;",$isvB:1,"%":"SVGFEImageElement"},oB:{"^":"d5;",$isvB:1,"%":"SVGFEMergeElement"},yu:{"^":"d5;",$isvB:1,"%":"SVGFEMorphologyElement"},MI:{"^":"d5;",$isvB:1,"%":"SVGFEOffsetElement"},bM:{"^":"d5;",$isvB:1,"%":"SVGFESpecularLightingElement"},Qy:{"^":"d5;",$isvB:1,"%":"SVGFETileElement"},ju:{"^":"d5;",$isvB:1,"%":"SVGFETurbulenceElement"},OE:{"^":"d5;",$isvB:1,"%":"SVGFilterElement"},BA:{"^":"tp;",$isBA:1,"%":"SVGGElement"},tp:{"^":"d5;",$isvB:1,"%":"SVGCircleElement|SVGClipPathElement|SVGDefsElement|SVGEllipseElement|SVGForeignObjectElement|SVGGeometryElement|SVGLineElement|SVGPathElement|SVGPolygonElement|SVGPolylineElement|SVGRectElement|SVGSwitchElement;SVGGraphicsElement"},rE:{"^":"tp;",$isvB:1,"%":"SVGImageElement"},Xk:{"^":"vB;",$isMh:1,"%":"SVGLength"},jK:{"^":"maa;",
-gA:function(a){return a.length},
-q:function(a,b){if(b>>>0!==b||b>=a.length)throw H.b(P.Cf(b,a,null,null,null))
-return a.getItem(b)},
-W:function(a,b){return this.q(a,b)},
-$iszM:1,
-$aszM:function(){return[P.Xk]},
-$isqC:1,
-"%":"SVGLengthList"},nja:{"^":"vB+lD;",$iszM:1,
-$aszM:function(){return[P.Xk]},
-$isqC:1},maa:{"^":"nja+Gm;",$iszM:1,
-$aszM:function(){return[P.Xk]},
-$isqC:1},uz:{"^":"d5;",$isvB:1,"%":"SVGMarkerElement"},Yd:{"^":"d5;",$isvB:1,"%":"SVGMaskElement"},uP:{"^":"vB;",$isMh:1,"%":"SVGNumber"},ZZ:{"^":"e0;",
-gA:function(a){return a.length},
-q:function(a,b){if(b>>>0!==b||b>=a.length)throw H.b(P.Cf(b,a,null,null,null))
-return a.getItem(b)},
-W:function(a,b){return this.q(a,b)},
-$iszM:1,
-$aszM:function(){return[P.uP]},
-$isqC:1,
-"%":"SVGNumberList"},qba:{"^":"vB+lD;",$iszM:1,
-$aszM:function(){return[P.uP]},
-$isqC:1},e0:{"^":"qba+Gm;",$iszM:1,
-$aszM:function(){return[P.uP]},
-$isqC:1},XW:{"^":"vB;",$isMh:1,"%":"SVGPathSeg|SVGPathSegArcAbs|SVGPathSegArcRel|SVGPathSegClosePath|SVGPathSegCurvetoCubicAbs|SVGPathSegCurvetoCubicRel|SVGPathSegCurvetoCubicSmoothAbs|SVGPathSegCurvetoCubicSmoothRel|SVGPathSegCurvetoQuadraticAbs|SVGPathSegCurvetoQuadraticRel|SVGPathSegCurvetoQuadraticSmoothAbs|SVGPathSegCurvetoQuadraticSmoothRel|SVGPathSegLinetoAbs|SVGPathSegLinetoHorizontalAbs|SVGPathSegLinetoHorizontalRel|SVGPathSegLinetoRel|SVGPathSegLinetoVerticalAbs|SVGPathSegLinetoVerticalRel|SVGPathSegMovetoAbs|SVGPathSegMovetoRel"},Sv:{"^":"f0;",
-gA:function(a){return a.length},
-q:function(a,b){if(b>>>0!==b||b>=a.length)throw H.b(P.Cf(b,a,null,null,null))
-return a.getItem(b)},
-W:function(a,b){return this.q(a,b)},
-$iszM:1,
-$aszM:function(){return[P.XW]},
-$isqC:1,
-"%":"SVGPathSegList"},R1:{"^":"vB+lD;",$iszM:1,
-$aszM:function(){return[P.XW]},
-$isqC:1},f0:{"^":"R1+Gm;",$iszM:1,
-$aszM:function(){return[P.XW]},
-$isqC:1},Gr:{"^":"d5;",$isvB:1,"%":"SVGPatternElement"},ED:{"^":"vB;A:length=","%":"SVGPointList"},j2:{"^":"d5;",$isj2:1,$isvB:1,"%":"SVGScriptElement"},Kq:{"^":"g0;",
-gA:function(a){return a.length},
-q:function(a,b){if(b>>>0!==b||b>=a.length)throw H.b(P.Cf(b,a,null,null,null))
-return a.getItem(b)},
-W:function(a,b){return this.q(a,b)},
-$iszM:1,
-$aszM:function(){return[P.qU]},
-$isqC:1,
-"%":"SVGStringList"},S1:{"^":"vB+lD;",$iszM:1,
-$aszM:function(){return[P.qU]},
-$isqC:1},g0:{"^":"S1+Gm;",$iszM:1,
-$aszM:function(){return[P.qU]},
-$isqC:1},O7:{"^":"hx;a",
-DG:function(){var z,y,x,w,v,u
-z=this.a.getAttribute("class")
-y=P.Ls(null,null,null,P.qU)
-if(z==null)return y
-for(x=z.split(" "),w=x.length,v=0;v<x.length;x.length===w||(0,H.lk)(x),++v){u=J.T0(x[v])
-if(u.length!==0)y.AN(0,u)}return y},
-p5:function(a){this.a.setAttribute("class",a.zV(0," "))}},d5:{"^":"cv;",
-gDD:function(a){return new P.O7(a)},
-O:function(a,b,c,d){var z,y,x,w,v
-if(c==null){z=H.VM([],[W.kF])
-d=new W.vD(z)
-z.push(W.Tw(null))
-z.push(W.Bl())
-z.push(new W.Ow())
-c=new W.MM(d)}y='<svg version="1.1">'+H.d(b)+"</svg>"
-z=document.body
-x=(z&&C.RY).E(z,y,c)
-w=document.createDocumentFragment()
-x.toString
-z=new W.e7(x)
-v=z.gV(z)
-for(;z=v.firstChild,z!=null;)w.appendChild(z)
-return w},
-$isd5:1,
-$isD0:1,
-$isvB:1,
-"%":"SVGAltGlyphDefElement|SVGAltGlyphItemElement|SVGComponentTransferFunctionElement|SVGDescElement|SVGDiscardElement|SVGFEDistantLightElement|SVGFEFuncAElement|SVGFEFuncBElement|SVGFEFuncGElement|SVGFEFuncRElement|SVGFEMergeNodeElement|SVGFEPointLightElement|SVGFESpotLightElement|SVGFontElement|SVGFontFaceElement|SVGFontFaceFormatElement|SVGFontFaceNameElement|SVGFontFaceSrcElement|SVGFontFaceUriElement|SVGGlyphElement|SVGHKernElement|SVGMetadataElement|SVGMissingGlyphElement|SVGStopElement|SVGStyleElement|SVGTitleElement|SVGVKernElement;SVGElement"},hy:{"^":"tp;",$isvB:1,"%":"SVGSVGElement"},aS:{"^":"d5;",$isvB:1,"%":"SVGSymbolElement"},mH:{"^":"tp;","%":";SVGTextContentElement"},Rk:{"^":"mH;",$isvB:1,"%":"SVGTextPathElement"},Pt:{"^":"mH;","%":"SVGTSpanElement|SVGTextElement;SVGTextPositioningElement"},zY:{"^":"vB;",$isMh:1,"%":"SVGTransform"},DT:{"^":"h0;",
-gA:function(a){return a.length},
-q:function(a,b){if(b>>>0!==b||b>=a.length)throw H.b(P.Cf(b,a,null,null,null))
-return a.getItem(b)},
-W:function(a,b){return this.q(a,b)},
-$iszM:1,
-$aszM:function(){return[P.zY]},
-$isqC:1,
-"%":"SVGTransformList"},T1:{"^":"vB+lD;",$iszM:1,
-$aszM:function(){return[P.zY]},
-$isqC:1},h0:{"^":"T1+Gm;",$iszM:1,
-$aszM:function(){return[P.zY]},
-$isqC:1},ox:{"^":"tp;",$isvB:1,"%":"SVGUseElement"},ZD:{"^":"d5;",$isvB:1,"%":"SVGViewElement"},bW:{"^":"vB;",$isvB:1,"%":"SVGViewSpec"},cu:{"^":"d5;",$isvB:1,"%":"SVGGradientElement|SVGLinearGradientElement|SVGRadialGradientElement"},We:{"^":"d5;",$isvB:1,"%":"SVGCursorElement"},cB:{"^":"d5;",$isvB:1,"%":"SVGFEDropShadowElement"},Pi:{"^":"d5;",$isvB:1,"%":"SVGGlyphRefElement"},zu:{"^":"d5;",$isvB:1,"%":"SVGMPathElement"}}],["","",,P,{"^":"",r2:{"^":"vB;A:length=","%":"AudioBuffer"}}],["","",,P,{"^":""}],["","",,P,{"^":"",Fn:{"^":"i0;",
-gA:function(a){return a.length},
-q:function(a,b){if(b>>>0!==b||b>=a.length)throw H.b(P.Cf(b,a,null,null,null))
-return P.mR(a.item(b))},
-W:function(a,b){return this.q(a,b)},
-$iszM:1,
-$aszM:function(){return[P.L8]},
-$isqC:1,
-"%":"SQLResultSetRowList"},U3:{"^":"vB+lD;",$iszM:1,
-$aszM:function(){return[P.L8]},
-$isqC:1},i0:{"^":"U3+Gm;",$iszM:1,
-$aszM:function(){return[P.L8]},
-$isqC:1}}],["","",,P,{"^":"",IU:{"^":"Mh;"}}],["","",,P,{"^":"",Ex:{"^":"Mh;"},tn:{"^":"Ex;",$astn:null}}],["","",,H,{"^":"",WZ:{"^":"vB;",$isWZ:1,"%":"ArrayBuffer"},ET:{"^":"vB;",$isET:1,"%":"DataView;ArrayBufferView;b0|fj|GV|Dg|pb|Ip|Pg"},b0:{"^":"ET;",
-gA:function(a){return a.length},
-$isXj:1,
-$isDD:1},Dg:{"^":"GV;",
-q:function(a,b){if(b>>>0!==b||b>=a.length)H.vh(H.HY(a,b))
-return a[b]}},fj:{"^":"b0+lD;",$iszM:1,
-$aszM:function(){return[P.CP]},
-$isqC:1},GV:{"^":"fj+SU;"},Pg:{"^":"Ip;",$iszM:1,
-$aszM:function(){return[P.KN]},
-$isqC:1},pb:{"^":"b0+lD;",$iszM:1,
-$aszM:function(){return[P.KN]},
-$isqC:1},Ip:{"^":"pb+SU;"},Hg:{"^":"Dg;",$iszM:1,
-$aszM:function(){return[P.CP]},
-$isqC:1,
-"%":"Float32Array"},fS:{"^":"Dg;",$iszM:1,
-$aszM:function(){return[P.CP]},
-$isqC:1,
-"%":"Float64Array"},xj:{"^":"Pg;",
-q:function(a,b){if(b>>>0!==b||b>=a.length)H.vh(H.HY(a,b))
-return a[b]},
-$iszM:1,
-$aszM:function(){return[P.KN]},
-$isqC:1,
-"%":"Int16Array"},dE:{"^":"Pg;",
-q:function(a,b){if(b>>>0!==b||b>=a.length)H.vh(H.HY(a,b))
-return a[b]},
-$iszM:1,
-$aszM:function(){return[P.KN]},
-$isqC:1,
-"%":"Int32Array"},ZA:{"^":"Pg;",
-q:function(a,b){if(b>>>0!==b||b>=a.length)H.vh(H.HY(a,b))
-return a[b]},
-$iszM:1,
-$aszM:function(){return[P.KN]},
-$isqC:1,
-"%":"Int8Array"},dT:{"^":"Pg;",
-q:function(a,b){if(b>>>0!==b||b>=a.length)H.vh(H.HY(a,b))
-return a[b]},
-$iszM:1,
-$aszM:function(){return[P.KN]},
-$isqC:1,
-"%":"Uint16Array"},nl:{"^":"Pg;",
-q:function(a,b){if(b>>>0!==b||b>=a.length)H.vh(H.HY(a,b))
-return a[b]},
-$iszM:1,
-$aszM:function(){return[P.KN]},
-$isqC:1,
-"%":"Uint32Array"},eE:{"^":"Pg;",
-gA:function(a){return a.length},
-q:function(a,b){if(b>>>0!==b||b>=a.length)H.vh(H.HY(a,b))
-return a[b]},
-$iszM:1,
-$aszM:function(){return[P.KN]},
-$isqC:1,
-"%":"CanvasPixelArray|Uint8ClampedArray"},V6:{"^":"Pg;",
-gA:function(a){return a.length},
-q:function(a,b){if(b>>>0!==b||b>=a.length)H.vh(H.HY(a,b))
-return a[b]},
-$iszM:1,
-$aszM:function(){return[P.KN]},
-$isqC:1,
-"%":";Uint8Array"}}],["","",,H,{"^":"",
-qw:function(a){if(typeof dartPrint=="function"){dartPrint(a)
-return}if(typeof console=="object"&&typeof console.log!="undefined"){console.log(a)
-return}if(typeof window=="object")return
-if(typeof print=="function"){print(a)
-return}throw"Unable to print message: "+String(a)}}],["","",,P,{"^":"",
-mR:function(a){var z,y,x,w,v
-if(a==null)return
-z=P.u5()
-y=Object.getOwnPropertyNames(a)
-for(x=y.length,w=0;w<y.length;y.length===x||(0,H.lk)(y),++w){v=y[w]
-z.t(0,v,a[v])}return z},
-hx:{"^":"Mh;",
-VL:function(a){if($.$get$X4().b.test(H.Yx(a)))return a
-throw H.b(P.L3(a,"value","Not a valid class token"))},
-w:function(a){return this.DG().zV(0," ")},
-O4:function(a,b,c){var z,y
-this.VL(b)
-z=this.DG()
-if(!z.tg(0,b)){z.AN(0,b)
-y=!0}else{z.Rz(0,b)
-y=!1}this.p5(z)
-return y},
-lo:function(a,b){return this.O4(a,b,null)},
-gk:function(a){var z,y
-z=this.DG()
-y=new P.lm(z,z.r,null,null)
-y.c=z.e
-return y},
-U:function(a,b){this.DG().U(0,b)},
-gA:function(a){return this.DG().a},
-tg:function(a,b){if(typeof b!=="string")return!1
-this.VL(b)
-return this.DG().tg(0,b)},
-Zt:function(a){return this.tg(0,a)?a:null},
-AN:function(a,b){this.VL(b)
-return this.OS(0,new P.GE(b))},
-Rz:function(a,b){var z,y
-this.VL(b)
-z=this.DG()
-y=z.Rz(0,b)
-this.p5(z)
-return y},
-OS:function(a,b){var z,y
-z=this.DG()
-y=b.$1(z)
-this.p5(z)
-return y},
-$isqC:1},
-GE:{"^":"L:1;a",
-$1:function(a){return a.AN(0,this.a)}}}],["","",,Z,{"^":"",
-E:[function(){var z,y,x,w,v,u,t
-z=$.$get$t().innerHTML
-try{y=self.Viz(z,"svg")
-Z.r(y)}catch(v){u=H.p(v)
-x=u
-u=J.A(x)
-t=C.oW.h(u,0,u.length)
-w="<pre>"+H.d(t==null?u:t)+"</pre>"
-u=document.body;(u&&C.RY).N(u,"beforeend",w,null,null)}},"$0","cK",0,0,2],
-r:function(a){var z,y,x,w,v
-z=document.body;(z&&C.RY).N(z,"beforeend",a,C.Hv,null)
-z=$.$get$hh()
-y=z.style
-y.display="block"
-$.v7=H.Go(document.querySelector("svg"),"$isd5")
-z.toString
-z=H.VM(new W.Cq(z,"click",!1),[null])
-H.VM(new W.xC(0,z.a,z.b,W.aF(new Z.AR()),!1),[H.Kp(z,0)]).DN()
-for(z=new W.wz($.v7.querySelectorAll("g.node")),z=z.gk(z);z.F();){x=z.d
-y=J.RE(x)
-y.sjO(x,y.Wk(x,"title").textContent)}for(z=new W.wz($.v7.querySelectorAll("g.edge")),z=z.gk(z);z.F();){w=z.d
-y=J.RE(w)
-v=y.Wk(w,"title").textContent.split("->")
-y.a7(w,"x-from",v[0])
-w.setAttribute("x-to",v[1])}z=$.v7
-z.toString
-z=H.VM(new W.Cq(z,"mouseover",!1),[null])
-H.VM(new W.xC(0,z.a,z.b,W.aF(new Z.lg()),!1),[H.Kp(z,0)]).DN()
-z=$.v7
-z.toString
-z=H.VM(new W.Cq(z,"mouseleave",!1),[null])
-H.VM(new W.xC(0,z.a,z.b,W.aF(new Z.qK()),!1),[H.Kp(z,0)]).DN()},
-ws:function(a){var z,y
-z=[]
-if(a!=null)if(new P.O7(a).tg(0,"edge"))C.Nm.FV(z,[a.getAttribute("x-to"),a.getAttribute("x-from")])
-else z.push(a.id)
-y=new W.wz($.v7.querySelectorAll("g.node"))
-y.U(y,new Z.tb(z))
-y=new W.wz($.v7.querySelectorAll("g.edge"))
-y.U(y,new Z.GJ(z))},
-AR:{"^":"L:1;",
-$1:function(a){var z=$.v7
-z.toString
-new P.O7(z).lo(0,"zoom")}},
-lg:{"^":"L:5;",
-$1:function(a){var z,y
-z=H.Go(W.qc(a.relatedTarget),"$iscv")
-while(!0){y=z!=null
-if(!(y&&!J.v(z).$isBA))break
-z=z.parentElement}if(y){y=J.RE(z)
-y=y.gDD(z).tg(0,"edge")||y.gDD(z).tg(0,"node")}else y=!1
-if(y)Z.ws(z)
-else Z.ws(null)}},
-qK:{"^":"L:5;",
-$1:function(a){Z.ws(null)}},
-tb:{"^":"L:6;a",
-$1:function(a){var z=J.RE(a)
-if(C.Nm.tg(this.a,a.id))z.gDD(a).AN(0,"active")
-else z.gDD(a).Rz(0,"active")}},
-GJ:{"^":"L:6;a",
-$1:function(a){var z,y
-z=this.a
-if(z.length===2){z=C.Nm.tg(z,a.getAttribute("x-to"))&&C.Nm.tg(z,a.getAttribute("x-from"))
-y=J.RE(a)
-if(z)y.gDD(a).AN(0,"active")
-else y.gDD(a).Rz(0,"active")}else{z=C.Nm.tg(z,a.getAttribute("x-to"))||C.Nm.tg(z,a.getAttribute("x-from"))
-y=J.RE(a)
-if(z)y.gDD(a).AN(0,"active")
-else y.gDD(a).Rz(0,"active")}}}},1]]
-setupProgram(dart,0)
-J.RE=function(a){if(a==null)return a
-if(typeof a!="object"){if(typeof a=="function")return J.c5.prototype
-return a}if(a instanceof P.Mh)return a
-return J.m(a)}
-J.U6=function(a){if(typeof a=="string")return J.Dr.prototype
-if(a==null)return a
-if(a.constructor==Array)return J.jd.prototype
-if(typeof a!="object"){if(typeof a=="function")return J.c5.prototype
-return a}if(a instanceof P.Mh)return a
-return J.m(a)}
-J.Wx=function(a){if(typeof a=="number")return J.jX.prototype
-if(a==null)return a
-if(!(a instanceof P.Mh))return J.k.prototype
-return a}
-J.rY=function(a){if(typeof a=="string")return J.Dr.prototype
-if(a==null)return a
-if(!(a instanceof P.Mh))return J.k.prototype
-return a}
-J.v=function(a){if(typeof a=="number"){if(Math.floor(a)==a)return J.im.prototype
-return J.VA.prototype}if(typeof a=="string")return J.Dr.prototype
-if(a==null)return J.PE.prototype
-if(typeof a=="boolean")return J.yE.prototype
-if(a.constructor==Array)return J.jd.prototype
-if(typeof a!="object"){if(typeof a=="function")return J.c5.prototype
-return a}if(a instanceof P.Mh)return a
-return J.m(a)}
-J.w1=function(a){if(a==null)return a
-if(a.constructor==Array)return J.jd.prototype
-if(typeof a!="object"){if(typeof a=="function")return J.c5.prototype
-return a}if(a instanceof P.Mh)return a
-return J.m(a)}
-J.A=function(a){return J.v(a).w(a)}
-J.Ay=function(a){return J.RE(a).goc(a)}
-J.EJ=function(a,b,c,d){return J.RE(a).Y9(a,b,c,d)}
-J.GA=function(a,b){return J.w1(a).W(a,b)}
-J.Gq=function(a,b){return J.RE(a).sLU(a,b)}
-J.Hm=function(a){return J.U6(a).gA(a)}
-J.IT=function(a){return J.w1(a).gk(a)}
-J.Ns=function(a){return J.w1(a).wg(a)}
-J.Ob=function(a){return J.RE(a).gns(a)}
-J.Q1=function(a){return J.RE(a).gQg(a)}
-J.RM=function(a,b){if(a==null)return b==null
-if(typeof a!="object")return b!=null&&a===b
-return J.v(a).D(a,b)}
-J.T0=function(a){return J.rY(a).bS(a)}
-J.TT=function(a,b){return J.RE(a).wR(a,b)}
-J.YA=function(a){return J.RE(a).gkc(a)}
-J.aa=function(a,b){if(typeof a=="number"&&typeof b=="number")return a<b
-return J.Wx(a).B(a,b)}
-J.cH=function(a){return J.rY(a).hc(a)}
-J.dZ=function(a,b,c,d){return J.RE(a).On(a,b,c,d)}
-J.hE=function(a,b){return J.w1(a).U(a,b)}
-J.hf=function(a){return J.v(a).gM(a)}
-J.iu=function(a,b){return J.w1(a).ez(a,b)}
-J.ld=function(a,b,c){return J.rY(a).C(a,b,c)}
-J.w2=function(a,b){if(typeof b==="number")if(a.constructor==Array||typeof a=="string"||H.wV(a,a[init.dispatchPropertyName]))if(b>>>0===b&&b<a.length)return a[b]
-return J.U6(a).q(a,b)}
-I.uL=function(a){a.immutable$list=Array
-a.fixed$length=Array
-return a}
-var $=I.p
-C.RY=W.QP.prototype
-C.Ok=J.vB.prototype
-C.Nm=J.jd.prototype
-C.jn=J.im.prototype
-C.xB=J.Dr.prototype
-C.DG=J.c5.prototype
-C.t5=W.BH.prototype
-C.ZQ=J.iC.prototype
-C.Ie=W.Tb.prototype
-C.vB=J.k.prototype
-C.KZ=new H.hJ()
-C.NU=new P.R8()
-C.Hv=new W.x()
-C.RT=new P.a6(0)
-C.Hw=new P.fU("unknown",!0,!0,!0,!0)
-C.oW=new P.Rc(C.Hw)
-C.Mc=function(hooks) {
-  if (typeof dartExperimentalFixupGetTag != "function") return hooks;
-  hooks.getTag = dartExperimentalFixupGetTag(hooks.getTag);
-}
-C.lR=function(hooks) {
-  var userAgent = typeof navigator == "object" ? navigator.userAgent : "";
-  if (userAgent.indexOf("Firefox") == -1) return hooks;
-  var getTag = hooks.getTag;
-  var quickMap = {
-    "BeforeUnloadEvent": "Event",
-    "DataTransfer": "Clipboard",
-    "GeoGeolocation": "Geolocation",
-    "Location": "!Location",
-    "WorkerMessageEvent": "MessageEvent",
-    "XMLDocument": "!Document"};
-  function getTagFirefox(o) {
-    var tag = getTag(o);
-    return quickMap[tag] || tag;
-  }
-  hooks.getTag = getTagFirefox;
-}
-C.w2=function getTagFallback(o) {
-  var constructor = o.constructor;
-  if (typeof constructor == "function") {
-    var name = constructor.name;
-    if (typeof name == "string" &&
-        name.length > 2 &&
-        name !== "Object" &&
-        name !== "Function.prototype") {
-      return name;
-    }
-  }
-  var s = Object.prototype.toString.call(o);
-  return s.substring(8, s.length - 1);
-}
-C.XQ=function(hooks) { return hooks; }
-
-C.ur=function(getTagFallback) {
-  return function(hooks) {
-    if (typeof navigator != "object") return hooks;
-    var ua = navigator.userAgent;
-    if (ua.indexOf("DumpRenderTree") >= 0) return hooks;
-    if (ua.indexOf("Chrome") >= 0) {
-      function confirm(p) {
-        return typeof window == "object" && window[p] && window[p].name == p;
-      }
-      if (confirm("Window") && confirm("HTMLElement")) return hooks;
-    }
-    hooks.getTag = getTagFallback;
-  };
-}
-C.Jh=function(hooks) {
-  var userAgent = typeof navigator == "object" ? navigator.userAgent : "";
-  if (userAgent.indexOf("Trident/") == -1) return hooks;
-  var getTag = hooks.getTag;
-  var quickMap = {
-    "BeforeUnloadEvent": "Event",
-    "DataTransfer": "Clipboard",
-    "HTMLDDElement": "HTMLElement",
-    "HTMLDTElement": "HTMLElement",
-    "HTMLPhraseElement": "HTMLElement",
-    "Position": "Geoposition"
-  };
-  function getTagIE(o) {
-    var tag = getTag(o);
-    var newTag = quickMap[tag];
-    if (newTag) return newTag;
-    if (tag == "Object") {
-      if (window.DataView && (o instanceof window.DataView)) return "DataView";
-    }
-    return tag;
-  }
-  function prototypeForTagIE(tag) {
-    var constructor = window[tag];
-    if (constructor == null) return null;
-    return constructor.prototype;
-  }
-  hooks.getTag = getTagIE;
-  hooks.prototypeForTag = prototypeForTagIE;
-}
-C.M1=function() {
-  function typeNameInChrome(o) {
-    var constructor = o.constructor;
-    if (constructor) {
-      var name = constructor.name;
-      if (name) return name;
-    }
-    var s = Object.prototype.toString.call(o);
-    return s.substring(8, s.length - 1);
-  }
-  function getUnknownTag(object, tag) {
-    if (/^HTML[A-Z].*Element$/.test(tag)) {
-      var name = Object.prototype.toString.call(object);
-      if (name == "[object Object]") return null;
-      return "HTMLElement";
-    }
-  }
-  function getUnknownTagGenericBrowser(object, tag) {
-    if (self.HTMLElement && object instanceof HTMLElement) return "HTMLElement";
-    return getUnknownTag(object, tag);
-  }
-  function prototypeForTag(tag) {
-    if (typeof window == "undefined") return null;
-    if (typeof window[tag] == "undefined") return null;
-    var constructor = window[tag];
-    if (typeof constructor != "function") return null;
-    return constructor.prototype;
-  }
-  function discriminator(tag) { return null; }
-  var isBrowser = typeof navigator == "object";
-  return {
-    getTag: typeNameInChrome,
-    getUnknownTag: isBrowser ? getUnknownTagGenericBrowser : getUnknownTag,
-    prototypeForTag: prototypeForTag,
-    discriminator: discriminator };
-}
-C.hQ=function(hooks) {
-  var getTag = hooks.getTag;
-  var prototypeForTag = hooks.prototypeForTag;
-  function getTagFixed(o) {
-    var tag = getTag(o);
-    if (tag == "Document") {
-      if (!!o.xmlVersion) return "!Document";
-      return "!HTMLDocument";
-    }
-    return tag;
-  }
-  function prototypeForTagFixed(tag) {
-    if (tag == "Document") return null;
-    return prototypeForTag(tag);
-  }
-  hooks.getTag = getTagFixed;
-  hooks.prototypeForTag = prototypeForTagFixed;
-}
-C.cm=H.VM(I.uL(["*::class","*::dir","*::draggable","*::hidden","*::id","*::inert","*::itemprop","*::itemref","*::itemscope","*::lang","*::spellcheck","*::title","*::translate","A::accesskey","A::coords","A::hreflang","A::name","A::shape","A::tabindex","A::target","A::type","AREA::accesskey","AREA::alt","AREA::coords","AREA::nohref","AREA::shape","AREA::tabindex","AREA::target","AUDIO::controls","AUDIO::loop","AUDIO::mediagroup","AUDIO::muted","AUDIO::preload","BDO::dir","BODY::alink","BODY::bgcolor","BODY::link","BODY::text","BODY::vlink","BR::clear","BUTTON::accesskey","BUTTON::disabled","BUTTON::name","BUTTON::tabindex","BUTTON::type","BUTTON::value","CANVAS::height","CANVAS::width","CAPTION::align","COL::align","COL::char","COL::charoff","COL::span","COL::valign","COL::width","COLGROUP::align","COLGROUP::char","COLGROUP::charoff","COLGROUP::span","COLGROUP::valign","COLGROUP::width","COMMAND::checked","COMMAND::command","COMMAND::disabled","COMMAND::label","COMMAND::radiogroup","COMMAND::type","DATA::value","DEL::datetime","DETAILS::open","DIR::compact","DIV::align","DL::compact","FIELDSET::disabled","FONT::color","FONT::face","FONT::size","FORM::accept","FORM::autocomplete","FORM::enctype","FORM::method","FORM::name","FORM::novalidate","FORM::target","FRAME::name","H1::align","H2::align","H3::align","H4::align","H5::align","H6::align","HR::align","HR::noshade","HR::size","HR::width","HTML::version","IFRAME::align","IFRAME::frameborder","IFRAME::height","IFRAME::marginheight","IFRAME::marginwidth","IFRAME::width","IMG::align","IMG::alt","IMG::border","IMG::height","IMG::hspace","IMG::ismap","IMG::name","IMG::usemap","IMG::vspace","IMG::width","INPUT::accept","INPUT::accesskey","INPUT::align","INPUT::alt","INPUT::autocomplete","INPUT::autofocus","INPUT::checked","INPUT::disabled","INPUT::inputmode","INPUT::ismap","INPUT::list","INPUT::max","INPUT::maxlength","INPUT::min","INPUT::multiple","INPUT::name","INPUT::placeholder","INPUT::readonly","INPUT::required","INPUT::size","INPUT::step","INPUT::tabindex","INPUT::type","INPUT::usemap","INPUT::value","INS::datetime","KEYGEN::disabled","KEYGEN::keytype","KEYGEN::name","LABEL::accesskey","LABEL::for","LEGEND::accesskey","LEGEND::align","LI::type","LI::value","LINK::sizes","MAP::name","MENU::compact","MENU::label","MENU::type","METER::high","METER::low","METER::max","METER::min","METER::value","OBJECT::typemustmatch","OL::compact","OL::reversed","OL::start","OL::type","OPTGROUP::disabled","OPTGROUP::label","OPTION::disabled","OPTION::label","OPTION::selected","OPTION::value","OUTPUT::for","OUTPUT::name","P::align","PRE::width","PROGRESS::max","PROGRESS::min","PROGRESS::value","SELECT::autocomplete","SELECT::disabled","SELECT::multiple","SELECT::name","SELECT::required","SELECT::size","SELECT::tabindex","SOURCE::type","TABLE::align","TABLE::bgcolor","TABLE::border","TABLE::cellpadding","TABLE::cellspacing","TABLE::frame","TABLE::rules","TABLE::summary","TABLE::width","TBODY::align","TBODY::char","TBODY::charoff","TBODY::valign","TD::abbr","TD::align","TD::axis","TD::bgcolor","TD::char","TD::charoff","TD::colspan","TD::headers","TD::height","TD::nowrap","TD::rowspan","TD::scope","TD::valign","TD::width","TEXTAREA::accesskey","TEXTAREA::autocomplete","TEXTAREA::cols","TEXTAREA::disabled","TEXTAREA::inputmode","TEXTAREA::name","TEXTAREA::placeholder","TEXTAREA::readonly","TEXTAREA::required","TEXTAREA::rows","TEXTAREA::tabindex","TEXTAREA::wrap","TFOOT::align","TFOOT::char","TFOOT::charoff","TFOOT::valign","TH::abbr","TH::align","TH::axis","TH::bgcolor","TH::char","TH::charoff","TH::colspan","TH::headers","TH::height","TH::nowrap","TH::rowspan","TH::scope","TH::valign","TH::width","THEAD::align","THEAD::char","THEAD::charoff","THEAD::valign","TR::align","TR::bgcolor","TR::char","TR::charoff","TR::valign","TRACK::default","TRACK::kind","TRACK::label","TRACK::srclang","UL::compact","UL::type","VIDEO::controls","VIDEO::height","VIDEO::loop","VIDEO::mediagroup","VIDEO::muted","VIDEO::preload","VIDEO::width"]),[P.qU])
-C.Sq=I.uL(["HEAD","AREA","BASE","BASEFONT","BR","COL","COLGROUP","EMBED","FRAME","FRAMESET","HR","IMAGE","IMG","INPUT","ISINDEX","LINK","META","PARAM","SOURCE","STYLE","TITLE","WBR"])
-C.xD=I.uL([])
-C.Qx=H.VM(I.uL(["bind","if","ref","repeat","syntax"]),[P.qU])
-C.BI=H.VM(I.uL(["A::href","AREA::href","BLOCKQUOTE::cite","BODY::background","COMMAND::icon","DEL::cite","FORM::action","IMG::src","INPUT::src","INS::cite","Q::cite","VIDEO::poster"]),[P.qU])
-$.te="$cachedFunction"
-$.eb="$cachedInvocation"
-$.yj=0
-$.mJ=null
-$.P4=null
-$.n=null
-$.c=null
-$.x7=null
-$.z=null
-$.a=null
-$.M=null
-$.S6=null
-$.k8=null
-$.mg=null
-$.UD=!1
-$.X3=C.NU
-$.Ss=0
-$.xo=null
-$.BO=null
-$.lt=null
-$.EU=null
-$.v7=null
-$=null
-init.isHunkLoaded=function(a){return!!$dart_deferred_initializers$[a]}
-init.deferredInitialized=new Object(null)
-init.isHunkInitialized=function(a){return init.deferredInitialized[a]}
-init.initializeLoadedHunk=function(a){$dart_deferred_initializers$[a]($globals$,$)
-init.deferredInitialized[a]=true}
-init.deferredLibraryUris={}
-init.deferredLibraryHashes={};(function(a){for(var z=0;z<a.length;){var y=a[z++]
-var x=a[z++]
-var w=a[z++]
-I.$lazy(y,x,w)}})(["fa","$get$fa",function(){return init.getIsolateTag("_$dart_dartClosure")},"Kb","$get$Kb",function(){return H.yl()},"jp","$get$jp",function(){return new P.kM(null)},"U2","$get$U2",function(){return H.cM(H.S7({
-toString:function(){return"$receiver$"}}))},"k1","$get$k1",function(){return H.cM(H.S7({$method$:null,
-toString:function(){return"$receiver$"}}))},"Re","$get$Re",function(){return H.cM(H.S7(null))},"fN","$get$fN",function(){return H.cM(function(){var $argumentsExpr$='$arguments$'
-try{null.$method$($argumentsExpr$)}catch(z){return z.message}}())},"qi","$get$qi",function(){return H.cM(H.S7(void 0))},"rZ","$get$rZ",function(){return H.cM(function(){var $argumentsExpr$='$arguments$'
-try{(void 0).$method$($argumentsExpr$)}catch(z){return z.message}}())},"BX","$get$BX",function(){return H.cM(H.Mj(null))},"tt","$get$tt",function(){return H.cM(function(){try{null.$method$}catch(z){return z.message}}())},"dt","$get$dt",function(){return H.cM(H.Mj(void 0))},"A7","$get$A7",function(){return H.cM(function(){try{(void 0).$method$}catch(z){return z.message}}())},"Wc","$get$Wc",function(){return P.Oj()},"xg","$get$xg",function(){return[]},"zX","$get$zX",function(){return P.tM(["A","ABBR","ACRONYM","ADDRESS","AREA","ARTICLE","ASIDE","AUDIO","B","BDI","BDO","BIG","BLOCKQUOTE","BR","BUTTON","CANVAS","CAPTION","CENTER","CITE","CODE","COL","COLGROUP","COMMAND","DATA","DATALIST","DD","DEL","DETAILS","DFN","DIR","DIV","DL","DT","EM","FIELDSET","FIGCAPTION","FIGURE","FONT","FOOTER","FORM","H1","H2","H3","H4","H5","H6","HEADER","HGROUP","HR","I","IFRAME","IMG","INPUT","INS","KBD","LABEL","LEGEND","LI","MAP","MARK","MENU","METER","NAV","NOBR","OL","OPTGROUP","OPTION","OUTPUT","P","PRE","PROGRESS","Q","S","SAMP","SECTION","SELECT","SMALL","SOURCE","SPAN","STRIKE","STRONG","SUB","SUMMARY","SUP","TABLE","TBODY","TD","TEXTAREA","TFOOT","TH","THEAD","TIME","TR","TRACK","TT","U","UL","VAR","VIDEO","WBR"],null)},"or","$get$or",function(){return P.u5()},"X4","$get$X4",function(){return new H.VR("^\\S+$",H.v4("^\\S+$",!1,!0,!1),null,null)},"hh","$get$hh",function(){return H.Go(W.Z0("#zoomBtn"),"$isIF")},"t","$get$t",function(){return H.Go(W.Z0("#dot"),"$isqI")}])
-I=I.$finishIsolateConstructor(I)
-$=new I()
-init.metadata=[null]
-init.types=[{func:1},{func:1,args:[,]},{func:1,v:true},{func:1,v:true,args:[{func:1,v:true}]},{func:1,ret:P.qU,args:[P.KN]},{func:1,args:[W.Aj]},{func:1,args:[W.cv]},{func:1,ret:P.a2,args:[W.cv,P.qU,P.qU,W.JQ]},{func:1,args:[,P.qU]},{func:1,args:[P.qU]},{func:1,args:[{func:1,v:true}]},{func:1,v:true,args:[,],opt:[P.Gz]},{func:1,args:[,],opt:[,]},{func:1,args:[,P.Gz]},{func:1,args:[,,]},{func:1,v:true,args:[W.K,W.K]}]
-function convertToFastObject(a){function MyClass(){}MyClass.prototype=a
-new MyClass()
-return a}function convertToSlowObject(a){a.__MAGIC_SLOW_PROPERTY=1
-delete a.__MAGIC_SLOW_PROPERTY
-return a}A=convertToFastObject(A)
-B=convertToFastObject(B)
-C=convertToFastObject(C)
-D=convertToFastObject(D)
-E=convertToFastObject(E)
-F=convertToFastObject(F)
-G=convertToFastObject(G)
-H=convertToFastObject(H)
-J=convertToFastObject(J)
-K=convertToFastObject(K)
-L=convertToFastObject(L)
-M=convertToFastObject(M)
-N=convertToFastObject(N)
-O=convertToFastObject(O)
-P=convertToFastObject(P)
-Q=convertToFastObject(Q)
-R=convertToFastObject(R)
-S=convertToFastObject(S)
-T=convertToFastObject(T)
-U=convertToFastObject(U)
-V=convertToFastObject(V)
-W=convertToFastObject(W)
-X=convertToFastObject(X)
-Y=convertToFastObject(Y)
-Z=convertToFastObject(Z)
-function init(){I.p=Object.create(null)
-init.allClasses=map()
-init.getTypeFromName=function(a){return init.allClasses[a]}
-init.interceptorsByTag=map()
-init.leafTags=map()
-init.finishedClasses=map()
-I.$lazy=function(a,b,c,d,e){if(!init.lazies)init.lazies=Object.create(null)
-init.lazies[a]=b
-e=e||I.p
-var z={}
-var y={}
-e[a]=z
-e[b]=function(){var x=this[a]
-try{if(x===z){this[a]=y
-try{x=this[a]=c()}finally{if(x===z)this[a]=null}}else if(x===y)H.eQ(d||a)
-return x}finally{this[b]=function(){return this[a]}}}}
-I.$finishIsolateConstructor=function(a){var z=a.p
-function Isolate(){var y=Object.keys(z)
-for(var x=0;x<y.length;x++){var w=y[x]
-this[w]=z[w]}var v=init.lazies
-var u=v?Object.keys(v):[]
-for(var x=0;x<u.length;x++)this[v[u[x]]]=null
-function ForceEfficientMap(){}ForceEfficientMap.prototype=this
-new ForceEfficientMap()
-for(var x=0;x<u.length;x++){var t=v[u[x]]
-this[t]=z[t]}}Isolate.prototype=a.prototype
-Isolate.prototype.constructor=Isolate
-Isolate.p=z
-Isolate.uL=a.uL
-Isolate.HU=a.HU
-return Isolate}}!function(){var z=function(a){var t={}
-t[a]=1
-return Object.keys(convertToFastObject(t))[0]}
-init.getIsolateTag=function(a){return z("___dart_"+a+init.isolateTag)}
-var y="___dart_isolate_tags_"
-var x=Object[y]||(Object[y]=Object.create(null))
-var w="_ZxYxX"
-for(var v=0;;v++){var u=z(w+"_"+v+"_")
-if(!(u in x)){x[u]=1
-init.isolateTag=u
-break}}init.dispatchPropertyName=init.getIsolateTag("dispatch_record")}();(function(a){if(typeof document==="undefined"){a(null)
-return}if(typeof document.currentScript!='undefined'){a(document.currentScript)
-return}var z=document.scripts
-function onLoad(b){for(var x=0;x<z.length;++x)z[x].removeEventListener("load",onLoad,false)
-a(b.target)}for(var y=0;y<z.length;++y)z[y].addEventListener("load",onLoad,false)})(function(a){init.currentScript=a
-if(typeof dartMainRunner==="function")dartMainRunner(function(b){H.Rq(Z.cK(),b)},[])
-else (function(b){H.Rq(Z.cK(),b)})([])})})()
\ No newline at end of file
diff --git a/pkg/analyzer/doc/tasks.html b/pkg/analyzer/doc/tasks.html
deleted file mode 100644
index e2de682..0000000
--- a/pkg/analyzer/doc/tasks.html
+++ /dev/null
@@ -1,371 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-    <title>Analysis Task Dependency Graph</title>
-    <link rel="stylesheet" href="support/style.css">
-    <script src="support/viz.js"></script>
-    <script type="application/dart" src="support/web_app.dart.js"></script>
-    <script src="support/dart.js"></script>
-</head>
-<body>
-<button id="zoomBtn">Zoom</button>
-<script type="text/vnd.graphviz" id="dot">
-digraph G {
-  tooltip="Analysis Task Dependency Graph";
-  node [fontname=Helvetica];
-  edge [fontname=Helvetica, fontcolor=gray];
-  BUILD_DIRECTIVES_ERRORS -> LibraryUnitErrorsTask
-  BUILD_DIRECTIVES_ERRORS [shape=box]
-  BUILD_LIBRARY_ERRORS -> LibraryUnitErrorsTask
-  BUILD_LIBRARY_ERRORS [shape=box]
-  BuildCompilationUnitElementTask -> COMPILATION_UNIT_CONSTANTS
-  BuildCompilationUnitElementTask -> COMPILATION_UNIT_ELEMENT
-  BuildCompilationUnitElementTask -> CREATED_RESOLVED_UNIT1
-  BuildCompilationUnitElementTask -> RESOLVED_UNIT1
-  BuildDirectiveElementsTask -> BUILD_DIRECTIVES_ERRORS
-  BuildDirectiveElementsTask -> LIBRARY_ELEMENT2
-  BuildEnumMemberElementsTask -> CREATED_RESOLVED_UNIT3
-  BuildEnumMemberElementsTask -> RESOLVED_UNIT3
-  BuildExportNamespaceTask -> LIBRARY_ELEMENT4
-  BuildLibraryElementTask -> BUILD_LIBRARY_ERRORS
-  BuildLibraryElementTask -> IS_LAUNCHABLE
-  BuildLibraryElementTask -> LIBRARY_ELEMENT1
-  BuildPublicNamespaceTask -> LIBRARY_ELEMENT3
-  BuildSourceExportClosureTask -> EXPORT_SOURCE_CLOSURE
-  BuildTypeProviderTask -> TYPE_PROVIDER
-  COMPILATION_UNIT_CONSTANTS -> EvaluateUnitConstantsTask
-  COMPILATION_UNIT_CONSTANTS [shape=box]
-  COMPILATION_UNIT_ELEMENT [shape=box]
-  CONSTANT_DEPENDENCIES -> ComputeConstantValueTask
-  CONSTANT_DEPENDENCIES [shape=box]
-  CONSTANT_EXPRESSIONS_DEPENDENCIES -> EvaluateUnitConstantsTask
-  CONSTANT_EXPRESSIONS_DEPENDENCIES [shape=box]
-  CONSTANT_EXPRESSION_RESOLVED -> ComputeConstantDependenciesTask
-  CONSTANT_EXPRESSION_RESOLVED [shape=box]
-  CONSTANT_VALUE -> ComputeConstantValueTask
-  CONSTANT_VALUE -> EvaluateUnitConstantsTask
-  CONSTANT_VALUE -> VerifyUnitTask
-  CONSTANT_VALUE [shape=box]
-  CONTAINING_LIBRARIES -> DartErrorsTask
-  CONTAINING_LIBRARIES [shape=box]
-  CONTENT -> ScanDartTask
-  CONTENT [shape=box]
-  CREATED_RESOLVED_UNIT [shape=box]
-  CREATED_RESOLVED_UNIT1 [shape=box]
-  CREATED_RESOLVED_UNIT10 -> InferInstanceMembersInUnitTask
-  CREATED_RESOLVED_UNIT10 -> InferStaticVariableTypeTask
-  CREATED_RESOLVED_UNIT10 -> PartiallyResolveUnitReferencesTask
-  CREATED_RESOLVED_UNIT10 -> ResolveInstanceFieldsInUnitTask
-  CREATED_RESOLVED_UNIT10 -> ResolveUnitTask
-  CREATED_RESOLVED_UNIT10 [shape=box]
-  CREATED_RESOLVED_UNIT11 -> ResolveConstantExpressionTask
-  CREATED_RESOLVED_UNIT11 [shape=box]
-  CREATED_RESOLVED_UNIT12 [shape=box]
-  CREATED_RESOLVED_UNIT2 [shape=box]
-  CREATED_RESOLVED_UNIT3 [shape=box]
-  CREATED_RESOLVED_UNIT4 [shape=box]
-  CREATED_RESOLVED_UNIT5 [shape=box]
-  CREATED_RESOLVED_UNIT6 [shape=box]
-  CREATED_RESOLVED_UNIT7 [shape=box]
-  CREATED_RESOLVED_UNIT8 -> ResolveInstanceFieldsInUnitTask
-  CREATED_RESOLVED_UNIT8 [shape=box]
-  CREATED_RESOLVED_UNIT9 -> InferInstanceMembersInUnitTask
-  CREATED_RESOLVED_UNIT9 [shape=box]
-  ComputeConstantDependenciesTask -> CONSTANT_DEPENDENCIES
-  ComputeConstantValueTask -> CONSTANT_VALUE
-  ComputeInferableStaticVariableDependenciesTask -> INFERABLE_STATIC_VARIABLE_DEPENDENCIES
-  ComputeLibraryCycleTask -> LIBRARY_CYCLE
-  ComputeLibraryCycleTask -> LIBRARY_CYCLE_DEPENDENCIES
-  ComputeLibraryCycleTask -> LIBRARY_CYCLE_UNITS
-  ComputeRequiredConstantsTask -> PENDING_ERRORS
-  ComputeRequiredConstantsTask -> REQUIRED_CONSTANTS
-  ContainingLibrariesTask -> CONTAINING_LIBRARIES
-  DART_ERRORS -> LibraryErrorsReadyTask
-  DART_ERRORS [shape=box]
-  DART_SCRIPTS -> ScanDartTask
-  DART_SCRIPTS [shape=box]
-  DartErrorsTask -> DART_ERRORS
-  EXPLICITLY_IMPORTED_LIBRARIES [shape=box]
-  EXPORTED_LIBRARIES -> BuildDirectiveElementsTask
-  EXPORTED_LIBRARIES -> ReadyLibraryElement2Task
-  EXPORTED_LIBRARIES -> ReadyLibraryElement5Task
-  EXPORTED_LIBRARIES -> ReadyLibraryElement7Task
-  EXPORTED_LIBRARIES -> ResolveDirectiveElementsTask
-  EXPORTED_LIBRARIES -> ResolveTopLevelLibraryTypeBoundsTask
-  EXPORTED_LIBRARIES [shape=box]
-  EXPORT_SOURCE_CLOSURE -> BuildExportNamespaceTask
-  EXPORT_SOURCE_CLOSURE -> ResolveTopLevelUnitTypeBoundsTask
-  EXPORT_SOURCE_CLOSURE [shape=box]
-  EvaluateUnitConstantsTask -> CREATED_RESOLVED_UNIT12
-  EvaluateUnitConstantsTask -> RESOLVED_UNIT12
-  GatherUsedImportedElementsTask -> USED_IMPORTED_ELEMENTS
-  GatherUsedLocalElementsTask -> USED_LOCAL_ELEMENTS
-  GenerateHintsTask -> HINTS
-  GenerateLintsTask -> LINTS
-  HINTS -> LibraryUnitErrorsTask
-  HINTS [shape=box]
-  IGNORE_INFO -> DartErrorsTask
-  IGNORE_INFO [shape=box]
-  IMPORTED_LIBRARIES -> BuildDirectiveElementsTask
-  IMPORTED_LIBRARIES -> ReadyLibraryElement2Task
-  IMPORTED_LIBRARIES -> ReadyLibraryElement5Task
-  IMPORTED_LIBRARIES -> ReadyLibraryElement7Task
-  IMPORTED_LIBRARIES -> ResolveDirectiveElementsTask
-  IMPORTED_LIBRARIES -> ResolveTopLevelLibraryTypeBoundsTask
-  IMPORTED_LIBRARIES -> ResolveTopLevelUnitTypeBoundsTask
-  IMPORTED_LIBRARIES [shape=box]
-  INCLUDED_PARTS -> BuildLibraryElementTask
-  INCLUDED_PARTS [shape=box]
-  INFERABLE_STATIC_VARIABLES_IN_UNIT -> InferStaticVariableTypesInUnitTask
-  INFERABLE_STATIC_VARIABLES_IN_UNIT [shape=box]
-  INFERABLE_STATIC_VARIABLE_DEPENDENCIES -> InferStaticVariableTypeTask
-  INFERABLE_STATIC_VARIABLE_DEPENDENCIES [shape=box]
-  INFERRED_STATIC_VARIABLE -> InferStaticVariableTypeTask
-  INFERRED_STATIC_VARIABLE -> InferStaticVariableTypesInUnitTask
-  INFERRED_STATIC_VARIABLE [shape=box]
-  IS_LAUNCHABLE [shape=box]
-  InferInstanceMembersInUnitTask -> CREATED_RESOLVED_UNIT10
-  InferInstanceMembersInUnitTask -> RESOLVED_UNIT10
-  InferStaticVariableTypeTask -> INFERRED_STATIC_VARIABLE
-  InferStaticVariableTypeTask -> STATIC_VARIABLE_RESOLUTION_ERRORS
-  InferStaticVariableTypesInUnitTask -> CREATED_RESOLVED_UNIT8
-  InferStaticVariableTypesInUnitTask -> RESOLVED_UNIT8
-  InferStaticVariableTypesInUnitTask -> STATIC_VARIABLE_RESOLUTION_ERRORS_IN_UNIT
-  LIBRARY_CYCLE [shape=box]
-  LIBRARY_CYCLE_DEPENDENCIES -> InferInstanceMembersInUnitTask
-  LIBRARY_CYCLE_DEPENDENCIES -> InferStaticVariableTypeTask
-  LIBRARY_CYCLE_DEPENDENCIES -> PartiallyResolveUnitReferencesTask
-  LIBRARY_CYCLE_DEPENDENCIES -> ResolveInstanceFieldsInUnitTask
-  LIBRARY_CYCLE_DEPENDENCIES [shape=box]
-  LIBRARY_CYCLE_UNITS -> InferInstanceMembersInUnitTask
-  LIBRARY_CYCLE_UNITS -> ResolveInstanceFieldsInUnitTask
-  LIBRARY_CYCLE_UNITS -> ResolveUnitTask
-  LIBRARY_CYCLE_UNITS [shape=box]
-  LIBRARY_ELEMENT -> LibraryErrorsReadyTask
-  LIBRARY_ELEMENT [shape=box]
-  LIBRARY_ELEMENT1 -> BuildDirectiveElementsTask
-  LIBRARY_ELEMENT1 -> ResolveVariableReferencesTask
-  LIBRARY_ELEMENT1 [shape=box]
-  LIBRARY_ELEMENT2 -> BuildPublicNamespaceTask
-  LIBRARY_ELEMENT2 -> BuildSourceExportClosureTask
-  LIBRARY_ELEMENT2 -> ComputeLibraryCycleTask
-  LIBRARY_ELEMENT2 -> ReadyLibraryElement2Task
-  LIBRARY_ELEMENT2 -> ResolveDirectiveElementsTask
-  LIBRARY_ELEMENT2 [shape=box]
-  LIBRARY_ELEMENT3 -> BuildExportNamespaceTask
-  LIBRARY_ELEMENT3 -> BuildTypeProviderTask
-  LIBRARY_ELEMENT3 [shape=box]
-  LIBRARY_ELEMENT4 -> ResolveTopLevelLibraryTypeBoundsTask
-  LIBRARY_ELEMENT4 -> ResolveTopLevelUnitTypeBoundsTask
-  LIBRARY_ELEMENT4 [shape=box]
-  LIBRARY_ELEMENT5 -> ResolveLibraryTypeNamesTask
-  LIBRARY_ELEMENT5 -> ResolveTopLevelLibraryTypeBoundsTask
-  LIBRARY_ELEMENT5 -> ResolveUnitTypeNamesTask
-  LIBRARY_ELEMENT5 [shape=box]
-  LIBRARY_ELEMENT6 -> PartiallyResolveUnitReferencesTask
-  LIBRARY_ELEMENT6 -> ReadyLibraryElement5Task
-  LIBRARY_ELEMENT6 -> ResolveInstanceFieldsInUnitTask
-  LIBRARY_ELEMENT6 -> ResolvedUnit7InLibraryTask
-  LIBRARY_ELEMENT6 [shape=box]
-  LIBRARY_ELEMENT7 -> ReadyLibraryElement7Task
-  LIBRARY_ELEMENT7 -> ResolvedUnit7InLibraryClosureTask
-  LIBRARY_ELEMENT7 [shape=box]
-  LIBRARY_ELEMENT8 -> ResolveLibraryReferencesTask
-  LIBRARY_ELEMENT8 -> ResolveUnitTask
-  LIBRARY_ELEMENT8 [shape=box]
-  LIBRARY_ELEMENT9 -> EvaluateUnitConstantsTask
-  LIBRARY_ELEMENT9 -> ResolveLibraryTask
-  LIBRARY_ELEMENT9 [shape=box]
-  LIBRARY_ERRORS_READY [shape=box]
-  LIBRARY_SPECIFIC_UNITS -> GenerateHintsTask
-  LIBRARY_SPECIFIC_UNITS -> ReadyResolvedUnitTask
-  LIBRARY_SPECIFIC_UNITS -> ResolveLibraryReferencesTask
-  LIBRARY_SPECIFIC_UNITS -> ResolveLibraryTypeNamesTask
-  LIBRARY_SPECIFIC_UNITS -> ResolveTopLevelLibraryTypeBoundsTask
-  LIBRARY_SPECIFIC_UNITS -> ResolvedUnit7InLibraryTask
-  LIBRARY_SPECIFIC_UNITS [shape=box]
-  LIBRARY_UNIT_ERRORS -> dartErrorsForUnit
-  LIBRARY_UNIT_ERRORS [shape=box]
-  LINE_INFO -> BuildCompilationUnitElementTask
-  LINE_INFO -> DartErrorsTask
-  LINE_INFO -> ParseDartTask
-  LINE_INFO [shape=box]
-  LINTS -> LibraryUnitErrorsTask
-  LINTS [shape=box]
-  LibraryErrorsReadyTask -> LIBRARY_ERRORS_READY
-  LibraryUnitErrorsTask -> LIBRARY_UNIT_ERRORS
-  MODIFICATION_TIME -> BuildDirectiveElementsTask
-  MODIFICATION_TIME -> BuildLibraryElementTask
-  MODIFICATION_TIME -> ParseDartTask
-  MODIFICATION_TIME -> ResolveDirectiveElementsTask
-  MODIFICATION_TIME -> ScanDartTask
-  MODIFICATION_TIME -> VerifyUnitTask
-  MODIFICATION_TIME [shape=box]
-  PARSED_UNIT -> BuildCompilationUnitElementTask
-  PARSED_UNIT [shape=box]
-  PARSE_ERRORS -> dartErrorsForSource
-  PARSE_ERRORS [shape=box]
-  PENDING_ERRORS -> VerifyUnitTask
-  PENDING_ERRORS [shape=box]
-  ParseDartTask -> EXPLICITLY_IMPORTED_LIBRARIES
-  ParseDartTask -> EXPORTED_LIBRARIES
-  ParseDartTask -> IMPORTED_LIBRARIES
-  ParseDartTask -> INCLUDED_PARTS
-  ParseDartTask -> LIBRARY_SPECIFIC_UNITS
-  ParseDartTask -> PARSED_UNIT
-  ParseDartTask -> PARSE_ERRORS
-  ParseDartTask -> REFERENCED_SOURCES
-  ParseDartTask -> SOURCE_KIND
-  ParseDartTask -> UNITS
-  PartiallyResolveUnitReferencesTask -> CREATED_RESOLVED_UNIT7
-  PartiallyResolveUnitReferencesTask -> INFERABLE_STATIC_VARIABLES_IN_UNIT
-  PartiallyResolveUnitReferencesTask -> RESOLVED_UNIT7
-  READY_LIBRARY_ELEMENT2 -> ComputeLibraryCycleTask
-  READY_LIBRARY_ELEMENT2 -> ReadyLibraryElement2Task
-  READY_LIBRARY_ELEMENT2 [shape=box]
-  READY_LIBRARY_ELEMENT6 -> PartiallyResolveUnitReferencesTask
-  READY_LIBRARY_ELEMENT6 -> ReadyLibraryElement5Task
-  READY_LIBRARY_ELEMENT6 [shape=box]
-  READY_LIBRARY_ELEMENT7 -> ReadyLibraryElement7Task
-  READY_LIBRARY_ELEMENT7 -> ResolvedUnit7InLibraryClosureTask
-  READY_LIBRARY_ELEMENT7 [shape=box]
-  READY_RESOLVED_UNIT -> ResolveLibraryTask
-  READY_RESOLVED_UNIT -> VerifyUnitTask
-  READY_RESOLVED_UNIT [shape=box]
-  REFERENCED_SOURCES -> BuildDirectiveElementsTask
-  REFERENCED_SOURCES -> ResolveDirectiveElementsTask
-  REFERENCED_SOURCES -> VerifyUnitTask
-  REFERENCED_SOURCES [shape=box]
-  REQUIRED_CONSTANTS -> VerifyUnitTask
-  REQUIRED_CONSTANTS [shape=box]
-  RESOLVED_UNIT -> ComputeRequiredConstantsTask
-  RESOLVED_UNIT -> GenerateHintsTask
-  RESOLVED_UNIT -> GenerateLintsTask
-  RESOLVED_UNIT -> ReadyResolvedUnitTask
-  RESOLVED_UNIT -> VerifyUnitTask
-  RESOLVED_UNIT [shape=box]
-  RESOLVED_UNIT1 -> BuildDirectiveElementsTask
-  RESOLVED_UNIT1 -> BuildLibraryElementTask
-  RESOLVED_UNIT1 -> ResolveDirectiveElementsTask
-  RESOLVED_UNIT1 [shape=box]
-  RESOLVED_UNIT10 -> ResolveUnitTask
-  RESOLVED_UNIT10 [shape=box]
-  RESOLVED_UNIT11 -> EvaluateUnitConstantsTask
-  RESOLVED_UNIT11 -> GatherUsedImportedElementsTask
-  RESOLVED_UNIT11 -> GatherUsedLocalElementsTask
-  RESOLVED_UNIT11 -> ResolveLibraryReferencesTask
-  RESOLVED_UNIT11 [shape=box]
-  RESOLVED_UNIT12 -> StrongModeVerifyUnitTask
-  RESOLVED_UNIT12 [shape=box]
-  RESOLVED_UNIT2 -> BuildEnumMemberElementsTask
-  RESOLVED_UNIT2 [shape=box]
-  RESOLVED_UNIT3 -> ResolveTopLevelUnitTypeBoundsTask
-  RESOLVED_UNIT3 [shape=box]
-  RESOLVED_UNIT4 -> ResolveTopLevelLibraryTypeBoundsTask
-  RESOLVED_UNIT4 -> ResolveUnitTypeNamesTask
-  RESOLVED_UNIT4 [shape=box]
-  RESOLVED_UNIT5 -> ResolveLibraryTypeNamesTask
-  RESOLVED_UNIT5 -> ResolveVariableReferencesTask
-  RESOLVED_UNIT5 [shape=box]
-  RESOLVED_UNIT6 -> PartiallyResolveUnitReferencesTask
-  RESOLVED_UNIT6 [shape=box]
-  RESOLVED_UNIT7 -> ComputeInferableStaticVariableDependenciesTask
-  RESOLVED_UNIT7 -> InferStaticVariableTypeTask
-  RESOLVED_UNIT7 -> InferStaticVariableTypesInUnitTask
-  RESOLVED_UNIT7 -> ResolvedUnit7InLibraryTask
-  RESOLVED_UNIT7 [shape=box]
-  RESOLVED_UNIT8 -> ResolveInstanceFieldsInUnitTask
-  RESOLVED_UNIT8 [shape=box]
-  RESOLVED_UNIT9 -> InferInstanceMembersInUnitTask
-  RESOLVED_UNIT9 [shape=box]
-  RESOLVE_DIRECTIVES_ERRORS -> LibraryUnitErrorsTask
-  RESOLVE_DIRECTIVES_ERRORS [shape=box]
-  RESOLVE_TYPE_BOUNDS_ERRORS -> LibraryUnitErrorsTask
-  RESOLVE_TYPE_BOUNDS_ERRORS [shape=box]
-  RESOLVE_TYPE_NAMES_ERRORS -> LibraryUnitErrorsTask
-  RESOLVE_TYPE_NAMES_ERRORS [shape=box]
-  RESOLVE_UNIT_ERRORS -> LibraryUnitErrorsTask
-  RESOLVE_UNIT_ERRORS [shape=box]
-  ReadyLibraryElement2Task -> READY_LIBRARY_ELEMENT2
-  ReadyLibraryElement5Task -> READY_LIBRARY_ELEMENT6
-  ReadyLibraryElement7Task -> READY_LIBRARY_ELEMENT7
-  ReadyResolvedUnitTask -> READY_RESOLVED_UNIT
-  ResolveConstantExpressionTask -> CONSTANT_EXPRESSION_RESOLVED
-  ResolveDirectiveElementsTask -> CREATED_RESOLVED_UNIT2
-  ResolveDirectiveElementsTask -> RESOLVED_UNIT2
-  ResolveDirectiveElementsTask -> RESOLVE_DIRECTIVES_ERRORS
-  ResolveInstanceFieldsInUnitTask -> CREATED_RESOLVED_UNIT9
-  ResolveInstanceFieldsInUnitTask -> RESOLVED_UNIT9
-  ResolveLibraryReferencesTask -> LIBRARY_ELEMENT9
-  ResolveLibraryTask -> LIBRARY_ELEMENT
-  ResolveLibraryTypeNamesTask -> LIBRARY_ELEMENT6
-  ResolveTopLevelLibraryTypeBoundsTask -> LIBRARY_ELEMENT5
-  ResolveTopLevelUnitTypeBoundsTask -> CREATED_RESOLVED_UNIT4
-  ResolveTopLevelUnitTypeBoundsTask -> RESOLVED_UNIT4
-  ResolveTopLevelUnitTypeBoundsTask -> RESOLVE_TYPE_BOUNDS_ERRORS
-  ResolveUnitTask -> CONSTANT_EXPRESSIONS_DEPENDENCIES
-  ResolveUnitTask -> CREATED_RESOLVED_UNIT11
-  ResolveUnitTask -> RESOLVED_UNIT11
-  ResolveUnitTask -> RESOLVE_UNIT_ERRORS
-  ResolveUnitTypeNamesTask -> CREATED_RESOLVED_UNIT5
-  ResolveUnitTypeNamesTask -> RESOLVED_UNIT5
-  ResolveUnitTypeNamesTask -> RESOLVE_TYPE_NAMES_ERRORS
-  ResolveVariableReferencesTask -> CREATED_RESOLVED_UNIT6
-  ResolveVariableReferencesTask -> RESOLVED_UNIT6
-  ResolveVariableReferencesTask -> VARIABLE_REFERENCE_ERRORS
-  ResolvedUnit7InLibraryClosureTask -> LIBRARY_ELEMENT8
-  ResolvedUnit7InLibraryTask -> LIBRARY_ELEMENT7
-  SCAN_ERRORS -> dartErrorsForSource
-  SCAN_ERRORS [shape=box]
-  SOURCE_KIND -> BuildDirectiveElementsTask
-  SOURCE_KIND -> ResolveDirectiveElementsTask
-  SOURCE_KIND [shape=box]
-  STATIC_VARIABLE_RESOLUTION_ERRORS -> InferStaticVariableTypesInUnitTask
-  STATIC_VARIABLE_RESOLUTION_ERRORS [shape=box]
-  STATIC_VARIABLE_RESOLUTION_ERRORS_IN_UNIT -> LibraryUnitErrorsTask
-  STATIC_VARIABLE_RESOLUTION_ERRORS_IN_UNIT [shape=box]
-  STRONG_MODE_ERRORS -> LibraryUnitErrorsTask
-  STRONG_MODE_ERRORS [shape=box]
-  ScanDartTask -> IGNORE_INFO
-  ScanDartTask -> LINE_INFO
-  ScanDartTask -> SCAN_ERRORS
-  ScanDartTask -> TOKEN_STREAM
-  StrongModeVerifyUnitTask -> CREATED_RESOLVED_UNIT
-  StrongModeVerifyUnitTask -> RESOLVED_UNIT
-  StrongModeVerifyUnitTask -> STRONG_MODE_ERRORS
-  TOKEN_STREAM -> ParseDartTask
-  TOKEN_STREAM [shape=box]
-  TYPE_PROVIDER -> BuildEnumMemberElementsTask
-  TYPE_PROVIDER -> ComputeConstantDependenciesTask
-  TYPE_PROVIDER -> ComputeConstantValueTask
-  TYPE_PROVIDER -> GenerateHintsTask
-  TYPE_PROVIDER -> InferInstanceMembersInUnitTask
-  TYPE_PROVIDER -> InferStaticVariableTypeTask
-  TYPE_PROVIDER -> PartiallyResolveUnitReferencesTask
-  TYPE_PROVIDER -> ResolveInstanceFieldsInUnitTask
-  TYPE_PROVIDER -> ResolveLibraryTypeNamesTask
-  TYPE_PROVIDER -> ResolveUnitTask
-  TYPE_PROVIDER -> ResolveUnitTypeNamesTask
-  TYPE_PROVIDER -> ResolveVariableReferencesTask
-  TYPE_PROVIDER -> StrongModeVerifyUnitTask
-  TYPE_PROVIDER -> VerifyUnitTask
-  TYPE_PROVIDER [shape=box]
-  UNITS -> LibraryErrorsReadyTask
-  UNITS [shape=box]
-  USED_IMPORTED_ELEMENTS -> GenerateHintsTask
-  USED_IMPORTED_ELEMENTS [shape=box]
-  USED_LOCAL_ELEMENTS -> GenerateHintsTask
-  USED_LOCAL_ELEMENTS [shape=box]
-  VARIABLE_REFERENCE_ERRORS -> LibraryUnitErrorsTask
-  VARIABLE_REFERENCE_ERRORS [shape=box]
-  VERIFY_ERRORS -> LibraryUnitErrorsTask
-  VERIFY_ERRORS [shape=box]
-  VerifyUnitTask -> VERIFY_ERRORS
-  dartErrorsForSource -> DartErrorsTask
-  dartErrorsForSource [shape=hexagon]
-  dartErrorsForUnit -> DartErrorsTask
-  dartErrorsForUnit [shape=hexagon]
-}
-</script>
-</body>
-</html>
diff --git a/pkg/analyzer/doc/tutorial/ast.md b/pkg/analyzer/doc/tutorial/ast.md
index 843728b..fd41d31 100644
--- a/pkg/analyzer/doc/tutorial/ast.md
+++ b/pkg/analyzer/doc/tutorial/ast.md
@@ -131,7 +131,7 @@
 ask an AST node to accept a visitor, it will invoke the corresponding method on
 the visitor interface.
 
-If you want to define a visitor, you'll probably want to subclass one of the
+If you want to define a visitor, you would create a subclass of one of the
 concrete implementations of `AstVisitor`. The concrete subclasses are defined in
 `package:analyzer/dart/ast/visitor.dart`. A couple of the most useful include
 - `SimpleAstVisitor` which implements every visit method by doing nothing,
@@ -140,18 +140,12 @@
 - `GeneralizingAstVisitor` which makes it easy to visit general kinds of nodes,
   such as visiting any statement, or any expression.
 
-The one time you might want to implement `AstVisitor` rather than to extend one
-of the concrete subclasses is if it's critical that you implement _every_ visit
-method. The downside of doing this is that every time the AST structure is
-updated because of an enhancement to the language, your code will need to be
-updated to implement the newly added visit methods.
-
 As an example, let's assume you want to write some code to count the number of
 `if` statements in a given structure. You need to visit every node, because you
 can't know ahead of time where the `if` statements will be located, but there is
 one specific class of node that you need to visit, so you don't need to handle
-the general "groups" of nodes, so you'd want to create a subclass of
-`RecursiveAstVisitor`.
+the general "groups" of nodes. The best approach for this example is to create a
+subclass of `RecursiveAstVisitor`.
 
 ```dart
 class IfCounter extends RecursiveAstVisitor<void> {
diff --git a/pkg/analyzer/lib/analyzer.dart b/pkg/analyzer/lib/analyzer.dart
index 3516414..3806ad9 100644
--- a/pkg/analyzer/lib/analyzer.dart
+++ b/pkg/analyzer/lib/analyzer.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2013, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/context/context_root.dart b/pkg/analyzer/lib/context/context_root.dart
index 7625503..df4a4b4 100644
--- a/pkg/analyzer/lib/context/context_root.dart
+++ b/pkg/analyzer/lib/context/context_root.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/context/declared_variables.dart b/pkg/analyzer/lib/context/declared_variables.dart
index c0d7fdf..74dc187 100644
--- a/pkg/analyzer/lib/context/declared_variables.dart
+++ b/pkg/analyzer/lib/context/declared_variables.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/dart/analysis/analysis_context.dart b/pkg/analyzer/lib/dart/analysis/analysis_context.dart
index e24bfc8..6c3728f 100644
--- a/pkg/analyzer/lib/dart/analysis/analysis_context.dart
+++ b/pkg/analyzer/lib/dart/analysis/analysis_context.dart
@@ -1,77 +1,65 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
 import 'package:analyzer/dart/analysis/context_root.dart';
 import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/src/generated/engine.dart' hide AnalysisResult;
 
-/**
- * A representation of a body of code and the context in which the code is to be
- * analyzed.
- *
- * The body of code is represented as a collection of files and directories, as
- * defined by the list of included paths. If the list of included paths
- * contains one or more directories, then zero or more files or directories
- * within the included directories can be excluded from analysis, as defined by
- * the list of excluded paths.
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// A representation of a body of code and the context in which the code is to
+/// be analyzed.
+///
+/// The body of code is represented as a collection of files and directories, as
+/// defined by the list of included paths. If the list of included paths
+/// contains one or more directories, then zero or more files or directories
+/// within the included directories can be excluded from analysis, as defined by
+/// the list of excluded paths.
+///
+/// Clients may not extend, implement or mix-in this class.
 abstract class AnalysisContext {
-  /**
-   * The analysis options used to control the way the code is analyzed.
-   */
+  /// The analysis options used to control the way the code is analyzed.
   AnalysisOptions get analysisOptions;
 
-  /**
-   * Return the context root from which this context was created.
-   */
+  /// Return the context root from which this context was created.
   ContextRoot get contextRoot;
 
-  /**
-   * Return the currently active analysis session.
-   */
+  /// Return the currently active analysis session.
   AnalysisSession get currentSession;
 
-  /**
-   * A list of the absolute, normalized paths of files and directories that
-   * will not be analyzed.
-   *
-   * Deprecated: Use `contextRoot.excludedPaths`.
-   */
+  /// A list of the absolute, normalized paths of files and directories that
+  /// will not be analyzed.
+  ///
+  /// Deprecated: Use `contextRoot.excludedPaths`.
   @deprecated
   List<String> get excludedPaths;
 
-  /**
-   * A list of the absolute, normalized paths of files and directories that
-   * will be analyzed. If a path in the list represents a file, then that file
-   * will be analyzed, even if it is in the list of [excludedPaths]. If path in
-   * the list represents a directory, then all of the files contained in that
-   * directory, either directly or indirectly, and that are not explicitly
-   * excluded by the list of [excludedPaths] will be analyzed.
-   *
-   * Deprecated: Use `contextRoot.includedPaths`.
-   */
+  /// A list of the absolute, normalized paths of files and directories that
+  /// will be analyzed. If a path in the list represents a file, then that file
+  /// will be analyzed, even if it is in the list of [excludedPaths]. If path in
+  /// the list represents a directory, then all of the files contained in that
+  /// directory, either directly or indirectly, and that are not explicitly
+  /// excluded by the list of [excludedPaths] will be analyzed.
+  ///
+  /// Deprecated: Use `contextRoot.includedPaths`.
   @deprecated
   List<String> get includedPaths;
 
-  /**
-   * Return the absolute, normalized paths of all of the files that are
-   * contained in this context. These are all of the files that are included
-   * directly or indirectly by one or more of the [includedPaths] and that are
-   * not excluded by any of the [excludedPaths].
-   *
-   * Deprecated: Use `contextRoot.analyzedFiles`.
-   */
+  /// Return the absolute, normalized paths of all of the files that are
+  /// contained in this context. These are all of the files that are included
+  /// directly or indirectly by one or more of the [includedPaths] and that are
+  /// not excluded by any of the [excludedPaths].
+  ///
+  /// Deprecated: Use `contextRoot.analyzedFiles`.
   @deprecated
   Iterable<String> analyzedFiles();
 
-  /**
-   * Return `true` if the file or directory with the given [path] will be
-   * analyzed in this context. A file (or directory) will be analyzed if it is
-   * either the same as or contained in one of the [includedPaths] and, if it is
-   * is contained in one of the [includedPaths], is not the same as or contained
-   * in one of the [excludedPaths].
-   *
-   * Deprecated: Use `contextRoot.isAnalyzed`.
-   */
+  /// Return `true` if the file or directory with the given [path] will be
+  /// analyzed in this context. A file (or directory) will be analyzed if it is
+  /// either the same as or contained in one of the [includedPaths] and, if it
+  /// is contained in one of the [includedPaths], is not the same as or
+  /// contained in one of the [excludedPaths].
+  ///
+  /// Deprecated: Use `contextRoot.isAnalyzed`.
   @deprecated
   bool isAnalyzed(String path);
 }
diff --git a/pkg/analyzer/lib/dart/analysis/context_builder.dart b/pkg/analyzer/lib/dart/analysis/context_builder.dart
index f99dce5..08cbd34 100644
--- a/pkg/analyzer/lib/dart/analysis/context_builder.dart
+++ b/pkg/analyzer/lib/dart/analysis/context_builder.dart
@@ -9,39 +9,33 @@
 import 'package:analyzer/src/dart/analysis/context_builder.dart';
 import 'package:meta/meta.dart';
 
-/**
- * A utility class used to build an analysis context based on a context root.
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// A utility class used to build an analysis context based on a context root.
+///
+/// Clients may not extend, implement or mix-in this class.
 abstract class ContextBuilder {
-  /**
-   * Initialize a newly created context builder. If a [resourceProvider] is
-   * given, then it will be used to access the file system, otherwise the
-   * default resource provider will be used.
-   */
+  /// Initialize a newly created context builder. If a [resourceProvider] is
+  /// given, then it will be used to access the file system, otherwise the
+  /// default resource provider will be used.
   factory ContextBuilder({ResourceProvider resourceProvider}) =
       ContextBuilderImpl;
 
-  /**
-   * Return an analysis context corresponding to the given [contextRoot].
-   *
-   * If a set of [declaredVariables] is provided, the values will be used to map
-   * the the variable names found in `fromEnvironment` invocations to the
-   * constant value that will be returned. If none is given, then no variables
-   * will be defined.
-   * 
-   * If a list of [librarySummaryPaths] is provided, then the summary files at
-   * those paths will be used, when possible, when analyzing the libraries
-   * contained in the summary files.
-   *
-   * If an [sdkPath] is provided, and if it is a valid path to a directory
-   * containing a valid SDK, then the SDK in the referenced directory will be
-   * used when analyzing the code in the context.
-   * 
-   * If an [sdkSummaryPath] is provided, then that file will be used as the
-   * summary file for the SDK.
-   */
+  /// Return an analysis context corresponding to the given [contextRoot].
+  ///
+  /// If a set of [declaredVariables] is provided, the values will be used to
+  /// map the the variable names found in `fromEnvironment` invocations to the
+  /// constant value that will be returned. If none is given, then no variables
+  /// will be defined.
+  ///
+  /// If a list of [librarySummaryPaths] is provided, then the summary files at
+  /// those paths will be used, when possible, when analyzing the libraries
+  /// contained in the summary files.
+  ///
+  /// If an [sdkPath] is provided, and if it is a valid path to a directory
+  /// containing a valid SDK, then the SDK in the referenced directory will be
+  /// used when analyzing the code in the context.
+  ///
+  /// If an [sdkSummaryPath] is provided, then that file will be used as the
+  /// summary file for the SDK.
   AnalysisContext createContext(
       {@required ContextRoot contextRoot,
       DeclaredVariables declaredVariables,
diff --git a/pkg/analyzer/lib/dart/analysis/context_locator.dart b/pkg/analyzer/lib/dart/analysis/context_locator.dart
index ce4d07a..d2c4cd3 100644
--- a/pkg/analyzer/lib/dart/analysis/context_locator.dart
+++ b/pkg/analyzer/lib/dart/analysis/context_locator.dart
@@ -8,39 +8,33 @@
 import 'package:analyzer/src/dart/analysis/context_locator.dart';
 import 'package:meta/meta.dart';
 
-/**
- * Determines the list of analysis contexts that can be used to analyze the
- * files and folders that should be analyzed given a list of included files and
- * folders and a list of excluded files and folders.
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// Determines the list of analysis contexts that can be used to analyze the
+/// files and folders that should be analyzed given a list of included files and
+/// folders and a list of excluded files and folders.
+///
+/// Clients may not extend, implement or mix-in this class.
 abstract class ContextLocator {
-  /**
-   * Initialize a newly created context locator. If a [resourceProvider] is
-   * supplied, it will be used to access the file system. Otherwise the default
-   * resource provider will be used.
-   */
+  /// Initialize a newly created context locator. If a [resourceProvider] is
+  /// supplied, it will be used to access the file system. Otherwise the default
+  /// resource provider will be used.
   factory ContextLocator({ResourceProvider resourceProvider}) =
       ContextLocatorImpl;
 
-  /**
-   * Return a list of the analysis contexts that should be used to analyze the
-   * files that are included by the list of [includedPaths] and not excluded by
-   * the list of [excludedPaths].
-   *
-   * If an [optionsFile] is specified, then it is assumed to be the path to the
-   * `analysis_options.yaml` (or `.analysis_options`) file that should be used
-   * in place of the ones that would be found by looking in the directories
-   * containing the context roots.
-   *
-   * If a [packagesFile] is specified, then it is assumed to be the path to the
-   * `.packages` file that should be used in place of the one that would be
-   * found by looking in the directories containing the context roots.
-   *
-   * If the [sdkPath] is specified, then it is used as the path to the root of
-   * the SDK that should be used during analysis.
-   */
+  /// Return a list of the analysis contexts that should be used to analyze the
+  /// files that are included by the list of [includedPaths] and not excluded by
+  /// the list of [excludedPaths].
+  ///
+  /// If an [optionsFile] is specified, then it is assumed to be the path to the
+  /// `analysis_options.yaml` (or `.analysis_options`) file that should be used
+  /// in place of the ones that would be found by looking in the directories
+  /// containing the context roots.
+  ///
+  /// If a [packagesFile] is specified, then it is assumed to be the path to the
+  /// `.packages` file that should be used in place of the one that would be
+  /// found by looking in the directories containing the context roots.
+  ///
+  /// If the [sdkPath] is specified, then it is used as the path to the root of
+  /// the SDK that should be used during analysis.
   @deprecated
   List<AnalysisContext> locateContexts(
       {@required List<String> includedPaths,
@@ -49,20 +43,18 @@
       String packagesFile: null,
       String sdkPath: null});
 
-  /**
-   * Return a list of the context roots that should be used to analyze the files
-   * that are included by the list of [includedPaths] and not excluded by the
-   * list of [excludedPaths].
-   *
-   * If an [optionsFile] is specified, then it is assumed to be the path to the
-   * `analysis_options.yaml` (or `.analysis_options`) file that should be used
-   * in place of the ones that would be found by looking in the directories
-   * containing the context roots.
-   *
-   * If a [packagesFile] is specified, then it is assumed to be the path to the
-   * `.packages` file that should be used in place of the one that would be
-   * found by looking in the directories containing the context roots.
-   */
+  /// Return a list of the context roots that should be used to analyze the
+  /// files that are included by the list of [includedPaths] and not excluded by
+  /// the list of [excludedPaths].
+  ///
+  /// If an [optionsFile] is specified, then it is assumed to be the path to the
+  /// `analysis_options.yaml` (or `.analysis_options`) file that should be used
+  /// in place of the ones that would be found by looking in the directories
+  /// containing the context roots.
+  ///
+  /// If a [packagesFile] is specified, then it is assumed to be the path to the
+  /// `.packages` file that should be used in place of the one that would be
+  /// found by looking in the directories containing the context roots.
   List<ContextRoot> locateRoots(
       {@required List<String> includedPaths,
       List<String> excludedPaths: null,
diff --git a/pkg/analyzer/lib/dart/analysis/context_root.dart b/pkg/analyzer/lib/dart/analysis/context_root.dart
index a8998fe..ccb15b5 100644
--- a/pkg/analyzer/lib/dart/analysis/context_root.dart
+++ b/pkg/analyzer/lib/dart/analysis/context_root.dart
@@ -4,79 +4,58 @@
 
 import 'package:analyzer/file_system/file_system.dart';
 
-/**
- * Information about the root directory associated with an analysis context.
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// Information about the root directory associated with an analysis context.
+///
+/// Clients may not extend, implement or mix-in this class.
 abstract class ContextRoot {
-  /**
-   * A list of the files and directories within the root directory that should
-   * not be analyzed.
-   */
+  /// A list of the files and directories within the root directory that should
+  /// not be analyzed.
   List<Resource> get excluded;
 
-  /**
-   * A collection of the absolute, normalized paths of files and directories
-   * within the root directory that should not be analyzed.
-   */
+  /// A collection of the absolute, normalized paths of files and directories
+  /// within the root directory that should not be analyzed.
   Iterable<String> get excludedPaths;
 
-  /**
-   * A list of the files and directories within the root directory that should
-   * be analyzed. If all of the files in the root directory (other than those
-   * that are explicitly excluded) should be analyzed, then this list will
-   * contain the root directory.
-   */
+  /// A list of the files and directories within the root directory that should
+  /// be analyzed. If all of the files in the root directory (other than those
+  /// that are explicitly excluded) should be analyzed, then this list will
+  /// contain the root directory.
   List<Resource> get included;
 
-  /**
-   * A collection of the absolute, normalized paths of files within the root
-   * directory that should be analyzed. If all of the files in the root
-   * directory (other than those that are explicitly excluded) should be
-   * analyzed, then this collection will contain the path of the root directory.
-   */
+  /// A collection of the absolute, normalized paths of files within the root
+  /// directory that should be analyzed. If all of the files in the root
+  /// directory (other than those that are explicitly excluded) should be
+  /// analyzed, then this collection will contain the path of the root
+  /// directory.
   Iterable<String> get includedPaths;
 
-  /**
-   * The analysis options file that should be used when analyzing the files
-   * within this context root, or `null` if there is no options file.
-   */
+  /// The analysis options file that should be used when analyzing the files
+  /// within this context root, or `null` if there is no options file.
   File get optionsFile;
 
-  /**
-   * The packages file that should be used when analyzing the files within this
-   * context root, or `null` if there is no options file.
-   */
+  /// The packages file that should be used when analyzing the files within this
+  /// context root, or `null` if there is no options file.
   File get packagesFile;
 
-  /**
-   * The resource provider used to access the file system.
-   */
+  /// The resource provider used to access the file system.
   ResourceProvider get resourceProvider;
 
-  /**
-   * The root directory containing the files to be analyzed.
-   */
+  /// The root directory containing the files to be analyzed.
   Folder get root;
 
-  /**
-   * Return the absolute, normalized paths of all of the files that are
-   * contained in this context. These are all of the files that are included
-   * directly or indirectly by one or more of the [includedPaths] and that are
-   * not excluded by any of the [excludedPaths].
-   *
-   * Note that the list is not filtered based on the file suffix, so non-Dart
-   * files can be returned.
-   */
+  /// Return the absolute, normalized paths of all of the files that are
+  /// contained in this context. These are all of the files that are included
+  /// directly or indirectly by one or more of the [includedPaths] and that are
+  /// not excluded by any of the [excludedPaths].
+  ///
+  /// Note that the list is not filtered based on the file suffix, so non-Dart
+  /// files can be returned.
   Iterable<String> analyzedFiles();
 
-  /**
-   * Return `true` if the file or directory with the given [path] will be
-   * analyzed in this context. A file (or directory) will be analyzed if it is
-   * either the same as or contained in one of the [includedPaths] and, if it is
-   * contained in one of the [includedPaths], is not the same as or contained
-   * in one of the [excludedPaths].
-   */
+  /// Return `true` if the file or directory with the given [path] will be
+  /// analyzed in this context. A file (or directory) will be analyzed if it is
+  /// either the same as or contained in one of the [includedPaths] and, if it
+  /// is contained in one of the [includedPaths], is not the same as or
+  /// contained in one of the [excludedPaths].
   bool isAnalyzed(String path);
 }
diff --git a/pkg/analyzer/lib/dart/analysis/declared_variables.dart b/pkg/analyzer/lib/dart/analysis/declared_variables.dart
index a517582..bcd0d74 100644
--- a/pkg/analyzer/lib/dart/analysis/declared_variables.dart
+++ b/pkg/analyzer/lib/dart/analysis/declared_variables.dart
@@ -6,67 +6,49 @@
 import 'package:analyzer/src/dart/constant/value.dart';
 import 'package:analyzer/src/generated/resolver.dart' show TypeProvider;
 
-/**
- * An object used to provide access to the values of variables that have been
- * defined on the command line using the `-D` option.
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// An object used to provide access to the values of variables that have been
+/// defined on the command line using the `-D` option.
+///
+/// Clients may not extend, implement or mix-in this class.
 class DeclaredVariables {
-  /**
-   * A table mapping the names of declared variables to their values.
-   */
+  /// A table mapping the names of declared variables to their values.
   Map<String, String> _declaredVariables = <String, String>{};
 
-  /**
-   * Initialize a newly created set of declared variables in which there are no
-   * variables.
-   */
+  /// Initialize a newly created set of declared variables in which there are no
+  /// variables.
   DeclaredVariables();
 
-  /**
-   * Initialize a newly created set of declared variables to define variables
-   * whose names are the keys in the give [variableMap] and whose values are the
-   * corresponding values from the map.
-   */
+  /// Initialize a newly created set of declared variables to define variables
+  /// whose names are the keys in the give [variableMap] and whose values are
+  /// the corresponding values from the map.
   DeclaredVariables.fromMap(Map<String, String> variableMap) {
     _declaredVariables.addAll(variableMap);
   }
 
-  /**
-   * Return the names of the variables for which a value has been defined.
-   */
+  /// Return the names of the variables for which a value has been defined.
   Iterable<String> get variableNames => _declaredVariables.keys;
 
-  /**
-   * Add all variables of [other] to this object.
-   */
+  /// Add all variables of [other] to this object.
   @deprecated
   void addAll(DeclaredVariables other) {
     _declaredVariables.addAll(other._declaredVariables);
   }
 
-  /**
-   * Define a variable with the given [name] to have the given [value].
-   */
+  /// Define a variable with the given [name] to have the given [value].
   @deprecated
   void define(String name, String value) {
     _declaredVariables[name] = value;
   }
 
-  /**
-   * Return the raw string value of the variable with the given [name],
-   * or `null` of the variable is not defined.
-   */
+  /// Return the raw string value of the variable with the given [name],
+  /// or `null` of the variable is not defined.
   String get(String name) => _declaredVariables[name];
 
-  /**
-   * Return the value of the variable with the given [name] interpreted as a
-   * 'boolean' value. If the variable is not defined (or [name] is `null`), a
-   * DartObject representing "unknown" is returned. If the value cannot be
-   * parsed as a boolean, a DartObject representing 'null' is returned. The
-   * [typeProvider] is the type provider used to find the type 'bool'.
-   */
+  /// Return the value of the variable with the given [name] interpreted as a
+  /// 'boolean' value. If the variable is not defined (or [name] is `null`), a
+  /// DartObject representing "unknown" is returned. If the value cannot be
+  /// parsed as a boolean, a DartObject representing 'null' is returned. The
+  /// [typeProvider] is the type provider used to find the type 'bool'.
   DartObject getBool(TypeProvider typeProvider, String name) {
     String value = _declaredVariables[name];
     if (value == null) {
@@ -80,12 +62,10 @@
     return new DartObjectImpl(typeProvider.nullType, NullState.NULL_STATE);
   }
 
-  /**
-   * Return the value of the variable with the given [name] interpreted as an
-   * integer value. If the variable is not defined (or [name] is `null`), a
-   * DartObject representing "unknown" is returned. If the value cannot be
-   * parsed as an integer, a DartObject representing 'null' is returned.
-   */
+  /// Return the value of the variable with the given [name] interpreted as an
+  /// integer value. If the variable is not defined (or [name] is `null`), a
+  /// DartObject representing "unknown" is returned. If the value cannot be
+  /// parsed as an integer, a DartObject representing 'null' is returned.
   DartObject getInt(TypeProvider typeProvider, String name) {
     String value = _declaredVariables[name];
     if (value == null) {
@@ -100,14 +80,12 @@
     return new DartObjectImpl(typeProvider.intType, new IntState(bigInteger));
   }
 
-  /**
-   * Return the value of the variable with the given [name] interpreted as a
-   * String value, or `null` if the variable is not defined. Return the value of
-   * the variable with the given name interpreted as a String value. If the
-   * variable is not defined (or [name] is `null`), a DartObject representing
-   * "unknown" is returned. The [typeProvider] is the type provider used to find
-   * the type 'String'.
-   */
+  /// Return the value of the variable with the given [name] interpreted as a
+  /// String value, or `null` if the variable is not defined. Return the value
+  /// of the variable with the given name interpreted as a String value. If the
+  /// variable is not defined (or [name] is `null`), a DartObject representing
+  /// "unknown" is returned. The [typeProvider] is the type provider used to
+  /// find the type 'String'.
   DartObject getString(TypeProvider typeProvider, String name) {
     String value = _declaredVariables[name];
     if (value == null) {
diff --git a/pkg/analyzer/lib/dart/analysis/uri_converter.dart b/pkg/analyzer/lib/dart/analysis/uri_converter.dart
index ec1ed8d..a93d045 100644
--- a/pkg/analyzer/lib/dart/analysis/uri_converter.dart
+++ b/pkg/analyzer/lib/dart/analysis/uri_converter.dart
@@ -2,29 +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.
 
-/**
- * A utility class used to convert between URIs and absolute file paths.
- */
+/// A utility class used to convert between URIs and absolute file paths.
 abstract class UriConverter {
-  /**
-   * Return the URI that should be used to reference the file at the absolute
-   * [path], or `null` if there is no valid way to reference the file in this
-   * converter’s context. The file at that path is not required to exist.
-   *
-   * If a [containingPath] is provided and both the [path] and [containingPath]
-   * are within the root of this converter’s context, then the returned URI will
-   * be a relative path. Otherwise, the returned URI will be an absolute URI.
-   *
-   * Throws an `ArgumentError` if the [path] is `null` or is not a valid
-   * absolute file path.
-   */
+  /// Return the URI that should be used to reference the file at the absolute
+  /// [path], or `null` if there is no valid way to reference the file in this
+  /// converter’s context. The file at that path is not required to exist.
+  ///
+  /// If a [containingPath] is provided and both the [path] and [containingPath]
+  /// are within the root of this converter’s context, then the returned URI
+  /// will be a relative path. Otherwise, the returned URI will be an absolute
+  /// URI.
+  ///
+  /// Throws an `ArgumentError` if the [path] is `null` or is not a valid
+  /// absolute file path.
   Uri pathToUri(String path, {String containingPath});
 
-  /**
-   * Return the absolute path of the file to which the absolute [uri] resolves,
-   * or `null` if the [uri] cannot be resolved in this converter’s context.
-   *
-   * Throws an `ArgumentError` if the [uri] is `null` or is not an absolute URI.
-   */
+  /// Return the absolute path of the file to which the absolute [uri] resolves,
+  /// or `null` if the [uri] cannot be resolved in this converter’s context.
+  ///
+  /// Throws an `ArgumentError` if the [uri] is `null` or is not an absolute
+  /// URI.
   String uriToPath(Uri uri);
 }
diff --git a/pkg/analyzer/lib/dart/ast/ast.dart b/pkg/analyzer/lib/dart/ast/ast.dart
index 3bf434e..bce36d6 100644
--- a/pkg/analyzer/lib/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/dart/ast/ast.dart
@@ -2,6 +2,8 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:analyzer/dart/ast/precedence.dart';
+
 /// Defines the AST model. The AST (Abstract Syntax Tree) model describes the
 /// syntactic (as opposed to semantic) structure of Dart code. The semantic
 /// structure of the code is modeled by the
@@ -505,8 +507,6 @@
 
   R visitForEachPartsWithIdentifier(ForEachPartsWithIdentifier node);
 
-  R visitForEachStatement(ForEachStatement node);
-
   R visitForElement(ForElement node);
 
   R visitFormalParameterList(FormalParameterList node);
@@ -517,6 +517,7 @@
 
   R visitForStatement(ForStatement node);
 
+  @Deprecated('Replaced by visitForStatement')
   R visitForStatement2(ForStatement2 node);
 
   R visitFunctionDeclaration(FunctionDeclaration node);
@@ -567,12 +568,6 @@
 
   R visitListLiteral(ListLiteral node);
 
-  R visitListLiteral2(ListLiteral2 node);
-
-  R visitMapLiteral(MapLiteral node);
-
-  R visitMapLiteral2(MapLiteral2 node);
-
   R visitMapLiteralEntry(MapLiteralEntry node);
 
   R visitMethodDeclaration(MethodDeclaration node);
@@ -614,9 +609,7 @@
 
   R visitScriptTag(ScriptTag node);
 
-  R visitSetLiteral(SetLiteral node);
-
-  R visitSetLiteral2(SetLiteral2 node);
+  R visitSetOrMapLiteral(SetOrMapLiteral node);
 
   R visitShowCombinator(ShowCombinator node);
 
@@ -1972,11 +1965,14 @@
   /// integer value that defines how the source code is parsed into an AST. For
   /// example `a * b + c` is parsed as `(a * b) + c` because the precedence of
   /// `*` is greater than the precedence of `+`.
-  ///
-  /// Clients should not assume that returned values will stay the same, they
-  /// might change as result of specification change. Only relative order should
-  /// be used.
-  int get precedence;
+  Precedence get precedence;
+
+  /// Return the precedence of this expression. The precedence is a positive
+  /// integer value that defines how the source code is parsed into an AST. For
+  /// example `a * b + c` is parsed as `(a * b) + c` because the precedence of
+  /// `*` is greater than the precedence of `+`.
+  @Deprecated('Use precedence')
+  Precedence get precedence2;
 
   /// If this expression is an argument to an invocation, and the AST structure
   /// has been resolved, and the function being invoked is known based on
@@ -2224,78 +2220,6 @@
   SimpleIdentifier get identifier;
 }
 
-/// A for-each statement.
-///
-///    forEachStatement ::=
-///        'await'? 'for' '(' [DeclaredIdentifier] 'in' [Expression] ')' [Block]
-///      | 'await'? 'for' '(' [SimpleIdentifier] 'in' [Expression] ')' [Block]
-///
-/// This is the class that is used to represent a for-each loop when neither the
-/// 'control-flow-collections' nor 'spread-collections' experiments are enabled.
-/// If either of those experiments are enabled, then [ForStatement2] will be
-/// used.
-///
-/// Clients may not extend, implement or mix-in this class.
-abstract class ForEachStatement implements Statement {
-  /// Return the token representing the 'await' keyword, or `null` if there is
-  /// no 'await' keyword.
-  Token get awaitKeyword;
-
-  /// Set the token representing the 'await' keyword to the given [token].
-  void set awaitKeyword(Token token);
-
-  /// Return the body of the loop.
-  Statement get body;
-
-  /// Set the body of the loop to the given [statement].
-  void set body(Statement statement);
-
-  /// Return the token representing the 'for' keyword.
-  Token get forKeyword;
-
-  /// Set the token representing the 'for' keyword to the given [token].
-  void set forKeyword(Token token);
-
-  /// Return the loop variable, or `null` if the loop variable is declared in
-  /// the 'for'.
-  SimpleIdentifier get identifier;
-
-  /// Set the loop variable to the given [identifier].
-  void set identifier(SimpleIdentifier identifier);
-
-  /// Return the token representing the 'in' keyword.
-  Token get inKeyword;
-
-  /// Set the token representing the 'in' keyword to the given [token].
-  void set inKeyword(Token token);
-
-  /// Return the expression evaluated to produce the iterator.
-  Expression get iterable;
-
-  /// Set the expression evaluated to produce the iterator to the given
-  /// [expression].
-  void set iterable(Expression expression);
-
-  /// Return the left parenthesis.
-  Token get leftParenthesis;
-
-  /// Set the left parenthesis to the given [token].
-  void set leftParenthesis(Token token);
-
-  /// Return the declaration of the loop variable, or `null` if the loop
-  /// variable is a simple identifier.
-  DeclaredIdentifier get loopVariable;
-
-  /// Set the declaration of the loop variable to the given [variable].
-  void set loopVariable(DeclaredIdentifier variable);
-
-  /// Return the right parenthesis.
-  Token get rightParenthesis;
-
-  /// Set the right parenthesis to the given [token].
-  void set rightParenthesis(Token token);
-}
-
 /// The basic structure of a for element.
 ///
 /// Clients may not extend, implement or mix-in this class.
@@ -2385,8 +2309,8 @@
   /// Return `true` if this parameter is a required parameter. Required
   /// parameters are always positional.
   ///
-  /// Note: this will return `false` for a named parameter that is annotated with
-  /// the `@required` annotation.
+  /// Note: this will return `false` for a named parameter that is annotated
+  /// with the `@required` annotation.
   bool get isRequired;
 
   /// Return the kind of this parameter.
@@ -2395,6 +2319,9 @@
 
   /// Return the annotations associated with this parameter.
   NodeList<Annotation> get metadata;
+
+  /// The 'required' keyword, or `null` if the keyword was not used.
+  Token get requiredKeyword;
 }
 
 /// The formal parameter list of a method declaration, function declaration, or
@@ -2511,89 +2438,6 @@
   Expression get initialization;
 }
 
-/// A for statement.
-///
-///    forStatement ::=
-///        'for' '(' forLoopParts ')' [Statement]
-///
-///    forLoopParts ::=
-///        forInitializerStatement ';' [Expression]? ';' [Expression]?
-///
-///    forInitializerStatement ::=
-///        [DefaultFormalParameter]
-///      | [Expression]?
-///
-/// This is the class that is used to represent a for loop when neither the
-/// 'control-flow-collections' nor 'spread-collections' experiments are enabled.
-/// If either of those experiments are enabled, then [ForStatement2] will be
-/// used.
-///
-/// Clients may not extend, implement or mix-in this class.
-abstract class ForStatement implements Statement {
-  /// Return the body of the loop.
-  Statement get body;
-
-  /// Set the body of the loop to the given [statement].
-  void set body(Statement statement);
-
-  /// Return the condition used to determine when to terminate the loop, or
-  /// `null` if there is no condition.
-  Expression get condition;
-
-  /// Set the condition used to determine when to terminate the loop to the
-  /// given [expression].
-  void set condition(Expression expression);
-
-  /// Return the token representing the 'for' keyword.
-  Token get forKeyword;
-
-  /// Set the token representing the 'for' keyword to the given [token].
-  void set forKeyword(Token token);
-
-  /// Return the initialization expression, or `null` if there is no
-  /// initialization expression.
-  Expression get initialization;
-
-  /// Set the initialization expression to the given [expression].
-  void set initialization(Expression initialization);
-
-  /// Return the left parenthesis.
-  Token get leftParenthesis;
-
-  /// Set the left parenthesis to the given [token].
-  void set leftParenthesis(Token token);
-
-  /// Return the semicolon separating the initializer and the condition.
-  Token get leftSeparator;
-
-  /// Set the semicolon separating the initializer and the condition to the
-  /// given [token].
-  void set leftSeparator(Token token);
-
-  /// Return the right parenthesis.
-  Token get rightParenthesis;
-
-  /// Set the right parenthesis to the given [token].
-  void set rightParenthesis(Token token);
-
-  /// Return the semicolon separating the condition and the updater.
-  Token get rightSeparator;
-
-  /// Set the semicolon separating the condition and the updater to the given
-  /// [token].
-  void set rightSeparator(Token token);
-
-  /// Return the list of expressions run after each execution of the loop body.
-  NodeList<Expression> get updaters;
-
-  /// Return the declaration of the loop variables, or `null` if there are no
-  /// variables.
-  VariableDeclarationList get variables;
-
-  /// Set the declaration of the loop variables to the given [variableList].
-  void set variables(VariableDeclarationList variableList);
-}
-
 /// A for or for-each statement.
 ///
 ///    forStatement ::=
@@ -2607,11 +2451,11 @@
 ///
 /// This is the class that is used to represent a for loop when either the
 /// 'control-flow-collections' or 'spread-collections' experiments are enabled.
-/// If neither of those experiments are enabled, then either [ForStatement] or
-/// [ForEachStatement] will be used.
+/// If neither of those experiments are enabled, then either `ForStatement` or
+/// `ForEachStatement` will be used.
 ///
 /// Clients may not extend, implement or mix-in this class.
-abstract class ForStatement2 implements Statement {
+abstract class ForStatement implements Statement {
   /// Return the token representing the 'await' keyword, or `null` if there is
   /// no 'await' keyword.
   Token get awaitKeyword;
@@ -2632,6 +2476,26 @@
   Token get rightParenthesis;
 }
 
+/// A for or for-each statement.
+///
+///    forStatement ::=
+///        'for' '(' forLoopParts ')' [Statement]
+///
+///    forLoopParts ::=
+///       [VariableDeclaration] ';' [Expression]? ';' expressionList?
+///     | [Expression]? ';' [Expression]? ';' expressionList?
+///     | [DeclaredIdentifier] 'in' [Expression]
+///     | [SimpleIdentifier] 'in' [Expression]
+///
+/// This is the class that is used to represent a for loop when either the
+/// 'control-flow-collections' or 'spread-collections' experiments are enabled.
+/// If neither of those experiments are enabled, then either `ForStatement` or
+/// `ForEachStatement` will be used.
+///
+/// Clients may not extend, implement or mix-in this class.
+@Deprecated('Replaced by ForStatement')
+abstract class ForStatement2 extends ForStatement {}
+
 /// A node representing the body of a function or method.
 ///
 ///    functionBody ::=
@@ -3699,46 +3563,20 @@
 /// A list literal.
 ///
 ///    listLiteral ::=
-///        'const'? ('<' [TypeAnnotation] '>')? '[' ([Expression] ','?)? ']'
+///        'const'? [TypeAnnotationList]? '[' elements? ']'
 ///
-/// This is the class that is used to represent a list literal when neither the
-/// 'control-flow-collections' nor 'spread-collections' experiments are enabled.
-/// If either of those experiments are enabled, then [ListLiteral2] will be
-/// used.
+///    elements ::=
+///        [CollectionElement] (',' [CollectionElement])* ','?
 ///
 /// Clients may not extend, implement or mix-in this class.
 abstract class ListLiteral implements TypedLiteral {
-  /// Return the expressions used to compute the elements of the list.
-  NodeList<Expression> get elements;
-
-  /// Return the left square bracket.
-  Token get leftBracket;
-
-  /// Set the left square bracket to the given [token].
-  void set leftBracket(Token token);
-
-  /// Return the right square bracket.
-  Token get rightBracket;
-
-  /// Set the right square bracket to the given [token].
-  void set rightBracket(Token token);
-}
-
-/// A list literal.
-///
-///    listLiteral ::=
-///        'const'? ('<' [TypeAnnotation] '>')?
-///        '[' ([CollectionElement] ','?)? ']'
-///
-/// This is the class that is used to represent a list literal when either the
-/// 'control-flow-collections' or 'spread-collections' experiments are enabled.
-/// If neither of those experiments are enabled, then [ListLiteral] will be used.
-///
-/// Clients may not extend, implement or mix-in this class.
-abstract class ListLiteral2 implements TypedLiteral {
-  /// Return the expressions used to compute the elements of the list.
+  /// Return the syntactic elements used to compute the elements of the list.
   NodeList<CollectionElement> get elements;
 
+  /// Return the syntactic elements used to compute the elements of the list.
+  @Deprecated('Replaced by elements')
+  NodeList<CollectionElement> get elements2;
+
   /// Return the left square bracket.
   Token get leftBracket;
 
@@ -3759,69 +3597,13 @@
 ///      | [DoubleLiteral]
 ///      | [IntegerLiteral]
 ///      | [ListLiteral]
-///      | [MapLiteral]
 ///      | [NullLiteral]
+///      | [SetOrMapLiteral]
 ///      | [StringLiteral]
 ///
 /// Clients may not extend, implement or mix-in this class.
 abstract class Literal implements Expression {}
 
-/// A literal map.
-///
-///    mapLiteral ::=
-///        'const'? ('<' [TypeAnnotation] (',' [TypeAnnotation])* '>')?
-///        '{' ([MapLiteralEntry] (',' [MapLiteralEntry])* ','?)? '}'
-///
-/// This is the class that is used to represent a map literal when neither the
-/// 'control-flow-collections' nor 'spread-collections' experiments are enabled.
-/// If either of those experiments are enabled, then [MapLiteral2] will be used.
-///
-/// Clients may not extend, implement or mix-in this class.
-abstract class MapLiteral implements TypedLiteral {
-  /// Return the entries in the map.
-  NodeList<MapLiteralEntry> get entries;
-
-  /// Return the left curly bracket.
-  Token get leftBracket;
-
-  /// Set the left curly bracket to the given [token].
-  void set leftBracket(Token token);
-
-  /// Return the right curly bracket.
-  Token get rightBracket;
-
-  /// Set the right curly bracket to the given [token].
-  void set rightBracket(Token token);
-}
-
-/// A literal map.
-///
-///    mapLiteral ::=
-///        'const'? ('<' [TypeAnnotation] (',' [TypeAnnotation])* '>')?
-///        '{' ([MapElement] (',' [MapElement])* ','?)? '}'
-///
-/// This is the class that is used to represent a map literal when either the
-/// 'control-flow-collections' or 'spread-collections' experiments are enabled.
-/// If neither of those experiments are enabled, then [MapLiteral] will be used.
-///
-/// Clients may not extend, implement or mix-in this class.
-abstract class MapLiteral2 implements TypedLiteral {
-  /// Return the entries in the map.
-  NodeList<CollectionElement> get entries;
-
-  /// Return the left curly bracket.
-  Token get leftBracket;
-
-  /// Set the left curly bracket to the given [token].
-  void set leftBracket(Token token);
-
-  /// Return the right curly bracket.
-  Token get rightBracket;
-
-  /// Set the right curly bracket to the given [token].
-  void set rightBracket(Token token);
-}
-
 /// A single key/value pair in a map literal.
 ///
 ///    mapLiteralEntry ::=
@@ -4647,62 +4429,72 @@
   void set scriptTag(Token token);
 }
 
-/// A literal set.
+/// A set or map literal.
 ///
-///    setLiteral ::=
-///        'const'? ('<' [TypeAnnotation] '>')?
-///        '{' [Expression] (',' [Expression])* ','? '}'
-///      | 'const'? ('<' [TypeAnnotation] '>')? '{' '}'
+///    setOrMapLiteral ::=
+///        'const'? [TypeArgumentList]? '{' elements? '}'
 ///
-/// This is the class that is used to represent a set literal when neither the
-/// 'control-flow-collections' nor 'spread-collections' experiments are enabled.
-/// If either of those experiments are enabled, then [SetLiteral2] will be used.
+///    elements ::=
+///        [CollectionElement] ( ',' [CollectionElement] )* ','?
+///
+/// This is the class that is used to represent either a map or set literal when
+/// either the 'control-flow-collections' or 'spread-collections' experiments
+/// are enabled. If neither of those experiments are enabled, then `MapLiteral`
+/// will be used to represent a map literal and `SetLiteral` will be used for
+/// set literals.
 ///
 /// Clients may not extend, implement or mix-in this class.
-abstract class SetLiteral implements TypedLiteral {
-  /// Return the expressions used to compute the elements of the set.
-  NodeList<Expression> get elements;
-
-  /// Return the left curly bracket.
-  Token get leftBracket;
-
-  /// Set the left curly bracket to the given [token].
-  void set leftBracket(Token token);
-
-  /// Return the right curly bracket.
-  Token get rightBracket;
-
-  /// Set the right curly bracket to the given [token].
-  void set rightBracket(Token token);
-}
-
-/// A literal set.
-///
-///    setLiteral ::=
-///        'const'? ('<' [TypeAnnotation] '>')?
-///        '{' [CollectionElement] (',' [CollectionElement])* ','? '}'
-///      | 'const'? ('<' [TypeAnnotation] '>')? '{' '}'
-///
-/// This is the class that is used to represent a set literal when either the
-/// 'control-flow-collections' or 'spread-collections' experiments are enabled.
-/// If neither of those experiments are enabled, then [SetLiteral] will be used.
-///
-/// Clients may not extend, implement or mix-in this class.
-abstract class SetLiteral2 implements TypedLiteral {
-  /// Return the expressions used to compute the elements of the set.
+abstract class SetOrMapLiteral implements TypedLiteral {
+  /// Return the syntactic elements used to compute the elements of the set or
+  /// map.
   NodeList<CollectionElement> get elements;
 
+  /// Return the syntactic elements used to compute the elements of the set or
+  /// map.
+  @Deprecated('Replaced by elements')
+  NodeList<CollectionElement> get elements2;
+
+  /// Return `true` if this literal represents a map literal.
+  ///
+  /// This getter will always return `false` if [isSet] returns `true`.
+  ///
+  /// However, this getter is _not_ the inverse of [isSet]. It is possible for
+  /// both getters to return `false` if
+  ///
+  /// - the AST has not been resolved (because determining the kind of the
+  ///   literal is done during resolution),
+  /// - the literal is ambiguous (contains one or more spread elements and none
+  ///   of those elements can be used to determine the kind of the literal), or
+  /// - the literal is invalid because it contains both expressions (for sets)
+  ///   and map entries (for maps).
+  ///
+  /// In both of the latter two cases there will be compilation errors
+  /// associated with the literal.
+  bool get isMap;
+
+  /// Return `true` if this literal represents a set literal.
+  ///
+  /// This getter will always return `false` if [isMap] returns `true`.
+  ///
+  /// However, this getter is _not_ the inverse of [isMap]. It is possible for
+  /// both getters to return `false` if
+  ///
+  /// - the AST has not been resolved (because determining the kind of the
+  ///   literal is done during resolution),
+  /// - the literal is ambiguous (contains one or more spread elements and none
+  ///   of those elements can be used to determine the kind of the literal), or
+  /// - the literal is invalid because it contains both expressions (for sets)
+  ///   and map entries (for maps).
+  ///
+  /// In both of the latter two cases there will be compilation errors
+  /// associated with the literal.
+  bool get isSet;
+
   /// Return the left curly bracket.
   Token get leftBracket;
 
-  /// Set the left curly bracket to the given [token].
-  void set leftBracket(Token token);
-
   /// Return the right curly bracket.
   Token get rightBracket;
-
-  /// Set the right curly bracket to the given [token].
-  void set rightBracket(Token token);
 }
 
 /// A combinator that restricts the names being imported to those in a given list.
@@ -5271,7 +5063,7 @@
 ///
 ///    typedLiteral ::=
 ///        [ListLiteral]
-///      | [MapLiteral]
+///      | [SetOrMapLiteral]
 ///
 /// Clients may not extend, implement or mix-in this class.
 abstract class TypedLiteral implements Literal {
diff --git a/pkg/analyzer/lib/dart/ast/ast_factory.dart b/pkg/analyzer/lib/dart/ast/ast_factory.dart
index c888aac..f934c92 100644
--- a/pkg/analyzer/lib/dart/ast/ast_factory.dart
+++ b/pkg/analyzer/lib/dart/ast/ast_factory.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -7,45 +7,33 @@
 import 'package:front_end/src/scanner/token.dart';
 import 'package:meta/meta.dart';
 
-/**
- * A collection of factory methods which may be used to create concrete
- * instances of the interfaces that constitute the AST.
- *
- * Clients should not extend, implement or mix-in this class.
- */
+/// A collection of factory methods which may be used to create concrete
+/// instances of the interfaces that constitute the AST.
+///
+/// Clients should not extend, implement or mix-in this class.
 abstract class AstFactory {
-  /**
-   * Returns a newly created list of adjacent strings. To be syntactically
-   * valid, the list of [strings] must contain at least two elements.
-   */
+  /// Returns a newly created list of adjacent strings. To be syntactically
+  /// valid, the list of [strings] must contain at least two elements.
   AdjacentStrings adjacentStrings(List<StringLiteral> strings);
 
-  /**
-   * Returns a newly created annotation. Both the [period] and the
-   * [constructorName] can be `null` if the annotation is not referencing a
-   * named constructor. The [arguments] can be `null` if the annotation is not
-   * referencing a constructor.
-   */
+  /// Returns a newly created annotation. Both the [period] and the
+  /// [constructorName] can be `null` if the annotation is not referencing a
+  /// named constructor. The [arguments] can be `null` if the annotation is not
+  /// referencing a constructor.
   Annotation annotation(Token atSign, Identifier name, Token period,
       SimpleIdentifier constructorName, ArgumentList arguments);
 
-  /**
-   * Returns a newly created list of arguments. The list of [arguments] can
-   * be `null` if there are no arguments.
-   */
+  /// Returns a newly created list of arguments. The list of [arguments] can
+  /// be `null` if there are no arguments.
   ArgumentList argumentList(Token leftParenthesis, List<Expression> arguments,
       Token rightParenthesis);
 
-  /**
-   * Returns a newly created as expression.
-   */
+  /// Returns a newly created as expression.
   AsExpression asExpression(
       Expression expression, Token asOperator, TypeAnnotation type);
 
-  /**
-   * Returns a newly created assert initializer. The [comma] and [message]
-   * can be `null` if there is no message.
-   */
+  /// Returns a newly created assert initializer. The [comma] and [message]
+  /// can be `null` if there is no message.
   AssertInitializer assertInitializer(
       Token assertKeyword,
       Token leftParenthesis,
@@ -54,10 +42,8 @@
       Expression message,
       Token rightParenthesis);
 
-  /**
-   * Returns a newly created assert statement. The [comma] and [message] can
-   * be `null` if there is no message.
-   */
+  /// Returns a newly created assert statement. The [comma] and [message] can
+  /// be `null` if there is no message.
   AssertStatement assertStatement(
       Token assertKeyword,
       Token leftParenthesis,
@@ -67,67 +53,47 @@
       Token rightParenthesis,
       Token semicolon);
 
-  /**
-   * Returns a newly created assignment expression.
-   */
+  /// Returns a newly created assignment expression.
   AssignmentExpression assignmentExpression(
       Expression leftHandSide, Token operator, Expression rightHandSide);
 
-  /**
-   * Returns a newly created await expression.
-   */
+  /// Returns a newly created await expression.
   AwaitExpression awaitExpression(Token awaitKeyword, Expression expression);
 
-  /**
-   * Returns a newly created binary expression.
-   */
+  /// Returns a newly created binary expression.
   BinaryExpression binaryExpression(
       Expression leftOperand, Token operator, Expression rightOperand);
 
-  /**
-   * Returns a newly created block of code.
-   */
+  /// Returns a newly created block of code.
   Block block(
       Token leftBracket, List<Statement> statements, Token rightBracket);
 
-  /**
-   * Returns a block comment consisting of the given [tokens].
-   */
+  /// Returns a block comment consisting of the given [tokens].
   Comment blockComment(List<Token> tokens);
 
-  /**
-   * Returns a newly created function body consisting of a block of
-   * statements. The [keyword] can be `null` if there is no keyword specified
-   * for the block. The [star] can be `null` if there is no star following the
-   * keyword (and must be `null` if there is no keyword).
-   */
+  /// Returns a newly created function body consisting of a block of
+  /// statements. The [keyword] can be `null` if there is no keyword specified
+  /// for the block. The [star] can be `null` if there is no star following the
+  /// keyword (and must be `null` if there is no keyword).
   BlockFunctionBody blockFunctionBody(Token keyword, Token star, Block block);
 
-  /**
-   * Returns a newly created boolean literal.
-   */
+  /// Returns a newly created boolean literal.
   BooleanLiteral booleanLiteral(Token literal, bool value);
 
-  /**
-   * Returns a newly created break statement. The [label] can be `null` if
-   * there is no label associated with the statement.
-   */
+  /// Returns a newly created break statement. The [label] can be `null` if
+  /// there is no label associated with the statement.
   BreakStatement breakStatement(
       Token breakKeyword, SimpleIdentifier label, Token semicolon);
 
-  /**
-   * Returns a newly created cascade expression. The list of
-   * [cascadeSections] must contain at least one element.
-   */
+  /// Returns a newly created cascade expression. The list of
+  /// [cascadeSections] must contain at least one element.
   CascadeExpression cascadeExpression(
       Expression target, List<Expression> cascadeSections);
 
-  /**
-   * Returns a newly created catch clause. The [onKeyword] and
-   * [exceptionType] can be `null` if the clause will catch all exceptions. The
-   * [comma] and [stackTraceParameter] can be `null` if the stack trace
-   * parameter is not defined.
-   */
+  /// Returns a newly created catch clause. The [onKeyword] and [exceptionType]
+  /// can be `null` if the clause will catch all exceptions. The [comma] and
+  /// [stackTraceParameter] can be `null` if the stack trace parameter is not
+  /// defined.
   CatchClause catchClause(
       Token onKeyword,
       TypeAnnotation exceptionType,
@@ -139,16 +105,14 @@
       Token rightParenthesis,
       Block body);
 
-  /**
-   * Returns a newly created class declaration. Either or both of the
-   * [comment] and [metadata] can be `null` if the class does not have the
-   * corresponding attribute. The [abstractKeyword] can be `null` if the class
-   * is not abstract. The [typeParameters] can be `null` if the class does not
-   * have any type parameters. Any or all of the [extendsClause], [withClause],
-   * and [implementsClause] can be `null` if the class does not have the
-   * corresponding clause. The list of [members] can be `null` if the class does
-   * not have any members.
-   */
+  /// Returns a newly created class declaration. Either or both of the
+  /// [comment] and [metadata] can be `null` if the class does not have the
+  /// corresponding attribute. The [abstractKeyword] can be `null` if the class
+  /// is not abstract. The [typeParameters] can be `null` if the class does not
+  /// have any type parameters. Any or all of the [extendsClause], [withClause],
+  /// and [implementsClause] can be `null` if the class does not have the
+  /// corresponding clause. The list of [members] can be `null` if the class
+  /// does not have any members.
   ClassDeclaration classDeclaration(
       Comment comment,
       List<Annotation> metadata,
@@ -163,14 +127,12 @@
       List<ClassMember> members,
       Token rightBracket);
 
-  /**
-   * Returns a newly created class type alias. Either or both of the
-   * [comment] and [metadata] can be `null` if the class type alias does not
-   * have the corresponding attribute. The [typeParameters] can be `null` if the
-   * class does not have any type parameters. The [abstractKeyword] can be
-   * `null` if the class is not abstract. The [implementsClause] can be `null`
-   * if the class does not implement any interfaces.
-   */
+  /// Returns a newly created class type alias. Either or both of the [comment]
+  /// and [metadata] can be `null` if the class type alias does not have the
+  /// corresponding attribute. The [typeParameters] can be `null` if the class
+  /// does not have any type parameters. The [abstractKeyword] can be `null` if
+  /// the class is not abstract. The [implementsClause] can be `null` if the
+  /// class does not implement any interfaces.
   ClassTypeAlias classTypeAlias(
       Comment comment,
       List<Annotation> metadata,
@@ -184,19 +146,15 @@
       ImplementsClause implementsClause,
       Token semicolon);
 
-  /**
-   * Returns a newly created reference to a Dart element. The [newKeyword]
-   * can be `null` if the reference is not to a constructor.
-   */
+  /// Returns a newly created reference to a Dart element. The [newKeyword]
+  /// can be `null` if the reference is not to a constructor.
   CommentReference commentReference(Token newKeyword, Identifier identifier);
 
-  /**
-   * Returns a newly created compilation unit to have the given directives
-   * and declarations. The [scriptTag] can be `null` if there is no script tag
-   * in the compilation unit. The list of [directives] can be `null` if there
-   * are no directives in the compilation unit. The list of [declarations] can
-   * be `null` if there are no declarations in the compilation unit.
-   */
+  /// Returns a newly created compilation unit to have the given directives
+  /// and declarations. The [scriptTag] can be `null` if there is no script tag
+  /// in the compilation unit. The list of [directives] can be `null` if there
+  /// are no directives in the compilation unit. The list of [declarations] can
+  /// be `null` if there are no declarations in the compilation unit.
   CompilationUnit compilationUnit(
       Token beginToken,
       ScriptTag scriptTag,
@@ -204,9 +162,7 @@
       List<CompilationUnitMember> declarations,
       Token endToken);
 
-  /**
-   * Returns a newly created conditional expression.
-   */
+  /// Returns a newly created conditional expression.
   ConditionalExpression conditionalExpression(
       Expression condition,
       Token question,
@@ -214,9 +170,7 @@
       Token colon,
       Expression elseExpression);
 
-  /**
-   * Returns a newly created configuration.
-   */
+  /// Returns a newly created configuration.
   Configuration configuration(
       Token ifKeyword,
       Token leftParenthesis,
@@ -226,21 +180,19 @@
       Token rightParenthesis,
       StringLiteral libraryUri);
 
-  /**
-   * Returns a newly created constructor declaration. The [externalKeyword]
-   * can be `null` if the constructor is not external. Either or both of the
-   * [comment] and [metadata] can be `null` if the constructor does not have the
-   * corresponding attribute. The [constKeyword] can be `null` if the
-   * constructor cannot be used to create a constant. The [factoryKeyword] can
-   * be `null` if the constructor is not a factory. The [period] and [name] can
-   * both be `null` if the constructor is not a named constructor. The
-   * [separator] can be `null` if the constructor does not have any initializers
-   * and does not redirect to a different constructor. The list of
-   * [initializers] can be `null` if the constructor does not have any
-   * initializers. The [redirectedConstructor] can be `null` if the constructor
-   * does not redirect to a different constructor. The [body] can be `null` if
-   * the constructor does not have a body.
-   */
+  /// Returns a newly created constructor declaration. The [externalKeyword]
+  /// can be `null` if the constructor is not external. Either or both of the
+  /// [comment] and [metadata] can be `null` if the constructor does not have
+  /// the corresponding attribute. The [constKeyword] can be `null` if the
+  /// constructor cannot be used to create a constant. The [factoryKeyword] can
+  /// be `null` if the constructor is not a factory. The [period] and [name] can
+  /// both be `null` if the constructor is not a named constructor. The
+  /// [separator] can be `null` if the constructor does not have any
+  /// initializers and does not redirect to a different constructor. The list of
+  /// [initializers] can be `null` if the constructor does not have any
+  /// initializers. The [redirectedConstructor] can be `null` if the constructor
+  /// does not redirect to a different constructor. The [body] can be `null` if
+  /// the constructor does not have a body.
   ConstructorDeclaration constructorDeclaration(
       Comment comment,
       List<Annotation> metadata,
@@ -256,11 +208,9 @@
       ConstructorName redirectedConstructor,
       FunctionBody body);
 
-  /**
-   * Returns a newly created field initializer to initialize the field with
-   * the given name to the value of the given expression. The [thisKeyword] and
-   * [period] can be `null` if the 'this' keyword was not specified.
-   */
+  /// Returns a newly created field initializer to initialize the field with
+  /// the given name to the value of the given expression. The [thisKeyword] and
+  /// [period] can be `null` if the 'this' keyword was not specified.
   ConstructorFieldInitializer constructorFieldInitializer(
       Token thisKeyword,
       Token period,
@@ -268,26 +218,20 @@
       Token equals,
       Expression expression);
 
-  /**
-   * Returns a newly created constructor name. The [period] and [name] can be
-   * `null` if the constructor being named is the unnamed constructor.
-   */
+  /// Returns a newly created constructor name. The [period] and [name] can be
+  /// `null` if the constructor being named is the unnamed constructor.
   ConstructorName constructorName(
       TypeName type, Token period, SimpleIdentifier name);
 
-  /**
-   * Returns a newly created continue statement. The [label] can be `null` if
-   * there is no label associated with the statement.
-   */
+  /// Returns a newly created continue statement. The [label] can be `null` if
+  /// there is no label associated with the statement.
   ContinueStatement continueStatement(
       Token continueKeyword, SimpleIdentifier label, Token semicolon);
 
-  /**
-   * Returns a newly created formal parameter. Either or both of the
-   * [comment] and [metadata] can be `null` if the declaration does not have the
-   * corresponding attribute. The [keyword] can be `null` if a type name is
-   * given. The [type] must be `null` if the keyword is 'var'.
-   */
+  /// Returns a newly created formal parameter. Either or both of the
+  /// [comment] and [metadata] can be `null` if the declaration does not have
+  /// the corresponding attribute. The [keyword] can be `null` if a type name is
+  /// given. The [type] must be `null` if the keyword is 'var'.
   DeclaredIdentifier declaredIdentifier(
       Comment comment,
       List<Annotation> metadata,
@@ -295,23 +239,17 @@
       TypeAnnotation type,
       SimpleIdentifier identifier);
 
-  /**
-   * Returns a newly created default formal parameter. The [separator] and
-   * [defaultValue] can be `null` if there is no default value.
-   */
+  /// Returns a newly created default formal parameter. The [separator] and
+  /// [defaultValue] can be `null` if there is no default value.
   DefaultFormalParameter defaultFormalParameter(NormalFormalParameter parameter,
       ParameterKind kind, Token separator, Expression defaultValue);
 
-  /**
-   * Returns a documentation comment consisting of the given [tokens] and having
-   * the given [references] (if supplied) embedded within it.
-   */
+  /// Returns a documentation comment consisting of the given [tokens] and
+  /// having the given [references] (if supplied) embedded within it.
   Comment documentationComment(List<Token> tokens,
       [List<CommentReference> references]);
 
-  /**
-   * Returns a newly created do loop.
-   */
+  /// Returns a newly created do loop.
   DoStatement doStatement(
       Token doKeyword,
       Statement body,
@@ -321,46 +259,32 @@
       Token rightParenthesis,
       Token semicolon);
 
-  /**
-   * Returns a newly created dotted name.
-   */
+  /// Returns a newly created dotted name.
   DottedName dottedName(List<SimpleIdentifier> components);
 
-  /**
-   * Returns a newly created floating point literal.
-   */
+  /// Returns a newly created floating point literal.
   DoubleLiteral doubleLiteral(Token literal, double value);
 
-  /**
-   * Returns a newly created function body.
-   */
+  /// Returns a newly created function body.
   EmptyFunctionBody emptyFunctionBody(Token semicolon);
 
-  /**
-   * Returns a newly created empty statement.
-   */
+  /// Returns a newly created empty statement.
   EmptyStatement emptyStatement(Token semicolon);
 
-  /**
-   * Returns an end-of-line comment consisting of the given [tokens].
-   */
+  /// Returns an end-of-line comment consisting of the given [tokens].
   Comment endOfLineComment(List<Token> tokens);
 
-  /**
-   * Returns a newly created enum constant declaration. Either or both of the
-   * [comment] and [metadata] can be `null` if the constant does not have the
-   * corresponding attribute. (Technically, enum constants cannot have metadata,
-   * but we allow it for consistency.)
-   */
+  /// Returns a newly created enum constant declaration. Either or both of the
+  /// [comment] and [metadata] can be `null` if the constant does not have the
+  /// corresponding attribute. (Technically, enum constants cannot have
+  /// metadata, but we allow it for consistency.)
   EnumConstantDeclaration enumConstantDeclaration(
       Comment comment, List<Annotation> metadata, SimpleIdentifier name);
 
-  /**
-   * Returns a newly created enumeration declaration. Either or both of the
-   * [comment] and [metadata] can be `null` if the declaration does not have the
-   * corresponding attribute. The list of [constants] must contain at least one
-   * value.
-   */
+  /// Returns a newly created enumeration declaration. Either or both of the
+  /// [comment] and [metadata] can be `null` if the declaration does not have
+  /// the corresponding attribute. The list of [constants] must contain at least
+  /// one value.
   EnumDeclaration enumDeclaration(
       Comment comment,
       List<Annotation> metadata,
@@ -370,12 +294,10 @@
       List<EnumConstantDeclaration> constants,
       Token rightBracket);
 
-  /**
-   * Returns a newly created export directive. Either or both of the
-   * [comment] and [metadata] can be `null` if the directive does not have the
-   * corresponding attribute. The list of [combinators] can be `null` if there
-   * are no combinators.
-   */
+  /// Returns a newly created export directive. Either or both of the
+  /// [comment] and [metadata] can be `null` if the directive does not have the
+  /// corresponding attribute. The list of [combinators] can be `null` if there
+  /// are no combinators.
   ExportDirective exportDirective(
       Comment comment,
       List<Annotation> metadata,
@@ -385,43 +307,33 @@
       List<Combinator> combinators,
       Token semicolon);
 
-  /**
-   * Returns a newly created function body consisting of a block of
-   * statements. The [keyword] can be `null` if the function body is not an
-   * async function body.
-   */
+  /// Returns a newly created function body consisting of a block of statements.
+  /// The [keyword] can be `null` if the function body is not an async function
+  /// body.
   ExpressionFunctionBody expressionFunctionBody(Token keyword,
       Token functionDefinition, Expression expression, Token semicolon);
 
-  /**
-   * Returns a newly created expression statement.
-   */
+  /// Returns a newly created expression statement.
   ExpressionStatement expressionStatement(
       Expression expression, Token semicolon);
 
-  /**
-   * Returns a newly created extends clause.
-   */
+  /// Returns a newly created extends clause.
   ExtendsClause extendsClause(Token extendsKeyword, TypeName superclass);
 
-  /**
-   * Returns a newly created field declaration. Either or both of the
-   * [comment] and [metadata] can be `null` if the declaration does not have the
-   * corresponding attribute. The [staticKeyword] can be `null` if the field is
-   * not a static field.
-   *
-   * Use [fieldDeclaration2] instead.
-   */
+  /// Returns a newly created field declaration. Either or both of the [comment]
+  /// and [metadata] can be `null` if the declaration does not have the
+  /// corresponding attribute. The [staticKeyword] can be `null` if the field is
+  /// not a static field.
+  ///
+  /// Use [fieldDeclaration2] instead.
   @deprecated
   FieldDeclaration fieldDeclaration(Comment comment, List<Annotation> metadata,
       Token staticKeyword, VariableDeclarationList fieldList, Token semicolon);
 
-  /**
-   * Returns a newly created field declaration. Either or both of the
-   * [comment] and [metadata] can be `null` if the declaration does not have the
-   * corresponding attribute. The [staticKeyword] can be `null` if the field is
-   * not a static field.
-   */
+  /// Returns a newly created field declaration. Either or both of the
+  /// [comment] and [metadata] can be `null` if the declaration does not have
+  /// the corresponding attribute. The [staticKeyword] can be `null` if the
+  /// field is not a static field.
   FieldDeclaration fieldDeclaration2(
       {Comment comment,
       List<Annotation> metadata,
@@ -430,17 +342,15 @@
       @required VariableDeclarationList fieldList,
       @required Token semicolon});
 
-  /**
-   * Returns a newly created formal parameter. Either or both of the
-   * [comment] and [metadata] can be `null` if the parameter does not have the
-   * corresponding attribute. The [keyword] can be `null` if there is a type.
-   * The [type] must be `null` if the keyword is 'var'. The [thisKeyword] and
-   * [period] can be `null` if the keyword 'this' was not provided.  The
-   * [parameters] can be `null` if this is not a function-typed field formal
-   * parameter.
-   *
-   * Use [fieldFormalParameter2] instead.
-   */
+  /// Returns a newly created formal parameter. Either or both of the [comment]
+  /// and [metadata] can be `null` if the parameter does not have the
+  /// corresponding attribute. The [keyword] can be `null` if there is a type.
+  /// The [type] must be `null` if the keyword is 'var'. The [thisKeyword] and
+  /// [period] can be `null` if the keyword 'this' was not provided.  The
+  /// [parameters] can be `null` if this is not a function-typed field formal
+  /// parameter.
+  ///
+  /// Use [fieldFormalParameter2] instead.
   @deprecated
   FieldFormalParameter fieldFormalParameter(
       Comment comment,
@@ -453,19 +363,18 @@
       TypeParameterList typeParameters,
       FormalParameterList parameters);
 
-  /**
-   * Returns a newly created formal parameter. Either or both of the
-   * [comment] and [metadata] can be `null` if the parameter does not have the
-   * corresponding attribute. The [keyword] can be `null` if there is a type.
-   * The [type] must be `null` if the keyword is 'var'. The [thisKeyword] and
-   * [period] can be `null` if the keyword 'this' was not provided.  The
-   * [parameters] can be `null` if this is not a function-typed field formal
-   * parameter.
-   */
+  /// Returns a newly created formal parameter. Either or both of the [comment]
+  /// and [metadata] can be `null` if the parameter does not have the
+  /// corresponding attribute. The [keyword] can be `null` if there is a type.
+  /// The [type] must be `null` if the keyword is 'var'. The [thisKeyword] and
+  /// [period] can be `null` if the keyword 'this' was not provided.  The
+  /// [parameters] can be `null` if this is not a function-typed field formal
+  /// parameter.
   FieldFormalParameter fieldFormalParameter2(
       {Comment comment,
       List<Annotation> metadata,
       Token covariantKeyword,
+      Token requiredKeyword,
       Token keyword,
       TypeAnnotation type,
       @required Token thisKeyword,
@@ -474,53 +383,17 @@
       TypeParameterList typeParameters,
       FormalParameterList parameters});
 
-  /**
-   * Returns a newly created for each part that includes a declaration.
-   */
+  /// Returns a newly created for each part that includes a declaration.
   ForEachPartsWithDeclaration forEachPartsWithDeclaration(
       {DeclaredIdentifier loopVariable, Token inKeyword, Expression iterable});
 
-  /**
-   * Returns a newly created for each part that includes an identifier that is
-   * declared outside of the loop.
-   */
+  /// Returns a newly created for each part that includes an identifier that is
+  /// declared outside of the loop.
   ForEachPartsWithIdentifier forEachPartsWithIdentifier(
       {SimpleIdentifier identifier, Token inKeyword, Expression iterable});
 
-  /**
-   * Returns a newly created for-each statement whose loop control variable
-   * is declared internally (in the for-loop part). The [awaitKeyword] can be
-   * `null` if this is not an asynchronous for loop.
-   */
-  ForEachStatement forEachStatementWithDeclaration(
-      Token awaitKeyword,
-      Token forKeyword,
-      Token leftParenthesis,
-      DeclaredIdentifier loopVariable,
-      Token inKeyword,
-      Expression iterator,
-      Token rightParenthesis,
-      Statement body);
-
-  /**
-   * Returns a newly created for-each statement whose loop control variable
-   * is declared outside the for loop. The [awaitKeyword] can be `null` if this
-   * is not an asynchronous for loop.
-   */
-  ForEachStatement forEachStatementWithReference(
-      Token awaitKeyword,
-      Token forKeyword,
-      Token leftParenthesis,
-      SimpleIdentifier identifier,
-      Token inKeyword,
-      Expression iterator,
-      Token rightParenthesis,
-      Statement body);
-
-  /**
-   * Returns a newly created for element that can be part of a list, map or set
-   * literal.
-   */
+  /// Returns a newly created for element that can be part of a list, map or set
+  /// literal.
   ForElement forElement(
       {Token awaitKeyword,
       Token forKeyword,
@@ -529,11 +402,9 @@
       Token rightParenthesis,
       CollectionElement body});
 
-  /**
-   * Returns a newly created parameter list. The list of [parameters] can be
-   * `null` if there are no parameters. The [leftDelimiter] and [rightDelimiter]
-   * can be `null` if there are no optional parameters.
-   */
+  /// Returns a newly created parameter list. The list of [parameters] can be
+  /// `null` if there are no parameters. The [leftDelimiter] and
+  /// [rightDelimiter] can be `null` if there are no optional parameters.
   FormalParameterList formalParameterList(
       Token leftParenthesis,
       List<FormalParameter> parameters,
@@ -541,9 +412,7 @@
       Token rightDelimiter,
       Token rightParenthesis);
 
-  /**
-   * Returns a newly created for part that includes a declaration.
-   */
+  /// Returns a newly created for part that includes a declaration.
   ForPartsWithDeclarations forPartsWithDeclarations(
       {VariableDeclarationList variables,
       Token leftSeparator,
@@ -551,9 +420,7 @@
       Token rightSeparator,
       List<Expression> updaters});
 
-  /**
-   * Returns a newly created for part that includes an expression.
-   */
+  /// Returns a newly created for part that includes an expression.
   ForPartsWithExpression forPartsWithExpression(
       {Expression initialization,
       Token leftSeparator,
@@ -561,28 +428,8 @@
       Token rightSeparator,
       List<Expression> updaters});
 
-  /**
-   * Returns a newly created for statement. Either the [variableList] or the
-   * [initialization] must be `null`. Either the [condition] and the list of
-   * [updaters] can be `null` if the loop does not have the corresponding
-   * attribute.
-   */
+  /// Returns a newly created for statement.
   ForStatement forStatement(
-      Token forKeyword,
-      Token leftParenthesis,
-      VariableDeclarationList variableList,
-      Expression initialization,
-      Token leftSeparator,
-      Expression condition,
-      Token rightSeparator,
-      List<Expression> updaters,
-      Token rightParenthesis,
-      Statement body);
-
-  /**
-   * Returns a newly created for statement.
-   */
-  ForStatement2 forStatement2(
       {Token awaitKeyword,
       Token forKeyword,
       Token leftParenthesis,
@@ -590,14 +437,22 @@
       Token rightParenthesis,
       Statement body});
 
-  /**
-   * Returns a newly created function declaration. Either or both of the
-   * [comment] and [metadata] can be `null` if the function does not have the
-   * corresponding attribute. The [externalKeyword] can be `null` if the
-   * function is not an external function. The [returnType] can be `null` if no
-   * return type was specified. The [propertyKeyword] can be `null` if the
-   * function is neither a getter or a setter.
-   */
+  /// Returns a newly created for statement.
+  @Deprecated('Replaced by forStatement')
+  ForStatement forStatement2(
+      {Token awaitKeyword,
+      Token forKeyword,
+      Token leftParenthesis,
+      ForLoopParts forLoopParts,
+      Token rightParenthesis,
+      Statement body});
+
+  /// Returns a newly created function declaration. Either or both of the
+  /// [comment] and [metadata] can be `null` if the function does not have the
+  /// corresponding attribute. The [externalKeyword] can be `null` if the
+  /// function is not an external function. The [returnType] can be `null` if no
+  /// return type was specified. The [propertyKeyword] can be `null` if the
+  /// function is neither a getter or a setter.
   FunctionDeclaration functionDeclaration(
       Comment comment,
       List<Annotation> metadata,
@@ -607,31 +462,23 @@
       SimpleIdentifier name,
       FunctionExpression functionExpression);
 
-  /**
-   * Returns a newly created function declaration statement.
-   */
+  /// Returns a newly created function declaration statement.
   FunctionDeclarationStatement functionDeclarationStatement(
       FunctionDeclaration functionDeclaration);
 
-  /**
-   * Returns a newly created function declaration.
-   */
+  /// Returns a newly created function declaration.
   FunctionExpression functionExpression(TypeParameterList typeParameters,
       FormalParameterList parameters, FunctionBody body);
 
-  /**
-   * Returns a newly created function expression invocation.
-   */
+  /// Returns a newly created function expression invocation.
   FunctionExpressionInvocation functionExpressionInvocation(Expression function,
       TypeArgumentList typeArguments, ArgumentList argumentList);
 
-  /**
-   * Returns a newly created function type alias. Either or both of the
-   * [comment] and [metadata] can be `null` if the function does not have the
-   * corresponding attribute. The [returnType] can be `null` if no return type
-   * was specified. The [typeParameters] can be `null` if the function has no
-   * type parameters.
-   */
+  /// Returns a newly created function type alias. Either or both of the
+  /// [comment] and [metadata] can be `null` if the function does not have the
+  /// corresponding attribute. The [returnType] can be `null` if no return type
+  /// was specified. The [typeParameters] can be `null` if the function has no
+  /// type parameters.
   FunctionTypeAlias functionTypeAlias(
       Comment comment,
       List<Annotation> metadata,
@@ -642,14 +489,12 @@
       FormalParameterList parameters,
       Token semicolon);
 
-  /**
-   * Returns a newly created formal parameter. Either or both of the
-   * [comment] and [metadata] can be `null` if the parameter does not have the
-   * corresponding attribute. The [returnType] can be `null` if no return type
-   * was specified.
-   *
-   * Use [functionTypedFormalParameter2] instead.
-   */
+  /// Returns a newly created formal parameter. Either or both of the
+  /// [comment] and [metadata] can be `null` if the parameter does not have the
+  /// corresponding attribute. The [returnType] can be `null` if no return type
+  /// was specified.
+  ///
+  /// Use [functionTypedFormalParameter2] instead.
   @deprecated
   FunctionTypedFormalParameter functionTypedFormalParameter(
       Comment comment,
@@ -659,24 +504,21 @@
       TypeParameterList typeParameters,
       FormalParameterList parameters);
 
-  /**
-   * Returns a newly created formal parameter. Either or both of the
-   * [comment] and [metadata] can be `null` if the parameter does not have the
-   * corresponding attribute. The [returnType] can be `null` if no return type
-   * was specified.
-   */
+  /// Returns a newly created formal parameter. Either or both of the
+  /// [comment] and [metadata] can be `null` if the parameter does not have the
+  /// corresponding attribute. The [returnType] can be `null` if no return type
+  /// was specified.
   FunctionTypedFormalParameter functionTypedFormalParameter2(
       {Comment comment,
       List<Annotation> metadata,
       Token covariantKeyword,
+      Token requiredKeyword,
       TypeAnnotation returnType,
       @required SimpleIdentifier identifier,
       TypeParameterList typeParameters,
       @required FormalParameterList parameters});
 
-  /**
-   * Initialize a newly created generic function type.
-   */
+  /// Initialize a newly created generic function type.
   GenericFunctionType genericFunctionType(
       TypeAnnotation returnType,
       Token functionKeyword,
@@ -684,12 +526,10 @@
       FormalParameterList parameters,
       {Token question});
 
-  /**
-   * Returns a newly created generic type alias. Either or both of the
-   * [comment] and [metadata] can be `null` if the variable list does not have
-   * the corresponding attribute. The [typeParameters] can be `null` if there
-   * are no type parameters.
-   */
+  /// Returns a newly created generic type alias. Either or both of the
+  /// [comment] and [metadata] can be `null` if the variable list does not have
+  /// the corresponding attribute. The [typeParameters] can be `null` if there
+  /// are no type parameters.
   GenericTypeAlias genericTypeAlias(
       Comment comment,
       List<Annotation> metadata,
@@ -700,16 +540,12 @@
       GenericFunctionType functionType,
       Token semicolon);
 
-  /**
-   * Returns a newly created import show combinator.
-   */
+  /// Returns a newly created import show combinator.
   HideCombinator hideCombinator(
       Token keyword, List<SimpleIdentifier> hiddenNames);
 
-  /**
-   * Returns a newly created if element that can be part of a list, map or set
-   * literal.
-   */
+  /// Returns a newly created if element that can be part of a list, map or set
+  /// literal.
   IfElement ifElement(
       {Token ifKeyword,
       Token leftParenthesis,
@@ -719,10 +555,8 @@
       Token elseKeyword,
       CollectionElement elseElement});
 
-  /**
-   * Returns a newly created if statement. The [elseKeyword] and
-   * [elseStatement] can be `null` if there is no else clause.
-   */
+  /// Returns a newly created if statement. The [elseKeyword] and
+  /// [elseStatement] can be `null` if there is no else clause.
   IfStatement ifStatement(
       Token ifKeyword,
       Token leftParenthesis,
@@ -732,20 +566,16 @@
       Token elseKeyword,
       Statement elseStatement);
 
-  /**
-   * Returns a newly created implements clause.
-   */
+  /// Returns a newly created implements clause.
   ImplementsClause implementsClause(
       Token implementsKeyword, List<TypeName> interfaces);
 
-  /**
-   * Returns a newly created import directive. Either or both of the
-   * [comment] and [metadata] can be `null` if the function does not have the
-   * corresponding attribute. The [deferredKeyword] can be `null` if the import
-   * is not deferred. The [asKeyword] and [prefix] can be `null` if the import
-   * does not specify a prefix. The list of [combinators] can be `null` if there
-   * are no combinators.
-   */
+  /// Returns a newly created import directive. Either or both of the
+  /// [comment] and [metadata] can be `null` if the function does not have the
+  /// corresponding attribute. The [deferredKeyword] can be `null` if the import
+  /// is not deferred. The [asKeyword] and [prefix] can be `null` if the import
+  /// does not specify a prefix. The list of [combinators] can be `null` if
+  /// there are no combinators.
   ImportDirective importDirective(
       Comment comment,
       List<Annotation> metadata,
@@ -758,126 +588,70 @@
       List<Combinator> combinators,
       Token semicolon);
 
-  /**
-   * Returns a newly created index expression.
-   */
+  /// Returns a newly created index expression.
   IndexExpression indexExpressionForCascade(
       Token period, Token leftBracket, Expression index, Token rightBracket);
 
-  /**
-   * Returns a newly created index expression.
-   */
+  /// Returns a newly created index expression.
   IndexExpression indexExpressionForTarget(Expression target, Token leftBracket,
       Expression index, Token rightBracket);
 
-  /**
-   * Returns a newly created instance creation expression.
-   */
+  /// Returns a newly created instance creation expression.
   InstanceCreationExpression instanceCreationExpression(
       Token keyword, ConstructorName constructorName, ArgumentList argumentList,
       {TypeArgumentList typeArguments});
 
-  /**
-   * Returns a newly created integer literal.
-   */
+  /// Returns a newly created integer literal.
   IntegerLiteral integerLiteral(Token literal, int value);
 
-  /**
-   * Returns a newly created interpolation expression.
-   */
+  /// Returns a newly created interpolation expression.
   InterpolationExpression interpolationExpression(
       Token leftBracket, Expression expression, Token rightBracket);
 
-  /**
-   * Returns a newly created string of characters that are part of a string
-   * interpolation.
-   */
+  /// Returns a newly created string of characters that are part of a string
+  /// interpolation.
   InterpolationString interpolationString(Token contents, String value);
 
-  /**
-   * Returns a newly created is expression. The [notOperator] can be `null`
-   * if the sense of the test is not negated.
-   */
+  /// Returns a newly created is expression. The [notOperator] can be `null`
+  /// if the sense of the test is not negated.
   IsExpression isExpression(Expression expression, Token isOperator,
       Token notOperator, TypeAnnotation type);
 
-  /**
-   * Returns a newly created label.
-   */
+  /// Returns a newly created label.
   Label label(SimpleIdentifier label, Token colon);
 
-  /**
-   * Returns a newly created labeled statement.
-   */
+  /// Returns a newly created labeled statement.
   LabeledStatement labeledStatement(List<Label> labels, Statement statement);
 
-  /**
-   * Returns a newly created library directive. Either or both of the
-   * [comment] and [metadata] can be `null` if the directive does not have the
-   * corresponding attribute.
-   */
+  /// Returns a newly created library directive. Either or both of the
+  /// [comment] and [metadata] can be `null` if the directive does not have the
+  /// corresponding attribute.
   LibraryDirective libraryDirective(Comment comment, List<Annotation> metadata,
       Token libraryKeyword, LibraryIdentifier name, Token semicolon);
 
-  /**
-   * Returns a newly created prefixed identifier.
-   */
+  /// Returns a newly created prefixed identifier.
   LibraryIdentifier libraryIdentifier(List<SimpleIdentifier> components);
 
-  /**
-   * Returns a newly created list literal. The [constKeyword] can be `null`
-   * if the literal is not a constant. The [typeArguments] can be `null` if no
-   * type arguments were declared. The list of [elements] can be `null` if the
-   * list is empty.
-   */
+  /// Returns a newly created list literal. The [constKeyword] can be `null`
+  /// if the literal is not a constant. The [typeArguments] can be `null` if no
+  /// type arguments were declared. The list of [elements] can be `null` if the
+  /// list is empty.
   ListLiteral listLiteral(Token constKeyword, TypeArgumentList typeArguments,
-      Token leftBracket, List<Expression> elements, Token rightBracket);
+      Token leftBracket, List<CollectionElement> elements, Token rightBracket);
 
-  /**
-   * Returns a newly created list literal.
-   */
-  ListLiteral2 listLiteral2(
-      {Token constKeyword,
-      TypeArgumentList typeArguments,
-      Token leftBracket,
-      List<CollectionElement> elements,
-      Token rightBracket});
-
-  /**
-   * Returns a newly created map literal. The [constKeyword] can be `null` if
-   * the literal is not a constant. The [typeArguments] can be `null` if no type
-   * arguments were declared. The [entries] can be `null` if the map is empty.
-   */
-  MapLiteral mapLiteral(Token constKeyword, TypeArgumentList typeArguments,
-      Token leftBracket, List<MapLiteralEntry> entries, Token rightBracket);
-
-  /**
-   * Returns a newly created map literal.
-   */
-  MapLiteral2 mapLiteral2(
-      {Token constKeyword,
-      TypeArgumentList typeArguments,
-      Token leftBracket,
-      List<CollectionElement> entries,
-      Token rightBracket});
-
-  /**
-   * Returns a newly created map literal entry.
-   */
+  /// Returns a newly created map literal entry.
   MapLiteralEntry mapLiteralEntry(
       Expression key, Token separator, Expression value);
 
-  /**
-   * Returns a newly created method declaration. Either or both of the
-   * [comment] and [metadata] can be `null` if the declaration does not have the
-   * corresponding attribute. The [externalKeyword] can be `null` if the method
-   * is not external. The [modifierKeyword] can be `null` if the method is
-   * neither abstract nor static. The [returnType] can be `null` if no return
-   * type was specified. The [propertyKeyword] can be `null` if the method is
-   * neither a getter or a setter. The [operatorKeyword] can be `null` if the
-   * method does not implement an operator. The [parameters] must be `null` if
-   * this method declares a getter.
-   */
+  /// Returns a newly created method declaration. Either or both of the
+  /// [comment] and [metadata] can be `null` if the declaration does not have
+  /// the corresponding attribute. The [externalKeyword] can be `null` if the
+  /// method is not external. The [modifierKeyword] can be `null` if the method
+  /// is neither abstract nor static. The [returnType] can be `null` if no
+  /// return type was specified. The [propertyKeyword] can be `null` if the
+  /// method is neither a getter or a setter. The [operatorKeyword] can be
+  /// `null` if the method does not implement an operator. The [parameters] must
+  /// be `null` if this method declares a getter.
   MethodDeclaration methodDeclaration(
       Comment comment,
       List<Annotation> metadata,
@@ -891,10 +665,8 @@
       FormalParameterList parameters,
       FunctionBody body);
 
-  /**
-   * Returns a newly created method invocation. The [target] and [operator]
-   * can be `null` if there is no target.
-   */
+  /// Returns a newly created method invocation. The [target] and [operator]
+  /// can be `null` if there is no target.
   MethodInvocation methodInvocation(
       Expression target,
       Token operator,
@@ -902,9 +674,7 @@
       TypeArgumentList typeArguments,
       ArgumentList argumentList);
 
-  /**
-   * Return a newly created mixin declaration.
-   */
+  /// Return a newly created mixin declaration.
   MixinDeclaration mixinDeclaration(
       Comment comment,
       List<Annotation> metadata,
@@ -917,59 +687,41 @@
       List<ClassMember> members,
       Token rightBracket);
 
-  /**
-   * Returns a newly created named expression..
-   */
+  /// Returns a newly created named expression.
   NamedExpression namedExpression(Label name, Expression expression);
 
-  /**
-   * Returns a newly created native clause.
-   */
+  /// Returns a newly created native clause.
   NativeClause nativeClause(Token nativeKeyword, StringLiteral name);
 
-  /**
-   * Returns a newly created function body consisting of the 'native' token,
-   * a string literal, and a semicolon.
-   */
+  /// Returns a newly created function body consisting of the 'native' token,
+  /// a string literal, and a semicolon.
   NativeFunctionBody nativeFunctionBody(
       Token nativeKeyword, StringLiteral stringLiteral, Token semicolon);
 
-  /**
-   * Returns a newly created list of nodes such that all of the nodes that
-   * are added to the list will have their parent set to the given [owner]. The
-   * list will initially be populated with the given [elements].
-   */
+  /// Returns a newly created list of nodes such that all of the nodes that
+  /// are added to the list will have their parent set to the given [owner]. The
+  /// list will initially be populated with the given [elements].
   NodeList<E> nodeList<E extends AstNode>(AstNode owner, [List<E> elements]);
 
-  /**
-   * Returns a newly created null literal.
-   */
+  /// Returns a newly created null literal.
   NullLiteral nullLiteral(Token literal);
 
-  /**
-   * Return a newly created on clause.
-   */
+  /// Return a newly created on clause.
   OnClause onClause(Token onKeyword, List<TypeName> superclassConstraints);
 
-  /**
-   * Returns a newly created parenthesized expression.
-   */
+  /// Returns a newly created parenthesized expression.
   ParenthesizedExpression parenthesizedExpression(
       Token leftParenthesis, Expression expression, Token rightParenthesis);
 
-  /**
-   * Returns a newly created part directive. Either or both of the [comment]
-   * and [metadata] can be `null` if the directive does not have the
-   * corresponding attribute.
-   */
+  /// Returns a newly created part directive. Either or both of the [comment]
+  /// and [metadata] can be `null` if the directive does not have the
+  /// corresponding attribute.
   PartDirective partDirective(Comment comment, List<Annotation> metadata,
       Token partKeyword, StringLiteral partUri, Token semicolon);
 
-  /**
-   * Returns a newly created part-of directive. Either or both of the
-   * [comment] and [metadata] can be `null` if the directive does not have the
-   * corresponding attribute.
-   */
+  /// Returns a newly created part-of directive. Either or both of the
+  /// [comment] and [metadata] can be `null` if the directive does not have the
+  /// corresponding attribute.
   PartOfDirective partOfDirective(
       Comment comment,
       List<Annotation> metadata,
@@ -979,89 +731,61 @@
       LibraryIdentifier libraryName,
       Token semicolon);
 
-  /**
-   * Returns a newly created postfix expression.
-   */
+  /// Returns a newly created postfix expression.
   PostfixExpression postfixExpression(Expression operand, Token operator);
 
-  /**
-   * Returns a newly created prefixed identifier.
-   */
+  /// Returns a newly created prefixed identifier.
   PrefixedIdentifier prefixedIdentifier(
       SimpleIdentifier prefix, Token period, SimpleIdentifier identifier);
 
-  /**
-   * Returns a newly created prefix expression.
-   */
+  /// Returns a newly created prefix expression.
   PrefixExpression prefixExpression(Token operator, Expression operand);
 
-  /**
-   * Returns a newly created property access expression.
-   */
+  /// Returns a newly created property access expression.
   PropertyAccess propertyAccess(
       Expression target, Token operator, SimpleIdentifier propertyName);
 
-  /**
-   * Returns a newly created redirecting invocation to invoke the constructor
-   * with the given name with the given arguments. The [constructorName] can be
-   * `null` if the constructor being invoked is the unnamed constructor.
-   */
+  /// Returns a newly created redirecting invocation to invoke the constructor
+  /// with the given name with the given arguments. The [constructorName] can be
+  /// `null` if the constructor being invoked is the unnamed constructor.
   RedirectingConstructorInvocation redirectingConstructorInvocation(
       Token thisKeyword,
       Token period,
       SimpleIdentifier constructorName,
       ArgumentList argumentList);
 
-  /**
-   * Returns a newly created rethrow expression.
-   */
+  /// Returns a newly created rethrow expression.
   RethrowExpression rethrowExpression(Token rethrowKeyword);
 
-  /**
-   * Returns a newly created return statement. The [expression] can be `null`
-   * if no explicit value was provided.
-   */
+  /// Returns a newly created return statement. The [expression] can be `null`
+  /// if no explicit value was provided.
   ReturnStatement returnStatement(
       Token returnKeyword, Expression expression, Token semicolon);
 
-  /**
-   * Returns a newly created script tag.
-   */
+  /// Returns a newly created script tag.
   ScriptTag scriptTag(Token scriptTag);
 
-  /**
-   * Returns a newly created set literal. The [constKeyword] can be `null`
-   * if the literal is not a constant. The [typeArguments] can be `null` if no
-   * type arguments were declared. The list of [elements] can be `null` if the
-   * set is empty.
-   */
-  SetLiteral setLiteral(Token constKeyword, TypeArgumentList typeArguments,
-      Token leftBracket, List<Expression> elements, Token rightBracket);
-
-  /**
-   * Returns a newly created set literal.
-   */
-  SetLiteral2 setLiteral2(
+  /// Returns a newly created set or map literal. The [constKeyword] can be
+  /// `null` if the literal is not a constant. The [typeArguments] can be `null`
+  /// if no type arguments were declared. The list of [elements] can be `null`
+  /// if the set or map is empty.
+  SetOrMapLiteral setOrMapLiteral(
       {Token constKeyword,
       TypeArgumentList typeArguments,
       Token leftBracket,
       List<CollectionElement> elements,
       Token rightBracket});
 
-  /**
-   * Returns a newly created import show combinator.
-   */
+  /// Returns a newly created import show combinator.
   ShowCombinator showCombinator(
       Token keyword, List<SimpleIdentifier> shownNames);
 
-  /**
-   * Returns a newly created formal parameter. Either or both of the
-   * [comment] and [metadata] can be `null` if the parameter does not have the
-   * corresponding attribute. The [keyword] can be `null` if a type was
-   * specified. The [type] must be `null` if the keyword is 'var'.
-   *
-   * Use [simpleFormalParameter2] instead.
-   */
+  /// Returns a newly created formal parameter. Either or both of the
+  /// [comment] and [metadata] can be `null` if the parameter does not have the
+  /// corresponding attribute. The [keyword] can be `null` if a type was
+  /// specified. The [type] must be `null` if the keyword is 'var'.
+  ///
+  /// Use [simpleFormalParameter2] instead.
   @deprecated
   SimpleFormalParameter simpleFormalParameter(
       Comment comment,
@@ -1070,75 +794,56 @@
       TypeAnnotation type,
       SimpleIdentifier identifier);
 
-  /**
-   * Returns a newly created formal parameter. Either or both of the
-   * [comment] and [metadata] can be `null` if the parameter does not have the
-   * corresponding attribute. The [keyword] can be `null` if a type was
-   * specified. The [type] must be `null` if the keyword is 'var'.
-   */
+  /// Returns a newly created formal parameter. Either or both of the
+  /// [comment] and [metadata] can be `null` if the parameter does not have the
+  /// corresponding attribute. The [keyword] can be `null` if a type was
+  /// specified. The [type] must be `null` if the keyword is 'var'.
   SimpleFormalParameter simpleFormalParameter2(
       {Comment comment,
       List<Annotation> metadata,
       Token covariantKeyword,
+      Token requiredKeyword,
       Token keyword,
       TypeAnnotation type,
       @required SimpleIdentifier identifier});
 
-  /**
-   * Returns a newly created identifier.
-   */
+  /// Returns a newly created identifier.
   SimpleIdentifier simpleIdentifier(Token token, {bool isDeclaration: false});
 
-  /**
-   * Returns a newly created simple string literal.
-   */
+  /// Returns a newly created simple string literal.
   SimpleStringLiteral simpleStringLiteral(Token literal, String value);
 
-  /**
-   * Returns a newly created spread element.
-   */
+  /// Returns a newly created spread element.
   SpreadElement spreadElement({Token spreadOperator, Expression expression});
 
-  /**
-   * Returns a newly created string interpolation expression.
-   */
+  /// Returns a newly created string interpolation expression.
   StringInterpolation stringInterpolation(List<InterpolationElement> elements);
 
-  /**
-   * Returns a newly created super invocation to invoke the inherited
-   * constructor with the given name with the given arguments. The [period] and
-   * [constructorName] can be `null` if the constructor being invoked is the
-   * unnamed constructor.
-   */
+  /// Returns a newly created super invocation to invoke the inherited
+  /// constructor with the given name with the given arguments. The [period] and
+  /// [constructorName] can be `null` if the constructor being invoked is the
+  /// unnamed constructor.
   SuperConstructorInvocation superConstructorInvocation(
       Token superKeyword,
       Token period,
       SimpleIdentifier constructorName,
       ArgumentList argumentList);
 
-  /**
-   * Returns a newly created super expression.
-   */
+  /// Returns a newly created super expression.
   SuperExpression superExpression(Token superKeyword);
 
-  /**
-   * Returns a newly created switch case. The list of [labels] can be `null`
-   * if there are no labels.
-   */
+  /// Returns a newly created switch case. The list of [labels] can be `null`
+  /// if there are no labels.
   SwitchCase switchCase(List<Label> labels, Token keyword,
       Expression expression, Token colon, List<Statement> statements);
 
-  /**
-   * Returns a newly created switch default. The list of [labels] can be
-   * `null` if there are no labels.
-   */
+  /// Returns a newly created switch default. The list of [labels] can be
+  /// `null` if there are no labels.
   SwitchDefault switchDefault(List<Label> labels, Token keyword, Token colon,
       List<Statement> statements);
 
-  /**
-   * Returns a newly created switch statement. The list of [members] can be
-   * `null` if there are no switch members.
-   */
+  /// Returns a newly created switch statement. The list of [members] can be
+  /// `null` if there are no switch members.
   SwitchStatement switchStatement(
       Token switchKeyword,
       Token leftParenthesis,
@@ -1148,82 +853,60 @@
       List<SwitchMember> members,
       Token rightBracket);
 
-  /**
-   * Returns a newly created symbol literal.
-   */
+  /// Returns a newly created symbol literal.
   SymbolLiteral symbolLiteral(Token poundSign, List<Token> components);
 
-  /**
-   * Returns a newly created this expression.
-   */
+  /// Returns a newly created this expression.
   ThisExpression thisExpression(Token thisKeyword);
 
-  /**
-   * Returns a newly created throw expression.
-   */
+  /// Returns a newly created throw expression.
   ThrowExpression throwExpression(Token throwKeyword, Expression expression);
 
-  /**
-   * Returns a newly created top-level variable declaration. Either or both
-   * of the [comment] and [metadata] can be `null` if the variable does not have
-   * the corresponding attribute.
-   */
+  /// Returns a newly created top-level variable declaration. Either or both
+  /// of the [comment] and [metadata] can be `null` if the variable does not
+  /// have the corresponding attribute.
   TopLevelVariableDeclaration topLevelVariableDeclaration(
       Comment comment,
       List<Annotation> metadata,
       VariableDeclarationList variableList,
       Token semicolon);
 
-  /**
-   * Returns a newly created try statement. The list of [catchClauses] can be
-   * `null` if there are no catch clauses. The [finallyKeyword] and
-   * [finallyBlock] can be `null` if there is no finally clause.
-   */
+  /// Returns a newly created try statement. The list of [catchClauses] can be
+  /// `null` if there are no catch clauses. The [finallyKeyword] and
+  /// [finallyBlock] can be `null` if there is no finally clause.
   TryStatement tryStatement(Token tryKeyword, Block body,
       List<CatchClause> catchClauses, Token finallyKeyword, Block finallyBlock);
 
-  /**
-   * Returns a newly created list of type arguments.
-   */
+  /// Returns a newly created list of type arguments.
   TypeArgumentList typeArgumentList(
       Token leftBracket, List<TypeAnnotation> arguments, Token rightBracket);
 
-  /**
-   * Returns a newly created type name. The [typeArguments] can be `null` if
-   * there are no type arguments. The [question] can be `null` if there is no
-   * question mark.
-   */
+  /// Returns a newly created type name. The [typeArguments] can be `null` if
+  /// there are no type arguments. The [question] can be `null` if there is no
+  /// question mark.
   TypeName typeName(Identifier name, TypeArgumentList typeArguments,
       {Token question});
 
-  /**
-   * Returns a newly created type parameter. Either or both of the [comment]
-   * and [metadata] can be `null` if the parameter does not have the
-   * corresponding attribute. The [extendsKeyword] and [bound] can be `null` if
-   * the parameter does not have an upper bound.
-   */
+  /// Returns a newly created type parameter. Either or both of the [comment]
+  /// and [metadata] can be `null` if the parameter does not have the
+  /// corresponding attribute. The [extendsKeyword] and [bound] can be `null` if
+  /// the parameter does not have an upper bound.
   TypeParameter typeParameter(Comment comment, List<Annotation> metadata,
       SimpleIdentifier name, Token extendsKeyword, TypeAnnotation bound);
 
-  /**
-   * Returns a newly created list of type parameters.
-   */
+  /// Returns a newly created list of type parameters.
   TypeParameterList typeParameterList(Token leftBracket,
       List<TypeParameter> typeParameters, Token rightBracket);
 
-  /**
-   * Returns a newly created variable declaration. The [equals] and
-   * [initializer] can be `null` if there is no initializer.
-   */
+  /// Returns a newly created variable declaration. The [equals] and
+  /// [initializer] can be `null` if there is no initializer.
   VariableDeclaration variableDeclaration(
       SimpleIdentifier name, Token equals, Expression initializer);
 
-  /**
-   * Returns a newly created variable declaration list. Either or both of the
-   * [comment] and [metadata] can be `null` if the variable list does not have
-   * the corresponding attribute. The [keyword] can be `null` if a type was
-   * specified. The [type] must be `null` if the keyword is 'var'.
-   */
+  /// Returns a newly created variable declaration list. Either or both of the
+  /// [comment] and [metadata] can be `null` if the variable list does not have
+  /// the corresponding attribute. The [keyword] can be `null` if a type was
+  /// specified. The [type] must be `null` if the keyword is 'var'.
   VariableDeclarationList variableDeclarationList(
       Comment comment,
       List<Annotation> metadata,
@@ -1231,27 +914,19 @@
       TypeAnnotation type,
       List<VariableDeclaration> variables);
 
-  /**
-   * Returns a newly created variable declaration statement.
-   */
+  /// Returns a newly created variable declaration statement.
   VariableDeclarationStatement variableDeclarationStatement(
       VariableDeclarationList variableList, Token semicolon);
 
-  /**
-   * Returns a newly created while statement.
-   */
+  /// Returns a newly created while statement.
   WhileStatement whileStatement(Token whileKeyword, Token leftParenthesis,
       Expression condition, Token rightParenthesis, Statement body);
 
-  /**
-   * Returns a newly created with clause.
-   */
+  /// Returns a newly created with clause.
   WithClause withClause(Token withKeyword, List<TypeName> mixinTypes);
 
-  /**
-   * Returns a newly created yield expression. The [star] can be `null` if no
-   * star was provided.
-   */
+  /// Returns a newly created yield expression. The [star] can be `null` if no
+  /// star was provided.
   YieldStatement yieldStatement(
       Token yieldKeyword, Token star, Expression expression, Token semicolon);
 }
diff --git a/pkg/analyzer/lib/dart/ast/precedence.dart b/pkg/analyzer/lib/dart/ast/precedence.dart
new file mode 100644
index 0000000..aaed019
--- /dev/null
+++ b/pkg/analyzer/lib/dart/ast/precedence.dart
@@ -0,0 +1,95 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:front_end/src/scanner/token.dart';
+
+/// Opaque representation of Dart expression precedence.
+///
+/// [Expression] classes return an instance of this class to represent a
+/// particular row in the Dart expression precedence table.  This allows clients
+/// to determine when parentheses are needed (by comparing precedence values),
+/// but ensures that the client does not become dependent on the particular
+/// integers used by the analyzer to represent table rows, since we may need to
+/// change these integers from time to time to accommodate new language
+/// features.
+class Precedence {
+  static const Precedence none = Precedence._(NO_PRECEDENCE);
+
+  static const Precedence assignment = Precedence._(ASSIGNMENT_PRECEDENCE);
+
+  static const Precedence cascade = Precedence._(CASCADE_PRECEDENCE);
+
+  static const Precedence conditional = Precedence._(CONDITIONAL_PRECEDENCE);
+
+  static const Precedence ifNull = Precedence._(IF_NULL_PRECEDENCE);
+
+  static const Precedence logicalOr = Precedence._(LOGICAL_OR_PRECEDENCE);
+
+  static const Precedence logicalAnd = Precedence._(LOGICAL_AND_PRECEDENCE);
+
+  static const Precedence equality = Precedence._(EQUALITY_PRECEDENCE);
+
+  static const Precedence relational = Precedence._(RELATIONAL_PRECEDENCE);
+
+  static const Precedence bitwiseOr = Precedence._(BITWISE_OR_PRECEDENCE);
+
+  static const Precedence bitwiseXor = Precedence._(BITWISE_XOR_PRECEDENCE);
+
+  static const Precedence bitwiseAnd = Precedence._(BITWISE_AND_PRECEDENCE);
+
+  static const Precedence shift = Precedence._(SHIFT_PRECEDENCE);
+
+  static const Precedence additive = Precedence._(ADDITIVE_PRECEDENCE);
+
+  static const Precedence multiplicative =
+      Precedence._(MULTIPLICATIVE_PRECEDENCE);
+
+  static const Precedence prefix = Precedence._(PREFIX_PRECEDENCE);
+
+  static const Precedence postfix = Precedence._(POSTFIX_PRECEDENCE);
+
+  static const Precedence primary = Precedence._(SELECTOR_PRECEDENCE);
+
+  final int _index;
+
+  /// Constructs the precedence for a unary or binary expression constructed
+  /// from an operator of the given [type].
+  Precedence.forTokenType(TokenType type) : this._(type.precedence);
+
+  const Precedence._(this._index);
+
+  int get hashCode => _index.hashCode;
+
+  /// Returns `true` if this precedence represents a looser binding than
+  /// [other]; that is, parsing ambiguities will be resolved in favor of
+  /// nesting the expression having precedence [other] within the expression
+  /// having precedence `this`.
+  bool operator <(Precedence other) => _index < other._index;
+
+  /// Returns `true` if this precedence represents a looser, or equal, binding
+  /// than [other]; that is, parsing ambiguities will be resolved in favor of
+  /// nesting the expression having precedence [other] within the expression
+  /// having precedence `this`, or, if the precedences are equal, parsing
+  /// ambiguities will be resolved according to the associativity of the
+  /// expression precedence.
+  bool operator <=(Precedence other) => _index <= other._index;
+
+  @override
+  bool operator ==(Object other) =>
+      other is Precedence && _index == other._index;
+
+  /// Returns `true` if this precedence represents a tighter binding than
+  /// [other]; that is, parsing ambiguities will be resolved in favor of
+  /// nesting the expression having precedence `this` within the expression
+  /// having precedence [other].
+  bool operator >(Precedence other) => _index > other._index;
+
+  /// Returns `true` if this precedence represents a tighter, or equal, binding
+  /// than [other]; that is, parsing ambiguities will be resolved in favor of
+  /// nesting the expression having precedence `this` within the expression
+  /// having precedence [other], or, if the precedences are equal, parsing
+  /// ambiguities will be resolved according to the associativity of the
+  /// expression precedence.
+  bool operator >=(Precedence other) => _index >= other._index;
+}
diff --git a/pkg/analyzer/lib/dart/ast/resolution_map.dart b/pkg/analyzer/lib/dart/ast/resolution_map.dart
index 3762587..83a4820 100644
--- a/pkg/analyzer/lib/dart/ast/resolution_map.dart
+++ b/pkg/analyzer/lib/dart/ast/resolution_map.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -6,333 +6,259 @@
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 
-/**
- * A collection of methods which may be used to map from nodes in a resolved AST
- * to elements and types in the element model.
- *
- * Clients should not extend, implement or mix-in this class.
- */
+/// A collection of methods which may be used to map from nodes in a resolved
+/// AST to elements and types in the element model.
+///
+/// Clients should not extend, implement or mix-in this class.
 abstract class ResolutionMap {
-  /**
-   * Return the best element available for the function being invoked at [node].
-   * If resolution was able to find a better element based on type propagation,
-   * that element will be returned. Otherwise, the element found using the
-   * result of static analysis will be returned. If resolution has not been
-   * performed, then `null` will be returned.
-   *
-   * Deprecated: The analyzer no longer computes propagated type information.
-   * Use [staticElementForFunctionExpressionInvocation] instead.
-   */
+  /// Return the best element available for the function being invoked at
+  /// [node]. If resolution was able to find a better element based on type
+  /// propagation, that element will be returned. Otherwise, the element found
+  /// using the result of static analysis will be returned. If resolution has
+  /// not been performed, then `null` will be returned.
+  ///
+  /// Deprecated: The analyzer no longer computes propagated type information.
+  /// Use [staticElementForFunctionExpressionInvocation] instead.
   @deprecated
   ExecutableElement bestElementForFunctionExpressionInvocation(
       FunctionExpressionInvocation node);
 
-  /**
-   * Return the best element available for the identifier [node]. If resolution
-   * was able to find a better element based on type propagation, that element
-   * will be returned. Otherwise, the element found using the result of static
-   * analysis will be returned. If resolution has not been performed, then
-   * `null` will be returned.
-   *
-   * Deprecated: The analyzer no longer computes propagated type information.
-   * Use [staticElementForIdentifier] instead.
-   */
+  /// Return the best element available for the identifier [node]. If resolution
+  /// was able to find a better element based on type propagation, that element
+  /// will be returned. Otherwise, the element found using the result of static
+  /// analysis will be returned. If resolution has not been performed, then
+  /// `null` will be returned.
+  ///
+  /// Deprecated: The analyzer no longer computes propagated type information.
+  /// Use [staticElementForIdentifier] instead.
   @deprecated
   Element bestElementForIdentifier(Identifier node);
 
-  /**
-   * Return the best element available for the expression [node]. If resolution
-   * was able to find a better element based on type propagation, that element
-   * will be returned. Otherwise, the element found using the result of static
-   * analysis will be returned. If resolution has not been performed, then
-   * `null` will be returned.
-   *
-   * Deprecated: The analyzer no longer computes propagated type information.
-   * Use [staticElementForMethodReference] instead.
-   */
+  /// Return the best element available for the expression [node]. If resolution
+  /// was able to find a better element based on type propagation, that element
+  /// will be returned. Otherwise, the element found using the result of static
+  /// analysis will be returned. If resolution has not been performed, then
+  /// `null` will be returned.
+  ///
+  /// Deprecated: The analyzer no longer computes propagated type information.
+  /// Use [staticElementForMethodReference] instead.
   @deprecated
   MethodElement bestElementForMethodReference(MethodReferenceExpression node);
 
-  /**
-   * Return the best parameter element information available for the expression
-   * [node]. If type propagation was able to find a better parameter element
-   * than static analysis, that type will be returned. Otherwise, the result of
-   * static analysis will be returned.
-   *
-   * Deprecated: The analyzer no longer computes propagated type information.
-   * Use [staticParameterElementForExpression] instead.
-   */
+  /// Return the best parameter element information available for the expression
+  /// [node]. If type propagation was able to find a better parameter element
+  /// than static analysis, that type will be returned. Otherwise, the result of
+  /// static analysis will be returned.
+  ///
+  /// Deprecated: The analyzer no longer computes propagated type information.
+  /// Use [staticParameterElementForExpression] instead.
   @deprecated
   ParameterElement bestParameterElementForExpression(Expression node);
 
-  /**
-   * Return the best type information available for the expression [node]. If
-   * type propagation was able to find a better type than static analysis, that
-   * type will be returned. Otherwise, the result of static analysis will be
-   * returned. If no type analysis has been performed, then the type 'dynamic'
-   * will be returned.
-   *
-   * Deprecated: The analyzer no longer computes propagated type information.
-   * Use [staticTypeForExpression] instead.
-   */
+  /// Return the best type information available for the expression [node]. If
+  /// type propagation was able to find a better type than static analysis, that
+  /// type will be returned. Otherwise, the result of static analysis will be
+  /// returned. If no type analysis has been performed, then the type 'dynamic'
+  /// will be returned.
+  ///
+  /// Deprecated: The analyzer no longer computes propagated type information.
+  /// Use [staticTypeForExpression] instead.
   @deprecated
   DartType bestTypeForExpression(Expression node);
 
-  /**
-   * Return the element annotation representing the annotation [node] in the
-   * element model.
-   */
+  /// Return the element annotation representing the annotation [node] in the
+  /// element model.
   ElementAnnotation elementAnnotationForAnnotation(Annotation node);
 
-  /**
-   * Return the element associated with the declaration [node], or `null` if
-   * either this node corresponds to a list of declarations or if the AST
-   * structure has not been resolved.
-   */
+  /// Return the element associated with the declaration [node], or `null` if
+  /// either this node corresponds to a list of declarations or if the AST
+  /// structure has not been resolved.
   ClassElement elementDeclaredByClassDeclaration(ClassDeclaration node);
 
-  /**
-   * Return the element associated with the compilation unit [node], or `null`
-   * if the AST structure has not been resolved.
-   */
+  /// Return the element associated with the compilation unit [node], or `null`
+  /// if the AST structure has not been resolved.
   CompilationUnitElement elementDeclaredByCompilationUnit(CompilationUnit node);
 
-  /**
-   * Return the element associated with the declaration [node], or `null` if
-   * either this node corresponds to a list of declarations or if the AST
-   * structure has not been resolved.
-   */
+  /// Return the element associated with the declaration [node], or `null` if
+  /// either this node corresponds to a list of declarations or if the AST
+  /// structure has not been resolved.
   ConstructorElement elementDeclaredByConstructorDeclaration(
       ConstructorDeclaration node);
 
-  /**
-   * Return the element associated with the declaration [node], or `null` if
-   * either this node corresponds to a list of declarations or if the AST
-   * structure has not been resolved.
-   */
+  /// Return the element associated with the declaration [node], or `null` if
+  /// either this node corresponds to a list of declarations or if the AST
+  /// structure has not been resolved.
   Element elementDeclaredByDeclaration(Declaration node);
 
-  /**
-   * Return the element associated with the declaration [node], or `null` if
-   * either this node corresponds to a list of declarations or if the AST
-   * structure has not been resolved.
-   */
+  /// Return the element associated with the declaration [node], or `null` if
+  /// either this node corresponds to a list of declarations or if the AST
+  /// structure has not been resolved.
   LocalVariableElement elementDeclaredByDeclaredIdentifier(
       DeclaredIdentifier node);
 
-  /**
-   * Return the element associated with the directive [node], or `null` if the
-   * AST structure has not been resolved or if this directive could not be
-   * resolved.
-   */
+  /// Return the element associated with the directive [node], or `null` if the
+  /// AST structure has not been resolved or if this directive could not be
+  /// resolved.
   Element elementDeclaredByDirective(Directive node);
 
-  /**
-   * Return the element associated with the declaration [node], or `null` if
-   * either this node corresponds to a list of declarations or if the AST
-   * structure has not been resolved.
-   */
+  /// Return the element associated with the declaration [node], or `null` if
+  /// either this node corresponds to a list of declarations or if the AST
+  /// structure has not been resolved.
   ClassElement elementDeclaredByEnumDeclaration(EnumDeclaration node);
 
-  /**
-   * Return the element representing the parameter [node], or `null` if this
-   * parameter has not been resolved.
-   */
+  /// Return the element representing the parameter [node], or `null` if this
+  /// parameter has not been resolved.
   ParameterElement elementDeclaredByFormalParameter(FormalParameter node);
 
-  /**
-   * Return the element associated with the declaration [node], or `null` if
-   * either this node corresponds to a list of declarations or if the AST
-   * structure has not been resolved.
-   */
+  /// Return the element associated with the declaration [node], or `null` if
+  /// either this node corresponds to a list of declarations or if the AST
+  /// structure has not been resolved.
   ExecutableElement elementDeclaredByFunctionDeclaration(
       FunctionDeclaration node);
 
-  /**
-   * Return the element associated with the function expression [node], or
-   * `null` if the AST structure has not been resolved.
-   */
+  /// Return the element associated with the function expression [node], or
+  /// `null` if the AST structure has not been resolved.
   ExecutableElement elementDeclaredByFunctionExpression(
       FunctionExpression node);
 
-  /**
-   * Return the element associated with the declaration [node], or `null` if
-   * either this node corresponds to a list of declarations or if the AST
-   * structure has not been resolved.
-   */
+  /// Return the element associated with the declaration [node], or `null` if
+  /// either this node corresponds to a list of declarations or if the AST
+  /// structure has not been resolved.
   ExecutableElement elementDeclaredByMethodDeclaration(MethodDeclaration node);
 
-  /**
-   * Return the element associated with the declaration [node], or `null` if
-   * either this node corresponds to a list of declarations or if the AST
-   * structure has not been resolved.
-   */
+  /// Return the element associated with the declaration [node], or `null` if
+  /// either this node corresponds to a list of declarations or if the AST
+  /// structure has not been resolved.
   ClassElement elementDeclaredByMixinDeclaration(MixinDeclaration node);
 
-  /**
-   * Return the element associated with the declaration [node], or `null` if
-   * either this node corresponds to a list of declarations or if the AST
-   * structure has not been resolved.
-   */
+  /// Return the element associated with the declaration [node], or `null` if
+  /// either this node corresponds to a list of declarations or if the AST
+  /// structure has not been resolved.
   VariableElement elementDeclaredByVariableDeclaration(
       VariableDeclaration node);
 
-  /**
-   * Return the element associated with the annotation [node], or `null` if the
-   * AST structure has not been resolved or if this annotation could not be
-   * resolved.
-   */
+  /// Return the element associated with the annotation [node], or `null` if the
+  /// AST structure has not been resolved or if this annotation could not be
+  /// resolved.
   Element elementForAnnotation(Annotation node);
 
-  /**
-   * Return the element representing the parameter being named by the
-   * expression [node], or `null` if the AST structure has not been resolved or
-   * if there is no parameter with the same name as this expression.
-   */
+  /// Return the element representing the parameter being named by the
+  /// expression [node], or `null` if the AST structure has not been resolved or
+  /// if there is no parameter with the same name as this expression.
   ParameterElement elementForNamedExpression(NamedExpression node);
 
-  /**
-   * Return a list containing the elements representing the parameters in the
-   * list [node]. The list will contain `null`s if the parameters in this list
-   * have not been resolved.
-   */
+  /// Return a list containing the elements representing the parameters in the
+  /// list [node]. The list will contain `null`s if the parameters in this list
+  /// have not been resolved.
   List<ParameterElement> parameterElementsForFormalParameterList(
       FormalParameterList node);
 
-  /**
-   * Return the element associated with the function being invoked at [node]
-   * based on propagated type information, or `null` if the AST structure has
-   * not been resolved or the function could not be resolved.
-   *
-   * Deprecated: The analyzer no longer computes propagated type information.
-   * Use [staticElementForFunctionExpressionInvocation] instead.
-   */
+  /// Return the element associated with the function being invoked at [node]
+  /// based on propagated type information, or `null` if the AST structure has
+  /// not been resolved or the function could not be resolved.
+  ///
+  /// Deprecated: The analyzer no longer computes propagated type information.
+  /// Use [staticElementForFunctionExpressionInvocation] instead.
   @deprecated
   ExecutableElement propagatedElementForFunctionExpressionInvocation(
       FunctionExpressionInvocation node);
 
-  /**
-   * Return the element associated with the identifier [node] based on
-   * propagated type information, or `null` if the AST structure has not been
-   * resolved or if this identifier could not be resolved. One example of the
-   * latter case is an identifier that is not defined within the scope in which
-   * it appears.
-   *
-   * Deprecated: The analyzer no longer computes propagated type information.
-   * Use [staticElementForIdentifier] instead.
-   */
+  /// Return the element associated with the identifier [node] based on
+  /// propagated type information, or `null` if the AST structure has not been
+  /// resolved or if this identifier could not be resolved. One example of the
+  /// latter case is an identifier that is not defined within the scope in which
+  /// it appears.
+  ///
+  /// Deprecated: The analyzer no longer computes propagated type information.
+  /// Use [staticElementForIdentifier] instead.
   @deprecated
   Element propagatedElementForIdentifier(Identifier node);
 
-  /**
-   * Return the element associated with the expression [node] based on
-   * propagated types, or `null` if the AST structure has not been resolved, or
-   * there is no meaningful propagated element to return (e.g. because this is a
-   * non-compound assignment expression, or because the method referred to could
-   * not be resolved).
-   *
-   * Deprecated: The analyzer no longer computes propagated type information.
-   * Use [staticElementForMethodReference] instead.
-   */
+  /// Return the element associated with the expression [node] based on
+  /// propagated types, or `null` if the AST structure has not been resolved, or
+  /// there is no meaningful propagated element to return (e.g. because this is
+  /// a non-compound assignment expression, or because the method referred to
+  /// could not be resolved).
+  ///
+  /// Deprecated: The analyzer no longer computes propagated type information.
+  /// Use [staticElementForMethodReference] instead.
   @deprecated
   MethodElement propagatedElementForMethodReference(
       MethodReferenceExpression node);
 
-  /**
-   * If the expression [node] is an argument to an invocation, and the AST
-   * structure has been resolved, and the function being invoked is known based
-   * on propagated type information, and [node] corresponds to one of the
-   * parameters of the function being invoked, then return the parameter element
-   * representing the parameter to which the value of [node] will be
-   * bound. Otherwise, return `null`.
-   *
-   * Deprecated: The analyzer no longer computes propagated type information.
-   * Use [staticParameterElementForExpression] instead.
-   */
+  /// If the expression [node] is an argument to an invocation, and the AST
+  /// structure has been resolved, and the function being invoked is known based
+  /// on propagated type information, and [node] corresponds to one of the
+  /// parameters of the function being invoked, then return the parameter
+  /// element representing the parameter to which the value of [node] will be
+  /// bound. Otherwise, return `null`.
+  ///
+  /// Deprecated: The analyzer no longer computes propagated type information.
+  /// Use [staticParameterElementForExpression] instead.
   @deprecated
   ParameterElement propagatedParameterElementForExpression(Expression node);
 
-  /**
-   * Return the propagated type of the expression [node], or `null` if type
-   * propagation has not been performed on the AST structure.
-   *
-   * Deprecated: The analyzer no longer computes propagated type information.
-   * Use [staticTypeForExpression] instead.
-   */
+  /// Return the propagated type of the expression [node], or `null` if type
+  /// propagation has not been performed on the AST structure.
+  ///
+  /// Deprecated: The analyzer no longer computes propagated type information.
+  /// Use [staticTypeForExpression] instead.
   @deprecated
   DartType propagatedTypeForExpression(Expression node);
 
-  /**
-   * Return the element associated with the constructor referenced by [node]
-   * based on static type information, or `null` if the AST structure has not
-   * been resolved or if the constructor could not be resolved.
-   */
+  /// Return the element associated with the constructor referenced by [node]
+  /// based on static type information, or `null` if the AST structure has not
+  /// been resolved or if the constructor could not be resolved.
   ConstructorElement staticElementForConstructorReference(
       ConstructorReferenceNode node);
 
-  /**
-   * Return the element associated with the function being invoked at [node]
-   * based on static type information, or `null` if the AST structure has not
-   * been resolved or the function could not be resolved.
-   */
+  /// Return the element associated with the function being invoked at [node]
+  /// based on static type information, or `null` if the AST structure has not
+  /// been resolved or the function could not be resolved.
   ExecutableElement staticElementForFunctionExpressionInvocation(
       FunctionExpressionInvocation node);
 
-  /**
-   * Return the element associated with the identifier [node] based on static
-   * type information, or `null` if the AST structure has not been resolved or
-   * if this identifier could not be resolved. One example of the latter case is
-   * an identifier that is not defined within the scope in which it appears
-   */
+  /// Return the element associated with the identifier [node] based on static
+  /// type information, or `null` if the AST structure has not been resolved or
+  /// if this identifier could not be resolved. One example of the latter case
+  /// is an identifier that is not defined within the scope in which it appears.
   Element staticElementForIdentifier(Identifier node);
 
-  /**
-   * Return the element associated with the expression [node] based on the
-   * static types, or `null` if the AST structure has not been resolved, or
-   * there is no meaningful static element to return (e.g. because this is a
-   * non-compound assignment expression, or because the method referred to could
-   * not be resolved).
-   */
+  /// Return the element associated with the expression [node] based on the
+  /// static types, or `null` if the AST structure has not been resolved, or
+  /// there is no meaningful static element to return (e.g. because this is a
+  /// non-compound assignment expression, or because the method referred to
+  /// could not be resolved).
   MethodElement staticElementForMethodReference(MethodReferenceExpression node);
 
-  /**
-   * Return the function type of the invocation [node] based on the static type
-   * information, or `null` if the AST structure has not been resolved, or if
-   * the invoke could not be resolved.
-   *
-   * This will usually be a [FunctionType], but it can also be an
-   * [InterfaceType] with a `call` method, `dynamic`, `Function`, or a `@proxy`
-   * interface type that implements `Function`.
-   */
+  /// Return the function type of the invocation [node] based on the static type
+  /// information, or `null` if the AST structure has not been resolved, or if
+  /// the invoke could not be resolved.
+  ///
+  /// This will usually be a [FunctionType], but it can also be an
+  /// [InterfaceType] with a `call` method, `dynamic`, `Function`, or a `@proxy`
+  /// interface type that implements `Function`.
   DartType staticInvokeTypeForInvocationExpression(InvocationExpression node);
 
-  /**
-   * If the expression [node] is an argument to an invocation, and the AST
-   * structure has been resolved, and the function being invoked is known based
-   * on static type information, and [node] corresponds to one of the parameters
-   * of the function being invoked, then return the parameter element
-   * representing the parameter to which the value of [node] will be
-   * bound. Otherwise, return `null`.
-   */
+  /// If the expression [node] is an argument to an invocation, and the AST
+  /// structure has been resolved, and the function being invoked is known based
+  /// on static type information, and [node] corresponds to one of the
+  /// parameters of the function being invoked, then return the parameter
+  /// element representing the parameter to which the value of [node] will be
+  /// bound. Otherwise, return `null`.
   ParameterElement staticParameterElementForExpression(Expression node);
 
-  /**
-   * Return the static type of the expression [node], or `null` if the AST
-   * structure has not been resolved.
-   */
+  /// Return the static type of the expression [node], or `null` if the AST
+  /// structure has not been resolved.
   DartType staticTypeForExpression(Expression node);
 
-  /**
-   * Return the type being named by [node], or `null` if the AST structure has
-   * not been resolved.
-   */
+  /// Return the type being named by [node], or `null` if the AST structure has
+  /// not been resolved.
   DartType typeForTypeName(TypeAnnotation node);
 
-  /**
-   * Return the element associated with the uri of the directive [node], or
-   * `null` if the AST structure has not been resolved or if the URI could not
-   * be resolved. Examples of the latter case include a directive that contains
-   * an invalid URL or a URL that does not exist.
-   */
+  /// Return the element associated with the uri of the directive [node], or
+  /// `null` if the AST structure has not been resolved or if the URI could not
+  /// be resolved. Examples of the latter case include a directive that contains
+  /// an invalid URL or a URL that does not exist.
   Element uriElementForDirective(UriBasedDirective node);
 }
diff --git a/pkg/analyzer/lib/dart/ast/standard_ast_factory.dart b/pkg/analyzer/lib/dart/ast/standard_ast_factory.dart
index 9333242..acb1366 100644
--- a/pkg/analyzer/lib/dart/ast/standard_ast_factory.dart
+++ b/pkg/analyzer/lib/dart/ast/standard_ast_factory.dart
@@ -1,11 +1,9 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/dart/ast/ast_factory.dart';
 import 'package:analyzer/src/dart/ast/ast_factory.dart';
 
-/**
- * Gets an instance of [AstFactory] based on the standard AST implementation.
- */
+/// Gets an instance of [AstFactory] based on the standard AST implementation.
 final AstFactory astFactory = new AstFactoryImpl();
diff --git a/pkg/analyzer/lib/dart/ast/standard_resolution_map.dart b/pkg/analyzer/lib/dart/ast/standard_resolution_map.dart
index c778063..3353e19 100644
--- a/pkg/analyzer/lib/dart/ast/standard_resolution_map.dart
+++ b/pkg/analyzer/lib/dart/ast/standard_resolution_map.dart
@@ -1,11 +1,10 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/dart/ast/resolution_map.dart';
 import 'package:analyzer/src/dart/ast/resolution_map.dart';
 
-/**
- * Gets an instance of [ResolutionMap] based on the standard AST implementation.
- */
+/// Gets an instance of [ResolutionMap] based on the standard AST
+/// implementation.
 final ResolutionMap resolutionMap = new ResolutionMapImpl();
diff --git a/pkg/analyzer/lib/dart/ast/token.dart b/pkg/analyzer/lib/dart/ast/token.dart
index 73e0562..4262a60 100644
--- a/pkg/analyzer/lib/dart/ast/token.dart
+++ b/pkg/analyzer/lib/dart/ast/token.dart
@@ -2,9 +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.
 
-/**
- * Defines the tokens that are produced by the scanner, used by the parser, and
- * referenced from the [AST structure](ast.dart).
- */
+/// Defines the tokens that are produced by the scanner, used by the parser, and
+/// referenced from the [AST structure](ast.dart).
 export 'package:front_end/src/scanner/token.dart'
     show Keyword, Token, TokenType;
diff --git a/pkg/analyzer/lib/dart/ast/visitor.dart b/pkg/analyzer/lib/dart/ast/visitor.dart
index 4c599e8..6646631 100644
--- a/pkg/analyzer/lib/dart/ast/visitor.dart
+++ b/pkg/analyzer/lib/dart/ast/visitor.dart
@@ -2,78 +2,67 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/**
- * Defines AST visitors that support useful patterns for visiting the nodes in
- * an [AST structure](ast.dart).
- *
- * Dart is an evolving language, and the AST structure must evolved with it.
- * When the AST structure changes, the visitor interface will sometimes change
- * as well. If it is desirable to get a compilation error when the structure of
- * the AST has been modified, then you should consider implementing the
- * interface [AstVisitor] directly. Doing so will ensure that changes that
- * introduce new classes of nodes will be flagged. (Of course, not all changes
- * to the AST structure require the addition of a new class of node, and hence
- * cannot be caught this way.)
- *
- * But if automatic detection of these kinds of changes is not necessary then
- * you will probably want to extend one of the classes in this library because
- * doing so will simplify the task of writing your visitor and guard against
- * future changes to the AST structure. For example, the [RecursiveAstVisitor]
- * automates the process of visiting all of the descendants of a node.
- */
+/// Defines AST visitors that support useful patterns for visiting the nodes in
+/// an [AST structure](ast.dart).
+///
+/// Dart is an evolving language, and the AST structure must evolved with it.
+/// When the AST structure changes, the visitor interface will sometimes change
+/// as well. If it is desirable to get a compilation error when the structure of
+/// the AST has been modified, then you should consider implementing the
+/// interface [AstVisitor] directly. Doing so will ensure that changes that
+/// introduce new classes of nodes will be flagged. (Of course, not all changes
+/// to the AST structure require the addition of a new class of node, and hence
+/// cannot be caught this way.)
+///
+/// But if automatic detection of these kinds of changes is not necessary then
+/// you will probably want to extend one of the classes in this library because
+/// doing so will simplify the task of writing your visitor and guard against
+/// future changes to the AST structure. For example, the [RecursiveAstVisitor]
+/// automates the process of visiting all of the descendants of a node.
 import 'dart:collection';
 
 import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/src/dart/ast/utilities.dart' show UIAsCodeVisitorMixin;
 
-/**
- * An AST visitor that will recursively visit all of the nodes in an AST
- * structure, similar to [GeneralizingAstVisitor]. This visitor uses a
- * breadth-first ordering rather than the depth-first ordering of
- * [GeneralizingAstVisitor].
- *
- * Subclasses that override a visit method must either invoke the overridden
- * visit method or explicitly invoke the more general visit method. Failure to
- * do so will cause the visit methods for superclasses of the node to not be
- * invoked and will cause the children of the visited node to not be visited.
- *
- * In addition, subclasses should <b>not</b> explicitly visit the children of a
- * node, but should ensure that the method [visitNode] is used to visit the
- * children (either directly or indirectly). Failure to do will break the order
- * in which nodes are visited.
- *
- * Note that, unlike other visitors that begin to visit a structure of nodes by
- * asking the root node in the structure to accept the visitor, this visitor
- * requires that clients start the visit by invoking the method [visitAllNodes]
- * defined on the visitor with the root node as the argument:
- *
- *     visitor.visitAllNodes(rootNode);
- *
- * Clients may extend this class.
- */
+/// An AST visitor that will recursively visit all of the nodes in an AST
+/// structure, similar to [GeneralizingAstVisitor]. This visitor uses a
+/// breadth-first ordering rather than the depth-first ordering of
+/// [GeneralizingAstVisitor].
+///
+/// Subclasses that override a visit method must either invoke the overridden
+/// visit method or explicitly invoke the more general visit method. Failure to
+/// do so will cause the visit methods for superclasses of the node to not be
+/// invoked and will cause the children of the visited node to not be visited.
+///
+/// In addition, subclasses should <b>not</b> explicitly visit the children of a
+/// node, but should ensure that the method [visitNode] is used to visit the
+/// children (either directly or indirectly). Failure to do will break the order
+/// in which nodes are visited.
+///
+/// Note that, unlike other visitors that begin to visit a structure of nodes by
+/// asking the root node in the structure to accept the visitor, this visitor
+/// requires that clients start the visit by invoking the method [visitAllNodes]
+/// defined on the visitor with the root node as the argument:
+///
+///     visitor.visitAllNodes(rootNode);
+///
+/// Clients may extend this class.
 class BreadthFirstVisitor<R> extends GeneralizingAstVisitor<R> {
-  /**
-   * A queue holding the nodes that have not yet been visited in the order in
-   * which they ought to be visited.
-   */
+  /// A queue holding the nodes that have not yet been visited in the order in
+  /// which they ought to be visited.
   Queue<AstNode> _queue = new Queue<AstNode>();
 
-  /**
-   * A visitor, used to visit the children of the current node, that will add
-   * the nodes it visits to the [_queue].
-   */
+  /// A visitor, used to visit the children of the current node, that will add
+  /// the nodes it visits to the [_queue].
   _BreadthFirstChildVisitor _childVisitor;
 
-  /**
-   * Initialize a newly created visitor.
-   */
+  /// Initialize a newly created visitor.
   BreadthFirstVisitor() {
     _childVisitor = new _BreadthFirstChildVisitor(this);
   }
 
-  /**
-   * Visit all nodes in the tree starting at the given [root] node, in
-   * breadth-first order.
-   */
+  /// Visit all nodes in the tree starting at the given [root] node, in
+  /// breadth-first order.
   void visitAllNodes(AstNode root) {
     _queue.add(root);
     while (!_queue.isEmpty) {
@@ -89,33 +78,27 @@
   }
 }
 
-/**
- * An AST visitor that will recursively visit all of the nodes in an AST
- * structure. For each node that is visited, the corresponding visit method on
- * one or more other visitors (the 'delegates') will be invoked.
- *
- * For example, if an instance of this class is created with two delegates V1
- * and V2, and that instance is used to visit the expression 'x + 1', then the
- * following visit methods will be invoked:
- * 1. V1.visitBinaryExpression
- * 2. V2.visitBinaryExpression
- * 3. V1.visitSimpleIdentifier
- * 4. V2.visitSimpleIdentifier
- * 5. V1.visitIntegerLiteral
- * 6. V2.visitIntegerLiteral
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// An AST visitor that will recursively visit all of the nodes in an AST
+/// structure. For each node that is visited, the corresponding visit method on
+/// one or more other visitors (the 'delegates') will be invoked.
+///
+/// For example, if an instance of this class is created with two delegates V1
+/// and V2, and that instance is used to visit the expression 'x + 1', then the
+/// following visit methods will be invoked:
+/// 1. V1.visitBinaryExpression
+/// 2. V2.visitBinaryExpression
+/// 3. V1.visitSimpleIdentifier
+/// 4. V2.visitSimpleIdentifier
+/// 5. V1.visitIntegerLiteral
+/// 6. V2.visitIntegerLiteral
+///
+/// Clients may not extend, implement or mix-in this class.
 class DelegatingAstVisitor<T> extends UnifyingAstVisitor<T> {
-  /**
-   * The delegates whose visit methods will be invoked.
-   */
+  /// The delegates whose visit methods will be invoked.
   final Iterable<AstVisitor<T>> delegates;
 
-  /**
-   * Initialize a newly created visitor to use each of the given delegate
-   * visitors to visit the nodes of an AST structure.
-   */
+  /// Initialize a newly created visitor to use each of the given delegate
+  /// visitors to visit the nodes of an AST structure.
   DelegatingAstVisitor(this.delegates);
 
   @override
@@ -128,26 +111,26 @@
   }
 }
 
-/**
- * An AST visitor that will recursively visit all of the nodes in an AST
- * structure (like instances of the class [RecursiveAstVisitor]). In addition,
- * when a node of a specific type is visited not only will the visit method for
- * that specific type of node be invoked, but additional methods for the
- * superclasses of that node will also be invoked. For example, using an
- * instance of this class to visit a [Block] will cause the method [visitBlock]
- * to be invoked but will also cause the methods [visitStatement] and
- * [visitNode] to be subsequently invoked. This allows visitors to be written
- * that visit all statements without needing to override the visit method for
- * each of the specific subclasses of [Statement].
- *
- * Subclasses that override a visit method must either invoke the overridden
- * visit method or explicitly invoke the more general visit method. Failure to
- * do so will cause the visit methods for superclasses of the node to not be
- * invoked and will cause the children of the visited node to not be visited.
- *
- * Clients may extend this class.
- */
-class GeneralizingAstVisitor<R> implements AstVisitor<R> {
+/// An AST visitor that will recursively visit all of the nodes in an AST
+/// structure (like instances of the class [RecursiveAstVisitor]). In addition,
+/// when a node of a specific type is visited not only will the visit method for
+/// that specific type of node be invoked, but additional methods for the
+/// superclasses of that node will also be invoked. For example, using an
+/// instance of this class to visit a [Block] will cause the method [visitBlock]
+/// to be invoked but will also cause the methods [visitStatement] and
+/// [visitNode] to be subsequently invoked. This allows visitors to be written
+/// that visit all statements without needing to override the visit method for
+/// each of the specific subclasses of [Statement].
+///
+/// Subclasses that override a visit method must either invoke the overridden
+/// visit method or explicitly invoke the more general visit method. Failure to
+/// do so will cause the visit methods for superclasses of the node to not be
+/// invoked and will cause the children of the visited node to not be visited.
+///
+/// Clients may extend this class.
+class GeneralizingAstVisitor<R>
+    with UIAsCodeVisitorMixin<R>
+    implements AstVisitor<R> {
   @override
   R visitAdjacentStrings(AdjacentStrings node) => visitStringLiteral(node);
 
@@ -311,9 +294,6 @@
       visitForEachParts(node);
 
   @override
-  R visitForEachStatement(ForEachStatement node) => visitStatement(node);
-
-  @override
   R visitForElement(ForElement node) => visitCollectionElement(node);
 
   R visitFormalParameter(FormalParameter node) => visitNode(node);
@@ -334,9 +314,6 @@
   @override
   R visitForStatement(ForStatement node) => visitStatement(node);
 
-  @override
-  R visitForStatement2(ForStatement2 node) => visitStatement(node);
-
   R visitFunctionBody(FunctionBody node) => visitNode(node);
 
   @override
@@ -426,18 +403,9 @@
   @override
   R visitListLiteral(ListLiteral node) => visitTypedLiteral(node);
 
-  @override
-  R visitListLiteral2(ListLiteral2 node) => visitTypedLiteral(node);
-
   R visitLiteral(Literal node) => visitExpression(node);
 
   @override
-  R visitMapLiteral(MapLiteral node) => visitTypedLiteral(node);
-
-  @override
-  R visitMapLiteral2(MapLiteral2 node) => visitTypedLiteral(node);
-
-  @override
   R visitMapLiteralEntry(MapLiteralEntry node) => visitCollectionElement(node);
 
   @override
@@ -517,10 +485,7 @@
   R visitScriptTag(ScriptTag scriptTag) => visitNode(scriptTag);
 
   @override
-  R visitSetLiteral(SetLiteral node) => visitTypedLiteral(node);
-
-  @override
-  R visitSetLiteral2(SetLiteral2 node) => visitTypedLiteral(node);
+  R visitSetOrMapLiteral(SetOrMapLiteral node) => visitTypedLiteral(node);
 
   @override
   R visitShowCombinator(ShowCombinator node) => visitCombinator(node);
@@ -626,19 +591,19 @@
   R visitYieldStatement(YieldStatement node) => visitStatement(node);
 }
 
-/**
- * An AST visitor that will recursively visit all of the nodes in an AST
- * structure. For example, using an instance of this class to visit a [Block]
- * will also cause all of the statements in the block to be visited.
- *
- * Subclasses that override a visit method must either invoke the overridden
- * visit method or must explicitly ask the visited node to visit its children.
- * Failure to do so will cause the children of the visited node to not be
- * visited.
- *
- * Clients may extend this class.
- */
-class RecursiveAstVisitor<R> implements AstVisitor<R> {
+/// An AST visitor that will recursively visit all of the nodes in an AST
+/// structure. For example, using an instance of this class to visit a [Block]
+/// will also cause all of the statements in the block to be visited.
+///
+/// Subclasses that override a visit method must either invoke the overridden
+/// visit method or must explicitly ask the visited node to visit its children.
+/// Failure to do so will cause the children of the visited node to not be
+/// visited.
+///
+/// Clients may extend this class.
+class RecursiveAstVisitor<R>
+    with UIAsCodeVisitorMixin<R>
+    implements AstVisitor<R> {
   @override
   R visitAdjacentStrings(AdjacentStrings node) {
     node.visitChildren(this);
@@ -898,12 +863,6 @@
   }
 
   @override
-  R visitForEachStatement(ForEachStatement node) {
-    node.visitChildren(this);
-    return null;
-  }
-
-  @override
   R visitForElement(ForElement node) {
     node.visitChildren(this);
     return null;
@@ -934,12 +893,6 @@
   }
 
   @override
-  R visitForStatement2(ForStatement2 node) {
-    node.visitChildren(this);
-    return null;
-  }
-
-  @override
   R visitFunctionDeclaration(FunctionDeclaration node) {
     node.visitChildren(this);
     return null;
@@ -1084,24 +1037,6 @@
   }
 
   @override
-  R visitListLiteral2(ListLiteral2 node) {
-    node.visitChildren(this);
-    return null;
-  }
-
-  @override
-  R visitMapLiteral(MapLiteral node) {
-    node.visitChildren(this);
-    return null;
-  }
-
-  @override
-  R visitMapLiteral2(MapLiteral2 node) {
-    node.visitChildren(this);
-    return null;
-  }
-
-  @override
   R visitMapLiteralEntry(MapLiteralEntry node) {
     node.visitChildren(this);
     return null;
@@ -1223,13 +1158,7 @@
   }
 
   @override
-  R visitSetLiteral(SetLiteral node) {
-    node.visitChildren(this);
-    return null;
-  }
-
-  @override
-  R visitSetLiteral2(SetLiteral2 node) {
+  R visitSetOrMapLiteral(SetOrMapLiteral node) {
     node.visitChildren(this);
     return null;
   }
@@ -1391,15 +1320,15 @@
   }
 }
 
-/**
- * An AST visitor that will do nothing when visiting an AST node. It is intended
- * to be a superclass for classes that use the visitor pattern primarily as a
- * dispatch mechanism (and hence don't need to recursively visit a whole
- * structure) and that only need to visit a small number of node types.
- *
- * Clients may extend this class.
- */
-class SimpleAstVisitor<R> implements AstVisitor<R> {
+/// An AST visitor that will do nothing when visiting an AST node. It is
+/// intended to be a superclass for classes that use the visitor pattern
+/// primarily as a dispatch mechanism (and hence don't need to recursively visit
+/// a whole structure) and that only need to visit a small number of node types.
+///
+/// Clients may extend this class.
+class SimpleAstVisitor<R>
+    with UIAsCodeVisitorMixin<R>
+    implements AstVisitor<R> {
   @override
   R visitAdjacentStrings(AdjacentStrings node) => null;
 
@@ -1530,9 +1459,6 @@
   R visitForEachPartsWithIdentifier(ForEachPartsWithIdentifier node) => null;
 
   @override
-  R visitForEachStatement(ForEachStatement node) => null;
-
-  @override
   R visitForElement(ForElement node) => null;
 
   @override
@@ -1548,9 +1474,6 @@
   R visitForStatement(ForStatement node) => null;
 
   @override
-  R visitForStatement2(ForStatement2 node) => null;
-
-  @override
   R visitFunctionDeclaration(FunctionDeclaration node) => null;
 
   @override
@@ -1626,15 +1549,6 @@
   R visitListLiteral(ListLiteral node) => null;
 
   @override
-  R visitListLiteral2(ListLiteral2 node) => null;
-
-  @override
-  R visitMapLiteral(MapLiteral node) => null;
-
-  @override
-  R visitMapLiteral2(MapLiteral2 node) => null;
-
-  @override
   R visitMapLiteralEntry(MapLiteralEntry node) => null;
 
   @override
@@ -1697,10 +1611,7 @@
   R visitScriptTag(ScriptTag node) => null;
 
   @override
-  R visitSetLiteral(SetLiteral node) => null;
-
-  @override
-  R visitSetLiteral2(SetLiteral2 node) => null;
+  R visitSetOrMapLiteral(SetOrMapLiteral node) => null;
 
   @override
   R visitShowCombinator(ShowCombinator node) => null;
@@ -1782,16 +1693,16 @@
   R visitYieldStatement(YieldStatement node) => null;
 }
 
-/**
- * An AST visitor that will throw an exception if any of the visit methods that
- * are invoked have not been overridden. It is intended to be a superclass for
- * classes that implement the visitor pattern and need to (a) override all of
- * the visit methods or (b) need to override a subset of the visit method and
- * want to catch when any other visit methods have been invoked.
- *
- * Clients may extend this class.
- */
-class ThrowingAstVisitor<R> implements AstVisitor<R> {
+/// An AST visitor that will throw an exception if any of the visit methods that
+/// are invoked have not been overridden. It is intended to be a superclass for
+/// classes that implement the visitor pattern and need to (a) override all of
+/// the visit methods or (b) need to override a subset of the visit method and
+/// want to catch when any other visit methods have been invoked.
+///
+/// Clients may extend this class.
+class ThrowingAstVisitor<R>
+    with UIAsCodeVisitorMixin<R>
+    implements AstVisitor<R> {
   @override
   R visitAdjacentStrings(AdjacentStrings node) => _throw(node);
 
@@ -1925,9 +1836,6 @@
       _throw(node);
 
   @override
-  R visitForEachStatement(ForEachStatement node) => _throw(node);
-
-  @override
   R visitForElement(ForElement node) => _throw(node);
 
   @override
@@ -1944,9 +1852,6 @@
   R visitForStatement(ForStatement node) => _throw(node);
 
   @override
-  R visitForStatement2(ForStatement2 node) => _throw(node);
-
-  @override
   R visitFunctionDeclaration(FunctionDeclaration node) => _throw(node);
 
   @override
@@ -2023,15 +1928,6 @@
   R visitListLiteral(ListLiteral node) => _throw(node);
 
   @override
-  R visitListLiteral2(ListLiteral2 node) => _throw(node);
-
-  @override
-  R visitMapLiteral(MapLiteral node) => _throw(node);
-
-  @override
-  R visitMapLiteral2(MapLiteral2 node) => _throw(node);
-
-  @override
   R visitMapLiteralEntry(MapLiteralEntry node) => _throw(node);
 
   @override
@@ -2094,10 +1990,7 @@
   R visitScriptTag(ScriptTag node) => _throw(node);
 
   @override
-  R visitSetLiteral(SetLiteral node) => _throw(node);
-
-  @override
-  R visitSetLiteral2(SetLiteral2 node) => _throw(node);
+  R visitSetOrMapLiteral(SetOrMapLiteral node) => _throw(node);
 
   @override
   R visitShowCombinator(ShowCombinator node) => _throw(node);
@@ -2176,6 +2069,7 @@
 
   @override
   R visitWithClause(WithClause node) => _throw(node);
+
   @override
   R visitYieldStatement(YieldStatement node) => _throw(node);
 
@@ -2184,26 +2078,18 @@
   }
 }
 
-/**
- * An AST visitor that captures visit call timings.
- *
- * Clients may not extend, implement or mix-in this class.
- */
-class TimedAstVisitor<T> implements AstVisitor<T> {
-  /**
-   * The base visitor whose visit methods will be timed.
-   */
+/// An AST visitor that captures visit call timings.
+///
+/// Clients may not extend, implement or mix-in this class.
+class TimedAstVisitor<T> with UIAsCodeVisitorMixin<T> implements AstVisitor<T> {
+  /// The base visitor whose visit methods will be timed.
   final AstVisitor<T> _baseVisitor;
 
-  /**
-   * Collects elapsed time for visit calls.
-   */
+  /// Collects elapsed time for visit calls.
   final Stopwatch stopwatch;
 
-  /**
-   * Initialize a newly created visitor to time calls to the given base
-   * visitor's visits.
-   */
+  /// Initialize a newly created visitor to time calls to the given base
+  /// visitor's visits.
   TimedAstVisitor(this._baseVisitor, [Stopwatch watch])
       : stopwatch = watch ?? new Stopwatch();
 
@@ -2552,14 +2438,6 @@
   }
 
   @override
-  T visitForEachStatement(ForEachStatement node) {
-    stopwatch.start();
-    T result = _baseVisitor.visitForEachStatement(node);
-    stopwatch.stop();
-    return result;
-  }
-
-  @override
   T visitForElement(ForElement node) {
     stopwatch.start();
     T result = _baseVisitor.visitForElement(node);
@@ -2600,14 +2478,6 @@
   }
 
   @override
-  T visitForStatement2(ForStatement2 node) {
-    stopwatch.start();
-    T result = _baseVisitor.visitForStatement2(node);
-    stopwatch.stop();
-    return result;
-  }
-
-  @override
   T visitFunctionDeclaration(FunctionDeclaration node) {
     stopwatch.start();
     T result = _baseVisitor.visitFunctionDeclaration(node);
@@ -2800,30 +2670,6 @@
   }
 
   @override
-  T visitListLiteral2(ListLiteral2 node) {
-    stopwatch.start();
-    T result = _baseVisitor.visitListLiteral2(node);
-    stopwatch.stop();
-    return result;
-  }
-
-  @override
-  T visitMapLiteral(MapLiteral node) {
-    stopwatch.start();
-    T result = _baseVisitor.visitMapLiteral(node);
-    stopwatch.stop();
-    return result;
-  }
-
-  @override
-  T visitMapLiteral2(MapLiteral2 node) {
-    stopwatch.start();
-    T result = _baseVisitor.visitMapLiteral2(node);
-    stopwatch.stop();
-    return result;
-  }
-
-  @override
   T visitMapLiteralEntry(MapLiteralEntry node) {
     stopwatch.start();
     T result = _baseVisitor.visitMapLiteralEntry(node);
@@ -2985,17 +2831,9 @@
   }
 
   @override
-  T visitSetLiteral(SetLiteral node) {
+  T visitSetOrMapLiteral(SetOrMapLiteral node) {
     stopwatch.start();
-    T result = _baseVisitor.visitSetLiteral(node);
-    stopwatch.stop();
-    return result;
-  }
-
-  @override
-  T visitSetLiteral2(SetLiteral2 node) {
-    stopwatch.start();
-    T result = _baseVisitor.visitSetLiteral2(node);
+    T result = _baseVisitor.visitSetOrMapLiteral(node);
     stopwatch.stop();
     return result;
   }
@@ -3209,19 +3047,20 @@
   }
 }
 
-/**
- * An AST visitor that will recursively visit all of the nodes in an AST
- * structure (like instances of the class [RecursiveAstVisitor]). In addition,
- * every node will also be visited by using a single unified [visitNode] method.
- *
- * Subclasses that override a visit method must either invoke the overridden
- * visit method or explicitly invoke the more general [visitNode] method.
- * Failure to do so will cause the children of the visited node to not be
- * visited.
- *
- * Clients may extend this class.
- */
-class UnifyingAstVisitor<R> implements AstVisitor<R> {
+/// An AST visitor that will recursively visit all of the nodes in an AST
+/// structure (like instances of the class [RecursiveAstVisitor]). In addition,
+/// every node will also be visited by using a single unified [visitNode]
+/// method.
+///
+/// Subclasses that override a visit method must either invoke the overridden
+/// visit method or explicitly invoke the more general [visitNode] method.
+/// Failure to do so will cause the children of the visited node to not be
+/// visited.
+///
+/// Clients may extend this class.
+class UnifyingAstVisitor<R>
+    with UIAsCodeVisitorMixin<R>
+    implements AstVisitor<R> {
   @override
   R visitAdjacentStrings(AdjacentStrings node) => visitNode(node);
 
@@ -3356,9 +3195,6 @@
       visitNode(node);
 
   @override
-  R visitForEachStatement(ForEachStatement node) => visitNode(node);
-
-  @override
   R visitForElement(ForElement node) => visitNode(node);
 
   @override
@@ -3375,9 +3211,6 @@
   R visitForStatement(ForStatement node) => visitNode(node);
 
   @override
-  R visitForStatement2(ForStatement2 node) => visitNode(node);
-
-  @override
   R visitFunctionDeclaration(FunctionDeclaration node) => visitNode(node);
 
   @override
@@ -3455,15 +3288,6 @@
   R visitListLiteral(ListLiteral node) => visitNode(node);
 
   @override
-  R visitListLiteral2(ListLiteral2 node) => visitNode(node);
-
-  @override
-  R visitMapLiteral(MapLiteral node) => visitNode(node);
-
-  @override
-  R visitMapLiteral2(MapLiteral2 node) => visitNode(node);
-
-  @override
   R visitMapLiteralEntry(MapLiteralEntry node) => visitNode(node);
 
   @override
@@ -3532,10 +3356,7 @@
   R visitScriptTag(ScriptTag scriptTag) => visitNode(scriptTag);
 
   @override
-  R visitSetLiteral(SetLiteral node) => visitNode(node);
-
-  @override
-  R visitSetLiteral2(SetLiteral2 node) => visitNode(node);
+  R visitSetOrMapLiteral(SetOrMapLiteral node) => visitNode(node);
 
   @override
   R visitShowCombinator(ShowCombinator node) => visitNode(node);
@@ -3620,19 +3441,13 @@
   R visitYieldStatement(YieldStatement node) => visitNode(node);
 }
 
-/**
- * A helper class used to implement the correct order of visits for a
- * [BreadthFirstVisitor].
- */
+/// A helper class used to implement the correct order of visits for a
+/// [BreadthFirstVisitor].
 class _BreadthFirstChildVisitor extends UnifyingAstVisitor<void> {
-  /**
-   * The [BreadthFirstVisitor] being helped by this visitor.
-   */
+  /// The [BreadthFirstVisitor] being helped by this visitor.
   final BreadthFirstVisitor outerVisitor;
 
-  /**
-   * Initialize a newly created visitor to help the [outerVisitor].
-   */
+  /// Initialize a newly created visitor to help the [outerVisitor].
   _BreadthFirstChildVisitor(this.outerVisitor);
 
   @override
diff --git a/pkg/analyzer/lib/dart/constant/value.dart b/pkg/analyzer/lib/dart/constant/value.dart
index 64a29c6..7799cc5 100644
--- a/pkg/analyzer/lib/dart/constant/value.dart
+++ b/pkg/analyzer/lib/dart/constant/value.dart
@@ -2,164 +2,134 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/**
- * The interface used to access the result of constant evaluation.
- *
- * Because the analyzer does not have any of the code under analysis loaded, it
- * does not do real evaluation. Instead it performs a symbolic computation and
- * presents those results through this interface.
- *
- * Instances of these constant values are accessed through the
- * [element model](../element/element.dart).
- */
+/// The interface used to access the result of constant evaluation.
+///
+/// Because the analyzer does not have any of the code under analysis loaded, it
+/// does not do real evaluation. Instead it performs a symbolic computation and
+/// presents those results through this interface.
+///
+/// Instances of these constant values are accessed through the
+/// [element model](../element/element.dart).
 import 'package:analyzer/dart/element/type.dart';
 
-/**
- * A representation of the value of a compile-time constant expression.
- *
- * Note that, unlike the mirrors system, the object being represented does *not*
- * exist. This interface allows static analysis tools to determine something
- * about the state of the object that would exist if the code that creates the
- * object were executed, but none of the code being analyzed is actually
- * executed.
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// A representation of the value of a compile-time constant expression.
+///
+/// Note that, unlike the mirrors system, the object being represented does *not*
+/// exist. This interface allows static analysis tools to determine something
+/// about the state of the object that would exist if the code that creates the
+/// object were executed, but none of the code being analyzed is actually
+/// executed.
+///
+/// Clients may not extend, implement or mix-in this class.
 abstract class DartObject {
-  /**
-   * Return `true` if the value of the object being represented is known.
-   *
-   * This method will return `false` if
-   * * the value being represented is the value of a declared variable (a
-   *   variable whose value is provided at run-time using a `-D` command-line
-   *   option), or
-   * * the value is a function.
-   *
-   * The result of this method does not imply anything about the state of
-   * object representations returned by the method [getField], those that are
-   * elements of the list returned by [toListValue], or the keys or values in
-   * the map returned by [toMapValue]. For example, a representation of a list
-   * can return `true` even if one or more of the elements of that list would
-   * return `false`.
-   */
+  /// Return `true` if the value of the object being represented is known.
+  ///
+  /// This method will return `false` if
+  /// * the value being represented is the value of a declared variable (a
+  ///   variable whose value is provided at run-time using a `-D` command-line
+  ///   option), or
+  /// * the value is a function.
+  ///
+  /// The result of this method does not imply anything about the state of
+  /// object representations returned by the method [getField], those that are
+  /// elements of the list returned by [toListValue], or the keys or values in
+  /// the map returned by [toMapValue]. For example, a representation of a list
+  /// can return `true` even if one or more of the elements of that list would
+  /// return `false`.
   bool get hasKnownValue;
 
-  /**
-   * Return `true` if the object being represented represents the value 'null'.
-   */
+  /// Return `true` if the object being represented represents the value 'null'.
   bool get isNull;
 
-  /**
-   * Return a representation of the type of the object being represented.
-   *
-   * For values resulting from the invocation of a 'const' constructor, this
-   * will be a representation of the run-time type of the object.
-   *
-   * For values resulting from a literal expression, this will be a
-   * representation of the static type of the value -- `int` for integer
-   * literals, `List` for list literals, etc. -- even when the static type is an
-   * abstract type (such as `List`) and hence will never be the run-time type of
-   * the represented object.
-   *
-   * For values resulting from any other kind of expression, this will be a
-   * representation of the result of evaluating the expression.
-   *
-   * Return `null` if the expression cannot be evaluated, either because it is
-   * not a valid constant expression or because one or more of the values used
-   * in the expression does not have a known value.
-   *
-   * This method can return a representation of the type, even if this object
-   * would return `false` from [hasKnownValue].
-   */
+  /// Return a representation of the type of the object being represented.
+  ///
+  /// For values resulting from the invocation of a 'const' constructor, this
+  /// will be a representation of the run-time type of the object.
+  ///
+  /// For values resulting from a literal expression, this will be a
+  /// representation of the static type of the value -- `int` for integer
+  /// literals, `List` for list literals, etc. -- even when the static type is an
+  /// abstract type (such as `List`) and hence will never be the run-time type of
+  /// the represented object.
+  ///
+  /// For values resulting from any other kind of expression, this will be a
+  /// representation of the result of evaluating the expression.
+  ///
+  /// Return `null` if the expression cannot be evaluated, either because it is
+  /// not a valid constant expression or because one or more of the values used
+  /// in the expression does not have a known value.
+  ///
+  /// This method can return a representation of the type, even if this object
+  /// would return `false` from [hasKnownValue].
   ParameterizedType get type;
 
-  /**
-   * Return a representation of the value of the field with the given [name].
-   *
-   * Return `null` if either the object being represented does not have a field
-   * with the given name or if the implementation of the class of the object is
-   * invalid, making it impossible to determine that value of the field.
-   *
-   * Note that, unlike the mirrors API, this method does *not* invoke a getter;
-   * it simply returns a representation of the known state of a field.
-   */
+  /// Return a representation of the value of the field with the given [name].
+  ///
+  /// Return `null` if either the object being represented does not have a field
+  /// with the given name or if the implementation of the class of the object is
+  /// invalid, making it impossible to determine that value of the field.
+  ///
+  /// Note that, unlike the mirrors API, this method does *not* invoke a getter;
+  /// it simply returns a representation of the known state of a field.
   DartObject getField(String name);
 
-  /**
-   * Return a boolean corresponding to the value of the object being
-   * represented, or `null` if
-   * * this object is not of type 'bool',
-   * * the value of the object being represented is not known, or
-   * * the value of the object being represented is `null`.
-   */
+  /// Return a boolean corresponding to the value of the object being
+  /// represented, or `null` if
+  /// * this object is not of type 'bool',
+  /// * the value of the object being represented is not known, or
+  /// * the value of the object being represented is `null`.
   bool toBoolValue();
 
-  /**
-   * Return a double corresponding to the value of the object being represented,
-   * or `null`
-   * if
-   * * this object is not of type 'double',
-   * * the value of the object being represented is not known, or
-   * * the value of the object being represented is `null`.
-   */
+  /// Return a double corresponding to the value of the object being represented,
+  /// or `null`
+  /// if
+  /// * this object is not of type 'double',
+  /// * the value of the object being represented is not known, or
+  /// * the value of the object being represented is `null`.
   double toDoubleValue();
 
-  /**
-   * Return an integer corresponding to the value of the object being
-   * represented, or `null` if
-   * * this object is not of type 'int',
-   * * the value of the object being represented is not known, or
-   * * the value of the object being represented is `null`.
-   */
+  /// Return an integer corresponding to the value of the object being
+  /// represented, or `null` if
+  /// * this object is not of type 'int',
+  /// * the value of the object being represented is not known, or
+  /// * the value of the object being represented is `null`.
   int toIntValue();
 
-  /**
-   * Return a list corresponding to the value of the object being represented,
-   * or `null` if
-   * * this object is not of type 'List', or
-   * * the value of the object being represented is `null`.
-   */
+  /// Return a list corresponding to the value of the object being represented,
+  /// or `null` if
+  /// * this object is not of type 'List', or
+  /// * the value of the object being represented is `null`.
   List<DartObject> toListValue();
 
-  /**
-   * Return a map corresponding to the value of the object being represented, or
-   * `null` if
-   * * this object is not of type 'Map', or
-   * * the value of the object being represented is `null`.
-   */
+  /// Return a map corresponding to the value of the object being represented, or
+  /// `null` if
+  /// * this object is not of type 'Map', or
+  /// * the value of the object being represented is `null`.
   Map<DartObject, DartObject> toMapValue();
 
-  /**
-   * Return a set corresponding to the value of the object being represented,
-   * or `null` if
-   * * this object is not of type 'Set', or
-   * * the value of the object being represented is `null`.
-   */
+  /// Return a set corresponding to the value of the object being represented,
+  /// or `null` if
+  /// * this object is not of type 'Set', or
+  /// * the value of the object being represented is `null`.
   Set<DartObject> toSetValue();
 
-  /**
-   * Return a string corresponding to the value of the object being represented,
-   * or `null` if
-   * * this object is not of type 'String',
-   * * the value of the object being represented is not known, or
-   * * the value of the object being represented is `null`.
-   */
+  /// Return a string corresponding to the value of the object being represented,
+  /// or `null` if
+  /// * this object is not of type 'String',
+  /// * the value of the object being represented is not known, or
+  /// * the value of the object being represented is `null`.
   String toStringValue();
 
-  /**
-   * Return a string corresponding to the value of the object being represented,
-   * or `null` if
-   * * this object is not of type 'Symbol', or
-   * * the value of the object being represented is `null`.
-   * (We return the string
-   */
+  /// Return a string corresponding to the value of the object being represented,
+  /// or `null` if
+  /// * this object is not of type 'Symbol', or
+  /// * the value of the object being represented is `null`.
+  /// (We return the string
   String toSymbolValue();
 
-  /**
-   * Return the representation of the type corresponding to the value of the
-   * object being represented, or `null` if
-   * * this object is not of type 'Type', or
-   * * the value of the object being represented is `null`.
-   */
+  /// Return the representation of the type corresponding to the value of the
+  /// object being represented, or `null` if
+  /// * this object is not of type 'Type', or
+  /// * the value of the object being represented is `null`.
   DartType toTypeValue();
 }
diff --git a/pkg/analyzer/lib/dart/element/element.dart b/pkg/analyzer/lib/dart/element/element.dart
index f4ce6d91..20b425d 100644
--- a/pkg/analyzer/lib/dart/element/element.dart
+++ b/pkg/analyzer/lib/dart/element/element.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -39,13 +39,14 @@
 import 'package:analyzer/dart/constant/value.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/error/error.dart';
+import 'package:analyzer/src/dart/constant/evaluation.dart';
 import 'package:analyzer/src/generated/engine.dart' show AnalysisContext;
 import 'package:analyzer/src/generated/java_engine.dart';
 import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:analyzer/src/task/api/model.dart' show AnalysisTarget;
-import 'package:analyzer/src/task/dart.dart';
+import 'package:meta/meta.dart';
 
 /// An element that represents a class or a mixin. The class can be defined by
 /// either a class declaration (with a class body), a mixin application (without
@@ -523,6 +524,10 @@
   /// Return `true` if this element has an annotation of the form '@literal'.
   bool get hasLiteral;
 
+  /// Return `true` if this element has an annotation of the form
+  /// `@optionalTypeArgs`.
+  bool get hasOptionalTypeArgs;
+
   /// Return `true` if this element has an annotation of the form `@override`.
   bool get hasOverride;
 
@@ -727,10 +732,6 @@
   /// subclasses as being immutable.
   bool get isImmutable;
 
-  /// Return `true` if this annotation marks the associated constructor as
-  /// being literal.
-  bool get isLiteral;
-
   /// Return `true` if this annotation marks the associated member as running
   /// a single test.
   bool get isIsTest;
@@ -743,10 +744,18 @@
   /// `JS` annotation.
   bool get isJS;
 
+  /// Return `true` if this annotation marks the associated constructor as
+  /// being literal.
+  bool get isLiteral;
+
   /// Return `true` if this annotation marks the associated member as requiring
   /// overriding methods to call super.
   bool get isMustCallSuper;
 
+  /// Return `true` if this annotation marks the associated type as
+  /// having "optional" type arguments.
+  bool get isOptionalTypeArgs;
+
   /// Return `true` if this annotation marks the associated method as being
   /// expected to override an inherited method.
   bool get isOverride;
@@ -1039,9 +1048,16 @@
   /// Return `true` if this field was explicitly marked as being covariant.
   bool get isCovariant;
 
-  /// Return {@code true} if this element is an enum constant.
+  /// Return `true` if this element is an enum constant.
   bool get isEnumConstant;
 
+  /// Return `true` if this field uses lazy evaluation semantics.
+  ///
+  /// This will always return `false` unless the experiment 'non-nullable' is
+  /// enabled.
+  @experimental
+  bool get isLazy;
+
   /// Returns `true` if this field can be overridden in strong mode.
   @deprecated
   bool get isVirtual;
@@ -1316,7 +1332,14 @@
 /// A local variable.
 ///
 /// Clients may not extend, implement or mix-in this class.
-abstract class LocalVariableElement implements LocalElement, VariableElement {}
+abstract class LocalVariableElement implements LocalElement, VariableElement {
+  /// Return `true` if this local variable uses lazy evaluation semantics.
+  ///
+  /// This will always return `false` unless the experiment 'non-nullable' is
+  /// enabled.
+  @experimental
+  bool get isLazy;
+}
 
 /// An element that represents a method defined within a type.
 ///
@@ -1387,10 +1410,12 @@
   bool get isNamed;
 
   /// Return `true` if this parameter is a required parameter. Required
-  /// parameters are always positional.
+  /// parameters are always positional, unless the experiment 'non-nullable' is
+  /// enabled, in which case named parameters can also be required.
   ///
-  /// Note: this will return `false` for a named parameter that is annotated
-  /// with the `@required` annotation.
+  /// Note: regardless of the state of the 'non-nullable' experiment, this will
+  /// return `false` for a named parameter that is annotated with the
+  /// `@required` annotation.
   // TODO(brianwilkerson) Rename this to `isRequired`.
   bool get isNotOptional;
 
diff --git a/pkg/analyzer/lib/dart/element/type.dart b/pkg/analyzer/lib/dart/element/type.dart
index 19c217d..7c752c2 100644
--- a/pkg/analyzer/lib/dart/element/type.dart
+++ b/pkg/analyzer/lib/dart/element/type.dart
@@ -1,135 +1,108 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/**
- * Defines the type model. The type model is part of the
- * [element model](../dart_element_element/dart_element_element-library.html)
- * in that most types are defined by Dart code (the types `dynamic` and `void`
- * being the notable exceptions). All types are represented by an instance of a
- * subclass of [DartType].
- *
- * Other than `dynamic` and `void`, all of the types define either the interface
- * defined by a class (an instance of [InterfaceType]) or the type of a function
- * (an instance of [FunctionType]).
- *
- * We make a distinction between the declaration of a class (a [ClassElement])
- * and the type defined by that class (an [InterfaceType]). The biggest reason
- * for the distinction is to allow us to more cleanly represent the distinction
- * between type parameters and type arguments. For example, if we define a class
- * as `class Pair<K, V> {}`, the declarations of `K` and `V` represent type
- * parameters. But if we declare a variable as `Pair<String, int> pair;` the
- * references to `String` and `int` are type arguments.
- */
+/// Defines the type model. The type model is part of the
+/// [element model](../dart_element_element/dart_element_element-library.html)
+/// in that most types are defined by Dart code (the types `dynamic` and `void`
+/// being the notable exceptions). All types are represented by an instance of a
+/// subclass of [DartType].
+///
+/// Other than `dynamic` and `void`, all of the types define either the
+/// interface defined by a class (an instance of [InterfaceType]) or the type of
+/// a function (an instance of [FunctionType]).
+///
+/// We make a distinction between the declaration of a class (a [ClassElement])
+/// and the type defined by that class (an [InterfaceType]). The biggest reason
+/// for the distinction is to allow us to more cleanly represent the distinction
+/// between type parameters and type arguments. For example, if we define a
+/// class as `class Pair<K, V> {}`, the declarations of `K` and `V` represent
+/// type parameters. But if we declare a variable as `Pair<String, int> pair;`
+/// the references to `String` and `int` are type arguments.
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/type.dart' show InterfaceTypeImpl;
 import 'package:analyzer/src/generated/type_system.dart' show TypeSystem;
 
-/**
- * The type associated with elements in the element model.
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// The type associated with elements in the element model.
+///
+/// Clients may not extend, implement or mix-in this class.
 abstract class DartType {
-  /**
-   * Return the name of this type as it should appear when presented to users in
-   * contexts such as error messages.
-   */
+  /// Return the name of this type as it should appear when presented to users
+  /// in contexts such as error messages.
   String get displayName;
 
-  /**
-   * Return the element representing the declaration of this type, or `null` if
-   * the type has not, or cannot, be associated with an element. The former case
-   * will occur if the element model is not yet complete; the latter case will
-   * occur if this object represents an undefined type.
-   */
+  /// Return the element representing the declaration of this type, or `null` if
+  /// the type has not, or cannot, be associated with an element. The former
+  /// case will occur if the element model is not yet complete; the latter case
+  /// will occur if this object represents an undefined type.
   Element get element;
 
-  /**
-   * Return `true` if this type represents the bottom type.
-   */
+  /// Return `true` if this type represents the bottom type.
   bool get isBottom;
 
-  /**
-   * Return `true` if this type represents the type 'Future' defined in the
-   * dart:async library.
-   */
+  /// Return `true` if this type represents the type 'Future' defined in the
+  /// dart:async library.
   bool get isDartAsyncFuture;
 
-  /**
-   * Return `true` if this type represents the type 'FutureOr<T>' defined in the
-   * dart:async library.
-   */
+  /// 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 'bool' defined in the
-   * dart:core library.
-   */
+  /// Return `true` if this type represents the type 'bool' defined in the
+  /// dart:core library.
   bool get isDartCoreBool;
 
-  /**
-   * Return `true` if this type represents the type 'Function' defined in the
-   * dart:core library.
-   */
+  /// Return `true` if this type represents the type 'double' defined in the
+  /// dart:core library.
+  bool get isDartCoreDouble;
+
+  /// Return `true` if this type represents the type 'Function' defined in the
+  /// dart:core library.
   bool get isDartCoreFunction;
 
-  /**
-   * Return `true` if this type represents the type 'int' defined in the
-   * dart:core library.
-   */
+  /// Return `true` if this type represents the type 'int' defined in the
+  /// dart:core library.
   bool get isDartCoreInt;
 
-  /**
-   * Return `true` if this type represents the type 'Null' defined in the
-   * dart:core library.
-   */
+  /// Return `true` if this type represents the type 'Null' defined in the
+  /// dart:core library.
   bool get isDartCoreNull;
 
-  /**
-   * Return `true` if this type represents the type 'dynamic'.
-   */
+  /// Return `true` if this type represents the type 'String' defined in the
+  /// dart:core library.
+  bool get isDartCoreString;
+
+  /// Return `true` if this type represents the type 'dynamic'.
   bool get isDynamic;
 
-  /**
-   * Return `true` if this type represents the type 'Object'.
-   */
+  /// Return `true` if this type represents the type 'Object'.
   bool get isObject;
 
-  /**
-   * Return `true` if this type represents a typename that couldn't be resolved.
-   */
+  /// Return `true` if this type represents a typename that couldn't be
+  /// resolved.
   bool get isUndefined;
 
-  /**
-   * Return `true` if this type represents the type 'void'.
-   */
+  /// Return `true` if this type represents the type 'void'.
   bool get isVoid;
 
-  /**
-   * Return the name of this type, or `null` if the type does not have a name,
-   * such as when the type represents the type of an unnamed function.
-   */
+  /// Return the name of this type, or `null` if the type does not have a name,
+  /// such as when the type represents the type of an unnamed function.
   String get name;
 
-  /**
-   * Implements the function "flatten" defined in the spec, where T is this
-   * type:
-   *
-   *     If T = Future<S> then flatten(T) = flatten(S).
-   *
-   *     Otherwise if T <: Future then let S be a type such that T << Future<S>
-   *     and for all R, if T << Future<R> then S << R.  Then flatten(T) = S.
-   *
-   *     In any other circumstance, flatten(T) = T.
-   */
+  /// Implements the function "flatten" defined in the spec, where T is this
+  /// type:
+  ///
+  ///     If T = Future<S> then flatten(T) = flatten(S).
+  ///
+  ///     Otherwise if T <: Future then let S be a type such that T << Future<S>
+  ///     and for all R, if T << Future<R> then S << R.  Then flatten(T) = S.
+  ///
+  ///     In any other circumstance, flatten(T) = T.
   DartType flattenFutures(TypeSystem typeSystem);
 
-  /**
-   * Return `true` if this type is assignable to the given [type]. A type
-   * <i>T</i> may be assigned to a type <i>S</i>, written <i>T</i> &hArr;
-   * <i>S</i>, iff either <i>T</i> <: <i>S</i> or <i>S</i> <: <i>T</i>.
-   */
+  /// Return `true` if this type is assignable to the given [type]. A type
+  /// <i>T</i> may be assigned to a type <i>S</i>, written <i>T</i> &hArr;
+  /// <i>S</i>, iff either <i>T</i> <: <i>S</i> or <i>S</i> <: <i>T</i>.
   bool isAssignableTo(DartType type);
 
   /// Indicates whether `this` represents a type that is equivalent to `dest`.
@@ -142,196 +115,165 @@
   /// `isEquivalentTo` considers them to be equivalent.
   bool isEquivalentTo(DartType dest);
 
-  /**
-   * Return `true` if this type is more specific than the given [type].
-   */
+  /// Return `true` if this type is more specific than the given [type].
   bool isMoreSpecificThan(DartType type);
 
-  /**
-   * Return `true` if this type is a subtype of the given [type].
-   */
+  /// Return `true` if this type is a subtype of the given [type].
   bool isSubtypeOf(DartType type);
 
-  /**
-   * Return `true` if this type is a supertype of the given [type]. A type
-   * <i>S</i> is a supertype of <i>T</i>, written <i>S</i> :> <i>T</i>, iff
-   * <i>T</i> is a subtype of <i>S</i>.
-   */
+  /// Return `true` if this type is a supertype of the given [type]. A type
+  /// <i>S</i> is a supertype of <i>T</i>, written <i>S</i> :> <i>T</i>, iff
+  /// <i>T</i> is a subtype of <i>S</i>.
   bool isSupertypeOf(DartType type);
 
-  /**
-   * If this type is a [TypeParameterType], returns its bound if it has one, or
-   * [objectType] otherwise.
-   *
-   * For any other type, returns `this`. Applies recursively -- if the bound is
-   * itself a type parameter, that is resolved too.
-   */
+  /// If this type is a [TypeParameterType], returns its bound if it has one, or
+  /// [objectType] otherwise.
+  ///
+  /// For any other type, returns `this`. Applies recursively -- if the bound is
+  /// itself a type parameter, that is resolved too.
   DartType resolveToBound(DartType objectType);
 
-  /**
-   * Return the type resulting from substituting the given [argumentTypes] for
-   * the given [parameterTypes] in this type. The specification defines this
-   * operation in section 2:
-   * <blockquote>
-   * The notation <i>[x<sub>1</sub>, ..., x<sub>n</sub>/y<sub>1</sub>, ...,
-   * y<sub>n</sub>]E</i> denotes a copy of <i>E</i> in which all occurrences of
-   * <i>y<sub>i</sub>, 1 <= i <= n</i> have been replaced with
-   * <i>x<sub>i</sub></i>.
-   * </blockquote>
-   * Note that, contrary to the specification, this method will not create a
-   * copy of this type if no substitutions were required, but will return this
-   * type directly.
-   *
-   * Note too that the current implementation of this method is only guaranteed
-   * to work when the parameter types are type variables.
-   */
+  /// Return the type resulting from substituting the given [argumentTypes] for
+  /// the given [parameterTypes] in this type. The specification defines this
+  /// operation in section 2:
+  /// <blockquote>
+  /// The notation <i>[x<sub>1</sub>, ..., x<sub>n</sub>/y<sub>1</sub>, ...,
+  /// y<sub>n</sub>]E</i> denotes a copy of <i>E</i> in which all occurrences of
+  /// <i>y<sub>i</sub>, 1 <= i <= n</i> have been replaced with
+  /// <i>x<sub>i</sub></i>.
+  /// </blockquote>
+  /// Note that, contrary to the specification, this method will not create a
+  /// copy of this type if no substitutions were required, but will return this
+  /// type directly.
+  ///
+  /// Note too that the current implementation of this method is only guaranteed
+  /// to work when the parameter types are type variables.
   DartType substitute2(
       List<DartType> argumentTypes, List<DartType> parameterTypes);
 }
 
-/**
- * The type of a function, method, constructor, getter, or setter. Function
- * types come in three variations:
- *
- * * The types of functions that only have required parameters. These have the
- *   general form <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>) &rarr; T</i>.
- * * The types of functions with optional positional parameters. These have the
- *   general form <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>, [T<sub>n+1</sub>
- *   &hellip;, T<sub>n+k</sub>]) &rarr; T</i>.
- * * The types of functions with named parameters. These have the general form
- *   <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>, {T<sub>x1</sub> x1, &hellip;,
- *   T<sub>xk</sub> xk}) &rarr; T</i>.
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// The type of a function, method, constructor, getter, or setter. Function
+/// types come in three variations:
+///
+/// * The types of functions that only have required parameters. These have the
+///   general form <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>) &rarr; T</i>.
+/// * The types of functions with optional positional parameters. These have the
+///   general form <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>, [T<sub>n+1</sub>
+///   &hellip;, T<sub>n+k</sub>]) &rarr; T</i>.
+/// * The types of functions with named parameters. These have the general form
+///   <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>, {T<sub>x1</sub> x1, &hellip;,
+///   T<sub>xk</sub> xk}) &rarr; T</i>.
+///
+/// Clients may not extend, implement or mix-in this class.
 abstract class FunctionType implements ParameterizedType {
-  /**
-   * Deprecated: use [typeFormals].
-   */
+  /// Deprecated: use [typeFormals].
   @deprecated
   List<TypeParameterElement> get boundTypeParameters;
 
-  /**
-   * Return a map from the names of named parameters to the types of the named
-   * parameters of this type of function. The entries in the map will be
-   * iterated in the same order as the order in which the named parameters were
-   * defined. If there were no named parameters declared then the map will be
-   * empty.
-   */
+  /// Return a map from the names of named parameters to the types of the named
+  /// parameters of this type of function. The entries in the map will be
+  /// iterated in the same order as the order in which the named parameters were
+  /// defined. If there were no named parameters declared then the map will be
+  /// empty.
   Map<String, DartType> get namedParameterTypes;
 
-  /**
-   * The names of the required positional parameters of this type of function,
-   * in the order that the parameters appear.
-   */
+  /// The names of the required positional parameters of this type of function,
+  /// in the order that the parameters appear.
   List<String> get normalParameterNames;
 
-  /**
-   * Return a list containing the types of the normal parameters of this type of
-   * function. The parameter types are in the same order as they appear in the
-   * declaration of the function.
-   */
+  /// Return a list containing the types of the normal parameters of this type
+  /// of function. The parameter types are in the same order as they appear in
+  /// the declaration of the function.
   List<DartType> get normalParameterTypes;
 
-  /**
-   * The names of the optional positional parameters of this type of function,
-   * in the order that the parameters appear.
-   */
+  /// The names of the optional positional parameters of this type of function,
+  /// in the order that the parameters appear.
   List<String> get optionalParameterNames;
 
-  /**
-   * Return a map from the names of optional (positional) parameters to the
-   * types of the optional parameters of this type of function. The entries in
-   * the map will be iterated in the same order as the order in which the
-   * optional parameters were defined. If there were no optional parameters
-   * declared then the map will be empty.
-   */
+  /// Return a map from the names of optional (positional) parameters to the
+  /// types of the optional parameters of this type of function. The entries in
+  /// the map will be iterated in the same order as the order in which the
+  /// optional parameters were defined. If there were no optional parameters
+  /// declared then the map will be empty.
   List<DartType> get optionalParameterTypes;
 
-  /**
-   * Return a list containing the parameters elements of this type of function.
-   * The parameter types are in the same order as they appear in the declaration
-   * of the function.
-   */
+  /// Return a list containing the parameters elements of this type of function.
+  /// The parameter types are in the same order as they appear in the
+  /// declaration of the function.
   List<ParameterElement> get parameters;
 
-  /**
-   * Return the type of object returned by this type of function.
-   */
+  /// Return the type of object returned by this type of function.
   DartType get returnType;
 
-  /**
-   * The formal type parameters of this generic function.
-   * For example `<T> T -> T`.
-   *
-   * These are distinct from the [typeParameters] list, which contains type
-   * parameters from surrounding contexts, and thus are free type variables from
-   * the perspective of this function type.
-   */
+  /// The formal type parameters of this generic function.
+  /// For example `<T> T -> T`.
+  ///
+  /// These are distinct from the [typeParameters] list, which contains type
+  /// parameters from surrounding contexts, and thus are free type variables
+  /// from the perspective of this function type.
   List<TypeParameterElement> get typeFormals;
 
   @override
   FunctionType instantiate(List<DartType> argumentTypes);
 
-  /**
-   * Return `true` if this type is a subtype of the given [type].
-   *
-   * A function type <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>) &rarr; T</i> is
-   * a subtype of the function type <i>(S<sub>1</sub>, &hellip;, S<sub>n</sub>)
-   * &rarr; S</i>, if all of the following conditions are met:
-   *
-   * * Either
-   *   * <i>S</i> is void, or
-   *   * <i>T &hArr; S</i>.
-   *
-   * * For all <i>i</i>, 1 <= <i>i</i> <= <i>n</i>, <i>T<sub>i</sub> &hArr;
-   *   S<sub>i</sub></i>.
-   *
-   * A function type <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>,
-   * [T<sub>n+1</sub>, &hellip;, T<sub>n+k</sub>]) &rarr; T</i> is a subtype of
-   * the function type <i>(S<sub>1</sub>, &hellip;, S<sub>n</sub>,
-   * [S<sub>n+1</sub>, &hellip;, S<sub>n+m</sub>]) &rarr; S</i>, if all of the
-   * following conditions are met:
-   *
-   * * Either
-   *   * <i>S</i> is void, or
-   *   * <i>T &hArr; S</i>.
-   *
-   * * <i>k</i> >= <i>m</i> and for all <i>i</i>, 1 <= <i>i</i> <= <i>n+m</i>,
-   *   <i>T<sub>i</sub> &hArr; S<sub>i</sub></i>.
-   *
-   * A function type <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>,
-   * {T<sub>x1</sub> x1, &hellip;, T<sub>xk</sub> xk}) &rarr; T</i> is a subtype
-   * of the function type <i>(S<sub>1</sub>, &hellip;, S<sub>n</sub>,
-   * {S<sub>y1</sub> y1, &hellip;, S<sub>ym</sub> ym}) &rarr; S</i>, if all of
-   * the following conditions are met:
-   * * Either
-   *   * <i>S</i> is void,
-   *   * or <i>T &hArr; S</i>.
-   *
-   * * For all <i>i</i>, 1 <= <i>i</i> <= <i>n</i>, <i>T<sub>i</sub> &hArr;
-   *   S<sub>i</sub></i>.
-   * * <i>k</i> >= <i>m</i> and <i>y<sub>i</sub></i> in <i>{x<sub>1</sub>,
-   *   &hellip;, x<sub>k</sub>}</i>, 1 <= <i>i</i> <= <i>m</i>.
-   * * For all <i>y<sub>i</sub></i> in <i>{y<sub>1</sub>, &hellip;,
-   *   y<sub>m</sub>}</i>, <i>y<sub>i</sub> = x<sub>j</sub> => Tj &hArr; Si</i>.
-   *
-   * In addition, the following subtype rules apply:
-   *
-   * <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>, []) &rarr; T <: (T<sub>1</sub>,
-   * &hellip;, T<sub>n</sub>) &rarr; T.</i><br>
-   * <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>) &rarr; T <: (T<sub>1</sub>,
-   * &hellip;, T<sub>n</sub>, {}) &rarr; T.</i><br>
-   * <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>, {}) &rarr; T <: (T<sub>1</sub>,
-   * &hellip;, T<sub>n</sub>) &rarr; T.</i><br>
-   * <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>) &rarr; T <: (T<sub>1</sub>,
-   * &hellip;, T<sub>n</sub>, []) &rarr; T.</i>
-   *
-   * All functions implement the class `Function`. However not all function
-   * types are a subtype of `Function`. If an interface type <i>I</i> includes a
-   * method named `call()`, and the type of `call()` is the function type
-   * <i>F</i>, then <i>I</i> is considered to be a subtype of <i>F</i>.
-   */
+  /// Return `true` if this type is a subtype of the given [type].
+  ///
+  /// A function type <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>) &rarr; T</i>
+  /// is a subtype of the function type <i>(S<sub>1</sub>, &hellip;,
+  /// S<sub>n</sub>) &rarr; S</i>, if all of the following conditions are met:
+  ///
+  /// * Either
+  ///   * <i>S</i> is void, or
+  ///   * <i>T &hArr; S</i>.
+  ///
+  /// * For all <i>i</i>, 1 <= <i>i</i> <= <i>n</i>, <i>T<sub>i</sub> &hArr;
+  ///   S<sub>i</sub></i>.
+  ///
+  /// A function type <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>,
+  /// [T<sub>n+1</sub>, &hellip;, T<sub>n+k</sub>]) &rarr; T</i> is a subtype of
+  /// the function type <i>(S<sub>1</sub>, &hellip;, S<sub>n</sub>,
+  /// [S<sub>n+1</sub>, &hellip;, S<sub>n+m</sub>]) &rarr; S</i>, if all of the
+  /// following conditions are met:
+  ///
+  /// * Either
+  ///   * <i>S</i> is void, or
+  ///   * <i>T &hArr; S</i>.
+  ///
+  /// * <i>k</i> >= <i>m</i> and for all <i>i</i>, 1 <= <i>i</i> <= <i>n+m</i>,
+  ///   <i>T<sub>i</sub> &hArr; S<sub>i</sub></i>.
+  ///
+  /// A function type <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>,
+  /// {T<sub>x1</sub> x1, &hellip;, T<sub>xk</sub> xk}) &rarr; T</i> is a
+  /// subtype of the function type <i>(S<sub>1</sub>, &hellip;, S<sub>n</sub>,
+  /// {S<sub>y1</sub> y1, &hellip;, S<sub>ym</sub> ym}) &rarr; S</i>, if all of
+  /// the following conditions are met:
+  /// * Either
+  ///   * <i>S</i> is void,
+  ///   * or <i>T &hArr; S</i>.
+  ///
+  /// * For all <i>i</i>, 1 <= <i>i</i> <= <i>n</i>, <i>T<sub>i</sub> &hArr;
+  ///   S<sub>i</sub></i>.
+  /// * <i>k</i> >= <i>m</i> and <i>y<sub>i</sub></i> in <i>{x<sub>1</sub>,
+  ///   &hellip;, x<sub>k</sub>}</i>, 1 <= <i>i</i> <= <i>m</i>.
+  /// * For all <i>y<sub>i</sub></i> in <i>{y<sub>1</sub>, &hellip;,
+  ///   y<sub>m</sub>}</i>, <i>y<sub>i</sub> = x<sub>j</sub> => Tj &hArr;
+  ///   Si</i>.
+  ///
+  /// In addition, the following subtype rules apply:
+  ///
+  /// <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>, []) &rarr; T <:
+  /// (T<sub>1</sub>, &hellip;, T<sub>n</sub>) &rarr; T.</i><br>
+  /// <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>) &rarr; T <: (T<sub>1</sub>,
+  /// &hellip;, T<sub>n</sub>, {}) &rarr; T.</i><br>
+  /// <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>, {}) &rarr; T <:
+  /// (T<sub>1</sub>, &hellip;, T<sub>n</sub>) &rarr; T.</i><br>
+  /// <i>(T<sub>1</sub>, &hellip;, T<sub>n</sub>) &rarr; T <: (T<sub>1</sub>,
+  /// &hellip;, T<sub>n</sub>, []) &rarr; T.</i>
+  ///
+  /// All functions implement the class `Function`. However not all function
+  /// types are a subtype of `Function`. If an interface type <i>I</i> includes
+  /// a method named `call()`, and the type of `call()` is the function type
+  /// <i>F</i>, then <i>I</i> is considered to be a subtype of <i>F</i>.
   @override
   bool isSubtypeOf(DartType type);
 
@@ -339,318 +281,269 @@
   FunctionType substitute2(
       List<DartType> argumentTypes, List<DartType> parameterTypes);
 
-  /**
-   * Return the type resulting from substituting the given [argumentTypes] for
-   * this type's parameters. This is fully equivalent to
-   * `substitute(argumentTypes, getTypeArguments())`.
-   */
+  /// Return the type resulting from substituting the given [argumentTypes] for
+  /// this type's parameters. This is fully equivalent to
+  /// `substitute(argumentTypes, getTypeArguments())`.
   @deprecated // use instantiate
   FunctionType substitute3(List<DartType> argumentTypes);
 }
 
-/**
- * The type introduced by either a class or an interface, or a reference to such
- * a type.
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// The type introduced by either a class or an interface, or a reference to
+/// such a type.
+///
+/// Clients may not extend, implement or mix-in this class.
 abstract class InterfaceType implements ParameterizedType {
-  /**
-   * Return a list containing all of the accessors (getters and setters)
-   * declared in this type.
-   */
+  /// Return a list containing all of the accessors (getters and setters)
+  /// declared in this type.
   List<PropertyAccessorElement> get accessors;
 
-  /**
-   * Return a list containing all of the constructors declared in this type.
-   */
+  /// Return a list containing all of the constructors declared in this type.
   List<ConstructorElement> get constructors;
 
   @override
   ClassElement get element;
 
-  /**
-   * Return a list containing all of the interfaces that are implemented by this
-   * interface. Note that this is <b>not</b>, in general, equivalent to getting
-   * the interfaces from this type's element because the types returned by this
-   * method will have had their type parameters replaced.
-   */
+  /// Return a list containing all of the interfaces that are implemented by
+  /// this interface. Note that this is <b>not</b>, in general, equivalent to
+  /// getting the interfaces from this type's element because the types returned
+  /// by this method will have had their type parameters replaced.
   List<InterfaceType> get interfaces;
 
-  /**
-   * Return a list containing all of the methods declared in this type.
-   */
+  /// Return a list containing all of the methods declared in this type.
   List<MethodElement> get methods;
 
-  /**
-   * Return a list containing all of the mixins that are applied to the class
-   * being extended in order to derive the superclass of this class. Note that
-   * this is <b>not</b>, in general, equivalent to getting the mixins from this
-   * type's element because the types returned by this method will have had
-   * their type parameters replaced.
-   */
+  /// Return a list containing all of the mixins that are applied to the class
+  /// being extended in order to derive the superclass of this class. Note that
+  /// this is <b>not</b>, in general, equivalent to getting the mixins from this
+  /// type's element because the types returned by this method will have had
+  /// their type parameters replaced.
   List<InterfaceType> get mixins;
 
-  /**
-   * Return the type representing the superclass of this type, or null if this
-   * type represents the class 'Object'. Note that this is <b>not</b>, in
-   * general, equivalent to getting the superclass from this type's element
-   * because the type returned by this method will have had it's type parameters
-   * replaced.
-   */
+  /// Return the type representing the superclass of this type, or null if this
+  /// type represents the class 'Object'. Note that this is <b>not</b>, in
+  /// general, equivalent to getting the superclass from this type's element
+  /// because the type returned by this method will have had it's type
+  /// parameters replaced.
   InterfaceType get superclass;
 
-  /**
-   * Return a list containing all of the super-class constraints that this
-   * mixin declaration declares. The list will be empty if this class does not
-   * represent a mixin declaration.
-   */
+  /// Return a list containing all of the super-class constraints that this
+  /// mixin declaration declares. The list will be empty if this class does not
+  /// represent a mixin declaration.
   List<InterfaceType> get superclassConstraints;
 
-  /**
-   * Return the element representing the getter with the given [name] that is
-   * declared in this class, or `null` if this class does not declare a getter
-   * with the given name.
-   */
+  /// Return the element representing the getter with the given [name] that is
+  /// declared in this class, or `null` if this class does not declare a getter
+  /// with the given name.
   PropertyAccessorElement getGetter(String name);
 
-  /**
-   * Return the element representing the method with the given [name] that is
-   * declared in this class, or `null` if this class does not declare a method
-   * with the given name.
-   */
+  /// Return the element representing the method with the given [name] that is
+  /// declared in this class, or `null` if this class does not declare a method
+  /// with the given name.
   MethodElement getMethod(String name);
 
-  /**
-   * Return the element representing the setter with the given [name] that is
-   * declared in this class, or `null` if this class does not declare a setter
-   * with the given name.
-   */
+  /// Return the element representing the setter with the given [name] that is
+  /// declared in this class, or `null` if this class does not declare a setter
+  /// with the given name.
   PropertyAccessorElement getSetter(String name);
 
   @override
   InterfaceType instantiate(List<DartType> argumentTypes);
 
-  /**
-   * Return `true` if this type is a direct supertype of the given [type]. The
-   * implicit interface of class <i>I</i> is a direct supertype of the implicit
-   * interface of class <i>J</i> iff:
-   *
-   * * <i>I</i> is Object, and <i>J</i> has no extends clause.
-   * * <i>I</i> is listed in the extends clause of <i>J</i>.
-   * * <i>I</i> is listed in the implements clause of <i>J</i>.
-   * * <i>I</i> is listed in the with clause of <i>J</i>.
-   * * <i>J</i> is a mixin application of the mixin of <i>I</i>.
-   */
+  /// Return `true` if this type is a direct supertype of the given [type]. The
+  /// implicit interface of class <i>I</i> is a direct supertype of the implicit
+  /// interface of class <i>J</i> iff:
+  ///
+  /// * <i>I</i> is Object, and <i>J</i> has no extends clause.
+  /// * <i>I</i> is listed in the extends clause of <i>J</i>.
+  /// * <i>I</i> is listed in the implements clause of <i>J</i>.
+  /// * <i>I</i> is listed in the with clause of <i>J</i>.
+  /// * <i>J</i> is a mixin application of the mixin of <i>I</i>.
   bool isDirectSupertypeOf(InterfaceType type);
 
-  /**
-   * Return `true` if this type is more specific than the given [type]. An
-   * interface type <i>T</i> is more specific than an interface type <i>S</i>,
-   * written <i>T &laquo; S</i>, if one of the following conditions is met:
-   *
-   * * Reflexivity: <i>T</i> is <i>S</i>.
-   * * <i>T</i> is bottom.
-   * * <i>S</i> is dynamic.
-   * * Direct supertype: <i>S</i> is a direct supertype of <i>T</i>.
-   * * <i>T</i> is a type parameter and <i>S</i> is the upper bound of <i>T</i>.
-   * * Covariance: <i>T</i> is of the form <i>I&lt;T<sub>1</sub>, &hellip;,
-   *   T<sub>n</sub>&gt;</i> and S</i> is of the form <i>I&lt;S<sub>1</sub>,
-   *   &hellip;, S<sub>n</sub>&gt;</i> and <i>T<sub>i</sub> &laquo;
-   *   S<sub>i</sub></i>, <i>1 <= i <= n</i>.
-   * * Transitivity: <i>T &laquo; U</i> and <i>U &laquo; S</i>.
-   */
+  /// Return `true` if this type is more specific than the given [type]. An
+  /// interface type <i>T</i> is more specific than an interface type <i>S</i>,
+  /// written <i>T &laquo; S</i>, if one of the following conditions is met:
+  ///
+  /// * Reflexivity: <i>T</i> is <i>S</i>.
+  /// * <i>T</i> is bottom.
+  /// * <i>S</i> is dynamic.
+  /// * Direct supertype: <i>S</i> is a direct supertype of <i>T</i>.
+  /// * <i>T</i> is a type parameter and <i>S</i> is the upper bound of
+  /// <i>T</i>.
+  /// * Covariance: <i>T</i> is of the form <i>I&lt;T<sub>1</sub>, &hellip;,
+  ///   T<sub>n</sub>&gt;</i> and S</i> is of the form <i>I&lt;S<sub>1</sub>,
+  ///   &hellip;, S<sub>n</sub>&gt;</i> and <i>T<sub>i</sub> &laquo;
+  ///   S<sub>i</sub></i>, <i>1 <= i <= n</i>.
+  /// * Transitivity: <i>T &laquo; U</i> and <i>U &laquo; S</i>.
   @override
   bool isMoreSpecificThan(DartType type);
 
-  /**
-   * Return `true` if this type is a subtype of the given [type]. An interface
-   * type <i>T</i> is a subtype of an interface type <i>S</i>, written <i>T</i>
-   * <: <i>S</i>, iff <i>[bottom/dynamic]T</i> &laquo; <i>S</i> (<i>T</i> is
-   * more specific than <i>S</i>). If an interface type <i>I</i> includes a
-   * method named <i>call()</i>, and the type of <i>call()</i> is the function
-   * type <i>F</i>, then <i>I</i> is considered to be a subtype of <i>F</i>.
-   */
+  /// Return `true` if this type is a subtype of the given [type]. An interface
+  /// type <i>T</i> is a subtype of an interface type <i>S</i>, written <i>T</i>
+  /// <: <i>S</i>, iff <i>[bottom/dynamic]T</i> &laquo; <i>S</i> (<i>T</i> is
+  /// more specific than <i>S</i>). If an interface type <i>I</i> includes a
+  /// method named <i>call()</i>, and the type of <i>call()</i> is the function
+  /// type <i>F</i>, then <i>I</i> is considered to be a subtype of <i>F</i>.
   @override
   bool isSubtypeOf(DartType type);
 
-  /**
-   * Return the element representing the constructor that results from looking
-   * up the constructor with the given [name] in this class with respect to the
-   * given [library], or `null` if the look up fails. The behavior of this
-   * method is defined by the Dart Language Specification in section 12.11.1:
-   * <blockquote>
-   * If <i>e</i> is of the form <b>new</b> <i>T.id()</i> then let <i>q<i> be the
-   * constructor <i>T.id</i>, otherwise let <i>q<i> be the constructor <i>T<i>.
-   * Otherwise, if <i>q</i> is not defined or not accessible, a
-   * NoSuchMethodException is thrown.
-   * </blockquote>
-   */
+  /// Return the element representing the constructor that results from looking
+  /// up the constructor with the given [name] in this class with respect to the
+  /// given [library], or `null` if the look up fails. The behavior of this
+  /// method is defined by the Dart Language Specification in section 12.11.1:
+  /// <blockquote>
+  /// If <i>e</i> is of the form <b>new</b> <i>T.id()</i> then let <i>q<i> be
+  /// the constructor <i>T.id</i>, otherwise let <i>q<i> be the constructor
+  /// <i>T<i>. Otherwise, if <i>q</i> is not defined or not accessible, a
+  /// NoSuchMethodException is thrown.
+  /// </blockquote>
   ConstructorElement lookUpConstructor(String name, LibraryElement library);
 
-  /**
-   * Return the element representing the getter that results from looking up the
-   * getter with the given [name] in this class with respect to the given
-   * [library], or `null` if the look up fails. The behavior of this method is
-   * defined by the Dart Language Specification in section 12.15.1:
-   * <blockquote>
-   * The result of looking up getter (respectively setter) <i>m</i> in class
-   * <i>C</i> with respect to library <i>L</i> is:
-   * * If <i>C</i> declares an instance getter (respectively setter) named
-   *   <i>m</i> that is accessible to <i>L</i>, then that getter (respectively
-   *   setter) is the result of the lookup. Otherwise, if <i>C</i> has a
-   *   superclass <i>S</i>, then the result of the lookup is the result of
-   *   looking up getter (respectively setter) <i>m</i> in <i>S</i> with respect
-   *   to <i>L</i>. Otherwise, we say that the lookup has failed.
-   * </blockquote>
-   */
+  /// Return the element representing the getter that results from looking up
+  /// the getter with the given [name] in this class with respect to the given
+  /// [library], or `null` if the look up fails. The behavior of this method is
+  /// defined by the Dart Language Specification in section 12.15.1:
+  /// <blockquote>
+  /// The result of looking up getter (respectively setter) <i>m</i> in class
+  /// <i>C</i> with respect to library <i>L</i> is:
+  /// * If <i>C</i> declares an instance getter (respectively setter) named
+  ///   <i>m</i> that is accessible to <i>L</i>, then that getter (respectively
+  ///   setter) is the result of the lookup. Otherwise, if <i>C</i> has a
+  ///   superclass <i>S</i>, then the result of the lookup is the result of
+  ///   looking up getter (respectively setter) <i>m</i> in <i>S</i> with
+  ///   respect to <i>L</i>. Otherwise, we say that the lookup has failed.
+  /// </blockquote>
   PropertyAccessorElement lookUpGetter(String name, LibraryElement library);
 
-  /**
-   * Return the element representing the getter that results from looking up the
-   * getter with the given [name] in the superclass of this class with respect
-   * to the given [library], or `null` if the look up fails. The behavior of
-   * this method is defined by the Dart Language Specification in section
-   * 12.15.1:
-   * <blockquote>
-   * The result of looking up getter (respectively setter) <i>m</i> in class
-   * <i>C</i> with respect to library <i>L</i> is:
-   * * If <i>C</i> declares an instance getter (respectively setter) named
-   *   <i>m</i> that is accessible to <i>L</i>, then that getter (respectively
-   *   setter) is the result of the lookup. Otherwise, if <i>C</i> has a
-   *   superclass <i>S</i>, then the result of the lookup is the result of
-   *   looking up getter (respectively setter) <i>m</i> in <i>S</i> with respect
-   *   to <i>L</i>. Otherwise, we say that the lookup has failed.
-   * </blockquote>
-   */
+  /// Return the element representing the getter that results from looking up
+  /// the getter with the given [name] in the superclass of this class with
+  /// respect to the given [library], or `null` if the look up fails. The
+  /// behavior of this method is defined by the Dart Language Specification in
+  /// section 12.15.1:
+  /// <blockquote>
+  /// The result of looking up getter (respectively setter) <i>m</i> in class
+  /// <i>C</i> with respect to library <i>L</i> is:
+  /// * If <i>C</i> declares an instance getter (respectively setter) named
+  ///   <i>m</i> that is accessible to <i>L</i>, then that getter (respectively
+  ///   setter) is the result of the lookup. Otherwise, if <i>C</i> has a
+  ///   superclass <i>S</i>, then the result of the lookup is the result of
+  ///   looking up getter (respectively setter) <i>m</i> in <i>S</i> with
+  ///   respect to <i>L</i>. Otherwise, we say that the lookup has failed.
+  /// </blockquote>
   PropertyAccessorElement lookUpGetterInSuperclass(
       String name, LibraryElement library);
 
-  /**
-   * Look up the member with the given [name] in this type and all extended
-   * and mixed in classes, and by default including [thisType]. If the search
-   * fails, this will then search interfaces.
-   *
-   * Return the element representing the member that was found, or `null` if
-   * there is no getter with the given name.
-   *
-   * The [library] determines if a private member name is visible, and does not
-   * need to be supplied for public names.
-   */
+  /// Look up the member with the given [name] in this type and all extended
+  /// and mixed in classes, and by default including [thisType]. If the search
+  /// fails, this will then search interfaces.
+  ///
+  /// Return the element representing the member that was found, or `null` if
+  /// there is no getter with the given name.
+  ///
+  /// The [library] determines if a private member name is visible, and does not
+  /// need to be supplied for public names.
   PropertyAccessorElement lookUpInheritedGetter(String name,
       {LibraryElement library, bool thisType: true});
 
-  /**
-   * Look up the member with the given [name] in this type and all extended
-   * and mixed in classes, starting from this type. If the search fails,
-   * search interfaces.
-   *
-   * Return the element representing the member that was found, or `null` if
-   * there is no getter with the given name.
-   *
-   * The [library] determines if a private member name is visible, and does not
-   * need to be supplied for public names.
-   */
+  /// Look up the member with the given [name] in this type and all extended
+  /// and mixed in classes, starting from this type. If the search fails,
+  /// search interfaces.
+  ///
+  /// Return the element representing the member that was found, or `null` if
+  /// there is no getter with the given name.
+  ///
+  /// The [library] determines if a private member name is visible, and does not
+  /// need to be supplied for public names.
   ExecutableElement lookUpInheritedGetterOrMethod(String name,
       {LibraryElement library});
 
-  /**
-   * Look up the member with the given [name] in this type and all extended
-   * and mixed in classes, and by default including [thisType]. If the search
-   * fails, this will then search interfaces.
-   *
-   * Return the element representing the member that was found, or `null` if
-   * there is no getter with the given name.
-   *
-   * The [library] determines if a private member name is visible, and does not
-   * need to be supplied for public names.
-   */
+  /// Look up the member with the given [name] in this type and all extended
+  /// and mixed in classes, and by default including [thisType]. If the search
+  /// fails, this will then search interfaces.
+  ///
+  /// Return the element representing the member that was found, or `null` if
+  /// there is no getter with the given name.
+  ///
+  /// The [library] determines if a private member name is visible, and does not
+  /// need to be supplied for public names.
   MethodElement lookUpInheritedMethod(String name,
       {LibraryElement library, bool thisType: true});
 
-  /**
-   * Look up the member with the given [name] in this type and all extended
-   * and mixed in classes, and by default including [thisType]. If the search
-   * fails, this will then search interfaces.
-   *
-   * Return the element representing the member that was found, or `null` if
-   * there is no getter with the given name.
-   *
-   * The [library] determines if a private member name is visible, and does not
-   * need to be supplied for public names.
-   */
+  /// Look up the member with the given [name] in this type and all extended
+  /// and mixed in classes, and by default including [thisType]. If the search
+  /// fails, this will then search interfaces.
+  ///
+  /// Return the element representing the member that was found, or `null` if
+  /// there is no getter with the given name.
+  ///
+  /// The [library] determines if a private member name is visible, and does not
+  /// need to be supplied for public names.
   PropertyAccessorElement lookUpInheritedSetter(String name,
       {LibraryElement library, bool thisType: true});
 
-  /**
-   * Return the element representing the method that results from looking up the
-   * method with the given [name] in this class with respect to the given
-   * [library], or `null` if the look up fails. The behavior of this method is
-   * defined by the Dart Language Specification in section 12.15.1:
-   * <blockquote>
-   * The result of looking up method <i>m</i> in class <i>C</i> with respect to
-   * library <i>L</i> is:
-   * * If <i>C</i> declares an instance method named <i>m</i> that is accessible
-   *   to <i>L</i>, then that method is the result of the lookup. Otherwise, if
-   *   <i>C</i> has a superclass <i>S</i>, then the result of the lookup is the
-   *   result of looking up method <i>m</i> in <i>S</i> with respect to <i>L</i>
-   *   Otherwise, we say that the lookup has failed.
-   * </blockquote>
-   */
+  /// Return the element representing the method that results from looking up
+  /// the method with the given [name] in this class with respect to the given
+  /// [library], or `null` if the look up fails. The behavior of this method is
+  /// defined by the Dart Language Specification in section 12.15.1:
+  /// <blockquote>
+  /// The result of looking up method <i>m</i> in class <i>C</i> with respect to
+  /// library <i>L</i> is:
+  /// * If <i>C</i> declares an instance method named <i>m</i> that is
+  ///   accessible to <i>L</i>, then that method is the result of the lookup.
+  ///   Otherwise, if <i>C</i> has a superclass <i>S</i>, then the result of the
+  ///   lookup is the result of looking up method <i>m</i> in <i>S</i> with
+  ///   respect to <i>L</i> Otherwise, we say that the lookup has failed.
+  /// </blockquote>
   MethodElement lookUpMethod(String name, LibraryElement library);
 
-  /**
-   * Return the element representing the method that results from looking up the
-   * method with the given [name] in the superclass of this class with respect
-   * to the given [library], or `null` if the look up fails. The behavior of
-   * this method is defined by the Dart Language Specification in section
-   * 12.15.1:
-   * <blockquote>
-   * The result of looking up method <i>m</i> in class <i>C</i> with respect to
-   * library <i>L</i> is:
-   * * If <i>C</i> declares an instance method named <i>m</i> that is accessible
-   *   to <i>L</i>, then that method is the result of the lookup. Otherwise, if
-   * <i>C</i> has a superclass <i>S</i>, then the result of the lookup is the
-   * result of looking up method <i>m</i> in <i>S</i> with respect to <i>L</i>.
-   * Otherwise, we say that the lookup has failed.
-   * </blockquote>
-   */
+  /// Return the element representing the method that results from looking up
+  /// the method with the given [name] in the superclass of this class with
+  /// respect to the given [library], or `null` if the look up fails. The
+  /// behavior of this method is defined by the Dart Language Specification in
+  /// section 12.15.1:
+  /// <blockquote>
+  /// The result of looking up method <i>m</i> in class <i>C</i> with respect to
+  /// library <i>L</i> is:
+  /// * If <i>C</i> declares an instance method named <i>m</i> that is
+  ///   accessible to <i>L</i>, then that method is the result of the lookup.
+  ///   Otherwise, if <i>C</i> has a superclass <i>S</i>, then the result of the
+  /// * lookup is the result of looking up method <i>m</i> in <i>S</i> with
+  ///   respect to <i>L</i>.
+  /// * Otherwise, we say that the lookup has failed.
+  /// </blockquote>
   MethodElement lookUpMethodInSuperclass(String name, LibraryElement library);
 
-  /**
-   * Return the element representing the setter that results from looking up the
-   * setter with the given [name] in this class with respect to the given
-   * [library], or `null` if the look up fails. The behavior of this method is
-   * defined by the Dart Language Specification in section 12.16:
-   * <blockquote>
-   * The result of looking up getter (respectively setter) <i>m</i> in class
-   * <i>C</i> with respect to library <i>L</i> is:
-   * * If <i>C</i> declares an instance getter (respectively setter) named
-   *   <i>m</i> that is accessible to <i>L</i>, then that getter (respectively
-   *   setter) is the result of the lookup. Otherwise, if <i>C</i> has a
-   *   superclass <i>S</i>, then the result of the lookup is the result of
-   *   looking up getter (respectively setter) <i>m</i> in <i>S</i> with respect
-   *   to <i>L</i>. Otherwise, we say that the lookup has failed.
-   * </blockquote>
-   */
+  /// Return the element representing the setter that results from looking up
+  /// the setter with the given [name] in this class with respect to the given
+  /// [library], or `null` if the look up fails. The behavior of this method is
+  /// defined by the Dart Language Specification in section 12.16:
+  /// <blockquote>
+  /// The result of looking up getter (respectively setter) <i>m</i> in class
+  /// <i>C</i> with respect to library <i>L</i> is:
+  /// * If <i>C</i> declares an instance getter (respectively setter) named
+  ///   <i>m</i> that is accessible to <i>L</i>, then that getter (respectively
+  ///   setter) is the result of the lookup. Otherwise, if <i>C</i> has a
+  ///   superclass <i>S</i>, then the result of the lookup is the result of
+  ///   looking up getter (respectively setter) <i>m</i> in <i>S</i> with
+  ///   respect to <i>L</i>. Otherwise, we say that the lookup has failed.
+  /// </blockquote>
   PropertyAccessorElement lookUpSetter(String name, LibraryElement library);
 
-  /**
-   * Return the element representing the setter that results from looking up the
-   * setter with the given [name] in the superclass of this class with respect
-   * to the given [library], or `null` if the look up fails. The behavior of
-   * this method is defined by the Dart Language Specification in section 12.16:
-   * <blockquote>
-   * The result of looking up getter (respectively setter) <i>m</i> in class
-   * <i>C</i> with respect to library <i>L</i> is:
-   * * If <i>C</i> declares an instance getter (respectively setter) named
-   *   <i>m</i> that is accessible to <i>L</i>, then that getter (respectively
-   *   setter) is the result of the lookup. Otherwise, if <i>C</i> has a
-   *   superclass <i>S</i>, then the result of the lookup is the result of
-   *   looking up getter (respectively setter) <i>m</i> in <i>S</i> with respect
-   *   to <i>L</i>. Otherwise, we say that the lookup has failed.
-   * </blockquote>
-   */
+  /// Return the element representing the setter that results from looking up
+  /// the setter with the given [name] in the superclass of this class with
+  /// respect to the given [library], or `null` if the look up fails. The
+  /// behavior of this method is defined by the Dart Language Specification in
+  /// section 12.16:
+  /// <blockquote>
+  /// The result of looking up getter (respectively setter) <i>m</i> in class
+  /// <i>C</i> with respect to library <i>L</i> is:
+  /// * If <i>C</i> declares an instance getter (respectively setter) named
+  ///   <i>m</i> that is accessible to <i>L</i>, then that getter (respectively
+  ///   setter) is the result of the lookup. Otherwise, if <i>C</i> has a
+  ///   superclass <i>S</i>, then the result of the lookup is the result of
+  ///   looking up getter (respectively setter) <i>m</i> in <i>S</i> with
+  ///   respect to <i>L</i>. Otherwise, we say that the lookup has failed.
+  /// </blockquote>
   PropertyAccessorElement lookUpSetterInSuperclass(
       String name, LibraryElement library);
 
@@ -658,84 +551,67 @@
   InterfaceType substitute2(
       List<DartType> argumentTypes, List<DartType> parameterTypes);
 
-  /**
-   * Return the type resulting from substituting the given arguments for this
-   * type's parameters. This is fully equivalent to `substitute2(argumentTypes,
-   * getTypeArguments())`.
-   */
+  /// Return the type resulting from substituting the given arguments for this
+  /// type's parameters. This is fully equivalent to `substitute2(argumentTypes,
+  /// getTypeArguments())`.
   @deprecated // use instantiate
   InterfaceType substitute4(List<DartType> argumentTypes);
 
-  /**
-   * Returns a "smart" version of the "least upper bound" of the given types.
-   *
-   * If these types have the same element and differ only in terms of the type
-   * arguments, attempts to find a compatible set of type arguments.
-   *
-   * Otherwise, returns the same result as [DartType.getLeastUpperBound].
-   */
+  /// Returns a "smart" version of the "least upper bound" of the given types.
+  ///
+  /// If these types have the same element and differ only in terms of the type
+  /// arguments, attempts to find a compatible set of type arguments.
+  ///
+  /// Otherwise, returns the same result as [DartType.getLeastUpperBound].
   // TODO(brianwilkerson) This needs to be deprecated and moved to TypeSystem.
   static InterfaceType getSmartLeastUpperBound(
           InterfaceType first, InterfaceType second) =>
       InterfaceTypeImpl.getSmartLeastUpperBound(first, second);
 }
 
-/**
- * A type that can track substituted type parameters, either for itself after
- * instantiation, or from a surrounding context.
- *
- * For example, given a class `Foo<T>`, after instantiation with S for T, it
- * will track the substitution `{S/T}`.
- *
- * This substitution will be propagated to its members. For example, say our
- * `Foo<T>` class has a field `T bar;`. When we look up this field, we will get
- * back a [FieldElement] that tracks the substituted type as `{S/T}T`, so when
- * we ask for the field type we will get `S`.
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// A type that can track substituted type parameters, either for itself after
+/// instantiation, or from a surrounding context.
+///
+/// For example, given a class `Foo<T>`, after instantiation with S for T, it
+/// will track the substitution `{S/T}`.
+///
+/// This substitution will be propagated to its members. For example, say our
+/// `Foo<T>` class has a field `T bar;`. When we look up this field, we will get
+/// back a [FieldElement] that tracks the substituted type as `{S/T}T`, so when
+/// we ask for the field type we will get `S`.
+///
+/// Clients may not extend, implement or mix-in this class.
 abstract class ParameterizedType implements DartType {
-  /**
-   * Return a list containing the actual types of the type arguments. If this
-   * type's element does not have type parameters, then the array should be
-   * empty (although it is possible for type arguments to be erroneously
-   * declared). If the element has type parameters and the actual type does not
-   * explicitly include argument values, then the type "dynamic" will be
-   * automatically provided.
-   */
+  /// Return a list containing the actual types of the type arguments. If this
+  /// type's element does not have type parameters, then the array should be
+  /// empty (although it is possible for type arguments to be erroneously
+  /// declared). If the element has type parameters and the actual type does not
+  /// explicitly include argument values, then the type "dynamic" will be
+  /// automatically provided.
   List<DartType> get typeArguments;
 
-  /**
-   * Return a list containing all of the type parameters declared for this type.
-   */
+  /// Return a list containing all of the type parameters declared for this
+  /// type.
   List<TypeParameterElement> get typeParameters;
 
-  /**
-   * Return the type resulting from instantiating (replacing) the given
-   * [argumentTypes] for this type's bound type parameters.
-   */
+  /// Return the type resulting from instantiating (replacing) the given
+  /// [argumentTypes] for this type's bound type parameters.
   ParameterizedType instantiate(List<DartType> argumentTypes);
 }
 
-/**
- * The type introduced by a type parameter.
- *
- * Clients may not extend, implement or mix-in this class.
- */
+/// The type introduced by a type parameter.
+///
+/// Clients may not extend, implement or mix-in this class.
 abstract class TypeParameterType implements DartType {
-  /**
-   * Return the type representing the bound associated with this parameter,
-   * or `dynamic` if there was no explicit bound.
-   */
+  /// Return the type representing the bound associated with this parameter,
+  /// or `dynamic` if there was no explicit bound.
   DartType get bound;
 
-  /**
-   * An object that can be used to identify this type parameter with `==`.
-   *
-   * Depending on the use, [bound] may also need to be taken into account.
-   * A given type parameter, it may have different bounds in different scopes.
-   * Always consult the bound if that could be relevant.
-   */
+  /// An object that can be used to identify this type parameter with `==`.
+  ///
+  /// Depending on the use, [bound] may also need to be taken into account.
+  /// A given type parameter, it may have different bounds in different scopes.
+  /// Always consult the bound if that could be relevant.
   ElementLocation get definition;
 
   @override
diff --git a/pkg/analyzer/lib/dart/element/type_system.dart b/pkg/analyzer/lib/dart/element/type_system.dart
index 769a5d9..df6cbe8 100644
--- a/pkg/analyzer/lib/dart/element/type_system.dart
+++ b/pkg/analyzer/lib/dart/element/type_system.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/dart/element/type.dart';
+import 'package:meta/meta.dart';
 
 /// A representation of the operations defined for the type system.
 ///
@@ -50,6 +51,61 @@
   /// important.
   bool isAssignableTo(DartType leftType, DartType rightType);
 
+  /// Return `true` if the [type] is a non-nullable type.
+  ///
+  /// We say that a type `T` is non-nullable if `T <: Object`. This is
+  /// equivalent to the syntactic criterion that `T` is any of:
+  /// - `Object`, `int`, `bool`, `Never`, `Function`
+  /// - Any function type
+  /// - Any class type or generic class type
+  /// - `FutureOr<S>` where `S` is non-nullable
+  /// - `X extends S` where `S` is non-nullable
+  /// - `X & S` where `S` is non-nullable
+  ///
+  /// The result of this method is undefined when the experiment 'non-nullable'
+  /// is not enabled.
+  @experimental
+  bool isNonNullable(DartType type);
+
+  /// Return `true` if the [type] is a nullable type.
+  ///
+  /// We say that a type `T` is nullable if `Null <: T`. This is equivalent to
+  /// the syntactic criterion that `T` is any of:
+  /// - `Null`
+  /// - `S?` for some `S`
+  /// - `FutureOr<S>` for some `S` where `S` is nullable
+  /// - `dynamic`
+  /// - `void`
+  ///
+  /// The result of this method is undefined when the experiment 'non-nullable'
+  /// is not enabled.
+  @experimental
+  bool isNullable(DartType type);
+
+  /// Return `true` if the [type] is a potentially non-nullable type.
+  ///
+  /// We say that a type `T` is potentially non-nullable if `T` is not nullable.
+  /// Note that this is different from saying that `T` is non-nullable. For
+  /// example, a type variable `X extends Object?` is a type which is
+  /// potentially non-nullable but not non-nullable.
+  ///
+  /// The result of this method is undefined when the experiment 'non-nullable'
+  /// is not enabled.
+  @experimental
+  bool isPotentiallyNonNullable(DartType type);
+
+  /// Return `true` if the [type] is not a potentially nullable type.
+  ///
+  /// We say that a type `T` is potentially nullable if `T` is not non-nullable.
+  /// Note that this is different from saying that `T` is nullable. For example,
+  /// a type variable `X extends Object?` is a type which is potentially
+  /// nullable but not nullable.
+  ///
+  /// The result of this method is undefined when the experiment 'non-nullable'
+  /// is not enabled.
+  @experimental
+  bool isPotentiallyNullable(DartType type);
+
   /// Return `true` if the [leftType] is a subtype of the [rightType].
   ///
   /// For the Dart 2.0 type system, the rules governing the subtype relationship
diff --git a/pkg/analyzer/lib/dart/element/visitor.dart b/pkg/analyzer/lib/dart/element/visitor.dart
index fa3fa79..fc6d4a6 100644
--- a/pkg/analyzer/lib/dart/element/visitor.dart
+++ b/pkg/analyzer/lib/dart/element/visitor.dart
@@ -2,86 +2,82 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/**
- * Defines element visitors that support useful patterns for visiting the
- * elements in an [element model](element.dart).
- *
- * Dart is an evolving language, and the element model must evolved with it.
- * When the element model changes, the visitor interface will sometimes change
- * as well. If it is desirable to get a compilation error when the structure of
- * the element model has been modified, then you should consider implementing
- * the interface [ElementVisitor] directly. Doing so will ensure that changes
- * that introduce new classes of elements will be flagged. (Of course, not all
- * changes to the element model require the addition of a new class of element,
- * and hence cannot be caught this way.)
- *
- * But if automatic detection of these kinds of changes is not necessary then
- * you will probably want to extend one of the classes in this library because
- * doing so will simplify the task of writing your visitor and guard against
- * future changes to the element model. For example, the
- * [RecursiveElementVisitor] automates the process of visiting all of the
- * descendants of an element.
- */
+/// Defines element visitors that support useful patterns for visiting the
+/// elements in an [element model](element.dart).
+///
+/// Dart is an evolving language, and the element model must evolved with it.
+/// When the element model changes, the visitor interface will sometimes change
+/// as well. If it is desirable to get a compilation error when the structure of
+/// the element model has been modified, then you should consider implementing
+/// the interface [ElementVisitor] directly. Doing so will ensure that changes
+/// that introduce new classes of elements will be flagged. (Of course, not all
+/// changes to the element model require the addition of a new class of element,
+/// and hence cannot be caught this way.)
+///
+/// But if automatic detection of these kinds of changes is not necessary then
+/// you will probably want to extend one of the classes in this library because
+/// doing so will simplify the task of writing your visitor and guard against
+/// future changes to the element model. For example, the
+/// [RecursiveElementVisitor] automates the process of visiting all of the
+/// descendants of an element.
 import 'package:analyzer/dart/element/element.dart';
 
-/**
- * An element visitor that will recursively visit all of the elements in an
- * element model (like instances of the class [RecursiveElementVisitor]). In
- * addition, when an element of a specific type is visited not only will the
- * visit method for that specific type of element be invoked, but additional
- * methods for the supertypes of that element will also be invoked. For example,
- * using an instance of this class to visit a [MethodElement] will cause the
- * method [visitMethodElement] to be invoked but will also cause the methods
- * [visitExecutableElement] and [visitElement] to be subsequently invoked. This
- * allows visitors to be written that visit all executable elements without
- * needing to override the visit method for each of the specific subclasses of
- * [ExecutableElement].
- *
- * Note, however, that unlike many visitors, element visitors visit objects
- * based on the interfaces implemented by those elements. Because interfaces
- * form a graph structure rather than a tree structure the way classes do, and
- * because it is generally undesirable for an object to be visited more than
- * once, this class flattens the interface graph into a pseudo-tree. In
- * particular, this class treats elements as if the element types were
- * structured in the following way:
- *
- * <pre>
- * Element
- *   ClassElement
- *   CompilationUnitElement
- *   ExecutableElement
- *       ConstructorElement
- *       LocalElement
- *           FunctionElement
- *       MethodElement
- *       PropertyAccessorElement
- *   ExportElement
- *   HtmlElement
- *   ImportElement
- *   LabelElement
- *   LibraryElement
- *   MultiplyDefinedElement
- *   PrefixElement
- *   TypeAliasElement
- *   TypeParameterElement
- *   UndefinedElement
- *   VariableElement
- *       PropertyInducingElement
- *           FieldElement
- *           TopLevelVariableElement
- *       LocalElement
- *           LocalVariableElement
- *           ParameterElement
- *               FieldFormalParameterElement
- * </pre>
- *
- * Subclasses that override a visit method must either invoke the overridden
- * visit method or explicitly invoke the more general visit method. Failure to
- * do so will cause the visit methods for superclasses of the element to not be
- * invoked and will cause the children of the visited node to not be visited.
- *
- * Clients may extend this class.
- */
+/// An element visitor that will recursively visit all of the elements in an
+/// element model (like instances of the class [RecursiveElementVisitor]). In
+/// addition, when an element of a specific type is visited not only will the
+/// visit method for that specific type of element be invoked, but additional
+/// methods for the supertypes of that element will also be invoked. For
+/// example, using an instance of this class to visit a [MethodElement] will
+/// cause the method [visitMethodElement] to be invoked but will also cause the
+/// methods [visitExecutableElement] and [visitElement] to be subsequently
+/// invoked. This allows visitors to be written that visit all executable
+/// elements without needing to override the visit method for each of the
+/// specific subclasses of [ExecutableElement].
+///
+/// Note, however, that unlike many visitors, element visitors visit objects
+/// based on the interfaces implemented by those elements. Because interfaces
+/// form a graph structure rather than a tree structure the way classes do, and
+/// because it is generally undesirable for an object to be visited more than
+/// once, this class flattens the interface graph into a pseudo-tree. In
+/// particular, this class treats elements as if the element types were
+/// structured in the following way:
+///
+/// <pre>
+/// Element
+///   ClassElement
+///   CompilationUnitElement
+///   ExecutableElement
+///       ConstructorElement
+///       LocalElement
+///           FunctionElement
+///       MethodElement
+///       PropertyAccessorElement
+///   ExportElement
+///   HtmlElement
+///   ImportElement
+///   LabelElement
+///   LibraryElement
+///   MultiplyDefinedElement
+///   PrefixElement
+///   TypeAliasElement
+///   TypeParameterElement
+///   UndefinedElement
+///   VariableElement
+///       PropertyInducingElement
+///           FieldElement
+///           TopLevelVariableElement
+///       LocalElement
+///           LocalVariableElement
+///           ParameterElement
+///               FieldFormalParameterElement
+/// </pre>
+///
+/// Subclasses that override a visit method must either invoke the overridden
+/// visit method or explicitly invoke the more general visit method. Failure to
+/// do so will cause the visit methods for superclasses of the element to not be
+/// invoked and will cause the children of the visited node to not be visited.
+///
+/// Clients may extend this class.
 class GeneralizingElementVisitor<R> implements ElementVisitor<R> {
   @override
   R visitClassElement(ClassElement element) => visitElement(element);
@@ -180,19 +176,17 @@
   R visitVariableElement(VariableElement element) => visitElement(element);
 }
 
-/**
- * A visitor that will recursively visit all of the element in an element model.
- * For example, using an instance of this class to visit a
- * [CompilationUnitElement] will also cause all of the types in the compilation
- * unit to be visited.
- *
- * Subclasses that override a visit method must either invoke the overridden
- * visit method or must explicitly ask the visited element to visit its
- * children. Failure to do so will cause the children of the visited element to
- * not be visited.
- *
- * Clients may extend this class.
- */
+/// A visitor that will recursively visit all of the element in an element
+/// model. For example, using an instance of this class to visit a
+/// [CompilationUnitElement] will also cause all of the types in the compilation
+/// unit to be visited.
+///
+/// Subclasses that override a visit method must either invoke the overridden
+/// visit method or must explicitly ask the visited element to visit its
+/// children. Failure to do so will cause the children of the visited element to
+/// not be visited.
+///
+/// Clients may extend this class.
 class RecursiveElementVisitor<R> implements ElementVisitor<R> {
   @override
   R visitClassElement(ClassElement element) {
@@ -315,14 +309,12 @@
   }
 }
 
-/**
- * A visitor that will do nothing when visiting an element. It is intended to be
- * a superclass for classes that use the visitor pattern primarily as a dispatch
- * mechanism (and hence don't need to recursively visit a whole structure) and
- * that only need to visit a small number of element types.
- *
- * Clients may extend this class.
- */
+/// A visitor that will do nothing when visiting an element. It is intended to
+/// be a superclass for classes that use the visitor pattern primarily as a
+/// dispatch mechanism (and hence don't need to recursively visit a whole
+/// structure) and that only need to visit a small number of element types.
+///
+/// Clients may extend this class.
 class SimpleElementVisitor<R> implements ElementVisitor<R> {
   @override
   R visitClassElement(ClassElement element) => null;
@@ -386,15 +378,13 @@
   R visitTypeParameterElement(TypeParameterElement element) => null;
 }
 
-/**
- * An AST visitor that will throw an exception if any of the visit methods that
- * are invoked have not been overridden. It is intended to be a superclass for
- * classes that implement the visitor pattern and need to (a) override all of
- * the visit methods or (b) need to override a subset of the visit method and
- * want to catch when any other visit methods have been invoked.
- *
- * Clients may extend this class.
- */
+/// An AST visitor that will throw an exception if any of the visit methods that
+/// are invoked have not been overridden. It is intended to be a superclass for
+/// classes that implement the visitor pattern and need to (a) override all of
+/// the visit methods or (b) need to override a subset of the visit method and
+/// want to catch when any other visit methods have been invoked.
+///
+/// Clients may extend this class.
 class ThrowingElementVisitor<R> implements ElementVisitor<R> {
   @override
   R visitClassElement(ClassElement element) => _throw(element);
diff --git a/pkg/analyzer/lib/error/error.dart b/pkg/analyzer/lib/error/error.dart
index 22efc18..0e565ab 100644
--- a/pkg/analyzer/lib/error/error.dart
+++ b/pkg/analyzer/lib/error/error.dart
@@ -11,6 +11,7 @@
 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode;
 import 'package:analyzer/src/generated/resolver.dart' show ResolverErrorCode;
 import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/manifest/manifest_warning_code.dart';
 import 'package:front_end/src/base/errors.dart';
 import 'package:front_end/src/scanner/errors.dart';
 
@@ -59,17 +60,14 @@
   CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
   CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
   CheckedModeCompileTimeErrorCode.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE,
-  CheckedModeCompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE,
-  CheckedModeCompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE,
-  CheckedModeCompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE,
-  CheckedModeCompileTimeErrorCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE,
   CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH,
   CompileTimeErrorCode.ABSTRACT_SUPER_MEMBER_REFERENCE,
   CompileTimeErrorCode.ACCESS_PRIVATE_ENUM_FIELD,
   CompileTimeErrorCode.AMBIGUOUS_EXPORT,
+  CompileTimeErrorCode.AMBIGUOUS_SET_OR_MAP_LITERAL_BOTH,
+  CompileTimeErrorCode.AMBIGUOUS_SET_OR_MAP_LITERAL_EITHER,
   CompileTimeErrorCode.ANNOTATION_WITH_NON_CLASS,
   CompileTimeErrorCode.ANNOTATION_WITH_TYPE_ARGUMENTS,
-  CompileTimeErrorCode.ARGUMENT_DEFINITION_TEST_NON_PARAMETER,
   CompileTimeErrorCode.ASYNC_FOR_IN_WRONG_CONTEXT,
   CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT,
   CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_PREFIX_NAME,
@@ -77,7 +75,6 @@
   CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME,
   CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_NAME,
   CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME,
-  CompileTimeErrorCode.BUILT_IN_IDENTIFIER_IN_DECLARATION,
   CompileTimeErrorCode.CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS,
   CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_AND_STATIC_FIELD,
   CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_AND_STATIC_METHOD,
@@ -87,7 +84,6 @@
   CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE,
   CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_CLASS,
   CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER,
-  CompileTimeErrorCode.CONST_CONSTRUCTOR_IN_SUBCLASS_OF_MIXIN_APPLICATION,
   CompileTimeErrorCode.CONST_CONSTRUCTOR_THROWS_EXCEPTION,
   CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST,
   CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD,
@@ -110,6 +106,8 @@
   CompileTimeErrorCode.CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS,
   CompileTimeErrorCode.CONST_NOT_INITIALIZED,
   CompileTimeErrorCode.CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS,
+  CompileTimeErrorCode.CONST_SPREAD_EXPECTED_LIST_OR_SET,
+  CompileTimeErrorCode.CONST_SPREAD_EXPECTED_MAP,
   CompileTimeErrorCode.CONST_WITH_INVALID_TYPE_PARAMETERS,
   CompileTimeErrorCode.CONST_WITH_NON_CONST,
   CompileTimeErrorCode.CONST_WITH_NON_CONSTANT_ARGUMENT,
@@ -125,8 +123,11 @@
   CompileTimeErrorCode.DUPLICATE_DEFINITION,
   CompileTimeErrorCode.DUPLICATE_NAMED_ARGUMENT,
   CompileTimeErrorCode.DUPLICATE_PART,
+  CompileTimeErrorCode.EQUAL_KEYS_IN_CONST_MAP,
+  CompileTimeErrorCode.EQUAL_ELEMENTS_IN_CONST_SET,
   CompileTimeErrorCode.EXPORT_INTERNAL_LIBRARY,
   CompileTimeErrorCode.EXPORT_OF_NON_LIBRARY,
+  CompileTimeErrorCode.EXPRESSION_IN_MAP,
   CompileTimeErrorCode.EXTENDS_DEFERRED_CLASS,
   CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
   CompileTimeErrorCode.EXTENDS_NON_CLASS,
@@ -168,7 +169,6 @@
   CompileTimeErrorCode.INVALID_CONSTANT,
   CompileTimeErrorCode.INVALID_CONSTRUCTOR_NAME,
   CompileTimeErrorCode.INVALID_FACTORY_NAME_NOT_A_CLASS,
-  CompileTimeErrorCode.INVALID_IDENTIFIER_IN_ASYNC,
   CompileTimeErrorCode.INVALID_MODIFIER_ON_CONSTRUCTOR,
   CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
   CompileTimeErrorCode.INVALID_INLINE_FUNCTION_TYPE,
@@ -181,6 +181,7 @@
   CompileTimeErrorCode.INVALID_USE_OF_COVARIANT,
   CompileTimeErrorCode.LABEL_IN_OUTER_SCOPE,
   CompileTimeErrorCode.LABEL_UNDEFINED,
+  CompileTimeErrorCode.MAP_ENTRY_NOT_IN_MAP,
   CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME,
   CompileTimeErrorCode.MISSING_CONST_IN_LIST_LITERAL,
   CompileTimeErrorCode.MISSING_CONST_IN_MAP_LITERAL,
@@ -216,18 +217,29 @@
   CompileTimeErrorCode.NON_CONSTANT_MAP_KEY,
   CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY,
   CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE,
+  CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT,
   CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY,
   CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT,
   CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY,
+  CompileTimeErrorCode.NON_CONSTANT_SPREAD_EXPRESSION_FROM_DEFERRED_LIBRARY,
+  CompileTimeErrorCode.NON_CONSTANT_IF_ELEMENT_CONDITION_FROM_DEFERRED_LIBRARY,
+  // ignore: deprecated_member_use_from_same_package
   CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER,
-  CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFERRED_LIBRARY,
   CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT,
   CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR,
   CompileTimeErrorCode.NON_SYNC_FACTORY,
   CompileTimeErrorCode.NOT_ENOUGH_REQUIRED_ARGUMENTS,
+  CompileTimeErrorCode.NOT_ITERABLE_SPREAD,
+  CompileTimeErrorCode.NOT_MAP_SPREAD,
+  CompileTimeErrorCode.NOT_NULL_AWARE_NULL_SPREAD,
   CompileTimeErrorCode.NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS,
   CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT,
   CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT,
+  CompileTimeErrorCode.NULLABLE_TYPE_IN_CATCH_CLAUSE,
+  CompileTimeErrorCode.NULLABLE_TYPE_IN_EXTENDS_CLAUSE,
+  CompileTimeErrorCode.NULLABLE_TYPE_IN_IMPLEMENTS_CLAUSE,
+  CompileTimeErrorCode.NULLABLE_TYPE_IN_ON_CLAUSE,
+  CompileTimeErrorCode.NULLABLE_TYPE_IN_WITH_CLAUSE,
   CompileTimeErrorCode.OBJECT_CANNOT_EXTEND_ANOTHER_CLASS,
   CompileTimeErrorCode.ON_REPEATED,
   CompileTimeErrorCode.OPTIONAL_PARAMETER_IN_OPERATOR,
@@ -289,6 +301,9 @@
   HintCode.FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE,
   HintCode.FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE,
   HintCode.IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION,
+  HintCode.INFERENCE_FAILURE_ON_COLLECTION_LITERAL,
+  HintCode.INFERENCE_FAILURE_ON_INSTANCE_CREATION,
+  HintCode.INFERENCE_FAILURE_ON_UNINITIALIZED_VARIABLE,
   HintCode.INVALID_FACTORY_ANNOTATION,
   HintCode.INVALID_FACTORY_METHOD_DECL,
   HintCode.INVALID_FACTORY_METHOD_IMPL,
@@ -323,6 +338,14 @@
   HintCode.OVERRIDE_ON_NON_OVERRIDING_SETTER,
   HintCode.PACKAGE_IMPORT_CONTAINS_DOT_DOT,
   HintCode.SDK_VERSION_ASYNC_EXPORTED_FROM_CORE,
+  HintCode.SDK_VERSION_AS_EXPRESSION_IN_CONST_CONTEXT,
+  HintCode.SDK_VERSION_BOOL_OPERATOR,
+  HintCode.SDK_VERSION_EQ_EQ_OPERATOR_IN_CONST_CONTEXT,
+  HintCode.SDK_VERSION_GT_GT_GT_OPERATOR,
+  HintCode.SDK_VERSION_IS_EXPRESSION_IN_CONST_CONTEXT,
+  HintCode.SDK_VERSION_SET_LITERAL,
+  HintCode.SDK_VERSION_UI_AS_CODE,
+  HintCode.STRICT_RAW_TYPE,
   HintCode.SUBTYPE_OF_SEALED_CLASS,
   HintCode.TYPE_CHECK_IS_NOT_NULL,
   HintCode.TYPE_CHECK_IS_NULL,
@@ -330,6 +353,7 @@
   HintCode.UNDEFINED_SHOWN_NAME,
   HintCode.UNNECESSARY_CAST,
   HintCode.UNNECESSARY_NO_SUCH_METHOD,
+  HintCode.UNNECESSARY_NULL_AWARE_CALL,
   HintCode.UNNECESSARY_TYPE_CHECK_FALSE,
   HintCode.UNNECESSARY_TYPE_CHECK_TRUE,
   HintCode.UNUSED_CATCH_CLAUSE,
@@ -340,9 +364,13 @@
   HintCode.UNUSED_LABEL,
   HintCode.UNUSED_LOCAL_VARIABLE,
   HintCode.UNUSED_SHOWN_NAME,
-  HtmlErrorCode.PARSE_ERROR,
-  HtmlWarningCode.INVALID_URI,
-  HtmlWarningCode.URI_DOES_NOT_EXIST,
+  ManifestWarningCode.CAMERA_PERMISSIONS_INCOMPATIBLE,
+  ManifestWarningCode.NON_RESIZABLE_ACTIVITY,
+  ManifestWarningCode.NO_TOUCHSCREEN_FEATURE,
+  ManifestWarningCode.PERMISSION_IMPLIES_UNSUPPORTED_HARDWARE,
+  ManifestWarningCode.SETTING_ORIENTATION_ON_ACTIVITY,
+  ManifestWarningCode.UNSUPPORTED_CHROME_OS_FEATURE,
+  ManifestWarningCode.UNSUPPORTED_CHROME_OS_HARDWARE,
   ParserErrorCode.ABSTRACT_CLASS_MEMBER,
   ParserErrorCode.ABSTRACT_ENUM,
   ParserErrorCode.ABSTRACT_STATIC_METHOD,
@@ -386,12 +414,14 @@
   ParserErrorCode.EQUALITY_CANNOT_BE_EQUALITY_OPERAND,
   ParserErrorCode.EXPECTED_CASE_OR_DEFAULT,
   ParserErrorCode.EXPECTED_CLASS_MEMBER,
+  ParserErrorCode.EXPECTED_ELSE_OR_COMMA,
   ParserErrorCode.EXPECTED_EXECUTABLE,
   ParserErrorCode.EXPECTED_INSTEAD,
   ParserErrorCode.EXPECTED_LIST_OR_MAP_LITERAL,
   ParserErrorCode.EXPECTED_STRING_LITERAL,
   ParserErrorCode.EXPECTED_TOKEN,
   ParserErrorCode.EXPECTED_TYPE_NAME,
+  ParserErrorCode.EXPERIMENT_NOT_ENABLED,
   ParserErrorCode.EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE,
   ParserErrorCode.EXTERNAL_AFTER_CONST,
   ParserErrorCode.EXTERNAL_AFTER_FACTORY,
@@ -471,6 +501,7 @@
   ParserErrorCode.MISSING_TYPEDEF_PARAMETERS,
   ParserErrorCode.MISSING_VARIABLE_IN_FOR_EACH,
   ParserErrorCode.MIXED_PARAMETER_GROUPS,
+  ParserErrorCode.MODIFIER_OUT_OF_ORDER,
   ParserErrorCode.MULTIPLE_EXTENDS_CLAUSES,
   ParserErrorCode.MULTIPLE_ON_CLAUSES,
   ParserErrorCode.MULTIPLE_IMPLEMENTS_CLAUSES,
@@ -507,11 +538,14 @@
   ParserErrorCode.STATIC_OPERATOR,
   ParserErrorCode.STATIC_SETTER_WITHOUT_BODY,
   ParserErrorCode.STATIC_TOP_LEVEL_DECLARATION,
+  ParserErrorCode.INVALID_SUPER_IN_INITIALIZER,
   ParserErrorCode.SWITCH_HAS_CASE_AFTER_DEFAULT_CASE,
   ParserErrorCode.SWITCH_HAS_MULTIPLE_DEFAULT_CASES,
+  ParserErrorCode.INVALID_THIS_IN_INITIALIZER,
   ParserErrorCode.TOP_LEVEL_OPERATOR,
   ParserErrorCode.TYPEDEF_IN_CLASS,
   ParserErrorCode.TYPE_ARGUMENTS_ON_TYPE_VARIABLE,
+  ParserErrorCode.TYPE_BEFORE_FACTORY,
   ParserErrorCode.UNEXPECTED_TERMINATOR_FOR_PARAMETER_GROUP,
   ParserErrorCode.UNEXPECTED_TOKEN,
   ParserErrorCode.VAR_AND_TYPE,
@@ -525,7 +559,6 @@
   ParserErrorCode.WRONG_TERMINATOR_FOR_PARAMETER_GROUP,
   ResolverErrorCode.BREAK_LABEL_ON_SWITCH_MEMBER,
   ResolverErrorCode.CONTINUE_LABEL_ON_SWITCH,
-  ResolverErrorCode.MISSING_LIBRARY_DIRECTIVE_WITH_PART,
   ResolverErrorCode.PART_OF_UNNAMED_LIBRARY,
   ScannerErrorCode.EXPECTED_TOKEN,
   ScannerErrorCode.ILLEGAL_CHARACTER,
@@ -564,6 +597,7 @@
   StaticTypeWarningCode.UNDEFINED_GETTER,
   StaticTypeWarningCode.UNDEFINED_METHOD,
   StaticTypeWarningCode.UNDEFINED_OPERATOR,
+  StaticTypeWarningCode.UNDEFINED_PREFIXED_NAME,
   StaticTypeWarningCode.UNDEFINED_SETTER,
   StaticTypeWarningCode.UNDEFINED_SUPER_GETTER,
   StaticTypeWarningCode.UNDEFINED_SUPER_METHOD,
@@ -587,8 +621,6 @@
   StaticWarningCode.CAST_TO_NON_TYPE,
   StaticWarningCode.CONCRETE_CLASS_WITH_ABSTRACT_MEMBER,
   StaticWarningCode.CONST_WITH_ABSTRACT_CLASS,
-  StaticWarningCode.EQUAL_KEYS_IN_MAP,
-  StaticWarningCode.EQUAL_VALUES_IN_CONST_SET,
   StaticWarningCode.EXPORT_DUPLICATED_LIBRARY_NAMED,
   StaticWarningCode.EXTRA_POSITIONAL_ARGUMENTS,
   StaticWarningCode.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED,
@@ -600,15 +632,10 @@
   StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_1,
   StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_2,
   StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_3_PLUS,
-  StaticWarningCode.FUNCTION_WITHOUT_CALL,
   StaticWarningCode.IMPORT_DUPLICATED_LIBRARY_NAMED,
   StaticWarningCode.IMPORT_OF_NON_LIBRARY,
   StaticWarningCode.INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED,
   StaticWarningCode.INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL,
-  StaticWarningCode.INVALID_OVERRIDE_NAMED,
-  StaticWarningCode.INVALID_OVERRIDE_POSITIONAL,
-  StaticWarningCode.INVALID_OVERRIDE_REQUIRED,
-  StaticWarningCode.INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE,
   StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE,
   StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE,
   StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE,
@@ -679,10 +706,8 @@
   StrongModeCode.INVALID_CAST_NEW_EXPR,
   StrongModeCode.INVALID_CAST_METHOD,
   StrongModeCode.INVALID_CAST_FUNCTION,
-  StrongModeCode.INVALID_FIELD_OVERRIDE,
   StrongModeCode.INVALID_PARAMETER_DECLARATION,
   StrongModeCode.INVALID_SUPER_INVOCATION,
-  StrongModeCode.NO_DEFAULT_BOUNDS,
   StrongModeCode.NON_GROUND_TYPE_CHECK_INFO,
   StrongModeCode.NOT_INSTANTIATED_BOUND,
   StrongModeCode.TOP_LEVEL_CYCLE,
@@ -690,7 +715,6 @@
   StrongModeCode.TOP_LEVEL_IDENTIFIER_NO_TYPE,
   StrongModeCode.TOP_LEVEL_INSTANCE_GETTER,
   StrongModeCode.TOP_LEVEL_INSTANCE_METHOD,
-  StrongModeCode.TOP_LEVEL_UNSUPPORTED,
   TodoCode.TODO,
 ];
 
diff --git a/pkg/analyzer/lib/instrumentation/instrumentation.dart b/pkg/analyzer/lib/instrumentation/instrumentation.dart
index dc04bf5..e593f13 100644
--- a/pkg/analyzer/lib/instrumentation/instrumentation.dart
+++ b/pkg/analyzer/lib/instrumentation/instrumentation.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/plugin/embedded_resolver_provider.dart b/pkg/analyzer/lib/plugin/embedded_resolver_provider.dart
index 217ab7f..e16bc00 100644
--- a/pkg/analyzer/lib/plugin/embedded_resolver_provider.dart
+++ b/pkg/analyzer/lib/plugin/embedded_resolver_provider.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/plugin/resolver_provider.dart b/pkg/analyzer/lib/plugin/resolver_provider.dart
index 3c22554..40567da 100644
--- a/pkg/analyzer/lib/plugin/resolver_provider.dart
+++ b/pkg/analyzer/lib/plugin/resolver_provider.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/source/analysis_options_provider.dart b/pkg/analyzer/lib/source/analysis_options_provider.dart
index 939f634..a35bfbc 100644
--- a/pkg/analyzer/lib/source/analysis_options_provider.dart
+++ b/pkg/analyzer/lib/source/analysis_options_provider.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/source/custom_resolver.dart b/pkg/analyzer/lib/source/custom_resolver.dart
index 8dfe9f9..2569313 100644
--- a/pkg/analyzer/lib/source/custom_resolver.dart
+++ b/pkg/analyzer/lib/source/custom_resolver.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/source/embedder.dart b/pkg/analyzer/lib/source/embedder.dart
index dfd679f..a1af355 100644
--- a/pkg/analyzer/lib/source/embedder.dart
+++ b/pkg/analyzer/lib/source/embedder.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/source/error_processor.dart b/pkg/analyzer/lib/source/error_processor.dart
index 3391264..f2efaba 100644
--- a/pkg/analyzer/lib/source/error_processor.dart
+++ b/pkg/analyzer/lib/source/error_processor.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/source/line_info.dart b/pkg/analyzer/lib/source/line_info.dart
index 5d5be56..5413ae4 100644
--- a/pkg/analyzer/lib/source/line_info.dart
+++ b/pkg/analyzer/lib/source/line_info.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/source/package_map_provider.dart b/pkg/analyzer/lib/source/package_map_provider.dart
index f3c2119..2c33ab5 100644
--- a/pkg/analyzer/lib/source/package_map_provider.dart
+++ b/pkg/analyzer/lib/source/package_map_provider.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/source/package_map_resolver.dart b/pkg/analyzer/lib/source/package_map_resolver.dart
index 6a1d230..cf65834 100644
--- a/pkg/analyzer/lib/source/package_map_resolver.dart
+++ b/pkg/analyzer/lib/source/package_map_resolver.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/source/path_filter.dart b/pkg/analyzer/lib/source/path_filter.dart
index ba5454e..26ecec2 100644
--- a/pkg/analyzer/lib/source/path_filter.dart
+++ b/pkg/analyzer/lib/source/path_filter.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/source/sdk_ext.dart b/pkg/analyzer/lib/source/sdk_ext.dart
index 7f5557b..425553e 100644
--- a/pkg/analyzer/lib/source/sdk_ext.dart
+++ b/pkg/analyzer/lib/source/sdk_ext.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/source/source_range.dart b/pkg/analyzer/lib/source/source_range.dart
index 338ad7a..b2d3069 100644
--- a/pkg/analyzer/lib/source/source_range.dart
+++ b/pkg/analyzer/lib/source/source_range.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/analysis_options/analysis_options_provider.dart b/pkg/analyzer/lib/src/analysis_options/analysis_options_provider.dart
index 550f3e3..5d3e616 100644
--- a/pkg/analyzer/lib/src/analysis_options/analysis_options_provider.dart
+++ b/pkg/analyzer/lib/src/analysis_options/analysis_options_provider.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/context/cache.dart b/pkg/analyzer/lib/src/context/cache.dart
index a1834e2..65349a0 100644
--- a/pkg/analyzer/lib/src/context/cache.dart
+++ b/pkg/analyzer/lib/src/context/cache.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/context/context.dart b/pkg/analyzer/lib/src/context/context.dart
index eebc966..418bb41 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -1,61 +1,29 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:async';
-import 'dart:collection';
 
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/error/error.dart';
-import 'package:analyzer/exception/exception.dart';
 import 'package:analyzer/src/cancelable_future.dart';
 import 'package:analyzer/src/context/builder.dart' show EmbedderYamlLocator;
 import 'package:analyzer/src/context/cache.dart';
-import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/generated/constant.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/sdk.dart' show DartSdk;
 import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/utilities_collection.dart';
 import 'package:analyzer/src/plugin/resolver_provider.dart';
-import 'package:analyzer/src/plugin/task.dart';
-import 'package:analyzer/src/task/api/dart.dart';
-import 'package:analyzer/src/task/api/general.dart';
-import 'package:analyzer/src/task/api/html.dart';
 import 'package:analyzer/src/task/api/model.dart';
-import 'package:analyzer/src/task/dart.dart';
-import 'package:analyzer/src/task/dart_work_manager.dart';
 import 'package:analyzer/src/task/driver.dart';
-import 'package:analyzer/src/task/manager.dart';
-import 'package:html/dom.dart' show Document;
-
-/**
- * Type of callback functions used by PendingFuture. Functions of this type
- * should perform a computation based on the data in [entry] and return it. If
- * the computation can't be performed yet because more analysis is needed,
- * `null` should be returned.
- *
- * The function may also throw an exception, in which case the corresponding
- * future will be completed with failure.
- *
- * Because this function is called while the state of analysis is being updated,
- * it should be free of side effects so that it doesn't cause reentrant changes
- * to the analysis state.
- */
-typedef T PendingFutureComputer<T>(CacheEntry entry);
 
 /**
  * An [AnalysisContext] in which analysis can be performed.
  */
 class AnalysisContextImpl implements InternalAnalysisContext {
   /**
-   * The flag that is `true` if the context is being analyzed.
-   */
-  bool _isActive = false;
-
-  /**
    * A client-provided name used to identify this context, or `null` if the
    * client has not provided a name.
    */
@@ -68,22 +36,6 @@
   AnalysisOptionsImpl _options = new AnalysisOptionsImpl();
 
   /**
-   * The embedder yaml locator for this context.
-   */
-  @deprecated
-  EmbedderYamlLocator _embedderYamlLocator = new EmbedderYamlLocator(null);
-
-  /**
-   * A flag indicating whether this context is disposed.
-   */
-  bool _disposed = false;
-
-  /**
-   * A cache of content used to override the default content of a source.
-   */
-  ContentCache _contentCache = new ContentCache();
-
-  /**
    * The source factory used to create the sources that can be analyzed in this
    * context.
    */
@@ -94,18 +46,6 @@
    */
   DeclaredVariables _declaredVariables = new DeclaredVariables();
 
-  /**
-   * The partition that contains analysis results that are not shared with other
-   * contexts.
-   */
-  CachePartition _privatePartition;
-
-  /**
-   * The cache in which information about the results associated with targets
-   * are stored.
-   */
-  AnalysisCache _cache;
-
   @override
   final ReentrantSynchronousStream<InvalidatedResult> onResultInvalidated =
       new ReentrantSynchronousStream<InvalidatedResult>();
@@ -113,55 +53,17 @@
   ReentrantSynchronousStreamSubscription onResultInvalidatedSubscription = null;
 
   /**
-   * Configuration data associated with this context.
-   */
-  final HashMap<ResultDescriptor, Object> _configurationData =
-      new HashMap<ResultDescriptor, Object>();
-
-  /**
-   * The task manager used to manage the tasks used to analyze code.
-   */
-  TaskManager _taskManager;
-
-  /**
    * A list of all [WorkManager]s used by this context.
    */
   @override
   final List<WorkManager> workManagers = <WorkManager>[];
 
   /**
-   * The [DartWorkManager] instance that performs Dart specific scheduling.
-   */
-  DartWorkManager dartWorkManager;
-
-  /**
    * The analysis driver used to perform analysis.
    */
   AnalysisDriver driver;
 
   /**
-   * A list containing sources for which data should not be flushed.
-   */
-  List<Source> _priorityOrder = <Source>[];
-
-  CacheConsistencyValidatorImpl _cacheConsistencyValidator;
-
-  /**
-   * A map from all sources for which there are futures pending to a list of
-   * the corresponding PendingFuture objects.  These sources will be analyzed
-   * in the same way as priority sources, except with higher priority.
-   */
-  Map<AnalysisTarget, List<PendingFuture>> _pendingFutureTargets =
-      new HashMap<AnalysisTarget, List<PendingFuture>>();
-
-  /**
-   * A table mapping sources to the change notices that are waiting to be
-   * returned related to that source.
-   */
-  Map<Source, ChangeNoticeImpl> _pendingNotices =
-      new HashMap<Source, ChangeNoticeImpl>();
-
-  /**
    * The [TypeProvider] for this context, `null` if not yet created.
    */
   TypeProvider _typeProvider;
@@ -172,23 +74,6 @@
   TypeSystem _typeSystem;
 
   /**
-   * The controller for sending [SourcesChangedEvent]s.
-   */
-  StreamController<SourcesChangedEvent> _onSourcesChangedController;
-
-  /**
-   * A subscription for a stream of events indicating when files are (and are
-   * not) being implicitly analyzed.
-   */
-  StreamController<ImplicitAnalysisEvent> _implicitAnalysisEventsController;
-
-  /**
-   * The listeners that are to be notified when various analysis results are
-   * produced in this context.
-   */
-  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`,
@@ -197,16 +82,6 @@
    */
   bool useSdkCachePartition = true;
 
-  @override
-  ResultProvider resultProvider;
-
-  /**
-   * The map of [ResultChangedEvent] controllers.
-   */
-  final Map<ResultDescriptor, StreamController<ResultChangedEvent>>
-      _resultChangedControllers =
-      <ResultDescriptor, StreamController<ResultChangedEvent>>{};
-
   /**
    * The most recently incrementally resolved source, or `null` when it was
    * already validated, or the most recent change was not incrementally resolved.
@@ -232,30 +107,12 @@
   /**
    * Initialize a newly created analysis context.
    */
-  AnalysisContextImpl() {
-    AnalysisEngine.instance.processRequiredPlugins();
-    _privatePartition = new UniversalCachePartition(this);
-    _cache = createCacheFromSourceFactory(null);
-    _taskManager = AnalysisEngine.instance.taskManager;
-    for (WorkManagerFactory factory
-        in AnalysisEngine.instance.enginePlugin.workManagerFactories) {
-      WorkManager workManager = factory(this);
-      if (workManager != null) {
-        workManagers.add(workManager);
-        if (workManager is DartWorkManager) {
-          dartWorkManager = workManager;
-        }
-      }
-    }
-    driver = new AnalysisDriver(_taskManager, workManagers, this);
-    _onSourcesChangedController =
-        new StreamController<SourcesChangedEvent>.broadcast();
-    _implicitAnalysisEventsController =
-        new StreamController<ImplicitAnalysisEvent>.broadcast();
-  }
+  AnalysisContextImpl();
 
   @override
-  AnalysisCache get analysisCache => _cache;
+  AnalysisCache get analysisCache {
+    throw UnimplementedError();
+  }
 
   @override
   AnalysisOptions get analysisOptions => _options;
@@ -263,37 +120,20 @@
   @override
   void set analysisOptions(AnalysisOptions options) {
     this._options = options;
-    for (WorkManager workManager in workManagers) {
-      workManager.onAnalysisOptionsChanged();
-    }
   }
 
   @override
   void set analysisPriorityOrder(List<Source> sources) {
-    if (sources == null || sources.isEmpty) {
-      _priorityOrder = const <Source>[];
-    } else {
-      while (sources.remove(null)) {
-        // Nothing else to do.
-      }
-      if (sources.isEmpty) {
-        _priorityOrder = const <Source>[];
-      } else {
-        _priorityOrder = sources;
-      }
-    }
-    for (WorkManager workManager in workManagers) {
-      workManager.applyPriorityTargets(_priorityOrder);
-    }
-    driver.reset();
+    throw UnimplementedError();
   }
 
-  CacheConsistencyValidator get cacheConsistencyValidator =>
-      _cacheConsistencyValidator ??= new CacheConsistencyValidatorImpl(this);
+  CacheConsistencyValidator get cacheConsistencyValidator {
+    throw UnimplementedError();
+  }
 
   @override
   set contentCache(ContentCache value) {
-    _contentCache = value;
+    throw UnimplementedError();
   }
 
   @override
@@ -308,117 +148,86 @@
 
   @deprecated
   @override
-  EmbedderYamlLocator get embedderYamlLocator => _embedderYamlLocator;
+  EmbedderYamlLocator get embedderYamlLocator {
+    throw UnimplementedError();
+  }
 
   @override
   List<AnalysisTarget> get explicitTargets {
-    List<AnalysisTarget> targets = <AnalysisTarget>[];
-    MapIterator<AnalysisTarget, CacheEntry> iterator = _cache.iterator();
-    while (iterator.moveNext()) {
-      if (iterator.value.explicitlyAdded) {
-        targets.add(iterator.key);
-      }
-    }
-    return targets;
+    throw UnimplementedError();
   }
 
   @override
-  List<Source> get htmlSources => _getSources(SourceKind.HTML);
+  List<Source> get htmlSources {
+    throw UnimplementedError();
+  }
 
   @override
-  Stream<ImplicitAnalysisEvent> get implicitAnalysisEvents =>
-      _implicitAnalysisEventsController.stream;
+  Stream<ImplicitAnalysisEvent> get implicitAnalysisEvents {
+    throw UnimplementedError();
+  }
 
   @override
-  bool get isActive => _isActive;
+  bool get isActive {
+    throw UnimplementedError();
+  }
 
   @override
   set isActive(bool active) {
-    if (active != _isActive) {
-      _isActive = active;
-      _privatePartition.isActive = active;
-    }
+    throw UnimplementedError();
   }
 
   @override
-  bool get isDisposed => _disposed;
+  bool get isDisposed {
+    throw UnimplementedError();
+  }
 
   @override
   List<Source> get launchableClientLibrarySources {
-    List<Source> sources = <Source>[];
-    for (Source source in _cache.sources) {
-      CacheEntry entry = _cache.get(source);
-      if (entry.getValue(SOURCE_KIND) == SourceKind.LIBRARY &&
-          !source.isInSystemLibrary &&
-          isClientLibrary(source)) {
-        sources.add(source);
-      }
-    }
-    return sources;
+    throw UnimplementedError();
   }
 
   @override
   List<Source> get launchableServerLibrarySources {
-    List<Source> sources = <Source>[];
-    for (Source source in _cache.sources) {
-      CacheEntry entry = _cache.get(source);
-      if (entry.getValue(SOURCE_KIND) == SourceKind.LIBRARY &&
-          !source.isInSystemLibrary &&
-          isServerLibrary(source)) {
-        sources.add(source);
-      }
-    }
-    return sources;
+    throw UnimplementedError();
   }
 
   @override
-  List<Source> get librarySources => _getSources(SourceKind.LIBRARY);
+  List<Source> get librarySources {
+    throw UnimplementedError();
+  }
 
   @override
-  Stream<SourcesChangedEvent> get onSourcesChanged =>
-      _onSourcesChangedController.stream;
-
-  /**
-   * Make _pendingFutureSources available to unit tests.
-   */
-  Map<AnalysisTarget, List<PendingFuture>>
-      get pendingFutureSources_forTesting => _pendingFutureTargets;
+  Stream<SourcesChangedEvent> get onSourcesChanged {
+    throw UnimplementedError();
+  }
 
   @override
-  List<Source> get prioritySources => _priorityOrder;
+  List<Source> get prioritySources {
+    throw UnimplementedError();
+  }
 
   @override
-  List<AnalysisTarget> get priorityTargets => prioritySources;
+  List<AnalysisTarget> get priorityTargets {
+    throw UnimplementedError();
+  }
 
   @override
-  CachePartition get privateAnalysisCachePartition => _privatePartition;
+  CachePartition get privateAnalysisCachePartition {
+    throw UnimplementedError();
+  }
 
   @override
   SourceFactory get sourceFactory => _sourceFactory;
 
   @override
   void set sourceFactory(SourceFactory factory) {
-    if (identical(_sourceFactory, factory)) {
-      return;
-    } else if (factory.context != null) {
-      throw new StateError(
-          "Source factories cannot be shared between contexts");
-    }
-    if (_sourceFactory != null) {
-      _sourceFactory.context = null;
-    }
-    factory.context = this;
     _sourceFactory = factory;
-    _cache?.dispose();
-    _cache = createCacheFromSourceFactory(factory);
-    for (WorkManager workManager in workManagers) {
-      workManager.onSourceFactoryChanged();
-    }
   }
 
   @override
   List<Source> get sources {
-    return _cache.sources.toList();
+    throw UnimplementedError();
   }
 
   /**
@@ -428,57 +237,15 @@
    * testing purposes only.
    */
   List<Source> get sourcesNeedingProcessing {
-    HashSet<Source> sources = new HashSet<Source>();
-    bool hintsEnabled = _options.hint;
-    bool lintsEnabled = _options.lint;
-
-    MapIterator<AnalysisTarget, CacheEntry> iterator =
-        _privatePartition.iterator();
-    while (iterator.moveNext()) {
-      AnalysisTarget target = iterator.key;
-      if (target is Source) {
-        _getSourcesNeedingProcessing(
-            target, iterator.value, false, hintsEnabled, lintsEnabled, sources);
-      }
-    }
-    return new List<Source>.from(sources);
+    throw UnimplementedError();
   }
 
-  List<Source> get test_priorityOrder => _priorityOrder;
+  List<Source> get test_priorityOrder {
+    throw UnimplementedError();
+  }
 
   @override
   TypeProvider get typeProvider {
-    // The `AnalysisContextTarget.request` results go into the SDK partition,
-    // and the TYPE_PROVIDER result is computed and put into the SDK partition
-    // only by the first non-SDK analysis context. So, in order to reuse it
-    // in other analysis contexts, we need to ask for it from the cache.
-    _typeProvider ??= getResult(AnalysisContextTarget.request, TYPE_PROVIDER);
-    if (_typeProvider != null) {
-      return _typeProvider;
-    }
-
-    // Make sure a task didn't accidentally try to call back into the context
-    // to retrieve the type provider.
-    assert(!driver.isTaskRunning);
-
-    Source coreSource = sourceFactory.forUri(DartSdk.DART_CORE);
-    if (coreSource == null) {
-      throw new AnalysisException("Could not create a source for dart:core");
-    }
-    LibraryElement coreElement = computeLibraryElement(coreSource);
-    if (coreElement == null) {
-      throw new AnalysisException("Could not create an element for dart:core");
-    }
-
-    Source asyncSource = sourceFactory.forUri(DartSdk.DART_ASYNC);
-    if (asyncSource == null) {
-      throw new AnalysisException("Could not create a source for dart:async");
-    }
-    LibraryElement asyncElement = computeLibraryElement(asyncSource);
-    if (asyncElement == null) {
-      throw new AnalysisException("Could not create an element for dart:async");
-    }
-    _typeProvider = new TypeProviderImpl(coreElement, asyncElement);
     return _typeProvider;
   }
 
@@ -492,440 +259,175 @@
 
   @override
   TypeSystem get typeSystem {
-    if (_typeSystem == null) {
-      _typeSystem = TypeSystem.create(this);
-    }
-    return _typeSystem;
+    return _typeSystem ??= Dart2TypeSystem(typeProvider);
   }
 
   @override
   bool aboutToComputeResult(CacheEntry entry, ResultDescriptor result) {
-    return PerformanceStatistics.summary.makeCurrentWhile(() {
-      // Use this helper if it is set.
-      if (resultProvider != null && resultProvider.compute(entry, result)) {
-        return true;
-      }
-      // Ask the SDK.
-      DartSdk dartSdk = sourceFactory.dartSdk;
-      if (dartSdk != null) {
-        AnalysisContext sdkContext = dartSdk.context;
-        if (!identical(sdkContext, this) &&
-            sdkContext is InternalAnalysisContext) {
-          return sdkContext.aboutToComputeResult(entry, result);
-        }
-      }
-      // Cannot provide the result.
-      return false;
-    });
+    throw UnimplementedError();
   }
 
   @override
   void addListener(AnalysisListener listener) {
-    if (!_listeners.contains(listener)) {
-      _listeners.add(listener);
-    }
+    throw UnimplementedError();
   }
 
   @override
   void applyAnalysisDelta(AnalysisDelta delta) {
-    ChangeSet changeSet = new ChangeSet();
-    delta.analysisLevels.forEach((Source source, AnalysisLevel level) {
-      if (level == AnalysisLevel.NONE) {
-        changeSet.removedSource(source);
-      } else {
-        changeSet.addedSource(source);
-      }
-    });
-    applyChanges(changeSet);
+    throw UnimplementedError();
   }
 
   @override
   void applyChanges(ChangeSet changeSet) {
-    if (changeSet.isEmpty) {
-      return;
-    }
-    //
-    // First, compute the list of sources that have been removed.
-    //
-    List<Source> removedSources = changeSet.removedSources.toList();
-    for (SourceContainer container in changeSet.removedContainers) {
-      _addSourcesInContainer(removedSources, container);
-    }
-    //
-    // Then determine which cached results are no longer valid.
-    //
-    for (Source source in changeSet.addedSources) {
-      _sourceAvailable(source);
-    }
-    // Exclude sources that are overridden in the content cache, so the change
-    // will have no effect. Just ignore it to avoid wasting time doing
-    // re-analysis.
-    List<Source> changedSources = changeSet.changedSources
-        .where((s) => _contentCache.getContents(s) == null)
-        .toList();
-    for (Source source in changedSources) {
-      _sourceChanged(source);
-    }
-    changeSet.changedContents.forEach((Source key, String value) {
-      _contentsChanged(key, value, false);
-    });
-    changeSet.changedRanges
-        .forEach((Source source, ChangeSet_ContentChange change) {
-      _contentRangeChanged(source, change.contents, change.offset,
-          change.oldLength, change.newLength);
-    });
-    for (Source source in removedSources) {
-      _sourceRemoved(source);
-    }
-    for (WorkManager workManager in workManagers) {
-      workManager.applyChange(
-          changeSet.addedSources, changedSources, removedSources);
-    }
-    _onSourcesChangedController.add(new SourcesChangedEvent(changeSet));
+    throw UnimplementedError();
   }
 
   @override
-  String computeDocumentationComment(Element element) =>
-      element?.documentationComment;
+  String computeDocumentationComment(Element element) {
+    throw UnimplementedError();
+  }
 
   @override
   List<AnalysisError> computeErrors(Source source) {
-    String name = source.shortName;
-    if (AnalysisEngine.isHtmlFileName(name)) {
-      return computeResult(source, HTML_ERRORS);
-    }
-    return computeResult(source, DART_ERRORS);
+    throw UnimplementedError();
   }
 
   @override
-  List<Source> computeExportedLibraries(Source source) =>
-      computeResult(source, EXPORTED_LIBRARIES);
+  List<Source> computeExportedLibraries(Source source) {
+    throw UnimplementedError();
+  }
 
   @override
-  List<Source> computeImportedLibraries(Source source) =>
-      computeResult(source, EXPLICITLY_IMPORTED_LIBRARIES);
+  List<Source> computeImportedLibraries(Source source) {
+    throw UnimplementedError();
+  }
 
   @override
   SourceKind computeKindOf(Source source) {
-    String name = source.shortName;
-    if (AnalysisEngine.isDartFileName(name)) {
-      return computeResult(source, SOURCE_KIND);
-    } else if (AnalysisEngine.isHtmlFileName(name)) {
-      return SourceKind.HTML;
-    }
-    return SourceKind.UNKNOWN;
+    throw UnimplementedError();
   }
 
   @override
   LibraryElement computeLibraryElement(Source source) {
-    //_computeResult(source, HtmlEntry.ELEMENT);
-    return computeResult(source, LIBRARY_ELEMENT);
+    throw UnimplementedError();
   }
 
   @override
-  LineInfo computeLineInfo(Source source) => computeResult(source, LINE_INFO);
+  LineInfo computeLineInfo(Source source) {
+    throw UnimplementedError();
+  }
 
   @override
   CancelableFuture<CompilationUnit> computeResolvedCompilationUnitAsync(
       Source unitSource, Source librarySource) {
-    if (!AnalysisEngine.isDartFileName(unitSource.shortName) ||
-        !AnalysisEngine.isDartFileName(librarySource.shortName)) {
-      return new CancelableFuture.error(new AnalysisNotScheduledError());
-    }
-    return new AnalysisFutureHelper<CompilationUnit>(this,
-            new LibrarySpecificUnit(librarySource, unitSource), RESOLVED_UNIT)
-        .computeAsync();
+    throw UnimplementedError();
   }
 
   @override
   V computeResult<V>(AnalysisTarget target, ResultDescriptor<V> descriptor) {
-    // Make sure we are not trying to invoke the task model in a reentrant
-    // fashion.
-    assert(!driver.isTaskRunning);
-    CacheEntry entry = getCacheEntry(target);
-    CacheState state = entry.getState(descriptor);
-    if (state == CacheState.FLUSHED || state == CacheState.INVALID) {
-      // Check the result provider.
-      bool success = aboutToComputeResult(entry, descriptor);
-      if (success) {
-        return entry.getValue(descriptor);
-      }
-      // Compute the result.
-      driver.computeResult(target, descriptor);
-      entry = getCacheEntry(target);
-    }
-    state = entry.getState(descriptor);
-    if (state == CacheState.ERROR) {
-      throw new AnalysisException(
-          'Cannot compute $descriptor for $target', entry.exception);
-    }
-    return entry.getValue(descriptor);
+    throw UnimplementedError();
   }
 
   /**
    * Create an analysis cache based on the given source [factory].
    */
   AnalysisCache createCacheFromSourceFactory(SourceFactory factory) {
-    AnalysisCache createCache() {
-      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]);
-      }
-      return new AnalysisCache(<CachePartition>[
-        AnalysisEngine.instance.partitionManager.forSdk(sdk),
-        _privatePartition
-      ]);
-    }
-
-    AnalysisCache cache = createCache();
-    onResultInvalidatedSubscription?.cancel();
-    onResultInvalidatedSubscription =
-        cache.onResultInvalidated.listen((InvalidatedResult event) {
-      onResultInvalidated.add(event);
-      StreamController<ResultChangedEvent> controller =
-          _resultChangedControllers[event.descriptor];
-      if (controller != null) {
-        controller.add(new ResultChangedEvent(
-            this, event.entry.target, event.descriptor, event.value, false));
-      }
-    });
-    return cache;
+    throw UnimplementedError();
   }
 
   @override
-  void dispose() {
-    _disposed = true;
-    for (List<PendingFuture> pendingFutures in _pendingFutureTargets.values) {
-      for (PendingFuture pendingFuture in pendingFutures) {
-        pendingFuture.forciblyComplete();
-      }
-    }
-    _pendingFutureTargets.clear();
-    _privatePartition.dispose();
-    _cache.dispose();
-  }
+  void dispose() {}
 
   @override
   List<CompilationUnit> ensureResolvedDartUnits(Source unitSource) {
-    // Check every library.
-    List<CompilationUnit> units = <CompilationUnit>[];
-    List<Source> containingLibraries = getLibrariesContaining(unitSource);
-    for (Source librarySource in containingLibraries) {
-      LibrarySpecificUnit target =
-          new LibrarySpecificUnit(librarySource, unitSource);
-      CompilationUnit unit = getResult(target, RESOLVED_UNIT);
-      if (unit == null) {
-        units = null;
-        break;
-      }
-      units.add(unit);
-    }
-    // If we have results, then we're done.
-    if (units != null) {
-      return units;
-    }
-    // Schedule computing of RESOLVED_UNIT results.
-    for (Source librarySource in containingLibraries) {
-      LibrarySpecificUnit target =
-          new LibrarySpecificUnit(librarySource, unitSource);
-      dartWorkManager.addPriorityResult(target, RESOLVED_UNIT);
-    }
-    return null;
+    throw UnimplementedError();
   }
 
   @override
   bool exists(Source source) {
-    if (source == null) {
-      return false;
-    }
-    bool overriddenExists = _contentCache.getExists(source);
-    if (overriddenExists != null) {
-      return overriddenExists;
-    }
-    return source.exists();
+    throw UnimplementedError();
   }
 
   @override
   CacheEntry getCacheEntry(AnalysisTarget target) {
-    CacheEntry entry = _cache.get(target);
-    if (entry == null) {
-      entry = new CacheEntry(target);
-      ImplicitAnalysisEvent event = null;
-      if (target is Source) {
-        entry.modificationTime = getModificationStamp(target);
-        event = new ImplicitAnalysisEvent(target, true);
-      }
-      _cache.put(entry);
-      if (event != null) {
-        _implicitAnalysisEventsController.add(event);
-      }
-    }
-    return entry;
+    throw UnimplementedError();
   }
 
   @override
   CompilationUnitElement getCompilationUnitElement(
       Source unitSource, Source librarySource) {
-    AnalysisTarget target = new LibrarySpecificUnit(librarySource, unitSource);
-    return getResult(target, COMPILATION_UNIT_ELEMENT);
+    throw UnimplementedError();
   }
 
   @deprecated
   @override
-  V getConfigurationData<V>(ResultDescriptor<V> key) =>
-      (_configurationData[key] ?? key?.defaultValue) as V;
-
-  @override
-  TimestampedData<String> getContents(Source source) {
-    String contents = _contentCache.getContents(source);
-    if (contents != null) {
-      return new TimestampedData<String>(
-          _contentCache.getModificationStamp(source), contents);
-    }
-    return source.contents;
+  V getConfigurationData<V>(ResultDescriptor<V> key) {
+    throw UnimplementedError();
   }
 
   @override
-  InternalAnalysisContext getContextFor(Source source) =>
-      _cache.getContextFor(source) ?? this;
+  TimestampedData<String> getContents(Source source) {
+    throw UnimplementedError();
+  }
+
+  @override
+  InternalAnalysisContext getContextFor(Source source) {
+    throw UnimplementedError();
+  }
 
   @override
   Element getElement(ElementLocation location) {
-    // TODO(brianwilkerson) This should not be a "get" method.
-    try {
-      List<String> components = location.components;
-      Source source = _computeSourceFromEncoding(components[0]);
-      String sourceName = source.shortName;
-      if (AnalysisEngine.isDartFileName(sourceName)) {
-        ElementImpl element = computeLibraryElement(source) as ElementImpl;
-        for (int i = 1; i < components.length; i++) {
-          if (element == null) {
-            return null;
-          }
-          element = element.getChild(components[i]);
-        }
-        return element;
-      }
-    } catch (exception) {
-      // If the location cannot be decoded for some reason then the underlying
-      // cause should have been logged already and we can fall though to return
-      // null.
-    }
-    return null;
+    throw UnimplementedError();
   }
 
   @override
   AnalysisErrorInfo getErrors(Source source) {
-    List<AnalysisError> allErrors = <AnalysisError>[];
-    for (WorkManager workManager in workManagers) {
-      List<AnalysisError> errors = workManager.getErrors(source);
-      allErrors.addAll(errors);
-    }
-    LineInfo lineInfo = getLineInfo(source);
-    return new AnalysisErrorInfoImpl(allErrors, lineInfo);
+    throw UnimplementedError();
   }
 
   @override
   List<Source> getHtmlFilesReferencing(Source source) {
-    if (!AnalysisEngine.isDartFileName(source.shortName)) {
-      return const <Source>[];
-    }
-    List<Source> htmlSources = <Source>[];
-    List<Source> librarySources = getLibrariesContaining(source);
-    for (Source source in _cache.sources) {
-      if (AnalysisEngine.isHtmlFileName(source.shortName)) {
-        List<Source> referencedLibraries =
-            getResult(source, REFERENCED_LIBRARIES);
-        if (_containsAny(referencedLibraries, librarySources)) {
-          htmlSources.add(source);
-        }
-      }
-    }
-    if (htmlSources.isEmpty) {
-      return const <Source>[];
-    }
-    return htmlSources;
+    throw UnimplementedError();
   }
 
   @override
   SourceKind getKindOf(Source source) {
-    String name = source.shortName;
-    if (AnalysisEngine.isDartFileName(name)) {
-      return getResult(source, SOURCE_KIND);
-    } else if (AnalysisEngine.isHtmlFileName(name)) {
-      return SourceKind.HTML;
-    }
-    return SourceKind.UNKNOWN;
+    throw UnimplementedError();
   }
 
   @override
   List<Source> getLibrariesContaining(Source source) {
-    SourceKind kind = getKindOf(source);
-    if (kind == SourceKind.LIBRARY) {
-      return <Source>[source];
-    }
-    return dartWorkManager.getLibrariesContainingPart(source);
+    throw UnimplementedError();
   }
 
   @override
   List<Source> getLibrariesDependingOn(Source librarySource) {
-    List<Source> dependentLibraries = <Source>[];
-    for (Source source in _cache.sources) {
-      CacheEntry entry = _cache.get(source);
-      if (entry.getValue(SOURCE_KIND) == SourceKind.LIBRARY) {
-        if (_contains(entry.getValue(EXPORTED_LIBRARIES), librarySource)) {
-          dependentLibraries.add(source);
-        }
-        if (_contains(entry.getValue(IMPORTED_LIBRARIES), librarySource)) {
-          dependentLibraries.add(source);
-        }
-      }
-    }
-    if (dependentLibraries.isEmpty) {
-      return const <Source>[];
-    }
-    return dependentLibraries;
+    throw UnimplementedError();
   }
 
   @override
   List<Source> getLibrariesReferencedFromHtml(Source htmlSource) {
-    CacheEntry entry = _cache.get(htmlSource);
-    if (entry != null) {
-      return entry.getValue(REFERENCED_LIBRARIES);
-    }
-    return const <Source>[];
+    throw UnimplementedError();
   }
 
   @override
-  LibraryElement getLibraryElement(Source source) =>
-      getResult(source, LIBRARY_ELEMENT);
+  LibraryElement getLibraryElement(Source source) {
+    throw UnimplementedError();
+  }
 
   @override
-  LineInfo getLineInfo(Source source) => getResult(source, LINE_INFO);
+  LineInfo getLineInfo(Source source) {
+    throw UnimplementedError();
+  }
 
   @override
   int getModificationStamp(Source source) {
-    int stamp = _contentCache.getModificationStamp(source);
-    if (stamp != null) {
-      return stamp;
-    }
-    return source.modificationStamp;
+    throw UnimplementedError();
   }
 
   @override
   ChangeNoticeImpl getNotice(Source source) {
-    ChangeNoticeImpl notice = _pendingNotices[source];
-    if (notice == null) {
-      notice = new ChangeNoticeImpl(source);
-      _pendingNotices[source] = notice;
-    }
-    return notice;
+    throw UnimplementedError();
   }
 
   @override
@@ -944,87 +446,29 @@
   @override
   CompilationUnit getResolvedCompilationUnit(
       Source unitSource, LibraryElement library) {
-    if (library == null ||
-        !AnalysisEngine.isDartFileName(unitSource.shortName)) {
-      return null;
-    }
-    return getResolvedCompilationUnit2(unitSource, library.source);
+    throw UnimplementedError();
   }
 
   @override
   CompilationUnit getResolvedCompilationUnit2(
       Source unitSource, Source librarySource) {
-    if (!AnalysisEngine.isDartFileName(unitSource.shortName) ||
-        !AnalysisEngine.isDartFileName(librarySource.shortName)) {
-      return null;
-    }
-    return getResult(
-        new LibrarySpecificUnit(librarySource, unitSource), RESOLVED_UNIT);
+    throw UnimplementedError();
   }
 
   @override
   V getResult<V>(AnalysisTarget target, ResultDescriptor<V> result) {
-    return _cache.getValue(target, result);
+    throw UnimplementedError();
   }
 
   @override
   List<Source> getSourcesWithFullName(String path) {
-    return analysisCache.getSourcesWithFullName(path);
+    throw UnimplementedError();
   }
 
   @override
   bool handleContentsChanged(
       Source source, String originalContents, String newContents, bool notify) {
-    CacheEntry entry = _cache.get(source);
-    if (entry == null) {
-      return false;
-    }
-    // If there were no "originalContents" in the content cache,
-    // use the contents of the file instead.
-    if (originalContents == null) {
-      try {
-        TimestampedData<String> fileContents = source.contents;
-        if (fileContents.modificationTime == entry.modificationTime) {
-          originalContents = fileContents.data;
-        }
-      } catch (e) {}
-    }
-    bool changed = newContents != originalContents;
-    if (newContents != null) {
-      if (changed) {
-        entry.modificationTime = _contentCache.getModificationStamp(source);
-        // Don't compare with old contents because the cache has already been
-        // updated, and we know at this point that it changed.
-        _sourceChanged(source, compareWithOld: false);
-        entry.setValue(CONTENT, newContents, const <TargetedResult>[]);
-      } else {
-        entry.modificationTime = _contentCache.getModificationStamp(source);
-      }
-    } else if (originalContents != null) {
-      // We are removing the overlay for the file, check if the file's
-      // contents is the same as it was in the overlay.
-      try {
-        TimestampedData<String> fileContents = getContents(source);
-        newContents = fileContents.data;
-        entry.modificationTime = fileContents.modificationTime;
-        if (newContents == originalContents) {
-          entry.setValue(CONTENT, newContents, const <TargetedResult>[]);
-          changed = false;
-        }
-      } catch (e) {}
-      // If not the same content (e.g. the file is being closed without save),
-      // then force analysis.
-      if (changed) {
-        if (newContents == null) {
-          _sourceChanged(source);
-        }
-      }
-    }
-    if (notify && changed) {
-      _onSourcesChangedController
-          .add(new SourcesChangedEvent.changedContent(source, newContents));
-    }
-    return changed;
+    throw UnimplementedError();
   }
 
   /**
@@ -1032,824 +476,97 @@
    * to do.
    */
   void invalidateCachedResults() {
-    _cache?.dispose();
-    _cache = createCacheFromSourceFactory(_sourceFactory);
-    for (WorkManager workManager in workManagers) {
-      workManager.onAnalysisOptionsChanged();
-    }
+    throw UnimplementedError();
   }
 
   @override
   void invalidateLibraryHints(Source librarySource) {
-    List<Source> sources = getResult(librarySource, UNITS);
-    if (sources != null) {
-      for (Source source in sources) {
-        getCacheEntry(source).setState(HINTS, CacheState.INVALID);
-      }
-    }
+    throw UnimplementedError();
   }
 
   @override
   bool isClientLibrary(Source librarySource) {
-    CacheEntry entry = _cache.get(librarySource);
-    return entry != null &&
-        _referencesDartHtml(librarySource) &&
-        entry.getValue(IS_LAUNCHABLE);
+    throw UnimplementedError();
   }
 
   @override
   bool isServerLibrary(Source librarySource) {
-    CacheEntry entry = _cache.get(librarySource);
-    return entry != null &&
-        !_referencesDartHtml(librarySource) &&
-        entry.getValue(IS_LAUNCHABLE);
+    throw UnimplementedError();
   }
 
   @override
   Stream<ResultChangedEvent> onResultChanged(ResultDescriptor descriptor) {
-    driver.onResultComputed(descriptor).listen((ResultChangedEvent event) {
-      _resultChangedControllers[descriptor]?.add(event);
-    });
-    return _resultChangedControllers.putIfAbsent(descriptor, () {
-      return new StreamController<ResultChangedEvent>.broadcast(sync: true);
-    }).stream;
+    throw UnimplementedError();
   }
 
   @override
   @deprecated
   Stream<ComputedResult> onResultComputed(ResultDescriptor descriptor) {
-    return onResultChanged(descriptor)
-        .where((event) => event.wasComputed)
-        .map((event) {
-      return new ComputedResult(
-          event.context, event.descriptor, event.target, event.value);
-    });
+    throw UnimplementedError();
   }
 
   @override
   CompilationUnit parseCompilationUnit(Source source) {
-    if (!AnalysisEngine.isDartFileName(source.shortName)) {
-      return null;
-    }
-    try {
-      getContents(source);
-    } catch (exception, stackTrace) {
-      throw new AnalysisException('Could not get contents of $source',
-          new CaughtException(exception, stackTrace));
-    }
-    return computeResult(source, PARSED_UNIT);
-  }
-
-  @override
-  Document parseHtmlDocument(Source source) {
-    if (!AnalysisEngine.isHtmlFileName(source.shortName)) {
-      return null;
-    }
-    return computeResult(source, HTML_DOCUMENT);
+    throw UnimplementedError();
   }
 
   @override
   AnalysisResult performAnalysisTask() {
-    return PerformanceStatistics.analysis.makeCurrentWhile(() {
-      _evaluatePendingFutures();
-      bool done = !driver.performAnalysisTask();
-      List<ChangeNotice> notices = _getChangeNotices(done);
-      if (notices != null) {
-        int noticeCount = notices.length;
-        for (int i = 0; i < noticeCount; i++) {
-          ChangeNotice notice = notices[i];
-          _notifyErrors(notice.source, notice.errors, notice.lineInfo);
-        }
-      }
-      return new AnalysisResult(notices, -1, '', -1);
-    });
+    throw UnimplementedError();
   }
 
   @override
   void recordLibraryElements(Map<Source, LibraryElement> elementMap) {
-    elementMap.forEach((Source librarySource, LibraryElement library) {
-      //
-      // Cache the element in the library's info.
-      //
-      CacheEntry entry = getCacheEntry(librarySource);
-      setValue(ResultDescriptor result, value) {
-        entry.setValue(result, value, const <TargetedResult>[]);
-      }
-
-      setValue(BUILD_DIRECTIVES_ERRORS, AnalysisError.NO_ERRORS);
-      setValue(BUILD_LIBRARY_ERRORS, AnalysisError.NO_ERRORS);
-      // CLASS_ELEMENTS
-      setValue(COMPILATION_UNIT_ELEMENT, library.definingCompilationUnit);
-      // CONSTRUCTORS
-      // CONSTRUCTORS_ERRORS
-      entry.setState(CONTENT, CacheState.FLUSHED);
-      setValue(EXPORTED_LIBRARIES, const <Source>[]);
-      // EXPORT_SOURCE_CLOSURE
-      setValue(IMPORTED_LIBRARIES, const <Source>[]);
-      // IMPORT_SOURCE_CLOSURE
-      setValue(INCLUDED_PARTS, const <Source>[]);
-      setValue(IS_LAUNCHABLE, false);
-      setValue(LIBRARY_ELEMENT, library);
-      setValue(LIBRARY_ELEMENT1, library);
-      setValue(LIBRARY_ELEMENT2, library);
-      setValue(LIBRARY_ELEMENT3, library);
-      setValue(LIBRARY_ELEMENT4, library);
-      setValue(LIBRARY_ELEMENT5, library);
-      setValue(LIBRARY_ELEMENT6, library);
-      setValue(LIBRARY_ELEMENT7, library);
-      setValue(LIBRARY_ELEMENT8, library);
-      setValue(LIBRARY_ELEMENT9, library);
-      setValue(LINE_INFO, new LineInfo(<int>[0]));
-      setValue(PARSE_ERRORS, AnalysisError.NO_ERRORS);
-      entry.setState(PARSED_UNIT, CacheState.FLUSHED);
-      entry.setState(RESOLVE_TYPE_NAMES_ERRORS, CacheState.FLUSHED);
-      entry.setState(RESOLVE_TYPE_BOUNDS_ERRORS, CacheState.FLUSHED);
-      setValue(SCAN_ERRORS, AnalysisError.NO_ERRORS);
-      setValue(SOURCE_KIND, SourceKind.LIBRARY);
-      entry.setState(TOKEN_STREAM, CacheState.FLUSHED);
-      setValue(UNITS, <Source>[librarySource]);
-
-      LibrarySpecificUnit unit =
-          new LibrarySpecificUnit(librarySource, librarySource);
-      entry = getCacheEntry(unit);
-      setValue(HINTS, AnalysisError.NO_ERRORS);
-      setValue(LINTS, AnalysisError.NO_ERRORS);
-      setValue(LIBRARY_UNIT_ERRORS, AnalysisError.NO_ERRORS);
-      setValue(RESOLVE_DIRECTIVES_ERRORS, AnalysisError.NO_ERRORS);
-      setValue(RESOLVE_TYPE_NAMES_ERRORS, AnalysisError.NO_ERRORS);
-      setValue(RESOLVE_UNIT_ERRORS, AnalysisError.NO_ERRORS);
-      entry.setState(RESOLVED_UNIT, CacheState.FLUSHED);
-      entry.setState(RESOLVED_UNIT1, CacheState.FLUSHED);
-      entry.setState(RESOLVED_UNIT2, CacheState.FLUSHED);
-      entry.setState(RESOLVED_UNIT3, CacheState.FLUSHED);
-      entry.setState(RESOLVED_UNIT4, CacheState.FLUSHED);
-      entry.setState(RESOLVED_UNIT5, CacheState.FLUSHED);
-      entry.setState(RESOLVED_UNIT6, CacheState.FLUSHED);
-      entry.setState(RESOLVED_UNIT7, CacheState.FLUSHED);
-      entry.setState(RESOLVED_UNIT8, CacheState.FLUSHED);
-      entry.setState(RESOLVED_UNIT9, CacheState.FLUSHED);
-      entry.setState(RESOLVED_UNIT10, CacheState.FLUSHED);
-      entry.setState(RESOLVED_UNIT11, CacheState.FLUSHED);
-      entry.setState(RESOLVED_UNIT12, CacheState.FLUSHED);
-      // USED_IMPORTED_ELEMENTS
-      // USED_LOCAL_ELEMENTS
-      setValue(STRONG_MODE_ERRORS, AnalysisError.NO_ERRORS);
-      setValue(VARIABLE_REFERENCE_ERRORS, AnalysisError.NO_ERRORS);
-      setValue(VERIFY_ERRORS, AnalysisError.NO_ERRORS);
-    });
-
-    CacheEntry entry = getCacheEntry(AnalysisContextTarget.request);
-    entry.setValue(TYPE_PROVIDER, typeProvider, const <TargetedResult>[]);
+    throw UnimplementedError();
   }
 
   @override
   void removeListener(AnalysisListener listener) {
-    _listeners.remove(listener);
+    throw UnimplementedError();
   }
 
   @override
   CompilationUnit resolveCompilationUnit(
       Source unitSource, LibraryElement library) {
-    if (library == null) {
-      return null;
-    }
-    return resolveCompilationUnit2(unitSource, library.source);
+    throw UnimplementedError();
   }
 
   @override
   CompilationUnit resolveCompilationUnit2(
       Source unitSource, Source librarySource) {
-    return computeResult(
-        new LibrarySpecificUnit(librarySource, unitSource), RESOLVED_UNIT);
+    throw UnimplementedError();
   }
 
   @override
   void setChangedContents(Source source, String contents, int offset,
       int oldLength, int newLength) {
-    if (_contentRangeChanged(source, contents, offset, oldLength, newLength)) {
-      _onSourcesChangedController.add(new SourcesChangedEvent.changedRange(
-          source, contents, offset, oldLength, newLength));
-    }
+    throw UnimplementedError();
   }
 
   @deprecated
   @override
   void setConfigurationData(ResultDescriptor key, Object data) {
-    _configurationData[key] = data;
+    throw UnimplementedError();
   }
 
   @override
   void setContents(Source source, String contents) {
-    _contentsChanged(source, contents, true);
+    throw UnimplementedError();
   }
 
   @override
   bool shouldErrorsBeAnalyzed(Source source) {
-    CacheEntry entry = analysisCache.get(source);
-    if (source.isInSystemLibrary) {
-      return _options.generateSdkErrors;
-    } else if (!entry.explicitlyAdded) {
-      return _options.generateImplicitErrors;
-    } else {
-      return true;
-    }
+    throw UnimplementedError();
   }
 
   @override
   void test_flushAstStructures(Source source) {
-    CacheEntry entry = getCacheEntry(source);
-    entry.setState(PARSED_UNIT, CacheState.FLUSHED);
-    entry.setState(RESOLVED_UNIT1, CacheState.FLUSHED);
-    entry.setState(RESOLVED_UNIT2, CacheState.FLUSHED);
-    entry.setState(RESOLVED_UNIT3, CacheState.FLUSHED);
-    entry.setState(RESOLVED_UNIT4, CacheState.FLUSHED);
-    entry.setState(RESOLVED_UNIT5, CacheState.FLUSHED);
-    entry.setState(RESOLVED_UNIT6, CacheState.FLUSHED);
-    entry.setState(RESOLVED_UNIT7, CacheState.FLUSHED);
-    entry.setState(RESOLVED_UNIT8, CacheState.FLUSHED);
-    entry.setState(RESOLVED_UNIT9, CacheState.FLUSHED);
-    entry.setState(RESOLVED_UNIT10, CacheState.FLUSHED);
-    entry.setState(RESOLVED_UNIT11, CacheState.FLUSHED);
-    entry.setState(RESOLVED_UNIT12, CacheState.FLUSHED);
-    entry.setState(RESOLVED_UNIT, CacheState.FLUSHED);
+    throw UnimplementedError();
   }
 
   @override
   void visitContentCache(ContentCacheVisitor visitor) {
-    _contentCache.accept(visitor);
-  }
-
-  /**
-   * Add all of the sources contained in the given source [container] to the
-   * given list of [sources].
-   */
-  void _addSourcesInContainer(List<Source> sources, SourceContainer container) {
-    for (Source source in _cache.sources) {
-      if (container.contains(source)) {
-        sources.add(source);
-      }
-    }
-  }
-
-  /**
-   * Remove the given [pendingFuture] from [_pendingFutureTargets], since the
-   * client has indicated its computation is not needed anymore.
-   */
-  void _cancelFuture(PendingFuture pendingFuture) {
-    List<PendingFuture> pendingFutures =
-        _pendingFutureTargets[pendingFuture.target];
-    if (pendingFutures != null) {
-      pendingFutures.remove(pendingFuture);
-      if (pendingFutures.isEmpty) {
-        _pendingFutureTargets.remove(pendingFuture.target);
-      }
-    }
-  }
-
-  /**
-   * Given the encoded form of a source ([encoding]), use the source factory to
-   * reconstitute the original source.
-   */
-  Source _computeSourceFromEncoding(String encoding) =>
-      _sourceFactory.fromEncoding(encoding);
-
-  /**
-   * Return `true` if the given list of [sources] contains the given
-   * [targetSource].
-   */
-  bool _contains(List<Source> sources, Source targetSource) {
-    for (Source source in sources) {
-      if (source == targetSource) {
-        return true;
-      }
-    }
-    return false;
-  }
-
-  /**
-   * Return `true` if the given list of [sources] contains any of the given
-   * [targetSources].
-   */
-  bool _containsAny(List<Source> sources, List<Source> targetSources) {
-    for (Source targetSource in targetSources) {
-      if (_contains(sources, targetSource)) {
-        return true;
-      }
-    }
-    return false;
-  }
-
-  /**
-   * Set the contents of the given [source] to the given [contents] and mark the
-   * source as having changed. The additional [offset], [oldLength] and
-   * [newLength] information is used by the context to determine what reanalysis
-   * is necessary. The method [setChangedContents] triggers a source changed
-   * event where as this method does not.
-   */
-  bool _contentRangeChanged(Source source, String contents, int offset,
-      int oldLength, int newLength) {
-    bool changed = false;
-    String originalContents = _contentCache.setContents(source, contents);
-    if (contents != null) {
-      if (contents != originalContents) {
-        _sourceChanged(source);
-        changed = true;
-        CacheEntry entry = _cache.get(source);
-        if (entry != null) {
-          entry.modificationTime = _contentCache.getModificationStamp(source);
-          entry.setValue(CONTENT, contents, const <TargetedResult>[]);
-        }
-      }
-    } else if (originalContents != null) {
-      _sourceChanged(source);
-      changed = true;
-    }
-    return changed;
-  }
-
-  /**
-   * Set the contents of the given [source] to the given [contents] and mark the
-   * source as having changed. This has the effect of overriding the default
-   * contents of the source. If the contents are `null` the override is removed
-   * so that the default contents will be returned. If [notify] is true, a
-   * source changed event is triggered.
-   */
-  void _contentsChanged(Source source, String contents, bool notify) {
-    String originalContents = _contentCache.setContents(source, contents);
-    handleContentsChanged(source, originalContents, contents, notify);
-  }
-
-  /**
-   * Create a cache entry for the given [source]. The source was explicitly
-   * added to this context if [explicitlyAdded] is `true`. Return the cache
-   * entry that was created.
-   */
-  CacheEntry _createCacheEntry(Source source, bool explicitlyAdded) {
-    CacheEntry entry = new CacheEntry(source);
-    entry.modificationTime = getModificationStamp(source);
-    entry.explicitlyAdded = explicitlyAdded;
-    _cache.put(entry);
-    if (!explicitlyAdded) {
-      _implicitAnalysisEventsController
-          .add(new ImplicitAnalysisEvent(source, true));
-    }
-    return entry;
-  }
-
-  /**
-   * Return a list containing all of the cache entries for targets associated
-   * with the given [source].
-   */
-  List<CacheEntry> _entriesFor(Source source) {
-    List<CacheEntry> entries = <CacheEntry>[];
-    MapIterator<AnalysisTarget, CacheEntry> iterator = _cache.iterator();
-    while (iterator.moveNext()) {
-      if (iterator.key.source == source) {
-        entries.add(iterator.value);
-      }
-    }
-    return entries;
-  }
-
-  void _evaluatePendingFutures() {
-    for (AnalysisTarget target in _pendingFutureTargets.keys) {
-      CacheEntry cacheEntry = _cache.get(target);
-      List<PendingFuture> pendingFutures = _pendingFutureTargets[target];
-      for (int i = 0; i < pendingFutures.length;) {
-        if (cacheEntry == null) {
-          pendingFutures[i].forciblyComplete();
-          pendingFutures.removeAt(i);
-        } else if (pendingFutures[i].evaluate(cacheEntry)) {
-          pendingFutures.removeAt(i);
-        } else {
-          i++;
-        }
-      }
-    }
-  }
-
-  /**
-   * Return a list containing all of the change notices that are waiting to be
-   * returned. If there are no notices, then return either `null` or an empty
-   * list, depending on the value of [nullIfEmpty].
-   */
-  List<ChangeNotice> _getChangeNotices(bool nullIfEmpty) {
-    if (_pendingNotices.isEmpty) {
-      if (nullIfEmpty) {
-        return null;
-      }
-      return const <ChangeNoticeImpl>[];
-    }
-    List<ChangeNotice> notices = new List.from(_pendingNotices.values);
-    _pendingNotices.clear();
-    return notices;
-  }
-
-  /**
-   * Return a list containing all of the sources known to this context that have
-   * the given [kind].
-   */
-  List<Source> _getSources(SourceKind kind) {
-    List<Source> sources = <Source>[];
-    if (kind == SourceKind.LIBRARY || kind == SourceKind.PART) {
-      for (Source source in _cache.sources) {
-        CacheEntry entry = _cache.get(source);
-        if (entry.getValue(SOURCE_KIND) == kind) {
-          sources.add(source);
-        }
-      }
-    } else if (kind == SourceKind.HTML) {
-      for (Source source in _cache.sources) {
-        if (AnalysisEngine.isHtmlFileName(source.shortName)) {
-          sources.add(source);
-        }
-      }
-    }
-    if (sources.isEmpty) {
-      return const <Source>[];
-    }
-    return sources;
-  }
-
-  /**
-   * Look at the given [source] to see whether a task needs to be performed
-   * related to it. If so, add the source to the set of sources that need to be
-   * processed. This method is intended to be used for testing purposes only.
-   */
-  void _getSourcesNeedingProcessing(
-      Source source,
-      CacheEntry entry,
-      bool isPriority,
-      bool hintsEnabled,
-      bool lintsEnabled,
-      HashSet<Source> sources) {
-    CacheState state = entry.getState(CONTENT);
-    if (state == CacheState.INVALID ||
-        (isPriority && state == CacheState.FLUSHED)) {
-      sources.add(source);
-      return;
-    } else if (state == CacheState.ERROR) {
-      return;
-    }
-    state = entry.getState(SOURCE_KIND);
-    if (state == CacheState.INVALID ||
-        (isPriority && state == CacheState.FLUSHED)) {
-      sources.add(source);
-      return;
-    } else if (state == CacheState.ERROR) {
-      return;
-    }
-    SourceKind kind = entry.getValue(SOURCE_KIND);
-    if (kind == SourceKind.LIBRARY || kind == SourceKind.PART) {
-      state = entry.getState(SCAN_ERRORS);
-      if (state == CacheState.INVALID ||
-          (isPriority && state == CacheState.FLUSHED)) {
-        sources.add(source);
-        return;
-      } else if (state == CacheState.ERROR) {
-        return;
-      }
-      state = entry.getState(PARSE_ERRORS);
-      if (state == CacheState.INVALID ||
-          (isPriority && state == CacheState.FLUSHED)) {
-        sources.add(source);
-        return;
-      } else if (state == CacheState.ERROR) {
-        return;
-      }
-//      if (isPriority) {
-//        if (!entry.hasResolvableCompilationUnit) {
-//          sources.add(source);
-//          return;
-//        }
-//      }
-      for (Source librarySource in getLibrariesContaining(source)) {
-        CacheEntry libraryEntry = _cache.get(librarySource);
-        state = libraryEntry.getState(LIBRARY_ELEMENT);
-        if (state == CacheState.INVALID ||
-            (isPriority && state == CacheState.FLUSHED)) {
-          sources.add(source);
-          return;
-        } else if (state == CacheState.ERROR) {
-          return;
-        }
-        CacheEntry unitEntry =
-            _cache.get(new LibrarySpecificUnit(librarySource, source));
-        state = unitEntry.getState(RESOLVED_UNIT);
-        if (state == CacheState.INVALID ||
-            (isPriority && state == CacheState.FLUSHED)) {
-          sources.add(source);
-          return;
-        } else if (state == CacheState.ERROR) {
-          return;
-        }
-        if (shouldErrorsBeAnalyzed(source)) {
-          state = unitEntry.getState(VERIFY_ERRORS);
-          if (state == CacheState.INVALID ||
-              (isPriority && state == CacheState.FLUSHED)) {
-            sources.add(source);
-            return;
-          } else if (state == CacheState.ERROR) {
-            return;
-          }
-          if (hintsEnabled) {
-            state = unitEntry.getState(HINTS);
-            if (state == CacheState.INVALID ||
-                (isPriority && state == CacheState.FLUSHED)) {
-              sources.add(source);
-              return;
-            } else if (state == CacheState.ERROR) {
-              return;
-            }
-          }
-          if (lintsEnabled) {
-            state = unitEntry.getState(LINTS);
-            if (state == CacheState.INVALID ||
-                (isPriority && state == CacheState.FLUSHED)) {
-              sources.add(source);
-              return;
-            } else if (state == CacheState.ERROR) {
-              return;
-            }
-          }
-        }
-      }
-//    } else if (kind == SourceKind.HTML) {
-//      CacheState parsedUnitState = entry.getState(HtmlEntry.PARSED_UNIT);
-//      if (parsedUnitState == CacheState.INVALID ||
-//          (isPriority && parsedUnitState == CacheState.FLUSHED)) {
-//        sources.add(source);
-//        return;
-//      }
-//      CacheState resolvedUnitState =
-//          entry.getState(HtmlEntry.RESOLVED_UNIT);
-//      if (resolvedUnitState == CacheState.INVALID ||
-//          (isPriority && resolvedUnitState == CacheState.FLUSHED)) {
-//        sources.add(source);
-//        return;
-//      }
-    }
-  }
-
-  /**
-   * Log the given debugging [message].
-   */
-  void _logInformation(String message) {
-    AnalysisEngine.instance.logger.logInformation(message);
-  }
-
-  /**
-   * Notify all of the analysis listeners that the errors associated with the
-   * given [source] has been updated to the given [errors].
-   */
-  void _notifyErrors(
-      Source source, List<AnalysisError> errors, LineInfo lineInfo) {
-    int count = _listeners.length;
-    for (int i = 0; i < count; i++) {
-      _listeners[i].computedErrors(this, source, errors, lineInfo);
-    }
-  }
-
-  bool _referencesDartHtml(Source librarySource) {
-    Source htmlSource = sourceFactory.forUri(DartSdk.DART_HTML);
-    Set<Source> checkedSources = new Set<Source>();
-    bool _refHtml(Source source) {
-      if (!checkedSources.add(source)) {
-        return false;
-      }
-      if (source == htmlSource) {
-        return true;
-      }
-      LibraryElement library = _cache.getValue(source, LIBRARY_ELEMENT);
-      if (library != null) {
-        return library.importedLibraries.any((x) => _refHtml(x.source)) ||
-            library.exportedLibraries.any((x) => _refHtml(x.source));
-      }
-      return false;
-    }
-
-    return _refHtml(librarySource);
-  }
-
-  void _removeFromCache(Source source) {
-    CacheEntry entry = _cache.remove(source);
-    if (entry != null && !entry.explicitlyAdded) {
-      _implicitAnalysisEventsController
-          .add(new ImplicitAnalysisEvent(source, false));
-    }
-  }
-
-  /**
-   * Remove the given [source] from the priority order if it is in the list.
-   */
-  void _removeFromPriorityOrder(Source source) {
-    int count = _priorityOrder.length;
-    List<Source> newOrder = <Source>[];
-    for (int i = 0; i < count; i++) {
-      if (_priorityOrder[i] != source) {
-        newOrder.add(_priorityOrder[i]);
-      }
-    }
-    if (newOrder.length < count) {
-      analysisPriorityOrder = newOrder;
-    }
-  }
-
-  /**
-   * Create an entry for the newly added [source] and invalidate any sources
-   * that referenced the source before it existed.
-   */
-  void _sourceAvailable(Source source) {
-    driver.reset();
-    // TODO(brianwilkerson) This method needs to check whether the source was
-    // previously being implicitly analyzed. If so, the cache entry needs to be
-    // update to reflect the new status and an event needs to be generated to
-    // inform clients that it is no longer being implicitly analyzed.
-    CacheEntry entry = _cache.get(source);
-    if (entry == null) {
-      _createCacheEntry(source, true);
-    } else {
-      entry.explicitlyAdded = true;
-      entry.modificationTime = getModificationStamp(source);
-      entry.setState(CONTENT, CacheState.INVALID);
-      entry.setState(MODIFICATION_TIME, CacheState.INVALID);
-    }
-  }
-
-  /**
-   * Invalidate the [source] that was changed and any sources that referenced
-   * the source before it existed.
-   *
-   * Note: source may be considered "changed" if it was previously missing,
-   * but pointed to by an import or export directive.
-   */
-  void _sourceChanged(Source source, {bool compareWithOld: true}) {
-    CacheEntry entry = _cache.get(source);
-    // If the source has no cache entry, there is nothing to invalidate.
-    if (entry == null) {
-      return;
-    }
-
-    String oldContents = compareWithOld ? entry.getValue(CONTENT) : null;
-
-    // Flush so that from now on we will get new contents.
-    // (For example, in getLibrariesContaining.)
-    entry.setState(CONTENT, CacheState.FLUSHED);
-
-    // Prepare the new contents.
-    TimestampedData<String> fileContents;
-    try {
-      fileContents = getContents(source);
-    } catch (e) {}
-
-    // Update 'modificationTime' - we are going to update the entry.
-    {
-      int time = fileContents?.modificationTime ?? -1;
-      for (CacheEntry entry in _entriesFor(source)) {
-        entry.modificationTime = time;
-      }
-    }
-
-    // Fast path if the contents is the same as it was last time.
-    if (oldContents != null && fileContents?.data == oldContents) {
-      return;
-    }
-
-    // We're going to update the cache, so reset the driver.
-    driver.reset();
-
-    // We need to invalidate the cache.
-    {
-      entry.setState(CONTENT, CacheState.INVALID);
-      entry.setState(MODIFICATION_TIME, CacheState.INVALID);
-      entry.setState(SOURCE_KIND, CacheState.INVALID);
-    }
-    for (WorkManager workManager in workManagers) {
-      workManager
-          .applyChange(const <Source>[], <Source>[source], const <Source>[]);
-    }
-  }
-
-  /**
-   * Record that the given [source] has been removed.
-   */
-  void _sourceRemoved(Source source) {
-    driver.reset();
-    _removeFromCache(source);
-    _removeFromPriorityOrder(source);
-  }
-}
-
-/**
- * A helper class used to create futures for [AnalysisContextImpl].
- * Using a helper class allows us to preserve the generic parameter T.
- */
-class AnalysisFutureHelper<T> {
-  final AnalysisContextImpl _context;
-  final AnalysisTarget _target;
-  final ResultDescriptor<T> _descriptor;
-
-  AnalysisFutureHelper(this._context, this._target, this._descriptor);
-
-  /**
-   * Return a future that will be completed with the result specified
-   * in the constructor. If the result is cached, the future will be
-   * completed immediately with the resulting value. If not, then
-   * analysis is scheduled that will produce the required result.
-   * If the result cannot be generated, then the future will be completed with
-   * the error AnalysisNotScheduledError.
-   */
-  CancelableFuture<T> computeAsync() {
-    if (_context.isDisposed) {
-      // No further analysis is expected, so return a future that completes
-      // immediately with AnalysisNotScheduledError.
-      return new CancelableFuture.error(new AnalysisNotScheduledError());
-    }
-    CacheEntry entry = _context.getCacheEntry(_target);
-    PendingFuture<T> pendingFuture =
-        new PendingFuture<T>(_context, _target, (CacheEntry entry) {
-      CacheState state = entry.getState(_descriptor);
-      if (state == CacheState.ERROR) {
-        throw entry.exception;
-      } else if (state == CacheState.INVALID) {
-        return null;
-      }
-      return entry.getValue(_descriptor);
-    });
-    if (!pendingFuture.evaluate(entry)) {
-      _context._pendingFutureTargets
-          .putIfAbsent(_target, () => <PendingFuture>[])
-          .add(pendingFuture);
-      _context.dartWorkManager.addPriorityResult(_target, _descriptor);
-    }
-    return pendingFuture.future;
-  }
-}
-
-class CacheConsistencyValidatorImpl implements CacheConsistencyValidator {
-  final AnalysisContextImpl context;
-
-  CacheConsistencyValidatorImpl(this.context);
-
-  @override
-  List<Source> getSourcesToComputeModificationTimes() {
-    return context._privatePartition.sources.toList();
-  }
-
-  @override
-  bool sourceModificationTimesComputed(List<Source> sources, List<int> times) {
-    Stopwatch timer = new Stopwatch()..start();
-    HashSet<Source> changedSources = new HashSet<Source>();
-    HashSet<Source> removedSources = new HashSet<Source>();
-    for (int i = 0; i < sources.length; i++) {
-      Source source = sources[i];
-      // When a source is in the content cache,
-      // its modification time in the file system does not matter.
-      if (context._contentCache.getModificationStamp(source) != null) {
-        continue;
-      }
-      // When we were not able to compute the modification time in the
-      // file system, there is nothing to compare with, so skip the source.
-      int sourceTime = times[i];
-      if (sourceTime == null) {
-        continue;
-      }
-      // Compare with the modification time in the cache entry.
-      CacheEntry entry = context._privatePartition.get(source);
-      if (entry != null) {
-        if (entry.modificationTime != sourceTime) {
-          if (sourceTime == -1) {
-            removedSources.add(source);
-            PerformanceStatistics
-                .cacheConsistencyValidationStatistics.numOfRemoved++;
-          } else {
-            changedSources.add(source);
-            PerformanceStatistics
-                .cacheConsistencyValidationStatistics.numOfChanged++;
-          }
-        }
-      }
-    }
-    for (Source source in changedSources) {
-      context._sourceChanged(source);
-    }
-    for (Source source in removedSources) {
-      context._sourceRemoved(source);
-    }
-    if (changedSources.length > 0 || removedSources.length > 0) {
-      StringBuffer buffer = new StringBuffer();
-      buffer.write("Consistency check took ");
-      buffer.write(timer.elapsedMilliseconds);
-      buffer.writeln(" ms and found");
-      buffer.write("  ");
-      buffer.write(changedSources.length);
-      buffer.writeln(" changed sources");
-      buffer.write("  ");
-      buffer.write(removedSources.length);
-      buffer.write(" removed sources.");
-      context._logInformation(buffer.toString());
-    }
-    return changedSources.isNotEmpty || removedSources.isNotEmpty;
+    throw UnimplementedError();
   }
 }
 
@@ -1859,139 +576,20 @@
  */
 class PartitionManager {
   /**
-   * A table mapping SDK's to the partitions used for those SDK's.
-   */
-  Map<DartSdk, SdkCachePartition> _sdkPartitions =
-      new HashMap<DartSdk, SdkCachePartition>();
-
-  /**
    * Clear any cached data being maintained by this manager.
    */
-  void clearCache() {
-    _sdkPartitions.clear();
-  }
+  void clearCache() {}
 
   /**
    * Return the partition being used for the given [sdk], creating the partition
    * if necessary.
    */
   SdkCachePartition forSdk(DartSdk sdk) {
-    // Call sdk.context now, because when it creates a new
-    // InternalAnalysisContext instance, it calls forSdk() again, so creates an
-    // SdkCachePartition instance.
-    // So, if we initialize context after "partition == null", we end up
-    // with two SdkCachePartition instances.
-    InternalAnalysisContext sdkContext = sdk.context;
-    // Check cache for an existing partition.
-    SdkCachePartition partition = _sdkPartitions[sdk];
-    if (partition == null) {
-      partition = new SdkCachePartition(sdkContext);
-      _sdkPartitions[sdk] = partition;
-    }
-    return partition;
+    throw UnimplementedError();
   }
 }
 
 /**
- * Representation of a pending computation which is based on the results of
- * analysis that may or may not have been completed.
- */
-class PendingFuture<T> {
-  /**
-   * The context in which this computation runs.
-   */
-  final AnalysisContextImpl _context;
-
-  /**
-   * The target used by this computation to compute its value.
-   */
-  final AnalysisTarget target;
-
-  /**
-   * The function which implements the computation.
-   */
-  final PendingFutureComputer<T> _computeValue;
-
-  /**
-   * The completer that should be completed once the computation has succeeded.
-   */
-  CancelableCompleter<T> _completer;
-
-  PendingFuture(this._context, this.target, this._computeValue) {
-    _completer = new CancelableCompleter<T>(_onCancel);
-  }
-
-  /**
-   * Retrieve the future which will be completed when this object is
-   * successfully evaluated.
-   */
-  CancelableFuture<T> get future => _completer.future;
-
-  /**
-   * Execute [_computeValue], passing it the given [entry], and complete
-   * the pending future if it's appropriate to do so.  If the pending future is
-   * completed by this call, true is returned; otherwise false is returned.
-   *
-   * Once this function has returned true, it should not be called again.
-   *
-   * Other than completing the future, this method is free of side effects.
-   * Note that any code the client has attached to the future will be executed
-   * in a microtask, so there is no danger of side effects occurring due to
-   * client callbacks.
-   */
-  bool evaluate(CacheEntry entry) {
-    assert(!_completer.isCompleted);
-    try {
-      T result = _computeValue(entry);
-      if (result == null) {
-        return false;
-      } else {
-        _completer.complete(result);
-        return true;
-      }
-    } catch (exception, stackTrace) {
-      _completer.completeError(exception, stackTrace);
-      return true;
-    }
-  }
-
-  /**
-   * No further analysis updates are expected which affect this future, so
-   * complete it with an AnalysisNotScheduledError in order to avoid
-   * deadlocking the client.
-   */
-  void forciblyComplete() {
-    try {
-      throw new AnalysisNotScheduledError();
-    } catch (exception, stackTrace) {
-      _completer.completeError(exception, stackTrace);
-    }
-  }
-
-  void _onCancel() {
-    _context._cancelFuture(this);
-  }
-}
-
-/**
- * Provider for analysis results.
- */
-abstract class ResultProvider {
-  /**
-   * This method is invoked by an [InternalAnalysisContext] when the state of
-   * the [result] of the [entry] is [CacheState.INVALID], so it is about to be
-   * computed.
-   *
-   * If the provider knows how to provide the value, it sets the value into
-   * the [entry] with all required dependencies, and returns `true`.
-   *
-   * Otherwise, it returns `false` to indicate that the result should be
-   * computed as usually.
-   */
-  bool compute(CacheEntry entry, ResultDescriptor result);
-}
-
-/**
  * An [AnalysisContext] that only contains sources for a Dart SDK.
  */
 class SdkAnalysisContext extends AnalysisContextImpl {
@@ -2013,15 +611,6 @@
 
   @override
   AnalysisCache createCacheFromSourceFactory(SourceFactory factory) {
-    if (factory == null) {
-      return super.createCacheFromSourceFactory(factory);
-    }
-    DartSdk sdk = factory.dartSdk;
-    if (sdk == null) {
-      throw new ArgumentError(
-          "The source factory for an SDK analysis context must have a DartUriResolver");
-    }
-    return new AnalysisCache(
-        <CachePartition>[AnalysisEngine.instance.partitionManager.forSdk(sdk)]);
+    throw UnimplementedError();
   }
 }
diff --git a/pkg/analyzer/lib/src/context/context_root.dart b/pkg/analyzer/lib/src/context/context_root.dart
index 744f298..a7da43e 100644
--- a/pkg/analyzer/lib/src/context/context_root.dart
+++ b/pkg/analyzer/lib/src/context/context_root.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/context/source.dart b/pkg/analyzer/lib/src/context/source.dart
index 70abd3dc..71abce1 100644
--- a/pkg/analyzer/lib/src/context/source.dart
+++ b/pkg/analyzer/lib/src/context/source.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/analysis_context_collection.dart b/pkg/analyzer/lib/src/dart/analysis/analysis_context_collection.dart
index f844029..bacc26c 100644
--- a/pkg/analyzer/lib/src/dart/analysis/analysis_context_collection.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/analysis_context_collection.dart
@@ -7,6 +7,7 @@
 import 'package:analyzer/dart/analysis/context_locator.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/file_system/physical_file_system.dart';
+import 'package:analyzer/src/dart/analysis/byte_store.dart';
 import 'package:analyzer/src/dart/analysis/context_builder.dart';
 import 'package:analyzer/src/dart/analysis/file_state.dart';
 import 'package:meta/meta.dart';
@@ -22,6 +23,7 @@
   /// Initialize a newly created analysis context manager.
   AnalysisContextCollectionImpl(
       {bool enableIndex: false,
+      @deprecated ByteStore byteStore,
       @deprecated FileContentOverlay fileContentOverlay,
       @required List<String> includedPaths,
       ResourceProvider resourceProvider,
@@ -42,6 +44,7 @@
         resourceProvider: this.resourceProvider,
       );
       var context = contextBuilder.createContext(
+        byteStore: byteStore,
         contextRoot: root,
         enableIndex: enableIndex,
         fileContentOverlay: fileContentOverlay,
diff --git a/pkg/analyzer/lib/src/dart/analysis/byte_store.dart b/pkg/analyzer/lib/src/dart/analysis/byte_store.dart
index 80f7b32..6e7c301 100644
--- a/pkg/analyzer/lib/src/dart/analysis/byte_store.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/byte_store.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/cache.dart b/pkg/analyzer/lib/src/dart/analysis/cache.dart
index 47a32a3..58a7253 100644
--- a/pkg/analyzer/lib/src/dart/analysis/cache.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/cache.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/crc32.dart b/pkg/analyzer/lib/src/dart/analysis/crc32.dart
index 457712e..e571bfc 100644
--- a/pkg/analyzer/lib/src/dart/analysis/crc32.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/crc32.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/defined_names.dart b/pkg/analyzer/lib/src/dart/analysis/defined_names.dart
index 44baa00..4da5300 100644
--- a/pkg/analyzer/lib/src/dart/analysis/defined_names.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/defined_names.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/dependency/library_builder.dart b/pkg/analyzer/lib/src/dart/analysis/dependency/library_builder.dart
index 4740d58..20859c2 100644
--- a/pkg/analyzer/lib/src/dart/analysis/dependency/library_builder.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/dependency/library_builder.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/dependency/node.dart b/pkg/analyzer/lib/src/dart/analysis/dependency/node.dart
index ef5022d..10baa3c 100644
--- a/pkg/analyzer/lib/src/dart/analysis/dependency/node.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/dependency/node.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/dependency/reference_collector.dart b/pkg/analyzer/lib/src/dart/analysis/dependency/reference_collector.dart
index 09b4dae..5f16104 100644
--- a/pkg/analyzer/lib/src/dart/analysis/dependency/reference_collector.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/dependency/reference_collector.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -236,6 +236,28 @@
     }
   }
 
+  void _visitCollectionElement(CollectionElement node) {
+    if (node == null) {
+      return;
+    } else if (node is Expression) {
+      _visitExpression(node);
+    } else if (node is ForElement) {
+      _visitForLoopParts(node.forLoopParts);
+      _visitCollectionElement(node.body);
+    } else if (node is IfElement) {
+      _visitExpression(node.condition);
+      _visitCollectionElement(node.thenElement);
+      _visitCollectionElement(node.elseElement);
+    } else if (node is MapLiteralEntry) {
+      _visitExpression(node.key);
+      _visitExpression(node.value);
+    } else if (node is SpreadElement) {
+      _visitExpression(node.expression);
+    } else {
+      throw UnimplementedError('(${node.runtimeType}) $node');
+    }
+  }
+
   /// Record reference to the constructor of the [type] with the given [name].
   void _visitConstructor(TypeName type, SimpleIdentifier name) {
     _visitTypeAnnotation(type);
@@ -320,8 +342,6 @@
       _visitTypeAnnotation(node.type);
     } else if (node is ListLiteral) {
       _visitListLiteral(node);
-    } else if (node is MapLiteral) {
-      _visitMapLiteral(node);
     } else if (node is MethodInvocation) {
       _visitMethodInvocation(node);
     } else if (node is NamedExpression) {
@@ -340,8 +360,8 @@
       _visitPropertyAccess(node, get: get, set: set);
     } else if (node is RethrowExpression) {
       // no dependencies
-    } else if (node is SetLiteral) {
-      _visitSetLiteral(node);
+    } else if (node is SetOrMapLiteral) {
+      _visitSetOrMapLiteral(node);
     } else if (node is SimpleIdentifier) {
       _visitSimpleIdentifier(node, get: get, set: set);
     } else if (node is SimpleStringLiteral) {
@@ -365,27 +385,34 @@
     }
   }
 
-  void _visitForEachStatement(ForEachStatement node) {
-    var loopVariable = node.loopVariable;
-    if (loopVariable != null) {
-      _visitTypeAnnotation(loopVariable.type);
+  void _visitExpressionList(NodeList<Expression> nodes) {
+    for (Expression node in nodes) {
+      _visitExpression(node);
     }
+  }
 
-    var loopIdentifier = node.identifier;
-    if (loopIdentifier != null) {
-      _visitExpression(loopIdentifier);
+  void _visitForLoopParts(ForLoopParts node) {
+    if (node == null) {
+      return;
+    } else if (node is ForPartsWithDeclarations) {
+      _visitVariableList(node.variables);
+      _visitExpression(node.condition);
+      _visitExpressionList(node.updaters);
+    } else if (node is ForPartsWithExpression) {
+      _visitExpression(node.initialization);
+      _visitExpression(node.condition);
+      _visitExpressionList(node.updaters);
+    } else if (node is ForEachPartsWithDeclaration) {
+      var variable = node.loopVariable;
+      _visitTypeAnnotation(variable.type);
+      _visitExpression(node.iterable);
+      _localScopes.add(variable.identifier.name);
+    } else if (node is ForEachPartsWithIdentifier) {
+      _visitExpression(node.identifier);
+      _visitExpression(node.iterable);
+    } else {
+      throw UnimplementedError('(${node.runtimeType}) $node');
     }
-
-    _visitExpression(node.iterable);
-
-    _localScopes.enter();
-    if (loopVariable != null) {
-      _localScopes.add(loopVariable.identifier.name);
-    }
-
-    _visitStatement(node.body);
-
-    _localScopes.exit();
   }
 
   void _visitFormalParameterList(FormalParameterList node) {
@@ -440,15 +467,7 @@
   void _visitForStatement(ForStatement node) {
     _localScopes.enter();
 
-    _visitVariableList(node.variables);
-    _visitExpression(node.initialization);
-    _visitExpression(node.condition);
-
-    var updaters = node.updaters;
-    for (var i = 0; i < updaters.length; i++) {
-      _visitExpression(updaters[i]);
-    }
-
+    _visitForLoopParts(node.forLoopParts);
     _visitStatement(node.body);
 
     _localScopes.exit();
@@ -519,17 +538,7 @@
     var elements = node.elements;
     for (var i = 0; i < elements.length; i++) {
       var element = elements[i];
-      _visitExpression(element);
-    }
-  }
-
-  void _visitMapLiteral(MapLiteral node) {
-    _visitTypeArguments(node.typeArguments);
-    var entries = node.entries;
-    for (var i = 0; i < entries.length; i++) {
-      var entry = entries[i];
-      _visitExpression(entry.key);
-      _visitExpression(entry.value);
+      _visitCollectionElement(element);
     }
   }
 
@@ -608,12 +617,12 @@
     }
   }
 
-  void _visitSetLiteral(SetLiteral node) {
+  void _visitSetOrMapLiteral(SetOrMapLiteral node) {
     _visitTypeArguments(node.typeArguments);
     var elements = node.elements;
     for (var i = 0; i < elements.length; i++) {
       var element = elements[i];
-      _visitExpression(element);
+      _visitCollectionElement(element);
     }
   }
 
@@ -653,8 +662,6 @@
       // nothing
     } else if (node is ExpressionStatement) {
       _visitExpression(node.expression);
-    } else if (node is ForEachStatement) {
-      _visitForEachStatement(node);
     } else if (node is ForStatement) {
       _visitForStatement(node);
     } else if (node is FunctionDeclarationStatement) {
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index 3081077..463a9db 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -94,7 +94,7 @@
   /**
    * The version of data format, should be incremented on every format change.
    */
-  static const int DATA_VERSION = 78;
+  static const int DATA_VERSION = 79;
 
   /**
    * The number of exception contexts allowed to write. Once this field is
diff --git a/pkg/analyzer/lib/src/dart/analysis/experiments.dart b/pkg/analyzer/lib/src/dart/analysis/experiments.dart
index 5bf37c7..54978bd 100644
--- a/pkg/analyzer/lib/src/dart/analysis/experiments.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/experiments.dart
@@ -52,6 +52,9 @@
   /// String to enable the experiment "spread-collections"
   static const String spread_collections = 'spread-collections';
 
+  /// String to enable the experiment "triple-shift"
+  static const String triple_shift = 'triple-shift';
+
   /// String to enable the experiment "bogus-disabled"
   static const String bogus_disabled = 'bogus-disabled';
 
@@ -77,13 +80,13 @@
         IsExpired.non_nullable,
         'Non Nullable'),
     EnableString.control_flow_collections: const ExperimentalFeature(
-        2,
+        null,
         EnableString.control_flow_collections,
         IsEnabledByDefault.control_flow_collections,
         IsExpired.control_flow_collections,
         'Control Flow Collections'),
     EnableString.spread_collections: const ExperimentalFeature(
-        3,
+        null,
         EnableString.spread_collections,
         IsEnabledByDefault.spread_collections,
         IsExpired.spread_collections,
@@ -94,6 +97,12 @@
         IsEnabledByDefault.set_literals,
         IsExpired.set_literals,
         'Set Literals'),
+    EnableString.triple_shift: const ExperimentalFeature(
+        2,
+        EnableString.triple_shift,
+        IsEnabledByDefault.triple_shift,
+        IsExpired.triple_shift,
+        'Triple-shift operator'),
     EnableString.bogus_disabled: const ExperimentalFeature(
         null,
         EnableString.bogus_disabled,
@@ -117,13 +126,12 @@
       bool control_flow_collections,
       bool non_nullable,
       bool set_literals,
-      bool spread_collections})
+      bool spread_collections,
+      bool triple_shift})
       : _enableFlags = <bool>[
           constant_update_2018 ?? IsEnabledByDefault.constant_update_2018,
           non_nullable ?? IsEnabledByDefault.non_nullable,
-          control_flow_collections ??
-              IsEnabledByDefault.control_flow_collections,
-          spread_collections ?? IsEnabledByDefault.spread_collections,
+          triple_shift ?? IsEnabledByDefault.triple_shift,
         ];
 
   /// Decodes the strings given in [flags] into a representation of the set of
@@ -146,7 +154,7 @@
   bool get constant_update_2018 => _enableFlags[0];
 
   /// Current state for the flag "control_flow_collections"
-  bool get control_flow_collections => _enableFlags[2];
+  bool get control_flow_collections => true;
 
   /// Current state for the flag "non-nullable"
   bool get non_nullable => _enableFlags[1];
@@ -155,7 +163,10 @@
   bool get set_literals => true;
 
   /// Current state for the flag "spread_collections"
-  bool get spread_collections => _enableFlags[3];
+  bool get spread_collections => true;
+
+  /// Current state for the flag "triple_shift"
+  bool get triple_shift => _enableFlags[2];
 
   /// Queries whether the given [feature] is enabled or disabled.
   bool isEnabled(ExperimentalFeature feature) => feature.isExpired
@@ -174,7 +185,7 @@
   static const bool constant_update_2018 = false;
 
   /// Default state of the experiment "control-flow-collections"
-  static const bool control_flow_collections = false;
+  static const bool control_flow_collections = true;
 
   /// Default state of the experiment "non-nullable"
   static const bool non_nullable = false;
@@ -183,7 +194,10 @@
   static const bool set_literals = true;
 
   /// Default state of the experiment "spread-collections"
-  static const bool spread_collections = false;
+  static const bool spread_collections = true;
+
+  /// Default state of the experiment "triple-shift"
+  static const bool triple_shift = false;
 
   /// Default state of the experiment "bogus-disabled"
   static const bool bogus_disabled = false;
@@ -200,7 +214,7 @@
   static const bool constant_update_2018 = false;
 
   /// Expiration status of the experiment "control-flow-collections"
-  static const bool control_flow_collections = false;
+  static const bool control_flow_collections = true;
 
   /// Expiration status of the experiment "non-nullable"
   static const bool non_nullable = false;
@@ -209,7 +223,10 @@
   static const bool set_literals = true;
 
   /// Expiration status of the experiment "spread-collections"
-  static const bool spread_collections = false;
+  static const bool spread_collections = true;
+
+  /// Expiration status of the experiment "triple-shift"
+  static const bool triple_shift = false;
 
   /// Expiration status of the experiment "bogus-disabled"
   static const bool bogus_disabled = true;
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_state.dart b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
index 8655536..536e53d 100644
--- a/pkg/analyzer/lib/src/dart/analysis/file_state.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -331,6 +331,9 @@
       for (UnlinkedEnum type in unlinked.enums) {
         addDeclaration(TopLevelDeclarationKind.type, type.name);
       }
+      for (UnlinkedClass type in unlinked.mixins) {
+        addDeclaration(TopLevelDeclarationKind.type, type.name);
+      }
       for (UnlinkedTypedef type in unlinked.typedefs) {
         addDeclaration(TopLevelDeclarationKind.type, type.name);
       }
@@ -693,7 +696,7 @@
     ExperimentStatus experimentStatus = analysisOptions.experimentStatus;
     CharSequenceReader reader = new CharSequenceReader(content);
     Scanner scanner = new Scanner(source, reader, errorListener);
-    scanner.enableGtGtGt = experimentStatus.constant_update_2018;
+    scanner.enableGtGtGt = experimentStatus.triple_shift;
     Token token = PerformanceStatistics.scan.makeCurrentWhile(() {
       return scanner.tokenize();
     });
@@ -702,11 +705,11 @@
     bool useFasta = analysisOptions.useFastaParser;
     Parser parser = new Parser(source, errorListener, useFasta: useFasta);
     parser.enableOptionalNewAndConst = true;
-    parser.enableSetLiterals = experimentStatus.set_literals;
     parser.enableNonNullable = experimentStatus.non_nullable;
     parser.enableSpreadCollections = experimentStatus.spread_collections;
     parser.enableControlFlowCollections =
         experimentStatus.control_flow_collections;
+    parser.enableTripleShift = experimentStatus.triple_shift;
     CompilationUnit unit = parser.parseCompilationUnit(token);
     unit.lineInfo = lineInfo;
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_tracker.dart b/pkg/analyzer/lib/src/dart/analysis/file_tracker.dart
index 1e34697..363b777 100644
--- a/pkg/analyzer/lib/src/dart/analysis/file_tracker.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/file_tracker.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/fletcher16.dart b/pkg/analyzer/lib/src/dart/analysis/fletcher16.dart
index 8eb3e2e..46f3ae6 100644
--- a/pkg/analyzer/lib/src/dart/analysis/fletcher16.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/fletcher16.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/index.dart b/pkg/analyzer/lib/src/dart/analysis/index.dart
index ac79c40..61b116e 100644
--- a/pkg/analyzer/lib/src/dart/analysis/index.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/index.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart b/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
index cb200cb..abea6f05 100644
--- a/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/library_analyzer.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -14,6 +14,7 @@
 import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/dart/constant/compute.dart';
 import 'package:analyzer/src/dart/constant/constant_verifier.dart';
+import 'package:analyzer/src/dart/constant/evaluation.dart';
 import 'package:analyzer/src/dart/constant/utilities.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/handle.dart';
@@ -27,10 +28,10 @@
 import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/hint/sdk_constraint_verifier.dart';
+import 'package:analyzer/src/ignore_comments/ignore_info.dart';
 import 'package:analyzer/src/lint/linter.dart';
 import 'package:analyzer/src/lint/linter_visitor.dart';
 import 'package:analyzer/src/services/lint.dart';
-import 'package:analyzer/src/task/dart.dart';
 import 'package:analyzer/src/task/strong/checker.dart';
 import 'package:pub_semver/pub_semver.dart';
 
@@ -55,7 +56,7 @@
   final TypeProvider _typeProvider;
 
   final TypeSystem _typeSystem;
-  bool isNonNullableMigrated = false;
+  bool isNonNullableLibrary = false;
   LibraryElement _libraryElement;
 
   LibraryScope _libraryScope;
@@ -68,6 +69,13 @@
   final List<UsedLocalElements> _usedLocalElementsList = [];
   final Map<FileState, List<PendingError>> _fileToPendingErrors = {};
 
+  /**
+   * Constants in the current library.
+   *
+   * TODO(scheglov) Remove after https://github.com/dart-lang/sdk/issues/31925
+   */
+  final Set<ConstantEvaluationTarget> _libraryConstants = new Set();
+
   final Set<ConstantEvaluationTarget> _constants = new Set();
 
   LibraryAnalyzer(
@@ -102,8 +110,9 @@
     for (FileState file in _library.libraryFiles) {
       units[file] = _parse(file);
     }
-    isNonNullableMigrated = (units.values.first as CompilationUnitImpl)
-        .hasPragmaAnalyzerNonNullable;
+    // TODO(danrubel): Verify that all units are either nullable or non-nullable
+    isNonNullableLibrary =
+        (units.values.first as CompilationUnitImpl).isNonNullable;
 
     // Resolve URIs in directives to corresponding sources.
     units.forEach((file, unit) {
@@ -122,6 +131,7 @@
     });
 
     units.values.forEach(_findConstants);
+    _clearConstantEvaluationResults();
     _computeConstants();
 
     PerformanceStatistics.errors.makeCurrentWhile(() {
@@ -172,6 +182,24 @@
     return results;
   }
 
+  /**
+   * Clear evaluation results for all constants before computing them again.
+   * The reason is described in https://github.com/dart-lang/sdk/issues/35940
+   *
+   * Otherwise, we reuse results, including errors are recorded only when
+   * we evaluate constants resynthesized from summaries.
+   *
+   * TODO(scheglov) Remove after https://github.com/dart-lang/sdk/issues/31925
+   */
+  void _clearConstantEvaluationResults() {
+    for (var constant in _libraryConstants) {
+      if (constant is ConstFieldElementImpl_ofEnum) continue;
+      if (constant is ConstVariableElement) {
+        constant.evaluationResult = null;
+      }
+    }
+  }
+
   void _computeConstantErrors(
       ErrorReporter errorReporter, CompilationUnit unit) {
     ConstantVerifier constantVerifier = new ConstantVerifier(
@@ -203,8 +231,8 @@
       errorListener.onError(pendingError.toAnalysisError());
     }
 
-    unit.accept(
-        new DeadCodeVerifier(errorReporter, typeSystem: _context.typeSystem));
+    unit.accept(new DeadCodeVerifier(errorReporter, isNonNullableLibrary,
+        typeSystem: _context.typeSystem));
 
     // Dart2js analysis.
     if (_analysisOptions.dart2jsHint) {
@@ -317,6 +345,7 @@
     CodeChecker checker = new CodeChecker(
       _typeProvider,
       _context.typeSystem,
+      _inheritance,
       errorListener,
       _analysisOptions,
     );
@@ -379,6 +408,7 @@
   void _findConstants(CompilationUnit unit) {
     ConstantFinder constantFinder = new ConstantFinder();
     unit.accept(constantFinder);
+    _libraryConstants.addAll(constantFinder.constantsToCompute);
     _constants.addAll(constantFinder.constantsToCompute);
 
     var dependenciesFinder = new ConstantExpressionsDependenciesFinder();
@@ -603,12 +633,12 @@
 
     new TypeParameterBoundsResolver(
             _context.typeSystem, _libraryElement, source, errorListener,
-            isNonNullableMigrated: isNonNullableMigrated)
+            isNonNullableUnit: isNonNullableLibrary)
         .resolveTypeBounds(unit);
 
     unit.accept(new TypeResolverVisitor(
         _libraryElement, source, _typeProvider, errorListener,
-        isNonNullableMigrated: isNonNullableMigrated));
+        isNonNullableUnit: isNonNullableLibrary));
 
     unit.accept(new VariableResolverVisitor(
         _libraryElement, source, _typeProvider, errorListener,
diff --git a/pkg/analyzer/lib/src/dart/analysis/library_context.dart b/pkg/analyzer/lib/src/dart/analysis/library_context.dart
index 44f61a4..0be1dab 100644
--- a/pkg/analyzer/lib/src/dart/analysis/library_context.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/library_context.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -6,7 +6,6 @@
 import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/element/element.dart'
     show CompilationUnitElement, LibraryElement;
-import 'package:analyzer/src/context/context.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';
@@ -43,7 +42,7 @@
   /// We use it as an approximation for the heap size of elements.
   int _linkedDataInBytes = 0;
 
-  AnalysisContextImpl analysisContext;
+  RestrictedAnalysisContext analysisContext;
   SummaryResynthesizer resynthesizer;
   InheritanceManager2 inheritanceManager;
 
@@ -63,18 +62,19 @@
       store.addStore(externalSummaries);
     }
 
-    // Fill the store with summaries required for the initial library.
-    load(targetLibrary);
-
     analysisContext = new RestrictedAnalysisContext(
       analysisOptions,
       declaredVariables,
       sourceFactory,
     );
 
-    var provider = new InputPackagesResultProvider(analysisContext, store,
-        session: session);
-    resynthesizer = provider.resynthesizer;
+    // Fill the store with summaries required for the initial library.
+    load(targetLibrary);
+
+    resynthesizer = new StoreBasedSummaryResynthesizer(
+        analysisContext, session, sourceFactory, true, store);
+    analysisContext.typeProvider = resynthesizer.typeProvider;
+    resynthesizer.finishCoreAsyncLibraries();
 
     inheritanceManager = new InheritanceManager2(analysisContext.typeSystem);
   }
@@ -173,7 +173,7 @@
       }, (String uri) {
         UnlinkedUnit unlinkedUnit = store.unlinkedMap[uri];
         return unlinkedUnit;
-      }, (_) => null);
+      }, DeclaredVariables(), analysisContext.analysisOptions);
       logger.writeln('Linked ${linkedLibraries.length} libraries.');
     });
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/library_graph.dart b/pkg/analyzer/lib/src/dart/analysis/library_graph.dart
index 74cb08c..7b0bcaf 100644
--- a/pkg/analyzer/lib/src/dart/analysis/library_graph.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/library_graph.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/performance_logger.dart b/pkg/analyzer/lib/src/dart/analysis/performance_logger.dart
index 47af4cd..6c265db 100644
--- a/pkg/analyzer/lib/src/dart/analysis/performance_logger.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/performance_logger.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/referenced_names.dart b/pkg/analyzer/lib/src/dart/analysis/referenced_names.dart
index 9148fef..ab09542 100644
--- a/pkg/analyzer/lib/src/dart/analysis/referenced_names.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/referenced_names.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/analysis/results.dart b/pkg/analyzer/lib/src/dart/analysis/results.dart
index fd50c1c..b38336b 100644
--- a/pkg/analyzer/lib/src/dart/analysis/results.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/results.dart
@@ -5,10 +5,10 @@
 import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/source/line_info.dart';
-import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/generated/resolver.dart';
 
 abstract class AnalysisResultImpl implements AnalysisResult {
@@ -137,9 +137,11 @@
       return null;
     }
 
-    var locator = NodeLocator2(element.nameOffset);
-    var node = locator.searchWithin(unitResult.unit)?.parent;
-    return ElementDeclarationResultImpl(element, node, unitResult, null);
+    var locator = _DeclarationByElementLocator(element);
+    unitResult.unit.accept(locator);
+    var declaration = locator.result;
+
+    return ElementDeclarationResultImpl(element, declaration, unitResult, null);
   }
 }
 
@@ -206,9 +208,11 @@
       return null;
     }
 
-    var locator = NodeLocator2(element.nameOffset);
-    var node = locator.searchWithin(unitResult.unit)?.parent;
-    return ElementDeclarationResultImpl(element, node, null, unitResult);
+    var locator = _DeclarationByElementLocator(element);
+    unitResult.unit.accept(locator);
+    var declaration = locator.result;
+
+    return ElementDeclarationResultImpl(element, declaration, null, unitResult);
   }
 
   @Deprecated('This method exists temporary until AnalysisSession migration.')
@@ -294,3 +298,89 @@
   @override
   ResultState get state => ResultState.VALID;
 }
+
+class _DeclarationByElementLocator extends GeneralizingAstVisitor<void> {
+  final Element element;
+  AstNode result;
+
+  _DeclarationByElementLocator(this.element);
+
+  @override
+  void visitNode(AstNode node) {
+    if (result != null) return;
+
+    if (element is ClassElement) {
+      if (node is ClassOrMixinDeclaration) {
+        if (_hasOffset(node.name)) {
+          result = node;
+        }
+      } else if (node is ClassTypeAlias) {
+        if (_hasOffset(node.name)) {
+          result = node;
+        }
+      } else if (node is EnumDeclaration) {
+        if (_hasOffset(node.name)) {
+          result = node;
+        }
+      }
+    } else if (element is ConstructorElement) {
+      if (node is ConstructorDeclaration) {
+        if (node.name != null) {
+          if (_hasOffset(node.name)) {
+            result = node;
+          }
+        } else {
+          if (_hasOffset(node.returnType)) {
+            result = node;
+          }
+        }
+      }
+    } else if (element is FieldElement) {
+      if (node is EnumConstantDeclaration) {
+        if (_hasOffset(node.name)) {
+          result = node;
+        }
+      } else if (node is VariableDeclaration) {
+        if (_hasOffset(node.name)) {
+          result = node;
+        }
+      }
+    } else if (element is FunctionElement) {
+      if (node is FunctionDeclaration && _hasOffset(node.name)) {
+        result = node;
+      }
+    } else if (element is LocalVariableElement) {
+      if (node is VariableDeclaration && _hasOffset(node.name)) {
+        result = node;
+      }
+    } else if (element is MethodElement) {
+      if (node is MethodDeclaration && _hasOffset(node.name)) {
+        result = node;
+      }
+    } else if (element is ParameterElement) {
+      if (node is FormalParameter && _hasOffset(node.identifier)) {
+        result = node;
+      }
+    } else if (element is PropertyAccessorElement) {
+      if (node is FunctionDeclaration) {
+        if (_hasOffset(node.name)) {
+          result = node;
+        }
+      } else if (node is MethodDeclaration) {
+        if (_hasOffset(node.name)) {
+          result = node;
+        }
+      }
+    } else if (element is TopLevelVariableElement) {
+      if (node is VariableDeclaration && _hasOffset(node.name)) {
+        result = node;
+      }
+    }
+
+    super.visitNode(node);
+  }
+
+  bool _hasOffset(AstNode node) {
+    return node?.offset == element.nameOffset;
+  }
+}
diff --git a/pkg/analyzer/lib/src/dart/analysis/top_level_declaration.dart b/pkg/analyzer/lib/src/dart/analysis/top_level_declaration.dart
index b32e636..1658aad 100644
--- a/pkg/analyzer/lib/src/dart/analysis/top_level_declaration.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/top_level_declaration.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/ast/ast.dart b/pkg/analyzer/lib/src/dart/ast/ast.dart
index 93bfdfd..676b8dc 100644
--- a/pkg/analyzer/lib/src/dart/ast/ast.dart
+++ b/pkg/analyzer/lib/src/dart/ast/ast.dart
@@ -6,6 +6,7 @@
 import 'dart:math' as math;
 
 import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/precedence.dart';
 import 'package:analyzer/dart/ast/syntactic_entity.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/element/element.dart';
@@ -26,28 +27,23 @@
 import 'package:analyzer/src/generated/parser.dart';
 import 'package:analyzer/src/generated/source.dart' show LineInfo, Source;
 import 'package:analyzer/src/generated/utilities_dart.dart';
+import 'package:pub_semver/src/version.dart';
 
-/**
- * Two or more string literals that are implicitly concatenated because of being
- * adjacent (separated only by whitespace).
- *
- * While the grammar only allows adjacent strings when all of the strings are of
- * the same kind (single line or multi-line), this class doesn't enforce that
- * restriction.
- *
- *    adjacentStrings ::=
- *        [StringLiteral] [StringLiteral]+
- */
+/// Two or more string literals that are implicitly concatenated because of
+/// being adjacent (separated only by whitespace).
+///
+/// While the grammar only allows adjacent strings when all of the strings are
+/// of the same kind (single line or multi-line), this class doesn't enforce
+/// that restriction.
+///
+///    adjacentStrings ::=
+///        [StringLiteral] [StringLiteral]+
 class AdjacentStringsImpl extends StringLiteralImpl implements AdjacentStrings {
-  /**
-   * The strings that are implicitly concatenated.
-   */
+  /// The strings that are implicitly concatenated.
   NodeList<StringLiteral> _strings;
 
-  /**
-   * Initialize a newly created list of adjacent strings. To be syntactically
-   * valid, the list of [strings] must contain at least two elements.
-   */
+  /// Initialize a newly created list of adjacent strings. To be syntactically
+  /// valid, the list of [strings] must contain at least two elements.
   AdjacentStringsImpl(List<StringLiteral> strings) {
     _strings = new NodeListImpl<StringLiteral>(this, strings);
   }
@@ -83,27 +79,19 @@
   }
 }
 
-/**
- * An AST node that can be annotated with both a documentation comment and a
- * list of annotations.
- */
+/// An AST node that can be annotated with both a documentation comment and a
+/// list of annotations.
 abstract class AnnotatedNodeImpl extends AstNodeImpl implements AnnotatedNode {
-  /**
-   * The documentation comment associated with this node, or `null` if this node
-   * does not have a documentation comment associated with it.
-   */
+  /// The documentation comment associated with this node, or `null` if this
+  /// node does not have a documentation comment associated with it.
   CommentImpl _comment;
 
-  /**
-   * The annotations associated with this node.
-   */
+  /// The annotations associated with this node.
   NodeList<Annotation> _metadata;
 
-  /**
-   * Initialize a newly created annotated node. Either or both of the [comment]
-   * and [metadata] can be `null` if the node does not have the corresponding
-   * attribute.
-   */
+  /// Initialize a newly created annotated node. Either or both of the [comment]
+  /// and [metadata] can be `null` if the node does not have the corresponding
+  /// attribute.
   AnnotatedNodeImpl(CommentImpl comment, List<Annotation> metadata) {
     _comment = _becomeParentOf(comment);
     _metadata = new NodeListImpl<Annotation>(this, metadata);
@@ -146,9 +134,7 @@
       ..sort(AstNode.LEXICAL_ORDER);
   }
 
-  /**
-   * Return a holder of child entities that subclasses can add to.
-   */
+  /// Return a holder of child entities that subclasses can add to.
   ChildEntities get _childEntities {
     ChildEntities result = new ChildEntities();
     if (_commentIsBeforeAnnotations()) {
@@ -175,11 +161,9 @@
     }
   }
 
-  /**
-   * Return `true` if there are no annotations before the comment. Note that a
-   * result of `true` does not imply that there is a comment, nor that there are
-   * annotations associated with this node.
-   */
+  /// Return `true` if there are no annotations before the comment. Note that a
+  /// result of `true` does not imply that there is a comment, nor that there
+  /// are annotations associated with this node.
   bool _commentIsBeforeAnnotations() {
     if (_comment == null || _metadata.isEmpty) {
       return true;
@@ -189,65 +173,48 @@
   }
 }
 
-/**
- * An annotation that can be associated with an AST node.
- *
- *    metadata ::=
- *        annotation*
- *
- *    annotation ::=
- *        '@' [Identifier] ('.' [SimpleIdentifier])? [ArgumentList]?
- */
+/// An annotation that can be associated with an AST node.
+///
+///    metadata ::=
+///        annotation*
+///
+///    annotation ::=
+///        '@' [Identifier] ('.' [SimpleIdentifier])? [ArgumentList]?
 class AnnotationImpl extends AstNodeImpl implements Annotation {
-  /**
-   * The at sign that introduced the annotation.
-   */
+  /// The at sign that introduced the annotation.
   @override
   Token atSign;
 
-  /**
-   * The name of the class defining the constructor that is being invoked or the
-   * name of the field that is being referenced.
-   */
+  /// The name of the class defining the constructor that is being invoked or
+  /// the name of the field that is being referenced.
   IdentifierImpl _name;
 
-  /**
-   * The period before the constructor name, or `null` if this annotation is not
-   * the invocation of a named constructor.
-   */
+  /// The period before the constructor name, or `null` if this annotation is
+  /// not the invocation of a named constructor.
   @override
   Token period;
 
-  /**
-   * The name of the constructor being invoked, or `null` if this annotation is
-   * not the invocation of a named constructor.
-   */
+  /// The name of the constructor being invoked, or `null` if this annotation is
+  /// not the invocation of a named constructor.
   SimpleIdentifierImpl _constructorName;
 
-  /**
-   * The arguments to the constructor being invoked, or `null` if this
-   * annotation is not the invocation of a constructor.
-   */
+  /// The arguments to the constructor being invoked, or `null` if this
+  /// annotation is not the invocation of a constructor.
   ArgumentListImpl _arguments;
 
-  /**
-   * The element associated with this annotation, or `null` if the AST structure
-   * has not been resolved or if this annotation could not be resolved.
-   */
+  /// The element associated with this annotation, or `null` if the AST
+  /// structure has not been resolved or if this annotation could not be
+  /// resolved.
   Element _element;
 
-  /**
-   * The element annotation representing this annotation in the element model.
-   */
+  /// The element annotation representing this annotation in the element model.
   @override
   ElementAnnotation elementAnnotation;
 
-  /**
-   * Initialize a newly created annotation. Both the [period] and the
-   * [constructorName] can be `null` if the annotation is not referencing a
-   * named constructor. The [arguments] can be `null` if the annotation is not
-   * referencing a constructor.
-   */
+  /// Initialize a newly created annotation. Both the [period] and the
+  /// [constructorName] can be `null` if the annotation is not referencing a
+  /// named constructor. The [arguments] can be `null` if the annotation is not
+  /// referencing a constructor.
   AnnotationImpl(this.atSign, IdentifierImpl name, this.period,
       SimpleIdentifierImpl constructorName, ArgumentListImpl arguments) {
     _name = _becomeParentOf(name);
@@ -326,49 +293,37 @@
   }
 }
 
-/**
- * A list of arguments in the invocation of an executable element (that is, a
- * function, method, or constructor).
- *
- *    argumentList ::=
- *        '(' arguments? ')'
- *
- *    arguments ::=
- *        [NamedExpression] (',' [NamedExpression])*
- *      | [Expression] (',' [Expression])* (',' [NamedExpression])*
- */
+/// A list of arguments in the invocation of an executable element (that is, a
+/// function, method, or constructor).
+///
+///    argumentList ::=
+///        '(' arguments? ')'
+///
+///    arguments ::=
+///        [NamedExpression] (',' [NamedExpression])*
+///      | [Expression] (',' [Expression])* (',' [NamedExpression])*
 class ArgumentListImpl extends AstNodeImpl implements ArgumentList {
-  /**
-   * The left parenthesis.
-   */
+  /// The left parenthesis.
   @override
   Token leftParenthesis;
 
-  /**
-   * The expressions producing the values of the arguments.
-   */
+  /// The expressions producing the values of the arguments.
   NodeList<Expression> _arguments;
 
-  /**
-   * The right parenthesis.
-   */
+  /// The right parenthesis.
   @override
   Token rightParenthesis;
 
-  /**
-   * A list containing the elements representing the parameters corresponding to
-   * each of the arguments in this list, or `null` if the AST has not been
-   * resolved or if the function or method being invoked could not be determined
-   * based on static type information. The list must be the same length as the
-   * number of arguments, but can contain `null` entries if a given argument
-   * does not correspond to a formal parameter.
-   */
+  /// A list containing the elements representing the parameters corresponding
+  /// to each of the arguments in this list, or `null` if the AST has not been
+  /// resolved or if the function or method being invoked could not be
+  /// determined based on static type information. The list must be the same
+  /// length as the number of arguments, but can contain `null` entries if a
+  /// given argument does not correspond to a formal parameter.
   List<ParameterElement> _correspondingStaticParameters;
 
-  /**
-   * Initialize a newly created list of arguments. The list of [arguments] can
-   * be `null` if there are no arguments.
-   */
+  /// Initialize a newly created list of arguments. The list of [arguments] can
+  /// be `null` if there are no arguments.
   ArgumentListImpl(
       this.leftParenthesis, List<Expression> arguments, this.rightParenthesis) {
     _arguments = new NodeListImpl<Expression>(this, arguments);
@@ -423,16 +378,15 @@
     _arguments.accept(visitor);
   }
 
-  /**
-   * If
-   * * the given [expression] is a child of this list,
-   * * the AST structure has been resolved,
-   * * the function being invoked is known based on static type information, and
-   * * the expression corresponds to one of the parameters of the function being
-   *   invoked,
-   * then return the parameter element representing the parameter to which the
-   * value of the given expression will be bound. Otherwise, return `null`.
-   */
+  /// If
+  /// * the given [expression] is a child of this list,
+  /// * the AST structure has been resolved,
+  /// * the function being invoked is known based on static type information,
+  ///   and
+  /// * the expression corresponds to one of the parameters of the function
+  ///   being invoked,
+  /// then return the parameter element representing the parameter to which the
+  /// value of the given expression will be bound. Otherwise, return `null`.
   ParameterElement _getStaticParameterElementFor(Expression expression) {
     if (_correspondingStaticParameters == null ||
         _correspondingStaticParameters.length != _arguments.length) {
@@ -450,32 +404,22 @@
   }
 }
 
-/**
- * An as expression.
- *
- *    asExpression ::=
- *        [Expression] 'as' [TypeName]
- */
+/// An as expression.
+///
+///    asExpression ::=
+///        [Expression] 'as' [TypeName]
 class AsExpressionImpl extends ExpressionImpl implements AsExpression {
-  /**
-   * The expression used to compute the value being cast.
-   */
+  /// The expression used to compute the value being cast.
   ExpressionImpl _expression;
 
-  /**
-   * The 'as' operator.
-   */
+  /// The 'as' operator.
   @override
   Token asOperator;
 
-  /**
-   * The type being cast to.
-   */
+  /// The type being cast to.
   TypeAnnotationImpl _type;
 
-  /**
-   * Initialize a newly created as expression.
-   */
+  /// Initialize a newly created as expression.
   AsExpressionImpl(
       ExpressionImpl expression, this.asOperator, TypeAnnotationImpl type) {
     _expression = _becomeParentOf(expression);
@@ -501,7 +445,7 @@
   }
 
   @override
-  int get precedence => 7;
+  Precedence get precedence => Precedence.relational;
 
   @override
   TypeAnnotation get type => _type;
@@ -521,12 +465,10 @@
   }
 }
 
-/**
- * An assert in the initializer list of a constructor.
- *
- *    assertInitializer ::=
- *        'assert' '(' [Expression] (',' [Expression])? ')'
- */
+/// An assert in the initializer list of a constructor.
+///
+///    assertInitializer ::=
+///        'assert' '(' [Expression] (',' [Expression])? ')'
 class AssertInitializerImpl extends ConstructorInitializerImpl
     implements AssertInitializer {
   @override
@@ -535,26 +477,20 @@
   @override
   Token leftParenthesis;
 
-  /**
-   * The condition that is being asserted to be `true`.
-   */
+  /// The condition that is being asserted to be `true`.
   ExpressionImpl _condition;
 
   @override
   Token comma;
 
-  /**
-   * The message to report if the assertion fails, or `null` if no message was
-   * supplied.
-   */
+  /// The message to report if the assertion fails, or `null` if no message was
+  /// supplied.
   ExpressionImpl _message;
 
   @override
   Token rightParenthesis;
 
-  /**
-   * Initialize a newly created assert initializer.
-   */
+  /// Initialize a newly created assert initializer.
   AssertInitializerImpl(
       this.assertKeyword,
       this.leftParenthesis,
@@ -607,12 +543,10 @@
   }
 }
 
-/**
- * An assert statement.
- *
- *    assertStatement ::=
- *        'assert' '(' [Expression] ')' ';'
- */
+/// An assert statement.
+///
+///    assertStatement ::=
+///        'assert' '(' [Expression] ')' ';'
 class AssertStatementImpl extends StatementImpl implements AssertStatement {
   @override
   Token assertKeyword;
@@ -620,18 +554,14 @@
   @override
   Token leftParenthesis;
 
-  /**
-   * The condition that is being asserted to be `true`.
-   */
+  /// The condition that is being asserted to be `true`.
   ExpressionImpl _condition;
 
   @override
   Token comma;
 
-  /**
-   * The message to report if the assertion fails, or `null` if no message was
-   * supplied.
-   */
+  /// The message to report if the assertion fails, or `null` if no message was
+  /// supplied.
   ExpressionImpl _message;
 
   @override
@@ -640,9 +570,7 @@
   @override
   Token semicolon;
 
-  /**
-   * Initialize a newly created assert statement.
-   */
+  /// Initialize a newly created assert statement.
   AssertStatementImpl(
       this.assertKeyword,
       this.leftParenthesis,
@@ -697,42 +625,30 @@
   }
 }
 
-/**
- * An assignment expression.
- *
- *    assignmentExpression ::=
- *        [Expression] operator [Expression]
- */
+/// An assignment expression.
+///
+///    assignmentExpression ::=
+///        [Expression] operator [Expression]
 class AssignmentExpressionImpl extends ExpressionImpl
     implements AssignmentExpression {
-  /**
-   * The expression used to compute the left hand side.
-   */
+  /// The expression used to compute the left hand side.
   ExpressionImpl _leftHandSide;
 
-  /**
-   * The assignment operator being applied.
-   */
+  /// The assignment operator being applied.
   @override
   Token operator;
 
-  /**
-   * The expression used to compute the right hand side.
-   */
+  /// The expression used to compute the right hand side.
   ExpressionImpl _rightHandSide;
 
-  /**
-   * The element associated with the operator based on the static type of the
-   * left-hand-side, or `null` if the AST structure has not been resolved, if
-   * the operator is not a compound operator, or if the operator could not be
-   * resolved.
-   */
+  /// The element associated with the operator based on the static type of the
+  /// left-hand-side, or `null` if the AST structure has not been resolved, if
+  /// the operator is not a compound operator, or if the operator could not be
+  /// resolved.
   @override
   MethodElement staticElement;
 
-  /**
-   * Initialize a newly created assignment expression.
-   */
+  /// Initialize a newly created assignment expression.
   AssignmentExpressionImpl(ExpressionImpl leftHandSide, this.operator,
       ExpressionImpl rightHandSide) {
     if (leftHandSide == null || rightHandSide == null) {
@@ -778,7 +694,7 @@
   }
 
   @override
-  int get precedence => 1;
+  Precedence get precedence => Precedence.assignment;
 
   @deprecated
   @override
@@ -796,12 +712,10 @@
     _rightHandSide = _becomeParentOf(expression as ExpressionImpl);
   }
 
-  /**
-   * If the AST structure has been resolved, and the function being invoked is
-   * known based on static type information, then return the parameter element
-   * representing the parameter to which the value of the right operand will be
-   * bound. Otherwise, return `null`.
-   */
+  /// If the AST structure has been resolved, and the function being invoked is
+  /// known based on static type information, then return the parameter element
+  /// representing the parameter to which the value of the right operand will be
+  /// bound. Otherwise, return `null`.
   ParameterElement get _staticParameterElementForRightHandSide {
     ExecutableElement executableElement = null;
     if (staticElement != null) {
@@ -840,20 +754,14 @@
   }
 }
 
-/**
- * A node in the AST structure for a Dart program.
- */
+/// A node in the AST structure for a Dart program.
 abstract class AstNodeImpl implements AstNode {
-  /**
-   * The parent of the node, or `null` if the node is the root of an AST
-   * structure.
-   */
+  /// The parent of the node, or `null` if the node is the root of an AST
+  /// structure.
   AstNode _parent;
 
-  /**
-   * A table mapping the names of properties to their values, or `null` if this
-   * node does not have any properties associated with it.
-   */
+  /// A table mapping the names of properties to their values, or `null` if this
+  /// node does not have any properties associated with it.
   Map<String, Object> _propertyMap;
 
   @override
@@ -957,9 +865,8 @@
   @override
   String toString() => toSource();
 
-  /**
-   * Make this node the parent of the given [child] node. Return the child node.
-   */
+  /// Make this node the parent of the given [child] node. Return the child
+  /// node.
   T _becomeParentOf<T extends AstNodeImpl>(T child) {
     if (child != null) {
       child._parent = this;
@@ -968,27 +875,19 @@
   }
 }
 
-/**
- * An await expression.
- *
- *    awaitExpression ::=
- *        'await' [Expression]
- */
+/// An await expression.
+///
+///    awaitExpression ::=
+///        'await' [Expression]
 class AwaitExpressionImpl extends ExpressionImpl implements AwaitExpression {
-  /**
-   * The 'await' keyword.
-   */
+  /// The 'await' keyword.
   @override
   Token awaitKeyword;
 
-  /**
-   * The expression whose value is being waited on.
-   */
+  /// The expression whose value is being waited on.
   ExpressionImpl _expression;
 
-  /**
-   * Initialize a newly created await expression.
-   */
+  /// Initialize a newly created await expression.
   AwaitExpressionImpl(this.awaitKeyword, ExpressionImpl expression) {
     _expression = _becomeParentOf(expression);
   }
@@ -1017,7 +916,7 @@
   }
 
   @override
-  int get precedence => 14;
+  Precedence get precedence => Precedence.prefix;
 
   @override
   E accept<E>(AstVisitor<E> visitor) => visitor.visitAwaitExpression(this);
@@ -1028,43 +927,31 @@
   }
 }
 
-/**
- * A binary (infix) expression.
- *
- *    binaryExpression ::=
- *        [Expression] [Token] [Expression]
- */
+/// A binary (infix) expression.
+///
+///    binaryExpression ::=
+///        [Expression] [Token] [Expression]
 class BinaryExpressionImpl extends ExpressionImpl implements BinaryExpression {
-  /**
-   * The expression used to compute the left operand.
-   */
+  /// The expression used to compute the left operand.
   ExpressionImpl _leftOperand;
 
-  /**
-   * The binary operator being applied.
-   */
+  /// The binary operator being applied.
   @override
   Token operator;
 
-  /**
-   * The expression used to compute the right operand.
-   */
+  /// The expression used to compute the right operand.
   ExpressionImpl _rightOperand;
 
-  /**
-   * The element associated with the operator based on the static type of the
-   * left operand, or `null` if the AST structure has not been resolved, if the
-   * operator is not user definable, or if the operator could not be resolved.
-   */
+  /// The element associated with the operator based on the static type of the
+  /// left operand, or `null` if the AST structure has not been resolved, if the
+  /// operator is not user definable, or if the operator could not be resolved.
   @override
   MethodElement staticElement;
 
   @override
   FunctionType staticInvokeType;
 
-  /**
-   * Initialize a newly created binary expression.
-   */
+  /// Initialize a newly created binary expression.
   BinaryExpressionImpl(
       ExpressionImpl leftOperand, this.operator, ExpressionImpl rightOperand) {
     _leftOperand = _becomeParentOf(leftOperand);
@@ -1094,7 +981,7 @@
   }
 
   @override
-  int get precedence => operator.type.precedence;
+  Precedence get precedence => Precedence.forTokenType(operator.type);
 
   @deprecated
   @override
@@ -1122,39 +1009,29 @@
   }
 }
 
-/**
- * A function body that consists of a block of statements.
- *
- *    blockFunctionBody ::=
- *        ('async' | 'async' '*' | 'sync' '*')? [Block]
- */
+/// A function body that consists of a block of statements.
+///
+///    blockFunctionBody ::=
+///        ('async' | 'async' '*' | 'sync' '*')? [Block]
 class BlockFunctionBodyImpl extends FunctionBodyImpl
     implements BlockFunctionBody {
-  /**
-   * The token representing the 'async' or 'sync' keyword, or `null` if there is
-   * no such keyword.
-   */
+  /// The token representing the 'async' or 'sync' keyword, or `null` if there
+  /// is no such keyword.
   @override
   Token keyword;
 
-  /**
-   * The star optionally following the 'async' or 'sync' keyword, or `null` if
-   * there is wither no such keyword or no star.
-   */
+  /// The star optionally following the 'async' or 'sync' keyword, or `null` if
+  /// there is wither no such keyword or no star.
   @override
   Token star;
 
-  /**
-   * The block representing the body of the function.
-   */
+  /// The block representing the body of the function.
   BlockImpl _block;
 
-  /**
-   * Initialize a newly created function body consisting of a block of
-   * statements. The [keyword] can be `null` if there is no keyword specified
-   * for the block. The [star] can be `null` if there is no star following the
-   * keyword (and must be `null` if there is no keyword).
-   */
+  /// Initialize a newly created function body consisting of a block of
+  /// statements. The [keyword] can be `null` if there is no keyword specified
+  /// for the block. The [star] can be `null` if there is no star following the
+  /// keyword (and must be `null` if there is no keyword).
   BlockFunctionBodyImpl(this.keyword, this.star, BlockImpl block) {
     _block = _becomeParentOf(block);
   }
@@ -1200,33 +1077,23 @@
   }
 }
 
-/**
- * A sequence of statements.
- *
- *    block ::=
- *        '{' statement* '}'
- */
+/// A sequence of statements.
+///
+///    block ::=
+///        '{' statement* '}'
 class BlockImpl extends StatementImpl implements Block {
-  /**
-   * The left curly bracket.
-   */
+  /// The left curly bracket.
   @override
   Token leftBracket;
 
-  /**
-   * The statements contained in the block.
-   */
+  /// The statements contained in the block.
   NodeList<Statement> _statements;
 
-  /**
-   * The right curly bracket.
-   */
+  /// The right curly bracket.
   @override
   Token rightBracket;
 
-  /**
-   * Initialize a newly created block of code.
-   */
+  /// Initialize a newly created block of code.
   BlockImpl(this.leftBracket, List<Statement> statements, this.rightBracket) {
     _statements = new NodeListImpl<Statement>(this, statements);
   }
@@ -1255,28 +1122,20 @@
   }
 }
 
-/**
- * A boolean literal expression.
- *
- *    booleanLiteral ::=
- *        'false' | 'true'
- */
+/// A boolean literal expression.
+///
+///    booleanLiteral ::=
+///        'false' | 'true'
 class BooleanLiteralImpl extends LiteralImpl implements BooleanLiteral {
-  /**
-   * The token representing the literal.
-   */
+  /// The token representing the literal.
   @override
   Token literal;
 
-  /**
-   * The value of the literal.
-   */
+  /// The value of the literal.
   @override
   bool value = false;
 
-  /**
-   * Initialize a newly created boolean literal.
-   */
+  /// Initialize a newly created boolean literal.
   BooleanLiteralImpl(this.literal, this.value);
 
   @override
@@ -1301,46 +1160,34 @@
   }
 }
 
-/**
- * A break statement.
- *
- *    breakStatement ::=
- *        'break' [SimpleIdentifier]? ';'
- */
+/// A break statement.
+///
+///    breakStatement ::=
+///        'break' [SimpleIdentifier]? ';'
 class BreakStatementImpl extends StatementImpl implements BreakStatement {
-  /**
-   * The token representing the 'break' keyword.
-   */
+  /// The token representing the 'break' keyword.
   @override
   Token breakKeyword;
 
-  /**
-   * The label associated with the statement, or `null` if there is no label.
-   */
+  /// The label associated with the statement, or `null` if there is no label.
   SimpleIdentifierImpl _label;
 
-  /**
-   * The semicolon terminating the statement.
-   */
+  /// The semicolon terminating the statement.
   @override
   Token semicolon;
 
-  /**
-   * The AstNode which this break statement is breaking from.  This will be
-   * either a [Statement] (in the case of breaking out of a loop), a
-   * [SwitchMember] (in the case of a labeled break statement whose label
-   * matches a label on a switch case in an enclosing switch statement), or
-   * `null` if the AST has not yet been resolved or if the target could not be
-   * resolved. Note that if the source code has errors, the target might be
-   * invalid (e.g. trying to break to a switch case).
-   */
+  /// The AstNode which this break statement is breaking from.  This will be
+  /// either a [Statement] (in the case of breaking out of a loop), a
+  /// [SwitchMember] (in the case of a labeled break statement whose label
+  /// matches a label on a switch case in an enclosing switch statement), or
+  /// `null` if the AST has not yet been resolved or if the target could not be
+  /// resolved. Note that if the source code has errors, the target might be
+  /// invalid (e.g. trying to break to a switch case).
   @override
   AstNode target;
 
-  /**
-   * Initialize a newly created break statement. The [label] can be `null` if
-   * there is no label associated with the statement.
-   */
+  /// Initialize a newly created break statement. The [label] can be `null` if
+  /// there is no label associated with the statement.
   BreakStatementImpl(
       this.breakKeyword, SimpleIdentifierImpl label, this.semicolon) {
     _label = _becomeParentOf(label);
@@ -1373,38 +1220,30 @@
   }
 }
 
-/**
- * A sequence of cascaded expressions: expressions that share a common target.
- * There are three kinds of expressions that can be used in a cascade
- * expression: [IndexExpression], [MethodInvocation] and [PropertyAccess].
- *
- *    cascadeExpression ::=
- *        [Expression] cascadeSection*
- *
- *    cascadeSection ::=
- *        '..'  (cascadeSelector arguments*) (assignableSelector arguments*)*
- *        (assignmentOperator expressionWithoutCascade)?
- *
- *    cascadeSelector ::=
- *        '[ ' expression '] '
- *      | identifier
- */
+/// A sequence of cascaded expressions: expressions that share a common target.
+/// There are three kinds of expressions that can be used in a cascade
+/// expression: [IndexExpression], [MethodInvocation] and [PropertyAccess].
+///
+///    cascadeExpression ::=
+///        [Expression] cascadeSection*
+///
+///    cascadeSection ::=
+///        '..'  (cascadeSelector arguments*) (assignableSelector arguments*)*
+///        (assignmentOperator expressionWithoutCascade)?
+///
+///    cascadeSelector ::=
+///        '[ ' expression '] '
+///      | identifier
 class CascadeExpressionImpl extends ExpressionImpl
     implements CascadeExpression {
-  /**
-   * The target of the cascade sections.
-   */
+  /// The target of the cascade sections.
   ExpressionImpl _target;
 
-  /**
-   * The cascade sections sharing the common target.
-   */
+  /// The cascade sections sharing the common target.
   NodeList<Expression> _cascadeSections;
 
-  /**
-   * Initialize a newly created cascade expression. The list of
-   * [cascadeSections] must contain at least one element.
-   */
+  /// Initialize a newly created cascade expression. The list of
+  /// [cascadeSections] must contain at least one element.
   CascadeExpressionImpl(
       ExpressionImpl target, List<Expression> cascadeSections) {
     _target = _becomeParentOf(target);
@@ -1426,7 +1265,7 @@
   Token get endToken => _cascadeSections.endToken;
 
   @override
-  int get precedence => 2;
+  Precedence get precedence => Precedence.cascade;
 
   @override
   Expression get target => _target;
@@ -1446,79 +1285,57 @@
   }
 }
 
-/**
- * A catch clause within a try statement.
- *
- *    onPart ::=
- *        catchPart [Block]
- *      | 'on' type catchPart? [Block]
- *
- *    catchPart ::=
- *        'catch' '(' [SimpleIdentifier] (',' [SimpleIdentifier])? ')'
- */
+/// A catch clause within a try statement.
+///
+///    onPart ::=
+///        catchPart [Block]
+///      | 'on' type catchPart? [Block]
+///
+///    catchPart ::=
+///        'catch' '(' [SimpleIdentifier] (',' [SimpleIdentifier])? ')'
 class CatchClauseImpl extends AstNodeImpl implements CatchClause {
-  /**
-   * The token representing the 'on' keyword, or `null` if there is no 'on'
-   * keyword.
-   */
+  /// The token representing the 'on' keyword, or `null` if there is no 'on'
+  /// keyword.
   @override
   Token onKeyword;
 
-  /**
-   * The type of exceptions caught by this catch clause, or `null` if this catch
-   * clause catches every type of exception.
-   */
+  /// The type of exceptions caught by this catch clause, or `null` if this
+  /// catch clause catches every type of exception.
   TypeAnnotationImpl _exceptionType;
 
-  /**
-   * The token representing the 'catch' keyword, or `null` if there is no
-   * 'catch' keyword.
-   */
+  /// The token representing the 'catch' keyword, or `null` if there is no
+  /// 'catch' keyword.
   @override
   Token catchKeyword;
 
-  /**
-   * The left parenthesis, or `null` if there is no 'catch' keyword.
-   */
+  /// The left parenthesis, or `null` if there is no 'catch' keyword.
   @override
   Token leftParenthesis;
 
-  /**
-   * The parameter whose value will be the exception that was thrown, or `null`
-   * if there is no 'catch' keyword.
-   */
+  /// The parameter whose value will be the exception that was thrown, or `null`
+  /// if there is no 'catch' keyword.
   SimpleIdentifierImpl _exceptionParameter;
 
-  /**
-   * The comma separating the exception parameter from the stack trace
-   * parameter, or `null` if there is no stack trace parameter.
-   */
+  /// The comma separating the exception parameter from the stack trace
+  /// parameter, or `null` if there is no stack trace parameter.
   @override
   Token comma;
 
-  /**
-   * The parameter whose value will be the stack trace associated with the
-   * exception, or `null` if there is no stack trace parameter.
-   */
+  /// The parameter whose value will be the stack trace associated with the
+  /// exception, or `null` if there is no stack trace parameter.
   SimpleIdentifierImpl _stackTraceParameter;
 
-  /**
-   * The right parenthesis, or `null` if there is no 'catch' keyword.
-   */
+  /// The right parenthesis, or `null` if there is no 'catch' keyword.
   @override
   Token rightParenthesis;
 
-  /**
-   * The body of the catch block.
-   */
+  /// The body of the catch block.
   BlockImpl _body;
 
-  /**
-   * Initialize a newly created catch clause. The [onKeyword] and
-   * [exceptionType] can be `null` if the clause will catch all exceptions. The
-   * [comma] and [stackTraceParameter] can be `null` if the stack trace
-   * parameter is not defined.
-   */
+  /// Initialize a newly created catch clause. The [onKeyword] and
+  /// [exceptionType] can be `null` if the clause will catch all exceptions. The
+  /// [comma] and [stackTraceParameter] can be `null` if the stack trace
+  /// parameter is not defined.
   CatchClauseImpl(
       this.onKeyword,
       TypeAnnotationImpl exceptionType,
@@ -1602,32 +1419,24 @@
   }
 }
 
-/**
- * Helper class to allow iteration of child entities of an AST node.
- */
+/// Helper class to allow iteration of child entities of an AST node.
 class ChildEntities
     with IterableMixin<SyntacticEntity>
     implements Iterable<SyntacticEntity> {
-  /**
-   * The list of child entities to be iterated over.
-   */
+  /// The list of child entities to be iterated over.
   List<SyntacticEntity> _entities = [];
 
   @override
   Iterator<SyntacticEntity> get iterator => _entities.iterator;
 
-  /**
-   * Add an AST node or token as the next child entity, if it is not null.
-   */
+  /// Add an AST node or token as the next child entity, if it is not null.
   void add(SyntacticEntity entity) {
     if (entity != null) {
       _entities.add(entity);
     }
   }
 
-  /**
-   * Add the given items as the next child entities, if [items] is not null.
-   */
+  /// Add the given items as the next child entities, if [items] is not null.
   void addAll(Iterable<SyntacticEntity> items) {
     if (items != null) {
       _entities.addAll(items);
@@ -1635,57 +1444,43 @@
   }
 }
 
-/**
- * The declaration of a class.
- *
- *    classDeclaration ::=
- *        'abstract'? 'class' [SimpleIdentifier] [TypeParameterList]?
- *        ([ExtendsClause] [WithClause]?)?
- *        [ImplementsClause]?
- *        '{' [ClassMember]* '}'
- */
+/// The declaration of a class.
+///
+///    classDeclaration ::=
+///        'abstract'? 'class' [SimpleIdentifier] [TypeParameterList]?
+///        ([ExtendsClause] [WithClause]?)?
+///        [ImplementsClause]?
+///        '{' [ClassMember]* '}'
 class ClassDeclarationImpl extends ClassOrMixinDeclarationImpl
     implements ClassDeclaration {
-  /**
-   * The 'abstract' keyword, or `null` if the keyword was absent.
-   */
+  /// The 'abstract' keyword, or `null` if the keyword was absent.
   @override
   Token abstractKeyword;
 
-  /**
-   * The token representing the 'class' keyword.
-   */
+  /// The token representing the 'class' keyword.
   @override
   Token classKeyword;
 
-  /**
-   * The extends clause for the class, or `null` if the class does not extend
-   * any other class.
-   */
+  /// The extends clause for the class, or `null` if the class does not extend
+  /// any other class.
   ExtendsClauseImpl _extendsClause;
 
-  /**
-   * The with clause for the class, or `null` if the class does not have a with
-   * clause.
-   */
+  /// The with clause for the class, or `null` if the class does not have a with
+  /// clause.
   WithClauseImpl _withClause;
 
-  /**
-   * The native clause for the class, or `null` if the class does not have a
-   * native clause.
-   */
+  /// The native clause for the class, or `null` if the class does not have a
+  /// native clause.
   NativeClauseImpl _nativeClause;
 
-  /**
-   * Initialize a newly created class declaration. Either or both of the
-   * [comment] and [metadata] can be `null` if the class does not have the
-   * corresponding attribute. The [abstractKeyword] can be `null` if the class
-   * is not abstract. The [typeParameters] can be `null` if the class does not
-   * have any type parameters. Any or all of the [extendsClause], [withClause],
-   * and [implementsClause] can be `null` if the class does not have the
-   * corresponding clause. The list of [members] can be `null` if the class does
-   * not have any members.
-   */
+  /// Initialize a newly created class declaration. Either or both of the
+  /// [comment] and [metadata] can be `null` if the class does not have the
+  /// corresponding attribute. The [abstractKeyword] can be `null` if the class
+  /// is not abstract. The [typeParameters] can be `null` if the class does not
+  /// have any type parameters. Any or all of the [extendsClause], [withClause],
+  /// and [implementsClause] can be `null` if the class does not have the
+  /// corresponding clause. The list of [members] can be `null` if the class
+  /// does not have any members.
   ClassDeclarationImpl(
       CommentImpl comment,
       List<Annotation> metadata,
@@ -1796,46 +1591,32 @@
   }
 }
 
-/**
- * A node that declares a name within the scope of a class.
- */
+/// A node that declares a name within the scope of a class.
 abstract class ClassMemberImpl extends DeclarationImpl implements ClassMember {
-  /**
-   * Initialize a newly created member of a class. Either or both of the
-   * [comment] and [metadata] can be `null` if the member does not have the
-   * corresponding attribute.
-   */
+  /// Initialize a newly created member of a class. Either or both of the
+  /// [comment] and [metadata] can be `null` if the member does not have the
+  /// corresponding attribute.
   ClassMemberImpl(CommentImpl comment, List<Annotation> metadata)
       : super(comment, metadata);
 }
 
 abstract class ClassOrMixinDeclarationImpl
     extends NamedCompilationUnitMemberImpl implements ClassOrMixinDeclaration {
-  /**
-   * The type parameters for the class or mixin,
-   * or `null` if the declaration does not have any type parameters.
-   */
+  /// The type parameters for the class or mixin,
+  /// or `null` if the declaration does not have any type parameters.
   TypeParameterListImpl _typeParameters;
 
-  /**
-   * The implements clause for the class or mixin,
-   * or `null` if the declaration does not implement any interfaces.
-   */
+  /// The implements clause for the class or mixin,
+  /// or `null` if the declaration does not implement any interfaces.
   ImplementsClauseImpl _implementsClause;
 
-  /**
-   * The left curly bracket.
-   */
+  /// The left curly bracket.
   Token leftBracket;
 
-  /**
-   * The members defined by the class or mixin.
-   */
+  /// The members defined by the class or mixin.
   NodeList<ClassMember> _members;
 
-  /**
-   * The right curly bracket.
-   */
+  /// The right curly bracket.
   Token rightBracket;
 
   ClassOrMixinDeclarationImpl(
@@ -1907,59 +1688,44 @@
   }
 }
 
-/**
- * A class type alias.
- *
- *    classTypeAlias ::=
- *        [SimpleIdentifier] [TypeParameterList]? '=' 'abstract'? mixinApplication
- *
- *    mixinApplication ::=
- *        [TypeName] [WithClause] [ImplementsClause]? ';'
- */
+/// A class type alias.
+///
+///    classTypeAlias ::=
+///        [SimpleIdentifier] [TypeParameterList]? '=' 'abstract'?
+///        mixinApplication
+///
+///    mixinApplication ::=
+///        [TypeName] [WithClause] [ImplementsClause]? ';'
 class ClassTypeAliasImpl extends TypeAliasImpl implements ClassTypeAlias {
-  /**
-   * The type parameters for the class, or `null` if the class does not have any
-   * type parameters.
-   */
+  /// The type parameters for the class, or `null` if the class does not have
+  /// any type parameters.
   TypeParameterListImpl _typeParameters;
 
-  /**
-   * The token for the '=' separating the name from the definition.
-   */
+  /// The token for the '=' separating the name from the definition.
   @override
   Token equals;
 
-  /**
-   * The token for the 'abstract' keyword, or `null` if this is not defining an
-   * abstract class.
-   */
+  /// The token for the 'abstract' keyword, or `null` if this is not defining an
+  /// abstract class.
   @override
   Token abstractKeyword;
 
-  /**
-   * The name of the superclass of the class being declared.
-   */
+  /// The name of the superclass of the class being declared.
   TypeNameImpl _superclass;
 
-  /**
-   * The with clause for this class.
-   */
+  /// The with clause for this class.
   WithClauseImpl _withClause;
 
-  /**
-   * The implements clause for this class, or `null` if there is no implements
-   * clause.
-   */
+  /// The implements clause for this class, or `null` if there is no implements
+  /// clause.
   ImplementsClauseImpl _implementsClause;
 
-  /**
-   * Initialize a newly created class type alias. Either or both of the
-   * [comment] and [metadata] can be `null` if the class type alias does not
-   * have the corresponding attribute. The [typeParameters] can be `null` if the
-   * class does not have any type parameters. The [abstractKeyword] can be
-   * `null` if the class is not abstract. The [implementsClause] can be `null`
-   * if the class does not implement any interfaces.
-   */
+  /// Initialize a newly created class type alias. Either or both of the
+  /// [comment] and [metadata] can be `null` if the class type alias does not
+  /// have the corresponding attribute. The [typeParameters] can be `null` if
+  /// the class does not have any type parameters. The [abstractKeyword] can be
+  /// `null` if the class is not abstract. The [implementsClause] can be `null`
+  /// if the class does not implement any interfaces.
   ClassTypeAliasImpl(
       CommentImpl comment,
       List<Annotation> metadata,
@@ -2059,73 +1825,57 @@
 abstract class CollectionElementImpl extends AstNodeImpl
     implements CollectionElement {}
 
-/**
- * A combinator associated with an import or export directive.
- *
- *    combinator ::=
- *        [HideCombinator]
- *      | [ShowCombinator]
- */
+/// A combinator associated with an import or export directive.
+///
+///    combinator ::=
+///        [HideCombinator]
+///      | [ShowCombinator]
 abstract class CombinatorImpl extends AstNodeImpl implements Combinator {
-  /**
-   * The 'hide' or 'show' keyword specifying what kind of processing is to be
-   * done on the names.
-   */
+  /// The 'hide' or 'show' keyword specifying what kind of processing is to be
+  /// done on the names.
   @override
   Token keyword;
 
-  /**
-   * Initialize a newly created combinator.
-   */
+  /// Initialize a newly created combinator.
   CombinatorImpl(this.keyword);
 
   @override
   Token get beginToken => keyword;
 }
 
-/**
- * A comment within the source code.
- *
- *    comment ::=
- *        endOfLineComment
- *      | blockComment
- *      | documentationComment
- *
- *    endOfLineComment ::=
- *        '//' (CHARACTER - EOL)* EOL
- *
- *    blockComment ::=
- *        '/ *' CHARACTER* '&#42;/'
- *
- *    documentationComment ::=
- *        '/ **' (CHARACTER | [CommentReference])* '&#42;/'
- *      | ('///' (CHARACTER - EOL)* EOL)+
- */
+/// A comment within the source code.
+///
+///    comment ::=
+///        endOfLineComment
+///      | blockComment
+///      | documentationComment
+///
+///    endOfLineComment ::=
+///        '//' (CHARACTER - EOL)* EOL
+///
+///    blockComment ::=
+///        '/ *' CHARACTER* '&#42;/'
+///
+///    documentationComment ::=
+///        '/ **' (CHARACTER | [CommentReference])* '&#42;/'
+///      | ('///' (CHARACTER - EOL)* EOL)+
 class CommentImpl extends AstNodeImpl implements Comment {
-  /**
-   * The tokens representing the comment.
-   */
+  /// The tokens representing the comment.
   @override
   final List<Token> tokens;
 
-  /**
-   * The type of the comment.
-   */
+  /// The type of the comment.
   final CommentType _type;
 
-  /**
-   * The references embedded within the documentation comment. This list will be
-   * empty unless this is a documentation comment that has references embedded
-   * within it.
-   */
+  /// The references embedded within the documentation comment. This list will
+  /// be empty unless this is a documentation comment that has references embedded
+  /// within it.
   NodeList<CommentReference> _references;
 
-  /**
-   * Initialize a newly created comment. The list of [tokens] must contain at
-   * least one token. The [_type] is the type of the comment. The list of
-   * [references] can be empty if the comment does not contain any embedded
-   * references.
-   */
+  /// Initialize a newly created comment. The list of [tokens] must contain at
+  /// least one token. The [_type] is the type of the comment. The list of
+  /// [references] can be empty if the comment does not contain any embedded
+  /// references.
   CommentImpl(this.tokens, this._type, List<CommentReference> references) {
     _references = new NodeListImpl<CommentReference>(this, references);
   }
@@ -2160,57 +1910,41 @@
     _references.accept(visitor);
   }
 
-  /**
-   * Create a block comment consisting of the given [tokens].
-   */
+  /// Create a block comment consisting of the given [tokens].
   static Comment createBlockComment(List<Token> tokens) =>
       new CommentImpl(tokens, CommentType.BLOCK, null);
 
-  /**
-   * Create a documentation comment consisting of the given [tokens].
-   */
+  /// Create a documentation comment consisting of the given [tokens].
   static Comment createDocumentationComment(List<Token> tokens) =>
       new CommentImpl(
           tokens, CommentType.DOCUMENTATION, new List<CommentReference>());
 
-  /**
-   * Create a documentation comment consisting of the given [tokens] and having
-   * the given [references] embedded within it.
-   */
+  /// Create a documentation comment consisting of the given [tokens] and having
+  /// the given [references] embedded within it.
   static Comment createDocumentationCommentWithReferences(
           List<Token> tokens, List<CommentReference> references) =>
       new CommentImpl(tokens, CommentType.DOCUMENTATION, references);
 
-  /**
-   * Create an end-of-line comment consisting of the given [tokens].
-   */
+  /// Create an end-of-line comment consisting of the given [tokens].
   static Comment createEndOfLineComment(List<Token> tokens) =>
       new CommentImpl(tokens, CommentType.END_OF_LINE, null);
 }
 
-/**
- * A reference to a Dart element that is found within a documentation comment.
- *
- *    commentReference ::=
- *        '[' 'new'? [Identifier] ']'
- */
+/// A reference to a Dart element that is found within a documentation comment.
+///
+///    commentReference ::=
+///        '[' 'new'? [Identifier] ']'
 class CommentReferenceImpl extends AstNodeImpl implements CommentReference {
-  /**
-   * The token representing the 'new' keyword, or `null` if there was no 'new'
-   * keyword.
-   */
+  /// The token representing the 'new' keyword, or `null` if there was no 'new'
+  /// keyword.
   @override
   Token newKeyword;
 
-  /**
-   * The identifier being referenced.
-   */
+  /// The identifier being referenced.
   IdentifierImpl _identifier;
 
-  /**
-   * Initialize a newly created reference to a Dart element. The [newKeyword]
-   * can be `null` if the reference is not to a constructor.
-   */
+  /// Initialize a newly created reference to a Dart element. The [newKeyword]
+  /// can be `null` if the reference is not to a constructor.
   CommentReferenceImpl(this.newKeyword, IdentifierImpl identifier) {
     _identifier = _becomeParentOf(identifier);
   }
@@ -2242,121 +1976,97 @@
   }
 }
 
-/**
- * The possible types of comments that are recognized by the parser.
- */
+/// The possible types of comments that are recognized by the parser.
 class CommentType {
-  /**
-   * A block comment.
-   */
+  /// A block comment.
   static const CommentType BLOCK = const CommentType('BLOCK');
 
-  /**
-   * A documentation comment.
-   */
+  /// A documentation comment.
   static const CommentType DOCUMENTATION = const CommentType('DOCUMENTATION');
 
-  /**
-   * An end-of-line comment.
-   */
+  /// An end-of-line comment.
   static const CommentType END_OF_LINE = const CommentType('END_OF_LINE');
 
-  /**
-   * The name of the comment type.
-   */
+  /// The name of the comment type.
   final String name;
 
-  /**
-   * Initialize a newly created comment type to have the given [name].
-   */
+  /// Initialize a newly created comment type to have the given [name].
   const CommentType(this.name);
 
   @override
   String toString() => name;
 }
 
-/**
- * A compilation unit.
- *
- * While the grammar restricts the order of the directives and declarations
- * within a compilation unit, this class does not enforce those restrictions.
- * In particular, the children of a compilation unit will be visited in lexical
- * order even if lexical order does not conform to the restrictions of the
- * grammar.
- *
- *    compilationUnit ::=
- *        directives declarations
- *
- *    directives ::=
- *        [ScriptTag]? [LibraryDirective]? namespaceDirective* [PartDirective]*
- *      | [PartOfDirective]
- *
- *    namespaceDirective ::=
- *        [ImportDirective]
- *      | [ExportDirective]
- *
- *    declarations ::=
- *        [CompilationUnitMember]*
- */
+/// A compilation unit.
+///
+/// While the grammar restricts the order of the directives and declarations
+/// within a compilation unit, this class does not enforce those restrictions.
+/// In particular, the children of a compilation unit will be visited in lexical
+/// order even if lexical order does not conform to the restrictions of the
+/// grammar.
+///
+///    compilationUnit ::=
+///        directives declarations
+///
+///    directives ::=
+///        [ScriptTag]? [LibraryDirective]? namespaceDirective* [PartDirective]*
+///      | [PartOfDirective]
+///
+///    namespaceDirective ::=
+///        [ImportDirective]
+///      | [ExportDirective]
+///
+///    declarations ::=
+///        [CompilationUnitMember]*
 class CompilationUnitImpl extends AstNodeImpl implements CompilationUnit {
-  /**
-   * The first token in the token stream that was parsed to form this
-   * compilation unit.
-   */
+  /// The first token in the token stream that was parsed to form this
+  /// compilation unit.
   @override
   Token beginToken;
 
-  /**
-   * The script tag at the beginning of the compilation unit, or `null` if there
-   * is no script tag in this compilation unit.
-   */
+  /// The script tag at the beginning of the compilation unit, or `null` if
+  /// there is no script tag in this compilation unit.
   ScriptTagImpl _scriptTag;
 
-  /**
-   * The directives contained in this compilation unit.
-   */
+  /// The directives contained in this compilation unit.
   NodeList<Directive> _directives;
 
-  /**
-   * The declarations contained in this compilation unit.
-   */
+  /// The declarations contained in this compilation unit.
   NodeList<CompilationUnitMember> _declarations;
 
-  /**
-   * The last token in the token stream that was parsed to form this compilation
-   * unit. This token should always have a type of [TokenType.EOF].
-   */
+  /// The last token in the token stream that was parsed to form this
+  /// compilation unit. This token should always have a type of [TokenType.EOF].
   @override
   Token endToken;
 
-  /**
-   * The element associated with this compilation unit, or `null` if the AST
-   * structure has not been resolved.
-   */
+  /// The element associated with this compilation unit, or `null` if the AST
+  /// structure has not been resolved.
   @override
   CompilationUnitElement declaredElement;
 
-  /**
-   * The line information for this compilation unit.
-   */
+  Version languageVersion;
+
+  /// The line information for this compilation unit.
   @override
   LineInfo lineInfo;
 
+  /// ?
+  // TODO(brianwilkerson) Remove this field. It is never read, only written.
   Map<int, AstNode> localDeclarations;
 
-  /**
-   * Is `true` if the non-nullable feature is enabled, and this library
-   * unit is annotated with `@pragma('analyzer:non-nullable')`.
-   */
-  bool hasPragmaAnalyzerNonNullable = false;
+  /// Additional information about local variables that are declared within this
+  /// compilation unit but outside any function body, or `null` if resolution
+  /// has not yet been performed.
+  LocalVariableInfo localVariableInfo = new LocalVariableInfo();
 
-  /**
-   * Initialize a newly created compilation unit to have the given directives
-   * and declarations. The [scriptTag] can be `null` if there is no script tag
-   * in the compilation unit. The list of [directives] can be `null` if there
-   * are no directives in the compilation unit. The list of [declarations] can
-   * be `null` if there are no declarations in the compilation unit.
-   */
+  /// Is `true` if this unit has been parsed as non-nullable.
+  bool isNonNullable = false;
+
+  /// Initialize a newly created compilation unit to have the given directives
+  /// and declarations. The [scriptTag] can be `null` if there is no script tag
+  /// in the compilation unit. The list of [directives] can be `null` if there
+  /// are no directives in the compilation unit. The list of [declarations] can
+  /// be `null` if there are no declarations in the compilation unit.
   CompilationUnitImpl(
       this.beginToken,
       ScriptTagImpl scriptTag,
@@ -2422,10 +2132,8 @@
       ..sort(AstNode.LEXICAL_ORDER);
   }
 
-  /**
-   * Return `true` if all of the directives are lexically before any
-   * declarations.
-   */
+  /// Return `true` if all of the directives are lexically before any
+  /// declarations.
   bool get _directivesAreBeforeDeclarations {
     if (_directives.isEmpty || _declarations.isEmpty) {
       return true;
@@ -2438,6 +2146,20 @@
   @override
   E accept<E>(AstVisitor<E> visitor) => visitor.visitCompilationUnit(this);
 
+  bool isPotentiallyMutatedInClosure(VariableElement variable) {
+    if (localVariableInfo == null) {
+      throw new StateError('Resolution has not yet been performed');
+    }
+    return localVariableInfo.potentiallyMutatedInClosure.contains(variable);
+  }
+
+  bool isPotentiallyMutatedInScope(VariableElement variable) {
+    if (localVariableInfo == null) {
+      throw new StateError('Resolution has not yet been performed');
+    }
+    return localVariableInfo.potentiallyMutatedInScope.contains(variable);
+  }
+
   @override
   void visitChildren(AstVisitor visitor) {
     _scriptTag?.accept(visitor);
@@ -2455,67 +2177,49 @@
   }
 }
 
-/**
- * A node that declares one or more names within the scope of a compilation
- * unit.
- *
- *    compilationUnitMember ::=
- *        [ClassDeclaration]
- *      | [TypeAlias]
- *      | [FunctionDeclaration]
- *      | [MethodDeclaration]
- *      | [VariableDeclaration]
- *      | [VariableDeclaration]
- */
+/// A node that declares one or more names within the scope of a compilation
+/// unit.
+///
+///    compilationUnitMember ::=
+///        [ClassDeclaration]
+///      | [TypeAlias]
+///      | [FunctionDeclaration]
+///      | [MethodDeclaration]
+///      | [VariableDeclaration]
+///      | [VariableDeclaration]
 abstract class CompilationUnitMemberImpl extends DeclarationImpl
     implements CompilationUnitMember {
-  /**
-   * Initialize a newly created generic compilation unit member. Either or both
-   * of the [comment] and [metadata] can be `null` if the member does not have
-   * the corresponding attribute.
-   */
+  /// Initialize a newly created generic compilation unit member. Either or both
+  /// of the [comment] and [metadata] can be `null` if the member does not have
+  /// the corresponding attribute.
   CompilationUnitMemberImpl(CommentImpl comment, List<Annotation> metadata)
       : super(comment, metadata);
 }
 
-/**
- * A conditional expression.
- *
- *    conditionalExpression ::=
- *        [Expression] '?' [Expression] ':' [Expression]
- */
+/// A conditional expression.
+///
+///    conditionalExpression ::=
+///        [Expression] '?' [Expression] ':' [Expression]
 class ConditionalExpressionImpl extends ExpressionImpl
     implements ConditionalExpression {
-  /**
-   * The condition used to determine which of the expressions is executed next.
-   */
+  /// The condition used to determine which of the expressions is executed next.
   ExpressionImpl _condition;
 
-  /**
-   * The token used to separate the condition from the then expression.
-   */
+  /// The token used to separate the condition from the then expression.
   @override
   Token question;
 
-  /**
-   * The expression that is executed if the condition evaluates to `true`.
-   */
+  /// The expression that is executed if the condition evaluates to `true`.
   ExpressionImpl _thenExpression;
 
-  /**
-   * The token used to separate the then expression from the else expression.
-   */
+  /// The token used to separate the then expression from the else expression.
   @override
   Token colon;
 
-  /**
-   * The expression that is executed if the condition evaluates to `false`.
-   */
+  /// The expression that is executed if the condition evaluates to `false`.
   ExpressionImpl _elseExpression;
 
-  /**
-   * Initialize a newly created conditional expression.
-   */
+  /// Initialize a newly created conditional expression.
   ConditionalExpressionImpl(
       ExpressionImpl condition,
       this.question,
@@ -2558,7 +2262,7 @@
   Token get endToken => _elseExpression.endToken;
 
   @override
-  int get precedence => 3;
+  Precedence get precedence => Precedence.conditional;
 
   @override
   Expression get thenExpression => _thenExpression;
@@ -2580,18 +2284,16 @@
   }
 }
 
-/**
- * A configuration in either an import or export directive.
- *
- *     configuration ::=
- *         'if' '(' test ')' uri
- *
- *     test ::=
- *         dottedName ('==' stringLiteral)?
- *
- *     dottedName ::=
- *         identifier ('.' identifier)*
- */
+/// A configuration in either an import or export directive.
+///
+///     configuration ::=
+///         'if' '(' test ')' uri
+///
+///     test ::=
+///         dottedName ('==' stringLiteral)?
+///
+///     dottedName ::=
+///         identifier ('.' identifier)*
 class ConfigurationImpl extends AstNodeImpl implements Configuration {
   @override
   Token ifKeyword;
@@ -2688,15 +2390,11 @@
   }
 }
 
-/**
- * An error listener that only records whether any constant related errors have
- * been reported.
- */
+/// An error listener that only records whether any constant related errors have
+/// been reported.
 class ConstantAnalysisErrorListener extends AnalysisErrorListener {
-  /**
-   * A flag indicating whether any constant related errors have been reported to
-   * this listener.
-   */
+  /// A flag indicating whether any constant related errors have been reported
+  /// to this listener.
   bool hasConstError = false;
 
   @override
@@ -2713,7 +2411,6 @@
         case CompileTimeErrorCode.CONST_EVAL_THROWS_IDBZE:
         case CompileTimeErrorCode.CONST_WITH_NON_CONST:
         case CompileTimeErrorCode.CONST_WITH_NON_CONSTANT_ARGUMENT:
-        case CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER:
         case CompileTimeErrorCode
             .CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST:
         case CompileTimeErrorCode.INVALID_CONSTANT:
@@ -2726,122 +2423,97 @@
   }
 }
 
-/**
- * A constructor declaration.
- *
- *    constructorDeclaration ::=
- *        constructorSignature [FunctionBody]?
- *      | constructorName formalParameterList ':' 'this' ('.' [SimpleIdentifier])? arguments
- *
- *    constructorSignature ::=
- *        'external'? constructorName formalParameterList initializerList?
- *      | 'external'? 'factory' factoryName formalParameterList initializerList?
- *      | 'external'? 'const'  constructorName formalParameterList initializerList?
- *
- *    constructorName ::=
- *        [SimpleIdentifier] ('.' [SimpleIdentifier])?
- *
- *    factoryName ::=
- *        [Identifier] ('.' [SimpleIdentifier])?
- *
- *    initializerList ::=
- *        ':' [ConstructorInitializer] (',' [ConstructorInitializer])*
- */
+/// A constructor declaration.
+///
+///    constructorDeclaration ::=
+///        constructorSignature [FunctionBody]?
+///      | constructorName formalParameterList ':' 'this'
+///        ('.' [SimpleIdentifier])? arguments
+///
+///    constructorSignature ::=
+///        'external'? constructorName formalParameterList initializerList?
+///      | 'external'? 'factory' factoryName formalParameterList
+///        initializerList?
+///      | 'external'? 'const'  constructorName formalParameterList
+///        initializerList?
+///
+///    constructorName ::=
+///        [SimpleIdentifier] ('.' [SimpleIdentifier])?
+///
+///    factoryName ::=
+///        [Identifier] ('.' [SimpleIdentifier])?
+///
+///    initializerList ::=
+///        ':' [ConstructorInitializer] (',' [ConstructorInitializer])*
 class ConstructorDeclarationImpl extends ClassMemberImpl
     implements ConstructorDeclaration {
-  /**
-   * The token for the 'external' keyword, or `null` if the constructor is not
-   * external.
-   */
+  /// The token for the 'external' keyword, or `null` if the constructor is not
+  /// external.
   @override
   Token externalKeyword;
 
-  /**
-   * The token for the 'const' keyword, or `null` if the constructor is not a
-   * const constructor.
-   */
+  /// The token for the 'const' keyword, or `null` if the constructor is not a
+  /// const constructor.
   @override
   Token constKeyword;
 
-  /**
-   * The token for the 'factory' keyword, or `null` if the constructor is not a
-   * factory constructor.
-   */
+  /// The token for the 'factory' keyword, or `null` if the constructor is not a
+  /// factory constructor.
   @override
   Token factoryKeyword;
 
-  /**
-   * The type of object being created. This can be different than the type in
-   * which the constructor is being declared if the constructor is the
-   * implementation of a factory constructor.
-   */
+  /// The type of object being created. This can be different than the type in
+  /// which the constructor is being declared if the constructor is the
+  /// implementation of a factory constructor.
   IdentifierImpl _returnType;
 
-  /**
-   * The token for the period before the constructor name, or `null` if the
-   * constructor being declared is unnamed.
-   */
+  /// The token for the period before the constructor name, or `null` if the
+  /// constructor being declared is unnamed.
   @override
   Token period;
 
-  /**
-   * The name of the constructor, or `null` if the constructor being declared is
-   * unnamed.
-   */
+  /// The name of the constructor, or `null` if the constructor being declared
+  /// is unnamed.
   SimpleIdentifierImpl _name;
 
-  /**
-   * The parameters associated with the constructor.
-   */
+  /// The parameters associated with the constructor.
   FormalParameterListImpl _parameters;
 
-  /**
-   * The token for the separator (colon or equals) before the initializer list
-   * or redirection, or `null` if there are no initializers.
-   */
+  /// The token for the separator (colon or equals) before the initializer list
+  /// or redirection, or `null` if there are no initializers.
   @override
   Token separator;
 
-  /**
-   * The initializers associated with the constructor.
-   */
+  /// The initializers associated with the constructor.
   NodeList<ConstructorInitializer> _initializers;
 
-  /**
-   * The name of the constructor to which this constructor will be redirected,
-   * or `null` if this is not a redirecting factory constructor.
-   */
+  /// The name of the constructor to which this constructor will be redirected,
+  /// or `null` if this is not a redirecting factory constructor.
   ConstructorNameImpl _redirectedConstructor;
 
-  /**
-   * The body of the constructor, or `null` if the constructor does not have a
-   * body.
-   */
+  /// The body of the constructor, or `null` if the constructor does not have a
+  /// body.
   FunctionBodyImpl _body;
 
-  /**
-   * The element associated with this constructor, or `null` if the AST
-   * structure has not been resolved or if this constructor could not be
-   * resolved.
-   */
+  /// The element associated with this constructor, or `null` if the AST
+  /// structure has not been resolved or if this constructor could not be
+  /// resolved.
   @override
   ConstructorElement declaredElement;
 
-  /**
-   * Initialize a newly created constructor declaration. The [externalKeyword]
-   * can be `null` if the constructor is not external. Either or both of the
-   * [comment] and [metadata] can be `null` if the constructor does not have the
-   * corresponding attribute. The [constKeyword] can be `null` if the
-   * constructor cannot be used to create a constant. The [factoryKeyword] can
-   * be `null` if the constructor is not a factory. The [period] and [name] can
-   * both be `null` if the constructor is not a named constructor. The
-   * [separator] can be `null` if the constructor does not have any initializers
-   * and does not redirect to a different constructor. The list of
-   * [initializers] can be `null` if the constructor does not have any
-   * initializers. The [redirectedConstructor] can be `null` if the constructor
-   * does not redirect to a different constructor. The [body] can be `null` if
-   * the constructor does not have a body.
-   */
+  /// Initialize a newly created constructor declaration. The [externalKeyword]
+  /// can be `null` if the constructor is not external. Either or both of the
+  /// [comment] and [metadata] can be `null` if the constructor does not have
+  /// the corresponding attribute. The [constKeyword] can be `null` if the
+  /// constructor cannot be used to create a constant. The [factoryKeyword] can
+  /// be `null` if the constructor is not a factory. The [period] and [name] can
+  /// both be `null` if the constructor is not a named constructor. The
+  /// [separator] can be `null` if the constructor does not have any
+  /// initializers and does not redirect to a different constructor. The list of
+  /// [initializers] can be `null` if the constructor does not have any
+  /// initializers. The [redirectedConstructor] can be `null` if the constructor
+  /// does not redirect to a different constructor. The [body] can be `null` if
+  /// the constructor does not have a body.
   ConstructorDeclarationImpl(
       CommentImpl comment,
       List<Annotation> metadata,
@@ -2970,48 +2642,34 @@
   }
 }
 
-/**
- * The initialization of a field within a constructor's initialization list.
- *
- *    fieldInitializer ::=
- *        ('this' '.')? [SimpleIdentifier] '=' [Expression]
- */
+/// The initialization of a field within a constructor's initialization list.
+///
+///    fieldInitializer ::=
+///        ('this' '.')? [SimpleIdentifier] '=' [Expression]
 class ConstructorFieldInitializerImpl extends ConstructorInitializerImpl
     implements ConstructorFieldInitializer {
-  /**
-   * The token for the 'this' keyword, or `null` if there is no 'this' keyword.
-   */
+  /// The token for the 'this' keyword, or `null` if there is no 'this' keyword.
   @override
   Token thisKeyword;
 
-  /**
-   * The token for the period after the 'this' keyword, or `null` if there is no
-   * 'this' keyword.
-   */
+  /// The token for the period after the 'this' keyword, or `null` if there is
+  /// no'this' keyword.
   @override
   Token period;
 
-  /**
-   * The name of the field being initialized.
-   */
+  /// The name of the field being initialized.
   SimpleIdentifierImpl _fieldName;
 
-  /**
-   * The token for the equal sign between the field name and the expression.
-   */
+  /// The token for the equal sign between the field name and the expression.
   @override
   Token equals;
 
-  /**
-   * The expression computing the value to which the field will be initialized.
-   */
+  /// The expression computing the value to which the field will be initialized.
   ExpressionImpl _expression;
 
-  /**
-   * Initialize a newly created field initializer to initialize the field with
-   * the given name to the value of the given expression. The [thisKeyword] and
-   * [period] can be `null` if the 'this' keyword was not specified.
-   */
+  /// Initialize a newly created field initializer to initialize the field with
+  /// the given name to the value of the given expression. The [thisKeyword] and
+  /// [period] can be `null` if the 'this' keyword was not specified.
   ConstructorFieldInitializerImpl(this.thisKeyword, this.period,
       SimpleIdentifierImpl fieldName, this.equals, ExpressionImpl expression) {
     _fieldName = _becomeParentOf(fieldName);
@@ -3064,54 +2722,40 @@
   }
 }
 
-/**
- * A node that can occur in the initializer list of a constructor declaration.
- *
- *    constructorInitializer ::=
- *        [SuperConstructorInvocation]
- *      | [ConstructorFieldInitializer]
- *      | [RedirectingConstructorInvocation]
- */
+/// A node that can occur in the initializer list of a constructor declaration.
+///
+///    constructorInitializer ::=
+///        [SuperConstructorInvocation]
+///      | [ConstructorFieldInitializer]
+///      | [RedirectingConstructorInvocation]
 abstract class ConstructorInitializerImpl extends AstNodeImpl
     implements ConstructorInitializer {}
 
-/**
- * The name of the constructor.
- *
- *    constructorName ::=
- *        type ('.' identifier)?
- */
+/// The name of the constructor.
+///
+///    constructorName ::=
+///        type ('.' identifier)?
 class ConstructorNameImpl extends AstNodeImpl implements ConstructorName {
-  /**
-   * The name of the type defining the constructor.
-   */
+  /// The name of the type defining the constructor.
   TypeNameImpl _type;
 
-  /**
-   * The token for the period before the constructor name, or `null` if the
-   * specified constructor is the unnamed constructor.
-   */
+  /// The token for the period before the constructor name, or `null` if the
+  /// specified constructor is the unnamed constructor.
   @override
   Token period;
 
-  /**
-   * The name of the constructor, or `null` if the specified constructor is the
-   * unnamed constructor.
-   */
+  /// The name of the constructor, or `null` if the specified constructor is the
+  /// unnamed constructor.
   SimpleIdentifierImpl _name;
 
-  /**
-   * The element associated with this constructor name based on static type
-   * information, or `null` if the AST structure has not been resolved or if
-   * this constructor name could not be resolved.
-   */
+  /// The element associated with this constructor name based on static type
+  /// information, or `null` if the AST structure has not been resolved or if
+  /// this constructor name could not be resolved.
   @override
   ConstructorElement staticElement;
 
-  /**
-   * Initialize a newly created constructor name. The [period] and [name] can be
-   * `null` if the constructor being named is the unnamed constructor.
-   */
+  /// Initialize a newly created constructor name. The [period] and [name] can
+  /// be`null` if the constructor being named is the unnamed constructor.
   ConstructorNameImpl(
       TypeNameImpl type, this.period, SimpleIdentifierImpl name) {
     _type = _becomeParentOf(type);
@@ -3159,44 +2803,32 @@
   }
 }
 
-/**
- * A continue statement.
- *
- *    continueStatement ::=
- *        'continue' [SimpleIdentifier]? ';'
- */
+/// A continue statement.
+///
+///    continueStatement ::=
+///        'continue' [SimpleIdentifier]? ';'
 class ContinueStatementImpl extends StatementImpl implements ContinueStatement {
-  /**
-   * The token representing the 'continue' keyword.
-   */
+  /// The token representing the 'continue' keyword.
   @override
   Token continueKeyword;
 
-  /**
-   * The label associated with the statement, or `null` if there is no label.
-   */
+  /// The label associated with the statement, or `null` if there is no label.
   SimpleIdentifierImpl _label;
 
-  /**
-   * The semicolon terminating the statement.
-   */
+  /// The semicolon terminating the statement.
   @override
   Token semicolon;
 
-  /**
-   * The AstNode which this continue statement is continuing to.  This will be
-   * either a Statement (in the case of continuing a loop) or a SwitchMember
-   * (in the case of continuing from one switch case to another).  Null if the
-   * AST has not yet been resolved or if the target could not be resolved.
-   * Note that if the source code has errors, the target may be invalid (e.g.
-   * the target may be in an enclosing function).
-   */
+  /// The AstNode which this continue statement is continuing to.  This will be
+  /// either a Statement (in the case of continuing a loop) or a SwitchMember
+  /// (in the case of continuing from one switch case to another).  Null if the
+  /// AST has not yet been resolved or if the target could not be resolved.
+  /// Note that if the source code has errors, the target may be invalid (e.g.
+  /// the target may be in an enclosing function).
   AstNode target;
 
-  /**
-   * Initialize a newly created continue statement. The [label] can be `null` if
-   * there is no label associated with the statement.
-   */
+  /// Initialize a newly created continue statement. The [label] can be `null`
+  /// if there is no label associated with the statement.
   ContinueStatementImpl(
       this.continueKeyword, SimpleIdentifierImpl label, this.semicolon) {
     _label = _becomeParentOf(label);
@@ -3229,53 +2861,39 @@
   }
 }
 
-/**
- * A node that represents the declaration of one or more names. Each declared
- * name is visible within a name scope.
- */
+/// A node that represents the declaration of one or more names. Each declared
+/// name is visible within a name scope.
 abstract class DeclarationImpl extends AnnotatedNodeImpl
     implements Declaration {
-  /**
-   * Initialize a newly created declaration. Either or both of the [comment] and
-   * [metadata] can be `null` if the declaration does not have the corresponding
-   * attribute.
-   */
+  /// Initialize a newly created declaration. Either or both of the [comment]
+  /// and [metadata] can be `null` if the declaration does not have the
+  /// corresponding attribute.
   DeclarationImpl(CommentImpl comment, List<Annotation> metadata)
       : super(comment, metadata);
 }
 
-/**
- * The declaration of a single identifier.
- *
- *    declaredIdentifier ::=
- *        [Annotation] finalConstVarOrType [SimpleIdentifier]
- */
+/// The declaration of a single identifier.
+///
+///    declaredIdentifier ::=
+///        [Annotation] finalConstVarOrType [SimpleIdentifier]
 class DeclaredIdentifierImpl extends DeclarationImpl
     implements DeclaredIdentifier {
-  /**
-   * The token representing either the 'final', 'const' or 'var' keyword, or
-   * `null` if no keyword was used.
-   */
+  /// The token representing either the 'final', 'const' or 'var' keyword, or
+  /// `null` if no keyword was used.
   @override
   Token keyword;
 
-  /**
-   * The name of the declared type of the parameter, or `null` if the parameter
-   * does not have a declared type.
-   */
+  /// The name of the declared type of the parameter, or `null` if the parameter
+  /// does not have a declared type.
   TypeAnnotationImpl _type;
 
-  /**
-   * The name of the variable being declared.
-   */
+  /// The name of the variable being declared.
   SimpleIdentifierImpl _identifier;
 
-  /**
-   * Initialize a newly created formal parameter. Either or both of the
-   * [comment] and [metadata] can be `null` if the declaration does not have the
-   * corresponding attribute. The [keyword] can be `null` if a type name is
-   * given. The [type] must be `null` if the keyword is 'var'.
-   */
+  /// Initialize a newly created formal parameter. Either or both of the
+  /// [comment] and [metadata] can be `null` if the declaration does not have
+  /// the corresponding attribute. The [keyword] can be `null` if a type name is
+  /// given. The [type] must be `null` if the keyword is 'var'.
   DeclaredIdentifierImpl(CommentImpl comment, List<Annotation> metadata,
       this.keyword, TypeAnnotationImpl type, SimpleIdentifierImpl identifier)
       : super(comment, metadata) {
@@ -3344,9 +2962,7 @@
   }
 }
 
-/**
- * A simple identifier that declares a name.
- */
+/// A simple identifier that declares a name.
 // TODO(rnystrom): Consider making this distinct from [SimpleIdentifier] and
 // get rid of all of the:
 //
@@ -3362,47 +2978,35 @@
   bool inDeclarationContext() => true;
 }
 
-/**
- * A formal parameter with a default value. There are two kinds of parameters
- * that are both represented by this class: named formal parameters and
- * positional formal parameters.
- *
- *    defaultFormalParameter ::=
- *        [NormalFormalParameter] ('=' [Expression])?
- *
- *    defaultNamedParameter ::=
- *        [NormalFormalParameter] (':' [Expression])?
- */
+/// A formal parameter with a default value. There are two kinds of parameters
+/// that are both represented by this class: named formal parameters and
+/// positional formal parameters.
+///
+///    defaultFormalParameter ::=
+///        [NormalFormalParameter] ('=' [Expression])?
+///
+///    defaultNamedParameter ::=
+///        [NormalFormalParameter] (':' [Expression])?
 class DefaultFormalParameterImpl extends FormalParameterImpl
     implements DefaultFormalParameter {
-  /**
-   * The formal parameter with which the default value is associated.
-   */
+  /// The formal parameter with which the default value is associated.
   NormalFormalParameterImpl _parameter;
 
-  /**
-   * The kind of this parameter.
-   */
+  /// The kind of this parameter.
   @override
   ParameterKind kind;
 
-  /**
-   * The token separating the parameter from the default value, or `null` if
-   * there is no default value.
-   */
+  /// The token separating the parameter from the default value, or `null` if
+  /// there is no default value.
   @override
   Token separator;
 
-  /**
-   * The expression computing the default value for the parameter, or `null` if
-   * there is no default value.
-   */
+  /// The expression computing the default value for the parameter, or `null` if
+  /// there is no default value.
   ExpressionImpl _defaultValue;
 
-  /**
-   * Initialize a newly created default formal parameter. The [separator] and
-   * [defaultValue] can be `null` if there is no default value.
-   */
+  /// Initialize a newly created default formal parameter. The [separator] and
+  /// [defaultValue] can be `null` if there is no default value.
   DefaultFormalParameterImpl(NormalFormalParameterImpl parameter, this.kind,
       this.separator, ExpressionImpl defaultValue) {
     _parameter = _becomeParentOf(parameter);
@@ -3420,6 +3024,9 @@
   Token get covariantKeyword => null;
 
   @override
+  ParameterElement get declaredElement => _parameter.declaredElement;
+
+  @override
   Expression get defaultValue => _defaultValue;
 
   @override
@@ -3456,6 +3063,9 @@
   }
 
   @override
+  Token get requiredKeyword => null;
+
+  @override
   E accept<E>(AstVisitor<E> visitor) =>
       visitor.visitDefaultFormalParameter(this);
 
@@ -3466,91 +3076,65 @@
   }
 }
 
-/**
- * A node that represents a directive.
- *
- *    directive ::=
- *        [ExportDirective]
- *      | [ImportDirective]
- *      | [LibraryDirective]
- *      | [PartDirective]
- *      | [PartOfDirective]
- */
+/// A node that represents a directive.
+///
+///    directive ::=
+///        [ExportDirective]
+///      | [ImportDirective]
+///      | [LibraryDirective]
+///      | [PartDirective]
+///      | [PartOfDirective]
 abstract class DirectiveImpl extends AnnotatedNodeImpl implements Directive {
-  /**
-   * The element associated with this directive, or `null` if the AST structure
-   * has not been resolved or if this directive could not be resolved.
-   */
+  /// The element associated with this directive, or `null` if the AST structure
+  /// has not been resolved or if this directive could not be resolved.
   Element _element;
 
-  /**
-   * Initialize a newly create directive. Either or both of the [comment] and
-   * [metadata] can be `null` if the directive does not have the corresponding
-   * attribute.
-   */
+  /// Initialize a newly create directive. Either or both of the [comment] and
+  /// [metadata] can be `null` if the directive does not have the corresponding
+  /// attribute.
   DirectiveImpl(CommentImpl comment, List<Annotation> metadata)
       : super(comment, metadata);
 
   @override
   Element get element => _element;
 
-  /**
-   * Set the element associated with this directive to be the given [element].
-   */
+  /// Set the element associated with this directive to be the given [element].
   void set element(Element element) {
     _element = element;
   }
 }
 
-/**
- * A do statement.
- *
- *    doStatement ::=
- *        'do' [Statement] 'while' '(' [Expression] ')' ';'
- */
+/// A do statement.
+///
+///    doStatement ::=
+///        'do' [Statement] 'while' '(' [Expression] ')' ';'
 class DoStatementImpl extends StatementImpl implements DoStatement {
-  /**
-   * The token representing the 'do' keyword.
-   */
+  /// The token representing the 'do' keyword.
   @override
   Token doKeyword;
 
-  /**
-   * The body of the loop.
-   */
+  /// The body of the loop.
   StatementImpl _body;
 
-  /**
-   * The token representing the 'while' keyword.
-   */
+  /// The token representing the 'while' keyword.
   @override
   Token whileKeyword;
 
-  /**
-   * The left parenthesis.
-   */
+  /// The left parenthesis.
   Token leftParenthesis;
 
-  /**
-   * The condition that determines when the loop will terminate.
-   */
+  /// The condition that determines when the loop will terminate.
   ExpressionImpl _condition;
 
-  /**
-   * The right parenthesis.
-   */
+  /// The right parenthesis.
   @override
   Token rightParenthesis;
 
-  /**
-   * The semicolon terminating the statement.
-   */
+  /// The semicolon terminating the statement.
   @override
   Token semicolon;
 
-  /**
-   * Initialize a newly created do loop.
-   */
+  /// Initialize a newly created do loop.
   DoStatementImpl(
       this.doKeyword,
       StatementImpl body,
@@ -3605,21 +3189,15 @@
   }
 }
 
-/**
- * A dotted name, used in a configuration within an import or export directive.
- *
- *    dottedName ::=
- *        [SimpleIdentifier] ('.' [SimpleIdentifier])*
- */
+/// A dotted name, used in a configuration within an import or export directive.
+///
+///    dottedName ::=
+///        [SimpleIdentifier] ('.' [SimpleIdentifier])*
 class DottedNameImpl extends AstNodeImpl implements DottedName {
-  /**
-   * The components of the identifier.
-   */
+  /// The components of the identifier.
   NodeList<SimpleIdentifier> _components;
 
-  /**
-   * Initialize a newly created dotted name.
-   */
+  /// Initialize a newly created dotted name.
   DottedNameImpl(List<SimpleIdentifier> components) {
     _components = new NodeListImpl<SimpleIdentifier>(this, components);
   }
@@ -3647,32 +3225,24 @@
   }
 }
 
-/**
- * A floating point literal expression.
- *
- *    doubleLiteral ::=
- *        decimalDigit+ ('.' decimalDigit*)? exponent?
- *      | '.' decimalDigit+ exponent?
- *
- *    exponent ::=
- *        ('e' | 'E') ('+' | '-')? decimalDigit+
- */
+/// A floating point literal expression.
+///
+///    doubleLiteral ::=
+///        decimalDigit+ ('.' decimalDigit*)? exponent?
+///      | '.' decimalDigit+ exponent?
+///
+///    exponent ::=
+///        ('e' | 'E') ('+' | '-')? decimalDigit+
 class DoubleLiteralImpl extends LiteralImpl implements DoubleLiteral {
-  /**
-   * The token representing the literal.
-   */
+  /// The token representing the literal.
   @override
   Token literal;
 
-  /**
-   * The value of the literal.
-   */
+  /// The value of the literal.
   @override
   double value;
 
-  /**
-   * Initialize a newly created floating point literal.
-   */
+  /// Initialize a newly created floating point literal.
   DoubleLiteralImpl(this.literal, this.value);
 
   @override
@@ -3694,25 +3264,19 @@
   }
 }
 
-/**
- * An empty function body, which can only appear in constructors or abstract
- * methods.
- *
- *    emptyFunctionBody ::=
- *        ';'
- */
+/// An empty function body, which can only appear in constructors or abstract
+/// methods.
+///
+///    emptyFunctionBody ::=
+///        ';'
 class EmptyFunctionBodyImpl extends FunctionBodyImpl
     implements EmptyFunctionBody {
-  /**
-   * The token representing the semicolon that marks the end of the function
-   * body.
-   */
+  /// The token representing the semicolon that marks the end of the function
+  /// body.
   @override
   Token semicolon;
 
-  /**
-   * Initialize a newly created function body.
-   */
+  /// Initialize a newly created function body.
   EmptyFunctionBodyImpl(this.semicolon);
 
   @override
@@ -3734,21 +3298,15 @@
   }
 }
 
-/**
- * An empty statement.
- *
- *    emptyStatement ::=
- *        ';'
- */
+/// An empty statement.
+///
+///    emptyStatement ::=
+///        ';'
 class EmptyStatementImpl extends StatementImpl implements EmptyStatement {
-  /**
-   * The semicolon terminating the statement.
-   */
+  /// The semicolon terminating the statement.
   Token semicolon;
 
-  /**
-   * Initialize a newly created empty statement.
-   */
+  /// Initialize a newly created empty statement.
   EmptyStatementImpl(this.semicolon);
 
   @override
@@ -3773,22 +3331,16 @@
   }
 }
 
-/**
- * The declaration of an enum constant.
- */
+/// The declaration of an enum constant.
 class EnumConstantDeclarationImpl extends DeclarationImpl
     implements EnumConstantDeclaration {
-  /**
-   * The name of the constant.
-   */
+  /// The name of the constant.
   SimpleIdentifierImpl _name;
 
-  /**
-   * Initialize a newly created enum constant declaration. Either or both of the
-   * [comment] and [metadata] can be `null` if the constant does not have the
-   * corresponding attribute. (Technically, enum constants cannot have metadata,
-   * but we allow it for consistency.)
-   */
+  /// Initialize a newly created enum constant declaration. Either or both of
+  /// the [comment] and [metadata] can be `null` if the constant does not have
+  /// the corresponding attribute. (Technically, enum constants cannot have
+  /// metadata, but we allow it for consistency.)
   EnumConstantDeclarationImpl(
       CommentImpl comment, List<Annotation> metadata, SimpleIdentifierImpl name)
       : super(comment, metadata) {
@@ -3831,43 +3383,32 @@
   }
 }
 
-/**
- * The declaration of an enumeration.
- *
- *    enumType ::=
- *        metadata 'enum' [SimpleIdentifier] '{' [SimpleIdentifier] (',' [SimpleIdentifier])* (',')? '}'
- */
+/// The declaration of an enumeration.
+///
+///    enumType ::=
+///        metadata 'enum' [SimpleIdentifier] '{' [SimpleIdentifier]
+///        (',' [SimpleIdentifier])* (',')? '}'
 class EnumDeclarationImpl extends NamedCompilationUnitMemberImpl
     implements EnumDeclaration {
-  /**
-   * The 'enum' keyword.
-   */
+  /// The 'enum' keyword.
   @override
   Token enumKeyword;
 
-  /**
-   * The left curly bracket.
-   */
+  /// The left curly bracket.
   @override
   Token leftBracket;
 
-  /**
-   * The enumeration constants being declared.
-   */
+  /// The enumeration constants being declared.
   NodeList<EnumConstantDeclaration> _constants;
 
-  /**
-   * The right curly bracket.
-   */
+  /// The right curly bracket.
   @override
   Token rightBracket;
 
-  /**
-   * Initialize a newly created enumeration declaration. Either or both of the
-   * [comment] and [metadata] can be `null` if the declaration does not have the
-   * corresponding attribute. The list of [constants] must contain at least one
-   * value.
-   */
+  /// Initialize a newly created enumeration declaration. Either or both of the
+  /// [comment] and [metadata] can be `null` if the declaration does not have
+  /// the corresponding attribute. The list of [constants] must contain at least
+  /// one value.
   EnumDeclarationImpl(
       CommentImpl comment,
       List<Annotation> metadata,
@@ -3916,10 +3457,8 @@
   }
 }
 
-/**
- * Ephemeral identifiers are created as needed to mimic the presence of an empty
- * identifier.
- */
+/// Ephemeral identifiers are created as needed to mimic the presence of an
+/// empty identifier.
 class EphemeralIdentifier extends SimpleIdentifierImpl {
   EphemeralIdentifier(AstNode parent, int location)
       : super(new StringToken(TokenType.IDENTIFIER, "", location)) {
@@ -3927,20 +3466,16 @@
   }
 }
 
-/**
- * An export directive.
- *
- *    exportDirective ::=
- *        [Annotation] 'export' [StringLiteral] [Combinator]* ';'
- */
+/// An export directive.
+///
+///    exportDirective ::=
+///        [Annotation] 'export' [StringLiteral] [Combinator]* ';'
 class ExportDirectiveImpl extends NamespaceDirectiveImpl
     implements ExportDirective {
-  /**
-   * Initialize a newly created export directive. Either or both of the
-   * [comment] and [metadata] can be `null` if the directive does not have the
-   * corresponding attribute. The list of [combinators] can be `null` if there
-   * are no combinators.
-   */
+  /// Initialize a newly created export directive. Either or both of the
+  /// [comment] and [metadata] can be `null` if the directive does not have the
+  /// corresponding attribute. The list of [combinators] can be `null` if there
+  /// are no combinators.
   ExportDirectiveImpl(
       CommentImpl comment,
       List<Annotation> metadata,
@@ -3954,6 +3489,7 @@
 
   @override
   Iterable<SyntacticEntity> get childEntities => super._childEntities
+    ..add(keyword)
     ..add(_uri)
     ..addAll(combinators)
     ..add(semicolon);
@@ -3979,44 +3515,32 @@
   }
 }
 
-/**
- * A function body consisting of a single expression.
- *
- *    expressionFunctionBody ::=
- *        'async'? '=>' [Expression] ';'
- */
+/// A function body consisting of a single expression.
+///
+///    expressionFunctionBody ::=
+///        'async'? '=>' [Expression] ';'
 class ExpressionFunctionBodyImpl extends FunctionBodyImpl
     implements ExpressionFunctionBody {
-  /**
-   * The token representing the 'async' keyword, or `null` if there is no such
-   * keyword.
-   */
+  /// The token representing the 'async' keyword, or `null` if there is no such
+  /// keyword.
   @override
   Token keyword;
 
-  /**
-   * The token introducing the expression that represents the body of the
-   * function.
-   */
+  /// The token introducing the expression that represents the body of the
+  /// function.
   @override
   Token functionDefinition;
 
-  /**
-   * The expression representing the body of the function.
-   */
+  /// The expression representing the body of the function.
   ExpressionImpl _expression;
 
-  /**
-   * The semicolon terminating the statement.
-   */
+  /// The semicolon terminating the statement.
   @override
   Token semicolon;
 
-  /**
-   * Initialize a newly created function body consisting of a block of
-   * statements. The [keyword] can be `null` if the function body is not an
-   * async function body.
-   */
+  /// Initialize a newly created function body consisting of a block of
+  /// statements. The [keyword] can be `null` if the function body is not an
+  /// async function body.
   ExpressionFunctionBodyImpl(this.keyword, this.functionDefinition,
       ExpressionImpl expression, this.semicolon) {
     _expression = _becomeParentOf(expression);
@@ -4069,29 +3593,23 @@
   }
 }
 
-/**
- * A node that represents an expression.
- *
- *    expression ::=
- *        [AssignmentExpression]
- *      | [ConditionalExpression] cascadeSection*
- *      | [ThrowExpression]
- */
+/// A node that represents an expression.
+///
+///    expression ::=
+///        [AssignmentExpression]
+///      | [ConditionalExpression] cascadeSection*
+///      | [ThrowExpression]
 abstract class ExpressionImpl extends AstNodeImpl
     implements CollectionElementImpl, Expression {
-  /**
-   * The static type of this expression, or `null` if the AST structure has not
-   * been resolved.
-   */
+  /// The static type of this expression, or `null` if the AST structure has not
+  /// been resolved.
   @override
   DartType staticType;
 
-  /**
-   * Return the best parameter element information available for this
-   * expression. If type propagation was able to find a better parameter element
-   * than static analysis, that type will be returned. Otherwise, the result of
-   * static analysis will be returned.
-   */
+  /// Return the best parameter element information available for this
+  /// expression. If type propagation was able to find a better parameter
+  /// element than static analysis, that type will be returned. Otherwise, the
+  /// result of static analysis will be returned.
   @override
   @deprecated
   ParameterElement get bestParameterElement => staticParameterElement;
@@ -4100,27 +3618,27 @@
   @deprecated
   DartType get bestType => staticType ?? DynamicTypeImpl.instance;
 
-  /**
-   * An expression _e_ is said to _occur in a constant context_,
-   * * if _e_ is an element of a constant list literal, or a key or value of an
-   *   entry of a constant map literal.
-   * * if _e_ is an actual argument of a constant object expression or of a
-   *   metadata annotation.
-   * * if _e_ is the initializing expression of a constant variable declaration.
-   * * if _e_ is a switch case expression.
-   * * if _e_ is an immediate subexpression of an expression _e1_ which occurs
-   *   in a constant context, unless _e1_ is a `throw` expression or a function
-   *   literal.
-   *
-   * This roughly means that everything which is inside a syntactically constant
-   * expression is in a constant context. A `throw` expression is currently not
-   * allowed in a constant expression, but extensions affecting that status may
-   * be considered. A similar situation arises for function literals.
-   *
-   * Note that the default value of an optional formal parameter is _not_ a
-   * constant context. This choice reserves some freedom to modify the semantics
-   * of default values.
-   */
+  /// An expression _e_ is said to _occur in a constant context_,
+  /// * if _e_ is an element of a constant list literal, or a key or value of an
+  ///   entry of a constant map literal.
+  /// * if _e_ is an actual argument of a constant object expression or of a
+  ///   metadata annotation.
+  /// * if _e_ is the initializing expression of a constant variable
+  ///   declaration.
+  /// * if _e_ is a switch case expression.
+  /// * if _e_ is an immediate subexpression of an expression _e1_ which occurs
+  ///   in a constant context, unless _e1_ is a `throw` expression or a function
+  ///   literal.
+  ///
+  /// This roughly means that everything which is inside a syntactically
+  /// constant expression is in a constant context. A `throw` expression is
+  /// currently not allowed in a constant expression, but extensions affecting
+  /// that status may be considered. A similar situation arises for function
+  /// literals.
+  ///
+  /// Note that the default value of an optional formal parameter is _not_ a
+  /// constant context. This choice reserves some freedom to modify the
+  /// semantics of default values.
   bool get inConstantContext {
     AstNode child = this;
     while (child is Expression ||
@@ -4157,6 +3675,10 @@
   @override
   bool get isAssignable => false;
 
+  @Deprecated('Use precedence')
+  @override
+  Precedence get precedence2 => precedence;
+
   @deprecated
   @override
   ParameterElement get propagatedParameterElement => null;
@@ -4202,29 +3724,21 @@
   Expression get unParenthesized => this;
 }
 
-/**
- * An expression used as a statement.
- *
- *    expressionStatement ::=
- *        [Expression]? ';'
- */
+/// An expression used as a statement.
+///
+///    expressionStatement ::=
+///        [Expression]? ';'
 class ExpressionStatementImpl extends StatementImpl
     implements ExpressionStatement {
-  /**
-   * The expression that comprises the statement.
-   */
+  /// The expression that comprises the statement.
   ExpressionImpl _expression;
 
-  /**
-   * The semicolon terminating the statement, or `null` if the expression is a
-   * function expression and therefore isn't followed by a semicolon.
-   */
+  /// The semicolon terminating the statement, or `null` if the expression is a
+  /// function expression and therefore isn't followed by a semicolon.
   @override
   Token semicolon;
 
-  /**
-   * Initialize a newly created expression statement.
-   */
+  /// Initialize a newly created expression statement.
   ExpressionStatementImpl(ExpressionImpl expression, this.semicolon) {
     _expression = _becomeParentOf(expression);
   }
@@ -4264,27 +3778,19 @@
   }
 }
 
-/**
- * The "extends" clause in a class declaration.
- *
- *    extendsClause ::=
- *        'extends' [TypeName]
- */
+/// The "extends" clause in a class declaration.
+///
+///    extendsClause ::=
+///        'extends' [TypeName]
 class ExtendsClauseImpl extends AstNodeImpl implements ExtendsClause {
-  /**
-   * The token representing the 'extends' keyword.
-   */
+  /// The token representing the 'extends' keyword.
   @override
   Token extendsKeyword;
 
-  /**
-   * The name of the class that is being extended.
-   */
+  /// The name of the class that is being extended.
   TypeNameImpl _superclass;
 
-  /**
-   * Initialize a newly created extends clause.
-   */
+  /// Initialize a newly created extends clause.
   ExtendsClauseImpl(this.extendsKeyword, TypeNameImpl superclass) {
     _superclass = _becomeParentOf(superclass);
   }
@@ -4316,43 +3822,31 @@
   }
 }
 
-/**
- * The declaration of one or more fields of the same type.
- *
- *    fieldDeclaration ::=
- *        'static'? [VariableDeclarationList] ';'
- */
+/// The declaration of one or more fields of the same type.
+///
+///    fieldDeclaration ::=
+///        'static'? [VariableDeclarationList] ';'
 class FieldDeclarationImpl extends ClassMemberImpl implements FieldDeclaration {
-  /**
-   * The 'covariant' keyword, or `null` if the keyword was not used.
-   */
+  /// The 'covariant' keyword, or `null` if the keyword was not used.
   @override
   Token covariantKeyword;
 
-  /**
-   * The token representing the 'static' keyword, or `null` if the fields are
-   * not static.
-   */
+  /// The token representing the 'static' keyword, or `null` if the fields are
+  /// not static.
   @override
   Token staticKeyword;
 
-  /**
-   * The fields being declared.
-   */
+  /// The fields being declared.
   VariableDeclarationListImpl _fieldList;
 
-  /**
-   * The semicolon terminating the declaration.
-   */
+  /// The semicolon terminating the declaration.
   @override
   Token semicolon;
 
-  /**
-   * Initialize a newly created field declaration. Either or both of the
-   * [comment] and [metadata] can be `null` if the declaration does not have the
-   * corresponding attribute. The [staticKeyword] can be `null` if the field is
-   * not a static field.
-   */
+  /// Initialize a newly created field declaration. Either or both of the
+  /// [comment] and [metadata] can be `null` if the declaration does not have
+  /// the corresponding attribute. The [staticKeyword] can be `null` if the
+  /// field is not a static field.
   FieldDeclarationImpl(
       CommentImpl comment,
       List<Annotation> metadata,
@@ -4409,65 +3903,51 @@
   }
 }
 
-/**
- * A field formal parameter.
- *
- *    fieldFormalParameter ::=
- *        ('final' [TypeName] | 'const' [TypeName] | 'var' | [TypeName])?
- *        'this' '.' [SimpleIdentifier] ([TypeParameterList]? [FormalParameterList])?
- */
+/// A field formal parameter.
+///
+///    fieldFormalParameter ::=
+///        ('final' [TypeName] | 'const' [TypeName] | 'var' | [TypeName])?
+///        'this' '.' [SimpleIdentifier]
+///        ([TypeParameterList]? [FormalParameterList])?
 class FieldFormalParameterImpl extends NormalFormalParameterImpl
     implements FieldFormalParameter {
-  /**
-   * The token representing either the 'final', 'const' or 'var' keyword, or
-   * `null` if no keyword was used.
-   */
+  /// The token representing either the 'final', 'const' or 'var' keyword, or
+  /// `null` if no keyword was used.
   @override
   Token keyword;
 
-  /**
-   * The name of the declared type of the parameter, or `null` if the parameter
-   * does not have a declared type.
-   */
+  /// The name of the declared type of the parameter, or `null` if the parameter
+  /// does not have a declared type.
   TypeAnnotationImpl _type;
 
-  /**
-   * The token representing the 'this' keyword.
-   */
+  /// The token representing the 'this' keyword.
   @override
   Token thisKeyword;
 
-  /**
-   * The token representing the period.
-   */
+  /// The token representing the period.
   @override
   Token period;
 
-  /**
-   * The type parameters associated with the method, or `null` if the method is
-   * not a generic method.
-   */
+  /// The type parameters associated with the method, or `null` if the method is
+  /// not a generic method.
   TypeParameterListImpl _typeParameters;
 
-  /**
-   * The parameters of the function-typed parameter, or `null` if this is not a
-   * function-typed field formal parameter.
-   */
+  /// The parameters of the function-typed parameter, or `null` if this is not a
+  /// function-typed field formal parameter.
   FormalParameterListImpl _parameters;
 
-  /**
-   * Initialize a newly created formal parameter. Either or both of the
-   * [comment] and [metadata] can be `null` if the parameter does not have the
-   * corresponding attribute. The [keyword] can be `null` if there is a type.
-   * The [type] must be `null` if the keyword is 'var'. The [thisKeyword] and
-   * [period] can be `null` if the keyword 'this' was not provided.  The
-   * [parameters] can be `null` if this is not a function-typed field formal
-   * parameter.
-   */
+  /// Initialize a newly created formal parameter. Either or both of the
+  /// [comment] and [metadata] can be `null` if the parameter does not have the
+  /// corresponding attribute. The [keyword] can be `null` if there is a type.
+  /// The [type] must be `null` if the keyword is 'var'. The [thisKeyword] and
+  /// [period] can be `null` if the keyword 'this' was not provided.  The
+  /// [parameters] can be `null` if this is not a function-typed field formal
+  /// parameter.
   FieldFormalParameterImpl(
       CommentImpl comment,
       List<Annotation> metadata,
       Token covariantKeyword,
+      Token requiredKeyword,
       this.keyword,
       TypeAnnotationImpl type,
       this.thisKeyword,
@@ -4475,7 +3955,8 @@
       SimpleIdentifierImpl identifier,
       TypeParameterListImpl typeParameters,
       FormalParameterListImpl parameters)
-      : super(comment, metadata, covariantKeyword, identifier) {
+      : super(
+            comment, metadata, covariantKeyword, requiredKeyword, identifier) {
     _type = _becomeParentOf(type);
     _typeParameters = _becomeParentOf(typeParameters);
     _parameters = _becomeParentOf(parameters);
@@ -4561,16 +4042,12 @@
   @override
   Token inKeyword;
 
-  /**
-   * The expression evaluated to produce the iterator.
-   */
+  /// The expression evaluated to produce the iterator.
   ExpressionImpl _iterable;
 
-  /**
-   * Initialize a newly created for-each statement whose loop control variable
-   * is declared internally (in the for-loop part). The [awaitKeyword] can be
-   * `null` if this is not an asynchronous for loop.
-   */
+  /// Initialize a newly created for-each statement whose loop control variable
+  /// is declared internally (in the for-loop part). The [awaitKeyword] can be
+  /// `null` if this is not an asynchronous for loop.
   ForEachPartsImpl(this.inKeyword, ExpressionImpl iterator) {
     _iterable = _becomeParentOf(iterator);
   }
@@ -4600,15 +4077,11 @@
 
 class ForEachPartsWithDeclarationImpl extends ForEachPartsImpl
     implements ForEachPartsWithDeclaration {
-  /**
-   * The declaration of the loop variable.
-   */
+  /// The declaration of the loop variable.
   DeclaredIdentifierImpl _loopVariable;
 
-  /**
-   * Initialize a newly created for-each statement whose loop control variable
-   * is declared internally (inside the for-loop part).
-   */
+  /// Initialize a newly created for-each statement whose loop control variable
+  /// is declared internally (inside the for-loop part).
   ForEachPartsWithDeclarationImpl(DeclaredIdentifierImpl loopVariable,
       Token inKeyword, ExpressionImpl iterator)
       : super(inKeyword, iterator) {
@@ -4643,15 +4116,11 @@
 
 class ForEachPartsWithIdentifierImpl extends ForEachPartsImpl
     implements ForEachPartsWithIdentifier {
-  /**
-   * The loop variable.
-   */
+  /// The loop variable.
   SimpleIdentifierImpl _identifier;
 
-  /**
-   * Initialize a newly created for-each statement whose loop control variable
-   * is declared externally (outside the for-loop part).
-   */
+  /// Initialize a newly created for-each statement whose loop control variable
+  /// is declared externally (outside the for-loop part).
   ForEachPartsWithIdentifierImpl(
       SimpleIdentifierImpl identifier, Token inKeyword, ExpressionImpl iterator)
       : super(inKeyword, iterator) {
@@ -4684,177 +4153,13 @@
   }
 }
 
-/**
- * A for-each statement.
- *
- *    forEachStatement ::=
- *        'await'? 'for' '(' [DeclaredIdentifier] 'in' [Expression] ')' [Block]
- *      | 'await'? 'for' '(' [SimpleIdentifier] 'in' [Expression] ')' [Block]
- */
-class ForEachStatementImpl extends StatementImpl implements ForEachStatement {
-  /**
-   * The token representing the 'await' keyword, or `null` if there is no
-   * 'await' keyword.
-   */
-  @override
-  Token awaitKeyword;
-
-  /**
-   * The token representing the 'for' keyword.
-   */
-  @override
-  Token forKeyword;
-
-  /**
-   * The left parenthesis.
-   */
-  @override
-  Token leftParenthesis;
-
-  /**
-   * The declaration of the loop variable, or `null` if the loop variable is a
-   * simple identifier.
-   */
-  DeclaredIdentifierImpl _loopVariable;
-
-  /**
-   * The loop variable, or `null` if the loop variable is declared in the 'for'.
-   */
-  SimpleIdentifierImpl _identifier;
-
-  /**
-   * The token representing the 'in' keyword.
-   */
-  @override
-  Token inKeyword;
-
-  /**
-   * The expression evaluated to produce the iterator.
-   */
-  ExpressionImpl _iterable;
-
-  /**
-   * The right parenthesis.
-   */
-  @override
-  Token rightParenthesis;
-
-  /**
-   * The body of the loop.
-   */
-  StatementImpl _body;
-
-  /**
-   * Initialize a newly created for-each statement whose loop control variable
-   * is declared internally (in the for-loop part). The [awaitKeyword] can be
-   * `null` if this is not an asynchronous for loop.
-   */
-  ForEachStatementImpl.withDeclaration(
-      this.awaitKeyword,
-      this.forKeyword,
-      this.leftParenthesis,
-      DeclaredIdentifierImpl loopVariable,
-      this.inKeyword,
-      ExpressionImpl iterator,
-      this.rightParenthesis,
-      StatementImpl body) {
-    _loopVariable = _becomeParentOf(loopVariable);
-    _iterable = _becomeParentOf(iterator);
-    _body = _becomeParentOf(body);
-  }
-
-  /**
-   * Initialize a newly created for-each statement whose loop control variable
-   * is declared outside the for loop. The [awaitKeyword] can be `null` if this
-   * is not an asynchronous for loop.
-   */
-  ForEachStatementImpl.withReference(
-      this.awaitKeyword,
-      this.forKeyword,
-      this.leftParenthesis,
-      SimpleIdentifierImpl identifier,
-      this.inKeyword,
-      ExpressionImpl iterator,
-      this.rightParenthesis,
-      StatementImpl body) {
-    _identifier = _becomeParentOf(identifier);
-    _iterable = _becomeParentOf(iterator);
-    _body = _becomeParentOf(body);
-  }
-
-  @override
-  Token get beginToken => awaitKeyword ?? forKeyword;
-
-  @override
-  Statement get body => _body;
-
-  @override
-  void set body(Statement statement) {
-    _body = _becomeParentOf(statement as StatementImpl);
-  }
-
-  @override
-  Iterable<SyntacticEntity> get childEntities => new ChildEntities()
-    ..add(awaitKeyword)
-    ..add(forKeyword)
-    ..add(leftParenthesis)
-    ..add(_loopVariable)
-    ..add(_identifier)
-    ..add(inKeyword)
-    ..add(_iterable)
-    ..add(rightParenthesis)
-    ..add(_body);
-
-  @override
-  Token get endToken => _body.endToken;
-
-  @override
-  SimpleIdentifier get identifier => _identifier;
-
-  @override
-  void set identifier(SimpleIdentifier identifier) {
-    _identifier = _becomeParentOf(identifier as SimpleIdentifierImpl);
-  }
-
-  @override
-  Expression get iterable => _iterable;
-
-  @override
-  void set iterable(Expression expression) {
-    _iterable = _becomeParentOf(expression as ExpressionImpl);
-  }
-
-  @override
-  DeclaredIdentifier get loopVariable => _loopVariable;
-
-  @override
-  void set loopVariable(DeclaredIdentifier variable) {
-    _loopVariable = _becomeParentOf(variable as DeclaredIdentifierImpl);
-  }
-
-  @override
-  E accept<E>(AstVisitor<E> visitor) => visitor.visitForEachStatement(this);
-
-  @override
-  void visitChildren(AstVisitor visitor) {
-    _loopVariable?.accept(visitor);
-    _identifier?.accept(visitor);
-    _iterable?.accept(visitor);
-    _body?.accept(visitor);
-  }
-}
-
 class ForElementImpl extends CollectionElementImpl
     with ForMixin
     implements ForElement {
-  /**
-   * The body of the loop.
-   */
+  /// The body of the loop.
   CollectionElementImpl _body;
 
-  /**
-   * Initialize a newly created for element.
-   */
+  /// Initialize a newly created for element.
   ForElementImpl(
       Token awaitKeyword,
       Token forKeyword,
@@ -4897,13 +4202,11 @@
 
 abstract class ForLoopPartsImpl extends AstNodeImpl implements ForLoopParts {}
 
-/**
- * A node representing a parameter to a function.
- *
- *    formalParameter ::=
- *        [NormalFormalParameter]
- *      | [DefaultFormalParameter]
- */
+/// A node representing a parameter to a function.
+///
+///    formalParameter ::=
+///        [NormalFormalParameter]
+///      | [DefaultFormalParameter]
 abstract class FormalParameterImpl extends AstNodeImpl
     implements FormalParameter {
   @override
@@ -4941,72 +4244,58 @@
   ParameterKind get kind;
 }
 
-/**
- * The formal parameter list of a method declaration, function declaration, or
- * function type alias.
- *
- * While the grammar requires all optional formal parameters to follow all of
- * the normal formal parameters and at most one grouping of optional formal
- * parameters, this class does not enforce those constraints. All parameters are
- * flattened into a single list, which can have any or all kinds of parameters
- * (normal, named, and positional) in any order.
- *
- *    formalParameterList ::=
- *        '(' ')'
- *      | '(' normalFormalParameters (',' optionalFormalParameters)? ')'
- *      | '(' optionalFormalParameters ')'
- *
- *    normalFormalParameters ::=
- *        [NormalFormalParameter] (',' [NormalFormalParameter])*
- *
- *    optionalFormalParameters ::=
- *        optionalPositionalFormalParameters
- *      | namedFormalParameters
- *
- *    optionalPositionalFormalParameters ::=
- *        '[' [DefaultFormalParameter] (',' [DefaultFormalParameter])* ']'
- *
- *    namedFormalParameters ::=
- *        '{' [DefaultFormalParameter] (',' [DefaultFormalParameter])* '}'
- */
+/// The formal parameter list of a method declaration, function declaration, or
+/// function type alias.
+///
+/// While the grammar requires all optional formal parameters to follow all of
+/// the normal formal parameters and at most one grouping of optional formal
+/// parameters, this class does not enforce those constraints. All parameters
+/// are flattened into a single list, which can have any or all kinds of
+/// parameters (normal, named, and positional) in any order.
+///
+///    formalParameterList ::=
+///        '(' ')'
+///      | '(' normalFormalParameters (',' optionalFormalParameters)? ')'
+///      | '(' optionalFormalParameters ')'
+///
+///    normalFormalParameters ::=
+///        [NormalFormalParameter] (',' [NormalFormalParameter])*
+///
+///    optionalFormalParameters ::=
+///        optionalPositionalFormalParameters
+///      | namedFormalParameters
+///
+///    optionalPositionalFormalParameters ::=
+///        '[' [DefaultFormalParameter] (',' [DefaultFormalParameter])* ']'
+///
+///    namedFormalParameters ::=
+///        '{' [DefaultFormalParameter] (',' [DefaultFormalParameter])* '}'
 class FormalParameterListImpl extends AstNodeImpl
     implements FormalParameterList {
-  /**
-   * The left parenthesis.
-   */
+  /// The left parenthesis.
   @override
   Token leftParenthesis;
 
-  /**
-   * The parameters associated with the method.
-   */
+  /// The parameters associated with the method.
   NodeList<FormalParameter> _parameters;
 
-  /**
-   * The left square bracket ('[') or left curly brace ('{') introducing the
-   * optional parameters, or `null` if there are no optional parameters.
-   */
+  /// The left square bracket ('[') or left curly brace ('{') introducing the
+  /// optional parameters, or `null` if there are no optional parameters.
   @override
   Token leftDelimiter;
 
-  /**
-   * The right square bracket (']') or right curly brace ('}') terminating the
-   * optional parameters, or `null` if there are no optional parameters.
-   */
+  /// The right square bracket (']') or right curly brace ('}') terminating the
+  /// optional parameters, or `null` if there are no optional parameters.
   @override
   Token rightDelimiter;
 
-  /**
-   * The right parenthesis.
-   */
+  /// The right parenthesis.
   @override
   Token rightParenthesis;
 
-  /**
-   * Initialize a newly created parameter list. The list of [parameters] can be
-   * `null` if there are no parameters. The [leftDelimiter] and [rightDelimiter]
-   * can be `null` if there are no optional parameters.
-   */
+  /// Initialize a newly created parameter list. The list of [parameters] can be
+  /// `null` if there are no parameters. The [leftDelimiter] and
+  /// [rightDelimiter] can be `null` if there are no optional parameters.
   FormalParameterListImpl(
       this.leftParenthesis,
       List<FormalParameter> parameters,
@@ -5094,26 +4383,20 @@
   @override
   Token leftSeparator;
 
-  /**
-   * The condition used to determine when to terminate the loop, or `null` if
-   * there is no condition.
-   */
+  /// The condition used to determine when to terminate the loop, or `null` if
+  /// there is no condition.
   ExpressionImpl _condition;
 
   @override
   Token rightSeparator;
 
-  /**
-   * The list of expressions run after each execution of the loop body.
-   */
+  /// The list of expressions run after each execution of the loop body.
   NodeList<Expression> _updaters;
 
-  /**
-   * Initialize a newly created for statement. Either the [variableList] or the
-   * [initialization] must be `null`. Either the [condition] and the list of
-   * [updaters] can be `null` if the loop does not have the corresponding
-   * attribute.
-   */
+  /// Initialize a newly created for statement. Either the [variableList] or the
+  /// [initialization] must be `null`. Either the [condition] and the list of
+  /// [updaters] can be `null` if the loop does not have the corresponding
+  /// attribute.
   ForPartsImpl(this.leftSeparator, ExpressionImpl condition,
       this.rightSeparator, List<Expression> updaters) {
     _condition = _becomeParentOf(condition);
@@ -5152,18 +4435,14 @@
 
 class ForPartsWithDeclarationsImpl extends ForPartsImpl
     implements ForPartsWithDeclarations {
-  /**
-   * The declaration of the loop variables, or `null` if there are no variables.
-   * Note that a for statement cannot have both a variable list and an
-   * initialization expression, but can validly have neither.
-   */
+  /// The declaration of the loop variables, or `null` if there are no
+  /// variables.  Note that a for statement cannot have both a variable list and
+  /// an initialization expression, but can validly have neither.
   VariableDeclarationListImpl _variableList;
 
-  /**
-   * Initialize a newly created for statement. Both the [condition] and the list
-   * of [updaters] can be `null` if the loop does not have the corresponding
-   * attribute.
-   */
+  /// Initialize a newly created for statement. Both the [condition] and the
+  /// list of [updaters] can be `null` if the loop does not have the
+  /// corresponding attribute.
   ForPartsWithDeclarationsImpl(
       VariableDeclarationListImpl variableList,
       Token leftSeparator,
@@ -5203,18 +4482,14 @@
 
 class ForPartsWithExpressionImpl extends ForPartsImpl
     implements ForPartsWithExpression {
-  /**
-   * The initialization expression, or `null` if there is no initialization
-   * expression. Note that a for statement cannot have both a variable list and
-   * an initialization expression, but can validly have neither.
-   */
+  /// The initialization expression, or `null` if there is no initialization
+  /// expression. Note that a for statement cannot have both a variable list and
+  /// an initialization expression, but can validly have neither.
   ExpressionImpl _initialization;
 
-  /**
-   * Initialize a newly created for statement. Both the [condition] and the list
-   * of [updaters] can be `null` if the loop does not have the corresponding
-   * attribute.
-   */
+  /// Initialize a newly created for statement. Both the [condition] and the
+  /// list of [updaters] can be `null` if the loop does not have the
+  /// corresponding attribute.
   ForPartsWithExpressionImpl(ExpressionImpl initialization, Token leftSeparator,
       ExpressionImpl condition, Token rightSeparator, List<Expression> updaters)
       : super(leftSeparator, condition, rightSeparator, updaters) {
@@ -5247,24 +4522,12 @@
   }
 }
 
-class ForStatement2Impl extends StatementImpl
-    with ForMixin
-    implements ForStatement2 {
-  /**
-   * The body of the loop.
-   */
-  StatementImpl _body;
-
-  /**
-   * Initialize a newly created for statement.
-   */
-  ForStatement2Impl(
-      Token awaitKeyword,
-      Token forKeyword,
-      Token leftParenthesis,
-      ForLoopPartsImpl forLoopParts,
-      Token rightParenthesis,
-      StatementImpl body) {
+@Deprecated('Replaced by ForStatementImpl')
+class ForStatement2Impl extends ForStatementImpl implements ForStatement2 {
+  /// Initialize a newly created for statement.
+  ForStatement2Impl(Token awaitKeyword, Token forKeyword, Token leftParenthesis,
+      ForLoopPartsImpl forLoopParts, Token rightParenthesis, StatementImpl body)
+      : super._() {
     this.awaitKeyword = awaitKeyword;
     this.forKeyword = forKeyword;
     this.leftParenthesis = leftParenthesis;
@@ -5274,6 +4537,27 @@
   }
 
   @override
+  E accept<E>(AstVisitor<E> visitor) => visitor.visitForStatement2(this);
+}
+
+abstract class ForStatementImpl extends StatementImpl
+    with ForMixin
+    implements ForStatement {
+  /// The body of the loop.
+  StatementImpl _body;
+
+  /// Initialize a newly created for statement.
+  factory ForStatementImpl(
+      Token awaitKeyword,
+      Token forKeyword,
+      Token leftParenthesis,
+      ForLoopPartsImpl forLoopParts,
+      Token rightParenthesis,
+      // ignore: deprecated_member_use_from_same_package
+      StatementImpl body) = ForStatement2Impl;
+
+  ForStatementImpl._();
+
   Statement get body => _body;
 
   void set body(Statement statement) {
@@ -5289,7 +4573,7 @@
   Token get endToken => _body.endToken;
 
   @override
-  E accept<E>(AstVisitor<E> visitor) => visitor.visitForStatement2(this);
+  E accept<E>(AstVisitor<E> visitor) => visitor.visitForStatement(this);
 
   @override
   void visitChildren(AstVisitor visitor) {
@@ -5298,217 +4582,37 @@
   }
 }
 
-/**
- * A for statement.
- *
- *    forStatement ::=
- *        'for' '(' forLoopParts ')' [Statement]
- *
- *    forLoopParts ::=
- *        forInitializerStatement ';' [Expression]? ';' [Expression]?
- *
- *    forInitializerStatement ::=
- *        [DefaultFormalParameter]
- *      | [Expression]?
- */
-class ForStatementImpl extends StatementImpl implements ForStatement {
-  /**
-   * The token representing the 'for' keyword.
-   */
-  @override
-  Token forKeyword;
-
-  /**
-   * The left parenthesis.
-   */
-  @override
-  Token leftParenthesis;
-
-  /**
-   * The declaration of the loop variables, or `null` if there are no variables.
-   * Note that a for statement cannot have both a variable list and an
-   * initialization expression, but can validly have neither.
-   */
-  VariableDeclarationListImpl _variableList;
-
-  /**
-   * The initialization expression, or `null` if there is no initialization
-   * expression. Note that a for statement cannot have both a variable list and
-   * an initialization expression, but can validly have neither.
-   */
-  ExpressionImpl _initialization;
-
-  /**
-   * The semicolon separating the initializer and the condition.
-   */
-  @override
-  Token leftSeparator;
-
-  /**
-   * The condition used to determine when to terminate the loop, or `null` if
-   * there is no condition.
-   */
-  ExpressionImpl _condition;
-
-  /**
-   * The semicolon separating the condition and the updater.
-   */
-  @override
-  Token rightSeparator;
-
-  /**
-   * The list of expressions run after each execution of the loop body.
-   */
-  NodeList<Expression> _updaters;
-
-  /**
-   * The right parenthesis.
-   */
-  @override
-  Token rightParenthesis;
-
-  /**
-   * The body of the loop.
-   */
-  StatementImpl _body;
-
-  /**
-   * Initialize a newly created for statement. Either the [variableList] or the
-   * [initialization] must be `null`. Either the [condition] and the list of
-   * [updaters] can be `null` if the loop does not have the corresponding
-   * attribute.
-   */
-  ForStatementImpl(
-      this.forKeyword,
-      this.leftParenthesis,
-      VariableDeclarationListImpl variableList,
-      ExpressionImpl initialization,
-      this.leftSeparator,
-      ExpressionImpl condition,
-      this.rightSeparator,
-      List<Expression> updaters,
-      this.rightParenthesis,
-      StatementImpl body) {
-    _variableList = _becomeParentOf(variableList);
-    _initialization = _becomeParentOf(initialization);
-    _condition = _becomeParentOf(condition);
-    _updaters = new NodeListImpl<Expression>(this, updaters);
-    _body = _becomeParentOf(body);
-  }
-
-  @override
-  Token get beginToken => forKeyword;
-
-  @override
-  Statement get body => _body;
-
-  @override
-  void set body(Statement statement) {
-    _body = _becomeParentOf(statement as StatementImpl);
-  }
-
-  @override
-  Iterable<SyntacticEntity> get childEntities => new ChildEntities()
-    ..add(forKeyword)
-    ..add(leftParenthesis)
-    ..add(_variableList)
-    ..add(_initialization)
-    ..add(leftSeparator)
-    ..add(_condition)
-    ..add(rightSeparator)
-    ..addAll(_updaters)
-    ..add(rightParenthesis)
-    ..add(_body);
-
-  @override
-  Expression get condition => _condition;
-
-  @override
-  void set condition(Expression expression) {
-    _condition = _becomeParentOf(expression as ExpressionImpl);
-  }
-
-  @override
-  Token get endToken => _body.endToken;
-
-  @override
-  Expression get initialization => _initialization;
-
-  @override
-  void set initialization(Expression initialization) {
-    _initialization = _becomeParentOf(initialization as ExpressionImpl);
-  }
-
-  @override
-  NodeList<Expression> get updaters => _updaters;
-
-  @override
-  VariableDeclarationList get variables => _variableList;
-
-  @override
-  void set variables(VariableDeclarationList variableList) {
-    _variableList =
-        _becomeParentOf(variableList as VariableDeclarationListImpl);
-  }
-
-  @override
-  E accept<E>(AstVisitor<E> visitor) => visitor.visitForStatement(this);
-
-  @override
-  void visitChildren(AstVisitor visitor) {
-    _variableList?.accept(visitor);
-    _initialization?.accept(visitor);
-    _condition?.accept(visitor);
-    _updaters.accept(visitor);
-    _body?.accept(visitor);
-  }
-}
-
-/**
- * A node representing the body of a function or method.
- *
- *    functionBody ::=
- *        [BlockFunctionBody]
- *      | [EmptyFunctionBody]
- *      | [ExpressionFunctionBody]
- */
+/// A node representing the body of a function or method.
+///
+///    functionBody ::=
+///        [BlockFunctionBody]
+///      | [EmptyFunctionBody]
+///      | [ExpressionFunctionBody]
 abstract class FunctionBodyImpl extends AstNodeImpl implements FunctionBody {
-  /**
-   * Additional information about local variables and parameters that are
-   * declared within this function body or any enclosing function body.  `null`
-   * if resolution has not yet been performed.
-   */
+  /// Additional information about local variables and parameters that are
+  /// declared within this function body or any enclosing function body.  `null`
+  /// if resolution has not yet been performed.
   LocalVariableInfo localVariableInfo;
 
-  /**
-   * Return `true` if this function body is asynchronous.
-   */
+  /// Return `true` if this function body is asynchronous.
   @override
   bool get isAsynchronous => false;
 
-  /**
-   * Return `true` if this function body is a generator.
-   */
+  /// Return `true` if this function body is a generator.
   @override
   bool get isGenerator => false;
 
-  /**
-   * Return `true` if this function body is synchronous.
-   */
+  /// Return `true` if this function body is synchronous.
   @override
   bool get isSynchronous => true;
 
-  /**
-   * Return the token representing the 'async' or 'sync' keyword, or `null` if
-   * there is no such keyword.
-   */
+  /// Return the token representing the 'async' or 'sync' keyword, or `null` if
+  /// there is no such keyword.
   @override
   Token get keyword => null;
 
-  /**
-   * Return the star following the 'async' or 'sync' keyword, or `null` if there
-   * is no star.
-   */
+  /// Return the star following the 'async' or 'sync' keyword, or `null` if
+  /// there is no star.
   @override
   Token get star => null;
 
@@ -5529,50 +4633,38 @@
   }
 }
 
-/**
- * A top-level declaration.
- *
- *    functionDeclaration ::=
- *        'external' functionSignature
- *      | functionSignature [FunctionBody]
- *
- *    functionSignature ::=
- *        [Type]? ('get' | 'set')? [SimpleIdentifier] [FormalParameterList]
- */
+/// A top-level declaration.
+///
+///    functionDeclaration ::=
+///        'external' functionSignature
+///      | functionSignature [FunctionBody]
+///
+///    functionSignature ::=
+///        [Type]? ('get' | 'set')? [SimpleIdentifier] [FormalParameterList]
 class FunctionDeclarationImpl extends NamedCompilationUnitMemberImpl
     implements FunctionDeclaration {
-  /**
-   * The token representing the 'external' keyword, or `null` if this is not an
-   * external function.
-   */
+  /// The token representing the 'external' keyword, or `null` if this is not an
+  /// external function.
   @override
   Token externalKeyword;
 
-  /**
-   * The return type of the function, or `null` if no return type was declared.
-   */
+  /// The return type of the function, or `null` if no return type was declared.
   TypeAnnotationImpl _returnType;
 
-  /**
-   * The token representing the 'get' or 'set' keyword, or `null` if this is a
-   * function declaration rather than a property declaration.
-   */
+  /// The token representing the 'get' or 'set' keyword, or `null` if this is a
+  /// function declaration rather than a property declaration.
   @override
   Token propertyKeyword;
 
-  /**
-   * The function expression being wrapped.
-   */
+  /// The function expression being wrapped.
   FunctionExpressionImpl _functionExpression;
 
-  /**
-   * Initialize a newly created function declaration. Either or both of the
-   * [comment] and [metadata] can be `null` if the function does not have the
-   * corresponding attribute. The [externalKeyword] can be `null` if the
-   * function is not an external function. The [returnType] can be `null` if no
-   * return type was specified. The [propertyKeyword] can be `null` if the
-   * function is neither a getter or a setter.
-   */
+  /// Initialize a newly created function declaration. Either or both of the
+  /// [comment] and [metadata] can be `null` if the function does not have the
+  /// corresponding attribute. The [externalKeyword] can be `null` if the
+  /// function is not an external function. The [returnType] can be `null` if no
+  /// return type was specified. The [propertyKeyword] can be `null` if the
+  /// function is neither a getter or a setter.
   FunctionDeclarationImpl(
       CommentImpl comment,
       List<Annotation> metadata,
@@ -5654,19 +4746,13 @@
   }
 }
 
-/**
- * A [FunctionDeclaration] used as a statement.
- */
+/// A [FunctionDeclaration] used as a statement.
 class FunctionDeclarationStatementImpl extends StatementImpl
     implements FunctionDeclarationStatement {
-  /**
-   * The function declaration being wrapped.
-   */
+  /// The function declaration being wrapped.
   FunctionDeclarationImpl _functionDeclaration;
 
-  /**
-   * Initialize a newly created function declaration statement.
-   */
+  /// Initialize a newly created function declaration statement.
   FunctionDeclarationStatementImpl(
       FunctionDeclarationImpl functionDeclaration) {
     _functionDeclaration = _becomeParentOf(functionDeclaration);
@@ -5701,36 +4787,26 @@
   }
 }
 
-/**
- * A function expression.
- *
- *    functionExpression ::=
- *        [TypeParameterList]? [FormalParameterList] [FunctionBody]
- */
+/// A function expression.
+///
+///    functionExpression ::=
+///        [TypeParameterList]? [FormalParameterList] [FunctionBody]
 class FunctionExpressionImpl extends ExpressionImpl
     implements FunctionExpression {
-  /**
-   * The type parameters associated with the method, or `null` if the method is
-   * not a generic method.
-   */
+  /// The type parameters associated with the method, or `null` if the method is
+  /// not a generic method.
   TypeParameterListImpl _typeParameters;
 
-  /**
-   * The parameters associated with the function.
-   */
+  /// The parameters associated with the function.
   FormalParameterListImpl _parameters;
 
-  /**
-   * The body of the function, or `null` if this is an external function.
-   */
+  /// The body of the function, or `null` if this is an external function.
   FunctionBodyImpl _body;
 
   @override
   ExecutableElement declaredElement;
 
-  /**
-   * Initialize a newly created function declaration.
-   */
+  /// Initialize a newly created function declaration.
   FunctionExpressionImpl(TypeParameterListImpl typeParameters,
       FormalParameterListImpl parameters, FunctionBodyImpl body) {
     _typeParameters = _becomeParentOf(typeParameters);
@@ -5795,7 +4871,7 @@
   }
 
   @override
-  int get precedence => 16;
+  Precedence get precedence => Precedence.primary;
 
   @override
   TypeParameterList get typeParameters => _typeParameters;
@@ -5816,33 +4892,25 @@
   }
 }
 
-/**
- * The invocation of a function resulting from evaluating an expression.
- * Invocations of methods and other forms of functions are represented by
- * [MethodInvocation] nodes. Invocations of getters and setters are represented
- * by either [PrefixedIdentifier] or [PropertyAccess] nodes.
- *
- *    functionExpressionInvocation ::=
- *        [Expression] [TypeArgumentList]? [ArgumentList]
- */
+/// The invocation of a function resulting from evaluating an expression.
+/// Invocations of methods and other forms of functions are represented by
+/// [MethodInvocation] nodes. Invocations of getters and setters are represented
+/// by either [PrefixedIdentifier] or [PropertyAccess] nodes.
+///
+///    functionExpressionInvocation ::=
+///        [Expression] [TypeArgumentList]? [ArgumentList]
 class FunctionExpressionInvocationImpl extends InvocationExpressionImpl
     implements FunctionExpressionInvocation {
-  /**
-   * The expression producing the function being invoked.
-   */
+  /// The expression producing the function being invoked.
   ExpressionImpl _function;
 
-  /**
-   * The element associated with the function being invoked based on static type
-   * information, or `null` if the AST structure has not been resolved or the
-   * function could not be resolved.
-   */
+  /// The element associated with the function being invoked based on static
+  /// type information, or `null` if the AST structure has not been resolved or
+  /// the function could not be resolved.
   @override
   ExecutableElement staticElement;
 
-  /**
-   * Initialize a newly created function expression invocation.
-   */
+  /// Initialize a newly created function expression invocation.
   FunctionExpressionInvocationImpl(ExpressionImpl function,
       TypeArgumentListImpl typeArguments, ArgumentListImpl argumentList)
       : super(typeArguments, argumentList) {
@@ -5872,7 +4940,7 @@
   }
 
   @override
-  int get precedence => 15;
+  Precedence get precedence => Precedence.postfix;
 
   @deprecated
   @override
@@ -5894,40 +4962,30 @@
   }
 }
 
-/**
- * A function type alias.
- *
- *    functionTypeAlias ::=
- *        functionPrefix [TypeParameterList]? [FormalParameterList] ';'
- *
- *    functionPrefix ::=
- *        [TypeName]? [SimpleIdentifier]
- */
+/// A function type alias.
+///
+///    functionTypeAlias ::=
+///        functionPrefix [TypeParameterList]? [FormalParameterList] ';'
+///
+///    functionPrefix ::=
+///        [TypeName]? [SimpleIdentifier]
 class FunctionTypeAliasImpl extends TypeAliasImpl implements FunctionTypeAlias {
-  /**
-   * The name of the return type of the function type being defined, or `null`
-   * if no return type was given.
-   */
+  /// The name of the return type of the function type being defined, or `null`
+  /// if no return type was given.
   TypeAnnotationImpl _returnType;
 
-  /**
-   * The type parameters for the function type, or `null` if the function type
-   * does not have any type parameters.
-   */
+  /// The type parameters for the function type, or `null` if the function type
+  /// does not have any type parameters.
   TypeParameterListImpl _typeParameters;
 
-  /**
-   * The parameters associated with the function type.
-   */
+  /// The parameters associated with the function type.
   FormalParameterListImpl _parameters;
 
-  /**
-   * Initialize a newly created function type alias. Either or both of the
-   * [comment] and [metadata] can be `null` if the function does not have the
-   * corresponding attribute. The [returnType] can be `null` if no return type
-   * was specified. The [typeParameters] can be `null` if the function has no
-   * type parameters.
-   */
+  /// Initialize a newly created function type alias. Either or both of the
+  /// [comment] and [metadata] can be `null` if the function does not have the
+  /// corresponding attribute. The [returnType] can be `null` if no return type
+  /// was specified. The [typeParameters] can be `null` if the function has no
+  /// type parameters.
   FunctionTypeAliasImpl(
       CommentImpl comment,
       List<Annotation> metadata,
@@ -5997,46 +5055,39 @@
   }
 }
 
-/**
- * A function-typed formal parameter.
- *
- *    functionSignature ::=
- *        [TypeName]? [SimpleIdentifier] [TypeParameterList]? [FormalParameterList]
- */
+/// A function-typed formal parameter.
+///
+///    functionSignature ::=
+///        [TypeName]? [SimpleIdentifier] [TypeParameterList]?
+///        [FormalParameterList]
 class FunctionTypedFormalParameterImpl extends NormalFormalParameterImpl
     implements FunctionTypedFormalParameter {
-  /**
-   * The return type of the function, or `null` if the function does not have a
-   * return type.
-   */
+  /// The return type of the function, or `null` if the function does not have a
+  /// return type.
   TypeAnnotationImpl _returnType;
 
-  /**
-   * The type parameters associated with the function, or `null` if the function
-   * is not a generic function.
-   */
+  /// The type parameters associated with the function, or `null` if the
+  /// function is not a generic function.
   TypeParameterListImpl _typeParameters;
 
-  /**
-   * The parameters of the function-typed parameter.
-   */
+  /// The parameters of the function-typed parameter.
   FormalParameterListImpl _parameters;
 
-  /**
-   * Initialize a newly created formal parameter. Either or both of the
-   * [comment] and [metadata] can be `null` if the parameter does not have the
-   * corresponding attribute. The [returnType] can be `null` if no return type
-   * was specified.
-   */
+  /// Initialize a newly created formal parameter. Either or both of the
+  /// [comment] and [metadata] can be `null` if the parameter does not have the
+  /// corresponding attribute. The [returnType] can be `null` if no return type
+  /// was specified.
   FunctionTypedFormalParameterImpl(
       CommentImpl comment,
       List<Annotation> metadata,
       Token covariantKeyword,
+      Token requiredKeyword,
       TypeAnnotationImpl returnType,
       SimpleIdentifierImpl identifier,
       TypeParameterListImpl typeParameters,
       FormalParameterListImpl parameters)
-      : super(comment, metadata, covariantKeyword, identifier) {
+      : super(
+            comment, metadata, covariantKeyword, requiredKeyword, identifier) {
     _returnType = _becomeParentOf(returnType);
     _typeParameters = _becomeParentOf(typeParameters);
     _parameters = _becomeParentOf(parameters);
@@ -6100,55 +5151,48 @@
   }
 }
 
-/**
- * An anonymous function type.
- *
- *    functionType ::=
- *        [TypeAnnotation]? 'Function' [TypeParameterList]? [FormalParameterList]
- *
- * where the FormalParameterList is being used to represent the following
- * grammar, despite the fact that FormalParameterList can represent a much
- * larger grammar than the one below. This is done in order to simplify the
- * implementation.
- *
- *    parameterTypeList ::=
- *        () |
- *        ( normalParameterTypes ,? ) |
- *        ( normalParameterTypes , optionalParameterTypes ) |
- *        ( optionalParameterTypes )
- *    namedParameterTypes ::=
- *        { namedParameterType (, namedParameterType)* ,? }
- *    namedParameterType ::=
- *        [TypeAnnotation]? [SimpleIdentifier]
- *    normalParameterTypes ::=
- *        normalParameterType (, normalParameterType)*
- *    normalParameterType ::=
- *        [TypeAnnotation] [SimpleIdentifier]?
- *    optionalParameterTypes ::=
- *        optionalPositionalParameterTypes | namedParameterTypes
- *    optionalPositionalParameterTypes ::=
- *        [ normalParameterTypes ,? ]
- */
+/// An anonymous function type.
+///
+///    functionType ::=
+///        [TypeAnnotation]? 'Function' [TypeParameterList]?
+///        [FormalParameterList]
+///
+/// where the FormalParameterList is being used to represent the following
+/// grammar, despite the fact that FormalParameterList can represent a much
+/// larger grammar than the one below. This is done in order to simplify the
+/// implementation.
+///
+///    parameterTypeList ::=
+///        () |
+///        ( normalParameterTypes ,? ) |
+///        ( normalParameterTypes , optionalParameterTypes ) |
+///        ( optionalParameterTypes )
+///    namedParameterTypes ::=
+///        { namedParameterType (, namedParameterType)* ,? }
+///    namedParameterType ::=
+///        [TypeAnnotation]? [SimpleIdentifier]
+///    normalParameterTypes ::=
+///        normalParameterType (, normalParameterType)*
+///    normalParameterType ::=
+///        [TypeAnnotation] [SimpleIdentifier]?
+///    optionalParameterTypes ::=
+///        optionalPositionalParameterTypes | namedParameterTypes
+///    optionalPositionalParameterTypes ::=
+///        [ normalParameterTypes ,? ]
 class GenericFunctionTypeImpl extends TypeAnnotationImpl
     implements GenericFunctionType {
-  /**
-   * The name of the return type of the function type being defined, or
-   * `null` if no return type was given.
-   */
+  /// The name of the return type of the function type being defined, or
+  /// `null` if no return type was given.
   TypeAnnotationImpl _returnType;
 
   @override
   Token functionKeyword;
 
-  /**
-   * The type parameters for the function type, or `null` if the function type
-   * does not have any type parameters.
-   */
+  /// The type parameters for the function type, or `null` if the function type
+  /// does not have any type parameters.
   TypeParameterListImpl _typeParameters;
 
-  /**
-   * The parameters associated with the function type.
-   */
+  /// The parameters associated with the function type.
   FormalParameterListImpl _parameters;
 
   @override
@@ -6157,9 +5201,7 @@
   @override
   DartType type;
 
-  /**
-   * Initialize a newly created generic function type.
-   */
+  /// Initialize a newly created generic function type.
   GenericFunctionTypeImpl(TypeAnnotationImpl returnType, this.functionKeyword,
       TypeParameterListImpl typeParameters, FormalParameterListImpl parameters,
       {this.question}) {
@@ -6198,16 +5240,12 @@
     _returnType = _becomeParentOf(type as TypeAnnotationImpl);
   }
 
-  /**
-   * Return the type parameters for the function type, or `null` if the function
-   * type does not have any type parameters.
-   */
+  /// Return the type parameters for the function type, or `null` if the
+  /// function type does not have any type parameters.
   TypeParameterList get typeParameters => _typeParameters;
 
-  /**
-   * Set the type parameters for the function type to the given list of
-   * [typeParameters].
-   */
+  /// Set the type parameters for the function type to the given list of
+  /// [typeParameters].
   void set typeParameters(TypeParameterList typeParameters) {
     _typeParameters = _becomeParentOf(typeParameters as TypeParameterListImpl);
   }
@@ -6226,33 +5264,26 @@
   }
 }
 
-/**
- * A generic type alias.
- *
- *    functionTypeAlias ::=
- *        metadata 'typedef' [SimpleIdentifier] [TypeParameterList]? = [FunctionType] ';'
- */
+/// A generic type alias.
+///
+///    functionTypeAlias ::=
+///        metadata 'typedef' [SimpleIdentifier] [TypeParameterList]? =
+///        [FunctionType] ';'
 class GenericTypeAliasImpl extends TypeAliasImpl implements GenericTypeAlias {
-  /**
-   * The type parameters for the function type, or `null` if the function
-   * type does not have any type parameters.
-   */
+  /// The type parameters for the function type, or `null` if the function
+  /// type does not have any type parameters.
   TypeParameterListImpl _typeParameters;
 
   @override
   Token equals;
 
-  /**
-   * The type of function being defined by the alias.
-   */
+  /// The type of function being defined by the alias.
   GenericFunctionTypeImpl _functionType;
 
-  /**
-   * Returns a newly created generic type alias. Either or both of the
-   * [comment] and [metadata] can be `null` if the variable list does not have
-   * the corresponding attribute. The [typeParameters] can be `null` if there
-   * are no type parameters.
-   */
+  /// Returns a newly created generic type alias. Either or both of the
+  /// [comment] and [metadata] can be `null` if the variable list does not have
+  /// the corresponding attribute. The [typeParameters] can be `null` if there
+  /// are no type parameters.
   GenericTypeAliasImpl(
       CommentImpl comment,
       List<Annotation> metadata,
@@ -6313,22 +5344,16 @@
   }
 }
 
-/**
- * A combinator that restricts the names being imported to those that are not in
- * a given list.
- *
- *    hideCombinator ::=
- *        'hide' [SimpleIdentifier] (',' [SimpleIdentifier])*
- */
+/// A combinator that restricts the names being imported to those that are not
+/// in a given list.
+///
+///    hideCombinator ::=
+///        'hide' [SimpleIdentifier] (',' [SimpleIdentifier])*
 class HideCombinatorImpl extends CombinatorImpl implements HideCombinator {
-  /**
-   * The list of names from the library that are hidden by this combinator.
-   */
+  /// The list of names from the library that are hidden by this combinator.
   NodeList<SimpleIdentifier> _hiddenNames;
 
-  /**
-   * Initialize a newly created import show combinator.
-   */
+  /// Initialize a newly created import show combinator.
   HideCombinatorImpl(Token keyword, List<SimpleIdentifier> hiddenNames)
       : super(keyword) {
     _hiddenNames = new NodeListImpl<SimpleIdentifier>(this, hiddenNames);
@@ -6354,21 +5379,17 @@
   }
 }
 
-/**
- * A node that represents an identifier.
- *
- *    identifier ::=
- *        [SimpleIdentifier]
- *      | [PrefixedIdentifier]
- */
+/// A node that represents an identifier.
+///
+///    identifier ::=
+///        [SimpleIdentifier]
+///      | [PrefixedIdentifier]
 abstract class IdentifierImpl extends ExpressionImpl implements Identifier {
-  /**
-   * Return the best element available for this operator. If resolution was able
-   * to find a better element based on type propagation, that element will be
-   * returned. Otherwise, the element found using the result of static analysis
-   * will be returned. If resolution has not been performed, then `null` will be
-   * returned.
-   */
+  /// Return the best element available for this operator. If resolution was
+  /// able to find a better element based on type propagation, that element will
+  /// be returned. Otherwise, the element found using the result of static
+  /// analysis will be returned. If resolution has not been performed, then `null` will
+  /// be returned.
   @override
   @deprecated
   Element get bestElement;
@@ -6380,20 +5401,14 @@
 class IfElementImpl extends CollectionElementImpl
     with IfMixin
     implements IfElement {
-  /**
-   * The element to be executed if the condition is `true`.
-   */
+  /// The element to be executed if the condition is `true`.
   CollectionElementImpl _thenElement;
 
-  /**
-   * The element to be executed if the condition is `false`, or `null` if there
-   * is no such element.
-   */
+  /// The element to be executed if the condition is `false`, or `null` if there
+  /// is no such element.
   CollectionElementImpl _elseElement;
 
-  /**
-   * Initialize a newly created for element.
-   */
+  /// Initialize a newly created for element.
   IfElementImpl(
       Token ifKeyword,
       Token leftParenthesis,
@@ -6415,6 +5430,7 @@
   Iterable<SyntacticEntity> get childEntities => new ChildEntities()
     ..addAll(super.childEntities)
     ..add(_thenElement)
+    ..add(elseKeyword)
     ..add(_elseElement);
 
   @override
@@ -6450,9 +5466,7 @@
 
   Token leftParenthesis;
 
-  /**
-   * The condition used to determine which of the branches is executed next.
-   */
+  /// The condition used to determine which of the branches is executed next.
   ExpressionImpl _condition;
 
   Token rightParenthesis;
@@ -6467,8 +5481,7 @@
     ..add(ifKeyword)
     ..add(leftParenthesis)
     ..add(_condition)
-    ..add(rightParenthesis)
-    ..add(elseKeyword);
+    ..add(rightParenthesis);
 
   Expression get condition => _condition;
 
@@ -6482,68 +5495,36 @@
   }
 }
 
-/**
- * An if statement.
- *
- *    ifStatement ::=
- *        'if' '(' [Expression] ')' [Statement] ('else' [Statement])?
- */
-class IfStatementImpl extends StatementImpl implements IfStatement {
-  /**
-   * The token representing the 'if' keyword.
-   */
-  @override
-  Token ifKeyword;
-
-  /**
-   * The left parenthesis.
-   */
-  @override
-  Token leftParenthesis;
-
-  /**
-   * The condition used to determine which of the statements is executed next.
-   */
-  ExpressionImpl _condition;
-
-  /**
-   * The right parenthesis.
-   */
-  @override
-  Token rightParenthesis;
-
-  /**
-   * The statement that is executed if the condition evaluates to `true`.
-   */
+/// An if statement.
+///
+///    ifStatement ::=
+///        'if' '(' [Expression] ')' [Statement] ('else' [Statement])?
+class IfStatementImpl extends StatementImpl
+    with IfMixin
+    implements IfStatement {
+  /// The statement that is executed if the condition evaluates to `true`.
   StatementImpl _thenStatement;
 
-  /**
-   * The token representing the 'else' keyword, or `null` if there is no else
-   * statement.
-   */
-  @override
-  Token elseKeyword;
-
-  /**
-   * The statement that is executed if the condition evaluates to `false`, or
-   * `null` if there is no else statement.
-   */
+  /// The statement that is executed if the condition evaluates to `false`, or
+  /// `null` if there is no else statement.
   StatementImpl _elseStatement;
 
-  /**
-   * Initialize a newly created if statement. The [elseKeyword] and
-   * [elseStatement] can be `null` if there is no else clause.
-   */
+  /// Initialize a newly created if statement. The [elseKeyword] and
+  /// [elseStatement] can be `null` if there is no else clause.
   IfStatementImpl(
-      this.ifKeyword,
-      this.leftParenthesis,
+      Token ifKeyword,
+      Token leftParenthesis,
       ExpressionImpl condition,
-      this.rightParenthesis,
+      Token rightParenthesis,
       StatementImpl thenStatement,
-      this.elseKeyword,
+      Token elseKeyword,
       StatementImpl elseStatement) {
+    this.ifKeyword = ifKeyword;
+    this.leftParenthesis = leftParenthesis;
     _condition = _becomeParentOf(condition);
+    this.rightParenthesis = rightParenthesis;
     _thenStatement = _becomeParentOf(thenStatement);
+    this.elseKeyword = elseKeyword;
     _elseStatement = _becomeParentOf(elseStatement);
   }
 
@@ -6552,23 +5533,12 @@
 
   @override
   Iterable<SyntacticEntity> get childEntities => new ChildEntities()
-    ..add(ifKeyword)
-    ..add(leftParenthesis)
-    ..add(_condition)
-    ..add(rightParenthesis)
+    ..addAll(super.childEntities)
     ..add(_thenStatement)
     ..add(elseKeyword)
     ..add(_elseStatement);
 
   @override
-  Expression get condition => _condition;
-
-  @override
-  void set condition(Expression expression) {
-    _condition = _becomeParentOf(expression as ExpressionImpl);
-  }
-
-  @override
   Statement get elseStatement => _elseStatement;
 
   @override
@@ -6603,27 +5573,19 @@
   }
 }
 
-/**
- * The "implements" clause in an class declaration.
- *
- *    implementsClause ::=
- *        'implements' [TypeName] (',' [TypeName])*
- */
+/// The "implements" clause in an class declaration.
+///
+///    implementsClause ::=
+///        'implements' [TypeName] (',' [TypeName])*
 class ImplementsClauseImpl extends AstNodeImpl implements ImplementsClause {
-  /**
-   * The token representing the 'implements' keyword.
-   */
+  /// The token representing the 'implements' keyword.
   @override
   Token implementsKeyword;
 
-  /**
-   * The interfaces that are being implemented.
-   */
+  /// The interfaces that are being implemented.
   NodeList<TypeName> _interfaces;
 
-  /**
-   * Initialize a newly created implements clause.
-   */
+  /// Initialize a newly created implements clause.
   ImplementsClauseImpl(this.implementsKeyword, List<TypeName> interfaces) {
     _interfaces = new NodeListImpl<TypeName>(this, interfaces);
   }
@@ -6652,42 +5614,34 @@
   }
 }
 
-/**
- * An import directive.
- *
- *    importDirective ::=
- *        [Annotation] 'import' [StringLiteral] ('as' identifier)? [Combinator]* ';'
- *      | [Annotation] 'import' [StringLiteral] 'deferred' 'as' identifier [Combinator]* ';'
- */
+/// An import directive.
+///
+///    importDirective ::=
+///        [Annotation] 'import' [StringLiteral] ('as' identifier)?
+//         [Combinator]* ';'
+///      | [Annotation] 'import' [StringLiteral] 'deferred' 'as' identifier
+//         [Combinator]* ';'
 class ImportDirectiveImpl extends NamespaceDirectiveImpl
     implements ImportDirective {
-  /**
-   * The token representing the 'deferred' keyword, or `null` if the imported is
-   * not deferred.
-   */
+  /// The token representing the 'deferred' keyword, or `null` if the imported
+  /// is not deferred.
   Token deferredKeyword;
 
-  /**
-   * The token representing the 'as' keyword, or `null` if the imported names are
-   * not prefixed.
-   */
+  /// The token representing the 'as' keyword, or `null` if the imported names
+  /// are not prefixed.
   @override
   Token asKeyword;
 
-  /**
-   * The prefix to be used with the imported names, or `null` if the imported
-   * names are not prefixed.
-   */
+  /// The prefix to be used with the imported names, or `null` if the imported
+  /// names are not prefixed.
   SimpleIdentifierImpl _prefix;
 
-  /**
-   * Initialize a newly created import directive. Either or both of the
-   * [comment] and [metadata] can be `null` if the function does not have the
-   * corresponding attribute. The [deferredKeyword] can be `null` if the import
-   * is not deferred. The [asKeyword] and [prefix] can be `null` if the import
-   * does not specify a prefix. The list of [combinators] can be `null` if there
-   * are no combinators.
-   */
+  /// Initialize a newly created import directive. Either or both of the
+  /// [comment] and [metadata] can be `null` if the function does not have the
+  /// corresponding attribute. The [deferredKeyword] can be `null` if the import
+  /// is not deferred. The [asKeyword] and [prefix] can be `null` if the import
+  /// does not specify a prefix. The list of [combinators] can be `null` if
+  /// there are no combinators.
   ImportDirectiveImpl(
       CommentImpl comment,
       List<Annotation> metadata,
@@ -6706,6 +5660,7 @@
 
   @override
   Iterable<SyntacticEntity> get childEntities => super._childEntities
+    ..add(keyword)
     ..add(_uri)
     ..add(deferredKeyword)
     ..add(asKeyword)
@@ -6744,69 +5699,49 @@
   }
 }
 
-/**
- * An index expression.
- *
- *    indexExpression ::=
- *        [Expression] '[' [Expression] ']'
- */
+/// An index expression.
+///
+///    indexExpression ::=
+///        [Expression] '[' [Expression] ']'
 class IndexExpressionImpl extends ExpressionImpl implements IndexExpression {
-  /**
-   * The expression used to compute the object being indexed, or `null` if this
-   * index expression is part of a cascade expression.
-   */
+  /// The expression used to compute the object being indexed, or `null` if this
+  /// index expression is part of a cascade expression.
   ExpressionImpl _target;
 
-  /**
-   * The period ("..") before a cascaded index expression, or `null` if this
-   * index expression is not part of a cascade expression.
-   */
+  /// The period ("..") before a cascaded index expression, or `null` if this
+  /// index expression is not part of a cascade expression.
   @override
   Token period;
 
-  /**
-   * The left square bracket.
-   */
+  /// The left square bracket.
   @override
   Token leftBracket;
 
-  /**
-   * The expression used to compute the index.
-   */
+  /// The expression used to compute the index.
   ExpressionImpl _index;
 
-  /**
-   * The right square bracket.
-   */
+  /// The right square bracket.
   @override
   Token rightBracket;
 
-  /**
-   * The element associated with the operator based on the static type of the
-   * target, or `null` if the AST structure has not been resolved or if the
-   * operator could not be resolved.
-   */
+  /// The element associated with the operator based on the static type of the
+  /// target, or `null` if the AST structure has not been resolved or if the
+  /// operator could not be resolved.
   @override
   MethodElement staticElement;
 
-  /**
-   * If this expression is both in a getter and setter context, the
-   * [AuxiliaryElements] will be set to hold onto the static element from the
-   * getter context.
-   */
+  /// If this expression is both in a getter and setter context, the
+  /// [AuxiliaryElements] will be set to hold onto the static element from the
+  /// getter context.
   AuxiliaryElements auxiliaryElements = null;
 
-  /**
-   * Initialize a newly created index expression.
-   */
+  /// Initialize a newly created index expression.
   IndexExpressionImpl.forCascade(
       this.period, this.leftBracket, ExpressionImpl index, this.rightBracket) {
     _index = _becomeParentOf(index);
   }
 
-  /**
-   * Initialize a newly created index expression.
-   */
+  /// Initialize a newly created index expression.
   IndexExpressionImpl.forTarget(ExpressionImpl target, this.leftBracket,
       ExpressionImpl index, this.rightBracket) {
     _target = _becomeParentOf(target);
@@ -6851,7 +5786,7 @@
   bool get isCascaded => period != null;
 
   @override
-  int get precedence => 15;
+  Precedence get precedence => Precedence.postfix;
 
   @deprecated
   @override
@@ -6884,12 +5819,10 @@
     _target = _becomeParentOf(expression as ExpressionImpl);
   }
 
-  /**
-   * If the AST structure has been resolved, and the function being invoked is
-   * known based on static type information, then return the parameter element
-   * representing the parameter to which the value of the index expression will
-   * be bound. Otherwise, return `null`.
-   */
+  /// If the AST structure has been resolved, and the function being invoked is
+  /// known based on static type information, then return the parameter element
+  /// representing the parameter to which the value of the index expression will
+  /// be bound. Otherwise, return `null`.
   ParameterElement get _staticParameterElementForIndex {
     if (staticElement == null) {
       return null;
@@ -6939,54 +5872,41 @@
   }
 }
 
-/**
- * An instance creation expression.
- *
- *    newExpression ::=
- *        ('new' | 'const')? [TypeName] ('.' [SimpleIdentifier])? [ArgumentList]
- */
+/// An instance creation expression.
+///
+///    newExpression ::=
+///        ('new' | 'const')? [TypeName] ('.' [SimpleIdentifier])?
+///        [ArgumentList]
 class InstanceCreationExpressionImpl extends ExpressionImpl
     implements InstanceCreationExpression {
   // TODO(brianwilkerson) Consider making InstanceCreationExpressionImpl extend
   // InvocationExpressionImpl. This would probably be a breaking change, but is
   // also probably worth it.
 
-  /**
-   * The 'new' or 'const' keyword used to indicate how an object should be
-   * created, or `null` if the keyword is implicit.
-   */
+  /// The 'new' or 'const' keyword used to indicate how an object should be
+  /// created, or `null` if the keyword is implicit.
   @override
   Token keyword;
 
-  /**
-   * The name of the constructor to be invoked.
-   */
+  /// The name of the constructor to be invoked.
   ConstructorNameImpl _constructorName;
 
-  /**
-   * The type arguments associated with the constructor, rather than with the
-   * class in which the constructor is defined. It is always an error if there
-   * are type arguments because Dart doesn't currently support generic
-   * constructors, but we capture them in the AST in order to recover better.
-   */
+  /// The type arguments associated with the constructor, rather than with the
+  /// class in which the constructor is defined. It is always an error if there
+  /// are type arguments because Dart doesn't currently support generic
+  /// constructors, but we capture them in the AST in order to recover better.
   TypeArgumentListImpl _typeArguments;
 
-  /**
-   * The list of arguments to the constructor.
-   */
+  /// The list of arguments to the constructor.
   ArgumentListImpl _argumentList;
 
-  /**
-   * The element associated with the constructor based on static type
-   * information, or `null` if the AST structure has not been resolved or if the
-   * constructor could not be resolved.
-   */
+  /// The element associated with the constructor based on static type
+  /// information, or `null` if the AST structure has not been resolved or if
+  /// the constructor could not be resolved.
   @override
   ConstructorElement staticElement;
 
-  /**
-   * Initialize a newly created instance creation expression.
-   */
+  /// Initialize a newly created instance creation expression.
   InstanceCreationExpressionImpl(this.keyword,
       ConstructorNameImpl constructorName, ArgumentListImpl argumentList,
       {TypeArgumentListImpl typeArguments}) {
@@ -7033,28 +5953,22 @@
     }
   }
 
-  /**
-   * Return `true` if this is an implicit constructor invocations.
-   */
+  /// Return `true` if this is an implicit constructor invocations.
   bool get isImplicit => keyword == null;
 
   @override
-  int get precedence => 16;
+  Precedence get precedence => Precedence.primary;
 
-  /**
-   * Return the type arguments associated with the constructor, rather than with
-   * the class in which the constructor is defined. It is always an error if
-   * there are type arguments because Dart doesn't currently support generic
-   * constructors, but we capture them in the AST in order to recover better.
-   */
+  /// Return the type arguments associated with the constructor, rather than
+  /// with the class in which the constructor is defined. It is always an error
+  /// if there are type arguments because Dart doesn't currently support generic
+  /// constructors, but we capture them in the AST in order to recover better.
   TypeArgumentList get typeArguments => _typeArguments;
 
-  /**
-   * Return the type arguments associated with the constructor, rather than with
-   * the class in which the constructor is defined. It is always an error if
-   * there are type arguments because Dart doesn't currently support generic
-   * constructors, but we capture them in the AST in order to recover better.
-   */
+  /// Return the type arguments associated with the constructor, rather than
+  /// with the class in which the constructor is defined. It is always an error
+  /// if there are type arguments because Dart doesn't currently support generic
+  /// constructors, but we capture them in the AST in order to recover better.
   void set typeArguments(TypeArgumentList typeArguments) {
     _typeArguments = _becomeParentOf(typeArguments as TypeArgumentListImpl);
   }
@@ -7063,23 +5977,21 @@
   E accept<E>(AstVisitor<E> visitor) =>
       visitor.visitInstanceCreationExpression(this);
 
-  /**
-   * Return `true` if it would be valid for this instance creation expression to
-   * have a keyword of `const`. It is valid if
-   *
-   * * the invoked constructor is a `const` constructor,
-   * * all of the arguments are, or could be, constant expressions, and
-   * * the evaluation of the constructor would not produce an exception.
-   *
-   * Note that this method will return `false` if the AST has not been resolved
-   * because without resolution it cannot be determined whether the constructor
-   * is a `const` constructor.
-   *
-   * Also note that this method can cause constant evaluation to occur, which
-   * can be computationally expensive.
-   * 
-   * Deprecated: Use `LinterContext.canBeConst` instead.
-   */
+  /// Return `true` if it would be valid for this instance creation expression
+  /// to have a keyword of `const`. It is valid if
+  ///
+  /// * the invoked constructor is a `const` constructor,
+  /// * all of the arguments are, or could be, constant expressions, and
+  /// * the evaluation of the constructor would not produce an exception.
+  ///
+  /// Note that this method will return `false` if the AST has not been resolved
+  /// because without resolution it cannot be determined whether the constructor
+  /// is a `const` constructor.
+  ///
+  /// Also note that this method can cause constant evaluation to occur, which
+  /// can be computationally expensive.
+  ///
+  /// Deprecated: Use `LinterContext.canBeConst` instead.
   @deprecated
   bool canBeConst() {
     //
@@ -7154,36 +6066,28 @@
   }
 }
 
-/**
- * An integer literal expression.
- *
- *    integerLiteral ::=
- *        decimalIntegerLiteral
- *      | hexadecimalIntegerLiteral
- *
- *    decimalIntegerLiteral ::=
- *        decimalDigit+
- *
- *    hexadecimalIntegerLiteral ::=
- *        '0x' hexadecimalDigit+
- *      | '0X' hexadecimalDigit+
- */
+/// An integer literal expression.
+///
+///    integerLiteral ::=
+///        decimalIntegerLiteral
+///      | hexadecimalIntegerLiteral
+///
+///    decimalIntegerLiteral ::=
+///        decimalDigit+
+///
+///    hexadecimalIntegerLiteral ::=
+///        '0x' hexadecimalDigit+
+///      | '0X' hexadecimalDigit+
 class IntegerLiteralImpl extends LiteralImpl implements IntegerLiteral {
-  /**
-   * The token representing the literal.
-   */
+  /// The token representing the literal.
   @override
   Token literal;
 
-  /**
-   * The value of the literal.
-   */
+  /// The value of the literal.
   @override
   int value = 0;
 
-  /**
-   * Initialize a newly created integer literal.
-   */
+  /// Initialize a newly created integer literal.
   IntegerLiteralImpl(this.literal, this.value);
 
   @override
@@ -7196,14 +6100,12 @@
   @override
   Token get endToken => literal;
 
-  /**
-   * Returns whether this literal's [parent] is a [PrefixExpression] of unary
-   * negation.
-   *
-   * Note: this does *not* indicate that the value itself is negated, just that
-   * the literal is the child of a negation operation. The literal value itself
-   * will always be positive.
-   */
+  /// Returns whether this literal's [parent] is a [PrefixExpression] of unary
+  /// negation.
+  ///
+  /// Note: this does *not* indicate that the value itself is negated, just that
+  /// the literal is the child of a negation operation. The literal value itself
+  /// will always be positive.
   bool get immediatelyNegated {
     AstNode parent = this.parent; // Capture for type propagation.
     return parent is PrefixExpression &&
@@ -7249,11 +6151,9 @@
     return fullPrecision & bottomMask == BigInt.zero;
   }
 
-  /**
-   * Return `true` if the given [lexeme] is a valid lexeme for an integer
-   * literal. The flag [isNegative] should be `true` if the lexeme is preceded
-   * by a unary negation operator.
-   */
+  /// Return `true` if the given [lexeme] is a valid lexeme for an integer
+  /// literal. The flag [isNegative] should be `true` if the lexeme is preceded
+  /// by a unary negation operator.
   static bool isValidAsInteger(String lexeme, bool isNegative) {
     // TODO(jmesserly): this depends on the platform int implementation, and
     // may not be accurate if run on dart4web.
@@ -7266,57 +6166,44 @@
     return int.tryParse(lexeme) != null;
   }
 
-  /**
-   * Suggest the nearest valid double to a user. If the integer they wrote
-   * requires more than a 53 bit mantissa, or more than 10 exponent bits, do
-   * them the favor of suggesting the nearest integer that would work for them.
-   */
+  /// Suggest the nearest valid double to a user. If the integer they wrote
+  /// requires more than a 53 bit mantissa, or more than 10 exponent bits, do
+  /// them the favor of suggesting the nearest integer that would work for them.
   static double nearestValidDouble(String lexeme) =>
       math.min(double.maxFinite, BigInt.parse(lexeme).toDouble());
 }
 
-/**
- * A node within a [StringInterpolation].
- *
- *    interpolationElement ::=
- *        [InterpolationExpression]
- *      | [InterpolationString]
- */
+/// A node within a [StringInterpolation].
+///
+///    interpolationElement ::=
+///        [InterpolationExpression]
+///      | [InterpolationString]
 abstract class InterpolationElementImpl extends AstNodeImpl
     implements InterpolationElement {}
 
-/**
- * An expression embedded in a string interpolation.
- *
- *    interpolationExpression ::=
- *        '$' [SimpleIdentifier]
- *      | '$' '{' [Expression] '}'
- */
+/// An expression embedded in a string interpolation.
+///
+///    interpolationExpression ::=
+///        '$' [SimpleIdentifier]
+///      | '$' '{' [Expression] '}'
 class InterpolationExpressionImpl extends InterpolationElementImpl
     implements InterpolationExpression {
-  /**
-   * The token used to introduce the interpolation expression; either '$' if the
-   * expression is a simple identifier or '${' if the expression is a full
-   * expression.
-   */
+  /// The token used to introduce the interpolation expression; either '$' if
+  /// the expression is a simple identifier or '${' if the expression is a full
+  /// expression.
   @override
   Token leftBracket;
 
-  /**
-   * The expression to be evaluated for the value to be converted into a string.
-   */
+  /// The expression to be evaluated for the value to be converted into a
+  /// string.
   ExpressionImpl _expression;
 
-  /**
-   * The right curly bracket, or `null` if the expression is an identifier
-   * without brackets.
-   */
+  /// The right curly bracket, or `null` if the expression is an identifier
+  /// without brackets.
   @override
   Token rightBracket;
 
-  /**
-   * Initialize a newly created interpolation expression.
-   */
+  /// Initialize a newly created interpolation expression.
   InterpolationExpressionImpl(
       this.leftBracket, ExpressionImpl expression, this.rightBracket) {
     _expression = _becomeParentOf(expression);
@@ -7357,30 +6244,22 @@
   }
 }
 
-/**
- * A non-empty substring of an interpolated string.
- *
- *    interpolationString ::=
- *        characters
- */
+/// A non-empty substring of an interpolated string.
+///
+///    interpolationString ::=
+///        characters
 class InterpolationStringImpl extends InterpolationElementImpl
     implements InterpolationString {
-  /**
-   * The characters that will be added to the string.
-   */
+  /// The characters that will be added to the string.
   @override
   Token contents;
 
-  /**
-   * The value of the literal.
-   */
+  /// The value of the literal.
   @override
   String value;
 
-  /**
-   * Initialize a newly created string of characters that are part of a string
-   * interpolation.
-   */
+  /// Initialize a newly created string of characters that are part of a string
+  /// interpolation.
   InterpolationStringImpl(this.contents, this.value);
 
   @override
@@ -7413,29 +6292,21 @@
   void visitChildren(AstVisitor visitor) {}
 }
 
-/**
- * Common base class for [FunctionExpressionInvocationImpl] and
- * [MethodInvocationImpl].
- */
+/// Common base class for [FunctionExpressionInvocationImpl] and
+/// [MethodInvocationImpl].
 abstract class InvocationExpressionImpl extends ExpressionImpl
     implements InvocationExpression {
-  /**
-   * The list of arguments to the function.
-   */
+  /// The list of arguments to the function.
   ArgumentListImpl _argumentList;
 
-  /**
-   * The type arguments to be applied to the method being invoked, or `null` if
-   * no type arguments were provided.
-   */
+  /// The type arguments to be applied to the method being invoked, or `null` if
+  /// no type arguments were provided.
   TypeArgumentListImpl _typeArguments;
 
   @override
   DartType staticInvokeType;
 
-  /**
-   * Initialize a newly created invocation.
-   */
+  /// Initialize a newly created invocation.
   InvocationExpressionImpl(
       TypeArgumentListImpl typeArguments, ArgumentListImpl argumentList) {
     _typeArguments = _becomeParentOf(typeArguments);
@@ -7465,39 +6336,27 @@
   }
 }
 
-/**
- * An is expression.
- *
- *    isExpression ::=
- *        [Expression] 'is' '!'? [TypeName]
- */
+/// An is expression.
+///
+///    isExpression ::=
+///        [Expression] 'is' '!'? [TypeName]
 class IsExpressionImpl extends ExpressionImpl implements IsExpression {
-  /**
-   * The expression used to compute the value whose type is being tested.
-   */
+  /// The expression used to compute the value whose type is being tested.
   ExpressionImpl _expression;
 
-  /**
-   * The is operator.
-   */
+  /// The is operator.
   @override
   Token isOperator;
 
-  /**
-   * The not operator, or `null` if the sense of the test is not negated.
-   */
+  /// The not operator, or `null` if the sense of the test is not negated.
   @override
   Token notOperator;
 
-  /**
-   * The name of the type being tested for.
-   */
+  /// The name of the type being tested for.
   TypeAnnotationImpl _type;
 
-  /**
-   * Initialize a newly created is expression. The [notOperator] can be `null`
-   * if the sense of the test is not negated.
-   */
+  /// Initialize a newly created is expression. The [notOperator] can be `null`
+  /// if the sense of the test is not negated.
   IsExpressionImpl(ExpressionImpl expression, this.isOperator, this.notOperator,
       TypeAnnotationImpl type) {
     _expression = _becomeParentOf(expression);
@@ -7526,7 +6385,7 @@
   }
 
   @override
-  int get precedence => 7;
+  Precedence get precedence => Precedence.relational;
 
   @override
   TypeAnnotation get type => _type;
@@ -7546,26 +6405,18 @@
   }
 }
 
-/**
- * A statement that has a label associated with them.
- *
- *    labeledStatement ::=
- *       [Label]+ [Statement]
- */
+/// A statement that has a label associated with them.
+///
+///    labeledStatement ::=
+///       [Label]+ [Statement]
 class LabeledStatementImpl extends StatementImpl implements LabeledStatement {
-  /**
-   * The labels being associated with the statement.
-   */
+  /// The labels being associated with the statement.
   NodeList<Label> _labels;
 
-  /**
-   * The statement with which the labels are being associated.
-   */
+  /// The statement with which the labels are being associated.
   StatementImpl _statement;
 
-  /**
-   * Initialize a newly created labeled statement.
-   */
+  /// Initialize a newly created labeled statement.
   LabeledStatementImpl(List<Label> labels, StatementImpl statement) {
     _labels = new NodeListImpl<Label>(this, labels);
     _statement = _becomeParentOf(statement);
@@ -7611,27 +6462,19 @@
   }
 }
 
-/**
- * A label on either a [LabeledStatement] or a [NamedExpression].
- *
- *    label ::=
- *        [SimpleIdentifier] ':'
- */
+/// A label on either a [LabeledStatement] or a [NamedExpression].
+///
+///    label ::=
+///        [SimpleIdentifier] ':'
 class LabelImpl extends AstNodeImpl implements Label {
-  /**
-   * The label being associated with the statement.
-   */
+  /// The label being associated with the statement.
   SimpleIdentifierImpl _label;
 
-  /**
-   * The colon that separates the label from the statement.
-   */
+  /// The colon that separates the label from the statement.
   @override
   Token colon;
 
-  /**
-   * Initialize a newly created label.
-   */
+  /// Initialize a newly created label.
   LabelImpl(SimpleIdentifierImpl label, this.colon) {
     _label = _becomeParentOf(label);
   }
@@ -7663,35 +6506,25 @@
   }
 }
 
-/**
- * A library directive.
- *
- *    libraryDirective ::=
- *        [Annotation] 'library' [Identifier] ';'
- */
+/// A library directive.
+///
+///    libraryDirective ::=
+///        [Annotation] 'library' [Identifier] ';'
 class LibraryDirectiveImpl extends DirectiveImpl implements LibraryDirective {
-  /**
-   * The token representing the 'library' keyword.
-   */
+  /// The token representing the 'library' keyword.
   @override
   Token libraryKeyword;
 
-  /**
-   * The name of the library being defined.
-   */
+  /// The name of the library being defined.
   LibraryIdentifierImpl _name;
 
-  /**
-   * The semicolon terminating the directive.
-   */
+  /// The semicolon terminating the directive.
   @override
   Token semicolon;
 
-  /**
-   * Initialize a newly created library directive. Either or both of the
-   * [comment] and [metadata] can be `null` if the directive does not have the
-   * corresponding attribute.
-   */
+  /// Initialize a newly created library directive. Either or both of the
+  /// [comment] and [metadata] can be `null` if the directive does not have the
+  /// corresponding attribute.
   LibraryDirectiveImpl(CommentImpl comment, List<Annotation> metadata,
       this.libraryKeyword, LibraryIdentifierImpl name, this.semicolon)
       : super(comment, metadata) {
@@ -7729,22 +6562,16 @@
   }
 }
 
-/**
- * The identifier for a library.
- *
- *    libraryIdentifier ::=
- *        [SimpleIdentifier] ('.' [SimpleIdentifier])*
- */
+/// The identifier for a library.
+///
+///    libraryIdentifier ::=
+///        [SimpleIdentifier] ('.' [SimpleIdentifier])*
 class LibraryIdentifierImpl extends IdentifierImpl
     implements LibraryIdentifier {
-  /**
-   * The components of the identifier.
-   */
+  /// The components of the identifier.
   NodeList<SimpleIdentifier> _components;
 
-  /**
-   * Initialize a newly created prefixed identifier.
-   */
+  /// Initialize a newly created prefixed identifier.
   LibraryIdentifierImpl(List<SimpleIdentifier> components) {
     _components = new NodeListImpl<SimpleIdentifier>(this, components);
   }
@@ -7785,7 +6612,7 @@
   }
 
   @override
-  int get precedence => 15;
+  Precedence get precedence => Precedence.postfix;
 
   @deprecated
   @override
@@ -7803,37 +6630,39 @@
   }
 }
 
-/**
- * A list literal.
- *
- *    listLiteral ::=
- *        'const'? ('<' [TypeAnnotation] '>')?
- *        '[' ([CollectionLiteralElement] ','?)? ']'
- *
- * This is the class that is used to represent a list literal when either the
- * 'control-flow-collections' or 'spread-collections' experiments are enabled.
- * If neither of those experiments are enabled, then [ListLiteral] will be used.
- */
-class ListLiteral2Impl extends TypedLiteralImpl implements ListLiteral2 {
+class ListLiteralImpl extends TypedLiteralImpl implements ListLiteral {
+  /// The left square bracket.
   @override
   Token leftBracket;
 
-  /**
-   * The elements used to compute the elements of the list.
-   */
+  /// The expressions used to compute the elements of the list.
   NodeList<CollectionElement> _elements;
 
+  /// The right square bracket.
   @override
   Token rightBracket;
 
-  /**
-   * Initialize a newly created list literal. The [constKeyword] can be `null`
-   * if the literal is not a constant. The [typeArguments] can be `null` if no
-   * type arguments were declared. The list of [elements] can be `null` if the
-   * list is empty.
-   */
-  ListLiteral2Impl(Token constKeyword, TypeArgumentListImpl typeArguments,
-      this.leftBracket, List<CollectionElement> elements, this.rightBracket)
+  /// Initialize a newly created list literal. The [constKeyword] can be `null`
+  /// if the literal is not a constant. The [typeArguments] can be `null` if no
+  /// type arguments were declared. The list of [elements] can be `null` if the
+  /// list is empty.
+  ListLiteralImpl(Token constKeyword, TypeArgumentListImpl typeArguments,
+      this.leftBracket, List<Expression> elements, this.rightBracket)
+      : super(constKeyword, typeArguments) {
+    _elements = new NodeListImpl<Expression>(this, elements);
+  }
+
+  /// Initialize a newly created list literal.
+  ///
+  /// The [constKeyword] can be `null` if the literal is not a constant. The
+  /// [typeArguments] can be `null` if no type arguments were declared. The list
+  /// of [elements] can be `null` if the list is empty.
+  ListLiteralImpl.experimental(
+      Token constKeyword,
+      TypeArgumentListImpl typeArguments,
+      this.leftBracket,
+      List<CollectionElement> elements,
+      this.rightBracket)
       : super(constKeyword, typeArguments) {
     _elements = new NodeListImpl<CollectionElement>(this, elements);
   }
@@ -7861,79 +6690,8 @@
   NodeList<CollectionElement> get elements => _elements;
 
   @override
-  Token get endToken => rightBracket;
-
-  @override
-  E accept<E>(AstVisitor<E> visitor) => visitor.visitListLiteral2(this);
-
-  @override
-  void visitChildren(AstVisitor visitor) {
-    super.visitChildren(visitor);
-    _elements.accept(visitor);
-  }
-}
-
-/**
- * A list literal.
- *
- *    listLiteral ::=
- *        'const'? ('<' [TypeName] '>')? '[' ([Expression] ','?)? ']'
- *
- * This is the class that is used to represent a list literal when neither the
- * 'control-flow-collections' nor 'spread-collections' experiments are enabled.
- * If either of those experiments are enabled, then [ListLiteral2] will be used.
- */
-class ListLiteralImpl extends TypedLiteralImpl implements ListLiteral {
-  /**
-   * The left square bracket.
-   */
-  @override
-  Token leftBracket;
-
-  /**
-   * The expressions used to compute the elements of the list.
-   */
-  NodeList<Expression> _elements;
-
-  /**
-   * The right square bracket.
-   */
-  @override
-  Token rightBracket;
-
-  /**
-   * Initialize a newly created list literal. The [constKeyword] can be `null`
-   * if the literal is not a constant. The [typeArguments] can be `null` if no
-   * type arguments were declared. The list of [elements] can be `null` if the
-   * list is empty.
-   */
-  ListLiteralImpl(Token constKeyword, TypeArgumentListImpl typeArguments,
-      this.leftBracket, List<Expression> elements, this.rightBracket)
-      : super(constKeyword, typeArguments) {
-    _elements = new NodeListImpl<Expression>(this, elements);
-  }
-
-  @override
-  Token get beginToken {
-    if (constKeyword != null) {
-      return constKeyword;
-    }
-    TypeArgumentList typeArguments = this.typeArguments;
-    if (typeArguments != null) {
-      return typeArguments.beginToken;
-    }
-    return leftBracket;
-  }
-
-  @override
-  // TODO(paulberry): add commas.
-  Iterable<SyntacticEntity> get childEntities => super._childEntities
-    ..add(leftBracket)
-    ..addAll(_elements)
-    ..add(rightBracket);
-
-  @override
-  NodeList<Expression> get elements => _elements;
+  @Deprecated('Replaced by elements')
+  NodeList<CollectionElement> get elements2 => _elements;
 
   @override
   Token get endToken => rightBracket;
@@ -7948,139 +6706,53 @@
   }
 }
 
-/**
- * A node that represents a literal expression.
- *
- *    literal ::=
- *        [BooleanLiteral]
- *      | [DoubleLiteral]
- *      | [IntegerLiteral]
- *      | [ListLiteral]
- *      | [MapLiteral]
- *      | [NullLiteral]
- *      | [StringLiteral]
- */
+/// A node that represents a literal expression.
+///
+///    literal ::=
+///        [BooleanLiteral]
+///      | [DoubleLiteral]
+///      | [IntegerLiteral]
+///      | [ListLiteral]
+///      | [MapLiteral]
+///      | [NullLiteral]
+///      | [StringLiteral]
 abstract class LiteralImpl extends ExpressionImpl implements Literal {
   @override
-  int get precedence => 16;
+  Precedence get precedence => Precedence.primary;
 }
 
-/**
- * Additional information about local variables within a function or method
- * produced at resolution time.
- */
+/// Additional information about local variables within a function or method
+/// produced at resolution time.
 class LocalVariableInfo {
-  /**
-   * The set of local variables and parameters that are potentially mutated
-   * within a local function other than the function in which they are declared.
-   */
+  /// The set of local variables and parameters that are potentially mutated
+  /// within a local function other than the function in which they are
+  /// declared.
   final Set<VariableElement> potentiallyMutatedInClosure =
       new Set<VariableElement>();
 
-  /**
-   * The set of local variables and parameters that are potentially mutated
-   * within the scope of their declarations.
-   */
+  /// The set of local variables and parameters that are potentially mutated
+  /// within the scope of their declarations.
   final Set<VariableElement> potentiallyMutatedInScope =
       new Set<VariableElement>();
 }
 
-/**
- * A literal map.
- *
- *    mapLiteral ::=
- *        'const'? ('<' [TypeAnnotation] (',' [TypeAnnotation])* '>')?
- *        '{' ([MapElement] (',' [MapElement])* ','?)? '}'
- *
- * This is the class that is used to represent a map literal when either the
- * 'control-flow-collections' or 'spread-collections' experiments are enabled.
- * If neither of those experiments are enabled, then [MapLiteral] will be used.
- */
-class MapLiteral2Impl extends TypedLiteralImpl implements MapLiteral2 {
-  @override
-  Token leftBracket;
-
-  /**
-   * The entries in the map.
-   */
-  NodeList<CollectionElement> _entries;
-
-  @override
-  Token rightBracket;
-
-  /**
-   * Initialize a newly created map literal. The [constKeyword] can be `null` if
-   * the literal is not a constant. The [typeArguments] can be `null` if no type
-   * arguments were declared. The [entries] can be `null` if the map is empty.
-   */
-  MapLiteral2Impl(Token constKeyword, TypeArgumentListImpl typeArguments,
-      this.leftBracket, List<CollectionElement> entries, this.rightBracket)
-      : super(constKeyword, typeArguments) {
-    _entries = new NodeListImpl<CollectionElement>(this, entries);
-  }
-
-  @override
-  Token get beginToken {
-    if (constKeyword != null) {
-      return constKeyword;
-    }
-    TypeArgumentList typeArguments = this.typeArguments;
-    if (typeArguments != null) {
-      return typeArguments.beginToken;
-    }
-    return leftBracket;
-  }
-
-  @override
-  // TODO(paulberry): add commas.
-  Iterable<SyntacticEntity> get childEntities => super._childEntities
-    ..add(leftBracket)
-    ..addAll(entries)
-    ..add(rightBracket);
-
-  @override
-  Token get endToken => rightBracket;
-
-  @override
-  NodeList<CollectionElement> get entries => _entries;
-
-  @override
-  E accept<E>(AstVisitor<E> visitor) => visitor.visitMapLiteral2(this);
-
-  @override
-  void visitChildren(AstVisitor visitor) {
-    super.visitChildren(visitor);
-    _entries.accept(visitor);
-  }
-}
-
-/**
- * A single key/value pair in a map literal.
- *
- *    mapLiteralEntry ::=
- *        [Expression] ':' [Expression]
- */
+/// A single key/value pair in a map literal.
+///
+///    mapLiteralEntry ::=
+///        [Expression] ':' [Expression]
 class MapLiteralEntryImpl extends CollectionElementImpl
     implements MapLiteralEntry {
-  /**
-   * The expression computing the key with which the value will be associated.
-   */
+  /// The expression computing the key with which the value will be associated.
   ExpressionImpl _key;
 
-  /**
-   * The colon that separates the key from the value.
-   */
+  /// The colon that separates the key from the value.
   @override
   Token separator;
 
-  /**
-   * The expression computing the value that will be associated with the key.
-   */
+  /// The expression computing the value that will be associated with the key.
   ExpressionImpl _value;
 
-  /**
-   * Initialize a newly created map literal entry.
-   */
+  /// Initialize a newly created map literal entry.
   MapLiteralEntryImpl(
       ExpressionImpl key, this.separator, ExpressionImpl value) {
     _key = _becomeParentOf(key);
@@ -8123,159 +6795,66 @@
   }
 }
 
-/**
- * A literal map.
- *
- *    mapLiteral ::=
- *        'const'? ('<' [TypeName] (',' [TypeName])* '>')?
- *        '{' ([MapLiteralEntry] (',' [MapLiteralEntry])* ','?)? '}'
- */
-class MapLiteralImpl extends TypedLiteralImpl implements MapLiteral {
-  /**
-   * The left curly bracket.
-   */
-  @override
-  Token leftBracket;
-
-  /**
-   * The entries in the map.
-   */
-  NodeList<MapLiteralEntry> _entries;
-
-  /**
-   * The right curly bracket.
-   */
-  @override
-  Token rightBracket;
-
-  /**
-   * Initialize a newly created map literal. The [constKeyword] can be `null` if
-   * the literal is not a constant. The [typeArguments] can be `null` if no type
-   * arguments were declared. The [entries] can be `null` if the map is empty.
-   */
-  MapLiteralImpl(Token constKeyword, TypeArgumentListImpl typeArguments,
-      this.leftBracket, List<MapLiteralEntry> entries, this.rightBracket)
-      : super(constKeyword, typeArguments) {
-    _entries = new NodeListImpl<MapLiteralEntry>(this, entries);
-  }
-
-  @override
-  Token get beginToken {
-    if (constKeyword != null) {
-      return constKeyword;
-    }
-    TypeArgumentList typeArguments = this.typeArguments;
-    if (typeArguments != null) {
-      return typeArguments.beginToken;
-    }
-    return leftBracket;
-  }
-
-  @override
-  // TODO(paulberry): add commas.
-  Iterable<SyntacticEntity> get childEntities => super._childEntities
-    ..add(leftBracket)
-    ..addAll(entries)
-    ..add(rightBracket);
-
-  @override
-  Token get endToken => rightBracket;
-
-  @override
-  NodeList<MapLiteralEntry> get entries => _entries;
-
-  @override
-  E accept<E>(AstVisitor<E> visitor) => visitor.visitMapLiteral(this);
-
-  @override
-  void visitChildren(AstVisitor visitor) {
-    super.visitChildren(visitor);
-    _entries.accept(visitor);
-  }
-}
-
-/**
- * A method declaration.
- *
- *    methodDeclaration ::=
- *        methodSignature [FunctionBody]
- *
- *    methodSignature ::=
- *        'external'? ('abstract' | 'static')? [Type]? ('get' | 'set')?
- *        methodName [TypeParameterList] [FormalParameterList]
- *
- *    methodName ::=
- *        [SimpleIdentifier]
- *      | 'operator' [SimpleIdentifier]
- */
+/// A method declaration.
+///
+///    methodDeclaration ::=
+///        methodSignature [FunctionBody]
+///
+///    methodSignature ::=
+///        'external'? ('abstract' | 'static')? [Type]? ('get' | 'set')?
+///        methodName [TypeParameterList] [FormalParameterList]
+///
+///    methodName ::=
+///        [SimpleIdentifier]
+///      | 'operator' [SimpleIdentifier]
 class MethodDeclarationImpl extends ClassMemberImpl
     implements MethodDeclaration {
-  /**
-   * The token for the 'external' keyword, or `null` if the constructor is not
-   * external.
-   */
+  /// The token for the 'external' keyword, or `null` if the constructor is not
+  /// external.
   @override
   Token externalKeyword;
 
-  /**
-   * The token representing the 'abstract' or 'static' keyword, or `null` if
-   * neither modifier was specified.
-   */
+  /// The token representing the 'abstract' or 'static' keyword, or `null` if
+  /// neither modifier was specified.
   @override
   Token modifierKeyword;
 
-  /**
-   * The return type of the method, or `null` if no return type was declared.
-   */
+  /// The return type of the method, or `null` if no return type was declared.
   TypeAnnotationImpl _returnType;
 
-  /**
-   * The token representing the 'get' or 'set' keyword, or `null` if this is a
-   * method declaration rather than a property declaration.
-   */
+  /// The token representing the 'get' or 'set' keyword, or `null` if this is a
+  /// method declaration rather than a property declaration.
   @override
   Token propertyKeyword;
 
-  /**
-   * The token representing the 'operator' keyword, or `null` if this method
-   * does not declare an operator.
-   */
+  /// The token representing the 'operator' keyword, or `null` if this method
+  /// does not declare an operator.
   @override
   Token operatorKeyword;
 
-  /**
-   * The name of the method.
-   */
+  /// The name of the method.
   SimpleIdentifierImpl _name;
 
-  /**
-   * The type parameters associated with the method, or `null` if the method is
-   * not a generic method.
-   */
+  /// The type parameters associated with the method, or `null` if the method is
+  /// not a generic method.
   TypeParameterListImpl _typeParameters;
 
-  /**
-   * The parameters associated with the method, or `null` if this method
-   * declares a getter.
-   */
+  /// The parameters associated with the method, or `null` if this method
+  /// declares a getter.
   FormalParameterListImpl _parameters;
 
-  /**
-   * The body of the method.
-   */
+  /// The body of the method.
   FunctionBodyImpl _body;
 
-  /**
-   * Initialize a newly created method declaration. Either or both of the
-   * [comment] and [metadata] can be `null` if the declaration does not have the
-   * corresponding attribute. The [externalKeyword] can be `null` if the method
-   * is not external. The [modifierKeyword] can be `null` if the method is
-   * neither abstract nor static. The [returnType] can be `null` if no return
-   * type was specified. The [propertyKeyword] can be `null` if the method is
-   * neither a getter or a setter. The [operatorKeyword] can be `null` if the
-   * method does not implement an operator. The [parameters] must be `null` if
-   * this method declares a getter.
-   */
+  /// Initialize a newly created method declaration. Either or both of the
+  /// [comment] and [metadata] can be `null` if the declaration does not have
+  /// the corresponding attribute. The [externalKeyword] can be `null` if the
+  /// method is not external. The [modifierKeyword] can be `null` if the method
+  /// is neither abstract nor static. The [returnType] can be `null` if no
+  /// return type was specified. The [propertyKeyword] can be `null` if the
+  /// method is neither a getter or a setter. The [operatorKeyword] can be
+  /// `null` if the method does not implement an operator. The [parameters] must
+  /// be `null` if this method declares a getter.
   MethodDeclarationImpl(
       CommentImpl comment,
       List<Annotation> metadata,
@@ -8315,13 +6894,11 @@
     ..add(_parameters)
     ..add(_body);
 
-  /**
-   * Return the element associated with this method, or `null` if the AST
-   * structure has not been resolved. The element can either be a
-   * [MethodElement], if this represents the declaration of a normal method, or
-   * a [PropertyAccessorElement] if this represents the declaration of either a
-   * getter or a setter.
-   */
+  /// Return the element associated with this method, or `null` if the AST
+  /// structure has not been resolved. The element can either be a
+  /// [MethodElement], if this represents the declaration of a normal method, or
+  /// a [PropertyAccessorElement] if this represents the declaration of either a
+  /// getter or a setter.
   @override
   ExecutableElement get declaredElement =>
       _name?.staticElement as ExecutableElement;
@@ -8414,47 +6991,36 @@
   }
 }
 
-/**
- * The invocation of either a function or a method. Invocations of functions
- * resulting from evaluating an expression are represented by
- * [FunctionExpressionInvocation] nodes. Invocations of getters and setters are
- * represented by either [PrefixedIdentifier] or [PropertyAccess] nodes.
- *
- *    methodInvocation ::=
- *        ([Expression] '.')? [SimpleIdentifier] [TypeArgumentList]? [ArgumentList]
- */
+/// The invocation of either a function or a method. Invocations of functions
+/// resulting from evaluating an expression are represented by
+/// [FunctionExpressionInvocation] nodes. Invocations of getters and setters are
+/// represented by either [PrefixedIdentifier] or [PropertyAccess] nodes.
+///
+///    methodInvocation ::=
+///        ([Expression] '.')? [SimpleIdentifier] [TypeArgumentList]?
+///        [ArgumentList]
 class MethodInvocationImpl extends InvocationExpressionImpl
     implements MethodInvocation {
-  /**
-   * The expression producing the object on which the method is defined, or
-   * `null` if there is no target (that is, the target is implicitly `this`).
-   */
+  /// The expression producing the object on which the method is defined, or
+  /// `null` if there is no target (that is, the target is implicitly `this`).
   ExpressionImpl _target;
 
-  /**
-   * The operator that separates the target from the method name, or `null`
-   * if there is no target. In an ordinary method invocation this will be a
-   * period ('.'). In a cascade section this will be the cascade operator
-   * ('..').
-   */
+  /// The operator that separates the target from the method name, or `null`
+  /// if there is no target. In an ordinary method invocation this will be a
+  /// period ('.'). In a cascade section this will be the cascade operator
+  /// ('..').
   @override
   Token operator;
 
-  /**
-   * The name of the method being invoked.
-   */
+  /// The name of the method being invoked.
   SimpleIdentifierImpl _methodName;
 
-  /**
-   * The invoke type of the [methodName] if the target element is a getter,
-   * or `null` otherwise.
-   */
+  /// The invoke type of the [methodName] if the target element is a getter,
+  /// or `null` otherwise.
   DartType _methodNameType;
 
-  /**
-   * Initialize a newly created method invocation. The [target] and [operator]
-   * can be `null` if there is no target.
-   */
+  /// Initialize a newly created method invocation. The [target] and [operator]
+  /// can be `null` if there is no target.
   MethodInvocationImpl(
       ExpressionImpl target,
       this.operator,
@@ -8501,28 +7067,24 @@
     _methodName = _becomeParentOf(identifier as SimpleIdentifierImpl);
   }
 
-  /**
-   * The invoke type of the [methodName].
-   *
-   * If the target element is a [MethodElement], this is the same as the
-   * [staticInvokeType]. If the target element is a getter, presumably
-   * returning an [ExecutableElement] so that it can be invoked in this
-   * [MethodInvocation], then this type is the type of the getter, and the
-   * [staticInvokeType] is the invoked type of the returned element.
-   */
+  /// The invoke type of the [methodName].
+  ///
+  /// If the target element is a [MethodElement], this is the same as the
+  /// [staticInvokeType]. If the target element is a getter, presumably
+  /// returning an [ExecutableElement] so that it can be invoked in this
+  /// [MethodInvocation], then this type is the type of the getter, and the
+  /// [staticInvokeType] is the invoked type of the returned element.
   DartType get methodNameType => _methodNameType ?? staticInvokeType;
 
-  /**
-   * Set the [methodName] invoke type, only if the target element is a getter.
-   * Otherwise, the target element itself is invoked, [_methodNameType] is
-   * `null`, and the getter will return [staticInvokeType].
-   */
+  /// Set the [methodName] invoke type, only if the target element is a getter.
+  /// Otherwise, the target element itself is invoked, [_methodNameType] is
+  /// `null`, and the getter will return [staticInvokeType].
   set methodNameType(DartType methodNameType) {
     _methodNameType = methodNameType;
   }
 
   @override
-  int get precedence => 15;
+  Precedence get precedence => Precedence.postfix;
 
   @override
   Expression get realTarget {
@@ -8559,33 +7121,27 @@
   }
 }
 
-/**
- * The declaration of a mixin.
- *
- *    mixinDeclaration ::=
- *        metadata? 'mixin' [SimpleIdentifier] [TypeParameterList]?
- *        [RequiresClause]? [ImplementsClause]? '{' [ClassMember]* '}'
- */
+/// The declaration of a mixin.
+///
+///    mixinDeclaration ::=
+///        metadata? 'mixin' [SimpleIdentifier] [TypeParameterList]?
+///        [RequiresClause]? [ImplementsClause]? '{' [ClassMember]* '}'
 class MixinDeclarationImpl extends ClassOrMixinDeclarationImpl
     implements MixinDeclaration {
   @override
   Token mixinKeyword;
 
-  /**
-   * The on clause for the mixin, or `null` if the mixin does not have any
-   * super-class constraints.
-   */
+  /// The on clause for the mixin, or `null` if the mixin does not have any
+  /// super-class constraints.
   OnClauseImpl _onClause;
 
-  /**
-   * Initialize a newly created mixin declaration. Either or both of the
-   * [comment] and [metadata] can be `null` if the mixin does not have the
-   * corresponding attribute. The [typeParameters] can be `null` if the mixin does not
-   * have any type parameters. Either or both of the [onClause],
-   * and [implementsClause] can be `null` if the mixin does not have the
-   * corresponding clause. The list of [members] can be `null` if the mixin does
-   * not have any members.
-   */
+  /// Initialize a newly created mixin declaration. Either or both of the
+  /// [comment] and [metadata] can be `null` if the mixin does not have the
+  /// corresponding attribute. The [typeParameters] can be `null` if the mixin
+  /// does not have any type parameters. Either or both of the [onClause],
+  /// and [implementsClause] can be `null` if the mixin does not have the
+  /// corresponding clause. The list of [members] can be `null` if the mixin
+  /// does not have any members.
   MixinDeclarationImpl(
       CommentImpl comment,
       List<Annotation> metadata,
@@ -8664,21 +7220,15 @@
   }
 }
 
-/**
- * A node that declares a single name within the scope of a compilation unit.
- */
+/// A node that declares a single name within the scope of a compilation unit.
 abstract class NamedCompilationUnitMemberImpl extends CompilationUnitMemberImpl
     implements NamedCompilationUnitMember {
-  /**
-   * The name of the member being declared.
-   */
+  /// The name of the member being declared.
   SimpleIdentifierImpl _name;
 
-  /**
-   * Initialize a newly created compilation unit member with the given [name].
-   * Either or both of the [comment] and [metadata] can be `null` if the member
-   * does not have the corresponding attribute.
-   */
+  /// Initialize a newly created compilation unit member with the given [name].
+  /// Either or both of the [comment] and [metadata] can be `null` if the member
+  /// does not have the corresponding attribute.
   NamedCompilationUnitMemberImpl(
       CommentImpl comment, List<Annotation> metadata, SimpleIdentifierImpl name)
       : super(comment, metadata) {
@@ -8694,27 +7244,19 @@
   }
 }
 
-/**
- * An expression that has a name associated with it. They are used in method
- * invocations when there are named parameters.
- *
- *    namedExpression ::=
- *        [Label] [Expression]
- */
+/// An expression that has a name associated with it. They are used in method
+/// invocations when there are named parameters.
+///
+///    namedExpression ::=
+///        [Label] [Expression]
 class NamedExpressionImpl extends ExpressionImpl implements NamedExpression {
-  /**
-   * The name associated with the expression.
-   */
+  /// The name associated with the expression.
   LabelImpl _name;
 
-  /**
-   * The expression with which the name is associated.
-   */
+  /// The expression with which the name is associated.
   ExpressionImpl _expression;
 
-  /**
-   * Initialize a newly created named expression..
-   */
+  /// Initialize a newly created named expression..
   NamedExpressionImpl(LabelImpl name, ExpressionImpl expression) {
     _name = _becomeParentOf(name);
     _expression = _becomeParentOf(expression);
@@ -8756,7 +7298,7 @@
   }
 
   @override
-  int get precedence => 0;
+  Precedence get precedence => Precedence.none;
 
   @override
   E accept<E>(AstVisitor<E> visitor) => visitor.visitNamedExpression(this);
@@ -8768,35 +7310,25 @@
   }
 }
 
-/**
- * A node that represents a directive that impacts the namespace of a library.
- *
- *    directive ::=
- *        [ExportDirective]
- *      | [ImportDirective]
- */
+/// A node that represents a directive that impacts the namespace of a library.
+///
+///    directive ::=
+///        [ExportDirective]
+///      | [ImportDirective]
 abstract class NamespaceDirectiveImpl extends UriBasedDirectiveImpl
     implements NamespaceDirective {
-  /**
-   * The token representing the 'import' or 'export' keyword.
-   */
+  /// The token representing the 'import' or 'export' keyword.
   @override
   Token keyword;
 
-  /**
-   * The configurations used to control which library will actually be loaded at
-   * run-time.
-   */
+  /// The configurations used to control which library will actually be loaded
+  /// at run-time.
   NodeList<Configuration> _configurations;
 
-  /**
-   * The combinators used to control which names are imported or exported.
-   */
+  /// The combinators used to control which names are imported or exported.
   NodeList<Combinator> _combinators;
 
-  /**
-   * The semicolon terminating the directive.
-   */
+  /// The semicolon terminating the directive.
   @override
   Token semicolon;
 
@@ -8806,12 +7338,10 @@
   @override
   Source selectedSource;
 
-  /**
-   * Initialize a newly created namespace directive. Either or both of the
-   * [comment] and [metadata] can be `null` if the directive does not have the
-   * corresponding attribute. The list of [combinators] can be `null` if there
-   * are no combinators.
-   */
+  /// Initialize a newly created namespace directive. Either or both of the
+  /// [comment] and [metadata] can be `null` if the directive does not have the
+  /// corresponding attribute. The list of [combinators] can be `null` if there
+  /// are no combinators.
   NamespaceDirectiveImpl(
       CommentImpl comment,
       List<Annotation> metadata,
@@ -8851,27 +7381,19 @@
   LibraryElement get uriElement;
 }
 
-/**
- * The "native" clause in an class declaration.
- *
- *    nativeClause ::=
- *        'native' [StringLiteral]
- */
+/// The "native" clause in an class declaration.
+///
+///    nativeClause ::=
+///        'native' [StringLiteral]
 class NativeClauseImpl extends AstNodeImpl implements NativeClause {
-  /**
-   * The token representing the 'native' keyword.
-   */
+  /// The token representing the 'native' keyword.
   @override
   Token nativeKeyword;
 
-  /**
-   * The name of the native object that implements the class.
-   */
+  /// The name of the native object that implements the class.
   StringLiteralImpl _name;
 
-  /**
-   * Initialize a newly created native clause.
-   */
+  /// Initialize a newly created native clause.
   NativeClauseImpl(this.nativeKeyword, StringLiteralImpl name) {
     _name = _becomeParentOf(name);
   }
@@ -8903,37 +7425,27 @@
   }
 }
 
-/**
- * A function body that consists of a native keyword followed by a string
- * literal.
- *
- *    nativeFunctionBody ::=
- *        'native' [SimpleStringLiteral] ';'
- */
+/// A function body that consists of a native keyword followed by a string
+/// literal.
+///
+///    nativeFunctionBody ::=
+///        'native' [SimpleStringLiteral] ';'
 class NativeFunctionBodyImpl extends FunctionBodyImpl
     implements NativeFunctionBody {
-  /**
-   * The token representing 'native' that marks the start of the function body.
-   */
+  /// The token representing 'native' that marks the start of the function body.
   @override
   Token nativeKeyword;
 
-  /**
-   * The string literal, after the 'native' token.
-   */
+  /// The string literal, after the 'native' token.
   StringLiteralImpl _stringLiteral;
 
-  /**
-   * The token representing the semicolon that marks the end of the function
-   * body.
-   */
+  /// The token representing the semicolon that marks the end of the function
+  /// body.
   @override
   Token semicolon;
 
-  /**
-   * Initialize a newly created function body consisting of the 'native' token,
-   * a string literal, and a semicolon.
-   */
+  /// Initialize a newly created function body consisting of the 'native' token,
+  /// a string literal, and a semicolon.
   NativeFunctionBodyImpl(
       this.nativeKeyword, StringLiteralImpl stringLiteral, this.semicolon) {
     _stringLiteral = _becomeParentOf(stringLiteral);
@@ -8968,25 +7480,17 @@
   }
 }
 
-/**
- * A list of AST nodes that have a common parent.
- */
+/// A list of AST nodes that have a common parent.
 class NodeListImpl<E extends AstNode> with ListMixin<E> implements NodeList<E> {
-  /**
-   * The node that is the parent of each of the elements in the list.
-   */
+  /// The node that is the parent of each of the elements in the list.
   AstNodeImpl _owner;
 
-  /**
-   * The elements contained in the list.
-   */
+  /// The elements contained in the list.
   List<E> _elements = <E>[];
 
-  /**
-   * Initialize a newly created list of nodes such that all of the nodes that
-   * are added to the list will have their parent set to the given [owner]. The
-   * list will initially be populated with the given [elements].
-   */
+  /// Initialize a newly created list of nodes such that all of the nodes that
+  /// are added to the list will have their parent set to the given [owner]. The
+  /// list will initially be populated with the given [elements].
   NodeListImpl(this._owner, [List<E> elements]) {
     addAll(elements);
   }
@@ -9116,44 +7620,39 @@
   }
 }
 
-/**
- * A formal parameter that is required (is not optional).
- *
- *    normalFormalParameter ::=
- *        [FunctionTypedFormalParameter]
- *      | [FieldFormalParameter]
- *      | [SimpleFormalParameter]
- */
+/// A formal parameter that is required (is not optional).
+///
+///    normalFormalParameter ::=
+///        [FunctionTypedFormalParameter]
+///      | [FieldFormalParameter]
+///      | [SimpleFormalParameter]
 abstract class NormalFormalParameterImpl extends FormalParameterImpl
     implements NormalFormalParameter {
-  /**
-   * The documentation comment associated with this parameter, or `null` if this
-   * parameter does not have a documentation comment associated with it.
-   */
+  /// The documentation comment associated with this parameter, or `null` if
+  /// this parameter does not have a documentation comment associated with it.
   CommentImpl _comment;
 
-  /**
-   * The annotations associated with this parameter.
-   */
+  /// The annotations associated with this parameter.
   NodeList<Annotation> _metadata;
 
-  /**
-   * The 'covariant' keyword, or `null` if the keyword was not used.
-   */
+  /// The 'covariant' keyword, or `null` if the keyword was not used.
   Token covariantKeyword;
 
-  /**
-   * The name of the parameter being declared.
-   */
+  /// The 'required' keyword, or `null` if the keyword was not used.
+  Token requiredKeyword;
+
+  /// The name of the parameter being declared.
   SimpleIdentifierImpl _identifier;
 
-  /**
-   * Initialize a newly created formal parameter. Either or both of the
-   * [comment] and [metadata] can be `null` if the parameter does not have the
-   * corresponding attribute.
-   */
-  NormalFormalParameterImpl(CommentImpl comment, List<Annotation> metadata,
-      this.covariantKeyword, SimpleIdentifierImpl identifier) {
+  /// Initialize a newly created formal parameter. Either or both of the
+  /// [comment] and [metadata] can be `null` if the parameter does not have the
+  /// corresponding attribute.
+  NormalFormalParameterImpl(
+      CommentImpl comment,
+      List<Annotation> metadata,
+      this.covariantKeyword,
+      this.requiredKeyword,
+      SimpleIdentifierImpl identifier) {
     _comment = _becomeParentOf(comment);
     _metadata = new NodeListImpl<Annotation>(this, metadata);
     _identifier = _becomeParentOf(identifier);
@@ -9235,9 +7734,7 @@
     }
   }
 
-  /**
-   * Return `true` if the comment is lexically before any annotations.
-   */
+  /// Return `true` if the comment is lexically before any annotations.
   bool _commentIsBeforeAnnotations() {
     if (_comment == null || _metadata.isEmpty) {
       return true;
@@ -9247,21 +7744,15 @@
   }
 }
 
-/**
- * A null literal expression.
- *
- *    nullLiteral ::=
- *        'null'
- */
+/// A null literal expression.
+///
+///    nullLiteral ::=
+///        'null'
 class NullLiteralImpl extends LiteralImpl implements NullLiteral {
-  /**
-   * The token representing the literal.
-   */
+  /// The token representing the literal.
   Token literal;
 
-  /**
-   * Initialize a newly created null literal.
-   */
+  /// Initialize a newly created null literal.
   NullLiteralImpl(this.literal);
 
   @override
@@ -9283,24 +7774,18 @@
   }
 }
 
-/**
- * The "on" clause in a mixin declaration.
- *
- *    onClause ::=
- *        'on' [TypeName] (',' [TypeName])*
- */
+/// The "on" clause in a mixin declaration.
+///
+///    onClause ::=
+///        'on' [TypeName] (',' [TypeName])*
 class OnClauseImpl extends AstNodeImpl implements OnClause {
   @override
   Token onKeyword;
 
-  /**
-   * The classes are super-class constraints for the mixin.
-   */
+  /// The classes are super-class constraints for the mixin.
   NodeList<TypeName> _superclassConstraints;
 
-  /**
-   * Initialize a newly created on clause.
-   */
+  /// Initialize a newly created on clause.
   OnClauseImpl(this.onKeyword, List<TypeName> superclassConstraints) {
     _superclassConstraints =
         new NodeListImpl<TypeName>(this, superclassConstraints);
@@ -9330,32 +7815,22 @@
   }
 }
 
-/**
- * A parenthesized expression.
- *
- *    parenthesizedExpression ::=
- *        '(' [Expression] ')'
- */
+/// A parenthesized expression.
+///
+///    parenthesizedExpression ::=
+///        '(' [Expression] ')'
 class ParenthesizedExpressionImpl extends ExpressionImpl
     implements ParenthesizedExpression {
-  /**
-   * The left parenthesis.
-   */
+  /// The left parenthesis.
   Token leftParenthesis;
 
-  /**
-   * The expression within the parentheses.
-   */
+  /// The expression within the parentheses.
   ExpressionImpl _expression;
 
-  /**
-   * The right parenthesis.
-   */
+  /// The right parenthesis.
   Token rightParenthesis;
 
-  /**
-   * Initialize a newly created parenthesized expression.
-   */
+  /// Initialize a newly created parenthesized expression.
   ParenthesizedExpressionImpl(
       this.leftParenthesis, ExpressionImpl expression, this.rightParenthesis) {
     _expression = _becomeParentOf(expression);
@@ -9382,7 +7857,7 @@
   }
 
   @override
-  int get precedence => 15;
+  Precedence get precedence => Precedence.primary;
 
   @override
   Expression get unParenthesized {
@@ -9405,30 +7880,22 @@
   }
 }
 
-/**
- * A part directive.
- *
- *    partDirective ::=
- *        [Annotation] 'part' [StringLiteral] ';'
- */
+/// A part directive.
+///
+///    partDirective ::=
+///        [Annotation] 'part' [StringLiteral] ';'
 class PartDirectiveImpl extends UriBasedDirectiveImpl implements PartDirective {
-  /**
-   * The token representing the 'part' keyword.
-   */
+  /// The token representing the 'part' keyword.
   @override
   Token partKeyword;
 
-  /**
-   * The semicolon terminating the directive.
-   */
+  /// The semicolon terminating the directive.
   @override
   Token semicolon;
 
-  /**
-   * Initialize a newly created part directive. Either or both of the [comment]
-   * and [metadata] can be `null` if the directive does not have the
-   * corresponding attribute.
-   */
+  /// Initialize a newly created part directive. Either or both of the [comment]
+  /// and [metadata] can be `null` if the directive does not have the
+  /// corresponding attribute.
   PartDirectiveImpl(CommentImpl comment, List<Annotation> metadata,
       this.partKeyword, StringLiteralImpl partUri, this.semicolon)
       : super(comment, metadata, partUri);
@@ -9453,47 +7920,34 @@
   E accept<E>(AstVisitor<E> visitor) => visitor.visitPartDirective(this);
 }
 
-/**
- * A part-of directive.
- *
- *    partOfDirective ::=
- *        [Annotation] 'part' 'of' [Identifier] ';'
- */
+/// A part-of directive.
+///
+///    partOfDirective ::=
+///        [Annotation] 'part' 'of' [Identifier] ';'
 class PartOfDirectiveImpl extends DirectiveImpl implements PartOfDirective {
-  /**
-   * The token representing the 'part' keyword.
-   */
+  /// The token representing the 'part' keyword.
   @override
   Token partKeyword;
 
-  /**
-   * The token representing the 'of' keyword.
-   */
+  /// The token representing the 'of' keyword.
   @override
   Token ofKeyword;
 
-  /**
-   * The URI of the library that the containing compilation unit is part of.
-   */
+  /// The URI of the library that the containing compilation unit is part of.
   StringLiteralImpl _uri;
 
-  /**
-   * The name of the library that the containing compilation unit is part of, or
-   * `null` if no name was given (typically because a library URI was provided).
-   */
+  /// The name of the library that the containing compilation unit is part of,
+  /// or `null` if no name was given (typically because a library URI was
+  /// provided).
   LibraryIdentifierImpl _libraryName;
 
-  /**
-   * The semicolon terminating the directive.
-   */
+  /// The semicolon terminating the directive.
   @override
   Token semicolon;
 
-  /**
-   * Initialize a newly created part-of directive. Either or both of the
-   * [comment] and [metadata] can be `null` if the directive does not have the
-   * corresponding attribute.
-   */
+  /// Initialize a newly created part-of directive. Either or both of the
+  /// [comment] and [metadata] can be `null` if the directive does not have the
+  /// corresponding attribute.
   PartOfDirectiveImpl(
       CommentImpl comment,
       List<Annotation> metadata,
@@ -9551,36 +8005,26 @@
   }
 }
 
-/**
- * A postfix unary expression.
- *
- *    postfixExpression ::=
- *        [Expression] [Token]
- */
+/// A postfix unary expression.
+///
+///    postfixExpression ::=
+///        [Expression] [Token]
 class PostfixExpressionImpl extends ExpressionImpl
     implements PostfixExpression {
-  /**
-   * The expression computing the operand for the operator.
-   */
+  /// The expression computing the operand for the operator.
   ExpressionImpl _operand;
 
-  /**
-   * The postfix operator being applied to the operand.
-   */
+  /// The postfix operator being applied to the operand.
   @override
   Token operator;
 
-  /**
-   * The element associated with the operator based on the static type of the
-   * operand, or `null` if the AST structure has not been resolved, if the
-   * operator is not user definable, or if the operator could not be resolved.
-   */
+  /// The element associated with the operator based on the static type of the
+  /// operand, or `null` if the AST structure has not been resolved, if the
+  /// operator is not user definable, or if the operator could not be resolved.
   @override
   MethodElement staticElement;
 
-  /**
-   * Initialize a newly created postfix expression.
-   */
+  /// Initialize a newly created postfix expression.
   PostfixExpressionImpl(ExpressionImpl operand, this.operator) {
     _operand = _becomeParentOf(operand);
   }
@@ -9608,7 +8052,7 @@
   }
 
   @override
-  int get precedence => 15;
+  Precedence get precedence => Precedence.postfix;
 
   @deprecated
   @override
@@ -9618,12 +8062,10 @@
   @override
   set propagatedElement(MethodElement element) {}
 
-  /**
-   * If the AST structure has been resolved, and the function being invoked is
-   * known based on static type information, then return the parameter element
-   * representing the parameter to which the value of the operand will be bound.
-   * Otherwise, return `null`.
-   */
+  /// If the AST structure has been resolved, and the function being invoked is
+  /// known based on static type information, then return the parameter element
+  /// representing the parameter to which the value of the operand will be
+  /// bound.  Otherwise, return `null`.
   ParameterElement get _staticParameterElementForOperand {
     if (staticElement == null) {
       return null;
@@ -9644,44 +8086,32 @@
   }
 }
 
-/**
- * An identifier that is prefixed or an access to an object property where the
- * target of the property access is a simple identifier.
- *
- *    prefixedIdentifier ::=
- *        [SimpleIdentifier] '.' [SimpleIdentifier]
- */
+/// An identifier that is prefixed or an access to an object property where the
+/// target of the property access is a simple identifier.
+///
+///    prefixedIdentifier ::=
+///        [SimpleIdentifier] '.' [SimpleIdentifier]
 class PrefixedIdentifierImpl extends IdentifierImpl
     implements PrefixedIdentifier {
-  /**
-   * The prefix associated with the library in which the identifier is defined.
-   */
+  /// The prefix associated with the library in which the identifier is defined.
   SimpleIdentifierImpl _prefix;
 
-  /**
-   * The period used to separate the prefix from the identifier.
-   */
+  /// The period used to separate the prefix from the identifier.
   Token period;
 
-  /**
-   * The identifier being prefixed.
-   */
+  /// The identifier being prefixed.
   SimpleIdentifierImpl _identifier;
 
-  /**
-   * Initialize a newly created prefixed identifier.
-   */
+  /// Initialize a newly created prefixed identifier.
   PrefixedIdentifierImpl(SimpleIdentifierImpl prefix, this.period,
       SimpleIdentifierImpl identifier) {
     _prefix = _becomeParentOf(prefix);
     _identifier = _becomeParentOf(identifier);
   }
 
-  /**
-   * Initialize a newly created prefixed identifier that does not take ownership
-   * of the components. The resulting node is only for temporary use, such as by
-   * resolution.
-   */
+  /// Initialize a newly created prefixed identifier that does not take
+  /// ownership of the components. The resulting node is only for temporary use,
+  /// such as by resolution.
   PrefixedIdentifierImpl.temp(this._prefix, this._identifier) : period = null;
 
   @override
@@ -9729,7 +8159,7 @@
   String get name => "${_prefix.name}.${_identifier.name}";
 
   @override
-  int get precedence => 15;
+  Precedence get precedence => Precedence.postfix;
 
   @override
   SimpleIdentifier get prefix => _prefix;
@@ -9761,33 +8191,23 @@
   }
 }
 
-/**
- * A prefix unary expression.
- *
- *    prefixExpression ::=
- *        [Token] [Expression]
- */
+/// A prefix unary expression.
+///
+///    prefixExpression ::=
+///        [Token] [Expression]
 class PrefixExpressionImpl extends ExpressionImpl implements PrefixExpression {
-  /**
-   * The prefix operator being applied to the operand.
-   */
+  /// The prefix operator being applied to the operand.
   Token operator;
 
-  /**
-   * The expression computing the operand for the operator.
-   */
+  /// The expression computing the operand for the operator.
   ExpressionImpl _operand;
 
-  /**
-   * The element associated with the operator based on the static type of the
-   * operand, or `null` if the AST structure has not been resolved, if the
-   * operator is not user definable, or if the operator could not be resolved.
-   */
+  /// The element associated with the operator based on the static type of the
+  /// operand, or `null` if the AST structure has not been resolved, if the
+  /// operator is not user definable, or if the operator could not be resolved.
   MethodElement staticElement;
 
-  /**
-   * Initialize a newly created prefix expression.
-   */
+  /// Initialize a newly created prefix expression.
   PrefixExpressionImpl(this.operator, ExpressionImpl operand) {
     _operand = _becomeParentOf(operand);
   }
@@ -9815,7 +8235,7 @@
   }
 
   @override
-  int get precedence => 14;
+  Precedence get precedence => Precedence.prefix;
 
   @deprecated
   @override
@@ -9825,12 +8245,10 @@
   @override
   set propagatedElement(MethodElement element) {}
 
-  /**
-   * If the AST structure has been resolved, and the function being invoked is
-   * known based on static type information, then return the parameter element
-   * representing the parameter to which the value of the operand will be bound.
-   * Otherwise, return `null`.
-   */
+  /// If the AST structure has been resolved, and the function being invoked is
+  /// known based on static type information, then return the parameter element
+  /// representing the parameter to which the value of the operand will be
+  /// bound.  Otherwise, return `null`.
   ParameterElement get _staticParameterElementForOperand {
     if (staticElement == null) {
       return null;
@@ -9851,35 +8269,25 @@
   }
 }
 
-/**
- * The access of a property of an object.
- *
- * Note, however, that accesses to properties of objects can also be represented
- * as [PrefixedIdentifier] nodes in cases where the target is also a simple
- * identifier.
- *
- *    propertyAccess ::=
- *        [Expression] '.' [SimpleIdentifier]
- */
+/// The access of a property of an object.
+///
+/// Note, however, that accesses to properties of objects can also be
+/// represented as [PrefixedIdentifier] nodes in cases where the target is also
+/// a simple identifier.
+///
+///    propertyAccess ::=
+///        [Expression] '.' [SimpleIdentifier]
 class PropertyAccessImpl extends ExpressionImpl implements PropertyAccess {
-  /**
-   * The expression computing the object defining the property being accessed.
-   */
+  /// The expression computing the object defining the property being accessed.
   ExpressionImpl _target;
 
-  /**
-   * The property access operator.
-   */
+  /// The property access operator.
   Token operator;
 
-  /**
-   * The name of the property being accessed.
-   */
+  /// The name of the property being accessed.
   SimpleIdentifierImpl _propertyName;
 
-  /**
-   * Initialize a newly created property access expression.
-   */
+  /// Initialize a newly created property access expression.
   PropertyAccessImpl(
       ExpressionImpl target, this.operator, SimpleIdentifierImpl propertyName) {
     _target = _becomeParentOf(target);
@@ -9909,7 +8317,7 @@
       operator != null && operator.type == TokenType.PERIOD_PERIOD;
 
   @override
-  int get precedence => 15;
+  Precedence get precedence => Precedence.postfix;
 
   @override
   SimpleIdentifier get propertyName => _propertyName;
@@ -9952,49 +8360,36 @@
   }
 }
 
-/**
- * The invocation of a constructor in the same class from within a constructor's
- * initialization list.
- *
- *    redirectingConstructorInvocation ::=
- *        'this' ('.' identifier)? arguments
- */
+/// The invocation of a constructor in the same class from within a
+/// constructor's initialization list.
+///
+///    redirectingConstructorInvocation ::=
+///        'this' ('.' identifier)? arguments
 class RedirectingConstructorInvocationImpl extends ConstructorInitializerImpl
     implements RedirectingConstructorInvocation {
-  /**
-   * The token for the 'this' keyword.
-   */
+  /// The token for the 'this' keyword.
   Token thisKeyword;
 
-  /**
-   * The token for the period before the name of the constructor that is being
-   * invoked, or `null` if the unnamed constructor is being invoked.
-   */
+  /// The token for the period before the name of the constructor that is being
+  /// invoked, or `null` if the unnamed constructor is being invoked.
   Token period;
 
-  /**
-   * The name of the constructor that is being invoked, or `null` if the unnamed
-   * constructor is being invoked.
-   */
+  /// The name of the constructor that is being invoked, or `null` if the
+  /// unnamed constructor is being invoked.
   SimpleIdentifierImpl _constructorName;
 
-  /**
-   * The list of arguments to the constructor.
-   */
+  /// The list of arguments to the constructor.
   ArgumentListImpl _argumentList;
 
-  /**
-   * The element associated with the constructor based on static type
-   * information, or `null` if the AST structure has not been resolved or if the
-   * constructor could not be resolved.
-   */
+  /// The element associated with the constructor based on static type
+  /// information, or `null` if the AST structure has not been resolved or if
+  /// the constructor could not be resolved.
   ConstructorElement staticElement;
 
-  /**
-   * Initialize a newly created redirecting invocation to invoke the constructor
-   * with the given name with the given arguments. The [constructorName] can be
-   * `null` if the constructor being invoked is the unnamed constructor.
-   */
+  /// Initialize a newly created redirecting invocation to invoke the
+  /// constructor with the given name with the given arguments. The
+  /// [constructorName] can be `null` if the constructor being invoked is the
+  /// unnamed constructor.
   RedirectingConstructorInvocationImpl(this.thisKeyword, this.period,
       SimpleIdentifierImpl constructorName, ArgumentListImpl argumentList) {
     _constructorName = _becomeParentOf(constructorName);
@@ -10041,22 +8436,16 @@
   }
 }
 
-/**
- * A rethrow expression.
- *
- *    rethrowExpression ::=
- *        'rethrow'
- */
+/// A rethrow expression.
+///
+///    rethrowExpression ::=
+///        'rethrow'
 class RethrowExpressionImpl extends ExpressionImpl
     implements RethrowExpression {
-  /**
-   * The token representing the 'rethrow' keyword.
-   */
+  /// The token representing the 'rethrow' keyword.
   Token rethrowKeyword;
 
-  /**
-   * Initialize a newly created rethrow expression.
-   */
+  /// Initialize a newly created rethrow expression.
   RethrowExpressionImpl(this.rethrowKeyword);
 
   @override
@@ -10070,7 +8459,7 @@
   Token get endToken => rethrowKeyword;
 
   @override
-  int get precedence => 0;
+  Precedence get precedence => Precedence.assignment;
 
   @override
   E accept<E>(AstVisitor<E> visitor) => visitor.visitRethrowExpression(this);
@@ -10081,33 +8470,23 @@
   }
 }
 
-/**
- * A return statement.
- *
- *    returnStatement ::=
- *        'return' [Expression]? ';'
- */
+/// A return statement.
+///
+///    returnStatement ::=
+///        'return' [Expression]? ';'
 class ReturnStatementImpl extends StatementImpl implements ReturnStatement {
-  /**
-   * The token representing the 'return' keyword.
-   */
+  /// The token representing the 'return' keyword.
   Token returnKeyword;
 
-  /**
-   * The expression computing the value to be returned, or `null` if no explicit
-   * value was provided.
-   */
+  /// The expression computing the value to be returned, or `null` if no
+  /// explicit value was provided.
   ExpressionImpl _expression;
 
-  /**
-   * The semicolon terminating the statement.
-   */
+  /// The semicolon terminating the statement.
   Token semicolon;
 
-  /**
-   * Initialize a newly created return statement. The [expression] can be `null`
-   * if no explicit value was provided.
-   */
+  /// Initialize a newly created return statement. The [expression] can be
+  /// `null` if no explicit value was provided.
   ReturnStatementImpl(
       this.returnKeyword, ExpressionImpl expression, this.semicolon) {
     _expression = _becomeParentOf(expression);
@@ -10140,21 +8519,16 @@
   }
 }
 
-/**
- * A script tag that can optionally occur at the beginning of a compilation unit.
- *
- *    scriptTag ::=
- *        '#!' (~NEWLINE)* NEWLINE
- */
+/// A script tag that can optionally occur at the beginning of a compilation
+/// unit.
+///
+///    scriptTag ::=
+///        '#!' (~NEWLINE)* NEWLINE
 class ScriptTagImpl extends AstNodeImpl implements ScriptTag {
-  /**
-   * The token representing this script tag.
-   */
+  /// The token representing this script tag.
   Token scriptTag;
 
-  /**
-   * Initialize a newly created script tag.
-   */
+  /// Initialize a newly created script tag.
   ScriptTagImpl(this.scriptTag);
 
   @override
@@ -10176,39 +8550,42 @@
   }
 }
 
-/**
- * A literal set.
- *
- *    setLiteral ::=
- *        'const'? ('<' [TypeAnnotation] '>')?
- *        '{' [CollectionElement] (',' [Expression])* ','? '}'
- *      | 'const'? ('<' [TypeAnnotation] '>')? '{' '}'
- *
- * This is the class that is used to represent a set literal when either the
- * 'control-flow-collections' or 'spread-collections' experiments are enabled.
- * If neither of those experiments are enabled, then [SetLiteral] will be used.
- */
-class SetLiteral2Impl extends TypedLiteralImpl implements SetLiteral2 {
+class SetOrMapLiteralImpl extends TypedLiteralImpl implements SetOrMapLiteral {
   @override
   Token leftBracket;
 
-  /**
-   * The elements in the set.
-   */
+  /// The syntactic elements in the set.
   NodeList<CollectionElement> _elements;
 
   @override
   Token rightBracket;
 
-  /**
-   * Initialize a newly created set literal. The [constKeyword] can be `null` if
-   * the literal is not a constant. The [typeArguments] can be `null` if no type
-   * arguments were declared. The [elements] can be `null` if the set is empty.
-   */
-  SetLiteral2Impl(Token constKeyword, TypeArgumentListImpl typeArguments,
+  /// A representation of whether this literal represents a map or a set, or
+  /// whether the kind has not or cannot be determined.
+  _SetOrMapKind _resolvedKind;
+
+  /// The context type computed by
+  /// [ResolverVisitor._computeSetOrMapContextType].
+  ///
+  /// Note that this is not the same as the context pushed down by type
+  /// inference (which can be obtained via [InferenceContext.getContext]).  For
+  /// example, in the following code:
+  ///
+  ///     var m = {};
+  ///
+  /// The context pushed down by type inference is null, whereas the
+  /// `contextType` is `Map<dynamic, dynamic>`.
+  InterfaceType contextType;
+
+  /// Initialize a newly created set or map literal. The [constKeyword] can be
+  /// `null` if the literal is not a constant. The [typeArguments] can be `null`
+  /// if no type arguments were declared. The [elements] can be `null` if the
+  /// set is empty.
+  SetOrMapLiteralImpl(Token constKeyword, TypeArgumentListImpl typeArguments,
       this.leftBracket, List<CollectionElement> elements, this.rightBracket)
       : super(constKeyword, typeArguments) {
     _elements = new NodeListImpl<CollectionElement>(this, elements);
+    _resolvedKind = _SetOrMapKind.unresolved;
   }
 
   @override
@@ -10234,10 +8611,32 @@
   NodeList<CollectionElement> get elements => _elements;
 
   @override
+  @Deprecated('Replaced by elements')
+  NodeList<CollectionElement> get elements2 => _elements;
+
+  @override
   Token get endToken => rightBracket;
 
   @override
-  E accept<E>(AstVisitor<E> visitor) => visitor.visitSetLiteral2(this);
+  bool get isMap => _resolvedKind == _SetOrMapKind.map;
+
+  @override
+  bool get isSet => _resolvedKind == _SetOrMapKind.set;
+
+  @override
+  E accept<E>(AstVisitor<E> visitor) => visitor.visitSetOrMapLiteral(this);
+
+  void becomeMap() {
+    assert(_resolvedKind == _SetOrMapKind.unresolved ||
+        _resolvedKind == _SetOrMapKind.map);
+    _resolvedKind = _SetOrMapKind.map;
+  }
+
+  void becomeSet() {
+    assert(_resolvedKind == _SetOrMapKind.unresolved ||
+        _resolvedKind == _SetOrMapKind.set);
+    _resolvedKind = _SetOrMapKind.set;
+  }
 
   @override
   void visitChildren(AstVisitor visitor) {
@@ -10246,97 +8645,17 @@
   }
 }
 
-/**
- * A literal set.
- *
- *    setLiteral ::=
- *        'const'? ('<' [TypeAnnotation] '>')?
- *        '{' [Expression] (',' [Expression])* ','? '}'
- *      | 'const'? ('<' [TypeAnnotation] '>')? '{' '}'
- *
- * This is the class that is used to represent a set literal when neither the
- * 'control-flow-collections' nor 'spread-collections' experiments are enabled.
- * If either of those experiments are enabled, then [SetLiteral2] will be used.
- */
-class SetLiteralImpl extends TypedLiteralImpl implements SetLiteral {
-  /**
-   * The left curly bracket.
-   */
-  @override
-  Token leftBracket;
-
-  /**
-   * The elements in the set.
-   */
-  NodeList<Expression> _elements;
-
-  /**
-   * The right curly bracket.
-   */
-  @override
-  Token rightBracket;
-
-  /**
-   * Initialize a newly created set literal. The [constKeyword] can be `null` if
-   * the literal is not a constant. The [typeArguments] can be `null` if no type
-   * arguments were declared. The [elements] can be `null` if the set is empty.
-   */
-  SetLiteralImpl(Token constKeyword, TypeArgumentListImpl typeArguments,
-      this.leftBracket, List<Expression> elements, this.rightBracket)
-      : super(constKeyword, typeArguments) {
-    _elements = new NodeListImpl<Expression>(this, elements);
-  }
-
-  @override
-  Token get beginToken {
-    if (constKeyword != null) {
-      return constKeyword;
-    }
-    TypeArgumentList typeArguments = this.typeArguments;
-    if (typeArguments != null) {
-      return typeArguments.beginToken;
-    }
-    return leftBracket;
-  }
-
-  @override
-  // TODO(paulberry): add commas.
-  Iterable<SyntacticEntity> get childEntities => super._childEntities
-    ..add(leftBracket)
-    ..addAll(elements)
-    ..add(rightBracket);
-
-  @override
-  NodeList<Expression> get elements => _elements;
-
-  @override
-  Token get endToken => rightBracket;
-
-  @override
-  E accept<E>(AstVisitor<E> visitor) => visitor.visitSetLiteral(this);
-
-  @override
-  void visitChildren(AstVisitor visitor) {
-    super.visitChildren(visitor);
-    _elements.accept(visitor);
-  }
-}
-
-/**
- * A combinator that restricts the names being imported to those in a given list.
- *
- *    showCombinator ::=
- *        'show' [SimpleIdentifier] (',' [SimpleIdentifier])*
- */
+/// A combinator that restricts the names being imported to those in a given
+/// list.
+///
+///    showCombinator ::=
+///        'show' [SimpleIdentifier] (',' [SimpleIdentifier])*
 class ShowCombinatorImpl extends CombinatorImpl implements ShowCombinator {
-  /**
-   * The list of names from the library that are made visible by this combinator.
-   */
+  /// The list of names from the library that are made visible by this
+  /// combinator.
   NodeList<SimpleIdentifier> _shownNames;
 
-  /**
-   * Initialize a newly created import show combinator.
-   */
+  /// Initialize a newly created import show combinator.
   ShowCombinatorImpl(Token keyword, List<SimpleIdentifier> shownNames)
       : super(keyword) {
     _shownNames = new NodeListImpl<SimpleIdentifier>(this, shownNames);
@@ -10363,24 +8682,18 @@
   }
 }
 
-/**
- * A simple formal parameter.
- *
- *    simpleFormalParameter ::=
- *        ('final' [TypeName] | 'var' | [TypeName])? [SimpleIdentifier]
- */
+/// A simple formal parameter.
+///
+///    simpleFormalParameter ::=
+///        ('final' [TypeName] | 'var' | [TypeName])? [SimpleIdentifier]
 class SimpleFormalParameterImpl extends NormalFormalParameterImpl
     implements SimpleFormalParameter {
-  /**
-   * The token representing either the 'final', 'const' or 'var' keyword, or
-   * `null` if no keyword was used.
-   */
+  /// The token representing either the 'final', 'const' or 'var' keyword, or
+  /// `null` if no keyword was used.
   Token keyword;
 
-  /**
-   * The name of the declared type of the parameter, or `null` if the parameter
-   * does not have a declared type.
-   */
+  /// The name of the declared type of the parameter, or `null` if the parameter
+  /// does not have a declared type.
   TypeAnnotationImpl _type;
 
   @override
@@ -10389,20 +8702,20 @@
   // corresponding inherited setter. This seems inconsistent and error prone.
   ParameterElement declaredElement;
 
-  /**
-   * Initialize a newly created formal parameter. Either or both of the
-   * [comment] and [metadata] can be `null` if the parameter does not have the
-   * corresponding attribute. The [keyword] can be `null` if a type was
-   * specified. The [type] must be `null` if the keyword is 'var'.
-   */
+  /// Initialize a newly created formal parameter. Either or both of the
+  /// [comment] and [metadata] can be `null` if the parameter does not have the
+  /// corresponding attribute. The [keyword] can be `null` if a type was
+  /// specified. The [type] must be `null` if the keyword is 'var'.
   SimpleFormalParameterImpl(
       CommentImpl comment,
       List<Annotation> metadata,
       Token covariantKeyword,
+      Token requiredKeyword,
       this.keyword,
       TypeAnnotationImpl type,
       SimpleIdentifierImpl identifier)
-      : super(comment, metadata, covariantKeyword, identifier) {
+      : super(
+            comment, metadata, covariantKeyword, requiredKeyword, identifier) {
     _type = _becomeParentOf(type);
   }
 
@@ -10454,39 +8767,29 @@
   }
 }
 
-/**
- * A simple identifier.
- *
- *    simpleIdentifier ::=
- *        initialCharacter internalCharacter*
- *
- *    initialCharacter ::= '_' | '$' | letter
- *
- *    internalCharacter ::= '_' | '$' | letter | digit
- */
+/// A simple identifier.
+///
+///    simpleIdentifier ::=
+///        initialCharacter internalCharacter*
+///
+///    initialCharacter ::= '_' | '$' | letter
+///
+///    internalCharacter ::= '_' | '$' | letter | digit
 class SimpleIdentifierImpl extends IdentifierImpl implements SimpleIdentifier {
-  /**
-   * The token representing the identifier.
-   */
+  /// The token representing the identifier.
   Token token;
 
-  /**
-   * The element associated with this identifier based on static type
-   * information, or `null` if the AST structure has not been resolved or if
-   * this identifier could not be resolved.
-   */
+  /// The element associated with this identifier based on static type
+  /// information, or `null` if the AST structure has not been resolved or if
+  /// this identifier could not be resolved.
   Element _staticElement;
 
-  /**
-   * If this expression is both in a getter and setter context, the
-   * [AuxiliaryElements] will be set to hold onto the static element from the
-   * getter context.
-   */
+  /// If this expression is both in a getter and setter context, the
+  /// [AuxiliaryElements] will be set to hold onto the static element from the
+  /// getter context.
   AuxiliaryElements auxiliaryElements = null;
 
-  /**
-   * Initialize a newly created identifier.
-   */
+  /// Initialize a newly created identifier.
   SimpleIdentifierImpl(this.token);
 
   @override
@@ -10525,7 +8828,7 @@
   String get name => token.lexeme;
 
   @override
-  int get precedence => 16;
+  Precedence get precedence => Precedence.primary;
 
   @deprecated
   @override
@@ -10584,7 +8887,7 @@
         identical(parent.fieldName, target)) {
       return false;
     }
-    if (parent is ForEachStatement) {
+    if (parent is ForEachPartsWithIdentifier) {
       if (identical(parent.identifier, target)) {
         return false;
       }
@@ -10630,7 +8933,7 @@
       return true;
     } else if (parent is AssignmentExpression) {
       return identical(parent.leftHandSide, target);
-    } else if (parent is ForEachStatement) {
+    } else if (parent is ForEachPartsWithIdentifier) {
       return identical(parent.identifier, target);
     }
     return false;
@@ -10642,43 +8945,35 @@
   }
 }
 
-/**
- * A string literal expression that does not contain any interpolations.
- *
- *    simpleStringLiteral ::=
- *        rawStringLiteral
- *      | basicStringLiteral
- *
- *    rawStringLiteral ::=
- *        'r' basicStringLiteral
- *
- *    simpleStringLiteral ::=
- *        multiLineStringLiteral
- *      | singleLineStringLiteral
- *
- *    multiLineStringLiteral ::=
- *        "'''" characters "'''"
- *      | '"""' characters '"""'
- *
- *    singleLineStringLiteral ::=
- *        "'" characters "'"
- *      | '"' characters '"'
- */
+/// A string literal expression that does not contain any interpolations.
+///
+///    simpleStringLiteral ::=
+///        rawStringLiteral
+///      | basicStringLiteral
+///
+///    rawStringLiteral ::=
+///        'r' basicStringLiteral
+///
+///    simpleStringLiteral ::=
+///        multiLineStringLiteral
+///      | singleLineStringLiteral
+///
+///    multiLineStringLiteral ::=
+///        "'''" characters "'''"
+///      | '"""' characters '"""'
+///
+///    singleLineStringLiteral ::=
+///        "'" characters "'"
+///      | '"' characters '"'
 class SimpleStringLiteralImpl extends SingleStringLiteralImpl
     implements SimpleStringLiteral {
-  /**
-   * The token representing the literal.
-   */
+  /// The token representing the literal.
   Token literal;
 
-  /**
-   * The value of the literal.
-   */
+  /// The value of the literal.
   String _value;
 
-  /**
-   * Initialize a newly created simple string literal.
-   */
+  /// Initialize a newly created simple string literal.
   SimpleStringLiteralImpl(this.literal, String value) {
     _value = StringUtilities.intern(value);
   }
@@ -10737,13 +9032,11 @@
   }
 }
 
-/**
- * A single string literal expression.
- *
- *    singleStringLiteral ::=
- *        [SimpleStringLiteral]
- *      | [StringInterpolation]
- */
+/// A single string literal expression.
+///
+///    singleStringLiteral ::=
+///        [SimpleStringLiteral]
+///      | [StringInterpolation]
 abstract class SingleStringLiteralImpl extends StringLiteralImpl
     implements SingleStringLiteral {}
 
@@ -10785,47 +9078,39 @@
   }
 }
 
-/**
- * A node that represents a statement.
- *
- *    statement ::=
- *        [Block]
- *      | [VariableDeclarationStatement]
- *      | [ForStatement]
- *      | [ForEachStatement]
- *      | [WhileStatement]
- *      | [DoStatement]
- *      | [SwitchStatement]
- *      | [IfStatement]
- *      | [TryStatement]
- *      | [BreakStatement]
- *      | [ContinueStatement]
- *      | [ReturnStatement]
- *      | [ExpressionStatement]
- *      | [FunctionDeclarationStatement]
- */
+/// A node that represents a statement.
+///
+///    statement ::=
+///        [Block]
+///      | [VariableDeclarationStatement]
+///      | [ForStatement]
+///      | [ForEachStatement]
+///      | [WhileStatement]
+///      | [DoStatement]
+///      | [SwitchStatement]
+///      | [IfStatement]
+///      | [TryStatement]
+///      | [BreakStatement]
+///      | [ContinueStatement]
+///      | [ReturnStatement]
+///      | [ExpressionStatement]
+///      | [FunctionDeclarationStatement]
 abstract class StatementImpl extends AstNodeImpl implements Statement {
   @override
   Statement get unlabeled => this;
 }
 
-/**
- * A string interpolation literal.
- *
- *    stringInterpolation ::=
- *        ''' [InterpolationElement]* '''
- *      | '"' [InterpolationElement]* '"'
- */
+/// A string interpolation literal.
+///
+///    stringInterpolation ::=
+///        ''' [InterpolationElement]* '''
+///      | '"' [InterpolationElement]* '"'
 class StringInterpolationImpl extends SingleStringLiteralImpl
     implements StringInterpolation {
-  /**
-   * The elements that will be composed to produce the resulting string.
-   */
+  /// The elements that will be composed to produce the resulting string.
   NodeList<InterpolationElement> _elements;
 
-  /**
-   * Initialize a newly created string interpolation expression.
-   */
+  /// Initialize a newly created string interpolation expression.
   StringInterpolationImpl(List<InterpolationElement> elements) {
     _elements = new NodeListImpl<InterpolationElement>(this, elements);
   }
@@ -10849,9 +9134,7 @@
     return element.contentsOffset;
   }
 
-  /**
-   * Return the elements that will be composed to produce the resulting string.
-   */
+  /// Return the elements that will be composed to produce the resulting string.
   NodeList<InterpolationElement> get elements => _elements;
 
   @override
@@ -10886,9 +9169,7 @@
   }
 }
 
-/**
- * A helper for analyzing string lexemes.
- */
+/// A helper for analyzing string lexemes.
 class StringLexemeHelper {
   final String lexeme;
   final bool isFirst;
@@ -10940,15 +9221,13 @@
     }
   }
 
-  /**
-   * Given the [lexeme] for a multi-line string whose content begins at the
-   * given [start] index, return the index of the first character that is
-   * included in the value of the string. According to the specification:
-   *
-   * If the first line of a multiline string consists solely of the whitespace
-   * characters defined by the production WHITESPACE 20.1), possibly prefixed
-   * by \, then that line is ignored, including the new line at its end.
-   */
+  /// Given the [lexeme] for a multi-line string whose content begins at the
+  /// given [start] index, return the index of the first character that is
+  /// included in the value of the string. According to the specification:
+  ///
+  /// If the first line of a multiline string consists solely of the whitespace
+  /// characters defined by the production WHITESPACE 20.1), possibly prefixed
+  /// by \, then that line is ignored, including the new line at its end.
   int _trimInitialWhitespace(int start) {
     int length = lexeme.length;
     int index = start;
@@ -10981,14 +9260,12 @@
   }
 }
 
-/**
- * A string literal expression.
- *
- *    stringLiteral ::=
- *        [SimpleStringLiteral]
- *      | [AdjacentStrings]
- *      | [StringInterpolation]
- */
+/// A string literal expression.
+///
+///    stringLiteral ::=
+///        [SimpleStringLiteral]
+///      | [AdjacentStrings]
+///      | [StringInterpolation]
 abstract class StringLiteralImpl extends LiteralImpl implements StringLiteral {
   @override
   String get stringValue {
@@ -11001,58 +9278,42 @@
     return buffer.toString();
   }
 
-  /**
-   * Append the value of this string literal to the given [buffer]. Throw an
-   * [ArgumentError] if the string is not a constant string without any
-   * string interpolation.
-   */
+  /// Append the value of this string literal to the given [buffer]. Throw an
+  /// [ArgumentError] if the string is not a constant string without any
+  /// string interpolation.
   void _appendStringValue(StringBuffer buffer);
 }
 
-/**
- * The invocation of a superclass' constructor from within a constructor's
- * initialization list.
- *
- *    superInvocation ::=
- *        'super' ('.' [SimpleIdentifier])? [ArgumentList]
- */
+/// The invocation of a superclass' constructor from within a constructor's
+/// initialization list.
+///
+///    superInvocation ::=
+///        'super' ('.' [SimpleIdentifier])? [ArgumentList]
 class SuperConstructorInvocationImpl extends ConstructorInitializerImpl
     implements SuperConstructorInvocation {
-  /**
-   * The token for the 'super' keyword.
-   */
+  /// The token for the 'super' keyword.
   Token superKeyword;
 
-  /**
-   * The token for the period before the name of the constructor that is being
-   * invoked, or `null` if the unnamed constructor is being invoked.
-   */
+  /// The token for the period before the name of the constructor that is being
+  /// invoked, or `null` if the unnamed constructor is being invoked.
   Token period;
 
-  /**
-   * The name of the constructor that is being invoked, or `null` if the unnamed
-   * constructor is being invoked.
-   */
+  /// The name of the constructor that is being invoked, or `null` if the
+  /// unnamed constructor is being invoked.
   SimpleIdentifierImpl _constructorName;
 
-  /**
-   * The list of arguments to the constructor.
-   */
+  /// The list of arguments to the constructor.
   ArgumentListImpl _argumentList;
 
-  /**
-   * The element associated with the constructor based on static type
-   * information, or `null` if the AST structure has not been resolved or if the
-   * constructor could not be resolved.
-   */
+  /// The element associated with the constructor based on static type
+  /// information, or `null` if the AST structure has not been resolved or if
+  /// the constructor could not be resolved.
   ConstructorElement staticElement;
 
-  /**
-   * Initialize a newly created super invocation to invoke the inherited
-   * constructor with the given name with the given arguments. The [period] and
-   * [constructorName] can be `null` if the constructor being invoked is the
-   * unnamed constructor.
-   */
+  /// Initialize a newly created super invocation to invoke the inherited
+  /// constructor with the given name with the given arguments. The [period] and
+  /// [constructorName] can be `null` if the constructor being invoked is the
+  /// unnamed constructor.
   SuperConstructorInvocationImpl(this.superKeyword, this.period,
       SimpleIdentifierImpl constructorName, ArgumentListImpl argumentList) {
     _constructorName = _becomeParentOf(constructorName);
@@ -11099,21 +9360,15 @@
   }
 }
 
-/**
- * A super expression.
- *
- *    superExpression ::=
- *        'super'
- */
+/// A super expression.
+///
+///    superExpression ::=
+///        'super'
 class SuperExpressionImpl extends ExpressionImpl implements SuperExpression {
-  /**
-   * The token representing the 'super' keyword.
-   */
+  /// The token representing the 'super' keyword.
   Token superKeyword;
 
-  /**
-   * Initialize a newly created super expression.
-   */
+  /// Initialize a newly created super expression.
   SuperExpressionImpl(this.superKeyword);
 
   @override
@@ -11127,7 +9382,7 @@
   Token get endToken => superKeyword;
 
   @override
-  int get precedence => 16;
+  Precedence get precedence => Precedence.primary;
 
   @override
   E accept<E>(AstVisitor<E> visitor) => visitor.visitSuperExpression(this);
@@ -11138,22 +9393,16 @@
   }
 }
 
-/**
- * A case in a switch statement.
- *
- *    switchCase ::=
- *        [SimpleIdentifier]* 'case' [Expression] ':' [Statement]*
- */
+/// A case in a switch statement.
+///
+///    switchCase ::=
+///        [SimpleIdentifier]* 'case' [Expression] ':' [Statement]*
 class SwitchCaseImpl extends SwitchMemberImpl implements SwitchCase {
-  /**
-   * The expression controlling whether the statements will be executed.
-   */
+  /// The expression controlling whether the statements will be executed.
   ExpressionImpl _expression;
 
-  /**
-   * Initialize a newly created switch case. The list of [labels] can be `null`
-   * if there are no labels.
-   */
+  /// Initialize a newly created switch case. The list of [labels] can be `null`
+  /// if there are no labels.
   SwitchCaseImpl(List<Label> labels, Token keyword, ExpressionImpl expression,
       Token colon, List<Statement> statements)
       : super(labels, keyword, colon, statements) {
@@ -11187,17 +9436,13 @@
   }
 }
 
-/**
- * The default case in a switch statement.
- *
- *    switchDefault ::=
- *        [SimpleIdentifier]* 'default' ':' [Statement]*
- */
+/// The default case in a switch statement.
+///
+///    switchDefault ::=
+///        [SimpleIdentifier]* 'default' ':' [Statement]*
 class SwitchDefaultImpl extends SwitchMemberImpl implements SwitchDefault {
-  /**
-   * Initialize a newly created switch default. The list of [labels] can be
-   * `null` if there are no labels.
-   */
+  /// Initialize a newly created switch default. The list of [labels] can be
+  /// `null` if there are no labels.
   SwitchDefaultImpl(List<Label> labels, Token keyword, Token colon,
       List<Statement> statements)
       : super(labels, keyword, colon, statements);
@@ -11219,38 +9464,26 @@
   }
 }
 
-/**
- * An element within a switch statement.
- *
- *    switchMember ::=
- *        switchCase
- *      | switchDefault
- */
+/// An element within a switch statement.
+///
+///    switchMember ::=
+///        switchCase
+///      | switchDefault
 abstract class SwitchMemberImpl extends AstNodeImpl implements SwitchMember {
-  /**
-   * The labels associated with the switch member.
-   */
+  /// The labels associated with the switch member.
   NodeList<Label> _labels;
 
-  /**
-   * The token representing the 'case' or 'default' keyword.
-   */
+  /// The token representing the 'case' or 'default' keyword.
   Token keyword;
 
-  /**
-   * The colon separating the keyword or the expression from the statements.
-   */
+  /// The colon separating the keyword or the expression from the statements.
   Token colon;
 
-  /**
-   * The statements that will be executed if this switch member is selected.
-   */
+  /// The statements that will be executed if this switch member is selected.
   NodeList<Statement> _statements;
 
-  /**
-   * Initialize a newly created switch member. The list of [labels] can be
-   * `null` if there are no labels.
-   */
+  /// Initialize a newly created switch member. The list of [labels] can be
+  /// `null` if there are no labels.
   SwitchMemberImpl(List<Label> labels, this.keyword, this.colon,
       List<Statement> statements) {
     _labels = new NodeListImpl<Label>(this, labels);
@@ -11280,53 +9513,35 @@
   NodeList<Statement> get statements => _statements;
 }
 
-/**
- * A switch statement.
- *
- *    switchStatement ::=
- *        'switch' '(' [Expression] ')' '{' [SwitchCase]* [SwitchDefault]? '}'
- */
+/// A switch statement.
+///
+///    switchStatement ::=
+///        'switch' '(' [Expression] ')' '{' [SwitchCase]* [SwitchDefault]? '}'
 class SwitchStatementImpl extends StatementImpl implements SwitchStatement {
-  /**
-   * The token representing the 'switch' keyword.
-   */
+  /// The token representing the 'switch' keyword.
   Token switchKeyword;
 
-  /**
-   * The left parenthesis.
-   */
+  /// The left parenthesis.
   Token leftParenthesis;
 
-  /**
-   * The expression used to determine which of the switch members will be
-   * selected.
-   */
+  /// The expression used to determine which of the switch members will be
+  /// selected.
   ExpressionImpl _expression;
 
-  /**
-   * The right parenthesis.
-   */
+  /// The right parenthesis.
   Token rightParenthesis;
 
-  /**
-   * The left curly bracket.
-   */
+  /// The left curly bracket.
   Token leftBracket;
 
-  /**
-   * The switch members that can be selected by the expression.
-   */
+  /// The switch members that can be selected by the expression.
   NodeList<SwitchMember> _members;
 
-  /**
-   * The right curly bracket.
-   */
+  /// The right curly bracket.
   Token rightBracket;
 
-  /**
-   * Initialize a newly created switch statement. The list of [members] can be
-   * `null` if there are no switch members.
-   */
+  /// Initialize a newly created switch statement. The list of [members] can be
+  /// `null` if there are no switch members.
   SwitchStatementImpl(
       this.switchKeyword,
       this.leftParenthesis,
@@ -11376,26 +9591,18 @@
   }
 }
 
-/**
- * A symbol literal expression.
- *
- *    symbolLiteral ::=
- *        '#' (operator | (identifier ('.' identifier)*))
- */
+/// A symbol literal expression.
+///
+///    symbolLiteral ::=
+///        '#' (operator | (identifier ('.' identifier)*))
 class SymbolLiteralImpl extends LiteralImpl implements SymbolLiteral {
-  /**
-   * The token introducing the literal.
-   */
+  /// The token introducing the literal.
   Token poundSign;
 
-  /**
-   * The components of the literal.
-   */
+  /// The components of the literal.
   final List<Token> components;
 
-  /**
-   * Initialize a newly created symbol literal.
-   */
+  /// Initialize a newly created symbol literal.
   SymbolLiteralImpl(this.poundSign, this.components);
 
   @override
@@ -11419,21 +9626,15 @@
   }
 }
 
-/**
- * A this expression.
- *
- *    thisExpression ::=
- *        'this'
- */
+/// A this expression.
+///
+///    thisExpression ::=
+///        'this'
 class ThisExpressionImpl extends ExpressionImpl implements ThisExpression {
-  /**
-   * The token representing the 'this' keyword.
-   */
+  /// The token representing the 'this' keyword.
   Token thisKeyword;
 
-  /**
-   * Initialize a newly created this expression.
-   */
+  /// Initialize a newly created this expression.
   ThisExpressionImpl(this.thisKeyword);
 
   @override
@@ -11447,7 +9648,7 @@
   Token get endToken => thisKeyword;
 
   @override
-  int get precedence => 16;
+  Precedence get precedence => Precedence.primary;
 
   @override
   E accept<E>(AstVisitor<E> visitor) => visitor.visitThisExpression(this);
@@ -11458,26 +9659,18 @@
   }
 }
 
-/**
- * A throw expression.
- *
- *    throwExpression ::=
- *        'throw' [Expression]
- */
+/// A throw expression.
+///
+///    throwExpression ::=
+///        'throw' [Expression]
 class ThrowExpressionImpl extends ExpressionImpl implements ThrowExpression {
-  /**
-   * The token representing the 'throw' keyword.
-   */
+  /// The token representing the 'throw' keyword.
   Token throwKeyword;
 
-  /**
-   * The expression computing the exception to be thrown.
-   */
+  /// The expression computing the exception to be thrown.
   ExpressionImpl _expression;
 
-  /**
-   * Initialize a newly created throw expression.
-   */
+  /// Initialize a newly created throw expression.
   ThrowExpressionImpl(this.throwKeyword, ExpressionImpl expression) {
     _expression = _becomeParentOf(expression);
   }
@@ -11506,7 +9699,7 @@
   }
 
   @override
-  int get precedence => 0;
+  Precedence get precedence => Precedence.assignment;
 
   @override
   E accept<E>(AstVisitor<E> visitor) => visitor.visitThrowExpression(this);
@@ -11517,30 +9710,22 @@
   }
 }
 
-/**
- * The declaration of one or more top-level variables of the same type.
- *
- *    topLevelVariableDeclaration ::=
- *        ('final' | 'const') type? staticFinalDeclarationList ';'
- *      | variableDeclaration ';'
- */
+/// The declaration of one or more top-level variables of the same type.
+///
+///    topLevelVariableDeclaration ::=
+///        ('final' | 'const') type? staticFinalDeclarationList ';'
+///      | variableDeclaration ';'
 class TopLevelVariableDeclarationImpl extends CompilationUnitMemberImpl
     implements TopLevelVariableDeclaration {
-  /**
-   * The top-level variables being declared.
-   */
+  /// The top-level variables being declared.
   VariableDeclarationListImpl _variableList;
 
-  /**
-   * The semicolon terminating the declaration.
-   */
+  /// The semicolon terminating the declaration.
   Token semicolon;
 
-  /**
-   * Initialize a newly created top-level variable declaration. Either or both
-   * of the [comment] and [metadata] can be `null` if the variable does not have
-   * the corresponding attribute.
-   */
+  /// Initialize a newly created top-level variable declaration. Either or both
+  /// of the [comment] and [metadata] can be `null` if the variable does not
+  /// have the corresponding attribute.
   TopLevelVariableDeclarationImpl(
       CommentImpl comment,
       List<Annotation> metadata,
@@ -11586,48 +9771,34 @@
   }
 }
 
-/**
- * A try statement.
- *
- *    tryStatement ::=
- *        'try' [Block] ([CatchClause]+ finallyClause? | finallyClause)
- *
- *    finallyClause ::=
- *        'finally' [Block]
- */
+/// A try statement.
+///
+///    tryStatement ::=
+///        'try' [Block] ([CatchClause]+ finallyClause? | finallyClause)
+///
+///    finallyClause ::=
+///        'finally' [Block]
 class TryStatementImpl extends StatementImpl implements TryStatement {
-  /**
-   * The token representing the 'try' keyword.
-   */
+  /// The token representing the 'try' keyword.
   Token tryKeyword;
 
-  /**
-   * The body of the statement.
-   */
+  /// The body of the statement.
   BlockImpl _body;
 
-  /**
-   * The catch clauses contained in the try statement.
-   */
+  /// The catch clauses contained in the try statement.
   NodeList<CatchClause> _catchClauses;
 
-  /**
-   * The token representing the 'finally' keyword, or `null` if the statement
-   * does not contain a finally clause.
-   */
+  /// The token representing the 'finally' keyword, or `null` if the statement
+  /// does not contain a finally clause.
   Token finallyKeyword;
 
-  /**
-   * The finally block contained in the try statement, or `null` if the
-   * statement does not contain a finally clause.
-   */
+  /// The finally block contained in the try statement, or `null` if the
+  /// statement does not contain a finally clause.
   BlockImpl _finallyBlock;
 
-  /**
-   * Initialize a newly created try statement. The list of [catchClauses] can be
-   * `null` if there are no catch clauses. The [finallyKeyword] and
-   * [finallyBlock] can be `null` if there is no finally clause.
-   */
+  /// Initialize a newly created try statement. The list of [catchClauses] can
+  /// be`null` if there are no catch clauses. The [finallyKeyword] and
+  /// [finallyBlock] can be `null` if there is no finally clause.
   TryStatementImpl(
       this.tryKeyword,
       BlockImpl body,
@@ -11692,33 +9863,25 @@
   }
 }
 
-/**
- * The declaration of a type alias.
- *
- *    typeAlias ::=
- *        'typedef' typeAliasBody
- *
- *    typeAliasBody ::=
- *        classTypeAlias
- *      | functionTypeAlias
- */
+/// The declaration of a type alias.
+///
+///    typeAlias ::=
+///        'typedef' typeAliasBody
+///
+///    typeAliasBody ::=
+///        classTypeAlias
+///      | functionTypeAlias
 abstract class TypeAliasImpl extends NamedCompilationUnitMemberImpl
     implements TypeAlias {
-  /**
-   * The token representing the 'typedef' keyword.
-   */
+  /// The token representing the 'typedef' keyword.
   Token typedefKeyword;
 
-  /**
-   * The semicolon terminating the declaration.
-   */
+  /// The semicolon terminating the declaration.
   Token semicolon;
 
-  /**
-   * Initialize a newly created type alias. Either or both of the [comment] and
-   * [metadata] can be `null` if the declaration does not have the corresponding
-   * attribute.
-   */
+  /// Initialize a newly created type alias. Either or both of the [comment] and
+  /// [metadata] can be `null` if the declaration does not have the
+  /// corresponding attribute.
   TypeAliasImpl(CommentImpl comment, List<Annotation> metadata,
       this.typedefKeyword, SimpleIdentifierImpl name, this.semicolon)
       : super(comment, metadata, name);
@@ -11730,41 +9893,29 @@
   Token get firstTokenAfterCommentAndMetadata => typedefKeyword;
 }
 
-/**
- * A type annotation.
- *
- *    type ::=
- *        [NamedType]
- *      | [GenericFunctionType]
- */
+/// A type annotation.
+///
+///    type ::=
+///        [NamedType]
+///      | [GenericFunctionType]
 abstract class TypeAnnotationImpl extends AstNodeImpl
     implements TypeAnnotation {}
 
-/**
- * A list of type arguments.
- *
- *    typeArguments ::=
- *        '<' typeName (',' typeName)* '>'
- */
+/// A list of type arguments.
+///
+///    typeArguments ::=
+///        '<' typeName (',' typeName)* '>'
 class TypeArgumentListImpl extends AstNodeImpl implements TypeArgumentList {
-  /**
-   * The left bracket.
-   */
+  /// The left bracket.
   Token leftBracket;
 
-  /**
-   * The type arguments associated with the type.
-   */
+  /// The type arguments associated with the type.
   NodeList<TypeAnnotation> _arguments;
 
-  /**
-   * The right bracket.
-   */
+  /// The right bracket.
   Token rightBracket;
 
-  /**
-   * Initialize a newly created list of type arguments.
-   */
+  /// Initialize a newly created list of type arguments.
   TypeArgumentListImpl(
       this.leftBracket, List<TypeAnnotation> arguments, this.rightBracket) {
     _arguments = new NodeListImpl<TypeAnnotation>(this, arguments);
@@ -11795,31 +9946,23 @@
   }
 }
 
-/**
- * A literal that has a type associated with it.
- *
- *    typedLiteral ::=
- *        [ListLiteral]
- *      | [MapLiteral]
- */
+/// A literal that has a type associated with it.
+///
+///    typedLiteral ::=
+///        [ListLiteral]
+///      | [MapLiteral]
 abstract class TypedLiteralImpl extends LiteralImpl implements TypedLiteral {
-  /**
-   * The token representing the 'const' keyword, or `null` if the literal is not
-   * a constant.
-   */
+  /// The token representing the 'const' keyword, or `null` if the literal is
+  /// not a constant.
   Token constKeyword;
 
-  /**
-   * The type argument associated with this literal, or `null` if no type
-   * arguments were declared.
-   */
+  /// The type argument associated with this literal, or `null` if no type
+  /// arguments were declared.
   TypeArgumentListImpl _typeArguments;
 
-  /**
-   * Initialize a newly created typed literal. The [constKeyword] can be `null`\
-   * if the literal is not a constant. The [typeArguments] can be `null` if no
-   * type arguments were declared.
-   */
+  /// Initialize a newly created typed literal. The [constKeyword] can be
+  /// `null` if the literal is not a constant. The [typeArguments] can be `null`
+  /// if no type arguments were declared.
   TypedLiteralImpl(this.constKeyword, TypeArgumentListImpl typeArguments) {
     _typeArguments = _becomeParentOf(typeArguments);
   }
@@ -11846,36 +9989,27 @@
   }
 }
 
-/**
- * The name of a type, which can optionally include type arguments.
- *
- *    typeName ::=
- *        [Identifier] typeArguments? '?'?
- */
+/// The name of a type, which can optionally include type arguments.
+///
+///    typeName ::=
+///        [Identifier] typeArguments? '?'?
 class TypeNameImpl extends TypeAnnotationImpl implements TypeName {
-  /**
-   * The name of the type.
-   */
+  /// The name of the type.
   IdentifierImpl _name;
 
-  /**
-   * The type arguments associated with the type, or `null` if there are no type
-   * arguments.
-   */
+  /// The type arguments associated with the type, or `null` if there are no
+  /// type arguments.
   TypeArgumentListImpl _typeArguments;
 
   @override
   Token question;
 
-  /**
-   * The type being named, or `null` if the AST structure has not been resolved.
-   */
+  /// The type being named, or `null` if the AST structure has not been
+  /// resolved.
   DartType type;
 
-  /**
-   * Initialize a newly created type name. The [typeArguments] can be `null` if
-   * there are no type arguments.
-   */
+  /// Initialize a newly created type name. The [typeArguments] can be `null` if
+  /// there are no type arguments.
   TypeNameImpl(IdentifierImpl name, TypeArgumentListImpl typeArguments,
       {this.question}) {
     _name = _becomeParentOf(name);
@@ -11930,36 +10064,26 @@
   }
 }
 
-/**
- * A type parameter.
- *
- *    typeParameter ::=
- *        [SimpleIdentifier] ('extends' [TypeName])?
- */
+/// A type parameter.
+///
+///    typeParameter ::=
+///        [SimpleIdentifier] ('extends' [TypeName])?
 class TypeParameterImpl extends DeclarationImpl implements TypeParameter {
-  /**
-   * The name of the type parameter.
-   */
+  /// The name of the type parameter.
   SimpleIdentifierImpl _name;
 
-  /**
-   * The token representing the 'extends' keyword, or `null` if there is no
-   * explicit upper bound.
-   */
+  /// The token representing the 'extends' keyword, or `null` if there is no
+  /// explicit upper bound.
   Token extendsKeyword;
 
-  /**
-   * The name of the upper bound for legal arguments, or `null` if there is no
-   * explicit upper bound.
-   */
+  /// The name of the upper bound for legal arguments, or `null` if there is no
+  /// explicit upper bound.
   TypeAnnotationImpl _bound;
 
-  /**
-   * Initialize a newly created type parameter. Either or both of the [comment]
-   * and [metadata] can be `null` if the parameter does not have the
-   * corresponding attribute. The [extendsKeyword] and [bound] can be `null` if
-   * the parameter does not have an upper bound.
-   */
+  /// Initialize a newly created type parameter. Either or both of the [comment]
+  /// and [metadata] can be `null` if the parameter does not have the
+  /// corresponding attribute. The [extendsKeyword] and [bound] can be `null` if
+  /// the parameter does not have an upper bound.
   TypeParameterImpl(CommentImpl comment, List<Annotation> metadata,
       SimpleIdentifierImpl name, this.extendsKeyword, TypeAnnotationImpl bound)
       : super(comment, metadata) {
@@ -12017,31 +10141,21 @@
   }
 }
 
-/**
- * Type parameters within a declaration.
- *
- *    typeParameterList ::=
- *        '<' [TypeParameter] (',' [TypeParameter])* '>'
- */
+/// Type parameters within a declaration.
+///
+///    typeParameterList ::=
+///        '<' [TypeParameter] (',' [TypeParameter])* '>'
 class TypeParameterListImpl extends AstNodeImpl implements TypeParameterList {
-  /**
-   * The left angle bracket.
-   */
+  /// The left angle bracket.
   final Token leftBracket;
 
-  /**
-   * The type parameters in the list.
-   */
+  /// The type parameters in the list.
   NodeList<TypeParameter> _typeParameters;
 
-  /**
-   * The right angle bracket.
-   */
+  /// The right angle bracket.
   final Token rightBracket;
 
-  /**
-   * Initialize a newly created list of type parameters.
-   */
+  /// Initialize a newly created list of type parameters.
   TypeParameterListImpl(
       this.leftBracket, List<TypeParameter> typeParameters, this.rightBracket) {
     _typeParameters = new NodeListImpl<TypeParameter>(this, typeParameters);
@@ -12071,25 +10185,19 @@
   }
 }
 
-/**
- * A directive that references a URI.
- *
- *    uriBasedDirective ::=
- *        [ExportDirective]
- *      | [ImportDirective]
- *      | [PartDirective]
- */
+/// A directive that references a URI.
+///
+///    uriBasedDirective ::=
+///        [ExportDirective]
+///      | [ImportDirective]
+///      | [PartDirective]
 abstract class UriBasedDirectiveImpl extends DirectiveImpl
     implements UriBasedDirective {
-  /**
-   * The prefix of a URI using the `dart-ext` scheme to reference a native code
-   * library.
-   */
+  /// The prefix of a URI using the `dart-ext` scheme to reference a native code
+  /// library.
   static String _DART_EXT_SCHEME = "dart-ext:";
 
-  /**
-   * The URI referenced by this directive.
-   */
+  /// The URI referenced by this directive.
   StringLiteralImpl _uri;
 
   @override
@@ -12098,11 +10206,9 @@
   @override
   Source uriSource;
 
-  /**
-   * Initialize a newly create URI-based directive. Either or both of the
-   * [comment] and [metadata] can be `null` if the directive does not have the
-   * corresponding attribute.
-   */
+  /// Initialize a newly create URI-based directive. Either or both of the
+  /// [comment] and [metadata] can be `null` if the directive does not have the
+  /// corresponding attribute.
   UriBasedDirectiveImpl(
       CommentImpl comment, List<Annotation> metadata, StringLiteralImpl uri)
       : super(comment, metadata) {
@@ -12137,10 +10243,8 @@
     _uri?.accept(visitor);
   }
 
-  /**
-   * Validate this directive, but do not check for existence. Return a code
-   * indicating the problem if there is one, or `null` no problem.
-   */
+  /// Validate this directive, but do not check for existence. Return a code
+  /// indicating the problem if there is one, or `null` no problem.
   static UriValidationCode validateUri(
       bool isImport, StringLiteral uriLiteral, String uriContent) {
     if (uriLiteral is StringInterpolation) {
@@ -12165,9 +10269,7 @@
   }
 }
 
-/**
- * Validation codes returned by [UriBasedDirective.validate].
- */
+/// Validation codes returned by [UriBasedDirective.validate].
 class UriValidationCode {
   static const UriValidationCode INVALID_URI =
       const UriValidationCode('INVALID_URI');
@@ -12178,55 +10280,41 @@
   static const UriValidationCode URI_WITH_DART_EXT_SCHEME =
       const UriValidationCode('URI_WITH_DART_EXT_SCHEME');
 
-  /**
-   * The name of the validation code.
-   */
+  /// The name of the validation code.
   final String name;
 
-  /**
-   * Initialize a newly created validation code to have the given [name].
-   */
+  /// Initialize a newly created validation code to have the given [name].
   const UriValidationCode(this.name);
 
   @override
   String toString() => name;
 }
 
-/**
- * An identifier that has an initial value associated with it. Instances of this
- * class are always children of the class [VariableDeclarationList].
- *
- *    variableDeclaration ::=
- *        [SimpleIdentifier] ('=' [Expression])?
- *
- * TODO(paulberry): the grammar does not allow metadata to be associated with
- * a VariableDeclaration, and currently we don't record comments for it either.
- * Consider changing the class hierarchy so that [VariableDeclaration] does not
- * extend [Declaration].
- */
+/// An identifier that has an initial value associated with it. Instances of
+/// this class are always children of the class [VariableDeclarationList].
+///
+///    variableDeclaration ::=
+///        [SimpleIdentifier] ('=' [Expression])?
+///
+/// TODO(paulberry): the grammar does not allow metadata to be associated with
+/// a VariableDeclaration, and currently we don't record comments for it either.
+/// Consider changing the class hierarchy so that [VariableDeclaration] does not
+/// extend [Declaration].
 class VariableDeclarationImpl extends DeclarationImpl
     implements VariableDeclaration {
-  /**
-   * The name of the variable being declared.
-   */
+  /// The name of the variable being declared.
   SimpleIdentifierImpl _name;
 
-  /**
-   * The equal sign separating the variable name from the initial value, or
-   * `null` if the initial value was not specified.
-   */
+  /// The equal sign separating the variable name from the initial value, or
+  /// `null` if the initial value was not specified.
   Token equals;
 
-  /**
-   * The expression used to compute the initial value for the variable, or
-   * `null` if the initial value was not specified.
-   */
+  /// The expression used to compute the initial value for the variable, or
+  /// `null` if the initial value was not specified.
   ExpressionImpl _initializer;
 
-  /**
-   * Initialize a newly created variable declaration. The [equals] and
-   * [initializer] can be `null` if there is no initializer.
-   */
+  /// Initialize a newly created variable declaration. The [equals] and
+  /// [initializer] can be `null` if there is no initializer.
   VariableDeclarationImpl(
       SimpleIdentifierImpl name, this.equals, ExpressionImpl initializer)
       : super(null, null) {
@@ -12242,11 +10330,9 @@
   VariableElement get declaredElement =>
       _name?.staticElement as VariableElement;
 
-  /**
-   * This overridden implementation of [documentationComment] looks in the
-   * grandparent node for Dartdoc comments if no documentation is specifically
-   * available on the node.
-   */
+  /// This overridden implementation of [documentationComment] looks in the
+  /// grandparent node for Dartdoc comments if no documentation is specifically
+  /// available on the node.
   @override
   Comment get documentationComment {
     Comment comment = super.documentationComment;
@@ -12313,42 +10399,34 @@
   }
 }
 
-/**
- * The declaration of one or more variables of the same type.
- *
- *    variableDeclarationList ::=
- *        finalConstVarOrType [VariableDeclaration] (',' [VariableDeclaration])*
- *
- *    finalConstVarOrType ::=
- *      | 'final' [TypeName]?
- *      | 'const' [TypeName]?
- *      | 'var'
- *      | [TypeName]
- */
+/// The declaration of one or more variables of the same type.
+///
+///    variableDeclarationList ::=
+///        finalConstVarOrType [VariableDeclaration]
+///        (',' [VariableDeclaration])*
+///
+///    finalConstVarOrType ::=
+///      | 'final' [TypeName]?
+///      | 'const' [TypeName]?
+///      | 'var'
+///      | [TypeName]
 class VariableDeclarationListImpl extends AnnotatedNodeImpl
     implements VariableDeclarationList {
-  /**
-   * The token representing the 'final', 'const' or 'var' keyword, or `null` if
-   * no keyword was included.
-   */
+  /// The token representing the 'final', 'const' or 'var' keyword, or `null` if
+  /// no keyword was included.
   Token keyword;
 
-  /**
-   * The type of the variables being declared, or `null` if no type was provided.
-   */
+  /// The type of the variables being declared, or `null` if no type was
+  /// provided.
   TypeAnnotationImpl _type;
 
-  /**
-   * A list containing the individual variables being declared.
-   */
+  /// A list containing the individual variables being declared.
   NodeList<VariableDeclaration> _variables;
 
-  /**
-   * Initialize a newly created variable declaration list. Either or both of the
-   * [comment] and [metadata] can be `null` if the variable list does not have
-   * the corresponding attribute. The [keyword] can be `null` if a type was
-   * specified. The [type] must be `null` if the keyword is 'var'.
-   */
+  /// Initialize a newly created variable declaration list. Either or both of
+  /// the [comment] and [metadata] can be `null` if the variable list does not
+  /// have the corresponding attribute. The [keyword] can be `null` if a type
+  /// was specified. The [type] must be `null` if the keyword is 'var'.
   VariableDeclarationListImpl(
       CommentImpl comment,
       List<Annotation> metadata,
@@ -12409,28 +10487,20 @@
   }
 }
 
-/**
- * A list of variables that are being declared in a context where a statement is
- * required.
- *
- *    variableDeclarationStatement ::=
- *        [VariableDeclarationList] ';'
- */
+/// A list of variables that are being declared in a context where a statement
+/// is required.
+///
+///    variableDeclarationStatement ::=
+///        [VariableDeclarationList] ';'
 class VariableDeclarationStatementImpl extends StatementImpl
     implements VariableDeclarationStatement {
-  /**
-   * The variables being declared.
-   */
+  /// The variables being declared.
   VariableDeclarationListImpl _variableList;
 
-  /**
-   * The semicolon terminating the statement.
-   */
+  /// The semicolon terminating the statement.
   Token semicolon;
 
-  /**
-   * Initialize a newly created variable declaration statement.
-   */
+  /// Initialize a newly created variable declaration statement.
   VariableDeclarationStatementImpl(
       VariableDeclarationListImpl variableList, this.semicolon) {
     _variableList = _becomeParentOf(variableList);
@@ -12464,41 +10534,27 @@
   }
 }
 
-/**
- * A while statement.
- *
- *    whileStatement ::=
- *        'while' '(' [Expression] ')' [Statement]
- */
+/// A while statement.
+///
+///    whileStatement ::=
+///        'while' '(' [Expression] ')' [Statement]
 class WhileStatementImpl extends StatementImpl implements WhileStatement {
-  /**
-   * The token representing the 'while' keyword.
-   */
+  /// The token representing the 'while' keyword.
   Token whileKeyword;
 
-  /**
-   * The left parenthesis.
-   */
+  /// The left parenthesis.
   Token leftParenthesis;
 
-  /**
-   * The expression used to determine whether to execute the body of the loop.
-   */
+  /// The expression used to determine whether to execute the body of the loop.
   ExpressionImpl _condition;
 
-  /**
-   * The right parenthesis.
-   */
+  /// The right parenthesis.
   Token rightParenthesis;
 
-  /**
-   * The body of the loop.
-   */
+  /// The body of the loop.
   StatementImpl _body;
 
-  /**
-   * Initialize a newly created while statement.
-   */
+  /// Initialize a newly created while statement.
   WhileStatementImpl(this.whileKeyword, this.leftParenthesis,
       ExpressionImpl condition, this.rightParenthesis, StatementImpl body) {
     _condition = _becomeParentOf(condition);
@@ -12545,26 +10601,18 @@
   }
 }
 
-/**
- * The with clause in a class declaration.
- *
- *    withClause ::=
- *        'with' [TypeName] (',' [TypeName])*
- */
+/// The with clause in a class declaration.
+///
+///    withClause ::=
+///        'with' [TypeName] (',' [TypeName])*
 class WithClauseImpl extends AstNodeImpl implements WithClause {
-  /**
-   * The token representing the 'with' keyword.
-   */
+  /// The token representing the 'with' keyword.
   Token withKeyword;
 
-  /**
-   * The names of the mixins that were specified.
-   */
+  /// The names of the mixins that were specified.
   NodeList<TypeName> _mixinTypes;
 
-  /**
-   * Initialize a newly created with clause.
-   */
+  /// Initialize a newly created with clause.
   WithClauseImpl(this.withKeyword, List<TypeName> mixinTypes) {
     _mixinTypes = new NodeListImpl<TypeName>(this, mixinTypes);
   }
@@ -12593,37 +10641,25 @@
   }
 }
 
-/**
- * A yield statement.
- *
- *    yieldStatement ::=
- *        'yield' '*'? [Expression] ‘;’
- */
+/// A yield statement.
+///
+///    yieldStatement ::=
+///        'yield' '*'? [Expression] ‘;’
 class YieldStatementImpl extends StatementImpl implements YieldStatement {
-  /**
-   * The 'yield' keyword.
-   */
+  /// The 'yield' keyword.
   Token yieldKeyword;
 
-  /**
-   * The star optionally following the 'yield' keyword.
-   */
+  /// The star optionally following the 'yield' keyword.
   Token star;
 
-  /**
-   * The expression whose value will be yielded.
-   */
+  /// The expression whose value will be yielded.
   ExpressionImpl _expression;
 
-  /**
-   * The semicolon following the expression.
-   */
+  /// The semicolon following the expression.
   Token semicolon;
 
-  /**
-   * Initialize a newly created yield expression. The [star] can be `null` if no
-   * star was provided.
-   */
+  /// Initialize a newly created yield expression. The [star] can be `null` if
+  /// no star was provided.
   YieldStatementImpl(
       this.yieldKeyword, this.star, ExpressionImpl expression, this.semicolon) {
     _expression = _becomeParentOf(expression);
@@ -12668,3 +10704,19 @@
     _expression?.accept(visitor);
   }
 }
+
+/// An indication of the resolved kind of a [SetOrMapLiteral].
+enum _SetOrMapKind {
+  /// Indicates that the literal represents a map.
+  map,
+
+  /// Indicates that the literal represents a set.
+  set,
+
+  /// Indicates that either
+  /// - the literal is syntactically ambiguous and resolution has not yet been
+  ///   performed, or
+  /// - the literal is invalid because resolution was not able to resolve the
+  ///   ambiguity.
+  unresolved
+}
diff --git a/pkg/analyzer/lib/src/dart/ast/ast_factory.dart b/pkg/analyzer/lib/src/dart/ast/ast_factory.dart
index 4e04999..deeded8 100644
--- a/pkg/analyzer/lib/src/dart/ast/ast_factory.dart
+++ b/pkg/analyzer/lib/src/dart/ast/ast_factory.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -69,6 +69,7 @@
   BinaryExpression binaryExpression(
           Expression leftOperand, Token operator, Expression rightOperand) =>
       new BinaryExpressionImpl(leftOperand, operator, rightOperand);
+
   @override
   Block block(
           Token leftBracket, List<Statement> statements, Token rightBracket) =>
@@ -386,7 +387,7 @@
           SimpleIdentifier identifier,
           TypeParameterList typeParameters,
           FormalParameterList parameters) =>
-      new FieldFormalParameterImpl(comment, metadata, null, keyword, type,
+      new FieldFormalParameterImpl(comment, metadata, null, null, keyword, type,
           thisKeyword, period, identifier, typeParameters, parameters);
 
   @override
@@ -394,6 +395,7 @@
           {Comment comment,
           List<Annotation> metadata,
           Token covariantKeyword,
+          Token requiredKeyword,
           Token keyword,
           TypeAnnotation type,
           @required Token thisKeyword,
@@ -401,8 +403,18 @@
           @required SimpleIdentifier identifier,
           TypeParameterList typeParameters,
           FormalParameterList parameters}) =>
-      new FieldFormalParameterImpl(comment, metadata, covariantKeyword, keyword,
-          type, thisKeyword, period, identifier, typeParameters, parameters);
+      new FieldFormalParameterImpl(
+          comment,
+          metadata,
+          covariantKeyword,
+          requiredKeyword,
+          keyword,
+          type,
+          thisKeyword,
+          period,
+          identifier,
+          typeParameters,
+          parameters);
 
   @override
   ForEachPartsWithDeclaration forEachPartsWithDeclaration(
@@ -419,46 +431,6 @@
       new ForEachPartsWithIdentifierImpl(identifier, inKeyword, iterable);
 
   @override
-  ForEachStatement forEachStatementWithDeclaration(
-          Token awaitKeyword,
-          Token forKeyword,
-          Token leftParenthesis,
-          DeclaredIdentifier loopVariable,
-          Token inKeyword,
-          Expression iterator,
-          Token rightParenthesis,
-          Statement body) =>
-      new ForEachStatementImpl.withDeclaration(
-          awaitKeyword,
-          forKeyword,
-          leftParenthesis,
-          loopVariable,
-          inKeyword,
-          iterator,
-          rightParenthesis,
-          body);
-
-  @override
-  ForEachStatement forEachStatementWithReference(
-          Token awaitKeyword,
-          Token forKeyword,
-          Token leftParenthesis,
-          SimpleIdentifier identifier,
-          Token inKeyword,
-          Expression iterator,
-          Token rightParenthesis,
-          Statement body) =>
-      new ForEachStatementImpl.withReference(
-          awaitKeyword,
-          forKeyword,
-          leftParenthesis,
-          identifier,
-          inKeyword,
-          iterator,
-          rightParenthesis,
-          body);
-
-  @override
   ForElement forElement(
           {Token awaitKeyword,
           Token forKeyword,
@@ -501,38 +473,32 @@
 
   @override
   ForStatement forStatement(
-          Token forKeyword,
-          Token leftParenthesis,
-          VariableDeclarationList variableList,
-          Expression initialization,
-          Token leftSeparator,
-          Expression condition,
-          Token rightSeparator,
-          List<Expression> updaters,
-          Token rightParenthesis,
-          Statement body) =>
-      new ForStatementImpl(
-          forKeyword,
-          leftParenthesis,
-          variableList,
-          initialization,
-          leftSeparator,
-          condition,
-          rightSeparator,
-          updaters,
-          rightParenthesis,
-          body);
+      {Token awaitKeyword,
+      Token forKeyword,
+      Token leftParenthesis,
+      ForLoopParts forLoopParts,
+      Token rightParenthesis,
+      Statement body}) {
+    return ForStatementImpl(awaitKeyword, forKeyword, leftParenthesis,
+        forLoopParts, rightParenthesis, body);
+  }
 
   @override
-  ForStatement2 forStatement2(
+  @Deprecated('Replaced by forStatement')
+  ForStatement forStatement2(
           {Token awaitKeyword,
           Token forKeyword,
           Token leftParenthesis,
           ForLoopParts forLoopParts,
           Token rightParenthesis,
           Statement body}) =>
-      new ForStatement2Impl(awaitKeyword, forKeyword, leftParenthesis,
-          forLoopParts, rightParenthesis, body);
+      forStatement(
+          awaitKeyword: awaitKeyword,
+          forKeyword: forKeyword,
+          leftParenthesis: leftParenthesis,
+          forLoopParts: forLoopParts,
+          rightParenthesis: rightParenthesis,
+          body: body);
 
   @override
   FunctionDeclaration functionDeclaration(
@@ -583,20 +549,21 @@
           SimpleIdentifier identifier,
           TypeParameterList typeParameters,
           FormalParameterList parameters) =>
-      new FunctionTypedFormalParameterImpl(comment, metadata, null, returnType,
-          identifier, typeParameters, parameters);
+      new FunctionTypedFormalParameterImpl(comment, metadata, null, null,
+          returnType, identifier, typeParameters, parameters);
 
   @override
   FunctionTypedFormalParameter functionTypedFormalParameter2(
           {Comment comment,
           List<Annotation> metadata,
           Token covariantKeyword,
+          Token requiredKeyword,
           TypeAnnotation returnType,
           @required SimpleIdentifier identifier,
           TypeParameterList typeParameters,
           @required FormalParameterList parameters}) =>
       new FunctionTypedFormalParameterImpl(comment, metadata, covariantKeyword,
-          returnType, identifier, typeParameters, parameters);
+          requiredKeyword, returnType, identifier, typeParameters, parameters);
 
   @override
   GenericFunctionType genericFunctionType(
@@ -737,39 +704,14 @@
 
   @override
   ListLiteral listLiteral(Token constKeyword, TypeArgumentList typeArguments,
-          Token leftBracket, List<Expression> elements, Token rightBracket) =>
-      new ListLiteralImpl(
+      Token leftBracket, List<CollectionElement> elements, Token rightBracket) {
+    if (elements == null || elements is List<Expression>) {
+      return new ListLiteralImpl(
           constKeyword, typeArguments, leftBracket, elements, rightBracket);
-
-  @override
-  ListLiteral2 listLiteral2(
-          {Token constKeyword,
-          TypeArgumentList typeArguments,
-          Token leftBracket,
-          List<CollectionElement> elements,
-          Token rightBracket}) =>
-      new ListLiteral2Impl(
-          constKeyword, typeArguments, leftBracket, elements, rightBracket);
-
-  @override
-  MapLiteral mapLiteral(
-          Token constKeyword,
-          TypeArgumentList typeArguments,
-          Token leftBracket,
-          List<MapLiteralEntry> entries,
-          Token rightBracket) =>
-      new MapLiteralImpl(
-          constKeyword, typeArguments, leftBracket, entries, rightBracket);
-
-  @override
-  MapLiteral2 mapLiteral2(
-          {Token constKeyword,
-          TypeArgumentList typeArguments,
-          Token leftBracket,
-          List<CollectionElement> entries,
-          Token rightBracket}) =>
-      new MapLiteral2Impl(
-          constKeyword, typeArguments, leftBracket, entries, rightBracket);
+    }
+    return new ListLiteralImpl.experimental(
+        constKeyword, typeArguments, leftBracket, elements, rightBracket);
+  }
 
   @override
   MapLiteralEntry mapLiteralEntry(
@@ -923,19 +865,13 @@
   ScriptTag scriptTag(Token scriptTag) => new ScriptTagImpl(scriptTag);
 
   @override
-  SetLiteral setLiteral(Token constKeyword, TypeArgumentList typeArguments,
-          Token leftBracket, List<Expression> elements, Token rightBracket) =>
-      new SetLiteralImpl(
-          constKeyword, typeArguments, leftBracket, elements, rightBracket);
-
-  @override
-  SetLiteral2 setLiteral2(
+  SetOrMapLiteral setOrMapLiteral(
           {Token constKeyword,
           TypeArgumentList typeArguments,
           Token leftBracket,
           List<CollectionElement> elements,
           Token rightBracket}) =>
-      new SetLiteral2Impl(
+      new SetOrMapLiteralImpl(
           constKeyword, typeArguments, leftBracket, elements, rightBracket);
 
   @override
@@ -951,18 +887,19 @@
           TypeAnnotation type,
           SimpleIdentifier identifier) =>
       new SimpleFormalParameterImpl(
-          comment, metadata, null, keyword, type, identifier);
+          comment, metadata, null, null, keyword, type, identifier);
 
   @override
   SimpleFormalParameter simpleFormalParameter2(
           {Comment comment,
           List<Annotation> metadata,
           Token covariantKeyword,
+          Token requiredKeyword,
           Token keyword,
           TypeAnnotation type,
           @required SimpleIdentifier identifier}) =>
-      new SimpleFormalParameterImpl(
-          comment, metadata, covariantKeyword, keyword, type, identifier);
+      new SimpleFormalParameterImpl(comment, metadata, covariantKeyword,
+          requiredKeyword, keyword, type, identifier);
 
   @override
   SimpleIdentifier simpleIdentifier(Token token, {bool isDeclaration: false}) {
diff --git a/pkg/analyzer/lib/src/dart/ast/constant_evaluator.dart b/pkg/analyzer/lib/src/dart/ast/constant_evaluator.dart
index 052c2fe..430631f 100644
--- a/pkg/analyzer/lib/src/dart/ast/constant_evaluator.dart
+++ b/pkg/analyzer/lib/src/dart/ast/constant_evaluator.dart
@@ -261,29 +261,20 @@
   @override
   Object visitListLiteral(ListLiteral node) {
     List<Object> list = new List<Object>();
-    for (Expression element in node.elements) {
-      Object value = element.accept(this);
-      if (identical(value, NOT_A_CONSTANT)) {
-        return value;
-      }
-      list.add(value);
-    }
-    return list;
-  }
-
-  @override
-  Object visitMapLiteral(MapLiteral node) {
-    Map<String, Object> map = new HashMap<String, Object>();
-    for (MapLiteralEntry entry in node.entries) {
-      Object key = entry.key.accept(this);
-      Object value = entry.value.accept(this);
-      if (key is String && !identical(value, NOT_A_CONSTANT)) {
-        map[key] = value;
+    for (CollectionElement element in node.elements) {
+      if (element is Expression) {
+        Object value = element.accept(this);
+        if (identical(value, NOT_A_CONSTANT)) {
+          return value;
+        }
+        list.add(value);
       } else {
+        // There are a lot of constants that this class does not support, so we
+        // didn't add support for the extended collection support.
         return NOT_A_CONSTANT;
       }
     }
-    return map;
+    return list;
   }
 
   @override
@@ -336,6 +327,30 @@
   Object visitPropertyAccess(PropertyAccess node) => _getConstantValue(null);
 
   @override
+  Object visitSetOrMapLiteral(SetOrMapLiteral node) {
+    // There are a lot of constants that this class does not support, so we
+    // didn't add support for set literals. As a result, this assumes that we're
+    // looking at a map literal until we prove otherwise.
+    Map<String, Object> map = new HashMap<String, Object>();
+    for (CollectionElement element in node.elements) {
+      if (element is MapLiteralEntry) {
+        Object key = element.key.accept(this);
+        Object value = element.value.accept(this);
+        if (key is String && !identical(value, NOT_A_CONSTANT)) {
+          map[key] = value;
+        } else {
+          return NOT_A_CONSTANT;
+        }
+      } else {
+        // There are a lot of constants that this class does not support, so
+        // we didn't add support for the extended collection support.
+        return NOT_A_CONSTANT;
+      }
+    }
+    return map;
+  }
+
+  @override
   Object visitSimpleIdentifier(SimpleIdentifier node) =>
       _getConstantValue(null);
 
diff --git a/pkg/analyzer/lib/src/dart/ast/resolution_map.dart b/pkg/analyzer/lib/src/dart/ast/resolution_map.dart
index 8d59a9e..3fa4ea4 100644
--- a/pkg/analyzer/lib/src/dart/ast/resolution_map.dart
+++ b/pkg/analyzer/lib/src/dart/ast/resolution_map.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/ast/utilities.dart b/pkg/analyzer/lib/src/dart/ast/utilities.dart
index 59cec6b..b5fde2b 100644
--- a/pkg/analyzer/lib/src/dart/ast/utilities.dart
+++ b/pkg/analyzer/lib/src/dart/ast/utilities.dart
@@ -30,7 +30,9 @@
  * will only clone the structure, it will not preserve any resolution results or
  * properties associated with the nodes.
  */
-class AstCloner implements AstVisitor<AstNode> {
+class AstCloner
+    with UIAsCodeVisitorMixin<AstNode>
+    implements AstVisitor<AstNode> {
   /**
    * A flag indicating whether tokens should be cloned while cloning an AST
    * structure.
@@ -487,32 +489,8 @@
           iterable: cloneNode(node.iterable));
 
   @override
-  ForEachStatement visitForEachStatement(ForEachStatement node) {
-    DeclaredIdentifier loopVariable = node.loopVariable;
-    if (loopVariable == null) {
-      return astFactory.forEachStatementWithReference(
-          cloneToken(node.awaitKeyword),
-          cloneToken(node.forKeyword),
-          cloneToken(node.leftParenthesis),
-          cloneNode(node.identifier),
-          cloneToken(node.inKeyword),
-          cloneNode(node.iterable),
-          cloneToken(node.rightParenthesis),
-          cloneNode(node.body));
-    }
-    return astFactory.forEachStatementWithDeclaration(
-        cloneToken(node.awaitKeyword),
-        cloneToken(node.forKeyword),
-        cloneToken(node.leftParenthesis),
-        cloneNode(loopVariable),
-        cloneToken(node.inKeyword),
-        cloneNode(node.iterable),
-        cloneToken(node.rightParenthesis),
-        cloneNode(node.body));
-  }
-
-  @override
   ForElement visitForElement(ForElement node) => astFactory.forElement(
+      awaitKeyword: cloneToken(node.awaitKeyword),
       forKeyword: cloneToken(node.forKeyword),
       leftParenthesis: cloneToken(node.leftParenthesis),
       forLoopParts: cloneNode(node.forLoopParts),
@@ -550,25 +528,12 @@
 
   @override
   ForStatement visitForStatement(ForStatement node) => astFactory.forStatement(
-      cloneToken(node.forKeyword),
-      cloneToken(node.leftParenthesis),
-      cloneNode(node.variables),
-      cloneNode(node.initialization),
-      cloneToken(node.leftSeparator),
-      cloneNode(node.condition),
-      cloneToken(node.rightSeparator),
-      cloneNodeList(node.updaters),
-      cloneToken(node.rightParenthesis),
-      cloneNode(node.body));
-
-  @override
-  ForStatement2 visitForStatement2(ForStatement2 node) =>
-      astFactory.forStatement2(
-          forKeyword: cloneToken(node.forKeyword),
-          leftParenthesis: cloneToken(node.leftParenthesis),
-          forLoopParts: cloneNode(node.forLoopParts),
-          rightParenthesis: cloneToken(node.rightParenthesis),
-          body: cloneNode(node.body));
+      awaitKeyword: cloneToken(node.awaitKeyword),
+      forKeyword: cloneToken(node.forKeyword),
+      leftParenthesis: cloneToken(node.leftParenthesis),
+      forLoopParts: cloneNode(node.forLoopParts),
+      rightParenthesis: cloneToken(node.rightParenthesis),
+      body: cloneNode(node.body));
 
   @override
   FunctionDeclaration visitFunctionDeclaration(FunctionDeclaration node) =>
@@ -768,30 +733,6 @@
       cloneToken(node.rightBracket));
 
   @override
-  ListLiteral2 visitListLiteral2(ListLiteral2 node) => astFactory.listLiteral2(
-      constKeyword: cloneToken(node.constKeyword),
-      typeArguments: cloneNode(node.typeArguments),
-      leftBracket: cloneToken(node.leftBracket),
-      elements: cloneNodeList(node.elements),
-      rightBracket: cloneToken(node.rightBracket));
-
-  @override
-  MapLiteral visitMapLiteral(MapLiteral node) => astFactory.mapLiteral(
-      cloneToken(node.constKeyword),
-      cloneNode(node.typeArguments),
-      cloneToken(node.leftBracket),
-      cloneNodeList(node.entries),
-      cloneToken(node.rightBracket));
-
-  @override
-  MapLiteral2 visitMapLiteral2(MapLiteral2 node) => astFactory.mapLiteral2(
-      constKeyword: cloneToken(node.constKeyword),
-      typeArguments: cloneNode(node.typeArguments),
-      leftBracket: cloneToken(node.leftBracket),
-      entries: cloneNodeList(node.entries),
-      rightBracket: cloneToken(node.rightBracket));
-
-  @override
   MapLiteralEntry visitMapLiteralEntry(MapLiteralEntry node) =>
       astFactory.mapLiteralEntry(cloneNode(node.key),
           cloneToken(node.separator), cloneNode(node.value));
@@ -926,20 +867,20 @@
       astFactory.scriptTag(cloneToken(node.scriptTag));
 
   @override
-  SetLiteral visitSetLiteral(SetLiteral node) => astFactory.setLiteral(
-      cloneToken(node.constKeyword),
-      cloneNode(node.typeArguments),
-      cloneToken(node.leftBracket),
-      cloneNodeList(node.elements),
-      cloneToken(node.rightBracket));
-
-  @override
-  SetLiteral2 visitSetLiteral2(SetLiteral2 node) => astFactory.setLiteral2(
-      constKeyword: cloneToken(node.constKeyword),
-      typeArguments: cloneNode(node.typeArguments),
-      leftBracket: cloneToken(node.leftBracket),
-      elements: cloneNodeList(node.elements),
-      rightBracket: cloneToken(node.rightBracket));
+  SetOrMapLiteral visitSetOrMapLiteral(SetOrMapLiteral node) {
+    var result = astFactory.setOrMapLiteral(
+        constKeyword: cloneToken(node.constKeyword),
+        typeArguments: cloneNode(node.typeArguments),
+        leftBracket: cloneToken(node.leftBracket),
+        elements: cloneNodeList(node.elements),
+        rightBracket: cloneToken(node.rightBracket));
+    if (node.isMap) {
+      (result as SetOrMapLiteralImpl).becomeMap();
+    } else if (node.isSet) {
+      (result as SetOrMapLiteralImpl).becomeSet();
+    }
+    return result;
+  }
 
   @override
   ShowCombinator visitShowCombinator(ShowCombinator node) => astFactory
@@ -1171,7 +1112,9 @@
  * An AstVisitor that compares the structure of two AstNodes to see whether they
  * are equal.
  */
-class AstComparator implements AstVisitor<bool> {
+class AstComparator
+    with UIAsCodeVisitorMixin<bool>
+    implements AstVisitor<bool> {
   /**
    * The AST node with which the node being visited is to be compared. This is
    * only valid at the beginning of each visit method (until [isEqualNodes] is
@@ -1673,21 +1616,10 @@
   }
 
   @override
-  bool visitForEachStatement(ForEachStatement node) {
-    ForEachStatement other = _other as ForEachStatement;
-    return isEqualTokens(node.forKeyword, other.forKeyword) &&
-        isEqualTokens(node.leftParenthesis, other.leftParenthesis) &&
-        isEqualNodes(node.loopVariable, other.loopVariable) &&
-        isEqualTokens(node.inKeyword, other.inKeyword) &&
-        isEqualNodes(node.iterable, other.iterable) &&
-        isEqualTokens(node.rightParenthesis, other.rightParenthesis) &&
-        isEqualNodes(node.body, other.body);
-  }
-
-  @override
   bool visitForElement(ForElement node) {
     ForElement other = _other as ForElement;
-    return isEqualTokens(node.forKeyword, other.forKeyword) &&
+    return isEqualTokens(node.awaitKeyword, other.awaitKeyword) &&
+        isEqualTokens(node.forKeyword, other.forKeyword) &&
         isEqualTokens(node.leftParenthesis, other.leftParenthesis) &&
         isEqualNodes(node.forLoopParts, other.forLoopParts) &&
         isEqualTokens(node.rightParenthesis, other.rightParenthesis) &&
@@ -1728,21 +1660,7 @@
   bool visitForStatement(ForStatement node) {
     ForStatement other = _other as ForStatement;
     return isEqualTokens(node.forKeyword, other.forKeyword) &&
-        isEqualTokens(node.leftParenthesis, other.leftParenthesis) &&
-        isEqualNodes(node.variables, other.variables) &&
-        isEqualNodes(node.initialization, other.initialization) &&
-        isEqualTokens(node.leftSeparator, other.leftSeparator) &&
-        isEqualNodes(node.condition, other.condition) &&
-        isEqualTokens(node.rightSeparator, other.rightSeparator) &&
-        _isEqualNodeLists(node.updaters, other.updaters) &&
-        isEqualTokens(node.rightParenthesis, other.rightParenthesis) &&
-        isEqualNodes(node.body, other.body);
-  }
-
-  @override
-  bool visitForStatement2(ForStatement2 node) {
-    ForStatement2 other = _other as ForStatement2;
-    return isEqualTokens(node.forKeyword, other.forKeyword) &&
+        isEqualTokens(node.awaitKeyword, other.awaitKeyword) &&
         isEqualTokens(node.leftParenthesis, other.leftParenthesis) &&
         isEqualNodes(node.forLoopParts, other.forLoopParts) &&
         isEqualTokens(node.rightParenthesis, other.rightParenthesis) &&
@@ -1974,36 +1892,6 @@
   }
 
   @override
-  bool visitListLiteral2(ListLiteral2 node) {
-    ListLiteral2 other = _other as ListLiteral2;
-    return isEqualTokens(node.constKeyword, other.constKeyword) &&
-        isEqualNodes(node.typeArguments, other.typeArguments) &&
-        isEqualTokens(node.leftBracket, other.leftBracket) &&
-        _isEqualNodeLists(node.elements, other.elements) &&
-        isEqualTokens(node.rightBracket, other.rightBracket);
-  }
-
-  @override
-  bool visitMapLiteral(MapLiteral node) {
-    MapLiteral other = _other as MapLiteral;
-    return isEqualTokens(node.constKeyword, other.constKeyword) &&
-        isEqualNodes(node.typeArguments, other.typeArguments) &&
-        isEqualTokens(node.leftBracket, other.leftBracket) &&
-        _isEqualNodeLists(node.entries, other.entries) &&
-        isEqualTokens(node.rightBracket, other.rightBracket);
-  }
-
-  @override
-  bool visitMapLiteral2(MapLiteral2 node) {
-    MapLiteral2 other = _other as MapLiteral2;
-    return isEqualTokens(node.constKeyword, other.constKeyword) &&
-        isEqualNodes(node.typeArguments, other.typeArguments) &&
-        isEqualTokens(node.leftBracket, other.leftBracket) &&
-        _isEqualNodeLists(node.entries, other.entries) &&
-        isEqualTokens(node.rightBracket, other.rightBracket);
-  }
-
-  @override
   bool visitMapLiteralEntry(MapLiteralEntry node) {
     MapLiteralEntry other = _other as MapLiteralEntry;
     return isEqualNodes(node.key, other.key) &&
@@ -2181,18 +2069,8 @@
   }
 
   @override
-  bool visitSetLiteral(SetLiteral node) {
-    SetLiteral other = _other as SetLiteral;
-    return isEqualTokens(node.constKeyword, other.constKeyword) &&
-        isEqualNodes(node.typeArguments, other.typeArguments) &&
-        isEqualTokens(node.leftBracket, other.leftBracket) &&
-        _isEqualNodeLists(node.elements, other.elements) &&
-        isEqualTokens(node.rightBracket, other.rightBracket);
-  }
-
-  @override
-  bool visitSetLiteral2(SetLiteral2 node) {
-    SetLiteral2 other = _other as SetLiteral2;
+  bool visitSetOrMapLiteral(SetOrMapLiteral node) {
+    SetOrMapLiteral other = _other as SetOrMapLiteral;
     return isEqualTokens(node.constKeyword, other.constKeyword) &&
         isEqualNodes(node.typeArguments, other.typeArguments) &&
         isEqualTokens(node.leftBracket, other.leftBracket) &&
@@ -2567,7 +2445,9 @@
  * results.
  */
 @deprecated
-class IncrementalAstCloner implements AstVisitor<AstNode> {
+class IncrementalAstCloner
+    with UIAsCodeVisitorMixin<AstNode>
+    implements AstVisitor<AstNode> {
   /**
    * The node to be replaced during the cloning process.
    */
@@ -2975,32 +2855,8 @@
           iterable: _cloneNode(node.iterable));
 
   @override
-  ForEachStatement visitForEachStatement(ForEachStatement node) {
-    DeclaredIdentifier loopVariable = node.loopVariable;
-    if (loopVariable == null) {
-      return astFactory.forEachStatementWithReference(
-          _mapToken(node.awaitKeyword),
-          _mapToken(node.forKeyword),
-          _mapToken(node.leftParenthesis),
-          _cloneNode(node.identifier),
-          _mapToken(node.inKeyword),
-          _cloneNode(node.iterable),
-          _mapToken(node.rightParenthesis),
-          _cloneNode(node.body));
-    }
-    return astFactory.forEachStatementWithDeclaration(
-        _mapToken(node.awaitKeyword),
-        _mapToken(node.forKeyword),
-        _mapToken(node.leftParenthesis),
-        _cloneNode(loopVariable),
-        _mapToken(node.inKeyword),
-        _cloneNode(node.iterable),
-        _mapToken(node.rightParenthesis),
-        _cloneNode(node.body));
-  }
-
-  @override
   ForElement visitForElement(ForElement node) => astFactory.forElement(
+      awaitKeyword: _mapToken(node.awaitKeyword),
       forKeyword: _mapToken(node.forKeyword),
       leftParenthesis: _mapToken(node.leftParenthesis),
       forLoopParts: _cloneNode(node.forLoopParts),
@@ -3038,25 +2894,12 @@
 
   @override
   ForStatement visitForStatement(ForStatement node) => astFactory.forStatement(
-      _mapToken(node.forKeyword),
-      _mapToken(node.leftParenthesis),
-      _cloneNode(node.variables),
-      _cloneNode(node.initialization),
-      _mapToken(node.leftSeparator),
-      _cloneNode(node.condition),
-      _mapToken(node.rightSeparator),
-      _cloneNodeList(node.updaters),
-      _mapToken(node.rightParenthesis),
-      _cloneNode(node.body));
-
-  @override
-  ForStatement2 visitForStatement2(ForStatement2 node) =>
-      astFactory.forStatement2(
-          forKeyword: _mapToken(node.forKeyword),
-          leftParenthesis: _mapToken(node.leftParenthesis),
-          forLoopParts: _cloneNode(node.forLoopParts),
-          rightParenthesis: _mapToken(node.rightParenthesis),
-          body: _cloneNode(node.body));
+      awaitKeyword: _mapToken(node.awaitKeyword),
+      forKeyword: _mapToken(node.forKeyword),
+      leftParenthesis: _mapToken(node.leftParenthesis),
+      forLoopParts: _cloneNode(node.forLoopParts),
+      rightParenthesis: _mapToken(node.rightParenthesis),
+      body: _cloneNode(node.body));
 
   @override
   FunctionDeclaration visitFunctionDeclaration(FunctionDeclaration node) =>
@@ -3296,34 +3139,6 @@
   }
 
   @override
-  ListLiteral2 visitListLiteral2(ListLiteral2 node) => astFactory.listLiteral2(
-      constKeyword: _mapToken(node.constKeyword),
-      typeArguments: _cloneNode(node.typeArguments),
-      leftBracket: _mapToken(node.leftBracket),
-      elements: _cloneNodeList(node.elements),
-      rightBracket: _mapToken(node.rightBracket));
-
-  @override
-  MapLiteral visitMapLiteral(MapLiteral node) {
-    MapLiteral copy = astFactory.mapLiteral(
-        _mapToken(node.constKeyword),
-        _cloneNode(node.typeArguments),
-        _mapToken(node.leftBracket),
-        _cloneNodeList(node.entries),
-        _mapToken(node.rightBracket));
-    copy.staticType = node.staticType;
-    return copy;
-  }
-
-  @override
-  MapLiteral2 visitMapLiteral2(MapLiteral2 node) => astFactory.mapLiteral2(
-      constKeyword: _mapToken(node.constKeyword),
-      typeArguments: _cloneNode(node.typeArguments),
-      leftBracket: _mapToken(node.leftBracket),
-      entries: _cloneNodeList(node.entries),
-      rightBracket: _mapToken(node.rightBracket));
-
-  @override
   MapLiteralEntry visitMapLiteralEntry(MapLiteralEntry node) =>
       astFactory.mapLiteralEntry(_cloneNode(node.key),
           _mapToken(node.separator), _cloneNode(node.value));
@@ -3501,26 +3316,18 @@
       astFactory.scriptTag(_mapToken(node.scriptTag));
 
   @override
-  SetLiteral visitSetLiteral(SetLiteral node) {
-    SetLiteral copy = astFactory.setLiteral(
-        _mapToken(node.constKeyword),
-        _cloneNode(node.typeArguments),
-        _mapToken(node.leftBracket),
-        _cloneNodeList(node.elements),
-        _mapToken(node.rightBracket));
+  SetOrMapLiteral visitSetOrMapLiteral(SetOrMapLiteral node) {
+    SetOrMapLiteral copy = astFactory.setOrMapLiteral(
+        constKeyword: _mapToken(node.constKeyword),
+        typeArguments: _cloneNode(node.typeArguments),
+        leftBracket: _mapToken(node.leftBracket),
+        elements: _cloneNodeList(node.elements),
+        rightBracket: _mapToken(node.rightBracket));
     copy.staticType = node.staticType;
     return copy;
   }
 
   @override
-  SetLiteral2 visitSetLiteral2(SetLiteral2 node) => astFactory.setLiteral2(
-      constKeyword: _mapToken(node.constKeyword),
-      typeArguments: _cloneNode(node.typeArguments),
-      leftBracket: _mapToken(node.leftBracket),
-      elements: _cloneNodeList(node.elements),
-      rightBracket: _mapToken(node.rightBracket));
-
-  @override
   ShowCombinator visitShowCombinator(ShowCombinator node) => astFactory
       .showCombinator(_mapToken(node.keyword), _cloneNodeList(node.shownNames));
 
@@ -3970,7 +3777,7 @@
 /**
  * An object that will replace one child node in an AST node with another node.
  */
-class NodeReplacer implements AstVisitor<bool> {
+class NodeReplacer with UIAsCodeVisitorMixin<bool> implements AstVisitor<bool> {
   /**
    * The node being replaced.
    */
@@ -4471,24 +4278,6 @@
   }
 
   @override
-  bool visitForEachStatement(ForEachStatement node) {
-    if (identical(node.loopVariable, _oldNode)) {
-      node.loopVariable = _newNode as DeclaredIdentifier;
-      return true;
-    } else if (identical(node.identifier, _oldNode)) {
-      node.identifier = _newNode as SimpleIdentifier;
-      return true;
-    } else if (identical(node.iterable, _oldNode)) {
-      node.iterable = _newNode as Expression;
-      return true;
-    } else if (identical(node.body, _oldNode)) {
-      node.body = _newNode as Statement;
-      return true;
-    }
-    return visitNode(node);
-  }
-
-  @override
   bool visitForElement(ForElement node) {
     if (identical(node.forLoopParts, _oldNode)) {
       (node as ForElementImpl).forLoopParts = _newNode as ForLoopParts;
@@ -4540,31 +4329,11 @@
 
   @override
   bool visitForStatement(ForStatement node) {
-    if (identical(node.variables, _oldNode)) {
-      node.variables = _newNode as VariableDeclarationList;
-      return true;
-    } else if (identical(node.initialization, _oldNode)) {
-      node.initialization = _newNode as Expression;
-      return true;
-    } else if (identical(node.condition, _oldNode)) {
-      node.condition = _newNode as Expression;
-      return true;
-    } else if (identical(node.body, _oldNode)) {
-      node.body = _newNode as Statement;
-      return true;
-    } else if (_replaceInList(node.updaters)) {
-      return true;
-    }
-    return visitNode(node);
-  }
-
-  @override
-  bool visitForStatement2(ForStatement2 node) {
     if (identical(node.forLoopParts, _oldNode)) {
-      (node as ForStatement2Impl).forLoopParts = _newNode as ForLoopParts;
+      (node as ForStatementImpl).forLoopParts = _newNode as ForLoopParts;
       return true;
     } else if (identical(node.body, _oldNode)) {
-      (node as ForStatement2Impl).body = _newNode as Statement;
+      (node as ForStatementImpl).body = _newNode as Statement;
       return true;
     }
     return visitNode(node);
@@ -4832,36 +4601,6 @@
   }
 
   @override
-  bool visitListLiteral2(ListLiteral2 node) {
-    if (identical(node.typeArguments, _oldNode)) {
-      (node as ListLiteral2Impl).typeArguments = _newNode as TypeArgumentList;
-      return true;
-    } else if (_replaceInList(node.elements)) {
-      return true;
-    }
-    return visitNode(node);
-  }
-
-  @override
-  bool visitMapLiteral(MapLiteral node) {
-    if (_replaceInList(node.entries)) {
-      return true;
-    }
-    return visitTypedLiteral(node);
-  }
-
-  @override
-  bool visitMapLiteral2(MapLiteral2 node) {
-    if (identical(node.typeArguments, _oldNode)) {
-      (node as MapLiteral2Impl).typeArguments = _newNode as TypeArgumentList;
-      return true;
-    } else if (_replaceInList(node.entries)) {
-      return true;
-    }
-    return visitNode(node);
-  }
-
-  @override
   bool visitMapLiteralEntry(MapLiteralEntry node) {
     if (identical(node.key, _oldNode)) {
       node.key = _newNode as Expression;
@@ -5090,7 +4829,7 @@
   bool visitScriptTag(ScriptTag scriptTag) => visitNode(scriptTag);
 
   @override
-  bool visitSetLiteral(SetLiteral node) {
+  bool visitSetOrMapLiteral(SetOrMapLiteral node) {
     if (_replaceInList(node.elements)) {
       return true;
     }
@@ -5098,17 +4837,6 @@
   }
 
   @override
-  bool visitSetLiteral2(SetLiteral2 node) {
-    if (identical(node.typeArguments, _oldNode)) {
-      (node as SetLiteral2Impl).typeArguments = _newNode as TypeArgumentList;
-      return true;
-    } else if (_replaceInList(node.elements)) {
-      return true;
-    }
-    return visitNode(node);
-  }
-
-  @override
   bool visitShowCombinator(ShowCombinator node) {
     if (_replaceInList(node.shownNames)) {
       return true;
@@ -5388,7 +5116,9 @@
  * another as long as the structures of the corresponding children of a pair of
  * nodes are the same.
  */
-class ResolutionCopier implements AstVisitor<bool> {
+class ResolutionCopier
+    with UIAsCodeVisitorMixin<bool>
+    implements AstVisitor<bool> {
   /**
    * The AST node with which the node being visited is to be compared. This is
    * only valid at the beginning of each visit method (until [isEqualNodes] is
@@ -5897,23 +5627,10 @@
   }
 
   @override
-  bool visitForEachStatement(ForEachStatement node) {
-    ForEachStatement toNode = this._toNode as ForEachStatement;
-    return _and(
-        _isEqualTokens(node.forKeyword, toNode.forKeyword),
-        _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
-        _isEqualNodes(node.loopVariable, toNode.loopVariable),
-        _isEqualNodes(node.identifier, toNode.identifier),
-        _isEqualTokens(node.inKeyword, toNode.inKeyword),
-        _isEqualNodes(node.iterable, toNode.iterable),
-        _isEqualTokens(node.rightParenthesis, toNode.rightParenthesis),
-        _isEqualNodes(node.body, toNode.body));
-  }
-
-  @override
   bool visitForElement(ForElement node) {
     ForElement toNode = this._toNode as ForElement;
     return _and(
+        _isEqualTokens(node.awaitKeyword, toNode.awaitKeyword),
         _isEqualTokens(node.forKeyword, toNode.forKeyword),
         _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
         _isEqualNodes(node.forLoopParts, toNode.forLoopParts),
@@ -5958,22 +5675,7 @@
   bool visitForStatement(ForStatement node) {
     ForStatement toNode = this._toNode as ForStatement;
     return _and(
-        _isEqualTokens(node.forKeyword, toNode.forKeyword),
-        _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
-        _isEqualNodes(node.variables, toNode.variables),
-        _isEqualNodes(node.initialization, toNode.initialization),
-        _isEqualTokens(node.leftSeparator, toNode.leftSeparator),
-        _isEqualNodes(node.condition, toNode.condition),
-        _isEqualTokens(node.rightSeparator, toNode.rightSeparator),
-        _isEqualNodeLists(node.updaters, toNode.updaters),
-        _isEqualTokens(node.rightParenthesis, toNode.rightParenthesis),
-        _isEqualNodes(node.body, toNode.body));
-  }
-
-  @override
-  bool visitForStatement2(ForStatement2 node) {
-    ForStatement2 toNode = this._toNode as ForStatement2;
-    return _and(
+        _isEqualTokens(node.awaitKeyword, toNode.awaitKeyword),
         _isEqualTokens(node.forKeyword, toNode.forKeyword),
         _isEqualTokens(node.leftParenthesis, toNode.leftParenthesis),
         _isEqualNodes(node.forLoopParts, toNode.forLoopParts),
@@ -6273,51 +5975,6 @@
   }
 
   @override
-  bool visitListLiteral2(ListLiteral2 node) {
-    ListLiteral2 toNode = this._toNode as ListLiteral2;
-    if (_and(
-        _isEqualTokens(node.constKeyword, toNode.constKeyword),
-        _isEqualNodes(node.typeArguments, toNode.typeArguments),
-        _isEqualTokens(node.leftBracket, toNode.leftBracket),
-        _isEqualNodeLists(node.elements, toNode.elements),
-        _isEqualTokens(node.rightBracket, toNode.rightBracket))) {
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitMapLiteral(MapLiteral node) {
-    MapLiteral toNode = this._toNode as MapLiteral;
-    if (_and(
-        _isEqualTokens(node.constKeyword, toNode.constKeyword),
-        _isEqualNodes(node.typeArguments, toNode.typeArguments),
-        _isEqualTokens(node.leftBracket, toNode.leftBracket),
-        _isEqualNodeLists(node.entries, toNode.entries),
-        _isEqualTokens(node.rightBracket, toNode.rightBracket))) {
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitMapLiteral2(MapLiteral2 node) {
-    MapLiteral2 toNode = this._toNode as MapLiteral2;
-    if (_and(
-        _isEqualTokens(node.constKeyword, toNode.constKeyword),
-        _isEqualNodes(node.typeArguments, toNode.typeArguments),
-        _isEqualTokens(node.leftBracket, toNode.leftBracket),
-        _isEqualNodeLists(node.entries, toNode.entries),
-        _isEqualTokens(node.rightBracket, toNode.rightBracket))) {
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
   bool visitMapLiteralEntry(MapLiteralEntry node) {
     MapLiteralEntry toNode = this._toNode as MapLiteralEntry;
     return _and(
@@ -6556,23 +6213,8 @@
   }
 
   @override
-  bool visitSetLiteral(SetLiteral node) {
-    SetLiteral toNode = this._toNode as SetLiteral;
-    if (_and(
-        _isEqualTokens(node.constKeyword, toNode.constKeyword),
-        _isEqualNodes(node.typeArguments, toNode.typeArguments),
-        _isEqualTokens(node.leftBracket, toNode.leftBracket),
-        _isEqualNodeLists(node.elements, toNode.elements),
-        _isEqualTokens(node.rightBracket, toNode.rightBracket))) {
-      toNode.staticType = node.staticType;
-      return true;
-    }
-    return false;
-  }
-
-  @override
-  bool visitSetLiteral2(SetLiteral2 node) {
-    SetLiteral2 toNode = this._toNode as SetLiteral2;
+  bool visitSetOrMapLiteral(SetOrMapLiteral node) {
+    SetOrMapLiteral toNode = this._toNode as SetOrMapLiteral;
     if (_and(
         _isEqualTokens(node.constKeyword, toNode.constKeyword),
         _isEqualNodes(node.typeArguments, toNode.typeArguments),
@@ -7045,29 +6687,12 @@
   }
 
   @override
-  void visitForEachStatement(ForEachStatement node) {
-    DeclaredIdentifier loopVariable = node.loopVariable;
-    if (loopVariable != null) {
-      _addToScope(loopVariable.identifier);
-    }
-    super.visitForEachStatement(node);
-  }
-
-  @override
   void visitForPartsWithDeclarations(ForPartsWithDeclarations node) {
     _addVariables(node.variables.variables);
     super.visitForPartsWithDeclarations(node);
   }
 
   @override
-  void visitForStatement(ForStatement node) {
-    if (!identical(_immediateChild, node.variables) && node.variables != null) {
-      _addVariables(node.variables.variables);
-    }
-    super.visitForStatement(node);
-  }
-
-  @override
   void visitFunctionDeclaration(FunctionDeclaration node) {
     if (node.parent is! FunctionDeclarationStatement) {
       _declarationNode = node;
@@ -7181,7 +6806,9 @@
  * This class has been deprecated. Use the class ToSourceVisitor2 instead.
  */
 @deprecated
-class ToSourceVisitor implements AstVisitor<void> {
+class ToSourceVisitor
+    with UIAsCodeVisitorMixin<void>
+    implements AstVisitor<void> {
   /**
    * The writer to which the source is to be written.
    */
@@ -7503,7 +7130,7 @@
       _writer.print(keyword.lexeme);
       _writer.print(' ');
     }
-    _writer.print("=> ");
+    _writer.print('${node.functionDefinition?.lexeme} ');
     _visitNode(node.expression);
     if (node.semicolon != null) {
       _writer.print(';');
@@ -7557,25 +7184,8 @@
   }
 
   @override
-  void visitForEachStatement(ForEachStatement node) {
-    DeclaredIdentifier loopVariable = node.loopVariable;
-    if (node.awaitKeyword != null) {
-      _writer.print("await ");
-    }
-    _writer.print("for (");
-    if (loopVariable == null) {
-      _visitNode(node.identifier);
-    } else {
-      _visitNode(loopVariable);
-    }
-    _writer.print(" in ");
-    _visitNode(node.iterable);
-    _writer.print(") ");
-    _visitNode(node.body);
-  }
-
-  @override
   void visitForElement(ForElement node) {
+    _visitTokenWithSuffix(node.awaitKeyword, ' ');
     _writer.print('for (');
     _visitNode(node.forLoopParts);
     _writer.print(') ');
@@ -7630,23 +7240,9 @@
 
   @override
   void visitForStatement(ForStatement node) {
-    Expression initialization = node.initialization;
-    _writer.print("for (");
-    if (initialization != null) {
-      _visitNode(initialization);
-    } else {
-      _visitNode(node.variables);
+    if (node.awaitKeyword != null) {
+      _writer.print('await ');
     }
-    _writer.print(";");
-    _visitNodeWithPrefix(" ", node.condition);
-    _writer.print(";");
-    _visitNodeListWithSeparatorAndPrefix(" ", node.updaters, ", ");
-    _writer.print(") ");
-    _visitNode(node.body);
-  }
-
-  @override
-  void visitForStatement2(ForStatement2 node) {
     _writer.print('for (');
     _visitNode(node.forLoopParts);
     _writer.print(') ');
@@ -7849,18 +7445,6 @@
 
   @override
   void visitListLiteral(ListLiteral node) {
-    if (node.constKeyword != null) {
-      _writer.print(node.constKeyword.lexeme);
-      _writer.print(' ');
-    }
-    _visitNodeWithSuffix(node.typeArguments, " ");
-    _writer.print("[");
-    _visitNodeListWithSeparator(node.elements, ", ");
-    _writer.print("]");
-  }
-
-  @override
-  void visitListLiteral2(ListLiteral2 node) {
     _visitTokenWithSuffix(node.constKeyword, ' ');
     _visitNode(node.typeArguments);
     _writer.print('[');
@@ -7869,27 +7453,6 @@
   }
 
   @override
-  void visitMapLiteral(MapLiteral node) {
-    if (node.constKeyword != null) {
-      _writer.print(node.constKeyword.lexeme);
-      _writer.print(' ');
-    }
-    _visitNodeWithSuffix(node.typeArguments, " ");
-    _writer.print("{");
-    _visitNodeListWithSeparator(node.entries, ", ");
-    _writer.print("}");
-  }
-
-  @override
-  void visitMapLiteral2(MapLiteral2 node) {
-    _visitTokenWithSuffix(node.constKeyword, ' ');
-    _visitNode(node.typeArguments);
-    _writer.print('{');
-    _visitNodeListWithSeparator(node.entries, ', ');
-    _writer.print('}');
-  }
-
-  @override
   void visitMapLiteralEntry(MapLiteralEntry node) {
     _visitNode(node.key);
     _writer.print(" : ");
@@ -8054,20 +7617,11 @@
   }
 
   @override
-  void visitSetLiteral(SetLiteral node) {
+  void visitSetOrMapLiteral(SetOrMapLiteral node) {
     if (node.constKeyword != null) {
       _writer.print(node.constKeyword.lexeme);
       _writer.print(' ');
     }
-    _visitNodeWithSuffix(node.typeArguments, " ");
-    _writer.print("{");
-    _visitNodeListWithSeparator(node.elements, ", ");
-    _writer.print("}");
-  }
-
-  @override
-  void visitSetLiteral2(SetLiteral2 node) {
-    _visitTokenWithSuffix(node.constKeyword, ' ');
     _visitNode(node.typeArguments);
     _writer.print('{');
     _visitNodeListWithSeparator(node.elements, ', ');
@@ -8382,7 +7936,9 @@
  * A visitor used to write a source representation of a visited AST node (and
  * all of it's children) to a sink.
  */
-class ToSourceVisitor2 implements AstVisitor<void> {
+class ToSourceVisitor2
+    with UIAsCodeVisitorMixin<void>
+    implements AstVisitor<void> {
   /**
    * The sink to which the source is to be written.
    */
@@ -8437,7 +7993,12 @@
         if (i > 0) {
           sink.write(separator);
         }
-        nodes[i].accept(this);
+        var node = nodes[i];
+        if (node != null) {
+          node.accept(this);
+        } else {
+          sink.write('<null>');
+        }
       }
     }
   }
@@ -8830,7 +8391,7 @@
       sink.write(keyword.lexeme);
       sink.write(' ');
     }
-    sink.write("=> ");
+    sink.write('${node.functionDefinition?.lexeme} ');
     safelyVisitNode(node.expression);
     if (node.semicolon != null) {
       sink.write(';');
@@ -8884,25 +8445,8 @@
   }
 
   @override
-  void visitForEachStatement(ForEachStatement node) {
-    DeclaredIdentifier loopVariable = node.loopVariable;
-    if (node.awaitKeyword != null) {
-      sink.write("await ");
-    }
-    sink.write("for (");
-    if (loopVariable == null) {
-      safelyVisitNode(node.identifier);
-    } else {
-      safelyVisitNode(loopVariable);
-    }
-    sink.write(" in ");
-    safelyVisitNode(node.iterable);
-    sink.write(") ");
-    safelyVisitNode(node.body);
-  }
-
-  @override
   void visitForElement(ForElement node) {
+    safelyVisitTokenWithSuffix(node.awaitKeyword, ' ');
     sink.write('for (');
     safelyVisitNode(node.forLoopParts);
     sink.write(') ');
@@ -8957,23 +8501,9 @@
 
   @override
   void visitForStatement(ForStatement node) {
-    Expression initialization = node.initialization;
-    sink.write("for (");
-    if (initialization != null) {
-      safelyVisitNode(initialization);
-    } else {
-      safelyVisitNode(node.variables);
+    if (node.awaitKeyword != null) {
+      sink.write('await ');
     }
-    sink.write(";");
-    safelyVisitNodeWithPrefix(" ", node.condition);
-    sink.write(";");
-    safelyVisitNodeListWithSeparatorAndPrefix(" ", node.updaters, ", ");
-    sink.write(") ");
-    safelyVisitNode(node.body);
-  }
-
-  @override
-  void visitForStatement2(ForStatement2 node) {
     sink.write('for (');
     safelyVisitNode(node.forLoopParts);
     sink.write(') ');
@@ -9177,15 +8707,6 @@
   @override
   void visitListLiteral(ListLiteral node) {
     safelyVisitTokenWithSuffix(node.constKeyword, ' ');
-    safelyVisitNodeWithSuffix(node.typeArguments, " ");
-    sink.write("[");
-    safelyVisitNodeListWithSeparator(node.elements, ", ");
-    sink.write("]");
-  }
-
-  @override
-  void visitListLiteral2(ListLiteral2 node) {
-    safelyVisitTokenWithSuffix(node.constKeyword, ' ');
     safelyVisitNode(node.typeArguments);
     sink.write('[');
     safelyVisitNodeListWithSeparator(node.elements, ', ');
@@ -9193,24 +8714,6 @@
   }
 
   @override
-  void visitMapLiteral(MapLiteral node) {
-    safelyVisitTokenWithSuffix(node.constKeyword, ' ');
-    safelyVisitNodeWithSuffix(node.typeArguments, " ");
-    sink.write("{");
-    safelyVisitNodeListWithSeparator(node.entries, ", ");
-    sink.write("}");
-  }
-
-  @override
-  void visitMapLiteral2(MapLiteral2 node) {
-    safelyVisitTokenWithSuffix(node.constKeyword, ' ');
-    safelyVisitNode(node.typeArguments);
-    sink.write('{');
-    safelyVisitNodeListWithSeparator(node.entries, ', ');
-    sink.write('}');
-  }
-
-  @override
   void visitMapLiteralEntry(MapLiteralEntry node) {
     safelyVisitNode(node.key);
     sink.write(" : ");
@@ -9375,16 +8878,7 @@
   }
 
   @override
-  void visitSetLiteral(SetLiteral node) {
-    safelyVisitTokenWithSuffix(node.constKeyword, ' ');
-    safelyVisitNodeWithSuffix(node.typeArguments, " ");
-    sink.write("{");
-    safelyVisitNodeListWithSeparator(node.elements, ", ");
-    sink.write("}");
-  }
-
-  @override
-  void visitSetLiteral2(SetLiteral2 node) {
+  void visitSetOrMapLiteral(SetOrMapLiteral node) {
     safelyVisitTokenWithSuffix(node.constKeyword, ' ');
     safelyVisitNode(node.typeArguments);
     sink.write('{');
@@ -9593,3 +9087,13 @@
     }
   }
 }
+
+/// Mixin allowing visitor classes to forward the visit method for
+/// `ForStatement2` to `ForStatement`
+mixin UIAsCodeVisitorMixin<R> implements AstVisitor<R> {
+  @override
+  @deprecated
+  R visitForStatement2(ForStatement2 node) {
+    return visitForStatement(node);
+  }
+}
diff --git a/pkg/analyzer/lib/src/dart/constant/compute.dart b/pkg/analyzer/lib/src/dart/constant/compute.dart
index 4031e2f..712d4b6 100644
--- a/pkg/analyzer/lib/src/dart/constant/compute.dart
+++ b/pkg/analyzer/lib/src/dart/constant/compute.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -10,7 +10,6 @@
     show TypeProvider, TypeSystem;
 import 'package:analyzer/src/summary/link.dart' as graph
     show DependencyWalker, Node;
-import 'package:analyzer/src/task/dart.dart';
 
 /// Compute values of the given [constants] with correct ordering.
 void computeConstants(
diff --git a/pkg/analyzer/lib/src/dart/constant/constant_verifier.dart b/pkg/analyzer/lib/src/dart/constant/constant_verifier.dart
index 024eca2..97fac61 100644
--- a/pkg/analyzer/lib/src/dart/constant/constant_verifier.dart
+++ b/pkg/analyzer/lib/src/dart/constant/constant_verifier.dart
@@ -2,10 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'dart:collection';
-
 import 'package:analyzer/dart/analysis/declared_variables.dart';
 import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/constant/value.dart';
 import 'package:analyzer/dart/element/element.dart';
@@ -14,6 +13,7 @@
 import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/dart/constant/evaluation.dart';
+import 'package:analyzer/src/dart/constant/potentially_constant.dart';
 import 'package:analyzer/src/dart/constant/value.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/error/codes.dart';
@@ -37,21 +37,14 @@
   /// The set of variables declared using '-D' on the command line.
   final DeclaredVariables declaredVariables;
 
-  /// The type representing the type 'bool'.
-  InterfaceType _boolType;
-
   /// The type representing the type 'int'.
   InterfaceType _intType;
 
-  /// The type representing the type 'num'.
-  InterfaceType _numType;
-
-  /// The type representing the type 'string'.
-  InterfaceType _stringType;
-
   /// The current library that is being analyzed.
   final LibraryElement _currentLibrary;
 
+  final bool _constantUpdate2018Enabled;
+
   ConstantEvaluationEngine _evaluationEngine;
 
   /// Initialize a newly created constant verifier.
@@ -61,11 +54,12 @@
       this._typeProvider, this.declaredVariables,
       {bool forAnalysisDriver: false})
       : _currentLibrary = currentLibrary,
-        _typeSystem = currentLibrary.context.typeSystem {
-    this._boolType = _typeProvider.boolType;
+        _typeSystem = currentLibrary.context.typeSystem,
+        _constantUpdate2018Enabled =
+            (currentLibrary.context.analysisOptions as AnalysisOptionsImpl)
+                .experimentStatus
+                .constant_update_2018 {
     this._intType = _typeProvider.intType;
-    this._numType = _typeProvider.numType;
-    this._stringType = _typeProvider.stringType;
     this._evaluationEngine = new ConstantEvaluationEngine(
         _typeProvider, declaredVariables,
         forAnalysisDriver: forAnalysisDriver,
@@ -143,77 +137,16 @@
   void visitListLiteral(ListLiteral node) {
     super.visitListLiteral(node);
     if (node.isConst) {
-      DartObjectImpl result;
-      for (Expression element in node.elements) {
-        result =
-            _validate(element, CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT);
-        if (result != null) {
-          _reportErrorIfFromDeferredLibrary(
-              element,
-              CompileTimeErrorCode
-                  .NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY);
-        }
-      }
-    }
-  }
-
-  @override
-  void visitMapLiteral(MapLiteral node) {
-    super.visitMapLiteral(node);
-    bool isConst = node.isConst;
-    bool reportEqualKeys = true;
-    HashSet<DartObject> keys = new HashSet<DartObject>();
-    List<Expression> invalidKeys = new List<Expression>();
-    for (MapLiteralEntry entry in node.entries) {
-      Expression key = entry.key;
-      if (isConst) {
-        DartObjectImpl keyResult =
-            _validate(key, CompileTimeErrorCode.NON_CONSTANT_MAP_KEY);
-        Expression valueExpression = entry.value;
-        DartObjectImpl valueResult = _validate(
-            valueExpression, CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE);
-        if (valueResult != null) {
-          _reportErrorIfFromDeferredLibrary(
-              valueExpression,
-              CompileTimeErrorCode
-                  .NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY);
-        }
-        if (keyResult != null) {
-          _reportErrorIfFromDeferredLibrary(key,
-              CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY);
-          if (!keys.add(keyResult)) {
-            invalidKeys.add(key);
-          }
-          DartType type = keyResult.type;
-          if (_implementsEqualsWhenNotAllowed(type)) {
-            _errorReporter.reportErrorForNode(
-                CompileTimeErrorCode
-                    .CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS,
-                key,
-                [type.displayName]);
-          }
-        }
-      } else {
-        // Note: we throw the errors away because this isn't actually a const.
-        AnalysisErrorListener errorListener =
-            AnalysisErrorListener.NULL_LISTENER;
-        ErrorReporter subErrorReporter =
-            new ErrorReporter(errorListener, _errorReporter.source);
-        DartObjectImpl result = key
-            .accept(new ConstantVisitor(_evaluationEngine, subErrorReporter));
-        if (result != null) {
-          if (!keys.add(result)) {
-            invalidKeys.add(key);
-          }
-        } else {
-          reportEqualKeys = false;
-        }
-      }
-    }
-    if (reportEqualKeys) {
-      for (int i = 0; i < invalidKeys.length; i++) {
-        _errorReporter.reportErrorForNode(
-            StaticWarningCode.EQUAL_KEYS_IN_MAP, invalidKeys[i]);
+      InterfaceType nodeType = node.staticType;
+      DartType elementType = nodeType.typeArguments[0];
+      var verifier = _ConstLiteralVerifier(
+        this,
+        errorCode: CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT,
+        forList: true,
+        listElementType: elementType,
+      );
+      for (CollectionElement element in node.elements) {
+        verifier.verify(element);
       }
     }
   }
@@ -225,34 +158,58 @@
   }
 
   @override
-  void visitSetLiteral(SetLiteral node) {
-    super.visitSetLiteral(node);
-    HashSet<DartObject> elements = new HashSet<DartObject>();
-    List<Expression> invalidElements = new List<Expression>();
-    if (node.isConst) {
-      for (Expression element in node.elements) {
-        DartObjectImpl result =
-            _validate(element, CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT);
-        if (result != null) {
-          _reportErrorIfFromDeferredLibrary(
-              element,
-              CompileTimeErrorCode
-                  .NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY);
-          if (!elements.add(result)) {
-            invalidElements.add(element);
-          }
-          DartType type = result.type;
-          if (_implementsEqualsWhenNotAllowed(type)) {
-            _errorReporter.reportErrorForNode(
-                CompileTimeErrorCode.CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS,
-                element,
-                [type.displayName]);
-          }
+  void visitSetOrMapLiteral(SetOrMapLiteral node) {
+    super.visitSetOrMapLiteral(node);
+    if (node.isSet) {
+      if (node.isConst) {
+        InterfaceType nodeType = node.staticType;
+        var elementType = nodeType.typeArguments[0];
+        var duplicateElements = <Expression>[];
+        var verifier = _ConstLiteralVerifier(
+          this,
+          errorCode: CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT,
+          forSet: true,
+          setElementType: elementType,
+          setUniqueValues: Set<DartObject>(),
+          setDuplicateExpressions: duplicateElements,
+        );
+        for (CollectionElement element in node.elements) {
+          verifier.verify(element);
+        }
+        for (var duplicateElement in duplicateElements) {
+          _errorReporter.reportErrorForNode(
+            CompileTimeErrorCode.EQUAL_ELEMENTS_IN_CONST_SET,
+            duplicateElement,
+          );
         }
       }
-      for (var invalidElement in invalidElements) {
-        _errorReporter.reportErrorForNode(
-            StaticWarningCode.EQUAL_VALUES_IN_CONST_SET, invalidElement);
+    } else if (node.isMap) {
+      if (node.isConst) {
+        InterfaceType nodeType = node.staticType;
+        var keyType = nodeType.typeArguments[0];
+        var valueType = nodeType.typeArguments[1];
+        bool reportEqualKeys = true;
+        var duplicateKeyElements = <Expression>[];
+        var verifier = _ConstLiteralVerifier(
+          this,
+          errorCode: CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT,
+          forMap: true,
+          mapKeyType: keyType,
+          mapValueType: valueType,
+          mapUniqueKeys: Set<DartObject>(),
+          mapDuplicateKeyExpressions: duplicateKeyElements,
+        );
+        for (CollectionElement entry in node.elements) {
+          verifier.verify(entry);
+        }
+        if (reportEqualKeys) {
+          for (var duplicateKeyElement in duplicateKeyElements) {
+            _errorReporter.reportErrorForNode(
+              CompileTimeErrorCode.EQUAL_KEYS_IN_CONST_MAP,
+              duplicateKeyElement,
+            );
+          }
+        }
       }
     }
   }
@@ -452,6 +409,29 @@
     }
   }
 
+  void _reportNotPotentialConstants(AstNode node) {
+    var notPotentiallyConstants = getNotPotentiallyConstants(node);
+    if (notPotentiallyConstants.isEmpty) return;
+
+    for (var notConst in notPotentiallyConstants) {
+      _errorReporter.reportErrorForNode(
+        CompileTimeErrorCode.INVALID_CONSTANT,
+        notConst,
+      );
+    }
+  }
+
+  /// Validates that all arguments in the [argumentList] are potentially
+  /// constant expressions.
+  void _reportNotPotentialConstantsArguments(ArgumentList argumentList) {
+    if (argumentList == null) {
+      return;
+    }
+    for (Expression argument in argumentList.arguments) {
+      _reportNotPotentialConstants(argument);
+    }
+  }
+
   /// Validate that the given expression is a compile time constant. Return the
   /// value of the compile time constant, or `null` if the expression is not a
   /// compile time constant.
@@ -485,26 +465,20 @@
   /// Validates that the expressions of the initializers of the given constant
   /// [constructor] are all compile time constants.
   void _validateConstructorInitializers(ConstructorDeclaration constructor) {
-    List<ParameterElement> parameterElements =
-        constructor.parameters.parameterElements;
     NodeList<ConstructorInitializer> initializers = constructor.initializers;
     for (ConstructorInitializer initializer in initializers) {
       if (initializer is AssertInitializer) {
-        _validateInitializerExpression(
-            parameterElements, initializer.condition);
+        _reportNotPotentialConstants(initializer.condition);
         Expression message = initializer.message;
         if (message != null) {
-          _validateInitializerExpression(parameterElements, message);
+          _reportNotPotentialConstants(message);
         }
       } else if (initializer is ConstructorFieldInitializer) {
-        _validateInitializerExpression(
-            parameterElements, initializer.expression);
+        _reportNotPotentialConstants(initializer.expression);
       } else if (initializer is RedirectingConstructorInvocation) {
-        _validateInitializerInvocationArguments(
-            parameterElements, initializer.argumentList);
+        _reportNotPotentialConstantsArguments(initializer.argumentList);
       } else if (initializer is SuperConstructorInvocation) {
-        _validateInitializerInvocationArguments(
-            parameterElements, initializer.argumentList);
+        _reportNotPotentialConstantsArguments(initializer.argumentList);
       }
     }
   }
@@ -577,105 +551,344 @@
       }
     }
   }
-
-  /// Validates that the given expression is a compile time constant.
-  ///
-  /// @param parameterElements the elements of parameters of constant
-  ///        constructor, they are considered as a valid potentially constant
-  ///        expressions
-  /// @param expression the expression to validate
-  void _validateInitializerExpression(
-      List<ParameterElement> parameterElements, Expression expression) {
-    RecordingErrorListener errorListener = new RecordingErrorListener();
-    ErrorReporter subErrorReporter =
-        new ErrorReporter(errorListener, _errorReporter.source);
-    DartObjectImpl result = expression.accept(
-        new _ConstantVerifier_validateInitializerExpression(_typeSystem,
-            _evaluationEngine, subErrorReporter, this, parameterElements));
-    _reportErrors(errorListener.errors,
-        CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER);
-    if (result != null) {
-      _reportErrorIfFromDeferredLibrary(
-          expression,
-          CompileTimeErrorCode
-              .NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFERRED_LIBRARY);
-    }
-  }
-
-  /// Validates that all of the arguments of a constructor initializer are
-  /// compile time constants.
-  ///
-  /// @param parameterElements the elements of parameters of constant
-  ///        constructor, they are considered as a valid potentially constant
-  ///        expressions
-  /// @param argumentList the argument list to validate
-  void _validateInitializerInvocationArguments(
-      List<ParameterElement> parameterElements, ArgumentList argumentList) {
-    if (argumentList == null) {
-      return;
-    }
-    for (Expression argument in argumentList.arguments) {
-      _validateInitializerExpression(parameterElements, argument);
-    }
-  }
 }
 
-class _ConstantVerifier_validateInitializerExpression extends ConstantVisitor {
-  final TypeSystem typeSystem;
+class _ConstLiteralVerifier {
   final ConstantVerifier verifier;
+  final Set<DartObject> mapUniqueKeys;
+  final List<Expression> mapDuplicateKeyExpressions;
+  final ErrorCode errorCode;
+  final DartType listElementType;
+  final DartType mapKeyType;
+  final DartType mapValueType;
+  final DartType setElementType;
+  final Set<DartObject> setUniqueValues;
+  final List<CollectionElement> setDuplicateExpressions;
+  final bool forList;
+  final bool forMap;
+  final bool forSet;
 
-  List<ParameterElement> parameterElements;
+  _ConstLiteralVerifier(
+    this.verifier, {
+    this.mapUniqueKeys,
+    this.mapDuplicateKeyExpressions,
+    this.errorCode,
+    this.listElementType,
+    this.mapKeyType,
+    this.mapValueType,
+    this.setElementType,
+    this.setUniqueValues,
+    this.setDuplicateExpressions,
+    this.forList = false,
+    this.forMap = false,
+    this.forSet = false,
+  });
 
-  _ConstantVerifier_validateInitializerExpression(
-      this.typeSystem,
-      ConstantEvaluationEngine evaluationEngine,
-      ErrorReporter errorReporter,
-      this.verifier,
-      this.parameterElements)
-      : super(evaluationEngine, errorReporter);
+  ErrorCode get _fromDeferredErrorCode {
+    if (forList) {
+      return CompileTimeErrorCode
+          .NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY;
+    } else if (forSet) {
+      return CompileTimeErrorCode
+          .NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY;
+    }
 
-  @override
-  DartObjectImpl visitSimpleIdentifier(SimpleIdentifier node) {
-    Element element = node.staticElement;
-    int length = parameterElements.length;
-    for (int i = 0; i < length; i++) {
-      ParameterElement parameterElement = parameterElements[i];
-      if (identical(parameterElement, element) && parameterElement != null) {
-        DartType type = parameterElement.type;
-        if (type != null) {
-          if (type.isDynamic) {
-            return new DartObjectImpl(
-                verifier._typeProvider.objectType, DynamicState.DYNAMIC_STATE);
-          } else if (typeSystem.isSubtypeOf(type, verifier._boolType)) {
-            return new DartObjectImpl(
-                verifier._typeProvider.boolType, BoolState.UNKNOWN_VALUE);
-          } else if (typeSystem.isSubtypeOf(
-              type, verifier._typeProvider.doubleType)) {
-            return new DartObjectImpl(
-                verifier._typeProvider.doubleType, DoubleState.UNKNOWN_VALUE);
-          } else if (typeSystem.isSubtypeOf(type, verifier._intType)) {
-            return new DartObjectImpl(
-                verifier._typeProvider.intType, IntState.UNKNOWN_VALUE);
-          } else if (typeSystem.isSubtypeOf(type, verifier._numType)) {
-            return new DartObjectImpl(
-                verifier._typeProvider.numType, NumState.UNKNOWN_VALUE);
-          } else if (typeSystem.isSubtypeOf(type, verifier._stringType)) {
-            return new DartObjectImpl(
-                verifier._typeProvider.stringType, StringState.UNKNOWN_VALUE);
-          }
-          //
-          // We don't test for other types of objects (such as List, Map,
-          // Function or Type) because there are no operations allowed on such
-          // types other than '==' and '!=', which means that we don't need to
-          // know the type when there is no specific data about the state of
-          // such objects.
-          //
+    return null;
+  }
+
+  bool verify(CollectionElement element) {
+    if (element is Expression) {
+      var value = verifier._validate(element, errorCode);
+      if (value == null) return false;
+
+      if (_fromDeferredErrorCode != null) {
+        verifier._reportErrorIfFromDeferredLibrary(
+            element, _fromDeferredErrorCode);
+      }
+
+      if (forList) {
+        return _validateListExpression(element, value);
+      }
+
+      if (forSet) {
+        return _validateSetExpression(element, value);
+      }
+
+      return true;
+    } else if (element is ForElement) {
+      verifier._errorReporter.reportErrorForNode(errorCode, element);
+      return false;
+    } else if (element is IfElement) {
+      if (!verifier._constantUpdate2018Enabled) {
+        verifier._errorReporter.reportErrorForNode(errorCode, element);
+        return false;
+      }
+      var conditionValue = verifier._validate(element.condition, errorCode);
+      var conditionBool = conditionValue?.toBoolValue();
+
+      // The errors have already been reported.
+      if (conditionBool == null) return false;
+
+      verifier._reportErrorIfFromDeferredLibrary(
+          element.condition,
+          CompileTimeErrorCode
+              .NON_CONSTANT_IF_ELEMENT_CONDITION_FROM_DEFERRED_LIBRARY);
+
+      var thenValid = true;
+      var elseValid = true;
+      if (conditionBool) {
+        thenValid = verify(element.thenElement);
+        if (element.elseElement != null) {
+          elseValid = _reportNotPotentialConstants(element.elseElement);
         }
-        return new DartObjectImpl(
-            type is InterfaceType ? type : verifier._typeProvider.objectType,
-            GenericState.UNKNOWN_VALUE);
+      } else {
+        thenValid = _reportNotPotentialConstants(element.thenElement);
+        if (element.elseElement != null) {
+          elseValid = verify(element.elseElement);
+        }
+      }
+
+      return thenValid && elseValid;
+    } else if (element is MapLiteralEntry) {
+      return _validateMapLiteralEntry(element);
+    } else if (element is SpreadElement) {
+      if (!verifier._constantUpdate2018Enabled) {
+        verifier._errorReporter.reportErrorForNode(errorCode, element);
+        return false;
+      }
+      var value = verifier._validate(element.expression, errorCode);
+      if (value == null) return false;
+
+      verifier._reportErrorIfFromDeferredLibrary(
+          element.expression,
+          CompileTimeErrorCode
+              .NON_CONSTANT_SPREAD_EXPRESSION_FROM_DEFERRED_LIBRARY);
+
+      if (forList || forSet) {
+        return _validateListOrSetSpread(element, value);
+      }
+
+      if (forMap) {
+        return _validateMapSpread(element, value);
+      }
+
+      return true;
+    }
+    throw new UnsupportedError(
+      'Unhandled type of collection element: ${element.runtimeType}',
+    );
+  }
+
+  /// Return `true` if the [node] is a potential constant.
+  bool _reportNotPotentialConstants(AstNode node) {
+    var notPotentiallyConstants = getNotPotentiallyConstants(node);
+    if (notPotentiallyConstants.isEmpty) return true;
+
+    for (var notConst in notPotentiallyConstants) {
+      CompileTimeErrorCode errorCode;
+      if (forList) {
+        errorCode = CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT;
+      } else if (forMap) {
+        errorCode = CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT;
+        for (var parent = notConst; parent != null; parent = parent.parent) {
+          if (parent is MapLiteralEntry) {
+            if (parent.key == notConst) {
+              errorCode = CompileTimeErrorCode.NON_CONSTANT_MAP_KEY;
+            } else {
+              errorCode = CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE;
+            }
+            break;
+          }
+        }
+      } else if (forSet) {
+        errorCode = CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT;
+      }
+      verifier._errorReporter.reportErrorForNode(errorCode, notConst);
+    }
+
+    return false;
+  }
+
+  bool _validateListExpression(Expression expression, DartObjectImpl value) {
+    if (!verifier._evaluationEngine.runtimeTypeMatch(value, listElementType)) {
+      verifier._errorReporter.reportErrorForNode(
+        StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE,
+        expression,
+        [value.type, listElementType],
+      );
+      return false;
+    }
+
+    verifier._reportErrorIfFromDeferredLibrary(
+      expression,
+      CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY,
+    );
+
+    return true;
+  }
+
+  bool _validateListOrSetSpread(SpreadElement element, DartObjectImpl value) {
+    var listValue = value.toListValue();
+    var setValue = value.toSetValue();
+
+    if (listValue == null && setValue == null) {
+      if (value.isNull && _isNullableSpread(element)) {
+        return true;
+      }
+      verifier._errorReporter.reportErrorForNode(
+        CompileTimeErrorCode.CONST_SPREAD_EXPECTED_LIST_OR_SET,
+        element.expression,
+      );
+      return false;
+    }
+
+    if (listValue != null) {
+      var elementType = value.type.typeArguments[0];
+      if (verifier._implementsEqualsWhenNotAllowed(elementType)) {
+        verifier._errorReporter.reportErrorForNode(
+          CompileTimeErrorCode.CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS,
+          element,
+          [elementType],
+        );
+        return false;
       }
     }
-    return super.visitSimpleIdentifier(node);
+
+    if (forSet) {
+      var iterableValue = listValue ?? setValue;
+      for (var item in iterableValue) {
+        if (!setUniqueValues.add(item)) {
+          setDuplicateExpressions.add(element.expression);
+        }
+      }
+    }
+
+    return true;
+  }
+
+  bool _validateMapLiteralEntry(MapLiteralEntry entry) {
+    if (!forMap) return false;
+
+    var keyExpression = entry.key;
+    var valueExpression = entry.value;
+
+    var keyValue = verifier._validate(
+      keyExpression,
+      CompileTimeErrorCode.NON_CONSTANT_MAP_KEY,
+    );
+    var valueValue = verifier._validate(
+      valueExpression,
+      CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE,
+    );
+
+    if (keyValue != null) {
+      var keyType = keyValue.type;
+
+      if (!verifier._evaluationEngine.runtimeTypeMatch(keyValue, mapKeyType)) {
+        verifier._errorReporter.reportErrorForNode(
+          StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE,
+          keyExpression,
+          [keyType, mapKeyType],
+        );
+      }
+
+      if (verifier._implementsEqualsWhenNotAllowed(keyType)) {
+        verifier._errorReporter.reportErrorForNode(
+          CompileTimeErrorCode.CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS,
+          keyExpression,
+          [keyType],
+        );
+      }
+
+      verifier._reportErrorIfFromDeferredLibrary(
+        keyExpression,
+        CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY,
+      );
+
+      if (!mapUniqueKeys.add(keyValue)) {
+        mapDuplicateKeyExpressions.add(keyExpression);
+      }
+    }
+
+    if (valueValue != null) {
+      if (!verifier._evaluationEngine
+          .runtimeTypeMatch(valueValue, mapValueType)) {
+        verifier._errorReporter.reportErrorForNode(
+          StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE,
+          valueExpression,
+          [valueValue.type, mapValueType],
+        );
+      }
+
+      verifier._reportErrorIfFromDeferredLibrary(
+        valueExpression,
+        CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY,
+      );
+    }
+
+    return true;
+  }
+
+  bool _validateMapSpread(SpreadElement element, DartObjectImpl value) {
+    if (value.isNull && _isNullableSpread(element)) {
+      return true;
+    }
+    Map<DartObject, DartObject> map = value.toMapValue();
+    if (map != null) {
+      // TODO(brianwilkerson) Figure out how to improve the error messages. They
+      //  currently point to the whole spread expression, but the key and/or
+      //  value being referenced might not be located there (if it's referenced
+      //  through a const variable).
+      for (var entry in map.entries) {
+        DartObjectImpl keyValue = entry.key;
+        if (keyValue != null) {
+          if (!mapUniqueKeys.add(keyValue)) {
+            mapDuplicateKeyExpressions.add(element.expression);
+          }
+        }
+      }
+      return true;
+    }
+    verifier._errorReporter.reportErrorForNode(
+      CompileTimeErrorCode.CONST_SPREAD_EXPECTED_MAP,
+      element.expression,
+    );
+    return false;
+  }
+
+  bool _validateSetExpression(Expression expression, DartObjectImpl value) {
+    if (!verifier._evaluationEngine.runtimeTypeMatch(value, setElementType)) {
+      verifier._errorReporter.reportErrorForNode(
+        StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE,
+        expression,
+        [value.type, setElementType],
+      );
+      return false;
+    }
+
+    if (verifier._implementsEqualsWhenNotAllowed(value.type)) {
+      verifier._errorReporter.reportErrorForNode(
+        CompileTimeErrorCode.CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS,
+        expression,
+        [value.type],
+      );
+      return false;
+    }
+
+    verifier._reportErrorIfFromDeferredLibrary(
+      expression,
+      CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY,
+    );
+
+    if (!setUniqueValues.add(value)) {
+      setDuplicateExpressions.add(expression);
+    }
+
+    return true;
+  }
+
+  static bool _isNullableSpread(SpreadElement element) {
+    return element.spreadOperator.type ==
+        TokenType.PERIOD_PERIOD_PERIOD_QUESTION;
   }
 }
diff --git a/pkg/analyzer/lib/src/dart/constant/evaluation.dart b/pkg/analyzer/lib/src/dart/constant/evaluation.dart
index ee9cc60..112dce6 100644
--- a/pkg/analyzer/lib/src/dart/constant/evaluation.dart
+++ b/pkg/analyzer/lib/src/dart/constant/evaluation.dart
@@ -15,6 +15,7 @@
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/dart/constant/potentially_constant.dart';
 import 'package:analyzer/src/dart/constant/utilities.dart';
 import 'package:analyzer/src/dart/constant/value.dart';
 import 'package:analyzer/src/dart/element/element.dart';
@@ -26,7 +27,7 @@
 import 'package:analyzer/src/generated/resolver.dart' show TypeProvider;
 import 'package:analyzer/src/generated/type_system.dart'
     show Dart2TypeSystem, TypeSystem;
-import 'package:analyzer/src/task/dart.dart';
+import 'package:analyzer/src/task/api/model.dart';
 
 /**
  * Helper class encapsulating the methods for evaluating constants and
@@ -904,7 +905,25 @@
     if (type.isUndefined) {
       return false;
     }
-    return obj.type.isSubtypeOf(type);
+    var objType = obj.type;
+    if (objType.isDartCoreInt && type.isDartCoreDouble) {
+      // Work around dartbug.com/35993 by allowing `int` to be used in a place
+      // where `double` is expected.
+      //
+      // Note that this is not technically correct, because it allows code like
+      // this:
+      //   const Object x = 1;
+      //   const double y = x;
+      //
+      // TODO(paulberry): remove this workaround once dartbug.com/33441 is
+      // fixed.
+      return true;
+    }
+    // TODO(scheglov ) Switch to using this, but not now, dartbug.com/33441
+    if (typeSystem.isSubtypeOf(objType, type)) {
+      return true;
+    }
+    return objType.isSubtypeOf(type);
   }
 
   /**
@@ -916,6 +935,23 @@
 }
 
 /**
+ * Interface for [AnalysisTarget]s for which constant evaluation can be
+ * performed.
+ */
+abstract class ConstantEvaluationTarget extends AnalysisTarget {
+  /**
+   * Return the [AnalysisContext] which should be used to evaluate this
+   * constant.
+   */
+  AnalysisContext get context;
+
+  /**
+   * Return whether this constant is evaluated.
+   */
+  bool get isConstantEvaluated;
+}
+
+/**
  * Interface used by unit tests to verify correct dependency analysis during
  * constant evaluation.
  */
@@ -979,58 +1015,7 @@
 
 /**
  * A visitor used to evaluate constant expressions to produce their compile-time
- * value. According to the Dart Language Specification: <blockquote> A constant
- * expression is one of the following:
- *
- * * A literal number.
- * * A literal boolean.
- * * A literal string where any interpolated expression is a compile-time
- *   constant that evaluates to a numeric, string or boolean value or to
- *   <b>null</b>.
- * * A literal symbol.
- * * <b>null</b>.
- * * A qualified reference to a static constant variable.
- * * An identifier expression that denotes a constant variable, class or type
- *   alias.
- * * A constant constructor invocation.
- * * A constant list literal.
- * * A constant map literal.
- * * A simple or qualified identifier denoting a top-level function or a static
- *   method.
- * * A parenthesized expression <i>(e)</i> where <i>e</i> is a constant
- *   expression.
- * * An expression of the form <i>identical(e<sub>1</sub>, e<sub>2</sub>)</i>
- *   where <i>e<sub>1</sub></i> and <i>e<sub>2</sub></i> are constant
- *   expressions and <i>identical()</i> is statically bound to the predefined
- *   dart function <i>identical()</i> discussed above.
- * * An expression of one of the forms <i>e<sub>1</sub> == e<sub>2</sub></i> or
- *   <i>e<sub>1</sub> != e<sub>2</sub></i> where <i>e<sub>1</sub></i> and
- *   <i>e<sub>2</sub></i> are constant expressions that evaluate to a numeric,
- *   string or boolean value.
- * * An expression of one of the forms <i>!e</i>, <i>e<sub>1</sub> &amp;&amp;
- *   e<sub>2</sub></i> or <i>e<sub>1</sub> || e<sub>2</sub></i>, where <i>e</i>,
- *   <i>e1</sub></i> and <i>e2</sub></i> are constant expressions that evaluate
- *   to a boolean value.
- * * An expression of one of the forms <i>~e</i>, <i>e<sub>1</sub> ^
- *   e<sub>2</sub></i>, <i>e<sub>1</sub> &amp; e<sub>2</sub></i>,
- *   <i>e<sub>1</sub> | e<sub>2</sub></i>, <i>e<sub>1</sub> &gt;&gt;
- *   e<sub>2</sub></i> or <i>e<sub>1</sub> &lt;&lt; e<sub>2</sub></i>, where
- *   <i>e</i>, <i>e<sub>1</sub></i> and <i>e<sub>2</sub></i> are constant
- *   expressions that evaluate to an integer value or to <b>null</b>.
- * * An expression of one of the forms <i>-e</i>, <i>e<sub>1</sub> +
- *   e<sub>2</sub></i>, <i>e<sub>1</sub> - e<sub>2</sub></i>, <i>e<sub>1</sub> *
- *   e<sub>2</sub></i>, <i>e<sub>1</sub> / e<sub>2</sub></i>, <i>e<sub>1</sub>
- *   ~/ e<sub>2</sub></i>, <i>e<sub>1</sub> &gt; e<sub>2</sub></i>,
- *   <i>e<sub>1</sub> &lt; e<sub>2</sub></i>, <i>e<sub>1</sub> &gt;=
- *   e<sub>2</sub></i>, <i>e<sub>1</sub> &lt;= e<sub>2</sub></i> or
- *   <i>e<sub>1</sub> % e<sub>2</sub></i>, where <i>e</i>, <i>e<sub>1</sub></i>
- *   and <i>e<sub>2</sub></i> are constant expressions that evaluate to a
- *   numeric value or to <b>null</b>.
- * * An expression of the form <i>e<sub>1</sub> ? e<sub>2</sub> :
- *   e<sub>3</sub></i> where <i>e<sub>1</sub></i>, <i>e<sub>2</sub></i> and
- *   <i>e<sub>3</sub></i> are constant expressions, and <i>e<sub>1</sub></i>
- *   evaluates to a boolean value.
- * </blockquote>
+ * value.
  */
 class ConstantVisitor extends UnifyingAstVisitor<DartObjectImpl> {
   /**
@@ -1175,6 +1160,10 @@
       return _dartObjectComputer.eagerXor(
           node, leftResult, rightResult, experimentStatus.constant_update_2018);
     } else if (operatorType == TokenType.EQ_EQ) {
+      if (experimentStatus.constant_update_2018) {
+        return _dartObjectComputer.lazyEqualEqual(
+            node, leftResult, rightResult);
+      }
       return _dartObjectComputer.equalEqual(node, leftResult, rightResult);
     } else if (operatorType == TokenType.GT) {
       return _dartObjectComputer.greaterThan(node, leftResult, rightResult);
@@ -1233,8 +1222,10 @@
         return conditionResult;
       }
       if (conditionResult.toBoolValue() == true) {
+        _reportNotPotentialConstants(node.elseExpression);
         return node.thenExpression.accept(this);
       } else if (conditionResult.toBoolValue() == false) {
+        _reportNotPotentialConstants(node.thenExpression);
         return node.elseExpression.accept(this);
       }
       // We used to return an object with a known type and an unknown value, but
@@ -1338,35 +1329,6 @@
       return null;
     }
     bool errorOccurred = false;
-    List<DartObjectImpl> elements = new List<DartObjectImpl>();
-    for (Expression element in node.elements) {
-      DartObjectImpl elementResult = element.accept(this);
-      if (elementResult == null) {
-        errorOccurred = true;
-      } else {
-        elements.add(elementResult);
-      }
-    }
-    if (errorOccurred) {
-      return null;
-    }
-    var nodeType = node.staticType;
-    DartType elementType =
-        nodeType is InterfaceType && nodeType.typeArguments.isNotEmpty
-            ? nodeType.typeArguments[0]
-            : _typeProvider.dynamicType;
-    InterfaceType listType = _typeProvider.listType.instantiate([elementType]);
-    return new DartObjectImpl(listType, new ListState(elements));
-  }
-
-  @override
-  DartObjectImpl visitListLiteral2(ListLiteral2 node) {
-    if (!node.isConst) {
-      _errorReporter.reportErrorForNode(
-          CompileTimeErrorCode.MISSING_CONST_IN_LIST_LITERAL, node);
-      return null;
-    }
-    bool errorOccurred = false;
     List<DartObjectImpl> list = [];
     for (CollectionElement element in node.elements) {
       errorOccurred = errorOccurred | _addElementsToList(list, element);
@@ -1384,73 +1346,6 @@
   }
 
   @override
-  DartObjectImpl visitMapLiteral(MapLiteral node) {
-    if (!node.isConst) {
-      _errorReporter.reportErrorForNode(
-          CompileTimeErrorCode.MISSING_CONST_IN_MAP_LITERAL, node);
-      return null;
-    }
-    bool errorOccurred = false;
-    Map<DartObjectImpl, DartObjectImpl> map =
-        <DartObjectImpl, DartObjectImpl>{};
-    for (MapLiteralEntry entry in node.entries) {
-      DartObjectImpl keyResult = entry.key.accept(this);
-      DartObjectImpl valueResult = entry.value.accept(this);
-      if (keyResult == null || valueResult == null) {
-        errorOccurred = true;
-      } else {
-        map[keyResult] = valueResult;
-      }
-    }
-    if (errorOccurred) {
-      return null;
-    }
-    DartType keyType = _typeProvider.dynamicType;
-    DartType valueType = _typeProvider.dynamicType;
-    var nodeType = node.staticType;
-    if (nodeType is InterfaceType) {
-      var typeArguments = nodeType.typeArguments;
-      if (typeArguments.length >= 2) {
-        keyType = typeArguments[0];
-        valueType = typeArguments[1];
-      }
-    }
-    InterfaceType mapType =
-        _typeProvider.mapType.instantiate([keyType, valueType]);
-    return new DartObjectImpl(mapType, new MapState(map));
-  }
-
-  @override
-  DartObjectImpl visitMapLiteral2(MapLiteral2 node) {
-    if (!node.isConst) {
-      _errorReporter.reportErrorForNode(
-          CompileTimeErrorCode.MISSING_CONST_IN_MAP_LITERAL, node);
-      return null;
-    }
-    Map<DartObjectImpl, DartObjectImpl> map = {};
-    bool errorOccurred = false;
-    for (CollectionElement element in node.entries) {
-      errorOccurred = errorOccurred | _addElementsToMap(map, element);
-    }
-    if (errorOccurred) {
-      return null;
-    }
-    DartType keyType = _typeProvider.dynamicType;
-    DartType valueType = _typeProvider.dynamicType;
-    DartType nodeType = node.staticType;
-    if (nodeType is InterfaceType) {
-      var typeArguments = nodeType.typeArguments;
-      if (typeArguments.length >= 2) {
-        keyType = typeArguments[0];
-        valueType = typeArguments[1];
-      }
-    }
-    InterfaceType mapType =
-        _typeProvider.mapType.instantiate([keyType, valueType]);
-    return new DartObjectImpl(mapType, new MapState(map));
-  }
-
-  @override
   DartObjectImpl visitMethodInvocation(MethodInvocation node) {
     Element element = node.methodName.staticElement;
     if (element is FunctionElement) {
@@ -1548,56 +1443,63 @@
   }
 
   @override
-  DartObjectImpl visitSetLiteral(SetLiteral node) {
-    if (!node.isConst) {
-      _errorReporter.reportErrorForNode(
-          CompileTimeErrorCode.MISSING_CONST_IN_SET_LITERAL, node);
-      return null;
-    }
-    bool errorOccurred = false;
-    Set<DartObjectImpl> elements = new Set<DartObjectImpl>();
-    for (Expression element in node.elements) {
-      DartObjectImpl elementResult = element.accept(this);
-      if (elementResult == null) {
-        errorOccurred = true;
-      } else {
-        elements.add(elementResult);
+  DartObjectImpl visitSetOrMapLiteral(SetOrMapLiteral node) {
+    // Note: due to dartbug.com/33441, it's possible that a set/map literal
+    // resynthesized from a summary will have neither its `isSet` or `isMap`
+    // boolean set to `true`.  We work around the problem by assuming such
+    // literals are maps.
+    // TODO(paulberry): when dartbug.com/33441 is fixed, add an assertion here
+    // to verify that `node.isSet == !node.isMap`.
+    bool isMap = !node.isSet;
+    if (isMap) {
+      if (!node.isConst) {
+        _errorReporter.reportErrorForNode(
+            CompileTimeErrorCode.MISSING_CONST_IN_MAP_LITERAL, node);
+        return null;
       }
+      bool errorOccurred = false;
+      Map<DartObjectImpl, DartObjectImpl> map = {};
+      for (CollectionElement element in node.elements) {
+        errorOccurred = errorOccurred | _addElementsToMap(map, element);
+      }
+      if (errorOccurred) {
+        return null;
+      }
+      DartType keyType = _typeProvider.dynamicType;
+      DartType valueType = _typeProvider.dynamicType;
+      DartType nodeType = node.staticType;
+      if (nodeType is InterfaceType) {
+        var typeArguments = nodeType.typeArguments;
+        if (typeArguments.length >= 2) {
+          keyType = typeArguments[0];
+          valueType = typeArguments[1];
+        }
+      }
+      InterfaceType mapType =
+          _typeProvider.mapType.instantiate([keyType, valueType]);
+      return new DartObjectImpl(mapType, new MapState(map));
+    } else {
+      if (!node.isConst) {
+        _errorReporter.reportErrorForNode(
+            CompileTimeErrorCode.MISSING_CONST_IN_SET_LITERAL, node);
+        return null;
+      }
+      bool errorOccurred = false;
+      Set<DartObjectImpl> set = new Set<DartObjectImpl>();
+      for (CollectionElement element in node.elements) {
+        errorOccurred = errorOccurred | _addElementsToSet(set, element);
+      }
+      if (errorOccurred) {
+        return null;
+      }
+      DartType nodeType = node.staticType;
+      DartType elementType =
+          nodeType is InterfaceType && nodeType.typeArguments.isNotEmpty
+              ? nodeType.typeArguments[0]
+              : _typeProvider.dynamicType;
+      InterfaceType setType = _typeProvider.setType.instantiate([elementType]);
+      return new DartObjectImpl(setType, new SetState(set));
     }
-    if (errorOccurred) {
-      return null;
-    }
-    DartType nodeType = node.staticType;
-    DartType elementType =
-        nodeType is InterfaceType && nodeType.typeArguments.isNotEmpty
-            ? nodeType.typeArguments[0]
-            : _typeProvider.dynamicType;
-    InterfaceType setType = _typeProvider.setType.instantiate([elementType]);
-    return new DartObjectImpl(setType, new SetState(elements));
-  }
-
-  @override
-  DartObjectImpl visitSetLiteral2(SetLiteral2 node) {
-    if (!node.isConst) {
-      _errorReporter.reportErrorForNode(
-          CompileTimeErrorCode.MISSING_CONST_IN_SET_LITERAL, node);
-      return null;
-    }
-    bool errorOccurred = false;
-    Set<DartObjectImpl> set = new Set<DartObjectImpl>();
-    for (CollectionElement element in node.elements) {
-      errorOccurred = errorOccurred | _addElementsToSet(set, element);
-    }
-    if (errorOccurred) {
-      return null;
-    }
-    DartType nodeType = node.staticType;
-    DartType elementType =
-        nodeType is InterfaceType && nodeType.typeArguments.isNotEmpty
-            ? nodeType.typeArguments[0]
-            : _typeProvider.dynamicType;
-    InterfaceType setType = _typeProvider.setType.instantiate([elementType]);
-    return new DartObjectImpl(setType, new SetState(set));
   }
 
   @override
@@ -1661,8 +1563,7 @@
    */
   bool _addElementsToList(List<DartObject> list, CollectionElement element) {
     if (element is IfElement) {
-      DartObjectImpl conditionResult = element.condition.accept(this);
-      bool conditionValue = conditionResult?.toBoolValue();
+      bool conditionValue = _evaluateCondition(element.condition);
       if (conditionValue == null) {
         return true;
       } else if (conditionValue) {
@@ -1699,8 +1600,7 @@
   bool _addElementsToMap(
       Map<DartObjectImpl, DartObjectImpl> map, CollectionElement element) {
     if (element is IfElement) {
-      DartObjectImpl conditionResult = element.condition.accept(this);
-      bool conditionValue = conditionResult?.toBoolValue();
+      bool conditionValue = _evaluateCondition(element.condition);
       if (conditionValue == null) {
         return true;
       } else if (conditionValue) {
@@ -1737,8 +1637,7 @@
    */
   bool _addElementsToSet(Set<DartObject> set, CollectionElement element) {
     if (element is IfElement) {
-      DartObjectImpl conditionResult = element.condition.accept(this);
-      bool conditionValue = conditionResult?.toBoolValue();
+      bool conditionValue = _evaluateCondition(element.condition);
       if (conditionValue == null) {
         return true;
       } else if (conditionValue) {
@@ -1788,6 +1687,27 @@
   }
 
   /**
+   * Evaluate the given [condition] with the assumption that it must be a
+   * `bool`.
+   */
+  bool _evaluateCondition(Expression condition) {
+    DartObjectImpl conditionResult = condition.accept(this);
+    bool conditionValue = conditionResult?.toBoolValue();
+    if (conditionValue == null) {
+      // TODO(brianwilkerson) Figure out why the static type is sometimes null.
+      DartType staticType = condition.staticType;
+      if (staticType == null ||
+          typeSystem.isAssignableTo(staticType, _typeProvider.boolType)) {
+        // If the static type is not assignable, then we will have already
+        // reported this error.
+        _errorReporter.reportErrorForNode(
+            CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION, condition);
+      }
+    }
+    return conditionValue;
+  }
+
+  /**
    * Return the constant value of the static constant represented by the given
    * [element]. The [node] is the node to be used if an error needs to be
    * reported.
@@ -1848,6 +1768,18 @@
     return identifier.name == 'length';
   }
 
+  void _reportNotPotentialConstants(AstNode node) {
+    var notPotentiallyConstants = getNotPotentiallyConstants(node);
+    if (notPotentiallyConstants.isEmpty) return;
+
+    for (var notConst in notPotentiallyConstants) {
+      _errorReporter.reportErrorForNode(
+        CompileTimeErrorCode.INVALID_CONSTANT,
+        notConst,
+      );
+    }
+  }
+
   /**
    * Return the value of the given [expression], or a representation of 'null'
    * if the expression cannot be evaluated.
@@ -2084,6 +2016,18 @@
     return null;
   }
 
+  DartObjectImpl lazyEqualEqual(Expression node, DartObjectImpl leftOperand,
+      DartObjectImpl rightOperand) {
+    if (leftOperand != null && rightOperand != null) {
+      try {
+        return leftOperand.lazyEqualEqual(_typeProvider, rightOperand);
+      } on EvaluationException catch (exception) {
+        _errorReporter.reportErrorForNode(exception.errorCode, node);
+      }
+    }
+    return null;
+  }
+
   DartObjectImpl lazyOr(BinaryExpression node, DartObjectImpl leftOperand,
       DartObjectImpl rightOperandComputer()) {
     if (leftOperand != null) {
diff --git a/pkg/analyzer/lib/src/dart/constant/potentially_constant.dart b/pkg/analyzer/lib/src/dart/constant/potentially_constant.dart
new file mode 100644
index 0000000..3d091bd
--- /dev/null
+++ b/pkg/analyzer/lib/src/dart/constant/potentially_constant.dart
@@ -0,0 +1,356 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/src/dart/element/type.dart';
+
+/// Check if the [node] and all its sub-nodes are potentially constant.
+///
+/// Return the list of nodes that are not potentially constant.
+List<AstNode> getNotPotentiallyConstants(AstNode node) {
+  var collector = _Collector();
+  collector.collect(node);
+  return collector.nodes;
+}
+
+/// Return `true` if the [node] is a constant type expression.
+bool isConstantTypeExpression(TypeAnnotation node) {
+  if (node is TypeName) {
+    if (_isConstantTypeName(node.name)) {
+      var arguments = node.typeArguments?.arguments;
+      if (arguments != null) {
+        for (var argument in arguments) {
+          if (!isConstantTypeExpression(argument)) {
+            return false;
+          }
+        }
+      }
+      return true;
+    }
+    if (node.type is DynamicTypeImpl) {
+      return true;
+    }
+    if (node.type is VoidType) {
+      return true;
+    }
+    return false;
+  }
+
+  if (node is GenericFunctionType) {
+    var returnType = node.returnType;
+    if (returnType != null) {
+      if (!isConstantTypeExpression(returnType)) {
+        return false;
+      }
+    }
+
+    var typeParameters = node.typeParameters?.typeParameters;
+    if (typeParameters != null) {
+      for (var parameter in typeParameters) {
+        var bound = parameter.bound;
+        if (bound != null && !isConstantTypeExpression(bound)) {
+          return false;
+        }
+      }
+    }
+
+    var formalParameters = node.parameters?.parameters;
+    if (formalParameters != null) {
+      for (var parameter in formalParameters) {
+        if (parameter is SimpleFormalParameter) {
+          if (!isConstantTypeExpression(parameter.type)) {
+            return false;
+          }
+        }
+      }
+    }
+
+    return true;
+  }
+
+  return false;
+}
+
+bool _isConstantTypeName(Identifier name) {
+  var element = name.staticElement;
+  if (element is ClassElement || element is GenericTypeAliasElement) {
+    if (name is PrefixedIdentifier) {
+      if (name.isDeferred) {
+        return false;
+      }
+    }
+    return true;
+  }
+  return false;
+}
+
+class _Collector {
+  final List<AstNode> nodes = [];
+
+  void collect(AstNode node) {
+    if (node is BooleanLiteral ||
+        node is DoubleLiteral ||
+        node is IntegerLiteral ||
+        node is NullLiteral ||
+        node is SimpleStringLiteral ||
+        node is SymbolLiteral) {
+      return;
+    }
+
+    if (node is AdjacentStrings) {
+      for (var string in node.strings) {
+        collect(string);
+      }
+      return;
+    }
+
+    if (node is StringInterpolation) {
+      for (var component in node.elements) {
+        if (component is InterpolationExpression) {
+          collect(component.expression);
+        }
+      }
+      return;
+    }
+
+    if (node is Identifier) {
+      return _identifier(node);
+    }
+
+    if (node is InstanceCreationExpression) {
+      if (!node.isConst) {
+        nodes.add(node);
+      }
+      return;
+    }
+
+    if (node is TypedLiteral) {
+      return _typeLiteral(node);
+    }
+
+    if (node is ParenthesizedExpression) {
+      collect(node.expression);
+      return;
+    }
+
+    if (node is MethodInvocation) {
+      return _methodInvocation(node);
+    }
+
+    if (node is NamedExpression) {
+      return collect(node.expression);
+    }
+
+    if (node is BinaryExpression) {
+      collect(node.leftOperand);
+      collect(node.rightOperand);
+      return;
+    }
+
+    if (node is PrefixExpression) {
+      var operator = node.operator.type;
+      if (operator == TokenType.BANG ||
+          operator == TokenType.MINUS ||
+          operator == TokenType.TILDE) {
+        collect(node.operand);
+        return;
+      }
+      nodes.add(node);
+      return;
+    }
+
+    if (node is ConditionalExpression) {
+      collect(node.condition);
+      collect(node.thenExpression);
+      collect(node.elseExpression);
+      return;
+    }
+
+    if (node is PropertyAccess) {
+      return _propertyAccess(node);
+    }
+
+    if (node is AsExpression) {
+      if (!isConstantTypeExpression(node.type)) {
+        nodes.add(node.type);
+      }
+      collect(node.expression);
+      return;
+    }
+
+    if (node is IsExpression) {
+      if (!isConstantTypeExpression(node.type)) {
+        nodes.add(node.type);
+      }
+      collect(node.expression);
+      return;
+    }
+
+    if (node is MapLiteralEntry) {
+      collect(node.key);
+      collect(node.value);
+      return;
+    }
+
+    if (node is SpreadElement) {
+      collect(node.expression);
+      return;
+    }
+
+    if (node is IfElement) {
+      collect(node.condition);
+      collect(node.thenElement);
+      if (node.elseElement != null) {
+        collect(node.elseElement);
+      }
+      return;
+    }
+
+    nodes.add(node);
+  }
+
+  void _identifier(Identifier node) {
+    var element = node.staticElement;
+
+    if (node is PrefixedIdentifier) {
+      if (node.isDeferred) {
+        nodes.add(node);
+        return;
+      }
+      if (node.identifier.name == 'length') {
+        collect(node.prefix);
+        return;
+      }
+      if (element is MethodElement && element.isStatic) {
+        if (!_isConstantTypeName(node.prefix)) {
+          nodes.add(node);
+        }
+        return;
+      }
+    }
+
+    if (element is ParameterElement) {
+      var enclosing = element.enclosingElement;
+      if (enclosing is ConstructorElement && enclosing.isConst) {
+        if (node.thisOrAncestorOfType<ConstructorInitializer>() != null) {
+          return;
+        }
+      }
+      nodes.add(node);
+      return;
+    }
+
+    if (element is VariableElement) {
+      if (!element.isConst) {
+        nodes.add(node);
+      }
+      return;
+    }
+    if (element is PropertyAccessorElement && element.isGetter) {
+      var variable = element.variable;
+      if (!variable.isConst) {
+        nodes.add(node);
+      }
+      return;
+    }
+    if (_isConstantTypeName(node)) {
+      return;
+    }
+    if (element is FunctionElement) {
+      return;
+    }
+    if (element is MethodElement && element.isStatic) {
+      return;
+    }
+    nodes.add(node);
+  }
+
+  void _methodInvocation(MethodInvocation node) {
+    var arguments = node.argumentList?.arguments;
+    if (arguments?.length == 2 && node.methodName.name == 'identical') {
+      var library = node.methodName?.staticElement?.library;
+      if (library?.isDartCore == true) {
+        collect(arguments[0]);
+        collect(arguments[1]);
+        return;
+      }
+    }
+    nodes.add(node);
+  }
+
+  void _propertyAccess(PropertyAccess node) {
+    if (node.propertyName.name == 'length') {
+      collect(node.target);
+      return;
+    }
+
+    var target = node.target;
+    if (target is PrefixedIdentifier) {
+      if (target.isDeferred) {
+        nodes.add(node);
+        return;
+      }
+
+      var element = node.propertyName.staticElement;
+      if (element is PropertyAccessorElement && element.isGetter) {
+        var variable = element.variable;
+        if (!variable.isConst) {
+          nodes.add(node.propertyName);
+        }
+        return;
+      }
+    }
+
+    nodes.add(node);
+  }
+
+  void _typeLiteral(TypedLiteral node) {
+    if (!node.isConst) {
+      nodes.add(node);
+      return;
+    }
+
+    if (node is ListLiteral) {
+      var typeArguments = node.typeArguments?.arguments;
+      if (typeArguments?.length == 1) {
+        var elementType = typeArguments[0];
+        if (!isConstantTypeExpression(elementType)) {
+          nodes.add(elementType);
+        }
+      }
+
+      for (var element in node.elements) {
+        collect(element);
+      }
+      return;
+    }
+
+    if (node is SetOrMapLiteral) {
+      var typeArguments = node.typeArguments?.arguments;
+      if (typeArguments?.length == 1) {
+        var elementType = typeArguments[0];
+        if (!isConstantTypeExpression(elementType)) {
+          nodes.add(elementType);
+        }
+      }
+
+      if (typeArguments?.length == 2) {
+        var keyType = typeArguments[0];
+        var valueType = typeArguments[1];
+        if (!isConstantTypeExpression(keyType)) {
+          nodes.add(keyType);
+        }
+        if (!isConstantTypeExpression(valueType)) {
+          nodes.add(valueType);
+        }
+      }
+
+      for (var element in node.elements) {
+        collect(element);
+      }
+    }
+  }
+}
diff --git a/pkg/analyzer/lib/src/dart/constant/utilities.dart b/pkg/analyzer/lib/src/dart/constant/utilities.dart
index 95223de..60cecdd 100644
--- a/pkg/analyzer/lib/src/dart/constant/utilities.dart
+++ b/pkg/analyzer/lib/src/dart/constant/utilities.dart
@@ -12,11 +12,11 @@
 import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/ast/token.dart';
 import 'package:analyzer/src/dart/ast/utilities.dart';
+import 'package:analyzer/src/dart/constant/evaluation.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/handle.dart'
     show ConstructorElementHandle;
 import 'package:analyzer/src/dart/element/member.dart';
-import 'package:analyzer/src/task/dart.dart';
 
 ConstructorElementImpl getConstructorImpl(ConstructorElement constructor) {
   while (constructor is ConstructorMember) {
@@ -95,36 +95,6 @@
   }
 
   @override
-  ListLiteral2 visitListLiteral2(ListLiteral2 node) {
-    ListLiteral2 literal = super.visitListLiteral2(node);
-    literal.staticType = node.staticType;
-    if (node.constKeyword == null && node.isConst) {
-      literal.constKeyword = new KeywordToken(Keyword.CONST, node.offset);
-    }
-    return literal;
-  }
-
-  @override
-  MapLiteral visitMapLiteral(MapLiteral node) {
-    MapLiteral literal = super.visitMapLiteral(node);
-    literal.staticType = node.staticType;
-    if (node.constKeyword == null && node.isConst) {
-      literal.constKeyword = new KeywordToken(Keyword.CONST, node.offset);
-    }
-    return literal;
-  }
-
-  @override
-  MapLiteral2 visitMapLiteral2(MapLiteral2 node) {
-    MapLiteral2 literal = super.visitMapLiteral2(node);
-    literal.staticType = node.staticType;
-    if (node.constKeyword == null && node.isConst) {
-      literal.constKeyword = new KeywordToken(Keyword.CONST, node.offset);
-    }
-    return literal;
-  }
-
-  @override
   RedirectingConstructorInvocation visitRedirectingConstructorInvocation(
       RedirectingConstructorInvocation node) {
     RedirectingConstructorInvocation invocation =
@@ -134,18 +104,8 @@
   }
 
   @override
-  SetLiteral visitSetLiteral(SetLiteral node) {
-    SetLiteral literal = super.visitSetLiteral(node);
-    literal.staticType = node.staticType;
-    if (node.constKeyword == null && node.isConst) {
-      literal.constKeyword = new KeywordToken(Keyword.CONST, node.offset);
-    }
-    return literal;
-  }
-
-  @override
-  SetLiteral2 visitSetLiteral2(SetLiteral2 node) {
-    SetLiteral2 literal = super.visitSetLiteral2(node);
+  SetOrMapLiteral visitSetOrMapLiteral(SetOrMapLiteral node) {
+    SetOrMapLiteral literal = super.visitSetOrMapLiteral(node);
     literal.staticType = node.staticType;
     if (node.constKeyword == null && node.isConst) {
       literal.constKeyword = new KeywordToken(Keyword.CONST, node.offset);
@@ -208,24 +168,23 @@
   }
 
   @override
-  void visitMapLiteral(MapLiteral node) {
+  void visitSetOrMapLiteral(SetOrMapLiteral node) {
     if (node.isConst) {
       _find(node);
     } else {
-      // Values of keys are computed to check that they are unique.
-      for (var entry in node.entries) {
-        _find(entry.key);
+      if (node.isMap) {
+        // Values of keys are computed to check that they are unique.
+        for (var entry in node.elements) {
+          // TODO(mfairhurst): How do if/for loops/spreads affect this?
+          _find(entry);
+        }
+      } else if (node.isSet) {
+        // values of sets are computed to check that they are unique.
+        for (var entry in node.elements) {
+          _find(entry);
+        }
       }
-      super.visitMapLiteral(node);
-    }
-  }
-
-  @override
-  void visitSetLiteral(SetLiteral node) {
-    if (node.isConst) {
-      _find(node);
-    } else {
-      super.visitSetLiteral(node);
+      super.visitSetOrMapLiteral(node);
     }
   }
 
@@ -235,7 +194,9 @@
     node.statements.accept(this);
   }
 
-  void _find(Expression node) {
+  /// Add dependencies of a [CollectionElement] or [Expression] (which is a type
+  /// of [CollectionElement]).
+  void _find(CollectionElement node) {
     if (node != null) {
       ReferenceFinder referenceFinder = new ReferenceFinder(dependencies.add);
       node.accept(referenceFinder);
diff --git a/pkg/analyzer/lib/src/dart/constant/value.dart b/pkg/analyzer/lib/src/dart/constant/value.dart
index c95889d..1b93859 100644
--- a/pkg/analyzer/lib/src/dart/constant/value.dart
+++ b/pkg/analyzer/lib/src/dart/constant/value.dart
@@ -109,6 +109,11 @@
   }
 
   @override
+  BoolState lazyEqualEqual(InstanceState rightOperand) {
+    return isIdentical(rightOperand);
+  }
+
+  @override
   BoolState lazyOr(InstanceState rightOperandComputer()) {
     if (value == true) {
       return TRUE_STATE;
@@ -171,6 +176,12 @@
  * A representation of an instance of a Dart class.
  */
 class DartObjectImpl implements DartObject {
+  /// When `true`, `operator==` only compares constant values, ignoring types.
+  ///
+  /// This is a temporary hack to work around dartbug.com/35908.
+  /// TODO(paulberry): when #35908 is fixed, remove this hack.
+  static bool _ignoreTypesInEqualityComparison = false;
+
   @override
   final ParameterizedType type;
 
@@ -244,7 +255,8 @@
   @override
   bool operator ==(Object object) {
     if (object is DartObjectImpl) {
-      return type == object.type && _state == object._state;
+      return (_ignoreTypesInEqualityComparison || type == object.type) &&
+          _state == object._state;
     }
     return false;
   }
@@ -516,6 +528,21 @@
       new DartObjectImpl(
           typeProvider.intType, _state.integerDivide(rightOperand._state));
 
+  /// Indicates whether `this` is equal to [other], ignoring types both in this
+  /// object and sub-objects.
+  ///
+  /// This is a temporary hack to work around dartbug.com/35908.
+  /// TODO(paulberry): when #35908 is fixed, remove this hack.
+  bool isEqualIgnoringTypesRecursively(Object other) {
+    bool oldIgnoreTypesInEqualityComparison = _ignoreTypesInEqualityComparison;
+    _ignoreTypesInEqualityComparison = true;
+    try {
+      return this == other;
+    } finally {
+      _ignoreTypesInEqualityComparison = oldIgnoreTypesInEqualityComparison;
+    }
+  }
+
   /**
    * Return the result of invoking the identical function on this object with
    * the [rightOperand]. The [typeProvider] is the type provider used to find
@@ -541,6 +568,31 @@
           _state.lazyAnd(() => rightOperandComputer()?._state));
 
   /**
+   * Return the result of invoking the '==' operator on this object with the
+   * [rightOperand]. The [typeProvider] is the type provider used to find known
+   * types.
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  DartObjectImpl lazyEqualEqual(
+      TypeProvider typeProvider, DartObjectImpl rightOperand) {
+    if (isNull || rightOperand.isNull) {
+      return new DartObjectImpl(
+          typeProvider.boolType,
+          isNull && rightOperand.isNull
+              ? BoolState.TRUE_STATE
+              : BoolState.FALSE_STATE);
+    }
+    if (isBoolNumStringOrNull) {
+      return new DartObjectImpl(
+          typeProvider.boolType, _state.lazyEqualEqual(rightOperand._state));
+    }
+    throw new EvaluationException(
+        CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_NUM_STRING);
+  }
+
+  /**
    * Return the result of invoking the '||' operator on this object with the
    * [rightOperand]. The [typeProvider] is the type provider used to find known
    * types.
@@ -1055,6 +1107,11 @@
   }
 
   @override
+  BoolState lazyEqualEqual(InstanceState rightOperand) {
+    return isIdentical(rightOperand);
+  }
+
+  @override
   BoolState lessThan(InstanceState rightOperand) {
     assertNumOrNull(rightOperand);
     if (value == null) {
@@ -1291,6 +1348,11 @@
   }
 
   @override
+  BoolState lazyEqualEqual(InstanceState rightOperand) {
+    return BoolState.UNKNOWN_VALUE;
+  }
+
+  @override
   BoolState lazyOr(InstanceState rightOperandComputer()) {
     InstanceState rightOperand = rightOperandComputer();
     assertBool(rightOperand);
@@ -1430,6 +1492,11 @@
   }
 
   @override
+  BoolState lazyEqualEqual(InstanceState rightOperand) {
+    return isIdentical(rightOperand);
+  }
+
+  @override
   String toString() => _element == null ? "-unknown-" : _element.name;
 }
 
@@ -1522,6 +1589,11 @@
   }
 
   @override
+  BoolState lazyEqualEqual(InstanceState rightOperand) {
+    return isIdentical(rightOperand);
+  }
+
+  @override
   String toString() {
     StringBuffer buffer = new StringBuffer();
     List<String> fieldNames = _fieldMap.keys.toList();
@@ -1833,6 +1905,15 @@
   }
 
   /**
+   * Return the result of invoking the '==' operator on this object with the
+   * [rightOperand].
+   *
+   * Throws an [EvaluationException] if the operator is not appropriate for an
+   * object of this kind.
+   */
+  BoolState lazyEqualEqual(InstanceState rightOperand);
+
+  /**
    * Return the result of invoking the '||' operator on this object with the
    * [rightOperand].
    *
@@ -2326,6 +2407,11 @@
   }
 
   @override
+  BoolState lazyEqualEqual(InstanceState rightOperand) {
+    return isIdentical(rightOperand);
+  }
+
+  @override
   BoolState lessThan(InstanceState rightOperand) {
     assertNumOrNull(rightOperand);
     if (value == null) {
@@ -2391,9 +2477,15 @@
       if (rightValue >= 0) {
         // TODO(brianwilkerson) After the analyzer package has a minimum SDK
         // constraint that includes support for the real operator, consider
-        // changing this to the following line:
+        // changing the line below to
         //   return new IntState(value >>> rightValue);
-        return new IntState(value ~/ (1 << rightValue));
+        int divisor = 1 << rightValue;
+        if (divisor == 0) {
+          // The `rightValue` is large enough to cause all of the non-zero bits
+          // in the left operand to be shifted out of the value.
+          return new IntState(0);
+        }
+        return new IntState(value ~/ divisor);
       }
     } else if (rightOperand is DynamicState || rightOperand is NumState) {
       return UNKNOWN_VALUE;
@@ -2612,6 +2704,11 @@
   }
 
   @override
+  BoolState lazyEqualEqual(InstanceState rightOperand) {
+    return isIdentical(rightOperand);
+  }
+
+  @override
   String toString() {
     StringBuffer buffer = new StringBuffer();
     buffer.write('[');
@@ -2696,6 +2793,11 @@
   }
 
   @override
+  BoolState lazyEqualEqual(InstanceState rightOperand) {
+    return isIdentical(rightOperand);
+  }
+
+  @override
   String toString() {
     StringBuffer buffer = new StringBuffer();
     buffer.write('{');
@@ -2763,6 +2865,11 @@
   }
 
   @override
+  BoolState lazyEqualEqual(InstanceState rightOperand) {
+    return isIdentical(rightOperand);
+  }
+
+  @override
   BoolState logicalNot() {
     throw new EvaluationException(
         CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION);
@@ -2852,6 +2959,11 @@
   }
 
   @override
+  BoolState lazyEqualEqual(InstanceState rightOperand) {
+    return BoolState.UNKNOWN_VALUE;
+  }
+
+  @override
   BoolState lessThan(InstanceState rightOperand) {
     assertNumOrNull(rightOperand);
     return BoolState.UNKNOWN_VALUE;
@@ -2954,6 +3066,11 @@
   }
 
   @override
+  BoolState lazyEqualEqual(InstanceState rightOperand) {
+    return isIdentical(rightOperand);
+  }
+
+  @override
   String toString() {
     StringBuffer buffer = new StringBuffer();
     buffer.write('{');
@@ -3050,6 +3167,11 @@
   }
 
   @override
+  BoolState lazyEqualEqual(InstanceState rightOperand) {
+    return isIdentical(rightOperand);
+  }
+
+  @override
   IntState stringLength() {
     if (value == null) {
       return IntState.UNKNOWN_VALUE;
@@ -3117,6 +3239,11 @@
   }
 
   @override
+  BoolState lazyEqualEqual(InstanceState rightOperand) {
+    return isIdentical(rightOperand);
+  }
+
+  @override
   String toString() => value == null ? "-unknown-" : "#$value";
 }
 
@@ -3176,5 +3303,10 @@
   }
 
   @override
+  BoolState lazyEqualEqual(InstanceState rightOperand) {
+    return isIdentical(rightOperand);
+  }
+
+  @override
   String toString() => _type?.toString() ?? "-unknown-";
 }
diff --git a/pkg/analyzer/lib/src/dart/element/builder.dart b/pkg/analyzer/lib/src/dart/element/builder.dart
index e213e85..0997e08 100644
--- a/pkg/analyzer/lib/src/dart/element/builder.dart
+++ b/pkg/analyzer/lib/src/dart/element/builder.dart
@@ -1181,10 +1181,7 @@
     element.metadata = _createElementAnnotations(node.metadata);
 
     var parent = node.parent;
-    if (parent is ForEachStatement) {
-      var statement = parent;
-      element.setVisibleRange(statement.offset, statement.length);
-    } else if (parent is ForEachPartsWithDeclaration) {
+    if (parent is ForEachPartsWithDeclaration) {
       var statement = parent.parent;
       element.setVisibleRange(statement.offset, statement.length);
     }
@@ -1351,8 +1348,8 @@
       LocalVariableElementImpl element, VariableDeclaration node) {
     AstNode scopeNode;
     AstNode parent2 = node.parent.parent;
-    if (parent2 is ForStatement) {
-      scopeNode = parent2;
+    if (parent2 is ForPartsWithDeclarations) {
+      scopeNode = parent2.parent;
     } else {
       scopeNode = node.thisOrAncestorOfType<Block>();
     }
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index 56e2f2a..f2db8f0 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -14,6 +14,7 @@
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/dart/constant/compute.dart';
+import 'package:analyzer/src/dart/constant/evaluation.dart';
 import 'package:analyzer/src/dart/constant/value.dart';
 import 'package:analyzer/src/dart/element/handle.dart';
 import 'package:analyzer/src/dart/element/type.dart';
@@ -29,7 +30,9 @@
 import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:analyzer/src/generated/utilities_general.dart';
 import 'package:analyzer/src/summary/idl.dart';
-import 'package:analyzer/src/task/dart.dart';
+import 'package:analyzer/src/summary2/linked_unit_context.dart';
+import 'package:analyzer/src/summary2/reference.dart';
+import 'package:analyzer/src/util/comment.dart';
 
 /// Assert that the given [object] is null, which in the places where this
 /// function is called means that the element is not resynthesized.
@@ -58,6 +61,10 @@
   /// given [offset] in the file that contains the declaration of this element.
   AbstractClassElementImpl(String name, int offset) : super(name, offset);
 
+  AbstractClassElementImpl.forLinkedNode(
+      ElementImpl enclosing, Reference reference, AstNode linkedNode)
+      : super.forLinkedNode(enclosing, reference, linkedNode);
+
   /// Initialize a newly created class element to have the given [name].
   AbstractClassElementImpl.forNode(Identifier name) : super.forNode(name);
 
@@ -453,6 +460,11 @@
       : _unlinkedClass = null,
         super(name, offset);
 
+  ClassElementImpl.forLinkedNode(CompilationUnitElementImpl enclosing,
+      Reference reference, AstNode linkedNode)
+      : _unlinkedClass = null,
+        super.forLinkedNode(enclosing, reference, linkedNode);
+
   /// Initialize a newly created class element to have the given [name].
   ClassElementImpl.forNode(Identifier name)
       : _unlinkedClass = null,
@@ -471,12 +483,25 @@
 
   @override
   List<PropertyAccessorElement> get accessors {
+    if (_accessors != null) return _accessors;
+
+    if (linkedNode != null) {
+      if (linkedNode is ClassOrMixinDeclaration) {
+        _createPropertiesAndAccessors();
+        assert(_accessors != null);
+        return _accessors;
+      } else {
+        return _accessors = const [];
+      }
+    }
+
     if (_accessors == null) {
       if (_unlinkedClass != null) {
         _resynthesizeFieldsAndPropertyAccessors();
       }
     }
-    return _accessors ?? const <PropertyAccessorElement>[];
+
+    return _accessors ??= const <PropertyAccessorElement>[];
   }
 
   @override
@@ -494,6 +519,9 @@
 
   @override
   int get codeLength {
+    if (linkedNode != null) {
+      return linkedContext.getCodeLength(linkedNode);
+    }
     if (_unlinkedClass != null) {
       return _unlinkedClass.codeRange?.length;
     }
@@ -502,6 +530,9 @@
 
   @override
   int get codeOffset {
+    if (linkedNode != null) {
+      return linkedContext.getCodeOffset(linkedNode);
+    }
     if (_unlinkedClass != null) {
       return _unlinkedClass.codeRange?.offset;
     }
@@ -518,6 +549,20 @@
       return _constructors = _computeMixinAppConstructors();
     }
 
+    if (linkedNode != null) {
+      var context = enclosingUnit.linkedContext;
+      var containerRef = reference.getChild('@constructor');
+      _constructors = context.getConstructors(linkedNode).map((node) {
+        var name = node.name?.name ?? '';
+        var reference = containerRef.getChild(name);
+        if (reference.element == null) {
+          reference.node2 = node;
+          ConstructorElementImpl.forLinkedNode(this, reference, node);
+        }
+        return reference.element as ConstructorElement;
+      }).toList();
+    }
+
     if (_unlinkedClass != null) {
       var unlinkedExecutables = _unlinkedClass.executables;
 
@@ -545,16 +590,17 @@
         }
       }
 
-      // There are no explicit constructors.
-      // Create the implicit default constructor.
+      _constructors = const <ConstructorElement>[];
+    }
+
+    if (_constructors.isEmpty) {
       var constructor = new ConstructorElementImpl('', -1);
       constructor.isSynthetic = true;
       constructor.enclosingElement = this;
       _constructors = <ConstructorElement>[constructor];
     }
 
-    assert(_constructors != null);
-    return _constructors ?? const <ConstructorElement>[];
+    return _constructors;
   }
 
   /// Set the constructors contained in this class to the given [constructors].
@@ -571,6 +617,11 @@
 
   @override
   String get documentationComment {
+    if (linkedNode != null) {
+      var context = enclosingUnit.linkedContext;
+      var comment = context.getDocumentationComment(linkedNode);
+      return getCommentNodeRawText(comment);
+    }
     if (_unlinkedClass != null) {
       return _unlinkedClass.documentationComment?.text;
     }
@@ -582,11 +633,24 @@
 
   @override
   List<FieldElement> get fields {
+    if (_fields != null) return _fields;
+
+    if (linkedNode != null) {
+      if (linkedNode is ClassOrMixinDeclaration) {
+        _createPropertiesAndAccessors();
+        assert(_fields != null);
+        return _fields;
+      } else {
+        _fields = const [];
+      }
+    }
+
     if (_fields == null) {
       if (_unlinkedClass != null) {
         _resynthesizeFieldsAndPropertyAccessors();
       }
     }
+
     return _fields ?? const <FieldElement>[];
   }
 
@@ -597,10 +661,16 @@
   }
 
   bool get hasBeenInferred {
+    if (linkedNode != null) {
+      return linkedContext.hasOverrideInferenceDone(linkedNode);
+    }
     return _unlinkedClass != null || _hasBeenInferred;
   }
 
   void set hasBeenInferred(bool hasBeenInferred) {
+    if (linkedNode != null) {
+      return linkedContext.setOverrideInferenceDone(linkedNode);
+    }
     _assertNotResynthesized(_unlinkedClass);
     _hasBeenInferred = hasBeenInferred;
   }
@@ -680,7 +750,19 @@
       return _interfaces;
     }
 
-    if (_unlinkedClass != null) {
+    if (linkedNode != null) {
+      var context = enclosingUnit.linkedContext;
+      var implementsClause = context.getImplementsClause(linkedNode);
+      if (implementsClause != null) {
+        return _interfaces = implementsClause.interfaces
+            .map((node) => node.type)
+            .whereType<InterfaceType>()
+            .where(_isInterfaceTypeInterface)
+            .toList();
+      } else {
+        return _interfaces = const [];
+      }
+    } else if (_unlinkedClass != null) {
       var unlinkedInterfaces = _unlinkedClass.interfaces;
       var length = unlinkedInterfaces.length;
       if (length == 0) {
@@ -718,6 +800,9 @@
 
   @override
   bool get isAbstract {
+    if (linkedNode != null) {
+      return enclosingUnit.linkedContext.isAbstract(linkedNode);
+    }
     if (_unlinkedClass != null) {
       return _unlinkedClass.isAbstract;
     }
@@ -726,6 +811,9 @@
 
   @override
   bool get isMixinApplication {
+    if (linkedNode != null) {
+      return linkedNode is ClassTypeAlias;
+    }
     if (_unlinkedClass != null) {
       return _unlinkedClass.isMixinApplication;
     }
@@ -747,6 +835,14 @@
   }
 
   @override
+  bool get isSimplyBounded {
+    if (linkedNode != null) {
+      return linkedContext.isSimplyBounded(linkedNode);
+    }
+    return super.isSimplyBounded;
+  }
+
+  @override
   bool get isValidMixin {
     if (hasReferenceToSuper) {
       return false;
@@ -777,6 +873,23 @@
       return _methods;
     }
 
+    if (linkedNode != null) {
+      var context = enclosingUnit.linkedContext;
+      var containerRef = reference.getChild('@method');
+      return _methods = context
+          .getMethods(linkedNode)
+          .where((node) => node.propertyKeyword == null)
+          .map((node) {
+        var name = node.name.name;
+        var reference = containerRef.getChild(name);
+        if (reference.element == null) {
+          reference.node2 = node;
+          MethodElementImpl.forLinkedNode(this, reference, node);
+        }
+        return reference.element as MethodElement;
+      }).toList();
+    }
+
     if (_unlinkedClass != null) {
       var unlinkedExecutables = _unlinkedClass.executables;
 
@@ -830,7 +943,19 @@
       return _mixins;
     }
 
-    if (_unlinkedClass != null) {
+    if (linkedNode != null) {
+      var context = enclosingUnit.linkedContext;
+      var withClause = context.getWithClause(linkedNode);
+      if (withClause != null) {
+        return _mixins = withClause.mixinTypes
+            .map((node) => node.type)
+            .whereType<InterfaceType>()
+            .where(_isInterfaceTypeInterface)
+            .toList();
+      } else {
+        return _mixins = const [];
+      }
+    } else if (_unlinkedClass != null) {
       var unlinkedMixins = _unlinkedClass.mixins;
       var length = unlinkedMixins.length;
       if (length == 0) {
@@ -873,6 +998,9 @@
 
   @override
   String get name {
+    if (linkedNode != null) {
+      return reference.name;
+    }
     if (_unlinkedClass != null) {
       return _unlinkedClass.name;
     }
@@ -895,23 +1023,37 @@
 
   @override
   InterfaceType get supertype {
-    if (_supertype == null) {
-      if (_unlinkedClass != null) {
-        if (_unlinkedClass.supertype != null) {
-          DartType type = enclosingUnit.resynthesizerContext
-              .resolveTypeRef(this, _unlinkedClass.supertype);
-          if (_isInterfaceTypeClass(type)) {
-            _supertype = type;
-          } else {
-            _supertype = context.typeProvider.objectType;
-          }
-        } else if (_unlinkedClass.hasNoSupertype) {
-          return null;
+    if (_supertype != null) return _supertype;
+
+    if (linkedNode != null) {
+      var context = enclosingUnit.linkedContext;
+
+      var coreTypes = context.bundleContext.elementFactory.coreTypes;
+      if (identical(this, coreTypes.objectClass)) {
+        return null;
+      }
+
+      var type = context.getSuperclass(linkedNode)?.type;
+      if (_isInterfaceTypeClass(type)) {
+        return _supertype = type;
+      }
+      return _supertype = this.context.typeProvider.objectType;
+    } else if (_unlinkedClass != null) {
+      if (_unlinkedClass.supertype != null) {
+        DartType type = enclosingUnit.resynthesizerContext
+            .resolveTypeRef(this, _unlinkedClass.supertype);
+        if (_isInterfaceTypeClass(type)) {
+          _supertype = type;
         } else {
           _supertype = context.typeProvider.objectType;
         }
+      } else if (_unlinkedClass.hasNoSupertype) {
+        return null;
+      } else {
+        _supertype = context.typeProvider.objectType;
       }
     }
+
     return _supertype;
   }
 
@@ -1147,6 +1289,74 @@
     }).toList(growable: false);
   }
 
+  void _createPropertiesAndAccessors() {
+    assert(_accessors == null);
+    assert(_fields == null);
+
+    var context = enclosingUnit.linkedContext;
+    var accessorList = <PropertyAccessorElementImpl>[];
+    var fieldList = <FieldElementImpl>[];
+
+    var fields = context.getFields(linkedNode);
+    for (var field in fields) {
+      var name = field.name.name;
+      var fieldElement = FieldElementImpl.forLinkedNodeFactory(
+        this,
+        reference.getChild('@field').getChild(name),
+        field,
+      );
+      fieldList.add(fieldElement);
+
+      accessorList.add(fieldElement.getter);
+      if (fieldElement.setter != null) {
+        accessorList.add(fieldElement.setter);
+      }
+    }
+
+    var methods = context.getMethods(linkedNode);
+    for (var method in methods) {
+      var isGetter = method.isGetter;
+      var isSetter = method.isSetter;
+      if (!isGetter && !isSetter) continue;
+
+      var name = method.name.name;
+      var containerRef = isGetter
+          ? reference.getChild('@getter')
+          : reference.getChild('@setter');
+
+      var accessorElement = PropertyAccessorElementImpl.forLinkedNode(
+        this,
+        containerRef.getChild(name),
+        method,
+      );
+      accessorList.add(accessorElement);
+
+      var fieldRef = reference.getChild('@field').getChild(name);
+      FieldElementImpl field = fieldRef.element;
+      if (field == null) {
+        field = new FieldElementImpl(name, -1);
+        fieldRef.element = field;
+        field.enclosingElement = this;
+        field.isSynthetic = true;
+        field.isFinal = isGetter;
+        field.isStatic = accessorElement.isStatic;
+        fieldList.add(field);
+      } else {
+        field.isFinal = false;
+      }
+
+      accessorElement.variable = field;
+      if (isGetter) {
+        field.getter = accessorElement;
+      } else {
+        field.setter = accessorElement;
+      }
+    }
+
+    _accessors = accessorList;
+    _fields = fieldList;
+  }
+
   /// Return `true` if the given [type] is an [InterfaceType] that can be used
   /// as a class.
   bool _isInterfaceTypeClass(DartType type) {
@@ -1351,6 +1561,8 @@
   /// The unlinked representation of the part in the summary.
   final UnlinkedPart _unlinkedPart;
 
+  final LinkedUnitContext linkedContext;
+
   /// The source that corresponds to this compilation unit.
   @override
   Source source;
@@ -1412,31 +1624,47 @@
       : resynthesizerContext = null,
         _unlinkedUnit = null,
         _unlinkedPart = null,
+        linkedContext = null,
         super(null, -1);
 
+  CompilationUnitElementImpl.forLinkedNode(LibraryElementImpl enclosingLibrary,
+      this.linkedContext, Reference reference, CompilationUnit linkedNode)
+      : resynthesizerContext = null,
+        _unlinkedUnit = null,
+        _unlinkedPart = null,
+        super.forLinkedNode(enclosingLibrary, reference, linkedNode);
+
   /// Initialize using the given serialized information.
   CompilationUnitElementImpl.forSerialized(LibraryElementImpl enclosingLibrary,
       this.resynthesizerContext, this._unlinkedUnit, this._unlinkedPart)
-      : super.forSerialized(null) {
+      : linkedContext = null,
+        super.forSerialized(null) {
     _enclosingElement = enclosingLibrary;
     _nameOffset = -1;
   }
 
   @override
   List<PropertyAccessorElement> get accessors {
-    if (_accessors == null) {
-      if (_unlinkedUnit != null) {
-        _explicitTopLevelAccessors ??=
-            resynthesizerContext.buildTopLevelAccessors();
-        _explicitTopLevelVariables ??=
-            resynthesizerContext.buildTopLevelVariables();
-      }
-      if (_explicitTopLevelAccessors != null) {
-        _accessors = <PropertyAccessorElementImpl>[]
-          ..addAll(_explicitTopLevelAccessors.accessors)
-          ..addAll(_explicitTopLevelVariables.implicitAccessors);
-      }
+    if (_accessors != null) return _accessors;
+
+    if (linkedNode != null) {
+      _createPropertiesAndAccessors(this);
+      assert(_accessors != null);
+      return _accessors;
     }
+
+    if (_unlinkedUnit != null) {
+      _explicitTopLevelAccessors ??=
+          resynthesizerContext.buildTopLevelAccessors();
+      _explicitTopLevelVariables ??=
+          resynthesizerContext.buildTopLevelVariables();
+    }
+    if (_explicitTopLevelAccessors != null) {
+      _accessors = <PropertyAccessorElementImpl>[]
+        ..addAll(_explicitTopLevelAccessors.accessors)
+        ..addAll(_explicitTopLevelVariables.implicitAccessors);
+    }
+
     return _accessors ?? const <PropertyAccessorElement>[];
   }
 
@@ -1476,12 +1704,28 @@
 
   @override
   List<ClassElement> get enums {
+    if (_enums != null) return _enums;
+
+    if (linkedNode != null) {
+      var containerRef = reference.getChild('@enum');
+      CompilationUnit linkedNode = this.linkedNode;
+      _enums = linkedNode.declarations.whereType<EnumDeclaration>().map((node) {
+        var name = node.name.name;
+        var reference = containerRef.getChild(name);
+        if (reference.element == null) {
+          reference.node2 = node;
+          EnumElementImpl.forLinkedNode(this, reference, node);
+        }
+        return reference.element as EnumElementImpl;
+      }).toList();
+    }
+
     if (_unlinkedUnit != null) {
-      _enums ??= _unlinkedUnit.enums
+      return _enums = _unlinkedUnit.enums
           .map((e) => new EnumElementImpl.forSerialized(e, this))
           .toList(growable: false);
     }
-    return _enums ?? const <ClassElement>[];
+    return _enums ??= const <ClassElement>[];
   }
 
   /// Set the enums contained in this compilation unit to the given [enums].
@@ -1495,8 +1739,25 @@
 
   @override
   List<FunctionElement> get functions {
-    if (_unlinkedUnit != null) {
-      _functions ??= _unlinkedUnit.executables
+    if (_functions != null) return _functions;
+
+    if (linkedNode != null) {
+      CompilationUnit linkedNode = this.linkedNode;
+      var containerRef = reference.getChild('@function');
+      return _functions = linkedNode.declarations
+          .whereType<FunctionDeclaration>()
+          .where((node) => !node.isGetter && !node.isSetter)
+          .map((node) {
+        var name = node.name.name;
+        var reference = containerRef.getChild(name);
+        if (reference.element == null) {
+          reference.node2 = node;
+          FunctionElementImpl.forLinkedNode(this, reference, node);
+        }
+        return reference.element as FunctionElementImpl;
+      }).toList();
+    } else if (_unlinkedUnit != null) {
+      _functions = _unlinkedUnit.executables
           .where((e) => e.kind == UnlinkedExecutableKind.functionOrMethod)
           .map((e) => new FunctionElementImpl.forSerialized(e, this))
           .toList(growable: false);
@@ -1515,8 +1776,32 @@
 
   @override
   List<FunctionTypeAliasElement> get functionTypeAliases {
+    if (_typeAliases != null) return _typeAliases;
+
+    if (linkedNode != null) {
+      CompilationUnit linkedNode = this.linkedNode;
+      var containerRef = reference.getChild('@typeAlias');
+      return _typeAliases = linkedNode.declarations.where((node) {
+        return node is FunctionTypeAlias || node is GenericTypeAlias;
+      }).map((node) {
+        String name;
+        if (node is FunctionTypeAlias) {
+          name = node.name.name;
+        } else {
+          name = (node as GenericTypeAlias).name.name;
+        }
+
+        var reference = containerRef.getChild(name);
+        if (reference.element == null) {
+          reference.node2 = node;
+          GenericTypeAliasElementImpl.forLinkedNode(this, reference, node);
+        }
+        return reference.element as GenericTypeAliasElement;
+      }).toList();
+    }
+
     if (_unlinkedUnit != null) {
-      _typeAliases ??= _unlinkedUnit.typedefs.map((t) {
+      _typeAliases = _unlinkedUnit.typedefs.map((t) {
         return new GenericTypeAliasElementImpl.forSerialized(t, this);
       }).toList(growable: false);
     }
@@ -1557,8 +1842,25 @@
 
   @override
   List<ClassElement> get mixins {
+    if (_mixins != null) return _mixins;
+
+    if (linkedNode != null) {
+      CompilationUnit linkedNode = this.linkedNode;
+      var containerRef = reference.getChild('@class');
+      var declarations = linkedNode.declarations;
+      return _mixins = declarations.whereType<MixinDeclaration>().map((node) {
+        var name = node.name.name;
+        var reference = containerRef.getChild(name);
+        if (reference.element == null) {
+          reference.node2 = node;
+          MixinElementImpl.forLinkedNode(this, reference, node);
+        }
+        return reference.element as MixinElementImpl;
+      }).toList();
+    }
+
     if (_unlinkedUnit != null) {
-      _mixins ??= _unlinkedUnit.mixins
+      return _mixins = _unlinkedUnit.mixins
           .map((c) => new MixinElementImpl.forSerialized(c, this))
           .toList(growable: false);
     }
@@ -1576,6 +1878,12 @@
 
   @override
   List<TopLevelVariableElement> get topLevelVariables {
+    if (linkedNode != null) {
+      if (_variables != null) return _variables;
+      _createPropertiesAndAccessors(this);
+      assert(_variables != null);
+      return _variables;
+    }
     if (_variables == null) {
       if (_unlinkedUnit != null) {
         _explicitTopLevelAccessors ??=
@@ -1630,11 +1938,37 @@
 
   @override
   List<ClassElement> get types {
+    if (_types != null) return _types;
+
+    if (linkedNode != null) {
+      CompilationUnit linkedNode = this.linkedNode;
+      var containerRef = reference.getChild('@class');
+      _types = <ClassElement>[];
+      for (var node in linkedNode.declarations) {
+        String name;
+        if (node is ClassDeclaration) {
+          name = node.name.name;
+        } else if (node is ClassTypeAlias) {
+          name = node.name.name;
+        } else {
+          continue;
+        }
+        var reference = containerRef.getChild(name);
+        if (reference.element == null) {
+          reference.node2 = node;
+          ClassElementImpl.forLinkedNode(this, reference, node);
+        }
+        _types.add(reference.element);
+      }
+      return _types;
+    }
+
     if (_unlinkedUnit != null) {
-      _types ??= _unlinkedUnit.classes
+      return _types = _unlinkedUnit.classes
           .map((c) => new ClassElementImpl.forSerialized(c, this))
           .toList(growable: false);
     }
+
     return _types ?? const <ClassElement>[];
   }
 
@@ -1789,6 +2123,92 @@
     }
     return null;
   }
+
+  static void _createPropertiesAndAccessors(CompilationUnitElementImpl unit) {
+    if (unit._variables != null) return;
+    assert(unit._accessors == null);
+
+    var accessorMap =
+        <CompilationUnitElementImpl, List<PropertyAccessorElementImpl>>{};
+    var variableMap =
+        <CompilationUnitElementImpl, List<TopLevelVariableElementImpl>>{};
+
+    var units = unit.library.units;
+    for (CompilationUnitElementImpl unit in units) {
+      var context = unit.linkedContext;
+
+      var accessorList = <PropertyAccessorElementImpl>[];
+      accessorMap[unit] = accessorList;
+
+      var variableList = <TopLevelVariableElementImpl>[];
+      variableMap[unit] = variableList;
+
+      var unitNode = unit.linkedContext.unit_withDeclarations;
+      var unitDeclarations = unitNode.declarations;
+
+      var variables = context.topLevelVariables(unitNode);
+      for (var variable in variables) {
+        var name = variable.name.name;
+        var reference = unit.reference.getChild('@variable').getChild(name);
+        var variableElement = TopLevelVariableElementImpl.forLinkedNodeFactory(
+          unit,
+          reference,
+          variable,
+        );
+        variableList.add(variableElement);
+
+        accessorList.add(variableElement.getter);
+        if (variableElement.setter != null) {
+          accessorList.add(variableElement.setter);
+        }
+      }
+
+      for (var node in unitDeclarations) {
+        if (node is FunctionDeclaration) {
+          var isGetter = node.isGetter;
+          var isSetter = node.isSetter;
+          if (!isGetter && !isSetter) continue;
+
+          var name = node.name.name;
+          var containerRef = isGetter
+              ? unit.reference.getChild('@getter')
+              : unit.reference.getChild('@setter');
+
+          var accessorElement = PropertyAccessorElementImpl.forLinkedNode(
+            unit,
+            containerRef.getChild(name),
+            node,
+          );
+          accessorList.add(accessorElement);
+
+          var fieldRef = unit.reference.getChild('@field').getChild(name);
+          TopLevelVariableElementImpl field = fieldRef.element;
+          if (field == null) {
+            field = new TopLevelVariableElementImpl(name, -1);
+            fieldRef.element = field;
+            field.enclosingElement = unit;
+            field.isSynthetic = true;
+            field.isFinal = isGetter;
+            variableList.add(field);
+          } else {
+            field.isFinal = false;
+          }
+
+          accessorElement.variable = field;
+          if (isGetter) {
+            field.getter = accessorElement;
+          } else {
+            field.setter = accessorElement;
+          }
+        }
+      }
+    }
+
+    for (CompilationUnitElementImpl unit in units) {
+      unit._accessors = accessorMap[unit];
+      unit._variables = variableMap[unit];
+    }
+  }
 }
 
 /// A [FieldElement] for a 'const' or 'final' field that has an initializer.
@@ -1804,6 +2224,10 @@
   /// [name] and [offset].
   ConstFieldElementImpl(String name, int offset) : super(name, offset);
 
+  ConstFieldElementImpl.forLinkedNode(
+      ElementImpl enclosing, Reference reference, AstNode linkedNode)
+      : super.forLinkedNode(enclosing, reference, linkedNode);
+
   /// Initialize a newly created field element to have the given [name].
   ConstFieldElementImpl.forNode(Identifier name) : super.forNode(name);
 
@@ -1822,8 +2246,21 @@
       EnumElementImpl enumElement, this._unlinkedEnumValue, this._index)
       : super(enumElement);
 
+  ConstFieldElementImpl_EnumValue.forLinkedNode(EnumElementImpl enumElement,
+      Reference reference, AstNode linkedNode, this._index)
+      : _unlinkedEnumValue = null,
+        super.forLinkedNode(enumElement, reference, linkedNode);
+
+  @override
+  Expression get constantInitializer => null;
+
   @override
   String get documentationComment {
+    if (linkedNode != null) {
+      var context = enclosingUnit.linkedContext;
+      var comment = context.getDocumentationComment(linkedNode);
+      return getCommentNodeRawText(comment);
+    }
     if (_unlinkedEnumValue != null) {
       return _unlinkedEnumValue.documentationComment?.text;
     }
@@ -1855,6 +2292,9 @@
 
   @override
   String get name {
+    if (linkedNode != null) {
+      return reference.name;
+    }
     if (_unlinkedEnumValue != null) {
       return _unlinkedEnumValue.name;
     }
@@ -1863,9 +2303,14 @@
 
   @override
   int get nameOffset {
+    if (linkedNode != null) {
+      return enclosingUnit.linkedContext.getNameOffset(linkedNode);
+    }
     int offset = super.nameOffset;
-    if (offset == -1 && _unlinkedEnumValue != null) {
-      return _unlinkedEnumValue.nameOffset;
+    if (offset == -1) {
+      if (_unlinkedEnumValue != null) {
+        return _unlinkedEnumValue.nameOffset;
+      }
     }
     return offset;
   }
@@ -1917,6 +2362,10 @@
     enclosingElement = _enum;
   }
 
+  ConstFieldElementImpl_ofEnum.forLinkedNode(
+      this._enum, Reference reference, AstNode linkedNode)
+      : super.forLinkedNode(_enum, reference, linkedNode);
+
   @override
   void set evaluationResult(_) {
     assert(false);
@@ -1989,10 +2438,14 @@
   @override
   bool isConstantEvaluated = false;
 
-  /// Initialize a newly created constructor element to have the given [name
-  /// ] and[offset].
+  /// Initialize a newly created constructor element to have the given [name]
+  /// and [offset].
   ConstructorElementImpl(String name, int offset) : super(name, offset);
 
+  ConstructorElementImpl.forLinkedNode(ClassElementImpl enclosingClass,
+      Reference reference, ConstructorDeclaration linkedNode)
+      : super.forLinkedNode(enclosingClass, reference, linkedNode);
+
   /// Initialize a newly created constructor element to have the given [name].
   ConstructorElementImpl.forNode(Identifier name) : super.forNode(name);
 
@@ -2004,13 +2457,20 @@
   /// Return the constant initializers for this element, which will be empty if
   /// there are no initializers, or `null` if there was an error in the source.
   List<ConstructorInitializer> get constantInitializers {
-    if (_constantInitializers == null) {
-      if (serializedExecutable != null) {
-        _constantInitializers = serializedExecutable.constantInitializers
-            .map((i) => _buildConstructorInitializer(i))
-            .toList(growable: false);
-      }
+    if (_constantInitializers != null) return _constantInitializers;
+
+    if (linkedNode != null) {
+      return _constantInitializers = linkedContext.getConstructorInitializers(
+        linkedNode,
+      );
     }
+
+    if (serializedExecutable != null) {
+      return _constantInitializers = serializedExecutable.constantInitializers
+          .map((i) => _buildConstructorInitializer(i))
+          .toList(growable: false);
+    }
+
     return _constantInitializers;
   }
 
@@ -2021,6 +2481,14 @@
   }
 
   @override
+  String get displayName {
+    if (linkedNode != null) {
+      return reference.name;
+    }
+    return super.displayName;
+  }
+
+  @override
   ClassElementImpl get enclosingElement =>
       super.enclosingElement as ClassElementImpl;
 
@@ -2036,6 +2504,10 @@
 
   @override
   bool get isConst {
+    if (linkedNode != null) {
+      ConstructorDeclaration linkedNode = this.linkedNode;
+      return linkedNode.constKeyword != null;
+    }
     if (serializedExecutable != null) {
       return serializedExecutable.isConst;
     }
@@ -2082,6 +2554,10 @@
 
   @override
   bool get isFactory {
+    if (linkedNode != null) {
+      ConstructorDeclaration linkedNode = this.linkedNode;
+      return linkedNode.factoryKeyword != null;
+    }
     if (serializedExecutable != null) {
       return serializedExecutable.isFactory;
     }
@@ -2095,6 +2571,14 @@
   ElementKind get kind => ElementKind.CONSTRUCTOR;
 
   @override
+  String get name {
+    if (linkedNode != null) {
+      return reference.name;
+    }
+    return super.name;
+  }
+
+  @override
   int get nameEnd {
     if (serializedExecutable != null) {
       if (serializedExecutable.name.isNotEmpty) {
@@ -2128,22 +2612,39 @@
 
   @override
   ConstructorElement get redirectedConstructor {
-    if (_redirectedConstructor == null) {
-      if (serializedExecutable != null) {
-        if (serializedExecutable.isRedirectedConstructor) {
-          if (serializedExecutable.isFactory) {
-            _redirectedConstructor = enclosingUnit.resynthesizerContext
-                .resolveConstructorRef(enclosingElement,
-                    serializedExecutable.redirectedConstructor);
-          } else {
-            _redirectedConstructor = enclosingElement.getNamedConstructor(
-                serializedExecutable.redirectedConstructorName);
+    if (_redirectedConstructor != null) return _redirectedConstructor;
+
+    if (linkedNode != null) {
+      var context = enclosingUnit.linkedContext;
+      if (isFactory) {
+        var node = context.getConstructorRedirected(linkedNode);
+        return _redirectedConstructor = node?.staticElement;
+      } else {
+        var initializers = context.getConstructorInitializers(linkedNode);
+        for (var initializer in initializers) {
+          if (initializer is RedirectingConstructorInvocation) {
+            return _redirectedConstructor = initializer.staticElement;
           }
-        } else {
-          return null;
         }
       }
+      return null;
     }
+
+    if (serializedExecutable != null) {
+      if (serializedExecutable.isRedirectedConstructor) {
+        if (serializedExecutable.isFactory) {
+          _redirectedConstructor = enclosingUnit.resynthesizerContext
+              .resolveConstructorRef(
+                  enclosingElement, serializedExecutable.redirectedConstructor);
+        } else {
+          _redirectedConstructor = enclosingElement.getNamedConstructor(
+              serializedExecutable.redirectedConstructorName);
+        }
+      } else {
+        return null;
+      }
+    }
+
     return _redirectedConstructor;
   }
 
@@ -2269,6 +2770,10 @@
   ConstTopLevelVariableElementImpl(String name, int offset)
       : super(name, offset);
 
+  ConstTopLevelVariableElementImpl.forLinkedNode(
+      ElementImpl enclosing, Reference reference, AstNode linkedNode)
+      : super.forLinkedNode(enclosing, reference, linkedNode);
+
   /// Initialize a newly created top-level variable element to have the given
   /// [name].
   ConstTopLevelVariableElementImpl.forNode(Identifier name)
@@ -2302,11 +2807,16 @@
   EvaluationResultImpl _evaluationResult;
 
   Expression get constantInitializer {
-    if (_constantInitializer == null) {
-      if (_unlinkedConst != null) {
-        _constantInitializer = enclosingUnit.resynthesizerContext
-            .buildExpression(this, _unlinkedConst);
-      }
+    if (_constantInitializer != null) return _constantInitializer;
+
+    if (linkedNode != null) {
+      var context = enclosingUnit.linkedContext;
+      return _constantInitializer = context.readInitializer(this, linkedNode);
+    }
+
+    if (_unlinkedConst != null) {
+      _constantInitializer = enclosingUnit.resynthesizerContext
+          .buildExpression(this, _unlinkedConst);
     }
     return _constantInitializer;
   }
@@ -2351,6 +2861,10 @@
   DefaultFieldFormalParameterElementImpl(String name, int nameOffset)
       : super(name, nameOffset);
 
+  DefaultFieldFormalParameterElementImpl.forLinkedNode(
+      ElementImpl enclosing, Reference reference, AstNode linkedNode)
+      : super.forLinkedNode(enclosing, reference, linkedNode);
+
   /// Initialize a newly created parameter element to have the given [name].
   DefaultFieldFormalParameterElementImpl.forNode(Identifier name)
       : super.forNode(name);
@@ -2369,6 +2883,10 @@
   DefaultParameterElementImpl(String name, int nameOffset)
       : super(name, nameOffset);
 
+  DefaultParameterElementImpl.forLinkedNode(
+      ElementImpl enclosing, Reference reference, AstNode linkedNode)
+      : super.forLinkedNode(enclosing, reference, linkedNode);
+
   /// Initialize a newly created parameter element to have the given [name].
   DefaultParameterElementImpl.forNode(Identifier name) : super.forNode(name);
 
@@ -2432,6 +2950,10 @@
   /// literal.
   static String _LITERAL_VARIABLE_NAME = "literal";
 
+  /// The name of the top-level variable used to mark a type as having
+  /// "optional" type arguments.
+  static String _OPTIONAL_TYPE_ARGS_VARIABLE_NAME = "optionalTypeArgs";
+
   /// The name of the top-level variable used to mark a function as running
   /// a single test.
   static String _IS_TEST_VARIABLE_NAME = "isTest";
@@ -2581,6 +3103,12 @@
       element.library?.name == _META_LIB_NAME;
 
   @override
+  bool get isOptionalTypeArgs =>
+      element is PropertyAccessorElement &&
+      element.name == _OPTIONAL_TYPE_ARGS_VARIABLE_NAME &&
+      element.library?.name == _META_LIB_NAME;
+
+  @override
   bool get isOverride =>
       element is PropertyAccessorElement &&
       element.name == _OVERRIDE_VARIABLE_NAME &&
@@ -2661,6 +3189,9 @@
   /// root of the element structure.
   ElementImpl _enclosingElement;
 
+  Reference reference;
+  final AstNode linkedNode;
+
   /// The name of this element.
   String _name;
 
@@ -2692,8 +3223,16 @@
 
   /// Initialize a newly created element to have the given [name] at the given
   /// [_nameOffset].
-  ElementImpl(String name, this._nameOffset) {
+  ElementImpl(String name, this._nameOffset, {this.reference})
+      : linkedNode = null {
     this._name = StringUtilities.intern(name);
+    this.reference?.element = this;
+  }
+
+  /// Initialize from linked node.
+  ElementImpl.forLinkedNode(
+      this._enclosingElement, this.reference, this.linkedNode) {
+    reference?.element = this;
   }
 
   /// Initialize a newly created element to have the given [name].
@@ -2701,7 +3240,9 @@
       : this(name == null ? "" : name.name, name == null ? -1 : name.offset);
 
   /// Initialize from serialized information.
-  ElementImpl.forSerialized(this._enclosingElement);
+  ElementImpl.forSerialized(this._enclosingElement)
+      : reference = null,
+        linkedNode = null;
 
   /// The length of the element's code, or `null` if the element is synthetic.
   int get codeLength => _codeLength;
@@ -2839,6 +3380,18 @@
   }
 
   @override
+  bool get hasOptionalTypeArgs {
+    var metadata = this.metadata;
+    for (var i = 0; i < metadata.length; i++) {
+      var annotation = metadata[i];
+      if (annotation.isOptionalTypeArgs) {
+        return true;
+      }
+    }
+    return false;
+  }
+
+  @override
   bool get hasOverride {
     var metadata = this.metadata;
     for (var i = 0; i < metadata.length; i++) {
@@ -2951,7 +3504,12 @@
   bool get isResynthesized => enclosingUnit?.resynthesizerContext != null;
 
   @override
-  bool get isSynthetic => hasModifier(Modifier.SYNTHETIC);
+  bool get isSynthetic {
+    if (linkedNode != null) {
+      return linkedNode.isSynthetic;
+    }
+    return hasModifier(Modifier.SYNTHETIC);
+  }
 
   /// Set whether this element is synthetic.
   void set isSynthetic(bool isSynthetic) {
@@ -2968,6 +3526,10 @@
   @override
   Source get librarySource => library?.source;
 
+  LinkedUnitContext get linkedContext {
+    return _enclosingElement.linkedContext;
+  }
+
   @override
   ElementLocation get location {
     if (_cachedLocation == null) {
@@ -2980,6 +3542,11 @@
   }
 
   List<ElementAnnotation> get metadata {
+    if (linkedNode != null) {
+      if (_metadata != null) return _metadata;
+      var metadata = linkedContext.getMetadata(linkedNode);
+      return _metadata = _buildAnnotations2(enclosingUnit, metadata);
+    }
     return _metadata ?? const <ElementAnnotation>[];
   }
 
@@ -3189,6 +3756,23 @@
     }
   }
 
+  /// Return annotations for the given [nodeList] in the [unit].
+  List<ElementAnnotation> _buildAnnotations2(
+      CompilationUnitElementImpl unit, List<Annotation> nodeList) {
+    var length = nodeList.length;
+    if (length == 0) {
+      return const <ElementAnnotation>[];
+    }
+
+    var annotations = new List<ElementAnnotation>(length);
+    for (int i = 0; i < length; i++) {
+      var ast = nodeList[i];
+      annotations[i] = ElementAnnotationImpl(enclosingUnit)
+        ..annotationAst = ast;
+    }
+    return annotations;
+  }
+
   /// If the element associated with the given [type] is a generic function type
   /// element, then make it a child of this element. Return the [type] as a
   /// convenience.
@@ -3375,6 +3959,11 @@
       : _unlinkedEnum = null,
         super(name, offset);
 
+  EnumElementImpl.forLinkedNode(CompilationUnitElementImpl enclosing,
+      Reference reference, EnumDeclaration linkedNode)
+      : _unlinkedEnum = null,
+        super.forLinkedNode(enclosing, reference, linkedNode);
+
   /// Initialize a newly created class element to have the given [name].
   EnumElementImpl.forNode(Identifier name)
       : _unlinkedEnum = null,
@@ -3393,6 +3982,9 @@
   @override
   List<PropertyAccessorElement> get accessors {
     if (_accessors == null) {
+      if (linkedNode != null) {
+        _resynthesizeMembers2();
+      }
       if (_unlinkedEnum != null) {
         _resynthesizeMembers();
       }
@@ -3411,6 +4003,9 @@
 
   @override
   int get codeLength {
+    if (linkedNode != null) {
+      return linkedContext.getCodeLength(linkedNode);
+    }
     if (_unlinkedEnum != null) {
       return _unlinkedEnum.codeRange?.length;
     }
@@ -3419,6 +4014,9 @@
 
   @override
   int get codeOffset {
+    if (linkedNode != null) {
+      return linkedContext.getCodeOffset(linkedNode);
+    }
     if (_unlinkedEnum != null) {
       return _unlinkedEnum.codeRange?.offset;
     }
@@ -3436,6 +4034,11 @@
 
   @override
   String get documentationComment {
+    if (linkedNode != null) {
+      var context = enclosingUnit.linkedContext;
+      var comment = context.getDocumentationComment(linkedNode);
+      return getCommentNodeRawText(comment);
+    }
     if (_unlinkedEnum != null) {
       return _unlinkedEnum.documentationComment?.text;
     }
@@ -3445,6 +4048,9 @@
   @override
   List<FieldElement> get fields {
     if (_fields == null) {
+      if (linkedNode != null) {
+        _resynthesizeMembers2();
+      }
       if (_unlinkedEnum != null) {
         _resynthesizeMembers();
       }
@@ -3503,6 +4109,9 @@
   @override
   List<MethodElement> get methods {
     if (_methods == null) {
+      if (linkedNode != null) {
+        _resynthesizeMembers2();
+      }
       if (_unlinkedEnum != null) {
         _resynthesizeMembers();
       }
@@ -3515,6 +4124,9 @@
 
   @override
   String get name {
+    if (linkedNode != null) {
+      return reference.name;
+    }
     if (_unlinkedEnum != null) {
       return _unlinkedEnum.name;
     }
@@ -3565,11 +4177,14 @@
   void createToStringMethodElement() {
     var method = new MethodElementImpl('toString', -1);
     method.isSynthetic = true;
-    if (_unlinkedEnum != null) {
+    if (linkedNode != null || _unlinkedEnum != null) {
       method.returnType = context.typeProvider.stringType;
       method.type = new FunctionTypeImpl(method);
     }
     method.enclosingElement = this;
+    if (linkedNode != null) {
+      method.reference = reference.getChild('@method').getChild('toString');
+    }
     _methods = <MethodElement>[method];
   }
 
@@ -3604,6 +4219,50 @@
         .toList(growable: false);
     createToStringMethodElement();
   }
+
+  void _resynthesizeMembers2() {
+    var fields = <FieldElementImpl>[];
+    var getters = <PropertyAccessorElementImpl>[];
+
+    // Build the 'index' field.
+    {
+      var field = FieldElementImpl('index', -1)
+        ..enclosingElement = this
+        ..isSynthetic = true
+        ..isFinal = true
+        ..type = context.typeProvider.intType;
+      fields.add(field);
+      getters.add(PropertyAccessorElementImpl_ImplicitGetter(field,
+          reference: reference.getChild('@getter').getChild('index'))
+        ..enclosingElement = this);
+    }
+
+    // Build the 'values' field.
+    {
+      var field = ConstFieldElementImpl_EnumValues(this);
+      fields.add(field);
+      getters.add(PropertyAccessorElementImpl_ImplicitGetter(field,
+          reference: reference.getChild('@getter').getChild('values'))
+        ..enclosingElement = this);
+    }
+
+    // Build fields for all enum constants.
+    var containerRef = this.reference.getChild('@constant');
+    var constants = linkedContext.getEnumConstants(linkedNode);
+    for (var i = 0; i < constants.length; ++i) {
+      var constant = constants[i];
+      var name = constant.name.name;
+      var reference = containerRef.getChild(name);
+      var field = new ConstFieldElementImpl_EnumValue.forLinkedNode(
+          this, reference, constant, i);
+      fields.add(field);
+      getters.add(field.getter);
+    }
+
+    _fields = fields;
+    _accessors = getters;
+    createToStringMethodElement();
+  }
 }
 
 /// A base class for concrete implementations of an [ExecutableElement].
@@ -3628,9 +4287,17 @@
 
   /// Initialize a newly created executable element to have the given [name] and
   /// [offset].
-  ExecutableElementImpl(String name, int offset)
+  ExecutableElementImpl(String name, int offset, {Reference reference})
       : serializedExecutable = null,
-        super(name, offset);
+        super(name, offset, reference: reference);
+
+  /// Initialize using the given linked node.
+  ExecutableElementImpl.forLinkedNode(
+      ElementImpl enclosing, Reference reference, AstNode linkedNode)
+      : serializedExecutable = null,
+        super.forLinkedNode(enclosing, reference, linkedNode) {
+    reference.element = this;
+  }
 
   /// Initialize a newly created executable element to have the given [name].
   ExecutableElementImpl.forNode(Identifier name)
@@ -3650,6 +4317,9 @@
 
   @override
   int get codeLength {
+    if (linkedNode != null) {
+      return linkedContext.getCodeLength(linkedNode);
+    }
     if (serializedExecutable != null) {
       return serializedExecutable.codeRange?.length;
     }
@@ -3658,6 +4328,9 @@
 
   @override
   int get codeOffset {
+    if (linkedNode != null) {
+      return linkedContext.getCodeOffset(linkedNode);
+    }
     if (serializedExecutable != null) {
       return serializedExecutable.codeRange?.offset;
     }
@@ -3671,6 +4344,9 @@
 
   @override
   String get displayName {
+    if (linkedNode != null) {
+      return reference.name;
+    }
     if (serializedExecutable != null) {
       return serializedExecutable.name;
     }
@@ -3679,6 +4355,11 @@
 
   @override
   String get documentationComment {
+    if (linkedNode != null) {
+      var context = enclosingUnit.linkedContext;
+      var comment = context.getDocumentationComment(linkedNode);
+      return getCommentNodeRawText(comment);
+    }
     if (serializedExecutable != null) {
       return serializedExecutable.documentationComment?.text;
     }
@@ -3699,6 +4380,9 @@
 
   @override
   bool get hasImplicitReturnType {
+    if (linkedNode != null) {
+      return linkedContext.hasImplicitReturnType(linkedNode);
+    }
     if (serializedExecutable != null) {
       return serializedExecutable.returnType == null &&
           serializedExecutable.kind != UnlinkedExecutableKind.constructor;
@@ -3714,6 +4398,9 @@
 
   @override
   bool get isAbstract {
+    if (linkedNode != null) {
+      return !isExternal && enclosingUnit.linkedContext.isAbstract(linkedNode);
+    }
     if (serializedExecutable != null) {
       return serializedExecutable.isAbstract;
     }
@@ -3722,6 +4409,9 @@
 
   @override
   bool get isAsynchronous {
+    if (linkedNode != null) {
+      return enclosingUnit.linkedContext.isAsynchronous(linkedNode);
+    }
     if (serializedExecutable != null) {
       return serializedExecutable.isAsynchronous;
     }
@@ -3730,6 +4420,9 @@
 
   @override
   bool get isExternal {
+    if (linkedNode != null) {
+      return enclosingUnit.linkedContext.isExternal(linkedNode);
+    }
     if (serializedExecutable != null) {
       return serializedExecutable.isExternal;
     }
@@ -3738,6 +4431,9 @@
 
   @override
   bool get isGenerator {
+    if (linkedNode != null) {
+      return enclosingUnit.linkedContext.isGenerator(linkedNode);
+    }
     if (serializedExecutable != null) {
       return serializedExecutable.isGenerator;
     }
@@ -3761,6 +4457,9 @@
 
   @override
   String get name {
+    if (linkedNode != null) {
+      return reference.name;
+    }
     if (serializedExecutable != null) {
       return serializedExecutable.name;
     }
@@ -3769,6 +4468,10 @@
 
   @override
   int get nameOffset {
+    if (linkedNode != null) {
+      return enclosingUnit.linkedContext.getNameOffset(linkedNode);
+    }
+
     int offset = super.nameOffset;
     if (offset == 0 && serializedExecutable != null) {
       return serializedExecutable.nameOffset;
@@ -3778,13 +4481,26 @@
 
   @override
   List<ParameterElement> get parameters {
-    if (_parameters == null) {
-      if (serializedExecutable != null) {
-        _parameters = ParameterElementImpl.resynthesizeList(
-            serializedExecutable.parameters, this);
-      }
+    if (_parameters != null) return _parameters;
+
+    if (linkedNode != null) {
+      var context = enclosingUnit.linkedContext;
+      var containerRef = reference.getChild('@parameter');
+      var formalParameters = context.getFormalParameters(linkedNode);
+      _parameters = ParameterElementImpl.forLinkedNodeList(
+        this,
+        context,
+        containerRef,
+        formalParameters,
+      );
     }
-    return _parameters ?? const <ParameterElement>[];
+
+    if (serializedExecutable != null) {
+      _parameters = ParameterElementImpl.resynthesizeList(
+          serializedExecutable.parameters, this);
+    }
+
+    return _parameters ??= const <ParameterElement>[];
   }
 
   /// Set the parameters defined by this executable element to the given
@@ -3799,6 +4515,11 @@
 
   @override
   DartType get returnType {
+    if (linkedNode != null) {
+      if (_returnType != null) return _returnType;
+      var context = enclosingUnit.linkedContext;
+      return _returnType = context.getReturnType(linkedNode);
+    }
     if (serializedExecutable != null &&
         _declaredReturnType == null &&
         _returnType == null) {
@@ -3814,14 +4535,20 @@
   }
 
   void set returnType(DartType returnType) {
+    if (linkedNode != null) {
+      linkedContext.setReturnType(linkedNode, returnType);
+    }
     _assertNotResynthesized(serializedExecutable);
     _returnType = _checkElementOfType(returnType);
   }
 
   @override
   FunctionType get type {
+    if (linkedNode != null) {
+      return _type ??= new FunctionTypeImpl(this);
+    }
     if (serializedExecutable != null) {
-      _type ??= new FunctionTypeImpl(this);
+      return _type ??= new FunctionTypeImpl(this);
     }
     return _type;
   }
@@ -3943,6 +4670,12 @@
         _unlinkedExportNonPublic = null,
         super(null, offset);
 
+  ExportElementImpl.forLinkedNode(
+      LibraryElementImpl enclosing, ExportDirective linkedNode)
+      : _unlinkedExportPublic = null,
+        _unlinkedExportNonPublic = null,
+        super.forLinkedNode(enclosing, null, linkedNode);
+
   /// Initialize using the given serialized information.
   ExportElementImpl.forSerialized(this._unlinkedExportPublic,
       this._unlinkedExportNonPublic, LibraryElementImpl enclosingLibrary)
@@ -3950,12 +4683,21 @@
 
   @override
   List<NamespaceCombinator> get combinators {
-    if (_combinators == null) {
-      if (_unlinkedExportPublic != null) {
-        _combinators = ImportElementImpl._buildCombinators(
-            _unlinkedExportPublic.combinators);
-      }
+    if (_combinators != null) return _combinators;
+
+    if (linkedNode != null) {
+      ExportDirective node = linkedNode;
+      return _combinators = ImportElementImpl._buildCombinators2(
+        enclosingUnit.linkedContext,
+        node.combinators,
+      );
     }
+
+    if (_unlinkedExportPublic != null) {
+      return _combinators = ImportElementImpl._buildCombinators(
+          _unlinkedExportPublic.combinators);
+    }
+
     return _combinators ?? const <NamespaceCombinator>[];
   }
 
@@ -3965,14 +4707,24 @@
   }
 
   @override
+  CompilationUnitElementImpl get enclosingUnit {
+    LibraryElementImpl enclosingLibrary = enclosingElement;
+    return enclosingLibrary._definingCompilationUnit;
+  }
+
+  @override
   LibraryElement get exportedLibrary {
-    if (_exportedLibrary == null) {
-      if (_unlinkedExportNonPublic != null) {
-        LibraryElementImpl library = enclosingElement as LibraryElementImpl;
-        _exportedLibrary =
-            library.resynthesizerContext.buildExportedLibrary(uri);
-      }
+    if (_exportedLibrary != null) return _exportedLibrary;
+
+    if (linkedNode != null) {
+      return _exportedLibrary = linkedContext.directiveLibrary(linkedNode);
     }
+
+    if (_unlinkedExportNonPublic != null) {
+      LibraryElementImpl library = enclosingElement as LibraryElementImpl;
+      _exportedLibrary = library.resynthesizerContext.buildExportedLibrary(uri);
+    }
+
     return _exportedLibrary;
   }
 
@@ -4072,6 +4824,39 @@
   /// [name] at the given [offset].
   FieldElementImpl(String name, int offset) : super(name, offset);
 
+  FieldElementImpl.forLinkedNode(
+      ElementImpl enclosing, Reference reference, AstNode linkedNode)
+      : super.forLinkedNode(enclosing, reference, linkedNode) {
+    if (!linkedNode.isSynthetic) {
+      var enclosingRef = enclosing.reference;
+
+      this.getter = PropertyAccessorElementImpl_ImplicitGetter(
+        this,
+        reference: enclosingRef.getChild('@getter').getChild(name),
+      );
+
+      if (!isConst && !isFinal) {
+        this.setter = PropertyAccessorElementImpl_ImplicitSetter(
+          this,
+          reference: enclosingRef.getChild('@setter').getChild(name),
+        );
+      }
+    }
+  }
+
+  factory FieldElementImpl.forLinkedNodeFactory(
+      ClassElementImpl enclosing, Reference reference, AstNode linkedNode) {
+    var context = enclosing.enclosingUnit.linkedContext;
+    if (context.shouldBeConstFieldElement(linkedNode)) {
+      return ConstFieldElementImpl.forLinkedNode(
+        enclosing,
+        reference,
+        linkedNode,
+      );
+    }
+    return FieldElementImpl.forLinkedNode(enclosing, reference, linkedNode);
+  }
+
   /// Initialize a newly created field element to have the given [name].
   FieldElementImpl.forNode(Identifier name) : super.forNode(name);
 
@@ -4101,9 +4886,14 @@
 
   @override
   bool get isCovariant {
+    if (linkedNode != null) {
+      return linkedContext.isCovariant(linkedNode);
+    }
+
     if (_unlinkedVariable != null) {
       return _unlinkedVariable.isCovariant;
     }
+
     return hasModifier(Modifier.COVARIANT);
   }
 
@@ -4118,7 +4908,21 @@
       enclosingElement != null && enclosingElement.isEnum && !isSynthetic;
 
   @override
+  bool get isLazy {
+//    if (linkedNode != null) {
+//      return enclosingUnit.linkedContext.isLazy(linkedNode);
+//    }
+//    if (_unlinkedVariable != null) {
+//      return _unlinkedVariable.isLazy;
+//    }
+    return hasModifier(Modifier.LAZY);
+  }
+
+  @override
   bool get isStatic {
+    if (linkedNode != null) {
+      return enclosingUnit.linkedContext.isStatic(linkedNode);
+    }
     if (_unlinkedVariable != null) {
       return _unlinkedVariable.isStatic;
     }
@@ -4164,6 +4968,10 @@
   FieldFormalParameterElementImpl(String name, int nameOffset)
       : super(name, nameOffset);
 
+  FieldFormalParameterElementImpl.forLinkedNode(
+      ElementImpl enclosing, Reference reference, AstNode linkedNode)
+      : super.forLinkedNode(enclosing, reference, linkedNode);
+
   /// Initialize a newly created parameter element to have the given [name].
   FieldFormalParameterElementImpl.forNode(Identifier name)
       : super.forNode(name);
@@ -4240,6 +5048,10 @@
   /// [offset].
   FunctionElementImpl(String name, int offset) : super(name, offset);
 
+  FunctionElementImpl.forLinkedNode(ElementImpl enclosing, Reference reference,
+      FunctionDeclaration linkedNode)
+      : super.forLinkedNode(enclosing, reference, linkedNode);
+
   /// Initialize a newly created function element to have the given [name].
   FunctionElementImpl.forNode(Identifier name) : super.forNode(name);
 
@@ -4265,6 +5077,14 @@
   }
 
   @override
+  String get displayName {
+    if (linkedNode != null) {
+      return reference.name;
+    }
+    return super.displayName;
+  }
+
+  @override
   TypeParameterizedElementMixin get enclosingTypeParameterContext {
     return (enclosingElement as ElementImpl).typeParameterContext;
   }
@@ -4291,6 +5111,14 @@
   ElementKind get kind => ElementKind.FUNCTION;
 
   @override
+  String get name {
+    if (linkedNode != null) {
+      return reference.name;
+    }
+    return super.name;
+  }
+
+  @override
   SourceRange get visibleRange {
     if (serializedExecutable != null) {
       if (serializedExecutable.visibleLength == 0) {
@@ -4458,6 +5286,10 @@
   /// The type defined by this element.
   FunctionType _type;
 
+  GenericFunctionTypeElementImpl.forLinkedNode(
+      ElementImpl enclosingElement, Reference reference, AstNode linkedNode)
+      : super.forLinkedNode(enclosingElement, reference, linkedNode);
+
   /// Initialize a newly created function element to have no name and the given
   /// [nameOffset]. This is used for function expressions, that have no name.
   GenericFunctionTypeElementImpl.forOffset(int nameOffset)
@@ -4482,6 +5314,15 @@
   @override
   List<ParameterElement> get parameters {
     if (_parameters == null) {
+      if (linkedNode != null) {
+        var context = enclosingUnit.linkedContext;
+        return _parameters = ParameterElementImpl.forLinkedNodeList(
+          this,
+          context,
+          reference.getChild('@parameter'),
+          context.getFormalParameters(linkedNode),
+        );
+      }
       if (_entityRef != null) {
         _parameters = ParameterElementImpl.resynthesizeList(
             _entityRef.syntheticParams, this);
@@ -4503,6 +5344,10 @@
   @override
   DartType get returnType {
     if (_returnType == null) {
+      if (linkedNode != null) {
+        var context = enclosingUnit.linkedContext;
+        return _returnType = context.getReturnType(linkedNode);
+      }
       if (_entityRef != null) {
         _returnType = enclosingUnit.resynthesizerContext.resolveTypeRef(
             this, _entityRef.syntheticReturnType,
@@ -4532,6 +5377,16 @@
     _type = type;
   }
 
+  @override
+  List<TypeParameterElement> get typeParameters {
+    if (linkedNode != null) {
+      if (linkedNode is FunctionTypeAlias) {
+        return const <TypeParameterElement>[];
+      }
+    }
+    return super.typeParameters;
+  }
+
   /// Set the type parameters defined by this function type element to the given
   /// [typeParameters].
   void set typeParameters(List<TypeParameterElement> typeParameters) {
@@ -4612,6 +5467,13 @@
       : _unlinkedTypedef = null,
         super(name, offset);
 
+  GenericTypeAliasElementImpl.forLinkedNode(
+      CompilationUnitElementImpl enclosingUnit,
+      Reference reference,
+      AstNode linkedNode)
+      : _unlinkedTypedef = null,
+        super.forLinkedNode(enclosingUnit, reference, linkedNode);
+
   /// Initialize a newly created type alias element to have the given [name].
   GenericTypeAliasElementImpl.forNode(Identifier name)
       : _unlinkedTypedef = null,
@@ -4624,6 +5486,9 @@
 
   @override
   int get codeLength {
+    if (linkedNode != null) {
+      return linkedContext.getCodeLength(linkedNode);
+    }
     if (_unlinkedTypedef != null) {
       return _unlinkedTypedef.codeRange?.length;
     }
@@ -4632,6 +5497,9 @@
 
   @override
   int get codeOffset {
+    if (linkedNode != null) {
+      return linkedContext.getCodeOffset(linkedNode);
+    }
     if (_unlinkedTypedef != null) {
       return _unlinkedTypedef.codeRange?.offset;
     }
@@ -4643,6 +5511,11 @@
 
   @override
   String get documentationComment {
+    if (linkedNode != null) {
+      var context = enclosingUnit.linkedContext;
+      var comment = context.getDocumentationComment(linkedNode);
+      return getCommentNodeRawText(comment);
+    }
     if (_unlinkedTypedef != null) {
       return _unlinkedTypedef.documentationComment?.text;
     }
@@ -4662,31 +5535,48 @@
 
   @override
   GenericFunctionTypeElementImpl get function {
-    if (_function == null) {
-      if (_unlinkedTypedef != null) {
-        if (_unlinkedTypedef.style == TypedefStyle.genericFunctionType) {
-          DartType type = enclosingUnit.resynthesizerContext.resolveTypeRef(
-              this, _unlinkedTypedef.returnType,
-              declaredType: true);
-          if (type is FunctionType) {
-            Element element = type.element;
-            if (element is GenericFunctionTypeElement) {
-              (element as GenericFunctionTypeElementImpl).enclosingElement =
-                  this;
-              _function = element;
-            }
-          }
-        } else {
-          _function = new GenericFunctionTypeElementImpl.forOffset(-1);
-          _function.enclosingElement = this;
-          _function.returnType = enclosingUnit.resynthesizerContext
-              .resolveTypeRef(_function, _unlinkedTypedef.returnType,
-                  declaredType: true);
-          _function.parameters = ParameterElementImpl.resynthesizeList(
-              _unlinkedTypedef.parameters, _function);
-        }
+    if (_function != null) return _function;
+
+    if (linkedNode != null) {
+      if (linkedNode is GenericTypeAlias) {
+        var context = enclosingUnit.linkedContext;
+        return _function = GenericFunctionTypeElementImpl.forLinkedNode(
+          this,
+          reference.getChild('@function'),
+          context.getGeneticTypeAliasFunction(linkedNode),
+        );
+      } else {
+        return _function = GenericFunctionTypeElementImpl.forLinkedNode(
+          this,
+          reference.getChild('@function'),
+          linkedNode,
+        );
       }
     }
+
+    if (_unlinkedTypedef != null) {
+      if (_unlinkedTypedef.style == TypedefStyle.genericFunctionType) {
+        DartType type = enclosingUnit.resynthesizerContext.resolveTypeRef(
+            this, _unlinkedTypedef.returnType,
+            declaredType: true);
+        if (type is FunctionType) {
+          Element element = type.element;
+          if (element is GenericFunctionTypeElement) {
+            (element as GenericFunctionTypeElementImpl).enclosingElement = this;
+            _function = element;
+          }
+        }
+      } else {
+        _function = new GenericFunctionTypeElementImpl.forOffset(-1);
+        _function.enclosingElement = this;
+        _function.returnType = enclosingUnit.resynthesizerContext
+            .resolveTypeRef(_function, _unlinkedTypedef.returnType,
+                declaredType: true);
+        _function.parameters = ParameterElementImpl.resynthesizeList(
+            _unlinkedTypedef.parameters, _function);
+      }
+    }
+
     return _function;
   }
 
@@ -4701,6 +5591,14 @@
   }
 
   @override
+  bool get isSimplyBounded {
+    if (linkedNode != null) {
+      return linkedContext.isSimplyBounded(linkedNode);
+    }
+    return super.isSimplyBounded;
+  }
+
+  @override
   ElementKind get kind => ElementKind.FUNCTION_TYPE_ALIAS;
 
   @override
@@ -4714,6 +5612,9 @@
 
   @override
   String get name {
+    if (linkedNode != null) {
+      return reference.name;
+    }
     if (_unlinkedTypedef != null) {
       return _unlinkedTypedef.name;
     }
@@ -4857,20 +5758,38 @@
   /// The unlinked representation of the combinator in the summary.
   final UnlinkedCombinator _unlinkedCombinator;
 
+  final LinkedUnitContext linkedContext;
+  final HideCombinator linkedNode;
+
   /// The names that are not to be made visible in the importing library even if
   /// they are defined in the imported library.
   List<String> _hiddenNames;
 
-  HideElementCombinatorImpl() : _unlinkedCombinator = null;
+  HideElementCombinatorImpl()
+      : _unlinkedCombinator = null,
+        linkedContext = null,
+        linkedNode = null;
+
+  HideElementCombinatorImpl.forLinkedNode(this.linkedContext, this.linkedNode)
+      : _unlinkedCombinator = null;
 
   /// Initialize using the given serialized information.
-  HideElementCombinatorImpl.forSerialized(this._unlinkedCombinator);
+  HideElementCombinatorImpl.forSerialized(this._unlinkedCombinator)
+      : linkedContext = null,
+        linkedNode = null;
 
   @override
   List<String> get hiddenNames {
-    if (_unlinkedCombinator != null) {
-      _hiddenNames ??= _unlinkedCombinator.hides.toList(growable: false);
+    if (_hiddenNames != null) return _hiddenNames;
+
+    if (linkedNode != null) {
+      return _hiddenNames = linkedNode.hiddenNames.map((i) => i.name).toList();
     }
+
+    if (_unlinkedCombinator != null) {
+      return _hiddenNames = _unlinkedCombinator.hides.toList(growable: false);
+    }
+
     return _hiddenNames ?? const <String>[];
   }
 
@@ -4931,6 +5850,12 @@
         _linkedDependency = null,
         super(null, offset);
 
+  ImportElementImpl.forLinkedNode(
+      LibraryElementImpl enclosing, ImportDirective linkedNode)
+      : _unlinkedImport = null,
+        _linkedDependency = null,
+        super.forLinkedNode(enclosing, null, linkedNode);
+
   /// Initialize using the given serialized information.
   ImportElementImpl.forSerialized(this._unlinkedImport, this._linkedDependency,
       LibraryElementImpl enclosingLibrary)
@@ -4938,11 +5863,20 @@
 
   @override
   List<NamespaceCombinator> get combinators {
-    if (_combinators == null) {
-      if (_unlinkedImport != null) {
-        _combinators = _buildCombinators(_unlinkedImport.combinators);
-      }
+    if (_combinators != null) return _combinators;
+
+    if (linkedNode != null) {
+      ImportDirective node = linkedNode;
+      return _combinators = ImportElementImpl._buildCombinators2(
+        enclosingUnit.linkedContext,
+        node.combinators,
+      );
     }
+
+    if (_unlinkedImport != null) {
+      return _combinators = _buildCombinators(_unlinkedImport.combinators);
+    }
+
     return _combinators ?? const <NamespaceCombinator>[];
   }
 
@@ -4958,10 +5892,22 @@
   }
 
   @override
+  CompilationUnitElementImpl get enclosingUnit {
+    LibraryElementImpl enclosingLibrary = enclosingElement;
+    return enclosingLibrary._definingCompilationUnit;
+  }
+
+  @override
   String get identifier => "${importedLibrary.identifier}@$nameOffset";
 
   @override
   LibraryElement get importedLibrary {
+    if (_importedLibrary != null) return _importedLibrary;
+
+    if (linkedNode != null) {
+      return _importedLibrary = linkedContext.directiveLibrary(linkedNode);
+    }
+
     if (_linkedDependency != null) {
       if (_importedLibrary == null) {
         LibraryElementImpl library = enclosingElement as LibraryElementImpl;
@@ -4973,6 +5919,7 @@
         }
       }
     }
+
     return _importedLibrary;
   }
 
@@ -4983,6 +5930,10 @@
 
   @override
   bool get isDeferred {
+    if (linkedNode != null) {
+      ImportDirective linkedNode = this.linkedNode;
+      return linkedNode.deferredKeyword != null;
+    }
     if (_unlinkedImport != null) {
       return _unlinkedImport.isDeferred;
     }
@@ -5035,12 +5986,27 @@
   }
 
   PrefixElement get prefix {
-    if (_prefix == null) {
-      if (_unlinkedImport != null && _unlinkedImport.prefixReference != 0) {
-        LibraryElementImpl library = enclosingElement as LibraryElementImpl;
-        _prefix = new PrefixElementImpl.forSerialized(_unlinkedImport, library);
+    if (_prefix != null) return _prefix;
+
+    if (linkedNode != null) {
+      ImportDirective linkedNode = this.linkedNode;
+      var prefix = linkedNode.prefix;
+      if (prefix != null) {
+        var name = prefix.name;
+        var library = enclosingElement as LibraryElementImpl;
+        _prefix = new PrefixElementImpl.forLinkedNode(
+          library,
+          library.reference.getChild('@prefix').getChild(name),
+          prefix,
+        );
       }
     }
+
+    if (_unlinkedImport != null && _unlinkedImport.prefixReference != 0) {
+      LibraryElementImpl library = enclosingElement as LibraryElementImpl;
+      _prefix = new PrefixElementImpl.forSerialized(_unlinkedImport, library);
+    }
+
     return _prefix;
   }
 
@@ -5146,6 +6112,19 @@
       return const <NamespaceCombinator>[];
     }
   }
+
+  static List<NamespaceCombinator> _buildCombinators2(
+      LinkedUnitContext context, List<Combinator> combinators) {
+    return combinators.map((node) {
+      if (node is HideCombinator) {
+        return HideElementCombinatorImpl.forLinkedNode(context, node);
+      }
+      if (node is ShowCombinator) {
+        return ShowElementCombinatorImpl.forLinkedNode(context, node);
+      }
+      throw UnimplementedError('${node.runtimeType}');
+    }).toList();
+  }
 }
 
 /// A concrete implementation of a [LabelElement].
@@ -5209,6 +6188,9 @@
 
   final UnlinkedUnit unlinkedDefiningUnit;
 
+  /// The context of the defining unit.
+  final LinkedUnitContext linkedContext;
+
   /// The compilation unit that defines this library.
   CompilationUnitElement _definingCompilationUnit;
 
@@ -5263,14 +6245,32 @@
       this.context, this.session, String name, int offset, this.nameLength)
       : resynthesizerContext = null,
         unlinkedDefiningUnit = null,
+        linkedContext = null,
         super(name, offset);
 
+  LibraryElementImpl.forLinkedNode(
+      this.context,
+      this.session,
+      String name,
+      int offset,
+      this.nameLength,
+      this.linkedContext,
+      Reference reference,
+      CompilationUnit linkedNode)
+      : resynthesizerContext = null,
+        unlinkedDefiningUnit = null,
+        super.forLinkedNode(null, reference, linkedNode) {
+    _name = name;
+    _nameOffset = offset;
+  }
+
   /// Initialize a newly created library element in the given [context] to have
   /// the given [name].
   LibraryElementImpl.forNode(this.context, this.session, LibraryIdentifier name)
       : nameLength = name != null ? name.length : 0,
         resynthesizerContext = null,
         unlinkedDefiningUnit = null,
+        linkedContext = null,
         super.forNode(name);
 
   /// Initialize using the given serialized information.
@@ -5282,7 +6282,8 @@
       this.nameLength,
       this.resynthesizerContext,
       this.unlinkedDefiningUnit)
-      : super.forSerialized(null) {
+      : linkedContext = null,
+        super.forSerialized(null) {
     _name = name;
     _nameOffset = offset;
     setResolutionCapability(
@@ -5323,6 +6324,10 @@
 
   @override
   String get documentationComment {
+    if (linkedNode != null) {
+      var comment = linkedContext.getLibraryDocumentationComment(linkedNode);
+      return getCommentNodeRawText(comment);
+    }
     if (unlinkedDefiningUnit != null) {
       return unlinkedDefiningUnit.libraryDocumentationComment?.text;
     }
@@ -5354,9 +6359,17 @@
 
   @override
   Namespace get exportNamespace {
+    if (_exportNamespace != null) return _exportNamespace;
+
+    if (linkedNode != null) {
+      var elements = linkedContext.bundleContext.elementFactory;
+      return _exportNamespace = elements.buildExportNamespace(source.uri);
+    }
+
     if (resynthesizerContext != null) {
       _exportNamespace ??= resynthesizerContext.buildExportNamespace();
     }
+
     return _exportNamespace;
   }
 
@@ -5366,34 +6379,42 @@
 
   @override
   List<ExportElement> get exports {
-    if (_exports == null) {
-      if (unlinkedDefiningUnit != null) {
-        List<UnlinkedExportNonPublic> unlinkedNonPublicExports =
-            unlinkedDefiningUnit.exports;
-        List<UnlinkedExportPublic> unlinkedPublicExports =
-            unlinkedDefiningUnit.publicNamespace.exports;
-        assert(unlinkedDefiningUnit.exports.length ==
-            unlinkedPublicExports.length);
-        int length = unlinkedNonPublicExports.length;
-        if (length != 0) {
-          List<ExportElement> exports = new List<ExportElement>();
-          for (int i = 0; i < length; i++) {
-            UnlinkedExportPublic serializedExportPublic =
-                unlinkedPublicExports[i];
-            UnlinkedExportNonPublic serializedExportNonPublic =
-                unlinkedNonPublicExports[i];
-            ExportElementImpl exportElement =
-                new ExportElementImpl.forSerialized(
-                    serializedExportPublic, serializedExportNonPublic, library);
-            exports.add(exportElement);
-          }
-          _exports = exports;
-        } else {
-          _exports = const <ExportElement>[];
+    if (_exports != null) return _exports;
+
+    if (linkedNode != null) {
+      var unit = linkedContext.unit_withDirectives;
+      return _exports = unit.directives
+          .whereType<ExportDirective>()
+          .map((node) => ExportElementImpl.forLinkedNode(this, node))
+          .toList();
+    }
+
+    if (unlinkedDefiningUnit != null) {
+      List<UnlinkedExportNonPublic> unlinkedNonPublicExports =
+          unlinkedDefiningUnit.exports;
+      List<UnlinkedExportPublic> unlinkedPublicExports =
+          unlinkedDefiningUnit.publicNamespace.exports;
+      assert(
+          unlinkedDefiningUnit.exports.length == unlinkedPublicExports.length);
+      int length = unlinkedNonPublicExports.length;
+      if (length != 0) {
+        List<ExportElement> exports = new List<ExportElement>();
+        for (int i = 0; i < length; i++) {
+          UnlinkedExportPublic serializedExportPublic =
+              unlinkedPublicExports[i];
+          UnlinkedExportNonPublic serializedExportNonPublic =
+              unlinkedNonPublicExports[i];
+          ExportElementImpl exportElement = new ExportElementImpl.forSerialized(
+              serializedExportPublic, serializedExportNonPublic, library);
+          exports.add(exportElement);
         }
+        _exports = exports;
+      } else {
+        _exports = const <ExportElement>[];
       }
     }
-    return _exports ?? const <ExportElement>[];
+
+    return _exports ??= const <ExportElement>[];
   }
 
   /// Set the specifications of all of the exports defined in this library to
@@ -5455,13 +6476,32 @@
 
   @override
   List<ImportElement> get imports {
-    if (_imports == null) {
-      if (unlinkedDefiningUnit != null) {
-        _imports = buildImportsFromSummary(this, unlinkedDefiningUnit.imports,
-            resynthesizerContext.linkedLibrary.importDependencies);
+    if (_imports != null) return _imports;
+
+    if (linkedNode != null) {
+      var unit = linkedContext.unit_withDirectives;
+      _imports = unit.directives
+          .whereType<ImportDirective>()
+          .map((node) => ImportElementImpl.forLinkedNode(this, node))
+          .toList();
+      var hasCore = _imports.any((import) {
+        return import.importedLibrary?.isDartCore ?? false;
+      });
+      if (!hasCore) {
+        var elements = linkedContext.bundleContext.elementFactory;
+        _imports.add(ImportElementImpl(-1)
+          ..importedLibrary = elements.libraryOfUri('dart:core')
+          ..isSynthetic = true);
       }
+      return _imports;
     }
-    return _imports ?? const <ImportElement>[];
+
+    if (unlinkedDefiningUnit != null) {
+      _imports = buildImportsFromSummary(this, unlinkedDefiningUnit.imports,
+          resynthesizerContext.linkedLibrary.importDependencies);
+    }
+
+    return _imports ??= const <ImportElement>[];
   }
 
   /// Set the specifications of all of the imports defined in this library to
@@ -5623,14 +6663,19 @@
 
   @override
   List<ElementAnnotation> get metadata {
-    if (_metadata == null) {
-      if (unlinkedDefiningUnit != null) {
-        _metadata = _buildAnnotations(
-            _definingCompilationUnit as CompilationUnitElementImpl,
-            unlinkedDefiningUnit.libraryAnnotations);
-        return _metadata;
-      }
+    if (_metadata != null) return _metadata;
+
+    if (linkedNode != null) {
+      var metadata = linkedContext.getLibraryMetadata(linkedNode);
+      return _metadata = _buildAnnotations2(enclosingUnit, metadata);
     }
+
+    if (unlinkedDefiningUnit != null) {
+      return _metadata = _buildAnnotations(
+          _definingCompilationUnit as CompilationUnitElementImpl,
+          unlinkedDefiningUnit.libraryAnnotations);
+    }
+
     return super.metadata;
   }
 
@@ -5654,8 +6699,15 @@
 
   @override
   Namespace get publicNamespace {
+    if (_publicNamespace != null) return _publicNamespace;
+
+    if (linkedNode != null) {
+      return _publicNamespace =
+          NamespaceBuilder().createPublicNamespaceForLibrary(this);
+    }
+
     if (resynthesizerContext != null) {
-      _publicNamespace ??= resynthesizerContext.buildPublicNamespace();
+      return _publicNamespace = resynthesizerContext.buildPublicNamespace();
     }
     return _publicNamespace;
   }
@@ -5961,6 +7013,17 @@
   }
 
   @override
+  bool get isLazy {
+//    if (linkedNode != null) {
+//      return enclosingUnit.linkedContext.isLazy(linkedNode);
+//    }
+//    if (_unlinkedVariable != null) {
+//      return _unlinkedVariable.isLazy;
+//    }
+    return hasModifier(Modifier.LAZY);
+  }
+
+  @override
   bool get isPotentiallyMutatedInClosure => true;
 
   @override
@@ -6007,6 +7070,10 @@
   /// given [offset].
   MethodElementImpl(String name, int offset) : super(name, offset);
 
+  MethodElementImpl.forLinkedNode(ClassElementImpl enclosingClass,
+      Reference reference, MethodDeclaration linkedNode)
+      : super.forLinkedNode(enclosingClass, reference, linkedNode);
+
   /// Initialize a newly created method element to have the given [name].
   MethodElementImpl.forNode(Identifier name) : super.forNode(name);
 
@@ -6052,6 +7119,9 @@
 
   @override
   bool get isStatic {
+    if (linkedNode != null) {
+      return enclosingUnit.linkedContext.isStatic(linkedNode);
+    }
     if (serializedExecutable != null) {
       return serializedExecutable.isStatic;
     }
@@ -6142,6 +7212,10 @@
   /// given [offset] in the file that contains the declaration of this element.
   MixinElementImpl(String name, int offset) : super(name, offset);
 
+  MixinElementImpl.forLinkedNode(CompilationUnitElementImpl enclosing,
+      Reference reference, MixinDeclaration linkedNode)
+      : super.forLinkedNode(enclosing, reference, linkedNode);
+
   /// Initialize a newly created class element to have the given [name].
   MixinElementImpl.forNode(Identifier name) : super.forNode(name);
 
@@ -6157,24 +7231,43 @@
   bool get isMixin => true;
 
   @override
+  List<InterfaceType> get mixins => const <InterfaceType>[];
+
+  @override
   List<InterfaceType> get superclassConstraints {
-    if (_superclassConstraints == null) {
-      if (_unlinkedClass != null) {
-        List<InterfaceType> constraints;
-        if (_unlinkedClass.superclassConstraints.isNotEmpty) {
-          ResynthesizerContext context = enclosingUnit.resynthesizerContext;
-          constraints = _unlinkedClass.superclassConstraints
-              .map((EntityRef t) => context.resolveTypeRef(this, t))
-              .where(_isInterfaceTypeInterface)
-              .cast<InterfaceType>()
-              .toList(growable: false);
-        }
-        if (constraints == null || constraints.isEmpty) {
-          constraints = [context.typeProvider.objectType];
-        }
-        _superclassConstraints = constraints;
+    if (_superclassConstraints != null) return _superclassConstraints;
+
+    if (linkedNode != null) {
+      List<InterfaceType> constraints;
+      var onClause = enclosingUnit.linkedContext.getOnClause(linkedNode);
+      if (onClause != null) {
+        constraints = onClause.superclassConstraints
+            .map((node) => node.type)
+            .whereType<InterfaceType>()
+            .toList();
       }
+      if (constraints == null || constraints.isEmpty) {
+        constraints = [context.typeProvider.objectType];
+      }
+      return _superclassConstraints = constraints;
     }
+
+    if (_unlinkedClass != null) {
+      List<InterfaceType> constraints;
+      if (_unlinkedClass.superclassConstraints.isNotEmpty) {
+        ResynthesizerContext context = enclosingUnit.resynthesizerContext;
+        constraints = _unlinkedClass.superclassConstraints
+            .map((EntityRef t) => context.resolveTypeRef(this, t))
+            .where(_isInterfaceTypeInterface)
+            .cast<InterfaceType>()
+            .toList(growable: false);
+      }
+      if (constraints == null || constraints.isEmpty) {
+        constraints = [context.typeProvider.objectType];
+      }
+      return _superclassConstraints = constraints;
+    }
+
     return _superclassConstraints ?? const <InterfaceType>[];
   }
 
@@ -6295,25 +7388,28 @@
   /// type being referred to is the return type.
   static const Modifier IMPLICIT_TYPE = const Modifier('IMPLICIT_TYPE', 12);
 
+  /// Indicates that modifier 'lazy' was applied to the element.
+  static const Modifier LAZY = const Modifier('LAZY', 13);
+
   /// Indicates that a class is a mixin application.
   static const Modifier MIXIN_APPLICATION =
-      const Modifier('MIXIN_APPLICATION', 13);
+      const Modifier('MIXIN_APPLICATION', 14);
 
   /// Indicates that a class contains an explicit reference to 'super'.
   static const Modifier REFERENCES_SUPER =
-      const Modifier('REFERENCES_SUPER', 14);
+      const Modifier('REFERENCES_SUPER', 15);
 
   /// Indicates that the pseudo-modifier 'set' was applied to the element.
-  static const Modifier SETTER = const Modifier('SETTER', 15);
+  static const Modifier SETTER = const Modifier('SETTER', 16);
 
   /// Indicates that the modifier 'static' was applied to the element.
-  static const Modifier STATIC = const Modifier('STATIC', 16);
+  static const Modifier STATIC = const Modifier('STATIC', 17);
 
   /// Indicates that the element does not appear in the source code but was
   /// implicitly created. For example, if a class does not define any
   /// constructors, an implicit zero-argument constructor will be created and it
   /// will be marked as being synthetic.
-  static const Modifier SYNTHETIC = const Modifier('SYNTHETIC', 17);
+  static const Modifier SYNTHETIC = const Modifier('SYNTHETIC', 18);
 
   static const List<Modifier> values = const [
     ABSTRACT,
@@ -6329,6 +7425,7 @@
     GETTER,
     HAS_EXT_URI,
     IMPLICIT_TYPE,
+    LAZY,
     MIXIN_APPLICATION,
     REFERENCES_SUPER,
     SETTER,
@@ -6409,6 +7506,9 @@
   bool get hasLiteral => false;
 
   @override
+  bool get hasOptionalTypeArgs => false;
+
+  @override
   bool get hasOverride => false;
 
   @override
@@ -6616,6 +7716,11 @@
       : _unlinkedVariable = null,
         super(name, offset);
 
+  NonParameterVariableElementImpl.forLinkedNode(
+      ElementImpl enclosing, Reference reference, AstNode linkedNode)
+      : _unlinkedVariable = null,
+        super.forLinkedNode(enclosing, reference, linkedNode);
+
   /// Initialize a newly created variable element to have the given [name].
   NonParameterVariableElementImpl.forNode(Identifier name)
       : _unlinkedVariable = null,
@@ -6628,6 +7733,9 @@
 
   @override
   int get codeLength {
+    if (linkedNode != null) {
+      return linkedContext.getCodeLength(linkedNode);
+    }
     if (_unlinkedVariable != null) {
       return _unlinkedVariable.codeRange?.length;
     }
@@ -6636,6 +7744,9 @@
 
   @override
   int get codeOffset {
+    if (linkedNode != null) {
+      return linkedContext.getCodeOffset(linkedNode);
+    }
     if (_unlinkedVariable != null) {
       return _unlinkedVariable.codeRange?.offset;
     }
@@ -6644,6 +7755,11 @@
 
   @override
   String get documentationComment {
+    if (linkedNode != null) {
+      var context = enclosingUnit.linkedContext;
+      var comment = context.getDocumentationComment(linkedNode);
+      return getCommentNodeRawText(comment);
+    }
     if (_unlinkedVariable != null) {
       return _unlinkedVariable.documentationComment?.text;
     }
@@ -6652,6 +7768,9 @@
 
   @override
   bool get hasImplicitType {
+    if (linkedNode != null) {
+      return linkedContext.hasImplicitType(linkedNode);
+    }
     if (_unlinkedVariable != null) {
       return _unlinkedVariable.type == null;
     }
@@ -6727,6 +7846,9 @@
 
   @override
   String get name {
+    if (linkedNode != null) {
+      return reference.name;
+    }
     if (_unlinkedVariable != null) {
       return _unlinkedVariable.name;
     }
@@ -6735,6 +7857,10 @@
 
   @override
   int get nameOffset {
+    if (linkedNode != null) {
+      return enclosingUnit.linkedContext.getNameOffset(linkedNode);
+    }
+
     int offset = super.nameOffset;
     if (offset == 0) {
       if (_unlinkedVariable != null) {
@@ -6757,6 +7883,9 @@
 
   @override
   void set type(DartType type) {
+    if (linkedNode != null) {
+      return linkedContext.setVariableType(linkedNode, type);
+    }
     _assertNotResynthesized(_unlinkedVariable);
     _type = _checkElementOfType(type);
   }
@@ -6803,6 +7932,27 @@
       : unlinkedParam = null,
         super(name, nameOffset);
 
+  ParameterElementImpl.forLinkedNode(
+      ElementImpl enclosing, Reference reference, FormalParameter linkedNode)
+      : unlinkedParam = null,
+        super.forLinkedNode(enclosing, reference, linkedNode);
+
+  factory ParameterElementImpl.forLinkedNodeFactory(
+      ElementImpl enclosing, Reference reference, FormalParameter node) {
+    if (node is FieldFormalParameter) {
+      return FieldFormalParameterElementImpl.forLinkedNode(
+        enclosing,
+        reference,
+        node,
+      );
+    } else if (node is FunctionTypedFormalParameter ||
+        node is SimpleFormalParameter) {
+      return ParameterElementImpl.forLinkedNode(enclosing, reference, node);
+    } else {
+      throw UnimplementedError('${node.runtimeType}');
+    }
+  }
+
   /// Initialize a newly created parameter element to have the given [name].
   ParameterElementImpl.forNode(Identifier name)
       : unlinkedParam = null,
@@ -6851,6 +8001,9 @@
 
   @override
   int get codeLength {
+    if (linkedNode != null) {
+      return linkedContext.getCodeLength(linkedNode);
+    }
     if (unlinkedParam != null) {
       return unlinkedParam.codeRange?.length;
     }
@@ -6859,6 +8012,9 @@
 
   @override
   int get codeOffset {
+    if (linkedNode != null) {
+      return linkedContext.getCodeOffset(linkedNode);
+    }
     if (unlinkedParam != null) {
       return unlinkedParam.codeRange?.offset;
     }
@@ -6884,6 +8040,9 @@
 
   @override
   bool get hasImplicitType {
+    if (linkedNode != null) {
+      return linkedContext.hasImplicitType(linkedNode);
+    }
     if (unlinkedParam != null) {
       return unlinkedParam.type == null && !unlinkedParam.isFunctionTyped;
     }
@@ -6954,6 +8113,9 @@
 
   @override
   bool get isCovariant {
+    if (linkedNode != null) {
+      return linkedContext.isCovariant(linkedNode);
+    }
     if (isExplicitlyCovariant || inheritsCovariant) {
       return true;
     }
@@ -6977,6 +8139,10 @@
 
   @override
   bool get isFinal {
+    if (linkedNode != null) {
+      FormalParameter linkedNode = this.linkedNode;
+      return linkedNode.isFinal;
+    }
     if (unlinkedParam != null) {
       return unlinkedParam.isFinal;
     }
@@ -7012,6 +8178,9 @@
 
   @override
   String get name {
+    if (linkedNode != null) {
+      return reference.name;
+    }
     if (unlinkedParam != null) {
       return unlinkedParam.name;
     }
@@ -7020,6 +8189,10 @@
 
   @override
   int get nameOffset {
+    if (linkedNode != null) {
+      return enclosingUnit.linkedContext.getNameOffset(linkedNode);
+    }
+
     int offset = super.nameOffset;
     if (offset == 0) {
       if (unlinkedParam != null) {
@@ -7037,7 +8210,14 @@
 
   @override
   ParameterKind get parameterKind {
-    if (unlinkedParam != null && _parameterKind == null) {
+    if (_parameterKind != null) return _parameterKind;
+
+    if (linkedNode != null) {
+      FormalParameter linkedNode = this.linkedNode;
+      // ignore: deprecated_member_use_from_same_package
+      return linkedNode.kind;
+    }
+    if (unlinkedParam != null) {
       switch (unlinkedParam.kind) {
         case UnlinkedParamKind.named:
           _parameterKind = ParameterKind.NAMED;
@@ -7065,6 +8245,11 @@
 
   @override
   DartType get type {
+    if (linkedNode != null) {
+      if (_type != null) return _type;
+      var context = enclosingUnit.linkedContext;
+      return _type = context.getType(linkedNode);
+    }
     _resynthesizeTypeAndParameters();
     return super.type;
   }
@@ -7173,6 +8358,58 @@
     }
   }
 
+  static List<ParameterElement> forLinkedNodeList(
+      ElementImpl enclosing,
+      LinkedUnitContext context,
+      Reference containerRef,
+      List<FormalParameter> formalParameters) {
+    if (formalParameters == null) {
+      return const [];
+    }
+
+    return formalParameters.map((node) {
+      if (node is DefaultFormalParameter) {
+        NormalFormalParameter parameterNode = node.parameter;
+        var name = parameterNode.identifier.name;
+        var reference = containerRef.getChild(name);
+        reference.node2 = node;
+        if (parameterNode is FieldFormalParameter) {
+          return DefaultFieldFormalParameterElementImpl.forLinkedNode(
+            enclosing,
+            reference,
+            node,
+          );
+        } else {
+          return DefaultParameterElementImpl.forLinkedNode(
+            enclosing,
+            reference,
+            node,
+          );
+        }
+      } else {
+        if (node.identifier == null) {
+          return ParameterElementImpl.forLinkedNodeFactory(
+            enclosing,
+            containerRef.getChild(''),
+            node,
+          );
+        } else {
+          var name = node.identifier.name;
+          var reference = containerRef.getChild(name);
+          if (reference.element == null) {
+            reference.node2 = node;
+            ParameterElementImpl.forLinkedNodeFactory(
+              enclosing,
+              reference,
+              node,
+            );
+          }
+          return reference.element as ParameterElement;
+        }
+      }
+    }).toList();
+  }
+
   /// Create and return [ParameterElement]s for the given [unlinkedParameters].
   static List<ParameterElement> resynthesizeList(
       List<UnlinkedParam> unlinkedParameters, ElementImpl enclosingElement,
@@ -7295,6 +8532,11 @@
       : _unlinkedImport = null,
         super(name, nameOffset);
 
+  PrefixElementImpl.forLinkedNode(
+      ElementImpl enclosing, Reference reference, SimpleIdentifier linkedNode)
+      : _unlinkedImport = null,
+        super.forLinkedNode(enclosing, reference, linkedNode);
+
   /// Initialize a newly created prefix element to have the given [name].
   PrefixElementImpl.forNode(Identifier name)
       : _unlinkedImport = null,
@@ -7313,9 +8555,6 @@
       super.enclosingElement as LibraryElement;
 
   @override
-  String get identifier => "_${super.identifier}";
-
-  @override
   List<LibraryElement> get importedLibraries => const <LibraryElement>[];
 
   @override
@@ -7323,6 +8562,9 @@
 
   @override
   String get name {
+    if (linkedNode != null) {
+      return reference.name;
+    }
     if (_name == null) {
       if (_unlinkedImport != null) {
         LibraryElementImpl library = enclosingElement as LibraryElementImpl;
@@ -7335,6 +8577,9 @@
 
   @override
   int get nameOffset {
+    if (linkedNode != null) {
+      return (linkedNode as SimpleIdentifier).offset;
+    }
     int offset = super.nameOffset;
     if (offset == 0 && _unlinkedImport != null) {
       return _unlinkedImport.prefixOffset;
@@ -7362,6 +8607,10 @@
   /// [name] and [offset].
   PropertyAccessorElementImpl(String name, int offset) : super(name, offset);
 
+  PropertyAccessorElementImpl.forLinkedNode(
+      ElementImpl enclosing, Reference reference, AstNode linkedNode)
+      : super.forLinkedNode(enclosing, reference, linkedNode);
+
   /// Initialize a newly created property accessor element to have the given
   /// [name].
   PropertyAccessorElementImpl.forNode(Identifier name) : super.forNode(name);
@@ -7373,8 +8622,9 @@
 
   /// Initialize a newly created synthetic property accessor element to be
   /// associated with the given [variable].
-  PropertyAccessorElementImpl.forVariable(PropertyInducingElementImpl variable)
-      : super(variable.name, variable.nameOffset) {
+  PropertyAccessorElementImpl.forVariable(PropertyInducingElementImpl variable,
+      {Reference reference})
+      : super(variable.name, variable.nameOffset, reference: reference) {
     this.variable = variable;
     isStatic = variable.isStatic;
     isSynthetic = true;
@@ -7432,6 +8682,9 @@
 
   @override
   bool get isGetter {
+    if (linkedNode != null) {
+      return enclosingUnit.linkedContext.isGetter(linkedNode);
+    }
     if (serializedExecutable != null) {
       return serializedExecutable.kind == UnlinkedExecutableKind.getter;
     }
@@ -7440,6 +8693,9 @@
 
   @override
   bool get isSetter {
+    if (linkedNode != null) {
+      return enclosingUnit.linkedContext.isSetter(linkedNode);
+    }
     if (serializedExecutable != null) {
       return serializedExecutable.kind == UnlinkedExecutableKind.setter;
     }
@@ -7448,6 +8704,9 @@
 
   @override
   bool get isStatic {
+    if (linkedNode != null) {
+      return enclosingUnit.linkedContext.isStatic(linkedNode);
+    }
     if (serializedExecutable != null) {
       return serializedExecutable.isStatic ||
           variable is TopLevelVariableElement;
@@ -7471,6 +8730,13 @@
 
   @override
   String get name {
+    if (linkedNode != null) {
+      var name = reference.name;
+      if (isSetter) {
+        return '$name=';
+      }
+      return name;
+    }
     if (serializedExecutable != null) {
       return serializedExecutable.name;
     }
@@ -7517,8 +8783,9 @@
     extends PropertyAccessorElementImpl {
   /// Create the implicit getter and bind it to the [property].
   PropertyAccessorElementImpl_ImplicitGetter(
-      PropertyInducingElementImpl property)
-      : super.forVariable(property) {
+      PropertyInducingElementImpl property,
+      {Reference reference})
+      : super.forVariable(property, reference: reference) {
     property.getter = this;
     enclosingElement = property.enclosingElement;
   }
@@ -7553,8 +8820,9 @@
     extends PropertyAccessorElementImpl {
   /// Create the implicit setter and bind it to the [property].
   PropertyAccessorElementImpl_ImplicitSetter(
-      PropertyInducingElementImpl property)
-      : super.forVariable(property) {
+      PropertyInducingElementImpl property,
+      {Reference reference})
+      : super.forVariable(property, reference: reference) {
     property.setter = this;
     enclosingElement = property.enclosingElement;
   }
@@ -7603,6 +8871,10 @@
   /// [offset].
   PropertyInducingElementImpl(String name, int offset) : super(name, offset);
 
+  PropertyInducingElementImpl.forLinkedNode(
+      ElementImpl enclosing, Reference reference, AstNode linkedNode)
+      : super.forLinkedNode(enclosing, reference, linkedNode);
+
   /// Initialize a newly created element to have the given [name].
   PropertyInducingElementImpl.forNode(Identifier name) : super.forNode(name);
 
@@ -7623,6 +8895,10 @@
 
   @override
   DartType get type {
+    if (linkedNode != null) {
+      if (_type != null) return _type;
+      return _type = linkedContext.getType(linkedNode);
+    }
     if (isSynthetic && _type == null) {
       if (getter != null) {
         _type = getter.returnType;
@@ -7694,6 +8970,9 @@
   /// The unlinked representation of the combinator in the summary.
   final UnlinkedCombinator _unlinkedCombinator;
 
+  final LinkedUnitContext linkedContext;
+  final ShowCombinator linkedNode;
+
   /// The names that are to be made visible in the importing library if they are
   /// defined in the imported library.
   List<String> _shownNames;
@@ -7705,10 +8984,18 @@
   /// The offset of the 'show' keyword of this element.
   int _offset = 0;
 
-  ShowElementCombinatorImpl() : _unlinkedCombinator = null;
+  ShowElementCombinatorImpl()
+      : _unlinkedCombinator = null,
+        linkedContext = null,
+        linkedNode = null;
+
+  ShowElementCombinatorImpl.forLinkedNode(this.linkedContext, this.linkedNode)
+      : _unlinkedCombinator = null;
 
   /// Initialize using the given serialized information.
-  ShowElementCombinatorImpl.forSerialized(this._unlinkedCombinator);
+  ShowElementCombinatorImpl.forSerialized(this._unlinkedCombinator)
+      : linkedContext = null,
+        linkedNode = null;
 
   @override
   int get end {
@@ -7725,6 +9012,9 @@
 
   @override
   int get offset {
+    if (linkedNode != null) {
+      return linkedNode.keyword.offset;
+    }
     if (_unlinkedCombinator != null) {
       return _unlinkedCombinator.offset;
     }
@@ -7738,9 +9028,16 @@
 
   @override
   List<String> get shownNames {
-    if (_unlinkedCombinator != null) {
-      _shownNames ??= _unlinkedCombinator.shows.toList(growable: false);
+    if (_shownNames != null) return _shownNames;
+
+    if (linkedNode != null) {
+      return _shownNames = linkedNode.shownNames.map((i) => i.name).toList();
     }
+
+    if (_unlinkedCombinator != null) {
+      return _shownNames = _unlinkedCombinator.shows.toList(growable: false);
+    }
+
     return _shownNames ?? const <String>[];
   }
 
@@ -7794,6 +9091,42 @@
   /// the given [name] and [offset].
   TopLevelVariableElementImpl(String name, int offset) : super(name, offset);
 
+  TopLevelVariableElementImpl.forLinkedNode(
+      ElementImpl enclosing, Reference reference, AstNode linkedNode)
+      : super.forLinkedNode(enclosing, reference, linkedNode) {
+    if (!linkedNode.isSynthetic) {
+      var enclosingRef = enclosing.reference;
+
+      this.getter = PropertyAccessorElementImpl_ImplicitGetter(
+        this,
+        reference: enclosingRef.getChild('@getter').getChild(name),
+      );
+
+      if (!isConst && !isFinal) {
+        this.setter = PropertyAccessorElementImpl_ImplicitSetter(
+          this,
+          reference: enclosingRef.getChild('@setter').getChild(name),
+        );
+      }
+    }
+  }
+
+  factory TopLevelVariableElementImpl.forLinkedNodeFactory(
+      ElementImpl enclosing, Reference reference, AstNode linkedNode) {
+    if (enclosing.enclosingUnit.linkedContext.isConst(linkedNode)) {
+      return ConstTopLevelVariableElementImpl.forLinkedNode(
+        enclosing,
+        reference,
+        linkedNode,
+      );
+    }
+    return TopLevelVariableElementImpl.forLinkedNode(
+      enclosing,
+      reference,
+      linkedNode,
+    );
+  }
+
   /// Initialize a newly created top-level variable element to have the given
   /// [name].
   TopLevelVariableElementImpl.forNode(Identifier name) : super.forNode(name);
@@ -7840,6 +9173,13 @@
       : _unlinkedTypeParam = null,
         super(name, offset);
 
+  TypeParameterElementImpl.forLinkedNode(
+      TypeParameterizedElementMixin enclosing,
+      Reference reference,
+      TypeParameter linkedNode)
+      : _unlinkedTypeParam = null,
+        super.forLinkedNode(enclosing, reference, linkedNode);
+
   /// Initialize a newly created type parameter element to have the given
   /// [name].
   TypeParameterElementImpl.forNode(Identifier name)
@@ -7860,16 +9200,22 @@
   }
 
   DartType get bound {
-    if (_bound == null) {
-      if (_unlinkedTypeParam != null) {
-        if (_unlinkedTypeParam.bound == null) {
-          return null;
-        }
-        _bound = enclosingUnit.resynthesizerContext.resolveTypeRef(
-            this, _unlinkedTypeParam.bound,
-            instantiateToBoundsAllowed: false, declaredType: true);
-      }
+    if (_bound != null) return _bound;
+
+    if (linkedNode != null) {
+      var context = enclosingUnit.linkedContext;
+      return _bound = context.getTypeParameterBound(linkedNode)?.type;
     }
+
+    if (_unlinkedTypeParam != null) {
+      if (_unlinkedTypeParam.bound == null) {
+        return null;
+      }
+      return _bound = enclosingUnit.resynthesizerContext.resolveTypeRef(
+          this, _unlinkedTypeParam.bound,
+          instantiateToBoundsAllowed: false, declaredType: true);
+    }
+
     return _bound;
   }
 
@@ -7880,6 +9226,9 @@
 
   @override
   int get codeLength {
+    if (linkedNode != null) {
+      return linkedContext.getCodeLength(linkedNode);
+    }
     if (_unlinkedTypeParam != null) {
       return _unlinkedTypeParam.codeRange?.length;
     }
@@ -7888,6 +9237,9 @@
 
   @override
   int get codeOffset {
+    if (linkedNode != null) {
+      return linkedContext.getCodeOffset(linkedNode);
+    }
     if (_unlinkedTypeParam != null) {
       return _unlinkedTypeParam.codeRange?.offset;
     }
@@ -7911,6 +9263,10 @@
 
   @override
   String get name {
+    if (linkedNode != null) {
+      TypeParameter node = this.linkedNode;
+      return node.name.name;
+    }
     if (_unlinkedTypeParam != null) {
       return _unlinkedTypeParam.name;
     }
@@ -7927,6 +9283,9 @@
   }
 
   TypeParameterType get type {
+    if (linkedNode != null) {
+      _type ??= new TypeParameterTypeImpl(this);
+    }
     if (_unlinkedTypeParam != null) {
       _type ??= new TypeParameterTypeImpl(this);
     }
@@ -7977,19 +9336,31 @@
 
   @override
   List<TypeParameterElement> get typeParameters {
-    if (_typeParameterElements == null) {
-      List<UnlinkedTypeParam> unlinkedParams = unlinkedTypeParams;
-      if (unlinkedParams != null) {
-        int numTypeParameters = unlinkedParams.length;
-        _typeParameterElements =
-            new List<TypeParameterElement>(numTypeParameters);
-        for (int i = 0; i < numTypeParameters; i++) {
-          _typeParameterElements[i] =
-              new TypeParameterElementImpl.forSerialized(
-                  unlinkedParams[i], this);
-        }
+    if (_typeParameterElements != null) return _typeParameterElements;
+
+    if (linkedNode != null) {
+      var typeParameters = linkedContext.getTypeParameters2(linkedNode);
+      if (typeParameters == null) {
+        return _typeParameterElements = const [];
+      }
+      return _typeParameterElements = typeParameters.typeParameters.map((node) {
+        TypeParameterElementImpl element = node.declaredElement;
+        element.enclosingElement = this;
+        return element;
+      }).toList();
+    }
+
+    List<UnlinkedTypeParam> unlinkedParams = unlinkedTypeParams;
+    if (unlinkedParams != null) {
+      int numTypeParameters = unlinkedParams.length;
+      _typeParameterElements =
+          new List<TypeParameterElement>(numTypeParameters);
+      for (int i = 0; i < numTypeParameters; i++) {
+        _typeParameterElements[i] =
+            new TypeParameterElementImpl.forSerialized(unlinkedParams[i], this);
       }
     }
+
     return _typeParameterElements ?? const <TypeParameterElement>[];
   }
 
@@ -8087,6 +9458,10 @@
   /// [offset]. The offset may be `-1` if the element is synthetic.
   UriReferencedElementImpl(String name, int offset) : super(name, offset);
 
+  UriReferencedElementImpl.forLinkedNode(
+      ElementImpl enclosing, Reference reference, AstNode linkedNode)
+      : super.forLinkedNode(enclosing, reference, linkedNode);
+
   /// Initialize using the given serialized information.
   UriReferencedElementImpl.forSerialized(ElementImpl enclosingElement)
       : super.forSerialized(enclosingElement);
@@ -8147,6 +9522,10 @@
   /// [offset].
   VariableElementImpl(String name, int offset) : super(name, offset);
 
+  VariableElementImpl.forLinkedNode(
+      ElementImpl enclosing, Reference reference, AstNode linkedNode)
+      : super.forLinkedNode(enclosing, reference, linkedNode);
+
   /// Initialize a newly created variable element to have the given [name].
   VariableElementImpl.forNode(Identifier name) : super.forNode(name);
 
@@ -8210,6 +9589,9 @@
 
   @override
   bool get isConst {
+    if (linkedNode != null) {
+      return enclosingUnit.linkedContext.isConst(linkedNode);
+    }
     return hasModifier(Modifier.CONST);
   }
 
@@ -8223,6 +9605,9 @@
 
   @override
   bool get isFinal {
+    if (linkedNode != null) {
+      return enclosingUnit.linkedContext.isFinal(linkedNode);
+    }
     return hasModifier(Modifier.FINAL);
   }
 
@@ -8244,6 +9629,9 @@
   DartType get type => _type ?? _declaredType;
 
   void set type(DartType type) {
+    if (linkedNode != null) {
+      return linkedContext.setVariableType(linkedNode, type);
+    }
     _type = _checkElementOfType(type);
   }
 
diff --git a/pkg/analyzer/lib/src/dart/element/handle.dart b/pkg/analyzer/lib/src/dart/element/handle.dart
index 67f47f7..7a4a1e7 100644
--- a/pkg/analyzer/lib/src/dart/element/handle.dart
+++ b/pkg/analyzer/lib/src/dart/element/handle.dart
@@ -395,6 +395,9 @@
   bool get hasLiteral => actualElement.hasLiteral;
 
   @override
+  bool get hasOptionalTypeArgs => actualElement.hasOptionalTypeArgs;
+
+  @override
   bool get hasOverride => actualElement.hasOverride;
 
   @override
@@ -661,6 +664,9 @@
   @override
   bool get isEnumConstant => actualElement.isEnumConstant;
 
+  @override
+  bool get isLazy => actualElement.isLazy;
+
   @deprecated
   @override
   bool get isVirtual => actualElement.isVirtual;
@@ -981,6 +987,9 @@
       super.actualElement as LocalVariableElement;
 
   @override
+  bool get isLazy => actualElement.isLazy;
+
+  @override
   ElementKind get kind => ElementKind.LOCAL_VARIABLE;
 
   @override
@@ -1168,14 +1177,14 @@
   @override
   PropertyAccessorElement get getter => actualElement.getter;
 
+  @override
+  bool get isConstantEvaluated => actualElement.isConstantEvaluated;
+
   @deprecated
   @override
   DartType get propagatedType => null;
 
   @override
-  bool get isConstantEvaluated => actualElement.isConstantEvaluated;
-
-  @override
   PropertyAccessorElement get setter => actualElement.setter;
 }
 
@@ -1256,10 +1265,10 @@
   FunctionElement get initializer => actualElement.initializer;
 
   @override
-  bool get isConstantEvaluated => actualElement.isConstantEvaluated;
+  bool get isConst => actualElement.isConst;
 
   @override
-  bool get isConst => actualElement.isConst;
+  bool get isConstantEvaluated => actualElement.isConstantEvaluated;
 
   @override
   bool get isFinal => actualElement.isFinal;
diff --git a/pkg/analyzer/lib/src/dart/element/inheritance_manager2.dart b/pkg/analyzer/lib/src/dart/element/inheritance_manager2.dart
index b2fb92f..8bdc5c7 100644
--- a/pkg/analyzer/lib/src/dart/element/inheritance_manager2.dart
+++ b/pkg/analyzer/lib/src/dart/element/inheritance_manager2.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/element/member.dart b/pkg/analyzer/lib/src/dart/element/member.dart
index 845d59d..12fd38f 100644
--- a/pkg/analyzer/lib/src/dart/element/member.dart
+++ b/pkg/analyzer/lib/src/dart/element/member.dart
@@ -255,6 +255,9 @@
   @override
   bool get isEnumConstant => baseElement.isEnumConstant;
 
+  @override
+  bool get isLazy => baseElement.isLazy;
+
   @deprecated
   @override
   bool get isVirtual => baseElement.isVirtual;
@@ -425,6 +428,9 @@
   bool get hasLiteral => _baseElement.hasLiteral;
 
   @override
+  bool get hasOptionalTypeArgs => _baseElement.hasOptionalTypeArgs;
+
+  @override
   bool get hasOverride => _baseElement.hasOverride;
 
   @override
diff --git a/pkg/analyzer/lib/src/dart/element/type.dart b/pkg/analyzer/lib/src/dart/element/type.dart
index 85712c3..267f338 100644
--- a/pkg/analyzer/lib/src/dart/element/type.dart
+++ b/pkg/analyzer/lib/src/dart/element/type.dart
@@ -56,35 +56,14 @@
  */
 class BottomTypeImpl extends TypeImpl {
   /**
-   * The unique instance of this class, with indeterminate nullability.
+   * The unique instance of this class.
    */
-  static final BottomTypeImpl instance = instanceIndeterminate;
-
-  /**
-   * The unique instance of this class, nullable.
-   */
-  static final BottomTypeImpl instanceNullable =
-      new BottomTypeImpl._(Nullability.nullable);
-
-  /**
-   * The unique instance of this class, with indeterminate nullability.
-   */
-  static final BottomTypeImpl instanceIndeterminate =
-      new BottomTypeImpl._(Nullability.indeterminate);
-
-  /**
-   * The unique instance of this class, non-nullable.
-   */
-  static final BottomTypeImpl instanceNonNullable =
-      new BottomTypeImpl._(Nullability.nonNullable);
-
-  @override
-  final Nullability nullability;
+  static final BottomTypeImpl instance = new BottomTypeImpl._();
 
   /**
    * Prevent the creation of instances of this class.
    */
-  BottomTypeImpl._(this.nullability) : super(null, "<bottom>");
+  BottomTypeImpl._() : super(null, "<bottom>");
 
   @override
   int get hashCode => 0;
@@ -93,6 +72,9 @@
   bool get isBottom => true;
 
   @override
+  NullabilitySuffix get nullabilitySuffix => NullabilitySuffix.none;
+
+  @override
   bool operator ==(Object object) => identical(object, this);
 
   @override
@@ -134,16 +116,9 @@
       this;
 
   @override
-  TypeImpl withNullability(Nullability nullability) {
-    switch (nullability) {
-      case Nullability.nullable:
-        return instanceNullable;
-      case Nullability.indeterminate:
-        return instanceIndeterminate;
-      case Nullability.nonNullable:
-        return instanceNonNullable;
-    }
-    throw StateError('Unexpected nullability: $nullability');
+  TypeImpl withNullability(NullabilitySuffix nullabilitySuffix) {
+    // The bottom type is always non-nullable.
+    return this;
   }
 }
 
@@ -153,7 +128,7 @@
  */
 class CircularFunctionTypeImpl extends DynamicTypeImpl
     implements _FunctionTypeImplLazy {
-  CircularFunctionTypeImpl() : super._circular(Nullability.indeterminate);
+  CircularFunctionTypeImpl() : super._circular();
 
   @override
   List<ParameterElement> get baseParameters => const <ParameterElement>[];
@@ -262,7 +237,7 @@
   FunctionTypeImpl substitute3(List<DartType> argumentTypes) => this;
 
   @override
-  TypeImpl withNullability(Nullability nullability) => this;
+  TypeImpl withNullability(NullabilitySuffix nullabilitySuffix) => this;
 
   @override
   void _forEachParameterType(
@@ -294,7 +269,7 @@
  * `...`.
  */
 class CircularTypeImpl extends DynamicTypeImpl {
-  CircularTypeImpl() : super._circular(Nullability.indeterminate);
+  CircularTypeImpl() : super._circular();
 
   @override
   bool operator ==(Object object) => object is CircularTypeImpl;
@@ -332,9 +307,9 @@
 
   DeferredFunctionTypeImpl(this._computeElement, String name,
       List<DartType> typeArguments, bool isInstantiated,
-      {Nullability nullability = Nullability.indeterminate})
+      {NullabilitySuffix nullabilitySuffix = NullabilitySuffix.star})
       : super._(null, name, null, typeArguments, null, null, isInstantiated,
-            nullability: nullability);
+            nullabilitySuffix: nullabilitySuffix);
 
   @override
   FunctionTypedElement get element {
@@ -346,11 +321,11 @@
   }
 
   @override
-  TypeImpl withNullability(Nullability nullability) {
-    if (this.nullability == nullability) return this;
+  TypeImpl withNullability(NullabilitySuffix nullabilitySuffix) {
+    if (this.nullabilitySuffix == nullabilitySuffix) return this;
     return DeferredFunctionTypeImpl(
         _computeElement, name, typeArguments, isInstantiated,
-        nullability: nullability);
+        nullabilitySuffix: nullabilitySuffix);
   }
 }
 
@@ -359,35 +334,14 @@
  */
 class DynamicTypeImpl extends TypeImpl {
   /**
-   * The unique instance of this class, with indeterminate nullability.
+   * The unique instance of this class.
    */
-  static final DynamicTypeImpl instance = instanceIndeterminate;
-
-  /**
-   * The unique instance of this class, nullable.
-   */
-  static final DynamicTypeImpl instanceNullable =
-      new DynamicTypeImpl._(Nullability.nullable);
-
-  /**
-   * The unique instance of this class, with indeterminate nullability.
-   */
-  static final DynamicTypeImpl instanceIndeterminate =
-      new DynamicTypeImpl._(Nullability.indeterminate);
-
-  /**
-   * The unique instance of this class, non-nullable.
-   */
-  static final DynamicTypeImpl instanceNonNullable =
-      new DynamicTypeImpl._(Nullability.nonNullable);
-
-  @override
-  final Nullability nullability;
+  static final DynamicTypeImpl instance = new DynamicTypeImpl._();
 
   /**
    * Prevent the creation of instances of this class.
    */
-  DynamicTypeImpl._(this.nullability)
+  DynamicTypeImpl._()
       : super(new DynamicElementImpl(), Keyword.DYNAMIC.lexeme) {
     (element as DynamicElementImpl).type = this;
   }
@@ -395,8 +349,7 @@
   /**
    * Constructor used by [CircularTypeImpl].
    */
-  DynamicTypeImpl._circular(this.nullability)
-      : super(instance.element, Keyword.DYNAMIC.lexeme);
+  DynamicTypeImpl._circular() : super(instance.element, Keyword.DYNAMIC.lexeme);
 
   @override
   int get hashCode => 1;
@@ -405,6 +358,9 @@
   bool get isDynamic => true;
 
   @override
+  NullabilitySuffix get nullabilitySuffix => NullabilitySuffix.none;
+
+  @override
   bool operator ==(Object object) => identical(object, this);
 
   @override
@@ -451,16 +407,9 @@
   }
 
   @override
-  TypeImpl withNullability(Nullability nullability) {
-    switch (nullability) {
-      case Nullability.nullable:
-        return instanceNullable;
-      case Nullability.indeterminate:
-        return instanceIndeterminate;
-      case Nullability.nonNullable:
-        return instanceNonNullable;
-    }
-    throw StateError('Unexpected nullability: $nullability');
+  TypeImpl withNullability(NullabilitySuffix nullabilitySuffix) {
+    // The dynamic type is always nullable.
+    return this;
   }
 }
 
@@ -469,7 +418,7 @@
  */
 abstract class FunctionTypeImpl extends TypeImpl implements FunctionType {
   @override
-  final Nullability nullability;
+  final NullabilitySuffix nullabilitySuffix;
 
   /**
    * Initialize a newly created function type to be declared by the given
@@ -477,13 +426,13 @@
    * [typeParameters], which permits later substitution.
    */
   factory FunctionTypeImpl(FunctionTypedElement element,
-      {Nullability nullability = Nullability.indeterminate}) {
+      {NullabilitySuffix nullabilitySuffix = NullabilitySuffix.star}) {
     if (element is FunctionTypeAliasElement) {
       throw new StateError('Use FunctionTypeImpl.forTypedef for typedefs');
     }
     return new _FunctionTypeImplLazy._(
         element, null, null, null, null, null, false,
-        nullability: nullability);
+        nullabilitySuffix: nullabilitySuffix);
   }
 
   /**
@@ -494,10 +443,10 @@
    * See https://github.com/dart-lang/sdk/issues/34657.
    */
   factory FunctionTypeImpl.forTypedef(FunctionTypeAliasElement element,
-      {Nullability nullability = Nullability.indeterminate}) {
+      {NullabilitySuffix nullabilitySuffix = NullabilitySuffix.star}) {
     return new _FunctionTypeImplLazy._(
         element, element?.name, null, null, null, null, false,
-        nullability: nullability);
+        nullabilitySuffix: nullabilitySuffix);
   }
 
   /**
@@ -510,7 +459,7 @@
    */
   factory FunctionTypeImpl.fresh(FunctionType original,
       {bool force = false,
-      Nullability nullability = Nullability.indeterminate}) {
+      NullabilitySuffix nullabilitySuffix = NullabilitySuffix.star}) {
     // We build up a substitution for the type parameters,
     // {variablesFresh/variables} then apply it.
 
@@ -559,19 +508,19 @@
     function.typeParameters = freshVarElements;
     function.shareParameters(newType.parameters);
     return function.type =
-        new FunctionTypeImpl(function, nullability: nullability);
+        new FunctionTypeImpl(function, nullabilitySuffix: nullabilitySuffix);
   }
 
   /// Creates a function type that's not associated with any element in the
   /// element tree.
   factory FunctionTypeImpl.synthetic(DartType returnType,
       List<TypeParameterElement> typeFormals, List<ParameterElement> parameters,
-      {Nullability nullability = Nullability.indeterminate}) {
+      {NullabilitySuffix nullabilitySuffix = NullabilitySuffix.star}) {
     return new _FunctionTypeImplStrict._(returnType, typeFormals, parameters,
-        nullability: nullability);
+        nullabilitySuffix: nullabilitySuffix);
   }
 
-  FunctionTypeImpl._(Element element, String name, this.nullability)
+  FunctionTypeImpl._(Element element, String name, this.nullabilitySuffix)
       : super(element, name);
 
   @deprecated
@@ -930,7 +879,7 @@
       return this;
     }
     return new _FunctionTypeImplStrict._(returnType, typeFormals, parameters,
-        nullability: nullability);
+        nullabilitySuffix: nullabilitySuffix);
   }
 
   @override
@@ -1297,7 +1246,7 @@
  */
 class InterfaceTypeImpl extends TypeImpl implements InterfaceType {
   @override
-  final Nullability nullability;
+  final NullabilitySuffix nullabilitySuffix;
 
   /**
    * A list containing the actual types of the type arguments.
@@ -1340,7 +1289,7 @@
    * Initialize a newly created type to be declared by the given [element].
    */
   InterfaceTypeImpl(ClassElement element,
-      [this.prunedTypedefs, this.nullability = Nullability.indeterminate])
+      [this.prunedTypedefs, this.nullabilitySuffix = NullabilitySuffix.star])
       : super(element, element.displayName);
 
   /**
@@ -1349,14 +1298,14 @@
    */
   InterfaceTypeImpl.elementWithNameAndArgs(
       ClassElement element, String name, this._typeArgumentsComputer,
-      {this.nullability = Nullability.indeterminate})
+      {this.nullabilitySuffix = NullabilitySuffix.star})
       : prunedTypedefs = null,
         super(element, name) {
     _typeArguments = null;
   }
 
   InterfaceTypeImpl.explicit(ClassElement element, List<DartType> typeArguments,
-      {this.nullability = Nullability.indeterminate})
+      {this.nullabilitySuffix = NullabilitySuffix.star})
       : prunedTypedefs = null,
         _typeArguments = typeArguments,
         super(element, element.displayName);
@@ -1366,7 +1315,7 @@
    * should only be used in cases where there is no declaration of the type.
    */
   InterfaceTypeImpl.named(String name,
-      {this.nullability = Nullability.indeterminate})
+      {this.nullabilitySuffix = NullabilitySuffix.star})
       : prunedTypedefs = null,
         super(null, name);
 
@@ -1374,11 +1323,11 @@
    * Private constructor.
    */
   InterfaceTypeImpl._(Element element, String name, this.prunedTypedefs,
-      {this.nullability = Nullability.indeterminate})
+      {this.nullabilitySuffix = NullabilitySuffix.star})
       : super(element, name);
 
   InterfaceTypeImpl._withNullability(InterfaceTypeImpl original,
-      {this.nullability = Nullability.indeterminate})
+      {this.nullabilitySuffix = NullabilitySuffix.star})
       : _typeArguments = original._typeArguments,
         _typeArgumentsComputer = original._typeArgumentsComputer,
         prunedTypedefs = original.prunedTypedefs,
@@ -1505,6 +1454,15 @@
   }
 
   @override
+  bool get isDartCoreDouble {
+    ClassElement element = this.element;
+    if (element == null) {
+      return false;
+    }
+    return element.name == "double" && element.library.isDartCore;
+  }
+
+  @override
   bool get isDartCoreFunction {
     ClassElement element = this.element;
     if (element == null) {
@@ -1532,6 +1490,15 @@
   }
 
   @override
+  bool get isDartCoreString {
+    ClassElement element = this.element;
+    if (element == null) {
+      return false;
+    }
+    return element.name == "String" && element.library.isDartCore;
+  }
+
+  @override
   bool get isObject => element.supertype == null && !element.isMixin;
 
   @override
@@ -1639,6 +1606,26 @@
     }
   }
 
+  /**
+   * Return either this type or a supertype of this type that is defined by the
+   * [targetElement], or `null` if such a type does not exist. If this type
+   * inherits from the target element along multiple paths, then the returned type
+   * is arbitrary.
+   *
+   * For example, given the following definitions
+   * ```
+   * class A<E> {}
+   * class B<E> implements A<E> {}
+   * class C implements A<String> {}
+   * ```
+   * Asking the type `B<int>` for the type associated with `A` will return the
+   * type `A<int>`. Asking the type `C` for the type associated with `A` will
+   * return the type `A<String>`.
+   */
+  InterfaceType asInstanceOf(ClassElement targetElement) {
+    return _asInstanceOf(targetElement, new Set<ClassElement>());
+  }
+
   @override
   DartType flattenFutures(TypeSystem typeSystem) {
     // Implement the cases:
@@ -2191,7 +2178,7 @@
       // base types.
       assert(this.prunedTypedefs == null);
       InterfaceTypeImpl result = new InterfaceTypeImpl._(element, name, prune,
-          nullability: nullability);
+          nullabilitySuffix: nullabilitySuffix);
       result.typeArguments = typeArguments
           .map((DartType t) => (t as TypeImpl).pruned(prune))
           .toList();
@@ -2220,7 +2207,7 @@
       return this;
     } else {
       return new InterfaceTypeImpl._(element, name, prunedTypedefs,
-          nullability: nullability)
+          nullabilitySuffix: nullabilitySuffix)
         ..typeArguments = typeArguments;
     }
   }
@@ -2244,7 +2231,7 @@
     }
 
     InterfaceTypeImpl newType =
-        new InterfaceTypeImpl(element, prune, nullability);
+        new InterfaceTypeImpl(element, prune, nullabilitySuffix);
     newType.typeArguments = newTypeArguments;
     return newType;
   }
@@ -2255,9 +2242,47 @@
       instantiate(argumentTypes);
 
   @override
-  TypeImpl withNullability(Nullability nullability) {
-    if (this.nullability == nullability) return this;
-    return InterfaceTypeImpl._withNullability(this, nullability: nullability);
+  TypeImpl withNullability(NullabilitySuffix nullabilitySuffix) {
+    if (this.nullabilitySuffix == nullabilitySuffix) return this;
+    return InterfaceTypeImpl._withNullability(this,
+        nullabilitySuffix: nullabilitySuffix);
+  }
+
+  /**
+   * Return  either this type or a supertype of this type that is defined by the
+   * [targetElement], or `null` if such a type does not exist. The set of
+   * [visitedClasses] is used to prevent infinite recursion.
+   */
+  InterfaceType _asInstanceOf(
+      ClassElement targetElement, Set<ClassElement> visitedClasses) {
+    ClassElement thisElement = element;
+    if (thisElement == targetElement) {
+      return this;
+    } else if (visitedClasses.add(thisElement)) {
+      InterfaceType type;
+      for (InterfaceType mixin in mixins) {
+        type = (mixin as InterfaceTypeImpl)
+            ._asInstanceOf(targetElement, visitedClasses);
+        if (type != null) {
+          return type;
+        }
+      }
+      if (superclass != null) {
+        type = (superclass as InterfaceTypeImpl)
+            ._asInstanceOf(targetElement, visitedClasses);
+        if (type != null) {
+          return type;
+        }
+      }
+      for (InterfaceType interface in interfaces) {
+        type = (interface as InterfaceTypeImpl)
+            ._asInstanceOf(targetElement, visitedClasses);
+        if (type != null) {
+          return type;
+        }
+      }
+    }
+    return null;
   }
 
   /**
@@ -2607,16 +2632,19 @@
       }
     }
 
-    Nullability computeNullability() {
-      Nullability first = (firstType as InterfaceTypeImpl).nullability;
-      Nullability second = (secondType as InterfaceTypeImpl).nullability;
-      if (first == Nullability.nullable || second == Nullability.nullable) {
-        return Nullability.nullable;
-      } else if (first == Nullability.indeterminate ||
-          second == Nullability.indeterminate) {
-        return Nullability.indeterminate;
+    NullabilitySuffix computeNullability() {
+      NullabilitySuffix first =
+          (firstType as InterfaceTypeImpl).nullabilitySuffix;
+      NullabilitySuffix second =
+          (secondType as InterfaceTypeImpl).nullabilitySuffix;
+      if (first == NullabilitySuffix.question ||
+          second == NullabilitySuffix.question) {
+        return NullabilitySuffix.question;
+      } else if (first == NullabilitySuffix.star ||
+          second == NullabilitySuffix.star) {
+        return NullabilitySuffix.star;
       }
-      return Nullability.nonNullable;
+      return NullabilitySuffix.none;
     }
 
     InterfaceTypeImpl lub =
@@ -2686,24 +2714,35 @@
 }
 
 /**
- * The nullability of a type.
+ * Suffix indicating the nullability of a type.
+ *
+ * This enum describes whether a `?` or `*` would be used at the end of the
+ * canonical representation of a type.  It's subtly different the notions of
+ * "nullable", "non-nullable", "potentially nullable", and "potentially
+ * non-nullable" defined by the spec.  For example, the type `Null` is nullable,
+ * even though it lacks a trailing `?`.
  */
-enum Nullability {
+enum NullabilitySuffix {
   /**
-   * An indication that the type includes the value `null`.
+   * An indication that the canonical representation of the type under
+   * consideration ends with `?`.  Types having this nullability suffix should
+   * be interpreted as being unioned with the Null type.
    */
-  nullable,
+  question,
 
   /**
-   * An indication that the type is a legacy type which may be interpreted as
-   * either nullable or non-nullable as appropriate.
+   * An indication that the canonical representation of the type under
+   * consideration ends with `*`.  Types having this nullability suffix are
+   * called "legacy types"; it has not yet been determined whether they should
+   * be unioned with the Null type.
    */
-  indeterminate,
+  star,
 
   /**
-   * An indication that the type does not include the value `null`.
+   * An indication that the canonical representation of the type under
+   * consideration does not end with either `?` or `*`.
    */
-  nonNullable
+  none
 }
 
 /**
@@ -2747,6 +2786,9 @@
   bool get isDartCoreBool => false;
 
   @override
+  bool get isDartCoreDouble => false;
+
+  @override
   bool get isDartCoreFunction => false;
 
   @override
@@ -2756,6 +2798,9 @@
   bool get isDartCoreNull => false;
 
   @override
+  bool get isDartCoreString => false;
+
+  @override
   bool get isDynamic => false;
 
   @override
@@ -2768,9 +2813,9 @@
   bool get isVoid => false;
 
   /**
-   * Return the nullability of this type.
+   * Return the nullability suffix of this type.
    */
-  Nullability get nullability;
+  NullabilitySuffix get nullabilitySuffix;
 
   /**
    * Append a textual representation of this type to the given [buffer]. The set
@@ -2901,20 +2946,24 @@
   }
 
   /**
-   * Return the same type, but with the given [nullability].
+   * Return the same type, but with the given [nullabilitySuffix].
    */
-  TypeImpl withNullability(Nullability nullability);
+  TypeImpl withNullability(NullabilitySuffix nullabilitySuffix);
 
   void _appendNullability(StringBuffer buffer) {
-    switch (nullability) {
-      case Nullability.nullable:
+    if (isDynamic || isBottom || isVoid) {
+      // These types don't have nullability variations, so don't append
+      // anything.
+      return;
+    }
+    switch (nullabilitySuffix) {
+      case NullabilitySuffix.question:
         buffer.write('?');
         break;
-      case Nullability.indeterminate:
+      case NullabilitySuffix.star:
         buffer.write('*');
         break;
-      case Nullability.nonNullable:
-        buffer.write('!');
+      case NullabilitySuffix.none:
         break;
     }
   }
@@ -3002,14 +3051,14 @@
   static bool _appendingBounds = false;
 
   @override
-  final Nullability nullability;
+  final NullabilitySuffix nullabilitySuffix;
 
   /**
    * Initialize a newly created type parameter type to be declared by the given
    * [element] and to have the given name.
    */
   TypeParameterTypeImpl(TypeParameterElement element,
-      {this.nullability = Nullability.indeterminate})
+      {this.nullabilitySuffix = NullabilitySuffix.star})
       : super(element, element.name);
 
   @override
@@ -3173,16 +3222,16 @@
         }
 
         // TODO(scheglov) Proposed substitution rules for nullability.
-        Nullability resultNullability;
-        Nullability argumentNullability = argumentType.nullability;
-        if (argumentNullability == Nullability.nullable ||
-            nullability == Nullability.nullable) {
-          resultNullability = Nullability.nullable;
-        } else if (argumentNullability == Nullability.indeterminate ||
-            nullability == Nullability.indeterminate) {
-          resultNullability = Nullability.indeterminate;
+        NullabilitySuffix resultNullability;
+        NullabilitySuffix argumentNullability = argumentType.nullabilitySuffix;
+        if (argumentNullability == NullabilitySuffix.question ||
+            nullabilitySuffix == NullabilitySuffix.question) {
+          resultNullability = NullabilitySuffix.question;
+        } else if (argumentNullability == NullabilitySuffix.star ||
+            nullabilitySuffix == NullabilitySuffix.star) {
+          resultNullability = NullabilitySuffix.star;
         } else {
-          resultNullability = Nullability.nonNullable;
+          resultNullability = NullabilitySuffix.none;
         }
 
         return argumentType.withNullability(resultNullability);
@@ -3192,9 +3241,9 @@
   }
 
   @override
-  TypeImpl withNullability(Nullability nullability) {
-    if (this.nullability == nullability) return this;
-    return TypeParameterTypeImpl(element, nullability: nullability);
+  TypeImpl withNullability(NullabilitySuffix nullabilitySuffix) {
+    if (this.nullabilitySuffix == nullabilitySuffix) return this;
+    return TypeParameterTypeImpl(element, nullabilitySuffix: nullabilitySuffix);
   }
 
   /**
@@ -3244,7 +3293,7 @@
   bool get isUndefined => true;
 
   @override
-  Nullability get nullability => Nullability.indeterminate;
+  NullabilitySuffix get nullabilitySuffix => NullabilitySuffix.star;
 
   @override
   bool operator ==(Object object) => identical(object, this);
@@ -3293,7 +3342,7 @@
   }
 
   @override
-  TypeImpl withNullability(Nullability nullability) => this;
+  TypeImpl withNullability(NullabilitySuffix nullabilitySuffix) => this;
 }
 
 /**
@@ -3312,33 +3361,12 @@
   /**
    * The unique instance of this class, with indeterminate nullability.
    */
-  static final VoidTypeImpl instance = instanceIndeterminate;
-
-  /**
-   * The unique instance of this class, nullable.
-   */
-  static final VoidTypeImpl instanceNullable =
-      new VoidTypeImpl._(Nullability.nullable);
-
-  /**
-   * The unique instance of this class, with indeterminate nullability.
-   */
-  static final VoidTypeImpl instanceIndeterminate =
-      new VoidTypeImpl._(Nullability.indeterminate);
-
-  /**
-   * The unique instance of this class, non-nullable.
-   */
-  static final VoidTypeImpl instanceNonNullable =
-      new VoidTypeImpl._(Nullability.nonNullable);
-
-  @override
-  final Nullability nullability;
+  static final VoidTypeImpl instance = new VoidTypeImpl._();
 
   /**
    * Prevent the creation of instances of this class.
    */
-  VoidTypeImpl._(this.nullability) : super(null, Keyword.VOID.lexeme);
+  VoidTypeImpl._() : super(null, Keyword.VOID.lexeme);
 
   @override
   int get hashCode => 2;
@@ -3347,6 +3375,9 @@
   bool get isVoid => true;
 
   @override
+  NullabilitySuffix get nullabilitySuffix => NullabilitySuffix.none;
+
+  @override
   bool operator ==(Object object) => identical(object, this);
 
   @override
@@ -3383,16 +3414,9 @@
       this;
 
   @override
-  TypeImpl withNullability(Nullability nullability) {
-    switch (nullability) {
-      case Nullability.nullable:
-        return instanceNullable;
-      case Nullability.indeterminate:
-        return instanceIndeterminate;
-      case Nullability.nonNullable:
-        return instanceNonNullable;
-    }
-    throw StateError('Unexpected nullability: $nullability');
+  TypeImpl withNullability(NullabilitySuffix nullabilitySuffix) {
+    // The void type is always nullable.
+    return this;
   }
 }
 
@@ -3445,9 +3469,9 @@
       this._returnType,
       this._parameters,
       this._isInstantiated,
-      {Nullability nullability = Nullability.indeterminate})
+      {NullabilitySuffix nullabilitySuffix = NullabilitySuffix.star})
       : _typeParameters = null,
-        super._(element, name, nullability);
+        super._(element, name, nullabilitySuffix);
 
   /**
    * Return the base parameter elements of this function element.
@@ -3654,7 +3678,7 @@
 
     return new _FunctionTypeImplLazy._(element, name, prunedTypedefs,
         newTypeArgs, _returnType, _parameters, true,
-        nullability: nullability);
+        nullabilitySuffix: nullabilitySuffix);
   }
 
   @override
@@ -3676,7 +3700,7 @@
           .toList(growable: false);
       return new _FunctionTypeImplLazy._(element, name, prune, typeArgs,
           _returnType, _parameters, _isInstantiated,
-          nullability: nullability);
+          nullabilitySuffix: nullabilitySuffix);
     }
   }
 
@@ -3705,15 +3729,15 @@
         TypeImpl.substitute(typeArguments, argumentTypes, parameterTypes);
     return new _FunctionTypeImplLazy._(element, name, prune, typeArgs,
         _returnType, _parameters, _isInstantiated,
-        nullability: nullability);
+        nullabilitySuffix: nullabilitySuffix);
   }
 
   @override
-  TypeImpl withNullability(Nullability nullability) {
-    if (this.nullability == nullability) return this;
+  TypeImpl withNullability(NullabilitySuffix nullabilitySuffix) {
+    if (this.nullabilitySuffix == nullabilitySuffix) return this;
     return _FunctionTypeImplLazy._(element, name, prunedTypedefs,
         _typeArguments, _returnType, _parameters, _isInstantiated,
-        nullability: nullability);
+        nullabilitySuffix: nullabilitySuffix);
   }
 
   @override
@@ -3761,8 +3785,8 @@
   final List<ParameterElement> parameters;
 
   _FunctionTypeImplStrict._(this.returnType, this.typeFormals, this.parameters,
-      {Nullability nullability = Nullability.indeterminate})
-      : super._(null, null, nullability);
+      {NullabilitySuffix nullabilitySuffix = NullabilitySuffix.star})
+      : super._(null, null, nullabilitySuffix);
 
   @override
   List<TypeParameterElement> get boundTypeParameters => typeFormals;
@@ -3818,7 +3842,7 @@
         returnType.substitute2(argumentTypes, parameterTypes),
         const [],
         _transformOrShare(parameters, transformParameter),
-        nullability: nullability);
+        nullabilitySuffix: nullabilitySuffix);
   }
 
   @override
@@ -3878,14 +3902,14 @@
     }
     return new _FunctionTypeImplStrict._(
         newReturnType, newTypeFormals, newParameters,
-        nullability: nullability);
+        nullabilitySuffix: nullabilitySuffix);
   }
 
   @override
-  TypeImpl withNullability(Nullability nullability) {
-    if (this.nullability == nullability) return this;
+  TypeImpl withNullability(NullabilitySuffix nullabilitySuffix) {
+    if (this.nullabilitySuffix == nullabilitySuffix) return this;
     return _FunctionTypeImplStrict._(returnType, typeFormals, parameters,
-        nullability: nullability);
+        nullabilitySuffix: nullabilitySuffix);
   }
 
   @override
diff --git a/pkg/analyzer/lib/src/dart/element/type_algebra.dart b/pkg/analyzer/lib/src/dart/element/type_algebra.dart
new file mode 100644
index 0000000..dbf57f9
--- /dev/null
+++ b/pkg/analyzer/lib/src/dart/element/type_algebra.dart
@@ -0,0 +1,347 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type_visitor.dart';
+
+/// Generates a fresh copy of the given type parameters, with their bounds
+/// substituted to reference the new parameters.
+///
+/// The returned object contains the fresh type parameter list as well as a
+/// mapping to be used for replacing other types to use the new type parameters.
+FreshTypeParameters getFreshTypeParameters(
+    List<TypeParameterElement> typeParameters) {
+  var freshParameters = new List<TypeParameterElementImpl>.generate(
+    typeParameters.length,
+    (i) => new TypeParameterElementImpl(typeParameters[i].name, -1),
+    growable: true,
+  );
+
+  var map = <TypeParameterElement, DartType>{};
+  for (int i = 0; i < typeParameters.length; ++i) {
+    map[typeParameters[i]] = new TypeParameterTypeImpl(freshParameters[i]);
+  }
+
+  var substitution = Substitution.fromMap(map);
+
+  for (int i = 0; i < typeParameters.length; ++i) {
+    var bound = typeParameters[i].bound;
+    if (bound != null) {
+      var newBound = substitution.substituteType(bound);
+      freshParameters[i].bound = newBound;
+    }
+  }
+
+  return new FreshTypeParameters(freshParameters, substitution);
+}
+
+/// Returns a type where all occurrences of the given type parameters have been
+/// replaced with the corresponding types.
+///
+/// This will copy only the sub-terms of [type] that contain substituted
+/// variables; all other [DartType] objects will be reused.
+///
+/// In particular, if no type parameters were substituted, this is guaranteed
+/// to return the [type] instance (not a copy), so the caller may use
+/// [identical] to efficiently check if a distinct type was created.
+DartType substitute(
+  DartType type,
+  Map<TypeParameterElement, DartType> substitution,
+) {
+  if (substitution.isEmpty) {
+    return type;
+  }
+  return Substitution.fromMap(substitution).substituteType(type);
+}
+
+class FreshTypeParameters {
+  final List<TypeParameterElement> freshTypeParameters;
+  final Substitution substitution;
+
+  FreshTypeParameters(this.freshTypeParameters, this.substitution);
+
+  FunctionType applyToFunctionType(FunctionType type) {
+    return new FunctionTypeImpl.synthetic(
+      substitute(type.returnType),
+      freshTypeParameters,
+      type.parameters.map((parameter) {
+        return ParameterElementImpl.synthetic(
+          parameter.name,
+          substitute(parameter.type),
+          // ignore: deprecated_member_use_from_same_package
+          parameter.parameterKind,
+        );
+      }).toList(),
+    );
+  }
+
+  DartType substitute(DartType type) => substitution.substituteType(type);
+}
+
+abstract class Substitution {
+  static const Substitution empty = _NullSubstitution.instance;
+
+  const Substitution();
+
+  DartType getSubstitute(TypeParameterElement parameter, bool upperBound);
+
+  DartType substituteType(DartType type, {bool contravariant: false}) {
+    return new _TopSubstitutor(this, contravariant).visit(type);
+  }
+
+  /// Substitutes the type parameters on the class of [type] with the
+  /// type arguments provided in [type].
+  static Substitution fromInterfaceType(InterfaceType type) {
+    if (type.typeArguments.isEmpty) {
+      return _NullSubstitution.instance;
+    }
+    return fromPairs(type.element.typeParameters, type.typeArguments);
+  }
+
+  /// Substitutes each parameter to the type it maps to in [map].
+  static Substitution fromMap(Map<TypeParameterElement, DartType> map) {
+    if (map.isEmpty) {
+      return _NullSubstitution.instance;
+    }
+    return new _MapSubstitution(map, map);
+  }
+
+  /// Substitutes the Nth parameter in [parameters] with the Nth type in
+  /// [types].
+  static Substitution fromPairs(
+    List<TypeParameterElement> parameters,
+    List<DartType> types,
+  ) {
+    assert(parameters.length == types.length);
+    if (parameters.isEmpty) {
+      return _NullSubstitution.instance;
+    }
+    return fromMap(
+      new Map<TypeParameterElement, DartType>.fromIterables(
+        parameters,
+        types,
+      ),
+    );
+  }
+
+  /// Substitutes all occurrences of the given type parameters with the
+  /// corresponding upper or lower bound, depending on the variance of the
+  /// context where it occurs.
+  ///
+  /// For example the type `(T) => T` with the bounds `bottom <: T <: num`
+  /// becomes `(bottom) => num` (in this example, `num` is the upper bound,
+  /// and `bottom` is the lower bound).
+  ///
+  /// This is a way to obtain an upper bound for a type while eliminating all
+  /// references to certain type variables.
+  static Substitution fromUpperAndLowerBounds(
+    Map<TypeParameterElement, DartType> upper,
+    Map<TypeParameterElement, DartType> lower,
+  ) {
+    if (upper.isEmpty && lower.isEmpty) {
+      return _NullSubstitution.instance;
+    }
+    return new _MapSubstitution(upper, lower);
+  }
+}
+
+class _FreshTypeParametersSubstitutor extends _TypeSubstitutor {
+  final Map<TypeParameterElement, DartType> substitution = {};
+
+  _FreshTypeParametersSubstitutor(_TypeSubstitutor outer) : super(outer);
+
+  TypeParameterElement freshTypeParameter(TypeParameterElement element) {
+    var freshElement = new TypeParameterElementImpl(element.name, -1);
+    var freshType = new TypeParameterTypeImpl(freshElement);
+    freshElement.type = freshType;
+    substitution[element] = freshType;
+    if (element.bound != null) {
+      freshElement.bound = visit(element.bound);
+    }
+    return freshElement;
+  }
+
+  DartType lookup(TypeParameterElement parameter, bool upperBound) {
+    return substitution[parameter];
+  }
+}
+
+class _MapSubstitution extends Substitution {
+  final Map<TypeParameterElement, DartType> upper;
+  final Map<TypeParameterElement, DartType> lower;
+
+  _MapSubstitution(this.upper, this.lower);
+
+  DartType getSubstitute(TypeParameterElement parameter, bool upperBound) {
+    return upperBound ? upper[parameter] : lower[parameter];
+  }
+}
+
+class _NullSubstitution extends Substitution {
+  static const _NullSubstitution instance = const _NullSubstitution();
+
+  const _NullSubstitution();
+
+  DartType getSubstitute(TypeParameterElement parameter, bool upperBound) {
+    return new TypeParameterTypeImpl(parameter);
+  }
+
+  @override
+  DartType substituteType(DartType type, {bool contravariant: false}) => type;
+}
+
+class _TopSubstitutor extends _TypeSubstitutor {
+  final Substitution substitution;
+
+  _TopSubstitutor(this.substitution, bool contravariant) : super(null) {
+    if (contravariant) {
+      invertVariance();
+    }
+  }
+
+  @override
+  TypeParameterElement freshTypeParameter(TypeParameterElement element) {
+    throw 'Create a fresh environment first';
+  }
+
+  @override
+  DartType lookup(TypeParameterElement parameter, bool upperBound) {
+    return substitution.getSubstitute(parameter, upperBound);
+  }
+}
+
+abstract class _TypeSubstitutor extends DartTypeVisitor<DartType> {
+  final _TypeSubstitutor outer;
+  bool covariantContext = true;
+
+  /// The number of times a variable from this environment has been used in
+  /// a substitution.
+  ///
+  /// There is a strict requirement that we must return the same instance for
+  /// types that were not altered by the substitution.  This counter lets us
+  /// check quickly if anything happened in a substitution.
+  int useCounter = 0;
+
+  _TypeSubstitutor(this.outer) {
+    covariantContext = outer == null ? true : outer.covariantContext;
+  }
+
+  void bumpCountersUntil(_TypeSubstitutor target) {
+    var substitutor = this;
+    while (substitutor != target) {
+      substitutor.useCounter++;
+      substitutor = substitutor.outer;
+    }
+    target.useCounter++;
+  }
+
+  TypeParameterElement freshTypeParameter(TypeParameterElement element);
+
+  List<TypeParameterElement> freshTypeParameters(
+      List<TypeParameterElement> parameters) {
+    if (parameters.isEmpty) {
+      return const <TypeParameterElement>[];
+    }
+    return parameters.map(freshTypeParameter).toList();
+  }
+
+  DartType getSubstitute(TypeParameterElement parameter) {
+    var environment = this;
+    while (environment != null) {
+      var replacement = environment.lookup(parameter, covariantContext);
+      if (replacement != null) {
+        bumpCountersUntil(environment);
+        return replacement;
+      }
+      environment = environment.outer;
+    }
+    return null;
+  }
+
+  void invertVariance() {
+    covariantContext = !covariantContext;
+  }
+
+  DartType lookup(TypeParameterElement parameter, bool upperBound);
+
+  _FreshTypeParametersSubstitutor newInnerEnvironment() {
+    return new _FreshTypeParametersSubstitutor(this);
+  }
+
+  DartType visit(DartType type) {
+    return DartTypeVisitor.visit(type, this);
+  }
+
+  @override
+  DartType visitBottomType(BottomTypeImpl type) => type;
+
+  @override
+  DartType visitDynamicType(DynamicTypeImpl type) => type;
+
+  @override
+  DartType visitFunctionType(FunctionType type) {
+    // This is a bit tricky because we have to generate fresh type parameters
+    // in order to change the bounds.  At the same time, if the function type
+    // was unaltered, we have to return the [type] object (not a copy!).
+    // Substituting a type for a fresh type variable should not be confused
+    // with a "real" substitution.
+    //
+    // Create an inner environment to generate fresh type parameters.  The use
+    // counter on the inner environment tells if the fresh type parameters have
+    // any uses, but does not tell if the resulting function type is distinct.
+    // Our own use counter will get incremented if something from our
+    // environment has been used inside the function.
+    var inner = type.typeFormals.isEmpty ? this : newInnerEnvironment();
+    int before = this.useCounter;
+
+    // Invert the variance when translating parameters.
+    inner.invertVariance();
+
+    var typeFormals = inner.freshTypeParameters(type.typeFormals);
+
+    var parameters = type.parameters.map((parameter) {
+      var type = inner.visit(parameter.type);
+      return ParameterElementImpl.synthetic(
+        parameter.name,
+        type,
+        // ignore: deprecated_member_use_from_same_package
+        parameter.parameterKind,
+      );
+    }).toList();
+
+    inner.invertVariance();
+
+    var returnType = inner.visit(type.returnType);
+
+    if (this.useCounter == before) return type;
+
+    return FunctionTypeImpl.synthetic(returnType, typeFormals, parameters);
+  }
+
+  @override
+  DartType visitInterfaceType(InterfaceType type) {
+    if (type.typeArguments.isEmpty) {
+      return type;
+    }
+
+    int before = useCounter;
+    var typeArguments = type.typeArguments.map(visit).toList();
+    if (useCounter == before) {
+      return type;
+    }
+
+    return new InterfaceTypeImpl.explicit(type.element, typeArguments);
+  }
+
+  @override
+  DartType visitTypeParameterType(TypeParameterType type) {
+    return getSubstitute(type.element) ?? type;
+  }
+
+  @override
+  DartType visitVoidType(VoidType type) => type;
+}
diff --git a/pkg/analyzer/lib/src/dart/element/type_visitor.dart b/pkg/analyzer/lib/src/dart/element/type_visitor.dart
new file mode 100644
index 0000000..6b0ffbe
--- /dev/null
+++ b/pkg/analyzer/lib/src/dart/element/type_visitor.dart
@@ -0,0 +1,46 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type.dart';
+
+class DartTypeVisitor<R> {
+  const DartTypeVisitor();
+
+  R defaultDartType(DartType type) => null;
+
+  R visitBottomType(BottomTypeImpl type) => defaultDartType(type);
+
+  R visitDynamicType(DynamicTypeImpl type) => defaultDartType(type);
+
+  R visitFunctionType(FunctionType type) => defaultDartType(type);
+
+  R visitInterfaceType(InterfaceType type) => defaultDartType(type);
+
+  R visitTypeParameterType(TypeParameterType type) => defaultDartType(type);
+
+  R visitVoidType(VoidType type) => defaultDartType(type);
+
+  static R visit<R>(DartType type, DartTypeVisitor<R> visitor) {
+    if (type is BottomTypeImpl) {
+      return visitor.visitBottomType(type);
+    }
+    if (type is DynamicTypeImpl) {
+      return visitor.visitDynamicType(type);
+    }
+    if (type is FunctionType) {
+      return visitor.visitFunctionType(type);
+    }
+    if (type is InterfaceType) {
+      return visitor.visitInterfaceType(type);
+    }
+    if (type is TypeParameterType) {
+      return visitor.visitTypeParameterType(type);
+    }
+    if (type is VoidType) {
+      return visitor.visitVoidType(type);
+    }
+    throw UnimplementedError('(${type.runtimeType}) $type');
+  }
+}
diff --git a/pkg/analyzer/lib/src/dart/element/wrapped.dart b/pkg/analyzer/lib/src/dart/element/wrapped.dart
index 10c3f75..5aebd1d 100644
--- a/pkg/analyzer/lib/src/dart/element/wrapped.dart
+++ b/pkg/analyzer/lib/src/dart/element/wrapped.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -71,6 +71,9 @@
   bool get hasLoadLibraryFunction => wrappedUnit.hasLoadLibraryFunction;
 
   @override
+  bool get hasOptionalTypeArgs => wrappedUnit.hasOptionalTypeArgs;
+
+  @override
   bool get hasOverride => wrappedUnit.hasOverride;
 
   @override
@@ -261,6 +264,9 @@
   bool get hasLiteral => wrappedImport.hasLiteral;
 
   @override
+  bool get hasOptionalTypeArgs => wrappedImport.hasOptionalTypeArgs;
+
+  @override
   bool get hasOverride => wrappedImport.hasOverride;
 
   @override
@@ -466,6 +472,9 @@
   bool get hasLoadLibraryFunction => wrappedLib.hasLoadLibraryFunction;
 
   @override
+  bool get hasOptionalTypeArgs => wrappedLib.hasOptionalTypeArgs;
+
+  @override
   bool get hasOverride => wrappedLib.hasOverride;
 
   @override
diff --git a/pkg/analyzer/lib/src/dart/error/hint_codes.dart b/pkg/analyzer/lib/src/dart/error/hint_codes.dart
index 185e224..ef261f3 100644
--- a/pkg/analyzer/lib/src/dart/error/hint_codes.dart
+++ b/pkg/analyzer/lib/src/dart/error/hint_codes.dart
@@ -178,6 +178,36 @@
               "rename the function in the imported library.");
 
   /**
+   * When "strict-inference" is enabled, collection literal types must be
+   * inferred via the context type, or have type arguments.
+   */
+  static const HintCode INFERENCE_FAILURE_ON_COLLECTION_LITERAL = HintCode(
+      'INFERENCE_FAILURE_ON_COLLECTION_LITERAL',
+      "The type argument(s) of '{0}' cannot be inferred.",
+      correction: "Use explicit type argument(s) for '{0}'.");
+
+  /**
+   * When "strict-inference" is enabled, types in instance creation
+   * (constructor calls) must be inferred via the context type, or have type
+   * arguments.
+   */
+  static const HintCode INFERENCE_FAILURE_ON_INSTANCE_CREATION = HintCode(
+      'INFERENCE_FAILURE_ON_INSTANCE_CREATION',
+      "The type argument(s) of '{0}' cannot be inferred.",
+      correction: "Use explicit type argument(s) for '{0}'.");
+
+  /**
+   * When "strict-inference" in enabled, uninitialized variables must be
+   * declared with a specific type.
+   */
+  static const HintCode INFERENCE_FAILURE_ON_UNINITIALIZED_VARIABLE =
+      const HintCode(
+          'INFERENCE_FAILURE_ON_UNINITIALIZED_VARIABLE',
+          "The type of {0} cannot be inferred without either a type or "
+          "initializer.",
+          correction: "Try specifying the type of the variable.");
+
+  /**
    * This hint is generated anywhere a @factory annotation is associated with
    * anything other than a method.
    */
@@ -303,6 +333,8 @@
   /**
    * Hint for the `x is int` type checks.
    */
+  // TODO(brianwilkerson) This hint isn't being generated. Decide whether to
+  //  generate it or remove it.
   static const HintCode IS_INT = const HintCode(
       'IS_INT',
       "When compiled to JS, this test might return true when the left hand "
@@ -321,6 +353,8 @@
   /**
    * Hint for the `x is! int` type checks.
    */
+  // TODO(brianwilkerson) This hint isn't being generated. Decide whether to
+  //  generate it or remove it.
   static const HintCode IS_NOT_INT = const HintCode(
       'IS_NOT_INT',
       "When compiled to JS, this test might return false when the left hand "
@@ -531,6 +565,89 @@
           "Try either importing 'dart:async' or updating the SDK constraints.");
 
   /**
+   * An as expression being used in a const context is expected to run on
+   * versions of the SDK that did not support them.
+   */
+  static const HintCode SDK_VERSION_AS_EXPRESSION_IN_CONST_CONTEXT =
+      const HintCode(
+          'SDK_VERSION_AS_EXPRESSION_IN_CONST_CONTEXT',
+          "The use of an as expression in a constant expression wasn't "
+          "supported until version 2.2.2, but this code is required to be able "
+          "to run on earlier versions.",
+          correction: "Try updating the SDK constraints.");
+
+  /**
+   * The operator '&', '|' or '^' is being used on boolean values in code that
+   * is expected to run on versions of the SDK that did not support it.
+   */
+  static const HintCode SDK_VERSION_BOOL_OPERATOR = const HintCode(
+      'SDK_VERSION_BOOL_OPERATOR',
+      "Using the operator '{0}' for 'bool's was not supported until version "
+      "2.2.2, but this code is required to be able to run on earlier versions.",
+      correction: "Try updating the SDK constraints.");
+
+  /**
+   * The operator '==' is being used on non-primitive values in code that
+   * is expected to run on versions of the SDK that did not support it.
+   */
+  static const HintCode SDK_VERSION_EQ_EQ_OPERATOR_IN_CONST_CONTEXT = const HintCode(
+      'SDK_VERSION_EQ_EQ_OPERATOR_IN_CONST_CONTEXT',
+      "Using the operator '==' for non-primitive types was not supported until "
+      "version 2.2.2, but this code is required to be able to run on earlier "
+      "versions.",
+      correction: "Try updating the SDK constraints.");
+
+  /**
+   * The operator '>>>' is being used in code that is expected to run on
+   * versions of the SDK that did not support it.
+   */
+  static const HintCode SDK_VERSION_GT_GT_GT_OPERATOR = const HintCode(
+      'SDK_VERSION_GT_GT_GT_OPERATOR',
+      "The operator '>>>' was not supported until version 2.2.2, but this code "
+      "is required to be able to run on earlier versions.",
+      correction: "Try updating the SDK constraints.");
+
+  /**
+   * An is expression being used in a const context is expected to run on
+   * versions of the SDK that did not support them.
+   */
+  static const HintCode SDK_VERSION_IS_EXPRESSION_IN_CONST_CONTEXT =
+      const HintCode(
+          'SDK_VERSION_IS_EXPRESSION_IN_CONST_CONTEXT',
+          "The use of an is expression in a constant expression wasn't "
+          "supported until version 2.2.2, but this code is required to be able "
+          "to run on earlier versions.",
+          correction: "Try updating the SDK constraints.");
+
+  /**
+   * A set literal is being used in code that is expected to run on versions of
+   * the SDK that did not support them.
+   */
+  static const HintCode SDK_VERSION_SET_LITERAL = const HintCode(
+      'SDK_VERSION_SET_LITERAL',
+      "Set literals were not supported until version 2.2, "
+      "but this code is required to be able to run on earlier versions.",
+      correction: "Try updating the SDK constraints.");
+
+  /**
+   * The for, if or spread element is being used in code that is expected to run
+   * on versions of the SDK that did not support them.
+   */
+  static const HintCode SDK_VERSION_UI_AS_CODE = const HintCode(
+      'SDK_VERSION_UI_AS_CODE',
+      "The for, if and spread elements were not supported until version 2.2.2, "
+      "but this code is required to be able to run on earlier versions.",
+      correction: "Try updating the SDK constraints.");
+
+  /**
+   * When "strict-raw-types" is enabled, raw types must be inferred via the
+   * context type, or have type arguments.
+   */
+  static const HintCode STRICT_RAW_TYPE = HintCode('STRICT_RAW_TYPE',
+      "The generic type '{0}' should have explicit type arguments but doesn't.",
+      correction: "Use explicit type arguments for '{0}'.");
+
+  /**
    * This hint is generated anywhere where a `@sealed` class or mixin is used as
    * a super-type of a class.
    */
@@ -586,6 +703,14 @@
   static const HintCode UNNECESSARY_NO_SUCH_METHOD = const HintCode(
       'UNNECESSARY_NO_SUCH_METHOD', "Unnecessary 'noSuchMethod' declaration.",
       correction: "Try removing the declaration of 'noSuchMethod'.");
+  /**
+   * When the '?.' operator is used on a target that we know to be non-null,
+   * it is unnecessary.
+   */
+  static const HintCode UNNECESSARY_NULL_AWARE_CALL = const HintCode(
+      'UNNECESSARY_NULL_AWARE_CALL',
+      "The target expression cannot be null, and so '?.' is not necessary.",
+      correction: "Replace the '?.' with a '.' in the invocation.");
 
   /**
    * Unnecessary type checks, the result is always false.
diff --git a/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart b/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
index 2d00fd9..de2684c 100644
--- a/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
+++ b/pkg/analyzer/lib/src/dart/error/syntactic_errors.dart
@@ -65,7 +65,8 @@
 
   static const ParserErrorCode COLON_IN_PLACE_OF_IN = _COLON_IN_PLACE_OF_IN;
 
-  static const ParserErrorCode CONST_AFTER_FACTORY = _CONST_AFTER_FACTORY;
+  // TODO(danrubel): Remove this unused error code
+  static const ParserErrorCode CONST_AFTER_FACTORY = _MODIFIER_OUT_OF_ORDER;
 
   static const ParserErrorCode CONST_AND_COVARIANT = _CONST_AND_COVARIANT;
 
@@ -163,6 +164,8 @@
       'EXPECTED_CLASS_MEMBER', "Expected a class member.",
       correction: "Try placing this code inside a class member.");
 
+  static const ParserErrorCode EXPECTED_ELSE_OR_COMMA = _EXPECTED_ELSE_OR_COMMA;
+
   static const ParserErrorCode EXPECTED_EXECUTABLE = const ParserErrorCode(
       'EXPECTED_EXECUTABLE',
       "Expected a method, getter, setter or operator declaration.",
@@ -189,6 +192,8 @@
   static const ParserErrorCode EXPECTED_TYPE_NAME =
       const ParserErrorCode('EXPECTED_TYPE_NAME', "Expected a type name.");
 
+  static const ParserErrorCode EXPERIMENT_NOT_ENABLED = _EXPERIMENT_NOT_ENABLED;
+
   static const ParserErrorCode EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE =
       _EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE;
 
@@ -375,11 +380,17 @@
       "The modifier 'async*' isn't allowed for an expression function body.",
       correction: "Try converting the body to a block.");
 
+  static const ParserErrorCode INVALID_SUPER_IN_INITIALIZER =
+      _INVALID_SUPER_IN_INITIALIZER;
+
   static const ParserErrorCode INVALID_SYNC = const ParserErrorCode(
       'INVALID_SYNC',
       "The modifier 'sync' isn't allowed for an expression function body.",
       correction: "Try converting the body to a block.");
 
+  static const ParserErrorCode INVALID_THIS_IN_INITIALIZER =
+      _INVALID_THIS_IN_INITIALIZER;
+
   static const ParserErrorCode INVALID_UNICODE_ESCAPE = _INVALID_UNICODE_ESCAPE;
 
   static const ParserErrorCode LIBRARY_DIRECTIVE_NOT_FIRST =
@@ -511,6 +522,8 @@
       "Can't have both positional and named parameters in a single parameter list.",
       correction: "Try choosing a single style of optional parameters.");
 
+  static const ParserErrorCode MODIFIER_OUT_OF_ORDER = _MODIFIER_OUT_OF_ORDER;
+
   static const ParserErrorCode MULTIPLE_EXTENDS_CLAUSES =
       _MULTIPLE_EXTENDS_CLAUSES;
 
@@ -683,6 +696,8 @@
   static const ParserErrorCode TYPE_ARGUMENTS_ON_TYPE_VARIABLE =
       _TYPE_ARGUMENTS_ON_TYPE_VARIABLE;
 
+  static const ParserErrorCode TYPE_BEFORE_FACTORY = _TYPE_BEFORE_FACTORY;
+
   static const ParserErrorCode TYPEDEF_IN_CLASS = _TYPEDEF_IN_CLASS;
 
   /**
@@ -706,7 +721,7 @@
 
   static const ParserErrorCode WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER =
       const ParserErrorCode('WRONG_SEPARATOR_FOR_POSITIONAL_PARAMETER',
-          "The default value of a positional parameter should be preceeded by '='.",
+          "The default value of a positional parameter should be preceded by '='.",
           correction: "Try replacing the ':' with '='.");
 
   /**
diff --git a/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart b/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart
index c983796..c02bde2 100644
--- a/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart
+++ b/pkg/analyzer/lib/src/dart/error/syntactic_errors.g.dart
@@ -63,7 +63,7 @@
   _CLASS_IN_CLASS,
   _COLON_IN_PLACE_OF_IN,
   _CONSTRUCTOR_WITH_RETURN_TYPE,
-  _CONST_AFTER_FACTORY,
+  _MODIFIER_OUT_OF_ORDER,
   _CONST_AND_COVARIANT,
   _CONST_AND_FINAL,
   _CONST_AND_VAR,
@@ -100,6 +100,11 @@
   _INVALID_OPERATOR_QUESTIONMARK_PERIOD_FOR_SUPER,
   _STACK_OVERFLOW,
   _MISSING_CATCH_OR_FINALLY,
+  _EXPERIMENT_NOT_ENABLED,
+  _EXPECTED_ELSE_OR_COMMA,
+  _INVALID_SUPER_IN_INITIALIZER,
+  _INVALID_THIS_IN_INITIALIZER,
+  _TYPE_BEFORE_FACTORY,
 ];
 
 const ParserErrorCode _ABSTRACT_CLASS_MEMBER = const ParserErrorCode(
@@ -136,11 +141,6 @@
     'CONSTRUCTOR_WITH_RETURN_TYPE', r"Constructors can't have a return type.",
     correction: "Try removing the return type.");
 
-const ParserErrorCode _CONST_AFTER_FACTORY = const ParserErrorCode(
-    'CONST_AFTER_FACTORY',
-    r"The modifier 'const' should be before the modifier 'factory'.",
-    correction: "Try re-ordering the modifiers.");
-
 const ParserErrorCode _CONST_AND_COVARIANT = const ParserErrorCode(
     'CONST_AND_COVARIANT',
     r"Members can't be declared to be both 'const' and 'covariant'.",
@@ -212,7 +212,7 @@
 
 const ParserErrorCode _DUPLICATED_MODIFIER = const ParserErrorCode(
     'DUPLICATED_MODIFIER', r"The modifier '#lexeme' was already specified.",
-    correction: "Try removing all but one occurance of the modifier.");
+    correction: "Try removing all but one occurence of the modifier.");
 
 const ParserErrorCode _DUPLICATE_DEFERRED = const ParserErrorCode(
     'DUPLICATE_DEFERRED',
@@ -238,12 +238,21 @@
     r"An equality expression can't be an operand of another equality expression.",
     correction: "Try re-writing the expression.");
 
+const ParserErrorCode _EXPECTED_ELSE_OR_COMMA = const ParserErrorCode(
+    'EXPECTED_ELSE_OR_COMMA', r"Expected 'else' or comma.");
+
 const ParserErrorCode _EXPECTED_INSTEAD = const ParserErrorCode(
     'EXPECTED_INSTEAD', r"Expected '#string' instead of this.");
 
+const ParserErrorCode _EXPERIMENT_NOT_ENABLED = const ParserErrorCode(
+    'EXPERIMENT_NOT_ENABLED',
+    r"This requires the '#string' experiment to be enabled.",
+    correction:
+        "Try enabling this experiment by adding it to the command line when compiling and running.");
+
 const ParserErrorCode _EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE =
     const ParserErrorCode('EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE',
-        r"Export directives must preceed part directives.",
+        r"Export directives must precede part directives.",
         correction:
             "Try moving the export directives before the part directives.");
 
@@ -347,7 +356,7 @@
 
 const ParserErrorCode _IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE =
     const ParserErrorCode('IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE',
-        r"Import directives must preceed part directives.",
+        r"Import directives must precede part directives.",
         correction:
             "Try moving the import directives before the part directives.");
 
@@ -375,6 +384,14 @@
         r"The operator '?.' cannot be used with 'super' because 'super' cannot be null.",
         correction: "Try replacing '?.' with '.'");
 
+const ParserErrorCode _INVALID_SUPER_IN_INITIALIZER = const ParserErrorCode(
+    'INVALID_SUPER_IN_INITIALIZER',
+    r"Can only use 'super' in an initializer for calling the superclass constructor (e.g. 'super()' or 'super.namedConstructor()')");
+
+const ParserErrorCode _INVALID_THIS_IN_INITIALIZER = const ParserErrorCode(
+    'INVALID_THIS_IN_INITIALIZER',
+    r"Can only use 'this' in an initializer for field initialization (e.g. 'this.x = something') and constructor redirection (e.g. 'this()' or 'this.namedConstructor())");
+
 const ParserErrorCode _INVALID_UNICODE_ESCAPE = const ParserErrorCode(
     'INVALID_UNICODE_ESCAPE',
     r"An escape sequence starting with '\u' must be followed by 4 hexadecimal digits or from 1 to 6 digits between '{' and '}'.");
@@ -417,7 +434,7 @@
 
 const ParserErrorCode _MISSING_KEYWORD_OPERATOR = const ParserErrorCode(
     'MISSING_KEYWORD_OPERATOR',
-    r"Operator declarations must be preceeded by the keyword 'operator'.",
+    r"Operator declarations must be preceded by the keyword 'operator'.",
     correction: "Try adding the keyword 'operator'.");
 
 const ParserErrorCode _MISSING_PREFIX_IN_DEFERRED_IMPORT =
@@ -428,6 +445,11 @@
 const ParserErrorCode _MISSING_STATEMENT =
     const ParserErrorCode('MISSING_STATEMENT', r"Expected a statement.");
 
+const ParserErrorCode _MODIFIER_OUT_OF_ORDER = const ParserErrorCode(
+    'MODIFIER_OUT_OF_ORDER',
+    r"The modifier '#string' should be before the modifier '#string2'.",
+    correction: "Try re-ordering the modifiers.");
+
 const ParserErrorCode _MULTIPLE_EXTENDS_CLAUSES = const ParserErrorCode(
     'MULTIPLE_EXTENDS_CLAUSES',
     r"Each class definition can have at most one extends clause.",
@@ -529,6 +551,10 @@
     r"Can't use type arguments with type variable '#name'.",
     correction: "Try removing the type arguments.");
 
+const ParserErrorCode _TYPE_BEFORE_FACTORY = const ParserErrorCode(
+    'TYPE_BEFORE_FACTORY', r"Factory constructors cannot have a return type.",
+    correction: "Try removing the type appearing before 'factory'.");
+
 const ParserErrorCode _VAR_AND_TYPE = const ParserErrorCode('VAR_AND_TYPE',
     r"Variables can't be declared using both 'var' and a type name.",
     correction: "Try removing 'var.'");
diff --git a/pkg/analyzer/lib/src/dart/resolver/definite_assignment.dart b/pkg/analyzer/lib/src/dart/resolver/definite_assignment.dart
index 8edf986..bcf3d5e 100644
--- a/pkg/analyzer/lib/src/dart/resolver/definite_assignment.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/definite_assignment.dart
@@ -530,29 +530,13 @@
     _current = _current.union(continueSet);
   }
 
-  void beginForEachStatement(ForEachStatement statement) {
+  void beginForStatement2(ForStatement statement) {
     // Not strongly necessary, because we discard everything anyway.
     // Just for consistency, so that `break` is handled without `null`.
     _statementToStackIndex[statement] = _stack.length;
   }
 
-  void beginForEachStatementBody() {
-    _stack.add(_current);
-  }
-
-  void beginForStatement(ForStatement statement) {
-    // Not strongly necessary, because we discard everything anyway.
-    // Just for consistency, so that `break` is handled without `null`.
-    _statementToStackIndex[statement] = _stack.length;
-  }
-
-  void beginForStatement2(ForStatement2 statement) {
-    // Not strongly necessary, because we discard everything anyway.
-    // Just for consistency, so that `break` is handled without `null`.
-    _statementToStackIndex[statement] = _stack.length;
-  }
-
-  void beginForStatementBody() {
+  void beginForStatement2Body() {
     _stack.add(_current); // break set
     _stack.add(_ElementSet.empty); // continue set
   }
@@ -624,11 +608,7 @@
     _current = _current.union(breakSet);
   }
 
-  void endForEachStatement() {
-    _current = _stack.removeLast();
-  }
-
-  void endForStatement() {
+  void endForStatement2() {
     _stack.removeLast(); // continue set
     _current = _stack.removeLast(); // break set, before body
   }
diff --git a/pkg/analyzer/lib/src/dart/resolver/exit_detector.dart b/pkg/analyzer/lib/src/dart/resolver/exit_detector.dart
index 2f558cf..a0d6371 100644
--- a/pkg/analyzer/lib/src/dart/resolver/exit_detector.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/exit_detector.dart
@@ -178,23 +178,6 @@
       _nodeExits(node.expression);
 
   @override
-  bool visitForEachStatement(ForEachStatement node) {
-    bool outerBreakValue = _enclosingBlockContainsBreak;
-    _enclosingBlockContainsBreak = false;
-    try {
-      bool iterableExits = _nodeExits(node.iterable);
-      // Discard whether the for-each body exits; since the for-each iterable
-      // may be empty, execution may never enter the body, so it doesn't matter
-      // if it exits or not.  We still must visit the body, to accurately
-      // manage `_enclosingBlockBreaksLabel`.
-      _nodeExits(node.body);
-      return iterableExits;
-    } finally {
-      _enclosingBlockContainsBreak = outerBreakValue;
-    }
-  }
-
-  @override
   bool visitForElement(ForElement node) {
     bool outerBreakValue = _enclosingBlockContainsBreak;
     _enclosingBlockContainsBreak = false;
@@ -251,42 +234,6 @@
   bool visitForStatement(ForStatement node) {
     bool outerBreakValue = _enclosingBlockContainsBreak;
     _enclosingBlockContainsBreak = false;
-    try {
-      if (node.variables != null &&
-          _visitVariableDeclarations(node.variables.variables)) {
-        return true;
-      }
-      if (node.initialization != null && _nodeExits(node.initialization)) {
-        return true;
-      }
-      Expression conditionExpression = node.condition;
-      if (conditionExpression != null && _nodeExits(conditionExpression)) {
-        return true;
-      }
-      if (_visitExpressions(node.updaters)) {
-        return true;
-      }
-      bool blockReturns = _nodeExits(node.body);
-      // TODO(jwren) Do we want to take all constant expressions into account?
-      // If for(; true; ) (or for(;;)), and the body doesn't return or the body
-      // doesn't have a break, then return true.
-      bool implicitOrExplictTrue = conditionExpression == null ||
-          (conditionExpression is BooleanLiteral && conditionExpression.value);
-      if (implicitOrExplictTrue) {
-        if (blockReturns || !_enclosingBlockContainsBreak) {
-          return true;
-        }
-      }
-      return false;
-    } finally {
-      _enclosingBlockContainsBreak = outerBreakValue;
-    }
-  }
-
-  @override
-  bool visitForStatement2(ForStatement2 node) {
-    bool outerBreakValue = _enclosingBlockContainsBreak;
-    _enclosingBlockContainsBreak = false;
     ForLoopParts parts = node.forLoopParts;
     try {
       if (parts is ForEachParts) {
@@ -445,7 +392,7 @@
   }
 
   @override
-  bool visitListLiteral2(ListLiteral2 node) {
+  bool visitListLiteral(ListLiteral node) {
     for (CollectionElement element in node.elements) {
       if (_nodeExits(element)) {
         return true;
@@ -458,16 +405,6 @@
   bool visitLiteral(Literal node) => false;
 
   @override
-  bool visitMapLiteral2(MapLiteral2 node) {
-    for (CollectionElement entry in node.entries) {
-      if (_nodeExits(entry)) {
-        return true;
-      }
-    }
-    return false;
-  }
-
-  @override
   bool visitMapLiteralEntry(MapLiteralEntry node) {
     return _nodeExits(node.key) || _nodeExits(node.value);
   }
@@ -526,7 +463,7 @@
   bool visitReturnStatement(ReturnStatement node) => true;
 
   @override
-  bool visitSetLiteral2(SetLiteral2 node) {
+  bool visitSetOrMapLiteral(SetOrMapLiteral node) {
     for (CollectionElement element in node.elements) {
       if (_nodeExits(element)) {
         return true;
diff --git a/pkg/analyzer/lib/src/dart/resolver/inheritance_manager.dart b/pkg/analyzer/lib/src/dart/resolver/inheritance_manager.dart
index 9e54c4c..0184c06 100644
--- a/pkg/analyzer/lib/src/dart/resolver/inheritance_manager.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/inheritance_manager.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/resolver/method_invocation_resolver.dart b/pkg/analyzer/lib/src/dart/resolver/method_invocation_resolver.dart
index 6471484..844dfd9 100644
--- a/pkg/analyzer/lib/src/dart/resolver/method_invocation_resolver.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/method_invocation_resolver.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/sdk/patch.dart b/pkg/analyzer/lib/src/dart/sdk/patch.dart
index 532ae5e..d2f8f1e 100644
--- a/pkg/analyzer/lib/src/dart/sdk/patch.dart
+++ b/pkg/analyzer/lib/src/dart/sdk/patch.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/dart/sdk/sdk.dart b/pkg/analyzer/lib/src/dart/sdk/sdk.dart
index 6a4fef1..41e4bfe 100644
--- a/pkg/analyzer/lib/src/dart/sdk/sdk.dart
+++ b/pkg/analyzer/lib/src/dart/sdk/sdk.dart
@@ -20,7 +20,6 @@
 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/package_bundle_reader.dart';
 import 'package:path/path.dart' as pathos;
 import 'package:yaml/yaml.dart';
 
@@ -86,16 +85,6 @@
       _analysisContext = new SdkAnalysisContext(_analysisOptions);
       SourceFactory factory = new SourceFactory([new DartUriResolver(this)]);
       _analysisContext.sourceFactory = factory;
-      if (_useSummary) {
-        PackageBundle sdkBundle = getLinkedBundle();
-        if (sdkBundle != null) {
-          SummaryDataStore dataStore =
-              new SummaryDataStore([], resourceProvider: resourceProvider);
-          dataStore.addBundle(null, sdkBundle);
-          _analysisContext.resultProvider =
-              new InputPackagesResultProvider(_analysisContext, dataStore);
-        }
-      }
     }
     return _analysisContext;
   }
@@ -230,6 +219,16 @@
     return source;
   }
 
+  /**
+   * Return info for debugging https://github.com/dart-lang/sdk/issues/35226.
+   */
+  Map<String, Object> debugInfo() {
+    return <String, Object>{
+      'runtimeType': '$runtimeType',
+      'libraryMap': libraryMap.debugInfo(),
+    };
+  }
+
   String _getPath(File file) {
     List<SdkLibrary> libraries = libraryMap.sdkLibraries;
     int length = libraries.length;
@@ -552,6 +551,16 @@
   }
 
   /**
+   * Return info for debugging https://github.com/dart-lang/sdk/issues/35226.
+   */
+  @override
+  Map<String, Object> debugInfo() {
+    var result = super.debugInfo();
+    result['directory'] = _sdkDirectory.path;
+    return result;
+  }
+
+  /**
    * Determine the search order for trying to locate the [_LIBRARIES_FILE].
    */
   Iterable<File> get _libraryMapLocations sync* {
diff --git a/pkg/analyzer/lib/src/dartdoc/dartdoc_directive_info.dart b/pkg/analyzer/lib/src/dartdoc/dartdoc_directive_info.dart
new file mode 100644
index 0000000..ca9c241
--- /dev/null
+++ b/pkg/analyzer/lib/src/dartdoc/dartdoc_directive_info.dart
@@ -0,0 +1,117 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// Information about the directives found in Dartdoc comments.
+class DartdocDirectiveInfo {
+  // TODO(brianwilkerson) Consider moving the method
+  //  DartUnitHoverComputer.computeDocumentation to this class.
+
+  /// A regular expression used to match a macro directive. There is one group
+  /// that contains the name of the template.
+  static final macroRegExp = new RegExp(r'{@macro\s+([^}]+)}');
+
+  /// A regular expression used to match a template directive. There are two
+  /// groups. The first contains the name of the template, the second contains
+  /// the body of the template.
+  static final templateRegExp = new RegExp(
+      r'[ ]*{@template\s+(.+?)}([\s\S]+?){@endtemplate}[ ]*\n?',
+      multiLine: true);
+
+  /// A table mapping the names of templates to the unprocessed bodies of the
+  /// templates.
+  final Map<String, String> templateMap = {};
+
+  /// Initialize a newly created set of information about Dartdoc directives.
+  DartdocDirectiveInfo();
+
+  /// Add corresponding pairs from the [names] and [values] to the set of
+  /// defined templates.
+  void addTemplateNamesAndValues(List<String> names, List<String> values) {
+    int length = names.length;
+    assert(length == values.length);
+    for (int i = 0; i < length; i++) {
+      templateMap[names[i]] = values[i];
+    }
+  }
+
+  /// Process the given Dartdoc [comment], extracting the template directive if
+  /// there is one.
+  void extractTemplate(String comment) {
+    for (Match match in templateRegExp.allMatches(comment)) {
+      String name = match.group(1).trim();
+      String body = match.group(2).trim();
+      templateMap[name] = _stripDelimiters(body).join('\n');
+    }
+  }
+
+  /// Process the given Dartdoc [comment], replacing any macro directives with
+  /// the body of the corresponding template.
+  String processDartdoc(String comment) {
+    List<String> lines = _stripDelimiters(comment);
+    for (int i = lines.length - 1; i >= 0; i--) {
+      String line = lines[i];
+      Match match = macroRegExp.firstMatch(line);
+      if (match != null) {
+        String name = match.group(1);
+        String value = templateMap[name];
+        if (value != null) {
+          lines[i] = value;
+        }
+      }
+    }
+    return lines.join('\n');
+  }
+
+  /// Remove the delimiters from the given [comment].
+  List<String> _stripDelimiters(String comment) {
+    if (comment == null) {
+      return null;
+    }
+    //
+    // Remove /** */.
+    //
+    if (comment.startsWith('/**')) {
+      comment = comment.substring(3);
+    }
+    if (comment.endsWith('*/')) {
+      comment = comment.substring(0, comment.length - 2);
+    }
+    comment = comment.trim();
+    //
+    // Remove leading '* ' and '/// '.
+    //
+    List<String> lines = comment.split('\n');
+    int firstNonEmpty = lines.length + 1;
+    int lastNonEmpty = -1;
+    for (var i = 0; i < lines.length; i++) {
+      String line = lines[i];
+      line = line.trim();
+      if (line.startsWith('*')) {
+        line = line.substring(1);
+        if (line.startsWith(' ')) {
+          line = line.substring(1);
+        }
+      } else if (line.startsWith('///')) {
+        line = line.substring(3);
+        if (line.startsWith(' ')) {
+          line = line.substring(1);
+        }
+      }
+      if (line.isNotEmpty) {
+        if (i < firstNonEmpty) {
+          firstNonEmpty = i;
+        }
+        if (i > lastNonEmpty) {
+          lastNonEmpty = i;
+        }
+      }
+      lines[i] = line;
+    }
+    if (lastNonEmpty < firstNonEmpty) {
+      // All of the lines are empty.
+      return <String>[];
+    }
+    return lines.sublist(firstNonEmpty, lastNonEmpty + 1);
+  }
+}
diff --git a/pkg/analyzer/lib/src/error/codes.dart b/pkg/analyzer/lib/src/error/codes.dart
index 81dcb16..5eda88c4 100644
--- a/pkg/analyzer/lib/src/error/codes.dart
+++ b/pkg/analyzer/lib/src/error/codes.dart
@@ -8,7 +8,6 @@
 export 'package:analyzer/src/dart/error/hint_codes.dart';
 export 'package:analyzer/src/dart/error/lint_codes.dart';
 export 'package:analyzer/src/dart/error/todo_codes.dart';
-export 'package:analyzer/src/html/error/html_codes.dart';
 
 /**
  * The error codes used for compile time errors caused by constant evaluation
@@ -35,7 +34,7 @@
       const CheckedModeCompileTimeErrorCode(
           'CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH',
           "A value of type '{0}' can't be assigned to the field '{1}', which "
-          "has type '{2}'.");
+              "has type '{2}'.");
 
   /**
    * 16.12.2 Const: It is a compile-time error if evaluation of a constant
@@ -46,7 +45,7 @@
       const CheckedModeCompileTimeErrorCode(
           'CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH',
           "A value of type '{0}' can't be assigned to a parameter of type "
-          "'{1}'.");
+              "'{1}'.");
 
   /**
    * 7.6.1 Generative Constructors: In checked mode, it is a dynamic type error
@@ -65,78 +64,7 @@
       const CheckedModeCompileTimeErrorCode(
           'CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE',
           "The initializer type '{0}' can't be assigned to the field type "
-          "'{1}'.");
-
-  /**
-   * 12.6 Lists: A run-time list literal &lt;<i>E</i>&gt; [<i>e<sub>1</sub></i>
-   * ... <i>e<sub>n</sub></i>] is evaluated as follows:
-   * * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and
-   *   second argument <i>o<sub>i+1</sub></i><i>, 1 &lt;= i &lt;= n</i>
-   *
-   * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
-   * type of <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of
-   * <i>p<sub>i</sub>, 1 &lt;= i &lt;= n+k</i> and let <i>S<sub>q</sub></i> be
-   * the type of the named parameter <i>q</i> of <i>f</i>. It is a static
-   * warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<sub>j</sub>,
-   * 1 &lt;= j &lt;= m</i>.
-   *
-   * Parameters:
-   * 0: the actual type of the list element
-   * 1: the expected type of the list element
-   */
-  static const CheckedModeCompileTimeErrorCode
-      LIST_ELEMENT_TYPE_NOT_ASSIGNABLE = const CheckedModeCompileTimeErrorCode(
-          'LIST_ELEMENT_TYPE_NOT_ASSIGNABLE',
-          "The element type '{0}' can't be assigned to the list type '{1}'.");
-
-  /**
-   * 12.7 Map: A run-time map literal &lt;<i>K</i>, <i>V</i>&gt;
-   * [<i>k<sub>1</sub></i> : <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> :
-   * <i>e<sub>n</sub></i>] is evaluated as follows:
-   * * The operator []= is invoked on <i>m</i> with first argument
-   *   <i>k<sub>i</sub></i> and second argument <i>e<sub>i</sub></i><i>, 1 &lt;=
-   *   i &lt;= n</i>
-   *
-   * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
-   * type of <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of
-   * <i>p<sub>i</sub>, 1 &lt;= i &lt;= n+k</i> and let <i>S<sub>q</sub></i> be
-   * the type of the named parameter <i>q</i> of <i>f</i>. It is a static
-   * warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<sub>j</sub>, 1
-   * &lt;= j &lt;= m</i>.
-   */
-  static const CheckedModeCompileTimeErrorCode MAP_KEY_TYPE_NOT_ASSIGNABLE =
-      const CheckedModeCompileTimeErrorCode('MAP_KEY_TYPE_NOT_ASSIGNABLE',
-          "The element type '{0}' can't be assigned to the map key type '{1}'.");
-
-  /**
-   * 12.7 Map: A run-time map literal &lt;<i>K</i>, <i>V</i>&gt;
-   * [<i>k<sub>1</sub></i> : <i>e<sub>1</sub></i> ... <i>k<sub>n</sub></i> :
-   * <i>e<sub>n</sub></i>] is evaluated as follows:
-   * * The operator []= is invoked on <i>m</i> with first argument
-   *   <i>k<sub>i</sub></i> and second argument <i>e<sub>i</sub></i><i>, 1 &lt;=
-   *   i &lt;= n</i>
-   *
-   * 12.14.2 Binding Actuals to Formals: Let <i>T<sub>i</sub></i> be the static
-   * type of <i>a<sub>i</sub></i>, let <i>S<sub>i</sub></i> be the type of
-   * <i>p<sub>i</sub>, 1 &lt;= i &lt;= n+k</i> and let <i>S<sub>q</sub></i> be
-   * the type of the named parameter <i>q</i> of <i>f</i>. It is a static
-   * warning if <i>T<sub>j</sub></i> may not be assigned to <i>S<sub>j</sub>, 1
-   * &lt;= j &lt;= m</i>.
-   */
-  static const CheckedModeCompileTimeErrorCode MAP_VALUE_TYPE_NOT_ASSIGNABLE =
-      const CheckedModeCompileTimeErrorCode(
-          'MAP_VALUE_TYPE_NOT_ASSIGNABLE',
-          "The element type '{0}' can't be assigned to the map value type "
-          "'{1}'.");
-
-  /**
-   * Parameters:
-   * 0: the actual type of the set element
-   * 1: the expected type of the set element
-   */
-  static const CheckedModeCompileTimeErrorCode SET_ELEMENT_TYPE_NOT_ASSIGNABLE =
-      const CheckedModeCompileTimeErrorCode('SET_ELEMENT_TYPE_NOT_ASSIGNABLE',
-          "The element type '{0}' can't be assigned to the set type '{1}'.");
+              "'{1}'.");
 
   /**
    * 16.12.2 Const: It is a compile-time error if evaluation of a constant
@@ -146,7 +74,7 @@
       const CheckedModeCompileTimeErrorCode(
           'VARIABLE_TYPE_MISMATCH',
           "A value of type '{0}' can't be assigned to a variable of type "
-          "'{1}'.");
+              "'{1}'.");
 
   /**
    * Initialize a newly created error code to have the given [name]. The message
@@ -194,7 +122,7 @@
       const CompileTimeErrorCode(
           'ACCESS_PRIVATE_ENUM_FIELD',
           "The private fields of an enum can't be accessed, even within the "
-          "same library.");
+              "same library.");
 
   /**
    * 14.2 Exports: It is a compile-time error if a name <i>N</i> is re-exported
@@ -213,6 +141,26 @@
           correction: "Try removing the export of one of the libraries, or "
               "explicitly hiding the name in one of the export directives.");
 
+  static const CompileTimeErrorCode AMBIGUOUS_SET_OR_MAP_LITERAL_BOTH =
+      const CompileTimeErrorCode(
+          'AMBIGUOUS_SET_OR_MAP_LITERAL_BOTH',
+          "This literal must be both a map and a set, because some elements "
+              "spread a 'Map' and others spread an 'Iterable', but that isn't "
+              "allowed.",
+          correction:
+              "Try removing or changing some of the elements so that all of "
+              "the elements are consistent.");
+
+  static const CompileTimeErrorCode AMBIGUOUS_SET_OR_MAP_LITERAL_EITHER =
+      const CompileTimeErrorCode(
+          'AMBIGUOUS_SET_OR_MAP_LITERAL_EITHER',
+          "This literal must be either a map or a set, but none of the "
+              "elements have enough type information to know which, and that isn't "
+              "allowed.",
+          correction:
+              "Try adding type arguments to the literal (one for sets, two "
+              "for maps).");
+
   /**
    * 15 Metadata: The constant expression given in an annotation is type checked
    * and evaluated in the scope surrounding the declaration being annotated.
@@ -241,18 +189,6 @@
           "An annotation (metadata) can't use type arguments.");
 
   /**
-   * 12.33 Argument Definition Test: It is a compile time error if <i>v</i> does
-   * not denote a formal parameter.
-   *
-   * Parameters:
-   * 0: the name of the identifier in the argument definition test that is not a
-   *    parameter
-   */
-  static const CompileTimeErrorCode ARGUMENT_DEFINITION_TEST_NON_PARAMETER =
-      const CompileTimeErrorCode(
-          'ARGUMENT_DEFINITION_TEST_NON_PARAMETER', "'{0}' isn't a parameter.");
-
-  /**
    * 17.6.3 Asynchronous For-in: It is a compile-time error if an asynchronous
    * for-in statement appears inside a synchronous function.
    */
@@ -339,22 +275,6 @@
           correction: "Try choosing a different name for the type parameter.");
 
   /**
-   * 16.33 Identifier Reference: It is a compile-time error if a built-in
-   * identifier is used as the declared name of a prefix, class, type parameter
-   * or type alias.
-   *
-   * Parameters:
-   * 0: the built-in identifier that is being used
-   *
-   * TODO(scheglov) It would be nice to get more specific errors.
-   * https://github.com/dart-lang/sdk/issues/31811
-   */
-  static const CompileTimeErrorCode BUILT_IN_IDENTIFIER_IN_DECLARATION =
-      const CompileTimeErrorCode('BUILT_IN_IDENTIFIER_IN_DECLARATION',
-          "The built-in identifier '{0}' can't be used as a name.",
-          correction: "Try choosing a different name.");
-
-  /**
    * 13.9 Switch: It is a compile-time error if the class <i>C</i> implements
    * the operator <i>==</i>.
    *
@@ -377,7 +297,7 @@
       const CompileTimeErrorCode(
           'CONFLICTING_CONSTRUCTOR_AND_STATIC_FIELD',
           "'{0}' can't be used to name both a constructor and a static field "
-          "in this class.",
+              "in this class.",
           correction: "Try renaming either the constructor or the field.");
 
   /**
@@ -392,7 +312,7 @@
       const CompileTimeErrorCode(
           'CONFLICTING_CONSTRUCTOR_AND_STATIC_METHOD',
           "'{0}' can't be used to name both a constructor and a static method "
-          "in this class.",
+              "in this class.",
           correction: "Try renaming either the constructor or the method.");
 
   /**
@@ -409,9 +329,9 @@
       const CompileTimeErrorCode(
           'CONFLICTING_FIELD_AND_METHOD',
           "Class '{0}' can't define field '{1}' and have method '{2}.{1}' "
-          "with the same name.",
+              "with the same name.",
           correction: "Try converting the getter to a method, or "
-              "renaming the field to a name that doesn't conflit.");
+              "renaming the field to a name that doesn't conflict.");
 
   /**
    * 10.10 Superinterfaces: It is a compile-time error if a class `C` has two
@@ -428,7 +348,7 @@
       const CompileTimeErrorCode(
           'CONFLICTING_GENERIC_INTERFACES',
           "The class '{0}' cannot implement both '{1}' and '{2}' because the "
-          "type arguments are different.");
+              "type arguments are different.");
 
   /**
    * 10.11 Class Member Conflicts: Let `C` be a class. It is a compile-time
@@ -444,9 +364,9 @@
       const CompileTimeErrorCode(
           'CONFLICTING_METHOD_AND_FIELD',
           "Class '{0}' can't define method '{1}' and have field '{2}.{1}' "
-          "with the same name.",
+              "with the same name.",
           correction: "Try converting the method to a getter, or "
-              "renaming the method to a name that doesn't conflit.");
+              "renaming the method to a name that doesn't conflict.");
 
   /**
    * 10.11 Class Member Conflicts: Let `C` be a class. It is a compile-time
@@ -462,9 +382,9 @@
       const CompileTimeErrorCode(
           'CONFLICTING_STATIC_AND_INSTANCE',
           "Class '{0}' can't define static member '{1}' and have instance "
-          "member '{2}.{1}' with the same name.",
+              "member '{2}.{1}' with the same name.",
           correction:
-              "Try renaming the member to a name that doesn't conflit.");
+              "Try renaming the member to a name that doesn't conflict.");
 
   /**
    * 7. Classes: It is a compile time error if a generic class declares a type
@@ -478,7 +398,7 @@
       const CompileTimeErrorCode(
           'CONFLICTING_TYPE_VARIABLE_AND_CLASS',
           "'{0}' can't be used to name both a type variable and the class in "
-          "which the type variable is defined.",
+              "which the type variable is defined.",
           correction: "Try renaming either the type variable or the class.");
 
   /**
@@ -493,15 +413,9 @@
       const CompileTimeErrorCode(
           'CONFLICTING_TYPE_VARIABLE_AND_MEMBER',
           "'{0}' can't be used to name both a type variable and a member in "
-          "this class.",
+              "this class.",
           correction: "Try renaming either the type variable or the member.");
 
-  static const CompileTimeErrorCode
-      CONST_CONSTRUCTOR_IN_SUBCLASS_OF_MIXIN_APPLICATION =
-      const CompileTimeErrorCode(
-          'CONST_CONSTRUCTOR_IN_SUBCLASS_OF_MIXIN_APPLICATION',
-          "Can't extend a mixin application and be 'const'.");
-
   /**
    * 16.12.2 Const: It is a compile-time error if evaluation of a constant
    * object results in an uncaught exception being thrown.
@@ -525,7 +439,7 @@
       const CompileTimeErrorCode(
           'CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST',
           "Can't define the const constructor because the field '{0}' "
-          "is initialized with a non-constant value.",
+              "is initialized with a non-constant value.",
           correction: "Try initializing the field to a constant value, or "
               "removing the keyword 'const' from the constructor.");
 
@@ -544,7 +458,7 @@
       const CompileTimeErrorCode(
           'CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD',
           "Const constructor can't be declared for a class with a mixin "
-          "that declares an instance field.",
+              "that declares an instance field.",
           correction: "Try removing the 'const' keyword or "
               "removing the 'with' clause from the class declaration, "
               "or removing fields from the mixin class.");
@@ -562,7 +476,7 @@
       const CompileTimeErrorCode(
           'CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER',
           "Constant constructor can't call non-constant super constructor of "
-          "'{0}'.",
+              "'{0}'.",
           correction: "Try calling a const constructor in the superclass, or "
               "removing the keyword 'const' from the constructor.");
 
@@ -618,7 +532,7 @@
       const CompileTimeErrorCode(
           'CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY',
           "Constant values from a deferred library can't be used to "
-          "initialized a const variable.",
+              "initialized a const variable.",
           correction:
               "Try initializing the variable without referencing members of the "
               "deferred library, or "
@@ -634,6 +548,14 @@
           correction:
               "Try declaring the field as final, or adding the keyword 'static'.");
 
+  static const CompileTimeErrorCode CONST_SPREAD_EXPECTED_LIST_OR_SET =
+      const CompileTimeErrorCode('CONST_SPREAD_EXPECTED_LIST_OR_SET',
+          "A list or a set is expected in this spread.");
+
+  static const CompileTimeErrorCode CONST_SPREAD_EXPECTED_MAP =
+      const CompileTimeErrorCode(
+          'CONST_SPREAD_EXPECTED_MAP', "A map is expected in this spread.");
+
   /**
    * 12.8 Maps: It is a compile-time error if the key of an entry in a constant
    * map literal is an instance of a class that implements the operator
@@ -647,7 +569,7 @@
       const CompileTimeErrorCode(
           'CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS',
           "The constant map entry key expression type '{0}' can't override "
-          "the == operator.",
+              "the == operator.",
           correction: "Try using a different value for the key, or "
               "removing the keyword 'const' from the map.");
 
@@ -671,7 +593,7 @@
       const CompileTimeErrorCode(
           'CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS',
           "The constant set element type '{0}' can't override "
-          "the == operator.",
+              "the == operator.",
           correction: "Try using a different value for the element, or "
               "removing the keyword 'const' from the set.");
 
@@ -684,7 +606,7 @@
       const CompileTimeErrorCode(
           'CONST_EVAL_TYPE_BOOL',
           "In constant expressions, operands of this operator must be of type "
-          "'bool'.");
+              "'bool'.");
 
   /**
    * 16.12.2 Const: An expression of one of the forms !e, e1 && e2 or e1 || e2,
@@ -695,7 +617,7 @@
       const CompileTimeErrorCode(
           'CONST_EVAL_TYPE_BOOL_INT',
           "In constant expressions, operands of this operator must be of type "
-          "'bool' or 'int'.");
+              "'bool' or 'int'.");
 
   /**
    * 16.12.2 Const: An expression of one of the forms e1 == e2 or e1 != e2 where
@@ -706,7 +628,7 @@
       const CompileTimeErrorCode(
           'CONST_EVAL_TYPE_BOOL_NUM_STRING',
           "In constant expressions, operands of this operator must be of type "
-          "'bool', 'num', 'String' or 'null'.");
+              "'bool', 'num', 'String' or 'null'.");
 
   /**
    * 16.12.2 Const: An expression of one of the forms ~e, e1 ^ e2, e1 & e2,
@@ -717,7 +639,7 @@
       const CompileTimeErrorCode(
           'CONST_EVAL_TYPE_INT',
           "In constant expressions, operands of this operator must be of type "
-          "'int'.");
+              "'int'.");
 
   /**
    * 16.12.2 Const: An expression of one of the forms e, e1 + e2, e1 - e2, e1 *
@@ -729,13 +651,13 @@
       const CompileTimeErrorCode(
           'CONST_EVAL_TYPE_NUM',
           "In constant expressions, operands of this operator must be of type "
-          "'num'.");
+              "'num'.");
 
   static const CompileTimeErrorCode CONST_EVAL_TYPE_TYPE =
       const CompileTimeErrorCode(
           'CONST_EVAL_TYPE_TYPE',
           "In constant expressions, operands of this operator must be of type "
-          "'Type'.");
+              "'Type'.");
 
   /**
    * 16.12.2 Const: It is a compile-time error if evaluation of a constant
@@ -753,7 +675,7 @@
       const CompileTimeErrorCode(
           'CONST_EVAL_THROWS_IDBZE',
           "Evaluation of this constant expression throws an "
-          "IntegerDivisionByZeroException.");
+              "IntegerDivisionByZeroException.");
 
   /**
    * 16.12.2 Const: If <i>T</i> is a parameterized type <i>S&lt;U<sub>1</sub>,
@@ -772,7 +694,7 @@
       const CompileTimeErrorCode(
           'CONST_WITH_INVALID_TYPE_PARAMETERS',
           "The type '{0}' is declared with {1} type parameters, but {2} type "
-          "arguments were given.",
+              "arguments were given.",
           correction:
               "Try adjusting the number of type arguments to match the number of "
               "type parameters.");
@@ -839,7 +761,7 @@
   static const CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR =
       const CompileTimeErrorCode('CONST_WITH_UNDEFINED_CONSTRUCTOR',
           "The class '{0}' doesn't have a constant constructor '{1}'.",
-          correction: "Try calling a different contructor.");
+          correction: "Try calling a different constructor.");
 
   /**
    * 16.12.2 Const: It is a compile-time error if <i>T.id</i> is not the name of
@@ -851,7 +773,7 @@
   static const CompileTimeErrorCode CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT =
       const CompileTimeErrorCode('CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT',
           "The class '{0}' doesn't have a default constant constructor.",
-          correction: "Try calling a different contructor.");
+          correction: "Try calling a different constructor.");
 
   /**
    * 15.3.1 Typedef: It is a compile-time error if any default values are
@@ -882,7 +804,7 @@
       const CompileTimeErrorCode(
           'DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR',
           "Default values aren't allowed in factory constructors that redirect "
-          "to another constructor.",
+              "to another constructor.",
           correction: "Try removing the default value.");
 
   /**
@@ -952,6 +874,22 @@
               "correcting one of the names to reference a different named parameter.");
 
   /**
+   * 16.10 Maps: It is a compile-time error if two keys of a constant map
+   * literal are equal according to their `==` operator (16.27).
+   */
+  static const CompileTimeErrorCode EQUAL_KEYS_IN_CONST_MAP =
+      const CompileTimeErrorCode('EQUAL_KEYS_IN_CONST_MAP',
+          "Two keys in a constant map literal can't be equal.");
+
+  /**
+   * 16.11 Sets: It is a compile-time error if two elements of a constant set
+   * literal are equal according to their `==` operator (16.27).
+   */
+  static const CompileTimeErrorCode EQUAL_ELEMENTS_IN_CONST_SET =
+      const CompileTimeErrorCode('EQUAL_ELEMENTS_IN_CONST_SET',
+          "Two values in a constant set can't be equal.");
+
+  /**
    * SDK implementation libraries can be exported only by other SDK libraries.
    *
    * Parameters:
@@ -973,6 +911,12 @@
           "The exported library '{0}' can't have a part-of directive.",
           correction: "Try exporting the library that the part is a part of.");
 
+  static const CompileTimeErrorCode EXPRESSION_IN_MAP =
+      const CompileTimeErrorCode(
+          'EXPRESSION_IN_MAP', "Expressions cannot be used in a map literal.",
+          correction:
+              "Try removing the expression or converting it to be a map entry.");
+
   /**
    * 7.9 Superclasses: It is a compile-time error if the extends clause of a
    * class <i>C</i> includes a type expression that does not denote a class
@@ -1094,7 +1038,7 @@
       const CompileTimeErrorCode(
           'FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER',
           "Fields can't be initialized in both the parameter list and the "
-          "initializers.",
+              "initializers.",
           correction: "Try removing one of the initializations.");
 
   /**
@@ -1229,7 +1173,7 @@
   static const CompileTimeErrorCode IMPLEMENTS_REPEATED =
       const CompileTimeErrorCode(
           'IMPLEMENTS_REPEATED', "'{0}' can only be implemented once.",
-          correction: "Try removing all but one occurance of the class name.");
+          correction: "Try removing all but one occurrence of the class name.");
 
   /**
    * 7.10 Superinterfaces: It is a compile-time error if the superclass of a
@@ -1242,7 +1186,7 @@
   static const CompileTimeErrorCode IMPLEMENTS_SUPER_CLASS =
       const CompileTimeErrorCode('IMPLEMENTS_SUPER_CLASS',
           "'{0}' can't be used in both 'extends' and 'implements' clauses.",
-          correction: "Try removing one of the occurances.");
+          correction: "Try removing one of the occurrences.");
 
   /**
    * 7.6.1 Generative Constructors: Note that <b>this</b> is not in scope on the
@@ -1329,7 +1273,7 @@
       const CompileTimeErrorCode(
           'INCONSISTENT_INHERITANCE_GETTER_AND_METHOD',
           "'{0}' is inherited as a getter (from '{1}') and also a "
-          "method (from '{2}').",
+              "method (from '{2}').",
           correction:
               "Try adjusting the supertypes of this class to remove the "
               "inconsistency.");
@@ -1368,7 +1312,7 @@
       const CompileTimeErrorCode(
           'INITIALIZER_FOR_STATIC_FIELD',
           "'{0}' is a static field in the enclosing class. Fields initialized "
-          "in a constructor can't be static.",
+              "in a constructor can't be static.",
           correction: "Try removing the initialization.");
 
   /**
@@ -1404,7 +1348,7 @@
       const CompileTimeErrorCode(
           'INITIALIZING_FORMAL_FOR_STATIC_FIELD',
           "'{0}' is a static field in the enclosing class. Fields initialized "
-          "in a constructor can't be static.",
+              "in a constructor can't be static.",
           correction: "Try removing the initialization.");
 
   /**
@@ -1452,8 +1396,8 @@
       const CompileTimeErrorCode(
           'INTEGER_LITERAL_IMPRECISE_AS_DOUBLE',
           "The integer literal is being used as a double, but can't be "
-          'represented as a 64 bit double without overflow and/or loss of '
-          'precision: {0}',
+              'represented as a 64 bit double without overflow and/or loss of '
+              'precision: {0}',
           correction:
               'Try using the BigInt class, or switch to the closest valid '
               'double: {1}');
@@ -1468,7 +1412,7 @@
       const CompileTimeErrorCode(
           'INVALID_ANNOTATION',
           "Annotation must be either a const variable reference or const "
-          "constructor invocation.");
+              "constructor invocation.");
 
   /**
    * 15 Metadata: Metadata consists of a series of annotations, each of which
@@ -1497,19 +1441,6 @@
           correction: "Try using a top-level variable or a field.");
 
   /**
-   * 15.31 Identifier Reference: It is a compile-time error if any of the
-   * identifiers async, await or yield is used as an identifier in a function
-   * body marked with either async, async* or sync*.
-   */
-  static const CompileTimeErrorCode INVALID_IDENTIFIER_IN_ASYNC =
-      const CompileTimeErrorCode(
-          'INVALID_IDENTIFIER_IN_ASYNC',
-          "The identifier '{0}' can't be used in a function marked with "
-          "'async', 'async*' or 'sync*'.",
-          correction: "Try using a different name, or "
-              "remove the modifier on the function body.");
-
-  /**
    * 9. Functions: It is a compile-time error if an async, async* or sync*
    * modifier is attached to the body of a setter or constructor.
    */
@@ -1553,7 +1484,7 @@
       const CompileTimeErrorCode(
           'INVALID_FACTORY_NAME_NOT_A_CLASS',
           "The name of a factory constructor must be the same as the name of "
-          "the immediately enclosing class.");
+              "the immediately enclosing class.");
 
   static const CompileTimeErrorCode INVALID_INLINE_FUNCTION_TYPE =
       const CompileTimeErrorCode('INVALID_INLINE_FUNCTION_TYPE',
@@ -1602,7 +1533,7 @@
       const CompileTimeErrorCode(
           'INVALID_TYPE_ARGUMENT_IN_CONST_LIST',
           "Constant list literals can't include a type parameter as a type "
-          "argument, such as '{0}'.",
+              "argument, such as '{0}'.",
           correction:
               "Try replacing the type parameter with a different type.");
 
@@ -1617,7 +1548,7 @@
       const CompileTimeErrorCode(
           'INVALID_TYPE_ARGUMENT_IN_CONST_MAP',
           "Constant map literals can't include a type parameter as a type "
-          "argument, such as '{0}'.",
+              "argument, such as '{0}'.",
           correction:
               "Try replacing the type parameter with a different type.");
 
@@ -1625,7 +1556,7 @@
       const CompileTimeErrorCode(
           'INVALID_TYPE_ARGUMENT_IN_CONST_SET',
           "Constant set literals can't include a type parameter as a type "
-          "argument, such as '{0}'.",
+              "argument, such as '{0}'.",
           correction:
               "Try replacing the type parameter with a different type.");
 
@@ -1636,7 +1567,7 @@
       const CompileTimeErrorCode(
           'INVALID_USE_OF_COVARIANT',
           "The 'covariant' keyword can only be used for parameters in instance "
-          "methods or before non-final instance fields.",
+              "methods or before non-final instance fields.",
           correction: "Try removing the 'covariant' keyword.");
 
   /**
@@ -1691,6 +1622,12 @@
           correction: "Try defining the label, or "
               "correcting the name to match an existing label.");
 
+  static const CompileTimeErrorCode MAP_ENTRY_NOT_IN_MAP =
+      const CompileTimeErrorCode('MAP_ENTRY_NOT_IN_MAP',
+          "Map entries can only be used in a map literal.",
+          correction:
+              "Try converting the collection to a map or removing the map entry.");
+
   /**
    * 7 Classes: It is a compile time error if a class <i>C</i> declares a member
    * with the same name as <i>C</i>.
@@ -1706,7 +1643,7 @@
       const CompileTimeErrorCode(
           'MISSING_CONST_IN_LIST_LITERAL',
           "List literals must be prefixed with 'const' when used as a constant "
-          "expression.",
+              "expression.",
           correction: "Try adding the keyword 'const' before the literal.");
 
   /**
@@ -1716,7 +1653,7 @@
       const CompileTimeErrorCode(
           'MISSING_CONST_IN_MAP_LITERAL',
           "Map literals must be prefixed with 'const' when used as a constant "
-          "expression.",
+              "expression.",
           correction: "Try adding the keyword 'const' before the literal.");
 
   /**
@@ -1726,7 +1663,7 @@
       const CompileTimeErrorCode(
           'MISSING_CONST_IN_SET_LITERAL',
           "Set literals must be prefixed with 'const' when used as a constant "
-          "expression.",
+              "expression.",
           correction: "Try adding the keyword 'const' before the literal.");
 
   static const CompileTimeErrorCode MISSING_DART_LIBRARY =
@@ -1754,7 +1691,7 @@
       const CompileTimeErrorCode(
           'MIXIN_APPLICATION_CONCRETE_SUPER_INVOKED_MEMBER_TYPE',
           "The super-invoked member '{0}' has the type '{1}', but the "
-          "concrete member in the class has type '{2}'.");
+              "concrete member in the class has type '{2}'.");
 
   /**
    * It's a compile-time error to apply a mixin to a class that doesn't
@@ -1782,7 +1719,7 @@
       const CompileTimeErrorCode(
           'MIXIN_APPLICATION_NO_CONCRETE_SUPER_INVOKED_MEMBER',
           "The class doesn't have a concrete implementation of the "
-          "super-invoked member '{0}'.");
+              "super-invoked member '{0}'.");
 
   /**
    * 9 Mixins: It is a compile-time error if a declared or derived mixin
@@ -1795,7 +1732,7 @@
       const CompileTimeErrorCode(
           'MIXIN_CLASS_DECLARES_CONSTRUCTOR',
           "The class '{0}' can't be used as a mixin because it declares a "
-          "constructor.");
+              "constructor.");
 
   /**
    * The <i>mixinMember</i> production allows the same instance or static
@@ -1824,22 +1761,22 @@
       const CompileTimeErrorCode(
           'MIXIN_INFERENCE_INCONSISTENT_MATCHING_CLASSES',
           "Type parameters could not be inferred for the mixin '{0}' because "
-          "the base class implements the mixin's supertype constraint "
-          "'{1}' in multiple conflicting ways");
+              "the base class implements the mixin's supertype constraint "
+              "'{1}' in multiple conflicting ways");
 
   static const CompileTimeErrorCode MIXIN_INFERENCE_NO_MATCHING_CLASS =
       const CompileTimeErrorCode(
           'MIXIN_INFERENCE_NO_MATCHING_CLASS',
           "Type parameters could not be inferred for the mixin '{0}' because "
-          "the base class does not implement the mixin's supertype "
-          "constraint '{1}'");
+              "the base class does not implement the mixin's supertype "
+              "constraint '{1}'");
 
   static const CompileTimeErrorCode MIXIN_INFERENCE_NO_POSSIBLE_SUBSTITUTION =
       const CompileTimeErrorCode(
           'MIXIN_INFERENCE_NO_POSSIBLE_SUBSTITUTION',
           "Type parameters could not be inferred for the mixin '{0}' because "
-          "no type parameter substitution could be found matching the mixin's "
-          "supertype constraints");
+              "no type parameter substitution could be found matching the mixin's "
+              "supertype constraints");
 
   /**
    * 9 Mixins: It is a compile-time error if a mixin is derived from a class
@@ -1852,7 +1789,7 @@
       const CompileTimeErrorCode(
           'MIXIN_INHERITS_FROM_NOT_OBJECT',
           "The class '{0}' can't be used as a mixin because it extends a class "
-          "other than Object.");
+              "other than Object.");
 
   /**
    * A mixin declaration introduces a mixin and an interface, but not a class.
@@ -1905,7 +1842,7 @@
       const CompileTimeErrorCode(
           'MIXIN_REFERENCES_SUPER',
           "The class '{0}' can't be used as a mixin because it references "
-          "'super'.");
+              "'super'.");
 
   static const CompileTimeErrorCode
       MIXIN_SUPER_CLASS_CONSTRAINT_DEFERRED_CLASS = const CompileTimeErrorCode(
@@ -2021,7 +1958,7 @@
       const CompileTimeErrorCode(
           'NON_CONST_MAP_AS_EXPRESSION_STATEMENT',
           "A non-constant map or set literal without type arguments can't be "
-          "used as an expression statement.");
+              "used as an expression statement.");
 
   /**
    * 13.9 Switch: Given a switch statement of the form <i>switch (e) {
@@ -2057,7 +1994,7 @@
       const CompileTimeErrorCode(
           'NON_CONSTANT_CASE_EXPRESSION_FROM_DEFERRED_LIBRARY',
           "Constant values from a deferred library can't be used as a case "
-          "expression.",
+              "expression.",
           correction:
               "Try re-writing the switch as a series of if statements, or "
               "changing the import to not be deferred.");
@@ -2082,7 +2019,7 @@
       const CompileTimeErrorCode(
           'NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIBRARY',
           "Constant values from a deferred library can't be used as a default "
-          "parameter value.",
+              "parameter value.",
           correction:
               "Try leaving the default as null and initializing the parameter "
               "inside the function body.");
@@ -2109,7 +2046,7 @@
       const CompileTimeErrorCode(
           'NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY',
           "Constant values from a deferred library can't be used as values in "
-          "a 'const' list.",
+              "a 'const' list.",
           correction:
               "Try removing the keyword 'const' from the list literal.");
 
@@ -2133,7 +2070,7 @@
       const CompileTimeErrorCode(
           'NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY',
           "Constant values from a deferred library can't be used as keys in a "
-          "const map literal.",
+              "const map literal.",
           correction: "Try removing the keyword 'const' from the map literal.");
 
   /**
@@ -2146,6 +2083,15 @@
           correction: "Try removing the keyword 'const' from the map literal.");
 
   /**
+   * 12.7 Maps: It is a compile time error if an element of a constant map
+   * literal is not a compile-time constant.
+   */
+  static const CompileTimeErrorCode NON_CONSTANT_MAP_ELEMENT =
+      const CompileTimeErrorCode('NON_CONSTANT_MAP_ELEMENT',
+          "The elements in a const map literal must be constant.",
+          correction: "Try removing the keyword 'const' from the map literal.");
+
+  /**
    * 12.7 Maps: It is a compile time error if either a key or a value of an
    * entry in a constant map literal is not a compile-time constant.
    *
@@ -2156,7 +2102,7 @@
       NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY = const CompileTimeErrorCode(
           'NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY',
           "Constant values from a deferred library can't be used as values in "
-          "a const map literal.",
+              "a const map literal.",
           correction: "Try removing the keyword 'const' from the map literal.");
 
   /**
@@ -2178,38 +2124,38 @@
           correction: "Try removing the keyword 'const' from the set literal.");
 
   static const CompileTimeErrorCode
+      NON_CONSTANT_SPREAD_EXPRESSION_FROM_DEFERRED_LIBRARY =
+      const CompileTimeErrorCode(
+          'NON_CONSTANT_SPREAD_EXPRESSION_FROM_DEFERRED_LIBRARY',
+          "Constant values from a deferred library can't be spread into a "
+              "const literal.",
+          correction: "Try making the deferred import non-deferred.");
+
+  static const CompileTimeErrorCode
+      NON_CONSTANT_IF_ELEMENT_CONDITION_FROM_DEFERRED_LIBRARY =
+      const CompileTimeErrorCode(
+          'NON_CONSTANT_IF_ELEMENT_CONDITION_FROM_DEFERRED_LIBRARY',
+          "Constant values from a deferred library can't be used as values in "
+              "an if condition inside a const collection literal.",
+          correction: "Try making the deferred import non-deferred.");
+
+  static const CompileTimeErrorCode
       NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY =
       const CompileTimeErrorCode(
           'NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY',
           "Constant values from a deferred library can't be used as values in "
-          "a 'const' set.",
+              "a 'const' set.",
           correction: "Try removing the keyword 'const' from the set literal.");
 
   /**
-   * 7.6.3 Constant Constructors: Any expression that appears within the
-   * initializer list of a constant constructor must be a potentially constant
-   * expression, or a compile-time error occurs.
+   * This error code is no longer being generated. It should be removed when the
+   * reference to it in the linter has been removed and rolled into the SDK.
    */
+  @deprecated
   static const CompileTimeErrorCode NON_CONSTANT_VALUE_IN_INITIALIZER =
       const CompileTimeErrorCode('NON_CONSTANT_VALUE_IN_INITIALIZER',
           "Initializer expressions in constant constructors must be constants.");
 
-  /**
-   * 7.6.3 Constant Constructors: Any expression that appears within the
-   * initializer list of a constant constructor must be a potentially constant
-   * expression, or a compile-time error occurs.
-   *
-   * 12.1 Constants: A qualified reference to a static constant variable that is
-   * not qualified by a deferred prefix.
-   */
-  static const CompileTimeErrorCode
-      NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFERRED_LIBRARY =
-      const CompileTimeErrorCode(
-          'NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFERRED_LIBRARY',
-          "Constant values from a deferred library can't be used as constant "
-          "initializers.",
-          correction: "Try changing the import to not be deferred.");
-
   static const CompileTimeErrorCode NON_SYNC_FACTORY =
       const CompileTimeErrorCode('NON_SYNC_FACTORY',
           "Factory bodies can't use 'async', 'async*', or 'sync*'.");
@@ -2230,6 +2176,18 @@
           "{0} required argument(s) expected, but {1} found.",
           correction: "Try adding the missing arguments.");
 
+  static const CompileTimeErrorCode NOT_ITERABLE_SPREAD =
+      const CompileTimeErrorCode('NOT_ITERABLE_SPREAD',
+          "Spread elements in list or set literals must implement 'Iterable'.");
+
+  static const CompileTimeErrorCode NOT_MAP_SPREAD = const CompileTimeErrorCode(
+      'NOT_MAP_SPREAD',
+      "Spread elements in map literals must implement 'Map'.");
+
+  static const CompileTimeErrorCode NOT_NULL_AWARE_NULL_SPREAD =
+      const CompileTimeErrorCode('NOT_NULL_AWARE_NULL_SPREAD',
+          "The Null typed expression can't be used with a non-null-aware spread.");
+
   /**
    * 7.6.1 Generative Constructors: Let <i>C</i> be the class in which the
    * superinitializer appears and let <i>S</i> be the superclass of <i>C</i>.
@@ -2245,6 +2203,53 @@
               "making the called constructor not be a factory constructor.");
 
   /**
+   * It is an error if the type `T` in the on-catch clause `on T catch` is
+   * potentially nullable.
+   */
+  static const CompileTimeErrorCode NULLABLE_TYPE_IN_CATCH_CLAUSE =
+      const CompileTimeErrorCode(
+          'NULLABLE_TYPE_IN_CATCH_CLAUSE',
+          "A nullable type cannot be used in an 'on' clause because it isn't valid "
+              "to throw 'null'.",
+          correction: "Try removing the question mark.");
+
+  /**
+   * It is a compile-time error for a class to extend, implement, or mixin a
+   * type of the form T? for any T.
+   */
+  static const CompileTimeErrorCode NULLABLE_TYPE_IN_EXTENDS_CLAUSE =
+      const CompileTimeErrorCode('NULLABLE_TYPE_IN_EXTENDS_CLAUSE',
+          "A class cannot extend a nullable type.",
+          correction: "Try removing the question mark.");
+
+  /**
+   * It is a compile-time error for a class to extend, implement, or mixin a
+   * type of the form T? for any T.
+   */
+  static const CompileTimeErrorCode NULLABLE_TYPE_IN_IMPLEMENTS_CLAUSE =
+      const CompileTimeErrorCode('NULLABLE_TYPE_IN_IMPLEMENTS_CLAUSE',
+          "A class or mixin cannot implement a nullable type.",
+          correction: "Try removing the question mark.");
+
+  /**
+   * It is a compile-time error for a class to extend, implement, or mixin a
+   * type of the form T? for any T.
+   */
+  static const CompileTimeErrorCode NULLABLE_TYPE_IN_ON_CLAUSE =
+      const CompileTimeErrorCode('NULLABLE_TYPE_IN_ON_CLAUSE',
+          "A mixin cannot have a nullable type as a superclass constraint.",
+          correction: "Try removing the question mark.");
+
+  /**
+   * It is a compile-time error for a class to extend, implement, or mixin a
+   * type of the form T? for any T.
+   */
+  static const CompileTimeErrorCode NULLABLE_TYPE_IN_WITH_CLAUSE =
+      const CompileTimeErrorCode('NULLABLE_TYPE_IN_WITH_CLAUSE',
+          "A class or mixin cannot mix in a nullable type.",
+          correction: "Try removing the question mark.");
+
+  /**
    * 7.9 Superclasses: It is a compile-time error to specify an extends clause
    * for class Object.
    */
@@ -2263,7 +2268,7 @@
   static const CompileTimeErrorCode ON_REPEATED = const CompileTimeErrorCode(
       'ON_REPEATED',
       "'{0}' can only be used in super-class constraints only once.",
-      correction: "Try removing all but one occurance of the class name.");
+      correction: "Try removing all but one occurrence of the class name.");
 
   /**
    * 7.1.1 Operators: It is a compile-time error to declare an optional
@@ -2294,7 +2299,7 @@
       const CompileTimeErrorCode(
           'PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER',
           "The name '{0}' is already used as an import prefix and can't be "
-          "used to name a top-level element.",
+              "used to name a top-level element.",
           correction:
               "Try renaming either the top-level element or the prefix.");
 
@@ -2306,7 +2311,7 @@
       const CompileTimeErrorCode(
           'PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT',
           "The name '{0}' refers to an import prefix, so it must be followed "
-          "by '.'.",
+              "by '.'.",
           correction:
               "Try correcting the name to refer to something other than a prefix, or "
               "renaming the prefix.");
@@ -2319,7 +2324,7 @@
       const CompileTimeErrorCode(
           'PRIVATE_COLLISION_IN_MIXIN_APPLICATION',
           "The private name '{0}', defined by '{1}', "
-          "conflicts with the same name defined by '{2}'.",
+              "conflicts with the same name defined by '{2}'.",
           correction: "Try removing '{1}' from the 'with' clause.");
 
   /**
@@ -2456,7 +2461,7 @@
       const CompileTimeErrorCode(
           'REDIRECT_TO_NON_CLASS',
           "The name '{0}' isn't a type and can't be used in a redirected "
-          "constructor.",
+              "constructor.",
           correction: "Try redirecting to a different constructor.");
 
   /**
@@ -2467,7 +2472,7 @@
       const CompileTimeErrorCode(
           'REDIRECT_TO_NON_CONST_CONSTRUCTOR',
           "Constant factory constructor can't delegate to a non-constant "
-          "constructor.",
+              "constructor.",
           correction: "Try redirecting to a different constructor.");
 
   /**
@@ -2545,7 +2550,7 @@
       const CompileTimeErrorCode(
           'SHARED_DEFERRED_PREFIX',
           "The prefix of a deferred import can't be used in other import "
-          "directives.",
+              "directives.",
           correction: "Try renaming one of the prefixes.");
 
   /**
@@ -2638,7 +2643,7 @@
       const CompileTimeErrorCode(
           'TYPE_ALIAS_CANNOT_REFERENCE_ITSELF',
           "Typedefs can't reference themselves directly or recursively via "
-          "another typedef.");
+              "another typedef.");
 
   static const CompileTimeErrorCode TYPE_PARAMETER_ON_CONSTRUCTOR =
       const CompileTimeErrorCode('TYPE_PARAMETER_ON_CONSTRUCTOR',
@@ -2818,7 +2823,7 @@
       const CompileTimeErrorCode(
           'YIELD_EACH_IN_NON_GENERATOR',
           "Yield-each statements must be in a generator function "
-          "(one marked with either 'async*' or 'sync*').",
+              "(one marked with either 'async*' or 'sync*').",
           correction:
               "Try adding 'async*' or 'sync*' to the enclosing function.");
 
@@ -2830,7 +2835,7 @@
       const CompileTimeErrorCode(
           'YIELD_IN_NON_GENERATOR',
           "Yield statements must be in a generator function "
-          "(one marked with either 'async*' or 'sync*').",
+              "(one marked with either 'async*' or 'sync*').",
           correction:
               "Try adding 'async*' or 'sync*' to the enclosing function.");
 
@@ -2871,7 +2876,7 @@
       const StaticTypeWarningCode(
           'EXPECTED_ONE_LIST_TYPE_ARGUMENTS',
           "List literals require exactly one type argument or none, "
-          "but {0} found.",
+              "but {0} found.",
           correction: "Try adjusting the number of type arguments.");
 
   /**
@@ -2882,7 +2887,7 @@
       const StaticTypeWarningCode(
           'EXPECTED_ONE_SET_TYPE_ARGUMENTS',
           "Set literals require exactly one type argument or none, "
-          "but {0} found.",
+              "but {0} found.",
           correction: "Try adjusting the number of type arguments.");
 
   /**
@@ -2896,7 +2901,7 @@
       const StaticTypeWarningCode(
           'EXPECTED_TWO_MAP_TYPE_ARGUMENTS',
           "Map literals require exactly two type arguments or none, "
-          "but {0} found.",
+              "but {0} found.",
           correction: "Try adjusting the number of type arguments.");
 
   /**
@@ -2907,7 +2912,7 @@
       const StaticTypeWarningCode(
           'ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE',
           "Functions marked 'async*' must have a return type assignable to "
-          "'Stream'.",
+              "'Stream'.",
           correction: "Try fixing the return type of the function, or "
               "removing the modifier 'async*' from the function body.");
 
@@ -2919,7 +2924,7 @@
       const StaticTypeWarningCode(
           'ILLEGAL_ASYNC_RETURN_TYPE',
           "Functions marked 'async' must have a return type assignable to "
-          "'Future'.",
+              "'Future'.",
           correction: "Try fixing the return type of the function, or "
               "removing the modifier 'async' from the function body.");
 
@@ -3199,6 +3204,8 @@
    * 0: the name of the getter
    * 1: the name of the enclosing type where the getter is being looked for
    */
+  // TODO(brianwilkerson) When the "target" is an enum, report
+  //  UNDEFINED_ENUM_CONSTANT instead.
   static const StaticTypeWarningCode UNDEFINED_GETTER =
       const StaticTypeWarningCode('UNDEFINED_GETTER',
           "The getter '{0}' isn't defined for the class '{1}'.",
@@ -3247,6 +3254,14 @@
           "The operator '{0}' isn't defined for the class '{1}'.",
           correction: "Try defining the operator '{0}'.");
 
+  static const StaticTypeWarningCode UNDEFINED_PREFIXED_NAME =
+      const StaticTypeWarningCode(
+          'UNDEFINED_PREFIXED_NAME',
+          "The name '{0}' is being referenced through the prefix '{1}', but it "
+              "isn't defined in any of the libraries imported using that prefix.",
+          correction: "Try correcting the prefix or "
+              "importing the library that defines '{0}'.");
+
   /**
    * 12.18 Assignment: Let <i>T</i> be the static type of <i>e<sub>1</sub></i>.
    * It is a static type warning if <i>T</i> does not have an accessible
@@ -3371,7 +3386,7 @@
       const StaticTypeWarningCode(
           'WRONG_NUMBER_OF_TYPE_ARGUMENTS',
           "The type '{0}' is declared with {1} type parameters, "
-          "but {2} type arguments were given.",
+              "but {2} type arguments were given.",
           correction: "Try adjusting the number of type arguments.");
 
   /**
@@ -3401,7 +3416,7 @@
       const StaticTypeWarningCode(
           'WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD',
           "The method '{0}' is declared with {1} type parameters, "
-          "but {2} type arguments were given.",
+              "but {2} type arguments were given.",
           correction: "Try adjusting the number of type arguments.");
 
   /**
@@ -3426,7 +3441,7 @@
       const StaticTypeWarningCode(
           'YIELD_OF_INVALID_TYPE',
           "The type '{0}' implied by the 'yield' expression must be assignable "
-          "to '{1}'.");
+              "to '{1}'.");
 
   /**
    * 17.6.2 For-in. If the iterable expression does not implement Iterable,
@@ -3454,7 +3469,7 @@
       const StaticTypeWarningCode(
           'FOR_IN_OF_INVALID_ELEMENT_TYPE',
           "The type '{0}' used in the 'for' loop must implement {1} with a "
-          "type argument that can be assigned to '{2}'.");
+              "type argument that can be assigned to '{2}'.");
 
   /**
    * Initialize a newly created error code to have the given [name]. The message
@@ -3616,7 +3631,7 @@
       const StaticWarningCode(
           'CASE_BLOCK_NOT_TERMINATED',
           "The last statement of the 'case' should be 'break', 'continue', "
-          "'rethrow', 'return' or 'throw'.",
+              "'rethrow', 'return' or 'throw'.",
           correction: "Try adding one of the required statements.");
 
   /**
@@ -3654,21 +3669,6 @@
           correction: "Try creating an instance of a subtype.");
 
   /**
-   * 12.7 Maps: It is a static warning if the values of any two keys in a map
-   * literal are equal.
-   */
-  static const StaticWarningCode EQUAL_KEYS_IN_MAP = const StaticWarningCode(
-      'EQUAL_KEYS_IN_MAP', "Two keys in a map literal can't be equal.");
-
-  /**
-   * It is a compile-time error if any two of the values in a constant set are
-   * equal according to `==`.
-   */
-  static const StaticWarningCode EQUAL_VALUES_IN_CONST_SET =
-      const StaticWarningCode('EQUAL_VALUES_IN_CONST_SET',
-          "Two values in a constant set can't be equal.");
-
-  /**
    * 14.2 Exports: It is a static warning to export two different libraries with
    * the same name.
    *
@@ -3724,7 +3724,7 @@
       const StaticWarningCode(
           'FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION',
           "Fields can't be initialized in the constructor if they are final "
-          "and have already been initialized at their declaration.",
+              "and have already been initialized at their declaration.",
           correction: "Try removing one of the initializations.");
 
   /**
@@ -3740,7 +3740,7 @@
       const StaticWarningCode(
           'FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR',
           "'{0}' is final and was given a value when it was declared, "
-          "so it can't be set to a new value.",
+              "so it can't be set to a new value.",
           correction: "Try removing one of the initializations.");
 
   /**
@@ -3850,16 +3850,6 @@
           correction: "Try adding initializers for the fields.");
 
   /**
-   * 15.5 Function Types: It is a static warning if a concrete class implements
-   * Function and does not have a concrete method named call().
-   */
-  static const StaticWarningCode FUNCTION_WITHOUT_CALL = const StaticWarningCode(
-      'FUNCTION_WITHOUT_CALL',
-      "Concrete classes that implement 'Function' must implement the method 'call'.",
-      correction:
-          "Try implementing a 'call' method, or don't implement 'Function'.");
-
-  /**
    * 14.1 Imports: It is a static warning to import two different libraries with
    * the same name.
    *
@@ -3898,7 +3888,7 @@
       INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED = const StaticWarningCode(
           'INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED',
           "Parameters can't override default values, "
-          "this method overrides '{0}.{1}' where '{2}' has a different value.",
+              "this method overrides '{0}.{1}' where '{2}' has a different value.",
           correction: "Try using the same default value in both methods.",
           errorSeverity: ErrorSeverity.WARNING);
 
@@ -3914,84 +3904,11 @@
       const StaticWarningCode(
           'INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL',
           "Parameters can't override default values, this method overrides "
-          "'{0}.{1}' where this positional parameter has a different value.",
+              "'{0}.{1}' where this positional parameter has a different value.",
           correction: "Try using the same default value in both methods.",
           errorSeverity: ErrorSeverity.WARNING);
 
   /**
-   * 7.1 Instance Methods: It is a static warning if an instance method
-   * <i>m1</i> overrides an instance member <i>m2</i> and <i>m1</i> does not
-   * declare all the named parameters declared by <i>m2</i>.
-   *
-   * Parameters:
-   * 0: the number of named parameters in the overridden member
-   * 1: the signature of the overridden member
-   * 2: the name of the class from the overridden method
-   */
-  static const StaticWarningCode INVALID_OVERRIDE_NAMED =
-      const StaticWarningCode(
-          'INVALID_OVERRIDE_NAMED',
-          "Missing the named parameter '{0}' "
-          "to match the overridden method from '{1}' from '{2}'.",
-          correction: "Try adding the named parameter to this method, or "
-              "removing it from the overridden method.");
-
-  /**
-   * 7.1 Instance Methods: It is a static warning if an instance method
-   * <i>m1</i> overrides an instance member <i>m2</i> and <i>m1</i> has fewer
-   * positional parameters than <i>m2</i>.
-   *
-   * Parameters:
-   * 0: the number of positional parameters in the overridden member
-   * 1: the signature of the overridden member
-   * 2: the name of the class from the overridden method
-   */
-  static const StaticWarningCode INVALID_OVERRIDE_POSITIONAL =
-      const StaticWarningCode(
-          'INVALID_OVERRIDE_POSITIONAL',
-          "Must have at least {0} parameters "
-          "to match the overridden method '{1}' from '{2}'.",
-          correction: "Try adding the necessary parameters.");
-
-  /**
-   * 7.1 Instance Methods: It is a static warning if an instance method
-   * <i>m1</i> overrides an instance member <i>m2</i> and <i>m1</i> has a
-   * greater number of required parameters than <i>m2</i>.
-   *
-   * Parameters:
-   * 0: the number of required parameters in the overridden member
-   * 1: the signature of the overridden member
-   * 2: the name of the class from the overridden method
-   */
-  static const StaticWarningCode INVALID_OVERRIDE_REQUIRED =
-      const StaticWarningCode(
-          'INVALID_OVERRIDE_REQUIRED',
-          "Must have {0} required parameters or less "
-          "to match the overridden method '{1}' from '{2}'.",
-          correction: "Try removing the extra parameters.");
-
-  /**
-   * 7.3 Setters: It is a static warning if a setter <i>m1</i> overrides a
-   * setter <i>m2</i> and the type of <i>m1</i> is not a subtype of the type of
-   * <i>m2</i>.
-   *
-   * Parameters:
-   * 0: the name of the actual parameter type
-   * 1: the name of the expected parameter type, not assignable to the actual
-   * parameter type
-   * 2: the name of the class where the overridden setter is declared
-   *
-   * See [INVALID_METHOD_OVERRIDE_NORMAL_PARAM_TYPE].
-   */
-  static const StaticWarningCode INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE =
-      const StaticWarningCode(
-          'INVALID_SETTER_OVERRIDE_NORMAL_PARAM_TYPE',
-          "The parameter type '{0}' isn't assignable to '{1}' as required by "
-          "the setter it is overriding from '{2}'.",
-          correction:
-              "Try changing the parameter types so that they are compatible.");
-
-  /**
    * 12.6 Lists: A run-time list literal &lt;<i>E</i>&gt; [<i>e<sub>1</sub></i>
    * &hellip; <i>e<sub>n</sub></i>] is evaluated as follows:
    * * The operator []= is invoked on <i>a</i> with first argument <i>i</i> and
@@ -4065,7 +3982,7 @@
       const StaticWarningCode(
           'MISMATCHED_GETTER_AND_SETTER_TYPES',
           "The return type of getter '{0}' is '{1}' which isn't assignable "
-          "to the type '{2}' of its setter '{3}'.",
+              "to the type '{2}' of its setter '{3}'.",
           correction: "Try changing the types so that they are compatible.");
 
   /**
@@ -4125,7 +4042,7 @@
       const StaticWarningCode(
           'NEW_WITH_INVALID_TYPE_PARAMETERS',
           "The type '{0}' is declared with {1} type parameters, "
-          "but {2} type arguments were given.",
+              "but {2} type arguments were given.",
           correction: "Try adjusting the number of type arguments.");
 
   /**
@@ -4483,7 +4400,7 @@
       const StaticWarningCode(
           'SWITCH_EXPRESSION_NOT_ASSIGNABLE',
           "Type '{0}' of the switch expression isn't assignable to "
-          "the type '{1}' of case expressions.");
+              "the type '{1}' of case expressions.");
 
   /**
    * 15.1 Static Types: It is a static warning to use a deferred type in a type
@@ -4607,7 +4524,7 @@
       const StaticWarningCode(
           'UNCHECKED_USE_OF_NULLABLE_VALUE',
           'The expression is nullable and must be null-checked before it can be'
-          ' used.',
+              ' used.',
           correction:
               'Try casting or check the value is not null before using it.');
 
@@ -4649,6 +4566,10 @@
 
 /**
  * This class has Strong Mode specific error codes.
+ * 
+ * "Strong Mode" was the prototype for Dart 2's sound type system. Many of these
+ * errors became part of Dart 2. Some of them are optional flags, used for
+ * stricter checking.
  *
  * These error codes tend to use the same message across different severity
  * levels, so they are grouped for clarity.
@@ -4729,29 +4650,29 @@
       ErrorType.COMPILE_TIME_ERROR,
       'INVALID_CAST_LITERAL_LIST',
       "The list literal type '{0}' isn't of expected type '{1}'. The list's "
-      "type can be changed with an explicit generic type argument or by "
-      "changing the element types.");
+          "type can be changed with an explicit generic type argument or by "
+          "changing the element types.");
 
   static const StrongModeCode INVALID_CAST_LITERAL_MAP = const StrongModeCode(
       ErrorType.COMPILE_TIME_ERROR,
       'INVALID_CAST_LITERAL_MAP',
       "The map literal type '{0}' isn't of expected type '{1}'. The maps's "
-      "type can be changed with an explicit generic type arguments or by "
-      "changing the key and value types.");
+          "type can be changed with an explicit generic type arguments or by "
+          "changing the key and value types.");
 
   static const StrongModeCode INVALID_CAST_LITERAL_SET = const StrongModeCode(
       ErrorType.COMPILE_TIME_ERROR,
       'INVALID_CAST_LITERAL_SET',
       "The set literal type '{0}' isn't of expected type '{1}'. The set's "
-      "type can be changed with an explicit generic type argument or by "
-      "changing the element types.");
+          "type can be changed with an explicit generic type argument or by "
+          "changing the element types.");
 
   static const StrongModeCode INVALID_CAST_FUNCTION_EXPR = const StrongModeCode(
       ErrorType.COMPILE_TIME_ERROR,
       'INVALID_CAST_FUNCTION_EXPR',
       "The function expression type '{0}' isn't of type '{1}'. "
-      "This means its parameter or return type does not match what is "
-      "expected. Consider changing parameter type(s) or the returned type(s).");
+          "This means its parameter or return type does not match what is "
+          "expected. Consider changing parameter type(s) or the returned type(s).");
 
   static const StrongModeCode INVALID_CAST_NEW_EXPR = const StrongModeCode(
       ErrorType.COMPILE_TIME_ERROR,
@@ -4762,21 +4683,21 @@
       ErrorType.COMPILE_TIME_ERROR,
       'INVALID_CAST_METHOD',
       "The method tear-off '{0}' has type '{1}' that isn't of expected type "
-      "'{2}'. This means its parameter or return type does not match what is "
-      "expected.");
+          "'{2}'. This means its parameter or return type does not match what is "
+          "expected.");
 
   static const StrongModeCode INVALID_CAST_FUNCTION = const StrongModeCode(
       ErrorType.COMPILE_TIME_ERROR,
       'INVALID_CAST_FUNCTION',
       "The function '{0}' has type '{1}' that isn't of expected type "
-      "'{2}'. This means its parameter or return type does not match what is "
-      "expected.");
+          "'{2}'. This means its parameter or return type does not match what is "
+          "expected.");
 
   static const StrongModeCode INVALID_SUPER_INVOCATION = const StrongModeCode(
       ErrorType.COMPILE_TIME_ERROR,
       'INVALID_SUPER_INVOCATION',
       "super call must be last in an initializer "
-      "list (see https://goo.gl/EY6hDP): '{0}'.");
+          "list (see https://goo.gl/EY6hDP): '{0}'.");
 
   static const StrongModeCode NON_GROUND_TYPE_CHECK_INFO = const StrongModeCode(
       ErrorType.HINT,
@@ -4786,11 +4707,6 @@
   static const StrongModeCode DYNAMIC_INVOKE = const StrongModeCode(
       ErrorType.HINT, 'DYNAMIC_INVOKE', "'{0}' requires a dynamic invoke.");
 
-  static const StrongModeCode INVALID_FIELD_OVERRIDE = const StrongModeCode(
-      ErrorType.COMPILE_TIME_ERROR,
-      'INVALID_FIELD_OVERRIDE',
-      "Field declaration '{3}.{1}' can't be overridden in '{0}'.");
-
   static const StrongModeCode IMPLICIT_DYNAMIC_PARAMETER = const StrongModeCode(
       ErrorType.COMPILE_TIME_ERROR,
       'IMPLICIT_DYNAMIC_PARAMETER',
@@ -4853,12 +4769,6 @@
       "Missing type arguments for calling generic function type '{0}'.",
       correction: _implicitDynamicCorrection);
 
-  static const StrongModeCode NO_DEFAULT_BOUNDS = const StrongModeCode(
-      ErrorType.COMPILE_TIME_ERROR,
-      'NO_DEFAULT_BOUNDS',
-      "Type has no default bounds",
-      correction: "Try adding explicit type arguments to type");
-
   static const StrongModeCode NOT_INSTANTIATED_BOUND = const StrongModeCode(
       ErrorType.COMPILE_TIME_ERROR,
       'NOT_INSTANTIATED_BOUND',
@@ -4895,22 +4805,16 @@
       ErrorType.STATIC_WARNING,
       'TOP_LEVEL_INSTANCE_GETTER',
       "The type of '{0}' can't be inferred because it refers to an instance "
-      "getter, '{1}', which has an implicit type.",
+          "getter, '{1}', which has an implicit type.",
       correction: "Add an explicit type for either '{0}' or '{1}'.");
 
   static const StrongModeCode TOP_LEVEL_INSTANCE_METHOD = const StrongModeCode(
       ErrorType.STATIC_WARNING,
       'TOP_LEVEL_INSTANCE_METHOD',
       "The type of '{0}' can't be inferred because it refers to an instance "
-      "method, '{1}', which has an implicit type.",
+          "method, '{1}', which has an implicit type.",
       correction: "Add an explicit type for either '{0}' or '{1}'.");
 
-  static const StrongModeCode TOP_LEVEL_UNSUPPORTED = const StrongModeCode(
-      ErrorType.HINT,
-      'TOP_LEVEL_UNSUPPORTED',
-      "The type of '{0}' can't be inferred because {1} expressions aren't supported.",
-      correction: "Try adding an explicit type for '{0}'.");
-
   @override
   final ErrorType type;
 
diff --git a/pkg/analyzer/lib/src/error/inheritance_override.dart b/pkg/analyzer/lib/src/error/inheritance_override.dart
index a5f1196..d120057 100644
--- a/pkg/analyzer/lib/src/error/inheritance_override.dart
+++ b/pkg/analyzer/lib/src/error/inheritance_override.dart
@@ -3,10 +3,12 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/constant/value.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/error/listener.dart';
+import 'package:analyzer/src/dart/constant/value.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/inheritance_manager2.dart';
 import 'package:analyzer/src/dart/element/type.dart';
@@ -454,7 +456,7 @@
           if (name == baseParameter.name && baseParameter.initializer != null) {
             var baseValue = baseParameter.computeConstantValue();
             var derivedResult = derivedElement.evaluationResult;
-            if (derivedResult.value != baseValue) {
+            if (!_constantValuesEqual(derivedResult.value, baseValue)) {
               reporter.reportErrorForNode(
                 StaticWarningCode
                     .INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED,
@@ -477,7 +479,7 @@
         if (baseElement.initializer != null) {
           var baseValue = baseElement.computeConstantValue();
           var derivedResult = derivedOptionalElements[i].evaluationResult;
-          if (derivedResult.value != baseValue) {
+          if (!_constantValuesEqual(derivedResult.value, baseValue)) {
             reporter.reportErrorForNode(
               StaticWarningCode
                   .INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL,
@@ -718,4 +720,12 @@
       );
     }
   }
+
+  static bool _constantValuesEqual(DartObject x, DartObject y) {
+    // If either constant value couldn't be computed due to an error, the
+    // corresponding DartObject will be `null`.  Since an error has already been
+    // reported, there's no need to report another.
+    if (x == null || y == null) return true;
+    return (x as DartObjectImpl).isEqualIgnoringTypesRecursively(y);
+  }
 }
diff --git a/pkg/analyzer/lib/src/error/literal_element_verifier.dart b/pkg/analyzer/lib/src/error/literal_element_verifier.dart
new file mode 100644
index 0000000..89dcdce
--- /dev/null
+++ b/pkg/analyzer/lib/src/error/literal_element_verifier.dart
@@ -0,0 +1,220 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/error/listener.dart';
+import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/resolver.dart';
+
+/// Verifier for [CollectionElement]s in list, set, or map literals.
+class LiteralElementVerifier {
+  final TypeProvider typeProvider;
+  final TypeSystem typeSystem;
+  final ErrorReporter errorReporter;
+  final bool Function(Expression) checkForUseOfVoidResult;
+
+  final bool forList;
+  final bool forSet;
+  final DartType elementType;
+
+  final bool forMap;
+  final DartType mapKeyType;
+  final DartType mapValueType;
+
+  LiteralElementVerifier(
+    this.typeProvider,
+    this.typeSystem,
+    this.errorReporter,
+    this.checkForUseOfVoidResult, {
+    this.forList = false,
+    this.forSet = false,
+    this.elementType,
+    this.forMap = false,
+    this.mapKeyType,
+    this.mapValueType,
+  });
+
+  void verify(CollectionElement element) {
+    _verifyElement(element);
+  }
+
+  /// Check that the given [type] is assignable to the [elementType], otherwise
+  /// report the list or set error on the [errorNode].
+  void _checkAssignableToElementType(DartType type, AstNode errorNode) {
+    if (!typeSystem.isAssignableTo(type, elementType)) {
+      var errorCode = forList
+          ? StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+          : StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE;
+      errorReporter.reportTypeErrorForNode(
+        errorCode,
+        errorNode,
+        [type, elementType],
+      );
+    }
+  }
+
+  /// Verify that the given [element] can be assigned to the [elementType] of
+  /// the enclosing list, set, of map literal.
+  void _verifyElement(CollectionElement element) {
+    if (element is Expression) {
+      if (forList || forSet) {
+        if (!elementType.isVoid && checkForUseOfVoidResult(element)) {
+          return;
+        }
+        _checkAssignableToElementType(element.staticType, element);
+      } else {
+        errorReporter.reportErrorForNode(
+            CompileTimeErrorCode.EXPRESSION_IN_MAP, element);
+      }
+    } else if (element is ForElement) {
+      _verifyElement(element.body);
+    } else if (element is IfElement) {
+      _verifyElement(element.thenElement);
+      _verifyElement(element.elseElement);
+    } else if (element is MapLiteralEntry) {
+      if (forMap) {
+        _verifyMapLiteralEntry(element);
+      } else {
+        errorReporter.reportErrorForNode(
+            CompileTimeErrorCode.MAP_ENTRY_NOT_IN_MAP, element);
+      }
+    } else if (element is SpreadElement) {
+      var isNullAware = element.spreadOperator.type ==
+          TokenType.PERIOD_PERIOD_PERIOD_QUESTION;
+      Expression expression = element.expression;
+      if (forList || forSet) {
+        _verifySpreadForListOrSet(isNullAware, expression);
+      } else if (forMap) {
+        _verifySpreadForMap(isNullAware, expression);
+      }
+    }
+  }
+
+  /// Verify that the [entry]'s key and value are assignable to [mapKeyType]
+  /// and [mapValueType].
+  void _verifyMapLiteralEntry(MapLiteralEntry entry) {
+    if (!mapKeyType.isVoid && checkForUseOfVoidResult(entry.key)) {
+      return;
+    }
+
+    if (!mapValueType.isVoid && checkForUseOfVoidResult(entry.value)) {
+      return;
+    }
+
+    var keyType = entry.key.staticType;
+    if (!typeSystem.isAssignableTo(keyType, mapKeyType)) {
+      errorReporter.reportTypeErrorForNode(
+        StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE,
+        entry.key,
+        [keyType, mapKeyType],
+      );
+    }
+
+    var valueType = entry.value.staticType;
+    if (!typeSystem.isAssignableTo(valueType, mapValueType)) {
+      errorReporter.reportTypeErrorForNode(
+        StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE,
+        entry.value,
+        [valueType, mapValueType],
+      );
+    }
+  }
+
+  /// Verify that the type of the elements of the given [expression] can be
+  /// assigned to the [elementType] of the enclosing collection.
+  void _verifySpreadForListOrSet(bool isNullAware, Expression expression) {
+    var expressionType = expression.staticType;
+    if (expressionType.isDynamic) return;
+
+    if (expressionType.isDartCoreNull) {
+      if (!isNullAware) {
+        errorReporter.reportErrorForNode(
+          CompileTimeErrorCode.NOT_NULL_AWARE_NULL_SPREAD,
+          expression,
+        );
+      }
+      return;
+    }
+
+    InterfaceType iterableType;
+    var iterableObjectType = typeProvider.iterableObjectType;
+    if (expressionType is InterfaceTypeImpl &&
+        typeSystem.isSubtypeOf(expressionType, iterableObjectType)) {
+      iterableType = expressionType.asInstanceOf(
+        iterableObjectType.element,
+      );
+    }
+
+    if (iterableType == null) {
+      return errorReporter.reportErrorForNode(
+        CompileTimeErrorCode.NOT_ITERABLE_SPREAD,
+        expression,
+      );
+    }
+
+    var iterableElementType = iterableType.typeArguments[0];
+    if (!typeSystem.isAssignableTo(iterableElementType, elementType)) {
+      var errorCode = forList
+          ? StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+          : StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE;
+      errorReporter.reportTypeErrorForNode(
+        errorCode,
+        expression,
+        [iterableElementType, elementType],
+      );
+    }
+  }
+
+  /// Verify that the [expression] is a subtype of `Map<Object, Object>`, and
+  /// its key and values are assignable to [mapKeyType] and [mapValueType].
+  void _verifySpreadForMap(bool isNullAware, Expression expression) {
+    var expressionType = expression.staticType;
+    if (expressionType.isDynamic) return;
+
+    if (expressionType.isDartCoreNull) {
+      if (!isNullAware) {
+        errorReporter.reportErrorForNode(
+          CompileTimeErrorCode.NOT_NULL_AWARE_NULL_SPREAD,
+          expression,
+        );
+      }
+      return;
+    }
+
+    InterfaceType mapType;
+    var mapObjectObjectType = typeProvider.mapObjectObjectType;
+    if (expressionType is InterfaceTypeImpl &&
+        typeSystem.isSubtypeOf(expressionType, mapObjectObjectType)) {
+      mapType = expressionType.asInstanceOf(mapObjectObjectType.element);
+    }
+
+    if (mapType == null) {
+      return errorReporter.reportErrorForNode(
+        CompileTimeErrorCode.NOT_MAP_SPREAD,
+        expression,
+      );
+    }
+
+    var keyType = mapType.typeArguments[0];
+    if (!typeSystem.isAssignableTo(keyType, mapKeyType)) {
+      errorReporter.reportTypeErrorForNode(
+        StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE,
+        expression,
+        [keyType, mapKeyType],
+      );
+    }
+
+    var valueType = mapType.typeArguments[1];
+    if (!typeSystem.isAssignableTo(valueType, mapValueType)) {
+      errorReporter.reportTypeErrorForNode(
+        StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE,
+        expression,
+        [valueType, mapValueType],
+      );
+    }
+  }
+}
diff --git a/pkg/analyzer/lib/src/fasta/ast_builder.dart b/pkg/analyzer/lib/src/fasta/ast_builder.dart
index edbcf3c..22634cd 100644
--- a/pkg/analyzer/lib/src/fasta/ast_builder.dart
+++ b/pkg/analyzer/lib/src/fasta/ast_builder.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -7,27 +7,15 @@
 import 'package:analyzer/dart/ast/standard_ast_factory.dart' as standard;
 import 'package:analyzer/dart/ast/token.dart' show Token, TokenType;
 import 'package:analyzer/error/listener.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/ast/ast.dart'
     show
         ClassDeclarationImpl,
         ClassOrMixinDeclarationImpl,
+        CompilationUnitImpl,
         MixinDeclarationImpl;
 import 'package:analyzer/src/fasta/error_converter.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
-import 'package:front_end/src/fasta/parser.dart'
-    show
-        Assert,
-        FormalParameterKind,
-        IdentifierContext,
-        MemberKind,
-        optional,
-        Parser;
-import 'package:front_end/src/fasta/scanner.dart' hide StringToken;
-import 'package:front_end/src/scanner/errors.dart' show translateErrorToken;
-import 'package:front_end/src/scanner/token.dart'
-    show SyntheticStringToken, SyntheticToken;
-
-import 'package:front_end/src/fasta/problems.dart' show unhandled;
 import 'package:front_end/src/fasta/messages.dart'
     show
         LocatedMessage,
@@ -41,18 +29,38 @@
         messageFieldInitializerOutsideConstructor,
         messageIllegalAssignmentToNonAssignable,
         messageInterpolationInUri,
+        messageInvalidSuperInInitializer,
+        messageInvalidThisInInitializer,
         messageMissingAssignableSelector,
         messageNativeClauseShouldBeAnnotation,
         messageStaticConstructor,
         messageTypedefNotFunction,
         templateDuplicateLabelInSwitchStatement,
+        templateExpectedButGot,
         templateExpectedIdentifier,
+        templateExperimentNotEnabled,
         templateUnexpectedToken;
+import 'package:front_end/src/fasta/parser.dart'
+    show
+        Assert,
+        FormalParameterKind,
+        IdentifierContext,
+        MemberKind,
+        optional,
+        Parser;
+import 'package:front_end/src/fasta/problems.dart' show unhandled;
 import 'package:front_end/src/fasta/quote.dart';
+import 'package:front_end/src/fasta/scanner.dart' hide StringToken;
 import 'package:front_end/src/fasta/scanner/token_constants.dart';
 import 'package:front_end/src/fasta/source/stack_listener.dart'
     show NullValue, StackListener;
+import 'package:front_end/src/scanner/errors.dart' show translateErrorToken;
+import 'package:front_end/src/scanner/token.dart'
+    show CommentToken, SyntheticStringToken, SyntheticToken;
 import 'package:kernel/ast.dart' show AsyncMarker;
+import 'package:pub_semver/pub_semver.dart';
+
+const _invalidCollectionElement = const _InvalidCollectionElement._();
 
 /// A parser listener that builds the analyzer's AST structure.
 class AstBuilder extends StackListener {
@@ -61,6 +69,7 @@
   final FastaErrorReporter errorReporter;
   final Uri fileUri;
   ScriptTag scriptTag;
+  Version languageVersion;
   final List<Directive> directives = <Directive>[];
   final List<CompilationUnitMember> declarations = <CompilationUnitMember>[];
   final localDeclarations = <int, AstNode>{};
@@ -106,406 +115,24 @@
   /// `true` if control-flow-collections behavior is enabled
   bool enableControlFlowCollections = false;
 
-  /// Is `true` if [enableNonNullable] is enabled, and the library directive
-  /// is annotated with `@pragma('analyzer:non-nullable')`.
-  bool hasPragmaAnalyzerNonNullable = false;
+  /// `true` if triple-shift behavior is enabled
+  bool enableTripleShift = false;
 
   AstBuilder(ErrorReporter errorReporter, this.fileUri, this.isFullAst,
       [Uri uri])
       : this.errorReporter = new FastaErrorReporter(errorReporter),
         uri = uri ?? fileUri;
 
-  void beginLiteralString(Token literalString) {
-    assert(identical(literalString.kind, STRING_TOKEN));
-    debugEvent("beginLiteralString");
-
-    push(literalString);
-  }
-
-  void handleNamedArgument(Token colon) {
-    assert(optional(':', colon));
-    debugEvent("NamedArgument");
-
-    Expression expression = pop();
-    SimpleIdentifier name = pop();
-    push(ast.namedExpression(ast.label(name, colon), expression));
-  }
-
   @override
-  void handleNoConstructorReferenceContinuationAfterTypeArguments(Token token) {
-    debugEvent("NoConstructorReferenceContinuationAfterTypeArguments");
-
-    push(NullValue.ConstructorReferenceContinuationAfterTypeArguments);
-  }
-
-  @override
-  void endConstructorReference(
-      Token start, Token periodBeforeName, Token endToken) {
-    assert(optionalOrNull('.', periodBeforeName));
-    debugEvent("ConstructorReference");
-
-    SimpleIdentifier constructorName = pop();
-    TypeArgumentList typeArguments = pop();
-    Identifier typeNameIdentifier = pop();
-    push(ast.constructorName(ast.typeName(typeNameIdentifier, typeArguments),
-        periodBeforeName, constructorName));
-  }
-
-  @override
-  void endConstExpression(Token constKeyword) {
-    assert(optional('const', constKeyword));
-    debugEvent("ConstExpression");
-
-    _handleInstanceCreation(constKeyword);
-  }
-
-  @override
-  void endConstLiteral(Token token) {
-    debugEvent("endConstLiteral");
-  }
-
-  void _handleInstanceCreation(Token token) {
-    MethodInvocation arguments = pop();
-    ConstructorName constructorName;
-    TypeArgumentList typeArguments;
-    var object = pop();
-    if (object is _ConstructorNameWithInvalidTypeArgs) {
-      constructorName = object.name;
-      typeArguments = object.invalidTypeArgs;
-    } else {
-      constructorName = object;
+  void addProblem(Message message, int charOffset, int length,
+      {bool wasHandled: false, List<LocatedMessage> context}) {
+    if (directives.isEmpty &&
+        (message.code.analyzerCodes
+                ?.contains('NON_PART_OF_DIRECTIVE_IN_PART') ??
+            false)) {
+      message = messageDirectiveAfterDeclaration;
     }
-    push(ast.instanceCreationExpression(
-        token, constructorName, arguments.argumentList,
-        typeArguments: typeArguments));
-  }
-
-  @override
-  void endImplicitCreationExpression(Token token) {
-    debugEvent("ImplicitCreationExpression");
-
-    _handleInstanceCreation(null);
-  }
-
-  @override
-  void endNewExpression(Token newKeyword) {
-    assert(optional('new', newKeyword));
-    debugEvent("NewExpression");
-
-    _handleInstanceCreation(newKeyword);
-  }
-
-  @override
-  void handleParenthesizedCondition(Token leftParenthesis) {
-    // TODO(danrubel): Implement rather than forwarding.
-    handleParenthesizedExpression(leftParenthesis);
-  }
-
-  @override
-  void handleParenthesizedExpression(Token leftParenthesis) {
-    assert(optional('(', leftParenthesis));
-    debugEvent("ParenthesizedExpression");
-
-    Expression expression = pop();
-    push(ast.parenthesizedExpression(
-        leftParenthesis, expression, leftParenthesis?.endGroup));
-  }
-
-  @override
-  void handleStringPart(Token literalString) {
-    assert(identical(literalString.kind, STRING_TOKEN));
-    debugEvent("StringPart");
-
-    push(literalString);
-  }
-
-  @override
-  void handleInterpolationExpression(Token leftBracket, Token rightBracket) {
-    Expression expression = pop();
-    push(ast.interpolationExpression(leftBracket, expression, rightBracket));
-  }
-
-  @override
-  void endLiteralString(int interpolationCount, Token endToken) {
-    debugEvent("endLiteralString");
-
-    if (interpolationCount == 0) {
-      Token token = pop();
-      String value = unescapeString(token.lexeme, token, this);
-      push(ast.simpleStringLiteral(token, value));
-    } else {
-      List<Object> parts = popTypedList(1 + interpolationCount * 2);
-      Token first = parts.first;
-      Token last = parts.last;
-      Quote quote = analyzeQuote(first.lexeme);
-      List<InterpolationElement> elements = <InterpolationElement>[];
-      elements.add(ast.interpolationString(
-          first, unescapeFirstStringPart(first.lexeme, quote, first, this)));
-      for (int i = 1; i < parts.length - 1; i++) {
-        var part = parts[i];
-        if (part is Token) {
-          elements.add(ast.interpolationString(
-              part, unescape(part.lexeme, quote, part, this)));
-        } else if (part is InterpolationExpression) {
-          elements.add(part);
-        } else {
-          unhandled("${part.runtimeType}", "string interpolation",
-              first.charOffset, uri);
-        }
-      }
-      elements.add(ast.interpolationString(
-          last, unescapeLastStringPart(last.lexeme, quote, last, this)));
-      push(ast.stringInterpolation(elements));
-    }
-  }
-
-  @override
-  void handleNativeClause(Token nativeToken, bool hasName) {
-    debugEvent("NativeClause");
-
-    if (hasName) {
-      nativeName = pop(); // StringLiteral
-    } else {
-      nativeName = null;
-    }
-  }
-
-  void handleScript(Token token) {
-    assert(identical(token.type, TokenType.SCRIPT_TAG));
-    debugEvent("Script");
-
-    scriptTag = ast.scriptTag(token);
-  }
-
-  void beginIfControlFlow(Token ifToken) {
-    push(ifToken);
-  }
-
-  @override
-  void handleElseControlFlow(Token elseToken) {
-    push(elseToken);
-  }
-
-  @override
-  void endIfControlFlow(Token token) {
-    CollectionElement thenElement = pop();
-    ParenthesizedExpression condition = pop();
-    Token ifToken = pop();
-    pushIfControlFlowInfo(ifToken, condition, thenElement, null, null);
-  }
-
-  @override
-  void endIfElseControlFlow(Token token) {
-    CollectionElement elseElement = pop();
-    Token elseToken = pop();
-    CollectionElement thenElement = pop();
-    ParenthesizedExpression condition = pop();
-    Token ifToken = pop();
-    pushIfControlFlowInfo(
-        ifToken, condition, thenElement, elseToken, elseElement);
-  }
-
-  void pushIfControlFlowInfo(
-      Token ifToken,
-      ParenthesizedExpression condition,
-      CollectionElement thenElement,
-      Token elseToken,
-      CollectionElement elseElement) {
-    if (enableControlFlowCollections) {
-      push(ast.ifElement(
-        ifKeyword: ifToken,
-        leftParenthesis: condition.leftParenthesis,
-        condition: condition.expression,
-        rightParenthesis: condition.rightParenthesis,
-        thenElement: thenElement,
-        elseKeyword: elseToken,
-        elseElement: elseElement,
-      ));
-    } else {
-      handleRecoverableError(
-          templateUnexpectedToken.withArguments(ifToken), ifToken, ifToken);
-      push(thenElement);
-    }
-  }
-
-  @override
-  void handleSpreadExpression(Token spreadToken) {
-    if (enableSpreadCollections) {
-      push(ast.spreadElement(spreadOperator: spreadToken, expression: pop()));
-    } else {
-      handleRecoverableError(templateUnexpectedToken.withArguments(spreadToken),
-          spreadToken, spreadToken);
-    }
-  }
-
-  void handleStringJuxtaposition(int literalCount) {
-    debugEvent("StringJuxtaposition");
-
-    push(ast.adjacentStrings(popTypedList(literalCount)));
-  }
-
-  void endArguments(int count, Token leftParenthesis, Token rightParenthesis) {
-    assert(optional('(', leftParenthesis));
-    assert(optional(')', rightParenthesis));
-    debugEvent("Arguments");
-
-    List<Expression> expressions = popTypedList(count);
-    ArgumentList arguments =
-        ast.argumentList(leftParenthesis, expressions, rightParenthesis);
-    push(ast.methodInvocation(null, null, null, null, arguments));
-  }
-
-  void handleIdentifier(Token token, IdentifierContext context) {
-    assert(token.isKeywordOrIdentifier);
-    debugEvent("handleIdentifier");
-
-    if (context.inSymbol) {
-      push(token);
-      return;
-    }
-
-    SimpleIdentifier identifier =
-        ast.simpleIdentifier(token, isDeclaration: context.inDeclaration);
-    if (context.inLibraryOrPartOfDeclaration) {
-      if (!context.isContinuation) {
-        push([identifier]);
-      } else {
-        push(identifier);
-      }
-    } else if (context == IdentifierContext.enumValueDeclaration) {
-      List<Annotation> metadata = pop();
-      Comment comment = _findComment(null, token);
-      push(ast.enumConstantDeclaration(comment, metadata, identifier));
-    } else {
-      push(identifier);
-    }
-  }
-
-  void handleSend(Token beginToken, Token endToken) {
-    debugEvent("Send");
-
-    MethodInvocation arguments = pop();
-    TypeArgumentList typeArguments = pop();
-    if (arguments != null) {
-      doInvocation(typeArguments, arguments);
-    } else {
-      doPropertyGet();
-    }
-  }
-
-  void doInvocation(
-      TypeArgumentList typeArguments, MethodInvocation arguments) {
-    Expression receiver = pop();
-    if (receiver is SimpleIdentifier) {
-      arguments.methodName = receiver;
-      if (typeArguments != null) {
-        arguments.typeArguments = typeArguments;
-      }
-      push(arguments);
-    } else {
-      push(ast.functionExpressionInvocation(
-          receiver, typeArguments, arguments.argumentList));
-    }
-  }
-
-  void doPropertyGet() {}
-
-  void handleExpressionStatement(Token semicolon) {
-    assert(optional(';', semicolon));
-    debugEvent("ExpressionStatement");
-    Expression expression = pop();
-    reportErrorIfSuper(expression);
-    if (expression is SimpleIdentifier &&
-        expression.token?.keyword?.isBuiltInOrPseudo == false) {
-      // This error is also reported by the body builder.
-      handleRecoverableError(
-          messageExpectedStatement, expression.beginToken, expression.endToken);
-    }
-    if (expression is AssignmentExpression) {
-      if (!expression.leftHandSide.isAssignable) {
-        // This error is also reported by the body builder.
-        handleRecoverableError(
-            messageIllegalAssignmentToNonAssignable,
-            expression.leftHandSide.beginToken,
-            expression.leftHandSide.endToken);
-      }
-    }
-    push(ast.expressionStatement(expression, semicolon));
-  }
-
-  void reportErrorIfSuper(Expression expression) {
-    if (expression is SuperExpression) {
-      // This error is also reported by the body builder.
-      handleRecoverableError(messageMissingAssignableSelector,
-          expression.beginToken, expression.endToken);
-    }
-  }
-
-  @override
-  void handleNativeFunctionBody(Token nativeToken, Token semicolon) {
-    assert(optional('native', nativeToken));
-    assert(optional(';', semicolon));
-    debugEvent("NativeFunctionBody");
-
-    // TODO(danrubel) Change the parser to not produce these modifiers.
-    pop(); // star
-    pop(); // async
-    push(ast.nativeFunctionBody(nativeToken, nativeName, semicolon));
-  }
-
-  @override
-  void handleEmptyFunctionBody(Token semicolon) {
-    assert(optional(';', semicolon));
-    debugEvent("EmptyFunctionBody");
-
-    // TODO(scheglov) Change the parser to not produce these modifiers.
-    pop(); // star
-    pop(); // async
-    push(ast.emptyFunctionBody(semicolon));
-  }
-
-  @override
-  void handleEmptyStatement(Token semicolon) {
-    assert(optional(';', semicolon));
-    debugEvent("EmptyStatement");
-
-    push(ast.emptyStatement(semicolon));
-  }
-
-  void endBlockFunctionBody(int count, Token leftBracket, Token rightBracket) {
-    assert(optional('{', leftBracket));
-    assert(optional('}', rightBracket));
-    debugEvent("BlockFunctionBody");
-
-    List<Statement> statements = popTypedList(count);
-    Block block = ast.block(leftBracket, statements, rightBracket);
-    Token star = pop();
-    Token asyncKeyword = pop();
-    if (parseFunctionBodies) {
-      push(ast.blockFunctionBody(asyncKeyword, star, block));
-    } else {
-      // TODO(danrubel): Skip the block rather than parsing it.
-      push(ast.emptyFunctionBody(
-          new SyntheticToken(TokenType.SEMICOLON, leftBracket.charOffset)));
-    }
-  }
-
-  void finishFunction(
-      List annotations, formals, AsyncMarker asyncModifier, FunctionBody body) {
-    debugEvent("finishFunction");
-
-    Statement bodyStatement;
-    if (body is EmptyFunctionBody) {
-      bodyStatement = ast.emptyStatement(body.semicolon);
-    } else if (body is NativeFunctionBody) {
-      // TODO(danrubel): what do we need to do with NativeFunctionBody?
-    } else if (body is ExpressionFunctionBody) {
-      bodyStatement = ast.returnStatement(null, body.expression, null);
-    } else {
-      bodyStatement = (body as BlockFunctionBody).block;
-    }
-    // TODO(paulberry): what do we need to do with bodyStatement at this point?
-    bodyStatement; // Suppress "unused local variable" hint
+    errorReporter.reportMessage(message, charOffset, length);
   }
 
   void beginCascade(Token token) {
@@ -522,48 +149,141 @@
     push(NullValue.CascadeReceiver);
   }
 
-  void endCascade() {
-    debugEvent("Cascade");
-
-    Expression expression = pop();
-    CascadeExpression receiver = pop();
-    pop(); // Token.
-    receiver.cascadeSections.add(expression);
-    push(receiver);
-  }
-
-  void handleOperator(Token operatorToken) {
-    assert(operatorToken.isUserDefinableOperator);
-    debugEvent("Operator");
-
-    push(operatorToken);
-  }
-
-  void handleSymbolVoid(Token voidKeyword) {
-    assert(optional('void', voidKeyword));
-    debugEvent("SymbolVoid");
-
-    push(voidKeyword);
+  @override
+  void beginClassDeclaration(Token begin, Token abstractToken, Token name) {
+    assert(classDeclaration == null && mixinDeclaration == null);
+    push(new _Modifiers()..abstractKeyword = abstractToken);
   }
 
   @override
-  void endBinaryExpression(Token operatorToken) {
-    assert(operatorToken.isOperator ||
-        optional('.', operatorToken) ||
-        optional('?.', operatorToken) ||
-        optional('..', operatorToken));
-    debugEvent("BinaryExpression");
+  void beginCompilationUnit(Token token) {
+    push(token);
+  }
 
-    if (identical(".", operatorToken.stringValue) ||
-        identical("?.", operatorToken.stringValue) ||
-        identical("..", operatorToken.stringValue)) {
-      doDotExpression(operatorToken);
-    } else {
-      Expression right = pop();
-      Expression left = pop();
-      reportErrorIfSuper(right);
-      push(ast.binaryExpression(left, operatorToken, right));
+  @override
+  void beginFactoryMethod(
+      Token lastConsumed, Token externalToken, Token constToken) {
+    push(new _Modifiers()
+      ..externalKeyword = externalToken
+      ..finalConstOrVarKeyword = constToken);
+  }
+
+  @override
+  void beginFormalParameter(Token token, MemberKind kind, Token covariantToken,
+      Token varFinalOrConst) {
+    push(new _Modifiers()
+      ..covariantKeyword = covariantToken
+      ..finalConstOrVarKeyword = varFinalOrConst);
+  }
+
+  @override
+  void beginFormalParameterDefaultValueExpression() {}
+
+  void beginIfControlFlow(Token ifToken) {
+    push(ifToken);
+  }
+
+  void beginLiteralString(Token literalString) {
+    assert(identical(literalString.kind, STRING_TOKEN));
+    debugEvent("beginLiteralString");
+
+    push(literalString);
+  }
+
+  @override
+  void beginMetadataStar(Token token) {
+    debugEvent("beginMetadataStar");
+  }
+
+  @override
+  void beginMethod(Token externalToken, Token staticToken, Token covariantToken,
+      Token varFinalOrConst, Token getOrSet, Token name) {
+    _Modifiers modifiers = new _Modifiers();
+    if (externalToken != null) {
+      assert(externalToken.isModifier);
+      modifiers.externalKeyword = externalToken;
     }
+    if (staticToken != null) {
+      assert(staticToken.isModifier);
+      String className = classDeclaration != null
+          ? classDeclaration.name.name
+          : mixinDeclaration.name.name;
+      if (name?.lexeme == className && getOrSet == null) {
+        // This error is also reported in OutlineBuilder.beginMethod
+        handleRecoverableError(
+            messageStaticConstructor, staticToken, staticToken);
+      } else {
+        modifiers.staticKeyword = staticToken;
+      }
+    }
+    if (covariantToken != null) {
+      assert(covariantToken.isModifier);
+      modifiers.covariantKeyword = covariantToken;
+    }
+    if (varFinalOrConst != null) {
+      assert(varFinalOrConst.isModifier);
+      modifiers.finalConstOrVarKeyword = varFinalOrConst;
+    }
+    push(modifiers);
+  }
+
+  @override
+  void beginMixinDeclaration(Token mixinKeyword, Token name) {
+    assert(classDeclaration == null && mixinDeclaration == null);
+  }
+
+  @override
+  void beginNamedMixinApplication(
+      Token begin, Token abstractToken, Token name) {
+    push(new _Modifiers()..abstractKeyword = abstractToken);
+  }
+
+  void beginTopLevelMethod(Token lastConsumed, Token externalToken) {
+    push(new _Modifiers()..externalKeyword = externalToken);
+  }
+
+  @override
+  void beginTypeVariable(Token token) {
+    debugEvent("beginTypeVariable");
+    SimpleIdentifier name = pop();
+    List<Annotation> metadata = pop();
+
+    Comment comment = _findComment(metadata, name.beginToken);
+    var typeParameter = ast.typeParameter(comment, metadata, name, null, null);
+    localDeclarations[name.offset] = typeParameter;
+    push(typeParameter);
+  }
+
+  @override
+  void beginVariablesDeclaration(Token token, Token varFinalOrConst) {
+    debugEvent("beginVariablesDeclaration");
+    if (varFinalOrConst != null) {
+      push(new _Modifiers()..finalConstOrVarKeyword = varFinalOrConst);
+    } else {
+      push(NullValue.Modifiers);
+    }
+  }
+
+  void checkFieldFormalParameters(FormalParameterList parameters) {
+    if (parameters?.parameters != null) {
+      parameters.parameters.forEach((FormalParameter param) {
+        if (param is FieldFormalParameter) {
+          // This error is reported in the BodyBuilder.endFormalParameter.
+          handleRecoverableError(messageFieldInitializerOutsideConstructor,
+              param.thisKeyword, param.thisKeyword);
+        }
+      });
+    }
+  }
+
+  @override
+  void debugEvent(String name) {
+    // printEvent('AstBuilder: $name');
+  }
+
+  @override
+  void discardTypeReplacedWithCommentTypeAssign() {
+    pop();
   }
 
   void doDotExpression(Token dot) {
@@ -594,568 +314,32 @@
     }
   }
 
-  void handleLiteralInt(Token token) {
-    assert(identical(token.kind, INT_TOKEN) ||
-        identical(token.kind, HEXADECIMAL_TOKEN));
-    debugEvent("LiteralInt");
-
-    push(ast.integerLiteral(token, int.tryParse(token.lexeme)));
-  }
-
-  void handleExpressionFunctionBody(Token arrowToken, Token semicolon) {
-    assert(optional('=>', arrowToken) || optional('=', arrowToken));
-    assert(optionalOrNull(';', semicolon));
-    debugEvent("ExpressionFunctionBody");
-
-    Expression expression = pop();
-    pop(); // star (*)
-    Token asyncKeyword = pop();
-    if (parseFunctionBodies) {
-      push(ast.expressionFunctionBody(
-          asyncKeyword, arrowToken, expression, semicolon));
-    } else {
-      push(ast.emptyFunctionBody(semicolon));
-    }
-  }
-
-  void endReturnStatement(
-      bool hasExpression, Token returnKeyword, Token semicolon) {
-    assert(optional('return', returnKeyword));
-    assert(optional(';', semicolon));
-    debugEvent("ReturnStatement");
-
-    Expression expression = hasExpression ? pop() : null;
-    push(ast.returnStatement(returnKeyword, expression, semicolon));
-  }
-
-  void endIfStatement(Token ifToken, Token elseToken) {
-    assert(optional('if', ifToken));
-    assert(optionalOrNull('else', elseToken));
-
-    Statement elsePart = popIfNotNull(elseToken);
-    Statement thenPart = pop();
-    ParenthesizedExpression condition = pop();
-    push(ast.ifStatement(
-        ifToken,
-        condition.leftParenthesis,
-        condition.expression,
-        condition.rightParenthesis,
-        thenPart,
-        elseToken,
-        elsePart));
-  }
-
-  void handleNoInitializers() {
-    debugEvent("NoInitializers");
-
-    if (!isFullAst) return;
-    push(NullValue.ConstructorInitializerSeparator);
-    push(NullValue.ConstructorInitializers);
-  }
-
-  void endInitializers(int count, Token colon, Token endToken) {
-    assert(optional(':', colon));
-    debugEvent("Initializers");
-
-    List<Object> initializerObjects = popTypedList(count) ?? const [];
-    if (!isFullAst) return;
-
-    push(colon);
-
-    var initializers = <ConstructorInitializer>[];
-    for (Object initializerObject in initializerObjects) {
-      if (initializerObject is FunctionExpressionInvocation) {
-        Expression function = initializerObject.function;
-        if (function is SuperExpression) {
-          initializers.add(ast.superConstructorInvocation(function.superKeyword,
-              null, null, initializerObject.argumentList));
-        } else {
-          initializers.add(ast.redirectingConstructorInvocation(
-              (function as ThisExpression).thisKeyword,
-              null,
-              null,
-              initializerObject.argumentList));
-        }
-      } else if (initializerObject is MethodInvocation) {
-        Expression target = initializerObject.target;
-        if (target is SuperExpression) {
-          initializers.add(ast.superConstructorInvocation(
-              target.superKeyword,
-              initializerObject.operator,
-              initializerObject.methodName,
-              initializerObject.argumentList));
-        } else if (target is ThisExpression) {
-          initializers.add(ast.redirectingConstructorInvocation(
-              target.thisKeyword,
-              initializerObject.operator,
-              initializerObject.methodName,
-              initializerObject.argumentList));
-        } else {
-          // Invalid initializer
-          // TODO(danrubel): Capture this in the AST.
-        }
-      } else if (initializerObject is AssignmentExpression) {
-        Token thisKeyword;
-        Token period;
-        SimpleIdentifier fieldName;
-        Expression left = initializerObject.leftHandSide;
-        if (left is PropertyAccess) {
-          Expression target = left.target;
-          if (target is ThisExpression) {
-            thisKeyword = target.thisKeyword;
-            period = left.operator;
-          } else {
-            assert(target is SuperExpression);
-            // Recovery:
-            // Parser has reported FieldInitializedOutsideDeclaringClass.
-          }
-          fieldName = left.propertyName;
-        } else if (left is SimpleIdentifier) {
-          fieldName = left;
-        } else {
-          // Recovery:
-          // Parser has reported invalid assignment.
-          SuperExpression superExpression = left;
-          fieldName = ast.simpleIdentifier(superExpression.superKeyword);
-        }
-        initializers.add(ast.constructorFieldInitializer(
-            thisKeyword,
-            period,
-            fieldName,
-            initializerObject.operator,
-            initializerObject.rightHandSide));
-      } else if (initializerObject is AssertInitializer) {
-        initializers.add(initializerObject);
+  void doInvocation(
+      TypeArgumentList typeArguments, MethodInvocation arguments) {
+    Expression receiver = pop();
+    if (receiver is SimpleIdentifier) {
+      arguments.methodName = receiver;
+      if (typeArguments != null) {
+        arguments.typeArguments = typeArguments;
       }
-    }
-
-    push(initializers);
-  }
-
-  void endVariableInitializer(Token assignmentOperator) {
-    assert(optionalOrNull('=', assignmentOperator));
-    debugEvent("VariableInitializer");
-
-    Expression initializer = pop();
-    SimpleIdentifier identifier = pop();
-    // TODO(ahe): Don't push initializers, instead install them.
-    push(_makeVariableDeclaration(identifier, assignmentOperator, initializer));
-  }
-
-  VariableDeclaration _makeVariableDeclaration(
-      SimpleIdentifier name, Token equals, Expression initializer) {
-    var variableDeclaration =
-        ast.variableDeclaration(name, equals, initializer);
-    localDeclarations[name.offset] = variableDeclaration;
-    return variableDeclaration;
-  }
-
-  @override
-  void endWhileStatement(Token whileKeyword, Token endToken) {
-    assert(optional('while', whileKeyword));
-    debugEvent("WhileStatement");
-
-    Statement body = pop();
-    ParenthesizedExpression condition = pop();
-    push(ast.whileStatement(whileKeyword, condition.leftParenthesis,
-        condition.expression, condition.rightParenthesis, body));
-  }
-
-  @override
-  void endYieldStatement(Token yieldToken, Token starToken, Token semicolon) {
-    assert(optional('yield', yieldToken));
-    assert(optionalOrNull('*', starToken));
-    assert(optional(';', semicolon));
-    debugEvent("YieldStatement");
-
-    Expression expression = pop();
-    push(ast.yieldStatement(yieldToken, starToken, expression, semicolon));
-  }
-
-  @override
-  void handleNoVariableInitializer(Token token) {
-    debugEvent("NoVariableInitializer");
-  }
-
-  void endInitializedIdentifier(Token nameToken) {
-    debugEvent("InitializedIdentifier");
-
-    AstNode node = pop();
-    VariableDeclaration variable;
-    // TODO(paulberry): This seems kludgy.  It would be preferable if we
-    // could respond to a "handleNoVariableInitializer" event by converting a
-    // SimpleIdentifier into a VariableDeclaration, and then when this code was
-    // reached, node would always be a VariableDeclaration.
-    if (node is VariableDeclaration) {
-      variable = node;
-    } else if (node is SimpleIdentifier) {
-      variable = _makeVariableDeclaration(node, null, null);
+      push(arguments);
     } else {
-      unhandled("${node.runtimeType}", "identifier", nameToken.charOffset, uri);
-    }
-    push(variable);
-  }
-
-  @override
-  void beginVariablesDeclaration(Token token, Token varFinalOrConst) {
-    debugEvent("beginVariablesDeclaration");
-    if (varFinalOrConst != null) {
-      push(new _Modifiers()..finalConstOrVarKeyword = varFinalOrConst);
-    } else {
-      push(NullValue.Modifiers);
+      push(ast.functionExpressionInvocation(
+          receiver, typeArguments, arguments.argumentList));
     }
   }
 
-  @override
-  void endVariablesDeclaration(int count, Token semicolon) {
-    assert(optionalOrNull(';', semicolon));
-    debugEvent("VariablesDeclaration");
+  void doPropertyGet() {}
 
-    List<VariableDeclaration> variables = popTypedList(count);
-    _Modifiers modifiers = pop(NullValue.Modifiers);
-    TypeAnnotation type = pop();
-    Token keyword = modifiers?.finalConstOrVarKeyword;
-    List<Annotation> metadata = pop();
-    Comment comment = _findComment(metadata,
-        variables[0].beginToken ?? type?.beginToken ?? modifiers.beginToken);
-    push(ast.variableDeclarationStatement(
-        ast.variableDeclarationList(
-            comment, metadata, keyword, type, variables),
-        semicolon));
-  }
+  void endArguments(int count, Token leftParenthesis, Token rightParenthesis) {
+    assert(optional('(', leftParenthesis));
+    assert(optional(')', rightParenthesis));
+    debugEvent("Arguments");
 
-  void handleAssignmentExpression(Token token) {
-    assert(token.type.isAssignmentOperator);
-    debugEvent("AssignmentExpression");
-
-    Expression rhs = pop();
-    Expression lhs = pop();
-    if (!lhs.isAssignable) {
-      // TODO(danrubel): Update the BodyBuilder to report this error.
-      handleRecoverableError(
-          messageMissingAssignableSelector, lhs.beginToken, lhs.endToken);
-    }
-    push(ast.assignmentExpression(lhs, token, rhs));
-  }
-
-  void endBlock(int count, Token leftBracket, Token rightBracket) {
-    assert(optional('{', leftBracket));
-    assert(optional('}', rightBracket));
-    debugEvent("Block");
-
-    List<Statement> statements = popTypedList(count) ?? <Statement>[];
-    push(ast.block(leftBracket, statements, rightBracket));
-  }
-
-  void handleInvalidTopLevelBlock(Token token) {
-    // TODO(danrubel): Consider improved recovery by adding this block
-    // as part of a synthetic top level function.
-    pop(); // block
-  }
-
-  @override
-  void handleForInitializerEmptyStatement(Token token) {
-    debugEvent("ForInitializerEmptyStatement");
-    push(NullValue.Expression);
-  }
-
-  @override
-  void handleForInitializerExpressionStatement(Token token) {
-    debugEvent("ForInitializerExpressionStatement");
-  }
-
-  @override
-  void handleForInitializerLocalVariableDeclaration(Token token) {
-    debugEvent("ForInitializerLocalVariableDeclaration");
-  }
-
-  @override
-  void handleForLoopParts(Token forKeyword, Token leftParen,
-      Token leftSeparator, int updateExpressionCount) {
-    assert(optional('for', forKeyword));
-    assert(optional('(', leftParen));
-    assert(optional(';', leftSeparator));
-    assert(updateExpressionCount >= 0);
-
-    List<Expression> updates = popTypedList(updateExpressionCount);
-    Statement conditionStatement = pop();
-    Object initializerPart = pop();
-
-    Expression condition;
-    Token rightSeparator;
-    if (conditionStatement is ExpressionStatement) {
-      condition = conditionStatement.expression;
-      rightSeparator = conditionStatement.semicolon;
-    } else {
-      rightSeparator = (conditionStatement as EmptyStatement).semicolon;
-    }
-
-    ForParts forLoopParts;
-    if (initializerPart is VariableDeclarationStatement) {
-      forLoopParts = ast.forPartsWithDeclarations(
-        variables: initializerPart.variables,
-        leftSeparator: leftSeparator,
-        condition: condition,
-        rightSeparator: rightSeparator,
-        updaters: updates,
-      );
-    } else {
-      forLoopParts = ast.forPartsWithExpression(
-        initialization: initializerPart as Expression,
-        leftSeparator: leftSeparator,
-        condition: condition,
-        rightSeparator: rightSeparator,
-        updaters: updates,
-      );
-    }
-
-    push(forKeyword);
-    push(leftParen);
-    push(forLoopParts);
-  }
-
-  @override
-  void endForControlFlow(Token token) {
-    debugEvent("endForControlFlow");
-    var entry = pop();
-    ForParts forLoopParts = pop();
-    Token leftParen = pop();
-    Token forToken = pop();
-
-    pushForControlFlowInfo(null, forToken, leftParen, forLoopParts, entry);
-  }
-
-  void pushForControlFlowInfo(Token awaitToken, Token forToken,
-      Token leftParenthesis, ForLoopParts forLoopParts, Object entry) {
-    if (enableControlFlowCollections) {
-      push(ast.forElement(
-        awaitKeyword: awaitToken,
-        forKeyword: forToken,
-        leftParenthesis: leftParenthesis,
-        forLoopParts: forLoopParts,
-        rightParenthesis: leftParenthesis.endGroup,
-        body: entry as CollectionElement,
-      ));
-    } else {
-      handleRecoverableError(
-          templateUnexpectedToken.withArguments(forToken), forToken, forToken);
-      push(entry);
-    }
-  }
-
-  @override
-  void endForStatement(Token endToken) {
-    debugEvent("ForStatement");
-    Statement body = pop();
-    ForParts forLoopParts = pop();
-    Token leftParen = pop();
-    Token forToken = pop();
-
-    if (enableControlFlowCollections || enableSpreadCollections) {
-      push(ast.forStatement2(
-        forKeyword: forToken,
-        leftParenthesis: leftParen,
-        forLoopParts: forLoopParts,
-        rightParenthesis: leftParen.endGroup,
-        body: body,
-      ));
-    } else {
-      VariableDeclarationList variableList;
-      Expression initializer;
-      if (forLoopParts is ForPartsWithDeclarations) {
-        variableList = forLoopParts.variables;
-      } else {
-        initializer = (forLoopParts as ForPartsWithExpression).initialization;
-      }
-      push(ast.forStatement(
-          forToken,
-          leftParen,
-          variableList,
-          initializer,
-          forLoopParts.leftSeparator,
-          forLoopParts.condition,
-          forLoopParts.rightSeparator,
-          forLoopParts.updaters,
-          leftParen?.endGroup,
-          body));
-    }
-  }
-
-  void handleLiteralList(
-      int count, Token leftBracket, Token constKeyword, Token rightBracket) {
-    assert(optional('[', leftBracket));
-    assert(optionalOrNull('const', constKeyword));
-    assert(optional(']', rightBracket));
-    debugEvent("LiteralList");
-
-    if (enableControlFlowCollections || enableSpreadCollections) {
-      List<CollectionElement> elements = popCollectionElements(count);
-
-      TypeArgumentList typeArguments = pop();
-      push(ast.listLiteral2(
-        constKeyword: constKeyword,
-        typeArguments: typeArguments,
-        leftBracket: leftBracket,
-        elements: elements,
-        rightBracket: rightBracket,
-      ));
-    } else {
-      List<Expression> expressions = popTypedList(count);
-      TypeArgumentList typeArguments = pop();
-      push(ast.listLiteral(
-          constKeyword, typeArguments, leftBracket, expressions, rightBracket));
-    }
-  }
-
-  void handleAsyncModifier(Token asyncToken, Token starToken) {
-    assert(asyncToken == null ||
-        optional('async', asyncToken) ||
-        optional('sync', asyncToken));
-    assert(optionalOrNull('*', starToken));
-    debugEvent("AsyncModifier");
-
-    push(asyncToken ?? NullValue.FunctionBodyAsyncToken);
-    push(starToken ?? NullValue.FunctionBodyStarToken);
-  }
-
-  void endAwaitExpression(Token awaitKeyword, Token endToken) {
-    assert(optional('await', awaitKeyword));
-    debugEvent("AwaitExpression");
-
-    push(ast.awaitExpression(awaitKeyword, pop()));
-  }
-
-  void handleLiteralBool(Token token) {
-    bool value = identical(token.stringValue, "true");
-    assert(value || identical(token.stringValue, "false"));
-    debugEvent("LiteralBool");
-
-    push(ast.booleanLiteral(token, value));
-  }
-
-  void handleLiteralDouble(Token token) {
-    assert(token.type == TokenType.DOUBLE);
-    debugEvent("LiteralDouble");
-
-    push(ast.doubleLiteral(token, double.parse(token.lexeme)));
-  }
-
-  void handleLiteralNull(Token token) {
-    assert(optional('null', token));
-    debugEvent("LiteralNull");
-
-    push(ast.nullLiteral(token));
-  }
-
-  @override
-  void handleLiteralSetOrMap(
-      int count, Token leftBrace, Token constKeyword, Token rightBrace) {
-    // TODO(danrubel): From a type resolution standpoint, this could be either
-    // a set literal or a map literal depending upon the context
-    // in which this expression occurs.
-    handleLiteralMap(count, leftBrace, constKeyword, rightBrace);
-  }
-
-  void handleLiteralSet(
-      int count, Token leftBracket, Token constKeyword, Token rightBracket) {
-    assert(optional('{', leftBracket));
-    assert(optionalOrNull('const', constKeyword));
-    assert(optional('}', rightBracket));
-    debugEvent("LiteralSet");
-
-    if (enableControlFlowCollections || enableSpreadCollections) {
-      List<CollectionElement> elements = popCollectionElements(count);
-
-      TypeArgumentList typeArguments = pop();
-      push(ast.setLiteral2(
-        constKeyword: constKeyword,
-        typeArguments: typeArguments,
-        leftBracket: leftBracket,
-        elements: elements,
-        rightBracket: rightBracket,
-      ));
-    } else {
-      List<Expression> entries = popTypedList(count) ?? <Expression>[];
-      TypeArgumentList typeArguments = pop();
-      push(ast.setLiteral(
-          constKeyword, typeArguments, leftBracket, entries, rightBracket));
-    }
-  }
-
-  void handleLiteralMap(
-      int count, Token leftBracket, Token constKeyword, Token rightBracket) {
-    assert(optional('{', leftBracket));
-    assert(optionalOrNull('const', constKeyword));
-    assert(optional('}', rightBracket));
-    debugEvent("LiteralMap");
-
-    if (enableControlFlowCollections || enableSpreadCollections) {
-      List<CollectionElement> entries = popCollectionElements(count);
-      TypeArgumentList typeArguments = pop();
-      push(ast.mapLiteral2(
-        constKeyword: constKeyword,
-        typeArguments: typeArguments,
-        leftBracket: leftBracket,
-        entries: entries,
-        rightBracket: rightBracket,
-      ));
-    } else {
-      List<MapLiteralEntry> entries = <MapLiteralEntry>[];
-      popTypedList(count)?.forEach((entry) {
-        if (entry is MapLiteralEntry) {
-          entries.add(entry);
-        }
-      });
-
-      TypeArgumentList typeArguments = pop();
-      push(ast.mapLiteral(
-          constKeyword, typeArguments, leftBracket, entries, rightBracket));
-    }
-  }
-
-  void handleLiteralMapEntry(Token colon, Token endToken) {
-    assert(optional(':', colon));
-    debugEvent("LiteralMapEntry");
-
-    Expression value = pop();
-    Expression key = pop();
-    push(ast.mapLiteralEntry(key, colon, value));
-  }
-
-  void endLiteralSymbol(Token hashToken, int tokenCount) {
-    assert(optional('#', hashToken));
-    debugEvent("LiteralSymbol");
-
-    List<Token> components = popTypedList(tokenCount);
-    push(ast.symbolLiteral(hashToken, components));
-  }
-
-  @override
-  void handleSuperExpression(Token superKeyword, IdentifierContext context) {
-    assert(optional('super', superKeyword));
-    debugEvent("SuperExpression");
-
-    push(ast.superExpression(superKeyword));
-  }
-
-  @override
-  void handleThisExpression(Token thisKeyword, IdentifierContext context) {
-    assert(optional('this', thisKeyword));
-    debugEvent("ThisExpression");
-
-    push(ast.thisExpression(thisKeyword));
-  }
-
-  @override
-  void handleType(Token beginToken, Token questionMark) {
-    debugEvent("Type");
-    if (!enableNonNullable) {
-      reportErrorIfNullableType(questionMark);
-    }
-
-    TypeArgumentList arguments = pop();
-    Identifier name = pop();
-    push(ast.typeName(name, arguments, question: questionMark));
+    List<Expression> expressions = popTypedList(count);
+    ArgumentList arguments =
+        ast.argumentList(leftParenthesis, expressions, rightParenthesis);
+    push(ast.methodInvocation(null, null, null, null, arguments));
   }
 
   @override
@@ -1194,45 +378,115 @@
     }
   }
 
-  void handleAsOperator(Token asOperator) {
-    assert(optional('as', asOperator));
-    debugEvent("AsOperator");
+  void endAwaitExpression(Token awaitKeyword, Token endToken) {
+    assert(optional('await', awaitKeyword));
+    debugEvent("AwaitExpression");
 
-    TypeAnnotation type = pop();
-    Expression expression = pop();
-    push(ast.asExpression(expression, asOperator, type));
+    push(ast.awaitExpression(awaitKeyword, pop()));
   }
 
   @override
-  void handleBreakStatement(
-      bool hasTarget, Token breakKeyword, Token semicolon) {
-    assert(optional('break', breakKeyword));
-    assert(optional(';', semicolon));
-    debugEvent("BreakStatement");
+  void endBinaryExpression(Token operatorToken) {
+    assert(operatorToken.isOperator ||
+        optional('.', operatorToken) ||
+        optional('?.', operatorToken) ||
+        optional('..', operatorToken));
+    debugEvent("BinaryExpression");
 
-    SimpleIdentifier label = hasTarget ? pop() : null;
-    push(ast.breakStatement(breakKeyword, label, semicolon));
+    if (identical(".", operatorToken.stringValue) ||
+        identical("?.", operatorToken.stringValue) ||
+        identical("..", operatorToken.stringValue)) {
+      doDotExpression(operatorToken);
+    } else {
+      Expression right = pop();
+      Expression left = pop();
+      reportErrorIfSuper(right);
+      push(ast.binaryExpression(left, operatorToken, right));
+      if (!enableTripleShift && operatorToken.type == TokenType.GT_GT_GT) {
+        handleRecoverableError(
+            templateExperimentNotEnabled
+                .withArguments(EnableString.triple_shift),
+            operatorToken,
+            operatorToken);
+      }
+    }
+  }
+
+  void endBlock(int count, Token leftBracket, Token rightBracket) {
+    assert(optional('{', leftBracket));
+    assert(optional('}', rightBracket));
+    debugEvent("Block");
+
+    List<Statement> statements = popTypedList(count) ?? <Statement>[];
+    push(ast.block(leftBracket, statements, rightBracket));
+  }
+
+  void endBlockFunctionBody(int count, Token leftBracket, Token rightBracket) {
+    assert(optional('{', leftBracket));
+    assert(optional('}', rightBracket));
+    debugEvent("BlockFunctionBody");
+
+    List<Statement> statements = popTypedList(count);
+    Block block = ast.block(leftBracket, statements, rightBracket);
+    Token star = pop();
+    Token asyncKeyword = pop();
+    if (parseFunctionBodies) {
+      push(ast.blockFunctionBody(asyncKeyword, star, block));
+    } else {
+      // TODO(danrubel): Skip the block rather than parsing it.
+      push(ast.emptyFunctionBody(
+          new SyntheticToken(TokenType.SEMICOLON, leftBracket.charOffset)));
+    }
+  }
+
+  void endCascade() {
+    debugEvent("Cascade");
+
+    Expression expression = pop();
+    CascadeExpression receiver = pop();
+    pop(); // Token.
+    receiver.cascadeSections.add(expression);
+    push(receiver);
   }
 
   @override
-  void handleContinueStatement(
-      bool hasTarget, Token continueKeyword, Token semicolon) {
-    assert(optional('continue', continueKeyword));
-    assert(optional(';', semicolon));
-    debugEvent("ContinueStatement");
-
-    SimpleIdentifier label = hasTarget ? pop() : null;
-    push(ast.continueStatement(continueKeyword, label, semicolon));
+  void endClassDeclaration(Token beginToken, Token endToken) {
+    debugEvent("ClassDeclaration");
+    classDeclaration = null;
   }
 
-  void handleIsOperator(Token isOperator, Token not) {
-    assert(optional('is', isOperator));
-    assert(optionalOrNull('!', not));
-    debugEvent("IsOperator");
+  @override
+  void endClassOrMixinBody(
+      int memberCount, Token leftBracket, Token rightBracket) {
+    assert(optional('{', leftBracket));
+    assert(optional('}', rightBracket));
+    debugEvent("ClassOrMixinBody");
 
-    TypeAnnotation type = pop();
-    Expression expression = pop();
-    push(ast.isExpression(expression, isOperator, not, type));
+    ClassOrMixinDeclarationImpl declaration =
+        classDeclaration ?? mixinDeclaration;
+    declaration.leftBracket = leftBracket;
+    declaration.rightBracket = rightBracket;
+  }
+
+  @override
+  void endCombinators(int count) {
+    debugEvent("Combinators");
+    push(popTypedList<Combinator>(count) ?? NullValue.Combinators);
+  }
+
+  @override
+  void endCompilationUnit(int count, Token endToken) {
+    debugEvent("CompilationUnit");
+
+    Token beginToken = pop();
+    checkEmpty(endToken.charOffset);
+
+    CompilationUnitImpl unit = ast.compilationUnit(
+            beginToken, scriptTag, directives, declarations, endToken)
+        as CompilationUnitImpl;
+    unit.languageVersion = languageVersion;
+    unit.isNonNullable = enableNonNullable;
+    push(unit);
   }
 
   void endConditionalExpression(Token question, Token colon) {
@@ -1249,136 +503,258 @@
         condition, question, thenExpression, colon, elseExpression));
   }
 
-  @override
-  void endRedirectingFactoryBody(Token equalToken, Token endToken) {
-    assert(optional('=', equalToken));
-    debugEvent("RedirectingFactoryBody");
+  void endConditionalUri(Token ifKeyword, Token leftParen, Token equalSign) {
+    assert(optional('if', ifKeyword));
+    assert(optionalOrNull('(', leftParen));
+    assert(optionalOrNull('==', equalSign));
+    debugEvent("ConditionalUri");
 
-    ConstructorName constructorName = pop();
-    Token starToken = pop();
-    Token asyncToken = pop();
-    push(new _RedirectingFactoryBody(
-        asyncToken, starToken, equalToken, constructorName));
+    StringLiteral libraryUri = pop();
+    StringLiteral value = popIfNotNull(equalSign);
+    if (value is StringInterpolation) {
+      for (var child in value.childEntities) {
+        if (child is InterpolationExpression) {
+          // This error is reported in OutlineBuilder.endLiteralString
+          handleRecoverableError(
+              messageInterpolationInUri, child.beginToken, child.endToken);
+          break;
+        }
+      }
+    }
+    DottedName name = pop();
+    push(ast.configuration(ifKeyword, leftParen, name, equalSign, value,
+        leftParen?.endGroup, libraryUri));
   }
 
   @override
-  void endRethrowStatement(Token rethrowToken, Token semicolon) {
-    assert(optional('rethrow', rethrowToken));
+  void endConditionalUris(int count) {
+    debugEvent("ConditionalUris");
+
+    push(popTypedList<Configuration>(count) ?? NullValue.ConditionalUris);
+  }
+
+  @override
+  void endConstExpression(Token constKeyword) {
+    assert(optional('const', constKeyword));
+    debugEvent("ConstExpression");
+
+    _handleInstanceCreation(constKeyword);
+  }
+
+  @override
+  void endConstLiteral(Token token) {
+    debugEvent("endConstLiteral");
+  }
+
+  @override
+  void endConstructorReference(
+      Token start, Token periodBeforeName, Token endToken) {
+    assert(optionalOrNull('.', periodBeforeName));
+    debugEvent("ConstructorReference");
+
+    SimpleIdentifier constructorName = pop();
+    TypeArgumentList typeArguments = pop();
+    Identifier typeNameIdentifier = pop();
+    push(ast.constructorName(ast.typeName(typeNameIdentifier, typeArguments),
+        periodBeforeName, constructorName));
+  }
+
+  @override
+  void endDoWhileStatement(
+      Token doKeyword, Token whileKeyword, Token semicolon) {
+    assert(optional('do', doKeyword));
+    assert(optional('while', whileKeyword));
     assert(optional(';', semicolon));
-    debugEvent("RethrowStatement");
+    debugEvent("DoWhileStatement");
 
-    RethrowExpression expression = ast.rethrowExpression(rethrowToken);
-    // TODO(scheglov) According to the specification, 'rethrow' is a statement.
-    push(ast.expressionStatement(expression, semicolon));
-  }
-
-  void handleThrowExpression(Token throwToken, Token endToken) {
-    assert(optional('throw', throwToken));
-    debugEvent("ThrowExpression");
-
-    push(ast.throwExpression(throwToken, pop()));
+    ParenthesizedExpression condition = pop();
+    Statement body = pop();
+    push(ast.doStatement(
+        doKeyword,
+        body,
+        whileKeyword,
+        condition.leftParenthesis,
+        condition.expression,
+        condition.rightParenthesis,
+        semicolon));
   }
 
   @override
-  void endOptionalFormalParameters(
-      int count, Token leftDelimeter, Token rightDelimeter) {
-    assert((optional('[', leftDelimeter) && optional(']', rightDelimeter)) ||
-        (optional('{', leftDelimeter) && optional('}', rightDelimeter)));
-    debugEvent("OptionalFormalParameters");
-
-    push(new _OptionalFormalParameters(
-        popTypedList(count), leftDelimeter, rightDelimeter));
+  void endDoWhileStatementBody(Token token) {
+    debugEvent("endDoWhileStatementBody");
   }
 
   @override
-  void beginFormalParameterDefaultValueExpression() {}
-
-  @override
-  void endFormalParameterDefaultValueExpression() {
-    debugEvent("FormalParameterDefaultValueExpression");
-  }
-
-  void handleValuedFormalParameter(Token equals, Token token) {
-    assert(optional('=', equals) || optional(':', equals));
-    debugEvent("ValuedFormalParameter");
-
-    Expression value = pop();
-    push(new _ParameterDefaultValue(equals, value));
+  void endElseStatement(Token token) {
+    debugEvent("endElseStatement");
   }
 
   @override
-  void endFunctionType(Token functionToken, Token questionMark) {
-    assert(optional('Function', functionToken));
-    debugEvent("FunctionType");
-    if (!enableNonNullable) {
-      reportErrorIfNullableType(questionMark);
+  void endEnum(Token enumKeyword, Token leftBrace, int count) {
+    assert(optional('enum', enumKeyword));
+    assert(optional('{', leftBrace));
+    debugEvent("Enum");
+
+    List<EnumConstantDeclaration> constants = popTypedList(count);
+    SimpleIdentifier name = pop();
+    List<Annotation> metadata = pop();
+    Comment comment = _findComment(metadata, enumKeyword);
+    declarations.add(ast.enumDeclaration(comment, metadata, enumKeyword, name,
+        leftBrace, constants, leftBrace?.endGroup));
+  }
+
+  void endExport(Token exportKeyword, Token semicolon) {
+    assert(optional('export', exportKeyword));
+    assert(optional(';', semicolon));
+    debugEvent("Export");
+
+    List<Combinator> combinators = pop();
+    List<Configuration> configurations = pop();
+    StringLiteral uri = pop();
+    List<Annotation> metadata = pop();
+    Comment comment = _findComment(metadata, exportKeyword);
+    directives.add(ast.exportDirective(comment, metadata, exportKeyword, uri,
+        configurations, combinators, semicolon));
+  }
+
+  @override
+  void endFactoryMethod(
+      Token beginToken, Token factoryKeyword, Token endToken) {
+    assert(optional('factory', factoryKeyword));
+    assert(optional(';', endToken) || optional('}', endToken));
+    debugEvent("FactoryMethod");
+
+    FunctionBody body;
+    Token separator;
+    ConstructorName redirectedConstructor;
+    Object bodyObject = pop();
+    if (bodyObject is FunctionBody) {
+      body = bodyObject;
+    } else if (bodyObject is _RedirectingFactoryBody) {
+      separator = bodyObject.equalToken;
+      redirectedConstructor = bodyObject.constructorName;
+      body = ast.emptyFunctionBody(endToken);
+    } else {
+      unhandled("${bodyObject.runtimeType}", "bodyObject",
+          beginToken.charOffset, uri);
     }
 
     FormalParameterList parameters = pop();
-    TypeAnnotation returnType = pop();
     TypeParameterList typeParameters = pop();
-    push(ast.genericFunctionType(
-        returnType, functionToken, typeParameters, parameters,
-        question: questionMark));
-  }
+    Object constructorName = pop();
+    _Modifiers modifiers = pop();
+    List<Annotation> metadata = pop();
+    Comment comment = _findComment(metadata, beginToken);
 
-  void handleFormalParameterWithoutValue(Token token) {
-    debugEvent("FormalParameterWithoutValue");
+    assert(parameters != null);
 
-    push(NullValue.ParameterDefaultValue);
-  }
-
-  @override
-  void endForInExpression(Token token) {
-    debugEvent("ForInExpression");
-  }
-
-  @override
-  void handleForInLoopParts(Token awaitToken, Token forToken,
-      Token leftParenthesis, Token inKeyword) {
-    assert(optionalOrNull('await', awaitToken));
-    assert(optional('for', forToken));
-    assert(optional('(', leftParenthesis));
-    assert(optional('in', inKeyword) || optional(':', inKeyword));
-
-    Expression iterator = pop();
-    Object variableOrDeclaration = pop();
-
-    ForEachParts forLoopParts;
-    if (variableOrDeclaration is VariableDeclarationStatement) {
-      VariableDeclarationList variableList = variableOrDeclaration.variables;
-      forLoopParts = ast.forEachPartsWithDeclaration(
-        loopVariable: ast.declaredIdentifier(
-            variableList.documentationComment,
-            variableList.metadata,
-            variableList.keyword,
-            variableList.type,
-            variableList.variables.first.name),
-        inKeyword: inKeyword,
-        iterable: iterator,
-      );
-    } else {
-      if (variableOrDeclaration is! SimpleIdentifier) {
-        // Parser has already reported the error.
-        if (!leftParenthesis.next.isIdentifier) {
-          parser.rewriter.insertToken(
-              leftParenthesis,
-              new SyntheticStringToken(
-                  TokenType.IDENTIFIER, '', leftParenthesis.next.charOffset));
-        }
-        variableOrDeclaration = ast.simpleIdentifier(leftParenthesis.next);
-      }
-      forLoopParts = ast.forEachPartsWithIdentifier(
-        identifier: variableOrDeclaration,
-        inKeyword: inKeyword,
-        iterable: iterator,
-      );
+    if (typeParameters != null) {
+      // TODO(danrubel): Update OutlineBuilder to report this error message.
+      handleRecoverableError(messageConstructorWithTypeParameters,
+          typeParameters.beginToken, typeParameters.endToken);
     }
 
-    push(awaitToken ?? NullValue.AwaitToken);
-    push(forToken);
-    push(leftParenthesis);
-    push(forLoopParts);
+    // Decompose the preliminary ConstructorName into the type name and
+    // the actual constructor name.
+    SimpleIdentifier returnType;
+    Token period;
+    SimpleIdentifier name;
+    Identifier typeName = constructorName;
+    if (typeName is SimpleIdentifier) {
+      returnType = typeName;
+    } else if (typeName is PrefixedIdentifier) {
+      returnType = typeName.prefix;
+      period = typeName.period;
+      name =
+          ast.simpleIdentifier(typeName.identifier.token, isDeclaration: true);
+    }
+
+    (classDeclaration ?? mixinDeclaration).members.add(
+        ast.constructorDeclaration(
+            comment,
+            metadata,
+            modifiers?.externalKeyword,
+            modifiers?.finalConstOrVarKeyword,
+            factoryKeyword,
+            ast.simpleIdentifier(returnType.token),
+            period,
+            name,
+            parameters,
+            separator,
+            null,
+            redirectedConstructor,
+            body));
+  }
+
+  void endFieldInitializer(Token assignment, Token token) {
+    assert(optional('=', assignment));
+    debugEvent("FieldInitializer");
+
+    Expression initializer = pop();
+    SimpleIdentifier name = pop();
+    push(_makeVariableDeclaration(name, assignment, initializer));
+  }
+
+  @override
+  void endFields(Token staticToken, Token covariantToken, Token varFinalOrConst,
+      int count, Token beginToken, Token semicolon) {
+    assert(optional(';', semicolon));
+    debugEvent("Fields");
+
+    List<VariableDeclaration> variables = popTypedList(count);
+    TypeAnnotation type = pop();
+    _Modifiers modifiers = new _Modifiers()
+      ..staticKeyword = staticToken
+      ..covariantKeyword = covariantToken
+      ..finalConstOrVarKeyword = varFinalOrConst;
+    var variableList = ast.variableDeclarationList(
+        null, null, modifiers?.finalConstOrVarKeyword, type, variables);
+    Token covariantKeyword = modifiers?.covariantKeyword;
+    List<Annotation> metadata = pop();
+    Comment comment = _findComment(metadata, beginToken);
+    (classDeclaration ?? mixinDeclaration).members.add(ast.fieldDeclaration2(
+        comment: comment,
+        metadata: metadata,
+        covariantKeyword: covariantKeyword,
+        staticKeyword: modifiers?.staticKeyword,
+        fieldList: variableList,
+        semicolon: semicolon));
+  }
+
+  @override
+  void endForControlFlow(Token token) {
+    debugEvent("endForControlFlow");
+    var entry = pop();
+    ForParts forLoopParts = pop();
+    Token leftParen = pop();
+    Token forToken = pop();
+
+    pushForControlFlowInfo(null, forToken, leftParen, forLoopParts, entry);
+  }
+
+  @override
+  void endForIn(Token endToken) {
+    debugEvent("ForInExpression");
+
+    Statement body = pop();
+    ForEachParts forLoopParts = pop();
+    Token leftParenthesis = pop();
+    Token forToken = pop();
+    Token awaitToken = pop(NullValue.AwaitToken);
+
+    push(ast.forStatement(
+      awaitKeyword: awaitToken,
+      forKeyword: forToken,
+      leftParenthesis: leftParenthesis,
+      forLoopParts: forLoopParts,
+      rightParenthesis: leftParenthesis.endGroup,
+      body: body,
+    ));
+  }
+
+  @override
+  void endForInBody(Token token) {
+    debugEvent("endForInBody");
   }
 
   @override
@@ -1396,53 +772,8 @@
   }
 
   @override
-  void endForIn(Token endToken) {
+  void endForInExpression(Token token) {
     debugEvent("ForInExpression");
-
-    Statement body = pop();
-    ForEachParts forLoopParts = pop();
-    Token leftParenthesis = pop();
-    Token forToken = pop();
-    Token awaitToken = pop(NullValue.AwaitToken);
-
-    if (enableControlFlowCollections || enableSpreadCollections) {
-      push(ast.forStatement2(
-        awaitKeyword: awaitToken,
-        forKeyword: forToken,
-        leftParenthesis: leftParenthesis,
-        forLoopParts: forLoopParts,
-        rightParenthesis: leftParenthesis.endGroup,
-        body: body,
-      ));
-    } else if (forLoopParts is ForEachPartsWithDeclaration) {
-      push(ast.forEachStatementWithDeclaration(
-          awaitToken,
-          forToken,
-          leftParenthesis,
-          forLoopParts.loopVariable,
-          forLoopParts.inKeyword,
-          forLoopParts.iterable,
-          leftParenthesis?.endGroup,
-          body));
-    } else {
-      push(ast.forEachStatementWithReference(
-          awaitToken,
-          forToken,
-          leftParenthesis,
-          (forLoopParts as ForEachPartsWithIdentifier).identifier,
-          forLoopParts.inKeyword,
-          forLoopParts.iterable,
-          leftParenthesis?.endGroup,
-          body));
-    }
-  }
-
-  @override
-  void beginFormalParameter(Token token, MemberKind kind, Token covariantToken,
-      Token varFinalOrConst) {
-    push(new _Modifiers()
-      ..covariantKeyword = covariantToken
-      ..finalConstOrVarKeyword = varFinalOrConst);
   }
 
   @override
@@ -1529,20 +860,8 @@
   }
 
   @override
-  void endFunctionTypedFormalParameter(Token nameToken) {
-    debugEvent("FunctionTypedFormalParameter");
-
-    FormalParameterList formalParameters = pop();
-    TypeAnnotation returnType = pop();
-    TypeParameterList typeParameters = pop();
-
-    // Create a temporary formal parameter that will be dissected later in
-    // [endFormalParameter].
-    push(ast.functionTypedFormalParameter2(
-        identifier: null,
-        returnType: returnType,
-        typeParameters: typeParameters,
-        parameters: formalParameters));
+  void endFormalParameterDefaultValueExpression() {
+    debugEvent("FormalParameterDefaultValueExpression");
   }
 
   void endFormalParameters(
@@ -1569,6 +888,736 @@
   }
 
   @override
+  void endForStatement(Token endToken) {
+    debugEvent("ForStatement");
+    Statement body = pop();
+    ForParts forLoopParts = pop();
+    Token leftParen = pop();
+    Token forToken = pop();
+
+    push(ast.forStatement(
+      forKeyword: forToken,
+      leftParenthesis: leftParen,
+      forLoopParts: forLoopParts,
+      rightParenthesis: leftParen.endGroup,
+      body: body,
+    ));
+  }
+
+  @override
+  void endForStatementBody(Token token) {
+    debugEvent("endForStatementBody");
+  }
+
+  @override
+  void endFunctionExpression(Token beginToken, Token token) {
+    // TODO(paulberry): set up scopes properly to resolve parameters and type
+    // variables.  Note that this is tricky due to the handling of initializers
+    // in constructors, so the logic should be shared with BodyBuilder as much
+    // as possible.
+    debugEvent("FunctionExpression");
+
+    FunctionBody body = pop();
+    FormalParameterList parameters = pop();
+    TypeParameterList typeParameters = pop();
+    push(ast.functionExpression(typeParameters, parameters, body));
+  }
+
+  @override
+  void endFunctionName(Token beginToken, Token token) {
+    debugEvent("FunctionName");
+  }
+
+  @override
+  void endFunctionType(Token functionToken, Token questionMark) {
+    assert(optional('Function', functionToken));
+    debugEvent("FunctionType");
+    if (!enableNonNullable) {
+      reportErrorIfNullableType(questionMark);
+    }
+
+    FormalParameterList parameters = pop();
+    TypeAnnotation returnType = pop();
+    TypeParameterList typeParameters = pop();
+    push(ast.genericFunctionType(
+        returnType, functionToken, typeParameters, parameters,
+        question: questionMark));
+  }
+
+  @override
+  void endFunctionTypeAlias(
+      Token typedefKeyword, Token equals, Token semicolon) {
+    assert(optional('typedef', typedefKeyword));
+    assert(optionalOrNull('=', equals));
+    assert(optional(';', semicolon));
+    debugEvent("FunctionTypeAlias");
+
+    if (equals == null) {
+      FormalParameterList parameters = pop();
+      TypeParameterList typeParameters = pop();
+      SimpleIdentifier name = pop();
+      TypeAnnotation returnType = pop();
+      List<Annotation> metadata = pop();
+      Comment comment = _findComment(metadata, typedefKeyword);
+      declarations.add(ast.functionTypeAlias(comment, metadata, typedefKeyword,
+          returnType, name, typeParameters, parameters, semicolon));
+    } else {
+      TypeAnnotation type = pop();
+      TypeParameterList templateParameters = pop();
+      SimpleIdentifier name = pop();
+      List<Annotation> metadata = pop();
+      Comment comment = _findComment(metadata, typedefKeyword);
+      if (type is! GenericFunctionType) {
+        // This error is also reported in the OutlineBuilder.
+        handleRecoverableError(messageTypedefNotFunction, equals, equals);
+        type = null;
+      }
+      declarations.add(ast.genericTypeAlias(
+          comment,
+          metadata,
+          typedefKeyword,
+          name,
+          templateParameters,
+          equals,
+          type as GenericFunctionType,
+          semicolon));
+    }
+  }
+
+  @override
+  void endFunctionTypedFormalParameter(Token nameToken) {
+    debugEvent("FunctionTypedFormalParameter");
+
+    FormalParameterList formalParameters = pop();
+    TypeAnnotation returnType = pop();
+    TypeParameterList typeParameters = pop();
+
+    // Create a temporary formal parameter that will be dissected later in
+    // [endFormalParameter].
+    push(ast.functionTypedFormalParameter2(
+        identifier: null,
+        returnType: returnType,
+        typeParameters: typeParameters,
+        parameters: formalParameters));
+  }
+
+  @override
+  void endHide(Token hideKeyword) {
+    assert(optional('hide', hideKeyword));
+    debugEvent("Hide");
+
+    List<SimpleIdentifier> hiddenNames = pop();
+    push(ast.hideCombinator(hideKeyword, hiddenNames));
+  }
+
+  @override
+  void endIfControlFlow(Token token) {
+    CollectionElement thenElement = pop();
+    ParenthesizedExpression condition = pop();
+    Token ifToken = pop();
+    pushIfControlFlowInfo(ifToken, condition, thenElement, null, null);
+  }
+
+  @override
+  void endIfElseControlFlow(Token token) {
+    CollectionElement elseElement = pop();
+    Token elseToken = pop();
+    CollectionElement thenElement = pop();
+    ParenthesizedExpression condition = pop();
+    Token ifToken = pop();
+    pushIfControlFlowInfo(
+        ifToken, condition, thenElement, elseToken, elseElement);
+  }
+
+  void endIfStatement(Token ifToken, Token elseToken) {
+    assert(optional('if', ifToken));
+    assert(optionalOrNull('else', elseToken));
+
+    Statement elsePart = popIfNotNull(elseToken);
+    Statement thenPart = pop();
+    ParenthesizedExpression condition = pop();
+    push(ast.ifStatement(
+        ifToken,
+        condition.leftParenthesis,
+        condition.expression,
+        condition.rightParenthesis,
+        thenPart,
+        elseToken,
+        elsePart));
+  }
+
+  @override
+  void endImplicitCreationExpression(Token token) {
+    debugEvent("ImplicitCreationExpression");
+
+    _handleInstanceCreation(null);
+  }
+
+  @override
+  void endImport(Token importKeyword, Token semicolon) {
+    assert(optional('import', importKeyword));
+    assert(optionalOrNull(';', semicolon));
+    debugEvent("Import");
+
+    List<Combinator> combinators = pop();
+    Token deferredKeyword = pop(NullValue.Deferred);
+    Token asKeyword = pop(NullValue.As);
+    SimpleIdentifier prefix = pop(NullValue.Prefix);
+    List<Configuration> configurations = pop();
+    StringLiteral uri = pop();
+    List<Annotation> metadata = pop();
+    Comment comment = _findComment(metadata, importKeyword);
+
+    directives.add(ast.importDirective(
+        comment,
+        metadata,
+        importKeyword,
+        uri,
+        configurations,
+        deferredKeyword,
+        asKeyword,
+        prefix,
+        combinators,
+        semicolon));
+  }
+
+  void endInitializedIdentifier(Token nameToken) {
+    debugEvent("InitializedIdentifier");
+
+    AstNode node = pop();
+    VariableDeclaration variable;
+    // TODO(paulberry): This seems kludgy.  It would be preferable if we
+    // could respond to a "handleNoVariableInitializer" event by converting a
+    // SimpleIdentifier into a VariableDeclaration, and then when this code was
+    // reached, node would always be a VariableDeclaration.
+    if (node is VariableDeclaration) {
+      variable = node;
+    } else if (node is SimpleIdentifier) {
+      variable = _makeVariableDeclaration(node, null, null);
+    } else {
+      unhandled("${node.runtimeType}", "identifier", nameToken.charOffset, uri);
+    }
+    push(variable);
+  }
+
+  void endInitializers(int count, Token colon, Token endToken) {
+    assert(optional(':', colon));
+    debugEvent("Initializers");
+
+    List<Object> initializerObjects = popTypedList(count) ?? const [];
+    if (!isFullAst) return;
+
+    push(colon);
+
+    var initializers = <ConstructorInitializer>[];
+    for (Object initializerObject in initializerObjects) {
+      if (initializerObject is FunctionExpressionInvocation) {
+        Expression function = initializerObject.function;
+        if (function is SuperExpression) {
+          initializers.add(ast.superConstructorInvocation(function.superKeyword,
+              null, null, initializerObject.argumentList));
+        } else {
+          initializers.add(ast.redirectingConstructorInvocation(
+              (function as ThisExpression).thisKeyword,
+              null,
+              null,
+              initializerObject.argumentList));
+        }
+      } else if (initializerObject is MethodInvocation) {
+        Expression target = initializerObject.target;
+        if (target is SuperExpression) {
+          initializers.add(ast.superConstructorInvocation(
+              target.superKeyword,
+              initializerObject.operator,
+              initializerObject.methodName,
+              initializerObject.argumentList));
+        } else if (target is ThisExpression) {
+          initializers.add(ast.redirectingConstructorInvocation(
+              target.thisKeyword,
+              initializerObject.operator,
+              initializerObject.methodName,
+              initializerObject.argumentList));
+        } else {
+          // Recovery: Invalid initializer
+          if (target is FunctionExpressionInvocation) {
+            var targetFunct = target.function;
+            if (targetFunct is SuperExpression) {
+              initializers.add(ast.superConstructorInvocation(
+                  targetFunct.superKeyword, null, null, target.argumentList));
+              // TODO(danrubel): Consider generating this error in the parser
+              // This error is also reported in the body builder
+              handleRecoverableError(messageInvalidSuperInInitializer,
+                  targetFunct.superKeyword, targetFunct.superKeyword);
+            } else if (targetFunct is ThisExpression) {
+              initializers.add(ast.redirectingConstructorInvocation(
+                  targetFunct.thisKeyword, null, null, target.argumentList));
+              // TODO(danrubel): Consider generating this error in the parser
+              // This error is also reported in the body builder
+              handleRecoverableError(messageInvalidThisInInitializer,
+                  targetFunct.thisKeyword, targetFunct.thisKeyword);
+            } else {
+              throw new UnsupportedError(
+                  'unsupported initializer $initializerObject');
+            }
+          } else {
+            throw new UnsupportedError(
+                'unsupported initializer $initializerObject');
+          }
+        }
+      } else if (initializerObject is AssignmentExpression) {
+        Token thisKeyword;
+        Token period;
+        SimpleIdentifier fieldName;
+        Expression left = initializerObject.leftHandSide;
+        if (left is PropertyAccess) {
+          Expression target = left.target;
+          if (target is ThisExpression) {
+            thisKeyword = target.thisKeyword;
+            period = left.operator;
+          } else {
+            assert(target is SuperExpression);
+            // Recovery:
+            // Parser has reported FieldInitializedOutsideDeclaringClass.
+          }
+          fieldName = left.propertyName;
+        } else if (left is SimpleIdentifier) {
+          fieldName = left;
+        } else {
+          // Recovery:
+          // Parser has reported invalid assignment.
+          SuperExpression superExpression = left;
+          fieldName = ast.simpleIdentifier(superExpression.superKeyword);
+        }
+        initializers.add(ast.constructorFieldInitializer(
+            thisKeyword,
+            period,
+            fieldName,
+            initializerObject.operator,
+            initializerObject.rightHandSide));
+      } else if (initializerObject is AssertInitializer) {
+        initializers.add(initializerObject);
+      } else if (initializerObject is PropertyAccess) {
+        // Recovery: Invalid initializer
+        Expression target = initializerObject.target;
+        if (target is FunctionExpressionInvocation) {
+          var targetFunct = target.function;
+          if (targetFunct is SuperExpression) {
+            initializers.add(ast.superConstructorInvocation(
+                targetFunct.superKeyword, null, null, target.argumentList));
+            // TODO(danrubel): Consider generating this error in the parser
+            // This error is also reported in the body builder
+            handleRecoverableError(messageInvalidSuperInInitializer,
+                targetFunct.superKeyword, targetFunct.superKeyword);
+          } else if (targetFunct is ThisExpression) {
+            initializers.add(ast.redirectingConstructorInvocation(
+                targetFunct.thisKeyword, null, null, target.argumentList));
+            // TODO(danrubel): Consider generating this error in the parser
+            // This error is also reported in the body builder
+            handleRecoverableError(messageInvalidThisInInitializer,
+                targetFunct.thisKeyword, targetFunct.thisKeyword);
+          } else {
+            throw new UnsupportedError(
+                'unsupported initializer $initializerObject');
+          }
+        } else {
+          throw new UnsupportedError(
+              'unsupported initializer $initializerObject');
+        }
+      } else {
+        throw new UnsupportedError('unsupported initializer:'
+            ' ${initializerObject.runtimeType} :: $initializerObject');
+      }
+    }
+
+    push(initializers);
+  }
+
+  @override
+  void endLabeledStatement(int labelCount) {
+    debugEvent("LabeledStatement");
+
+    Statement statement = pop();
+    List<Label> labels = popTypedList(labelCount);
+    push(ast.labeledStatement(labels, statement));
+  }
+
+  @override
+  void endLibraryName(Token libraryKeyword, Token semicolon) {
+    assert(optional('library', libraryKeyword));
+    assert(optional(';', semicolon));
+    debugEvent("LibraryName");
+
+    List<SimpleIdentifier> libraryName = pop();
+    var name = ast.libraryIdentifier(libraryName);
+    List<Annotation> metadata = pop();
+    Comment comment = _findComment(metadata, libraryKeyword);
+    directives.add(ast.libraryDirective(
+        comment, metadata, libraryKeyword, name, semicolon));
+  }
+
+  @override
+  void endLiteralString(int interpolationCount, Token endToken) {
+    debugEvent("endLiteralString");
+
+    if (interpolationCount == 0) {
+      Token token = pop();
+      String value = unescapeString(token.lexeme, token, this);
+      push(ast.simpleStringLiteral(token, value));
+    } else {
+      List<Object> parts = popTypedList(1 + interpolationCount * 2);
+      Token first = parts.first;
+      Token last = parts.last;
+      Quote quote = analyzeQuote(first.lexeme);
+      List<InterpolationElement> elements = <InterpolationElement>[];
+      elements.add(ast.interpolationString(
+          first, unescapeFirstStringPart(first.lexeme, quote, first, this)));
+      for (int i = 1; i < parts.length - 1; i++) {
+        var part = parts[i];
+        if (part is Token) {
+          elements.add(ast.interpolationString(
+              part, unescape(part.lexeme, quote, part, this)));
+        } else if (part is InterpolationExpression) {
+          elements.add(part);
+        } else {
+          unhandled("${part.runtimeType}", "string interpolation",
+              first.charOffset, uri);
+        }
+      }
+      elements.add(ast.interpolationString(
+          last,
+          unescapeLastStringPart(
+              last.lexeme, quote, last, last.isSynthetic, this)));
+      push(ast.stringInterpolation(elements));
+    }
+  }
+
+  void endLiteralSymbol(Token hashToken, int tokenCount) {
+    assert(optional('#', hashToken));
+    debugEvent("LiteralSymbol");
+
+    List<Token> components = popTypedList(tokenCount);
+    push(ast.symbolLiteral(hashToken, components));
+  }
+
+  @override
+  void endLocalFunctionDeclaration(Token token) {
+    debugEvent("LocalFunctionDeclaration");
+    FunctionBody body = pop();
+    if (isFullAst) {
+      pop(); // constructor initializers
+      pop(); // separator before constructor initializers
+    }
+    FormalParameterList parameters = pop();
+    checkFieldFormalParameters(parameters);
+    SimpleIdentifier name = pop();
+    TypeAnnotation returnType = pop();
+    TypeParameterList typeParameters = pop();
+    List<Annotation> metadata = pop(NullValue.Metadata);
+    FunctionExpression functionExpression =
+        ast.functionExpression(typeParameters, parameters, body);
+    var functionDeclaration = ast.functionDeclaration(
+        null, metadata, null, returnType, null, name, functionExpression);
+    localDeclarations[name.offset] = functionDeclaration;
+    push(ast.functionDeclarationStatement(functionDeclaration));
+  }
+
+  @override
+  void endMember() {
+    debugEvent("Member");
+  }
+
+  @override
+  void endMetadata(Token atSign, Token periodBeforeName, Token endToken) {
+    assert(optional('@', atSign));
+    assert(optionalOrNull('.', periodBeforeName));
+    debugEvent("Metadata");
+
+    MethodInvocation invocation = pop();
+    SimpleIdentifier constructorName = periodBeforeName != null ? pop() : null;
+    pop(); // Type arguments, not allowed.
+    Identifier name = pop();
+    push(ast.annotation(atSign, name, periodBeforeName, constructorName,
+        invocation?.argumentList));
+  }
+
+  @override
+  void endMetadataStar(int count) {
+    debugEvent("MetadataStar");
+
+    push(popTypedList<Annotation>(count) ?? NullValue.Metadata);
+  }
+
+  @override
+  void endMethod(
+      Token getOrSet, Token beginToken, Token beginParam, Token endToken) {
+    assert(getOrSet == null ||
+        optional('get', getOrSet) ||
+        optional('set', getOrSet));
+    debugEvent("Method");
+
+    var bodyObject = pop();
+    List<ConstructorInitializer> initializers = pop() ?? const [];
+    Token separator = pop();
+    FormalParameterList parameters = pop();
+    TypeParameterList typeParameters = pop();
+    var name = pop();
+    TypeAnnotation returnType = pop();
+    _Modifiers modifiers = pop();
+    List<Annotation> metadata = pop();
+    Comment comment = _findComment(metadata, beginToken);
+
+    assert(parameters != null || optional('get', getOrSet));
+
+    ConstructorName redirectedConstructor;
+    FunctionBody body;
+    if (bodyObject is FunctionBody) {
+      body = bodyObject;
+    } else if (bodyObject is _RedirectingFactoryBody) {
+      separator = bodyObject.equalToken;
+      redirectedConstructor = bodyObject.constructorName;
+      body = ast.emptyFunctionBody(endToken);
+    } else {
+      unhandled("${bodyObject.runtimeType}", "bodyObject",
+          beginToken.charOffset, uri);
+    }
+
+    ClassOrMixinDeclarationImpl declaration =
+        classDeclaration ?? mixinDeclaration;
+
+    void constructor(
+        SimpleIdentifier prefixOrName, Token period, SimpleIdentifier name) {
+      if (typeParameters != null) {
+        // Outline builder also reports this error message.
+        handleRecoverableError(messageConstructorWithTypeParameters,
+            typeParameters.beginToken, typeParameters.endToken);
+      }
+      if (modifiers?.constKeyword != null &&
+          body != null &&
+          (body.length > 1 || body.beginToken?.lexeme != ';')) {
+        // This error is also reported in BodyBuilder.finishFunction
+        Token bodyToken = body.beginToken ?? modifiers.constKeyword;
+        handleRecoverableError(
+            messageConstConstructorWithBody, bodyToken, bodyToken);
+      }
+      if (returnType != null) {
+        // This error is also reported in OutlineBuilder.endMethod
+        handleRecoverableError(messageConstructorWithReturnType,
+            returnType.beginToken, returnType.beginToken);
+      }
+      ConstructorDeclaration constructor = ast.constructorDeclaration(
+          comment,
+          metadata,
+          modifiers?.externalKeyword,
+          modifiers?.finalConstOrVarKeyword,
+          null,
+          // TODO(paulberry): factoryKeyword
+          ast.simpleIdentifier(prefixOrName.token),
+          period,
+          name,
+          parameters,
+          separator,
+          initializers,
+          redirectedConstructor,
+          body);
+      declaration.members.add(constructor);
+      if (mixinDeclaration != null) {
+        // TODO (danrubel): Report an error if this is a mixin declaration.
+      }
+    }
+
+    void method(Token operatorKeyword, SimpleIdentifier name) {
+      if (modifiers?.constKeyword != null &&
+          body != null &&
+          (body.length > 1 || body.beginToken?.lexeme != ';')) {
+        // This error is also reported in OutlineBuilder.endMethod
+        handleRecoverableError(
+            messageConstMethod, modifiers.constKeyword, modifiers.constKeyword);
+      }
+      checkFieldFormalParameters(parameters);
+      declaration.members.add(ast.methodDeclaration(
+          comment,
+          metadata,
+          modifiers?.externalKeyword,
+          modifiers?.abstractKeyword ?? modifiers?.staticKeyword,
+          returnType,
+          getOrSet,
+          operatorKeyword,
+          name,
+          typeParameters,
+          parameters,
+          body));
+    }
+
+    if (name is SimpleIdentifier) {
+      if (name.name == declaration.name.name && getOrSet == null) {
+        constructor(name, null, null);
+      } else if (initializers.isNotEmpty) {
+        constructor(name, null, null);
+      } else {
+        method(null, name);
+      }
+    } else if (name is _OperatorName) {
+      method(name.operatorKeyword, name.name);
+    } else if (name is PrefixedIdentifier) {
+      constructor(name.prefix, name.period, name.identifier);
+    } else {
+      throw new UnimplementedError();
+    }
+  }
+
+  @override
+  void endMixinDeclaration(Token mixinKeyword, Token endToken) {
+    debugEvent("MixinDeclaration");
+    mixinDeclaration = null;
+  }
+
+  @override
+  void endNamedFunctionExpression(Token endToken) {
+    debugEvent("NamedFunctionExpression");
+    FunctionBody body = pop();
+    if (isFullAst) {
+      pop(); // constructor initializers
+      pop(); // separator before constructor initializers
+    }
+    FormalParameterList parameters = pop();
+    pop(); // name
+    pop(); // returnType
+    TypeParameterList typeParameters = pop();
+    push(ast.functionExpression(typeParameters, parameters, body));
+  }
+
+  @override
+  void endNamedMixinApplication(Token beginToken, Token classKeyword,
+      Token equalsToken, Token implementsKeyword, Token semicolon) {
+    assert(optional('class', classKeyword));
+    assert(optionalOrNull('=', equalsToken));
+    assert(optionalOrNull('implements', implementsKeyword));
+    assert(optional(';', semicolon));
+    debugEvent("NamedMixinApplication");
+
+    ImplementsClause implementsClause;
+    if (implementsKeyword != null) {
+      List<TypeName> interfaces = pop();
+      implementsClause = ast.implementsClause(implementsKeyword, interfaces);
+    }
+    WithClause withClause = pop(NullValue.WithClause);
+    TypeName superclass = pop();
+    _Modifiers modifiers = pop();
+    TypeParameterList typeParameters = pop();
+    SimpleIdentifier name = pop();
+    Token abstractKeyword = modifiers?.abstractKeyword;
+    List<Annotation> metadata = pop();
+    Comment comment = _findComment(metadata, beginToken);
+    declarations.add(ast.classTypeAlias(
+        comment,
+        metadata,
+        classKeyword,
+        name,
+        typeParameters,
+        equalsToken,
+        abstractKeyword,
+        superclass,
+        withClause,
+        implementsClause,
+        semicolon));
+  }
+
+  @override
+  void endNewExpression(Token newKeyword) {
+    assert(optional('new', newKeyword));
+    debugEvent("NewExpression");
+
+    _handleInstanceCreation(newKeyword);
+  }
+
+  @override
+  void endOptionalFormalParameters(
+      int count, Token leftDelimeter, Token rightDelimeter) {
+    assert((optional('[', leftDelimeter) && optional(']', rightDelimeter)) ||
+        (optional('{', leftDelimeter) && optional('}', rightDelimeter)));
+    debugEvent("OptionalFormalParameters");
+
+    push(new _OptionalFormalParameters(
+        popTypedList(count), leftDelimeter, rightDelimeter));
+  }
+
+  @override
+  void endPart(Token partKeyword, Token semicolon) {
+    assert(optional('part', partKeyword));
+    assert(optional(';', semicolon));
+    debugEvent("Part");
+
+    StringLiteral uri = pop();
+    List<Annotation> metadata = pop();
+    Comment comment = _findComment(metadata, partKeyword);
+    directives
+        .add(ast.partDirective(comment, metadata, partKeyword, uri, semicolon));
+  }
+
+  @override
+  void endPartOf(
+      Token partKeyword, Token ofKeyword, Token semicolon, bool hasName) {
+    assert(optional('part', partKeyword));
+    assert(optional('of', ofKeyword));
+    assert(optional(';', semicolon));
+    debugEvent("PartOf");
+    var libraryNameOrUri = pop();
+    LibraryIdentifier name;
+    StringLiteral uri;
+    if (libraryNameOrUri is StringLiteral) {
+      uri = libraryNameOrUri;
+    } else {
+      name = ast.libraryIdentifier(libraryNameOrUri as List<SimpleIdentifier>);
+    }
+    List<Annotation> metadata = pop();
+    Comment comment = _findComment(metadata, partKeyword);
+    directives.add(ast.partOfDirective(
+        comment, metadata, partKeyword, ofKeyword, uri, name, semicolon));
+  }
+
+  @override
+  void endRedirectingFactoryBody(Token equalToken, Token endToken) {
+    assert(optional('=', equalToken));
+    debugEvent("RedirectingFactoryBody");
+
+    ConstructorName constructorName = pop();
+    Token starToken = pop();
+    Token asyncToken = pop();
+    push(new _RedirectingFactoryBody(
+        asyncToken, starToken, equalToken, constructorName));
+  }
+
+  @override
+  void endRethrowStatement(Token rethrowToken, Token semicolon) {
+    assert(optional('rethrow', rethrowToken));
+    assert(optional(';', semicolon));
+    debugEvent("RethrowStatement");
+
+    RethrowExpression expression = ast.rethrowExpression(rethrowToken);
+    // TODO(scheglov) According to the specification, 'rethrow' is a statement.
+    push(ast.expressionStatement(expression, semicolon));
+  }
+
+  void endReturnStatement(
+      bool hasExpression, Token returnKeyword, Token semicolon) {
+    assert(optional('return', returnKeyword));
+    assert(optional(';', semicolon));
+    debugEvent("ReturnStatement");
+
+    Expression expression = hasExpression ? pop() : null;
+    push(ast.returnStatement(returnKeyword, expression, semicolon));
+  }
+
+  @override
+  void endShow(Token showKeyword) {
+    assert(optional('show', showKeyword));
+    debugEvent("Show");
+
+    List<SimpleIdentifier> shownNames = pop();
+    push(ast.showCombinator(showKeyword, shownNames));
+  }
+
+  @override
   void endSwitchBlock(int caseCount, Token leftBracket, Token rightBracket) {
     assert(optional('{', leftBracket));
     assert(optional('}', rightBracket));
@@ -1648,17 +1697,6 @@
   }
 
   @override
-  void handleCaseMatch(Token caseKeyword, Token colon) {
-    assert(optional('case', caseKeyword));
-    assert(optional(':', colon));
-    debugEvent("CaseMatch");
-
-    Expression expression = pop();
-    push(ast.switchCase(
-        <Label>[], caseKeyword, expression, colon, <Statement>[]));
-  }
-
-  @override
   void endSwitchStatement(Token switchKeyword, Token endToken) {
     assert(optional('switch', switchKeyword));
     debugEvent("SwitchStatement");
@@ -1677,6 +1715,269 @@
         rightBracket));
   }
 
+  @override
+  void endThenStatement(Token token) {
+    debugEvent("endThenStatement");
+  }
+
+  @override
+  void endTopLevelDeclaration(Token token) {
+    debugEvent("TopLevelDeclaration");
+  }
+
+  void endTopLevelFields(Token staticToken, Token covariantToken,
+      Token varFinalOrConst, int count, Token beginToken, Token semicolon) {
+    assert(optional(';', semicolon));
+    debugEvent("TopLevelFields");
+
+    List<VariableDeclaration> variables = popTypedList(count);
+    TypeAnnotation type = pop();
+    _Modifiers modifiers = new _Modifiers()
+      ..staticKeyword = staticToken
+      ..covariantKeyword = covariantToken
+      ..finalConstOrVarKeyword = varFinalOrConst;
+    Token keyword = modifiers?.finalConstOrVarKeyword;
+    var variableList =
+        ast.variableDeclarationList(null, null, keyword, type, variables);
+    List<Annotation> metadata = pop();
+    Comment comment = _findComment(metadata, beginToken);
+    declarations.add(ast.topLevelVariableDeclaration(
+        comment, metadata, variableList, semicolon));
+  }
+
+  void endTopLevelMethod(Token beginToken, Token getOrSet, Token endToken) {
+    // TODO(paulberry): set up scopes properly to resolve parameters and type
+    // variables.
+    assert(getOrSet == null ||
+        optional('get', getOrSet) ||
+        optional('set', getOrSet));
+    debugEvent("TopLevelMethod");
+
+    FunctionBody body = pop();
+    FormalParameterList parameters = pop();
+    TypeParameterList typeParameters = pop();
+    SimpleIdentifier name = pop();
+    TypeAnnotation returnType = pop();
+    _Modifiers modifiers = pop();
+    Token externalKeyword = modifiers?.externalKeyword;
+    List<Annotation> metadata = pop();
+    Comment comment = _findComment(metadata, beginToken);
+    declarations.add(ast.functionDeclaration(
+        comment,
+        metadata,
+        externalKeyword,
+        returnType,
+        getOrSet,
+        name,
+        ast.functionExpression(typeParameters, parameters, body)));
+  }
+
+  void endTryStatement(int catchCount, Token tryKeyword, Token finallyKeyword) {
+    assert(optional('try', tryKeyword));
+    assert(optionalOrNull('finally', finallyKeyword));
+    debugEvent("TryStatement");
+
+    Block finallyBlock = popIfNotNull(finallyKeyword);
+    List<CatchClause> catchClauses = popTypedList(catchCount);
+    Block body = pop();
+    push(ast.tryStatement(
+        tryKeyword, body, catchClauses, finallyKeyword, finallyBlock));
+  }
+
+  @override
+  void endTypeArguments(int count, Token leftBracket, Token rightBracket) {
+    assert(optional('<', leftBracket));
+    assert(optional('>', rightBracket));
+    debugEvent("TypeArguments");
+
+    List<TypeAnnotation> arguments = popTypedList(count);
+    push(ast.typeArgumentList(leftBracket, arguments, rightBracket));
+  }
+
+  @override
+  void endTypeList(int count) {
+    debugEvent("TypeList");
+    push(popTypedList<TypeName>(count) ?? NullValue.TypeList);
+  }
+
+  @override
+  void endTypeVariable(Token token, int index, Token extendsOrSuper) {
+    debugEvent("TypeVariable");
+    assert(extendsOrSuper == null ||
+        optional('extends', extendsOrSuper) ||
+        optional('super', extendsOrSuper));
+    TypeAnnotation bound = pop();
+
+    // Peek to leave type parameters on top of stack.
+    List<TypeParameter> typeParameters = peek();
+    typeParameters[index]
+      ..extendsKeyword = extendsOrSuper
+      ..bound = bound;
+  }
+
+  @override
+  void endTypeVariables(Token beginToken, Token endToken) {
+    assert(optional('<', beginToken));
+    assert(optional('>', endToken));
+    debugEvent("TypeVariables");
+
+    List<TypeParameter> typeParameters = pop();
+    push(ast.typeParameterList(beginToken, typeParameters, endToken));
+  }
+
+  void endVariableInitializer(Token assignmentOperator) {
+    assert(optionalOrNull('=', assignmentOperator));
+    debugEvent("VariableInitializer");
+
+    Expression initializer = pop();
+    SimpleIdentifier identifier = pop();
+    // TODO(ahe): Don't push initializers, instead install them.
+    push(_makeVariableDeclaration(identifier, assignmentOperator, initializer));
+  }
+
+  @override
+  void endVariablesDeclaration(int count, Token semicolon) {
+    assert(optionalOrNull(';', semicolon));
+    debugEvent("VariablesDeclaration");
+
+    List<VariableDeclaration> variables = popTypedList(count);
+    _Modifiers modifiers = pop(NullValue.Modifiers);
+    TypeAnnotation type = pop();
+    Token keyword = modifiers?.finalConstOrVarKeyword;
+    List<Annotation> metadata = pop();
+    Comment comment = _findComment(metadata,
+        variables[0].beginToken ?? type?.beginToken ?? modifiers.beginToken);
+    push(ast.variableDeclarationStatement(
+        ast.variableDeclarationList(
+            comment, metadata, keyword, type, variables),
+        semicolon));
+  }
+
+  @override
+  void endWhileStatement(Token whileKeyword, Token endToken) {
+    assert(optional('while', whileKeyword));
+    debugEvent("WhileStatement");
+
+    Statement body = pop();
+    ParenthesizedExpression condition = pop();
+    push(ast.whileStatement(whileKeyword, condition.leftParenthesis,
+        condition.expression, condition.rightParenthesis, body));
+  }
+
+  @override
+  void endWhileStatementBody(Token token) {
+    debugEvent("endWhileStatementBody");
+  }
+
+  @override
+  void endYieldStatement(Token yieldToken, Token starToken, Token semicolon) {
+    assert(optional('yield', yieldToken));
+    assert(optionalOrNull('*', starToken));
+    assert(optional(';', semicolon));
+    debugEvent("YieldStatement");
+
+    Expression expression = pop();
+    push(ast.yieldStatement(yieldToken, starToken, expression, semicolon));
+  }
+
+  @override
+  void exitLocalScope() {}
+
+  @override
+  AstNode finishFields() {
+    debugEvent("finishFields");
+
+    if (classDeclaration != null) {
+      return classDeclaration.members
+          .removeAt(classDeclaration.members.length - 1);
+    } else if (mixinDeclaration != null) {
+      return mixinDeclaration.members
+          .removeAt(mixinDeclaration.members.length - 1);
+    } else {
+      return declarations.removeLast();
+    }
+  }
+
+  void finishFunction(
+      List annotations, formals, AsyncMarker asyncModifier, FunctionBody body) {
+    debugEvent("finishFunction");
+
+    Statement bodyStatement;
+    if (body is EmptyFunctionBody) {
+      bodyStatement = ast.emptyStatement(body.semicolon);
+    } else if (body is NativeFunctionBody) {
+      // TODO(danrubel): what do we need to do with NativeFunctionBody?
+    } else if (body is ExpressionFunctionBody) {
+      bodyStatement = ast.returnStatement(null, body.expression, null);
+    } else {
+      bodyStatement = (body as BlockFunctionBody).block;
+    }
+    // TODO(paulberry): what do we need to do with bodyStatement at this point?
+    bodyStatement; // Suppress "unused local variable" hint
+  }
+
+  void handleAsOperator(Token asOperator) {
+    assert(optional('as', asOperator));
+    debugEvent("AsOperator");
+
+    TypeAnnotation type = pop();
+    Expression expression = pop();
+    push(ast.asExpression(expression, asOperator, type));
+  }
+
+  void handleAssignmentExpression(Token token) {
+    assert(token.type.isAssignmentOperator);
+    debugEvent("AssignmentExpression");
+
+    Expression rhs = pop();
+    Expression lhs = pop();
+    if (!lhs.isAssignable) {
+      // TODO(danrubel): Update the BodyBuilder to report this error.
+      handleRecoverableError(
+          messageMissingAssignableSelector, lhs.beginToken, lhs.endToken);
+    }
+    push(ast.assignmentExpression(lhs, token, rhs));
+    if (!enableTripleShift && token.type == TokenType.GT_GT_GT_EQ) {
+      handleRecoverableError(
+          templateExperimentNotEnabled.withArguments(EnableString.triple_shift),
+          token,
+          token);
+    }
+  }
+
+  void handleAsyncModifier(Token asyncToken, Token starToken) {
+    assert(asyncToken == null ||
+        optional('async', asyncToken) ||
+        optional('sync', asyncToken));
+    assert(optionalOrNull('*', starToken));
+    debugEvent("AsyncModifier");
+
+    push(asyncToken ?? NullValue.FunctionBodyAsyncToken);
+    push(starToken ?? NullValue.FunctionBodyStarToken);
+  }
+
+  @override
+  void handleBreakStatement(
+      bool hasTarget, Token breakKeyword, Token semicolon) {
+    assert(optional('break', breakKeyword));
+    assert(optional(';', semicolon));
+    debugEvent("BreakStatement");
+
+    SimpleIdentifier label = hasTarget ? pop() : null;
+    push(ast.breakStatement(breakKeyword, label, semicolon));
+  }
+
+  @override
+  void handleCaseMatch(Token caseKeyword, Token colon) {
+    assert(optional('case', caseKeyword));
+    assert(optional(':', colon));
+    debugEvent("CaseMatch");
+
+    Expression expression = pop();
+    push(ast.switchCase(
+        <Label>[], caseKeyword, expression, colon, <Statement>[]));
+  }
+
   void handleCatchBlock(Token onKeyword, Token catchKeyword, Token comma) {
     assert(optionalOrNull('on', onKeyword));
     assert(optionalOrNull('catch', catchKeyword));
@@ -1712,365 +2013,6 @@
   }
 
   @override
-  void handleFinallyBlock(Token finallyKeyword) {
-    debugEvent("FinallyBlock");
-    // The finally block is popped in "endTryStatement".
-  }
-
-  void endTryStatement(int catchCount, Token tryKeyword, Token finallyKeyword) {
-    assert(optional('try', tryKeyword));
-    assert(optionalOrNull('finally', finallyKeyword));
-    debugEvent("TryStatement");
-
-    Block finallyBlock = popIfNotNull(finallyKeyword);
-    List<CatchClause> catchClauses = popTypedList(catchCount);
-    Block body = pop();
-    push(ast.tryStatement(
-        tryKeyword, body, catchClauses, finallyKeyword, finallyBlock));
-  }
-
-  @override
-  void handleLabel(Token colon) {
-    assert(optionalOrNull(':', colon));
-    debugEvent("Label");
-
-    SimpleIdentifier name = pop();
-    push(ast.label(name, colon));
-  }
-
-  void handleIndexedExpression(Token leftBracket, Token rightBracket) {
-    assert(optional('[', leftBracket));
-    assert(optional(']', rightBracket));
-    debugEvent("IndexedExpression");
-
-    Expression index = pop();
-    Expression target = pop();
-    if (target == null) {
-      CascadeExpression receiver = pop();
-      Token token = peek();
-      push(receiver);
-      IndexExpression expression = ast.indexExpressionForCascade(
-          token, leftBracket, index, rightBracket);
-      assert(expression.isCascaded);
-      push(expression);
-    } else {
-      push(ast.indexExpressionForTarget(
-          target, leftBracket, index, rightBracket));
-    }
-  }
-
-  @override
-  void handleInvalidExpression(Token token) {
-    debugEvent("InvalidExpression");
-  }
-
-  @override
-  void handleInvalidFunctionBody(Token leftBracket) {
-    assert(optional('{', leftBracket));
-    assert(optional('}', leftBracket.endGroup));
-    debugEvent("InvalidFunctionBody");
-    Block block = ast.block(leftBracket, [], leftBracket.endGroup);
-    Token star = pop();
-    Token asyncKeyword = pop();
-    push(ast.blockFunctionBody(asyncKeyword, star, block));
-  }
-
-  void handleUnaryPrefixExpression(Token operator) {
-    assert(operator.type.isUnaryPrefixOperator);
-    debugEvent("UnaryPrefixExpression");
-
-    push(ast.prefixExpression(operator, pop()));
-  }
-
-  void handleUnaryPrefixAssignmentExpression(Token operator) {
-    assert(operator.type.isUnaryPrefixOperator);
-    debugEvent("UnaryPrefixAssignmentExpression");
-
-    Expression expression = pop();
-    if (!expression.isAssignable) {
-      // This error is also reported by the body builder.
-      handleRecoverableError(messageMissingAssignableSelector,
-          expression.endToken, expression.endToken);
-    }
-    push(ast.prefixExpression(operator, expression));
-  }
-
-  void handleUnaryPostfixAssignmentExpression(Token operator) {
-    assert(operator.type.isUnaryPostfixOperator);
-    debugEvent("UnaryPostfixAssignmentExpression");
-
-    Expression expression = pop();
-    if (!expression.isAssignable) {
-      // This error is also reported by the body builder.
-      handleRecoverableError(
-          messageIllegalAssignmentToNonAssignable, operator, operator);
-    }
-    push(ast.postfixExpression(expression, operator));
-  }
-
-  void beginTopLevelMethod(Token lastConsumed, Token externalToken) {
-    push(new _Modifiers()..externalKeyword = externalToken);
-  }
-
-  void endTopLevelMethod(Token beginToken, Token getOrSet, Token endToken) {
-    // TODO(paulberry): set up scopes properly to resolve parameters and type
-    // variables.
-    assert(getOrSet == null ||
-        optional('get', getOrSet) ||
-        optional('set', getOrSet));
-    debugEvent("TopLevelMethod");
-
-    FunctionBody body = pop();
-    FormalParameterList parameters = pop();
-    TypeParameterList typeParameters = pop();
-    SimpleIdentifier name = pop();
-    TypeAnnotation returnType = pop();
-    _Modifiers modifiers = pop();
-    Token externalKeyword = modifiers?.externalKeyword;
-    List<Annotation> metadata = pop();
-    Comment comment = _findComment(metadata, beginToken);
-    declarations.add(ast.functionDeclaration(
-        comment,
-        metadata,
-        externalKeyword,
-        returnType,
-        getOrSet,
-        name,
-        ast.functionExpression(typeParameters, parameters, body)));
-  }
-
-  @override
-  void endTopLevelDeclaration(Token token) {
-    debugEvent("TopLevelDeclaration");
-  }
-
-  @override
-  void handleInvalidTopLevelDeclaration(Token endToken) {
-    debugEvent("InvalidTopLevelDeclaration");
-
-    pop(); // metadata star
-    // TODO(danrubel): consider creating a AST node
-    // representing the invalid declaration to better support code completion,
-    // quick fixes, etc, rather than discarding the metadata and token
-  }
-
-  @override
-  void beginCompilationUnit(Token token) {
-    push(token);
-  }
-
-  @override
-  void endCompilationUnit(int count, Token endToken) {
-    debugEvent("CompilationUnit");
-
-    Token beginToken = pop();
-    checkEmpty(endToken.charOffset);
-
-    push(ast.compilationUnit(
-        beginToken, scriptTag, directives, declarations, endToken));
-  }
-
-  @override
-  void handleImportPrefix(Token deferredKeyword, Token asKeyword) {
-    assert(optionalOrNull('deferred', deferredKeyword));
-    assert(optionalOrNull('as', asKeyword));
-    debugEvent("ImportPrefix");
-
-    if (asKeyword == null) {
-      // If asKeyword is null, then no prefix has been pushed on the stack.
-      // Push a placeholder indicating that there is no prefix.
-      push(NullValue.Prefix);
-      push(NullValue.As);
-    } else {
-      push(asKeyword);
-    }
-    push(deferredKeyword ?? NullValue.Deferred);
-  }
-
-  @override
-  void endImport(Token importKeyword, Token semicolon) {
-    assert(optional('import', importKeyword));
-    assert(optionalOrNull(';', semicolon));
-    debugEvent("Import");
-
-    List<Combinator> combinators = pop();
-    Token deferredKeyword = pop(NullValue.Deferred);
-    Token asKeyword = pop(NullValue.As);
-    SimpleIdentifier prefix = pop(NullValue.Prefix);
-    List<Configuration> configurations = pop();
-    StringLiteral uri = pop();
-    List<Annotation> metadata = pop();
-    Comment comment = _findComment(metadata, importKeyword);
-
-    directives.add(ast.importDirective(
-        comment,
-        metadata,
-        importKeyword,
-        uri,
-        configurations,
-        deferredKeyword,
-        asKeyword,
-        prefix,
-        combinators,
-        semicolon));
-  }
-
-  @override
-  void handleRecoverImport(Token semicolon) {
-    assert(optionalOrNull(';', semicolon));
-    debugEvent("RecoverImport");
-
-    List<Combinator> combinators = pop();
-    Token deferredKeyword = pop(NullValue.Deferred);
-    Token asKeyword = pop(NullValue.As);
-    SimpleIdentifier prefix = pop(NullValue.Prefix);
-    List<Configuration> configurations = pop();
-
-    ImportDirective directive = directives.last;
-    if (combinators != null) {
-      directive.combinators.addAll(combinators);
-    }
-    directive.deferredKeyword ??= deferredKeyword;
-    if (directive.asKeyword == null && asKeyword != null) {
-      directive.asKeyword = asKeyword;
-      directive.prefix = prefix;
-    }
-    if (configurations != null) {
-      directive.configurations.addAll(configurations);
-    }
-    directive.semicolon = semicolon;
-  }
-
-  void endExport(Token exportKeyword, Token semicolon) {
-    assert(optional('export', exportKeyword));
-    assert(optional(';', semicolon));
-    debugEvent("Export");
-
-    List<Combinator> combinators = pop();
-    List<Configuration> configurations = pop();
-    StringLiteral uri = pop();
-    List<Annotation> metadata = pop();
-    Comment comment = _findComment(metadata, exportKeyword);
-    directives.add(ast.exportDirective(comment, metadata, exportKeyword, uri,
-        configurations, combinators, semicolon));
-  }
-
-  @override
-  void handleDottedName(int count, Token firstIdentifier) {
-    assert(firstIdentifier.isIdentifier);
-    debugEvent("DottedName");
-
-    List<SimpleIdentifier> components = popTypedList(count);
-    push(ast.dottedName(components));
-  }
-
-  @override
-  void endDoWhileStatement(
-      Token doKeyword, Token whileKeyword, Token semicolon) {
-    assert(optional('do', doKeyword));
-    assert(optional('while', whileKeyword));
-    assert(optional(';', semicolon));
-    debugEvent("DoWhileStatement");
-
-    ParenthesizedExpression condition = pop();
-    Statement body = pop();
-    push(ast.doStatement(
-        doKeyword,
-        body,
-        whileKeyword,
-        condition.leftParenthesis,
-        condition.expression,
-        condition.rightParenthesis,
-        semicolon));
-  }
-
-  void endConditionalUri(Token ifKeyword, Token leftParen, Token equalSign) {
-    assert(optional('if', ifKeyword));
-    assert(optionalOrNull('(', leftParen));
-    assert(optionalOrNull('==', equalSign));
-    debugEvent("ConditionalUri");
-
-    StringLiteral libraryUri = pop();
-    StringLiteral value = popIfNotNull(equalSign);
-    if (value is StringInterpolation) {
-      for (var child in value.childEntities) {
-        if (child is InterpolationExpression) {
-          // This error is reported in OutlineBuilder.endLiteralString
-          handleRecoverableError(
-              messageInterpolationInUri, child.beginToken, child.endToken);
-          break;
-        }
-      }
-    }
-    DottedName name = pop();
-    push(ast.configuration(ifKeyword, leftParen, name, equalSign, value,
-        leftParen?.endGroup, libraryUri));
-  }
-
-  @override
-  void endConditionalUris(int count) {
-    debugEvent("ConditionalUris");
-
-    push(popTypedList<Configuration>(count) ?? NullValue.ConditionalUris);
-  }
-
-  @override
-  void handleIdentifierList(int count) {
-    debugEvent("IdentifierList");
-
-    push(popTypedList<SimpleIdentifier>(count) ?? NullValue.IdentifierList);
-  }
-
-  @override
-  void endShow(Token showKeyword) {
-    assert(optional('show', showKeyword));
-    debugEvent("Show");
-
-    List<SimpleIdentifier> shownNames = pop();
-    push(ast.showCombinator(showKeyword, shownNames));
-  }
-
-  @override
-  void endHide(Token hideKeyword) {
-    assert(optional('hide', hideKeyword));
-    debugEvent("Hide");
-
-    List<SimpleIdentifier> hiddenNames = pop();
-    push(ast.hideCombinator(hideKeyword, hiddenNames));
-  }
-
-  @override
-  void endCombinators(int count) {
-    debugEvent("Combinators");
-    push(popTypedList<Combinator>(count) ?? NullValue.Combinators);
-  }
-
-  @override
-  void endTypeList(int count) {
-    debugEvent("TypeList");
-    push(popTypedList<TypeName>(count) ?? NullValue.TypeList);
-  }
-
-  @override
-  void endClassOrMixinBody(
-      int memberCount, Token leftBracket, Token rightBracket) {
-    assert(optional('{', leftBracket));
-    assert(optional('}', rightBracket));
-    debugEvent("ClassOrMixinBody");
-
-    ClassOrMixinDeclarationImpl declaration =
-        classDeclaration ?? mixinDeclaration;
-    declaration.leftBracket = leftBracket;
-    declaration.rightBracket = rightBracket;
-  }
-
-  @override
-  void beginClassDeclaration(Token begin, Token abstractToken, Token name) {
-    assert(classDeclaration == null && mixinDeclaration == null);
-    push(new _Modifiers()..abstractKeyword = abstractToken);
-  }
-
-  @override
   void handleClassExtends(Token extendsKeyword) {
     assert(extendsKeyword == null || extendsKeyword.isKeywordOrIdentifier);
     debugEvent("ClassExtends");
@@ -2084,32 +2026,6 @@
   }
 
   @override
-  void handleClassWithClause(Token withKeyword) {
-    assert(optional('with', withKeyword));
-    List<TypeName> mixinTypes = pop();
-    push(ast.withClause(withKeyword, mixinTypes));
-  }
-
-  @override
-  void handleClassNoWithClause() {
-    push(NullValue.WithClause);
-  }
-
-  @override
-  void handleClassOrMixinImplements(
-      Token implementsKeyword, int interfacesCount) {
-    assert(optionalOrNull('implements', implementsKeyword));
-    debugEvent("ClassImplements");
-
-    if (implementsKeyword != null) {
-      List<TypeName> interfaces = popTypedList(interfacesCount);
-      push(ast.implementsClause(implementsKeyword, interfaces));
-    } else {
-      push(NullValue.IdentifierList);
-    }
-  }
-
-  @override
   void handleClassHeader(Token begin, Token classKeyword, Token nativeToken) {
     assert(optional('class', classKeyword));
     assert(optionalOrNull('native', nativeToken));
@@ -2141,7 +2057,8 @@
       extendsClause,
       withClause,
       implementsClause,
-      null, // leftBracket
+      null,
+      // leftBracket
       <ClassMember>[],
       null, // rightBracket
     );
@@ -2151,6 +2068,778 @@
   }
 
   @override
+  void handleClassNoWithClause() {
+    push(NullValue.WithClause);
+  }
+
+  @override
+  void handleClassOrMixinImplements(
+      Token implementsKeyword, int interfacesCount) {
+    assert(optionalOrNull('implements', implementsKeyword));
+    debugEvent("ClassImplements");
+
+    if (implementsKeyword != null) {
+      List<TypeName> interfaces = popTypedList(interfacesCount);
+      push(ast.implementsClause(implementsKeyword, interfaces));
+    } else {
+      push(NullValue.IdentifierList);
+    }
+  }
+
+  @override
+  void handleClassWithClause(Token withKeyword) {
+    assert(optional('with', withKeyword));
+    List<TypeName> mixinTypes = pop();
+    push(ast.withClause(withKeyword, mixinTypes));
+  }
+
+  @override
+  void handleCommentReference(
+      Token newKeyword, Token prefix, Token period, Token token) {
+    Identifier identifier = ast.simpleIdentifier(token);
+    if (prefix != null) {
+      identifier = ast.prefixedIdentifier(
+          ast.simpleIdentifier(prefix), period, identifier);
+    }
+    push(ast.commentReference(newKeyword, identifier));
+  }
+
+  @override
+  void handleCommentReferenceText(String referenceSource, int referenceOffset) {
+    push(referenceSource);
+    push(referenceOffset);
+  }
+
+  @override
+  void handleContinueStatement(
+      bool hasTarget, Token continueKeyword, Token semicolon) {
+    assert(optional('continue', continueKeyword));
+    assert(optional(';', semicolon));
+    debugEvent("ContinueStatement");
+
+    SimpleIdentifier label = hasTarget ? pop() : null;
+    push(ast.continueStatement(continueKeyword, label, semicolon));
+  }
+
+  @override
+  void handleDottedName(int count, Token firstIdentifier) {
+    assert(firstIdentifier.isIdentifier);
+    debugEvent("DottedName");
+
+    List<SimpleIdentifier> components = popTypedList(count);
+    push(ast.dottedName(components));
+  }
+
+  @override
+  void handleElseControlFlow(Token elseToken) {
+    push(elseToken);
+  }
+
+  @override
+  void handleEmptyFunctionBody(Token semicolon) {
+    assert(optional(';', semicolon));
+    debugEvent("EmptyFunctionBody");
+
+    // TODO(scheglov) Change the parser to not produce these modifiers.
+    pop(); // star
+    pop(); // async
+    push(ast.emptyFunctionBody(semicolon));
+  }
+
+  @override
+  void handleEmptyStatement(Token semicolon) {
+    assert(optional(';', semicolon));
+    debugEvent("EmptyStatement");
+
+    push(ast.emptyStatement(semicolon));
+  }
+
+  @override
+  void handleErrorToken(ErrorToken token) {
+    translateErrorToken(token, errorReporter.reportScannerError);
+  }
+
+  void handleExpressionFunctionBody(Token arrowToken, Token semicolon) {
+    assert(optional('=>', arrowToken) || optional('=', arrowToken));
+    assert(optionalOrNull(';', semicolon));
+    debugEvent("ExpressionFunctionBody");
+
+    Expression expression = pop();
+    pop(); // star (*)
+    Token asyncKeyword = pop();
+    if (parseFunctionBodies) {
+      push(ast.expressionFunctionBody(
+          asyncKeyword, arrowToken, expression, semicolon));
+    } else {
+      push(ast.emptyFunctionBody(semicolon));
+    }
+  }
+
+  void handleExpressionStatement(Token semicolon) {
+    assert(optional(';', semicolon));
+    debugEvent("ExpressionStatement");
+    Expression expression = pop();
+    reportErrorIfSuper(expression);
+    if (expression is SimpleIdentifier &&
+        expression.token?.keyword?.isBuiltInOrPseudo == false) {
+      // This error is also reported by the body builder.
+      handleRecoverableError(
+          messageExpectedStatement, expression.beginToken, expression.endToken);
+    }
+    if (expression is AssignmentExpression) {
+      if (!expression.leftHandSide.isAssignable) {
+        // This error is also reported by the body builder.
+        handleRecoverableError(
+            messageIllegalAssignmentToNonAssignable,
+            expression.leftHandSide.beginToken,
+            expression.leftHandSide.endToken);
+      }
+    }
+    push(ast.expressionStatement(expression, semicolon));
+  }
+
+  @override
+  void handleFinallyBlock(Token finallyKeyword) {
+    debugEvent("FinallyBlock");
+    // The finally block is popped in "endTryStatement".
+  }
+
+  @override
+  void handleForInitializerEmptyStatement(Token token) {
+    debugEvent("ForInitializerEmptyStatement");
+    push(NullValue.Expression);
+  }
+
+  @override
+  void handleForInitializerExpressionStatement(Token token) {
+    debugEvent("ForInitializerExpressionStatement");
+  }
+
+  @override
+  void handleForInitializerLocalVariableDeclaration(Token token) {
+    debugEvent("ForInitializerLocalVariableDeclaration");
+  }
+
+  @override
+  void handleForInLoopParts(Token awaitToken, Token forToken,
+      Token leftParenthesis, Token inKeyword) {
+    assert(optionalOrNull('await', awaitToken));
+    assert(optional('for', forToken));
+    assert(optional('(', leftParenthesis));
+    assert(optional('in', inKeyword) || optional(':', inKeyword));
+
+    Expression iterator = pop();
+    Object variableOrDeclaration = pop();
+
+    ForEachParts forLoopParts;
+    if (variableOrDeclaration is VariableDeclarationStatement) {
+      VariableDeclarationList variableList = variableOrDeclaration.variables;
+      forLoopParts = ast.forEachPartsWithDeclaration(
+        loopVariable: ast.declaredIdentifier(
+            variableList.documentationComment,
+            variableList.metadata,
+            variableList.keyword,
+            variableList.type,
+            variableList.variables.first.name),
+        inKeyword: inKeyword,
+        iterable: iterator,
+      );
+    } else {
+      if (variableOrDeclaration is! SimpleIdentifier) {
+        // Parser has already reported the error.
+        if (!leftParenthesis.next.isIdentifier) {
+          parser.rewriter.insertToken(
+              leftParenthesis,
+              new SyntheticStringToken(
+                  TokenType.IDENTIFIER, '', leftParenthesis.next.charOffset));
+        }
+        variableOrDeclaration = ast.simpleIdentifier(leftParenthesis.next);
+      }
+      forLoopParts = ast.forEachPartsWithIdentifier(
+        identifier: variableOrDeclaration,
+        inKeyword: inKeyword,
+        iterable: iterator,
+      );
+    }
+
+    push(awaitToken ?? NullValue.AwaitToken);
+    push(forToken);
+    push(leftParenthesis);
+    push(forLoopParts);
+  }
+
+  @override
+  void handleForLoopParts(Token forKeyword, Token leftParen,
+      Token leftSeparator, int updateExpressionCount) {
+    assert(optional('for', forKeyword));
+    assert(optional('(', leftParen));
+    assert(optional(';', leftSeparator));
+    assert(updateExpressionCount >= 0);
+
+    List<Expression> updates = popTypedList(updateExpressionCount);
+    Statement conditionStatement = pop();
+    Object initializerPart = pop();
+
+    Expression condition;
+    Token rightSeparator;
+    if (conditionStatement is ExpressionStatement) {
+      condition = conditionStatement.expression;
+      rightSeparator = conditionStatement.semicolon;
+    } else {
+      rightSeparator = (conditionStatement as EmptyStatement).semicolon;
+    }
+
+    ForParts forLoopParts;
+    if (initializerPart is VariableDeclarationStatement) {
+      forLoopParts = ast.forPartsWithDeclarations(
+        variables: initializerPart.variables,
+        leftSeparator: leftSeparator,
+        condition: condition,
+        rightSeparator: rightSeparator,
+        updaters: updates,
+      );
+    } else {
+      forLoopParts = ast.forPartsWithExpression(
+        initialization: initializerPart as Expression,
+        leftSeparator: leftSeparator,
+        condition: condition,
+        rightSeparator: rightSeparator,
+        updaters: updates,
+      );
+    }
+
+    push(forKeyword);
+    push(leftParen);
+    push(forLoopParts);
+  }
+
+  void handleFormalParameterWithoutValue(Token token) {
+    debugEvent("FormalParameterWithoutValue");
+
+    push(NullValue.ParameterDefaultValue);
+  }
+
+  void handleIdentifier(Token token, IdentifierContext context) {
+    assert(token.isKeywordOrIdentifier);
+    debugEvent("handleIdentifier");
+
+    if (context.inSymbol) {
+      push(token);
+      return;
+    }
+
+    SimpleIdentifier identifier =
+        ast.simpleIdentifier(token, isDeclaration: context.inDeclaration);
+    if (context.inLibraryOrPartOfDeclaration) {
+      if (!context.isContinuation) {
+        push([identifier]);
+      } else {
+        push(identifier);
+      }
+    } else if (context == IdentifierContext.enumValueDeclaration) {
+      List<Annotation> metadata = pop();
+      Comment comment = _findComment(null, token);
+      push(ast.enumConstantDeclaration(comment, metadata, identifier));
+    } else {
+      push(identifier);
+    }
+  }
+
+  @override
+  void handleIdentifierList(int count) {
+    debugEvent("IdentifierList");
+
+    push(popTypedList<SimpleIdentifier>(count) ?? NullValue.IdentifierList);
+  }
+
+  @override
+  void handleImportPrefix(Token deferredKeyword, Token asKeyword) {
+    assert(optionalOrNull('deferred', deferredKeyword));
+    assert(optionalOrNull('as', asKeyword));
+    debugEvent("ImportPrefix");
+
+    if (asKeyword == null) {
+      // If asKeyword is null, then no prefix has been pushed on the stack.
+      // Push a placeholder indicating that there is no prefix.
+      push(NullValue.Prefix);
+      push(NullValue.As);
+    } else {
+      push(asKeyword);
+    }
+    push(deferredKeyword ?? NullValue.Deferred);
+  }
+
+  void handleIndexedExpression(Token leftBracket, Token rightBracket) {
+    assert(optional('[', leftBracket));
+    assert(optional(']', rightBracket));
+    debugEvent("IndexedExpression");
+
+    Expression index = pop();
+    Expression target = pop();
+    if (target == null) {
+      CascadeExpression receiver = pop();
+      Token token = peek();
+      push(receiver);
+      IndexExpression expression = ast.indexExpressionForCascade(
+          token, leftBracket, index, rightBracket);
+      assert(expression.isCascaded);
+      push(expression);
+    } else {
+      push(ast.indexExpressionForTarget(
+          target, leftBracket, index, rightBracket));
+    }
+  }
+
+  @override
+  void handleInterpolationExpression(Token leftBracket, Token rightBracket) {
+    Expression expression = pop();
+    push(ast.interpolationExpression(leftBracket, expression, rightBracket));
+  }
+
+  @override
+  void handleInvalidExpression(Token token) {
+    debugEvent("InvalidExpression");
+  }
+
+  @override
+  void handleInvalidFunctionBody(Token leftBracket) {
+    assert(optional('{', leftBracket));
+    assert(optional('}', leftBracket.endGroup));
+    debugEvent("InvalidFunctionBody");
+    Block block = ast.block(leftBracket, [], leftBracket.endGroup);
+    Token star = pop();
+    Token asyncKeyword = pop();
+    push(ast.blockFunctionBody(asyncKeyword, star, block));
+  }
+
+  @override
+  void handleInvalidMember(Token endToken) {
+    debugEvent("InvalidMember");
+    pop(); // metadata star
+  }
+
+  @override
+  void handleInvalidOperatorName(Token operatorKeyword, Token token) {
+    assert(optional('operator', operatorKeyword));
+    debugEvent("InvalidOperatorName");
+
+    push(new _OperatorName(
+        operatorKeyword, ast.simpleIdentifier(token, isDeclaration: true)));
+  }
+
+  void handleInvalidTopLevelBlock(Token token) {
+    // TODO(danrubel): Consider improved recovery by adding this block
+    // as part of a synthetic top level function.
+    pop(); // block
+  }
+
+  @override
+  void handleInvalidTopLevelDeclaration(Token endToken) {
+    debugEvent("InvalidTopLevelDeclaration");
+
+    pop(); // metadata star
+    // TODO(danrubel): consider creating a AST node
+    // representing the invalid declaration to better support code completion,
+    // quick fixes, etc, rather than discarding the metadata and token
+  }
+
+  @override
+  void handleInvalidTypeArguments(Token token) {
+    TypeArgumentList invalidTypeArgs = pop();
+    var node = pop();
+    if (node is ConstructorName) {
+      push(new _ConstructorNameWithInvalidTypeArgs(node, invalidTypeArgs));
+    } else {
+      throw new UnimplementedError();
+    }
+  }
+
+  void handleIsOperator(Token isOperator, Token not) {
+    assert(optional('is', isOperator));
+    assert(optionalOrNull('!', not));
+    debugEvent("IsOperator");
+
+    TypeAnnotation type = pop();
+    Expression expression = pop();
+    push(ast.isExpression(expression, isOperator, not, type));
+  }
+
+  @override
+  void handleLabel(Token colon) {
+    assert(optionalOrNull(':', colon));
+    debugEvent("Label");
+
+    SimpleIdentifier name = pop();
+    push(ast.label(name, colon));
+  }
+
+  @override
+  void handleLanguageVersion(Token commentToken, int major, int minor) {
+    debugEvent('LanguageVersion');
+    assert(commentToken is CommentToken);
+    assert(major != null);
+    assert(minor != null);
+
+    languageVersion = Version(major, minor, 0);
+  }
+
+  void handleLiteralBool(Token token) {
+    bool value = identical(token.stringValue, "true");
+    assert(value || identical(token.stringValue, "false"));
+    debugEvent("LiteralBool");
+
+    push(ast.booleanLiteral(token, value));
+  }
+
+  void handleLiteralDouble(Token token) {
+    assert(token.type == TokenType.DOUBLE);
+    debugEvent("LiteralDouble");
+
+    push(ast.doubleLiteral(token, double.parse(token.lexeme)));
+  }
+
+  void handleLiteralInt(Token token) {
+    assert(identical(token.kind, INT_TOKEN) ||
+        identical(token.kind, HEXADECIMAL_TOKEN));
+    debugEvent("LiteralInt");
+
+    push(ast.integerLiteral(token, int.tryParse(token.lexeme)));
+  }
+
+  void handleLiteralList(
+      int count, Token leftBracket, Token constKeyword, Token rightBracket) {
+    assert(optional('[', leftBracket));
+    assert(optionalOrNull('const', constKeyword));
+    assert(optional(']', rightBracket));
+    debugEvent("LiteralList");
+
+    if (enableControlFlowCollections || enableSpreadCollections) {
+      List<CollectionElement> elements = popCollectionElements(count);
+      TypeArgumentList typeArguments = pop();
+
+      // TODO(danrubel): Remove this and _InvalidCollectionElement
+      // once control flow and spread collection support is enabled by default
+      elements.removeWhere((e) => e == _invalidCollectionElement);
+
+      push(ast.listLiteral(
+          constKeyword, typeArguments, leftBracket, elements, rightBracket));
+    } else {
+      List<dynamic> elements = popTypedList(count);
+      TypeArgumentList typeArguments = pop();
+
+      List<Expression> expressions = <Expression>[];
+      if (elements != null) {
+        for (var elem in elements) {
+          if (elem is Expression) {
+            expressions.add(elem);
+          }
+        }
+      }
+
+      push(ast.listLiteral(
+          constKeyword, typeArguments, leftBracket, expressions, rightBracket));
+    }
+  }
+
+  void handleLiteralMapEntry(Token colon, Token endToken) {
+    assert(optional(':', colon));
+    debugEvent("LiteralMapEntry");
+
+    Expression value = pop();
+    Expression key = pop();
+    push(ast.mapLiteralEntry(key, colon, value));
+  }
+
+  void handleLiteralNull(Token token) {
+    assert(optional('null', token));
+    debugEvent("LiteralNull");
+
+    push(ast.nullLiteral(token));
+  }
+
+  @override
+  void handleLiteralSetOrMap(
+    int count,
+    Token leftBrace,
+    Token constKeyword,
+    Token rightBrace,
+    // TODO(danrubel): hasSetEntry parameter exists for replicating existing
+    // behavior and will be removed once unified collection has been enabled
+    bool hasSetEntry,
+  ) {
+    if (enableControlFlowCollections || enableSpreadCollections) {
+      List<CollectionElement> elements = popCollectionElements(count);
+
+      // TODO(danrubel): Remove this and _InvalidCollectionElement
+      // once control flow and spread collection support is enabled by default
+      elements.removeWhere((e) => e == _invalidCollectionElement);
+
+      TypeArgumentList typeArguments = pop();
+      push(ast.setOrMapLiteral(
+        constKeyword: constKeyword,
+        typeArguments: typeArguments,
+        leftBracket: leftBrace,
+        elements: elements,
+        rightBracket: rightBrace,
+      ));
+    } else {
+      List<dynamic> elements = popTypedList(count);
+      TypeArgumentList typeArguments = pop();
+
+      // Replicate existing behavior that has been removed from the parser.
+      // This will be removed once control flow collections
+      // and spread collections are enabled by default.
+
+      // Determine if this is a set or map based on type args and content
+      final typeArgCount = typeArguments?.arguments?.length;
+      bool isSet =
+          typeArgCount == 1 ? true : typeArgCount != null ? false : null;
+      isSet ??= hasSetEntry;
+
+      // Build the set or map
+      if (isSet) {
+        final setEntries = <Expression>[];
+        if (elements != null) {
+          for (var elem in elements) {
+            if (elem is MapLiteralEntry) {
+              setEntries.add(elem.key);
+              handleRecoverableError(
+                  templateUnexpectedToken.withArguments(elem.separator),
+                  elem.separator,
+                  elem.separator);
+            } else if (elem is Expression) {
+              setEntries.add(elem);
+            }
+          }
+        }
+        push(ast.setOrMapLiteral(
+          constKeyword: constKeyword,
+          typeArguments: typeArguments,
+          leftBracket: leftBrace,
+          elements: setEntries,
+          rightBracket: rightBrace,
+        ));
+      } else {
+        final mapEntries = <MapLiteralEntry>[];
+        if (elements != null) {
+          for (var elem in elements) {
+            if (elem is MapLiteralEntry) {
+              mapEntries.add(elem);
+            } else if (elem is Expression) {
+              Token next = elem.endToken.next;
+              int offset = next.offset;
+              handleRecoverableError(
+                  templateExpectedButGot.withArguments(':'), next, next);
+              handleRecoverableError(
+                  templateExpectedIdentifier.withArguments(next), next, next);
+              Token separator = SyntheticToken(TokenType.COLON, offset);
+              Expression value = ast.simpleIdentifier(
+                  SyntheticStringToken(TokenType.IDENTIFIER, '', offset));
+              mapEntries.add(ast.mapLiteralEntry(elem, separator, value));
+            }
+          }
+        }
+        push(ast.setOrMapLiteral(
+          constKeyword: constKeyword,
+          typeArguments: typeArguments,
+          leftBracket: leftBrace,
+          elements: mapEntries,
+          rightBracket: rightBrace,
+        ));
+      }
+    }
+  }
+
+  @override
+  void handleMixinHeader(Token mixinKeyword) {
+    assert(optional('mixin', mixinKeyword));
+    assert(classDeclaration == null && mixinDeclaration == null);
+    debugEvent("MixinHeader");
+
+    ImplementsClause implementsClause = pop(NullValue.IdentifierList);
+    OnClause onClause = pop(NullValue.IdentifierList);
+    TypeParameterList typeParameters = pop();
+    SimpleIdentifier name = pop();
+    List<Annotation> metadata = pop();
+    Comment comment = _findComment(metadata, mixinKeyword);
+
+    mixinDeclaration = ast.mixinDeclaration(
+      comment,
+      metadata,
+      mixinKeyword,
+      name,
+      typeParameters,
+      onClause,
+      implementsClause,
+      null,
+      // leftBracket
+      <ClassMember>[],
+      null, // rightBracket
+    );
+    declarations.add(mixinDeclaration);
+  }
+
+  @override
+  void handleMixinOn(Token onKeyword, int typeCount) {
+    assert(onKeyword == null || onKeyword.isKeywordOrIdentifier);
+    debugEvent("MixinOn");
+
+    if (onKeyword != null) {
+      List<TypeName> types = popTypedList(typeCount);
+      push(ast.onClause(onKeyword, types));
+    } else {
+      push(NullValue.IdentifierList);
+    }
+  }
+
+  void handleNamedArgument(Token colon) {
+    assert(optional(':', colon));
+    debugEvent("NamedArgument");
+
+    Expression expression = pop();
+    SimpleIdentifier name = pop();
+    push(ast.namedExpression(ast.label(name, colon), expression));
+  }
+
+  @override
+  void handleNamedMixinApplicationWithClause(Token withKeyword) {
+    assert(optionalOrNull('with', withKeyword));
+    List<TypeName> mixinTypes = pop();
+    push(ast.withClause(withKeyword, mixinTypes));
+  }
+
+  @override
+  void handleNativeClause(Token nativeToken, bool hasName) {
+    debugEvent("NativeClause");
+
+    if (hasName) {
+      nativeName = pop(); // StringLiteral
+    } else {
+      nativeName = null;
+    }
+  }
+
+  @override
+  void handleNativeFunctionBody(Token nativeToken, Token semicolon) {
+    assert(optional('native', nativeToken));
+    assert(optional(';', semicolon));
+    debugEvent("NativeFunctionBody");
+
+    // TODO(danrubel) Change the parser to not produce these modifiers.
+    pop(); // star
+    pop(); // async
+    push(ast.nativeFunctionBody(nativeToken, nativeName, semicolon));
+  }
+
+  @override
+  void handleNoConstructorReferenceContinuationAfterTypeArguments(Token token) {
+    debugEvent("NoConstructorReferenceContinuationAfterTypeArguments");
+
+    push(NullValue.ConstructorReferenceContinuationAfterTypeArguments);
+  }
+
+  @override
+  void handleNoFieldInitializer(Token token) {
+    debugEvent("NoFieldInitializer");
+
+    SimpleIdentifier name = pop();
+    push(_makeVariableDeclaration(name, null, null));
+  }
+
+  void handleNoInitializers() {
+    debugEvent("NoInitializers");
+
+    if (!isFullAst) return;
+    push(NullValue.ConstructorInitializerSeparator);
+    push(NullValue.ConstructorInitializers);
+  }
+
+  @override
+  void handleNonNullAssertExpression(Token bang) {
+    debugEvent('NonNullAssertExpression');
+    if (!enableNonNullable) {
+      reportNonNullAssertExpressionNotEnabled(bang);
+    } else {
+      push(ast.postfixExpression(pop(), bang));
+    }
+  }
+
+  @override
+  void handleNoVariableInitializer(Token token) {
+    debugEvent("NoVariableInitializer");
+  }
+
+  void handleOperator(Token operatorToken) {
+    assert(operatorToken.isUserDefinableOperator);
+    debugEvent("Operator");
+
+    push(operatorToken);
+  }
+
+  @override
+  void handleOperatorName(Token operatorKeyword, Token token) {
+    assert(optional('operator', operatorKeyword));
+    assert(token.type.isUserDefinableOperator);
+    debugEvent("OperatorName");
+
+    push(new _OperatorName(
+        operatorKeyword, ast.simpleIdentifier(token, isDeclaration: true)));
+  }
+
+  @override
+  void handleParenthesizedCondition(Token leftParenthesis) {
+    // TODO(danrubel): Implement rather than forwarding.
+    handleParenthesizedExpression(leftParenthesis);
+  }
+
+  @override
+  void handleParenthesizedExpression(Token leftParenthesis) {
+    assert(optional('(', leftParenthesis));
+    debugEvent("ParenthesizedExpression");
+
+    Expression expression = pop();
+    push(ast.parenthesizedExpression(
+        leftParenthesis, expression, leftParenthesis?.endGroup));
+  }
+
+  @override
+  void handleQualified(Token period) {
+    assert(optional('.', period));
+
+    SimpleIdentifier identifier = pop();
+    var prefix = pop();
+    if (prefix is List) {
+      // We're just accumulating components into a list.
+      prefix.add(identifier);
+      push(prefix);
+    } else if (prefix is SimpleIdentifier) {
+      // TODO(paulberry): resolve [identifier].  Note that BodyBuilder handles
+      // this situation using SendAccessGenerator.
+      push(ast.prefixedIdentifier(prefix, period, identifier));
+    } else {
+      // TODO(paulberry): implement.
+      logEvent('Qualified with >1 dot');
+    }
+  }
+
+  @override
+  void handleRecoverableError(
+      Message message, Token startToken, Token endToken) {
+    /// TODO(danrubel): Ignore this error until we deprecate `native` support.
+    if (message == messageNativeClauseShouldBeAnnotation && allowNativeClause) {
+      return;
+    }
+    debugEvent("Error: ${message.message}");
+    if (message.code.analyzerCodes == null && startToken is ErrorToken) {
+      translateErrorToken(startToken, errorReporter.reportScannerError);
+    } else {
+      int offset = startToken.offset;
+      int length = endToken.end - offset;
+      addProblem(message, offset, length);
+    }
+  }
+
+  @override
   void handleRecoverClassHeader() {
     debugEvent("RecoverClassHeader");
 
@@ -2181,55 +2870,29 @@
   }
 
   @override
-  void endClassDeclaration(Token beginToken, Token endToken) {
-    debugEvent("ClassDeclaration");
-    classDeclaration = null;
-  }
+  void handleRecoverImport(Token semicolon) {
+    assert(optionalOrNull(';', semicolon));
+    debugEvent("RecoverImport");
 
-  @override
-  void beginMixinDeclaration(Token mixinKeyword, Token name) {
-    assert(classDeclaration == null && mixinDeclaration == null);
-  }
+    List<Combinator> combinators = pop();
+    Token deferredKeyword = pop(NullValue.Deferred);
+    Token asKeyword = pop(NullValue.As);
+    SimpleIdentifier prefix = pop(NullValue.Prefix);
+    List<Configuration> configurations = pop();
 
-  @override
-  void handleMixinOn(Token onKeyword, int typeCount) {
-    assert(onKeyword == null || onKeyword.isKeywordOrIdentifier);
-    debugEvent("MixinOn");
-
-    if (onKeyword != null) {
-      List<TypeName> types = popTypedList(typeCount);
-      push(ast.onClause(onKeyword, types));
-    } else {
-      push(NullValue.IdentifierList);
+    ImportDirective directive = directives.last;
+    if (combinators != null) {
+      directive.combinators.addAll(combinators);
     }
-  }
-
-  @override
-  void handleMixinHeader(Token mixinKeyword) {
-    assert(optional('mixin', mixinKeyword));
-    assert(classDeclaration == null && mixinDeclaration == null);
-    debugEvent("MixinHeader");
-
-    ImplementsClause implementsClause = pop(NullValue.IdentifierList);
-    OnClause onClause = pop(NullValue.IdentifierList);
-    TypeParameterList typeParameters = pop();
-    SimpleIdentifier name = pop();
-    List<Annotation> metadata = pop();
-    Comment comment = _findComment(metadata, mixinKeyword);
-
-    mixinDeclaration = ast.mixinDeclaration(
-      comment,
-      metadata,
-      mixinKeyword,
-      name,
-      typeParameters,
-      onClause,
-      implementsClause,
-      null, // leftBracket
-      <ClassMember>[],
-      null, // rightBracket
-    );
-    declarations.add(mixinDeclaration);
+    directive.deferredKeyword ??= deferredKeyword;
+    if (directive.asKeyword == null && asKeyword != null) {
+      directive.asKeyword = asKeyword;
+      directive.prefix = prefix;
+    }
+    if (configurations != null) {
+      directive.configurations.addAll(configurations);
+    }
+    directive.semicolon = semicolon;
   }
 
   @override
@@ -2255,352 +2918,95 @@
     }
   }
 
-  @override
-  void endMixinDeclaration(Token mixinKeyword, Token endToken) {
-    debugEvent("MixinDeclaration");
-    mixinDeclaration = null;
+  void handleScript(Token token) {
+    assert(identical(token.type, TokenType.SCRIPT_TAG));
+    debugEvent("Script");
+
+    scriptTag = ast.scriptTag(token);
   }
 
-  @override
-  void beginNamedMixinApplication(
-      Token begin, Token abstractToken, Token name) {
-    push(new _Modifiers()..abstractKeyword = abstractToken);
-  }
+  void handleSend(Token beginToken, Token endToken) {
+    debugEvent("Send");
 
-  @override
-  void handleNamedMixinApplicationWithClause(Token withKeyword) {
-    assert(optionalOrNull('with', withKeyword));
-    List<TypeName> mixinTypes = pop();
-    push(ast.withClause(withKeyword, mixinTypes));
-  }
-
-  @override
-  void endNamedMixinApplication(Token beginToken, Token classKeyword,
-      Token equalsToken, Token implementsKeyword, Token semicolon) {
-    assert(optional('class', classKeyword));
-    assert(optionalOrNull('=', equalsToken));
-    assert(optionalOrNull('implements', implementsKeyword));
-    assert(optional(';', semicolon));
-    debugEvent("NamedMixinApplication");
-
-    ImplementsClause implementsClause;
-    if (implementsKeyword != null) {
-      List<TypeName> interfaces = pop();
-      implementsClause = ast.implementsClause(implementsKeyword, interfaces);
-    }
-    WithClause withClause = pop(NullValue.WithClause);
-    TypeName superclass = pop();
-    _Modifiers modifiers = pop();
-    TypeParameterList typeParameters = pop();
-    SimpleIdentifier name = pop();
-    Token abstractKeyword = modifiers?.abstractKeyword;
-    List<Annotation> metadata = pop();
-    Comment comment = _findComment(metadata, beginToken);
-    declarations.add(ast.classTypeAlias(
-        comment,
-        metadata,
-        classKeyword,
-        name,
-        typeParameters,
-        equalsToken,
-        abstractKeyword,
-        superclass,
-        withClause,
-        implementsClause,
-        semicolon));
-  }
-
-  @override
-  void endLabeledStatement(int labelCount) {
-    debugEvent("LabeledStatement");
-
-    Statement statement = pop();
-    List<Label> labels = popTypedList(labelCount);
-    push(ast.labeledStatement(labels, statement));
-  }
-
-  @override
-  void endLibraryName(Token libraryKeyword, Token semicolon) {
-    assert(optional('library', libraryKeyword));
-    assert(optional(';', semicolon));
-    debugEvent("LibraryName");
-
-    List<SimpleIdentifier> libraryName = pop();
-    var name = ast.libraryIdentifier(libraryName);
-    List<Annotation> metadata = pop();
-    if (enableNonNullable && metadata != null) {
-      for (Annotation annotation in metadata) {
-        Identifier pragma = annotation.name;
-        if (pragma is SimpleIdentifier && pragma.name == 'pragma') {
-          NodeList<Expression> arguments = annotation.arguments.arguments;
-          if (arguments.length == 1) {
-            Expression tag = arguments[0];
-            if (tag is StringLiteral) {
-              if (tag.stringValue == 'analyzer:non-nullable') {
-                hasPragmaAnalyzerNonNullable = true;
-                break;
-              }
-            }
-          }
-        }
-      }
-    }
-    Comment comment = _findComment(metadata, libraryKeyword);
-    directives.add(ast.libraryDirective(
-        comment, metadata, libraryKeyword, name, semicolon));
-  }
-
-  @override
-  void handleRecoverableError(
-      Message message, Token startToken, Token endToken) {
-    /// TODO(danrubel): Ignore this error until we deprecate `native` support.
-    if (message == messageNativeClauseShouldBeAnnotation && allowNativeClause) {
-      return;
-    }
-    debugEvent("Error: ${message.message}");
-    if (message.code.analyzerCodes == null && startToken is ErrorToken) {
-      translateErrorToken(startToken, errorReporter.reportScannerError);
+    MethodInvocation arguments = pop();
+    TypeArgumentList typeArguments = pop();
+    if (arguments != null) {
+      doInvocation(typeArguments, arguments);
     } else {
-      int offset = startToken.offset;
-      int length = endToken.end - offset;
-      addProblem(message, offset, length);
+      doPropertyGet();
     }
   }
 
   @override
-  void handleQualified(Token period) {
-    assert(optional('.', period));
-
-    SimpleIdentifier identifier = pop();
-    var prefix = pop();
-    if (prefix is List) {
-      // We're just accumulating components into a list.
-      prefix.add(identifier);
-      push(prefix);
-    } else if (prefix is SimpleIdentifier) {
-      // TODO(paulberry): resolve [identifier].  Note that BodyBuilder handles
-      // this situation using SendAccessGenerator.
-      push(ast.prefixedIdentifier(prefix, period, identifier));
+  void handleSpreadExpression(Token spreadToken) {
+    var expression = pop();
+    if (enableSpreadCollections) {
+      push(ast.spreadElement(
+          spreadOperator: spreadToken, expression: expression));
     } else {
-      // TODO(paulberry): implement.
-      logEvent('Qualified with >1 dot');
+      handleRecoverableError(
+          templateExperimentNotEnabled
+              .withArguments(EnableString.spread_collections),
+          spreadToken,
+          spreadToken);
+      push(_invalidCollectionElement);
     }
   }
 
-  @override
-  void endPart(Token partKeyword, Token semicolon) {
-    assert(optional('part', partKeyword));
-    assert(optional(';', semicolon));
-    debugEvent("Part");
+  void handleStringJuxtaposition(int literalCount) {
+    debugEvent("StringJuxtaposition");
 
-    StringLiteral uri = pop();
-    List<Annotation> metadata = pop();
-    Comment comment = _findComment(metadata, partKeyword);
-    directives
-        .add(ast.partDirective(comment, metadata, partKeyword, uri, semicolon));
+    push(ast.adjacentStrings(popTypedList(literalCount)));
   }
 
   @override
-  void endPartOf(
-      Token partKeyword, Token ofKeyword, Token semicolon, bool hasName) {
-    assert(optional('part', partKeyword));
-    assert(optional('of', ofKeyword));
-    assert(optional(';', semicolon));
-    debugEvent("PartOf");
-    var libraryNameOrUri = pop();
-    LibraryIdentifier name;
-    StringLiteral uri;
-    if (libraryNameOrUri is StringLiteral) {
-      uri = libraryNameOrUri;
-    } else {
-      name = ast.libraryIdentifier(libraryNameOrUri as List<SimpleIdentifier>);
-    }
-    List<Annotation> metadata = pop();
-    Comment comment = _findComment(metadata, partKeyword);
-    directives.add(ast.partOfDirective(
-        comment, metadata, partKeyword, ofKeyword, uri, name, semicolon));
+  void handleStringPart(Token literalString) {
+    assert(identical(literalString.kind, STRING_TOKEN));
+    debugEvent("StringPart");
+
+    push(literalString);
   }
 
   @override
-  void endFunctionExpression(Token beginToken, Token token) {
-    // TODO(paulberry): set up scopes properly to resolve parameters and type
-    // variables.  Note that this is tricky due to the handling of initializers
-    // in constructors, so the logic should be shared with BodyBuilder as much
-    // as possible.
-    debugEvent("FunctionExpression");
+  void handleSuperExpression(Token superKeyword, IdentifierContext context) {
+    assert(optional('super', superKeyword));
+    debugEvent("SuperExpression");
 
-    FunctionBody body = pop();
-    FormalParameterList parameters = pop();
-    TypeParameterList typeParameters = pop();
-    push(ast.functionExpression(typeParameters, parameters, body));
+    push(ast.superExpression(superKeyword));
+  }
+
+  void handleSymbolVoid(Token voidKeyword) {
+    assert(optional('void', voidKeyword));
+    debugEvent("SymbolVoid");
+
+    push(voidKeyword);
   }
 
   @override
-  void handleNoFieldInitializer(Token token) {
-    debugEvent("NoFieldInitializer");
+  void handleThisExpression(Token thisKeyword, IdentifierContext context) {
+    assert(optional('this', thisKeyword));
+    debugEvent("ThisExpression");
 
-    SimpleIdentifier name = pop();
-    push(_makeVariableDeclaration(name, null, null));
+    push(ast.thisExpression(thisKeyword));
+  }
+
+  void handleThrowExpression(Token throwToken, Token endToken) {
+    assert(optional('throw', throwToken));
+    debugEvent("ThrowExpression");
+
+    push(ast.throwExpression(throwToken, pop()));
   }
 
   @override
-  void beginFactoryMethod(
-      Token lastConsumed, Token externalToken, Token constToken) {
-    push(new _Modifiers()
-      ..externalKeyword = externalToken
-      ..finalConstOrVarKeyword = constToken);
-  }
-
-  @override
-  void endFactoryMethod(
-      Token beginToken, Token factoryKeyword, Token endToken) {
-    assert(optional('factory', factoryKeyword));
-    assert(optional(';', endToken) || optional('}', endToken));
-    debugEvent("FactoryMethod");
-
-    FunctionBody body;
-    Token separator;
-    ConstructorName redirectedConstructor;
-    Object bodyObject = pop();
-    if (bodyObject is FunctionBody) {
-      body = bodyObject;
-    } else if (bodyObject is _RedirectingFactoryBody) {
-      separator = bodyObject.equalToken;
-      redirectedConstructor = bodyObject.constructorName;
-      body = ast.emptyFunctionBody(endToken);
-    } else {
-      unhandled("${bodyObject.runtimeType}", "bodyObject",
-          beginToken.charOffset, uri);
+  void handleType(Token beginToken, Token questionMark) {
+    debugEvent("Type");
+    if (!enableNonNullable) {
+      reportErrorIfNullableType(questionMark);
     }
 
-    FormalParameterList parameters = pop();
-    TypeParameterList typeParameters = pop();
-    Object constructorName = pop();
-    _Modifiers modifiers = pop();
-    List<Annotation> metadata = pop();
-    Comment comment = _findComment(metadata, beginToken);
-
-    assert(parameters != null);
-
-    if (typeParameters != null) {
-      // TODO(danrubel): Update OutlineBuilder to report this error message.
-      handleRecoverableError(messageConstructorWithTypeParameters,
-          typeParameters.beginToken, typeParameters.endToken);
-    }
-
-    // Decompose the preliminary ConstructorName into the type name and
-    // the actual constructor name.
-    SimpleIdentifier returnType;
-    Token period;
-    SimpleIdentifier name;
-    Identifier typeName = constructorName;
-    if (typeName is SimpleIdentifier) {
-      returnType = typeName;
-    } else if (typeName is PrefixedIdentifier) {
-      returnType = typeName.prefix;
-      period = typeName.period;
-      name =
-          ast.simpleIdentifier(typeName.identifier.token, isDeclaration: true);
-    }
-
-    (classDeclaration ?? mixinDeclaration).members.add(
-        ast.constructorDeclaration(
-            comment,
-            metadata,
-            modifiers?.externalKeyword,
-            modifiers?.finalConstOrVarKeyword,
-            factoryKeyword,
-            ast.simpleIdentifier(returnType.token),
-            period,
-            name,
-            parameters,
-            separator,
-            null,
-            redirectedConstructor,
-            body));
-  }
-
-  void endFieldInitializer(Token assignment, Token token) {
-    assert(optional('=', assignment));
-    debugEvent("FieldInitializer");
-
-    Expression initializer = pop();
-    SimpleIdentifier name = pop();
-    push(_makeVariableDeclaration(name, assignment, initializer));
-  }
-
-  @override
-  void endNamedFunctionExpression(Token endToken) {
-    debugEvent("NamedFunctionExpression");
-    FunctionBody body = pop();
-    if (isFullAst) {
-      pop(); // constructor initializers
-      pop(); // separator before constructor initializers
-    }
-    FormalParameterList parameters = pop();
-    pop(); // name
-    pop(); // returnType
-    TypeParameterList typeParameters = pop();
-    push(ast.functionExpression(typeParameters, parameters, body));
-  }
-
-  @override
-  void endLocalFunctionDeclaration(Token token) {
-    debugEvent("LocalFunctionDeclaration");
-    FunctionBody body = pop();
-    if (isFullAst) {
-      pop(); // constructor initializers
-      pop(); // separator before constructor initializers
-    }
-    FormalParameterList parameters = pop();
-    checkFieldFormalParameters(parameters);
-    SimpleIdentifier name = pop();
-    TypeAnnotation returnType = pop();
-    TypeParameterList typeParameters = pop();
-    List<Annotation> metadata = pop(NullValue.Metadata);
-    FunctionExpression functionExpression =
-        ast.functionExpression(typeParameters, parameters, body);
-    var functionDeclaration = ast.functionDeclaration(
-        null, metadata, null, returnType, null, name, functionExpression);
-    localDeclarations[name.offset] = functionDeclaration;
-    push(ast.functionDeclarationStatement(functionDeclaration));
-  }
-
-  @override
-  void endFunctionName(Token beginToken, Token token) {
-    debugEvent("FunctionName");
-  }
-
-  void endTopLevelFields(Token staticToken, Token covariantToken,
-      Token varFinalOrConst, int count, Token beginToken, Token semicolon) {
-    assert(optional(';', semicolon));
-    debugEvent("TopLevelFields");
-
-    List<VariableDeclaration> variables = popTypedList(count);
-    TypeAnnotation type = pop();
-    _Modifiers modifiers = new _Modifiers()
-      ..staticKeyword = staticToken
-      ..covariantKeyword = covariantToken
-      ..finalConstOrVarKeyword = varFinalOrConst;
-    Token keyword = modifiers?.finalConstOrVarKeyword;
-    var variableList =
-        ast.variableDeclarationList(null, null, keyword, type, variables);
-    List<Annotation> metadata = pop();
-    Comment comment = _findComment(metadata, beginToken);
-    declarations.add(ast.topLevelVariableDeclaration(
-        comment, metadata, variableList, semicolon));
-  }
-
-  @override
-  void beginTypeVariable(Token token) {
-    debugEvent("beginTypeVariable");
-    SimpleIdentifier name = pop();
-    List<Annotation> metadata = pop();
-
-    Comment comment = _findComment(metadata, name.beginToken);
-    var typeParameter = ast.typeParameter(comment, metadata, name, null, null);
-    localDeclarations[name.offset] = typeParameter;
-    push(typeParameter);
+    TypeArgumentList arguments = pop();
+    Identifier name = pop();
+    push(ast.typeName(name, arguments, question: questionMark));
   }
 
   @override
@@ -2610,201 +3016,45 @@
     push(popTypedList(count, new List<TypeParameter>(count)));
   }
 
-  @override
-  void endTypeVariable(Token token, int index, Token extendsOrSuper) {
-    debugEvent("TypeVariable");
-    assert(extendsOrSuper == null ||
-        optional('extends', extendsOrSuper) ||
-        optional('super', extendsOrSuper));
-    TypeAnnotation bound = pop();
+  void handleUnaryPostfixAssignmentExpression(Token operator) {
+    assert(operator.type.isUnaryPostfixOperator);
+    debugEvent("UnaryPostfixAssignmentExpression");
 
-    // Peek to leave type parameters on top of stack.
-    List<TypeParameter> typeParameters = peek();
-    typeParameters[index]
-      ..extendsKeyword = extendsOrSuper
-      ..bound = bound;
+    Expression expression = pop();
+    if (!expression.isAssignable) {
+      // This error is also reported by the body builder.
+      handleRecoverableError(
+          messageIllegalAssignmentToNonAssignable, operator, operator);
+    }
+    push(ast.postfixExpression(expression, operator));
   }
 
-  @override
-  void endTypeVariables(Token beginToken, Token endToken) {
-    assert(optional('<', beginToken));
-    assert(optional('>', endToken));
-    debugEvent("TypeVariables");
+  void handleUnaryPrefixAssignmentExpression(Token operator) {
+    assert(operator.type.isUnaryPrefixOperator);
+    debugEvent("UnaryPrefixAssignmentExpression");
 
-    List<TypeParameter> typeParameters = pop();
-    push(ast.typeParameterList(beginToken, typeParameters, endToken));
+    Expression expression = pop();
+    if (!expression.isAssignable) {
+      // This error is also reported by the body builder.
+      handleRecoverableError(messageMissingAssignableSelector,
+          expression.endToken, expression.endToken);
+    }
+    push(ast.prefixExpression(operator, expression));
   }
 
-  @override
-  void beginMethod(Token externalToken, Token staticToken, Token covariantToken,
-      Token varFinalOrConst, Token getOrSet, Token name) {
-    _Modifiers modifiers = new _Modifiers();
-    if (externalToken != null) {
-      assert(externalToken.isModifier);
-      modifiers.externalKeyword = externalToken;
-    }
-    if (staticToken != null) {
-      assert(staticToken.isModifier);
-      String className = classDeclaration != null
-          ? classDeclaration.name.name
-          : mixinDeclaration.name.name;
-      if (name?.lexeme == className && getOrSet == null) {
-        // This error is also reported in OutlineBuilder.beginMethod
-        handleRecoverableError(
-            messageStaticConstructor, staticToken, staticToken);
-      } else {
-        modifiers.staticKeyword = staticToken;
-      }
-    }
-    if (covariantToken != null) {
-      assert(covariantToken.isModifier);
-      modifiers.covariantKeyword = covariantToken;
-    }
-    if (varFinalOrConst != null) {
-      assert(varFinalOrConst.isModifier);
-      modifiers.finalConstOrVarKeyword = varFinalOrConst;
-    }
-    push(modifiers);
+  void handleUnaryPrefixExpression(Token operator) {
+    assert(operator.type.isUnaryPrefixOperator);
+    debugEvent("UnaryPrefixExpression");
+
+    push(ast.prefixExpression(operator, pop()));
   }
 
-  @override
-  void endMethod(
-      Token getOrSet, Token beginToken, Token beginParam, Token endToken) {
-    assert(getOrSet == null ||
-        optional('get', getOrSet) ||
-        optional('set', getOrSet));
-    debugEvent("Method");
+  void handleValuedFormalParameter(Token equals, Token token) {
+    assert(optional('=', equals) || optional(':', equals));
+    debugEvent("ValuedFormalParameter");
 
-    var bodyObject = pop();
-    List<ConstructorInitializer> initializers = pop() ?? const [];
-    Token separator = pop();
-    FormalParameterList parameters = pop();
-    TypeParameterList typeParameters = pop();
-    var name = pop();
-    TypeAnnotation returnType = pop();
-    _Modifiers modifiers = pop();
-    List<Annotation> metadata = pop();
-    Comment comment = _findComment(metadata, beginToken);
-
-    assert(parameters != null || optional('get', getOrSet));
-
-    ConstructorName redirectedConstructor;
-    FunctionBody body;
-    if (bodyObject is FunctionBody) {
-      body = bodyObject;
-    } else if (bodyObject is _RedirectingFactoryBody) {
-      separator = bodyObject.equalToken;
-      redirectedConstructor = bodyObject.constructorName;
-      body = ast.emptyFunctionBody(endToken);
-    } else {
-      unhandled("${bodyObject.runtimeType}", "bodyObject",
-          beginToken.charOffset, uri);
-    }
-
-    ClassOrMixinDeclarationImpl declaration =
-        classDeclaration ?? mixinDeclaration;
-
-    void constructor(
-        SimpleIdentifier prefixOrName, Token period, SimpleIdentifier name) {
-      if (typeParameters != null) {
-        // Outline builder also reports this error message.
-        handleRecoverableError(messageConstructorWithTypeParameters,
-            typeParameters.beginToken, typeParameters.endToken);
-      }
-      if (modifiers?.constKeyword != null &&
-          body != null &&
-          (body.length > 1 || body.beginToken?.lexeme != ';')) {
-        // This error is also reported in BodyBuilder.finishFunction
-        Token bodyToken = body.beginToken ?? modifiers.constKeyword;
-        handleRecoverableError(
-            messageConstConstructorWithBody, bodyToken, bodyToken);
-      }
-      if (returnType != null) {
-        // This error is also reported in OutlineBuilder.endMethod
-        handleRecoverableError(messageConstructorWithReturnType,
-            returnType.beginToken, returnType.beginToken);
-      }
-      ConstructorDeclaration constructor = ast.constructorDeclaration(
-          comment,
-          metadata,
-          modifiers?.externalKeyword,
-          modifiers?.finalConstOrVarKeyword,
-          null, // TODO(paulberry): factoryKeyword
-          ast.simpleIdentifier(prefixOrName.token),
-          period,
-          name,
-          parameters,
-          separator,
-          initializers,
-          redirectedConstructor,
-          body);
-      declaration.members.add(constructor);
-      if (mixinDeclaration != null) {
-        // TODO (danrubel): Report an error if this is a mixin declaration.
-      }
-    }
-
-    void method(Token operatorKeyword, SimpleIdentifier name) {
-      if (modifiers?.constKeyword != null &&
-          body != null &&
-          (body.length > 1 || body.beginToken?.lexeme != ';')) {
-        // This error is also reported in OutlineBuilder.endMethod
-        handleRecoverableError(
-            messageConstMethod, modifiers.constKeyword, modifiers.constKeyword);
-      }
-      checkFieldFormalParameters(parameters);
-      declaration.members.add(ast.methodDeclaration(
-          comment,
-          metadata,
-          modifiers?.externalKeyword,
-          modifiers?.abstractKeyword ?? modifiers?.staticKeyword,
-          returnType,
-          getOrSet,
-          operatorKeyword,
-          name,
-          typeParameters,
-          parameters,
-          body));
-    }
-
-    if (name is SimpleIdentifier) {
-      if (name.name == declaration.name.name && getOrSet == null) {
-        constructor(name, null, null);
-      } else if (initializers.isNotEmpty) {
-        constructor(name, null, null);
-      } else {
-        method(null, name);
-      }
-    } else if (name is _OperatorName) {
-      method(name.operatorKeyword, name.name);
-    } else if (name is PrefixedIdentifier) {
-      constructor(name.prefix, name.period, name.identifier);
-    } else {
-      throw new UnimplementedError();
-    }
-  }
-
-  void checkFieldFormalParameters(FormalParameterList parameters) {
-    if (parameters?.parameters != null) {
-      parameters.parameters.forEach((FormalParameter param) {
-        if (param is FieldFormalParameter) {
-          // This error is reported in the BodyBuilder.endFormalParameter.
-          handleRecoverableError(messageFieldInitializerOutsideConstructor,
-              param.thisKeyword, param.thisKeyword);
-        }
-      });
-    }
-  }
-
-  @override
-  void handleInvalidMember(Token endToken) {
-    debugEvent("InvalidMember");
-    pop(); // metadata star
-  }
-
-  @override
-  void endMember() {
-    debugEvent("Member");
+    Expression value = pop();
+    push(new _ParameterDefaultValue(equals, value));
   }
 
   @override
@@ -2819,191 +3069,128 @@
     handleType(voidKeyword, null);
   }
 
-  @override
-  void endFunctionTypeAlias(
-      Token typedefKeyword, Token equals, Token semicolon) {
-    assert(optional('typedef', typedefKeyword));
-    assert(optionalOrNull('=', equals));
-    assert(optional(';', semicolon));
-    debugEvent("FunctionTypeAlias");
+  /// Return `true` if [token] is either `null` or is the symbol or keyword
+  /// [value].
+  bool optionalOrNull(String value, Token token) {
+    return token == null || identical(value, token.stringValue);
+  }
 
-    if (equals == null) {
-      FormalParameterList parameters = pop();
-      TypeParameterList typeParameters = pop();
-      SimpleIdentifier name = pop();
-      TypeAnnotation returnType = pop();
-      List<Annotation> metadata = pop();
-      Comment comment = _findComment(metadata, typedefKeyword);
-      declarations.add(ast.functionTypeAlias(comment, metadata, typedefKeyword,
-          returnType, name, typeParameters, parameters, semicolon));
-    } else {
-      TypeAnnotation type = pop();
-      TypeParameterList templateParameters = pop();
-      SimpleIdentifier name = pop();
-      List<Annotation> metadata = pop();
-      Comment comment = _findComment(metadata, typedefKeyword);
-      if (type is! GenericFunctionType) {
-        // This error is also reported in the OutlineBuilder.
-        handleRecoverableError(messageTypedefNotFunction, equals, equals);
-        type = null;
+  List<CommentReference> parseCommentReferences(Token dartdoc) {
+    // Parse dartdoc into potential comment reference source/offset pairs
+    int count = parser.parseCommentReferences(dartdoc);
+    List sourcesAndOffsets = new List(count * 2);
+    popList(count * 2, sourcesAndOffsets);
+
+    // Parse each of the source/offset pairs into actual comment references
+    count = 0;
+    int index = 0;
+    while (index < sourcesAndOffsets.length) {
+      String referenceSource = sourcesAndOffsets[index++];
+      int referenceOffset = sourcesAndOffsets[index++];
+      ScannerResult result = scanString(referenceSource);
+      if (!result.hasErrors) {
+        Token token = result.tokens;
+        if (parser.parseOneCommentReference(token, referenceOffset)) {
+          ++count;
+        }
       }
-      declarations.add(ast.genericTypeAlias(
-          comment,
-          metadata,
-          typedefKeyword,
-          name,
-          templateParameters,
-          equals,
-          type as GenericFunctionType,
-          semicolon));
     }
+
+    final references = new List<CommentReference>(count);
+    popTypedList(count, references);
+    return references;
   }
 
-  @override
-  void endEnum(Token enumKeyword, Token leftBrace, int count) {
-    assert(optional('enum', enumKeyword));
-    assert(optional('{', leftBrace));
-    debugEvent("Enum");
-
-    List<EnumConstantDeclaration> constants = popTypedList(count);
-    SimpleIdentifier name = pop();
-    List<Annotation> metadata = pop();
-    Comment comment = _findComment(metadata, enumKeyword);
-    declarations.add(ast.enumDeclaration(comment, metadata, enumKeyword, name,
-        leftBrace, constants, leftBrace?.endGroup));
+  List<CollectionElement> popCollectionElements(int count) {
+    final elements = new List<CollectionElement>()..length = count;
+    for (int index = count - 1; index >= 0; --index) {
+      var element = pop();
+      elements[index] = element as CollectionElement;
+    }
+    return elements;
   }
 
-  @override
-  void endTypeArguments(int count, Token leftBracket, Token rightBracket) {
-    assert(optional('<', leftBracket));
-    assert(optional('>', rightBracket));
-    debugEvent("TypeArguments");
-
-    List<TypeAnnotation> arguments = popTypedList(count);
-    push(ast.typeArgumentList(leftBracket, arguments, rightBracket));
+  List popList(int n, List list) {
+    if (n == 0) return null;
+    return stack.popList(n, list, null);
   }
 
-  @override
-  void handleInvalidTypeArguments(Token token) {
-    TypeArgumentList invalidTypeArgs = pop();
-    var node = pop();
-    if (node is ConstructorName) {
-      push(new _ConstructorNameWithInvalidTypeArgs(node, invalidTypeArgs));
+  List<T> popTypedList<T>(int count, [List<T> list]) {
+    if (count == 0) return null;
+    assert(stack.arrayLength >= count);
+
+    final table = stack.array;
+    final length = stack.arrayLength;
+
+    final tailList = list ?? new List<T>.filled(count, null, growable: true);
+    final startIndex = length - count;
+    for (int i = 0; i < count; i++) {
+      final value = table[startIndex + i];
+      tailList[i] = value is NullValue ? null : value;
+      table[startIndex + i] = null;
+    }
+    stack.arrayLength -= count;
+
+    return tailList;
+  }
+
+  void pushForControlFlowInfo(Token awaitToken, Token forToken,
+      Token leftParenthesis, ForLoopParts forLoopParts, Object entry) {
+    if (entry == _invalidCollectionElement) {
+      push(_invalidCollectionElement);
+    } else if (enableControlFlowCollections) {
+      push(ast.forElement(
+        awaitKeyword: awaitToken,
+        forKeyword: forToken,
+        leftParenthesis: leftParenthesis,
+        forLoopParts: forLoopParts,
+        rightParenthesis: leftParenthesis.endGroup,
+        body: entry as CollectionElement,
+      ));
     } else {
-      throw new UnimplementedError();
+      handleRecoverableError(
+          templateExperimentNotEnabled
+              .withArguments(EnableString.control_flow_collections),
+          forToken,
+          forToken);
+      push(_invalidCollectionElement);
     }
   }
 
-  @override
-  void endFields(Token staticToken, Token covariantToken, Token varFinalOrConst,
-      int count, Token beginToken, Token semicolon) {
-    assert(optional(';', semicolon));
-    debugEvent("Fields");
-
-    List<VariableDeclaration> variables = popTypedList(count);
-    TypeAnnotation type = pop();
-    _Modifiers modifiers = new _Modifiers()
-      ..staticKeyword = staticToken
-      ..covariantKeyword = covariantToken
-      ..finalConstOrVarKeyword = varFinalOrConst;
-    var variableList = ast.variableDeclarationList(
-        null, null, modifiers?.finalConstOrVarKeyword, type, variables);
-    Token covariantKeyword = modifiers?.covariantKeyword;
-    List<Annotation> metadata = pop();
-    Comment comment = _findComment(metadata, beginToken);
-    (classDeclaration ?? mixinDeclaration).members.add(ast.fieldDeclaration2(
-        comment: comment,
-        metadata: metadata,
-        covariantKeyword: covariantKeyword,
-        staticKeyword: modifiers?.staticKeyword,
-        fieldList: variableList,
-        semicolon: semicolon));
-  }
-
-  @override
-  AstNode finishFields() {
-    debugEvent("finishFields");
-
-    if (classDeclaration != null) {
-      return classDeclaration.members
-          .removeAt(classDeclaration.members.length - 1);
-    } else if (mixinDeclaration != null) {
-      return mixinDeclaration.members
-          .removeAt(mixinDeclaration.members.length - 1);
+  void pushIfControlFlowInfo(
+      Token ifToken,
+      ParenthesizedExpression condition,
+      CollectionElement thenElement,
+      Token elseToken,
+      CollectionElement elseElement) {
+    if (thenElement == _invalidCollectionElement ||
+        elseElement == _invalidCollectionElement) {
+      push(_invalidCollectionElement);
+    } else if (enableControlFlowCollections) {
+      push(ast.ifElement(
+        ifKeyword: ifToken,
+        leftParenthesis: condition.leftParenthesis,
+        condition: condition.expression,
+        rightParenthesis: condition.rightParenthesis,
+        thenElement: thenElement,
+        elseKeyword: elseToken,
+        elseElement: elseElement,
+      ));
     } else {
-      return declarations.removeLast();
+      handleRecoverableError(
+          templateExperimentNotEnabled
+              .withArguments(EnableString.control_flow_collections),
+          ifToken,
+          ifToken);
+      push(_invalidCollectionElement);
     }
   }
 
-  @override
-  void handleOperatorName(Token operatorKeyword, Token token) {
-    assert(optional('operator', operatorKeyword));
-    assert(token.type.isUserDefinableOperator);
-    debugEvent("OperatorName");
-
-    push(new _OperatorName(
-        operatorKeyword, ast.simpleIdentifier(token, isDeclaration: true)));
-  }
-
-  @override
-  void handleInvalidOperatorName(Token operatorKeyword, Token token) {
-    assert(optional('operator', operatorKeyword));
-    debugEvent("InvalidOperatorName");
-
-    push(new _OperatorName(
-        operatorKeyword, ast.simpleIdentifier(token, isDeclaration: true)));
-  }
-
-  @override
-  void beginMetadataStar(Token token) {
-    debugEvent("beginMetadataStar");
-  }
-
-  @override
-  void endMetadata(Token atSign, Token periodBeforeName, Token endToken) {
-    assert(optional('@', atSign));
-    assert(optionalOrNull('.', periodBeforeName));
-    debugEvent("Metadata");
-
-    MethodInvocation invocation = pop();
-    SimpleIdentifier constructorName = periodBeforeName != null ? pop() : null;
-    pop(); // Type arguments, not allowed.
-    Identifier name = pop();
-    push(ast.annotation(atSign, name, periodBeforeName, constructorName,
-        invocation?.argumentList));
-  }
-
-  @override
-  void endMetadataStar(int count) {
-    debugEvent("MetadataStar");
-
-    push(popTypedList<Annotation>(count) ?? NullValue.Metadata);
-  }
-
-  @override
-  void handleCommentReferenceText(String referenceSource, int referenceOffset) {
-    push(referenceSource);
-    push(referenceOffset);
-  }
-
-  @override
-  void handleCommentReference(
-      Token newKeyword, Token prefix, Token period, Token token) {
-    Identifier identifier = ast.simpleIdentifier(token);
-    if (prefix != null) {
-      identifier = ast.prefixedIdentifier(
-          ast.simpleIdentifier(prefix), period, identifier);
-    }
-    push(ast.commentReference(newKeyword, identifier));
-  }
-
-  ParameterKind _toAnalyzerParameterKind(FormalParameterKind type) {
-    if (type == FormalParameterKind.optionalPositional) {
-      return ParameterKind.POSITIONAL;
-    } else if (type == FormalParameterKind.optionalNamed) {
-      return ParameterKind.NAMED;
-    } else {
-      return ParameterKind.REQUIRED;
+  void reportErrorIfSuper(Expression expression) {
+    if (expression is SuperExpression) {
+      // This error is also reported by the body builder.
+      handleRecoverableError(messageMissingAssignableSelector,
+          expression.beginToken, expression.endToken);
     }
   }
 
@@ -3042,164 +3229,58 @@
     return ast.documentationComment(tokens, references);
   }
 
-  List<CommentReference> parseCommentReferences(Token dartdoc) {
-    // Parse dartdoc into potential comment reference source/offset pairs
-    int count = parser.parseCommentReferences(dartdoc);
-    List sourcesAndOffsets = new List(count * 2);
-    popList(count * 2, sourcesAndOffsets);
-
-    // Parse each of the source/offset pairs into actual comment references
-    count = 0;
-    int index = 0;
-    while (index < sourcesAndOffsets.length) {
-      String referenceSource = sourcesAndOffsets[index++];
-      int referenceOffset = sourcesAndOffsets[index++];
-      ScannerResult result = scanString(referenceSource);
-      if (!result.hasErrors) {
-        Token token = result.tokens;
-        if (parser.parseOneCommentReference(token, referenceOffset)) {
-          ++count;
-        }
-      }
+  void _handleInstanceCreation(Token token) {
+    MethodInvocation arguments = pop();
+    ConstructorName constructorName;
+    TypeArgumentList typeArguments;
+    var object = pop();
+    if (object is _ConstructorNameWithInvalidTypeArgs) {
+      constructorName = object.name;
+      typeArguments = object.invalidTypeArgs;
+    } else {
+      constructorName = object;
     }
-
-    final references = new List<CommentReference>(count);
-    popTypedList(count, references);
-    return references;
+    push(ast.instanceCreationExpression(
+        token, constructorName, arguments.argumentList,
+        typeArguments: typeArguments));
   }
 
-  @override
-  void debugEvent(String name) {
-    // printEvent('AstBuilder: $name');
+  VariableDeclaration _makeVariableDeclaration(
+      SimpleIdentifier name, Token equals, Expression initializer) {
+    var variableDeclaration =
+        ast.variableDeclaration(name, equals, initializer);
+    localDeclarations[name.offset] = variableDeclaration;
+    return variableDeclaration;
   }
 
-  @override
-  void discardTypeReplacedWithCommentTypeAssign() {
-    pop();
-  }
-
-  @override
-  void addProblem(Message message, int charOffset, int length,
-      {bool wasHandled: false, List<LocatedMessage> context}) {
-    if (directives.isEmpty &&
-        (message.code.analyzerCodes
-                ?.contains('NON_PART_OF_DIRECTIVE_IN_PART') ??
-            false)) {
-      message = messageDirectiveAfterDeclaration;
+  ParameterKind _toAnalyzerParameterKind(FormalParameterKind type) {
+    if (type == FormalParameterKind.optionalPositional) {
+      return ParameterKind.POSITIONAL;
+    } else if (type == FormalParameterKind.optionalNamed) {
+      return ParameterKind.NAMED;
+    } else {
+      return ParameterKind.REQUIRED;
     }
-    errorReporter.reportMessage(message, charOffset, length);
-  }
-
-  /// Return `true` if [token] is either `null` or is the symbol or keyword
-  /// [value].
-  bool optionalOrNull(String value, Token token) {
-    return token == null || identical(value, token.stringValue);
-  }
-
-  List<T> popTypedList<T>(int count, [List<T> list]) {
-    if (count == 0) return null;
-    assert(stack.arrayLength >= count);
-
-    final table = stack.array;
-    final length = stack.arrayLength;
-
-    final tailList = list ?? new List<T>.filled(count, null, growable: true);
-    final startIndex = length - count;
-    for (int i = 0; i < count; i++) {
-      final value = table[startIndex + i];
-      tailList[i] = value is NullValue ? null : value;
-      table[startIndex + i] = null;
-    }
-    stack.arrayLength -= count;
-
-    return tailList;
-  }
-
-  @override
-  void exitLocalScope() {}
-
-  @override
-  void endDoWhileStatementBody(Token token) {
-    debugEvent("endDoWhileStatementBody");
-  }
-
-  @override
-  void endForStatementBody(Token token) {
-    debugEvent("endForStatementBody");
-  }
-
-  @override
-  void endForInBody(Token token) {
-    debugEvent("endForInBody");
-  }
-
-  @override
-  void endThenStatement(Token token) {
-    debugEvent("endThenStatement");
-  }
-
-  @override
-  void endWhileStatementBody(Token token) {
-    debugEvent("endWhileStatementBody");
-  }
-
-  @override
-  void endElseStatement(Token token) {
-    debugEvent("endElseStatement");
-  }
-
-  List<CollectionElement> popCollectionElements(int count) {
-    final elements = new List<CollectionElement>()..length = count;
-    for (int index = count - 1; index >= 0; --index) {
-      var element = pop();
-      elements[index] = element as CollectionElement;
-    }
-    return elements;
-  }
-
-  List popList(int n, List list) {
-    if (n == 0) return null;
-    return stack.popList(n, list, null);
   }
 }
 
-/// Data structure placed on the stack to represent the default parameter
-/// value with the separator token.
-class _ParameterDefaultValue {
-  final Token separator;
-  final Expression value;
+class _ConstructorNameWithInvalidTypeArgs {
+  final ConstructorName name;
+  final TypeArgumentList invalidTypeArgs;
 
-  _ParameterDefaultValue(this.separator, this.value);
+  _ConstructorNameWithInvalidTypeArgs(this.name, this.invalidTypeArgs);
 }
 
-/// Data structure placed on stack to represent the redirected constructor.
-class _RedirectingFactoryBody {
-  final Token asyncKeyword;
-  final Token starKeyword;
-  final Token equalToken;
-  final ConstructorName constructorName;
+/// When [enableSpreadCollections] and/or [enableControlFlowCollections]
+/// are false, this class is pushed on the stack when a disabled
+/// [CollectionElement] has been parsed.
+class _InvalidCollectionElement implements CollectionElement {
+  // TODO(danrubel): Remove this once control flow and spread collections
+  // have been enabled by default.
 
-  _RedirectingFactoryBody(this.asyncKeyword, this.starKeyword, this.equalToken,
-      this.constructorName);
-}
+  const _InvalidCollectionElement._();
 
-/// Data structure placed on the stack as a container for optional parameters.
-class _OptionalFormalParameters {
-  final List<FormalParameter> parameters;
-  final Token leftDelimiter;
-  final Token rightDelimiter;
-
-  _OptionalFormalParameters(
-      this.parameters, this.leftDelimiter, this.rightDelimiter);
-}
-
-/// Data structure placed on the stack to represent the keyword "operator"
-/// followed by a token.
-class _OperatorName {
-  final Token operatorKeyword;
-  final SimpleIdentifier name;
-
-  _OperatorName(this.operatorKeyword, this.name);
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
 }
 
 /// Data structure placed on the stack to represent a non-empty sequence
@@ -3268,9 +3349,41 @@
   }
 }
 
-class _ConstructorNameWithInvalidTypeArgs {
-  final ConstructorName name;
-  final TypeArgumentList invalidTypeArgs;
+/// Data structure placed on the stack to represent the keyword "operator"
+/// followed by a token.
+class _OperatorName {
+  final Token operatorKeyword;
+  final SimpleIdentifier name;
 
-  _ConstructorNameWithInvalidTypeArgs(this.name, this.invalidTypeArgs);
+  _OperatorName(this.operatorKeyword, this.name);
+}
+
+/// Data structure placed on the stack as a container for optional parameters.
+class _OptionalFormalParameters {
+  final List<FormalParameter> parameters;
+  final Token leftDelimiter;
+  final Token rightDelimiter;
+
+  _OptionalFormalParameters(
+      this.parameters, this.leftDelimiter, this.rightDelimiter);
+}
+
+/// Data structure placed on the stack to represent the default parameter
+/// value with the separator token.
+class _ParameterDefaultValue {
+  final Token separator;
+  final Expression value;
+
+  _ParameterDefaultValue(this.separator, this.value);
+}
+
+/// Data structure placed on stack to represent the redirected constructor.
+class _RedirectingFactoryBody {
+  final Token asyncKeyword;
+  final Token starKeyword;
+  final Token equalToken;
+  final ConstructorName constructorName;
+
+  _RedirectingFactoryBody(this.asyncKeyword, this.starKeyword, this.equalToken,
+      this.constructorName);
 }
diff --git a/pkg/analyzer/lib/src/fasta/error_converter.dart b/pkg/analyzer/lib/src/fasta/error_converter.dart
index 50f2609..16f6f09 100644
--- a/pkg/analyzer/lib/src/fasta/error_converter.dart
+++ b/pkg/analyzer/lib/src/fasta/error_converter.dart
@@ -40,6 +40,10 @@
         errorReporter?.reportErrorForOffset(
             ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER, offset, length);
         return;
+      case "AWAIT_IN_WRONG_CONTEXT":
+        errorReporter?.reportErrorForOffset(
+            CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT, offset, length);
+        return;
       case "BUILT_IN_IDENTIFIER_AS_TYPE":
         errorReporter?.reportErrorForOffset(
             CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE,
diff --git a/pkg/analyzer/lib/src/fasta/mock_type.dart b/pkg/analyzer/lib/src/fasta/mock_type.dart
deleted file mode 100644
index b8b357d..0000000
--- a/pkg/analyzer/lib/src/fasta/mock_type.dart
+++ /dev/null
@@ -1,178 +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/element/element.dart';
-
-import 'package:analyzer/dart/element/type.dart';
-
-import 'package:analyzer/src/generated/type_system.dart' show TypeSystem;
-
-import 'package:front_end/src/fasta/problems.dart' show unsupported;
-
-abstract class MockType extends DartType {
-  String get displayName => unsupported("displayName", -1, null);
-
-  Element get element => unsupported("element", -1, null);
-
-  bool get isBottom => unsupported("isBottom", -1, null);
-
-  bool get isDartAsyncFuture => unsupported("isDartAsyncFuture", -1, null);
-
-  bool get isDartAsyncFutureOr => unsupported("isDartAsyncFutureOr", -1, null);
-
-  bool get isDartCoreFunction => unsupported("isDartCoreFunction", -1, null);
-
-  bool get isDynamic => unsupported("isDynamic", -1, null);
-
-  bool get isObject => unsupported("isObject", -1, null);
-
-  bool get isUndefined => unsupported("isUndefined", -1, null);
-
-  bool get isVoid => unsupported("isVoid", -1, null);
-
-  String get name => unsupported("name", -1, null);
-
-  DartType flattenFutures(TypeSystem typeSystem) {
-    return unsupported("flattenFutures", -1, null);
-  }
-
-  bool isAssignableTo(DartType type) => unsupported("isAssignableTo", -1, null);
-
-  bool isMoreSpecificThan(DartType type) =>
-      unsupported("isMoreSpecificThan", -1, null);
-
-  bool isSubtypeOf(DartType type) => unsupported("isSubtypeOf", -1, null);
-
-  bool isSupertypeOf(DartType type) => unsupported("isSupertypeOf", -1, null);
-
-  DartType resolveToBound(DartType objectType) {
-    return unsupported("resolveToBound", -1, null);
-  }
-
-  DartType substitute2(
-      List<DartType> argumentTypes, List<DartType> parameterTypes) {
-    return unsupported("substitute2", -1, null);
-  }
-
-  List<DartType> get typeArguments {
-    return unsupported("typeArguments", -1, null);
-  }
-
-  List<TypeParameterElement> get typeParameters {
-    return unsupported("typeParameters", -1, null);
-  }
-
-  ParameterizedType instantiate(List<DartType> argumentTypes) {
-    return unsupported("instantiate", -1, null);
-  }
-}
-
-abstract class MockInterfaceType extends MockType implements InterfaceType {
-  ClassElement get element => unsupported("element", -1, null);
-
-  List<PropertyAccessorElement> get accessors {
-    return unsupported("accessors", -1, null);
-  }
-
-  List<ConstructorElement> get constructors {
-    return unsupported("constructors", -1, null);
-  }
-
-  List<InterfaceType> get interfaces {
-    return unsupported("interfaces", -1, null);
-  }
-
-  List<MethodElement> get methods {
-    return unsupported("methods", -1, null);
-  }
-
-  List<InterfaceType> get mixins {
-    return unsupported("mixins", -1, null);
-  }
-
-  InterfaceType get superclass => unsupported("superclass", -1, null);
-
-  PropertyAccessorElement getGetter(String name) {
-    return unsupported(" PropertyAccessorElement getGetter", -1, null);
-  }
-
-  MethodElement getMethod(String name) {
-    return unsupported("getMethod", -1, null);
-  }
-
-  PropertyAccessorElement getSetter(String name) {
-    return unsupported(" PropertyAccessorElement getSetter", -1, null);
-  }
-
-  bool isDirectSupertypeOf(InterfaceType type) {
-    return unsupported("isDirectSupertypeOf", -1, null);
-  }
-
-  ConstructorElement lookUpConstructor(String name, LibraryElement library) {
-    return unsupported(" ConstructorElement lookUpConstructor", -1, null);
-  }
-
-  PropertyAccessorElement lookUpGetter(String name, LibraryElement library) {
-    return unsupported(" PropertyAccessorElement lookUpGetter", -1, null);
-  }
-
-  PropertyAccessorElement lookUpGetterInSuperclass(
-      String name, LibraryElement library) {
-    return unsupported("lookUpGetterInSuperclass", -1, null);
-  }
-
-  PropertyAccessorElement lookUpInheritedGetter(String name,
-      {LibraryElement library, bool thisType: true}) {
-    return unsupported(
-        " PropertyAccessorElement lookUpInheritedGetter", -1, null);
-  }
-
-  ExecutableElement lookUpInheritedGetterOrMethod(String name,
-      {LibraryElement library}) {
-    return unsupported("lookUpInheritedGetterOrMethod", -1, null);
-  }
-
-  MethodElement lookUpInheritedMethod(String name,
-      {LibraryElement library, bool thisType: true}) {
-    return unsupported(" MethodElement lookUpInheritedMethod", -1, null);
-  }
-
-  PropertyAccessorElement lookUpInheritedSetter(String name,
-      {LibraryElement library, bool thisType: true}) {
-    return unsupported(
-        " PropertyAccessorElement lookUpInheritedSetter", -1, null);
-  }
-
-  MethodElement lookUpMethod(String name, LibraryElement library) {
-    return unsupported("lookUpMethod", -1, null);
-  }
-
-  MethodElement lookUpMethodInSuperclass(String name, LibraryElement library) {
-    return unsupported(" MethodElement lookUpMethodInSuperclass", -1, null);
-  }
-
-  PropertyAccessorElement lookUpSetter(String name, LibraryElement library) {
-    return unsupported(" PropertyAccessorElement lookUpSetter", -1, null);
-  }
-
-  PropertyAccessorElement lookUpSetterInSuperclass(
-      String name, LibraryElement library) {
-    return unsupported("lookUpSetterInSuperclass", -1, null);
-  }
-
-  InterfaceType instantiate(List<DartType> argumentTypes) {
-    return unsupported("instantiate", -1, null);
-  }
-
-  InterfaceType substitute2(
-      List<DartType> argumentTypes, List<DartType> parameterTypes) {
-    return unsupported("substitute2", -1, null);
-  }
-
-  InterfaceType substitute4(List<DartType> argumentTypes) {
-    return unsupported("substitute4", -1, null);
-  }
-
-  get isDartCoreNull => unsupported("isDartCoreNull", -1, null);
-}
diff --git a/pkg/analyzer/lib/src/fasta/token_utils.dart b/pkg/analyzer/lib/src/fasta/token_utils.dart
index 2037396..c5ad5c2 100644
--- a/pkg/analyzer/lib/src/fasta/token_utils.dart
+++ b/pkg/analyzer/lib/src/fasta/token_utils.dart
@@ -4,45 +4,6 @@
 
 import 'package:front_end/src/scanner/token.dart' show CommentToken, Token;
 
-import 'package:front_end/src/fasta/scanner/token_constants.dart';
-
-import 'package:front_end/src/scanner/errors.dart' show translateErrorToken;
-
-import 'package:front_end/src/scanner/errors.dart' as analyzer
-    show ScannerErrorCode;
-
-/// Class capable of converting a stream of Fasta tokens to a stream of analyzer
-/// tokens.
-///
-/// This is a class rather than an ordinary method so that it can be subclassed
-/// in tests.
-class ToAnalyzerTokenStreamConverter {
-  /// Converts a stream of Fasta tokens (starting with [token] and continuing to
-  /// EOF) to a stream of analyzer tokens. This modifies the fasta token stream
-  /// to be an analyzer token stream by removing error tokens and reporting
-  /// those errors to the associated error listener.
-  Token convertTokens(Token firstToken) {
-    Token token = new Token.eof(-1)..setNext(firstToken);
-    Token next = firstToken;
-    while (!next.isEof) {
-      if (next.type.kind == BAD_INPUT_TOKEN) {
-        translateErrorToken(next, reportError);
-        token.setNext(next.next);
-      } else {
-        token = next;
-      }
-      next = token.next;
-    }
-    return firstToken;
-  }
-
-  /// Handles an error found during [convertTokens].
-  ///
-  /// Intended to be overridden by derived classes; by default, does nothing.
-  void reportError(analyzer.ScannerErrorCode errorCode, int offset,
-      List<Object> arguments) {}
-}
-
 /// Search for the token before [target] starting the search with [start].
 /// Return `null` if [target] is a comment token
 /// or the previous token cannot be found.
diff --git a/pkg/analyzer/lib/src/file_system/file_system.dart b/pkg/analyzer/lib/src/file_system/file_system.dart
index 183b8d1..28bd8b2 100644
--- a/pkg/analyzer/lib/src/file_system/file_system.dart
+++ b/pkg/analyzer/lib/src/file_system/file_system.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/generated/ast.dart b/pkg/analyzer/lib/src/generated/ast.dart
index 3b0eba2..a1900ab 100644
--- a/pkg/analyzer/lib/src/generated/ast.dart
+++ b/pkg/analyzer/lib/src/generated/ast.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/generated/constant.dart b/pkg/analyzer/lib/src/generated/constant.dart
index b4a0bda..ea8336f 100644
--- a/pkg/analyzer/lib/src/generated/constant.dart
+++ b/pkg/analyzer/lib/src/generated/constant.dart
@@ -4,6 +4,7 @@
 
 import 'package:analyzer/dart/analysis/declared_variables.dart';
 import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/error/error.dart';
 import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/src/dart/constant/evaluation.dart';
 import 'package:analyzer/src/dart/constant/value.dart';
@@ -128,9 +129,15 @@
         new ConstantEvaluationEngine(_typeProvider, new DeclaredVariables(),
             typeSystem: _typeSystem),
         errorReporter));
+    List<AnalysisError> errors = errorListener.errors;
+    if (errors.isNotEmpty) {
+      return EvaluationResult.forErrors(errors);
+    }
     if (result != null) {
       return EvaluationResult.forValue(result);
     }
-    return EvaluationResult.forErrors(errorListener.errors);
+    // We should not get here. Either there should be a valid value or there
+    // should be an error explaining why a value could not be generated.
+    return EvaluationResult.forErrors(errors);
   }
 }
diff --git a/pkg/analyzer/lib/src/generated/element.dart b/pkg/analyzer/lib/src/generated/element.dart
index 5518d7c..da03617 100644
--- a/pkg/analyzer/lib/src/generated/element.dart
+++ b/pkg/analyzer/lib/src/generated/element.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/generated/element_handle.dart b/pkg/analyzer/lib/src/generated/element_handle.dart
index 115c44d..4c798bd 100644
--- a/pkg/analyzer/lib/src/generated/element_handle.dart
+++ b/pkg/analyzer/lib/src/generated/element_handle.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/generated/element_resolver.dart b/pkg/analyzer/lib/src/generated/element_resolver.dart
index b86cd55..27097db 100644
--- a/pkg/analyzer/lib/src/generated/element_resolver.dart
+++ b/pkg/analyzer/lib/src/generated/element_resolver.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/precedence.dart';
 import 'package:analyzer/dart/ast/syntactic_entity.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/ast/visitor.dart';
@@ -414,6 +415,12 @@
   }
 
   @override
+  void visitGenericTypeAlias(GenericTypeAlias node) {
+    resolveMetadata(node);
+    return null;
+  }
+
+  @override
   void visitImportDirective(ImportDirective node) {
     SimpleIdentifier prefixNode = node.prefix;
     if (prefixNode != null) {
@@ -529,6 +536,11 @@
   @override
   void visitPostfixExpression(PostfixExpression node) {
     Expression operand = node.operand;
+    if (node.operator.type == TokenType.BANG) {
+      // Null-assertion operator (`!`).  There's nothing to do, since this is a
+      // built-in operation (there's no associated operator declaration).
+      return;
+    }
     String methodName = _getPostfixOperator(node);
     DartType staticType = _getStaticType(operand);
     MethodElement staticMethod = _lookUpMethod(operand, staticType, methodName);
@@ -580,13 +592,6 @@
         return;
       }
       if (element == null) {
-        if (identifier.inSetterContext()) {
-          _resolver.errorReporter.reportErrorForNode(
-              StaticTypeWarningCode.UNDEFINED_SETTER,
-              identifier,
-              [identifier.name, prefixElement.name]);
-          return;
-        }
         AstNode parent = node.parent;
         if (parent is Annotation) {
           _resolver.errorReporter.reportErrorForNode(
@@ -595,7 +600,7 @@
               [identifier.name]);
         } else {
           _resolver.errorReporter.reportErrorForNode(
-              StaticTypeWarningCode.UNDEFINED_GETTER,
+              StaticTypeWarningCode.UNDEFINED_PREFIXED_NAME,
               identifier,
               [identifier.name, prefixElement.name]);
         }
@@ -847,7 +852,7 @@
     // in-lining _resolveArgumentsToFunction below).
     ClassDeclaration declaration =
         node.thisOrAncestorOfType<ClassDeclaration>();
-    Identifier superclassName = declaration.extendsClause?.superclass?.name;
+    Identifier superclassName = declaration?.extendsClause?.superclass?.name;
     if (superclassName != null &&
         _resolver.nameScope.shouldIgnoreUndefined(superclassName)) {
       return;
@@ -953,10 +958,16 @@
   /**
    * Return the name of the method invoked by the given postfix [expression].
    */
-  String _getPostfixOperator(PostfixExpression expression) =>
-      (expression.operator.type == TokenType.PLUS_PLUS)
-          ? TokenType.PLUS.lexeme
-          : TokenType.MINUS.lexeme;
+  String _getPostfixOperator(PostfixExpression expression) {
+    if (expression.operator.type == TokenType.PLUS_PLUS) {
+      return TokenType.PLUS.lexeme;
+    } else if (expression.operator.type == TokenType.MINUS_MINUS) {
+      return TokenType.MINUS.lexeme;
+    } else {
+      throw new UnsupportedError(
+          'Unsupported postfix operator ${expression.operator.lexeme}');
+    }
+  }
 
   /**
    * Return the name of the method invoked by the given postfix [expression].
@@ -1878,7 +1889,7 @@
   int get offset => targetIdentifier.offset;
 
   @override
-  int get precedence => 16;
+  Precedence get precedence => Precedence.primary;
 
   @deprecated
   @override
diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart
index 3b581fa..c37d478 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -25,23 +25,14 @@
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/timestamped_data.dart';
 import 'package:analyzer/src/generated/utilities_general.dart';
-import 'package:analyzer/src/plugin/engine_plugin.dart';
 import 'package:analyzer/src/plugin/resolver_provider.dart';
 import 'package:analyzer/src/services/lint.dart';
 import 'package:analyzer/src/summary/api_signature.dart';
 import 'package:analyzer/src/task/api/dart.dart';
 import 'package:analyzer/src/task/api/model.dart';
-import 'package:analyzer/src/task/dart.dart';
-import 'package:analyzer/src/task/general.dart';
-import 'package:analyzer/src/task/html.dart';
 import 'package:analyzer/src/task/manager.dart';
-import 'package:analyzer/src/task/options.dart';
-import 'package:analyzer/src/task/yaml.dart';
 import 'package:front_end/src/fasta/scanner/token.dart';
-import 'package:html/dom.dart' show Document;
 import 'package:path/path.dart' as pathos;
-import 'package:plugin/manager.dart';
-import 'package:plugin/plugin.dart';
 import 'package:pub_semver/pub_semver.dart';
 
 export 'package:analyzer/error/listener.dart' show RecordingErrorListener;
@@ -552,15 +543,6 @@
   CompilationUnit parseCompilationUnit(Source source);
 
   /**
-   * Parse a single HTML [source] to produce a document model.
-   *
-   * Throws an [AnalysisException] if the analysis could not be performed
-   *
-   * <b>Note:</b> This method cannot be used in an async environment.
-   */
-  Document parseHtmlDocument(Source source);
-
-  /**
    * Perform the next unit of work required to keep the analysis results
    * up-to-date and return information about the consequent changes to the
    * analysis results. This method can be long running.
@@ -751,6 +733,11 @@
   static const String PUBSPEC_YAML_FILE = 'pubspec.yaml';
 
   /**
+   * The file name used for Android manifest files.
+   */
+  static const String ANDROID_MANIFEST_FILE = 'AndroidManifest.xml';
+
+  /**
    * The unique instance of this class.
    */
   static final AnalysisEngine instance = new AnalysisEngine._();
@@ -762,12 +749,6 @@
   Logger _logger = Logger.NULL;
 
   /**
-   * The plugin that defines the extension points and extensions that are
-   * inherently defined by the analysis engine.
-   */
-  final EnginePlugin enginePlugin = new EnginePlugin();
-
-  /**
    * The instrumentation service that is to be used by this analysis engine.
    */
   InstrumentationService _instrumentationService =
@@ -818,20 +799,11 @@
   }
 
   /**
-   * Return the list of plugins that clients are required to process, either by
-   * creating an [ExtensionManager] or by using the method
-   * [processRequiredPlugins].
-   */
-  List<Plugin> get requiredPlugins => <Plugin>[enginePlugin];
-
-  /**
    * Return the task manager used to manage the tasks used to analyze code.
    */
   TaskManager get taskManager {
     if (_taskManager == null) {
       _taskManager = new TaskManager();
-      _initializeTaskMap();
-      _initializeResults();
     }
     return _taskManager;
   }
@@ -858,93 +830,8 @@
    * plugins. This method can only be used by clients that do not need to
    * process any other plugins.
    */
-  void processRequiredPlugins() {
-    if (enginePlugin.workManagerFactoryExtensionPoint == null) {
-      ExtensionManager manager = new ExtensionManager();
-      manager.processPlugins(requiredPlugins);
-    }
-  }
-
-  void _initializeResults() {
-    _taskManager.addGeneralResult(DART_ERRORS);
-  }
-
-  void _initializeTaskMap() {
-    //
-    // Register general tasks.
-    //
-    _taskManager.addTaskDescriptor(GetContentTask.DESCRIPTOR);
-    //
-    // Register Dart tasks.
-    //
-    _taskManager.addTaskDescriptor(BuildCompilationUnitElementTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(BuildDirectiveElementsTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(BuildEnumMemberElementsTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(BuildExportNamespaceTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(BuildLibraryElementTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(BuildPublicNamespaceTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(BuildSourceExportClosureTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(BuildTypeProviderTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(ComputeConstantDependenciesTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(ComputeConstantValueTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(
-        ComputeInferableStaticVariableDependenciesTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(ComputeLibraryCycleTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(ComputeRequiredConstantsTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(ContainingLibrariesTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(DartErrorsTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(EvaluateUnitConstantsTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(GatherUsedImportedElementsTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(GatherUsedLocalElementsTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(GenerateHintsTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(GenerateLintsTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(InferInstanceMembersInUnitTask.DESCRIPTOR);
-    _taskManager
-        .addTaskDescriptor(InferStaticVariableTypesInUnitTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(InferStaticVariableTypeTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(LibraryErrorsReadyTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(LibraryUnitErrorsTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(ParseDartTask.DESCRIPTOR);
-    _taskManager
-        .addTaskDescriptor(PartiallyResolveUnitReferencesTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(ReadyLibraryElement2Task.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(ReadyLibraryElement5Task.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(ReadyLibraryElement7Task.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(ReadyResolvedUnitTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(ResolveConstantExpressionTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(ResolveDirectiveElementsTask.DESCRIPTOR);
-    _taskManager
-        .addTaskDescriptor(ResolvedUnit7InLibraryClosureTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(ResolvedUnit7InLibraryTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(ResolveInstanceFieldsInUnitTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(ResolveLibraryReferencesTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(ResolveLibraryTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(ResolveLibraryTypeNamesTask.DESCRIPTOR);
-    _taskManager
-        .addTaskDescriptor(ResolveTopLevelLibraryTypeBoundsTask.DESCRIPTOR);
-    _taskManager
-        .addTaskDescriptor(ResolveTopLevelUnitTypeBoundsTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(ResolveUnitTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(ResolveUnitTypeNamesTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(ResolveVariableReferencesTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(ScanDartTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(StrongModeVerifyUnitTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(VerifyUnitTask.DESCRIPTOR);
-    //
-    // Register HTML tasks.
-    //
-    _taskManager.addTaskDescriptor(DartScriptsTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(HtmlErrorsTask.DESCRIPTOR);
-    _taskManager.addTaskDescriptor(ParseHtmlTask.DESCRIPTOR);
-    //
-    // Register YAML tasks.
-    //
-    _taskManager.addTaskDescriptor(ParseYamlTask.DESCRIPTOR);
-    //
-    // Register analysis option file tasks.
-    //
-    _taskManager.addTaskDescriptor(GenerateOptionsErrorsTask.DESCRIPTOR);
-  }
+  @deprecated
+  void processRequiredPlugins() {}
 
   /**
    * Return `true` if the given [fileName] is an analysis options file.
@@ -972,14 +859,13 @@
   }
 
   /**
-   * Return `true` if the given [fileName] is assumed to contain HTML.
+   * Return `true` if the given [fileName] is AndroidManifest.xml
    */
-  static bool isHtmlFileName(String fileName) {
+  static bool isManifestFileName(String fileName) {
     if (fileName == null) {
       return false;
     }
-    String extension = FileNameUtilities.getExtension(fileName).toLowerCase();
-    return extension == SUFFIX_HTML || extension == SUFFIX_HTM;
+    return fileName.endsWith(AnalysisEngine.ANDROID_MANIFEST_FILE);
   }
 }
 
@@ -1152,6 +1038,12 @@
   @deprecated
   int get cacheSize;
 
+  /*
+   * A flag indicating whether to run checks on AndroidManifest.xml file to
+   * see if it is complaint with Chrome OS.
+   */
+  bool get chromeOsManifestChecks;
+
   /**
    * Return `true` if analysis is to generate dart2js related hint results.
    */
@@ -1505,6 +1397,25 @@
   bool implicitDynamic = true;
 
   /**
+   * A flag indicating whether inference failures are allowed, off by default.
+   *
+   * This option is experimental and subject to change.
+   */
+  bool strictInference = false;
+
+  /**
+   * Whether raw types (types without explicit type arguments, such as `List`)
+   * should be reported as potential problems.
+   * 
+   * Raw types are a common source of `dynamic` being introduced implicitly.
+   * This often leads to cast failures later on in the program.
+   */
+  bool strictRawTypes = false;
+
+  @override
+  bool chromeOsManifestChecks = false;
+
+  /**
    * Initialize a newly created set of analysis options to have their default
    * values.
    */
@@ -1534,6 +1445,8 @@
       strongModeHints = options.strongModeHints;
       implicitCasts = options.implicitCasts;
       implicitDynamic = options.implicitDynamic;
+      strictInference = options.strictInference;
+      strictRawTypes = options.strictRawTypes;
     }
     trackCacheDependencies = options.trackCacheDependencies;
     disableCacheFlushing = options.disableCacheFlushing;
@@ -1708,6 +1621,8 @@
       buffer.addBool(enableLazyAssignmentOperators);
       buffer.addBool(implicitCasts);
       buffer.addBool(implicitDynamic);
+      buffer.addBool(strictInference);
+      buffer.addBool(strictRawTypes);
       buffer.addBool(strongModeHints);
       buffer.addBool(useFastaParser);
 
@@ -1724,6 +1639,7 @@
       }
 
       // Append lints.
+      buffer.addString(linterVersion ?? '');
       buffer.addInt(lintRules.length);
       for (Linter lintRule in lintRules) {
         buffer.addString(lintRule.lintCode.uniqueName);
@@ -1790,6 +1706,8 @@
     hint = true;
     implicitCasts = true;
     implicitDynamic = true;
+    strictInference = false;
+    strictRawTypes = false;
     lint = false;
     _lintRules = null;
     patchPaths = {};
@@ -2409,11 +2327,6 @@
  */
 abstract class InternalAnalysisContext implements AnalysisContext {
   /**
-   * The result provider for [aboutToComputeResult].
-   */
-  ResultProvider resultProvider;
-
-  /**
    * A table mapping the sources known to the context to the information known
    * about the source.
    */
diff --git a/pkg/analyzer/lib/src/generated/error.dart b/pkg/analyzer/lib/src/generated/error.dart
index 3d71368..fe431d2 100644
--- a/pkg/analyzer/lib/src/generated/error.dart
+++ b/pkg/analyzer/lib/src/generated/error.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart
index 55f766e..7f2f741 100644
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
@@ -15,11 +15,13 @@
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/src/dart/ast/ast.dart';
+import 'package:analyzer/src/dart/constant/evaluation.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/inheritance_manager2.dart';
 import 'package:analyzer/src/dart/element/member.dart';
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/error/literal_element_verifier.dart';
 import 'package:analyzer/src/error/pending_error.dart';
 import 'package:analyzer/src/generated/element_resolver.dart';
 import 'package:analyzer/src/generated/engine.dart';
@@ -28,7 +30,6 @@
 import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/sdk.dart' show DartSdk, SdkLibrary;
 import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/task/dart.dart';
 
 /**
  * A visitor used to traverse an AST structure looking for additional errors and
@@ -277,6 +278,8 @@
   /// fixed.
   final bool disableConflictingGenericsCheck;
 
+  bool _isNonNullable = false;
+
   /**
    * Initialize a newly created error verifier.
    */
@@ -397,7 +400,9 @@
       _checkForUseOfVoidResult(node.rightOperand);
       _checkForNullableDereference(node.leftOperand);
       _checkForNullableDereference(node.rightOperand);
-    } else if (type != TokenType.EQ_EQ && type != TokenType.BANG_EQ) {
+    } else if (type != TokenType.EQ_EQ &&
+        type != TokenType.BANG_EQ &&
+        type != TokenType.QUESTION_QUESTION) {
       _checkForArgumentTypeNotAssignableForArgument(node.rightOperand);
       _checkForNullableDereference(node.leftOperand);
     } else {
@@ -468,6 +473,7 @@
     try {
       _isInCatchClause = true;
       _checkForTypeAnnotationDeferredClass(node.exceptionType);
+      _checkForPotentiallyNullableType(node.exceptionType);
       super.visitCatchClause(node);
     } finally {
       _isInCatchClause = previousIsInCatchClause;
@@ -537,9 +543,11 @@
 
   @override
   void visitCompilationUnit(CompilationUnit node) {
+    _isNonNullable = (node as CompilationUnitImpl).isNonNullable;
     _checkDuplicateUnitMembers(node);
     _checkForDeferredPrefixCollisions(node);
     super.visitCompilationUnit(node);
+    _isNonNullable = false;
   }
 
   @override
@@ -734,12 +742,6 @@
   }
 
   @override
-  void visitForEachStatement(ForEachStatement node) {
-    _checkForInIterable(node);
-    super.visitForEachStatement(node);
-  }
-
-  @override
   void visitFormalParameterList(FormalParameterList node) {
     _checkDuplicateDefinitionInParameterList(node);
     _checkUseOfCovariantInParameters(node);
@@ -766,17 +768,6 @@
   }
 
   @override
-  void visitForStatement(ForStatement node) {
-    if (node.condition != null) {
-      _checkForNonBoolCondition(node.condition);
-    }
-    if (node.variables != null) {
-      _checkDuplicateVariables(node.variables);
-    }
-    super.visitForStatement(node);
-  }
-
-  @override
   void visitFunctionDeclaration(FunctionDeclaration node) {
     ExecutableElement functionElement = node.declaredElement;
     if (functionElement != null &&
@@ -905,6 +896,12 @@
   }
 
   @override
+  void visitIfElement(IfElement node) {
+    _checkForNonBoolCondition(node.condition);
+    super.visitIfElement(node);
+  }
+
+  @override
   void visitIfStatement(IfStatement node) {
     _checkForNonBoolCondition(node.condition);
     super.visitIfStatement(node);
@@ -998,6 +995,7 @@
       _checkTypeArgumentCount(typeArguments, 1,
           StaticTypeWarningCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS);
     }
+    _checkForInferenceFailureOnCollectionLiteral(node);
     _checkForImplicitDynamicTypedLiteral(node);
     _checkForListElementTypeNotAssignable(node);
 
@@ -1005,66 +1003,6 @@
   }
 
   @override
-  void visitListLiteral2(ListLiteral2 node) {
-    TypeArgumentList typeArguments = node.typeArguments;
-    if (typeArguments != null) {
-      if (node.isConst) {
-        NodeList<TypeAnnotation> arguments = typeArguments.arguments;
-        if (arguments.isNotEmpty) {
-          _checkForInvalidTypeArgumentInConstTypedLiteral(arguments,
-              CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_LIST);
-        }
-      }
-      _checkTypeArgumentCount(typeArguments, 1,
-          StaticTypeWarningCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS);
-    }
-    _checkForImplicitDynamicTypedLiteral(node);
-    _checkForListElementTypeNotAssignable2(node);
-
-    super.visitListLiteral2(node);
-  }
-
-  @override
-  void visitMapLiteral(MapLiteral node) {
-    TypeArgumentList typeArguments = node.typeArguments;
-    if (typeArguments != null) {
-      NodeList<TypeAnnotation> arguments = typeArguments.arguments;
-      if (arguments.isNotEmpty) {
-        if (node.isConst) {
-          _checkForInvalidTypeArgumentInConstTypedLiteral(arguments,
-              CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_MAP);
-        }
-      }
-      _checkTypeArgumentCount(typeArguments, 2,
-          StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS);
-    }
-    _checkForImplicitDynamicTypedLiteral(node);
-    _checkForMapTypeNotAssignable(node);
-    _checkForNonConstMapAsExpressionStatement(node);
-    super.visitMapLiteral(node);
-  }
-
-  @override
-  void visitMapLiteral2(MapLiteral2 node) {
-    TypeArgumentList typeArguments = node.typeArguments;
-    if (typeArguments != null) {
-      NodeList<TypeAnnotation> arguments = typeArguments.arguments;
-      if (arguments.isNotEmpty) {
-        if (node.isConst) {
-          _checkForInvalidTypeArgumentInConstTypedLiteral(arguments,
-              CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_MAP);
-        }
-      }
-      _checkTypeArgumentCount(typeArguments, 2,
-          StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS);
-    }
-    _checkForImplicitDynamicTypedLiteral(node);
-    _checkForMapTypeNotAssignable2(node);
-    _checkForNonConstMapAsExpressionStatement2(node);
-    super.visitMapLiteral2(node);
-  }
-
-  @override
   void visitMethodDeclaration(MethodDeclaration node) {
     ExecutableElement previousFunction = _enclosingFunction;
     try {
@@ -1100,6 +1038,7 @@
       ClassElement typeReference = ElementResolver.getTypeReference(target);
       _checkForStaticAccessToInstanceMember(typeReference, methodName);
       _checkForInstanceAccessToStaticMember(typeReference, methodName);
+      _checkForUnnecessaryNullAware(target, node.operator);
     } else {
       _checkForUnqualifiedReferenceToNonLocalStaticMember(methodName);
       _checkForNullableDereference(node.function);
@@ -1165,9 +1104,11 @@
 
   @override
   void visitPostfixExpression(PostfixExpression node) {
-    _checkForAssignmentToFinal(node.operand);
-    _checkForIntNotAssignable(node.operand);
-    _checkForNullableDereference(node.operand);
+    if (node.operator.type != TokenType.BANG) {
+      _checkForAssignmentToFinal(node.operand);
+      _checkForIntNotAssignable(node.operand);
+      _checkForNullableDereference(node.operand);
+    }
     super.visitPostfixExpression(node);
   }
 
@@ -1216,6 +1157,7 @@
         propertyName.name != 'runtimeType') {
       _checkForNullableDereference(node.target);
     }
+    _checkForUnnecessaryNullAware(node.target, node.operator);
     super.visitPropertyAccess(node);
   }
 
@@ -1248,43 +1190,41 @@
   }
 
   @override
-  void visitSetLiteral(SetLiteral node) {
+  void visitSetOrMapLiteral(SetOrMapLiteral node) {
     TypeArgumentList typeArguments = node.typeArguments;
-    if (typeArguments != null) {
-      if (node.isConst) {
+    if (node.isMap) {
+      if (typeArguments != null) {
         NodeList<TypeAnnotation> arguments = typeArguments.arguments;
-        if (arguments.isNotEmpty) {
-          _checkForInvalidTypeArgumentInConstTypedLiteral(arguments,
-              CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_SET);
+        if (node.isConst) {
+          if (arguments.isNotEmpty) {
+            _checkForInvalidTypeArgumentInConstTypedLiteral(arguments,
+                CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_MAP);
+          }
         }
+        _checkTypeArgumentCount(typeArguments, 2,
+            StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS);
       }
-      _checkTypeArgumentCount(typeArguments, 1,
-          StaticTypeWarningCode.EXPECTED_ONE_SET_TYPE_ARGUMENTS);
-    }
-    _checkForImplicitDynamicTypedLiteral(node);
-    _checkForSetElementTypeNotAssignable(node);
-
-    super.visitSetLiteral(node);
-  }
-
-  @override
-  void visitSetLiteral2(SetLiteral2 node) {
-    TypeArgumentList typeArguments = node.typeArguments;
-    if (typeArguments != null) {
-      if (node.isConst) {
-        NodeList<TypeAnnotation> arguments = typeArguments.arguments;
-        if (arguments.isNotEmpty) {
-          _checkForInvalidTypeArgumentInConstTypedLiteral(arguments,
-              CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_SET);
+      _checkForInferenceFailureOnCollectionLiteral(node);
+      _checkForImplicitDynamicTypedLiteral(node);
+      _checkForMapTypeNotAssignable(node);
+      _checkForNonConstMapAsExpressionStatement3(node);
+    } else if (node.isSet) {
+      if (typeArguments != null) {
+        if (node.isConst) {
+          NodeList<TypeAnnotation> arguments = typeArguments.arguments;
+          if (arguments.isNotEmpty) {
+            _checkForInvalidTypeArgumentInConstTypedLiteral(arguments,
+                CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_SET);
+          }
         }
+        _checkTypeArgumentCount(typeArguments, 1,
+            StaticTypeWarningCode.EXPECTED_ONE_SET_TYPE_ARGUMENTS);
       }
-      _checkTypeArgumentCount(typeArguments, 1,
-          StaticTypeWarningCode.EXPECTED_ONE_SET_TYPE_ARGUMENTS);
+      _checkForInferenceFailureOnCollectionLiteral(node);
+      _checkForImplicitDynamicTypedLiteral(node);
+      _checkForSetElementTypeNotAssignable3(node);
     }
-    _checkForImplicitDynamicTypedLiteral(node);
-    _checkForSetElementTypeNotAssignable2(node);
-
-    super.visitSetLiteral2(node);
+    super.visitSetOrMapLiteral(node);
   }
 
   @override
@@ -1378,6 +1318,12 @@
   @override
   void visitTypeName(TypeName node) {
     _checkForTypeArgumentNotMatchingBounds(node);
+    if (node.parent is ConstructorName &&
+        node.parent.parent is InstanceCreationExpression) {
+      _checkForInferenceFailureOnInstanceCreation(node, node.parent.parent);
+    } else {
+      _checkForRawTypeName(node);
+    }
     super.visitTypeName(node);
   }
 
@@ -1427,7 +1373,9 @@
         grandparent is! FieldDeclaration) {
       VariableElement element = node.declaredElement;
       if (element != null) {
-        _hiddenElements.declare(element);
+        // There is no hidden elements if we are outside of a function body,
+        // which will happen for variables declared in control flow elements.
+        _hiddenElements?.declare(element);
       }
     }
   }
@@ -2250,18 +2198,6 @@
    * parameters. The [expectedStaticType] is the expected static type of the
    * parameter. The [actualStaticType] is the actual static type of the
    * argument.
-   *
-   * This method corresponds to
-   * [BestPracticesVerifier.checkForArgumentTypeNotAssignable].
-   *
-   * See [StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE],
-   * [CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE],
-   * [StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE],
-   * [CompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE],
-   * [CompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE],
-   * [StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE], and
-   * [StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE], and
-   * [StaticWarningCode.USE_OF_VOID_RESULT].
    */
   void _checkForArgumentTypeNotAssignable(
       Expression expression,
@@ -2558,34 +2494,6 @@
   }
 
   /**
-   * Verify that the given [element] can be assigned to the [elementType] of the
-   * enclosing list or set literal. Report an error with the given [errorCode]
-   * if not.
-   *
-   * This method corresponds to
-   * [BestPracticesVerifier.checkForArgumentTypeNotAssignableWithExpectedTypes].
-   */
-  void _checkForCollectionElementTypeNotAssignableWithElementType(
-      CollectionElement element, DartType elementType, ErrorCode errorCode) {
-    if (element is ForElement) {
-      _checkForCollectionElementTypeNotAssignableWithElementType(
-          element.body, elementType, errorCode);
-    } else if (element is IfElement) {
-      _checkForCollectionElementTypeNotAssignableWithElementType(
-          element.thenElement, elementType, errorCode);
-      _checkForCollectionElementTypeNotAssignableWithElementType(
-          element.elseElement, elementType, errorCode);
-    } else if (element is Expression) {
-      _checkForArgumentTypeNotAssignable(
-          element, elementType, getStaticType(element), errorCode);
-    } else if (element is SpreadElement) {
-      Expression expression = element.expression;
-      _checkForArgumentTypeNotAssignable(
-          expression, elementType, getStaticType(expression), errorCode);
-    }
-  }
-
-  /**
    * Verify that the [_enclosingClass] does not have a method and getter pair
    * with the same name on, via inheritance.
    *
@@ -3077,7 +2985,7 @@
 
     AstNode parent = node.parent;
     Token awaitKeyword;
-    if (parent is ForStatement2) {
+    if (parent is ForStatement) {
       awaitKeyword = parent.awaitKeyword;
     } else if (parent is ForElement) {
       awaitKeyword = parent.awaitKeyword;
@@ -3766,80 +3674,43 @@
         [directive.uri.stringValue]);
   }
 
-  /**
-   * Check for a type mis-match between the iterable expression and the
-   * assigned variable in a for-in statement.
-   */
-  void _checkForInIterable(ForEachStatement node) {
-    DeclaredIdentifier loopVariable = node.loopVariable;
-
-    // Ignore malformed for statements.
-    if (node.identifier == null && loopVariable == null) {
+  /// Checks a collection literal for an inference failure, and reports the
+  /// appropriate error if [AnalysisOptionsImpl.strictInference] is set.
+  ///
+  /// This checks if [node] does not have explicit or inferred type arguments.
+  /// When that happens, it reports a
+  /// HintCode.INFERENCE_FAILURE_ON_COLLECTION_LITERAL error.
+  void _checkForInferenceFailureOnCollectionLiteral(TypedLiteral node) {
+    if (!_options.strictInference || node == null) return;
+    if (node.typeArguments != null) {
+      // Type has explicit type arguments.
       return;
     }
+    var type = node.staticType;
+    if (_isMissingTypeArguments(node, type, type.element, node)) {
+      _errorReporter.reportErrorForNode(
+          HintCode.INFERENCE_FAILURE_ON_COLLECTION_LITERAL, node, [type.name]);
+    }
+  }
 
-    if (_checkForNullableDereference(node.iterable)) {
+  /// Checks a type on an instance creation expression for an inference
+  /// failure, and reports the appropriate error if
+  /// [AnalysisOptionsImpl.strictInference] is set.
+  ///
+  /// This checks if [node] refers to a generic type and does not have explicit
+  /// or inferred type arguments. When that happens, it reports a
+  /// HintMode.INFERENCE_FAILURE_ON_INSTANCE_CREATION error.
+  void _checkForInferenceFailureOnInstanceCreation(
+      TypeName node, InstanceCreationExpression inferenceContextNode) {
+    if (!_options.strictInference || node == null) return;
+    if (node.typeArguments != null) {
+      // Type has explicit type arguments.
       return;
     }
-
-    if (_checkForUseOfVoidResult(node.iterable)) {
-      return;
-    }
-
-    DartType iterableType = getStaticType(node.iterable);
-    if (iterableType.isDynamic) {
-      return;
-    }
-
-    // The type of the loop variable.
-    SimpleIdentifier variable = node.identifier ?? loopVariable.identifier;
-    DartType variableType = getStaticType(variable);
-
-    DartType loopType = node.awaitKeyword != null
-        ? _typeProvider.streamType
-        : _typeProvider.iterableType;
-
-    // Use an explicit string instead of [loopType] to remove the "<E>".
-    String loopTypeName = node.awaitKeyword != null ? "Stream" : "Iterable";
-
-    // The object being iterated has to implement Iterable<T> for some T that
-    // is assignable to the variable's type.
-    // TODO(rnystrom): Move this into mostSpecificTypeArgument()?
-    iterableType = iterableType.resolveToBound(_typeProvider.objectType);
-    DartType bestIterableType =
-        _typeSystem.mostSpecificTypeArgument(iterableType, loopType);
-
-    // Allow it to be a supertype of Iterable<T> (basically just Object) and do
-    // an implicit downcast to Iterable<dynamic>.
-    if (bestIterableType == null) {
-      if (_typeSystem.isSubtypeOf(loopType, iterableType)) {
-        bestIterableType = DynamicTypeImpl.instance;
-      }
-    }
-
-    if (loopVariable != null) {
-      if (loopVariable.isConst) {
-        _errorReporter.reportErrorForNode(
-            CompileTimeErrorCode.FOR_IN_WITH_CONST_VARIABLE, loopVariable);
-      }
-    } else if (node.identifier != null) {
-      Element variableElement = node.identifier.staticElement;
-      if (variableElement is VariableElement && variableElement.isConst) {
-        _errorReporter.reportErrorForNode(
-            CompileTimeErrorCode.FOR_IN_WITH_CONST_VARIABLE, node.identifier);
-      }
-    }
-
-    if (bestIterableType == null) {
-      _errorReporter.reportTypeErrorForNode(
-          StaticTypeWarningCode.FOR_IN_OF_INVALID_TYPE,
-          node.iterable,
-          [iterableType, loopTypeName]);
-    } else if (!_typeSystem.isAssignableTo(bestIterableType, variableType)) {
-      _errorReporter.reportTypeErrorForNode(
-          StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE,
-          node.iterable,
-          [iterableType, loopTypeName, variableType]);
+    if (_isMissingTypeArguments(
+        node, node.type, node.name.staticElement, inferenceContextNode)) {
+      _errorReporter.reportErrorForNode(
+          HintCode.INFERENCE_FAILURE_ON_INSTANCE_CREATION, node, [node.type]);
     }
   }
 
@@ -4040,117 +3911,20 @@
     DartType listElementType = typeArguments[0];
 
     // Check every list element.
-    bool isConst = literal.isConst;
-    for (Expression element in literal.elements) {
-      if (isConst) {
-        // TODO(paulberry): this error should be based on the actual type of the
-        // list element, not the static type.  See dartbug.com/21119.
-        _checkForArgumentTypeNotAssignableWithExpectedTypes(
-            element,
-            listElementType,
-            CheckedModeCompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE);
-      }
-      _checkForArgumentTypeNotAssignableWithExpectedTypes(element,
-          listElementType, StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE);
-    }
-  }
-
-  /**
-   * Verify that the elements of the given list [literal] are subtypes of the
-   * list's static type.
-   */
-  void _checkForListElementTypeNotAssignable2(ListLiteral2 literal) {
-    // Determine the list's element type. We base this on the static type and
-    // not the literal's type arguments because in strong mode, the type
-    // arguments may be inferred.
-    DartType listType = literal.staticType;
-    assert(listType is InterfaceTypeImpl);
-
-    List<DartType> typeArguments =
-        (listType as InterfaceTypeImpl).typeArguments;
-    assert(typeArguments.length == 1);
-
-    DartType listElementType = typeArguments[0];
-
-    // Check every list element.
-    bool isConst = literal.isConst;
+    var verifier = LiteralElementVerifier(
+      _typeProvider,
+      _typeSystem,
+      _errorReporter,
+      _checkForUseOfVoidResult,
+      forList: true,
+      elementType: listElementType,
+    );
     for (CollectionElement element in literal.elements) {
-      if (isConst) {
-        // TODO(paulberry): this error should be based on the actual type of the
-        // list element, not the static type.  See dartbug.com/21119.
-        _checkForCollectionElementTypeNotAssignableWithElementType(
-            element,
-            listElementType,
-            CheckedModeCompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE);
-      } else {
-        _checkForCollectionElementTypeNotAssignableWithElementType(
-            element,
-            listElementType,
-            StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE);
-      }
+      verifier.verify(element);
     }
   }
 
-  /**
-   * Verify that the given [element] can be assigned to the [elementType] of the
-   * enclosing list or set literal. Report an error with the given [errorCode]
-   * if not.
-   *
-   * This method corresponds to
-   * [BestPracticesVerifier.checkForArgumentTypeNotAssignableWithExpectedTypes].
-   */
-  void _checkForMapElementTypeNotAssignableWithKeyOrValueType(
-      CollectionElement element,
-      DartType keyType,
-      DartType valueType,
-      ErrorCode keyErrorCode,
-      ErrorCode valueErrorCode) {
-    if (element is ForElement) {
-      _checkForMapElementTypeNotAssignableWithKeyOrValueType(
-          element.body, keyType, valueType, keyErrorCode, valueErrorCode);
-    } else if (element is IfElement) {
-      _checkForMapElementTypeNotAssignableWithKeyOrValueType(
-          element.thenElement,
-          keyType,
-          valueType,
-          keyErrorCode,
-          valueErrorCode);
-      _checkForMapElementTypeNotAssignableWithKeyOrValueType(
-          element.elseElement,
-          keyType,
-          valueType,
-          keyErrorCode,
-          valueErrorCode);
-    } else if (element is MapLiteralEntry) {
-      _checkForArgumentTypeNotAssignableWithExpectedTypes(
-          element.key, keyType, keyErrorCode);
-      _checkForArgumentTypeNotAssignableWithExpectedTypes(
-          element.value, valueType, valueErrorCode);
-    } else if (element is SpreadElement) {
-      Expression expression = element.expression;
-      DartType expressionType = getStaticType(expression);
-      if (expressionType is ParameterizedType) {
-        List<DartType> typeArguments = expressionType.typeArguments;
-        if (typeArguments.length == 2) {
-          _checkForArgumentTypeNotAssignable(
-              expression, keyType, typeArguments[0], keyErrorCode);
-          _checkForArgumentTypeNotAssignable(
-              expression, valueType, typeArguments[1], valueErrorCode);
-        }
-      }
-    }
-  }
-
-  /**
-   * Verify that the key/value of entries of the given map [literal] are
-   * subtypes of the map's static type.
-   *
-   * See [CompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE],
-   * [CompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE],
-   * [StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE], and
-   * [StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE].
-   */
-  void _checkForMapTypeNotAssignable(MapLiteral literal) {
+  void _checkForMapTypeNotAssignable(SetOrMapLiteral literal) {
     // Determine the map's key and value types. We base this on the static type
     // and not the literal's type arguments because in strong mode, the type
     // arguments may be inferred.
@@ -4163,75 +3937,25 @@
     assert(mapType is InterfaceTypeImpl);
 
     List<DartType> typeArguments = (mapType as InterfaceTypeImpl).typeArguments;
-    assert(typeArguments.length == 2);
-    DartType keyType = typeArguments[0];
-    DartType valueType = typeArguments[1];
+    // It is possible for the number of type arguments to be inconsistent when
+    // the literal is ambiguous and a non-map type was selected.
+    // TODO(brianwilkerson) Unify this and _checkForSetElementTypeNotAssignable3
+    //  to better handle recovery situations.
+    if (typeArguments.length == 2) {
+      DartType keyType = typeArguments[0];
+      DartType valueType = typeArguments[1];
 
-    bool isConst = literal.isConst;
-    NodeList<MapLiteralEntry> entries = literal.entries;
-    for (MapLiteralEntry entry in entries) {
-      Expression key = entry.key;
-      Expression value = entry.value;
-      if (isConst) {
-        // TODO(paulberry): this error should be based on the actual type of the
-        // list element, not the static type.  See dartbug.com/21119.
-        _checkForArgumentTypeNotAssignableWithExpectedTypes(key, keyType,
-            CheckedModeCompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE);
-        _checkForArgumentTypeNotAssignableWithExpectedTypes(value, valueType,
-            CheckedModeCompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE);
-      }
-      _checkForArgumentTypeNotAssignableWithExpectedTypes(
-          key, keyType, StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE);
-      _checkForArgumentTypeNotAssignableWithExpectedTypes(
-          value, valueType, StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE);
-    }
-  }
-
-  /**
-   * Verify that the key/value of entries of the given map [literal] are
-   * subtypes of the map's static type.
-   *
-   * See [CompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE],
-   * [CompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE],
-   * [StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE], and
-   * [StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE].
-   */
-  void _checkForMapTypeNotAssignable2(MapLiteral2 literal) {
-    // Determine the map's key and value types. We base this on the static type
-    // and not the literal's type arguments because in strong mode, the type
-    // arguments may be inferred.
-    DartType mapType = literal.staticType;
-    if (mapType == null) {
-      // This is known to happen when the literal is the default value in an
-      // optional parameter in a generic function type alias.
-      return;
-    }
-    assert(mapType is InterfaceTypeImpl);
-
-    List<DartType> typeArguments = (mapType as InterfaceTypeImpl).typeArguments;
-    assert(typeArguments.length == 2);
-    DartType keyType = typeArguments[0];
-    DartType valueType = typeArguments[1];
-
-    bool isConst = literal.isConst;
-    NodeList<CollectionElement> entries = literal.entries;
-    for (CollectionElement entry in entries) {
-      if (isConst) {
-        // TODO(paulberry): this error should be based on the actual type of the
-        // list element, not the static type.  See dartbug.com/21119.
-        _checkForMapElementTypeNotAssignableWithKeyOrValueType(
-            entry,
-            keyType,
-            valueType,
-            CheckedModeCompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE,
-            CheckedModeCompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE);
-      } else {
-        _checkForMapElementTypeNotAssignableWithKeyOrValueType(
-            entry,
-            keyType,
-            valueType,
-            StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE,
-            StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE);
+      var verifier = LiteralElementVerifier(
+        _typeProvider,
+        _typeSystem,
+        _errorReporter,
+        _checkForUseOfVoidResult,
+        forMap: true,
+        mapKeyType: keyType,
+        mapValueType: valueType,
+      );
+      for (CollectionElement element in literal.elements) {
+        verifier.verify(element);
       }
     }
   }
@@ -4557,11 +4281,9 @@
     Map<LibraryElement, Map<String, String>> mixedInNames =
         <LibraryElement, Map<String, String>>{};
 
-    /**
-     * Report an error and return `true` if the given [name] is a private name
-     * (which is defined in the given [library]) and it conflicts with another
-     * definition of that name inherited from the superclass.
-     */
+    /// Report an error and return `true` if the given [name] is a private name
+    /// (which is defined in the given [library]) and it conflicts with another
+    /// definition of that name inherited from the superclass.
     bool isConflictingName(
         String name, LibraryElement library, TypeName typeName) {
       if (Identifier.isPrivateName(name)) {
@@ -4802,38 +4524,7 @@
    *
    * See [CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT].
    */
-  void _checkForNonConstMapAsExpressionStatement(MapLiteral literal) {
-    // "const"
-    if (literal.constKeyword != null) {
-      return;
-    }
-    // has type arguments
-    if (literal.typeArguments != null) {
-      return;
-    }
-    // prepare statement
-    Statement statement = literal.thisOrAncestorOfType<ExpressionStatement>();
-    if (statement == null) {
-      return;
-    }
-    // OK, statement does not start with map
-    if (!identical(statement.beginToken, literal.beginToken)) {
-      return;
-    }
-
-    _errorReporter.reportErrorForNode(
-        CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT, literal);
-  }
-
-  /**
-   * Verify the given map [literal] either:
-   * * has `const modifier`
-   * * has explicit type arguments
-   * * is not start of the statement
-   *
-   * See [CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT].
-   */
-  void _checkForNonConstMapAsExpressionStatement2(MapLiteral2 literal) {
+  void _checkForNonConstMapAsExpressionStatement3(SetOrMapLiteral literal) {
     // "const"
     if (literal.constKeyword != null) {
       return;
@@ -4904,10 +4595,10 @@
    */
   bool _checkForNullableDereference(Expression expression) {
     if (expression == null ||
-        !_options.experimentStatus.non_nullable ||
+        !_isNonNullable ||
         expression.staticType == null ||
-        (expression.staticType as TypeImpl).nullability !=
-            Nullability.nullable) {
+        (expression.staticType as TypeImpl).nullabilitySuffix !=
+            NullabilitySuffix.question) {
       return false;
     }
 
@@ -5028,6 +4719,18 @@
   }
 
   /**
+   * Verify that the [type] is not potentially nullable.
+   */
+  void _checkForPotentiallyNullableType(TypeAnnotation type) {
+    if (_options.experimentStatus.non_nullable &&
+        type?.type != null &&
+        _typeSystem.isPotentiallyNullable(type.type)) {
+      _errorReporter.reportErrorForNode(
+          CompileTimeErrorCode.NULLABLE_TYPE_IN_CATCH_CLAUSE, type);
+    }
+  }
+
+  /**
    * Check that the given named optional [parameter] does not begin with '_'.
    *
    * See [CompileTimeErrorCode.PRIVATE_OPTIONAL_PARAMETER].
@@ -5049,6 +4752,25 @@
         CompileTimeErrorCode.PRIVATE_OPTIONAL_PARAMETER, parameter);
   }
 
+  /// Checks a type annotation for a raw generic type, and reports the
+  /// appropriate error if [AnalysisOptionsImpl.strictRawTypes] is set.
+  ///
+  /// This checks if [node] refers to a generic type and does not have explicit
+  /// or inferred type arguments. When that happens, it reports error code
+  /// [StrongModeCode.STRICT_RAW_TYPE].
+  void _checkForRawTypeName(TypeName node) {
+    if (!_options.strictRawTypes || node == null) return;
+    if (node.typeArguments != null) {
+      // Type has explicit type arguments.
+      return;
+    }
+    if (_isMissingTypeArguments(
+        node, node.type, node.name.staticElement, null)) {
+      _errorReporter
+          .reportErrorForNode(HintCode.STRICT_RAW_TYPE, node, [node.type]);
+    }
+  }
+
   /**
    * Check whether the given constructor [declaration] is the redirecting
    * generative constructor and references itself directly or indirectly. The
@@ -5374,66 +5096,32 @@
    * See [CompileTimeErrorCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE], and
    * [StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE].
    */
-  void _checkForSetElementTypeNotAssignable(SetLiteral literal) {
-    // Determine the list's element type. We base this on the static type and
+  void _checkForSetElementTypeNotAssignable3(SetOrMapLiteral literal) {
+    // Determine the set's element type. We base this on the static type and
     // not the literal's type arguments because in strong mode, the type
     // arguments may be inferred.
     DartType setType = literal.staticType;
     assert(setType is InterfaceTypeImpl);
 
     List<DartType> typeArguments = (setType as InterfaceTypeImpl).typeArguments;
-    assert(typeArguments.length == 1);
+    // It is possible for the number of type arguments to be inconsistent when
+    // the literal is ambiguous and a non-set type was selected.
+    // TODO(brianwilkerson) Unify this and _checkForMapTypeNotAssignable3 to
+    //  better handle recovery situations.
+    if (typeArguments.length == 1) {
+      DartType setElementType = typeArguments[0];
 
-    DartType setElementType = typeArguments[0];
-
-    // Check every list element.
-    bool isConst = literal.isConst;
-    for (Expression element in literal.elements) {
-      if (isConst) {
-        // TODO(paulberry): this error should be based on the actual type of the
-        // element, not the static type.  See dartbug.com/21119.
-        _checkForArgumentTypeNotAssignableWithExpectedTypes(
-            element,
-            setElementType,
-            CheckedModeCompileTimeErrorCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE);
-      }
-      _checkForArgumentTypeNotAssignableWithExpectedTypes(element,
-          setElementType, StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE);
-    }
-  }
-
-  /**
-   * Verify that the elements in the given set [literal] are subtypes of the
-   * set's static type.
-   *
-   * See [CompileTimeErrorCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE], and
-   * [StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE].
-   */
-  void _checkForSetElementTypeNotAssignable2(SetLiteral2 literal) {
-    // Determine the list's element type. We base this on the static type and
-    // not the literal's type arguments because in strong mode, the type
-    // arguments may be inferred.
-    DartType setType = literal.staticType;
-    assert(setType is InterfaceTypeImpl);
-
-    List<DartType> typeArguments = (setType as InterfaceTypeImpl).typeArguments;
-    assert(typeArguments.length == 1);
-
-    DartType setElementType = typeArguments[0];
-
-    // Check every list element.
-    bool isConst = literal.isConst;
-    for (CollectionElement element in literal.elements) {
-      if (isConst) {
-        // TODO(paulberry): this error should be based on the actual type of the
-        // element, not the static type.  See dartbug.com/21119.
-        _checkForCollectionElementTypeNotAssignableWithElementType(
-            element,
-            setElementType,
-            CheckedModeCompileTimeErrorCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE);
-      } else {
-        _checkForCollectionElementTypeNotAssignableWithElementType(element,
-            setElementType, StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE);
+      // Check every set element.
+      var verifier = LiteralElementVerifier(
+        _typeProvider,
+        _typeSystem,
+        _errorReporter,
+        _checkForUseOfVoidResult,
+        forSet: true,
+        elementType: setElementType,
+      );
+      for (CollectionElement element in literal.elements) {
+        verifier.verify(element);
       }
     }
   }
@@ -5520,7 +5208,7 @@
   }
 
   /**
-   * Verify that the given type [name] is not a deferred type.
+   * Verify that the [type] is not a deferred type.
    *
    * See [StaticWarningCode.TYPE_ANNOTATION_DEFERRED_CLASS].
    */
@@ -5721,6 +5409,19 @@
     }
   }
 
+  void _checkForUnnecessaryNullAware(Expression target, Token operator) {
+    if (operator.type != TokenType.QUESTION_PERIOD || !_isNonNullable) {
+      return;
+    }
+
+    if (target.staticType != null &&
+        (target.staticType as TypeImpl).nullabilitySuffix ==
+            NullabilitySuffix.none) {
+      _errorReporter.reportErrorForToken(
+          HintCode.UNNECESSARY_NULL_AWARE_CALL, operator, []);
+    }
+  }
+
   /**
    * Check that if the given [name] is a reference to a static member it is
    * defined in the enclosing class rather than in a superclass.
@@ -6411,6 +6112,46 @@
     return false;
   }
 
+  /// Given a [node] without type arguments that refers to [element], issues
+  /// an error if [type] is a generic type, and the type arguments were not
+  /// supplied from inference or a non-dynamic default instantiation.
+  ///
+  /// This function is used by other node-specific type checking functions, and
+  /// should only be called when [node] has no explicit `typeArguments`.
+  ///
+  /// [inferenceContextNode] is the node that has the downwards context type,
+  /// if any. For example an [InstanceCreationExpression].
+  ///
+  /// This function will return false if any of the following are true:
+  ///
+  /// - [inferenceContextNode] has an inference context type that does not
+  ///   contain `?`
+  /// - [type] does not have any `dynamic` type arguments.
+  /// - the element is marked with `@optionalTypeArgs` from "package:meta".
+  bool _isMissingTypeArguments(AstNode node, DartType type, Element element,
+      Expression inferenceContextNode) {
+    // Check if this type has type arguments and at least one is dynamic.
+    // If so, we may need to issue a strict-raw-types error.
+    if (type is ParameterizedType &&
+        type.typeArguments.any((t) => t.isDynamic)) {
+      // If we have an inference context node, check if the type was inferred
+      // from it. Some cases will not have a context type, such as the type
+      // annotation `List` in `List list;`
+      if (inferenceContextNode != null) {
+        var contextType = InferenceContext.getContext(inferenceContextNode);
+        if (contextType != null && UnknownInferredType.isKnown(contextType)) {
+          // Type was inferred from downwards context: not an error.
+          return false;
+        }
+      }
+      if (element.hasOptionalTypeArgs) {
+        return false;
+      }
+      return true;
+    }
+    return false;
+  }
+
   /**
    * Return `true` if the given 'this' [expression] is in a valid context.
    */
@@ -6797,6 +6538,7 @@
  */
 class _UninstantiatedBoundChecker extends RecursiveAstVisitor {
   final ErrorReporter _errorReporter;
+
   _UninstantiatedBoundChecker(this._errorReporter);
 
   @override
diff --git a/pkg/analyzer/lib/src/generated/parser.dart b/pkg/analyzer/lib/src/generated/parser.dart
index 9ea56c4..2055493 100644
--- a/pkg/analyzer/lib/src/generated/parser.dart
+++ b/pkg/analyzer/lib/src/generated/parser.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -225,6 +225,14 @@
   @deprecated
   void set enableAssertInitializer(bool enable) {}
 
+  /// Enables or disables parsing of control flow collections.
+  void set enableControlFlowCollections(bool value) {
+    if (value) {
+      throw new UnimplementedError('control_flow_collections experiment'
+          ' not supported by analyzer parser');
+    }
+  }
+
   /// Enables or disables non-nullable by default.
   void set enableNonNullable(bool value) {
     if (value) {
@@ -245,10 +253,8 @@
 
   /// Enables or disables parsing of set literals.
   void set enableSetLiterals(bool value) {
-    if (value) {
-      throw new UnimplementedError(
-          'set-literal experiment not supported by analyzer parser');
-    }
+    // TODO(danrubel): Remove this method once the reference to this flag
+    // has been removed from dartfmt.
   }
 
   /// Enables or disables parsing of spread collections.
@@ -259,10 +265,10 @@
     }
   }
 
-  /// Enables or disables parsing of control flow collections.
-  void set enableControlFlowCollections(bool value) {
+  /// Enables or disables parsing of the triple shift operators.
+  void set enableTripleShift(bool value) {
     if (value) {
-      throw new UnimplementedError('control_flow_collections experiment'
+      throw new UnimplementedError('triple_shift experiment'
           ' not supported by analyzer parser');
     }
   }
@@ -2952,26 +2958,24 @@
           Expression iterator = parseExpression2();
           Token rightParenthesis = _expect(TokenType.CLOSE_PAREN);
           Statement body = parseStatement2();
+          ForLoopParts forLoopParts;
           if (loopVariable == null) {
-            return astFactory.forEachStatementWithReference(
-                awaitKeyword,
-                forKeyword,
-                leftParenthesis,
-                identifier,
-                inKeyword,
-                iterator,
-                rightParenthesis,
-                body);
+            forLoopParts = astFactory.forEachPartsWithIdentifier(
+                identifier: identifier,
+                inKeyword: inKeyword,
+                iterable: iterator);
+          } else {
+            forLoopParts = astFactory.forEachPartsWithDeclaration(
+                loopVariable: loopVariable,
+                inKeyword: inKeyword,
+                iterable: iterator);
           }
-          return astFactory.forEachStatementWithDeclaration(
-              awaitKeyword,
-              forKeyword,
-              leftParenthesis,
-              loopVariable,
-              inKeyword,
-              iterator,
-              rightParenthesis,
-              body);
+          return astFactory.forStatement(
+              forKeyword: forKeyword,
+              leftParenthesis: leftParenthesis,
+              forLoopParts: forLoopParts,
+              rightParenthesis: rightParenthesis,
+              body: body);
         }
       }
       if (awaitKeyword != null) {
@@ -2988,19 +2992,30 @@
       if (!_matches(TokenType.CLOSE_PAREN)) {
         updaters = parseExpressionList();
       }
+      ForLoopParts forLoopParts;
+      if (variableList != null) {
+        forLoopParts = astFactory.forPartsWithDeclarations(
+            variables: variableList,
+            leftSeparator: leftSeparator,
+            condition: condition,
+            rightSeparator: rightSeparator,
+            updaters: updaters);
+      } else {
+        forLoopParts = astFactory.forPartsWithExpression(
+            initialization: initialization,
+            leftSeparator: leftSeparator,
+            condition: condition,
+            rightSeparator: rightSeparator,
+            updaters: updaters);
+      }
       Token rightParenthesis = _expect(TokenType.CLOSE_PAREN);
       Statement body = parseStatement2();
       return astFactory.forStatement(
-          forKeyword,
-          leftParenthesis,
-          variableList,
-          initialization,
-          leftSeparator,
-          condition,
-          rightSeparator,
-          updaters,
-          rightParenthesis,
-          body);
+          forKeyword: forKeyword,
+          leftParenthesis: leftParenthesis,
+          forLoopParts: forLoopParts,
+          rightParenthesis: rightParenthesis,
+          body: body);
     } finally {
       _inLoop = wasInLoop;
     }
@@ -3668,11 +3683,15 @@
   ///
   ///     mapLiteral ::=
   ///         'const'? typeArguments? '{' (mapLiteralEntry (',' mapLiteralEntry)* ','?)? '}'
-  MapLiteral parseMapLiteral(Token modifier, TypeArgumentList typeArguments) {
+  SetOrMapLiteral parseMapLiteral(
+      Token modifier, TypeArgumentList typeArguments) {
     Token leftBracket = getAndAdvance();
     if (_matches(TokenType.CLOSE_CURLY_BRACKET)) {
-      return astFactory.mapLiteral(
-          modifier, typeArguments, leftBracket, null, getAndAdvance());
+      return astFactory.setOrMapLiteral(
+          constKeyword: modifier,
+          typeArguments: typeArguments,
+          leftBracket: leftBracket,
+          rightBracket: getAndAdvance());
     }
     bool wasInInitializer = _inInitializer;
     _inInitializer = false;
@@ -3680,14 +3699,22 @@
       List<MapLiteralEntry> entries = <MapLiteralEntry>[parseMapLiteralEntry()];
       while (_optional(TokenType.COMMA)) {
         if (_matches(TokenType.CLOSE_CURLY_BRACKET)) {
-          return astFactory.mapLiteral(
-              modifier, typeArguments, leftBracket, entries, getAndAdvance());
+          return astFactory.setOrMapLiteral(
+              constKeyword: modifier,
+              typeArguments: typeArguments,
+              leftBracket: leftBracket,
+              elements: entries,
+              rightBracket: getAndAdvance());
         }
         entries.add(parseMapLiteralEntry());
       }
       Token rightBracket = _expect(TokenType.CLOSE_CURLY_BRACKET);
-      return astFactory.mapLiteral(
-          modifier, typeArguments, leftBracket, entries, rightBracket);
+      return astFactory.setOrMapLiteral(
+          constKeyword: modifier,
+          typeArguments: typeArguments,
+          leftBracket: leftBracket,
+          elements: entries,
+          rightBracket: rightBracket);
     } finally {
       _inInitializer = wasInInitializer;
     }
@@ -4021,7 +4048,7 @@
         _tokenMatchesKeyword(_peek(), Keyword.FOR)) {
       Token awaitToken = _currentToken;
       Statement statement = parseForStatement();
-      if (statement is! ForStatement) {
+      if (!(statement is ForStatement && statement.forLoopParts is ForParts)) {
         _reportErrorForToken(
             CompileTimeErrorCode.ASYNC_FOR_IN_WRONG_CONTEXT, awaitToken);
       }
diff --git a/pkg/analyzer/lib/src/generated/parser_fasta.dart b/pkg/analyzer/lib/src/generated/parser_fasta.dart
index 62e616e..d08aa89 100644
--- a/pkg/analyzer/lib/src/generated/parser_fasta.dart
+++ b/pkg/analyzer/lib/src/generated/parser_fasta.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -27,7 +27,6 @@
       {bool allowNativeClause: false})
       : fastaParser = new fasta.Parser(null),
         astBuilder = new AstBuilder(errorReporter, fileUri, true) {
-    fastaParser.enableSetLiterals = IsEnabledByDefault.set_literals;
     fastaParser.listener = astBuilder;
     astBuilder.parser = fastaParser;
     astBuilder.allowNativeClause = allowNativeClause;
@@ -38,6 +37,16 @@
     astBuilder.allowNativeClause = value;
   }
 
+  @override
+  void set enableControlFlowCollections(bool value) {
+    if (IsExpired.control_flow_collections &&
+        value != IsEnabledByDefault.control_flow_collections) {
+      throw new StateError('control_flow_collections may only be set'
+          ' to ${IsEnabledByDefault.control_flow_collections}');
+    }
+    astBuilder.enableControlFlowCollections = value;
+  }
+
   /// Enables or disables non-nullable by default.
   void set enableNonNullable(bool value) {
     if (IsExpired.non_nullable && value != IsEnabledByDefault.non_nullable) {
@@ -55,11 +64,8 @@
 
   @override
   void set enableSetLiterals(bool value) {
-    if (IsExpired.set_literals && value != IsEnabledByDefault.set_literals) {
-      throw new StateError(
-          'set_literals may only be set to ${IsEnabledByDefault.set_literals}');
-    }
-    fastaParser.enableSetLiterals = value;
+    // TODO(danrubel): Remove this method once the reference to this flag
+    // has been removed from dartfmt.
   }
 
   @override
@@ -73,13 +79,12 @@
   }
 
   @override
-  void set enableControlFlowCollections(bool value) {
-    if (IsExpired.control_flow_collections &&
-        value != IsEnabledByDefault.control_flow_collections) {
-      throw new StateError('control_flow_collections may only be set'
-          ' to ${IsEnabledByDefault.control_flow_collections}');
+  void set enableTripleShift(bool value) {
+    if (IsExpired.triple_shift && value != IsEnabledByDefault.triple_shift) {
+      throw new StateError('triple_shift may only be set'
+          ' to ${IsEnabledByDefault.triple_shift}');
     }
-    astBuilder.enableControlFlowCollections = value;
+    astBuilder.enableTripleShift = value;
   }
 
   @override
@@ -189,8 +194,6 @@
     currentToken = fastaParser.parseUnit(currentToken);
     CompilationUnitImpl compilationUnit = astBuilder.pop();
     compilationUnit.localDeclarations = astBuilder.localDeclarations;
-    compilationUnit.hasPragmaAnalyzerNonNullable =
-        astBuilder.hasPragmaAnalyzerNonNullable;
     return compilationUnit;
   }
 
diff --git a/pkg/analyzer/lib/src/generated/resolver.dart b/pkg/analyzer/lib/src/generated/resolver.dart
index e10c1fd..9295e4f 100644
--- a/pkg/analyzer/lib/src/generated/resolver.dart
+++ b/pkg/analyzer/lib/src/generated/resolver.dart
@@ -36,6 +36,7 @@
 import 'package:analyzer/src/generated/type_system.dart';
 import 'package:analyzer/src/lint/linter.dart';
 import 'package:analyzer/src/workspace/workspace.dart';
+import 'package:meta/meta.dart';
 import 'package:path/path.dart' as path;
 
 export 'package:analyzer/src/dart/constant/constant_verifier.dart';
@@ -764,6 +765,8 @@
         if (!element.displayName.isEmpty) {
           displayName = "$displayName.${element.displayName}";
         }
+      } else if (element is LibraryElement) {
+        displayName = element.definingCompilationUnit.source.uri.toString();
       } else if (displayName == FunctionElement.CALL_METHOD_NAME &&
           node is MethodInvocation &&
           node.staticInvokeType is InterfaceType) {
@@ -1130,7 +1133,8 @@
 
     // NULL_AWARE_IN_CONDITION
     if (parent is IfStatement && parent.condition == childOfParent ||
-        parent is ForStatement && parent.condition == childOfParent ||
+        parent is ForPartsWithDeclarations &&
+            parent.condition == childOfParent ||
         parent is DoStatement && parent.condition == childOfParent ||
         parent is WhileStatement && parent.condition == childOfParent ||
         parent is ConditionalExpression && parent.condition == childOfParent ||
@@ -1472,17 +1476,32 @@
   /// The object used to track the usage of labels within a given label scope.
   _LabelTracker labelTracker;
 
+  /// Is `true` if this unit has been parsed as non-nullable.
+  final bool _isNonNullableUnit;
+
   /// Initialize a newly created dead code verifier that will report dead code
   /// to the given [errorReporter] and will use the given [typeSystem] if one is
   /// provided.
-  DeadCodeVerifier(this._errorReporter, {TypeSystem typeSystem})
+  DeadCodeVerifier(this._errorReporter, this._isNonNullableUnit,
+      {TypeSystem typeSystem})
       : this._typeSystem = typeSystem ?? new Dart2TypeSystem(null);
 
   @override
+  void visitAssignmentExpression(AssignmentExpression node) {
+    TokenType operatorType = node.operator.type;
+    if (operatorType == TokenType.QUESTION_QUESTION_EQ) {
+      _checkForDeadNullCoalesce(
+          node.leftHandSide.staticType, node.rightHandSide);
+    }
+    super.visitAssignmentExpression(node);
+  }
+
+  @override
   void visitBinaryExpression(BinaryExpression node) {
     Token operator = node.operator;
     bool isAmpAmp = operator.type == TokenType.AMPERSAND_AMPERSAND;
     bool isBarBar = operator.type == TokenType.BAR_BAR;
+    bool isQuestionQuestion = operator.type == TokenType.QUESTION_QUESTION;
     if (isAmpAmp || isBarBar) {
       Expression lhsCondition = node.leftOperand;
       if (!_isDebugConstant(lhsCondition)) {
@@ -1525,6 +1544,8 @@
 //                return null;
 //              }
 //            }
+    } else if (isQuestionQuestion && _isNonNullableUnit) {
+      _checkForDeadNullCoalesce(node.leftOperand.staticType, node.rightOperand);
     }
     super.visitBinaryExpression(node);
   }
@@ -1811,6 +1832,12 @@
     }
   }
 
+  void _checkForDeadNullCoalesce(TypeImpl lhsType, Expression rhs) {
+    if (_isNonNullableUnit && _typeSystem.isNonNullable(lhsType)) {
+      _errorReporter.reportErrorForNode(HintCode.DEAD_CODE, rhs, []);
+    }
+  }
+
   /// Given some list of [statements], loop through the list searching for dead
   /// statements. If [allowMandated] is true, then allow dead statements that
   /// are mandated by the language spec. This allows for a final break,
@@ -1862,6 +1889,7 @@
             new DartObjectImpl(null, BoolState.from(false)));
       }
     }
+
     // Don't consider situations where we could evaluate to a constant boolean
     // expression with the ConstantVisitor
     // else {
@@ -3510,11 +3538,6 @@
   }
 
   @override
-  void visitNode(AstNode node) {
-    super.visitNode(node);
-  }
-
-  @override
   void visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
     _addStaticVariables(node.variables.variables);
     super.visitTopLevelVariableDeclaration(node);
@@ -3599,10 +3622,6 @@
       const ResolverErrorCode('CONTINUE_LABEL_ON_SWITCH',
           "A continue label resolves to switch, must be loop or switch member");
 
-  static const ResolverErrorCode MISSING_LIBRARY_DIRECTIVE_WITH_PART =
-      const ResolverErrorCode('MISSING_LIBRARY_DIRECTIVE_WITH_PART',
-          "Libraries that have parts must have a library directive");
-
   /// Parts: It is a static warning if the referenced part declaration
   /// <i>p</i> names a library that does not have a library tag.
   ///
@@ -3613,7 +3632,7 @@
       const ResolverErrorCode(
           'PART_OF_UNNAMED_LIBRARY',
           "Library is unnamed. Expected a URI not a library name '{0}' in the "
-          "part-of directive.",
+              "part-of directive.",
           correction:
               "Try changing the part-of directive to a URI, or try including a"
               " different part.");
@@ -3640,6 +3659,8 @@
    */
   final InheritanceManager2 inheritance;
 
+  final AnalysisOptionsImpl _analysisOptions;
+
   /// The object used to resolve the element associated with the current node.
   ElementResolver elementResolver;
 
@@ -3706,13 +3727,14 @@
       {Scope nameScope,
       bool propagateTypes: true,
       reportConstEvaluationErrors: true})
-      : super(definingLibrary, source, typeProvider, errorListener,
+      : _analysisOptions = definingLibrary.context.analysisOptions,
+        super(definingLibrary, source, typeProvider, errorListener,
             nameScope: nameScope) {
-    AnalysisOptions options = definingLibrary.context.analysisOptions;
     this.elementResolver = new ElementResolver(this,
         reportConstEvaluationErrors: reportConstEvaluationErrors);
     this.typeSystem = definingLibrary.context.typeSystem;
     bool strongModeHints = false;
+    AnalysisOptions options = _analysisOptions;
     if (options is AnalysisOptionsImpl) {
       strongModeHints = options.strongModeHints;
     }
@@ -3829,6 +3851,17 @@
     // TODO(brianwilkerson) Remove this method.
   }
 
+  /// Set information about enclosing declarations.
+  void prepareEnclosingDeclarations({
+    ClassElement enclosingClassElement,
+    ExecutableElement enclosingExecutableElement,
+  }) {
+    _enclosingClassDeclaration = null;
+    enclosingClass = enclosingClassElement;
+    typeAnalyzer.thisType = enclosingClass?.type;
+    _enclosingFunction = enclosingExecutableElement;
+  }
+
   /// A client is about to resolve a member in the given class declaration.
   void prepareToResolveMembersInClass(ClassDeclaration node) {
     _enclosingClassDeclaration = node;
@@ -4220,6 +4253,7 @@
         resolutionMap.elementDeclaredByFormalParameter(node.parameter)?.type);
     super.visitDefaultFormalParameter(node);
     ParameterElement element = node.declaredElement;
+
     if (element.initializer != null && node.defaultValue != null) {
       (element.initializer as FunctionElementImpl).returnType =
           node.defaultValue.staticType;
@@ -4298,51 +4332,7 @@
   }
 
   @override
-  void visitForEachStatementInScope(ForEachStatement node) {
-    Expression iterable = node.iterable;
-    DeclaredIdentifier loopVariable = node.loopVariable;
-    SimpleIdentifier identifier = node.identifier;
-
-    identifier?.accept(this);
-
-    DartType valueType;
-    if (loopVariable != null) {
-      TypeAnnotation typeAnnotation = loopVariable.type;
-      valueType = typeAnnotation?.type ?? UnknownInferredType.instance;
-    }
-    if (identifier != null) {
-      Element element = identifier.staticElement;
-      if (element is VariableElement) {
-        valueType = element.type;
-      } else if (element is PropertyAccessorElement) {
-        if (element.parameters.isNotEmpty) {
-          valueType = element.parameters[0].type;
-        }
-      }
-    }
-    if (valueType != null) {
-      InterfaceType targetType = (node.awaitKeyword == null)
-          ? typeProvider.iterableType
-          : typeProvider.streamType;
-      InferenceContext.setType(iterable, targetType.instantiate([valueType]));
-    }
-
-    //
-    // We visit the iterator before the loop variable because the loop variable
-    // cannot be in scope while visiting the iterator.
-    //
-    iterable?.accept(this);
-    loopVariable?.accept(this);
-    Statement body = node.body;
-    if (body != null) {
-      visitStatementInScope(body);
-    }
-    node.accept(elementResolver);
-    node.accept(typeAnalyzer);
-  }
-
-  @override
-  void visitForElement(ForElement node) {
+  void visitForElementInScope(ForElement node) {
     ForLoopParts forLoopParts = node.forLoopParts;
     if (forLoopParts is ForParts) {
       if (forLoopParts is ForPartsWithDeclarations) {
@@ -4394,7 +4384,7 @@
   }
 
   @override
-  void visitForStatement2InScope(ForStatement2 node) {
+  void visitForStatementInScope(ForStatement node) {
     ForLoopParts forLoopParts = node.forLoopParts;
     if (forLoopParts is ForParts) {
       if (forLoopParts is ForPartsWithDeclarations) {
@@ -4454,16 +4444,6 @@
   }
 
   @override
-  void visitForStatementInScope(ForStatement node) {
-    node.variables?.accept(this);
-    node.initialization?.accept(this);
-    InferenceContext.setType(node.condition, typeProvider.boolType);
-    node.condition?.accept(this);
-    visitStatementInScope(node.body);
-    node.updaters.accept(this);
-  }
-
-  @override
   void visitFunctionDeclaration(FunctionDeclaration node) {
     ExecutableElement outerFunction = _enclosingFunction;
     FunctionBody outerFunctionBody = _currentFunctionBody;
@@ -4541,9 +4521,6 @@
   }
 
   @override
-  void visitGenericFunctionType(GenericFunctionType node) {}
-
-  @override
   void visitGenericTypeAliasInFunctionScope(GenericTypeAlias node) {
     super.visitGenericTypeAliasInFunctionScope(node);
     safelyVisitComment(node.documentationComment);
@@ -4636,22 +4613,26 @@
 
   @override
   void visitListLiteral(ListLiteral node) {
-    InterfaceType listT;
+    InterfaceType listType;
 
-    if (node.typeArguments != null) {
-      var targs = node.typeArguments.arguments.map((t) => t.type).toList();
-      if (targs.length == 1 && !targs[0].isDynamic) {
-        listT = typeProvider.listType.instantiate([targs[0]]);
+    TypeArgumentList typeArguments = node.typeArguments;
+    if (typeArguments != null) {
+      if (typeArguments.arguments.length == 1) {
+        DartType elementType = typeArguments.arguments[0].type;
+        if (!elementType.isDynamic) {
+          listType = typeProvider.listType.instantiate([elementType]);
+        }
       }
     } else {
-      listT = typeAnalyzer.inferListType(node, downwards: true);
+      listType = typeAnalyzer.inferListType(node, downwards: true);
     }
-    if (listT != null) {
-      DartType eType = listT.typeArguments[0];
-      for (Expression child in node.elements) {
-        InferenceContext.setType(child, eType);
-      }
-      InferenceContext.setType(node, listT);
+    if (listType != null) {
+      DartType elementType = listType.typeArguments[0];
+      DartType iterableType =
+          typeProvider.iterableType.instantiate([elementType]);
+      _pushCollectionTypesDownToAll(node.elements,
+          elementType: elementType, iterableType: iterableType);
+      InferenceContext.setType(node, listType);
     } else {
       InferenceContext.clearType(node);
     }
@@ -4659,111 +4640,6 @@
   }
 
   @override
-  void visitListLiteral2(ListLiteral2 node) {
-    InterfaceType listT;
-
-    if (node.typeArguments != null) {
-      var targs = node.typeArguments.arguments.map((t) => t.type).toList();
-      if (targs.length == 1 && !targs[0].isDynamic) {
-        listT = typeProvider.listType.instantiate([targs[0]]);
-      }
-    } else {
-      listT = typeAnalyzer.inferListType2(node, downwards: true);
-    }
-    if (listT != null) {
-      for (CollectionElement element in node.elements) {
-        _pushCollectionTypesDown(element, listT);
-      }
-      InferenceContext.setType(node, listT);
-    } else {
-      InferenceContext.clearType(node);
-    }
-    super.visitListLiteral2(node);
-  }
-
-  @override
-  void visitMapLiteral(MapLiteral node) {
-    InterfaceType mapT;
-    if (node.typeArguments != null) {
-      var targs = node.typeArguments.arguments.map((t) => t.type).toList();
-      if (targs.length == 2 && targs.any((t) => !t.isDynamic)) {
-        mapT = typeProvider.mapType.instantiate([targs[0], targs[1]]);
-      }
-    } else {
-      mapT = typeAnalyzer.inferMapType(node, downwards: true);
-      if (mapT != null &&
-          node.typeArguments == null &&
-          node.entries.isEmpty &&
-          typeSystem.isAssignableTo(typeProvider.iterableObjectType, mapT) &&
-          !typeSystem.isAssignableTo(typeProvider.mapObjectObjectType, mapT)) {
-        // The node is really an empty set literal with no type arguments, so
-        // don't try to visit the replaced map literal.
-        return;
-      }
-    }
-    if (mapT != null) {
-      DartType kType = mapT.typeArguments[0];
-      DartType vType = mapT.typeArguments[1];
-      for (MapLiteralEntry entry in node.entries) {
-        InferenceContext.setType(entry.key, kType);
-        InferenceContext.setType(entry.value, vType);
-      }
-      InferenceContext.setType(node, mapT);
-    } else {
-      InferenceContext.clearType(node);
-    }
-    super.visitMapLiteral(node);
-  }
-
-  @override
-  void visitMapLiteral2(MapLiteral2 node) {
-    InterfaceType mapT;
-    if (node.typeArguments != null) {
-      var targs = node.typeArguments.arguments.map((t) => t.type).toList();
-      if (targs.length == 2 && targs.any((t) => !t.isDynamic)) {
-        mapT = typeProvider.mapType.instantiate([targs[0], targs[1]]);
-      }
-    } else {
-      mapT = typeAnalyzer.inferMapType2(node, downwards: true);
-      if (mapT != null &&
-          node.typeArguments == null &&
-          node.entries.isEmpty &&
-          typeSystem.isAssignableTo(typeProvider.iterableObjectType, mapT) &&
-          !typeSystem.isAssignableTo(typeProvider.mapObjectObjectType, mapT)) {
-        // The node is really an empty set literal with no type arguments, so
-        // don't try to visit the replaced map literal.
-        return;
-      }
-    }
-    if (mapT != null) {
-      DartType kType = mapT.typeArguments[0];
-      DartType vType = mapT.typeArguments[1];
-
-      void pushTypesDown(CollectionElement element) {
-        if (element is ForElement) {
-          pushTypesDown(element.body);
-        } else if (element is IfElement) {
-          pushTypesDown(element.thenElement);
-          pushTypesDown(element.elseElement);
-        } else if (element is MapLiteralEntry) {
-          InferenceContext.setType(element.key, kType);
-          InferenceContext.setType(element.value, vType);
-        } else if (element is SpreadElement) {
-          InferenceContext.setType(element.expression, mapT);
-        }
-      }
-
-      for (CollectionElement element in node.entries) {
-        pushTypesDown(element);
-      }
-      InferenceContext.setType(node, mapT);
-    } else {
-      InferenceContext.clearType(node);
-    }
-    super.visitMapLiteral2(node);
-  }
-
-  @override
   void visitMethodDeclaration(MethodDeclaration node) {
     ExecutableElement outerFunction = _enclosingFunction;
     FunctionBody outerFunctionBody = _currentFunctionBody;
@@ -4897,56 +4773,58 @@
   }
 
   @override
-  void visitSetLiteral(SetLiteral node) {
-    InterfaceType setT;
-
-    TypeArgumentList typeArguments = node.typeArguments;
-    if (typeArguments != null) {
+  void visitSetOrMapLiteral(SetOrMapLiteral node) {
+    var typeArguments = node.typeArguments?.arguments;
+    InterfaceType literalType;
+    var literalResolution = _computeSetOrMapResolution(node);
+    if (literalResolution.kind == _LiteralResolutionKind.set) {
+      if (typeArguments != null && typeArguments.length == 1) {
+        var elementType = typeArguments[0].type;
+        literalType = typeProvider.setType.instantiate([elementType]);
+      } else {
+        literalType = typeAnalyzer.inferSetTypeDownwards(
+            node, literalResolution.contextType);
+      }
+    } else if (literalResolution.kind == _LiteralResolutionKind.map) {
+      if (typeArguments != null && typeArguments.length == 2) {
+        var keyType = typeArguments[0].type;
+        var valueType = typeArguments[1].type;
+        literalType = typeProvider.mapType.instantiate([keyType, valueType]);
+      } else {
+        literalType = typeAnalyzer.inferMapTypeDownwards(
+            node, literalResolution.contextType);
+      }
+    } else {
+      assert(literalResolution.kind == _LiteralResolutionKind.ambiguous);
+      literalType = null;
+    }
+    if (literalType is InterfaceType) {
+      List<DartType> typeArguments = literalType.typeArguments;
       if (typeArguments.length == 1) {
-        DartType elementType = typeArguments.arguments[0].type;
-        if (!elementType.isDynamic) {
-          setT = typeProvider.setType.instantiate([elementType]);
+        DartType elementType = literalType.typeArguments[0];
+        DartType iterableType =
+            typeProvider.iterableType.instantiate([elementType]);
+        _pushCollectionTypesDownToAll(node.elements,
+            elementType: elementType, iterableType: iterableType);
+        if (!_analysisOptions.experimentStatus.spread_collections &&
+            !_analysisOptions.experimentStatus.control_flow_collections &&
+            node.elements.isEmpty &&
+            node.typeArguments == null &&
+            node.isMap) {
+          // The node is really an empty set literal with no type arguments.
+          (node as SetOrMapLiteralImpl).becomeMap();
         }
+      } else if (typeArguments.length == 2) {
+        DartType keyType = typeArguments[0];
+        DartType valueType = typeArguments[1];
+        _pushCollectionTypesDownToAll(node.elements,
+            iterableType: literalType, keyType: keyType, valueType: valueType);
       }
+      (node as SetOrMapLiteralImpl).contextType = literalType;
     } else {
-      setT = typeAnalyzer.inferSetType(node, downwards: true);
+      (node as SetOrMapLiteralImpl).contextType = null;
     }
-    if (setT != null) {
-      DartType eType = setT.typeArguments[0];
-      for (Expression child in node.elements) {
-        InferenceContext.setType(child, eType);
-      }
-      InferenceContext.setType(node, setT);
-    } else {
-      InferenceContext.clearType(node);
-    }
-    super.visitSetLiteral(node);
-  }
-
-  @override
-  void visitSetLiteral2(SetLiteral2 node) {
-    InterfaceType setT;
-
-    TypeArgumentList typeArguments = node.typeArguments;
-    if (typeArguments != null) {
-      if (typeArguments.length == 1) {
-        DartType elementType = typeArguments.arguments[0].type;
-        if (!elementType.isDynamic) {
-          setT = typeProvider.setType.instantiate([elementType]);
-        }
-      }
-    } else {
-      setT = typeAnalyzer.inferSetType2(node, downwards: true);
-    }
-    if (setT != null) {
-      for (CollectionElement element in node.elements) {
-        _pushCollectionTypesDown(element, setT);
-      }
-      InferenceContext.setType(node, setT);
-    } else {
-      InferenceContext.clearType(node);
-    }
-    super.visitSetLiteral2(node);
+    super.visitSetOrMapLiteral(node);
   }
 
   @override
@@ -5071,7 +4949,13 @@
         InterfaceType wrapperType = _enclosingFunction.isSynchronous
             ? typeProvider.iterableType
             : typeProvider.streamType;
-        type = typeSystem.mostSpecificTypeArgument(type, wrapperType);
+        if (type is InterfaceType) {
+          var asInstanceType =
+              (type as InterfaceTypeImpl).asInstanceOf(wrapperType.element);
+          if (asInstanceType != null) {
+            type = asInstanceType.typeArguments[0];
+          }
+        }
       }
       if (type != null) {
         inferenceContext.addReturnOrYieldType(type);
@@ -5140,6 +5024,62 @@
     return declaredType;
   }
 
+  /// Compute the context type for the given set or map [literal].
+  _LiteralResolution _computeSetOrMapResolution(SetOrMapLiteral literal) {
+    _LiteralResolution typeArgumentsResolution =
+        _fromTypeArguments(literal.typeArguments);
+    DartType contextType = InferenceContext.getContext(literal);
+    _LiteralResolution contextResolution = _fromContextType(contextType);
+    _LeafElements elementCounts = new _LeafElements(literal.elements);
+    _LiteralResolution elementResolution = elementCounts.resolution;
+
+    List<_LiteralResolution> unambiguousResolutions = [];
+    Set<_LiteralResolutionKind> kinds = new Set<_LiteralResolutionKind>();
+    if (typeArgumentsResolution.kind != _LiteralResolutionKind.ambiguous) {
+      unambiguousResolutions.add(typeArgumentsResolution);
+      kinds.add(typeArgumentsResolution.kind);
+    }
+    if (contextResolution.kind != _LiteralResolutionKind.ambiguous) {
+      unambiguousResolutions.add(contextResolution);
+      kinds.add(contextResolution.kind);
+    }
+    if (elementResolution.kind != _LiteralResolutionKind.ambiguous) {
+      unambiguousResolutions.add(elementResolution);
+      kinds.add(elementResolution.kind);
+    }
+
+    if (kinds.length == 2) {
+      // It looks like it needs to be both a map and a set. Attempt to recover.
+      if (elementResolution.kind == _LiteralResolutionKind.ambiguous &&
+          elementResolution.contextType != null) {
+        return elementResolution;
+      } else if (typeArgumentsResolution.kind !=
+              _LiteralResolutionKind.ambiguous &&
+          typeArgumentsResolution.contextType != null) {
+        return typeArgumentsResolution;
+      } else if (contextResolution.kind != _LiteralResolutionKind.ambiguous &&
+          contextResolution.contextType != null) {
+        return contextResolution;
+      }
+    } else if (unambiguousResolutions.length >= 2) {
+      // If there are three resolutions, the last resolution is guaranteed to be
+      // from the elements, which always has a context type of `null` (when it
+      // is not ambiguous). So, whether there are 2 or 3 resolutions only the
+      // first two are potentially interesting.
+      return unambiguousResolutions[0].contextType == null
+          ? unambiguousResolutions[1]
+          : unambiguousResolutions[0];
+    } else if (unambiguousResolutions.length == 1) {
+      return unambiguousResolutions[0];
+    } else if (literal.elements.isEmpty) {
+      return _LiteralResolution(
+          _LiteralResolutionKind.map,
+          typeProvider.mapType.instantiate(
+              [typeProvider.dynamicType, typeProvider.dynamicType]));
+    }
+    return _LiteralResolution(_LiteralResolutionKind.ambiguous, null);
+  }
+
   /// Return a newly created cloner that can be used to clone constant
   /// expressions.
   ConstantAstCloner _createCloner() {
@@ -5155,6 +5095,59 @@
     return typeProvider.futureOrType.instantiate([type]);
   }
 
+  /// If [contextType] is defined and is a subtype of `Iterable<Object>` and
+  /// [contextType] is not a subtype of `Map<Object, Object>`, then *e* is a set
+  /// literal.
+  ///
+  /// If [contextType] is defined and is a subtype of `Map<Object, Object>` and
+  /// [contextType] is not a subtype of `Iterable<Object>` then *e* is a map
+  /// literal.
+  _LiteralResolution _fromContextType(DartType contextType) {
+    if (contextType != null) {
+      DartType unwrap(DartType type) {
+        if (type is InterfaceType &&
+            type.isDartAsyncFutureOr &&
+            type.typeArguments.length == 1) {
+          return unwrap(type.typeArguments[0]);
+        }
+        return type;
+      }
+
+      DartType unwrappedContextType = unwrap(contextType);
+      // TODO(brianwilkerson) Find out what the "greatest closure" is and use that
+      // where [unwrappedContextType] is used below.
+      bool isIterable = typeSystem.isSubtypeOf(
+          unwrappedContextType, typeProvider.iterableObjectType);
+      bool isMap = typeSystem.isSubtypeOf(
+          unwrappedContextType, typeProvider.mapObjectObjectType);
+      if (isIterable && !isMap) {
+        return _LiteralResolution(
+            _LiteralResolutionKind.set, unwrappedContextType);
+      } else if (isMap && !isIterable) {
+        return _LiteralResolution(
+            _LiteralResolutionKind.map, unwrappedContextType);
+      }
+    }
+    return _LiteralResolution(_LiteralResolutionKind.ambiguous, null);
+  }
+
+  /// Return the resolution that is indicated by the given [typeArgumentList].
+  _LiteralResolution _fromTypeArguments(TypeArgumentList typeArgumentList) {
+    if (typeArgumentList != null) {
+      NodeList<TypeAnnotation> arguments = typeArgumentList.arguments;
+      if (arguments.length == 1) {
+        return _LiteralResolution(_LiteralResolutionKind.set,
+            typeProvider.setType.instantiate([arguments[0].type]));
+      } else if (arguments.length == 2) {
+        return _LiteralResolution(
+            _LiteralResolutionKind.map,
+            typeProvider.mapType
+                .instantiate([arguments[0].type, arguments[1].type]));
+      }
+    }
+    return _LiteralResolution(_LiteralResolutionKind.ambiguous, null);
+  }
+
   /// Return `true` if the given [parameter] element of the AST being resolved
   /// is resynthesized and is an API-level, not local, so has its initializer
   /// serialized.
@@ -5171,7 +5164,7 @@
 
   FunctionType _inferArgumentTypesForGeneric(AstNode inferenceNode,
       DartType uninstantiatedType, TypeArgumentList typeArguments,
-      {AstNode errorNode}) {
+      {AstNode errorNode, bool isConst: false}) {
     errorNode ??= inferenceNode;
     TypeSystem ts = typeSystem;
     if (typeArguments == null &&
@@ -5184,6 +5177,7 @@
           const <DartType>[],
           InferenceContext.getContext(inferenceNode),
           downwards: true,
+          isConst: isConst,
           errorReporter: errorReporter,
           errorNode: errorNode);
     }
@@ -5225,7 +5219,7 @@
 
       inferred = _inferArgumentTypesForGeneric(
           node, constructorType, constructor.type.typeArguments,
-          errorNode: node.constructorName);
+          isConst: node.isConst, errorNode: node.constructorName);
 
       if (inferred != null) {
         ArgumentList arguments = node.argumentList;
@@ -5361,17 +5355,50 @@
     }
   }
 
-  void _pushCollectionTypesDown(
-      CollectionElement element, ParameterizedType collectionType) {
+  void _pushCollectionTypesDown(CollectionElement element,
+      {DartType elementType,
+      @required DartType iterableType,
+      DartType keyType,
+      DartType valueType}) {
     if (element is ForElement) {
-      _pushCollectionTypesDown(element.body, collectionType);
+      _pushCollectionTypesDown(element.body,
+          elementType: elementType,
+          iterableType: iterableType,
+          keyType: keyType,
+          valueType: valueType);
     } else if (element is IfElement) {
-      _pushCollectionTypesDown(element.thenElement, collectionType);
-      _pushCollectionTypesDown(element.elseElement, collectionType);
+      _pushCollectionTypesDown(element.thenElement,
+          elementType: elementType,
+          iterableType: iterableType,
+          keyType: keyType,
+          valueType: valueType);
+      _pushCollectionTypesDown(element.elseElement,
+          elementType: elementType,
+          iterableType: iterableType,
+          keyType: keyType,
+          valueType: valueType);
     } else if (element is Expression) {
-      InferenceContext.setType(element, collectionType.typeArguments[0]);
+      InferenceContext.setType(element, elementType);
+    } else if (element is MapLiteralEntry) {
+      InferenceContext.setType(element.key, keyType);
+      InferenceContext.setType(element.value, valueType);
     } else if (element is SpreadElement) {
-      InferenceContext.setType(element.expression, collectionType);
+      InferenceContext.setType(element.expression, iterableType);
+    }
+  }
+
+  void _pushCollectionTypesDownToAll(List<CollectionElement> elements,
+      {DartType elementType,
+      @required DartType iterableType,
+      DartType keyType,
+      DartType valueType}) {
+    assert(iterableType != null);
+    for (CollectionElement element in elements) {
+      _pushCollectionTypesDown(element,
+          elementType: elementType,
+          iterableType: iterableType,
+          keyType: keyType,
+          valueType: valueType);
     }
   }
 
@@ -5763,33 +5790,34 @@
   }
 
   @override
-  void visitForEachStatement(ForEachStatement node) {
-    Scope outerNameScope = nameScope;
-    ImplicitLabelScope outerImplicitScope = _implicitLabelScope;
-    try {
-      nameScope = new EnclosedScope(nameScope);
-      _implicitLabelScope = _implicitLabelScope.nest(node);
-      visitForEachStatementInScope(node);
-    } finally {
-      nameScope = outerNameScope;
-      _implicitLabelScope = outerImplicitScope;
-    }
-  }
-
-  /// Visit the given statement after it's scope has been created. This replaces
-  /// the normal call to the inherited visit method so that ResolverVisitor can
-  /// intervene when type propagation is enabled.
-  ///
-  /// @param node the statement to be visited
-  void visitForEachStatementInScope(ForEachStatement node) {
+  void visitForEachPartsWithDeclaration(ForEachPartsWithDeclaration node) {
     //
     // We visit the iterator before the loop variable because the loop variable
     // cannot be in scope while visiting the iterator.
     //
-    node.identifier?.accept(this);
     node.iterable?.accept(this);
     node.loopVariable?.accept(this);
-    visitStatementInScope(node.body);
+  }
+
+  @override
+  void visitForElement(ForElement node) {
+    Scope outerNameScope = nameScope;
+    try {
+      nameScope = new EnclosedScope(nameScope);
+      visitForElementInScope(node);
+    } finally {
+      nameScope = outerNameScope;
+    }
+  }
+
+  /// Visit the given [node] after it's scope has been created. This replaces
+  /// the normal call to the inherited visit method so that ResolverVisitor can
+  /// intervene when type propagation is enabled.
+  void visitForElementInScope(ForElement node) {
+    // TODO(brianwilkerson) Investigate the possibility of removing the
+    //  visit...InScope methods now that type propagation is no longer done.
+    node.forLoopParts?.accept(this);
+    node.body?.accept(this);
   }
 
   @override
@@ -5822,43 +5850,16 @@
     }
   }
 
-  @override
-  void visitForStatement2(ForStatement2 node) {
-    Scope outerNameScope = nameScope;
-    ImplicitLabelScope outerImplicitScope = _implicitLabelScope;
-    try {
-      nameScope = new EnclosedScope(nameScope);
-      _implicitLabelScope = _implicitLabelScope.nest(node);
-      visitForStatement2InScope(node);
-    } finally {
-      nameScope = outerNameScope;
-      _implicitLabelScope = outerImplicitScope;
-    }
-  }
-
   /// Visit the given [node] after it's scope has been created. This replaces
   /// the normal call to the inherited visit method so that ResolverVisitor can
   /// intervene when type propagation is enabled.
-  void visitForStatement2InScope(ForStatement2 node) {
+  void visitForStatementInScope(ForStatement node) {
     // TODO(brianwilkerson) Investigate the possibility of removing the
     //  visit...InScope methods now that type propagation is no longer done.
     node.forLoopParts?.accept(this);
     visitStatementInScope(node.body);
   }
 
-  /// Visit the given statement after it's scope has been created. This replaces
-  /// the normal call to the inherited visit method so that ResolverVisitor can
-  /// intervene when type propagation is enabled.
-  ///
-  /// @param node the statement to be visited
-  void visitForStatementInScope(ForStatement node) {
-    node.variables?.accept(this);
-    node.initialization?.accept(this);
-    node.condition?.accept(this);
-    node.updaters.accept(this);
-    visitStatementInScope(node.body);
-  }
-
   @override
   void visitFunctionDeclaration(FunctionDeclaration node) {
     ExecutableElement functionElement = node.declaredElement;
@@ -6256,7 +6257,7 @@
   final TypeSystem typeSystem;
   final DartType dynamicType;
   final DartType undefinedType;
-  final bool isNonNullableMigrated;
+  final bool isNonNullableUnit;
   final AnalysisOptionsImpl analysisOptions;
   final LibraryElement definingLibrary;
   final Source source;
@@ -6274,7 +6275,7 @@
   TypeNameResolver(
       this.typeSystem,
       TypeProvider typeProvider,
-      this.isNonNullableMigrated,
+      this.isNonNullableUnit,
       this.definingLibrary,
       this.source,
       this.errorListener,
@@ -6639,18 +6640,16 @@
     return StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS;
   }
 
-  Nullability _getNullability(bool hasQuestion) {
-    Nullability nullability;
-    if (analysisOptions.experimentStatus.non_nullable) {
+  NullabilitySuffix _getNullability(bool hasQuestion) {
+    NullabilitySuffix nullability;
+    if (isNonNullableUnit) {
       if (hasQuestion) {
-        nullability = Nullability.nullable;
-      } else if (isNonNullableMigrated) {
-        nullability = Nullability.nonNullable;
+        nullability = NullabilitySuffix.question;
       } else {
-        nullability = Nullability.indeterminate;
+        nullability = NullabilitySuffix.none;
       }
     } else {
-      nullability = Nullability.indeterminate;
+      nullability = NullabilitySuffix.star;
     }
     return nullability;
   }
@@ -6794,6 +6793,25 @@
   bool _isTypeNameInTypeArgumentList(TypeName typeName) =>
       typeName.parent is TypeArgumentList;
 
+  /// Given a [typeName] that has a question mark, report an error and return
+  /// `true` if it appears in a location where a nullable type is not allowed.
+  void _reportInvalidNullableType(TypeName typeName) {
+    AstNode parent = typeName.parent;
+    if (parent is ExtendsClause || parent is ClassTypeAlias) {
+      reportErrorForNode(
+          CompileTimeErrorCode.NULLABLE_TYPE_IN_EXTENDS_CLAUSE, typeName);
+    } else if (parent is ImplementsClause) {
+      reportErrorForNode(
+          CompileTimeErrorCode.NULLABLE_TYPE_IN_IMPLEMENTS_CLAUSE, typeName);
+    } else if (parent is OnClause) {
+      reportErrorForNode(
+          CompileTimeErrorCode.NULLABLE_TYPE_IN_ON_CLAUSE, typeName);
+    } else if (parent is WithClause) {
+      reportErrorForNode(
+          CompileTimeErrorCode.NULLABLE_TYPE_IN_WITH_CLAUSE, typeName);
+    }
+  }
+
   void _resolveClassElement(TypeName node, Identifier typeName,
       TypeArgumentList argumentList, ClassElement element) {
     _setElement(typeName, element);
@@ -6833,19 +6851,22 @@
 
     var parent = node.parent;
 
-    Nullability nullability;
+    NullabilitySuffix nullabilitySuffix;
     if (parent is ClassTypeAlias ||
         parent is ExtendsClause ||
         parent is ImplementsClause ||
         parent is OnClause ||
         parent is WithClause) {
-      nullability = Nullability.nonNullable;
+      if (node.question != null) {
+        _reportInvalidNullableType(node);
+      }
+      nullabilitySuffix = NullabilitySuffix.none;
     } else {
-      nullability = _getNullability(node.question != null);
+      nullabilitySuffix = _getNullability(node.question != null);
     }
 
     var type = InterfaceTypeImpl.explicit(element, typeArguments,
-        nullability: nullability);
+        nullabilitySuffix: nullabilitySuffix);
 
     if (shouldUseWithClauseInferredTypes) {
       if (parent is WithClause && parameterCount != 0) {
@@ -6914,12 +6935,12 @@
 
   TypeParameterBoundsResolver(
       this.typeSystem, this.library, this.source, this.errorListener,
-      {bool isNonNullableMigrated = false})
+      {bool isNonNullableUnit = false})
       : libraryScope = new LibraryScope(library),
         typeNameResolver = new TypeNameResolver(
             typeSystem,
             typeSystem.typeProvider,
-            isNonNullableMigrated,
+            isNonNullableUnit,
             library,
             source,
             errorListener);
@@ -7171,6 +7192,9 @@
   /// Return the type representing the built-in type 'Map'.
   InterfaceType get mapType;
 
+  /// Return the type representing the built-in type 'Never'.
+  InterfaceType get neverType;
+
   /// Return a list containing all of the types that cannot be either extended
   /// or implemented.
   List<InterfaceType> get nonSubtypableTypes;
@@ -7316,8 +7340,8 @@
   /// An shared object representing the value 'null'.
   DartObjectImpl _nullObject;
 
-  /// The type representing the type 'Set'.
-  InterfaceType _setType;
+  /// The type representing the type 'Never'.
+  InterfaceType _neverType;
 
   /// The type representing the type 'Null'.
   InterfaceType _nullType;
@@ -7328,6 +7352,9 @@
   /// The type representing the built-in type 'Object'.
   InterfaceType _objectType;
 
+  /// The type representing the type 'Set'.
+  InterfaceType _setType;
+
   /// The type representing the built-in type 'StackTrace'.
   InterfaceType _stackTraceType;
 
@@ -7352,18 +7379,7 @@
   /// Initialize a newly created type provider to provide the types defined in
   /// the given [coreLibrary] and [asyncLibrary].
   TypeProviderImpl(LibraryElement coreLibrary, LibraryElement asyncLibrary) {
-    Namespace coreNamespace =
-        new NamespaceBuilder().createPublicNamespaceForLibrary(coreLibrary);
-    Namespace asyncNamespace =
-        new NamespaceBuilder().createPublicNamespaceForLibrary(asyncLibrary);
-    _initializeFrom(coreNamespace, asyncNamespace);
-  }
-
-  /// Initialize a newly created type provider to provide the types defined in
-  /// the given [Namespace]s.
-  TypeProviderImpl.forNamespaces(
-      Namespace coreNamespace, Namespace asyncNamespace) {
-    _initializeFrom(coreNamespace, asyncNamespace);
+    _initializeFrom(coreLibrary, asyncLibrary);
   }
 
   @override
@@ -7421,6 +7437,9 @@
   InterfaceType get mapType => _mapType;
 
   @override
+  InterfaceType get neverType => _neverType;
+
+  @override
   DartObjectImpl get nullObject {
     if (_nullObject == null) {
       _nullObject = new DartObjectImpl(nullType, NullState.NULL_STATE);
@@ -7461,12 +7480,18 @@
   @override
   DartType get undefinedType => _undefinedType;
 
-  /// Return the type with the given name from the given namespace, or `null` if
-  /// there is no class with the given name.
-  ///
-  /// @param namespace the namespace in which to search for the given name
-  /// @param typeName the name of the type being searched for
-  /// @return the type that was found
+  InterfaceType _createNever(Namespace namespace) {
+    // TODO(brianwilkerson) Remove this method when the class is defined in the
+    //  SDK.
+    CompilationUnitElement compilationUnit =
+        boolType.element.getAncestor((e) => e is CompilationUnitElement);
+    ClassElementImpl element = ElementFactory.classElement('Never', objectType);
+    element.enclosingElement = compilationUnit;
+    return element.type;
+  }
+
+  /// Return the type with the given [typeName] from the given [namespace], or
+  /// `null` if there is no class with the given name.
   InterfaceType _getType(Namespace namespace, String typeName) {
     Element element = namespace.get(typeName);
     if (element == null) {
@@ -7479,28 +7504,36 @@
 
   /// Initialize the types provided by this type provider from the given
   /// [Namespace]s.
-  void _initializeFrom(Namespace coreNamespace, Namespace asyncNamespace) {
-    _boolType = _getType(coreNamespace, "bool");
+  void _initializeFrom(
+      LibraryElement coreLibrary, LibraryElement asyncLibrary) {
+    Namespace coreNamespace =
+        new NamespaceBuilder().createPublicNamespaceForLibrary(coreLibrary);
+    Namespace asyncNamespace =
+        new NamespaceBuilder().createPublicNamespaceForLibrary(asyncLibrary);
+
+    _boolType = _getType(coreNamespace, 'bool');
     _bottomType = BottomTypeImpl.instance;
-    _deprecatedType = _getType(coreNamespace, "Deprecated");
-    _doubleType = _getType(coreNamespace, "double");
+    _deprecatedType = _getType(coreNamespace, 'Deprecated');
+    _doubleType = _getType(coreNamespace, 'double');
     _dynamicType = DynamicTypeImpl.instance;
-    _functionType = _getType(coreNamespace, "Function");
-    _futureOrType = _getType(asyncNamespace, "FutureOr");
-    _futureType = _getType(asyncNamespace, "Future");
-    _intType = _getType(coreNamespace, "int");
-    _iterableType = _getType(coreNamespace, "Iterable");
-    _listType = _getType(coreNamespace, "List");
-    _mapType = _getType(coreNamespace, "Map");
-    _nullType = _getType(coreNamespace, "Null");
-    _numType = _getType(coreNamespace, "num");
-    _objectType = _getType(coreNamespace, "Object");
-    _setType = _getType(coreNamespace, "Set");
-    _stackTraceType = _getType(coreNamespace, "StackTrace");
-    _streamType = _getType(asyncNamespace, "Stream");
-    _stringType = _getType(coreNamespace, "String");
-    _symbolType = _getType(coreNamespace, "Symbol");
-    _typeType = _getType(coreNamespace, "Type");
+    _functionType = _getType(coreNamespace, 'Function');
+    _futureOrType = _getType(asyncNamespace, 'FutureOr');
+    _futureType = _getType(asyncNamespace, 'Future');
+    _intType = _getType(coreNamespace, 'int');
+    _iterableType = _getType(coreNamespace, 'Iterable');
+    _listType = _getType(coreNamespace, 'List');
+    _mapType = _getType(coreNamespace, 'Map');
+    _neverType =
+        _getType(coreNamespace, 'Never') ?? _createNever(coreNamespace);
+    _nullType = _getType(coreNamespace, 'Null');
+    _numType = _getType(coreNamespace, 'num');
+    _objectType = _getType(coreNamespace, 'Object');
+    _setType = _getType(coreNamespace, 'Set');
+    _stackTraceType = _getType(coreNamespace, 'StackTrace');
+    _streamType = _getType(asyncNamespace, 'Stream');
+    _stringType = _getType(coreNamespace, 'String');
+    _symbolType = _getType(coreNamespace, 'Symbol');
+    _typeType = _getType(coreNamespace, 'Type');
     _undefinedType = UndefinedTypeImpl.instance;
     _futureDynamicType = _futureType.instantiate(<DartType>[_dynamicType]);
     _futureNullType = _futureType.instantiate(<DartType>[_nullType]);
@@ -7520,6 +7553,8 @@
   /// we can analyze older SDKs.
   static InterfaceType createPlaceholderFutureOr(
       InterfaceType futureType, InterfaceType objectType) {
+    // TODO(brianwilkerson) Remove this method now that the class has been
+    //  defined.
     var compilationUnit =
         futureType.element.getAncestor((e) => e is CompilationUnitElement);
     var element = ElementFactory.classElement('FutureOr', objectType, ['T']);
@@ -7566,8 +7601,8 @@
   /// Type type system in use for this resolver pass.
   TypeSystem _typeSystem;
 
-  /// Whether the library migrated to non-nullable.
-  final bool isNonNullableMigrated;
+  /// Whether the compilation unit is non-nullable.
+  final bool isNonNullableUnit;
 
   /// The helper to resolve types.
   TypeNameResolver _typeNameResolver;
@@ -7604,7 +7639,7 @@
   TypeResolverVisitor(LibraryElement definingLibrary, Source source,
       TypeProvider typeProvider, AnalysisErrorListener errorListener,
       {Scope nameScope,
-      this.isNonNullableMigrated: false,
+      this.isNonNullableUnit: false,
       this.mode: TypeResolverMode.everything,
       bool shouldUseWithClauseInferredTypes: true,
       this.shouldSetElementSupertypes: false})
@@ -7614,7 +7649,7 @@
     _undefinedType = typeProvider.undefinedType;
     _typeSystem = TypeSystem.create(definingLibrary.context);
     _typeNameResolver = new TypeNameResolver(_typeSystem, typeProvider,
-        isNonNullableMigrated, definingLibrary, source, errorListener,
+        isNonNullableUnit, definingLibrary, source, errorListener,
         shouldUseWithClauseInferredTypes: shouldUseWithClauseInferredTypes);
   }
 
@@ -8548,8 +8583,9 @@
   /// created based on [definingLibrary] and [typeProvider].
   VariableResolverVisitor(LibraryElement definingLibrary, Source source,
       TypeProvider typeProvider, AnalysisErrorListener errorListener,
-      {Scope nameScope})
-      : super(definingLibrary, source, typeProvider, errorListener,
+      {Scope nameScope, LocalVariableInfo localVariableInfo})
+      : _localVariableInfo = localVariableInfo,
+        super(definingLibrary, source, typeProvider, errorListener,
             nameScope: nameScope);
 
   @override
@@ -8559,6 +8595,12 @@
   }
 
   @override
+  void visitCompilationUnit(CompilationUnit node) {
+    _localVariableInfo = (node as CompilationUnitImpl).localVariableInfo;
+    super.visitCompilationUnit(node);
+  }
+
+  @override
   void visitConstructorDeclaration(ConstructorDeclaration node) {
     ExecutableElement outerFunction = _enclosingFunction;
     LocalVariableInfo outerLocalVariableInfo = _localVariableInfo;
@@ -8899,6 +8941,93 @@
   }
 }
 
+/// A set of counts of the kinds of leaf elements in a collection, used to help
+/// disambiguate map and set literals.
+class _LeafElements {
+  /// The number of expressions found in the collection.
+  int expressionCount = 0;
+
+  /// The number of map entries found in the collection.
+  int mapEntryCount = 0;
+
+  /// Initialize a newly created set of counts based on the given collection
+  /// [elements].
+  _LeafElements(List<CollectionElement> elements) {
+    for (CollectionElement element in elements) {
+      _count(element);
+    }
+  }
+
+  /// Return the resolution suggested by the set elements.
+  _LiteralResolution get resolution {
+    if (expressionCount > 0 && mapEntryCount == 0) {
+      return _LiteralResolution(_LiteralResolutionKind.set, null);
+    } else if (mapEntryCount > 0 && expressionCount == 0) {
+      return _LiteralResolution(_LiteralResolutionKind.map, null);
+    }
+    return _LiteralResolution(_LiteralResolutionKind.ambiguous, null);
+  }
+
+  /// Recursively add the given collection [element] to the counts.
+  void _count(CollectionElement element) {
+    if (element is ForElement) {
+      _count(element.body);
+    } else if (element is IfElement) {
+      _count(element.thenElement);
+      _count(element.elseElement);
+    } else if (element is Expression) {
+      if (_isComplete(element)) {
+        expressionCount++;
+      }
+    } else if (element is MapLiteralEntry) {
+      if (_isComplete(element)) {
+        mapEntryCount++;
+      }
+    }
+  }
+
+  /// Return `true` if the given collection [element] does not contain any
+  /// synthetic tokens.
+  bool _isComplete(CollectionElement element) {
+    // TODO(paulberry,brianwilkerson): the code below doesn't work because it
+    // assumes access to token offsets, which aren't available when working with
+    // expressions resynthesized from summaries.  For now we just assume the
+    // collection element is complete.
+    return true;
+//    Token token = element.beginToken;
+//    int endOffset = element.endToken.offset;
+//    while (token != null && token.offset <= endOffset) {
+//      if (token.isSynthetic) {
+//        return false;
+//      }
+//      token = token.next;
+//    }
+//    return true;
+  }
+}
+
+/// An indication of the way in which a set or map literal should be resolved to
+/// be either a set literal or a map literal.
+class _LiteralResolution {
+  /// The kind of collection that the literal should be.
+  final _LiteralResolutionKind kind;
+
+  /// The type that should be used as the inference context when performing type
+  /// inference for the literal.
+  DartType contextType;
+
+  /// Initialize a newly created resolution.
+  _LiteralResolution(this.kind, this.contextType);
+
+  @override
+  String toString() {
+    return '$kind ($contextType)';
+  }
+}
+
+/// The kind of literal to which an unknown literal should be resolved.
+enum _LiteralResolutionKind { ambiguous, map, set }
+
 class _ResolverVisitor_isVariableAccessedInClosure
     extends RecursiveAstVisitor<void> {
   final Element variable;
diff --git a/pkg/analyzer/lib/src/generated/scanner.dart b/pkg/analyzer/lib/src/generated/scanner.dart
index 3b21b2f..e1d6904 100644
--- a/pkg/analyzer/lib/src/generated/scanner.dart
+++ b/pkg/analyzer/lib/src/generated/scanner.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/generated/sdk.dart b/pkg/analyzer/lib/src/generated/sdk.dart
index c7ae2db..67dfd49 100644
--- a/pkg/analyzer/lib/src/generated/sdk.dart
+++ b/pkg/analyzer/lib/src/generated/sdk.dart
@@ -168,6 +168,21 @@
   List<String> get uris => _libraryMap.keys.toList();
 
   /**
+   * Return info for debugging https://github.com/dart-lang/sdk/issues/35226.
+   */
+  Map<String, Object> debugInfo() {
+    var map = <String, Object>{};
+    for (var uri in _libraryMap.keys) {
+      var lib = _libraryMap[uri];
+      map[uri] = <String, Object>{
+        'path': lib.path,
+        'shortName': lib.shortName,
+      };
+    }
+    return map;
+  }
+
+  /**
    * Return the library with the given 'dart:' [uri], or `null` if the URI does
    * not map to a library.
    */
diff --git a/pkg/analyzer/lib/src/generated/sdk_io.dart b/pkg/analyzer/lib/src/generated/sdk_io.dart
index cbdb6fe..9f8c00a 100644
--- a/pkg/analyzer/lib/src/generated/sdk_io.dart
+++ b/pkg/analyzer/lib/src/generated/sdk_io.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/generated/source.dart b/pkg/analyzer/lib/src/generated/source.dart
index f2d604f..1152e24 100644
--- a/pkg/analyzer/lib/src/generated/source.dart
+++ b/pkg/analyzer/lib/src/generated/source.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
index 23871b8..285df36 100644
--- a/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
+++ b/pkg/analyzer/lib/src/generated/static_type_analyzer.dart
@@ -10,10 +10,7 @@
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/ast/ast.dart';
-import 'package:analyzer/src/dart/ast/ast_factory.dart';
-import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/member.dart' show ConstructorMember;
 import 'package:analyzer/src/dart/element/type.dart';
@@ -55,9 +52,9 @@
   DartType _dynamicType;
 
   /**
-   * The status of the active experiments of the current context.
+   * True if inference failures should be reported, otherwise false.
    */
-  ExperimentStatus _experimentStatus;
+  bool _strictInference;
 
   /**
    * The type representing the class containing the nodes being analyzed,
@@ -80,9 +77,9 @@
     _typeSystem = _resolver.typeSystem;
     _dynamicType = _typeProvider.dynamicType;
     _promoteManager = _resolver.promoteManager;
-    _experimentStatus = (_resolver.definingLibrary.context.analysisOptions
-            as AnalysisOptionsImpl)
-        .experimentStatus;
+    AnalysisOptionsImpl analysisOptions =
+        _resolver.definingLibrary.context.analysisOptions;
+    _strictInference = analysisOptions.strictInference;
   }
 
   /**
@@ -160,39 +157,6 @@
       if (contextType == null) {
         return null;
       }
-
-      elementTypes = [];
-      parameters = [];
-    } else {
-      // Also use upwards information to infer the type.
-      elementTypes = node.elements
-          .map((e) => e.staticType)
-          .where((t) => t != null)
-          .toList();
-      var listTypeParam = _typeProvider.listType.typeParameters[0].type;
-      var syntheticParamElement = new ParameterElementImpl.synthetic(
-          'element', listTypeParam, ParameterKind.POSITIONAL);
-      parameters = new List.filled(elementTypes.length, syntheticParamElement);
-    }
-    DartType inferred = ts.inferGenericFunctionOrType<InterfaceType>(
-        _typeProvider.listType, parameters, elementTypes, contextType,
-        downwards: downwards,
-        errorReporter: _resolver.errorReporter,
-        errorNode: node);
-    return inferred;
-  }
-
-  DartType inferListType2(ListLiteral2 node, {bool downwards: false}) {
-    DartType contextType = InferenceContext.getContext(node);
-
-    var ts = _typeSystem as Dart2TypeSystem;
-    List<DartType> elementTypes;
-    List<ParameterElement> parameters;
-
-    if (downwards) {
-      if (contextType == null) {
-        return null;
-      }
       elementTypes = [];
       parameters = [];
     } else {
@@ -211,206 +175,38 @@
     InterfaceType inferred = ts.inferGenericFunctionOrType<InterfaceType>(
         _typeProvider.listType, parameters, elementTypes, contextType,
         downwards: downwards,
+        isConst: node.isConst,
         errorReporter: _resolver.errorReporter,
         errorNode: node);
     return inferred;
   }
 
-  ParameterizedType inferMapType(MapLiteral node, {bool downwards: false}) {
-    DartType contextType = InferenceContext.getContext(node);
-    if (contextType != null && _experimentStatus.set_literals) {
-      DartType unwrap(DartType type) {
-        if (type is InterfaceType &&
-            type.isDartAsyncFutureOr &&
-            type.typeArguments.length == 1) {
-          return unwrap(type.typeArguments[0]);
-        }
-        return type;
-      }
-
-      DartType unwrappedContextType = unwrap(contextType);
-      if (node.typeArguments == null &&
-          node.entries.isEmpty &&
-          _typeSystem.isAssignableTo(
-              _typeProvider.iterableObjectType, unwrappedContextType) &&
-          !_typeSystem.isAssignableTo(
-              _typeProvider.mapObjectObjectType, unwrappedContextType)) {
-        // The node is really an empty set literal with no type arguments.
-        // Rewrite the AST and infer the type of the set as appropriate.
-        SetLiteral setLiteral = new AstFactoryImpl().setLiteral(
-            node.constKeyword, null, node.leftBracket, null, node.rightBracket);
-        InferenceContext.setType(setLiteral, contextType);
-        NodeReplacer.replace(node, setLiteral);
-        DartType type = inferSetType(setLiteral, downwards: downwards);
-        setLiteral.staticType = type;
-        return type;
-      }
-    }
-    List<DartType> elementTypes;
-    List<ParameterElement> parameters;
-    if (downwards) {
-      if (contextType == null) {
-        return null;
-      }
-      elementTypes = [];
-      parameters = [];
-    } else {
-      var keyTypes =
-          node.entries.map((e) => e.key.staticType).where((t) => t != null);
-      var valueTypes =
-          node.entries.map((e) => e.value.staticType).where((t) => t != null);
-      var keyTypeParam = _typeProvider.mapType.typeParameters[0].type;
-      var valueTypeParam = _typeProvider.mapType.typeParameters[1].type;
-      var syntheticKeyParameter = new ParameterElementImpl.synthetic(
-          'key', keyTypeParam, ParameterKind.POSITIONAL);
-      var syntheticValueParameter = new ParameterElementImpl.synthetic(
-          'value', valueTypeParam, ParameterKind.POSITIONAL);
-      parameters = new List.filled(keyTypes.length, syntheticKeyParameter,
-          growable: true)
-        ..addAll(new List.filled(valueTypes.length, syntheticValueParameter));
-      elementTypes = new List<DartType>.from(keyTypes)..addAll(valueTypes);
+  ParameterizedType inferMapTypeDownwards(
+      SetOrMapLiteral node, DartType contextType) {
+    if (contextType == null) {
+      return null;
     }
 
-    // Use both downwards and upwards information to infer the type.
     var ts = _typeSystem as Dart2TypeSystem;
     ParameterizedType inferred = ts.inferGenericFunctionOrType(
-        _typeProvider.mapType, parameters, elementTypes, contextType,
-        downwards: downwards,
+        _typeProvider.mapType, [], [], contextType,
+        downwards: true,
+        isConst: node.isConst,
         errorReporter: _resolver.errorReporter,
         errorNode: node);
     return inferred;
   }
 
-  ParameterizedType inferMapType2(MapLiteral2 node, {bool downwards: false}) {
-    DartType contextType = InferenceContext.getContext(node);
-    if (contextType != null && _experimentStatus.set_literals) {
-      DartType unwrap(DartType type) {
-        if (type is InterfaceType &&
-            type.isDartAsyncFutureOr &&
-            type.typeArguments.length == 1) {
-          return unwrap(type.typeArguments[0]);
-        }
-        return type;
-      }
-
-      DartType unwrappedContextType = unwrap(contextType);
-      if (node.typeArguments == null &&
-          node.entries.isEmpty &&
-          _typeSystem.isAssignableTo(
-              _typeProvider.iterableObjectType, unwrappedContextType) &&
-          !_typeSystem.isAssignableTo(
-              _typeProvider.mapObjectObjectType, unwrappedContextType)) {
-        // The node is really an empty set literal with no type arguments.
-        // Rewrite the AST and infer the type of the set as appropriate.
-        SetLiteral setLiteral = new AstFactoryImpl().setLiteral(
-            node.constKeyword, null, node.leftBracket, null, node.rightBracket);
-        InferenceContext.setType(setLiteral, contextType);
-        NodeReplacer.replace(node, setLiteral);
-        DartType type = inferSetType(setLiteral, downwards: downwards);
-        setLiteral.staticType = type;
-        return type;
-      }
+  DartType inferSetTypeDownwards(SetOrMapLiteral node, DartType contextType) {
+    if (contextType == null) {
+      return null;
     }
-    List<DartType> elementTypes;
-    List<ParameterElement> parameters;
-    if (downwards) {
-      if (contextType == null) {
-        return null;
-      }
-      elementTypes = [];
-      parameters = [];
-    } else {
-      var keyTypes = node.entries
-          .map((entry) => _computeKeyType(entry))
-          .where((t) => t != null);
-      var valueTypes = node.entries
-          .map((entry) => _computeValueType(entry))
-          .where((t) => t != null);
-      var keyTypeParam = _typeProvider.mapType.typeParameters[0].type;
-      var valueTypeParam = _typeProvider.mapType.typeParameters[1].type;
-      var syntheticKeyParameter = new ParameterElementImpl.synthetic(
-          'key', keyTypeParam, ParameterKind.POSITIONAL);
-      var syntheticValueParameter = new ParameterElementImpl.synthetic(
-          'value', valueTypeParam, ParameterKind.POSITIONAL);
-      parameters = new List.filled(keyTypes.length, syntheticKeyParameter,
-          growable: true)
-        ..addAll(new List.filled(valueTypes.length, syntheticValueParameter));
-      elementTypes = new List<DartType>.from(keyTypes)..addAll(valueTypes);
-    }
-
-    // Use both downwards and upwards information to infer the type.
-    var ts = _typeSystem as Dart2TypeSystem;
-    ParameterizedType inferred = ts.inferGenericFunctionOrType(
-        _typeProvider.mapType, parameters, elementTypes, contextType,
-        downwards: downwards,
-        errorReporter: _resolver.errorReporter,
-        errorNode: node);
-    return inferred;
-  }
-
-  DartType inferSetType(SetLiteral node, {bool downwards: false}) {
-    DartType contextType = InferenceContext.getContext(node);
 
     var ts = _typeSystem as Dart2TypeSystem;
-    List<DartType> elementTypes;
-    List<ParameterElement> parameters;
-
-    if (downwards) {
-      if (contextType == null) {
-        return null;
-      }
-
-      elementTypes = [];
-      parameters = [];
-    } else {
-      // Also use upwards information to infer the type.
-      elementTypes = node.elements
-          .map((e) => e.staticType)
-          .where((t) => t != null)
-          .toList();
-      var setTypeParam = _typeProvider.setType.typeParameters[0].type;
-      var syntheticParamElement = new ParameterElementImpl.synthetic(
-          'element', setTypeParam, ParameterKind.POSITIONAL);
-      parameters = new List.filled(elementTypes.length, syntheticParamElement);
-    }
     DartType inferred = ts.inferGenericFunctionOrType<InterfaceType>(
-        _typeProvider.setType, parameters, elementTypes, contextType,
-        downwards: downwards,
-        errorReporter: _resolver.errorReporter,
-        errorNode: node);
-    return inferred;
-  }
-
-  DartType inferSetType2(SetLiteral2 node, {bool downwards: false}) {
-    DartType contextType = InferenceContext.getContext(node);
-
-    var ts = _typeSystem as Dart2TypeSystem;
-    List<DartType> elementTypes;
-    List<ParameterElement> parameters;
-
-    if (downwards) {
-      if (contextType == null) {
-        return null;
-      }
-
-      elementTypes = [];
-      parameters = [];
-    } else {
-      // Also use upwards information to infer the type.
-      elementTypes = node.elements
-          .map((element) => _computeElementType(element))
-          .where((t) => t != null)
-          .toList();
-      TypeParameterType setTypeParam =
-          _typeProvider.setType.typeParameters[0].type;
-      ParameterElementImpl syntheticParamElement =
-          new ParameterElementImpl.synthetic(
-              'element', setTypeParam, ParameterKind.POSITIONAL);
-      parameters = new List.filled(elementTypes.length, syntheticParamElement);
-    }
-    DartType inferred = ts.inferGenericFunctionOrType<InterfaceType>(
-        _typeProvider.setType, parameters, elementTypes, contextType,
-        downwards: downwards,
+        _typeProvider.setType, [], [], contextType,
+        downwards: true,
+        isConst: node.isConst,
         errorReporter: _resolver.errorReporter,
         errorNode: node);
     return inferred;
@@ -830,149 +626,6 @@
     _recordStaticType(node, listDynamicType);
   }
 
-  @override
-  void visitListLiteral2(ListLiteral2 node) {
-    TypeArgumentList typeArguments = node.typeArguments;
-
-    // If we have explicit arguments, use them
-    if (typeArguments != null) {
-      DartType staticType = _dynamicType;
-      NodeList<TypeAnnotation> arguments = typeArguments.arguments;
-      if (arguments != null && arguments.length == 1) {
-        DartType argumentType = _getType(arguments[0]);
-        if (argumentType != null) {
-          staticType = argumentType;
-        }
-      }
-      _recordStaticType(
-          node, _typeProvider.listType.instantiate(<DartType>[staticType]));
-      return;
-    }
-
-    DartType listDynamicType =
-        _typeProvider.listType.instantiate(<DartType>[_dynamicType]);
-
-    // If there are no type arguments, try to infer some arguments.
-    DartType inferred = inferListType2(node);
-
-    if (inferred != listDynamicType) {
-      // TODO(jmesserly): this results in an "inferred" message even when we
-      // in fact had an error above, because it will still attempt to return
-      // a type. Perhaps we should record inference from TypeSystem if
-      // everything was successful?
-      _resolver.inferenceContext.recordInference(node, inferred);
-      _recordStaticType(node, inferred);
-      return;
-    }
-
-    // If we have no type arguments and couldn't infer any, use dynamic.
-    _recordStaticType(node, listDynamicType);
-  }
-
-  /**
-   * The Dart Language Specification, 12.7: <blockquote>The static type of a map literal of the form
-   * <i><b>const</b> &lt;K, V&gt; {k<sub>1</sub>:e<sub>1</sub>, &hellip;,
-   * k<sub>n</sub>:e<sub>n</sub>}</i> or the form <i>&lt;K, V&gt; {k<sub>1</sub>:e<sub>1</sub>,
-   * &hellip;, k<sub>n</sub>:e<sub>n</sub>}</i> is `Map&lt;K, V&gt;`. The static type a map
-   * literal of the form <i><b>const</b> {k<sub>1</sub>:e<sub>1</sub>, &hellip;,
-   * k<sub>n</sub>:e<sub>n</sub>}</i> or the form <i>{k<sub>1</sub>:e<sub>1</sub>, &hellip;,
-   * k<sub>n</sub>:e<sub>n</sub>}</i> is `Map&lt;dynamic, dynamic&gt;`.
-   *
-   * It is a compile-time error if the first type argument to a map literal is not
-   * <i>String</i>.</blockquote>
-   */
-  @override
-  void visitMapLiteral(MapLiteral node) {
-    TypeArgumentList typeArguments = node.typeArguments;
-
-    // If we have type arguments, use them
-    if (typeArguments != null) {
-      DartType staticKeyType = _dynamicType;
-      DartType staticValueType = _dynamicType;
-      NodeList<TypeAnnotation> arguments = typeArguments.arguments;
-      if (arguments != null && arguments.length == 2) {
-        DartType entryKeyType = _getType(arguments[0]);
-        if (entryKeyType != null) {
-          staticKeyType = entryKeyType;
-        }
-        DartType entryValueType = _getType(arguments[1]);
-        if (entryValueType != null) {
-          staticValueType = entryValueType;
-        }
-      }
-      _recordStaticType(
-          node,
-          _typeProvider.mapType
-              .instantiate(<DartType>[staticKeyType, staticValueType]));
-      return;
-    }
-
-    DartType mapDynamicType = _typeProvider.mapType
-        .instantiate(<DartType>[_dynamicType, _dynamicType]);
-
-    // If we have no explicit type arguments, try to infer type arguments.
-    ParameterizedType inferred = inferMapType(node);
-
-    if (inferred != mapDynamicType) {
-      // TODO(jmesserly): this results in an "inferred" message even when we
-      // in fact had an error above, because it will still attempt to return
-      // a type. Perhaps we should record inference from TypeSystem if
-      // everything was successful?
-      _resolver.inferenceContext.recordInference(node, inferred);
-      _recordStaticType(node, inferred);
-      return;
-    }
-
-    // If no type arguments and no inference, use dynamic
-    _recordStaticType(node, mapDynamicType);
-  }
-
-  @override
-  void visitMapLiteral2(MapLiteral2 node) {
-    TypeArgumentList typeArguments = node.typeArguments;
-
-    // If we have type arguments, use them
-    if (typeArguments != null) {
-      DartType staticKeyType = _dynamicType;
-      DartType staticValueType = _dynamicType;
-      NodeList<TypeAnnotation> arguments = typeArguments.arguments;
-      if (arguments != null && arguments.length == 2) {
-        DartType entryKeyType = _getType(arguments[0]);
-        if (entryKeyType != null) {
-          staticKeyType = entryKeyType;
-        }
-        DartType entryValueType = _getType(arguments[1]);
-        if (entryValueType != null) {
-          staticValueType = entryValueType;
-        }
-      }
-      _recordStaticType(
-          node,
-          _typeProvider.mapType
-              .instantiate(<DartType>[staticKeyType, staticValueType]));
-      return;
-    }
-
-    DartType mapDynamicType = _typeProvider.mapType
-        .instantiate(<DartType>[_dynamicType, _dynamicType]);
-
-    // If we have no explicit type arguments, try to infer type arguments.
-    ParameterizedType inferred = inferMapType2(node);
-
-    if (inferred != mapDynamicType) {
-      // TODO(jmesserly): this results in an "inferred" message even when we
-      // in fact had an error above, because it will still attempt to return
-      // a type. Perhaps we should record inference from TypeSystem if
-      // everything was successful?
-      _resolver.inferenceContext.recordInference(node, inferred);
-      _recordStaticType(node, inferred);
-      return;
-    }
-
-    // If no type arguments and no inference, use dynamic
-    _recordStaticType(node, mapDynamicType);
-  }
-
   /**
    * The Dart Language Specification, 12.15.1: <blockquote>An ordinary method invocation <i>i</i>
    * has the form <i>o.m(a<sub>1</sub>, &hellip;, a<sub>n</sub>, x<sub>n+1</sub>: a<sub>n+1</sub>,
@@ -1073,13 +726,19 @@
   @override
   void visitPostfixExpression(PostfixExpression node) {
     Expression operand = node.operand;
-    DartType staticType = _getStaticType(operand, read: true);
+    TypeImpl staticType = _getStaticType(operand, read: true);
 
-    // No need to check for `intVar++`, the result is `int`.
-    if (!staticType.isDartCoreInt) {
-      var operatorElement = node.staticElement;
-      var operatorReturnType = _computeStaticReturnType(operatorElement);
-      _checkForInvalidAssignmentIncDec(node, operand, operatorReturnType);
+    if (node.operator.type == TokenType.BANG) {
+      // TODO(paulberry): This does the wrong thing if staticType is a type
+      // parameter type.
+      staticType = staticType.withNullability(NullabilitySuffix.none);
+    } else {
+      // No need to check for `intVar++`, the result is `int`.
+      if (!staticType.isDartCoreInt) {
+        var operatorElement = node.staticElement;
+        var operatorReturnType = _computeStaticReturnType(operatorElement);
+        _checkForInvalidAssignmentIncDec(node, operand, operatorReturnType);
+      }
     }
 
     _recordStaticType(node, staticType);
@@ -1221,81 +880,42 @@
   }
 
   @override
-  void visitSetLiteral(SetLiteral node) {
-    TypeArgumentList typeArguments = node.typeArguments;
+  void visitSetOrMapLiteral(SetOrMapLiteral node) {
+    var typeArguments = node.typeArguments?.arguments;
 
-    // If we have type arguments, use them
+    // If we have type arguments, use them.
+    // TODO(paulberry): this logic seems redundant with
+    //  ResolverVisitor._fromTypeArguments
     if (typeArguments != null) {
-      DartType elementType = _dynamicType;
-      NodeList<TypeAnnotation> arguments = typeArguments.arguments;
-      if (arguments != null && arguments.length == 1) {
-        DartType type = _getType(arguments[0]);
-        if (type != null) {
-          elementType = type;
-        }
+      if (typeArguments.length == 1) {
+        (node as SetOrMapLiteralImpl).becomeSet();
+        var elementType = _getType(typeArguments[0]) ?? _dynamicType;
+        _recordStaticType(
+            node, _typeProvider.setType.instantiate(<DartType>[elementType]));
+        return;
+      } else if (typeArguments.length == 2) {
+        (node as SetOrMapLiteralImpl).becomeMap();
+        var keyType = _getType(typeArguments[0]) ?? _dynamicType;
+        var valueType = _getType(typeArguments[1]) ?? _dynamicType;
+        _recordStaticType(node,
+            _typeProvider.mapType.instantiate(<DartType>[keyType, valueType]));
+        return;
       }
-      _recordStaticType(
-          node, _typeProvider.setType.instantiate(<DartType>[elementType]));
-      return;
+      // If we get here, then a nonsense number of type arguments were provided,
+      // so treat it as though no type arguments were provided.
     }
-
-    DartType setDynamicType =
-        _typeProvider.setType.instantiate(<DartType>[_dynamicType]);
-
-    // If we have no explicit type arguments, try to infer type arguments.
-    ParameterizedType inferred = inferSetType(node);
-
-    if (inferred != setDynamicType) {
-      // TODO(jmesserly): this results in an "inferred" message even when we
-      // in fact had an error above, because it will still attempt to return
-      // a type. Perhaps we should record inference from TypeSystem if
-      // everything was successful?
-      _resolver.inferenceContext.recordInference(node, inferred);
-      _recordStaticType(node, inferred);
-      return;
+    DartType literalType = _inferSetOrMapLiteralType(node);
+    if (literalType.isDynamic) {
+      // The literal is ambiguous, and further analysis won't resolve the
+      // ambiguity.  Leave it as neither a set nor a map.
+    } else if (literalType.element == _typeProvider.mapType.element) {
+      (node as SetOrMapLiteralImpl).becomeMap();
+    } else {
+      assert(literalType.element == _typeProvider.setType.element);
+      (node as SetOrMapLiteralImpl).becomeSet();
     }
-
-    // If no type arguments and no inference, use dynamic
-    _recordStaticType(node, setDynamicType);
-  }
-
-  @override
-  void visitSetLiteral2(SetLiteral2 node) {
-    TypeArgumentList typeArguments = node.typeArguments;
-
-    // If we have type arguments, use them
-    if (typeArguments != null) {
-      DartType elementType = _dynamicType;
-      NodeList<TypeAnnotation> arguments = typeArguments.arguments;
-      if (arguments != null && arguments.length == 1) {
-        DartType type = _getType(arguments[0]);
-        if (type != null) {
-          elementType = type;
-        }
-      }
-      _recordStaticType(
-          node, _typeProvider.setType.instantiate(<DartType>[elementType]));
-      return;
-    }
-
-    DartType setDynamicType =
-        _typeProvider.setType.instantiate(<DartType>[_dynamicType]);
-
-    // If we have no explicit type arguments, try to infer type arguments.
-    ParameterizedType inferred = inferSetType2(node);
-
-    if (inferred != setDynamicType) {
-      // TODO(jmesserly): this results in an "inferred" message even when we
-      // in fact had an error above, because it will still attempt to return
-      // a type. Perhaps we should record inference from TypeSystem if
-      // everything was successful?
-      _resolver.inferenceContext.recordInference(node, inferred);
-      _recordStaticType(node, inferred);
-      return;
-    }
-
-    // If no type arguments and no inference, use dynamic
-    _recordStaticType(node, setDynamicType);
+    _resolver.inferenceContext.recordInference(node, literalType);
+    _recordStaticType(node, literalType);
   }
 
   /**
@@ -1509,16 +1129,30 @@
       return _typeSystem.leastUpperBound(thenType, elseType);
     } else if (element is Expression) {
       return element.staticType;
+    } else if (element is MapLiteralEntry) {
+      // This error will be reported elsewhere.
+      return _typeProvider.dynamicType;
     } else if (element is SpreadElement) {
-      DartType collectionType = element.expression.staticType;
-      if (collectionType is ParameterizedType) {
-        List<DartType> typeArguments = collectionType.typeArguments;
-        if (typeArguments.length == 1) {
-          return typeArguments[0];
+      DartType expressionType = element.expression.staticType;
+      bool isNull = expressionType.isDartCoreNull;
+      if (!isNull && expressionType is InterfaceType) {
+        if (_typeSystem.isSubtypeOf(
+            expressionType, _typeProvider.iterableObjectType)) {
+          InterfaceType iterableType = (expressionType as InterfaceTypeImpl)
+              .asInstanceOf(_typeProvider.iterableType.element);
+          return iterableType.typeArguments[0];
         }
+      } else if (expressionType.isDynamic) {
+        return expressionType;
+      } else if (isNull &&
+          element.spreadOperator.type ==
+              TokenType.PERIOD_PERIOD_PERIOD_QUESTION) {
+        return expressionType;
       }
+      // TODO(brianwilkerson) Report this as an error.
+      return _typeProvider.dynamicType;
     }
-    return null;
+    throw StateError('Unhandled element type ${element.runtimeType}');
   }
 
   /**
@@ -1536,30 +1170,6 @@
     return _dynamicType;
   }
 
-  DartType _computeKeyType(CollectionElement element) {
-    if (element is ForElement) {
-      return _computeKeyType(element.body);
-    } else if (element is IfElement) {
-      DartType thenType = _computeKeyType(element.thenElement);
-      if (element.elseElement == null) {
-        return thenType;
-      }
-      DartType elseType = _computeKeyType(element.elseElement);
-      return _typeSystem.leastUpperBound(thenType, elseType);
-    } else if (element is MapLiteralEntry) {
-      return element.key.staticType;
-    } else if (element is SpreadElement) {
-      DartType collectionType = element.expression.staticType;
-      if (collectionType is ParameterizedType) {
-        List<DartType> typeArguments = collectionType.typeArguments;
-        if (typeArguments.length == 2) {
-          return typeArguments[0];
-        }
-      }
-    }
-    return null;
-  }
-
   /**
    * Given a function body and its return type, compute the return type of
    * the entire function, taking into account whether the function body
@@ -1626,30 +1236,6 @@
     return returnType.type;
   }
 
-  DartType _computeValueType(CollectionElement element) {
-    if (element is ForElement) {
-      return _computeValueType(element.body);
-    } else if (element is IfElement) {
-      DartType thenType = _computeValueType(element.thenElement);
-      if (element.elseElement == null) {
-        return thenType;
-      }
-      DartType elseType = _computeValueType(element.elseElement);
-      return _typeSystem.leastUpperBound(thenType, elseType);
-    } else if (element is MapLiteralEntry) {
-      return element.value.staticType;
-    } else if (element is SpreadElement) {
-      DartType collectionType = element.expression.staticType;
-      if (collectionType is ParameterizedType) {
-        List<DartType> typeArguments = collectionType.typeArguments;
-        if (typeArguments.length == 2) {
-          return typeArguments[1];
-        }
-      }
-    }
-    return null;
-  }
-
   DartType _findIteratedType(DartType type, DartType targetType) {
     // TODO(vsm): Use leafp's matchType here?
     // Set by _find if match is found
@@ -1813,6 +1399,70 @@
     return functionType.returnType;
   }
 
+  _InferredCollectionElementTypeInformation _inferCollectionElementType(
+      CollectionElement element) {
+    if (element is ForElement) {
+      return _inferCollectionElementType(element.body);
+    } else if (element is IfElement) {
+      _InferredCollectionElementTypeInformation thenType =
+          _inferCollectionElementType(element.thenElement);
+      if (element.elseElement == null) {
+        return thenType;
+      }
+      _InferredCollectionElementTypeInformation elseType =
+          _inferCollectionElementType(element.elseElement);
+      return _InferredCollectionElementTypeInformation.forIfElement(
+          _typeSystem, thenType, elseType);
+    } else if (element is Expression) {
+      return _InferredCollectionElementTypeInformation(
+          elementType: element.staticType, keyType: null, valueType: null);
+    } else if (element is MapLiteralEntry) {
+      return _InferredCollectionElementTypeInformation(
+          elementType: null,
+          keyType: element.key.staticType,
+          valueType: element.value.staticType);
+    } else if (element is SpreadElement) {
+      DartType expressionType = element.expression.staticType;
+      bool isNull = expressionType.isDartCoreNull;
+      if (!isNull && expressionType is InterfaceType) {
+        if (_typeSystem.isSubtypeOf(
+            expressionType, _typeProvider.iterableObjectType)) {
+          InterfaceType iterableType = (expressionType as InterfaceTypeImpl)
+              .asInstanceOf(_typeProvider.iterableType.element);
+          return _InferredCollectionElementTypeInformation(
+              elementType: iterableType.typeArguments[0],
+              keyType: null,
+              valueType: null);
+        } else if (_typeSystem.isSubtypeOf(
+            expressionType, _typeProvider.mapObjectObjectType)) {
+          InterfaceType mapType = (expressionType as InterfaceTypeImpl)
+              .asInstanceOf(_typeProvider.mapType.element);
+          List<DartType> typeArguments = mapType.typeArguments;
+          return _InferredCollectionElementTypeInformation(
+              elementType: null,
+              keyType: typeArguments[0],
+              valueType: typeArguments[1]);
+        }
+      } else if (expressionType.isDynamic) {
+        return _InferredCollectionElementTypeInformation(
+            elementType: expressionType,
+            keyType: expressionType,
+            valueType: expressionType);
+      } else if (isNull &&
+          element.spreadOperator.type ==
+              TokenType.PERIOD_PERIOD_PERIOD_QUESTION) {
+        return _InferredCollectionElementTypeInformation(
+            elementType: expressionType,
+            keyType: expressionType,
+            valueType: expressionType);
+      }
+      return _InferredCollectionElementTypeInformation(
+          elementType: null, keyType: null, valueType: null);
+    } else {
+      throw StateError('Unknown element type ${element.runtimeType}');
+    }
+  }
+
   /**
    * Given a declared identifier from a foreach loop, attempt to infer
    * a type for it if one is not already present.  Inference is based
@@ -1820,15 +1470,27 @@
    * is defined.
    */
   void _inferForEachLoopVariableType(DeclaredIdentifier loopVariable) {
-    if (loopVariable != null &&
-        loopVariable.type == null &&
-        loopVariable.parent is ForEachStatement) {
-      ForEachStatement loop = loopVariable.parent;
-      if (loop.iterable != null) {
-        Expression expr = loop.iterable;
+    if (loopVariable != null && loopVariable.type == null) {
+      AstNode parent = loopVariable.parent;
+      Token awaitKeyword;
+      Expression iterable;
+      if (parent is ForEachPartsWithDeclaration) {
+        AstNode parentParent = parent.parent;
+        if (parentParent is ForStatementImpl) {
+          awaitKeyword = parentParent.awaitKeyword;
+        } else if (parentParent is ForElement) {
+          awaitKeyword = parentParent.awaitKeyword;
+        } else {
+          return;
+        }
+        iterable = parent.iterable;
+      } else {
+        return;
+      }
+      if (iterable != null) {
         LocalVariableElementImpl element = loopVariable.declaredElement;
-        DartType exprType = expr.staticType;
-        DartType targetType = (loop.awaitKeyword == null)
+        DartType exprType = iterable.staticType;
+        DartType targetType = (awaitKeyword == null)
             ? _typeProvider.iterableType
             : _typeProvider.streamType;
         DartType iteratedType = _findIteratedType(exprType, targetType);
@@ -1893,7 +1555,8 @@
       DartType fnType,
       TypeArgumentList typeArguments,
       ArgumentList argumentList,
-      AstNode errorNode) {
+      AstNode errorNode,
+      {bool isConst: false}) {
     TypeSystem ts = _typeSystem;
     if (typeArguments == null &&
         fnType is FunctionType &&
@@ -1915,7 +1578,9 @@
       }
       return ts.inferGenericFunctionOrType(
           fnType, params, argTypes, InferenceContext.getContext(node),
-          errorReporter: _resolver.errorReporter, errorNode: errorNode);
+          isConst: isConst,
+          errorReporter: _resolver.errorReporter,
+          errorNode: errorNode);
     }
     return null;
   }
@@ -1953,7 +1618,8 @@
 
     ArgumentList arguments = node.argumentList;
     FunctionType inferred = _inferGenericInvoke(node, constructorType,
-        constructor.type.typeArguments, arguments, node.constructorName);
+        constructor.type.typeArguments, arguments, node.constructorName,
+        isConst: node.isConst);
 
     if (inferred != null && inferred != originalElement.type) {
       // Fix up the parameter elements based on inferred method.
@@ -1995,8 +1661,8 @@
    */
   void _inferLocalVariableType(
       VariableDeclaration node, Expression initializer) {
+    AstNode parent = node.parent;
     if (initializer != null) {
-      AstNode parent = node.parent;
       if (parent is VariableDeclarationList && parent.type == null) {
         DartType type = resolutionMap.staticTypeForExpression(initializer);
         if (type != null && !type.isBottom && !type.isDartCoreNull) {
@@ -2007,6 +1673,14 @@
           }
         }
       }
+    } else if (_strictInference) {
+      if (parent is VariableDeclarationList && parent.type == null) {
+        _resolver.errorReporter.reportTypeErrorForNode(
+          HintCode.INFERENCE_FAILURE_ON_UNINITIALIZED_VARIABLE,
+          node,
+          [node.name.name],
+        );
+      }
     }
   }
 
@@ -2115,6 +1789,62 @@
     return false;
   }
 
+  DartType _inferSetOrMapLiteralType(SetOrMapLiteral literal) {
+    var literalImpl = literal as SetOrMapLiteralImpl;
+    DartType contextType = literalImpl.contextType;
+    literalImpl.contextType = null; // Not needed anymore.
+    NodeList<CollectionElement> elements = literal.elements;
+    List<_InferredCollectionElementTypeInformation> inferredTypes = [];
+    bool canBeAMap = true;
+    bool mustBeAMap = false;
+    bool canBeASet = true;
+    bool mustBeASet = false;
+    for (CollectionElement element in elements) {
+      _InferredCollectionElementTypeInformation inferredType =
+          _inferCollectionElementType(element);
+      inferredTypes.add(inferredType);
+      canBeAMap = canBeAMap && inferredType.canBeAMap;
+      mustBeAMap = mustBeAMap || inferredType.mustBeAMap;
+      canBeASet = canBeASet && inferredType.canBeASet;
+      mustBeASet = mustBeASet || inferredType.mustBeASet;
+    }
+    if (canBeASet && mustBeASet) {
+      return _toSetType(literal, contextType, inferredTypes);
+    } else if (canBeAMap && mustBeAMap) {
+      return _toMapType(literal, contextType, inferredTypes);
+    }
+    // Note: according to the spec, the following computations should be based
+    // on the greatest closure of the context type (unless the context type is
+    // `?`).  In practice, we can just use the context type directly, because
+    // the only way the greatest closure of the context type could possibly have
+    // a different subtype relationship to `Iterable<Object>` and
+    // `Map<Object, Object>` is if the context type is `?`.
+    bool contextProvidesAmbiguityResolutionClues =
+        contextType != null && contextType is! UnknownInferredType;
+    bool contextIsIterable = contextProvidesAmbiguityResolutionClues &&
+        _typeSystem.isSubtypeOf(contextType, _typeProvider.iterableObjectType);
+    bool contextIsMap = contextProvidesAmbiguityResolutionClues &&
+        _typeSystem.isSubtypeOf(contextType, _typeProvider.mapObjectObjectType);
+    if (contextIsIterable && !contextIsMap) {
+      return _toSetType(literal, contextType, inferredTypes);
+    } else if ((contextIsMap && !contextIsIterable) || elements.isEmpty) {
+      return _toMapType(literal, contextType, inferredTypes);
+    } else {
+      // Ambiguous.  We're not going to get any more information to resolve the
+      // ambiguity.  We don't want to make an arbitrary decision at this point
+      // because it will interfere with future type inference (see
+      // dartbug.com/36210), so we return a type of `dynamic`.
+      if (mustBeAMap && mustBeASet) {
+        _resolver.errorReporter.reportErrorForNode(
+            CompileTimeErrorCode.AMBIGUOUS_SET_OR_MAP_LITERAL_BOTH, literal);
+      } else {
+        _resolver.errorReporter.reportErrorForNode(
+            CompileTimeErrorCode.AMBIGUOUS_SET_OR_MAP_LITERAL_EITHER, literal);
+      }
+      return _typeProvider.dynamicType;
+    }
+  }
+
   /**
    * Return `true` if the given [node] is not a type literal.
    */
@@ -2145,6 +1875,59 @@
     }
   }
 
+  DartType _toMapType(SetOrMapLiteral node, DartType contextType,
+      List<_InferredCollectionElementTypeInformation> inferredTypes) {
+    DartType dynamicType = _typeProvider.dynamicType;
+    List<DartType> keyTypes = [];
+    List<DartType> valueTypes = [];
+    for (int i = 0; i < inferredTypes.length; i++) {
+      keyTypes.add(inferredTypes[i].keyType ?? dynamicType);
+      valueTypes.add(inferredTypes[i].valueType ?? dynamicType);
+    }
+    TypeParameterType keyTypeParam =
+        _typeProvider.mapType.typeParameters[0].type;
+    TypeParameterType valueTypeParam =
+        _typeProvider.mapType.typeParameters[1].type;
+    ParameterElementImpl syntheticKeyParameter =
+        new ParameterElementImpl.synthetic(
+            'key', keyTypeParam, ParameterKind.POSITIONAL);
+    ParameterElementImpl syntheticValueParameter =
+        new ParameterElementImpl.synthetic(
+            'value', valueTypeParam, ParameterKind.POSITIONAL);
+    List<ParameterElement> typeParameters =
+        new List.filled(keyTypes.length, syntheticKeyParameter, growable: true)
+          ..addAll(new List.filled(valueTypes.length, syntheticValueParameter));
+    List<DartType> elementTypes = new List<DartType>.from(keyTypes)
+      ..addAll(valueTypes);
+    return (_typeSystem as Dart2TypeSystem).inferGenericFunctionOrType(
+        _typeProvider.mapType, typeParameters, elementTypes, contextType,
+        isConst: node.isConst,
+        errorReporter: _resolver.errorReporter,
+        errorNode: node);
+  }
+
+  DartType _toSetType(SetOrMapLiteral node, DartType contextType,
+      List<_InferredCollectionElementTypeInformation> inferredTypes) {
+    DartType dynamicType = _typeProvider.dynamicType;
+    List<DartType> elementTypes = [];
+    for (int i = 0; i < inferredTypes.length; i++) {
+      elementTypes.add(inferredTypes[i].elementType ?? dynamicType);
+    }
+    TypeParameterType elementTypeParam =
+        _typeProvider.setType.typeParameters[0].type;
+    ParameterElementImpl syntheticElementParameter =
+        new ParameterElementImpl.synthetic(
+            'key', elementTypeParam, ParameterKind.POSITIONAL);
+    List<ParameterElement> parameters = new List.filled(
+        elementTypes.length, syntheticElementParameter,
+        growable: true);
+    return (_typeSystem as Dart2TypeSystem).inferGenericFunctionOrType(
+        _typeProvider.setType, parameters, elementTypes, contextType,
+        isConst: node.isConst,
+        errorReporter: _resolver.errorReporter,
+        errorNode: node);
+  }
+
   /**
    * Given a constructor for a generic type, returns the equivalent generic
    * function type that we could use to forward to the constructor, or for a
@@ -2180,3 +1963,77 @@
     return new FunctionTypeImpl.fresh(function.type);
   }
 }
+
+class _InferredCollectionElementTypeInformation {
+  final DartType elementType;
+  final DartType keyType;
+  final DartType valueType;
+
+  _InferredCollectionElementTypeInformation(
+      {this.elementType, this.keyType, this.valueType});
+
+  factory _InferredCollectionElementTypeInformation.forIfElement(
+      TypeSystem typeSystem,
+      _InferredCollectionElementTypeInformation thenInfo,
+      _InferredCollectionElementTypeInformation elseInfo) {
+    if (thenInfo.isDynamic) {
+      DartType dynamic = thenInfo.elementType;
+      return _InferredCollectionElementTypeInformation(
+          elementType: _dynamicOrNull(elseInfo.elementType, dynamic),
+          keyType: _dynamicOrNull(elseInfo.keyType, dynamic),
+          valueType: _dynamicOrNull(elseInfo.valueType, dynamic));
+    } else if (elseInfo.isDynamic) {
+      DartType dynamic = elseInfo.elementType;
+      return _InferredCollectionElementTypeInformation(
+          elementType: _dynamicOrNull(thenInfo.elementType, dynamic),
+          keyType: _dynamicOrNull(thenInfo.keyType, dynamic),
+          valueType: _dynamicOrNull(thenInfo.valueType, dynamic));
+    }
+    return _InferredCollectionElementTypeInformation(
+        elementType: _leastUpperBoundOfTypes(
+            typeSystem, thenInfo.elementType, elseInfo.elementType),
+        keyType: _leastUpperBoundOfTypes(
+            typeSystem, thenInfo.keyType, elseInfo.keyType),
+        valueType: _leastUpperBoundOfTypes(
+            typeSystem, thenInfo.valueType, elseInfo.valueType));
+  }
+
+  bool get canBeAMap => keyType != null || valueType != null;
+
+  bool get canBeASet => elementType != null;
+
+  bool get isDynamic =>
+      elementType != null &&
+      elementType.isDynamic &&
+      keyType != null &&
+      keyType.isDynamic &&
+      valueType != null &&
+      valueType.isDynamic;
+
+  bool get mustBeAMap => canBeAMap && elementType == null;
+
+  bool get mustBeASet => canBeASet && keyType == null && valueType == null;
+
+  @override
+  String toString() {
+    return '($elementType, $keyType, $valueType)';
+  }
+
+  static DartType _dynamicOrNull(DartType type, DartType dynamic) {
+    if (type == null) {
+      return null;
+    }
+    return dynamic;
+  }
+
+  static DartType _leastUpperBoundOfTypes(
+      TypeSystem typeSystem, DartType first, DartType second) {
+    if (first == null) {
+      return second;
+    } else if (second == null) {
+      return first;
+    } else {
+      return typeSystem.leastUpperBound(first, second);
+    }
+  }
+}
diff --git a/pkg/analyzer/lib/src/generated/testing/ast_test_factory.dart b/pkg/analyzer/lib/src/generated/testing/ast_test_factory.dart
index b6f7ccd..c62b040 100644
--- a/pkg/analyzer/lib/src/generated/testing/ast_test_factory.dart
+++ b/pkg/analyzer/lib/src/generated/testing/ast_test_factory.dart
@@ -494,29 +494,31 @@
   static FieldFormalParameter fieldFormalParameter2(String identifier) =>
       fieldFormalParameter(null, null, identifier);
 
-  static ForEachStatement forEachStatement(DeclaredIdentifier loopVariable,
-          Expression iterator, Statement body) =>
-      astFactory.forEachStatementWithDeclaration(
-          null,
-          TokenFactory.tokenFromKeyword(Keyword.FOR),
-          TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
-          loopVariable,
-          TokenFactory.tokenFromKeyword(Keyword.IN),
-          iterator,
-          TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
-          body);
+  static ForEachPartsWithDeclaration forEachPartsWithDeclaration(
+          DeclaredIdentifier loopVariable, Expression iterable) =>
+      astFactory.forEachPartsWithDeclaration(
+          loopVariable: loopVariable,
+          inKeyword: TokenFactory.tokenFromKeyword(Keyword.IN),
+          iterable: iterable);
 
-  static ForEachStatement forEachStatement2(
-          SimpleIdentifier identifier, Expression iterator, Statement body) =>
-      astFactory.forEachStatementWithReference(
-          null,
-          TokenFactory.tokenFromKeyword(Keyword.FOR),
-          TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
-          identifier,
-          TokenFactory.tokenFromKeyword(Keyword.IN),
-          iterator,
-          TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
-          body);
+  static ForEachPartsWithIdentifier forEachPartsWithIdentifier(
+          SimpleIdentifier identifier, Expression iterable) =>
+      astFactory.forEachPartsWithIdentifier(
+          identifier: identifier,
+          inKeyword: TokenFactory.tokenFromKeyword(Keyword.IN),
+          iterable: iterable);
+
+  static ForElement forElement(
+          ForLoopParts forLoopParts, CollectionElement body,
+          {bool hasAwait: false}) =>
+      astFactory.forElement(
+          awaitKeyword:
+              hasAwait ? TokenFactory.tokenFromKeyword(Keyword.AWAIT) : null,
+          forKeyword: TokenFactory.tokenFromKeyword(Keyword.FOR),
+          leftParenthesis: TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
+          forLoopParts: forLoopParts,
+          rightParenthesis: TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
+          body: body);
 
   static FormalParameterList formalParameterList(
           [List<FormalParameter> parameters]) =>
@@ -527,33 +529,35 @@
           null,
           TokenFactory.tokenFromType(TokenType.CLOSE_PAREN));
 
-  static ForStatement forStatement(Expression initialization,
-          Expression condition, List<Expression> updaters, Statement body) =>
-      astFactory.forStatement(
-          TokenFactory.tokenFromKeyword(Keyword.FOR),
-          TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
-          null,
-          initialization,
-          TokenFactory.tokenFromType(TokenType.SEMICOLON),
-          condition,
-          TokenFactory.tokenFromType(TokenType.SEMICOLON),
-          updaters,
-          TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
-          body);
+  static ForPartsWithDeclarations forPartsWithDeclarations(
+          VariableDeclarationList variables,
+          Expression condition,
+          List<Expression> updaters) =>
+      astFactory.forPartsWithDeclarations(
+          variables: variables,
+          leftSeparator: TokenFactory.tokenFromType(TokenType.SEMICOLON),
+          condition: condition,
+          rightSeparator: TokenFactory.tokenFromType(TokenType.SEMICOLON),
+          updaters: updaters);
 
-  static ForStatement forStatement2(VariableDeclarationList variableList,
-          Expression condition, List<Expression> updaters, Statement body) =>
+  static ForPartsWithExpression forPartsWithExpression(
+          Expression initialization,
+          Expression condition,
+          List<Expression> updaters) =>
+      astFactory.forPartsWithExpression(
+          initialization: initialization,
+          leftSeparator: TokenFactory.tokenFromType(TokenType.SEMICOLON),
+          condition: condition,
+          rightSeparator: TokenFactory.tokenFromType(TokenType.SEMICOLON),
+          updaters: updaters);
+
+  static ForStatement forStatement(ForLoopParts forLoopParts, Statement body) =>
       astFactory.forStatement(
-          TokenFactory.tokenFromKeyword(Keyword.FOR),
-          TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
-          variableList,
-          null,
-          TokenFactory.tokenFromType(TokenType.SEMICOLON),
-          condition,
-          TokenFactory.tokenFromType(TokenType.SEMICOLON),
-          updaters,
-          TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
-          body);
+          forKeyword: TokenFactory.tokenFromKeyword(Keyword.FOR),
+          leftParenthesis: TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
+          forLoopParts: forLoopParts,
+          rightParenthesis: TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
+          body: body);
 
   static FunctionDeclaration functionDeclaration(
           TypeAnnotation type,
@@ -667,6 +671,20 @@
         .toList();
   }
 
+  static IfElement ifElement(
+          Expression condition, CollectionElement thenElement,
+          [CollectionElement elseElement]) =>
+      astFactory.ifElement(
+          ifKeyword: TokenFactory.tokenFromKeyword(Keyword.IF),
+          leftParenthesis: TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
+          condition: condition,
+          rightParenthesis: TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
+          thenElement: thenElement,
+          elseKeyword: elseElement == null
+              ? null
+              : TokenFactory.tokenFromKeyword(Keyword.ELSE),
+          elseElement: elseElement);
+
   static IfStatement ifStatement(
           Expression condition, Statement thenStatement) =>
       ifStatement2(condition, thenStatement, null);
@@ -814,7 +832,7 @@
 
   static ListLiteral listLiteral2(
           Keyword keyword, TypeArgumentList typeArguments,
-          [List<Expression> elements]) =>
+          [List<CollectionElement> elements]) =>
       astFactory.listLiteral(
           keyword == null ? null : TokenFactory.tokenFromKeyword(keyword),
           typeArguments,
@@ -822,18 +840,6 @@
           elements,
           TokenFactory.tokenFromType(TokenType.CLOSE_SQUARE_BRACKET));
 
-  static MapLiteral mapLiteral(Keyword keyword, TypeArgumentList typeArguments,
-          [List<MapLiteralEntry> entries]) =>
-      astFactory.mapLiteral(
-          keyword == null ? null : TokenFactory.tokenFromKeyword(keyword),
-          typeArguments,
-          TokenFactory.tokenFromType(TokenType.OPEN_CURLY_BRACKET),
-          entries,
-          TokenFactory.tokenFromType(TokenType.CLOSE_CURLY_BRACKET));
-
-  static MapLiteral mapLiteral2([List<MapLiteralEntry> entries]) =>
-      mapLiteral(null, null, entries);
-
   static MapLiteralEntry mapLiteralEntry(String key, Expression value) =>
       astFactory.mapLiteralEntry(
           string2(key), TokenFactory.tokenFromType(TokenType.COLON), value);
@@ -1073,14 +1079,14 @@
   static ScriptTag scriptTag(String scriptTag) =>
       astFactory.scriptTag(TokenFactory.tokenFromString(scriptTag));
 
-  static SetLiteral setLiteral(Keyword keyword, TypeArgumentList typeArguments,
-          List<Expression> elements) =>
-      astFactory.setLiteral(
-          keyword == null ? null : TokenFactory.tokenFromKeyword(keyword),
-          typeArguments,
-          TokenFactory.tokenFromType(TokenType.OPEN_CURLY_BRACKET),
-          elements,
-          TokenFactory.tokenFromType(TokenType.CLOSE_CURLY_BRACKET));
+  static SetOrMapLiteral setOrMapLiteral(
+          Keyword keyword, TypeArgumentList typeArguments,
+          [List<CollectionElement> elements]) =>
+      astFactory.setOrMapLiteral(
+          constKeyword:
+              keyword == null ? null : TokenFactory.tokenFromKeyword(keyword),
+          typeArguments: typeArguments,
+          elements: elements);
 
   static ShowCombinator showCombinator(List<SimpleIdentifier> identifiers) =>
       astFactory.showCombinator(
@@ -1110,6 +1116,12 @@
           TypeAnnotation type, String parameterName) =>
       simpleFormalParameter2(null, type, parameterName);
 
+  static SpreadElement spreadElement(
+          TokenType operator, Expression expression) =>
+      astFactory.spreadElement(
+          spreadOperator: TokenFactory.tokenFromType(operator),
+          expression: expression);
+
   static StringInterpolation string([List<InterpolationElement> elements]) =>
       astFactory.stringInterpolation(elements);
 
diff --git a/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart b/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
index 30b176b..bb052ad 100644
--- a/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
+++ b/pkg/analyzer/lib/src/generated/testing/test_type_provider.dart
@@ -119,6 +119,11 @@
   InterfaceType _mapObjectObjectType;
 
   /**
+   * The type representing the built-in type 'Never'.
+   */
+  InterfaceType _neverType;
+
+  /**
    * An shared object representing the value 'null'.
    */
   DartObjectImpl _nullObject;
@@ -442,6 +447,16 @@
   }
 
   @override
+  InterfaceType get neverType {
+    if (_neverType == null) {
+      ClassElementImpl neverElement =
+          ElementFactory.classElement('Never', objectType);
+      _neverType = neverElement.type;
+    }
+    return _neverType;
+  }
+
+  @override
   DartObjectImpl get nullObject {
     if (_nullObject == null) {
       _nullObject = new DartObjectImpl(nullType, NullState.NULL_STATE);
@@ -607,11 +622,13 @@
 
   void _initDartAsync() {
     Source asyncSource;
-    if (_driver == null) {
+    if (_driver != null) {
+      asyncSource = _driver.sourceFactory.forUri(DartSdk.DART_ASYNC);
+    } else if (_context != null) {
       asyncSource = _context.sourceFactory.forUri(DartSdk.DART_ASYNC);
       _context.setContents(asyncSource, "");
     } else {
-      asyncSource = _driver.sourceFactory.forUri(DartSdk.DART_ASYNC);
+      asyncSource = null;
     }
     CompilationUnitElementImpl asyncUnit = new CompilationUnitElementImpl();
     LibraryElementImpl asyncLibrary = new LibraryElementImpl.forNode(
diff --git a/pkg/analyzer/lib/src/generated/timestamped_data.dart b/pkg/analyzer/lib/src/generated/timestamped_data.dart
index 18e6323..7084cbd 100644
--- a/pkg/analyzer/lib/src/generated/timestamped_data.dart
+++ b/pkg/analyzer/lib/src/generated/timestamped_data.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/generated/type_system.dart b/pkg/analyzer/lib/src/generated/type_system.dart
index 30b2925..b2fa6c8 100644
--- a/pkg/analyzer/lib/src/generated/type_system.dart
+++ b/pkg/analyzer/lib/src/generated/type_system.dart
@@ -225,7 +225,8 @@
       DartType returnContextType,
       {ErrorReporter errorReporter,
       AstNode errorNode,
-      bool downwards: false}) {
+      bool downwards: false,
+      bool isConst: false}) {
     // TODO(jmesserly): expose typeFormals on ParameterizedType.
     List<TypeParameterElement> typeFormals = typeFormalsAsElements(genericType);
     if (typeFormals.isEmpty) {
@@ -242,6 +243,9 @@
         genericType is FunctionType ? genericType.returnType : genericType;
 
     if (returnContextType != null) {
+      if (isConst) {
+        returnContextType = _eliminateTypeVariables(returnContextType);
+      }
       inferrer.constrainReturnType(declaredReturnType, returnContextType);
     }
 
@@ -577,6 +581,9 @@
   ///
   /// In practice this will always replace `?` with either bottom or top
   /// (dynamic), depending on the position of `?`.
+  ///
+  /// This implements the operation the spec calls "least closure", or
+  /// sometimes "least closure with respect to `?`".
   DartType lowerBoundForType(DartType type) {
     return _substituteForUnknownType(type, lowerBound: true);
   }
@@ -641,11 +648,38 @@
   ///
   /// In practice this will always replace `?` with either bottom or top
   /// (dynamic), depending on the position of `?`.
+  ///
+  /// This implements the operation the spec calls "greatest closure", or
+  /// sometimes "greatest closure with respect to `?`".
   DartType upperBoundForType(DartType type) {
     return _substituteForUnknownType(type);
   }
 
   /**
+   * Eliminates type variables from the context [type], replacing them with
+   * `Null` or `Object` as appropriate.
+   *
+   * For example in `List<T> list = const []`, the context type for inferring
+   * the list should be changed from `List<T>` to `List<Null>` so the constant
+   * doesn't depend on the type variables `T` (because it can't be canonicalized
+   * at compile time, as `T` is unknown).
+   *
+   * Conceptually this is similar to the "least closure", except instead of
+   * eliminating `?` ([UnknownInferredType]) it eliminates all type variables
+   * ([TypeParameterType]).
+   *
+   * The equivalent CFE code can be found in the `TypeVariableEliminator` class.
+   */
+  DartType _eliminateTypeVariables(DartType type) {
+    return _substituteType(type, true, (type, lowerBound) {
+      if (type is TypeParameterType) {
+        return lowerBound ? typeProvider.nullType : typeProvider.objectType;
+      }
+      return type;
+    });
+  }
+
+  /**
    * Compute the greatest lower bound of function types [f] and [g].
    *
    * The spec rules for GLB on function types, informally, are pretty simple:
@@ -885,22 +919,46 @@
     return false;
   }
 
+  /**
+   * Returns the greatest or least closure of [type], which replaces `?`
+   * ([UnknownInferredType]) with `dynamic` or `Null` as appropriate.
+   *
+   * If [lowerBound] is true, this will return the "least closure", otherwise
+   * it returns the "greatest closure".
+   */
   DartType _substituteForUnknownType(DartType type, {bool lowerBound: false}) {
-    if (identical(type, UnknownInferredType.instance)) {
-      if (lowerBound) {
-        // TODO(jmesserly): this should be the bottom type, once it can be
-        // reified.
-        return typeProvider.nullType;
+    return _substituteType(type, lowerBound, (type, lowerBound) {
+      if (identical(type, UnknownInferredType.instance)) {
+        return lowerBound ? typeProvider.nullType : typeProvider.dynamicType;
       }
-      return typeProvider.dynamicType;
+      return type;
+    });
+  }
+
+  /**
+   * Apply the [visitType] substitution to [type], using the result value if
+   * different, otherwise recursively apply the substitution.
+   *
+   * This method is used for substituting `?` ([UnknownInferredType]) with its
+   * greatest/least closure, and for eliminating type parameters for inference
+   * of `const` objects.
+   *
+   * See also [_eliminateTypeVariables] and [_substituteForUnknownType].
+   */
+  DartType _substituteType(DartType type, bool lowerBound,
+      DartType Function(DartType, bool) visitType) {
+    // Apply the substitution to this type, and return the result if different.
+    var newType = visitType(type, lowerBound);
+    if (!identical(newType, type)) {
+      return newType;
     }
     if (type is InterfaceTypeImpl) {
       // Generic types are covariant, so keep the constraint direction.
-      var newTypeArgs = _transformList(type.typeArguments,
-          (t) => _substituteForUnknownType(t, lowerBound: lowerBound));
+      var newTypeArgs = _transformList(
+          type.typeArguments, (t) => _substituteType(t, lowerBound, visitType));
       if (identical(type.typeArguments, newTypeArgs)) return type;
       return new InterfaceTypeImpl(
-          type.element, type.prunedTypedefs, type.nullability)
+          type.element, type.prunedTypedefs, type.nullabilitySuffix)
         ..typeArguments = newTypeArgs;
     }
     if (type is FunctionType) {
@@ -908,8 +966,7 @@
       var returnType = type.returnType;
       var newParameters = _transformList(parameters, (ParameterElement p) {
         // Parameters are contravariant, so flip the constraint direction.
-        var newType =
-            _substituteForUnknownType(p.type, lowerBound: !lowerBound);
+        var newType = _substituteType(p.type, !lowerBound, visitType);
         return new ParameterElementImpl.synthetic(
             p.name,
             newType,
@@ -917,8 +974,7 @@
             p.parameterKind);
       });
       // Return type is covariant.
-      var newReturnType =
-          _substituteForUnknownType(returnType, lowerBound: lowerBound);
+      var newReturnType = _substituteType(returnType, lowerBound, visitType);
       if (identical(parameters, newParameters) &&
           identical(returnType, newReturnType)) {
         return type;
@@ -926,7 +982,7 @@
 
       return new FunctionTypeImpl.synthetic(
           newReturnType, type.typeFormals, newParameters,
-          nullability: (type as TypeImpl).nullability);
+          nullabilitySuffix: (type as TypeImpl).nullabilitySuffix);
     }
     return type;
   }
@@ -1866,6 +1922,27 @@
    */
   bool isMoreSpecificThan(DartType leftType, DartType rightType);
 
+  @override
+  bool isNonNullable(DartType type) {
+    if (type.isDynamic || type.isVoid || type.isDartCoreNull) {
+      return false;
+    } else if (type.isDartAsyncFutureOr) {
+      isNonNullable((type as InterfaceType).typeArguments[0]);
+    }
+    return (type as TypeImpl).nullabilitySuffix != NullabilitySuffix.question &&
+        (type is TypeParameterType ? isNonNullable(type.bound) : true);
+  }
+
+  @override
+  bool isNullable(DartType type) {
+    if (type.isDynamic || type.isVoid || type.isDartCoreNull) {
+      return true;
+    } else if (type.isDartAsyncFutureOr) {
+      isNullable((type as InterfaceType).typeArguments[0]);
+    }
+    return (type as TypeImpl).nullabilitySuffix != NullabilitySuffix.none;
+  }
+
   /// Check that [f1] is a subtype of [f2] for a member override.
   ///
   /// This is different from the normal function subtyping in two ways:
@@ -1873,6 +1950,12 @@
   /// - it allows opt-in covariant parameters.
   bool isOverrideSubtypeOf(FunctionType f1, FunctionType f2);
 
+  @override
+  bool isPotentiallyNonNullable(DartType type) => !isNullable(type);
+
+  @override
+  bool isPotentiallyNullable(DartType type) => !isNonNullable(type);
+
   /**
    * Return `true` if the [leftType] is a subtype of the [rightType] (that is,
    * if leftType <: rightType).
@@ -1912,41 +1995,25 @@
    * Searches the superinterfaces of [type] for implementations of [genericType]
    * and returns the most specific type argument used for that generic type.
    *
+   * For a more general/robust solution, use [InterfaceTypeImpl.asInstanceOf].
+   *
    * For example, given [type] `List<int>` and [genericType] `Iterable<T>`,
    * returns [int].
    *
    * Returns `null` if [type] does not implement [genericType].
    */
-  // TODO(jmesserly): this is very similar to code used for flattening futures.
-  // The only difference is, because of a lack of TypeProvider, the other method
-  // has to match the Future type by its name and library. Here was are passed
-  // in the correct type.
   DartType mostSpecificTypeArgument(DartType type, DartType genericType) {
     if (type is! InterfaceType) return null;
+    if (genericType is! InterfaceType) return null;
 
-    // Walk the superinterface hierarchy looking for [genericType].
-    List<DartType> candidates = <DartType>[];
-    HashSet<ClassElement> visitedClasses = new HashSet<ClassElement>();
-    void recurse(InterfaceType interface) {
-      if (interface.element == genericType.element &&
-          interface.typeArguments.isNotEmpty) {
-        candidates.add(interface.typeArguments[0]);
-      }
-      if (visitedClasses.add(interface.element)) {
-        if (interface.superclass != null) {
-          recurse(interface.superclass);
-        }
-        interface.mixins.forEach(recurse);
-        interface.interfaces.forEach(recurse);
-        visitedClasses.remove(interface.element);
-      }
+    var asInstanceOf = (type as InterfaceTypeImpl)
+        .asInstanceOf((genericType as InterfaceType).element);
+
+    if (asInstanceOf != null) {
+      return asInstanceOf.typeArguments[0];
     }
 
-    recurse(type);
-
-    // Since the interface may be implemented multiple times with different
-    // type arguments, choose the best one.
-    return InterfaceTypeImpl.findMostSpecificType(candidates, this);
+    return null;
   }
 
   /**
@@ -2191,7 +2258,7 @@
   bool get isDynamic => true;
 
   @override
-  Nullability get nullability => Nullability.indeterminate;
+  NullabilitySuffix get nullabilitySuffix => NullabilitySuffix.star;
 
   @override
   bool operator ==(Object object) => identical(object, this);
@@ -2253,7 +2320,7 @@
   }
 
   @override
-  TypeImpl withNullability(Nullability nullability) => this;
+  TypeImpl withNullability(NullabilitySuffix nullabilitySuffix) => this;
 
   /// Given a [type] T, return true if it does not have an unknown type `?`.
   static bool isKnown(DartType type) => !isUnknown(type);
diff --git a/pkg/analyzer/lib/src/generated/utilities_general.dart b/pkg/analyzer/lib/src/generated/utilities_general.dart
index 9722bc8..fab29a6 100644
--- a/pkg/analyzer/lib/src/generated/utilities_general.dart
+++ b/pkg/analyzer/lib/src/generated/utilities_general.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/generated/visitors.dart b/pkg/analyzer/lib/src/generated/visitors.dart
index 457d7f8..62cb61a 100644
--- a/pkg/analyzer/lib/src/generated/visitors.dart
+++ b/pkg/analyzer/lib/src/generated/visitors.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/hint/sdk_constraint_verifier.dart b/pkg/analyzer/lib/src/hint/sdk_constraint_verifier.dart
index cc2231a..1087abd 100644
--- a/pkg/analyzer/lib/src/hint/sdk_constraint_verifier.dart
+++ b/pkg/analyzer/lib/src/hint/sdk_constraint_verifier.dart
@@ -3,9 +3,12 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/error/listener.dart';
+import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/resolver/scope.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/resolver.dart';
@@ -26,10 +29,32 @@
   /// The version constraint for the SDK.
   final VersionConstraint _versionConstraint;
 
+  /// A cached flag indicating whether references to the constant-update-2018
+  /// features need to be checked. Use [checkConstantUpdate2018] to access this
+  /// field.
+  bool _checkConstantUpdate2018;
+
   /// A cached flag indicating whether references to Future and Stream need to
-  /// be checked. Use [] to access this field.
+  /// be checked. Use [checkFutureAndStream] to access this field.
   bool _checkFutureAndStream;
 
+  /// A cached flag indicating whether references to set literals need to
+  /// be checked. Use [checkSetLiterals] to access this field.
+  bool _checkSetLiterals;
+
+  /// A flag indicating whether we are visiting code inside a set literal. Used
+  /// to prevent over-reporting uses of set literals.
+  bool _inSetLiteral = false;
+
+  /// A cached flag indicating whether references to the ui-as-code features
+  /// need to be checked. Use [checkUiAsCode] to access this field.
+  bool _checkUiAsCode;
+
+  /// A flag indicating whether we are visiting code inside one of the
+  /// ui-as-code features. Used to prevent over-reporting uses of these
+  /// features.
+  bool _inUiAsCode = false;
+
   /// Initialize a newly created verifier to use the given [_errorReporter] to
   /// report errors.
   SdkConstraintVerifier(this._errorReporter, this._containingLibrary,
@@ -39,16 +64,132 @@
   VersionRange get before_2_1_0 =>
       new VersionRange(max: Version.parse('2.1.0'), includeMax: false);
 
+  /// Return a range covering every version up to, but not including, 2.2.0.
+  VersionRange get before_2_2_0 =>
+      new VersionRange(max: Version.parse('2.2.0'), includeMax: false);
+
+  /// Return a range covering every version up to, but not including, 2.2.2.
+  VersionRange get before_2_2_2 =>
+      new VersionRange(max: Version.parse('2.2.2'), includeMax: false);
+
+  /// Return `true` if references to the constant-update-2018 features need to
+  /// be checked.
+  bool get checkConstantUpdate2018 => _checkConstantUpdate2018 ??=
+      !before_2_2_2.intersect(_versionConstraint).isEmpty;
+
   /// Return `true` if references to Future and Stream need to be checked.
   bool get checkFutureAndStream => _checkFutureAndStream ??=
       !before_2_1_0.intersect(_versionConstraint).isEmpty;
 
+  /// Return `true` if references to set literals need to be checked.
+  bool get checkSetLiterals =>
+      _checkSetLiterals ??= !before_2_2_0.intersect(_versionConstraint).isEmpty;
+
+  /// Return `true` if references to the ui-as-code features (control flow and
+  /// spread collections) need to be checked.
+  bool get checkUiAsCode =>
+      _checkUiAsCode ??= !before_2_2_2.intersect(_versionConstraint).isEmpty;
+
+  @override
+  void visitAsExpression(AsExpression node) {
+    if (checkConstantUpdate2018 &&
+        (node as AsExpressionImpl).inConstantContext) {
+      _errorReporter.reportErrorForNode(
+          HintCode.SDK_VERSION_AS_EXPRESSION_IN_CONST_CONTEXT, node);
+    }
+    super.visitAsExpression(node);
+  }
+
+  @override
+  void visitBinaryExpression(BinaryExpression node) {
+    if (checkConstantUpdate2018) {
+      TokenType operatorType = node.operator.type;
+      if (operatorType == TokenType.GT_GT_GT) {
+        _errorReporter.reportErrorForToken(
+            HintCode.SDK_VERSION_GT_GT_GT_OPERATOR, node.operator);
+      } else if ((operatorType == TokenType.AMPERSAND ||
+              operatorType == TokenType.BAR ||
+              operatorType == TokenType.CARET) &&
+          (node as BinaryExpressionImpl).inConstantContext) {
+        if (node.leftOperand.staticType.isDartCoreBool) {
+          _errorReporter.reportErrorForToken(HintCode.SDK_VERSION_BOOL_OPERATOR,
+              node.operator, [node.operator.lexeme]);
+        }
+      } else if (operatorType == TokenType.EQ_EQ &&
+          (node as BinaryExpressionImpl).inConstantContext) {
+        bool primitive(Expression node) {
+          DartType type = node.staticType;
+          return type.isDartCoreBool ||
+              type.isDartCoreDouble ||
+              type.isDartCoreInt ||
+              type.isDartCoreNull ||
+              type.isDartCoreString;
+        }
+
+        if (!primitive(node.leftOperand) || !primitive(node.rightOperand)) {
+          _errorReporter.reportErrorForToken(
+              HintCode.SDK_VERSION_EQ_EQ_OPERATOR_IN_CONST_CONTEXT,
+              node.operator);
+        }
+      }
+    }
+    super.visitBinaryExpression(node);
+  }
+
+  @override
+  void visitForElement(ForElement node) {
+    _validateUiAsCode(node);
+    bool wasInUiAsCode = _inUiAsCode;
+    _inUiAsCode = true;
+    super.visitForElement(node);
+    _inUiAsCode = wasInUiAsCode;
+  }
+
   @override
   void visitHideCombinator(HideCombinator node) {
     // Don't flag references to either `Future` or `Stream` within a combinator.
   }
 
   @override
+  void visitIfElement(IfElement node) {
+    _validateUiAsCode(node);
+    bool wasInUiAsCode = _inUiAsCode;
+    _inUiAsCode = true;
+    super.visitIfElement(node);
+    _inUiAsCode = wasInUiAsCode;
+  }
+
+  @override
+  void visitIsExpression(IsExpression node) {
+    if (checkConstantUpdate2018 &&
+        (node as IsExpressionImpl).inConstantContext) {
+      _errorReporter.reportErrorForNode(
+          HintCode.SDK_VERSION_IS_EXPRESSION_IN_CONST_CONTEXT, node);
+    }
+    super.visitIsExpression(node);
+  }
+
+  @override
+  void visitMethodDeclaration(MethodDeclaration node) {
+    if (checkConstantUpdate2018 && node.isOperator && node.name.name == '>>>') {
+      _errorReporter.reportErrorForNode(
+          HintCode.SDK_VERSION_GT_GT_GT_OPERATOR, node.name);
+    }
+    super.visitMethodDeclaration(node);
+  }
+
+  @override
+  void visitSetOrMapLiteral(SetOrMapLiteral node) {
+    if (node.isSet && checkSetLiterals && !_inSetLiteral) {
+      _errorReporter.reportErrorForNode(HintCode.SDK_VERSION_SET_LITERAL, node);
+    }
+    bool wasInSetLiteral = _inSetLiteral;
+    _inSetLiteral = true;
+    super.visitSetOrMapLiteral(node);
+    _inSetLiteral = wasInSetLiteral;
+  }
+
+  @override
   void visitShowCombinator(ShowCombinator node) {
     // Don't flag references to either `Future` or `Stream` within a combinator.
   }
@@ -75,4 +216,22 @@
           HintCode.SDK_VERSION_ASYNC_EXPORTED_FROM_CORE, node, [element.name]);
     }
   }
+
+  @override
+  void visitSpreadElement(SpreadElement node) {
+    _validateUiAsCode(node);
+    bool wasInUiAsCode = _inUiAsCode;
+    _inUiAsCode = true;
+    super.visitSpreadElement(node);
+    _inUiAsCode = wasInUiAsCode;
+  }
+
+  /// Given that the [node] is only valid when the ui-as-code feature is
+  /// enabled, check that the code will not be executed with a version of the
+  /// SDK that does not support the feature.
+  void _validateUiAsCode(AstNode node) {
+    if (checkUiAsCode && !_inUiAsCode) {
+      _errorReporter.reportErrorForNode(HintCode.SDK_VERSION_UI_AS_CODE, node);
+    }
+  }
 }
diff --git a/pkg/analyzer/lib/src/html/error/html_codes.dart b/pkg/analyzer/lib/src/html/error/html_codes.dart
deleted file mode 100644
index 59a67b4..0000000
--- a/pkg/analyzer/lib/src/html/error/html_codes.dart
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/error/error.dart';
-
-/**
- * The error codes used for errors in HTML files. The convention for this
- * class is for the name of the error code to indicate the problem that caused
- * the error to be generated and for the error message to explain what is wrong
- * and, when appropriate, how the problem can be corrected.
- */
-class HtmlErrorCode extends ErrorCode {
-  /**
-   * An error code indicating that there is a syntactic error in the file.
-   *
-   * Parameters:
-   * 0: the error message from the parse error
-   */
-  static const HtmlErrorCode PARSE_ERROR =
-      const HtmlErrorCode('PARSE_ERROR', '{0}');
-
-  /**
-   * Initialize a newly created error code to have the given [name]. The message
-   * associated with the error will be created from the given [message]
-   * template. The correction associated with the error will be created from the
-   * given [correction] template.
-   */
-  const HtmlErrorCode(String name, String message, {String correction})
-      : super.temporary(name, message, correction: correction);
-
-  @override
-  ErrorSeverity get errorSeverity => ErrorSeverity.ERROR;
-
-  @override
-  ErrorType get type => ErrorType.COMPILE_TIME_ERROR;
-}
-
-/**
- * The error codes used for warnings in HTML files. The convention for this
- * class is for the name of the error code to indicate the problem that caused
- * the error to be generated and for the error message to explain what is wrong
- * and, when appropriate, how the problem can be corrected.
- */
-class HtmlWarningCode extends ErrorCode {
-  /**
-   * An error code indicating that the value of the 'src' attribute of a Dart
-   * script tag is not a valid URI.
-   *
-   * Parameters:
-   * 0: the URI that is invalid
-   */
-  static const HtmlWarningCode INVALID_URI =
-      const HtmlWarningCode('INVALID_URI', "Invalid URI syntax: '{0}'.");
-
-  /**
-   * An error code indicating that the value of the 'src' attribute of a Dart
-   * script tag references a file that does not exist.
-   *
-   * Parameters:
-   * 0: the URI pointing to a non-existent file
-   */
-  static const HtmlWarningCode URI_DOES_NOT_EXIST = const HtmlWarningCode(
-      'URI_DOES_NOT_EXIST', "Target of URI doesn't exist: '{0}'.");
-
-  /**
-   * Initialize a newly created error code to have the given [name]. The message
-   * associated with the error will be created from the given [message]
-   * template. The correction associated with the error will be created from the
-   * given [correction] template.
-   */
-  const HtmlWarningCode(String name, String message, {String correction})
-      : super.temporary(name, message, correction: correction);
-
-  @override
-  ErrorSeverity get errorSeverity => ErrorSeverity.WARNING;
-
-  @override
-  ErrorType get type => ErrorType.STATIC_WARNING;
-}
diff --git a/pkg/analyzer/lib/src/ignore_comments/ignore_info.dart b/pkg/analyzer/lib/src/ignore_comments/ignore_info.dart
new file mode 100644
index 0000000..2596ac9
--- /dev/null
+++ b/pkg/analyzer/lib/src/ignore_comments/ignore_info.dart
@@ -0,0 +1,105 @@
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:collection';
+
+import 'package:analyzer/source/line_info.dart';
+import 'package:analyzer/src/generated/source.dart';
+
+/// Information about analysis `//ignore:` and `//ignore_for_file` comments
+/// within a source file.
+class IgnoreInfo {
+  ///  Instance shared by all cases without matches.
+  static final IgnoreInfo _EMPTY_INFO = new IgnoreInfo();
+
+  /// A regular expression for matching 'ignore' comments.  Produces matches
+  /// containing 2 groups.  For example:
+  ///
+  ///     * ['//ignore: error_code', 'error_code']
+  ///
+  /// Resulting codes may be in a list ('error_code_1,error_code2').
+  static final RegExp _IGNORE_MATCHER =
+      new RegExp(r'//+[ ]*ignore:(.*)$', multiLine: true);
+
+  /// A regular expression for matching 'ignore_for_file' comments.  Produces
+  /// matches containing 2 groups.  For example:
+  ///
+  ///     * ['//ignore_for_file: error_code', 'error_code']
+  ///
+  /// Resulting codes may be in a list ('error_code_1,error_code2').
+  static final RegExp _IGNORE_FOR_FILE_MATCHER =
+      new RegExp(r'//[ ]*ignore_for_file:(.*)$', multiLine: true);
+
+  final Map<int, List<String>> _ignoreMap = new HashMap<int, List<String>>();
+
+  final Set<String> _ignoreForFileSet = new HashSet<String>();
+
+  /// Whether this info object defines any ignores.
+  bool get hasIgnores => ignores.isNotEmpty || _ignoreForFileSet.isNotEmpty;
+
+  /// Iterable of error codes ignored for the whole file.
+  Iterable<String> get ignoreForFiles => _ignoreForFileSet;
+
+  /// Map of line numbers to associated ignored error codes.
+  Map<int, Iterable<String>> get ignores => _ignoreMap;
+
+  /// Ignore this [errorCode] at [line].
+  void add(int line, String errorCode) {
+    _ignoreMap.putIfAbsent(line, () => new List<String>()).add(errorCode);
+  }
+
+  /// Ignore these [errorCodes] at [line].
+  void addAll(int line, Iterable<String> errorCodes) {
+    _ignoreMap.putIfAbsent(line, () => new List<String>()).addAll(errorCodes);
+  }
+
+  /// Ignore these [errorCodes] in the whole file.
+  void addAllForFile(Iterable<String> errorCodes) {
+    _ignoreForFileSet.addAll(errorCodes);
+  }
+
+  /// Test whether this [errorCode] is ignored at the given [line].
+  bool ignoredAt(String errorCode, int line) =>
+      _ignoreForFileSet.contains(errorCode) ||
+      _ignoreMap[line]?.contains(errorCode) == true;
+
+  /// Calculate ignores for the given [content] with line [info].
+  static IgnoreInfo calculateIgnores(String content, LineInfo info) {
+    Iterable<Match> matches = _IGNORE_MATCHER.allMatches(content);
+    Iterable<Match> fileMatches = _IGNORE_FOR_FILE_MATCHER.allMatches(content);
+    if (matches.isEmpty && fileMatches.isEmpty) {
+      return _EMPTY_INFO;
+    }
+
+    IgnoreInfo ignoreInfo = new IgnoreInfo();
+    for (Match match in matches) {
+      // See _IGNORE_MATCHER for format --- note the possibility of error lists.
+      Iterable<String> codes = match
+          .group(1)
+          .split(',')
+          .map((String code) => code.trim().toLowerCase());
+      CharacterLocation location = info.getLocation(match.start);
+      int lineNumber = location.lineNumber;
+      String beforeMatch = content.substring(
+          info.getOffsetOfLine(lineNumber - 1),
+          info.getOffsetOfLine(lineNumber - 1) + location.columnNumber - 1);
+
+      if (beforeMatch.trim().isEmpty) {
+        // The comment is on its own line, so it refers to the next line.
+        ignoreInfo.addAll(lineNumber + 1, codes);
+      } else {
+        // The comment sits next to code, so it refers to its own line.
+        ignoreInfo.addAll(lineNumber, codes);
+      }
+    }
+    for (Match match in fileMatches) {
+      Iterable<String> codes = match
+          .group(1)
+          .split(',')
+          .map((String code) => code.trim().toLowerCase());
+      ignoreInfo.addAllForFile(codes);
+    }
+    return ignoreInfo;
+  }
+}
diff --git a/pkg/analyzer/lib/src/lint/analysis.dart b/pkg/analyzer/lib/src/lint/analysis.dart
index c9abd60..d62aaa0 100644
--- a/pkg/analyzer/lib/src/lint/analysis.dart
+++ b/pkg/analyzer/lib/src/lint/analysis.dart
@@ -34,8 +34,6 @@
 import 'package:package_config/packages_file.dart' as pkgfile show parse;
 import 'package:package_config/src/packages_impl.dart' show MapPackages;
 import 'package:path/path.dart' as p;
-import 'package:plugin/manager.dart';
-import 'package:plugin/plugin.dart';
 import 'package:yaml/yaml.dart';
 
 AnalysisOptionsProvider _optionsProvider = new AnalysisOptionsProvider();
@@ -125,9 +123,7 @@
 
   final LinterOptions options;
 
-  LintDriver(this.options) {
-    _processPlugins();
-  }
+  LintDriver(this.options);
 
   /// Return the number of sources that have been analyzed so far.
   int get numSourcesAnalyzed => _sourcesAnalyzed.length;
@@ -252,13 +248,6 @@
     }
     return null;
   }
-
-  void _processPlugins() {
-    List<Plugin> plugins = <Plugin>[];
-    plugins.addAll(AnalysisEngine.instance.requiredPlugins);
-    ExtensionManager manager = new ExtensionManager();
-    manager.processPlugins(plugins);
-  }
 }
 
 /// Prints logging information comments to the [outSink] and error messages to
diff --git a/pkg/analyzer/lib/src/lint/config.dart b/pkg/analyzer/lib/src/lint/config.dart
index 6f5268d..1645b5a 100644
--- a/pkg/analyzer/lib/src/lint/config.dart
+++ b/pkg/analyzer/lib/src/lint/config.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/lint/io.dart b/pkg/analyzer/lib/src/lint/io.dart
index 3e84c4d..bd3e4a0 100644
--- a/pkg/analyzer/lib/src/lint/io.dart
+++ b/pkg/analyzer/lib/src/lint/io.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/lint/linter_visitor.dart b/pkg/analyzer/lib/src/lint/linter_visitor.dart
index 98ba52c..79fff64 100644
--- a/pkg/analyzer/lib/src/lint/linter_visitor.dart
+++ b/pkg/analyzer/lib/src/lint/linter_visitor.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -265,12 +265,6 @@
   }
 
   @override
-  void visitForEachStatement(ForEachStatement node) {
-    _runSubscriptions(node, registry._forForEachStatement);
-    super.visitForEachStatement(node);
-  }
-
-  @override
   void visitForElement(ForElement node) {
     _runSubscriptions(node, registry._forForElement);
     super.visitForElement(node);
@@ -301,12 +295,6 @@
   }
 
   @override
-  void visitForStatement2(ForStatement2 node) {
-    _runSubscriptions(node, registry._forForStatement2);
-    super.visitForStatement2(node);
-  }
-
-  @override
   void visitFunctionDeclaration(FunctionDeclaration node) {
     _runSubscriptions(node, registry._forFunctionDeclaration);
     super.visitFunctionDeclaration(node);
@@ -451,24 +439,6 @@
   }
 
   @override
-  void visitListLiteral2(ListLiteral2 node) {
-    _runSubscriptions(node, registry._forListLiteral2);
-    super.visitListLiteral2(node);
-  }
-
-  @override
-  void visitMapLiteral(MapLiteral node) {
-    _runSubscriptions(node, registry._forMapLiteral);
-    super.visitMapLiteral(node);
-  }
-
-  @override
-  void visitMapLiteral2(MapLiteral2 node) {
-    _runSubscriptions(node, registry._forMapLiteral2);
-    super.visitMapLiteral2(node);
-  }
-
-  @override
   void visitMapLiteralEntry(MapLiteralEntry node) {
     _runSubscriptions(node, registry._forMapLiteralEntry);
     super.visitMapLiteralEntry(node);
@@ -572,9 +542,9 @@
   }
 
   @override
-  void visitSetLiteral2(SetLiteral2 node) {
-    _runSubscriptions(node, registry._forSetLiteral2);
-    super.visitSetLiteral2(node);
+  void visitSetOrMapLiteral(SetOrMapLiteral node) {
+    _runSubscriptions(node, registry._forSetOrMapLiteral);
+    super.visitSetOrMapLiteral(node);
   }
 
   @override
@@ -801,7 +771,6 @@
       _forForEachPartsWithDeclaration = [];
   final List<_Subscription<ForEachPartsWithIdentifier>>
       _forForEachPartsWithIdentifier = [];
-  final List<_Subscription<ForEachStatement>> _forForEachStatement = [];
   final List<_Subscription<ForElement>> _forForElement = [];
   final List<_Subscription<FormalParameterList>> _forFormalParameterList = [];
   final List<_Subscription<ForPartsWithDeclarations>>
@@ -809,7 +778,6 @@
   final List<_Subscription<ForPartsWithExpression>> _forForPartsWithExpression =
       [];
   final List<_Subscription<ForStatement>> _forForStatement = [];
-  final List<_Subscription<ForStatement2>> _forForStatement2 = [];
   final List<_Subscription<FunctionDeclaration>> _forFunctionDeclaration = [];
   final List<_Subscription<FunctionDeclarationStatement>>
       _forFunctionDeclarationStatement = [];
@@ -839,9 +807,6 @@
   final List<_Subscription<LibraryDirective>> _forLibraryDirective = [];
   final List<_Subscription<LibraryIdentifier>> _forLibraryIdentifier = [];
   final List<_Subscription<ListLiteral>> _forListLiteral = [];
-  final List<_Subscription<ListLiteral2>> _forListLiteral2 = [];
-  final List<_Subscription<MapLiteral>> _forMapLiteral = [];
-  final List<_Subscription<MapLiteral2>> _forMapLiteral2 = [];
   final List<_Subscription<MapLiteralEntry>> _forMapLiteralEntry = [];
   final List<_Subscription<MethodDeclaration>> _forMethodDeclaration = [];
   final List<_Subscription<MethodInvocation>> _forMethodInvocation = [];
@@ -861,7 +826,7 @@
       _forRedirectingConstructorInvocation = [];
   final List<_Subscription<RethrowExpression>> _forRethrowExpression = [];
   final List<_Subscription<ReturnStatement>> _forReturnStatement = [];
-  final List<_Subscription<SetLiteral2>> _forSetLiteral2 = [];
+  final List<_Subscription<SetOrMapLiteral>> _forSetOrMapLiteral = [];
   final List<_Subscription<ShowCombinator>> _forShowCombinator = [];
   final List<_Subscription<SimpleFormalParameter>> _forSimpleFormalParameter =
       [];
@@ -1094,11 +1059,6 @@
         .add(new _Subscription(linter, visitor, _getTimer(linter)));
   }
 
-  void addForEachStatement(LintRule linter, AstVisitor visitor) {
-    _forForEachStatement
-        .add(new _Subscription(linter, visitor, _getTimer(linter)));
-  }
-
   void addForElement(LintRule linter, AstVisitor visitor) {
     _forForElement.add(new _Subscription(linter, visitor, _getTimer(linter)));
   }
@@ -1122,9 +1082,9 @@
     _forForStatement.add(new _Subscription(linter, visitor, _getTimer(linter)));
   }
 
+  @Deprecated('Replaced by addForStatement')
   void addForStatement2(LintRule linter, AstVisitor visitor) {
-    _forForStatement2
-        .add(new _Subscription(linter, visitor, _getTimer(linter)));
+    addForStatement(linter, visitor);
   }
 
   void addFunctionDeclaration(LintRule linter, AstVisitor visitor) {
@@ -1242,18 +1202,6 @@
     _forListLiteral.add(new _Subscription(linter, visitor, _getTimer(linter)));
   }
 
-  void addListLiteral2(LintRule linter, AstVisitor visitor) {
-    _forListLiteral2.add(new _Subscription(linter, visitor, _getTimer(linter)));
-  }
-
-  void addMapLiteral(LintRule linter, AstVisitor visitor) {
-    _forMapLiteral.add(new _Subscription(linter, visitor, _getTimer(linter)));
-  }
-
-  void addMapLiteral2(LintRule linter, AstVisitor visitor) {
-    _forMapLiteral2.add(new _Subscription(linter, visitor, _getTimer(linter)));
-  }
-
   void addMapLiteralEntry(LintRule linter, AstVisitor visitor) {
     _forMapLiteralEntry
         .add(new _Subscription(linter, visitor, _getTimer(linter)));
@@ -1338,8 +1286,9 @@
         .add(new _Subscription(linter, visitor, _getTimer(linter)));
   }
 
-  void addSetLiteral2(LintRule linter, AstVisitor visitor) {
-    _forSetLiteral2.add(new _Subscription(linter, visitor, _getTimer(linter)));
+  void addSetOrMapLiteral(LintRule linter, AstVisitor visitor) {
+    _forSetOrMapLiteral
+        .add(new _Subscription(linter, visitor, _getTimer(linter)));
   }
 
   void addShowCombinator(LintRule linter, AstVisitor visitor) {
diff --git a/pkg/analyzer/lib/src/lint/options_rule_validator.dart b/pkg/analyzer/lib/src/lint/options_rule_validator.dart
index 9b28b1a..593dee4 100644
--- a/pkg/analyzer/lib/src/lint/options_rule_validator.dart
+++ b/pkg/analyzer/lib/src/lint/options_rule_validator.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/lint/project.dart b/pkg/analyzer/lib/src/lint/project.dart
index 7243747..f76a03e 100644
--- a/pkg/analyzer/lib/src/lint/project.dart
+++ b/pkg/analyzer/lib/src/lint/project.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/lint/registry.dart b/pkg/analyzer/lib/src/lint/registry.dart
index e72f804..3b4bbea 100644
--- a/pkg/analyzer/lib/src/lint/registry.dart
+++ b/pkg/analyzer/lib/src/lint/registry.dart
@@ -58,10 +58,4 @@
   void register(LintRule rule) {
     _ruleMap[rule.name] = rule;
   }
-
-  // todo (pq): remove once linter-0.1.79 is in DEPS.
-  @deprecated
-  void registerDefault(LintRule rule) {
-    register(rule);
-  }
 }
diff --git a/pkg/analyzer/lib/src/manifest/manifest_validator.dart b/pkg/analyzer/lib/src/manifest/manifest_validator.dart
new file mode 100644
index 0000000..3f2c5aa
--- /dev/null
+++ b/pkg/analyzer/lib/src/manifest/manifest_validator.dart
@@ -0,0 +1,172 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/error/error.dart';
+import 'package:analyzer/error/listener.dart';
+import 'package:analyzer/src/generated/source.dart';
+import 'package:html/dom.dart';
+import 'package:html/parser.dart' show parseFragment;
+import 'package:source_span/source_span.dart';
+
+import 'manifest_values.dart';
+import 'manifest_warning_code.dart';
+
+class ManifestValidator {
+  /**
+   * The source representing the file being validated.
+   */
+  final Source source;
+
+  /**
+   * Initialize a newly create validator to validate the content of the given
+   * [source].
+   */
+  ManifestValidator(this.source);
+
+  /*
+   * Validate the [contents] of the Android Manifest file.
+   */
+  List<AnalysisError> validate(String contents, bool checkManifest) {
+    RecordingErrorListener recorder = new RecordingErrorListener();
+    ErrorReporter reporter = new ErrorReporter(recorder, source);
+
+    if (checkManifest) {
+      var document =
+          parseFragment(contents, container: MANIFEST_TAG, generateSpans: true);
+      var manifest = document.children.firstWhere(
+          (element) => element.localName == MANIFEST_TAG,
+          orElse: () => null);
+      var features = manifest?.getElementsByTagName(USES_FEATURE_TAG) ?? [];
+      var permissions =
+          manifest?.getElementsByTagName(USES_PERMISSION_TAG) ?? [];
+      var activities = _findActivityElements(manifest);
+
+      _validateTouchScreenFeature(features, manifest, reporter);
+      _validateFeatures(features, reporter);
+      _validatePermissions(permissions, features, reporter);
+      _validateActivities(activities, reporter);
+    }
+    return recorder.errors;
+  }
+
+  /*
+   * Validate the presence/absence of the touchscreen feature tag.
+   */
+  _validateTouchScreenFeature(
+      List<Element> features, Element manifest, ErrorReporter reporter) {
+    var feature = features.firstWhere(
+        (element) =>
+            element.attributes[ANDROID_NAME] == HARDWARE_FEATURE_TOUCHSCREEN,
+        orElse: () => null);
+    if (feature != null) {
+      if (!feature.attributes.containsKey(ANDROID_REQUIRED)) {
+        _reportErrorForNode(reporter, feature, ANDROID_NAME,
+            ManifestWarningCode.UNSUPPORTED_CHROME_OS_HARDWARE);
+      } else if (feature.attributes[ANDROID_REQUIRED] == 'true') {
+        _reportErrorForNode(reporter, feature, ANDROID_NAME,
+            ManifestWarningCode.UNSUPPORTED_CHROME_OS_FEATURE);
+      }
+    } else {
+      _reportErrorForNode(
+          reporter, manifest, null, ManifestWarningCode.NO_TOUCHSCREEN_FEATURE);
+    }
+  }
+
+  /*
+   * Validate the `uses-feature` tags.
+   */
+  _validateFeatures(List<Element> features, ErrorReporter reporter) {
+    var unsupported = features
+        .where((element) => UNSUPPORTED_HARDWARE_FEATURES
+            .contains(element.attributes[ANDROID_NAME]))
+        .toList();
+    unsupported.forEach((element) {
+      if (!element.attributes.containsKey(ANDROID_REQUIRED)) {
+        _reportErrorForNode(reporter, element, ANDROID_NAME,
+            ManifestWarningCode.UNSUPPORTED_CHROME_OS_HARDWARE);
+      } else if (element.attributes[ANDROID_REQUIRED] == 'true') {
+        _reportErrorForNode(reporter, element, ANDROID_NAME,
+            ManifestWarningCode.UNSUPPORTED_CHROME_OS_FEATURE);
+      }
+    });
+  }
+
+  /*
+   * Validate the `uses-permission` tags.
+   */
+  _validatePermissions(List<Element> permissions, List<Element> features,
+      ErrorReporter reporter) {
+    permissions.forEach((permission) {
+      if (permission.attributes[ANDROID_NAME] == ANDROID_PERMISSION_CAMERA) {
+        if (!_hasFeatureCamera(features) ||
+            !_hasFeatureCameraAutoFocus(features)) {
+          _reportErrorForNode(reporter, permission, ANDROID_NAME,
+              ManifestWarningCode.CAMERA_PERMISSIONS_INCOMPATIBLE);
+        }
+      } else {
+        var featureName =
+            getImpliedUnsupportedHardware(permission.attributes[ANDROID_NAME]);
+        if (featureName != null) {
+          _reportErrorForNode(
+              reporter,
+              permission,
+              ANDROID_NAME,
+              ManifestWarningCode.PERMISSION_IMPLIES_UNSUPPORTED_HARDWARE,
+              [featureName]);
+        }
+      }
+    });
+  }
+
+  /*
+   * Validate the 'activity' tags.
+   */
+  _validateActivities(List<Element> activites, ErrorReporter reporter) {
+    activites.forEach((activity) {
+      var attributes = activity.attributes;
+      if (attributes.containsKey(ATTRIBUTE_SCREEN_ORIENTATION)) {
+        var value = attributes[ATTRIBUTE_SCREEN_ORIENTATION];
+        if (UNSUPPORTED_ORIENTATIONS
+            .contains(attributes[ATTRIBUTE_SCREEN_ORIENTATION])) {
+          _reportErrorForNode(reporter, activity, ATTRIBUTE_SCREEN_ORIENTATION,
+              ManifestWarningCode.SETTING_ORIENTATION_ON_ACTIVITY);
+        }
+      }
+      if (attributes.containsKey(ATTRIBUTE_RESIZEABLE_ACTIVITY)) {
+        if (attributes[ATTRIBUTE_RESIZEABLE_ACTIVITY] == 'false') {
+          _reportErrorForNode(reporter, activity, ATTRIBUTE_RESIZEABLE_ACTIVITY,
+              ManifestWarningCode.NON_RESIZABLE_ACTIVITY);
+        }
+      }
+    });
+  }
+
+  List<Element> _findActivityElements(Element manifest) {
+    var applications = manifest?.getElementsByTagName(APPLICATION_TAG);
+    var applicationElement = (applications != null && applications.isNotEmpty)
+        ? applications.first
+        : null;
+    var activities =
+        applicationElement?.getElementsByTagName(ACTIVITY_TAG) ?? [];
+    return activities;
+  }
+
+  bool _hasFeatureCamera(List<Element> features) =>
+      features.any((f) => f.localName == HARDWARE_FEATURE_CAMERA);
+
+  bool _hasFeatureCameraAutoFocus(List<Element> features) =>
+      features.any((f) => f.localName == HARDWARE_FEATURE_CAMERA_AUTOFOCUS);
+
+  /**
+   * Report an error for the given node.
+   */
+  void _reportErrorForNode(
+      ErrorReporter reporter, Node node, dynamic key, ErrorCode errorCode,
+      [List<Object> arguments]) {
+    FileSpan span =
+        key == null ? node.sourceSpan : node.attributeValueSpans[key];
+    reporter.reportErrorForOffset(
+        errorCode, span.start.offset, span.length, arguments);
+  }
+}
diff --git a/pkg/analyzer/lib/src/manifest/manifest_values.dart b/pkg/analyzer/lib/src/manifest/manifest_values.dart
new file mode 100644
index 0000000..f44a4ba
--- /dev/null
+++ b/pkg/analyzer/lib/src/manifest/manifest_values.dart
@@ -0,0 +1,124 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/*
+*  The attribute values to check for compatibility with Chrome OS.
+*
+*/
+
+const String MANIFEST_TAG = 'manifest';
+
+const String USES_PERMISSION_TAG = 'uses-permission';
+
+const String USES_FEATURE_TAG = 'uses-feature';
+
+const String APPLICATION_TAG = 'application';
+
+const String ACTIVITY_TAG = 'activity';
+
+const String ANDROID_NAME = 'android:name';
+
+const String ANDROID_REQUIRED = 'android:required';
+
+// The parser does not maintain camelcase for attributes
+// Use 'resizeableactivity' instead of 'resizeableActivity'
+const String ATTRIBUTE_RESIZEABLE_ACTIVITY = 'android:resizeableactivity';
+
+// Use 'screenorientation' instead of 'screenOrientation'
+const String ATTRIBUTE_SCREEN_ORIENTATION = 'android:screenorientation';
+
+const String HARDWARE_FEATURE_CAMERA = 'android.hardware.camera';
+
+const String HARDWARE_FEATURE_TOUCHSCREEN = 'android.hardware.touchscreen';
+
+const String HARDWARE_FEATURE_CAMERA_AUTOFOCUS =
+    'android.hardware.camera.autofocus';
+
+const String HARDWARE_FEATURE_TELEPHONY = 'android.hardware.telephony';
+
+const String ANDROID_PERMISSION_CAMERA = 'android.permission.CAMERA';
+
+const UNSUPPORTED_HARDWARE_FEATURES = <String>[
+  HARDWARE_FEATURE_CAMERA,
+  HARDWARE_FEATURE_CAMERA_AUTOFOCUS,
+  'android.hardware.camera.capability.manual_post_processing',
+  'android.hardware.camera.capability.manual_sensor',
+  'android.hardware.camera.capability.raw',
+  'android.hardware.camera.flash',
+  'android.hardware.camera.level.full',
+  'android.hardware.consumerir',
+  'android.hardware.location.gps',
+  'android.hardware.nfc',
+  'android.hardware.nfc.hce',
+  'android.hardware.sensor.barometer',
+  HARDWARE_FEATURE_TELEPHONY,
+  'android.hardware.telephony.cdma',
+  'android.hardware.telephony.gsm',
+  'android.hardware.type.automotive',
+  'android.hardware.type.television',
+  'android.hardware.usb.accessory',
+  'android.hardware.usb.host',
+  // Partially-supported, only on some Chrome OS devices.
+  'android.hardware.sensor.accelerometer',
+  'android.hardware.sensor.compass',
+  'android.hardware.sensor.gyroscope',
+  'android.hardware.sensor.light',
+  'android.hardware.sensor.proximity',
+  'android.hardware.sensor.stepcounter',
+  'android.hardware.sensor.stepdetector',
+  // Software features that are not supported
+  'android.software.app_widgets',
+  'android.software.device_admin',
+  'android.software.home_screen',
+  'android.software.input_methods',
+  'android.software.leanback',
+  'android.software.live_wallpaper',
+  'android.software.live_tv',
+  'android.software.managed_users',
+  'android.software.midi',
+  'android.software.sip',
+  'android.software.sip.voip',
+];
+
+String getImpliedUnsupportedHardware(String permission) {
+  switch (permission) {
+    case ANDROID_PERMISSION_CAMERA:
+      return HARDWARE_FEATURE_CAMERA;
+    case 'android.permission.CALL_PHONE':
+      return HARDWARE_FEATURE_TELEPHONY;
+    case 'android.permission.CALL_PRIVILEGED':
+      return HARDWARE_FEATURE_TELEPHONY;
+    case 'android.permission.MODIFY_PHONE_STATE':
+      return HARDWARE_FEATURE_TELEPHONY;
+    case 'android.permission.PROCESS_OUTGOING_CALLS':
+      return HARDWARE_FEATURE_TELEPHONY;
+    case 'android.permission.READ_SMS':
+      return HARDWARE_FEATURE_TELEPHONY;
+    case 'android.permission.RECEIVE_SMS':
+      return HARDWARE_FEATURE_TELEPHONY;
+    case 'android.permission.RECEIVE_MMS':
+      return HARDWARE_FEATURE_TELEPHONY;
+    case 'android.permission.RECEIVE_WAP_PUSH':
+      return HARDWARE_FEATURE_TELEPHONY;
+    case 'android.permission.SEND_SMS':
+      return HARDWARE_FEATURE_TELEPHONY;
+    case 'android.permission.WRITE_APN_SETTINGS':
+      return HARDWARE_FEATURE_TELEPHONY;
+    case 'android.permission.WRITE_SMS':
+      return HARDWARE_FEATURE_TELEPHONY;
+    default:
+      return null;
+  }
+}
+
+const UNSUPPORTED_ORIENTATIONS = <String>[
+  'landscape',
+  'portrait',
+  'reverseLandscape',
+  'reversePortrait',
+  'sensorLandscape',
+  'sensorPortrait',
+  'userLandscape',
+  'userPortrait'
+];
diff --git a/pkg/analyzer/lib/src/manifest/manifest_warning_code.dart b/pkg/analyzer/lib/src/manifest/manifest_warning_code.dart
new file mode 100644
index 0000000..c7c1504
--- /dev/null
+++ b/pkg/analyzer/lib/src/manifest/manifest_warning_code.dart
@@ -0,0 +1,109 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/error/error.dart';
+
+/**
+ * The error codes used for warnings in analysis options files. The convention
+ * for this class is for the name of the error code to indicate the problem that
+ * caused the error to be generated and for the error message to explain what is
+ * wrong and, when appropriate, how the problem can be corrected.
+ */
+class ManifestWarningCode extends ErrorCode {
+  /**
+   * A code indicating that a specified hardware feature is not supported on Chrome OS.
+   */
+  static const ManifestWarningCode UNSUPPORTED_CHROME_OS_HARDWARE =
+      const ManifestWarningCode(
+          'UNSUPPORTED_CHROME_OS_HARDWARE',
+          "This feature is not supported on Chrome OS. Try adding " +
+              "`android:required=\"false\"` for this feature.",
+          correction:
+              "Try adding `android:required=\"false\"` for this " + "feature.");
+
+  /**
+   * A code indicating that a specified feature is not supported on Chrome OS.
+   */
+  static const ManifestWarningCode UNSUPPORTED_CHROME_OS_FEATURE =
+      const ManifestWarningCode(
+          'UNSUPPORTED_CHROME_OS_FEATURE',
+          "This feature is not supported on Chrome OS. Try changing " +
+              "`android:required to \"false\"` for this feature.",
+          correction: "Try changing to `android:required=\"false\"` for this " +
+              "feature.");
+
+  /**
+   * A code indicating that the touchscreen feature is not specified in the
+   * manifest.
+   */
+  static const ManifestWarningCode NO_TOUCHSCREEN_FEATURE = const ManifestWarningCode(
+      'NO_TOUCHSCREEN_FEATURE',
+      "Explicitly set \"android.hardware.touchscreen\" to not required for Chrome OS. " +
+          "Consider adding " +
+          "<uses-feature android:name=\"android.hardware.touchscreen\" android:required=\"false\" />" +
+          " to the manifest.",
+      correction: "Consider adding " +
+          "<uses-feature android:name=\"android.hardware.touchscreen\" android:required=\"false\" />" +
+          " to the manifest.");
+
+  /**
+   * A code indicating that a specified permission is not supported on Chrome OS.
+   */
+  static const ManifestWarningCode PERMISSION_IMPLIES_UNSUPPORTED_HARDWARE =
+      const ManifestWarningCode(
+          'PERMISSION_IMPLIES_UNSUPPORTED_HARDWARE',
+          "Permission exists without corresponding hardware tag `<uses-feature " +
+              "android:name=\"{0}\"  android:required=\"false\">`.",
+          correction:
+              "Try adding the uses-feature with required=\"false\" attribute value.");
+
+  /**
+   * A code indicating that the camera permissions is not supported on Chrome OS.
+   */
+  static const ManifestWarningCode CAMERA_PERMISSIONS_INCOMPATIBLE =
+      const ManifestWarningCode(
+          'CAMERA_PERMISSIONS_INCOMPATIBLE',
+          "Permission exists without corresponding hardware `<uses-feature " +
+              "android:name=\"android.hardware.camera\"  android:required=\"false\">` " +
+              "`<uses-feature " +
+              "android:name=\"android.hardware.camera.autofocus\"  android:required=\"false\">`.",
+          correction:
+              "Try adding the uses-feature with required=\"false\" attribute value.");
+
+  /**
+   * A code indicating that the activity is set to be non resizable.
+   */
+  static const ManifestWarningCode NON_RESIZABLE_ACTIVITY =
+      const ManifestWarningCode(
+          'NON_RESIZABLE_ACTIVITY',
+          "The `<activity>` element should be allowed to be resized to allow " +
+              "users to take advantage of the multi-window environment on Chrome OS",
+          correction: "Consider declaring the corresponding " +
+              "activity element with `resizableActivity=\"true\"` attribute.");
+
+  /**
+   * A code indicating that the activity is locked to an orientation.
+   */
+  static const ManifestWarningCode SETTING_ORIENTATION_ON_ACTIVITY =
+      const ManifestWarningCode(
+          'SETTING_ORIENTATION_ON_ACTIVITY',
+          "The `<activity>` element should not be locked to any orientation so " +
+              "that users can take advantage of the multi-window environments " +
+              "and larger screens on Chrome OS",
+          correction: "Consider declaring the corresponding activity element with" +
+              " `screenOrientation=\"unspecified\"` or `\"fullSensor\"` attribute.");
+
+  /**
+   * Initialize a newly created warning code to have the given [name], [message]
+   * and [correction].
+   */
+  const ManifestWarningCode(String name, String message, {String correction})
+      : super.temporary(name, message, correction: correction);
+
+  @override
+  ErrorSeverity get errorSeverity => ErrorSeverity.WARNING;
+
+  @override
+  ErrorType get type => ErrorType.STATIC_WARNING;
+}
diff --git a/pkg/analyzer/lib/src/plugin/engine_plugin.dart b/pkg/analyzer/lib/src/plugin/engine_plugin.dart
deleted file mode 100644
index 7d5a4a3..0000000
--- a/pkg/analyzer/lib/src/plugin/engine_plugin.dart
+++ /dev/null
@@ -1,185 +0,0 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/error/error.dart' show AnalysisError;
-import 'package:analyzer/src/generated/engine.dart'
-    show InternalAnalysisContext;
-import 'package:analyzer/src/plugin/task.dart';
-import 'package:analyzer/src/task/api/model.dart';
-import 'package:analyzer/src/task/dart.dart';
-import 'package:analyzer/src/task/dart_work_manager.dart';
-import 'package:analyzer/src/task/html.dart';
-import 'package:analyzer/src/task/html_work_manager.dart';
-import 'package:analyzer/src/task/options_work_manager.dart';
-import 'package:plugin/plugin.dart';
-
-/**
- * A plugin that defines the extension points and extensions that are inherently
- * defined by the analysis engine.
- */
-class EnginePlugin implements Plugin {
-  /**
-   * The simple identifier of the extension point that allows plugins to
-   * register new analysis error results to compute for a Dart source.
-   */
-  static const String DART_ERRORS_FOR_SOURCE_EXTENSION_POINT =
-      'dartErrorsForSource';
-
-  /**
-   * The simple identifier of the extension point that allows plugins to
-   * register new analysis error results to compute for a Dart library
-   * specific unit.
-   */
-  static const String DART_ERRORS_FOR_UNIT_EXTENSION_POINT =
-      'dartErrorsForUnit';
-
-  /**
-   * The simple identifier of the extension point that allows plugins to
-   * register new analysis error results to compute for an HTML source.
-   */
-  static const String HTML_ERRORS_EXTENSION_POINT = 'htmlErrors';
-
-  /**
-   * The simple identifier of the extension point that allows plugins to
-   * register new work manager factories with the analysis engine.
-   */
-  static const String WORK_MANAGER_FACTORY_EXTENSION_POINT =
-      'workManagerFactory';
-
-  /**
-   * The unique identifier of this plugin.
-   */
-  static const String UNIQUE_IDENTIFIER = 'analysis_engine.core';
-
-  /**
-   * The extension point that allows plugins to register new analysis error
-   * results for a Dart source.
-   */
-  ExtensionPoint<ListResultDescriptor<AnalysisError>>
-      dartErrorsForSourceExtensionPoint;
-
-  /**
-   * The extension point that allows plugins to register new analysis error
-   * results for a Dart library specific unit.
-   */
-  ExtensionPoint<ListResultDescriptor<AnalysisError>>
-      dartErrorsForUnitExtensionPoint;
-
-  /**
-   * The extension point that allows plugins to register new analysis error
-   * results for an HTML source.
-   */
-  ExtensionPoint<ListResultDescriptor<AnalysisError>> htmlErrorsExtensionPoint;
-
-  /**
-   * The extension point that allows plugins to register new work manager
-   * factories with the analysis engine.
-   */
-  ExtensionPoint<WorkManagerFactory> workManagerFactoryExtensionPoint;
-
-  /**
-   * Initialize a newly created plugin.
-   */
-  EnginePlugin();
-
-  /**
-   * Return a list containing all of the contributed analysis error result
-   * descriptors for Dart sources.
-   */
-  @ExtensionPointId('DART_ERRORS_FOR_SOURCE_EXTENSION_POINT_ID')
-  List<ListResultDescriptor<AnalysisError>> get dartErrorsForSource =>
-      dartErrorsForSourceExtensionPoint.extensions;
-
-  /**
-   * Return a list containing all of the contributed analysis error result
-   * descriptors for Dart library specific units.
-   */
-  @ExtensionPointId('DART_ERRORS_FOR_UNIT_EXTENSION_POINT_ID')
-  List<ListResultDescriptor<AnalysisError>> get dartErrorsForUnit =>
-      dartErrorsForUnitExtensionPoint.extensions;
-
-  /**
-   * Return a list containing all of the contributed analysis error result
-   * descriptors for HTML sources.
-   */
-  @ExtensionPointId('HTML_ERRORS_EXTENSION_POINT_ID')
-  List<ListResultDescriptor<AnalysisError>> get htmlErrors =>
-      htmlErrorsExtensionPoint.extensions;
-
-  @override
-  String get uniqueIdentifier => UNIQUE_IDENTIFIER;
-
-  /**
-   * Return a list containing all of the work manager factories that were
-   * contributed.
-   */
-  List<WorkManagerFactory> get workManagerFactories =>
-      workManagerFactoryExtensionPoint.extensions;
-
-  @override
-  void registerExtensionPoints(RegisterExtensionPoint registerExtensionPoint) {
-    dartErrorsForSourceExtensionPoint =
-        new ExtensionPoint<ListResultDescriptor<AnalysisError>>(
-            this, DART_ERRORS_FOR_SOURCE_EXTENSION_POINT, null);
-    registerExtensionPoint(dartErrorsForSourceExtensionPoint);
-    dartErrorsForUnitExtensionPoint =
-        new ExtensionPoint<ListResultDescriptor<AnalysisError>>(
-            this, DART_ERRORS_FOR_UNIT_EXTENSION_POINT, null);
-    registerExtensionPoint(dartErrorsForUnitExtensionPoint);
-    htmlErrorsExtensionPoint =
-        new ExtensionPoint<ListResultDescriptor<AnalysisError>>(
-            this, HTML_ERRORS_EXTENSION_POINT, null);
-    registerExtensionPoint(htmlErrorsExtensionPoint);
-    workManagerFactoryExtensionPoint = new ExtensionPoint<WorkManagerFactory>(
-        this, WORK_MANAGER_FACTORY_EXTENSION_POINT, null);
-    registerExtensionPoint(workManagerFactoryExtensionPoint);
-  }
-
-  @override
-  void registerExtensions(RegisterExtension registerExtension) {
-    _registerWorkManagerFactoryExtensions(registerExtension);
-    _registerDartErrorsForSource(registerExtension);
-    _registerDartErrorsForUnit(registerExtension);
-    _registerHtmlErrors(registerExtension);
-  }
-
-  void _registerDartErrorsForSource(RegisterExtension registerExtension) {
-    registerExtension(DART_ERRORS_FOR_SOURCE_EXTENSION_POINT_ID, PARSE_ERRORS);
-    registerExtension(DART_ERRORS_FOR_SOURCE_EXTENSION_POINT_ID, SCAN_ERRORS);
-  }
-
-  void _registerDartErrorsForUnit(RegisterExtension registerExtension) {
-    registerExtension(
-        DART_ERRORS_FOR_UNIT_EXTENSION_POINT_ID, LIBRARY_UNIT_ERRORS);
-  }
-
-  void _registerHtmlErrors(RegisterExtension registerExtension) {
-    registerExtension(HTML_ERRORS_EXTENSION_POINT_ID, HTML_DOCUMENT_ERRORS);
-  }
-
-  void _registerWorkManagerFactoryExtensions(
-      RegisterExtension registerExtension) {
-    String taskId = WORK_MANAGER_EXTENSION_POINT_ID;
-    registerExtension(taskId,
-        (InternalAnalysisContext context) => new DartWorkManager(context));
-    registerExtension(taskId,
-        (InternalAnalysisContext context) => new HtmlWorkManager(context));
-    registerExtension(taskId,
-        (InternalAnalysisContext context) => new OptionsWorkManager(context));
-  }
-}
-
-/**
- * Annotation describing the relationship between a getter in [EnginePlugin]
- * and the associated identifier (in 'task.dart') which can be passed to the
- * extension manager to populate it.
- *
- * This annotation is not used at runtime; it is used to aid in static analysis
- * of the task model during development.
- */
-class ExtensionPointId {
-  final String extensionPointId;
-
-  const ExtensionPointId(this.extensionPointId);
-}
diff --git a/pkg/analyzer/lib/src/plugin/options.dart b/pkg/analyzer/lib/src/plugin/options.dart
index e259428..ebfa648 100644
--- a/pkg/analyzer/lib/src/plugin/options.dart
+++ b/pkg/analyzer/lib/src/plugin/options.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/plugin/resolver_provider.dart b/pkg/analyzer/lib/src/plugin/resolver_provider.dart
index abbb3a8..9ef7a7b 100644
--- a/pkg/analyzer/lib/src/plugin/resolver_provider.dart
+++ b/pkg/analyzer/lib/src/plugin/resolver_provider.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/plugin/task.dart b/pkg/analyzer/lib/src/plugin/task.dart
index 8292485..54ec75e 100644
--- a/pkg/analyzer/lib/src/plugin/task.dart
+++ b/pkg/analyzer/lib/src/plugin/task.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -7,44 +7,7 @@
  * analysis tasks.
  */
 import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/plugin/engine_plugin.dart';
 import 'package:analyzer/src/task/api/model.dart';
-import 'package:plugin/plugin.dart';
-
-/**
- * The identifier of the extension point that allows plugins to register new
- * analysis error results to compute for a Dart source. The object used as an
- * extension must be a [ResultDescriptor].
- */
-final String DART_ERRORS_FOR_SOURCE_EXTENSION_POINT_ID = Plugin.join(
-    EnginePlugin.UNIQUE_IDENTIFIER,
-    EnginePlugin.DART_ERRORS_FOR_SOURCE_EXTENSION_POINT);
-
-/**
- * The identifier of the extension point that allows plugins to register new
- * analysis error results to compute for a Dart library specific unit. The
- * object used as an extension must be a [ResultDescriptor].
- */
-final String DART_ERRORS_FOR_UNIT_EXTENSION_POINT_ID = Plugin.join(
-    EnginePlugin.UNIQUE_IDENTIFIER,
-    EnginePlugin.DART_ERRORS_FOR_UNIT_EXTENSION_POINT);
-
-/**
- * The identifier of the extension point that allows plugins to register new
- * analysis error results to compute for an HTML source. The object used as an
- * extension must be a [ResultDescriptor].
- */
-final String HTML_ERRORS_EXTENSION_POINT_ID = Plugin.join(
-    EnginePlugin.UNIQUE_IDENTIFIER, EnginePlugin.HTML_ERRORS_EXTENSION_POINT);
-
-/**
- * The identifier of the extension point that allows plugins to register new
- * work managers with the analysis engine. The object used as an extension must
- * be a [WorkManagerFactory].
- */
-final String WORK_MANAGER_EXTENSION_POINT_ID = Plugin.join(
-    EnginePlugin.UNIQUE_IDENTIFIER,
-    EnginePlugin.WORK_MANAGER_FACTORY_EXTENSION_POINT);
 
 /**
  * A function that will create a new [WorkManager] for the given [context].
diff --git a/pkg/analyzer/lib/src/services/available_declarations.dart b/pkg/analyzer/lib/src/services/available_declarations.dart
index a9056f4..431ccb0 100644
--- a/pkg/analyzer/lib/src/services/available_declarations.dart
+++ b/pkg/analyzer/lib/src/services/available_declarations.dart
@@ -7,12 +7,16 @@
 
 import 'package:analyzer/dart/analysis/analysis_context.dart';
 import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/source/line_info.dart';
 import 'package:analyzer/src/dart/analysis/byte_store.dart';
+import 'package:analyzer/src/dart/ast/ast.dart';
+import 'package:analyzer/src/dart/ast/token.dart';
 import 'package:analyzer/src/dart/scanner/reader.dart';
 import 'package:analyzer/src/dart/scanner/scanner.dart';
+import 'package:analyzer/src/dartdoc/dartdoc_directive_info.dart';
 import 'package:analyzer/src/generated/parser.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:analyzer/src/string_source.dart';
@@ -28,6 +32,9 @@
 
 /// A top-level public declaration.
 class Declaration {
+  final List<Declaration> children;
+  final String defaultArgumentListString;
+  final List<int> defaultArgumentListTextRanges;
   final String docComplete;
   final String docSummary;
   final bool isAbstract;
@@ -40,10 +47,10 @@
   final int locationStartColumn;
   final int locationStartLine;
   final String name;
-  final String name2;
   final String parameters;
   final List<String> parameterNames;
   final List<String> parameterTypes;
+  final Declaration parent;
   final int requiredParameterCount;
   final String returnType;
   final String typeParameters;
@@ -51,6 +58,9 @@
   List<String> _relevanceTags;
 
   Declaration({
+    @required this.children,
+    @required this.defaultArgumentListString,
+    @required this.defaultArgumentListTextRanges,
     @required this.docComplete,
     @required this.docSummary,
     @required this.isAbstract,
@@ -63,10 +73,10 @@
     @required this.locationStartColumn,
     @required this.locationStartLine,
     @required this.name,
-    @required this.name2,
     @required this.parameters,
     @required this.parameterNames,
     @required this.parameterTypes,
+    @required this.parent,
     @required List<String> relevanceTags,
     @required this.requiredParameterCount,
     @required this.returnType,
@@ -77,11 +87,7 @@
 
   @override
   String toString() {
-    if (name2 == null) {
-      return '($kind, $name)';
-    } else {
-      return '($kind, $name, $name2)';
-    }
+    return '($kind, $name)';
   }
 }
 
@@ -89,6 +95,7 @@
 enum DeclarationKind {
   CLASS,
   CLASS_TYPE_ALIAS,
+  CONSTRUCTOR,
   ENUM,
   ENUM_CONSTANT,
   FUNCTION,
@@ -118,6 +125,10 @@
   /// The list of paths of all SDK libraries.
   final List<String> _sdkLibraryPathList = [];
 
+  /// The combined information about all of the dartdoc directives in this
+  /// context.
+  final DartdocDirectiveInfo _dartdocDirectiveInfo = new DartdocDirectiveInfo();
+
   /// Map of path prefixes to lists of paths of files from dependencies
   /// (both libraries and parts, we don't know at the time when we fill this
   /// map) that libraries with paths starting with these prefixes can access.
@@ -127,6 +138,10 @@
 
   DeclarationsContext(this._tracker, this._analysisContext);
 
+  /// Return the combined information about all of the dartdoc directives in
+  /// this context.
+  DartdocDirectiveInfo get dartdocDirectiveInfo => _dartdocDirectiveInfo;
+
   /// Return libraries that are available to the file with the given [path].
   ///
   /// With `Pub`, files below the `pubspec.yaml` file can access libraries
@@ -613,6 +628,7 @@
 
     var isLibrary = file.isLibrary;
     var library = isLibrary ? file : file.library;
+    if (library == null) return;
 
     if (isLibrary) {
       file.refresh(containingContext);
@@ -710,27 +726,30 @@
         var name = declaration.name;
         return <String>['$uriStr::$name'];
       case DeclarationKind.ENUM_CONSTANT:
-        var name2 = declaration.name2;
-        return <String>['$uriStr::$name2'];
+        var enumName = declaration.parent.name;
+        return <String>['$uriStr::$enumName'];
       default:
         return null;
     }
   }
 
   static List<String> _forExpression(Expression expression) {
-    if (expression is BooleanLiteral) return const ['dart:core::bool'];
-    if (expression is DoubleLiteral) return const ['dart:core::double'];
-    if (expression is IntegerLiteral) return const ['dart:core::int'];
-    if (expression is StringLiteral) return const ['dart:core::String'];
-
-    if (expression is ListLiteral || expression is ListLiteral2) {
+    if (expression is BooleanLiteral) {
+      return const ['dart:core::bool'];
+    } else if (expression is DoubleLiteral) {
+      return const ['dart:core::double'];
+    } else if (expression is IntegerLiteral) {
+      return const ['dart:core::int'];
+    } else if (expression is StringLiteral) {
+      return const ['dart:core::String'];
+    } else if (expression is ListLiteral) {
       return const ['dart:core::List'];
-    }
-    if (expression is MapLiteral || expression is MapLiteral2) {
-      return const ['dart:core::Map'];
-    }
-    if (expression is SetLiteral || expression is SetLiteral2) {
-      return const ['dart:core::Set'];
+    } else if (expression is SetOrMapLiteral) {
+      if (expression.isMap) {
+        return const ['dart:core::Map'];
+      } else if (expression.isSet) {
+        return const ['dart:core::Set'];
+      }
     }
 
     return null;
@@ -739,15 +758,14 @@
 
 class _DeclarationStorage {
   static const fieldDocMask = 1 << 0;
-  static const fieldName2Mask = 1 << 1;
-  static const fieldParametersMask = 1 << 2;
-  static const fieldReturnTypeMask = 1 << 3;
-  static const fieldTypeParametersMask = 1 << 4;
+  static const fieldParametersMask = 1 << 1;
+  static const fieldReturnTypeMask = 1 << 2;
+  static const fieldTypeParametersMask = 1 << 3;
 
-  static Declaration fromIdl(String path, idl.AvailableDeclaration d) {
+  static Declaration fromIdl(
+      String path, Declaration parent, idl.AvailableDeclaration d) {
     var fieldMask = d.fieldMask;
     var hasDoc = fieldMask & fieldDocMask != 0;
-    var hasName2 = fieldMask & fieldName2Mask != 0;
     var hasParameters = fieldMask & fieldParametersMask != 0;
     var hasReturnType = fieldMask & fieldReturnTypeMask != 0;
     var hasTypeParameters = fieldMask & fieldTypeParametersMask != 0;
@@ -759,7 +777,15 @@
       relevanceTags = null;
     }
 
-    return Declaration(
+    var children = <Declaration>[];
+    var declaration = Declaration(
+      children: children,
+      defaultArgumentListString: d.defaultArgumentListString.isNotEmpty
+          ? d.defaultArgumentListString
+          : null,
+      defaultArgumentListTextRanges: d.defaultArgumentListTextRanges.isNotEmpty
+          ? d.defaultArgumentListTextRanges
+          : null,
       docComplete: hasDoc ? d.docComplete : null,
       docSummary: hasDoc ? d.docSummary : null,
       isAbstract: d.isAbstract,
@@ -772,15 +798,22 @@
       locationStartColumn: d.locationStartColumn,
       locationStartLine: d.locationStartLine,
       name: d.name,
-      name2: hasName2 ? d.name2 : null,
       parameters: hasParameters ? d.parameters : null,
       parameterNames: hasParameters ? d.parameterNames : null,
       parameterTypes: hasParameters ? d.parameterTypes.toList() : null,
+      parent: parent,
       relevanceTags: relevanceTags,
       requiredParameterCount: hasParameters ? d.requiredParameterCount : null,
       returnType: hasReturnType ? d.returnType : null,
       typeParameters: hasTypeParameters ? d.typeParameters : null,
     );
+
+    for (var childIdl in d.children) {
+      var child = fromIdl(path, declaration, childIdl);
+      children.add(child);
+    }
+
+    return declaration;
   }
 
   static DeclarationKind kindFromIdl(idl.AvailableDeclarationKind kind) {
@@ -789,6 +822,8 @@
         return DeclarationKind.CLASS;
       case idl.AvailableDeclarationKind.CLASS_TYPE_ALIAS:
         return DeclarationKind.CLASS_TYPE_ALIAS;
+      case idl.AvailableDeclarationKind.CONSTRUCTOR:
+        return DeclarationKind.CONSTRUCTOR;
       case idl.AvailableDeclarationKind.ENUM:
         return DeclarationKind.ENUM;
       case idl.AvailableDeclarationKind.ENUM_CONSTANT:
@@ -816,6 +851,8 @@
         return idl.AvailableDeclarationKind.CLASS;
       case DeclarationKind.CLASS_TYPE_ALIAS:
         return idl.AvailableDeclarationKind.CLASS_TYPE_ALIAS;
+      case DeclarationKind.CONSTRUCTOR:
+        return idl.AvailableDeclarationKind.CONSTRUCTOR;
       case DeclarationKind.ENUM:
         return idl.AvailableDeclarationKind.ENUM;
       case DeclarationKind.ENUM_CONSTANT:
@@ -842,9 +879,6 @@
     if (d.docComplete != null) {
       fieldMask |= fieldDocMask;
     }
-    if (d.name2 != null) {
-      fieldMask |= fieldName2Mask;
-    }
     if (d.parameters != null) {
       fieldMask |= fieldParametersMask;
     }
@@ -857,6 +891,9 @@
 
     var idlKind = kindToIdl(d.kind);
     return idl.AvailableDeclarationBuilder(
+      children: d.children.map(toIdl).toList(),
+      defaultArgumentListString: d.defaultArgumentListString,
+      defaultArgumentListTextRanges: d.defaultArgumentListTextRanges,
       docComplete: d.docComplete,
       docSummary: d.docSummary,
       fieldMask: fieldMask,
@@ -869,7 +906,6 @@
       locationStartColumn: d.locationStartColumn,
       locationStartLine: d.locationStartLine,
       name: d.name,
-      name2: d.name2,
       parameters: d.parameters,
       parameterNames: d.parameterNames,
       parameterTypes: d.parameterTypes,
@@ -881,6 +917,13 @@
   }
 }
 
+class _DefaultArguments {
+  final String text;
+  final List<int> ranges;
+
+  _DefaultArguments(this.text, this.ranges);
+}
+
 class _Export {
   final Uri uri;
   final List<_ExportCombinator> combinators;
@@ -891,7 +934,7 @@
 
   Iterable<Declaration> filter(List<Declaration> declarations) {
     return declarations.where((d) {
-      var name = d.name2 ?? d.name;
+      var name = d.name;
       for (var combinator in combinators) {
         if (combinator.shows.isNotEmpty) {
           if (!combinator.shows.contains(name)) return false;
@@ -914,7 +957,7 @@
 
 class _File {
   /// The version of data format, should be incremented on every format change.
-  static const int DATA_VERSION = 5;
+  static const int DATA_VERSION = 11;
 
   /// The next value for [id].
   static int _nextId = 0;
@@ -941,6 +984,9 @@
   List<Declaration> libraryDeclarations = [];
   List<Declaration> exportedDeclarations;
 
+  List<String> templateNames = [];
+  List<String> templateValues = [];
+
   /// If `true`, then this library has already been sent to the client.
   bool isSent = false;
 
@@ -997,9 +1043,14 @@
 
       CompilationUnit unit = _parse(content);
       _buildFileDeclarations(unit);
+      _extractDartdocInfoFromUnit(unit);
       _putFileDeclarationsToByteStore(contentKey);
+      context.dartdocDirectiveInfo
+          .addTemplateNamesAndValues(templateNames, templateValues);
     } else {
       _readFileDeclarationsFromBytes(bytes);
+      context.dartdocDirectiveInfo
+          .addTemplateNamesAndValues(templateNames, templateValues);
     }
 
     // Resolve exports and parts.
@@ -1028,7 +1079,7 @@
       for (var part in parts) {
         libraryDeclarations.addAll(part.file.fileDeclarations);
       }
-      _computeRelevanceTagsForLibraryDeclarations();
+      _computeRelevanceTags(libraryDeclarations);
     }
   }
 
@@ -1038,6 +1089,8 @@
     fileDeclarations = [];
     libraryDeclarations = null;
     exportedDeclarations = null;
+    templateNames = [];
+    templateValues = [];
 
     for (var astDirective in unit.directives) {
       if (astDirective is ExportDirective) {
@@ -1088,48 +1141,62 @@
       }
     }
 
-    void addDeclaration({
+    Declaration addDeclaration({
+      String defaultArgumentListString,
+      List<int> defaultArgumentListTextRanges,
       bool isAbstract = false,
       bool isConst = false,
       bool isDeprecated = false,
       bool isFinal = false,
       @required DeclarationKind kind,
       @required Identifier name,
-      Identifier name2,
       String parameters,
       List<String> parameterNames,
       List<String> parameterTypes,
+      Declaration parent,
       List<String> relevanceTags,
       int requiredParameterCount,
       String returnType,
       String typeParameters,
     }) {
-      if (!Identifier.isPrivateName(name.name)) {
-        var locationOffset = name.offset;
-        var lineLocation = lineInfo.getLocation(locationOffset);
-        fileDeclarations.add(Declaration(
-          docComplete: docComplete,
-          docSummary: docSummary,
-          isAbstract: isAbstract,
-          isConst: isConst,
-          isDeprecated: isDeprecated,
-          isFinal: isFinal,
-          kind: kind,
-          locationOffset: locationOffset,
-          locationPath: path,
-          name: name.name,
-          name2: name2?.name,
-          locationStartColumn: lineLocation.columnNumber,
-          locationStartLine: lineLocation.lineNumber,
-          parameters: parameters,
-          parameterNames: parameterNames,
-          parameterTypes: parameterTypes,
-          relevanceTags: relevanceTags,
-          requiredParameterCount: requiredParameterCount,
-          returnType: returnType,
-          typeParameters: typeParameters,
-        ));
+      if (Identifier.isPrivateName(name.name)) {
+        return null;
       }
+
+      var locationOffset = name.offset;
+      var lineLocation = lineInfo.getLocation(locationOffset);
+      var declaration = Declaration(
+        children: <Declaration>[],
+        defaultArgumentListString: defaultArgumentListString,
+        defaultArgumentListTextRanges: defaultArgumentListTextRanges,
+        docComplete: docComplete,
+        docSummary: docSummary,
+        isAbstract: isAbstract,
+        isConst: isConst,
+        isDeprecated: isDeprecated,
+        isFinal: isFinal,
+        kind: kind,
+        locationOffset: locationOffset,
+        locationPath: path,
+        name: name.name,
+        locationStartColumn: lineLocation.columnNumber,
+        locationStartLine: lineLocation.lineNumber,
+        parameters: parameters,
+        parameterNames: parameterNames,
+        parameterTypes: parameterTypes,
+        parent: parent,
+        relevanceTags: relevanceTags,
+        requiredParameterCount: requiredParameterCount,
+        returnType: returnType,
+        typeParameters: typeParameters,
+      );
+
+      if (parent != null) {
+        parent.children.add(declaration);
+      } else {
+        fileDeclarations.add(declaration);
+      }
+      return declaration;
     }
 
     for (var node in unit.declarations) {
@@ -1137,12 +1204,77 @@
       var isDeprecated = _hasDeprecatedAnnotation(node);
 
       if (node is ClassDeclaration) {
-        addDeclaration(
+        var classDeclaration = addDeclaration(
           isAbstract: node.isAbstract,
           isDeprecated: isDeprecated,
           kind: DeclarationKind.CLASS,
           name: node.name,
         );
+        if (classDeclaration == null) continue;
+
+        var hasConstructor = false;
+        for (var classMember in node.members) {
+          if (classMember is ConstructorDeclaration) {
+            setDartDoc(classMember);
+            isDeprecated = _hasDeprecatedAnnotation(classMember);
+
+            var parameters = classMember.parameters;
+            var defaultArguments = _computeDefaultArguments(parameters);
+
+            var constructorName = classMember.name;
+            constructorName ??= SimpleIdentifierImpl(
+              StringToken(
+                TokenType.IDENTIFIER,
+                '',
+                classMember.returnType.offset,
+              ),
+            );
+
+            addDeclaration(
+              defaultArgumentListString: defaultArguments?.text,
+              defaultArgumentListTextRanges: defaultArguments?.ranges,
+              isDeprecated: isDeprecated,
+              kind: DeclarationKind.CONSTRUCTOR,
+              name: constructorName,
+              parameters: parameters.toSource(),
+              parameterNames: _getFormalParameterNames(parameters),
+              parameterTypes: _getFormalParameterTypes(parameters),
+              parent: classDeclaration,
+              requiredParameterCount:
+                  _getFormalParameterRequiredCount(parameters),
+              returnType: node.name.name,
+            );
+            hasConstructor = true;
+          }
+        }
+
+        if (!hasConstructor) {
+          classDeclaration.children.add(Declaration(
+            children: [],
+            defaultArgumentListString: null,
+            defaultArgumentListTextRanges: null,
+            docComplete: null,
+            docSummary: null,
+            isAbstract: false,
+            isConst: false,
+            isDeprecated: false,
+            isFinal: false,
+            kind: DeclarationKind.CONSTRUCTOR,
+            locationOffset: -1,
+            locationPath: path,
+            name: '',
+            locationStartColumn: 0,
+            locationStartLine: 0,
+            parameters: '()',
+            parameterNames: [],
+            parameterTypes: [],
+            parent: classDeclaration,
+            relevanceTags: null,
+            requiredParameterCount: 0,
+            returnType: node.name.name,
+            typeParameters: null,
+          ));
+        }
       } else if (node is ClassTypeAlias) {
         addDeclaration(
           isDeprecated: isDeprecated,
@@ -1150,11 +1282,13 @@
           name: node.name,
         );
       } else if (node is EnumDeclaration) {
-        addDeclaration(
+        var enumDeclaration = addDeclaration(
           isDeprecated: isDeprecated,
           kind: DeclarationKind.ENUM,
           name: node.name,
         );
+        if (enumDeclaration == null) continue;
+
         for (var constant in node.constants) {
           setDartDoc(constant);
           var isDeprecated = _hasDeprecatedAnnotation(constant);
@@ -1162,7 +1296,7 @@
             isDeprecated: isDeprecated,
             kind: DeclarationKind.ENUM_CONSTANT,
             name: constant.name,
-            name2: node.name,
+            parent: enumDeclaration,
           );
         }
       } else if (node is FunctionDeclaration) {
@@ -1187,7 +1321,10 @@
                 _getFormalParameterRequiredCount(parameters),
           );
         } else {
+          var defaultArguments = _computeDefaultArguments(parameters);
           addDeclaration(
+            defaultArgumentListString: defaultArguments?.text,
+            defaultArgumentListTextRanges: defaultArguments?.ranges,
             isDeprecated: isDeprecated,
             kind: DeclarationKind.FUNCTION,
             name: node.name,
@@ -1202,6 +1339,8 @@
         }
       } else if (node is GenericTypeAlias) {
         var functionType = node.functionType;
+        if (functionType == null) continue;
+
         var parameters = functionType.parameters;
         addDeclaration(
           isDeprecated: isDeprecated,
@@ -1238,10 +1377,47 @@
     }
   }
 
-  void _computeRelevanceTagsForLibraryDeclarations() {
-    for (var declaration in libraryDeclarations) {
+  void _computeRelevanceTags(List<Declaration> declarations) {
+    for (var declaration in declarations) {
       declaration._relevanceTags ??=
           RelevanceTags._forDeclaration(uriStr, declaration);
+      _computeRelevanceTags(declaration.children);
+    }
+  }
+
+  void _extractDartdocInfoFromUnit(CompilationUnit unit) {
+    DartdocDirectiveInfo info = new DartdocDirectiveInfo();
+    for (Directive directive in unit.directives) {
+      Comment comment = directive.documentationComment;
+      if (comment != null) {
+        info.extractTemplate(getCommentNodeRawText(comment));
+      }
+    }
+    for (CompilationUnitMember declaration in unit.declarations) {
+      Comment comment = declaration.documentationComment;
+      if (comment != null) {
+        info.extractTemplate(getCommentNodeRawText(comment));
+      }
+      if (declaration is ClassOrMixinDeclaration) {
+        for (ClassMember member in declaration.members) {
+          Comment comment = member.documentationComment;
+          if (comment != null) {
+            info.extractTemplate(getCommentNodeRawText(comment));
+          }
+        }
+      } else if (declaration is EnumDeclaration) {
+        for (EnumConstantDeclaration constant in declaration.constants) {
+          Comment comment = constant.documentationComment;
+          if (comment != null) {
+            info.extractTemplate(getCommentNodeRawText(comment));
+          }
+        }
+      }
+    }
+    Map<String, String> templateMap = info.templateMap;
+    for (String name in templateMap.keys) {
+      templateNames.add(name);
+      templateValues.add(templateMap[name]);
     }
   }
 
@@ -1268,6 +1444,8 @@
       declarations: fileDeclarations.map((d) {
         return _DeclarationStorage.toIdl(d);
       }).toList(),
+      directiveInfo: idl.DirectiveInfoBuilder(
+          templateNames: templateNames, templateValues: templateValues),
     );
     var bytes = builder.toBuffer();
     tracker._byteStore.put(contentKey, bytes);
@@ -1294,8 +1472,44 @@
     }).toList();
 
     fileDeclarations = idlFile.declarations.map((e) {
-      return _DeclarationStorage.fromIdl(path, e);
+      return _DeclarationStorage.fromIdl(path, null, e);
     }).toList();
+
+    templateNames = idlFile.directiveInfo.templateNames.toList();
+    templateValues = idlFile.directiveInfo.templateValues.toList();
+  }
+
+  static _DefaultArguments _computeDefaultArguments(
+      FormalParameterList parameters) {
+    var buffer = StringBuffer();
+    var ranges = <int>[];
+    for (var parameter in parameters.parameters) {
+      if (parameter.isRequired) {
+        if (buffer.isNotEmpty) {
+          buffer.write(', ');
+        }
+        var valueOffset = buffer.length;
+        buffer.write(parameter.identifier.name);
+        var valueLength = buffer.length - valueOffset;
+        ranges.add(valueOffset);
+        ranges.add(valueLength);
+      } else if (parameter.isNamed && _hasRequiredAnnotation(parameter)) {
+        if (buffer.isNotEmpty) {
+          buffer.write(', ');
+        }
+        buffer.write(parameter.identifier.name);
+        buffer.write(': ');
+
+        var valueOffset = buffer.length;
+        buffer.write('null');
+        var valueLength = buffer.length - valueOffset;
+
+        ranges.add(valueOffset);
+        ranges.add(valueLength);
+      }
+    }
+    if (buffer.isEmpty) return null;
+    return _DefaultArguments(buffer.toString(), ranges);
   }
 
   static List<String> _getFormalParameterNames(FormalParameterList parameters) {
@@ -1356,6 +1570,19 @@
     return false;
   }
 
+  /// Return `true` if the [node] probably has `@required` annotation.
+  static bool _hasRequiredAnnotation(FormalParameter node) {
+    for (var annotation in node.metadata) {
+      var name = annotation.name;
+      if (name is SimpleIdentifier) {
+        if (name.name == 'required') {
+          return true;
+        }
+      }
+    }
+    return false;
+  }
+
   static CompilationUnit _parse(String content) {
     var errorListener = AnalysisErrorListener.NULL_LISTENER;
     var source = StringSource(content, '');
@@ -1465,7 +1692,7 @@
   static Set<Declaration> _newDeclarationSet() {
     return HashSet<Declaration>(
       hashCode: (e) => e.name.hashCode,
-      equals: (a, b) => a.name == b.name && a.name2 == b.name2,
+      equals: (a, b) => a.name == b.name,
     );
   }
 }
diff --git a/pkg/analyzer/lib/src/services/lint.dart b/pkg/analyzer/lib/src/services/lint.dart
index 48c84cf..2548085 100644
--- a/pkg/analyzer/lib/src/services/lint.dart
+++ b/pkg/analyzer/lib/src/services/lint.dart
@@ -12,6 +12,9 @@
 /// Shared lint registry.
 LintRegistry lintRegistry = new LintRegistry();
 
+/// Current linter version.
+String linterVersion;
+
 /// Return lints associated with this [context], or an empty list if there are
 /// none.
 List<Linter> getLints(AnalysisContext context) =>
diff --git a/pkg/analyzer/lib/src/source/custom_resolver.dart b/pkg/analyzer/lib/src/source/custom_resolver.dart
index 4e2c79a..0ce922e 100644
--- a/pkg/analyzer/lib/src/source/custom_resolver.dart
+++ b/pkg/analyzer/lib/src/source/custom_resolver.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/source/package_map_provider.dart b/pkg/analyzer/lib/src/source/package_map_provider.dart
index dff066c..69053ba 100644
--- a/pkg/analyzer/lib/src/source/package_map_provider.dart
+++ b/pkg/analyzer/lib/src/source/package_map_provider.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/source/package_map_resolver.dart b/pkg/analyzer/lib/src/source/package_map_resolver.dart
index b325201..7d9fbf5 100644
--- a/pkg/analyzer/lib/src/source/package_map_resolver.dart
+++ b/pkg/analyzer/lib/src/source/package_map_resolver.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/source/path_filter.dart b/pkg/analyzer/lib/src/source/path_filter.dart
index c43cae1..57aa87e 100644
--- a/pkg/analyzer/lib/src/source/path_filter.dart
+++ b/pkg/analyzer/lib/src/source/path_filter.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/source/sdk_ext.dart b/pkg/analyzer/lib/src/source/sdk_ext.dart
index 30be82a..32a1e5b 100644
--- a/pkg/analyzer/lib/src/source/sdk_ext.dart
+++ b/pkg/analyzer/lib/src/source/sdk_ext.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/summary/api_signature.dart b/pkg/analyzer/lib/src/summary/api_signature.dart
index 80937d6..c86d8b8 100644
--- a/pkg/analyzer/lib/src/summary/api_signature.dart
+++ b/pkg/analyzer/lib/src/summary/api_signature.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/summary/base.dart b/pkg/analyzer/lib/src/summary/base.dart
index 7c3d8ae..93215cf 100644
--- a/pkg/analyzer/lib/src/summary/base.dart
+++ b/pkg/analyzer/lib/src/summary/base.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -59,3 +59,38 @@
 
   const TopLevel([this.fileIdentifier]);
 }
+
+/**
+ * Annotation used in the summary IDL to indicate the field name that is used
+ * to distinguish variants, or logical views on the same physical layout of
+ * fields.
+ */
+class Variant {
+  final String fieldName;
+
+  const Variant(this.fieldName);
+}
+
+/**
+ * Annotation used in the summary IDL to indicate the id of a field that
+ * represents a logical field.  The set of ids used by a class must cover the
+ * contiguous range from 0 to N-1, where N is the number of fields.  All logical
+ * fields must have the same type, which will become the type of the actual
+ * field.
+ *
+ * In order to preserve forwards and backwards compatibility, id numbers must
+ * be stable between releases.  So when new fields are added they should take
+ * the next available id without renumbering other fields.
+ */
+class VariantId {
+  /// The ID of the actual field.
+  final int value;
+
+  /// The value of the variant field in [Variant].
+  final Object variant;
+
+  /// The list of variant values for which this field exists.
+  final List<Object> variantList;
+
+  const VariantId(this.value, {this.variant, this.variantList});
+}
diff --git a/pkg/analyzer/lib/src/summary/expr_builder.dart b/pkg/analyzer/lib/src/summary/expr_builder.dart
index e6af09e..77bcdd9 100644
--- a/pkg/analyzer/lib/src/summary/expr_builder.dart
+++ b/pkg/analyzer/lib/src/summary/expr_builder.dart
@@ -7,14 +7,20 @@
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/resolver.dart' show AstRewriteVisitor;
 import 'package:analyzer/src/generated/testing/ast_test_factory.dart';
 import 'package:analyzer/src/generated/testing/token_factory.dart';
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:analyzer/src/summary/resynthesize.dart';
 
+bool _isSpreadOrControlFlowEnabled(ExperimentStatus experimentStatus) =>
+    experimentStatus.spread_collections ||
+    experimentStatus.control_flow_collections;
+
 /**
  * Builder of [Expression]s from [UnlinkedExpr]s.
  */
@@ -25,24 +31,36 @@
   final ElementImpl context;
   final UnlinkedExpr _uc;
   final bool requireValidConst;
+  final bool isSpreadOrControlFlowEnabled;
+  final bool becomeSetOrMap;
 
   int intPtr = 0;
   int doublePtr = 0;
   int stringPtr = 0;
   int refPtr = 0;
   int assignmentOperatorPtr = 0;
-  final List<Expression> stack = <Expression>[];
+
+  // The stack of values. Note that they are usually [Expression]s, but may be
+  // any [CollectionElement] to support map/set/list literals.
+  final List<AstNode> stack = <AstNode>[];
 
   final List<UnlinkedExecutable> localFunctions;
 
-  final Map<String, ParameterElement> parametersInScope;
+  final _VariablesInScope variablesInScope;
 
-  ExprBuilder(this.resynthesizer, this.context, this._uc,
-      {this.requireValidConst: true,
-      this.localFunctions,
-      Map<String, ParameterElement> parametersInScope})
-      : this.parametersInScope =
-            parametersInScope ?? _parametersInScope(context);
+  ExprBuilder(
+    this.resynthesizer,
+    this.context,
+    this._uc, {
+    this.requireValidConst: true,
+    this.localFunctions,
+    _VariablesInScope variablesInScope,
+    this.becomeSetOrMap: true,
+  })  : this.variablesInScope = variablesInScope ?? _parametersInScope(context),
+        this.isSpreadOrControlFlowEnabled = _isSpreadOrControlFlowEnabled(
+            (resynthesizer.library.context.analysisOptions
+                    as AnalysisOptionsImpl)
+                .experimentStatus);
 
   bool get hasNonEmptyExpr => _uc != null && _uc.operations.isNotEmpty;
 
@@ -50,6 +68,7 @@
     if (requireValidConst && !_uc.isValidConst) {
       return null;
     }
+    int startingVariableCount = variablesInScope.count;
     for (UnlinkedExprOperation operation in _uc.operations) {
       switch (operation) {
         case UnlinkedExprOperation.pushNull:
@@ -127,6 +146,9 @@
         case UnlinkedExprOperation.bitShiftRight:
           _pushBinary(TokenType.GT_GT);
           break;
+        case UnlinkedExprOperation.bitShiftRightLogical:
+          _pushBinary(TokenType.GT_GT_GT);
+          break;
         case UnlinkedExprOperation.add:
           _pushBinary(TokenType.PLUS);
           break;
@@ -195,6 +217,9 @@
           _pushList(
               AstTestFactory.typeArgumentList(<TypeAnnotation>[itemType]));
           break;
+        case UnlinkedExprOperation.makeUntypedSetOrMap:
+          _pushSetOrMap(null);
+          break;
         case UnlinkedExprOperation.makeUntypedMap:
           _pushMap(null);
           break;
@@ -204,12 +229,27 @@
           _pushMap(AstTestFactory.typeArgumentList(
               <TypeAnnotation>[keyType, valueType]));
           break;
+        case UnlinkedExprOperation.makeMapLiteralEntry:
+          _pushMapLiteralEntry();
+          break;
+        case UnlinkedExprOperation.makeTypedMap2:
+          TypeAnnotation keyType = _newTypeName();
+          TypeAnnotation valueType = _newTypeName();
+          _pushSetOrMap(AstTestFactory.typeArgumentList(
+              <TypeAnnotation>[keyType, valueType]));
+          break;
         case UnlinkedExprOperation.makeUntypedSet:
           _pushSet(null);
           break;
         case UnlinkedExprOperation.makeTypedSet:
           TypeAnnotation itemType = _newTypeName();
-          _pushSet(AstTestFactory.typeArgumentList(<TypeAnnotation>[itemType]));
+          if (isSpreadOrControlFlowEnabled) {
+            _pushSetOrMap(
+                AstTestFactory.typeArgumentList(<TypeAnnotation>[itemType]));
+          } else {
+            _pushSet(
+                AstTestFactory.typeArgumentList(<TypeAnnotation>[itemType]));
+          }
           break;
         case UnlinkedExprOperation.pushReference:
           _pushReference();
@@ -223,7 +263,7 @@
         case UnlinkedExprOperation.pushParameter:
           String name = _uc.strings[stringPtr++];
           SimpleIdentifier identifier = AstTestFactory.identifier3(name);
-          identifier.staticElement = parametersInScope[name];
+          identifier.staticElement = variablesInScope[name];
           _push(identifier);
           break;
         case UnlinkedExprOperation.ifNull:
@@ -280,6 +320,57 @@
         case UnlinkedExprOperation.pushThis:
           _push(AstTestFactory.thisExpression());
           break;
+        case UnlinkedExprOperation.spreadElement:
+          _pushSpread(TokenType.PERIOD_PERIOD_PERIOD);
+          break;
+        case UnlinkedExprOperation.nullAwareSpreadElement:
+          _pushSpread(TokenType.PERIOD_PERIOD_PERIOD_QUESTION);
+          break;
+        case UnlinkedExprOperation.ifElement:
+          _pushIfElement(false);
+          break;
+        case UnlinkedExprOperation.ifElseElement:
+          _pushIfElement(true);
+          break;
+        case UnlinkedExprOperation.forParts:
+          _pushForParts();
+          break;
+        case UnlinkedExprOperation.forElement:
+          _pushForElement(false);
+          break;
+        case UnlinkedExprOperation.forElementWithAwait:
+          _pushForElement(true);
+          break;
+        case UnlinkedExprOperation.pushEmptyExpression:
+          _push(null);
+          break;
+        case UnlinkedExprOperation.variableDeclarationStart:
+          _variableDeclarationStart();
+          break;
+        case UnlinkedExprOperation.variableDeclaration:
+          _variableDeclaration();
+          break;
+        case UnlinkedExprOperation.forInitializerDeclarationsUntyped:
+          _forInitializerDeclarations(false);
+          break;
+        case UnlinkedExprOperation.forInitializerDeclarationsTyped:
+          _forInitializerDeclarations(true);
+          break;
+        case UnlinkedExprOperation.assignToParameter:
+          String name = _uc.strings[stringPtr++];
+          SimpleIdentifier identifier = AstTestFactory.identifier3(name);
+          identifier.staticElement = variablesInScope[name];
+          _push(_createAssignment(identifier));
+          break;
+        case UnlinkedExprOperation.forEachPartsWithIdentifier:
+          _forEachPartsWithIdentifier();
+          break;
+        case UnlinkedExprOperation.forEachPartsWithUntypedDeclaration:
+          _forEachPartsWithDeclaration(false);
+          break;
+        case UnlinkedExprOperation.forEachPartsWithTypedDeclaration:
+          _forEachPartsWithDeclaration(true);
+          break;
         case UnlinkedExprOperation.cascadeSectionBegin:
         case UnlinkedExprOperation.cascadeSectionEnd:
         case UnlinkedExprOperation.pushLocalFunctionReference:
@@ -290,6 +381,7 @@
               'Unexpected $operation in a constant expression.');
       }
     }
+    assert(startingVariableCount == variablesInScope.count);
     return stack.single;
   }
 
@@ -299,7 +391,7 @@
       int numNamedArgs = _uc.ints[intPtr++];
       int numPositionalArgs = _uc.ints[intPtr++];
       int numArgs = numNamedArgs + numPositionalArgs;
-      arguments = _removeTopItems(numArgs);
+      arguments = _removeTopExpressions(numArgs);
       // add names to the named arguments
       for (int i = 0; i < numNamedArgs; i++) {
         String name = _uc.strings[stringPtr++];
@@ -539,6 +631,39 @@
     return _buildIdentifierSequence(info);
   }
 
+  void _forEachPartsWithDeclaration(bool hasType) {
+    var iterable = _pop();
+    var name = _uc.strings[stringPtr++];
+    var element = LocalVariableElementImpl(name, -1);
+    var keyword = hasType ? null : Keyword.VAR;
+    var type = hasType ? _newTypeName() : null;
+    var loopVariable = AstTestFactory.declaredIdentifier2(keyword, type, name);
+    loopVariable.identifier.staticElement = element;
+    if (hasType) {
+      element.type = type.type;
+    }
+    _pushNode(
+        AstTestFactory.forEachPartsWithDeclaration(loopVariable, iterable));
+    variablesInScope.push(element);
+  }
+
+  void _forEachPartsWithIdentifier() {
+    var iterable = _pop();
+    SimpleIdentifier identifier = _pop();
+    _pushNode(AstTestFactory.forEachPartsWithIdentifier(identifier, iterable));
+  }
+
+  void _forInitializerDeclarations(bool hasType) {
+    var count = _uc.ints[intPtr++];
+    var variables = List<VariableDeclaration>.filled(count, null);
+    for (int i = 0; i < count; i++) {
+      variables[count - 1 - i] = _popNode();
+    }
+    var type = hasType ? _newTypeName() : null;
+    var keyword = hasType ? null : Keyword.VAR;
+    _pushNode(AstTestFactory.variableDeclarationList(keyword, type, variables));
+  }
+
   PropertyAccessorElement _getStringLengthElement() =>
       resynthesizer.typeProvider.stringType.getGetter('length');
 
@@ -578,7 +703,12 @@
     return _buildTypeAst(type);
   }
 
-  Expression _pop() => stack.removeLast();
+  Expression _pop() => stack.removeLast() as Expression;
+
+  CollectionElement _popCollectionElement() =>
+      stack.removeLast() as CollectionElement;
+
+  AstNode _popNode() => stack.removeLast();
 
   void _push(Expression expr) {
     stack.add(expr);
@@ -590,6 +720,10 @@
     _push(AstTestFactory.binaryExpression(left, operator, right));
   }
 
+  void _pushCollectionElement(CollectionElement collectionElement) {
+    stack.add(collectionElement);
+  }
+
   void _pushExtractProperty() {
     Expression target = _pop();
     String name = _uc.strings[stringPtr++];
@@ -601,6 +735,45 @@
     _push(AstTestFactory.propertyAccess(target, propertyNode));
   }
 
+  void _pushForElement(bool hasAwait) {
+    var body = _popCollectionElement();
+    var forLoopParts = _popNode() as ForLoopParts;
+    if (forLoopParts is ForPartsWithDeclarations) {
+      variablesInScope.pop(forLoopParts.variables.variables.length);
+    } else if (forLoopParts is ForEachPartsWithDeclaration) {
+      variablesInScope.pop(1);
+    }
+    _pushCollectionElement(
+        AstTestFactory.forElement(forLoopParts, body, hasAwait: hasAwait));
+  }
+
+  void _pushForParts() {
+    var updaterCount = _uc.ints[intPtr++];
+    var updaters = <Expression>[];
+    for (int i = 0; i < updaterCount; i++) {
+      updaters.insert(0, _pop());
+    }
+    Expression condition = _pop();
+    AstNode initialization = _popNode();
+    if (initialization is Expression || initialization == null) {
+      _pushNode(AstTestFactory.forPartsWithExpression(
+          initialization, condition, updaters));
+    } else if (initialization is VariableDeclarationList) {
+      _pushNode(AstTestFactory.forPartsWithDeclarations(
+          initialization, condition, updaters));
+    } else {
+      throw StateError('Unrecognized for parts');
+    }
+  }
+
+  void _pushIfElement(bool hasElse) {
+    CollectionElement elseElement = hasElse ? _popCollectionElement() : null;
+    CollectionElement thenElement = _popCollectionElement();
+    Expression condition = _pop();
+    _pushCollectionElement(
+        AstTestFactory.ifElement(condition, thenElement, elseElement));
+  }
+
   void _pushInstanceCreation() {
     EntityRef ref = _uc.references[refPtr++];
     ReferenceInfo info = resynthesizer.getReferenceInfo(ref.reference);
@@ -713,9 +886,10 @@
 
   void _pushList(TypeArgumentList typeArguments) {
     int count = _uc.ints[intPtr++];
-    List<Expression> elements = <Expression>[];
+    List<CollectionElement> elements =
+        isSpreadOrControlFlowEnabled ? <CollectionElement>[] : <Expression>[];
     for (int i = 0; i < count; i++) {
-      elements.insert(0, _pop());
+      elements.insert(0, _popCollectionElement());
     }
     var typeArg = typeArguments == null
         ? resynthesizer.typeProvider.dynamicType
@@ -731,12 +905,10 @@
     assert(popCount == 0);
     int functionIndex = _uc.ints[intPtr++];
     var localFunction = localFunctions[functionIndex];
-    var parametersInScope =
-        new Map<String, ParameterElement>.from(this.parametersInScope);
     var functionElement =
         new FunctionElementImpl.forSerialized(localFunction, context);
     for (ParameterElementImpl parameter in functionElement.parameters) {
-      parametersInScope[parameter.name] = parameter;
+      variablesInScope.push(parameter);
       if (parameter.unlinkedParam.type == null) {
         // Store a type of `dynamic` for the parameter; this prevents
         // resynthesis from trying to read a type out of the summary (which
@@ -760,12 +932,13 @@
       var bodyExpr = new ExprBuilder(
               resynthesizer, functionElement, localFunction.bodyExpr,
               requireValidConst: requireValidConst,
-              parametersInScope: parametersInScope,
+              variablesInScope: variablesInScope,
               localFunctions: localFunction.localFunctions)
           .build();
       functionBody = astFactory.expressionFunctionBody(asyncKeyword,
           TokenFactory.tokenFromType(TokenType.FUNCTION), bodyExpr, null);
     }
+    variablesInScope.pop(functionElement.parameters.length);
     FunctionExpressionImpl functionExpression = astFactory.functionExpression(
         null, AstTestFactory.formalParameterList(parameters), functionBody);
     functionExpression.declaredElement = functionElement;
@@ -788,8 +961,21 @@
         : typeArguments.arguments[1].type;
     var staticType =
         resynthesizer.typeProvider.mapType.instantiate([keyType, valueType]);
-    _push(AstTestFactory.mapLiteral(Keyword.CONST, typeArguments, entries)
-      ..staticType = staticType);
+    SetOrMapLiteralImpl literal =
+        AstTestFactory.setOrMapLiteral(Keyword.CONST, typeArguments, entries);
+    literal.becomeMap();
+    literal.staticType = staticType;
+    _push(literal);
+  }
+
+  void _pushMapLiteralEntry() {
+    Expression value = _pop();
+    Expression key = _pop();
+    _pushCollectionElement(AstTestFactory.mapLiteralEntry2(key, value));
+  }
+
+  void _pushNode(AstNode node) {
+    stack.add(node);
   }
 
   void _pushPrefix(TokenType operator) {
@@ -807,27 +993,99 @@
     for (int i = 0; i < count; i++) {
       elements.insert(0, _pop());
     }
-    _push(AstTestFactory.setLiteral(Keyword.CONST, typeArguments, elements));
+    SetOrMapLiteralImpl literal =
+        AstTestFactory.setOrMapLiteral(Keyword.CONST, typeArguments, elements);
+    literal.becomeSet();
+    _push(literal);
   }
 
-  List<Expression> _removeTopItems(int count) {
+  void _pushSetOrMap(TypeArgumentList typeArguments) {
+    int count = _uc.ints[intPtr++];
+    List<CollectionElement> elements = <CollectionElement>[];
+    for (int i = 0; i < count; i++) {
+      elements.insert(0, _popCollectionElement());
+    }
+
+    bool isMap = true; // assume Map unless can prove otherwise
+    DartType staticType;
+    if (typeArguments != null) {
+      if (typeArguments.arguments.length == 2) {
+        var keyType = typeArguments.arguments[0].type;
+        var valueType = typeArguments.arguments[1].type;
+        staticType = resynthesizer.typeProvider.mapType
+            .instantiate([keyType, valueType]);
+      } else if (typeArguments.arguments.length == 1) {
+        isMap = false;
+        var valueType = typeArguments == null
+            ? resynthesizer.typeProvider.dynamicType
+            : typeArguments.arguments[0].type;
+        staticType =
+            resynthesizer.typeProvider.setType.instantiate([valueType]);
+      }
+    } else {
+      for (var i = 0; i < elements.length; ++i) {
+        var element = elements[i];
+        if (element is Expression) {
+          isMap = false;
+        }
+      }
+    }
+
+    SetOrMapLiteral setOrMapLiteral = astFactory.setOrMapLiteral(
+      constKeyword: TokenFactory.tokenFromKeyword(Keyword.CONST),
+      typeArguments: typeArguments,
+      leftBracket: TokenFactory.tokenFromType(TokenType.OPEN_CURLY_BRACKET),
+      elements: elements,
+      rightBracket: TokenFactory.tokenFromType(TokenType.CLOSE_CURLY_BRACKET),
+    );
+    if (becomeSetOrMap) {
+      if (isMap) {
+        (setOrMapLiteral as SetOrMapLiteralImpl).becomeMap();
+      } else {
+        (setOrMapLiteral as SetOrMapLiteralImpl).becomeSet();
+      }
+    }
+    _push(setOrMapLiteral..staticType = staticType);
+  }
+
+  void _pushSpread(TokenType operator) {
+    Expression operand = _pop();
+    _pushCollectionElement(AstTestFactory.spreadElement(operator, operand));
+  }
+
+  List<Expression> _removeTopExpressions(int count) {
     int start = stack.length - count;
     int end = stack.length;
-    List<Expression> items = stack.getRange(start, end).toList();
+    List<Expression> items = List<Expression>.from(stack.getRange(start, end));
     stack.removeRange(start, end);
     return items;
   }
 
+  void _variableDeclaration() {
+    var index = _uc.ints[intPtr++];
+    var element = variablesInScope.recent(index);
+    var initializer = _pop();
+    var variableDeclaration =
+        AstTestFactory.variableDeclaration2(element.name, initializer);
+    variableDeclaration.name.staticElement = element;
+    _pushNode(variableDeclaration);
+  }
+
+  void _variableDeclarationStart() {
+    var name = _uc.strings[stringPtr++];
+    variablesInScope.push(LocalVariableElementImpl(name, -1));
+  }
+
   /// Figures out the default value of [parametersInScope] based on [context].
   ///
   /// If [context] is (or contains) a constructor, then its parameters are used.
   /// Otherwise, no parameters are considered to be in scope.
-  static Map<String, ParameterElement> _parametersInScope(Element context) {
-    var result = <String, ParameterElement>{};
+  static _VariablesInScope _parametersInScope(Element context) {
+    var result = _VariablesInScope();
     for (Element e = context; e != null; e = e.enclosingElement) {
       if (e is ConstructorElement) {
         for (var parameter in e.parameters) {
-          result[parameter.name] = parameter;
+          result.push(parameter);
         }
         return result;
       }
@@ -835,3 +1093,37 @@
     return result;
   }
 }
+
+/// Tracks the set of variables that are in scope while resynthesizing an
+/// expression from a summary.
+class _VariablesInScope {
+  final _variableElements = <VariableElement>[];
+
+  /// Returns the number of variables that have been pushed but not popped.
+  int get count => _variableElements.length;
+
+  /// Looks up the variable with the given [name].  Returns `null` if no
+  /// variable is found.
+  VariableElement operator [](String name) {
+    for (int i = _variableElements.length - 1; i >= 0; i--) {
+      if (_variableElements[i].name == name) return _variableElements[i];
+    }
+    return null;
+  }
+
+  /// Un-does the effect of the last [count] calls to `push`.
+  void pop(int count) {
+    _variableElements.length -= count;
+  }
+
+  /// Stores a new declaration based on the given [variableElement].  The
+  /// declaration shadows any previous declaration with the same name.
+  void push(VariableElement variableElement) {
+    _variableElements.add(variableElement);
+  }
+
+  /// Retrieves the [index]th most recently pushed element (that hasn't been
+  /// popped).  [index] counts from zero.
+  VariableElement recent(int index) =>
+      _variableElements[_variableElements.length - 1 - index];
+}
diff --git a/pkg/analyzer/lib/src/summary/flat_buffers.dart b/pkg/analyzer/lib/src/summary/flat_buffers.dart
index c291d61..da60445 100644
--- a/pkg/analyzer/lib/src/summary/flat_buffers.dart
+++ b/pkg/analyzer/lib/src/summary/flat_buffers.dart
@@ -142,6 +142,19 @@
   }
 
   /**
+   * Add the [field] with the given 64-bit float [value].
+   */
+  void addFloat64(int field, double value, [double def]) {
+    _ensureCurrentVTable();
+    if (value != null && value != def) {
+      int size = 8;
+      _prepare(size, 1);
+      _trackField(field);
+      _setFloat64AtTail(_buf, _tail, value);
+    }
+  }
+
+  /**
    * Add the [field] with the given 32-bit signed integer [value].  The field is
    * not added if the [value] is equal to [def].
    */
@@ -755,6 +768,19 @@
 }
 
 /**
+ * The reader of 64-bit floats.
+ */
+class Float64Reader extends Reader<double> {
+  const Float64Reader() : super();
+
+  @override
+  int get size => 8;
+
+  @override
+  double read(BufferContext bc, int offset) => bc._getFloat64(offset);
+}
+
+/**
  * List of booleans backed by 8-bit unsigned integers.
  */
 class _FbBoolList with ListMixin<bool> implements List<bool> {
@@ -880,7 +906,7 @@
  */
 class _VTable {
   final List<int> fieldTails = <int>[];
-  final List<int> fieldOffsets = <int>[];
+  List<int> fieldOffsets;
 
   /**
    * The size of the table that uses this VTable.
@@ -924,10 +950,11 @@
    * Fill the [fieldOffsets] field.
    */
   void computeFieldOffsets(int tableTail) {
-    assert(fieldOffsets.isEmpty);
-    for (int fieldTail in fieldTails) {
-      int fieldOffset = fieldTail == null ? 0 : tableTail - fieldTail;
-      fieldOffsets.add(fieldOffset);
+    assert(fieldOffsets == null);
+    fieldOffsets = List<int>(fieldTails.length);
+    for (int i = 0; i < fieldTails.length; ++i) {
+      int fieldTail = fieldTails[i];
+      fieldOffsets[i] = fieldTail == null ? 0 : tableTail - fieldTail;
     }
   }
 
diff --git a/pkg/analyzer/lib/src/summary/format.dart b/pkg/analyzer/lib/src/summary/format.dart
index 7f866ae..7b27b6c 100644
--- a/pkg/analyzer/lib/src/summary/format.dart
+++ b/pkg/analyzer/lib/src/summary/format.dart
@@ -1,9 +1,11 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 //
 // This file has been automatically generated.  Please do not edit it manually.
-// To regenerate the file, use the script "pkg/analyzer/tool/generate_files".
+// To regenerate the file, use the SDK script
+// "pkg/analyzer/tool/summary/generate.dart $IDL_FILE_PATH",
+// or "pkg/analyzer/tool/generate_files" for the analyzer package IDL/sources.
 
 library analyzer.src.summary.format;
 
@@ -91,6 +93,68 @@
   }
 }
 
+class _LinkedNodeCommentTypeReader
+    extends fb.Reader<idl.LinkedNodeCommentType> {
+  const _LinkedNodeCommentTypeReader() : super();
+
+  @override
+  int get size => 1;
+
+  @override
+  idl.LinkedNodeCommentType read(fb.BufferContext bc, int offset) {
+    int index = const fb.Uint8Reader().read(bc, offset);
+    return index < idl.LinkedNodeCommentType.values.length
+        ? idl.LinkedNodeCommentType.values[index]
+        : idl.LinkedNodeCommentType.block;
+  }
+}
+
+class _LinkedNodeFormalParameterKindReader
+    extends fb.Reader<idl.LinkedNodeFormalParameterKind> {
+  const _LinkedNodeFormalParameterKindReader() : super();
+
+  @override
+  int get size => 1;
+
+  @override
+  idl.LinkedNodeFormalParameterKind read(fb.BufferContext bc, int offset) {
+    int index = const fb.Uint8Reader().read(bc, offset);
+    return index < idl.LinkedNodeFormalParameterKind.values.length
+        ? idl.LinkedNodeFormalParameterKind.values[index]
+        : idl.LinkedNodeFormalParameterKind.required;
+  }
+}
+
+class _LinkedNodeKindReader extends fb.Reader<idl.LinkedNodeKind> {
+  const _LinkedNodeKindReader() : super();
+
+  @override
+  int get size => 1;
+
+  @override
+  idl.LinkedNodeKind read(fb.BufferContext bc, int offset) {
+    int index = const fb.Uint8Reader().read(bc, offset);
+    return index < idl.LinkedNodeKind.values.length
+        ? idl.LinkedNodeKind.values[index]
+        : idl.LinkedNodeKind.adjacentStrings;
+  }
+}
+
+class _LinkedNodeTypeKindReader extends fb.Reader<idl.LinkedNodeTypeKind> {
+  const _LinkedNodeTypeKindReader() : super();
+
+  @override
+  int get size => 1;
+
+  @override
+  idl.LinkedNodeTypeKind read(fb.BufferContext bc, int offset) {
+    int index = const fb.Uint8Reader().read(bc, offset);
+    return index < idl.LinkedNodeTypeKind.values.length
+        ? idl.LinkedNodeTypeKind.values[index]
+        : idl.LinkedNodeTypeKind.bottom;
+  }
+}
+
 class _ReferenceKindReader extends fb.Reader<idl.ReferenceKind> {
   const _ReferenceKindReader() : super();
 
@@ -216,6 +280,36 @@
   }
 }
 
+class _UnlinkedTokenKindReader extends fb.Reader<idl.UnlinkedTokenKind> {
+  const _UnlinkedTokenKindReader() : super();
+
+  @override
+  int get size => 1;
+
+  @override
+  idl.UnlinkedTokenKind read(fb.BufferContext bc, int offset) {
+    int index = const fb.Uint8Reader().read(bc, offset);
+    return index < idl.UnlinkedTokenKind.values.length
+        ? idl.UnlinkedTokenKind.values[index]
+        : idl.UnlinkedTokenKind.nothing;
+  }
+}
+
+class _UnlinkedTokenTypeReader extends fb.Reader<idl.UnlinkedTokenType> {
+  const _UnlinkedTokenTypeReader() : super();
+
+  @override
+  int get size => 1;
+
+  @override
+  idl.UnlinkedTokenType read(fb.BufferContext bc, int offset) {
+    int index = const fb.Uint8Reader().read(bc, offset);
+    return index < idl.UnlinkedTokenType.values.length
+        ? idl.UnlinkedTokenType.values[index]
+        : idl.UnlinkedTokenType.NOTHING;
+  }
+}
+
 class AnalysisDriverExceptionContextBuilder extends Object
     with _AnalysisDriverExceptionContextMixin
     implements idl.AnalysisDriverExceptionContext {
@@ -228,7 +322,7 @@
   String get exception => _exception ??= '';
 
   /// The exception string.
-  void set exception(String value) {
+  set exception(String value) {
     this._exception = value;
   }
 
@@ -237,7 +331,7 @@
       _files ??= <AnalysisDriverExceptionFileBuilder>[];
 
   /// The state of files when the exception happened.
-  void set files(List<AnalysisDriverExceptionFileBuilder> value) {
+  set files(List<AnalysisDriverExceptionFileBuilder> value) {
     this._files = value;
   }
 
@@ -245,7 +339,7 @@
   String get path => _path ??= '';
 
   /// The path of the file being analyzed when the exception happened.
-  void set path(String value) {
+  set path(String value) {
     this._path = value;
   }
 
@@ -253,7 +347,7 @@
   String get stackTrace => _stackTrace ??= '';
 
   /// The exception stack trace string.
-  void set stackTrace(String value) {
+  set stackTrace(String value) {
     this._stackTrace = value;
   }
 
@@ -267,16 +361,12 @@
         _path = path,
         _stackTrace = stackTrace;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {
     _files?.forEach((b) => b.flushInformative());
   }
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     signature.addString(this._path ?? '');
     signature.addString(this._exception ?? '');
@@ -423,7 +513,7 @@
   String get content => _content ??= '';
 
   /// The content of the file.
-  void set content(String value) {
+  set content(String value) {
     this._content = value;
   }
 
@@ -431,7 +521,7 @@
   String get path => _path ??= '';
 
   /// The path of the file.
-  void set path(String value) {
+  set path(String value) {
     this._path = value;
   }
 
@@ -439,14 +529,10 @@
       : _content = content,
         _path = path;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {}
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     signature.addString(this._path ?? '');
     signature.addString(this._content ?? '');
@@ -537,7 +623,7 @@
       _errors ??= <AnalysisDriverUnitErrorBuilder>[];
 
   /// The full list of analysis errors, both syntactic and semantic.
-  void set errors(List<AnalysisDriverUnitErrorBuilder> value) {
+  set errors(List<AnalysisDriverUnitErrorBuilder> value) {
     this._errors = value;
   }
 
@@ -545,7 +631,7 @@
   AnalysisDriverUnitIndexBuilder get index => _index;
 
   /// The index of the unit.
-  void set index(AnalysisDriverUnitIndexBuilder value) {
+  set index(AnalysisDriverUnitIndexBuilder value) {
     this._index = value;
   }
 
@@ -555,17 +641,13 @@
       : _errors = errors,
         _index = index;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {
     _errors?.forEach((b) => b.flushInformative());
     _index?.flushInformative();
   }
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     if (this._errors == null) {
       signature.addInt(0);
@@ -681,7 +763,7 @@
   /// The names of defined instance members.
   /// They are indexes into [AnalysisDriverUnitError.strings] list.
   /// The list is sorted in ascending order.
-  void set members(List<int> value) {
+  set members(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._members = value;
   }
@@ -691,7 +773,7 @@
 
   /// The name of the class.
   /// It is an index into [AnalysisDriverUnitError.strings] list.
-  void set name(int value) {
+  set name(int value) {
     assert(value == null || value >= 0);
     this._name = value;
   }
@@ -700,14 +782,10 @@
       : _members = members,
         _name = name;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {}
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     signature.addInt(this._name ?? 0);
     if (this._members == null) {
@@ -803,7 +881,7 @@
   String get correction => _correction ??= '';
 
   /// The optional correction hint for the error.
-  void set correction(String value) {
+  set correction(String value) {
     this._correction = value;
   }
 
@@ -811,7 +889,7 @@
   int get length => _length ??= 0;
 
   /// The length of the error in the file.
-  void set length(int value) {
+  set length(int value) {
     assert(value == null || value >= 0);
     this._length = value;
   }
@@ -820,7 +898,7 @@
   String get message => _message ??= '';
 
   /// The message of the error.
-  void set message(String value) {
+  set message(String value) {
     this._message = value;
   }
 
@@ -828,7 +906,7 @@
   int get offset => _offset ??= 0;
 
   /// The offset from the beginning of the file.
-  void set offset(int value) {
+  set offset(int value) {
     assert(value == null || value >= 0);
     this._offset = value;
   }
@@ -837,7 +915,7 @@
   String get uniqueName => _uniqueName ??= '';
 
   /// The unique name of the error code.
-  void set uniqueName(String value) {
+  set uniqueName(String value) {
     this._uniqueName = value;
   }
 
@@ -853,14 +931,10 @@
         _offset = offset,
         _uniqueName = uniqueName;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {}
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     signature.addInt(this._offset ?? 0);
     signature.addInt(this._length ?? 0);
@@ -1012,7 +1086,7 @@
 
   /// Each item of this list corresponds to a unique referenced element.  It is
   /// the kind of the synthetic element.
-  void set elementKinds(List<idl.IndexSyntheticElementKind> value) {
+  set elementKinds(List<idl.IndexSyntheticElementKind> value) {
     this._elementKinds = value;
   }
 
@@ -1025,7 +1099,7 @@
   /// is a top-level element.  The list is sorted in ascending order, so that
   /// the client can quickly check whether an element is referenced in this
   /// index.
-  void set elementNameClassMemberIds(List<int> value) {
+  set elementNameClassMemberIds(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._elementNameClassMemberIds = value;
   }
@@ -1037,7 +1111,7 @@
   /// the identifier of the named parameter name, or `null` if the element is
   /// not a named parameter.  The list is sorted in ascending order, so that the
   /// client can quickly check whether an element is referenced in this index.
-  void set elementNameParameterIds(List<int> value) {
+  set elementNameParameterIds(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._elementNameParameterIds = value;
   }
@@ -1050,7 +1124,7 @@
   /// the identifier of the top-level element name, or `null` if the element is
   /// the unit.  The list is sorted in ascending order, so that the client can
   /// quickly check whether an element is referenced in this index.
-  void set elementNameUnitMemberIds(List<int> value) {
+  set elementNameUnitMemberIds(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._elementNameUnitMemberIds = value;
   }
@@ -1061,7 +1135,7 @@
   /// Each item of this list corresponds to a unique referenced element.  It is
   /// the index into [unitLibraryUris] and [unitUnitUris] for the library
   /// specific unit where the element is declared.
-  void set elementUnits(List<int> value) {
+  set elementUnits(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._elementUnits = value;
   }
@@ -1070,7 +1144,7 @@
   int get nullStringId => _nullStringId ??= 0;
 
   /// Identifier of the null string in [strings].
-  void set nullStringId(int value) {
+  set nullStringId(int value) {
     assert(value == null || value >= 0);
     this._nullStringId = value;
   }
@@ -1081,7 +1155,7 @@
   /// List of unique element strings used in this index.  The list is sorted in
   /// ascending order, so that the client can quickly check the presence of a
   /// string in this index.
-  void set strings(List<String> value) {
+  set strings(List<String> value) {
     this._strings = value;
   }
 
@@ -1090,7 +1164,7 @@
       _subtypes ??= <AnalysisDriverSubtypeBuilder>[];
 
   /// The list of classes declared in the unit.
-  void set subtypes(List<AnalysisDriverSubtypeBuilder> value) {
+  set subtypes(List<AnalysisDriverSubtypeBuilder> value) {
     this._subtypes = value;
   }
 
@@ -1101,7 +1175,7 @@
   /// in [subtypes].  They are indexes into [strings] list. The list is sorted
   /// in ascending order.  There might be more than one element with the same
   /// value if there is more than one subtype of this supertype.
-  void set supertypes(List<int> value) {
+  set supertypes(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._supertypes = value;
   }
@@ -1112,7 +1186,7 @@
   /// Each item of this list corresponds to the library URI of a unique library
   /// specific unit referenced in the index.  It is an index into [strings]
   /// list.
-  void set unitLibraryUris(List<int> value) {
+  set unitLibraryUris(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._unitLibraryUris = value;
   }
@@ -1123,7 +1197,7 @@
   /// Each item of this list corresponds to the unit URI of a unique library
   /// specific unit referenced in the index.  It is an index into [strings]
   /// list.
-  void set unitUnitUris(List<int> value) {
+  set unitUnitUris(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._unitUnitUris = value;
   }
@@ -1134,7 +1208,7 @@
 
   /// Each item of this list is the `true` if the corresponding element usage
   /// is qualified with some prefix.
-  void set usedElementIsQualifiedFlags(List<bool> value) {
+  set usedElementIsQualifiedFlags(List<bool> value) {
     this._usedElementIsQualifiedFlags = value;
   }
 
@@ -1143,7 +1217,7 @@
       _usedElementKinds ??= <idl.IndexRelationKind>[];
 
   /// Each item of this list is the kind of the element usage.
-  void set usedElementKinds(List<idl.IndexRelationKind> value) {
+  set usedElementKinds(List<idl.IndexRelationKind> value) {
     this._usedElementKinds = value;
   }
 
@@ -1151,7 +1225,7 @@
   List<int> get usedElementLengths => _usedElementLengths ??= <int>[];
 
   /// Each item of this list is the length of the element usage.
-  void set usedElementLengths(List<int> value) {
+  set usedElementLengths(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._usedElementLengths = value;
   }
@@ -1161,7 +1235,7 @@
 
   /// Each item of this list is the offset of the element usage relative to the
   /// beginning of the file.
-  void set usedElementOffsets(List<int> value) {
+  set usedElementOffsets(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._usedElementOffsets = value;
   }
@@ -1173,7 +1247,7 @@
   /// [elementNameUnitMemberIds], [elementNameClassMemberIds] and
   /// [elementNameParameterIds].  The list is sorted in ascending order, so
   /// that the client can quickly find element references in this index.
-  void set usedElements(List<int> value) {
+  set usedElements(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._usedElements = value;
   }
@@ -1184,7 +1258,7 @@
 
   /// Each item of this list is the `true` if the corresponding name usage
   /// is qualified with some prefix.
-  void set usedNameIsQualifiedFlags(List<bool> value) {
+  set usedNameIsQualifiedFlags(List<bool> value) {
     this._usedNameIsQualifiedFlags = value;
   }
 
@@ -1193,7 +1267,7 @@
       _usedNameKinds ??= <idl.IndexRelationKind>[];
 
   /// Each item of this list is the kind of the name usage.
-  void set usedNameKinds(List<idl.IndexRelationKind> value) {
+  set usedNameKinds(List<idl.IndexRelationKind> value) {
     this._usedNameKinds = value;
   }
 
@@ -1202,7 +1276,7 @@
 
   /// Each item of this list is the offset of the name usage relative to the
   /// beginning of the file.
-  void set usedNameOffsets(List<int> value) {
+  set usedNameOffsets(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._usedNameOffsets = value;
   }
@@ -1213,7 +1287,7 @@
   /// Each item of this list is the index into [strings] for a used name.  The
   /// list is sorted in ascending order, so that the client can quickly find
   /// whether a name is used in this index.
-  void set usedNames(List<int> value) {
+  set usedNames(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._usedNames = value;
   }
@@ -1260,16 +1334,12 @@
         _usedNameOffsets = usedNameOffsets,
         _usedNames = usedNames;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {
     _subtypes?.forEach((b) => b.flushInformative());
   }
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     if (this._strings == null) {
       signature.addInt(0);
@@ -1866,7 +1936,7 @@
       _definedClassMemberNames ??= <String>[];
 
   /// List of class member names defined by the unit.
-  void set definedClassMemberNames(List<String> value) {
+  set definedClassMemberNames(List<String> value) {
     this._definedClassMemberNames = value;
   }
 
@@ -1874,7 +1944,7 @@
   List<String> get definedTopLevelNames => _definedTopLevelNames ??= <String>[];
 
   /// List of top-level names defined by the unit.
-  void set definedTopLevelNames(List<String> value) {
+  set definedTopLevelNames(List<String> value) {
     this._definedTopLevelNames = value;
   }
 
@@ -1882,7 +1952,7 @@
   List<String> get referencedNames => _referencedNames ??= <String>[];
 
   /// List of external names referenced by the unit.
-  void set referencedNames(List<String> value) {
+  set referencedNames(List<String> value) {
     this._referencedNames = value;
   }
 
@@ -1891,7 +1961,7 @@
 
   /// List of names which are used in `extends`, `with` or `implements` clauses
   /// in the file. Import prefixes and type arguments are not included.
-  void set subtypedNames(List<String> value) {
+  set subtypedNames(List<String> value) {
     this._subtypedNames = value;
   }
 
@@ -1899,7 +1969,7 @@
   UnlinkedUnitBuilder get unit => _unit;
 
   /// Unlinked information for the unit.
-  void set unit(UnlinkedUnitBuilder value) {
+  set unit(UnlinkedUnitBuilder value) {
     this._unit = value;
   }
 
@@ -1915,16 +1985,12 @@
         _subtypedNames = subtypedNames,
         _unit = unit;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {
     _unit?.flushInformative();
   }
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     if (this._referencedNames == null) {
       signature.addInt(0);
@@ -2114,108 +2180,116 @@
 class AvailableDeclarationBuilder extends Object
     with _AvailableDeclarationMixin
     implements idl.AvailableDeclaration {
+  List<AvailableDeclarationBuilder> _children;
+  String _defaultArgumentListString;
+  List<int> _defaultArgumentListTextRanges;
   String _docComplete;
   String _docSummary;
   int _fieldMask;
-  idl.AvailableDeclarationKind _kind;
   bool _isAbstract;
   bool _isConst;
   bool _isDeprecated;
   bool _isFinal;
-  String _name;
-  String _name2;
+  idl.AvailableDeclarationKind _kind;
   int _locationOffset;
   int _locationStartColumn;
   int _locationStartLine;
+  String _name;
   List<String> _parameterNames;
   String _parameters;
   List<String> _parameterTypes;
-  int _requiredParameterCount;
   List<String> _relevanceTags;
+  int _requiredParameterCount;
   String _returnType;
   String _typeParameters;
 
   @override
+  List<AvailableDeclarationBuilder> get children =>
+      _children ??= <AvailableDeclarationBuilder>[];
+
+  set children(List<AvailableDeclarationBuilder> value) {
+    this._children = value;
+  }
+
+  @override
+  String get defaultArgumentListString => _defaultArgumentListString ??= '';
+
+  set defaultArgumentListString(String value) {
+    this._defaultArgumentListString = value;
+  }
+
+  @override
+  List<int> get defaultArgumentListTextRanges =>
+      _defaultArgumentListTextRanges ??= <int>[];
+
+  set defaultArgumentListTextRanges(List<int> value) {
+    assert(value == null || value.every((e) => e >= 0));
+    this._defaultArgumentListTextRanges = value;
+  }
+
+  @override
   String get docComplete => _docComplete ??= '';
 
-  void set docComplete(String value) {
+  set docComplete(String value) {
     this._docComplete = value;
   }
 
   @override
   String get docSummary => _docSummary ??= '';
 
-  void set docSummary(String value) {
+  set docSummary(String value) {
     this._docSummary = value;
   }
 
   @override
   int get fieldMask => _fieldMask ??= 0;
 
-  void set fieldMask(int value) {
+  set fieldMask(int value) {
     assert(value == null || value >= 0);
     this._fieldMask = value;
   }
 
   @override
+  bool get isAbstract => _isAbstract ??= false;
+
+  set isAbstract(bool value) {
+    this._isAbstract = value;
+  }
+
+  @override
+  bool get isConst => _isConst ??= false;
+
+  set isConst(bool value) {
+    this._isConst = value;
+  }
+
+  @override
+  bool get isDeprecated => _isDeprecated ??= false;
+
+  set isDeprecated(bool value) {
+    this._isDeprecated = value;
+  }
+
+  @override
+  bool get isFinal => _isFinal ??= false;
+
+  set isFinal(bool value) {
+    this._isFinal = value;
+  }
+
+  @override
   idl.AvailableDeclarationKind get kind =>
       _kind ??= idl.AvailableDeclarationKind.CLASS;
 
   /// The kind of the declaration.
-  void set kind(idl.AvailableDeclarationKind value) {
+  set kind(idl.AvailableDeclarationKind value) {
     this._kind = value;
   }
 
   @override
-  bool get isAbstract => _isAbstract ??= false;
-
-  void set isAbstract(bool value) {
-    this._isAbstract = value;
-  }
-
-  @override
-  bool get isConst => _isConst ??= false;
-
-  void set isConst(bool value) {
-    this._isConst = value;
-  }
-
-  @override
-  bool get isDeprecated => _isDeprecated ??= false;
-
-  void set isDeprecated(bool value) {
-    this._isDeprecated = value;
-  }
-
-  @override
-  bool get isFinal => _isFinal ??= false;
-
-  void set isFinal(bool value) {
-    this._isFinal = value;
-  }
-
-  @override
-  String get name => _name ??= '';
-
-  /// The first part of the declaration name, usually the only one, for example
-  /// the name of a class like `MyClass`, or a function like `myFunction`.
-  void set name(String value) {
-    this._name = value;
-  }
-
-  @override
-  String get name2 => _name2 ??= '';
-
-  /// The second, optional, part of the declaration name.  For example enum
-  /// constants all have the same [name], but their own [name2].
-  void set name2(String value) {
-    this._name2 = value;
-  }
-
-  @override
   int get locationOffset => _locationOffset ??= 0;
 
-  void set locationOffset(int value) {
+  set locationOffset(int value) {
     assert(value == null || value >= 0);
     this._locationOffset = value;
   }
@@ -2223,7 +2297,7 @@
   @override
   int get locationStartColumn => _locationStartColumn ??= 0;
 
-  void set locationStartColumn(int value) {
+  set locationStartColumn(int value) {
     assert(value == null || value >= 0);
     this._locationStartColumn = value;
   }
@@ -2231,129 +2305,156 @@
   @override
   int get locationStartLine => _locationStartLine ??= 0;
 
-  void set locationStartLine(int value) {
+  set locationStartLine(int value) {
     assert(value == null || value >= 0);
     this._locationStartLine = value;
   }
 
   @override
+  String get name => _name ??= '';
+
+  /// The first part of the declaration name, usually the only one, for example
+  /// the name of a class like `MyClass`, or a function like `myFunction`.
+  set name(String value) {
+    this._name = value;
+  }
+
+  @override
   List<String> get parameterNames => _parameterNames ??= <String>[];
 
-  void set parameterNames(List<String> value) {
+  set parameterNames(List<String> value) {
     this._parameterNames = value;
   }
 
   @override
   String get parameters => _parameters ??= '';
 
-  void set parameters(String value) {
+  set parameters(String value) {
     this._parameters = value;
   }
 
   @override
   List<String> get parameterTypes => _parameterTypes ??= <String>[];
 
-  void set parameterTypes(List<String> value) {
+  set parameterTypes(List<String> value) {
     this._parameterTypes = value;
   }
 
   @override
-  int get requiredParameterCount => _requiredParameterCount ??= 0;
-
-  void set requiredParameterCount(int value) {
-    assert(value == null || value >= 0);
-    this._requiredParameterCount = value;
-  }
-
-  @override
   List<String> get relevanceTags => _relevanceTags ??= <String>[];
 
   /// The partial list of relevance tags.  Not every declaration has one (for
   /// example, function do not currently), and not every declaration has to
   /// store one (for classes it can be computed when we know the library that
   /// includes this file).
-  void set relevanceTags(List<String> value) {
+  set relevanceTags(List<String> value) {
     this._relevanceTags = value;
   }
 
   @override
+  int get requiredParameterCount => _requiredParameterCount ??= 0;
+
+  set requiredParameterCount(int value) {
+    assert(value == null || value >= 0);
+    this._requiredParameterCount = value;
+  }
+
+  @override
   String get returnType => _returnType ??= '';
 
-  void set returnType(String value) {
+  set returnType(String value) {
     this._returnType = value;
   }
 
   @override
   String get typeParameters => _typeParameters ??= '';
 
-  void set typeParameters(String value) {
+  set typeParameters(String value) {
     this._typeParameters = value;
   }
 
   AvailableDeclarationBuilder(
-      {String docComplete,
+      {List<AvailableDeclarationBuilder> children,
+      String defaultArgumentListString,
+      List<int> defaultArgumentListTextRanges,
+      String docComplete,
       String docSummary,
       int fieldMask,
-      idl.AvailableDeclarationKind kind,
       bool isAbstract,
       bool isConst,
       bool isDeprecated,
       bool isFinal,
-      String name,
-      String name2,
+      idl.AvailableDeclarationKind kind,
       int locationOffset,
       int locationStartColumn,
       int locationStartLine,
+      String name,
       List<String> parameterNames,
       String parameters,
       List<String> parameterTypes,
-      int requiredParameterCount,
       List<String> relevanceTags,
+      int requiredParameterCount,
       String returnType,
       String typeParameters})
-      : _docComplete = docComplete,
+      : _children = children,
+        _defaultArgumentListString = defaultArgumentListString,
+        _defaultArgumentListTextRanges = defaultArgumentListTextRanges,
+        _docComplete = docComplete,
         _docSummary = docSummary,
         _fieldMask = fieldMask,
-        _kind = kind,
         _isAbstract = isAbstract,
         _isConst = isConst,
         _isDeprecated = isDeprecated,
         _isFinal = isFinal,
-        _name = name,
-        _name2 = name2,
+        _kind = kind,
         _locationOffset = locationOffset,
         _locationStartColumn = locationStartColumn,
         _locationStartLine = locationStartLine,
+        _name = name,
         _parameterNames = parameterNames,
         _parameters = parameters,
         _parameterTypes = parameterTypes,
-        _requiredParameterCount = requiredParameterCount,
         _relevanceTags = relevanceTags,
+        _requiredParameterCount = requiredParameterCount,
         _returnType = returnType,
         _typeParameters = typeParameters;
 
-  /**
-   * Flush [informative] data recursively.
-   */
-  void flushInformative() {}
+  /// Flush [informative] data recursively.
+  void flushInformative() {
+    _children?.forEach((b) => b.flushInformative());
+  }
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
+    if (this._children == null) {
+      signature.addInt(0);
+    } else {
+      signature.addInt(this._children.length);
+      for (var x in this._children) {
+        x?.collectApiSignature(signature);
+      }
+    }
+    signature.addString(this._defaultArgumentListString ?? '');
+    if (this._defaultArgumentListTextRanges == null) {
+      signature.addInt(0);
+    } else {
+      signature.addInt(this._defaultArgumentListTextRanges.length);
+      for (var x in this._defaultArgumentListTextRanges) {
+        signature.addInt(x);
+      }
+    }
     signature.addString(this._docComplete ?? '');
     signature.addString(this._docSummary ?? '');
     signature.addInt(this._fieldMask ?? 0);
-    signature.addInt(this._kind == null ? 0 : this._kind.index);
     signature.addBool(this._isAbstract == true);
     signature.addBool(this._isConst == true);
     signature.addBool(this._isDeprecated == true);
     signature.addBool(this._isFinal == true);
-    signature.addString(this._name ?? '');
-    signature.addString(this._name2 ?? '');
+    signature.addInt(this._kind == null ? 0 : this._kind.index);
     signature.addInt(this._locationOffset ?? 0);
     signature.addInt(this._locationStartColumn ?? 0);
     signature.addInt(this._locationStartLine ?? 0);
+    signature.addString(this._name ?? '');
     if (this._parameterNames == null) {
       signature.addInt(0);
     } else {
@@ -2371,7 +2472,6 @@
         signature.addString(x);
       }
     }
-    signature.addInt(this._requiredParameterCount ?? 0);
     if (this._relevanceTags == null) {
       signature.addInt(0);
     } else {
@@ -2380,21 +2480,37 @@
         signature.addString(x);
       }
     }
+    signature.addInt(this._requiredParameterCount ?? 0);
     signature.addString(this._returnType ?? '');
     signature.addString(this._typeParameters ?? '');
   }
 
   fb.Offset finish(fb.Builder fbBuilder) {
+    fb.Offset offset_children;
+    fb.Offset offset_defaultArgumentListString;
+    fb.Offset offset_defaultArgumentListTextRanges;
     fb.Offset offset_docComplete;
     fb.Offset offset_docSummary;
     fb.Offset offset_name;
-    fb.Offset offset_name2;
     fb.Offset offset_parameterNames;
     fb.Offset offset_parameters;
     fb.Offset offset_parameterTypes;
     fb.Offset offset_relevanceTags;
     fb.Offset offset_returnType;
     fb.Offset offset_typeParameters;
+    if (!(_children == null || _children.isEmpty)) {
+      offset_children = fbBuilder
+          .writeList(_children.map((b) => b.finish(fbBuilder)).toList());
+    }
+    if (_defaultArgumentListString != null) {
+      offset_defaultArgumentListString =
+          fbBuilder.writeString(_defaultArgumentListString);
+    }
+    if (!(_defaultArgumentListTextRanges == null ||
+        _defaultArgumentListTextRanges.isEmpty)) {
+      offset_defaultArgumentListTextRanges =
+          fbBuilder.writeListUint32(_defaultArgumentListTextRanges);
+    }
     if (_docComplete != null) {
       offset_docComplete = fbBuilder.writeString(_docComplete);
     }
@@ -2404,9 +2520,6 @@
     if (_name != null) {
       offset_name = fbBuilder.writeString(_name);
     }
-    if (_name2 != null) {
-      offset_name2 = fbBuilder.writeString(_name2);
-    }
     if (!(_parameterNames == null || _parameterNames.isEmpty)) {
       offset_parameterNames = fbBuilder.writeList(
           _parameterNames.map((b) => fbBuilder.writeString(b)).toList());
@@ -2429,65 +2542,71 @@
       offset_typeParameters = fbBuilder.writeString(_typeParameters);
     }
     fbBuilder.startTable();
+    if (offset_children != null) {
+      fbBuilder.addOffset(0, offset_children);
+    }
+    if (offset_defaultArgumentListString != null) {
+      fbBuilder.addOffset(1, offset_defaultArgumentListString);
+    }
+    if (offset_defaultArgumentListTextRanges != null) {
+      fbBuilder.addOffset(2, offset_defaultArgumentListTextRanges);
+    }
     if (offset_docComplete != null) {
-      fbBuilder.addOffset(0, offset_docComplete);
+      fbBuilder.addOffset(3, offset_docComplete);
     }
     if (offset_docSummary != null) {
-      fbBuilder.addOffset(1, offset_docSummary);
+      fbBuilder.addOffset(4, offset_docSummary);
     }
     if (_fieldMask != null && _fieldMask != 0) {
-      fbBuilder.addUint32(2, _fieldMask);
-    }
-    if (_kind != null && _kind != idl.AvailableDeclarationKind.CLASS) {
-      fbBuilder.addUint8(3, _kind.index);
+      fbBuilder.addUint32(5, _fieldMask);
     }
     if (_isAbstract == true) {
-      fbBuilder.addBool(4, true);
-    }
-    if (_isConst == true) {
-      fbBuilder.addBool(5, true);
-    }
-    if (_isDeprecated == true) {
       fbBuilder.addBool(6, true);
     }
-    if (_isFinal == true) {
+    if (_isConst == true) {
       fbBuilder.addBool(7, true);
     }
-    if (offset_name != null) {
-      fbBuilder.addOffset(8, offset_name);
+    if (_isDeprecated == true) {
+      fbBuilder.addBool(8, true);
     }
-    if (offset_name2 != null) {
-      fbBuilder.addOffset(9, offset_name2);
+    if (_isFinal == true) {
+      fbBuilder.addBool(9, true);
+    }
+    if (_kind != null && _kind != idl.AvailableDeclarationKind.CLASS) {
+      fbBuilder.addUint8(10, _kind.index);
     }
     if (_locationOffset != null && _locationOffset != 0) {
-      fbBuilder.addUint32(10, _locationOffset);
+      fbBuilder.addUint32(11, _locationOffset);
     }
     if (_locationStartColumn != null && _locationStartColumn != 0) {
-      fbBuilder.addUint32(11, _locationStartColumn);
+      fbBuilder.addUint32(12, _locationStartColumn);
     }
     if (_locationStartLine != null && _locationStartLine != 0) {
-      fbBuilder.addUint32(12, _locationStartLine);
+      fbBuilder.addUint32(13, _locationStartLine);
+    }
+    if (offset_name != null) {
+      fbBuilder.addOffset(14, offset_name);
     }
     if (offset_parameterNames != null) {
-      fbBuilder.addOffset(13, offset_parameterNames);
+      fbBuilder.addOffset(15, offset_parameterNames);
     }
     if (offset_parameters != null) {
-      fbBuilder.addOffset(14, offset_parameters);
+      fbBuilder.addOffset(16, offset_parameters);
     }
     if (offset_parameterTypes != null) {
-      fbBuilder.addOffset(15, offset_parameterTypes);
-    }
-    if (_requiredParameterCount != null && _requiredParameterCount != 0) {
-      fbBuilder.addUint32(16, _requiredParameterCount);
+      fbBuilder.addOffset(17, offset_parameterTypes);
     }
     if (offset_relevanceTags != null) {
-      fbBuilder.addOffset(17, offset_relevanceTags);
+      fbBuilder.addOffset(18, offset_relevanceTags);
+    }
+    if (_requiredParameterCount != null && _requiredParameterCount != 0) {
+      fbBuilder.addUint32(19, _requiredParameterCount);
     }
     if (offset_returnType != null) {
-      fbBuilder.addOffset(18, offset_returnType);
+      fbBuilder.addOffset(20, offset_returnType);
     }
     if (offset_typeParameters != null) {
-      fbBuilder.addOffset(19, offset_typeParameters);
+      fbBuilder.addOffset(21, offset_typeParameters);
     }
     return fbBuilder.endTable();
   }
@@ -2510,153 +2629,171 @@
 
   _AvailableDeclarationImpl(this._bc, this._bcOffset);
 
+  List<idl.AvailableDeclaration> _children;
+  String _defaultArgumentListString;
+  List<int> _defaultArgumentListTextRanges;
   String _docComplete;
   String _docSummary;
   int _fieldMask;
-  idl.AvailableDeclarationKind _kind;
   bool _isAbstract;
   bool _isConst;
   bool _isDeprecated;
   bool _isFinal;
-  String _name;
-  String _name2;
+  idl.AvailableDeclarationKind _kind;
   int _locationOffset;
   int _locationStartColumn;
   int _locationStartLine;
+  String _name;
   List<String> _parameterNames;
   String _parameters;
   List<String> _parameterTypes;
-  int _requiredParameterCount;
   List<String> _relevanceTags;
+  int _requiredParameterCount;
   String _returnType;
   String _typeParameters;
 
   @override
+  List<idl.AvailableDeclaration> get children {
+    _children ??= const fb.ListReader<idl.AvailableDeclaration>(
+            const _AvailableDeclarationReader())
+        .vTableGet(_bc, _bcOffset, 0, const <idl.AvailableDeclaration>[]);
+    return _children;
+  }
+
+  @override
+  String get defaultArgumentListString {
+    _defaultArgumentListString ??=
+        const fb.StringReader().vTableGet(_bc, _bcOffset, 1, '');
+    return _defaultArgumentListString;
+  }
+
+  @override
+  List<int> get defaultArgumentListTextRanges {
+    _defaultArgumentListTextRanges ??=
+        const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 2, const <int>[]);
+    return _defaultArgumentListTextRanges;
+  }
+
+  @override
   String get docComplete {
-    _docComplete ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, '');
+    _docComplete ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 3, '');
     return _docComplete;
   }
 
   @override
   String get docSummary {
-    _docSummary ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 1, '');
+    _docSummary ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 4, '');
     return _docSummary;
   }
 
   @override
   int get fieldMask {
-    _fieldMask ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 2, 0);
+    _fieldMask ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 5, 0);
     return _fieldMask;
   }
 
   @override
-  idl.AvailableDeclarationKind get kind {
-    _kind ??= const _AvailableDeclarationKindReader()
-        .vTableGet(_bc, _bcOffset, 3, idl.AvailableDeclarationKind.CLASS);
-    return _kind;
-  }
-
-  @override
   bool get isAbstract {
-    _isAbstract ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 4, false);
+    _isAbstract ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 6, false);
     return _isAbstract;
   }
 
   @override
   bool get isConst {
-    _isConst ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 5, false);
+    _isConst ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 7, false);
     return _isConst;
   }
 
   @override
   bool get isDeprecated {
-    _isDeprecated ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 6, false);
+    _isDeprecated ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 8, false);
     return _isDeprecated;
   }
 
   @override
   bool get isFinal {
-    _isFinal ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 7, false);
+    _isFinal ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 9, false);
     return _isFinal;
   }
 
   @override
-  String get name {
-    _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 8, '');
-    return _name;
-  }
-
-  @override
-  String get name2 {
-    _name2 ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 9, '');
-    return _name2;
+  idl.AvailableDeclarationKind get kind {
+    _kind ??= const _AvailableDeclarationKindReader()
+        .vTableGet(_bc, _bcOffset, 10, idl.AvailableDeclarationKind.CLASS);
+    return _kind;
   }
 
   @override
   int get locationOffset {
     _locationOffset ??=
-        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 10, 0);
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 11, 0);
     return _locationOffset;
   }
 
   @override
   int get locationStartColumn {
     _locationStartColumn ??=
-        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 11, 0);
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 12, 0);
     return _locationStartColumn;
   }
 
   @override
   int get locationStartLine {
     _locationStartLine ??=
-        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 12, 0);
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 13, 0);
     return _locationStartLine;
   }
 
   @override
+  String get name {
+    _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 14, '');
+    return _name;
+  }
+
+  @override
   List<String> get parameterNames {
     _parameterNames ??= const fb.ListReader<String>(const fb.StringReader())
-        .vTableGet(_bc, _bcOffset, 13, const <String>[]);
+        .vTableGet(_bc, _bcOffset, 15, const <String>[]);
     return _parameterNames;
   }
 
   @override
   String get parameters {
-    _parameters ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 14, '');
+    _parameters ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 16, '');
     return _parameters;
   }
 
   @override
   List<String> get parameterTypes {
     _parameterTypes ??= const fb.ListReader<String>(const fb.StringReader())
-        .vTableGet(_bc, _bcOffset, 15, const <String>[]);
+        .vTableGet(_bc, _bcOffset, 17, const <String>[]);
     return _parameterTypes;
   }
 
   @override
-  int get requiredParameterCount {
-    _requiredParameterCount ??=
-        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
-    return _requiredParameterCount;
-  }
-
-  @override
   List<String> get relevanceTags {
     _relevanceTags ??= const fb.ListReader<String>(const fb.StringReader())
-        .vTableGet(_bc, _bcOffset, 17, const <String>[]);
+        .vTableGet(_bc, _bcOffset, 18, const <String>[]);
     return _relevanceTags;
   }
 
   @override
+  int get requiredParameterCount {
+    _requiredParameterCount ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 19, 0);
+    return _requiredParameterCount;
+  }
+
+  @override
   String get returnType {
-    _returnType ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 18, '');
+    _returnType ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 20, '');
     return _returnType;
   }
 
   @override
   String get typeParameters {
     _typeParameters ??=
-        const fb.StringReader().vTableGet(_bc, _bcOffset, 19, '');
+        const fb.StringReader().vTableGet(_bc, _bcOffset, 21, '');
     return _typeParameters;
   }
 }
@@ -2665,28 +2802,33 @@
   @override
   Map<String, Object> toJson() {
     Map<String, Object> _result = <String, Object>{};
+    if (children.isNotEmpty)
+      _result["children"] = children.map((_value) => _value.toJson()).toList();
+    if (defaultArgumentListString != '')
+      _result["defaultArgumentListString"] = defaultArgumentListString;
+    if (defaultArgumentListTextRanges.isNotEmpty)
+      _result["defaultArgumentListTextRanges"] = defaultArgumentListTextRanges;
     if (docComplete != '') _result["docComplete"] = docComplete;
     if (docSummary != '') _result["docSummary"] = docSummary;
     if (fieldMask != 0) _result["fieldMask"] = fieldMask;
-    if (kind != idl.AvailableDeclarationKind.CLASS)
-      _result["kind"] = kind.toString().split('.')[1];
     if (isAbstract != false) _result["isAbstract"] = isAbstract;
     if (isConst != false) _result["isConst"] = isConst;
     if (isDeprecated != false) _result["isDeprecated"] = isDeprecated;
     if (isFinal != false) _result["isFinal"] = isFinal;
-    if (name != '') _result["name"] = name;
-    if (name2 != '') _result["name2"] = name2;
+    if (kind != idl.AvailableDeclarationKind.CLASS)
+      _result["kind"] = kind.toString().split('.')[1];
     if (locationOffset != 0) _result["locationOffset"] = locationOffset;
     if (locationStartColumn != 0)
       _result["locationStartColumn"] = locationStartColumn;
     if (locationStartLine != 0)
       _result["locationStartLine"] = locationStartLine;
+    if (name != '') _result["name"] = name;
     if (parameterNames.isNotEmpty) _result["parameterNames"] = parameterNames;
     if (parameters != '') _result["parameters"] = parameters;
     if (parameterTypes.isNotEmpty) _result["parameterTypes"] = parameterTypes;
+    if (relevanceTags.isNotEmpty) _result["relevanceTags"] = relevanceTags;
     if (requiredParameterCount != 0)
       _result["requiredParameterCount"] = requiredParameterCount;
-    if (relevanceTags.isNotEmpty) _result["relevanceTags"] = relevanceTags;
     if (returnType != '') _result["returnType"] = returnType;
     if (typeParameters != '') _result["typeParameters"] = typeParameters;
     return _result;
@@ -2694,24 +2836,26 @@
 
   @override
   Map<String, Object> toMap() => {
+        "children": children,
+        "defaultArgumentListString": defaultArgumentListString,
+        "defaultArgumentListTextRanges": defaultArgumentListTextRanges,
         "docComplete": docComplete,
         "docSummary": docSummary,
         "fieldMask": fieldMask,
-        "kind": kind,
         "isAbstract": isAbstract,
         "isConst": isConst,
         "isDeprecated": isDeprecated,
         "isFinal": isFinal,
-        "name": name,
-        "name2": name2,
+        "kind": kind,
         "locationOffset": locationOffset,
         "locationStartColumn": locationStartColumn,
         "locationStartLine": locationStartLine,
+        "name": name,
         "parameterNames": parameterNames,
         "parameters": parameters,
         "parameterTypes": parameterTypes,
-        "requiredParameterCount": requiredParameterCount,
         "relevanceTags": relevanceTags,
+        "requiredParameterCount": requiredParameterCount,
         "returnType": returnType,
         "typeParameters": typeParameters,
       };
@@ -2724,6 +2868,7 @@
     with _AvailableFileMixin
     implements idl.AvailableFile {
   List<AvailableDeclarationBuilder> _declarations;
+  DirectiveInfoBuilder _directiveInfo;
   List<AvailableFileExportBuilder> _exports;
   bool _isLibrary;
   bool _isLibraryDeprecated;
@@ -2734,16 +2879,24 @@
       _declarations ??= <AvailableDeclarationBuilder>[];
 
   /// Declarations of the file.
-  void set declarations(List<AvailableDeclarationBuilder> value) {
+  set declarations(List<AvailableDeclarationBuilder> value) {
     this._declarations = value;
   }
 
   @override
+  DirectiveInfoBuilder get directiveInfo => _directiveInfo;
+
+  /// The Dartdoc directives in the file.
+  set directiveInfo(DirectiveInfoBuilder value) {
+    this._directiveInfo = value;
+  }
+
+  @override
   List<AvailableFileExportBuilder> get exports =>
       _exports ??= <AvailableFileExportBuilder>[];
 
   /// Exports directives of the file.
-  void set exports(List<AvailableFileExportBuilder> value) {
+  set exports(List<AvailableFileExportBuilder> value) {
     this._exports = value;
   }
 
@@ -2751,7 +2904,7 @@
   bool get isLibrary => _isLibrary ??= false;
 
   /// Is `true` if this file is a library.
-  void set isLibrary(bool value) {
+  set isLibrary(bool value) {
     this._isLibrary = value;
   }
 
@@ -2759,7 +2912,7 @@
   bool get isLibraryDeprecated => _isLibraryDeprecated ??= false;
 
   /// Is `true` if this file is a library, and it is deprecated.
-  void set isLibraryDeprecated(bool value) {
+  set isLibraryDeprecated(bool value) {
     this._isLibraryDeprecated = value;
   }
 
@@ -2767,33 +2920,32 @@
   List<String> get parts => _parts ??= <String>[];
 
   /// URIs of `part` directives.
-  void set parts(List<String> value) {
+  set parts(List<String> value) {
     this._parts = value;
   }
 
   AvailableFileBuilder(
       {List<AvailableDeclarationBuilder> declarations,
+      DirectiveInfoBuilder directiveInfo,
       List<AvailableFileExportBuilder> exports,
       bool isLibrary,
       bool isLibraryDeprecated,
       List<String> parts})
       : _declarations = declarations,
+        _directiveInfo = directiveInfo,
         _exports = exports,
         _isLibrary = isLibrary,
         _isLibraryDeprecated = isLibraryDeprecated,
         _parts = parts;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {
     _declarations?.forEach((b) => b.flushInformative());
+    _directiveInfo?.flushInformative();
     _exports?.forEach((b) => b.flushInformative());
   }
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     if (this._declarations == null) {
       signature.addInt(0);
@@ -2821,6 +2973,8 @@
         signature.addString(x);
       }
     }
+    signature.addBool(this._directiveInfo != null);
+    this._directiveInfo?.collectApiSignature(signature);
   }
 
   List<int> toBuffer() {
@@ -2830,12 +2984,16 @@
 
   fb.Offset finish(fb.Builder fbBuilder) {
     fb.Offset offset_declarations;
+    fb.Offset offset_directiveInfo;
     fb.Offset offset_exports;
     fb.Offset offset_parts;
     if (!(_declarations == null || _declarations.isEmpty)) {
       offset_declarations = fbBuilder
           .writeList(_declarations.map((b) => b.finish(fbBuilder)).toList());
     }
+    if (_directiveInfo != null) {
+      offset_directiveInfo = _directiveInfo.finish(fbBuilder);
+    }
     if (!(_exports == null || _exports.isEmpty)) {
       offset_exports = fbBuilder
           .writeList(_exports.map((b) => b.finish(fbBuilder)).toList());
@@ -2848,6 +3006,9 @@
     if (offset_declarations != null) {
       fbBuilder.addOffset(0, offset_declarations);
     }
+    if (offset_directiveInfo != null) {
+      fbBuilder.addOffset(5, offset_directiveInfo);
+    }
     if (offset_exports != null) {
       fbBuilder.addOffset(1, offset_exports);
     }
@@ -2886,6 +3047,7 @@
   _AvailableFileImpl(this._bc, this._bcOffset);
 
   List<idl.AvailableDeclaration> _declarations;
+  idl.DirectiveInfo _directiveInfo;
   List<idl.AvailableFileExport> _exports;
   bool _isLibrary;
   bool _isLibraryDeprecated;
@@ -2900,6 +3062,13 @@
   }
 
   @override
+  idl.DirectiveInfo get directiveInfo {
+    _directiveInfo ??=
+        const _DirectiveInfoReader().vTableGet(_bc, _bcOffset, 5, null);
+    return _directiveInfo;
+  }
+
+  @override
   List<idl.AvailableFileExport> get exports {
     _exports ??= const fb.ListReader<idl.AvailableFileExport>(
             const _AvailableFileExportReader())
@@ -2935,6 +3104,8 @@
     if (declarations.isNotEmpty)
       _result["declarations"] =
           declarations.map((_value) => _value.toJson()).toList();
+    if (directiveInfo != null)
+      _result["directiveInfo"] = directiveInfo.toJson();
     if (exports.isNotEmpty)
       _result["exports"] = exports.map((_value) => _value.toJson()).toList();
     if (isLibrary != false) _result["isLibrary"] = isLibrary;
@@ -2947,6 +3118,7 @@
   @override
   Map<String, Object> toMap() => {
         "declarations": declarations,
+        "directiveInfo": directiveInfo,
         "exports": exports,
         "isLibrary": isLibrary,
         "isLibraryDeprecated": isLibraryDeprecated,
@@ -2968,7 +3140,7 @@
       _combinators ??= <AvailableFileExportCombinatorBuilder>[];
 
   /// Combinators contained in this export directive.
-  void set combinators(List<AvailableFileExportCombinatorBuilder> value) {
+  set combinators(List<AvailableFileExportCombinatorBuilder> value) {
     this._combinators = value;
   }
 
@@ -2976,7 +3148,7 @@
   String get uri => _uri ??= '';
 
   /// URI of the exported library.
-  void set uri(String value) {
+  set uri(String value) {
     this._uri = value;
   }
 
@@ -2985,16 +3157,12 @@
       : _combinators = combinators,
         _uri = uri;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {
     _combinators?.forEach((b) => b.flushInformative());
   }
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     signature.addString(this._uri ?? '');
     if (this._combinators == null) {
@@ -3095,7 +3263,7 @@
   List<String> get hides => _hides ??= <String>[];
 
   /// List of names which are hidden.  Empty if this is a `show` combinator.
-  void set hides(List<String> value) {
+  set hides(List<String> value) {
     this._hides = value;
   }
 
@@ -3103,7 +3271,7 @@
   List<String> get shows => _shows ??= <String>[];
 
   /// List of names which are shown.  Empty if this is a `hide` combinator.
-  void set shows(List<String> value) {
+  set shows(List<String> value) {
     this._shows = value;
   }
 
@@ -3111,14 +3279,10 @@
       : _hides = hides,
         _shows = shows;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {}
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     if (this._shows == null) {
       signature.addInt(0);
@@ -3226,7 +3390,7 @@
   int get length => _length ??= 0;
 
   /// Length of the element code.
-  void set length(int value) {
+  set length(int value) {
     assert(value == null || value >= 0);
     this._length = value;
   }
@@ -3235,7 +3399,7 @@
   int get offset => _offset ??= 0;
 
   /// Offset of the element code relative to the beginning of the file.
-  void set offset(int value) {
+  set offset(int value) {
     assert(value == null || value >= 0);
     this._offset = value;
   }
@@ -3244,14 +3408,10 @@
       : _length = length,
         _offset = offset;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {}
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     signature.addInt(this._offset ?? 0);
     signature.addInt(this._length ?? 0);
@@ -3320,6 +3480,131 @@
   String toString() => convert.json.encode(toJson());
 }
 
+class DirectiveInfoBuilder extends Object
+    with _DirectiveInfoMixin
+    implements idl.DirectiveInfo {
+  List<String> _templateNames;
+  List<String> _templateValues;
+
+  @override
+  List<String> get templateNames => _templateNames ??= <String>[];
+
+  /// The names of the defined templates.
+  set templateNames(List<String> value) {
+    this._templateNames = value;
+  }
+
+  @override
+  List<String> get templateValues => _templateValues ??= <String>[];
+
+  /// The values of the defined templates.
+  set templateValues(List<String> value) {
+    this._templateValues = value;
+  }
+
+  DirectiveInfoBuilder(
+      {List<String> templateNames, List<String> templateValues})
+      : _templateNames = templateNames,
+        _templateValues = templateValues;
+
+  /// Flush [informative] data recursively.
+  void flushInformative() {}
+
+  /// Accumulate non-[informative] data into [signature].
+  void collectApiSignature(api_sig.ApiSignature signature) {
+    if (this._templateNames == null) {
+      signature.addInt(0);
+    } else {
+      signature.addInt(this._templateNames.length);
+      for (var x in this._templateNames) {
+        signature.addString(x);
+      }
+    }
+    if (this._templateValues == null) {
+      signature.addInt(0);
+    } else {
+      signature.addInt(this._templateValues.length);
+      for (var x in this._templateValues) {
+        signature.addString(x);
+      }
+    }
+  }
+
+  fb.Offset finish(fb.Builder fbBuilder) {
+    fb.Offset offset_templateNames;
+    fb.Offset offset_templateValues;
+    if (!(_templateNames == null || _templateNames.isEmpty)) {
+      offset_templateNames = fbBuilder.writeList(
+          _templateNames.map((b) => fbBuilder.writeString(b)).toList());
+    }
+    if (!(_templateValues == null || _templateValues.isEmpty)) {
+      offset_templateValues = fbBuilder.writeList(
+          _templateValues.map((b) => fbBuilder.writeString(b)).toList());
+    }
+    fbBuilder.startTable();
+    if (offset_templateNames != null) {
+      fbBuilder.addOffset(0, offset_templateNames);
+    }
+    if (offset_templateValues != null) {
+      fbBuilder.addOffset(1, offset_templateValues);
+    }
+    return fbBuilder.endTable();
+  }
+}
+
+class _DirectiveInfoReader extends fb.TableReader<_DirectiveInfoImpl> {
+  const _DirectiveInfoReader();
+
+  @override
+  _DirectiveInfoImpl createObject(fb.BufferContext bc, int offset) =>
+      new _DirectiveInfoImpl(bc, offset);
+}
+
+class _DirectiveInfoImpl extends Object
+    with _DirectiveInfoMixin
+    implements idl.DirectiveInfo {
+  final fb.BufferContext _bc;
+  final int _bcOffset;
+
+  _DirectiveInfoImpl(this._bc, this._bcOffset);
+
+  List<String> _templateNames;
+  List<String> _templateValues;
+
+  @override
+  List<String> get templateNames {
+    _templateNames ??= const fb.ListReader<String>(const fb.StringReader())
+        .vTableGet(_bc, _bcOffset, 0, const <String>[]);
+    return _templateNames;
+  }
+
+  @override
+  List<String> get templateValues {
+    _templateValues ??= const fb.ListReader<String>(const fb.StringReader())
+        .vTableGet(_bc, _bcOffset, 1, const <String>[]);
+    return _templateValues;
+  }
+}
+
+abstract class _DirectiveInfoMixin implements idl.DirectiveInfo {
+  @override
+  Map<String, Object> toJson() {
+    Map<String, Object> _result = <String, Object>{};
+    if (templateNames.isNotEmpty) _result["templateNames"] = templateNames;
+    if (templateValues.isNotEmpty) _result["templateValues"] = templateValues;
+    return _result;
+  }
+
+  @override
+  Map<String, Object> toMap() => {
+        "templateNames": templateNames,
+        "templateValues": templateValues,
+      };
+
+  @override
+  String toString() => convert.json.encode(toJson());
+}
+
 class EntityRefBuilder extends Object
     with _EntityRefMixin
     implements idl.EntityRef {
@@ -3338,7 +3623,7 @@
   idl.EntityRefKind get entityKind => _entityKind ??= idl.EntityRefKind.named;
 
   /// The kind of entity being represented.
-  void set entityKind(idl.EntityRefKind value) {
+  set entityKind(idl.EntityRefKind value) {
     this._entityKind = value;
   }
 
@@ -3372,7 +3657,7 @@
   /// Note that if the entity being referred to is a generic method inside a
   /// generic class, then the type arguments in [typeArguments] are applied
   /// first to the class and then to the method.
-  void set implicitFunctionTypeIndices(List<int> value) {
+  set implicitFunctionTypeIndices(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._implicitFunctionTypeIndices = value;
   }
@@ -3397,7 +3682,7 @@
   ///
   /// If the type being referred to is not a type parameter, [paramReference] is
   /// zero.
-  void set paramReference(int value) {
+  set paramReference(int value) {
     assert(value == null || value >= 0);
     this._paramReference = value;
   }
@@ -3407,7 +3692,7 @@
 
   /// Index into [UnlinkedUnit.references] for the entity being referred to, or
   /// zero if this is a reference to a type parameter.
-  void set reference(int value) {
+  set reference(int value) {
     assert(value == null || value >= 0);
     this._reference = value;
   }
@@ -3425,7 +3710,7 @@
   /// This is called `refinedSlot` to clarify that if it points to an inferred
   /// type, it points to a type that is a "refinement" of this one (one in which
   /// some type arguments have been inferred).
-  void set refinedSlot(int value) {
+  set refinedSlot(int value) {
     assert(value == null || value >= 0);
     this._refinedSlot = value;
   }
@@ -3438,7 +3723,7 @@
   /// propagation or type inference with which this [EntityRef] is associated.
   ///
   /// Otherwise zero.
-  void set slot(int value) {
+  set slot(int value) {
     assert(value == null || value >= 0);
     this._slot = value;
   }
@@ -3451,7 +3736,7 @@
   /// [FunctionElement] is not in any library (e.g. a function type that was
   /// synthesized by a LUB computation), the function parameters.  Otherwise
   /// empty.
-  void set syntheticParams(List<UnlinkedParamBuilder> value) {
+  set syntheticParams(List<UnlinkedParamBuilder> value) {
     this._syntheticParams = value;
   }
 
@@ -3462,7 +3747,7 @@
   /// [FunctionElement] is not in any library (e.g. a function type that was
   /// synthesized by a LUB computation), the return type of the function.
   /// Otherwise `null`.
-  void set syntheticReturnType(EntityRefBuilder value) {
+  set syntheticReturnType(EntityRefBuilder value) {
     this._syntheticReturnType = value;
   }
 
@@ -3472,7 +3757,7 @@
 
   /// If this is an instantiation of a generic type or generic executable, the
   /// type arguments used to instantiate it (if any).
-  void set typeArguments(List<EntityRefBuilder> value) {
+  set typeArguments(List<EntityRefBuilder> value) {
     this._typeArguments = value;
   }
 
@@ -3482,7 +3767,7 @@
 
   /// If this is a function type, the type parameters defined for the function
   /// type (if any).
-  void set typeParameters(List<UnlinkedTypeParamBuilder> value) {
+  set typeParameters(List<UnlinkedTypeParamBuilder> value) {
     this._typeParameters = value;
   }
 
@@ -3508,9 +3793,7 @@
         _typeArguments = typeArguments,
         _typeParameters = typeParameters;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {
     _syntheticParams?.forEach((b) => b.flushInformative());
     _syntheticReturnType?.flushInformative();
@@ -3518,9 +3801,7 @@
     _typeParameters?.forEach((b) => b.flushInformative());
   }
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     signature.addInt(this._reference ?? 0);
     if (this._typeArguments == null) {
@@ -3776,7 +4057,7 @@
 
   /// Absolute URI for the compilation units listed in the library's `part`
   /// declarations, empty string for invalid URI.
-  void set parts(List<String> value) {
+  set parts(List<String> value) {
     this._parts = value;
   }
 
@@ -3784,7 +4065,7 @@
   String get uri => _uri ??= '';
 
   /// The absolute URI of the dependent library, e.g. `package:foo/bar.dart`.
-  void set uri(String value) {
+  set uri(String value) {
     this._uri = value;
   }
 
@@ -3792,14 +4073,10 @@
       : _parts = parts,
         _uri = uri;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {}
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     signature.addString(this._uri ?? '');
     if (this._parts == null) {
@@ -3898,7 +4175,7 @@
 
   /// Index into [LinkedLibrary.dependencies] for the library in which the
   /// entity is defined.
-  void set dependency(int value) {
+  set dependency(int value) {
     assert(value == null || value >= 0);
     this._dependency = value;
   }
@@ -3907,7 +4184,7 @@
   idl.ReferenceKind get kind => _kind ??= idl.ReferenceKind.classOrEnum;
 
   /// The kind of the entity being referred to.
-  void set kind(idl.ReferenceKind value) {
+  set kind(idl.ReferenceKind value) {
     this._kind = value;
   }
 
@@ -3916,7 +4193,7 @@
 
   /// Name of the exported entity.  For an exported setter, this name includes
   /// the trailing '='.
-  void set name(String value) {
+  set name(String value) {
     this._name = value;
   }
 
@@ -3927,7 +4204,7 @@
   /// definition of the entity.  As with indices into [LinkedLibrary.units],
   /// zero represents the defining compilation unit, and nonzero values
   /// represent parts in the order of the corresponding `part` declarations.
-  void set unit(int value) {
+  set unit(int value) {
     assert(value == null || value >= 0);
     this._unit = value;
   }
@@ -3939,14 +4216,10 @@
         _name = name,
         _unit = unit;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {}
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     signature.addInt(this._dependency ?? 0);
     signature.addString(this._name ?? '');
@@ -4075,7 +4348,7 @@
   /// implicitly refers to an element declared in the library) or
   /// anti-dependency (e.g. the result of type propagation or type inference
   /// depends on the lack of a certain declaration in the library).
-  void set dependencies(List<LinkedDependencyBuilder> value) {
+  set dependencies(List<LinkedDependencyBuilder> value) {
     this._dependencies = value;
   }
 
@@ -4084,7 +4357,7 @@
 
   /// For each export in [UnlinkedUnit.exports], an index into [dependencies]
   /// of the library being exported.
-  void set exportDependencies(List<int> value) {
+  set exportDependencies(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._exportDependencies = value;
   }
@@ -4098,7 +4371,7 @@
   /// brought into the namespace via `export` directives).
   ///
   /// Sorted by name.
-  void set exportNames(List<LinkedExportNameBuilder> value) {
+  set exportNames(List<LinkedExportNameBuilder> value) {
     this._exportNames = value;
   }
 
@@ -4111,7 +4384,7 @@
 
   /// For each import in [UnlinkedUnit.imports], an index into [dependencies]
   /// of the library being imported.
-  void set importDependencies(List<int> value) {
+  set importDependencies(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._importDependencies = value;
   }
@@ -4122,7 +4395,7 @@
   /// The number of elements in [dependencies] which are not "linked"
   /// dependencies (that is, the number of libraries in the direct imports plus
   /// the transitive closure of exports, plus the library itself).
-  void set numPrelinkedDependencies(int value) {
+  set numPrelinkedDependencies(int value) {
     assert(value == null || value >= 0);
     this._numPrelinkedDependencies = value;
   }
@@ -4134,7 +4407,7 @@
   /// library.  The summary of the defining compilation unit is listed first,
   /// followed by the summary of each part, in the order of the `part`
   /// declarations in the defining compilation unit.
-  void set units(List<LinkedUnitBuilder> value) {
+  set units(List<LinkedUnitBuilder> value) {
     this._units = value;
   }
 
@@ -4152,18 +4425,14 @@
         _numPrelinkedDependencies = numPrelinkedDependencies,
         _units = units;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {
     _dependencies?.forEach((b) => b.flushInformative());
     _exportNames?.forEach((b) => b.flushInformative());
     _units?.forEach((b) => b.flushInformative());
   }
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     if (this._dependencies == null) {
       signature.addInt(0);
@@ -4374,6 +4643,15402 @@
   String toString() => convert.json.encode(toJson());
 }
 
+class LinkedNodeBuilder extends Object
+    with _LinkedNodeMixin
+    implements idl.LinkedNode {
+  LinkedNodeTypeBuilder _variantField_24;
+  List<LinkedNodeBuilder> _variantField_2;
+  LinkedNodeBuilder _variantField_11;
+  List<LinkedNodeBuilder> _variantField_4;
+  LinkedNodeBuilder _variantField_6;
+  int _variantField_15;
+  LinkedNodeBuilder _variantField_7;
+  LinkedNodeBuilder _variantField_8;
+  int _variantField_16;
+  int _variantField_17;
+  int _variantField_18;
+  int _variantField_19;
+  LinkedNodeTypeBuilder _variantField_23;
+  bool _variantField_27;
+  LinkedNodeBuilder _variantField_9;
+  LinkedNodeBuilder _variantField_12;
+  List<LinkedNodeBuilder> _variantField_5;
+  LinkedNodeBuilder _variantField_13;
+  int _variantField_34;
+  int _variantField_33;
+  List<int> _variantField_28;
+  idl.LinkedNodeCommentType _variantField_29;
+  List<LinkedNodeBuilder> _variantField_3;
+  LinkedNodeBuilder _variantField_10;
+  double _variantField_21;
+  LinkedNodeTypeBuilder _variantField_25;
+  idl.LinkedNodeFormalParameterKind _variantField_26;
+  String _variantField_30;
+  LinkedNodeBuilder _variantField_14;
+  bool _isSynthetic;
+  idl.LinkedNodeKind _kind;
+  String _variantField_20;
+  bool _variantField_31;
+  String _variantField_22;
+  LinkedNodeVariablesDeclarationBuilder _variantField_32;
+
+  @override
+  LinkedNodeTypeBuilder get actualReturnType {
+    assert(kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionExpression ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.genericFunctionType ||
+        kind == idl.LinkedNodeKind.methodDeclaration);
+    return _variantField_24;
+  }
+
+  @override
+  LinkedNodeTypeBuilder get actualType {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter ||
+        kind == idl.LinkedNodeKind.variableDeclaration);
+    return _variantField_24;
+  }
+
+  @override
+  LinkedNodeTypeBuilder get binaryExpression_invokeType {
+    assert(kind == idl.LinkedNodeKind.binaryExpression);
+    return _variantField_24;
+  }
+
+  @override
+  LinkedNodeTypeBuilder get invocationExpression_invokeType {
+    assert(kind == idl.LinkedNodeKind.functionExpressionInvocation ||
+        kind == idl.LinkedNodeKind.methodInvocation);
+    return _variantField_24;
+  }
+
+  /// The explicit or inferred return type of a function typed node.
+  set actualReturnType(LinkedNodeTypeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionExpression ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.genericFunctionType ||
+        kind == idl.LinkedNodeKind.methodDeclaration);
+    _variantField_24 = value;
+  }
+
+  set actualType(LinkedNodeTypeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter ||
+        kind == idl.LinkedNodeKind.variableDeclaration);
+    _variantField_24 = value;
+  }
+
+  set binaryExpression_invokeType(LinkedNodeTypeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.binaryExpression);
+    _variantField_24 = value;
+  }
+
+  set invocationExpression_invokeType(LinkedNodeTypeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.functionExpressionInvocation ||
+        kind == idl.LinkedNodeKind.methodInvocation);
+    _variantField_24 = value;
+  }
+
+  @override
+  List<LinkedNodeBuilder> get adjacentStrings_strings {
+    assert(kind == idl.LinkedNodeKind.adjacentStrings);
+    return _variantField_2 ??= <LinkedNodeBuilder>[];
+  }
+
+  @override
+  List<LinkedNodeBuilder> get argumentList_arguments {
+    assert(kind == idl.LinkedNodeKind.argumentList);
+    return _variantField_2 ??= <LinkedNodeBuilder>[];
+  }
+
+  @override
+  List<LinkedNodeBuilder> get block_statements {
+    assert(kind == idl.LinkedNodeKind.block);
+    return _variantField_2 ??= <LinkedNodeBuilder>[];
+  }
+
+  @override
+  List<LinkedNodeBuilder> get cascadeExpression_sections {
+    assert(kind == idl.LinkedNodeKind.cascadeExpression);
+    return _variantField_2 ??= <LinkedNodeBuilder>[];
+  }
+
+  @override
+  List<LinkedNodeBuilder> get compilationUnit_declarations {
+    assert(kind == idl.LinkedNodeKind.compilationUnit);
+    return _variantField_2 ??= <LinkedNodeBuilder>[];
+  }
+
+  @override
+  List<LinkedNodeBuilder> get constructorDeclaration_initializers {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    return _variantField_2 ??= <LinkedNodeBuilder>[];
+  }
+
+  @override
+  List<LinkedNodeBuilder> get dottedName_components {
+    assert(kind == idl.LinkedNodeKind.dottedName);
+    return _variantField_2 ??= <LinkedNodeBuilder>[];
+  }
+
+  @override
+  List<LinkedNodeBuilder> get enumDeclaration_constants {
+    assert(kind == idl.LinkedNodeKind.enumDeclaration);
+    return _variantField_2 ??= <LinkedNodeBuilder>[];
+  }
+
+  @override
+  List<LinkedNodeBuilder> get formalParameterList_parameters {
+    assert(kind == idl.LinkedNodeKind.formalParameterList);
+    return _variantField_2 ??= <LinkedNodeBuilder>[];
+  }
+
+  @override
+  List<LinkedNodeBuilder> get hideCombinator_hiddenNames {
+    assert(kind == idl.LinkedNodeKind.hideCombinator);
+    return _variantField_2 ??= <LinkedNodeBuilder>[];
+  }
+
+  @override
+  List<LinkedNodeBuilder> get implementsClause_interfaces {
+    assert(kind == idl.LinkedNodeKind.implementsClause);
+    return _variantField_2 ??= <LinkedNodeBuilder>[];
+  }
+
+  @override
+  List<LinkedNodeBuilder> get labeledStatement_labels {
+    assert(kind == idl.LinkedNodeKind.labeledStatement);
+    return _variantField_2 ??= <LinkedNodeBuilder>[];
+  }
+
+  @override
+  List<LinkedNodeBuilder> get libraryIdentifier_components {
+    assert(kind == idl.LinkedNodeKind.libraryIdentifier);
+    return _variantField_2 ??= <LinkedNodeBuilder>[];
+  }
+
+  @override
+  List<LinkedNodeBuilder> get listLiteral_elements {
+    assert(kind == idl.LinkedNodeKind.listLiteral);
+    return _variantField_2 ??= <LinkedNodeBuilder>[];
+  }
+
+  @override
+  List<LinkedNodeBuilder> get namespaceDirective_combinators {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective);
+    return _variantField_2 ??= <LinkedNodeBuilder>[];
+  }
+
+  @override
+  List<LinkedNodeBuilder> get onClause_superclassConstraints {
+    assert(kind == idl.LinkedNodeKind.onClause);
+    return _variantField_2 ??= <LinkedNodeBuilder>[];
+  }
+
+  @override
+  List<LinkedNodeBuilder> get setOrMapLiteral_elements {
+    assert(kind == idl.LinkedNodeKind.setOrMapLiteral);
+    return _variantField_2 ??= <LinkedNodeBuilder>[];
+  }
+
+  @override
+  List<LinkedNodeBuilder> get showCombinator_shownNames {
+    assert(kind == idl.LinkedNodeKind.showCombinator);
+    return _variantField_2 ??= <LinkedNodeBuilder>[];
+  }
+
+  @override
+  List<LinkedNodeBuilder> get stringInterpolation_elements {
+    assert(kind == idl.LinkedNodeKind.stringInterpolation);
+    return _variantField_2 ??= <LinkedNodeBuilder>[];
+  }
+
+  @override
+  List<LinkedNodeBuilder> get switchStatement_members {
+    assert(kind == idl.LinkedNodeKind.switchStatement);
+    return _variantField_2 ??= <LinkedNodeBuilder>[];
+  }
+
+  @override
+  List<LinkedNodeBuilder> get tryStatement_catchClauses {
+    assert(kind == idl.LinkedNodeKind.tryStatement);
+    return _variantField_2 ??= <LinkedNodeBuilder>[];
+  }
+
+  @override
+  List<LinkedNodeBuilder> get typeArgumentList_arguments {
+    assert(kind == idl.LinkedNodeKind.typeArgumentList);
+    return _variantField_2 ??= <LinkedNodeBuilder>[];
+  }
+
+  @override
+  List<LinkedNodeBuilder> get typeParameterList_typeParameters {
+    assert(kind == idl.LinkedNodeKind.typeParameterList);
+    return _variantField_2 ??= <LinkedNodeBuilder>[];
+  }
+
+  @override
+  List<LinkedNodeBuilder> get variableDeclarationList_variables {
+    assert(kind == idl.LinkedNodeKind.variableDeclarationList);
+    return _variantField_2 ??= <LinkedNodeBuilder>[];
+  }
+
+  @override
+  List<LinkedNodeBuilder> get withClause_mixinTypes {
+    assert(kind == idl.LinkedNodeKind.withClause);
+    return _variantField_2 ??= <LinkedNodeBuilder>[];
+  }
+
+  set adjacentStrings_strings(List<LinkedNodeBuilder> value) {
+    assert(kind == idl.LinkedNodeKind.adjacentStrings);
+    _variantField_2 = value;
+  }
+
+  set argumentList_arguments(List<LinkedNodeBuilder> value) {
+    assert(kind == idl.LinkedNodeKind.argumentList);
+    _variantField_2 = value;
+  }
+
+  set block_statements(List<LinkedNodeBuilder> value) {
+    assert(kind == idl.LinkedNodeKind.block);
+    _variantField_2 = value;
+  }
+
+  set cascadeExpression_sections(List<LinkedNodeBuilder> value) {
+    assert(kind == idl.LinkedNodeKind.cascadeExpression);
+    _variantField_2 = value;
+  }
+
+  set compilationUnit_declarations(List<LinkedNodeBuilder> value) {
+    assert(kind == idl.LinkedNodeKind.compilationUnit);
+    _variantField_2 = value;
+  }
+
+  set constructorDeclaration_initializers(List<LinkedNodeBuilder> value) {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    _variantField_2 = value;
+  }
+
+  set dottedName_components(List<LinkedNodeBuilder> value) {
+    assert(kind == idl.LinkedNodeKind.dottedName);
+    _variantField_2 = value;
+  }
+
+  set enumDeclaration_constants(List<LinkedNodeBuilder> value) {
+    assert(kind == idl.LinkedNodeKind.enumDeclaration);
+    _variantField_2 = value;
+  }
+
+  set formalParameterList_parameters(List<LinkedNodeBuilder> value) {
+    assert(kind == idl.LinkedNodeKind.formalParameterList);
+    _variantField_2 = value;
+  }
+
+  set hideCombinator_hiddenNames(List<LinkedNodeBuilder> value) {
+    assert(kind == idl.LinkedNodeKind.hideCombinator);
+    _variantField_2 = value;
+  }
+
+  set implementsClause_interfaces(List<LinkedNodeBuilder> value) {
+    assert(kind == idl.LinkedNodeKind.implementsClause);
+    _variantField_2 = value;
+  }
+
+  set labeledStatement_labels(List<LinkedNodeBuilder> value) {
+    assert(kind == idl.LinkedNodeKind.labeledStatement);
+    _variantField_2 = value;
+  }
+
+  set libraryIdentifier_components(List<LinkedNodeBuilder> value) {
+    assert(kind == idl.LinkedNodeKind.libraryIdentifier);
+    _variantField_2 = value;
+  }
+
+  set listLiteral_elements(List<LinkedNodeBuilder> value) {
+    assert(kind == idl.LinkedNodeKind.listLiteral);
+    _variantField_2 = value;
+  }
+
+  set namespaceDirective_combinators(List<LinkedNodeBuilder> value) {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective);
+    _variantField_2 = value;
+  }
+
+  set onClause_superclassConstraints(List<LinkedNodeBuilder> value) {
+    assert(kind == idl.LinkedNodeKind.onClause);
+    _variantField_2 = value;
+  }
+
+  set setOrMapLiteral_elements(List<LinkedNodeBuilder> value) {
+    assert(kind == idl.LinkedNodeKind.setOrMapLiteral);
+    _variantField_2 = value;
+  }
+
+  set showCombinator_shownNames(List<LinkedNodeBuilder> value) {
+    assert(kind == idl.LinkedNodeKind.showCombinator);
+    _variantField_2 = value;
+  }
+
+  set stringInterpolation_elements(List<LinkedNodeBuilder> value) {
+    assert(kind == idl.LinkedNodeKind.stringInterpolation);
+    _variantField_2 = value;
+  }
+
+  set switchStatement_members(List<LinkedNodeBuilder> value) {
+    assert(kind == idl.LinkedNodeKind.switchStatement);
+    _variantField_2 = value;
+  }
+
+  set tryStatement_catchClauses(List<LinkedNodeBuilder> value) {
+    assert(kind == idl.LinkedNodeKind.tryStatement);
+    _variantField_2 = value;
+  }
+
+  set typeArgumentList_arguments(List<LinkedNodeBuilder> value) {
+    assert(kind == idl.LinkedNodeKind.typeArgumentList);
+    _variantField_2 = value;
+  }
+
+  set typeParameterList_typeParameters(List<LinkedNodeBuilder> value) {
+    assert(kind == idl.LinkedNodeKind.typeParameterList);
+    _variantField_2 = value;
+  }
+
+  set variableDeclarationList_variables(List<LinkedNodeBuilder> value) {
+    assert(kind == idl.LinkedNodeKind.variableDeclarationList);
+    _variantField_2 = value;
+  }
+
+  set withClause_mixinTypes(List<LinkedNodeBuilder> value) {
+    assert(kind == idl.LinkedNodeKind.withClause);
+    _variantField_2 = value;
+  }
+
+  @override
+  LinkedNodeBuilder get annotatedNode_comment {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.constructorDeclaration ||
+        kind == idl.LinkedNodeKind.declaredIdentifier ||
+        kind == idl.LinkedNodeKind.enumDeclaration ||
+        kind == idl.LinkedNodeKind.enumConstantDeclaration ||
+        kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.fieldDeclaration ||
+        kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.genericTypeAlias ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.libraryDirective ||
+        kind == idl.LinkedNodeKind.methodDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration ||
+        kind == idl.LinkedNodeKind.partDirective ||
+        kind == idl.LinkedNodeKind.partOfDirective ||
+        kind == idl.LinkedNodeKind.topLevelVariableDeclaration ||
+        kind == idl.LinkedNodeKind.typeParameter ||
+        kind == idl.LinkedNodeKind.variableDeclaration ||
+        kind == idl.LinkedNodeKind.variableDeclarationList);
+    return _variantField_11;
+  }
+
+  set annotatedNode_comment(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.constructorDeclaration ||
+        kind == idl.LinkedNodeKind.declaredIdentifier ||
+        kind == idl.LinkedNodeKind.enumDeclaration ||
+        kind == idl.LinkedNodeKind.enumConstantDeclaration ||
+        kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.fieldDeclaration ||
+        kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.genericTypeAlias ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.libraryDirective ||
+        kind == idl.LinkedNodeKind.methodDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration ||
+        kind == idl.LinkedNodeKind.partDirective ||
+        kind == idl.LinkedNodeKind.partOfDirective ||
+        kind == idl.LinkedNodeKind.topLevelVariableDeclaration ||
+        kind == idl.LinkedNodeKind.typeParameter ||
+        kind == idl.LinkedNodeKind.variableDeclaration ||
+        kind == idl.LinkedNodeKind.variableDeclarationList);
+    _variantField_11 = value;
+  }
+
+  @override
+  List<LinkedNodeBuilder> get annotatedNode_metadata {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.constructorDeclaration ||
+        kind == idl.LinkedNodeKind.declaredIdentifier ||
+        kind == idl.LinkedNodeKind.enumDeclaration ||
+        kind == idl.LinkedNodeKind.enumConstantDeclaration ||
+        kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.fieldDeclaration ||
+        kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.genericTypeAlias ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.libraryDirective ||
+        kind == idl.LinkedNodeKind.methodDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration ||
+        kind == idl.LinkedNodeKind.partDirective ||
+        kind == idl.LinkedNodeKind.partOfDirective ||
+        kind == idl.LinkedNodeKind.topLevelVariableDeclaration ||
+        kind == idl.LinkedNodeKind.typeParameter ||
+        kind == idl.LinkedNodeKind.variableDeclaration ||
+        kind == idl.LinkedNodeKind.variableDeclarationList);
+    return _variantField_4 ??= <LinkedNodeBuilder>[];
+  }
+
+  @override
+  List<LinkedNodeBuilder> get normalFormalParameter_metadata {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter);
+    return _variantField_4 ??= <LinkedNodeBuilder>[];
+  }
+
+  @override
+  List<LinkedNodeBuilder> get switchMember_statements {
+    assert(kind == idl.LinkedNodeKind.switchCase ||
+        kind == idl.LinkedNodeKind.switchDefault);
+    return _variantField_4 ??= <LinkedNodeBuilder>[];
+  }
+
+  set annotatedNode_metadata(List<LinkedNodeBuilder> value) {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.constructorDeclaration ||
+        kind == idl.LinkedNodeKind.declaredIdentifier ||
+        kind == idl.LinkedNodeKind.enumDeclaration ||
+        kind == idl.LinkedNodeKind.enumConstantDeclaration ||
+        kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.fieldDeclaration ||
+        kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.genericTypeAlias ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.libraryDirective ||
+        kind == idl.LinkedNodeKind.methodDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration ||
+        kind == idl.LinkedNodeKind.partDirective ||
+        kind == idl.LinkedNodeKind.partOfDirective ||
+        kind == idl.LinkedNodeKind.topLevelVariableDeclaration ||
+        kind == idl.LinkedNodeKind.typeParameter ||
+        kind == idl.LinkedNodeKind.variableDeclaration ||
+        kind == idl.LinkedNodeKind.variableDeclarationList);
+    _variantField_4 = value;
+  }
+
+  set normalFormalParameter_metadata(List<LinkedNodeBuilder> value) {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter);
+    _variantField_4 = value;
+  }
+
+  set switchMember_statements(List<LinkedNodeBuilder> value) {
+    assert(kind == idl.LinkedNodeKind.switchCase ||
+        kind == idl.LinkedNodeKind.switchDefault);
+    _variantField_4 = value;
+  }
+
+  @override
+  LinkedNodeBuilder get annotation_arguments {
+    assert(kind == idl.LinkedNodeKind.annotation);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get asExpression_expression {
+    assert(kind == idl.LinkedNodeKind.asExpression);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get assertInitializer_condition {
+    assert(kind == idl.LinkedNodeKind.assertInitializer);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get assertStatement_condition {
+    assert(kind == idl.LinkedNodeKind.assertStatement);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get assignmentExpression_leftHandSide {
+    assert(kind == idl.LinkedNodeKind.assignmentExpression);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get awaitExpression_expression {
+    assert(kind == idl.LinkedNodeKind.awaitExpression);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get binaryExpression_leftOperand {
+    assert(kind == idl.LinkedNodeKind.binaryExpression);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get blockFunctionBody_block {
+    assert(kind == idl.LinkedNodeKind.blockFunctionBody);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get breakStatement_label {
+    assert(kind == idl.LinkedNodeKind.breakStatement);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get cascadeExpression_target {
+    assert(kind == idl.LinkedNodeKind.cascadeExpression);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get catchClause_body {
+    assert(kind == idl.LinkedNodeKind.catchClause);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get classDeclaration_extendsClause {
+    assert(kind == idl.LinkedNodeKind.classDeclaration);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get classTypeAlias_typeParameters {
+    assert(kind == idl.LinkedNodeKind.classTypeAlias);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get compilationUnit_scriptTag {
+    assert(kind == idl.LinkedNodeKind.compilationUnit);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get conditionalExpression_condition {
+    assert(kind == idl.LinkedNodeKind.conditionalExpression);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get configuration_name {
+    assert(kind == idl.LinkedNodeKind.configuration);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get constructorDeclaration_body {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get constructorFieldInitializer_expression {
+    assert(kind == idl.LinkedNodeKind.constructorFieldInitializer);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get constructorName_name {
+    assert(kind == idl.LinkedNodeKind.constructorName);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get continueStatement_label {
+    assert(kind == idl.LinkedNodeKind.continueStatement);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get declaredIdentifier_identifier {
+    assert(kind == idl.LinkedNodeKind.declaredIdentifier);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get defaultFormalParameter_defaultValue {
+    assert(kind == idl.LinkedNodeKind.defaultFormalParameter);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get doStatement_body {
+    assert(kind == idl.LinkedNodeKind.doStatement);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get enumConstantDeclaration_name {
+    assert(kind == idl.LinkedNodeKind.enumConstantDeclaration);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get expressionFunctionBody_expression {
+    assert(kind == idl.LinkedNodeKind.expressionFunctionBody);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get expressionStatement_expression {
+    assert(kind == idl.LinkedNodeKind.expressionStatement);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get extendsClause_superclass {
+    assert(kind == idl.LinkedNodeKind.extendsClause);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get fieldDeclaration_fields {
+    assert(kind == idl.LinkedNodeKind.fieldDeclaration);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get fieldFormalParameter_type {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get forEachParts_iterable {
+    assert(kind == idl.LinkedNodeKind.forEachPartsWithDeclaration ||
+        kind == idl.LinkedNodeKind.forEachPartsWithIdentifier);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get forMixin_forLoopParts {
+    assert(kind == idl.LinkedNodeKind.forElement ||
+        kind == idl.LinkedNodeKind.forStatement);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get forParts_condition {
+    assert(kind == idl.LinkedNodeKind.forPartsWithDeclarations ||
+        kind == idl.LinkedNodeKind.forPartsWithExpression);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get functionDeclaration_functionExpression {
+    assert(kind == idl.LinkedNodeKind.functionDeclaration);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get functionDeclarationStatement_functionDeclaration {
+    assert(kind == idl.LinkedNodeKind.functionDeclarationStatement);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get functionExpression_body {
+    assert(kind == idl.LinkedNodeKind.functionExpression);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get functionExpressionInvocation_function {
+    assert(kind == idl.LinkedNodeKind.functionExpressionInvocation);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get functionTypeAlias_formalParameters {
+    assert(kind == idl.LinkedNodeKind.functionTypeAlias);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get functionTypedFormalParameter_formalParameters {
+    assert(kind == idl.LinkedNodeKind.functionTypedFormalParameter);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get genericFunctionType_typeParameters {
+    assert(kind == idl.LinkedNodeKind.genericFunctionType);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get genericTypeAlias_typeParameters {
+    assert(kind == idl.LinkedNodeKind.genericTypeAlias);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get ifMixin_condition {
+    assert(kind == idl.LinkedNodeKind.ifElement ||
+        kind == idl.LinkedNodeKind.ifStatement);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get importDirective_prefix {
+    assert(kind == idl.LinkedNodeKind.importDirective);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get indexExpression_index {
+    assert(kind == idl.LinkedNodeKind.indexExpression);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get instanceCreationExpression_arguments {
+    assert(kind == idl.LinkedNodeKind.instanceCreationExpression);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get interpolationExpression_expression {
+    assert(kind == idl.LinkedNodeKind.interpolationExpression);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get isExpression_expression {
+    assert(kind == idl.LinkedNodeKind.isExpression);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get label_label {
+    assert(kind == idl.LinkedNodeKind.label);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get labeledStatement_statement {
+    assert(kind == idl.LinkedNodeKind.labeledStatement);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get libraryDirective_name {
+    assert(kind == idl.LinkedNodeKind.libraryDirective);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get mapLiteralEntry_key {
+    assert(kind == idl.LinkedNodeKind.mapLiteralEntry);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get methodDeclaration_body {
+    assert(kind == idl.LinkedNodeKind.methodDeclaration);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get methodInvocation_methodName {
+    assert(kind == idl.LinkedNodeKind.methodInvocation);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get mixinDeclaration_onClause {
+    assert(kind == idl.LinkedNodeKind.mixinDeclaration);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get namedExpression_expression {
+    assert(kind == idl.LinkedNodeKind.namedExpression);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get nativeClause_name {
+    assert(kind == idl.LinkedNodeKind.nativeClause);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get nativeFunctionBody_stringLiteral {
+    assert(kind == idl.LinkedNodeKind.nativeFunctionBody);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get parenthesizedExpression_expression {
+    assert(kind == idl.LinkedNodeKind.parenthesizedExpression);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get partOfDirective_libraryName {
+    assert(kind == idl.LinkedNodeKind.partOfDirective);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get postfixExpression_operand {
+    assert(kind == idl.LinkedNodeKind.postfixExpression);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get prefixedIdentifier_identifier {
+    assert(kind == idl.LinkedNodeKind.prefixedIdentifier);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get prefixExpression_operand {
+    assert(kind == idl.LinkedNodeKind.prefixExpression);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get propertyAccess_propertyName {
+    assert(kind == idl.LinkedNodeKind.propertyAccess);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get redirectingConstructorInvocation_arguments {
+    assert(kind == idl.LinkedNodeKind.redirectingConstructorInvocation);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get returnStatement_expression {
+    assert(kind == idl.LinkedNodeKind.returnStatement);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get simpleFormalParameter_type {
+    assert(kind == idl.LinkedNodeKind.simpleFormalParameter);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get spreadElement_expression {
+    assert(kind == idl.LinkedNodeKind.spreadElement);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get superConstructorInvocation_arguments {
+    assert(kind == idl.LinkedNodeKind.superConstructorInvocation);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get switchCase_expression {
+    assert(kind == idl.LinkedNodeKind.switchCase);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get throwExpression_expression {
+    assert(kind == idl.LinkedNodeKind.throwExpression);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get topLevelVariableDeclaration_variableList {
+    assert(kind == idl.LinkedNodeKind.topLevelVariableDeclaration);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get tryStatement_body {
+    assert(kind == idl.LinkedNodeKind.tryStatement);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get typeName_name {
+    assert(kind == idl.LinkedNodeKind.typeName);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get typeParameter_bound {
+    assert(kind == idl.LinkedNodeKind.typeParameter);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get variableDeclaration_initializer {
+    assert(kind == idl.LinkedNodeKind.variableDeclaration);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get variableDeclarationList_type {
+    assert(kind == idl.LinkedNodeKind.variableDeclarationList);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get variableDeclarationStatement_variables {
+    assert(kind == idl.LinkedNodeKind.variableDeclarationStatement);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get whileStatement_body {
+    assert(kind == idl.LinkedNodeKind.whileStatement);
+    return _variantField_6;
+  }
+
+  @override
+  LinkedNodeBuilder get yieldStatement_expression {
+    assert(kind == idl.LinkedNodeKind.yieldStatement);
+    return _variantField_6;
+  }
+
+  set annotation_arguments(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.annotation);
+    _variantField_6 = value;
+  }
+
+  set asExpression_expression(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.asExpression);
+    _variantField_6 = value;
+  }
+
+  set assertInitializer_condition(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.assertInitializer);
+    _variantField_6 = value;
+  }
+
+  set assertStatement_condition(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.assertStatement);
+    _variantField_6 = value;
+  }
+
+  set assignmentExpression_leftHandSide(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.assignmentExpression);
+    _variantField_6 = value;
+  }
+
+  set awaitExpression_expression(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.awaitExpression);
+    _variantField_6 = value;
+  }
+
+  set binaryExpression_leftOperand(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.binaryExpression);
+    _variantField_6 = value;
+  }
+
+  set blockFunctionBody_block(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.blockFunctionBody);
+    _variantField_6 = value;
+  }
+
+  set breakStatement_label(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.breakStatement);
+    _variantField_6 = value;
+  }
+
+  set cascadeExpression_target(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.cascadeExpression);
+    _variantField_6 = value;
+  }
+
+  set catchClause_body(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.catchClause);
+    _variantField_6 = value;
+  }
+
+  set classDeclaration_extendsClause(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.classDeclaration);
+    _variantField_6 = value;
+  }
+
+  set classTypeAlias_typeParameters(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.classTypeAlias);
+    _variantField_6 = value;
+  }
+
+  set compilationUnit_scriptTag(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.compilationUnit);
+    _variantField_6 = value;
+  }
+
+  set conditionalExpression_condition(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.conditionalExpression);
+    _variantField_6 = value;
+  }
+
+  set configuration_name(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.configuration);
+    _variantField_6 = value;
+  }
+
+  set constructorDeclaration_body(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    _variantField_6 = value;
+  }
+
+  set constructorFieldInitializer_expression(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.constructorFieldInitializer);
+    _variantField_6 = value;
+  }
+
+  set constructorName_name(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.constructorName);
+    _variantField_6 = value;
+  }
+
+  set continueStatement_label(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.continueStatement);
+    _variantField_6 = value;
+  }
+
+  set declaredIdentifier_identifier(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.declaredIdentifier);
+    _variantField_6 = value;
+  }
+
+  set defaultFormalParameter_defaultValue(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.defaultFormalParameter);
+    _variantField_6 = value;
+  }
+
+  set doStatement_body(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.doStatement);
+    _variantField_6 = value;
+  }
+
+  set enumConstantDeclaration_name(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.enumConstantDeclaration);
+    _variantField_6 = value;
+  }
+
+  set expressionFunctionBody_expression(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.expressionFunctionBody);
+    _variantField_6 = value;
+  }
+
+  set expressionStatement_expression(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.expressionStatement);
+    _variantField_6 = value;
+  }
+
+  set extendsClause_superclass(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.extendsClause);
+    _variantField_6 = value;
+  }
+
+  set fieldDeclaration_fields(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.fieldDeclaration);
+    _variantField_6 = value;
+  }
+
+  set fieldFormalParameter_type(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter);
+    _variantField_6 = value;
+  }
+
+  set forEachParts_iterable(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.forEachPartsWithDeclaration ||
+        kind == idl.LinkedNodeKind.forEachPartsWithIdentifier);
+    _variantField_6 = value;
+  }
+
+  set forMixin_forLoopParts(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.forElement ||
+        kind == idl.LinkedNodeKind.forStatement);
+    _variantField_6 = value;
+  }
+
+  set forParts_condition(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.forPartsWithDeclarations ||
+        kind == idl.LinkedNodeKind.forPartsWithExpression);
+    _variantField_6 = value;
+  }
+
+  set functionDeclaration_functionExpression(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.functionDeclaration);
+    _variantField_6 = value;
+  }
+
+  set functionDeclarationStatement_functionDeclaration(
+      LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.functionDeclarationStatement);
+    _variantField_6 = value;
+  }
+
+  set functionExpression_body(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.functionExpression);
+    _variantField_6 = value;
+  }
+
+  set functionExpressionInvocation_function(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.functionExpressionInvocation);
+    _variantField_6 = value;
+  }
+
+  set functionTypeAlias_formalParameters(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.functionTypeAlias);
+    _variantField_6 = value;
+  }
+
+  set functionTypedFormalParameter_formalParameters(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.functionTypedFormalParameter);
+    _variantField_6 = value;
+  }
+
+  set genericFunctionType_typeParameters(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.genericFunctionType);
+    _variantField_6 = value;
+  }
+
+  set genericTypeAlias_typeParameters(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.genericTypeAlias);
+    _variantField_6 = value;
+  }
+
+  set ifMixin_condition(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.ifElement ||
+        kind == idl.LinkedNodeKind.ifStatement);
+    _variantField_6 = value;
+  }
+
+  set importDirective_prefix(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.importDirective);
+    _variantField_6 = value;
+  }
+
+  set indexExpression_index(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.indexExpression);
+    _variantField_6 = value;
+  }
+
+  set instanceCreationExpression_arguments(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.instanceCreationExpression);
+    _variantField_6 = value;
+  }
+
+  set interpolationExpression_expression(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.interpolationExpression);
+    _variantField_6 = value;
+  }
+
+  set isExpression_expression(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.isExpression);
+    _variantField_6 = value;
+  }
+
+  set label_label(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.label);
+    _variantField_6 = value;
+  }
+
+  set labeledStatement_statement(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.labeledStatement);
+    _variantField_6 = value;
+  }
+
+  set libraryDirective_name(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.libraryDirective);
+    _variantField_6 = value;
+  }
+
+  set mapLiteralEntry_key(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.mapLiteralEntry);
+    _variantField_6 = value;
+  }
+
+  set methodDeclaration_body(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.methodDeclaration);
+    _variantField_6 = value;
+  }
+
+  set methodInvocation_methodName(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.methodInvocation);
+    _variantField_6 = value;
+  }
+
+  set mixinDeclaration_onClause(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.mixinDeclaration);
+    _variantField_6 = value;
+  }
+
+  set namedExpression_expression(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.namedExpression);
+    _variantField_6 = value;
+  }
+
+  set nativeClause_name(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.nativeClause);
+    _variantField_6 = value;
+  }
+
+  set nativeFunctionBody_stringLiteral(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.nativeFunctionBody);
+    _variantField_6 = value;
+  }
+
+  set parenthesizedExpression_expression(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.parenthesizedExpression);
+    _variantField_6 = value;
+  }
+
+  set partOfDirective_libraryName(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.partOfDirective);
+    _variantField_6 = value;
+  }
+
+  set postfixExpression_operand(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.postfixExpression);
+    _variantField_6 = value;
+  }
+
+  set prefixedIdentifier_identifier(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.prefixedIdentifier);
+    _variantField_6 = value;
+  }
+
+  set prefixExpression_operand(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.prefixExpression);
+    _variantField_6 = value;
+  }
+
+  set propertyAccess_propertyName(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.propertyAccess);
+    _variantField_6 = value;
+  }
+
+  set redirectingConstructorInvocation_arguments(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.redirectingConstructorInvocation);
+    _variantField_6 = value;
+  }
+
+  set returnStatement_expression(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.returnStatement);
+    _variantField_6 = value;
+  }
+
+  set simpleFormalParameter_type(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.simpleFormalParameter);
+    _variantField_6 = value;
+  }
+
+  set spreadElement_expression(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.spreadElement);
+    _variantField_6 = value;
+  }
+
+  set superConstructorInvocation_arguments(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.superConstructorInvocation);
+    _variantField_6 = value;
+  }
+
+  set switchCase_expression(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.switchCase);
+    _variantField_6 = value;
+  }
+
+  set throwExpression_expression(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.throwExpression);
+    _variantField_6 = value;
+  }
+
+  set topLevelVariableDeclaration_variableList(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.topLevelVariableDeclaration);
+    _variantField_6 = value;
+  }
+
+  set tryStatement_body(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.tryStatement);
+    _variantField_6 = value;
+  }
+
+  set typeName_name(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.typeName);
+    _variantField_6 = value;
+  }
+
+  set typeParameter_bound(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.typeParameter);
+    _variantField_6 = value;
+  }
+
+  set variableDeclaration_initializer(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.variableDeclaration);
+    _variantField_6 = value;
+  }
+
+  set variableDeclarationList_type(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.variableDeclarationList);
+    _variantField_6 = value;
+  }
+
+  set variableDeclarationStatement_variables(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.variableDeclarationStatement);
+    _variantField_6 = value;
+  }
+
+  set whileStatement_body(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.whileStatement);
+    _variantField_6 = value;
+  }
+
+  set yieldStatement_expression(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.yieldStatement);
+    _variantField_6 = value;
+  }
+
+  @override
+  int get annotation_atSign {
+    assert(kind == idl.LinkedNodeKind.annotation);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get argumentList_leftParenthesis {
+    assert(kind == idl.LinkedNodeKind.argumentList);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get asExpression_asOperator {
+    assert(kind == idl.LinkedNodeKind.asExpression);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get assertInitializer_assertKeyword {
+    assert(kind == idl.LinkedNodeKind.assertInitializer);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get assertStatement_assertKeyword {
+    assert(kind == idl.LinkedNodeKind.assertStatement);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get assignmentExpression_element {
+    assert(kind == idl.LinkedNodeKind.assignmentExpression);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get awaitExpression_awaitKeyword {
+    assert(kind == idl.LinkedNodeKind.awaitExpression);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get binaryExpression_element {
+    assert(kind == idl.LinkedNodeKind.binaryExpression);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get block_leftBracket {
+    assert(kind == idl.LinkedNodeKind.block);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get blockFunctionBody_keyword {
+    assert(kind == idl.LinkedNodeKind.blockFunctionBody);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get booleanLiteral_literal {
+    assert(kind == idl.LinkedNodeKind.booleanLiteral);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get breakStatement_breakKeyword {
+    assert(kind == idl.LinkedNodeKind.breakStatement);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get catchClause_catchKeyword {
+    assert(kind == idl.LinkedNodeKind.catchClause);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get classDeclaration_abstractKeyword {
+    assert(kind == idl.LinkedNodeKind.classDeclaration);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get classTypeAlias_abstractKeyword {
+    assert(kind == idl.LinkedNodeKind.classTypeAlias);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get compilationUnit_beginToken {
+    assert(kind == idl.LinkedNodeKind.compilationUnit);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get conditionalExpression_colon {
+    assert(kind == idl.LinkedNodeKind.conditionalExpression);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get configuration_ifKeyword {
+    assert(kind == idl.LinkedNodeKind.configuration);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get constructorDeclaration_constKeyword {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get constructorFieldInitializer_equals {
+    assert(kind == idl.LinkedNodeKind.constructorFieldInitializer);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get constructorName_element {
+    assert(kind == idl.LinkedNodeKind.constructorName);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get continueStatement_continueKeyword {
+    assert(kind == idl.LinkedNodeKind.continueStatement);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get declaredIdentifier_keyword {
+    assert(kind == idl.LinkedNodeKind.declaredIdentifier);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get defaultFormalParameter_separator {
+    assert(kind == idl.LinkedNodeKind.defaultFormalParameter);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get doStatement_leftParenthesis {
+    assert(kind == idl.LinkedNodeKind.doStatement);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get doubleLiteral_literal {
+    assert(kind == idl.LinkedNodeKind.doubleLiteral);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get emptyFunctionBody_semicolon {
+    assert(kind == idl.LinkedNodeKind.emptyFunctionBody);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get emptyStatement_semicolon {
+    assert(kind == idl.LinkedNodeKind.emptyStatement);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get enumDeclaration_enumKeyword {
+    assert(kind == idl.LinkedNodeKind.enumDeclaration);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get expressionFunctionBody_arrow {
+    assert(kind == idl.LinkedNodeKind.expressionFunctionBody);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get expressionStatement_semicolon {
+    assert(kind == idl.LinkedNodeKind.expressionStatement);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get extendsClause_extendsKeyword {
+    assert(kind == idl.LinkedNodeKind.extendsClause);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get fieldDeclaration_covariantKeyword {
+    assert(kind == idl.LinkedNodeKind.fieldDeclaration);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get fieldFormalParameter_keyword {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get forEachParts_inKeyword {
+    assert(kind == idl.LinkedNodeKind.forEachPartsWithDeclaration ||
+        kind == idl.LinkedNodeKind.forEachPartsWithIdentifier);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get formalParameterList_leftDelimiter {
+    assert(kind == idl.LinkedNodeKind.formalParameterList);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get forMixin_awaitKeyword {
+    assert(kind == idl.LinkedNodeKind.forElement ||
+        kind == idl.LinkedNodeKind.forStatement);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get forParts_leftSeparator {
+    assert(kind == idl.LinkedNodeKind.forPartsWithDeclarations ||
+        kind == idl.LinkedNodeKind.forPartsWithExpression);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get functionDeclaration_externalKeyword {
+    assert(kind == idl.LinkedNodeKind.functionDeclaration);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get genericFunctionType_functionKeyword {
+    assert(kind == idl.LinkedNodeKind.genericFunctionType);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get ifMixin_elseKeyword {
+    assert(kind == idl.LinkedNodeKind.ifElement ||
+        kind == idl.LinkedNodeKind.ifStatement);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get implementsClause_implementsKeyword {
+    assert(kind == idl.LinkedNodeKind.implementsClause);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get importDirective_asKeyword {
+    assert(kind == idl.LinkedNodeKind.importDirective);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get indexExpression_element {
+    assert(kind == idl.LinkedNodeKind.indexExpression);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get instanceCreationExpression_keyword {
+    assert(kind == idl.LinkedNodeKind.instanceCreationExpression);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get integerLiteral_literal {
+    assert(kind == idl.LinkedNodeKind.integerLiteral);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get interpolationExpression_leftBracket {
+    assert(kind == idl.LinkedNodeKind.interpolationExpression);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get interpolationString_token {
+    assert(kind == idl.LinkedNodeKind.interpolationString);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get isExpression_isOperator {
+    assert(kind == idl.LinkedNodeKind.isExpression);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get label_colon {
+    assert(kind == idl.LinkedNodeKind.label);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get listLiteral_leftBracket {
+    assert(kind == idl.LinkedNodeKind.listLiteral);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get mapLiteralEntry_separator {
+    assert(kind == idl.LinkedNodeKind.mapLiteralEntry);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get methodDeclaration_externalKeyword {
+    assert(kind == idl.LinkedNodeKind.methodDeclaration);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get methodInvocation_operator {
+    assert(kind == idl.LinkedNodeKind.methodInvocation);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get mixinDeclaration_mixinKeyword {
+    assert(kind == idl.LinkedNodeKind.mixinDeclaration);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get nativeClause_nativeKeyword {
+    assert(kind == idl.LinkedNodeKind.nativeClause);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get nativeFunctionBody_nativeKeyword {
+    assert(kind == idl.LinkedNodeKind.nativeFunctionBody);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get nullLiteral_literal {
+    assert(kind == idl.LinkedNodeKind.nullLiteral);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get onClause_onKeyword {
+    assert(kind == idl.LinkedNodeKind.onClause);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get parenthesizedExpression_leftParenthesis {
+    assert(kind == idl.LinkedNodeKind.parenthesizedExpression);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get postfixExpression_element {
+    assert(kind == idl.LinkedNodeKind.postfixExpression);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get prefixedIdentifier_period {
+    assert(kind == idl.LinkedNodeKind.prefixedIdentifier);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get prefixExpression_element {
+    assert(kind == idl.LinkedNodeKind.prefixExpression);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get propertyAccess_operator {
+    assert(kind == idl.LinkedNodeKind.propertyAccess);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get redirectingConstructorInvocation_element {
+    assert(kind == idl.LinkedNodeKind.redirectingConstructorInvocation);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get rethrowExpression_rethrowKeyword {
+    assert(kind == idl.LinkedNodeKind.rethrowExpression);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get returnStatement_returnKeyword {
+    assert(kind == idl.LinkedNodeKind.returnStatement);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get scriptTag_scriptTag {
+    assert(kind == idl.LinkedNodeKind.scriptTag);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get setOrMapLiteral_leftBracket {
+    assert(kind == idl.LinkedNodeKind.setOrMapLiteral);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get simpleFormalParameter_keyword {
+    assert(kind == idl.LinkedNodeKind.simpleFormalParameter);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get simpleIdentifier_element {
+    assert(kind == idl.LinkedNodeKind.simpleIdentifier);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get simpleStringLiteral_token {
+    assert(kind == idl.LinkedNodeKind.simpleStringLiteral);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get spreadElement_spreadOperator {
+    assert(kind == idl.LinkedNodeKind.spreadElement);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get superConstructorInvocation_element {
+    assert(kind == idl.LinkedNodeKind.superConstructorInvocation);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get superExpression_superKeyword {
+    assert(kind == idl.LinkedNodeKind.superExpression);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get switchMember_keyword {
+    assert(kind == idl.LinkedNodeKind.switchCase ||
+        kind == idl.LinkedNodeKind.switchDefault);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get switchStatement_leftParenthesis {
+    assert(kind == idl.LinkedNodeKind.switchStatement);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get symbolLiteral_poundSign {
+    assert(kind == idl.LinkedNodeKind.symbolLiteral);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get thisExpression_thisKeyword {
+    assert(kind == idl.LinkedNodeKind.thisExpression);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get throwExpression_throwKeyword {
+    assert(kind == idl.LinkedNodeKind.throwExpression);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get topLevelVariableDeclaration_semicolon {
+    assert(kind == idl.LinkedNodeKind.topLevelVariableDeclaration);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get tryStatement_finallyKeyword {
+    assert(kind == idl.LinkedNodeKind.tryStatement);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get typeArgumentList_leftBracket {
+    assert(kind == idl.LinkedNodeKind.typeArgumentList);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get typeName_question {
+    assert(kind == idl.LinkedNodeKind.typeName);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get typeParameter_extendsKeyword {
+    assert(kind == idl.LinkedNodeKind.typeParameter);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get typeParameterList_leftBracket {
+    assert(kind == idl.LinkedNodeKind.typeParameterList);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get variableDeclaration_equals {
+    assert(kind == idl.LinkedNodeKind.variableDeclaration);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get variableDeclarationList_keyword {
+    assert(kind == idl.LinkedNodeKind.variableDeclarationList);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get variableDeclarationStatement_semicolon {
+    assert(kind == idl.LinkedNodeKind.variableDeclarationStatement);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get whileStatement_leftParenthesis {
+    assert(kind == idl.LinkedNodeKind.whileStatement);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get withClause_withKeyword {
+    assert(kind == idl.LinkedNodeKind.withClause);
+    return _variantField_15 ??= 0;
+  }
+
+  @override
+  int get yieldStatement_yieldKeyword {
+    assert(kind == idl.LinkedNodeKind.yieldStatement);
+    return _variantField_15 ??= 0;
+  }
+
+  set annotation_atSign(int value) {
+    assert(kind == idl.LinkedNodeKind.annotation);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set argumentList_leftParenthesis(int value) {
+    assert(kind == idl.LinkedNodeKind.argumentList);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set asExpression_asOperator(int value) {
+    assert(kind == idl.LinkedNodeKind.asExpression);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set assertInitializer_assertKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.assertInitializer);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set assertStatement_assertKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.assertStatement);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set assignmentExpression_element(int value) {
+    assert(kind == idl.LinkedNodeKind.assignmentExpression);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set awaitExpression_awaitKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.awaitExpression);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set binaryExpression_element(int value) {
+    assert(kind == idl.LinkedNodeKind.binaryExpression);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set block_leftBracket(int value) {
+    assert(kind == idl.LinkedNodeKind.block);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set blockFunctionBody_keyword(int value) {
+    assert(kind == idl.LinkedNodeKind.blockFunctionBody);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set booleanLiteral_literal(int value) {
+    assert(kind == idl.LinkedNodeKind.booleanLiteral);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set breakStatement_breakKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.breakStatement);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set catchClause_catchKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.catchClause);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set classDeclaration_abstractKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.classDeclaration);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set classTypeAlias_abstractKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.classTypeAlias);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set compilationUnit_beginToken(int value) {
+    assert(kind == idl.LinkedNodeKind.compilationUnit);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set conditionalExpression_colon(int value) {
+    assert(kind == idl.LinkedNodeKind.conditionalExpression);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set configuration_ifKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.configuration);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set constructorDeclaration_constKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set constructorFieldInitializer_equals(int value) {
+    assert(kind == idl.LinkedNodeKind.constructorFieldInitializer);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set constructorName_element(int value) {
+    assert(kind == idl.LinkedNodeKind.constructorName);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set continueStatement_continueKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.continueStatement);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set declaredIdentifier_keyword(int value) {
+    assert(kind == idl.LinkedNodeKind.declaredIdentifier);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set defaultFormalParameter_separator(int value) {
+    assert(kind == idl.LinkedNodeKind.defaultFormalParameter);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set doStatement_leftParenthesis(int value) {
+    assert(kind == idl.LinkedNodeKind.doStatement);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set doubleLiteral_literal(int value) {
+    assert(kind == idl.LinkedNodeKind.doubleLiteral);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set emptyFunctionBody_semicolon(int value) {
+    assert(kind == idl.LinkedNodeKind.emptyFunctionBody);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set emptyStatement_semicolon(int value) {
+    assert(kind == idl.LinkedNodeKind.emptyStatement);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set enumDeclaration_enumKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.enumDeclaration);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set expressionFunctionBody_arrow(int value) {
+    assert(kind == idl.LinkedNodeKind.expressionFunctionBody);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set expressionStatement_semicolon(int value) {
+    assert(kind == idl.LinkedNodeKind.expressionStatement);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set extendsClause_extendsKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.extendsClause);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set fieldDeclaration_covariantKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.fieldDeclaration);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set fieldFormalParameter_keyword(int value) {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set forEachParts_inKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.forEachPartsWithDeclaration ||
+        kind == idl.LinkedNodeKind.forEachPartsWithIdentifier);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set formalParameterList_leftDelimiter(int value) {
+    assert(kind == idl.LinkedNodeKind.formalParameterList);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set forMixin_awaitKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.forElement ||
+        kind == idl.LinkedNodeKind.forStatement);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set forParts_leftSeparator(int value) {
+    assert(kind == idl.LinkedNodeKind.forPartsWithDeclarations ||
+        kind == idl.LinkedNodeKind.forPartsWithExpression);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set functionDeclaration_externalKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.functionDeclaration);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set genericFunctionType_functionKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.genericFunctionType);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set ifMixin_elseKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.ifElement ||
+        kind == idl.LinkedNodeKind.ifStatement);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set implementsClause_implementsKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.implementsClause);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set importDirective_asKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.importDirective);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set indexExpression_element(int value) {
+    assert(kind == idl.LinkedNodeKind.indexExpression);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set instanceCreationExpression_keyword(int value) {
+    assert(kind == idl.LinkedNodeKind.instanceCreationExpression);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set integerLiteral_literal(int value) {
+    assert(kind == idl.LinkedNodeKind.integerLiteral);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set interpolationExpression_leftBracket(int value) {
+    assert(kind == idl.LinkedNodeKind.interpolationExpression);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set interpolationString_token(int value) {
+    assert(kind == idl.LinkedNodeKind.interpolationString);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set isExpression_isOperator(int value) {
+    assert(kind == idl.LinkedNodeKind.isExpression);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set label_colon(int value) {
+    assert(kind == idl.LinkedNodeKind.label);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set listLiteral_leftBracket(int value) {
+    assert(kind == idl.LinkedNodeKind.listLiteral);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set mapLiteralEntry_separator(int value) {
+    assert(kind == idl.LinkedNodeKind.mapLiteralEntry);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set methodDeclaration_externalKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.methodDeclaration);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set methodInvocation_operator(int value) {
+    assert(kind == idl.LinkedNodeKind.methodInvocation);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set mixinDeclaration_mixinKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.mixinDeclaration);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set nativeClause_nativeKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.nativeClause);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set nativeFunctionBody_nativeKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.nativeFunctionBody);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set nullLiteral_literal(int value) {
+    assert(kind == idl.LinkedNodeKind.nullLiteral);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set onClause_onKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.onClause);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set parenthesizedExpression_leftParenthesis(int value) {
+    assert(kind == idl.LinkedNodeKind.parenthesizedExpression);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set postfixExpression_element(int value) {
+    assert(kind == idl.LinkedNodeKind.postfixExpression);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set prefixedIdentifier_period(int value) {
+    assert(kind == idl.LinkedNodeKind.prefixedIdentifier);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set prefixExpression_element(int value) {
+    assert(kind == idl.LinkedNodeKind.prefixExpression);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set propertyAccess_operator(int value) {
+    assert(kind == idl.LinkedNodeKind.propertyAccess);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set redirectingConstructorInvocation_element(int value) {
+    assert(kind == idl.LinkedNodeKind.redirectingConstructorInvocation);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set rethrowExpression_rethrowKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.rethrowExpression);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set returnStatement_returnKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.returnStatement);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set scriptTag_scriptTag(int value) {
+    assert(kind == idl.LinkedNodeKind.scriptTag);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set setOrMapLiteral_leftBracket(int value) {
+    assert(kind == idl.LinkedNodeKind.setOrMapLiteral);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set simpleFormalParameter_keyword(int value) {
+    assert(kind == idl.LinkedNodeKind.simpleFormalParameter);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set simpleIdentifier_element(int value) {
+    assert(kind == idl.LinkedNodeKind.simpleIdentifier);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set simpleStringLiteral_token(int value) {
+    assert(kind == idl.LinkedNodeKind.simpleStringLiteral);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set spreadElement_spreadOperator(int value) {
+    assert(kind == idl.LinkedNodeKind.spreadElement);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set superConstructorInvocation_element(int value) {
+    assert(kind == idl.LinkedNodeKind.superConstructorInvocation);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set superExpression_superKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.superExpression);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set switchMember_keyword(int value) {
+    assert(kind == idl.LinkedNodeKind.switchCase ||
+        kind == idl.LinkedNodeKind.switchDefault);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set switchStatement_leftParenthesis(int value) {
+    assert(kind == idl.LinkedNodeKind.switchStatement);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set symbolLiteral_poundSign(int value) {
+    assert(kind == idl.LinkedNodeKind.symbolLiteral);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set thisExpression_thisKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.thisExpression);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set throwExpression_throwKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.throwExpression);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set topLevelVariableDeclaration_semicolon(int value) {
+    assert(kind == idl.LinkedNodeKind.topLevelVariableDeclaration);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set tryStatement_finallyKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.tryStatement);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set typeArgumentList_leftBracket(int value) {
+    assert(kind == idl.LinkedNodeKind.typeArgumentList);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set typeName_question(int value) {
+    assert(kind == idl.LinkedNodeKind.typeName);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set typeParameter_extendsKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.typeParameter);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set typeParameterList_leftBracket(int value) {
+    assert(kind == idl.LinkedNodeKind.typeParameterList);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set variableDeclaration_equals(int value) {
+    assert(kind == idl.LinkedNodeKind.variableDeclaration);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set variableDeclarationList_keyword(int value) {
+    assert(kind == idl.LinkedNodeKind.variableDeclarationList);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set variableDeclarationStatement_semicolon(int value) {
+    assert(kind == idl.LinkedNodeKind.variableDeclarationStatement);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set whileStatement_leftParenthesis(int value) {
+    assert(kind == idl.LinkedNodeKind.whileStatement);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set withClause_withKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.withClause);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  set yieldStatement_yieldKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.yieldStatement);
+    assert(value == null || value >= 0);
+    _variantField_15 = value;
+  }
+
+  @override
+  LinkedNodeBuilder get annotation_constructorName {
+    assert(kind == idl.LinkedNodeKind.annotation);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get asExpression_type {
+    assert(kind == idl.LinkedNodeKind.asExpression);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get assertInitializer_message {
+    assert(kind == idl.LinkedNodeKind.assertInitializer);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get assertStatement_message {
+    assert(kind == idl.LinkedNodeKind.assertStatement);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get assignmentExpression_rightHandSide {
+    assert(kind == idl.LinkedNodeKind.assignmentExpression);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get binaryExpression_rightOperand {
+    assert(kind == idl.LinkedNodeKind.binaryExpression);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get catchClause_exceptionParameter {
+    assert(kind == idl.LinkedNodeKind.catchClause);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get classDeclaration_withClause {
+    assert(kind == idl.LinkedNodeKind.classDeclaration);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get classTypeAlias_superclass {
+    assert(kind == idl.LinkedNodeKind.classTypeAlias);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get conditionalExpression_elseExpression {
+    assert(kind == idl.LinkedNodeKind.conditionalExpression);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get configuration_value {
+    assert(kind == idl.LinkedNodeKind.configuration);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get constructorDeclaration_name {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get constructorFieldInitializer_fieldName {
+    assert(kind == idl.LinkedNodeKind.constructorFieldInitializer);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get constructorName_type {
+    assert(kind == idl.LinkedNodeKind.constructorName);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get declaredIdentifier_type {
+    assert(kind == idl.LinkedNodeKind.declaredIdentifier);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get defaultFormalParameter_parameter {
+    assert(kind == idl.LinkedNodeKind.defaultFormalParameter);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get doStatement_condition {
+    assert(kind == idl.LinkedNodeKind.doStatement);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get fieldFormalParameter_typeParameters {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get forEachPartsWithDeclaration_loopVariable {
+    assert(kind == idl.LinkedNodeKind.forEachPartsWithDeclaration);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get forEachPartsWithIdentifier_identifier {
+    assert(kind == idl.LinkedNodeKind.forEachPartsWithIdentifier);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get forElement_body {
+    assert(kind == idl.LinkedNodeKind.forElement);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get forPartsWithDeclarations_variables {
+    assert(kind == idl.LinkedNodeKind.forPartsWithDeclarations);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get forPartsWithExpression_initialization {
+    assert(kind == idl.LinkedNodeKind.forPartsWithExpression);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get forStatement_body {
+    assert(kind == idl.LinkedNodeKind.forStatement);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get functionDeclaration_returnType {
+    assert(kind == idl.LinkedNodeKind.functionDeclaration);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get functionExpression_formalParameters {
+    assert(kind == idl.LinkedNodeKind.functionExpression);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get functionTypeAlias_returnType {
+    assert(kind == idl.LinkedNodeKind.functionTypeAlias);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get functionTypedFormalParameter_returnType {
+    assert(kind == idl.LinkedNodeKind.functionTypedFormalParameter);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get genericFunctionType_returnType {
+    assert(kind == idl.LinkedNodeKind.genericFunctionType);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get genericTypeAlias_functionType {
+    assert(kind == idl.LinkedNodeKind.genericTypeAlias);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get ifStatement_elseStatement {
+    assert(kind == idl.LinkedNodeKind.ifStatement);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get indexExpression_target {
+    assert(kind == idl.LinkedNodeKind.indexExpression);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get instanceCreationExpression_constructorName {
+    assert(kind == idl.LinkedNodeKind.instanceCreationExpression);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get isExpression_type {
+    assert(kind == idl.LinkedNodeKind.isExpression);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get mapLiteralEntry_value {
+    assert(kind == idl.LinkedNodeKind.mapLiteralEntry);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get methodDeclaration_formalParameters {
+    assert(kind == idl.LinkedNodeKind.methodDeclaration);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get methodInvocation_target {
+    assert(kind == idl.LinkedNodeKind.methodInvocation);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get namedExpression_name {
+    assert(kind == idl.LinkedNodeKind.namedExpression);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get partOfDirective_uri {
+    assert(kind == idl.LinkedNodeKind.partOfDirective);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get prefixedIdentifier_prefix {
+    assert(kind == idl.LinkedNodeKind.prefixedIdentifier);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get propertyAccess_target {
+    assert(kind == idl.LinkedNodeKind.propertyAccess);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get redirectingConstructorInvocation_constructorName {
+    assert(kind == idl.LinkedNodeKind.redirectingConstructorInvocation);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get superConstructorInvocation_constructorName {
+    assert(kind == idl.LinkedNodeKind.superConstructorInvocation);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get switchStatement_expression {
+    assert(kind == idl.LinkedNodeKind.switchStatement);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get tryStatement_finallyBlock {
+    assert(kind == idl.LinkedNodeKind.tryStatement);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get typeName_typeArguments {
+    assert(kind == idl.LinkedNodeKind.typeName);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get typeParameter_name {
+    assert(kind == idl.LinkedNodeKind.typeParameter);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get variableDeclaration_name {
+    assert(kind == idl.LinkedNodeKind.variableDeclaration);
+    return _variantField_7;
+  }
+
+  @override
+  LinkedNodeBuilder get whileStatement_condition {
+    assert(kind == idl.LinkedNodeKind.whileStatement);
+    return _variantField_7;
+  }
+
+  set annotation_constructorName(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.annotation);
+    _variantField_7 = value;
+  }
+
+  set asExpression_type(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.asExpression);
+    _variantField_7 = value;
+  }
+
+  set assertInitializer_message(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.assertInitializer);
+    _variantField_7 = value;
+  }
+
+  set assertStatement_message(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.assertStatement);
+    _variantField_7 = value;
+  }
+
+  set assignmentExpression_rightHandSide(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.assignmentExpression);
+    _variantField_7 = value;
+  }
+
+  set binaryExpression_rightOperand(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.binaryExpression);
+    _variantField_7 = value;
+  }
+
+  set catchClause_exceptionParameter(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.catchClause);
+    _variantField_7 = value;
+  }
+
+  set classDeclaration_withClause(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.classDeclaration);
+    _variantField_7 = value;
+  }
+
+  set classTypeAlias_superclass(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.classTypeAlias);
+    _variantField_7 = value;
+  }
+
+  set conditionalExpression_elseExpression(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.conditionalExpression);
+    _variantField_7 = value;
+  }
+
+  set configuration_value(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.configuration);
+    _variantField_7 = value;
+  }
+
+  set constructorDeclaration_name(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    _variantField_7 = value;
+  }
+
+  set constructorFieldInitializer_fieldName(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.constructorFieldInitializer);
+    _variantField_7 = value;
+  }
+
+  set constructorName_type(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.constructorName);
+    _variantField_7 = value;
+  }
+
+  set declaredIdentifier_type(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.declaredIdentifier);
+    _variantField_7 = value;
+  }
+
+  set defaultFormalParameter_parameter(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.defaultFormalParameter);
+    _variantField_7 = value;
+  }
+
+  set doStatement_condition(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.doStatement);
+    _variantField_7 = value;
+  }
+
+  set fieldFormalParameter_typeParameters(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter);
+    _variantField_7 = value;
+  }
+
+  set forEachPartsWithDeclaration_loopVariable(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.forEachPartsWithDeclaration);
+    _variantField_7 = value;
+  }
+
+  set forEachPartsWithIdentifier_identifier(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.forEachPartsWithIdentifier);
+    _variantField_7 = value;
+  }
+
+  set forElement_body(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.forElement);
+    _variantField_7 = value;
+  }
+
+  set forPartsWithDeclarations_variables(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.forPartsWithDeclarations);
+    _variantField_7 = value;
+  }
+
+  set forPartsWithExpression_initialization(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.forPartsWithExpression);
+    _variantField_7 = value;
+  }
+
+  set forStatement_body(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.forStatement);
+    _variantField_7 = value;
+  }
+
+  set functionDeclaration_returnType(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.functionDeclaration);
+    _variantField_7 = value;
+  }
+
+  set functionExpression_formalParameters(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.functionExpression);
+    _variantField_7 = value;
+  }
+
+  set functionTypeAlias_returnType(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.functionTypeAlias);
+    _variantField_7 = value;
+  }
+
+  set functionTypedFormalParameter_returnType(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.functionTypedFormalParameter);
+    _variantField_7 = value;
+  }
+
+  set genericFunctionType_returnType(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.genericFunctionType);
+    _variantField_7 = value;
+  }
+
+  set genericTypeAlias_functionType(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.genericTypeAlias);
+    _variantField_7 = value;
+  }
+
+  set ifStatement_elseStatement(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.ifStatement);
+    _variantField_7 = value;
+  }
+
+  set indexExpression_target(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.indexExpression);
+    _variantField_7 = value;
+  }
+
+  set instanceCreationExpression_constructorName(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.instanceCreationExpression);
+    _variantField_7 = value;
+  }
+
+  set isExpression_type(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.isExpression);
+    _variantField_7 = value;
+  }
+
+  set mapLiteralEntry_value(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.mapLiteralEntry);
+    _variantField_7 = value;
+  }
+
+  set methodDeclaration_formalParameters(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.methodDeclaration);
+    _variantField_7 = value;
+  }
+
+  set methodInvocation_target(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.methodInvocation);
+    _variantField_7 = value;
+  }
+
+  set namedExpression_name(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.namedExpression);
+    _variantField_7 = value;
+  }
+
+  set partOfDirective_uri(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.partOfDirective);
+    _variantField_7 = value;
+  }
+
+  set prefixedIdentifier_prefix(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.prefixedIdentifier);
+    _variantField_7 = value;
+  }
+
+  set propertyAccess_target(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.propertyAccess);
+    _variantField_7 = value;
+  }
+
+  set redirectingConstructorInvocation_constructorName(
+      LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.redirectingConstructorInvocation);
+    _variantField_7 = value;
+  }
+
+  set superConstructorInvocation_constructorName(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.superConstructorInvocation);
+    _variantField_7 = value;
+  }
+
+  set switchStatement_expression(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.switchStatement);
+    _variantField_7 = value;
+  }
+
+  set tryStatement_finallyBlock(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.tryStatement);
+    _variantField_7 = value;
+  }
+
+  set typeName_typeArguments(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.typeName);
+    _variantField_7 = value;
+  }
+
+  set typeParameter_name(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.typeParameter);
+    _variantField_7 = value;
+  }
+
+  set variableDeclaration_name(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.variableDeclaration);
+    _variantField_7 = value;
+  }
+
+  set whileStatement_condition(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.whileStatement);
+    _variantField_7 = value;
+  }
+
+  @override
+  LinkedNodeBuilder get annotation_name {
+    assert(kind == idl.LinkedNodeKind.annotation);
+    return _variantField_8;
+  }
+
+  @override
+  LinkedNodeBuilder get catchClause_exceptionType {
+    assert(kind == idl.LinkedNodeKind.catchClause);
+    return _variantField_8;
+  }
+
+  @override
+  LinkedNodeBuilder get classDeclaration_nativeClause {
+    assert(kind == idl.LinkedNodeKind.classDeclaration);
+    return _variantField_8;
+  }
+
+  @override
+  LinkedNodeBuilder get classTypeAlias_withClause {
+    assert(kind == idl.LinkedNodeKind.classTypeAlias);
+    return _variantField_8;
+  }
+
+  @override
+  LinkedNodeBuilder get conditionalExpression_thenExpression {
+    assert(kind == idl.LinkedNodeKind.conditionalExpression);
+    return _variantField_8;
+  }
+
+  @override
+  LinkedNodeBuilder get configuration_uri {
+    assert(kind == idl.LinkedNodeKind.configuration);
+    return _variantField_8;
+  }
+
+  @override
+  LinkedNodeBuilder get constructorDeclaration_parameters {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    return _variantField_8;
+  }
+
+  @override
+  LinkedNodeBuilder get fieldFormalParameter_formalParameters {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter);
+    return _variantField_8;
+  }
+
+  @override
+  LinkedNodeBuilder get functionExpression_typeParameters {
+    assert(kind == idl.LinkedNodeKind.functionExpression);
+    return _variantField_8;
+  }
+
+  @override
+  LinkedNodeBuilder get functionTypeAlias_typeParameters {
+    assert(kind == idl.LinkedNodeKind.functionTypeAlias);
+    return _variantField_8;
+  }
+
+  @override
+  LinkedNodeBuilder get functionTypedFormalParameter_typeParameters {
+    assert(kind == idl.LinkedNodeKind.functionTypedFormalParameter);
+    return _variantField_8;
+  }
+
+  @override
+  LinkedNodeBuilder get genericFunctionType_formalParameters {
+    assert(kind == idl.LinkedNodeKind.genericFunctionType);
+    return _variantField_8;
+  }
+
+  @override
+  LinkedNodeBuilder get ifElement_thenElement {
+    assert(kind == idl.LinkedNodeKind.ifElement);
+    return _variantField_8;
+  }
+
+  @override
+  LinkedNodeBuilder get ifStatement_thenStatement {
+    assert(kind == idl.LinkedNodeKind.ifStatement);
+    return _variantField_8;
+  }
+
+  @override
+  LinkedNodeBuilder get instanceCreationExpression_typeArguments {
+    assert(kind == idl.LinkedNodeKind.instanceCreationExpression);
+    return _variantField_8;
+  }
+
+  @override
+  LinkedNodeBuilder get methodDeclaration_returnType {
+    assert(kind == idl.LinkedNodeKind.methodDeclaration);
+    return _variantField_8;
+  }
+
+  set annotation_name(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.annotation);
+    _variantField_8 = value;
+  }
+
+  set catchClause_exceptionType(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.catchClause);
+    _variantField_8 = value;
+  }
+
+  set classDeclaration_nativeClause(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.classDeclaration);
+    _variantField_8 = value;
+  }
+
+  set classTypeAlias_withClause(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.classTypeAlias);
+    _variantField_8 = value;
+  }
+
+  set conditionalExpression_thenExpression(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.conditionalExpression);
+    _variantField_8 = value;
+  }
+
+  set configuration_uri(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.configuration);
+    _variantField_8 = value;
+  }
+
+  set constructorDeclaration_parameters(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    _variantField_8 = value;
+  }
+
+  set fieldFormalParameter_formalParameters(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter);
+    _variantField_8 = value;
+  }
+
+  set functionExpression_typeParameters(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.functionExpression);
+    _variantField_8 = value;
+  }
+
+  set functionTypeAlias_typeParameters(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.functionTypeAlias);
+    _variantField_8 = value;
+  }
+
+  set functionTypedFormalParameter_typeParameters(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.functionTypedFormalParameter);
+    _variantField_8 = value;
+  }
+
+  set genericFunctionType_formalParameters(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.genericFunctionType);
+    _variantField_8 = value;
+  }
+
+  set ifElement_thenElement(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.ifElement);
+    _variantField_8 = value;
+  }
+
+  set ifStatement_thenStatement(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.ifStatement);
+    _variantField_8 = value;
+  }
+
+  set instanceCreationExpression_typeArguments(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.instanceCreationExpression);
+    _variantField_8 = value;
+  }
+
+  set methodDeclaration_returnType(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.methodDeclaration);
+    _variantField_8 = value;
+  }
+
+  @override
+  int get annotation_period {
+    assert(kind == idl.LinkedNodeKind.annotation);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get argumentList_rightParenthesis {
+    assert(kind == idl.LinkedNodeKind.argumentList);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get assertInitializer_comma {
+    assert(kind == idl.LinkedNodeKind.assertInitializer);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get assertStatement_comma {
+    assert(kind == idl.LinkedNodeKind.assertStatement);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get assignmentExpression_operator {
+    assert(kind == idl.LinkedNodeKind.assignmentExpression);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get binaryExpression_operator {
+    assert(kind == idl.LinkedNodeKind.binaryExpression);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get block_rightBracket {
+    assert(kind == idl.LinkedNodeKind.block);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get blockFunctionBody_star {
+    assert(kind == idl.LinkedNodeKind.blockFunctionBody);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get breakStatement_semicolon {
+    assert(kind == idl.LinkedNodeKind.breakStatement);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get catchClause_comma {
+    assert(kind == idl.LinkedNodeKind.catchClause);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get classDeclaration_classKeyword {
+    assert(kind == idl.LinkedNodeKind.classDeclaration);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get classTypeAlias_equals {
+    assert(kind == idl.LinkedNodeKind.classTypeAlias);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get compilationUnit_endToken {
+    assert(kind == idl.LinkedNodeKind.compilationUnit);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get conditionalExpression_question {
+    assert(kind == idl.LinkedNodeKind.conditionalExpression);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get configuration_leftParenthesis {
+    assert(kind == idl.LinkedNodeKind.configuration);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get constructorDeclaration_externalKeyword {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get constructorFieldInitializer_period {
+    assert(kind == idl.LinkedNodeKind.constructorFieldInitializer);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get constructorName_period {
+    assert(kind == idl.LinkedNodeKind.constructorName);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get continueStatement_semicolon {
+    assert(kind == idl.LinkedNodeKind.continueStatement);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get doStatement_rightParenthesis {
+    assert(kind == idl.LinkedNodeKind.doStatement);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get enumDeclaration_leftBracket {
+    assert(kind == idl.LinkedNodeKind.enumDeclaration);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get expressionFunctionBody_keyword {
+    assert(kind == idl.LinkedNodeKind.expressionFunctionBody);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get fieldDeclaration_semicolon {
+    assert(kind == idl.LinkedNodeKind.fieldDeclaration);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get fieldFormalParameter_period {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get formalParameterList_leftParenthesis {
+    assert(kind == idl.LinkedNodeKind.formalParameterList);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get forMixin_forKeyword {
+    assert(kind == idl.LinkedNodeKind.forElement ||
+        kind == idl.LinkedNodeKind.forStatement);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get forParts_rightSeparator {
+    assert(kind == idl.LinkedNodeKind.forPartsWithDeclarations ||
+        kind == idl.LinkedNodeKind.forPartsWithExpression);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get functionDeclaration_propertyKeyword {
+    assert(kind == idl.LinkedNodeKind.functionDeclaration);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get genericFunctionType_question {
+    assert(kind == idl.LinkedNodeKind.genericFunctionType);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get genericTypeAlias_equals {
+    assert(kind == idl.LinkedNodeKind.genericTypeAlias);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get ifMixin_ifKeyword {
+    assert(kind == idl.LinkedNodeKind.ifElement ||
+        kind == idl.LinkedNodeKind.ifStatement);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get importDirective_deferredKeyword {
+    assert(kind == idl.LinkedNodeKind.importDirective);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get indexExpression_period {
+    assert(kind == idl.LinkedNodeKind.indexExpression);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get integerLiteral_value {
+    assert(kind == idl.LinkedNodeKind.integerLiteral);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get interpolationExpression_rightBracket {
+    assert(kind == idl.LinkedNodeKind.interpolationExpression);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get isExpression_notOperator {
+    assert(kind == idl.LinkedNodeKind.isExpression);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get listLiteral_rightBracket {
+    assert(kind == idl.LinkedNodeKind.listLiteral);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get methodDeclaration_modifierKeyword {
+    assert(kind == idl.LinkedNodeKind.methodDeclaration);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get nativeFunctionBody_semicolon {
+    assert(kind == idl.LinkedNodeKind.nativeFunctionBody);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get parenthesizedExpression_rightParenthesis {
+    assert(kind == idl.LinkedNodeKind.parenthesizedExpression);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get partOfDirective_ofKeyword {
+    assert(kind == idl.LinkedNodeKind.partOfDirective);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get postfixExpression_operator {
+    assert(kind == idl.LinkedNodeKind.postfixExpression);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get prefixExpression_operator {
+    assert(kind == idl.LinkedNodeKind.prefixExpression);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get redirectingConstructorInvocation_period {
+    assert(kind == idl.LinkedNodeKind.redirectingConstructorInvocation);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get returnStatement_semicolon {
+    assert(kind == idl.LinkedNodeKind.returnStatement);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get setOrMapLiteral_rightBracket {
+    assert(kind == idl.LinkedNodeKind.setOrMapLiteral);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get simpleIdentifier_token {
+    assert(kind == idl.LinkedNodeKind.simpleIdentifier);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get superConstructorInvocation_period {
+    assert(kind == idl.LinkedNodeKind.superConstructorInvocation);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get switchMember_colon {
+    assert(kind == idl.LinkedNodeKind.switchCase ||
+        kind == idl.LinkedNodeKind.switchDefault);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get switchStatement_rightParenthesis {
+    assert(kind == idl.LinkedNodeKind.switchStatement);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get tryStatement_tryKeyword {
+    assert(kind == idl.LinkedNodeKind.tryStatement);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get typeArgumentList_rightBracket {
+    assert(kind == idl.LinkedNodeKind.typeArgumentList);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get typeParameter_id {
+    assert(kind == idl.LinkedNodeKind.typeParameter);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get typeParameterList_rightBracket {
+    assert(kind == idl.LinkedNodeKind.typeParameterList);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get whileStatement_rightParenthesis {
+    assert(kind == idl.LinkedNodeKind.whileStatement);
+    return _variantField_16 ??= 0;
+  }
+
+  @override
+  int get yieldStatement_star {
+    assert(kind == idl.LinkedNodeKind.yieldStatement);
+    return _variantField_16 ??= 0;
+  }
+
+  set annotation_period(int value) {
+    assert(kind == idl.LinkedNodeKind.annotation);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set argumentList_rightParenthesis(int value) {
+    assert(kind == idl.LinkedNodeKind.argumentList);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set assertInitializer_comma(int value) {
+    assert(kind == idl.LinkedNodeKind.assertInitializer);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set assertStatement_comma(int value) {
+    assert(kind == idl.LinkedNodeKind.assertStatement);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set assignmentExpression_operator(int value) {
+    assert(kind == idl.LinkedNodeKind.assignmentExpression);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set binaryExpression_operator(int value) {
+    assert(kind == idl.LinkedNodeKind.binaryExpression);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set block_rightBracket(int value) {
+    assert(kind == idl.LinkedNodeKind.block);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set blockFunctionBody_star(int value) {
+    assert(kind == idl.LinkedNodeKind.blockFunctionBody);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set breakStatement_semicolon(int value) {
+    assert(kind == idl.LinkedNodeKind.breakStatement);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set catchClause_comma(int value) {
+    assert(kind == idl.LinkedNodeKind.catchClause);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set classDeclaration_classKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.classDeclaration);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set classTypeAlias_equals(int value) {
+    assert(kind == idl.LinkedNodeKind.classTypeAlias);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set compilationUnit_endToken(int value) {
+    assert(kind == idl.LinkedNodeKind.compilationUnit);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set conditionalExpression_question(int value) {
+    assert(kind == idl.LinkedNodeKind.conditionalExpression);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set configuration_leftParenthesis(int value) {
+    assert(kind == idl.LinkedNodeKind.configuration);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set constructorDeclaration_externalKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set constructorFieldInitializer_period(int value) {
+    assert(kind == idl.LinkedNodeKind.constructorFieldInitializer);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set constructorName_period(int value) {
+    assert(kind == idl.LinkedNodeKind.constructorName);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set continueStatement_semicolon(int value) {
+    assert(kind == idl.LinkedNodeKind.continueStatement);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set doStatement_rightParenthesis(int value) {
+    assert(kind == idl.LinkedNodeKind.doStatement);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set enumDeclaration_leftBracket(int value) {
+    assert(kind == idl.LinkedNodeKind.enumDeclaration);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set expressionFunctionBody_keyword(int value) {
+    assert(kind == idl.LinkedNodeKind.expressionFunctionBody);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set fieldDeclaration_semicolon(int value) {
+    assert(kind == idl.LinkedNodeKind.fieldDeclaration);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set fieldFormalParameter_period(int value) {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set formalParameterList_leftParenthesis(int value) {
+    assert(kind == idl.LinkedNodeKind.formalParameterList);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set forMixin_forKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.forElement ||
+        kind == idl.LinkedNodeKind.forStatement);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set forParts_rightSeparator(int value) {
+    assert(kind == idl.LinkedNodeKind.forPartsWithDeclarations ||
+        kind == idl.LinkedNodeKind.forPartsWithExpression);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set functionDeclaration_propertyKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.functionDeclaration);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set genericFunctionType_question(int value) {
+    assert(kind == idl.LinkedNodeKind.genericFunctionType);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set genericTypeAlias_equals(int value) {
+    assert(kind == idl.LinkedNodeKind.genericTypeAlias);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set ifMixin_ifKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.ifElement ||
+        kind == idl.LinkedNodeKind.ifStatement);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set importDirective_deferredKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.importDirective);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set indexExpression_period(int value) {
+    assert(kind == idl.LinkedNodeKind.indexExpression);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set integerLiteral_value(int value) {
+    assert(kind == idl.LinkedNodeKind.integerLiteral);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set interpolationExpression_rightBracket(int value) {
+    assert(kind == idl.LinkedNodeKind.interpolationExpression);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set isExpression_notOperator(int value) {
+    assert(kind == idl.LinkedNodeKind.isExpression);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set listLiteral_rightBracket(int value) {
+    assert(kind == idl.LinkedNodeKind.listLiteral);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set methodDeclaration_modifierKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.methodDeclaration);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set nativeFunctionBody_semicolon(int value) {
+    assert(kind == idl.LinkedNodeKind.nativeFunctionBody);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set parenthesizedExpression_rightParenthesis(int value) {
+    assert(kind == idl.LinkedNodeKind.parenthesizedExpression);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set partOfDirective_ofKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.partOfDirective);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set postfixExpression_operator(int value) {
+    assert(kind == idl.LinkedNodeKind.postfixExpression);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set prefixExpression_operator(int value) {
+    assert(kind == idl.LinkedNodeKind.prefixExpression);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set redirectingConstructorInvocation_period(int value) {
+    assert(kind == idl.LinkedNodeKind.redirectingConstructorInvocation);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set returnStatement_semicolon(int value) {
+    assert(kind == idl.LinkedNodeKind.returnStatement);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set setOrMapLiteral_rightBracket(int value) {
+    assert(kind == idl.LinkedNodeKind.setOrMapLiteral);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set simpleIdentifier_token(int value) {
+    assert(kind == idl.LinkedNodeKind.simpleIdentifier);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set superConstructorInvocation_period(int value) {
+    assert(kind == idl.LinkedNodeKind.superConstructorInvocation);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set switchMember_colon(int value) {
+    assert(kind == idl.LinkedNodeKind.switchCase ||
+        kind == idl.LinkedNodeKind.switchDefault);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set switchStatement_rightParenthesis(int value) {
+    assert(kind == idl.LinkedNodeKind.switchStatement);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set tryStatement_tryKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.tryStatement);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set typeArgumentList_rightBracket(int value) {
+    assert(kind == idl.LinkedNodeKind.typeArgumentList);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set typeParameter_id(int value) {
+    assert(kind == idl.LinkedNodeKind.typeParameter);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set typeParameterList_rightBracket(int value) {
+    assert(kind == idl.LinkedNodeKind.typeParameterList);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set whileStatement_rightParenthesis(int value) {
+    assert(kind == idl.LinkedNodeKind.whileStatement);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  set yieldStatement_star(int value) {
+    assert(kind == idl.LinkedNodeKind.yieldStatement);
+    assert(value == null || value >= 0);
+    _variantField_16 = value;
+  }
+
+  @override
+  int get assertInitializer_leftParenthesis {
+    assert(kind == idl.LinkedNodeKind.assertInitializer);
+    return _variantField_17 ??= 0;
+  }
+
+  @override
+  int get assertStatement_leftParenthesis {
+    assert(kind == idl.LinkedNodeKind.assertStatement);
+    return _variantField_17 ??= 0;
+  }
+
+  @override
+  int get catchClause_leftParenthesis {
+    assert(kind == idl.LinkedNodeKind.catchClause);
+    return _variantField_17 ??= 0;
+  }
+
+  @override
+  int get configuration_rightParenthesis {
+    assert(kind == idl.LinkedNodeKind.configuration);
+    return _variantField_17 ??= 0;
+  }
+
+  @override
+  int get constructorDeclaration_factoryKeyword {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    return _variantField_17 ??= 0;
+  }
+
+  @override
+  int get constructorFieldInitializer_thisKeyword {
+    assert(kind == idl.LinkedNodeKind.constructorFieldInitializer);
+    return _variantField_17 ??= 0;
+  }
+
+  @override
+  int get doStatement_doKeyword {
+    assert(kind == idl.LinkedNodeKind.doStatement);
+    return _variantField_17 ??= 0;
+  }
+
+  @override
+  int get enumDeclaration_rightBracket {
+    assert(kind == idl.LinkedNodeKind.enumDeclaration);
+    return _variantField_17 ??= 0;
+  }
+
+  @override
+  int get expressionFunctionBody_semicolon {
+    assert(kind == idl.LinkedNodeKind.expressionFunctionBody);
+    return _variantField_17 ??= 0;
+  }
+
+  @override
+  int get fieldDeclaration_staticKeyword {
+    assert(kind == idl.LinkedNodeKind.fieldDeclaration);
+    return _variantField_17 ??= 0;
+  }
+
+  @override
+  int get fieldFormalParameter_thisKeyword {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter);
+    return _variantField_17 ??= 0;
+  }
+
+  @override
+  int get formalParameterList_rightDelimiter {
+    assert(kind == idl.LinkedNodeKind.formalParameterList);
+    return _variantField_17 ??= 0;
+  }
+
+  @override
+  int get forMixin_leftParenthesis {
+    assert(kind == idl.LinkedNodeKind.forElement ||
+        kind == idl.LinkedNodeKind.forStatement);
+    return _variantField_17 ??= 0;
+  }
+
+  @override
+  int get ifMixin_leftParenthesis {
+    assert(kind == idl.LinkedNodeKind.ifElement ||
+        kind == idl.LinkedNodeKind.ifStatement);
+    return _variantField_17 ??= 0;
+  }
+
+  @override
+  int get indexExpression_leftBracket {
+    assert(kind == idl.LinkedNodeKind.indexExpression);
+    return _variantField_17 ??= 0;
+  }
+
+  @override
+  int get methodDeclaration_operatorKeyword {
+    assert(kind == idl.LinkedNodeKind.methodDeclaration);
+    return _variantField_17 ??= 0;
+  }
+
+  @override
+  int get redirectingConstructorInvocation_thisKeyword {
+    assert(kind == idl.LinkedNodeKind.redirectingConstructorInvocation);
+    return _variantField_17 ??= 0;
+  }
+
+  @override
+  int get superConstructorInvocation_superKeyword {
+    assert(kind == idl.LinkedNodeKind.superConstructorInvocation);
+    return _variantField_17 ??= 0;
+  }
+
+  @override
+  int get switchStatement_switchKeyword {
+    assert(kind == idl.LinkedNodeKind.switchStatement);
+    return _variantField_17 ??= 0;
+  }
+
+  @override
+  int get whileStatement_whileKeyword {
+    assert(kind == idl.LinkedNodeKind.whileStatement);
+    return _variantField_17 ??= 0;
+  }
+
+  @override
+  int get yieldStatement_semicolon {
+    assert(kind == idl.LinkedNodeKind.yieldStatement);
+    return _variantField_17 ??= 0;
+  }
+
+  set assertInitializer_leftParenthesis(int value) {
+    assert(kind == idl.LinkedNodeKind.assertInitializer);
+    assert(value == null || value >= 0);
+    _variantField_17 = value;
+  }
+
+  set assertStatement_leftParenthesis(int value) {
+    assert(kind == idl.LinkedNodeKind.assertStatement);
+    assert(value == null || value >= 0);
+    _variantField_17 = value;
+  }
+
+  set catchClause_leftParenthesis(int value) {
+    assert(kind == idl.LinkedNodeKind.catchClause);
+    assert(value == null || value >= 0);
+    _variantField_17 = value;
+  }
+
+  set configuration_rightParenthesis(int value) {
+    assert(kind == idl.LinkedNodeKind.configuration);
+    assert(value == null || value >= 0);
+    _variantField_17 = value;
+  }
+
+  set constructorDeclaration_factoryKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    assert(value == null || value >= 0);
+    _variantField_17 = value;
+  }
+
+  set constructorFieldInitializer_thisKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.constructorFieldInitializer);
+    assert(value == null || value >= 0);
+    _variantField_17 = value;
+  }
+
+  set doStatement_doKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.doStatement);
+    assert(value == null || value >= 0);
+    _variantField_17 = value;
+  }
+
+  set enumDeclaration_rightBracket(int value) {
+    assert(kind == idl.LinkedNodeKind.enumDeclaration);
+    assert(value == null || value >= 0);
+    _variantField_17 = value;
+  }
+
+  set expressionFunctionBody_semicolon(int value) {
+    assert(kind == idl.LinkedNodeKind.expressionFunctionBody);
+    assert(value == null || value >= 0);
+    _variantField_17 = value;
+  }
+
+  set fieldDeclaration_staticKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.fieldDeclaration);
+    assert(value == null || value >= 0);
+    _variantField_17 = value;
+  }
+
+  set fieldFormalParameter_thisKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter);
+    assert(value == null || value >= 0);
+    _variantField_17 = value;
+  }
+
+  set formalParameterList_rightDelimiter(int value) {
+    assert(kind == idl.LinkedNodeKind.formalParameterList);
+    assert(value == null || value >= 0);
+    _variantField_17 = value;
+  }
+
+  set forMixin_leftParenthesis(int value) {
+    assert(kind == idl.LinkedNodeKind.forElement ||
+        kind == idl.LinkedNodeKind.forStatement);
+    assert(value == null || value >= 0);
+    _variantField_17 = value;
+  }
+
+  set ifMixin_leftParenthesis(int value) {
+    assert(kind == idl.LinkedNodeKind.ifElement ||
+        kind == idl.LinkedNodeKind.ifStatement);
+    assert(value == null || value >= 0);
+    _variantField_17 = value;
+  }
+
+  set indexExpression_leftBracket(int value) {
+    assert(kind == idl.LinkedNodeKind.indexExpression);
+    assert(value == null || value >= 0);
+    _variantField_17 = value;
+  }
+
+  set methodDeclaration_operatorKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.methodDeclaration);
+    assert(value == null || value >= 0);
+    _variantField_17 = value;
+  }
+
+  set redirectingConstructorInvocation_thisKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.redirectingConstructorInvocation);
+    assert(value == null || value >= 0);
+    _variantField_17 = value;
+  }
+
+  set superConstructorInvocation_superKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.superConstructorInvocation);
+    assert(value == null || value >= 0);
+    _variantField_17 = value;
+  }
+
+  set switchStatement_switchKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.switchStatement);
+    assert(value == null || value >= 0);
+    _variantField_17 = value;
+  }
+
+  set whileStatement_whileKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.whileStatement);
+    assert(value == null || value >= 0);
+    _variantField_17 = value;
+  }
+
+  set yieldStatement_semicolon(int value) {
+    assert(kind == idl.LinkedNodeKind.yieldStatement);
+    assert(value == null || value >= 0);
+    _variantField_17 = value;
+  }
+
+  @override
+  int get assertInitializer_rightParenthesis {
+    assert(kind == idl.LinkedNodeKind.assertInitializer);
+    return _variantField_18 ??= 0;
+  }
+
+  @override
+  int get assertStatement_rightParenthesis {
+    assert(kind == idl.LinkedNodeKind.assertStatement);
+    return _variantField_18 ??= 0;
+  }
+
+  @override
+  int get catchClause_onKeyword {
+    assert(kind == idl.LinkedNodeKind.catchClause);
+    return _variantField_18 ??= 0;
+  }
+
+  @override
+  int get classOrMixinDeclaration_rightBracket {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration);
+    return _variantField_18 ??= 0;
+  }
+
+  @override
+  int get configuration_equalToken {
+    assert(kind == idl.LinkedNodeKind.configuration);
+    return _variantField_18 ??= 0;
+  }
+
+  @override
+  int get constructorDeclaration_period {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    return _variantField_18 ??= 0;
+  }
+
+  @override
+  int get directive_keyword {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.libraryDirective ||
+        kind == idl.LinkedNodeKind.partDirective ||
+        kind == idl.LinkedNodeKind.partOfDirective);
+    return _variantField_18 ??= 0;
+  }
+
+  @override
+  int get doStatement_semicolon {
+    assert(kind == idl.LinkedNodeKind.doStatement);
+    return _variantField_18 ??= 0;
+  }
+
+  @override
+  int get formalParameterList_rightParenthesis {
+    assert(kind == idl.LinkedNodeKind.formalParameterList);
+    return _variantField_18 ??= 0;
+  }
+
+  @override
+  int get ifMixin_rightParenthesis {
+    assert(kind == idl.LinkedNodeKind.ifElement ||
+        kind == idl.LinkedNodeKind.ifStatement);
+    return _variantField_18 ??= 0;
+  }
+
+  @override
+  int get indexExpression_rightBracket {
+    assert(kind == idl.LinkedNodeKind.indexExpression);
+    return _variantField_18 ??= 0;
+  }
+
+  @override
+  int get methodDeclaration_propertyKeyword {
+    assert(kind == idl.LinkedNodeKind.methodDeclaration);
+    return _variantField_18 ??= 0;
+  }
+
+  @override
+  int get switchStatement_leftBracket {
+    assert(kind == idl.LinkedNodeKind.switchStatement);
+    return _variantField_18 ??= 0;
+  }
+
+  @override
+  int get typeAlias_typedefKeyword {
+    assert(kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.genericTypeAlias);
+    return _variantField_18 ??= 0;
+  }
+
+  set assertInitializer_rightParenthesis(int value) {
+    assert(kind == idl.LinkedNodeKind.assertInitializer);
+    assert(value == null || value >= 0);
+    _variantField_18 = value;
+  }
+
+  set assertStatement_rightParenthesis(int value) {
+    assert(kind == idl.LinkedNodeKind.assertStatement);
+    assert(value == null || value >= 0);
+    _variantField_18 = value;
+  }
+
+  set catchClause_onKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.catchClause);
+    assert(value == null || value >= 0);
+    _variantField_18 = value;
+  }
+
+  set classOrMixinDeclaration_rightBracket(int value) {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration);
+    assert(value == null || value >= 0);
+    _variantField_18 = value;
+  }
+
+  set configuration_equalToken(int value) {
+    assert(kind == idl.LinkedNodeKind.configuration);
+    assert(value == null || value >= 0);
+    _variantField_18 = value;
+  }
+
+  set constructorDeclaration_period(int value) {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    assert(value == null || value >= 0);
+    _variantField_18 = value;
+  }
+
+  set directive_keyword(int value) {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.libraryDirective ||
+        kind == idl.LinkedNodeKind.partDirective ||
+        kind == idl.LinkedNodeKind.partOfDirective);
+    assert(value == null || value >= 0);
+    _variantField_18 = value;
+  }
+
+  set doStatement_semicolon(int value) {
+    assert(kind == idl.LinkedNodeKind.doStatement);
+    assert(value == null || value >= 0);
+    _variantField_18 = value;
+  }
+
+  set formalParameterList_rightParenthesis(int value) {
+    assert(kind == idl.LinkedNodeKind.formalParameterList);
+    assert(value == null || value >= 0);
+    _variantField_18 = value;
+  }
+
+  set ifMixin_rightParenthesis(int value) {
+    assert(kind == idl.LinkedNodeKind.ifElement ||
+        kind == idl.LinkedNodeKind.ifStatement);
+    assert(value == null || value >= 0);
+    _variantField_18 = value;
+  }
+
+  set indexExpression_rightBracket(int value) {
+    assert(kind == idl.LinkedNodeKind.indexExpression);
+    assert(value == null || value >= 0);
+    _variantField_18 = value;
+  }
+
+  set methodDeclaration_propertyKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.methodDeclaration);
+    assert(value == null || value >= 0);
+    _variantField_18 = value;
+  }
+
+  set switchStatement_leftBracket(int value) {
+    assert(kind == idl.LinkedNodeKind.switchStatement);
+    assert(value == null || value >= 0);
+    _variantField_18 = value;
+  }
+
+  set typeAlias_typedefKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.genericTypeAlias);
+    assert(value == null || value >= 0);
+    _variantField_18 = value;
+  }
+
+  @override
+  int get assertStatement_semicolon {
+    assert(kind == idl.LinkedNodeKind.assertStatement);
+    return _variantField_19 ??= 0;
+  }
+
+  @override
+  int get catchClause_rightParenthesis {
+    assert(kind == idl.LinkedNodeKind.catchClause);
+    return _variantField_19 ??= 0;
+  }
+
+  @override
+  int get classOrMixinDeclaration_leftBracket {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration);
+    return _variantField_19 ??= 0;
+  }
+
+  @override
+  int get combinator_keyword {
+    assert(kind == idl.LinkedNodeKind.hideCombinator ||
+        kind == idl.LinkedNodeKind.showCombinator);
+    return _variantField_19 ??= 0;
+  }
+
+  @override
+  int get constructorDeclaration_separator {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    return _variantField_19 ??= 0;
+  }
+
+  @override
+  int get doStatement_whileKeyword {
+    assert(kind == idl.LinkedNodeKind.doStatement);
+    return _variantField_19 ??= 0;
+  }
+
+  @override
+  int get forMixin_rightParenthesis {
+    assert(kind == idl.LinkedNodeKind.forElement ||
+        kind == idl.LinkedNodeKind.forStatement);
+    return _variantField_19 ??= 0;
+  }
+
+  @override
+  int get methodDeclaration_actualProperty {
+    assert(kind == idl.LinkedNodeKind.methodDeclaration);
+    return _variantField_19 ??= 0;
+  }
+
+  @override
+  int get normalFormalParameter_covariantKeyword {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter);
+    return _variantField_19 ??= 0;
+  }
+
+  @override
+  int get switchStatement_rightBracket {
+    assert(kind == idl.LinkedNodeKind.switchStatement);
+    return _variantField_19 ??= 0;
+  }
+
+  @override
+  int get typeAlias_semicolon {
+    assert(kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.genericTypeAlias);
+    return _variantField_19 ??= 0;
+  }
+
+  @override
+  int get typedLiteral_constKeyword {
+    assert(kind == idl.LinkedNodeKind.listLiteral ||
+        kind == idl.LinkedNodeKind.setOrMapLiteral);
+    return _variantField_19 ??= 0;
+  }
+
+  @override
+  int get uriBasedDirective_uriElement {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.partDirective);
+    return _variantField_19 ??= 0;
+  }
+
+  set assertStatement_semicolon(int value) {
+    assert(kind == idl.LinkedNodeKind.assertStatement);
+    assert(value == null || value >= 0);
+    _variantField_19 = value;
+  }
+
+  set catchClause_rightParenthesis(int value) {
+    assert(kind == idl.LinkedNodeKind.catchClause);
+    assert(value == null || value >= 0);
+    _variantField_19 = value;
+  }
+
+  set classOrMixinDeclaration_leftBracket(int value) {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration);
+    assert(value == null || value >= 0);
+    _variantField_19 = value;
+  }
+
+  set combinator_keyword(int value) {
+    assert(kind == idl.LinkedNodeKind.hideCombinator ||
+        kind == idl.LinkedNodeKind.showCombinator);
+    assert(value == null || value >= 0);
+    _variantField_19 = value;
+  }
+
+  set constructorDeclaration_separator(int value) {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    assert(value == null || value >= 0);
+    _variantField_19 = value;
+  }
+
+  set doStatement_whileKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.doStatement);
+    assert(value == null || value >= 0);
+    _variantField_19 = value;
+  }
+
+  set forMixin_rightParenthesis(int value) {
+    assert(kind == idl.LinkedNodeKind.forElement ||
+        kind == idl.LinkedNodeKind.forStatement);
+    assert(value == null || value >= 0);
+    _variantField_19 = value;
+  }
+
+  set methodDeclaration_actualProperty(int value) {
+    assert(kind == idl.LinkedNodeKind.methodDeclaration);
+    assert(value == null || value >= 0);
+    _variantField_19 = value;
+  }
+
+  set normalFormalParameter_covariantKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter);
+    assert(value == null || value >= 0);
+    _variantField_19 = value;
+  }
+
+  set switchStatement_rightBracket(int value) {
+    assert(kind == idl.LinkedNodeKind.switchStatement);
+    assert(value == null || value >= 0);
+    _variantField_19 = value;
+  }
+
+  set typeAlias_semicolon(int value) {
+    assert(kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.genericTypeAlias);
+    assert(value == null || value >= 0);
+    _variantField_19 = value;
+  }
+
+  set typedLiteral_constKeyword(int value) {
+    assert(kind == idl.LinkedNodeKind.listLiteral ||
+        kind == idl.LinkedNodeKind.setOrMapLiteral);
+    assert(value == null || value >= 0);
+    _variantField_19 = value;
+  }
+
+  set uriBasedDirective_uriElement(int value) {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.partDirective);
+    assert(value == null || value >= 0);
+    _variantField_19 = value;
+  }
+
+  @override
+  LinkedNodeTypeBuilder get assignmentExpression_elementType {
+    assert(kind == idl.LinkedNodeKind.assignmentExpression);
+    return _variantField_23;
+  }
+
+  @override
+  LinkedNodeTypeBuilder get binaryExpression_elementType {
+    assert(kind == idl.LinkedNodeKind.binaryExpression);
+    return _variantField_23;
+  }
+
+  @override
+  LinkedNodeTypeBuilder get constructorName_elementType {
+    assert(kind == idl.LinkedNodeKind.constructorName);
+    return _variantField_23;
+  }
+
+  @override
+  LinkedNodeTypeBuilder get indexExpression_elementType {
+    assert(kind == idl.LinkedNodeKind.indexExpression);
+    return _variantField_23;
+  }
+
+  @override
+  LinkedNodeTypeBuilder get postfixExpression_elementType {
+    assert(kind == idl.LinkedNodeKind.postfixExpression);
+    return _variantField_23;
+  }
+
+  @override
+  LinkedNodeTypeBuilder get prefixExpression_elementType {
+    assert(kind == idl.LinkedNodeKind.prefixExpression);
+    return _variantField_23;
+  }
+
+  @override
+  LinkedNodeTypeBuilder get redirectingConstructorInvocation_elementType {
+    assert(kind == idl.LinkedNodeKind.redirectingConstructorInvocation);
+    return _variantField_23;
+  }
+
+  @override
+  LinkedNodeTypeBuilder get simpleIdentifier_elementType {
+    assert(kind == idl.LinkedNodeKind.simpleIdentifier);
+    return _variantField_23;
+  }
+
+  @override
+  LinkedNodeTypeBuilder get superConstructorInvocation_elementType {
+    assert(kind == idl.LinkedNodeKind.superConstructorInvocation);
+    return _variantField_23;
+  }
+
+  @override
+  LinkedNodeTypeBuilder get typeName_type {
+    assert(kind == idl.LinkedNodeKind.typeName);
+    return _variantField_23;
+  }
+
+  set assignmentExpression_elementType(LinkedNodeTypeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.assignmentExpression);
+    _variantField_23 = value;
+  }
+
+  set binaryExpression_elementType(LinkedNodeTypeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.binaryExpression);
+    _variantField_23 = value;
+  }
+
+  set constructorName_elementType(LinkedNodeTypeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.constructorName);
+    _variantField_23 = value;
+  }
+
+  set indexExpression_elementType(LinkedNodeTypeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.indexExpression);
+    _variantField_23 = value;
+  }
+
+  set postfixExpression_elementType(LinkedNodeTypeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.postfixExpression);
+    _variantField_23 = value;
+  }
+
+  set prefixExpression_elementType(LinkedNodeTypeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.prefixExpression);
+    _variantField_23 = value;
+  }
+
+  set redirectingConstructorInvocation_elementType(
+      LinkedNodeTypeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.redirectingConstructorInvocation);
+    _variantField_23 = value;
+  }
+
+  set simpleIdentifier_elementType(LinkedNodeTypeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.simpleIdentifier);
+    _variantField_23 = value;
+  }
+
+  set superConstructorInvocation_elementType(LinkedNodeTypeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.superConstructorInvocation);
+    _variantField_23 = value;
+  }
+
+  set typeName_type(LinkedNodeTypeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.typeName);
+    _variantField_23 = value;
+  }
+
+  @override
+  bool get booleanLiteral_value {
+    assert(kind == idl.LinkedNodeKind.booleanLiteral);
+    return _variantField_27 ??= false;
+  }
+
+  @override
+  bool get classDeclaration_isDartObject {
+    assert(kind == idl.LinkedNodeKind.classDeclaration);
+    return _variantField_27 ??= false;
+  }
+
+  @override
+  bool get defaultFormalParameter_isNamed {
+    assert(kind == idl.LinkedNodeKind.defaultFormalParameter);
+    return _variantField_27 ??= false;
+  }
+
+  @override
+  bool get normalFormalParameter_isCovariant {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter);
+    return _variantField_27 ??= false;
+  }
+
+  @override
+  bool get setOrMapLiteral_isMap {
+    assert(kind == idl.LinkedNodeKind.setOrMapLiteral);
+    return _variantField_27 ??= false;
+  }
+
+  set booleanLiteral_value(bool value) {
+    assert(kind == idl.LinkedNodeKind.booleanLiteral);
+    _variantField_27 = value;
+  }
+
+  set classDeclaration_isDartObject(bool value) {
+    assert(kind == idl.LinkedNodeKind.classDeclaration);
+    _variantField_27 = value;
+  }
+
+  set defaultFormalParameter_isNamed(bool value) {
+    assert(kind == idl.LinkedNodeKind.defaultFormalParameter);
+    _variantField_27 = value;
+  }
+
+  set normalFormalParameter_isCovariant(bool value) {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter);
+    _variantField_27 = value;
+  }
+
+  set setOrMapLiteral_isMap(bool value) {
+    assert(kind == idl.LinkedNodeKind.setOrMapLiteral);
+    _variantField_27 = value;
+  }
+
+  @override
+  LinkedNodeBuilder get catchClause_stackTraceParameter {
+    assert(kind == idl.LinkedNodeKind.catchClause);
+    return _variantField_9;
+  }
+
+  @override
+  LinkedNodeBuilder get classTypeAlias_implementsClause {
+    assert(kind == idl.LinkedNodeKind.classTypeAlias);
+    return _variantField_9;
+  }
+
+  @override
+  LinkedNodeBuilder get constructorDeclaration_redirectedConstructor {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    return _variantField_9;
+  }
+
+  @override
+  LinkedNodeBuilder get ifElement_elseElement {
+    assert(kind == idl.LinkedNodeKind.ifElement);
+    return _variantField_9;
+  }
+
+  @override
+  LinkedNodeBuilder get methodDeclaration_typeParameters {
+    assert(kind == idl.LinkedNodeKind.methodDeclaration);
+    return _variantField_9;
+  }
+
+  set catchClause_stackTraceParameter(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.catchClause);
+    _variantField_9 = value;
+  }
+
+  set classTypeAlias_implementsClause(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.classTypeAlias);
+    _variantField_9 = value;
+  }
+
+  set constructorDeclaration_redirectedConstructor(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    _variantField_9 = value;
+  }
+
+  set ifElement_elseElement(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.ifElement);
+    _variantField_9 = value;
+  }
+
+  set methodDeclaration_typeParameters(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.methodDeclaration);
+    _variantField_9 = value;
+  }
+
+  @override
+  LinkedNodeBuilder get classOrMixinDeclaration_implementsClause {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration);
+    return _variantField_12;
+  }
+
+  @override
+  LinkedNodeBuilder get invocationExpression_typeArguments {
+    assert(kind == idl.LinkedNodeKind.functionExpressionInvocation ||
+        kind == idl.LinkedNodeKind.methodInvocation);
+    return _variantField_12;
+  }
+
+  @override
+  LinkedNodeBuilder get normalFormalParameter_identifier {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter);
+    return _variantField_12;
+  }
+
+  set classOrMixinDeclaration_implementsClause(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration);
+    _variantField_12 = value;
+  }
+
+  set invocationExpression_typeArguments(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.functionExpressionInvocation ||
+        kind == idl.LinkedNodeKind.methodInvocation);
+    _variantField_12 = value;
+  }
+
+  set normalFormalParameter_identifier(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter);
+    _variantField_12 = value;
+  }
+
+  @override
+  List<LinkedNodeBuilder> get classOrMixinDeclaration_members {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration);
+    return _variantField_5 ??= <LinkedNodeBuilder>[];
+  }
+
+  @override
+  List<LinkedNodeBuilder> get forParts_updaters {
+    assert(kind == idl.LinkedNodeKind.forPartsWithDeclarations ||
+        kind == idl.LinkedNodeKind.forPartsWithExpression);
+    return _variantField_5 ??= <LinkedNodeBuilder>[];
+  }
+
+  set classOrMixinDeclaration_members(List<LinkedNodeBuilder> value) {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration);
+    _variantField_5 = value;
+  }
+
+  set forParts_updaters(List<LinkedNodeBuilder> value) {
+    assert(kind == idl.LinkedNodeKind.forPartsWithDeclarations ||
+        kind == idl.LinkedNodeKind.forPartsWithExpression);
+    _variantField_5 = value;
+  }
+
+  @override
+  LinkedNodeBuilder get classOrMixinDeclaration_typeParameters {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration);
+    return _variantField_13;
+  }
+
+  set classOrMixinDeclaration_typeParameters(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration);
+    _variantField_13 = value;
+  }
+
+  @override
+  int get codeLength {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.constructorDeclaration ||
+        kind == idl.LinkedNodeKind.defaultFormalParameter ||
+        kind == idl.LinkedNodeKind.enumDeclaration ||
+        kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.genericTypeAlias ||
+        kind == idl.LinkedNodeKind.methodDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter ||
+        kind == idl.LinkedNodeKind.typeParameter ||
+        kind == idl.LinkedNodeKind.variableDeclaration);
+    return _variantField_34 ??= 0;
+  }
+
+  set codeLength(int value) {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.constructorDeclaration ||
+        kind == idl.LinkedNodeKind.defaultFormalParameter ||
+        kind == idl.LinkedNodeKind.enumDeclaration ||
+        kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.genericTypeAlias ||
+        kind == idl.LinkedNodeKind.methodDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter ||
+        kind == idl.LinkedNodeKind.typeParameter ||
+        kind == idl.LinkedNodeKind.variableDeclaration);
+    assert(value == null || value >= 0);
+    _variantField_34 = value;
+  }
+
+  @override
+  int get codeOffset {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.constructorDeclaration ||
+        kind == idl.LinkedNodeKind.defaultFormalParameter ||
+        kind == idl.LinkedNodeKind.enumDeclaration ||
+        kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.genericTypeAlias ||
+        kind == idl.LinkedNodeKind.methodDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter ||
+        kind == idl.LinkedNodeKind.typeParameter ||
+        kind == idl.LinkedNodeKind.variableDeclaration);
+    return _variantField_33 ??= 0;
+  }
+
+  @override
+  int get directive_semicolon {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.libraryDirective ||
+        kind == idl.LinkedNodeKind.partDirective ||
+        kind == idl.LinkedNodeKind.partOfDirective);
+    return _variantField_33 ??= 0;
+  }
+
+  set codeOffset(int value) {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.constructorDeclaration ||
+        kind == idl.LinkedNodeKind.defaultFormalParameter ||
+        kind == idl.LinkedNodeKind.enumDeclaration ||
+        kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.genericTypeAlias ||
+        kind == idl.LinkedNodeKind.methodDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter ||
+        kind == idl.LinkedNodeKind.typeParameter ||
+        kind == idl.LinkedNodeKind.variableDeclaration);
+    assert(value == null || value >= 0);
+    _variantField_33 = value;
+  }
+
+  set directive_semicolon(int value) {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.libraryDirective ||
+        kind == idl.LinkedNodeKind.partDirective ||
+        kind == idl.LinkedNodeKind.partOfDirective);
+    assert(value == null || value >= 0);
+    _variantField_33 = value;
+  }
+
+  @override
+  List<int> get comment_tokens {
+    assert(kind == idl.LinkedNodeKind.comment);
+    return _variantField_28 ??= <int>[];
+  }
+
+  @override
+  List<int> get symbolLiteral_components {
+    assert(kind == idl.LinkedNodeKind.symbolLiteral);
+    return _variantField_28 ??= <int>[];
+  }
+
+  set comment_tokens(List<int> value) {
+    assert(kind == idl.LinkedNodeKind.comment);
+    assert(value == null || value.every((e) => e >= 0));
+    _variantField_28 = value;
+  }
+
+  set symbolLiteral_components(List<int> value) {
+    assert(kind == idl.LinkedNodeKind.symbolLiteral);
+    assert(value == null || value.every((e) => e >= 0));
+    _variantField_28 = value;
+  }
+
+  @override
+  idl.LinkedNodeCommentType get comment_type {
+    assert(kind == idl.LinkedNodeKind.comment);
+    return _variantField_29 ??= idl.LinkedNodeCommentType.block;
+  }
+
+  set comment_type(idl.LinkedNodeCommentType value) {
+    assert(kind == idl.LinkedNodeKind.comment);
+    _variantField_29 = value;
+  }
+
+  @override
+  List<LinkedNodeBuilder> get compilationUnit_directives {
+    assert(kind == idl.LinkedNodeKind.compilationUnit);
+    return _variantField_3 ??= <LinkedNodeBuilder>[];
+  }
+
+  @override
+  List<LinkedNodeBuilder> get namespaceDirective_configurations {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective);
+    return _variantField_3 ??= <LinkedNodeBuilder>[];
+  }
+
+  @override
+  List<LinkedNodeBuilder> get switchMember_labels {
+    assert(kind == idl.LinkedNodeKind.switchCase ||
+        kind == idl.LinkedNodeKind.switchDefault);
+    return _variantField_3 ??= <LinkedNodeBuilder>[];
+  }
+
+  set compilationUnit_directives(List<LinkedNodeBuilder> value) {
+    assert(kind == idl.LinkedNodeKind.compilationUnit);
+    _variantField_3 = value;
+  }
+
+  set namespaceDirective_configurations(List<LinkedNodeBuilder> value) {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective);
+    _variantField_3 = value;
+  }
+
+  set switchMember_labels(List<LinkedNodeBuilder> value) {
+    assert(kind == idl.LinkedNodeKind.switchCase ||
+        kind == idl.LinkedNodeKind.switchDefault);
+    _variantField_3 = value;
+  }
+
+  @override
+  LinkedNodeBuilder get constructorDeclaration_returnType {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    return _variantField_10;
+  }
+
+  @override
+  LinkedNodeBuilder get methodDeclaration_name {
+    assert(kind == idl.LinkedNodeKind.methodDeclaration);
+    return _variantField_10;
+  }
+
+  set constructorDeclaration_returnType(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    _variantField_10 = value;
+  }
+
+  set methodDeclaration_name(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.methodDeclaration);
+    _variantField_10 = value;
+  }
+
+  @override
+  double get doubleLiteral_value {
+    assert(kind == idl.LinkedNodeKind.doubleLiteral);
+    return _variantField_21 ??= 0.0;
+  }
+
+  set doubleLiteral_value(double value) {
+    assert(kind == idl.LinkedNodeKind.doubleLiteral);
+    _variantField_21 = value;
+  }
+
+  @override
+  LinkedNodeTypeBuilder get expression_type {
+    assert(kind == idl.LinkedNodeKind.adjacentStrings ||
+        kind == idl.LinkedNodeKind.assignmentExpression ||
+        kind == idl.LinkedNodeKind.asExpression ||
+        kind == idl.LinkedNodeKind.awaitExpression ||
+        kind == idl.LinkedNodeKind.binaryExpression ||
+        kind == idl.LinkedNodeKind.booleanLiteral ||
+        kind == idl.LinkedNodeKind.cascadeExpression ||
+        kind == idl.LinkedNodeKind.conditionalExpression ||
+        kind == idl.LinkedNodeKind.doubleLiteral ||
+        kind == idl.LinkedNodeKind.functionExpressionInvocation ||
+        kind == idl.LinkedNodeKind.indexExpression ||
+        kind == idl.LinkedNodeKind.instanceCreationExpression ||
+        kind == idl.LinkedNodeKind.integerLiteral ||
+        kind == idl.LinkedNodeKind.isExpression ||
+        kind == idl.LinkedNodeKind.listLiteral ||
+        kind == idl.LinkedNodeKind.methodInvocation ||
+        kind == idl.LinkedNodeKind.namedExpression ||
+        kind == idl.LinkedNodeKind.nullLiteral ||
+        kind == idl.LinkedNodeKind.parenthesizedExpression ||
+        kind == idl.LinkedNodeKind.prefixExpression ||
+        kind == idl.LinkedNodeKind.prefixedIdentifier ||
+        kind == idl.LinkedNodeKind.propertyAccess ||
+        kind == idl.LinkedNodeKind.postfixExpression ||
+        kind == idl.LinkedNodeKind.rethrowExpression ||
+        kind == idl.LinkedNodeKind.setOrMapLiteral ||
+        kind == idl.LinkedNodeKind.simpleIdentifier ||
+        kind == idl.LinkedNodeKind.simpleStringLiteral ||
+        kind == idl.LinkedNodeKind.stringInterpolation ||
+        kind == idl.LinkedNodeKind.superExpression ||
+        kind == idl.LinkedNodeKind.symbolLiteral ||
+        kind == idl.LinkedNodeKind.thisExpression ||
+        kind == idl.LinkedNodeKind.throwExpression);
+    return _variantField_25;
+  }
+
+  @override
+  LinkedNodeTypeBuilder get genericFunctionType_type {
+    assert(kind == idl.LinkedNodeKind.genericFunctionType);
+    return _variantField_25;
+  }
+
+  set expression_type(LinkedNodeTypeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.adjacentStrings ||
+        kind == idl.LinkedNodeKind.assignmentExpression ||
+        kind == idl.LinkedNodeKind.asExpression ||
+        kind == idl.LinkedNodeKind.awaitExpression ||
+        kind == idl.LinkedNodeKind.binaryExpression ||
+        kind == idl.LinkedNodeKind.booleanLiteral ||
+        kind == idl.LinkedNodeKind.cascadeExpression ||
+        kind == idl.LinkedNodeKind.conditionalExpression ||
+        kind == idl.LinkedNodeKind.doubleLiteral ||
+        kind == idl.LinkedNodeKind.functionExpressionInvocation ||
+        kind == idl.LinkedNodeKind.indexExpression ||
+        kind == idl.LinkedNodeKind.instanceCreationExpression ||
+        kind == idl.LinkedNodeKind.integerLiteral ||
+        kind == idl.LinkedNodeKind.isExpression ||
+        kind == idl.LinkedNodeKind.listLiteral ||
+        kind == idl.LinkedNodeKind.methodInvocation ||
+        kind == idl.LinkedNodeKind.namedExpression ||
+        kind == idl.LinkedNodeKind.nullLiteral ||
+        kind == idl.LinkedNodeKind.parenthesizedExpression ||
+        kind == idl.LinkedNodeKind.prefixExpression ||
+        kind == idl.LinkedNodeKind.prefixedIdentifier ||
+        kind == idl.LinkedNodeKind.propertyAccess ||
+        kind == idl.LinkedNodeKind.postfixExpression ||
+        kind == idl.LinkedNodeKind.rethrowExpression ||
+        kind == idl.LinkedNodeKind.setOrMapLiteral ||
+        kind == idl.LinkedNodeKind.simpleIdentifier ||
+        kind == idl.LinkedNodeKind.simpleStringLiteral ||
+        kind == idl.LinkedNodeKind.stringInterpolation ||
+        kind == idl.LinkedNodeKind.superExpression ||
+        kind == idl.LinkedNodeKind.symbolLiteral ||
+        kind == idl.LinkedNodeKind.thisExpression ||
+        kind == idl.LinkedNodeKind.throwExpression);
+    _variantField_25 = value;
+  }
+
+  set genericFunctionType_type(LinkedNodeTypeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.genericFunctionType);
+    _variantField_25 = value;
+  }
+
+  @override
+  idl.LinkedNodeFormalParameterKind get formalParameter_kind {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter);
+    return _variantField_26 ??= idl.LinkedNodeFormalParameterKind.required;
+  }
+
+  set formalParameter_kind(idl.LinkedNodeFormalParameterKind value) {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter);
+    _variantField_26 = value;
+  }
+
+  @override
+  String get interpolationString_value {
+    assert(kind == idl.LinkedNodeKind.interpolationString);
+    return _variantField_30 ??= '';
+  }
+
+  set interpolationString_value(String value) {
+    assert(kind == idl.LinkedNodeKind.interpolationString);
+    _variantField_30 = value;
+  }
+
+  @override
+  LinkedNodeBuilder get invocationExpression_arguments {
+    assert(kind == idl.LinkedNodeKind.functionExpressionInvocation ||
+        kind == idl.LinkedNodeKind.methodInvocation);
+    return _variantField_14;
+  }
+
+  @override
+  LinkedNodeBuilder get namedCompilationUnitMember_name {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.enumDeclaration ||
+        kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.genericTypeAlias ||
+        kind == idl.LinkedNodeKind.mixinDeclaration);
+    return _variantField_14;
+  }
+
+  @override
+  LinkedNodeBuilder get normalFormalParameter_comment {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter);
+    return _variantField_14;
+  }
+
+  @override
+  LinkedNodeBuilder get typedLiteral_typeArguments {
+    assert(kind == idl.LinkedNodeKind.listLiteral ||
+        kind == idl.LinkedNodeKind.setOrMapLiteral);
+    return _variantField_14;
+  }
+
+  @override
+  LinkedNodeBuilder get uriBasedDirective_uri {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.partDirective);
+    return _variantField_14;
+  }
+
+  set invocationExpression_arguments(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.functionExpressionInvocation ||
+        kind == idl.LinkedNodeKind.methodInvocation);
+    _variantField_14 = value;
+  }
+
+  set namedCompilationUnitMember_name(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.enumDeclaration ||
+        kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.genericTypeAlias ||
+        kind == idl.LinkedNodeKind.mixinDeclaration);
+    _variantField_14 = value;
+  }
+
+  set normalFormalParameter_comment(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter);
+    _variantField_14 = value;
+  }
+
+  set typedLiteral_typeArguments(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.listLiteral ||
+        kind == idl.LinkedNodeKind.setOrMapLiteral);
+    _variantField_14 = value;
+  }
+
+  set uriBasedDirective_uri(LinkedNodeBuilder value) {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.partDirective);
+    _variantField_14 = value;
+  }
+
+  @override
+  bool get isSynthetic => _isSynthetic ??= false;
+
+  set isSynthetic(bool value) {
+    this._isSynthetic = value;
+  }
+
+  @override
+  idl.LinkedNodeKind get kind => _kind ??= idl.LinkedNodeKind.adjacentStrings;
+
+  set kind(idl.LinkedNodeKind value) {
+    this._kind = value;
+  }
+
+  @override
+  String get namespaceDirective_selectedUri {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective);
+    return _variantField_20 ??= '';
+  }
+
+  @override
+  String get simpleStringLiteral_value {
+    assert(kind == idl.LinkedNodeKind.simpleStringLiteral);
+    return _variantField_20 ??= '';
+  }
+
+  set namespaceDirective_selectedUri(String value) {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective);
+    _variantField_20 = value;
+  }
+
+  set simpleStringLiteral_value(String value) {
+    assert(kind == idl.LinkedNodeKind.simpleStringLiteral);
+    _variantField_20 = value;
+  }
+
+  @override
+  bool get setOrMapLiteral_isSet {
+    assert(kind == idl.LinkedNodeKind.setOrMapLiteral);
+    return _variantField_31 ??= false;
+  }
+
+  @override
+  bool get simplyBoundable_isSimplyBounded {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.genericTypeAlias ||
+        kind == idl.LinkedNodeKind.mixinDeclaration);
+    return _variantField_31 ??= false;
+  }
+
+  set setOrMapLiteral_isSet(bool value) {
+    assert(kind == idl.LinkedNodeKind.setOrMapLiteral);
+    _variantField_31 = value;
+  }
+
+  set simplyBoundable_isSimplyBounded(bool value) {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.genericTypeAlias ||
+        kind == idl.LinkedNodeKind.mixinDeclaration);
+    _variantField_31 = value;
+  }
+
+  @override
+  String get uriBasedDirective_uriContent {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.partDirective);
+    return _variantField_22 ??= '';
+  }
+
+  set uriBasedDirective_uriContent(String value) {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.partDirective);
+    _variantField_22 = value;
+  }
+
+  @override
+  LinkedNodeVariablesDeclarationBuilder get variableDeclaration_declaration {
+    assert(kind == idl.LinkedNodeKind.variableDeclaration);
+    return _variantField_32;
+  }
+
+  set variableDeclaration_declaration(
+      LinkedNodeVariablesDeclarationBuilder value) {
+    assert(kind == idl.LinkedNodeKind.variableDeclaration);
+    _variantField_32 = value;
+  }
+
+  LinkedNodeBuilder.functionDeclaration({
+    LinkedNodeTypeBuilder actualReturnType,
+    LinkedNodeBuilder annotatedNode_comment,
+    List<LinkedNodeBuilder> annotatedNode_metadata,
+    LinkedNodeBuilder functionDeclaration_functionExpression,
+    int functionDeclaration_externalKeyword,
+    LinkedNodeBuilder functionDeclaration_returnType,
+    int functionDeclaration_propertyKeyword,
+    int codeLength,
+    int codeOffset,
+    LinkedNodeBuilder namedCompilationUnitMember_name,
+  })  : _kind = idl.LinkedNodeKind.functionDeclaration,
+        _variantField_24 = actualReturnType,
+        _variantField_11 = annotatedNode_comment,
+        _variantField_4 = annotatedNode_metadata,
+        _variantField_6 = functionDeclaration_functionExpression,
+        _variantField_15 = functionDeclaration_externalKeyword,
+        _variantField_7 = functionDeclaration_returnType,
+        _variantField_16 = functionDeclaration_propertyKeyword,
+        _variantField_34 = codeLength,
+        _variantField_33 = codeOffset,
+        _variantField_14 = namedCompilationUnitMember_name;
+
+  LinkedNodeBuilder.functionExpression({
+    LinkedNodeTypeBuilder actualReturnType,
+    LinkedNodeBuilder functionExpression_body,
+    LinkedNodeBuilder functionExpression_formalParameters,
+    LinkedNodeBuilder functionExpression_typeParameters,
+  })  : _kind = idl.LinkedNodeKind.functionExpression,
+        _variantField_24 = actualReturnType,
+        _variantField_6 = functionExpression_body,
+        _variantField_7 = functionExpression_formalParameters,
+        _variantField_8 = functionExpression_typeParameters;
+
+  LinkedNodeBuilder.functionTypeAlias({
+    LinkedNodeTypeBuilder actualReturnType,
+    LinkedNodeBuilder annotatedNode_comment,
+    List<LinkedNodeBuilder> annotatedNode_metadata,
+    LinkedNodeBuilder functionTypeAlias_formalParameters,
+    LinkedNodeBuilder functionTypeAlias_returnType,
+    LinkedNodeBuilder functionTypeAlias_typeParameters,
+    int typeAlias_typedefKeyword,
+    int typeAlias_semicolon,
+    int codeLength,
+    int codeOffset,
+    LinkedNodeBuilder namedCompilationUnitMember_name,
+    bool simplyBoundable_isSimplyBounded,
+  })  : _kind = idl.LinkedNodeKind.functionTypeAlias,
+        _variantField_24 = actualReturnType,
+        _variantField_11 = annotatedNode_comment,
+        _variantField_4 = annotatedNode_metadata,
+        _variantField_6 = functionTypeAlias_formalParameters,
+        _variantField_7 = functionTypeAlias_returnType,
+        _variantField_8 = functionTypeAlias_typeParameters,
+        _variantField_18 = typeAlias_typedefKeyword,
+        _variantField_19 = typeAlias_semicolon,
+        _variantField_34 = codeLength,
+        _variantField_33 = codeOffset,
+        _variantField_14 = namedCompilationUnitMember_name,
+        _variantField_31 = simplyBoundable_isSimplyBounded;
+
+  LinkedNodeBuilder.genericFunctionType({
+    LinkedNodeTypeBuilder actualReturnType,
+    LinkedNodeBuilder genericFunctionType_typeParameters,
+    int genericFunctionType_functionKeyword,
+    LinkedNodeBuilder genericFunctionType_returnType,
+    LinkedNodeBuilder genericFunctionType_formalParameters,
+    int genericFunctionType_question,
+    LinkedNodeTypeBuilder genericFunctionType_type,
+  })  : _kind = idl.LinkedNodeKind.genericFunctionType,
+        _variantField_24 = actualReturnType,
+        _variantField_6 = genericFunctionType_typeParameters,
+        _variantField_15 = genericFunctionType_functionKeyword,
+        _variantField_7 = genericFunctionType_returnType,
+        _variantField_8 = genericFunctionType_formalParameters,
+        _variantField_16 = genericFunctionType_question,
+        _variantField_25 = genericFunctionType_type;
+
+  LinkedNodeBuilder.methodDeclaration({
+    LinkedNodeTypeBuilder actualReturnType,
+    LinkedNodeBuilder annotatedNode_comment,
+    List<LinkedNodeBuilder> annotatedNode_metadata,
+    LinkedNodeBuilder methodDeclaration_body,
+    int methodDeclaration_externalKeyword,
+    LinkedNodeBuilder methodDeclaration_formalParameters,
+    LinkedNodeBuilder methodDeclaration_returnType,
+    int methodDeclaration_modifierKeyword,
+    int methodDeclaration_operatorKeyword,
+    int methodDeclaration_propertyKeyword,
+    int methodDeclaration_actualProperty,
+    LinkedNodeBuilder methodDeclaration_typeParameters,
+    int codeLength,
+    int codeOffset,
+    LinkedNodeBuilder methodDeclaration_name,
+  })  : _kind = idl.LinkedNodeKind.methodDeclaration,
+        _variantField_24 = actualReturnType,
+        _variantField_11 = annotatedNode_comment,
+        _variantField_4 = annotatedNode_metadata,
+        _variantField_6 = methodDeclaration_body,
+        _variantField_15 = methodDeclaration_externalKeyword,
+        _variantField_7 = methodDeclaration_formalParameters,
+        _variantField_8 = methodDeclaration_returnType,
+        _variantField_16 = methodDeclaration_modifierKeyword,
+        _variantField_17 = methodDeclaration_operatorKeyword,
+        _variantField_18 = methodDeclaration_propertyKeyword,
+        _variantField_19 = methodDeclaration_actualProperty,
+        _variantField_9 = methodDeclaration_typeParameters,
+        _variantField_34 = codeLength,
+        _variantField_33 = codeOffset,
+        _variantField_10 = methodDeclaration_name;
+
+  LinkedNodeBuilder.fieldFormalParameter({
+    LinkedNodeTypeBuilder actualType,
+    List<LinkedNodeBuilder> normalFormalParameter_metadata,
+    LinkedNodeBuilder fieldFormalParameter_type,
+    int fieldFormalParameter_keyword,
+    LinkedNodeBuilder fieldFormalParameter_typeParameters,
+    LinkedNodeBuilder fieldFormalParameter_formalParameters,
+    int fieldFormalParameter_period,
+    int fieldFormalParameter_thisKeyword,
+    int normalFormalParameter_covariantKeyword,
+    bool normalFormalParameter_isCovariant,
+    LinkedNodeBuilder normalFormalParameter_identifier,
+    int codeLength,
+    int codeOffset,
+    idl.LinkedNodeFormalParameterKind formalParameter_kind,
+    LinkedNodeBuilder normalFormalParameter_comment,
+  })  : _kind = idl.LinkedNodeKind.fieldFormalParameter,
+        _variantField_24 = actualType,
+        _variantField_4 = normalFormalParameter_metadata,
+        _variantField_6 = fieldFormalParameter_type,
+        _variantField_15 = fieldFormalParameter_keyword,
+        _variantField_7 = fieldFormalParameter_typeParameters,
+        _variantField_8 = fieldFormalParameter_formalParameters,
+        _variantField_16 = fieldFormalParameter_period,
+        _variantField_17 = fieldFormalParameter_thisKeyword,
+        _variantField_19 = normalFormalParameter_covariantKeyword,
+        _variantField_27 = normalFormalParameter_isCovariant,
+        _variantField_12 = normalFormalParameter_identifier,
+        _variantField_34 = codeLength,
+        _variantField_33 = codeOffset,
+        _variantField_26 = formalParameter_kind,
+        _variantField_14 = normalFormalParameter_comment;
+
+  LinkedNodeBuilder.functionTypedFormalParameter({
+    LinkedNodeTypeBuilder actualType,
+    List<LinkedNodeBuilder> normalFormalParameter_metadata,
+    LinkedNodeBuilder functionTypedFormalParameter_formalParameters,
+    LinkedNodeBuilder functionTypedFormalParameter_returnType,
+    LinkedNodeBuilder functionTypedFormalParameter_typeParameters,
+    int normalFormalParameter_covariantKeyword,
+    bool normalFormalParameter_isCovariant,
+    LinkedNodeBuilder normalFormalParameter_identifier,
+    int codeLength,
+    int codeOffset,
+    idl.LinkedNodeFormalParameterKind formalParameter_kind,
+    LinkedNodeBuilder normalFormalParameter_comment,
+  })  : _kind = idl.LinkedNodeKind.functionTypedFormalParameter,
+        _variantField_24 = actualType,
+        _variantField_4 = normalFormalParameter_metadata,
+        _variantField_6 = functionTypedFormalParameter_formalParameters,
+        _variantField_7 = functionTypedFormalParameter_returnType,
+        _variantField_8 = functionTypedFormalParameter_typeParameters,
+        _variantField_19 = normalFormalParameter_covariantKeyword,
+        _variantField_27 = normalFormalParameter_isCovariant,
+        _variantField_12 = normalFormalParameter_identifier,
+        _variantField_34 = codeLength,
+        _variantField_33 = codeOffset,
+        _variantField_26 = formalParameter_kind,
+        _variantField_14 = normalFormalParameter_comment;
+
+  LinkedNodeBuilder.simpleFormalParameter({
+    LinkedNodeTypeBuilder actualType,
+    List<LinkedNodeBuilder> normalFormalParameter_metadata,
+    LinkedNodeBuilder simpleFormalParameter_type,
+    int simpleFormalParameter_keyword,
+    int normalFormalParameter_covariantKeyword,
+    bool normalFormalParameter_isCovariant,
+    LinkedNodeBuilder normalFormalParameter_identifier,
+    int codeLength,
+    int codeOffset,
+    idl.LinkedNodeFormalParameterKind formalParameter_kind,
+    LinkedNodeBuilder normalFormalParameter_comment,
+  })  : _kind = idl.LinkedNodeKind.simpleFormalParameter,
+        _variantField_24 = actualType,
+        _variantField_4 = normalFormalParameter_metadata,
+        _variantField_6 = simpleFormalParameter_type,
+        _variantField_15 = simpleFormalParameter_keyword,
+        _variantField_19 = normalFormalParameter_covariantKeyword,
+        _variantField_27 = normalFormalParameter_isCovariant,
+        _variantField_12 = normalFormalParameter_identifier,
+        _variantField_34 = codeLength,
+        _variantField_33 = codeOffset,
+        _variantField_26 = formalParameter_kind,
+        _variantField_14 = normalFormalParameter_comment;
+
+  LinkedNodeBuilder.variableDeclaration({
+    LinkedNodeTypeBuilder actualType,
+    LinkedNodeBuilder annotatedNode_comment,
+    List<LinkedNodeBuilder> annotatedNode_metadata,
+    LinkedNodeBuilder variableDeclaration_initializer,
+    int variableDeclaration_equals,
+    LinkedNodeBuilder variableDeclaration_name,
+    int codeLength,
+    int codeOffset,
+    LinkedNodeVariablesDeclarationBuilder variableDeclaration_declaration,
+  })  : _kind = idl.LinkedNodeKind.variableDeclaration,
+        _variantField_24 = actualType,
+        _variantField_11 = annotatedNode_comment,
+        _variantField_4 = annotatedNode_metadata,
+        _variantField_6 = variableDeclaration_initializer,
+        _variantField_15 = variableDeclaration_equals,
+        _variantField_7 = variableDeclaration_name,
+        _variantField_34 = codeLength,
+        _variantField_33 = codeOffset,
+        _variantField_32 = variableDeclaration_declaration;
+
+  LinkedNodeBuilder.binaryExpression({
+    LinkedNodeTypeBuilder binaryExpression_invokeType,
+    LinkedNodeBuilder binaryExpression_leftOperand,
+    int binaryExpression_element,
+    LinkedNodeBuilder binaryExpression_rightOperand,
+    int binaryExpression_operator,
+    LinkedNodeTypeBuilder binaryExpression_elementType,
+    LinkedNodeTypeBuilder expression_type,
+  })  : _kind = idl.LinkedNodeKind.binaryExpression,
+        _variantField_24 = binaryExpression_invokeType,
+        _variantField_6 = binaryExpression_leftOperand,
+        _variantField_15 = binaryExpression_element,
+        _variantField_7 = binaryExpression_rightOperand,
+        _variantField_16 = binaryExpression_operator,
+        _variantField_23 = binaryExpression_elementType,
+        _variantField_25 = expression_type;
+
+  LinkedNodeBuilder.functionExpressionInvocation({
+    LinkedNodeTypeBuilder invocationExpression_invokeType,
+    LinkedNodeBuilder functionExpressionInvocation_function,
+    LinkedNodeBuilder invocationExpression_typeArguments,
+    LinkedNodeTypeBuilder expression_type,
+    LinkedNodeBuilder invocationExpression_arguments,
+  })  : _kind = idl.LinkedNodeKind.functionExpressionInvocation,
+        _variantField_24 = invocationExpression_invokeType,
+        _variantField_6 = functionExpressionInvocation_function,
+        _variantField_12 = invocationExpression_typeArguments,
+        _variantField_25 = expression_type,
+        _variantField_14 = invocationExpression_arguments;
+
+  LinkedNodeBuilder.methodInvocation({
+    LinkedNodeTypeBuilder invocationExpression_invokeType,
+    LinkedNodeBuilder methodInvocation_methodName,
+    int methodInvocation_operator,
+    LinkedNodeBuilder methodInvocation_target,
+    LinkedNodeBuilder invocationExpression_typeArguments,
+    LinkedNodeTypeBuilder expression_type,
+    LinkedNodeBuilder invocationExpression_arguments,
+  })  : _kind = idl.LinkedNodeKind.methodInvocation,
+        _variantField_24 = invocationExpression_invokeType,
+        _variantField_6 = methodInvocation_methodName,
+        _variantField_15 = methodInvocation_operator,
+        _variantField_7 = methodInvocation_target,
+        _variantField_12 = invocationExpression_typeArguments,
+        _variantField_25 = expression_type,
+        _variantField_14 = invocationExpression_arguments;
+
+  LinkedNodeBuilder.adjacentStrings({
+    List<LinkedNodeBuilder> adjacentStrings_strings,
+    LinkedNodeTypeBuilder expression_type,
+  })  : _kind = idl.LinkedNodeKind.adjacentStrings,
+        _variantField_2 = adjacentStrings_strings,
+        _variantField_25 = expression_type;
+
+  LinkedNodeBuilder.argumentList({
+    List<LinkedNodeBuilder> argumentList_arguments,
+    int argumentList_leftParenthesis,
+    int argumentList_rightParenthesis,
+  })  : _kind = idl.LinkedNodeKind.argumentList,
+        _variantField_2 = argumentList_arguments,
+        _variantField_15 = argumentList_leftParenthesis,
+        _variantField_16 = argumentList_rightParenthesis;
+
+  LinkedNodeBuilder.block({
+    List<LinkedNodeBuilder> block_statements,
+    int block_leftBracket,
+    int block_rightBracket,
+  })  : _kind = idl.LinkedNodeKind.block,
+        _variantField_2 = block_statements,
+        _variantField_15 = block_leftBracket,
+        _variantField_16 = block_rightBracket;
+
+  LinkedNodeBuilder.cascadeExpression({
+    List<LinkedNodeBuilder> cascadeExpression_sections,
+    LinkedNodeBuilder cascadeExpression_target,
+    LinkedNodeTypeBuilder expression_type,
+  })  : _kind = idl.LinkedNodeKind.cascadeExpression,
+        _variantField_2 = cascadeExpression_sections,
+        _variantField_6 = cascadeExpression_target,
+        _variantField_25 = expression_type;
+
+  LinkedNodeBuilder.compilationUnit({
+    List<LinkedNodeBuilder> compilationUnit_declarations,
+    LinkedNodeBuilder compilationUnit_scriptTag,
+    int compilationUnit_beginToken,
+    int compilationUnit_endToken,
+    List<LinkedNodeBuilder> compilationUnit_directives,
+  })  : _kind = idl.LinkedNodeKind.compilationUnit,
+        _variantField_2 = compilationUnit_declarations,
+        _variantField_6 = compilationUnit_scriptTag,
+        _variantField_15 = compilationUnit_beginToken,
+        _variantField_16 = compilationUnit_endToken,
+        _variantField_3 = compilationUnit_directives;
+
+  LinkedNodeBuilder.constructorDeclaration({
+    List<LinkedNodeBuilder> constructorDeclaration_initializers,
+    LinkedNodeBuilder annotatedNode_comment,
+    List<LinkedNodeBuilder> annotatedNode_metadata,
+    LinkedNodeBuilder constructorDeclaration_body,
+    int constructorDeclaration_constKeyword,
+    LinkedNodeBuilder constructorDeclaration_name,
+    LinkedNodeBuilder constructorDeclaration_parameters,
+    int constructorDeclaration_externalKeyword,
+    int constructorDeclaration_factoryKeyword,
+    int constructorDeclaration_period,
+    int constructorDeclaration_separator,
+    LinkedNodeBuilder constructorDeclaration_redirectedConstructor,
+    int codeLength,
+    int codeOffset,
+    LinkedNodeBuilder constructorDeclaration_returnType,
+  })  : _kind = idl.LinkedNodeKind.constructorDeclaration,
+        _variantField_2 = constructorDeclaration_initializers,
+        _variantField_11 = annotatedNode_comment,
+        _variantField_4 = annotatedNode_metadata,
+        _variantField_6 = constructorDeclaration_body,
+        _variantField_15 = constructorDeclaration_constKeyword,
+        _variantField_7 = constructorDeclaration_name,
+        _variantField_8 = constructorDeclaration_parameters,
+        _variantField_16 = constructorDeclaration_externalKeyword,
+        _variantField_17 = constructorDeclaration_factoryKeyword,
+        _variantField_18 = constructorDeclaration_period,
+        _variantField_19 = constructorDeclaration_separator,
+        _variantField_9 = constructorDeclaration_redirectedConstructor,
+        _variantField_34 = codeLength,
+        _variantField_33 = codeOffset,
+        _variantField_10 = constructorDeclaration_returnType;
+
+  LinkedNodeBuilder.dottedName({
+    List<LinkedNodeBuilder> dottedName_components,
+  })  : _kind = idl.LinkedNodeKind.dottedName,
+        _variantField_2 = dottedName_components;
+
+  LinkedNodeBuilder.enumDeclaration({
+    List<LinkedNodeBuilder> enumDeclaration_constants,
+    LinkedNodeBuilder annotatedNode_comment,
+    List<LinkedNodeBuilder> annotatedNode_metadata,
+    int enumDeclaration_enumKeyword,
+    int enumDeclaration_leftBracket,
+    int enumDeclaration_rightBracket,
+    int codeLength,
+    int codeOffset,
+    LinkedNodeBuilder namedCompilationUnitMember_name,
+  })  : _kind = idl.LinkedNodeKind.enumDeclaration,
+        _variantField_2 = enumDeclaration_constants,
+        _variantField_11 = annotatedNode_comment,
+        _variantField_4 = annotatedNode_metadata,
+        _variantField_15 = enumDeclaration_enumKeyword,
+        _variantField_16 = enumDeclaration_leftBracket,
+        _variantField_17 = enumDeclaration_rightBracket,
+        _variantField_34 = codeLength,
+        _variantField_33 = codeOffset,
+        _variantField_14 = namedCompilationUnitMember_name;
+
+  LinkedNodeBuilder.formalParameterList({
+    List<LinkedNodeBuilder> formalParameterList_parameters,
+    int formalParameterList_leftDelimiter,
+    int formalParameterList_leftParenthesis,
+    int formalParameterList_rightDelimiter,
+    int formalParameterList_rightParenthesis,
+  })  : _kind = idl.LinkedNodeKind.formalParameterList,
+        _variantField_2 = formalParameterList_parameters,
+        _variantField_15 = formalParameterList_leftDelimiter,
+        _variantField_16 = formalParameterList_leftParenthesis,
+        _variantField_17 = formalParameterList_rightDelimiter,
+        _variantField_18 = formalParameterList_rightParenthesis;
+
+  LinkedNodeBuilder.hideCombinator({
+    List<LinkedNodeBuilder> hideCombinator_hiddenNames,
+    int combinator_keyword,
+  })  : _kind = idl.LinkedNodeKind.hideCombinator,
+        _variantField_2 = hideCombinator_hiddenNames,
+        _variantField_19 = combinator_keyword;
+
+  LinkedNodeBuilder.implementsClause({
+    List<LinkedNodeBuilder> implementsClause_interfaces,
+    int implementsClause_implementsKeyword,
+  })  : _kind = idl.LinkedNodeKind.implementsClause,
+        _variantField_2 = implementsClause_interfaces,
+        _variantField_15 = implementsClause_implementsKeyword;
+
+  LinkedNodeBuilder.labeledStatement({
+    List<LinkedNodeBuilder> labeledStatement_labels,
+    LinkedNodeBuilder labeledStatement_statement,
+  })  : _kind = idl.LinkedNodeKind.labeledStatement,
+        _variantField_2 = labeledStatement_labels,
+        _variantField_6 = labeledStatement_statement;
+
+  LinkedNodeBuilder.libraryIdentifier({
+    List<LinkedNodeBuilder> libraryIdentifier_components,
+  })  : _kind = idl.LinkedNodeKind.libraryIdentifier,
+        _variantField_2 = libraryIdentifier_components;
+
+  LinkedNodeBuilder.listLiteral({
+    List<LinkedNodeBuilder> listLiteral_elements,
+    int listLiteral_leftBracket,
+    int listLiteral_rightBracket,
+    int typedLiteral_constKeyword,
+    LinkedNodeTypeBuilder expression_type,
+    LinkedNodeBuilder typedLiteral_typeArguments,
+  })  : _kind = idl.LinkedNodeKind.listLiteral,
+        _variantField_2 = listLiteral_elements,
+        _variantField_15 = listLiteral_leftBracket,
+        _variantField_16 = listLiteral_rightBracket,
+        _variantField_19 = typedLiteral_constKeyword,
+        _variantField_25 = expression_type,
+        _variantField_14 = typedLiteral_typeArguments;
+
+  LinkedNodeBuilder.exportDirective({
+    List<LinkedNodeBuilder> namespaceDirective_combinators,
+    LinkedNodeBuilder annotatedNode_comment,
+    List<LinkedNodeBuilder> annotatedNode_metadata,
+    int directive_keyword,
+    int uriBasedDirective_uriElement,
+    int directive_semicolon,
+    List<LinkedNodeBuilder> namespaceDirective_configurations,
+    LinkedNodeBuilder uriBasedDirective_uri,
+    String namespaceDirective_selectedUri,
+    String uriBasedDirective_uriContent,
+  })  : _kind = idl.LinkedNodeKind.exportDirective,
+        _variantField_2 = namespaceDirective_combinators,
+        _variantField_11 = annotatedNode_comment,
+        _variantField_4 = annotatedNode_metadata,
+        _variantField_18 = directive_keyword,
+        _variantField_19 = uriBasedDirective_uriElement,
+        _variantField_33 = directive_semicolon,
+        _variantField_3 = namespaceDirective_configurations,
+        _variantField_14 = uriBasedDirective_uri,
+        _variantField_20 = namespaceDirective_selectedUri,
+        _variantField_22 = uriBasedDirective_uriContent;
+
+  LinkedNodeBuilder.importDirective({
+    List<LinkedNodeBuilder> namespaceDirective_combinators,
+    LinkedNodeBuilder annotatedNode_comment,
+    List<LinkedNodeBuilder> annotatedNode_metadata,
+    LinkedNodeBuilder importDirective_prefix,
+    int importDirective_asKeyword,
+    int importDirective_deferredKeyword,
+    int directive_keyword,
+    int uriBasedDirective_uriElement,
+    int directive_semicolon,
+    List<LinkedNodeBuilder> namespaceDirective_configurations,
+    LinkedNodeBuilder uriBasedDirective_uri,
+    String namespaceDirective_selectedUri,
+    String uriBasedDirective_uriContent,
+  })  : _kind = idl.LinkedNodeKind.importDirective,
+        _variantField_2 = namespaceDirective_combinators,
+        _variantField_11 = annotatedNode_comment,
+        _variantField_4 = annotatedNode_metadata,
+        _variantField_6 = importDirective_prefix,
+        _variantField_15 = importDirective_asKeyword,
+        _variantField_16 = importDirective_deferredKeyword,
+        _variantField_18 = directive_keyword,
+        _variantField_19 = uriBasedDirective_uriElement,
+        _variantField_33 = directive_semicolon,
+        _variantField_3 = namespaceDirective_configurations,
+        _variantField_14 = uriBasedDirective_uri,
+        _variantField_20 = namespaceDirective_selectedUri,
+        _variantField_22 = uriBasedDirective_uriContent;
+
+  LinkedNodeBuilder.onClause({
+    List<LinkedNodeBuilder> onClause_superclassConstraints,
+    int onClause_onKeyword,
+  })  : _kind = idl.LinkedNodeKind.onClause,
+        _variantField_2 = onClause_superclassConstraints,
+        _variantField_15 = onClause_onKeyword;
+
+  LinkedNodeBuilder.setOrMapLiteral({
+    List<LinkedNodeBuilder> setOrMapLiteral_elements,
+    int setOrMapLiteral_leftBracket,
+    int setOrMapLiteral_rightBracket,
+    int typedLiteral_constKeyword,
+    bool setOrMapLiteral_isMap,
+    LinkedNodeTypeBuilder expression_type,
+    LinkedNodeBuilder typedLiteral_typeArguments,
+    bool setOrMapLiteral_isSet,
+  })  : _kind = idl.LinkedNodeKind.setOrMapLiteral,
+        _variantField_2 = setOrMapLiteral_elements,
+        _variantField_15 = setOrMapLiteral_leftBracket,
+        _variantField_16 = setOrMapLiteral_rightBracket,
+        _variantField_19 = typedLiteral_constKeyword,
+        _variantField_27 = setOrMapLiteral_isMap,
+        _variantField_25 = expression_type,
+        _variantField_14 = typedLiteral_typeArguments,
+        _variantField_31 = setOrMapLiteral_isSet;
+
+  LinkedNodeBuilder.showCombinator({
+    List<LinkedNodeBuilder> showCombinator_shownNames,
+    int combinator_keyword,
+  })  : _kind = idl.LinkedNodeKind.showCombinator,
+        _variantField_2 = showCombinator_shownNames,
+        _variantField_19 = combinator_keyword;
+
+  LinkedNodeBuilder.stringInterpolation({
+    List<LinkedNodeBuilder> stringInterpolation_elements,
+    LinkedNodeTypeBuilder expression_type,
+  })  : _kind = idl.LinkedNodeKind.stringInterpolation,
+        _variantField_2 = stringInterpolation_elements,
+        _variantField_25 = expression_type;
+
+  LinkedNodeBuilder.switchStatement({
+    List<LinkedNodeBuilder> switchStatement_members,
+    int switchStatement_leftParenthesis,
+    LinkedNodeBuilder switchStatement_expression,
+    int switchStatement_rightParenthesis,
+    int switchStatement_switchKeyword,
+    int switchStatement_leftBracket,
+    int switchStatement_rightBracket,
+  })  : _kind = idl.LinkedNodeKind.switchStatement,
+        _variantField_2 = switchStatement_members,
+        _variantField_15 = switchStatement_leftParenthesis,
+        _variantField_7 = switchStatement_expression,
+        _variantField_16 = switchStatement_rightParenthesis,
+        _variantField_17 = switchStatement_switchKeyword,
+        _variantField_18 = switchStatement_leftBracket,
+        _variantField_19 = switchStatement_rightBracket;
+
+  LinkedNodeBuilder.tryStatement({
+    List<LinkedNodeBuilder> tryStatement_catchClauses,
+    LinkedNodeBuilder tryStatement_body,
+    int tryStatement_finallyKeyword,
+    LinkedNodeBuilder tryStatement_finallyBlock,
+    int tryStatement_tryKeyword,
+  })  : _kind = idl.LinkedNodeKind.tryStatement,
+        _variantField_2 = tryStatement_catchClauses,
+        _variantField_6 = tryStatement_body,
+        _variantField_15 = tryStatement_finallyKeyword,
+        _variantField_7 = tryStatement_finallyBlock,
+        _variantField_16 = tryStatement_tryKeyword;
+
+  LinkedNodeBuilder.typeArgumentList({
+    List<LinkedNodeBuilder> typeArgumentList_arguments,
+    int typeArgumentList_leftBracket,
+    int typeArgumentList_rightBracket,
+  })  : _kind = idl.LinkedNodeKind.typeArgumentList,
+        _variantField_2 = typeArgumentList_arguments,
+        _variantField_15 = typeArgumentList_leftBracket,
+        _variantField_16 = typeArgumentList_rightBracket;
+
+  LinkedNodeBuilder.typeParameterList({
+    List<LinkedNodeBuilder> typeParameterList_typeParameters,
+    int typeParameterList_leftBracket,
+    int typeParameterList_rightBracket,
+  })  : _kind = idl.LinkedNodeKind.typeParameterList,
+        _variantField_2 = typeParameterList_typeParameters,
+        _variantField_15 = typeParameterList_leftBracket,
+        _variantField_16 = typeParameterList_rightBracket;
+
+  LinkedNodeBuilder.variableDeclarationList({
+    List<LinkedNodeBuilder> variableDeclarationList_variables,
+    LinkedNodeBuilder annotatedNode_comment,
+    List<LinkedNodeBuilder> annotatedNode_metadata,
+    LinkedNodeBuilder variableDeclarationList_type,
+    int variableDeclarationList_keyword,
+  })  : _kind = idl.LinkedNodeKind.variableDeclarationList,
+        _variantField_2 = variableDeclarationList_variables,
+        _variantField_11 = annotatedNode_comment,
+        _variantField_4 = annotatedNode_metadata,
+        _variantField_6 = variableDeclarationList_type,
+        _variantField_15 = variableDeclarationList_keyword;
+
+  LinkedNodeBuilder.withClause({
+    List<LinkedNodeBuilder> withClause_mixinTypes,
+    int withClause_withKeyword,
+  })  : _kind = idl.LinkedNodeKind.withClause,
+        _variantField_2 = withClause_mixinTypes,
+        _variantField_15 = withClause_withKeyword;
+
+  LinkedNodeBuilder.classDeclaration({
+    LinkedNodeBuilder annotatedNode_comment,
+    List<LinkedNodeBuilder> annotatedNode_metadata,
+    LinkedNodeBuilder classDeclaration_extendsClause,
+    int classDeclaration_abstractKeyword,
+    LinkedNodeBuilder classDeclaration_withClause,
+    LinkedNodeBuilder classDeclaration_nativeClause,
+    int classDeclaration_classKeyword,
+    int classOrMixinDeclaration_rightBracket,
+    int classOrMixinDeclaration_leftBracket,
+    bool classDeclaration_isDartObject,
+    LinkedNodeBuilder classOrMixinDeclaration_implementsClause,
+    List<LinkedNodeBuilder> classOrMixinDeclaration_members,
+    LinkedNodeBuilder classOrMixinDeclaration_typeParameters,
+    int codeLength,
+    int codeOffset,
+    LinkedNodeBuilder namedCompilationUnitMember_name,
+    bool simplyBoundable_isSimplyBounded,
+  })  : _kind = idl.LinkedNodeKind.classDeclaration,
+        _variantField_11 = annotatedNode_comment,
+        _variantField_4 = annotatedNode_metadata,
+        _variantField_6 = classDeclaration_extendsClause,
+        _variantField_15 = classDeclaration_abstractKeyword,
+        _variantField_7 = classDeclaration_withClause,
+        _variantField_8 = classDeclaration_nativeClause,
+        _variantField_16 = classDeclaration_classKeyword,
+        _variantField_18 = classOrMixinDeclaration_rightBracket,
+        _variantField_19 = classOrMixinDeclaration_leftBracket,
+        _variantField_27 = classDeclaration_isDartObject,
+        _variantField_12 = classOrMixinDeclaration_implementsClause,
+        _variantField_5 = classOrMixinDeclaration_members,
+        _variantField_13 = classOrMixinDeclaration_typeParameters,
+        _variantField_34 = codeLength,
+        _variantField_33 = codeOffset,
+        _variantField_14 = namedCompilationUnitMember_name,
+        _variantField_31 = simplyBoundable_isSimplyBounded;
+
+  LinkedNodeBuilder.classTypeAlias({
+    LinkedNodeBuilder annotatedNode_comment,
+    List<LinkedNodeBuilder> annotatedNode_metadata,
+    LinkedNodeBuilder classTypeAlias_typeParameters,
+    int classTypeAlias_abstractKeyword,
+    LinkedNodeBuilder classTypeAlias_superclass,
+    LinkedNodeBuilder classTypeAlias_withClause,
+    int classTypeAlias_equals,
+    int typeAlias_typedefKeyword,
+    int typeAlias_semicolon,
+    LinkedNodeBuilder classTypeAlias_implementsClause,
+    int codeLength,
+    int codeOffset,
+    LinkedNodeBuilder namedCompilationUnitMember_name,
+    bool simplyBoundable_isSimplyBounded,
+  })  : _kind = idl.LinkedNodeKind.classTypeAlias,
+        _variantField_11 = annotatedNode_comment,
+        _variantField_4 = annotatedNode_metadata,
+        _variantField_6 = classTypeAlias_typeParameters,
+        _variantField_15 = classTypeAlias_abstractKeyword,
+        _variantField_7 = classTypeAlias_superclass,
+        _variantField_8 = classTypeAlias_withClause,
+        _variantField_16 = classTypeAlias_equals,
+        _variantField_18 = typeAlias_typedefKeyword,
+        _variantField_19 = typeAlias_semicolon,
+        _variantField_9 = classTypeAlias_implementsClause,
+        _variantField_34 = codeLength,
+        _variantField_33 = codeOffset,
+        _variantField_14 = namedCompilationUnitMember_name,
+        _variantField_31 = simplyBoundable_isSimplyBounded;
+
+  LinkedNodeBuilder.declaredIdentifier({
+    LinkedNodeBuilder annotatedNode_comment,
+    List<LinkedNodeBuilder> annotatedNode_metadata,
+    LinkedNodeBuilder declaredIdentifier_identifier,
+    int declaredIdentifier_keyword,
+    LinkedNodeBuilder declaredIdentifier_type,
+  })  : _kind = idl.LinkedNodeKind.declaredIdentifier,
+        _variantField_11 = annotatedNode_comment,
+        _variantField_4 = annotatedNode_metadata,
+        _variantField_6 = declaredIdentifier_identifier,
+        _variantField_15 = declaredIdentifier_keyword,
+        _variantField_7 = declaredIdentifier_type;
+
+  LinkedNodeBuilder.enumConstantDeclaration({
+    LinkedNodeBuilder annotatedNode_comment,
+    List<LinkedNodeBuilder> annotatedNode_metadata,
+    LinkedNodeBuilder enumConstantDeclaration_name,
+  })  : _kind = idl.LinkedNodeKind.enumConstantDeclaration,
+        _variantField_11 = annotatedNode_comment,
+        _variantField_4 = annotatedNode_metadata,
+        _variantField_6 = enumConstantDeclaration_name;
+
+  LinkedNodeBuilder.fieldDeclaration({
+    LinkedNodeBuilder annotatedNode_comment,
+    List<LinkedNodeBuilder> annotatedNode_metadata,
+    LinkedNodeBuilder fieldDeclaration_fields,
+    int fieldDeclaration_covariantKeyword,
+    int fieldDeclaration_semicolon,
+    int fieldDeclaration_staticKeyword,
+  })  : _kind = idl.LinkedNodeKind.fieldDeclaration,
+        _variantField_11 = annotatedNode_comment,
+        _variantField_4 = annotatedNode_metadata,
+        _variantField_6 = fieldDeclaration_fields,
+        _variantField_15 = fieldDeclaration_covariantKeyword,
+        _variantField_16 = fieldDeclaration_semicolon,
+        _variantField_17 = fieldDeclaration_staticKeyword;
+
+  LinkedNodeBuilder.genericTypeAlias({
+    LinkedNodeBuilder annotatedNode_comment,
+    List<LinkedNodeBuilder> annotatedNode_metadata,
+    LinkedNodeBuilder genericTypeAlias_typeParameters,
+    LinkedNodeBuilder genericTypeAlias_functionType,
+    int genericTypeAlias_equals,
+    int typeAlias_typedefKeyword,
+    int typeAlias_semicolon,
+    int codeLength,
+    int codeOffset,
+    LinkedNodeBuilder namedCompilationUnitMember_name,
+    bool simplyBoundable_isSimplyBounded,
+  })  : _kind = idl.LinkedNodeKind.genericTypeAlias,
+        _variantField_11 = annotatedNode_comment,
+        _variantField_4 = annotatedNode_metadata,
+        _variantField_6 = genericTypeAlias_typeParameters,
+        _variantField_7 = genericTypeAlias_functionType,
+        _variantField_16 = genericTypeAlias_equals,
+        _variantField_18 = typeAlias_typedefKeyword,
+        _variantField_19 = typeAlias_semicolon,
+        _variantField_34 = codeLength,
+        _variantField_33 = codeOffset,
+        _variantField_14 = namedCompilationUnitMember_name,
+        _variantField_31 = simplyBoundable_isSimplyBounded;
+
+  LinkedNodeBuilder.libraryDirective({
+    LinkedNodeBuilder annotatedNode_comment,
+    List<LinkedNodeBuilder> annotatedNode_metadata,
+    LinkedNodeBuilder libraryDirective_name,
+    int directive_keyword,
+    int directive_semicolon,
+  })  : _kind = idl.LinkedNodeKind.libraryDirective,
+        _variantField_11 = annotatedNode_comment,
+        _variantField_4 = annotatedNode_metadata,
+        _variantField_6 = libraryDirective_name,
+        _variantField_18 = directive_keyword,
+        _variantField_33 = directive_semicolon;
+
+  LinkedNodeBuilder.mixinDeclaration({
+    LinkedNodeBuilder annotatedNode_comment,
+    List<LinkedNodeBuilder> annotatedNode_metadata,
+    LinkedNodeBuilder mixinDeclaration_onClause,
+    int mixinDeclaration_mixinKeyword,
+    int classOrMixinDeclaration_rightBracket,
+    int classOrMixinDeclaration_leftBracket,
+    LinkedNodeBuilder classOrMixinDeclaration_implementsClause,
+    List<LinkedNodeBuilder> classOrMixinDeclaration_members,
+    LinkedNodeBuilder classOrMixinDeclaration_typeParameters,
+    int codeLength,
+    int codeOffset,
+    LinkedNodeBuilder namedCompilationUnitMember_name,
+    bool simplyBoundable_isSimplyBounded,
+  })  : _kind = idl.LinkedNodeKind.mixinDeclaration,
+        _variantField_11 = annotatedNode_comment,
+        _variantField_4 = annotatedNode_metadata,
+        _variantField_6 = mixinDeclaration_onClause,
+        _variantField_15 = mixinDeclaration_mixinKeyword,
+        _variantField_18 = classOrMixinDeclaration_rightBracket,
+        _variantField_19 = classOrMixinDeclaration_leftBracket,
+        _variantField_12 = classOrMixinDeclaration_implementsClause,
+        _variantField_5 = classOrMixinDeclaration_members,
+        _variantField_13 = classOrMixinDeclaration_typeParameters,
+        _variantField_34 = codeLength,
+        _variantField_33 = codeOffset,
+        _variantField_14 = namedCompilationUnitMember_name,
+        _variantField_31 = simplyBoundable_isSimplyBounded;
+
+  LinkedNodeBuilder.partDirective({
+    LinkedNodeBuilder annotatedNode_comment,
+    List<LinkedNodeBuilder> annotatedNode_metadata,
+    int directive_keyword,
+    int uriBasedDirective_uriElement,
+    int directive_semicolon,
+    LinkedNodeBuilder uriBasedDirective_uri,
+    String uriBasedDirective_uriContent,
+  })  : _kind = idl.LinkedNodeKind.partDirective,
+        _variantField_11 = annotatedNode_comment,
+        _variantField_4 = annotatedNode_metadata,
+        _variantField_18 = directive_keyword,
+        _variantField_19 = uriBasedDirective_uriElement,
+        _variantField_33 = directive_semicolon,
+        _variantField_14 = uriBasedDirective_uri,
+        _variantField_22 = uriBasedDirective_uriContent;
+
+  LinkedNodeBuilder.partOfDirective({
+    LinkedNodeBuilder annotatedNode_comment,
+    List<LinkedNodeBuilder> annotatedNode_metadata,
+    LinkedNodeBuilder partOfDirective_libraryName,
+    LinkedNodeBuilder partOfDirective_uri,
+    int partOfDirective_ofKeyword,
+    int directive_keyword,
+    int directive_semicolon,
+  })  : _kind = idl.LinkedNodeKind.partOfDirective,
+        _variantField_11 = annotatedNode_comment,
+        _variantField_4 = annotatedNode_metadata,
+        _variantField_6 = partOfDirective_libraryName,
+        _variantField_7 = partOfDirective_uri,
+        _variantField_16 = partOfDirective_ofKeyword,
+        _variantField_18 = directive_keyword,
+        _variantField_33 = directive_semicolon;
+
+  LinkedNodeBuilder.topLevelVariableDeclaration({
+    LinkedNodeBuilder annotatedNode_comment,
+    List<LinkedNodeBuilder> annotatedNode_metadata,
+    LinkedNodeBuilder topLevelVariableDeclaration_variableList,
+    int topLevelVariableDeclaration_semicolon,
+  })  : _kind = idl.LinkedNodeKind.topLevelVariableDeclaration,
+        _variantField_11 = annotatedNode_comment,
+        _variantField_4 = annotatedNode_metadata,
+        _variantField_6 = topLevelVariableDeclaration_variableList,
+        _variantField_15 = topLevelVariableDeclaration_semicolon;
+
+  LinkedNodeBuilder.typeParameter({
+    LinkedNodeBuilder annotatedNode_comment,
+    List<LinkedNodeBuilder> annotatedNode_metadata,
+    LinkedNodeBuilder typeParameter_bound,
+    int typeParameter_extendsKeyword,
+    LinkedNodeBuilder typeParameter_name,
+    int typeParameter_id,
+    int codeLength,
+    int codeOffset,
+  })  : _kind = idl.LinkedNodeKind.typeParameter,
+        _variantField_11 = annotatedNode_comment,
+        _variantField_4 = annotatedNode_metadata,
+        _variantField_6 = typeParameter_bound,
+        _variantField_15 = typeParameter_extendsKeyword,
+        _variantField_7 = typeParameter_name,
+        _variantField_16 = typeParameter_id,
+        _variantField_34 = codeLength,
+        _variantField_33 = codeOffset;
+
+  LinkedNodeBuilder.switchCase({
+    List<LinkedNodeBuilder> switchMember_statements,
+    LinkedNodeBuilder switchCase_expression,
+    int switchMember_keyword,
+    int switchMember_colon,
+    List<LinkedNodeBuilder> switchMember_labels,
+  })  : _kind = idl.LinkedNodeKind.switchCase,
+        _variantField_4 = switchMember_statements,
+        _variantField_6 = switchCase_expression,
+        _variantField_15 = switchMember_keyword,
+        _variantField_16 = switchMember_colon,
+        _variantField_3 = switchMember_labels;
+
+  LinkedNodeBuilder.switchDefault({
+    List<LinkedNodeBuilder> switchMember_statements,
+    int switchMember_keyword,
+    int switchMember_colon,
+    List<LinkedNodeBuilder> switchMember_labels,
+  })  : _kind = idl.LinkedNodeKind.switchDefault,
+        _variantField_4 = switchMember_statements,
+        _variantField_15 = switchMember_keyword,
+        _variantField_16 = switchMember_colon,
+        _variantField_3 = switchMember_labels;
+
+  LinkedNodeBuilder.annotation({
+    LinkedNodeBuilder annotation_arguments,
+    int annotation_atSign,
+    LinkedNodeBuilder annotation_constructorName,
+    LinkedNodeBuilder annotation_name,
+    int annotation_period,
+  })  : _kind = idl.LinkedNodeKind.annotation,
+        _variantField_6 = annotation_arguments,
+        _variantField_15 = annotation_atSign,
+        _variantField_7 = annotation_constructorName,
+        _variantField_8 = annotation_name,
+        _variantField_16 = annotation_period;
+
+  LinkedNodeBuilder.asExpression({
+    LinkedNodeBuilder asExpression_expression,
+    int asExpression_asOperator,
+    LinkedNodeBuilder asExpression_type,
+    LinkedNodeTypeBuilder expression_type,
+  })  : _kind = idl.LinkedNodeKind.asExpression,
+        _variantField_6 = asExpression_expression,
+        _variantField_15 = asExpression_asOperator,
+        _variantField_7 = asExpression_type,
+        _variantField_25 = expression_type;
+
+  LinkedNodeBuilder.assertInitializer({
+    LinkedNodeBuilder assertInitializer_condition,
+    int assertInitializer_assertKeyword,
+    LinkedNodeBuilder assertInitializer_message,
+    int assertInitializer_comma,
+    int assertInitializer_leftParenthesis,
+    int assertInitializer_rightParenthesis,
+  })  : _kind = idl.LinkedNodeKind.assertInitializer,
+        _variantField_6 = assertInitializer_condition,
+        _variantField_15 = assertInitializer_assertKeyword,
+        _variantField_7 = assertInitializer_message,
+        _variantField_16 = assertInitializer_comma,
+        _variantField_17 = assertInitializer_leftParenthesis,
+        _variantField_18 = assertInitializer_rightParenthesis;
+
+  LinkedNodeBuilder.assertStatement({
+    LinkedNodeBuilder assertStatement_condition,
+    int assertStatement_assertKeyword,
+    LinkedNodeBuilder assertStatement_message,
+    int assertStatement_comma,
+    int assertStatement_leftParenthesis,
+    int assertStatement_rightParenthesis,
+    int assertStatement_semicolon,
+  })  : _kind = idl.LinkedNodeKind.assertStatement,
+        _variantField_6 = assertStatement_condition,
+        _variantField_15 = assertStatement_assertKeyword,
+        _variantField_7 = assertStatement_message,
+        _variantField_16 = assertStatement_comma,
+        _variantField_17 = assertStatement_leftParenthesis,
+        _variantField_18 = assertStatement_rightParenthesis,
+        _variantField_19 = assertStatement_semicolon;
+
+  LinkedNodeBuilder.assignmentExpression({
+    LinkedNodeBuilder assignmentExpression_leftHandSide,
+    int assignmentExpression_element,
+    LinkedNodeBuilder assignmentExpression_rightHandSide,
+    int assignmentExpression_operator,
+    LinkedNodeTypeBuilder assignmentExpression_elementType,
+    LinkedNodeTypeBuilder expression_type,
+  })  : _kind = idl.LinkedNodeKind.assignmentExpression,
+        _variantField_6 = assignmentExpression_leftHandSide,
+        _variantField_15 = assignmentExpression_element,
+        _variantField_7 = assignmentExpression_rightHandSide,
+        _variantField_16 = assignmentExpression_operator,
+        _variantField_23 = assignmentExpression_elementType,
+        _variantField_25 = expression_type;
+
+  LinkedNodeBuilder.awaitExpression({
+    LinkedNodeBuilder awaitExpression_expression,
+    int awaitExpression_awaitKeyword,
+    LinkedNodeTypeBuilder expression_type,
+  })  : _kind = idl.LinkedNodeKind.awaitExpression,
+        _variantField_6 = awaitExpression_expression,
+        _variantField_15 = awaitExpression_awaitKeyword,
+        _variantField_25 = expression_type;
+
+  LinkedNodeBuilder.blockFunctionBody({
+    LinkedNodeBuilder blockFunctionBody_block,
+    int blockFunctionBody_keyword,
+    int blockFunctionBody_star,
+  })  : _kind = idl.LinkedNodeKind.blockFunctionBody,
+        _variantField_6 = blockFunctionBody_block,
+        _variantField_15 = blockFunctionBody_keyword,
+        _variantField_16 = blockFunctionBody_star;
+
+  LinkedNodeBuilder.breakStatement({
+    LinkedNodeBuilder breakStatement_label,
+    int breakStatement_breakKeyword,
+    int breakStatement_semicolon,
+  })  : _kind = idl.LinkedNodeKind.breakStatement,
+        _variantField_6 = breakStatement_label,
+        _variantField_15 = breakStatement_breakKeyword,
+        _variantField_16 = breakStatement_semicolon;
+
+  LinkedNodeBuilder.catchClause({
+    LinkedNodeBuilder catchClause_body,
+    int catchClause_catchKeyword,
+    LinkedNodeBuilder catchClause_exceptionParameter,
+    LinkedNodeBuilder catchClause_exceptionType,
+    int catchClause_comma,
+    int catchClause_leftParenthesis,
+    int catchClause_onKeyword,
+    int catchClause_rightParenthesis,
+    LinkedNodeBuilder catchClause_stackTraceParameter,
+  })  : _kind = idl.LinkedNodeKind.catchClause,
+        _variantField_6 = catchClause_body,
+        _variantField_15 = catchClause_catchKeyword,
+        _variantField_7 = catchClause_exceptionParameter,
+        _variantField_8 = catchClause_exceptionType,
+        _variantField_16 = catchClause_comma,
+        _variantField_17 = catchClause_leftParenthesis,
+        _variantField_18 = catchClause_onKeyword,
+        _variantField_19 = catchClause_rightParenthesis,
+        _variantField_9 = catchClause_stackTraceParameter;
+
+  LinkedNodeBuilder.conditionalExpression({
+    LinkedNodeBuilder conditionalExpression_condition,
+    int conditionalExpression_colon,
+    LinkedNodeBuilder conditionalExpression_elseExpression,
+    LinkedNodeBuilder conditionalExpression_thenExpression,
+    int conditionalExpression_question,
+    LinkedNodeTypeBuilder expression_type,
+  })  : _kind = idl.LinkedNodeKind.conditionalExpression,
+        _variantField_6 = conditionalExpression_condition,
+        _variantField_15 = conditionalExpression_colon,
+        _variantField_7 = conditionalExpression_elseExpression,
+        _variantField_8 = conditionalExpression_thenExpression,
+        _variantField_16 = conditionalExpression_question,
+        _variantField_25 = expression_type;
+
+  LinkedNodeBuilder.configuration({
+    LinkedNodeBuilder configuration_name,
+    int configuration_ifKeyword,
+    LinkedNodeBuilder configuration_value,
+    LinkedNodeBuilder configuration_uri,
+    int configuration_leftParenthesis,
+    int configuration_rightParenthesis,
+    int configuration_equalToken,
+  })  : _kind = idl.LinkedNodeKind.configuration,
+        _variantField_6 = configuration_name,
+        _variantField_15 = configuration_ifKeyword,
+        _variantField_7 = configuration_value,
+        _variantField_8 = configuration_uri,
+        _variantField_16 = configuration_leftParenthesis,
+        _variantField_17 = configuration_rightParenthesis,
+        _variantField_18 = configuration_equalToken;
+
+  LinkedNodeBuilder.constructorFieldInitializer({
+    LinkedNodeBuilder constructorFieldInitializer_expression,
+    int constructorFieldInitializer_equals,
+    LinkedNodeBuilder constructorFieldInitializer_fieldName,
+    int constructorFieldInitializer_period,
+    int constructorFieldInitializer_thisKeyword,
+  })  : _kind = idl.LinkedNodeKind.constructorFieldInitializer,
+        _variantField_6 = constructorFieldInitializer_expression,
+        _variantField_15 = constructorFieldInitializer_equals,
+        _variantField_7 = constructorFieldInitializer_fieldName,
+        _variantField_16 = constructorFieldInitializer_period,
+        _variantField_17 = constructorFieldInitializer_thisKeyword;
+
+  LinkedNodeBuilder.constructorName({
+    LinkedNodeBuilder constructorName_name,
+    int constructorName_element,
+    LinkedNodeBuilder constructorName_type,
+    int constructorName_period,
+    LinkedNodeTypeBuilder constructorName_elementType,
+  })  : _kind = idl.LinkedNodeKind.constructorName,
+        _variantField_6 = constructorName_name,
+        _variantField_15 = constructorName_element,
+        _variantField_7 = constructorName_type,
+        _variantField_16 = constructorName_period,
+        _variantField_23 = constructorName_elementType;
+
+  LinkedNodeBuilder.continueStatement({
+    LinkedNodeBuilder continueStatement_label,
+    int continueStatement_continueKeyword,
+    int continueStatement_semicolon,
+  })  : _kind = idl.LinkedNodeKind.continueStatement,
+        _variantField_6 = continueStatement_label,
+        _variantField_15 = continueStatement_continueKeyword,
+        _variantField_16 = continueStatement_semicolon;
+
+  LinkedNodeBuilder.defaultFormalParameter({
+    LinkedNodeBuilder defaultFormalParameter_defaultValue,
+    int defaultFormalParameter_separator,
+    LinkedNodeBuilder defaultFormalParameter_parameter,
+    bool defaultFormalParameter_isNamed,
+    int codeLength,
+    int codeOffset,
+  })  : _kind = idl.LinkedNodeKind.defaultFormalParameter,
+        _variantField_6 = defaultFormalParameter_defaultValue,
+        _variantField_15 = defaultFormalParameter_separator,
+        _variantField_7 = defaultFormalParameter_parameter,
+        _variantField_27 = defaultFormalParameter_isNamed,
+        _variantField_34 = codeLength,
+        _variantField_33 = codeOffset;
+
+  LinkedNodeBuilder.doStatement({
+    LinkedNodeBuilder doStatement_body,
+    int doStatement_leftParenthesis,
+    LinkedNodeBuilder doStatement_condition,
+    int doStatement_rightParenthesis,
+    int doStatement_doKeyword,
+    int doStatement_semicolon,
+    int doStatement_whileKeyword,
+  })  : _kind = idl.LinkedNodeKind.doStatement,
+        _variantField_6 = doStatement_body,
+        _variantField_15 = doStatement_leftParenthesis,
+        _variantField_7 = doStatement_condition,
+        _variantField_16 = doStatement_rightParenthesis,
+        _variantField_17 = doStatement_doKeyword,
+        _variantField_18 = doStatement_semicolon,
+        _variantField_19 = doStatement_whileKeyword;
+
+  LinkedNodeBuilder.expressionFunctionBody({
+    LinkedNodeBuilder expressionFunctionBody_expression,
+    int expressionFunctionBody_arrow,
+    int expressionFunctionBody_keyword,
+    int expressionFunctionBody_semicolon,
+  })  : _kind = idl.LinkedNodeKind.expressionFunctionBody,
+        _variantField_6 = expressionFunctionBody_expression,
+        _variantField_15 = expressionFunctionBody_arrow,
+        _variantField_16 = expressionFunctionBody_keyword,
+        _variantField_17 = expressionFunctionBody_semicolon;
+
+  LinkedNodeBuilder.expressionStatement({
+    LinkedNodeBuilder expressionStatement_expression,
+    int expressionStatement_semicolon,
+  })  : _kind = idl.LinkedNodeKind.expressionStatement,
+        _variantField_6 = expressionStatement_expression,
+        _variantField_15 = expressionStatement_semicolon;
+
+  LinkedNodeBuilder.extendsClause({
+    LinkedNodeBuilder extendsClause_superclass,
+    int extendsClause_extendsKeyword,
+  })  : _kind = idl.LinkedNodeKind.extendsClause,
+        _variantField_6 = extendsClause_superclass,
+        _variantField_15 = extendsClause_extendsKeyword;
+
+  LinkedNodeBuilder.forEachPartsWithDeclaration({
+    LinkedNodeBuilder forEachParts_iterable,
+    int forEachParts_inKeyword,
+    LinkedNodeBuilder forEachPartsWithDeclaration_loopVariable,
+  })  : _kind = idl.LinkedNodeKind.forEachPartsWithDeclaration,
+        _variantField_6 = forEachParts_iterable,
+        _variantField_15 = forEachParts_inKeyword,
+        _variantField_7 = forEachPartsWithDeclaration_loopVariable;
+
+  LinkedNodeBuilder.forEachPartsWithIdentifier({
+    LinkedNodeBuilder forEachParts_iterable,
+    int forEachParts_inKeyword,
+    LinkedNodeBuilder forEachPartsWithIdentifier_identifier,
+  })  : _kind = idl.LinkedNodeKind.forEachPartsWithIdentifier,
+        _variantField_6 = forEachParts_iterable,
+        _variantField_15 = forEachParts_inKeyword,
+        _variantField_7 = forEachPartsWithIdentifier_identifier;
+
+  LinkedNodeBuilder.forElement({
+    LinkedNodeBuilder forMixin_forLoopParts,
+    int forMixin_awaitKeyword,
+    LinkedNodeBuilder forElement_body,
+    int forMixin_forKeyword,
+    int forMixin_leftParenthesis,
+    int forMixin_rightParenthesis,
+  })  : _kind = idl.LinkedNodeKind.forElement,
+        _variantField_6 = forMixin_forLoopParts,
+        _variantField_15 = forMixin_awaitKeyword,
+        _variantField_7 = forElement_body,
+        _variantField_16 = forMixin_forKeyword,
+        _variantField_17 = forMixin_leftParenthesis,
+        _variantField_19 = forMixin_rightParenthesis;
+
+  LinkedNodeBuilder.forStatement({
+    LinkedNodeBuilder forMixin_forLoopParts,
+    int forMixin_awaitKeyword,
+    LinkedNodeBuilder forStatement_body,
+    int forMixin_forKeyword,
+    int forMixin_leftParenthesis,
+    int forMixin_rightParenthesis,
+  })  : _kind = idl.LinkedNodeKind.forStatement,
+        _variantField_6 = forMixin_forLoopParts,
+        _variantField_15 = forMixin_awaitKeyword,
+        _variantField_7 = forStatement_body,
+        _variantField_16 = forMixin_forKeyword,
+        _variantField_17 = forMixin_leftParenthesis,
+        _variantField_19 = forMixin_rightParenthesis;
+
+  LinkedNodeBuilder.forPartsWithDeclarations({
+    LinkedNodeBuilder forParts_condition,
+    int forParts_leftSeparator,
+    LinkedNodeBuilder forPartsWithDeclarations_variables,
+    int forParts_rightSeparator,
+    List<LinkedNodeBuilder> forParts_updaters,
+  })  : _kind = idl.LinkedNodeKind.forPartsWithDeclarations,
+        _variantField_6 = forParts_condition,
+        _variantField_15 = forParts_leftSeparator,
+        _variantField_7 = forPartsWithDeclarations_variables,
+        _variantField_16 = forParts_rightSeparator,
+        _variantField_5 = forParts_updaters;
+
+  LinkedNodeBuilder.forPartsWithExpression({
+    LinkedNodeBuilder forParts_condition,
+    int forParts_leftSeparator,
+    LinkedNodeBuilder forPartsWithExpression_initialization,
+    int forParts_rightSeparator,
+    List<LinkedNodeBuilder> forParts_updaters,
+  })  : _kind = idl.LinkedNodeKind.forPartsWithExpression,
+        _variantField_6 = forParts_condition,
+        _variantField_15 = forParts_leftSeparator,
+        _variantField_7 = forPartsWithExpression_initialization,
+        _variantField_16 = forParts_rightSeparator,
+        _variantField_5 = forParts_updaters;
+
+  LinkedNodeBuilder.functionDeclarationStatement({
+    LinkedNodeBuilder functionDeclarationStatement_functionDeclaration,
+  })  : _kind = idl.LinkedNodeKind.functionDeclarationStatement,
+        _variantField_6 = functionDeclarationStatement_functionDeclaration;
+
+  LinkedNodeBuilder.ifElement({
+    LinkedNodeBuilder ifMixin_condition,
+    int ifMixin_elseKeyword,
+    LinkedNodeBuilder ifElement_thenElement,
+    int ifMixin_ifKeyword,
+    int ifMixin_leftParenthesis,
+    int ifMixin_rightParenthesis,
+    LinkedNodeBuilder ifElement_elseElement,
+  })  : _kind = idl.LinkedNodeKind.ifElement,
+        _variantField_6 = ifMixin_condition,
+        _variantField_15 = ifMixin_elseKeyword,
+        _variantField_8 = ifElement_thenElement,
+        _variantField_16 = ifMixin_ifKeyword,
+        _variantField_17 = ifMixin_leftParenthesis,
+        _variantField_18 = ifMixin_rightParenthesis,
+        _variantField_9 = ifElement_elseElement;
+
+  LinkedNodeBuilder.ifStatement({
+    LinkedNodeBuilder ifMixin_condition,
+    int ifMixin_elseKeyword,
+    LinkedNodeBuilder ifStatement_elseStatement,
+    LinkedNodeBuilder ifStatement_thenStatement,
+    int ifMixin_ifKeyword,
+    int ifMixin_leftParenthesis,
+    int ifMixin_rightParenthesis,
+  })  : _kind = idl.LinkedNodeKind.ifStatement,
+        _variantField_6 = ifMixin_condition,
+        _variantField_15 = ifMixin_elseKeyword,
+        _variantField_7 = ifStatement_elseStatement,
+        _variantField_8 = ifStatement_thenStatement,
+        _variantField_16 = ifMixin_ifKeyword,
+        _variantField_17 = ifMixin_leftParenthesis,
+        _variantField_18 = ifMixin_rightParenthesis;
+
+  LinkedNodeBuilder.indexExpression({
+    LinkedNodeBuilder indexExpression_index,
+    int indexExpression_element,
+    LinkedNodeBuilder indexExpression_target,
+    int indexExpression_period,
+    int indexExpression_leftBracket,
+    int indexExpression_rightBracket,
+    LinkedNodeTypeBuilder indexExpression_elementType,
+    LinkedNodeTypeBuilder expression_type,
+  })  : _kind = idl.LinkedNodeKind.indexExpression,
+        _variantField_6 = indexExpression_index,
+        _variantField_15 = indexExpression_element,
+        _variantField_7 = indexExpression_target,
+        _variantField_16 = indexExpression_period,
+        _variantField_17 = indexExpression_leftBracket,
+        _variantField_18 = indexExpression_rightBracket,
+        _variantField_23 = indexExpression_elementType,
+        _variantField_25 = expression_type;
+
+  LinkedNodeBuilder.instanceCreationExpression({
+    LinkedNodeBuilder instanceCreationExpression_arguments,
+    int instanceCreationExpression_keyword,
+    LinkedNodeBuilder instanceCreationExpression_constructorName,
+    LinkedNodeBuilder instanceCreationExpression_typeArguments,
+    LinkedNodeTypeBuilder expression_type,
+  })  : _kind = idl.LinkedNodeKind.instanceCreationExpression,
+        _variantField_6 = instanceCreationExpression_arguments,
+        _variantField_15 = instanceCreationExpression_keyword,
+        _variantField_7 = instanceCreationExpression_constructorName,
+        _variantField_8 = instanceCreationExpression_typeArguments,
+        _variantField_25 = expression_type;
+
+  LinkedNodeBuilder.interpolationExpression({
+    LinkedNodeBuilder interpolationExpression_expression,
+    int interpolationExpression_leftBracket,
+    int interpolationExpression_rightBracket,
+  })  : _kind = idl.LinkedNodeKind.interpolationExpression,
+        _variantField_6 = interpolationExpression_expression,
+        _variantField_15 = interpolationExpression_leftBracket,
+        _variantField_16 = interpolationExpression_rightBracket;
+
+  LinkedNodeBuilder.isExpression({
+    LinkedNodeBuilder isExpression_expression,
+    int isExpression_isOperator,
+    LinkedNodeBuilder isExpression_type,
+    int isExpression_notOperator,
+    LinkedNodeTypeBuilder expression_type,
+  })  : _kind = idl.LinkedNodeKind.isExpression,
+        _variantField_6 = isExpression_expression,
+        _variantField_15 = isExpression_isOperator,
+        _variantField_7 = isExpression_type,
+        _variantField_16 = isExpression_notOperator,
+        _variantField_25 = expression_type;
+
+  LinkedNodeBuilder.label({
+    LinkedNodeBuilder label_label,
+    int label_colon,
+  })  : _kind = idl.LinkedNodeKind.label,
+        _variantField_6 = label_label,
+        _variantField_15 = label_colon;
+
+  LinkedNodeBuilder.mapLiteralEntry({
+    LinkedNodeBuilder mapLiteralEntry_key,
+    int mapLiteralEntry_separator,
+    LinkedNodeBuilder mapLiteralEntry_value,
+  })  : _kind = idl.LinkedNodeKind.mapLiteralEntry,
+        _variantField_6 = mapLiteralEntry_key,
+        _variantField_15 = mapLiteralEntry_separator,
+        _variantField_7 = mapLiteralEntry_value;
+
+  LinkedNodeBuilder.namedExpression({
+    LinkedNodeBuilder namedExpression_expression,
+    LinkedNodeBuilder namedExpression_name,
+    LinkedNodeTypeBuilder expression_type,
+  })  : _kind = idl.LinkedNodeKind.namedExpression,
+        _variantField_6 = namedExpression_expression,
+        _variantField_7 = namedExpression_name,
+        _variantField_25 = expression_type;
+
+  LinkedNodeBuilder.nativeClause({
+    LinkedNodeBuilder nativeClause_name,
+    int nativeClause_nativeKeyword,
+  })  : _kind = idl.LinkedNodeKind.nativeClause,
+        _variantField_6 = nativeClause_name,
+        _variantField_15 = nativeClause_nativeKeyword;
+
+  LinkedNodeBuilder.nativeFunctionBody({
+    LinkedNodeBuilder nativeFunctionBody_stringLiteral,
+    int nativeFunctionBody_nativeKeyword,
+    int nativeFunctionBody_semicolon,
+  })  : _kind = idl.LinkedNodeKind.nativeFunctionBody,
+        _variantField_6 = nativeFunctionBody_stringLiteral,
+        _variantField_15 = nativeFunctionBody_nativeKeyword,
+        _variantField_16 = nativeFunctionBody_semicolon;
+
+  LinkedNodeBuilder.parenthesizedExpression({
+    LinkedNodeBuilder parenthesizedExpression_expression,
+    int parenthesizedExpression_leftParenthesis,
+    int parenthesizedExpression_rightParenthesis,
+    LinkedNodeTypeBuilder expression_type,
+  })  : _kind = idl.LinkedNodeKind.parenthesizedExpression,
+        _variantField_6 = parenthesizedExpression_expression,
+        _variantField_15 = parenthesizedExpression_leftParenthesis,
+        _variantField_16 = parenthesizedExpression_rightParenthesis,
+        _variantField_25 = expression_type;
+
+  LinkedNodeBuilder.postfixExpression({
+    LinkedNodeBuilder postfixExpression_operand,
+    int postfixExpression_element,
+    int postfixExpression_operator,
+    LinkedNodeTypeBuilder postfixExpression_elementType,
+    LinkedNodeTypeBuilder expression_type,
+  })  : _kind = idl.LinkedNodeKind.postfixExpression,
+        _variantField_6 = postfixExpression_operand,
+        _variantField_15 = postfixExpression_element,
+        _variantField_16 = postfixExpression_operator,
+        _variantField_23 = postfixExpression_elementType,
+        _variantField_25 = expression_type;
+
+  LinkedNodeBuilder.prefixedIdentifier({
+    LinkedNodeBuilder prefixedIdentifier_identifier,
+    int prefixedIdentifier_period,
+    LinkedNodeBuilder prefixedIdentifier_prefix,
+    LinkedNodeTypeBuilder expression_type,
+  })  : _kind = idl.LinkedNodeKind.prefixedIdentifier,
+        _variantField_6 = prefixedIdentifier_identifier,
+        _variantField_15 = prefixedIdentifier_period,
+        _variantField_7 = prefixedIdentifier_prefix,
+        _variantField_25 = expression_type;
+
+  LinkedNodeBuilder.prefixExpression({
+    LinkedNodeBuilder prefixExpression_operand,
+    int prefixExpression_element,
+    int prefixExpression_operator,
+    LinkedNodeTypeBuilder prefixExpression_elementType,
+    LinkedNodeTypeBuilder expression_type,
+  })  : _kind = idl.LinkedNodeKind.prefixExpression,
+        _variantField_6 = prefixExpression_operand,
+        _variantField_15 = prefixExpression_element,
+        _variantField_16 = prefixExpression_operator,
+        _variantField_23 = prefixExpression_elementType,
+        _variantField_25 = expression_type;
+
+  LinkedNodeBuilder.propertyAccess({
+    LinkedNodeBuilder propertyAccess_propertyName,
+    int propertyAccess_operator,
+    LinkedNodeBuilder propertyAccess_target,
+    LinkedNodeTypeBuilder expression_type,
+  })  : _kind = idl.LinkedNodeKind.propertyAccess,
+        _variantField_6 = propertyAccess_propertyName,
+        _variantField_15 = propertyAccess_operator,
+        _variantField_7 = propertyAccess_target,
+        _variantField_25 = expression_type;
+
+  LinkedNodeBuilder.redirectingConstructorInvocation({
+    LinkedNodeBuilder redirectingConstructorInvocation_arguments,
+    int redirectingConstructorInvocation_element,
+    LinkedNodeBuilder redirectingConstructorInvocation_constructorName,
+    int redirectingConstructorInvocation_period,
+    int redirectingConstructorInvocation_thisKeyword,
+    LinkedNodeTypeBuilder redirectingConstructorInvocation_elementType,
+  })  : _kind = idl.LinkedNodeKind.redirectingConstructorInvocation,
+        _variantField_6 = redirectingConstructorInvocation_arguments,
+        _variantField_15 = redirectingConstructorInvocation_element,
+        _variantField_7 = redirectingConstructorInvocation_constructorName,
+        _variantField_16 = redirectingConstructorInvocation_period,
+        _variantField_17 = redirectingConstructorInvocation_thisKeyword,
+        _variantField_23 = redirectingConstructorInvocation_elementType;
+
+  LinkedNodeBuilder.returnStatement({
+    LinkedNodeBuilder returnStatement_expression,
+    int returnStatement_returnKeyword,
+    int returnStatement_semicolon,
+  })  : _kind = idl.LinkedNodeKind.returnStatement,
+        _variantField_6 = returnStatement_expression,
+        _variantField_15 = returnStatement_returnKeyword,
+        _variantField_16 = returnStatement_semicolon;
+
+  LinkedNodeBuilder.spreadElement({
+    LinkedNodeBuilder spreadElement_expression,
+    int spreadElement_spreadOperator,
+  })  : _kind = idl.LinkedNodeKind.spreadElement,
+        _variantField_6 = spreadElement_expression,
+        _variantField_15 = spreadElement_spreadOperator;
+
+  LinkedNodeBuilder.superConstructorInvocation({
+    LinkedNodeBuilder superConstructorInvocation_arguments,
+    int superConstructorInvocation_element,
+    LinkedNodeBuilder superConstructorInvocation_constructorName,
+    int superConstructorInvocation_period,
+    int superConstructorInvocation_superKeyword,
+    LinkedNodeTypeBuilder superConstructorInvocation_elementType,
+  })  : _kind = idl.LinkedNodeKind.superConstructorInvocation,
+        _variantField_6 = superConstructorInvocation_arguments,
+        _variantField_15 = superConstructorInvocation_element,
+        _variantField_7 = superConstructorInvocation_constructorName,
+        _variantField_16 = superConstructorInvocation_period,
+        _variantField_17 = superConstructorInvocation_superKeyword,
+        _variantField_23 = superConstructorInvocation_elementType;
+
+  LinkedNodeBuilder.throwExpression({
+    LinkedNodeBuilder throwExpression_expression,
+    int throwExpression_throwKeyword,
+    LinkedNodeTypeBuilder expression_type,
+  })  : _kind = idl.LinkedNodeKind.throwExpression,
+        _variantField_6 = throwExpression_expression,
+        _variantField_15 = throwExpression_throwKeyword,
+        _variantField_25 = expression_type;
+
+  LinkedNodeBuilder.typeName({
+    LinkedNodeBuilder typeName_name,
+    int typeName_question,
+    LinkedNodeBuilder typeName_typeArguments,
+    LinkedNodeTypeBuilder typeName_type,
+  })  : _kind = idl.LinkedNodeKind.typeName,
+        _variantField_6 = typeName_name,
+        _variantField_15 = typeName_question,
+        _variantField_7 = typeName_typeArguments,
+        _variantField_23 = typeName_type;
+
+  LinkedNodeBuilder.variableDeclarationStatement({
+    LinkedNodeBuilder variableDeclarationStatement_variables,
+    int variableDeclarationStatement_semicolon,
+  })  : _kind = idl.LinkedNodeKind.variableDeclarationStatement,
+        _variantField_6 = variableDeclarationStatement_variables,
+        _variantField_15 = variableDeclarationStatement_semicolon;
+
+  LinkedNodeBuilder.whileStatement({
+    LinkedNodeBuilder whileStatement_body,
+    int whileStatement_leftParenthesis,
+    LinkedNodeBuilder whileStatement_condition,
+    int whileStatement_rightParenthesis,
+    int whileStatement_whileKeyword,
+  })  : _kind = idl.LinkedNodeKind.whileStatement,
+        _variantField_6 = whileStatement_body,
+        _variantField_15 = whileStatement_leftParenthesis,
+        _variantField_7 = whileStatement_condition,
+        _variantField_16 = whileStatement_rightParenthesis,
+        _variantField_17 = whileStatement_whileKeyword;
+
+  LinkedNodeBuilder.yieldStatement({
+    LinkedNodeBuilder yieldStatement_expression,
+    int yieldStatement_yieldKeyword,
+    int yieldStatement_star,
+    int yieldStatement_semicolon,
+  })  : _kind = idl.LinkedNodeKind.yieldStatement,
+        _variantField_6 = yieldStatement_expression,
+        _variantField_15 = yieldStatement_yieldKeyword,
+        _variantField_16 = yieldStatement_star,
+        _variantField_17 = yieldStatement_semicolon;
+
+  LinkedNodeBuilder.booleanLiteral({
+    int booleanLiteral_literal,
+    bool booleanLiteral_value,
+    LinkedNodeTypeBuilder expression_type,
+  })  : _kind = idl.LinkedNodeKind.booleanLiteral,
+        _variantField_15 = booleanLiteral_literal,
+        _variantField_27 = booleanLiteral_value,
+        _variantField_25 = expression_type;
+
+  LinkedNodeBuilder.doubleLiteral({
+    int doubleLiteral_literal,
+    double doubleLiteral_value,
+    LinkedNodeTypeBuilder expression_type,
+  })  : _kind = idl.LinkedNodeKind.doubleLiteral,
+        _variantField_15 = doubleLiteral_literal,
+        _variantField_21 = doubleLiteral_value,
+        _variantField_25 = expression_type;
+
+  LinkedNodeBuilder.emptyFunctionBody({
+    int emptyFunctionBody_semicolon,
+  })  : _kind = idl.LinkedNodeKind.emptyFunctionBody,
+        _variantField_15 = emptyFunctionBody_semicolon;
+
+  LinkedNodeBuilder.emptyStatement({
+    int emptyStatement_semicolon,
+  })  : _kind = idl.LinkedNodeKind.emptyStatement,
+        _variantField_15 = emptyStatement_semicolon;
+
+  LinkedNodeBuilder.integerLiteral({
+    int integerLiteral_literal,
+    int integerLiteral_value,
+    LinkedNodeTypeBuilder expression_type,
+  })  : _kind = idl.LinkedNodeKind.integerLiteral,
+        _variantField_15 = integerLiteral_literal,
+        _variantField_16 = integerLiteral_value,
+        _variantField_25 = expression_type;
+
+  LinkedNodeBuilder.interpolationString({
+    int interpolationString_token,
+    String interpolationString_value,
+  })  : _kind = idl.LinkedNodeKind.interpolationString,
+        _variantField_15 = interpolationString_token,
+        _variantField_30 = interpolationString_value;
+
+  LinkedNodeBuilder.nullLiteral({
+    int nullLiteral_literal,
+    LinkedNodeTypeBuilder expression_type,
+  })  : _kind = idl.LinkedNodeKind.nullLiteral,
+        _variantField_15 = nullLiteral_literal,
+        _variantField_25 = expression_type;
+
+  LinkedNodeBuilder.rethrowExpression({
+    int rethrowExpression_rethrowKeyword,
+    LinkedNodeTypeBuilder expression_type,
+  })  : _kind = idl.LinkedNodeKind.rethrowExpression,
+        _variantField_15 = rethrowExpression_rethrowKeyword,
+        _variantField_25 = expression_type;
+
+  LinkedNodeBuilder.scriptTag({
+    int scriptTag_scriptTag,
+  })  : _kind = idl.LinkedNodeKind.scriptTag,
+        _variantField_15 = scriptTag_scriptTag;
+
+  LinkedNodeBuilder.simpleIdentifier({
+    int simpleIdentifier_element,
+    int simpleIdentifier_token,
+    LinkedNodeTypeBuilder simpleIdentifier_elementType,
+    LinkedNodeTypeBuilder expression_type,
+  })  : _kind = idl.LinkedNodeKind.simpleIdentifier,
+        _variantField_15 = simpleIdentifier_element,
+        _variantField_16 = simpleIdentifier_token,
+        _variantField_23 = simpleIdentifier_elementType,
+        _variantField_25 = expression_type;
+
+  LinkedNodeBuilder.simpleStringLiteral({
+    int simpleStringLiteral_token,
+    LinkedNodeTypeBuilder expression_type,
+    String simpleStringLiteral_value,
+  })  : _kind = idl.LinkedNodeKind.simpleStringLiteral,
+        _variantField_15 = simpleStringLiteral_token,
+        _variantField_25 = expression_type,
+        _variantField_20 = simpleStringLiteral_value;
+
+  LinkedNodeBuilder.superExpression({
+    int superExpression_superKeyword,
+    LinkedNodeTypeBuilder expression_type,
+  })  : _kind = idl.LinkedNodeKind.superExpression,
+        _variantField_15 = superExpression_superKeyword,
+        _variantField_25 = expression_type;
+
+  LinkedNodeBuilder.symbolLiteral({
+    int symbolLiteral_poundSign,
+    List<int> symbolLiteral_components,
+    LinkedNodeTypeBuilder expression_type,
+  })  : _kind = idl.LinkedNodeKind.symbolLiteral,
+        _variantField_15 = symbolLiteral_poundSign,
+        _variantField_28 = symbolLiteral_components,
+        _variantField_25 = expression_type;
+
+  LinkedNodeBuilder.thisExpression({
+    int thisExpression_thisKeyword,
+    LinkedNodeTypeBuilder expression_type,
+  })  : _kind = idl.LinkedNodeKind.thisExpression,
+        _variantField_15 = thisExpression_thisKeyword,
+        _variantField_25 = expression_type;
+
+  LinkedNodeBuilder.comment({
+    List<int> comment_tokens,
+    idl.LinkedNodeCommentType comment_type,
+  })  : _kind = idl.LinkedNodeKind.comment,
+        _variantField_28 = comment_tokens,
+        _variantField_29 = comment_type;
+
+  /// Flush [informative] data recursively.
+  void flushInformative() {
+    _variantField_24?.flushInformative();
+    _variantField_2?.forEach((b) => b.flushInformative());
+    _variantField_11?.flushInformative();
+    _variantField_4?.forEach((b) => b.flushInformative());
+    _variantField_6?.flushInformative();
+    _variantField_7?.flushInformative();
+    _variantField_8?.flushInformative();
+    _variantField_23?.flushInformative();
+    _variantField_9?.flushInformative();
+    _variantField_12?.flushInformative();
+    _variantField_5?.forEach((b) => b.flushInformative());
+    _variantField_13?.flushInformative();
+    _variantField_3?.forEach((b) => b.flushInformative());
+    _variantField_10?.flushInformative();
+    _variantField_25?.flushInformative();
+    _variantField_14?.flushInformative();
+    _variantField_32?.flushInformative();
+  }
+
+  /// Accumulate non-[informative] data into [signature].
+  void collectApiSignature(api_sig.ApiSignature signature) {
+    signature.addInt(this._kind == null ? 0 : this._kind.index);
+    signature.addBool(this._isSynthetic == true);
+    if (this._variantField_2 == null) {
+      signature.addInt(0);
+    } else {
+      signature.addInt(this._variantField_2.length);
+      for (var x in this._variantField_2) {
+        x?.collectApiSignature(signature);
+      }
+    }
+    if (this._variantField_3 == null) {
+      signature.addInt(0);
+    } else {
+      signature.addInt(this._variantField_3.length);
+      for (var x in this._variantField_3) {
+        x?.collectApiSignature(signature);
+      }
+    }
+    if (this._variantField_4 == null) {
+      signature.addInt(0);
+    } else {
+      signature.addInt(this._variantField_4.length);
+      for (var x in this._variantField_4) {
+        x?.collectApiSignature(signature);
+      }
+    }
+    if (this._variantField_5 == null) {
+      signature.addInt(0);
+    } else {
+      signature.addInt(this._variantField_5.length);
+      for (var x in this._variantField_5) {
+        x?.collectApiSignature(signature);
+      }
+    }
+    signature.addBool(this._variantField_6 != null);
+    this._variantField_6?.collectApiSignature(signature);
+    signature.addBool(this._variantField_7 != null);
+    this._variantField_7?.collectApiSignature(signature);
+    signature.addBool(this._variantField_8 != null);
+    this._variantField_8?.collectApiSignature(signature);
+    signature.addBool(this._variantField_9 != null);
+    this._variantField_9?.collectApiSignature(signature);
+    signature.addBool(this._variantField_10 != null);
+    this._variantField_10?.collectApiSignature(signature);
+    signature.addBool(this._variantField_11 != null);
+    this._variantField_11?.collectApiSignature(signature);
+    signature.addBool(this._variantField_12 != null);
+    this._variantField_12?.collectApiSignature(signature);
+    signature.addBool(this._variantField_13 != null);
+    this._variantField_13?.collectApiSignature(signature);
+    signature.addBool(this._variantField_14 != null);
+    this._variantField_14?.collectApiSignature(signature);
+    signature.addInt(this._variantField_15 ?? 0);
+    signature.addInt(this._variantField_16 ?? 0);
+    signature.addInt(this._variantField_17 ?? 0);
+    signature.addInt(this._variantField_18 ?? 0);
+    signature.addInt(this._variantField_19 ?? 0);
+    signature.addString(this._variantField_20 ?? '');
+    signature.addDouble(this._variantField_21 ?? 0.0);
+    signature.addString(this._variantField_22 ?? '');
+    signature.addBool(this._variantField_23 != null);
+    this._variantField_23?.collectApiSignature(signature);
+    signature.addBool(this._variantField_24 != null);
+    this._variantField_24?.collectApiSignature(signature);
+    signature.addBool(this._variantField_25 != null);
+    this._variantField_25?.collectApiSignature(signature);
+    signature.addInt(
+        this._variantField_26 == null ? 0 : this._variantField_26.index);
+    signature.addBool(this._variantField_27 == true);
+    if (this._variantField_28 == null) {
+      signature.addInt(0);
+    } else {
+      signature.addInt(this._variantField_28.length);
+      for (var x in this._variantField_28) {
+        signature.addInt(x);
+      }
+    }
+    signature.addInt(
+        this._variantField_29 == null ? 0 : this._variantField_29.index);
+    signature.addString(this._variantField_30 ?? '');
+    signature.addBool(this._variantField_31 == true);
+    signature.addBool(this._variantField_32 != null);
+    this._variantField_32?.collectApiSignature(signature);
+    signature.addInt(this._variantField_33 ?? 0);
+    signature.addInt(this._variantField_34 ?? 0);
+  }
+
+  fb.Offset finish(fb.Builder fbBuilder) {
+    fb.Offset offset_variantField_24;
+    fb.Offset offset_variantField_2;
+    fb.Offset offset_variantField_11;
+    fb.Offset offset_variantField_4;
+    fb.Offset offset_variantField_6;
+    fb.Offset offset_variantField_7;
+    fb.Offset offset_variantField_8;
+    fb.Offset offset_variantField_23;
+    fb.Offset offset_variantField_9;
+    fb.Offset offset_variantField_12;
+    fb.Offset offset_variantField_5;
+    fb.Offset offset_variantField_13;
+    fb.Offset offset_variantField_28;
+    fb.Offset offset_variantField_3;
+    fb.Offset offset_variantField_10;
+    fb.Offset offset_variantField_25;
+    fb.Offset offset_variantField_30;
+    fb.Offset offset_variantField_14;
+    fb.Offset offset_variantField_20;
+    fb.Offset offset_variantField_22;
+    fb.Offset offset_variantField_32;
+    if (_variantField_24 != null) {
+      offset_variantField_24 = _variantField_24.finish(fbBuilder);
+    }
+    if (!(_variantField_2 == null || _variantField_2.isEmpty)) {
+      offset_variantField_2 = fbBuilder
+          .writeList(_variantField_2.map((b) => b.finish(fbBuilder)).toList());
+    }
+    if (_variantField_11 != null) {
+      offset_variantField_11 = _variantField_11.finish(fbBuilder);
+    }
+    if (!(_variantField_4 == null || _variantField_4.isEmpty)) {
+      offset_variantField_4 = fbBuilder
+          .writeList(_variantField_4.map((b) => b.finish(fbBuilder)).toList());
+    }
+    if (_variantField_6 != null) {
+      offset_variantField_6 = _variantField_6.finish(fbBuilder);
+    }
+    if (_variantField_7 != null) {
+      offset_variantField_7 = _variantField_7.finish(fbBuilder);
+    }
+    if (_variantField_8 != null) {
+      offset_variantField_8 = _variantField_8.finish(fbBuilder);
+    }
+    if (_variantField_23 != null) {
+      offset_variantField_23 = _variantField_23.finish(fbBuilder);
+    }
+    if (_variantField_9 != null) {
+      offset_variantField_9 = _variantField_9.finish(fbBuilder);
+    }
+    if (_variantField_12 != null) {
+      offset_variantField_12 = _variantField_12.finish(fbBuilder);
+    }
+    if (!(_variantField_5 == null || _variantField_5.isEmpty)) {
+      offset_variantField_5 = fbBuilder
+          .writeList(_variantField_5.map((b) => b.finish(fbBuilder)).toList());
+    }
+    if (_variantField_13 != null) {
+      offset_variantField_13 = _variantField_13.finish(fbBuilder);
+    }
+    if (!(_variantField_28 == null || _variantField_28.isEmpty)) {
+      offset_variantField_28 = fbBuilder.writeListUint32(_variantField_28);
+    }
+    if (!(_variantField_3 == null || _variantField_3.isEmpty)) {
+      offset_variantField_3 = fbBuilder
+          .writeList(_variantField_3.map((b) => b.finish(fbBuilder)).toList());
+    }
+    if (_variantField_10 != null) {
+      offset_variantField_10 = _variantField_10.finish(fbBuilder);
+    }
+    if (_variantField_25 != null) {
+      offset_variantField_25 = _variantField_25.finish(fbBuilder);
+    }
+    if (_variantField_30 != null) {
+      offset_variantField_30 = fbBuilder.writeString(_variantField_30);
+    }
+    if (_variantField_14 != null) {
+      offset_variantField_14 = _variantField_14.finish(fbBuilder);
+    }
+    if (_variantField_20 != null) {
+      offset_variantField_20 = fbBuilder.writeString(_variantField_20);
+    }
+    if (_variantField_22 != null) {
+      offset_variantField_22 = fbBuilder.writeString(_variantField_22);
+    }
+    if (_variantField_32 != null) {
+      offset_variantField_32 = _variantField_32.finish(fbBuilder);
+    }
+    fbBuilder.startTable();
+    if (offset_variantField_24 != null) {
+      fbBuilder.addOffset(24, offset_variantField_24);
+    }
+    if (offset_variantField_2 != null) {
+      fbBuilder.addOffset(2, offset_variantField_2);
+    }
+    if (offset_variantField_11 != null) {
+      fbBuilder.addOffset(11, offset_variantField_11);
+    }
+    if (offset_variantField_4 != null) {
+      fbBuilder.addOffset(4, offset_variantField_4);
+    }
+    if (offset_variantField_6 != null) {
+      fbBuilder.addOffset(6, offset_variantField_6);
+    }
+    if (_variantField_15 != null && _variantField_15 != 0) {
+      fbBuilder.addUint32(15, _variantField_15);
+    }
+    if (offset_variantField_7 != null) {
+      fbBuilder.addOffset(7, offset_variantField_7);
+    }
+    if (offset_variantField_8 != null) {
+      fbBuilder.addOffset(8, offset_variantField_8);
+    }
+    if (_variantField_16 != null && _variantField_16 != 0) {
+      fbBuilder.addUint32(16, _variantField_16);
+    }
+    if (_variantField_17 != null && _variantField_17 != 0) {
+      fbBuilder.addUint32(17, _variantField_17);
+    }
+    if (_variantField_18 != null && _variantField_18 != 0) {
+      fbBuilder.addUint32(18, _variantField_18);
+    }
+    if (_variantField_19 != null && _variantField_19 != 0) {
+      fbBuilder.addUint32(19, _variantField_19);
+    }
+    if (offset_variantField_23 != null) {
+      fbBuilder.addOffset(23, offset_variantField_23);
+    }
+    if (_variantField_27 == true) {
+      fbBuilder.addBool(27, true);
+    }
+    if (offset_variantField_9 != null) {
+      fbBuilder.addOffset(9, offset_variantField_9);
+    }
+    if (offset_variantField_12 != null) {
+      fbBuilder.addOffset(12, offset_variantField_12);
+    }
+    if (offset_variantField_5 != null) {
+      fbBuilder.addOffset(5, offset_variantField_5);
+    }
+    if (offset_variantField_13 != null) {
+      fbBuilder.addOffset(13, offset_variantField_13);
+    }
+    if (_variantField_34 != null && _variantField_34 != 0) {
+      fbBuilder.addUint32(34, _variantField_34);
+    }
+    if (_variantField_33 != null && _variantField_33 != 0) {
+      fbBuilder.addUint32(33, _variantField_33);
+    }
+    if (offset_variantField_28 != null) {
+      fbBuilder.addOffset(28, offset_variantField_28);
+    }
+    if (_variantField_29 != null &&
+        _variantField_29 != idl.LinkedNodeCommentType.block) {
+      fbBuilder.addUint8(29, _variantField_29.index);
+    }
+    if (offset_variantField_3 != null) {
+      fbBuilder.addOffset(3, offset_variantField_3);
+    }
+    if (offset_variantField_10 != null) {
+      fbBuilder.addOffset(10, offset_variantField_10);
+    }
+    if (_variantField_21 != null && _variantField_21 != 0.0) {
+      fbBuilder.addFloat64(21, _variantField_21);
+    }
+    if (offset_variantField_25 != null) {
+      fbBuilder.addOffset(25, offset_variantField_25);
+    }
+    if (_variantField_26 != null &&
+        _variantField_26 != idl.LinkedNodeFormalParameterKind.required) {
+      fbBuilder.addUint8(26, _variantField_26.index);
+    }
+    if (offset_variantField_30 != null) {
+      fbBuilder.addOffset(30, offset_variantField_30);
+    }
+    if (offset_variantField_14 != null) {
+      fbBuilder.addOffset(14, offset_variantField_14);
+    }
+    if (_isSynthetic == true) {
+      fbBuilder.addBool(1, true);
+    }
+    if (_kind != null && _kind != idl.LinkedNodeKind.adjacentStrings) {
+      fbBuilder.addUint8(0, _kind.index);
+    }
+    if (offset_variantField_20 != null) {
+      fbBuilder.addOffset(20, offset_variantField_20);
+    }
+    if (_variantField_31 == true) {
+      fbBuilder.addBool(31, true);
+    }
+    if (offset_variantField_22 != null) {
+      fbBuilder.addOffset(22, offset_variantField_22);
+    }
+    if (offset_variantField_32 != null) {
+      fbBuilder.addOffset(32, offset_variantField_32);
+    }
+    return fbBuilder.endTable();
+  }
+}
+
+class _LinkedNodeReader extends fb.TableReader<_LinkedNodeImpl> {
+  const _LinkedNodeReader();
+
+  @override
+  _LinkedNodeImpl createObject(fb.BufferContext bc, int offset) =>
+      new _LinkedNodeImpl(bc, offset);
+}
+
+class _LinkedNodeImpl extends Object
+    with _LinkedNodeMixin
+    implements idl.LinkedNode {
+  final fb.BufferContext _bc;
+  final int _bcOffset;
+
+  _LinkedNodeImpl(this._bc, this._bcOffset);
+
+  idl.LinkedNodeType _variantField_24;
+  List<idl.LinkedNode> _variantField_2;
+  idl.LinkedNode _variantField_11;
+  List<idl.LinkedNode> _variantField_4;
+  idl.LinkedNode _variantField_6;
+  int _variantField_15;
+  idl.LinkedNode _variantField_7;
+  idl.LinkedNode _variantField_8;
+  int _variantField_16;
+  int _variantField_17;
+  int _variantField_18;
+  int _variantField_19;
+  idl.LinkedNodeType _variantField_23;
+  bool _variantField_27;
+  idl.LinkedNode _variantField_9;
+  idl.LinkedNode _variantField_12;
+  List<idl.LinkedNode> _variantField_5;
+  idl.LinkedNode _variantField_13;
+  int _variantField_34;
+  int _variantField_33;
+  List<int> _variantField_28;
+  idl.LinkedNodeCommentType _variantField_29;
+  List<idl.LinkedNode> _variantField_3;
+  idl.LinkedNode _variantField_10;
+  double _variantField_21;
+  idl.LinkedNodeType _variantField_25;
+  idl.LinkedNodeFormalParameterKind _variantField_26;
+  String _variantField_30;
+  idl.LinkedNode _variantField_14;
+  bool _isSynthetic;
+  idl.LinkedNodeKind _kind;
+  String _variantField_20;
+  bool _variantField_31;
+  String _variantField_22;
+  idl.LinkedNodeVariablesDeclaration _variantField_32;
+
+  @override
+  idl.LinkedNodeType get actualReturnType {
+    assert(kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionExpression ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.genericFunctionType ||
+        kind == idl.LinkedNodeKind.methodDeclaration);
+    _variantField_24 ??=
+        const _LinkedNodeTypeReader().vTableGet(_bc, _bcOffset, 24, null);
+    return _variantField_24;
+  }
+
+  @override
+  idl.LinkedNodeType get actualType {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter ||
+        kind == idl.LinkedNodeKind.variableDeclaration);
+    _variantField_24 ??=
+        const _LinkedNodeTypeReader().vTableGet(_bc, _bcOffset, 24, null);
+    return _variantField_24;
+  }
+
+  @override
+  idl.LinkedNodeType get binaryExpression_invokeType {
+    assert(kind == idl.LinkedNodeKind.binaryExpression);
+    _variantField_24 ??=
+        const _LinkedNodeTypeReader().vTableGet(_bc, _bcOffset, 24, null);
+    return _variantField_24;
+  }
+
+  @override
+  idl.LinkedNodeType get invocationExpression_invokeType {
+    assert(kind == idl.LinkedNodeKind.functionExpressionInvocation ||
+        kind == idl.LinkedNodeKind.methodInvocation);
+    _variantField_24 ??=
+        const _LinkedNodeTypeReader().vTableGet(_bc, _bcOffset, 24, null);
+    return _variantField_24;
+  }
+
+  @override
+  List<idl.LinkedNode> get adjacentStrings_strings {
+    assert(kind == idl.LinkedNodeKind.adjacentStrings);
+    _variantField_2 ??=
+        const fb.ListReader<idl.LinkedNode>(const _LinkedNodeReader())
+            .vTableGet(_bc, _bcOffset, 2, const <idl.LinkedNode>[]);
+    return _variantField_2;
+  }
+
+  @override
+  List<idl.LinkedNode> get argumentList_arguments {
+    assert(kind == idl.LinkedNodeKind.argumentList);
+    _variantField_2 ??=
+        const fb.ListReader<idl.LinkedNode>(const _LinkedNodeReader())
+            .vTableGet(_bc, _bcOffset, 2, const <idl.LinkedNode>[]);
+    return _variantField_2;
+  }
+
+  @override
+  List<idl.LinkedNode> get block_statements {
+    assert(kind == idl.LinkedNodeKind.block);
+    _variantField_2 ??=
+        const fb.ListReader<idl.LinkedNode>(const _LinkedNodeReader())
+            .vTableGet(_bc, _bcOffset, 2, const <idl.LinkedNode>[]);
+    return _variantField_2;
+  }
+
+  @override
+  List<idl.LinkedNode> get cascadeExpression_sections {
+    assert(kind == idl.LinkedNodeKind.cascadeExpression);
+    _variantField_2 ??=
+        const fb.ListReader<idl.LinkedNode>(const _LinkedNodeReader())
+            .vTableGet(_bc, _bcOffset, 2, const <idl.LinkedNode>[]);
+    return _variantField_2;
+  }
+
+  @override
+  List<idl.LinkedNode> get compilationUnit_declarations {
+    assert(kind == idl.LinkedNodeKind.compilationUnit);
+    _variantField_2 ??=
+        const fb.ListReader<idl.LinkedNode>(const _LinkedNodeReader())
+            .vTableGet(_bc, _bcOffset, 2, const <idl.LinkedNode>[]);
+    return _variantField_2;
+  }
+
+  @override
+  List<idl.LinkedNode> get constructorDeclaration_initializers {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    _variantField_2 ??=
+        const fb.ListReader<idl.LinkedNode>(const _LinkedNodeReader())
+            .vTableGet(_bc, _bcOffset, 2, const <idl.LinkedNode>[]);
+    return _variantField_2;
+  }
+
+  @override
+  List<idl.LinkedNode> get dottedName_components {
+    assert(kind == idl.LinkedNodeKind.dottedName);
+    _variantField_2 ??=
+        const fb.ListReader<idl.LinkedNode>(const _LinkedNodeReader())
+            .vTableGet(_bc, _bcOffset, 2, const <idl.LinkedNode>[]);
+    return _variantField_2;
+  }
+
+  @override
+  List<idl.LinkedNode> get enumDeclaration_constants {
+    assert(kind == idl.LinkedNodeKind.enumDeclaration);
+    _variantField_2 ??=
+        const fb.ListReader<idl.LinkedNode>(const _LinkedNodeReader())
+            .vTableGet(_bc, _bcOffset, 2, const <idl.LinkedNode>[]);
+    return _variantField_2;
+  }
+
+  @override
+  List<idl.LinkedNode> get formalParameterList_parameters {
+    assert(kind == idl.LinkedNodeKind.formalParameterList);
+    _variantField_2 ??=
+        const fb.ListReader<idl.LinkedNode>(const _LinkedNodeReader())
+            .vTableGet(_bc, _bcOffset, 2, const <idl.LinkedNode>[]);
+    return _variantField_2;
+  }
+
+  @override
+  List<idl.LinkedNode> get hideCombinator_hiddenNames {
+    assert(kind == idl.LinkedNodeKind.hideCombinator);
+    _variantField_2 ??=
+        const fb.ListReader<idl.LinkedNode>(const _LinkedNodeReader())
+            .vTableGet(_bc, _bcOffset, 2, const <idl.LinkedNode>[]);
+    return _variantField_2;
+  }
+
+  @override
+  List<idl.LinkedNode> get implementsClause_interfaces {
+    assert(kind == idl.LinkedNodeKind.implementsClause);
+    _variantField_2 ??=
+        const fb.ListReader<idl.LinkedNode>(const _LinkedNodeReader())
+            .vTableGet(_bc, _bcOffset, 2, const <idl.LinkedNode>[]);
+    return _variantField_2;
+  }
+
+  @override
+  List<idl.LinkedNode> get labeledStatement_labels {
+    assert(kind == idl.LinkedNodeKind.labeledStatement);
+    _variantField_2 ??=
+        const fb.ListReader<idl.LinkedNode>(const _LinkedNodeReader())
+            .vTableGet(_bc, _bcOffset, 2, const <idl.LinkedNode>[]);
+    return _variantField_2;
+  }
+
+  @override
+  List<idl.LinkedNode> get libraryIdentifier_components {
+    assert(kind == idl.LinkedNodeKind.libraryIdentifier);
+    _variantField_2 ??=
+        const fb.ListReader<idl.LinkedNode>(const _LinkedNodeReader())
+            .vTableGet(_bc, _bcOffset, 2, const <idl.LinkedNode>[]);
+    return _variantField_2;
+  }
+
+  @override
+  List<idl.LinkedNode> get listLiteral_elements {
+    assert(kind == idl.LinkedNodeKind.listLiteral);
+    _variantField_2 ??=
+        const fb.ListReader<idl.LinkedNode>(const _LinkedNodeReader())
+            .vTableGet(_bc, _bcOffset, 2, const <idl.LinkedNode>[]);
+    return _variantField_2;
+  }
+
+  @override
+  List<idl.LinkedNode> get namespaceDirective_combinators {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective);
+    _variantField_2 ??=
+        const fb.ListReader<idl.LinkedNode>(const _LinkedNodeReader())
+            .vTableGet(_bc, _bcOffset, 2, const <idl.LinkedNode>[]);
+    return _variantField_2;
+  }
+
+  @override
+  List<idl.LinkedNode> get onClause_superclassConstraints {
+    assert(kind == idl.LinkedNodeKind.onClause);
+    _variantField_2 ??=
+        const fb.ListReader<idl.LinkedNode>(const _LinkedNodeReader())
+            .vTableGet(_bc, _bcOffset, 2, const <idl.LinkedNode>[]);
+    return _variantField_2;
+  }
+
+  @override
+  List<idl.LinkedNode> get setOrMapLiteral_elements {
+    assert(kind == idl.LinkedNodeKind.setOrMapLiteral);
+    _variantField_2 ??=
+        const fb.ListReader<idl.LinkedNode>(const _LinkedNodeReader())
+            .vTableGet(_bc, _bcOffset, 2, const <idl.LinkedNode>[]);
+    return _variantField_2;
+  }
+
+  @override
+  List<idl.LinkedNode> get showCombinator_shownNames {
+    assert(kind == idl.LinkedNodeKind.showCombinator);
+    _variantField_2 ??=
+        const fb.ListReader<idl.LinkedNode>(const _LinkedNodeReader())
+            .vTableGet(_bc, _bcOffset, 2, const <idl.LinkedNode>[]);
+    return _variantField_2;
+  }
+
+  @override
+  List<idl.LinkedNode> get stringInterpolation_elements {
+    assert(kind == idl.LinkedNodeKind.stringInterpolation);
+    _variantField_2 ??=
+        const fb.ListReader<idl.LinkedNode>(const _LinkedNodeReader())
+            .vTableGet(_bc, _bcOffset, 2, const <idl.LinkedNode>[]);
+    return _variantField_2;
+  }
+
+  @override
+  List<idl.LinkedNode> get switchStatement_members {
+    assert(kind == idl.LinkedNodeKind.switchStatement);
+    _variantField_2 ??=
+        const fb.ListReader<idl.LinkedNode>(const _LinkedNodeReader())
+            .vTableGet(_bc, _bcOffset, 2, const <idl.LinkedNode>[]);
+    return _variantField_2;
+  }
+
+  @override
+  List<idl.LinkedNode> get tryStatement_catchClauses {
+    assert(kind == idl.LinkedNodeKind.tryStatement);
+    _variantField_2 ??=
+        const fb.ListReader<idl.LinkedNode>(const _LinkedNodeReader())
+            .vTableGet(_bc, _bcOffset, 2, const <idl.LinkedNode>[]);
+    return _variantField_2;
+  }
+
+  @override
+  List<idl.LinkedNode> get typeArgumentList_arguments {
+    assert(kind == idl.LinkedNodeKind.typeArgumentList);
+    _variantField_2 ??=
+        const fb.ListReader<idl.LinkedNode>(const _LinkedNodeReader())
+            .vTableGet(_bc, _bcOffset, 2, const <idl.LinkedNode>[]);
+    return _variantField_2;
+  }
+
+  @override
+  List<idl.LinkedNode> get typeParameterList_typeParameters {
+    assert(kind == idl.LinkedNodeKind.typeParameterList);
+    _variantField_2 ??=
+        const fb.ListReader<idl.LinkedNode>(const _LinkedNodeReader())
+            .vTableGet(_bc, _bcOffset, 2, const <idl.LinkedNode>[]);
+    return _variantField_2;
+  }
+
+  @override
+  List<idl.LinkedNode> get variableDeclarationList_variables {
+    assert(kind == idl.LinkedNodeKind.variableDeclarationList);
+    _variantField_2 ??=
+        const fb.ListReader<idl.LinkedNode>(const _LinkedNodeReader())
+            .vTableGet(_bc, _bcOffset, 2, const <idl.LinkedNode>[]);
+    return _variantField_2;
+  }
+
+  @override
+  List<idl.LinkedNode> get withClause_mixinTypes {
+    assert(kind == idl.LinkedNodeKind.withClause);
+    _variantField_2 ??=
+        const fb.ListReader<idl.LinkedNode>(const _LinkedNodeReader())
+            .vTableGet(_bc, _bcOffset, 2, const <idl.LinkedNode>[]);
+    return _variantField_2;
+  }
+
+  @override
+  idl.LinkedNode get annotatedNode_comment {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.constructorDeclaration ||
+        kind == idl.LinkedNodeKind.declaredIdentifier ||
+        kind == idl.LinkedNodeKind.enumDeclaration ||
+        kind == idl.LinkedNodeKind.enumConstantDeclaration ||
+        kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.fieldDeclaration ||
+        kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.genericTypeAlias ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.libraryDirective ||
+        kind == idl.LinkedNodeKind.methodDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration ||
+        kind == idl.LinkedNodeKind.partDirective ||
+        kind == idl.LinkedNodeKind.partOfDirective ||
+        kind == idl.LinkedNodeKind.topLevelVariableDeclaration ||
+        kind == idl.LinkedNodeKind.typeParameter ||
+        kind == idl.LinkedNodeKind.variableDeclaration ||
+        kind == idl.LinkedNodeKind.variableDeclarationList);
+    _variantField_11 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 11, null);
+    return _variantField_11;
+  }
+
+  @override
+  List<idl.LinkedNode> get annotatedNode_metadata {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.constructorDeclaration ||
+        kind == idl.LinkedNodeKind.declaredIdentifier ||
+        kind == idl.LinkedNodeKind.enumDeclaration ||
+        kind == idl.LinkedNodeKind.enumConstantDeclaration ||
+        kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.fieldDeclaration ||
+        kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.genericTypeAlias ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.libraryDirective ||
+        kind == idl.LinkedNodeKind.methodDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration ||
+        kind == idl.LinkedNodeKind.partDirective ||
+        kind == idl.LinkedNodeKind.partOfDirective ||
+        kind == idl.LinkedNodeKind.topLevelVariableDeclaration ||
+        kind == idl.LinkedNodeKind.typeParameter ||
+        kind == idl.LinkedNodeKind.variableDeclaration ||
+        kind == idl.LinkedNodeKind.variableDeclarationList);
+    _variantField_4 ??=
+        const fb.ListReader<idl.LinkedNode>(const _LinkedNodeReader())
+            .vTableGet(_bc, _bcOffset, 4, const <idl.LinkedNode>[]);
+    return _variantField_4;
+  }
+
+  @override
+  List<idl.LinkedNode> get normalFormalParameter_metadata {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter);
+    _variantField_4 ??=
+        const fb.ListReader<idl.LinkedNode>(const _LinkedNodeReader())
+            .vTableGet(_bc, _bcOffset, 4, const <idl.LinkedNode>[]);
+    return _variantField_4;
+  }
+
+  @override
+  List<idl.LinkedNode> get switchMember_statements {
+    assert(kind == idl.LinkedNodeKind.switchCase ||
+        kind == idl.LinkedNodeKind.switchDefault);
+    _variantField_4 ??=
+        const fb.ListReader<idl.LinkedNode>(const _LinkedNodeReader())
+            .vTableGet(_bc, _bcOffset, 4, const <idl.LinkedNode>[]);
+    return _variantField_4;
+  }
+
+  @override
+  idl.LinkedNode get annotation_arguments {
+    assert(kind == idl.LinkedNodeKind.annotation);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get asExpression_expression {
+    assert(kind == idl.LinkedNodeKind.asExpression);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get assertInitializer_condition {
+    assert(kind == idl.LinkedNodeKind.assertInitializer);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get assertStatement_condition {
+    assert(kind == idl.LinkedNodeKind.assertStatement);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get assignmentExpression_leftHandSide {
+    assert(kind == idl.LinkedNodeKind.assignmentExpression);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get awaitExpression_expression {
+    assert(kind == idl.LinkedNodeKind.awaitExpression);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get binaryExpression_leftOperand {
+    assert(kind == idl.LinkedNodeKind.binaryExpression);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get blockFunctionBody_block {
+    assert(kind == idl.LinkedNodeKind.blockFunctionBody);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get breakStatement_label {
+    assert(kind == idl.LinkedNodeKind.breakStatement);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get cascadeExpression_target {
+    assert(kind == idl.LinkedNodeKind.cascadeExpression);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get catchClause_body {
+    assert(kind == idl.LinkedNodeKind.catchClause);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get classDeclaration_extendsClause {
+    assert(kind == idl.LinkedNodeKind.classDeclaration);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get classTypeAlias_typeParameters {
+    assert(kind == idl.LinkedNodeKind.classTypeAlias);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get compilationUnit_scriptTag {
+    assert(kind == idl.LinkedNodeKind.compilationUnit);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get conditionalExpression_condition {
+    assert(kind == idl.LinkedNodeKind.conditionalExpression);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get configuration_name {
+    assert(kind == idl.LinkedNodeKind.configuration);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get constructorDeclaration_body {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get constructorFieldInitializer_expression {
+    assert(kind == idl.LinkedNodeKind.constructorFieldInitializer);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get constructorName_name {
+    assert(kind == idl.LinkedNodeKind.constructorName);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get continueStatement_label {
+    assert(kind == idl.LinkedNodeKind.continueStatement);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get declaredIdentifier_identifier {
+    assert(kind == idl.LinkedNodeKind.declaredIdentifier);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get defaultFormalParameter_defaultValue {
+    assert(kind == idl.LinkedNodeKind.defaultFormalParameter);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get doStatement_body {
+    assert(kind == idl.LinkedNodeKind.doStatement);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get enumConstantDeclaration_name {
+    assert(kind == idl.LinkedNodeKind.enumConstantDeclaration);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get expressionFunctionBody_expression {
+    assert(kind == idl.LinkedNodeKind.expressionFunctionBody);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get expressionStatement_expression {
+    assert(kind == idl.LinkedNodeKind.expressionStatement);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get extendsClause_superclass {
+    assert(kind == idl.LinkedNodeKind.extendsClause);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get fieldDeclaration_fields {
+    assert(kind == idl.LinkedNodeKind.fieldDeclaration);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get fieldFormalParameter_type {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get forEachParts_iterable {
+    assert(kind == idl.LinkedNodeKind.forEachPartsWithDeclaration ||
+        kind == idl.LinkedNodeKind.forEachPartsWithIdentifier);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get forMixin_forLoopParts {
+    assert(kind == idl.LinkedNodeKind.forElement ||
+        kind == idl.LinkedNodeKind.forStatement);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get forParts_condition {
+    assert(kind == idl.LinkedNodeKind.forPartsWithDeclarations ||
+        kind == idl.LinkedNodeKind.forPartsWithExpression);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get functionDeclaration_functionExpression {
+    assert(kind == idl.LinkedNodeKind.functionDeclaration);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get functionDeclarationStatement_functionDeclaration {
+    assert(kind == idl.LinkedNodeKind.functionDeclarationStatement);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get functionExpression_body {
+    assert(kind == idl.LinkedNodeKind.functionExpression);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get functionExpressionInvocation_function {
+    assert(kind == idl.LinkedNodeKind.functionExpressionInvocation);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get functionTypeAlias_formalParameters {
+    assert(kind == idl.LinkedNodeKind.functionTypeAlias);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get functionTypedFormalParameter_formalParameters {
+    assert(kind == idl.LinkedNodeKind.functionTypedFormalParameter);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get genericFunctionType_typeParameters {
+    assert(kind == idl.LinkedNodeKind.genericFunctionType);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get genericTypeAlias_typeParameters {
+    assert(kind == idl.LinkedNodeKind.genericTypeAlias);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get ifMixin_condition {
+    assert(kind == idl.LinkedNodeKind.ifElement ||
+        kind == idl.LinkedNodeKind.ifStatement);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get importDirective_prefix {
+    assert(kind == idl.LinkedNodeKind.importDirective);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get indexExpression_index {
+    assert(kind == idl.LinkedNodeKind.indexExpression);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get instanceCreationExpression_arguments {
+    assert(kind == idl.LinkedNodeKind.instanceCreationExpression);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get interpolationExpression_expression {
+    assert(kind == idl.LinkedNodeKind.interpolationExpression);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get isExpression_expression {
+    assert(kind == idl.LinkedNodeKind.isExpression);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get label_label {
+    assert(kind == idl.LinkedNodeKind.label);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get labeledStatement_statement {
+    assert(kind == idl.LinkedNodeKind.labeledStatement);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get libraryDirective_name {
+    assert(kind == idl.LinkedNodeKind.libraryDirective);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get mapLiteralEntry_key {
+    assert(kind == idl.LinkedNodeKind.mapLiteralEntry);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get methodDeclaration_body {
+    assert(kind == idl.LinkedNodeKind.methodDeclaration);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get methodInvocation_methodName {
+    assert(kind == idl.LinkedNodeKind.methodInvocation);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get mixinDeclaration_onClause {
+    assert(kind == idl.LinkedNodeKind.mixinDeclaration);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get namedExpression_expression {
+    assert(kind == idl.LinkedNodeKind.namedExpression);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get nativeClause_name {
+    assert(kind == idl.LinkedNodeKind.nativeClause);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get nativeFunctionBody_stringLiteral {
+    assert(kind == idl.LinkedNodeKind.nativeFunctionBody);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get parenthesizedExpression_expression {
+    assert(kind == idl.LinkedNodeKind.parenthesizedExpression);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get partOfDirective_libraryName {
+    assert(kind == idl.LinkedNodeKind.partOfDirective);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get postfixExpression_operand {
+    assert(kind == idl.LinkedNodeKind.postfixExpression);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get prefixedIdentifier_identifier {
+    assert(kind == idl.LinkedNodeKind.prefixedIdentifier);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get prefixExpression_operand {
+    assert(kind == idl.LinkedNodeKind.prefixExpression);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get propertyAccess_propertyName {
+    assert(kind == idl.LinkedNodeKind.propertyAccess);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get redirectingConstructorInvocation_arguments {
+    assert(kind == idl.LinkedNodeKind.redirectingConstructorInvocation);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get returnStatement_expression {
+    assert(kind == idl.LinkedNodeKind.returnStatement);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get simpleFormalParameter_type {
+    assert(kind == idl.LinkedNodeKind.simpleFormalParameter);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get spreadElement_expression {
+    assert(kind == idl.LinkedNodeKind.spreadElement);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get superConstructorInvocation_arguments {
+    assert(kind == idl.LinkedNodeKind.superConstructorInvocation);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get switchCase_expression {
+    assert(kind == idl.LinkedNodeKind.switchCase);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get throwExpression_expression {
+    assert(kind == idl.LinkedNodeKind.throwExpression);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get topLevelVariableDeclaration_variableList {
+    assert(kind == idl.LinkedNodeKind.topLevelVariableDeclaration);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get tryStatement_body {
+    assert(kind == idl.LinkedNodeKind.tryStatement);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get typeName_name {
+    assert(kind == idl.LinkedNodeKind.typeName);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get typeParameter_bound {
+    assert(kind == idl.LinkedNodeKind.typeParameter);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get variableDeclaration_initializer {
+    assert(kind == idl.LinkedNodeKind.variableDeclaration);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get variableDeclarationList_type {
+    assert(kind == idl.LinkedNodeKind.variableDeclarationList);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get variableDeclarationStatement_variables {
+    assert(kind == idl.LinkedNodeKind.variableDeclarationStatement);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get whileStatement_body {
+    assert(kind == idl.LinkedNodeKind.whileStatement);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  idl.LinkedNode get yieldStatement_expression {
+    assert(kind == idl.LinkedNodeKind.yieldStatement);
+    _variantField_6 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 6, null);
+    return _variantField_6;
+  }
+
+  @override
+  int get annotation_atSign {
+    assert(kind == idl.LinkedNodeKind.annotation);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get argumentList_leftParenthesis {
+    assert(kind == idl.LinkedNodeKind.argumentList);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get asExpression_asOperator {
+    assert(kind == idl.LinkedNodeKind.asExpression);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get assertInitializer_assertKeyword {
+    assert(kind == idl.LinkedNodeKind.assertInitializer);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get assertStatement_assertKeyword {
+    assert(kind == idl.LinkedNodeKind.assertStatement);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get assignmentExpression_element {
+    assert(kind == idl.LinkedNodeKind.assignmentExpression);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get awaitExpression_awaitKeyword {
+    assert(kind == idl.LinkedNodeKind.awaitExpression);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get binaryExpression_element {
+    assert(kind == idl.LinkedNodeKind.binaryExpression);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get block_leftBracket {
+    assert(kind == idl.LinkedNodeKind.block);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get blockFunctionBody_keyword {
+    assert(kind == idl.LinkedNodeKind.blockFunctionBody);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get booleanLiteral_literal {
+    assert(kind == idl.LinkedNodeKind.booleanLiteral);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get breakStatement_breakKeyword {
+    assert(kind == idl.LinkedNodeKind.breakStatement);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get catchClause_catchKeyword {
+    assert(kind == idl.LinkedNodeKind.catchClause);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get classDeclaration_abstractKeyword {
+    assert(kind == idl.LinkedNodeKind.classDeclaration);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get classTypeAlias_abstractKeyword {
+    assert(kind == idl.LinkedNodeKind.classTypeAlias);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get compilationUnit_beginToken {
+    assert(kind == idl.LinkedNodeKind.compilationUnit);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get conditionalExpression_colon {
+    assert(kind == idl.LinkedNodeKind.conditionalExpression);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get configuration_ifKeyword {
+    assert(kind == idl.LinkedNodeKind.configuration);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get constructorDeclaration_constKeyword {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get constructorFieldInitializer_equals {
+    assert(kind == idl.LinkedNodeKind.constructorFieldInitializer);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get constructorName_element {
+    assert(kind == idl.LinkedNodeKind.constructorName);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get continueStatement_continueKeyword {
+    assert(kind == idl.LinkedNodeKind.continueStatement);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get declaredIdentifier_keyword {
+    assert(kind == idl.LinkedNodeKind.declaredIdentifier);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get defaultFormalParameter_separator {
+    assert(kind == idl.LinkedNodeKind.defaultFormalParameter);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get doStatement_leftParenthesis {
+    assert(kind == idl.LinkedNodeKind.doStatement);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get doubleLiteral_literal {
+    assert(kind == idl.LinkedNodeKind.doubleLiteral);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get emptyFunctionBody_semicolon {
+    assert(kind == idl.LinkedNodeKind.emptyFunctionBody);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get emptyStatement_semicolon {
+    assert(kind == idl.LinkedNodeKind.emptyStatement);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get enumDeclaration_enumKeyword {
+    assert(kind == idl.LinkedNodeKind.enumDeclaration);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get expressionFunctionBody_arrow {
+    assert(kind == idl.LinkedNodeKind.expressionFunctionBody);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get expressionStatement_semicolon {
+    assert(kind == idl.LinkedNodeKind.expressionStatement);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get extendsClause_extendsKeyword {
+    assert(kind == idl.LinkedNodeKind.extendsClause);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get fieldDeclaration_covariantKeyword {
+    assert(kind == idl.LinkedNodeKind.fieldDeclaration);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get fieldFormalParameter_keyword {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get forEachParts_inKeyword {
+    assert(kind == idl.LinkedNodeKind.forEachPartsWithDeclaration ||
+        kind == idl.LinkedNodeKind.forEachPartsWithIdentifier);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get formalParameterList_leftDelimiter {
+    assert(kind == idl.LinkedNodeKind.formalParameterList);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get forMixin_awaitKeyword {
+    assert(kind == idl.LinkedNodeKind.forElement ||
+        kind == idl.LinkedNodeKind.forStatement);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get forParts_leftSeparator {
+    assert(kind == idl.LinkedNodeKind.forPartsWithDeclarations ||
+        kind == idl.LinkedNodeKind.forPartsWithExpression);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get functionDeclaration_externalKeyword {
+    assert(kind == idl.LinkedNodeKind.functionDeclaration);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get genericFunctionType_functionKeyword {
+    assert(kind == idl.LinkedNodeKind.genericFunctionType);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get ifMixin_elseKeyword {
+    assert(kind == idl.LinkedNodeKind.ifElement ||
+        kind == idl.LinkedNodeKind.ifStatement);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get implementsClause_implementsKeyword {
+    assert(kind == idl.LinkedNodeKind.implementsClause);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get importDirective_asKeyword {
+    assert(kind == idl.LinkedNodeKind.importDirective);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get indexExpression_element {
+    assert(kind == idl.LinkedNodeKind.indexExpression);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get instanceCreationExpression_keyword {
+    assert(kind == idl.LinkedNodeKind.instanceCreationExpression);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get integerLiteral_literal {
+    assert(kind == idl.LinkedNodeKind.integerLiteral);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get interpolationExpression_leftBracket {
+    assert(kind == idl.LinkedNodeKind.interpolationExpression);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get interpolationString_token {
+    assert(kind == idl.LinkedNodeKind.interpolationString);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get isExpression_isOperator {
+    assert(kind == idl.LinkedNodeKind.isExpression);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get label_colon {
+    assert(kind == idl.LinkedNodeKind.label);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get listLiteral_leftBracket {
+    assert(kind == idl.LinkedNodeKind.listLiteral);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get mapLiteralEntry_separator {
+    assert(kind == idl.LinkedNodeKind.mapLiteralEntry);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get methodDeclaration_externalKeyword {
+    assert(kind == idl.LinkedNodeKind.methodDeclaration);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get methodInvocation_operator {
+    assert(kind == idl.LinkedNodeKind.methodInvocation);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get mixinDeclaration_mixinKeyword {
+    assert(kind == idl.LinkedNodeKind.mixinDeclaration);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get nativeClause_nativeKeyword {
+    assert(kind == idl.LinkedNodeKind.nativeClause);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get nativeFunctionBody_nativeKeyword {
+    assert(kind == idl.LinkedNodeKind.nativeFunctionBody);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get nullLiteral_literal {
+    assert(kind == idl.LinkedNodeKind.nullLiteral);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get onClause_onKeyword {
+    assert(kind == idl.LinkedNodeKind.onClause);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get parenthesizedExpression_leftParenthesis {
+    assert(kind == idl.LinkedNodeKind.parenthesizedExpression);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get postfixExpression_element {
+    assert(kind == idl.LinkedNodeKind.postfixExpression);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get prefixedIdentifier_period {
+    assert(kind == idl.LinkedNodeKind.prefixedIdentifier);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get prefixExpression_element {
+    assert(kind == idl.LinkedNodeKind.prefixExpression);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get propertyAccess_operator {
+    assert(kind == idl.LinkedNodeKind.propertyAccess);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get redirectingConstructorInvocation_element {
+    assert(kind == idl.LinkedNodeKind.redirectingConstructorInvocation);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get rethrowExpression_rethrowKeyword {
+    assert(kind == idl.LinkedNodeKind.rethrowExpression);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get returnStatement_returnKeyword {
+    assert(kind == idl.LinkedNodeKind.returnStatement);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get scriptTag_scriptTag {
+    assert(kind == idl.LinkedNodeKind.scriptTag);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get setOrMapLiteral_leftBracket {
+    assert(kind == idl.LinkedNodeKind.setOrMapLiteral);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get simpleFormalParameter_keyword {
+    assert(kind == idl.LinkedNodeKind.simpleFormalParameter);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get simpleIdentifier_element {
+    assert(kind == idl.LinkedNodeKind.simpleIdentifier);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get simpleStringLiteral_token {
+    assert(kind == idl.LinkedNodeKind.simpleStringLiteral);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get spreadElement_spreadOperator {
+    assert(kind == idl.LinkedNodeKind.spreadElement);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get superConstructorInvocation_element {
+    assert(kind == idl.LinkedNodeKind.superConstructorInvocation);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get superExpression_superKeyword {
+    assert(kind == idl.LinkedNodeKind.superExpression);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get switchMember_keyword {
+    assert(kind == idl.LinkedNodeKind.switchCase ||
+        kind == idl.LinkedNodeKind.switchDefault);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get switchStatement_leftParenthesis {
+    assert(kind == idl.LinkedNodeKind.switchStatement);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get symbolLiteral_poundSign {
+    assert(kind == idl.LinkedNodeKind.symbolLiteral);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get thisExpression_thisKeyword {
+    assert(kind == idl.LinkedNodeKind.thisExpression);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get throwExpression_throwKeyword {
+    assert(kind == idl.LinkedNodeKind.throwExpression);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get topLevelVariableDeclaration_semicolon {
+    assert(kind == idl.LinkedNodeKind.topLevelVariableDeclaration);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get tryStatement_finallyKeyword {
+    assert(kind == idl.LinkedNodeKind.tryStatement);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get typeArgumentList_leftBracket {
+    assert(kind == idl.LinkedNodeKind.typeArgumentList);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get typeName_question {
+    assert(kind == idl.LinkedNodeKind.typeName);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get typeParameter_extendsKeyword {
+    assert(kind == idl.LinkedNodeKind.typeParameter);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get typeParameterList_leftBracket {
+    assert(kind == idl.LinkedNodeKind.typeParameterList);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get variableDeclaration_equals {
+    assert(kind == idl.LinkedNodeKind.variableDeclaration);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get variableDeclarationList_keyword {
+    assert(kind == idl.LinkedNodeKind.variableDeclarationList);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get variableDeclarationStatement_semicolon {
+    assert(kind == idl.LinkedNodeKind.variableDeclarationStatement);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get whileStatement_leftParenthesis {
+    assert(kind == idl.LinkedNodeKind.whileStatement);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get withClause_withKeyword {
+    assert(kind == idl.LinkedNodeKind.withClause);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  int get yieldStatement_yieldKeyword {
+    assert(kind == idl.LinkedNodeKind.yieldStatement);
+    _variantField_15 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 15, 0);
+    return _variantField_15;
+  }
+
+  @override
+  idl.LinkedNode get annotation_constructorName {
+    assert(kind == idl.LinkedNodeKind.annotation);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get asExpression_type {
+    assert(kind == idl.LinkedNodeKind.asExpression);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get assertInitializer_message {
+    assert(kind == idl.LinkedNodeKind.assertInitializer);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get assertStatement_message {
+    assert(kind == idl.LinkedNodeKind.assertStatement);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get assignmentExpression_rightHandSide {
+    assert(kind == idl.LinkedNodeKind.assignmentExpression);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get binaryExpression_rightOperand {
+    assert(kind == idl.LinkedNodeKind.binaryExpression);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get catchClause_exceptionParameter {
+    assert(kind == idl.LinkedNodeKind.catchClause);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get classDeclaration_withClause {
+    assert(kind == idl.LinkedNodeKind.classDeclaration);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get classTypeAlias_superclass {
+    assert(kind == idl.LinkedNodeKind.classTypeAlias);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get conditionalExpression_elseExpression {
+    assert(kind == idl.LinkedNodeKind.conditionalExpression);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get configuration_value {
+    assert(kind == idl.LinkedNodeKind.configuration);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get constructorDeclaration_name {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get constructorFieldInitializer_fieldName {
+    assert(kind == idl.LinkedNodeKind.constructorFieldInitializer);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get constructorName_type {
+    assert(kind == idl.LinkedNodeKind.constructorName);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get declaredIdentifier_type {
+    assert(kind == idl.LinkedNodeKind.declaredIdentifier);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get defaultFormalParameter_parameter {
+    assert(kind == idl.LinkedNodeKind.defaultFormalParameter);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get doStatement_condition {
+    assert(kind == idl.LinkedNodeKind.doStatement);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get fieldFormalParameter_typeParameters {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get forEachPartsWithDeclaration_loopVariable {
+    assert(kind == idl.LinkedNodeKind.forEachPartsWithDeclaration);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get forEachPartsWithIdentifier_identifier {
+    assert(kind == idl.LinkedNodeKind.forEachPartsWithIdentifier);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get forElement_body {
+    assert(kind == idl.LinkedNodeKind.forElement);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get forPartsWithDeclarations_variables {
+    assert(kind == idl.LinkedNodeKind.forPartsWithDeclarations);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get forPartsWithExpression_initialization {
+    assert(kind == idl.LinkedNodeKind.forPartsWithExpression);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get forStatement_body {
+    assert(kind == idl.LinkedNodeKind.forStatement);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get functionDeclaration_returnType {
+    assert(kind == idl.LinkedNodeKind.functionDeclaration);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get functionExpression_formalParameters {
+    assert(kind == idl.LinkedNodeKind.functionExpression);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get functionTypeAlias_returnType {
+    assert(kind == idl.LinkedNodeKind.functionTypeAlias);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get functionTypedFormalParameter_returnType {
+    assert(kind == idl.LinkedNodeKind.functionTypedFormalParameter);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get genericFunctionType_returnType {
+    assert(kind == idl.LinkedNodeKind.genericFunctionType);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get genericTypeAlias_functionType {
+    assert(kind == idl.LinkedNodeKind.genericTypeAlias);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get ifStatement_elseStatement {
+    assert(kind == idl.LinkedNodeKind.ifStatement);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get indexExpression_target {
+    assert(kind == idl.LinkedNodeKind.indexExpression);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get instanceCreationExpression_constructorName {
+    assert(kind == idl.LinkedNodeKind.instanceCreationExpression);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get isExpression_type {
+    assert(kind == idl.LinkedNodeKind.isExpression);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get mapLiteralEntry_value {
+    assert(kind == idl.LinkedNodeKind.mapLiteralEntry);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get methodDeclaration_formalParameters {
+    assert(kind == idl.LinkedNodeKind.methodDeclaration);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get methodInvocation_target {
+    assert(kind == idl.LinkedNodeKind.methodInvocation);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get namedExpression_name {
+    assert(kind == idl.LinkedNodeKind.namedExpression);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get partOfDirective_uri {
+    assert(kind == idl.LinkedNodeKind.partOfDirective);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get prefixedIdentifier_prefix {
+    assert(kind == idl.LinkedNodeKind.prefixedIdentifier);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get propertyAccess_target {
+    assert(kind == idl.LinkedNodeKind.propertyAccess);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get redirectingConstructorInvocation_constructorName {
+    assert(kind == idl.LinkedNodeKind.redirectingConstructorInvocation);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get superConstructorInvocation_constructorName {
+    assert(kind == idl.LinkedNodeKind.superConstructorInvocation);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get switchStatement_expression {
+    assert(kind == idl.LinkedNodeKind.switchStatement);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get tryStatement_finallyBlock {
+    assert(kind == idl.LinkedNodeKind.tryStatement);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get typeName_typeArguments {
+    assert(kind == idl.LinkedNodeKind.typeName);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get typeParameter_name {
+    assert(kind == idl.LinkedNodeKind.typeParameter);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get variableDeclaration_name {
+    assert(kind == idl.LinkedNodeKind.variableDeclaration);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get whileStatement_condition {
+    assert(kind == idl.LinkedNodeKind.whileStatement);
+    _variantField_7 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 7, null);
+    return _variantField_7;
+  }
+
+  @override
+  idl.LinkedNode get annotation_name {
+    assert(kind == idl.LinkedNodeKind.annotation);
+    _variantField_8 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 8, null);
+    return _variantField_8;
+  }
+
+  @override
+  idl.LinkedNode get catchClause_exceptionType {
+    assert(kind == idl.LinkedNodeKind.catchClause);
+    _variantField_8 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 8, null);
+    return _variantField_8;
+  }
+
+  @override
+  idl.LinkedNode get classDeclaration_nativeClause {
+    assert(kind == idl.LinkedNodeKind.classDeclaration);
+    _variantField_8 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 8, null);
+    return _variantField_8;
+  }
+
+  @override
+  idl.LinkedNode get classTypeAlias_withClause {
+    assert(kind == idl.LinkedNodeKind.classTypeAlias);
+    _variantField_8 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 8, null);
+    return _variantField_8;
+  }
+
+  @override
+  idl.LinkedNode get conditionalExpression_thenExpression {
+    assert(kind == idl.LinkedNodeKind.conditionalExpression);
+    _variantField_8 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 8, null);
+    return _variantField_8;
+  }
+
+  @override
+  idl.LinkedNode get configuration_uri {
+    assert(kind == idl.LinkedNodeKind.configuration);
+    _variantField_8 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 8, null);
+    return _variantField_8;
+  }
+
+  @override
+  idl.LinkedNode get constructorDeclaration_parameters {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    _variantField_8 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 8, null);
+    return _variantField_8;
+  }
+
+  @override
+  idl.LinkedNode get fieldFormalParameter_formalParameters {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter);
+    _variantField_8 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 8, null);
+    return _variantField_8;
+  }
+
+  @override
+  idl.LinkedNode get functionExpression_typeParameters {
+    assert(kind == idl.LinkedNodeKind.functionExpression);
+    _variantField_8 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 8, null);
+    return _variantField_8;
+  }
+
+  @override
+  idl.LinkedNode get functionTypeAlias_typeParameters {
+    assert(kind == idl.LinkedNodeKind.functionTypeAlias);
+    _variantField_8 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 8, null);
+    return _variantField_8;
+  }
+
+  @override
+  idl.LinkedNode get functionTypedFormalParameter_typeParameters {
+    assert(kind == idl.LinkedNodeKind.functionTypedFormalParameter);
+    _variantField_8 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 8, null);
+    return _variantField_8;
+  }
+
+  @override
+  idl.LinkedNode get genericFunctionType_formalParameters {
+    assert(kind == idl.LinkedNodeKind.genericFunctionType);
+    _variantField_8 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 8, null);
+    return _variantField_8;
+  }
+
+  @override
+  idl.LinkedNode get ifElement_thenElement {
+    assert(kind == idl.LinkedNodeKind.ifElement);
+    _variantField_8 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 8, null);
+    return _variantField_8;
+  }
+
+  @override
+  idl.LinkedNode get ifStatement_thenStatement {
+    assert(kind == idl.LinkedNodeKind.ifStatement);
+    _variantField_8 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 8, null);
+    return _variantField_8;
+  }
+
+  @override
+  idl.LinkedNode get instanceCreationExpression_typeArguments {
+    assert(kind == idl.LinkedNodeKind.instanceCreationExpression);
+    _variantField_8 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 8, null);
+    return _variantField_8;
+  }
+
+  @override
+  idl.LinkedNode get methodDeclaration_returnType {
+    assert(kind == idl.LinkedNodeKind.methodDeclaration);
+    _variantField_8 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 8, null);
+    return _variantField_8;
+  }
+
+  @override
+  int get annotation_period {
+    assert(kind == idl.LinkedNodeKind.annotation);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get argumentList_rightParenthesis {
+    assert(kind == idl.LinkedNodeKind.argumentList);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get assertInitializer_comma {
+    assert(kind == idl.LinkedNodeKind.assertInitializer);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get assertStatement_comma {
+    assert(kind == idl.LinkedNodeKind.assertStatement);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get assignmentExpression_operator {
+    assert(kind == idl.LinkedNodeKind.assignmentExpression);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get binaryExpression_operator {
+    assert(kind == idl.LinkedNodeKind.binaryExpression);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get block_rightBracket {
+    assert(kind == idl.LinkedNodeKind.block);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get blockFunctionBody_star {
+    assert(kind == idl.LinkedNodeKind.blockFunctionBody);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get breakStatement_semicolon {
+    assert(kind == idl.LinkedNodeKind.breakStatement);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get catchClause_comma {
+    assert(kind == idl.LinkedNodeKind.catchClause);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get classDeclaration_classKeyword {
+    assert(kind == idl.LinkedNodeKind.classDeclaration);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get classTypeAlias_equals {
+    assert(kind == idl.LinkedNodeKind.classTypeAlias);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get compilationUnit_endToken {
+    assert(kind == idl.LinkedNodeKind.compilationUnit);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get conditionalExpression_question {
+    assert(kind == idl.LinkedNodeKind.conditionalExpression);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get configuration_leftParenthesis {
+    assert(kind == idl.LinkedNodeKind.configuration);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get constructorDeclaration_externalKeyword {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get constructorFieldInitializer_period {
+    assert(kind == idl.LinkedNodeKind.constructorFieldInitializer);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get constructorName_period {
+    assert(kind == idl.LinkedNodeKind.constructorName);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get continueStatement_semicolon {
+    assert(kind == idl.LinkedNodeKind.continueStatement);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get doStatement_rightParenthesis {
+    assert(kind == idl.LinkedNodeKind.doStatement);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get enumDeclaration_leftBracket {
+    assert(kind == idl.LinkedNodeKind.enumDeclaration);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get expressionFunctionBody_keyword {
+    assert(kind == idl.LinkedNodeKind.expressionFunctionBody);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get fieldDeclaration_semicolon {
+    assert(kind == idl.LinkedNodeKind.fieldDeclaration);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get fieldFormalParameter_period {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get formalParameterList_leftParenthesis {
+    assert(kind == idl.LinkedNodeKind.formalParameterList);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get forMixin_forKeyword {
+    assert(kind == idl.LinkedNodeKind.forElement ||
+        kind == idl.LinkedNodeKind.forStatement);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get forParts_rightSeparator {
+    assert(kind == idl.LinkedNodeKind.forPartsWithDeclarations ||
+        kind == idl.LinkedNodeKind.forPartsWithExpression);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get functionDeclaration_propertyKeyword {
+    assert(kind == idl.LinkedNodeKind.functionDeclaration);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get genericFunctionType_question {
+    assert(kind == idl.LinkedNodeKind.genericFunctionType);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get genericTypeAlias_equals {
+    assert(kind == idl.LinkedNodeKind.genericTypeAlias);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get ifMixin_ifKeyword {
+    assert(kind == idl.LinkedNodeKind.ifElement ||
+        kind == idl.LinkedNodeKind.ifStatement);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get importDirective_deferredKeyword {
+    assert(kind == idl.LinkedNodeKind.importDirective);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get indexExpression_period {
+    assert(kind == idl.LinkedNodeKind.indexExpression);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get integerLiteral_value {
+    assert(kind == idl.LinkedNodeKind.integerLiteral);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get interpolationExpression_rightBracket {
+    assert(kind == idl.LinkedNodeKind.interpolationExpression);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get isExpression_notOperator {
+    assert(kind == idl.LinkedNodeKind.isExpression);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get listLiteral_rightBracket {
+    assert(kind == idl.LinkedNodeKind.listLiteral);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get methodDeclaration_modifierKeyword {
+    assert(kind == idl.LinkedNodeKind.methodDeclaration);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get nativeFunctionBody_semicolon {
+    assert(kind == idl.LinkedNodeKind.nativeFunctionBody);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get parenthesizedExpression_rightParenthesis {
+    assert(kind == idl.LinkedNodeKind.parenthesizedExpression);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get partOfDirective_ofKeyword {
+    assert(kind == idl.LinkedNodeKind.partOfDirective);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get postfixExpression_operator {
+    assert(kind == idl.LinkedNodeKind.postfixExpression);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get prefixExpression_operator {
+    assert(kind == idl.LinkedNodeKind.prefixExpression);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get redirectingConstructorInvocation_period {
+    assert(kind == idl.LinkedNodeKind.redirectingConstructorInvocation);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get returnStatement_semicolon {
+    assert(kind == idl.LinkedNodeKind.returnStatement);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get setOrMapLiteral_rightBracket {
+    assert(kind == idl.LinkedNodeKind.setOrMapLiteral);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get simpleIdentifier_token {
+    assert(kind == idl.LinkedNodeKind.simpleIdentifier);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get superConstructorInvocation_period {
+    assert(kind == idl.LinkedNodeKind.superConstructorInvocation);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get switchMember_colon {
+    assert(kind == idl.LinkedNodeKind.switchCase ||
+        kind == idl.LinkedNodeKind.switchDefault);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get switchStatement_rightParenthesis {
+    assert(kind == idl.LinkedNodeKind.switchStatement);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get tryStatement_tryKeyword {
+    assert(kind == idl.LinkedNodeKind.tryStatement);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get typeArgumentList_rightBracket {
+    assert(kind == idl.LinkedNodeKind.typeArgumentList);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get typeParameter_id {
+    assert(kind == idl.LinkedNodeKind.typeParameter);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get typeParameterList_rightBracket {
+    assert(kind == idl.LinkedNodeKind.typeParameterList);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get whileStatement_rightParenthesis {
+    assert(kind == idl.LinkedNodeKind.whileStatement);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get yieldStatement_star {
+    assert(kind == idl.LinkedNodeKind.yieldStatement);
+    _variantField_16 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 16, 0);
+    return _variantField_16;
+  }
+
+  @override
+  int get assertInitializer_leftParenthesis {
+    assert(kind == idl.LinkedNodeKind.assertInitializer);
+    _variantField_17 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 17, 0);
+    return _variantField_17;
+  }
+
+  @override
+  int get assertStatement_leftParenthesis {
+    assert(kind == idl.LinkedNodeKind.assertStatement);
+    _variantField_17 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 17, 0);
+    return _variantField_17;
+  }
+
+  @override
+  int get catchClause_leftParenthesis {
+    assert(kind == idl.LinkedNodeKind.catchClause);
+    _variantField_17 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 17, 0);
+    return _variantField_17;
+  }
+
+  @override
+  int get configuration_rightParenthesis {
+    assert(kind == idl.LinkedNodeKind.configuration);
+    _variantField_17 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 17, 0);
+    return _variantField_17;
+  }
+
+  @override
+  int get constructorDeclaration_factoryKeyword {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    _variantField_17 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 17, 0);
+    return _variantField_17;
+  }
+
+  @override
+  int get constructorFieldInitializer_thisKeyword {
+    assert(kind == idl.LinkedNodeKind.constructorFieldInitializer);
+    _variantField_17 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 17, 0);
+    return _variantField_17;
+  }
+
+  @override
+  int get doStatement_doKeyword {
+    assert(kind == idl.LinkedNodeKind.doStatement);
+    _variantField_17 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 17, 0);
+    return _variantField_17;
+  }
+
+  @override
+  int get enumDeclaration_rightBracket {
+    assert(kind == idl.LinkedNodeKind.enumDeclaration);
+    _variantField_17 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 17, 0);
+    return _variantField_17;
+  }
+
+  @override
+  int get expressionFunctionBody_semicolon {
+    assert(kind == idl.LinkedNodeKind.expressionFunctionBody);
+    _variantField_17 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 17, 0);
+    return _variantField_17;
+  }
+
+  @override
+  int get fieldDeclaration_staticKeyword {
+    assert(kind == idl.LinkedNodeKind.fieldDeclaration);
+    _variantField_17 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 17, 0);
+    return _variantField_17;
+  }
+
+  @override
+  int get fieldFormalParameter_thisKeyword {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter);
+    _variantField_17 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 17, 0);
+    return _variantField_17;
+  }
+
+  @override
+  int get formalParameterList_rightDelimiter {
+    assert(kind == idl.LinkedNodeKind.formalParameterList);
+    _variantField_17 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 17, 0);
+    return _variantField_17;
+  }
+
+  @override
+  int get forMixin_leftParenthesis {
+    assert(kind == idl.LinkedNodeKind.forElement ||
+        kind == idl.LinkedNodeKind.forStatement);
+    _variantField_17 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 17, 0);
+    return _variantField_17;
+  }
+
+  @override
+  int get ifMixin_leftParenthesis {
+    assert(kind == idl.LinkedNodeKind.ifElement ||
+        kind == idl.LinkedNodeKind.ifStatement);
+    _variantField_17 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 17, 0);
+    return _variantField_17;
+  }
+
+  @override
+  int get indexExpression_leftBracket {
+    assert(kind == idl.LinkedNodeKind.indexExpression);
+    _variantField_17 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 17, 0);
+    return _variantField_17;
+  }
+
+  @override
+  int get methodDeclaration_operatorKeyword {
+    assert(kind == idl.LinkedNodeKind.methodDeclaration);
+    _variantField_17 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 17, 0);
+    return _variantField_17;
+  }
+
+  @override
+  int get redirectingConstructorInvocation_thisKeyword {
+    assert(kind == idl.LinkedNodeKind.redirectingConstructorInvocation);
+    _variantField_17 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 17, 0);
+    return _variantField_17;
+  }
+
+  @override
+  int get superConstructorInvocation_superKeyword {
+    assert(kind == idl.LinkedNodeKind.superConstructorInvocation);
+    _variantField_17 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 17, 0);
+    return _variantField_17;
+  }
+
+  @override
+  int get switchStatement_switchKeyword {
+    assert(kind == idl.LinkedNodeKind.switchStatement);
+    _variantField_17 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 17, 0);
+    return _variantField_17;
+  }
+
+  @override
+  int get whileStatement_whileKeyword {
+    assert(kind == idl.LinkedNodeKind.whileStatement);
+    _variantField_17 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 17, 0);
+    return _variantField_17;
+  }
+
+  @override
+  int get yieldStatement_semicolon {
+    assert(kind == idl.LinkedNodeKind.yieldStatement);
+    _variantField_17 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 17, 0);
+    return _variantField_17;
+  }
+
+  @override
+  int get assertInitializer_rightParenthesis {
+    assert(kind == idl.LinkedNodeKind.assertInitializer);
+    _variantField_18 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 18, 0);
+    return _variantField_18;
+  }
+
+  @override
+  int get assertStatement_rightParenthesis {
+    assert(kind == idl.LinkedNodeKind.assertStatement);
+    _variantField_18 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 18, 0);
+    return _variantField_18;
+  }
+
+  @override
+  int get catchClause_onKeyword {
+    assert(kind == idl.LinkedNodeKind.catchClause);
+    _variantField_18 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 18, 0);
+    return _variantField_18;
+  }
+
+  @override
+  int get classOrMixinDeclaration_rightBracket {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration);
+    _variantField_18 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 18, 0);
+    return _variantField_18;
+  }
+
+  @override
+  int get configuration_equalToken {
+    assert(kind == idl.LinkedNodeKind.configuration);
+    _variantField_18 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 18, 0);
+    return _variantField_18;
+  }
+
+  @override
+  int get constructorDeclaration_period {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    _variantField_18 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 18, 0);
+    return _variantField_18;
+  }
+
+  @override
+  int get directive_keyword {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.libraryDirective ||
+        kind == idl.LinkedNodeKind.partDirective ||
+        kind == idl.LinkedNodeKind.partOfDirective);
+    _variantField_18 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 18, 0);
+    return _variantField_18;
+  }
+
+  @override
+  int get doStatement_semicolon {
+    assert(kind == idl.LinkedNodeKind.doStatement);
+    _variantField_18 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 18, 0);
+    return _variantField_18;
+  }
+
+  @override
+  int get formalParameterList_rightParenthesis {
+    assert(kind == idl.LinkedNodeKind.formalParameterList);
+    _variantField_18 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 18, 0);
+    return _variantField_18;
+  }
+
+  @override
+  int get ifMixin_rightParenthesis {
+    assert(kind == idl.LinkedNodeKind.ifElement ||
+        kind == idl.LinkedNodeKind.ifStatement);
+    _variantField_18 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 18, 0);
+    return _variantField_18;
+  }
+
+  @override
+  int get indexExpression_rightBracket {
+    assert(kind == idl.LinkedNodeKind.indexExpression);
+    _variantField_18 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 18, 0);
+    return _variantField_18;
+  }
+
+  @override
+  int get methodDeclaration_propertyKeyword {
+    assert(kind == idl.LinkedNodeKind.methodDeclaration);
+    _variantField_18 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 18, 0);
+    return _variantField_18;
+  }
+
+  @override
+  int get switchStatement_leftBracket {
+    assert(kind == idl.LinkedNodeKind.switchStatement);
+    _variantField_18 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 18, 0);
+    return _variantField_18;
+  }
+
+  @override
+  int get typeAlias_typedefKeyword {
+    assert(kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.genericTypeAlias);
+    _variantField_18 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 18, 0);
+    return _variantField_18;
+  }
+
+  @override
+  int get assertStatement_semicolon {
+    assert(kind == idl.LinkedNodeKind.assertStatement);
+    _variantField_19 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 19, 0);
+    return _variantField_19;
+  }
+
+  @override
+  int get catchClause_rightParenthesis {
+    assert(kind == idl.LinkedNodeKind.catchClause);
+    _variantField_19 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 19, 0);
+    return _variantField_19;
+  }
+
+  @override
+  int get classOrMixinDeclaration_leftBracket {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration);
+    _variantField_19 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 19, 0);
+    return _variantField_19;
+  }
+
+  @override
+  int get combinator_keyword {
+    assert(kind == idl.LinkedNodeKind.hideCombinator ||
+        kind == idl.LinkedNodeKind.showCombinator);
+    _variantField_19 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 19, 0);
+    return _variantField_19;
+  }
+
+  @override
+  int get constructorDeclaration_separator {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    _variantField_19 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 19, 0);
+    return _variantField_19;
+  }
+
+  @override
+  int get doStatement_whileKeyword {
+    assert(kind == idl.LinkedNodeKind.doStatement);
+    _variantField_19 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 19, 0);
+    return _variantField_19;
+  }
+
+  @override
+  int get forMixin_rightParenthesis {
+    assert(kind == idl.LinkedNodeKind.forElement ||
+        kind == idl.LinkedNodeKind.forStatement);
+    _variantField_19 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 19, 0);
+    return _variantField_19;
+  }
+
+  @override
+  int get methodDeclaration_actualProperty {
+    assert(kind == idl.LinkedNodeKind.methodDeclaration);
+    _variantField_19 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 19, 0);
+    return _variantField_19;
+  }
+
+  @override
+  int get normalFormalParameter_covariantKeyword {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter);
+    _variantField_19 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 19, 0);
+    return _variantField_19;
+  }
+
+  @override
+  int get switchStatement_rightBracket {
+    assert(kind == idl.LinkedNodeKind.switchStatement);
+    _variantField_19 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 19, 0);
+    return _variantField_19;
+  }
+
+  @override
+  int get typeAlias_semicolon {
+    assert(kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.genericTypeAlias);
+    _variantField_19 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 19, 0);
+    return _variantField_19;
+  }
+
+  @override
+  int get typedLiteral_constKeyword {
+    assert(kind == idl.LinkedNodeKind.listLiteral ||
+        kind == idl.LinkedNodeKind.setOrMapLiteral);
+    _variantField_19 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 19, 0);
+    return _variantField_19;
+  }
+
+  @override
+  int get uriBasedDirective_uriElement {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.partDirective);
+    _variantField_19 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 19, 0);
+    return _variantField_19;
+  }
+
+  @override
+  idl.LinkedNodeType get assignmentExpression_elementType {
+    assert(kind == idl.LinkedNodeKind.assignmentExpression);
+    _variantField_23 ??=
+        const _LinkedNodeTypeReader().vTableGet(_bc, _bcOffset, 23, null);
+    return _variantField_23;
+  }
+
+  @override
+  idl.LinkedNodeType get binaryExpression_elementType {
+    assert(kind == idl.LinkedNodeKind.binaryExpression);
+    _variantField_23 ??=
+        const _LinkedNodeTypeReader().vTableGet(_bc, _bcOffset, 23, null);
+    return _variantField_23;
+  }
+
+  @override
+  idl.LinkedNodeType get constructorName_elementType {
+    assert(kind == idl.LinkedNodeKind.constructorName);
+    _variantField_23 ??=
+        const _LinkedNodeTypeReader().vTableGet(_bc, _bcOffset, 23, null);
+    return _variantField_23;
+  }
+
+  @override
+  idl.LinkedNodeType get indexExpression_elementType {
+    assert(kind == idl.LinkedNodeKind.indexExpression);
+    _variantField_23 ??=
+        const _LinkedNodeTypeReader().vTableGet(_bc, _bcOffset, 23, null);
+    return _variantField_23;
+  }
+
+  @override
+  idl.LinkedNodeType get postfixExpression_elementType {
+    assert(kind == idl.LinkedNodeKind.postfixExpression);
+    _variantField_23 ??=
+        const _LinkedNodeTypeReader().vTableGet(_bc, _bcOffset, 23, null);
+    return _variantField_23;
+  }
+
+  @override
+  idl.LinkedNodeType get prefixExpression_elementType {
+    assert(kind == idl.LinkedNodeKind.prefixExpression);
+    _variantField_23 ??=
+        const _LinkedNodeTypeReader().vTableGet(_bc, _bcOffset, 23, null);
+    return _variantField_23;
+  }
+
+  @override
+  idl.LinkedNodeType get redirectingConstructorInvocation_elementType {
+    assert(kind == idl.LinkedNodeKind.redirectingConstructorInvocation);
+    _variantField_23 ??=
+        const _LinkedNodeTypeReader().vTableGet(_bc, _bcOffset, 23, null);
+    return _variantField_23;
+  }
+
+  @override
+  idl.LinkedNodeType get simpleIdentifier_elementType {
+    assert(kind == idl.LinkedNodeKind.simpleIdentifier);
+    _variantField_23 ??=
+        const _LinkedNodeTypeReader().vTableGet(_bc, _bcOffset, 23, null);
+    return _variantField_23;
+  }
+
+  @override
+  idl.LinkedNodeType get superConstructorInvocation_elementType {
+    assert(kind == idl.LinkedNodeKind.superConstructorInvocation);
+    _variantField_23 ??=
+        const _LinkedNodeTypeReader().vTableGet(_bc, _bcOffset, 23, null);
+    return _variantField_23;
+  }
+
+  @override
+  idl.LinkedNodeType get typeName_type {
+    assert(kind == idl.LinkedNodeKind.typeName);
+    _variantField_23 ??=
+        const _LinkedNodeTypeReader().vTableGet(_bc, _bcOffset, 23, null);
+    return _variantField_23;
+  }
+
+  @override
+  bool get booleanLiteral_value {
+    assert(kind == idl.LinkedNodeKind.booleanLiteral);
+    _variantField_27 ??=
+        const fb.BoolReader().vTableGet(_bc, _bcOffset, 27, false);
+    return _variantField_27;
+  }
+
+  @override
+  bool get classDeclaration_isDartObject {
+    assert(kind == idl.LinkedNodeKind.classDeclaration);
+    _variantField_27 ??=
+        const fb.BoolReader().vTableGet(_bc, _bcOffset, 27, false);
+    return _variantField_27;
+  }
+
+  @override
+  bool get defaultFormalParameter_isNamed {
+    assert(kind == idl.LinkedNodeKind.defaultFormalParameter);
+    _variantField_27 ??=
+        const fb.BoolReader().vTableGet(_bc, _bcOffset, 27, false);
+    return _variantField_27;
+  }
+
+  @override
+  bool get normalFormalParameter_isCovariant {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter);
+    _variantField_27 ??=
+        const fb.BoolReader().vTableGet(_bc, _bcOffset, 27, false);
+    return _variantField_27;
+  }
+
+  @override
+  bool get setOrMapLiteral_isMap {
+    assert(kind == idl.LinkedNodeKind.setOrMapLiteral);
+    _variantField_27 ??=
+        const fb.BoolReader().vTableGet(_bc, _bcOffset, 27, false);
+    return _variantField_27;
+  }
+
+  @override
+  idl.LinkedNode get catchClause_stackTraceParameter {
+    assert(kind == idl.LinkedNodeKind.catchClause);
+    _variantField_9 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 9, null);
+    return _variantField_9;
+  }
+
+  @override
+  idl.LinkedNode get classTypeAlias_implementsClause {
+    assert(kind == idl.LinkedNodeKind.classTypeAlias);
+    _variantField_9 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 9, null);
+    return _variantField_9;
+  }
+
+  @override
+  idl.LinkedNode get constructorDeclaration_redirectedConstructor {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    _variantField_9 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 9, null);
+    return _variantField_9;
+  }
+
+  @override
+  idl.LinkedNode get ifElement_elseElement {
+    assert(kind == idl.LinkedNodeKind.ifElement);
+    _variantField_9 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 9, null);
+    return _variantField_9;
+  }
+
+  @override
+  idl.LinkedNode get methodDeclaration_typeParameters {
+    assert(kind == idl.LinkedNodeKind.methodDeclaration);
+    _variantField_9 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 9, null);
+    return _variantField_9;
+  }
+
+  @override
+  idl.LinkedNode get classOrMixinDeclaration_implementsClause {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration);
+    _variantField_12 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 12, null);
+    return _variantField_12;
+  }
+
+  @override
+  idl.LinkedNode get invocationExpression_typeArguments {
+    assert(kind == idl.LinkedNodeKind.functionExpressionInvocation ||
+        kind == idl.LinkedNodeKind.methodInvocation);
+    _variantField_12 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 12, null);
+    return _variantField_12;
+  }
+
+  @override
+  idl.LinkedNode get normalFormalParameter_identifier {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter);
+    _variantField_12 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 12, null);
+    return _variantField_12;
+  }
+
+  @override
+  List<idl.LinkedNode> get classOrMixinDeclaration_members {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration);
+    _variantField_5 ??=
+        const fb.ListReader<idl.LinkedNode>(const _LinkedNodeReader())
+            .vTableGet(_bc, _bcOffset, 5, const <idl.LinkedNode>[]);
+    return _variantField_5;
+  }
+
+  @override
+  List<idl.LinkedNode> get forParts_updaters {
+    assert(kind == idl.LinkedNodeKind.forPartsWithDeclarations ||
+        kind == idl.LinkedNodeKind.forPartsWithExpression);
+    _variantField_5 ??=
+        const fb.ListReader<idl.LinkedNode>(const _LinkedNodeReader())
+            .vTableGet(_bc, _bcOffset, 5, const <idl.LinkedNode>[]);
+    return _variantField_5;
+  }
+
+  @override
+  idl.LinkedNode get classOrMixinDeclaration_typeParameters {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration);
+    _variantField_13 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 13, null);
+    return _variantField_13;
+  }
+
+  @override
+  int get codeLength {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.constructorDeclaration ||
+        kind == idl.LinkedNodeKind.defaultFormalParameter ||
+        kind == idl.LinkedNodeKind.enumDeclaration ||
+        kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.genericTypeAlias ||
+        kind == idl.LinkedNodeKind.methodDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter ||
+        kind == idl.LinkedNodeKind.typeParameter ||
+        kind == idl.LinkedNodeKind.variableDeclaration);
+    _variantField_34 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 34, 0);
+    return _variantField_34;
+  }
+
+  @override
+  int get codeOffset {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.constructorDeclaration ||
+        kind == idl.LinkedNodeKind.defaultFormalParameter ||
+        kind == idl.LinkedNodeKind.enumDeclaration ||
+        kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.genericTypeAlias ||
+        kind == idl.LinkedNodeKind.methodDeclaration ||
+        kind == idl.LinkedNodeKind.mixinDeclaration ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter ||
+        kind == idl.LinkedNodeKind.typeParameter ||
+        kind == idl.LinkedNodeKind.variableDeclaration);
+    _variantField_33 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 33, 0);
+    return _variantField_33;
+  }
+
+  @override
+  int get directive_semicolon {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.libraryDirective ||
+        kind == idl.LinkedNodeKind.partDirective ||
+        kind == idl.LinkedNodeKind.partOfDirective);
+    _variantField_33 ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 33, 0);
+    return _variantField_33;
+  }
+
+  @override
+  List<int> get comment_tokens {
+    assert(kind == idl.LinkedNodeKind.comment);
+    _variantField_28 ??= const fb.Uint32ListReader()
+        .vTableGet(_bc, _bcOffset, 28, const <int>[]);
+    return _variantField_28;
+  }
+
+  @override
+  List<int> get symbolLiteral_components {
+    assert(kind == idl.LinkedNodeKind.symbolLiteral);
+    _variantField_28 ??= const fb.Uint32ListReader()
+        .vTableGet(_bc, _bcOffset, 28, const <int>[]);
+    return _variantField_28;
+  }
+
+  @override
+  idl.LinkedNodeCommentType get comment_type {
+    assert(kind == idl.LinkedNodeKind.comment);
+    _variantField_29 ??= const _LinkedNodeCommentTypeReader()
+        .vTableGet(_bc, _bcOffset, 29, idl.LinkedNodeCommentType.block);
+    return _variantField_29;
+  }
+
+  @override
+  List<idl.LinkedNode> get compilationUnit_directives {
+    assert(kind == idl.LinkedNodeKind.compilationUnit);
+    _variantField_3 ??=
+        const fb.ListReader<idl.LinkedNode>(const _LinkedNodeReader())
+            .vTableGet(_bc, _bcOffset, 3, const <idl.LinkedNode>[]);
+    return _variantField_3;
+  }
+
+  @override
+  List<idl.LinkedNode> get namespaceDirective_configurations {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective);
+    _variantField_3 ??=
+        const fb.ListReader<idl.LinkedNode>(const _LinkedNodeReader())
+            .vTableGet(_bc, _bcOffset, 3, const <idl.LinkedNode>[]);
+    return _variantField_3;
+  }
+
+  @override
+  List<idl.LinkedNode> get switchMember_labels {
+    assert(kind == idl.LinkedNodeKind.switchCase ||
+        kind == idl.LinkedNodeKind.switchDefault);
+    _variantField_3 ??=
+        const fb.ListReader<idl.LinkedNode>(const _LinkedNodeReader())
+            .vTableGet(_bc, _bcOffset, 3, const <idl.LinkedNode>[]);
+    return _variantField_3;
+  }
+
+  @override
+  idl.LinkedNode get constructorDeclaration_returnType {
+    assert(kind == idl.LinkedNodeKind.constructorDeclaration);
+    _variantField_10 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 10, null);
+    return _variantField_10;
+  }
+
+  @override
+  idl.LinkedNode get methodDeclaration_name {
+    assert(kind == idl.LinkedNodeKind.methodDeclaration);
+    _variantField_10 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 10, null);
+    return _variantField_10;
+  }
+
+  @override
+  double get doubleLiteral_value {
+    assert(kind == idl.LinkedNodeKind.doubleLiteral);
+    _variantField_21 ??=
+        const fb.Float64Reader().vTableGet(_bc, _bcOffset, 21, 0.0);
+    return _variantField_21;
+  }
+
+  @override
+  idl.LinkedNodeType get expression_type {
+    assert(kind == idl.LinkedNodeKind.adjacentStrings ||
+        kind == idl.LinkedNodeKind.assignmentExpression ||
+        kind == idl.LinkedNodeKind.asExpression ||
+        kind == idl.LinkedNodeKind.awaitExpression ||
+        kind == idl.LinkedNodeKind.binaryExpression ||
+        kind == idl.LinkedNodeKind.booleanLiteral ||
+        kind == idl.LinkedNodeKind.cascadeExpression ||
+        kind == idl.LinkedNodeKind.conditionalExpression ||
+        kind == idl.LinkedNodeKind.doubleLiteral ||
+        kind == idl.LinkedNodeKind.functionExpressionInvocation ||
+        kind == idl.LinkedNodeKind.indexExpression ||
+        kind == idl.LinkedNodeKind.instanceCreationExpression ||
+        kind == idl.LinkedNodeKind.integerLiteral ||
+        kind == idl.LinkedNodeKind.isExpression ||
+        kind == idl.LinkedNodeKind.listLiteral ||
+        kind == idl.LinkedNodeKind.methodInvocation ||
+        kind == idl.LinkedNodeKind.namedExpression ||
+        kind == idl.LinkedNodeKind.nullLiteral ||
+        kind == idl.LinkedNodeKind.parenthesizedExpression ||
+        kind == idl.LinkedNodeKind.prefixExpression ||
+        kind == idl.LinkedNodeKind.prefixedIdentifier ||
+        kind == idl.LinkedNodeKind.propertyAccess ||
+        kind == idl.LinkedNodeKind.postfixExpression ||
+        kind == idl.LinkedNodeKind.rethrowExpression ||
+        kind == idl.LinkedNodeKind.setOrMapLiteral ||
+        kind == idl.LinkedNodeKind.simpleIdentifier ||
+        kind == idl.LinkedNodeKind.simpleStringLiteral ||
+        kind == idl.LinkedNodeKind.stringInterpolation ||
+        kind == idl.LinkedNodeKind.superExpression ||
+        kind == idl.LinkedNodeKind.symbolLiteral ||
+        kind == idl.LinkedNodeKind.thisExpression ||
+        kind == idl.LinkedNodeKind.throwExpression);
+    _variantField_25 ??=
+        const _LinkedNodeTypeReader().vTableGet(_bc, _bcOffset, 25, null);
+    return _variantField_25;
+  }
+
+  @override
+  idl.LinkedNodeType get genericFunctionType_type {
+    assert(kind == idl.LinkedNodeKind.genericFunctionType);
+    _variantField_25 ??=
+        const _LinkedNodeTypeReader().vTableGet(_bc, _bcOffset, 25, null);
+    return _variantField_25;
+  }
+
+  @override
+  idl.LinkedNodeFormalParameterKind get formalParameter_kind {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter);
+    _variantField_26 ??= const _LinkedNodeFormalParameterKindReader().vTableGet(
+        _bc, _bcOffset, 26, idl.LinkedNodeFormalParameterKind.required);
+    return _variantField_26;
+  }
+
+  @override
+  String get interpolationString_value {
+    assert(kind == idl.LinkedNodeKind.interpolationString);
+    _variantField_30 ??=
+        const fb.StringReader().vTableGet(_bc, _bcOffset, 30, '');
+    return _variantField_30;
+  }
+
+  @override
+  idl.LinkedNode get invocationExpression_arguments {
+    assert(kind == idl.LinkedNodeKind.functionExpressionInvocation ||
+        kind == idl.LinkedNodeKind.methodInvocation);
+    _variantField_14 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 14, null);
+    return _variantField_14;
+  }
+
+  @override
+  idl.LinkedNode get namedCompilationUnitMember_name {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.enumDeclaration ||
+        kind == idl.LinkedNodeKind.functionDeclaration ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.genericTypeAlias ||
+        kind == idl.LinkedNodeKind.mixinDeclaration);
+    _variantField_14 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 14, null);
+    return _variantField_14;
+  }
+
+  @override
+  idl.LinkedNode get normalFormalParameter_comment {
+    assert(kind == idl.LinkedNodeKind.fieldFormalParameter ||
+        kind == idl.LinkedNodeKind.functionTypedFormalParameter ||
+        kind == idl.LinkedNodeKind.simpleFormalParameter);
+    _variantField_14 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 14, null);
+    return _variantField_14;
+  }
+
+  @override
+  idl.LinkedNode get typedLiteral_typeArguments {
+    assert(kind == idl.LinkedNodeKind.listLiteral ||
+        kind == idl.LinkedNodeKind.setOrMapLiteral);
+    _variantField_14 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 14, null);
+    return _variantField_14;
+  }
+
+  @override
+  idl.LinkedNode get uriBasedDirective_uri {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.partDirective);
+    _variantField_14 ??=
+        const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 14, null);
+    return _variantField_14;
+  }
+
+  @override
+  bool get isSynthetic {
+    _isSynthetic ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 1, false);
+    return _isSynthetic;
+  }
+
+  @override
+  idl.LinkedNodeKind get kind {
+    _kind ??= const _LinkedNodeKindReader()
+        .vTableGet(_bc, _bcOffset, 0, idl.LinkedNodeKind.adjacentStrings);
+    return _kind;
+  }
+
+  @override
+  String get namespaceDirective_selectedUri {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective);
+    _variantField_20 ??=
+        const fb.StringReader().vTableGet(_bc, _bcOffset, 20, '');
+    return _variantField_20;
+  }
+
+  @override
+  String get simpleStringLiteral_value {
+    assert(kind == idl.LinkedNodeKind.simpleStringLiteral);
+    _variantField_20 ??=
+        const fb.StringReader().vTableGet(_bc, _bcOffset, 20, '');
+    return _variantField_20;
+  }
+
+  @override
+  bool get setOrMapLiteral_isSet {
+    assert(kind == idl.LinkedNodeKind.setOrMapLiteral);
+    _variantField_31 ??=
+        const fb.BoolReader().vTableGet(_bc, _bcOffset, 31, false);
+    return _variantField_31;
+  }
+
+  @override
+  bool get simplyBoundable_isSimplyBounded {
+    assert(kind == idl.LinkedNodeKind.classDeclaration ||
+        kind == idl.LinkedNodeKind.classTypeAlias ||
+        kind == idl.LinkedNodeKind.functionTypeAlias ||
+        kind == idl.LinkedNodeKind.genericTypeAlias ||
+        kind == idl.LinkedNodeKind.mixinDeclaration);
+    _variantField_31 ??=
+        const fb.BoolReader().vTableGet(_bc, _bcOffset, 31, false);
+    return _variantField_31;
+  }
+
+  @override
+  String get uriBasedDirective_uriContent {
+    assert(kind == idl.LinkedNodeKind.exportDirective ||
+        kind == idl.LinkedNodeKind.importDirective ||
+        kind == idl.LinkedNodeKind.partDirective);
+    _variantField_22 ??=
+        const fb.StringReader().vTableGet(_bc, _bcOffset, 22, '');
+    return _variantField_22;
+  }
+
+  @override
+  idl.LinkedNodeVariablesDeclaration get variableDeclaration_declaration {
+    assert(kind == idl.LinkedNodeKind.variableDeclaration);
+    _variantField_32 ??= const _LinkedNodeVariablesDeclarationReader()
+        .vTableGet(_bc, _bcOffset, 32, null);
+    return _variantField_32;
+  }
+}
+
+abstract class _LinkedNodeMixin implements idl.LinkedNode {
+  @override
+  Map<String, Object> toJson() {
+    Map<String, Object> _result = <String, Object>{};
+    if (isSynthetic != false) _result["isSynthetic"] = isSynthetic;
+    if (kind != idl.LinkedNodeKind.adjacentStrings)
+      _result["kind"] = kind.toString().split('.')[1];
+    if (kind == idl.LinkedNodeKind.functionDeclaration) {
+      if (actualReturnType != null)
+        _result["actualReturnType"] = actualReturnType.toJson();
+      if (annotatedNode_comment != null)
+        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
+      if (annotatedNode_metadata.isNotEmpty)
+        _result["annotatedNode_metadata"] =
+            annotatedNode_metadata.map((_value) => _value.toJson()).toList();
+      if (functionDeclaration_functionExpression != null)
+        _result["functionDeclaration_functionExpression"] =
+            functionDeclaration_functionExpression.toJson();
+      if (functionDeclaration_externalKeyword != 0)
+        _result["functionDeclaration_externalKeyword"] =
+            functionDeclaration_externalKeyword;
+      if (functionDeclaration_returnType != null)
+        _result["functionDeclaration_returnType"] =
+            functionDeclaration_returnType.toJson();
+      if (functionDeclaration_propertyKeyword != 0)
+        _result["functionDeclaration_propertyKeyword"] =
+            functionDeclaration_propertyKeyword;
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
+      if (namedCompilationUnitMember_name != null)
+        _result["namedCompilationUnitMember_name"] =
+            namedCompilationUnitMember_name.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.functionExpression) {
+      if (actualReturnType != null)
+        _result["actualReturnType"] = actualReturnType.toJson();
+      if (functionExpression_body != null)
+        _result["functionExpression_body"] = functionExpression_body.toJson();
+      if (functionExpression_formalParameters != null)
+        _result["functionExpression_formalParameters"] =
+            functionExpression_formalParameters.toJson();
+      if (functionExpression_typeParameters != null)
+        _result["functionExpression_typeParameters"] =
+            functionExpression_typeParameters.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.functionTypeAlias) {
+      if (actualReturnType != null)
+        _result["actualReturnType"] = actualReturnType.toJson();
+      if (annotatedNode_comment != null)
+        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
+      if (annotatedNode_metadata.isNotEmpty)
+        _result["annotatedNode_metadata"] =
+            annotatedNode_metadata.map((_value) => _value.toJson()).toList();
+      if (functionTypeAlias_formalParameters != null)
+        _result["functionTypeAlias_formalParameters"] =
+            functionTypeAlias_formalParameters.toJson();
+      if (functionTypeAlias_returnType != null)
+        _result["functionTypeAlias_returnType"] =
+            functionTypeAlias_returnType.toJson();
+      if (functionTypeAlias_typeParameters != null)
+        _result["functionTypeAlias_typeParameters"] =
+            functionTypeAlias_typeParameters.toJson();
+      if (typeAlias_typedefKeyword != 0)
+        _result["typeAlias_typedefKeyword"] = typeAlias_typedefKeyword;
+      if (typeAlias_semicolon != 0)
+        _result["typeAlias_semicolon"] = typeAlias_semicolon;
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
+      if (namedCompilationUnitMember_name != null)
+        _result["namedCompilationUnitMember_name"] =
+            namedCompilationUnitMember_name.toJson();
+      if (simplyBoundable_isSimplyBounded != false)
+        _result["simplyBoundable_isSimplyBounded"] =
+            simplyBoundable_isSimplyBounded;
+    }
+    if (kind == idl.LinkedNodeKind.genericFunctionType) {
+      if (actualReturnType != null)
+        _result["actualReturnType"] = actualReturnType.toJson();
+      if (genericFunctionType_typeParameters != null)
+        _result["genericFunctionType_typeParameters"] =
+            genericFunctionType_typeParameters.toJson();
+      if (genericFunctionType_functionKeyword != 0)
+        _result["genericFunctionType_functionKeyword"] =
+            genericFunctionType_functionKeyword;
+      if (genericFunctionType_returnType != null)
+        _result["genericFunctionType_returnType"] =
+            genericFunctionType_returnType.toJson();
+      if (genericFunctionType_formalParameters != null)
+        _result["genericFunctionType_formalParameters"] =
+            genericFunctionType_formalParameters.toJson();
+      if (genericFunctionType_question != 0)
+        _result["genericFunctionType_question"] = genericFunctionType_question;
+      if (genericFunctionType_type != null)
+        _result["genericFunctionType_type"] = genericFunctionType_type.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.methodDeclaration) {
+      if (actualReturnType != null)
+        _result["actualReturnType"] = actualReturnType.toJson();
+      if (annotatedNode_comment != null)
+        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
+      if (annotatedNode_metadata.isNotEmpty)
+        _result["annotatedNode_metadata"] =
+            annotatedNode_metadata.map((_value) => _value.toJson()).toList();
+      if (methodDeclaration_body != null)
+        _result["methodDeclaration_body"] = methodDeclaration_body.toJson();
+      if (methodDeclaration_externalKeyword != 0)
+        _result["methodDeclaration_externalKeyword"] =
+            methodDeclaration_externalKeyword;
+      if (methodDeclaration_formalParameters != null)
+        _result["methodDeclaration_formalParameters"] =
+            methodDeclaration_formalParameters.toJson();
+      if (methodDeclaration_returnType != null)
+        _result["methodDeclaration_returnType"] =
+            methodDeclaration_returnType.toJson();
+      if (methodDeclaration_modifierKeyword != 0)
+        _result["methodDeclaration_modifierKeyword"] =
+            methodDeclaration_modifierKeyword;
+      if (methodDeclaration_operatorKeyword != 0)
+        _result["methodDeclaration_operatorKeyword"] =
+            methodDeclaration_operatorKeyword;
+      if (methodDeclaration_propertyKeyword != 0)
+        _result["methodDeclaration_propertyKeyword"] =
+            methodDeclaration_propertyKeyword;
+      if (methodDeclaration_actualProperty != 0)
+        _result["methodDeclaration_actualProperty"] =
+            methodDeclaration_actualProperty;
+      if (methodDeclaration_typeParameters != null)
+        _result["methodDeclaration_typeParameters"] =
+            methodDeclaration_typeParameters.toJson();
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
+      if (methodDeclaration_name != null)
+        _result["methodDeclaration_name"] = methodDeclaration_name.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.fieldFormalParameter) {
+      if (actualType != null) _result["actualType"] = actualType.toJson();
+      if (normalFormalParameter_metadata.isNotEmpty)
+        _result["normalFormalParameter_metadata"] =
+            normalFormalParameter_metadata
+                .map((_value) => _value.toJson())
+                .toList();
+      if (fieldFormalParameter_type != null)
+        _result["fieldFormalParameter_type"] =
+            fieldFormalParameter_type.toJson();
+      if (fieldFormalParameter_keyword != 0)
+        _result["fieldFormalParameter_keyword"] = fieldFormalParameter_keyword;
+      if (fieldFormalParameter_typeParameters != null)
+        _result["fieldFormalParameter_typeParameters"] =
+            fieldFormalParameter_typeParameters.toJson();
+      if (fieldFormalParameter_formalParameters != null)
+        _result["fieldFormalParameter_formalParameters"] =
+            fieldFormalParameter_formalParameters.toJson();
+      if (fieldFormalParameter_period != 0)
+        _result["fieldFormalParameter_period"] = fieldFormalParameter_period;
+      if (fieldFormalParameter_thisKeyword != 0)
+        _result["fieldFormalParameter_thisKeyword"] =
+            fieldFormalParameter_thisKeyword;
+      if (normalFormalParameter_covariantKeyword != 0)
+        _result["normalFormalParameter_covariantKeyword"] =
+            normalFormalParameter_covariantKeyword;
+      if (normalFormalParameter_isCovariant != false)
+        _result["normalFormalParameter_isCovariant"] =
+            normalFormalParameter_isCovariant;
+      if (normalFormalParameter_identifier != null)
+        _result["normalFormalParameter_identifier"] =
+            normalFormalParameter_identifier.toJson();
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
+      if (formalParameter_kind != idl.LinkedNodeFormalParameterKind.required)
+        _result["formalParameter_kind"] =
+            formalParameter_kind.toString().split('.')[1];
+      if (normalFormalParameter_comment != null)
+        _result["normalFormalParameter_comment"] =
+            normalFormalParameter_comment.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.functionTypedFormalParameter) {
+      if (actualType != null) _result["actualType"] = actualType.toJson();
+      if (normalFormalParameter_metadata.isNotEmpty)
+        _result["normalFormalParameter_metadata"] =
+            normalFormalParameter_metadata
+                .map((_value) => _value.toJson())
+                .toList();
+      if (functionTypedFormalParameter_formalParameters != null)
+        _result["functionTypedFormalParameter_formalParameters"] =
+            functionTypedFormalParameter_formalParameters.toJson();
+      if (functionTypedFormalParameter_returnType != null)
+        _result["functionTypedFormalParameter_returnType"] =
+            functionTypedFormalParameter_returnType.toJson();
+      if (functionTypedFormalParameter_typeParameters != null)
+        _result["functionTypedFormalParameter_typeParameters"] =
+            functionTypedFormalParameter_typeParameters.toJson();
+      if (normalFormalParameter_covariantKeyword != 0)
+        _result["normalFormalParameter_covariantKeyword"] =
+            normalFormalParameter_covariantKeyword;
+      if (normalFormalParameter_isCovariant != false)
+        _result["normalFormalParameter_isCovariant"] =
+            normalFormalParameter_isCovariant;
+      if (normalFormalParameter_identifier != null)
+        _result["normalFormalParameter_identifier"] =
+            normalFormalParameter_identifier.toJson();
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
+      if (formalParameter_kind != idl.LinkedNodeFormalParameterKind.required)
+        _result["formalParameter_kind"] =
+            formalParameter_kind.toString().split('.')[1];
+      if (normalFormalParameter_comment != null)
+        _result["normalFormalParameter_comment"] =
+            normalFormalParameter_comment.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.simpleFormalParameter) {
+      if (actualType != null) _result["actualType"] = actualType.toJson();
+      if (normalFormalParameter_metadata.isNotEmpty)
+        _result["normalFormalParameter_metadata"] =
+            normalFormalParameter_metadata
+                .map((_value) => _value.toJson())
+                .toList();
+      if (simpleFormalParameter_type != null)
+        _result["simpleFormalParameter_type"] =
+            simpleFormalParameter_type.toJson();
+      if (simpleFormalParameter_keyword != 0)
+        _result["simpleFormalParameter_keyword"] =
+            simpleFormalParameter_keyword;
+      if (normalFormalParameter_covariantKeyword != 0)
+        _result["normalFormalParameter_covariantKeyword"] =
+            normalFormalParameter_covariantKeyword;
+      if (normalFormalParameter_isCovariant != false)
+        _result["normalFormalParameter_isCovariant"] =
+            normalFormalParameter_isCovariant;
+      if (normalFormalParameter_identifier != null)
+        _result["normalFormalParameter_identifier"] =
+            normalFormalParameter_identifier.toJson();
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
+      if (formalParameter_kind != idl.LinkedNodeFormalParameterKind.required)
+        _result["formalParameter_kind"] =
+            formalParameter_kind.toString().split('.')[1];
+      if (normalFormalParameter_comment != null)
+        _result["normalFormalParameter_comment"] =
+            normalFormalParameter_comment.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.variableDeclaration) {
+      if (actualType != null) _result["actualType"] = actualType.toJson();
+      if (annotatedNode_comment != null)
+        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
+      if (annotatedNode_metadata.isNotEmpty)
+        _result["annotatedNode_metadata"] =
+            annotatedNode_metadata.map((_value) => _value.toJson()).toList();
+      if (variableDeclaration_initializer != null)
+        _result["variableDeclaration_initializer"] =
+            variableDeclaration_initializer.toJson();
+      if (variableDeclaration_equals != 0)
+        _result["variableDeclaration_equals"] = variableDeclaration_equals;
+      if (variableDeclaration_name != null)
+        _result["variableDeclaration_name"] = variableDeclaration_name.toJson();
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
+      if (variableDeclaration_declaration != null)
+        _result["variableDeclaration_declaration"] =
+            variableDeclaration_declaration.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.binaryExpression) {
+      if (binaryExpression_invokeType != null)
+        _result["binaryExpression_invokeType"] =
+            binaryExpression_invokeType.toJson();
+      if (binaryExpression_leftOperand != null)
+        _result["binaryExpression_leftOperand"] =
+            binaryExpression_leftOperand.toJson();
+      if (binaryExpression_element != 0)
+        _result["binaryExpression_element"] = binaryExpression_element;
+      if (binaryExpression_rightOperand != null)
+        _result["binaryExpression_rightOperand"] =
+            binaryExpression_rightOperand.toJson();
+      if (binaryExpression_operator != 0)
+        _result["binaryExpression_operator"] = binaryExpression_operator;
+      if (binaryExpression_elementType != null)
+        _result["binaryExpression_elementType"] =
+            binaryExpression_elementType.toJson();
+      if (expression_type != null)
+        _result["expression_type"] = expression_type.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.functionExpressionInvocation) {
+      if (invocationExpression_invokeType != null)
+        _result["invocationExpression_invokeType"] =
+            invocationExpression_invokeType.toJson();
+      if (functionExpressionInvocation_function != null)
+        _result["functionExpressionInvocation_function"] =
+            functionExpressionInvocation_function.toJson();
+      if (invocationExpression_typeArguments != null)
+        _result["invocationExpression_typeArguments"] =
+            invocationExpression_typeArguments.toJson();
+      if (expression_type != null)
+        _result["expression_type"] = expression_type.toJson();
+      if (invocationExpression_arguments != null)
+        _result["invocationExpression_arguments"] =
+            invocationExpression_arguments.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.methodInvocation) {
+      if (invocationExpression_invokeType != null)
+        _result["invocationExpression_invokeType"] =
+            invocationExpression_invokeType.toJson();
+      if (methodInvocation_methodName != null)
+        _result["methodInvocation_methodName"] =
+            methodInvocation_methodName.toJson();
+      if (methodInvocation_operator != 0)
+        _result["methodInvocation_operator"] = methodInvocation_operator;
+      if (methodInvocation_target != null)
+        _result["methodInvocation_target"] = methodInvocation_target.toJson();
+      if (invocationExpression_typeArguments != null)
+        _result["invocationExpression_typeArguments"] =
+            invocationExpression_typeArguments.toJson();
+      if (expression_type != null)
+        _result["expression_type"] = expression_type.toJson();
+      if (invocationExpression_arguments != null)
+        _result["invocationExpression_arguments"] =
+            invocationExpression_arguments.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.adjacentStrings) {
+      if (adjacentStrings_strings.isNotEmpty)
+        _result["adjacentStrings_strings"] =
+            adjacentStrings_strings.map((_value) => _value.toJson()).toList();
+      if (expression_type != null)
+        _result["expression_type"] = expression_type.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.argumentList) {
+      if (argumentList_arguments.isNotEmpty)
+        _result["argumentList_arguments"] =
+            argumentList_arguments.map((_value) => _value.toJson()).toList();
+      if (argumentList_leftParenthesis != 0)
+        _result["argumentList_leftParenthesis"] = argumentList_leftParenthesis;
+      if (argumentList_rightParenthesis != 0)
+        _result["argumentList_rightParenthesis"] =
+            argumentList_rightParenthesis;
+    }
+    if (kind == idl.LinkedNodeKind.block) {
+      if (block_statements.isNotEmpty)
+        _result["block_statements"] =
+            block_statements.map((_value) => _value.toJson()).toList();
+      if (block_leftBracket != 0)
+        _result["block_leftBracket"] = block_leftBracket;
+      if (block_rightBracket != 0)
+        _result["block_rightBracket"] = block_rightBracket;
+    }
+    if (kind == idl.LinkedNodeKind.cascadeExpression) {
+      if (cascadeExpression_sections.isNotEmpty)
+        _result["cascadeExpression_sections"] = cascadeExpression_sections
+            .map((_value) => _value.toJson())
+            .toList();
+      if (cascadeExpression_target != null)
+        _result["cascadeExpression_target"] = cascadeExpression_target.toJson();
+      if (expression_type != null)
+        _result["expression_type"] = expression_type.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.compilationUnit) {
+      if (compilationUnit_declarations.isNotEmpty)
+        _result["compilationUnit_declarations"] = compilationUnit_declarations
+            .map((_value) => _value.toJson())
+            .toList();
+      if (compilationUnit_scriptTag != null)
+        _result["compilationUnit_scriptTag"] =
+            compilationUnit_scriptTag.toJson();
+      if (compilationUnit_beginToken != 0)
+        _result["compilationUnit_beginToken"] = compilationUnit_beginToken;
+      if (compilationUnit_endToken != 0)
+        _result["compilationUnit_endToken"] = compilationUnit_endToken;
+      if (compilationUnit_directives.isNotEmpty)
+        _result["compilationUnit_directives"] = compilationUnit_directives
+            .map((_value) => _value.toJson())
+            .toList();
+    }
+    if (kind == idl.LinkedNodeKind.constructorDeclaration) {
+      if (constructorDeclaration_initializers.isNotEmpty)
+        _result["constructorDeclaration_initializers"] =
+            constructorDeclaration_initializers
+                .map((_value) => _value.toJson())
+                .toList();
+      if (annotatedNode_comment != null)
+        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
+      if (annotatedNode_metadata.isNotEmpty)
+        _result["annotatedNode_metadata"] =
+            annotatedNode_metadata.map((_value) => _value.toJson()).toList();
+      if (constructorDeclaration_body != null)
+        _result["constructorDeclaration_body"] =
+            constructorDeclaration_body.toJson();
+      if (constructorDeclaration_constKeyword != 0)
+        _result["constructorDeclaration_constKeyword"] =
+            constructorDeclaration_constKeyword;
+      if (constructorDeclaration_name != null)
+        _result["constructorDeclaration_name"] =
+            constructorDeclaration_name.toJson();
+      if (constructorDeclaration_parameters != null)
+        _result["constructorDeclaration_parameters"] =
+            constructorDeclaration_parameters.toJson();
+      if (constructorDeclaration_externalKeyword != 0)
+        _result["constructorDeclaration_externalKeyword"] =
+            constructorDeclaration_externalKeyword;
+      if (constructorDeclaration_factoryKeyword != 0)
+        _result["constructorDeclaration_factoryKeyword"] =
+            constructorDeclaration_factoryKeyword;
+      if (constructorDeclaration_period != 0)
+        _result["constructorDeclaration_period"] =
+            constructorDeclaration_period;
+      if (constructorDeclaration_separator != 0)
+        _result["constructorDeclaration_separator"] =
+            constructorDeclaration_separator;
+      if (constructorDeclaration_redirectedConstructor != null)
+        _result["constructorDeclaration_redirectedConstructor"] =
+            constructorDeclaration_redirectedConstructor.toJson();
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
+      if (constructorDeclaration_returnType != null)
+        _result["constructorDeclaration_returnType"] =
+            constructorDeclaration_returnType.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.dottedName) {
+      if (dottedName_components.isNotEmpty)
+        _result["dottedName_components"] =
+            dottedName_components.map((_value) => _value.toJson()).toList();
+    }
+    if (kind == idl.LinkedNodeKind.enumDeclaration) {
+      if (enumDeclaration_constants.isNotEmpty)
+        _result["enumDeclaration_constants"] =
+            enumDeclaration_constants.map((_value) => _value.toJson()).toList();
+      if (annotatedNode_comment != null)
+        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
+      if (annotatedNode_metadata.isNotEmpty)
+        _result["annotatedNode_metadata"] =
+            annotatedNode_metadata.map((_value) => _value.toJson()).toList();
+      if (enumDeclaration_enumKeyword != 0)
+        _result["enumDeclaration_enumKeyword"] = enumDeclaration_enumKeyword;
+      if (enumDeclaration_leftBracket != 0)
+        _result["enumDeclaration_leftBracket"] = enumDeclaration_leftBracket;
+      if (enumDeclaration_rightBracket != 0)
+        _result["enumDeclaration_rightBracket"] = enumDeclaration_rightBracket;
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
+      if (namedCompilationUnitMember_name != null)
+        _result["namedCompilationUnitMember_name"] =
+            namedCompilationUnitMember_name.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.formalParameterList) {
+      if (formalParameterList_parameters.isNotEmpty)
+        _result["formalParameterList_parameters"] =
+            formalParameterList_parameters
+                .map((_value) => _value.toJson())
+                .toList();
+      if (formalParameterList_leftDelimiter != 0)
+        _result["formalParameterList_leftDelimiter"] =
+            formalParameterList_leftDelimiter;
+      if (formalParameterList_leftParenthesis != 0)
+        _result["formalParameterList_leftParenthesis"] =
+            formalParameterList_leftParenthesis;
+      if (formalParameterList_rightDelimiter != 0)
+        _result["formalParameterList_rightDelimiter"] =
+            formalParameterList_rightDelimiter;
+      if (formalParameterList_rightParenthesis != 0)
+        _result["formalParameterList_rightParenthesis"] =
+            formalParameterList_rightParenthesis;
+    }
+    if (kind == idl.LinkedNodeKind.hideCombinator) {
+      if (hideCombinator_hiddenNames.isNotEmpty)
+        _result["hideCombinator_hiddenNames"] = hideCombinator_hiddenNames
+            .map((_value) => _value.toJson())
+            .toList();
+      if (combinator_keyword != 0)
+        _result["combinator_keyword"] = combinator_keyword;
+    }
+    if (kind == idl.LinkedNodeKind.implementsClause) {
+      if (implementsClause_interfaces.isNotEmpty)
+        _result["implementsClause_interfaces"] = implementsClause_interfaces
+            .map((_value) => _value.toJson())
+            .toList();
+      if (implementsClause_implementsKeyword != 0)
+        _result["implementsClause_implementsKeyword"] =
+            implementsClause_implementsKeyword;
+    }
+    if (kind == idl.LinkedNodeKind.labeledStatement) {
+      if (labeledStatement_labels.isNotEmpty)
+        _result["labeledStatement_labels"] =
+            labeledStatement_labels.map((_value) => _value.toJson()).toList();
+      if (labeledStatement_statement != null)
+        _result["labeledStatement_statement"] =
+            labeledStatement_statement.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.libraryIdentifier) {
+      if (libraryIdentifier_components.isNotEmpty)
+        _result["libraryIdentifier_components"] = libraryIdentifier_components
+            .map((_value) => _value.toJson())
+            .toList();
+    }
+    if (kind == idl.LinkedNodeKind.listLiteral) {
+      if (listLiteral_elements.isNotEmpty)
+        _result["listLiteral_elements"] =
+            listLiteral_elements.map((_value) => _value.toJson()).toList();
+      if (listLiteral_leftBracket != 0)
+        _result["listLiteral_leftBracket"] = listLiteral_leftBracket;
+      if (listLiteral_rightBracket != 0)
+        _result["listLiteral_rightBracket"] = listLiteral_rightBracket;
+      if (typedLiteral_constKeyword != 0)
+        _result["typedLiteral_constKeyword"] = typedLiteral_constKeyword;
+      if (expression_type != null)
+        _result["expression_type"] = expression_type.toJson();
+      if (typedLiteral_typeArguments != null)
+        _result["typedLiteral_typeArguments"] =
+            typedLiteral_typeArguments.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.exportDirective) {
+      if (namespaceDirective_combinators.isNotEmpty)
+        _result["namespaceDirective_combinators"] =
+            namespaceDirective_combinators
+                .map((_value) => _value.toJson())
+                .toList();
+      if (annotatedNode_comment != null)
+        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
+      if (annotatedNode_metadata.isNotEmpty)
+        _result["annotatedNode_metadata"] =
+            annotatedNode_metadata.map((_value) => _value.toJson()).toList();
+      if (directive_keyword != 0)
+        _result["directive_keyword"] = directive_keyword;
+      if (uriBasedDirective_uriElement != 0)
+        _result["uriBasedDirective_uriElement"] = uriBasedDirective_uriElement;
+      if (directive_semicolon != 0)
+        _result["directive_semicolon"] = directive_semicolon;
+      if (namespaceDirective_configurations.isNotEmpty)
+        _result["namespaceDirective_configurations"] =
+            namespaceDirective_configurations
+                .map((_value) => _value.toJson())
+                .toList();
+      if (uriBasedDirective_uri != null)
+        _result["uriBasedDirective_uri"] = uriBasedDirective_uri.toJson();
+      if (namespaceDirective_selectedUri != '')
+        _result["namespaceDirective_selectedUri"] =
+            namespaceDirective_selectedUri;
+      if (uriBasedDirective_uriContent != '')
+        _result["uriBasedDirective_uriContent"] = uriBasedDirective_uriContent;
+    }
+    if (kind == idl.LinkedNodeKind.importDirective) {
+      if (namespaceDirective_combinators.isNotEmpty)
+        _result["namespaceDirective_combinators"] =
+            namespaceDirective_combinators
+                .map((_value) => _value.toJson())
+                .toList();
+      if (annotatedNode_comment != null)
+        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
+      if (annotatedNode_metadata.isNotEmpty)
+        _result["annotatedNode_metadata"] =
+            annotatedNode_metadata.map((_value) => _value.toJson()).toList();
+      if (importDirective_prefix != null)
+        _result["importDirective_prefix"] = importDirective_prefix.toJson();
+      if (importDirective_asKeyword != 0)
+        _result["importDirective_asKeyword"] = importDirective_asKeyword;
+      if (importDirective_deferredKeyword != 0)
+        _result["importDirective_deferredKeyword"] =
+            importDirective_deferredKeyword;
+      if (directive_keyword != 0)
+        _result["directive_keyword"] = directive_keyword;
+      if (uriBasedDirective_uriElement != 0)
+        _result["uriBasedDirective_uriElement"] = uriBasedDirective_uriElement;
+      if (directive_semicolon != 0)
+        _result["directive_semicolon"] = directive_semicolon;
+      if (namespaceDirective_configurations.isNotEmpty)
+        _result["namespaceDirective_configurations"] =
+            namespaceDirective_configurations
+                .map((_value) => _value.toJson())
+                .toList();
+      if (uriBasedDirective_uri != null)
+        _result["uriBasedDirective_uri"] = uriBasedDirective_uri.toJson();
+      if (namespaceDirective_selectedUri != '')
+        _result["namespaceDirective_selectedUri"] =
+            namespaceDirective_selectedUri;
+      if (uriBasedDirective_uriContent != '')
+        _result["uriBasedDirective_uriContent"] = uriBasedDirective_uriContent;
+    }
+    if (kind == idl.LinkedNodeKind.onClause) {
+      if (onClause_superclassConstraints.isNotEmpty)
+        _result["onClause_superclassConstraints"] =
+            onClause_superclassConstraints
+                .map((_value) => _value.toJson())
+                .toList();
+      if (onClause_onKeyword != 0)
+        _result["onClause_onKeyword"] = onClause_onKeyword;
+    }
+    if (kind == idl.LinkedNodeKind.setOrMapLiteral) {
+      if (setOrMapLiteral_elements.isNotEmpty)
+        _result["setOrMapLiteral_elements"] =
+            setOrMapLiteral_elements.map((_value) => _value.toJson()).toList();
+      if (setOrMapLiteral_leftBracket != 0)
+        _result["setOrMapLiteral_leftBracket"] = setOrMapLiteral_leftBracket;
+      if (setOrMapLiteral_rightBracket != 0)
+        _result["setOrMapLiteral_rightBracket"] = setOrMapLiteral_rightBracket;
+      if (typedLiteral_constKeyword != 0)
+        _result["typedLiteral_constKeyword"] = typedLiteral_constKeyword;
+      if (setOrMapLiteral_isMap != false)
+        _result["setOrMapLiteral_isMap"] = setOrMapLiteral_isMap;
+      if (expression_type != null)
+        _result["expression_type"] = expression_type.toJson();
+      if (typedLiteral_typeArguments != null)
+        _result["typedLiteral_typeArguments"] =
+            typedLiteral_typeArguments.toJson();
+      if (setOrMapLiteral_isSet != false)
+        _result["setOrMapLiteral_isSet"] = setOrMapLiteral_isSet;
+    }
+    if (kind == idl.LinkedNodeKind.showCombinator) {
+      if (showCombinator_shownNames.isNotEmpty)
+        _result["showCombinator_shownNames"] =
+            showCombinator_shownNames.map((_value) => _value.toJson()).toList();
+      if (combinator_keyword != 0)
+        _result["combinator_keyword"] = combinator_keyword;
+    }
+    if (kind == idl.LinkedNodeKind.stringInterpolation) {
+      if (stringInterpolation_elements.isNotEmpty)
+        _result["stringInterpolation_elements"] = stringInterpolation_elements
+            .map((_value) => _value.toJson())
+            .toList();
+      if (expression_type != null)
+        _result["expression_type"] = expression_type.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.switchStatement) {
+      if (switchStatement_members.isNotEmpty)
+        _result["switchStatement_members"] =
+            switchStatement_members.map((_value) => _value.toJson()).toList();
+      if (switchStatement_leftParenthesis != 0)
+        _result["switchStatement_leftParenthesis"] =
+            switchStatement_leftParenthesis;
+      if (switchStatement_expression != null)
+        _result["switchStatement_expression"] =
+            switchStatement_expression.toJson();
+      if (switchStatement_rightParenthesis != 0)
+        _result["switchStatement_rightParenthesis"] =
+            switchStatement_rightParenthesis;
+      if (switchStatement_switchKeyword != 0)
+        _result["switchStatement_switchKeyword"] =
+            switchStatement_switchKeyword;
+      if (switchStatement_leftBracket != 0)
+        _result["switchStatement_leftBracket"] = switchStatement_leftBracket;
+      if (switchStatement_rightBracket != 0)
+        _result["switchStatement_rightBracket"] = switchStatement_rightBracket;
+    }
+    if (kind == idl.LinkedNodeKind.tryStatement) {
+      if (tryStatement_catchClauses.isNotEmpty)
+        _result["tryStatement_catchClauses"] =
+            tryStatement_catchClauses.map((_value) => _value.toJson()).toList();
+      if (tryStatement_body != null)
+        _result["tryStatement_body"] = tryStatement_body.toJson();
+      if (tryStatement_finallyKeyword != 0)
+        _result["tryStatement_finallyKeyword"] = tryStatement_finallyKeyword;
+      if (tryStatement_finallyBlock != null)
+        _result["tryStatement_finallyBlock"] =
+            tryStatement_finallyBlock.toJson();
+      if (tryStatement_tryKeyword != 0)
+        _result["tryStatement_tryKeyword"] = tryStatement_tryKeyword;
+    }
+    if (kind == idl.LinkedNodeKind.typeArgumentList) {
+      if (typeArgumentList_arguments.isNotEmpty)
+        _result["typeArgumentList_arguments"] = typeArgumentList_arguments
+            .map((_value) => _value.toJson())
+            .toList();
+      if (typeArgumentList_leftBracket != 0)
+        _result["typeArgumentList_leftBracket"] = typeArgumentList_leftBracket;
+      if (typeArgumentList_rightBracket != 0)
+        _result["typeArgumentList_rightBracket"] =
+            typeArgumentList_rightBracket;
+    }
+    if (kind == idl.LinkedNodeKind.typeParameterList) {
+      if (typeParameterList_typeParameters.isNotEmpty)
+        _result["typeParameterList_typeParameters"] =
+            typeParameterList_typeParameters
+                .map((_value) => _value.toJson())
+                .toList();
+      if (typeParameterList_leftBracket != 0)
+        _result["typeParameterList_leftBracket"] =
+            typeParameterList_leftBracket;
+      if (typeParameterList_rightBracket != 0)
+        _result["typeParameterList_rightBracket"] =
+            typeParameterList_rightBracket;
+    }
+    if (kind == idl.LinkedNodeKind.variableDeclarationList) {
+      if (variableDeclarationList_variables.isNotEmpty)
+        _result["variableDeclarationList_variables"] =
+            variableDeclarationList_variables
+                .map((_value) => _value.toJson())
+                .toList();
+      if (annotatedNode_comment != null)
+        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
+      if (annotatedNode_metadata.isNotEmpty)
+        _result["annotatedNode_metadata"] =
+            annotatedNode_metadata.map((_value) => _value.toJson()).toList();
+      if (variableDeclarationList_type != null)
+        _result["variableDeclarationList_type"] =
+            variableDeclarationList_type.toJson();
+      if (variableDeclarationList_keyword != 0)
+        _result["variableDeclarationList_keyword"] =
+            variableDeclarationList_keyword;
+    }
+    if (kind == idl.LinkedNodeKind.withClause) {
+      if (withClause_mixinTypes.isNotEmpty)
+        _result["withClause_mixinTypes"] =
+            withClause_mixinTypes.map((_value) => _value.toJson()).toList();
+      if (withClause_withKeyword != 0)
+        _result["withClause_withKeyword"] = withClause_withKeyword;
+    }
+    if (kind == idl.LinkedNodeKind.classDeclaration) {
+      if (annotatedNode_comment != null)
+        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
+      if (annotatedNode_metadata.isNotEmpty)
+        _result["annotatedNode_metadata"] =
+            annotatedNode_metadata.map((_value) => _value.toJson()).toList();
+      if (classDeclaration_extendsClause != null)
+        _result["classDeclaration_extendsClause"] =
+            classDeclaration_extendsClause.toJson();
+      if (classDeclaration_abstractKeyword != 0)
+        _result["classDeclaration_abstractKeyword"] =
+            classDeclaration_abstractKeyword;
+      if (classDeclaration_withClause != null)
+        _result["classDeclaration_withClause"] =
+            classDeclaration_withClause.toJson();
+      if (classDeclaration_nativeClause != null)
+        _result["classDeclaration_nativeClause"] =
+            classDeclaration_nativeClause.toJson();
+      if (classDeclaration_classKeyword != 0)
+        _result["classDeclaration_classKeyword"] =
+            classDeclaration_classKeyword;
+      if (classOrMixinDeclaration_rightBracket != 0)
+        _result["classOrMixinDeclaration_rightBracket"] =
+            classOrMixinDeclaration_rightBracket;
+      if (classOrMixinDeclaration_leftBracket != 0)
+        _result["classOrMixinDeclaration_leftBracket"] =
+            classOrMixinDeclaration_leftBracket;
+      if (classDeclaration_isDartObject != false)
+        _result["classDeclaration_isDartObject"] =
+            classDeclaration_isDartObject;
+      if (classOrMixinDeclaration_implementsClause != null)
+        _result["classOrMixinDeclaration_implementsClause"] =
+            classOrMixinDeclaration_implementsClause.toJson();
+      if (classOrMixinDeclaration_members.isNotEmpty)
+        _result["classOrMixinDeclaration_members"] =
+            classOrMixinDeclaration_members
+                .map((_value) => _value.toJson())
+                .toList();
+      if (classOrMixinDeclaration_typeParameters != null)
+        _result["classOrMixinDeclaration_typeParameters"] =
+            classOrMixinDeclaration_typeParameters.toJson();
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
+      if (namedCompilationUnitMember_name != null)
+        _result["namedCompilationUnitMember_name"] =
+            namedCompilationUnitMember_name.toJson();
+      if (simplyBoundable_isSimplyBounded != false)
+        _result["simplyBoundable_isSimplyBounded"] =
+            simplyBoundable_isSimplyBounded;
+    }
+    if (kind == idl.LinkedNodeKind.classTypeAlias) {
+      if (annotatedNode_comment != null)
+        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
+      if (annotatedNode_metadata.isNotEmpty)
+        _result["annotatedNode_metadata"] =
+            annotatedNode_metadata.map((_value) => _value.toJson()).toList();
+      if (classTypeAlias_typeParameters != null)
+        _result["classTypeAlias_typeParameters"] =
+            classTypeAlias_typeParameters.toJson();
+      if (classTypeAlias_abstractKeyword != 0)
+        _result["classTypeAlias_abstractKeyword"] =
+            classTypeAlias_abstractKeyword;
+      if (classTypeAlias_superclass != null)
+        _result["classTypeAlias_superclass"] =
+            classTypeAlias_superclass.toJson();
+      if (classTypeAlias_withClause != null)
+        _result["classTypeAlias_withClause"] =
+            classTypeAlias_withClause.toJson();
+      if (classTypeAlias_equals != 0)
+        _result["classTypeAlias_equals"] = classTypeAlias_equals;
+      if (typeAlias_typedefKeyword != 0)
+        _result["typeAlias_typedefKeyword"] = typeAlias_typedefKeyword;
+      if (typeAlias_semicolon != 0)
+        _result["typeAlias_semicolon"] = typeAlias_semicolon;
+      if (classTypeAlias_implementsClause != null)
+        _result["classTypeAlias_implementsClause"] =
+            classTypeAlias_implementsClause.toJson();
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
+      if (namedCompilationUnitMember_name != null)
+        _result["namedCompilationUnitMember_name"] =
+            namedCompilationUnitMember_name.toJson();
+      if (simplyBoundable_isSimplyBounded != false)
+        _result["simplyBoundable_isSimplyBounded"] =
+            simplyBoundable_isSimplyBounded;
+    }
+    if (kind == idl.LinkedNodeKind.declaredIdentifier) {
+      if (annotatedNode_comment != null)
+        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
+      if (annotatedNode_metadata.isNotEmpty)
+        _result["annotatedNode_metadata"] =
+            annotatedNode_metadata.map((_value) => _value.toJson()).toList();
+      if (declaredIdentifier_identifier != null)
+        _result["declaredIdentifier_identifier"] =
+            declaredIdentifier_identifier.toJson();
+      if (declaredIdentifier_keyword != 0)
+        _result["declaredIdentifier_keyword"] = declaredIdentifier_keyword;
+      if (declaredIdentifier_type != null)
+        _result["declaredIdentifier_type"] = declaredIdentifier_type.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.enumConstantDeclaration) {
+      if (annotatedNode_comment != null)
+        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
+      if (annotatedNode_metadata.isNotEmpty)
+        _result["annotatedNode_metadata"] =
+            annotatedNode_metadata.map((_value) => _value.toJson()).toList();
+      if (enumConstantDeclaration_name != null)
+        _result["enumConstantDeclaration_name"] =
+            enumConstantDeclaration_name.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.fieldDeclaration) {
+      if (annotatedNode_comment != null)
+        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
+      if (annotatedNode_metadata.isNotEmpty)
+        _result["annotatedNode_metadata"] =
+            annotatedNode_metadata.map((_value) => _value.toJson()).toList();
+      if (fieldDeclaration_fields != null)
+        _result["fieldDeclaration_fields"] = fieldDeclaration_fields.toJson();
+      if (fieldDeclaration_covariantKeyword != 0)
+        _result["fieldDeclaration_covariantKeyword"] =
+            fieldDeclaration_covariantKeyword;
+      if (fieldDeclaration_semicolon != 0)
+        _result["fieldDeclaration_semicolon"] = fieldDeclaration_semicolon;
+      if (fieldDeclaration_staticKeyword != 0)
+        _result["fieldDeclaration_staticKeyword"] =
+            fieldDeclaration_staticKeyword;
+    }
+    if (kind == idl.LinkedNodeKind.genericTypeAlias) {
+      if (annotatedNode_comment != null)
+        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
+      if (annotatedNode_metadata.isNotEmpty)
+        _result["annotatedNode_metadata"] =
+            annotatedNode_metadata.map((_value) => _value.toJson()).toList();
+      if (genericTypeAlias_typeParameters != null)
+        _result["genericTypeAlias_typeParameters"] =
+            genericTypeAlias_typeParameters.toJson();
+      if (genericTypeAlias_functionType != null)
+        _result["genericTypeAlias_functionType"] =
+            genericTypeAlias_functionType.toJson();
+      if (genericTypeAlias_equals != 0)
+        _result["genericTypeAlias_equals"] = genericTypeAlias_equals;
+      if (typeAlias_typedefKeyword != 0)
+        _result["typeAlias_typedefKeyword"] = typeAlias_typedefKeyword;
+      if (typeAlias_semicolon != 0)
+        _result["typeAlias_semicolon"] = typeAlias_semicolon;
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
+      if (namedCompilationUnitMember_name != null)
+        _result["namedCompilationUnitMember_name"] =
+            namedCompilationUnitMember_name.toJson();
+      if (simplyBoundable_isSimplyBounded != false)
+        _result["simplyBoundable_isSimplyBounded"] =
+            simplyBoundable_isSimplyBounded;
+    }
+    if (kind == idl.LinkedNodeKind.libraryDirective) {
+      if (annotatedNode_comment != null)
+        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
+      if (annotatedNode_metadata.isNotEmpty)
+        _result["annotatedNode_metadata"] =
+            annotatedNode_metadata.map((_value) => _value.toJson()).toList();
+      if (libraryDirective_name != null)
+        _result["libraryDirective_name"] = libraryDirective_name.toJson();
+      if (directive_keyword != 0)
+        _result["directive_keyword"] = directive_keyword;
+      if (directive_semicolon != 0)
+        _result["directive_semicolon"] = directive_semicolon;
+    }
+    if (kind == idl.LinkedNodeKind.mixinDeclaration) {
+      if (annotatedNode_comment != null)
+        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
+      if (annotatedNode_metadata.isNotEmpty)
+        _result["annotatedNode_metadata"] =
+            annotatedNode_metadata.map((_value) => _value.toJson()).toList();
+      if (mixinDeclaration_onClause != null)
+        _result["mixinDeclaration_onClause"] =
+            mixinDeclaration_onClause.toJson();
+      if (mixinDeclaration_mixinKeyword != 0)
+        _result["mixinDeclaration_mixinKeyword"] =
+            mixinDeclaration_mixinKeyword;
+      if (classOrMixinDeclaration_rightBracket != 0)
+        _result["classOrMixinDeclaration_rightBracket"] =
+            classOrMixinDeclaration_rightBracket;
+      if (classOrMixinDeclaration_leftBracket != 0)
+        _result["classOrMixinDeclaration_leftBracket"] =
+            classOrMixinDeclaration_leftBracket;
+      if (classOrMixinDeclaration_implementsClause != null)
+        _result["classOrMixinDeclaration_implementsClause"] =
+            classOrMixinDeclaration_implementsClause.toJson();
+      if (classOrMixinDeclaration_members.isNotEmpty)
+        _result["classOrMixinDeclaration_members"] =
+            classOrMixinDeclaration_members
+                .map((_value) => _value.toJson())
+                .toList();
+      if (classOrMixinDeclaration_typeParameters != null)
+        _result["classOrMixinDeclaration_typeParameters"] =
+            classOrMixinDeclaration_typeParameters.toJson();
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
+      if (namedCompilationUnitMember_name != null)
+        _result["namedCompilationUnitMember_name"] =
+            namedCompilationUnitMember_name.toJson();
+      if (simplyBoundable_isSimplyBounded != false)
+        _result["simplyBoundable_isSimplyBounded"] =
+            simplyBoundable_isSimplyBounded;
+    }
+    if (kind == idl.LinkedNodeKind.partDirective) {
+      if (annotatedNode_comment != null)
+        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
+      if (annotatedNode_metadata.isNotEmpty)
+        _result["annotatedNode_metadata"] =
+            annotatedNode_metadata.map((_value) => _value.toJson()).toList();
+      if (directive_keyword != 0)
+        _result["directive_keyword"] = directive_keyword;
+      if (uriBasedDirective_uriElement != 0)
+        _result["uriBasedDirective_uriElement"] = uriBasedDirective_uriElement;
+      if (directive_semicolon != 0)
+        _result["directive_semicolon"] = directive_semicolon;
+      if (uriBasedDirective_uri != null)
+        _result["uriBasedDirective_uri"] = uriBasedDirective_uri.toJson();
+      if (uriBasedDirective_uriContent != '')
+        _result["uriBasedDirective_uriContent"] = uriBasedDirective_uriContent;
+    }
+    if (kind == idl.LinkedNodeKind.partOfDirective) {
+      if (annotatedNode_comment != null)
+        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
+      if (annotatedNode_metadata.isNotEmpty)
+        _result["annotatedNode_metadata"] =
+            annotatedNode_metadata.map((_value) => _value.toJson()).toList();
+      if (partOfDirective_libraryName != null)
+        _result["partOfDirective_libraryName"] =
+            partOfDirective_libraryName.toJson();
+      if (partOfDirective_uri != null)
+        _result["partOfDirective_uri"] = partOfDirective_uri.toJson();
+      if (partOfDirective_ofKeyword != 0)
+        _result["partOfDirective_ofKeyword"] = partOfDirective_ofKeyword;
+      if (directive_keyword != 0)
+        _result["directive_keyword"] = directive_keyword;
+      if (directive_semicolon != 0)
+        _result["directive_semicolon"] = directive_semicolon;
+    }
+    if (kind == idl.LinkedNodeKind.topLevelVariableDeclaration) {
+      if (annotatedNode_comment != null)
+        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
+      if (annotatedNode_metadata.isNotEmpty)
+        _result["annotatedNode_metadata"] =
+            annotatedNode_metadata.map((_value) => _value.toJson()).toList();
+      if (topLevelVariableDeclaration_variableList != null)
+        _result["topLevelVariableDeclaration_variableList"] =
+            topLevelVariableDeclaration_variableList.toJson();
+      if (topLevelVariableDeclaration_semicolon != 0)
+        _result["topLevelVariableDeclaration_semicolon"] =
+            topLevelVariableDeclaration_semicolon;
+    }
+    if (kind == idl.LinkedNodeKind.typeParameter) {
+      if (annotatedNode_comment != null)
+        _result["annotatedNode_comment"] = annotatedNode_comment.toJson();
+      if (annotatedNode_metadata.isNotEmpty)
+        _result["annotatedNode_metadata"] =
+            annotatedNode_metadata.map((_value) => _value.toJson()).toList();
+      if (typeParameter_bound != null)
+        _result["typeParameter_bound"] = typeParameter_bound.toJson();
+      if (typeParameter_extendsKeyword != 0)
+        _result["typeParameter_extendsKeyword"] = typeParameter_extendsKeyword;
+      if (typeParameter_name != null)
+        _result["typeParameter_name"] = typeParameter_name.toJson();
+      if (typeParameter_id != 0) _result["typeParameter_id"] = typeParameter_id;
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
+    }
+    if (kind == idl.LinkedNodeKind.switchCase) {
+      if (switchMember_statements.isNotEmpty)
+        _result["switchMember_statements"] =
+            switchMember_statements.map((_value) => _value.toJson()).toList();
+      if (switchCase_expression != null)
+        _result["switchCase_expression"] = switchCase_expression.toJson();
+      if (switchMember_keyword != 0)
+        _result["switchMember_keyword"] = switchMember_keyword;
+      if (switchMember_colon != 0)
+        _result["switchMember_colon"] = switchMember_colon;
+      if (switchMember_labels.isNotEmpty)
+        _result["switchMember_labels"] =
+            switchMember_labels.map((_value) => _value.toJson()).toList();
+    }
+    if (kind == idl.LinkedNodeKind.switchDefault) {
+      if (switchMember_statements.isNotEmpty)
+        _result["switchMember_statements"] =
+            switchMember_statements.map((_value) => _value.toJson()).toList();
+      if (switchMember_keyword != 0)
+        _result["switchMember_keyword"] = switchMember_keyword;
+      if (switchMember_colon != 0)
+        _result["switchMember_colon"] = switchMember_colon;
+      if (switchMember_labels.isNotEmpty)
+        _result["switchMember_labels"] =
+            switchMember_labels.map((_value) => _value.toJson()).toList();
+    }
+    if (kind == idl.LinkedNodeKind.annotation) {
+      if (annotation_arguments != null)
+        _result["annotation_arguments"] = annotation_arguments.toJson();
+      if (annotation_atSign != 0)
+        _result["annotation_atSign"] = annotation_atSign;
+      if (annotation_constructorName != null)
+        _result["annotation_constructorName"] =
+            annotation_constructorName.toJson();
+      if (annotation_name != null)
+        _result["annotation_name"] = annotation_name.toJson();
+      if (annotation_period != 0)
+        _result["annotation_period"] = annotation_period;
+    }
+    if (kind == idl.LinkedNodeKind.asExpression) {
+      if (asExpression_expression != null)
+        _result["asExpression_expression"] = asExpression_expression.toJson();
+      if (asExpression_asOperator != 0)
+        _result["asExpression_asOperator"] = asExpression_asOperator;
+      if (asExpression_type != null)
+        _result["asExpression_type"] = asExpression_type.toJson();
+      if (expression_type != null)
+        _result["expression_type"] = expression_type.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.assertInitializer) {
+      if (assertInitializer_condition != null)
+        _result["assertInitializer_condition"] =
+            assertInitializer_condition.toJson();
+      if (assertInitializer_assertKeyword != 0)
+        _result["assertInitializer_assertKeyword"] =
+            assertInitializer_assertKeyword;
+      if (assertInitializer_message != null)
+        _result["assertInitializer_message"] =
+            assertInitializer_message.toJson();
+      if (assertInitializer_comma != 0)
+        _result["assertInitializer_comma"] = assertInitializer_comma;
+      if (assertInitializer_leftParenthesis != 0)
+        _result["assertInitializer_leftParenthesis"] =
+            assertInitializer_leftParenthesis;
+      if (assertInitializer_rightParenthesis != 0)
+        _result["assertInitializer_rightParenthesis"] =
+            assertInitializer_rightParenthesis;
+    }
+    if (kind == idl.LinkedNodeKind.assertStatement) {
+      if (assertStatement_condition != null)
+        _result["assertStatement_condition"] =
+            assertStatement_condition.toJson();
+      if (assertStatement_assertKeyword != 0)
+        _result["assertStatement_assertKeyword"] =
+            assertStatement_assertKeyword;
+      if (assertStatement_message != null)
+        _result["assertStatement_message"] = assertStatement_message.toJson();
+      if (assertStatement_comma != 0)
+        _result["assertStatement_comma"] = assertStatement_comma;
+      if (assertStatement_leftParenthesis != 0)
+        _result["assertStatement_leftParenthesis"] =
+            assertStatement_leftParenthesis;
+      if (assertStatement_rightParenthesis != 0)
+        _result["assertStatement_rightParenthesis"] =
+            assertStatement_rightParenthesis;
+      if (assertStatement_semicolon != 0)
+        _result["assertStatement_semicolon"] = assertStatement_semicolon;
+    }
+    if (kind == idl.LinkedNodeKind.assignmentExpression) {
+      if (assignmentExpression_leftHandSide != null)
+        _result["assignmentExpression_leftHandSide"] =
+            assignmentExpression_leftHandSide.toJson();
+      if (assignmentExpression_element != 0)
+        _result["assignmentExpression_element"] = assignmentExpression_element;
+      if (assignmentExpression_rightHandSide != null)
+        _result["assignmentExpression_rightHandSide"] =
+            assignmentExpression_rightHandSide.toJson();
+      if (assignmentExpression_operator != 0)
+        _result["assignmentExpression_operator"] =
+            assignmentExpression_operator;
+      if (assignmentExpression_elementType != null)
+        _result["assignmentExpression_elementType"] =
+            assignmentExpression_elementType.toJson();
+      if (expression_type != null)
+        _result["expression_type"] = expression_type.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.awaitExpression) {
+      if (awaitExpression_expression != null)
+        _result["awaitExpression_expression"] =
+            awaitExpression_expression.toJson();
+      if (awaitExpression_awaitKeyword != 0)
+        _result["awaitExpression_awaitKeyword"] = awaitExpression_awaitKeyword;
+      if (expression_type != null)
+        _result["expression_type"] = expression_type.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.blockFunctionBody) {
+      if (blockFunctionBody_block != null)
+        _result["blockFunctionBody_block"] = blockFunctionBody_block.toJson();
+      if (blockFunctionBody_keyword != 0)
+        _result["blockFunctionBody_keyword"] = blockFunctionBody_keyword;
+      if (blockFunctionBody_star != 0)
+        _result["blockFunctionBody_star"] = blockFunctionBody_star;
+    }
+    if (kind == idl.LinkedNodeKind.breakStatement) {
+      if (breakStatement_label != null)
+        _result["breakStatement_label"] = breakStatement_label.toJson();
+      if (breakStatement_breakKeyword != 0)
+        _result["breakStatement_breakKeyword"] = breakStatement_breakKeyword;
+      if (breakStatement_semicolon != 0)
+        _result["breakStatement_semicolon"] = breakStatement_semicolon;
+    }
+    if (kind == idl.LinkedNodeKind.catchClause) {
+      if (catchClause_body != null)
+        _result["catchClause_body"] = catchClause_body.toJson();
+      if (catchClause_catchKeyword != 0)
+        _result["catchClause_catchKeyword"] = catchClause_catchKeyword;
+      if (catchClause_exceptionParameter != null)
+        _result["catchClause_exceptionParameter"] =
+            catchClause_exceptionParameter.toJson();
+      if (catchClause_exceptionType != null)
+        _result["catchClause_exceptionType"] =
+            catchClause_exceptionType.toJson();
+      if (catchClause_comma != 0)
+        _result["catchClause_comma"] = catchClause_comma;
+      if (catchClause_leftParenthesis != 0)
+        _result["catchClause_leftParenthesis"] = catchClause_leftParenthesis;
+      if (catchClause_onKeyword != 0)
+        _result["catchClause_onKeyword"] = catchClause_onKeyword;
+      if (catchClause_rightParenthesis != 0)
+        _result["catchClause_rightParenthesis"] = catchClause_rightParenthesis;
+      if (catchClause_stackTraceParameter != null)
+        _result["catchClause_stackTraceParameter"] =
+            catchClause_stackTraceParameter.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.conditionalExpression) {
+      if (conditionalExpression_condition != null)
+        _result["conditionalExpression_condition"] =
+            conditionalExpression_condition.toJson();
+      if (conditionalExpression_colon != 0)
+        _result["conditionalExpression_colon"] = conditionalExpression_colon;
+      if (conditionalExpression_elseExpression != null)
+        _result["conditionalExpression_elseExpression"] =
+            conditionalExpression_elseExpression.toJson();
+      if (conditionalExpression_thenExpression != null)
+        _result["conditionalExpression_thenExpression"] =
+            conditionalExpression_thenExpression.toJson();
+      if (conditionalExpression_question != 0)
+        _result["conditionalExpression_question"] =
+            conditionalExpression_question;
+      if (expression_type != null)
+        _result["expression_type"] = expression_type.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.configuration) {
+      if (configuration_name != null)
+        _result["configuration_name"] = configuration_name.toJson();
+      if (configuration_ifKeyword != 0)
+        _result["configuration_ifKeyword"] = configuration_ifKeyword;
+      if (configuration_value != null)
+        _result["configuration_value"] = configuration_value.toJson();
+      if (configuration_uri != null)
+        _result["configuration_uri"] = configuration_uri.toJson();
+      if (configuration_leftParenthesis != 0)
+        _result["configuration_leftParenthesis"] =
+            configuration_leftParenthesis;
+      if (configuration_rightParenthesis != 0)
+        _result["configuration_rightParenthesis"] =
+            configuration_rightParenthesis;
+      if (configuration_equalToken != 0)
+        _result["configuration_equalToken"] = configuration_equalToken;
+    }
+    if (kind == idl.LinkedNodeKind.constructorFieldInitializer) {
+      if (constructorFieldInitializer_expression != null)
+        _result["constructorFieldInitializer_expression"] =
+            constructorFieldInitializer_expression.toJson();
+      if (constructorFieldInitializer_equals != 0)
+        _result["constructorFieldInitializer_equals"] =
+            constructorFieldInitializer_equals;
+      if (constructorFieldInitializer_fieldName != null)
+        _result["constructorFieldInitializer_fieldName"] =
+            constructorFieldInitializer_fieldName.toJson();
+      if (constructorFieldInitializer_period != 0)
+        _result["constructorFieldInitializer_period"] =
+            constructorFieldInitializer_period;
+      if (constructorFieldInitializer_thisKeyword != 0)
+        _result["constructorFieldInitializer_thisKeyword"] =
+            constructorFieldInitializer_thisKeyword;
+    }
+    if (kind == idl.LinkedNodeKind.constructorName) {
+      if (constructorName_name != null)
+        _result["constructorName_name"] = constructorName_name.toJson();
+      if (constructorName_element != 0)
+        _result["constructorName_element"] = constructorName_element;
+      if (constructorName_type != null)
+        _result["constructorName_type"] = constructorName_type.toJson();
+      if (constructorName_period != 0)
+        _result["constructorName_period"] = constructorName_period;
+      if (constructorName_elementType != null)
+        _result["constructorName_elementType"] =
+            constructorName_elementType.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.continueStatement) {
+      if (continueStatement_label != null)
+        _result["continueStatement_label"] = continueStatement_label.toJson();
+      if (continueStatement_continueKeyword != 0)
+        _result["continueStatement_continueKeyword"] =
+            continueStatement_continueKeyword;
+      if (continueStatement_semicolon != 0)
+        _result["continueStatement_semicolon"] = continueStatement_semicolon;
+    }
+    if (kind == idl.LinkedNodeKind.defaultFormalParameter) {
+      if (defaultFormalParameter_defaultValue != null)
+        _result["defaultFormalParameter_defaultValue"] =
+            defaultFormalParameter_defaultValue.toJson();
+      if (defaultFormalParameter_separator != 0)
+        _result["defaultFormalParameter_separator"] =
+            defaultFormalParameter_separator;
+      if (defaultFormalParameter_parameter != null)
+        _result["defaultFormalParameter_parameter"] =
+            defaultFormalParameter_parameter.toJson();
+      if (defaultFormalParameter_isNamed != false)
+        _result["defaultFormalParameter_isNamed"] =
+            defaultFormalParameter_isNamed;
+      if (codeLength != 0) _result["codeLength"] = codeLength;
+      if (codeOffset != 0) _result["codeOffset"] = codeOffset;
+    }
+    if (kind == idl.LinkedNodeKind.doStatement) {
+      if (doStatement_body != null)
+        _result["doStatement_body"] = doStatement_body.toJson();
+      if (doStatement_leftParenthesis != 0)
+        _result["doStatement_leftParenthesis"] = doStatement_leftParenthesis;
+      if (doStatement_condition != null)
+        _result["doStatement_condition"] = doStatement_condition.toJson();
+      if (doStatement_rightParenthesis != 0)
+        _result["doStatement_rightParenthesis"] = doStatement_rightParenthesis;
+      if (doStatement_doKeyword != 0)
+        _result["doStatement_doKeyword"] = doStatement_doKeyword;
+      if (doStatement_semicolon != 0)
+        _result["doStatement_semicolon"] = doStatement_semicolon;
+      if (doStatement_whileKeyword != 0)
+        _result["doStatement_whileKeyword"] = doStatement_whileKeyword;
+    }
+    if (kind == idl.LinkedNodeKind.expressionFunctionBody) {
+      if (expressionFunctionBody_expression != null)
+        _result["expressionFunctionBody_expression"] =
+            expressionFunctionBody_expression.toJson();
+      if (expressionFunctionBody_arrow != 0)
+        _result["expressionFunctionBody_arrow"] = expressionFunctionBody_arrow;
+      if (expressionFunctionBody_keyword != 0)
+        _result["expressionFunctionBody_keyword"] =
+            expressionFunctionBody_keyword;
+      if (expressionFunctionBody_semicolon != 0)
+        _result["expressionFunctionBody_semicolon"] =
+            expressionFunctionBody_semicolon;
+    }
+    if (kind == idl.LinkedNodeKind.expressionStatement) {
+      if (expressionStatement_expression != null)
+        _result["expressionStatement_expression"] =
+            expressionStatement_expression.toJson();
+      if (expressionStatement_semicolon != 0)
+        _result["expressionStatement_semicolon"] =
+            expressionStatement_semicolon;
+    }
+    if (kind == idl.LinkedNodeKind.extendsClause) {
+      if (extendsClause_superclass != null)
+        _result["extendsClause_superclass"] = extendsClause_superclass.toJson();
+      if (extendsClause_extendsKeyword != 0)
+        _result["extendsClause_extendsKeyword"] = extendsClause_extendsKeyword;
+    }
+    if (kind == idl.LinkedNodeKind.forEachPartsWithDeclaration) {
+      if (forEachParts_iterable != null)
+        _result["forEachParts_iterable"] = forEachParts_iterable.toJson();
+      if (forEachParts_inKeyword != 0)
+        _result["forEachParts_inKeyword"] = forEachParts_inKeyword;
+      if (forEachPartsWithDeclaration_loopVariable != null)
+        _result["forEachPartsWithDeclaration_loopVariable"] =
+            forEachPartsWithDeclaration_loopVariable.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.forEachPartsWithIdentifier) {
+      if (forEachParts_iterable != null)
+        _result["forEachParts_iterable"] = forEachParts_iterable.toJson();
+      if (forEachParts_inKeyword != 0)
+        _result["forEachParts_inKeyword"] = forEachParts_inKeyword;
+      if (forEachPartsWithIdentifier_identifier != null)
+        _result["forEachPartsWithIdentifier_identifier"] =
+            forEachPartsWithIdentifier_identifier.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.forElement) {
+      if (forMixin_forLoopParts != null)
+        _result["forMixin_forLoopParts"] = forMixin_forLoopParts.toJson();
+      if (forMixin_awaitKeyword != 0)
+        _result["forMixin_awaitKeyword"] = forMixin_awaitKeyword;
+      if (forElement_body != null)
+        _result["forElement_body"] = forElement_body.toJson();
+      if (forMixin_forKeyword != 0)
+        _result["forMixin_forKeyword"] = forMixin_forKeyword;
+      if (forMixin_leftParenthesis != 0)
+        _result["forMixin_leftParenthesis"] = forMixin_leftParenthesis;
+      if (forMixin_rightParenthesis != 0)
+        _result["forMixin_rightParenthesis"] = forMixin_rightParenthesis;
+    }
+    if (kind == idl.LinkedNodeKind.forStatement) {
+      if (forMixin_forLoopParts != null)
+        _result["forMixin_forLoopParts"] = forMixin_forLoopParts.toJson();
+      if (forMixin_awaitKeyword != 0)
+        _result["forMixin_awaitKeyword"] = forMixin_awaitKeyword;
+      if (forStatement_body != null)
+        _result["forStatement_body"] = forStatement_body.toJson();
+      if (forMixin_forKeyword != 0)
+        _result["forMixin_forKeyword"] = forMixin_forKeyword;
+      if (forMixin_leftParenthesis != 0)
+        _result["forMixin_leftParenthesis"] = forMixin_leftParenthesis;
+      if (forMixin_rightParenthesis != 0)
+        _result["forMixin_rightParenthesis"] = forMixin_rightParenthesis;
+    }
+    if (kind == idl.LinkedNodeKind.forPartsWithDeclarations) {
+      if (forParts_condition != null)
+        _result["forParts_condition"] = forParts_condition.toJson();
+      if (forParts_leftSeparator != 0)
+        _result["forParts_leftSeparator"] = forParts_leftSeparator;
+      if (forPartsWithDeclarations_variables != null)
+        _result["forPartsWithDeclarations_variables"] =
+            forPartsWithDeclarations_variables.toJson();
+      if (forParts_rightSeparator != 0)
+        _result["forParts_rightSeparator"] = forParts_rightSeparator;
+      if (forParts_updaters.isNotEmpty)
+        _result["forParts_updaters"] =
+            forParts_updaters.map((_value) => _value.toJson()).toList();
+    }
+    if (kind == idl.LinkedNodeKind.forPartsWithExpression) {
+      if (forParts_condition != null)
+        _result["forParts_condition"] = forParts_condition.toJson();
+      if (forParts_leftSeparator != 0)
+        _result["forParts_leftSeparator"] = forParts_leftSeparator;
+      if (forPartsWithExpression_initialization != null)
+        _result["forPartsWithExpression_initialization"] =
+            forPartsWithExpression_initialization.toJson();
+      if (forParts_rightSeparator != 0)
+        _result["forParts_rightSeparator"] = forParts_rightSeparator;
+      if (forParts_updaters.isNotEmpty)
+        _result["forParts_updaters"] =
+            forParts_updaters.map((_value) => _value.toJson()).toList();
+    }
+    if (kind == idl.LinkedNodeKind.functionDeclarationStatement) {
+      if (functionDeclarationStatement_functionDeclaration != null)
+        _result["functionDeclarationStatement_functionDeclaration"] =
+            functionDeclarationStatement_functionDeclaration.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.ifElement) {
+      if (ifMixin_condition != null)
+        _result["ifMixin_condition"] = ifMixin_condition.toJson();
+      if (ifMixin_elseKeyword != 0)
+        _result["ifMixin_elseKeyword"] = ifMixin_elseKeyword;
+      if (ifElement_thenElement != null)
+        _result["ifElement_thenElement"] = ifElement_thenElement.toJson();
+      if (ifMixin_ifKeyword != 0)
+        _result["ifMixin_ifKeyword"] = ifMixin_ifKeyword;
+      if (ifMixin_leftParenthesis != 0)
+        _result["ifMixin_leftParenthesis"] = ifMixin_leftParenthesis;
+      if (ifMixin_rightParenthesis != 0)
+        _result["ifMixin_rightParenthesis"] = ifMixin_rightParenthesis;
+      if (ifElement_elseElement != null)
+        _result["ifElement_elseElement"] = ifElement_elseElement.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.ifStatement) {
+      if (ifMixin_condition != null)
+        _result["ifMixin_condition"] = ifMixin_condition.toJson();
+      if (ifMixin_elseKeyword != 0)
+        _result["ifMixin_elseKeyword"] = ifMixin_elseKeyword;
+      if (ifStatement_elseStatement != null)
+        _result["ifStatement_elseStatement"] =
+            ifStatement_elseStatement.toJson();
+      if (ifStatement_thenStatement != null)
+        _result["ifStatement_thenStatement"] =
+            ifStatement_thenStatement.toJson();
+      if (ifMixin_ifKeyword != 0)
+        _result["ifMixin_ifKeyword"] = ifMixin_ifKeyword;
+      if (ifMixin_leftParenthesis != 0)
+        _result["ifMixin_leftParenthesis"] = ifMixin_leftParenthesis;
+      if (ifMixin_rightParenthesis != 0)
+        _result["ifMixin_rightParenthesis"] = ifMixin_rightParenthesis;
+    }
+    if (kind == idl.LinkedNodeKind.indexExpression) {
+      if (indexExpression_index != null)
+        _result["indexExpression_index"] = indexExpression_index.toJson();
+      if (indexExpression_element != 0)
+        _result["indexExpression_element"] = indexExpression_element;
+      if (indexExpression_target != null)
+        _result["indexExpression_target"] = indexExpression_target.toJson();
+      if (indexExpression_period != 0)
+        _result["indexExpression_period"] = indexExpression_period;
+      if (indexExpression_leftBracket != 0)
+        _result["indexExpression_leftBracket"] = indexExpression_leftBracket;
+      if (indexExpression_rightBracket != 0)
+        _result["indexExpression_rightBracket"] = indexExpression_rightBracket;
+      if (indexExpression_elementType != null)
+        _result["indexExpression_elementType"] =
+            indexExpression_elementType.toJson();
+      if (expression_type != null)
+        _result["expression_type"] = expression_type.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.instanceCreationExpression) {
+      if (instanceCreationExpression_arguments != null)
+        _result["instanceCreationExpression_arguments"] =
+            instanceCreationExpression_arguments.toJson();
+      if (instanceCreationExpression_keyword != 0)
+        _result["instanceCreationExpression_keyword"] =
+            instanceCreationExpression_keyword;
+      if (instanceCreationExpression_constructorName != null)
+        _result["instanceCreationExpression_constructorName"] =
+            instanceCreationExpression_constructorName.toJson();
+      if (instanceCreationExpression_typeArguments != null)
+        _result["instanceCreationExpression_typeArguments"] =
+            instanceCreationExpression_typeArguments.toJson();
+      if (expression_type != null)
+        _result["expression_type"] = expression_type.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.interpolationExpression) {
+      if (interpolationExpression_expression != null)
+        _result["interpolationExpression_expression"] =
+            interpolationExpression_expression.toJson();
+      if (interpolationExpression_leftBracket != 0)
+        _result["interpolationExpression_leftBracket"] =
+            interpolationExpression_leftBracket;
+      if (interpolationExpression_rightBracket != 0)
+        _result["interpolationExpression_rightBracket"] =
+            interpolationExpression_rightBracket;
+    }
+    if (kind == idl.LinkedNodeKind.isExpression) {
+      if (isExpression_expression != null)
+        _result["isExpression_expression"] = isExpression_expression.toJson();
+      if (isExpression_isOperator != 0)
+        _result["isExpression_isOperator"] = isExpression_isOperator;
+      if (isExpression_type != null)
+        _result["isExpression_type"] = isExpression_type.toJson();
+      if (isExpression_notOperator != 0)
+        _result["isExpression_notOperator"] = isExpression_notOperator;
+      if (expression_type != null)
+        _result["expression_type"] = expression_type.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.label) {
+      if (label_label != null) _result["label_label"] = label_label.toJson();
+      if (label_colon != 0) _result["label_colon"] = label_colon;
+    }
+    if (kind == idl.LinkedNodeKind.mapLiteralEntry) {
+      if (mapLiteralEntry_key != null)
+        _result["mapLiteralEntry_key"] = mapLiteralEntry_key.toJson();
+      if (mapLiteralEntry_separator != 0)
+        _result["mapLiteralEntry_separator"] = mapLiteralEntry_separator;
+      if (mapLiteralEntry_value != null)
+        _result["mapLiteralEntry_value"] = mapLiteralEntry_value.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.namedExpression) {
+      if (namedExpression_expression != null)
+        _result["namedExpression_expression"] =
+            namedExpression_expression.toJson();
+      if (namedExpression_name != null)
+        _result["namedExpression_name"] = namedExpression_name.toJson();
+      if (expression_type != null)
+        _result["expression_type"] = expression_type.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.nativeClause) {
+      if (nativeClause_name != null)
+        _result["nativeClause_name"] = nativeClause_name.toJson();
+      if (nativeClause_nativeKeyword != 0)
+        _result["nativeClause_nativeKeyword"] = nativeClause_nativeKeyword;
+    }
+    if (kind == idl.LinkedNodeKind.nativeFunctionBody) {
+      if (nativeFunctionBody_stringLiteral != null)
+        _result["nativeFunctionBody_stringLiteral"] =
+            nativeFunctionBody_stringLiteral.toJson();
+      if (nativeFunctionBody_nativeKeyword != 0)
+        _result["nativeFunctionBody_nativeKeyword"] =
+            nativeFunctionBody_nativeKeyword;
+      if (nativeFunctionBody_semicolon != 0)
+        _result["nativeFunctionBody_semicolon"] = nativeFunctionBody_semicolon;
+    }
+    if (kind == idl.LinkedNodeKind.parenthesizedExpression) {
+      if (parenthesizedExpression_expression != null)
+        _result["parenthesizedExpression_expression"] =
+            parenthesizedExpression_expression.toJson();
+      if (parenthesizedExpression_leftParenthesis != 0)
+        _result["parenthesizedExpression_leftParenthesis"] =
+            parenthesizedExpression_leftParenthesis;
+      if (parenthesizedExpression_rightParenthesis != 0)
+        _result["parenthesizedExpression_rightParenthesis"] =
+            parenthesizedExpression_rightParenthesis;
+      if (expression_type != null)
+        _result["expression_type"] = expression_type.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.postfixExpression) {
+      if (postfixExpression_operand != null)
+        _result["postfixExpression_operand"] =
+            postfixExpression_operand.toJson();
+      if (postfixExpression_element != 0)
+        _result["postfixExpression_element"] = postfixExpression_element;
+      if (postfixExpression_operator != 0)
+        _result["postfixExpression_operator"] = postfixExpression_operator;
+      if (postfixExpression_elementType != null)
+        _result["postfixExpression_elementType"] =
+            postfixExpression_elementType.toJson();
+      if (expression_type != null)
+        _result["expression_type"] = expression_type.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.prefixedIdentifier) {
+      if (prefixedIdentifier_identifier != null)
+        _result["prefixedIdentifier_identifier"] =
+            prefixedIdentifier_identifier.toJson();
+      if (prefixedIdentifier_period != 0)
+        _result["prefixedIdentifier_period"] = prefixedIdentifier_period;
+      if (prefixedIdentifier_prefix != null)
+        _result["prefixedIdentifier_prefix"] =
+            prefixedIdentifier_prefix.toJson();
+      if (expression_type != null)
+        _result["expression_type"] = expression_type.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.prefixExpression) {
+      if (prefixExpression_operand != null)
+        _result["prefixExpression_operand"] = prefixExpression_operand.toJson();
+      if (prefixExpression_element != 0)
+        _result["prefixExpression_element"] = prefixExpression_element;
+      if (prefixExpression_operator != 0)
+        _result["prefixExpression_operator"] = prefixExpression_operator;
+      if (prefixExpression_elementType != null)
+        _result["prefixExpression_elementType"] =
+            prefixExpression_elementType.toJson();
+      if (expression_type != null)
+        _result["expression_type"] = expression_type.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.propertyAccess) {
+      if (propertyAccess_propertyName != null)
+        _result["propertyAccess_propertyName"] =
+            propertyAccess_propertyName.toJson();
+      if (propertyAccess_operator != 0)
+        _result["propertyAccess_operator"] = propertyAccess_operator;
+      if (propertyAccess_target != null)
+        _result["propertyAccess_target"] = propertyAccess_target.toJson();
+      if (expression_type != null)
+        _result["expression_type"] = expression_type.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.redirectingConstructorInvocation) {
+      if (redirectingConstructorInvocation_arguments != null)
+        _result["redirectingConstructorInvocation_arguments"] =
+            redirectingConstructorInvocation_arguments.toJson();
+      if (redirectingConstructorInvocation_element != 0)
+        _result["redirectingConstructorInvocation_element"] =
+            redirectingConstructorInvocation_element;
+      if (redirectingConstructorInvocation_constructorName != null)
+        _result["redirectingConstructorInvocation_constructorName"] =
+            redirectingConstructorInvocation_constructorName.toJson();
+      if (redirectingConstructorInvocation_period != 0)
+        _result["redirectingConstructorInvocation_period"] =
+            redirectingConstructorInvocation_period;
+      if (redirectingConstructorInvocation_thisKeyword != 0)
+        _result["redirectingConstructorInvocation_thisKeyword"] =
+            redirectingConstructorInvocation_thisKeyword;
+      if (redirectingConstructorInvocation_elementType != null)
+        _result["redirectingConstructorInvocation_elementType"] =
+            redirectingConstructorInvocation_elementType.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.returnStatement) {
+      if (returnStatement_expression != null)
+        _result["returnStatement_expression"] =
+            returnStatement_expression.toJson();
+      if (returnStatement_returnKeyword != 0)
+        _result["returnStatement_returnKeyword"] =
+            returnStatement_returnKeyword;
+      if (returnStatement_semicolon != 0)
+        _result["returnStatement_semicolon"] = returnStatement_semicolon;
+    }
+    if (kind == idl.LinkedNodeKind.spreadElement) {
+      if (spreadElement_expression != null)
+        _result["spreadElement_expression"] = spreadElement_expression.toJson();
+      if (spreadElement_spreadOperator != 0)
+        _result["spreadElement_spreadOperator"] = spreadElement_spreadOperator;
+    }
+    if (kind == idl.LinkedNodeKind.superConstructorInvocation) {
+      if (superConstructorInvocation_arguments != null)
+        _result["superConstructorInvocation_arguments"] =
+            superConstructorInvocation_arguments.toJson();
+      if (superConstructorInvocation_element != 0)
+        _result["superConstructorInvocation_element"] =
+            superConstructorInvocation_element;
+      if (superConstructorInvocation_constructorName != null)
+        _result["superConstructorInvocation_constructorName"] =
+            superConstructorInvocation_constructorName.toJson();
+      if (superConstructorInvocation_period != 0)
+        _result["superConstructorInvocation_period"] =
+            superConstructorInvocation_period;
+      if (superConstructorInvocation_superKeyword != 0)
+        _result["superConstructorInvocation_superKeyword"] =
+            superConstructorInvocation_superKeyword;
+      if (superConstructorInvocation_elementType != null)
+        _result["superConstructorInvocation_elementType"] =
+            superConstructorInvocation_elementType.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.throwExpression) {
+      if (throwExpression_expression != null)
+        _result["throwExpression_expression"] =
+            throwExpression_expression.toJson();
+      if (throwExpression_throwKeyword != 0)
+        _result["throwExpression_throwKeyword"] = throwExpression_throwKeyword;
+      if (expression_type != null)
+        _result["expression_type"] = expression_type.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.typeName) {
+      if (typeName_name != null)
+        _result["typeName_name"] = typeName_name.toJson();
+      if (typeName_question != 0)
+        _result["typeName_question"] = typeName_question;
+      if (typeName_typeArguments != null)
+        _result["typeName_typeArguments"] = typeName_typeArguments.toJson();
+      if (typeName_type != null)
+        _result["typeName_type"] = typeName_type.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.variableDeclarationStatement) {
+      if (variableDeclarationStatement_variables != null)
+        _result["variableDeclarationStatement_variables"] =
+            variableDeclarationStatement_variables.toJson();
+      if (variableDeclarationStatement_semicolon != 0)
+        _result["variableDeclarationStatement_semicolon"] =
+            variableDeclarationStatement_semicolon;
+    }
+    if (kind == idl.LinkedNodeKind.whileStatement) {
+      if (whileStatement_body != null)
+        _result["whileStatement_body"] = whileStatement_body.toJson();
+      if (whileStatement_leftParenthesis != 0)
+        _result["whileStatement_leftParenthesis"] =
+            whileStatement_leftParenthesis;
+      if (whileStatement_condition != null)
+        _result["whileStatement_condition"] = whileStatement_condition.toJson();
+      if (whileStatement_rightParenthesis != 0)
+        _result["whileStatement_rightParenthesis"] =
+            whileStatement_rightParenthesis;
+      if (whileStatement_whileKeyword != 0)
+        _result["whileStatement_whileKeyword"] = whileStatement_whileKeyword;
+    }
+    if (kind == idl.LinkedNodeKind.yieldStatement) {
+      if (yieldStatement_expression != null)
+        _result["yieldStatement_expression"] =
+            yieldStatement_expression.toJson();
+      if (yieldStatement_yieldKeyword != 0)
+        _result["yieldStatement_yieldKeyword"] = yieldStatement_yieldKeyword;
+      if (yieldStatement_star != 0)
+        _result["yieldStatement_star"] = yieldStatement_star;
+      if (yieldStatement_semicolon != 0)
+        _result["yieldStatement_semicolon"] = yieldStatement_semicolon;
+    }
+    if (kind == idl.LinkedNodeKind.booleanLiteral) {
+      if (booleanLiteral_literal != 0)
+        _result["booleanLiteral_literal"] = booleanLiteral_literal;
+      if (booleanLiteral_value != false)
+        _result["booleanLiteral_value"] = booleanLiteral_value;
+      if (expression_type != null)
+        _result["expression_type"] = expression_type.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.doubleLiteral) {
+      if (doubleLiteral_literal != 0)
+        _result["doubleLiteral_literal"] = doubleLiteral_literal;
+      if (doubleLiteral_value != 0.0)
+        _result["doubleLiteral_value"] = doubleLiteral_value.isFinite
+            ? doubleLiteral_value
+            : doubleLiteral_value.toString();
+      if (expression_type != null)
+        _result["expression_type"] = expression_type.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.emptyFunctionBody) {
+      if (emptyFunctionBody_semicolon != 0)
+        _result["emptyFunctionBody_semicolon"] = emptyFunctionBody_semicolon;
+    }
+    if (kind == idl.LinkedNodeKind.emptyStatement) {
+      if (emptyStatement_semicolon != 0)
+        _result["emptyStatement_semicolon"] = emptyStatement_semicolon;
+    }
+    if (kind == idl.LinkedNodeKind.integerLiteral) {
+      if (integerLiteral_literal != 0)
+        _result["integerLiteral_literal"] = integerLiteral_literal;
+      if (integerLiteral_value != 0)
+        _result["integerLiteral_value"] = integerLiteral_value;
+      if (expression_type != null)
+        _result["expression_type"] = expression_type.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.interpolationString) {
+      if (interpolationString_token != 0)
+        _result["interpolationString_token"] = interpolationString_token;
+      if (interpolationString_value != '')
+        _result["interpolationString_value"] = interpolationString_value;
+    }
+    if (kind == idl.LinkedNodeKind.nullLiteral) {
+      if (nullLiteral_literal != 0)
+        _result["nullLiteral_literal"] = nullLiteral_literal;
+      if (expression_type != null)
+        _result["expression_type"] = expression_type.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.rethrowExpression) {
+      if (rethrowExpression_rethrowKeyword != 0)
+        _result["rethrowExpression_rethrowKeyword"] =
+            rethrowExpression_rethrowKeyword;
+      if (expression_type != null)
+        _result["expression_type"] = expression_type.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.scriptTag) {
+      if (scriptTag_scriptTag != 0)
+        _result["scriptTag_scriptTag"] = scriptTag_scriptTag;
+    }
+    if (kind == idl.LinkedNodeKind.simpleIdentifier) {
+      if (simpleIdentifier_element != 0)
+        _result["simpleIdentifier_element"] = simpleIdentifier_element;
+      if (simpleIdentifier_token != 0)
+        _result["simpleIdentifier_token"] = simpleIdentifier_token;
+      if (simpleIdentifier_elementType != null)
+        _result["simpleIdentifier_elementType"] =
+            simpleIdentifier_elementType.toJson();
+      if (expression_type != null)
+        _result["expression_type"] = expression_type.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.simpleStringLiteral) {
+      if (simpleStringLiteral_token != 0)
+        _result["simpleStringLiteral_token"] = simpleStringLiteral_token;
+      if (expression_type != null)
+        _result["expression_type"] = expression_type.toJson();
+      if (simpleStringLiteral_value != '')
+        _result["simpleStringLiteral_value"] = simpleStringLiteral_value;
+    }
+    if (kind == idl.LinkedNodeKind.superExpression) {
+      if (superExpression_superKeyword != 0)
+        _result["superExpression_superKeyword"] = superExpression_superKeyword;
+      if (expression_type != null)
+        _result["expression_type"] = expression_type.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.symbolLiteral) {
+      if (symbolLiteral_poundSign != 0)
+        _result["symbolLiteral_poundSign"] = symbolLiteral_poundSign;
+      if (symbolLiteral_components.isNotEmpty)
+        _result["symbolLiteral_components"] = symbolLiteral_components;
+      if (expression_type != null)
+        _result["expression_type"] = expression_type.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.thisExpression) {
+      if (thisExpression_thisKeyword != 0)
+        _result["thisExpression_thisKeyword"] = thisExpression_thisKeyword;
+      if (expression_type != null)
+        _result["expression_type"] = expression_type.toJson();
+    }
+    if (kind == idl.LinkedNodeKind.comment) {
+      if (comment_tokens.isNotEmpty) _result["comment_tokens"] = comment_tokens;
+      if (comment_type != idl.LinkedNodeCommentType.block)
+        _result["comment_type"] = comment_type.toString().split('.')[1];
+    }
+    return _result;
+  }
+
+  @override
+  Map<String, Object> toMap() {
+    if (kind == idl.LinkedNodeKind.functionDeclaration) {
+      return {
+        "actualReturnType": actualReturnType,
+        "annotatedNode_comment": annotatedNode_comment,
+        "annotatedNode_metadata": annotatedNode_metadata,
+        "functionDeclaration_functionExpression":
+            functionDeclaration_functionExpression,
+        "functionDeclaration_externalKeyword":
+            functionDeclaration_externalKeyword,
+        "functionDeclaration_returnType": functionDeclaration_returnType,
+        "functionDeclaration_propertyKeyword":
+            functionDeclaration_propertyKeyword,
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
+        "namedCompilationUnitMember_name": namedCompilationUnitMember_name,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.functionExpression) {
+      return {
+        "actualReturnType": actualReturnType,
+        "functionExpression_body": functionExpression_body,
+        "functionExpression_formalParameters":
+            functionExpression_formalParameters,
+        "functionExpression_typeParameters": functionExpression_typeParameters,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.functionTypeAlias) {
+      return {
+        "actualReturnType": actualReturnType,
+        "annotatedNode_comment": annotatedNode_comment,
+        "annotatedNode_metadata": annotatedNode_metadata,
+        "functionTypeAlias_formalParameters":
+            functionTypeAlias_formalParameters,
+        "functionTypeAlias_returnType": functionTypeAlias_returnType,
+        "functionTypeAlias_typeParameters": functionTypeAlias_typeParameters,
+        "typeAlias_typedefKeyword": typeAlias_typedefKeyword,
+        "typeAlias_semicolon": typeAlias_semicolon,
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
+        "namedCompilationUnitMember_name": namedCompilationUnitMember_name,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+        "simplyBoundable_isSimplyBounded": simplyBoundable_isSimplyBounded,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.genericFunctionType) {
+      return {
+        "actualReturnType": actualReturnType,
+        "genericFunctionType_typeParameters":
+            genericFunctionType_typeParameters,
+        "genericFunctionType_functionKeyword":
+            genericFunctionType_functionKeyword,
+        "genericFunctionType_returnType": genericFunctionType_returnType,
+        "genericFunctionType_formalParameters":
+            genericFunctionType_formalParameters,
+        "genericFunctionType_question": genericFunctionType_question,
+        "genericFunctionType_type": genericFunctionType_type,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.methodDeclaration) {
+      return {
+        "actualReturnType": actualReturnType,
+        "annotatedNode_comment": annotatedNode_comment,
+        "annotatedNode_metadata": annotatedNode_metadata,
+        "methodDeclaration_body": methodDeclaration_body,
+        "methodDeclaration_externalKeyword": methodDeclaration_externalKeyword,
+        "methodDeclaration_formalParameters":
+            methodDeclaration_formalParameters,
+        "methodDeclaration_returnType": methodDeclaration_returnType,
+        "methodDeclaration_modifierKeyword": methodDeclaration_modifierKeyword,
+        "methodDeclaration_operatorKeyword": methodDeclaration_operatorKeyword,
+        "methodDeclaration_propertyKeyword": methodDeclaration_propertyKeyword,
+        "methodDeclaration_actualProperty": methodDeclaration_actualProperty,
+        "methodDeclaration_typeParameters": methodDeclaration_typeParameters,
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
+        "methodDeclaration_name": methodDeclaration_name,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.fieldFormalParameter) {
+      return {
+        "actualType": actualType,
+        "normalFormalParameter_metadata": normalFormalParameter_metadata,
+        "fieldFormalParameter_type": fieldFormalParameter_type,
+        "fieldFormalParameter_keyword": fieldFormalParameter_keyword,
+        "fieldFormalParameter_typeParameters":
+            fieldFormalParameter_typeParameters,
+        "fieldFormalParameter_formalParameters":
+            fieldFormalParameter_formalParameters,
+        "fieldFormalParameter_period": fieldFormalParameter_period,
+        "fieldFormalParameter_thisKeyword": fieldFormalParameter_thisKeyword,
+        "normalFormalParameter_covariantKeyword":
+            normalFormalParameter_covariantKeyword,
+        "normalFormalParameter_isCovariant": normalFormalParameter_isCovariant,
+        "normalFormalParameter_identifier": normalFormalParameter_identifier,
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
+        "formalParameter_kind": formalParameter_kind,
+        "normalFormalParameter_comment": normalFormalParameter_comment,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.functionTypedFormalParameter) {
+      return {
+        "actualType": actualType,
+        "normalFormalParameter_metadata": normalFormalParameter_metadata,
+        "functionTypedFormalParameter_formalParameters":
+            functionTypedFormalParameter_formalParameters,
+        "functionTypedFormalParameter_returnType":
+            functionTypedFormalParameter_returnType,
+        "functionTypedFormalParameter_typeParameters":
+            functionTypedFormalParameter_typeParameters,
+        "normalFormalParameter_covariantKeyword":
+            normalFormalParameter_covariantKeyword,
+        "normalFormalParameter_isCovariant": normalFormalParameter_isCovariant,
+        "normalFormalParameter_identifier": normalFormalParameter_identifier,
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
+        "formalParameter_kind": formalParameter_kind,
+        "normalFormalParameter_comment": normalFormalParameter_comment,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.simpleFormalParameter) {
+      return {
+        "actualType": actualType,
+        "normalFormalParameter_metadata": normalFormalParameter_metadata,
+        "simpleFormalParameter_type": simpleFormalParameter_type,
+        "simpleFormalParameter_keyword": simpleFormalParameter_keyword,
+        "normalFormalParameter_covariantKeyword":
+            normalFormalParameter_covariantKeyword,
+        "normalFormalParameter_isCovariant": normalFormalParameter_isCovariant,
+        "normalFormalParameter_identifier": normalFormalParameter_identifier,
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
+        "formalParameter_kind": formalParameter_kind,
+        "normalFormalParameter_comment": normalFormalParameter_comment,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.variableDeclaration) {
+      return {
+        "actualType": actualType,
+        "annotatedNode_comment": annotatedNode_comment,
+        "annotatedNode_metadata": annotatedNode_metadata,
+        "variableDeclaration_initializer": variableDeclaration_initializer,
+        "variableDeclaration_equals": variableDeclaration_equals,
+        "variableDeclaration_name": variableDeclaration_name,
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+        "variableDeclaration_declaration": variableDeclaration_declaration,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.binaryExpression) {
+      return {
+        "binaryExpression_invokeType": binaryExpression_invokeType,
+        "binaryExpression_leftOperand": binaryExpression_leftOperand,
+        "binaryExpression_element": binaryExpression_element,
+        "binaryExpression_rightOperand": binaryExpression_rightOperand,
+        "binaryExpression_operator": binaryExpression_operator,
+        "binaryExpression_elementType": binaryExpression_elementType,
+        "expression_type": expression_type,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.functionExpressionInvocation) {
+      return {
+        "invocationExpression_invokeType": invocationExpression_invokeType,
+        "functionExpressionInvocation_function":
+            functionExpressionInvocation_function,
+        "invocationExpression_typeArguments":
+            invocationExpression_typeArguments,
+        "expression_type": expression_type,
+        "invocationExpression_arguments": invocationExpression_arguments,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.methodInvocation) {
+      return {
+        "invocationExpression_invokeType": invocationExpression_invokeType,
+        "methodInvocation_methodName": methodInvocation_methodName,
+        "methodInvocation_operator": methodInvocation_operator,
+        "methodInvocation_target": methodInvocation_target,
+        "invocationExpression_typeArguments":
+            invocationExpression_typeArguments,
+        "expression_type": expression_type,
+        "invocationExpression_arguments": invocationExpression_arguments,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.adjacentStrings) {
+      return {
+        "adjacentStrings_strings": adjacentStrings_strings,
+        "expression_type": expression_type,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.argumentList) {
+      return {
+        "argumentList_arguments": argumentList_arguments,
+        "argumentList_leftParenthesis": argumentList_leftParenthesis,
+        "argumentList_rightParenthesis": argumentList_rightParenthesis,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.block) {
+      return {
+        "block_statements": block_statements,
+        "block_leftBracket": block_leftBracket,
+        "block_rightBracket": block_rightBracket,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.cascadeExpression) {
+      return {
+        "cascadeExpression_sections": cascadeExpression_sections,
+        "cascadeExpression_target": cascadeExpression_target,
+        "expression_type": expression_type,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.compilationUnit) {
+      return {
+        "compilationUnit_declarations": compilationUnit_declarations,
+        "compilationUnit_scriptTag": compilationUnit_scriptTag,
+        "compilationUnit_beginToken": compilationUnit_beginToken,
+        "compilationUnit_endToken": compilationUnit_endToken,
+        "compilationUnit_directives": compilationUnit_directives,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.constructorDeclaration) {
+      return {
+        "constructorDeclaration_initializers":
+            constructorDeclaration_initializers,
+        "annotatedNode_comment": annotatedNode_comment,
+        "annotatedNode_metadata": annotatedNode_metadata,
+        "constructorDeclaration_body": constructorDeclaration_body,
+        "constructorDeclaration_constKeyword":
+            constructorDeclaration_constKeyword,
+        "constructorDeclaration_name": constructorDeclaration_name,
+        "constructorDeclaration_parameters": constructorDeclaration_parameters,
+        "constructorDeclaration_externalKeyword":
+            constructorDeclaration_externalKeyword,
+        "constructorDeclaration_factoryKeyword":
+            constructorDeclaration_factoryKeyword,
+        "constructorDeclaration_period": constructorDeclaration_period,
+        "constructorDeclaration_separator": constructorDeclaration_separator,
+        "constructorDeclaration_redirectedConstructor":
+            constructorDeclaration_redirectedConstructor,
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
+        "constructorDeclaration_returnType": constructorDeclaration_returnType,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.dottedName) {
+      return {
+        "dottedName_components": dottedName_components,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.enumDeclaration) {
+      return {
+        "enumDeclaration_constants": enumDeclaration_constants,
+        "annotatedNode_comment": annotatedNode_comment,
+        "annotatedNode_metadata": annotatedNode_metadata,
+        "enumDeclaration_enumKeyword": enumDeclaration_enumKeyword,
+        "enumDeclaration_leftBracket": enumDeclaration_leftBracket,
+        "enumDeclaration_rightBracket": enumDeclaration_rightBracket,
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
+        "namedCompilationUnitMember_name": namedCompilationUnitMember_name,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.formalParameterList) {
+      return {
+        "formalParameterList_parameters": formalParameterList_parameters,
+        "formalParameterList_leftDelimiter": formalParameterList_leftDelimiter,
+        "formalParameterList_leftParenthesis":
+            formalParameterList_leftParenthesis,
+        "formalParameterList_rightDelimiter":
+            formalParameterList_rightDelimiter,
+        "formalParameterList_rightParenthesis":
+            formalParameterList_rightParenthesis,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.hideCombinator) {
+      return {
+        "hideCombinator_hiddenNames": hideCombinator_hiddenNames,
+        "combinator_keyword": combinator_keyword,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.implementsClause) {
+      return {
+        "implementsClause_interfaces": implementsClause_interfaces,
+        "implementsClause_implementsKeyword":
+            implementsClause_implementsKeyword,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.labeledStatement) {
+      return {
+        "labeledStatement_labels": labeledStatement_labels,
+        "labeledStatement_statement": labeledStatement_statement,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.libraryIdentifier) {
+      return {
+        "libraryIdentifier_components": libraryIdentifier_components,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.listLiteral) {
+      return {
+        "listLiteral_elements": listLiteral_elements,
+        "listLiteral_leftBracket": listLiteral_leftBracket,
+        "listLiteral_rightBracket": listLiteral_rightBracket,
+        "typedLiteral_constKeyword": typedLiteral_constKeyword,
+        "expression_type": expression_type,
+        "typedLiteral_typeArguments": typedLiteral_typeArguments,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.exportDirective) {
+      return {
+        "namespaceDirective_combinators": namespaceDirective_combinators,
+        "annotatedNode_comment": annotatedNode_comment,
+        "annotatedNode_metadata": annotatedNode_metadata,
+        "directive_keyword": directive_keyword,
+        "uriBasedDirective_uriElement": uriBasedDirective_uriElement,
+        "directive_semicolon": directive_semicolon,
+        "namespaceDirective_configurations": namespaceDirective_configurations,
+        "uriBasedDirective_uri": uriBasedDirective_uri,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+        "namespaceDirective_selectedUri": namespaceDirective_selectedUri,
+        "uriBasedDirective_uriContent": uriBasedDirective_uriContent,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.importDirective) {
+      return {
+        "namespaceDirective_combinators": namespaceDirective_combinators,
+        "annotatedNode_comment": annotatedNode_comment,
+        "annotatedNode_metadata": annotatedNode_metadata,
+        "importDirective_prefix": importDirective_prefix,
+        "importDirective_asKeyword": importDirective_asKeyword,
+        "importDirective_deferredKeyword": importDirective_deferredKeyword,
+        "directive_keyword": directive_keyword,
+        "uriBasedDirective_uriElement": uriBasedDirective_uriElement,
+        "directive_semicolon": directive_semicolon,
+        "namespaceDirective_configurations": namespaceDirective_configurations,
+        "uriBasedDirective_uri": uriBasedDirective_uri,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+        "namespaceDirective_selectedUri": namespaceDirective_selectedUri,
+        "uriBasedDirective_uriContent": uriBasedDirective_uriContent,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.onClause) {
+      return {
+        "onClause_superclassConstraints": onClause_superclassConstraints,
+        "onClause_onKeyword": onClause_onKeyword,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.setOrMapLiteral) {
+      return {
+        "setOrMapLiteral_elements": setOrMapLiteral_elements,
+        "setOrMapLiteral_leftBracket": setOrMapLiteral_leftBracket,
+        "setOrMapLiteral_rightBracket": setOrMapLiteral_rightBracket,
+        "typedLiteral_constKeyword": typedLiteral_constKeyword,
+        "setOrMapLiteral_isMap": setOrMapLiteral_isMap,
+        "expression_type": expression_type,
+        "typedLiteral_typeArguments": typedLiteral_typeArguments,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+        "setOrMapLiteral_isSet": setOrMapLiteral_isSet,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.showCombinator) {
+      return {
+        "showCombinator_shownNames": showCombinator_shownNames,
+        "combinator_keyword": combinator_keyword,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.stringInterpolation) {
+      return {
+        "stringInterpolation_elements": stringInterpolation_elements,
+        "expression_type": expression_type,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.switchStatement) {
+      return {
+        "switchStatement_members": switchStatement_members,
+        "switchStatement_leftParenthesis": switchStatement_leftParenthesis,
+        "switchStatement_expression": switchStatement_expression,
+        "switchStatement_rightParenthesis": switchStatement_rightParenthesis,
+        "switchStatement_switchKeyword": switchStatement_switchKeyword,
+        "switchStatement_leftBracket": switchStatement_leftBracket,
+        "switchStatement_rightBracket": switchStatement_rightBracket,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.tryStatement) {
+      return {
+        "tryStatement_catchClauses": tryStatement_catchClauses,
+        "tryStatement_body": tryStatement_body,
+        "tryStatement_finallyKeyword": tryStatement_finallyKeyword,
+        "tryStatement_finallyBlock": tryStatement_finallyBlock,
+        "tryStatement_tryKeyword": tryStatement_tryKeyword,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.typeArgumentList) {
+      return {
+        "typeArgumentList_arguments": typeArgumentList_arguments,
+        "typeArgumentList_leftBracket": typeArgumentList_leftBracket,
+        "typeArgumentList_rightBracket": typeArgumentList_rightBracket,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.typeParameterList) {
+      return {
+        "typeParameterList_typeParameters": typeParameterList_typeParameters,
+        "typeParameterList_leftBracket": typeParameterList_leftBracket,
+        "typeParameterList_rightBracket": typeParameterList_rightBracket,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.variableDeclarationList) {
+      return {
+        "variableDeclarationList_variables": variableDeclarationList_variables,
+        "annotatedNode_comment": annotatedNode_comment,
+        "annotatedNode_metadata": annotatedNode_metadata,
+        "variableDeclarationList_type": variableDeclarationList_type,
+        "variableDeclarationList_keyword": variableDeclarationList_keyword,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.withClause) {
+      return {
+        "withClause_mixinTypes": withClause_mixinTypes,
+        "withClause_withKeyword": withClause_withKeyword,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.classDeclaration) {
+      return {
+        "annotatedNode_comment": annotatedNode_comment,
+        "annotatedNode_metadata": annotatedNode_metadata,
+        "classDeclaration_extendsClause": classDeclaration_extendsClause,
+        "classDeclaration_abstractKeyword": classDeclaration_abstractKeyword,
+        "classDeclaration_withClause": classDeclaration_withClause,
+        "classDeclaration_nativeClause": classDeclaration_nativeClause,
+        "classDeclaration_classKeyword": classDeclaration_classKeyword,
+        "classOrMixinDeclaration_rightBracket":
+            classOrMixinDeclaration_rightBracket,
+        "classOrMixinDeclaration_leftBracket":
+            classOrMixinDeclaration_leftBracket,
+        "classDeclaration_isDartObject": classDeclaration_isDartObject,
+        "classOrMixinDeclaration_implementsClause":
+            classOrMixinDeclaration_implementsClause,
+        "classOrMixinDeclaration_members": classOrMixinDeclaration_members,
+        "classOrMixinDeclaration_typeParameters":
+            classOrMixinDeclaration_typeParameters,
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
+        "namedCompilationUnitMember_name": namedCompilationUnitMember_name,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+        "simplyBoundable_isSimplyBounded": simplyBoundable_isSimplyBounded,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.classTypeAlias) {
+      return {
+        "annotatedNode_comment": annotatedNode_comment,
+        "annotatedNode_metadata": annotatedNode_metadata,
+        "classTypeAlias_typeParameters": classTypeAlias_typeParameters,
+        "classTypeAlias_abstractKeyword": classTypeAlias_abstractKeyword,
+        "classTypeAlias_superclass": classTypeAlias_superclass,
+        "classTypeAlias_withClause": classTypeAlias_withClause,
+        "classTypeAlias_equals": classTypeAlias_equals,
+        "typeAlias_typedefKeyword": typeAlias_typedefKeyword,
+        "typeAlias_semicolon": typeAlias_semicolon,
+        "classTypeAlias_implementsClause": classTypeAlias_implementsClause,
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
+        "namedCompilationUnitMember_name": namedCompilationUnitMember_name,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+        "simplyBoundable_isSimplyBounded": simplyBoundable_isSimplyBounded,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.declaredIdentifier) {
+      return {
+        "annotatedNode_comment": annotatedNode_comment,
+        "annotatedNode_metadata": annotatedNode_metadata,
+        "declaredIdentifier_identifier": declaredIdentifier_identifier,
+        "declaredIdentifier_keyword": declaredIdentifier_keyword,
+        "declaredIdentifier_type": declaredIdentifier_type,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.enumConstantDeclaration) {
+      return {
+        "annotatedNode_comment": annotatedNode_comment,
+        "annotatedNode_metadata": annotatedNode_metadata,
+        "enumConstantDeclaration_name": enumConstantDeclaration_name,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.fieldDeclaration) {
+      return {
+        "annotatedNode_comment": annotatedNode_comment,
+        "annotatedNode_metadata": annotatedNode_metadata,
+        "fieldDeclaration_fields": fieldDeclaration_fields,
+        "fieldDeclaration_covariantKeyword": fieldDeclaration_covariantKeyword,
+        "fieldDeclaration_semicolon": fieldDeclaration_semicolon,
+        "fieldDeclaration_staticKeyword": fieldDeclaration_staticKeyword,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.genericTypeAlias) {
+      return {
+        "annotatedNode_comment": annotatedNode_comment,
+        "annotatedNode_metadata": annotatedNode_metadata,
+        "genericTypeAlias_typeParameters": genericTypeAlias_typeParameters,
+        "genericTypeAlias_functionType": genericTypeAlias_functionType,
+        "genericTypeAlias_equals": genericTypeAlias_equals,
+        "typeAlias_typedefKeyword": typeAlias_typedefKeyword,
+        "typeAlias_semicolon": typeAlias_semicolon,
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
+        "namedCompilationUnitMember_name": namedCompilationUnitMember_name,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+        "simplyBoundable_isSimplyBounded": simplyBoundable_isSimplyBounded,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.libraryDirective) {
+      return {
+        "annotatedNode_comment": annotatedNode_comment,
+        "annotatedNode_metadata": annotatedNode_metadata,
+        "libraryDirective_name": libraryDirective_name,
+        "directive_keyword": directive_keyword,
+        "directive_semicolon": directive_semicolon,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.mixinDeclaration) {
+      return {
+        "annotatedNode_comment": annotatedNode_comment,
+        "annotatedNode_metadata": annotatedNode_metadata,
+        "mixinDeclaration_onClause": mixinDeclaration_onClause,
+        "mixinDeclaration_mixinKeyword": mixinDeclaration_mixinKeyword,
+        "classOrMixinDeclaration_rightBracket":
+            classOrMixinDeclaration_rightBracket,
+        "classOrMixinDeclaration_leftBracket":
+            classOrMixinDeclaration_leftBracket,
+        "classOrMixinDeclaration_implementsClause":
+            classOrMixinDeclaration_implementsClause,
+        "classOrMixinDeclaration_members": classOrMixinDeclaration_members,
+        "classOrMixinDeclaration_typeParameters":
+            classOrMixinDeclaration_typeParameters,
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
+        "namedCompilationUnitMember_name": namedCompilationUnitMember_name,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+        "simplyBoundable_isSimplyBounded": simplyBoundable_isSimplyBounded,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.partDirective) {
+      return {
+        "annotatedNode_comment": annotatedNode_comment,
+        "annotatedNode_metadata": annotatedNode_metadata,
+        "directive_keyword": directive_keyword,
+        "uriBasedDirective_uriElement": uriBasedDirective_uriElement,
+        "directive_semicolon": directive_semicolon,
+        "uriBasedDirective_uri": uriBasedDirective_uri,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+        "uriBasedDirective_uriContent": uriBasedDirective_uriContent,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.partOfDirective) {
+      return {
+        "annotatedNode_comment": annotatedNode_comment,
+        "annotatedNode_metadata": annotatedNode_metadata,
+        "partOfDirective_libraryName": partOfDirective_libraryName,
+        "partOfDirective_uri": partOfDirective_uri,
+        "partOfDirective_ofKeyword": partOfDirective_ofKeyword,
+        "directive_keyword": directive_keyword,
+        "directive_semicolon": directive_semicolon,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.topLevelVariableDeclaration) {
+      return {
+        "annotatedNode_comment": annotatedNode_comment,
+        "annotatedNode_metadata": annotatedNode_metadata,
+        "topLevelVariableDeclaration_variableList":
+            topLevelVariableDeclaration_variableList,
+        "topLevelVariableDeclaration_semicolon":
+            topLevelVariableDeclaration_semicolon,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.typeParameter) {
+      return {
+        "annotatedNode_comment": annotatedNode_comment,
+        "annotatedNode_metadata": annotatedNode_metadata,
+        "typeParameter_bound": typeParameter_bound,
+        "typeParameter_extendsKeyword": typeParameter_extendsKeyword,
+        "typeParameter_name": typeParameter_name,
+        "typeParameter_id": typeParameter_id,
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.switchCase) {
+      return {
+        "switchMember_statements": switchMember_statements,
+        "switchCase_expression": switchCase_expression,
+        "switchMember_keyword": switchMember_keyword,
+        "switchMember_colon": switchMember_colon,
+        "switchMember_labels": switchMember_labels,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.switchDefault) {
+      return {
+        "switchMember_statements": switchMember_statements,
+        "switchMember_keyword": switchMember_keyword,
+        "switchMember_colon": switchMember_colon,
+        "switchMember_labels": switchMember_labels,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.annotation) {
+      return {
+        "annotation_arguments": annotation_arguments,
+        "annotation_atSign": annotation_atSign,
+        "annotation_constructorName": annotation_constructorName,
+        "annotation_name": annotation_name,
+        "annotation_period": annotation_period,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.asExpression) {
+      return {
+        "asExpression_expression": asExpression_expression,
+        "asExpression_asOperator": asExpression_asOperator,
+        "asExpression_type": asExpression_type,
+        "expression_type": expression_type,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.assertInitializer) {
+      return {
+        "assertInitializer_condition": assertInitializer_condition,
+        "assertInitializer_assertKeyword": assertInitializer_assertKeyword,
+        "assertInitializer_message": assertInitializer_message,
+        "assertInitializer_comma": assertInitializer_comma,
+        "assertInitializer_leftParenthesis": assertInitializer_leftParenthesis,
+        "assertInitializer_rightParenthesis":
+            assertInitializer_rightParenthesis,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.assertStatement) {
+      return {
+        "assertStatement_condition": assertStatement_condition,
+        "assertStatement_assertKeyword": assertStatement_assertKeyword,
+        "assertStatement_message": assertStatement_message,
+        "assertStatement_comma": assertStatement_comma,
+        "assertStatement_leftParenthesis": assertStatement_leftParenthesis,
+        "assertStatement_rightParenthesis": assertStatement_rightParenthesis,
+        "assertStatement_semicolon": assertStatement_semicolon,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.assignmentExpression) {
+      return {
+        "assignmentExpression_leftHandSide": assignmentExpression_leftHandSide,
+        "assignmentExpression_element": assignmentExpression_element,
+        "assignmentExpression_rightHandSide":
+            assignmentExpression_rightHandSide,
+        "assignmentExpression_operator": assignmentExpression_operator,
+        "assignmentExpression_elementType": assignmentExpression_elementType,
+        "expression_type": expression_type,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.awaitExpression) {
+      return {
+        "awaitExpression_expression": awaitExpression_expression,
+        "awaitExpression_awaitKeyword": awaitExpression_awaitKeyword,
+        "expression_type": expression_type,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.blockFunctionBody) {
+      return {
+        "blockFunctionBody_block": blockFunctionBody_block,
+        "blockFunctionBody_keyword": blockFunctionBody_keyword,
+        "blockFunctionBody_star": blockFunctionBody_star,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.breakStatement) {
+      return {
+        "breakStatement_label": breakStatement_label,
+        "breakStatement_breakKeyword": breakStatement_breakKeyword,
+        "breakStatement_semicolon": breakStatement_semicolon,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.catchClause) {
+      return {
+        "catchClause_body": catchClause_body,
+        "catchClause_catchKeyword": catchClause_catchKeyword,
+        "catchClause_exceptionParameter": catchClause_exceptionParameter,
+        "catchClause_exceptionType": catchClause_exceptionType,
+        "catchClause_comma": catchClause_comma,
+        "catchClause_leftParenthesis": catchClause_leftParenthesis,
+        "catchClause_onKeyword": catchClause_onKeyword,
+        "catchClause_rightParenthesis": catchClause_rightParenthesis,
+        "catchClause_stackTraceParameter": catchClause_stackTraceParameter,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.conditionalExpression) {
+      return {
+        "conditionalExpression_condition": conditionalExpression_condition,
+        "conditionalExpression_colon": conditionalExpression_colon,
+        "conditionalExpression_elseExpression":
+            conditionalExpression_elseExpression,
+        "conditionalExpression_thenExpression":
+            conditionalExpression_thenExpression,
+        "conditionalExpression_question": conditionalExpression_question,
+        "expression_type": expression_type,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.configuration) {
+      return {
+        "configuration_name": configuration_name,
+        "configuration_ifKeyword": configuration_ifKeyword,
+        "configuration_value": configuration_value,
+        "configuration_uri": configuration_uri,
+        "configuration_leftParenthesis": configuration_leftParenthesis,
+        "configuration_rightParenthesis": configuration_rightParenthesis,
+        "configuration_equalToken": configuration_equalToken,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.constructorFieldInitializer) {
+      return {
+        "constructorFieldInitializer_expression":
+            constructorFieldInitializer_expression,
+        "constructorFieldInitializer_equals":
+            constructorFieldInitializer_equals,
+        "constructorFieldInitializer_fieldName":
+            constructorFieldInitializer_fieldName,
+        "constructorFieldInitializer_period":
+            constructorFieldInitializer_period,
+        "constructorFieldInitializer_thisKeyword":
+            constructorFieldInitializer_thisKeyword,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.constructorName) {
+      return {
+        "constructorName_name": constructorName_name,
+        "constructorName_element": constructorName_element,
+        "constructorName_type": constructorName_type,
+        "constructorName_period": constructorName_period,
+        "constructorName_elementType": constructorName_elementType,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.continueStatement) {
+      return {
+        "continueStatement_label": continueStatement_label,
+        "continueStatement_continueKeyword": continueStatement_continueKeyword,
+        "continueStatement_semicolon": continueStatement_semicolon,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.defaultFormalParameter) {
+      return {
+        "defaultFormalParameter_defaultValue":
+            defaultFormalParameter_defaultValue,
+        "defaultFormalParameter_separator": defaultFormalParameter_separator,
+        "defaultFormalParameter_parameter": defaultFormalParameter_parameter,
+        "defaultFormalParameter_isNamed": defaultFormalParameter_isNamed,
+        "codeLength": codeLength,
+        "codeOffset": codeOffset,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.doStatement) {
+      return {
+        "doStatement_body": doStatement_body,
+        "doStatement_leftParenthesis": doStatement_leftParenthesis,
+        "doStatement_condition": doStatement_condition,
+        "doStatement_rightParenthesis": doStatement_rightParenthesis,
+        "doStatement_doKeyword": doStatement_doKeyword,
+        "doStatement_semicolon": doStatement_semicolon,
+        "doStatement_whileKeyword": doStatement_whileKeyword,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.expressionFunctionBody) {
+      return {
+        "expressionFunctionBody_expression": expressionFunctionBody_expression,
+        "expressionFunctionBody_arrow": expressionFunctionBody_arrow,
+        "expressionFunctionBody_keyword": expressionFunctionBody_keyword,
+        "expressionFunctionBody_semicolon": expressionFunctionBody_semicolon,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.expressionStatement) {
+      return {
+        "expressionStatement_expression": expressionStatement_expression,
+        "expressionStatement_semicolon": expressionStatement_semicolon,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.extendsClause) {
+      return {
+        "extendsClause_superclass": extendsClause_superclass,
+        "extendsClause_extendsKeyword": extendsClause_extendsKeyword,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.forEachPartsWithDeclaration) {
+      return {
+        "forEachParts_iterable": forEachParts_iterable,
+        "forEachParts_inKeyword": forEachParts_inKeyword,
+        "forEachPartsWithDeclaration_loopVariable":
+            forEachPartsWithDeclaration_loopVariable,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.forEachPartsWithIdentifier) {
+      return {
+        "forEachParts_iterable": forEachParts_iterable,
+        "forEachParts_inKeyword": forEachParts_inKeyword,
+        "forEachPartsWithIdentifier_identifier":
+            forEachPartsWithIdentifier_identifier,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.forElement) {
+      return {
+        "forMixin_forLoopParts": forMixin_forLoopParts,
+        "forMixin_awaitKeyword": forMixin_awaitKeyword,
+        "forElement_body": forElement_body,
+        "forMixin_forKeyword": forMixin_forKeyword,
+        "forMixin_leftParenthesis": forMixin_leftParenthesis,
+        "forMixin_rightParenthesis": forMixin_rightParenthesis,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.forStatement) {
+      return {
+        "forMixin_forLoopParts": forMixin_forLoopParts,
+        "forMixin_awaitKeyword": forMixin_awaitKeyword,
+        "forStatement_body": forStatement_body,
+        "forMixin_forKeyword": forMixin_forKeyword,
+        "forMixin_leftParenthesis": forMixin_leftParenthesis,
+        "forMixin_rightParenthesis": forMixin_rightParenthesis,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.forPartsWithDeclarations) {
+      return {
+        "forParts_condition": forParts_condition,
+        "forParts_leftSeparator": forParts_leftSeparator,
+        "forPartsWithDeclarations_variables":
+            forPartsWithDeclarations_variables,
+        "forParts_rightSeparator": forParts_rightSeparator,
+        "forParts_updaters": forParts_updaters,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.forPartsWithExpression) {
+      return {
+        "forParts_condition": forParts_condition,
+        "forParts_leftSeparator": forParts_leftSeparator,
+        "forPartsWithExpression_initialization":
+            forPartsWithExpression_initialization,
+        "forParts_rightSeparator": forParts_rightSeparator,
+        "forParts_updaters": forParts_updaters,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.functionDeclarationStatement) {
+      return {
+        "functionDeclarationStatement_functionDeclaration":
+            functionDeclarationStatement_functionDeclaration,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.ifElement) {
+      return {
+        "ifMixin_condition": ifMixin_condition,
+        "ifMixin_elseKeyword": ifMixin_elseKeyword,
+        "ifElement_thenElement": ifElement_thenElement,
+        "ifMixin_ifKeyword": ifMixin_ifKeyword,
+        "ifMixin_leftParenthesis": ifMixin_leftParenthesis,
+        "ifMixin_rightParenthesis": ifMixin_rightParenthesis,
+        "ifElement_elseElement": ifElement_elseElement,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.ifStatement) {
+      return {
+        "ifMixin_condition": ifMixin_condition,
+        "ifMixin_elseKeyword": ifMixin_elseKeyword,
+        "ifStatement_elseStatement": ifStatement_elseStatement,
+        "ifStatement_thenStatement": ifStatement_thenStatement,
+        "ifMixin_ifKeyword": ifMixin_ifKeyword,
+        "ifMixin_leftParenthesis": ifMixin_leftParenthesis,
+        "ifMixin_rightParenthesis": ifMixin_rightParenthesis,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.indexExpression) {
+      return {
+        "indexExpression_index": indexExpression_index,
+        "indexExpression_element": indexExpression_element,
+        "indexExpression_target": indexExpression_target,
+        "indexExpression_period": indexExpression_period,
+        "indexExpression_leftBracket": indexExpression_leftBracket,
+        "indexExpression_rightBracket": indexExpression_rightBracket,
+        "indexExpression_elementType": indexExpression_elementType,
+        "expression_type": expression_type,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.instanceCreationExpression) {
+      return {
+        "instanceCreationExpression_arguments":
+            instanceCreationExpression_arguments,
+        "instanceCreationExpression_keyword":
+            instanceCreationExpression_keyword,
+        "instanceCreationExpression_constructorName":
+            instanceCreationExpression_constructorName,
+        "instanceCreationExpression_typeArguments":
+            instanceCreationExpression_typeArguments,
+        "expression_type": expression_type,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.interpolationExpression) {
+      return {
+        "interpolationExpression_expression":
+            interpolationExpression_expression,
+        "interpolationExpression_leftBracket":
+            interpolationExpression_leftBracket,
+        "interpolationExpression_rightBracket":
+            interpolationExpression_rightBracket,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.isExpression) {
+      return {
+        "isExpression_expression": isExpression_expression,
+        "isExpression_isOperator": isExpression_isOperator,
+        "isExpression_type": isExpression_type,
+        "isExpression_notOperator": isExpression_notOperator,
+        "expression_type": expression_type,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.label) {
+      return {
+        "label_label": label_label,
+        "label_colon": label_colon,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.mapLiteralEntry) {
+      return {
+        "mapLiteralEntry_key": mapLiteralEntry_key,
+        "mapLiteralEntry_separator": mapLiteralEntry_separator,
+        "mapLiteralEntry_value": mapLiteralEntry_value,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.namedExpression) {
+      return {
+        "namedExpression_expression": namedExpression_expression,
+        "namedExpression_name": namedExpression_name,
+        "expression_type": expression_type,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.nativeClause) {
+      return {
+        "nativeClause_name": nativeClause_name,
+        "nativeClause_nativeKeyword": nativeClause_nativeKeyword,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.nativeFunctionBody) {
+      return {
+        "nativeFunctionBody_stringLiteral": nativeFunctionBody_stringLiteral,
+        "nativeFunctionBody_nativeKeyword": nativeFunctionBody_nativeKeyword,
+        "nativeFunctionBody_semicolon": nativeFunctionBody_semicolon,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.parenthesizedExpression) {
+      return {
+        "parenthesizedExpression_expression":
+            parenthesizedExpression_expression,
+        "parenthesizedExpression_leftParenthesis":
+            parenthesizedExpression_leftParenthesis,
+        "parenthesizedExpression_rightParenthesis":
+            parenthesizedExpression_rightParenthesis,
+        "expression_type": expression_type,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.postfixExpression) {
+      return {
+        "postfixExpression_operand": postfixExpression_operand,
+        "postfixExpression_element": postfixExpression_element,
+        "postfixExpression_operator": postfixExpression_operator,
+        "postfixExpression_elementType": postfixExpression_elementType,
+        "expression_type": expression_type,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.prefixedIdentifier) {
+      return {
+        "prefixedIdentifier_identifier": prefixedIdentifier_identifier,
+        "prefixedIdentifier_period": prefixedIdentifier_period,
+        "prefixedIdentifier_prefix": prefixedIdentifier_prefix,
+        "expression_type": expression_type,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.prefixExpression) {
+      return {
+        "prefixExpression_operand": prefixExpression_operand,
+        "prefixExpression_element": prefixExpression_element,
+        "prefixExpression_operator": prefixExpression_operator,
+        "prefixExpression_elementType": prefixExpression_elementType,
+        "expression_type": expression_type,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.propertyAccess) {
+      return {
+        "propertyAccess_propertyName": propertyAccess_propertyName,
+        "propertyAccess_operator": propertyAccess_operator,
+        "propertyAccess_target": propertyAccess_target,
+        "expression_type": expression_type,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.redirectingConstructorInvocation) {
+      return {
+        "redirectingConstructorInvocation_arguments":
+            redirectingConstructorInvocation_arguments,
+        "redirectingConstructorInvocation_element":
+            redirectingConstructorInvocation_element,
+        "redirectingConstructorInvocation_constructorName":
+            redirectingConstructorInvocation_constructorName,
+        "redirectingConstructorInvocation_period":
+            redirectingConstructorInvocation_period,
+        "redirectingConstructorInvocation_thisKeyword":
+            redirectingConstructorInvocation_thisKeyword,
+        "redirectingConstructorInvocation_elementType":
+            redirectingConstructorInvocation_elementType,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.returnStatement) {
+      return {
+        "returnStatement_expression": returnStatement_expression,
+        "returnStatement_returnKeyword": returnStatement_returnKeyword,
+        "returnStatement_semicolon": returnStatement_semicolon,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.spreadElement) {
+      return {
+        "spreadElement_expression": spreadElement_expression,
+        "spreadElement_spreadOperator": spreadElement_spreadOperator,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.superConstructorInvocation) {
+      return {
+        "superConstructorInvocation_arguments":
+            superConstructorInvocation_arguments,
+        "superConstructorInvocation_element":
+            superConstructorInvocation_element,
+        "superConstructorInvocation_constructorName":
+            superConstructorInvocation_constructorName,
+        "superConstructorInvocation_period": superConstructorInvocation_period,
+        "superConstructorInvocation_superKeyword":
+            superConstructorInvocation_superKeyword,
+        "superConstructorInvocation_elementType":
+            superConstructorInvocation_elementType,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.throwExpression) {
+      return {
+        "throwExpression_expression": throwExpression_expression,
+        "throwExpression_throwKeyword": throwExpression_throwKeyword,
+        "expression_type": expression_type,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.typeName) {
+      return {
+        "typeName_name": typeName_name,
+        "typeName_question": typeName_question,
+        "typeName_typeArguments": typeName_typeArguments,
+        "typeName_type": typeName_type,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.variableDeclarationStatement) {
+      return {
+        "variableDeclarationStatement_variables":
+            variableDeclarationStatement_variables,
+        "variableDeclarationStatement_semicolon":
+            variableDeclarationStatement_semicolon,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.whileStatement) {
+      return {
+        "whileStatement_body": whileStatement_body,
+        "whileStatement_leftParenthesis": whileStatement_leftParenthesis,
+        "whileStatement_condition": whileStatement_condition,
+        "whileStatement_rightParenthesis": whileStatement_rightParenthesis,
+        "whileStatement_whileKeyword": whileStatement_whileKeyword,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.yieldStatement) {
+      return {
+        "yieldStatement_expression": yieldStatement_expression,
+        "yieldStatement_yieldKeyword": yieldStatement_yieldKeyword,
+        "yieldStatement_star": yieldStatement_star,
+        "yieldStatement_semicolon": yieldStatement_semicolon,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.booleanLiteral) {
+      return {
+        "booleanLiteral_literal": booleanLiteral_literal,
+        "booleanLiteral_value": booleanLiteral_value,
+        "expression_type": expression_type,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.doubleLiteral) {
+      return {
+        "doubleLiteral_literal": doubleLiteral_literal,
+        "doubleLiteral_value": doubleLiteral_value,
+        "expression_type": expression_type,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.emptyFunctionBody) {
+      return {
+        "emptyFunctionBody_semicolon": emptyFunctionBody_semicolon,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.emptyStatement) {
+      return {
+        "emptyStatement_semicolon": emptyStatement_semicolon,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.integerLiteral) {
+      return {
+        "integerLiteral_literal": integerLiteral_literal,
+        "integerLiteral_value": integerLiteral_value,
+        "expression_type": expression_type,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.interpolationString) {
+      return {
+        "interpolationString_token": interpolationString_token,
+        "interpolationString_value": interpolationString_value,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.nullLiteral) {
+      return {
+        "nullLiteral_literal": nullLiteral_literal,
+        "expression_type": expression_type,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.rethrowExpression) {
+      return {
+        "rethrowExpression_rethrowKeyword": rethrowExpression_rethrowKeyword,
+        "expression_type": expression_type,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.scriptTag) {
+      return {
+        "scriptTag_scriptTag": scriptTag_scriptTag,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.simpleIdentifier) {
+      return {
+        "simpleIdentifier_element": simpleIdentifier_element,
+        "simpleIdentifier_token": simpleIdentifier_token,
+        "simpleIdentifier_elementType": simpleIdentifier_elementType,
+        "expression_type": expression_type,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.simpleStringLiteral) {
+      return {
+        "simpleStringLiteral_token": simpleStringLiteral_token,
+        "expression_type": expression_type,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+        "simpleStringLiteral_value": simpleStringLiteral_value,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.superExpression) {
+      return {
+        "superExpression_superKeyword": superExpression_superKeyword,
+        "expression_type": expression_type,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.symbolLiteral) {
+      return {
+        "symbolLiteral_poundSign": symbolLiteral_poundSign,
+        "symbolLiteral_components": symbolLiteral_components,
+        "expression_type": expression_type,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.thisExpression) {
+      return {
+        "thisExpression_thisKeyword": thisExpression_thisKeyword,
+        "expression_type": expression_type,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    if (kind == idl.LinkedNodeKind.comment) {
+      return {
+        "comment_tokens": comment_tokens,
+        "comment_type": comment_type,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+      };
+    }
+    throw StateError("Unexpected $kind");
+  }
+
+  @override
+  String toString() => convert.json.encode(toJson());
+}
+
+class LinkedNodeBundleBuilder extends Object
+    with _LinkedNodeBundleMixin
+    implements idl.LinkedNodeBundle {
+  List<LinkedNodeLibraryBuilder> _libraries;
+  LinkedNodeReferencesBuilder _references;
+
+  @override
+  List<LinkedNodeLibraryBuilder> get libraries =>
+      _libraries ??= <LinkedNodeLibraryBuilder>[];
+
+  set libraries(List<LinkedNodeLibraryBuilder> value) {
+    this._libraries = value;
+  }
+
+  @override
+  LinkedNodeReferencesBuilder get references => _references;
+
+  /// The shared list of references used in the [libraries].
+  set references(LinkedNodeReferencesBuilder value) {
+    this._references = value;
+  }
+
+  LinkedNodeBundleBuilder(
+      {List<LinkedNodeLibraryBuilder> libraries,
+      LinkedNodeReferencesBuilder references})
+      : _libraries = libraries,
+        _references = references;
+
+  /// Flush [informative] data recursively.
+  void flushInformative() {
+    _libraries?.forEach((b) => b.flushInformative());
+    _references?.flushInformative();
+  }
+
+  /// Accumulate non-[informative] data into [signature].
+  void collectApiSignature(api_sig.ApiSignature signature) {
+    signature.addBool(this._references != null);
+    this._references?.collectApiSignature(signature);
+    if (this._libraries == null) {
+      signature.addInt(0);
+    } else {
+      signature.addInt(this._libraries.length);
+      for (var x in this._libraries) {
+        x?.collectApiSignature(signature);
+      }
+    }
+  }
+
+  List<int> toBuffer() {
+    fb.Builder fbBuilder = new fb.Builder();
+    return fbBuilder.finish(finish(fbBuilder), "LNBn");
+  }
+
+  fb.Offset finish(fb.Builder fbBuilder) {
+    fb.Offset offset_libraries;
+    fb.Offset offset_references;
+    if (!(_libraries == null || _libraries.isEmpty)) {
+      offset_libraries = fbBuilder
+          .writeList(_libraries.map((b) => b.finish(fbBuilder)).toList());
+    }
+    if (_references != null) {
+      offset_references = _references.finish(fbBuilder);
+    }
+    fbBuilder.startTable();
+    if (offset_libraries != null) {
+      fbBuilder.addOffset(1, offset_libraries);
+    }
+    if (offset_references != null) {
+      fbBuilder.addOffset(0, offset_references);
+    }
+    return fbBuilder.endTable();
+  }
+}
+
+idl.LinkedNodeBundle readLinkedNodeBundle(List<int> buffer) {
+  fb.BufferContext rootRef = new fb.BufferContext.fromBytes(buffer);
+  return const _LinkedNodeBundleReader().read(rootRef, 0);
+}
+
+class _LinkedNodeBundleReader extends fb.TableReader<_LinkedNodeBundleImpl> {
+  const _LinkedNodeBundleReader();
+
+  @override
+  _LinkedNodeBundleImpl createObject(fb.BufferContext bc, int offset) =>
+      new _LinkedNodeBundleImpl(bc, offset);
+}
+
+class _LinkedNodeBundleImpl extends Object
+    with _LinkedNodeBundleMixin
+    implements idl.LinkedNodeBundle {
+  final fb.BufferContext _bc;
+  final int _bcOffset;
+
+  _LinkedNodeBundleImpl(this._bc, this._bcOffset);
+
+  List<idl.LinkedNodeLibrary> _libraries;
+  idl.LinkedNodeReferences _references;
+
+  @override
+  List<idl.LinkedNodeLibrary> get libraries {
+    _libraries ??= const fb.ListReader<idl.LinkedNodeLibrary>(
+            const _LinkedNodeLibraryReader())
+        .vTableGet(_bc, _bcOffset, 1, const <idl.LinkedNodeLibrary>[]);
+    return _libraries;
+  }
+
+  @override
+  idl.LinkedNodeReferences get references {
+    _references ??=
+        const _LinkedNodeReferencesReader().vTableGet(_bc, _bcOffset, 0, null);
+    return _references;
+  }
+}
+
+abstract class _LinkedNodeBundleMixin implements idl.LinkedNodeBundle {
+  @override
+  Map<String, Object> toJson() {
+    Map<String, Object> _result = <String, Object>{};
+    if (libraries.isNotEmpty)
+      _result["libraries"] =
+          libraries.map((_value) => _value.toJson()).toList();
+    if (references != null) _result["references"] = references.toJson();
+    return _result;
+  }
+
+  @override
+  Map<String, Object> toMap() => {
+        "libraries": libraries,
+        "references": references,
+      };
+
+  @override
+  String toString() => convert.json.encode(toJson());
+}
+
+class LinkedNodeLibraryBuilder extends Object
+    with _LinkedNodeLibraryMixin
+    implements idl.LinkedNodeLibrary {
+  List<int> _exports;
+  String _name;
+  int _nameLength;
+  int _nameOffset;
+  List<LinkedNodeUnitBuilder> _units;
+  String _uriStr;
+
+  @override
+  List<int> get exports => _exports ??= <int>[];
+
+  set exports(List<int> value) {
+    assert(value == null || value.every((e) => e >= 0));
+    this._exports = value;
+  }
+
+  @override
+  String get name => _name ??= '';
+
+  set name(String value) {
+    this._name = value;
+  }
+
+  @override
+  int get nameLength => _nameLength ??= 0;
+
+  set nameLength(int value) {
+    assert(value == null || value >= 0);
+    this._nameLength = value;
+  }
+
+  @override
+  int get nameOffset => _nameOffset ??= 0;
+
+  set nameOffset(int value) {
+    assert(value == null || value >= 0);
+    this._nameOffset = value;
+  }
+
+  @override
+  List<LinkedNodeUnitBuilder> get units => _units ??= <LinkedNodeUnitBuilder>[];
+
+  set units(List<LinkedNodeUnitBuilder> value) {
+    this._units = value;
+  }
+
+  @override
+  String get uriStr => _uriStr ??= '';
+
+  set uriStr(String value) {
+    this._uriStr = value;
+  }
+
+  LinkedNodeLibraryBuilder(
+      {List<int> exports,
+      String name,
+      int nameLength,
+      int nameOffset,
+      List<LinkedNodeUnitBuilder> units,
+      String uriStr})
+      : _exports = exports,
+        _name = name,
+        _nameLength = nameLength,
+        _nameOffset = nameOffset,
+        _units = units,
+        _uriStr = uriStr;
+
+  /// Flush [informative] data recursively.
+  void flushInformative() {
+    _units?.forEach((b) => b.flushInformative());
+  }
+
+  /// Accumulate non-[informative] data into [signature].
+  void collectApiSignature(api_sig.ApiSignature signature) {
+    signature.addString(this._uriStr ?? '');
+    if (this._units == null) {
+      signature.addInt(0);
+    } else {
+      signature.addInt(this._units.length);
+      for (var x in this._units) {
+        x?.collectApiSignature(signature);
+      }
+    }
+    if (this._exports == null) {
+      signature.addInt(0);
+    } else {
+      signature.addInt(this._exports.length);
+      for (var x in this._exports) {
+        signature.addInt(x);
+      }
+    }
+    signature.addString(this._name ?? '');
+    signature.addInt(this._nameOffset ?? 0);
+    signature.addInt(this._nameLength ?? 0);
+  }
+
+  fb.Offset finish(fb.Builder fbBuilder) {
+    fb.Offset offset_exports;
+    fb.Offset offset_name;
+    fb.Offset offset_units;
+    fb.Offset offset_uriStr;
+    if (!(_exports == null || _exports.isEmpty)) {
+      offset_exports = fbBuilder.writeListUint32(_exports);
+    }
+    if (_name != null) {
+      offset_name = fbBuilder.writeString(_name);
+    }
+    if (!(_units == null || _units.isEmpty)) {
+      offset_units =
+          fbBuilder.writeList(_units.map((b) => b.finish(fbBuilder)).toList());
+    }
+    if (_uriStr != null) {
+      offset_uriStr = fbBuilder.writeString(_uriStr);
+    }
+    fbBuilder.startTable();
+    if (offset_exports != null) {
+      fbBuilder.addOffset(2, offset_exports);
+    }
+    if (offset_name != null) {
+      fbBuilder.addOffset(3, offset_name);
+    }
+    if (_nameLength != null && _nameLength != 0) {
+      fbBuilder.addUint32(5, _nameLength);
+    }
+    if (_nameOffset != null && _nameOffset != 0) {
+      fbBuilder.addUint32(4, _nameOffset);
+    }
+    if (offset_units != null) {
+      fbBuilder.addOffset(1, offset_units);
+    }
+    if (offset_uriStr != null) {
+      fbBuilder.addOffset(0, offset_uriStr);
+    }
+    return fbBuilder.endTable();
+  }
+}
+
+class _LinkedNodeLibraryReader extends fb.TableReader<_LinkedNodeLibraryImpl> {
+  const _LinkedNodeLibraryReader();
+
+  @override
+  _LinkedNodeLibraryImpl createObject(fb.BufferContext bc, int offset) =>
+      new _LinkedNodeLibraryImpl(bc, offset);
+}
+
+class _LinkedNodeLibraryImpl extends Object
+    with _LinkedNodeLibraryMixin
+    implements idl.LinkedNodeLibrary {
+  final fb.BufferContext _bc;
+  final int _bcOffset;
+
+  _LinkedNodeLibraryImpl(this._bc, this._bcOffset);
+
+  List<int> _exports;
+  String _name;
+  int _nameLength;
+  int _nameOffset;
+  List<idl.LinkedNodeUnit> _units;
+  String _uriStr;
+
+  @override
+  List<int> get exports {
+    _exports ??=
+        const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 2, const <int>[]);
+    return _exports;
+  }
+
+  @override
+  String get name {
+    _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 3, '');
+    return _name;
+  }
+
+  @override
+  int get nameLength {
+    _nameLength ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 5, 0);
+    return _nameLength;
+  }
+
+  @override
+  int get nameOffset {
+    _nameOffset ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 4, 0);
+    return _nameOffset;
+  }
+
+  @override
+  List<idl.LinkedNodeUnit> get units {
+    _units ??=
+        const fb.ListReader<idl.LinkedNodeUnit>(const _LinkedNodeUnitReader())
+            .vTableGet(_bc, _bcOffset, 1, const <idl.LinkedNodeUnit>[]);
+    return _units;
+  }
+
+  @override
+  String get uriStr {
+    _uriStr ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, '');
+    return _uriStr;
+  }
+}
+
+abstract class _LinkedNodeLibraryMixin implements idl.LinkedNodeLibrary {
+  @override
+  Map<String, Object> toJson() {
+    Map<String, Object> _result = <String, Object>{};
+    if (exports.isNotEmpty) _result["exports"] = exports;
+    if (name != '') _result["name"] = name;
+    if (nameLength != 0) _result["nameLength"] = nameLength;
+    if (nameOffset != 0) _result["nameOffset"] = nameOffset;
+    if (units.isNotEmpty)
+      _result["units"] = units.map((_value) => _value.toJson()).toList();
+    if (uriStr != '') _result["uriStr"] = uriStr;
+    return _result;
+  }
+
+  @override
+  Map<String, Object> toMap() => {
+        "exports": exports,
+        "name": name,
+        "nameLength": nameLength,
+        "nameOffset": nameOffset,
+        "units": units,
+        "uriStr": uriStr,
+      };
+
+  @override
+  String toString() => convert.json.encode(toJson());
+}
+
+class LinkedNodeReferencesBuilder extends Object
+    with _LinkedNodeReferencesMixin
+    implements idl.LinkedNodeReferences {
+  List<String> _name;
+  List<int> _parent;
+
+  @override
+  List<String> get name => _name ??= <String>[];
+
+  set name(List<String> value) {
+    this._name = value;
+  }
+
+  @override
+  List<int> get parent => _parent ??= <int>[];
+
+  set parent(List<int> value) {
+    assert(value == null || value.every((e) => e >= 0));
+    this._parent = value;
+  }
+
+  LinkedNodeReferencesBuilder({List<String> name, List<int> parent})
+      : _name = name,
+        _parent = parent;
+
+  /// Flush [informative] data recursively.
+  void flushInformative() {}
+
+  /// Accumulate non-[informative] data into [signature].
+  void collectApiSignature(api_sig.ApiSignature signature) {
+    if (this._parent == null) {
+      signature.addInt(0);
+    } else {
+      signature.addInt(this._parent.length);
+      for (var x in this._parent) {
+        signature.addInt(x);
+      }
+    }
+    if (this._name == null) {
+      signature.addInt(0);
+    } else {
+      signature.addInt(this._name.length);
+      for (var x in this._name) {
+        signature.addString(x);
+      }
+    }
+  }
+
+  fb.Offset finish(fb.Builder fbBuilder) {
+    fb.Offset offset_name;
+    fb.Offset offset_parent;
+    if (!(_name == null || _name.isEmpty)) {
+      offset_name = fbBuilder
+          .writeList(_name.map((b) => fbBuilder.writeString(b)).toList());
+    }
+    if (!(_parent == null || _parent.isEmpty)) {
+      offset_parent = fbBuilder.writeListUint32(_parent);
+    }
+    fbBuilder.startTable();
+    if (offset_name != null) {
+      fbBuilder.addOffset(1, offset_name);
+    }
+    if (offset_parent != null) {
+      fbBuilder.addOffset(0, offset_parent);
+    }
+    return fbBuilder.endTable();
+  }
+}
+
+class _LinkedNodeReferencesReader
+    extends fb.TableReader<_LinkedNodeReferencesImpl> {
+  const _LinkedNodeReferencesReader();
+
+  @override
+  _LinkedNodeReferencesImpl createObject(fb.BufferContext bc, int offset) =>
+      new _LinkedNodeReferencesImpl(bc, offset);
+}
+
+class _LinkedNodeReferencesImpl extends Object
+    with _LinkedNodeReferencesMixin
+    implements idl.LinkedNodeReferences {
+  final fb.BufferContext _bc;
+  final int _bcOffset;
+
+  _LinkedNodeReferencesImpl(this._bc, this._bcOffset);
+
+  List<String> _name;
+  List<int> _parent;
+
+  @override
+  List<String> get name {
+    _name ??= const fb.ListReader<String>(const fb.StringReader())
+        .vTableGet(_bc, _bcOffset, 1, const <String>[]);
+    return _name;
+  }
+
+  @override
+  List<int> get parent {
+    _parent ??=
+        const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 0, const <int>[]);
+    return _parent;
+  }
+}
+
+abstract class _LinkedNodeReferencesMixin implements idl.LinkedNodeReferences {
+  @override
+  Map<String, Object> toJson() {
+    Map<String, Object> _result = <String, Object>{};
+    if (name.isNotEmpty) _result["name"] = name;
+    if (parent.isNotEmpty) _result["parent"] = parent;
+    return _result;
+  }
+
+  @override
+  Map<String, Object> toMap() => {
+        "name": name,
+        "parent": parent,
+      };
+
+  @override
+  String toString() => convert.json.encode(toJson());
+}
+
+class LinkedNodeTypeBuilder extends Object
+    with _LinkedNodeTypeMixin
+    implements idl.LinkedNodeType {
+  List<LinkedNodeTypeFormalParameterBuilder> _functionFormalParameters;
+  LinkedNodeTypeBuilder _functionReturnType;
+  List<LinkedNodeTypeTypeParameterBuilder> _functionTypeParameters;
+  int _genericTypeAliasReference;
+  List<LinkedNodeTypeBuilder> _genericTypeAliasTypeArguments;
+  int _interfaceClass;
+  List<LinkedNodeTypeBuilder> _interfaceTypeArguments;
+  idl.LinkedNodeTypeKind _kind;
+  int _typeParameterId;
+
+  @override
+  List<LinkedNodeTypeFormalParameterBuilder> get functionFormalParameters =>
+      _functionFormalParameters ??= <LinkedNodeTypeFormalParameterBuilder>[];
+
+  set functionFormalParameters(
+      List<LinkedNodeTypeFormalParameterBuilder> value) {
+    this._functionFormalParameters = value;
+  }
+
+  @override
+  LinkedNodeTypeBuilder get functionReturnType => _functionReturnType;
+
+  set functionReturnType(LinkedNodeTypeBuilder value) {
+    this._functionReturnType = value;
+  }
+
+  @override
+  List<LinkedNodeTypeTypeParameterBuilder> get functionTypeParameters =>
+      _functionTypeParameters ??= <LinkedNodeTypeTypeParameterBuilder>[];
+
+  set functionTypeParameters(List<LinkedNodeTypeTypeParameterBuilder> value) {
+    this._functionTypeParameters = value;
+  }
+
+  @override
+  int get genericTypeAliasReference => _genericTypeAliasReference ??= 0;
+
+  set genericTypeAliasReference(int value) {
+    assert(value == null || value >= 0);
+    this._genericTypeAliasReference = value;
+  }
+
+  @override
+  List<LinkedNodeTypeBuilder> get genericTypeAliasTypeArguments =>
+      _genericTypeAliasTypeArguments ??= <LinkedNodeTypeBuilder>[];
+
+  set genericTypeAliasTypeArguments(List<LinkedNodeTypeBuilder> value) {
+    this._genericTypeAliasTypeArguments = value;
+  }
+
+  @override
+  int get interfaceClass => _interfaceClass ??= 0;
+
+  /// Reference to a [LinkedNodeReferences].
+  set interfaceClass(int value) {
+    assert(value == null || value >= 0);
+    this._interfaceClass = value;
+  }
+
+  @override
+  List<LinkedNodeTypeBuilder> get interfaceTypeArguments =>
+      _interfaceTypeArguments ??= <LinkedNodeTypeBuilder>[];
+
+  set interfaceTypeArguments(List<LinkedNodeTypeBuilder> value) {
+    this._interfaceTypeArguments = value;
+  }
+
+  @override
+  idl.LinkedNodeTypeKind get kind => _kind ??= idl.LinkedNodeTypeKind.bottom;
+
+  set kind(idl.LinkedNodeTypeKind value) {
+    this._kind = value;
+  }
+
+  @override
+  int get typeParameterId => _typeParameterId ??= 0;
+
+  set typeParameterId(int value) {
+    assert(value == null || value >= 0);
+    this._typeParameterId = value;
+  }
+
+  LinkedNodeTypeBuilder(
+      {List<LinkedNodeTypeFormalParameterBuilder> functionFormalParameters,
+      LinkedNodeTypeBuilder functionReturnType,
+      List<LinkedNodeTypeTypeParameterBuilder> functionTypeParameters,
+      int genericTypeAliasReference,
+      List<LinkedNodeTypeBuilder> genericTypeAliasTypeArguments,
+      int interfaceClass,
+      List<LinkedNodeTypeBuilder> interfaceTypeArguments,
+      idl.LinkedNodeTypeKind kind,
+      int typeParameterId})
+      : _functionFormalParameters = functionFormalParameters,
+        _functionReturnType = functionReturnType,
+        _functionTypeParameters = functionTypeParameters,
+        _genericTypeAliasReference = genericTypeAliasReference,
+        _genericTypeAliasTypeArguments = genericTypeAliasTypeArguments,
+        _interfaceClass = interfaceClass,
+        _interfaceTypeArguments = interfaceTypeArguments,
+        _kind = kind,
+        _typeParameterId = typeParameterId;
+
+  /// Flush [informative] data recursively.
+  void flushInformative() {
+    _functionFormalParameters?.forEach((b) => b.flushInformative());
+    _functionReturnType?.flushInformative();
+    _functionTypeParameters?.forEach((b) => b.flushInformative());
+    _genericTypeAliasTypeArguments?.forEach((b) => b.flushInformative());
+    _interfaceTypeArguments?.forEach((b) => b.flushInformative());
+  }
+
+  /// Accumulate non-[informative] data into [signature].
+  void collectApiSignature(api_sig.ApiSignature signature) {
+    if (this._functionFormalParameters == null) {
+      signature.addInt(0);
+    } else {
+      signature.addInt(this._functionFormalParameters.length);
+      for (var x in this._functionFormalParameters) {
+        x?.collectApiSignature(signature);
+      }
+    }
+    signature.addBool(this._functionReturnType != null);
+    this._functionReturnType?.collectApiSignature(signature);
+    if (this._functionTypeParameters == null) {
+      signature.addInt(0);
+    } else {
+      signature.addInt(this._functionTypeParameters.length);
+      for (var x in this._functionTypeParameters) {
+        x?.collectApiSignature(signature);
+      }
+    }
+    signature.addInt(this._interfaceClass ?? 0);
+    if (this._interfaceTypeArguments == null) {
+      signature.addInt(0);
+    } else {
+      signature.addInt(this._interfaceTypeArguments.length);
+      for (var x in this._interfaceTypeArguments) {
+        x?.collectApiSignature(signature);
+      }
+    }
+    signature.addInt(this._kind == null ? 0 : this._kind.index);
+    signature.addInt(this._typeParameterId ?? 0);
+    signature.addInt(this._genericTypeAliasReference ?? 0);
+    if (this._genericTypeAliasTypeArguments == null) {
+      signature.addInt(0);
+    } else {
+      signature.addInt(this._genericTypeAliasTypeArguments.length);
+      for (var x in this._genericTypeAliasTypeArguments) {
+        x?.collectApiSignature(signature);
+      }
+    }
+  }
+
+  fb.Offset finish(fb.Builder fbBuilder) {
+    fb.Offset offset_functionFormalParameters;
+    fb.Offset offset_functionReturnType;
+    fb.Offset offset_functionTypeParameters;
+    fb.Offset offset_genericTypeAliasTypeArguments;
+    fb.Offset offset_interfaceTypeArguments;
+    if (!(_functionFormalParameters == null ||
+        _functionFormalParameters.isEmpty)) {
+      offset_functionFormalParameters = fbBuilder.writeList(
+          _functionFormalParameters.map((b) => b.finish(fbBuilder)).toList());
+    }
+    if (_functionReturnType != null) {
+      offset_functionReturnType = _functionReturnType.finish(fbBuilder);
+    }
+    if (!(_functionTypeParameters == null || _functionTypeParameters.isEmpty)) {
+      offset_functionTypeParameters = fbBuilder.writeList(
+          _functionTypeParameters.map((b) => b.finish(fbBuilder)).toList());
+    }
+    if (!(_genericTypeAliasTypeArguments == null ||
+        _genericTypeAliasTypeArguments.isEmpty)) {
+      offset_genericTypeAliasTypeArguments = fbBuilder.writeList(
+          _genericTypeAliasTypeArguments
+              .map((b) => b.finish(fbBuilder))
+              .toList());
+    }
+    if (!(_interfaceTypeArguments == null || _interfaceTypeArguments.isEmpty)) {
+      offset_interfaceTypeArguments = fbBuilder.writeList(
+          _interfaceTypeArguments.map((b) => b.finish(fbBuilder)).toList());
+    }
+    fbBuilder.startTable();
+    if (offset_functionFormalParameters != null) {
+      fbBuilder.addOffset(0, offset_functionFormalParameters);
+    }
+    if (offset_functionReturnType != null) {
+      fbBuilder.addOffset(1, offset_functionReturnType);
+    }
+    if (offset_functionTypeParameters != null) {
+      fbBuilder.addOffset(2, offset_functionTypeParameters);
+    }
+    if (_genericTypeAliasReference != null && _genericTypeAliasReference != 0) {
+      fbBuilder.addUint32(7, _genericTypeAliasReference);
+    }
+    if (offset_genericTypeAliasTypeArguments != null) {
+      fbBuilder.addOffset(8, offset_genericTypeAliasTypeArguments);
+    }
+    if (_interfaceClass != null && _interfaceClass != 0) {
+      fbBuilder.addUint32(3, _interfaceClass);
+    }
+    if (offset_interfaceTypeArguments != null) {
+      fbBuilder.addOffset(4, offset_interfaceTypeArguments);
+    }
+    if (_kind != null && _kind != idl.LinkedNodeTypeKind.bottom) {
+      fbBuilder.addUint8(5, _kind.index);
+    }
+    if (_typeParameterId != null && _typeParameterId != 0) {
+      fbBuilder.addUint32(6, _typeParameterId);
+    }
+    return fbBuilder.endTable();
+  }
+}
+
+class _LinkedNodeTypeReader extends fb.TableReader<_LinkedNodeTypeImpl> {
+  const _LinkedNodeTypeReader();
+
+  @override
+  _LinkedNodeTypeImpl createObject(fb.BufferContext bc, int offset) =>
+      new _LinkedNodeTypeImpl(bc, offset);
+}
+
+class _LinkedNodeTypeImpl extends Object
+    with _LinkedNodeTypeMixin
+    implements idl.LinkedNodeType {
+  final fb.BufferContext _bc;
+  final int _bcOffset;
+
+  _LinkedNodeTypeImpl(this._bc, this._bcOffset);
+
+  List<idl.LinkedNodeTypeFormalParameter> _functionFormalParameters;
+  idl.LinkedNodeType _functionReturnType;
+  List<idl.LinkedNodeTypeTypeParameter> _functionTypeParameters;
+  int _genericTypeAliasReference;
+  List<idl.LinkedNodeType> _genericTypeAliasTypeArguments;
+  int _interfaceClass;
+  List<idl.LinkedNodeType> _interfaceTypeArguments;
+  idl.LinkedNodeTypeKind _kind;
+  int _typeParameterId;
+
+  @override
+  List<idl.LinkedNodeTypeFormalParameter> get functionFormalParameters {
+    _functionFormalParameters ??=
+        const fb.ListReader<idl.LinkedNodeTypeFormalParameter>(
+                const _LinkedNodeTypeFormalParameterReader())
+            .vTableGet(
+                _bc, _bcOffset, 0, const <idl.LinkedNodeTypeFormalParameter>[]);
+    return _functionFormalParameters;
+  }
+
+  @override
+  idl.LinkedNodeType get functionReturnType {
+    _functionReturnType ??=
+        const _LinkedNodeTypeReader().vTableGet(_bc, _bcOffset, 1, null);
+    return _functionReturnType;
+  }
+
+  @override
+  List<idl.LinkedNodeTypeTypeParameter> get functionTypeParameters {
+    _functionTypeParameters ??=
+        const fb.ListReader<idl.LinkedNodeTypeTypeParameter>(
+                const _LinkedNodeTypeTypeParameterReader())
+            .vTableGet(
+                _bc, _bcOffset, 2, const <idl.LinkedNodeTypeTypeParameter>[]);
+    return _functionTypeParameters;
+  }
+
+  @override
+  int get genericTypeAliasReference {
+    _genericTypeAliasReference ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 7, 0);
+    return _genericTypeAliasReference;
+  }
+
+  @override
+  List<idl.LinkedNodeType> get genericTypeAliasTypeArguments {
+    _genericTypeAliasTypeArguments ??=
+        const fb.ListReader<idl.LinkedNodeType>(const _LinkedNodeTypeReader())
+            .vTableGet(_bc, _bcOffset, 8, const <idl.LinkedNodeType>[]);
+    return _genericTypeAliasTypeArguments;
+  }
+
+  @override
+  int get interfaceClass {
+    _interfaceClass ??= const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 3, 0);
+    return _interfaceClass;
+  }
+
+  @override
+  List<idl.LinkedNodeType> get interfaceTypeArguments {
+    _interfaceTypeArguments ??=
+        const fb.ListReader<idl.LinkedNodeType>(const _LinkedNodeTypeReader())
+            .vTableGet(_bc, _bcOffset, 4, const <idl.LinkedNodeType>[]);
+    return _interfaceTypeArguments;
+  }
+
+  @override
+  idl.LinkedNodeTypeKind get kind {
+    _kind ??= const _LinkedNodeTypeKindReader()
+        .vTableGet(_bc, _bcOffset, 5, idl.LinkedNodeTypeKind.bottom);
+    return _kind;
+  }
+
+  @override
+  int get typeParameterId {
+    _typeParameterId ??=
+        const fb.Uint32Reader().vTableGet(_bc, _bcOffset, 6, 0);
+    return _typeParameterId;
+  }
+}
+
+abstract class _LinkedNodeTypeMixin implements idl.LinkedNodeType {
+  @override
+  Map<String, Object> toJson() {
+    Map<String, Object> _result = <String, Object>{};
+    if (functionFormalParameters.isNotEmpty)
+      _result["functionFormalParameters"] =
+          functionFormalParameters.map((_value) => _value.toJson()).toList();
+    if (functionReturnType != null)
+      _result["functionReturnType"] = functionReturnType.toJson();
+    if (functionTypeParameters.isNotEmpty)
+      _result["functionTypeParameters"] =
+          functionTypeParameters.map((_value) => _value.toJson()).toList();
+    if (genericTypeAliasReference != 0)
+      _result["genericTypeAliasReference"] = genericTypeAliasReference;
+    if (genericTypeAliasTypeArguments.isNotEmpty)
+      _result["genericTypeAliasTypeArguments"] = genericTypeAliasTypeArguments
+          .map((_value) => _value.toJson())
+          .toList();
+    if (interfaceClass != 0) _result["interfaceClass"] = interfaceClass;
+    if (interfaceTypeArguments.isNotEmpty)
+      _result["interfaceTypeArguments"] =
+          interfaceTypeArguments.map((_value) => _value.toJson()).toList();
+    if (kind != idl.LinkedNodeTypeKind.bottom)
+      _result["kind"] = kind.toString().split('.')[1];
+    if (typeParameterId != 0) _result["typeParameterId"] = typeParameterId;
+    return _result;
+  }
+
+  @override
+  Map<String, Object> toMap() => {
+        "functionFormalParameters": functionFormalParameters,
+        "functionReturnType": functionReturnType,
+        "functionTypeParameters": functionTypeParameters,
+        "genericTypeAliasReference": genericTypeAliasReference,
+        "genericTypeAliasTypeArguments": genericTypeAliasTypeArguments,
+        "interfaceClass": interfaceClass,
+        "interfaceTypeArguments": interfaceTypeArguments,
+        "kind": kind,
+        "typeParameterId": typeParameterId,
+      };
+
+  @override
+  String toString() => convert.json.encode(toJson());
+}
+
+class LinkedNodeTypeFormalParameterBuilder extends Object
+    with _LinkedNodeTypeFormalParameterMixin
+    implements idl.LinkedNodeTypeFormalParameter {
+  idl.LinkedNodeFormalParameterKind _kind;
+  String _name;
+  LinkedNodeTypeBuilder _type;
+
+  @override
+  idl.LinkedNodeFormalParameterKind get kind =>
+      _kind ??= idl.LinkedNodeFormalParameterKind.required;
+
+  set kind(idl.LinkedNodeFormalParameterKind value) {
+    this._kind = value;
+  }
+
+  @override
+  String get name => _name ??= '';
+
+  set name(String value) {
+    this._name = value;
+  }
+
+  @override
+  LinkedNodeTypeBuilder get type => _type;
+
+  set type(LinkedNodeTypeBuilder value) {
+    this._type = value;
+  }
+
+  LinkedNodeTypeFormalParameterBuilder(
+      {idl.LinkedNodeFormalParameterKind kind,
+      String name,
+      LinkedNodeTypeBuilder type})
+      : _kind = kind,
+        _name = name,
+        _type = type;
+
+  /// Flush [informative] data recursively.
+  void flushInformative() {
+    _type?.flushInformative();
+  }
+
+  /// Accumulate non-[informative] data into [signature].
+  void collectApiSignature(api_sig.ApiSignature signature) {
+    signature.addInt(this._kind == null ? 0 : this._kind.index);
+    signature.addString(this._name ?? '');
+    signature.addBool(this._type != null);
+    this._type?.collectApiSignature(signature);
+  }
+
+  fb.Offset finish(fb.Builder fbBuilder) {
+    fb.Offset offset_name;
+    fb.Offset offset_type;
+    if (_name != null) {
+      offset_name = fbBuilder.writeString(_name);
+    }
+    if (_type != null) {
+      offset_type = _type.finish(fbBuilder);
+    }
+    fbBuilder.startTable();
+    if (_kind != null && _kind != idl.LinkedNodeFormalParameterKind.required) {
+      fbBuilder.addUint8(0, _kind.index);
+    }
+    if (offset_name != null) {
+      fbBuilder.addOffset(1, offset_name);
+    }
+    if (offset_type != null) {
+      fbBuilder.addOffset(2, offset_type);
+    }
+    return fbBuilder.endTable();
+  }
+}
+
+class _LinkedNodeTypeFormalParameterReader
+    extends fb.TableReader<_LinkedNodeTypeFormalParameterImpl> {
+  const _LinkedNodeTypeFormalParameterReader();
+
+  @override
+  _LinkedNodeTypeFormalParameterImpl createObject(
+          fb.BufferContext bc, int offset) =>
+      new _LinkedNodeTypeFormalParameterImpl(bc, offset);
+}
+
+class _LinkedNodeTypeFormalParameterImpl extends Object
+    with _LinkedNodeTypeFormalParameterMixin
+    implements idl.LinkedNodeTypeFormalParameter {
+  final fb.BufferContext _bc;
+  final int _bcOffset;
+
+  _LinkedNodeTypeFormalParameterImpl(this._bc, this._bcOffset);
+
+  idl.LinkedNodeFormalParameterKind _kind;
+  String _name;
+  idl.LinkedNodeType _type;
+
+  @override
+  idl.LinkedNodeFormalParameterKind get kind {
+    _kind ??= const _LinkedNodeFormalParameterKindReader().vTableGet(
+        _bc, _bcOffset, 0, idl.LinkedNodeFormalParameterKind.required);
+    return _kind;
+  }
+
+  @override
+  String get name {
+    _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 1, '');
+    return _name;
+  }
+
+  @override
+  idl.LinkedNodeType get type {
+    _type ??= const _LinkedNodeTypeReader().vTableGet(_bc, _bcOffset, 2, null);
+    return _type;
+  }
+}
+
+abstract class _LinkedNodeTypeFormalParameterMixin
+    implements idl.LinkedNodeTypeFormalParameter {
+  @override
+  Map<String, Object> toJson() {
+    Map<String, Object> _result = <String, Object>{};
+    if (kind != idl.LinkedNodeFormalParameterKind.required)
+      _result["kind"] = kind.toString().split('.')[1];
+    if (name != '') _result["name"] = name;
+    if (type != null) _result["type"] = type.toJson();
+    return _result;
+  }
+
+  @override
+  Map<String, Object> toMap() => {
+        "kind": kind,
+        "name": name,
+        "type": type,
+      };
+
+  @override
+  String toString() => convert.json.encode(toJson());
+}
+
+class LinkedNodeTypeTypeParameterBuilder extends Object
+    with _LinkedNodeTypeTypeParameterMixin
+    implements idl.LinkedNodeTypeTypeParameter {
+  LinkedNodeTypeBuilder _bound;
+  String _name;
+
+  @override
+  LinkedNodeTypeBuilder get bound => _bound;
+
+  set bound(LinkedNodeTypeBuilder value) {
+    this._bound = value;
+  }
+
+  @override
+  String get name => _name ??= '';
+
+  set name(String value) {
+    this._name = value;
+  }
+
+  LinkedNodeTypeTypeParameterBuilder({LinkedNodeTypeBuilder bound, String name})
+      : _bound = bound,
+        _name = name;
+
+  /// Flush [informative] data recursively.
+  void flushInformative() {
+    _bound?.flushInformative();
+  }
+
+  /// Accumulate non-[informative] data into [signature].
+  void collectApiSignature(api_sig.ApiSignature signature) {
+    signature.addString(this._name ?? '');
+    signature.addBool(this._bound != null);
+    this._bound?.collectApiSignature(signature);
+  }
+
+  fb.Offset finish(fb.Builder fbBuilder) {
+    fb.Offset offset_bound;
+    fb.Offset offset_name;
+    if (_bound != null) {
+      offset_bound = _bound.finish(fbBuilder);
+    }
+    if (_name != null) {
+      offset_name = fbBuilder.writeString(_name);
+    }
+    fbBuilder.startTable();
+    if (offset_bound != null) {
+      fbBuilder.addOffset(1, offset_bound);
+    }
+    if (offset_name != null) {
+      fbBuilder.addOffset(0, offset_name);
+    }
+    return fbBuilder.endTable();
+  }
+}
+
+class _LinkedNodeTypeTypeParameterReader
+    extends fb.TableReader<_LinkedNodeTypeTypeParameterImpl> {
+  const _LinkedNodeTypeTypeParameterReader();
+
+  @override
+  _LinkedNodeTypeTypeParameterImpl createObject(
+          fb.BufferContext bc, int offset) =>
+      new _LinkedNodeTypeTypeParameterImpl(bc, offset);
+}
+
+class _LinkedNodeTypeTypeParameterImpl extends Object
+    with _LinkedNodeTypeTypeParameterMixin
+    implements idl.LinkedNodeTypeTypeParameter {
+  final fb.BufferContext _bc;
+  final int _bcOffset;
+
+  _LinkedNodeTypeTypeParameterImpl(this._bc, this._bcOffset);
+
+  idl.LinkedNodeType _bound;
+  String _name;
+
+  @override
+  idl.LinkedNodeType get bound {
+    _bound ??= const _LinkedNodeTypeReader().vTableGet(_bc, _bcOffset, 1, null);
+    return _bound;
+  }
+
+  @override
+  String get name {
+    _name ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, '');
+    return _name;
+  }
+}
+
+abstract class _LinkedNodeTypeTypeParameterMixin
+    implements idl.LinkedNodeTypeTypeParameter {
+  @override
+  Map<String, Object> toJson() {
+    Map<String, Object> _result = <String, Object>{};
+    if (bound != null) _result["bound"] = bound.toJson();
+    if (name != '') _result["name"] = name;
+    return _result;
+  }
+
+  @override
+  Map<String, Object> toMap() => {
+        "bound": bound,
+        "name": name,
+      };
+
+  @override
+  String toString() => convert.json.encode(toJson());
+}
+
+class LinkedNodeUnitBuilder extends Object
+    with _LinkedNodeUnitMixin
+    implements idl.LinkedNodeUnit {
+  LinkedNodeBuilder _node;
+  UnlinkedTokensBuilder _tokens;
+  String _uriStr;
+
+  @override
+  LinkedNodeBuilder get node => _node;
+
+  set node(LinkedNodeBuilder value) {
+    this._node = value;
+  }
+
+  @override
+  UnlinkedTokensBuilder get tokens => _tokens;
+
+  set tokens(UnlinkedTokensBuilder value) {
+    this._tokens = value;
+  }
+
+  @override
+  String get uriStr => _uriStr ??= '';
+
+  set uriStr(String value) {
+    this._uriStr = value;
+  }
+
+  LinkedNodeUnitBuilder(
+      {LinkedNodeBuilder node, UnlinkedTokensBuilder tokens, String uriStr})
+      : _node = node,
+        _tokens = tokens,
+        _uriStr = uriStr;
+
+  /// Flush [informative] data recursively.
+  void flushInformative() {
+    _node?.flushInformative();
+    _tokens?.flushInformative();
+  }
+
+  /// Accumulate non-[informative] data into [signature].
+  void collectApiSignature(api_sig.ApiSignature signature) {
+    signature.addString(this._uriStr ?? '');
+    signature.addBool(this._tokens != null);
+    this._tokens?.collectApiSignature(signature);
+    signature.addBool(this._node != null);
+    this._node?.collectApiSignature(signature);
+  }
+
+  fb.Offset finish(fb.Builder fbBuilder) {
+    fb.Offset offset_node;
+    fb.Offset offset_tokens;
+    fb.Offset offset_uriStr;
+    if (_node != null) {
+      offset_node = _node.finish(fbBuilder);
+    }
+    if (_tokens != null) {
+      offset_tokens = _tokens.finish(fbBuilder);
+    }
+    if (_uriStr != null) {
+      offset_uriStr = fbBuilder.writeString(_uriStr);
+    }
+    fbBuilder.startTable();
+    if (offset_node != null) {
+      fbBuilder.addOffset(2, offset_node);
+    }
+    if (offset_tokens != null) {
+      fbBuilder.addOffset(1, offset_tokens);
+    }
+    if (offset_uriStr != null) {
+      fbBuilder.addOffset(0, offset_uriStr);
+    }
+    return fbBuilder.endTable();
+  }
+}
+
+class _LinkedNodeUnitReader extends fb.TableReader<_LinkedNodeUnitImpl> {
+  const _LinkedNodeUnitReader();
+
+  @override
+  _LinkedNodeUnitImpl createObject(fb.BufferContext bc, int offset) =>
+      new _LinkedNodeUnitImpl(bc, offset);
+}
+
+class _LinkedNodeUnitImpl extends Object
+    with _LinkedNodeUnitMixin
+    implements idl.LinkedNodeUnit {
+  final fb.BufferContext _bc;
+  final int _bcOffset;
+
+  _LinkedNodeUnitImpl(this._bc, this._bcOffset);
+
+  idl.LinkedNode _node;
+  idl.UnlinkedTokens _tokens;
+  String _uriStr;
+
+  @override
+  idl.LinkedNode get node {
+    _node ??= const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 2, null);
+    return _node;
+  }
+
+  @override
+  idl.UnlinkedTokens get tokens {
+    _tokens ??=
+        const _UnlinkedTokensReader().vTableGet(_bc, _bcOffset, 1, null);
+    return _tokens;
+  }
+
+  @override
+  String get uriStr {
+    _uriStr ??= const fb.StringReader().vTableGet(_bc, _bcOffset, 0, '');
+    return _uriStr;
+  }
+}
+
+abstract class _LinkedNodeUnitMixin implements idl.LinkedNodeUnit {
+  @override
+  Map<String, Object> toJson() {
+    Map<String, Object> _result = <String, Object>{};
+    if (node != null) _result["node"] = node.toJson();
+    if (tokens != null) _result["tokens"] = tokens.toJson();
+    if (uriStr != '') _result["uriStr"] = uriStr;
+    return _result;
+  }
+
+  @override
+  Map<String, Object> toMap() => {
+        "node": node,
+        "tokens": tokens,
+        "uriStr": uriStr,
+      };
+
+  @override
+  String toString() => convert.json.encode(toJson());
+}
+
+class LinkedNodeVariablesDeclarationBuilder extends Object
+    with _LinkedNodeVariablesDeclarationMixin
+    implements idl.LinkedNodeVariablesDeclaration {
+  LinkedNodeBuilder _comment;
+  bool _isConst;
+  bool _isCovariant;
+  bool _isFinal;
+  bool _isStatic;
+
+  @override
+  LinkedNodeBuilder get comment => _comment;
+
+  set comment(LinkedNodeBuilder value) {
+    this._comment = value;
+  }
+
+  @override
+  bool get isConst => _isConst ??= false;
+
+  set isConst(bool value) {
+    this._isConst = value;
+  }
+
+  @override
+  bool get isCovariant => _isCovariant ??= false;
+
+  set isCovariant(bool value) {
+    this._isCovariant = value;
+  }
+
+  @override
+  bool get isFinal => _isFinal ??= false;
+
+  set isFinal(bool value) {
+    this._isFinal = value;
+  }
+
+  @override
+  bool get isStatic => _isStatic ??= false;
+
+  set isStatic(bool value) {
+    this._isStatic = value;
+  }
+
+  LinkedNodeVariablesDeclarationBuilder(
+      {LinkedNodeBuilder comment,
+      bool isConst,
+      bool isCovariant,
+      bool isFinal,
+      bool isStatic})
+      : _comment = comment,
+        _isConst = isConst,
+        _isCovariant = isCovariant,
+        _isFinal = isFinal,
+        _isStatic = isStatic;
+
+  /// Flush [informative] data recursively.
+  void flushInformative() {
+    _comment?.flushInformative();
+  }
+
+  /// Accumulate non-[informative] data into [signature].
+  void collectApiSignature(api_sig.ApiSignature signature) {
+    signature.addBool(this._comment != null);
+    this._comment?.collectApiSignature(signature);
+    signature.addBool(this._isConst == true);
+    signature.addBool(this._isCovariant == true);
+    signature.addBool(this._isFinal == true);
+    signature.addBool(this._isStatic == true);
+  }
+
+  fb.Offset finish(fb.Builder fbBuilder) {
+    fb.Offset offset_comment;
+    if (_comment != null) {
+      offset_comment = _comment.finish(fbBuilder);
+    }
+    fbBuilder.startTable();
+    if (offset_comment != null) {
+      fbBuilder.addOffset(0, offset_comment);
+    }
+    if (_isConst == true) {
+      fbBuilder.addBool(1, true);
+    }
+    if (_isCovariant == true) {
+      fbBuilder.addBool(2, true);
+    }
+    if (_isFinal == true) {
+      fbBuilder.addBool(3, true);
+    }
+    if (_isStatic == true) {
+      fbBuilder.addBool(4, true);
+    }
+    return fbBuilder.endTable();
+  }
+}
+
+class _LinkedNodeVariablesDeclarationReader
+    extends fb.TableReader<_LinkedNodeVariablesDeclarationImpl> {
+  const _LinkedNodeVariablesDeclarationReader();
+
+  @override
+  _LinkedNodeVariablesDeclarationImpl createObject(
+          fb.BufferContext bc, int offset) =>
+      new _LinkedNodeVariablesDeclarationImpl(bc, offset);
+}
+
+class _LinkedNodeVariablesDeclarationImpl extends Object
+    with _LinkedNodeVariablesDeclarationMixin
+    implements idl.LinkedNodeVariablesDeclaration {
+  final fb.BufferContext _bc;
+  final int _bcOffset;
+
+  _LinkedNodeVariablesDeclarationImpl(this._bc, this._bcOffset);
+
+  idl.LinkedNode _comment;
+  bool _isConst;
+  bool _isCovariant;
+  bool _isFinal;
+  bool _isStatic;
+
+  @override
+  idl.LinkedNode get comment {
+    _comment ??= const _LinkedNodeReader().vTableGet(_bc, _bcOffset, 0, null);
+    return _comment;
+  }
+
+  @override
+  bool get isConst {
+    _isConst ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 1, false);
+    return _isConst;
+  }
+
+  @override
+  bool get isCovariant {
+    _isCovariant ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 2, false);
+    return _isCovariant;
+  }
+
+  @override
+  bool get isFinal {
+    _isFinal ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 3, false);
+    return _isFinal;
+  }
+
+  @override
+  bool get isStatic {
+    _isStatic ??= const fb.BoolReader().vTableGet(_bc, _bcOffset, 4, false);
+    return _isStatic;
+  }
+}
+
+abstract class _LinkedNodeVariablesDeclarationMixin
+    implements idl.LinkedNodeVariablesDeclaration {
+  @override
+  Map<String, Object> toJson() {
+    Map<String, Object> _result = <String, Object>{};
+    if (comment != null) _result["comment"] = comment.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;
+    return _result;
+  }
+
+  @override
+  Map<String, Object> toMap() => {
+        "comment": comment,
+        "isConst": isConst,
+        "isCovariant": isCovariant,
+        "isFinal": isFinal,
+        "isStatic": isStatic,
+      };
+
+  @override
+  String toString() => convert.json.encode(toJson());
+}
+
 class LinkedReferenceBuilder extends Object
     with _LinkedReferenceMixin
     implements idl.LinkedReference {
@@ -4396,7 +20061,7 @@
   /// Containing references must always point backward; that is, for all i, if
   /// LinkedUnit.references[i].containingReference != 0, then
   /// LinkedUnit.references[i].containingReference < i.
-  void set containingReference(int value) {
+  set containingReference(int value) {
     assert(value == null || value >= 0);
     this._containingReference = value;
   }
@@ -4409,7 +20074,7 @@
   ///
   /// Zero if this entity is contained within another entity (e.g. a class
   /// member), or if [kind] is [ReferenceKind.prefix].
-  void set dependency(int value) {
+  set dependency(int value) {
     assert(value == null || value >= 0);
     this._dependency = value;
   }
@@ -4419,7 +20084,7 @@
 
   /// The kind of the entity being referred to.  For the pseudo-types `dynamic`
   /// and `void`, the kind is [ReferenceKind.classOrEnum].
-  void set kind(idl.ReferenceKind value) {
+  set kind(idl.ReferenceKind value) {
     this._kind = value;
   }
 
@@ -4433,7 +20098,7 @@
   /// If this [LinkedReference] doesn't have an associated [UnlinkedReference],
   /// name of the entity being referred to.  For the pseudo-type `dynamic`, the
   /// string is "dynamic".  For the pseudo-type `void`, the string is "void".
-  void set name(String value) {
+  set name(String value) {
     this._name = value;
   }
 
@@ -4443,7 +20108,7 @@
   /// If the entity being referred to is generic, the number of type parameters
   /// it declares (does not include type parameters of enclosing entities).
   /// Otherwise zero.
-  void set numTypeParameters(int value) {
+  set numTypeParameters(int value) {
     assert(value == null || value >= 0);
     this._numTypeParameters = value;
   }
@@ -4458,7 +20123,7 @@
   ///
   /// Zero if this entity is contained within another entity (e.g. a class
   /// member).
-  void set unit(int value) {
+  set unit(int value) {
     assert(value == null || value >= 0);
     this._unit = value;
   }
@@ -4477,14 +20142,10 @@
         _numTypeParameters = numTypeParameters,
         _unit = unit;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {}
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     signature.addInt(this._unit ?? 0);
     signature.addInt(this._dependency ?? 0);
@@ -4634,7 +20295,7 @@
 
   /// List of slot ids (referring to [UnlinkedExecutable.constCycleSlot])
   /// corresponding to const constructors that are part of cycles.
-  void set constCycles(List<int> value) {
+  set constCycles(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._constCycles = value;
   }
@@ -4645,7 +20306,7 @@
   /// List of slot ids (referring to [UnlinkedClass.notSimplyBoundedSlot] or
   /// [UnlinkedTypedef.notSimplyBoundedSlot]) corresponding to classes and
   /// typedefs that are not simply bounded.
-  void set notSimplyBounded(List<int> value) {
+  set notSimplyBounded(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._notSimplyBounded = value;
   }
@@ -4657,7 +20318,7 @@
   /// List of slot ids (referring to [UnlinkedParam.inheritsCovariantSlot] or
   /// [UnlinkedVariable.inheritsCovariantSlot]) corresponding to parameters
   /// that inherit `@covariant` behavior from a base class.
-  void set parametersInheritingCovariant(List<int> value) {
+  set parametersInheritingCovariant(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._parametersInheritingCovariant = value;
   }
@@ -4672,7 +20333,7 @@
   /// elements beyond the number of elements in [UnlinkedUnit.references], those
   /// additional elements are references that are only referred to implicitly
   /// (e.g. elements involved in inferred or propagated types).
-  void set references(List<LinkedReferenceBuilder> value) {
+  set references(List<LinkedReferenceBuilder> value) {
     this._references = value;
   }
 
@@ -4681,7 +20342,7 @@
       _topLevelInferenceErrors ??= <TopLevelInferenceErrorBuilder>[];
 
   /// The list of type inference errors.
-  void set topLevelInferenceErrors(List<TopLevelInferenceErrorBuilder> value) {
+  set topLevelInferenceErrors(List<TopLevelInferenceErrorBuilder> value) {
     this._topLevelInferenceErrors = value;
   }
 
@@ -4690,7 +20351,7 @@
 
   /// List associating slot ids found inside the unlinked summary for the
   /// compilation unit with propagated and inferred types.
-  void set types(List<EntityRefBuilder> value) {
+  set types(List<EntityRefBuilder> value) {
     this._types = value;
   }
 
@@ -4708,18 +20369,14 @@
         _topLevelInferenceErrors = topLevelInferenceErrors,
         _types = types;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {
     _references?.forEach((b) => b.flushInformative());
     _topLevelInferenceErrors?.forEach((b) => b.flushInformative());
     _types?.forEach((b) => b.flushInformative());
   }
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     if (this._references == null) {
       signature.addInt(0);
@@ -4951,7 +20608,7 @@
       _linkedLibraries ??= <LinkedLibraryBuilder>[];
 
   /// Linked libraries.
-  void set linkedLibraries(List<LinkedLibraryBuilder> value) {
+  set linkedLibraries(List<LinkedLibraryBuilder> value) {
     this._linkedLibraries = value;
   }
 
@@ -4960,7 +20617,7 @@
 
   /// The list of URIs of items in [linkedLibraries], e.g. `dart:core` or
   /// `package:foo/bar.dart`.
-  void set linkedLibraryUris(List<String> value) {
+  set linkedLibraryUris(List<String> value) {
     this._linkedLibraryUris = value;
   }
 
@@ -4969,7 +20626,7 @@
 
   /// Major version of the summary format.  See
   /// [PackageBundleAssembler.currentMajorVersion].
-  void set majorVersion(int value) {
+  set majorVersion(int value) {
     assert(value == null || value >= 0);
     this._majorVersion = value;
   }
@@ -4979,7 +20636,7 @@
 
   /// Minor version of the summary format.  See
   /// [PackageBundleAssembler.currentMinorVersion].
-  void set minorVersion(int value) {
+  set minorVersion(int value) {
     assert(value == null || value >= 0);
     this._minorVersion = value;
   }
@@ -4993,7 +20650,7 @@
       _unlinkedUnits ??= <UnlinkedUnitBuilder>[];
 
   /// Unlinked information for the compilation units constituting the package.
-  void set unlinkedUnits(List<UnlinkedUnitBuilder> value) {
+  set unlinkedUnits(List<UnlinkedUnitBuilder> value) {
     this._unlinkedUnits = value;
   }
 
@@ -5001,7 +20658,7 @@
   List<String> get unlinkedUnitUris => _unlinkedUnitUris ??= <String>[];
 
   /// The list of URIs of items in [unlinkedUnits], e.g. `dart:core/bool.dart`.
-  void set unlinkedUnitUris(List<String> value) {
+  set unlinkedUnitUris(List<String> value) {
     this._unlinkedUnitUris = value;
   }
 
@@ -5019,17 +20676,13 @@
         _unlinkedUnits = unlinkedUnits,
         _unlinkedUnitUris = unlinkedUnitUris;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {
     _linkedLibraries?.forEach((b) => b.flushInformative());
     _unlinkedUnits?.forEach((b) => b.flushInformative());
   }
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     if (this._linkedLibraries == null) {
       signature.addInt(0);
@@ -5251,7 +20904,7 @@
 
   /// Each item of this list corresponds to a unique referenced element.  It is
   /// the kind of the synthetic element.
-  void set elementKinds(List<idl.IndexSyntheticElementKind> value) {
+  set elementKinds(List<idl.IndexSyntheticElementKind> value) {
     this._elementKinds = value;
   }
 
@@ -5264,7 +20917,7 @@
   /// is a top-level element.  The list is sorted in ascending order, so that
   /// the client can quickly check whether an element is referenced in this
   /// [PackageIndex].
-  void set elementNameClassMemberIds(List<int> value) {
+  set elementNameClassMemberIds(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._elementNameClassMemberIds = value;
   }
@@ -5277,7 +20930,7 @@
   /// not a named parameter.  The list is sorted in ascending order, so that the
   /// client can quickly check whether an element is referenced in this
   /// [PackageIndex].
-  void set elementNameParameterIds(List<int> value) {
+  set elementNameParameterIds(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._elementNameParameterIds = value;
   }
@@ -5290,7 +20943,7 @@
   /// the identifier of the top-level element name, or `null` if the element is
   /// the unit.  The list is sorted in ascending order, so that the client can
   /// quickly check whether an element is referenced in this [PackageIndex].
-  void set elementNameUnitMemberIds(List<int> value) {
+  set elementNameUnitMemberIds(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._elementNameUnitMemberIds = value;
   }
@@ -5301,7 +20954,7 @@
   /// Each item of this list corresponds to a unique referenced element.  It is
   /// the index into [unitLibraryUris] and [unitUnitUris] for the library
   /// specific unit where the element is declared.
-  void set elementUnits(List<int> value) {
+  set elementUnits(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._elementUnits = value;
   }
@@ -5312,7 +20965,7 @@
   /// List of unique element strings used in this [PackageIndex].  The list is
   /// sorted in ascending order, so that the client can quickly check the
   /// presence of a string in this [PackageIndex].
-  void set strings(List<String> value) {
+  set strings(List<String> value) {
     this._strings = value;
   }
 
@@ -5322,7 +20975,7 @@
   /// Each item of this list corresponds to the library URI of a unique library
   /// specific unit referenced in the [PackageIndex].  It is an index into
   /// [strings] list.
-  void set unitLibraryUris(List<int> value) {
+  set unitLibraryUris(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._unitLibraryUris = value;
   }
@@ -5331,7 +20984,7 @@
   List<UnitIndexBuilder> get units => _units ??= <UnitIndexBuilder>[];
 
   /// List of indexes of each unit in this [PackageIndex].
-  void set units(List<UnitIndexBuilder> value) {
+  set units(List<UnitIndexBuilder> value) {
     this._units = value;
   }
 
@@ -5341,7 +20994,7 @@
   /// Each item of this list corresponds to the unit URI of a unique library
   /// specific unit referenced in the [PackageIndex].  It is an index into
   /// [strings] list.
-  void set unitUnitUris(List<int> value) {
+  set unitUnitUris(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._unitUnitUris = value;
   }
@@ -5366,16 +21019,12 @@
         _units = units,
         _unitUnitUris = unitUnitUris;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {
     _units?.forEach((b) => b.flushInformative());
   }
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     if (this._elementUnits == null) {
       signature.addInt(0);
@@ -5682,7 +21331,7 @@
   List<String> get arguments => _arguments ??= <String>[];
 
   /// The [kind] specific arguments.
-  void set arguments(List<String> value) {
+  set arguments(List<String> value) {
     this._arguments = value;
   }
 
@@ -5691,7 +21340,7 @@
       _kind ??= idl.TopLevelInferenceErrorKind.assignment;
 
   /// The kind of the error.
-  void set kind(idl.TopLevelInferenceErrorKind value) {
+  set kind(idl.TopLevelInferenceErrorKind value) {
     this._kind = value;
   }
 
@@ -5701,7 +21350,7 @@
   /// The slot id (which is unique within the compilation unit) identifying the
   /// target of type inference with which this [TopLevelInferenceError] is
   /// associated.
-  void set slot(int value) {
+  set slot(int value) {
     assert(value == null || value >= 0);
     this._slot = value;
   }
@@ -5712,14 +21361,10 @@
         _kind = kind,
         _slot = slot;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {}
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     signature.addInt(this._slot ?? 0);
     signature.addInt(this._kind == null ? 0 : this._kind.index);
@@ -5840,7 +21485,7 @@
       _definedNameKinds ??= <idl.IndexNameKind>[];
 
   /// Each item of this list is the kind of an element defined in this unit.
-  void set definedNameKinds(List<idl.IndexNameKind> value) {
+  set definedNameKinds(List<idl.IndexNameKind> value) {
     this._definedNameKinds = value;
   }
 
@@ -5849,7 +21494,7 @@
 
   /// Each item of this list is the name offset of an element defined in this
   /// unit relative to the beginning of the file.
-  void set definedNameOffsets(List<int> value) {
+  set definedNameOffsets(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._definedNameOffsets = value;
   }
@@ -5861,7 +21506,7 @@
   /// is an index into [PackageIndex.strings] list.  The list is sorted in
   /// ascending order, so that the client can quickly find name definitions in
   /// this [UnitIndex].
-  void set definedNames(List<int> value) {
+  set definedNames(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._definedNames = value;
   }
@@ -5871,7 +21516,7 @@
 
   /// Index into [PackageIndex.unitLibraryUris] and [PackageIndex.unitUnitUris]
   /// for the library specific unit that corresponds to this [UnitIndex].
-  void set unit(int value) {
+  set unit(int value) {
     assert(value == null || value >= 0);
     this._unit = value;
   }
@@ -5882,7 +21527,7 @@
 
   /// Each item of this list is the `true` if the corresponding element usage
   /// is qualified with some prefix.
-  void set usedElementIsQualifiedFlags(List<bool> value) {
+  set usedElementIsQualifiedFlags(List<bool> value) {
     this._usedElementIsQualifiedFlags = value;
   }
 
@@ -5891,7 +21536,7 @@
       _usedElementKinds ??= <idl.IndexRelationKind>[];
 
   /// Each item of this list is the kind of the element usage.
-  void set usedElementKinds(List<idl.IndexRelationKind> value) {
+  set usedElementKinds(List<idl.IndexRelationKind> value) {
     this._usedElementKinds = value;
   }
 
@@ -5899,7 +21544,7 @@
   List<int> get usedElementLengths => _usedElementLengths ??= <int>[];
 
   /// Each item of this list is the length of the element usage.
-  void set usedElementLengths(List<int> value) {
+  set usedElementLengths(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._usedElementLengths = value;
   }
@@ -5909,7 +21554,7 @@
 
   /// Each item of this list is the offset of the element usage relative to the
   /// beginning of the file.
-  void set usedElementOffsets(List<int> value) {
+  set usedElementOffsets(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._usedElementOffsets = value;
   }
@@ -5920,7 +21565,7 @@
   /// Each item of this list is the index into [PackageIndex.elementUnits] and
   /// [PackageIndex.elementOffsets].  The list is sorted in ascending order, so
   /// that the client can quickly find element references in this [UnitIndex].
-  void set usedElements(List<int> value) {
+  set usedElements(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._usedElements = value;
   }
@@ -5931,7 +21576,7 @@
 
   /// Each item of this list is the `true` if the corresponding name usage
   /// is qualified with some prefix.
-  void set usedNameIsQualifiedFlags(List<bool> value) {
+  set usedNameIsQualifiedFlags(List<bool> value) {
     this._usedNameIsQualifiedFlags = value;
   }
 
@@ -5940,7 +21585,7 @@
       _usedNameKinds ??= <idl.IndexRelationKind>[];
 
   /// Each item of this list is the kind of the name usage.
-  void set usedNameKinds(List<idl.IndexRelationKind> value) {
+  set usedNameKinds(List<idl.IndexRelationKind> value) {
     this._usedNameKinds = value;
   }
 
@@ -5949,7 +21594,7 @@
 
   /// Each item of this list is the offset of the name usage relative to the
   /// beginning of the file.
-  void set usedNameOffsets(List<int> value) {
+  set usedNameOffsets(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._usedNameOffsets = value;
   }
@@ -5960,7 +21605,7 @@
   /// Each item of this list is the index into [PackageIndex.strings] for a
   /// used name.  The list is sorted in ascending order, so that the client can
   /// quickly find name uses in this [UnitIndex].
-  void set usedNames(List<int> value) {
+  set usedNames(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._usedNames = value;
   }
@@ -5993,14 +21638,10 @@
         _usedNameOffsets = usedNameOffsets,
         _usedNames = usedNames;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {}
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     signature.addInt(this._unit ?? 0);
     if (this._usedElementLengths == null) {
@@ -6410,7 +22051,7 @@
       _annotations ??= <UnlinkedExprBuilder>[];
 
   /// Annotations for this class.
-  void set annotations(List<UnlinkedExprBuilder> value) {
+  set annotations(List<UnlinkedExprBuilder> value) {
     this._annotations = value;
   }
 
@@ -6418,7 +22059,7 @@
   CodeRangeBuilder get codeRange => _codeRange;
 
   /// Code range of the class.
-  void set codeRange(CodeRangeBuilder value) {
+  set codeRange(CodeRangeBuilder value) {
     this._codeRange = value;
   }
 
@@ -6428,7 +22069,7 @@
 
   /// Documentation comment for the class, or `null` if there is no
   /// documentation comment.
-  void set documentationComment(UnlinkedDocumentationCommentBuilder value) {
+  set documentationComment(UnlinkedDocumentationCommentBuilder value) {
     this._documentationComment = value;
   }
 
@@ -6437,7 +22078,7 @@
       _executables ??= <UnlinkedExecutableBuilder>[];
 
   /// Executable objects (methods, getters, and setters) contained in the class.
-  void set executables(List<UnlinkedExecutableBuilder> value) {
+  set executables(List<UnlinkedExecutableBuilder> value) {
     this._executables = value;
   }
 
@@ -6446,7 +22087,7 @@
       _fields ??= <UnlinkedVariableBuilder>[];
 
   /// Field declarations contained in the class.
-  void set fields(List<UnlinkedVariableBuilder> value) {
+  set fields(List<UnlinkedVariableBuilder> value) {
     this._fields = value;
   }
 
@@ -6455,7 +22096,7 @@
 
   /// Indicates whether this class is the core "Object" class (and hence has no
   /// supertype)
-  void set hasNoSupertype(bool value) {
+  set hasNoSupertype(bool value) {
     this._hasNoSupertype = value;
   }
 
@@ -6463,7 +22104,7 @@
   List<EntityRefBuilder> get interfaces => _interfaces ??= <EntityRefBuilder>[];
 
   /// Interfaces appearing in an `implements` clause, if any.
-  void set interfaces(List<EntityRefBuilder> value) {
+  set interfaces(List<EntityRefBuilder> value) {
     this._interfaces = value;
   }
 
@@ -6471,7 +22112,7 @@
   bool get isAbstract => _isAbstract ??= false;
 
   /// Indicates whether the class is declared with the `abstract` keyword.
-  void set isAbstract(bool value) {
+  set isAbstract(bool value) {
     this._isAbstract = value;
   }
 
@@ -6479,7 +22120,7 @@
   bool get isMixinApplication => _isMixinApplication ??= false;
 
   /// Indicates whether the class is declared using mixin application syntax.
-  void set isMixinApplication(bool value) {
+  set isMixinApplication(bool value) {
     this._isMixinApplication = value;
   }
 
@@ -6487,7 +22128,7 @@
   List<EntityRefBuilder> get mixins => _mixins ??= <EntityRefBuilder>[];
 
   /// Mixins appearing in a `with` clause, if any.
-  void set mixins(List<EntityRefBuilder> value) {
+  set mixins(List<EntityRefBuilder> value) {
     this._mixins = value;
   }
 
@@ -6495,7 +22136,7 @@
   String get name => _name ??= '';
 
   /// Name of the class.
-  void set name(String value) {
+  set name(String value) {
     this._name = value;
   }
 
@@ -6503,7 +22144,7 @@
   int get nameOffset => _nameOffset ??= 0;
 
   /// Offset of the class name relative to the beginning of the file.
-  void set nameOffset(int value) {
+  set nameOffset(int value) {
     assert(value == null || value >= 0);
     this._nameOffset = value;
   }
@@ -6518,7 +22159,7 @@
   /// type when specifying the bound of a type parameter.
   ///
   /// Otherwise, zero.
-  void set notSimplyBoundedSlot(int value) {
+  set notSimplyBoundedSlot(int value) {
     assert(value == null || value >= 0);
     this._notSimplyBoundedSlot = value;
   }
@@ -6530,7 +22171,7 @@
   /// Superclass constraints for this mixin declaration. The list will be empty
   /// if this class is not a mixin declaration, or if the declaration does not
   /// have an `on` clause (in which case the type `Object` is implied).
-  void set superclassConstraints(List<EntityRefBuilder> value) {
+  set superclassConstraints(List<EntityRefBuilder> value) {
     this._superclassConstraints = value;
   }
 
@@ -6540,7 +22181,7 @@
   /// Names of methods, getters, setters, and operators that this mixin
   /// declaration super-invokes.  For setters this includes the trailing "=".
   /// The list will be empty if this class is not a mixin declaration.
-  void set superInvokedNames(List<String> value) {
+  set superInvokedNames(List<String> value) {
     this._superInvokedNames = value;
   }
 
@@ -6550,7 +22191,7 @@
   /// Supertype of the class, or `null` if either (a) the class doesn't
   /// explicitly declare a supertype (and hence has supertype `Object`), or (b)
   /// the class *is* `Object` (and hence has no supertype).
-  void set supertype(EntityRefBuilder value) {
+  set supertype(EntityRefBuilder value) {
     this._supertype = value;
   }
 
@@ -6559,7 +22200,7 @@
       _typeParameters ??= <UnlinkedTypeParamBuilder>[];
 
   /// Type parameters of the class, if any.
-  void set typeParameters(List<UnlinkedTypeParamBuilder> value) {
+  set typeParameters(List<UnlinkedTypeParamBuilder> value) {
     this._typeParameters = value;
   }
 
@@ -6599,9 +22240,7 @@
         _supertype = supertype,
         _typeParameters = typeParameters;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {
     _annotations?.forEach((b) => b.flushInformative());
     _codeRange = null;
@@ -6616,9 +22255,7 @@
     _typeParameters?.forEach((b) => b.flushInformative());
   }
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     signature.addString(this._name ?? '');
     if (this._executables == null) {
@@ -7038,7 +22675,7 @@
 
   /// If this is a `show` combinator, offset of the end of the list of shown
   /// names.  Otherwise zero.
-  void set end(int value) {
+  set end(int value) {
     assert(value == null || value >= 0);
     this._end = value;
   }
@@ -7047,7 +22684,7 @@
   List<String> get hides => _hides ??= <String>[];
 
   /// List of names which are hidden.  Empty if this is a `show` combinator.
-  void set hides(List<String> value) {
+  set hides(List<String> value) {
     this._hides = value;
   }
 
@@ -7056,7 +22693,7 @@
 
   /// If this is a `show` combinator, offset of the `show` keyword.  Otherwise
   /// zero.
-  void set offset(int value) {
+  set offset(int value) {
     assert(value == null || value >= 0);
     this._offset = value;
   }
@@ -7065,7 +22702,7 @@
   List<String> get shows => _shows ??= <String>[];
 
   /// List of names which are shown.  Empty if this is a `hide` combinator.
-  void set shows(List<String> value) {
+  set shows(List<String> value) {
     this._shows = value;
   }
 
@@ -7076,17 +22713,13 @@
         _offset = offset,
         _shows = shows;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {
     _end = null;
     _offset = null;
   }
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     if (this._shows == null) {
       signature.addInt(0);
@@ -7218,7 +22851,7 @@
 
   /// The name of the declared variable whose value is being used in the
   /// condition.
-  void set name(String value) {
+  set name(String value) {
     this._name = value;
   }
 
@@ -7226,7 +22859,7 @@
   String get uri => _uri ??= '';
 
   /// The URI of the implementation library to be used if the condition is true.
-  void set uri(String value) {
+  set uri(String value) {
     this._uri = value;
   }
 
@@ -7235,7 +22868,7 @@
 
   /// The value to which the value of the declared variable will be compared,
   /// or `true` if the condition does not include an equality test.
-  void set value(String value) {
+  set value(String value) {
     this._value = value;
   }
 
@@ -7244,14 +22877,10 @@
         _uri = uri,
         _value = value;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {}
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     signature.addString(this._name ?? '');
     signature.addString(this._value ?? '');
@@ -7362,7 +22991,7 @@
   /// If there are `m` [arguments] and `n` [argumentNames], then each argument
   /// from [arguments] with index `i` such that `n + i - m >= 0`, should be used
   /// with the name at `n + i - m`.
-  void set argumentNames(List<String> value) {
+  set argumentNames(List<String> value) {
     this._argumentNames = value;
   }
 
@@ -7372,7 +23001,7 @@
 
   /// If [kind] is `thisInvocation` or `superInvocation`, the arguments of the
   /// invocation.  Otherwise empty.
-  void set arguments(List<UnlinkedExprBuilder> value) {
+  set arguments(List<UnlinkedExprBuilder> value) {
     this._arguments = value;
   }
 
@@ -7381,7 +23010,7 @@
 
   /// If [kind] is `field`, the expression of the field initializer.
   /// Otherwise `null`.
-  void set expression(UnlinkedExprBuilder value) {
+  set expression(UnlinkedExprBuilder value) {
     this._expression = value;
   }
 
@@ -7390,7 +23019,7 @@
       _kind ??= idl.UnlinkedConstructorInitializerKind.field;
 
   /// The kind of the constructor initializer (field, redirect, super).
-  void set kind(idl.UnlinkedConstructorInitializerKind value) {
+  set kind(idl.UnlinkedConstructorInitializerKind value) {
     this._kind = value;
   }
 
@@ -7401,7 +23030,7 @@
   /// [kind] is `thisInvocation`, the name of the constructor, declared in this
   /// class, to redirect to.  If [kind] is `superInvocation`, the name of the
   /// constructor, declared in the superclass, to invoke.
-  void set name(String value) {
+  set name(String value) {
     this._name = value;
   }
 
@@ -7417,17 +23046,13 @@
         _kind = kind,
         _name = name;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {
     _arguments?.forEach((b) => b.flushInformative());
     _expression?.flushInformative();
   }
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     signature.addString(this._name ?? '');
     signature.addBool(this._expression != null);
@@ -7600,20 +23225,16 @@
   ///
   /// References appearing within the doc comment in square brackets are not
   /// specially encoded.
-  void set text(String value) {
+  set text(String value) {
     this._text = value;
   }
 
   UnlinkedDocumentationCommentBuilder({String text}) : _text = text;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {}
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     signature.addString(this._text ?? '');
   }
@@ -7699,7 +23320,7 @@
       _annotations ??= <UnlinkedExprBuilder>[];
 
   /// Annotations for this enum.
-  void set annotations(List<UnlinkedExprBuilder> value) {
+  set annotations(List<UnlinkedExprBuilder> value) {
     this._annotations = value;
   }
 
@@ -7707,7 +23328,7 @@
   CodeRangeBuilder get codeRange => _codeRange;
 
   /// Code range of the enum.
-  void set codeRange(CodeRangeBuilder value) {
+  set codeRange(CodeRangeBuilder value) {
     this._codeRange = value;
   }
 
@@ -7717,7 +23338,7 @@
 
   /// Documentation comment for the enum, or `null` if there is no documentation
   /// comment.
-  void set documentationComment(UnlinkedDocumentationCommentBuilder value) {
+  set documentationComment(UnlinkedDocumentationCommentBuilder value) {
     this._documentationComment = value;
   }
 
@@ -7725,7 +23346,7 @@
   String get name => _name ??= '';
 
   /// Name of the enum type.
-  void set name(String value) {
+  set name(String value) {
     this._name = value;
   }
 
@@ -7733,7 +23354,7 @@
   int get nameOffset => _nameOffset ??= 0;
 
   /// Offset of the enum name relative to the beginning of the file.
-  void set nameOffset(int value) {
+  set nameOffset(int value) {
     assert(value == null || value >= 0);
     this._nameOffset = value;
   }
@@ -7743,7 +23364,7 @@
       _values ??= <UnlinkedEnumValueBuilder>[];
 
   /// Values listed in the enum declaration, in declaration order.
-  void set values(List<UnlinkedEnumValueBuilder> value) {
+  set values(List<UnlinkedEnumValueBuilder> value) {
     this._values = value;
   }
 
@@ -7761,9 +23382,7 @@
         _nameOffset = nameOffset,
         _values = values;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {
     _annotations?.forEach((b) => b.flushInformative());
     _codeRange = null;
@@ -7772,9 +23391,7 @@
     _values?.forEach((b) => b.flushInformative());
   }
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     signature.addString(this._name ?? '');
     if (this._values == null) {
@@ -7950,7 +23567,7 @@
       _annotations ??= <UnlinkedExprBuilder>[];
 
   /// Annotations for this value.
-  void set annotations(List<UnlinkedExprBuilder> value) {
+  set annotations(List<UnlinkedExprBuilder> value) {
     this._annotations = value;
   }
 
@@ -7960,7 +23577,7 @@
 
   /// Documentation comment for the enum value, or `null` if there is no
   /// documentation comment.
-  void set documentationComment(UnlinkedDocumentationCommentBuilder value) {
+  set documentationComment(UnlinkedDocumentationCommentBuilder value) {
     this._documentationComment = value;
   }
 
@@ -7968,7 +23585,7 @@
   String get name => _name ??= '';
 
   /// Name of the enumerated value.
-  void set name(String value) {
+  set name(String value) {
     this._name = value;
   }
 
@@ -7976,7 +23593,7 @@
   int get nameOffset => _nameOffset ??= 0;
 
   /// Offset of the enum value name relative to the beginning of the file.
-  void set nameOffset(int value) {
+  set nameOffset(int value) {
     assert(value == null || value >= 0);
     this._nameOffset = value;
   }
@@ -7991,18 +23608,14 @@
         _name = name,
         _nameOffset = nameOffset;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {
     _annotations?.forEach((b) => b.flushInformative());
     _documentationComment = null;
     _nameOffset = null;
   }
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     signature.addString(this._name ?? '');
     if (this._annotations == null) {
@@ -8158,7 +23771,7 @@
       _annotations ??= <UnlinkedExprBuilder>[];
 
   /// Annotations for this executable.
-  void set annotations(List<UnlinkedExprBuilder> value) {
+  set annotations(List<UnlinkedExprBuilder> value) {
     this._annotations = value;
   }
 
@@ -8168,7 +23781,7 @@
   /// If this executable's function body is declared using `=>`, the expression
   /// to the right of the `=>`.  May be omitted if neither type inference nor
   /// constant evaluation depends on the function body.
-  void set bodyExpr(UnlinkedExprBuilder value) {
+  set bodyExpr(UnlinkedExprBuilder value) {
     this._bodyExpr = value;
   }
 
@@ -8176,7 +23789,7 @@
   CodeRangeBuilder get codeRange => _codeRange;
 
   /// Code range of the executable.
-  void set codeRange(CodeRangeBuilder value) {
+  set codeRange(CodeRangeBuilder value) {
     this._codeRange = value;
   }
 
@@ -8186,8 +23799,7 @@
 
   /// If a constant [UnlinkedExecutableKind.constructor], the constructor
   /// initializers.  Otherwise empty.
-  void set constantInitializers(
-      List<UnlinkedConstructorInitializerBuilder> value) {
+  set constantInitializers(List<UnlinkedConstructorInitializerBuilder> value) {
     this._constantInitializers = value;
   }
 
@@ -8200,7 +23812,7 @@
   /// a cycle.
   ///
   /// Otherwise, zero.
-  void set constCycleSlot(int value) {
+  set constCycleSlot(int value) {
     assert(value == null || value >= 0);
     this._constCycleSlot = value;
   }
@@ -8211,7 +23823,7 @@
 
   /// Documentation comment for the executable, or `null` if there is no
   /// documentation comment.
-  void set documentationComment(UnlinkedDocumentationCommentBuilder value) {
+  set documentationComment(UnlinkedDocumentationCommentBuilder value) {
     this._documentationComment = value;
   }
 
@@ -8223,7 +23835,7 @@
   /// return type.  If there is no matching entry in [LinkedUnit.types], then
   /// no return type was inferred for this variable, so its static type is
   /// `dynamic`.
-  void set inferredReturnTypeSlot(int value) {
+  set inferredReturnTypeSlot(int value) {
     assert(value == null || value >= 0);
     this._inferredReturnTypeSlot = value;
   }
@@ -8232,7 +23844,7 @@
   bool get isAbstract => _isAbstract ??= false;
 
   /// Indicates whether the executable is declared using the `abstract` keyword.
-  void set isAbstract(bool value) {
+  set isAbstract(bool value) {
     this._isAbstract = value;
   }
 
@@ -8240,7 +23852,7 @@
   bool get isAsynchronous => _isAsynchronous ??= false;
 
   /// Indicates whether the executable has body marked as being asynchronous.
-  void set isAsynchronous(bool value) {
+  set isAsynchronous(bool value) {
     this._isAsynchronous = value;
   }
 
@@ -8248,7 +23860,7 @@
   bool get isConst => _isConst ??= false;
 
   /// Indicates whether the executable is declared using the `const` keyword.
-  void set isConst(bool value) {
+  set isConst(bool value) {
     this._isConst = value;
   }
 
@@ -8256,7 +23868,7 @@
   bool get isExternal => _isExternal ??= false;
 
   /// Indicates whether the executable is declared using the `external` keyword.
-  void set isExternal(bool value) {
+  set isExternal(bool value) {
     this._isExternal = value;
   }
 
@@ -8264,7 +23876,7 @@
   bool get isFactory => _isFactory ??= false;
 
   /// Indicates whether the executable is declared using the `factory` keyword.
-  void set isFactory(bool value) {
+  set isFactory(bool value) {
     this._isFactory = value;
   }
 
@@ -8272,7 +23884,7 @@
   bool get isGenerator => _isGenerator ??= false;
 
   /// Indicates whether the executable has body marked as being a generator.
-  void set isGenerator(bool value) {
+  set isGenerator(bool value) {
     this._isGenerator = value;
   }
 
@@ -8280,7 +23892,7 @@
   bool get isRedirectedConstructor => _isRedirectedConstructor ??= false;
 
   /// Indicates whether the executable is a redirected constructor.
-  void set isRedirectedConstructor(bool value) {
+  set isRedirectedConstructor(bool value) {
     this._isRedirectedConstructor = value;
   }
 
@@ -8292,7 +23904,7 @@
   /// Note that for top level executables, this flag is false, since they are
   /// not declared using the `static` keyword (even though they are considered
   /// static for semantic purposes).
-  void set isStatic(bool value) {
+  set isStatic(bool value) {
     this._isStatic = value;
   }
 
@@ -8302,7 +23914,7 @@
 
   /// The kind of the executable (function/method, getter, setter, or
   /// constructor).
-  void set kind(idl.UnlinkedExecutableKind value) {
+  set kind(idl.UnlinkedExecutableKind value) {
     this._kind = value;
   }
 
@@ -8311,7 +23923,7 @@
       _localFunctions ??= <UnlinkedExecutableBuilder>[];
 
   /// The list of local functions.
-  void set localFunctions(List<UnlinkedExecutableBuilder> value) {
+  set localFunctions(List<UnlinkedExecutableBuilder> value) {
     this._localFunctions = value;
   }
 
@@ -8329,7 +23941,7 @@
   /// Name of the executable.  For setters, this includes the trailing "=".  For
   /// named constructors, this excludes the class name and excludes the ".".
   /// For unnamed constructors, this is the empty string.
-  void set name(String value) {
+  set name(String value) {
     this._name = value;
   }
 
@@ -8338,7 +23950,7 @@
 
   /// If [kind] is [UnlinkedExecutableKind.constructor] and [name] is not empty,
   /// the offset of the end of the constructor name.  Otherwise zero.
-  void set nameEnd(int value) {
+  set nameEnd(int value) {
     assert(value == null || value >= 0);
     this._nameEnd = value;
   }
@@ -8350,7 +23962,7 @@
   /// named constructors, this excludes the class name and excludes the ".".
   /// For unnamed constructors, this is the offset of the class name (i.e. the
   /// offset of the second "C" in "class C { C(); }").
-  void set nameOffset(int value) {
+  set nameOffset(int value) {
     assert(value == null || value >= 0);
     this._nameOffset = value;
   }
@@ -8362,7 +23974,7 @@
   /// Parameters of the executable, if any.  Note that getters have no
   /// parameters (hence this will be the empty list), and setters have a single
   /// parameter.
-  void set parameters(List<UnlinkedParamBuilder> value) {
+  set parameters(List<UnlinkedParamBuilder> value) {
     this._parameters = value;
   }
 
@@ -8371,7 +23983,7 @@
 
   /// If [kind] is [UnlinkedExecutableKind.constructor] and [name] is not empty,
   /// the offset of the period before the constructor name.  Otherwise zero.
-  void set periodOffset(int value) {
+  set periodOffset(int value) {
     assert(value == null || value >= 0);
     this._periodOffset = value;
   }
@@ -8381,7 +23993,7 @@
 
   /// If [isRedirectedConstructor] and [isFactory] are both `true`, the
   /// constructor to which this constructor redirects; otherwise empty.
-  void set redirectedConstructor(EntityRefBuilder value) {
+  set redirectedConstructor(EntityRefBuilder value) {
     this._redirectedConstructor = value;
   }
 
@@ -8391,7 +24003,7 @@
   /// If [isRedirectedConstructor] is `true` and [isFactory] is `false`, the
   /// name of the constructor that this constructor redirects to; otherwise
   /// empty.
-  void set redirectedConstructorName(String value) {
+  set redirectedConstructorName(String value) {
     this._redirectedConstructorName = value;
   }
 
@@ -8403,7 +24015,7 @@
   /// associated with variable initializers and closures, since these
   /// executables may have return types that are not accessible via direct
   /// imports.
-  void set returnType(EntityRefBuilder value) {
+  set returnType(EntityRefBuilder value) {
     this._returnType = value;
   }
 
@@ -8413,7 +24025,7 @@
 
   /// Type parameters of the executable, if any.  Empty if support for generic
   /// method syntax is disabled.
-  void set typeParameters(List<UnlinkedTypeParamBuilder> value) {
+  set typeParameters(List<UnlinkedTypeParamBuilder> value) {
     this._typeParameters = value;
   }
 
@@ -8421,7 +24033,7 @@
   int get visibleLength => _visibleLength ??= 0;
 
   /// If a local function, the length of the visible range; zero otherwise.
-  void set visibleLength(int value) {
+  set visibleLength(int value) {
     assert(value == null || value >= 0);
     this._visibleLength = value;
   }
@@ -8430,7 +24042,7 @@
   int get visibleOffset => _visibleOffset ??= 0;
 
   /// If a local function, the beginning of the visible range; zero otherwise.
-  void set visibleOffset(int value) {
+  set visibleOffset(int value) {
     assert(value == null || value >= 0);
     this._visibleOffset = value;
   }
@@ -8493,9 +24105,7 @@
         _visibleLength = visibleLength,
         _visibleOffset = visibleOffset;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {
     _annotations?.forEach((b) => b.flushInformative());
     _bodyExpr?.flushInformative();
@@ -8516,9 +24126,7 @@
     _visibleOffset = null;
   }
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     signature.addString(this._name ?? '');
     if (this._parameters == null) {
@@ -9067,7 +24675,7 @@
       _annotations ??= <UnlinkedExprBuilder>[];
 
   /// Annotations for this export directive.
-  void set annotations(List<UnlinkedExprBuilder> value) {
+  set annotations(List<UnlinkedExprBuilder> value) {
     this._annotations = value;
   }
 
@@ -9075,7 +24683,7 @@
   int get offset => _offset ??= 0;
 
   /// Offset of the "export" keyword.
-  void set offset(int value) {
+  set offset(int value) {
     assert(value == null || value >= 0);
     this._offset = value;
   }
@@ -9085,7 +24693,7 @@
 
   /// End of the URI string (including quotes) relative to the beginning of the
   /// file.
-  void set uriEnd(int value) {
+  set uriEnd(int value) {
     assert(value == null || value >= 0);
     this._uriEnd = value;
   }
@@ -9095,7 +24703,7 @@
 
   /// Offset of the URI string (including quotes) relative to the beginning of
   /// the file.
-  void set uriOffset(int value) {
+  set uriOffset(int value) {
     assert(value == null || value >= 0);
     this._uriOffset = value;
   }
@@ -9110,9 +24718,7 @@
         _uriEnd = uriEnd,
         _uriOffset = uriOffset;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {
     _annotations?.forEach((b) => b.flushInformative());
     _offset = null;
@@ -9120,9 +24726,7 @@
     _uriOffset = null;
   }
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     if (this._annotations == null) {
       signature.addInt(0);
@@ -9244,7 +24848,7 @@
       _combinators ??= <UnlinkedCombinatorBuilder>[];
 
   /// Combinators contained in this export declaration.
-  void set combinators(List<UnlinkedCombinatorBuilder> value) {
+  set combinators(List<UnlinkedCombinatorBuilder> value) {
     this._combinators = value;
   }
 
@@ -9254,7 +24858,7 @@
 
   /// Configurations used to control which library will actually be loaded at
   /// run-time.
-  void set configurations(List<UnlinkedConfigurationBuilder> value) {
+  set configurations(List<UnlinkedConfigurationBuilder> value) {
     this._configurations = value;
   }
 
@@ -9262,7 +24866,7 @@
   String get uri => _uri ??= '';
 
   /// URI used in the source code to reference the exported library.
-  void set uri(String value) {
+  set uri(String value) {
     this._uri = value;
   }
 
@@ -9274,17 +24878,13 @@
         _configurations = configurations,
         _uri = uri;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {
     _combinators?.forEach((b) => b.flushInformative());
     _configurations?.forEach((b) => b.flushInformative());
   }
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     signature.addString(this._uri ?? '');
     if (this._combinators == null) {
@@ -9420,7 +25020,7 @@
       _assignmentOperators ??= <idl.UnlinkedExprAssignOperator>[];
 
   /// Sequence of operators used by assignment operations.
-  void set assignmentOperators(List<idl.UnlinkedExprAssignOperator> value) {
+  set assignmentOperators(List<idl.UnlinkedExprAssignOperator> value) {
     this._assignmentOperators = value;
   }
 
@@ -9428,7 +25028,7 @@
   List<double> get doubles => _doubles ??= <double>[];
 
   /// Sequence of 64-bit doubles consumed by the operation `pushDouble`.
-  void set doubles(List<double> value) {
+  set doubles(List<double> value) {
     this._doubles = value;
   }
 
@@ -9438,7 +25038,7 @@
   /// Sequence of unsigned 32-bit integers consumed by the operations
   /// `pushArgument`, `pushInt`, `shiftOr`, `concatenate`, `invokeConstructor`,
   /// `makeList`, and `makeMap`.
-  void set ints(List<int> value) {
+  set ints(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._ints = value;
   }
@@ -9448,7 +25048,7 @@
 
   /// Indicates whether the expression is a valid potentially constant
   /// expression.
-  void set isValidConst(bool value) {
+  set isValidConst(bool value) {
     this._isValidConst = value;
   }
 
@@ -9458,7 +25058,7 @@
 
   /// Sequence of operations to execute (starting with an empty stack) to form
   /// the constant value.
-  void set operations(List<idl.UnlinkedExprOperation> value) {
+  set operations(List<idl.UnlinkedExprOperation> value) {
     this._operations = value;
   }
 
@@ -9469,7 +25069,7 @@
   /// `pushReference`, `invokeConstructor`, `makeList`, and `makeMap`.  Note
   /// that in the case of `pushReference` (and sometimes `invokeConstructor` the
   /// actual entity being referred to may be something other than a type.
-  void set references(List<EntityRefBuilder> value) {
+  set references(List<EntityRefBuilder> value) {
     this._references = value;
   }
 
@@ -9478,7 +25078,7 @@
 
   /// String representation of the expression in a form suitable to be tokenized
   /// and parsed.
-  void set sourceRepresentation(String value) {
+  set sourceRepresentation(String value) {
     this._sourceRepresentation = value;
   }
 
@@ -9487,7 +25087,7 @@
 
   /// Sequence of strings consumed by the operations `pushString` and
   /// `invokeConstructor`.
-  void set strings(List<String> value) {
+  set strings(List<String> value) {
     this._strings = value;
   }
 
@@ -9509,16 +25109,12 @@
         _sourceRepresentation = sourceRepresentation,
         _strings = strings;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {
     _references?.forEach((b) => b.flushInformative());
   }
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     if (this._operations == null) {
       signature.addInt(0);
@@ -9782,7 +25378,7 @@
       _annotations ??= <UnlinkedExprBuilder>[];
 
   /// Annotations for this import declaration.
-  void set annotations(List<UnlinkedExprBuilder> value) {
+  set annotations(List<UnlinkedExprBuilder> value) {
     this._annotations = value;
   }
 
@@ -9791,7 +25387,7 @@
       _combinators ??= <UnlinkedCombinatorBuilder>[];
 
   /// Combinators contained in this import declaration.
-  void set combinators(List<UnlinkedCombinatorBuilder> value) {
+  set combinators(List<UnlinkedCombinatorBuilder> value) {
     this._combinators = value;
   }
 
@@ -9801,7 +25397,7 @@
 
   /// Configurations used to control which library will actually be loaded at
   /// run-time.
-  void set configurations(List<UnlinkedConfigurationBuilder> value) {
+  set configurations(List<UnlinkedConfigurationBuilder> value) {
     this._configurations = value;
   }
 
@@ -9809,7 +25405,7 @@
   bool get isDeferred => _isDeferred ??= false;
 
   /// Indicates whether the import declaration uses the `deferred` keyword.
-  void set isDeferred(bool value) {
+  set isDeferred(bool value) {
     this._isDeferred = value;
   }
 
@@ -9817,7 +25413,7 @@
   bool get isImplicit => _isImplicit ??= false;
 
   /// Indicates whether the import declaration is implicit.
-  void set isImplicit(bool value) {
+  set isImplicit(bool value) {
     this._isImplicit = value;
   }
 
@@ -9826,7 +25422,7 @@
 
   /// If [isImplicit] is false, offset of the "import" keyword.  If [isImplicit]
   /// is true, zero.
-  void set offset(int value) {
+  set offset(int value) {
     assert(value == null || value >= 0);
     this._offset = value;
   }
@@ -9836,7 +25432,7 @@
 
   /// Offset of the prefix name relative to the beginning of the file, or zero
   /// if there is no prefix.
-  void set prefixOffset(int value) {
+  set prefixOffset(int value) {
     assert(value == null || value >= 0);
     this._prefixOffset = value;
   }
@@ -9848,7 +25444,7 @@
   /// import declaration, or zero if this import declaration declares no prefix.
   ///
   /// Note that multiple imports can declare the same prefix.
-  void set prefixReference(int value) {
+  set prefixReference(int value) {
     assert(value == null || value >= 0);
     this._prefixReference = value;
   }
@@ -9857,7 +25453,7 @@
   String get uri => _uri ??= '';
 
   /// URI used in the source code to reference the imported library.
-  void set uri(String value) {
+  set uri(String value) {
     this._uri = value;
   }
 
@@ -9866,7 +25462,7 @@
 
   /// End of the URI string (including quotes) relative to the beginning of the
   /// file.  If [isImplicit] is true, zero.
-  void set uriEnd(int value) {
+  set uriEnd(int value) {
     assert(value == null || value >= 0);
     this._uriEnd = value;
   }
@@ -9876,7 +25472,7 @@
 
   /// Offset of the URI string (including quotes) relative to the beginning of
   /// the file.  If [isImplicit] is true, zero.
-  void set uriOffset(int value) {
+  set uriOffset(int value) {
     assert(value == null || value >= 0);
     this._uriOffset = value;
   }
@@ -9905,9 +25501,7 @@
         _uriEnd = uriEnd,
         _uriOffset = uriOffset;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {
     _annotations?.forEach((b) => b.flushInformative());
     _combinators?.forEach((b) => b.flushInformative());
@@ -9918,9 +25512,7 @@
     _uriOffset = null;
   }
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     signature.addString(this._uri ?? '');
     if (this._combinators == null) {
@@ -10181,7 +25773,7 @@
       _annotations ??= <UnlinkedExprBuilder>[];
 
   /// Annotations for this parameter.
-  void set annotations(List<UnlinkedExprBuilder> value) {
+  set annotations(List<UnlinkedExprBuilder> value) {
     this._annotations = value;
   }
 
@@ -10189,7 +25781,7 @@
   CodeRangeBuilder get codeRange => _codeRange;
 
   /// Code range of the parameter.
-  void set codeRange(CodeRangeBuilder value) {
+  set codeRange(CodeRangeBuilder value) {
     this._codeRange = value;
   }
 
@@ -10198,7 +25790,7 @@
 
   /// If the parameter has a default value, the source text of the constant
   /// expression in the default value.  Otherwise the empty string.
-  void set defaultValueCode(String value) {
+  set defaultValueCode(String value) {
     this._defaultValueCode = value;
   }
 
@@ -10214,7 +25806,7 @@
   /// inferable, they are not marked as such in the summary; if their type is
   /// not specified, they always inherit the static type of the corresponding
   /// field.
-  void set inferredTypeSlot(int value) {
+  set inferredTypeSlot(int value) {
     assert(value == null || value >= 0);
     this._inferredTypeSlot = value;
   }
@@ -10228,7 +25820,7 @@
   /// `@covariant` behavior from a base class.
   ///
   /// Otherwise, zero.
-  void set inheritsCovariantSlot(int value) {
+  set inheritsCovariantSlot(int value) {
     assert(value == null || value >= 0);
     this._inheritsCovariantSlot = value;
   }
@@ -10238,7 +25830,7 @@
 
   /// The synthetic initializer function of the parameter.  Absent if the
   /// variable does not have an initializer.
-  void set initializer(UnlinkedExecutableBuilder value) {
+  set initializer(UnlinkedExecutableBuilder value) {
     this._initializer = value;
   }
 
@@ -10246,7 +25838,7 @@
   bool get isExplicitlyCovariant => _isExplicitlyCovariant ??= false;
 
   /// Indicates whether this parameter is explicitly marked as being covariant.
-  void set isExplicitlyCovariant(bool value) {
+  set isExplicitlyCovariant(bool value) {
     this._isExplicitlyCovariant = value;
   }
 
@@ -10254,7 +25846,7 @@
   bool get isFinal => _isFinal ??= false;
 
   /// Indicates whether the parameter is declared using the `final` keyword.
-  void set isFinal(bool value) {
+  set isFinal(bool value) {
     this._isFinal = value;
   }
 
@@ -10269,7 +25861,7 @@
   /// ```
   /// but is not function-typed if it does not, even if the type of the
   /// parameter is a function type.
-  void set isFunctionTyped(bool value) {
+  set isFunctionTyped(bool value) {
     this._isFunctionTyped = value;
   }
 
@@ -10278,7 +25870,7 @@
 
   /// Indicates whether this is an initializing formal parameter (i.e. it is
   /// declared using `this.` syntax).
-  void set isInitializingFormal(bool value) {
+  set isInitializingFormal(bool value) {
     this._isInitializingFormal = value;
   }
 
@@ -10286,7 +25878,7 @@
   idl.UnlinkedParamKind get kind => _kind ??= idl.UnlinkedParamKind.required;
 
   /// Kind of the parameter.
-  void set kind(idl.UnlinkedParamKind value) {
+  set kind(idl.UnlinkedParamKind value) {
     this._kind = value;
   }
 
@@ -10294,7 +25886,7 @@
   String get name => _name ??= '';
 
   /// Name of the parameter.
-  void set name(String value) {
+  set name(String value) {
     this._name = value;
   }
 
@@ -10302,7 +25894,7 @@
   int get nameOffset => _nameOffset ??= 0;
 
   /// Offset of the parameter name relative to the beginning of the file.
-  void set nameOffset(int value) {
+  set nameOffset(int value) {
     assert(value == null || value >= 0);
     this._nameOffset = value;
   }
@@ -10312,7 +25904,7 @@
       _parameters ??= <UnlinkedParamBuilder>[];
 
   /// If [isFunctionTyped] is `true`, the parameters of the function type.
-  void set parameters(List<UnlinkedParamBuilder> value) {
+  set parameters(List<UnlinkedParamBuilder> value) {
     this._parameters = value;
   }
 
@@ -10322,7 +25914,7 @@
   /// If [isFunctionTyped] is `true`, the declared return type.  If
   /// [isFunctionTyped] is `false`, the declared type.  Absent if the type is
   /// implicit.
-  void set type(EntityRefBuilder value) {
+  set type(EntityRefBuilder value) {
     this._type = value;
   }
 
@@ -10330,7 +25922,7 @@
   int get visibleLength => _visibleLength ??= 0;
 
   /// The length of the visible range.
-  void set visibleLength(int value) {
+  set visibleLength(int value) {
     assert(value == null || value >= 0);
     this._visibleLength = value;
   }
@@ -10339,7 +25931,7 @@
   int get visibleOffset => _visibleOffset ??= 0;
 
   /// The beginning of the visible range.
-  void set visibleOffset(int value) {
+  set visibleOffset(int value) {
     assert(value == null || value >= 0);
     this._visibleOffset = value;
   }
@@ -10380,9 +25972,7 @@
         _visibleLength = visibleLength,
         _visibleOffset = visibleOffset;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {
     _annotations?.forEach((b) => b.flushInformative());
     _codeRange = null;
@@ -10395,9 +25985,7 @@
     _visibleOffset = null;
   }
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     signature.addString(this._name ?? '');
     signature.addInt(this._inferredTypeSlot ?? 0);
@@ -10734,7 +26322,7 @@
       _annotations ??= <UnlinkedExprBuilder>[];
 
   /// Annotations for this part declaration.
-  void set annotations(List<UnlinkedExprBuilder> value) {
+  set annotations(List<UnlinkedExprBuilder> value) {
     this._annotations = value;
   }
 
@@ -10743,7 +26331,7 @@
 
   /// End of the URI string (including quotes) relative to the beginning of the
   /// file.
-  void set uriEnd(int value) {
+  set uriEnd(int value) {
     assert(value == null || value >= 0);
     this._uriEnd = value;
   }
@@ -10753,7 +26341,7 @@
 
   /// Offset of the URI string (including quotes) relative to the beginning of
   /// the file.
-  void set uriOffset(int value) {
+  set uriOffset(int value) {
     assert(value == null || value >= 0);
     this._uriOffset = value;
   }
@@ -10764,18 +26352,14 @@
         _uriEnd = uriEnd,
         _uriOffset = uriOffset;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {
     _annotations?.forEach((b) => b.flushInformative());
     _uriEnd = null;
     _uriOffset = null;
   }
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     if (this._annotations == null) {
       signature.addInt(0);
@@ -10883,7 +26467,7 @@
   idl.ReferenceKind get kind => _kind ??= idl.ReferenceKind.classOrEnum;
 
   /// The kind of object referred to by the name.
-  void set kind(idl.ReferenceKind value) {
+  set kind(idl.ReferenceKind value) {
     this._kind = value;
   }
 
@@ -10897,7 +26481,7 @@
   ///
   /// Unnamed constructors are not included since they do not constitute a
   /// separate name added to any namespace.
-  void set members(List<UnlinkedPublicNameBuilder> value) {
+  set members(List<UnlinkedPublicNameBuilder> value) {
     this._members = value;
   }
 
@@ -10905,7 +26489,7 @@
   String get name => _name ??= '';
 
   /// The name itself.
-  void set name(String value) {
+  set name(String value) {
     this._name = value;
   }
 
@@ -10914,7 +26498,7 @@
 
   /// If the entity being referred to is generic, the number of type parameters
   /// it accepts.  Otherwise zero.
-  void set numTypeParameters(int value) {
+  set numTypeParameters(int value) {
     assert(value == null || value >= 0);
     this._numTypeParameters = value;
   }
@@ -10929,16 +26513,12 @@
         _name = name,
         _numTypeParameters = numTypeParameters;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {
     _members?.forEach((b) => b.flushInformative());
   }
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     signature.addString(this._name ?? '');
     signature.addInt(this._kind == null ? 0 : this._kind.index);
@@ -11069,7 +26649,7 @@
       _exports ??= <UnlinkedExportPublicBuilder>[];
 
   /// Export declarations in the compilation unit.
-  void set exports(List<UnlinkedExportPublicBuilder> value) {
+  set exports(List<UnlinkedExportPublicBuilder> value) {
     this._exports = value;
   }
 
@@ -11081,7 +26661,7 @@
   ///
   /// TODO(paulberry): consider sorting these names to reduce unnecessary
   /// relinking.
-  void set names(List<UnlinkedPublicNameBuilder> value) {
+  set names(List<UnlinkedPublicNameBuilder> value) {
     this._names = value;
   }
 
@@ -11089,7 +26669,7 @@
   List<String> get parts => _parts ??= <String>[];
 
   /// URIs referenced by part declarations in the compilation unit.
-  void set parts(List<String> value) {
+  set parts(List<String> value) {
     this._parts = value;
   }
 
@@ -11101,17 +26681,13 @@
         _names = names,
         _parts = parts;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {
     _exports?.forEach((b) => b.flushInformative());
     _names?.forEach((b) => b.flushInformative());
   }
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     if (this._names == null) {
       signature.addInt(0);
@@ -11260,7 +26836,7 @@
   /// Name of the entity being referred to.  For the pseudo-type `dynamic`, the
   /// string is "dynamic".  For the pseudo-type `void`, the string is "void".
   /// For the pseudo-type `bottom`, the string is "*bottom*".
-  void set name(String value) {
+  set name(String value) {
     this._name = value;
   }
 
@@ -11273,7 +26849,7 @@
   /// Prefix references must always point backward; that is, for all i, if
   /// UnlinkedUnit.references[i].prefixReference != 0, then
   /// UnlinkedUnit.references[i].prefixReference < i.
-  void set prefixReference(int value) {
+  set prefixReference(int value) {
     assert(value == null || value >= 0);
     this._prefixReference = value;
   }
@@ -11282,14 +26858,10 @@
       : _name = name,
         _prefixReference = prefixReference;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {}
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     signature.addString(this._name ?? '');
     signature.addInt(this._prefixReference ?? 0);
@@ -11363,6 +26935,399 @@
   String toString() => convert.json.encode(toJson());
 }
 
+class UnlinkedTokensBuilder extends Object
+    with _UnlinkedTokensMixin
+    implements idl.UnlinkedTokens {
+  List<int> _endGroup;
+  List<bool> _isSynthetic;
+  List<idl.UnlinkedTokenKind> _kind;
+  List<int> _length;
+  List<String> _lexeme;
+  List<int> _next;
+  List<int> _offset;
+  List<int> _precedingComment;
+  List<idl.UnlinkedTokenType> _type;
+
+  @override
+  List<int> get endGroup => _endGroup ??= <int>[];
+
+  /// The token that corresponds to this token, or `0` if this token is not
+  /// the first of a pair of matching tokens (such as parentheses).
+  set endGroup(List<int> value) {
+    assert(value == null || value.every((e) => e >= 0));
+    this._endGroup = value;
+  }
+
+  @override
+  List<bool> get isSynthetic => _isSynthetic ??= <bool>[];
+
+  /// Return `true` if this token is a synthetic token. A synthetic token is a
+  /// token that was introduced by the parser in order to recover from an error
+  /// in the code.
+  set isSynthetic(List<bool> value) {
+    this._isSynthetic = value;
+  }
+
+  @override
+  List<idl.UnlinkedTokenKind> get kind => _kind ??= <idl.UnlinkedTokenKind>[];
+
+  set kind(List<idl.UnlinkedTokenKind> value) {
+    this._kind = value;
+  }
+
+  @override
+  List<int> get length => _length ??= <int>[];
+
+  set length(List<int> value) {
+    assert(value == null || value.every((e) => e >= 0));
+    this._length = value;
+  }
+
+  @override
+  List<String> get lexeme => _lexeme ??= <String>[];
+
+  set lexeme(List<String> value) {
+    this._lexeme = value;
+  }
+
+  @override
+  List<int> get next => _next ??= <int>[];
+
+  /// The next token in the token stream, `0` for [UnlinkedTokenType.EOF] or
+  /// the last comment token.
+  set next(List<int> value) {
+    assert(value == null || value.every((e) => e >= 0));
+    this._next = value;
+  }
+
+  @override
+  List<int> get offset => _offset ??= <int>[];
+
+  set offset(List<int> value) {
+    assert(value == null || value.every((e) => e >= 0));
+    this._offset = value;
+  }
+
+  @override
+  List<int> get precedingComment => _precedingComment ??= <int>[];
+
+  /// The first comment token in the list of comments that precede this token,
+  /// or `0` if there are no comments preceding this token. Additional comments
+  /// can be reached by following the token stream using [next] until `0` is
+  /// reached.
+  set precedingComment(List<int> value) {
+    assert(value == null || value.every((e) => e >= 0));
+    this._precedingComment = value;
+  }
+
+  @override
+  List<idl.UnlinkedTokenType> get type => _type ??= <idl.UnlinkedTokenType>[];
+
+  set type(List<idl.UnlinkedTokenType> value) {
+    this._type = value;
+  }
+
+  UnlinkedTokensBuilder(
+      {List<int> endGroup,
+      List<bool> isSynthetic,
+      List<idl.UnlinkedTokenKind> kind,
+      List<int> length,
+      List<String> lexeme,
+      List<int> next,
+      List<int> offset,
+      List<int> precedingComment,
+      List<idl.UnlinkedTokenType> type})
+      : _endGroup = endGroup,
+        _isSynthetic = isSynthetic,
+        _kind = kind,
+        _length = length,
+        _lexeme = lexeme,
+        _next = next,
+        _offset = offset,
+        _precedingComment = precedingComment,
+        _type = type;
+
+  /// Flush [informative] data recursively.
+  void flushInformative() {}
+
+  /// Accumulate non-[informative] data into [signature].
+  void collectApiSignature(api_sig.ApiSignature signature) {
+    if (this._endGroup == null) {
+      signature.addInt(0);
+    } else {
+      signature.addInt(this._endGroup.length);
+      for (var x in this._endGroup) {
+        signature.addInt(x);
+      }
+    }
+    if (this._isSynthetic == null) {
+      signature.addInt(0);
+    } else {
+      signature.addInt(this._isSynthetic.length);
+      for (var x in this._isSynthetic) {
+        signature.addBool(x);
+      }
+    }
+    if (this._kind == null) {
+      signature.addInt(0);
+    } else {
+      signature.addInt(this._kind.length);
+      for (var x in this._kind) {
+        signature.addInt(x.index);
+      }
+    }
+    if (this._length == null) {
+      signature.addInt(0);
+    } else {
+      signature.addInt(this._length.length);
+      for (var x in this._length) {
+        signature.addInt(x);
+      }
+    }
+    if (this._lexeme == null) {
+      signature.addInt(0);
+    } else {
+      signature.addInt(this._lexeme.length);
+      for (var x in this._lexeme) {
+        signature.addString(x);
+      }
+    }
+    if (this._next == null) {
+      signature.addInt(0);
+    } else {
+      signature.addInt(this._next.length);
+      for (var x in this._next) {
+        signature.addInt(x);
+      }
+    }
+    if (this._offset == null) {
+      signature.addInt(0);
+    } else {
+      signature.addInt(this._offset.length);
+      for (var x in this._offset) {
+        signature.addInt(x);
+      }
+    }
+    if (this._precedingComment == null) {
+      signature.addInt(0);
+    } else {
+      signature.addInt(this._precedingComment.length);
+      for (var x in this._precedingComment) {
+        signature.addInt(x);
+      }
+    }
+    if (this._type == null) {
+      signature.addInt(0);
+    } else {
+      signature.addInt(this._type.length);
+      for (var x in this._type) {
+        signature.addInt(x.index);
+      }
+    }
+  }
+
+  fb.Offset finish(fb.Builder fbBuilder) {
+    fb.Offset offset_endGroup;
+    fb.Offset offset_isSynthetic;
+    fb.Offset offset_kind;
+    fb.Offset offset_length;
+    fb.Offset offset_lexeme;
+    fb.Offset offset_next;
+    fb.Offset offset_offset;
+    fb.Offset offset_precedingComment;
+    fb.Offset offset_type;
+    if (!(_endGroup == null || _endGroup.isEmpty)) {
+      offset_endGroup = fbBuilder.writeListUint32(_endGroup);
+    }
+    if (!(_isSynthetic == null || _isSynthetic.isEmpty)) {
+      offset_isSynthetic = fbBuilder.writeListBool(_isSynthetic);
+    }
+    if (!(_kind == null || _kind.isEmpty)) {
+      offset_kind =
+          fbBuilder.writeListUint8(_kind.map((b) => b.index).toList());
+    }
+    if (!(_length == null || _length.isEmpty)) {
+      offset_length = fbBuilder.writeListUint32(_length);
+    }
+    if (!(_lexeme == null || _lexeme.isEmpty)) {
+      offset_lexeme = fbBuilder
+          .writeList(_lexeme.map((b) => fbBuilder.writeString(b)).toList());
+    }
+    if (!(_next == null || _next.isEmpty)) {
+      offset_next = fbBuilder.writeListUint32(_next);
+    }
+    if (!(_offset == null || _offset.isEmpty)) {
+      offset_offset = fbBuilder.writeListUint32(_offset);
+    }
+    if (!(_precedingComment == null || _precedingComment.isEmpty)) {
+      offset_precedingComment = fbBuilder.writeListUint32(_precedingComment);
+    }
+    if (!(_type == null || _type.isEmpty)) {
+      offset_type =
+          fbBuilder.writeListUint8(_type.map((b) => b.index).toList());
+    }
+    fbBuilder.startTable();
+    if (offset_endGroup != null) {
+      fbBuilder.addOffset(0, offset_endGroup);
+    }
+    if (offset_isSynthetic != null) {
+      fbBuilder.addOffset(1, offset_isSynthetic);
+    }
+    if (offset_kind != null) {
+      fbBuilder.addOffset(2, offset_kind);
+    }
+    if (offset_length != null) {
+      fbBuilder.addOffset(3, offset_length);
+    }
+    if (offset_lexeme != null) {
+      fbBuilder.addOffset(4, offset_lexeme);
+    }
+    if (offset_next != null) {
+      fbBuilder.addOffset(5, offset_next);
+    }
+    if (offset_offset != null) {
+      fbBuilder.addOffset(6, offset_offset);
+    }
+    if (offset_precedingComment != null) {
+      fbBuilder.addOffset(7, offset_precedingComment);
+    }
+    if (offset_type != null) {
+      fbBuilder.addOffset(8, offset_type);
+    }
+    return fbBuilder.endTable();
+  }
+}
+
+class _UnlinkedTokensReader extends fb.TableReader<_UnlinkedTokensImpl> {
+  const _UnlinkedTokensReader();
+
+  @override
+  _UnlinkedTokensImpl createObject(fb.BufferContext bc, int offset) =>
+      new _UnlinkedTokensImpl(bc, offset);
+}
+
+class _UnlinkedTokensImpl extends Object
+    with _UnlinkedTokensMixin
+    implements idl.UnlinkedTokens {
+  final fb.BufferContext _bc;
+  final int _bcOffset;
+
+  _UnlinkedTokensImpl(this._bc, this._bcOffset);
+
+  List<int> _endGroup;
+  List<bool> _isSynthetic;
+  List<idl.UnlinkedTokenKind> _kind;
+  List<int> _length;
+  List<String> _lexeme;
+  List<int> _next;
+  List<int> _offset;
+  List<int> _precedingComment;
+  List<idl.UnlinkedTokenType> _type;
+
+  @override
+  List<int> get endGroup {
+    _endGroup ??=
+        const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 0, const <int>[]);
+    return _endGroup;
+  }
+
+  @override
+  List<bool> get isSynthetic {
+    _isSynthetic ??=
+        const fb.BoolListReader().vTableGet(_bc, _bcOffset, 1, const <bool>[]);
+    return _isSynthetic;
+  }
+
+  @override
+  List<idl.UnlinkedTokenKind> get kind {
+    _kind ??= const fb.ListReader<idl.UnlinkedTokenKind>(
+            const _UnlinkedTokenKindReader())
+        .vTableGet(_bc, _bcOffset, 2, const <idl.UnlinkedTokenKind>[]);
+    return _kind;
+  }
+
+  @override
+  List<int> get length {
+    _length ??=
+        const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 3, const <int>[]);
+    return _length;
+  }
+
+  @override
+  List<String> get lexeme {
+    _lexeme ??= const fb.ListReader<String>(const fb.StringReader())
+        .vTableGet(_bc, _bcOffset, 4, const <String>[]);
+    return _lexeme;
+  }
+
+  @override
+  List<int> get next {
+    _next ??=
+        const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 5, const <int>[]);
+    return _next;
+  }
+
+  @override
+  List<int> get offset {
+    _offset ??=
+        const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 6, const <int>[]);
+    return _offset;
+  }
+
+  @override
+  List<int> get precedingComment {
+    _precedingComment ??=
+        const fb.Uint32ListReader().vTableGet(_bc, _bcOffset, 7, const <int>[]);
+    return _precedingComment;
+  }
+
+  @override
+  List<idl.UnlinkedTokenType> get type {
+    _type ??= const fb.ListReader<idl.UnlinkedTokenType>(
+            const _UnlinkedTokenTypeReader())
+        .vTableGet(_bc, _bcOffset, 8, const <idl.UnlinkedTokenType>[]);
+    return _type;
+  }
+}
+
+abstract class _UnlinkedTokensMixin implements idl.UnlinkedTokens {
+  @override
+  Map<String, Object> toJson() {
+    Map<String, Object> _result = <String, Object>{};
+    if (endGroup.isNotEmpty) _result["endGroup"] = endGroup;
+    if (isSynthetic.isNotEmpty) _result["isSynthetic"] = isSynthetic;
+    if (kind.isNotEmpty)
+      _result["kind"] =
+          kind.map((_value) => _value.toString().split('.')[1]).toList();
+    if (length.isNotEmpty) _result["length"] = length;
+    if (lexeme.isNotEmpty) _result["lexeme"] = lexeme;
+    if (next.isNotEmpty) _result["next"] = next;
+    if (offset.isNotEmpty) _result["offset"] = offset;
+    if (precedingComment.isNotEmpty)
+      _result["precedingComment"] = precedingComment;
+    if (type.isNotEmpty)
+      _result["type"] =
+          type.map((_value) => _value.toString().split('.')[1]).toList();
+    return _result;
+  }
+
+  @override
+  Map<String, Object> toMap() => {
+        "endGroup": endGroup,
+        "isSynthetic": isSynthetic,
+        "kind": kind,
+        "length": length,
+        "lexeme": lexeme,
+        "next": next,
+        "offset": offset,
+        "precedingComment": precedingComment,
+        "type": type,
+      };
+
+  @override
+  String toString() => convert.json.encode(toJson());
+}
+
 class UnlinkedTypedefBuilder extends Object
     with _UnlinkedTypedefMixin
     implements idl.UnlinkedTypedef {
@@ -11382,7 +27347,7 @@
       _annotations ??= <UnlinkedExprBuilder>[];
 
   /// Annotations for this typedef.
-  void set annotations(List<UnlinkedExprBuilder> value) {
+  set annotations(List<UnlinkedExprBuilder> value) {
     this._annotations = value;
   }
 
@@ -11390,7 +27355,7 @@
   CodeRangeBuilder get codeRange => _codeRange;
 
   /// Code range of the typedef.
-  void set codeRange(CodeRangeBuilder value) {
+  set codeRange(CodeRangeBuilder value) {
     this._codeRange = value;
   }
 
@@ -11400,7 +27365,7 @@
 
   /// Documentation comment for the typedef, or `null` if there is no
   /// documentation comment.
-  void set documentationComment(UnlinkedDocumentationCommentBuilder value) {
+  set documentationComment(UnlinkedDocumentationCommentBuilder value) {
     this._documentationComment = value;
   }
 
@@ -11408,7 +27373,7 @@
   String get name => _name ??= '';
 
   /// Name of the typedef.
-  void set name(String value) {
+  set name(String value) {
     this._name = value;
   }
 
@@ -11416,7 +27381,7 @@
   int get nameOffset => _nameOffset ??= 0;
 
   /// Offset of the typedef name relative to the beginning of the file.
-  void set nameOffset(int value) {
+  set nameOffset(int value) {
     assert(value == null || value >= 0);
     this._nameOffset = value;
   }
@@ -11431,7 +27396,7 @@
   /// raw type when specifying the bound of a type parameter.
   ///
   /// Otherwise, zero.
-  void set notSimplyBoundedSlot(int value) {
+  set notSimplyBoundedSlot(int value) {
     assert(value == null || value >= 0);
     this._notSimplyBoundedSlot = value;
   }
@@ -11441,7 +27406,7 @@
       _parameters ??= <UnlinkedParamBuilder>[];
 
   /// Parameters of the executable, if any.
-  void set parameters(List<UnlinkedParamBuilder> value) {
+  set parameters(List<UnlinkedParamBuilder> value) {
     this._parameters = value;
   }
 
@@ -11451,7 +27416,7 @@
   /// If [style] is [TypedefStyle.functionType], the return type of the typedef.
   /// If [style] is [TypedefStyle.genericFunctionType], the function type being
   /// defined.
-  void set returnType(EntityRefBuilder value) {
+  set returnType(EntityRefBuilder value) {
     this._returnType = value;
   }
 
@@ -11459,7 +27424,7 @@
   idl.TypedefStyle get style => _style ??= idl.TypedefStyle.functionType;
 
   /// The style of the typedef.
-  void set style(idl.TypedefStyle value) {
+  set style(idl.TypedefStyle value) {
     this._style = value;
   }
 
@@ -11468,7 +27433,7 @@
       _typeParameters ??= <UnlinkedTypeParamBuilder>[];
 
   /// Type parameters of the typedef, if any.
-  void set typeParameters(List<UnlinkedTypeParamBuilder> value) {
+  set typeParameters(List<UnlinkedTypeParamBuilder> value) {
     this._typeParameters = value;
   }
 
@@ -11494,9 +27459,7 @@
         _style = style,
         _typeParameters = typeParameters;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {
     _annotations?.forEach((b) => b.flushInformative());
     _codeRange = null;
@@ -11507,9 +27470,7 @@
     _typeParameters?.forEach((b) => b.flushInformative());
   }
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     signature.addString(this._name ?? '');
     signature.addBool(this._returnType != null);
@@ -11764,7 +27725,7 @@
       _annotations ??= <UnlinkedExprBuilder>[];
 
   /// Annotations for this type parameter.
-  void set annotations(List<UnlinkedExprBuilder> value) {
+  set annotations(List<UnlinkedExprBuilder> value) {
     this._annotations = value;
   }
 
@@ -11773,7 +27734,7 @@
 
   /// Bound of the type parameter, if a bound is explicitly declared.  Otherwise
   /// null.
-  void set bound(EntityRefBuilder value) {
+  set bound(EntityRefBuilder value) {
     this._bound = value;
   }
 
@@ -11781,7 +27742,7 @@
   CodeRangeBuilder get codeRange => _codeRange;
 
   /// Code range of the type parameter.
-  void set codeRange(CodeRangeBuilder value) {
+  set codeRange(CodeRangeBuilder value) {
     this._codeRange = value;
   }
 
@@ -11789,7 +27750,7 @@
   String get name => _name ??= '';
 
   /// Name of the type parameter.
-  void set name(String value) {
+  set name(String value) {
     this._name = value;
   }
 
@@ -11797,7 +27758,7 @@
   int get nameOffset => _nameOffset ??= 0;
 
   /// Offset of the type parameter name relative to the beginning of the file.
-  void set nameOffset(int value) {
+  set nameOffset(int value) {
     assert(value == null || value >= 0);
     this._nameOffset = value;
   }
@@ -11814,9 +27775,7 @@
         _name = name,
         _nameOffset = nameOffset;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {
     _annotations?.forEach((b) => b.flushInformative());
     _bound?.flushInformative();
@@ -11824,9 +27783,7 @@
     _nameOffset = null;
   }
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     signature.addString(this._name ?? '');
     signature.addBool(this._bound != null);
@@ -11991,7 +27948,7 @@
   /// MD5 hash of the non-informative fields of the [UnlinkedUnit] (not
   /// including this one) as 16 unsigned 8-bit integer values.  This can be used
   /// to identify when the API of a unit may have changed.
-  void set apiSignature(List<int> value) {
+  set apiSignature(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._apiSignature = value;
   }
@@ -12001,7 +27958,7 @@
       _classes ??= <UnlinkedClassBuilder>[];
 
   /// Classes declared in the compilation unit.
-  void set classes(List<UnlinkedClassBuilder> value) {
+  set classes(List<UnlinkedClassBuilder> value) {
     this._classes = value;
   }
 
@@ -12009,7 +27966,7 @@
   CodeRangeBuilder get codeRange => _codeRange;
 
   /// Code range of the unit.
-  void set codeRange(CodeRangeBuilder value) {
+  set codeRange(CodeRangeBuilder value) {
     this._codeRange = value;
   }
 
@@ -12017,7 +27974,7 @@
   List<UnlinkedEnumBuilder> get enums => _enums ??= <UnlinkedEnumBuilder>[];
 
   /// Enums declared in the compilation unit.
-  void set enums(List<UnlinkedEnumBuilder> value) {
+  set enums(List<UnlinkedEnumBuilder> value) {
     this._enums = value;
   }
 
@@ -12027,7 +27984,7 @@
 
   /// Top level executable objects (functions, getters, and setters) declared in
   /// the compilation unit.
-  void set executables(List<UnlinkedExecutableBuilder> value) {
+  set executables(List<UnlinkedExecutableBuilder> value) {
     this._executables = value;
   }
 
@@ -12036,7 +27993,7 @@
       _exports ??= <UnlinkedExportNonPublicBuilder>[];
 
   /// Export declarations in the compilation unit.
-  void set exports(List<UnlinkedExportNonPublicBuilder> value) {
+  set exports(List<UnlinkedExportNonPublicBuilder> value) {
     this._exports = value;
   }
 
@@ -12049,7 +28006,7 @@
       _imports ??= <UnlinkedImportBuilder>[];
 
   /// Import declarations in the compilation unit.
-  void set imports(List<UnlinkedImportBuilder> value) {
+  set imports(List<UnlinkedImportBuilder> value) {
     this._imports = value;
   }
 
@@ -12057,7 +28014,7 @@
   bool get isPartOf => _isPartOf ??= false;
 
   /// Indicates whether the unit contains a "part of" declaration.
-  void set isPartOf(bool value) {
+  set isPartOf(bool value) {
     this._isPartOf = value;
   }
 
@@ -12067,7 +28024,7 @@
 
   /// Annotations for the library declaration, or the empty list if there is no
   /// library declaration.
-  void set libraryAnnotations(List<UnlinkedExprBuilder> value) {
+  set libraryAnnotations(List<UnlinkedExprBuilder> value) {
     this._libraryAnnotations = value;
   }
 
@@ -12077,8 +28034,7 @@
 
   /// Documentation comment for the library, or `null` if there is no
   /// documentation comment.
-  void set libraryDocumentationComment(
-      UnlinkedDocumentationCommentBuilder value) {
+  set libraryDocumentationComment(UnlinkedDocumentationCommentBuilder value) {
     this._libraryDocumentationComment = value;
   }
 
@@ -12086,7 +28042,7 @@
   String get libraryName => _libraryName ??= '';
 
   /// Name of the library (from a "library" declaration, if present).
-  void set libraryName(String value) {
+  set libraryName(String value) {
     this._libraryName = value;
   }
 
@@ -12095,7 +28051,7 @@
 
   /// Length of the library name as it appears in the source code (or 0 if the
   /// library has no name).
-  void set libraryNameLength(int value) {
+  set libraryNameLength(int value) {
     assert(value == null || value >= 0);
     this._libraryNameLength = value;
   }
@@ -12105,7 +28061,7 @@
 
   /// Offset of the library name relative to the beginning of the file (or 0 if
   /// the library has no name).
-  void set libraryNameOffset(int value) {
+  set libraryNameOffset(int value) {
     assert(value == null || value >= 0);
     this._libraryNameOffset = value;
   }
@@ -12114,7 +28070,7 @@
   List<int> get lineStarts => _lineStarts ??= <int>[];
 
   /// Offsets of the first character of each line in the source code.
-  void set lineStarts(List<int> value) {
+  set lineStarts(List<int> value) {
     assert(value == null || value.every((e) => e >= 0));
     this._lineStarts = value;
   }
@@ -12123,7 +28079,7 @@
   List<UnlinkedClassBuilder> get mixins => _mixins ??= <UnlinkedClassBuilder>[];
 
   /// Mixins declared in the compilation unit.
-  void set mixins(List<UnlinkedClassBuilder> value) {
+  set mixins(List<UnlinkedClassBuilder> value) {
     this._mixins = value;
   }
 
@@ -12131,7 +28087,7 @@
   List<UnlinkedPartBuilder> get parts => _parts ??= <UnlinkedPartBuilder>[];
 
   /// Part declarations in the compilation unit.
-  void set parts(List<UnlinkedPartBuilder> value) {
+  set parts(List<UnlinkedPartBuilder> value) {
     this._parts = value;
   }
 
@@ -12139,7 +28095,7 @@
   UnlinkedPublicNamespaceBuilder get publicNamespace => _publicNamespace;
 
   /// Unlinked public namespace of this compilation unit.
-  void set publicNamespace(UnlinkedPublicNamespaceBuilder value) {
+  set publicNamespace(UnlinkedPublicNamespaceBuilder value) {
     this._publicNamespace = value;
   }
 
@@ -12152,7 +28108,7 @@
   /// the absence of a reference in places where a reference is optional (for
   /// example [UnlinkedReference.prefixReference or
   /// UnlinkedImport.prefixReference]).
-  void set references(List<UnlinkedReferenceBuilder> value) {
+  set references(List<UnlinkedReferenceBuilder> value) {
     this._references = value;
   }
 
@@ -12161,7 +28117,7 @@
       _typedefs ??= <UnlinkedTypedefBuilder>[];
 
   /// Typedefs declared in the compilation unit.
-  void set typedefs(List<UnlinkedTypedefBuilder> value) {
+  set typedefs(List<UnlinkedTypedefBuilder> value) {
     this._typedefs = value;
   }
 
@@ -12170,7 +28126,7 @@
       _variables ??= <UnlinkedVariableBuilder>[];
 
   /// Top level variables declared in the compilation unit.
-  void set variables(List<UnlinkedVariableBuilder> value) {
+  set variables(List<UnlinkedVariableBuilder> value) {
     this._variables = value;
   }
 
@@ -12216,9 +28172,7 @@
         _typedefs = typedefs,
         _variables = variables;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {
     _classes?.forEach((b) => b.flushInformative());
     _codeRange = null;
@@ -12239,9 +28193,7 @@
     _variables?.forEach((b) => b.flushInformative());
   }
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     signature.addBool(this._publicNamespace != null);
     this._publicNamespace?.collectApiSignature(signature);
@@ -12789,7 +28741,7 @@
       _annotations ??= <UnlinkedExprBuilder>[];
 
   /// Annotations for this variable.
-  void set annotations(List<UnlinkedExprBuilder> value) {
+  set annotations(List<UnlinkedExprBuilder> value) {
     this._annotations = value;
   }
 
@@ -12797,7 +28749,7 @@
   CodeRangeBuilder get codeRange => _codeRange;
 
   /// Code range of the variable.
-  void set codeRange(CodeRangeBuilder value) {
+  set codeRange(CodeRangeBuilder value) {
     this._codeRange = value;
   }
 
@@ -12807,7 +28759,7 @@
 
   /// Documentation comment for the variable, or `null` if there is no
   /// documentation comment.
-  void set documentationComment(UnlinkedDocumentationCommentBuilder value) {
+  set documentationComment(UnlinkedDocumentationCommentBuilder value) {
     this._documentationComment = value;
   }
 
@@ -12818,7 +28770,7 @@
   /// [LinkedLibrary.types] contains the inferred type for this variable.  If
   /// there is no matching entry in [LinkedLibrary.types], then no type was
   /// inferred for this variable, so its static type is `dynamic`.
-  void set inferredTypeSlot(int value) {
+  set inferredTypeSlot(int value) {
     assert(value == null || value >= 0);
     this._inferredTypeSlot = value;
   }
@@ -12832,7 +28784,7 @@
   /// synthetic setter inherits `@covariant` behavior from a base class.
   ///
   /// Otherwise, zero.
-  void set inheritsCovariantSlot(int value) {
+  set inheritsCovariantSlot(int value) {
     assert(value == null || value >= 0);
     this._inheritsCovariantSlot = value;
   }
@@ -12842,7 +28794,7 @@
 
   /// The synthetic initializer function of the variable.  Absent if the
   /// variable does not have an initializer.
-  void set initializer(UnlinkedExecutableBuilder value) {
+  set initializer(UnlinkedExecutableBuilder value) {
     this._initializer = value;
   }
 
@@ -12850,7 +28802,7 @@
   bool get isConst => _isConst ??= false;
 
   /// Indicates whether the variable is declared using the `const` keyword.
-  void set isConst(bool value) {
+  set isConst(bool value) {
     this._isConst = value;
   }
 
@@ -12859,7 +28811,7 @@
 
   /// Indicates whether this variable is declared using the `covariant` keyword.
   /// This should be false for everything except instance fields.
-  void set isCovariant(bool value) {
+  set isCovariant(bool value) {
     this._isCovariant = value;
   }
 
@@ -12867,7 +28819,7 @@
   bool get isFinal => _isFinal ??= false;
 
   /// Indicates whether the variable is declared using the `final` keyword.
-  void set isFinal(bool value) {
+  set isFinal(bool value) {
     this._isFinal = value;
   }
 
@@ -12879,7 +28831,7 @@
   /// Note that for top level variables, this flag is false, since they are not
   /// declared using the `static` keyword (even though they are considered
   /// static for semantic purposes).
-  void set isStatic(bool value) {
+  set isStatic(bool value) {
     this._isStatic = value;
   }
 
@@ -12887,7 +28839,7 @@
   String get name => _name ??= '';
 
   /// Name of the variable.
-  void set name(String value) {
+  set name(String value) {
     this._name = value;
   }
 
@@ -12895,7 +28847,7 @@
   int get nameOffset => _nameOffset ??= 0;
 
   /// Offset of the variable name relative to the beginning of the file.
-  void set nameOffset(int value) {
+  set nameOffset(int value) {
     assert(value == null || value >= 0);
     this._nameOffset = value;
   }
@@ -12909,7 +28861,7 @@
   /// propagated type is the same as its declared type.
   ///
   /// Non-propagable variables have a [propagatedTypeSlot] of zero.
-  void set propagatedTypeSlot(int value) {
+  set propagatedTypeSlot(int value) {
     assert(value == null || value >= 0);
     this._propagatedTypeSlot = value;
   }
@@ -12918,7 +28870,7 @@
   EntityRefBuilder get type => _type;
 
   /// Declared type of the variable.  Absent if the type is implicit.
-  void set type(EntityRefBuilder value) {
+  set type(EntityRefBuilder value) {
     this._type = value;
   }
 
@@ -12960,9 +28912,7 @@
         _propagatedTypeSlot = propagatedTypeSlot,
         _type = type;
 
-  /**
-   * Flush [informative] data recursively.
-   */
+  /// Flush [informative] data recursively.
   void flushInformative() {
     _annotations?.forEach((b) => b.flushInformative());
     _codeRange = null;
@@ -12972,9 +28922,7 @@
     _type?.flushInformative();
   }
 
-  /**
-   * Accumulate non-[informative] data into [signature].
-   */
+  /// Accumulate non-[informative] data into [signature].
   void collectApiSignature(api_sig.ApiSignature signature) {
     signature.addString(this._name ?? '');
     signature.addInt(this._propagatedTypeSlot ?? 0);
diff --git a/pkg/analyzer/lib/src/summary/format.fbs b/pkg/analyzer/lib/src/summary/format.fbs
index 640b861..25f838b 100644
--- a/pkg/analyzer/lib/src/summary/format.fbs
+++ b/pkg/analyzer/lib/src/summary/format.fbs
@@ -1,9 +1,11 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 //
 // This file has been automatically generated.  Please do not edit it manually.
-// To regenerate the file, use the script "pkg/analyzer/tool/generate_files".
+// To regenerate the file, use the SDK script
+// "pkg/analyzer/tool/summary/generate.dart $IDL_FILE_PATH",
+// or "pkg/analyzer/tool/generate_files" for the analyzer package IDL/sources.
 
 
 /// Enum of declaration kinds in available files.
@@ -12,6 +14,8 @@
 
   CLASS_TYPE_ALIAS,
 
+  CONSTRUCTOR,
+
   ENUM,
 
   ENUM_CONSTANT,
@@ -137,6 +141,278 @@
   unit
 }
 
+/// Types of comments.
+enum LinkedNodeCommentType : byte {
+  block,
+
+  documentation,
+
+  endOfLine
+}
+
+/// Kinds of formal parameters.
+enum LinkedNodeFormalParameterKind : byte {
+  required,
+
+  optionalPositional,
+
+  optionalNamed
+}
+
+/// Kinds of [LinkedNode].
+enum LinkedNodeKind : byte {
+  adjacentStrings,
+
+  annotation,
+
+  argumentList,
+
+  asExpression,
+
+  assertInitializer,
+
+  assertStatement,
+
+  assignmentExpression,
+
+  awaitExpression,
+
+  binaryExpression,
+
+  block,
+
+  blockFunctionBody,
+
+  booleanLiteral,
+
+  breakStatement,
+
+  cascadeExpression,
+
+  catchClause,
+
+  classDeclaration,
+
+  classTypeAlias,
+
+  comment,
+
+  compilationUnit,
+
+  conditionalExpression,
+
+  configuration,
+
+  constructorDeclaration,
+
+  constructorFieldInitializer,
+
+  constructorName,
+
+  continueStatement,
+
+  declaredIdentifier,
+
+  defaultFormalParameter,
+
+  doubleLiteral,
+
+  doStatement,
+
+  dottedName,
+
+  emptyFunctionBody,
+
+  emptyStatement,
+
+  enumConstantDeclaration,
+
+  enumDeclaration,
+
+  exportDirective,
+
+  expressionFunctionBody,
+
+  expressionStatement,
+
+  extendsClause,
+
+  fieldDeclaration,
+
+  fieldFormalParameter,
+
+  formalParameterList,
+
+  forEachPartsWithDeclaration,
+
+  forEachPartsWithIdentifier,
+
+  forElement,
+
+  forPartsWithDeclarations,
+
+  forPartsWithExpression,
+
+  forStatement,
+
+  functionDeclaration,
+
+  functionDeclarationStatement,
+
+  functionExpression,
+
+  functionExpressionInvocation,
+
+  functionTypeAlias,
+
+  functionTypedFormalParameter,
+
+  genericFunctionType,
+
+  genericTypeAlias,
+
+  hideCombinator,
+
+  ifElement,
+
+  ifStatement,
+
+  implementsClause,
+
+  importDirective,
+
+  instanceCreationExpression,
+
+  indexExpression,
+
+  integerLiteral,
+
+  interpolationExpression,
+
+  interpolationString,
+
+  isExpression,
+
+  label,
+
+  labeledStatement,
+
+  libraryDirective,
+
+  libraryIdentifier,
+
+  listLiteral,
+
+  mapLiteralEntry,
+
+  methodDeclaration,
+
+  methodInvocation,
+
+  mixinDeclaration,
+
+  namedExpression,
+
+  nativeClause,
+
+  nativeFunctionBody,
+
+  nullLiteral,
+
+  onClause,
+
+  parenthesizedExpression,
+
+  partDirective,
+
+  partOfDirective,
+
+  postfixExpression,
+
+  prefixExpression,
+
+  prefixedIdentifier,
+
+  propertyAccess,
+
+  redirectingConstructorInvocation,
+
+  rethrowExpression,
+
+  returnStatement,
+
+  scriptTag,
+
+  setOrMapLiteral,
+
+  showCombinator,
+
+  simpleFormalParameter,
+
+  simpleIdentifier,
+
+  simpleStringLiteral,
+
+  spreadElement,
+
+  stringInterpolation,
+
+  superConstructorInvocation,
+
+  superExpression,
+
+  switchCase,
+
+  switchDefault,
+
+  switchStatement,
+
+  symbolLiteral,
+
+  thisExpression,
+
+  throwExpression,
+
+  topLevelVariableDeclaration,
+
+  tryStatement,
+
+  typeArgumentList,
+
+  typeName,
+
+  typeParameter,
+
+  typeParameterList,
+
+  variableDeclaration,
+
+  variableDeclarationList,
+
+  variableDeclarationStatement,
+
+  whileStatement,
+
+  withClause,
+
+  yieldStatement
+}
+
+/// Kinds of [LinkedNodeType]s.
+enum LinkedNodeTypeKind : byte {
+  bottom,
+
+  dynamic_,
+
+  function,
+
+  interface,
+
+  typeParameter,
+
+  void_
+}
+
 /// Enum used to indicate the kind of entity referred to by a
 /// [LinkedReference].
 enum ReferenceKind : byte {
@@ -406,6 +682,8 @@
   /// [UnlinkedExpr.ints]), interpret them as key/value pairs, place them in a
   /// [Map], and push the result back onto the stack.  The two type parameters
   /// for the [Map] are implicitly `dynamic`.
+  ///
+  /// To be replaced with [makeUntypedSetOrMap] for unified collections.
   makeUntypedMap,
 
   /// Pop the top n values from the stack (where n is obtained from
@@ -418,6 +696,10 @@
   /// [UnlinkedExpr.ints]), interpret them as key/value pairs, place them in a
   /// [Map], and push the result back onto the stack.  The two type parameters
   /// for the [Map] are obtained from [UnlinkedExpr.references].
+  ///
+  /// To be replaced with [makeTypedMap2] for unified collections. This is not
+  /// forwards compatible with [makeTypedMap2] because it expects
+  /// [CollectionElement]s instead of pairs of [Expression]s.
   makeTypedMap,
 
   /// Pop the top 2 values from the stack, evaluate `v1 == v2`, and push the
@@ -677,7 +959,114 @@
   /// [UnlinkedExpr.ints]), place them in a [Set], and push the result back
   /// onto the stack.  The type parameter for the [Set] is obtained from
   /// [UnlinkedExpr.references].
-  makeTypedSet
+  makeTypedSet,
+
+  /// Pop the top n values from the stack (where n is obtained from
+  /// [UnlinkedExpr.ints]), which should be [CollectionElement]s, place them in
+  /// a [SetOrMap], and push the result back onto the stack.
+  makeUntypedSetOrMap,
+
+  /// Pop the top n values from the stack (where n is obtained from
+  /// [UnlinkedExpr.ints]), which should be [CollectionElement]s, place them in
+  /// a [Map], and push the result back onto the stack. The two type parameters
+  /// for the [Map] are obtained from [UnlinkedExpr.references].
+  ///
+  /// To replace [makeTypedMap] for unified collections. This is not backwards
+  /// compatible with [makeTypedMap] because it expects [CollectionElement]s
+  /// instead of pairs of [Expression]s.
+  makeTypedMap2,
+
+  /// Pop the top 2 values from the stack, place them in a [MapLiteralEntry],
+  /// and push the result back onto the stack.
+  makeMapLiteralEntry,
+
+  /// Pop the top value from the stack, convert it to a spread element of type
+  /// `...`, and push the result back onto the stack.
+  spreadElement,
+
+  /// Pop the top value from the stack, convert it to a spread element of type
+  /// `...?`, and push the result back onto the stack.
+  nullAwareSpreadElement,
+
+  /// Pop the top two values from the stack.  The first is a condition
+  /// and the second is a collection element.  Push an "if" element having the
+  /// given condition, with the collection element as its "then" clause.
+  ifElement,
+
+  /// Pop the top three values from the stack.  The first is a condition and the
+  /// other two are collection elements.  Push an "if" element having the given
+  /// condition, with the two collection elements as its "then" and "else"
+  /// clauses, respectively.
+  ifElseElement,
+
+  /// Pop the top n+2 values from the stack, where n is obtained from
+  /// [UnlinkedExpr.ints].  The first two are the initialization and condition
+  /// of the for-loop; the remainder are the updaters.
+  forParts,
+
+  /// Pop the top 2 values from the stack.  The first is the for loop parts.
+  /// The second is the body.
+  forElement,
+
+  /// Push the empty expression (used for missing initializers and conditions in
+  /// `for` loops)
+  pushEmptyExpression,
+
+  /// Add a variable to the current scope whose name is obtained from
+  /// [UnlinkedExpr.strings].  This is separate from [variableDeclaration]
+  /// because the scope of the variable includes its own initializer.
+  variableDeclarationStart,
+
+  /// Pop the top value from the stack, and use it as the initializer for a
+  /// variable declaration; the variable being declared is obtained by looking
+  /// at the nth variable most recently added to the scope (where n counts from
+  /// zero and is obtained from [UnlinkedExpr.ints]).
+  variableDeclaration,
+
+  /// Pop the top n values from the stack, which should all be variable
+  /// declarations, and use them to create an untyped for-initializer
+  /// declaration.  The value of n is obtained from [UnlinkedExpr.ints].
+  forInitializerDeclarationsUntyped,
+
+  /// Pop the top n values from the stack, which should all be variable
+  /// declarations, and use them to create a typed for-initializer
+  /// declaration.  The value of n is obtained from [UnlinkedExpr.ints].  The
+  /// type is obtained from [UnlinkedExpr.references].
+  forInitializerDeclarationsTyped,
+
+  /// Pop from the stack `value` and get a string from [UnlinkedExpr.strings].
+  /// Use this string to look up a parameter.  Perform `parameter op= value`,
+  /// where `op` is the next assignment operator from
+  /// [UnlinkedExpr.assignmentOperators].  Push `value` back onto the stack.
+  ///
+  /// If the assignment operator is a prefix/postfix increment/decrement, then
+  /// `value` is not present in the stack, so it should not be popped and the
+  /// corresponding value of the parameter after/before update is pushed onto
+  /// the stack instead.
+  assignToParameter,
+
+  /// Pop from the stack an identifier and an expression, and create for-each
+  /// parts of the form `identifier in expression`.
+  forEachPartsWithIdentifier,
+
+  /// Pop the top 2 values from the stack.  The first is the for loop parts.
+  /// The second is the body.
+  forElementWithAwait,
+
+  /// Pop an expression from the stack, and create for-each parts of the form
+  /// `var name in expression`, where `name` is obtained from
+  /// [UnlinkedExpr.strings].
+  forEachPartsWithUntypedDeclaration,
+
+  /// Pop an expression from the stack, and create for-each parts of the form
+  /// `Type name in expression`, where `name` is obtained from
+  /// [UnlinkedExpr.strings], and `Type` is obtained from
+  /// [UnlinkedExpr.references].
+  forEachPartsWithTypedDeclaration,
+
+  /// Pop the top 2 values from the stack, compute `v1 >>> v2`, and push the
+  /// result back onto the stack.
+  bitShiftRightLogical
 }
 
 /// Enum used to indicate the kind of a parameter.
@@ -692,6 +1081,292 @@
   named
 }
 
+/// TODO(scheglov) document
+enum UnlinkedTokenKind : byte {
+  nothing,
+
+  comment,
+
+  keyword,
+
+  simple,
+
+  string
+}
+
+/// TODO(scheglov) document
+enum UnlinkedTokenType : byte {
+  NOTHING,
+
+  ABSTRACT,
+
+  AMPERSAND,
+
+  AMPERSAND_AMPERSAND,
+
+  AMPERSAND_EQ,
+
+  AS,
+
+  ASSERT,
+
+  ASYNC,
+
+  AT,
+
+  AWAIT,
+
+  BACKPING,
+
+  BACKSLASH,
+
+  BANG,
+
+  BANG_EQ,
+
+  BAR,
+
+  BAR_BAR,
+
+  BAR_EQ,
+
+  BREAK,
+
+  CARET,
+
+  CARET_EQ,
+
+  CASE,
+
+  CATCH,
+
+  CLASS,
+
+  CLOSE_CURLY_BRACKET,
+
+  CLOSE_PAREN,
+
+  CLOSE_SQUARE_BRACKET,
+
+  COLON,
+
+  COMMA,
+
+  CONST,
+
+  CONTINUE,
+
+  COVARIANT,
+
+  DEFAULT,
+
+  DEFERRED,
+
+  DO,
+
+  DOUBLE,
+
+  DYNAMIC,
+
+  ELSE,
+
+  ENUM,
+
+  EOF,
+
+  EQ,
+
+  EQ_EQ,
+
+  EXPORT,
+
+  EXTENDS,
+
+  EXTERNAL,
+
+  FACTORY,
+
+  FALSE,
+
+  FINAL,
+
+  FINALLY,
+
+  FOR,
+
+  FUNCTION,
+
+  FUNCTION_KEYWORD,
+
+  GET,
+
+  GT,
+
+  GT_EQ,
+
+  GT_GT,
+
+  GT_GT_EQ,
+
+  HASH,
+
+  HEXADECIMAL,
+
+  HIDE,
+
+  IDENTIFIER,
+
+  IF,
+
+  IMPLEMENTS,
+
+  IMPORT,
+
+  IN,
+
+  INDEX,
+
+  INDEX_EQ,
+
+  INT,
+
+  INTERFACE,
+
+  IS,
+
+  LIBRARY,
+
+  LT,
+
+  LT_EQ,
+
+  LT_LT,
+
+  LT_LT_EQ,
+
+  MINUS,
+
+  MINUS_EQ,
+
+  MINUS_MINUS,
+
+  MIXIN,
+
+  MULTI_LINE_COMMENT,
+
+  NATIVE,
+
+  NEW,
+
+  NULL,
+
+  OF,
+
+  ON,
+
+  OPEN_CURLY_BRACKET,
+
+  OPEN_PAREN,
+
+  OPEN_SQUARE_BRACKET,
+
+  OPERATOR,
+
+  PART,
+
+  PATCH,
+
+  PERCENT,
+
+  PERCENT_EQ,
+
+  PERIOD,
+
+  PERIOD_PERIOD,
+
+  PERIOD_PERIOD_PERIOD,
+
+  PERIOD_PERIOD_PERIOD_QUESTION,
+
+  PLUS,
+
+  PLUS_EQ,
+
+  PLUS_PLUS,
+
+  QUESTION,
+
+  QUESTION_PERIOD,
+
+  QUESTION_QUESTION,
+
+  QUESTION_QUESTION_EQ,
+
+  RETHROW,
+
+  RETURN,
+
+  SCRIPT_TAG,
+
+  SEMICOLON,
+
+  SET,
+
+  SHOW,
+
+  SINGLE_LINE_COMMENT,
+
+  SLASH,
+
+  SLASH_EQ,
+
+  SOURCE,
+
+  STAR,
+
+  STAR_EQ,
+
+  STATIC,
+
+  STRING,
+
+  STRING_INTERPOLATION_EXPRESSION,
+
+  STRING_INTERPOLATION_IDENTIFIER,
+
+  SUPER,
+
+  SWITCH,
+
+  SYNC,
+
+  THIS,
+
+  THROW,
+
+  TILDE,
+
+  TILDE_SLASH,
+
+  TILDE_SLASH_EQ,
+
+  TRUE,
+
+  TRY,
+
+  TYPEDEF,
+
+  VAR,
+
+  VOID,
+
+  WHILE,
+
+  WITH,
+
+  YIELD
+}
+
 /// Information about the context of an exception in analysis driver.
 table AnalysisDriverExceptionContext {
   /// The exception string.
@@ -870,54 +1545,56 @@
 
 /// Information about a single declaration.
 table AvailableDeclaration {
-  docComplete:string (id: 0);
+  children:[AvailableDeclaration] (id: 0);
 
-  docSummary:string (id: 1);
+  defaultArgumentListString:string (id: 1);
 
-  fieldMask:uint (id: 2);
+  defaultArgumentListTextRanges:[uint] (id: 2);
+
+  docComplete:string (id: 3);
+
+  docSummary:string (id: 4);
+
+  fieldMask:uint (id: 5);
+
+  isAbstract:bool (id: 6);
+
+  isConst:bool (id: 7);
+
+  isDeprecated:bool (id: 8);
+
+  isFinal:bool (id: 9);
 
   /// The kind of the declaration.
-  kind:AvailableDeclarationKind (id: 3);
+  kind:AvailableDeclarationKind (id: 10);
 
-  isAbstract:bool (id: 4);
+  locationOffset:uint (id: 11);
 
-  isConst:bool (id: 5);
+  locationStartColumn:uint (id: 12);
 
-  isDeprecated:bool (id: 6);
-
-  isFinal:bool (id: 7);
+  locationStartLine:uint (id: 13);
 
   /// The first part of the declaration name, usually the only one, for example
   /// the name of a class like `MyClass`, or a function like `myFunction`.
-  name:string (id: 8);
+  name:string (id: 14);
 
-  /// The second, optional, part of the declaration name.  For example enum
-  /// constants all have the same [name], but their own [name2].
-  name2:string (id: 9);
+  parameterNames:[string] (id: 15);
 
-  locationOffset:uint (id: 10);
+  parameters:string (id: 16);
 
-  locationStartColumn:uint (id: 11);
-
-  locationStartLine:uint (id: 12);
-
-  parameterNames:[string] (id: 13);
-
-  parameters:string (id: 14);
-
-  parameterTypes:[string] (id: 15);
-
-  requiredParameterCount:uint (id: 16);
+  parameterTypes:[string] (id: 17);
 
   /// The partial list of relevance tags.  Not every declaration has one (for
   /// example, function do not currently), and not every declaration has to
   /// store one (for classes it can be computed when we know the library that
   /// includes this file).
-  relevanceTags:[string] (id: 17);
+  relevanceTags:[string] (id: 18);
 
-  returnType:string (id: 18);
+  requiredParameterCount:uint (id: 19);
 
-  typeParameters:string (id: 19);
+  returnType:string (id: 20);
+
+  typeParameters:string (id: 21);
 }
 
 /// Information about an available, even if not yet imported file.
@@ -925,6 +1602,9 @@
   /// Declarations of the file.
   declarations:[AvailableDeclaration] (id: 0);
 
+  /// The Dartdoc directives in the file.
+  directiveInfo:DirectiveInfo (id: 5);
+
   /// Exports directives of the file.
   exports:[AvailableFileExport] (id: 1);
 
@@ -965,6 +1645,15 @@
   offset:uint (id: 0);
 }
 
+/// Information about the Dartdoc directives in an [AvailableFile].
+table DirectiveInfo {
+  /// The names of the defined templates.
+  templateNames:[string] (id: 0);
+
+  /// The values of the defined templates.
+  templateValues:[string] (id: 1);
+}
+
 /// Summary information about a reference to an entity such as a type, top level
 /// executable, or executable within a class.
 table EntityRef {
@@ -1143,6 +1832,172 @@
   units:[LinkedUnit] (id: 3);
 }
 
+/// Information about a linked AST node.
+table LinkedNode {
+  /// The explicit or inferred return type of a function typed node.
+  variantField_24:LinkedNodeType (id: 24);
+
+  variantField_2:[LinkedNode] (id: 2);
+
+  variantField_11:LinkedNode (id: 11);
+
+  variantField_4:[LinkedNode] (id: 4);
+
+  variantField_6:LinkedNode (id: 6);
+
+  variantField_15:uint (id: 15);
+
+  variantField_7:LinkedNode (id: 7);
+
+  variantField_8:LinkedNode (id: 8);
+
+  variantField_16:uint (id: 16);
+
+  variantField_17:uint (id: 17);
+
+  variantField_18:uint (id: 18);
+
+  variantField_19:uint (id: 19);
+
+  variantField_23:LinkedNodeType (id: 23);
+
+  variantField_27:bool (id: 27);
+
+  variantField_9:LinkedNode (id: 9);
+
+  variantField_12:LinkedNode (id: 12);
+
+  variantField_5:[LinkedNode] (id: 5);
+
+  variantField_13:LinkedNode (id: 13);
+
+  variantField_34:uint (id: 34);
+
+  variantField_33:uint (id: 33);
+
+  variantField_28:[uint] (id: 28);
+
+  variantField_29:LinkedNodeCommentType (id: 29);
+
+  variantField_3:[LinkedNode] (id: 3);
+
+  variantField_10:LinkedNode (id: 10);
+
+  variantField_21:double (id: 21);
+
+  variantField_25:LinkedNodeType (id: 25);
+
+  variantField_26:LinkedNodeFormalParameterKind (id: 26);
+
+  variantField_30:string (id: 30);
+
+  variantField_14:LinkedNode (id: 14);
+
+  isSynthetic:bool (id: 1);
+
+  kind:LinkedNodeKind (id: 0);
+
+  variantField_20:string (id: 20);
+
+  variantField_31:bool (id: 31);
+
+  variantField_22:string (id: 22);
+
+  variantField_32:LinkedNodeVariablesDeclaration (id: 32);
+}
+
+/// Information about a group of libraries linked together, for example because
+/// they form a single cycle, or because they represent a single build artifact.
+table LinkedNodeBundle {
+  libraries:[LinkedNodeLibrary] (id: 1);
+
+  /// The shared list of references used in the [libraries].
+  references:LinkedNodeReferences (id: 0);
+}
+
+/// Information about a single library in a [LinkedNodeBundle].
+table LinkedNodeLibrary {
+  exports:[uint] (id: 2);
+
+  name:string (id: 3);
+
+  nameLength:uint (id: 5);
+
+  nameOffset:uint (id: 4);
+
+  units:[LinkedNodeUnit] (id: 1);
+
+  uriStr:string (id: 0);
+}
+
+/// Flattened tree of declarations referenced from [LinkedNode]s.
+table LinkedNodeReferences {
+  name:[string] (id: 1);
+
+  parent:[uint] (id: 0);
+}
+
+/// Information about a Dart type.
+table LinkedNodeType {
+  functionFormalParameters:[LinkedNodeTypeFormalParameter] (id: 0);
+
+  functionReturnType:LinkedNodeType (id: 1);
+
+  functionTypeParameters:[LinkedNodeTypeTypeParameter] (id: 2);
+
+  genericTypeAliasReference:uint (id: 7);
+
+  genericTypeAliasTypeArguments:[LinkedNodeType] (id: 8);
+
+  /// Reference to a [LinkedNodeReferences].
+  interfaceClass:uint (id: 3);
+
+  interfaceTypeArguments:[LinkedNodeType] (id: 4);
+
+  kind:LinkedNodeTypeKind (id: 5);
+
+  typeParameterId:uint (id: 6);
+}
+
+/// Information about a formal parameter in a function type.
+table LinkedNodeTypeFormalParameter {
+  kind:LinkedNodeFormalParameterKind (id: 0);
+
+  name:string (id: 1);
+
+  type:LinkedNodeType (id: 2);
+}
+
+/// Information about a type parameter in a function type.
+table LinkedNodeTypeTypeParameter {
+  bound:LinkedNodeType (id: 1);
+
+  name:string (id: 0);
+}
+
+/// Information about a single library in a [LinkedNodeLibrary].
+table LinkedNodeUnit {
+  node:LinkedNode (id: 2);
+
+  tokens:UnlinkedTokens (id: 1);
+
+  uriStr:string (id: 0);
+}
+
+/// Information about a top-level declaration, or a field declaration that
+/// contributes information to [LinkedNodeKind.variableDeclaration].
+table LinkedNodeVariablesDeclaration {
+  comment:LinkedNode (id: 0);
+
+  isConst:bool (id: 1);
+
+  isCovariant:bool (id: 2);
+
+  isFinal:bool (id: 3);
+
+  isStatic:bool (id: 4);
+}
+
 /// Information about the resolution of an [UnlinkedReference].
 table LinkedReference {
   /// If this [LinkedReference] doesn't have an associated [UnlinkedReference],
@@ -1988,6 +2843,38 @@
   prefixReference:uint (id: 1);
 }
 
+/// TODO(scheglov) document
+table UnlinkedTokens {
+  /// The token that corresponds to this token, or `0` if this token is not
+  /// the first of a pair of matching tokens (such as parentheses).
+  endGroup:[uint] (id: 0);
+
+  /// Return `true` if this token is a synthetic token. A synthetic token is a
+  /// token that was introduced by the parser in order to recover from an error
+  /// in the code.
+  isSynthetic:[ubyte] (id: 1);
+
+  kind:[UnlinkedTokenKind] (id: 2);
+
+  length:[uint] (id: 3);
+
+  lexeme:[string] (id: 4);
+
+  /// The next token in the token stream, `0` for [UnlinkedTokenType.EOF] or
+  /// the last comment token.
+  next:[uint] (id: 5);
+
+  offset:[uint] (id: 6);
+
+  /// The first comment token in the list of comments that precede this token,
+  /// or `0` if there are no comments preceding this token. Additional comments
+  /// can be reached by following the token stream using [next] until `0` is
+  /// reached.
+  precedingComment:[uint] (id: 7);
+
+  type:[UnlinkedTokenType] (id: 8);
+}
+
 /// Unlinked summary information about a typedef declaration.
 table UnlinkedTypedef {
   /// Annotations for this typedef.
diff --git a/pkg/analyzer/lib/src/summary/idl.dart b/pkg/analyzer/lib/src/summary/idl.dart
index 6e3a1d8..0bf34e0 100644
--- a/pkg/analyzer/lib/src/summary/idl.dart
+++ b/pkg/analyzer/lib/src/summary/idl.dart
@@ -14,6 +14,8 @@
 ///   a default value of zero.
 /// - Getters of type String never return null, and have a default value of ''.
 /// - Getters of type bool never return null, and have a default value of false.
+/// - Getters of type double never return null, and have a default value of
+///   `0.0`.
 /// - Getters whose type is an enum never return null, and have a default value
 ///   of the first value declared in the enum.
 ///
@@ -40,7 +42,7 @@
 import 'package:analyzer/dart/element/element.dart';
 
 import 'base.dart' as base;
-import 'base.dart' show Id, TopLevel;
+import 'base.dart' show Id, TopLevel, Variant, VariantId;
 import 'format.dart' as generated;
 
 /// Annotation describing information which is not part of Dart semantics; in
@@ -286,72 +288,76 @@
 /// Information about a single declaration.
 abstract class AvailableDeclaration extends base.SummaryClass {
   @Id(0)
-  String get docComplete;
+  List<AvailableDeclaration> get children;
 
   @Id(1)
-  String get docSummary;
+  String get defaultArgumentListString;
 
   @Id(2)
-  int get fieldMask;
+  List<int> get defaultArgumentListTextRanges;
 
-  /// The kind of the declaration.
   @Id(3)
-  AvailableDeclarationKind get kind;
+  String get docComplete;
 
   @Id(4)
-  bool get isAbstract;
+  String get docSummary;
 
   @Id(5)
-  bool get isConst;
+  int get fieldMask;
 
   @Id(6)
-  bool get isDeprecated;
+  bool get isAbstract;
 
   @Id(7)
+  bool get isConst;
+
+  @Id(8)
+  bool get isDeprecated;
+
+  @Id(9)
   bool get isFinal;
 
+  /// The kind of the declaration.
+  @Id(10)
+  AvailableDeclarationKind get kind;
+
+  @Id(11)
+  int get locationOffset;
+
+  @Id(12)
+  int get locationStartColumn;
+
+  @Id(13)
+  int get locationStartLine;
+
   /// The first part of the declaration name, usually the only one, for example
   /// the name of a class like `MyClass`, or a function like `myFunction`.
-  @Id(8)
+  @Id(14)
   String get name;
 
-  /// The second, optional, part of the declaration name.  For example enum
-  /// constants all have the same [name], but their own [name2].
-  @Id(9)
-  String get name2;
-
-  @Id(10)
-  int get locationOffset;
-
-  @Id(11)
-  int get locationStartColumn;
-
-  @Id(12)
-  int get locationStartLine;
-
-  @Id(13)
+  @Id(15)
   List<String> get parameterNames;
 
-  @Id(14)
+  @Id(16)
   String get parameters;
 
-  @Id(15)
+  @Id(17)
   List<String> get parameterTypes;
 
-  @Id(16)
-  int get requiredParameterCount;
-
   /// The partial list of relevance tags.  Not every declaration has one (for
   /// example, function do not currently), and not every declaration has to
   /// store one (for classes it can be computed when we know the library that
   /// includes this file).
-  @Id(17)
+  @Id(18)
   List<String> get relevanceTags;
 
-  @Id(18)
+  @Id(19)
+  int get requiredParameterCount;
+
+  @Id(20)
   String get returnType;
 
-  @Id(19)
+  @Id(21)
   String get typeParameters;
 }
 
@@ -359,6 +365,7 @@
 enum AvailableDeclarationKind {
   CLASS,
   CLASS_TYPE_ALIAS,
+  CONSTRUCTOR,
   ENUM,
   ENUM_CONSTANT,
   FUNCTION,
@@ -379,6 +386,10 @@
   @Id(0)
   List<AvailableDeclaration> get declarations;
 
+  /// The Dartdoc directives in the file.
+  @Id(5)
+  DirectiveInfo get directiveInfo;
+
   /// Exports directives of the file.
   @Id(1)
   List<AvailableFileExport> get exports;
@@ -429,6 +440,17 @@
   int get offset;
 }
 
+/// Information about the Dartdoc directives in an [AvailableFile].
+abstract class DirectiveInfo extends base.SummaryClass {
+  /// The names of the defined templates.
+  @Id(0)
+  List<String> get templateNames;
+
+  /// The values of the defined templates.
+  @Id(1)
+  List<String> get templateValues;
+}
+
 /// Summary information about a reference to an entity such as a type, top level
 /// executable, or executable within a class.
 abstract class EntityRef extends base.SummaryClass {
@@ -743,6 +765,1855 @@
   List<LinkedUnit> get units;
 }
 
+/// Information about a linked AST node.
+@Variant('kind')
+abstract class LinkedNode extends base.SummaryClass {
+  /// The explicit or inferred return type of a function typed node.
+  @VariantId(24, variantList: [
+    LinkedNodeKind.functionDeclaration,
+    LinkedNodeKind.functionExpression,
+    LinkedNodeKind.functionTypeAlias,
+    LinkedNodeKind.genericFunctionType,
+    LinkedNodeKind.methodDeclaration,
+  ])
+  LinkedNodeType get actualReturnType;
+
+  /// The explicit or inferred type of a variable.
+  @VariantId(24, variantList: [
+    LinkedNodeKind.fieldFormalParameter,
+    LinkedNodeKind.functionTypedFormalParameter,
+    LinkedNodeKind.simpleFormalParameter,
+    LinkedNodeKind.variableDeclaration,
+  ])
+  LinkedNodeType get actualType;
+
+  @VariantId(2, variant: LinkedNodeKind.adjacentStrings)
+  List<LinkedNode> get adjacentStrings_strings;
+
+  @VariantId(11, variantList: [
+    LinkedNodeKind.classDeclaration,
+    LinkedNodeKind.classTypeAlias,
+    LinkedNodeKind.constructorDeclaration,
+    LinkedNodeKind.declaredIdentifier,
+    LinkedNodeKind.enumDeclaration,
+    LinkedNodeKind.enumConstantDeclaration,
+    LinkedNodeKind.exportDirective,
+    LinkedNodeKind.fieldDeclaration,
+    LinkedNodeKind.functionDeclaration,
+    LinkedNodeKind.functionTypeAlias,
+    LinkedNodeKind.genericTypeAlias,
+    LinkedNodeKind.importDirective,
+    LinkedNodeKind.libraryDirective,
+    LinkedNodeKind.methodDeclaration,
+    LinkedNodeKind.mixinDeclaration,
+    LinkedNodeKind.partDirective,
+    LinkedNodeKind.partOfDirective,
+    LinkedNodeKind.topLevelVariableDeclaration,
+    LinkedNodeKind.typeParameter,
+    LinkedNodeKind.variableDeclaration,
+    LinkedNodeKind.variableDeclarationList,
+  ])
+  LinkedNode get annotatedNode_comment;
+
+  @VariantId(4, variantList: [
+    LinkedNodeKind.classDeclaration,
+    LinkedNodeKind.classTypeAlias,
+    LinkedNodeKind.constructorDeclaration,
+    LinkedNodeKind.declaredIdentifier,
+    LinkedNodeKind.enumDeclaration,
+    LinkedNodeKind.enumConstantDeclaration,
+    LinkedNodeKind.exportDirective,
+    LinkedNodeKind.fieldDeclaration,
+    LinkedNodeKind.functionDeclaration,
+    LinkedNodeKind.functionTypeAlias,
+    LinkedNodeKind.genericTypeAlias,
+    LinkedNodeKind.importDirective,
+    LinkedNodeKind.libraryDirective,
+    LinkedNodeKind.methodDeclaration,
+    LinkedNodeKind.mixinDeclaration,
+    LinkedNodeKind.partDirective,
+    LinkedNodeKind.partOfDirective,
+    LinkedNodeKind.topLevelVariableDeclaration,
+    LinkedNodeKind.typeParameter,
+    LinkedNodeKind.variableDeclaration,
+    LinkedNodeKind.variableDeclarationList,
+  ])
+  List<LinkedNode> get annotatedNode_metadata;
+
+  @VariantId(6, variant: LinkedNodeKind.annotation)
+  LinkedNode get annotation_arguments;
+
+  @VariantId(15, variant: LinkedNodeKind.annotation)
+  int get annotation_atSign;
+
+  @VariantId(7, variant: LinkedNodeKind.annotation)
+  LinkedNode get annotation_constructorName;
+
+  @VariantId(8, variant: LinkedNodeKind.annotation)
+  LinkedNode get annotation_name;
+
+  @VariantId(16, variant: LinkedNodeKind.annotation)
+  int get annotation_period;
+
+  @VariantId(2, variant: LinkedNodeKind.argumentList)
+  List<LinkedNode> get argumentList_arguments;
+
+  @VariantId(15, variant: LinkedNodeKind.argumentList)
+  int get argumentList_leftParenthesis;
+
+  @VariantId(16, variant: LinkedNodeKind.argumentList)
+  int get argumentList_rightParenthesis;
+
+  @VariantId(15, variant: LinkedNodeKind.asExpression)
+  int get asExpression_asOperator;
+
+  @VariantId(6, variant: LinkedNodeKind.asExpression)
+  LinkedNode get asExpression_expression;
+
+  @VariantId(7, variant: LinkedNodeKind.asExpression)
+  LinkedNode get asExpression_type;
+
+  @VariantId(15, variant: LinkedNodeKind.assertInitializer)
+  int get assertInitializer_assertKeyword;
+
+  @VariantId(16, variant: LinkedNodeKind.assertInitializer)
+  int get assertInitializer_comma;
+
+  @VariantId(6, variant: LinkedNodeKind.assertInitializer)
+  LinkedNode get assertInitializer_condition;
+
+  @VariantId(17, variant: LinkedNodeKind.assertInitializer)
+  int get assertInitializer_leftParenthesis;
+
+  @VariantId(7, variant: LinkedNodeKind.assertInitializer)
+  LinkedNode get assertInitializer_message;
+
+  @VariantId(18, variant: LinkedNodeKind.assertInitializer)
+  int get assertInitializer_rightParenthesis;
+
+  @VariantId(15, variant: LinkedNodeKind.assertStatement)
+  int get assertStatement_assertKeyword;
+
+  @VariantId(16, variant: LinkedNodeKind.assertStatement)
+  int get assertStatement_comma;
+
+  @VariantId(6, variant: LinkedNodeKind.assertStatement)
+  LinkedNode get assertStatement_condition;
+
+  @VariantId(17, variant: LinkedNodeKind.assertStatement)
+  int get assertStatement_leftParenthesis;
+
+  @VariantId(7, variant: LinkedNodeKind.assertStatement)
+  LinkedNode get assertStatement_message;
+
+  @VariantId(18, variant: LinkedNodeKind.assertStatement)
+  int get assertStatement_rightParenthesis;
+
+  @VariantId(19, variant: LinkedNodeKind.assertStatement)
+  int get assertStatement_semicolon;
+
+  @VariantId(15, variant: LinkedNodeKind.assignmentExpression)
+  int get assignmentExpression_element;
+
+  @VariantId(23, variant: LinkedNodeKind.assignmentExpression)
+  LinkedNodeType get assignmentExpression_elementType;
+
+  @VariantId(6, variant: LinkedNodeKind.assignmentExpression)
+  LinkedNode get assignmentExpression_leftHandSide;
+
+  @VariantId(16, variant: LinkedNodeKind.assignmentExpression)
+  int get assignmentExpression_operator;
+
+  @VariantId(7, variant: LinkedNodeKind.assignmentExpression)
+  LinkedNode get assignmentExpression_rightHandSide;
+
+  @VariantId(15, variant: LinkedNodeKind.awaitExpression)
+  int get awaitExpression_awaitKeyword;
+
+  @VariantId(6, variant: LinkedNodeKind.awaitExpression)
+  LinkedNode get awaitExpression_expression;
+
+  @VariantId(15, variant: LinkedNodeKind.binaryExpression)
+  int get binaryExpression_element;
+
+  @VariantId(23, variant: LinkedNodeKind.binaryExpression)
+  LinkedNodeType get binaryExpression_elementType;
+
+  @VariantId(24, variant: LinkedNodeKind.binaryExpression)
+  LinkedNodeType get binaryExpression_invokeType;
+
+  @VariantId(6, variant: LinkedNodeKind.binaryExpression)
+  LinkedNode get binaryExpression_leftOperand;
+
+  @VariantId(16, variant: LinkedNodeKind.binaryExpression)
+  int get binaryExpression_operator;
+
+  @VariantId(7, variant: LinkedNodeKind.binaryExpression)
+  LinkedNode get binaryExpression_rightOperand;
+
+  @VariantId(15, variant: LinkedNodeKind.block)
+  int get block_leftBracket;
+
+  @VariantId(16, variant: LinkedNodeKind.block)
+  int get block_rightBracket;
+
+  @VariantId(2, variant: LinkedNodeKind.block)
+  List<LinkedNode> get block_statements;
+
+  @VariantId(6, variant: LinkedNodeKind.blockFunctionBody)
+  LinkedNode get blockFunctionBody_block;
+
+  @VariantId(15, variant: LinkedNodeKind.blockFunctionBody)
+  int get blockFunctionBody_keyword;
+
+  @VariantId(16, variant: LinkedNodeKind.blockFunctionBody)
+  int get blockFunctionBody_star;
+
+  @VariantId(15, variant: LinkedNodeKind.booleanLiteral)
+  int get booleanLiteral_literal;
+
+  @VariantId(27, variant: LinkedNodeKind.booleanLiteral)
+  bool get booleanLiteral_value;
+
+  @VariantId(15, variant: LinkedNodeKind.breakStatement)
+  int get breakStatement_breakKeyword;
+
+  @VariantId(6, variant: LinkedNodeKind.breakStatement)
+  LinkedNode get breakStatement_label;
+
+  @VariantId(16, variant: LinkedNodeKind.breakStatement)
+  int get breakStatement_semicolon;
+
+  @VariantId(2, variant: LinkedNodeKind.cascadeExpression)
+  List<LinkedNode> get cascadeExpression_sections;
+
+  @VariantId(6, variant: LinkedNodeKind.cascadeExpression)
+  LinkedNode get cascadeExpression_target;
+
+  @VariantId(6, variant: LinkedNodeKind.catchClause)
+  LinkedNode get catchClause_body;
+
+  @VariantId(15, variant: LinkedNodeKind.catchClause)
+  int get catchClause_catchKeyword;
+
+  @VariantId(16, variant: LinkedNodeKind.catchClause)
+  int get catchClause_comma;
+
+  @VariantId(7, variant: LinkedNodeKind.catchClause)
+  LinkedNode get catchClause_exceptionParameter;
+
+  @VariantId(8, variant: LinkedNodeKind.catchClause)
+  LinkedNode get catchClause_exceptionType;
+
+  @VariantId(17, variant: LinkedNodeKind.catchClause)
+  int get catchClause_leftParenthesis;
+
+  @VariantId(18, variant: LinkedNodeKind.catchClause)
+  int get catchClause_onKeyword;
+
+  @VariantId(19, variant: LinkedNodeKind.catchClause)
+  int get catchClause_rightParenthesis;
+
+  @VariantId(9, variant: LinkedNodeKind.catchClause)
+  LinkedNode get catchClause_stackTraceParameter;
+
+  @VariantId(15, variant: LinkedNodeKind.classDeclaration)
+  int get classDeclaration_abstractKeyword;
+
+  @VariantId(16, variant: LinkedNodeKind.classDeclaration)
+  int get classDeclaration_classKeyword;
+
+  @VariantId(6, variant: LinkedNodeKind.classDeclaration)
+  LinkedNode get classDeclaration_extendsClause;
+
+  @VariantId(27, variant: LinkedNodeKind.classDeclaration)
+  bool get classDeclaration_isDartObject;
+
+  @VariantId(8, variant: LinkedNodeKind.classDeclaration)
+  LinkedNode get classDeclaration_nativeClause;
+
+  @VariantId(7, variant: LinkedNodeKind.classDeclaration)
+  LinkedNode get classDeclaration_withClause;
+
+  @VariantId(12, variantList: [
+    LinkedNodeKind.classDeclaration,
+    LinkedNodeKind.mixinDeclaration,
+  ])
+  LinkedNode get classOrMixinDeclaration_implementsClause;
+
+  @VariantId(19, variantList: [
+    LinkedNodeKind.classDeclaration,
+    LinkedNodeKind.mixinDeclaration,
+  ])
+  int get classOrMixinDeclaration_leftBracket;
+
+  @VariantId(5, variantList: [
+    LinkedNodeKind.classDeclaration,
+    LinkedNodeKind.mixinDeclaration,
+  ])
+  List<LinkedNode> get classOrMixinDeclaration_members;
+
+  @VariantId(18, variantList: [
+    LinkedNodeKind.classDeclaration,
+    LinkedNodeKind.mixinDeclaration,
+  ])
+  int get classOrMixinDeclaration_rightBracket;
+
+  @VariantId(13, variantList: [
+    LinkedNodeKind.classDeclaration,
+    LinkedNodeKind.mixinDeclaration,
+  ])
+  LinkedNode get classOrMixinDeclaration_typeParameters;
+
+  @VariantId(15, variant: LinkedNodeKind.classTypeAlias)
+  int get classTypeAlias_abstractKeyword;
+
+  @VariantId(16, variant: LinkedNodeKind.classTypeAlias)
+  int get classTypeAlias_equals;
+
+  @VariantId(9, variant: LinkedNodeKind.classTypeAlias)
+  LinkedNode get classTypeAlias_implementsClause;
+
+  @VariantId(7, variant: LinkedNodeKind.classTypeAlias)
+  LinkedNode get classTypeAlias_superclass;
+
+  @VariantId(6, variant: LinkedNodeKind.classTypeAlias)
+  LinkedNode get classTypeAlias_typeParameters;
+
+  @VariantId(8, variant: LinkedNodeKind.classTypeAlias)
+  LinkedNode get classTypeAlias_withClause;
+
+  @VariantId(34, variantList: [
+    LinkedNodeKind.classDeclaration,
+    LinkedNodeKind.classTypeAlias,
+    LinkedNodeKind.constructorDeclaration,
+    LinkedNodeKind.defaultFormalParameter,
+    LinkedNodeKind.enumDeclaration,
+    LinkedNodeKind.fieldFormalParameter,
+    LinkedNodeKind.functionDeclaration,
+    LinkedNodeKind.functionTypeAlias,
+    LinkedNodeKind.functionTypedFormalParameter,
+    LinkedNodeKind.genericTypeAlias,
+    LinkedNodeKind.methodDeclaration,
+    LinkedNodeKind.mixinDeclaration,
+    LinkedNodeKind.simpleFormalParameter,
+    LinkedNodeKind.typeParameter,
+    LinkedNodeKind.variableDeclaration,
+  ])
+  int get codeLength;
+
+  @VariantId(33, variantList: [
+    LinkedNodeKind.classDeclaration,
+    LinkedNodeKind.classTypeAlias,
+    LinkedNodeKind.constructorDeclaration,
+    LinkedNodeKind.defaultFormalParameter,
+    LinkedNodeKind.enumDeclaration,
+    LinkedNodeKind.fieldFormalParameter,
+    LinkedNodeKind.functionDeclaration,
+    LinkedNodeKind.functionTypeAlias,
+    LinkedNodeKind.functionTypedFormalParameter,
+    LinkedNodeKind.genericTypeAlias,
+    LinkedNodeKind.methodDeclaration,
+    LinkedNodeKind.mixinDeclaration,
+    LinkedNodeKind.simpleFormalParameter,
+    LinkedNodeKind.typeParameter,
+    LinkedNodeKind.variableDeclaration,
+  ])
+  int get codeOffset;
+
+  @VariantId(19, variantList: [
+    LinkedNodeKind.hideCombinator,
+    LinkedNodeKind.showCombinator,
+  ])
+  int get combinator_keyword;
+
+  @VariantId(28, variant: LinkedNodeKind.comment)
+  List<int> get comment_tokens;
+
+  @VariantId(29, variant: LinkedNodeKind.comment)
+  LinkedNodeCommentType get comment_type;
+
+  @VariantId(15, variant: LinkedNodeKind.compilationUnit)
+  int get compilationUnit_beginToken;
+
+  @VariantId(2, variant: LinkedNodeKind.compilationUnit)
+  List<LinkedNode> get compilationUnit_declarations;
+
+  @VariantId(3, variant: LinkedNodeKind.compilationUnit)
+  List<LinkedNode> get compilationUnit_directives;
+
+  @VariantId(16, variant: LinkedNodeKind.compilationUnit)
+  int get compilationUnit_endToken;
+
+  @VariantId(6, variant: LinkedNodeKind.compilationUnit)
+  LinkedNode get compilationUnit_scriptTag;
+
+  @VariantId(15, variant: LinkedNodeKind.conditionalExpression)
+  int get conditionalExpression_colon;
+
+  @VariantId(6, variant: LinkedNodeKind.conditionalExpression)
+  LinkedNode get conditionalExpression_condition;
+
+  @VariantId(7, variant: LinkedNodeKind.conditionalExpression)
+  LinkedNode get conditionalExpression_elseExpression;
+
+  @VariantId(16, variant: LinkedNodeKind.conditionalExpression)
+  int get conditionalExpression_question;
+
+  @VariantId(8, variant: LinkedNodeKind.conditionalExpression)
+  LinkedNode get conditionalExpression_thenExpression;
+
+  @VariantId(18, variant: LinkedNodeKind.configuration)
+  int get configuration_equalToken;
+
+  @VariantId(15, variant: LinkedNodeKind.configuration)
+  int get configuration_ifKeyword;
+
+  @VariantId(16, variant: LinkedNodeKind.configuration)
+  int get configuration_leftParenthesis;
+
+  @VariantId(6, variant: LinkedNodeKind.configuration)
+  LinkedNode get configuration_name;
+
+  @VariantId(17, variant: LinkedNodeKind.configuration)
+  int get configuration_rightParenthesis;
+
+  @VariantId(8, variant: LinkedNodeKind.configuration)
+  LinkedNode get configuration_uri;
+
+  @VariantId(7, variant: LinkedNodeKind.configuration)
+  LinkedNode get configuration_value;
+
+  @VariantId(6, variant: LinkedNodeKind.constructorDeclaration)
+  LinkedNode get constructorDeclaration_body;
+
+  @VariantId(15, variant: LinkedNodeKind.constructorDeclaration)
+  int get constructorDeclaration_constKeyword;
+
+  @VariantId(16, variant: LinkedNodeKind.constructorDeclaration)
+  int get constructorDeclaration_externalKeyword;
+
+  @VariantId(17, variant: LinkedNodeKind.constructorDeclaration)
+  int get constructorDeclaration_factoryKeyword;
+
+  @VariantId(2, variant: LinkedNodeKind.constructorDeclaration)
+  List<LinkedNode> get constructorDeclaration_initializers;
+
+  @VariantId(7, variant: LinkedNodeKind.constructorDeclaration)
+  LinkedNode get constructorDeclaration_name;
+
+  @VariantId(8, variant: LinkedNodeKind.constructorDeclaration)
+  LinkedNode get constructorDeclaration_parameters;
+
+  @VariantId(18, variant: LinkedNodeKind.constructorDeclaration)
+  int get constructorDeclaration_period;
+
+  @VariantId(9, variant: LinkedNodeKind.constructorDeclaration)
+  LinkedNode get constructorDeclaration_redirectedConstructor;
+
+  @VariantId(10, variant: LinkedNodeKind.constructorDeclaration)
+  LinkedNode get constructorDeclaration_returnType;
+
+  @VariantId(19, variant: LinkedNodeKind.constructorDeclaration)
+  int get constructorDeclaration_separator;
+
+  @VariantId(15, variant: LinkedNodeKind.constructorFieldInitializer)
+  int get constructorFieldInitializer_equals;
+
+  @VariantId(6, variant: LinkedNodeKind.constructorFieldInitializer)
+  LinkedNode get constructorFieldInitializer_expression;
+
+  @VariantId(7, variant: LinkedNodeKind.constructorFieldInitializer)
+  LinkedNode get constructorFieldInitializer_fieldName;
+
+  @VariantId(16, variant: LinkedNodeKind.constructorFieldInitializer)
+  int get constructorFieldInitializer_period;
+
+  @VariantId(17, variant: LinkedNodeKind.constructorFieldInitializer)
+  int get constructorFieldInitializer_thisKeyword;
+
+  @VariantId(15, variant: LinkedNodeKind.constructorName)
+  int get constructorName_element;
+
+  @VariantId(23, variant: LinkedNodeKind.constructorName)
+  LinkedNodeType get constructorName_elementType;
+
+  @VariantId(6, variant: LinkedNodeKind.constructorName)
+  LinkedNode get constructorName_name;
+
+  @VariantId(16, variant: LinkedNodeKind.constructorName)
+  int get constructorName_period;
+
+  @VariantId(7, variant: LinkedNodeKind.constructorName)
+  LinkedNode get constructorName_type;
+
+  @VariantId(15, variant: LinkedNodeKind.continueStatement)
+  int get continueStatement_continueKeyword;
+
+  @VariantId(6, variant: LinkedNodeKind.continueStatement)
+  LinkedNode get continueStatement_label;
+
+  @VariantId(16, variant: LinkedNodeKind.continueStatement)
+  int get continueStatement_semicolon;
+
+  @VariantId(6, variant: LinkedNodeKind.declaredIdentifier)
+  LinkedNode get declaredIdentifier_identifier;
+
+  @VariantId(15, variant: LinkedNodeKind.declaredIdentifier)
+  int get declaredIdentifier_keyword;
+
+  @VariantId(7, variant: LinkedNodeKind.declaredIdentifier)
+  LinkedNode get declaredIdentifier_type;
+
+  @VariantId(6, variant: LinkedNodeKind.defaultFormalParameter)
+  LinkedNode get defaultFormalParameter_defaultValue;
+
+  @VariantId(27, variant: LinkedNodeKind.defaultFormalParameter)
+  bool get defaultFormalParameter_isNamed;
+
+  @VariantId(7, variant: LinkedNodeKind.defaultFormalParameter)
+  LinkedNode get defaultFormalParameter_parameter;
+
+  @VariantId(15, variant: LinkedNodeKind.defaultFormalParameter)
+  int get defaultFormalParameter_separator;
+
+  @VariantId(18, variantList: [
+    LinkedNodeKind.exportDirective,
+    LinkedNodeKind.importDirective,
+    LinkedNodeKind.libraryDirective,
+    LinkedNodeKind.partDirective,
+    LinkedNodeKind.partOfDirective,
+  ])
+  int get directive_keyword;
+
+  @VariantId(33, variantList: [
+    LinkedNodeKind.exportDirective,
+    LinkedNodeKind.importDirective,
+    LinkedNodeKind.libraryDirective,
+    LinkedNodeKind.partDirective,
+    LinkedNodeKind.partOfDirective,
+  ])
+  int get directive_semicolon;
+
+  @VariantId(6, variant: LinkedNodeKind.doStatement)
+  LinkedNode get doStatement_body;
+
+  @VariantId(7, variant: LinkedNodeKind.doStatement)
+  LinkedNode get doStatement_condition;
+
+  @VariantId(17, variant: LinkedNodeKind.doStatement)
+  int get doStatement_doKeyword;
+
+  @VariantId(15, variant: LinkedNodeKind.doStatement)
+  int get doStatement_leftParenthesis;
+
+  @VariantId(16, variant: LinkedNodeKind.doStatement)
+  int get doStatement_rightParenthesis;
+
+  @VariantId(18, variant: LinkedNodeKind.doStatement)
+  int get doStatement_semicolon;
+
+  @VariantId(19, variant: LinkedNodeKind.doStatement)
+  int get doStatement_whileKeyword;
+
+  @VariantId(2, variant: LinkedNodeKind.dottedName)
+  List<LinkedNode> get dottedName_components;
+
+  @VariantId(15, variant: LinkedNodeKind.doubleLiteral)
+  int get doubleLiteral_literal;
+
+  @VariantId(21, variant: LinkedNodeKind.doubleLiteral)
+  double get doubleLiteral_value;
+
+  @VariantId(15, variant: LinkedNodeKind.emptyFunctionBody)
+  int get emptyFunctionBody_semicolon;
+
+  @VariantId(15, variant: LinkedNodeKind.emptyStatement)
+  int get emptyStatement_semicolon;
+
+  @VariantId(6, variant: LinkedNodeKind.enumConstantDeclaration)
+  LinkedNode get enumConstantDeclaration_name;
+
+  @VariantId(2, variant: LinkedNodeKind.enumDeclaration)
+  List<LinkedNode> get enumDeclaration_constants;
+
+  @VariantId(15, variant: LinkedNodeKind.enumDeclaration)
+  int get enumDeclaration_enumKeyword;
+
+  @VariantId(16, variant: LinkedNodeKind.enumDeclaration)
+  int get enumDeclaration_leftBracket;
+
+  @VariantId(17, variant: LinkedNodeKind.enumDeclaration)
+  int get enumDeclaration_rightBracket;
+
+  @VariantId(25, variantList: [
+    LinkedNodeKind.adjacentStrings,
+    LinkedNodeKind.assignmentExpression,
+    LinkedNodeKind.asExpression,
+    LinkedNodeKind.awaitExpression,
+    LinkedNodeKind.binaryExpression,
+    LinkedNodeKind.booleanLiteral,
+    LinkedNodeKind.cascadeExpression,
+    LinkedNodeKind.conditionalExpression,
+    LinkedNodeKind.doubleLiteral,
+    LinkedNodeKind.functionExpressionInvocation,
+    LinkedNodeKind.indexExpression,
+    LinkedNodeKind.instanceCreationExpression,
+    LinkedNodeKind.integerLiteral,
+    LinkedNodeKind.isExpression,
+    LinkedNodeKind.listLiteral,
+    LinkedNodeKind.methodInvocation,
+    LinkedNodeKind.namedExpression,
+    LinkedNodeKind.nullLiteral,
+    LinkedNodeKind.parenthesizedExpression,
+    LinkedNodeKind.prefixExpression,
+    LinkedNodeKind.prefixedIdentifier,
+    LinkedNodeKind.propertyAccess,
+    LinkedNodeKind.postfixExpression,
+    LinkedNodeKind.rethrowExpression,
+    LinkedNodeKind.setOrMapLiteral,
+    LinkedNodeKind.simpleIdentifier,
+    LinkedNodeKind.simpleStringLiteral,
+    LinkedNodeKind.stringInterpolation,
+    LinkedNodeKind.superExpression,
+    LinkedNodeKind.symbolLiteral,
+    LinkedNodeKind.thisExpression,
+    LinkedNodeKind.throwExpression,
+  ])
+  LinkedNodeType get expression_type;
+
+  @VariantId(15, variant: LinkedNodeKind.expressionFunctionBody)
+  int get expressionFunctionBody_arrow;
+
+  @VariantId(6, variant: LinkedNodeKind.expressionFunctionBody)
+  LinkedNode get expressionFunctionBody_expression;
+
+  @VariantId(16, variant: LinkedNodeKind.expressionFunctionBody)
+  int get expressionFunctionBody_keyword;
+
+  @VariantId(17, variant: LinkedNodeKind.expressionFunctionBody)
+  int get expressionFunctionBody_semicolon;
+
+  @VariantId(6, variant: LinkedNodeKind.expressionStatement)
+  LinkedNode get expressionStatement_expression;
+
+  @VariantId(15, variant: LinkedNodeKind.expressionStatement)
+  int get expressionStatement_semicolon;
+
+  @VariantId(15, variant: LinkedNodeKind.extendsClause)
+  int get extendsClause_extendsKeyword;
+
+  @VariantId(6, variant: LinkedNodeKind.extendsClause)
+  LinkedNode get extendsClause_superclass;
+
+  @VariantId(15, variant: LinkedNodeKind.fieldDeclaration)
+  int get fieldDeclaration_covariantKeyword;
+
+  @VariantId(6, variant: LinkedNodeKind.fieldDeclaration)
+  LinkedNode get fieldDeclaration_fields;
+
+  @VariantId(16, variant: LinkedNodeKind.fieldDeclaration)
+  int get fieldDeclaration_semicolon;
+
+  @VariantId(17, variant: LinkedNodeKind.fieldDeclaration)
+  int get fieldDeclaration_staticKeyword;
+
+  @VariantId(8, variant: LinkedNodeKind.fieldFormalParameter)
+  LinkedNode get fieldFormalParameter_formalParameters;
+
+  @VariantId(15, variant: LinkedNodeKind.fieldFormalParameter)
+  int get fieldFormalParameter_keyword;
+
+  @VariantId(16, variant: LinkedNodeKind.fieldFormalParameter)
+  int get fieldFormalParameter_period;
+
+  @VariantId(17, variant: LinkedNodeKind.fieldFormalParameter)
+  int get fieldFormalParameter_thisKeyword;
+
+  @VariantId(6, variant: LinkedNodeKind.fieldFormalParameter)
+  LinkedNode get fieldFormalParameter_type;
+
+  @VariantId(7, variant: LinkedNodeKind.fieldFormalParameter)
+  LinkedNode get fieldFormalParameter_typeParameters;
+
+  @VariantId(15, variantList: [
+    LinkedNodeKind.forEachPartsWithDeclaration,
+    LinkedNodeKind.forEachPartsWithIdentifier,
+  ])
+  int get forEachParts_inKeyword;
+
+  @VariantId(6, variantList: [
+    LinkedNodeKind.forEachPartsWithDeclaration,
+    LinkedNodeKind.forEachPartsWithIdentifier,
+  ])
+  LinkedNode get forEachParts_iterable;
+
+  @VariantId(7, variant: LinkedNodeKind.forEachPartsWithDeclaration)
+  LinkedNode get forEachPartsWithDeclaration_loopVariable;
+
+  @VariantId(7, variant: LinkedNodeKind.forEachPartsWithIdentifier)
+  LinkedNode get forEachPartsWithIdentifier_identifier;
+
+  @VariantId(7, variant: LinkedNodeKind.forElement)
+  LinkedNode get forElement_body;
+
+  @VariantId(26, variantList: [
+    LinkedNodeKind.fieldFormalParameter,
+    LinkedNodeKind.functionTypedFormalParameter,
+    LinkedNodeKind.simpleFormalParameter,
+  ])
+  LinkedNodeFormalParameterKind get formalParameter_kind;
+
+  @VariantId(15, variant: LinkedNodeKind.formalParameterList)
+  int get formalParameterList_leftDelimiter;
+
+  @VariantId(16, variant: LinkedNodeKind.formalParameterList)
+  int get formalParameterList_leftParenthesis;
+
+  @VariantId(2, variant: LinkedNodeKind.formalParameterList)
+  List<LinkedNode> get formalParameterList_parameters;
+
+  @VariantId(17, variant: LinkedNodeKind.formalParameterList)
+  int get formalParameterList_rightDelimiter;
+
+  @VariantId(18, variant: LinkedNodeKind.formalParameterList)
+  int get formalParameterList_rightParenthesis;
+
+  @VariantId(15, variantList: [
+    LinkedNodeKind.forElement,
+    LinkedNodeKind.forStatement,
+  ])
+  int get forMixin_awaitKeyword;
+
+  @VariantId(16, variantList: [
+    LinkedNodeKind.forElement,
+    LinkedNodeKind.forStatement,
+  ])
+  int get forMixin_forKeyword;
+
+  @VariantId(6, variantList: [
+    LinkedNodeKind.forElement,
+    LinkedNodeKind.forStatement,
+  ])
+  LinkedNode get forMixin_forLoopParts;
+
+  @VariantId(17, variantList: [
+    LinkedNodeKind.forElement,
+    LinkedNodeKind.forStatement,
+  ])
+  int get forMixin_leftParenthesis;
+
+  @VariantId(19, variantList: [
+    LinkedNodeKind.forElement,
+    LinkedNodeKind.forStatement,
+  ])
+  int get forMixin_rightParenthesis;
+
+  @VariantId(6, variantList: [
+    LinkedNodeKind.forPartsWithDeclarations,
+    LinkedNodeKind.forPartsWithExpression,
+  ])
+  LinkedNode get forParts_condition;
+
+  @VariantId(15, variantList: [
+    LinkedNodeKind.forPartsWithDeclarations,
+    LinkedNodeKind.forPartsWithExpression,
+  ])
+  int get forParts_leftSeparator;
+
+  @VariantId(16, variantList: [
+    LinkedNodeKind.forPartsWithDeclarations,
+    LinkedNodeKind.forPartsWithExpression,
+  ])
+  int get forParts_rightSeparator;
+
+  @VariantId(5, variantList: [
+    LinkedNodeKind.forPartsWithDeclarations,
+    LinkedNodeKind.forPartsWithExpression,
+  ])
+  List<LinkedNode> get forParts_updaters;
+
+  @VariantId(7, variant: LinkedNodeKind.forPartsWithDeclarations)
+  LinkedNode get forPartsWithDeclarations_variables;
+
+  @VariantId(7, variant: LinkedNodeKind.forPartsWithExpression)
+  LinkedNode get forPartsWithExpression_initialization;
+
+  @VariantId(7, variant: LinkedNodeKind.forStatement)
+  LinkedNode get forStatement_body;
+
+  @VariantId(15, variant: LinkedNodeKind.functionDeclaration)
+  int get functionDeclaration_externalKeyword;
+
+  @VariantId(6, variant: LinkedNodeKind.functionDeclaration)
+  LinkedNode get functionDeclaration_functionExpression;
+
+  @VariantId(16, variant: LinkedNodeKind.functionDeclaration)
+  int get functionDeclaration_propertyKeyword;
+
+  @VariantId(7, variant: LinkedNodeKind.functionDeclaration)
+  LinkedNode get functionDeclaration_returnType;
+
+  @VariantId(6, variant: LinkedNodeKind.functionDeclarationStatement)
+  LinkedNode get functionDeclarationStatement_functionDeclaration;
+
+  @VariantId(6, variant: LinkedNodeKind.functionExpression)
+  LinkedNode get functionExpression_body;
+
+  @VariantId(7, variant: LinkedNodeKind.functionExpression)
+  LinkedNode get functionExpression_formalParameters;
+
+  @VariantId(8, variant: LinkedNodeKind.functionExpression)
+  LinkedNode get functionExpression_typeParameters;
+
+  @VariantId(6, variant: LinkedNodeKind.functionExpressionInvocation)
+  LinkedNode get functionExpressionInvocation_function;
+
+  @VariantId(6, variant: LinkedNodeKind.functionTypeAlias)
+  LinkedNode get functionTypeAlias_formalParameters;
+
+  @VariantId(7, variant: LinkedNodeKind.functionTypeAlias)
+  LinkedNode get functionTypeAlias_returnType;
+
+  @VariantId(8, variant: LinkedNodeKind.functionTypeAlias)
+  LinkedNode get functionTypeAlias_typeParameters;
+
+  @VariantId(6, variant: LinkedNodeKind.functionTypedFormalParameter)
+  LinkedNode get functionTypedFormalParameter_formalParameters;
+
+  @VariantId(7, variant: LinkedNodeKind.functionTypedFormalParameter)
+  LinkedNode get functionTypedFormalParameter_returnType;
+
+  @VariantId(8, variant: LinkedNodeKind.functionTypedFormalParameter)
+  LinkedNode get functionTypedFormalParameter_typeParameters;
+
+  @VariantId(8, variant: LinkedNodeKind.genericFunctionType)
+  LinkedNode get genericFunctionType_formalParameters;
+
+  @VariantId(15, variant: LinkedNodeKind.genericFunctionType)
+  int get genericFunctionType_functionKeyword;
+
+  @VariantId(16, variant: LinkedNodeKind.genericFunctionType)
+  int get genericFunctionType_question;
+
+  @VariantId(7, variant: LinkedNodeKind.genericFunctionType)
+  LinkedNode get genericFunctionType_returnType;
+
+  @VariantId(25, variant: LinkedNodeKind.genericFunctionType)
+  LinkedNodeType get genericFunctionType_type;
+
+  @VariantId(6, variant: LinkedNodeKind.genericFunctionType)
+  LinkedNode get genericFunctionType_typeParameters;
+
+  @VariantId(16, variant: LinkedNodeKind.genericTypeAlias)
+  int get genericTypeAlias_equals;
+
+  @VariantId(7, variant: LinkedNodeKind.genericTypeAlias)
+  LinkedNode get genericTypeAlias_functionType;
+
+  @VariantId(6, variant: LinkedNodeKind.genericTypeAlias)
+  LinkedNode get genericTypeAlias_typeParameters;
+
+  @VariantId(2, variant: LinkedNodeKind.hideCombinator)
+  List<LinkedNode> get hideCombinator_hiddenNames;
+
+  @VariantId(9, variant: LinkedNodeKind.ifElement)
+  LinkedNode get ifElement_elseElement;
+
+  @VariantId(8, variant: LinkedNodeKind.ifElement)
+  LinkedNode get ifElement_thenElement;
+
+  @VariantId(6, variantList: [
+    LinkedNodeKind.ifElement,
+    LinkedNodeKind.ifStatement,
+  ])
+  LinkedNode get ifMixin_condition;
+
+  @VariantId(15, variantList: [
+    LinkedNodeKind.ifElement,
+    LinkedNodeKind.ifStatement,
+  ])
+  int get ifMixin_elseKeyword;
+
+  @VariantId(16, variantList: [
+    LinkedNodeKind.ifElement,
+    LinkedNodeKind.ifStatement,
+  ])
+  int get ifMixin_ifKeyword;
+
+  @VariantId(17, variantList: [
+    LinkedNodeKind.ifElement,
+    LinkedNodeKind.ifStatement,
+  ])
+  int get ifMixin_leftParenthesis;
+
+  @VariantId(18, variantList: [
+    LinkedNodeKind.ifElement,
+    LinkedNodeKind.ifStatement,
+  ])
+  int get ifMixin_rightParenthesis;
+
+  @VariantId(7, variant: LinkedNodeKind.ifStatement)
+  LinkedNode get ifStatement_elseStatement;
+
+  @VariantId(8, variant: LinkedNodeKind.ifStatement)
+  LinkedNode get ifStatement_thenStatement;
+
+  @VariantId(15, variant: LinkedNodeKind.implementsClause)
+  int get implementsClause_implementsKeyword;
+
+  @VariantId(2, variant: LinkedNodeKind.implementsClause)
+  List<LinkedNode> get implementsClause_interfaces;
+
+  @VariantId(15, variant: LinkedNodeKind.importDirective)
+  int get importDirective_asKeyword;
+
+  @VariantId(16, variant: LinkedNodeKind.importDirective)
+  int get importDirective_deferredKeyword;
+
+  @VariantId(6, variant: LinkedNodeKind.importDirective)
+  LinkedNode get importDirective_prefix;
+
+  @VariantId(15, variant: LinkedNodeKind.indexExpression)
+  int get indexExpression_element;
+
+  @VariantId(23, variant: LinkedNodeKind.indexExpression)
+  LinkedNodeType get indexExpression_elementType;
+
+  @VariantId(6, variant: LinkedNodeKind.indexExpression)
+  LinkedNode get indexExpression_index;
+
+  @VariantId(17, variant: LinkedNodeKind.indexExpression)
+  int get indexExpression_leftBracket;
+
+  @VariantId(16, variant: LinkedNodeKind.indexExpression)
+  int get indexExpression_period;
+
+  @VariantId(18, variant: LinkedNodeKind.indexExpression)
+  int get indexExpression_rightBracket;
+
+  @VariantId(7, variant: LinkedNodeKind.indexExpression)
+  LinkedNode get indexExpression_target;
+
+  @VariantId(6, variant: LinkedNodeKind.instanceCreationExpression)
+  LinkedNode get instanceCreationExpression_arguments;
+
+  @VariantId(7, variant: LinkedNodeKind.instanceCreationExpression)
+  LinkedNode get instanceCreationExpression_constructorName;
+
+  @VariantId(15, variant: LinkedNodeKind.instanceCreationExpression)
+  int get instanceCreationExpression_keyword;
+
+  @VariantId(8, variant: LinkedNodeKind.instanceCreationExpression)
+  LinkedNode get instanceCreationExpression_typeArguments;
+
+  @VariantId(15, variant: LinkedNodeKind.integerLiteral)
+  int get integerLiteral_literal;
+
+  @VariantId(16, variant: LinkedNodeKind.integerLiteral)
+  int get integerLiteral_value;
+
+  @VariantId(6, variant: LinkedNodeKind.interpolationExpression)
+  LinkedNode get interpolationExpression_expression;
+
+  @VariantId(15, variant: LinkedNodeKind.interpolationExpression)
+  int get interpolationExpression_leftBracket;
+
+  @VariantId(16, variant: LinkedNodeKind.interpolationExpression)
+  int get interpolationExpression_rightBracket;
+
+  @VariantId(15, variant: LinkedNodeKind.interpolationString)
+  int get interpolationString_token;
+
+  @VariantId(30, variant: LinkedNodeKind.interpolationString)
+  String get interpolationString_value;
+
+  @VariantId(14, variantList: [
+    LinkedNodeKind.functionExpressionInvocation,
+    LinkedNodeKind.methodInvocation,
+  ])
+  LinkedNode get invocationExpression_arguments;
+
+  @VariantId(24, variantList: [
+    LinkedNodeKind.functionExpressionInvocation,
+    LinkedNodeKind.methodInvocation,
+  ])
+  LinkedNodeType get invocationExpression_invokeType;
+
+  @VariantId(12, variantList: [
+    LinkedNodeKind.functionExpressionInvocation,
+    LinkedNodeKind.methodInvocation,
+  ])
+  LinkedNode get invocationExpression_typeArguments;
+
+  @VariantId(6, variant: LinkedNodeKind.isExpression)
+  LinkedNode get isExpression_expression;
+
+  @VariantId(15, variant: LinkedNodeKind.isExpression)
+  int get isExpression_isOperator;
+
+  @VariantId(16, variant: LinkedNodeKind.isExpression)
+  int get isExpression_notOperator;
+
+  @VariantId(7, variant: LinkedNodeKind.isExpression)
+  LinkedNode get isExpression_type;
+
+  @Id(1)
+  bool get isSynthetic;
+
+  @Id(0)
+  LinkedNodeKind get kind;
+
+  @VariantId(15, variant: LinkedNodeKind.label)
+  int get label_colon;
+
+  @VariantId(6, variant: LinkedNodeKind.label)
+  LinkedNode get label_label;
+
+  @VariantId(2, variant: LinkedNodeKind.labeledStatement)
+  List<LinkedNode> get labeledStatement_labels;
+
+  @VariantId(6, variant: LinkedNodeKind.labeledStatement)
+  LinkedNode get labeledStatement_statement;
+
+  @VariantId(6, variant: LinkedNodeKind.libraryDirective)
+  LinkedNode get libraryDirective_name;
+
+  @VariantId(2, variant: LinkedNodeKind.libraryIdentifier)
+  List<LinkedNode> get libraryIdentifier_components;
+
+  @VariantId(2, variant: LinkedNodeKind.listLiteral)
+  List<LinkedNode> get listLiteral_elements;
+
+  @VariantId(15, variant: LinkedNodeKind.listLiteral)
+  int get listLiteral_leftBracket;
+
+  @VariantId(16, variant: LinkedNodeKind.listLiteral)
+  int get listLiteral_rightBracket;
+
+  @VariantId(6, variant: LinkedNodeKind.mapLiteralEntry)
+  LinkedNode get mapLiteralEntry_key;
+
+  @VariantId(15, variant: LinkedNodeKind.mapLiteralEntry)
+  int get mapLiteralEntry_separator;
+
+  @VariantId(7, variant: LinkedNodeKind.mapLiteralEntry)
+  LinkedNode get mapLiteralEntry_value;
+
+  @VariantId(19, variant: LinkedNodeKind.methodDeclaration)
+  int get methodDeclaration_actualProperty;
+
+  @VariantId(6, variant: LinkedNodeKind.methodDeclaration)
+  LinkedNode get methodDeclaration_body;
+
+  @VariantId(15, variant: LinkedNodeKind.methodDeclaration)
+  int get methodDeclaration_externalKeyword;
+
+  @VariantId(7, variant: LinkedNodeKind.methodDeclaration)
+  LinkedNode get methodDeclaration_formalParameters;
+
+  @VariantId(16, variant: LinkedNodeKind.methodDeclaration)
+  int get methodDeclaration_modifierKeyword;
+
+  @VariantId(10, variant: LinkedNodeKind.methodDeclaration)
+  LinkedNode get methodDeclaration_name;
+
+  @VariantId(17, variant: LinkedNodeKind.methodDeclaration)
+  int get methodDeclaration_operatorKeyword;
+
+  @VariantId(18, variant: LinkedNodeKind.methodDeclaration)
+  int get methodDeclaration_propertyKeyword;
+
+  @VariantId(8, variant: LinkedNodeKind.methodDeclaration)
+  LinkedNode get methodDeclaration_returnType;
+
+  @VariantId(9, variant: LinkedNodeKind.methodDeclaration)
+  LinkedNode get methodDeclaration_typeParameters;
+
+  @VariantId(6, variant: LinkedNodeKind.methodInvocation)
+  LinkedNode get methodInvocation_methodName;
+
+  @VariantId(15, variant: LinkedNodeKind.methodInvocation)
+  int get methodInvocation_operator;
+
+  @VariantId(7, variant: LinkedNodeKind.methodInvocation)
+  LinkedNode get methodInvocation_target;
+
+  @VariantId(15, variant: LinkedNodeKind.mixinDeclaration)
+  int get mixinDeclaration_mixinKeyword;
+
+  @VariantId(6, variant: LinkedNodeKind.mixinDeclaration)
+  LinkedNode get mixinDeclaration_onClause;
+
+  @VariantId(14, variantList: [
+    LinkedNodeKind.classDeclaration,
+    LinkedNodeKind.classTypeAlias,
+    LinkedNodeKind.enumDeclaration,
+    LinkedNodeKind.functionDeclaration,
+    LinkedNodeKind.functionTypeAlias,
+    LinkedNodeKind.genericTypeAlias,
+    LinkedNodeKind.mixinDeclaration,
+  ])
+  LinkedNode get namedCompilationUnitMember_name;
+
+  @VariantId(6, variant: LinkedNodeKind.namedExpression)
+  LinkedNode get namedExpression_expression;
+
+  @VariantId(7, variant: LinkedNodeKind.namedExpression)
+  LinkedNode get namedExpression_name;
+
+  @VariantId(2, variantList: [
+    LinkedNodeKind.exportDirective,
+    LinkedNodeKind.importDirective,
+  ])
+  List<LinkedNode> get namespaceDirective_combinators;
+
+  @VariantId(3, variantList: [
+    LinkedNodeKind.exportDirective,
+    LinkedNodeKind.importDirective,
+  ])
+  List<LinkedNode> get namespaceDirective_configurations;
+
+  @VariantId(20, variantList: [
+    LinkedNodeKind.exportDirective,
+    LinkedNodeKind.importDirective,
+  ])
+  String get namespaceDirective_selectedUri;
+
+  @VariantId(6, variant: LinkedNodeKind.nativeClause)
+  LinkedNode get nativeClause_name;
+
+  @VariantId(15, variant: LinkedNodeKind.nativeClause)
+  int get nativeClause_nativeKeyword;
+
+  @VariantId(15, variant: LinkedNodeKind.nativeFunctionBody)
+  int get nativeFunctionBody_nativeKeyword;
+
+  @VariantId(16, variant: LinkedNodeKind.nativeFunctionBody)
+  int get nativeFunctionBody_semicolon;
+
+  @VariantId(6, variant: LinkedNodeKind.nativeFunctionBody)
+  LinkedNode get nativeFunctionBody_stringLiteral;
+
+  @VariantId(14, variantList: [
+    LinkedNodeKind.fieldFormalParameter,
+    LinkedNodeKind.functionTypedFormalParameter,
+    LinkedNodeKind.simpleFormalParameter,
+  ])
+  LinkedNode get normalFormalParameter_comment;
+
+  @VariantId(19, variantList: [
+    LinkedNodeKind.fieldFormalParameter,
+    LinkedNodeKind.functionTypedFormalParameter,
+    LinkedNodeKind.simpleFormalParameter,
+  ])
+  int get normalFormalParameter_covariantKeyword;
+
+  @VariantId(12, variantList: [
+    LinkedNodeKind.fieldFormalParameter,
+    LinkedNodeKind.functionTypedFormalParameter,
+    LinkedNodeKind.simpleFormalParameter,
+  ])
+  LinkedNode get normalFormalParameter_identifier;
+
+  @VariantId(27, variantList: [
+    LinkedNodeKind.fieldFormalParameter,
+    LinkedNodeKind.functionTypedFormalParameter,
+    LinkedNodeKind.simpleFormalParameter,
+  ])
+  bool get normalFormalParameter_isCovariant;
+
+  @VariantId(4, variantList: [
+    LinkedNodeKind.fieldFormalParameter,
+    LinkedNodeKind.functionTypedFormalParameter,
+    LinkedNodeKind.simpleFormalParameter,
+  ])
+  List<LinkedNode> get normalFormalParameter_metadata;
+
+  @VariantId(15, variant: LinkedNodeKind.nullLiteral)
+  int get nullLiteral_literal;
+
+  @VariantId(15, variant: LinkedNodeKind.onClause)
+  int get onClause_onKeyword;
+
+  @VariantId(2, variant: LinkedNodeKind.onClause)
+  List<LinkedNode> get onClause_superclassConstraints;
+
+  @VariantId(6, variant: LinkedNodeKind.parenthesizedExpression)
+  LinkedNode get parenthesizedExpression_expression;
+
+  @VariantId(15, variant: LinkedNodeKind.parenthesizedExpression)
+  int get parenthesizedExpression_leftParenthesis;
+
+  @VariantId(16, variant: LinkedNodeKind.parenthesizedExpression)
+  int get parenthesizedExpression_rightParenthesis;
+
+  @VariantId(6, variant: LinkedNodeKind.partOfDirective)
+  LinkedNode get partOfDirective_libraryName;
+
+  @VariantId(16, variant: LinkedNodeKind.partOfDirective)
+  int get partOfDirective_ofKeyword;
+
+  @VariantId(7, variant: LinkedNodeKind.partOfDirective)
+  LinkedNode get partOfDirective_uri;
+
+  @VariantId(15, variant: LinkedNodeKind.postfixExpression)
+  int get postfixExpression_element;
+
+  @VariantId(23, variant: LinkedNodeKind.postfixExpression)
+  LinkedNodeType get postfixExpression_elementType;
+
+  @VariantId(6, variant: LinkedNodeKind.postfixExpression)
+  LinkedNode get postfixExpression_operand;
+
+  @VariantId(16, variant: LinkedNodeKind.postfixExpression)
+  int get postfixExpression_operator;
+
+  @VariantId(6, variant: LinkedNodeKind.prefixedIdentifier)
+  LinkedNode get prefixedIdentifier_identifier;
+
+  @VariantId(15, variant: LinkedNodeKind.prefixedIdentifier)
+  int get prefixedIdentifier_period;
+
+  @VariantId(7, variant: LinkedNodeKind.prefixedIdentifier)
+  LinkedNode get prefixedIdentifier_prefix;
+
+  @VariantId(15, variant: LinkedNodeKind.prefixExpression)
+  int get prefixExpression_element;
+
+  @VariantId(23, variant: LinkedNodeKind.prefixExpression)
+  LinkedNodeType get prefixExpression_elementType;
+
+  @VariantId(6, variant: LinkedNodeKind.prefixExpression)
+  LinkedNode get prefixExpression_operand;
+
+  @VariantId(16, variant: LinkedNodeKind.prefixExpression)
+  int get prefixExpression_operator;
+
+  @VariantId(15, variant: LinkedNodeKind.propertyAccess)
+  int get propertyAccess_operator;
+
+  @VariantId(6, variant: LinkedNodeKind.propertyAccess)
+  LinkedNode get propertyAccess_propertyName;
+
+  @VariantId(7, variant: LinkedNodeKind.propertyAccess)
+  LinkedNode get propertyAccess_target;
+
+  @VariantId(6, variant: LinkedNodeKind.redirectingConstructorInvocation)
+  LinkedNode get redirectingConstructorInvocation_arguments;
+
+  @VariantId(7, variant: LinkedNodeKind.redirectingConstructorInvocation)
+  LinkedNode get redirectingConstructorInvocation_constructorName;
+
+  @VariantId(15, variant: LinkedNodeKind.redirectingConstructorInvocation)
+  int get redirectingConstructorInvocation_element;
+
+  @VariantId(23, variant: LinkedNodeKind.redirectingConstructorInvocation)
+  LinkedNodeType get redirectingConstructorInvocation_elementType;
+
+  @VariantId(16, variant: LinkedNodeKind.redirectingConstructorInvocation)
+  int get redirectingConstructorInvocation_period;
+
+  @VariantId(17, variant: LinkedNodeKind.redirectingConstructorInvocation)
+  int get redirectingConstructorInvocation_thisKeyword;
+
+  @VariantId(15, variant: LinkedNodeKind.rethrowExpression)
+  int get rethrowExpression_rethrowKeyword;
+
+  @VariantId(6, variant: LinkedNodeKind.returnStatement)
+  LinkedNode get returnStatement_expression;
+
+  @VariantId(15, variant: LinkedNodeKind.returnStatement)
+  int get returnStatement_returnKeyword;
+
+  @VariantId(16, variant: LinkedNodeKind.returnStatement)
+  int get returnStatement_semicolon;
+
+  @VariantId(15, variant: LinkedNodeKind.scriptTag)
+  int get scriptTag_scriptTag;
+
+  @VariantId(2, variant: LinkedNodeKind.setOrMapLiteral)
+  List<LinkedNode> get setOrMapLiteral_elements;
+
+  @VariantId(27, variant: LinkedNodeKind.setOrMapLiteral)
+  bool get setOrMapLiteral_isMap;
+
+  @VariantId(31, variant: LinkedNodeKind.setOrMapLiteral)
+  bool get setOrMapLiteral_isSet;
+
+  @VariantId(15, variant: LinkedNodeKind.setOrMapLiteral)
+  int get setOrMapLiteral_leftBracket;
+
+  @VariantId(16, variant: LinkedNodeKind.setOrMapLiteral)
+  int get setOrMapLiteral_rightBracket;
+
+  @VariantId(2, variant: LinkedNodeKind.showCombinator)
+  List<LinkedNode> get showCombinator_shownNames;
+
+  @VariantId(15, variant: LinkedNodeKind.simpleFormalParameter)
+  int get simpleFormalParameter_keyword;
+
+  @VariantId(6, variant: LinkedNodeKind.simpleFormalParameter)
+  LinkedNode get simpleFormalParameter_type;
+
+  @VariantId(15, variant: LinkedNodeKind.simpleIdentifier)
+  int get simpleIdentifier_element;
+
+  @VariantId(23, variant: LinkedNodeKind.simpleIdentifier)
+  LinkedNodeType get simpleIdentifier_elementType;
+
+  @VariantId(16, variant: LinkedNodeKind.simpleIdentifier)
+  int get simpleIdentifier_token;
+
+  @VariantId(15, variant: LinkedNodeKind.simpleStringLiteral)
+  int get simpleStringLiteral_token;
+
+  @VariantId(20, variant: LinkedNodeKind.simpleStringLiteral)
+  String get simpleStringLiteral_value;
+
+  @VariantId(31, variantList: [
+    LinkedNodeKind.classDeclaration,
+    LinkedNodeKind.classTypeAlias,
+    LinkedNodeKind.functionTypeAlias,
+    LinkedNodeKind.genericTypeAlias,
+    LinkedNodeKind.mixinDeclaration,
+  ])
+  bool get simplyBoundable_isSimplyBounded;
+
+  @VariantId(6, variant: LinkedNodeKind.spreadElement)
+  LinkedNode get spreadElement_expression;
+
+  @VariantId(15, variant: LinkedNodeKind.spreadElement)
+  int get spreadElement_spreadOperator;
+
+  @VariantId(2, variant: LinkedNodeKind.stringInterpolation)
+  List<LinkedNode> get stringInterpolation_elements;
+
+  @VariantId(6, variant: LinkedNodeKind.superConstructorInvocation)
+  LinkedNode get superConstructorInvocation_arguments;
+
+  @VariantId(7, variant: LinkedNodeKind.superConstructorInvocation)
+  LinkedNode get superConstructorInvocation_constructorName;
+
+  @VariantId(15, variant: LinkedNodeKind.superConstructorInvocation)
+  int get superConstructorInvocation_element;
+
+  @VariantId(23, variant: LinkedNodeKind.superConstructorInvocation)
+  LinkedNodeType get superConstructorInvocation_elementType;
+
+  @VariantId(16, variant: LinkedNodeKind.superConstructorInvocation)
+  int get superConstructorInvocation_period;
+
+  @VariantId(17, variant: LinkedNodeKind.superConstructorInvocation)
+  int get superConstructorInvocation_superKeyword;
+
+  @VariantId(15, variant: LinkedNodeKind.superExpression)
+  int get superExpression_superKeyword;
+
+  @VariantId(6, variant: LinkedNodeKind.switchCase)
+  LinkedNode get switchCase_expression;
+
+  @VariantId(16, variantList: [
+    LinkedNodeKind.switchCase,
+    LinkedNodeKind.switchDefault,
+  ])
+  int get switchMember_colon;
+
+  @VariantId(15, variantList: [
+    LinkedNodeKind.switchCase,
+    LinkedNodeKind.switchDefault,
+  ])
+  int get switchMember_keyword;
+
+  @VariantId(3, variantList: [
+    LinkedNodeKind.switchCase,
+    LinkedNodeKind.switchDefault,
+  ])
+  List<LinkedNode> get switchMember_labels;
+
+  @VariantId(4, variantList: [
+    LinkedNodeKind.switchCase,
+    LinkedNodeKind.switchDefault,
+  ])
+  List<LinkedNode> get switchMember_statements;
+
+  @VariantId(7, variant: LinkedNodeKind.switchStatement)
+  LinkedNode get switchStatement_expression;
+
+  @VariantId(18, variant: LinkedNodeKind.switchStatement)
+  int get switchStatement_leftBracket;
+
+  @VariantId(15, variant: LinkedNodeKind.switchStatement)
+  int get switchStatement_leftParenthesis;
+
+  @VariantId(2, variant: LinkedNodeKind.switchStatement)
+  List<LinkedNode> get switchStatement_members;
+
+  @VariantId(19, variant: LinkedNodeKind.switchStatement)
+  int get switchStatement_rightBracket;
+
+  @VariantId(16, variant: LinkedNodeKind.switchStatement)
+  int get switchStatement_rightParenthesis;
+
+  @VariantId(17, variant: LinkedNodeKind.switchStatement)
+  int get switchStatement_switchKeyword;
+
+  @VariantId(28, variant: LinkedNodeKind.symbolLiteral)
+  List<int> get symbolLiteral_components;
+
+  @VariantId(15, variant: LinkedNodeKind.symbolLiteral)
+  int get symbolLiteral_poundSign;
+
+  @VariantId(15, variant: LinkedNodeKind.thisExpression)
+  int get thisExpression_thisKeyword;
+
+  @VariantId(6, variant: LinkedNodeKind.throwExpression)
+  LinkedNode get throwExpression_expression;
+
+  @VariantId(15, variant: LinkedNodeKind.throwExpression)
+  int get throwExpression_throwKeyword;
+
+  @VariantId(15, variant: LinkedNodeKind.topLevelVariableDeclaration)
+  int get topLevelVariableDeclaration_semicolon;
+
+  @VariantId(6, variant: LinkedNodeKind.topLevelVariableDeclaration)
+  LinkedNode get topLevelVariableDeclaration_variableList;
+
+  @VariantId(6, variant: LinkedNodeKind.tryStatement)
+  LinkedNode get tryStatement_body;
+
+  @VariantId(2, variant: LinkedNodeKind.tryStatement)
+  List<LinkedNode> get tryStatement_catchClauses;
+
+  @VariantId(7, variant: LinkedNodeKind.tryStatement)
+  LinkedNode get tryStatement_finallyBlock;
+
+  @VariantId(15, variant: LinkedNodeKind.tryStatement)
+  int get tryStatement_finallyKeyword;
+
+  @VariantId(16, variant: LinkedNodeKind.tryStatement)
+  int get tryStatement_tryKeyword;
+
+  @VariantId(19, variantList: [
+    LinkedNodeKind.classTypeAlias,
+    LinkedNodeKind.functionTypeAlias,
+    LinkedNodeKind.genericTypeAlias,
+  ])
+  int get typeAlias_semicolon;
+
+  @VariantId(18, variantList: [
+    LinkedNodeKind.classTypeAlias,
+    LinkedNodeKind.functionTypeAlias,
+    LinkedNodeKind.genericTypeAlias,
+  ])
+  int get typeAlias_typedefKeyword;
+
+  @VariantId(2, variant: LinkedNodeKind.typeArgumentList)
+  List<LinkedNode> get typeArgumentList_arguments;
+
+  @VariantId(15, variant: LinkedNodeKind.typeArgumentList)
+  int get typeArgumentList_leftBracket;
+
+  @VariantId(16, variant: LinkedNodeKind.typeArgumentList)
+  int get typeArgumentList_rightBracket;
+
+  @VariantId(19, variantList: [
+    LinkedNodeKind.listLiteral,
+    LinkedNodeKind.setOrMapLiteral,
+  ])
+  int get typedLiteral_constKeyword;
+
+  @VariantId(14, variantList: [
+    LinkedNodeKind.listLiteral,
+    LinkedNodeKind.setOrMapLiteral,
+  ])
+  LinkedNode get typedLiteral_typeArguments;
+
+  @VariantId(6, variant: LinkedNodeKind.typeName)
+  LinkedNode get typeName_name;
+
+  @VariantId(15, variant: LinkedNodeKind.typeName)
+  int get typeName_question;
+
+  @VariantId(23, variant: LinkedNodeKind.typeName)
+  LinkedNodeType get typeName_type;
+
+  @VariantId(7, variant: LinkedNodeKind.typeName)
+  LinkedNode get typeName_typeArguments;
+
+  @VariantId(6, variant: LinkedNodeKind.typeParameter)
+  LinkedNode get typeParameter_bound;
+
+  @VariantId(15, variant: LinkedNodeKind.typeParameter)
+  int get typeParameter_extendsKeyword;
+
+  @VariantId(16, variant: LinkedNodeKind.typeParameter)
+  int get typeParameter_id;
+
+  @VariantId(7, variant: LinkedNodeKind.typeParameter)
+  LinkedNode get typeParameter_name;
+
+  @VariantId(15, variant: LinkedNodeKind.typeParameterList)
+  int get typeParameterList_leftBracket;
+
+  @VariantId(16, variant: LinkedNodeKind.typeParameterList)
+  int get typeParameterList_rightBracket;
+
+  @VariantId(2, variant: LinkedNodeKind.typeParameterList)
+  List<LinkedNode> get typeParameterList_typeParameters;
+
+  @VariantId(14, variantList: [
+    LinkedNodeKind.exportDirective,
+    LinkedNodeKind.importDirective,
+    LinkedNodeKind.partDirective,
+  ])
+  LinkedNode get uriBasedDirective_uri;
+
+  @VariantId(22, variantList: [
+    LinkedNodeKind.exportDirective,
+    LinkedNodeKind.importDirective,
+    LinkedNodeKind.partDirective,
+  ])
+  String get uriBasedDirective_uriContent;
+
+  @VariantId(19, variantList: [
+    LinkedNodeKind.exportDirective,
+    LinkedNodeKind.importDirective,
+    LinkedNodeKind.partDirective,
+  ])
+  int get uriBasedDirective_uriElement;
+
+  @VariantId(32, variant: LinkedNodeKind.variableDeclaration)
+  LinkedNodeVariablesDeclaration get variableDeclaration_declaration;
+
+  @VariantId(15, variant: LinkedNodeKind.variableDeclaration)
+  int get variableDeclaration_equals;
+
+  @VariantId(6, variant: LinkedNodeKind.variableDeclaration)
+  LinkedNode get variableDeclaration_initializer;
+
+  @VariantId(7, variant: LinkedNodeKind.variableDeclaration)
+  LinkedNode get variableDeclaration_name;
+
+  @VariantId(15, variant: LinkedNodeKind.variableDeclarationList)
+  int get variableDeclarationList_keyword;
+
+  @VariantId(6, variant: LinkedNodeKind.variableDeclarationList)
+  LinkedNode get variableDeclarationList_type;
+
+  @VariantId(2, variant: LinkedNodeKind.variableDeclarationList)
+  List<LinkedNode> get variableDeclarationList_variables;
+
+  @VariantId(15, variant: LinkedNodeKind.variableDeclarationStatement)
+  int get variableDeclarationStatement_semicolon;
+
+  @VariantId(6, variant: LinkedNodeKind.variableDeclarationStatement)
+  LinkedNode get variableDeclarationStatement_variables;
+
+  @VariantId(6, variant: LinkedNodeKind.whileStatement)
+  LinkedNode get whileStatement_body;
+
+  @VariantId(7, variant: LinkedNodeKind.whileStatement)
+  LinkedNode get whileStatement_condition;
+
+  @VariantId(15, variant: LinkedNodeKind.whileStatement)
+  int get whileStatement_leftParenthesis;
+
+  @VariantId(16, variant: LinkedNodeKind.whileStatement)
+  int get whileStatement_rightParenthesis;
+
+  @VariantId(17, variant: LinkedNodeKind.whileStatement)
+  int get whileStatement_whileKeyword;
+
+  @VariantId(2, variant: LinkedNodeKind.withClause)
+  List<LinkedNode> get withClause_mixinTypes;
+
+  @VariantId(15, variant: LinkedNodeKind.withClause)
+  int get withClause_withKeyword;
+
+  @VariantId(6, variant: LinkedNodeKind.yieldStatement)
+  LinkedNode get yieldStatement_expression;
+
+  @VariantId(17, variant: LinkedNodeKind.yieldStatement)
+  int get yieldStatement_semicolon;
+
+  @VariantId(16, variant: LinkedNodeKind.yieldStatement)
+  int get yieldStatement_star;
+
+  @VariantId(15, variant: LinkedNodeKind.yieldStatement)
+  int get yieldStatement_yieldKeyword;
+}
+
+/// Information about a group of libraries linked together, for example because
+/// they form a single cycle, or because they represent a single build artifact.
+@TopLevel('LNBn')
+abstract class LinkedNodeBundle extends base.SummaryClass {
+  factory LinkedNodeBundle.fromBuffer(List<int> buffer) =>
+      generated.readLinkedNodeBundle(buffer);
+
+  @Id(1)
+  List<LinkedNodeLibrary> get libraries;
+
+  /// The shared list of references used in the [libraries].
+  @Id(0)
+  LinkedNodeReferences get references;
+}
+
+/// Types of comments.
+enum LinkedNodeCommentType { block, documentation, endOfLine }
+
+/// Kinds of formal parameters.
+enum LinkedNodeFormalParameterKind {
+  required,
+  optionalPositional,
+  optionalNamed
+}
+
+/// Kinds of [LinkedNode].
+enum LinkedNodeKind {
+  adjacentStrings,
+  annotation,
+  argumentList,
+  asExpression,
+  assertInitializer,
+  assertStatement,
+  assignmentExpression,
+  awaitExpression,
+  binaryExpression,
+  block,
+  blockFunctionBody,
+  booleanLiteral,
+  breakStatement,
+  cascadeExpression,
+  catchClause,
+  classDeclaration,
+  classTypeAlias,
+  comment,
+  compilationUnit,
+  conditionalExpression,
+  configuration,
+  constructorDeclaration,
+  constructorFieldInitializer,
+  constructorName,
+  continueStatement,
+  declaredIdentifier,
+  defaultFormalParameter,
+  doubleLiteral,
+  doStatement,
+  dottedName,
+  emptyFunctionBody,
+  emptyStatement,
+  enumConstantDeclaration,
+  enumDeclaration,
+  exportDirective,
+  expressionFunctionBody,
+  expressionStatement,
+  extendsClause,
+  fieldDeclaration,
+  fieldFormalParameter,
+  formalParameterList,
+  forEachPartsWithDeclaration,
+  forEachPartsWithIdentifier,
+  forElement,
+  forPartsWithDeclarations,
+  forPartsWithExpression,
+  forStatement,
+  functionDeclaration,
+  functionDeclarationStatement,
+  functionExpression,
+  functionExpressionInvocation,
+  functionTypeAlias,
+  functionTypedFormalParameter,
+  genericFunctionType,
+  genericTypeAlias,
+  hideCombinator,
+  ifElement,
+  ifStatement,
+  implementsClause,
+  importDirective,
+  instanceCreationExpression,
+  indexExpression,
+  integerLiteral,
+  interpolationExpression,
+  interpolationString,
+  isExpression,
+  label,
+  labeledStatement,
+  libraryDirective,
+  libraryIdentifier,
+  listLiteral,
+  mapLiteralEntry,
+  methodDeclaration,
+  methodInvocation,
+  mixinDeclaration,
+  namedExpression,
+  nativeClause,
+  nativeFunctionBody,
+  nullLiteral,
+  onClause,
+  parenthesizedExpression,
+  partDirective,
+  partOfDirective,
+  postfixExpression,
+  prefixExpression,
+  prefixedIdentifier,
+  propertyAccess,
+  redirectingConstructorInvocation,
+  rethrowExpression,
+  returnStatement,
+  scriptTag,
+  setOrMapLiteral,
+  showCombinator,
+  simpleFormalParameter,
+  simpleIdentifier,
+  simpleStringLiteral,
+  spreadElement,
+  stringInterpolation,
+  superConstructorInvocation,
+  superExpression,
+  switchCase,
+  switchDefault,
+  switchStatement,
+  symbolLiteral,
+  thisExpression,
+  throwExpression,
+  topLevelVariableDeclaration,
+  tryStatement,
+  typeArgumentList,
+  typeName,
+  typeParameter,
+  typeParameterList,
+  variableDeclaration,
+  variableDeclarationList,
+  variableDeclarationStatement,
+  whileStatement,
+  withClause,
+  yieldStatement,
+}
+
+/// Information about a single library in a [LinkedNodeBundle].
+abstract class LinkedNodeLibrary extends base.SummaryClass {
+  @Id(2)
+  List<int> get exports;
+
+  @Id(3)
+  String get name;
+
+  @Id(5)
+  int get nameLength;
+
+  @Id(4)
+  int get nameOffset;
+
+  @Id(1)
+  List<LinkedNodeUnit> get units;
+
+  @Id(0)
+  String get uriStr;
+}
+
+/// Flattened tree of declarations referenced from [LinkedNode]s.
+abstract class LinkedNodeReferences extends base.SummaryClass {
+  @Id(1)
+  List<String> get name;
+
+  @Id(0)
+  List<int> get parent;
+}
+
+/// Information about a Dart type.
+abstract class LinkedNodeType extends base.SummaryClass {
+  @Id(0)
+  List<LinkedNodeTypeFormalParameter> get functionFormalParameters;
+
+  @Id(1)
+  LinkedNodeType get functionReturnType;
+
+  @Id(2)
+  List<LinkedNodeTypeTypeParameter> get functionTypeParameters;
+
+  @Id(7)
+  int get genericTypeAliasReference;
+
+  @Id(8)
+  List<LinkedNodeType> get genericTypeAliasTypeArguments;
+
+  /// Reference to a [LinkedNodeReferences].
+  @Id(3)
+  int get interfaceClass;
+
+  @Id(4)
+  List<LinkedNodeType> get interfaceTypeArguments;
+
+  @Id(5)
+  LinkedNodeTypeKind get kind;
+
+  @Id(6)
+  int get typeParameterId;
+}
+
+/// Information about a formal parameter in a function type.
+abstract class LinkedNodeTypeFormalParameter extends base.SummaryClass {
+  @Id(0)
+  LinkedNodeFormalParameterKind get kind;
+
+  @Id(1)
+  String get name;
+
+  @Id(2)
+  LinkedNodeType get type;
+}
+
+/// Kinds of [LinkedNodeType]s.
+enum LinkedNodeTypeKind {
+  bottom,
+  dynamic_,
+  function,
+  interface,
+  typeParameter,
+  void_
+}
+
+/// Information about a type parameter in a function type.
+abstract class LinkedNodeTypeTypeParameter extends base.SummaryClass {
+  @Id(1)
+  LinkedNodeType get bound;
+
+  @Id(0)
+  String get name;
+}
+
+/// Information about a single library in a [LinkedNodeLibrary].
+abstract class LinkedNodeUnit extends base.SummaryClass {
+  @Id(2)
+  LinkedNode get node;
+
+  @Id(1)
+  UnlinkedTokens get tokens;
+
+  @Id(0)
+  String get uriStr;
+}
+
+/// Information about a top-level declaration, or a field declaration that
+/// contributes information to [LinkedNodeKind.variableDeclaration].
+abstract class LinkedNodeVariablesDeclaration extends base.SummaryClass {
+  @Id(0)
+  LinkedNode get comment;
+
+  @Id(1)
+  bool get isConst;
+
+  @Id(2)
+  bool get isCovariant;
+
+  @Id(3)
+  bool get isFinal;
+
+  @Id(4)
+  bool get isStatic;
+}
+
 /// Information about the resolution of an [UnlinkedReference].
 abstract class LinkedReference extends base.SummaryClass {
   /// If this [LinkedReference] doesn't have an associated [UnlinkedReference],
@@ -1837,6 +3708,8 @@
   /// [UnlinkedExpr.ints]), interpret them as key/value pairs, place them in a
   /// [Map], and push the result back onto the stack.  The two type parameters
   /// for the [Map] are implicitly `dynamic`.
+  ///
+  /// To be replaced with [makeUntypedSetOrMap] for unified collections.
   makeUntypedMap,
 
   /// Pop the top n values from the stack (where n is obtained from
@@ -1849,6 +3722,10 @@
   /// [UnlinkedExpr.ints]), interpret them as key/value pairs, place them in a
   /// [Map], and push the result back onto the stack.  The two type parameters
   /// for the [Map] are obtained from [UnlinkedExpr.references].
+  ///
+  /// To be replaced with [makeTypedMap2] for unified collections. This is not
+  /// forwards compatible with [makeTypedMap2] because it expects
+  /// [CollectionElement]s instead of pairs of [Expression]s.
   makeTypedMap,
 
   /// Pop the top 2 values from the stack, evaluate `v1 == v2`, and push the
@@ -2109,6 +3986,113 @@
   /// onto the stack.  The type parameter for the [Set] is obtained from
   /// [UnlinkedExpr.references].
   makeTypedSet,
+
+  /// Pop the top n values from the stack (where n is obtained from
+  /// [UnlinkedExpr.ints]), which should be [CollectionElement]s, place them in
+  /// a [SetOrMap], and push the result back onto the stack.
+  makeUntypedSetOrMap,
+
+  /// Pop the top n values from the stack (where n is obtained from
+  /// [UnlinkedExpr.ints]), which should be [CollectionElement]s, place them in
+  /// a [Map], and push the result back onto the stack. The two type parameters
+  /// for the [Map] are obtained from [UnlinkedExpr.references].
+  ///
+  /// To replace [makeTypedMap] for unified collections. This is not backwards
+  /// compatible with [makeTypedMap] because it expects [CollectionElement]s
+  /// instead of pairs of [Expression]s.
+  makeTypedMap2,
+
+  /// Pop the top 2 values from the stack, place them in a [MapLiteralEntry],
+  /// and push the result back onto the stack.
+  makeMapLiteralEntry,
+
+  /// Pop the top value from the stack, convert it to a spread element of type
+  /// `...`, and push the result back onto the stack.
+  spreadElement,
+
+  /// Pop the top value from the stack, convert it to a spread element of type
+  /// `...?`, and push the result back onto the stack.
+  nullAwareSpreadElement,
+
+  /// Pop the top two values from the stack.  The first is a condition
+  /// and the second is a collection element.  Push an "if" element having the
+  /// given condition, with the collection element as its "then" clause.
+  ifElement,
+
+  /// Pop the top three values from the stack.  The first is a condition and the
+  /// other two are collection elements.  Push an "if" element having the given
+  /// condition, with the two collection elements as its "then" and "else"
+  /// clauses, respectively.
+  ifElseElement,
+
+  /// Pop the top n+2 values from the stack, where n is obtained from
+  /// [UnlinkedExpr.ints].  The first two are the initialization and condition
+  /// of the for-loop; the remainder are the updaters.
+  forParts,
+
+  /// Pop the top 2 values from the stack.  The first is the for loop parts.
+  /// The second is the body.
+  forElement,
+
+  /// Push the empty expression (used for missing initializers and conditions in
+  /// `for` loops)
+  pushEmptyExpression,
+
+  /// Add a variable to the current scope whose name is obtained from
+  /// [UnlinkedExpr.strings].  This is separate from [variableDeclaration]
+  /// because the scope of the variable includes its own initializer.
+  variableDeclarationStart,
+
+  /// Pop the top value from the stack, and use it as the initializer for a
+  /// variable declaration; the variable being declared is obtained by looking
+  /// at the nth variable most recently added to the scope (where n counts from
+  /// zero and is obtained from [UnlinkedExpr.ints]).
+  variableDeclaration,
+
+  /// Pop the top n values from the stack, which should all be variable
+  /// declarations, and use them to create an untyped for-initializer
+  /// declaration.  The value of n is obtained from [UnlinkedExpr.ints].
+  forInitializerDeclarationsUntyped,
+
+  /// Pop the top n values from the stack, which should all be variable
+  /// declarations, and use them to create a typed for-initializer
+  /// declaration.  The value of n is obtained from [UnlinkedExpr.ints].  The
+  /// type is obtained from [UnlinkedExpr.references].
+  forInitializerDeclarationsTyped,
+
+  /// Pop from the stack `value` and get a string from [UnlinkedExpr.strings].
+  /// Use this string to look up a parameter.  Perform `parameter op= value`,
+  /// where `op` is the next assignment operator from
+  /// [UnlinkedExpr.assignmentOperators].  Push `value` back onto the stack.
+  ///
+  /// If the assignment operator is a prefix/postfix increment/decrement, then
+  /// `value` is not present in the stack, so it should not be popped and the
+  /// corresponding value of the parameter after/before update is pushed onto
+  /// the stack instead.
+  assignToParameter,
+
+  /// Pop from the stack an identifier and an expression, and create for-each
+  /// parts of the form `identifier in expression`.
+  forEachPartsWithIdentifier,
+
+  /// Pop the top 2 values from the stack.  The first is the for loop parts.
+  /// The second is the body.
+  forElementWithAwait,
+
+  /// Pop an expression from the stack, and create for-each parts of the form
+  /// `var name in expression`, where `name` is obtained from
+  /// [UnlinkedExpr.strings].
+  forEachPartsWithUntypedDeclaration,
+
+  /// Pop an expression from the stack, and create for-each parts of the form
+  /// `Type name in expression`, where `name` is obtained from
+  /// [UnlinkedExpr.strings], and `Type` is obtained from
+  /// [UnlinkedExpr.references].
+  forEachPartsWithTypedDeclaration,
+
+  /// Pop the top 2 values from the stack, compute `v1 >>> v2`, and push the
+  /// result back onto the stack.
+  bitShiftRightLogical,
 }
 
 /// Unlinked summary information about an import declaration.
@@ -2375,6 +4359,189 @@
   int get prefixReference;
 }
 
+/// TODO(scheglov) document
+enum UnlinkedTokenKind { nothing, comment, keyword, simple, string }
+
+/// TODO(scheglov) document
+abstract class UnlinkedTokens extends base.SummaryClass {
+  /// The token that corresponds to this token, or `0` if this token is not
+  /// the first of a pair of matching tokens (such as parentheses).
+  @Id(0)
+  List<int> get endGroup;
+
+  /// Return `true` if this token is a synthetic token. A synthetic token is a
+  /// token that was introduced by the parser in order to recover from an error
+  /// in the code.
+  @Id(1)
+  List<bool> get isSynthetic;
+
+  @Id(2)
+  List<UnlinkedTokenKind> get kind;
+
+  @Id(3)
+  List<int> get length;
+
+  @Id(4)
+  List<String> get lexeme;
+
+  /// The next token in the token stream, `0` for [UnlinkedTokenType.EOF] or
+  /// the last comment token.
+  @Id(5)
+  List<int> get next;
+
+  @Id(6)
+  List<int> get offset;
+
+  /// The first comment token in the list of comments that precede this token,
+  /// or `0` if there are no comments preceding this token. Additional comments
+  /// can be reached by following the token stream using [next] until `0` is
+  /// reached.
+  @Id(7)
+  List<int> get precedingComment;
+
+  @Id(8)
+  List<UnlinkedTokenType> get type;
+}
+
+/// TODO(scheglov) document
+enum UnlinkedTokenType {
+  NOTHING,
+  ABSTRACT,
+  AMPERSAND,
+  AMPERSAND_AMPERSAND,
+  AMPERSAND_EQ,
+  AS,
+  ASSERT,
+  ASYNC,
+  AT,
+  AWAIT,
+  BACKPING,
+  BACKSLASH,
+  BANG,
+  BANG_EQ,
+  BAR,
+  BAR_BAR,
+  BAR_EQ,
+  BREAK,
+  CARET,
+  CARET_EQ,
+  CASE,
+  CATCH,
+  CLASS,
+  CLOSE_CURLY_BRACKET,
+  CLOSE_PAREN,
+  CLOSE_SQUARE_BRACKET,
+  COLON,
+  COMMA,
+  CONST,
+  CONTINUE,
+  COVARIANT,
+  DEFAULT,
+  DEFERRED,
+  DO,
+  DOUBLE,
+  DYNAMIC,
+  ELSE,
+  ENUM,
+  EOF,
+  EQ,
+  EQ_EQ,
+  EXPORT,
+  EXTENDS,
+  EXTERNAL,
+  FACTORY,
+  FALSE,
+  FINAL,
+  FINALLY,
+  FOR,
+  FUNCTION,
+  FUNCTION_KEYWORD,
+  GET,
+  GT,
+  GT_EQ,
+  GT_GT,
+  GT_GT_EQ,
+  HASH,
+  HEXADECIMAL,
+  HIDE,
+  IDENTIFIER,
+  IF,
+  IMPLEMENTS,
+  IMPORT,
+  IN,
+  INDEX,
+  INDEX_EQ,
+  INT,
+  INTERFACE,
+  IS,
+  LIBRARY,
+  LT,
+  LT_EQ,
+  LT_LT,
+  LT_LT_EQ,
+  MINUS,
+  MINUS_EQ,
+  MINUS_MINUS,
+  MIXIN,
+  MULTI_LINE_COMMENT,
+  NATIVE,
+  NEW,
+  NULL,
+  OF,
+  ON,
+  OPEN_CURLY_BRACKET,
+  OPEN_PAREN,
+  OPEN_SQUARE_BRACKET,
+  OPERATOR,
+  PART,
+  PATCH,
+  PERCENT,
+  PERCENT_EQ,
+  PERIOD,
+  PERIOD_PERIOD,
+  PERIOD_PERIOD_PERIOD,
+  PERIOD_PERIOD_PERIOD_QUESTION,
+  PLUS,
+  PLUS_EQ,
+  PLUS_PLUS,
+  QUESTION,
+  QUESTION_PERIOD,
+  QUESTION_QUESTION,
+  QUESTION_QUESTION_EQ,
+  RETHROW,
+  RETURN,
+  SCRIPT_TAG,
+  SEMICOLON,
+  SET,
+  SHOW,
+  SINGLE_LINE_COMMENT,
+  SLASH,
+  SLASH_EQ,
+  SOURCE,
+  STAR,
+  STAR_EQ,
+  STATIC,
+  STRING,
+  STRING_INTERPOLATION_EXPRESSION,
+  STRING_INTERPOLATION_IDENTIFIER,
+  SUPER,
+  SWITCH,
+  SYNC,
+  THIS,
+  THROW,
+  TILDE,
+  TILDE_SLASH,
+  TILDE_SLASH_EQ,
+  TRUE,
+  TRY,
+  TYPEDEF,
+  VAR,
+  VOID,
+  WHILE,
+  WITH,
+  YIELD,
+}
+
 /// Unlinked summary information about a typedef declaration.
 abstract class UnlinkedTypedef extends base.SummaryClass {
   /// Annotations for this typedef.
diff --git a/pkg/analyzer/lib/src/summary/link.dart b/pkg/analyzer/lib/src/summary/link.dart
index f0a1a4a..012a2ac 100644
--- a/pkg/analyzer/lib/src/summary/link.dart
+++ b/pkg/analyzer/lib/src/summary/link.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 'package:analyzer/dart/analysis/session.dart';
-
 /// This library is capable of producing linked summaries from unlinked
 /// ones (or prelinked ones).  It functions by building a miniature
 /// element model to represent the contents of the summaries, and then
@@ -57,12 +55,14 @@
 ///
 /// - Where possible, we favor method dispatch instead of "is" and "as"
 ///   checks.  E.g. see [ReferenceableElementForLink.asConstructor].
+import 'package:analyzer/dart/analysis/declared_variables.dart';
+import 'package:analyzer/dart/analysis/session.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/standard_ast_factory.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/error/listener.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/ast/utilities.dart';
 import 'package:analyzer/src/dart/constant/value.dart';
 import 'package:analyzer/src/dart/element/builder.dart';
@@ -116,11 +116,12 @@
     Set<String> libraryUris,
     GetDependencyCallback getDependency,
     GetUnitCallback getUnit,
-    GetDeclaredVariable getDeclaredVariable,
+    DeclaredVariables declaredVariables,
+    AnalysisOptions analysisOptions,
     [GetAstCallback getAst]) {
   Map<String, LinkedLibraryBuilder> linkedLibraries =
-      setupForLink(libraryUris, getUnit, getDeclaredVariable);
-  _relink(linkedLibraries, getDependency, getUnit, getAst);
+      setupForLink(libraryUris, getUnit, declaredVariables);
+  _relink(linkedLibraries, getDependency, getUnit, getAst, analysisOptions);
   return linkedLibraries;
 }
 
@@ -132,7 +133,7 @@
 /// of the libraries in this build unit, and whose values are the corresponding
 /// [LinkedLibraryBuilder]s.
 Map<String, LinkedLibraryBuilder> setupForLink(Set<String> libraryUris,
-    GetUnitCallback getUnit, GetDeclaredVariable getDeclaredVariable) {
+    GetUnitCallback getUnit, DeclaredVariables declaredVariables) {
   Map<String, LinkedLibraryBuilder> linkedLibraries =
       <String, LinkedLibraryBuilder>{};
   for (String absoluteUri in libraryUris) {
@@ -141,7 +142,7 @@
         getUnit(absoluteUri),
         getUnit,
         (String absoluteUri) => getUnit(absoluteUri)?.publicNamespace,
-        getDeclaredVariable);
+        declaredVariables);
   }
   return linkedLibraries;
 }
@@ -301,8 +302,9 @@
     Map<String, LinkedLibraryBuilder> libraries,
     GetDependencyCallback getDependency,
     GetUnitCallback getUnit,
-    GetAstCallback getAst) {
-  new Linker(libraries, getDependency, getUnit, getAst).link();
+    GetAstCallback getAst,
+    AnalysisOptions analysisOptions) {
+  new Linker(libraries, getDependency, getUnit, getAst, analysisOptions).link();
 }
 
 /// Create an [UnlinkedParam] representing the given [parameter], which should
@@ -412,31 +414,7 @@
 /// [UnlinkedUnit] objects.
 typedef UnlinkedUnit GetUnitCallback(String absoluteUri);
 
-/// Stub implementation of [AnalysisOptions] used during linking.
-class AnalysisOptionsForLink implements AnalysisOptionsImpl {
-  final Linker _linker;
-
-  AnalysisOptionsForLink(this._linker);
-
-  @override
-  bool get hint => false;
-
-  @override
-  bool get implicitCasts => true;
-
-  @deprecated
-  @override
-  bool get previewDart2 => true;
-
-  @override
-  bool get strongMode => true;
-
-  @override
-  bool get strongModeHints => false;
-
-  @override
-  ExperimentStatus get experimentStatus => new ExperimentStatus();
-
+class AnalysisSessionForLink implements AnalysisSession {
   @override
   noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
 }
@@ -492,6 +470,9 @@
   Source get librarySource => library.source;
 
   @override
+  get linkedNode => null;
+
+  @override
   List<MethodElementForLink> get methods;
 
   @override
@@ -1925,9 +1906,14 @@
         case UnlinkedExprOperation.makeUntypedList:
         case UnlinkedExprOperation.makeUntypedMap:
         case UnlinkedExprOperation.makeUntypedSet:
+        case UnlinkedExprOperation.makeUntypedSetOrMap:
+        case UnlinkedExprOperation.forParts:
+        case UnlinkedExprOperation.variableDeclaration:
+        case UnlinkedExprOperation.forInitializerDeclarationsUntyped:
           intPtr++;
           break;
         case UnlinkedExprOperation.assignToRef:
+        case UnlinkedExprOperation.forEachPartsWithTypedDeclaration:
           refPtr++;
           break;
         case UnlinkedExprOperation.invokeMethodRef:
@@ -1948,10 +1934,12 @@
           break;
         case UnlinkedExprOperation.makeTypedList:
         case UnlinkedExprOperation.makeTypedSet:
+        case UnlinkedExprOperation.forInitializerDeclarationsTyped:
           refPtr++;
           intPtr++;
           break;
         case UnlinkedExprOperation.makeTypedMap:
+        case UnlinkedExprOperation.makeTypedMap2:
           refPtr += 2;
           intPtr++;
           break;
@@ -2099,7 +2087,7 @@
   ContextForLink(this._linker);
 
   @override
-  AnalysisOptionsForLink get analysisOptions => _linker.analysisOptions;
+  AnalysisOptions get analysisOptions => _linker.analysisOptions;
 
   @override
   TypeProvider get typeProvider => _linker.typeProvider;
@@ -2338,6 +2326,9 @@
   LibraryElement get library => enclosingElement.library;
 
   @override
+  get linkedNode => null;
+
+  @override
   String get name {
     if (_name == null) {
       _name = serializedExecutable.name;
@@ -2474,7 +2465,7 @@
         nameScope: nameScope);
     var variableResolverVisitor = new VariableResolverVisitor(
         library, source, typeProvider, errorListener,
-        nameScope: nameScope);
+        nameScope: nameScope, localVariableInfo: LocalVariableInfo());
     var partialResolverVisitor = new PartialResolverVisitor(
         inheritance, library, source, typeProvider, errorListener,
         nameScope: nameScope);
@@ -2506,7 +2497,9 @@
       List<UnlinkedExecutable> localFunctions)
       : _builder = new ExprBuilder(
             unitResynthesizer, _functionElement, unlinkedConst,
-            requireValidConst: false, localFunctions: localFunctions);
+            requireValidConst: false,
+            localFunctions: localFunctions,
+            becomeSetOrMap: false);
 
   TopLevelInferenceErrorKind get errorKind {
     // TODO(paulberry): should we return TopLevelInferenceErrorKind.assignment
@@ -2536,7 +2529,9 @@
     expression = container.expression;
     if (_linker.getAst != null) {
       expression.accept(_typeResolverVisitor);
-      expression.accept(_variableResolverVisitor);
+    }
+    expression.accept(_variableResolverVisitor);
+    if (_linker.getAst != null) {
       expression.accept(_partialResolverVisitor);
     }
     expression.accept(_resolverVisitor);
@@ -2846,6 +2841,9 @@
   bool get isAsynchronous => serializedExecutable.isAsynchronous;
 
   @override
+  get linkedNode => null;
+
+  @override
   DartType get returnType {
     // If this is a variable whose type needs inferring, infer it.
     if (_variable.hasImplicitType) {
@@ -3161,6 +3159,9 @@
   LibraryElementForLink get library => enclosingElement.library;
 
   @override
+  get linkedNode => null;
+
+  @override
   String get name => _unlinkedTypedef.name;
 
   @override
@@ -3279,6 +3280,9 @@
   LibraryElementForLink get library => enclosingElement.library;
 
   @override
+  get linkedNode => null;
+
+  @override
   String get name => '-';
 
   @override
@@ -3362,6 +3366,9 @@
   LibraryElementForLink get library => enclosingElement.library;
 
   @override
+  get linkedNode => null;
+
+  @override
   String get name => _unlinkedTypedef.name;
 
   @override
@@ -3643,6 +3650,9 @@
   LibraryResynthesizerContext get resynthesizerContext => this;
 
   @override
+  AnalysisSession get session => _linker.session;
+
+  @override
   Source get source => definingCompilationUnit.source;
 
   @override
@@ -3940,10 +3950,13 @@
   SpecialTypeElementForLink _bottomElement;
   InheritanceManager2 _inheritanceManager;
   ContextForLink _context;
-  AnalysisOptionsForLink _analysisOptions;
+  AnalysisSessionForLink _session;
+
+  /// Gets an instance of [AnalysisOptions] for use during linking.
+  final AnalysisOptions analysisOptions;
 
   Linker(Map<String, LinkedLibraryBuilder> linkedLibraries, this.getDependency,
-      this.getUnit, this.getAst) {
+      this.getUnit, this.getAst, this.analysisOptions) {
     // Create elements for the libraries to be linked.  The rest of
     // the element model will be created on demand.
     linkedLibraries
@@ -3954,10 +3967,6 @@
     });
   }
 
-  /// Get an instance of [AnalysisOptions] for use during linking.
-  AnalysisOptionsForLink get analysisOptions =>
-      _analysisOptions ??= new AnalysisOptionsForLink(this);
-
   /// Get the library element for `dart:async`.
   LibraryElementForLink get asyncLibrary =>
       _asyncLibrary ??= getLibrary(Uri.parse('dart:async'));
@@ -3982,6 +3991,10 @@
   InheritanceManager2 get inheritanceManager =>
       _inheritanceManager ??= new InheritanceManager2(typeSystem);
 
+  /// Get a stub implementation of [AnalysisContext] which can be used during
+  /// linking.
+  get session => _session ??= new AnalysisSessionForLink();
+
   /// Indicates whether type inference should use strong mode rules.
   @deprecated
   bool get strongMode => true;
@@ -5198,14 +5211,20 @@
         case UnlinkedExprOperation.makeUntypedList:
         case UnlinkedExprOperation.makeUntypedMap:
         case UnlinkedExprOperation.makeUntypedSet:
+        case UnlinkedExprOperation.makeUntypedSetOrMap:
+        case UnlinkedExprOperation.forParts:
+        case UnlinkedExprOperation.variableDeclaration:
+        case UnlinkedExprOperation.forInitializerDeclarationsUntyped:
           intPtr++;
           break;
         case UnlinkedExprOperation.makeTypedList:
         case UnlinkedExprOperation.makeTypedSet:
+        case UnlinkedExprOperation.forInitializerDeclarationsTyped:
           refPtr++;
           intPtr++;
           break;
         case UnlinkedExprOperation.makeTypedMap:
+        case UnlinkedExprOperation.makeTypedMap2:
           refPtr += 2;
           intPtr++;
           break;
@@ -5237,6 +5256,7 @@
           break;
         case UnlinkedExprOperation.typeCast:
         case UnlinkedExprOperation.typeCheck:
+        case UnlinkedExprOperation.forEachPartsWithTypedDeclaration:
           refPtr++;
           break;
         case UnlinkedExprOperation.pushLocalFunctionReference:
@@ -5327,6 +5347,7 @@
   InterfaceType _listType;
   InterfaceType _mapType;
   InterfaceType _mapObjectObjectType;
+  InterfaceType _neverType;
   InterfaceType _nullType;
   InterfaceType _numType;
   InterfaceType _objectType;
@@ -5411,6 +5432,10 @@
       _mapType ??= _buildInterfaceType(_linker.coreLibrary, 'Map');
 
   @override
+  InterfaceType get neverType =>
+      _neverType ??= _buildInterfaceType(_linker.coreLibrary, 'Never');
+
+  @override
   DartObjectImpl get nullObject {
     // TODO(paulberry): implement if needed
     throw new UnimplementedError();
diff --git a/pkg/analyzer/lib/src/summary/name_filter.dart b/pkg/analyzer/lib/src/summary/name_filter.dart
index c71ff18..62633ef 100644
--- a/pkg/analyzer/lib/src/summary/name_filter.dart
+++ b/pkg/analyzer/lib/src/summary/name_filter.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/summary/package_bundle_reader.dart b/pkg/analyzer/lib/src/summary/package_bundle_reader.dart
index dc9e818..d015e2a 100644
--- a/pkg/analyzer/lib/src/summary/package_bundle_reader.dart
+++ b/pkg/analyzer/lib/src/summary/package_bundle_reader.dart
@@ -1,23 +1,18 @@
+// 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:io' as io;
 import 'dart:math' show min;
 
 import 'package:analyzer/dart/analysis/session.dart';
-import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/src/context/cache.dart';
-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' 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';
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:analyzer/src/summary/resynthesize.dart';
-import 'package:analyzer/src/task/api/dart.dart';
-import 'package:analyzer/src/task/api/general.dart';
-import 'package:analyzer/src/task/api/model.dart';
-import 'package:analyzer/src/task/dart.dart';
 
 /**
  * A [ConflictingSummaryException] indicates that two different summaries
@@ -70,26 +65,6 @@
 }
 
 /**
- * The [ResultProvider] that provides results from input package summaries.
- */
-class InputPackagesResultProvider extends ResynthesizerResultProvider {
-  InputPackagesResultProvider(
-      InternalAnalysisContext context, SummaryDataStore dataStore,
-      {AnalysisSession session})
-      : super(context, session, dataStore) {
-    createResynthesizer();
-    context.typeProvider = resynthesizer.typeProvider;
-    resynthesizer.finishCoreAsyncLibraries();
-  }
-
-  @override
-  bool hasResultsForSource(Source source) {
-    String uriString = source.uri.toString();
-    return resynthesizer.hasLibrarySummary(uriString);
-  }
-}
-
-/**
  * The [UriResolver] that knows about sources that are served from their
  * summaries.
  */
@@ -165,173 +140,6 @@
 }
 
 /**
- * The [ResultProvider] that provides results using summary resynthesizer.
- */
-abstract class ResynthesizerResultProvider extends ResultProvider {
-  final InternalAnalysisContext context;
-  final AnalysisSession session;
-  final SummaryDataStore _dataStore;
-
-  StoreBasedSummaryResynthesizer _resynthesizer;
-
-  ResynthesizerResultProvider(this.context, this.session, this._dataStore);
-
-  SummaryResynthesizer get resynthesizer => _resynthesizer;
-
-  /**
-   * Add a new [bundle] to the resynthesizer.
-   */
-  void addBundle(String path, PackageBundle bundle) {
-    _dataStore.addBundle(path, bundle);
-  }
-
-  @override
-  bool compute(CacheEntry entry, ResultDescriptor result) {
-    AnalysisTarget target = entry.target;
-
-    if (result == TYPE_PROVIDER) {
-      entry.setValue(result as ResultDescriptor<TypeProvider>,
-          _resynthesizer.typeProvider, const <TargetedResult>[]);
-      return true;
-    }
-
-    // LINE_INFO can be provided using just the UnlinkedUnit.
-    if (target is Source && result == LINE_INFO) {
-      String uriString = target.uri.toString();
-      UnlinkedUnit unlinkedUnit = _dataStore.unlinkedMap[uriString];
-      if (unlinkedUnit != null) {
-        List<int> lineStarts = unlinkedUnit.lineStarts;
-        if (lineStarts.isNotEmpty) {
-          LineInfo lineInfo = new LineInfo(lineStarts);
-          entry.setValue(result as ResultDescriptor<LineInfo>, lineInfo,
-              const <TargetedResult>[]);
-          return true;
-        }
-      }
-      return false;
-    }
-
-    // Check whether there are results for the source.
-    if (!hasResultsForSource(target.librarySource ?? target.source)) {
-      return false;
-    }
-    // Constant expressions are always resolved in summaries.
-    if (result == CONSTANT_EXPRESSION_RESOLVED &&
-        target is ConstantEvaluationTarget) {
-      entry.setValue(
-          result as ResultDescriptor<bool>, true, const <TargetedResult>[]);
-      return true;
-    }
-    // Provide results for Source.
-    if (target is Source) {
-      String uriString = target.uri.toString();
-      // Provide known results.
-      if (result == LIBRARY_ELEMENT1 ||
-          result == LIBRARY_ELEMENT2 ||
-          result == LIBRARY_ELEMENT3 ||
-          result == LIBRARY_ELEMENT4 ||
-          result == LIBRARY_ELEMENT5 ||
-          result == LIBRARY_ELEMENT6 ||
-          result == LIBRARY_ELEMENT7 ||
-          result == LIBRARY_ELEMENT8 ||
-          result == LIBRARY_ELEMENT9 ||
-          result == LIBRARY_ELEMENT) {
-        LibraryElement libraryElement =
-            resynthesizer.getLibraryElement(uriString);
-        entry.setValue(result as ResultDescriptor<LibraryElement>,
-            libraryElement, const <TargetedResult>[]);
-        return true;
-      } else if (result == READY_LIBRARY_ELEMENT2 ||
-          result == READY_LIBRARY_ELEMENT6 ||
-          result == READY_LIBRARY_ELEMENT7) {
-        entry.setValue(
-            result as ResultDescriptor<bool>, true, const <TargetedResult>[]);
-        return true;
-      } else if (result == MODIFICATION_TIME) {
-        entry.setValue(
-            result as ResultDescriptor<int>, 0, const <TargetedResult>[]);
-        return true;
-      } else if (result == SOURCE_KIND) {
-        UnlinkedUnit unlinked = _dataStore.unlinkedMap[uriString];
-        if (unlinked != null) {
-          entry.setValue(
-              result as ResultDescriptor<SourceKind>,
-              unlinked.isPartOf ? SourceKind.PART : SourceKind.LIBRARY,
-              const <TargetedResult>[]);
-          return true;
-        }
-        return false;
-      } else if (result == CONTAINING_LIBRARIES) {
-        List<String> libraryUriStrings =
-            _dataStore.getContainingLibraryUris(uriString);
-        if (libraryUriStrings != null) {
-          List<Source> librarySources = libraryUriStrings
-              .map((libraryUriString) =>
-                  context.sourceFactory.resolveUri(target, libraryUriString))
-              .toList(growable: false);
-          entry.setValue(result as ResultDescriptor<List<Source>>,
-              librarySources, const <TargetedResult>[]);
-          return true;
-        }
-        return false;
-      }
-    } else if (target is LibrarySpecificUnit) {
-      if (result == CREATED_RESOLVED_UNIT1 ||
-          result == CREATED_RESOLVED_UNIT2 ||
-          result == CREATED_RESOLVED_UNIT3 ||
-          result == CREATED_RESOLVED_UNIT4 ||
-          result == CREATED_RESOLVED_UNIT5 ||
-          result == CREATED_RESOLVED_UNIT6 ||
-          result == CREATED_RESOLVED_UNIT7 ||
-          result == CREATED_RESOLVED_UNIT8 ||
-          result == CREATED_RESOLVED_UNIT9 ||
-          result == CREATED_RESOLVED_UNIT10 ||
-          result == CREATED_RESOLVED_UNIT11) {
-        entry.setValue(
-            result as ResultDescriptor<bool>, true, const <TargetedResult>[]);
-        return true;
-      }
-      if (result == COMPILATION_UNIT_ELEMENT) {
-        String libraryUri = target.library.uri.toString();
-        String unitUri = target.unit.uri.toString();
-        CompilationUnitElement unit = resynthesizer.getElement(
-            new ElementLocationImpl.con3(<String>[libraryUri, unitUri]));
-        if (unit != null) {
-          entry.setValue(result as ResultDescriptor<CompilationUnitElement>,
-              unit, const <TargetedResult>[]);
-          return true;
-        }
-      }
-    } else if (target is VariableElement) {
-      if (result == INFERRED_STATIC_VARIABLE) {
-        entry.setValue(result as ResultDescriptor<VariableElement>, target,
-            const <TargetedResult>[]);
-        return true;
-      }
-    }
-    // Unknown target.
-    return false;
-  }
-
-  /**
-   * Create the [resynthesizer] instance.
-   *
-   * Subclasses must call this method in their constructors.
-   */
-  void createResynthesizer() {
-    _resynthesizer = new StoreBasedSummaryResynthesizer(
-        context, session, context.sourceFactory, true, _dataStore);
-  }
-
-  /**
-   * Return `true` if this result provider can provide a result for the
-   * given [source].  The provider must ensure that [addBundle] is invoked for
-   * every bundle that would be required to provide results for the [source].
-   */
-  bool hasResultsForSource(Source source);
-}
-
-/**
  * A concrete resynthesizer that serves summaries from [SummaryDataStore].
  */
 class StoreBasedSummaryResynthesizer extends SummaryResynthesizer {
diff --git a/pkg/analyzer/lib/src/summary/prelink.dart b/pkg/analyzer/lib/src/summary/prelink.dart
index 6bda8fd..b0116e6 100644
--- a/pkg/analyzer/lib/src/summary/prelink.dart
+++ b/pkg/analyzer/lib/src/summary/prelink.dart
@@ -1,7 +1,8 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:analyzer/dart/analysis/declared_variables.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:analyzer/src/summary/format.dart';
 import 'package:analyzer/src/summary/idl.dart';
@@ -21,19 +22,13 @@
     UnlinkedUnit definingUnit,
     GetPartCallback getPart,
     GetImportCallback getImport,
-    GetDeclaredVariable getDeclaredVariable) {
-  return new _Prelinker(definingUnitUri, definingUnit, getPart, getImport,
-          getDeclaredVariable)
+    DeclaredVariables declaredVariables) {
+  return new _Prelinker(
+          definingUnitUri, definingUnit, getPart, getImport, declaredVariables)
       .prelink();
 }
 
 /**
- * Return the raw string value of the variable with the given [name],
- * or `null` of the variable is not defined.
- */
-typedef String GetDeclaredVariable(String name);
-
-/**
  * Type of the callback used by the prelinker to obtain public namespace
  * information about libraries with the given [absoluteUri] imported by the
  * library to be prelinked (and the transitive closure of parts and exports
@@ -219,7 +214,7 @@
   final UnlinkedUnit definingUnit;
   final GetPartCallback getPart;
   final GetImportCallback getImport;
-  final GetDeclaredVariable getDeclaredVariable;
+  final DeclaredVariables declaredVariables;
 
   /**
    * Cache of values returned by [getImport].
@@ -263,7 +258,7 @@
   final Map<String, _ExportNamespace> exportNamespaces = {};
 
   _Prelinker(this.definingUnitUri, this.definingUnit, this.getPart,
-      this.getImport, this.getDeclaredVariable) {
+      this.getImport, this.declaredVariables) {
     partCache[definingUnitUri] = definingUnit;
     importCache[definingUnitUri] = definingUnit.publicNamespace;
   }
@@ -719,7 +714,7 @@
   String _selectUri(
       String defaultUri, List<UnlinkedConfiguration> configurations) {
     for (UnlinkedConfiguration configuration in configurations) {
-      if (getDeclaredVariable(configuration.name) == configuration.value) {
+      if (declaredVariables.get(configuration.name) == configuration.value) {
         return configuration.uri;
       }
     }
diff --git a/pkg/analyzer/lib/src/summary/summarize_ast.dart b/pkg/analyzer/lib/src/summary/summarize_ast.dart
index 1f05586..895d564 100644
--- a/pkg/analyzer/lib/src/summary/summarize_ast.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_ast.dart
@@ -33,17 +33,36 @@
   /// siblings.
   final Map<int, int> localClosureIndexMap;
 
-  /// If the expression being serialized appears inside a function body, the
-  /// names of parameters that are in scope.  Otherwise `null`.
-  final Set<String> parameterNames;
+  /// The names of local variables and parameters that are in scope.
+  /// This is a list so that we can handle nesting by pushing and popping values
+  /// at the end of it.
+  final List<String> variableNames;
 
   _ConstExprSerializer(bool forConst, this.visitor, this.localClosureIndexMap,
-      this.parameterNames)
-      : super(forConst);
+      List<String> variableNames)
+      : variableNames = variableNames ?? [],
+        super(forConst);
 
   @override
   bool isParameterName(String name) {
-    return parameterNames?.contains(name) ?? false;
+    return variableNames?.contains(name) ?? false;
+  }
+
+  @override
+  void popVariableNames(int count) {
+    variableNames.length -= count;
+  }
+
+  @override
+  void pushVariableName(String name) {
+    variableNames.add(name);
+  }
+
+  @override
+  void serialize(Expression expr) {
+    int startingVariableCount = variableNames.length;
+    super.serialize(expr);
+    assert(startingVariableCount == variableNames.length);
   }
 
   @override
@@ -298,9 +317,8 @@
   /// needed by type inference.
   bool _serializeClosureBodyExprs = false;
 
-  /// If a closure function body is being serialized, the set of closure
-  /// parameter names which are currently in scope.  Otherwise `null`.
-  Set<String> _parameterNames;
+  /// The set of variable names which are currently in scope.
+  List<String> _variableNames = [];
 
   /// Indicates whether parameters found during visitors might inherit
   /// covariance.
@@ -482,9 +500,9 @@
   /// Serialize the given [expression], creating an [UnlinkedExprBuilder].
   UnlinkedExprBuilder serializeConstExpr(
       bool forConst, Map<int, int> localClosureIndexMap, Expression expression,
-      [Set<String> parameterNames]) {
+      [List<String> variableNames]) {
     _ConstExprSerializer serializer = new _ConstExprSerializer(
-        forConst, this, localClosureIndexMap, parameterNames);
+        forConst, this, localClosureIndexMap, variableNames);
     serializer.serialize(expression);
     return serializer.toBuilder(expression.beginToken, expression.endToken);
   }
@@ -591,11 +609,9 @@
     }
     b.visibleOffset = enclosingBlock?.offset;
     b.visibleLength = enclosingBlock?.length;
-    Set<String> oldParameterNames = _parameterNames;
+    int oldVariableNamesLength = _variableNames.length;
     if (formalParameters != null && formalParameters.parameters.isNotEmpty) {
-      _parameterNames =
-          _parameterNames == null ? new Set<String>() : _parameterNames.toSet();
-      _parameterNames.addAll(formalParameters.parameters
+      _variableNames.addAll(formalParameters.parameters
           .map((FormalParameter p) => p.identifier.name));
     }
     serializeFunctionBody(
@@ -605,7 +621,7 @@
       body?.accept(new MixinSuperInvokedNamesCollector(mixinSuperInvokedNames));
     }
 
-    _parameterNames = oldParameterNames;
+    _variableNames.length = oldVariableNamesLength;
     scopes.removeLast();
     assert(scopes.length == oldScopesLength);
     return b;
@@ -659,10 +675,10 @@
     if (serializeBodyExpr) {
       if (body is Expression) {
         b.bodyExpr = serializeConstExpr(
-            forConst, _localClosureIndexMap, body, _parameterNames);
+            forConst, _localClosureIndexMap, body, _variableNames);
       } else if (body is ExpressionFunctionBody) {
         b.bodyExpr = serializeConstExpr(
-            forConst, _localClosureIndexMap, body.expression, _parameterNames);
+            forConst, _localClosureIndexMap, body.expression, _variableNames);
       } else {
         // TODO(paulberry): serialize other types of function bodies.
       }
@@ -1093,8 +1109,8 @@
     Map<int, int> localClosureIndexMap = serializeFunctionBody(b,
         node.initializers, node.body, node.constKeyword != null, false, false);
     if (node.constKeyword != null) {
-      Set<String> constructorParameterNames =
-          node.parameters.parameters.map((p) => p.identifier.name).toSet();
+      List<String> constructorParameterNames =
+          node.parameters.parameters.map((p) => p.identifier.name).toList();
       b.constantInitializers = node.initializers
           .map((ConstructorInitializer initializer) =>
               serializeConstructorInitializer(initializer, (Expression expr) {
diff --git a/pkg/analyzer/lib/src/summary/summarize_const_expr.dart b/pkg/analyzer/lib/src/summary/summarize_const_expr.dart
index 0fc9762..79f9c9a 100644
--- a/pkg/analyzer/lib/src/summary/summarize_const_expr.dart
+++ b/pkg/analyzer/lib/src/summary/summarize_const_expr.dart
@@ -127,6 +127,13 @@
   /// Return `true` if the given [name] is a parameter reference.
   bool isParameterName(String name);
 
+  /// Removes the [count] variables that were most recently added to the scope
+  /// by [pushVariableName].
+  void popVariableNames(int count);
+
+  /// Pushes a variable with the given [name] onto the current scope.
+  void pushVariableName(String name);
+
   /// Serialize the given [expr] expression into this serializer state.
   void serialize(Expression expr) {
     try {
@@ -247,6 +254,9 @@
       EntityRefBuilder ref = serializeIdentifierSequence(expr);
       references.add(ref);
       operations.add(UnlinkedExprOperation.assignToRef);
+    } else if (expr is SimpleIdentifier && isParameterName(expr.name)) {
+      strings.add(expr.name);
+      operations.add(UnlinkedExprOperation.assignToParameter);
     } else if (expr is PropertyAccess) {
       if (!expr.isCascaded) {
         _serialize(expr.target);
@@ -293,8 +303,10 @@
   }
 
   /// Serialize the given [expr] expression into this serializer state.
-  void _serialize(Expression expr) {
-    if (expr is IntegerLiteral) {
+  void _serialize(Expression expr, {bool emptyExpressionPermitted: false}) {
+    if (emptyExpressionPermitted && expr == null) {
+      operations.add(UnlinkedExprOperation.pushEmptyExpression);
+    } else if (expr is IntegerLiteral) {
       int value = expr.value ?? 0;
       if (value >= 0) {
         _pushInt(value);
@@ -344,10 +356,8 @@
           typeName.typeArguments != null);
     } else if (expr is ListLiteral) {
       _serializeListLiteral(expr);
-    } else if (expr is MapLiteral) {
-      _serializeMapLiteral(expr);
-    } else if (expr is SetLiteral) {
-      _serializeSetLiteral(expr);
+    } else if (expr is SetOrMapLiteral) {
+      _serializeSetOrMapLiteral(expr);
     } else if (expr is MethodInvocation) {
       _serializeMethodInvocation(expr);
     } else if (expr is BinaryExpression) {
@@ -507,6 +517,8 @@
       operations.add(UnlinkedExprOperation.bitOr);
     } else if (operator == TokenType.GT_GT) {
       operations.add(UnlinkedExprOperation.bitShiftRight);
+    } else if (operator == TokenType.GT_GT_GT) {
+      operations.add(UnlinkedExprOperation.bitShiftRightLogical);
     } else if (operator == TokenType.LT_LT) {
       operations.add(UnlinkedExprOperation.bitShiftLeft);
     } else if (operator == TokenType.PLUS) {
@@ -536,10 +548,107 @@
     }
   }
 
+  void _serializeCollectionElement(CollectionElement element) {
+    if (element is Expression) {
+      _serialize(element);
+    } else if (element is MapLiteralEntry) {
+      _serialize(element.key);
+      _serialize(element.value);
+      operations.add(UnlinkedExprOperation.makeMapLiteralEntry);
+    } else if (element is SpreadElement) {
+      _serialize(element.expression);
+      bool isNullAware = element.spreadOperator.type ==
+          TokenType.PERIOD_PERIOD_PERIOD_QUESTION;
+      operations.add(isNullAware
+          ? UnlinkedExprOperation.nullAwareSpreadElement
+          : UnlinkedExprOperation.spreadElement);
+    } else if (element is IfElement) {
+      _serialize(element.condition);
+      _serializeCollectionElement(element.thenElement);
+      var elseElement = element.elseElement;
+      if (elseElement == null) {
+        operations.add(UnlinkedExprOperation.ifElement);
+      } else {
+        _serializeCollectionElement(elseElement);
+        operations.add(UnlinkedExprOperation.ifElseElement);
+      }
+    } else if (element is ForElement) {
+      isValidConst = false;
+      var parts = element.forLoopParts;
+      int numVariablesToPop = 0;
+      if (parts is ForParts) {
+        if (parts is ForPartsWithExpression) {
+          _serialize(parts.initialization, emptyExpressionPermitted: true);
+        } else if (parts is ForPartsWithDeclarations) {
+          for (var variable in parts.variables.variables) {
+            operations.add(UnlinkedExprOperation.variableDeclarationStart);
+            var name = variable.name.name;
+            strings.add(name);
+            pushVariableName(name);
+            ++numVariablesToPop;
+            _serialize(variable.initializer, emptyExpressionPermitted: true);
+            operations.add(UnlinkedExprOperation.variableDeclaration);
+            ints.add(0);
+          }
+          var type = parts.variables.type;
+          if (type == null) {
+            operations
+                .add(UnlinkedExprOperation.forInitializerDeclarationsUntyped);
+          } else {
+            references.add(serializeType(type));
+            operations
+                .add(UnlinkedExprOperation.forInitializerDeclarationsTyped);
+          }
+          ints.add(parts.variables.variables.length);
+        } else {
+          throw StateError('Unrecognized for parts');
+        }
+        _serialize(parts.condition, emptyExpressionPermitted: true);
+        for (var updater in parts.updaters) {
+          _serialize(updater);
+        }
+        operations.add(UnlinkedExprOperation.forParts);
+        ints.add(parts.updaters.length);
+      } else if (parts is ForEachParts) {
+        if (parts is ForEachPartsWithIdentifier) {
+          _serialize(parts.identifier);
+          _serialize(parts.iterable);
+          operations.add(UnlinkedExprOperation.forEachPartsWithIdentifier);
+        } else if (parts is ForEachPartsWithDeclaration) {
+          _serialize(parts.iterable);
+          var type = parts.loopVariable.type;
+          if (type == null) {
+            operations
+                .add(UnlinkedExprOperation.forEachPartsWithUntypedDeclaration);
+          } else {
+            references.add(serializeType(type));
+            operations
+                .add(UnlinkedExprOperation.forEachPartsWithTypedDeclaration);
+          }
+          var name = parts.loopVariable.identifier.name;
+          strings.add(name);
+          pushVariableName(name);
+          ++numVariablesToPop;
+        } else {
+          throw StateError('Unrecognized for parts');
+        }
+      } else {
+        throw StateError('Unrecognized for parts');
+      }
+      _serializeCollectionElement(element.body);
+      popVariableNames(numVariablesToPop);
+      operations.add(element.awaitKeyword == null
+          ? UnlinkedExprOperation.forElement
+          : UnlinkedExprOperation.forElementWithAwait);
+    } else {
+      throw new StateError('Unsupported CollectionElement: $element');
+    }
+  }
+
   void _serializeListLiteral(ListLiteral expr) {
     if (forConst || expr.typeArguments == null) {
-      List<Expression> elements = expr.elements;
-      elements.forEach(_serialize);
+      List<CollectionElement> elements = expr.elements;
+      elements.forEach(_serializeCollectionElement);
       ints.add(elements.length);
     } else {
       ints.add(0);
@@ -553,26 +662,6 @@
     }
   }
 
-  void _serializeMapLiteral(MapLiteral expr) {
-    if (forConst || expr.typeArguments == null) {
-      for (MapLiteralEntry entry in expr.entries) {
-        _serialize(entry.key);
-        _serialize(entry.value);
-      }
-      ints.add(expr.entries.length);
-    } else {
-      ints.add(0);
-    }
-    if (expr.typeArguments != null &&
-        expr.typeArguments.arguments.length == 2) {
-      references.add(serializeType(expr.typeArguments.arguments[0]));
-      references.add(serializeType(expr.typeArguments.arguments[1]));
-      operations.add(UnlinkedExprOperation.makeTypedMap);
-    } else {
-      operations.add(UnlinkedExprOperation.makeUntypedMap);
-    }
-  }
-
   void _serializeMethodInvocation(MethodInvocation invocation) {
     Expression target = invocation.target;
     SimpleIdentifier methodName = invocation.methodName;
@@ -652,20 +741,26 @@
     }
   }
 
-  void _serializeSetLiteral(SetLiteral expr) {
+  void _serializeSetOrMapLiteral(SetOrMapLiteral expr) {
     if (forConst || expr.typeArguments == null) {
-      List<Expression> elements = expr.elements;
-      elements.forEach(_serialize);
-      ints.add(elements.length);
+      for (CollectionElement element in expr.elements) {
+        _serializeCollectionElement(element);
+      }
+      ints.add(expr.elements.length);
     } else {
       ints.add(0);
     }
-    if (expr.typeArguments != null &&
-        expr.typeArguments.arguments.length == 1) {
-      references.add(serializeType(expr.typeArguments.arguments[0]));
+
+    List<TypeAnnotation> typeArguments = expr.typeArguments?.arguments;
+    if (typeArguments != null && typeArguments.length == 2) {
+      references.add(serializeType(typeArguments[0]));
+      references.add(serializeType(typeArguments[1]));
+      operations.add(UnlinkedExprOperation.makeTypedMap2);
+    } else if (typeArguments != null && typeArguments.length == 1) {
+      references.add(serializeType(typeArguments[0]));
       operations.add(UnlinkedExprOperation.makeTypedSet);
     } else {
-      operations.add(UnlinkedExprOperation.makeUntypedSet);
+      operations.add(UnlinkedExprOperation.makeUntypedSetOrMap);
     }
   }
 
diff --git a/pkg/analyzer/lib/src/summary/summary_file_builder.dart b/pkg/analyzer/lib/src/summary/summary_file_builder.dart
index 9d7b6ad..f774d2a 100644
--- a/pkg/analyzer/lib/src/summary/summary_file_builder.dart
+++ b/pkg/analyzer/lib/src/summary/summary_file_builder.dart
@@ -4,6 +4,7 @@
 
 import 'dart:collection';
 
+import 'package:analyzer/dart/analysis/declared_variables.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/error/listener.dart';
@@ -25,11 +26,9 @@
 class SummaryBuilder {
   final Iterable<Source> librarySources;
   final AnalysisContext context;
+
   /**
    * Create a summary builder for these [librarySources] and [context].
-   *
-   * TODO(paulberry): remove optional "strong" parameter once all callers have
-   * stopped passing it in.
    */
   SummaryBuilder(this.librarySources, this.context);
 
@@ -92,9 +91,7 @@
         throw new StateError('Unable to find unresolved unit $uri.');
       }
       return unlinked;
-    }, (String name) {
-      throw new StateError('Unexpected call to GetDeclaredVariable($name).');
-    });
+    }, DeclaredVariables(), context.analysisOptions);
     map.forEach(bundleAssembler.addLinkedLibrary);
 
     return bundleAssembler.assemble().toBuffer();
diff --git a/pkg/analyzer/lib/src/summary/summary_sdk.dart b/pkg/analyzer/lib/src/summary/summary_sdk.dart
index b3389a0..f31b076 100644
--- a/pkg/analyzer/lib/src/summary/summary_sdk.dart
+++ b/pkg/analyzer/lib/src/summary/summary_sdk.dart
@@ -61,11 +61,6 @@
       SourceFactory factory = new SourceFactory(
           [new DartUriResolver(this)], null, resourceProvider);
       _analysisContext.sourceFactory = factory;
-      SummaryDataStore dataStore =
-          new SummaryDataStore([], resourceProvider: resourceProvider);
-      dataStore.addBundle(null, _bundle);
-      _analysisContext.resultProvider =
-          new InputPackagesResultProvider(_analysisContext, dataStore);
     }
     return _analysisContext;
   }
@@ -133,6 +128,7 @@
   InterfaceType _listType;
   InterfaceType _mapType;
   InterfaceType _mapObjectObjectType;
+  InterfaceType _neverType;
   DartObjectImpl _nullObject;
   InterfaceType _nullType;
   InterfaceType _numType;
@@ -271,6 +267,12 @@
   }
 
   @override
+  InterfaceType get neverType {
+    assert(_coreLibrary != null);
+    return _neverType ??= _getType(_coreLibrary, 'Never');
+  }
+
+  @override
   DartObjectImpl get nullObject {
     if (_nullObject == null) {
       _nullObject = new DartObjectImpl(nullType, NullState.NULL_STATE);
diff --git a/pkg/analyzer/lib/src/summary2/ast_binary_reader.dart b/pkg/analyzer/lib/src/summary2/ast_binary_reader.dart
new file mode 100644
index 0000000..15cab36
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary2/ast_binary_reader.dart
@@ -0,0 +1,1539 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/standard_ast_factory.dart';
+import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/src/dart/ast/ast.dart';
+import 'package:analyzer/src/dart/element/member.dart';
+import 'package:analyzer/src/generated/utilities_dart.dart';
+import 'package:analyzer/src/summary/idl.dart';
+import 'package:analyzer/src/summary2/lazy_ast.dart';
+import 'package:analyzer/src/summary2/linked_unit_context.dart';
+
+/// Deserializer of fully resolved ASTs from flat buffers.
+class AstBinaryReader {
+  final LinkedUnitContext _unitContext;
+
+  /// Set to `true` when this reader is used to lazily read its unit.
+  bool isLazy = false;
+
+  AstBinaryReader(this._unitContext);
+
+  AstNode readNode(LinkedNode data) {
+    var node = _readNode(data);
+    if (node == null) return null;
+
+    if (!isLazy) {
+      _unitContext.tokensContext.linkTokens(node.beginToken, node.endToken);
+    }
+
+    return node;
+  }
+
+  DartType readType(LinkedNodeType data) {
+    return _readType(data);
+  }
+
+  Element _elementOfComponents(
+    int rawElementIndex,
+    LinkedNodeType definingTypeNode,
+  ) {
+    var element = _getElement(rawElementIndex);
+    if (definingTypeNode == null) return element;
+
+    var definingType = _readType(definingTypeNode);
+    if (element is ConstructorElement) {
+      return ConstructorMember.from(element, definingType);
+    } else {
+      throw UnimplementedError('(${element.runtimeType}) $element');
+    }
+  }
+
+  T _getElement<T extends Element>(int index) {
+    var bundleContext = _unitContext.bundleContext;
+    return bundleContext.elementOfIndex(index);
+  }
+
+  Token _getToken(int index) {
+    return _unitContext.tokensContext.tokenOfIndex(index);
+  }
+
+  List<Token> _getTokens(List<int> indexList) {
+    var result = List<Token>(indexList.length);
+    for (var i = 0; i < indexList.length; ++i) {
+      var index = indexList[i];
+      result[i] = _getToken(index);
+    }
+    return result;
+  }
+
+  AdjacentStrings _read_adjacentStrings(LinkedNode data) {
+    return astFactory.adjacentStrings(
+      _readNodeList(data.adjacentStrings_strings),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  Annotation _read_annotation(LinkedNode data) {
+    return astFactory.annotation(
+      _getToken(data.annotation_atSign),
+      _readNode(data.annotation_name),
+      _getToken(data.annotation_period),
+      _readNode(data.annotation_constructorName),
+      _readNode(data.annotation_arguments),
+    );
+  }
+
+  ArgumentList _read_argumentList(LinkedNode data) {
+    return astFactory.argumentList(
+      _getToken(data.argumentList_leftParenthesis),
+      _readNodeList(data.argumentList_arguments),
+      _getToken(data.argumentList_rightParenthesis),
+    );
+  }
+
+  AsExpression _read_asExpression(LinkedNode data) {
+    return astFactory.asExpression(
+      _readNode(data.asExpression_expression),
+      _getToken(data.asExpression_asOperator),
+      _readNode(data.asExpression_type),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  AssertInitializer _read_assertInitializer(LinkedNode data) {
+    return astFactory.assertInitializer(
+      _getToken(data.assertInitializer_assertKeyword),
+      _getToken(data.assertInitializer_leftParenthesis),
+      _readNode(data.assertInitializer_condition),
+      _getToken(data.assertInitializer_comma),
+      _readNode(data.assertInitializer_message),
+      _getToken(data.assertInitializer_rightParenthesis),
+    );
+  }
+
+  AssertStatement _read_assertStatement(LinkedNode data) {
+    return astFactory.assertStatement(
+      _getToken(data.assertStatement_assertKeyword),
+      _getToken(data.assertStatement_leftParenthesis),
+      _readNode(data.assertStatement_condition),
+      _getToken(data.assertStatement_comma),
+      _readNode(data.assertStatement_message),
+      _getToken(data.assertStatement_rightParenthesis),
+      _getToken(data.assertStatement_semicolon),
+    );
+  }
+
+  AssignmentExpression _read_assignmentExpression(LinkedNode data) {
+    return astFactory.assignmentExpression(
+      _readNode(data.assignmentExpression_leftHandSide),
+      _getToken(data.assignmentExpression_operator),
+      _readNode(data.assignmentExpression_rightHandSide),
+    )
+      ..staticElement = _elementOfComponents(
+        data.assignmentExpression_element,
+        data.assignmentExpression_elementType,
+      )
+      ..staticType = _readType(data.expression_type);
+  }
+
+  AwaitExpression _read_awaitExpression(LinkedNode data) {
+    return astFactory.awaitExpression(
+      _getToken(data.awaitExpression_awaitKeyword),
+      _readNode(data.awaitExpression_expression),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  BinaryExpression _read_binaryExpression(LinkedNode data) {
+    return astFactory.binaryExpression(
+      _readNode(data.binaryExpression_leftOperand),
+      _getToken(data.binaryExpression_operator),
+      _readNode(data.binaryExpression_rightOperand),
+    )
+      ..staticElement = _elementOfComponents(
+        data.binaryExpression_element,
+        data.binaryExpression_elementType,
+      )
+      ..staticType = _readType(data.expression_type);
+  }
+
+  Block _read_block(LinkedNode data) {
+    return astFactory.block(
+      _getToken(data.block_leftBracket),
+      _readNodeList(data.block_statements),
+      _getToken(data.block_rightBracket),
+    );
+  }
+
+  BlockFunctionBody _read_blockFunctionBody(LinkedNode data) {
+    return astFactory.blockFunctionBody(
+      _getToken(data.blockFunctionBody_keyword),
+      _getToken(data.blockFunctionBody_star),
+      _readNode(data.blockFunctionBody_block),
+    );
+  }
+
+  BooleanLiteral _read_booleanLiteral(LinkedNode data) {
+    return astFactory.booleanLiteral(
+      _getToken(data.booleanLiteral_literal),
+      data.booleanLiteral_value,
+    )..staticType = _readType(data.expression_type);
+  }
+
+  BreakStatement _read_breakStatement(LinkedNode data) {
+    return astFactory.breakStatement(
+      _getToken(data.breakStatement_breakKeyword),
+      _readNode(data.breakStatement_label),
+      _getToken(data.breakStatement_semicolon),
+    );
+  }
+
+  CascadeExpression _read_cascadeExpression(LinkedNode data) {
+    return astFactory.cascadeExpression(
+      _readNode(data.cascadeExpression_target),
+      _readNodeList(data.cascadeExpression_sections),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  CatchClause _read_catchClause(LinkedNode data) {
+    return astFactory.catchClause(
+      _getToken(data.catchClause_onKeyword),
+      _readNode(data.catchClause_exceptionType),
+      _getToken(data.catchClause_catchKeyword),
+      _getToken(data.catchClause_leftParenthesis),
+      _readNode(data.catchClause_exceptionParameter),
+      _getToken(data.catchClause_comma),
+      _readNode(data.catchClause_stackTraceParameter),
+      _getToken(data.catchClause_rightParenthesis),
+      _readNode(data.catchClause_body),
+    );
+  }
+
+  ClassDeclaration _read_classDeclaration(LinkedNode data) {
+    var node = astFactory.classDeclaration(
+      _readNodeLazy(data.annotatedNode_comment),
+      _readNodeListLazy(data.annotatedNode_metadata),
+      _getToken(data.classDeclaration_abstractKeyword),
+      _getToken(data.classDeclaration_classKeyword),
+      _readNode(data.namedCompilationUnitMember_name),
+      _readNode(data.classOrMixinDeclaration_typeParameters),
+      _readNodeLazy(data.classDeclaration_extendsClause),
+      _readNodeLazy(data.classDeclaration_withClause),
+      _readNodeLazy(data.classOrMixinDeclaration_implementsClause),
+      _getToken(data.classOrMixinDeclaration_leftBracket),
+      _readNodeListLazy(data.classOrMixinDeclaration_members),
+      _getToken(data.classOrMixinDeclaration_rightBracket),
+    );
+    node.nativeClause = _readNodeLazy(data.classDeclaration_nativeClause);
+    LazyClassDeclaration.setData(node, data);
+    return node;
+  }
+
+  ClassTypeAlias _read_classTypeAlias(LinkedNode data) {
+    var node = astFactory.classTypeAlias(
+      _readNodeLazy(data.annotatedNode_comment),
+      _readNodeListLazy(data.annotatedNode_metadata),
+      _getToken(data.typeAlias_typedefKeyword),
+      _readNode(data.namedCompilationUnitMember_name),
+      _readNode(data.classTypeAlias_typeParameters),
+      _getToken(data.classTypeAlias_equals),
+      _getToken(data.classTypeAlias_abstractKeyword),
+      _readNodeLazy(data.classTypeAlias_superclass),
+      _readNodeLazy(data.classTypeAlias_withClause),
+      _readNodeLazy(data.classTypeAlias_implementsClause),
+      _getToken(data.typeAlias_semicolon),
+    );
+    LazyClassTypeAlias.setData(node, data);
+    return node;
+  }
+
+  Comment _read_comment(LinkedNode data) {
+    var tokens = _getTokens(data.comment_tokens);
+    switch (data.comment_type) {
+      case LinkedNodeCommentType.block:
+        return astFactory.endOfLineComment(
+          tokens,
+        );
+      case LinkedNodeCommentType.documentation:
+        return astFactory.documentationComment(
+          tokens,
+          // TODO(scheglov) references
+        );
+      case LinkedNodeCommentType.endOfLine:
+        return astFactory.endOfLineComment(
+          tokens,
+        );
+      default:
+        throw StateError('${data.comment_type}');
+    }
+  }
+
+  CompilationUnit _read_compilationUnit(LinkedNode data) {
+    return astFactory.compilationUnit(
+      _getToken(data.compilationUnit_beginToken),
+      _readNode(data.compilationUnit_scriptTag),
+      _readNodeList(data.compilationUnit_directives),
+      _readNodeList(data.compilationUnit_declarations),
+      _getToken(data.compilationUnit_endToken),
+    );
+  }
+
+  ConditionalExpression _read_conditionalExpression(LinkedNode data) {
+    return astFactory.conditionalExpression(
+      _readNode(data.conditionalExpression_condition),
+      _getToken(data.conditionalExpression_question),
+      _readNode(data.conditionalExpression_thenExpression),
+      _getToken(data.conditionalExpression_colon),
+      _readNode(data.conditionalExpression_elseExpression),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  Configuration _read_configuration(LinkedNode data) {
+    return astFactory.configuration(
+      _getToken(data.configuration_ifKeyword),
+      _getToken(data.configuration_leftParenthesis),
+      _readNode(data.configuration_name),
+      _getToken(data.configuration_equalToken),
+      _readNode(data.configuration_value),
+      _getToken(data.configuration_rightParenthesis),
+      _readNode(data.configuration_uri),
+    );
+  }
+
+  ConstructorDeclaration _read_constructorDeclaration(LinkedNode data) {
+    var node = astFactory.constructorDeclaration(
+      _readNodeLazy(data.annotatedNode_comment),
+      _readNodeListLazy(data.annotatedNode_metadata),
+      _getToken(data.constructorDeclaration_externalKeyword),
+      _getToken(data.constructorDeclaration_constKeyword),
+      _getToken(data.constructorDeclaration_factoryKeyword),
+      _readNode(data.constructorDeclaration_returnType),
+      _getToken(data.constructorDeclaration_period),
+      _readNode(data.constructorDeclaration_name),
+      _readNodeLazy(data.constructorDeclaration_parameters),
+      _getToken(data.constructorDeclaration_separator),
+      _readNodeListLazy(data.constructorDeclaration_initializers),
+      _readNodeLazy(data.constructorDeclaration_redirectedConstructor),
+      _readNodeLazy(data.constructorDeclaration_body),
+    );
+    LazyConstructorDeclaration.setData(node, data);
+    return node;
+  }
+
+  ConstructorFieldInitializer _read_constructorFieldInitializer(
+      LinkedNode data) {
+    return astFactory.constructorFieldInitializer(
+      _getToken(data.constructorFieldInitializer_thisKeyword),
+      _getToken(data.constructorFieldInitializer_period),
+      _readNode(data.constructorFieldInitializer_fieldName),
+      _getToken(data.constructorFieldInitializer_equals),
+      _readNode(data.constructorFieldInitializer_expression),
+    );
+  }
+
+  ConstructorName _read_constructorName(LinkedNode data) {
+    return astFactory.constructorName(
+      _readNode(data.constructorName_type),
+      _getToken(data.constructorName_period),
+      _readNode(data.constructorName_name),
+    )..staticElement = _elementOfComponents(
+        data.constructorName_element,
+        data.constructorName_elementType,
+      );
+  }
+
+  ContinueStatement _read_continueStatement(LinkedNode data) {
+    return astFactory.continueStatement(
+      _getToken(data.continueStatement_continueKeyword),
+      _readNode(data.continueStatement_label),
+      _getToken(data.continueStatement_semicolon),
+    );
+  }
+
+  DeclaredIdentifier _read_declaredIdentifier(LinkedNode data) {
+    return astFactory.declaredIdentifier(
+      _readNode(data.annotatedNode_comment),
+      _readNodeList(data.annotatedNode_metadata),
+      _getToken(data.declaredIdentifier_keyword),
+      _readNode(data.declaredIdentifier_type),
+      _readNode(data.declaredIdentifier_identifier),
+    );
+  }
+
+  DefaultFormalParameter _read_defaultFormalParameter(LinkedNode data) {
+    var node = astFactory.defaultFormalParameter(
+      _readNode(data.defaultFormalParameter_parameter),
+      data.defaultFormalParameter_isNamed
+          ? ParameterKind.NAMED
+          : ParameterKind.POSITIONAL,
+      _getToken(data.defaultFormalParameter_separator),
+      _readNodeLazy(data.defaultFormalParameter_defaultValue),
+    );
+    LazyFormalParameter.setData(node, data);
+    return node;
+  }
+
+  DoStatement _read_doStatement(LinkedNode data) {
+    return astFactory.doStatement(
+      _getToken(data.doStatement_doKeyword),
+      _readNode(data.doStatement_body),
+      _getToken(data.doStatement_whileKeyword),
+      _getToken(data.doStatement_leftParenthesis),
+      _readNode(data.doStatement_condition),
+      _getToken(data.doStatement_rightParenthesis),
+      _getToken(data.doStatement_semicolon),
+    );
+  }
+
+  DottedName _read_dottedName(LinkedNode data) {
+    return astFactory.dottedName(
+      _readNodeList(data.dottedName_components),
+    );
+  }
+
+  DoubleLiteral _read_doubleLiteral(LinkedNode data) {
+    return astFactory.doubleLiteral(
+      _getToken(data.doubleLiteral_literal),
+      data.doubleLiteral_value,
+    )..staticType = _readType(data.expression_type);
+  }
+
+  EmptyFunctionBody _read_emptyFunctionBody(LinkedNode data) {
+    return astFactory.emptyFunctionBody(
+      _getToken(data.emptyFunctionBody_semicolon),
+    );
+  }
+
+  EmptyStatement _read_emptyStatement(LinkedNode data) {
+    return astFactory.emptyStatement(
+      _getToken(data.emptyStatement_semicolon),
+    );
+  }
+
+  EnumConstantDeclaration _read_enumConstantDeclaration(LinkedNode data) {
+    var node = astFactory.enumConstantDeclaration(
+      _readNodeLazy(data.annotatedNode_comment),
+      _readNodeListLazy(data.annotatedNode_metadata),
+      _readNode(data.enumConstantDeclaration_name),
+    );
+    LazyEnumConstantDeclaration.setData(node, data);
+    return node;
+  }
+
+  EnumDeclaration _read_enumDeclaration(LinkedNode data) {
+    var node = astFactory.enumDeclaration(
+      _readNodeLazy(data.annotatedNode_comment),
+      _readNodeListLazy(data.annotatedNode_metadata),
+      _getToken(data.enumDeclaration_enumKeyword),
+      _readNode(data.namedCompilationUnitMember_name),
+      _getToken(data.enumDeclaration_leftBracket),
+      _readNodeListLazy(data.enumDeclaration_constants),
+      _getToken(data.enumDeclaration_rightBracket),
+    );
+    LazyEnumDeclaration.setData(node, data);
+    return node;
+  }
+
+  ExportDirective _read_exportDirective(LinkedNode data) {
+    var node = astFactory.exportDirective(
+      _readNode(data.annotatedNode_comment),
+      _readNodeListLazy(data.annotatedNode_metadata),
+      _getToken(data.directive_keyword),
+      _readNode(data.uriBasedDirective_uri),
+      _readNodeList(data.namespaceDirective_configurations),
+      _readNodeList(data.namespaceDirective_combinators),
+      _getToken(data.directive_semicolon),
+    );
+    LazyDirective.setData(node, data);
+    return node;
+  }
+
+  ExpressionFunctionBody _read_expressionFunctionBody(LinkedNode data) {
+    return astFactory.expressionFunctionBody(
+      _getToken(data.expressionFunctionBody_keyword),
+      _getToken(data.expressionFunctionBody_arrow),
+      _readNode(data.expressionFunctionBody_expression),
+      _getToken(data.expressionFunctionBody_semicolon),
+    );
+  }
+
+  ExpressionStatement _read_expressionStatement(LinkedNode data) {
+    return astFactory.expressionStatement(
+      _readNode(data.expressionStatement_expression),
+      _getToken(data.expressionStatement_semicolon),
+    );
+  }
+
+  ExtendsClause _read_extendsClause(LinkedNode data) {
+    return astFactory.extendsClause(
+      _getToken(data.extendsClause_extendsKeyword),
+      _readNode(data.extendsClause_superclass),
+    );
+  }
+
+  FieldDeclaration _read_fieldDeclaration(LinkedNode data) {
+    var node = astFactory.fieldDeclaration2(
+      comment: _readNodeLazy(data.annotatedNode_comment),
+      covariantKeyword: _getToken(data.fieldDeclaration_covariantKeyword),
+      fieldList: _readNode(data.fieldDeclaration_fields),
+      metadata: _readNodeListLazy(data.annotatedNode_metadata),
+      semicolon: _getToken(data.fieldDeclaration_semicolon),
+      staticKeyword: _getToken(data.fieldDeclaration_staticKeyword),
+    );
+    LazyFieldDeclaration.setData(node, data);
+    return node;
+  }
+
+  FieldFormalParameter _read_fieldFormalParameter(LinkedNode data) {
+    var node = astFactory.fieldFormalParameter2(
+      identifier: _readNode(data.normalFormalParameter_identifier),
+      period: _getToken(data.fieldFormalParameter_period),
+      thisKeyword: _getToken(data.fieldFormalParameter_thisKeyword),
+      covariantKeyword: _getToken(data.normalFormalParameter_covariantKeyword),
+      typeParameters: _readNode(data.fieldFormalParameter_typeParameters),
+      keyword: _getToken(data.fieldFormalParameter_keyword),
+      metadata: _readNodeList(data.normalFormalParameter_metadata),
+      comment: _readNode(data.normalFormalParameter_comment),
+      type: _readNode(data.fieldFormalParameter_type),
+      parameters: _readNode(data.fieldFormalParameter_formalParameters),
+    );
+    LazyFormalParameter.setData(node, data);
+    return node;
+  }
+
+  ForEachPartsWithDeclaration _read_forEachPartsWithDeclaration(
+      LinkedNode data) {
+    return astFactory.forEachPartsWithDeclaration(
+      inKeyword: _getToken(data.forEachParts_inKeyword),
+      iterable: _readNode(data.forEachParts_iterable),
+      loopVariable: _readNode(data.forEachPartsWithDeclaration_loopVariable),
+    );
+  }
+
+  ForEachPartsWithIdentifier _read_forEachPartsWithIdentifier(LinkedNode data) {
+    return astFactory.forEachPartsWithIdentifier(
+      inKeyword: _getToken(data.forEachParts_inKeyword),
+      iterable: _readNode(data.forEachParts_iterable),
+      identifier: _readNode(data.forEachPartsWithIdentifier_identifier),
+    );
+  }
+
+  ForElement _read_forElement(LinkedNode data) {
+    return astFactory.forElement(
+      awaitKeyword: _getToken(data.forMixin_awaitKeyword),
+      body: _readNode(data.forElement_body),
+      forKeyword: _getToken(data.forMixin_forKeyword),
+      forLoopParts: _readNode(data.forMixin_forLoopParts),
+      leftParenthesis: _getToken(data.forMixin_leftParenthesis),
+      rightParenthesis: _getToken(data.forMixin_rightParenthesis),
+    );
+  }
+
+  FormalParameterList _read_formalParameterList(LinkedNode data) {
+    return astFactory.formalParameterList(
+      _getToken(data.formalParameterList_leftParenthesis),
+      _readNodeList(data.formalParameterList_parameters),
+      _getToken(data.formalParameterList_leftDelimiter),
+      _getToken(data.formalParameterList_rightDelimiter),
+      _getToken(data.formalParameterList_rightParenthesis),
+    );
+  }
+
+  ForPartsWithDeclarations _read_forPartsWithDeclarations(LinkedNode data) {
+    return astFactory.forPartsWithDeclarations(
+      condition: _readNode(data.forParts_condition),
+      leftSeparator: _getToken(data.forParts_leftSeparator),
+      rightSeparator: _getToken(data.forParts_rightSeparator),
+      updaters: _readNodeList(data.forParts_updaters),
+      variables: _readNode(data.forPartsWithDeclarations_variables),
+    );
+  }
+
+  ForPartsWithExpression _read_forPartsWithExpression(LinkedNode data) {
+    return astFactory.forPartsWithExpression(
+      condition: _readNode(data.forParts_condition),
+      initialization: _readNode(data.forPartsWithExpression_initialization),
+      leftSeparator: _getToken(data.forParts_leftSeparator),
+      rightSeparator: _getToken(data.forParts_rightSeparator),
+      updaters: _readNodeList(data.forParts_updaters),
+    );
+  }
+
+  ForStatement _read_forStatement(LinkedNode data) {
+    return astFactory.forStatement(
+      awaitKeyword: _getToken(data.forMixin_awaitKeyword),
+      forKeyword: _getToken(data.forMixin_forKeyword),
+      leftParenthesis: _getToken(data.forMixin_leftParenthesis),
+      forLoopParts: _readNode(data.forMixin_forLoopParts),
+      rightParenthesis: _getToken(data.forMixin_rightParenthesis),
+      body: _readNode(data.forStatement_body),
+    );
+  }
+
+  FunctionDeclaration _read_functionDeclaration(LinkedNode data) {
+    var node = astFactory.functionDeclaration(
+      _readNodeLazy(data.annotatedNode_comment),
+      _readNodeListLazy(data.annotatedNode_metadata),
+      _getToken(data.functionDeclaration_externalKeyword),
+      _readNodeLazy(data.functionDeclaration_returnType),
+      _getToken(data.functionDeclaration_propertyKeyword),
+      _readNode(data.namedCompilationUnitMember_name),
+      _readNodeLazy(data.functionDeclaration_functionExpression),
+    );
+    LazyFunctionDeclaration.setData(node, data);
+    return node;
+  }
+
+  FunctionDeclarationStatement _read_functionDeclarationStatement(
+      LinkedNode data) {
+    return astFactory.functionDeclarationStatement(
+      _readNode(data.functionDeclarationStatement_functionDeclaration),
+    );
+  }
+
+  FunctionExpression _read_functionExpression(LinkedNode data) {
+    var node = astFactory.functionExpression(
+      _readNode(data.functionExpression_typeParameters),
+      _readNodeLazy(data.functionExpression_formalParameters),
+      _readNodeLazy(data.functionExpression_body),
+    );
+    LazyFunctionExpression.setData(node, data);
+    return node;
+  }
+
+  FunctionExpressionInvocation _read_functionExpressionInvocation(
+      LinkedNode data) {
+    return astFactory.functionExpressionInvocation(
+      _readNode(data.functionExpressionInvocation_function),
+      _readNode(data.invocationExpression_typeArguments),
+      _readNode(data.invocationExpression_arguments),
+    )..staticInvokeType = _readType(data.invocationExpression_invokeType);
+  }
+
+  FunctionTypeAlias _read_functionTypeAlias(LinkedNode data) {
+    var node = astFactory.functionTypeAlias(
+      _readNodeLazy(data.annotatedNode_comment),
+      _readNodeListLazy(data.annotatedNode_metadata),
+      _getToken(data.typeAlias_typedefKeyword),
+      _readNodeLazy(data.functionTypeAlias_returnType),
+      _readNode(data.namedCompilationUnitMember_name),
+      _readNode(data.functionTypeAlias_typeParameters),
+      _readNodeLazy(data.functionTypeAlias_formalParameters),
+      _getToken(data.typeAlias_semicolon),
+    );
+    LazyFunctionTypeAlias.setData(node, data);
+    return node;
+  }
+
+  FunctionTypedFormalParameter _read_functionTypedFormalParameter(
+      LinkedNode data) {
+    var node = astFactory.functionTypedFormalParameter2(
+      identifier: _readNode(data.normalFormalParameter_identifier),
+      parameters: _readNode(data.functionTypedFormalParameter_formalParameters),
+      returnType: _readNode(data.functionTypedFormalParameter_returnType),
+      covariantKeyword: _getToken(data.normalFormalParameter_covariantKeyword),
+      comment: _readNode(data.normalFormalParameter_comment),
+      metadata: _readNodeList(data.normalFormalParameter_metadata),
+      typeParameters:
+          _readNode(data.functionTypedFormalParameter_typeParameters),
+    );
+    LazyFormalParameter.setData(node, data);
+    return node;
+  }
+
+  GenericFunctionType _read_genericFunctionType(LinkedNode data) {
+    GenericFunctionTypeImpl node = astFactory.genericFunctionType(
+      _readNodeLazy(data.genericFunctionType_returnType),
+      _getToken(data.genericFunctionType_functionKeyword),
+      _readNode(data.genericFunctionType_typeParameters),
+      _readNodeLazy(data.genericFunctionType_formalParameters),
+      question: _getToken(data.genericFunctionType_question),
+    );
+    node.type = _readType(data.genericFunctionType_type);
+    LazyGenericFunctionType.setData(node, data);
+    return node;
+  }
+
+  GenericTypeAlias _read_genericTypeAlias(LinkedNode data) {
+    var node = astFactory.genericTypeAlias(
+      _readNodeLazy(data.annotatedNode_comment),
+      _readNodeList(data.annotatedNode_metadata),
+      _getToken(data.typeAlias_typedefKeyword),
+      _readNode(data.namedCompilationUnitMember_name),
+      _readNode(data.genericTypeAlias_typeParameters),
+      _getToken(data.genericTypeAlias_equals),
+      _readNodeLazy(data.genericTypeAlias_functionType),
+      _getToken(data.typeAlias_semicolon),
+    );
+    LazyGenericTypeAlias.setData(node, data);
+    return node;
+  }
+
+  HideCombinator _read_hideCombinator(LinkedNode data) {
+    return astFactory.hideCombinator(
+      _getToken(data.combinator_keyword),
+      _readNodeList(data.hideCombinator_hiddenNames),
+    );
+  }
+
+  IfElement _read_ifElement(LinkedNode data) {
+    return astFactory.ifElement(
+      condition: _readNode(data.ifMixin_condition),
+      elseElement: _readNode(data.ifElement_elseElement),
+      elseKeyword: _getToken(data.ifMixin_elseKeyword),
+      ifKeyword: _getToken(data.ifMixin_ifKeyword),
+      leftParenthesis: _getToken(data.ifMixin_leftParenthesis),
+      rightParenthesis: _getToken(data.ifMixin_rightParenthesis),
+      thenElement: _readNode(data.ifElement_thenElement),
+    );
+  }
+
+  IfStatement _read_ifStatement(LinkedNode data) {
+    return astFactory.ifStatement(
+      _getToken(data.ifMixin_ifKeyword),
+      _getToken(data.ifMixin_leftParenthesis),
+      _readNode(data.ifMixin_condition),
+      _getToken(data.ifMixin_rightParenthesis),
+      _readNode(data.ifStatement_thenStatement),
+      _getToken(data.ifMixin_elseKeyword),
+      _readNode(data.ifStatement_elseStatement),
+    );
+  }
+
+  ImplementsClause _read_implementsClause(LinkedNode data) {
+    return astFactory.implementsClause(
+      _getToken(data.implementsClause_implementsKeyword),
+      _readNodeList(data.implementsClause_interfaces),
+    );
+  }
+
+  ImportDirective _read_importDirective(LinkedNode data) {
+    var node = astFactory.importDirective(
+      _readNode(data.annotatedNode_comment),
+      _readNodeListLazy(data.annotatedNode_metadata),
+      _getToken(data.directive_keyword),
+      _readNode(data.uriBasedDirective_uri),
+      _readNodeList(data.namespaceDirective_configurations),
+      _getToken(data.importDirective_deferredKeyword),
+      _getToken(data.importDirective_asKeyword),
+      _readNode(data.importDirective_prefix),
+      _readNodeList(data.namespaceDirective_combinators),
+      _getToken(data.directive_semicolon),
+    );
+    LazyDirective.setData(node, data);
+    return node;
+  }
+
+  IndexExpression _read_indexExpression(LinkedNode data) {
+    return astFactory.indexExpressionForTarget(
+      _readNode(data.indexExpression_target),
+      _getToken(data.indexExpression_leftBracket),
+      _readNode(data.indexExpression_index),
+      _getToken(data.indexExpression_rightBracket),
+    )
+      ..period = _getToken(data.indexExpression_period)
+      ..staticElement = _elementOfComponents(
+        data.indexExpression_element,
+        data.indexExpression_elementType,
+      )
+      ..staticType = _readType(data.expression_type);
+  }
+
+  InstanceCreationExpression _read_instanceCreationExpression(LinkedNode data) {
+    return astFactory.instanceCreationExpression(
+      _getToken(data.instanceCreationExpression_keyword),
+      _readNode(data.instanceCreationExpression_constructorName),
+      _readNode(data.instanceCreationExpression_arguments),
+      typeArguments: _readNode(data.instanceCreationExpression_typeArguments),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  IntegerLiteral _read_integerLiteral(LinkedNode data) {
+    return astFactory.integerLiteral(
+      _getToken(data.integerLiteral_literal),
+      data.integerLiteral_value,
+    )..staticType = _readType(data.expression_type);
+  }
+
+  InterpolationExpression _read_interpolationExpression(LinkedNode data) {
+    return astFactory.interpolationExpression(
+      _getToken(data.interpolationExpression_leftBracket),
+      _readNode(data.interpolationExpression_expression),
+      _getToken(data.interpolationExpression_rightBracket),
+    );
+  }
+
+  InterpolationString _read_interpolationString(LinkedNode data) {
+    return astFactory.interpolationString(
+      _getToken(data.interpolationString_token),
+      data.interpolationString_value,
+    );
+  }
+
+  IsExpression _read_isExpression(LinkedNode data) {
+    return astFactory.isExpression(
+      _readNode(data.isExpression_expression),
+      _getToken(data.isExpression_isOperator),
+      _getToken(data.isExpression_notOperator),
+      _readNode(data.isExpression_type),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  Label _read_label(LinkedNode data) {
+    return astFactory.label(
+      _readNode(data.label_label),
+      _getToken(data.label_colon),
+    );
+  }
+
+  LabeledStatement _read_labeledStatement(LinkedNode data) {
+    return astFactory.labeledStatement(
+      _readNodeList(data.labeledStatement_labels),
+      _readNode(data.labeledStatement_statement),
+    );
+  }
+
+  LibraryDirective _read_libraryDirective(LinkedNode data) {
+    var node = astFactory.libraryDirective(
+      _readNode(data.annotatedNode_comment),
+      _readNodeListLazy(data.annotatedNode_metadata),
+      _getToken(data.directive_keyword),
+      _readNode(data.libraryDirective_name),
+      _getToken(data.directive_semicolon),
+    );
+    LazyDirective.setData(node, data);
+    return node;
+  }
+
+  LibraryIdentifier _read_libraryIdentifier(LinkedNode data) {
+    return astFactory.libraryIdentifier(
+      _readNodeList(data.libraryIdentifier_components),
+    );
+  }
+
+  ListLiteral _read_listLiteral(LinkedNode data) {
+    return astFactory.listLiteral(
+      _getToken(data.typedLiteral_constKeyword),
+      _readNode(data.typedLiteral_typeArguments),
+      _getToken(data.listLiteral_leftBracket),
+      _readNodeList(data.listLiteral_elements),
+      _getToken(data.listLiteral_rightBracket),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  MapLiteralEntry _read_mapLiteralEntry(LinkedNode data) {
+    return astFactory.mapLiteralEntry(
+      _readNode(data.mapLiteralEntry_key),
+      _getToken(data.mapLiteralEntry_separator),
+      _readNode(data.mapLiteralEntry_value),
+    );
+  }
+
+  MethodDeclaration _read_methodDeclaration(LinkedNode data) {
+    var node = astFactory.methodDeclaration(
+      _readNodeLazy(data.annotatedNode_comment),
+      _readNodeListLazy(data.annotatedNode_metadata),
+      _getToken(data.methodDeclaration_externalKeyword),
+      _getToken(data.methodDeclaration_modifierKeyword),
+      _readNodeLazy(data.methodDeclaration_returnType),
+      _getToken(data.methodDeclaration_propertyKeyword),
+      _getToken(data.methodDeclaration_operatorKeyword),
+      _readNode(data.methodDeclaration_name),
+      _readNode(data.methodDeclaration_typeParameters),
+      _readNodeLazy(data.methodDeclaration_formalParameters),
+      _readNodeLazy(data.methodDeclaration_body),
+    );
+    LazyMethodDeclaration.setData(node, data);
+    return node;
+  }
+
+  MethodInvocation _read_methodInvocation(LinkedNode data) {
+    return astFactory.methodInvocation(
+      _readNode(data.methodInvocation_target),
+      _getToken(data.methodInvocation_operator),
+      _readNode(data.methodInvocation_methodName),
+      _readNode(data.invocationExpression_typeArguments),
+      _readNode(data.invocationExpression_arguments),
+    )..staticInvokeType = _readType(data.invocationExpression_invokeType);
+  }
+
+  MixinDeclaration _read_mixinDeclaration(LinkedNode data) {
+    var node = astFactory.mixinDeclaration(
+      _readNodeLazy(data.annotatedNode_comment),
+      _readNodeList(data.annotatedNode_metadata),
+      _getToken(data.mixinDeclaration_mixinKeyword),
+      _readNode(data.namedCompilationUnitMember_name),
+      _readNode(data.classOrMixinDeclaration_typeParameters),
+      _readNodeLazy(data.mixinDeclaration_onClause),
+      _readNodeLazy(data.classOrMixinDeclaration_implementsClause),
+      _getToken(data.classOrMixinDeclaration_leftBracket),
+      _readNodeListLazy(data.classOrMixinDeclaration_members),
+      _getToken(data.classOrMixinDeclaration_rightBracket),
+    );
+    LazyMixinDeclaration.setData(node, data);
+    return node;
+  }
+
+  NamedExpression _read_namedExpression(LinkedNode data) {
+    return astFactory.namedExpression(
+      _readNode(data.namedExpression_name),
+      _readNode(data.namedExpression_expression),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  NativeClause _read_nativeClause(LinkedNode data) {
+    return astFactory.nativeClause(
+      _getToken(data.nativeClause_nativeKeyword),
+      _readNode(data.nativeClause_name),
+    );
+  }
+
+  NativeFunctionBody _read_nativeFunctionBody(LinkedNode data) {
+    return astFactory.nativeFunctionBody(
+      _getToken(data.nativeFunctionBody_nativeKeyword),
+      _readNode(data.nativeFunctionBody_stringLiteral),
+      _getToken(data.nativeFunctionBody_semicolon),
+    );
+  }
+
+  NullLiteral _read_nullLiteral(LinkedNode data) {
+    return astFactory.nullLiteral(
+      _getToken(data.nullLiteral_literal),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  OnClause _read_onClause(LinkedNode data) {
+    return astFactory.onClause(
+      _getToken(data.onClause_onKeyword),
+      _readNodeList(data.onClause_superclassConstraints),
+    );
+  }
+
+  ParenthesizedExpression _read_parenthesizedExpression(LinkedNode data) {
+    return astFactory.parenthesizedExpression(
+      _getToken(data.parenthesizedExpression_leftParenthesis),
+      _readNode(data.parenthesizedExpression_expression),
+      _getToken(data.parenthesizedExpression_rightParenthesis),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  PartDirective _read_partDirective(LinkedNode data) {
+    var node = astFactory.partDirective(
+      _readNode(data.annotatedNode_comment),
+      _readNodeListLazy(data.annotatedNode_metadata),
+      _getToken(data.directive_keyword),
+      _readNode(data.uriBasedDirective_uri),
+      _getToken(data.directive_semicolon),
+    );
+    LazyDirective.setData(node, data);
+    return node;
+  }
+
+  PartOfDirective _read_partOfDirective(LinkedNode data) {
+    var node = astFactory.partOfDirective(
+      _readNode(data.annotatedNode_comment),
+      _readNodeList(data.annotatedNode_metadata),
+      _getToken(data.directive_keyword),
+      _getToken(data.partOfDirective_ofKeyword),
+      _readNode(data.partOfDirective_uri),
+      _readNode(data.partOfDirective_libraryName),
+      _getToken(data.directive_semicolon),
+    );
+    LazyDirective.setData(node, data);
+    return node;
+  }
+
+  PostfixExpression _read_postfixExpression(LinkedNode data) {
+    return astFactory.postfixExpression(
+      _readNode(data.postfixExpression_operand),
+      _getToken(data.postfixExpression_operator),
+    )
+      ..staticElement = _elementOfComponents(
+        data.postfixExpression_element,
+        data.postfixExpression_elementType,
+      )
+      ..staticType = _readType(data.expression_type);
+  }
+
+  PrefixedIdentifier _read_prefixedIdentifier(LinkedNode data) {
+    return astFactory.prefixedIdentifier(
+      _readNode(data.prefixedIdentifier_prefix),
+      _getToken(data.prefixedIdentifier_period),
+      _readNode(data.prefixedIdentifier_identifier),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  PrefixExpression _read_prefixExpression(LinkedNode data) {
+    return astFactory.prefixExpression(
+      _getToken(data.prefixExpression_operator),
+      _readNode(data.prefixExpression_operand),
+    )
+      ..staticElement = _elementOfComponents(
+        data.prefixExpression_element,
+        data.prefixExpression_elementType,
+      )
+      ..staticType = _readType(data.expression_type);
+  }
+
+  PropertyAccess _read_propertyAccess(LinkedNode data) {
+    return astFactory.propertyAccess(
+      _readNode(data.propertyAccess_target),
+      _getToken(data.propertyAccess_operator),
+      _readNode(data.propertyAccess_propertyName),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  RedirectingConstructorInvocation _read_redirectingConstructorInvocation(
+      LinkedNode data) {
+    return astFactory.redirectingConstructorInvocation(
+      _getToken(data.redirectingConstructorInvocation_thisKeyword),
+      _getToken(data.redirectingConstructorInvocation_period),
+      _readNode(data.redirectingConstructorInvocation_constructorName),
+      _readNode(data.redirectingConstructorInvocation_arguments),
+    )..staticElement = _elementOfComponents(
+        data.redirectingConstructorInvocation_element,
+        data.redirectingConstructorInvocation_elementType,
+      );
+  }
+
+  RethrowExpression _read_rethrowExpression(LinkedNode data) {
+    return astFactory.rethrowExpression(
+      _getToken(data.rethrowExpression_rethrowKeyword),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  ReturnStatement _read_returnStatement(LinkedNode data) {
+    return astFactory.returnStatement(
+      _getToken(data.returnStatement_returnKeyword),
+      _readNode(data.returnStatement_expression),
+      _getToken(data.returnStatement_semicolon),
+    );
+  }
+
+  ScriptTag _read_scriptTag(LinkedNode data) {
+    return astFactory.scriptTag(
+      _getToken(data.scriptTag_scriptTag),
+    );
+  }
+
+  SetOrMapLiteral _read_setOrMapLiteral(LinkedNode data) {
+    SetOrMapLiteralImpl node = astFactory.setOrMapLiteral(
+      constKeyword: _getToken(data.typedLiteral_constKeyword),
+      elements: _readNodeList(data.setOrMapLiteral_elements),
+      leftBracket: _getToken(data.setOrMapLiteral_leftBracket),
+      typeArguments: _readNode(data.typedLiteral_typeArguments),
+      rightBracket: _getToken(data.setOrMapLiteral_rightBracket),
+    )..staticType = _readType(data.expression_type);
+    if (data.setOrMapLiteral_isMap) {
+      node.becomeMap();
+    } else if (data.setOrMapLiteral_isSet) {
+      node.becomeSet();
+    }
+    return node;
+  }
+
+  ShowCombinator _read_showCombinator(LinkedNode data) {
+    return astFactory.showCombinator(
+      _getToken(data.combinator_keyword),
+      _readNodeList(data.showCombinator_shownNames),
+    );
+  }
+
+  SimpleFormalParameter _read_simpleFormalParameter(LinkedNode data) {
+    SimpleFormalParameterImpl node = astFactory.simpleFormalParameter2(
+      identifier: _readNode(data.normalFormalParameter_identifier),
+      type: _readNode(data.simpleFormalParameter_type),
+      covariantKeyword: _getToken(data.normalFormalParameter_covariantKeyword),
+      comment: _readNode(data.normalFormalParameter_comment),
+      metadata: _readNodeList(data.normalFormalParameter_metadata),
+      keyword: _getToken(data.simpleFormalParameter_keyword),
+    );
+    LazyFormalParameter.setData(node, data);
+    return node;
+  }
+
+  SimpleIdentifier _read_simpleIdentifier(LinkedNode data) {
+    return astFactory.simpleIdentifier(
+      _getToken(data.simpleIdentifier_token),
+    )
+      ..staticElement = _elementOfComponents(
+        data.simpleIdentifier_element,
+        data.simpleIdentifier_elementType,
+      )
+      ..staticType = _readType(data.expression_type);
+  }
+
+  SimpleStringLiteral _read_simpleStringLiteral(LinkedNode data) {
+    return astFactory.simpleStringLiteral(
+      _getToken(data.simpleStringLiteral_token),
+      data.simpleStringLiteral_value,
+    )..staticType = _readType(data.expression_type);
+  }
+
+  SpreadElement _read_spreadElement(LinkedNode data) {
+    return astFactory.spreadElement(
+      spreadOperator: _getToken(data.spreadElement_spreadOperator),
+      expression: _readNode(data.spreadElement_expression),
+    );
+  }
+
+  StringInterpolation _read_stringInterpolation(LinkedNode data) {
+    return astFactory.stringInterpolation(
+      _readNodeList(data.stringInterpolation_elements),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  SuperConstructorInvocation _read_superConstructorInvocation(LinkedNode data) {
+    return astFactory.superConstructorInvocation(
+      _getToken(data.superConstructorInvocation_superKeyword),
+      _getToken(data.superConstructorInvocation_period),
+      _readNode(data.superConstructorInvocation_constructorName),
+      _readNode(data.superConstructorInvocation_arguments),
+    )..staticElement = _elementOfComponents(
+        data.superConstructorInvocation_element,
+        data.superConstructorInvocation_elementType,
+      );
+  }
+
+  SuperExpression _read_superExpression(LinkedNode data) {
+    return astFactory.superExpression(
+      _getToken(data.superExpression_superKeyword),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  SwitchCase _read_switchCase(LinkedNode data) {
+    return astFactory.switchCase(
+      _readNodeList(data.switchMember_labels),
+      _getToken(data.switchMember_keyword),
+      _readNode(data.switchCase_expression),
+      _getToken(data.switchMember_colon),
+      _readNodeList(data.switchMember_statements),
+    );
+  }
+
+  SwitchDefault _read_switchDefault(LinkedNode data) {
+    return astFactory.switchDefault(
+      _readNodeList(data.switchMember_labels),
+      _getToken(data.switchMember_keyword),
+      _getToken(data.switchMember_colon),
+      _readNodeList(data.switchMember_statements),
+    );
+  }
+
+  SwitchStatement _read_switchStatement(LinkedNode data) {
+    return astFactory.switchStatement(
+      _getToken(data.switchStatement_switchKeyword),
+      _getToken(data.switchStatement_leftParenthesis),
+      _readNode(data.switchStatement_expression),
+      _getToken(data.switchStatement_rightParenthesis),
+      _getToken(data.switchStatement_leftBracket),
+      _readNodeList(data.switchStatement_members),
+      _getToken(data.switchStatement_rightBracket),
+    );
+  }
+
+  SymbolLiteral _read_symbolLiteral(LinkedNode data) {
+    return astFactory.symbolLiteral(
+      _getToken(data.symbolLiteral_poundSign),
+      _getTokens(data.symbolLiteral_components),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  ThisExpression _read_thisExpression(LinkedNode data) {
+    return astFactory.thisExpression(
+      _getToken(data.thisExpression_thisKeyword),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  ThrowExpression _read_throwExpression(LinkedNode data) {
+    return astFactory.throwExpression(
+      _getToken(data.throwExpression_throwKeyword),
+      _readNode(data.throwExpression_expression),
+    )..staticType = _readType(data.expression_type);
+  }
+
+  TopLevelVariableDeclaration _read_topLevelVariableDeclaration(
+      LinkedNode data) {
+    var node = astFactory.topLevelVariableDeclaration(
+      _readNodeLazy(data.annotatedNode_comment),
+      _readNodeListLazy(data.annotatedNode_metadata),
+      _readNode(data.topLevelVariableDeclaration_variableList),
+      _getToken(data.topLevelVariableDeclaration_semicolon),
+    );
+    LazyTopLevelVariableDeclaration.setData(node, data);
+    return node;
+  }
+
+  TryStatement _read_tryStatement(LinkedNode data) {
+    return astFactory.tryStatement(
+      _getToken(data.tryStatement_tryKeyword),
+      _readNode(data.tryStatement_body),
+      _readNodeList(data.tryStatement_catchClauses),
+      _getToken(data.tryStatement_finallyKeyword),
+      _readNode(data.tryStatement_finallyBlock),
+    );
+  }
+
+  TypeArgumentList _read_typeArgumentList(LinkedNode data) {
+    return astFactory.typeArgumentList(
+      _getToken(data.typeArgumentList_leftBracket),
+      _readNodeList(data.typeArgumentList_arguments),
+      _getToken(data.typeArgumentList_rightBracket),
+    );
+  }
+
+  TypeName _read_typeName(LinkedNode data) {
+    return astFactory.typeName(
+      _readNode(data.typeName_name),
+      _readNode(data.typeName_typeArguments),
+      question: _getToken(data.typeName_question),
+    )..type = _readType(data.typeName_type);
+  }
+
+  TypeParameter _read_typeParameter(LinkedNode data) {
+    var node = astFactory.typeParameter(
+      _readNodeLazy(data.annotatedNode_comment),
+      _readNodeListLazy(data.annotatedNode_metadata),
+      _readNode(data.typeParameter_name),
+      _getToken(data.typeParameter_extendsKeyword),
+      _readNodeLazy(data.typeParameter_bound),
+    );
+    LazyTypeParameter.setData(node, data);
+    _unitContext.addTypeParameter(data.typeParameter_id, node);
+    return node;
+  }
+
+  TypeParameterList _read_typeParameterList(LinkedNode data) {
+    return astFactory.typeParameterList(
+      _getToken(data.typeParameterList_leftBracket),
+      _readNodeList(data.typeParameterList_typeParameters),
+      _getToken(data.typeParameterList_rightBracket),
+    );
+  }
+
+  VariableDeclaration _read_variableDeclaration(LinkedNode data) {
+    var node = astFactory.variableDeclaration(
+      _readNode(data.variableDeclaration_name),
+      _getToken(data.variableDeclaration_equals),
+      _readNodeLazy(data.variableDeclaration_initializer),
+    );
+    LazyVariableDeclaration.setData(node, data);
+    return node;
+  }
+
+  VariableDeclarationList _read_variableDeclarationList(LinkedNode data) {
+    return astFactory.variableDeclarationList(
+      _readNodeLazy(data.annotatedNode_comment),
+      _readNodeListLazy(data.annotatedNode_metadata),
+      _getToken(data.variableDeclarationList_keyword),
+      _readNodeLazy(data.variableDeclarationList_type),
+      _readNodeList(data.variableDeclarationList_variables),
+    );
+  }
+
+  VariableDeclarationStatement _read_variableDeclarationStatement(
+      LinkedNode data) {
+    return astFactory.variableDeclarationStatement(
+      _readNode(data.variableDeclarationStatement_variables),
+      _getToken(data.variableDeclarationStatement_semicolon),
+    );
+  }
+
+  WhileStatement _read_whileStatement(LinkedNode data) {
+    return astFactory.whileStatement(
+      _getToken(data.whileStatement_whileKeyword),
+      _getToken(data.whileStatement_leftParenthesis),
+      _readNode(data.whileStatement_condition),
+      _getToken(data.whileStatement_rightParenthesis),
+      _readNode(data.whileStatement_body),
+    );
+  }
+
+  WithClause _read_withClause(LinkedNode data) {
+    return astFactory.withClause(
+      _getToken(data.withClause_withKeyword),
+      _readNodeList(data.withClause_mixinTypes),
+    );
+  }
+
+  YieldStatement _read_yieldStatement(LinkedNode data) {
+    return astFactory.yieldStatement(
+      _getToken(data.yieldStatement_yieldKeyword),
+      _getToken(data.yieldStatement_star),
+      _readNode(data.yieldStatement_expression),
+      _getToken(data.yieldStatement_semicolon),
+    );
+  }
+
+  AstNode _readNode(LinkedNode data) {
+    if (data == null) return null;
+
+    switch (data.kind) {
+      case LinkedNodeKind.adjacentStrings:
+        return _read_adjacentStrings(data);
+      case LinkedNodeKind.annotation:
+        return _read_annotation(data);
+      case LinkedNodeKind.argumentList:
+        return _read_argumentList(data);
+      case LinkedNodeKind.asExpression:
+        return _read_asExpression(data);
+      case LinkedNodeKind.assertInitializer:
+        return _read_assertInitializer(data);
+      case LinkedNodeKind.assertStatement:
+        return _read_assertStatement(data);
+      case LinkedNodeKind.assignmentExpression:
+        return _read_assignmentExpression(data);
+      case LinkedNodeKind.awaitExpression:
+        return _read_awaitExpression(data);
+      case LinkedNodeKind.binaryExpression:
+        return _read_binaryExpression(data);
+      case LinkedNodeKind.block:
+        return _read_block(data);
+      case LinkedNodeKind.blockFunctionBody:
+        return _read_blockFunctionBody(data);
+      case LinkedNodeKind.booleanLiteral:
+        return _read_booleanLiteral(data);
+      case LinkedNodeKind.breakStatement:
+        return _read_breakStatement(data);
+      case LinkedNodeKind.cascadeExpression:
+        return _read_cascadeExpression(data);
+      case LinkedNodeKind.catchClause:
+        return _read_catchClause(data);
+      case LinkedNodeKind.classDeclaration:
+        return _read_classDeclaration(data);
+      case LinkedNodeKind.classTypeAlias:
+        return _read_classTypeAlias(data);
+      case LinkedNodeKind.comment:
+        return _read_comment(data);
+      case LinkedNodeKind.compilationUnit:
+        return _read_compilationUnit(data);
+      case LinkedNodeKind.conditionalExpression:
+        return _read_conditionalExpression(data);
+      case LinkedNodeKind.configuration:
+        return _read_configuration(data);
+      case LinkedNodeKind.constructorDeclaration:
+        return _read_constructorDeclaration(data);
+      case LinkedNodeKind.constructorFieldInitializer:
+        return _read_constructorFieldInitializer(data);
+      case LinkedNodeKind.constructorName:
+        return _read_constructorName(data);
+      case LinkedNodeKind.continueStatement:
+        return _read_continueStatement(data);
+      case LinkedNodeKind.declaredIdentifier:
+        return _read_declaredIdentifier(data);
+      case LinkedNodeKind.defaultFormalParameter:
+        return _read_defaultFormalParameter(data);
+      case LinkedNodeKind.doStatement:
+        return _read_doStatement(data);
+      case LinkedNodeKind.dottedName:
+        return _read_dottedName(data);
+      case LinkedNodeKind.doubleLiteral:
+        return _read_doubleLiteral(data);
+      case LinkedNodeKind.emptyFunctionBody:
+        return _read_emptyFunctionBody(data);
+      case LinkedNodeKind.emptyStatement:
+        return _read_emptyStatement(data);
+      case LinkedNodeKind.enumConstantDeclaration:
+        return _read_enumConstantDeclaration(data);
+      case LinkedNodeKind.enumDeclaration:
+        return _read_enumDeclaration(data);
+      case LinkedNodeKind.exportDirective:
+        return _read_exportDirective(data);
+      case LinkedNodeKind.expressionFunctionBody:
+        return _read_expressionFunctionBody(data);
+      case LinkedNodeKind.expressionStatement:
+        return _read_expressionStatement(data);
+      case LinkedNodeKind.extendsClause:
+        return _read_extendsClause(data);
+      case LinkedNodeKind.fieldDeclaration:
+        return _read_fieldDeclaration(data);
+      case LinkedNodeKind.fieldFormalParameter:
+        return _read_fieldFormalParameter(data);
+      case LinkedNodeKind.forEachPartsWithDeclaration:
+        return _read_forEachPartsWithDeclaration(data);
+      case LinkedNodeKind.forEachPartsWithIdentifier:
+        return _read_forEachPartsWithIdentifier(data);
+      case LinkedNodeKind.forElement:
+        return _read_forElement(data);
+      case LinkedNodeKind.forPartsWithExpression:
+        return _read_forPartsWithExpression(data);
+      case LinkedNodeKind.forPartsWithDeclarations:
+        return _read_forPartsWithDeclarations(data);
+      case LinkedNodeKind.forStatement:
+        return _read_forStatement(data);
+      case LinkedNodeKind.formalParameterList:
+        return _read_formalParameterList(data);
+      case LinkedNodeKind.functionDeclaration:
+        return _read_functionDeclaration(data);
+      case LinkedNodeKind.functionDeclarationStatement:
+        return _read_functionDeclarationStatement(data);
+      case LinkedNodeKind.functionExpression:
+        return _read_functionExpression(data);
+      case LinkedNodeKind.functionExpressionInvocation:
+        return _read_functionExpressionInvocation(data);
+      case LinkedNodeKind.functionTypeAlias:
+        return _read_functionTypeAlias(data);
+      case LinkedNodeKind.functionTypedFormalParameter:
+        return _read_functionTypedFormalParameter(data);
+      case LinkedNodeKind.genericFunctionType:
+        return _read_genericFunctionType(data);
+      case LinkedNodeKind.genericTypeAlias:
+        return _read_genericTypeAlias(data);
+      case LinkedNodeKind.hideCombinator:
+        return _read_hideCombinator(data);
+      case LinkedNodeKind.ifElement:
+        return _read_ifElement(data);
+      case LinkedNodeKind.ifStatement:
+        return _read_ifStatement(data);
+      case LinkedNodeKind.implementsClause:
+        return _read_implementsClause(data);
+      case LinkedNodeKind.importDirective:
+        return _read_importDirective(data);
+      case LinkedNodeKind.indexExpression:
+        return _read_indexExpression(data);
+      case LinkedNodeKind.instanceCreationExpression:
+        return _read_instanceCreationExpression(data);
+      case LinkedNodeKind.integerLiteral:
+        return _read_integerLiteral(data);
+      case LinkedNodeKind.interpolationString:
+        return _read_interpolationString(data);
+      case LinkedNodeKind.interpolationExpression:
+        return _read_interpolationExpression(data);
+      case LinkedNodeKind.isExpression:
+        return _read_isExpression(data);
+      case LinkedNodeKind.label:
+        return _read_label(data);
+      case LinkedNodeKind.labeledStatement:
+        return _read_labeledStatement(data);
+      case LinkedNodeKind.libraryDirective:
+        return _read_libraryDirective(data);
+      case LinkedNodeKind.libraryIdentifier:
+        return _read_libraryIdentifier(data);
+      case LinkedNodeKind.listLiteral:
+        return _read_listLiteral(data);
+      case LinkedNodeKind.mapLiteralEntry:
+        return _read_mapLiteralEntry(data);
+      case LinkedNodeKind.methodDeclaration:
+        return _read_methodDeclaration(data);
+      case LinkedNodeKind.methodInvocation:
+        return _read_methodInvocation(data);
+      case LinkedNodeKind.mixinDeclaration:
+        return _read_mixinDeclaration(data);
+      case LinkedNodeKind.namedExpression:
+        return _read_namedExpression(data);
+      case LinkedNodeKind.nativeClause:
+        return _read_nativeClause(data);
+      case LinkedNodeKind.nativeFunctionBody:
+        return _read_nativeFunctionBody(data);
+      case LinkedNodeKind.nullLiteral:
+        return _read_nullLiteral(data);
+      case LinkedNodeKind.onClause:
+        return _read_onClause(data);
+      case LinkedNodeKind.parenthesizedExpression:
+        return _read_parenthesizedExpression(data);
+      case LinkedNodeKind.partDirective:
+        return _read_partDirective(data);
+      case LinkedNodeKind.partOfDirective:
+        return _read_partOfDirective(data);
+      case LinkedNodeKind.postfixExpression:
+        return _read_postfixExpression(data);
+      case LinkedNodeKind.prefixExpression:
+        return _read_prefixExpression(data);
+      case LinkedNodeKind.propertyAccess:
+        return _read_propertyAccess(data);
+      case LinkedNodeKind.prefixedIdentifier:
+        return _read_prefixedIdentifier(data);
+      case LinkedNodeKind.redirectingConstructorInvocation:
+        return _read_redirectingConstructorInvocation(data);
+      case LinkedNodeKind.rethrowExpression:
+        return _read_rethrowExpression(data);
+      case LinkedNodeKind.returnStatement:
+        return _read_returnStatement(data);
+      case LinkedNodeKind.scriptTag:
+        return _read_scriptTag(data);
+      case LinkedNodeKind.setOrMapLiteral:
+        return _read_setOrMapLiteral(data);
+      case LinkedNodeKind.showCombinator:
+        return _read_showCombinator(data);
+      case LinkedNodeKind.simpleFormalParameter:
+        return _read_simpleFormalParameter(data);
+      case LinkedNodeKind.simpleIdentifier:
+        return _read_simpleIdentifier(data);
+      case LinkedNodeKind.simpleStringLiteral:
+        return _read_simpleStringLiteral(data);
+      case LinkedNodeKind.spreadElement:
+        return _read_spreadElement(data);
+      case LinkedNodeKind.stringInterpolation:
+        return _read_stringInterpolation(data);
+      case LinkedNodeKind.superConstructorInvocation:
+        return _read_superConstructorInvocation(data);
+      case LinkedNodeKind.superExpression:
+        return _read_superExpression(data);
+      case LinkedNodeKind.switchCase:
+        return _read_switchCase(data);
+      case LinkedNodeKind.switchDefault:
+        return _read_switchDefault(data);
+      case LinkedNodeKind.switchStatement:
+        return _read_switchStatement(data);
+      case LinkedNodeKind.symbolLiteral:
+        return _read_symbolLiteral(data);
+      case LinkedNodeKind.thisExpression:
+        return _read_thisExpression(data);
+      case LinkedNodeKind.throwExpression:
+        return _read_throwExpression(data);
+      case LinkedNodeKind.topLevelVariableDeclaration:
+        return _read_topLevelVariableDeclaration(data);
+      case LinkedNodeKind.tryStatement:
+        return _read_tryStatement(data);
+      case LinkedNodeKind.typeArgumentList:
+        return _read_typeArgumentList(data);
+      case LinkedNodeKind.typeName:
+        return _read_typeName(data);
+      case LinkedNodeKind.typeParameter:
+        return _read_typeParameter(data);
+      case LinkedNodeKind.typeParameterList:
+        return _read_typeParameterList(data);
+      case LinkedNodeKind.variableDeclaration:
+        return _read_variableDeclaration(data);
+      case LinkedNodeKind.variableDeclarationList:
+        return _read_variableDeclarationList(data);
+      case LinkedNodeKind.variableDeclarationStatement:
+        return _read_variableDeclarationStatement(data);
+      case LinkedNodeKind.whileStatement:
+        return _read_whileStatement(data);
+      case LinkedNodeKind.withClause:
+        return _read_withClause(data);
+      case LinkedNodeKind.yieldStatement:
+        return _read_yieldStatement(data);
+      default:
+        throw UnimplementedError('Expression kind: ${data.kind}');
+    }
+  }
+
+  AstNode _readNodeLazy(LinkedNode data) {
+    if (isLazy) return null;
+    return _readNode(data);
+  }
+
+  List<T> _readNodeList<T>(List<LinkedNode> nodeList) {
+    var result = List<T>.filled(nodeList.length, null);
+    for (var i = 0; i < nodeList.length; ++i) {
+      var linkedNode = nodeList[i];
+      result[i] = _readNode(linkedNode) as T;
+    }
+    return result;
+  }
+
+  List<T> _readNodeListLazy<T>(List<LinkedNode> nodeList) {
+    if (isLazy) {
+      return List<T>.filled(nodeList.length, null);
+    }
+    return _readNodeList(nodeList);
+  }
+
+  DartType _readType(LinkedNodeType data) {
+    return _unitContext.readType(data);
+  }
+}
diff --git a/pkg/analyzer/lib/src/summary2/ast_binary_writer.dart b/pkg/analyzer/lib/src/summary2/ast_binary_writer.dart
new file mode 100644
index 0000000..76a97c7
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary2/ast_binary_writer.dart
@@ -0,0 +1,1587 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer/dart/ast/visitor.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/src/dart/ast/ast.dart';
+import 'package:analyzer/src/dart/element/member.dart';
+import 'package:analyzer/src/summary/format.dart';
+import 'package:analyzer/src/summary/idl.dart';
+import 'package:analyzer/src/summary2/lazy_ast.dart';
+import 'package:analyzer/src/summary2/linking_bundle_context.dart';
+import 'package:analyzer/src/summary2/tokens_context.dart';
+
+/// Serializer of fully resolved ASTs into flat buffers.
+class AstBinaryWriter extends ThrowingAstVisitor<LinkedNodeBuilder> {
+  final LinkingBundleContext _linkingContext;
+  final TokensContext _tokensContext;
+
+  /// This field is set temporary while visiting [FieldDeclaration] or
+  /// [TopLevelVariableDeclaration] to store data shared among all variables
+  /// in these declarations.
+  LinkedNodeVariablesDeclarationBuilder _variablesDeclaration;
+
+  AstBinaryWriter(this._linkingContext, this._tokensContext);
+
+  @override
+  LinkedNodeBuilder visitAdjacentStrings(AdjacentStrings node) {
+    return LinkedNodeBuilder.adjacentStrings(
+      adjacentStrings_strings: _writeNodeList(node.strings),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitAnnotation(Annotation node) {
+    return LinkedNodeBuilder.annotation(
+      annotation_arguments: node.arguments?.accept(this),
+      annotation_atSign: _getToken(node.atSign),
+      annotation_constructorName: node.constructorName?.accept(this),
+      annotation_name: node.name?.accept(this),
+      annotation_period: _getToken(node.period),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitArgumentList(ArgumentList node) {
+    return LinkedNodeBuilder.argumentList(
+      argumentList_arguments: _writeNodeList(node.arguments),
+      argumentList_leftParenthesis: _getToken(node.leftParenthesis),
+      argumentList_rightParenthesis: _getToken(node.rightParenthesis),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitAsExpression(AsExpression node) {
+    return LinkedNodeBuilder.asExpression(
+      asExpression_asOperator: _getToken(node.asOperator),
+      asExpression_expression: node.expression.accept(this),
+      asExpression_type: node.type.accept(this),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitAssertInitializer(AssertInitializer node) {
+    return LinkedNodeBuilder.assertInitializer(
+      assertInitializer_assertKeyword: _getToken(node.assertKeyword),
+      assertInitializer_comma: _getToken(node.comma),
+      assertInitializer_condition: node.condition.accept(this),
+      assertInitializer_leftParenthesis: _getToken(node.leftParenthesis),
+      assertInitializer_message: node.message?.accept(this),
+      assertInitializer_rightParenthesis: _getToken(node.rightParenthesis),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitAssertStatement(AssertStatement node) {
+    var builder = LinkedNodeBuilder.assertStatement(
+      assertStatement_assertKeyword: _getToken(node.assertKeyword),
+      assertStatement_comma: _getToken(node.comma),
+      assertStatement_condition: node.condition.accept(this),
+      assertStatement_leftParenthesis: _getToken(node.leftParenthesis),
+      assertStatement_message: node.message?.accept(this),
+      assertStatement_rightParenthesis: _getToken(node.rightParenthesis),
+      assertStatement_semicolon: _getToken(node.semicolon),
+    );
+    _storeStatement(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitAssignmentExpression(AssignmentExpression node) {
+    var elementComponents = _componentsOfElement(node.staticElement);
+    return LinkedNodeBuilder.assignmentExpression(
+      assignmentExpression_element: elementComponents.rawElement,
+      assignmentExpression_elementType: elementComponents.definingType,
+      assignmentExpression_leftHandSide: node.leftHandSide.accept(this),
+      assignmentExpression_operator: _getToken(node.operator),
+      assignmentExpression_rightHandSide: node.rightHandSide.accept(this),
+      expression_type: _writeType(node.staticType),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitAwaitExpression(AwaitExpression node) {
+    return LinkedNodeBuilder.awaitExpression(
+      awaitExpression_awaitKeyword: _getToken(node.awaitKeyword),
+      awaitExpression_expression: node.expression.accept(this),
+      expression_type: _writeType(node.staticType),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitBinaryExpression(BinaryExpression node) {
+    var elementComponents = _componentsOfElement(node.staticElement);
+    return LinkedNodeBuilder.binaryExpression(
+      binaryExpression_element: elementComponents.rawElement,
+      binaryExpression_elementType: elementComponents.definingType,
+      binaryExpression_leftOperand: node.leftOperand.accept(this),
+      binaryExpression_operator: _getToken(node.operator),
+      binaryExpression_rightOperand: node.rightOperand.accept(this),
+      expression_type: _writeType(node.staticType),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitBlock(Block node) {
+    return LinkedNodeBuilder.block(
+      block_leftBracket: _getToken(node.leftBracket),
+      block_rightBracket: _getToken(node.rightBracket),
+      block_statements: _writeNodeList(node.statements),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitBlockFunctionBody(BlockFunctionBody node) {
+    return LinkedNodeBuilder.blockFunctionBody(
+      blockFunctionBody_block: node.block.accept(this),
+      blockFunctionBody_keyword: _getToken(node.keyword),
+      blockFunctionBody_star: _getToken(node.star),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitBooleanLiteral(BooleanLiteral node) {
+    return LinkedNodeBuilder.booleanLiteral(
+      booleanLiteral_literal: _getToken(node.literal),
+      booleanLiteral_value: node.value,
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitBreakStatement(BreakStatement node) {
+    var builder = LinkedNodeBuilder.breakStatement(
+      breakStatement_breakKeyword: _getToken(node.breakKeyword),
+      breakStatement_label: node.label?.accept(this),
+      breakStatement_semicolon: _getToken(node.semicolon),
+    );
+    _storeStatement(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitCascadeExpression(CascadeExpression node) {
+    var builder = LinkedNodeBuilder.cascadeExpression(
+      cascadeExpression_target: node.target.accept(this),
+      cascadeExpression_sections: _writeNodeList(node.cascadeSections),
+    );
+    _storeExpression(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitCatchClause(CatchClause node) {
+    return LinkedNodeBuilder.catchClause(
+      catchClause_body: node.body.accept(this),
+      catchClause_catchKeyword: _getToken(node.catchKeyword),
+      catchClause_comma: _getToken(node.comma),
+      catchClause_exceptionParameter: node.exceptionParameter?.accept(this),
+      catchClause_exceptionType: node.exceptionType?.accept(this),
+      catchClause_leftParenthesis: _getToken(node.leftParenthesis),
+      catchClause_onKeyword: _getToken(node.onKeyword),
+      catchClause_rightParenthesis: _getToken(node.rightParenthesis),
+      catchClause_stackTraceParameter: node.stackTraceParameter?.accept(this),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitClassDeclaration(ClassDeclaration node) {
+    var builder = LinkedNodeBuilder.classDeclaration(
+      classDeclaration_abstractKeyword: _getToken(node.abstractKeyword),
+      classDeclaration_classKeyword: _getToken(node.classKeyword),
+      classDeclaration_extendsClause: node.extendsClause?.accept(this),
+      classDeclaration_nativeClause: node.nativeClause?.accept(this),
+      classDeclaration_withClause: node.withClause?.accept(this),
+    );
+    _storeClassOrMixinDeclaration(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitClassTypeAlias(ClassTypeAlias node) {
+    var builder = LinkedNodeBuilder.classTypeAlias(
+      classTypeAlias_abstractKeyword: _getToken(node.abstractKeyword),
+      classTypeAlias_equals: _getToken(node.equals),
+      classTypeAlias_implementsClause: node.implementsClause?.accept(this),
+      classTypeAlias_superclass: node.superclass.accept(this),
+      classTypeAlias_typeParameters: node.typeParameters?.accept(this),
+      classTypeAlias_withClause: node.withClause.accept(this),
+    );
+    _storeTypeAlias(builder, node);
+    _storeIsSimpleBounded(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitComment(Comment node) {
+    LinkedNodeCommentType type;
+    if (node.isBlock) {
+      type = LinkedNodeCommentType.block;
+    } else if (node.isDocumentation) {
+      type = LinkedNodeCommentType.documentation;
+    } else if (node.isEndOfLine) {
+      type = LinkedNodeCommentType.endOfLine;
+    }
+
+    return LinkedNodeBuilder.comment(
+      comment_tokens: _getTokens(node.tokens),
+      comment_type: type,
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitCompilationUnit(CompilationUnit node) {
+    return LinkedNodeBuilder.compilationUnit(
+      compilationUnit_beginToken: _getToken(node.beginToken),
+      compilationUnit_declarations: _writeNodeList(node.declarations),
+      compilationUnit_directives: _writeNodeList(node.directives),
+      compilationUnit_endToken: _getToken(node.endToken),
+      compilationUnit_scriptTag: node.scriptTag?.accept(this),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitConditionalExpression(ConditionalExpression node) {
+    var builder = LinkedNodeBuilder.conditionalExpression(
+      conditionalExpression_colon: _getToken(node.colon),
+      conditionalExpression_condition: node.condition.accept(this),
+      conditionalExpression_elseExpression: node.elseExpression.accept(this),
+      conditionalExpression_question: _getToken(node.question),
+      conditionalExpression_thenExpression: node.thenExpression.accept(this),
+    );
+    _storeExpression(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitConfiguration(Configuration node) {
+    return LinkedNodeBuilder.configuration(
+      configuration_equalToken: _getToken(node.equalToken),
+      configuration_ifKeyword: _getToken(node.ifKeyword),
+      configuration_leftParenthesis: _getToken(node.leftParenthesis),
+      configuration_name: node.name?.accept(this),
+      configuration_rightParenthesis: _getToken(node.rightParenthesis),
+      configuration_value: node.value?.accept(this),
+      configuration_uri: node.uri?.accept(this),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitConstructorDeclaration(ConstructorDeclaration node) {
+    var builder = LinkedNodeBuilder.constructorDeclaration(
+      constructorDeclaration_body: node.body?.accept(this),
+      constructorDeclaration_constKeyword: _getToken(node.constKeyword),
+      constructorDeclaration_externalKeyword: _getToken(node.externalKeyword),
+      constructorDeclaration_factoryKeyword: _getToken(node.factoryKeyword),
+      constructorDeclaration_initializers: _writeNodeList(node.initializers),
+      constructorDeclaration_name: node.name?.accept(this),
+      constructorDeclaration_parameters: node.parameters.accept(this),
+      constructorDeclaration_period: _getToken(node.period),
+      constructorDeclaration_redirectedConstructor:
+          node.redirectedConstructor?.accept(this),
+      constructorDeclaration_returnType: node.returnType.accept(this),
+      constructorDeclaration_separator: _getToken(node.separator),
+    );
+    _storeClassMember(builder, node);
+    _storeCodeOffsetLength(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitConstructorFieldInitializer(
+      ConstructorFieldInitializer node) {
+    var builder = LinkedNodeBuilder.constructorFieldInitializer(
+      constructorFieldInitializer_equals: _getToken(node.equals),
+      constructorFieldInitializer_expression: node.expression.accept(this),
+      constructorFieldInitializer_fieldName: node.fieldName.accept(this),
+      constructorFieldInitializer_period: _getToken(node.period),
+      constructorFieldInitializer_thisKeyword: _getToken(node.thisKeyword),
+    );
+    _storeConstructorInitializer(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitConstructorName(ConstructorName node) {
+    var elementComponents = _componentsOfElement(node.staticElement);
+    return LinkedNodeBuilder.constructorName(
+      constructorName_element: elementComponents.rawElement,
+      constructorName_elementType: elementComponents.definingType,
+      constructorName_name: node.name?.accept(this),
+      constructorName_period: _getToken(node.period),
+      constructorName_type: node.type.accept(this),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitContinueStatement(ContinueStatement node) {
+    var builder = LinkedNodeBuilder.continueStatement(
+      continueStatement_continueKeyword: _getToken(node.continueKeyword),
+      continueStatement_label: node.label?.accept(this),
+      continueStatement_semicolon: _getToken(node.semicolon),
+    );
+    _storeStatement(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitDeclaredIdentifier(DeclaredIdentifier node) {
+    var builder = LinkedNodeBuilder.declaredIdentifier(
+      declaredIdentifier_identifier: node.identifier.accept(this),
+      declaredIdentifier_keyword: _getToken(node.keyword),
+      declaredIdentifier_type: node.type?.accept(this),
+    );
+    _storeDeclaration(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitDefaultFormalParameter(DefaultFormalParameter node) {
+    var builder = LinkedNodeBuilder.defaultFormalParameter(
+      defaultFormalParameter_defaultValue: node.defaultValue?.accept(this),
+      defaultFormalParameter_isNamed: node.isNamed,
+      defaultFormalParameter_parameter: node.parameter.accept(this),
+      defaultFormalParameter_separator: _getToken(node.separator),
+    );
+    _storeCodeOffsetLength(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitDoStatement(DoStatement node) {
+    return LinkedNodeBuilder.doStatement(
+      doStatement_body: node.body.accept(this),
+      doStatement_condition: node.condition.accept(this),
+      doStatement_doKeyword: _getToken(node.doKeyword),
+      doStatement_leftParenthesis: _getToken(node.leftParenthesis),
+      doStatement_rightParenthesis: _getToken(node.rightParenthesis),
+      doStatement_semicolon: _getToken(node.semicolon),
+      doStatement_whileKeyword: _getToken(node.whileKeyword),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitDottedName(DottedName node) {
+    return LinkedNodeBuilder.dottedName(
+      dottedName_components: _writeNodeList(node.components),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitDoubleLiteral(DoubleLiteral node) {
+    return LinkedNodeBuilder.doubleLiteral(
+      doubleLiteral_literal: _getToken(node.literal),
+      doubleLiteral_value: node.value,
+      expression_type: _writeType(node.staticType),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitEmptyFunctionBody(EmptyFunctionBody node) {
+    var builder = LinkedNodeBuilder.emptyFunctionBody(
+      emptyFunctionBody_semicolon: _getToken(node.semicolon),
+    );
+    _storeFunctionBody(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitEmptyStatement(EmptyStatement node) {
+    return LinkedNodeBuilder.emptyStatement(
+      emptyStatement_semicolon: _getToken(node.semicolon),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitEnumConstantDeclaration(EnumConstantDeclaration node) {
+    var builder = LinkedNodeBuilder.enumConstantDeclaration(
+      enumConstantDeclaration_name: node.name.accept(this),
+    );
+    _storeDeclaration(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitEnumDeclaration(EnumDeclaration node) {
+    var builder = LinkedNodeBuilder.enumDeclaration(
+      enumDeclaration_constants: _writeNodeList(node.constants),
+      enumDeclaration_enumKeyword: _getToken(node.enumKeyword),
+      enumDeclaration_leftBracket: _getToken(node.leftBracket),
+      enumDeclaration_rightBracket: _getToken(node.rightBracket),
+    );
+    _storeNamedCompilationUnitMember(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitExportDirective(ExportDirective node) {
+    var builder = LinkedNodeBuilder.exportDirective();
+    _storeNamespaceDirective(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitExpressionFunctionBody(ExpressionFunctionBody node) {
+    return LinkedNodeBuilder.expressionFunctionBody(
+      expressionFunctionBody_arrow: _getToken(node.functionDefinition),
+      expressionFunctionBody_expression: node.expression.accept(this),
+      expressionFunctionBody_keyword: _getToken(node.keyword),
+      expressionFunctionBody_semicolon: _getToken(node.semicolon),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitExpressionStatement(ExpressionStatement node) {
+    return LinkedNodeBuilder.expressionStatement(
+      expressionStatement_expression: node.expression.accept(this),
+      expressionStatement_semicolon: _getToken(node.semicolon),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitExtendsClause(ExtendsClause node) {
+    return LinkedNodeBuilder.extendsClause(
+      extendsClause_extendsKeyword: _getToken(node.extendsKeyword),
+      extendsClause_superclass: node.superclass.accept(this),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitFieldDeclaration(FieldDeclaration node) {
+    _variablesDeclaration = LinkedNodeVariablesDeclarationBuilder(
+      isCovariant: node.covariantKeyword != null,
+      isStatic: node.isStatic,
+    );
+
+    var builder = LinkedNodeBuilder.fieldDeclaration(
+      fieldDeclaration_covariantKeyword: _getToken(node.covariantKeyword),
+      fieldDeclaration_fields: node.fields.accept(this),
+      fieldDeclaration_semicolon: _getToken(node.semicolon),
+      fieldDeclaration_staticKeyword: _getToken(node.staticKeyword),
+    );
+    _storeClassMember(builder, node);
+
+    _variablesDeclaration.comment = builder.annotatedNode_comment;
+    _variablesDeclaration = null;
+
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitFieldFormalParameter(FieldFormalParameter node) {
+    var builder = LinkedNodeBuilder.fieldFormalParameter(
+      fieldFormalParameter_formalParameters: node.parameters?.accept(this),
+      fieldFormalParameter_keyword: _getToken(node.keyword),
+      fieldFormalParameter_period: _getToken(node.period),
+      fieldFormalParameter_thisKeyword: _getToken(node.thisKeyword),
+      fieldFormalParameter_type: node.type?.accept(this),
+      fieldFormalParameter_typeParameters: node.typeParameters?.accept(this),
+    );
+    _storeNormalFormalParameter(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitForEachPartsWithDeclaration(
+      ForEachPartsWithDeclaration node) {
+    var builder = LinkedNodeBuilder.forEachPartsWithDeclaration(
+      forEachPartsWithDeclaration_loopVariable: node.loopVariable.accept(this),
+    );
+    _storeForEachParts(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitForEachPartsWithIdentifier(
+      ForEachPartsWithIdentifier node) {
+    var builder = LinkedNodeBuilder.forEachPartsWithIdentifier(
+      forEachPartsWithIdentifier_identifier: node.identifier.accept(this),
+    );
+    _storeForEachParts(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitForElement(ForElement node) {
+    var builder = LinkedNodeBuilder.forElement(
+      forElement_body: node.body.accept(this),
+    );
+    _storeForMixin(builder, node as ForElementImpl);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitFormalParameterList(FormalParameterList node) {
+    return LinkedNodeBuilder.formalParameterList(
+      formalParameterList_leftDelimiter: _getToken(node.leftDelimiter),
+      formalParameterList_leftParenthesis: _getToken(node.leftParenthesis),
+      formalParameterList_parameters: _writeNodeList(node.parameters),
+      formalParameterList_rightDelimiter: _getToken(node.rightDelimiter),
+      formalParameterList_rightParenthesis: _getToken(node.rightParenthesis),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitForPartsWithDeclarations(
+      ForPartsWithDeclarations node) {
+    var builder = LinkedNodeBuilder.forPartsWithDeclarations(
+      forPartsWithDeclarations_variables: node.variables.accept(this),
+    );
+    _storeForParts(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitForPartsWithExpression(ForPartsWithExpression node) {
+    var builder = LinkedNodeBuilder.forPartsWithExpression(
+      forPartsWithExpression_initialization: node.initialization?.accept(this),
+    );
+    _storeForParts(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitForStatement(ForStatement node) {
+    var builder = LinkedNodeBuilder.forStatement(
+      forStatement_body: node.body.accept(this),
+    );
+    _storeForMixin(builder, node as ForStatementImpl);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitFunctionDeclaration(FunctionDeclaration node) {
+    var builder = LinkedNodeBuilder.functionDeclaration(
+      functionDeclaration_externalKeyword: _getToken(node.externalKeyword),
+      functionDeclaration_functionExpression:
+          node.functionExpression?.accept(this),
+      functionDeclaration_propertyKeyword: _getToken(node.propertyKeyword),
+      functionDeclaration_returnType: node.returnType?.accept(this),
+    );
+    _storeNamedCompilationUnitMember(builder, node);
+    _writeActualReturnType(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitFunctionDeclarationStatement(
+      FunctionDeclarationStatement node) {
+    return LinkedNodeBuilder.functionDeclarationStatement(
+      functionDeclarationStatement_functionDeclaration:
+          node.functionDeclaration.accept(this),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitFunctionExpression(FunctionExpression node) {
+    return LinkedNodeBuilder.functionExpression(
+      functionExpression_body: node.body?.accept(this),
+      functionExpression_formalParameters: node.parameters?.accept(this),
+      functionExpression_typeParameters: node.typeParameters?.accept(this),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitFunctionExpressionInvocation(
+      FunctionExpressionInvocation node) {
+    var builder = LinkedNodeBuilder.functionExpressionInvocation(
+      functionExpressionInvocation_function: node.function?.accept(this),
+    );
+    _storeInvocationExpression(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitFunctionTypeAlias(FunctionTypeAlias node) {
+    var builder = LinkedNodeBuilder.functionTypeAlias(
+      functionTypeAlias_formalParameters: node.parameters.accept(this),
+      functionTypeAlias_returnType: node.returnType?.accept(this),
+      functionTypeAlias_typeParameters: node.typeParameters?.accept(this),
+    );
+    _storeTypeAlias(builder, node);
+    _writeActualReturnType(builder, node);
+    _storeIsSimpleBounded(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitFunctionTypedFormalParameter(
+      FunctionTypedFormalParameter node) {
+    var builder = LinkedNodeBuilder.functionTypedFormalParameter(
+      functionTypedFormalParameter_formalParameters:
+          node.parameters.accept(this),
+      functionTypedFormalParameter_returnType: node.returnType?.accept(this),
+      functionTypedFormalParameter_typeParameters:
+          node.typeParameters?.accept(this),
+    );
+    _storeNormalFormalParameter(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitGenericFunctionType(GenericFunctionType node) {
+    var builder = LinkedNodeBuilder.genericFunctionType(
+      genericFunctionType_formalParameters: node.parameters.accept(this),
+      genericFunctionType_functionKeyword: _getToken(node.functionKeyword),
+      genericFunctionType_question: _getToken(node.question),
+      genericFunctionType_returnType: node.returnType?.accept(this),
+      genericFunctionType_type: _writeType(node.type),
+      genericFunctionType_typeParameters: node.typeParameters?.accept(this),
+    );
+    _writeActualReturnType(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitGenericTypeAlias(GenericTypeAlias node) {
+    var builder = LinkedNodeBuilder.genericTypeAlias(
+      genericTypeAlias_equals: _getToken(node.equals),
+      genericTypeAlias_functionType: node.functionType.accept(this),
+      genericTypeAlias_typeParameters: node.typeParameters?.accept(this),
+    );
+    _storeTypeAlias(builder, node);
+    _storeIsSimpleBounded(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitHideCombinator(HideCombinator node) {
+    var builder = LinkedNodeBuilder.hideCombinator(
+      hideCombinator_hiddenNames: _writeNodeList(node.hiddenNames),
+    );
+    _storeCombinator(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitIfElement(IfElement node) {
+    var builder = LinkedNodeBuilder.ifElement(
+      ifElement_elseElement: node.elseElement?.accept(this),
+      ifElement_thenElement: node.thenElement.accept(this),
+    );
+    _storeIfMixin(builder, node as IfElementImpl);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitIfStatement(IfStatement node) {
+    var builder = LinkedNodeBuilder.ifStatement(
+      ifMixin_condition: node.condition.accept(this),
+      ifMixin_elseKeyword: _getToken(node.elseKeyword),
+      ifStatement_elseStatement: node.elseStatement?.accept(this),
+      ifMixin_ifKeyword: _getToken(node.ifKeyword),
+      ifMixin_leftParenthesis: _getToken(node.leftParenthesis),
+      ifMixin_rightParenthesis: _getToken(node.rightParenthesis),
+      ifStatement_thenStatement: node.thenStatement.accept(this),
+    );
+    _storeIfMixin(builder, node as IfStatementImpl);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitImplementsClause(ImplementsClause node) {
+    return LinkedNodeBuilder.implementsClause(
+      implementsClause_implementsKeyword: _getToken(node.implementsKeyword),
+      implementsClause_interfaces: _writeNodeList(node.interfaces),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitImportDirective(ImportDirective node) {
+    var builder = LinkedNodeBuilder.importDirective(
+      importDirective_asKeyword: _getToken(node.asKeyword),
+      importDirective_deferredKeyword: _getToken(node.deferredKeyword),
+      importDirective_prefix: node.prefix?.accept(this),
+    );
+    _storeNamespaceDirective(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitIndexExpression(IndexExpression node) {
+    var elementComponents = _componentsOfElement(node.staticElement);
+    return LinkedNodeBuilder.indexExpression(
+      indexExpression_element: elementComponents.rawElement,
+      indexExpression_elementType: elementComponents.definingType,
+      indexExpression_index: node.index.accept(this),
+      indexExpression_leftBracket: _getToken(node.leftBracket),
+      indexExpression_period: _getToken(node.period),
+      indexExpression_rightBracket: _getToken(node.rightBracket),
+      indexExpression_target: node.target?.accept(this),
+      expression_type: _writeType(node.staticType),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitInstanceCreationExpression(
+      InstanceCreationExpression node) {
+    InstanceCreationExpressionImpl nodeImpl = node;
+    return LinkedNodeBuilder.instanceCreationExpression(
+      instanceCreationExpression_arguments: node.argumentList.accept(this),
+      instanceCreationExpression_constructorName:
+          node.constructorName.accept(this),
+      instanceCreationExpression_keyword: _getToken(node.keyword),
+      instanceCreationExpression_typeArguments:
+          nodeImpl.typeArguments?.accept(this),
+      expression_type: _writeType(node.staticType),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitIntegerLiteral(IntegerLiteral node) {
+    return LinkedNodeBuilder.integerLiteral(
+      integerLiteral_literal: _getToken(node.literal),
+      integerLiteral_value: node.value,
+      expression_type: _writeType(node.staticType),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitInterpolationExpression(InterpolationExpression node) {
+    return LinkedNodeBuilder.interpolationExpression(
+      interpolationExpression_expression: node.expression.accept(this),
+      interpolationExpression_leftBracket: _getToken(node.leftBracket),
+      interpolationExpression_rightBracket: _getToken(node.rightBracket),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitInterpolationString(InterpolationString node) {
+    return LinkedNodeBuilder.interpolationString(
+      interpolationString_token: _getToken(node.contents),
+      interpolationString_value: node.value,
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitIsExpression(IsExpression node) {
+    var builder = LinkedNodeBuilder.isExpression(
+      isExpression_expression: node.expression.accept(this),
+      isExpression_isOperator: _getToken(node.isOperator),
+      isExpression_notOperator: _getToken(node.notOperator),
+      isExpression_type: node.type.accept(this),
+    );
+    _storeExpression(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitLabel(Label node) {
+    return LinkedNodeBuilder.label(
+      label_label: node.label.accept(this),
+      label_colon: _getToken(node.colon),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitLabeledStatement(LabeledStatement node) {
+    return LinkedNodeBuilder.labeledStatement(
+      labeledStatement_labels: _writeNodeList(node.labels),
+      labeledStatement_statement: node.statement.accept(this),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitLibraryDirective(LibraryDirective node) {
+    var builder = LinkedNodeBuilder.libraryDirective(
+      libraryDirective_name: node.name.accept(this),
+      directive_semicolon: _getToken(node.semicolon),
+    );
+    _storeDirective(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitLibraryIdentifier(LibraryIdentifier node) {
+    return LinkedNodeBuilder.libraryIdentifier(
+      libraryIdentifier_components: _writeNodeList(node.components),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitListLiteral(ListLiteral node) {
+    var builder = LinkedNodeBuilder.listLiteral(
+      listLiteral_elements: _writeNodeList(node.elements),
+      listLiteral_leftBracket: _getToken(node.leftBracket),
+      listLiteral_rightBracket: _getToken(node.rightBracket),
+    );
+    _storeTypedLiteral(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitMapLiteralEntry(MapLiteralEntry node) {
+    return LinkedNodeBuilder.mapLiteralEntry(
+      mapLiteralEntry_key: node.key.accept(this),
+      mapLiteralEntry_separator: _getToken(node.separator),
+      mapLiteralEntry_value: node.value.accept(this),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitMethodDeclaration(MethodDeclaration node) {
+    var builder = LinkedNodeBuilder.methodDeclaration(
+      methodDeclaration_body: node.body?.accept(this),
+      methodDeclaration_externalKeyword: _getToken(node.externalKeyword),
+      methodDeclaration_formalParameters: node.parameters?.accept(this),
+      methodDeclaration_modifierKeyword: _getToken(node.modifierKeyword),
+      methodDeclaration_name: node.name.accept(this),
+      methodDeclaration_operatorKeyword: _getToken(node.operatorKeyword),
+      methodDeclaration_propertyKeyword: _getToken(node.propertyKeyword),
+      methodDeclaration_returnType: node.returnType?.accept(this),
+      methodDeclaration_typeParameters: node.typeParameters?.accept(this),
+    );
+    _storeClassMember(builder, node);
+    _storeCodeOffsetLength(builder, node);
+    _writeActualReturnType(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitMethodInvocation(MethodInvocation node) {
+    var builder = LinkedNodeBuilder.methodInvocation(
+      methodInvocation_methodName: node.methodName?.accept(this),
+      methodInvocation_operator: _getToken(node.operator),
+      methodInvocation_target: node.target?.accept(this),
+    );
+    _storeInvocationExpression(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitMixinDeclaration(MixinDeclaration node) {
+    var builder = LinkedNodeBuilder.mixinDeclaration(
+      mixinDeclaration_mixinKeyword: _getToken(node.mixinKeyword),
+      mixinDeclaration_onClause: node.onClause?.accept(this),
+    );
+    _storeClassOrMixinDeclaration(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitNamedExpression(NamedExpression node) {
+    return LinkedNodeBuilder.namedExpression(
+      namedExpression_expression: node.expression.accept(this),
+      namedExpression_name: node.name.accept(this),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitNativeClause(NativeClause node) {
+    return LinkedNodeBuilder.nativeClause(
+      nativeClause_nativeKeyword: _getToken(node.nativeKeyword),
+      nativeClause_name: node.name.accept(this),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitNativeFunctionBody(NativeFunctionBody node) {
+    return LinkedNodeBuilder.nativeFunctionBody(
+      nativeFunctionBody_nativeKeyword: _getToken(node.nativeKeyword),
+      nativeFunctionBody_semicolon: _getToken(node.semicolon),
+      nativeFunctionBody_stringLiteral: node.stringLiteral?.accept(this),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitNullLiteral(NullLiteral node) {
+    var builder = LinkedNodeBuilder.nullLiteral(
+      nullLiteral_literal: _getToken(node.literal),
+    );
+    _storeExpression(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitOnClause(OnClause node) {
+    return LinkedNodeBuilder.onClause(
+      onClause_onKeyword: _getToken(node.onKeyword),
+      onClause_superclassConstraints:
+          _writeNodeList(node.superclassConstraints),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitParenthesizedExpression(ParenthesizedExpression node) {
+    var builder = LinkedNodeBuilder.parenthesizedExpression(
+      parenthesizedExpression_expression: node.expression.accept(this),
+      parenthesizedExpression_leftParenthesis: _getToken(node.leftParenthesis),
+      parenthesizedExpression_rightParenthesis:
+          _getToken(node.rightParenthesis),
+    );
+    _storeExpression(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitPartDirective(PartDirective node) {
+    var builder = LinkedNodeBuilder.partDirective(
+      directive_semicolon: _getToken(node.semicolon),
+    );
+    _storeUriBasedDirective(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitPartOfDirective(PartOfDirective node) {
+    var builder = LinkedNodeBuilder.partOfDirective(
+      partOfDirective_libraryName: node.libraryName?.accept(this),
+      partOfDirective_ofKeyword: _getToken(node.ofKeyword),
+      directive_semicolon: _getToken(node.semicolon),
+      partOfDirective_uri: node.uri?.accept(this),
+    );
+    _storeDirective(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitPostfixExpression(PostfixExpression node) {
+    var elementComponents = _componentsOfElement(node.staticElement);
+    return LinkedNodeBuilder.postfixExpression(
+      expression_type: _writeType(node.staticType),
+      postfixExpression_element: elementComponents.rawElement,
+      postfixExpression_elementType: elementComponents.definingType,
+      postfixExpression_operand: node.operand.accept(this),
+      postfixExpression_operator: _getToken(node.operator),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitPrefixedIdentifier(PrefixedIdentifier node) {
+    return LinkedNodeBuilder.prefixedIdentifier(
+      prefixedIdentifier_identifier: node.identifier.accept(this),
+      prefixedIdentifier_period: _getToken(node.period),
+      prefixedIdentifier_prefix: node.prefix.accept(this),
+      expression_type: _writeType(node.staticType),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitPrefixExpression(PrefixExpression node) {
+    var elementComponents = _componentsOfElement(node.staticElement);
+    return LinkedNodeBuilder.prefixExpression(
+      expression_type: _writeType(node.staticType),
+      prefixExpression_element: elementComponents.rawElement,
+      prefixExpression_elementType: elementComponents.definingType,
+      prefixExpression_operand: node.operand.accept(this),
+      prefixExpression_operator: _getToken(node.operator),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitPropertyAccess(PropertyAccess node) {
+    var builder = LinkedNodeBuilder.propertyAccess(
+      propertyAccess_operator: _getToken(node.operator),
+      propertyAccess_propertyName: node.propertyName.accept(this),
+      propertyAccess_target: node.target?.accept(this),
+    );
+    _storeExpression(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitRedirectingConstructorInvocation(
+      RedirectingConstructorInvocation node) {
+    var elementComponents = _componentsOfElement(node.staticElement);
+    var builder = LinkedNodeBuilder.redirectingConstructorInvocation(
+      redirectingConstructorInvocation_arguments:
+          node.argumentList.accept(this),
+      redirectingConstructorInvocation_constructorName:
+          node.constructorName?.accept(this),
+      redirectingConstructorInvocation_element: elementComponents.rawElement,
+      redirectingConstructorInvocation_elementType:
+          elementComponents.definingType,
+      redirectingConstructorInvocation_period: _getToken(node.period),
+      redirectingConstructorInvocation_thisKeyword: _getToken(node.thisKeyword),
+    );
+    _storeConstructorInitializer(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitRethrowExpression(RethrowExpression node) {
+    var builder = LinkedNodeBuilder.rethrowExpression(
+      rethrowExpression_rethrowKeyword: _getToken(node.rethrowKeyword),
+    );
+    _storeExpression(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitReturnStatement(ReturnStatement node) {
+    return LinkedNodeBuilder.returnStatement(
+      returnStatement_expression: node.expression?.accept(this),
+      returnStatement_returnKeyword: _getToken(node.returnKeyword),
+      returnStatement_semicolon: _getToken(node.semicolon),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitScriptTag(ScriptTag node) {
+    return LinkedNodeBuilder.scriptTag(
+      scriptTag_scriptTag: _getToken(node.scriptTag),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitSetOrMapLiteral(SetOrMapLiteral node) {
+    var builder = LinkedNodeBuilder.setOrMapLiteral(
+      setOrMapLiteral_elements: _writeNodeList(node.elements),
+      setOrMapLiteral_isMap: node.isMap,
+      setOrMapLiteral_isSet: node.isSet,
+      setOrMapLiteral_leftBracket: _getToken(node.leftBracket),
+      setOrMapLiteral_rightBracket: _getToken(node.rightBracket),
+    );
+    _storeTypedLiteral(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitShowCombinator(ShowCombinator node) {
+    var builder = LinkedNodeBuilder.showCombinator(
+      showCombinator_shownNames: _writeNodeList(node.shownNames),
+    );
+    _storeCombinator(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitSimpleFormalParameter(SimpleFormalParameter node) {
+    var builder = LinkedNodeBuilder.simpleFormalParameter(
+      simpleFormalParameter_keyword: _getToken(node.keyword),
+      simpleFormalParameter_type: node.type?.accept(this),
+    );
+    _storeNormalFormalParameter(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitSimpleIdentifier(SimpleIdentifier node) {
+    Element element;
+    if (!node.inDeclarationContext()) {
+      element = node.staticElement;
+      if (element is MultiplyDefinedElement) {
+        element = null;
+      }
+    }
+
+    var elementComponents = _componentsOfElement(element);
+    return LinkedNodeBuilder.simpleIdentifier(
+      simpleIdentifier_element: elementComponents.rawElement,
+      simpleIdentifier_elementType: elementComponents.definingType,
+      simpleIdentifier_token: _getToken(node.token),
+      expression_type: _writeType(node.staticType),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitSimpleStringLiteral(SimpleStringLiteral node) {
+    var builder = LinkedNodeBuilder.simpleStringLiteral(
+      simpleStringLiteral_token: _getToken(node.literal),
+      simpleStringLiteral_value: node.value,
+    );
+    _storeExpression(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitSpreadElement(SpreadElement node) {
+    return LinkedNodeBuilder.spreadElement(
+      spreadElement_expression: node.expression.accept(this),
+      spreadElement_spreadOperator: _getToken(node.spreadOperator),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitStringInterpolation(StringInterpolation node) {
+    return LinkedNodeBuilder.stringInterpolation(
+      stringInterpolation_elements: _writeNodeList(node.elements),
+      expression_type: _writeType(node.staticType),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitSuperConstructorInvocation(
+      SuperConstructorInvocation node) {
+    var elementComponents = _componentsOfElement(node.staticElement);
+    var builder = LinkedNodeBuilder.superConstructorInvocation(
+      superConstructorInvocation_arguments: node.argumentList.accept(this),
+      superConstructorInvocation_constructorName:
+          node.constructorName?.accept(this),
+      superConstructorInvocation_element: elementComponents.rawElement,
+      superConstructorInvocation_elementType: elementComponents.definingType,
+      superConstructorInvocation_period: _getToken(node.period),
+      superConstructorInvocation_superKeyword: _getToken(node.superKeyword),
+    );
+    _storeConstructorInitializer(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitSuperExpression(SuperExpression node) {
+    var builder = LinkedNodeBuilder.superExpression(
+      superExpression_superKeyword: _getToken(node.superKeyword),
+    );
+    _storeExpression(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitSwitchCase(SwitchCase node) {
+    var builder = LinkedNodeBuilder.switchCase(
+      switchCase_expression: node.expression.accept(this),
+    );
+    _storeSwitchMember(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitSwitchDefault(SwitchDefault node) {
+    var builder = LinkedNodeBuilder.switchDefault();
+    _storeSwitchMember(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitSwitchStatement(SwitchStatement node) {
+    return LinkedNodeBuilder.switchStatement(
+      switchStatement_expression: node.expression.accept(this),
+      switchStatement_leftBracket: _getToken(node.leftBracket),
+      switchStatement_leftParenthesis: _getToken(node.leftParenthesis),
+      switchStatement_members: _writeNodeList(node.members),
+      switchStatement_rightBracket: _getToken(node.rightBracket),
+      switchStatement_rightParenthesis: _getToken(node.rightParenthesis),
+      switchStatement_switchKeyword: _getToken(node.switchKeyword),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitSymbolLiteral(SymbolLiteral node) {
+    var builder = LinkedNodeBuilder.symbolLiteral(
+      symbolLiteral_poundSign: _getToken(node.poundSign),
+      symbolLiteral_components: _getTokens(node.components),
+    );
+    _storeExpression(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitThisExpression(ThisExpression node) {
+    var builder = LinkedNodeBuilder.thisExpression(
+      thisExpression_thisKeyword: _getToken(node.thisKeyword),
+    );
+    _storeExpression(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitThrowExpression(ThrowExpression node) {
+    return LinkedNodeBuilder.throwExpression(
+      throwExpression_expression: node.expression.accept(this),
+      throwExpression_throwKeyword: _getToken(node.throwKeyword),
+      expression_type: _writeType(node.staticType),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitTopLevelVariableDeclaration(
+      TopLevelVariableDeclaration node) {
+    _variablesDeclaration = LinkedNodeVariablesDeclarationBuilder();
+
+    var builder = LinkedNodeBuilder.topLevelVariableDeclaration(
+      topLevelVariableDeclaration_semicolon: _getToken(node.semicolon),
+      topLevelVariableDeclaration_variableList: node.variables?.accept(this),
+    );
+    _storeCompilationUnitMember(builder, node);
+
+    _variablesDeclaration.comment = builder.annotatedNode_comment;
+    _variablesDeclaration = null;
+
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitTryStatement(TryStatement node) {
+    return LinkedNodeBuilder.tryStatement(
+      tryStatement_body: node.body.accept(this),
+      tryStatement_catchClauses: _writeNodeList(node.catchClauses),
+      tryStatement_finallyBlock: node.finallyBlock?.accept(this),
+      tryStatement_finallyKeyword: _getToken(node.finallyKeyword),
+      tryStatement_tryKeyword: _getToken(node.tryKeyword),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitTypeArgumentList(TypeArgumentList node) {
+    return LinkedNodeBuilder.typeArgumentList(
+      typeArgumentList_arguments: _writeNodeList(node.arguments),
+      typeArgumentList_leftBracket: _getToken(node.leftBracket),
+      typeArgumentList_rightBracket: _getToken(node.rightBracket),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitTypeName(TypeName node) {
+    return LinkedNodeBuilder.typeName(
+      typeName_name: node.name.accept(this),
+      typeName_question: _getToken(node.question),
+      typeName_type: _writeType(node.type),
+      typeName_typeArguments: node.typeArguments?.accept(this),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitTypeParameter(TypeParameter node) {
+    var builder = LinkedNodeBuilder.typeParameter(
+        typeParameter_bound: node.bound?.accept(this),
+        typeParameter_extendsKeyword: _getToken(node.extendsKeyword),
+        typeParameter_name: node.name.accept(this));
+    _storeDeclaration(builder, node);
+    _storeCodeOffsetLength(builder, node);
+    builder.typeParameter_id = _linkingContext.idOfTypeParameter(
+      node.declaredElement,
+    );
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitTypeParameterList(TypeParameterList node) {
+    return LinkedNodeBuilder.typeParameterList(
+      typeParameterList_leftBracket: _getToken(node.leftBracket),
+      typeParameterList_rightBracket: _getToken(node.rightBracket),
+      typeParameterList_typeParameters: _writeNodeList(node.typeParameters),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitVariableDeclaration(VariableDeclaration node) {
+    var builder = LinkedNodeBuilder.variableDeclaration(
+      variableDeclaration_equals: _getToken(node.equals),
+      variableDeclaration_initializer: node.initializer?.accept(this),
+      variableDeclaration_name: node.name.accept(this),
+      variableDeclaration_declaration: _variablesDeclaration,
+    );
+    _writeActualType(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitVariableDeclarationList(VariableDeclarationList node) {
+    if (_variablesDeclaration != null) {
+      _variablesDeclaration.isConst = node.isConst;
+      _variablesDeclaration.isFinal = node.isFinal;
+    }
+
+    var builder = LinkedNodeBuilder.variableDeclarationList(
+      variableDeclarationList_keyword: _getToken(node.keyword),
+      variableDeclarationList_type: node.type?.accept(this),
+      variableDeclarationList_variables: _writeNodeList(node.variables),
+    );
+    _storeAnnotatedNode(builder, node);
+    _storeCodeOffsetLengthVariables(builder, node);
+    return builder;
+  }
+
+  @override
+  LinkedNodeBuilder visitVariableDeclarationStatement(
+      VariableDeclarationStatement node) {
+    return LinkedNodeBuilder.variableDeclarationStatement(
+      variableDeclarationStatement_semicolon: _getToken(node.semicolon),
+      variableDeclarationStatement_variables: node.variables.accept(this),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitWhileStatement(WhileStatement node) {
+    return LinkedNodeBuilder.whileStatement(
+      whileStatement_body: node.body.accept(this),
+      whileStatement_condition: node.condition.accept(this),
+      whileStatement_leftParenthesis: _getToken(node.leftParenthesis),
+      whileStatement_rightParenthesis: _getToken(node.rightParenthesis),
+      whileStatement_whileKeyword: _getToken(node.whileKeyword),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitWithClause(WithClause node) {
+    return LinkedNodeBuilder.withClause(
+      withClause_mixinTypes: _writeNodeList(node.mixinTypes),
+      withClause_withKeyword: _getToken(node.withKeyword),
+    );
+  }
+
+  @override
+  LinkedNodeBuilder visitYieldStatement(YieldStatement node) {
+    var builder = LinkedNodeBuilder.yieldStatement(
+      yieldStatement_yieldKeyword: _getToken(node.yieldKeyword),
+      yieldStatement_expression: node.expression.accept(this),
+      yieldStatement_semicolon: _getToken(node.semicolon),
+      yieldStatement_star: _getToken(node.star),
+    );
+    _storeStatement(builder, node);
+    return builder;
+  }
+
+  LinkedNodeBuilder writeNode(AstNode node) {
+    return node.accept(this);
+  }
+
+  _ElementComponents _componentsOfElement(Element element) {
+    if (element is Member) {
+      var elementIndex = _indexOfElement(element.baseElement);
+      var definingTypeNode = _writeType(element.definingType);
+      return _ElementComponents(elementIndex, definingTypeNode);
+    }
+
+    var elementIndex = _indexOfElement(element);
+    return _ElementComponents(elementIndex, null);
+  }
+
+  int _getToken(Token token) {
+    return _tokensContext.indexOfToken(token);
+  }
+
+  List<int> _getTokens(List<Token> tokenList) {
+    var result = List<int>(tokenList.length);
+    for (var i = 0; i < tokenList.length; ++i) {
+      var token = tokenList[i];
+      result[i] = _getToken(token);
+    }
+    return result;
+  }
+
+  int _indexOfElement(Element element) {
+    return _linkingContext.indexOfElement(element);
+  }
+
+  void _storeAnnotatedNode(LinkedNodeBuilder builder, AnnotatedNode node) {
+    builder
+      ..annotatedNode_comment = node.documentationComment?.accept(this)
+      ..annotatedNode_metadata = _writeNodeList(node.metadata);
+  }
+
+  void _storeClassMember(LinkedNodeBuilder builder, ClassMember node) {
+    _storeDeclaration(builder, node);
+  }
+
+  void _storeClassOrMixinDeclaration(
+      LinkedNodeBuilder builder, ClassOrMixinDeclaration node) {
+    builder
+      ..classOrMixinDeclaration_implementsClause =
+          node.implementsClause?.accept(this)
+      ..classOrMixinDeclaration_leftBracket = _getToken(node.leftBracket)
+      ..classOrMixinDeclaration_members = _writeNodeList(node.members)
+      ..classOrMixinDeclaration_rightBracket = _getToken(node.rightBracket)
+      ..classOrMixinDeclaration_typeParameters =
+          node.typeParameters?.accept(this);
+    _storeNamedCompilationUnitMember(builder, node);
+    _storeIsSimpleBounded(builder, node);
+  }
+
+  void _storeCodeOffsetLength(LinkedNodeBuilder builder, AstNode node) {
+    builder.codeOffset = node.offset;
+    builder.codeLength = node.length;
+  }
+
+  void _storeCodeOffsetLengthVariables(
+      LinkedNodeBuilder builder, VariableDeclarationList node) {
+    var builders = builder.variableDeclarationList_variables;
+    for (var i = 0; i < builders.length; ++i) {
+      var variableBuilder = builders[i];
+      var variableNode = node.variables[i];
+      var offset = (i == 0 ? node.parent : variableNode).offset;
+      variableBuilder.codeOffset = offset;
+      variableBuilder.codeLength = variableNode.end - offset;
+    }
+  }
+
+  void _storeCombinator(LinkedNodeBuilder builder, Combinator node) {
+    builder.combinator_keyword = _getToken(node.keyword);
+  }
+
+  void _storeCompilationUnitMember(
+      LinkedNodeBuilder builder, CompilationUnitMember node) {
+    _storeDeclaration(builder, node);
+  }
+
+  void _storeConstructorInitializer(
+      LinkedNodeBuilder builder, ConstructorInitializer node) {}
+
+  void _storeDeclaration(LinkedNodeBuilder builder, Declaration node) {
+    _storeAnnotatedNode(builder, node);
+  }
+
+  void _storeDirective(LinkedNodeBuilder builder, Directive node) {
+    _storeAnnotatedNode(builder, node);
+    builder..directive_keyword = _getToken(node.keyword);
+  }
+
+  void _storeExpression(LinkedNodeBuilder builder, Expression node) {
+    builder.expression_type = _writeType(node.staticType);
+  }
+
+  void _storeForEachParts(LinkedNodeBuilder builder, ForEachParts node) {
+    _storeForLoopParts(builder, node);
+    builder
+      ..forEachParts_inKeyword = _getToken(node.inKeyword)
+      ..forEachParts_iterable = node.iterable?.accept(this);
+  }
+
+  void _storeForLoopParts(LinkedNodeBuilder builder, ForLoopParts node) {}
+
+  void _storeFormalParameter(LinkedNodeBuilder builder, FormalParameter node) {
+    var kind = LinkedNodeFormalParameterKind.required;
+    if (node.isNamed) {
+      kind = LinkedNodeFormalParameterKind.optionalNamed;
+    } else if (node.isOptionalPositional) {
+      kind = LinkedNodeFormalParameterKind.optionalPositional;
+    }
+    builder.formalParameter_kind = kind;
+
+    _storeCodeOffsetLength(builder, node);
+    _writeActualType(builder, node);
+  }
+
+  void _storeForMixin(LinkedNodeBuilder builder, ForMixin node) {
+    builder
+      ..forMixin_awaitKeyword = _getToken(node.awaitKeyword)
+      ..forMixin_forKeyword = _getToken(node.forKeyword)
+      ..forMixin_forLoopParts = node.forLoopParts.accept(this)
+      ..forMixin_leftParenthesis = _getToken(node.leftParenthesis)
+      ..forMixin_rightParenthesis = _getToken(node.rightParenthesis);
+  }
+
+  void _storeForParts(LinkedNodeBuilder builder, ForParts node) {
+    _storeForLoopParts(builder, node);
+    builder
+      ..forParts_leftSeparator = _getToken(node.leftSeparator)
+      ..forParts_condition = node.condition?.accept(this)
+      ..forParts_rightSeparator = _getToken(node.rightSeparator)
+      ..forParts_updaters = _writeNodeList(node.updaters);
+  }
+
+  void _storeFunctionBody(LinkedNodeBuilder builder, FunctionBody node) {}
+
+  void _storeIfMixin(LinkedNodeBuilder builder, IfMixin node) {
+    builder
+      ..ifMixin_condition = node.condition.accept(this)
+      ..ifMixin_elseKeyword = _getToken(node.elseKeyword)
+      ..ifMixin_ifKeyword = _getToken(node.ifKeyword)
+      ..ifMixin_leftParenthesis = _getToken(node.leftParenthesis)
+      ..ifMixin_rightParenthesis = _getToken(node.rightParenthesis);
+  }
+
+  void _storeInvocationExpression(
+      LinkedNodeBuilder builder, InvocationExpression node) {
+    _storeExpression(builder, node);
+    builder
+      ..invocationExpression_arguments = node.argumentList.accept(this)
+      ..invocationExpression_invokeType = _writeType(node.staticInvokeType)
+      ..invocationExpression_typeArguments = node.typeArguments?.accept(this);
+  }
+
+  void _storeIsSimpleBounded(LinkedNodeBuilder builder, AstNode node) {
+    var flag = LazyAst.isSimplyBounded(node);
+    // TODO(scheglov) Check for `null` when writing resolved AST.
+    builder.simplyBoundable_isSimplyBounded = flag;
+  }
+
+  void _storeNamedCompilationUnitMember(
+      LinkedNodeBuilder builder, NamedCompilationUnitMember node) {
+    _storeCompilationUnitMember(builder, node);
+    _storeCodeOffsetLength(builder, node);
+    builder..namedCompilationUnitMember_name = node.name.accept(this);
+  }
+
+  void _storeNamespaceDirective(
+      LinkedNodeBuilder builder, NamespaceDirective node) {
+    _storeUriBasedDirective(builder, node);
+    builder
+      ..namespaceDirective_combinators = _writeNodeList(node.combinators)
+      ..namespaceDirective_configurations = _writeNodeList(node.configurations)
+      ..namespaceDirective_selectedUri = LazyDirective.getSelectedUri(node)
+      ..directive_semicolon = _getToken(node.semicolon);
+  }
+
+  void _storeNormalFormalParameter(
+      LinkedNodeBuilder builder, NormalFormalParameter node) {
+    _storeFormalParameter(builder, node);
+    builder
+      ..normalFormalParameter_comment = node.documentationComment?.accept(this)
+      ..normalFormalParameter_covariantKeyword =
+          _getToken(node.covariantKeyword)
+      ..normalFormalParameter_identifier = node.identifier?.accept(this)
+      ..normalFormalParameter_metadata = _writeNodeList(node.metadata);
+  }
+
+  void _storeStatement(LinkedNodeBuilder builder, Statement node) {}
+
+  void _storeSwitchMember(LinkedNodeBuilder builder, SwitchMember node) {
+    builder.switchMember_colon = _getToken(node.colon);
+    builder.switchMember_keyword = _getToken(node.keyword);
+    builder.switchMember_labels = _writeNodeList(node.labels);
+    builder.switchMember_statements = _writeNodeList(node.statements);
+  }
+
+  void _storeTypeAlias(LinkedNodeBuilder builder, TypeAlias node) {
+    _storeNamedCompilationUnitMember(builder, node);
+    builder
+      ..typeAlias_semicolon = _getToken(node.semicolon)
+      ..typeAlias_typedefKeyword = _getToken(node.typedefKeyword);
+  }
+
+  void _storeTypedLiteral(LinkedNodeBuilder builder, TypedLiteral node) {
+    _storeExpression(builder, node);
+    builder
+      ..typedLiteral_constKeyword = _getToken(node.constKeyword)
+      ..typedLiteral_typeArguments = node.typeArguments?.accept(this);
+  }
+
+  void _storeUriBasedDirective(
+      LinkedNodeBuilder builder, UriBasedDirective node) {
+    _storeDirective(builder, node);
+    builder
+      ..uriBasedDirective_uri = node.uri.accept(this)
+      ..uriBasedDirective_uriContent = node.uriContent
+      ..uriBasedDirective_uriElement = _indexOfElement(node.uriElement);
+  }
+
+  void _writeActualReturnType(LinkedNodeBuilder builder, AstNode node) {
+    var type = LazyAst.getReturnType(node);
+    // TODO(scheglov) Check for `null` when writing resolved AST.
+    builder.actualReturnType = _writeType(type);
+  }
+
+  void _writeActualType(LinkedNodeBuilder builder, AstNode node) {
+    var type = LazyAst.getType(node);
+    // TODO(scheglov) Check for `null` when writing resolved AST.
+    builder.actualType = _writeType(type);
+  }
+
+  List<LinkedNodeBuilder> _writeNodeList(List<AstNode> nodeList) {
+    var result = List<LinkedNodeBuilder>.filled(
+      nodeList.length,
+      null,
+      growable: true,
+    );
+    for (var i = 0; i < nodeList.length; ++i) {
+      result[i] = nodeList[i].accept(this);
+    }
+    return result;
+  }
+
+  LinkedNodeTypeBuilder _writeType(DartType type) {
+    return _linkingContext.writeType(type);
+  }
+}
+
+/// Components of a [Member] - the raw element, and the defining type.
+class _ElementComponents {
+  final int rawElement;
+  final LinkedNodeType definingType;
+
+  _ElementComponents(this.rawElement, this.definingType);
+}
diff --git a/pkg/analyzer/lib/src/summary2/ast_resolver.dart b/pkg/analyzer/lib/src/summary2/ast_resolver.dart
new file mode 100644
index 0000000..a8a0d5a
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary2/ast_resolver.dart
@@ -0,0 +1,62 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/error/listener.dart';
+import 'package:analyzer/src/generated/resolver.dart';
+import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/summary2/link.dart';
+
+/// Used to resolve some AST nodes - variable initializers, and annotations.
+class AstResolver {
+  final Linker _linker;
+  final LibraryElement _library;
+  final Scope _nameScope;
+
+  AstResolver(this._linker, this._library, this._nameScope);
+
+  void resolve(
+    AstNode node, {
+    ClassElement enclosingClassElement,
+    ExecutableElement enclosingExecutableElement,
+    bool doAstRewrite = false,
+  }) {
+    var source = _FakeSource();
+    var errorListener = AnalysisErrorListener.NULL_LISTENER;
+
+    var typeResolverVisitor = new TypeResolverVisitor(
+        _library, source, _linker.typeProvider, errorListener,
+        nameScope: _nameScope);
+    node.accept(typeResolverVisitor);
+
+    if (doAstRewrite) {
+      var astRewriteVisitor = new AstRewriteVisitor(_linker.typeSystem,
+          _library, source, _linker.typeProvider, errorListener,
+          nameScope: _nameScope);
+      node.accept(astRewriteVisitor);
+    }
+
+//    expression.accept(_variableResolverVisitor);
+//    if (_linker.getAst != null) {
+//      expression.accept(_partialResolverVisitor);
+//    }
+
+    var resolverVisitor = new ResolverVisitor(_linker.inheritance, _library,
+        source, _linker.typeProvider, errorListener,
+        nameScope: _nameScope,
+        propagateTypes: false,
+        reportConstEvaluationErrors: false);
+    resolverVisitor.prepareEnclosingDeclarations(
+      enclosingClassElement: enclosingClassElement,
+      enclosingExecutableElement: enclosingExecutableElement,
+    );
+
+    node.accept(resolverVisitor);
+  }
+}
+
+class _FakeSource implements Source {
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+}
diff --git a/pkg/analyzer/lib/src/summary2/ast_text_printer.dart b/pkg/analyzer/lib/src/summary2/ast_text_printer.dart
new file mode 100644
index 0000000..eefebe8
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary2/ast_text_printer.dart
@@ -0,0 +1,1068 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer/dart/ast/visitor.dart';
+import 'package:analyzer/source/line_info.dart';
+
+/// AST visitor that prints tokens into their original positions.
+class AstTextPrinter extends ThrowingAstVisitor<void> {
+  final StringBuffer _buffer;
+  final LineInfo _lineInfo;
+
+  Token _last;
+  int _lastEnd = 0;
+  int _lastEndLine = 0;
+
+  AstTextPrinter(this._buffer, this._lineInfo);
+
+  @override
+  void visitAdjacentStrings(AdjacentStrings node) {
+    _nodeList(node.strings);
+  }
+
+  @override
+  void visitAnnotation(Annotation node) {
+    _token(node.atSign);
+    node.name.accept(this);
+    _token(node.period);
+    node.constructorName?.accept(this);
+    node.arguments?.accept(this);
+  }
+
+  @override
+  void visitArgumentList(ArgumentList node) {
+    _token(node.leftParenthesis);
+    _nodeList(node.arguments, node.rightParenthesis);
+    _token(node.rightParenthesis);
+  }
+
+  @override
+  void visitAsExpression(AsExpression node) {
+    node.expression.accept(this);
+    _token(node.asOperator);
+    node.type.accept(this);
+  }
+
+  @override
+  void visitAssertInitializer(AssertInitializer node) {
+    _token(node.assertKeyword);
+    _token(node.leftParenthesis);
+
+    node.condition.accept(this);
+    _tokenIfNot(node.condition.endToken.next, node.rightParenthesis);
+
+    node.message?.accept(this);
+    _tokenIfNot(node.message?.endToken?.next, node.rightParenthesis);
+
+    _token(node.rightParenthesis);
+  }
+
+  @override
+  void visitAssertStatement(AssertStatement node) {
+    _token(node.assertKeyword);
+    _token(node.leftParenthesis);
+
+    node.condition.accept(this);
+    _tokenIfNot(node.condition.endToken.next, node.rightParenthesis);
+
+    node.message?.accept(this);
+    _tokenIfNot(node.message?.endToken?.next, node.rightParenthesis);
+
+    _token(node.rightParenthesis);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitAssignmentExpression(AssignmentExpression node) {
+    node.leftHandSide.accept(this);
+    _token(node.operator);
+    node.rightHandSide.accept(this);
+  }
+
+  @override
+  void visitAwaitExpression(AwaitExpression node) {
+    _token(node.awaitKeyword);
+    node.expression.accept(this);
+  }
+
+  @override
+  void visitBinaryExpression(BinaryExpression node) {
+    node.leftOperand.accept(this);
+    _token(node.operator);
+    node.rightOperand.accept(this);
+  }
+
+  @override
+  void visitBlock(Block node) {
+    _token(node.leftBracket);
+    _nodeList(node.statements);
+    _token(node.rightBracket);
+  }
+
+  @override
+  void visitBlockFunctionBody(BlockFunctionBody node) {
+    _functionBody(node);
+    node.block.accept(this);
+  }
+
+  @override
+  void visitBooleanLiteral(BooleanLiteral node) {
+    _token(node.literal);
+  }
+
+  @override
+  void visitBreakStatement(BreakStatement node) {
+    _token(node.breakKeyword);
+    node.label?.accept(this);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitCascadeExpression(CascadeExpression node) {
+    node.target.accept(this);
+    _nodeList(node.cascadeSections);
+  }
+
+  @override
+  void visitCatchClause(CatchClause node) {
+    _token(node.onKeyword);
+    node.exceptionType?.accept(this);
+    _token(node.catchKeyword);
+    _token(node.leftParenthesis);
+    node.exceptionParameter?.accept(this);
+    _token(node.comma);
+    node.stackTraceParameter?.accept(this);
+    _token(node.rightParenthesis);
+    node.body.accept(this);
+  }
+
+  @override
+  void visitClassDeclaration(ClassDeclaration node) {
+    _compilationUnitMember(node);
+    _token(node.abstractKeyword);
+    _token(node.classKeyword);
+    node.name.accept(this);
+    node.typeParameters?.accept(this);
+    node.extendsClause?.accept(this);
+    node.withClause?.accept(this);
+    node.implementsClause?.accept(this);
+    node.nativeClause?.accept(this);
+    _token(node.leftBracket);
+    node.members.accept(this);
+    _token(node.rightBracket);
+  }
+
+  @override
+  void visitClassTypeAlias(ClassTypeAlias node) {
+    _compilationUnitMember(node);
+    _token(node.abstractKeyword);
+    _token(node.typedefKeyword);
+    node.name.accept(this);
+    node.typeParameters?.accept(this);
+    _token(node.equals);
+    node.superclass?.accept(this);
+    node.withClause.accept(this);
+    node.implementsClause?.accept(this);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitComment(Comment node) {}
+
+  @override
+  void visitCompilationUnit(CompilationUnit node) {
+    node.scriptTag?.accept(this);
+    node.directives.accept(this);
+    node.declarations.accept(this);
+    _token(node.endToken);
+  }
+
+  @override
+  void visitConditionalExpression(ConditionalExpression node) {
+    node.condition.accept(this);
+    _token(node.question);
+    node.thenExpression.accept(this);
+    _token(node.colon);
+    node.elseExpression.accept(this);
+  }
+
+  @override
+  void visitConfiguration(Configuration node) {
+    _token(node.ifKeyword);
+    _token(node.leftParenthesis);
+    node.name.accept(this);
+    _token(node.equalToken);
+    node.value?.accept(this);
+    _token(node.rightParenthesis);
+    node.uri.accept(this);
+  }
+
+  @override
+  void visitConstructorDeclaration(ConstructorDeclaration node) {
+    _classMember(node);
+    _token(node.externalKeyword);
+    _token(node.constKeyword);
+    _token(node.factoryKeyword);
+    node.returnType?.accept(this);
+    _token(node.period);
+    node.name?.accept(this);
+    node.parameters.accept(this);
+    _token(node.separator);
+    _nodeList(node.initializers, node.body.beginToken);
+    node.redirectedConstructor?.accept(this);
+    node.body.accept(this);
+  }
+
+  @override
+  void visitConstructorFieldInitializer(ConstructorFieldInitializer node) {
+    _token(node.thisKeyword);
+    _token(node.period);
+    node.fieldName.accept(this);
+    _token(node.equals);
+    node.expression.accept(this);
+  }
+
+  @override
+  void visitConstructorName(ConstructorName node) {
+    node.type.accept(this);
+    _token(node.period);
+    node.name?.accept(this);
+  }
+
+  @override
+  void visitContinueStatement(ContinueStatement node) {
+    _token(node.continueKeyword);
+    node.label?.accept(this);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitDeclaredIdentifier(DeclaredIdentifier node) {
+    _declaration(node);
+    _token(node.keyword);
+    node.type?.accept(this);
+    node.identifier.accept(this);
+  }
+
+  @override
+  void visitDefaultFormalParameter(DefaultFormalParameter node) {
+    node.parameter.accept(this);
+    _token(node.separator);
+    node.defaultValue?.accept(this);
+  }
+
+  @override
+  void visitDoStatement(DoStatement node) {
+    _token(node.doKeyword);
+    node.body.accept(this);
+    _token(node.whileKeyword);
+    _token(node.leftParenthesis);
+    node.condition.accept(this);
+    _token(node.rightParenthesis);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitDottedName(DottedName node) {
+    _nodeList(node.components, node.endToken.next);
+  }
+
+  @override
+  void visitDoubleLiteral(DoubleLiteral node) {
+    _token(node.literal);
+  }
+
+  @override
+  void visitEmptyFunctionBody(EmptyFunctionBody node) {
+    _functionBody(node);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitEmptyStatement(EmptyStatement node) {
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitEnumConstantDeclaration(EnumConstantDeclaration node) {
+    _declaration(node);
+    node.name.accept(this);
+  }
+
+  @override
+  void visitEnumDeclaration(EnumDeclaration node) {
+    _compilationUnitMember(node);
+    _token(node.enumKeyword);
+    node.name.accept(this);
+    _token(node.leftBracket);
+    _nodeList(node.constants, node.rightBracket);
+    _token(node.rightBracket);
+  }
+
+  @override
+  void visitExportDirective(ExportDirective node) {
+    _directive(node);
+    _token(node.keyword);
+    node.uri.accept(this);
+    node.configurations?.accept(this);
+    _nodeList(node.combinators);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitExpressionFunctionBody(ExpressionFunctionBody node) {
+    _functionBody(node);
+    _token(node.functionDefinition);
+    node.expression.accept(this);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitExpressionStatement(ExpressionStatement node) {
+    node.expression.accept(this);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitExtendsClause(ExtendsClause node) {
+    _token(node.extendsKeyword);
+    node.superclass.accept(this);
+  }
+
+  @override
+  void visitFieldDeclaration(FieldDeclaration node) {
+    _classMember(node);
+    _token(node.staticKeyword);
+    _token(node.covariantKeyword);
+    node.fields.accept(this);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitFieldFormalParameter(FieldFormalParameter node) {
+    _normalFormalParameter(node);
+    _token(node.keyword);
+    node.type?.accept(this);
+    _token(node.thisKeyword);
+    _token(node.period);
+    node.identifier.accept(this);
+    node.typeParameters?.accept(this);
+    node.parameters?.accept(this);
+  }
+
+  @override
+  void visitForEachPartsWithDeclaration(ForEachPartsWithDeclaration node) {
+    node.loopVariable.accept(this);
+    _token(node.inKeyword);
+    node.iterable.accept(this);
+  }
+
+  @override
+  void visitForEachPartsWithIdentifier(ForEachPartsWithIdentifier node) {
+    node.identifier.accept(this);
+    _token(node.inKeyword);
+    node.iterable.accept(this);
+  }
+
+  @override
+  void visitForElement(ForElement node) {
+    _token(node.forKeyword);
+    _token(node.leftParenthesis);
+    node.forLoopParts.accept(this);
+    _token(node.rightParenthesis);
+    node.body.accept(this);
+  }
+
+  @override
+  void visitFormalParameterList(FormalParameterList node) {
+    _token(node.leftParenthesis);
+
+    var parameters = node.parameters;
+    for (var i = 0; i < parameters.length; ++i) {
+      var parameter = parameters[i];
+      if (node.leftDelimiter?.next == parameter.beginToken) {
+        _token(node.leftDelimiter);
+      }
+
+      parameter.accept(this);
+
+      var itemSeparator = parameter.endToken.next;
+      if (itemSeparator != node.rightParenthesis) {
+        _token(itemSeparator);
+        itemSeparator = itemSeparator.next;
+      }
+
+      if (itemSeparator == node.rightDelimiter) {
+        _token(node.rightDelimiter);
+      }
+    }
+
+    _token(node.rightParenthesis);
+  }
+
+  @override
+  void visitForPartsWithDeclarations(ForPartsWithDeclarations node) {
+    node.variables.accept(this);
+    _token(node.leftSeparator);
+    node.condition?.accept(this);
+    _token(node.rightSeparator);
+    _nodeList(node.updaters, node.endToken.next);
+  }
+
+  @override
+  void visitForPartsWithExpression(ForPartsWithExpression node) {
+    node.initialization?.accept(this);
+    _token(node.leftSeparator);
+    node.condition?.accept(this);
+    _token(node.rightSeparator);
+    _nodeList(node.updaters, node.updaters.endToken?.next);
+  }
+
+  @override
+  void visitForStatement(ForStatement node) {
+    _token(node.awaitKeyword);
+    _token(node.forKeyword);
+    _token(node.leftParenthesis);
+    node.forLoopParts.accept(this);
+    _token(node.rightParenthesis);
+    node.body.accept(this);
+  }
+
+  @override
+  void visitFunctionDeclaration(FunctionDeclaration node) {
+    _compilationUnitMember(node);
+    _token(node.externalKeyword);
+    node.returnType?.accept(this);
+    _token(node.propertyKeyword);
+    node.name.accept(this);
+    node.functionExpression.accept(this);
+  }
+
+  @override
+  void visitFunctionDeclarationStatement(FunctionDeclarationStatement node) {
+    node.functionDeclaration.accept(this);
+  }
+
+  @override
+  void visitFunctionExpression(FunctionExpression node) {
+    node.typeParameters?.accept(this);
+    node.parameters?.accept(this);
+    node.body.accept(this);
+  }
+
+  @override
+  void visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
+    node.function.accept(this);
+    node.typeArguments?.accept(this);
+    node.argumentList.accept(this);
+  }
+
+  @override
+  void visitFunctionTypeAlias(FunctionTypeAlias node) {
+    _compilationUnitMember(node);
+    _token(node.typedefKeyword);
+    node.returnType?.accept(this);
+    node.name.accept(this);
+    node.typeParameters?.accept(this);
+    node.parameters.accept(this);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
+    _normalFormalParameter(node);
+    node.returnType?.accept(this);
+    node.identifier.accept(this);
+    node.typeParameters?.accept(this);
+    node.parameters.accept(this);
+  }
+
+  @override
+  void visitGenericFunctionType(GenericFunctionType node) {
+    node.returnType?.accept(this);
+    _token(node.functionKeyword);
+    node.typeParameters?.accept(this);
+    node.parameters.accept(this);
+  }
+
+  @override
+  void visitGenericTypeAlias(GenericTypeAlias node) {
+    _compilationUnitMember(node);
+    _token(node.typedefKeyword);
+    node.name.accept(this);
+    node.typeParameters?.accept(this);
+    _token(node.equals);
+    node.functionType.accept(this);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitHideCombinator(HideCombinator node) {
+    _token(node.keyword);
+    _nodeList(node.hiddenNames, node.endToken.next);
+  }
+
+  @override
+  void visitIfElement(IfElement node) {
+    _token(node.ifKeyword);
+    _token(node.leftParenthesis);
+    node.condition.accept(this);
+    _token(node.rightParenthesis);
+    node.thenElement.accept(this);
+    _token(node.elseKeyword);
+    node.elseElement?.accept(this);
+  }
+
+  @override
+  void visitIfStatement(IfStatement node) {
+    _token(node.ifKeyword);
+    _token(node.leftParenthesis);
+    node.condition.accept(this);
+    _token(node.rightParenthesis);
+    node.thenStatement.accept(this);
+    _token(node.elseKeyword);
+    node.elseStatement?.accept(this);
+  }
+
+  @override
+  void visitImplementsClause(ImplementsClause node) {
+    _token(node.implementsKeyword);
+    _nodeList(node.interfaces, node.endToken.next);
+  }
+
+  @override
+  void visitImportDirective(ImportDirective node) {
+    _directive(node);
+    _token(node.keyword);
+    node.uri.accept(this);
+    node.configurations?.accept(this);
+    _token(node.deferredKeyword);
+    _token(node.asKeyword);
+    node.prefix?.accept(this);
+    _nodeList(node.combinators);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitIndexExpression(IndexExpression node) {
+    node.target?.accept(this);
+    _token(node.period);
+    _token(node.leftBracket);
+    node.index.accept(this);
+    _token(node.rightBracket);
+  }
+
+  @override
+  void visitInstanceCreationExpression(InstanceCreationExpression node) {
+    _token(node.keyword);
+    node.constructorName.accept(this);
+    node.argumentList.accept(this);
+  }
+
+  @override
+  void visitIntegerLiteral(IntegerLiteral node) {
+    _token(node.literal);
+  }
+
+  @override
+  void visitInterpolationExpression(InterpolationExpression node) {
+    _token(node.leftBracket);
+    node.expression.accept(this);
+    _token(node.rightBracket);
+  }
+
+  @override
+  void visitInterpolationString(InterpolationString node) {
+    _token(node.contents);
+  }
+
+  @override
+  void visitIsExpression(IsExpression node) {
+    node.expression.accept(this);
+    _token(node.isOperator);
+    _token(node.notOperator);
+    node.type.accept(this);
+  }
+
+  @override
+  void visitLabel(Label node) {
+    node.label.accept(this);
+    _token(node.colon);
+  }
+
+  @override
+  void visitLabeledStatement(LabeledStatement node) {
+    _nodeList(node.labels);
+    node.statement.accept(this);
+  }
+
+  @override
+  void visitLibraryDirective(LibraryDirective node) {
+    _directive(node);
+    _token(node.libraryKeyword);
+    node.name.accept(this);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitLibraryIdentifier(LibraryIdentifier node) {
+    _nodeList(node.components, node.endToken.next);
+  }
+
+  @override
+  void visitListLiteral(ListLiteral node) {
+    _typedLiteral(node);
+    _token(node.leftBracket);
+    _nodeList(node.elements, node.rightBracket);
+    _token(node.rightBracket);
+  }
+
+  @override
+  void visitMapLiteralEntry(MapLiteralEntry node) {
+    node.key.accept(this);
+    _token(node.separator);
+    node.value.accept(this);
+  }
+
+  @override
+  void visitMethodDeclaration(MethodDeclaration node) {
+    _classMember(node);
+    _token(node.externalKeyword);
+    _token(node.modifierKeyword);
+    node.returnType?.accept(this);
+    _token(node.propertyKeyword);
+    _token(node.operatorKeyword);
+    node.name.accept(this);
+    node.typeParameters?.accept(this);
+    node.parameters?.accept(this);
+    node.body?.accept(this);
+  }
+
+  @override
+  void visitMethodInvocation(MethodInvocation node) {
+    node.target?.accept(this);
+    _token(node.operator);
+    node.methodName.accept(this);
+    node.typeArguments?.accept(this);
+    node.argumentList.accept(this);
+  }
+
+  @override
+  void visitMixinDeclaration(MixinDeclaration node) {
+    _compilationUnitMember(node);
+    _token(node.mixinKeyword);
+    node.name.accept(this);
+    node.typeParameters?.accept(this);
+    node.onClause?.accept(this);
+    node.implementsClause?.accept(this);
+    _token(node.leftBracket);
+    node.members.accept(this);
+    _token(node.rightBracket);
+  }
+
+  @override
+  void visitNamedExpression(NamedExpression node) {
+    node.name.accept(this);
+    node.expression.accept(this);
+  }
+
+  @override
+  void visitNativeClause(NativeClause node) {
+    _token(node.nativeKeyword);
+    node.name.accept(this);
+  }
+
+  @override
+  void visitNativeFunctionBody(NativeFunctionBody node) {
+    _token(node.nativeKeyword);
+    node.stringLiteral?.accept(this);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitNullLiteral(NullLiteral node) {
+    _token(node.literal);
+  }
+
+  @override
+  void visitOnClause(OnClause node) {
+    _token(node.onKeyword);
+    _nodeList(node.superclassConstraints, node.endToken.next);
+  }
+
+  @override
+  void visitParenthesizedExpression(ParenthesizedExpression node) {
+    _token(node.leftParenthesis);
+    node.expression.accept(this);
+    _token(node.rightParenthesis);
+  }
+
+  @override
+  void visitPartDirective(PartDirective node) {
+    _directive(node);
+    _token(node.partKeyword);
+    node.uri.accept(this);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitPartOfDirective(PartOfDirective node) {
+    _directive(node);
+    _token(node.partKeyword);
+    _token(node.ofKeyword);
+    node.uri?.accept(this);
+    node.libraryName?.accept(this);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitPostfixExpression(PostfixExpression node) {
+    node.operand.accept(this);
+    _token(node.operator);
+  }
+
+  @override
+  void visitPrefixedIdentifier(PrefixedIdentifier node) {
+    node.prefix.accept(this);
+    _token(node.period);
+    node.identifier.accept(this);
+  }
+
+  @override
+  void visitPrefixExpression(PrefixExpression node) {
+    _token(node.operator);
+    node.operand.accept(this);
+  }
+
+  @override
+  void visitPropertyAccess(PropertyAccess node) {
+    node.target?.accept(this);
+    _token(node.operator);
+    node.propertyName.accept(this);
+  }
+
+  @override
+  void visitRedirectingConstructorInvocation(
+      RedirectingConstructorInvocation node) {
+    _token(node.thisKeyword);
+    _token(node.period);
+    node.constructorName?.accept(this);
+    node.argumentList.accept(this);
+  }
+
+  @override
+  void visitRethrowExpression(RethrowExpression node) {
+    _token(node.rethrowKeyword);
+  }
+
+  @override
+  void visitReturnStatement(ReturnStatement node) {
+    _token(node.returnKeyword);
+    node.expression?.accept(this);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitScriptTag(ScriptTag node) {
+    _token(node.scriptTag);
+  }
+
+  @override
+  void visitSetOrMapLiteral(SetOrMapLiteral node) {
+    _typedLiteral(node);
+    _token(node.leftBracket);
+    _nodeList(node.elements, node.rightBracket);
+    _token(node.rightBracket);
+  }
+
+  @override
+  void visitShowCombinator(ShowCombinator node) {
+    _token(node.keyword);
+    _nodeList(node.shownNames, node.endToken.next);
+  }
+
+  @override
+  void visitSimpleFormalParameter(SimpleFormalParameter node) {
+    _normalFormalParameter(node);
+    _token(node.keyword);
+    node.type?.accept(this);
+    node.identifier?.accept(this);
+  }
+
+  @override
+  void visitSimpleIdentifier(SimpleIdentifier node) {
+    _token(node.token);
+  }
+
+  @override
+  void visitSimpleStringLiteral(SimpleStringLiteral node) {
+    _token(node.literal);
+  }
+
+  @override
+  void visitSpreadElement(SpreadElement node) {
+    _token(node.spreadOperator);
+    node.expression.accept(this);
+  }
+
+  @override
+  void visitStringInterpolation(StringInterpolation node) {
+    _nodeList(node.elements);
+  }
+
+  @override
+  void visitSuperConstructorInvocation(SuperConstructorInvocation node) {
+    _token(node.superKeyword);
+    _token(node.period);
+    node.constructorName?.accept(this);
+    node.argumentList.accept(this);
+  }
+
+  @override
+  void visitSuperExpression(SuperExpression node) {
+    _token(node.superKeyword);
+  }
+
+  @override
+  void visitSwitchCase(SwitchCase node) {
+    _nodeList(node.labels);
+    _token(node.keyword);
+    node.expression.accept(this);
+    _token(node.colon);
+    _nodeList(node.statements);
+  }
+
+  @override
+  void visitSwitchDefault(SwitchDefault node) {
+    _nodeList(node.labels);
+    _token(node.keyword);
+    _token(node.colon);
+    _nodeList(node.statements);
+  }
+
+  @override
+  void visitSwitchStatement(SwitchStatement node) {
+    _token(node.switchKeyword);
+    _token(node.leftParenthesis);
+    node.expression.accept(this);
+    _token(node.rightParenthesis);
+    _token(node.leftBracket);
+    _nodeList(node.members);
+    _token(node.rightBracket);
+  }
+
+  @override
+  void visitSymbolLiteral(SymbolLiteral node) {
+    _token(node.poundSign);
+    var components = node.components;
+    for (var i = 0; i < components.length; ++i) {
+      var component = components[i];
+      _token(component);
+      if (i != components.length - 1) {
+        _token(component.next);
+      }
+    }
+  }
+
+  @override
+  void visitThisExpression(ThisExpression node) {
+    _token(node.thisKeyword);
+  }
+
+  @override
+  void visitThrowExpression(ThrowExpression node) {
+    _token(node.throwKeyword);
+    node.expression.accept(this);
+  }
+
+  @override
+  void visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
+    _compilationUnitMember(node);
+    node.variables.accept(this);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitTryStatement(TryStatement node) {
+    _token(node.tryKeyword);
+    node.body.accept(this);
+    _nodeList(node.catchClauses);
+    _token(node.finallyKeyword);
+    node.finallyBlock?.accept(this);
+  }
+
+  @override
+  void visitTypeArgumentList(TypeArgumentList node) {
+    _token(node.leftBracket);
+    _nodeList(node.arguments, node.rightBracket);
+    _token(node.rightBracket);
+  }
+
+  @override
+  void visitTypeName(TypeName node) {
+    node.name.accept(this);
+    node.typeArguments?.accept(this);
+  }
+
+  @override
+  void visitTypeParameter(TypeParameter node) {
+    _declaration(node);
+    node.name?.accept(this);
+    _token(node.extendsKeyword);
+    node.bound?.accept(this);
+  }
+
+  @override
+  void visitTypeParameterList(TypeParameterList node) {
+    _token(node.leftBracket);
+    _nodeList(node.typeParameters, node.rightBracket);
+    _token(node.rightBracket);
+  }
+
+  @override
+  void visitVariableDeclaration(VariableDeclaration node) {
+    _annotatedNode(node);
+    node.name.accept(this);
+    _token(node.equals);
+    node.initializer?.accept(this);
+  }
+
+  @override
+  void visitVariableDeclarationList(VariableDeclarationList node) {
+    _annotatedNode(node);
+    _token(node.keyword);
+    node.type?.accept(this);
+    _nodeList(node.variables, node.endToken.next);
+  }
+
+  @override
+  void visitVariableDeclarationStatement(VariableDeclarationStatement node) {
+    node.variables.accept(this);
+    _token(node.semicolon);
+  }
+
+  @override
+  void visitWhileStatement(WhileStatement node) {
+    _token(node.whileKeyword);
+    _token(node.leftParenthesis);
+    node.condition.accept(this);
+    _token(node.rightParenthesis);
+    node.body.accept(this);
+  }
+
+  @override
+  void visitWithClause(WithClause node) {
+    _token(node.withKeyword);
+    _nodeList(node.mixinTypes, node.endToken.next);
+  }
+
+  @override
+  void visitYieldStatement(YieldStatement node) {
+    _token(node.yieldKeyword);
+    _token(node.star);
+    node.expression.accept(this);
+    _token(node.semicolon);
+  }
+
+  void _annotatedNode(AnnotatedNode node) {
+    node.documentationComment?.accept(this);
+    _nodeList(node.metadata);
+  }
+
+  void _classMember(ClassMember node) {
+    _declaration(node);
+  }
+
+  void _compilationUnitMember(CompilationUnitMember node) {
+    _declaration(node);
+  }
+
+  void _declaration(Declaration node) {
+    _annotatedNode(node);
+  }
+
+  void _directive(Directive node) {
+    _annotatedNode(node);
+  }
+
+  void _functionBody(FunctionBody node) {
+    _token(node.keyword);
+    _token(node.star);
+  }
+
+  /// Print nodes from the [nodeList].
+  ///
+  /// If the [endToken] is not `null`, print one token after every node,
+  /// unless it is the [endToken].
+  void _nodeList(List<AstNode> nodeList, [Token endToken]) {
+    var length = nodeList.length;
+    for (var i = 0; i < length; ++i) {
+      var node = nodeList[i];
+      node.accept(this);
+      if (endToken != null && node.endToken.next != endToken) {
+        _token(node.endToken.next);
+      }
+    }
+  }
+
+  void _normalFormalParameter(NormalFormalParameter node) {
+    node.documentationComment?.accept(this);
+    _nodeList(node.metadata);
+    _token(node.covariantKeyword);
+  }
+
+  void _token(Token token) {
+    if (token == null) return;
+
+    if (_last != null) {
+      if (_last.next != token) {
+        throw StateError(
+          '|$_last| must be followed by |${_last.next}|, got |$token|',
+        );
+      }
+    }
+
+    // Print preceding comments as a separate sequence of tokens.
+    if (token.precedingComments != null) {
+      var lastToken = _last;
+      _last = null;
+      for (var c = token.precedingComments; c != null; c = c.next) {
+        _token(c);
+      }
+      _last = lastToken;
+    }
+
+    for (var offset = _lastEnd; offset < token.offset; offset++) {
+      var offsetLocation = _lineInfo.getLocation(offset + 1);
+      var offsetLine = offsetLocation.lineNumber - 1;
+      if (offsetLine == _lastEndLine) {
+        _buffer.write(' ');
+      } else {
+        _buffer.write('\n');
+        _lastEndLine++;
+      }
+    }
+
+    _buffer.write(token.lexeme);
+
+    _last = token;
+    _lastEnd = token.end;
+
+    var endLocation = _lineInfo.getLocation(token.end);
+    _lastEndLine = endLocation.lineNumber - 1;
+  }
+
+  void _tokenIfNot(Token maybe, Token ifNot) {
+    if (maybe == null) return;
+    if (maybe == ifNot) return;
+    _token(maybe);
+  }
+
+  _typedLiteral(TypedLiteral node) {
+    _token(node.constKeyword);
+    node.typeArguments?.accept(this);
+  }
+}
diff --git a/pkg/analyzer/lib/src/summary2/builder/source_library_builder.dart b/pkg/analyzer/lib/src/summary2/builder/source_library_builder.dart
new file mode 100644
index 0000000..dab6481
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary2/builder/source_library_builder.dart
@@ -0,0 +1,406 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/ast/ast.dart' as ast;
+import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/dart/resolver/scope.dart' show LibraryScope;
+import 'package:analyzer/src/generated/utilities_dart.dart';
+import 'package:analyzer/src/summary/format.dart';
+import 'package:analyzer/src/summary/idl.dart';
+import 'package:analyzer/src/summary2/combinator.dart';
+import 'package:analyzer/src/summary2/constructor_initializer_resolver.dart';
+import 'package:analyzer/src/summary2/default_value_resolver.dart';
+import 'package:analyzer/src/summary2/export.dart';
+import 'package:analyzer/src/summary2/lazy_ast.dart';
+import 'package:analyzer/src/summary2/link.dart';
+import 'package:analyzer/src/summary2/linked_bundle_context.dart';
+import 'package:analyzer/src/summary2/linked_unit_context.dart';
+import 'package:analyzer/src/summary2/metadata_resolver.dart';
+import 'package:analyzer/src/summary2/reference.dart';
+import 'package:analyzer/src/summary2/reference_resolver.dart';
+import 'package:analyzer/src/summary2/scope.dart';
+
+class SourceLibraryBuilder {
+  final Linker linker;
+  final Uri uri;
+  final Reference reference;
+  final LinkedNodeLibraryBuilder node;
+
+  LinkedLibraryContext context;
+
+  LibraryElementImpl element;
+  LibraryScope libraryScope;
+
+  /// Local declarations.
+  final Scope localScope = Scope.top();
+
+  /// The export scope of the library.
+  final Scope exportScope = Scope.top();
+
+  final List<Export> exporters = [];
+
+  SourceLibraryBuilder(this.linker, this.uri, this.reference, this.node);
+
+  void addExporters() {
+    var unitContext = context.units[0];
+    for (var directive in unitContext.unit_withDirectives.directives) {
+      if (directive is ast.ExportDirective) {
+        Uri uri;
+        try {
+          uri = _selectAbsoluteUri(directive);
+          if (uri == null) continue;
+        } on FormatException {
+          continue;
+        }
+
+        var combinators = directive.combinators.map((node) {
+          if (node is ast.ShowCombinator) {
+            var nameList = node.shownNames.map((i) => i.name).toList();
+            return Combinator.show(nameList);
+          } else if (node is ast.HideCombinator) {
+            var nameList = node.hiddenNames.map((i) => i.name).toList();
+            return Combinator.hide(nameList);
+          }
+        }).toList();
+
+        var exported = linker.builders[uri];
+        var export = Export(this, exported, combinators);
+        if (exported != null) {
+          exported.exporters.add(export);
+        } else {
+          var references = linker.elementFactory.exportsOfLibrary('$uri');
+          for (var reference in references) {
+            export.addToExportScope(reference.name, reference);
+          }
+        }
+      }
+    }
+  }
+
+  /// Add top-level declaration of the library units to the local scope.
+  void addLocalDeclarations() {
+    for (var unitContext in context.units) {
+      var unitRef = reference.getChild('@unit').getChild(unitContext.uriStr);
+      var classRef = unitRef.getChild('@class');
+      var enumRef = unitRef.getChild('@enum');
+      var functionRef = unitRef.getChild('@function');
+      var typeAliasRef = unitRef.getChild('@typeAlias');
+      var getterRef = unitRef.getChild('@getter');
+      var setterRef = unitRef.getChild('@setter');
+      var variableRef = unitRef.getChild('@variable');
+      for (var node in unitContext.unit.declarations) {
+        if (node is ast.ClassDeclaration) {
+          var name = node.name.name;
+          var reference = classRef.getChild(name);
+          reference.node2 = node;
+          localScope.declare(name, reference);
+        } else if (node is ast.ClassTypeAlias) {
+          var name = node.name.name;
+          var reference = classRef.getChild(name);
+          reference.node2 = node;
+          localScope.declare(name, reference);
+        } else if (node is ast.EnumDeclaration) {
+          var name = node.name.name;
+          var reference = enumRef.getChild(name);
+          reference.node2 = node;
+          localScope.declare(name, reference);
+        } else if (node is ast.FunctionDeclaration) {
+          var name = node.name.name;
+
+          Reference containerRef;
+          if (node.isGetter) {
+            containerRef = getterRef;
+          } else if (node.isSetter) {
+            containerRef = setterRef;
+          } else {
+            containerRef = functionRef;
+          }
+
+          var reference = containerRef.getChild(name);
+          reference.node2 = node;
+          localScope.declare(name, reference);
+        } else if (node is ast.FunctionTypeAlias) {
+          var name = node.name.name;
+          var reference = typeAliasRef.getChild(name);
+          reference.node2 = node;
+
+          localScope.declare(name, reference);
+        } else if (node is ast.GenericTypeAlias) {
+          var name = node.name.name;
+          var reference = typeAliasRef.getChild(name);
+          reference.node2 = node;
+
+          localScope.declare(name, reference);
+        } else if (node is ast.MixinDeclaration) {
+          var name = node.name.name;
+          var reference = classRef.getChild(name);
+          reference.node2 = node;
+          localScope.declare(name, reference);
+        } else if (node is ast.TopLevelVariableDeclaration) {
+          for (var variable in node.variables.variables) {
+            var name = variable.name.name;
+
+            var reference = variableRef.getChild(name);
+            reference.node2 = node;
+
+            var getter = getterRef.getChild(name);
+            localScope.declare(name, getter);
+
+            if (!variable.isConst && !variable.isFinal) {
+              var setter = setterRef.getChild(name);
+              localScope.declare('$name=', setter);
+            }
+          }
+        } else {
+          // TODO(scheglov) implement
+          throw UnimplementedError('${node.runtimeType}');
+        }
+      }
+    }
+//    for (var unit in units) {
+//      var unitRef = reference.getChild('@unit').getChild('${unit.uri}');
+//      var classRef = unitRef.getChild('@class');
+//      var enumRef = unitRef.getChild('@enum');
+//      var functionRef = unitRef.getChild('@function');
+//      var typeAliasRef = unitRef.getChild('@typeAlias');
+//      var getterRef = unitRef.getChild('@getter');
+//      var setterRef = unitRef.getChild('@setter');
+//      var variableRef = unitRef.getChild('@variable');
+//      for (var node in unit.node.compilationUnit_declarations) {
+//        if (node.kind == LinkedNodeKind.classDeclaration ||
+//            node.kind == LinkedNodeKind.classTypeAlias ||
+//            node.kind == LinkedNodeKind.mixinDeclaration) {
+//          var name = unit.context.getUnitMemberName(node);
+//          var reference = classRef.getChild(name);
+//          reference.node = node;
+//          scope.declare(name, reference);
+//        } else if (node.kind == LinkedNodeKind.enumDeclaration) {
+//          var name = unit.context.getUnitMemberName(node);
+//          var reference = enumRef.getChild(name);
+//          reference.node = node;
+//          scope.declare(name, reference);
+//        } else if (node.kind == LinkedNodeKind.functionDeclaration) {
+//          var name = unit.context.getUnitMemberName(node);
+//
+//          Reference containerRef;
+//          if (unit.context.isGetterFunction(node)) {
+//            containerRef = getterRef;
+//          } else if (unit.context.isSetterFunction(node)) {
+//            containerRef = setterRef;
+//          } else {
+//            containerRef = functionRef;
+//          }
+//
+//          var reference = containerRef.getChild(name);
+//          reference.node = node;
+//
+//          scope.declare(name, reference);
+//        } else if (node.kind == LinkedNodeKind.functionTypeAlias) {
+//          var name = unit.context.getUnitMemberName(node);
+//          var reference = typeAliasRef.getChild(name);
+//          reference.node = node;
+//
+//          scope.declare(name, reference);
+//        } else if (node.kind == LinkedNodeKind.genericTypeAlias) {
+//          var name = unit.context.getUnitMemberName(node);
+//          var reference = typeAliasRef.getChild(name);
+//          reference.node = node;
+//
+//          scope.declare(name, reference);
+//        } else if (node.kind == LinkedNodeKind.topLevelVariableDeclaration) {
+//          var variableList = node.topLevelVariableDeclaration_variableList;
+//          for (var variable in variableList.variableDeclarationList_variables) {
+//            var name = unit.context.getVariableName(variable);
+//
+//            var reference = variableRef.getChild(name);
+//            reference.node = node;
+//
+//            var getter = getterRef.getChild(name);
+//            scope.declare(name, getter);
+//
+//            if (!unit.context.isConst(variable) &&
+//                !unit.context.isFinal(variable)) {
+//              var setter = setterRef.getChild(name);
+//              scope.declare('$name=', setter);
+//            }
+//          }
+//        } else {
+//          // TODO(scheglov) implement
+//          throw UnimplementedError('${node.kind}');
+//        }
+//      }
+//    }
+    if ('$uri' == 'dart:core') {
+      localScope.declare('dynamic', reference.getChild('dynamic'));
+    }
+  }
+
+  void addSyntheticConstructors() {
+    for (var reference in localScope.map.values) {
+      var node = reference.node;
+      if (node == null) continue;
+      if (node.kind != LinkedNodeKind.classDeclaration) continue;
+
+      // Skip the class if it already has a constructor.
+      if (node.classOrMixinDeclaration_members
+          .any((n) => n.kind == LinkedNodeKind.constructorDeclaration)) {
+        continue;
+      }
+
+      node.classOrMixinDeclaration_members.add(
+        LinkedNodeBuilder.constructorDeclaration(
+          constructorDeclaration_parameters:
+              LinkedNodeBuilder.formalParameterList(),
+          constructorDeclaration_body: LinkedNodeBuilder.emptyFunctionBody(),
+        )..isSynthetic = true,
+      );
+    }
+  }
+
+  /// Return `true` if the export scope was modified.
+  bool addToExportScope(String name, Reference reference) {
+    if (name.startsWith('_')) return false;
+    if (reference.isPrefix) return false;
+
+    var existing = exportScope.map[name];
+    if (existing == reference) return false;
+
+    // Ambiguous declaration detected.
+    if (existing != null) return false;
+
+    exportScope.map[name] = reference;
+    return true;
+  }
+
+  void buildElement() {
+    element = linker.elementFactory.libraryOfUri('$uri');
+    libraryScope = LibraryScope(element);
+  }
+
+  void buildInitialExportScope() {
+    localScope.forEach((name, reference) {
+      addToExportScope(name, reference);
+    });
+  }
+
+  void resolveConstructors() {
+    ConstructorInitializerResolver(linker, element).resolve();
+  }
+
+  void resolveDefaultValues() {
+    DefaultValueResolver(linker, element).resolve();
+  }
+
+  void resolveMetadata() {
+    var metadataResolver = MetadataResolver(linker, element);
+    for (var unitContext in context.units) {
+      unitContext.unit.accept(metadataResolver);
+    }
+  }
+
+  void resolveTypes(List<ast.AstNode> nodesToBuildType) {
+    for (var unitContext in context.units) {
+      var unitRef = reference.getChild('@unit');
+      var unitReference = unitRef.getChild(unitContext.uriStr);
+      var resolver = ReferenceResolver(
+        linker.linkingBundleContext,
+        nodesToBuildType,
+        linker.elementFactory,
+        element,
+        unitReference,
+        libraryScope,
+      );
+      unitContext.unit.accept(resolver);
+    }
+  }
+
+  void resolveUriDirectives() {
+    var unitContext = context.units[0];
+    for (var directive in unitContext.unit.directives) {
+      if (directive is ast.NamespaceDirective) {
+        try {
+          var uri = _selectAbsoluteUri(directive);
+          if (uri != null) {
+            LazyDirective.setSelectedUri(directive, '$uri');
+          }
+        } on FormatException {}
+      }
+    }
+  }
+
+  void storeExportScope() {
+    var linkingBundleContext = linker.linkingBundleContext;
+    for (var reference in exportScope.map.values) {
+      var index = linkingBundleContext.indexOfReference(reference);
+      node.exports.add(index);
+    }
+  }
+
+  Uri _selectAbsoluteUri(ast.NamespaceDirective directive) {
+    var relativeUriStr = _selectRelativeUri(
+      directive.configurations,
+      directive.uri.stringValue,
+    );
+    if (relativeUriStr.isEmpty) return null;
+    var relativeUri = Uri.parse(relativeUriStr);
+    return resolveRelativeUri(this.uri, relativeUri);
+  }
+
+  String _selectRelativeUri(
+    List<ast.Configuration> configurations,
+    String defaultUri,
+  ) {
+    for (var configuration in configurations) {
+      var name = configuration.name.components.join('.');
+      var value = configuration.value ?? 'true';
+      if (linker.declaredVariables.get(name) == (value)) {
+        return configuration.uri.stringValue;
+      }
+    }
+    return defaultUri;
+  }
+
+  static void build(Linker linker, LinkInputLibrary inputLibrary) {
+    var libraryUri = inputLibrary.source.uri;
+    var libraryUriStr = '$libraryUri';
+    var libraryReference = linker.rootReference.getChild(libraryUriStr);
+
+    var libraryNode = LinkedNodeLibraryBuilder(
+      uriStr: libraryUriStr,
+    );
+
+    var definingUnit = inputLibrary.units[0].unit;
+    for (var directive in definingUnit.directives) {
+      if (directive is ast.LibraryDirective) {
+        var name = directive.name;
+        libraryNode.name = name.components.map((id) => id.name).join('.');
+        libraryNode.nameOffset = name.offset;
+        libraryNode.nameLength = name.length;
+        break;
+      }
+    }
+
+    var builder = SourceLibraryBuilder(
+      linker,
+      libraryUri,
+      libraryReference,
+      libraryNode,
+    );
+    linker.builders[builder.uri] = builder;
+
+    builder.context = linker.bundleContext.addLinkingLibrary(
+      libraryUriStr,
+      libraryNode,
+      inputLibrary,
+    );
+  }
+}
+
+class UnitBuilder {
+  final Uri uri;
+  final LinkedUnitContext context;
+  final LinkedNode node;
+
+  UnitBuilder(this.uri, this.context, this.node);
+}
diff --git a/pkg/analyzer/lib/src/summary2/combinator.dart b/pkg/analyzer/lib/src/summary2/combinator.dart
new file mode 100644
index 0000000..5d7b20e
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary2/combinator.dart
@@ -0,0 +1,16 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class Combinator {
+  final bool isShow;
+  final Set<String> names;
+
+  Combinator(this.isShow, this.names);
+
+  Combinator.show(Iterable<String> names) : this(true, names.toSet());
+
+  Combinator.hide(Iterable<String> names) : this(false, names.toSet());
+
+  bool get isHide => !isShow;
+}
diff --git a/pkg/analyzer/lib/src/summary2/constructor_initializer_resolver.dart b/pkg/analyzer/lib/src/summary2/constructor_initializer_resolver.dart
new file mode 100644
index 0000000..fbb7919
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary2/constructor_initializer_resolver.dart
@@ -0,0 +1,81 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/src/dart/ast/ast.dart';
+import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/dart/resolver/scope.dart';
+import 'package:analyzer/src/summary2/ast_resolver.dart';
+import 'package:analyzer/src/summary2/link.dart';
+import 'package:analyzer/src/summary2/linking_node_scope.dart';
+
+class ConstructorInitializerResolver {
+  final Linker _linker;
+  final LibraryElementImpl _libraryElement;
+
+  ClassElement _classElement;
+  ConstructorElement _constructorElement;
+  ConstructorDeclarationImpl _constructorNode;
+  AstResolver _astResolver;
+
+  ConstructorInitializerResolver(this._linker, this._libraryElement);
+
+  void resolve() {
+    for (var unit in _libraryElement.units) {
+      for (var classElement in unit.types) {
+        _classElement = classElement;
+        for (var constructorElement in classElement.constructors) {
+          _constructor(constructorElement);
+        }
+      }
+    }
+  }
+
+  void _constructor(ConstructorElementImpl constructorElement) {
+    if (constructorElement.isSynthetic) return;
+
+    _constructorElement = constructorElement;
+    _constructorNode = constructorElement.linkedNode;
+
+    var functionScope = LinkingNodeContext.get(_constructorNode).scope;
+    var initializerScope = ConstructorInitializerScope(
+      functionScope,
+      constructorElement,
+    );
+
+    _astResolver = AstResolver(_linker, _libraryElement, initializerScope);
+
+    _initializers();
+    _redirectedConstructor();
+  }
+
+  void _initializers() {
+    var initializers = _constructorNode.initializers;
+
+    var isConst = _constructorNode.constKeyword != null;
+    if (!isConst) {
+      initializers.clear();
+      return;
+    }
+
+    for (var initializer in initializers) {
+      _astResolver.resolve(
+        initializer,
+        enclosingClassElement: _classElement,
+        enclosingExecutableElement: _constructorElement,
+      );
+    }
+  }
+
+  void _redirectedConstructor() {
+    var redirected = _constructorNode.redirectedConstructor;
+    if (redirected != null) {
+      _astResolver.resolve(
+        redirected,
+        enclosingClassElement: _classElement,
+        enclosingExecutableElement: _constructorElement,
+      );
+    }
+  }
+}
diff --git a/pkg/analyzer/lib/src/summary2/core_types.dart b/pkg/analyzer/lib/src/summary2/core_types.dart
new file mode 100644
index 0000000..289ea8e
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary2/core_types.dart
@@ -0,0 +1,27 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/src/summary2/linked_element_factory.dart';
+
+class CoreTypes {
+  final LinkedElementFactory _elementFactory;
+
+  LibraryElement _coreLibrary;
+  ClassElement _objectClass;
+
+  CoreTypes(this._elementFactory);
+
+  LibraryElement get coreLibrary {
+    return _coreLibrary ??= _elementFactory.libraryOfUri('dart:core');
+  }
+
+  ClassElement get objectClass {
+    return _objectClass ??= _getCoreClass('Object');
+  }
+
+  ClassElement _getCoreClass(String name) {
+    return coreLibrary.getType(name);
+  }
+}
diff --git a/pkg/analyzer/lib/src/summary2/default_value_resolver.dart b/pkg/analyzer/lib/src/summary2/default_value_resolver.dart
new file mode 100644
index 0000000..f531465
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary2/default_value_resolver.dart
@@ -0,0 +1,117 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/dart/element/type_algebra.dart';
+import 'package:analyzer/src/dart/resolver/scope.dart';
+import 'package:analyzer/src/generated/resolver.dart';
+import 'package:analyzer/src/summary2/ast_resolver.dart';
+import 'package:analyzer/src/summary2/link.dart';
+import 'package:analyzer/src/summary2/linking_node_scope.dart';
+
+class DefaultValueResolver {
+  final Linker _linker;
+  final LibraryElementImpl _libraryElement;
+
+  ClassElement _classElement;
+  ExecutableElement _executableElement;
+  Scope _scope;
+
+  AstResolver _astResolver;
+
+  DefaultValueResolver(this._linker, this._libraryElement);
+
+  void resolve() {
+    for (CompilationUnitElementImpl unit in _libraryElement.units) {
+      for (var classElement in unit.types) {
+        _classElement = classElement;
+
+        for (var element in classElement.constructors) {
+          _constructor(element);
+        }
+
+        for (var element in classElement.methods) {
+          _setScopeFromElement(element);
+          _method(element);
+        }
+
+        _classElement = null;
+      }
+
+      for (var element in unit.functions) {
+        _function(element);
+      }
+    }
+  }
+
+  void _constructor(ConstructorElementImpl element) {
+    if (element.isSynthetic) return;
+
+    _astResolver = null;
+    _executableElement = element;
+    _setScopeFromElement(element);
+
+    _parameters(element.parameters);
+  }
+
+  void _function(FunctionElementImpl element) {
+    _astResolver = null;
+    _executableElement = element;
+    _setScopeFromElement(element);
+
+    _parameters(element.parameters);
+  }
+
+  void _method(MethodElementImpl element) {
+    _astResolver = null;
+    _executableElement = element;
+    _setScopeFromElement(element);
+
+    _parameters(element.parameters);
+  }
+
+  void _parameter(ParameterElementImpl parameter) {
+    Expression defaultValue;
+    var node = parameter.linkedNode;
+    if (node is DefaultFormalParameter) {
+      defaultValue = node.defaultValue;
+    }
+    if (defaultValue == null) return;
+
+    var contextType = TypeVariableEliminator(_linker.typeProvider)
+        .substituteType(parameter.type);
+    InferenceContext.setType(defaultValue, contextType);
+
+    _astResolver ??= AstResolver(_linker, _libraryElement, _scope);
+    _astResolver.resolve(
+      defaultValue,
+      enclosingClassElement: _classElement,
+      enclosingExecutableElement: _executableElement,
+    );
+  }
+
+  void _parameters(List<ParameterElement> parameters) {
+    for (var parameter in parameters) {
+      _parameter(parameter);
+    }
+  }
+
+  void _setScopeFromElement(Element element) {
+    _scope = LinkingNodeContext.get((element as ElementImpl).linkedNode).scope;
+  }
+}
+
+class TypeVariableEliminator extends Substitution {
+  final TypeProvider _typeProvider;
+
+  TypeVariableEliminator(this._typeProvider);
+
+  @override
+  DartType getSubstitute(TypeParameterElement parameter, bool upperBound) {
+    return upperBound ? _typeProvider.nullType : _typeProvider.objectType;
+  }
+}
diff --git a/pkg/analyzer/lib/src/summary2/export.dart b/pkg/analyzer/lib/src/summary2/export.dart
new file mode 100644
index 0000000..63a1365
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary2/export.dart
@@ -0,0 +1,25 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/summary2/builder/source_library_builder.dart';
+import 'package:analyzer/src/summary2/combinator.dart';
+import 'package:analyzer/src/summary2/reference.dart';
+
+class Export {
+  final SourceLibraryBuilder exporter;
+  final SourceLibraryBuilder exported;
+  final List<Combinator> combinators;
+
+  Export(this.exporter, this.exported, this.combinators);
+
+  bool addToExportScope(String name, Reference reference) {
+    if (combinators != null) {
+      for (Combinator combinator in combinators) {
+        if (combinator.isShow && !combinator.names.contains(name)) return false;
+        if (combinator.isHide && combinator.names.contains(name)) return false;
+      }
+    }
+    return exporter.addToExportScope(name, reference);
+  }
+}
diff --git a/pkg/analyzer/lib/src/summary2/lazy_ast.dart b/pkg/analyzer/lib/src/summary2/lazy_ast.dart
new file mode 100644
index 0000000..77b9527
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary2/lazy_ast.dart
@@ -0,0 +1,1202 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/src/dart/ast/ast.dart';
+import 'package:analyzer/src/summary/idl.dart';
+import 'package:analyzer/src/summary2/ast_binary_reader.dart';
+
+/// Accessor for reading AST lazily, or read data that is stored in IDL, but
+/// cannot be stored in AST, like inferred types.
+class LazyAst {
+  static const _hasOverrideInferenceKey = 'lazyAst_hasOverrideInference';
+  static const _isSimplyBoundedKey = 'lazyAst_simplyBounded';
+  static const _returnTypeKey = 'lazyAst_returnType';
+  static const _typeKey = 'lazyAst_type';
+
+  final LinkedNode data;
+
+  LazyAst(this.data);
+
+  static DartType getReturnType(AstNode node) {
+    return node.getProperty(_returnTypeKey);
+  }
+
+  static DartType getType(AstNode node) {
+    return node.getProperty(_typeKey);
+  }
+
+  static bool hasOverrideInferenceDone(AstNode node) {
+    return node.getProperty(_hasOverrideInferenceKey) ?? false;
+  }
+
+  static bool isSimplyBounded(AstNode node) {
+    return node.getProperty(_isSimplyBoundedKey);
+  }
+
+  static void setOverrideInferenceDone(AstNode node) {
+    node.setProperty(_hasOverrideInferenceKey, true);
+  }
+
+  static void setReturnType(AstNode node, DartType type) {
+    node.setProperty(_returnTypeKey, type);
+  }
+
+  static void setSimplyBounded(AstNode node, bool simplyBounded) {
+    node.setProperty(_isSimplyBoundedKey, simplyBounded);
+  }
+
+  static void setType(AstNode node, DartType type) {
+    node.setProperty(_typeKey, type);
+  }
+}
+
+class LazyClassDeclaration {
+  static const _key = 'lazyAst';
+
+  final LinkedNode data;
+
+  bool _hasDocumentationComment = false;
+  bool _hasExtendsClause = false;
+  bool _hasImplementsClause = false;
+  bool _hasMembers = false;
+  bool _hasMetadata = false;
+  bool _hasWithClause = false;
+
+  LazyClassDeclaration(this.data);
+
+  static LazyClassDeclaration get(ClassDeclaration node) {
+    return node.getProperty(_key);
+  }
+
+  static void readDocumentationComment(
+    AstBinaryReader reader,
+    ClassDeclaration node,
+  ) {
+    var lazy = LazyClassDeclaration.get(node);
+    if (lazy != null && !lazy._hasDocumentationComment) {
+      node.documentationComment = reader.readNode(
+        lazy.data.annotatedNode_comment,
+      );
+      lazy._hasDocumentationComment = true;
+    }
+  }
+
+  static void readExtendsClause(
+    AstBinaryReader reader,
+    ClassDeclaration node,
+  ) {
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasExtendsClause) {
+      node.extendsClause = reader.readNode(
+        lazy.data.classDeclaration_extendsClause,
+      );
+      lazy._hasExtendsClause = true;
+    }
+  }
+
+  static void readImplementsClause(
+    AstBinaryReader reader,
+    ClassDeclaration node,
+  ) {
+    var lazy = LazyClassDeclaration.get(node);
+    if (lazy != null && !lazy._hasImplementsClause) {
+      node.implementsClause = reader.readNode(
+        lazy.data.classOrMixinDeclaration_implementsClause,
+      );
+      lazy._hasImplementsClause = true;
+    }
+  }
+
+  static void readMembers(
+    AstBinaryReader reader,
+    ClassDeclaration node,
+  ) {
+    var lazy = LazyClassDeclaration.get(node);
+    if (lazy != null && !lazy._hasMembers) {
+      var dataList = lazy.data.classOrMixinDeclaration_members;
+      for (var i = 0; i < dataList.length; ++i) {
+        var data = dataList[i];
+        node.members[i] = reader.readNode(data);
+      }
+      lazy._hasMembers = true;
+    }
+  }
+
+  static void readMetadata(
+    AstBinaryReader reader,
+    ClassDeclaration node,
+  ) {
+    var lazy = LazyClassDeclaration.get(node);
+    if (lazy != null && !lazy._hasMetadata) {
+      var dataList = lazy.data.annotatedNode_metadata;
+      for (var i = 0; i < dataList.length; ++i) {
+        var data = dataList[i];
+        node.metadata[i] = reader.readNode(data);
+      }
+      lazy._hasMetadata = true;
+    }
+  }
+
+  static void readWithClause(
+    AstBinaryReader reader,
+    ClassDeclaration node,
+  ) {
+    var lazy = LazyClassDeclaration.get(node);
+    if (lazy != null && !lazy._hasWithClause) {
+      node.withClause = reader.readNode(
+        lazy.data.classDeclaration_withClause,
+      );
+      lazy._hasWithClause = true;
+    }
+  }
+
+  static void setData(ClassDeclaration node, LinkedNode data) {
+    node.setProperty(_key, LazyClassDeclaration(data));
+    LazyAst.setSimplyBounded(node, data.simplyBoundable_isSimplyBounded);
+  }
+}
+
+class LazyClassTypeAlias {
+  static const _key = 'lazyAst';
+
+  final LinkedNode data;
+
+  bool _hasDocumentationComment = false;
+  bool _hasImplementsClause = false;
+  bool _hasMetadata = false;
+  bool _hasSuperclass = false;
+  bool _hasWithClause = false;
+
+  LazyClassTypeAlias(this.data);
+
+  static LazyClassTypeAlias get(ClassTypeAlias node) {
+    return node.getProperty(_key);
+  }
+
+  static void readDocumentationComment(
+    AstBinaryReader reader,
+    ClassTypeAlias node,
+  ) {
+    var lazy = LazyClassTypeAlias.get(node);
+    if (lazy != null && !lazy._hasDocumentationComment) {
+      node.documentationComment = reader.readNode(
+        lazy.data.annotatedNode_comment,
+      );
+      lazy._hasDocumentationComment = true;
+    }
+  }
+
+  static void readImplementsClause(
+    AstBinaryReader reader,
+    ClassTypeAlias node,
+  ) {
+    var lazy = LazyClassTypeAlias.get(node);
+    if (lazy != null && !lazy._hasImplementsClause) {
+      node.implementsClause = reader.readNode(
+        lazy.data.classTypeAlias_implementsClause,
+      );
+      lazy._hasImplementsClause = true;
+    }
+  }
+
+  static void readMetadata(
+    AstBinaryReader reader,
+    ClassTypeAlias node,
+  ) {
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasMetadata) {
+      var dataList = lazy.data.annotatedNode_metadata;
+      for (var i = 0; i < dataList.length; ++i) {
+        var data = dataList[i];
+        node.metadata[i] = reader.readNode(data);
+      }
+      lazy._hasMetadata = true;
+    }
+  }
+
+  static void readSuperclass(
+    AstBinaryReader reader,
+    ClassTypeAlias node,
+  ) {
+    if (reader.isLazy) {
+      var lazy = get(node);
+      if (!lazy._hasSuperclass) {
+        node.superclass = reader.readNode(
+          lazy.data.classTypeAlias_superclass,
+        );
+        lazy._hasSuperclass = true;
+      }
+    }
+  }
+
+  static void readWithClause(
+    AstBinaryReader reader,
+    ClassTypeAlias node,
+  ) {
+    var lazy = LazyClassTypeAlias.get(node);
+    if (lazy != null && !lazy._hasWithClause) {
+      node.withClause = reader.readNode(
+        lazy.data.classTypeAlias_withClause,
+      );
+      lazy._hasWithClause = true;
+    }
+  }
+
+  static void setData(ClassTypeAlias node, LinkedNode data) {
+    node.setProperty(_key, LazyClassTypeAlias(data));
+    LazyAst.setSimplyBounded(node, data.simplyBoundable_isSimplyBounded);
+  }
+}
+
+class LazyConstructorDeclaration {
+  static const _key = 'lazyAst';
+
+  final LinkedNode data;
+
+  bool _hasBody = false;
+  bool _hasDocumentationComment = false;
+  bool _hasFormalParameters = false;
+  bool _hasInitializers = false;
+  bool _hasMetadata = false;
+  bool _hasRedirectedConstructor = false;
+
+  LazyConstructorDeclaration(this.data);
+
+  static LazyConstructorDeclaration get(ConstructorDeclaration node) {
+    return node.getProperty(_key);
+  }
+
+  static void readBody(
+    AstBinaryReader reader,
+    ConstructorDeclaration node,
+  ) {
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasBody) {
+      node.body = reader.readNode(
+        lazy.data.constructorDeclaration_body,
+      );
+      lazy._hasBody = true;
+    }
+  }
+
+  static void readDocumentationComment(
+    AstBinaryReader reader,
+    ConstructorDeclaration node,
+  ) {
+    var lazy = LazyConstructorDeclaration.get(node);
+    if (lazy != null && !lazy._hasDocumentationComment) {
+      node.documentationComment = reader.readNode(
+        lazy.data.annotatedNode_comment,
+      );
+      lazy._hasDocumentationComment = true;
+    }
+  }
+
+  static void readFormalParameters(
+    AstBinaryReader reader,
+    ConstructorDeclaration node,
+  ) {
+    var lazy = LazyConstructorDeclaration.get(node);
+    if (lazy != null && !lazy._hasFormalParameters) {
+      node.parameters = reader.readNode(
+        lazy.data.constructorDeclaration_parameters,
+      );
+      lazy._hasFormalParameters = true;
+    }
+  }
+
+  static void readInitializers(
+    AstBinaryReader reader,
+    ConstructorDeclaration node,
+  ) {
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasInitializers) {
+      var dataList = lazy.data.constructorDeclaration_initializers;
+      for (var i = 0; i < dataList.length; ++i) {
+        var data = dataList[i];
+        node.initializers[i] = reader.readNode(data);
+      }
+      lazy._hasInitializers = true;
+    }
+  }
+
+  static void readMetadata(
+    AstBinaryReader reader,
+    ConstructorDeclaration node,
+  ) {
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasMetadata) {
+      var dataList = lazy.data.annotatedNode_metadata;
+      for (var i = 0; i < dataList.length; ++i) {
+        var data = dataList[i];
+        node.metadata[i] = reader.readNode(data);
+      }
+      lazy._hasMetadata = true;
+    }
+  }
+
+  static void readRedirectedConstructor(
+    AstBinaryReader reader,
+    ConstructorDeclaration node,
+  ) {
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasRedirectedConstructor) {
+      node.redirectedConstructor = reader.readNode(
+        lazy.data.constructorDeclaration_redirectedConstructor,
+      );
+      lazy._hasRedirectedConstructor = true;
+    }
+  }
+
+  static void setData(ConstructorDeclaration node, LinkedNode data) {
+    node.setProperty(_key, LazyConstructorDeclaration(data));
+  }
+}
+
+class LazyDirective {
+  static const _key = 'lazyAst';
+  static const _uriKey = 'lazyAst_selectedUri';
+
+  final LinkedNode data;
+
+  bool _hasMetadata = false;
+
+  LazyDirective(this.data);
+
+  static LazyDirective get(Directive node) {
+    return node.getProperty(_key);
+  }
+
+  static String getSelectedUri(UriBasedDirective node) {
+    return node.getProperty(_uriKey);
+  }
+
+  static void readMetadata(AstBinaryReader reader, Directive node) {
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasMetadata) {
+      var dataList = lazy.data.annotatedNode_metadata;
+      for (var i = 0; i < dataList.length; ++i) {
+        var data = dataList[i];
+        node.metadata[i] = reader.readNode(data);
+      }
+      lazy._hasMetadata = true;
+    }
+  }
+
+  static void setData(Directive node, LinkedNode data) {
+    node.setProperty(_key, LazyDirective(data));
+    if (node is NamespaceDirective) {
+      node.setProperty(_uriKey, data.namespaceDirective_selectedUri);
+    }
+  }
+
+  static void setSelectedUri(UriBasedDirective node, String uriStr) {
+    node.setProperty(_uriKey, uriStr);
+  }
+}
+
+class LazyEnumConstantDeclaration {
+  static const _key = 'lazyAst';
+
+  final LinkedNode data;
+
+  bool _hasDocumentationComment = false;
+  bool _hasMetadata = false;
+
+  LazyEnumConstantDeclaration(this.data);
+
+  static LazyEnumConstantDeclaration get(EnumConstantDeclaration node) {
+    return node.getProperty(_key);
+  }
+
+  static void readDocumentationComment(
+    AstBinaryReader reader,
+    EnumConstantDeclaration node,
+  ) {
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasDocumentationComment) {
+      node.documentationComment = reader.readNode(
+        lazy.data.annotatedNode_comment,
+      );
+      lazy._hasDocumentationComment = true;
+    }
+  }
+
+  static void readMetadata(
+    AstBinaryReader reader,
+    EnumConstantDeclaration node,
+  ) {
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasMetadata) {
+      var dataList = lazy.data.annotatedNode_metadata;
+      for (var i = 0; i < dataList.length; ++i) {
+        var data = dataList[i];
+        node.metadata[i] = reader.readNode(data);
+      }
+      lazy._hasMetadata = true;
+    }
+  }
+
+  static void setData(EnumConstantDeclaration node, LinkedNode data) {
+    node.setProperty(_key, LazyEnumConstantDeclaration(data));
+  }
+}
+
+class LazyEnumDeclaration {
+  static const _key = 'lazyAst';
+
+  final LinkedNode data;
+
+  bool _hasConstants = false;
+  bool _hasDocumentationComment = false;
+  bool _hasMetadata = false;
+
+  LazyEnumDeclaration(this.data);
+
+  static LazyEnumDeclaration get(EnumDeclaration node) {
+    return node.getProperty(_key);
+  }
+
+  static void readConstants(
+    AstBinaryReader reader,
+    EnumDeclaration node,
+  ) {
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasConstants) {
+      var dataList = lazy.data.enumDeclaration_constants;
+      for (var i = 0; i < dataList.length; ++i) {
+        var data = dataList[i];
+        node.constants[i] = reader.readNode(data);
+      }
+      lazy._hasConstants = true;
+    }
+  }
+
+  static void readDocumentationComment(
+    AstBinaryReader reader,
+    EnumDeclaration node,
+  ) {
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasDocumentationComment) {
+      node.documentationComment = reader.readNode(
+        lazy.data.annotatedNode_comment,
+      );
+      lazy._hasDocumentationComment = true;
+    }
+  }
+
+  static void readMetadata(
+    AstBinaryReader reader,
+    EnumDeclaration node,
+  ) {
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasMetadata) {
+      var dataList = lazy.data.annotatedNode_metadata;
+      for (var i = 0; i < dataList.length; ++i) {
+        var data = dataList[i];
+        node.metadata[i] = reader.readNode(data);
+      }
+      lazy._hasMetadata = true;
+    }
+  }
+
+  static void setData(EnumDeclaration node, LinkedNode data) {
+    node.setProperty(_key, LazyEnumDeclaration(data));
+  }
+}
+
+class LazyFieldDeclaration {
+  static const _key = 'lazyAst';
+
+  final LinkedNode data;
+
+  bool _hasDocumentationComment = false;
+  bool _hasMetadata = false;
+
+  LazyFieldDeclaration(this.data);
+
+  static LazyFieldDeclaration get(FieldDeclaration node) {
+    return node.getProperty(_key);
+  }
+
+  static void readDocumentationComment(
+    AstBinaryReader reader,
+    FieldDeclaration node,
+  ) {
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasDocumentationComment) {
+      node.documentationComment = reader.readNode(
+        lazy.data.annotatedNode_comment,
+      );
+      lazy._hasDocumentationComment = true;
+    }
+  }
+
+  static void readMetadata(
+    AstBinaryReader reader,
+    FieldDeclaration node,
+  ) {
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasMetadata) {
+      var dataList = lazy.data.annotatedNode_metadata;
+      for (var i = 0; i < dataList.length; ++i) {
+        var data = dataList[i];
+        node.metadata[i] = reader.readNode(data);
+      }
+      lazy._hasMetadata = true;
+    }
+  }
+
+  static void setData(FieldDeclaration node, LinkedNode data) {
+    node.setProperty(_key, LazyFieldDeclaration(data));
+  }
+}
+
+class LazyFormalParameter {
+  static const _key = 'lazyAst';
+
+  final LinkedNode data;
+
+  bool _hasDefaultValue = false;
+  bool _hasMetadata = false;
+  bool _hasType = false;
+
+  LazyFormalParameter(this.data);
+
+  static LazyFormalParameter get(FormalParameter node) {
+    return node.getProperty(_key);
+  }
+
+  static DartType getType(
+    AstBinaryReader reader,
+    FormalParameter node,
+  ) {
+    if (reader.isLazy) {
+      var lazy = get(node);
+      if (!lazy._hasType) {
+        var type = reader.readType(lazy.data.actualType);
+        LazyAst.setType(node, type);
+        lazy._hasType = true;
+      }
+    }
+    return LazyAst.getType(node);
+  }
+
+  static void readDefaultValue(
+    AstBinaryReader reader,
+    DefaultFormalParameter node,
+  ) {
+    if (reader.isLazy) {
+      var lazy = LazyFormalParameter.get(node);
+      if (lazy != null && !lazy._hasDefaultValue) {
+        node.defaultValue = reader.readNode(
+          lazy.data.defaultFormalParameter_defaultValue,
+        );
+        lazy._hasDefaultValue = true;
+      }
+    }
+  }
+
+  static void readMetadata(
+    AstBinaryReader reader,
+    FormalParameter node,
+  ) {
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasMetadata) {
+      var dataList = lazy.data.normalFormalParameter_metadata;
+      for (var i = 0; i < dataList.length; ++i) {
+        var data = dataList[i];
+        node.metadata[i] = reader.readNode(data);
+      }
+      lazy._hasMetadata = true;
+    }
+  }
+
+  static void setData(FormalParameter node, LinkedNode data) {
+    node.setProperty(_key, LazyFormalParameter(data));
+  }
+}
+
+class LazyFunctionDeclaration {
+  static const _key = 'lazyAst';
+
+  final LinkedNode data;
+
+  bool _hasDocumentationComment = false;
+  bool _hasMetadata = false;
+  bool _hasReturnType = false;
+
+  LazyFunctionDeclaration(this.data);
+
+  static LazyFunctionDeclaration get(FunctionDeclaration node) {
+    return node.getProperty(_key);
+  }
+
+  static DartType getReturnType(
+    AstBinaryReader reader,
+    FunctionDeclaration node,
+  ) {
+    readFunctionExpression(reader, node);
+    if (reader.isLazy) {
+      var lazy = get(node);
+      if (!lazy._hasReturnType) {
+        var type = reader.readType(lazy.data.actualReturnType);
+        LazyAst.setReturnType(node, type);
+        lazy._hasReturnType = true;
+      }
+    }
+    return LazyAst.getReturnType(node);
+  }
+
+  static void readDocumentationComment(
+    AstBinaryReader reader,
+    FunctionDeclaration node,
+  ) {
+    var lazy = LazyFunctionDeclaration.get(node);
+    if (lazy != null && !lazy._hasDocumentationComment) {
+      node.documentationComment = reader.readNode(
+        lazy.data.annotatedNode_comment,
+      );
+      lazy._hasDocumentationComment = true;
+    }
+  }
+
+  static void readFunctionExpression(
+    AstBinaryReader reader,
+    FunctionDeclaration node,
+  ) {
+    if (node.functionExpression == null) {
+      var lazy = LazyFunctionDeclaration.get(node);
+      node.functionExpression = reader.readNode(
+        lazy.data.functionDeclaration_functionExpression,
+      );
+    }
+  }
+
+  static void readMetadata(
+    AstBinaryReader reader,
+    FunctionDeclaration node,
+  ) {
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasMetadata) {
+      var dataList = lazy.data.annotatedNode_metadata;
+      for (var i = 0; i < dataList.length; ++i) {
+        var data = dataList[i];
+        node.metadata[i] = reader.readNode(data);
+      }
+      lazy._hasMetadata = true;
+    }
+  }
+
+  static void setData(FunctionDeclaration node, LinkedNode data) {
+    node.setProperty(_key, LazyFunctionDeclaration(data));
+  }
+}
+
+class LazyFunctionExpression {
+  static const _key = 'lazyAst';
+
+  final LinkedNode data;
+
+  bool _hasBody = false;
+  bool _hasFormalParameters = false;
+
+  LazyFunctionExpression(this.data);
+
+  static LazyFunctionExpression get(FunctionExpression node) {
+    return node.getProperty(_key);
+  }
+
+  static void readBody(
+    AstBinaryReader reader,
+    FunctionExpression node,
+  ) {
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasBody) {
+      node.body = reader.readNode(
+        lazy.data.functionExpression_body,
+      );
+      lazy._hasBody = true;
+    }
+  }
+
+  static void readFormalParameters(
+    AstBinaryReader reader,
+    FunctionExpression node,
+  ) {
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasFormalParameters) {
+      node.parameters = reader.readNode(
+        lazy.data.functionExpression_formalParameters,
+      );
+      lazy._hasFormalParameters = true;
+    }
+  }
+
+  static void setData(FunctionExpression node, LinkedNode data) {
+    node.setProperty(_key, LazyFunctionExpression(data));
+  }
+}
+
+class LazyFunctionTypeAlias {
+  static const _key = 'lazyAst';
+
+  final LinkedNode data;
+
+  bool _hasDocumentationComment = false;
+  bool _hasFormalParameters = false;
+  bool _hasMetadata = false;
+  bool _hasReturnType = false;
+
+  LazyFunctionTypeAlias(this.data);
+
+  static LazyFunctionTypeAlias get(FunctionTypeAlias node) {
+    return node.getProperty(_key);
+  }
+
+  static DartType getReturnType(
+    AstBinaryReader reader,
+    FunctionTypeAlias node,
+  ) {
+    if (reader.isLazy) {
+      var lazy = get(node);
+      if (!lazy._hasReturnType) {
+        var type = reader.readType(lazy.data.actualReturnType);
+        LazyAst.setReturnType(node, type);
+        lazy._hasReturnType = true;
+      }
+    }
+    return LazyAst.getReturnType(node);
+  }
+
+  static void readDocumentationComment(
+    AstBinaryReader reader,
+    FunctionTypeAlias node,
+  ) {
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasDocumentationComment) {
+      node.documentationComment = reader.readNode(
+        lazy.data.annotatedNode_comment,
+      );
+      lazy._hasDocumentationComment = true;
+    }
+  }
+
+  static void readFormalParameters(
+    AstBinaryReader reader,
+    FunctionTypeAlias node,
+  ) {
+    var lazy = LazyFunctionTypeAlias.get(node);
+    if (lazy != null && !lazy._hasFormalParameters) {
+      node.parameters = reader.readNode(
+        lazy.data.functionTypeAlias_formalParameters,
+      );
+      lazy._hasFormalParameters = true;
+    }
+  }
+
+  static void readMetadata(
+    AstBinaryReader reader,
+    FunctionTypeAlias node,
+  ) {
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasMetadata) {
+      var dataList = lazy.data.annotatedNode_metadata;
+      for (var i = 0; i < dataList.length; ++i) {
+        var data = dataList[i];
+        node.metadata[i] = reader.readNode(data);
+      }
+      lazy._hasMetadata = true;
+    }
+  }
+
+  static void setData(FunctionTypeAlias node, LinkedNode data) {
+    node.setProperty(_key, LazyFunctionTypeAlias(data));
+    LazyAst.setSimplyBounded(node, data.simplyBoundable_isSimplyBounded);
+  }
+}
+
+class LazyGenericFunctionType {
+  static const _key = 'lazyAst';
+
+  final LinkedNode data;
+
+  bool _hasFormalParameters = false;
+  bool _hasReturnType = false;
+
+  LazyGenericFunctionType(this.data);
+
+  static LazyGenericFunctionType get(GenericFunctionType node) {
+    return node.getProperty(_key);
+  }
+
+  static DartType getReturnType(
+    AstBinaryReader reader,
+    GenericFunctionType node,
+  ) {
+    if (reader.isLazy) {
+      var lazy = get(node);
+      if (!lazy._hasReturnType) {
+        var type = reader.readType(lazy.data.actualReturnType);
+        LazyAst.setReturnType(node, type);
+        lazy._hasReturnType = true;
+      }
+    }
+    return LazyAst.getReturnType(node);
+  }
+
+  static void readFormalParameters(
+    AstBinaryReader reader,
+    GenericFunctionType node,
+  ) {
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasFormalParameters) {
+      node.parameters = reader.readNode(
+        lazy.data.genericFunctionType_formalParameters,
+      );
+      lazy._hasFormalParameters = true;
+    }
+  }
+
+  static void setData(GenericFunctionType node, LinkedNode data) {
+    node.setProperty(_key, LazyGenericFunctionType(data));
+  }
+}
+
+class LazyGenericTypeAlias {
+  static const _key = 'lazyAst';
+
+  final LinkedNode data;
+
+  bool _hasDocumentationComment = false;
+  bool _hasFunction = false;
+
+  LazyGenericTypeAlias(this.data);
+
+  static LazyGenericTypeAlias get(GenericTypeAlias node) {
+    return node.getProperty(_key);
+  }
+
+  static void readDocumentationComment(
+    AstBinaryReader reader,
+    GenericTypeAlias node,
+  ) {
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasDocumentationComment) {
+      node.documentationComment = reader.readNode(
+        lazy.data.annotatedNode_comment,
+      );
+      lazy._hasDocumentationComment = true;
+    }
+  }
+
+  static void readFunctionType(
+    AstBinaryReader reader,
+    GenericTypeAlias node,
+  ) {
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasFunction) {
+      node.functionType = reader.readNode(
+        lazy.data.genericTypeAlias_functionType,
+      );
+      lazy._hasFunction = true;
+    }
+  }
+
+  static void setData(GenericTypeAlias node, LinkedNode data) {
+    node.setProperty(_key, LazyGenericTypeAlias(data));
+    LazyAst.setSimplyBounded(node, data.simplyBoundable_isSimplyBounded);
+  }
+}
+
+class LazyMethodDeclaration {
+  static const _key = 'lazyAst';
+
+  final LinkedNode data;
+
+  bool _hasBody = false;
+  bool _hasDocumentationComment = false;
+  bool _hasFormalParameters = false;
+  bool _hasMetadata = false;
+  bool _hasReturnType = false;
+
+  LazyMethodDeclaration(this.data);
+
+  static LazyMethodDeclaration get(MethodDeclaration node) {
+    return node.getProperty(_key);
+  }
+
+  static DartType getReturnType(
+    AstBinaryReader reader,
+    MethodDeclaration node,
+  ) {
+    if (reader.isLazy) {
+      var lazy = get(node);
+      if (!lazy._hasReturnType) {
+        var type = reader.readType(lazy.data.actualReturnType);
+        LazyAst.setReturnType(node, type);
+        lazy._hasReturnType = true;
+      }
+    }
+    return LazyAst.getReturnType(node);
+  }
+
+  static void readBody(
+    AstBinaryReader reader,
+    MethodDeclaration node,
+  ) {
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasBody) {
+      node.body = reader.readNode(
+        lazy.data.methodDeclaration_body,
+      );
+      lazy._hasBody = true;
+    }
+  }
+
+  static void readDocumentationComment(
+    AstBinaryReader reader,
+    MethodDeclaration node,
+  ) {
+    var lazy = LazyMethodDeclaration.get(node);
+    if (lazy != null && !lazy._hasDocumentationComment) {
+      node.documentationComment = reader.readNode(
+        lazy.data.annotatedNode_comment,
+      );
+      lazy._hasDocumentationComment = true;
+    }
+  }
+
+  static void readFormalParameters(
+    AstBinaryReader reader,
+    MethodDeclaration node,
+  ) {
+    var lazy = LazyMethodDeclaration.get(node);
+    if (lazy != null && !lazy._hasFormalParameters) {
+      node.parameters = reader.readNode(
+        lazy.data.methodDeclaration_formalParameters,
+      );
+      lazy._hasFormalParameters = true;
+    }
+  }
+
+  static void readMetadata(
+    AstBinaryReader reader,
+    MethodDeclaration node,
+  ) {
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasMetadata) {
+      var dataList = lazy.data.annotatedNode_metadata;
+      for (var i = 0; i < dataList.length; ++i) {
+        var data = dataList[i];
+        node.metadata[i] = reader.readNode(data);
+      }
+      lazy._hasMetadata = true;
+    }
+  }
+
+  static void setData(MethodDeclaration node, LinkedNode data) {
+    node.setProperty(_key, LazyMethodDeclaration(data));
+  }
+}
+
+class LazyMixinDeclaration {
+  static const _key = 'lazyAst';
+
+  final LinkedNode data;
+
+  bool _hasDocumentationComment = false;
+  bool _hasOnClause = false;
+  bool _hasImplementsClause = false;
+  bool _hasMembers = false;
+
+  LazyMixinDeclaration(this.data);
+
+  static LazyMixinDeclaration get(MixinDeclaration node) {
+    return node.getProperty(_key);
+  }
+
+  static void readDocumentationComment(
+    AstBinaryReader reader,
+    MixinDeclaration node,
+  ) {
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasDocumentationComment) {
+      node.documentationComment = reader.readNode(
+        lazy.data.annotatedNode_comment,
+      );
+      lazy._hasDocumentationComment = true;
+    }
+  }
+
+  static void readImplementsClause(
+    AstBinaryReader reader,
+    MixinDeclarationImpl node,
+  ) {
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasImplementsClause) {
+      node.implementsClause = reader.readNode(
+        lazy.data.classOrMixinDeclaration_implementsClause,
+      );
+      lazy._hasImplementsClause = true;
+    }
+  }
+
+  static void readMembers(
+    AstBinaryReader reader,
+    MixinDeclaration node,
+  ) {
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasMembers) {
+      var dataList = lazy.data.classOrMixinDeclaration_members;
+      for (var i = 0; i < dataList.length; ++i) {
+        var data = dataList[i];
+        node.members[i] = reader.readNode(data);
+      }
+      lazy._hasMembers = true;
+    }
+  }
+
+  static void readOnClause(
+    AstBinaryReader reader,
+    MixinDeclarationImpl node,
+  ) {
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasOnClause) {
+      node.onClause = reader.readNode(
+        lazy.data.mixinDeclaration_onClause,
+      );
+      lazy._hasOnClause = true;
+    }
+  }
+
+  static void setData(MixinDeclaration node, LinkedNode data) {
+    node.setProperty(_key, LazyMixinDeclaration(data));
+    LazyAst.setSimplyBounded(node, data.simplyBoundable_isSimplyBounded);
+  }
+}
+
+class LazyTopLevelVariableDeclaration {
+  static const _key = 'lazyAst';
+
+  final LinkedNode data;
+
+  bool _hasDocumentationComment = false;
+  bool _hasMetadata = false;
+
+  LazyTopLevelVariableDeclaration(this.data);
+
+  static LazyTopLevelVariableDeclaration get(TopLevelVariableDeclaration node) {
+    return node.getProperty(_key);
+  }
+
+  static void readDocumentationComment(
+    AstBinaryReader reader,
+    TopLevelVariableDeclaration node,
+  ) {
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasDocumentationComment) {
+      node.documentationComment = reader.readNode(
+        lazy.data.annotatedNode_comment,
+      );
+      lazy._hasDocumentationComment = true;
+    }
+  }
+
+  static void readMetadata(
+    AstBinaryReader reader,
+    TopLevelVariableDeclaration node,
+  ) {
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasMetadata) {
+      var dataList = lazy.data.annotatedNode_metadata;
+      for (var i = 0; i < dataList.length; ++i) {
+        var data = dataList[i];
+        node.metadata[i] = reader.readNode(data);
+      }
+      lazy._hasMetadata = true;
+    }
+  }
+
+  static void setData(TopLevelVariableDeclaration node, LinkedNode data) {
+    node.setProperty(_key, LazyTopLevelVariableDeclaration(data));
+  }
+}
+
+class LazyTypeParameter {
+  static const _key = 'lazyAst';
+
+  final LinkedNode data;
+
+  bool _hasBound = false;
+
+  LazyTypeParameter(this.data);
+
+  static LazyTypeParameter get(TypeParameter node) {
+    return node.getProperty(_key);
+  }
+
+  static void readBound(AstBinaryReader reader, TypeParameter node) {
+    var lazy = get(node);
+    if (lazy != null && !lazy._hasBound) {
+      node.bound = reader.readNode(lazy.data.typeParameter_bound);
+      lazy._hasBound = true;
+    }
+  }
+
+  static void setData(TypeParameter node, LinkedNode data) {
+    node.setProperty(_key, LazyTypeParameter(data));
+  }
+}
+
+class LazyVariableDeclaration {
+  static const _key = 'lazyAst';
+
+  final LinkedNode data;
+
+  bool _hasInitializer = false;
+  bool _hasType = false;
+
+  LazyVariableDeclaration(this.data);
+
+  static LazyVariableDeclaration get(VariableDeclaration node) {
+    return node.getProperty(_key);
+  }
+
+  static DartType getType(
+    AstBinaryReader reader,
+    VariableDeclaration node,
+  ) {
+    if (reader.isLazy) {
+      var lazy = get(node);
+      if (!lazy._hasType) {
+        var type = reader.readType(lazy.data.actualType);
+        LazyAst.setType(node, type);
+        lazy._hasType = true;
+      }
+    }
+    return LazyAst.getType(node);
+  }
+
+  static void readInitializer(
+    AstBinaryReader reader,
+    VariableDeclaration node,
+  ) {
+    if (reader.isLazy) {
+      var lazy = get(node);
+      if (lazy != null && !lazy._hasInitializer) {
+        node.initializer = reader.readNode(
+          lazy.data.variableDeclaration_initializer,
+        );
+        lazy._hasInitializer = true;
+      }
+    }
+  }
+
+  static void setData(VariableDeclaration node, LinkedNode data) {
+    node.setProperty(_key, LazyVariableDeclaration(data));
+  }
+}
diff --git a/pkg/analyzer/lib/src/summary2/link.dart b/pkg/analyzer/lib/src/summary2/link.dart
new file mode 100644
index 0000000..77430ea
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary2/link.dart
@@ -0,0 +1,320 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/analysis/session.dart';
+import 'package:analyzer/dart/ast/ast.dart' show AstNode, CompilationUnit;
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/dart/element/inheritance_manager2.dart';
+import 'package:analyzer/src/generated/constant.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/generated/resolver.dart';
+import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/generated/type_system.dart';
+import 'package:analyzer/src/summary/format.dart';
+import 'package:analyzer/src/summary/idl.dart';
+import 'package:analyzer/src/summary/summary_sdk.dart';
+import 'package:analyzer/src/summary2/ast_binary_writer.dart';
+import 'package:analyzer/src/summary2/builder/source_library_builder.dart';
+import 'package:analyzer/src/summary2/linked_bundle_context.dart';
+import 'package:analyzer/src/summary2/linked_element_factory.dart';
+import 'package:analyzer/src/summary2/linking_bundle_context.dart';
+import 'package:analyzer/src/summary2/reference.dart';
+import 'package:analyzer/src/summary2/simply_bounded.dart';
+import 'package:analyzer/src/summary2/tokens_writer.dart';
+import 'package:analyzer/src/summary2/top_level_inference.dart';
+import 'package:analyzer/src/summary2/type_builder.dart';
+
+LinkResult link(
+  AnalysisOptions analysisOptions,
+  SourceFactory sourceFactory,
+  DeclaredVariables declaredVariables,
+  List<LinkedNodeBundle> inputBundles,
+  List<LinkInputLibrary> inputLibraries,
+) {
+  var linker = Linker(analysisOptions, sourceFactory, declaredVariables);
+  linker.link(inputBundles, inputLibraries);
+  return LinkResult(linker.linkingBundle);
+}
+
+class Linker {
+  final DeclaredVariables declaredVariables;
+
+  final Reference rootReference = Reference.root();
+  LinkedElementFactory elementFactory;
+
+  LinkedNodeBundleBuilder linkingBundle;
+  LinkedBundleContext bundleContext;
+  LinkingBundleContext linkingBundleContext;
+
+  /// Libraries that are being linked.
+  final Map<Uri, SourceLibraryBuilder> builders = {};
+
+  _AnalysisContextForLinking analysisContext;
+  TypeProvider typeProvider;
+  Dart2TypeSystem typeSystem;
+  InheritanceManager2 inheritance;
+
+  Linker(
+    AnalysisOptions analysisOptions,
+    SourceFactory sourceFactory,
+    this.declaredVariables,
+  ) {
+    var dynamicRef = rootReference.getChild('dart:core').getChild('dynamic');
+    dynamicRef.element = DynamicElementImpl.instance;
+
+    linkingBundleContext = LinkingBundleContext(dynamicRef);
+
+    analysisContext = _AnalysisContextForLinking(
+      analysisOptions,
+      sourceFactory,
+    );
+
+    elementFactory = LinkedElementFactory(
+      analysisContext,
+      _AnalysisSessionForLinking(),
+      rootReference,
+    );
+
+    bundleContext = LinkedBundleContext.forAst(
+      elementFactory,
+      linkingBundleContext.references,
+    );
+  }
+
+  void link(List<LinkedNodeBundle> inputBundles,
+      List<LinkInputLibrary> inputLibraries) {
+    for (var input in inputBundles) {
+      var inputBundleContext = LinkedBundleContext(elementFactory, input);
+      elementFactory.addBundle(inputBundleContext);
+    }
+
+    for (var inputLibrary in inputLibraries) {
+      SourceLibraryBuilder.build(this, inputLibrary);
+    }
+    // TODO(scheglov) do in build() ?
+    elementFactory.addBundle(bundleContext);
+
+    _buildOutlines();
+
+    _createLinkingBundle();
+  }
+
+  void _addExporters() {
+    for (var library in builders.values) {
+      library.addExporters();
+    }
+  }
+
+  void _addSyntheticConstructors() {
+    for (var library in builders.values) {
+      library.addSyntheticConstructors();
+    }
+  }
+
+  void _buildOutlines() {
+    _resolveUriDirectives();
+    _addExporters();
+    _computeLibraryScopes();
+    _addSyntheticConstructors();
+    _createTypeSystem();
+    _resolveTypes();
+    _createLoadLibraryFunctions();
+    _performTopLevelInference();
+    _resolveConstructors();
+    _resolveDefaultValues();
+    _resolveMetadata();
+  }
+
+  void _computeLibraryScopes() {
+    var exporters = new Set<SourceLibraryBuilder>();
+    var exportees = new Set<SourceLibraryBuilder>();
+
+    for (var library in builders.values) {
+      library.addLocalDeclarations();
+      if (library.exporters.isNotEmpty) {
+        exportees.add(library);
+        for (var exporter in library.exporters) {
+          exporters.add(exporter.exporter);
+        }
+      }
+    }
+
+    for (var library in builders.values) {
+      library.buildInitialExportScope();
+    }
+
+    var both = new Set<SourceLibraryBuilder>();
+    for (var exported in exportees) {
+      if (exporters.contains(exported)) {
+        both.add(exported);
+      }
+      for (var export in exported.exporters) {
+        exported.exportScope.forEach(export.addToExportScope);
+      }
+    }
+
+    while (true) {
+      var hasChanges = false;
+      for (var exported in both) {
+        for (var export in exported.exporters) {
+          exported.exportScope.forEach((name, member) {
+            if (export.addToExportScope(name, member)) {
+              hasChanges = true;
+            }
+          });
+        }
+      }
+      if (!hasChanges) break;
+    }
+
+    for (var library in builders.values) {
+      library.storeExportScope();
+    }
+
+    for (var library in builders.values) {
+      library.buildElement();
+    }
+  }
+
+  void _createLinkingBundle() {
+    var linkingLibraries = <LinkedNodeLibraryBuilder>[];
+    for (var builder in builders.values) {
+      linkingLibraries.add(builder.node);
+
+      for (var unit2 in builder.context.units) {
+        var unit = unit2.unit;
+        var tokensResult = TokensWriter().writeTokens(
+          unit.beginToken,
+          unit.endToken,
+        );
+        var tokensContext = tokensResult.toContext();
+
+        var writer = new AstBinaryWriter(linkingBundleContext, tokensContext);
+        var unitLinkedNode = writer.writeNode(unit);
+        builder.node.units.add(
+          LinkedNodeUnitBuilder(
+            uriStr: unit2.uriStr,
+            tokens: tokensResult.tokens,
+            node: unitLinkedNode,
+          ),
+        );
+      }
+    }
+    linkingBundle = LinkedNodeBundleBuilder(
+      references: linkingBundleContext.referencesBuilder,
+      libraries: linkingLibraries,
+    );
+  }
+
+  void _createLoadLibraryFunctions() {
+    for (var library in builders.values) {
+      library.element.createLoadLibraryFunction(typeProvider);
+    }
+  }
+
+  void _createTypeSystem() {
+    var coreRef = rootReference.getChild('dart:core');
+    var coreLib = elementFactory.elementOfReference(coreRef);
+
+    var asyncRef = rootReference.getChild('dart:async');
+    var asyncLib = elementFactory.elementOfReference(asyncRef);
+
+    typeProvider = SummaryTypeProvider()
+      ..initializeCore(coreLib)
+      ..initializeAsync(asyncLib);
+    analysisContext.typeProvider = typeProvider;
+
+    typeSystem = Dart2TypeSystem(typeProvider);
+    analysisContext.typeSystem = typeSystem;
+
+    inheritance = InheritanceManager2(typeSystem);
+  }
+
+  void _performTopLevelInference() {
+    TopLevelInference(this).infer();
+  }
+
+  void _resolveConstructors() {
+    for (var library in builders.values) {
+      library.resolveConstructors();
+    }
+  }
+
+  void _resolveDefaultValues() {
+    for (var library in builders.values) {
+      library.resolveDefaultValues();
+    }
+  }
+
+  void _resolveMetadata() {
+    for (var library in builders.values) {
+      library.resolveMetadata();
+    }
+  }
+
+  void _resolveTypes() {
+    var nodesToBuildType = <AstNode>[];
+    for (var library in builders.values) {
+      library.resolveTypes(nodesToBuildType);
+    }
+    computeSimplyBounded(bundleContext, builders.values);
+    TypeBuilder(typeSystem).build(nodesToBuildType);
+  }
+
+  void _resolveUriDirectives() {
+    for (var library in builders.values) {
+      library.resolveUriDirectives();
+    }
+  }
+}
+
+class LinkInputLibrary {
+  final Source source;
+  final List<LinkInputUnit> units;
+
+  LinkInputLibrary(this.source, this.units);
+}
+
+class LinkInputUnit {
+  final Source source;
+  final CompilationUnit unit;
+
+  LinkInputUnit(this.source, this.unit);
+}
+
+class LinkResult {
+  final LinkedNodeBundleBuilder bundle;
+
+  LinkResult(this.bundle);
+}
+
+class _AnalysisContextForLinking implements InternalAnalysisContext {
+  @override
+  final AnalysisOptions analysisOptions;
+
+  @override
+  final SourceFactory sourceFactory;
+
+  @override
+  TypeProvider typeProvider;
+
+  @override
+  TypeSystem typeSystem;
+
+  _AnalysisContextForLinking(this.analysisOptions, this.sourceFactory);
+
+  @override
+  Namespace getPublicNamespace(LibraryElement library) {
+    // TODO(scheglov) Not sure if this method of AnalysisContext is useful.
+    var builder = new NamespaceBuilder();
+    return builder.createPublicNamespaceForLibrary(library);
+  }
+
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+}
+
+class _AnalysisSessionForLinking implements AnalysisSession {
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+}
diff --git a/pkg/analyzer/lib/src/summary2/linked_bundle_context.dart b/pkg/analyzer/lib/src/summary2/linked_bundle_context.dart
new file mode 100644
index 0000000..bb079ee
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary2/linked_bundle_context.dart
@@ -0,0 +1,115 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/src/summary/format.dart';
+import 'package:analyzer/src/summary/idl.dart';
+import 'package:analyzer/src/summary2/link.dart';
+import 'package:analyzer/src/summary2/linked_element_factory.dart';
+import 'package:analyzer/src/summary2/linked_unit_context.dart';
+import 'package:analyzer/src/summary2/reference.dart';
+
+/// The context of a linked bundle, with shared references.
+class LinkedBundleContext {
+  final LinkedElementFactory elementFactory;
+  final LinkedNodeBundle _bundle;
+  final List<Reference> _references;
+  final Map<String, LinkedLibraryContext> libraryMap = {};
+
+  LinkedBundleContext(this.elementFactory, this._bundle)
+      : _references = List<Reference>(_bundle.references.name.length) {
+    for (var library in _bundle.libraries) {
+      var libraryContext = LinkedLibraryContext(library.uriStr, this, library);
+      libraryMap[library.uriStr] = libraryContext;
+
+      var units = library.units;
+      for (var unitIndex = 0; unitIndex < units.length; ++unitIndex) {
+        var unit = units[unitIndex];
+        var unitContext = LinkedUnitContext(
+          this,
+          libraryContext,
+          unitIndex,
+          unit.uriStr,
+          unit,
+        );
+        libraryContext.units.add(unitContext);
+      }
+    }
+  }
+
+  LinkedBundleContext.forAst(this.elementFactory, this._references)
+      : _bundle = null;
+
+  LinkedLibraryContext addLinkingLibrary(
+    String uriStr,
+    LinkedNodeLibraryBuilder data,
+    LinkInputLibrary inputLibrary,
+  ) {
+    var uriStr = data.uriStr;
+    var libraryContext = LinkedLibraryContext(uriStr, this, data);
+    libraryMap[uriStr] = libraryContext;
+
+    var unitIndex = 0;
+    for (var inputUnit in inputLibrary.units) {
+      var source = inputUnit.source;
+      var unitUriStr = source != null ? '${source.uri}' : '';
+      libraryContext.units.add(
+        LinkedUnitContext(
+          this,
+          libraryContext,
+          unitIndex++,
+          unitUriStr,
+          null,
+          unit: inputUnit.unit,
+        ),
+      );
+    }
+    return libraryContext;
+  }
+
+  T elementOfIndex<T extends Element>(int index) {
+    var reference = referenceOfIndex(index);
+    return elementFactory.elementOfReference(reference);
+  }
+
+  List<T> elementsOfIndexes<T extends Element>(List<int> indexList) {
+    var result = List<T>(indexList.length);
+    for (var i = 0; i < indexList.length; ++i) {
+      var index = indexList[i];
+      result[i] = elementOfIndex(index);
+    }
+    return result;
+  }
+
+  Reference referenceOfIndex(int index) {
+    var reference = _references[index];
+    if (reference != null) return reference;
+
+    if (index == 0) {
+      reference = elementFactory.rootReference;
+      _references[index] = reference;
+      return reference;
+    }
+
+    var parentIndex = _bundle.references.parent[index];
+    var parent = referenceOfIndex(parentIndex);
+
+    var name = _bundle.references.name[index];
+    reference = parent.getChild(name);
+    _references[index] = reference;
+
+    return reference;
+  }
+}
+
+class LinkedLibraryContext {
+  final String uriStr;
+  final LinkedBundleContext context;
+  final LinkedNodeLibrary node;
+  final List<LinkedUnitContext> units = [];
+
+  LinkedLibraryContext(this.uriStr, this.context, this.node);
+
+  LinkedUnitContext get definingUnit => units.first;
+}
diff --git a/pkg/analyzer/lib/src/summary2/linked_element_factory.dart b/pkg/analyzer/lib/src/summary2/linked_element_factory.dart
new file mode 100644
index 0000000..41b8880
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary2/linked_element_factory.dart
@@ -0,0 +1,348 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/analysis/session.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/dart/resolver/scope.dart';
+import 'package:analyzer/src/generated/engine.dart' show AnalysisContext;
+import 'package:analyzer/src/summary/idl.dart';
+import 'package:analyzer/src/summary2/core_types.dart';
+import 'package:analyzer/src/summary2/linked_bundle_context.dart';
+import 'package:analyzer/src/summary2/linked_unit_context.dart';
+import 'package:analyzer/src/summary2/reference.dart';
+
+class LinkedElementFactory {
+  final AnalysisContext analysisContext;
+  final AnalysisSession analysisSession;
+  final Reference rootReference;
+  final Map<String, LinkedLibraryContext> libraryMap = {};
+
+  CoreTypes _coreTypes;
+
+  LinkedElementFactory(
+      this.analysisContext, this.analysisSession, this.rootReference);
+
+  CoreTypes get coreTypes {
+    return _coreTypes ??= CoreTypes(this);
+  }
+
+  void addBundle(LinkedBundleContext context) {
+    libraryMap.addAll(context.libraryMap);
+  }
+
+  Namespace buildExportNamespace(Uri uri) {
+    var exportedNames = <String, Element>{};
+
+    var exportedReferences = exportsOfLibrary('$uri');
+    for (var exportedReference in exportedReferences) {
+      var element = elementOfReference(exportedReference);
+      exportedNames[element.name] = element;
+    }
+
+    return Namespace(exportedNames);
+  }
+
+  Element elementOfReference(Reference reference) {
+    if (reference.element != null) {
+      return reference.element;
+    }
+    if (reference.parent == null) {
+      return null;
+    }
+
+    return _ElementRequest(this, reference).elementOfReference(reference);
+  }
+
+  List<Reference> exportsOfLibrary(String uriStr) {
+    var library = libraryMap[uriStr];
+    var exportIndexList = library.node.exports;
+    var exportReferences = List<Reference>(exportIndexList.length);
+    for (var i = 0; i < exportIndexList.length; ++i) {
+      var index = exportIndexList[i];
+      var reference = library.context.referenceOfIndex(index);
+      exportReferences[i] = reference;
+    }
+    return exportReferences;
+  }
+
+  LibraryElementImpl libraryOfUri(String uriStr) {
+    var reference = rootReference.getChild(uriStr);
+    return elementOfReference(reference);
+  }
+
+  LinkedNode nodeOfReference(Reference reference) {
+//    if (reference.node != null) {
+//      return reference.node;
+//    }
+//
+//    var unitRef = reference.parent?.parent;
+//    var unitContainer = unitRef?.parent;
+//    if (unitContainer?.name == '@unit') {
+//      var libraryUriStr = unitContainer.parent.name;
+//      var libraryData = libraryMap[libraryUriStr];
+//      for (var unitData in libraryData.node.units) {
+//        var definingUnitContext = LinkedUnitContext(
+//          libraryData.context,
+//          TokensContext(unitData.tokens),
+//        );
+//        _ElementRequest._indexUnitDeclarations(
+//          definingUnitContext,
+//          unitRef,
+//          unitData.node,
+//        );
+//        return reference.node;
+//      }
+//    }
+
+    throw UnimplementedError('$reference');
+  }
+}
+
+class _ElementRequest {
+  final LinkedElementFactory elementFactory;
+  final Reference input;
+
+  _ElementRequest(this.elementFactory, this.input);
+
+  ElementImpl elementOfReference(Reference reference) {
+    if (reference.element != null) {
+      return reference.element;
+    }
+
+    var parent2 = reference.parent.parent;
+    if (parent2 == null) {
+      return _createLibraryElement(reference);
+    }
+
+    var parentName = reference.parent.name;
+
+    if (parentName == '@class') {
+      var unit = elementOfReference(parent2);
+      return _class(unit, reference);
+    }
+
+    if (parentName == '@constructor') {
+      var class_ = elementOfReference(parent2);
+      return _constructor(class_, reference);
+    }
+
+    if (parentName == '@enum') {
+      var unit = elementOfReference(parent2);
+      return _enum(unit, reference);
+    }
+
+    if (parentName == '@function') {
+      CompilationUnitElementImpl enclosing = elementOfReference(parent2);
+      return _function(enclosing, reference);
+    }
+
+    if (parentName == '@getter' || parentName == '@setter') {
+      var enclosing = elementOfReference(parent2);
+      return _accessor(enclosing, reference);
+    }
+
+    if (parentName == '@method') {
+      var enclosing = elementOfReference(parent2);
+      return _method(enclosing, reference);
+    }
+
+    if (parentName == '@parameter') {
+      ExecutableElementImpl enclosing = elementOfReference(parent2);
+      return _parameter(enclosing, reference);
+    }
+
+    if (parentName == '@typeAlias') {
+      var unit = elementOfReference(parent2);
+      return _typeAlias(unit, reference);
+    }
+
+    if (parentName == '@unit') {
+      elementOfReference(parent2);
+      // Creating a library fills all its units.
+      assert(reference.element != null);
+      return reference.element;
+    }
+
+    // TODO(scheglov) support other elements
+    throw StateError('Not found: $input');
+  }
+
+  PropertyAccessorElementImpl _accessor(
+      ElementImpl enclosing, Reference reference) {
+    if (enclosing is ClassElementImpl) {
+      enclosing.accessors;
+      // Requesting accessors sets elements for accessors and fields.
+      assert(reference.element != null);
+      return reference.element;
+    }
+    if (enclosing is CompilationUnitElementImpl) {
+      enclosing.accessors;
+      // Requesting accessors sets elements for accessors and variables.
+      assert(reference.element != null);
+      return reference.element;
+    }
+    // Only classes and units have accessors.
+    throw StateError('${enclosing.runtimeType}');
+  }
+
+  ClassElementImpl _class(
+      CompilationUnitElementImpl unit, Reference reference) {
+    if (reference.node2 == null) {
+      _indexUnitElementDeclarations(unit);
+      assert(reference.node2 != null, '$reference');
+    }
+    ClassElementImpl.forLinkedNode(unit, reference, reference.node2);
+    return reference.element;
+  }
+
+  ConstructorElementImpl _constructor(
+      ClassElementImpl enclosing, Reference reference) {
+    enclosing.constructors;
+    // Requesting constructors sets elements for all of them.
+    assert(reference.element != null);
+    return reference.element;
+  }
+
+  LibraryElementImpl _createLibraryElement(Reference reference) {
+    var uriStr = reference.name;
+
+    var sourceFactory = elementFactory.analysisContext.sourceFactory;
+    var librarySource = sourceFactory.forUri(uriStr);
+
+    var libraryContext = elementFactory.libraryMap[uriStr];
+    // TODO(scheglov) don't use node
+    var node2 = libraryContext.node;
+    var hasName = node2.name.isNotEmpty;
+
+    var definingUnitContext = libraryContext.definingUnit;
+
+    var libraryElement = LibraryElementImpl.forLinkedNode(
+      elementFactory.analysisContext,
+      elementFactory.analysisSession,
+      node2.name,
+      hasName ? node2.nameOffset : -1,
+      node2.name.length,
+      definingUnitContext,
+      reference,
+      definingUnitContext.unit_withDeclarations,
+    );
+
+    var units = <CompilationUnitElementImpl>[];
+    var unitContainerRef = reference.getChild('@unit');
+    for (var unitContext in libraryContext.units) {
+      var unitNode = unitContext.unit_withDeclarations;
+
+      var unitSource = sourceFactory.forUri(unitContext.uriStr);
+      var unitElement = CompilationUnitElementImpl.forLinkedNode(
+        libraryElement,
+        unitContext,
+        unitContainerRef.getChild(unitContext.uriStr),
+        unitNode,
+      );
+      unitElement.source = unitSource;
+      unitElement.librarySource = librarySource;
+      units.add(unitElement);
+      unitContainerRef.getChild(unitContext.uriStr).element = unitElement;
+    }
+
+    libraryElement.definingCompilationUnit = units[0];
+    libraryElement.parts = units.skip(1).toList();
+    reference.element = libraryElement;
+
+    var typeProvider = elementFactory.analysisContext.typeProvider;
+    if (typeProvider != null) {
+      libraryElement.createLoadLibraryFunction(typeProvider);
+    }
+
+    return libraryElement;
+  }
+
+  EnumElementImpl _enum(CompilationUnitElementImpl unit, Reference reference) {
+    if (reference.node2 == null) {
+      _indexUnitElementDeclarations(unit);
+      assert(reference.node2 != null, '$reference');
+    }
+    EnumElementImpl.forLinkedNode(unit, reference, reference.node2);
+    return reference.element;
+  }
+
+  Element _function(CompilationUnitElementImpl enclosing, Reference reference) {
+    enclosing.functions;
+    assert(reference.element != null);
+    return reference.element;
+  }
+
+  void _indexUnitElementDeclarations(CompilationUnitElementImpl unit) {
+    var unitContext = unit.linkedContext;
+    var unitRef = unit.reference;
+    var unitNode = unit.linkedNode;
+    _indexUnitDeclarations(unitContext, unitRef, unitNode);
+  }
+
+  MethodElementImpl _method(ClassElementImpl enclosing, Reference reference) {
+    enclosing.methods;
+    // Requesting methods sets elements for all of them.
+    assert(reference.element != null);
+    return reference.element;
+  }
+
+  Element _parameter(ExecutableElementImpl enclosing, Reference reference) {
+    enclosing.parameters;
+    assert(reference.element != null);
+    return reference.element;
+  }
+
+  GenericTypeAliasElementImpl _typeAlias(
+      CompilationUnitElementImpl unit, Reference reference) {
+    if (reference.node2 == null) {
+      _indexUnitElementDeclarations(unit);
+      assert(reference.node2 != null, '$reference');
+    }
+    GenericTypeAliasElementImpl.forLinkedNode(unit, reference, reference.node2);
+    return reference.element;
+  }
+
+  /// Index nodes for which we choose to create elements individually,
+  /// for example [ClassDeclaration], so that its [Reference] has the node,
+  /// and we can call the [ClassElementImpl] constructor.
+  static void _indexUnitDeclarations(
+    LinkedUnitContext unitContext,
+    Reference unitRef,
+    CompilationUnit unitNode,
+  ) {
+    var classRef = unitRef.getChild('@class');
+    var enumRef = unitRef.getChild('@enum');
+    var functionRef = unitRef.getChild('@function');
+    var typeAliasRef = unitRef.getChild('@typeAlias');
+    var variableRef = unitRef.getChild('@variable');
+    for (var declaration in unitNode.declarations) {
+      if (declaration is ClassDeclaration) {
+        var name = declaration.name.name;
+        classRef.getChild(name).node2 = declaration;
+      } else if (declaration is ClassTypeAlias) {
+        var name = declaration.name.name;
+        classRef.getChild(name).node2 = declaration;
+      } else if (declaration is EnumDeclaration) {
+        var name = declaration.name.name;
+        enumRef.getChild(name).node2 = declaration;
+      } else if (declaration is FunctionDeclaration) {
+        var name = declaration.name.name;
+        functionRef.getChild(name).node2 = declaration;
+      } else if (declaration is FunctionTypeAlias) {
+        var name = declaration.name.name;
+        typeAliasRef.getChild(name).node2 = declaration;
+      } else if (declaration is GenericTypeAlias) {
+        var name = declaration.name.name;
+        typeAliasRef.getChild(name).node2 = declaration;
+      } else if (declaration is TopLevelVariableDeclaration) {
+        for (var variable in declaration.variables.variables) {
+          var name = variable.name.name;
+          variableRef.getChild(name).node2 = declaration;
+        }
+      }
+    }
+  }
+}
diff --git a/pkg/analyzer/lib/src/summary2/linked_unit_context.dart b/pkg/analyzer/lib/src/summary2/linked_unit_context.dart
new file mode 100644
index 0000000..7c044db
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary2/linked_unit_context.dart
@@ -0,0 +1,907 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/generated/utilities_dart.dart';
+import 'package:analyzer/src/summary/idl.dart';
+import 'package:analyzer/src/summary2/ast_binary_reader.dart';
+import 'package:analyzer/src/summary2/lazy_ast.dart';
+import 'package:analyzer/src/summary2/linked_bundle_context.dart';
+import 'package:analyzer/src/summary2/tokens_context.dart';
+
+/// The context of a unit - the context of the bundle, and the unit tokens.
+class LinkedUnitContext {
+  final LinkedBundleContext bundleContext;
+  final LinkedLibraryContext libraryContext;
+  final int indexInLibrary;
+  final String uriStr;
+  final LinkedNodeUnit data;
+  final TokensContext tokensContext;
+
+  AstBinaryReader _astReader;
+
+  CompilationUnit _unit;
+  bool _hasDirectivesRead = false;
+
+  /// Mapping from identifiers to real or synthetic type parameters.
+  ///
+  /// Real type parameters have corresponding [TypeParameter] nodes, and are
+  /// referenced from other AST nodes.
+  ///
+  /// Synthetic type parameters are added when [readType] begins reading a
+  /// [FunctionType], and removed when reading is done.
+  final Map<int, TypeParameterElement> _typeParameters = {};
+
+  int _nextSyntheticTypeParameterId = 0x10000;
+
+  LinkedUnitContext(this.bundleContext, this.libraryContext,
+      this.indexInLibrary, this.uriStr, this.data,
+      {CompilationUnit unit})
+      : tokensContext = data != null ? TokensContext(data.tokens) : null {
+    _astReader = AstBinaryReader(this);
+    _astReader.isLazy = unit == null;
+
+    _unit = unit;
+    _hasDirectivesRead = _unit != null;
+  }
+
+  CompilationUnit get unit => _unit;
+
+  CompilationUnit get unit_withDeclarations {
+    if (_unit == null) {
+      _unit = _astReader.readNode(data.node);
+    }
+    return _unit;
+  }
+
+  CompilationUnit get unit_withDirectives {
+    if (!_hasDirectivesRead) {
+      var directiveDataList = data.node.compilationUnit_directives;
+      for (var i = 0; i < directiveDataList.length; ++i) {
+        var directiveData = directiveDataList[i];
+        _unit.directives[i] = _astReader.readNode(directiveData);
+      }
+      _hasDirectivesRead = true;
+    }
+    return _unit;
+  }
+
+  /// Every [TypeParameter] node has [TypeParameterElement], which is created
+  /// during reading of this node. All type parameter nodes are read before
+  /// any nodes that reference them (bounds are read lazily later).
+  void addTypeParameter(int id, TypeParameter node) {
+    var element = TypeParameterElementImpl.forLinkedNode(null, null, node);
+    _typeParameters[id] = element;
+    node.name.staticElement = element;
+  }
+
+  /// Return the [LibraryElement] referenced in the [node].
+  LibraryElement directiveLibrary(UriBasedDirective node) {
+    var uriStr = LazyDirective.getSelectedUri(node);
+    if (uriStr == null || uriStr.isEmpty) return null;
+    return bundleContext.elementFactory.libraryOfUri(uriStr);
+  }
+
+  int getCodeLength(AstNode node) {
+    if (node is ClassDeclaration) {
+      return LazyClassDeclaration.get(node).data.codeLength;
+    } else if (node is ClassTypeAlias) {
+      return LazyClassTypeAlias.get(node).data.codeLength;
+    } else if (node is ConstructorDeclaration) {
+      return LazyConstructorDeclaration.get(node).data.codeLength;
+    } else if (node is FormalParameter) {
+      return LazyFormalParameter.get(node).data.codeLength;
+    } else if (node is FunctionDeclaration) {
+      return LazyFunctionDeclaration.get(node).data.codeLength;
+    } else if (node is MethodDeclaration) {
+      return LazyMethodDeclaration.get(node).data.codeLength;
+    } else if (node is TypeParameter) {
+      return LazyTypeParameter.get(node).data.codeLength;
+    } else if (node is VariableDeclaration) {
+      return LazyVariableDeclaration.get(node).data.codeLength;
+    }
+    throw UnimplementedError('${node.runtimeType}');
+  }
+
+  int getCodeOffset(AstNode node) {
+    if (node is ClassDeclaration) {
+      return LazyClassDeclaration.get(node).data.codeOffset;
+    } else if (node is ClassTypeAlias) {
+      return LazyClassTypeAlias.get(node).data.codeOffset;
+    } else if (node is ConstructorDeclaration) {
+      return LazyConstructorDeclaration.get(node).data.codeOffset;
+    } else if (node is FormalParameter) {
+      return LazyFormalParameter.get(node).data.codeOffset;
+    } else if (node is FunctionDeclaration) {
+      return LazyFunctionDeclaration.get(node).data.codeOffset;
+    } else if (node is MethodDeclaration) {
+      return LazyMethodDeclaration.get(node).data.codeOffset;
+    } else if (node is TypeParameter) {
+      return LazyTypeParameter.get(node).data.codeOffset;
+    } else if (node is VariableDeclaration) {
+      return LazyVariableDeclaration.get(node).data.codeOffset;
+    }
+    throw UnimplementedError('${node.runtimeType}');
+  }
+
+  String getConstructorDeclarationName(LinkedNode node) {
+    var name = node.constructorDeclaration_name;
+    if (name != null) {
+      return getSimpleName(name);
+    }
+    return '';
+  }
+
+  List<ConstructorInitializer> getConstructorInitializers(
+    ConstructorDeclaration node,
+  ) {
+    LazyConstructorDeclaration.readInitializers(_astReader, node);
+    return node.initializers;
+  }
+
+  ConstructorName getConstructorRedirected(ConstructorDeclaration node) {
+    LazyConstructorDeclaration.readRedirectedConstructor(_astReader, node);
+    return node.redirectedConstructor;
+  }
+
+  Iterable<ConstructorDeclaration> getConstructors(AstNode node) sync* {
+    if (node is ClassOrMixinDeclaration) {
+      var members = _getClassOrMixinMembers(node);
+      for (var member in members) {
+        if (member is ConstructorDeclaration) {
+          yield member;
+        }
+      }
+    }
+  }
+
+  Comment getDocumentationComment(AstNode node) {
+    if (node is ClassDeclaration) {
+      LazyClassDeclaration.readDocumentationComment(_astReader, node);
+      return node.documentationComment;
+    } else if (node is ClassTypeAlias) {
+      LazyClassTypeAlias.readDocumentationComment(_astReader, node);
+      return node.documentationComment;
+    } else if (node is ConstructorDeclaration) {
+      LazyConstructorDeclaration.readDocumentationComment(_astReader, node);
+      return node.documentationComment;
+    } else if (node is EnumConstantDeclaration) {
+      LazyEnumConstantDeclaration.readDocumentationComment(_astReader, node);
+      return node.documentationComment;
+    } else if (node is EnumDeclaration) {
+      LazyEnumDeclaration.readDocumentationComment(_astReader, node);
+      return node.documentationComment;
+    } else if (node is FunctionDeclaration) {
+      LazyFunctionDeclaration.readDocumentationComment(_astReader, node);
+      return node.documentationComment;
+    } else if (node is FunctionTypeAlias) {
+      LazyFunctionTypeAlias.readDocumentationComment(_astReader, node);
+      return node.documentationComment;
+    } else if (node is GenericTypeAlias) {
+      LazyGenericTypeAlias.readDocumentationComment(_astReader, node);
+      return node.documentationComment;
+    } else if (node is MethodDeclaration) {
+      LazyMethodDeclaration.readDocumentationComment(_astReader, node);
+      return node.documentationComment;
+    } else if (node is MixinDeclaration) {
+      LazyMixinDeclaration.readDocumentationComment(_astReader, node);
+      return node.documentationComment;
+    } else if (node is VariableDeclaration) {
+      var parent2 = node.parent.parent;
+      if (parent2 is FieldDeclaration) {
+        LazyFieldDeclaration.readDocumentationComment(_astReader, parent2);
+        return parent2.documentationComment;
+      } else if (parent2 is TopLevelVariableDeclaration) {
+        LazyTopLevelVariableDeclaration.readDocumentationComment(
+          _astReader,
+          parent2,
+        );
+        return parent2.documentationComment;
+      } else {
+        throw UnimplementedError('${parent2.runtimeType}');
+      }
+    } else {
+      throw UnimplementedError('${node.runtimeType}');
+    }
+  }
+
+  List<EnumConstantDeclaration> getEnumConstants(EnumDeclaration node) {
+    LazyEnumDeclaration.readConstants(_astReader, node);
+    return node.constants;
+  }
+
+  Iterable<VariableDeclaration> getFields(ClassOrMixinDeclaration node) sync* {
+    var members = _getClassOrMixinMembers(node);
+    for (var member in members) {
+      if (member is FieldDeclaration) {
+        for (var field in member.fields.variables) {
+          yield field;
+        }
+      }
+    }
+  }
+
+  String getFormalParameterName(LinkedNode node) {
+    return getSimpleName(node.normalFormalParameter_identifier);
+  }
+
+  List<FormalParameter> getFormalParameters(AstNode node) {
+    if (node is ConstructorDeclaration) {
+      LazyConstructorDeclaration.readFormalParameters(_astReader, node);
+      return node.parameters.parameters;
+    } else if (node is FunctionDeclaration) {
+      LazyFunctionDeclaration.readFunctionExpression(_astReader, node);
+      return getFormalParameters(node.functionExpression);
+    } else if (node is FunctionExpression) {
+      LazyFunctionExpression.readFormalParameters(_astReader, node);
+      return node.parameters?.parameters;
+    } else if (node is FunctionTypeAlias) {
+      LazyFunctionTypeAlias.readFormalParameters(_astReader, node);
+      return node.parameters.parameters;
+    } else if (node is GenericFunctionType) {
+      LazyGenericFunctionType.readFormalParameters(_astReader, node);
+      return node.parameters.parameters;
+    } else if (node is MethodDeclaration) {
+      LazyMethodDeclaration.readFormalParameters(_astReader, node);
+      return node.parameters?.parameters;
+    } else {
+      throw UnimplementedError('${node.runtimeType}');
+    }
+//    if (kind == LinkedNodeKind.constructorDeclaration) {
+//      parameterList = node.constructorDeclaration_parameters;
+//    } else if (kind == LinkedNodeKind.functionDeclaration) {
+//      return getFormalParameters(node.functionDeclaration_functionExpression);
+//    } else if (kind == LinkedNodeKind.functionExpression) {
+//      parameterList = node.functionExpression_formalParameters;
+//    } else if (kind == LinkedNodeKind.functionTypeAlias) {
+//      parameterList = node.functionTypeAlias_formalParameters;
+//    } else if (kind == LinkedNodeKind.genericFunctionType) {
+//      parameterList = node.genericFunctionType_formalParameters;
+//    } else if (kind == LinkedNodeKind.methodDeclaration) {
+//      parameterList = node.methodDeclaration_formalParameters;
+//    } else {
+//      throw UnimplementedError('$kind');
+//    }
+  }
+
+  GenericFunctionType getGeneticTypeAliasFunction(GenericTypeAlias node) {
+    LazyGenericTypeAlias.readFunctionType(_astReader, node);
+    return node.functionType;
+  }
+
+  ImplementsClause getImplementsClause(AstNode node) {
+    if (node is ClassDeclaration) {
+      LazyClassDeclaration.readImplementsClause(_astReader, node);
+      return node.implementsClause;
+    } else if (node is ClassTypeAlias) {
+      LazyClassTypeAlias.readImplementsClause(_astReader, node);
+      return node.implementsClause;
+    } else if (node is MixinDeclaration) {
+      LazyMixinDeclaration.readImplementsClause(_astReader, node);
+      return node.implementsClause;
+    } else {
+      throw UnimplementedError('${node.runtimeType}');
+    }
+  }
+
+  InterfaceType getInterfaceType(LinkedNodeType linkedType) {
+    var type = readType(linkedType);
+    if (type is InterfaceType && !type.element.isEnum) {
+      return type;
+    }
+    return null;
+  }
+
+  Comment getLibraryDocumentationComment(CompilationUnit unit) {
+    for (var directive in unit.directives) {
+      if (directive is LibraryDirective) {
+        return directive.documentationComment;
+      }
+    }
+    return null;
+  }
+
+  List<Annotation> getLibraryMetadata(CompilationUnit unit) {
+    for (var directive in unit.directives) {
+      if (directive is LibraryDirective) {
+        return getMetadata(directive);
+      }
+    }
+    return const <Annotation>[];
+  }
+
+  List<Annotation> getMetadata(AstNode node) {
+    if (node is ClassDeclaration) {
+      LazyClassDeclaration.readMetadata(_astReader, node);
+      return node.metadata;
+    } else if (node is ClassTypeAlias) {
+      LazyClassTypeAlias.readMetadata(_astReader, node);
+      return node.metadata;
+    } else if (node is CompilationUnit) {
+      assert(node == _unit);
+      return _getPartDirectiveAnnotation();
+    } else if (node is ConstructorDeclaration) {
+      LazyConstructorDeclaration.readMetadata(_astReader, node);
+      return node.metadata;
+    } else if (node is DefaultFormalParameter) {
+      return getMetadata(node.parameter);
+    } else if (node is Directive) {
+      LazyDirective.readMetadata(_astReader, node);
+      return node.metadata;
+    } else if (node is EnumConstantDeclaration) {
+      LazyEnumConstantDeclaration.readMetadata(_astReader, node);
+      return node.metadata;
+    } else if (node is EnumDeclaration) {
+      LazyEnumDeclaration.readMetadata(_astReader, node);
+      return node.metadata;
+    } else if (node is FormalParameter) {
+      LazyFormalParameter.readMetadata(_astReader, node);
+      return node.metadata;
+    } else if (node is FunctionDeclaration) {
+      LazyFunctionDeclaration.readMetadata(_astReader, node);
+      return node.metadata;
+    } else if (node is FunctionTypeAlias) {
+      LazyFunctionTypeAlias.readMetadata(_astReader, node);
+      return node.metadata;
+    } else if (node is MethodDeclaration) {
+      LazyMethodDeclaration.readMetadata(_astReader, node);
+      return node.metadata;
+    } else if (node is VariableDeclaration) {
+      var parent2 = node.parent.parent;
+      if (parent2 is FieldDeclaration) {
+        LazyFieldDeclaration.readMetadata(_astReader, parent2);
+        return parent2.metadata;
+      } else if (parent2 is TopLevelVariableDeclaration) {
+        LazyTopLevelVariableDeclaration.readMetadata(_astReader, parent2);
+        return parent2.metadata;
+      }
+    }
+//    var kind = node.kind;
+//    if (kind == LinkedNodeKind.classDeclaration ||
+//        kind == LinkedNodeKind.classTypeAlias ||
+//        kind == LinkedNodeKind.constructorDeclaration ||
+//        kind == LinkedNodeKind.enumConstantDeclaration ||
+//        kind == LinkedNodeKind.enumDeclaration ||
+//        kind == LinkedNodeKind.exportDirective ||
+//        kind == LinkedNodeKind.functionDeclaration ||
+//        kind == LinkedNodeKind.functionTypeAlias ||
+//        kind == LinkedNodeKind.libraryDirective ||
+//        kind == LinkedNodeKind.importDirective ||
+//        kind == LinkedNodeKind.methodDeclaration ||
+//        kind == LinkedNodeKind.mixinDeclaration ||
+//        kind == LinkedNodeKind.partDirective ||
+//        kind == LinkedNodeKind.partOfDirective ||
+//        kind == LinkedNodeKind.variableDeclaration) {
+//      return node.annotatedNode_metadata;
+//    }
+//    if (kind == LinkedNodeKind.defaultFormalParameter) {
+//      return getMetadataOrEmpty(node.defaultFormalParameter_parameter);
+//    }
+//    if (kind == LinkedNodeKind.fieldFormalParameter ||
+//        kind == LinkedNodeKind.functionTypedFormalParameter ||
+//        kind == LinkedNodeKind.simpleFormalParameter) {
+//      return node.normalFormalParameter_metadata;
+//    }
+    return const <Annotation>[];
+  }
+
+  String getMethodName(LinkedNode node) {
+    return getSimpleName(node.methodDeclaration_name);
+  }
+
+  Iterable<MethodDeclaration> getMethods(AstNode node) sync* {
+    if (node is ClassOrMixinDeclaration) {
+      var members = _getClassOrMixinMembers(node);
+      for (var member in members) {
+        if (member is MethodDeclaration) {
+          yield member;
+        }
+      }
+    }
+  }
+
+  int getNameOffset(AstNode node) {
+    if (node is NamedCompilationUnitMember) {
+      return node.name.offset;
+    } else if (node is EnumConstantDeclaration) {
+      return node.name.offset;
+    } else if (node is FormalParameter) {
+      return node.identifier.offset;
+    } else if (node is VariableDeclaration) {
+      return node.name.offset;
+    }
+    throw UnimplementedError('${node.runtimeType}');
+  }
+
+  OnClause getOnClause(MixinDeclaration node) {
+    LazyMixinDeclaration.readOnClause(_astReader, node);
+    return node.onClause;
+  }
+
+  /// Return the actual return type for the [node] - explicit or inferred.
+  DartType getReturnType(AstNode node) {
+    if (node is FunctionDeclaration) {
+      return LazyFunctionDeclaration.getReturnType(_astReader, node);
+    } else if (node is FunctionTypeAlias) {
+      return LazyFunctionTypeAlias.getReturnType(_astReader, node);
+    } else if (node is GenericFunctionType) {
+      return LazyGenericFunctionType.getReturnType(_astReader, node);
+    } else if (node is MethodDeclaration) {
+      return LazyMethodDeclaration.getReturnType(_astReader, node);
+    } else {
+      throw UnimplementedError('${node.runtimeType}');
+    }
+  }
+
+  String getSimpleName(LinkedNode node) {
+    return getTokenLexeme(node.simpleIdentifier_token);
+  }
+
+  List<String> getSimpleNameList(List<LinkedNode> nodeList) {
+    return nodeList.map(getSimpleName).toList();
+  }
+
+  int getSimpleOffset(LinkedNode node) {
+    return getTokenOffset(node.simpleIdentifier_token);
+  }
+
+  String getStringContent(LinkedNode node) {
+    return node.simpleStringLiteral_value;
+  }
+
+  TypeName getSuperclass(AstNode node) {
+    if (node is ClassDeclaration) {
+      LazyClassDeclaration.readExtendsClause(_astReader, node);
+      return node.extendsClause?.superclass;
+    } else if (node is ClassTypeAlias) {
+      LazyClassTypeAlias.readSuperclass(_astReader, node);
+      return node.superclass;
+    } else {
+      throw StateError('${node.runtimeType}');
+    }
+  }
+
+  String getTokenLexeme(int token) {
+    return tokensContext.lexeme(token);
+  }
+
+  int getTokenOffset(int token) {
+    return tokensContext.offset(token);
+  }
+
+  /// Return the actual type for the [node] - explicit or inferred.
+  DartType getType(AstNode node) {
+    if (node is DefaultFormalParameter) {
+      return getType(node.parameter);
+    } else if (node is FormalParameter) {
+      return LazyFormalParameter.getType(_astReader, node);
+    } else if (node is VariableDeclaration) {
+      return LazyVariableDeclaration.getType(_astReader, node);
+    } else {
+      throw UnimplementedError('${node.runtimeType}');
+    }
+  }
+
+  TypeAnnotation getTypeParameterBound(TypeParameter node) {
+    LazyTypeParameter.readBound(_astReader, node);
+    return node.bound;
+  }
+
+  TypeParameterList getTypeParameters2(AstNode node) {
+    if (node is ClassDeclaration) {
+      return node.typeParameters;
+    } else if (node is ClassTypeAlias) {
+      return node.typeParameters;
+    } else if (node is ConstructorDeclaration) {
+      return null;
+    } else if (node is FunctionDeclaration) {
+      LazyFunctionDeclaration.readFunctionExpression(_astReader, node);
+      return getTypeParameters2(node.functionExpression);
+    } else if (node is FunctionExpression) {
+      return node.typeParameters;
+    } else if (node is FunctionTypeAlias) {
+      return node.typeParameters;
+    } else if (node is GenericFunctionType) {
+      return node.typeParameters;
+    } else if (node is GenericTypeAlias) {
+      return node.typeParameters;
+    } else if (node is MethodDeclaration) {
+      return node.typeParameters;
+    } else if (node is MixinDeclaration) {
+      return node.typeParameters;
+    } else {
+      throw UnimplementedError('${node.runtimeType}');
+    }
+  }
+
+  String getUnitMemberName(LinkedNode node) {
+    return getSimpleName(node.namedCompilationUnitMember_name);
+  }
+
+  String getVariableName(LinkedNode node) {
+    return getSimpleName(node.variableDeclaration_name);
+  }
+
+  WithClause getWithClause(AstNode node) {
+    if (node is ClassDeclaration) {
+      LazyClassDeclaration.readWithClause(_astReader, node);
+      return node.withClause;
+    } else if (node is ClassTypeAlias) {
+      LazyClassTypeAlias.readWithClause(_astReader, node);
+      return node.withClause;
+    } else {
+      throw UnimplementedError('${node.runtimeType}');
+    }
+  }
+
+  bool hasImplicitReturnType(AstNode node) {
+    if (node is MethodDeclaration) {
+      return node.returnType == null;
+    }
+    return false;
+  }
+
+  bool hasImplicitType(AstNode node) {
+    if (node is VariableDeclaration) {
+      VariableDeclarationList parent = node.parent;
+      return parent.type == null;
+    } else if (node is SimpleFormalParameter) {
+      return node.type == null;
+    }
+    return false;
+  }
+
+  bool hasOverrideInferenceDone(AstNode node) {
+    // Only nodes in the libraries being linked might be not inferred yet.
+    if (_astReader.isLazy) return true;
+
+    return LazyAst.hasOverrideInferenceDone(node);
+  }
+
+  bool isAbstract(AstNode node) {
+    if (node is ClassDeclaration) {
+      return node.abstractKeyword != null;
+    } else if (node is ClassTypeAlias) {
+      return node.abstractKeyword != null;
+    } else if (node is FunctionDeclaration) {
+      return false;
+    } else if (node is MethodDeclaration) {
+      return node.isAbstract;
+    }
+    throw UnimplementedError('${node.runtimeType}');
+  }
+
+  bool isAsynchronous(AstNode node) {
+    var body = _getFunctionBody(node);
+    return body.isAsynchronous;
+  }
+
+  bool isAsyncKeyword(int token) {
+    return tokensContext.type(token) == UnlinkedTokenType.ASYNC;
+  }
+
+  bool isConst(AstNode node) {
+    if (node is FormalParameter) {
+      return node.isConst;
+    }
+    if (node is VariableDeclaration) {
+      VariableDeclarationList parent = node.parent;
+      return parent.isConst;
+    }
+//    var kind = node.kind;
+//    if (kind == LinkedNodeKind.defaultFormalParameter) {
+//      return isConst(node.defaultFormalParameter_parameter);
+//    }
+//    if (kind == LinkedNodeKind.simpleFormalParameter) {
+//      return isConstKeyword(node.simpleFormalParameter_keyword);
+//    }
+//    if (kind == LinkedNodeKind.variableDeclaration) {
+//      return node.variableDeclaration_declaration.isConst;
+//    }
+    throw UnimplementedError('${node.runtimeType}');
+  }
+
+  bool isConstKeyword(int token) {
+    return tokensContext.type(token) == UnlinkedTokenType.CONST;
+  }
+
+  bool isConstVariableList(LinkedNode node) {
+    return isConstKeyword(node.variableDeclarationList_keyword);
+  }
+
+  bool isCovariant(AstNode node) {
+    if (node is FormalParameter) {
+      return node.covariantKeyword != null;
+    } else if (node is VariableDeclaration) {
+      var parent2 = node.parent.parent;
+      return parent2 is FieldDeclaration && parent2.covariantKeyword != null;
+    }
+    return false;
+  }
+
+  bool isExternal(AstNode node) {
+    if (node is ConstructorDeclaration) {
+      return node.externalKeyword != null;
+    } else if (node is FunctionDeclaration) {
+      return node.externalKeyword != null;
+    } else if (node is MethodDeclaration) {
+      return node.externalKeyword != null;
+    } else {
+      throw UnimplementedError('${node.runtimeType}');
+    }
+  }
+
+  bool isFinal(AstNode node) {
+    if (node is EnumConstantDeclaration) {
+      return false;
+    }
+    if (node is VariableDeclaration) {
+      VariableDeclarationList parent = node.parent;
+      return parent.isFinal;
+    }
+    throw UnimplementedError('${node.runtimeType}');
+  }
+
+  bool isFinalKeyword(int token) {
+    return tokensContext.type(token) == UnlinkedTokenType.FINAL;
+  }
+
+  bool isFinalVariableList(LinkedNode node) {
+    return isFinalKeyword(node.variableDeclarationList_keyword);
+  }
+
+  bool isFunction(LinkedNode node) {
+    return node.kind == LinkedNodeKind.functionDeclaration;
+  }
+
+  bool isGenerator(AstNode node) {
+    var body = _getFunctionBody(node);
+    return body.isGenerator;
+  }
+
+  bool isGetter(AstNode node) {
+    if (node is FunctionDeclaration) {
+      return node.isGetter;
+    } else if (node is MethodDeclaration) {
+      return node.isGetter;
+    } else {
+      throw StateError('${node.runtimeType}');
+    }
+  }
+
+  bool isLibraryKeyword(int token) {
+    return tokensContext.type(token) == UnlinkedTokenType.LIBRARY;
+  }
+
+  bool isMethod(LinkedNode node) {
+    return node.kind == LinkedNodeKind.methodDeclaration;
+  }
+
+  bool isSetter(AstNode node) {
+    if (node is FunctionDeclaration) {
+      return node.isSetter;
+    } else if (node is MethodDeclaration) {
+      return node.isSetter;
+    } else {
+      throw StateError('${node.runtimeType}');
+    }
+  }
+
+  bool isSimplyBounded(AstNode node) {
+    return LazyAst.isSimplyBounded(node);
+  }
+
+  bool isStatic(AstNode node) {
+    if (node is FunctionDeclaration) {
+      return true;
+    } else if (node is MethodDeclaration) {
+      return node.modifierKeyword != null;
+    } else if (node is VariableDeclaration) {
+      var parent2 = node.parent.parent;
+      return parent2 is FieldDeclaration && parent2.isStatic;
+    }
+    throw UnimplementedError('${node.runtimeType}');
+  }
+
+  bool isSyncKeyword(int token) {
+    return tokensContext.type(token) == UnlinkedTokenType.SYNC;
+  }
+
+  Expression readInitializer(ElementImpl enclosing, AstNode node) {
+    if (node is DefaultFormalParameter) {
+      LazyFormalParameter.readDefaultValue(_astReader, node);
+      return node.defaultValue;
+    } else if (node is VariableDeclaration) {
+      LazyVariableDeclaration.readInitializer(_astReader, node);
+      return node.initializer;
+    } else {
+      throw StateError('${node.runtimeType}');
+    }
+  }
+
+  AstNode readNode(LinkedNode linkedNode) {
+    return _astReader.readNode(linkedNode);
+  }
+
+  DartType readType(LinkedNodeType linkedType) {
+    if (linkedType == null) return null;
+
+    var kind = linkedType.kind;
+    if (kind == LinkedNodeTypeKind.bottom) {
+      return BottomTypeImpl.instance;
+    } else if (kind == LinkedNodeTypeKind.dynamic_) {
+      return DynamicTypeImpl.instance;
+    } else if (kind == LinkedNodeTypeKind.function) {
+      var typeParameterDataList = linkedType.functionTypeParameters;
+
+      var typeParameters = <TypeParameterElement>[];
+      for (var typeParameterData in typeParameterDataList) {
+        var element = TypeParameterElementImpl(typeParameterData.name, -1);
+        typeParameters.add(element);
+        _typeParameters[_nextSyntheticTypeParameterId++] = element;
+      }
+
+      var returnType = readType(linkedType.functionReturnType);
+      var formalParameters = linkedType.functionFormalParameters.map((p) {
+        var type = readType(p.type);
+        var kind = _formalParameterKind(p.kind);
+        return ParameterElementImpl.synthetic(p.name, type, kind);
+      }).toList();
+
+      for (var i = 0; i < typeParameterDataList.length; ++i) {
+        _typeParameters.remove(--_nextSyntheticTypeParameterId);
+      }
+
+      return FunctionTypeImpl.synthetic(
+        returnType,
+        typeParameters,
+        formalParameters,
+      );
+    } else if (kind == LinkedNodeTypeKind.interface) {
+      var element = bundleContext.elementOfIndex(linkedType.interfaceClass);
+      return InterfaceTypeImpl.explicit(
+        element,
+        linkedType.interfaceTypeArguments.map(readType).toList(),
+      );
+    } else if (kind == LinkedNodeTypeKind.typeParameter) {
+      var id = linkedType.typeParameterId;
+      var element = _typeParameters[id];
+      assert(element != null);
+      return TypeParameterTypeImpl(element);
+    } else if (kind == LinkedNodeTypeKind.void_) {
+      return VoidTypeImpl.instance;
+    } else {
+      throw UnimplementedError('$kind');
+    }
+  }
+
+  void setOverrideInferenceDone(AstNode node) {
+    assert(!_astReader.isLazy);
+    LazyAst.setOverrideInferenceDone(node);
+  }
+
+  void setReturnType(AstNode node, DartType type) {
+    LazyAst.setReturnType(node, type);
+  }
+
+  void setVariableType(AstNode node, DartType type) {
+    LazyAst.setType(node, type);
+  }
+
+  bool shouldBeConstFieldElement(AstNode node) {
+    if (node is VariableDeclaration) {
+      VariableDeclarationList variableList = node.parent;
+      if (variableList.isConst) return true;
+
+      if (variableList.isFinal) {
+        ClassDeclaration classDeclaration = variableList.parent.parent;
+        for (var member in classDeclaration.members) {
+          if (member is ConstructorDeclaration && member.constKeyword != null) {
+            return true;
+          }
+        }
+      }
+    }
+    return false;
+  }
+
+  Iterable<VariableDeclaration> topLevelVariables(CompilationUnit unit) sync* {
+    for (var declaration in unit.declarations) {
+      if (declaration is TopLevelVariableDeclaration) {
+        for (var variable in declaration.variables.variables) {
+          yield variable;
+        }
+      }
+    }
+  }
+
+  ParameterKind _formalParameterKind(LinkedNodeFormalParameterKind kind) {
+    if (kind == LinkedNodeFormalParameterKind.optionalNamed) {
+      return ParameterKind.NAMED;
+    }
+    if (kind == LinkedNodeFormalParameterKind.optionalPositional) {
+      return ParameterKind.POSITIONAL;
+    }
+    return ParameterKind.REQUIRED;
+  }
+
+  List<ClassMember> _getClassOrMixinMembers(ClassOrMixinDeclaration node) {
+    if (node is ClassDeclaration) {
+      LazyClassDeclaration.readMembers(_astReader, node);
+    } else if (node is MixinDeclaration) {
+      LazyMixinDeclaration.readMembers(_astReader, node);
+    } else {
+      throw StateError('${node.runtimeType}');
+    }
+    return node.members;
+  }
+
+  FunctionBody _getFunctionBody(AstNode node) {
+    if (node is ConstructorDeclaration) {
+      LazyConstructorDeclaration.readBody(_astReader, node);
+      return node.body;
+    } else if (node is FunctionDeclaration) {
+      LazyFunctionDeclaration.readFunctionExpression(_astReader, node);
+      return _getFunctionBody(node.functionExpression);
+    } else if (node is FunctionExpression) {
+      LazyFunctionExpression.readBody(_astReader, node);
+      return node.body;
+    } else if (node is MethodDeclaration) {
+      LazyMethodDeclaration.readBody(_astReader, node);
+      return node.body;
+    } else {
+      throw UnimplementedError('${node.runtimeType}');
+    }
+  }
+
+  NodeList<Annotation> _getPartDirectiveAnnotation() {
+    if (indexInLibrary != 0) {
+      var definingContext = libraryContext.definingUnit;
+      var unit = definingContext.unit;
+      var partDirectiveIndex = 0;
+      for (var directive in unit.directives) {
+        if (directive is PartDirective) {
+          partDirectiveIndex++;
+          if (partDirectiveIndex == indexInLibrary) {
+            LazyDirective.readMetadata(definingContext._astReader, directive);
+            return directive.metadata;
+          }
+        }
+      }
+    }
+    throw StateError('Expected to find $indexInLibrary part directive.');
+  }
+
+  static List<LinkedNode> getTypeParameters(LinkedNode node) {
+    LinkedNode typeParameterList;
+    var kind = node.kind;
+    if (kind == LinkedNodeKind.classTypeAlias) {
+      typeParameterList = node.classTypeAlias_typeParameters;
+    } else if (kind == LinkedNodeKind.classDeclaration ||
+        kind == LinkedNodeKind.mixinDeclaration) {
+      typeParameterList = node.classOrMixinDeclaration_typeParameters;
+    } else if (kind == LinkedNodeKind.constructorDeclaration) {
+      return const [];
+    } else if (kind == LinkedNodeKind.functionDeclaration) {
+      return getTypeParameters(node.functionDeclaration_functionExpression);
+    } else if (kind == LinkedNodeKind.functionExpression) {
+      typeParameterList = node.functionExpression_typeParameters;
+    } else if (kind == LinkedNodeKind.functionTypeAlias) {
+      typeParameterList = node.functionTypeAlias_typeParameters;
+    } else if (kind == LinkedNodeKind.genericFunctionType) {
+      typeParameterList = node.genericFunctionType_typeParameters;
+    } else if (kind == LinkedNodeKind.genericTypeAlias) {
+      typeParameterList = node.genericTypeAlias_typeParameters;
+    } else if (kind == LinkedNodeKind.methodDeclaration) {
+      typeParameterList = node.methodDeclaration_typeParameters;
+    } else {
+      throw UnimplementedError('$kind');
+    }
+    return typeParameterList?.typeParameterList_typeParameters;
+  }
+}
diff --git a/pkg/analyzer/lib/src/summary2/linking_bundle_context.dart b/pkg/analyzer/lib/src/summary2/linking_bundle_context.dart
new file mode 100644
index 0000000..06d86ce
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary2/linking_bundle_context.dart
@@ -0,0 +1,175 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/dart/element/member.dart';
+import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type_algebra.dart';
+import 'package:analyzer/src/generated/utilities_dart.dart';
+import 'package:analyzer/src/summary/format.dart';
+import 'package:analyzer/src/summary/idl.dart';
+import 'package:analyzer/src/summary2/reference.dart';
+
+class LinkingBundleContext {
+  /// The `dynamic` class is declared in `dart:core`, but is not a class.
+  /// Also, it is static, so we cannot set `reference` for it.
+  /// So, we have to push it in a separate way.
+  final Reference dynamicReference;
+
+  /// References used in all libraries being linked.
+  /// Element references in nodes are indexes in this list.
+  final List<Reference> references = [null];
+
+  /// Data about [references].
+  final LinkedNodeReferencesBuilder referencesBuilder =
+      LinkedNodeReferencesBuilder(
+    parent: [0],
+    name: [''],
+  );
+
+  final Map<TypeParameterElement, int> _typeParameters = Map.identity();
+  int _nextTypeParameterId = 1;
+  int _nextSyntheticTypeParameterId = 0x10000;
+
+  LinkingBundleContext(this.dynamicReference);
+
+  void addTypeParameter(TypeParameterElement element) {
+    _typeParameters[element] = _nextTypeParameterId++;
+  }
+
+  int idOfTypeParameter(TypeParameterElement element) {
+    return _typeParameters[element];
+  }
+
+  int indexOfElement(Element element) {
+    if (element == null) return 0;
+
+    if (identical(element, DynamicElementImpl.instance)) {
+      return indexOfReference(dynamicReference);
+    }
+
+    if (element is Member) {
+      element = (element as Member).baseElement;
+    }
+
+    var reference = (element as ElementImpl).reference;
+    return indexOfReference(reference);
+  }
+
+  int indexOfReference(Reference reference) {
+    if (reference == null) return 0;
+    if (reference.parent == null) return 0;
+    if (reference.index != null) return reference.index;
+
+    var parentIndex = indexOfReference(reference.parent);
+    referencesBuilder.parent.add(parentIndex);
+    referencesBuilder.name.add(reference.name);
+
+    reference.index = references.length;
+    references.add(reference);
+    return reference.index;
+  }
+
+  LinkedNodeTypeBuilder writeType(DartType type) {
+    if (type == null) return null;
+
+    if (type.isBottom) {
+      return LinkedNodeTypeBuilder(
+        kind: LinkedNodeTypeKind.bottom,
+      );
+    } else if (type.isDynamic) {
+      return LinkedNodeTypeBuilder(
+        kind: LinkedNodeTypeKind.dynamic_,
+      );
+    } else if (type is FunctionType) {
+      return _writeFunctionType(type);
+    } else if (type is InterfaceType) {
+      return LinkedNodeTypeBuilder(
+        kind: LinkedNodeTypeKind.interface,
+        interfaceClass: indexOfElement(type.element),
+        interfaceTypeArguments: type.typeArguments.map(writeType).toList(),
+      );
+    } else if (type is TypeParameterType) {
+      TypeParameterElementImpl element = type.element;
+      return LinkedNodeTypeBuilder(
+        kind: LinkedNodeTypeKind.typeParameter,
+        typeParameterId: _typeParameters[element],
+      );
+    } else if (type is VoidType) {
+      return LinkedNodeTypeBuilder(
+        kind: LinkedNodeTypeKind.void_,
+      );
+    } else {
+      throw UnimplementedError('(${type.runtimeType}) $type');
+    }
+  }
+
+  LinkedNodeFormalParameterKind _formalParameterKind(ParameterElement p) {
+    // ignore: deprecated_member_use_from_same_package
+    var kind = p.parameterKind;
+    if (kind == ParameterKind.NAMED) {
+      return LinkedNodeFormalParameterKind.optionalNamed;
+    }
+    if (kind == ParameterKind.POSITIONAL) {
+      return LinkedNodeFormalParameterKind.optionalPositional;
+    }
+    return LinkedNodeFormalParameterKind.required;
+  }
+
+  FunctionType _toSyntheticFunctionType(FunctionType type) {
+    var typeParameters = type.typeFormals;
+
+    if (typeParameters.isEmpty) return type;
+
+    var onlySyntheticTypeParameters = typeParameters.every((e) {
+      return e is TypeParameterElementImpl && e.linkedNode == null;
+    });
+    if (onlySyntheticTypeParameters) return type;
+
+    var parameters = getFreshTypeParameters(typeParameters);
+    return parameters.applyToFunctionType(type);
+  }
+
+  LinkedNodeTypeBuilder _writeFunctionType(FunctionType type) {
+    type = _toSyntheticFunctionType(type);
+
+    var typeParameterBuilders = <LinkedNodeTypeTypeParameterBuilder>[];
+
+    var typeParameters = type.typeFormals;
+    for (var i = 0; i < typeParameters.length; ++i) {
+      var typeParameter = typeParameters[i];
+      _typeParameters[typeParameter] = _nextSyntheticTypeParameterId++;
+      typeParameterBuilders.add(
+        LinkedNodeTypeTypeParameterBuilder(name: typeParameter.name),
+      );
+    }
+
+    for (var i = 0; i < typeParameters.length; ++i) {
+      var typeParameter = typeParameters[i];
+      typeParameterBuilders[i].bound = writeType(typeParameter.bound);
+    }
+
+    var result = LinkedNodeTypeBuilder(
+      kind: LinkedNodeTypeKind.function,
+      functionFormalParameters: type.parameters
+          .map((p) => LinkedNodeTypeFormalParameterBuilder(
+                kind: _formalParameterKind(p),
+                name: p.name,
+                type: writeType(p.type),
+              ))
+          .toList(),
+      functionReturnType: writeType(type.returnType),
+      functionTypeParameters: typeParameterBuilders,
+    );
+
+    for (var typeParameter in typeParameters) {
+      _typeParameters.remove(typeParameter);
+      --_nextSyntheticTypeParameterId;
+    }
+
+    return result;
+  }
+}
diff --git a/pkg/analyzer/lib/src/summary2/linking_node_scope.dart b/pkg/analyzer/lib/src/summary2/linking_node_scope.dart
new file mode 100644
index 0000000..7617125
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary2/linking_node_scope.dart
@@ -0,0 +1,25 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/src/generated/resolver.dart';
+
+/// This class provides access to [Scope]s corresponding to [AstNode]s.
+class LinkingNodeContext {
+  static const _key = 'linkingNodeContext';
+
+  final Scope scope;
+
+  LinkingNodeContext(AstNode node, this.scope) {
+    node.setProperty(_key, this);
+  }
+
+  static LinkingNodeContext get(AstNode node) {
+    LinkingNodeContext context = node.getProperty(_key);
+    if (context == null) {
+      throw StateError('No context for: $node');
+    }
+    return context;
+  }
+}
diff --git a/pkg/analyzer/lib/src/summary2/metadata_resolver.dart b/pkg/analyzer/lib/src/summary2/metadata_resolver.dart
new file mode 100644
index 0000000..e089151
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary2/metadata_resolver.dart
@@ -0,0 +1,173 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/visitor.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/generated/resolver.dart';
+import 'package:analyzer/src/summary2/ast_resolver.dart';
+import 'package:analyzer/src/summary2/link.dart';
+
+class MetadataResolver extends ThrowingAstVisitor<void> {
+  final Linker _linker;
+  final LibraryElement _libraryElement;
+
+  Scope scope;
+
+  MetadataResolver(this._linker, this._libraryElement);
+
+  @override
+  void visitAnnotation(Annotation node) {
+    // TODO(scheglov) get rid of?
+    node.elementAnnotation = ElementAnnotationImpl(null);
+
+    var astResolver = AstResolver(_linker, _libraryElement, scope);
+    // TODO(scheglov) enclosing elements?
+    astResolver.resolve(node);
+  }
+
+  @override
+  void visitClassDeclaration(ClassDeclaration node) {
+    node.metadata.accept(this);
+    node.typeParameters?.accept(this);
+    node.members.accept(this);
+  }
+
+  @override
+  void visitClassTypeAlias(ClassTypeAlias node) {
+    node.metadata.accept(this);
+    node.typeParameters?.accept(this);
+  }
+
+  @override
+  void visitCompilationUnit(CompilationUnit node) {
+    node.directives.accept(this);
+    node.declarations.accept(this);
+  }
+
+  @override
+  void visitConstructorDeclaration(ConstructorDeclaration node) {
+    node.metadata.accept(this);
+    node.parameters.accept(this);
+  }
+
+  @override
+  void visitDefaultFormalParameter(DefaultFormalParameter node) {
+    node.parameter.accept(this);
+  }
+
+  @override
+  void visitEnumConstantDeclaration(EnumConstantDeclaration node) {
+    node.metadata.accept(this);
+  }
+
+  @override
+  void visitEnumDeclaration(EnumDeclaration node) {
+    node.metadata.accept(this);
+    node.constants.accept(this);
+  }
+
+  @override
+  void visitExportDirective(ExportDirective node) {
+    node.metadata.accept(this);
+  }
+
+  @override
+  void visitFieldDeclaration(FieldDeclaration node) {
+    node.metadata.accept(this);
+  }
+
+  @override
+  void visitFieldFormalParameter(FieldFormalParameter node) {
+    node.metadata.accept(this);
+    node.parameters?.accept(this);
+  }
+
+  @override
+  void visitFormalParameterList(FormalParameterList node) {
+    node.parameters.accept(this);
+  }
+
+  @override
+  void visitFunctionDeclaration(FunctionDeclaration node) {
+    node.metadata.accept(this);
+    node.functionExpression.accept(this);
+  }
+
+  @override
+  void visitFunctionExpression(FunctionExpression node) {
+    node.typeParameters?.accept(this);
+    node.parameters?.accept(this);
+  }
+
+  @override
+  void visitFunctionTypeAlias(FunctionTypeAlias node) {
+    node.metadata.accept(this);
+    node.typeParameters?.accept(this);
+    node.parameters.accept(this);
+  }
+
+  @override
+  void visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
+    node.metadata.accept(this);
+    node.typeParameters?.accept(this);
+    node.parameters.accept(this);
+  }
+
+  @override
+  void visitGenericTypeAlias(GenericTypeAlias node) {
+    // TODO: implement visitGenericTypeAlias
+//    super.visitGenericTypeAlias(node);
+  }
+
+  @override
+  void visitImportDirective(ImportDirective node) {
+    node.metadata.accept(this);
+  }
+
+  @override
+  void visitLibraryDirective(LibraryDirective node) {
+    node.metadata.accept(this);
+  }
+
+  @override
+  void visitMethodDeclaration(MethodDeclaration node) {
+    node.metadata.accept(this);
+    node.typeParameters?.accept(this);
+    node.parameters?.accept(this);
+  }
+
+  @override
+  void visitMixinDeclaration(MixinDeclaration node) {
+    // TODO: implement visitMixinDeclaration
+//    super.visitMixinDeclaration(node);
+  }
+
+  @override
+  void visitPartDirective(PartDirective node) {
+    node.metadata.accept(this);
+  }
+
+  @override
+  void visitPartOfDirective(PartOfDirective node) {
+    node.metadata.accept(this);
+  }
+
+  @override
+  void visitSimpleFormalParameter(SimpleFormalParameter node) {
+    node.metadata.accept(this);
+  }
+
+  @override
+  void visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
+    node.metadata.accept(this);
+  }
+
+  @override
+  void visitTypeParameterList(TypeParameterList node) {
+    // TODO: implement visitTypeParameterList
+//    super.visitTypeParameterList(node);
+  }
+}
diff --git a/pkg/analyzer/lib/src/summary2/reference.dart b/pkg/analyzer/lib/src/summary2/reference.dart
new file mode 100644
index 0000000..989ab17
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary2/reference.dart
@@ -0,0 +1,88 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/src/summary/idl.dart';
+import 'package:analyzer/src/summary2/scope.dart';
+
+/// Indirection between a name and the corresponding [Element].
+///
+/// References are organized in a prefix tree.
+/// Each reference knows its parent, children, and the [Element].
+///
+///      Library:
+///         URI of library
+///
+///      Class:
+///         Reference of the enclosing library
+///         "@class"
+///         Name of the class
+///
+///      Method:
+///         Reference of the enclosing class
+///         "@method"
+///         Name of the method
+///
+/// There is only one reference object per [Element].
+class Reference {
+  /// The parent of this reference, or `null` if the root.
+  final Reference parent;
+
+  /// The simple name of the reference in its [parent].
+  final String name;
+
+  /// The corresponding [LinkedNode], or `null` if a named container.
+  LinkedNode node;
+
+  /// The corresponding [AstNode], or `null` if a named container.
+  AstNode node2;
+
+  /// The corresponding [Element], or `null` if a named container.
+  Element element;
+
+  /// Temporary index used during serialization and linking.
+  int index;
+
+  Map<String, Reference> _children;
+
+  /// If this reference is an import prefix, the scope of this prefix.
+  Scope prefixScope;
+
+  Reference.root() : this._(null, '');
+
+  Reference._(this.parent, this.name);
+
+  Iterable<Reference> get children {
+    if (_children != null) {
+      return _children.values;
+    }
+    return const [];
+  }
+
+  bool get isClass => parent != null && parent.name == '@class';
+
+  bool get isDynamic => name == 'dynamic' && parent?.name == 'dart:core';
+
+  bool get isEnum => parent != null && parent.name == '@enum';
+
+  bool get isPrefix => parent != null && parent.name == '@prefix';
+
+  bool get isTypeAlias => parent != null && parent.name == '@typeAlias';
+
+  int get numOfChildren => _children != null ? _children.length : 0;
+
+  /// Return the child with the given name, or `null` if does not exist.
+  Reference operator [](String name) {
+    return _children != null ? _children[name] : null;
+  }
+
+  /// Return the child with the given name, create if does not exist yet.
+  Reference getChild(String name) {
+    var map = _children ??= <String, Reference>{};
+    return map[name] ??= new Reference._(this, name);
+  }
+
+  String toString() => parent == null ? 'root' : '$parent::$name';
+}
diff --git a/pkg/analyzer/lib/src/summary2/reference_resolver.dart b/pkg/analyzer/lib/src/summary2/reference_resolver.dart
new file mode 100644
index 0000000..8601a46
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary2/reference_resolver.dart
@@ -0,0 +1,906 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/visitor.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/resolver/scope.dart';
+import 'package:analyzer/src/summary/idl.dart';
+import 'package:analyzer/src/summary2/linked_element_factory.dart';
+import 'package:analyzer/src/summary2/linking_bundle_context.dart';
+import 'package:analyzer/src/summary2/linking_node_scope.dart';
+import 'package:analyzer/src/summary2/reference.dart';
+
+//class ReferenceResolver {
+//  final LinkingBundleContext linkingBundleContext;
+//  final TypesToBuild typesToBuild;
+//  final UnitBuilder unit;
+//
+//  /// TODO(scheglov) Update scope with local scopes (formal / type parameters).
+//  Scope scope;
+//
+//  Reference reference;
+//
+//  ReferenceResolver(
+//    this.linkingBundleContext,
+//    this.typesToBuild,
+//    this.unit,
+//    this.scope,
+//    this.reference,
+//  );
+//
+//  LinkedNodeTypeBuilder get _dynamicType {
+//    return LinkedNodeTypeBuilder(
+//      kind: LinkedNodeTypeKind.dynamic_,
+//    );
+//  }
+//
+//  void resolve() {
+//    _node(unit.node);
+//  }
+//
+//  void _classDeclaration(LinkedNodeBuilder node) {
+//    var name = unit.context.getUnitMemberName(node);
+//    reference = reference.getChild('@class').getChild(name);
+//
+//    var typeParameters = node.classOrMixinDeclaration_typeParameters;
+//    _withTypeParameters(typeParameters, () {
+//      _extendsClause(node.classDeclaration_extendsClause);
+//      _withClause(node.classDeclaration_withClause);
+//      _implementsClause(node.classOrMixinDeclaration_implementsClause);
+//
+//      for (var member in node.classOrMixinDeclaration_members) {
+//        if (member.kind != LinkedNodeKind.constructorDeclaration) {
+//          _node(member);
+//        }
+//      }
+//      for (var member in node.classOrMixinDeclaration_members) {
+//        if (member.kind == LinkedNodeKind.constructorDeclaration) {
+//          _node(member);
+//        }
+//      }
+//    });
+//
+//    reference = reference.parent.parent;
+//  }
+//
+//  void _classTypeAlias(LinkedNodeBuilder node) {
+//    var name = unit.context.getUnitMemberName(node);
+//    reference = reference.getChild('@class').getChild(name);
+//
+//    var typeParameters = node.classTypeAlias_typeParameters;
+//    _withTypeParameters(typeParameters, () {
+//      _typeName(node.classTypeAlias_superclass);
+//      _withClause(node.classTypeAlias_withClause);
+//      _implementsClause(node.classTypeAlias_implementsClause);
+//    });
+//
+//    reference = reference.parent.parent;
+//  }
+//
+//  void _compilationUnit(LinkedNodeBuilder node) {
+//    _nodeList(node.compilationUnit_directives);
+//    _nodeList(node.compilationUnit_declarations);
+//  }
+//
+//  void _constructorDeclaration(LinkedNodeBuilder node) {
+//    _node(node.constructorDeclaration_parameters);
+//  }
+//
+//  void _enumConstantDeclaration(LinkedNodeBuilder node) {}
+//
+//  void _enumDeclaration(LinkedNodeBuilder node) {
+//    _nodeList(node.enumDeclaration_constants);
+//  }
+//
+//  void _exportDirective(LinkedNodeBuilder node) {}
+//
+//  void _extendsClause(LinkedNodeBuilder node) {
+//    if (node == null) return;
+//
+//    _typeName(node.extendsClause_superclass);
+//  }
+//
+//  void _fieldDeclaration(LinkedNodeBuilder node) {
+//    _node(node.fieldDeclaration_fields);
+//  }
+//
+//  void _fieldFormalParameter(LinkedNodeBuilder node) {
+//    var typeNode = node.fieldFormalParameter_type;
+//    if (typeNode != null) {
+//      _node(typeNode);
+//    }
+//
+//    var formalParameters = node.fieldFormalParameter_formalParameters;
+//    if (formalParameters != null) {
+//      _formalParameters(formalParameters);
+//    }
+//
+//    if (typeNode != null || formalParameters != null) {
+//      typesToBuild.declarations.add(node);
+//    }
+//  }
+//
+//  void _formalParameters(LinkedNodeBuilder node) {
+//    for (var parameter in node.formalParameterList_parameters) {
+//      _node(parameter);
+//    }
+//  }
+//
+//  void _functionDeclaration(LinkedNodeBuilder node) {
+//    var name = unit.context.getUnitMemberName(node);
+//    reference = reference.getChild('@function').getChild(name);
+//
+//    var function = node.functionDeclaration_functionExpression;
+//    var typeParameters = function.functionExpression_typeParameters;
+//    _withTypeParameters(typeParameters, () {
+//      var returnType = node.functionDeclaration_returnType;
+//      if (returnType != null) {
+//        _node(returnType);
+//        typesToBuild.declarations.add(node);
+//      } else {
+//        node.functionDeclaration_returnType2 = _dynamicType;
+//      }
+//
+//      _node(function.functionExpression_formalParameters);
+//    });
+//
+//    reference = reference.parent.parent;
+//  }
+//
+//  void _functionExpression(LinkedNodeBuilder node) {
+//    var typeParameters = node.functionExpression_typeParameters;
+//    _withTypeParameters(typeParameters, () {
+//      _node(node.functionExpression_formalParameters);
+//    });
+//  }
+//
+//  void _functionTypeAlias(LinkedNodeBuilder node) {
+//    var name = unit.context.getUnitMemberName(node);
+//    reference = reference.getChild('@typeAlias').getChild(name);
+//
+//    var typeParameters = node.functionTypeAlias_typeParameters;
+//    _withTypeParameters(typeParameters, () {
+//      var returnType = node.functionTypeAlias_returnType;
+//      if (returnType != null) {
+//        _node(returnType);
+//        typesToBuild.declarations.add(node);
+//      } else {
+//        node.functionTypeAlias_returnType2 = _dynamicType;
+//      }
+//
+//      _node(node.functionTypeAlias_formalParameters);
+//    });
+//
+//    reference = reference.parent.parent;
+//  }
+//
+//  void _functionTypedFormalParameter(LinkedNodeBuilder node) {
+//    var typeParameters = node.functionTypedFormalParameter_typeParameters;
+//    _withTypeParameters(typeParameters, () {
+//      var typeNode = node.functionTypedFormalParameter_returnType;
+//      if (typeNode != null) {
+//        _node(typeNode);
+//      }
+//
+//      _formalParameters(node.functionTypedFormalParameter_formalParameters);
+//      typesToBuild.declarations.add(node);
+//    });
+//  }
+//
+//  void _genericFunctionType(LinkedNodeBuilder node) {
+//    reference = reference.getChild('@function');
+//
+//    var name = '${reference.numOfChildren}';
+//    reference = reference.getChild(name);
+//
+//    var typeParameters = node.genericFunctionType_typeParameters;
+//    _withTypeParameters(typeParameters, () {
+//      var returnType = node.genericFunctionType_returnType;
+//      if (returnType != null) {
+//        _node(returnType);
+//        typesToBuild.declarations.add(node);
+//      }
+//
+//      _formalParameters(node.genericFunctionType_formalParameters);
+//
+//      typesToBuild.typeAnnotations.add(node);
+//    });
+//
+//    reference = reference.parent.parent;
+//  }
+//
+//  void _genericTypeAlias(LinkedNodeBuilder node) {
+//    var name = unit.context.getSimpleName(
+//      node.namedCompilationUnitMember_name,
+//    );
+//    reference = reference.getChild('@typeAlias').getChild(name);
+//
+//    var typeParameters = node.genericTypeAlias_typeParameters;
+//    _withTypeParameters(typeParameters, () {
+//      _node(node.genericTypeAlias_functionType);
+//    });
+//
+//    reference = reference.parent.parent;
+//  }
+//
+//  void _implementsClause(LinkedNodeBuilder node) {
+//    if (node == null) return;
+//
+//    _typeNameList(node.implementsClause_interfaces);
+//  }
+//
+//  void _importDirective(LinkedNodeBuilder node) {}
+//
+//  void _libraryDirective(LinkedNodeBuilder node) {}
+//
+//  void _methodDeclaration(LinkedNodeBuilder node) {
+//    var name = unit.context.getMethodName(node);
+//    reference = reference.getChild('@method').getChild(name);
+//
+//    var typeParameters = node.methodDeclaration_typeParameters;
+//    _withTypeParameters(typeParameters, () {
+//      var returnType = node.methodDeclaration_returnType;
+//      if (returnType != null) {
+//        _node(returnType);
+//        typesToBuild.declarations.add(node);
+//      }
+//
+//      _node(node.methodDeclaration_formalParameters);
+//    });
+//
+//    reference = reference.parent.parent;
+//  }
+//
+//  void _mixinDeclaration(LinkedNodeBuilder node) {
+//    var name = unit.context.getUnitMemberName(node);
+//    reference = reference.getChild('@class').getChild(name);
+//
+//    var typeParameters = node.classOrMixinDeclaration_typeParameters;
+//    _withTypeParameters(typeParameters, () {
+//      _onClause(node.mixinDeclaration_onClause);
+//      _implementsClause(node.classOrMixinDeclaration_implementsClause);
+//      _nodeList(node.classOrMixinDeclaration_members);
+//    });
+//
+//    reference = reference.parent.parent;
+//  }
+//
+//  void _node(LinkedNodeBuilder node) {
+//    if (node == null) return;
+//
+//    if (node.kind == LinkedNodeKind.classDeclaration) {
+//      _classDeclaration(node);
+//    } else if (node.kind == LinkedNodeKind.classTypeAlias) {
+//      _classTypeAlias(node);
+//    } else if (node.kind == LinkedNodeKind.compilationUnit) {
+//      _compilationUnit(node);
+//    } else if (node.kind == LinkedNodeKind.constructorDeclaration) {
+//      _constructorDeclaration(node);
+//    } else if (node.kind == LinkedNodeKind.defaultFormalParameter) {
+//      _node(node.defaultFormalParameter_parameter);
+//    } else if (node.kind == LinkedNodeKind.enumDeclaration) {
+//      _enumDeclaration(node);
+//    } else if (node.kind == LinkedNodeKind.enumConstantDeclaration) {
+//      _enumConstantDeclaration(node);
+//    } else if (node.kind == LinkedNodeKind.exportDirective) {
+//      _exportDirective(node);
+//    } else if (node.kind == LinkedNodeKind.fieldDeclaration) {
+//      _fieldDeclaration(node);
+//    } else if (node.kind == LinkedNodeKind.fieldFormalParameter) {
+//      _fieldFormalParameter(node);
+//    } else if (node.kind == LinkedNodeKind.formalParameterList) {
+//      _formalParameters(node);
+//    } else if (node.kind == LinkedNodeKind.functionDeclaration) {
+//      _functionDeclaration(node);
+//    } else if (node.kind == LinkedNodeKind.functionExpression) {
+//      _functionExpression(node);
+//    } else if (node.kind == LinkedNodeKind.functionTypeAlias) {
+//      _functionTypeAlias(node);
+//    } else if (node.kind == LinkedNodeKind.functionTypedFormalParameter) {
+//      _functionTypedFormalParameter(node);
+//    } else if (node.kind == LinkedNodeKind.genericFunctionType) {
+//      _genericFunctionType(node);
+//    } else if (node.kind == LinkedNodeKind.genericTypeAlias) {
+//      _genericTypeAlias(node);
+//    } else if (node.kind == LinkedNodeKind.importDirective) {
+//      _importDirective(node);
+//    } else if (node.kind == LinkedNodeKind.libraryDirective) {
+//      _libraryDirective(node);
+//    } else if (node.kind == LinkedNodeKind.methodDeclaration) {
+//      _methodDeclaration(node);
+//    } else if (node.kind == LinkedNodeKind.mixinDeclaration) {
+//      _mixinDeclaration(node);
+//    } else if (node.kind == LinkedNodeKind.partDirective) {
+//      _partDirective(node);
+//    } else if (node.kind == LinkedNodeKind.partOfDirective) {
+//      _partOfDirective(node);
+//    } else if (node.kind == LinkedNodeKind.simpleFormalParameter) {
+//      _simpleFormalParameter(node);
+//    } else if (node.kind == LinkedNodeKind.topLevelVariableDeclaration) {
+//      _topLevelVariableDeclaration(node);
+//    } else if (node.kind == LinkedNodeKind.typeArgumentList) {
+//      _typeArgumentList(node);
+//    } else if (node.kind == LinkedNodeKind.typeName) {
+//      _typeName(node);
+//    } else if (node.kind == LinkedNodeKind.typeParameter) {
+//      _typeParameter(node);
+//    } else if (node.kind == LinkedNodeKind.typeParameterList) {
+//      _typeParameterList(node);
+//    } else if (node.kind == LinkedNodeKind.variableDeclarationList) {
+//      _variableDeclarationList(node);
+//    } else {
+//      // TODO(scheglov) implement
+//      throw UnimplementedError('${node.kind}');
+//    }
+//  }
+//
+//  void _nodeList(List<LinkedNode> nodeList) {
+//    if (nodeList == null) return;
+//
+//    for (var i = 0; i < nodeList.length; ++i) {
+//      var node = nodeList[i];
+//      _node(node);
+//    }
+//  }
+//
+//  void _onClause(LinkedNodeBuilder node) {
+//    if (node == null) return;
+//
+//    _typeNameList(node.onClause_superclassConstraints);
+//  }
+//
+//  void _partDirective(LinkedNodeBuilder node) {}
+//
+//  void _partOfDirective(LinkedNodeBuilder node) {}
+//
+//  void _setSimpleElement(LinkedNodeBuilder identifier, Reference reference) {
+//    var referenceIndex = linkingBundleContext.indexOfReference(reference);
+//    identifier.simpleIdentifier_element = referenceIndex;
+//  }
+//
+//  void _simpleFormalParameter(LinkedNodeBuilder node) {
+//    var typeNode = node.simpleFormalParameter_type;
+//    if (typeNode != null) {
+//      _node(typeNode);
+//      typesToBuild.declarations.add(node);
+//    } else {
+//      // TODO(scheglov) might be inferred
+//      node.simpleFormalParameter_type2 = _dynamicType;
+//    }
+//
+//    if (node.normalFormalParameter_covariantKeyword != 0) {
+//      node.normalFormalParameter_isCovariant = true;
+//    } else {
+//      // TODO(scheglov) might be inferred
+//    }
+//  }
+//
+//  void _topLevelVariableDeclaration(LinkedNodeBuilder node) {
+//    _node(node.topLevelVariableDeclaration_variableList);
+//  }
+//
+//  void _typeArgumentList(LinkedNodeBuilder node) {
+//    for (var typeArgument in node.typeArgumentList_arguments) {
+//      _typeName(typeArgument);
+//    }
+//  }
+//
+//  void _typeName(LinkedNodeBuilder node) {
+//    if (node == null) return;
+//
+//    var identifier = node.typeName_name;
+//    Reference reference;
+//
+//    if (identifier.kind == LinkedNodeKind.simpleIdentifier) {
+//      var name = unit.context.getSimpleName(identifier);
+//
+//      if (name == 'void') {
+//        node.typeName_type = LinkedNodeTypeBuilder(
+//          kind: LinkedNodeTypeKind.void_,
+//        );
+//        return;
+//      }
+//
+//      reference = scope.lookup(name);
+//    } else {
+//      var prefixNode = identifier.prefixedIdentifier_prefix;
+//      var prefixName = unit.context.getSimpleName(prefixNode);
+//      var prefixReference = scope.lookup(prefixName);
+//      _setSimpleElement(prefixNode, prefixReference);
+//
+//      identifier = identifier.prefixedIdentifier_identifier;
+//      var name = unit.context.getSimpleName(identifier);
+//
+//      if (prefixReference != null && prefixReference.isPrefix) {
+//        var prefixScope = prefixReference.prefixScope;
+//        reference = prefixScope.lookup(name);
+//      } else {
+//        identifier.simpleIdentifier_element = 0;
+//        node.typeName_type = _dynamicType;
+//        return;
+//      }
+//    }
+//
+//    if (reference == null) {
+//      identifier.simpleIdentifier_element = 0;
+//      node.typeName_type = _dynamicType;
+//      return;
+//    }
+//
+//    _setSimpleElement(identifier, reference);
+//
+//    var typeArgumentList = node.typeName_typeArguments;
+//    if (typeArgumentList != null) {
+//      _node(typeArgumentList);
+//    }
+//
+//    typesToBuild.typeAnnotations.add(node);
+//  }
+//
+//  void _typeNameList(List<LinkedNode> nodeList) {
+//    for (var i = 0; i < nodeList.length; ++i) {
+//      var node = nodeList[i];
+//      _typeName(node);
+//    }
+//  }
+//
+//  void _typeParameter(LinkedNodeBuilder node) {
+//    _node(node.typeParameter_bound);
+//    // TODO(scheglov) set Object bound if no explicit?
+//  }
+//
+//  void _typeParameterList(LinkedNodeBuilder node) {
+//    for (var typeParameter in node.typeParameterList_typeParameters) {
+//      _node(typeParameter);
+//    }
+//  }
+//
+//  void _variableDeclarationList(LinkedNodeBuilder node) {
+//    var typeNode = node.variableDeclarationList_type;
+//    if (typeNode != null) {
+//      _node(typeNode);
+//      typesToBuild.declarations.add(node);
+//    }
+//  }
+//
+//  void _withClause(LinkedNodeBuilder node) {
+//    if (node == null) return;
+//
+//    _typeNameList(node.withClause_mixinTypes);
+//  }
+//
+//  /// Enter the type parameters scope, visit them, and run [f].
+//  void _withTypeParameters(LinkedNode typeParameterList, void f()) {
+//    if (typeParameterList == null) {
+//      f();
+//      return;
+//    }
+//
+//    scope = Scope(this.scope, {});
+//
+//    var containerRef = this.reference.getChild('@typeParameter');
+//    var typeParameters = typeParameterList.typeParameterList_typeParameters;
+//    for (var typeParameter in typeParameters) {
+//      var name = unit.context.getSimpleName(typeParameter.typeParameter_name);
+//      var reference = containerRef.getChild(name);
+//      reference.node = typeParameter;
+//      scope.declare(name, reference);
+//    }
+//
+//    _node(typeParameterList);
+//    f();
+//
+//    if (typeParameterList != null) {
+//      scope = scope.parent;
+//    }
+//  }
+//}
+
+/// Recursive visitor of [LinkedNode]s that resolves explicit type annotations
+/// in outlines.  This includes resolving element references in identifiers
+/// in type annotation, and setting [LinkedNodeType]s for corresponding type
+/// annotation nodes.
+///
+/// Declarations that have type annotations, e.g. return types of methods, get
+/// the corresponding type set (so, if there is an explicit type annotation,
+/// the type is set, otherwise we keep it empty, so we will attempt to infer
+/// it later).
+class ReferenceResolver extends ThrowingAstVisitor<void> {
+  final LinkingBundleContext linkingContext;
+  final List<AstNode> nodesToBuildType;
+  final LinkedElementFactory elementFactory;
+  final LibraryElement _libraryElement;
+
+  Reference reference;
+  Scope scope;
+
+  ReferenceResolver(
+    this.linkingContext,
+    this.nodesToBuildType,
+    this.elementFactory,
+    this._libraryElement,
+    this.reference,
+    this.scope,
+  );
+
+  @override
+  void visitBlockFunctionBody(BlockFunctionBody node) {}
+
+  @override
+  void visitClassDeclaration(ClassDeclaration node) {
+    var outerScope = scope;
+    var outerReference = reference;
+
+    var name = node.name.name;
+    reference = reference.getChild('@class').getChild(name);
+
+    _createTypeParameterElements(node.typeParameters);
+    var element = ClassElementImpl.forLinkedNode(
+      outerReference.element,
+      reference,
+      node,
+    );
+    node.name.staticElement = element;
+    scope = new TypeParameterScope(scope, element);
+    scope = new ClassScope(scope, element);
+    LinkingNodeContext(node, scope);
+
+    node.typeParameters?.accept(this);
+    node.extendsClause?.accept(this);
+    node.implementsClause?.accept(this);
+    node.withClause?.accept(this);
+    node.members.accept(this);
+
+    scope = outerScope;
+    reference = outerReference;
+  }
+
+  @override
+  void visitClassTypeAlias(ClassTypeAlias node) {
+    var outerScope = scope;
+    var outerReference = reference;
+
+    var name = node.name.name;
+    reference = reference.getChild('@class').getChild(name);
+
+    _createTypeParameterElements(node.typeParameters);
+    var element = ClassElementImpl.forLinkedNode(
+      outerReference.element,
+      reference,
+      node,
+    );
+    node.name.staticElement = element;
+    scope = new TypeParameterScope(scope, element);
+    scope = new ClassScope(scope, element);
+    LinkingNodeContext(node, scope);
+
+    node.typeParameters?.accept(this);
+    node.superclass?.accept(this);
+    node.withClause?.accept(this);
+    node.implementsClause?.accept(this);
+
+    scope = outerScope;
+    reference = outerReference;
+  }
+
+  @override
+  void visitCompilationUnit(CompilationUnit node) {
+    LinkingNodeContext(node, scope);
+    node.declarations.accept(this);
+  }
+
+  @override
+  void visitConstructorDeclaration(ConstructorDeclaration node) {
+    var outerScope = scope;
+    var outerReference = reference;
+
+    var name = node.name?.name ?? '';
+    reference = reference.getChild('@constructor').getChild(name);
+
+    var element = ConstructorElementImpl.forLinkedNode(
+      outerReference.element,
+      reference,
+      node,
+    );
+
+    var functionScope = FunctionScope(scope, element);
+    functionScope.defineParameters();
+    LinkingNodeContext(node, functionScope);
+
+    node.parameters?.accept(this);
+
+    scope = outerScope;
+    reference = outerReference;
+  }
+
+  @override
+  void visitDefaultFormalParameter(DefaultFormalParameter node) {
+    node.parameter.accept(this);
+  }
+
+  @override
+  void visitEnumDeclaration(EnumDeclaration node) {}
+
+  @override
+  void visitExpressionFunctionBody(ExpressionFunctionBody node) {}
+
+  @override
+  void visitExtendsClause(ExtendsClause node) {
+    node.superclass.accept(this);
+  }
+
+  @override
+  void visitFieldDeclaration(FieldDeclaration node) {
+    node.fields.accept(this);
+  }
+
+  @override
+  void visitFieldFormalParameter(FieldFormalParameter node) {
+    node.type?.accept(this);
+    node.parameters?.accept(this);
+    nodesToBuildType.add(node);
+  }
+
+  @override
+  void visitFormalParameterList(FormalParameterList node) {
+    node.parameters.accept(this);
+  }
+
+  @override
+  void visitFunctionDeclaration(FunctionDeclaration node) {
+    var outerScope = scope;
+    var outerReference = reference;
+
+    var name = node.name.name;
+    reference = reference.getChild('@function').getChild(name);
+
+    _createTypeParameterElements(node.functionExpression.typeParameters);
+    var element = FunctionElementImpl.forLinkedNode(
+      outerReference.element,
+      reference,
+      node,
+    );
+    node.name.staticElement = element;
+    scope = new FunctionScope(scope, element);
+    LinkingNodeContext(node, scope);
+
+    node.returnType?.accept(this);
+    node.functionExpression.accept(this);
+    nodesToBuildType.add(node);
+
+    scope = outerScope;
+    reference = outerReference;
+  }
+
+  @override
+  void visitFunctionExpression(FunctionExpression node) {
+    node.typeParameters?.accept(this);
+    node.parameters?.accept(this);
+  }
+
+  @override
+  void visitFunctionTypeAlias(FunctionTypeAlias node) {
+    var outerScope = scope;
+    var outerReference = reference;
+
+    var name = node.name.name;
+    reference = reference.getChild('@typeAlias').getChild(name);
+
+    _createTypeParameterElements(node.typeParameters);
+    var element = GenericTypeAliasElementImpl.forLinkedNode(
+      outerReference.element,
+      reference,
+      node,
+    );
+    node.name.staticElement = element;
+    scope = FunctionTypeScope(outerScope, element);
+
+    node.returnType?.accept(this);
+    node.typeParameters?.accept(this);
+    node.parameters.accept(this);
+    nodesToBuildType.add(node);
+
+    scope = outerScope;
+    reference = outerReference;
+  }
+
+  @override
+  void visitFunctionTypedFormalParameter(FunctionTypedFormalParameter node) {
+    node.returnType?.accept(this);
+    node.typeParameters?.accept(this);
+    node.parameters.accept(this);
+
+    nodesToBuildType.add(node);
+  }
+
+  @override
+  void visitGenericFunctionType(GenericFunctionType node) {
+    var outerScope = scope;
+    var outerReference = reference;
+
+    var name = '${outerReference.numOfChildren}';
+    reference = reference.getChild(name);
+
+    _createTypeParameterElements(node.typeParameters);
+    var element = GenericFunctionTypeElementImpl.forLinkedNode(
+      outerReference.element,
+      reference,
+      node,
+    );
+    scope = TypeParameterScope(outerScope, element);
+
+    node.returnType?.accept(this);
+    node.typeParameters?.accept(this);
+    node.parameters.accept(this);
+    nodesToBuildType.add(node);
+    nodesToBuildType.add(node);
+
+    scope = outerScope;
+    reference = outerReference;
+  }
+
+  @override
+  void visitGenericTypeAlias(GenericTypeAlias node) {
+    var outerScope = scope;
+    var outerReference = reference;
+
+    var name = node.name.name;
+    reference = reference.getChild('@typeAlias').getChild(name);
+
+    _createTypeParameterElements(node.typeParameters);
+    var element = GenericTypeAliasElementImpl.forLinkedNode(
+      outerReference.element,
+      reference,
+      node,
+    );
+    node.name.staticElement = element;
+    scope = TypeParameterScope(outerScope, element);
+
+    node.typeParameters?.accept(this);
+    node.functionType.accept(this);
+
+    scope = outerScope;
+    reference = outerReference;
+  }
+
+  @override
+  void visitImplementsClause(ImplementsClause node) {
+    node.interfaces.accept(this);
+  }
+
+  @override
+  void visitMethodDeclaration(MethodDeclaration node) {
+    var outerScope = scope;
+    var outerReference = reference;
+
+    var name = node.name.name;
+    reference = reference.getChild('@method').getChild(name);
+
+    _createTypeParameterElements(node.typeParameters);
+    var element = MethodElementImpl.forLinkedNode(
+      outerReference.element,
+      reference,
+      node,
+    );
+    node.name.staticElement = element;
+    scope = new FunctionScope(scope, element);
+    LinkingNodeContext(node, scope);
+
+    node.returnType?.accept(this);
+    node.parameters?.accept(this);
+    node.typeParameters?.accept(this);
+    nodesToBuildType.add(node);
+
+    scope = outerScope;
+    reference = outerReference;
+  }
+
+  @override
+  void visitMixinDeclaration(MixinDeclaration node) {
+    var outerScope = scope;
+    var outerReference = reference;
+
+    var name = node.name.name;
+    reference = reference.getChild('@class').getChild(name);
+
+    _createTypeParameterElements(node.typeParameters);
+    var element = ClassElementImpl.forLinkedNode(
+      outerReference.element,
+      reference,
+      node,
+    );
+    node.name.staticElement = element;
+    scope = new TypeParameterScope(scope, element);
+    scope = new ClassScope(scope, element);
+
+    node.typeParameters?.accept(this);
+    node.onClause?.accept(this);
+    node.implementsClause?.accept(this);
+    node.members.accept(this);
+
+    scope = outerScope;
+    reference = outerReference;
+  }
+
+  @override
+  void visitOnClause(OnClause node) {
+    node.superclassConstraints.accept(this);
+  }
+
+  @override
+  void visitSimpleFormalParameter(SimpleFormalParameter node) {
+    node.type?.accept(this);
+    nodesToBuildType.add(node);
+  }
+
+  @override
+  void visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
+    node.variables.accept(this);
+  }
+
+  @override
+  void visitTypeArgumentList(TypeArgumentList node) {
+    node.arguments.accept(this);
+  }
+
+  @override
+  void visitTypeName(TypeName node) {
+    var typeName = node.name;
+    if (typeName is SimpleIdentifier && typeName.name == 'void') {
+      node.type = VoidTypeImpl.instance;
+      return;
+    }
+
+    var element = scope.lookup(typeName, _libraryElement);
+    if (typeName is SimpleIdentifier) {
+      typeName.staticElement = element;
+    } else if (typeName is PrefixedIdentifier) {
+      typeName.identifier.staticElement = element;
+      SimpleIdentifier prefix = typeName.prefix;
+      prefix.staticElement = scope.lookup(prefix, _libraryElement);
+    }
+
+    node.typeArguments?.accept(this);
+
+    nodesToBuildType.add(node);
+  }
+
+  @override
+  void visitTypeParameter(TypeParameter node) {
+    node.bound?.accept(this);
+  }
+
+  @override
+  void visitTypeParameterList(TypeParameterList node) {
+    node.typeParameters.accept(this);
+  }
+
+  @override
+  void visitVariableDeclarationList(VariableDeclarationList node) {
+    node.type?.accept(this);
+    nodesToBuildType.add(node);
+  }
+
+  @override
+  void visitWithClause(WithClause node) {
+    node.mixinTypes.accept(this);
+  }
+
+  void _createTypeParameterElement(TypeParameter node) {
+    var element = TypeParameterElementImpl.forLinkedNode(null, null, node);
+    node.name.staticElement = element;
+    linkingContext.addTypeParameter(element);
+  }
+
+  void _createTypeParameterElements(TypeParameterList typeParameterList) {
+    if (typeParameterList == null) return;
+
+    for (var typeParameter in typeParameterList.typeParameters) {
+      _createTypeParameterElement(typeParameter);
+    }
+  }
+}
diff --git a/pkg/analyzer/lib/src/summary2/scope.dart b/pkg/analyzer/lib/src/summary2/scope.dart
new file mode 100644
index 0000000..2af6ace
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary2/scope.dart
@@ -0,0 +1,30 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/summary2/reference.dart';
+
+class Scope {
+  final Scope parent;
+  final Map<String, Reference> map;
+
+  Scope(this.parent, this.map);
+
+  Scope.top() : this(null, <String, Reference>{});
+
+  void declare(String name, Reference reference) {
+    map[name] = reference;
+  }
+
+  void forEach(f(String name, Reference reference)) {
+    map.forEach(f);
+  }
+
+  Reference lookup(String name) {
+    var reference = map[name];
+    if (reference != null) return reference;
+
+    if (parent == null) return null;
+    return parent.lookup(name);
+  }
+}
diff --git a/pkg/analyzer/lib/src/summary2/simply_bounded.dart b/pkg/analyzer/lib/src/summary2/simply_bounded.dart
new file mode 100644
index 0000000..cac5831
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary2/simply_bounded.dart
@@ -0,0 +1,315 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/summary/link.dart' as graph
+    show DependencyWalker, Node;
+import 'package:analyzer/src/summary2/builder/source_library_builder.dart';
+import 'package:analyzer/src/summary2/lazy_ast.dart';
+import 'package:analyzer/src/summary2/linked_bundle_context.dart';
+
+/// Compute simple-boundedness for all classes and generic types aliases in
+/// the source [libraryBuilders].  There might be dependencies between them,
+/// so they all should be processed simultaneously.
+void computeSimplyBounded(
+  LinkedBundleContext bundleContext,
+  Iterable<SourceLibraryBuilder> libraryBuilders,
+) {
+  var walker = SimplyBoundedDependencyWalker(bundleContext);
+  var nodes = <SimplyBoundedNode>[];
+  for (var libraryBuilder in libraryBuilders) {
+    for (var unit in libraryBuilder.element.units) {
+      for (var element in unit.functionTypeAliases) {
+        var node = walker.getNode(element);
+        nodes.add(node);
+      }
+      for (var element in unit.mixins) {
+        var node = walker.getNode(element);
+        nodes.add(node);
+      }
+      for (var element in unit.types) {
+        var node = walker.getNode(element);
+        nodes.add(node);
+      }
+    }
+  }
+
+  for (var node in nodes) {
+    if (!node.isEvaluated) {
+      walker.walk(node);
+    }
+    LazyAst.setSimplyBounded(node._node, node.isSimplyBounded);
+  }
+}
+
+/// The graph walker for evaluating whether types are simply bounded.
+class SimplyBoundedDependencyWalker
+    extends graph.DependencyWalker<SimplyBoundedNode> {
+  final LinkedBundleContext bundleContext;
+  final Map<Element, SimplyBoundedNode> nodeMap = Map.identity();
+
+  SimplyBoundedDependencyWalker(this.bundleContext);
+
+  @override
+  void evaluate(SimplyBoundedNode v) {
+    v._evaluate();
+  }
+
+  @override
+  void evaluateScc(List<SimplyBoundedNode> scc) {
+    for (var node in scc) {
+      node._markCircular();
+    }
+  }
+
+  SimplyBoundedNode getNode(Element element) {
+    var graphNode = nodeMap[element];
+    if (graphNode == null) {
+      var node = (element as ElementImpl).linkedNode;
+      if (node is ClassDeclaration) {
+        var parameters = node.typeParameters?.typeParameters;
+        graphNode = SimplyBoundedNode(
+          this,
+          node,
+          parameters ?? const <TypeParameter>[],
+          const <TypeAnnotation>[],
+        );
+      } else if (node is ClassTypeAlias) {
+        var parameters = node.typeParameters?.typeParameters;
+        graphNode = SimplyBoundedNode(
+          this,
+          node,
+          parameters ?? const <TypeParameter>[],
+          const <TypeAnnotation>[],
+        );
+      } else if (node is FunctionTypeAlias) {
+        var parameters = node.typeParameters?.typeParameters;
+        graphNode = SimplyBoundedNode(
+          this,
+          node,
+          parameters ?? const <TypeParameter>[],
+          _collectTypedefRhsTypes(node),
+        );
+      } else if (node is GenericTypeAlias) {
+        var parameters = node.typeParameters?.typeParameters;
+        graphNode = SimplyBoundedNode(
+          this,
+          node,
+          parameters ?? const <TypeParameter>[],
+          _collectTypedefRhsTypes(node),
+        );
+      } else if (node is MixinDeclaration) {
+        var parameters = node.typeParameters?.typeParameters;
+        graphNode = SimplyBoundedNode(
+          this,
+          node,
+          parameters ?? const <TypeParameter>[],
+          const <TypeAnnotation>[],
+        );
+      } else {
+        throw UnimplementedError('(${node.runtimeType}) $node');
+      }
+      nodeMap[element] = graphNode;
+    }
+    return graphNode;
+  }
+
+  /// Collects all the type references appearing on the "right hand side" of a
+  /// typedef.
+  ///
+  /// The "right hand side" of a typedef is the type appearing after the "="
+  /// in a new style typedef declaration, or for an old style typedef
+  /// declaration, the type that *would* appear after the "=" if it were
+  /// converted to a new style typedef declaration.  This means that type
+  /// parameter declarations and their bounds are not included.
+  static List<TypeAnnotation> _collectTypedefRhsTypes(AstNode node) {
+    if (node is FunctionTypeAlias) {
+      var collector = _TypeCollector();
+      collector.addType(node.returnType);
+      collector.visitParameters(node.parameters);
+      return collector.types;
+    } else if (node is GenericTypeAlias) {
+      var collector = _TypeCollector();
+      collector.addType(node.functionType.returnType);
+      collector.visitParameters(node.functionType.parameters);
+      return collector.types;
+    } else {
+      throw StateError('(${node.runtimeType}) $node');
+    }
+  }
+}
+
+/// The graph node used to construct the dependency graph for evaluating
+/// whether types are simply bounded.
+class SimplyBoundedNode extends graph.Node<SimplyBoundedNode> {
+  final SimplyBoundedDependencyWalker _walker;
+  final AstNode _node;
+
+  /// The type parameters of the type whose simple-boundedness we check.
+  final List<TypeParameter> _typeParameters;
+
+  /// If the type whose simple-boundedness we check is a typedef, the types
+  /// appearing in its "right hand side".
+  final List<TypeAnnotation> _rhsTypes;
+
+  @override
+  bool isEvaluated = false;
+
+  /// After execution of [_evaluate], indicates whether the type is
+  /// simply bounded.
+  ///
+  /// Prior to execution of [computeDependencies], `true`.
+  ///
+  /// Between execution of [computeDependencies] and [_evaluate], `true`
+  /// indicates that the type is simply bounded only if all of its dependencies
+  /// are simply bounded; `false` indicates that the type is not simply bounded.
+  bool isSimplyBounded = true;
+
+  SimplyBoundedNode(
+    this._walker,
+    this._node,
+    this._typeParameters,
+    this._rhsTypes,
+  );
+
+  @override
+  List<SimplyBoundedNode> computeDependencies() {
+    var dependencies = <SimplyBoundedNode>[];
+    for (var typeParameter in _typeParameters) {
+      var bound = typeParameter.bound;
+      if (bound != null) {
+        if (!_visitType(dependencies, bound, false)) {
+          // Note: we might consider setting isEvaluated=true here to prevent an
+          // unnecessary call to SimplyBoundedDependencyWalker.evaluate.
+          // However, we'd have to be careful to make sure this doesn't violate
+          // an invariant of the DependencyWalker algorithm, since normally it
+          // only expects isEvaluated to change during a call to .evaluate or
+          // .evaluateScc.
+          isSimplyBounded = false;
+          return const [];
+        }
+      }
+    }
+    for (var type in _rhsTypes) {
+      if (!_visitType(dependencies, type, true)) {
+        // Note: we might consider setting isEvaluated=true here to prevent an
+        // unnecessary call to SimplyBoundedDependencyWalker.evaluate.
+        // However, we'd have to be careful to make sure this doesn't violate
+        // an invariant of the DependencyWalker algorithm, since normally it
+        // only expects isEvaluated to change during a call to .evaluate or
+        // .evaluateScc.
+        isSimplyBounded = false;
+        return const [];
+      }
+    }
+    return dependencies;
+  }
+
+  void _evaluate() {
+    for (var dependency in graph.Node.getDependencies(this)) {
+      if (!dependency.isSimplyBounded) {
+        isSimplyBounded = false;
+        break;
+      }
+    }
+    isEvaluated = true;
+  }
+
+  void _markCircular() {
+    isSimplyBounded = false;
+    isEvaluated = true;
+  }
+
+  /// Visits the type specified by [type], storing the [SimplyBoundedNode] for
+  /// any types it references in [dependencies].
+  ///
+  /// Return `false` if a type that is known to be not simply bound is found.
+  ///
+  /// Return `false` if a reference to a type parameter is found, and
+  /// [allowTypeParameters] is `false`.
+  ///
+  /// If `false` is returned, further visiting is short-circuited.
+  ///
+  /// Otherwise `true` is returned.
+  bool _visitType(List<SimplyBoundedNode> dependencies, TypeAnnotation type,
+      bool allowTypeParameters) {
+    if (type == null) return true;
+
+    if (type is TypeName) {
+      var element = type.name.staticElement;
+
+      if (element is TypeParameterElement) {
+        return allowTypeParameters;
+      }
+
+      var arguments = type.typeArguments;
+      if (arguments == null) {
+        var graphNode = _walker.nodeMap[element];
+
+        // If not a node being linked, then the flag is already set.
+        if (graphNode == null) {
+          if (element is TypeParameterizedElement) {
+            return element.isSimplyBounded;
+          }
+          return true;
+        }
+
+        dependencies.add(graphNode);
+      } else {
+        for (var argument in arguments.arguments) {
+          if (!_visitType(dependencies, argument, allowTypeParameters)) {
+            return false;
+          }
+        }
+      }
+      return true;
+    }
+
+    if (type is GenericFunctionType) {
+      var collector = _TypeCollector();
+      collector.addType(type.returnType);
+      collector.visitParameters(type.parameters);
+      for (var type in collector.types) {
+        if (!_visitType(dependencies, type, allowTypeParameters)) {
+          return false;
+        }
+      }
+      return true;
+    }
+
+    throw UnimplementedError('(${type.runtimeType}) $type');
+  }
+}
+
+/// Helper for collecting type annotations.
+class _TypeCollector {
+  final List<TypeAnnotation> types = [];
+
+  void addType(TypeAnnotation type) {
+    if (type != null) {
+      types.add(type);
+    }
+  }
+
+  void visitParameter(FormalParameter node) {
+    if (node is DefaultFormalParameter) {
+      visitParameter(node.parameter);
+    } else if (node is FunctionTypedFormalParameter) {
+      addType(node.returnType);
+      visitParameters(node.parameters);
+    } else if (node is SimpleFormalParameter) {
+      addType(node.type);
+    } else {
+      throw UnimplementedError('(${node.runtimeType}) $node');
+    }
+  }
+
+  void visitParameters(FormalParameterList parameterList) {
+    for (var parameter in parameterList.parameters) {
+      visitParameter(parameter);
+    }
+  }
+}
diff --git a/pkg/analyzer/lib/src/summary2/tokens_context.dart b/pkg/analyzer/lib/src/summary2/tokens_context.dart
new file mode 100644
index 0000000..3b68f79
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary2/tokens_context.dart
@@ -0,0 +1,416 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer/src/dart/ast/token.dart';
+import 'package:analyzer/src/summary/format.dart';
+import 'package:analyzer/src/summary/idl.dart';
+import 'package:analyzer/src/summary2/tokens_writer.dart';
+
+/// The context for reading or writing tokens.
+///
+/// Tokens cannot be compared, so tokens for [indexOfToken] must be previously
+/// received from [tokenOfIndex], or the context must be created from a
+/// [TokensResult] (the result of writing previously parsed tokens).
+class TokensContext {
+  final UnlinkedTokens _tokens;
+  final List<Token> _indexToToken;
+  final Map<Token, int> _tokenToIndex;
+
+  TokensContext(this._tokens)
+      : _indexToToken = List<Token>(_tokens.type.length),
+        _tokenToIndex = Map.identity();
+
+  TokensContext.fromResult(
+      this._tokens, this._indexToToken, this._tokenToIndex);
+
+  /// TODO(scheglov) Not used yet, maybe remove.
+  int addSyntheticToken(
+      UnlinkedTokenKind kind, UnlinkedTokenType type, String lexeme) {
+    var index = _tokens.kind.length;
+    UnlinkedTokensBuilder tokens = _tokens;
+    tokens.kind.add(kind);
+    tokens.lexeme.add(lexeme);
+    tokens.offset.add(0);
+    tokens.length.add(0);
+    tokens.type.add(type);
+    tokens.next.add(0);
+    tokens.endGroup.add(0);
+    tokens.precedingComment.add(0);
+    tokens.isSynthetic.add(true);
+    return index;
+  }
+
+  int indexOfToken(Token token) {
+    if (token == null) return 0;
+
+    var index = _tokenToIndex[token];
+    if (index == null) {
+      throw StateError('Unexpected token: $token');
+    }
+    return index;
+  }
+
+  String lexeme(int index) {
+    return _tokens.lexeme[index];
+  }
+
+  void linkTokens(Token from, Token to) {
+    var fromIndex = _tokenToIndex[from];
+    var toIndex = _tokenToIndex[to];
+    Token prevToken = null;
+    for (var index = fromIndex; index <= toIndex && index != 0;) {
+      var token = _indexToToken[index];
+      token ??= tokenOfIndex(index);
+
+      prevToken?.next = token;
+
+      prevToken = token;
+      index = _tokens.next[index];
+    }
+  }
+
+  int offset(int index) {
+    return _tokens.offset[index];
+  }
+
+  Token tokenOfIndex(int index) {
+    if (index == 0) return null;
+
+    var token = _indexToToken[index];
+    if (token == null) {
+      var kind = _tokens.kind[index];
+      switch (kind) {
+        case UnlinkedTokenKind.nothing:
+          return null;
+        case UnlinkedTokenKind.comment:
+          token = CommentToken(
+            _binaryToAstTokenType(_tokens.type[index]),
+            _tokens.lexeme[index],
+            _tokens.offset[index],
+          );
+          break;
+        case UnlinkedTokenKind.keyword:
+          token = KeywordToken(
+            _binaryToAstTokenType(_tokens.type[index]),
+            _tokens.offset[index],
+            _getCommentToken(_tokens.precedingComment[index]),
+          );
+          break;
+        case UnlinkedTokenKind.simple:
+          token = SimpleToken(
+            _binaryToAstTokenType(_tokens.type[index]),
+            _tokens.offset[index],
+            _getCommentToken(_tokens.precedingComment[index]),
+          );
+          break;
+        case UnlinkedTokenKind.string:
+          token = StringToken(
+            _binaryToAstTokenType(_tokens.type[index]),
+            _tokens.lexeme[index],
+            _tokens.offset[index],
+            _getCommentToken(_tokens.precedingComment[index]),
+          );
+          break;
+        default:
+          throw UnimplementedError('Token kind: $kind');
+      }
+      _indexToToken[index] = token;
+      _tokenToIndex[token] = index;
+    }
+    return token;
+  }
+
+  UnlinkedTokenType type(int index) {
+    return _tokens.type[index];
+  }
+
+  CommentToken _getCommentToken(int index) {
+    var result = tokenOfIndex(index);
+    var token = result;
+    while (true) {
+      index = _tokens.next[index];
+      if (index == 0) return result;
+
+      var nextToken = tokenOfIndex(index);
+      token.next = nextToken;
+      token = nextToken;
+    }
+  }
+
+  static TokenType _binaryToAstTokenType(UnlinkedTokenType type) {
+    switch (type) {
+      case UnlinkedTokenType.ABSTRACT:
+        return Keyword.ABSTRACT;
+      case UnlinkedTokenType.AMPERSAND:
+        return TokenType.AMPERSAND;
+      case UnlinkedTokenType.AMPERSAND_AMPERSAND:
+        return TokenType.AMPERSAND_AMPERSAND;
+      case UnlinkedTokenType.AMPERSAND_EQ:
+        return TokenType.AMPERSAND_EQ;
+      case UnlinkedTokenType.AS:
+        return TokenType.AS;
+      case UnlinkedTokenType.ASSERT:
+        return Keyword.ASSERT;
+      case UnlinkedTokenType.ASYNC:
+        return Keyword.ASYNC;
+      case UnlinkedTokenType.AT:
+        return TokenType.AT;
+      case UnlinkedTokenType.AWAIT:
+        return Keyword.AWAIT;
+      case UnlinkedTokenType.BACKPING:
+        return TokenType.BACKPING;
+      case UnlinkedTokenType.BACKSLASH:
+        return TokenType.BACKSLASH;
+      case UnlinkedTokenType.BANG:
+        return TokenType.BANG;
+      case UnlinkedTokenType.BANG_EQ:
+        return TokenType.BANG_EQ;
+      case UnlinkedTokenType.BAR:
+        return TokenType.BAR;
+      case UnlinkedTokenType.BAR_BAR:
+        return TokenType.BAR_BAR;
+      case UnlinkedTokenType.BAR_EQ:
+        return TokenType.BAR_EQ;
+      case UnlinkedTokenType.BREAK:
+        return Keyword.BREAK;
+      case UnlinkedTokenType.CARET:
+        return TokenType.CARET;
+      case UnlinkedTokenType.CARET_EQ:
+        return TokenType.CARET_EQ;
+      case UnlinkedTokenType.CASE:
+        return Keyword.CASE;
+      case UnlinkedTokenType.CATCH:
+        return Keyword.CATCH;
+      case UnlinkedTokenType.CLASS:
+        return Keyword.CLASS;
+      case UnlinkedTokenType.CLOSE_CURLY_BRACKET:
+        return TokenType.CLOSE_CURLY_BRACKET;
+      case UnlinkedTokenType.CLOSE_PAREN:
+        return TokenType.CLOSE_PAREN;
+      case UnlinkedTokenType.CLOSE_SQUARE_BRACKET:
+        return TokenType.CLOSE_SQUARE_BRACKET;
+      case UnlinkedTokenType.COLON:
+        return TokenType.COLON;
+      case UnlinkedTokenType.COMMA:
+        return TokenType.COMMA;
+      case UnlinkedTokenType.CONST:
+        return Keyword.CONST;
+      case UnlinkedTokenType.CONTINUE:
+        return Keyword.CONTINUE;
+      case UnlinkedTokenType.COVARIANT:
+        return Keyword.COVARIANT;
+      case UnlinkedTokenType.DEFAULT:
+        return Keyword.DEFAULT;
+      case UnlinkedTokenType.DEFERRED:
+        return Keyword.DEFERRED;
+      case UnlinkedTokenType.DO:
+        return Keyword.DO;
+      case UnlinkedTokenType.DOUBLE:
+        return TokenType.DOUBLE;
+      case UnlinkedTokenType.DYNAMIC:
+        return Keyword.DYNAMIC;
+      case UnlinkedTokenType.ELSE:
+        return Keyword.ELSE;
+      case UnlinkedTokenType.ENUM:
+        return Keyword.ENUM;
+      case UnlinkedTokenType.EOF:
+        return TokenType.EOF;
+      case UnlinkedTokenType.EQ:
+        return TokenType.EQ;
+      case UnlinkedTokenType.EQ_EQ:
+        return TokenType.EQ_EQ;
+      case UnlinkedTokenType.EXPORT:
+        return Keyword.EXPORT;
+      case UnlinkedTokenType.EXTENDS:
+        return Keyword.EXTENDS;
+      case UnlinkedTokenType.EXTERNAL:
+        return Keyword.EXTERNAL;
+      case UnlinkedTokenType.FACTORY:
+        return Keyword.FACTORY;
+      case UnlinkedTokenType.FALSE:
+        return Keyword.FALSE;
+      case UnlinkedTokenType.FINAL:
+        return Keyword.FINAL;
+      case UnlinkedTokenType.FINALLY:
+        return Keyword.FINALLY;
+      case UnlinkedTokenType.FOR:
+        return Keyword.FOR;
+      case UnlinkedTokenType.FUNCTION:
+        return TokenType.FUNCTION;
+      case UnlinkedTokenType.FUNCTION_KEYWORD:
+        return Keyword.FUNCTION;
+      case UnlinkedTokenType.GET:
+        return Keyword.GET;
+      case UnlinkedTokenType.GT:
+        return TokenType.GT;
+      case UnlinkedTokenType.GT_EQ:
+        return TokenType.GT_EQ;
+      case UnlinkedTokenType.GT_GT:
+        return TokenType.GT_GT;
+      case UnlinkedTokenType.GT_GT_EQ:
+        return TokenType.GT_GT_EQ;
+      case UnlinkedTokenType.HASH:
+        return TokenType.HASH;
+      case UnlinkedTokenType.HEXADECIMAL:
+        return TokenType.HEXADECIMAL;
+      case UnlinkedTokenType.HIDE:
+        return Keyword.HIDE;
+      case UnlinkedTokenType.IDENTIFIER:
+        return TokenType.IDENTIFIER;
+      case UnlinkedTokenType.IF:
+        return Keyword.IF;
+      case UnlinkedTokenType.IMPLEMENTS:
+        return Keyword.IMPLEMENTS;
+      case UnlinkedTokenType.IMPORT:
+        return Keyword.IMPORT;
+      case UnlinkedTokenType.IN:
+        return Keyword.IN;
+      case UnlinkedTokenType.INDEX:
+        return TokenType.INDEX;
+      case UnlinkedTokenType.INDEX_EQ:
+        return TokenType.INDEX_EQ;
+      case UnlinkedTokenType.INT:
+        return TokenType.INT;
+      case UnlinkedTokenType.INTERFACE:
+        return Keyword.INTERFACE;
+      case UnlinkedTokenType.IS:
+        return TokenType.IS;
+      case UnlinkedTokenType.LIBRARY:
+        return Keyword.LIBRARY;
+      case UnlinkedTokenType.LT:
+        return TokenType.LT;
+      case UnlinkedTokenType.LT_EQ:
+        return TokenType.LT_EQ;
+      case UnlinkedTokenType.LT_LT:
+        return TokenType.LT_LT;
+      case UnlinkedTokenType.LT_LT_EQ:
+        return TokenType.LT_LT_EQ;
+      case UnlinkedTokenType.MINUS:
+        return TokenType.MINUS;
+      case UnlinkedTokenType.MINUS_EQ:
+        return TokenType.MINUS_EQ;
+      case UnlinkedTokenType.MINUS_MINUS:
+        return TokenType.MINUS_MINUS;
+      case UnlinkedTokenType.MIXIN:
+        return Keyword.MIXIN;
+      case UnlinkedTokenType.MULTI_LINE_COMMENT:
+        return TokenType.MULTI_LINE_COMMENT;
+      case UnlinkedTokenType.NATIVE:
+        return Keyword.NATIVE;
+      case UnlinkedTokenType.NEW:
+        return Keyword.NEW;
+      case UnlinkedTokenType.NULL:
+        return Keyword.NULL;
+      case UnlinkedTokenType.OF:
+        return Keyword.OF;
+      case UnlinkedTokenType.ON:
+        return Keyword.ON;
+      case UnlinkedTokenType.OPEN_CURLY_BRACKET:
+        return TokenType.OPEN_CURLY_BRACKET;
+      case UnlinkedTokenType.OPEN_PAREN:
+        return TokenType.OPEN_PAREN;
+      case UnlinkedTokenType.OPEN_SQUARE_BRACKET:
+        return TokenType.OPEN_SQUARE_BRACKET;
+      case UnlinkedTokenType.OPERATOR:
+        return Keyword.OPERATOR;
+      case UnlinkedTokenType.PART:
+        return Keyword.PART;
+      case UnlinkedTokenType.PATCH:
+        return Keyword.PATCH;
+      case UnlinkedTokenType.PERCENT:
+        return TokenType.PERCENT;
+      case UnlinkedTokenType.PERCENT_EQ:
+        return TokenType.PERCENT_EQ;
+      case UnlinkedTokenType.PERIOD:
+        return TokenType.PERIOD;
+      case UnlinkedTokenType.PERIOD_PERIOD:
+        return TokenType.PERIOD_PERIOD;
+      case UnlinkedTokenType.PERIOD_PERIOD_PERIOD:
+        return TokenType.PERIOD_PERIOD_PERIOD;
+      case UnlinkedTokenType.PERIOD_PERIOD_PERIOD_QUESTION:
+        return TokenType.PERIOD_PERIOD_PERIOD_QUESTION;
+      case UnlinkedTokenType.PLUS:
+        return TokenType.PLUS;
+      case UnlinkedTokenType.PLUS_EQ:
+        return TokenType.PLUS_EQ;
+      case UnlinkedTokenType.PLUS_PLUS:
+        return TokenType.PLUS_PLUS;
+      case UnlinkedTokenType.QUESTION:
+        return TokenType.QUESTION;
+      case UnlinkedTokenType.QUESTION_PERIOD:
+        return TokenType.QUESTION_PERIOD;
+      case UnlinkedTokenType.QUESTION_QUESTION:
+        return TokenType.QUESTION_QUESTION;
+      case UnlinkedTokenType.QUESTION_QUESTION_EQ:
+        return TokenType.QUESTION_QUESTION_EQ;
+      case UnlinkedTokenType.RETHROW:
+        return Keyword.RETHROW;
+      case UnlinkedTokenType.RETURN:
+        return Keyword.RETURN;
+      case UnlinkedTokenType.SCRIPT_TAG:
+        return TokenType.SCRIPT_TAG;
+      case UnlinkedTokenType.SEMICOLON:
+        return TokenType.SEMICOLON;
+      case UnlinkedTokenType.SET:
+        return Keyword.SET;
+      case UnlinkedTokenType.SHOW:
+        return Keyword.SHOW;
+      case UnlinkedTokenType.SINGLE_LINE_COMMENT:
+        return TokenType.SINGLE_LINE_COMMENT;
+      case UnlinkedTokenType.SLASH:
+        return TokenType.SLASH;
+      case UnlinkedTokenType.SLASH_EQ:
+        return TokenType.SLASH_EQ;
+      case UnlinkedTokenType.SOURCE:
+        return Keyword.SOURCE;
+      case UnlinkedTokenType.STAR:
+        return TokenType.STAR;
+      case UnlinkedTokenType.STAR_EQ:
+        return TokenType.STAR_EQ;
+      case UnlinkedTokenType.STATIC:
+        return Keyword.STATIC;
+      case UnlinkedTokenType.STRING:
+        return TokenType.STRING;
+      case UnlinkedTokenType.STRING_INTERPOLATION_EXPRESSION:
+        return TokenType.STRING_INTERPOLATION_EXPRESSION;
+      case UnlinkedTokenType.STRING_INTERPOLATION_IDENTIFIER:
+        return TokenType.STRING_INTERPOLATION_IDENTIFIER;
+      case UnlinkedTokenType.SUPER:
+        return Keyword.SUPER;
+      case UnlinkedTokenType.SWITCH:
+        return Keyword.SWITCH;
+      case UnlinkedTokenType.SYNC:
+        return Keyword.SYNC;
+      case UnlinkedTokenType.THIS:
+        return Keyword.THIS;
+      case UnlinkedTokenType.THROW:
+        return Keyword.THROW;
+      case UnlinkedTokenType.TILDE:
+        return TokenType.TILDE;
+      case UnlinkedTokenType.TILDE_SLASH:
+        return TokenType.TILDE_SLASH;
+      case UnlinkedTokenType.TILDE_SLASH_EQ:
+        return TokenType.TILDE_SLASH_EQ;
+      case UnlinkedTokenType.TRUE:
+        return Keyword.TRUE;
+      case UnlinkedTokenType.TRY:
+        return Keyword.TRY;
+      case UnlinkedTokenType.TYPEDEF:
+        return Keyword.TYPEDEF;
+      case UnlinkedTokenType.VAR:
+        return Keyword.VAR;
+      case UnlinkedTokenType.VOID:
+        return Keyword.VOID;
+      case UnlinkedTokenType.WHILE:
+        return Keyword.WHILE;
+      case UnlinkedTokenType.WITH:
+        return Keyword.WITH;
+      case UnlinkedTokenType.YIELD:
+        return Keyword.YIELD;
+      default:
+        throw StateError('Unexpected type: $type');
+    }
+  }
+}
diff --git a/pkg/analyzer/lib/src/summary2/tokens_writer.dart b/pkg/analyzer/lib/src/summary2/tokens_writer.dart
new file mode 100644
index 0000000..59dae23
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary2/tokens_writer.dart
@@ -0,0 +1,445 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/ast/token.dart';
+import 'package:analyzer/src/dart/ast/token.dart';
+import 'package:analyzer/src/summary/format.dart';
+import 'package:analyzer/src/summary/idl.dart';
+import 'package:analyzer/src/summary2/tokens_context.dart';
+import 'package:meta/meta.dart';
+
+/// The result of writing a sequence of tokens.
+class TokensResult {
+  final UnlinkedTokensBuilder tokens;
+  final List<Token> _indexToToken;
+  final Map<Token, int> _tokenToIndex;
+
+  TokensResult(this.tokens, this._indexToToken, this._tokenToIndex);
+
+  TokensContext toContext() {
+    return TokensContext.fromResult(tokens, _indexToToken, _tokenToIndex);
+  }
+}
+
+class TokensWriter {
+  final UnlinkedTokensBuilder _tokens = UnlinkedTokensBuilder();
+  final List<Token> _indexToToken = [];
+  final Map<Token, int> _tokenToIndex = Map.identity();
+
+  TokensWriter() {
+    _addToken(
+      null,
+      isSynthetic: true,
+      kind: UnlinkedTokenKind.nothing,
+      length: 0,
+      lexeme: '',
+      offset: 0,
+      precedingComment: 0,
+      type: UnlinkedTokenType.NOTHING,
+    );
+  }
+
+  /// Write all the tokens from the [first] to the [last] inclusively.
+  TokensResult writeTokens(Token first, Token last) {
+    if (first is CommentToken) {
+      first = (first as CommentToken).parent;
+    }
+
+    var endGroupToBeginIndexMap = <Token, int>{};
+    var previousIndex = 0;
+    for (var token = first;; token = token.next) {
+      var index = _writeToken(token);
+
+      if (previousIndex != 0) {
+        _tokens.next[previousIndex] = index;
+      }
+      previousIndex = index;
+
+      if (token.endGroup != null) {
+        endGroupToBeginIndexMap[token.endGroup] = index;
+      }
+
+      var beginIndex = endGroupToBeginIndexMap[token];
+      if (beginIndex != null) {
+        _tokens.endGroup[beginIndex] = index;
+      }
+
+      if (token == last) break;
+    }
+
+    return TokensResult(_tokens, _indexToToken, _tokenToIndex);
+  }
+
+  int _addToken(
+    Token token, {
+    @required bool isSynthetic,
+    @required UnlinkedTokenKind kind,
+    @required int length,
+    @required String lexeme,
+    @required int offset,
+    @required int precedingComment,
+    @required UnlinkedTokenType type,
+  }) {
+    _tokens.endGroup.add(0);
+    _tokens.isSynthetic.add(isSynthetic);
+    _tokens.kind.add(kind);
+    _tokens.length.add(length);
+    _tokens.lexeme.add(lexeme);
+    _tokens.next.add(0);
+    _tokens.offset.add(offset);
+    _tokens.precedingComment.add(precedingComment);
+    _tokens.type.add(type);
+
+    var index = _indexToToken.length;
+    _indexToToken.add(token);
+    _tokenToIndex[token] = index;
+    return index;
+  }
+
+  int _writeCommentToken(CommentToken token) {
+    if (token == null) return 0;
+
+    int firstIndex = null;
+    var previousIndex = 0;
+    while (token != null) {
+      var index = _addToken(
+        token,
+        isSynthetic: false,
+        kind: UnlinkedTokenKind.comment,
+        length: token.length,
+        lexeme: token.lexeme,
+        offset: token.offset,
+        precedingComment: 0,
+        type: _astToBinaryTokenType(token.type),
+      );
+      firstIndex ??= index;
+
+      if (previousIndex != 0) {
+        _tokens.next[previousIndex] = index;
+      }
+      previousIndex = index;
+
+      token = token.next;
+    }
+
+    return firstIndex;
+  }
+
+  int _writeToken(Token token) {
+    assert(_tokenToIndex[token] == null);
+
+    var commentIndex = _writeCommentToken(token.precedingComments);
+
+    if (token is KeywordToken) {
+      return _addToken(
+        token,
+        isSynthetic: token.isSynthetic,
+        kind: UnlinkedTokenKind.keyword,
+        lexeme: token.lexeme,
+        offset: token.offset,
+        length: token.length,
+        precedingComment: commentIndex,
+        type: _astToBinaryTokenType(token.type),
+      );
+    } else if (token is StringToken) {
+      return _addToken(
+        token,
+        isSynthetic: token.isSynthetic,
+        kind: UnlinkedTokenKind.string,
+        lexeme: token.lexeme,
+        offset: token.offset,
+        length: token.length,
+        precedingComment: commentIndex,
+        type: _astToBinaryTokenType(token.type),
+      );
+    } else if (token is SimpleToken) {
+      return _addToken(
+        token,
+        isSynthetic: token.isSynthetic,
+        kind: UnlinkedTokenKind.simple,
+        lexeme: token.lexeme,
+        offset: token.offset,
+        length: token.length,
+        precedingComment: commentIndex,
+        type: _astToBinaryTokenType(token.type),
+      );
+    } else {
+      throw UnimplementedError('(${token.runtimeType}) $token');
+    }
+  }
+
+  static UnlinkedTokenType _astToBinaryTokenType(TokenType type) {
+    if (type == Keyword.ABSTRACT) {
+      return UnlinkedTokenType.ABSTRACT;
+    } else if (type == TokenType.AMPERSAND) {
+      return UnlinkedTokenType.AMPERSAND;
+    } else if (type == TokenType.AMPERSAND_AMPERSAND) {
+      return UnlinkedTokenType.AMPERSAND_AMPERSAND;
+    } else if (type == TokenType.AMPERSAND_EQ) {
+      return UnlinkedTokenType.AMPERSAND_EQ;
+    } else if (type == TokenType.AS) {
+      return UnlinkedTokenType.AS;
+    } else if (type == Keyword.ASSERT) {
+      return UnlinkedTokenType.ASSERT;
+    } else if (type == Keyword.ASYNC) {
+      return UnlinkedTokenType.ASYNC;
+    } else if (type == TokenType.AT) {
+      return UnlinkedTokenType.AT;
+    } else if (type == Keyword.AWAIT) {
+      return UnlinkedTokenType.AWAIT;
+    } else if (type == TokenType.BACKPING) {
+      return UnlinkedTokenType.BACKPING;
+    } else if (type == TokenType.BACKSLASH) {
+      return UnlinkedTokenType.BACKSLASH;
+    } else if (type == TokenType.BANG) {
+      return UnlinkedTokenType.BANG;
+    } else if (type == TokenType.BANG_EQ) {
+      return UnlinkedTokenType.BANG_EQ;
+    } else if (type == TokenType.BAR) {
+      return UnlinkedTokenType.BAR;
+    } else if (type == TokenType.BAR_BAR) {
+      return UnlinkedTokenType.BAR_BAR;
+    } else if (type == TokenType.BAR_EQ) {
+      return UnlinkedTokenType.BAR_EQ;
+    } else if (type == Keyword.BREAK) {
+      return UnlinkedTokenType.BREAK;
+    } else if (type == TokenType.CARET) {
+      return UnlinkedTokenType.CARET;
+    } else if (type == TokenType.CARET_EQ) {
+      return UnlinkedTokenType.CARET_EQ;
+    } else if (type == Keyword.CASE) {
+      return UnlinkedTokenType.CASE;
+    } else if (type == Keyword.CATCH) {
+      return UnlinkedTokenType.CATCH;
+    } else if (type == Keyword.CLASS) {
+      return UnlinkedTokenType.CLASS;
+    } else if (type == TokenType.CLOSE_CURLY_BRACKET) {
+      return UnlinkedTokenType.CLOSE_CURLY_BRACKET;
+    } else if (type == TokenType.CLOSE_PAREN) {
+      return UnlinkedTokenType.CLOSE_PAREN;
+    } else if (type == TokenType.CLOSE_SQUARE_BRACKET) {
+      return UnlinkedTokenType.CLOSE_SQUARE_BRACKET;
+    } else if (type == TokenType.COLON) {
+      return UnlinkedTokenType.COLON;
+    } else if (type == TokenType.COMMA) {
+      return UnlinkedTokenType.COMMA;
+    } else if (type == Keyword.CONST) {
+      return UnlinkedTokenType.CONST;
+    } else if (type == Keyword.CONTINUE) {
+      return UnlinkedTokenType.CONTINUE;
+    } else if (type == Keyword.COVARIANT) {
+      return UnlinkedTokenType.COVARIANT;
+    } else if (type == Keyword.DEFAULT) {
+      return UnlinkedTokenType.DEFAULT;
+    } else if (type == Keyword.DEFERRED) {
+      return UnlinkedTokenType.DEFERRED;
+    } else if (type == Keyword.DO) {
+      return UnlinkedTokenType.DO;
+    } else if (type == TokenType.DOUBLE) {
+      return UnlinkedTokenType.DOUBLE;
+    } else if (type == Keyword.DYNAMIC) {
+      return UnlinkedTokenType.DYNAMIC;
+    } else if (type == Keyword.ELSE) {
+      return UnlinkedTokenType.ELSE;
+    } else if (type == Keyword.ENUM) {
+      return UnlinkedTokenType.ENUM;
+    } else if (type == TokenType.EOF) {
+      return UnlinkedTokenType.EOF;
+    } else if (type == TokenType.EQ) {
+      return UnlinkedTokenType.EQ;
+    } else if (type == TokenType.EQ_EQ) {
+      return UnlinkedTokenType.EQ_EQ;
+    } else if (type == Keyword.EXPORT) {
+      return UnlinkedTokenType.EXPORT;
+    } else if (type == Keyword.EXTENDS) {
+      return UnlinkedTokenType.EXTENDS;
+    } else if (type == Keyword.EXTERNAL) {
+      return UnlinkedTokenType.EXTERNAL;
+    } else if (type == Keyword.FACTORY) {
+      return UnlinkedTokenType.FACTORY;
+    } else if (type == Keyword.FALSE) {
+      return UnlinkedTokenType.FALSE;
+    } else if (type == Keyword.FINAL) {
+      return UnlinkedTokenType.FINAL;
+    } else if (type == Keyword.FINALLY) {
+      return UnlinkedTokenType.FINALLY;
+    } else if (type == Keyword.FOR) {
+      return UnlinkedTokenType.FOR;
+    } else if (type == Keyword.FUNCTION) {
+      return UnlinkedTokenType.FUNCTION_KEYWORD;
+    } else if (type == TokenType.FUNCTION) {
+      return UnlinkedTokenType.FUNCTION;
+    } else if (type == Keyword.GET) {
+      return UnlinkedTokenType.GET;
+    } else if (type == TokenType.GT) {
+      return UnlinkedTokenType.GT;
+    } else if (type == TokenType.GT_EQ) {
+      return UnlinkedTokenType.GT_EQ;
+    } else if (type == TokenType.GT_GT) {
+      return UnlinkedTokenType.GT_GT;
+    } else if (type == TokenType.GT_GT_EQ) {
+      return UnlinkedTokenType.GT_GT_EQ;
+    } else if (type == TokenType.HASH) {
+      return UnlinkedTokenType.HASH;
+    } else if (type == TokenType.HEXADECIMAL) {
+      return UnlinkedTokenType.HEXADECIMAL;
+    } else if (type == Keyword.HIDE) {
+      return UnlinkedTokenType.HIDE;
+    } else if (type == TokenType.IDENTIFIER) {
+      return UnlinkedTokenType.IDENTIFIER;
+    } else if (type == Keyword.IF) {
+      return UnlinkedTokenType.IF;
+    } else if (type == Keyword.IMPLEMENTS) {
+      return UnlinkedTokenType.IMPLEMENTS;
+    } else if (type == Keyword.IMPORT) {
+      return UnlinkedTokenType.IMPORT;
+    } else if (type == Keyword.IN) {
+      return UnlinkedTokenType.IN;
+    } else if (type == TokenType.INDEX) {
+      return UnlinkedTokenType.INDEX;
+    } else if (type == TokenType.INDEX_EQ) {
+      return UnlinkedTokenType.INDEX_EQ;
+    } else if (type == TokenType.INT) {
+      return UnlinkedTokenType.INT;
+    } else if (type == Keyword.INTERFACE) {
+      return UnlinkedTokenType.INTERFACE;
+    } else if (type == TokenType.IS) {
+      return UnlinkedTokenType.IS;
+    } else if (type == Keyword.LIBRARY) {
+      return UnlinkedTokenType.LIBRARY;
+    } else if (type == TokenType.LT) {
+      return UnlinkedTokenType.LT;
+    } else if (type == TokenType.LT_EQ) {
+      return UnlinkedTokenType.LT_EQ;
+    } else if (type == TokenType.LT_LT) {
+      return UnlinkedTokenType.LT_LT;
+    } else if (type == TokenType.LT_LT_EQ) {
+      return UnlinkedTokenType.LT_LT_EQ;
+    } else if (type == TokenType.MINUS) {
+      return UnlinkedTokenType.MINUS;
+    } else if (type == TokenType.MINUS_EQ) {
+      return UnlinkedTokenType.MINUS_EQ;
+    } else if (type == TokenType.MINUS_MINUS) {
+      return UnlinkedTokenType.MINUS_MINUS;
+    } else if (type == Keyword.MIXIN) {
+      return UnlinkedTokenType.MIXIN;
+    } else if (type == TokenType.MULTI_LINE_COMMENT) {
+      return UnlinkedTokenType.MULTI_LINE_COMMENT;
+    } else if (type == Keyword.NATIVE) {
+      return UnlinkedTokenType.NATIVE;
+    } else if (type == Keyword.NEW) {
+      return UnlinkedTokenType.NEW;
+    } else if (type == Keyword.NULL) {
+      return UnlinkedTokenType.NULL;
+    } else if (type == Keyword.OF) {
+      return UnlinkedTokenType.OF;
+    } else if (type == Keyword.ON) {
+      return UnlinkedTokenType.ON;
+    } else if (type == TokenType.OPEN_CURLY_BRACKET) {
+      return UnlinkedTokenType.OPEN_CURLY_BRACKET;
+    } else if (type == TokenType.OPEN_PAREN) {
+      return UnlinkedTokenType.OPEN_PAREN;
+    } else if (type == TokenType.OPEN_SQUARE_BRACKET) {
+      return UnlinkedTokenType.OPEN_SQUARE_BRACKET;
+    } else if (type == Keyword.OPERATOR) {
+      return UnlinkedTokenType.OPERATOR;
+    } else if (type == Keyword.PART) {
+      return UnlinkedTokenType.PART;
+    } else if (type == Keyword.PATCH) {
+      return UnlinkedTokenType.PATCH;
+    } else if (type == TokenType.PERCENT) {
+      return UnlinkedTokenType.PERCENT;
+    } else if (type == TokenType.PERCENT_EQ) {
+      return UnlinkedTokenType.PERCENT_EQ;
+    } else if (type == TokenType.PERIOD) {
+      return UnlinkedTokenType.PERIOD;
+    } else if (type == TokenType.PERIOD_PERIOD) {
+      return UnlinkedTokenType.PERIOD_PERIOD;
+    } else if (type == TokenType.PERIOD_PERIOD_PERIOD) {
+      return UnlinkedTokenType.PERIOD_PERIOD_PERIOD;
+    } else if (type == TokenType.PERIOD_PERIOD_PERIOD_QUESTION) {
+      return UnlinkedTokenType.PERIOD_PERIOD_PERIOD_QUESTION;
+    } else if (type == TokenType.PLUS) {
+      return UnlinkedTokenType.PLUS;
+    } else if (type == TokenType.PLUS_EQ) {
+      return UnlinkedTokenType.PLUS_EQ;
+    } else if (type == TokenType.PLUS_PLUS) {
+      return UnlinkedTokenType.PLUS_PLUS;
+    } else if (type == TokenType.QUESTION) {
+      return UnlinkedTokenType.QUESTION;
+    } else if (type == TokenType.QUESTION_PERIOD) {
+      return UnlinkedTokenType.QUESTION_PERIOD;
+    } else if (type == TokenType.QUESTION_QUESTION) {
+      return UnlinkedTokenType.QUESTION_QUESTION;
+    } else if (type == TokenType.QUESTION_QUESTION_EQ) {
+      return UnlinkedTokenType.QUESTION_QUESTION_EQ;
+    } else if (type == Keyword.RETHROW) {
+      return UnlinkedTokenType.RETHROW;
+    } else if (type == Keyword.RETURN) {
+      return UnlinkedTokenType.RETURN;
+    } else if (type == TokenType.SCRIPT_TAG) {
+      return UnlinkedTokenType.SCRIPT_TAG;
+    } else if (type == TokenType.SEMICOLON) {
+      return UnlinkedTokenType.SEMICOLON;
+    } else if (type == Keyword.SET) {
+      return UnlinkedTokenType.SET;
+    } else if (type == Keyword.SHOW) {
+      return UnlinkedTokenType.SHOW;
+    } else if (type == TokenType.SINGLE_LINE_COMMENT) {
+      return UnlinkedTokenType.SINGLE_LINE_COMMENT;
+    } else if (type == TokenType.SLASH) {
+      return UnlinkedTokenType.SLASH;
+    } else if (type == TokenType.SLASH_EQ) {
+      return UnlinkedTokenType.SLASH_EQ;
+    } else if (type == Keyword.SOURCE) {
+      return UnlinkedTokenType.SOURCE;
+    } else if (type == TokenType.STAR) {
+      return UnlinkedTokenType.STAR;
+    } else if (type == TokenType.STAR_EQ) {
+      return UnlinkedTokenType.STAR_EQ;
+    } else if (type == Keyword.STATIC) {
+      return UnlinkedTokenType.STATIC;
+    } else if (type == TokenType.STRING) {
+      return UnlinkedTokenType.STRING;
+    } else if (type == TokenType.STRING_INTERPOLATION_EXPRESSION) {
+      return UnlinkedTokenType.STRING_INTERPOLATION_EXPRESSION;
+    } else if (type == TokenType.STRING_INTERPOLATION_IDENTIFIER) {
+      return UnlinkedTokenType.STRING_INTERPOLATION_IDENTIFIER;
+    } else if (type == Keyword.SUPER) {
+      return UnlinkedTokenType.SUPER;
+    } else if (type == Keyword.SWITCH) {
+      return UnlinkedTokenType.SWITCH;
+    } else if (type == Keyword.SYNC) {
+      return UnlinkedTokenType.SYNC;
+    } else if (type == Keyword.THIS) {
+      return UnlinkedTokenType.THIS;
+    } else if (type == Keyword.THROW) {
+      return UnlinkedTokenType.THROW;
+    } else if (type == TokenType.TILDE) {
+      return UnlinkedTokenType.TILDE;
+    } else if (type == TokenType.TILDE_SLASH) {
+      return UnlinkedTokenType.TILDE_SLASH;
+    } else if (type == TokenType.TILDE_SLASH_EQ) {
+      return UnlinkedTokenType.TILDE_SLASH_EQ;
+    } else if (type == Keyword.TRUE) {
+      return UnlinkedTokenType.TRUE;
+    } else if (type == Keyword.TRY) {
+      return UnlinkedTokenType.TRY;
+    } else if (type == Keyword.TYPEDEF) {
+      return UnlinkedTokenType.TYPEDEF;
+    } else if (type == Keyword.VAR) {
+      return UnlinkedTokenType.VAR;
+    } else if (type == Keyword.VOID) {
+      return UnlinkedTokenType.VOID;
+    } else if (type == Keyword.WHILE) {
+      return UnlinkedTokenType.WHILE;
+    } else if (type == Keyword.WITH) {
+      return UnlinkedTokenType.WITH;
+    } else if (type == Keyword.YIELD) {
+      return UnlinkedTokenType.YIELD;
+    } else {
+      throw StateError('Unexpected type: $type');
+    }
+  }
+}
diff --git a/pkg/analyzer/lib/src/summary2/top_level_inference.dart b/pkg/analyzer/lib/src/summary2/top_level_inference.dart
new file mode 100644
index 0000000..60b10d9
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary2/top_level_inference.dart
@@ -0,0 +1,245 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/visitor.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/builder.dart';
+import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/resolver/scope.dart';
+import 'package:analyzer/src/generated/resolver.dart';
+import 'package:analyzer/src/summary/link.dart' as graph
+    show DependencyWalker, Node;
+import 'package:analyzer/src/summary2/ast_resolver.dart';
+import 'package:analyzer/src/summary2/lazy_ast.dart';
+import 'package:analyzer/src/summary2/link.dart';
+import 'package:analyzer/src/summary2/linking_node_scope.dart';
+import 'package:analyzer/src/task/strong_mode.dart';
+
+DartType _dynamicIfNull(DartType type) {
+  if (type == null || type.isBottom || type.isDartCoreNull) {
+    return DynamicTypeImpl.instance;
+  }
+  return type;
+}
+
+AstNode _getLinkedNode(Element element) {
+  return (element as ElementImpl).linkedNode;
+}
+
+class TopLevelInference {
+  final Linker linker;
+
+  TopLevelInference(this.linker);
+
+  DynamicTypeImpl get _dynamicType => DynamicTypeImpl.instance;
+
+  void infer() {
+    _performOverrideInference();
+    _InitializerInference(linker).perform();
+    _inferConstructorFieldFormals();
+  }
+
+  void _inferConstructorFieldFormals() {
+    for (var builder in linker.builders.values) {
+      for (var unit in builder.element.units) {
+        for (var class_ in unit.types) {
+          var fields = <String, DartType>{};
+          for (var field in class_.fields) {
+            if (field.isSynthetic) continue;
+
+            var name = field.name;
+            var type = field.type;
+            if (type == null) {
+              throw StateError('Field $name should have a type.');
+            }
+            fields[name] ??= type;
+          }
+
+          for (var constructor in class_.constructors) {
+            for (var parameter in constructor.parameters) {
+              if (parameter is FieldFormalParameterElement) {
+                var node = _getLinkedNode(parameter);
+                if (node is DefaultFormalParameter) {
+                  var defaultParameter = node as DefaultFormalParameter;
+                  node = defaultParameter.parameter;
+                }
+
+                if (node is FieldFormalParameter &&
+                    node.type == null &&
+                    node.parameters == null) {
+                  var name = parameter.name;
+                  var type = fields[name] ?? _dynamicType;
+                  LazyAst.setType(node, type);
+                }
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+
+  void _performOverrideInference() {
+    for (var builder in linker.builders.values) {
+      for (var unit in builder.element.units) {
+        new InstanceMemberInferrer(
+          linker.typeProvider,
+          linker.inheritance,
+        ).inferCompilationUnit(unit);
+      }
+    }
+  }
+}
+
+class _InferenceDependenciesCollector extends RecursiveAstVisitor<void> {
+  final Set<PropertyInducingElement> _set = Set.identity();
+
+  @override
+  void visitSimpleIdentifier(SimpleIdentifier node) {
+    var element = node.staticElement;
+    if (element is PropertyAccessorElement && element.isGetter) {
+      _set.add(element.variable);
+    }
+  }
+}
+
+class _InferenceNode extends graph.Node<_InferenceNode> {
+  final _InferenceWalker _walker;
+  final LibraryElement _library;
+  final Scope _scope;
+  final VariableDeclaration _node;
+
+  @override
+  bool isEvaluated = false;
+
+  _InferenceNode(this._walker, this._library, this._scope, this._node);
+
+  @override
+  List<_InferenceNode> computeDependencies() {
+    _node.initializer.accept(LocalElementBuilder(ElementHolder(), null));
+
+    _resolveInitializer();
+
+    var collector = _InferenceDependenciesCollector();
+    _node.initializer.accept(collector);
+
+    if (collector._set.isEmpty) {
+      return const <_InferenceNode>[];
+    }
+
+    return collector._set
+        .map(_walker.getNode)
+        .where((node) => node != null)
+        .toList();
+  }
+
+  void evaluate() {
+    _resolveInitializer();
+
+    VariableDeclarationList parent = _node.parent;
+    if (parent.type == null) {
+      var initializerType = _node.initializer.staticType;
+      initializerType = _dynamicIfNull(initializerType);
+      LazyAst.setType(_node, initializerType);
+    }
+
+    isEvaluated = true;
+  }
+
+  void markCircular() {
+    LazyAst.setType(_node, DynamicTypeImpl.instance);
+    isEvaluated = true;
+  }
+
+  void _resolveInitializer() {
+    var astResolver = AstResolver(_walker._linker, _library, _scope);
+    astResolver.resolve(_node.initializer, doAstRewrite: true);
+  }
+}
+
+class _InferenceWalker extends graph.DependencyWalker<_InferenceNode> {
+  final Linker _linker;
+  final Map<Element, _InferenceNode> _nodes = Map.identity();
+
+  _InferenceWalker(this._linker);
+
+  void addNode(Element element, LibraryElement library, Scope scope,
+      VariableDeclaration node) {
+    _nodes[element] = _InferenceNode(this, library, scope, node);
+  }
+
+  @override
+  void evaluate(_InferenceNode v) {
+    v.evaluate();
+  }
+
+  @override
+  void evaluateScc(List<_InferenceNode> scc) {
+    for (var node in scc) {
+      node.markCircular();
+    }
+  }
+
+  _InferenceNode getNode(Element element) {
+    return _nodes[element];
+  }
+
+  void walkNodes() {
+    for (var node in _nodes.values) {
+      if (!node.isEvaluated) {
+        walk(node);
+      }
+    }
+  }
+}
+
+class _InitializerInference {
+  final Linker _linker;
+  final _InferenceWalker _walker;
+
+  LibraryElement _library;
+  Scope _scope;
+
+  _InitializerInference(this._linker) : _walker = _InferenceWalker(_linker);
+
+  void perform() {
+    for (var builder in _linker.builders.values) {
+      _library = builder.element;
+      for (var unit in _library.units) {
+        for (var class_ in unit.types) {
+          var node = _getLinkedNode(class_);
+          _scope = LinkingNodeContext.get(node).scope;
+          for (var element in class_.fields) {
+            _addNode(element);
+          }
+        }
+
+        _scope = builder.libraryScope;
+        for (var element in unit.topLevelVariables) {
+          _addNode(element);
+        }
+      }
+    }
+    _walker.walkNodes();
+  }
+
+  void _addNode(PropertyInducingElement element) {
+    if (element.isSynthetic) return;
+
+    VariableDeclaration node = _getLinkedNode(element);
+    VariableDeclarationList variableList = node.parent;
+    if (variableList.type == null || element.isConst) {
+      if (node.initializer != null) {
+        _walker.addNode(element, _library, _scope, node);
+      } else {
+        if (LazyAst.getType(node) == null) {
+          LazyAst.setType(node, DynamicTypeImpl.instance);
+        }
+      }
+    }
+  }
+}
diff --git a/pkg/analyzer/lib/src/summary2/type_builder.dart b/pkg/analyzer/lib/src/summary2/type_builder.dart
new file mode 100644
index 0000000..9a677ee
--- /dev/null
+++ b/pkg/analyzer/lib/src/summary2/type_builder.dart
@@ -0,0 +1,260 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/src/dart/ast/ast.dart';
+import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type_algebra.dart';
+import 'package:analyzer/src/generated/type_system.dart';
+import 'package:analyzer/src/summary2/lazy_ast.dart';
+
+class TypeBuilder {
+  final Dart2TypeSystem typeSystem;
+
+  /// The set of type annotations, and declaration in the build unit, for which
+  /// we need to build types, but have not built yet.
+  final Set<AstNode> _nodesToBuildType = Set.identity();
+
+  TypeBuilder(this.typeSystem);
+
+  DynamicTypeImpl get _dynamicType => DynamicTypeImpl.instance;
+
+  VoidTypeImpl get _voidType => VoidTypeImpl.instance;
+
+  /// The [nodes] list is a mix of [TypeAnnotation]s and declarations, where
+  /// usually type annotations come before declarations that use them, but this
+  /// is not guaranteed, and not even always possible. For example references
+  /// to typedefs declared in another unit being built - we need to build types
+  /// for this typedef, which might reference another unit (encountered before
+  /// or after the one defining the typedef).
+  void build(List<AstNode> nodes) {
+    _nodesToBuildType.addAll(nodes);
+    for (var item in nodes) {
+      _build(item);
+    }
+  }
+
+  void _build(AstNode node) {
+    if (node == null) return;
+    if (!_nodesToBuildType.remove(node)) return;
+
+    if (node is TypeAnnotation) {
+      _typeAnnotation(node);
+    } else {
+      _declaration(node);
+    }
+  }
+
+  FunctionType _buildFunctionType(
+    TypeParameterList typeParameterList,
+    TypeAnnotation returnTypeNode,
+    FormalParameterList parameterList,
+  ) {
+    var returnType = returnTypeNode?.type ?? _dynamicType;
+
+    List<TypeParameterElement> typeParameters;
+    if (typeParameterList != null) {
+      typeParameters = typeParameterList.typeParameters
+          .map<TypeParameterElement>((p) => p.declaredElement)
+          .toList();
+    } else {
+      typeParameters = const <TypeParameterElement>[];
+    }
+
+    var formalParameters = parameterList.parameters.map((parameter) {
+      return ParameterElementImpl.synthetic(
+        parameter.identifier?.name ?? '',
+        LazyAst.getType(parameter),
+        // ignore: deprecated_member_use_from_same_package
+        parameter.kind,
+      );
+    }).toList();
+
+    return FunctionTypeImpl.synthetic(
+      returnType,
+      typeParameters,
+      formalParameters,
+    );
+  }
+
+  void _declaration(AstNode node) {
+    if (node is FieldFormalParameter) {
+      _fieldFormalParameter(node);
+    } else if (node is FunctionDeclaration) {
+      var defaultReturnType = node.isSetter ? _voidType : _dynamicType;
+      var returnType = node.returnType?.type ?? defaultReturnType;
+      LazyAst.setReturnType(node, returnType);
+    } else if (node is FunctionTypeAlias) {
+      _functionTypeAlias(node);
+    } else if (node is FunctionTypedFormalParameter) {
+      _functionTypedFormalParameter(node);
+    } else if (node is GenericFunctionType) {
+      _genericFunctionType(node);
+    } else if (node is MethodDeclaration) {
+      var defaultReturnType = node.isSetter ? _voidType : _dynamicType;
+      var returnType = node.returnType?.type ?? defaultReturnType;
+      LazyAst.setReturnType(node, returnType);
+    } else if (node is SimpleFormalParameter) {
+      _build(node.type);
+      LazyAst.setType(node, node.type?.type ?? _dynamicType);
+    } else if (node is VariableDeclarationList) {
+      var type = node.type?.type;
+      if (type != null) {
+        for (var variable in node.variables) {
+          LazyAst.setType(variable, type);
+        }
+      }
+    } else {
+      throw UnimplementedError('${node.runtimeType}');
+    }
+  }
+
+  void _fieldFormalParameter(FieldFormalParameter node) {
+    var parameterList = node.parameters;
+    if (parameterList != null) {
+      var type = _buildFunctionType(
+        node.typeParameters,
+        node.type,
+        parameterList,
+      );
+      LazyAst.setType(node, type);
+    } else {
+      LazyAst.setType(node, node.type?.type ?? _dynamicType);
+    }
+  }
+
+  void _formalParameterList(FormalParameterList node) {
+    for (var formalParameter in node.parameters) {
+      if (formalParameter is SimpleFormalParameter) {
+        _build(formalParameter);
+      }
+    }
+  }
+
+  void _functionTypeAlias(FunctionTypeAlias node) {
+    var returnTypeNode = node.returnType;
+    _build(returnTypeNode);
+    LazyAst.setReturnType(node, returnTypeNode?.type ?? _dynamicType);
+
+    _typeParameterList(node.typeParameters);
+    _formalParameterList(node.parameters);
+  }
+
+  void _functionTypedFormalParameter(FunctionTypedFormalParameter node) {
+    var type = _buildFunctionType(
+      node.typeParameters,
+      node.returnType,
+      node.parameters,
+    );
+    LazyAst.setType(node, type);
+  }
+
+  void _genericFunctionType(GenericFunctionTypeImpl node) {
+    var returnTypeNode = node.returnType;
+    _build(returnTypeNode);
+    LazyAst.setReturnType(node, returnTypeNode?.type ?? _dynamicType);
+
+    _typeParameterList(node.typeParameters);
+    _formalParameterList(node.parameters);
+
+    node.type = _buildFunctionType(
+      node.typeParameters,
+      node.returnType,
+      node.parameters,
+    );
+  }
+
+  List<DartType> _listOfDynamic(int typeParametersLength) {
+    return List<DartType>.filled(typeParametersLength, _dynamicType);
+  }
+
+  void _typeAnnotation(TypeAnnotation node) {
+    if (node is GenericFunctionType) {
+      _genericFunctionType(node);
+    } else if (node is TypeName) {
+      node.type = _dynamicType;
+      _typeName(node);
+    } else {
+      throw StateError('${node.runtimeType}');
+    }
+  }
+
+  void _typeName(TypeName node) {
+    var element = node.name.staticElement;
+
+    List<DartType> typeArguments;
+    var typeArgumentList = node.typeArguments;
+    if (typeArgumentList != null) {
+      typeArguments = typeArgumentList.arguments.map((a) => a.type).toList();
+    }
+
+    if (element is ClassElement) {
+      if (element.isEnum) {
+        node.type = InterfaceTypeImpl.explicit(element, const []);
+      } else {
+        var rawType = element.type;
+
+        var typeParametersLength = element.typeParameters.length;
+        if (typeParametersLength == 0) {
+          node.type = rawType;
+          return;
+        }
+
+        if (typeArguments == null) {
+          node.type = typeSystem.instantiateToBounds(rawType);
+          return;
+        }
+
+        if (typeArguments.length != typeParametersLength) {
+          typeArguments = _listOfDynamic(typeParametersLength);
+        }
+
+        node.type = InterfaceTypeImpl.explicit(element, typeArguments);
+      }
+    } else if (element is GenericTypeAliasElement) {
+      _build((element as ElementImpl).linkedNode);
+
+      var rawType = element.function.type;
+
+      var typeParameters = element.typeParameters;
+      var typeParametersLength = typeParameters.length;
+      if (typeParametersLength == 0) {
+        node.type = rawType;
+        return;
+      }
+
+      if (typeArguments == null) {
+        typeArguments = typeSystem.instantiateTypeFormalsToBounds(
+          typeParameters,
+        );
+      } else if (typeArguments.length != typeParametersLength) {
+        typeArguments = _listOfDynamic(typeParametersLength);
+      }
+
+      var substitution = Substitution.fromPairs(
+        typeParameters,
+        typeArguments,
+      );
+      node.type = substitution.substituteType(rawType);
+    } else if (element is TypeParameterElement) {
+      node.type = TypeParameterTypeImpl(element);
+    } else {
+      // We might get all kinds of elements, including not type at all.
+      // For example a PrefixElement, or a getter, etc.
+      // In all these cases the type is dynamic.
+      node.type = _dynamicType;
+    }
+  }
+
+  void _typeParameterList(TypeParameterList node) {
+    if (node == null) return;
+
+    for (var typeParameter in node.typeParameters) {
+      _build(typeParameter.bound);
+    }
+  }
+}
diff --git a/pkg/analyzer/lib/src/task/api/dart.dart b/pkg/analyzer/lib/src/task/api/dart.dart
index f1f19e6..9064e25 100644
--- a/pkg/analyzer/lib/src/task/api/dart.dart
+++ b/pkg/analyzer/lib/src/task/api/dart.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -9,7 +9,6 @@
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/utilities_general.dart';
 import 'package:analyzer/src/task/api/model.dart';
-import 'package:analyzer/src/task/dart.dart';
 
 /**
  * The analysis errors associated with a [Source] representing a compilation
@@ -89,8 +88,7 @@
  * The result is only available for [Source]s representing a compilation unit.
  */
 final ResultDescriptor<CompilationUnit> PARSED_UNIT =
-    new ResultDescriptor<CompilationUnit>('PARSED_UNIT', null,
-        cachingPolicy: AST_CACHING_POLICY);
+    new ResultDescriptor<CompilationUnit>('PARSED_UNIT', null);
 
 /**
  * The resolved [CompilationUnit] associated with a compilation unit, with
@@ -99,8 +97,7 @@
  * The result is only available for [LibrarySpecificUnit]s.
  */
 final ResultDescriptor<CompilationUnit> RESOLVED_UNIT =
-    new ResultDescriptor<CompilationUnit>('RESOLVED_UNIT', null,
-        cachingPolicy: AST_CACHING_POLICY);
+    new ResultDescriptor<CompilationUnit>('RESOLVED_UNIT', null);
 
 /**
  * The kind of a [Source].
@@ -116,9 +113,8 @@
  *
  * The result is only available for [Source]s representing a compilation unit.
  */
-final ResultDescriptor<Token> TOKEN_STREAM = new ResultDescriptor<Token>(
-    'TOKEN_STREAM', null,
-    cachingPolicy: TOKEN_STREAM_CACHING_POLICY);
+final ResultDescriptor<Token> TOKEN_STREAM =
+    new ResultDescriptor<Token>('TOKEN_STREAM', null);
 
 /**
  * The sources of the Dart files that a library consists of.
diff --git a/pkg/analyzer/lib/src/task/api/general.dart b/pkg/analyzer/lib/src/task/api/general.dart
index 2f7ab11..d884116 100644
--- a/pkg/analyzer/lib/src/task/api/general.dart
+++ b/pkg/analyzer/lib/src/task/api/general.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/task/api/html.dart b/pkg/analyzer/lib/src/task/api/html.dart
deleted file mode 100644
index 8a7cae8..0000000
--- a/pkg/analyzer/lib/src/task/api/html.dart
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/error/error.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/task/api/model.dart';
-import 'package:html/dom.dart';
-
-/**
- * The result of parsing an HTML file.
- */
-final ResultDescriptor<Document> HTML_DOCUMENT =
-    new ResultDescriptor<Document>('HTML_DOCUMENT', null);
-
-/**
- * The analysis errors associated with a [Source] representing an HTML file.
- */
-final ListResultDescriptor<AnalysisError> HTML_ERRORS =
-    new ListResultDescriptor<AnalysisError>(
-        'HTML_ERRORS', AnalysisError.NO_ERRORS);
-
-/**
- * The sources of the Dart libraries referenced by an HTML file.
- */
-final ListResultDescriptor<Source> REFERENCED_LIBRARIES =
-    new ListResultDescriptor<Source>('REFERENCED_LIBRARIES', const <Source>[]);
diff --git a/pkg/analyzer/lib/src/task/api/model.dart b/pkg/analyzer/lib/src/task/api/model.dart
index fe0edef..2d13057 100644
--- a/pkg/analyzer/lib/src/task/api/model.dart
+++ b/pkg/analyzer/lib/src/task/api/model.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/task/api/yaml.dart b/pkg/analyzer/lib/src/task/api/yaml.dart
index 8bfe390..aacc75d 100644
--- a/pkg/analyzer/lib/src/task/api/yaml.dart
+++ b/pkg/analyzer/lib/src/task/api/yaml.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/task/dart.dart b/pkg/analyzer/lib/src/task/dart.dart
deleted file mode 100644
index 50e3992..0000000
--- a/pkg/analyzer/lib/src/task/dart.dart
+++ /dev/null
@@ -1,5831 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:collection';
-
-import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/dart/ast/standard_resolution_map.dart';
-import 'package:analyzer/dart/ast/token.dart';
-import 'package:analyzer/dart/ast/visitor.dart';
-import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer/error/error.dart';
-import 'package:analyzer/error/listener.dart';
-import 'package:analyzer/exception/exception.dart';
-import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/file_system/physical_file_system.dart';
-import 'package:analyzer/source/line_info.dart';
-import 'package:analyzer/src/context/cache.dart';
-import 'package:analyzer/src/dart/ast/ast.dart'
-    show NamespaceDirectiveImpl, UriBasedDirectiveImpl, UriValidationCode;
-import 'package:analyzer/src/dart/ast/utilities.dart';
-import 'package:analyzer/src/dart/constant/constant_verifier.dart';
-import 'package:analyzer/src/dart/element/builder.dart';
-import 'package:analyzer/src/dart/element/element.dart';
-import 'package:analyzer/src/dart/element/inheritance_manager2.dart';
-import 'package:analyzer/src/dart/scanner/reader.dart';
-import 'package:analyzer/src/dart/scanner/scanner.dart';
-import 'package:analyzer/src/dart/sdk/patch.dart';
-import 'package:analyzer/src/dart/sdk/sdk.dart';
-import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/error/inheritance_override.dart';
-import 'package:analyzer/src/error/pending_error.dart';
-import 'package:analyzer/src/generated/constant.dart';
-import 'package:analyzer/src/generated/declaration_resolver.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/error_verifier.dart';
-import 'package:analyzer/src/generated/incremental_resolver.dart';
-import 'package:analyzer/src/generated/parser.dart';
-import 'package:analyzer/src/generated/resolver.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/plugin/engine_plugin.dart';
-import 'package:analyzer/src/services/lint.dart';
-import 'package:analyzer/src/task/api/dart.dart';
-import 'package:analyzer/src/task/api/general.dart';
-import 'package:analyzer/src/task/api/model.dart';
-import 'package:analyzer/src/task/driver.dart';
-import 'package:analyzer/src/task/general.dart';
-import 'package:analyzer/src/task/html.dart';
-import 'package:analyzer/src/task/inputs.dart';
-import 'package:analyzer/src/task/model.dart';
-import 'package:analyzer/src/task/strong/checker.dart';
-import 'package:analyzer/src/task/strong_mode.dart';
-
-/**
- * The [ResultCachingPolicy] for ASTs.
- */
-const ResultCachingPolicy AST_CACHING_POLICY =
-    const SimpleResultCachingPolicy(1024 * 64, 32);
-
-/**
- * The [ResultCachingPolicy] for lists of [ConstantEvaluationTarget]s.
- */
-const ResultCachingPolicy CONSTANT_EVALUATION_TARGET_LIST_POLICY =
-    const SimpleResultCachingPolicy(-1, -1);
-
-/**
- * The [ResultCachingPolicy] for [ConstantEvaluationTarget]s.
- */
-const ResultCachingPolicy CONSTANT_EVALUATION_TARGET_POLICY =
-    const SimpleResultCachingPolicy(-1, -1);
-
-/**
- * The [ResultCachingPolicy] for [Element]s.
- */
-const ResultCachingPolicy ELEMENT_CACHING_POLICY =
-    const SimpleResultCachingPolicy(-1, -1);
-
-/**
- * The [ResultCachingPolicy] for [TOKEN_STREAM].
- */
-const ResultCachingPolicy TOKEN_STREAM_CACHING_POLICY =
-    const SimpleResultCachingPolicy(1, 1);
-
-/**
- * The [ResultCachingPolicy] for [UsedImportedElements]s.
- */
-const ResultCachingPolicy USED_IMPORTED_ELEMENTS_POLICY =
-    const SimpleResultCachingPolicy(-1, -1);
-
-/**
- * The [ResultCachingPolicy] for [UsedLocalElements]s.
- */
-const ResultCachingPolicy USED_LOCAL_ELEMENTS_POLICY =
-    const SimpleResultCachingPolicy(-1, -1);
-
-/**
- * The errors produced while building a library's directives.
- *
- * The list will be empty if there were no errors, but will not be `null`.
- *
- * The result is only available for [Source]s representing a library.
- */
-final ListResultDescriptor<AnalysisError> BUILD_DIRECTIVES_ERRORS =
-    new ListResultDescriptor<AnalysisError>(
-        'BUILD_DIRECTIVES_ERRORS', AnalysisError.NO_ERRORS);
-/**
- * The errors produced while building a library element.
- *
- * The list will be empty if there were no errors, but will not be `null`.
- *
- * The result is only available for [Source]s representing a library.
- */
-final ListResultDescriptor<AnalysisError> BUILD_LIBRARY_ERRORS =
-    new ListResultDescriptor<AnalysisError>(
-        'BUILD_LIBRARY_ERRORS', AnalysisError.NO_ERRORS);
-
-/**
- * A list of the [ConstantEvaluationTarget]s defined in a unit.  This includes
- * constants defined at top level, statically inside classes, and local to
- * functions, as well as constant constructors, annotations, and default values
- * of parameters.
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ListResultDescriptor<ConstantEvaluationTarget>
-    COMPILATION_UNIT_CONSTANTS =
-    new ListResultDescriptor<ConstantEvaluationTarget>(
-        'COMPILATION_UNIT_CONSTANTS', null,
-        cachingPolicy: CONSTANT_EVALUATION_TARGET_LIST_POLICY);
-
-/**
- * The element model associated with a single compilation unit.
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ResultDescriptor<CompilationUnitElement> COMPILATION_UNIT_ELEMENT =
-    new ResultDescriptor<CompilationUnitElement>(
-        'COMPILATION_UNIT_ELEMENT', null,
-        cachingPolicy: ELEMENT_CACHING_POLICY);
-
-/**
- * The list of [ConstantEvaluationTarget]s on which the target constant element
- * depends.
- *
- * The result is only available for targets representing a
- * [ConstantEvaluationTarget] (i.e. a constant variable declaration, a constant
- * constructor, or a parameter element with a default value).
- */
-final ListResultDescriptor<ConstantEvaluationTarget> CONSTANT_DEPENDENCIES =
-    new ListResultDescriptor<ConstantEvaluationTarget>(
-        'CONSTANT_DEPENDENCIES', const <ConstantEvaluationTarget>[]);
-
-/**
- * The flag specifying that the target constant element expression AST is
- * resolved, i.e. identifiers have all required elements set.
- *
- * The result is only available for targets representing a
- * [ConstantEvaluationTarget] (i.e. a constant variable declaration, a constant
- * constructor, or a parameter element with a default value).
- */
-final ResultDescriptor<bool> CONSTANT_EXPRESSION_RESOLVED =
-    new ResultDescriptor<bool>('CONSTANT_EXPRESSION_RESOLVED', false);
-
-/**
- * The list of [ConstantEvaluationTarget]s on which constant expressions of a
- * unit depend.
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ListResultDescriptor<ConstantEvaluationTarget>
-    CONSTANT_EXPRESSIONS_DEPENDENCIES =
-    new ListResultDescriptor<ConstantEvaluationTarget>(
-        'CONSTANT_EXPRESSIONS_DEPENDENCIES',
-        const <ConstantEvaluationTarget>[]);
-
-/**
- * A [ConstantEvaluationTarget] that has been successfully constant-evaluated.
- *
- * TODO(paulberry): is ELEMENT_CACHING_POLICY the correct caching policy?
- *
- * The result is only available for [ConstantEvaluationTarget]s.
- *
- */
-final ResultDescriptor<ConstantEvaluationTarget> CONSTANT_VALUE =
-    new ResultDescriptor<ConstantEvaluationTarget>('CONSTANT_VALUE', null,
-        cachingPolicy: CONSTANT_EVALUATION_TARGET_POLICY);
-
-/**
- * The sources representing the libraries that include a given source as a part.
- *
- * The result is only available for [Source]s representing a compilation unit.
- */
-final ListResultDescriptor<Source> CONTAINING_LIBRARIES =
-    new ListResultDescriptor<Source>('CONTAINING_LIBRARIES', const <Source>[]);
-
-/**
- * The flag specifying that [RESOLVED_UNIT] has been been computed for this
- * compilation unit (without requiring that the AST for it still be in cache).
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ResultDescriptor<bool> CREATED_RESOLVED_UNIT =
-    new ResultDescriptor<bool>('CREATED_RESOLVED_UNIT', false);
-
-/**
- * The flag specifying that [RESOLVED_UNIT1] has been been computed for this
- * compilation unit (without requiring that the AST for it still be in cache).
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ResultDescriptor<bool> CREATED_RESOLVED_UNIT1 =
-    new ResultDescriptor<bool>('CREATED_RESOLVED_UNIT1', false);
-
-/**
- * The flag specifying that [RESOLVED_UNIT10] has been been computed for this
- * compilation unit (without requiring that the AST for it still be in cache).
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ResultDescriptor<bool> CREATED_RESOLVED_UNIT10 =
-    new ResultDescriptor<bool>('CREATED_RESOLVED_UNIT10', false);
-
-/**
- * The flag specifying that [RESOLVED_UNIT11] has been been computed for this
- * compilation unit (without requiring that the AST for it still be in cache).
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ResultDescriptor<bool> CREATED_RESOLVED_UNIT11 =
-    new ResultDescriptor<bool>('CREATED_RESOLVED_UNIT11', false);
-
-/**
- * The flag specifying that [RESOLVED_UNIT12] has been been computed for this
- * compilation unit (without requiring that the AST for it still be in cache).
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ResultDescriptor<bool> CREATED_RESOLVED_UNIT12 =
-    new ResultDescriptor<bool>('CREATED_RESOLVED_UNIT12', false);
-
-/**
- * The flag specifying that [RESOLVED_UNIT2] has been been computed for this
- * compilation unit (without requiring that the AST for it still be in cache).
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ResultDescriptor<bool> CREATED_RESOLVED_UNIT2 =
-    new ResultDescriptor<bool>('CREATED_RESOLVED_UNIT2', false);
-
-/**
- * The flag specifying that [RESOLVED_UNIT3] has been been computed for this
- * compilation unit (without requiring that the AST for it still be in cache).
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ResultDescriptor<bool> CREATED_RESOLVED_UNIT3 =
-    new ResultDescriptor<bool>('CREATED_RESOLVED_UNIT3', false);
-
-/**
- * The flag specifying that [RESOLVED_UNIT4] has been been computed for this
- * compilation unit (without requiring that the AST for it still be in cache).
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ResultDescriptor<bool> CREATED_RESOLVED_UNIT4 =
-    new ResultDescriptor<bool>('CREATED_RESOLVED_UNIT4', false);
-
-/**
- * The flag specifying that [RESOLVED_UNIT5] has been been computed for this
- * compilation unit (without requiring that the AST for it still be in cache).
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ResultDescriptor<bool> CREATED_RESOLVED_UNIT5 =
-    new ResultDescriptor<bool>('CREATED_RESOLVED_UNIT5', false);
-
-/**
- * The flag specifying that [RESOLVED_UNIT6] has been been computed for this
- * compilation unit (without requiring that the AST for it still be in cache).
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ResultDescriptor<bool> CREATED_RESOLVED_UNIT6 =
-    new ResultDescriptor<bool>('CREATED_RESOLVED_UNIT6', false);
-
-/**
- * The flag specifying that [RESOLVED_UNIT7] has been been computed for this
- * compilation unit (without requiring that the AST for it still be in cache).
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ResultDescriptor<bool> CREATED_RESOLVED_UNIT7 =
-    new ResultDescriptor<bool>('CREATED_RESOLVED_UNIT7', false);
-
-/**
- * The flag specifying that [RESOLVED_UNIT8] has been been computed for this
- * compilation unit (without requiring that the AST for it still be in cache).
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ResultDescriptor<bool> CREATED_RESOLVED_UNIT8 =
-    new ResultDescriptor<bool>('CREATED_RESOLVED_UNIT8', false);
-
-/**
- * The flag specifying that [RESOLVED_UNIT9] has been been computed for this
- * compilation unit (without requiring that the AST for it still be in cache).
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ResultDescriptor<bool> CREATED_RESOLVED_UNIT9 =
-    new ResultDescriptor<bool>('CREATED_RESOLVED_UNIT9', false);
-
-/**
- * All [AnalysisError]s results for [Source]s.
- */
-final List<ListResultDescriptor<AnalysisError>> ERROR_SOURCE_RESULTS =
-    <ListResultDescriptor<AnalysisError>>[
-  BUILD_DIRECTIVES_ERRORS,
-  BUILD_LIBRARY_ERRORS,
-  PARSE_ERRORS,
-  SCAN_ERRORS,
-];
-
-/**
- * All [AnalysisError]s results in for [LibrarySpecificUnit]s.
- */
-final List<ListResultDescriptor<AnalysisError>> ERROR_UNIT_RESULTS =
-    <ListResultDescriptor<AnalysisError>>[
-  HINTS,
-  LIBRARY_UNIT_ERRORS,
-  LINTS,
-  RESOLVE_DIRECTIVES_ERRORS,
-  RESOLVE_TYPE_BOUNDS_ERRORS,
-  RESOLVE_TYPE_NAMES_ERRORS,
-  RESOLVE_UNIT_ERRORS,
-  STRONG_MODE_ERRORS,
-  VARIABLE_REFERENCE_ERRORS,
-  VERIFY_ERRORS
-];
-
-/**
- * The sources representing the export closure of a library.
- * The [Source]s include only library sources, not their units.
- *
- * The result is only available for [Source]s representing a library.
- */
-final ListResultDescriptor<Source> EXPORT_SOURCE_CLOSURE =
-    new ListResultDescriptor<Source>('EXPORT_SOURCE_CLOSURE', null);
-
-/**
- * The errors produced while generating hints a compilation unit.
- *
- * The list will be empty if there were no errors, but will not be `null`.
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ListResultDescriptor<AnalysisError> HINTS =
-    new ListResultDescriptor<AnalysisError>(
-        'HINT_ERRORS', AnalysisError.NO_ERRORS);
-
-/**
- * The ignore information for a [Source].
- */
-final ResultDescriptor<IgnoreInfo> IGNORE_INFO =
-    new ResultDescriptor<IgnoreInfo>('IGNORE_INFO', null);
-
-/**
- * A list of the [VariableElement]s whose type should be inferred that another
- * inferable static variable (the target) depends on.
- *
- * The result is only available for [VariableElement]s, and only when strong
- * mode is enabled.
- */
-final ListResultDescriptor<VariableElement>
-    INFERABLE_STATIC_VARIABLE_DEPENDENCIES =
-    new ListResultDescriptor<VariableElement>(
-        'INFERABLE_STATIC_VARIABLE_DEPENDENCIES', null);
-
-/**
- * A list of the [VariableElement]s defined in a unit whose type should be
- * inferred. This includes variables defined at the library level as well as
- * static members inside classes.
- *
- * The result is only available for [LibrarySpecificUnit]s, and only when strong
- * mode is enabled.
- */
-final ListResultDescriptor<VariableElement> INFERABLE_STATIC_VARIABLES_IN_UNIT =
-    new ListResultDescriptor<VariableElement>(
-        'INFERABLE_STATIC_VARIABLES_IN_UNIT', null);
-
-/**
- * An inferable static variable ([VariableElement]) whose type has been
- * inferred.
- *
- * The result is only available for [VariableElement]s, and only when strong
- * mode is enabled.
- */
-final ResultDescriptor<VariableElement> INFERRED_STATIC_VARIABLE =
-    new ResultDescriptor<VariableElement>('INFERRED_STATIC_VARIABLE', null,
-        cachingPolicy: ELEMENT_CACHING_POLICY);
-
-/**
- * A list of the [LibraryElement]s that make up the strongly connected
- * component in the import/export graph in which the target resides.
- *
- * Only non-empty in strongMode.
- *
- * The result is only available for [Source]s representing a library.
- */
-final ListResultDescriptor<LibraryElement> LIBRARY_CYCLE =
-    new ListResultDescriptor<LibraryElement>('LIBRARY_CYCLE', null);
-
-/**
- * A list of the [LibrarySpecificUnit]s that comprise all of the parts and
- * libraries in the direct import/export dependencies of the library cycle
- * of the target, with the intra-component dependencies excluded.
- *
- * Only non-empty in strongMode.
- *
- * The result is only available for [Source]s representing a library.
- */
-final ListResultDescriptor<LibrarySpecificUnit> LIBRARY_CYCLE_DEPENDENCIES =
-    new ListResultDescriptor<LibrarySpecificUnit>(
-        'LIBRARY_CYCLE_DEPENDENCIES', null);
-
-/**
- * A list of the [LibrarySpecificUnit]s (including all parts) that make up
- * the strongly connected component in the import/export graph in which the
- * target resides.
- *
- * Only non-empty in strongMode.
- *
- * The result is only available for [Source]s representing a library.
- */
-final ListResultDescriptor<LibrarySpecificUnit> LIBRARY_CYCLE_UNITS =
-    new ListResultDescriptor<LibrarySpecificUnit>('LIBRARY_CYCLE_UNITS', null);
-
-/**
- * The partial [LibraryElement] associated with a library.
- *
- * The [LibraryElement] and its [CompilationUnitElement]s are attached to each
- * other. Directives 'library', 'part' and 'part of' are resolved.
- *
- * The result is only available for [Source]s representing a library.
- */
-final ResultDescriptor<LibraryElement> LIBRARY_ELEMENT1 =
-    new ResultDescriptor<LibraryElement>('LIBRARY_ELEMENT1', null,
-        cachingPolicy: ELEMENT_CACHING_POLICY);
-
-/**
- * The partial [LibraryElement] associated with a library.
- *
- * In addition to [LIBRARY_ELEMENT1] also [LibraryElement.imports] and
- * [LibraryElement.exports] are set.
- *
- * The result is only available for [Source]s representing a library.
- */
-final ResultDescriptor<LibraryElement> LIBRARY_ELEMENT2 =
-    new ResultDescriptor<LibraryElement>('LIBRARY_ELEMENT2', null,
-        cachingPolicy: ELEMENT_CACHING_POLICY);
-
-/**
- * The partial [LibraryElement] associated with a library.
- *
- * In addition to [LIBRARY_ELEMENT2] the [LibraryElement.publicNamespace] is set.
- *
- * The result is only available for [Source]s representing a library.
- */
-final ResultDescriptor<LibraryElement> LIBRARY_ELEMENT3 =
-    new ResultDescriptor<LibraryElement>('LIBRARY_ELEMENT3', null,
-        cachingPolicy: ELEMENT_CACHING_POLICY);
-
-/**
- * The partial [LibraryElement] associated with a library.
- *
- * In addition to [LIBRARY_ELEMENT3] the [LibraryElement.entryPoint] is set,
- * if the library does not declare one already and one of the exported
- * libraries exports one.
- *
- * Also [LibraryElement.exportNamespace] is set.
- *
- * The result is only available for [Source]s representing a library.
- */
-final ResultDescriptor<LibraryElement> LIBRARY_ELEMENT4 =
-    new ResultDescriptor<LibraryElement>('LIBRARY_ELEMENT4', null,
-        cachingPolicy: ELEMENT_CACHING_POLICY);
-
-/**
- * The partial [LibraryElement] associated with a library.
- *
- * [LIBRARY_ELEMENT5] plus resolved types type parameter bounds.
- *
- * The result is only available for [Source]s representing a library.
- */
-final ResultDescriptor<LibraryElement> LIBRARY_ELEMENT5 =
-    new ResultDescriptor<LibraryElement>('LIBRARY_ELEMENT5', null,
-        cachingPolicy: ELEMENT_CACHING_POLICY);
-
-/**
- * The partial [LibraryElement] associated with a library.
- *
- * [LIBRARY_ELEMENT5] plus resolved types for every element.
- *
- * The result is only available for [Source]s representing a library.
- */
-final ResultDescriptor<LibraryElement> LIBRARY_ELEMENT6 =
-    new ResultDescriptor<LibraryElement>('LIBRARY_ELEMENT6', null,
-        cachingPolicy: ELEMENT_CACHING_POLICY);
-
-/**
- * The partial [LibraryElement] associated with a library.
- *
- * [LIBRARY_ELEMENT6] plus [RESOLVED_UNIT7] for all library units.
- *
- * The result is only available for [Source]s representing a library.
- */
-final ResultDescriptor<LibraryElement> LIBRARY_ELEMENT7 =
-    new ResultDescriptor<LibraryElement>('LIBRARY_ELEMENT7', null,
-        cachingPolicy: ELEMENT_CACHING_POLICY);
-
-/**
- * The partial [LibraryElement] associated with a library.
- *
- * [LIBRARY_ELEMENT7] for the library and its import/export closure.
- *
- * The result is only available for [Source]s representing a library.
- */
-final ResultDescriptor<LibraryElement> LIBRARY_ELEMENT8 =
-    new ResultDescriptor<LibraryElement>('LIBRARY_ELEMENT8', null,
-        cachingPolicy: ELEMENT_CACHING_POLICY);
-
-/**
- * The partial [LibraryElement] associated with a library.
- *
- * The same as a [LIBRARY_ELEMENT8].
- *
- * The result is only available for [Source]s representing a library.
- */
-final ResultDescriptor<LibraryElement> LIBRARY_ELEMENT9 =
-    new ResultDescriptor<LibraryElement>('LIBRARY_ELEMENT9', null,
-        cachingPolicy: ELEMENT_CACHING_POLICY);
-
-/**
- * List of all `LIBRARY_ELEMENT` results.
- */
-final List<ResultDescriptor<LibraryElement>> LIBRARY_ELEMENT_RESULTS =
-    <ResultDescriptor<LibraryElement>>[
-  LIBRARY_ELEMENT1,
-  LIBRARY_ELEMENT2,
-  LIBRARY_ELEMENT3,
-  LIBRARY_ELEMENT4,
-  LIBRARY_ELEMENT5,
-  LIBRARY_ELEMENT6,
-  LIBRARY_ELEMENT7,
-  LIBRARY_ELEMENT8,
-  LIBRARY_ELEMENT9,
-  LIBRARY_ELEMENT
-];
-
-/**
- * The flag specifying whether all analysis errors are computed in a specific
- * library.
- *
- * The result is only available for [Source]s representing a library.
- */
-final ResultDescriptor<bool> LIBRARY_ERRORS_READY =
-    new ResultDescriptor<bool>('LIBRARY_ERRORS_READY', false);
-
-/**
- * The [LibrarySpecificUnit]s that a library consists of.
- *
- * The list will include the defining unit and units for [INCLUDED_PARTS].
- * So, it is never empty or `null`.
- *
- * The result is only available for [Source]s representing a library.
- */
-final ListResultDescriptor<LibrarySpecificUnit> LIBRARY_SPECIFIC_UNITS =
-    new ListResultDescriptor<LibrarySpecificUnit>(
-        'LIBRARY_SPECIFIC_UNITS', const <LibrarySpecificUnit>[]);
-
-/**
- * The analysis errors associated with a compilation unit in a specific library.
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ListResultDescriptor<AnalysisError> LIBRARY_UNIT_ERRORS =
-    new ListResultDescriptor<AnalysisError>(
-        'LIBRARY_UNIT_ERRORS', AnalysisError.NO_ERRORS);
-
-/**
- * The errors produced while generating lints for a compilation unit.
- *
- * The list will be empty if there were no errors, but will not be `null`.
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ListResultDescriptor<AnalysisError> LINTS =
-    new ListResultDescriptor<AnalysisError>(
-        'LINT_ERRORS', AnalysisError.NO_ERRORS);
-
-/**
- * The errors produced while parsing a compilation unit.
- *
- * The list will be empty if there were no errors, but will not be `null`.
- *
- * The result is only available for [Source]s representing a compilation unit.
- */
-final ListResultDescriptor<AnalysisError> PARSE_ERRORS =
-    new ListResultDescriptor<AnalysisError>(
-        'PARSE_ERRORS', AnalysisError.NO_ERRORS);
-
-/**
- * The list of [PendingError]s for a compilation unit.
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ListResultDescriptor<PendingError> PENDING_ERRORS =
-    new ListResultDescriptor<PendingError>(
-        'PENDING_ERRORS', const <PendingError>[]);
-
-/**
- * The flag specifying that [LIBRARY_ELEMENT2] is ready for a library and its
- * import/export closure.
- *
- * The result is only available for [Source]s representing a library.
- */
-final ResultDescriptor<bool> READY_LIBRARY_ELEMENT2 =
-    new ResultDescriptor<bool>('READY_LIBRARY_ELEMENT2', false);
-
-/**
- * The flag specifying that [LIBRARY_ELEMENT6] is ready for a library and its
- * import/export closure.
- *
- * The result is only available for [Source]s representing a library.
- */
-final ResultDescriptor<bool> READY_LIBRARY_ELEMENT6 =
-    new ResultDescriptor<bool>('READY_LIBRARY_ELEMENT6', false);
-
-/**
- * The flag specifying that [LIBRARY_ELEMENT7] is ready for a library and its
- * import/export closure.
- *
- * The result is only available for [Source]s representing a library.
- */
-final ResultDescriptor<bool> READY_LIBRARY_ELEMENT7 =
-    new ResultDescriptor<bool>('READY_LIBRARY_ELEMENT7', false);
-
-/**
- * The flag specifying that [RESOLVED_UNIT] is ready for all of the units of a
- * library.
- *
- * The result is only available for [Source]s representing a library.
- */
-final ResultDescriptor<bool> READY_RESOLVED_UNIT =
-    new ResultDescriptor<bool>('READY_RESOLVED_UNIT', false);
-
-/**
- * The sources of the Dart files that a library references.
- *
- * The list is the union of [IMPORTED_LIBRARIES], [EXPORTED_LIBRARIES] and
- * [UNITS] of the defining unit and [INCLUDED_PARTS]. Never empty or `null`.
- *
- * The result is only available for [Source]s representing a library.
- */
-final ListResultDescriptor<Source> REFERENCED_SOURCES =
-    new ListResultDescriptor<Source>('REFERENCED_SOURCES', const <Source>[]);
-
-/**
- * The list of [ConstantEvaluationTarget]s on which error verification depends.
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ListResultDescriptor<ConstantEvaluationTarget> REQUIRED_CONSTANTS =
-    new ListResultDescriptor<ConstantEvaluationTarget>(
-        'REQUIRED_CONSTANTS', const <ConstantEvaluationTarget>[]);
-
-/**
- * The errors produced while resolving a library's directives.
- *
- * The list will be empty if there were no errors, but will not be `null`.
- *
- * The result is only available for [Source]s representing a library.
- */
-final ListResultDescriptor<AnalysisError> RESOLVE_DIRECTIVES_ERRORS =
-    new ListResultDescriptor<AnalysisError>(
-        'RESOLVE_DIRECTIVES_ERRORS', AnalysisError.NO_ERRORS);
-
-/**
- * The errors produced while resolving bounds of type parameters of classes,
- * class and function aliases.
- *
- * The list will be empty if there were no errors, but will not be `null`.
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ListResultDescriptor<AnalysisError> RESOLVE_TYPE_BOUNDS_ERRORS =
-    new ListResultDescriptor<AnalysisError>(
-        'RESOLVE_TYPE_BOUNDS_ERRORS', AnalysisError.NO_ERRORS);
-
-/**
- * The errors produced while resolving type names.
- *
- * The list will be empty if there were no errors, but will not be `null`.
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ListResultDescriptor<AnalysisError> RESOLVE_TYPE_NAMES_ERRORS =
-    new ListResultDescriptor<AnalysisError>(
-        'RESOLVE_TYPE_NAMES_ERRORS', AnalysisError.NO_ERRORS);
-
-/**
- * The errors produced while resolving a full compilation unit.
- *
- * The list will be empty if there were no errors, but will not be `null`.
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ListResultDescriptor<AnalysisError> RESOLVE_UNIT_ERRORS =
-    new ListResultDescriptor<AnalysisError>(
-        'RESOLVE_UNIT_ERRORS', AnalysisError.NO_ERRORS);
-
-/**
- * The partially resolved [CompilationUnit] associated with a compilation unit.
- *
- * Tasks that use this value as an input can assume that the [SimpleIdentifier]s
- * at all declaration sites have been bound to the element defined by the
- * declaration, except for the constants defined in an 'enum' declaration.
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ResultDescriptor<CompilationUnit> RESOLVED_UNIT1 =
-    new ResultDescriptor<CompilationUnit>('RESOLVED_UNIT1', null,
-        cachingPolicy: AST_CACHING_POLICY);
-
-/**
- * The resolved [CompilationUnit] associated with a compilation unit in which
- * the types of class members have been inferred in addition to everything that
- * is true of a [RESOLVED_UNIT9].
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ResultDescriptor<CompilationUnit> RESOLVED_UNIT10 =
-    new ResultDescriptor<CompilationUnit>('RESOLVED_UNIT10', null,
-        cachingPolicy: AST_CACHING_POLICY);
-
-/**
- * The resolved [CompilationUnit] associated with a compilation unit, with
- * constants not yet resolved.
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ResultDescriptor<CompilationUnit> RESOLVED_UNIT11 =
-    new ResultDescriptor<CompilationUnit>('RESOLVED_UNIT11', null,
-        cachingPolicy: AST_CACHING_POLICY);
-
-/**
- * The resolved [CompilationUnit] associated with a compilation unit, with
- * constants resolved.
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ResultDescriptor<CompilationUnit> RESOLVED_UNIT12 =
-    new ResultDescriptor<CompilationUnit>('RESOLVED_UNIT12', null,
-        cachingPolicy: AST_CACHING_POLICY);
-
-/**
- * The partially resolved [CompilationUnit] associated with a compilation unit.
- *
- * In addition to what is true of a [RESOLVED_UNIT1], tasks that use this value
- * as an input can assume that its directives have been resolved.
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ResultDescriptor<CompilationUnit> RESOLVED_UNIT2 =
-    new ResultDescriptor<CompilationUnit>('RESOLVED_UNIT2', null,
-        cachingPolicy: AST_CACHING_POLICY);
-
-/**
- * The partially resolved [CompilationUnit] associated with a compilation unit.
- *
- * Tasks that use this value as an input can assume that the [SimpleIdentifier]s
- * at all declaration sites have been bound to the element defined by the
- * declaration, including the constants defined in an 'enum' declaration.
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ResultDescriptor<CompilationUnit> RESOLVED_UNIT3 =
-    new ResultDescriptor<CompilationUnit>('RESOLVED_UNIT3', null,
-        cachingPolicy: AST_CACHING_POLICY);
-
-/**
- * The partially resolved [CompilationUnit] associated with a compilation unit.
- *
- * In addition to what is true of a [RESOLVED_UNIT3], tasks that use this value
- * as an input can assume that the types associated with type bounds have been
- * resolved.
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ResultDescriptor<CompilationUnit> RESOLVED_UNIT4 =
-    new ResultDescriptor<CompilationUnit>('RESOLVED_UNIT4', null,
-        cachingPolicy: AST_CACHING_POLICY);
-
-/**
- * The partially resolved [CompilationUnit] associated with a compilation unit.
- *
- * In addition to what is true of a [RESOLVED_UNIT4], tasks that use this value
- * as an input can assume that the types associated with declarations have been
- * resolved. This includes the types of superclasses, mixins, interfaces,
- * fields, return types, parameters, and local variables.
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ResultDescriptor<CompilationUnit> RESOLVED_UNIT5 =
-    new ResultDescriptor<CompilationUnit>('RESOLVED_UNIT5', null,
-        cachingPolicy: AST_CACHING_POLICY);
-
-/**
- * The partially resolved [CompilationUnit] associated with a compilation unit.
- *
- * In addition to what is true of a [RESOLVED_UNIT5], tasks that use this value
- * as an input can assume that references to local variables and formal
- * parameters have been resolved.
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ResultDescriptor<CompilationUnit> RESOLVED_UNIT6 =
-    new ResultDescriptor<CompilationUnit>('RESOLVED_UNIT6', null,
-        cachingPolicy: AST_CACHING_POLICY);
-
-/**
- * The partially resolved [CompilationUnit] associated with a compilation unit.
- *
- * In addition to what is true of a [RESOLVED_UNIT6], tasks that use this value
- * as an input can assume that elements and types associated with expressions
- * outside of method bodies (essentially initializers) have been initially
- * resolved.
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ResultDescriptor<CompilationUnit> RESOLVED_UNIT7 =
-    new ResultDescriptor<CompilationUnit>('RESOLVED_UNIT7', null,
-        cachingPolicy: AST_CACHING_POLICY);
-
-/**
- * The partially resolved [CompilationUnit] associated with a compilation unit.
- *
- * In addition to what is true of a [RESOLVED_UNIT7], tasks that use this value
- * as an input can assume that the types of static variables have been inferred.
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ResultDescriptor<CompilationUnit> RESOLVED_UNIT8 =
-    new ResultDescriptor<CompilationUnit>('RESOLVED_UNIT8', null,
-        cachingPolicy: AST_CACHING_POLICY);
-
-/**
- * The partially resolved [CompilationUnit] associated with a compilation unit.
- *
- * In addition to what is true of a [RESOLVED_UNIT8], tasks that use this value
- * as an input can assume that the initializers of instance variables have been
- * re-resolved.
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ResultDescriptor<CompilationUnit> RESOLVED_UNIT9 =
-    new ResultDescriptor<CompilationUnit>('RESOLVED_UNIT9', null,
-        cachingPolicy: AST_CACHING_POLICY);
-
-/**
- * List of all `RESOLVED_UNITx` results.
- */
-final List<ResultDescriptor<CompilationUnit>> RESOLVED_UNIT_RESULTS =
-    <ResultDescriptor<CompilationUnit>>[
-  RESOLVED_UNIT1,
-  RESOLVED_UNIT2,
-  RESOLVED_UNIT3,
-  RESOLVED_UNIT4,
-  RESOLVED_UNIT5,
-  RESOLVED_UNIT6,
-  RESOLVED_UNIT7,
-  RESOLVED_UNIT8,
-  RESOLVED_UNIT9,
-  RESOLVED_UNIT10,
-  RESOLVED_UNIT11,
-  RESOLVED_UNIT12,
-  RESOLVED_UNIT
-];
-
-/**
- * The errors produced while scanning a compilation unit.
- *
- * The list will be empty if there were no errors, but will not be `null`.
- *
- * The result is only available for [Source]s representing a compilation unit.
- */
-final ListResultDescriptor<AnalysisError> SCAN_ERRORS =
-    new ListResultDescriptor<AnalysisError>(
-        'SCAN_ERRORS', AnalysisError.NO_ERRORS);
-
-/**
- * The errors produced while resolving a static [VariableElement] initializer.
- *
- * The result is only available for [VariableElement]s, and only when strong
- * mode is enabled.
- */
-final ListResultDescriptor<AnalysisError> STATIC_VARIABLE_RESOLUTION_ERRORS =
-    new ListResultDescriptor<AnalysisError>(
-        'STATIC_VARIABLE_RESOLUTION_ERRORS', AnalysisError.NO_ERRORS);
-
-/**
- * A list of the [AnalysisError]s reported while resolving static
- * [INFERABLE_STATIC_VARIABLES_IN_UNIT] defined in a unit.
- *
- * The result is only available for [LibrarySpecificUnit]s, and only when strong
- * mode is enabled.
- */
-final ListResultDescriptor<AnalysisError>
-    STATIC_VARIABLE_RESOLUTION_ERRORS_IN_UNIT =
-    new ListResultDescriptor<AnalysisError>(
-        'STATIC_VARIABLE_RESOLUTION_ERRORS_IN_UNIT', AnalysisError.NO_ERRORS);
-
-/**
- * The additional strong mode errors produced while verifying a
- * compilation unit.
- *
- * The list will be empty if there were no errors, but will not be `null`.
- *
- * The result is only available for [LibrarySpecificUnits]s representing a
- * compilation unit.
- *
- */
-final ListResultDescriptor<AnalysisError> STRONG_MODE_ERRORS =
-    new ListResultDescriptor<AnalysisError>(
-        'STRONG_MODE_ERRORS', AnalysisError.NO_ERRORS);
-
-/**
- * The [TypeProvider] of the [AnalysisContext].
- */
-final ResultDescriptor<TypeProvider> TYPE_PROVIDER =
-    new ResultDescriptor<TypeProvider>('TYPE_PROVIDER', null);
-
-/**
- * The [UsedImportedElements] of a [LibrarySpecificUnit].
- */
-final ResultDescriptor<UsedImportedElements> USED_IMPORTED_ELEMENTS =
-    new ResultDescriptor<UsedImportedElements>('USED_IMPORTED_ELEMENTS', null,
-        cachingPolicy: USED_IMPORTED_ELEMENTS_POLICY);
-
-/**
- * The [UsedLocalElements] of a [LibrarySpecificUnit].
- */
-final ResultDescriptor<UsedLocalElements> USED_LOCAL_ELEMENTS =
-    new ResultDescriptor<UsedLocalElements>('USED_LOCAL_ELEMENTS', null,
-        cachingPolicy: USED_LOCAL_ELEMENTS_POLICY);
-
-/**
- * The errors produced while resolving variable references in a compilation unit.
- *
- * The list will be empty if there were no errors, but will not be `null`.
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ListResultDescriptor<AnalysisError> VARIABLE_REFERENCE_ERRORS =
-    new ListResultDescriptor<AnalysisError>(
-        'VARIABLE_REFERENCE_ERRORS', AnalysisError.NO_ERRORS);
-
-/**
- * The errors produced while verifying a compilation unit.
- *
- * The list will be empty if there were no errors, but will not be `null`.
- *
- * The result is only available for [LibrarySpecificUnit]s.
- */
-final ListResultDescriptor<AnalysisError> VERIFY_ERRORS =
-    new ListResultDescriptor<AnalysisError>(
-        'VERIFY_ERRORS', AnalysisError.NO_ERRORS);
-
-/**
- * Return a list of unique errors for the [Source] of the given [target].
- */
-List<AnalysisError> getTargetSourceErrors(
-    RecordingErrorListener listener, AnalysisTarget target) {
-  Source source = target.source;
-  List<AnalysisError> errors = listener.getErrorsForSource(source);
-  return getUniqueErrors(errors);
-}
-
-/**
- * Return a list of errors containing the errors from the given [errors] list
- * but with duplications removed.
- */
-List<AnalysisError> getUniqueErrors(List<AnalysisError> errors) {
-  if (errors.isEmpty) {
-    return errors;
-  }
-  return errors.toSet().toList();
-}
-
-/**
- * A task that builds a compilation unit element for a single compilation unit.
- */
-class BuildCompilationUnitElementTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the input whose value is the AST for the compilation unit.
-   */
-  static const String PARSED_UNIT_INPUT_NAME = 'PARSED_UNIT_INPUT_NAME';
-
-  /**
-   * The name of the input whose value is the source line info.
-   */
-  static const String LINE_INFO_INPUT_NAME = 'LINE_INFO_INPUT_NAME';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'BuildCompilationUnitElementTask',
-      createTask,
-      buildInputs, <ResultDescriptor>[
-    COMPILATION_UNIT_CONSTANTS,
-    COMPILATION_UNIT_ELEMENT,
-    CREATED_RESOLVED_UNIT1,
-    RESOLVED_UNIT1
-  ]);
-
-  /**
-   * Initialize a newly created task to build a compilation unit element for
-   * the given [target] in the given [context].
-   */
-  BuildCompilationUnitElementTask(
-      InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    //
-    // Prepare inputs.
-    //
-    LibrarySpecificUnit librarySpecificUnit = target;
-    Source source = getRequiredSource();
-    CompilationUnit unit = getRequiredInput(PARSED_UNIT_INPUT_NAME);
-    LineInfo lineInfo = getRequiredInput(LINE_INFO_INPUT_NAME);
-    //
-    // Try to get the existing CompilationUnitElement.
-    //
-    CompilationUnitElement element;
-    {
-      InternalAnalysisContext internalContext =
-          context as InternalAnalysisContext;
-      AnalysisCache analysisCache = internalContext.analysisCache;
-      CacheEntry cacheEntry = internalContext.getCacheEntry(target);
-      element = analysisCache.getValue(target, COMPILATION_UNIT_ELEMENT);
-      if (element == null &&
-          internalContext.aboutToComputeResult(
-              cacheEntry, COMPILATION_UNIT_ELEMENT)) {
-        element = analysisCache.getValue(target, COMPILATION_UNIT_ELEMENT);
-      }
-    }
-    //
-    // Build or reuse CompilationUnitElement.
-    //
-    if (element == null) {
-      CompilationUnitBuilder builder = new CompilationUnitBuilder();
-      element = builder.buildCompilationUnit(
-          source, unit, librarySpecificUnit.library);
-      (element as CompilationUnitElementImpl).lineInfo = lineInfo;
-    } else {
-      new DeclarationResolver().resolve(unit, element);
-    }
-    //
-    // Prepare constants.
-    //
-    ConstantFinder constantFinder = new ConstantFinder();
-    unit.accept(constantFinder);
-    List<ConstantEvaluationTarget> constants =
-        constantFinder.constantsToCompute;
-    //
-    // Record outputs.
-    //
-    outputs[COMPILATION_UNIT_CONSTANTS] = constants;
-    outputs[COMPILATION_UNIT_ELEMENT] = element;
-    outputs[RESOLVED_UNIT1] = unit;
-    outputs[CREATED_RESOLVED_UNIT1] = true;
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the given
-   * [target].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    LibrarySpecificUnit unit = target;
-    return <String, TaskInput>{
-      PARSED_UNIT_INPUT_NAME: PARSED_UNIT.of(unit.unit, flushOnAccess: true),
-      LINE_INFO_INPUT_NAME: LINE_INFO.of(unit.unit)
-    };
-  }
-
-  /**
-   * Create a [BuildCompilationUnitElementTask] based on the given [target] in
-   * the given [context].
-   */
-  static BuildCompilationUnitElementTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new BuildCompilationUnitElementTask(context, target);
-  }
-}
-
-/**
- * A task that builds imports and export directive elements for a library.
- */
-class BuildDirectiveElementsTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the input whose value is the defining [LIBRARY_ELEMENT1].
-   */
-  static const String LIBRARY_INPUT = 'LIBRARY_INPUT';
-
-  /**
-   * The name of the input for [RESOLVED_UNIT1] of a library unit.
-   */
-  static const String UNIT_INPUT_NAME = 'UNIT_INPUT_NAME';
-
-  /**
-   * The input with a map from referenced sources to their modification times.
-   */
-  static const String SOURCES_MODIFICATION_TIME_INPUT_NAME =
-      'SOURCES_MODIFICATION_TIME_INPUT_NAME';
-
-  /**
-   * The input with a list of [LIBRARY_ELEMENT3]s of imported libraries.
-   */
-  static const String IMPORTS_LIBRARY_ELEMENT_INPUT_NAME =
-      'IMPORTS_LIBRARY_ELEMENT1_INPUT_NAME';
-
-  /**
-   * The input with a list of [LIBRARY_ELEMENT3]s of exported libraries.
-   */
-  static const String EXPORTS_LIBRARY_ELEMENT_INPUT_NAME =
-      'EXPORTS_LIBRARY_ELEMENT_INPUT_NAME';
-
-  /**
-   * The input with a list of [SOURCE_KIND]s of imported libraries.
-   */
-  static const String IMPORTS_SOURCE_KIND_INPUT_NAME =
-      'IMPORTS_SOURCE_KIND_INPUT_NAME';
-
-  /**
-   * The input with a list of [SOURCE_KIND]s of exported libraries.
-   */
-  static const String EXPORTS_SOURCE_KIND_INPUT_NAME =
-      'EXPORTS_SOURCE_KIND_INPUT_NAME';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'BuildDirectiveElementsTask',
-      createTask,
-      buildInputs,
-      <ResultDescriptor>[LIBRARY_ELEMENT2, BUILD_DIRECTIVES_ERRORS]);
-
-  BuildDirectiveElementsTask(
-      InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    //
-    // Prepare inputs.
-    //
-    LibraryElementImpl libraryElement = getRequiredInput(LIBRARY_INPUT);
-    CompilationUnit libraryUnit = getRequiredInput(UNIT_INPUT_NAME);
-    Map<Source, int> sourceModificationTimeMap =
-        getRequiredInput(SOURCES_MODIFICATION_TIME_INPUT_NAME);
-    Map<Source, LibraryElement> importLibraryMap =
-        getRequiredInput(IMPORTS_LIBRARY_ELEMENT_INPUT_NAME);
-    Map<Source, LibraryElement> exportLibraryMap =
-        getRequiredInput(EXPORTS_LIBRARY_ELEMENT_INPUT_NAME);
-    Map<Source, SourceKind> importSourceKindMap =
-        getRequiredInput(IMPORTS_SOURCE_KIND_INPUT_NAME);
-    Map<Source, SourceKind> exportSourceKindMap =
-        getRequiredInput(EXPORTS_SOURCE_KIND_INPUT_NAME);
-    //
-    // Try to get the existing LibraryElement.
-    //
-    LibraryElement element;
-    {
-      InternalAnalysisContext internalContext =
-          context as InternalAnalysisContext;
-      AnalysisCache analysisCache = internalContext.analysisCache;
-      CacheEntry cacheEntry = internalContext.getCacheEntry(target);
-      element = analysisCache.getValue(target, LIBRARY_ELEMENT2);
-      if (element == null &&
-          internalContext.aboutToComputeResult(cacheEntry, LIBRARY_ELEMENT2)) {
-        element = analysisCache.getValue(target, LIBRARY_ELEMENT2);
-      }
-    }
-    //
-    // Build or reuse the directive elements.
-    //
-    List<AnalysisError> errors;
-    if (element == null) {
-      DirectiveElementBuilder builder = new DirectiveElementBuilder(
-          context,
-          libraryElement,
-          sourceModificationTimeMap,
-          importLibraryMap,
-          importSourceKindMap,
-          exportLibraryMap,
-          exportSourceKindMap);
-      libraryUnit.accept(builder);
-      // See the commentary in the computation of the LIBRARY_CYCLE result
-      // for details on library cycle invalidation.
-      libraryElement.invalidateLibraryCycles();
-      errors = builder.errors;
-    } else {
-      DirectiveResolver resolver = new DirectiveResolver(
-          sourceModificationTimeMap, importSourceKindMap, exportSourceKindMap);
-      libraryUnit.accept(resolver);
-      errors = resolver.errors;
-    }
-    //
-    // Record outputs.
-    //
-    outputs[LIBRARY_ELEMENT2] = libraryElement;
-    outputs[BUILD_DIRECTIVES_ERRORS] = errors;
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the
-   * given library [libSource].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    Source source = target;
-    return <String, TaskInput>{
-      LIBRARY_INPUT: LIBRARY_ELEMENT1.of(source),
-      UNIT_INPUT_NAME:
-          RESOLVED_UNIT1.of(new LibrarySpecificUnit(source, source)),
-      SOURCES_MODIFICATION_TIME_INPUT_NAME:
-          REFERENCED_SOURCES.of(source).toMapOf(MODIFICATION_TIME),
-      IMPORTS_LIBRARY_ELEMENT_INPUT_NAME:
-          IMPORTED_LIBRARIES.of(source).toMapOf(LIBRARY_ELEMENT1),
-      EXPORTS_LIBRARY_ELEMENT_INPUT_NAME:
-          EXPORTED_LIBRARIES.of(source).toMapOf(LIBRARY_ELEMENT1),
-      IMPORTS_SOURCE_KIND_INPUT_NAME:
-          IMPORTED_LIBRARIES.of(source).toMapOf(SOURCE_KIND),
-      EXPORTS_SOURCE_KIND_INPUT_NAME:
-          EXPORTED_LIBRARIES.of(source).toMapOf(SOURCE_KIND)
-    };
-  }
-
-  /**
-   * Create a [BuildDirectiveElementsTask] based on the given [target] in
-   * the given [context].
-   */
-  static BuildDirectiveElementsTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new BuildDirectiveElementsTask(context, target);
-  }
-}
-
-/**
- * A task that builds the elements representing the members of enum
- * declarations.
- */
-class BuildEnumMemberElementsTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the [TYPE_PROVIDER] input.
-   */
-  static const String TYPE_PROVIDER_INPUT = 'TYPE_PROVIDER_INPUT';
-
-  /**
-   * The name of the [RESOLVED_UNIT1] input.
-   */
-  static const String UNIT_INPUT = 'UNIT_INPUT';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'BuildEnumMemberElementsTask',
-      createTask,
-      buildInputs,
-      <ResultDescriptor>[CREATED_RESOLVED_UNIT3, RESOLVED_UNIT3]);
-
-  BuildEnumMemberElementsTask(
-      InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    //
-    // Prepare inputs.
-    //
-    TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT);
-    CompilationUnit unit = getRequiredInput(UNIT_INPUT);
-    //
-    // Build the enum members if they have not already been created.
-    //
-    EnumDeclaration findFirstEnum() {
-      NodeList<CompilationUnitMember> members = unit.declarations;
-      int length = members.length;
-      for (int i = 0; i < length; i++) {
-        CompilationUnitMember member = members[i];
-        if (member is EnumDeclaration) {
-          return member;
-        }
-      }
-      return null;
-    }
-
-    EnumDeclaration firstEnum = findFirstEnum();
-    if (firstEnum != null &&
-        resolutionMap
-            .elementDeclaredByEnumDeclaration(firstEnum)
-            .accessors
-            .isEmpty) {
-      EnumMemberBuilder builder = new EnumMemberBuilder(typeProvider);
-      unit.accept(builder);
-    }
-    //
-    // Record outputs.
-    //
-    outputs[CREATED_RESOLVED_UNIT3] = true;
-    outputs[RESOLVED_UNIT3] = unit;
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the
-   * given [target].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    LibrarySpecificUnit unit = target;
-    return <String, TaskInput>{
-      TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request),
-      UNIT_INPUT: RESOLVED_UNIT2.of(unit)
-    };
-  }
-
-  /**
-   * Create a [BuildEnumMemberElementsTask] based on the given [target] in
-   * the given [context].
-   */
-  static BuildEnumMemberElementsTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new BuildEnumMemberElementsTask(context, target);
-  }
-}
-
-/**
- * A task that builds [EXPORT_NAMESPACE] and [LIBRARY_ELEMENT4] for a library.
- */
-class BuildExportNamespaceTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the input for [LIBRARY_ELEMENT3] of a library.
-   */
-  static const String LIBRARY_INPUT = 'LIBRARY_INPUT';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'BuildExportNamespaceTask',
-      createTask,
-      buildInputs,
-      <ResultDescriptor>[LIBRARY_ELEMENT4]);
-
-  BuildExportNamespaceTask(
-      InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    LibraryElementImpl library = getRequiredInput(LIBRARY_INPUT);
-    //
-    // Compute export namespace.
-    //
-    library.exportNamespace = null;
-    NamespaceBuilder builder = new NamespaceBuilder();
-    Namespace namespace = builder.createExportNamespaceForLibrary(library);
-    library.exportNamespace = namespace;
-    //
-    // Update entry point.
-    //
-    if (library.entryPoint == null) {
-      Iterable<Element> exportedElements = namespace.definedNames.values;
-      library.entryPoint = exportedElements.firstWhere(
-          (element) => element is FunctionElement && element.isEntryPoint,
-          orElse: () => null);
-    }
-    //
-    // Record outputs.
-    //
-    outputs[LIBRARY_ELEMENT4] = library;
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the
-   * given library [libSource].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    Source source = target;
-    return <String, TaskInput>{
-      LIBRARY_INPUT: LIBRARY_ELEMENT3.of(source),
-      'exportsLibraryPublicNamespace':
-          EXPORT_SOURCE_CLOSURE.of(source).toMapOf(LIBRARY_ELEMENT3)
-    };
-  }
-
-  /**
-   * Create a [BuildExportNamespaceTask] based on the given [target] in
-   * the given [context].
-   */
-  static BuildExportNamespaceTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new BuildExportNamespaceTask(context, target);
-  }
-}
-
-/**
- * A task that builds a library element for a Dart library.
- */
-class BuildLibraryElementTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the input whose value is the defining [RESOLVED_UNIT1].
-   */
-  static const String DEFINING_UNIT_INPUT = 'DEFINING_UNIT_INPUT';
-
-  /**
-   * The name of the input whose value is a list of built [RESOLVED_UNIT1]s
-   * of the parts sourced by a library.
-   */
-  static const String PARTS_UNIT_INPUT = 'PARTS_UNIT_INPUT';
-
-  /**
-   * The name of the input whose value is the modification time of the source.
-   */
-  static const String MODIFICATION_TIME_INPUT = 'MODIFICATION_TIME_INPUT';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'BuildLibraryElementTask', createTask, buildInputs, <ResultDescriptor>[
-    BUILD_LIBRARY_ERRORS,
-    LIBRARY_ELEMENT1,
-    IS_LAUNCHABLE
-  ]);
-
-  /**
-   * The constant used as an unknown common library name in parts.
-   */
-  static const String _UNKNOWN_LIBRARY_NAME = 'unknown-library-name';
-
-  /**
-   * Initialize a newly created task to build a library element for the given
-   * [target] in the given [context].
-   */
-  BuildLibraryElementTask(
-      InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    List<AnalysisError> errors = <AnalysisError>[];
-    //
-    // Prepare inputs.
-    //
-    Source librarySource = getRequiredSource();
-    CompilationUnit definingCompilationUnit =
-        getRequiredInput(DEFINING_UNIT_INPUT);
-    List<CompilationUnit> partUnits = getRequiredInput(PARTS_UNIT_INPUT);
-    int modificationTime = getRequiredInput(MODIFICATION_TIME_INPUT);
-    //
-    // Process inputs.
-    //
-    CompilationUnitElementImpl definingCompilationUnitElement =
-        definingCompilationUnit.declaredElement;
-    Map<Source, CompilationUnit> partUnitMap =
-        new HashMap<Source, CompilationUnit>();
-    int partLength = partUnits.length;
-    for (int i = 0; i < partLength; i++) {
-      CompilationUnit partUnit = partUnits[i];
-      Source partSource =
-          resolutionMap.elementDeclaredByCompilationUnit(partUnit).source;
-      partUnitMap[partSource] = partUnit;
-    }
-    //
-    // Update "part" directives.
-    //
-    LibraryIdentifier libraryNameNode = null;
-    String partsLibraryName = _UNKNOWN_LIBRARY_NAME;
-    Set<Source> seenPartSources = new Set<Source>();
-    FunctionElement entryPoint =
-        _findEntryPoint(definingCompilationUnitElement);
-    List<Directive> directivesToResolve = <Directive>[];
-    List<CompilationUnitElementImpl> sourcedCompilationUnits =
-        <CompilationUnitElementImpl>[];
-    NodeList<Directive> directives = definingCompilationUnit.directives;
-    int directiveLength = directives.length;
-    for (int i = 0; i < directiveLength; i++) {
-      Directive directive = directives[i];
-      if (directive is LibraryDirective) {
-        libraryNameNode = directive.name;
-        directivesToResolve.add(directive);
-      } else if (directive is PartDirective) {
-        StringLiteral partUri = directive.uri;
-        Source partSource = directive.uriSource;
-        CompilationUnit partUnit = partUnitMap[partSource];
-        if (partUnit != null) {
-          CompilationUnitElementImpl partElement = partUnit.declaredElement;
-          partElement.uriOffset = partUri.offset;
-          partElement.uriEnd = partUri.end;
-          partElement.uri = directive.uriContent;
-          //
-          // Validate that the part source is unique in the library.
-          //
-          if (!seenPartSources.add(partSource)) {
-            errors.add(new AnalysisError(
-                librarySource,
-                partUri.offset,
-                partUri.length,
-                CompileTimeErrorCode.DUPLICATE_PART,
-                [partSource.uri]));
-          }
-          //
-          // Validate that the part contains a part-of directive with the same
-          // name as the library.
-          //
-          if (context.exists(partSource)) {
-            _NameOrSource nameOrSource = _getPartLibraryNameOrUri(
-                context, partSource, partUnit, directivesToResolve);
-            if (nameOrSource == null) {
-              errors.add(new AnalysisError(
-                  librarySource,
-                  partUri.offset,
-                  partUri.length,
-                  CompileTimeErrorCode.PART_OF_NON_PART,
-                  [partUri.toSource()]));
-            } else {
-              String name = nameOrSource.name;
-              if (name != null) {
-                if (libraryNameNode == null) {
-                  if (partsLibraryName == _UNKNOWN_LIBRARY_NAME) {
-                    partsLibraryName = name;
-                  } else if (partsLibraryName != name) {
-                    partsLibraryName = null;
-                  }
-                } else if (libraryNameNode.name != name) {
-                  errors.add(new AnalysisError(
-                      librarySource,
-                      partUri.offset,
-                      partUri.length,
-                      StaticWarningCode.PART_OF_DIFFERENT_LIBRARY,
-                      [libraryNameNode.name, name]));
-                }
-              } else {
-                Source source = nameOrSource.source;
-                if (source != librarySource) {
-                  errors.add(new AnalysisError(
-                      librarySource,
-                      partUri.offset,
-                      partUri.length,
-                      StaticWarningCode.PART_OF_DIFFERENT_LIBRARY,
-                      [librarySource.uri.toString(), source.uri.toString()]));
-                }
-              }
-            }
-          }
-          if (entryPoint == null) {
-            entryPoint = _findEntryPoint(partElement);
-          }
-          directive.element = partElement;
-          sourcedCompilationUnits.add(partElement);
-        }
-      }
-    }
-    // TODO(brianwilkerson) Report the error
-    // ResolverErrorCode.MISSING_LIBRARY_DIRECTIVE_WITH_PART
-    //
-    // Create and populate the library element.
-    //
-    AnalysisContext owningContext = context;
-    if (context is InternalAnalysisContext) {
-      InternalAnalysisContext internalContext = context;
-      owningContext = internalContext.getContextFor(librarySource);
-    }
-    //
-    // Try to get the existing LibraryElement.
-    //
-    LibraryElementImpl libraryElement;
-    {
-      InternalAnalysisContext internalContext =
-          context as InternalAnalysisContext;
-      AnalysisCache analysisCache = internalContext.analysisCache;
-      CacheEntry cacheEntry = internalContext.getCacheEntry(target);
-      libraryElement = analysisCache.getValue(target, LIBRARY_ELEMENT1)
-          as LibraryElementImpl;
-      if (libraryElement == null &&
-          internalContext.aboutToComputeResult(cacheEntry, LIBRARY_ELEMENT1)) {
-        libraryElement = analysisCache.getValue(target, LIBRARY_ELEMENT1)
-            as LibraryElementImpl;
-      }
-    }
-    //
-    // Create a new LibraryElement.
-    //
-    if (libraryElement == null) {
-      libraryElement =
-          new LibraryElementImpl.forNode(owningContext, null, libraryNameNode);
-      libraryElement.isSynthetic = modificationTime < 0;
-      libraryElement.definingCompilationUnit = definingCompilationUnitElement;
-      libraryElement.entryPoint = entryPoint;
-      libraryElement.parts = sourcedCompilationUnits;
-      libraryElement.hasExtUri = _hasExtUri(definingCompilationUnit);
-      BuildLibraryElementUtils.patchTopLevelAccessors(libraryElement);
-      // set the library documentation to the docs associated with the first
-      // directive in the compilation unit.
-      if (definingCompilationUnit.directives.isNotEmpty) {
-        setElementDocumentationComment(
-            libraryElement, definingCompilationUnit.directives.first);
-      }
-    }
-    //
-    // Resolve the relevant directives to the library element.
-    //
-    // TODO(brianwilkerson) This updates the state of the AST structures but
-    // does not associate a new result with it.
-    //
-    int length = directivesToResolve.length;
-    for (int i = 0; i < length; i++) {
-      Directive directive = directivesToResolve[i];
-      directive.element = libraryElement;
-    }
-    //
-    // Record outputs.
-    //
-    outputs[BUILD_LIBRARY_ERRORS] = errors;
-    outputs[LIBRARY_ELEMENT1] = libraryElement;
-    outputs[IS_LAUNCHABLE] = entryPoint != null;
-  }
-
-  /**
-   * Return the top-level [FunctionElement] entry point, or `null` if the given
-   * [element] does not define an entry point.
-   */
-  FunctionElement _findEntryPoint(CompilationUnitElementImpl element) {
-    List<FunctionElement> functions = element.functions;
-    int length = functions.length;
-    for (int i = 0; i < length; i++) {
-      FunctionElement function = functions[i];
-      if (function.isEntryPoint) {
-        return function;
-      }
-    }
-    return null;
-  }
-
-  /**
-   * Return the name of the library that the given part is declared to be a
-   * part of, or `null` if the part does not contain a part-of directive.
-   */
-  _NameOrSource _getPartLibraryNameOrUri(
-      AnalysisContext context,
-      Source partSource,
-      CompilationUnit partUnit,
-      List<Directive> directivesToResolve) {
-    NodeList<Directive> directives = partUnit.directives;
-    int length = directives.length;
-    for (int i = 0; i < length; i++) {
-      Directive directive = directives[i];
-      if (directive is PartOfDirective) {
-        directivesToResolve.add(directive);
-        LibraryIdentifier libraryName = directive.libraryName;
-        if (libraryName != null) {
-          return new _NameOrSource(libraryName.name, null);
-        }
-        String uri = directive.uri?.stringValue;
-        if (uri != null) {
-          Source librarySource =
-              context.sourceFactory.resolveUri(partSource, uri);
-          if (librarySource != null) {
-            return new _NameOrSource(null, librarySource);
-          }
-        }
-      }
-    }
-    return null;
-  }
-
-  /**
-   * Return `true` if the given compilation [unit] contains at least one
-   * import directive with a `dart-ext:` URI.
-   */
-  bool _hasExtUri(CompilationUnit unit) {
-    NodeList<Directive> directives = unit.directives;
-    int length = directives.length;
-    for (int i = 0; i < length; i++) {
-      Directive directive = directives[i];
-      if (directive is ImportDirective) {
-        if (DartUriResolver.isDartExtUri(directive.uriContent)) {
-          return true;
-        }
-      }
-    }
-    return false;
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the given
-   * [libSource].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    Source source = target;
-    return <String, TaskInput>{
-      DEFINING_UNIT_INPUT:
-          RESOLVED_UNIT1.of(new LibrarySpecificUnit(source, source)),
-      PARTS_UNIT_INPUT: INCLUDED_PARTS.of(source).toList((Source unit) {
-        return RESOLVED_UNIT1.of(new LibrarySpecificUnit(source, unit));
-      }),
-      MODIFICATION_TIME_INPUT: MODIFICATION_TIME.of(source)
-    };
-  }
-
-  /**
-   * Create a [BuildLibraryElementTask] based on the given [target] in the
-   * given [context].
-   */
-  static BuildLibraryElementTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new BuildLibraryElementTask(context, target);
-  }
-}
-
-/**
- * A task that builds [PUBLIC_NAMESPACE] for a library.
- */
-class BuildPublicNamespaceTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the input for [LIBRARY_ELEMENT2] of a library.
-   */
-  static const String LIBRARY_INPUT = 'LIBRARY_INPUT';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'BuildPublicNamespaceTask',
-      createTask,
-      buildInputs,
-      <ResultDescriptor>[LIBRARY_ELEMENT3]);
-
-  BuildPublicNamespaceTask(
-      InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    LibraryElementImpl library = getRequiredInput(LIBRARY_INPUT);
-    NamespaceBuilder builder = new NamespaceBuilder();
-    library.publicNamespace = builder.createPublicNamespaceForLibrary(library);
-    outputs[LIBRARY_ELEMENT3] = library;
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the
-   * given library [libSource].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    Source source = target;
-    return <String, TaskInput>{LIBRARY_INPUT: LIBRARY_ELEMENT2.of(source)};
-  }
-
-  /**
-   * Create a [BuildPublicNamespaceTask] based on the given [target] in
-   * the given [context].
-   */
-  static BuildPublicNamespaceTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new BuildPublicNamespaceTask(context, target);
-  }
-}
-
-/**
- * A task that builds [EXPORT_SOURCE_CLOSURE] of a library.
- */
-class BuildSourceExportClosureTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the export closure.
-   */
-  static const String EXPORT_INPUT = 'EXPORT_INPUT';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'BuildSourceExportClosureTask',
-      createTask,
-      buildInputs,
-      <ResultDescriptor>[EXPORT_SOURCE_CLOSURE]);
-
-  BuildSourceExportClosureTask(
-      InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    List<Source> exportClosure = getRequiredInput(EXPORT_INPUT);
-    //
-    // Record output.
-    //
-    outputs[EXPORT_SOURCE_CLOSURE] = exportClosure;
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the
-   * given library [libSource].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    Source source = target;
-    return <String, TaskInput>{
-      EXPORT_INPUT: new _ExportSourceClosureTaskInput(source, LIBRARY_ELEMENT2)
-    };
-  }
-
-  /**
-   * Create a [BuildSourceExportClosureTask] based on the given [target] in
-   * the given [context].
-   */
-  static BuildSourceExportClosureTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new BuildSourceExportClosureTask(context, target);
-  }
-}
-
-/**
- * A task that builds [TYPE_PROVIDER] for a context.
- */
-class BuildTypeProviderTask extends SourceBasedAnalysisTask {
-  /**
-   * The [PUBLIC_NAMESPACE] input of the `dart:core` library.
-   */
-  static const String CORE_INPUT = 'CORE_INPUT';
-
-  /**
-   * The [PUBLIC_NAMESPACE] input of the `dart:async` library.
-   */
-  static const String ASYNC_INPUT = 'ASYNC_INPUT';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'BuildTypeProviderTask',
-      createTask,
-      buildInputs,
-      <ResultDescriptor>[TYPE_PROVIDER]);
-
-  BuildTypeProviderTask(
-      InternalAnalysisContext context, AnalysisContextTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    LibraryElement coreLibrary = getRequiredInput(CORE_INPUT);
-    LibraryElement asyncLibrary = getOptionalInput(ASYNC_INPUT);
-    Namespace coreNamespace = coreLibrary.publicNamespace;
-    Namespace asyncNamespace = asyncLibrary.publicNamespace;
-    //
-    // Record outputs.
-    //
-    TypeProvider typeProvider =
-        new TypeProviderImpl.forNamespaces(coreNamespace, asyncNamespace);
-    (context as InternalAnalysisContext).typeProvider = typeProvider;
-    outputs[TYPE_PROVIDER] = typeProvider;
-  }
-
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    AnalysisContextTarget contextTarget = target;
-    SourceFactory sourceFactory = contextTarget.context.sourceFactory;
-    Source coreSource = sourceFactory.forUri(DartSdk.DART_CORE);
-    Source asyncSource = sourceFactory.forUri(DartSdk.DART_ASYNC);
-    if (asyncSource == null) {
-      return <String, TaskInput>{CORE_INPUT: LIBRARY_ELEMENT3.of(coreSource)};
-    }
-    return <String, TaskInput>{
-      CORE_INPUT: LIBRARY_ELEMENT3.of(coreSource),
-      ASYNC_INPUT: LIBRARY_ELEMENT3.of(asyncSource)
-    };
-  }
-
-  /**
-   * Create a [BuildTypeProviderTask] based on the given [context].
-   */
-  static BuildTypeProviderTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new BuildTypeProviderTask(context, target);
-  }
-}
-
-/**
- * A task that computes [CONSTANT_DEPENDENCIES] for a constant.
- */
-class ComputeConstantDependenciesTask extends ConstantEvaluationAnalysisTask {
-  /**
-   * The name of the [TYPE_PROVIDER] input.
-   */
-  static const String TYPE_PROVIDER_INPUT = 'TYPE_PROVIDER_INPUT';
-
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ComputeConstantDependenciesTask',
-      createTask,
-      buildInputs,
-      <ResultDescriptor>[CONSTANT_DEPENDENCIES]);
-
-  ComputeConstantDependenciesTask(
-      InternalAnalysisContext context, ConstantEvaluationTarget constant)
-      : super(context, constant);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    //
-    // Prepare inputs.
-    //
-    ConstantEvaluationTarget constant = target;
-    TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT);
-    //
-    // Compute dependencies.
-    //
-    List<ConstantEvaluationTarget> dependencies = <ConstantEvaluationTarget>[];
-    new ConstantEvaluationEngine(typeProvider, context.declaredVariables,
-            typeSystem: context.typeSystem)
-        .computeDependencies(constant, dependencies.add);
-    //
-    // Record outputs.
-    //
-    outputs[CONSTANT_DEPENDENCIES] = dependencies;
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the
-   * given [target].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    return <String, TaskInput>{
-      'constantExpressionResolved': CONSTANT_EXPRESSION_RESOLVED.of(target),
-      TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request)
-    };
-  }
-
-  /**
-   * Create a [ComputeConstantDependenciesTask] based on the given [target] in
-   * the given [context].
-   */
-  static ComputeConstantDependenciesTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new ComputeConstantDependenciesTask(context, target);
-  }
-}
-
-/**
- * A task that computes the value of a constant ([CONSTANT_VALUE]) and
- * stores it in the element model.
- */
-class ComputeConstantValueTask extends ConstantEvaluationAnalysisTask {
-  /**
-   * The name of the input which ensures that dependent constants are evaluated
-   * before the target.
-   */
-  static const String DEPENDENCIES_INPUT = 'DEPENDENCIES_INPUT';
-
-  /**
-   * The name of the [TYPE_PROVIDER] input.
-   */
-  static const String TYPE_PROVIDER_INPUT = 'TYPE_PROVIDER_INPUT';
-
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ComputeConstantValueTask',
-      createTask,
-      buildInputs,
-      <ResultDescriptor>[CONSTANT_VALUE]);
-
-  ComputeConstantValueTask(
-      InternalAnalysisContext context, ConstantEvaluationTarget constant)
-      : super(context, constant);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  bool get handlesDependencyCycles => true;
-
-  @override
-  void internalPerform() {
-    //
-    // Prepare inputs.
-    //
-    // Note: DEPENDENCIES_INPUT is not needed.  It is merely a bookkeeping
-    // dependency to ensure that the constants that this constant depends on
-    // are computed first.
-    ConstantEvaluationTarget constant = target;
-    AnalysisContext context = constant.context;
-    TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT);
-    //
-    // Compute the value of the constant, or report an error if there was a
-    // cycle.
-    //
-    ConstantEvaluationEngine constantEvaluationEngine =
-        new ConstantEvaluationEngine(typeProvider, context.declaredVariables,
-            typeSystem: context.typeSystem);
-    if (dependencyCycle == null) {
-      constantEvaluationEngine.computeConstantValue(constant);
-    } else {
-      List<ConstantEvaluationTarget> constantsInCycle =
-          <ConstantEvaluationTarget>[];
-      int length = dependencyCycle.length;
-      for (int i = 0; i < length; i++) {
-        WorkItem workItem = dependencyCycle[i];
-        if (workItem.descriptor == DESCRIPTOR) {
-          AnalysisTarget target = workItem.target;
-          constantsInCycle.add(target);
-          if (target is ConstructorElementImpl) {
-            target.isCycleFree = false;
-          }
-        }
-      }
-      assert(constantsInCycle.isNotEmpty);
-      constantEvaluationEngine.generateCycleError(constantsInCycle, constant);
-    }
-    //
-    // Record outputs.
-    //
-    outputs[CONSTANT_VALUE] = constant;
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the given
-   * [target].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    ConstantEvaluationTarget evaluationTarget = target;
-    return <String, TaskInput>{
-      DEPENDENCIES_INPUT:
-          CONSTANT_DEPENDENCIES.of(evaluationTarget).toListOf(CONSTANT_VALUE),
-      TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request)
-    };
-  }
-
-  /**
-   * Create a [ComputeConstantValueTask] based on the given [target] in the
-   * given [context].
-   */
-  static ComputeConstantValueTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new ComputeConstantValueTask(context, target);
-  }
-}
-
-/**
- * A task that computes the [INFERABLE_STATIC_VARIABLE_DEPENDENCIES] for a
- * static variable whose type should be inferred.
- */
-class ComputeInferableStaticVariableDependenciesTask
-    extends InferStaticVariableTask {
-  /**
-   * The name of the [RESOLVED_UNIT7] input.
-   */
-  static const String UNIT_INPUT = 'UNIT_INPUT';
-
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ComputeInferableStaticVariableDependenciesTask',
-      createTask,
-      buildInputs,
-      <ResultDescriptor>[INFERABLE_STATIC_VARIABLE_DEPENDENCIES]);
-
-  ComputeInferableStaticVariableDependenciesTask(
-      InternalAnalysisContext context, VariableElement variable)
-      : super(context, variable);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    //
-    // Prepare inputs.
-    //
-    CompilationUnit unit = getRequiredInput(UNIT_INPUT);
-    //
-    // Compute dependencies.
-    //
-    VariableDeclaration declaration = getDeclaration(unit);
-    VariableGatherer gatherer = new VariableGatherer(_isInferableStatic);
-    declaration.initializer.accept(gatherer);
-    //
-    // Record outputs.
-    //
-    outputs[INFERABLE_STATIC_VARIABLE_DEPENDENCIES] = gatherer.results.toList();
-  }
-
-  /**
-   * Return `true` if the given [variable] is a static variable whose type
-   * should be inferred.
-   */
-  bool _isInferableStatic(VariableElement variable) =>
-      variable.isStatic &&
-      variable.hasImplicitType &&
-      variable.initializer != null;
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the
-   * given [target].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    if (target is VariableElement) {
-      CompilationUnitElementImpl unit = target
-          .getAncestor((Element element) => element is CompilationUnitElement);
-      return <String, TaskInput>{
-        UNIT_INPUT: RESOLVED_UNIT7
-            .of(new LibrarySpecificUnit(unit.librarySource, unit.source))
-      };
-    }
-    throw new AnalysisException(
-        'Cannot build inputs for a ${target.runtimeType}');
-  }
-
-  /**
-   * Create a [ComputeInferableStaticVariableDependenciesTask] based on the
-   * given [target] in the given [context].
-   */
-  static ComputeInferableStaticVariableDependenciesTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new ComputeInferableStaticVariableDependenciesTask(context, target);
-  }
-}
-
-/**
- * A task that computes the [LIBRARY_CYCLE] for a
- * library element.  Also computes the [LIBRARY_CYCLE_UNITS] and the
- * [LIBRARY_CYCLE_DEPENDENCIES].
- */
-class ComputeLibraryCycleTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the [LIBRARY_ELEMENT2] input.
-   */
-  static const String LIBRARY_ELEMENT_INPUT = 'LIBRARY_ELEMENT_INPUT';
-
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ComputeLibraryCycleForUnitTask',
-      createTask,
-      buildInputs, <ResultDescriptor>[
-    LIBRARY_CYCLE,
-    LIBRARY_CYCLE_UNITS,
-    LIBRARY_CYCLE_DEPENDENCIES
-  ]);
-
-  ComputeLibraryCycleTask(
-      InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    // The computation of library cycles is necessarily non-local, since we
-    // in general have to look at all of the reachable libraries
-    // in order to find the strongly connected components.  Repeating this
-    // computation for every node would be quadratic.  The libraryCycle getter
-    // will avoid this by computing the library cycles for every reachable
-    // library and recording it in the element model.  This means that this
-    // task implicitly produces the output for many other targets.  This
-    // can't be expressed in the task model right now: instead, we just
-    // run tasks for those other targets, and they pick up the recorded
-    // version off of the element model.  Unfortunately, this means that
-    // the task model will not handle the invalidation of the recorded
-    // results for us.  Instead, we must explicitly invalidate the recorded
-    // library cycle information when we add or subtract edges from the
-    // import/export graph.  Any update that changes the
-    // import/export graph will induce a recomputation of the LIBRARY_ELEMENT2
-    // result for the changed node. This recomputation is responsible for
-    // conservatively invalidating the library cycle information recorded
-    // in the element model.  The LIBRARY_CYCLE results that have been cached
-    // by the task model are conservatively invalidated by the
-    // IMPORT_EXPORT_SOURCE_CLOSURE dependency below.  If anything reachable
-    // from a node is changed, its LIBRARY_CYCLE results will be re-computed
-    // here (possibly re-using the result from the element model if invalidation
-    // did not cause it to be erased).  In summary, task model dependencies
-    // on the import/export source closure ensure that this method will be
-    // re-run if anything reachable from this target has been invalidated,
-    // and the invalidation code (invalidateLibraryCycles) will ensure that
-    // element model results will be re-used here only if they are still valid.
-    LibraryElement library = getRequiredInput(LIBRARY_ELEMENT_INPUT);
-    if (!LibraryElementImpl.hasResolutionCapability(
-        library, LibraryResolutionCapability.resolvedTypeNames)) {
-      List<LibraryElement> component = library.libraryCycle;
-      Set<LibraryElement> filter = component.toSet();
-      Set<CompilationUnitElement> deps = new Set<CompilationUnitElement>();
-      void addLibrary(LibraryElement l) {
-        if (!filter.contains(l)) {
-          deps.addAll(l.units);
-        }
-      }
-
-      int length = component.length;
-      for (int i = 0; i < length; i++) {
-        LibraryElement library = component[i];
-        library.importedLibraries.forEach(addLibrary);
-        library.exportedLibraries.forEach(addLibrary);
-      }
-      //
-      // Record outputs.
-      //
-      LibrarySpecificUnit unitToLSU(CompilationUnitElement unit) =>
-          new LibrarySpecificUnit(unit.librarySource, unit.source);
-      outputs[LIBRARY_CYCLE] = component;
-      outputs[LIBRARY_CYCLE_UNITS] =
-          component.expand((l) => l.units).map(unitToLSU).toList();
-      outputs[LIBRARY_CYCLE_DEPENDENCIES] = deps.map(unitToLSU).toList();
-    } else {
-      outputs[LIBRARY_CYCLE] = <LibraryElement>[];
-      outputs[LIBRARY_CYCLE_UNITS] = <LibrarySpecificUnit>[];
-      outputs[LIBRARY_CYCLE_DEPENDENCIES] = <LibrarySpecificUnit>[];
-    }
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the
-   * given [target].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    Source librarySource = target;
-    return <String, TaskInput>{
-      LIBRARY_ELEMENT_INPUT: LIBRARY_ELEMENT2.of(librarySource),
-      'resolveReachableLibraries': READY_LIBRARY_ELEMENT2.of(librarySource),
-    };
-  }
-
-  /**
-   * Create a [ComputeLibraryCycleTask] based on the
-   * given [target] in the given [context].
-   */
-  static ComputeLibraryCycleTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new ComputeLibraryCycleTask(context, target);
-  }
-}
-
-/**
- * A task that builds [REQUIRED_CONSTANTS] for a unit.
- */
-class ComputeRequiredConstantsTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the [RESOLVED_UNIT] input.
-   */
-  static const String UNIT_INPUT = 'UNIT_INPUT';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ComputeRequiredConstantsTask',
-      createTask,
-      buildInputs,
-      <ResultDescriptor>[PENDING_ERRORS, REQUIRED_CONSTANTS]);
-
-  ComputeRequiredConstantsTask(
-      InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    Source source = getRequiredSource();
-    //
-    // Prepare inputs.
-    //
-    CompilationUnit unit = getRequiredInput(UNIT_INPUT);
-    //
-    // Use the ErrorVerifier to compute errors.
-    //
-    RequiredConstantsComputer computer = new RequiredConstantsComputer(source);
-    unit.accept(computer);
-    List<PendingError> pendingErrors = computer.pendingErrors;
-    List<ConstantEvaluationTarget> requiredConstants =
-        computer.requiredConstants;
-    //
-    // Record outputs.
-    //
-    outputs[PENDING_ERRORS] = pendingErrors;
-    outputs[REQUIRED_CONSTANTS] = requiredConstants;
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the
-   * given [target].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    LibrarySpecificUnit unit = target;
-    return <String, TaskInput>{UNIT_INPUT: RESOLVED_UNIT.of(unit)};
-  }
-
-  /**
-   * Create a [ComputeRequiredConstantsTask] based on the given [target] in
-   * the given [context].
-   */
-  static ComputeRequiredConstantsTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new ComputeRequiredConstantsTask(context, target);
-  }
-}
-
-/**
- * A base class for analysis tasks whose target is expected to be a
- * [ConstantEvaluationTarget].
- */
-abstract class ConstantEvaluationAnalysisTask extends AnalysisTask {
-  /**
-   * Initialize a newly created task to perform analysis within the given
-   * [context] in order to produce results for the given [constant].
-   */
-  ConstantEvaluationAnalysisTask(
-      AnalysisContext context, ConstantEvaluationTarget constant)
-      : super(context, constant);
-
-  @override
-  String get description {
-    Source source = target.source;
-    String sourceName = source == null ? '<unknown source>' : source.fullName;
-    return '${descriptor.name} for element $target in source $sourceName';
-  }
-}
-
-/**
- * Interface for [AnalysisTarget]s for which constant evaluation can be
- * performed.
- */
-abstract class ConstantEvaluationTarget extends AnalysisTarget {
-  /**
-   * Return the [AnalysisContext] which should be used to evaluate this
-   * constant.
-   */
-  AnalysisContext get context;
-
-  /**
-   * Return whether this constant is evaluated.
-   */
-  bool get isConstantEvaluated;
-}
-
-/**
- * A task that computes a list of the libraries containing the target source.
- */
-class ContainingLibrariesTask extends SourceBasedAnalysisTask {
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ContainingLibrariesTask',
-      createTask,
-      buildInputs,
-      <ResultDescriptor>[CONTAINING_LIBRARIES]);
-
-  ContainingLibrariesTask(
-      InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    // TODO(brianwilkerson) This value can change as new libraries are analyzed
-    // so we need some way of making sure that this result is removed from the
-    // cache appropriately.
-    Source source = getRequiredSource();
-    outputs[CONTAINING_LIBRARIES] = context.getLibrariesContaining(source);
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the
-   * given [target].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    return <String, TaskInput>{};
-  }
-
-  /**
-   * Create a [ContainingLibrariesTask] based on the given [target] in the given
-   * [context].
-   */
-  static ContainingLibrariesTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new ContainingLibrariesTask(context, target);
-  }
-}
-
-/**
- * A task that merges all of the errors for a single source into a single list
- * of errors.
- */
-class DartErrorsTask extends SourceBasedAnalysisTask {
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor('DartErrorsTask',
-      createTask, buildInputs, <ResultDescriptor>[DART_ERRORS]);
-
-  /**
-   * The name of the [IGNORE_INFO_INPUT] input.
-   */
-  static const String IGNORE_INFO_INPUT = 'IGNORE_INFO_INPUT';
-
-  /**
-   * The name of the [LINE_INFO_INPUT] input.
-   */
-  static const String LINE_INFO_INPUT = 'LINE_INFO_INPUT';
-
-  DartErrorsTask(InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    List<List<AnalysisError>> errorLists = <List<AnalysisError>>[];
-    //
-    // Prepare inputs.
-    //
-    EnginePlugin enginePlugin = AnalysisEngine.instance.enginePlugin;
-    List<ResultDescriptor> errorsForSource = enginePlugin.dartErrorsForSource;
-    int sourceLength = errorsForSource.length;
-    for (int i = 0; i < sourceLength; i++) {
-      ResultDescriptor result = errorsForSource[i];
-      String inputName = result.name + '_input';
-      errorLists.add(getRequiredInput(inputName));
-    }
-    List<ResultDescriptor> errorsForUnit = enginePlugin.dartErrorsForUnit;
-    int unitLength = errorsForUnit.length;
-    for (int i = 0; i < unitLength; i++) {
-      ResultDescriptor result = errorsForUnit[i];
-      String inputName = result.name + '_input';
-      Map<Source, List<AnalysisError>> errorMap = getRequiredInput(inputName);
-      for (List<AnalysisError> errors in errorMap.values) {
-        errorLists.add(errors);
-      }
-    }
-
-    //
-    // Filter ignored errors.
-    //
-    List<AnalysisError> errors =
-        _filterIgnores(AnalysisError.mergeLists(errorLists));
-
-    //
-    // Record outputs.
-    //
-    outputs[DART_ERRORS] = errors;
-  }
-
-  List<AnalysisError> _filterIgnores(List<AnalysisError> errors) {
-    if (errors.isEmpty) {
-      return errors;
-    }
-
-    IgnoreInfo ignoreInfo = getRequiredInput(IGNORE_INFO_INPUT);
-    if (!ignoreInfo.hasIgnores) {
-      return errors;
-    }
-
-    LineInfo lineInfo = getRequiredInput(LINE_INFO_INPUT);
-
-    return filterIgnored(errors, ignoreInfo, lineInfo);
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the
-   * given [target].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    Source source = target;
-    Map<String, TaskInput> inputs = <String, TaskInput>{};
-    inputs[LINE_INFO_INPUT] = LINE_INFO.of(source);
-    inputs[IGNORE_INFO_INPUT] = IGNORE_INFO.of(source);
-    EnginePlugin enginePlugin = AnalysisEngine.instance.enginePlugin;
-    // for Source
-    List<ListResultDescriptor<AnalysisError>> errorsForSource =
-        enginePlugin.dartErrorsForSource;
-    int sourceLength = errorsForSource.length;
-    for (int i = 0; i < sourceLength; i++) {
-      ListResultDescriptor<AnalysisError> result = errorsForSource[i];
-      String inputName = result.name + '_input';
-      inputs[inputName] = result.of(source);
-    }
-    // for LibrarySpecificUnit
-    List<ListResultDescriptor<AnalysisError>> errorsForUnit =
-        enginePlugin.dartErrorsForUnit;
-    int unitLength = errorsForUnit.length;
-    for (int i = 0; i < unitLength; i++) {
-      ListResultDescriptor<AnalysisError> result = errorsForUnit[i];
-      String inputName = result.name + '_input';
-      inputs[inputName] =
-          CONTAINING_LIBRARIES.of(source).toMap((Source library) {
-        LibrarySpecificUnit unit = new LibrarySpecificUnit(library, source);
-        return result.of(unit);
-      });
-    }
-    return inputs;
-  }
-
-  /**
-   * Create a [DartErrorsTask] based on the given [target] in the given
-   * [context].
-   */
-  static DartErrorsTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new DartErrorsTask(context, target);
-  }
-
-  /**
-   * Return a new list with items from [errors] which are not filtered out by
-   * the [ignoreInfo].
-   */
-  static List<AnalysisError> filterIgnored(
-      List<AnalysisError> errors, IgnoreInfo ignoreInfo, LineInfo lineInfo) {
-    if (errors.isEmpty || !ignoreInfo.hasIgnores) {
-      return errors;
-    }
-
-    bool isIgnored(AnalysisError error) {
-      int errorLine = lineInfo.getLocation(error.offset).lineNumber;
-      String errorCode = error.errorCode.name.toLowerCase();
-      return ignoreInfo.ignoredAt(errorCode, errorLine);
-    }
-
-    return errors.where((AnalysisError e) => !isIgnored(e)).toList();
-  }
-}
-
-/**
- * A task that builds [RESOLVED_UNIT12] for a unit.
- */
-class EvaluateUnitConstantsTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the [RESOLVED_UNIT11] input.
-   */
-  static const String UNIT_INPUT = 'UNIT_INPUT';
-
-  /**
-   * The name of the [CONSTANT_VALUE] input.
-   */
-  static const String CONSTANT_VALUES = 'CONSTANT_VALUES';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'EvaluateUnitConstantsTask',
-      createTask,
-      buildInputs,
-      <ResultDescriptor>[CREATED_RESOLVED_UNIT12, RESOLVED_UNIT12]);
-
-  EvaluateUnitConstantsTask(AnalysisContext context, LibrarySpecificUnit target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    // No actual work needs to be performed; the task manager will ensure that
-    // all constants are evaluated before this method is called.
-    CompilationUnit unit = getRequiredInput(UNIT_INPUT);
-    outputs[RESOLVED_UNIT12] = unit;
-    outputs[CREATED_RESOLVED_UNIT12] = true;
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the
-   * given [target].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    LibrarySpecificUnit unit = target;
-    return <String, TaskInput>{
-      'libraryElement': LIBRARY_ELEMENT9.of(unit.library),
-      UNIT_INPUT: RESOLVED_UNIT11.of(unit),
-      CONSTANT_VALUES:
-          COMPILATION_UNIT_CONSTANTS.of(unit).toListOf(CONSTANT_VALUE),
-      'constantExpressionsDependencies':
-          CONSTANT_EXPRESSIONS_DEPENDENCIES.of(unit).toListOf(CONSTANT_VALUE)
-    };
-  }
-
-  /**
-   * Create an [EvaluateUnitConstantsTask] based on the given [target] in
-   * the given [context].
-   */
-  static EvaluateUnitConstantsTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new EvaluateUnitConstantsTask(context, target);
-  }
-}
-
-/**
- * A task that builds [USED_IMPORTED_ELEMENTS] for a unit.
- */
-class GatherUsedImportedElementsTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the [RESOLVED_UNIT11] input.
-   */
-  static const String UNIT_INPUT = 'UNIT_INPUT';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'GatherUsedImportedElementsTask',
-      createTask,
-      buildInputs,
-      <ResultDescriptor>[USED_IMPORTED_ELEMENTS]);
-
-  GatherUsedImportedElementsTask(
-      InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    CompilationUnit unit = getRequiredInput(UNIT_INPUT);
-    CompilationUnitElement unitElement = unit.declaredElement;
-    LibraryElement libraryElement = unitElement.library;
-    //
-    // Prepare used imported elements.
-    //
-    GatherUsedImportedElementsVisitor visitor =
-        new GatherUsedImportedElementsVisitor(libraryElement);
-    unit.accept(visitor);
-    //
-    // Record outputs.
-    //
-    outputs[USED_IMPORTED_ELEMENTS] = visitor.usedElements;
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the
-   * given [target].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    LibrarySpecificUnit unit = target;
-    return <String, TaskInput>{UNIT_INPUT: RESOLVED_UNIT11.of(unit)};
-  }
-
-  /**
-   * Create a [GatherUsedImportedElementsTask] based on the given [target] in
-   * the given [context].
-   */
-  static GatherUsedImportedElementsTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new GatherUsedImportedElementsTask(context, target);
-  }
-}
-
-/**
- * A task that builds [USED_LOCAL_ELEMENTS] for a unit.
- */
-class GatherUsedLocalElementsTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the [RESOLVED_UNIT11] input.
-   */
-  static const String UNIT_INPUT = 'UNIT_INPUT';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'GatherUsedLocalElementsTask',
-      createTask,
-      buildInputs,
-      <ResultDescriptor>[USED_LOCAL_ELEMENTS]);
-
-  GatherUsedLocalElementsTask(
-      InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    CompilationUnit unit = getRequiredInput(UNIT_INPUT);
-    CompilationUnitElement unitElement = unit.declaredElement;
-    LibraryElement libraryElement = unitElement.library;
-    //
-    // Prepare used local elements.
-    //
-    GatherUsedLocalElementsVisitor visitor =
-        new GatherUsedLocalElementsVisitor(libraryElement);
-    unit.accept(visitor);
-    //
-    // Record outputs.
-    //
-    outputs[USED_LOCAL_ELEMENTS] = visitor.usedElements;
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the
-   * given [target].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    LibrarySpecificUnit unit = target;
-    return <String, TaskInput>{UNIT_INPUT: RESOLVED_UNIT11.of(unit)};
-  }
-
-  /**
-   * Create a [GatherUsedLocalElementsTask] based on the given [target] in
-   * the given [context].
-   */
-  static GatherUsedLocalElementsTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new GatherUsedLocalElementsTask(context, target);
-  }
-}
-
-/**
- * A task that generates [HINTS] for a unit.
- */
-class GenerateHintsTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the [RESOLVED_UNIT11] input.
-   */
-  static const String RESOLVED_UNIT_INPUT = 'RESOLVED_UNIT';
-
-  /**
-   * The name of a list of [USED_LOCAL_ELEMENTS] for each library unit input.
-   */
-  static const String USED_LOCAL_ELEMENTS_INPUT = 'USED_LOCAL_ELEMENTS';
-
-  /**
-   * The name of a list of [USED_IMPORTED_ELEMENTS] for each library unit input.
-   */
-  static const String USED_IMPORTED_ELEMENTS_INPUT = 'USED_IMPORTED_ELEMENTS';
-
-  /**
-   * The name of the [TYPE_PROVIDER] input.
-   */
-  static const String TYPE_PROVIDER_INPUT = 'TYPE_PROVIDER_INPUT';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'GenerateHintsTask', createTask, buildInputs, <ResultDescriptor>[HINTS]);
-
-  GenerateHintsTask(InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    AnalysisOptions analysisOptions = context.analysisOptions;
-    if (!analysisOptions.hint) {
-      outputs[HINTS] = AnalysisError.NO_ERRORS;
-      return;
-    }
-    //
-    // Prepare collectors.
-    //
-    RecordingErrorListener errorListener = new RecordingErrorListener();
-    Source source = getRequiredSource();
-    ErrorReporter errorReporter = new ErrorReporter(errorListener, source);
-    //
-    // Prepare inputs.
-    //
-    CompilationUnit unit = getRequiredInput(RESOLVED_UNIT_INPUT);
-    List<UsedImportedElements> usedImportedElementsList =
-        getRequiredInput(USED_IMPORTED_ELEMENTS_INPUT);
-    List<UsedLocalElements> usedLocalElementsList =
-        getRequiredInput(USED_LOCAL_ELEMENTS_INPUT);
-    CompilationUnitElement unitElement = unit.declaredElement;
-    LibraryElement libraryElement = unitElement.library;
-    TypeSystem typeSystem = context.typeSystem;
-
-    //
-    // Generate errors.
-    //
-    unit.accept(new DeadCodeVerifier(errorReporter, typeSystem: typeSystem));
-    // Verify imports.
-    {
-      ImportsVerifier verifier = new ImportsVerifier();
-      verifier.addImports(unit);
-      usedImportedElementsList.forEach(verifier.removeUsedElements);
-      verifier.generateDuplicateImportHints(errorReporter);
-      verifier.generateDuplicateShownHiddenNameHints(errorReporter);
-      verifier.generateUnusedImportHints(errorReporter);
-      verifier.generateUnusedShownNameHints(errorReporter);
-    }
-    // Unused local elements.
-    {
-      UsedLocalElements usedElements =
-          new UsedLocalElements.merge(usedLocalElementsList);
-      UnusedLocalElementsVerifier visitor =
-          new UnusedLocalElementsVerifier(errorListener, usedElements);
-      unit.accept(visitor);
-    }
-    // Dart2js analysis.
-    if (analysisOptions.dart2jsHint) {
-      unit.accept(new Dart2JSVerifier(errorReporter));
-    }
-    // Dart best practices.
-    var inheritanceManager2 = new InheritanceManager2(context.typeSystem);
-    TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT);
-    ResourceProvider resourceProvider = PhysicalResourceProvider.INSTANCE;
-
-    unit.accept(new BestPracticesVerifier(
-        errorReporter, typeProvider, libraryElement,
-        typeSystem: typeSystem,
-        resourceProvider: resourceProvider,
-        analysisOptions: context.analysisOptions));
-    unit.accept(new OverrideVerifier(
-      inheritanceManager2,
-      libraryElement,
-      errorReporter,
-    ));
-    // Find to-do comments.
-    new ToDoFinder(errorReporter).findIn(unit);
-    //
-    // Record outputs.
-    //
-    outputs[HINTS] = errorListener.errors;
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the
-   * given [target].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    LibrarySpecificUnit unit = target;
-    Source libSource = unit.library;
-    return <String, TaskInput>{
-      RESOLVED_UNIT_INPUT: RESOLVED_UNIT.of(unit),
-      USED_LOCAL_ELEMENTS_INPUT:
-          LIBRARY_SPECIFIC_UNITS.of(libSource).toListOf(USED_LOCAL_ELEMENTS),
-      USED_IMPORTED_ELEMENTS_INPUT:
-          LIBRARY_SPECIFIC_UNITS.of(libSource).toListOf(USED_IMPORTED_ELEMENTS),
-      TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request)
-    };
-  }
-
-  /**
-   * Create a [GenerateHintsTask] based on the given [target] in
-   * the given [context].
-   */
-  static GenerateHintsTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new GenerateHintsTask(context, target);
-  }
-}
-
-/**
- * A task that generates [LINTS] for a unit.
- */
-class GenerateLintsTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the [RESOLVED_UNIT] input.
-   */
-  static const String RESOLVED_UNIT_INPUT = 'RESOLVED_UNIT';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'GenerateLintsTask', createTask, buildInputs, <ResultDescriptor>[LINTS]);
-
-  GenerateLintsTask(InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    AnalysisOptions analysisOptions = context.analysisOptions;
-    if (!analysisOptions.lint) {
-      outputs[LINTS] = AnalysisError.NO_ERRORS;
-      return;
-    }
-    //
-    // Prepare collectors.
-    //
-    RecordingErrorListener errorListener = new RecordingErrorListener();
-    Source source = getRequiredSource();
-    ErrorReporter errorReporter = new ErrorReporter(errorListener, source);
-    //
-    // Prepare inputs.
-    //
-    CompilationUnit unit = getRequiredInput(RESOLVED_UNIT_INPUT);
-    //
-    // Generate lints.
-    //
-    List<AstVisitor> visitors = <AstVisitor>[];
-    bool timeVisits = analysisOptions.enableTiming;
-    List<Linter> linters = getLints(context);
-    int length = linters.length;
-    for (int i = 0; i < length; i++) {
-      Linter linter = linters[i];
-      AstVisitor visitor = linter.getVisitor();
-      if (visitor != null) {
-        linter.reporter = errorReporter;
-        if (timeVisits) {
-          visitor = new TimedAstVisitor(visitor, lintRegistry.getTimer(linter));
-        }
-        visitors.add(visitor);
-      }
-    }
-    AstVisitor visitor = new ExceptionHandlingDelegatingAstVisitor(
-        visitors, ExceptionHandlingDelegatingAstVisitor.logException);
-    unit.accept(visitor);
-    //
-    // Record outputs.
-    //
-    outputs[LINTS] = errorListener.errors;
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the
-   * given [target].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) =>
-      <String, TaskInput>{RESOLVED_UNIT_INPUT: RESOLVED_UNIT.of(target)};
-
-  /**
-   * Create a [GenerateLintsTask] based on the given [target] in
-   * the given [context].
-   */
-  static GenerateLintsTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new GenerateLintsTask(context, target);
-  }
-}
-
-/**
- * Information about analysis `//ignore:` and `//ignore_for_file` comments
- * within a source file.
- */
-class IgnoreInfo {
-  /**
-   *  Instance shared by all cases without matches.
-   */
-  static final IgnoreInfo _EMPTY_INFO = new IgnoreInfo();
-
-  /**
-   * A regular expression for matching 'ignore' comments.  Produces matches
-   * containing 2 groups.  For example:
-   *
-   *     * ['//ignore: error_code', 'error_code']
-   *
-   * Resulting codes may be in a list ('error_code_1,error_code2').
-   */
-  static final RegExp _IGNORE_MATCHER =
-      new RegExp(r'//+[ ]*ignore:(.*)$', multiLine: true);
-
-  /**
-   * A regular expression for matching 'ignore_for_file' comments.  Produces
-   * matches containing 2 groups.  For example:
-   *
-   *     * ['//ignore_for_file: error_code', 'error_code']
-   *
-   * Resulting codes may be in a list ('error_code_1,error_code2').
-   */
-  static final RegExp _IGNORE_FOR_FILE_MATCHER =
-      new RegExp(r'//[ ]*ignore_for_file:(.*)$', multiLine: true);
-
-  final Map<int, List<String>> _ignoreMap = new HashMap<int, List<String>>();
-
-  final Set<String> _ignoreForFileSet = new HashSet<String>();
-
-  /**
-   * Whether this info object defines any ignores.
-   */
-  bool get hasIgnores => ignores.isNotEmpty || _ignoreForFileSet.isNotEmpty;
-
-  /**
-   * Iterable of error codes ignored for the whole file.
-   */
-  Iterable<String> get ignoreForFiles => _ignoreForFileSet;
-
-  /**
-   * Map of line numbers to associated ignored error codes.
-   */
-  Map<int, Iterable<String>> get ignores => _ignoreMap;
-
-  /**
-   * Ignore this [errorCode] at [line].
-   */
-  void add(int line, String errorCode) {
-    _ignoreMap.putIfAbsent(line, () => new List<String>()).add(errorCode);
-  }
-
-  /**
-   * Ignore these [errorCodes] at [line].
-   */
-  void addAll(int line, Iterable<String> errorCodes) {
-    _ignoreMap.putIfAbsent(line, () => new List<String>()).addAll(errorCodes);
-  }
-
-  /**
-   * Ignore these [errorCodes] in the whole file.
-   */
-  void addAllForFile(Iterable<String> errorCodes) {
-    _ignoreForFileSet.addAll(errorCodes);
-  }
-
-  /**
-   * Test whether this [errorCode] is ignored at the given [line].
-   */
-  bool ignoredAt(String errorCode, int line) =>
-      _ignoreForFileSet.contains(errorCode) ||
-      _ignoreMap[line]?.contains(errorCode) == true;
-
-  /**
-   * Calculate ignores for the given [content] with line [info].
-   */
-  static IgnoreInfo calculateIgnores(String content, LineInfo info) {
-    Iterable<Match> matches = _IGNORE_MATCHER.allMatches(content);
-    Iterable<Match> fileMatches = _IGNORE_FOR_FILE_MATCHER.allMatches(content);
-    if (matches.isEmpty && fileMatches.isEmpty) {
-      return _EMPTY_INFO;
-    }
-
-    IgnoreInfo ignoreInfo = new IgnoreInfo();
-    for (Match match in matches) {
-      // See _IGNORE_MATCHER for format --- note the possibility of error lists.
-      Iterable<String> codes = match
-          .group(1)
-          .split(',')
-          .map((String code) => code.trim().toLowerCase());
-      CharacterLocation location = info.getLocation(match.start);
-      int lineNumber = location.lineNumber;
-      String beforeMatch = content.substring(
-          info.getOffsetOfLine(lineNumber - 1),
-          info.getOffsetOfLine(lineNumber - 1) + location.columnNumber - 1);
-
-      if (beforeMatch.trim().isEmpty) {
-        // The comment is on its own line, so it refers to the next line.
-        ignoreInfo.addAll(lineNumber + 1, codes);
-      } else {
-        // The comment sits next to code, so it refers to its own line.
-        ignoreInfo.addAll(lineNumber, codes);
-      }
-    }
-    for (Match match in fileMatches) {
-      Iterable<String> codes = match
-          .group(1)
-          .split(',')
-          .map((String code) => code.trim().toLowerCase());
-      ignoreInfo.addAllForFile(codes);
-    }
-    return ignoreInfo;
-  }
-}
-
-/**
- * A task that ensures that all of the inferable instance members in a
- * compilation unit have had their type inferred.
- */
-class InferInstanceMembersInUnitTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the [TYPE_PROVIDER] input.
-   */
-  static const String TYPE_PROVIDER_INPUT = 'TYPE_PROVIDER_INPUT';
-
-  /**
-   * The name of the input whose value is the [RESOLVED_UNIT8] for the
-   * compilation unit.
-   */
-  static const String UNIT_INPUT = 'UNIT_INPUT';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'InferInstanceMembersInUnitTask',
-      createTask,
-      buildInputs,
-      <ResultDescriptor>[CREATED_RESOLVED_UNIT10, RESOLVED_UNIT10]);
-
-  /**
-   * Initialize a newly created task to build a library element for the given
-   * [unit] in the given [context].
-   */
-  InferInstanceMembersInUnitTask(
-      InternalAnalysisContext context, LibrarySpecificUnit unit)
-      : super(context, unit);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    //
-    // Prepare inputs.
-    //
-    CompilationUnit unit = getRequiredInput(UNIT_INPUT);
-    TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT);
-
-    //
-    // Infer instance members.
-    //
-    var inheritance = new InheritanceManager2(context.typeSystem);
-    InstanceMemberInferrer inferrer =
-        new InstanceMemberInferrer(typeProvider, inheritance);
-    inferrer.inferCompilationUnit(unit.declaredElement);
-    //
-    // Record outputs.
-    //
-    outputs[RESOLVED_UNIT10] = unit;
-    outputs[CREATED_RESOLVED_UNIT10] = true;
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the given
-   * [libSource].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    LibrarySpecificUnit unit = target;
-    return <String, TaskInput>{
-      UNIT_INPUT: RESOLVED_UNIT9.of(unit),
-      TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request),
-      // In strong mode, add additional dependencies to enforce inference
-      // ordering.
-
-      // Require that field re-resolution be complete for all units in the
-      // current library cycle.
-      'orderLibraryCycleTasks':
-          LIBRARY_CYCLE_UNITS.of(unit.library).toListOf(CREATED_RESOLVED_UNIT9),
-      // Require that full inference be complete for all dependencies of the
-      // current library cycle.
-      'orderLibraryCycles': LIBRARY_CYCLE_DEPENDENCIES
-          .of(unit.library)
-          .toListOf(CREATED_RESOLVED_UNIT10)
-    };
-  }
-
-  /**
-   * Create a [InferInstanceMembersInUnitTask] based on the given [target] in
-   * the given [context].
-   */
-  static InferInstanceMembersInUnitTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new InferInstanceMembersInUnitTask(context, target);
-  }
-}
-
-/**
- * An abstract class that defines utility methods that are useful for tasks
- * operating on static variables.
- */
-abstract class InferStaticVariableTask extends ConstantEvaluationAnalysisTask {
-  InferStaticVariableTask(
-      InternalAnalysisContext context, VariableElement variable)
-      : super(context, variable);
-
-  /**
-   * Return the declaration of the target within the given compilation [unit].
-   * Throw an exception if the declaration cannot be found.
-   */
-  VariableDeclaration getDeclaration(CompilationUnit unit) {
-    VariableElement variable = target;
-    int offset = variable.nameOffset;
-    AstNode node = new NodeLocator2(offset).searchWithin(unit);
-    if (node == null) {
-      Source variableSource = variable.source;
-      Source unitSource =
-          resolutionMap.elementDeclaredByCompilationUnit(unit).source;
-      if (variableSource != unitSource) {
-        throw new AnalysisException(
-            "Failed to find the AST node for the variable "
-            "${variable.displayName} at $offset in $variableSource "
-            "because we were looking in $unitSource");
-      }
-      throw new AnalysisException(
-          "Failed to find the AST node for the variable "
-          "${variable.displayName} at $offset in $variableSource");
-    }
-    VariableDeclaration declaration =
-        node.thisOrAncestorOfType<VariableDeclaration>();
-    if (declaration == null || declaration.name != node) {
-      Source variableSource = variable.source;
-      Source unitSource =
-          resolutionMap.elementDeclaredByCompilationUnit(unit).source;
-      if (variableSource != unitSource) {
-        if (declaration == null) {
-          throw new AnalysisException(
-              "Failed to find the declaration of the variable "
-              "${variable.displayName} at $offset in $variableSource "
-              "because the node was not in a variable declaration "
-              "possibly because we were looking in $unitSource");
-        }
-        throw new AnalysisException(
-            "Failed to find the declaration of the variable "
-            "${variable.displayName} at $offset in $variableSource "
-            "because we were looking in $unitSource");
-      }
-      if (declaration == null) {
-        throw new AnalysisException(
-            "Failed to find the declaration of the variable "
-            "${variable.displayName} at $offset in $variableSource "
-            "because the node was not in a variable declaration");
-      }
-      throw new AnalysisException(
-          "Failed to find the declaration of the variable "
-          "${variable.displayName} at $offset in $variableSource "
-          "because the node was not the name in a variable declaration");
-    }
-    return declaration;
-  }
-}
-
-/**
- * A task that ensures that all of the inferable static variables in a
- * compilation unit have had their type inferred.
- */
-class InferStaticVariableTypesInUnitTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the input whose value is the [RESOLVED_UNIT8] for the
-   * compilation unit.
-   */
-  static const String UNIT_INPUT = 'UNIT_INPUT';
-
-  /**
-   * The name of the [STATIC_VARIABLE_RESOLUTION_ERRORS] for all static
-   * variables in the compilation unit.
-   */
-  static const String ERRORS_LIST_INPUT = 'INFERRED_VARIABLES_INPUT';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'InferStaticVariableTypesInUnitTask',
-      createTask,
-      buildInputs, <ResultDescriptor>[
-    CREATED_RESOLVED_UNIT8,
-    RESOLVED_UNIT8,
-    STATIC_VARIABLE_RESOLUTION_ERRORS_IN_UNIT
-  ]);
-
-  /**
-   * Initialize a newly created task to build a library element for the given
-   * [unit] in the given [context].
-   */
-  InferStaticVariableTypesInUnitTask(
-      InternalAnalysisContext context, LibrarySpecificUnit unit)
-      : super(context, unit);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    //
-    // Prepare inputs.
-    //
-    CompilationUnit unit = getRequiredInput(UNIT_INPUT);
-    List<List<AnalysisError>> errorLists = getRequiredInput(ERRORS_LIST_INPUT);
-    //
-    // Record outputs. There is no additional work to be done at this time
-    // because the work has implicitly been done by virtue of the task model
-    // preparing all of the inputs.
-    //
-    outputs[RESOLVED_UNIT8] = unit;
-    outputs[CREATED_RESOLVED_UNIT8] = true;
-    outputs[STATIC_VARIABLE_RESOLUTION_ERRORS_IN_UNIT] =
-        AnalysisError.mergeLists(errorLists);
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the given
-   * [libSource].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    LibrarySpecificUnit unit = target;
-    return <String, TaskInput>{
-      'inferredTypes': INFERABLE_STATIC_VARIABLES_IN_UNIT
-          .of(unit)
-          .toListOf(INFERRED_STATIC_VARIABLE),
-      ERRORS_LIST_INPUT: INFERABLE_STATIC_VARIABLES_IN_UNIT
-          .of(unit)
-          .toListOf(STATIC_VARIABLE_RESOLUTION_ERRORS),
-      UNIT_INPUT: RESOLVED_UNIT7.of(unit)
-    };
-  }
-
-  /**
-   * Create a [InferStaticVariableTypesInUnitTask] based on the given [target]
-   * in the given [context].
-   */
-  static InferStaticVariableTypesInUnitTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new InferStaticVariableTypesInUnitTask(context, target);
-  }
-}
-
-/**
- * A task that computes the type of an inferable static variable and
- * stores it in the element model.
- */
-class InferStaticVariableTypeTask extends InferStaticVariableTask {
-  /**
-   * The name of the input which ensures that dependent values have their type
-   * inferred before the target.
-   */
-  static const String DEPENDENCIES_INPUT = 'DEPENDENCIES_INPUT';
-
-  /**
-   * The name of the [TYPE_PROVIDER] input.
-   */
-  static const String TYPE_PROVIDER_INPUT = 'TYPE_PROVIDER_INPUT';
-
-  /**
-   * The name of the [RESOLVED_UNIT8] input.
-   */
-  static const String UNIT_INPUT = 'UNIT_INPUT';
-
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'InferStaticVariableTypeTask',
-      createTask,
-      buildInputs, <ResultDescriptor>[
-    INFERRED_STATIC_VARIABLE,
-    STATIC_VARIABLE_RESOLUTION_ERRORS
-  ]);
-
-  InferStaticVariableTypeTask(
-      InternalAnalysisContext context, VariableElement variable)
-      : super(context, variable);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  bool get handlesDependencyCycles => true;
-
-  @override
-  void internalPerform() {
-    //
-    // Prepare inputs.
-    //
-    // Note: DEPENDENCIES_INPUT is not needed.  It is merely a bookkeeping
-    // dependency to ensure that the variables that this variable references
-    // have types inferred before inferring the type of this variable.
-    //
-    VariableElementImpl variable = target;
-
-    CompilationUnit unit = getRequiredInput(UNIT_INPUT);
-    TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT);
-    var inheritance = new InheritanceManager2(context.typeSystem);
-
-    // If we're not in a dependency cycle, and we have no type annotation,
-    // re-resolve the right hand side and do inference.
-    List<AnalysisError> errors = AnalysisError.NO_ERRORS;
-    if (dependencyCycle == null && variable.hasImplicitType) {
-      VariableDeclaration declaration = getDeclaration(unit);
-      //
-      // Re-resolve the variable's initializer so that the inferred types
-      // of other variables will be propagated.
-      //
-      RecordingErrorListener errorListener = new RecordingErrorListener();
-      Expression initializer = declaration.initializer;
-
-      ResolutionContext resolutionContext =
-          ResolutionContextBuilder.contextFor(initializer);
-      ResolverVisitor visitor = new ResolverVisitor(inheritance,
-          variable.library, variable.source, typeProvider, errorListener,
-          nameScope: resolutionContext.scope);
-      if (resolutionContext.enclosingClassDeclaration != null) {
-        visitor.prepareToResolveMembersInClass(
-            resolutionContext.enclosingClassDeclaration);
-      }
-      initializer.accept(visitor);
-      DartType newType = initializer.staticType;
-      if (newType == null || newType.isBottom || newType.isDartCoreNull) {
-        newType = typeProvider.dynamicType;
-      }
-
-      //
-      // Record the type of the variable.
-      //
-      setFieldType(variable, newType);
-      errors = getUniqueErrors(errorListener.errors);
-    } else {
-      // TODO(brianwilkerson) For now we simply don't infer any type for
-      // variables or fields involved in a cycle. We could try to be smarter
-      // by re-resolving the initializer in a context in which the types of all
-      // of the variables in the cycle are assumed to be `null`, but it isn't
-      // clear to me that this would produce better results often enough to
-      // warrant the extra effort.
-    }
-    //
-    // Record outputs.
-    //
-    outputs[INFERRED_STATIC_VARIABLE] = variable;
-    outputs[STATIC_VARIABLE_RESOLUTION_ERRORS] = errors;
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the given
-   * [target].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    VariableElement variable = target;
-    LibrarySpecificUnit unit =
-        new LibrarySpecificUnit(variable.library.source, variable.source);
-    return <String, TaskInput>{
-      DEPENDENCIES_INPUT: INFERABLE_STATIC_VARIABLE_DEPENDENCIES
-          .of(variable)
-          .toListOf(INFERRED_STATIC_VARIABLE),
-      TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request),
-      UNIT_INPUT: RESOLVED_UNIT7.of(unit),
-      // In strong mode, add additional dependencies to enforce inference
-      // ordering.
-
-      // Require that full inference be complete for all dependencies of the
-      // current library cycle.
-      'orderLibraryCycles': LIBRARY_CYCLE_DEPENDENCIES
-          .of(unit.library)
-          .toListOf(CREATED_RESOLVED_UNIT10)
-    };
-  }
-
-  /**
-   * Create a [InferStaticVariableTypeTask] based on the given [target] in the
-   * given [context].
-   */
-  static InferStaticVariableTypeTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new InferStaticVariableTypeTask(context, target);
-  }
-}
-
-/**
- * A task computes all of the errors of all of the units for a single
- * library source and sets the [LIBRARY_ERRORS_READY] flag.
- */
-class LibraryErrorsReadyTask extends SourceBasedAnalysisTask {
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'LibraryErrorsReadyTask',
-      createTask,
-      buildInputs,
-      <ResultDescriptor>[LIBRARY_ERRORS_READY]);
-
-  LibraryErrorsReadyTask(InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    outputs[LIBRARY_ERRORS_READY] = true;
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the
-   * given [target].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    Source source = target;
-    return <String, TaskInput>{
-      'allErrors': UNITS.of(source).toListOf(DART_ERRORS),
-      'libraryElement': LIBRARY_ELEMENT.of(source)
-    };
-  }
-
-  /**
-   * Create a [LibraryErrorsReadyTask] based on the given [target] in the given
-   * [context].
-   */
-  static LibraryErrorsReadyTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new LibraryErrorsReadyTask(context, target);
-  }
-}
-
-/**
- * A task that merges all of the errors for a single source into a single list
- * of errors.
- */
-class LibraryUnitErrorsTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the [BUILD_DIRECTIVES_ERRORS] input.
-   */
-  static const String BUILD_DIRECTIVES_ERRORS_INPUT = 'BUILD_DIRECTIVES_ERRORS';
-
-  /**
-   * The name of the [BUILD_LIBRARY_ERRORS] input.
-   */
-  static const String BUILD_LIBRARY_ERRORS_INPUT = 'BUILD_LIBRARY_ERRORS';
-
-  /**
-   * The name of the [HINTS] input.
-   */
-  static const String HINTS_INPUT = 'HINTS';
-
-  /**
-   * The name of the [LINTS] input.
-   */
-  static const String LINTS_INPUT = 'LINTS';
-
-  /**
-   * The name of the [STATIC_VARIABLE_RESOLUTION_ERRORS_IN_UNIT] input.
-   */
-  static const String STATIC_VARIABLE_RESOLUTION_ERRORS_INPUT =
-      'STATIC_VARIABLE_RESOLUTION_ERRORS_INPUT';
-
-  /**
-   * The name of the [RESOLVE_DIRECTIVES_ERRORS] input.
-   */
-  static const String RESOLVE_DIRECTIVES_ERRORS_INPUT =
-      'RESOLVE_DIRECTIVES_ERRORS';
-
-  /**
-   * The name of the [STRONG_MODE_ERRORS] input.
-   */
-  static const String STRONG_MODE_ERRORS_INPUT = 'STRONG_MODE_ERRORS';
-
-  /**
-   * The name of the [RESOLVE_TYPE_NAMES_ERRORS] input.
-   */
-  static const String RESOLVE_TYPE_NAMES_ERRORS_INPUT =
-      'RESOLVE_TYPE_NAMES_ERRORS';
-
-  /**
-   * The name of the [RESOLVE_TYPE_BOUNDS_ERRORS] input.
-   */
-  static const String RESOLVE_TYPE_NAMES_ERRORS2_INPUT =
-      'RESOLVE_TYPE_NAMES_ERRORS2';
-
-  /**
-   * The name of the [RESOLVE_UNIT_ERRORS] input.
-   */
-  static const String RESOLVE_UNIT_ERRORS_INPUT = 'RESOLVE_UNIT_ERRORS';
-
-  /**
-   * The name of the [VARIABLE_REFERENCE_ERRORS] input.
-   */
-  static const String VARIABLE_REFERENCE_ERRORS_INPUT =
-      'VARIABLE_REFERENCE_ERRORS';
-
-  /**
-   * The name of the [VERIFY_ERRORS] input.
-   */
-  static const String VERIFY_ERRORS_INPUT = 'VERIFY_ERRORS';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'LibraryUnitErrorsTask',
-      createTask,
-      buildInputs,
-      <ResultDescriptor>[LIBRARY_UNIT_ERRORS]);
-
-  LibraryUnitErrorsTask(InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    //
-    // Prepare inputs.
-    //
-    List<List<AnalysisError>> errorLists = <List<AnalysisError>>[];
-    errorLists.add(getRequiredInput(BUILD_DIRECTIVES_ERRORS_INPUT));
-    errorLists.add(getRequiredInput(BUILD_LIBRARY_ERRORS_INPUT));
-    errorLists.add(getRequiredInput(HINTS_INPUT));
-    errorLists.add(getRequiredInput(LINTS_INPUT));
-    errorLists.add(getRequiredInput(RESOLVE_DIRECTIVES_ERRORS_INPUT));
-    errorLists.add(getRequiredInput(RESOLVE_TYPE_NAMES_ERRORS_INPUT));
-    errorLists.add(getRequiredInput(RESOLVE_TYPE_NAMES_ERRORS2_INPUT));
-    errorLists.add(getRequiredInput(RESOLVE_UNIT_ERRORS_INPUT));
-    errorLists.add(getRequiredInput(STATIC_VARIABLE_RESOLUTION_ERRORS_INPUT));
-    errorLists.add(getRequiredInput(STRONG_MODE_ERRORS_INPUT));
-    errorLists.add(getRequiredInput(VARIABLE_REFERENCE_ERRORS_INPUT));
-    errorLists.add(getRequiredInput(VERIFY_ERRORS_INPUT));
-    //
-    // Record outputs.
-    //
-    outputs[LIBRARY_UNIT_ERRORS] = AnalysisError.mergeLists(errorLists);
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the
-   * given [unit].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    LibrarySpecificUnit unit = target;
-    Map<String, TaskInput> inputs = <String, TaskInput>{
-      HINTS_INPUT: HINTS.of(unit),
-      LINTS_INPUT: LINTS.of(unit),
-      RESOLVE_DIRECTIVES_ERRORS_INPUT: RESOLVE_DIRECTIVES_ERRORS.of(unit),
-      RESOLVE_TYPE_NAMES_ERRORS_INPUT: RESOLVE_TYPE_NAMES_ERRORS.of(unit),
-      RESOLVE_TYPE_NAMES_ERRORS2_INPUT: RESOLVE_TYPE_BOUNDS_ERRORS.of(unit),
-      RESOLVE_UNIT_ERRORS_INPUT: RESOLVE_UNIT_ERRORS.of(unit),
-      STATIC_VARIABLE_RESOLUTION_ERRORS_INPUT:
-          STATIC_VARIABLE_RESOLUTION_ERRORS_IN_UNIT.of(unit),
-      STRONG_MODE_ERRORS_INPUT: STRONG_MODE_ERRORS.of(unit),
-      VARIABLE_REFERENCE_ERRORS_INPUT: VARIABLE_REFERENCE_ERRORS.of(unit),
-      VERIFY_ERRORS_INPUT: VERIFY_ERRORS.of(unit)
-    };
-    Source source = unit.source;
-    if (unit.library == source) {
-      inputs[BUILD_DIRECTIVES_ERRORS_INPUT] =
-          BUILD_DIRECTIVES_ERRORS.of(source);
-      inputs[BUILD_LIBRARY_ERRORS_INPUT] = BUILD_LIBRARY_ERRORS.of(source);
-    } else {
-      inputs[BUILD_DIRECTIVES_ERRORS_INPUT] =
-          new ConstantTaskInput(AnalysisError.NO_ERRORS);
-      inputs[BUILD_LIBRARY_ERRORS_INPUT] =
-          new ConstantTaskInput(AnalysisError.NO_ERRORS);
-    }
-    return inputs;
-  }
-
-  /**
-   * Create a [LibraryUnitErrorsTask] based on the given [target] in the given
-   * [context].
-   */
-  static LibraryUnitErrorsTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new LibraryUnitErrorsTask(context, target);
-  }
-}
-
-/**
- * A task that parses the content of a Dart file, producing an AST structure,
- * any lexical errors found in the process, the kind of the file (library or
- * part), and several lists based on the AST.
- */
-class ParseDartTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the input whose value is the line information produced for the
-   * file.
-   */
-  static const String LINE_INFO_INPUT_NAME = 'LINE_INFO_INPUT_NAME';
-
-  /**
-   * The name of the input whose value is the modification time of the file.
-   */
-  static const String MODIFICATION_TIME_INPUT_NAME =
-      'MODIFICATION_TIME_INPUT_NAME';
-
-  /**
-   * The name of the input whose value is the token stream produced for the file.
-   */
-  static const String TOKEN_STREAM_INPUT_NAME = 'TOKEN_STREAM_INPUT_NAME';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ParseDartTask', createTask, buildInputs, <ResultDescriptor>[
-    EXPLICITLY_IMPORTED_LIBRARIES,
-    EXPORTED_LIBRARIES,
-    IMPORTED_LIBRARIES,
-    INCLUDED_PARTS,
-    LIBRARY_SPECIFIC_UNITS,
-    PARSE_ERRORS,
-    PARSED_UNIT,
-    REFERENCED_SOURCES,
-    SOURCE_KIND,
-    UNITS,
-  ]);
-
-  /**
-   * The source that is being parsed.
-   */
-  Source _source;
-
-  /**
-   * The [ErrorReporter] to report errors to.
-   */
-  ErrorReporter _errorReporter;
-
-  /**
-   * Initialize a newly created task to parse the content of the Dart file
-   * associated with the given [target] in the given [context].
-   */
-  ParseDartTask(InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    _source = getRequiredSource();
-    LineInfo lineInfo = getRequiredInput(LINE_INFO_INPUT_NAME);
-    int modificationTime = getRequiredInput(MODIFICATION_TIME_INPUT_NAME);
-    Token tokenStream = getRequiredInput(TOKEN_STREAM_INPUT_NAME);
-
-    RecordingErrorListener errorListener = new RecordingErrorListener();
-    _errorReporter = new ErrorReporter(errorListener, _source);
-
-    AnalysisOptions options = context.analysisOptions;
-    Parser parser =
-        new Parser(_source, errorListener, useFasta: options.useFastaParser);
-    parser.parseFunctionBodies =
-        options.analyzeFunctionBodiesPredicate(_source);
-    parser.enableOptionalNewAndConst = true;
-    CompilationUnit unit = parser.parseCompilationUnit(tokenStream);
-    unit.lineInfo = lineInfo;
-
-    if (options.patchPaths.isNotEmpty && _source.uri.scheme == 'dart') {
-      var resourceProvider =
-          (context.sourceFactory.dartSdk as FolderBasedDartSdk)
-              .resourceProvider;
-      new SdkPatcher().patch(resourceProvider,
-          context.analysisOptions.patchPaths, errorListener, _source, unit);
-    }
-
-    bool hasNonPartOfDirective = false;
-    bool hasPartOfDirective = false;
-    HashSet<Source> explicitlyImportedSourceSet = new HashSet<Source>();
-    HashSet<Source> exportedSourceSet = new HashSet<Source>();
-    HashSet<Source> includedSourceSet = new HashSet<Source>();
-    NodeList<Directive> directives = unit.directives;
-    int length = directives.length;
-    for (int i = 0; i < length; i++) {
-      Directive directive = directives[i];
-      if (directive is PartOfDirective) {
-        hasPartOfDirective = true;
-      } else {
-        hasNonPartOfDirective = true;
-        if (directive is UriBasedDirective) {
-          Source referencedSource = _resolveDirective(directive);
-          if (referencedSource != null) {
-            if (directive is ExportDirective) {
-              exportedSourceSet.add(referencedSource);
-            } else if (directive is ImportDirective) {
-              explicitlyImportedSourceSet.add(referencedSource);
-            } else if (directive is PartDirective) {
-              includedSourceSet.add(referencedSource);
-            } else {
-              throw new AnalysisException(
-                  '$runtimeType failed to handle a ${directive.runtimeType}');
-            }
-          }
-        }
-      }
-    }
-    //
-    // Always include "dart:core" source.
-    //
-    HashSet<Source> importedSourceSet =
-        new HashSet.from(explicitlyImportedSourceSet);
-    Source coreLibrarySource = context.sourceFactory.forUri(DartSdk.DART_CORE);
-    if (coreLibrarySource == null) {
-      String message;
-      DartSdk sdk = context.sourceFactory.dartSdk;
-      if (sdk == null) {
-        message = 'Could not resolve "dart:core": SDK not defined';
-      } else {
-        message = 'Could not resolve "dart:core": SDK incorrectly configured';
-      }
-      throw new AnalysisException(message);
-    }
-    importedSourceSet.add(coreLibrarySource);
-    //
-    // Compute kind.
-    //
-    SourceKind sourceKind = SourceKind.LIBRARY;
-    if (modificationTime == -1) {
-      sourceKind = SourceKind.UNKNOWN;
-    } else if (hasPartOfDirective && !hasNonPartOfDirective) {
-      sourceKind = SourceKind.PART;
-    }
-    //
-    // Compute source lists.
-    //
-    List<Source> explicitlyImportedSources =
-        explicitlyImportedSourceSet.toList();
-    List<Source> exportedSources = exportedSourceSet.toList();
-    List<Source> importedSources = importedSourceSet.toList();
-    List<Source> includedSources = includedSourceSet.toList();
-    List<Source> unitSources = <Source>[_source]..addAll(includedSourceSet);
-    List<LibrarySpecificUnit> librarySpecificUnits =
-        unitSources.map((s) => new LibrarySpecificUnit(_source, s)).toList();
-    //
-    // Compute referenced sources.
-    //
-    Set<Source> referencedSources = new Set<Source>();
-    referencedSources.add(coreLibrarySource);
-    referencedSources.addAll(unitSources);
-    for (Directive directive in unit.directives) {
-      if (directive is NamespaceDirective) {
-        referencedSources.add(directive.uriSource);
-        for (Configuration configuration in directive.configurations) {
-          referencedSources.add(configuration.uriSource);
-        }
-      }
-    }
-    referencedSources.removeWhere((source) => source == null);
-    //
-    // Record outputs.
-    //
-    List<AnalysisError> parseErrors = getUniqueErrors(errorListener.errors);
-    outputs[EXPLICITLY_IMPORTED_LIBRARIES] = explicitlyImportedSources;
-    outputs[EXPORTED_LIBRARIES] = exportedSources;
-    outputs[IMPORTED_LIBRARIES] = importedSources;
-    outputs[INCLUDED_PARTS] = includedSources;
-    outputs[LIBRARY_SPECIFIC_UNITS] = librarySpecificUnits;
-    outputs[PARSE_ERRORS] = parseErrors;
-    outputs[PARSED_UNIT] = unit;
-    outputs[REFERENCED_SOURCES] = referencedSources.toList();
-    outputs[SOURCE_KIND] = sourceKind;
-    outputs[UNITS] = unitSources;
-  }
-
-  /**
-   * Return the result of resolving the URI of the given URI-based [directive]
-   * against the URI of the given library, or `null` if the URI is not valid.
-   */
-  Source _resolveDirective(UriBasedDirective directive) {
-    bool isImport = directive is ImportDirective;
-
-    // Resolve the default URI.
-    Source defaultSource;
-    {
-      StringLiteral uriLiteral = directive.uri;
-      String uriContent = uriLiteral.stringValue;
-      if (uriContent != null) {
-        uriContent = uriContent.trim();
-        directive.uriContent = uriContent;
-      }
-      defaultSource = _resolveUri(isImport, uriLiteral, uriContent);
-      directive.uriSource = defaultSource;
-    }
-
-    // Resolve all configurations and try to choose one.
-    if (directive is NamespaceDirectiveImpl) {
-      String configuredUriContent;
-      Source configuredSource;
-      for (Configuration configuration in directive.configurations) {
-        String uriContent = configuration.uri.stringValue;
-        Source source = _resolveUri(isImport, configuration.uri, uriContent);
-        configuration.uriSource = source;
-        if (configuredSource == null) {
-          String variableName =
-              configuration.name.components.map((i) => i.name).join('.');
-          String variableValue = context.declaredVariables.get(variableName);
-          if (configuration.value != null &&
-                  variableValue == configuration.value.stringValue ||
-              variableValue == 'true') {
-            configuredUriContent = configuration.uri.stringValue;
-            configuredSource = source;
-          }
-        }
-      }
-      String selectedContentUri = configuredUriContent ?? directive.uriContent;
-      Source selectedSource = configuredSource ?? defaultSource;
-      directive.selectedUriContent = selectedContentUri;
-      directive.selectedSource = selectedSource;
-      return selectedSource;
-    }
-    return defaultSource;
-  }
-
-  /**
-   * Return the result of resolve the given [uriContent], reporting errors
-   * against the [uriLiteral].
-   */
-  Source _resolveUri(
-      bool isImport, StringLiteral uriLiteral, String uriContent) {
-    UriValidationCode code =
-        UriBasedDirectiveImpl.validateUri(isImport, uriLiteral, uriContent);
-    if (code == null) {
-      try {
-        Uri.parse(uriContent);
-      } on FormatException {
-        return null;
-      }
-      return context.sourceFactory.resolveUri(_source, uriContent);
-    } else if (code == UriValidationCode.URI_WITH_DART_EXT_SCHEME) {
-      return null;
-    } else if (code == UriValidationCode.URI_WITH_INTERPOLATION) {
-      _errorReporter.reportErrorForNode(
-          CompileTimeErrorCode.URI_WITH_INTERPOLATION, uriLiteral);
-      return null;
-    } else if (code == UriValidationCode.INVALID_URI) {
-      _errorReporter.reportErrorForNode(
-          CompileTimeErrorCode.INVALID_URI, uriLiteral, [uriContent]);
-      return null;
-    }
-    throw new AnalysisException('Failed to handle validation code: $code');
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the given
-   * [target].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    return <String, TaskInput>{
-      LINE_INFO_INPUT_NAME: LINE_INFO.of(target),
-      MODIFICATION_TIME_INPUT_NAME: MODIFICATION_TIME.of(target),
-      TOKEN_STREAM_INPUT_NAME: TOKEN_STREAM.of(target, flushOnAccess: true)
-    };
-  }
-
-  /**
-   * Create a [ParseDartTask] based on the given [target] in the given
-   * [context].
-   */
-  static ParseDartTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new ParseDartTask(context, target);
-  }
-}
-
-/**
- * A task that builds [RESOLVED_UNIT7] for a unit.
- */
-class PartiallyResolveUnitReferencesTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the [LIBRARY_ELEMENT6] input.
-   */
-  static const String LIBRARY_INPUT = 'LIBRARY_INPUT';
-
-  /**
-   * The name of the [RESOLVED_UNIT6] input.
-   */
-  static const String UNIT_INPUT = 'UNIT_INPUT';
-
-  /**
-   * The name of the [TYPE_PROVIDER] input.
-   */
-  static const String TYPE_PROVIDER_INPUT = 'TYPE_PROVIDER_INPUT';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'PartiallyResolveUnitReferencesTask',
-      createTask,
-      buildInputs, <ResultDescriptor>[
-    INFERABLE_STATIC_VARIABLES_IN_UNIT,
-    CREATED_RESOLVED_UNIT7,
-    RESOLVED_UNIT7
-  ]);
-
-  PartiallyResolveUnitReferencesTask(
-      InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    //
-    // Prepare inputs.
-    //
-    LibraryElement libraryElement = getRequiredInput(LIBRARY_INPUT);
-    CompilationUnit unit = getRequiredInput(UNIT_INPUT);
-    CompilationUnitElement unitElement = unit.declaredElement;
-    TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT);
-    var inheritance = new InheritanceManager2(context.typeSystem);
-    //
-    // Resolve references and record outputs.
-    //
-    PartialResolverVisitor visitor = new PartialResolverVisitor(
-        inheritance,
-        libraryElement,
-        unitElement.source,
-        typeProvider,
-        AnalysisErrorListener.NULL_LISTENER);
-    unit.accept(visitor);
-    //
-    // Record outputs.
-    //
-    outputs[INFERABLE_STATIC_VARIABLES_IN_UNIT] = visitor.staticVariables;
-    outputs[RESOLVED_UNIT7] = unit;
-    outputs[CREATED_RESOLVED_UNIT7] = true;
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the
-   * given [target].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    LibrarySpecificUnit unit = target;
-    return <String, TaskInput>{
-      'fullyBuiltLibraryElements': READY_LIBRARY_ELEMENT6.of(unit.library),
-      LIBRARY_INPUT: LIBRARY_ELEMENT6.of(unit.library),
-      UNIT_INPUT: RESOLVED_UNIT6.of(unit),
-      TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request),
-      // In strong mode, add additional dependencies to enforce inference
-      // ordering.
-
-      // Require that full inference be complete for all dependencies of the
-      // current library cycle.
-      'orderLibraryCycles': LIBRARY_CYCLE_DEPENDENCIES
-          .of(unit.library)
-          .toListOf(CREATED_RESOLVED_UNIT10)
-    };
-  }
-
-  /**
-   * Create a [PartiallyResolveUnitReferencesTask] based on the given [target]
-   * in the given [context].
-   */
-  static PartiallyResolveUnitReferencesTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new PartiallyResolveUnitReferencesTask(context, target);
-  }
-}
-
-/**
- * A task that ensures that [LIBRARY_ELEMENT2] is ready for the target library
- * source and its import/export closure.
- */
-class ReadyLibraryElement2Task extends SourceBasedAnalysisTask {
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ReadyLibraryElement2Task',
-      createTask,
-      buildInputs,
-      <ResultDescriptor>[READY_LIBRARY_ELEMENT2]);
-
-  ReadyLibraryElement2Task(
-      InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  bool get handlesDependencyCycles => true;
-
-  @override
-  void internalPerform() {
-    outputs[READY_LIBRARY_ELEMENT2] = true;
-  }
-
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    Source source = target;
-    return <String, TaskInput>{
-      'thisLibraryElementReady': LIBRARY_ELEMENT2.of(source),
-      'directlyImportedLibrariesReady':
-          IMPORTED_LIBRARIES.of(source).toListOf(READY_LIBRARY_ELEMENT2),
-      'directlyExportedLibrariesReady':
-          EXPORTED_LIBRARIES.of(source).toListOf(READY_LIBRARY_ELEMENT2),
-    };
-  }
-
-  static ReadyLibraryElement2Task createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new ReadyLibraryElement2Task(context, target);
-  }
-}
-
-/**
- * A task that ensures that [LIBRARY_ELEMENT6] is ready for the target library
- * source and its import/export closure.
- */
-class ReadyLibraryElement5Task extends SourceBasedAnalysisTask {
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ReadyLibraryElement5Task',
-      createTask,
-      buildInputs,
-      <ResultDescriptor>[READY_LIBRARY_ELEMENT6]);
-
-  ReadyLibraryElement5Task(
-      InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  bool get handlesDependencyCycles => true;
-
-  @override
-  void internalPerform() {
-    outputs[READY_LIBRARY_ELEMENT6] = true;
-  }
-
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    Source source = target;
-    return <String, TaskInput>{
-      'thisLibraryElementReady': LIBRARY_ELEMENT6.of(source),
-      'directlyImportedLibrariesReady':
-          IMPORTED_LIBRARIES.of(source).toListOf(READY_LIBRARY_ELEMENT6),
-      'directlyExportedLibrariesReady':
-          EXPORTED_LIBRARIES.of(source).toListOf(READY_LIBRARY_ELEMENT6),
-    };
-  }
-
-  static ReadyLibraryElement5Task createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new ReadyLibraryElement5Task(context, target);
-  }
-}
-
-/**
- * A task that ensures that [LIBRARY_ELEMENT7] is ready for the target library
- * source and its import/export closure.
- */
-class ReadyLibraryElement7Task extends SourceBasedAnalysisTask {
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ReadyLibraryElement7Task',
-      createTask,
-      buildInputs,
-      <ResultDescriptor>[READY_LIBRARY_ELEMENT7]);
-
-  ReadyLibraryElement7Task(
-      InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  bool get handlesDependencyCycles => true;
-
-  @override
-  void internalPerform() {
-    outputs[READY_LIBRARY_ELEMENT7] = true;
-  }
-
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    Source source = target;
-    return <String, TaskInput>{
-      'thisLibraryElementReady': LIBRARY_ELEMENT7.of(source),
-      'directlyImportedLibrariesReady':
-          IMPORTED_LIBRARIES.of(source).toListOf(READY_LIBRARY_ELEMENT7),
-      'directlyExportedLibrariesReady':
-          EXPORTED_LIBRARIES.of(source).toListOf(READY_LIBRARY_ELEMENT7),
-    };
-  }
-
-  static ReadyLibraryElement7Task createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new ReadyLibraryElement7Task(context, target);
-  }
-}
-
-/**
- * A task that ensures that [RESOLVED_UNIT] is ready for every unit of the
- * target library source and its import/export closure.
- */
-class ReadyResolvedUnitTask extends SourceBasedAnalysisTask {
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ReadyResolvedUnitTask',
-      createTask,
-      buildInputs,
-      <ResultDescriptor>[READY_RESOLVED_UNIT]);
-
-  ReadyResolvedUnitTask(InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  bool get handlesDependencyCycles => true;
-
-  @override
-  void internalPerform() {
-    outputs[READY_RESOLVED_UNIT] = true;
-  }
-
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    Source source = target;
-    return <String, TaskInput>{
-      'thisLibraryUnitsReady':
-          LIBRARY_SPECIFIC_UNITS.of(source).toListOf(RESOLVED_UNIT),
-    };
-  }
-
-  static ReadyResolvedUnitTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new ReadyResolvedUnitTask(context, target);
-  }
-}
-
-/**
- * A task that ensures that the expression AST for a constant is resolved and
- * sets the [CONSTANT_EXPRESSION_RESOLVED] result.
- */
-class ResolveConstantExpressionTask extends ConstantEvaluationAnalysisTask {
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ResolveConstantExpressionTask',
-      createTask,
-      buildInputs,
-      <ResultDescriptor>[CONSTANT_EXPRESSION_RESOLVED]);
-
-  ResolveConstantExpressionTask(
-      InternalAnalysisContext context, ConstantEvaluationTarget constant)
-      : super(context, constant);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    //
-    // Record outputs.
-    //
-    outputs[CONSTANT_EXPRESSION_RESOLVED] = true;
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the
-   * given [target].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    Source librarySource;
-    if (target is Element) {
-      CompilationUnitElementImpl unit = target
-          .getAncestor((Element element) => element is CompilationUnitElement);
-      librarySource = unit.librarySource;
-    } else if (target is ElementAnnotationImpl) {
-      librarySource = target.librarySource;
-    } else {
-      throw new AnalysisException(
-          'Cannot build inputs for a ${target.runtimeType}');
-    }
-    return <String, TaskInput>{
-      'createdResolvedUnit': CREATED_RESOLVED_UNIT11
-          .of(new LibrarySpecificUnit(librarySource, target.source))
-    };
-  }
-
-  /**
-   * Create a [ResolveConstantExpressionTask] based on the given [target] in
-   * the given [context].
-   */
-  static ResolveConstantExpressionTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new ResolveConstantExpressionTask(context, target);
-  }
-}
-
-/**
- * A task that resolves imports and export directives to already built elements.
- */
-class ResolveDirectiveElementsTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the input whose value is the defining [LIBRARY_ELEMENT2].
-   */
-  static const String LIBRARY_INPUT = 'LIBRARY_INPUT';
-
-  /**
-   * The name of the input for [RESOLVED_UNIT1] of a unit.
-   */
-  static const String UNIT_INPUT = 'UNIT_INPUT';
-
-  static const String SOURCES_MODIFICATION_TIME_INPUT =
-      'SOURCES_MODIFICATION_TIME_INPUT';
-  static const String IMPORTS_SOURCE_KIND_INPUT = 'IMPORTS_SOURCE_KIND_INPUT';
-  static const String EXPORTS_SOURCE_KIND_INPUT = 'EXPORTS_SOURCE_KIND_INPUT';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ResolveDirectiveElementsTask',
-      createTask,
-      buildInputs, <ResultDescriptor>[
-    CREATED_RESOLVED_UNIT2,
-    RESOLVED_UNIT2,
-    RESOLVE_DIRECTIVES_ERRORS
-  ]);
-
-  ResolveDirectiveElementsTask(
-      InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    LibrarySpecificUnit targetUnit = target;
-    //
-    // Prepare inputs.
-    //
-    CompilationUnit unit = getRequiredInput(UNIT_INPUT);
-    Map<Source, int> sourceModificationTimeMap =
-        getRequiredInput(SOURCES_MODIFICATION_TIME_INPUT);
-    Map<Source, SourceKind> importSourceKindMap =
-        getRequiredInput(IMPORTS_SOURCE_KIND_INPUT);
-    Map<Source, SourceKind> exportSourceKindMap =
-        getRequiredInput(EXPORTS_SOURCE_KIND_INPUT);
-    //
-    // Resolve directive AST nodes to elements.
-    //
-    List<AnalysisError> errors = const <AnalysisError>[];
-    if (targetUnit.unit == targetUnit.library) {
-      DirectiveResolver resolver = new DirectiveResolver(
-          sourceModificationTimeMap, importSourceKindMap, exportSourceKindMap);
-      unit.accept(resolver);
-      errors = resolver.errors;
-    }
-    //
-    // Record outputs.
-    //
-    outputs[CREATED_RESOLVED_UNIT2] = true;
-    outputs[RESOLVED_UNIT2] = unit;
-    outputs[RESOLVE_DIRECTIVES_ERRORS] = errors;
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the
-   * given [target].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    LibrarySpecificUnit unit = target;
-    return <String, TaskInput>{
-      LIBRARY_INPUT: LIBRARY_ELEMENT2.of(unit.library),
-      UNIT_INPUT: RESOLVED_UNIT1.of(unit),
-      SOURCES_MODIFICATION_TIME_INPUT:
-          REFERENCED_SOURCES.of(unit.library).toMapOf(MODIFICATION_TIME),
-      IMPORTS_SOURCE_KIND_INPUT:
-          IMPORTED_LIBRARIES.of(unit.library).toMapOf(SOURCE_KIND),
-      EXPORTS_SOURCE_KIND_INPUT:
-          EXPORTED_LIBRARIES.of(unit.library).toMapOf(SOURCE_KIND)
-    };
-  }
-
-  /**
-   * Create a [ResolveDirectiveElementsTask] based on the given [target] in
-   * the given [context].
-   */
-  static ResolveDirectiveElementsTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new ResolveDirectiveElementsTask(context, target);
-  }
-}
-
-/**
- * An artificial task that does nothing except to force [LIBRARY_ELEMENT7] for
- * the target library and its import/export closure.
- */
-class ResolvedUnit7InLibraryClosureTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the [LIBRARY_ELEMENT7] input.
-   */
-  static const String LIBRARY_INPUT = 'LIBRARY_INPUT';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ResolvedUnit7InLibraryClosureTask',
-      createTask,
-      buildInputs,
-      <ResultDescriptor>[LIBRARY_ELEMENT8]);
-
-  ResolvedUnit7InLibraryClosureTask(
-      InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    LibraryElement library = getRequiredInput(LIBRARY_INPUT);
-    outputs[LIBRARY_ELEMENT8] = library;
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the
-   * given [target].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    Source source = target;
-    return <String, TaskInput>{
-      'readyForClosure': READY_LIBRARY_ELEMENT7.of(source),
-      LIBRARY_INPUT: LIBRARY_ELEMENT7.of(source),
-    };
-  }
-
-  /**
-   * Create a [ResolvedUnit7InLibraryClosureTask] based on the given
-   * [target] in the given [context].
-   */
-  static ResolvedUnit7InLibraryClosureTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new ResolvedUnit7InLibraryClosureTask(context, target);
-  }
-}
-
-/**
- * An artificial task that does nothing except to force [LIBRARY_ELEMENT6] and
- * [RESOLVED_UNIT7] in the defining and part units of a library.
- */
-class ResolvedUnit7InLibraryTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the [LIBRARY_ELEMENT6] input.
-   */
-  static const String LIBRARY_INPUT = 'LIBRARY_INPUT';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ResolvedUnit7InLibraryTask',
-      createTask,
-      buildInputs,
-      <ResultDescriptor>[LIBRARY_ELEMENT7]);
-
-  ResolvedUnit7InLibraryTask(
-      InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    LibraryElement library = getRequiredInput(LIBRARY_INPUT);
-    outputs[LIBRARY_ELEMENT7] = library;
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the
-   * given [target].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    Source source = target;
-    return <String, TaskInput>{
-      'resolvedUnits':
-          LIBRARY_SPECIFIC_UNITS.of(source).toListOf(RESOLVED_UNIT7),
-      LIBRARY_INPUT: LIBRARY_ELEMENT6.of(source),
-    };
-  }
-
-  /**
-   * Create a [ResolvedUnit7InLibraryTask] based on the given [target]
-   * in the given [context].
-   */
-  static ResolvedUnit7InLibraryTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new ResolvedUnit7InLibraryTask(context, target);
-  }
-}
-
-/**
- * A task that ensures that all of the inferable instance members in a
- * compilation unit have had their right hand sides re-resolved
- */
-class ResolveInstanceFieldsInUnitTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the [LIBRARY_ELEMENT6] input.
-   */
-  static const String LIBRARY_INPUT = 'LIBRARY_INPUT';
-
-  /**
-   * The name of the [TYPE_PROVIDER] input.
-   */
-  static const String TYPE_PROVIDER_INPUT = 'TYPE_PROVIDER_INPUT';
-
-  /**
-   * The name of the input whose value is the [RESOLVED_UNIT8] for the
-   * compilation unit.
-   */
-  static const String UNIT_INPUT = 'UNIT_INPUT';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ResolveInstanceFieldsInUnitTask',
-      createTask,
-      buildInputs,
-      <ResultDescriptor>[CREATED_RESOLVED_UNIT9, RESOLVED_UNIT9]);
-
-  /**
-   * Initialize a newly created task to build a library element for the given
-   * [unit] in the given [context].
-   */
-  ResolveInstanceFieldsInUnitTask(
-      InternalAnalysisContext context, LibrarySpecificUnit unit)
-      : super(context, unit);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    //
-    // Prepare inputs.
-    //
-    LibraryElement libraryElement = getRequiredInput(LIBRARY_INPUT);
-    CompilationUnit unit = getRequiredInput(UNIT_INPUT);
-    TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT);
-    var inheritance = new InheritanceManager2(context.typeSystem);
-
-    CompilationUnitElement unitElement = unit.declaredElement;
-    //
-    // Resolve references.
-    //
-    InstanceFieldResolverVisitor visitor = new InstanceFieldResolverVisitor(
-        inheritance,
-        libraryElement,
-        unitElement.source,
-        typeProvider,
-        AnalysisErrorListener.NULL_LISTENER);
-    visitor.resolveCompilationUnit(unit);
-    //
-    // Record outputs.
-    //
-    outputs[RESOLVED_UNIT9] = unit;
-    outputs[CREATED_RESOLVED_UNIT9] = true;
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the given
-   * [libSource].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    LibrarySpecificUnit unit = target;
-    return <String, TaskInput>{
-      UNIT_INPUT: RESOLVED_UNIT8.of(unit),
-      LIBRARY_INPUT: LIBRARY_ELEMENT6.of(unit.library),
-      TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request),
-      // In strong mode, add additional dependencies to enforce inference
-      // ordering.
-
-      // Require that static variable inference  be complete for all units in
-      // the current library cycle.
-      'orderLibraryCycleTasks':
-          LIBRARY_CYCLE_UNITS.of(unit.library).toListOf(CREATED_RESOLVED_UNIT8),
-      // Require that full inference be complete for all dependencies of the
-      // current library cycle.
-      'orderLibraryCycles': LIBRARY_CYCLE_DEPENDENCIES
-          .of(unit.library)
-          .toListOf(CREATED_RESOLVED_UNIT10)
-    };
-  }
-
-  /**
-   * Create a [ResolveInstanceFieldsInUnitTask] based on the given [target] in
-   * the given [context].
-   */
-  static ResolveInstanceFieldsInUnitTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new ResolveInstanceFieldsInUnitTask(context, target);
-  }
-}
-
-/**
- * A task that finishes resolution by requesting [RESOLVED_UNIT11] for every
- * unit in the libraries closure and produces [LIBRARY_ELEMENT9].
- */
-class ResolveLibraryReferencesTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the [LIBRARY_ELEMENT8] input.
-   */
-  static const String LIBRARY_INPUT = 'LIBRARY_INPUT';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ResolveLibraryReferencesTask',
-      createTask,
-      buildInputs,
-      <ResultDescriptor>[LIBRARY_ELEMENT9]);
-
-  ResolveLibraryReferencesTask(
-      InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    LibraryElement library = getRequiredInput(LIBRARY_INPUT);
-    outputs[LIBRARY_ELEMENT9] = library;
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the
-   * given [target].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    Source source = target;
-    return <String, TaskInput>{
-      LIBRARY_INPUT: LIBRARY_ELEMENT8.of(source),
-      'resolvedUnits':
-          LIBRARY_SPECIFIC_UNITS.of(source).toListOf(RESOLVED_UNIT11),
-    };
-  }
-
-  /**
-   * Create a [ResolveLibraryReferencesTask] based on the given [target] in
-   * the given [context].
-   */
-  static ResolveLibraryReferencesTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new ResolveLibraryReferencesTask(context, target);
-  }
-}
-
-/**
- * A task that finishes resolution by requesting [RESOLVED_UNIT12] for every
- * unit in the libraries closure and produces [LIBRARY_ELEMENT].
- */
-class ResolveLibraryTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the [LIBRARY_ELEMENT9] input.
-   */
-  static const String LIBRARY_INPUT = 'LIBRARY_INPUT';
-
-  /**
-   * The name of the list of [RESOLVED_UNIT12] input.
-   */
-  static const String UNITS_INPUT = 'UNITS_INPUT';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ResolveLibraryTask',
-      createTask,
-      buildInputs,
-      <ResultDescriptor>[LIBRARY_ELEMENT]);
-
-  ResolveLibraryTask(InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    //
-    // Prepare inputs.
-    //
-    LibraryElement library = getRequiredInput(LIBRARY_INPUT);
-    //
-    // Record outputs.
-    //
-    outputs[LIBRARY_ELEMENT] = library;
-  }
-
-/**
- * Return a map from the names of the inputs of this kind of task to the task
- * input descriptors describing those inputs for a task with the
- * given [target].
- */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    Source source = target;
-    return <String, TaskInput>{
-      LIBRARY_INPUT: LIBRARY_ELEMENT9.of(source),
-      'thisLibraryClosureIsReady': READY_RESOLVED_UNIT.of(source),
-    };
-  }
-
-/**
- * Create a [ResolveLibraryTask] based on the given [target] in the given
- * [context].
- */
-  static ResolveLibraryTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new ResolveLibraryTask(context, target);
-  }
-}
-
-/**
- * An artificial task that does nothing except to force type names resolution
- * for the defining and part units of a library.
- */
-class ResolveLibraryTypeNamesTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the [LIBRARY_ELEMENT5] input.
-   */
-  static const String LIBRARY_INPUT = 'LIBRARY_INPUT';
-
-  /**
-   * The name of the [TYPE_PROVIDER] input.
-   */
-  static const String TYPE_PROVIDER_INPUT = 'TYPE_PROVIDER_INPUT';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ResolveLibraryTypeNamesTask',
-      createTask,
-      buildInputs,
-      <ResultDescriptor>[LIBRARY_ELEMENT6]);
-
-  ResolveLibraryTypeNamesTask(
-      InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    //
-    // Prepare inputs.
-    //
-    LibraryElement library = getRequiredInput(LIBRARY_INPUT);
-    TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT);
-    //
-    // Create the synthetic element for `loadLibrary`.
-    //
-    (library as LibraryElementImpl).createLoadLibraryFunction(typeProvider);
-    //
-    // Record outputs.
-    //
-    outputs[LIBRARY_ELEMENT6] = library;
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the
-   * given [target].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    Source source = target;
-    return <String, TaskInput>{
-      'resolvedUnit':
-          LIBRARY_SPECIFIC_UNITS.of(source).toListOf(RESOLVED_UNIT5),
-      LIBRARY_INPUT: LIBRARY_ELEMENT5.of(source),
-      TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request)
-    };
-  }
-
-  /**
-   * Create a [ResolveLibraryTypeNamesTask] based on the given [target] in
-   * the given [context].
-   */
-  static ResolveLibraryTypeNamesTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new ResolveLibraryTypeNamesTask(context, target);
-  }
-}
-
-/**
- * An artificial task that does nothing except to force type parameter bounds
- * type names resolution for the defining and part units of a library.
- */
-class ResolveTopLevelLibraryTypeBoundsTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the [LIBRARY_ELEMENT4] input.
-   */
-  static const String LIBRARY_INPUT = 'LIBRARY_INPUT';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ResolveTopLevelLibraryTypeBoundsTask',
-      createTask,
-      buildInputs,
-      <ResultDescriptor>[LIBRARY_ELEMENT5]);
-
-  ResolveTopLevelLibraryTypeBoundsTask(
-      InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  bool get handlesDependencyCycles => true;
-
-  @override
-  void internalPerform() {
-    LibraryElement library = getRequiredInput(LIBRARY_INPUT);
-    outputs[LIBRARY_ELEMENT5] = library;
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the
-   * given [target].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    Source source = target;
-    return <String, TaskInput>{
-      LIBRARY_INPUT: LIBRARY_ELEMENT4.of(source),
-      'thisLibraryUnitsReady':
-          LIBRARY_SPECIFIC_UNITS.of(source).toListOf(RESOLVED_UNIT4),
-      'directlyImportedLibrariesReady':
-          IMPORTED_LIBRARIES.of(source).toListOf(LIBRARY_ELEMENT5),
-      'directlyExportedLibrariesReady':
-          EXPORTED_LIBRARIES.of(source).toListOf(LIBRARY_ELEMENT5),
-    };
-  }
-
-  /**
-   * Create a [ResolveTopLevelLibraryTypeBoundsTask] based on the given [target]
-   * in the given [context].
-   */
-  static ResolveTopLevelLibraryTypeBoundsTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new ResolveTopLevelLibraryTypeBoundsTask(context, target);
-  }
-}
-
-/**
- * A task that builds [RESOLVED_UNIT4] for a unit.
- */
-class ResolveTopLevelUnitTypeBoundsTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the input whose value is the defining [LIBRARY_ELEMENT4].
-   */
-  static const String LIBRARY_INPUT = 'LIBRARY_INPUT';
-
-  /**
-   * The name of the [RESOLVED_UNIT3] input.
-   */
-  static const String UNIT_INPUT = 'UNIT_INPUT';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ResolveTopLevelUnitTypeBoundsTask',
-      createTask,
-      buildInputs, <ResultDescriptor>[
-    RESOLVE_TYPE_BOUNDS_ERRORS,
-    CREATED_RESOLVED_UNIT4,
-    RESOLVED_UNIT4
-  ]);
-
-  ResolveTopLevelUnitTypeBoundsTask(
-      InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    //
-    // Prepare inputs.
-    //
-    LibraryElement library = getRequiredInput(LIBRARY_INPUT);
-    CompilationUnit unit = getRequiredInput(UNIT_INPUT);
-    CompilationUnitElement unitElement = unit.declaredElement;
-    //
-    // Resolve TypeName nodes.
-    //
-    RecordingErrorListener errorListener = new RecordingErrorListener();
-    new TypeParameterBoundsResolver(
-            context.typeSystem, library, unitElement.source, errorListener)
-        .resolveTypeBounds(unit);
-    //
-    // Record outputs.
-    //
-    outputs[RESOLVE_TYPE_BOUNDS_ERRORS] =
-        getTargetSourceErrors(errorListener, target);
-    outputs[RESOLVED_UNIT4] = unit;
-    outputs[CREATED_RESOLVED_UNIT4] = true;
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the
-   * given [target].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    // TODO(brianwilkerson) This task updates the element model to have type
-    // information and updates the class hierarchy. It should produce a new
-    // version of the element model in order to record those changes.
-    LibrarySpecificUnit unit = target;
-    return <String, TaskInput>{
-      'importsExportNamespace':
-          IMPORTED_LIBRARIES.of(unit.library).toMapOf(LIBRARY_ELEMENT4),
-      'dependOnAllExportedSources':
-          IMPORTED_LIBRARIES.of(unit.library).toMapOf(EXPORT_SOURCE_CLOSURE),
-      LIBRARY_INPUT: LIBRARY_ELEMENT4.of(unit.library),
-      UNIT_INPUT: RESOLVED_UNIT3.of(unit)
-    };
-  }
-
-  /**
-   * Create a [ResolveTopLevelUnitTypeBoundsTask] based on the given [target] in
-   * the given [context].
-   */
-  static ResolveTopLevelUnitTypeBoundsTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new ResolveTopLevelUnitTypeBoundsTask(context, target);
-  }
-}
-
-/**
- * A task that resolves the bodies of top-level functions, constructors, and
- * methods within a single compilation unit.
- */
-class ResolveUnitTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the input whose value is the defining [LIBRARY_ELEMENT8].
-   */
-  static const String LIBRARY_INPUT = 'LIBRARY_INPUT';
-
-  /**
-   * The name of the [TYPE_PROVIDER] input.
-   */
-  static const String TYPE_PROVIDER_INPUT = 'TYPE_PROVIDER_INPUT';
-
-  /**
-   * The name of the [RESOLVED_UNIT10] input.
-   */
-  static const String UNIT_INPUT = 'UNIT_INPUT';
-
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ResolveUnitTask', createTask, buildInputs, <ResultDescriptor>[
-    CONSTANT_EXPRESSIONS_DEPENDENCIES,
-    RESOLVE_UNIT_ERRORS,
-    CREATED_RESOLVED_UNIT11,
-    RESOLVED_UNIT11
-  ]);
-
-  ResolveUnitTask(
-      InternalAnalysisContext context, LibrarySpecificUnit compilationUnit)
-      : super(context, compilationUnit);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    //
-    // Prepare inputs.
-    //
-    LibrarySpecificUnit target = this.target;
-    LibraryElement libraryElement = getRequiredInput(LIBRARY_INPUT);
-    CompilationUnit unit = getRequiredInput(UNIT_INPUT);
-    TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT);
-    var inheritance = new InheritanceManager2(context.typeSystem);
-    //
-    // Resolve everything.
-    //
-    CompilationUnitElement unitElement = unit.declaredElement;
-    RecordingErrorListener errorListener = new RecordingErrorListener();
-    ResolverVisitor visitor = new ResolverVisitor(inheritance, libraryElement,
-        unitElement.source, typeProvider, errorListener);
-    unit.accept(visitor);
-    //
-    // Compute constant expressions' dependencies.
-    //
-    List<ConstantEvaluationTarget> constExprDependencies;
-    {
-      ConstantExpressionsDependenciesFinder finder =
-          new ConstantExpressionsDependenciesFinder();
-      unit.accept(finder);
-      constExprDependencies = finder.dependencies.toList();
-    }
-    //
-    // Record outputs.
-    //
-    // TODO(brianwilkerson) This task modifies the element model (by copying the
-    // AST's for constructor initializers into it) but does not produce an
-    // updated version of the element model.
-    //
-    outputs[CONSTANT_EXPRESSIONS_DEPENDENCIES] = constExprDependencies;
-    outputs[RESOLVE_UNIT_ERRORS] = getTargetSourceErrors(errorListener, target);
-    outputs[RESOLVED_UNIT11] = unit;
-    outputs[CREATED_RESOLVED_UNIT11] = true;
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the given
-   * [target].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    LibrarySpecificUnit unit = target;
-    return <String, TaskInput>{
-      LIBRARY_INPUT: LIBRARY_ELEMENT8.of(unit.library),
-      TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request),
-      UNIT_INPUT: RESOLVED_UNIT10.of(unit),
-      // In strong mode, add additional dependencies to enforce inference
-      // ordering.
-
-      // Require that inference be complete for all units in the
-      // current library cycle.
-      'orderLibraryCycleTasks':
-          LIBRARY_CYCLE_UNITS.of(unit.library).toListOf(CREATED_RESOLVED_UNIT10)
-    };
-  }
-
-  /**
-   * Create a [ResolveUnitTask] based on the given [target] in
-   * the given [context].
-   */
-  static ResolveUnitTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new ResolveUnitTask(context, target);
-  }
-}
-
-/**
- * A task that builds [RESOLVED_UNIT5] for a unit.
- */
-class ResolveUnitTypeNamesTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the input whose value is the defining [LIBRARY_ELEMENT5].
-   */
-  static const String LIBRARY_INPUT = 'LIBRARY_INPUT';
-
-  /**
-   * The name of the [RESOLVED_UNIT4] input.
-   */
-  static const String UNIT_INPUT = 'UNIT_INPUT';
-
-  /**
-   * The name of the [TYPE_PROVIDER] input.
-   */
-  static const String TYPE_PROVIDER_INPUT = 'TYPE_PROVIDER_INPUT';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ResolveUnitTypeNamesTask', createTask, buildInputs, <ResultDescriptor>[
-    RESOLVE_TYPE_NAMES_ERRORS,
-    CREATED_RESOLVED_UNIT5,
-    RESOLVED_UNIT5
-  ]);
-
-  ResolveUnitTypeNamesTask(
-      InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    //
-    // Prepare inputs.
-    //
-    LibraryElement library = getRequiredInput(LIBRARY_INPUT);
-    CompilationUnit unit = getRequiredInput(UNIT_INPUT);
-    CompilationUnitElement unitElement = unit.declaredElement;
-    TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT);
-    //
-    // Resolve TypeName nodes.
-    //
-    RecordingErrorListener errorListener = new RecordingErrorListener();
-    TypeResolverVisitor visitor = new TypeResolverVisitor(
-        library, unitElement.source, typeProvider, errorListener,
-        shouldUseWithClauseInferredTypes: false,
-        shouldSetElementSupertypes: true);
-    unit.accept(visitor);
-    //
-    // Re-write the AST to handle the optional new and const feature.
-    //
-    unit.accept(new AstRewriteVisitor(context.typeSystem, library,
-        unit.declaredElement.source, typeProvider, errorListener));
-    //
-    // Record outputs.
-    //
-    outputs[RESOLVE_TYPE_NAMES_ERRORS] =
-        getTargetSourceErrors(errorListener, target);
-    outputs[RESOLVED_UNIT5] = unit;
-    outputs[CREATED_RESOLVED_UNIT5] = true;
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the
-   * given [target].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    // TODO(brianwilkerson) This task updates the element model to have type
-    // information and updates the class hierarchy. It should produce a new
-    // version of the element model in order to record those changes.
-    LibrarySpecificUnit unit = target;
-    return <String, TaskInput>{
-      LIBRARY_INPUT: LIBRARY_ELEMENT5.of(unit.library),
-      UNIT_INPUT: RESOLVED_UNIT4.of(unit),
-      TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request)
-    };
-  }
-
-  /**
-   * Create a [ResolveUnitTypeNamesTask] based on the given [target] in
-   * the given [context].
-   */
-  static ResolveUnitTypeNamesTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new ResolveUnitTypeNamesTask(context, target);
-  }
-}
-
-/**
- * A task that builds [RESOLVED_UNIT6] for a unit.
- */
-class ResolveVariableReferencesTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the [LIBRARY_ELEMENT1] input.
-   */
-  static const String LIBRARY_INPUT = 'LIBRARY_INPUT';
-
-  /**
-   * The name of the [RESOLVED_UNIT5] input.
-   */
-  static const String UNIT_INPUT = 'UNIT_INPUT';
-
-  /**
-   * The name of the [TYPE_PROVIDER] input.
-   */
-  static const String TYPE_PROVIDER_INPUT = 'TYPE_PROVIDER_INPUT';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ResolveVariableReferencesTask',
-      createTask,
-      buildInputs, <ResultDescriptor>[
-    CREATED_RESOLVED_UNIT6,
-    RESOLVED_UNIT6,
-    VARIABLE_REFERENCE_ERRORS
-  ]);
-
-  ResolveVariableReferencesTask(
-      InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    //
-    // Prepare inputs.
-    //
-    LibraryElement libraryElement = getRequiredInput(LIBRARY_INPUT);
-    CompilationUnit unit = getRequiredInput(UNIT_INPUT);
-    CompilationUnitElement unitElement = unit.declaredElement;
-    TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT);
-    //
-    // Resolve local variables.
-    //
-    RecordingErrorListener errorListener = new RecordingErrorListener();
-    Scope nameScope = new LibraryScope(libraryElement);
-    VariableResolverVisitor visitor = new VariableResolverVisitor(
-        libraryElement, unitElement.source, typeProvider, errorListener,
-        nameScope: nameScope);
-    unit.accept(visitor);
-    //
-    // Record outputs.
-    //
-    outputs[RESOLVED_UNIT6] = unit;
-    outputs[CREATED_RESOLVED_UNIT6] = true;
-    outputs[VARIABLE_REFERENCE_ERRORS] =
-        getTargetSourceErrors(errorListener, target);
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the
-   * given [target].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    LibrarySpecificUnit unit = target;
-    return <String, TaskInput>{
-      LIBRARY_INPUT: LIBRARY_ELEMENT1.of(unit.library),
-      UNIT_INPUT: RESOLVED_UNIT5.of(unit),
-      TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request)
-    };
-  }
-
-  /**
-   * Create a [ResolveVariableReferencesTask] based on the given [target] in
-   * the given [context].
-   */
-  static ResolveVariableReferencesTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new ResolveVariableReferencesTask(context, target);
-  }
-}
-
-/**
- * A task that scans the content of a Dart file, producing a stream of Dart
- * tokens, line information, and any lexical errors encountered in the process.
- */
-class ScanDartTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the input whose value is the content of the file.
-   */
-  static const String CONTENT_INPUT_NAME = 'CONTENT_INPUT_NAME';
-
-  /**
-   * The name of the input whose value is the modification time of the file.
-   */
-  static const String MODIFICATION_TIME_INPUT = 'MODIFICATION_TIME_INPUT';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ScanDartTask',
-      createTask,
-      buildInputs,
-      <ResultDescriptor>[IGNORE_INFO, LINE_INFO, SCAN_ERRORS, TOKEN_STREAM],
-      suitabilityFor: suitabilityFor);
-
-  /**
-   * Initialize a newly created task to access the content of the source
-   * associated with the given [target] in the given [context].
-   */
-  ScanDartTask(InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    Source source = getRequiredSource();
-    RecordingErrorListener errorListener = new RecordingErrorListener();
-
-    int modificationTime = getRequiredInput(MODIFICATION_TIME_INPUT);
-    if (modificationTime < 0) {
-      String message = 'Content could not be read';
-      if (context is InternalAnalysisContext) {
-        CacheEntry entry =
-            (context as InternalAnalysisContext).getCacheEntry(target);
-        CaughtException exception = entry.exception;
-        if (exception != null) {
-          message = exception.toString();
-        }
-      }
-      if (source.exists()) {
-        errorListener.onError(new AnalysisError(
-            source, 0, 0, ScannerErrorCode.UNABLE_GET_CONTENT, [message]));
-      }
-    }
-    if (target is DartScript) {
-      DartScript script = target;
-      List<ScriptFragment> fragments = script.fragments;
-      if (fragments.length < 1) {
-        throw new AnalysisException('Cannot scan scripts with no fragments');
-      } else if (fragments.length > 1) {
-        throw new AnalysisException(
-            'Cannot scan scripts with multiple fragments');
-      }
-      ScriptFragment fragment = fragments[0];
-
-      Scanner scanner = new Scanner(
-          source,
-          new SubSequenceReader(fragment.content, fragment.offset),
-          errorListener);
-      scanner.setSourceStart(fragment.line, fragment.column);
-      scanner.preserveComments = context.analysisOptions.preserveComments;
-      scanner.scanLazyAssignmentOperators =
-          context.analysisOptions.enableLazyAssignmentOperators;
-
-      LineInfo lineInfo = new LineInfo(scanner.lineStarts);
-
-      outputs[TOKEN_STREAM] = scanner.tokenize();
-      outputs[LINE_INFO] = lineInfo;
-      outputs[IGNORE_INFO] =
-          IgnoreInfo.calculateIgnores(fragment.content, lineInfo);
-      outputs[SCAN_ERRORS] = getUniqueErrors(errorListener.errors);
-    } else if (target is Source) {
-      String content = getRequiredInput(CONTENT_INPUT_NAME);
-
-      Scanner scanner =
-          new Scanner(source, new CharSequenceReader(content), errorListener);
-      scanner.preserveComments = context.analysisOptions.preserveComments;
-      scanner.scanLazyAssignmentOperators =
-          context.analysisOptions.enableLazyAssignmentOperators;
-
-      LineInfo lineInfo = new LineInfo(scanner.lineStarts);
-
-      outputs[TOKEN_STREAM] = scanner.tokenize();
-      outputs[LINE_INFO] = lineInfo;
-      outputs[IGNORE_INFO] = IgnoreInfo.calculateIgnores(content, lineInfo);
-      outputs[SCAN_ERRORS] = getUniqueErrors(errorListener.errors);
-    } else {
-      throw new AnalysisException(
-          'Cannot scan Dart code from a ${target.runtimeType}');
-    }
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the given
-   * [target].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    if (target is Source) {
-      return <String, TaskInput>{
-        CONTENT_INPUT_NAME: CONTENT.of(target, flushOnAccess: true),
-        MODIFICATION_TIME_INPUT: MODIFICATION_TIME.of(target)
-      };
-    } else if (target is DartScript) {
-      // This task does not use the following input; it is included only to add
-      // a dependency between this value and the containing source so that when
-      // the containing source is modified these results will be invalidated.
-      Source source = target.source;
-      return <String, TaskInput>{
-        '-': DART_SCRIPTS.of(source),
-        MODIFICATION_TIME_INPUT: MODIFICATION_TIME.of(source)
-      };
-    }
-    throw new AnalysisException(
-        'Cannot build inputs for a ${target.runtimeType}');
-  }
-
-  /**
-   * Create a [ScanDartTask] based on the given [target] in the given [context].
-   */
-  static ScanDartTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new ScanDartTask(context, target);
-  }
-
-  /**
-   * Return an indication of how suitable this task is for the given [target].
-   */
-  static TaskSuitability suitabilityFor(AnalysisTarget target) {
-    if (target is Source) {
-      if (target.shortName.endsWith(AnalysisEngine.SUFFIX_DART)) {
-        return TaskSuitability.HIGHEST;
-      }
-      return TaskSuitability.LOWEST;
-    } else if (target is DartScript) {
-      return TaskSuitability.HIGHEST;
-    }
-    return TaskSuitability.NONE;
-  }
-}
-
-/**
- * A task that builds [STRONG_MODE_ERRORS] for a unit.  Also builds
- * [RESOLVED_UNIT] for a unit.
- */
-class StrongModeVerifyUnitTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the [RESOLVED_UNIT12] input.
-   */
-  static const String UNIT_INPUT = 'UNIT_INPUT';
-
-  /**
-   * The name of the [TYPE_PROVIDER] input.
-   */
-  static const String TYPE_PROVIDER_INPUT = 'TYPE_PROVIDER_INPUT';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'StrongModeVerifyUnitTask', createTask, buildInputs, <ResultDescriptor>[
-    STRONG_MODE_ERRORS,
-    CREATED_RESOLVED_UNIT,
-    RESOLVED_UNIT
-  ]);
-
-  StrongModeVerifyUnitTask(
-      InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    RecordingErrorListener errorListener = new RecordingErrorListener();
-    //
-    // Prepare inputs.
-    //
-    TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT);
-    CompilationUnit unit = getRequiredInput(UNIT_INPUT);
-    AnalysisOptionsImpl options = context.analysisOptions;
-    if (options.strongMode) {
-      CodeChecker checker = new CodeChecker(
-          typeProvider,
-          new Dart2TypeSystem(typeProvider,
-              implicitCasts: options.implicitCasts),
-          errorListener,
-          options);
-      checker.visitCompilationUnit(unit);
-    }
-    //
-    // Record outputs.
-    //
-    outputs[STRONG_MODE_ERRORS] = getUniqueErrors(errorListener.errors);
-    outputs[CREATED_RESOLVED_UNIT] = true;
-    outputs[RESOLVED_UNIT] = unit;
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the
-   * given [target].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    LibrarySpecificUnit unit = target;
-    return <String, TaskInput>{
-      UNIT_INPUT: RESOLVED_UNIT12.of(unit),
-      TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request),
-    };
-  }
-
-  /**
-   * Create a [StrongModeVerifyUnitTask] based on the given [target] in
-   * the given [context].
-   */
-  static StrongModeVerifyUnitTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new StrongModeVerifyUnitTask(context, target);
-  }
-}
-
-/**
- * A task that builds [VERIFY_ERRORS] for a unit.
- */
-class VerifyUnitTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the [PENDING_ERRORS] input.
-   */
-  static const String PENDING_ERRORS_INPUT = 'PENDING_ERRORS_INPUT';
-
-  /**
-   * The name of the input of a mapping from [REFERENCED_SOURCES] to their
-   * [MODIFICATION_TIME]s.
-   */
-  static const String REFERENCED_SOURCE_MODIFICATION_TIME_MAP_INPUT =
-      'REFERENCED_SOURCE_MODIFICATION_TIME_MAP_INPUT';
-
-  /**
-   * The name of the [TYPE_PROVIDER] input.
-   */
-  static const String TYPE_PROVIDER_INPUT = 'TYPE_PROVIDER_INPUT';
-
-  /**
-   * The name of the [RESOLVED_UNIT] input.
-   */
-  static const String UNIT_INPUT = 'UNIT_INPUT';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor('VerifyUnitTask',
-      createTask, buildInputs, <ResultDescriptor>[VERIFY_ERRORS]);
-
-  /**
-   * The [ErrorReporter] to report errors to.
-   */
-  ErrorReporter errorReporter;
-
-  /**
-   * The mapping from the current library referenced sources to their
-   * modification times.
-   */
-  Map<Source, int> sourceTimeMap;
-
-  VerifyUnitTask(InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    RecordingErrorListener errorListener = new RecordingErrorListener();
-    Source source = getRequiredSource();
-    errorReporter = new ErrorReporter(errorListener, source);
-    //
-    // Prepare inputs.
-    //
-    CompilationUnit unit = getRequiredInput(UNIT_INPUT);
-    CompilationUnitElement unitElement = unit.declaredElement;
-    LibraryElement libraryElement = unitElement.library;
-    if (libraryElement == null) {
-      throw new AnalysisException(
-          'VerifyUnitTask verifying a unit with no library: '
-          '${unitElement.source.fullName}');
-    }
-    List<PendingError> pendingErrors = getRequiredInput(PENDING_ERRORS_INPUT);
-    sourceTimeMap =
-        getRequiredInput(REFERENCED_SOURCE_MODIFICATION_TIME_MAP_INPUT);
-    TypeProvider typeProvider = getRequiredInput(TYPE_PROVIDER_INPUT);
-    //
-    // Validate the directives.
-    //
-    validateDirectives(unit);
-    //
-    // Use the ConstantVerifier to compute errors.
-    //
-    ConstantVerifier constantVerifier = new ConstantVerifier(
-        errorReporter, libraryElement, typeProvider, context.declaredVariables);
-    unit.accept(constantVerifier);
-
-    //
-    // Compute inheritance and override errors.
-    //
-    var typeSystem = libraryElement.context.typeSystem;
-    var inheritanceManager = new InheritanceManager2(typeSystem);
-    var inheritanceOverrideVerifier = new InheritanceOverrideVerifier(
-        typeSystem, inheritanceManager, errorReporter);
-    inheritanceOverrideVerifier.verifyUnit(unit);
-
-    //
-    // Use the ErrorVerifier to compute errors.
-    //
-    ErrorVerifier errorVerifier = new ErrorVerifier(
-        errorReporter, libraryElement, typeProvider, inheritanceManager, false,
-        disableConflictingGenericsCheck: true);
-    unit.accept(errorVerifier);
-    //
-    // Convert the pending errors into actual errors.
-    //
-    for (PendingError pendingError in pendingErrors) {
-      errorListener.onError(pendingError.toAnalysisError());
-    }
-    //
-    // Record outputs.
-    //
-    outputs[VERIFY_ERRORS] = getUniqueErrors(errorListener.errors);
-  }
-
-  /**
-   * Check each directive in the given [unit] to see if the referenced source
-   * exists and report an error if it does not.
-   */
-  void validateDirectives(CompilationUnit unit) {
-    NodeList<Directive> directives = unit.directives;
-    int length = directives.length;
-    for (int i = 0; i < length; i++) {
-      Directive directive = directives[i];
-      if (directive is UriBasedDirective) {
-        validateReferencedSource(directive);
-      }
-    }
-  }
-
-  /**
-   * Check the given [directive] to see if the referenced source exists and
-   * report an error if it does not.
-   */
-  void validateReferencedSource(UriBasedDirectiveImpl directive) {
-    if (directive is NamespaceDirectiveImpl) {
-      for (Configuration configuration in directive.configurations) {
-        Source source = configuration.uriSource;
-        StringLiteral uriLiteral = configuration.uri;
-        String uriContent = uriLiteral?.stringValue?.trim();
-        if (source != null) {
-          int modificationTime = sourceTimeMap[source] ?? -1;
-          if (modificationTime >= 0) {
-            continue;
-          }
-        } else {
-          // Don't report errors already reported by ParseDartTask.resolveDirective
-          if (UriBasedDirectiveImpl.validateUri(
-                  directive is ImportDirective, uriLiteral, uriContent) !=
-              null) {
-            continue;
-          }
-        }
-        CompileTimeErrorCode errorCode =
-            CompileTimeErrorCode.URI_DOES_NOT_EXIST;
-        if (_isGenerated(source)) {
-          errorCode = CompileTimeErrorCode.URI_HAS_NOT_BEEN_GENERATED;
-        }
-        errorReporter.reportErrorForNode(errorCode, uriLiteral, [uriContent]);
-      }
-    }
-    Source source = directive.uriSource;
-    if (source != null) {
-      int modificationTime = sourceTimeMap[source] ?? -1;
-      if (modificationTime >= 0) {
-        return;
-      }
-    } else {
-      // Don't report errors already reported by ParseDartTask.resolveDirective
-      if (directive.validate() != null) {
-        return;
-      }
-    }
-    StringLiteral uriLiteral = directive.uri;
-    CompileTimeErrorCode errorCode = CompileTimeErrorCode.URI_DOES_NOT_EXIST;
-    if (_isGenerated(source)) {
-      errorCode = CompileTimeErrorCode.URI_HAS_NOT_BEEN_GENERATED;
-    }
-    errorReporter
-        .reportErrorForNode(errorCode, uriLiteral, [directive.uriContent]);
-  }
-
-  /**
-   * Return `true` if the given [source] refers to a file that is assumed to be
-   * generated.
-   */
-  bool _isGenerated(Source source) {
-    if (source == null) {
-      return false;
-    }
-    // TODO(brianwilkerson) Generalize this mechanism.
-    const List<String> suffixes = const <String>[
-      '.g.dart',
-      '.pb.dart',
-      '.pbenum.dart',
-      '.pbserver.dart',
-      '.pbjson.dart',
-      '.template.dart'
-    ];
-    String fullName = source.fullName;
-    for (String suffix in suffixes) {
-      if (fullName.endsWith(suffix)) {
-        return true;
-      }
-    }
-    return false;
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the
-   * given [target].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    LibrarySpecificUnit unit = target;
-    return <String, TaskInput>{
-      'thisLibraryClosureIsReady': READY_RESOLVED_UNIT.of(unit.library),
-      UNIT_INPUT: RESOLVED_UNIT.of(unit),
-      REFERENCED_SOURCE_MODIFICATION_TIME_MAP_INPUT:
-          REFERENCED_SOURCES.of(unit.library).toMapOf(MODIFICATION_TIME),
-      PENDING_ERRORS_INPUT: PENDING_ERRORS.of(unit),
-      'requiredConstants': REQUIRED_CONSTANTS.of(unit).toListOf(CONSTANT_VALUE),
-      TYPE_PROVIDER_INPUT: TYPE_PROVIDER.of(AnalysisContextTarget.request)
-    };
-  }
-
-  /**
-   * Create a [VerifyUnitTask] based on the given [target] in
-   * the given [context].
-   */
-  static VerifyUnitTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new VerifyUnitTask(context, target);
-  }
-}
-
-/**
- * A [TaskInput] whose value is a list of library sources exported directly
- * or indirectly by the target [Source].
- *
- * [resultDescriptor] is the type of result which should be produced for each
- * target [Source].
- */
-class _ExportSourceClosureTaskInput extends TaskInputImpl<List<Source>> {
-  final Source target;
-  final ResultDescriptor resultDescriptor;
-
-  _ExportSourceClosureTaskInput(this.target, this.resultDescriptor);
-
-  @override
-  TaskInputBuilder<List<Source>> createBuilder() =>
-      new _SourceClosureTaskInputBuilder(
-          target, _SourceClosureKind.EXPORT, resultDescriptor);
-}
-
-/**
- * An object holding either the name or the source associated with a part-of
- * directive.
- */
-class _NameOrSource {
-  final String name;
-
-  final Source source;
-
-  _NameOrSource(this.name, this.source);
-}
-
-/**
- * The kind of the source closure to build.
- */
-enum _SourceClosureKind { IMPORT, EXPORT, IMPORT_EXPORT }
-
-/**
- * A [TaskInputBuilder] used by [_ExportSourceClosureTaskInput].
- */
-class _SourceClosureTaskInputBuilder implements TaskInputBuilder<List<Source>> {
-  final _SourceClosureKind kind;
-  final Set<LibraryElement> _libraries = new HashSet<LibraryElement>();
-  final List<Source> _newSources = <Source>[];
-
-  @override
-  final ResultDescriptor currentResult;
-
-  Source currentTarget;
-
-  _SourceClosureTaskInputBuilder(
-      Source librarySource, this.kind, this.currentResult) {
-    _newSources.add(librarySource);
-  }
-
-  @override
-  void set currentValue(Object value) {
-    LibraryElement library = value;
-    if (_libraries.add(library)) {
-      if (kind == _SourceClosureKind.IMPORT ||
-          kind == _SourceClosureKind.IMPORT_EXPORT) {
-        List<ImportElement> imports = library.imports;
-        int length = imports.length;
-        for (int i = 0; i < length; i++) {
-          ImportElement importElement = imports[i];
-          Source importedSource = importElement.importedLibrary?.source;
-          if (importedSource != null) {
-            _newSources.add(importedSource);
-          }
-        }
-      }
-      if (kind == _SourceClosureKind.EXPORT ||
-          kind == _SourceClosureKind.IMPORT_EXPORT) {
-        List<ExportElement> exports = library.exports;
-        int length = exports.length;
-        for (int i = 0; i < length; i++) {
-          ExportElement exportElement = exports[i];
-          Source exportedSource = exportElement.exportedLibrary?.source;
-          if (exportedSource != null) {
-            _newSources.add(exportedSource);
-          }
-        }
-      }
-    }
-  }
-
-  @override
-  bool get flushOnAccess => false;
-
-  @override
-  List<Source> get inputValue {
-    return _libraries.map((LibraryElement library) => library.source).toList();
-  }
-
-  @override
-  void currentValueNotAvailable() {
-    // Nothing needs to be done.  moveNext() will simply go on to the next new
-    // source.
-  }
-
-  @override
-  bool moveNext() {
-    if (_newSources.isEmpty) {
-      return false;
-    }
-    currentTarget = _newSources.removeLast();
-    return true;
-  }
-}
diff --git a/pkg/analyzer/lib/src/task/dart_work_manager.dart b/pkg/analyzer/lib/src/task/dart_work_manager.dart
deleted file mode 100644
index 2a27c15..0000000
--- a/pkg/analyzer/lib/src/task/dart_work_manager.dart
+++ /dev/null
@@ -1,499 +0,0 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:collection';
-
-import 'package:analyzer/error/error.dart';
-import 'package:analyzer/src/context/cache.dart';
-import 'package:analyzer/src/generated/engine.dart'
-    show AnalysisEngine, AnalysisErrorInfo, CacheState, InternalAnalysisContext;
-import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/utilities_collection.dart';
-import 'package:analyzer/src/task/api/dart.dart';
-import 'package:analyzer/src/task/api/model.dart';
-import 'package:analyzer/src/task/dart.dart';
-import 'package:analyzer/src/task/html.dart';
-
-/**
- * The manager for Dart specific analysis.
- */
-class DartWorkManager implements WorkManager {
-  /**
-   * The list of errors that are reported for raw Dart [Source]s.
-   */
-  static final List<ResultDescriptor<List<AnalysisError>>> _SOURCE_ERRORS =
-      <ResultDescriptor<List<AnalysisError>>>[
-    BUILD_DIRECTIVES_ERRORS,
-    BUILD_LIBRARY_ERRORS,
-    PARSE_ERRORS,
-    SCAN_ERRORS
-  ];
-
-  /**
-   * The list of errors that are reported for raw Dart [LibrarySpecificUnit]s.
-   */
-  static final List<ResultDescriptor<List<AnalysisError>>> _UNIT_ERRORS =
-      <ResultDescriptor<List<AnalysisError>>>[
-    HINTS,
-    LINTS,
-    LIBRARY_UNIT_ERRORS,
-    RESOLVE_DIRECTIVES_ERRORS,
-    RESOLVE_TYPE_NAMES_ERRORS,
-    RESOLVE_TYPE_BOUNDS_ERRORS,
-    RESOLVE_UNIT_ERRORS,
-    STRONG_MODE_ERRORS,
-    VARIABLE_REFERENCE_ERRORS,
-    VERIFY_ERRORS
-  ];
-
-  final InternalAnalysisContext context;
-
-  /**
-   * The [TargetedResult]s that should be computed with priority.
-   */
-  final LinkedHashSet<TargetedResult> priorityResultQueue =
-      new LinkedHashSet<TargetedResult>();
-
-  /**
-   * The sources whose kind we don't know yet.
-   */
-  final LinkedHashSet<Source> unknownSourceQueue = new LinkedHashSet<Source>();
-
-  /**
-   * The queue of library sources to process.
-   */
-  final LinkedHashSet<Source> librarySourceQueue = new LinkedHashSet<Source>();
-
-  /**
-   * A table mapping library sources to the part sources they include.
-   */
-  final HashMap<Source, List<Source>> libraryPartsMap =
-      new HashMap<Source, List<Source>>();
-
-  /**
-   * A table mapping part sources to the library sources that include them.
-   */
-  final HashMap<Source, List<Source>> partLibrariesMap =
-      new HashMap<Source, List<Source>>();
-
-  /**
-   * Initialize a newly created manager.
-   */
-  DartWorkManager(this.context) {
-    context.onResultInvalidated.listen((InvalidatedResult event) {
-      if (event.descriptor == LIBRARY_ERRORS_READY) {
-        CacheEntry entry = event.entry;
-        if (entry.explicitlyAdded &&
-            entry.getValue(SOURCE_KIND) == SourceKind.LIBRARY) {
-          librarySourceQueue.add(entry.target);
-        }
-      }
-    });
-  }
-
-  /**
-   * Returns the correctly typed result of `context.analysisCache`.
-   */
-  AnalysisCache get analysisCache => context.analysisCache;
-
-  /**
-   * The partition that contains analysis results that are not shared with other
-   * contexts.
-   */
-  CachePartition get privateAnalysisCachePartition =>
-      context.privateAnalysisCachePartition;
-
-  /**
-   * Specifies that the client want the given [result] of the given [target]
-   * to be computed with priority.
-   */
-  void addPriorityResult(AnalysisTarget target, ResultDescriptor result) {
-    priorityResultQueue.add(new TargetedResult(target, result));
-  }
-
-  @override
-  void applyChange(List<Source> addedSources, List<Source> changedSources,
-      List<Source> removedSources) {
-    addedSources = addedSources.where(_isDartSource).toList();
-    changedSources = changedSources
-        .where(_isDartSource)
-        .where((source) => _needsComputing(source, SOURCE_KIND))
-        .toList();
-    removedSources = removedSources.where(_isDartSource).toList();
-    // unknown queue
-    unknownSourceQueue.addAll(addedSources);
-    unknownSourceQueue.addAll(changedSources);
-    unknownSourceQueue.removeAll(removedSources);
-    // library queue
-    librarySourceQueue.removeAll(changedSources);
-    librarySourceQueue.removeAll(removedSources);
-    // parts in libraries
-    for (Source changedSource in changedSources) {
-      _onLibrarySourceChangedOrRemoved(changedSource);
-    }
-    for (Source removedSource in removedSources) {
-      partLibrariesMap.remove(removedSource);
-      _onLibrarySourceChangedOrRemoved(removedSource);
-    }
-  }
-
-  @override
-  void applyPriorityTargets(List<AnalysisTarget> targets) {
-    // Unschedule the old targets.
-    List<TargetedResult> resultsToUnschedule = <TargetedResult>[];
-    for (TargetedResult result in priorityResultQueue) {
-      if (result.result == LIBRARY_ERRORS_READY) {
-        resultsToUnschedule.add(result);
-      }
-    }
-    priorityResultQueue.removeAll(resultsToUnschedule);
-    // Schedule new targets.
-    for (AnalysisTarget target in targets) {
-      if (_isDartSource(target)) {
-        SourceKind sourceKind = analysisCache.getValue(target, SOURCE_KIND);
-        if (sourceKind == SourceKind.UNKNOWN) {
-          addPriorityResult(target, SOURCE_KIND);
-        } else if (sourceKind == SourceKind.LIBRARY) {
-          _schedulePriorityLibrarySourceAnalysis(target);
-        } else if (sourceKind == SourceKind.PART) {
-          List<Source> libraries = context.getLibrariesContaining(target);
-          for (Source library in libraries) {
-            addPriorityResult(library, LIBRARY_ERRORS_READY);
-          }
-        }
-      }
-    }
-  }
-
-  @override
-  List<AnalysisError> getErrors(Source source) {
-    if (!_isDartSource(source) && source is! DartScript) {
-      return AnalysisError.NO_ERRORS;
-    }
-    // If analysis is finished, use all the errors.
-    if (analysisCache.getState(source, DART_ERRORS) == CacheState.VALID) {
-      return analysisCache.getValue(source, DART_ERRORS);
-    }
-    // If analysis is in progress, combine all known partial results.
-    List<AnalysisError> errors = <AnalysisError>[];
-    for (ResultDescriptor<List<AnalysisError>> descriptor in _SOURCE_ERRORS) {
-      errors.addAll(analysisCache.getValue(source, descriptor));
-    }
-    for (Source library in context.getLibrariesContaining(source)) {
-      LibrarySpecificUnit unit = new LibrarySpecificUnit(library, source);
-      for (ResultDescriptor<List<AnalysisError>> descriptor in _UNIT_ERRORS) {
-        errors.addAll(analysisCache.getValue(unit, descriptor));
-      }
-    }
-    return errors;
-  }
-
-  /**
-   * Returns libraries containing the given [part].
-   * Maybe empty, but not null.
-   */
-  List<Source> getLibrariesContainingPart(Source part) {
-    if (part.isInSystemLibrary) {
-      DartWorkManager sdkDartWorkManager = _getSdkDartWorkManager();
-      if (sdkDartWorkManager != this) {
-        return sdkDartWorkManager.getLibrariesContainingPart(part);
-      }
-    }
-    List<Source> libraries = partLibrariesMap[part];
-    libraries ??= _getLibrariesContainingPartFromResultProvider(part);
-    return libraries?.toList() ?? const <Source>[];
-  }
-
-  @override
-  TargetedResult getNextResult() {
-    // Try to find a priority result to compute.
-    while (priorityResultQueue.isNotEmpty) {
-      TargetedResult result = priorityResultQueue.first;
-      if (!_needsComputing(result.target, result.result)) {
-        priorityResultQueue.remove(result);
-        continue;
-      }
-      return result;
-    }
-    // Try to find a new library to analyze.
-    while (librarySourceQueue.isNotEmpty) {
-      Source librarySource = librarySourceQueue.first;
-      // Maybe done with this library.
-      if (!_needsComputing(librarySource, LIBRARY_ERRORS_READY)) {
-        librarySourceQueue.remove(librarySource);
-        continue;
-      }
-      // Analyze this library.
-      return new TargetedResult(librarySource, LIBRARY_ERRORS_READY);
-    }
-    // No libraries in the queue, check whether there are sources to organize.
-    while (unknownSourceQueue.isNotEmpty) {
-      Source source = unknownSourceQueue.first;
-      // Maybe done with this source.
-      if (!_needsComputing(source, SOURCE_KIND)) {
-        unknownSourceQueue.remove(source);
-        continue;
-      }
-      // Compute the kind of this source.
-      return new TargetedResult(source, SOURCE_KIND);
-    }
-    // TODO(scheglov) Report errors for parts that remained in the queue after
-    // all libraries had been processed.
-    // No results to compute.
-    return null;
-  }
-
-  @override
-  WorkOrderPriority getNextResultPriority() {
-    if (priorityResultQueue.isNotEmpty) {
-      return WorkOrderPriority.PRIORITY;
-    }
-    if (unknownSourceQueue.isNotEmpty || librarySourceQueue.isNotEmpty) {
-      return WorkOrderPriority.NORMAL;
-    }
-    return WorkOrderPriority.NONE;
-  }
-
-  /**
-   * Notifies the manager about analysis options changes.
-   */
-  void onAnalysisOptionsChanged() {
-    _invalidateAllLocalResolutionInformation(false);
-  }
-
-  /**
-   * Notifies the manager about [SourceFactory] changes.
-   */
-  void onSourceFactoryChanged() {
-    _invalidateAllLocalResolutionInformation(true);
-  }
-
-  @override
-  void resultsComputed(
-      AnalysisTarget target, Map<ResultDescriptor, dynamic> outputs) {
-    bool isDartSource = _isDartSource(target);
-    // Route SDK outputs to the SDK WorkManager.
-    if (isDartSource && target.source.isInSystemLibrary) {
-      DartWorkManager sdkWorkManager = _getSdkDartWorkManager();
-      if (sdkWorkManager != this) {
-        sdkWorkManager.resultsComputed(target, outputs);
-        return;
-      }
-    }
-    // Organize sources.
-    bool isDartLibrarySource = false;
-    if (isDartSource) {
-      Source source = target;
-      SourceKind kind = outputs[SOURCE_KIND];
-      if (kind != null) {
-        unknownSourceQueue.remove(source);
-        if (kind == SourceKind.LIBRARY) {
-          isDartLibrarySource = true;
-          if (context.prioritySources.contains(source)) {
-            _schedulePriorityLibrarySourceAnalysis(source);
-          } else {
-            bool needErrors = _shouldErrorsBeComputed(source);
-            if (needErrors) {
-              librarySourceQueue.add(target);
-            }
-          }
-        }
-      }
-    }
-    // Update parts in libraries.
-    if (isDartLibrarySource) {
-      Source library = target;
-      List<Source> includedParts = outputs[INCLUDED_PARTS] as List<Source>;
-      if (includedParts != null) {
-        libraryPartsMap[library] = includedParts;
-        for (Source part in includedParts) {
-          List<Source> libraries =
-              partLibrariesMap.putIfAbsent(part, () => <Source>[]);
-          if (!libraries.contains(library)) {
-            libraries.add(library);
-            _invalidateContainingLibraries(part);
-          }
-        }
-      }
-    }
-    // Update notice.
-    if (isDartSource) {
-      bool shouldSetErrors = false;
-      outputs.forEach((ResultDescriptor descriptor, value) {
-        if (descriptor == PARSED_UNIT && value != null) {
-          context.getNotice(target).parsedDartUnit = value;
-          shouldSetErrors = true;
-        }
-        if (descriptor == DART_ERRORS) {
-          shouldSetErrors = true;
-        }
-      });
-      if (shouldSetErrors) {
-        AnalysisErrorInfo info = context.getErrors(target);
-        context.getNotice(target).setErrors(info.errors, info.lineInfo);
-      }
-    }
-    if (target is LibrarySpecificUnit) {
-      Source source = target.source;
-      bool shouldSetErrors = false;
-      outputs.forEach((ResultDescriptor descriptor, value) {
-        if (descriptor == RESOLVED_UNIT && value != null) {
-          context.getNotice(source).resolvedDartUnit = value;
-          shouldSetErrors = true;
-        }
-      });
-      if (shouldSetErrors) {
-        AnalysisErrorInfo info = context.getErrors(source);
-        context.getNotice(source).setErrors(info.errors, info.lineInfo);
-      }
-    }
-  }
-
-  /**
-   * The given unit was incrementally resolved. Some of its error results might
-   * have been invalidated, so we schedule it for computing errors.
-   */
-  void unitIncrementallyResolved(Source librarySource, Source unitSource) {
-    librarySourceQueue.add(librarySource);
-  }
-
-  /**
-   * Ask the [context]'s result provider for [CONTAINING_LIBRARIES].
-   * Return the list of containing libraries, or `null` if unknown.
-   */
-  List<Source> _getLibrariesContainingPartFromResultProvider(Source part) {
-    CacheEntry cacheEntry = context.getCacheEntry(part);
-    bool knows = context.aboutToComputeResult(cacheEntry, CONTAINING_LIBRARIES);
-    if (knows) {
-      return cacheEntry.getValue(CONTAINING_LIBRARIES);
-    }
-    return null;
-  }
-
-  /**
-   * Return the SDK [DartWorkManager] or this one.
-   */
-  DartWorkManager _getSdkDartWorkManager() {
-    SourceFactory sourceFactory = context.sourceFactory;
-    InternalAnalysisContext sdkContext = sourceFactory.dartSdk.context;
-    if (sdkContext != context) {
-      for (WorkManager workManager in sdkContext.workManagers) {
-        if (workManager is DartWorkManager) {
-          return workManager;
-        }
-      }
-    }
-    return this;
-  }
-
-  /**
-   * Invalidate all of the resolution results computed by this context. The flag
-   * [invalidateUris] should be `true` if the cached results of converting URIs
-   * to source files should also be invalidated.
-   */
-  void _invalidateAllLocalResolutionInformation(bool invalidateUris) {
-    CachePartition partition = privateAnalysisCachePartition;
-    // Prepare targets and values to invalidate.
-    List<Source> dartSources = <Source>[];
-    List<LibrarySpecificUnit> unitTargets = <LibrarySpecificUnit>[];
-    MapIterator<AnalysisTarget, CacheEntry> iterator = partition.iterator();
-    while (iterator.moveNext()) {
-      AnalysisTarget target = iterator.key;
-      // Optionally gather Dart sources to invalidate URIs resolution.
-      if (invalidateUris && _isDartSource(target)) {
-        dartSources.add(target);
-      }
-      // LibrarySpecificUnit(s) are roots of Dart resolution.
-      // When one is invalidated, invalidation is propagated to all resolution.
-      if (target is LibrarySpecificUnit) {
-        unitTargets.add(target);
-        Source library = target.library;
-        if (context.exists(library)) {
-          CacheEntry entry = iterator.value;
-          if (entry.explicitlyAdded) {
-            librarySourceQueue.add(library);
-          }
-        }
-      }
-    }
-    // Invalidate targets and values.
-    unitTargets.forEach(partition.remove);
-    for (Source dartSource in dartSources) {
-      CacheEntry entry = partition.get(dartSource);
-      if (entry != null) {
-        // TODO(scheglov) we invalidate too much.
-        // Would be nice to invalidate just URLs resolution.
-        entry.setState(PARSED_UNIT, CacheState.INVALID);
-        entry.setState(IMPORTED_LIBRARIES, CacheState.INVALID);
-        entry.setState(EXPLICITLY_IMPORTED_LIBRARIES, CacheState.INVALID);
-        entry.setState(EXPORTED_LIBRARIES, CacheState.INVALID);
-        entry.setState(INCLUDED_PARTS, CacheState.INVALID);
-        entry.setState(LIBRARY_SPECIFIC_UNITS, CacheState.INVALID);
-        entry.setState(UNITS, CacheState.INVALID);
-      }
-    }
-  }
-
-  /**
-   * Invalidate  [CONTAINING_LIBRARIES] for the given [source].
-   * [CONTAINING_LIBRARIES] does not have dependencies, so we manage it here.
-   * The [source] may be a part, or a library whose contents is updated so
-   * will be a part.
-   */
-  void _invalidateContainingLibraries(Source source) {
-    CacheEntry entry = analysisCache.get(source);
-    if (entry != null) {
-      entry.setState(CONTAINING_LIBRARIES, CacheState.INVALID);
-    }
-  }
-
-  /**
-   * Returns `true` if the given [result] of the given [target] needs
-   * computing, i.e. it is not in the valid and not in the error state.
-   */
-  bool _needsComputing(AnalysisTarget target, ResultDescriptor result) {
-    CacheState state = analysisCache.getState(target, result);
-    return state != CacheState.VALID && state != CacheState.ERROR;
-  }
-
-  /**
-   * The given [library] source was changed or removed.
-   * Update [libraryPartsMap] and [partLibrariesMap].
-   */
-  void _onLibrarySourceChangedOrRemoved(Source library) {
-    List<Source> parts = libraryPartsMap.remove(library);
-    if (parts != null) {
-      for (Source part in parts) {
-        List<Source> libraries = partLibrariesMap[part];
-        if (libraries != null) {
-          libraries.remove(library);
-          _invalidateContainingLibraries(part);
-        }
-      }
-    }
-    _invalidateContainingLibraries(library);
-  }
-
-  /**
-   * Schedule computing [RESOLVED_UNIT] for the given [librarySource].
-   * If errors should be computed, then schedule [LIBRARY_ERRORS_READY] instead,
-   * it also computes [RESOLVED_UNIT] in process.
-   */
-  void _schedulePriorityLibrarySourceAnalysis(Source librarySource) {
-    bool needErrors = _shouldErrorsBeComputed(librarySource);
-    if (needErrors) {
-      addPriorityResult(librarySource, LIBRARY_ERRORS_READY);
-    } else {
-      var target = new LibrarySpecificUnit(librarySource, librarySource);
-      addPriorityResult(target, RESOLVED_UNIT);
-    }
-  }
-
-  bool _shouldErrorsBeComputed(Source source) =>
-      context.shouldErrorsBeAnalyzed(source);
-
-  static bool _isDartSource(AnalysisTarget target) {
-    return target is Source && AnalysisEngine.isDartFileName(target.fullName);
-  }
-}
diff --git a/pkg/analyzer/lib/src/task/driver.dart b/pkg/analyzer/lib/src/task/driver.dart
index c7f12e2..843041d 100644
--- a/pkg/analyzer/lib/src/task/driver.dart
+++ b/pkg/analyzer/lib/src/task/driver.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/task/general.dart b/pkg/analyzer/lib/src/task/general.dart
index 446f14a..5fcb776 100644
--- a/pkg/analyzer/lib/src/task/general.dart
+++ b/pkg/analyzer/lib/src/task/general.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/task/html.dart b/pkg/analyzer/lib/src/task/html.dart
deleted file mode 100644
index 502db66..0000000
--- a/pkg/analyzer/lib/src/task/html.dart
+++ /dev/null
@@ -1,416 +0,0 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/error/error.dart';
-import 'package:analyzer/exception/exception.dart';
-import 'package:analyzer/src/context/cache.dart';
-import 'package:analyzer/src/dart/scanner/scanner.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/java_engine.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/plugin/engine_plugin.dart';
-import 'package:analyzer/src/task/api/dart.dart';
-import 'package:analyzer/src/task/api/general.dart';
-import 'package:analyzer/src/task/api/html.dart';
-import 'package:analyzer/src/task/api/model.dart';
-import 'package:analyzer/src/task/general.dart';
-import 'package:html/dom.dart';
-import 'package:html/parser.dart';
-import 'package:source_span/source_span.dart';
-
-/**
- * The Dart scripts that are embedded in an HTML file.
- */
-final ListResultDescriptor<DartScript> DART_SCRIPTS =
-    new ListResultDescriptor<DartScript>('DART_SCRIPTS', const <DartScript>[]);
-
-/**
- * The errors found while parsing an HTML file.
- */
-final ListResultDescriptor<AnalysisError> HTML_DOCUMENT_ERRORS =
-    new ListResultDescriptor<AnalysisError>(
-        'HTML_DOCUMENT_ERRORS', AnalysisError.NO_ERRORS);
-
-/**
- * A Dart script that is embedded in an HTML file.
- */
-class DartScript implements Source {
-  /**
-   * The source containing this script.
-   */
-  final Source source;
-
-  /**
-   * The fragments that comprise this content of the script.
-   */
-  final List<ScriptFragment> fragments;
-
-  /**
-   * Initialize a newly created script in the given [source] that is composed of
-   * given [fragments].
-   */
-  DartScript(this.source, this.fragments);
-
-  @override
-  TimestampedData<String> get contents =>
-      new TimestampedData(modificationStamp, fragments[0].content);
-
-  @override
-  String get encoding => source.encoding;
-
-  @override
-  String get fullName => source.fullName;
-
-  @override
-  bool get isInSystemLibrary => source.isInSystemLibrary;
-
-  @override
-  Source get librarySource => source;
-
-  @override
-  int get modificationStamp => source.modificationStamp;
-
-  @override
-  String get shortName => source.shortName;
-
-  @override
-  Uri get uri => source.uri
-      .replace(queryParameters: {'offset': fragments[0].offset.toString()});
-
-  @override
-  UriKind get uriKind =>
-      throw new StateError('uriKind not supported for scripts');
-
-  @override
-  bool exists() => source.exists();
-}
-
-/**
- * A task that looks for Dart scripts in an HTML file and computes both the Dart
- * libraries that are referenced by those scripts and the embedded Dart scripts.
- */
-class DartScriptsTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the [HTML_DOCUMENT] input.
-   */
-  static const String DOCUMENT_INPUT = 'DOCUMENT';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'DartScriptsTask',
-      createTask,
-      buildInputs,
-      <ResultDescriptor>[DART_SCRIPTS, REFERENCED_LIBRARIES]);
-
-  DartScriptsTask(InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    //
-    // Prepare inputs.
-    //
-    Source source = target.source;
-    Document document = getRequiredInput(DOCUMENT_INPUT);
-    //
-    // Process the script tags.
-    //
-    List<Source> libraries = <Source>[];
-    List<DartScript> inlineScripts = <DartScript>[];
-    List<Element> scripts = document.getElementsByTagName('script');
-    for (Element script in scripts) {
-      Map<dynamic, String> attributes = script.attributes;
-      if (attributes['type'] == 'application/dart') {
-        String src = attributes['src'];
-        if (src == null) {
-          if (script.hasContent()) {
-            List<ScriptFragment> fragments = <ScriptFragment>[];
-            for (Node node in script.nodes) {
-              if (node.nodeType == Node.TEXT_NODE) {
-                FileLocation start = node.sourceSpan.start;
-                fragments.add(new ScriptFragment(start.offset, start.line,
-                    start.column, (node as Text).data));
-              }
-            }
-            inlineScripts.add(new DartScript(source, fragments));
-          }
-        } else if (AnalysisEngine.isDartFileName(src)) {
-          Source source = context.sourceFactory.resolveUri(target.source, src);
-          if (source != null) {
-            libraries.add(source);
-          }
-        }
-      }
-    }
-    //
-    // Record outputs.
-    //
-    outputs[REFERENCED_LIBRARIES] =
-        libraries.isEmpty ? const <Source>[] : libraries;
-    outputs[DART_SCRIPTS] =
-        inlineScripts.isEmpty ? const <DartScript>[] : inlineScripts;
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the
-   * given [target].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    return <String, TaskInput>{DOCUMENT_INPUT: HTML_DOCUMENT.of(target)};
-  }
-
-  /**
-   * Create a [DartScriptsTask] based on the given [target] in the given
-   * [context].
-   */
-  static DartScriptsTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new DartScriptsTask(context, target);
-  }
-}
-
-/**
- * A task that merges all of the errors for a single source into a single list
- * of errors.
- */
-class HtmlErrorsTask extends SourceBasedAnalysisTask {
-  /**
-   * The suffix to add to the names of contributed error results.
-   */
-  static const String INPUT_SUFFIX = '_input';
-
-  /**
-   * The name of the input that is a list of errors from each of the embedded
-   * Dart scripts.
-   */
-  static const String DART_ERRORS_INPUT = 'DART_ERRORS';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor('HtmlErrorsTask',
-      createTask, buildInputs, <ResultDescriptor>[HTML_ERRORS]);
-
-  HtmlErrorsTask(InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    EnginePlugin enginePlugin = AnalysisEngine.instance.enginePlugin;
-    //
-    // Prepare inputs.
-    //
-    List<List<AnalysisError>> dartErrors = getRequiredInput(DART_ERRORS_INPUT);
-    List<List<AnalysisError>> htmlErrors = <List<AnalysisError>>[];
-    for (ResultDescriptor result in enginePlugin.htmlErrors) {
-      String inputName = result.name + INPUT_SUFFIX;
-      htmlErrors.add(getRequiredInput(inputName));
-    }
-    //
-    // Compute the error list.
-    //
-    List<List<AnalysisError>> errorLists = <List<AnalysisError>>[];
-    errorLists.addAll(dartErrors);
-    errorLists.addAll(htmlErrors);
-    //
-    // Record outputs.
-    //
-    outputs[HTML_ERRORS] = AnalysisError.mergeLists(errorLists);
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the
-   * given [target].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget target) {
-    EnginePlugin enginePlugin = AnalysisEngine.instance.enginePlugin;
-    Map<String, TaskInput> inputs = <String, TaskInput>{
-      DART_ERRORS_INPUT: DART_SCRIPTS.of(target).toListOf(DART_ERRORS)
-    };
-    for (ResultDescriptor result in enginePlugin.htmlErrors) {
-      String inputName = result.name + INPUT_SUFFIX;
-      inputs[inputName] = result.of(target);
-    }
-    return inputs;
-  }
-
-  /**
-   * Create an [HtmlErrorsTask] based on the given [target] in the given
-   * [context].
-   */
-  static HtmlErrorsTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new HtmlErrorsTask(context, target);
-  }
-}
-
-/**
- * A task that scans the content of a file, producing a set of Dart tokens.
- */
-class ParseHtmlTask extends SourceBasedAnalysisTask {
-  /**
-   * The name of the input whose value is the content of the file.
-   */
-  static const String CONTENT_INPUT_NAME = 'CONTENT_INPUT_NAME';
-
-  /**
-   * The name of the input whose value is the modification time of the file.
-   */
-  static const String MODIFICATION_TIME_INPUT = 'MODIFICATION_TIME_INPUT';
-
-  /**
-   * The task descriptor describing this kind of task.
-   */
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'ParseHtmlTask',
-      createTask,
-      buildInputs,
-      <ResultDescriptor>[HTML_DOCUMENT, HTML_DOCUMENT_ERRORS, LINE_INFO],
-      suitabilityFor: suitabilityFor);
-
-  /**
-   * Initialize a newly created task to access the content of the source
-   * associated with the given [target] in the given [context].
-   */
-  ParseHtmlTask(InternalAnalysisContext context, AnalysisTarget target)
-      : super(context, target);
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  @override
-  void internalPerform() {
-    String content = getRequiredInput(CONTENT_INPUT_NAME);
-
-    int modificationTime = getRequiredInput(MODIFICATION_TIME_INPUT);
-    if (modificationTime < 0) {
-      String message = 'Content could not be read';
-      if (context is InternalAnalysisContext) {
-        CacheEntry entry =
-            (context as InternalAnalysisContext).getCacheEntry(target);
-        CaughtException exception = entry.exception;
-        if (exception != null) {
-          message = exception.toString();
-        }
-      }
-
-      outputs[HTML_DOCUMENT] = new Document();
-      outputs[HTML_DOCUMENT_ERRORS] = <AnalysisError>[
-        new AnalysisError(
-            target.source, 0, 0, ScannerErrorCode.UNABLE_GET_CONTENT, [message])
-      ];
-      outputs[LINE_INFO] = new LineInfo(<int>[0]);
-    } else {
-      HtmlParser parser = new HtmlParser(content,
-          generateSpans: true, lowercaseAttrName: false);
-      parser.compatMode = 'quirks';
-      Document document = parser.parse();
-      //
-      // Convert errors.
-      //
-      List<AnalysisError> errors = <AnalysisError>[];
-      // TODO(scheglov) https://github.com/dart-lang/sdk/issues/24643
-//      List<ParseError> parseErrors = parser.errors;
-//      for (ParseError parseError in parseErrors) {
-//        if (parseError.errorCode == 'expected-doctype-but-got-start-tag') {
-//          continue;
-//        }
-//        SourceSpan span = parseError.span;
-//        errors.add(new AnalysisError(target.source, span.start.offset,
-//            span.length, HtmlErrorCode.PARSE_ERROR, [parseError.message]));
-//      }
-      //
-      // Record outputs.
-      //
-      outputs[HTML_DOCUMENT] = document;
-      outputs[HTML_DOCUMENT_ERRORS] = errors;
-      outputs[LINE_INFO] = _computeLineInfo(content);
-    }
-  }
-
-  /**
-   * Return a map from the names of the inputs of this kind of task to the task
-   * input descriptors describing those inputs for a task with the given
-   * [source].
-   */
-  static Map<String, TaskInput> buildInputs(AnalysisTarget source) {
-    return <String, TaskInput>{
-      CONTENT_INPUT_NAME: CONTENT.of(source),
-      MODIFICATION_TIME_INPUT: MODIFICATION_TIME.of(source)
-    };
-  }
-
-  /**
-   * Create a [ParseHtmlTask] based on the given [target] in the given [context].
-   */
-  static ParseHtmlTask createTask(
-      AnalysisContext context, AnalysisTarget target) {
-    return new ParseHtmlTask(context, target);
-  }
-
-  /**
-   * Return an indication of how suitable this task is for the given [target].
-   */
-  static TaskSuitability suitabilityFor(AnalysisTarget target) {
-    if (target is Source) {
-      String name = target.shortName;
-      if (name.endsWith(AnalysisEngine.SUFFIX_HTML) ||
-          name.endsWith(AnalysisEngine.SUFFIX_HTM)) {
-        return TaskSuitability.HIGHEST;
-      }
-    }
-    return TaskSuitability.NONE;
-  }
-
-  /**
-   * Compute [LineInfo] for the given [content].
-   */
-  static LineInfo _computeLineInfo(String content) {
-    List<int> lineStarts = StringUtilities.computeLineStarts(content);
-    return new LineInfo(lineStarts);
-  }
-}
-
-/**
- * A fragment of a [DartScript].
- */
-class ScriptFragment {
-  /**
-   * The offset of the first character of the fragment, relative to the start of
-   * the containing source.
-   */
-  final int offset;
-
-  /**
-   * The line number of the line containing the first character of the fragment.
-   */
-  final int line;
-
-  /**
-   * The column number of the line containing the first character of the
-   * fragment.
-   */
-  final int column;
-
-  /**
-   * The content of the fragment.
-   */
-  final String content;
-
-  /**
-   * Initialize a newly created script fragment to have the given [offset] and
-   * [content].
-   */
-  ScriptFragment(this.offset, this.line, this.column, this.content);
-}
diff --git a/pkg/analyzer/lib/src/task/html_work_manager.dart b/pkg/analyzer/lib/src/task/html_work_manager.dart
deleted file mode 100644
index a7038d1..0000000
--- a/pkg/analyzer/lib/src/task/html_work_manager.dart
+++ /dev/null
@@ -1,250 +0,0 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:collection';
-
-import 'package:analyzer/error/error.dart';
-import 'package:analyzer/src/context/cache.dart';
-import 'package:analyzer/src/generated/engine.dart'
-    show AnalysisEngine, AnalysisErrorInfo, CacheState, InternalAnalysisContext;
-import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/utilities_collection.dart';
-import 'package:analyzer/src/task/api/html.dart';
-import 'package:analyzer/src/task/api/model.dart';
-import 'package:analyzer/src/task/html.dart';
-
-/**
- * The manager for HTML specific analysis.
- */
-class HtmlWorkManager implements WorkManager {
-  /**
-   * The context for which work is being managed.
-   */
-  final InternalAnalysisContext context;
-
-  /**
-   * The [TargetedResult]s that should be computed with priority.
-   */
-  final LinkedHashSet<TargetedResult> priorityResultQueue =
-      new LinkedHashSet<TargetedResult>();
-
-  /**
-   * The HTML sources.
-   */
-  final LinkedHashSet<Source> sourceQueue = new LinkedHashSet<Source>();
-
-  /**
-   * Initialize a newly created manager.
-   */
-  HtmlWorkManager(this.context) {
-    context.onResultInvalidated.listen(onResultInvalidated);
-  }
-
-  /**
-   * Returns the correctly typed result of `context.analysisCache`.
-   */
-  AnalysisCache get analysisCache => context.analysisCache;
-
-  /**
-   * The partition that contains analysis results that are not shared with other
-   * contexts.
-   */
-  CachePartition get privateAnalysisCachePartition =>
-      context.privateAnalysisCachePartition;
-
-  /**
-   * Specifies that the client want the given [result] of the given [target]
-   * to be computed with priority.
-   */
-  void addPriorityResult(AnalysisTarget target, ResultDescriptor result) {
-    priorityResultQueue.add(new TargetedResult(target, result));
-  }
-
-  @override
-  void applyChange(List<Source> addedSources, List<Source> changedSources,
-      List<Source> removedSources) {
-    addedSources = addedSources.where(_isHtmlSource).toList();
-    changedSources = changedSources.where(_isHtmlSource).toList();
-    removedSources = removedSources.where(_isHtmlSource).toList();
-    // source queue
-    sourceQueue.addAll(addedSources);
-    sourceQueue.addAll(changedSources);
-    sourceQueue.removeAll(removedSources);
-  }
-
-  @override
-  void applyPriorityTargets(List<AnalysisTarget> targets) {
-    // Unschedule the old targets.
-    List<TargetedResult> resultsToUnschedule = <TargetedResult>[];
-    for (TargetedResult result in priorityResultQueue) {
-      if (result.result == HTML_ERRORS) {
-        resultsToUnschedule.add(result);
-      }
-    }
-    priorityResultQueue.removeAll(resultsToUnschedule);
-    // Schedule new targets.
-    for (AnalysisTarget target in targets) {
-      if (_isHtmlSource(target)) {
-        addPriorityResult(target, HTML_ERRORS);
-      }
-    }
-  }
-
-  @override
-  List<AnalysisError> getErrors(Source source) {
-    if (!_isHtmlSource(source)) {
-      return AnalysisError.NO_ERRORS;
-    }
-    // If analysis is finished, use all the errors.
-    if (analysisCache.getState(source, HTML_ERRORS) == CacheState.VALID) {
-      return analysisCache.getValue(source, HTML_ERRORS);
-    }
-    // If analysis is in progress, combine all known partial results.
-    List<AnalysisError> errors = <AnalysisError>[];
-    errors.addAll(analysisCache.getValue(source, HTML_DOCUMENT_ERRORS));
-    List<DartScript> scripts = analysisCache.getValue(source, DART_SCRIPTS);
-    for (DartScript script in scripts) {
-      errors.addAll(context.getErrors(script).errors);
-    }
-    return errors;
-  }
-
-  @override
-  TargetedResult getNextResult() {
-    // Try to find a priority result to compute.
-    while (priorityResultQueue.isNotEmpty) {
-      TargetedResult result = priorityResultQueue.first;
-      if (!_needsComputing(result.target, result.result)) {
-        priorityResultQueue.remove(result);
-        continue;
-      }
-      return result;
-    }
-    // Try to find a new HTML file to analyze.
-    while (sourceQueue.isNotEmpty) {
-      Source htmlSource = sourceQueue.first;
-      if (!_needsComputing(htmlSource, HTML_ERRORS)) {
-        sourceQueue.remove(htmlSource);
-        continue;
-      }
-      return new TargetedResult(htmlSource, HTML_ERRORS);
-    }
-    // No results to compute.
-    return null;
-  }
-
-  @override
-  WorkOrderPriority getNextResultPriority() {
-    if (priorityResultQueue.isNotEmpty) {
-      return WorkOrderPriority.PRIORITY;
-    }
-    if (sourceQueue.isNotEmpty) {
-      return WorkOrderPriority.NORMAL;
-    }
-    return WorkOrderPriority.NONE;
-  }
-
-  /**
-   * Notifies the manager about analysis options changes.
-   */
-  void onAnalysisOptionsChanged() {
-    _invalidateAllLocalResolutionInformation(false);
-  }
-
-  /**
-   * Notifies the manager that a result has been invalidated.
-   */
-  onResultInvalidated(InvalidatedResult event) {
-    ResultDescriptor descriptor = event.descriptor;
-    if (descriptor == HTML_ERRORS) {
-      sourceQueue.add(event.entry.target);
-    } else if (descriptor == DART_SCRIPTS) {
-      // TODO(brianwilkerson) Remove the scripts from the DartWorkManager's
-      // queues.
-    }
-  }
-
-  /**
-   * Notifies the manager about [SourceFactory] changes.
-   */
-  void onSourceFactoryChanged() {
-    _invalidateAllLocalResolutionInformation(true);
-  }
-
-  @override
-  void resultsComputed(
-      AnalysisTarget target, Map<ResultDescriptor, dynamic> outputs) {
-    // Update notice.
-    if (_isHtmlSource(target)) {
-      bool shouldSetErrors = false;
-      outputs.forEach((ResultDescriptor descriptor, value) {
-        if (descriptor == HTML_ERRORS) {
-          shouldSetErrors = true;
-        } else if (descriptor == DART_SCRIPTS) {
-          // List<DartScript> scripts = value;
-          if (priorityResultQueue.contains(target)) {
-            // TODO(brianwilkerson) Add the scripts to the DartWorkManager's
-            // priority queue.
-          } else {
-            // TODO(brianwilkerson) Add the scripts to the DartWorkManager's
-            // library queue.
-          }
-        }
-      });
-      if (shouldSetErrors) {
-        AnalysisErrorInfo info = context.getErrors(target);
-        context.getNotice(target).setErrors(info.errors, info.lineInfo);
-      }
-    }
-  }
-
-  /**
-   * Invalidate all of the resolution results computed by this context. The flag
-   * [invalidateUris] should be `true` if the cached results of converting URIs
-   * to source files should also be invalidated.
-   */
-  void _invalidateAllLocalResolutionInformation(bool invalidateUris) {
-    CachePartition partition = privateAnalysisCachePartition;
-    // Prepare targets and values to invalidate.
-    List<Source> htmlSources = <Source>[];
-    List<DartScript> scriptTargets = <DartScript>[];
-    MapIterator<AnalysisTarget, CacheEntry> iterator = partition.iterator();
-    while (iterator.moveNext()) {
-      AnalysisTarget target = iterator.key;
-      if (_isHtmlSource(target)) {
-        htmlSources.add(target);
-      }
-      if (target is DartScript) {
-        scriptTargets.add(target);
-      }
-    }
-    // Invalidate targets and values.
-    scriptTargets.forEach(partition.remove);
-    for (Source htmlSource in htmlSources) {
-      CacheEntry entry = partition.get(htmlSource);
-      if (entry != null) {
-        entry.setState(HTML_ERRORS, CacheState.INVALID);
-        if (invalidateUris) {
-          entry.setState(REFERENCED_LIBRARIES, CacheState.INVALID);
-        }
-      }
-    }
-  }
-
-  /**
-   * Returns `true` if the given [result] of the given [target] needs
-   * computing, i.e. it is not in the valid and not in the error state.
-   */
-  bool _needsComputing(AnalysisTarget target, ResultDescriptor result) {
-    CacheState state = analysisCache.getState(target, result);
-    return state != CacheState.VALID && state != CacheState.ERROR;
-  }
-
-  /**
-   * Return `true` if the given target is an HTML source.
-   */
-  static bool _isHtmlSource(AnalysisTarget target) {
-    return target is Source && AnalysisEngine.isHtmlFileName(target.fullName);
-  }
-}
diff --git a/pkg/analyzer/lib/src/task/inputs.dart b/pkg/analyzer/lib/src/task/inputs.dart
index d490238..30fd2446e 100644
--- a/pkg/analyzer/lib/src/task/inputs.dart
+++ b/pkg/analyzer/lib/src/task/inputs.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/task/manager.dart b/pkg/analyzer/lib/src/task/manager.dart
index 40778cb..009afaf 100644
--- a/pkg/analyzer/lib/src/task/manager.dart
+++ b/pkg/analyzer/lib/src/task/manager.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/task/model.dart b/pkg/analyzer/lib/src/task/model.dart
index a84a960..ec62312 100644
--- a/pkg/analyzer/lib/src/task/model.dart
+++ b/pkg/analyzer/lib/src/task/model.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/task/options.dart b/pkg/analyzer/lib/src/task/options.dart
index 8c56720..9bc342b 100644
--- a/pkg/analyzer/lib/src/task/options.dart
+++ b/pkg/analyzer/lib/src/task/options.dart
@@ -19,22 +19,93 @@
 import 'package:analyzer/src/lint/options_rule_validator.dart';
 import 'package:analyzer/src/lint/registry.dart';
 import 'package:analyzer/src/plugin/options.dart';
-import 'package:analyzer/src/task/api/general.dart';
-import 'package:analyzer/src/task/api/model.dart';
-import 'package:analyzer/src/task/general.dart';
 import 'package:analyzer/src/util/yaml.dart';
 import 'package:source_span/source_span.dart';
 import 'package:yaml/yaml.dart';
 
-/// The errors produced while parsing an analysis options file.
-///
-/// The list will be empty if there were no errors, but will not be `null`.
-final ListResultDescriptor<AnalysisError> ANALYSIS_OPTIONS_ERRORS =
-    new ListResultDescriptor<AnalysisError>(
-        'ANALYSIS_OPTIONS_ERRORS', AnalysisError.NO_ERRORS);
-
 final _OptionsProcessor _processor = new _OptionsProcessor();
 
+List<AnalysisError> analyzeAnalysisOptions(
+    Source source, String content, SourceFactory sourceFactory) {
+  List<AnalysisError> errors = <AnalysisError>[];
+  Source initialSource = source;
+  SourceSpan initialIncludeSpan;
+  AnalysisOptionsProvider optionsProvider =
+      new AnalysisOptionsProvider(sourceFactory);
+
+  // Validate the specified options and any included option files
+  void validate(Source source, YamlMap options) {
+    List<AnalysisError> validationErrors =
+        new OptionsFileValidator(source).validate(options);
+    if (initialIncludeSpan != null && validationErrors.isNotEmpty) {
+      for (AnalysisError error in validationErrors) {
+        var args = [
+          source.fullName,
+          error.offset.toString(),
+          (error.offset + error.length - 1).toString(),
+          error.message,
+        ];
+        errors.add(new AnalysisError(
+            initialSource,
+            initialIncludeSpan.start.column + 1,
+            initialIncludeSpan.length,
+            AnalysisOptionsWarningCode.INCLUDED_FILE_WARNING,
+            args));
+      }
+    } else {
+      errors.addAll(validationErrors);
+    }
+
+    YamlNode node = getValue(options, AnalyzerOptions.include);
+    if (node == null) {
+      return;
+    }
+    SourceSpan span = node.span;
+    initialIncludeSpan ??= span;
+    String includeUri = span.text;
+    Source includedSource = sourceFactory.resolveUri(source, includeUri);
+    if (includedSource == null || !includedSource.exists()) {
+      errors.add(new AnalysisError(
+          initialSource,
+          initialIncludeSpan.start.column + 1,
+          initialIncludeSpan.length,
+          AnalysisOptionsWarningCode.INCLUDE_FILE_NOT_FOUND,
+          [includeUri, source.fullName]));
+      return;
+    }
+    try {
+      YamlMap options =
+          optionsProvider.getOptionsFromString(includedSource.contents.data);
+      validate(includedSource, options);
+    } on OptionsFormatException catch (e) {
+      var args = [
+        includedSource.fullName,
+        e.span.start.offset.toString(),
+        e.span.end.offset.toString(),
+        e.message,
+      ];
+      // Report errors for included option files
+      // on the include directive located in the initial options file.
+      errors.add(new AnalysisError(
+          initialSource,
+          initialIncludeSpan.start.column + 1,
+          initialIncludeSpan.length,
+          AnalysisOptionsErrorCode.INCLUDED_FILE_PARSE_ERROR,
+          args));
+    }
+  }
+
+  try {
+    YamlMap options = optionsProvider.getOptionsFromString(content);
+    validate(source, options);
+  } on OptionsFormatException catch (e) {
+    SourceSpan span = e.span;
+    errors.add(new AnalysisError(source, span.start.column + 1, span.length,
+        AnalysisOptionsErrorCode.PARSE_ERROR, [e.message]));
+  }
+  return errors;
+}
+
 void applyToAnalysisOptions(AnalysisOptionsImpl options, YamlMap optionMap) {
   _processor.applyToAnalysisOptions(options, optionMap);
 }
@@ -50,14 +121,22 @@
   static const String exclude = 'exclude';
   static const String include = 'include';
   static const String language = 'language';
+  static const String optionalChecks = 'optional-checks';
   static const String plugins = 'plugins';
   static const String strong_mode = 'strong-mode';
 
+  // Optional checks options.
+  static const String chromeOsManifestChecks = 'chrome-os-manifest-checks';
+
   // Strong mode options (see AnalysisOptionsImpl for documentation).
   static const String declarationCasts = 'declaration-casts';
   static const String implicitCasts = 'implicit-casts';
   static const String implicitDynamic = 'implicit-dynamic';
 
+  // Language options (see AnalysisOptionsImpl for documentation).
+  static const String strictInference = 'strict-inference';
+  static const String strictRawTypes = 'strict-raw-types';
+
   /// Ways to say `ignore`.
   static const List<String> ignoreSynonyms = const ['ignore', 'false'];
 
@@ -77,6 +156,7 @@
     errors,
     exclude,
     language,
+    optionalChecks,
     plugins,
     strong_mode,
   ];
@@ -89,7 +169,15 @@
   ];
 
   /// Supported `analyzer` language options.
-  static const List<String> languageOptions = const [];
+  static const List<String> languageOptions = const [
+    strictInference,
+    strictRawTypes
+  ];
+
+  // Supported 'analyzer' optional checks options.
+  static const List<String> optionalCecksOptions = const [
+    chromeOsManifestChecks,
+  ];
 }
 
 /// Validates `analyzer` options.
@@ -100,7 +188,8 @@
           new StrongModeOptionValueValidator(),
           new ErrorFilterOptionValidator(),
           new EnabledExperimentsValidator(),
-          new LanguageOptionValidator()
+          new LanguageOptionValidator(),
+          new OptionalChecksValueValidator()
         ]);
 }
 
@@ -266,153 +355,6 @@
   }
 }
 
-/// A task that generates errors for an analysis options file.
-class GenerateOptionsErrorsTask extends SourceBasedAnalysisTask {
-  /// The name of the input whose value is the content of the file.
-  static const String CONTENT_INPUT_NAME = 'CONTENT_INPUT_NAME';
-
-  /// The task descriptor describing this kind of task.
-  static final TaskDescriptor DESCRIPTOR = new TaskDescriptor(
-      'GenerateOptionsErrorsTask',
-      createTask,
-      buildInputs,
-      <ResultDescriptor>[ANALYSIS_OPTIONS_ERRORS, LINE_INFO],
-      suitabilityFor: suitabilityFor);
-
-  AnalysisOptionsProvider optionsProvider;
-
-  GenerateOptionsErrorsTask(AnalysisContext context, AnalysisTarget target)
-      : super(context, target) {
-    optionsProvider = new AnalysisOptionsProvider(context?.sourceFactory);
-  }
-
-  @override
-  TaskDescriptor get descriptor => DESCRIPTOR;
-
-  Source get source => target.source;
-
-  @override
-  void internalPerform() {
-    String content = getRequiredInput(CONTENT_INPUT_NAME);
-    //
-    // Record outputs.
-    //
-    outputs[ANALYSIS_OPTIONS_ERRORS] =
-        analyzeAnalysisOptions(source, content, context?.sourceFactory);
-    outputs[LINE_INFO] = computeLineInfo(content);
-  }
-
-  static List<AnalysisError> analyzeAnalysisOptions(
-      Source source, String content, SourceFactory sourceFactory) {
-    List<AnalysisError> errors = <AnalysisError>[];
-    Source initialSource = source;
-    SourceSpan initialIncludeSpan;
-    AnalysisOptionsProvider optionsProvider =
-        new AnalysisOptionsProvider(sourceFactory);
-
-    // Validate the specified options and any included option files
-    void validate(Source source, YamlMap options) {
-      List<AnalysisError> validationErrors =
-          new OptionsFileValidator(source).validate(options);
-      if (initialIncludeSpan != null && validationErrors.isNotEmpty) {
-        for (AnalysisError error in validationErrors) {
-          var args = [
-            source.fullName,
-            error.offset.toString(),
-            (error.offset + error.length - 1).toString(),
-            error.message,
-          ];
-          errors.add(new AnalysisError(
-              initialSource,
-              initialIncludeSpan.start.column + 1,
-              initialIncludeSpan.length,
-              AnalysisOptionsWarningCode.INCLUDED_FILE_WARNING,
-              args));
-        }
-      } else {
-        errors.addAll(validationErrors);
-      }
-
-      YamlNode node = getValue(options, AnalyzerOptions.include);
-      if (node == null) {
-        return;
-      }
-      SourceSpan span = node.span;
-      initialIncludeSpan ??= span;
-      String includeUri = span.text;
-      Source includedSource = sourceFactory.resolveUri(source, includeUri);
-      if (includedSource == null || !includedSource.exists()) {
-        errors.add(new AnalysisError(
-            initialSource,
-            initialIncludeSpan.start.column + 1,
-            initialIncludeSpan.length,
-            AnalysisOptionsWarningCode.INCLUDE_FILE_NOT_FOUND,
-            [includeUri, source.fullName]));
-        return;
-      }
-      try {
-        YamlMap options =
-            optionsProvider.getOptionsFromString(includedSource.contents.data);
-        validate(includedSource, options);
-      } on OptionsFormatException catch (e) {
-        var args = [
-          includedSource.fullName,
-          e.span.start.offset.toString(),
-          e.span.end.offset.toString(),
-          e.message,
-        ];
-        // Report errors for included option files
-        // on the include directive located in the initial options file.
-        errors.add(new AnalysisError(
-            initialSource,
-            initialIncludeSpan.start.column + 1,
-            initialIncludeSpan.length,
-            AnalysisOptionsErrorCode.INCLUDED_FILE_PARSE_ERROR,
-            args));
-      }
-    }
-
-    try {
-      YamlMap options = optionsProvider.getOptionsFromString(content);
-      validate(source, options);
-    } on OptionsFormatException catch (e) {
-      SourceSpan span = e.span;
-      errors.add(new AnalysisError(source, span.start.column + 1, span.length,
-          AnalysisOptionsErrorCode.PARSE_ERROR, [e.message]));
-    }
-    return errors;
-  }
-
-  /// Return a map from the names of the inputs of this kind of task to the
-  /// task input descriptors describing those inputs for a task with the
-  /// given [target].
-  static Map<String, TaskInput> buildInputs(AnalysisTarget source) =>
-      <String, TaskInput>{CONTENT_INPUT_NAME: CONTENT.of(source)};
-
-  /// Compute [LineInfo] for the given [content].
-  static LineInfo computeLineInfo(String content) {
-    List<int> lineStarts = StringUtilities.computeLineStarts(content);
-    return new LineInfo(lineStarts);
-  }
-
-  /// Create a task based on the given [target] in the given [context].
-  static GenerateOptionsErrorsTask createTask(
-          AnalysisContext context, AnalysisTarget target) =>
-      new GenerateOptionsErrorsTask(context, target);
-
-  /**
-   * Return an indication of how suitable this task is for the given [target].
-   */
-  static TaskSuitability suitabilityFor(AnalysisTarget target) {
-    if (target is Source &&
-        (target.shortName == AnalysisEngine.ANALYSIS_OPTIONS_FILE ||
-            target.shortName == AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE)) {
-      return TaskSuitability.HIGHEST;
-    }
-    return TaskSuitability.NONE;
-  }
-}
-
 /// Validates `analyzer` language configuration options.
 class LanguageOptionValidator extends OptionsValidator {
   ErrorBuilder builder = new ErrorBuilder(AnalyzerOptions.languageOptions);
@@ -553,6 +495,43 @@
   }
 }
 
+/// Validates `analyzer` optional-checks value configuration options.
+class OptionalChecksValueValidator extends OptionsValidator {
+  ErrorBuilder builder = new ErrorBuilder(AnalyzerOptions.optionalCecksOptions);
+  ErrorBuilder trueOrFalseBuilder = new TrueOrFalseValueErrorBuilder();
+
+  @override
+  void validate(ErrorReporter reporter, YamlMap options) {
+    var analyzer = getValue(options, AnalyzerOptions.analyzer);
+    if (analyzer is YamlMap) {
+      var v = getValue(analyzer, AnalyzerOptions.optionalChecks);
+      if (v is YamlScalar) {
+        var value = toLowerCase(v.value);
+        if (value != AnalyzerOptions.chromeOsManifestChecks) {
+          builder.reportError(
+              reporter, AnalyzerOptions.chromeOsManifestChecks, v);
+        }
+      } else if (v is YamlMap) {
+        v.nodes.forEach((k, v) {
+          String key, value;
+          if (k is YamlScalar) {
+            key = k.value?.toString();
+            if (key != AnalyzerOptions.chromeOsManifestChecks) {
+              builder.reportError(
+                  reporter, AnalyzerOptions.chromeOsManifestChecks, k);
+            } else {
+              value = toLowerCase(v.value);
+              if (!AnalyzerOptions.trueOrFalse.contains(value)) {
+                trueOrFalseBuilder.reportError(reporter, key, v);
+              }
+            }
+          }
+        });
+      }
+    }
+  }
+}
+
 /// Validates `analyzer` top-level options.
 class TopLevelAnalyzerOptionsValidator extends TopLevelOptionValidator {
   TopLevelAnalyzerOptionsValidator()
@@ -641,6 +620,10 @@
         options.enabledExperiments = enabledExperiments;
       }
 
+      // Process optional checks options.
+      var optionalChecks = getValue(analyzer, AnalyzerOptions.optionalChecks);
+      _applyOptionalChecks(options, optionalChecks);
+
       // Process language options.
       var language = getValue(analyzer, AnalyzerOptions.language);
       _applyLanguageOptions(options, language);
@@ -696,7 +679,12 @@
       AnalysisOptionsImpl options, Object feature, Object value) {
     bool boolValue = toBool(value);
     if (boolValue != null) {
-      // Currently no supported language options.
+      if (feature == AnalyzerOptions.strictInference) {
+        options.strictInference = boolValue;
+      }
+      if (feature == AnalyzerOptions.strictRawTypes) {
+        options.strictRawTypes = boolValue;
+      }
     }
   }
 
@@ -739,6 +727,31 @@
     }
   }
 
+  void _applyOptionalChecksOption(
+      AnalysisOptionsImpl options, String feature, Object value) {
+    bool boolValue = toBool(value);
+    if (boolValue != null) {
+      if (feature == AnalyzerOptions.chromeOsManifestChecks) {
+        options.chromeOsManifestChecks = boolValue;
+      }
+    }
+  }
+
+  void _applyOptionalChecks(AnalysisOptionsImpl options, YamlNode config) {
+    if (config is YamlMap) {
+      config.nodes.forEach((k, v) {
+        if (k is YamlScalar && v is YamlScalar) {
+          _applyOptionalChecksOption(options, k.value?.toString(), v.value);
+        }
+      });
+    }
+    if (config is YamlScalar) {
+      if (config.value?.toString() == AnalyzerOptions.chromeOsManifestChecks) {
+        options.chromeOsManifestChecks = true;
+      }
+    }
+  }
+
   String _toString(YamlNode node) {
     if (node is YamlScalar) {
       var value = node.value;
diff --git a/pkg/analyzer/lib/src/task/options_work_manager.dart b/pkg/analyzer/lib/src/task/options_work_manager.dart
deleted file mode 100644
index fab4ebe..0000000
--- a/pkg/analyzer/lib/src/task/options_work_manager.dart
+++ /dev/null
@@ -1,167 +0,0 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:collection';
-
-import 'package:analyzer/error/error.dart';
-import 'package:analyzer/src/context/cache.dart';
-import 'package:analyzer/src/generated/engine.dart'
-    show AnalysisEngine, AnalysisErrorInfo, CacheState, InternalAnalysisContext;
-import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/task/api/model.dart';
-import 'package:analyzer/src/task/options.dart';
-
-/// The manager for analysis options specific analysis.
-class OptionsWorkManager implements WorkManager {
-  /// The context for which work is being managed.
-  final InternalAnalysisContext context;
-
-  /// The options file sources.
-  final LinkedHashSet<Source> sourceQueue = new LinkedHashSet<Source>();
-
-  /// The [TargetedResult]s that should be computed with priority.
-  final LinkedHashSet<TargetedResult> priorityResultQueue =
-      new LinkedHashSet<TargetedResult>();
-
-  /// Initialize a newly created manager.
-  OptionsWorkManager(this.context) {
-    analysisCache.onResultInvalidated.listen(onResultInvalidated);
-  }
-
-  /// Returns the correctly typed result of `context.analysisCache`.
-  AnalysisCache get analysisCache => context.analysisCache;
-
-  /// Specifies that the client wants the given [result] of the given [target]
-  /// to be computed with priority.
-  void addPriorityResult(AnalysisTarget target, ResultDescriptor result) {
-    priorityResultQueue.add(new TargetedResult(target, result));
-  }
-
-  @override
-  void applyChange(List<Source> addedSources, List<Source> changedSources,
-      List<Source> removedSources) {
-    addedSources = addedSources.where(_isOptionsSource).toList();
-    changedSources = changedSources.where(_isOptionsSource).toList();
-    removedSources = removedSources.where(_isOptionsSource).toList();
-    // source queue
-    sourceQueue.addAll(addedSources);
-    sourceQueue.addAll(changedSources);
-    sourceQueue.removeAll(removedSources);
-  }
-
-  @override
-  void applyPriorityTargets(List<AnalysisTarget> targets) {
-    // Unschedule the old targets.
-    List<TargetedResult> resultsToUnschedule = <TargetedResult>[];
-    for (TargetedResult result in priorityResultQueue) {
-      if (result.result == ANALYSIS_OPTIONS_ERRORS) {
-        resultsToUnschedule.add(result);
-      }
-    }
-    priorityResultQueue.removeAll(resultsToUnschedule);
-    // Schedule new targets.
-    for (AnalysisTarget target in targets) {
-      if (_isOptionsSource(target)) {
-        addPriorityResult(target, ANALYSIS_OPTIONS_ERRORS);
-      }
-    }
-  }
-
-  @override
-  List<AnalysisError> getErrors(Source source) {
-    if (!_isOptionsSource(source)) {
-      return AnalysisError.NO_ERRORS;
-    }
-    // If analysis is finished, use all the errors.
-    if (analysisCache.getState(source, ANALYSIS_OPTIONS_ERRORS) ==
-        CacheState.VALID) {
-      return analysisCache.getValue(source, ANALYSIS_OPTIONS_ERRORS);
-    }
-    // No partial results.
-    return AnalysisError.NO_ERRORS;
-  }
-
-  @override
-  TargetedResult getNextResult() {
-    // Try to find a priority result to compute.
-    while (priorityResultQueue.isNotEmpty) {
-      TargetedResult result = priorityResultQueue.first;
-      if (!_needsComputing(result.target, result.result)) {
-        priorityResultQueue.remove(result);
-        continue;
-      }
-      return result;
-    }
-    // Try to find a new options file to analyze.
-    while (sourceQueue.isNotEmpty) {
-      Source optionsSource = sourceQueue.first;
-      if (!_needsComputing(optionsSource, ANALYSIS_OPTIONS_ERRORS)) {
-        sourceQueue.remove(optionsSource);
-        continue;
-      }
-      return new TargetedResult(optionsSource, ANALYSIS_OPTIONS_ERRORS);
-    }
-    // No results to compute.
-    return null;
-  }
-
-  @override
-  WorkOrderPriority getNextResultPriority() {
-    if (priorityResultQueue.isNotEmpty) {
-      return WorkOrderPriority.PRIORITY;
-    }
-    if (sourceQueue.isNotEmpty) {
-      return WorkOrderPriority.NORMAL;
-    }
-    return WorkOrderPriority.NONE;
-  }
-
-  @override
-  void onAnalysisOptionsChanged() {
-    // Do nothing.
-  }
-
-  /// Notifies the manager that a result has been invalidated.
-  void onResultInvalidated(InvalidatedResult event) {
-    ResultDescriptor descriptor = event.descriptor;
-    if (descriptor == ANALYSIS_OPTIONS_ERRORS) {
-      sourceQueue.add(event.entry.target);
-    }
-  }
-
-  @override
-  void onSourceFactoryChanged() {
-    // Do nothing.
-  }
-
-  @override
-  void resultsComputed(
-      AnalysisTarget target, Map<ResultDescriptor, dynamic> outputs) {
-    // Update notice.
-    if (_isOptionsSource(target)) {
-      bool shouldSetErrors = false;
-      outputs.forEach((ResultDescriptor descriptor, value) {
-        if (descriptor == ANALYSIS_OPTIONS_ERRORS) {
-          shouldSetErrors = true;
-        }
-      });
-      if (shouldSetErrors) {
-        AnalysisErrorInfo info = context.getErrors(target);
-        context.getNotice(target).setErrors(info.errors, info.lineInfo);
-      }
-    }
-  }
-
-  /// Returns `true` if the given [result] of the given [target] needs
-  /// computing, i.e. it is not in the valid and not in the error state.
-  bool _needsComputing(AnalysisTarget target, ResultDescriptor result) {
-    CacheState state = analysisCache.getState(target, result);
-    return state != CacheState.VALID && state != CacheState.ERROR;
-  }
-
-  /// Return `true` if the given target is an analysis options source.
-  static bool _isOptionsSource(AnalysisTarget target) =>
-      target is Source &&
-      AnalysisEngine.isAnalysisOptionsFileName(target.fullName);
-}
diff --git a/pkg/analyzer/lib/src/task/strong/ast_properties.dart b/pkg/analyzer/lib/src/task/strong/ast_properties.dart
index d2fea4e..d2891ad 100644
--- a/pkg/analyzer/lib/src/task/strong/ast_properties.dart
+++ b/pkg/analyzer/lib/src/task/strong/ast_properties.dart
@@ -15,6 +15,9 @@
 const String _hasImplicitCasts = '_hasImplicitCasts';
 const String _implicitCast = '_implicitCast';
 const String _implicitOperationCast = '_implicitAssignmentCast';
+const String _implicitSpreadCast = '_implicitSpreadCast';
+const String _implicitSpreadKeyCast = '_implicitSpreadKeyCast';
+const String _implicitSpreadValueCast = '_implicitSpreadValueCast';
 const String _isDynamicInvoke = '_isDynamicInvoke';
 const String _superclassCovariantParameters = '_superclassCovariantParameters';
 
@@ -48,6 +51,24 @@
   return node.getProperty<DartType>(_implicitOperationCast);
 }
 
+/// If this expression is passed into a spread and the items in the spread need
+/// an implicit cast, return the type the items are coerced to.
+DartType getImplicitSpreadCast(Expression node) {
+  return node.getProperty<DartType>(_implicitSpreadCast);
+}
+
+/// If this expression is a map passed into a spread and the keys in the spread
+/// need an implicit cast, return the type the keys are coerced to.
+DartType getImplicitSpreadKeyCast(Expression node) {
+  return node.getProperty<DartType>(_implicitSpreadKeyCast);
+}
+
+/// If this expression is a map passed into a spread and the values in the
+/// spread need an implicit cast, return the type the values are coerced to.
+DartType getImplicitSpreadValueCast(Expression node) {
+  return node.getProperty<DartType>(_implicitSpreadValueCast);
+}
+
 /// Returns a list of parameters and method type parameters from mixins and
 /// superclasses of this class that need a stub method to check their type at
 /// runtime for soundness.
@@ -94,6 +115,21 @@
   node.setProperty(_implicitOperationCast, type);
 }
 
+/// Sets the result of [getImplicitSpreadCast] for this node.
+void setImplicitSpreadCast(Expression node, DartType type) {
+  node.setProperty(_implicitSpreadCast, type);
+}
+
+/// Sets the result of [getImplicitSpreadKeyCast] for this node.
+void setImplicitSpreadKeyCast(Expression node, DartType type) {
+  node.setProperty(_implicitSpreadKeyCast, type);
+}
+
+/// Sets the result of [getImplicitSpreadValueCast] for this node.
+void setImplicitSpreadValueCast(Expression node, DartType type) {
+  node.setProperty(_implicitSpreadValueCast, type);
+}
+
 /// Sets [isDynamicInvoke] property for this expression.
 void setIsDynamicInvoke(Expression node, bool value) {
   node.setProperty(_isDynamicInvoke, value == true ? true : null);
diff --git a/pkg/analyzer/lib/src/task/strong/checker.dart b/pkg/analyzer/lib/src/task/strong/checker.dart
index da18f90..0708ecf 100644
--- a/pkg/analyzer/lib/src/task/strong/checker.dart
+++ b/pkg/analyzer/lib/src/task/strong/checker.dart
@@ -18,6 +18,7 @@
 import 'package:analyzer/source/error_processor.dart' show ErrorProcessor;
 import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/dart/element/inheritance_manager2.dart';
 import 'package:analyzer/src/dart/element/member.dart';
 import 'package:analyzer/src/dart/element/type.dart';
 import 'package:analyzer/src/error/codes.dart' show StrongModeCode;
@@ -102,6 +103,9 @@
     return null;
   }
 
+  // TODO(jmesserly): I'm not sure this method will still return the correct
+  // type. This code may need to use InheritanceManager2.getMember instead,
+  // similar to the fix in _checkImplicitCovarianceCast.
   var name = member.name;
   var baseMember = member is PropertyAccessorElement
       ? (member.isGetter ? type.getGetter(name) : type.getSetter(name))
@@ -114,6 +118,7 @@
 class CodeChecker extends RecursiveAstVisitor {
   final Dart2TypeSystem rules;
   final TypeProvider typeProvider;
+  final InheritanceManager2 inheritance;
   final AnalysisErrorListener reporter;
   final AnalysisOptionsImpl _options;
   _OverrideChecker _overrideChecker;
@@ -123,7 +128,7 @@
   HashSet<ExecutableElement> _covariantPrivateMembers;
 
   CodeChecker(TypeProvider typeProvider, Dart2TypeSystem rules,
-      AnalysisErrorListener reporter, this._options)
+      this.inheritance, AnalysisErrorListener reporter, this._options)
       : typeProvider = typeProvider,
         rules = rules,
         reporter = reporter {
@@ -169,14 +174,28 @@
     if (element is ForElement) {
       checkCollectionElement(element.body, expectedType);
     } else if (element is IfElement) {
+      checkBoolean(element.condition);
       checkCollectionElement(element.thenElement, expectedType);
       checkCollectionElement(element.elseElement, expectedType);
     } else if (element is Expression) {
       checkAssignment(element, expectedType);
     } else if (element is SpreadElement) {
-      DartType iterableType =
-          typeProvider.iterableType.instantiate([expectedType]);
-      checkAssignment(element.expression, iterableType);
+      // Spread expression may be dynamic in which case it's implicitly downcast
+      // to Iterable<dynamic>
+      DartType expressionCastType =
+          typeProvider.iterableType.instantiate([DynamicTypeImpl.instance]);
+      checkAssignment(element.expression, expressionCastType);
+
+      var exprType = element.expression.staticType;
+      var asIterableType = exprType is InterfaceTypeImpl
+          ? exprType.asInstanceOf(typeProvider.iterableType.element)
+          : null;
+      var elementType =
+          asIterableType == null ? null : asIterableType.typeArguments[0];
+      // Items in the spread will then potentially be downcast to the expected
+      // type.
+      _checkImplicitCast(element.expression, expectedType,
+          from: elementType, forSpread: true);
     }
   }
 
@@ -193,15 +212,34 @@
     if (element is ForElement) {
       checkMapElement(element.body, expectedKeyType, expectedValueType);
     } else if (element is IfElement) {
+      checkBoolean(element.condition);
       checkMapElement(element.thenElement, expectedKeyType, expectedValueType);
       checkMapElement(element.elseElement, expectedKeyType, expectedValueType);
     } else if (element is MapLiteralEntry) {
       checkAssignment(element.key, expectedKeyType);
       checkAssignment(element.value, expectedValueType);
     } else if (element is SpreadElement) {
-      DartType mapType = typeProvider.mapType
-          .instantiate([expectedKeyType, expectedValueType]);
-      checkAssignment(element.expression, mapType);
+      // Spread expression may be dynamic in which case it's implicitly downcast
+      // to Map<dynamic, dynamic>
+      DartType expressionCastType = typeProvider.mapType
+          .instantiate([DynamicTypeImpl.instance, DynamicTypeImpl.instance]);
+      checkAssignment(element.expression, expressionCastType);
+
+      var exprType = element.expression.staticType;
+      var asMapType = exprType is InterfaceTypeImpl
+          ? exprType.asInstanceOf(typeProvider.mapType.element)
+          : null;
+
+      var elementKeyType =
+          asMapType == null ? null : asMapType.typeArguments[0];
+      var elementValueType =
+          asMapType == null ? null : asMapType.typeArguments[1];
+      // Keys and values in the spread will then potentially be downcast to
+      // the expected types.
+      _checkImplicitCast(element.expression, expectedKeyType,
+          from: elementKeyType, forSpreadKey: true);
+      _checkImplicitCast(element.expression, expectedValueType,
+          from: elementValueType, forSpreadValue: true);
     }
   }
 
@@ -389,46 +427,6 @@
   }
 
   @override
-  void visitForEachStatement(ForEachStatement node) {
-    var loopVariable = node.identifier ?? node.loopVariable?.identifier;
-
-    // Safely handle malformed statements.
-    if (loopVariable != null) {
-      // Find the element type of the sequence.
-      var sequenceInterface = node.awaitKeyword != null
-          ? typeProvider.streamType
-          : typeProvider.iterableType;
-      var iterableType = _getExpressionType(node.iterable);
-      var elementType =
-          rules.mostSpecificTypeArgument(iterableType, sequenceInterface);
-
-      // If the sequence is not an Iterable (or Stream for await for) but is a
-      // supertype of it, do an implicit downcast to Iterable<dynamic>. Then
-      // we'll do a separate cast of the dynamic element to the variable's type.
-      if (elementType == null) {
-        var sequenceType =
-            sequenceInterface.instantiate([DynamicTypeImpl.instance]);
-
-        if (rules.isSubtypeOf(sequenceType, iterableType)) {
-          _recordImplicitCast(node.iterable, sequenceType, from: iterableType);
-          elementType = DynamicTypeImpl.instance;
-        }
-      }
-
-      // If the sequence doesn't implement the interface at all, [ErrorVerifier]
-      // will report the error, so ignore it here.
-      if (elementType != null) {
-        // Insert a cast from the sequence's element type to the loop variable's
-        // if needed.
-        _checkImplicitCast(loopVariable, _getExpressionType(loopVariable),
-            from: elementType);
-      }
-    }
-
-    node.visitChildren(this);
-  }
-
-  @override
   void visitForPartsWithDeclarations(ForPartsWithDeclarations node) {
     if (node.condition != null) {
       checkBoolean(node.condition);
@@ -445,14 +443,6 @@
   }
 
   @override
-  void visitForStatement(ForStatement node) {
-    if (node.condition != null) {
-      checkBoolean(node.condition);
-    }
-    node.visitChildren(this);
-  }
-
-  @override
   void visitFunctionExpressionInvocation(FunctionExpressionInvocation node) {
     _checkFunctionApplication(node);
     node.visitChildren(this);
@@ -517,103 +507,11 @@
         }
       }
     }
-    NodeList<Expression> elements = node.elements;
-    for (int i = 0; i < elements.length; i++) {
-      checkArgument(elements[i], type);
-    }
-    super.visitListLiteral(node);
-  }
-
-  @override
-  void visitListLiteral2(ListLiteral2 node) {
-    DartType type = DynamicTypeImpl.instance;
-    if (node.typeArguments != null) {
-      NodeList<TypeAnnotation> targs = node.typeArguments.arguments;
-      if (targs.length > 0) {
-        type = targs[0].type;
-      }
-    } else {
-      DartType staticType = node.staticType;
-      if (staticType is InterfaceType) {
-        List<DartType> targs = staticType.typeArguments;
-        if (targs != null && targs.length > 0) {
-          type = targs[0];
-        }
-      }
-    }
     NodeList<CollectionElement> elements = node.elements;
     for (int i = 0; i < elements.length; i++) {
       checkCollectionElement(elements[i], type);
     }
-    super.visitListLiteral2(node);
-  }
-
-  @override
-  void visitMapLiteral(MapLiteral node) {
-    DartType ktype = DynamicTypeImpl.instance;
-    DartType vtype = DynamicTypeImpl.instance;
-    if (node.typeArguments != null) {
-      NodeList<TypeAnnotation> targs = node.typeArguments.arguments;
-      if (targs.length > 0) {
-        ktype = targs[0].type;
-      }
-      if (targs.length > 1) {
-        vtype = targs[1].type;
-      }
-    } else {
-      DartType staticType = node.staticType;
-      if (staticType is InterfaceType) {
-        List<DartType> targs = staticType.typeArguments;
-        if (targs != null) {
-          if (targs.length > 0) {
-            ktype = targs[0];
-          }
-          if (targs.length > 1) {
-            vtype = targs[1];
-          }
-        }
-      }
-    }
-    NodeList<MapLiteralEntry> entries = node.entries;
-    for (int i = 0; i < entries.length; i++) {
-      MapLiteralEntry entry = entries[i];
-      checkArgument(entry.key, ktype);
-      checkArgument(entry.value, vtype);
-    }
-    super.visitMapLiteral(node);
-  }
-
-  @override
-  void visitMapLiteral2(MapLiteral2 node) {
-    DartType keyType = DynamicTypeImpl.instance;
-    DartType valueType = DynamicTypeImpl.instance;
-    if (node.typeArguments != null) {
-      NodeList<TypeAnnotation> typeArguments = node.typeArguments.arguments;
-      if (typeArguments.length > 0) {
-        keyType = typeArguments[0].type;
-      }
-      if (typeArguments.length > 1) {
-        valueType = typeArguments[1].type;
-      }
-    } else {
-      DartType staticType = node.staticType;
-      if (staticType is InterfaceType) {
-        List<DartType> typeArguments = staticType.typeArguments;
-        if (typeArguments != null) {
-          if (typeArguments.length > 0) {
-            keyType = typeArguments[0];
-          }
-          if (typeArguments.length > 1) {
-            valueType = typeArguments[1];
-          }
-        }
-      }
-    }
-    NodeList<CollectionElement> entries = node.entries;
-    for (int i = 0; i < entries.length; i++) {
-      checkMapElement(entries[i], keyType, valueType);
-    }
-    super.visitMapLiteral2(node);
+    super.visitListLiteral(node);
   }
 
   @override
@@ -697,51 +595,58 @@
   }
 
   @override
-  void visitSetLiteral(SetLiteral node) {
-    DartType type = DynamicTypeImpl.instance;
-    if (node.typeArguments != null) {
-      NodeList<TypeAnnotation> targs = node.typeArguments.arguments;
-      if (targs.length > 0) {
-        type = targs[0].type;
-      }
-    } else {
-      DartType staticType = node.staticType;
-      if (staticType is InterfaceType) {
-        List<DartType> typeArguments = staticType.typeArguments;
-        if (typeArguments != null && typeArguments.length > 0) {
-          type = typeArguments[0];
+  void visitSetOrMapLiteral(SetOrMapLiteral node) {
+    if (node.isMap) {
+      DartType keyType = DynamicTypeImpl.instance;
+      DartType valueType = DynamicTypeImpl.instance;
+      if (node.typeArguments != null) {
+        NodeList<TypeAnnotation> typeArguments = node.typeArguments.arguments;
+        if (typeArguments.length > 0) {
+          keyType = typeArguments[0].type;
+        }
+        if (typeArguments.length > 1) {
+          valueType = typeArguments[1].type;
+        }
+      } else {
+        DartType staticType = node.staticType;
+        if (staticType is InterfaceType) {
+          List<DartType> typeArguments = staticType.typeArguments;
+          if (typeArguments != null) {
+            if (typeArguments.length > 0) {
+              keyType = typeArguments[0];
+            }
+            if (typeArguments.length > 1) {
+              valueType = typeArguments[1];
+            }
+          }
         }
       }
-    }
-    NodeList<Expression> elements = node.elements;
-    for (int i = 0; i < elements.length; i++) {
-      checkArgument(elements[i], type);
-    }
-    super.visitSetLiteral(node);
-  }
-
-  @override
-  void visitSetLiteral2(SetLiteral2 node) {
-    DartType type = DynamicTypeImpl.instance;
-    if (node.typeArguments != null) {
-      NodeList<TypeAnnotation> targs = node.typeArguments.arguments;
-      if (targs.length > 0) {
-        type = targs[0].type;
+      NodeList<CollectionElement> elements = node.elements;
+      for (int i = 0; i < elements.length; i++) {
+        checkMapElement(elements[i], keyType, valueType);
       }
-    } else {
-      DartType staticType = node.staticType;
-      if (staticType is InterfaceType) {
-        List<DartType> typeArguments = staticType.typeArguments;
-        if (typeArguments != null && typeArguments.length > 0) {
-          type = typeArguments[0];
+    } else if (node.isSet) {
+      DartType type = DynamicTypeImpl.instance;
+      if (node.typeArguments != null) {
+        NodeList<TypeAnnotation> typeArguments = node.typeArguments.arguments;
+        if (typeArguments.length > 0) {
+          type = typeArguments[0].type;
+        }
+      } else {
+        DartType staticType = node.staticType;
+        if (staticType is InterfaceType) {
+          List<DartType> typeArguments = staticType.typeArguments;
+          if (typeArguments != null && typeArguments.length > 0) {
+            type = typeArguments[0];
+          }
         }
       }
+      NodeList<CollectionElement> elements = node.elements;
+      for (int i = 0; i < elements.length; i++) {
+        checkCollectionElement(elements[i], type);
+      }
     }
-    NodeList<CollectionElement> elements = node.elements;
-    for (int i = 0; i < elements.length; i++) {
-      checkCollectionElement(elements[i], type);
-    }
-    super.visitSetLiteral2(node);
+    super.visitSetOrMapLiteral(node);
   }
 
   @override
@@ -784,7 +689,6 @@
   @override
   void visitVariableDeclarationList(VariableDeclarationList node) {
     TypeAnnotation type = node.type;
-
     if (type != null) {
       for (VariableDeclaration variable in node.variables) {
         var initializer = variable.initializer;
@@ -909,11 +813,20 @@
   /// If [expr] does not require an implicit cast because it is not related to
   /// [to] or is already a subtype of it, does nothing.
   void _checkImplicitCast(Expression expr, DartType to,
-      {DartType from, bool opAssign: false}) {
+      {DartType from,
+      bool opAssign: false,
+      bool forSpread: false,
+      bool forSpreadKey: false,
+      bool forSpreadValue: false}) {
     from ??= _getExpressionType(expr);
 
     if (_needsImplicitCast(expr, to, from: from) == true) {
-      _recordImplicitCast(expr, to, from: from, opAssign: opAssign);
+      _recordImplicitCast(expr, to,
+          from: from,
+          opAssign: opAssign,
+          forSpread: forSpread,
+          forSpreadKey: forSpreadKey,
+          forSpreadValue: forSpreadValue);
     }
   }
 
@@ -957,7 +870,10 @@
         _isInstanceMember(element) &&
         targetType is InterfaceType &&
         targetType.typeArguments.isNotEmpty &&
-        !_targetHasKnownGenericTypeArguments(target)) {
+        !_targetHasKnownGenericTypeArguments(target) &&
+        // Make sure we don't overwrite an existing implicit cast based on
+        // the context type. It will be more precise and will ensure soundness.
+        getImplicitCast(node) == null) {
       // Track private setters/method calls. We can sometimes eliminate the
       // parameter check in code generation, if it was never needed.
       // This member will need a check, however, because we are calling through
@@ -967,14 +883,18 @@
             .add(element is ExecutableMember ? element.baseElement : element);
       }
 
-      // Get the lower bound of the declared return type (e.g. `F<Null>`) and
+      // Get the lower bound of the declared return type (e.g. `F<bottom>`) and
       // see if it can be assigned to the expected type (e.g. `F<Object>`).
       //
       // That way we can tell if any lower `T` will work or not.
+
+      // The member may be from a superclass, so we need to ensure the type
+      // parameters are properly substituted.
       var classType = targetType.element.type;
       var classLowerBound = classType.instantiate(new List.filled(
-          classType.typeParameters.length, typeProvider.nullType));
-      var memberLowerBound = _lookUpMember(classLowerBound, element).type;
+          classType.typeParameters.length, typeProvider.bottomType));
+      var memberLowerBound = inheritance.getMember(
+          classLowerBound, Name(element.librarySource.uri, element.name));
       var expectedType = invokeType.returnType;
 
       if (!rules.isSubtypeOf(memberLowerBound.returnType, expectedType)) {
@@ -1115,6 +1035,17 @@
   DartType _getExpressionType(Expression expr) =>
       getExpressionType(expr, rules, typeProvider);
 
+  DartType _getInstanceTypeArgument(
+      DartType expressionType, ClassElement instanceType) {
+    if (expressionType is InterfaceTypeImpl) {
+      var asInstanceType = expressionType.asInstanceOf(instanceType);
+      if (asInstanceType != null) {
+        return asInstanceType.typeArguments[0];
+      }
+    }
+    return null;
+  }
+
   /// Given an expression, return its type assuming it is
   /// in the caller position of a call (that is, accounting
   /// for the possibility of a call method).  Returns null
@@ -1140,19 +1071,19 @@
       (e is MethodElement ||
           e is PropertyAccessorElement && e.variable is FieldElement);
 
-  ExecutableElement _lookUpMember(InterfaceType type, ExecutableElement e) {
-    var name = e.name;
-    var library = e.library;
-    return e is PropertyAccessorElement
-        ? (e.isGetter
-            ? type.lookUpInheritedGetter(name, library: library)
-            : type.lookUpInheritedSetter(name, library: library))
-        : type.lookUpInheritedMethod(name, library: library);
-  }
-
-  void _markImplicitCast(Expression expr, DartType to, {bool opAssign: false}) {
+  void _markImplicitCast(Expression expr, DartType to,
+      {bool opAssign: false,
+      bool forSpread: false,
+      bool forSpreadKey: false,
+      bool forSpreadValue: false}) {
     if (opAssign) {
       setImplicitOperationCast(expr, to);
+    } else if (forSpread) {
+      setImplicitSpreadCast(expr, to);
+    } else if (forSpreadKey) {
+      setImplicitSpreadKeyCast(expr, to);
+    } else if (forSpreadValue) {
+      setImplicitSpreadValueCast(expr, to);
     } else {
       setImplicitCast(expr, to);
     }
@@ -1215,62 +1146,80 @@
   /// This will emit the appropriate error/warning/hint message as well as mark
   /// the AST node.
   void _recordImplicitCast(Expression expr, DartType to,
-      {DartType from, bool opAssign: false}) {
+      {DartType from,
+      bool opAssign: false,
+      forSpread: false,
+      forSpreadKey: false,
+      forSpreadValue: false}) {
     // If this is an implicit tearoff, we need to mark the cast, but we don't
     // want to warn if it's a legal subtype.
     if (from is InterfaceType && rules.acceptsFunctionType(to)) {
       var type = rules.getCallMethodType(from);
       if (type != null && rules.isSubtypeOf(type, to)) {
-        _markImplicitCast(expr, to, opAssign: opAssign);
+        _markImplicitCast(expr, to,
+            opAssign: opAssign,
+            forSpread: forSpread,
+            forSpreadKey: forSpreadKey,
+            forSpreadValue: forSpreadValue);
         return;
       }
     }
 
-    // Inference "casts":
-    if (expr is Literal) {
-      // fromT should be an exact type - this will almost certainly fail at
-      // runtime.
-      if (expr is ListLiteral) {
-        _recordMessage(
-            expr, StrongModeCode.INVALID_CAST_LITERAL_LIST, [from, to]);
-      } else if (expr is MapLiteral) {
-        _recordMessage(
-            expr, StrongModeCode.INVALID_CAST_LITERAL_MAP, [from, to]);
-      } else if (expr is SetLiteral) {
-        _recordMessage(
-            expr, StrongModeCode.INVALID_CAST_LITERAL_SET, [from, to]);
-      } else {
-        _recordMessage(
-            expr, StrongModeCode.INVALID_CAST_LITERAL, [expr, from, to]);
-      }
-      return;
-    }
+    if (!forSpread && !forSpreadKey && !forSpreadValue) {
+      // Spreads are special in that they may create downcasts at runtime but
+      // those casts are implied so we don't treat them as strictly.
 
-    if (expr is FunctionExpression) {
-      _recordMessage(
-          expr, StrongModeCode.INVALID_CAST_FUNCTION_EXPR, [from, to]);
-      return;
-    }
-
-    if (expr is InstanceCreationExpression) {
-      ConstructorElement e = expr.staticElement;
-      if (e == null || !e.isFactory) {
+      // Inference "casts":
+      if (expr is Literal) {
         // fromT should be an exact type - this will almost certainly fail at
         // runtime.
-        _recordMessage(expr, StrongModeCode.INVALID_CAST_NEW_EXPR, [from, to]);
+        if (expr is ListLiteral) {
+          _recordMessage(
+              expr, StrongModeCode.INVALID_CAST_LITERAL_LIST, [from, to]);
+        } else if (expr is SetOrMapLiteral) {
+          if (expr.isMap) {
+            _recordMessage(
+                expr, StrongModeCode.INVALID_CAST_LITERAL_MAP, [from, to]);
+          } else {
+            // Ambiguity should be resolved by now
+            assert(expr.isSet);
+            _recordMessage(
+                expr, StrongModeCode.INVALID_CAST_LITERAL_SET, [from, to]);
+          }
+        } else {
+          _recordMessage(
+              expr, StrongModeCode.INVALID_CAST_LITERAL, [expr, from, to]);
+        }
         return;
       }
-    }
 
-    Element e = _getKnownElement(expr);
-    if (e is FunctionElement || e is MethodElement && e.isStatic) {
-      _recordMessage(
-          expr,
-          e is MethodElement
-              ? StrongModeCode.INVALID_CAST_METHOD
-              : StrongModeCode.INVALID_CAST_FUNCTION,
-          [e.name, from, to]);
-      return;
+      if (expr is FunctionExpression) {
+        _recordMessage(
+            expr, StrongModeCode.INVALID_CAST_FUNCTION_EXPR, [from, to]);
+        return;
+      }
+
+      if (expr is InstanceCreationExpression) {
+        ConstructorElement e = expr.staticElement;
+        if (e == null || !e.isFactory) {
+          // fromT should be an exact type - this will almost certainly fail at
+          // runtime.
+          _recordMessage(
+              expr, StrongModeCode.INVALID_CAST_NEW_EXPR, [from, to]);
+          return;
+        }
+      }
+
+      Element e = _getKnownElement(expr);
+      if (e is FunctionElement || e is MethodElement && e.isStatic) {
+        _recordMessage(
+            expr,
+            e is MethodElement
+                ? StrongModeCode.INVALID_CAST_METHOD
+                : StrongModeCode.INVALID_CAST_FUNCTION,
+            [e.name, from, to]);
+        return;
+      }
     }
 
     // Composite cast: these are more likely to fail.
@@ -1304,7 +1253,11 @@
           : StrongModeCode.DOWN_CAST_IMPLICIT;
     }
     _recordMessage(expr, errorCode, [from, to]);
-    _markImplicitCast(expr, to, opAssign: opAssign);
+    _markImplicitCast(expr, to,
+        opAssign: opAssign,
+        forSpread: forSpread,
+        forSpreadKey: forSpreadKey,
+        forSpreadValue: forSpreadValue);
   }
 
   void _recordMessage(AstNode node, ErrorCode errorCode, List arguments) {
@@ -1386,7 +1339,7 @@
     }
     Token awaitKeyword;
     AstNode parent = node.parent;
-    if (parent is ForStatement2) {
+    if (parent is ForStatement) {
       awaitKeyword = parent.awaitKeyword;
     } else if (parent is ForElement) {
       awaitKeyword = parent.awaitKeyword;
@@ -1400,7 +1353,7 @@
         : typeProvider.iterableType;
     var iterableType = _getExpressionType(node.iterable);
     var elementType =
-        rules.mostSpecificTypeArgument(iterableType, sequenceInterface);
+        _getInstanceTypeArgument(iterableType, sequenceInterface.element);
 
     // If the sequence is not an Iterable (or Stream for await for) but is a
     // supertype of it, do an implicit downcast to Iterable<dynamic>. Then
@@ -1913,27 +1866,6 @@
   }
 
   @override
-  visitListLiteral2(ListLiteral2 node) {
-    if (node.typeArguments == null) {
-      super.visitListLiteral2(node);
-    }
-  }
-
-  @override
-  visitMapLiteral(MapLiteral node) {
-    if (node.typeArguments == null) {
-      super.visitMapLiteral(node);
-    }
-  }
-
-  @override
-  visitMapLiteral2(MapLiteral2 node) {
-    if (node.typeArguments == null) {
-      super.visitMapLiteral2(node);
-    }
-  }
-
-  @override
   visitMethodInvocation(MethodInvocation node) {
     node.target?.accept(this);
     var method = node.methodName.staticElement;
@@ -1970,16 +1902,9 @@
   }
 
   @override
-  visitSetLiteral(SetLiteral node) {
+  visitSetOrMapLiteral(SetOrMapLiteral node) {
     if (node.typeArguments == null) {
-      super.visitSetLiteral(node);
-    }
-  }
-
-  @override
-  visitSetLiteral2(SetLiteral2 node) {
-    if (node.typeArguments == null) {
-      super.visitSetLiteral2(node);
+      super.visitSetOrMapLiteral(node);
     }
   }
 
diff --git a/pkg/analyzer/lib/src/task/strong_mode.dart b/pkg/analyzer/lib/src/task/strong_mode.dart
index fdbc6d4..35a6337 100644
--- a/pkg/analyzer/lib/src/task/strong_mode.dart
+++ b/pkg/analyzer/lib/src/task/strong_mode.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -156,6 +156,7 @@
       DartType type = matchingParameter?.type ?? typeProvider.dynamicType;
       if (parameterType == null) {
         if (type is FunctionType &&
+            type.element != null &&
             type.element is! TypeDefiningElement &&
             type.element.enclosingElement is! TypeDefiningElement) {
           // The resulting parameter's type element has an `enclosingElement` of
diff --git a/pkg/analyzer/lib/src/task/yaml.dart b/pkg/analyzer/lib/src/task/yaml.dart
index 431cf30..56ea51c 100644
--- a/pkg/analyzer/lib/src/task/yaml.dart
+++ b/pkg/analyzer/lib/src/task/yaml.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/test_utilities/find_element.dart b/pkg/analyzer/lib/src/test_utilities/find_element.dart
index 86b3e1f..f8ff22c 100644
--- a/pkg/analyzer/lib/src/test_utilities/find_element.dart
+++ b/pkg/analyzer/lib/src/test_utilities/find_element.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/test_utilities/find_node.dart b/pkg/analyzer/lib/src/test_utilities/find_node.dart
index 9bf696b..ced02d0 100644
--- a/pkg/analyzer/lib/src/test_utilities/find_node.dart
+++ b/pkg/analyzer/lib/src/test_utilities/find_node.dart
@@ -91,10 +91,6 @@
     return _node(search, (n) => n is FieldFormalParameter);
   }
 
-  ForEachStatement forEachStatement(String search) {
-    return _node(search, (n) => n is ForEachStatement);
-  }
-
   ForStatement forStatement(String search) {
     return _node(search, (n) => n is ForStatement);
   }
@@ -131,6 +127,10 @@
     return _node(search, (n) => n is InstanceCreationExpression);
   }
 
+  IntegerLiteral integerLiteral(String search) {
+    return _node(search, (n) => n is IntegerLiteral);
+  }
+
   LibraryDirective library(String search) {
     return _node(search, (n) => n is LibraryDirective);
   }
@@ -139,10 +139,6 @@
     return _node(search, (n) => n is ListLiteral);
   }
 
-  MapLiteral mapLiteral(String search) {
-    return _node(search, (n) => n is MapLiteral);
-  }
-
   MethodDeclaration methodDeclaration(String search) {
     return _node(search, (n) => n is MethodDeclaration);
   }
@@ -155,6 +151,10 @@
     return _node(search, (n) => n is MixinDeclaration);
   }
 
+  NamedExpression namedExpression(String search) {
+    return _node(search, (n) => n is NamedExpression);
+  }
+
   ParenthesizedExpression parenthesized(String search) {
     return _node(search, (n) => n is ParenthesizedExpression);
   }
@@ -187,8 +187,8 @@
     return _node(search, (n) => n is RethrowExpression);
   }
 
-  SetLiteral setLiteral(String search) {
-    return _node(search, (n) => n is SetLiteral);
+  SetOrMapLiteral setOrMapLiteral(String search) {
+    return _node(search, (n) => n is SetOrMapLiteral);
   }
 
   SimpleIdentifier simple(String search) {
@@ -256,6 +256,10 @@
     return _node(search, (n) => n is VariableDeclaration);
   }
 
+  VariableDeclarationList variableDeclarationList(String search) {
+    return _node(search, (n) => n is VariableDeclarationList);
+  }
+
   WhileStatement whileStatement(String search) {
     return _node(search, (n) => n is WhileStatement);
   }
diff --git a/pkg/analyzer/lib/src/test_utilities/function_ast_visitor.dart b/pkg/analyzer/lib/src/test_utilities/function_ast_visitor.dart
index f3c951b..df7a2f1 100644
--- a/pkg/analyzer/lib/src/test_utilities/function_ast_visitor.dart
+++ b/pkg/analyzer/lib/src/test_utilities/function_ast_visitor.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/test_utilities/mock_sdk.dart b/pkg/analyzer/lib/src/test_utilities/mock_sdk.dart
index 94f6ed8..917fc1c 100644
--- a/pkg/analyzer/lib/src/test_utilities/mock_sdk.dart
+++ b/pkg/analyzer/lib/src/test_utilities/mock_sdk.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -143,9 +143,12 @@
 
 void print(Object object) {}
 
-class bool extends Object {
+abstract class bool extends Object {
   external const factory bool.fromEnvironment(String name,
       {bool defaultValue: false});
+  bool operator &(bool other);
+  bool operator |(bool other);
+  bool operator ^(bool other);
 }
 
 abstract class Comparable<T> {
@@ -218,6 +221,8 @@
 
   int operator ~();
 
+  int gcd(int other);
+
   external static int parse(String source,
       {int radix, int onError(String source)});
 }
@@ -266,9 +271,9 @@
 }
 
 class Map<K, V> {
-  factory Map() => {}
+  factory Map() => null;
   factory Map.fromIterable(Iterable iterable,
-      {K key(element), V value(element)}) => {}
+      {K key(element), V value(element)}) => null;
   Iterable<K> get keys => null;
   int get length => 0;
   Iterable<V> get values => null;
@@ -335,6 +340,7 @@
   external factory String.fromCharCodes(Iterable<int> charCodes,
       [int start = 0, int end]);
   List<int> get codeUnits;
+  int indexOf(Pattern pattern, [int start]);
   bool get isEmpty => false;
   bool get isNotEmpty => false;
   int get length => 0;
diff --git a/pkg/analyzer/lib/src/test_utilities/package_mixin.dart b/pkg/analyzer/lib/src/test_utilities/package_mixin.dart
new file mode 100644
index 0000000..9fe449e
--- /dev/null
+++ b/pkg/analyzer/lib/src/test_utilities/package_mixin.dart
@@ -0,0 +1,78 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
+
+/// A mixin for test classes that provides support for creating packages.
+mixin PackageMixin implements ResourceProviderMixin {
+  /// Return the map from package names to lists of folders that is used to
+  /// resolve 'package:' URIs.
+  Map<String, List<Folder>> get packageMap;
+
+  /// Create a fake 'meta' package that can be used by tests.
+  void addMetaPackage() {
+    Folder lib = addPubPackage('meta');
+    newFile(join(lib.path, 'meta.dart'), content: r'''
+library meta;
+
+const _AlwaysThrows alwaysThrows = const _AlwaysThrows();
+const _Factory factory = const _Factory();
+const Immutable immutable = const Immutable();
+const _Literal literal = const _Literal();
+const _MustCallSuper mustCallSuper = const _MustCallSuper();
+const _OptionalTypeArgs optionalTypeArgs = const _OptionalTypeArgs();
+const _Protected protected = const _Protected();
+const Required required = const Required();
+const _Sealed sealed = const _Sealed();
+const _VisibleForTesting visibleForTesting = const _VisibleForTesting();
+
+class Immutable {
+  final String reason;
+  const Immutable([this.reason]);
+}
+class _AlwaysThrows {
+  const _AlwaysThrows();
+}
+class _Factory {
+  const _Factory();
+}
+class _Literal {
+  const _Literal();
+}
+class _MustCallSuper {
+  const _MustCallSuper();
+}
+class _OptionalTypeArgs {
+  const _OptionalTypeArgs();
+}
+class _Protected {
+  const _Protected();
+}
+class Required {
+  final String reason;
+  const Required([this.reason]);
+}
+class _Sealed {
+  const _Sealed();
+}
+class _VisibleForTesting {
+  const _VisibleForTesting();
+}
+''');
+  }
+
+  /// Return a newly created directory in which the contents of a pub package
+  /// with the given [packageName] can be written. The package will be added to
+  /// the package map so that the package can be referenced from the code being
+  /// analyzed.
+  Folder addPubPackage(String packageName) {
+    // TODO(brianwilkerson) Consider renaming this to `addPackage` and passing
+    //  in a `PackageStyle` (pub, bazel, gn, build, plain) in order to support
+    //  creating other styles of packages.
+    Folder lib = getFolder('/.pub-cache/$packageName/lib');
+    packageMap[packageName] = [lib];
+    return lib;
+  }
+}
diff --git a/pkg/analyzer/lib/src/test_utilities/resource_provider_mixin.dart b/pkg/analyzer/lib/src/test_utilities/resource_provider_mixin.dart
index 8f20457..6c0072b 100644
--- a/pkg/analyzer/lib/src/test_utilities/resource_provider_mixin.dart
+++ b/pkg/analyzer/lib/src/test_utilities/resource_provider_mixin.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/util/sdk.dart b/pkg/analyzer/lib/src/util/sdk.dart
index b89f3d7..abffd58 100644
--- a/pkg/analyzer/lib/src/util/sdk.dart
+++ b/pkg/analyzer/lib/src/util/sdk.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/util/uri.dart b/pkg/analyzer/lib/src/util/uri.dart
index 91bbdb2..963dafc 100644
--- a/pkg/analyzer/lib/src/util/uri.dart
+++ b/pkg/analyzer/lib/src/util/uri.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/util/yaml.dart b/pkg/analyzer/lib/src/util/yaml.dart
index 1950bdd..4485072 100644
--- a/pkg/analyzer/lib/src/util/yaml.dart
+++ b/pkg/analyzer/lib/src/util/yaml.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/workspace/bazel.dart b/pkg/analyzer/lib/src/workspace/bazel.dart
index 5e90c71..9151e23 100644
--- a/pkg/analyzer/lib/src/workspace/bazel.dart
+++ b/pkg/analyzer/lib/src/workspace/bazel.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/src/workspace/gn.dart b/pkg/analyzer/lib/src/workspace/gn.dart
index 191c421..1f2a608 100644
--- a/pkg/analyzer/lib/src/workspace/gn.dart
+++ b/pkg/analyzer/lib/src/workspace/gn.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -267,15 +267,14 @@
    * that file cannot be found, looks for standard output directory locations.
    */
   static Folder _getOutDirectory(String root, ResourceProvider provider) {
+    const String fuchsiaDirConfigFile = '.fx-build-dir';
+
     path.Context pathContext = provider.pathContext;
-    File config = provider.getFile(pathContext.join(root, '.config'));
-    if (config.exists) {
-      String content = config.readAsStringSync();
-      Match match =
-          new RegExp(r'^FUCHSIA_BUILD_DIR=["\x27](.+)["\x27]$', multiLine: true)
-              .firstMatch(content);
-      if (match != null) {
-        String buildDirPath = match.group(1);
+    File configFile =
+        provider.getFile(pathContext.join(root, fuchsiaDirConfigFile));
+    if (configFile.exists) {
+      String buildDirPath = configFile.readAsStringSync().trim();
+      if (buildDirPath.isNotEmpty) {
         if (pathContext.isRelative(buildDirPath)) {
           buildDirPath = pathContext.join(root, buildDirPath);
         }
diff --git a/pkg/analyzer/lib/src/workspace/package_build.dart b/pkg/analyzer/lib/src/workspace/package_build.dart
index c5c74673..4e6bee0 100644
--- a/pkg/analyzer/lib/src/workspace/package_build.dart
+++ b/pkg/analyzer/lib/src/workspace/package_build.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/lib/task/model.dart b/pkg/analyzer/lib/task/model.dart
index 1b33bf4..6768ca2 100644
--- a/pkg/analyzer/lib/task/model.dart
+++ b/pkg/analyzer/lib/task/model.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/pubspec.yaml b/pkg/analyzer/pubspec.yaml
index 38d06b9..cf9777b 100644
--- a/pkg/analyzer/pubspec.yaml
+++ b/pkg/analyzer/pubspec.yaml
@@ -1,5 +1,5 @@
 name: analyzer
-version: 0.35.1
+version: 0.36.1-dev
 author: Dart Team <misc@dartlang.org>
 description: Static analyzer for Dart.
 homepage: https://github.com/dart-lang/sdk/tree/master/pkg/analyzer
@@ -11,14 +11,13 @@
   collection: ^1.10.1
   convert: ^2.0.0
   crypto: '>=1.1.1 <3.0.0'
-  front_end: 0.1.11
+  front_end: 0.1.15
   glob: ^1.0.3
-  html: '>=0.12.0 <1.14.0'
-  kernel: 0.3.11
+  html: '>=0.13.4+1 <0.15.0'
+  kernel: 0.3.15
   meta: ^1.0.2
   package_config: '>=0.1.5 <2.0.0'
   path: '>=0.9.0 <2.0.0'
-  plugin: ^0.2.0
   pub_semver: ^1.4.2
   source_span: ^1.2.0
   watcher: '>=0.9.6 <0.10.0'
diff --git a/pkg/analyzer/test/dart/analysis/declared_variables_test.dart b/pkg/analyzer/test/dart/analysis/declared_variables_test.dart
index b9465f3..2460423 100644
--- a/pkg/analyzer/test/dart/analysis/declared_variables_test.dart
+++ b/pkg/analyzer/test/dart/analysis/declared_variables_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/dart/analysis/test_all.dart b/pkg/analyzer/test/dart/analysis/test_all.dart
index b17fcd8..fe1f2ee 100644
--- a/pkg/analyzer/test/dart/analysis/test_all.dart
+++ b/pkg/analyzer/test/dart/analysis/test_all.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/dart/ast/ast_test.dart b/pkg/analyzer/test/dart/ast/ast_test.dart
index a6b658a..4468d47 100644
--- a/pkg/analyzer/test/dart/ast/ast_test.dart
+++ b/pkg/analyzer/test/dart/ast/ast_test.dart
@@ -102,13 +102,12 @@
 
   void test_isAbstract() {
     expect(
-        AstTestFactory
-            .classDeclaration(null, "A", null, null, null, null)
+        AstTestFactory.classDeclaration(null, "A", null, null, null, null)
             .isAbstract,
         isFalse);
     expect(
-        AstTestFactory
-            .classDeclaration(Keyword.ABSTRACT, "B", null, null, null, null)
+        AstTestFactory.classDeclaration(
+                Keyword.ABSTRACT, "B", null, null, null, null)
             .isAbstract,
         isTrue);
   }
@@ -118,13 +117,12 @@
 class ClassTypeAliasTest extends ParserTestCase {
   void test_isAbstract() {
     expect(
-        AstTestFactory
-            .classTypeAlias("A", null, null, null, null, null)
+        AstTestFactory.classTypeAlias("A", null, null, null, null, null)
             .isAbstract,
         isFalse);
     expect(
-        AstTestFactory
-            .classTypeAlias("B", null, Keyword.ABSTRACT, null, null, null)
+        AstTestFactory.classTypeAlias(
+                "B", null, Keyword.ABSTRACT, null, null, null)
             .isAbstract,
         isTrue);
   }
@@ -479,8 +477,8 @@
   void test_getBeginToken_nonEmpty() {
     NodeList<AstNode> list =
         astFactory.nodeList<AstNode>(AstTestFactory.argumentList());
-    AstNode node = AstTestFactory
-        .parenthesizedExpression(AstTestFactory.booleanLiteral(true));
+    AstNode node = AstTestFactory.parenthesizedExpression(
+        AstTestFactory.booleanLiteral(true));
     list.add(node);
     expect(list.beginToken, same(node.beginToken));
   }
@@ -494,8 +492,8 @@
   void test_getEndToken_nonEmpty() {
     NodeList<AstNode> list =
         astFactory.nodeList<AstNode>(AstTestFactory.argumentList());
-    AstNode node = AstTestFactory
-        .parenthesizedExpression(AstTestFactory.booleanLiteral(true));
+    AstNode node = AstTestFactory.parenthesizedExpression(
+        AstTestFactory.booleanLiteral(true));
     list.add(node);
     expect(list.endToken, same(node.endToken));
   }
@@ -726,8 +724,9 @@
   }
 
   void test_inGetterContext_constructorFieldInitializer() {
-    ConstructorFieldInitializer initializer = AstTestFactory
-        .constructorFieldInitializer(false, 'f', AstTestFactory.integer(0));
+    ConstructorFieldInitializer initializer =
+        AstTestFactory.constructorFieldInitializer(
+            false, 'f', AstTestFactory.integer(0));
     SimpleIdentifier identifier = initializer.fieldName;
     expect(identifier.inGetterContext(), isFalse);
   }
@@ -743,7 +742,8 @@
     SimpleIdentifier identifier = AstTestFactory.identifier3("a");
     Expression iterator = AstTestFactory.listLiteral();
     Statement body = AstTestFactory.block();
-    AstTestFactory.forEachStatement2(identifier, iterator, body);
+    AstTestFactory.forStatement(
+        AstTestFactory.forEachPartsWithIdentifier(identifier, iterator), body);
     expect(identifier.inGetterContext(), isFalse);
   }
 
@@ -788,13 +788,14 @@
     SimpleIdentifier identifier = AstTestFactory.identifier3("a");
     Expression iterator = AstTestFactory.listLiteral();
     Statement body = AstTestFactory.block();
-    AstTestFactory.forEachStatement2(identifier, iterator, body);
+    AstTestFactory.forStatement(
+        AstTestFactory.forEachPartsWithIdentifier(identifier, iterator), body);
     expect(identifier.inSetterContext(), isTrue);
   }
 
   void test_isQualified_inMethodInvocation_noTarget() {
-    MethodInvocation invocation = AstTestFactory
-        .methodInvocation2("test", [AstTestFactory.identifier3("arg0")]);
+    MethodInvocation invocation = AstTestFactory.methodInvocation2(
+        "test", [AstTestFactory.identifier3("arg0")]);
     SimpleIdentifier identifier = invocation.methodName;
     expect(identifier.isQualified, isFalse);
   }
@@ -1240,8 +1241,8 @@
   }
 
   void test_isMultiline() {
-    var b = AstTestFactory
-        .interpolationExpression(AstTestFactory.identifier3('bb'));
+    var b = AstTestFactory.interpolationExpression(
+        AstTestFactory.identifier3('bb'));
     // '
     {
       var a = AstTestFactory.interpolationString("'a", "a");
@@ -1278,8 +1279,8 @@
   }
 
   void test_isSingleQuoted() {
-    var b = AstTestFactory
-        .interpolationExpression(AstTestFactory.identifier3('bb'));
+    var b = AstTestFactory.interpolationExpression(
+        AstTestFactory.identifier3('bb'));
     // "
     {
       var a = AstTestFactory.interpolationString('"a', "a");
diff --git a/pkg/analyzer/test/dart/element/builder_test.dart b/pkg/analyzer/test/dart/element/builder_test.dart
index ca9248f..25ba692 100644
--- a/pkg/analyzer/test/dart/element/builder_test.dart
+++ b/pkg/analyzer/test/dart/element/builder_test.dart
@@ -766,8 +766,10 @@
     String variableName = "v";
     DeclaredIdentifier variableIdentifier =
         AstTestFactory.declaredIdentifier3('v');
-    Statement statement = AstTestFactory.forEachStatement(variableIdentifier,
-        AstTestFactory.listLiteral(), AstTestFactory.block());
+    Statement statement = AstTestFactory.forStatement(
+        AstTestFactory.forEachPartsWithDeclaration(
+            variableIdentifier, AstTestFactory.listLiteral()),
+        AstTestFactory.block());
     _setNodeSourceRange(statement, 100, 110);
     MethodDeclaration method = AstTestFactory.methodDeclaration2(
         null,
@@ -796,11 +798,12 @@
     String variableName = "v";
     VariableDeclaration variableIdentifier =
         AstTestFactory.variableDeclaration('v');
-    ForStatement statement = AstTestFactory.forStatement2(
-        AstTestFactory.variableDeclarationList(
-            null, AstTestFactory.typeName4('T'), [variableIdentifier]),
-        null,
-        null,
+    ForStatement statement = AstTestFactory.forStatement(
+        AstTestFactory.forPartsWithDeclarations(
+            AstTestFactory.variableDeclarationList(
+                null, AstTestFactory.typeName4('T'), [variableIdentifier]),
+            null,
+            null),
         AstTestFactory.block());
     _setNodeSourceRange(statement, 100, 110);
     MethodDeclaration method = AstTestFactory.methodDeclaration2(
diff --git a/pkg/analyzer/test/dart/test_all.dart b/pkg/analyzer/test/dart/test_all.dart
index 3575edb..fb48b99 100644
--- a/pkg/analyzer/test/dart/test_all.dart
+++ b/pkg/analyzer/test/dart/test_all.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/error/error_test.dart b/pkg/analyzer/test/error/error_test.dart
index a33f0f2..e07ea71 100644
--- a/pkg/analyzer/test/error/error_test.dart
+++ b/pkg/analyzer/test/error/error_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -6,7 +6,6 @@
 import 'dart:io';
 
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:front_end/src/testing/package_root.dart' as package_root;
 import 'package:path/path.dart' as path;
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
@@ -14,24 +13,18 @@
 import '../generated/parser_test.dart';
 
 main() {
+  _analyzerRootComponents = path.split(path.fromUri(Platform.script));
+  int index = _analyzerRootComponents.lastIndexOf('analyzer');
+  _analyzerRootComponents = _analyzerRootComponents.sublist(0, index + 1);
   defineReflectiveSuite(() {
     defineReflectiveTests(ErrorCodeValuesTest);
   });
 }
 
+List<String> _analyzerRootComponents;
+
 @reflectiveTest
 class ErrorCodeValuesTest extends ParserTestCase {
-  List<String> _rootComponents;
-
-  List<String> get rootComponents {
-    if (_rootComponents == null) {
-      List<String> components = path.split(package_root.packageRoot);
-      components.add('analyzer');
-      _rootComponents = components;
-    }
-    return _rootComponents;
-  }
-
   bool bad() {
     return false;
   }
@@ -77,7 +70,7 @@
   }
 
   CompilationUnit parseFile(List<String> relativeComponents) {
-    List<String> pathComponents = rootComponents.toList()
+    List<String> pathComponents = _analyzerRootComponents.toList()
       ..addAll(relativeComponents);
     String filePath = path.normalize(path.joinAll(pathComponents));
     return parseCompilationUnit(new File(filePath).readAsStringSync());
@@ -91,7 +84,6 @@
       ['lib', 'src', 'dart', 'error', 'hint_codes.dart'],
       ['lib', 'src', 'dart', 'error', 'lint_codes.dart'],
       ['lib', 'src', 'dart', 'error', 'todo_codes.dart'],
-      ['lib', 'src', 'html', 'error', 'html_codes.dart'],
       ['lib', 'src', 'dart', 'error', 'syntactic_errors.dart'],
       ['lib', 'src', 'error', 'codes.dart'],
       ['..', 'front_end', 'lib', 'src', 'scanner', 'errors.dart']
diff --git a/pkg/analyzer/test/error/test_all.dart b/pkg/analyzer/test/error/test_all.dart
index aeadc12..19eca56 100644
--- a/pkg/analyzer/test/error/test_all.dart
+++ b/pkg/analyzer/test/error/test_all.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/generated/analysis_context_factory.dart b/pkg/analyzer/test/generated/analysis_context_factory.dart
index 0ab45f5..e2aef27 100644
--- a/pkg/analyzer/test/generated/analysis_context_factory.dart
+++ b/pkg/analyzer/test/generated/analysis_context_factory.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -24,6 +24,7 @@
 import 'package:analyzer/src/generated/testing/test_type_provider.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:analyzer/src/string_source.dart';
+import 'package:analyzer/src/summary/summary_sdk.dart';
 import 'package:test/test.dart';
 
 /**
@@ -104,7 +105,6 @@
     TestTypeProvider provider = new TestTypeProvider();
     CompilationUnitElementImpl coreUnit = new CompilationUnitElementImpl();
     Source coreSource = sourceFactory.forUri(DartSdk.DART_CORE);
-    coreContext.setContents(coreSource, "");
     coreUnit.librarySource = coreUnit.source = coreSource;
     ClassElementImpl overrideClassElement =
         ElementFactory.classElement2("_Override");
@@ -185,7 +185,6 @@
         AstTestFactory.libraryIdentifier2(["dart", "async"]));
     CompilationUnitElementImpl asyncUnit = new CompilationUnitElementImpl();
     Source asyncSource = sourceFactory.forUri(DartSdk.DART_ASYNC);
-    coreContext.setContents(asyncSource, "");
     asyncUnit.librarySource = asyncUnit.source = asyncSource;
     asyncLibrary.definingCompilationUnit = asyncUnit;
     // Future<T>
@@ -278,7 +277,6 @@
     //
     CompilationUnitElementImpl htmlUnit = new CompilationUnitElementImpl();
     Source htmlSource = sourceFactory.forUri(DartSdk.DART_HTML);
-    coreContext.setContents(htmlSource, "");
     htmlUnit.librarySource = htmlUnit.source = htmlSource;
     ClassElementImpl elementElement = ElementFactory.classElement2("Element");
     InterfaceType elementType = elementElement.type;
@@ -339,7 +337,6 @@
     //
     CompilationUnitElementImpl mathUnit = new CompilationUnitElementImpl();
     Source mathSource = sourceFactory.forUri(_DART_MATH);
-    coreContext.setContents(mathSource, "");
     mathUnit.librarySource = mathUnit.source = mathSource;
     FunctionElement cosElement = ElementFactory.functionElement3(
         "cos",
@@ -396,13 +393,6 @@
         coreContext, null, AstTestFactory.libraryIdentifier2(["dart", "math"]));
     mathLibrary.definingCompilationUnit = mathUnit;
     //
-    // Set empty sources for the rest of the libraries.
-    //
-    Source source = sourceFactory.forUri(_DART_INTERCEPTORS);
-    coreContext.setContents(source, "");
-    source = sourceFactory.forUri(_DART_JS_HELPER);
-    coreContext.setContents(source, "");
-    //
     // Record the elements.
     //
     Map<Source, LibraryElement> elementMap =
@@ -423,7 +413,11 @@
       library.exportNamespace = namespace;
       library.publicNamespace = namespace;
     }
-    context.recordLibraryElements(elementMap);
+
+    context.typeProvider = SummaryTypeProvider()
+      ..initializeCore(coreLibrary)
+      ..initializeAsync(asyncLibrary);
+
     // Create the synthetic element for `loadLibrary`.
     for (LibraryElementImpl library in elementMap.values) {
       library.createLoadLibraryFunction(context.typeProvider);
@@ -486,53 +480,6 @@
   }
 }
 
-/**
- * Helper for creating and managing single [AnalysisContext].
- */
-class AnalysisContextHelper {
-  MemoryResourceProvider resourceProvider;
-  AnalysisContext context;
-
-  /**
-   * Creates new [AnalysisContext] using [AnalysisContextFactory].
-   */
-  AnalysisContextHelper(
-      [AnalysisOptionsImpl options, MemoryResourceProvider provider]) {
-    resourceProvider = provider ?? new MemoryResourceProvider();
-    context = AnalysisContextFactory.contextWithCoreAndOptions(
-        options ?? new AnalysisOptionsImpl(),
-        resourceProvider: resourceProvider);
-  }
-
-  Source addSource(String path, String code) {
-    Source source = resourceProvider
-        .getFile(resourceProvider.convertPath(path))
-        .createSource();
-    if (path.endsWith(".dart") || path.endsWith(".html")) {
-      ChangeSet changeSet = new ChangeSet();
-      changeSet.addedSource(source);
-      context.applyChanges(changeSet);
-    }
-    context.setContents(source, code);
-    return source;
-  }
-
-  CompilationUnitElement getDefiningUnitElement(Source source) =>
-      context.getCompilationUnitElement(source, source);
-
-  CompilationUnit resolveDefiningUnit(Source source) {
-    LibraryElement libraryElement = context.computeLibraryElement(source);
-    return context.resolveCompilationUnit(source, libraryElement);
-  }
-
-  void runTasks() {
-    AnalysisResult result = context.performAnalysisTask();
-    while (result.changeNotices != null) {
-      result = context.performAnalysisTask();
-    }
-  }
-}
-
 class TestPackageUriResolver extends UriResolver {
   Map<String, Source> sourceMap = new HashMap<String, Source>();
 
diff --git a/pkg/analyzer/test/generated/checked_mode_compile_time_error_code.dart b/pkg/analyzer/test/generated/checked_mode_compile_time_error_code.dart
deleted file mode 100644
index a666f7a..0000000
--- a/pkg/analyzer/test/generated/checked_mode_compile_time_error_code.dart
+++ /dev/null
@@ -1,683 +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/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/source_io.dart';
-
-import 'resolver_test_case.dart';
-
-abstract class CheckedModeCompileTimeErrorCodeTest extends ResolverTestCase {
-  @override
-  AnalysisOptions get defaultAnalysisOptions => new AnalysisOptionsImpl();
-
-  test_assertion_throws() async {
-    Source source = addSource(r'''
-class A {
-  const A(int x, int y) : assert(x < y);
-}
-var v = const A(3, 2);
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
-    verify([source]);
-  }
-
-  test_fieldFormalParameterAssignableToField_extends() async {
-    // According to checked-mode type checking rules, a value of type B is
-    // assignable to a field of type A, because B extends A (and hence is a
-    // subtype of A).
-    Source source = addSource(r'''
-class A {
-  const A();
-}
-class B extends A {
-  const B();
-}
-class C {
-  final A a;
-  const C(this.a);
-}
-var v = const C(const B());''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_fieldFormalParameterAssignableToField_fieldType_unresolved_null() async {
-    // Null always passes runtime type checks, even when the type is
-    // unresolved.
-    Source source = addSource(r'''
-class A {
-  final Unresolved x;
-  const A(String this.x);
-}
-var v = const A(null);''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.UNDEFINED_CLASS]);
-    verify([source]);
-  }
-
-  test_fieldFormalParameterAssignableToField_implements() async {
-    // According to checked-mode type checking rules, a value of type B is
-    // assignable to a field of type A, because B implements A (and hence is a
-    // subtype of A).
-    Source source = addSource(r'''
-class A {}
-class B implements A {
-  const B();
-}
-class C {
-  final A a;
-  const C(this.a);
-}
-var v = const C(const B());''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_fieldFormalParameterAssignableToField_list_dynamic() async {
-    // [1, 2, 3] has type List<dynamic>, which is a subtype of List<int>.
-    Source source = addSource(r'''
-class A {
-  const A(List<int> x);
-}
-var x = const A(const [1, 2, 3]);''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_fieldFormalParameterAssignableToField_list_nonDynamic() async {
-    // <int>[1, 2, 3] has type List<int>, which is a subtype of List<num>.
-    Source source = addSource(r'''
-class A {
-  const A(List<num> x);
-}
-var x = const A(const <int>[1, 2, 3]);''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_fieldFormalParameterAssignableToField_map_dynamic() async {
-    // {1: 2} has type Map<dynamic, dynamic>, which is a subtype of
-    // Map<int, int>.
-    Source source = addSource(r'''
-class A {
-  const A(Map<int, int> x);
-}
-var x = const A(const {1: 2});''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_fieldFormalParameterAssignableToField_map_keyDifferent() async {
-    // <int, int>{1: 2} has type Map<int, int>, which is a subtype of
-    // Map<num, int>.
-    Source source = addSource(r'''
-class A {
-  const A(Map<num, int> x);
-}
-var x = const A(const <int, int>{1: 2});''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_fieldFormalParameterAssignableToField_map_valueDifferent() async {
-    // <int, int>{1: 2} has type Map<int, int>, which is a subtype of
-    // Map<int, num>.
-    Source source = addSource(r'''
-class A {
-  const A(Map<int, num> x);
-}
-var x = const A(const <int, int>{1: 2});''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_fieldFormalParameterAssignableToField_notype() async {
-    // If a field is declared without a type, then any value may be assigned to
-    // it.
-    Source source = addSource(r'''
-class A {
-  final x;
-  const A(this.x);
-}
-var v = const A(5);''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_fieldFormalParameterAssignableToField_null() async {
-    // Null is assignable to anything.
-    Source source = addSource(r'''
-class A {
-  final int x;
-  const A(this.x);
-}
-var v = const A(null);''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_fieldFormalParameterAssignableToField_typedef() async {
-    // foo has the runtime type dynamic -> dynamic, so it is not assignable
-    // to A.f.
-    Source source = addSource(r'''
-typedef String Int2String(int x);
-class A {
-  final Int2String f;
-  const A(this.f);
-}
-foo(x) => 1;
-var v = const A(foo);''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
-    verify([source]);
-  }
-
-  test_fieldFormalParameterAssignableToField_typeSubstitution() async {
-    // foo has the runtime type dynamic -> dynamic, so it should be assignable
-    // to A.f.
-    Source source = addSource(r'''
-class A<T> {
-  final T x;
-  const A(this.x);
-}
-var v = const A<int>(3);''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_fieldFormalParameterNotAssignableToField() async {
-    Source source = addSource(r'''
-class A {
-  final int x;
-  const A(this.x);
-}
-var v = const A('foo');''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
-    ]);
-    verify([source]);
-  }
-
-  test_fieldFormalParameterNotAssignableToField_extends() async {
-    // According to checked-mode type checking rules, a value of type A is not
-    // assignable to a field of type B, because B extends A (the subtyping
-    // relationship is in the wrong direction).
-    Source source = addSource(r'''
-class A {
-  const A();
-}
-class B extends A {
-  const B();
-}
-class C {
-  final B b;
-  const C(this.b);
-}
-const A u = const A();
-var v = const C(u);''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
-    ]);
-    verify([source]);
-  }
-
-  test_fieldFormalParameterNotAssignableToField_fieldType() async {
-    Source source = addSource(r'''
-class A {
-  final int x;
-  const A(this.x);
-}
-var v = const A('foo');''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
-    ]);
-    verify([source]);
-  }
-
-  test_fieldFormalParameterNotAssignableToField_fieldType_unresolved() async {
-    Source source = addSource(r'''
-class A {
-  final Unresolved x;
-  const A(String this.x);
-}
-var v = const A('foo');''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-      StaticWarningCode.UNDEFINED_CLASS
-    ]);
-    verify([source]);
-  }
-
-  test_fieldFormalParameterNotAssignableToField_implements() async {
-    // According to checked-mode type checking rules, a value of type A is not
-    // assignable to a field of type B, because B implements A (the subtyping
-    // relationship is in the wrong direction).
-    Source source = addSource(r'''
-class A {
-  const A();
-}
-class B implements A {}
-class C {
-  final B b;
-  const C(this.b);
-}
-const A u = const A();
-var v = const C(u);''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
-    ]);
-    verify([source]);
-  }
-
-  test_fieldFormalParameterNotAssignableToField_list() async {
-    // <num>[1, 2, 3] has type List<num>, which is not a subtype of List<int>.
-    Source source = addSource(r'''
-class A {
-  const A(List<int> x);
-}
-const dynamic w = const <num>[1, 2, 3];
-var x = const A(w);''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
-    ]);
-    verify([source]);
-  }
-
-  test_fieldFormalParameterNotAssignableToField_map_keyMismatch() async {
-    // <num, int>{1: 2} has type Map<num, int>, which is not a subtype of
-    // Map<int, int>.
-    Source source = addSource(r'''
-class A {
-  const A(Map<int, int> x);
-}
-const dynamic w = const <num, int>{1: 2};
-var x = const A(w);''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
-    ]);
-    verify([source]);
-  }
-
-  test_fieldFormalParameterNotAssignableToField_map_valueMismatch() async {
-    // <int, num>{1: 2} has type Map<int, num>, which is not a subtype of
-    // Map<int, int>.
-    Source source = addSource(r'''
-class A {
-  const A(Map<int, int> x);
-}
-const dynamic w = const <int, num>{1: 2};
-var x = const A(w);''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH
-    ]);
-    verify([source]);
-  }
-
-  test_fieldFormalParameterNotAssignableToField_optional() async {
-    Source source = addSource(r'''
-class A {
-  final int x;
-  const A([this.x = 'foo']);
-}
-var v = const A();''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-      StaticTypeWarningCode.INVALID_ASSIGNMENT
-    ]);
-    verify([source]);
-  }
-
-  test_fieldFormalParameterNotAssignableToField_typedef() async {
-    // foo has the runtime type String -> int, so it should not be assignable
-    // to A.f (A.f requires it to be int -> String).
-    Source source = addSource(r'''
-typedef String Int2String(int x);
-class A {
-  final Int2String f;
-  const A(this.f);
-}
-int foo(String x) => 1;
-var v = const A(foo);''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
-    ]);
-    verify([source]);
-  }
-
-  test_fieldInitializerNotAssignable() async {
-    Source source = addSource(r'''
-class A {
-  final int x;
-  const A() : x = '';
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE,
-      StaticWarningCode.FIELD_INITIALIZER_NOT_ASSIGNABLE
-    ]);
-    verify([source]);
-  }
-
-  test_fieldTypeMismatch() async {
-    Source source = addSource(r'''
-class A {
-  const A(x) : y = x;
-  final int y;
-}
-var v = const A('foo');''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH
-    ]);
-    verify([source]);
-  }
-
-  test_fieldTypeMismatch_generic() async {
-    Source source = addSource(r'''
-class C<T> {
-  final T x = y;
-  const C();
-}
-const int y = 1;
-var v = const C<String>();
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-      source,
-      [
-        CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
-        StaticTypeWarningCode.INVALID_ASSIGNMENT
-      ],
-    );
-    verify([source]);
-  }
-
-  test_fieldTypeMismatch_unresolved() async {
-    Source source = addSource(r'''
-class A {
-  const A(x) : y = x;
-  final Unresolved y;
-}
-var v = const A('foo');''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
-      StaticWarningCode.UNDEFINED_CLASS
-    ]);
-    verify([source]);
-  }
-
-  test_fieldTypeOk_generic() async {
-    Source source = addSource(r'''
-class C<T> {
-  final T x = y;
-  const C();
-}
-const int y = 1;
-var v = const C<int>();
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-      source,
-      [StaticTypeWarningCode.INVALID_ASSIGNMENT],
-    );
-    verify([source]);
-  }
-
-  test_fieldTypeOk_null() async {
-    Source source = addSource(r'''
-class A {
-  const A(x) : y = x;
-  final int y;
-}
-var v = const A(null);''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_fieldTypeOk_unresolved_null() async {
-    // Null always passes runtime type checks, even when the type is
-    // unresolved.
-    Source source = addSource(r'''
-class A {
-  const A(x) : y = x;
-  final Unresolved y;
-}
-var v = const A(null);''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.UNDEFINED_CLASS]);
-    verify([source]);
-  }
-
-  test_listElementTypeNotAssignable() async {
-    Source source = addSource("var v = const <String> [42];");
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE,
-      StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
-    ]);
-    verify([source]);
-  }
-
-  test_listLiteral_inferredElementType() async {
-    Source source = addSource('''
-const Object x = [1];
-const List<String> y = x;
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH]);
-    verify([source]);
-  }
-
-  test_mapKeyTypeNotAssignable() async {
-    Source source = addSource("var v = const <String, int > {1 : 2};");
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE,
-      StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE
-    ]);
-    verify([source]);
-  }
-
-  test_mapLiteral_inferredKeyType() async {
-    Source source = addSource('''
-const Object x = {1: 1};
-const Map<String, dynamic> y = x;
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH]);
-    verify([source]);
-  }
-
-  test_mapLiteral_inferredValueType() async {
-    Source source = addSource('''
-const Object x = {1: 1};
-const Map<dynamic, String> y = x;
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH]);
-    verify([source]);
-  }
-
-  test_mapValueTypeNotAssignable() async {
-    Source source = addSource("var v = const <String, String> {'a' : 2};");
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE,
-      StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE
-    ]);
-    verify([source]);
-  }
-
-  test_parameterAssignable_null() async {
-    // Null is assignable to anything.
-    Source source = addSource(r'''
-class A {
-  const A(int x);
-}
-var v = const A(null);''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_parameterAssignable_typeSubstitution() async {
-    Source source = addSource(r'''
-class A<T> {
-  const A(T x);
-}
-var v = const A<int>(3);''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_parameterAssignable_undefined_null() async {
-    // Null always passes runtime type checks, even when the type is
-    // unresolved.
-    Source source = addSource(r'''
-class A {
-  const A(Unresolved x);
-}
-var v = const A(null);''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.UNDEFINED_CLASS]);
-    verify([source]);
-  }
-
-  test_parameterNotAssignable() async {
-    Source source = addSource(r'''
-class A {
-  const A(int x);
-}
-var v = const A('foo');''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
-    ]);
-    verify([source]);
-  }
-
-  test_parameterNotAssignable_typeSubstitution() async {
-    Source source = addSource(r'''
-class A<T> {
-  const A(T x);
-}
-var v = const A<int>('foo');''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
-    ]);
-    verify([source]);
-  }
-
-  test_parameterNotAssignable_undefined() async {
-    Source source = addSource(r'''
-class A {
-  const A(Unresolved x);
-}
-var v = const A('foo');''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
-      StaticWarningCode.UNDEFINED_CLASS
-    ]);
-    verify([source]);
-  }
-
-  test_redirectingConstructor_paramTypeMismatch() async {
-    Source source = addSource(r'''
-class A {
-  const A.a1(x) : this.a2(x);
-  const A.a2(String x);
-}
-var v = const A.a1(0);''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
-    verify([source]);
-  }
-
-  test_superConstructor_paramTypeMismatch() async {
-    Source source = addSource(r'''
-class C {
-  final double d;
-  const C(this.d);
-}
-class D extends C {
-  const D(d) : super(d);
-}
-const f = const D('0.0');
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
-    verify([source]);
-  }
-
-  test_topLevelVarAssignable_null() async {
-    Source source = addSource("const int x = null;");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_topLevelVarAssignable_undefined_null() async {
-    // Null always passes runtime type checks, even when the type is
-    // unresolved.
-    Source source = addSource("const Unresolved x = null;");
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.UNDEFINED_CLASS]);
-    verify([source]);
-  }
-
-  test_topLevelVarNotAssignable() async {
-    Source source = addSource("const int x = 'foo';");
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH,
-      StaticTypeWarningCode.INVALID_ASSIGNMENT
-    ]);
-    verify([source]);
-  }
-
-  test_topLevelVarNotAssignable_undefined() async {
-    Source source = addSource("const Unresolved x = 'foo';");
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH,
-      StaticWarningCode.UNDEFINED_CLASS
-    ]);
-    verify([source]);
-  }
-}
diff --git a/pkg/analyzer/test/generated/checked_mode_compile_time_error_code_driver_test.dart b/pkg/analyzer/test/generated/checked_mode_compile_time_error_code_driver_test.dart
deleted file mode 100644
index f8d85f2..0000000
--- a/pkg/analyzer/test/generated/checked_mode_compile_time_error_code_driver_test.dart
+++ /dev/null
@@ -1,45 +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/src/dart/analysis/experiments.dart';
-import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import 'checked_mode_compile_time_error_code.dart';
-import 'resolver_test_case.dart';
-
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(CheckedModeCompileTimeErrorCodeTest_Driver);
-    defineReflectiveTests(SetElementTypeNotAssignableTest);
-  });
-}
-
-@reflectiveTest
-class CheckedModeCompileTimeErrorCodeTest_Driver
-    extends CheckedModeCompileTimeErrorCodeTest {
-  @override
-  bool get enableNewAnalysisDriver => true;
-}
-
-@reflectiveTest
-class SetElementTypeNotAssignableTest extends ResolverTestCase {
-  @override
-  List<String> get enabledExperiments => [EnableString.set_literals];
-
-  @override
-  bool get enableNewAnalysisDriver => true;
-
-  test_simple() async {
-    Source source = addSource("var v = const <String>{42};");
-    await computeAnalysisResult(source);
-    // TODO(brianwilkerson) Fix this so that only one error is produced.
-    assertErrors(source, [
-      CheckedModeCompileTimeErrorCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE,
-      StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE
-    ]);
-    verify([source]);
-  }
-}
diff --git a/pkg/analyzer/test/generated/checked_mode_compile_time_error_code_test.dart b/pkg/analyzer/test/generated/checked_mode_compile_time_error_code_test.dart
new file mode 100644
index 0000000..46f7960
--- /dev/null
+++ b/pkg/analyzer/test/generated/checked_mode_compile_time_error_code_test.dart
@@ -0,0 +1,552 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../src/dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(CheckedModeCompileTimeErrorCodeTest);
+  });
+}
+
+@reflectiveTest
+class CheckedModeCompileTimeErrorCodeTest extends DriverResolutionTest {
+  test_assertion_throws() async {
+    await assertErrorCodesInCode(r'''
+class A {
+  const A(int x, int y) : assert(x < y);
+}
+var v = const A(3, 2);
+''', [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
+  }
+
+  test_fieldFormalParameterAssignableToField_extends() async {
+    // According to checked-mode type checking rules, a value of type B is
+    // assignable to a field of type A, because B extends A (and hence is a
+    // subtype of A).
+    await assertNoErrorsInCode(r'''
+class A {
+  const A();
+}
+class B extends A {
+  const B();
+}
+class C {
+  final A a;
+  const C(this.a);
+}
+var v = const C(const B());
+''');
+  }
+
+  test_fieldFormalParameterAssignableToField_fieldType_unresolved_null() async {
+    // Null always passes runtime type checks, even when the type is
+    // unresolved.
+    await assertErrorCodesInCode(r'''
+class A {
+  final Unresolved x;
+  const A(String this.x);
+}
+var v = const A(null);
+''', [StaticWarningCode.UNDEFINED_CLASS]);
+  }
+
+  test_fieldFormalParameterAssignableToField_implements() async {
+    // According to checked-mode type checking rules, a value of type B is
+    // assignable to a field of type A, because B implements A (and hence is a
+    // subtype of A).
+    await assertNoErrorsInCode(r'''
+class A {}
+class B implements A {
+  const B();
+}
+class C {
+  final A a;
+  const C(this.a);
+}
+var v = const C(const B());
+''');
+  }
+
+  test_fieldFormalParameterAssignableToField_list_dynamic() async {
+    // [1, 2, 3] has type List<dynamic>, which is a subtype of List<int>.
+    await assertNoErrorsInCode(r'''
+class A {
+  const A(List<int> x);
+}
+var x = const A(const [1, 2, 3]);
+''');
+  }
+
+  test_fieldFormalParameterAssignableToField_list_nonDynamic() async {
+    // <int>[1, 2, 3] has type List<int>, which is a subtype of List<num>.
+    await assertNoErrorsInCode(r'''
+class A {
+  const A(List<num> x);
+}
+var x = const A(const <int>[1, 2, 3]);
+''');
+  }
+
+  test_fieldFormalParameterAssignableToField_map_dynamic() async {
+    // {1: 2} has type Map<dynamic, dynamic>, which is a subtype of
+    // Map<int, int>.
+    await assertNoErrorsInCode(r'''
+class A {
+  const A(Map<int, int> x);
+}
+var x = const A(const {1: 2});
+''');
+  }
+
+  test_fieldFormalParameterAssignableToField_map_keyDifferent() async {
+    // <int, int>{1: 2} has type Map<int, int>, which is a subtype of
+    // Map<num, int>.
+    await assertNoErrorsInCode(r'''
+class A {
+  const A(Map<num, int> x);
+}
+var x = const A(const <int, int>{1: 2});
+''');
+  }
+
+  test_fieldFormalParameterAssignableToField_map_valueDifferent() async {
+    // <int, int>{1: 2} has type Map<int, int>, which is a subtype of
+    // Map<int, num>.
+    await assertNoErrorsInCode(r'''
+class A {
+  const A(Map<int, num> x);
+}
+var x = const A(const <int, int>{1: 2});
+''');
+  }
+
+  test_fieldFormalParameterAssignableToField_notype() async {
+    // If a field is declared without a type, then any value may be assigned to
+    // it.
+    await assertNoErrorsInCode(r'''
+class A {
+  final x;
+  const A(this.x);
+}
+var v = const A(5);
+''');
+  }
+
+  test_fieldFormalParameterAssignableToField_null() async {
+    // Null is assignable to anything.
+    await assertNoErrorsInCode(r'''
+class A {
+  final int x;
+  const A(this.x);
+}
+var v = const A(null);
+''');
+  }
+
+  test_fieldFormalParameterAssignableToField_typedef() async {
+    // foo has the runtime type dynamic -> dynamic, so it is not assignable
+    // to A.f.
+    await assertErrorCodesInCode(r'''
+typedef String Int2String(int x);
+class A {
+  final Int2String f;
+  const A(this.f);
+}
+foo(x) => 1;
+var v = const A(foo);
+''', [StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
+  }
+
+  test_fieldFormalParameterAssignableToField_typeSubstitution() async {
+    // foo has the runtime type dynamic -> dynamic, so it should be assignable
+    // to A.f.
+    await assertNoErrorsInCode(r'''
+class A<T> {
+  final T x;
+  const A(this.x);
+}
+var v = const A<int>(3);
+''');
+  }
+
+  test_fieldFormalParameterNotAssignableToField() async {
+    await assertErrorCodesInCode(r'''
+class A {
+  final int x;
+  const A(this.x);
+}
+var v = const A('foo');
+''', [
+      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
+      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    ]);
+  }
+
+  test_fieldFormalParameterNotAssignableToField_extends() async {
+    // According to checked-mode type checking rules, a value of type A is not
+    // assignable to a field of type B, because B extends A (the subtyping
+    // relationship is in the wrong direction).
+    await assertErrorCodesInCode(r'''
+class A {
+  const A();
+}
+class B extends A {
+  const B();
+}
+class C {
+  final B b;
+  const C(this.b);
+}
+const A u = const A();
+var v = const C(u);
+''', [CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH]);
+  }
+
+  test_fieldFormalParameterNotAssignableToField_fieldType() async {
+    await assertErrorCodesInCode(r'''
+class A {
+  final int x;
+  const A(this.x);
+}
+var v = const A('foo');
+''', [
+      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
+      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    ]);
+  }
+
+  test_fieldFormalParameterNotAssignableToField_fieldType_unresolved() async {
+    await assertErrorCodesInCode(r'''
+class A {
+  final Unresolved x;
+  const A(String this.x);
+}
+var v = const A('foo');
+''', [
+      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
+      StaticWarningCode.UNDEFINED_CLASS
+    ]);
+  }
+
+  test_fieldFormalParameterNotAssignableToField_implements() async {
+    // According to checked-mode type checking rules, a value of type A is not
+    // assignable to a field of type B, because B implements A (the subtyping
+    // relationship is in the wrong direction).
+    await assertErrorCodesInCode(r'''
+class A {
+  const A();
+}
+class B implements A {}
+class C {
+  final B b;
+  const C(this.b);
+}
+const A u = const A();
+var v = const C(u);
+''', [CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH]);
+  }
+
+  test_fieldFormalParameterNotAssignableToField_list() async {
+    // <num>[1, 2, 3] has type List<num>, which is not a subtype of List<int>.
+    await assertErrorCodesInCode(r'''
+class A {
+  const A(List<int> x);
+}
+const dynamic w = const <num>[1, 2, 3];
+var x = const A(w);
+''', [CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH]);
+  }
+
+  test_fieldFormalParameterNotAssignableToField_map_keyMismatch() async {
+    // <num, int>{1: 2} has type Map<num, int>, which is not a subtype of
+    // Map<int, int>.
+    await assertErrorCodesInCode(r'''
+class A {
+  const A(Map<int, int> x);
+}
+const dynamic w = const <num, int>{1: 2};
+var x = const A(w);
+''', [CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH]);
+  }
+
+  test_fieldFormalParameterNotAssignableToField_map_valueMismatch() async {
+    // <int, num>{1: 2} has type Map<int, num>, which is not a subtype of
+    // Map<int, int>.
+    await assertErrorCodesInCode(r'''
+class A {
+  const A(Map<int, int> x);
+}
+const dynamic w = const <int, num>{1: 2};
+var x = const A(w);
+''', [CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH]);
+  }
+
+  test_fieldFormalParameterNotAssignableToField_optional() async {
+    await assertErrorCodesInCode(r'''
+class A {
+  final int x;
+  const A([this.x = 'foo']);
+}
+var v = const A();
+''', [
+      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
+      StaticTypeWarningCode.INVALID_ASSIGNMENT
+    ]);
+  }
+
+  test_fieldFormalParameterNotAssignableToField_typedef() async {
+    // foo has the runtime type String -> int, so it should not be assignable
+    // to A.f (A.f requires it to be int -> String).
+    await assertErrorCodesInCode(r'''
+typedef String Int2String(int x);
+class A {
+  final Int2String f;
+  const A(this.f);
+}
+int foo(String x) => 1;
+var v = const A(foo);
+''', [
+      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
+      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    ]);
+  }
+
+  test_fieldInitializerNotAssignable() async {
+    await assertErrorCodesInCode(r'''
+class A {
+  final int x;
+  const A() : x = '';
+}
+''', [
+      CheckedModeCompileTimeErrorCode.CONST_FIELD_INITIALIZER_NOT_ASSIGNABLE,
+      StaticWarningCode.FIELD_INITIALIZER_NOT_ASSIGNABLE
+    ]);
+  }
+
+  test_fieldTypeMismatch() async {
+    await assertErrorCodesInCode(r'''
+class A {
+  const A(x) : y = x;
+  final int y;
+}
+var v = const A('foo');
+''', [CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH]);
+  }
+
+  test_fieldTypeMismatch_generic() async {
+    await assertErrorCodesInCode(
+      r'''
+class C<T> {
+  final T x = y;
+  const C();
+}
+const int y = 1;
+var v = const C<String>();
+''',
+      [
+        CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
+        StaticTypeWarningCode.INVALID_ASSIGNMENT
+      ],
+    );
+  }
+
+  test_fieldTypeMismatch_unresolved() async {
+    await assertErrorCodesInCode(r'''
+class A {
+  const A(x) : y = x;
+  final Unresolved y;
+}
+var v = const A('foo');
+''', [
+      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH,
+      StaticWarningCode.UNDEFINED_CLASS
+    ]);
+  }
+
+  test_fieldTypeOk_generic() async {
+    await assertErrorCodesInCode(
+      r'''
+class C<T> {
+  final T x = y;
+  const C();
+}
+const int y = 1;
+var v = const C<int>();
+''',
+      [StaticTypeWarningCode.INVALID_ASSIGNMENT],
+    );
+  }
+
+  test_fieldTypeOk_null() async {
+    await assertNoErrorsInCode(r'''
+class A {
+  const A(x) : y = x;
+  final int y;
+}
+var v = const A(null);
+''');
+  }
+
+  test_fieldTypeOk_unresolved_null() async {
+    // Null always passes runtime type checks, even when the type is
+    // unresolved.
+    await assertErrorCodesInCode(r'''
+class A {
+  const A(x) : y = x;
+  final Unresolved y;
+}
+var v = const A(null);
+''', [StaticWarningCode.UNDEFINED_CLASS]);
+  }
+
+  test_listElementTypeNotAssignable() async {
+    await assertErrorCodesInCode('''
+var v = const <String> [42];
+''', [StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE]);
+  }
+
+  test_listLiteral_inferredElementType() async {
+    await assertErrorCodesInCode('''
+const Object x = [1];
+const List<String> y = x;
+''', [CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH]);
+  }
+
+  test_mapLiteral_inferredKeyType() async {
+    await assertErrorCodesInCode('''
+const Object x = {1: 1};
+const Map<String, dynamic> y = x;
+''', [CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH]);
+  }
+
+  test_mapLiteral_inferredValueType() async {
+    await assertErrorCodesInCode('''
+const Object x = {1: 1};
+const Map<dynamic, String> y = x;
+''', [CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH]);
+  }
+
+  test_parameterAssignable_null() async {
+    // Null is assignable to anything.
+    await assertNoErrorsInCode(r'''
+class A {
+  const A(int x);
+}
+var v = const A(null);''');
+  }
+
+  test_parameterAssignable_typeSubstitution() async {
+    await assertNoErrorsInCode(r'''
+class A<T> {
+  const A(T x);
+}
+var v = const A<int>(3);''');
+  }
+
+  test_parameterAssignable_undefined_null() async {
+    // Null always passes runtime type checks, even when the type is
+    // unresolved.
+    await assertErrorCodesInCode(r'''
+class A {
+  const A(Unresolved x);
+}
+var v = const A(null);
+''', [StaticWarningCode.UNDEFINED_CLASS]);
+  }
+
+  test_parameterNotAssignable() async {
+    await assertErrorCodesInCode(r'''
+class A {
+  const A(int x);
+}
+var v = const A('foo');
+''', [
+      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
+      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    ]);
+  }
+
+  test_parameterNotAssignable_typeSubstitution() async {
+    await assertErrorCodesInCode(r'''
+class A<T> {
+  const A(T x);
+}
+var v = const A<int>('foo');
+''', [
+      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
+      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    ]);
+  }
+
+  test_parameterNotAssignable_undefined() async {
+    await assertErrorCodesInCode(r'''
+class A {
+  const A(Unresolved x);
+}
+var v = const A('foo');
+''', [
+      CheckedModeCompileTimeErrorCode.CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH,
+      StaticWarningCode.UNDEFINED_CLASS
+    ]);
+  }
+
+  test_redirectingConstructor_paramTypeMismatch() async {
+    await assertErrorCodesInCode(r'''
+class A {
+  const A.a1(x) : this.a2(x);
+  const A.a2(String x);
+}
+var v = const A.a1(0);
+''', [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
+  }
+
+  test_superConstructor_paramTypeMismatch() async {
+    await assertErrorCodesInCode(r'''
+class C {
+  final double d;
+  const C(this.d);
+}
+class D extends C {
+  const D(d) : super(d);
+}
+const f = const D('0.0');
+''', [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
+  }
+
+  test_topLevelVarAssignable_null() async {
+    await assertNoErrorsInCode('''
+const int x = null;
+''');
+  }
+
+  test_topLevelVarAssignable_undefined_null() async {
+    // Null always passes runtime type checks, even when the type is
+    // unresolved.
+    await assertErrorCodesInCode('''
+const Unresolved x = null;
+''', [StaticWarningCode.UNDEFINED_CLASS]);
+  }
+
+  test_topLevelVarNotAssignable() async {
+    await assertErrorCodesInCode('''
+const int x = 'foo';
+''', [
+      CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH,
+      StaticTypeWarningCode.INVALID_ASSIGNMENT
+    ]);
+  }
+
+  test_topLevelVarNotAssignable_undefined() async {
+    await assertErrorCodesInCode('''
+const Unresolved x = 'foo';
+''', [
+      CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH,
+      StaticWarningCode.UNDEFINED_CLASS
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/generated/compile_time_error_code.dart b/pkg/analyzer/test/generated/compile_time_error_code.dart
index b14a030..2daae3d 100644
--- a/pkg/analyzer/test/generated/compile_time_error_code.dart
+++ b/pkg/analyzer/test/generated/compile_time_error_code.dart
@@ -6,9 +6,8 @@
 
 import 'package:analyzer/dart/analysis/declared_variables.dart';
 import 'package:analyzer/error/error.dart';
-import 'package:analyzer/src/context/context.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode;
 import 'package:analyzer/src/generated/source_io.dart';
 import 'package:test/test.dart' show expect;
@@ -23,43 +22,39 @@
 
     // TODO(paulberry): this test is currently disabled due to non-termination
     // bugs elsewhere in the analyzer.
-    Source source = addSource('''
+    await assertErrorsInCode('''
 class A<T> implements B<List<T>> {}
 class B<T> implements A<List<T>> {}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.CONFLICTING_GENERIC_INTERFACES]);
+''', [CompileTimeErrorCode.CONFLICTING_GENERIC_INTERFACES]);
   }
 
   test_accessPrivateEnumField() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 enum E { ONE }
 String name(E e) {
   return e._name;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.ACCESS_PRIVATE_ENUM_FIELD]);
-    // Cannot verify because "_name" cannot be resolved.
+}
+''', [CompileTimeErrorCode.ACCESS_PRIVATE_ENUM_FIELD], verify: false);
   }
 
   test_ambiguousExport() async {
-    Source source = addSource(r'''
+    newFile("/lib1.dart", content: r'''
+library lib1;
+class N {}
+''');
+    newFile("/lib2.dart", content: r'''
+library lib2;
+class N {}
+''');
+    await assertErrorsInCode(r'''
 library L;
 export 'lib1.dart';
-export 'lib2.dart';''');
-    addNamedSource("/lib1.dart", r'''
-library lib1;
-class N {}''');
-    addNamedSource("/lib2.dart", r'''
-library lib2;
-class N {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.AMBIGUOUS_EXPORT]);
-    verify([source]);
+export 'lib2.dart';
+''', [CompileTimeErrorCode.AMBIGUOUS_EXPORT]);
   }
 
   test_annotationWithNotClass() async {
-    Source source = addSource('''
+    await assertErrorsInCode('''
 class Property {
   final int value;
   const Property(this.value);
@@ -70,14 +65,11 @@
 @property(123)
 main() {
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.ANNOTATION_WITH_NON_CLASS]);
-    verify([source]);
+''', [CompileTimeErrorCode.ANNOTATION_WITH_NON_CLASS]);
   }
 
   test_annotationWithNotClass_prefixed() async {
-    addNamedSource("/annotations.dart", r'''
+    newFile("/annotations.dart", content: r'''
 class Property {
   final int value;
   const Property(this.value);
@@ -85,512 +77,133 @@
 
 const Property property = const Property(42);
 ''');
-    Source source = addSource('''
+    await assertErrorsInCode('''
 import 'annotations.dart' as pref;
 @pref.property(123)
 main() {
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.ANNOTATION_WITH_NON_CLASS]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_annotation() async {
-    Source source = addSource('''
-const int async = 0;
-f() async {
-  g(@async x) {}
-  g(0);
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_argument_label() async {
-    Source source = addSource('''
-f(c) async {
-  c.g(async: 0);
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_async_method() async {
-    Source source = addSource('''
-f() async {
-  var async = 1;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_async_star_method() async {
-    Source source = addSource('''
-f() async* {
-  var async = 1;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_break_statement() async {
-    Source source = addSource('''
-f() async {
-  while (true) {
-    break async;
-  }
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER,
-      CompileTimeErrorCode.LABEL_UNDEFINED
-    ]);
-    // Note: we don't call verify([source]) because the reference to the
-    // "async" label is unresolved.
-  }
-
-  test_async_used_as_identifier_in_cascaded_invocation() async {
-    Source source = addSource('''
-class C {
-  int async() => 1;
-}
-f() async {
-  return new C()..async();
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_cascaded_setter_invocation() async {
-    Source source = addSource('''
-class C {
-  void set async(int i) {}
-}
-f() async {
-  return new C()..async = 1;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_catch_exception_argument() async {
-    Source source = addSource('''
-g() {}
-f() async {
-  try {
-    g();
-  } catch (async) { }
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_catch_stacktrace_argument() async {
-    Source source = addSource('''
-g() {}
-f() async {
-  try {
-    g();
-  } catch (e, async) { }
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_continue_statement() async {
-    Source source = addSource('''
-f() async {
-  while (true) {
-    continue async;
-  }
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER,
-      CompileTimeErrorCode.LABEL_UNDEFINED
-    ]);
-    // Note: we don't call verify([source]) because the reference to the
-    // "async" label is unresolved.
-  }
-
-  test_async_used_as_identifier_in_for_statement() async {
-    Source source = addSource('''
-var async;
-f() async {
-  for (async in []) {}
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_formal_parameter_name() async {
-    Source source = addSource('''
-f() async {
-  g(int async) {}
-  g(0);
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_getter_name() async {
-    Source source = addSource('''
-class C {
-  int get async => 1;
-}
-f() async {
-  return new C().async;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_invocation() async {
-    Source source = addSource('''
-class C {
-  int async() => 1;
-}
-f() async {
-  return new C().async();
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_local_function_name() async {
-    Source source = addSource('''
-f() async {
-  int async() => null;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_prefix() async {
-    Source source = addSource('''
-import 'dart:async' as async;
-f() async {
-  return new async.Future.value(0);
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_setter_name() async {
-    Source source = addSource('''
-class C {
-  void set async(int i) {}
-}
-f() async {
-  new C().async = 1;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_statement_label() async {
-    Source source = addSource('''
-f() async {
-  async: g();
-}
-g() {}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER,
-      HintCode.UNUSED_LABEL
-    ]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_string_interpolation() async {
-    Source source = addSource(r'''
-int async = 1;
-f() async {
-  return "$async";
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_suffix() async {
-    addNamedSource("/lib1.dart", r'''
-library lib1;
-int async;
-''');
-    Source source = addSource('''
-import 'lib1.dart' as l;
-f() async {
-  return l.async;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_switch_label() async {
-    Source source = addSource('''
-f() async {
-  switch (0) {
-    async: case 0: break;
-  }
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER,
-      HintCode.UNUSED_LABEL
-    ]);
-    verify([source]);
-  }
-
-  test_async_used_as_identifier_in_sync_star_method() async {
-    Source source = addSource('''
-f() sync* {
-  var async = 1;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
+''', [CompileTimeErrorCode.ANNOTATION_WITH_NON_CLASS]);
   }
 
   test_asyncForInWrongContext() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f(list) {
   await for (var e in list) {
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.ASYNC_FOR_IN_WRONG_CONTEXT]);
-    verify([source]);
-  }
-
-  test_await_used_as_identifier_in_async_method() async {
-    Source source = addSource('''
-f() async {
-  var await = 1;
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_await_used_as_identifier_in_async_star_method() async {
-    Source source = addSource('''
-f() async* {
-  var await = 1;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
-  }
-
-  test_await_used_as_identifier_in_sync_star_method() async {
-    Source source = addSource('''
-f() sync* {
-  var await = 1;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
+''', [CompileTimeErrorCode.ASYNC_FOR_IN_WRONG_CONTEXT]);
   }
 
   test_awaitInWrongContext_sync() async {
     // This test requires better error recovery than we currently have. In
     // particular, we need to be able to distinguish between an await expression
     // in the wrong context, and the use of 'await' as an identifier.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f(x) {
   return await x;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT]);
   }
 
   test_awaitInWrongContext_syncStar() async {
     // This test requires better error recovery than we currently have. In
     // particular, we need to be able to distinguish between an await expression
     // in the wrong context, and the use of 'await' as an identifier.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f(x) sync* {
   yield await x;
-}''');
-    await computeAnalysisResult(source);
-    if (usingFastaParser) {
-      assertErrors(source, [CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT]);
-    }
-    verify([source]);
+}
+''', [CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT]);
   }
 
   test_bug_23176() async {
-    Source source = addSource('''
+    await assertErrorsInCode('''
 class A {
   const A([x]);
 }
 class B {
   dynamic @A(const A()) x;
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE,
-                ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE,
-                ParserErrorCode.EXPECTED_TOKEN
-              ]
-            : [
-                ParserErrorCode.EXPECTED_CLASS_MEMBER,
-                ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE
-              ]);
-    verify([source]);
+''', [
+      ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE,
+      ParserErrorCode.MISSING_CONST_FINAL_VAR_OR_TYPE,
+      ParserErrorCode.EXPECTED_TOKEN
+    ]);
   }
 
   test_builtInIdentifierAsMixinName_classTypeAlias() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class B {}
-class as = A with B;''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME]);
-    verify([source]);
+class as = A with B;
+''', [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME]);
   }
 
   test_builtInIdentifierAsPrefixName() async {
-    Source source = addSource("import 'dart:async' as abstract;");
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+    await assertErrorsInCode('''
+import 'dart:async' as abstract;
+''', [
       CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_PREFIX_NAME,
       HintCode.UNUSED_IMPORT
     ]);
-    verify([source]);
   }
 
   test_builtInIdentifierAsType_dynamicMissingPrefix() async {
-    Source source = addSource(r"""
+    await assertErrorsInCode('''
 import 'dart:core' as core;
 
 dynamic x;
-""");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE]);
+''', [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE]);
   }
 
   test_builtInIdentifierAsType_formalParameter_field() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   var x;
   A(static this.x);
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [ParserErrorCode.EXTRANEOUS_MODIFIER]
-            : [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE]);
-    verify([source]);
+}
+''', [ParserErrorCode.EXTRANEOUS_MODIFIER]);
   }
 
   test_builtInIdentifierAsType_formalParameter_simple() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f(static x) {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [ParserErrorCode.EXTRANEOUS_MODIFIER]
-            : [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE]);
-    verify([source]);
+}
+''', [ParserErrorCode.EXTRANEOUS_MODIFIER]);
   }
 
   test_builtInIdentifierAsType_variableDeclaration() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f() {
   typedef x;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                StaticWarningCode.UNDEFINED_IDENTIFIER,
-                StaticWarningCode.UNDEFINED_IDENTIFIER,
-                ParserErrorCode.EXPECTED_TOKEN
-              ]
-            : [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE]);
-    verify([source]);
+}
+''', [
+      StaticWarningCode.UNDEFINED_IDENTIFIER,
+      StaticWarningCode.UNDEFINED_IDENTIFIER,
+      ParserErrorCode.EXPECTED_TOKEN
+    ]);
   }
 
   test_builtInIdentifierAsTypedefName_functionTypeAlias() async {
-    Source source = addSource("typedef bool as();");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME]);
-    verify([source]);
+    await assertErrorsInCode('''
+typedef bool as();
+''', [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME]);
   }
 
   test_builtInIdentifierAsTypeName() async {
-    Source source = addSource("class as {}");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_NAME]);
-    verify([source]);
+    await assertErrorsInCode('''
+class as {}
+''', [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_NAME]);
   }
 
   test_builtInIdentifierAsTypeParameterName() async {
-    Source source = addSource("class A<as> {}");
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A<as> {}
+''', [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_PARAMETER_NAME]);
   }
 
   test_caseExpressionTypeImplementsEquals() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class IntWrapper {
   final int value;
   const IntWrapper(this.value);
@@ -605,108 +218,83 @@
     case(const IntWrapper(1)) : return 1;
     default: return 0;
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS]);
   }
 
   test_conflictingGenericInterfaces_hierarchyLoop() async {
     // There is no interface conflict here, but there is a loop in the class
     // hierarchy leading to a finite set of implemented types; this loop
     // shouldn't cause non-termination.
-    Source source = addSource('''
+    await assertErrorsInCode('''
 class A<T> implements B<T> {}
 class B<T> implements A<T> {}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+''', [
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE
     ]);
   }
 
   test_conflictingGenericInterfaces_noConflict() async {
-    Source source = addSource('''
+    await assertNoErrorsInCode('''
 class I<T> {}
 class A implements I<int> {}
 class B implements I<int> {}
 class C extends A implements B {}
-    ''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
+''');
   }
 
   test_conflictingTypeVariableAndClass() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class T<T> {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_CLASS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_CLASS]);
   }
 
   test_conflictingTypeVariableAndMember_field() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A<T> {
   var T;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER]);
   }
 
   test_conflictingTypeVariableAndMember_getter() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A<T> {
   get T => null;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER]);
   }
 
   test_conflictingTypeVariableAndMember_method() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A<T> {
   T() {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER]);
   }
 
   test_conflictingTypeVariableAndMember_method_static() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A<T> {
   static T() {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER]);
   }
 
   test_conflictingTypeVariableAndMember_setter() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A<T> {
   set T(x) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER]);
   }
 
   test_consistentCaseExpressionTypes_dynamic() async {
     // Even though A.S and S have a static type of "dynamic", we should see
     // that they match 'abc', because they are constant strings.
-    Source source = addSource(r'''
+    await assertNoErrorsInCode(r'''
 class A {
   static const S = 'A.S';
 }
@@ -722,29 +310,25 @@
     case 'abc':
       break;
   }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
+}
+''');
   }
 
   test_const_invalid_constructorFieldInitializer_fromLibrary() async {
-    addNamedSource('/lib.dart', r'''
+    newFile('/lib.dart', content: r'''
 class A<T> {
   final int f;
   const A() : f = T.foo;
 }
 ''');
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 import 'lib.dart';
 const a = const A();
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
+''', [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
   }
 
   test_constConstructor_redirect_generic() async {
-    Source source = addSource(r'''
+    await assertNoErrorsInCode(r'''
 class A<T> {
   const A(T value) : this._(value);
   const A._(T value) : value = value;
@@ -755,115 +339,95 @@
   const A<int>(1);
 }
 ''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
   }
 
   test_constConstructorWithFieldInitializedByNonConst() async {
-    Source source = addSource(r'''
+    // TODO(paulberry): the error CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE is
+    // redundant and ought to be suppressed.
+    await assertErrorsInCode(r'''
 class A {
   final int i = f();
   const A();
 }
 int f() {
   return 3;
-}''');
-    // TODO(paulberry): the error CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE is
-    // redundant and ought to be suppressed.
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode
           .CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST,
       CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
     ]);
-    verify([source]);
   }
 
   test_constConstructorWithFieldInitializedByNonConst_static() async {
-    Source source = addSource(r'''
+    await assertNoErrorsInCode(r'''
 class A {
   static final int i = f();
   const A();
 }
 int f() {
   return 3;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
+}
+''');
   }
 
   test_constConstructorWithNonConstSuper_explicit() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A();
 }
 class B extends A {
   const B(): super();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER]);
   }
 
   test_constConstructorWithNonConstSuper_implicit() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A();
 }
 class B extends A {
   const B();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER]);
   }
 
   test_constConstructorWithNonFinalField_mixin() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   var a;
 }
 class B extends Object with A {
   const B();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD,
       CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD
     ]);
-    verify([source]);
   }
 
   test_constConstructorWithNonFinalField_super() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   var a;
 }
 class B extends A {
   const B();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD,
       CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER
     ]);
-    verify([source]);
   }
 
   test_constConstructorWithNonFinalField_this() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int x;
   const A();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD]);
   }
 
   test_constDeferredClass() async {
@@ -872,13 +436,15 @@
 library lib1;
 class A {
   const A();
-}''',
+}
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
 main() {
   const a.A();
-}'''
+}
+'''
     ], <ErrorCode>[
       CompileTimeErrorCode.CONST_DEFERRED_CLASS
     ]);
@@ -903,85 +469,70 @@
   }
 
   test_constEval_newInstance_constConstructor() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A();
 }
-const a = new A();''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE]);
-    verify([source]);
+const a = new A();
+''', [CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE]);
   }
 
   test_constEval_newInstance_externalFactoryConstConstructor() async {
     // We can't evaluate "const A()" because its constructor is external.  But
     // the code is correct--we shouldn't report an error.
-    Source source = addSource(r'''
+    await assertNoErrorsInCode(r'''
 class A {
   external const factory A();
 }
-const x = const A();''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
+const x = const A();
+''');
   }
 
   test_constEval_nonStaticField_inGenericClass() async {
-    Source source = addSource('''
+    await assertErrorsInCode('''
 class C<T> {
   const C();
   T get t => null;
 }
 
-const x = const C().t;''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE]);
-    verify([source]);
+const x = const C().t;
+''', [CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE]);
   }
 
   test_constEval_propertyExtraction_targetNotConst() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A();
   int m() => 0;
 }
 final a = const A();
-const C = a.m;''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE]);
-    verify([source]);
+const C = a.m;
+''', [CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE]);
   }
 
   test_constEvalThrowsException() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class C {
   const C();
 }
-f() { return const C(); }''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONST_CONSTRUCTOR_THROWS_EXCEPTION]);
-    verify([source]);
+f() { return const C(); }
+''', [CompileTimeErrorCode.CONST_CONSTRUCTOR_THROWS_EXCEPTION]);
   }
 
   test_constEvalThrowsException_binaryMinus_null() async {
-    await _check_constEvalThrowsException_binary_null("null - 5", false);
-    await _check_constEvalThrowsException_binary_null("5 - null", true);
+    await _check_constEvalThrowsException_binary_null('null - 5', false);
+    await _check_constEvalThrowsException_binary_null('5 - null', true);
   }
 
   test_constEvalThrowsException_binaryPlus_null() async {
-    await _check_constEvalThrowsException_binary_null("null + 5", false);
-    await _check_constEvalThrowsException_binary_null("5 + null", true);
+    await _check_constEvalThrowsException_binary_null('null + 5', false);
+    await _check_constEvalThrowsException_binary_null('5 + null', true);
   }
 
   test_constEvalThrowsException_divisionByZero() async {
-    Source source = addSource("const C = 1 ~/ 0;");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_IDBZE]);
-    verify([source]);
+    await assertErrorsInCode('''
+const C = 1 ~/ 0;
+''', [CompileTimeErrorCode.CONST_EVAL_THROWS_IDBZE]);
   }
 
   test_constEvalThrowsException_finalAlreadySet_initializer() async {
@@ -989,19 +540,16 @@
     // and at the site of the constructor, then invoking that constructor would
     // produce a runtime error; hence invoking that constructor via the "const"
     // keyword results in a compile-time error.
-    Source source = addSource('''
+    await assertErrorsInCode('''
 class C {
   final x = 1;
   const C() : x = 2;
 }
 var x = const C();
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+''', [
       CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
       StaticWarningCode.FIELD_INITIALIZED_IN_INITIALIZER_AND_DECLARATION
     ]);
-    verify([source]);
   }
 
   test_constEvalThrowsException_finalAlreadySet_initializing_formal() async {
@@ -1010,199 +558,180 @@
     // constructor, then invoking that constructor would produce a runtime
     // error; hence invoking that constructor via the "const" keyword results
     // in a compile-time error.
-    Source source = addSource('''
+    await assertErrorsInCode('''
 class C {
   final x = 1;
   const C(this.x);
 }
 var x = const C(2);
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+''', [
       CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
       StaticWarningCode.FINAL_INITIALIZED_IN_DECLARATION_AND_CONSTRUCTOR
     ]);
-    verify([source]);
   }
 
   test_constEvalThrowsException_unaryBitNot_null() async {
-    Source source = addSource("const C = ~null;");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
-    // no verify(), '~null' is not resolved
+    await assertErrorsInCode('''
+const C = ~null;
+''', [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION], verify: false);
   }
 
   test_constEvalThrowsException_unaryNegated_null() async {
-    Source source = addSource("const C = -null;");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
-    // no verify(), '-null' is not resolved
+    await assertErrorsInCode('''
+const C = -null;
+''', [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION], verify: false);
   }
 
   test_constEvalThrowsException_unaryNot_null() async {
-    Source source = addSource("const C = !null;");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
-    verify([source]);
+    await assertErrorsInCode('''
+const C = !null;
+''', [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
   }
 
-  test_constEvalTypeBool_binary() async {
-    await _check_constEvalTypeBool_withParameter_binary("p && ''");
-    await _check_constEvalTypeBool_withParameter_binary("p || ''");
+  test_constEvalTypeBool_binary_and() async {
+    await assertErrorsInCode('''
+const _ = true && '';
+''', [
+      CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL,
+      StaticTypeWarningCode.NON_BOOL_OPERAND,
+    ]);
   }
 
   test_constEvalTypeBool_binary_leftTrue() async {
-    Source source = addSource("const C = (true || 0);");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [StaticTypeWarningCode.NON_BOOL_OPERAND, HintCode.DEAD_CODE]);
-    verify([source]);
+    await assertErrorsInCode('''
+const C = (true || 0);
+''', [StaticTypeWarningCode.NON_BOOL_OPERAND, HintCode.DEAD_CODE]);
+  }
+
+  test_constEvalTypeBool_binary_or() async {
+    await assertErrorsInCode(r'''
+const _ = false || '';
+''', [
+      CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL,
+      StaticTypeWarningCode.NON_BOOL_OPERAND,
+    ]);
   }
 
   test_constEvalTypeBool_logicalOr_trueLeftOperand() async {
-    Source source = addSource(r'''
+    await assertNoErrorsInCode(r'''
 class C {
   final int x;
   const C({this.x}) : assert(x == null || x >= 0);
 }
 const c = const C();
 ''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
   }
 
   test_constEvalTypeBoolNumString_equal() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(
+        r'''
 class A {
   const A();
 }
-class B {
-  final a;
-  const B(num p) : a = p == const A();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_NUM_STRING]);
-    verify([source]);
+
+const num a = 0;
+const _ = a == const A();
+''',
+        IsEnabledByDefault.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_NUM_STRING]);
   }
 
   test_constEvalTypeBoolNumString_notEqual() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A();
 }
-class B {
-  final a;
-  const B(String p) : a = p != const A();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_NUM_STRING]);
-    verify([source]);
+
+const num a = 0;
+const _ = a != const A();
+''', [CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_NUM_STRING]);
   }
 
   test_constEvalTypeInt_binary() async {
-    await _check_constEvalTypeBoolOrInt_withParameter_binary("p ^ ''");
-    await _check_constEvalTypeBoolOrInt_withParameter_binary("p & ''");
-    await _check_constEvalTypeBoolOrInt_withParameter_binary("p | ''");
-    await _check_constEvalTypeInt_withParameter_binary("p >> ''");
-    await _check_constEvalTypeInt_withParameter_binary("p << ''");
+    await _check_constEvalTypeBoolOrInt_binary("a ^ ''");
+    await _check_constEvalTypeBoolOrInt_binary("a & ''");
+    await _check_constEvalTypeBoolOrInt_binary("a | ''");
+    await _check_constEvalTypeInt_binary("a >> ''");
+    await _check_constEvalTypeInt_binary("a << ''");
   }
 
   test_constEvalTypeNum_binary() async {
-    await _check_constEvalTypeNum_withParameter_binary("p + ''");
-    await _check_constEvalTypeNum_withParameter_binary("p - ''");
-    await _check_constEvalTypeNum_withParameter_binary("p * ''");
-    await _check_constEvalTypeNum_withParameter_binary("p / ''");
-    await _check_constEvalTypeNum_withParameter_binary("p ~/ ''");
-    await _check_constEvalTypeNum_withParameter_binary("p > ''");
-    await _check_constEvalTypeNum_withParameter_binary("p < ''");
-    await _check_constEvalTypeNum_withParameter_binary("p >= ''");
-    await _check_constEvalTypeNum_withParameter_binary("p <= ''");
-    await _check_constEvalTypeNum_withParameter_binary("p % ''");
+    await _check_constEvalTypeNum_binary("a + ''");
+    await _check_constEvalTypeNum_binary("a - ''");
+    await _check_constEvalTypeNum_binary("a * ''");
+    await _check_constEvalTypeNum_binary("a / ''");
+    await _check_constEvalTypeNum_binary("a ~/ ''");
+    await _check_constEvalTypeNum_binary("a > ''");
+    await _check_constEvalTypeNum_binary("a < ''");
+    await _check_constEvalTypeNum_binary("a >= ''");
+    await _check_constEvalTypeNum_binary("a <= ''");
+    await _check_constEvalTypeNum_binary("a % ''");
   }
 
   test_constFormalParameter_fieldFormalParameter() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   var x;
   A(const this.x) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                CompileTimeErrorCode.CONST_FORMAL_PARAMETER,
-                ParserErrorCode.EXTRANEOUS_MODIFIER
-              ]
-            : [CompileTimeErrorCode.CONST_FORMAL_PARAMETER]);
-    verify([source]);
+}
+''', [
+      CompileTimeErrorCode.CONST_FORMAL_PARAMETER,
+      ParserErrorCode.EXTRANEOUS_MODIFIER
+    ]);
   }
 
   test_constFormalParameter_simpleFormalParameter() async {
-    Source source = addSource("f(const x) {}");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                CompileTimeErrorCode.CONST_FORMAL_PARAMETER,
-                ParserErrorCode.EXTRANEOUS_MODIFIER
-              ]
-            : [CompileTimeErrorCode.CONST_FORMAL_PARAMETER]);
-    verify([source]);
+    await assertErrorsInCode('''
+f(const x) {}
+''', [
+      CompileTimeErrorCode.CONST_FORMAL_PARAMETER,
+      ParserErrorCode.EXTRANEOUS_MODIFIER
+    ]);
   }
 
   test_constInitializedWithNonConstValue() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f(p) {
   const C = p;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE]);
   }
 
   test_constInitializedWithNonConstValue_finalField() async {
     // Regression test for bug #25526 which previously
     // caused two errors to be reported.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class Foo {
   final field = 0;
   foo([int x = field]) {}
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
-    verify([source]);
+''', [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
   }
 
   test_constInitializedWithNonConstValue_missingConstInListLiteral() async {
-    Source source = addSource("const List L = [0];");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
+    await assertNoErrorsInCode('''
+const List L = [0];
+''');
   }
 
   test_constInitializedWithNonConstValue_missingConstInMapLiteral() async {
-    Source source = addSource("const Map M = {'a' : 0};");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
+    await assertNoErrorsInCode('''
+const Map M = {'a' : 0};
+''');
   }
 
   test_constInitializedWithNonConstValueFromDeferredClass() async {
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-const V = 1;''',
+const V = 1;
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
-const B = a.V;'''
+const B = a.V;
+'''
     ], <ErrorCode>[
       CompileTimeErrorCode
           .CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY
@@ -1213,11 +742,13 @@
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-const V = 1;''',
+const V = 1;
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
-const B = a.V + 1;'''
+const B = a.V + 1;
+'''
     ], <ErrorCode>[
       CompileTimeErrorCode
           .CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE_FROM_DEFERRED_LIBRARY
@@ -1225,143 +756,57 @@
   }
 
   test_constInstanceField() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class C {
   const int f = 0;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.CONST_INSTANCE_FIELD]);
-    verify([source]);
-  }
-
-  test_constMapKeyTypeImplementsEquals_direct() async {
-    Source source = addSource(r'''
-class A {
-  const A();
-  operator ==(other) => false;
 }
-main() {
-  const {const A() : 0};
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS]);
-    verify([source]);
-  }
-
-  test_constMapKeyTypeImplementsEquals_dynamic() async {
-    // Note: static type of B.a is "dynamic", but actual type of the const
-    // object is A.  We need to make sure we examine the actual type when
-    // deciding whether there is a problem with operator==.
-    Source source = addSource(r'''
-class A {
-  const A();
-  operator ==(other) => false;
-}
-class B {
-  static const a = const A();
-}
-main() {
-  const {B.a : 0};
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS]);
-    verify([source]);
-  }
-
-  test_constMapKeyTypeImplementsEquals_factory() async {
-    Source source = addSource(r'''
-class A { const factory A() = B; }
-
-class B implements A {
-  const B();
-
-  operator ==(o) => true;
-}
-
-main() {
-  var m = const { const A(): 42 };
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS]);
-    verify([source]);
-  }
-
-  test_constMapKeyTypeImplementsEquals_super() async {
-    Source source = addSource(r'''
-class A {
-  const A();
-  operator ==(other) => false;
-}
-class B extends A {
-  const B();
-}
-main() {
-  const {const B() : 0};
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS]);
-    verify([source]);
+''', [CompileTimeErrorCode.CONST_INSTANCE_FIELD]);
   }
 
   test_constWithInvalidTypeParameters() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A();
 }
-f() { return const A<A>(); }''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONST_WITH_INVALID_TYPE_PARAMETERS]);
-    verify([source]);
+f() { return const A<A>(); }
+''', [CompileTimeErrorCode.CONST_WITH_INVALID_TYPE_PARAMETERS]);
   }
 
   test_constWithInvalidTypeParameters_tooFew() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class C<K, V> {
   const C();
 }
 f(p) {
   return const C<A>();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONST_WITH_INVALID_TYPE_PARAMETERS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONST_WITH_INVALID_TYPE_PARAMETERS]);
   }
 
   test_constWithInvalidTypeParameters_tooMany() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class C<E> {
   const C();
 }
 f(p) {
   return const C<A, A>();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONST_WITH_INVALID_TYPE_PARAMETERS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONST_WITH_INVALID_TYPE_PARAMETERS]);
   }
 
   test_constWithNonConst() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class T {
   T(a, b, {c, d}) {}
 }
-f() { return const T(0, 1, c: 2, d: 3); }''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.CONST_WITH_NON_CONST]);
-    verify([source]);
+f() { return const T(0, 1, c: 2, d: 3); }
+''', [CompileTimeErrorCode.CONST_WITH_NON_CONST]);
   }
 
   test_constWithNonConst_in_const_context() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A(x);
 }
@@ -1370,58 +815,49 @@
 main() {
   const A(B());
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.CONST_WITH_NON_CONST]);
-    verify([source]);
+''', [CompileTimeErrorCode.CONST_WITH_NON_CONST]);
   }
 
   test_constWithNonConstantArgument_annotation() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A(int p);
 }
 var v = 42;
 @A(v)
 main() {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONST_WITH_NON_CONSTANT_ARGUMENT]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONST_WITH_NON_CONSTANT_ARGUMENT]);
   }
 
   test_constWithNonConstantArgument_instanceCreation() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A(a);
 }
-f(p) { return const A(p); }''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+f(p) { return const A(p); }
+''', [
       CompileTimeErrorCode.CONST_WITH_NON_CONSTANT_ARGUMENT,
     ]);
-    verify([source]);
   }
 
   test_constWithNonType() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 int A;
 f() {
   return const A();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.CONST_WITH_NON_TYPE]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONST_WITH_NON_TYPE]);
   }
 
   test_constWithNonType_fromLibrary() async {
-    Source source1 = addNamedSource("/lib.dart", "");
+    Source source1 = addNamedSource("/lib.dart", '');
     Source source2 = addNamedSource("/lib2.dart", r'''
 import 'lib.dart' as lib;
 void f() {
   const lib.A();
-}''');
+}
+''');
     await computeAnalysisResult(source1);
     await computeAnalysisResult(source2);
     assertErrors(source2, [CompileTimeErrorCode.CONST_WITH_NON_TYPE]);
@@ -1429,165 +865,122 @@
   }
 
   test_constWithTypeParameters_direct() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A<T> {
   static const V = const A<T>();
   const A();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS,
       StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC
     ]);
-    verify([source]);
   }
 
   test_constWithTypeParameters_indirect() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A<T> {
   static const V = const A<List<T>>();
   const A();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.CONST_WITH_TYPE_PARAMETERS,
       StaticWarningCode.TYPE_PARAMETER_REFERENCED_BY_STATIC
     ]);
-    verify([source]);
   }
 
   test_constWithUndefinedConstructor() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A();
 }
 f() {
   return const A.noSuchConstructor();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR]);
-    // no verify(), 'noSuchConstructor' is not resolved
+}
+''', [CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR], verify: false);
   }
 
   test_constWithUndefinedConstructorDefault() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A.name();
 }
 f() {
   return const A();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONST_WITH_UNDEFINED_CONSTRUCTOR_DEFAULT]);
   }
 
   test_defaultValueInFunctionTypeAlias_new_named() async {
-    Source source = addSource('''
+    await assertErrorsInCode('''
 typedef F = int Function({Map<String, String> m: const {}});
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+''', [
       ParserErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE,
-      StrongModeCode.INVALID_CAST_LITERAL_MAP
     ]);
-    verify([source]);
   }
 
   test_defaultValueInFunctionTypeAlias_new_positional() async {
-    Source source = addSource('''
+    await assertErrorsInCode('''
 typedef F = int Function([Map<String, String> m = const {}]);
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+''', [
       ParserErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE,
-      StrongModeCode.INVALID_CAST_LITERAL_MAP
     ]);
-    verify([source]);
   }
 
   test_defaultValueInFunctionTypeAlias_old_named() async {
-    Source source = addSource("typedef F([x = 0]);");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS,
-                ParserErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE
-              ]
-            : [CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS]);
-    verify([source]);
+    await assertErrorsInCode('''
+typedef F([x = 0]);
+''', [
+      CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS,
+      ParserErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE
+    ]);
   }
 
   test_defaultValueInFunctionTypeAlias_old_positional() async {
-    Source source = addSource("typedef F([x = 0]);");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS,
-                ParserErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE
-              ]
-            : [CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS]);
-    verify([source]);
+    await assertErrorsInCode('''
+typedef F([x = 0]);
+''', [
+      CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE_ALIAS,
+      ParserErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE
+    ]);
   }
 
   test_defaultValueInFunctionTypedParameter_named() async {
-    Source source = addSource("f(g({p: null})) {}");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER,
-                ParserErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE
-              ]
-            : [CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER]);
-    verify([source]);
+    await assertErrorsInCode('''
+f(g({p: null})) {}
+''', [
+      CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER,
+      ParserErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE
+    ]);
   }
 
   test_defaultValueInFunctionTypedParameter_optional() async {
-    Source source = addSource("f(g([p = null])) {}");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER,
-                ParserErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE
-              ]
-            : [CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER]);
-    verify([source]);
+    await assertErrorsInCode('''
+f(g([p = null])) {}
+''', [
+      CompileTimeErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPED_PARAMETER,
+      ParserErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE
+    ]);
   }
 
   test_defaultValueInRedirectingFactoryConstructor() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   factory A([int x = 0]) = B;
 }
 
 class B implements A {
   B([int x = 1]) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CompileTimeErrorCode.DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR
-    ]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.DEFAULT_VALUE_IN_REDIRECTING_FACTORY_CONSTRUCTOR]);
   }
 
   test_deferredImportWithInvalidUri() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 import '[invalid uri]' deferred as p;
 main() {
   p.loadLibrary();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
+}
+''', [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
   }
 
   test_duplicateDefinition_acrossLibraries() async {
@@ -1595,15 +988,18 @@
 library lib;
 
 part 'a.dart';
-part 'b.dart';''');
+part 'b.dart';
+''');
     Source sourceA = addNamedSource("/a.dart", r'''
 part of lib;
 
-class A {}''');
+class A {}
+''');
     Source sourceB = addNamedSource("/b.dart", r'''
 part of lib;
 
-class A {}''');
+class A {}
+''');
     await computeAnalysisResult(librarySource);
     await computeAnalysisResult(sourceA);
     await computeAnalysisResult(sourceB);
@@ -1613,23 +1009,22 @@
   }
 
   test_duplicateDefinition_catch() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 main() {
   try {} catch (e, e) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
-    verify([source]);
+}''', [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_duplicateDefinition_inPart() async {
     Source librarySource = addNamedSource("/lib.dart", r'''
 library test;
 part 'a.dart';
-class A {}''');
+class A {}
+''');
     Source sourceA = addNamedSource("/a.dart", r'''
 part of test;
-class A {}''');
+class A {}
+''');
     await computeAnalysisResult(librarySource);
     await computeAnalysisResult(sourceA);
     assertNoErrors(librarySource);
@@ -1638,177 +1033,147 @@
   }
 
   test_duplicateDefinition_locals_inCase() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 main() {
   switch(1) {
     case 1:
       var a;
       var a;
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_duplicateDefinition_locals_inFunctionBlock() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 main() {
   int m = 0;
   m(a) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_duplicateDefinition_locals_inIf() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 main(int p) {
   if (p != 0) {
     var a;
     var a;
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_duplicateDefinition_locals_inMethodBlock() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   m() {
     int a;
     int a;
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_duplicateDefinition_parameters_inConstructor() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int a;
   A(int a, this.a);
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_duplicateDefinition_parameters_inFunctionTypeAlias() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 typedef F(int a, double a);
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
-    verify([source]);
+''', [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_duplicateDefinition_parameters_inLocalFunction() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 main() {
   f(int a, double a) {
   };
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_duplicateDefinition_parameters_inMethod() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   m(int a, double a) {
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_duplicateDefinition_parameters_inTopLevelFunction() async {
-    Source source = addSource(r'''
-f(int a, double a) {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
-    verify([source]);
+    await assertErrorsInCode(r'''
+f(int a, double a) {}
+''', [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_duplicateDefinition_typeParameters() async {
-    Source source = addSource(r'''
-class A<T, T> {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
-    verify([source]);
+    await assertErrorsInCode(r'''
+class A<T, T> {}
+''', [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_duplicateNamedArgument() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f({a, b}) {}
 main() {
   f(a: 1, a: 2);
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.DUPLICATE_NAMED_ARGUMENT]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.DUPLICATE_NAMED_ARGUMENT]);
   }
 
   test_duplicatePart_sameSource() async {
-    addNamedSource('/part.dart', 'part of lib;');
-    Source source = addSource(r'''
+    newFile('/part.dart', content: 'part of lib;');
+    await assertErrorsInCode(r'''
 library lib;
 part 'part.dart';
 part 'foo/../part.dart';
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.DUPLICATE_PART]);
-    verify([source]);
+''', [CompileTimeErrorCode.DUPLICATE_PART]);
   }
 
   test_duplicatePart_sameUri() async {
-    addNamedSource('/part.dart', 'part of lib;');
-    Source source = addSource(r'''
+    newFile('/part.dart', content: 'part of lib;');
+    await assertErrorsInCode(r'''
 library lib;
 part 'part.dart';
 part 'part.dart';
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.DUPLICATE_PART]);
-    verify([source]);
+''', [CompileTimeErrorCode.DUPLICATE_PART]);
   }
 
   test_exportInternalLibrary() async {
-    Source source = addSource("export 'dart:_interceptors';");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.EXPORT_INTERNAL_LIBRARY]);
-    verify([source]);
+    await assertErrorsInCode('''
+export 'dart:_interceptors';
+''', [CompileTimeErrorCode.EXPORT_INTERNAL_LIBRARY]);
   }
 
   test_exportOfNonLibrary() async {
-    Source source = addSource(r'''
+    newFile("/lib1.dart", content: '''
+part of lib;
+''');
+    await assertErrorsInCode(r'''
 library L;
-export 'lib1.dart';''');
-    addNamedSource("/lib1.dart", "part of lib;");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.EXPORT_OF_NON_LIBRARY]);
-    verify([source]);
+export 'lib1.dart';
+''', [CompileTimeErrorCode.EXPORT_OF_NON_LIBRARY]);
   }
 
   test_extendsDeferredClass() async {
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-class A {}''',
+class A {}
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
-class B extends a.A {}'''
+class B extends a.A {}
+'''
     ], <ErrorCode>[
       CompileTimeErrorCode.EXTENDS_DEFERRED_CLASS
     ]);
@@ -1818,344 +1183,282 @@
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-class A {}''',
+class A {}
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
 class M {}
-class C = a.A with M;'''
+class C = a.A with M;
+'''
     ], <ErrorCode>[
       CompileTimeErrorCode.EXTENDS_DEFERRED_CLASS
     ]);
   }
 
   test_extendsDisallowedClass_class_bool() async {
-    Source source = addSource("class A extends bool {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+    await assertErrorsInCode('''
+class A extends bool {}
+''', [
       CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
       CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT
     ]);
-    verify([source]);
   }
 
   test_extendsDisallowedClass_class_double() async {
-    Source source = addSource("class A extends double {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A extends double {}
+''', [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
   }
 
   test_extendsDisallowedClass_class_int() async {
-    Source source = addSource("class A extends int {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+    await assertErrorsInCode('''
+class A extends int {}
+''', [
       CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
       CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT
     ]);
-    verify([source]);
   }
 
   test_extendsDisallowedClass_class_Null() async {
-    Source source = addSource("class A extends Null {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+    await assertErrorsInCode('''
+class A extends Null {}
+''', [
       CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
       CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT
     ]);
-    verify([source]);
   }
 
   test_extendsDisallowedClass_class_num() async {
-    Source source = addSource("class A extends num {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A extends num {}
+''', [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
   }
 
   test_extendsDisallowedClass_class_String() async {
-    Source source = addSource("class A extends String {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+    await assertErrorsInCode('''
+class A extends String {}
+''', [
       CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS,
       CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT
     ]);
-    verify([source]);
   }
 
   test_extendsDisallowedClass_classTypeAlias_bool() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class M {}
-class C = bool with M;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
-    verify([source]);
+class C = bool with M;
+''', [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
   }
 
   test_extendsDisallowedClass_classTypeAlias_double() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class M {}
-class C = double with M;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
-    verify([source]);
+class C = double with M;
+''', [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
   }
 
   test_extendsDisallowedClass_classTypeAlias_int() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class M {}
-class C = int with M;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
-    verify([source]);
+class C = int with M;
+''', [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
   }
 
   test_extendsDisallowedClass_classTypeAlias_Null() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class M {}
-class C = Null with M;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
-    verify([source]);
+class C = Null with M;
+''', [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
   }
 
   test_extendsDisallowedClass_classTypeAlias_num() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class M {}
-class C = num with M;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
-    verify([source]);
+class C = num with M;
+''', [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
   }
 
   test_extendsDisallowedClass_classTypeAlias_String() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class M {}
-class C = String with M;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
-    verify([source]);
+class C = String with M;
+''', [CompileTimeErrorCode.EXTENDS_DISALLOWED_CLASS]);
   }
 
   test_extraPositionalArguments_const() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A();
 }
 main() {
   const A(0);
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS]);
   }
 
   test_extraPositionalArguments_const_super() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A();
 }
 class B extends A {
   const B() : super(0);
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS]);
   }
 
   test_extraPositionalArgumentsCouldBeNamed_const() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A({int x});
 }
 main() {
   const A(0);
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED]);
   }
 
   test_extraPositionalArgumentsCouldBeNamed_const_super() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A({int x});
 }
 class B extends A {
   const B() : super(0);
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED]);
   }
 
   test_fieldFormalParameter_assignedInInitializer() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int x;
   A(this.x) : x = 3 {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER]);
   }
 
   test_fieldInitializedByMultipleInitializers() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int x;
   A() : x = 0, x = 1 {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS]);
   }
 
   test_fieldInitializedByMultipleInitializers_multipleInits() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int x;
   A() : x = 0, x = 1, x = 2 {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS,
       CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS
     ]);
-    verify([source]);
   }
 
   test_fieldInitializedByMultipleInitializers_multipleNames() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int x;
   int y;
   A() : x = 0, x = 1, y = 0, y = 1 {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS,
       CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS
     ]);
-    verify([source]);
   }
 
   test_fieldInitializedInParameterAndInitializer() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int x;
   A(this.x) : x = 1 {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER]);
   }
 
   test_fieldInitializerFactoryConstructor() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int x;
   factory A(this.x) => null;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.FIELD_INITIALIZER_FACTORY_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.FIELD_INITIALIZER_FACTORY_CONSTRUCTOR]);
   }
 
   test_fieldInitializerOutsideConstructor() async {
     // TODO(brianwilkerson) Fix the duplicate error messages.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int x;
   m(this.x) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       ParserErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR,
       CompileTimeErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR
     ]);
-    verify([source]);
   }
 
   test_fieldInitializerOutsideConstructor_defaultParameter() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int x;
   m([this.x]) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR]);
   }
 
   test_fieldInitializerOutsideConstructor_inFunctionTypeParameter() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int x;
   A(int p(this.x));
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR]);
   }
 
   test_fieldInitializerRedirectingConstructor_afterRedirection() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int x;
   A.named() {}
   A() : this.named(), x = 42;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR]);
   }
 
   test_fieldInitializerRedirectingConstructor_beforeRedirection() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int x;
   A.named() {}
   A() : x = 42, this.named();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR]);
   }
 
   test_fieldInitializingFormalRedirectingConstructor() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int x;
   A.named() {}
   A(this.x) : this.named();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.FIELD_INITIALIZER_REDIRECTING_CONSTRUCTOR]);
   }
 
   test_finalInitializedMultipleTimes_initializers() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   final x;
   A() : x = 0, x = 0 {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.FIELD_INITIALIZED_BY_MULTIPLE_INITIALIZERS]);
   }
 
   /**
@@ -2167,189 +1470,144 @@
    * FINAL_INITIALIZED_MULTIPLE_TIMES, since it more specific, we use it instead of the broader code
    */
   test_finalInitializedMultipleTimes_initializingFormal_initializer() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   final x;
   A(this.x) : x = 0 {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.FIELD_INITIALIZED_IN_PARAMETER_AND_INITIALIZER]);
   }
 
   test_finalInitializedMultipleTimes_initializingFormals() async {
-    Source source = addSource(r'''
+    // TODO(brianwilkerson) There should only be one error here.
+    await assertErrorsInCode(r'''
 class A {
   final x;
   A(this.x, this.x) {}
-}''');
-    // TODO(brianwilkerson) There should only be one error here.
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.DUPLICATE_DEFINITION,
       CompileTimeErrorCode.FINAL_INITIALIZED_MULTIPLE_TIMES
     ]);
-    verify([source]);
   }
 
   test_finalNotInitialized_instanceField_const_static() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   static const F;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.CONST_NOT_INITIALIZED]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONST_NOT_INITIALIZED]);
   }
 
   test_finalNotInitialized_library_const() async {
-    Source source = addSource("const F;");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.CONST_NOT_INITIALIZED]);
-    verify([source]);
+    await assertErrorsInCode('''
+const F;
+''', [CompileTimeErrorCode.CONST_NOT_INITIALIZED]);
   }
 
   test_finalNotInitialized_local_const() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f() {
   const int x;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.CONST_NOT_INITIALIZED]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.CONST_NOT_INITIALIZED]);
   }
 
   test_forInWithConstVariable_forEach_identifier() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f() {
   const x = 0;
   for (x in [0, 1, 2]) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.FOR_IN_WITH_CONST_VARIABLE]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.FOR_IN_WITH_CONST_VARIABLE]);
   }
 
   test_forInWithConstVariable_forEach_loopVariable() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f() {
   for (const x in [0, 1, 2]) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.FOR_IN_WITH_CONST_VARIABLE]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.FOR_IN_WITH_CONST_VARIABLE]);
   }
 
   test_fromEnvironment_bool_badArgs() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 var b1 = const bool.fromEnvironment(1);
-var b2 = const bool.fromEnvironment('x', defaultValue: 1);''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+var b2 = const bool.fromEnvironment('x', defaultValue: 1);
+''', [
       CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
       StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE,
       CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
       StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
     ]);
-    verify([source]);
   }
 
   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).
-    if (enableNewAnalysisDriver) {
-      driver.declaredVariables = new DeclaredVariables.fromMap({'x': 'true'});
-    } else {
-      (analysisContext2 as AnalysisContextImpl).declaredVariables =
-          new DeclaredVariables.fromMap({'x': 'true'});
-    }
-    Source source =
-        addSource("var b = const bool.fromEnvironment('x', defaultValue: 1);");
+    driver.declaredVariables = new DeclaredVariables.fromMap({'x': 'true'});
+    Source source = addSource('''
+var b = const bool.fromEnvironment('x', defaultValue: 1);
+''');
     await computeAnalysisResult(source);
     assertErrors(source, [
       CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
       StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
     ]);
-    verify([source]);
   }
 
   test_genericFunctionTypeArgument_inference_function() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 T f<T>(T t) => null;
-main() { f(<S>(S s) => s); }''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StrongModeCode.COULD_NOT_INFER]);
-    verify([source]);
+main() { f(<S>(S s) => s); }
+''', [StrongModeCode.COULD_NOT_INFER]);
   }
 
   test_genericFunctionTypeArgument_inference_functionType() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 T Function<T>(T) f;
-main() { f(<S>(S s) => s); }''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StrongModeCode.COULD_NOT_INFER]);
-    verify([source]);
+main() { f(<S>(S s) => s); }
+''', [StrongModeCode.COULD_NOT_INFER]);
   }
 
   test_genericFunctionTypeArgument_inference_method() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class C {
   T f<T>(T t) => null;
 }
-main() { new C().f(<S>(S s) => s); }''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StrongModeCode.COULD_NOT_INFER]);
-    verify([source]);
+main() { new C().f(<S>(S s) => s); }
+''', [StrongModeCode.COULD_NOT_INFER]);
   }
 
   test_genericFunctionTypeAsBound_class() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class C<T extends S Function<S>(S)> {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND]);
   }
 
   test_genericFunctionTypeAsBound_genericFunction() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 T Function<T extends S Function<S>(S)>(T) fun;
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND]);
-    verify([source]);
+''', [CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND]);
   }
 
   test_genericFunctionTypeAsBound_genericFunctionTypedef() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 typedef foo = T Function<T extends S Function<S>(S)>(T t);
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND]);
-    verify([source]);
+''', [CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND]);
   }
 
   test_genericFunctionTypeAsBound_parameterOfFunction() async {
-    Source source = addSource(r'''
-class C<T extends void Function(S Function<S>(S))> {
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
+    await assertNoErrorsInCode(r'''
+class C<T extends void Function(S Function<S>(S))> {}
+''');
   }
 
   test_genericFunctionTypeAsBound_typedef() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 typedef T foo<T extends S Function<S>(S)>(T t);
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND]);
-    verify([source]);
+''', [CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_BOUND]);
   }
 
   test_genericFunctionTypedParameter() async {
@@ -2357,32 +1615,27 @@
     // error.
     // TODO(paulberry): When dartbug.com/28515 is fixed, convert this into a
     // NonErrorResolverTest.
-    Source source = addSource('void g(T f<T>(T x)) {}');
-    await computeAnalysisResult(source);
-    var expectedErrorCodes = <ErrorCode>[
-      CompileTimeErrorCode.GENERIC_FUNCTION_TYPED_PARAM_UNSUPPORTED
-    ];
-    if (enableNewAnalysisDriver) {
+    await assertErrorsInCode('''
+void g(T f<T>(T x)) {}
+''', [
+      CompileTimeErrorCode.GENERIC_FUNCTION_TYPED_PARAM_UNSUPPORTED,
       // Due to dartbug.com/28515, some additional errors appear when using the
       // new analysis driver.
-      expectedErrorCodes.addAll([
-        StaticWarningCode.UNDEFINED_CLASS,
-        StaticWarningCode.UNDEFINED_CLASS
-      ]);
-    }
-    assertErrors(source, expectedErrorCodes);
-    verify([source]);
+      StaticWarningCode.UNDEFINED_CLASS, StaticWarningCode.UNDEFINED_CLASS
+    ]);
   }
 
   test_implementsDeferredClass() async {
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-class A {}''',
+class A {}
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
-class B implements a.A {}'''
+class B implements a.A {}
+'''
     ], <ErrorCode>[
       CompileTimeErrorCode.IMPLEMENTS_DEFERRED_CLASS
     ]);
@@ -2392,337 +1645,269 @@
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-class A {}''',
+class A {}
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
 class B {}
 class M {}
-class C = B with M implements a.A;'''
+class C = B with M implements a.A;
+'''
     ], <ErrorCode>[
       CompileTimeErrorCode.IMPLEMENTS_DEFERRED_CLASS
     ]);
   }
 
   test_implementsDisallowedClass_class_bool() async {
-    Source source = addSource("class A implements bool {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A implements bool {}
+''', [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
   }
 
   test_implementsDisallowedClass_class_double() async {
-    Source source = addSource("class A implements double {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A implements double {}
+''', [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
   }
 
   test_implementsDisallowedClass_class_int() async {
-    Source source = addSource("class A implements int {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A implements int {}
+''', [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
   }
 
   test_implementsDisallowedClass_class_Null() async {
-    Source source = addSource("class A implements Null {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A implements Null {}
+''', [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
   }
 
   test_implementsDisallowedClass_class_num() async {
-    Source source = addSource("class A implements num {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A implements num {}
+''', [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
   }
 
   test_implementsDisallowedClass_class_String() async {
-    Source source = addSource("class A implements String {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A implements String {}
+''', [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
   }
 
   test_implementsDisallowedClass_class_String_num() async {
-    Source source = addSource("class A implements String, num {}");
-    await computeAnalysisResult(source);
-    if (enableNewAnalysisDriver) {
-      assertErrors(source, [
-        CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS,
-        CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS
-      ]);
-    } else {
-      assertErrors(source, [
-        CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS,
-        CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS
-      ]);
-    }
-    verify([source]);
+    await assertErrorsInCode('''
+class A implements String, num {}
+''', [
+      CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS,
+      CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS
+    ]);
   }
 
   test_implementsDisallowedClass_classTypeAlias_bool() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class M {}
-class C = A with M implements bool;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
-    verify([source]);
+class C = A with M implements bool;
+''', [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
   }
 
   test_implementsDisallowedClass_classTypeAlias_double() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class M {}
-class C = A with M implements double;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
-    verify([source]);
+class C = A with M implements double;
+''', [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
   }
 
   test_implementsDisallowedClass_classTypeAlias_int() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class M {}
-class C = A with M implements int;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
-    verify([source]);
+class C = A with M implements int;
+''', [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
   }
 
   test_implementsDisallowedClass_classTypeAlias_Null() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class M {}
-class C = A with M implements Null;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
-    verify([source]);
+class C = A with M implements Null;
+''', [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
   }
 
   test_implementsDisallowedClass_classTypeAlias_num() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class M {}
-class C = A with M implements num;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
-    verify([source]);
+class C = A with M implements num;
+''', [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
   }
 
   test_implementsDisallowedClass_classTypeAlias_String() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class M {}
-class C = A with M implements String;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
-    verify([source]);
+class C = A with M implements String;
+''', [CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS]);
   }
 
   test_implementsDisallowedClass_classTypeAlias_String_num() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class M {}
-class C = A with M implements String, num;''');
-    await computeAnalysisResult(source);
-    if (enableNewAnalysisDriver) {
-      assertErrors(source, [
-        CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS,
-        CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS
-      ]);
-    } else {
-      assertErrors(source, [
-        CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS,
-        CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS
-      ]);
-    }
-    verify([source]);
+class C = A with M implements String, num;
+''', [
+      CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS,
+      CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS
+    ]);
   }
 
   test_implementsNonClass_class() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 int A;
-class B implements A {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_NON_CLASS]);
-    verify([source]);
+class B implements A {}
+''', [CompileTimeErrorCode.IMPLEMENTS_NON_CLASS]);
   }
 
   test_implementsNonClass_dynamic() async {
-    Source source = addSource("class A implements dynamic {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_NON_CLASS]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A implements dynamic {}
+''', [CompileTimeErrorCode.IMPLEMENTS_NON_CLASS]);
   }
 
   test_implementsNonClass_enum() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 enum E { ONE }
-class A implements E {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_NON_CLASS]);
-    verify([source]);
+class A implements E {}
+''', [CompileTimeErrorCode.IMPLEMENTS_NON_CLASS]);
   }
 
   test_implementsNonClass_typeAlias() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class M {}
 int B;
-class C = A with M implements B;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_NON_CLASS]);
-    verify([source]);
+class C = A with M implements B;
+''', [CompileTimeErrorCode.IMPLEMENTS_NON_CLASS]);
   }
 
   test_implementsSuperClass() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
-class B extends A implements A {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_SUPER_CLASS]);
-    verify([source]);
+class B extends A implements A {}
+''', [CompileTimeErrorCode.IMPLEMENTS_SUPER_CLASS]);
   }
 
   test_implementsSuperClass_Object() async {
-    Source source = addSource("class A implements Object {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_SUPER_CLASS]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A implements Object {}
+''', [CompileTimeErrorCode.IMPLEMENTS_SUPER_CLASS]);
   }
 
   test_implementsSuperClass_Object_typeAlias() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class M {}
 class A = Object with M implements Object;
-    ''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_SUPER_CLASS]);
-    verify([source]);
+''', [CompileTimeErrorCode.IMPLEMENTS_SUPER_CLASS]);
   }
 
   test_implementsSuperClass_typeAlias() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class M {}
-class B = A with M implements A;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPLEMENTS_SUPER_CLASS]);
-    verify([source]);
+class B = A with M implements A;
+''', [CompileTimeErrorCode.IMPLEMENTS_SUPER_CLASS]);
   }
 
   test_implicitThisReferenceInInitializer_field() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   var v;
   A() : v = f;
   var f;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
   }
 
   test_implicitThisReferenceInInitializer_field2() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   final x = 0;
   final y = x;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER,
       StrongModeCode.TOP_LEVEL_INSTANCE_GETTER
     ]);
-    verify([source]);
   }
 
   test_implicitThisReferenceInInitializer_invocation() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   var v;
   A() : v = f();
   f() {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
   }
 
   test_implicitThisReferenceInInitializer_invocationInStatic() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   static var F = m();
   int m() => 0;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
   }
 
   test_implicitThisReferenceInInitializer_redirectingConstructorInvocation() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A(p) {}
   A.named() : this(f);
   var f;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
   }
 
   test_implicitThisReferenceInInitializer_superConstructorInvocation() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A(p) {}
 }
 class B extends A {
   B() : super(f);
   var f;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
   }
 
   test_importInternalLibrary() async {
-    Source source = addSource("import 'dart:_interceptors';");
     // 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]);
+    await assertErrorsInCode('''
+import 'dart:_interceptors';
+''', [CompileTimeErrorCode.IMPORT_INTERNAL_LIBRARY, HintCode.UNUSED_IMPORT]);
   }
 
   test_importOfNonLibrary() async {
-    Source source = addSource(r'''
+    newFile("/part.dart", content: r'''
+part of lib;
+class A{}
+''');
+    await assertErrorsInCode(r'''
 library lib;
 import 'part.dart';
-A a;''');
-    addNamedSource("/part.dart", r'''
-part of lib;
-class A{}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.IMPORT_OF_NON_LIBRARY]);
-    verify([source]);
+A a;
+''', [CompileTimeErrorCode.IMPORT_OF_NON_LIBRARY]);
   }
 
   test_inconsistentCaseExpressionTypes() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f(var p) {
   switch (p) {
     case 1:
@@ -2730,17 +1915,14 @@
     case 'a':
       break;
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INCONSISTENT_CASE_EXPRESSION_TYPES]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INCONSISTENT_CASE_EXPRESSION_TYPES]);
   }
 
   test_inconsistentCaseExpressionTypes_dynamic() async {
     // Even though A.S and S have a static type of "dynamic", we should see
     // that they fail to match 3, because they are constant strings.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   static const S = 'A.S';
 }
@@ -2756,17 +1938,15 @@
     case A.S:
       break;
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.INCONSISTENT_CASE_EXPRESSION_TYPES,
       CompileTimeErrorCode.INCONSISTENT_CASE_EXPRESSION_TYPES
     ]);
-    verify([source]);
   }
 
   test_inconsistentCaseExpressionTypes_repeated() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f(var p) {
   switch (p) {
     case 1:
@@ -2776,111 +1956,88 @@
     case 'b':
       break;
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.INCONSISTENT_CASE_EXPRESSION_TYPES,
       CompileTimeErrorCode.INCONSISTENT_CASE_EXPRESSION_TYPES
     ]);
-    verify([source]);
   }
 
   test_initializerForNonExistent_const() async {
     // Check that the absence of a matching field doesn't cause a
     // crash during constant evaluation.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A() : x = 'foo';
 }
-A a = const A();''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INITIALIZER_FOR_NON_EXISTENT_FIELD]);
+A a = const A();
+''', [CompileTimeErrorCode.INITIALIZER_FOR_NON_EXISTENT_FIELD], verify: false);
   }
 
   test_initializerForNonExistent_initializer() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A() : x = 0 {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INITIALIZER_FOR_NON_EXISTENT_FIELD]);
+}
+''', [CompileTimeErrorCode.INITIALIZER_FOR_NON_EXISTENT_FIELD], verify: false);
   }
 
   test_initializerForStaticField() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   static int x;
   A() : x = 0 {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INITIALIZER_FOR_STATIC_FIELD]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INITIALIZER_FOR_STATIC_FIELD]);
   }
 
   test_initializingFormalForNonExistentField() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A(this.x) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD]);
   }
 
   test_initializingFormalForNonExistentField_notInEnclosingClass() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
 int x;
 }
 class B extends A {
   B(this.x) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD]);
   }
 
   test_initializingFormalForNonExistentField_optional() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A([this.x]) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD]);
   }
 
   test_initializingFormalForNonExistentField_synthetic() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int get x => 1;
   A(this.x) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_NON_EXISTENT_FIELD]);
   }
 
   test_initializingFormalForStaticField() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   static int x;
   A([this.x]) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_STATIC_FIELD]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_STATIC_FIELD]);
   }
 
   test_instanceMemberAccessFromFactory_named() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   m() {}
   A();
@@ -2888,15 +2045,12 @@
     m();
     return new A();
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_FACTORY]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_FACTORY]);
   }
 
   test_instanceMemberAccessFromFactory_unnamed() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   m() {}
   A._();
@@ -2904,53 +2058,41 @@
     m();
     return new A._();
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_FACTORY]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_FACTORY]);
   }
 
   test_instanceMemberAccessFromStatic_field() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int f;
   static foo() {
     f;
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC]);
   }
 
   test_instanceMemberAccessFromStatic_getter() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   get g => null;
   static foo() {
     g;
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC]);
   }
 
   test_instanceMemberAccessFromStatic_method() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   m() {}
   static foo() {
     m();
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INSTANCE_MEMBER_ACCESS_FROM_STATIC]);
   }
 
   test_instantiate_to_bounds_not_matching_bounds() async {
@@ -2971,25 +2113,21 @@
   }
 
   test_instantiateEnum_const() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 enum E { ONE }
 E e(String name) {
   return const E();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INSTANTIATE_ENUM]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INSTANTIATE_ENUM]);
   }
 
   test_instantiateEnum_new() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 enum E { ONE }
 E e(String name) {
   return new E();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INSTANTIATE_ENUM]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INSTANTIATE_ENUM]);
   }
 
   test_integerLiteralAsDoubleOutOfRange_excessiveExponent() async {
@@ -3015,7 +2153,9 @@
   }
 
   test_integerLiteralAsDoubleOutOfRange_excessiveMantissa() async {
-    Source source = addSource('double x = 9223372036854775809;');
+    Source source = addSource('''
+double x = 9223372036854775809;
+''');
     await computeAnalysisResult(source);
     assertErrors(
         source, [CompileTimeErrorCode.INTEGER_LITERAL_IMPRECISE_AS_DOUBLE]);
@@ -3025,78 +2165,70 @@
   }
 
   test_integerLiteralOutOfRange_negative() async {
-    Source source = addSource('int x = -9223372036854775809;');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INTEGER_LITERAL_OUT_OF_RANGE]);
+    await assertErrorsInCode('''
+int x = -9223372036854775809;
+''', [CompileTimeErrorCode.INTEGER_LITERAL_OUT_OF_RANGE]);
   }
 
   test_integerLiteralOutOfRange_positive() async {
-    Source source = addSource('int x = 9223372036854775808;');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INTEGER_LITERAL_OUT_OF_RANGE]);
+    await assertErrorsInCode('''
+int x = 9223372036854775808;
+''', [CompileTimeErrorCode.INTEGER_LITERAL_OUT_OF_RANGE]);
   }
 
   test_invalidAnnotation_importWithPrefix_notConstantVariable() async {
-    addNamedSource("/lib.dart", r'''
+    newFile("/lib.dart", content: r'''
 library lib;
-final V = 0;''');
-    Source source = addSource(r'''
+final V = 0;
+''');
+    await assertErrorsInCode(r'''
 import 'lib.dart' as p;
 @p.V
 main() {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_ANNOTATION]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_ANNOTATION]);
   }
 
   test_invalidAnnotation_importWithPrefix_notVariableOrConstructorInvocation() async {
-    addNamedSource("/lib.dart", r'''
+    newFile("/lib.dart", content: r'''
 library lib;
-typedef V();''');
-    Source source = addSource(r'''
+typedef V();
+''');
+    await assertErrorsInCode(r'''
 import 'lib.dart' as p;
 @p.V
 main() {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_ANNOTATION]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_ANNOTATION]);
   }
 
   test_invalidAnnotation_notConstantVariable() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 final V = 0;
 @V
 main() {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_ANNOTATION]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_ANNOTATION]);
   }
 
   test_invalidAnnotation_notVariableOrConstructorInvocation() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 typedef V();
 @V
 main() {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_ANNOTATION]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_ANNOTATION]);
   }
 
   test_invalidAnnotation_staticMethodReference() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   static f() {}
 }
 @A.f
 main() {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_ANNOTATION]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_ANNOTATION]);
   }
 
   test_invalidAnnotationFromDeferredLibrary() async {
@@ -3105,11 +2237,13 @@
       r'''
 library lib1;
 class V { const V(); }
-const v = const V();''',
+const v = const V();
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
-@a.v main () {}'''
+@a.v main () {}
+'''
     ], <ErrorCode>[
       CompileTimeErrorCode.INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY
     ]);
@@ -3120,11 +2254,13 @@
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-class C { const C(); }''',
+class C { const C(); }
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
-@a.C() main () {}'''
+@a.C() main () {}
+'''
     ], <ErrorCode>[
       CompileTimeErrorCode.INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY
     ]);
@@ -3135,398 +2271,311 @@
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-class C { const C.name(); }''',
+class C { const C.name(); }
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
-@a.C.name() main () {}'''
+@a.C.name() main () {}
+'''
     ], <ErrorCode>[
       CompileTimeErrorCode.INVALID_ANNOTATION_FROM_DEFERRED_LIBRARY
     ]);
   }
 
   test_invalidAnnotationGetter_getter() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 get V => 0;
 @V
 main() {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_ANNOTATION_GETTER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_ANNOTATION_GETTER]);
   }
 
   test_invalidAnnotationGetter_importWithPrefix_getter() async {
-    addNamedSource("/lib.dart", r'''
+    newFile("/lib.dart", content: r'''
 library lib;
-get V => 0;''');
-    Source source = addSource(r'''
+get V => 0;
+''');
+    await assertErrorsInCode(r'''
 import 'lib.dart' as p;
 @p.V
 main() {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_ANNOTATION_GETTER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_ANNOTATION_GETTER]);
   }
 
   test_invalidConstructorName_notEnclosingClassName_defined() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   B() : super();
 }
-class B {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_CONSTRUCTOR_NAME]);
-    // no verify() call, "B" is not resolved
+class B {}
+''', [CompileTimeErrorCode.INVALID_CONSTRUCTOR_NAME]);
   }
 
   test_invalidConstructorName_notEnclosingClassName_undefined() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   B() : super();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_CONSTRUCTOR_NAME]);
-    // no verify() call, "B" is not resolved
+}
+''', [CompileTimeErrorCode.INVALID_CONSTRUCTOR_NAME]);
   }
 
   test_invalidFactoryNameNotAClass_notClassName() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 int B;
 class A {
   factory B() => null;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INVALID_FACTORY_NAME_NOT_A_CLASS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_FACTORY_NAME_NOT_A_CLASS]);
   }
 
   test_invalidFactoryNameNotAClass_notEnclosingClassName() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   factory B() => null;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INVALID_FACTORY_NAME_NOT_A_CLASS]);
-    // no verify() call, "B" is not resolved
+}
+''', [CompileTimeErrorCode.INVALID_FACTORY_NAME_NOT_A_CLASS]);
   }
 
   test_invalidIdentifierInAsync_async() async {
-    // TODO(brianwilkerson) Report this error.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   m() async {
     int async;
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_IDENTIFIER_IN_ASYNC]);
-    verify([source]);
+}
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
   }
 
   test_invalidIdentifierInAsync_await() async {
-    // TODO(brianwilkerson) Report this error.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   m() async {
     int await;
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_IDENTIFIER_IN_ASYNC]);
-    verify([source]);
+}
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
   }
 
   test_invalidIdentifierInAsync_yield() async {
-    // TODO(brianwilkerson) Report this error.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   m() async {
     int yield;
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_IDENTIFIER_IN_ASYNC]);
-    verify([source]);
+}
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
   }
 
   test_invalidModifierOnConstructor_async() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A() async {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INVALID_MODIFIER_ON_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_MODIFIER_ON_CONSTRUCTOR]);
   }
 
   test_invalidModifierOnConstructor_asyncStar() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A() async* {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INVALID_MODIFIER_ON_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_MODIFIER_ON_CONSTRUCTOR]);
   }
 
   test_invalidModifierOnConstructor_syncStar() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A() sync* {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INVALID_MODIFIER_ON_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_MODIFIER_ON_CONSTRUCTOR]);
   }
 
   test_invalidModifierOnSetter_member_async() async {
-    Source source = addSource(r'''
-class A {
-  set x(v) async {}
-}''');
-    await computeAnalysisResult(source);
     // TODO(danrubel): Investigate why error message is duplicated when
     // using fasta parser.
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
-                CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER
-              ]
-            : [CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER]);
-    verify([source]);
+    await assertErrorsInCode(r'''
+class A {
+  set x(v) async {}
+}
+''', [
+      CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
+      CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER
+    ]);
   }
 
   test_invalidModifierOnSetter_member_asyncStar() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   set x(v) async* {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
-                CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER
-              ]
-            : [CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER]);
-    verify([source]);
+}
+''', [
+      CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
+      CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER
+    ]);
   }
 
   test_invalidModifierOnSetter_member_syncStar() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   set x(v) sync* {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
-                CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER
-              ]
-            : [CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER]);
-    verify([source]);
+}
+''', [
+      CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
+      CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER
+    ]);
   }
 
   test_invalidModifierOnSetter_topLevel_async() async {
-    Source source = addSource("set x(v) async {}");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
-                CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER
-              ]
-            : [CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER]);
-    verify([source]);
+    await assertErrorsInCode('''
+set x(v) async {}
+''', [
+      CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
+      CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER
+    ]);
   }
 
   test_invalidModifierOnSetter_topLevel_asyncStar() async {
-    Source source = addSource("set x(v) async* {}");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
-                CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER
-              ]
-            : [CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER]);
-    verify([source]);
+    await assertErrorsInCode('''
+set x(v) async* {}
+''', [
+      CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
+      CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER
+    ]);
   }
 
   test_invalidModifierOnSetter_topLevel_syncStar() async {
-    Source source = addSource("set x(v) sync* {}");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
-                CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER
-              ]
-            : [CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER]);
-    verify([source]);
+    await assertErrorsInCode('''
+set x(v) sync* {}
+''', [
+      CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER,
+      CompileTimeErrorCode.INVALID_MODIFIER_ON_SETTER
+    ]);
   }
 
   test_invalidReferenceToThis_factoryConstructor() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   factory A() { return this; }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
   }
 
   test_invalidReferenceToThis_instanceVariableInitializer_inConstructor() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   var f;
   A() : f = this;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
   }
 
   test_invalidReferenceToThis_instanceVariableInitializer_inDeclaration() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   var f = this;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
   }
 
   test_invalidReferenceToThis_staticMethod() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   static m() { return this; }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
   }
 
   test_invalidReferenceToThis_staticVariableInitializer() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   static A f = this;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
   }
 
   test_invalidReferenceToThis_superInitializer() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A(var x) {}
 }
 class B extends A {
   B() : super(this);
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
   }
 
   test_invalidReferenceToThis_topLevelFunction() async {
-    Source source = addSource("f() { return this; }");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
-    verify([source]);
+    await assertErrorsInCode('''
+f() { return this; }
+''', [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
   }
 
   test_invalidReferenceToThis_variableInitializer() async {
-    Source source = addSource("int x = this;");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
-    verify([source]);
+    await assertErrorsInCode('''
+int x = this;
+''', [CompileTimeErrorCode.INVALID_REFERENCE_TO_THIS]);
   }
 
   test_invalidTypeArgumentInConstList() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A<E> {
   m() {
     return const <E>[];
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_LIST]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_LIST]);
   }
 
   test_invalidTypeArgumentInConstMap() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A<E> {
   m() {
     return const <String, E>{};
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_MAP]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_MAP]);
   }
 
   test_invalidUri_export() async {
-    Source source = addSource("export 'ht:';");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_URI]);
+    await assertErrorsInCode('''
+export 'ht:';
+''', [CompileTimeErrorCode.INVALID_URI]);
   }
 
   test_invalidUri_import() async {
-    Source source = addSource("import 'ht:';");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_URI]);
+    await assertErrorsInCode('''
+import 'ht:';
+''', [CompileTimeErrorCode.INVALID_URI]);
   }
 
   test_invalidUri_part() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 library lib;
-part 'ht:';''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_URI]);
+part 'ht:';
+''', [CompileTimeErrorCode.INVALID_URI]);
   }
 
   test_isInConstInstanceCreation_restored() async {
     // If ErrorVerifier._isInConstInstanceCreation is not properly restored on
     // exit from visitInstanceCreationExpression, the error at (1) will be
     // treated as a warning rather than an error.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class Foo<T extends num> {
   const Foo(x, y);
 }
 const x = const Foo<int>(const Foo<int>(0, 1),
     const <Foo<String>>[]); // (1)
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-    verify([source]);
+''', [CompileTimeErrorCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
   }
 
   test_isInInstanceVariableInitializer_restored() async {
     // If ErrorVerifier._isInInstanceVariableInitializer is not properly
     // restored on exit from visitVariableDeclaration, the error at (1)
     // won't be detected.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class Foo {
   var bar;
   Map foo = {
@@ -3537,15 +2586,12 @@
   };
   _foo() {
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.IMPLICIT_THIS_REFERENCE_IN_INITIALIZER]);
   }
 
   test_labelInOuterScope() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   void m(int i) {
     l: while (i > 0) {
@@ -3554,79 +2600,66 @@
       };
     }
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.LABEL_IN_OUTER_SCOPE]);
-    // We cannot verify resolution with unresolvable labels
+}
+''', [CompileTimeErrorCode.LABEL_IN_OUTER_SCOPE]);
   }
 
   test_labelUndefined_break() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f() {
   x: while (true) {
     break y;
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.LABEL_UNDEFINED, HintCode.UNUSED_LABEL]);
-    // We cannot verify resolution with undefined labels
+}
+''', [CompileTimeErrorCode.LABEL_UNDEFINED, HintCode.UNUSED_LABEL],
+        verify: false);
   }
 
   test_labelUndefined_continue() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f() {
   x: while (true) {
     continue y;
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.LABEL_UNDEFINED, HintCode.UNUSED_LABEL]);
-    // We cannot verify resolution with undefined labels
+}
+''', [CompileTimeErrorCode.LABEL_UNDEFINED, HintCode.UNUSED_LABEL],
+        verify: false);
   }
 
   test_length_of_erroneous_constant() async {
     // Attempting to compute the length of constant that couldn't be evaluated
     // (due to an error) should not crash the analyzer (see dartbug.com/23383)
-    Source source = addSource("const int i = (1 ? 'alpha' : 'beta').length;");
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+    await assertErrorsInCode('''
+const int i = (1 ? 'alpha' : 'beta').length;
+''', [
       CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE,
       CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL,
       StaticTypeWarningCode.NON_BOOL_CONDITION
     ]);
-    verify([source]);
   }
 
   test_memberWithClassName_field() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int A = 0;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
   }
 
   test_memberWithClassName_field2() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int z, A, b = 0;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
   }
 
   test_memberWithClassName_getter() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   get A => 0;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
   }
 
   test_memberWithClassName_method() async {
@@ -3634,42 +2667,40 @@
   }
 
   test_mixinClassDeclaresConstructor_classDeclaration() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(
+      r'''
 class A {
   A() {}
 }
-class B extends Object with A {}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-      source,
+class B extends Object with A {}
+''',
       [CompileTimeErrorCode.MIXIN_CLASS_DECLARES_CONSTRUCTOR],
     );
-    verify([source]);
   }
 
   test_mixinClassDeclaresConstructor_typeAlias() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(
+      r'''
 class A {
   A() {}
 }
-class B = Object with A;''');
-    await computeAnalysisResult(source);
-    assertErrors(
-      source,
+class B = Object with A;
+''',
       [CompileTimeErrorCode.MIXIN_CLASS_DECLARES_CONSTRUCTOR],
     );
-    verify([source]);
   }
 
   test_mixinDeferredClass() async {
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-class A {}''',
+class A {}
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
-class B extends Object with a.A {}'''
+class B extends Object with a.A {}
+'''
     ], <ErrorCode>[
       CompileTimeErrorCode.MIXIN_DEFERRED_CLASS
     ]);
@@ -3679,85 +2710,72 @@
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-class A {}''',
+class A {}
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
 class B {}
-class C = B with a.A;'''
+class C = B with a.A;
+'''
     ], <ErrorCode>[
       CompileTimeErrorCode.MIXIN_DEFERRED_CLASS
     ]);
   }
 
   test_mixinInference_matchingClass_inPreviousMixin_new_syntax() async {
-    Source source = addSource('''
+    await assertNoErrorsInCode('''
 abstract class A<T> {}
 class B {}
 mixin M1 implements A<B> {}
 mixin M2<T> on A<T> {}
 class C extends Object with M1, M2 {}
 ''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
   }
 
   test_mixinInference_matchingClass_new_syntax() async {
-    Source source = addSource('''
+    await assertNoErrorsInCode('''
 abstract class A<T> {}
 class B {}
 mixin M<T> on A<T> {}
 class C extends A<int> with M {}
 ''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
   }
 
   test_mixinInference_noMatchingClass_namedMixinApplication_new_syntax() async {
-    Source source = addSource('''
+    await assertErrorsInCode('''
 abstract class A<T> {}
 class B {}
 mixin M<T> on A<T> {}
 class C = Object with M;
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE]);
+''', [CompileTimeErrorCode.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE]);
   }
 
   test_mixinInference_noMatchingClass_new_syntax() async {
-    Source source = addSource('''
+    await assertErrorsInCode('''
 abstract class A<T> {}
 class B {}
 mixin M<T> on A<T> {}
 class C extends Object with M {}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE]);
+''', [CompileTimeErrorCode.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE]);
   }
 
   test_mixinInference_noMatchingClass_noSuperclassConstraint_new_syntax() async {
-    Source source = addSource('''
+    await assertNoErrorsInCode('''
 abstract class A<T> {}
 class B {}
 mixin M<T> {}
 class C extends Object with M {}
 ''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
   }
 
   test_mixinInference_noMatchingClass_typeParametersSupplied_new_syntax() async {
-    Source source = addSource('''
+    await assertErrorsInCode('''
 abstract class A<T> {}
 class B {}
 mixin M<T> on A<T> {}
 class C extends Object with M<int> {}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE]);
+''', [CompileTimeErrorCode.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE]);
   }
 
   test_mixinInference_recursiveSubtypeCheck_new_syntax() async {
@@ -3796,443 +2814,353 @@
   }
 
   test_mixinInheritsFromNotObject_classDeclaration_extends() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class B extends A {}
-class C extends Object with B {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT]);
-    verify([source]);
+class C extends Object with B {}
+''', [CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT]);
   }
 
   test_mixinInheritsFromNotObject_classDeclaration_with() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class B extends Object with A {}
-class C extends Object with B {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT]);
-    verify([source]);
+class C extends Object with B {}
+''', [CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT]);
   }
 
   test_mixinInheritsFromNotObject_typeAlias_extends() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class B extends A {}
-class C = Object with B;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT]);
-    verify([source]);
+class C = Object with B;
+''', [CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT]);
   }
 
   test_mixinInheritsFromNotObject_typeAlias_with() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class B extends Object with A {}
-class C = Object with B;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT]);
-    verify([source]);
+class C = Object with B;
+''', [CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT]);
   }
 
   test_mixinOfDisallowedClass_class_bool() async {
-    Source source = addSource("class A extends Object with bool {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A extends Object with bool {}
+''', [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
   }
 
   test_mixinOfDisallowedClass_class_double() async {
-    Source source = addSource("class A extends Object with double {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A extends Object with double {}
+''', [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
   }
 
   test_mixinOfDisallowedClass_class_int() async {
-    Source source = addSource("class A extends Object with int {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A extends Object with int {}
+''', [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
   }
 
   test_mixinOfDisallowedClass_class_Null() async {
-    Source source = addSource("class A extends Object with Null {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A extends Object with Null {}
+''', [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
   }
 
   test_mixinOfDisallowedClass_class_num() async {
-    Source source = addSource("class A extends Object with num {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A extends Object with num {}
+''', [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
   }
 
   test_mixinOfDisallowedClass_class_String() async {
-    Source source = addSource("class A extends Object with String {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A extends Object with String {}
+''', [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
   }
 
   test_mixinOfDisallowedClass_classTypeAlias_bool() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
-class C = A with bool;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
-    verify([source]);
+class C = A with bool;
+''', [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
   }
 
   test_mixinOfDisallowedClass_classTypeAlias_double() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
-class C = A with double;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
-    verify([source]);
+class C = A with double;
+''', [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
   }
 
   test_mixinOfDisallowedClass_classTypeAlias_int() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
-class C = A with int;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
-    verify([source]);
+class C = A with int;
+''', [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
   }
 
   test_mixinOfDisallowedClass_classTypeAlias_Null() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
-class C = A with Null;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
-    verify([source]);
+class C = A with Null;
+''', [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
   }
 
   test_mixinOfDisallowedClass_classTypeAlias_num() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
-class C = A with num;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
-    verify([source]);
+class C = A with num;
+''', [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
   }
 
   test_mixinOfDisallowedClass_classTypeAlias_String() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
-class C = A with String;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
-    verify([source]);
+class C = A with String;
+''', [CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS]);
   }
 
   test_mixinOfDisallowedClass_classTypeAlias_String_num() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
-class C = A with String, num;''');
-    await computeAnalysisResult(source);
-    if (enableNewAnalysisDriver) {
-      assertErrors(source, [
-        CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS,
-        CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS
-      ]);
-    } else {
-      assertErrors(source, [
-        CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS,
-        CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS
-      ]);
-    }
-    verify([source]);
+class C = A with String, num;
+''', [
+      CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS,
+      CompileTimeErrorCode.MIXIN_OF_DISALLOWED_CLASS
+    ]);
   }
 
   test_mixinOfNonClass() async {
     // TODO(brianwilkerson) Compare with MIXIN_WITH_NON_CLASS_SUPERCLASS.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 var A;
-class B extends Object mixin A {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_NON_CLASS]);
-    verify([source]);
+class B extends Object mixin A {}
+''', [CompileTimeErrorCode.MIXIN_OF_NON_CLASS]);
   }
 
   test_mixinOfNonClass_class() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 int A;
-class B extends Object with A {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_NON_CLASS]);
-    verify([source]);
+class B extends Object with A {}
+''', [CompileTimeErrorCode.MIXIN_OF_NON_CLASS]);
   }
 
   test_mixinOfNonClass_enum() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 enum E { ONE }
-class A extends Object with E {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_NON_CLASS]);
-    verify([source]);
+class A extends Object with E {}
+''', [CompileTimeErrorCode.MIXIN_OF_NON_CLASS]);
   }
 
   test_mixinOfNonClass_typeAlias() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 int B;
-class C = A with B;''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_OF_NON_CLASS]);
-    verify([source]);
+class C = A with B;
+''', [CompileTimeErrorCode.MIXIN_OF_NON_CLASS]);
   }
 
   test_mixinReferencesSuper() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   toString() => super.toString();
 }
-class B extends Object with A {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.MIXIN_REFERENCES_SUPER]);
-    verify([source]);
+class B extends Object with A {}
+''', [CompileTimeErrorCode.MIXIN_REFERENCES_SUPER]);
   }
 
   test_mixinWithNonClassSuperclass_class() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 int A;
 class B {}
-class C extends A with B {}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.MIXIN_WITH_NON_CLASS_SUPERCLASS]);
-    verify([source]);
+class C extends A with B {}
+''', [CompileTimeErrorCode.MIXIN_WITH_NON_CLASS_SUPERCLASS]);
   }
 
   test_mixinWithNonClassSuperclass_typeAlias() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 int A;
 class B {}
-class C = A with B;''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.MIXIN_WITH_NON_CLASS_SUPERCLASS]);
-    verify([source]);
+class C = A with B;
+''', [CompileTimeErrorCode.MIXIN_WITH_NON_CLASS_SUPERCLASS]);
   }
 
   test_multipleRedirectingConstructorInvocations() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A() : this.a(), this.b();
   A.a() {}
   A.b() {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.MULTIPLE_REDIRECTING_CONSTRUCTOR_INVOCATIONS]);
   }
 
   test_multipleSuperInitializers() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class B extends A {
   B() : super(), super() {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.MULTIPLE_SUPER_INITIALIZERS,
       StrongModeCode.INVALID_SUPER_INVOCATION
     ]);
-    verify([source]);
   }
 
   test_nativeClauseInNonSDKCode() async {
     // TODO(jwren) Move this test somewhere else: This test verifies a parser
     // error code is generated through the ErrorVerifier, it is not a
     // CompileTimeErrorCode.
-    Source source = addSource("class A native 'string' {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.NATIVE_CLAUSE_IN_NON_SDK_CODE]);
-    verify([source]);
+    await assertErrorsInCode('''
+class A native 'string' {}
+''', [ParserErrorCode.NATIVE_CLAUSE_IN_NON_SDK_CODE]);
   }
 
   test_nativeFunctionBodyInNonSDKCode_function() async {
     // TODO(jwren) Move this test somewhere else: This test verifies a parser
     // error code is generated through the ErrorVerifier, it is not a
     // CompileTimeErrorCode.
-    Source source = addSource("int m(a) native 'string';");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [ParserErrorCode.NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE]);
-    verify([source]);
+    await assertErrorsInCode('''
+int m(a) native 'string';
+''', [ParserErrorCode.NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE]);
   }
 
   test_nativeFunctionBodyInNonSDKCode_method() async {
     // TODO(jwren) Move this test somewhere else: This test verifies a parser
     // error code is generated through the ErrorVerifier, it is not a
     // CompileTimeErrorCode.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A{
   static int m(a) native 'string';
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [ParserErrorCode.NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE]);
-    verify([source]);
+}
+''', [ParserErrorCode.NATIVE_FUNCTION_BODY_IN_NON_SDK_CODE]);
   }
 
   test_noAnnotationConstructorArguments() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A();
 }
 @A
 main() {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.NO_ANNOTATION_CONSTRUCTOR_ARGUMENTS]);
   }
 
   test_noDefaultSuperConstructorExplicit() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A(p);
 }
 class B extends A {
   B() {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_EXPLICIT]);
   }
 
   test_noDefaultSuperConstructorImplicit_superHasParameters() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A(p);
 }
 class B extends A {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT]);
   }
 
   test_noDefaultSuperConstructorImplicit_superOnlyNamed() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A { A.named() {} }
-class B extends A {}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT]);
-    verify([source]);
+class B extends A {}
+''', [CompileTimeErrorCode.NO_DEFAULT_SUPER_CONSTRUCTOR_IMPLICIT]);
   }
 
   test_nonConstantAnnotationConstructor_named() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A.fromInt() {}
 }
 @A.fromInt()
 main() {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.NON_CONSTANT_ANNOTATION_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.NON_CONSTANT_ANNOTATION_CONSTRUCTOR]);
   }
 
   test_nonConstantAnnotationConstructor_unnamed() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A() {}
 }
 @A()
 main() {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.NON_CONSTANT_ANNOTATION_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.NON_CONSTANT_ANNOTATION_CONSTRUCTOR]);
   }
 
   test_nonConstantDefaultValue_function_named() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 int y;
-f({x : y}) {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
-    verify([source]);
+f({x : y}) {}
+''', [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
   }
 
   test_nonConstantDefaultValue_function_positional() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 int y;
-f([x = y]) {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
-    verify([source]);
+f([x = y]) {}
+''', [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
   }
 
   test_nonConstantDefaultValue_inConstructor_named() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int y;
   A({x : y}) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
   }
 
   test_nonConstantDefaultValue_inConstructor_positional() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int y;
   A([x = y]) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
   }
 
   test_nonConstantDefaultValue_method_named() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int y;
   m({x : y}) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
   }
 
   test_nonConstantDefaultValue_method_positional() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   int y;
   m([x = y]) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE]);
   }
 
   test_nonConstantDefaultValueFromDeferredLibrary() async {
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-const V = 1;''',
+const V = 1;
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
-f({x : a.V}) {}'''
+f({x : a.V}) {}
+'''
     ], <ErrorCode>[
       CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIBRARY
     ]);
@@ -4242,34 +3170,35 @@
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-const V = 1;''',
+const V = 1;
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
-f({x : a.V + 1}) {}'''
+f({x : a.V + 1}) {}
+'''
     ], <ErrorCode>[
       CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE_FROM_DEFERRED_LIBRARY
     ]);
   }
 
   test_nonConstCaseExpression() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f(int p, int q) {
   switch (p) {
     case 3 + q:
       break;
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_CASE_EXPRESSION]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.NON_CONSTANT_CASE_EXPRESSION]);
   }
 
   test_nonConstCaseExpressionFromDeferredLibrary() async {
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-const int c = 1;''',
+const int c = 1;
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
@@ -4278,7 +3207,8 @@
     case a.c:
       break;
   }
-}'''
+}
+'''
     ], [
       CompileTimeErrorCode.NON_CONSTANT_CASE_EXPRESSION_FROM_DEFERRED_LIBRARY
     ]);
@@ -4288,7 +3218,8 @@
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-const int c = 1;''',
+const int c = 1;
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
@@ -4297,289 +3228,90 @@
     case a.c + 1:
       break;
   }
-}'''
+}
+'''
     ], [
       CompileTimeErrorCode.NON_CONSTANT_CASE_EXPRESSION_FROM_DEFERRED_LIBRARY
     ]);
   }
 
-  test_nonConstListElement() async {
-    Source source = addSource(r'''
-f(a) {
-  return const [a];
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
-    verify([source]);
-  }
-
-  test_nonConstListElementFromDeferredLibrary() async {
-    await resolveWithErrors(<String>[
-      r'''
-library lib1;
-const int c = 1;''',
-      r'''
-library root;
-import 'lib1.dart' deferred as a;
-f() {
-  return const [a.c];
-}'''
-    ], [
-      CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY
-    ]);
-  }
-
-  test_nonConstListElementFromDeferredLibrary_nested() async {
-    await resolveWithErrors(<String>[
-      r'''
-library lib1;
-const int c = 1;''',
-      r'''
-library root;
-import 'lib1.dart' deferred as a;
-f() {
-  return const [a.c + 1];
-}'''
-    ], [
-      CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY
-    ]);
-  }
-
   test_nonConstMapAsExpressionStatement_begin() async {
-    Source source = addSource(r'''
+    // TODO(danrubel): Consider improving recovery
+    await assertErrorsInCode(r'''
 f() {
   {'a' : 0, 'b' : 1}.length;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                // TODO(danrubel): Consider improving recovery
-                ParserErrorCode.EXPECTED_TOKEN,
-                ParserErrorCode.EXPECTED_TOKEN,
-                ParserErrorCode.EXPECTED_TOKEN,
-                ParserErrorCode.EXPECTED_TOKEN,
-                ParserErrorCode.EXPECTED_TOKEN,
-                ParserErrorCode.EXPECTED_TOKEN,
-                ParserErrorCode.EXPECTED_TOKEN,
-                ParserErrorCode.MISSING_IDENTIFIER,
-                ParserErrorCode.MISSING_IDENTIFIER,
-                ParserErrorCode.MISSING_IDENTIFIER,
-                ParserErrorCode.MISSING_IDENTIFIER,
-                ParserErrorCode.UNEXPECTED_TOKEN,
-                ParserErrorCode.UNEXPECTED_TOKEN,
-                ParserErrorCode.UNEXPECTED_TOKEN,
-              ]
-            : [CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT]);
-    verify([source]);
+}
+''', [
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.MISSING_IDENTIFIER,
+      ParserErrorCode.MISSING_IDENTIFIER,
+      ParserErrorCode.MISSING_IDENTIFIER,
+      ParserErrorCode.MISSING_IDENTIFIER,
+      ParserErrorCode.UNEXPECTED_TOKEN,
+      ParserErrorCode.UNEXPECTED_TOKEN,
+      ParserErrorCode.UNEXPECTED_TOKEN,
+    ]);
   }
 
   test_nonConstMapAsExpressionStatement_only() async {
-    Source source = addSource(r'''
+    // TODO(danrubel): Consider improving recovery
+    await assertErrorsInCode(r'''
 f() {
   {'a' : 0, 'b' : 1};
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                ParserErrorCode.EXPECTED_TOKEN,
-                ParserErrorCode.EXPECTED_TOKEN,
-                ParserErrorCode.EXPECTED_TOKEN,
-                ParserErrorCode.EXPECTED_TOKEN,
-                ParserErrorCode.EXPECTED_TOKEN,
-                ParserErrorCode.EXPECTED_TOKEN,
-                ParserErrorCode.EXPECTED_TOKEN,
-                ParserErrorCode.MISSING_IDENTIFIER,
-                ParserErrorCode.MISSING_IDENTIFIER,
-                ParserErrorCode.MISSING_IDENTIFIER,
-                ParserErrorCode.UNEXPECTED_TOKEN,
-                ParserErrorCode.UNEXPECTED_TOKEN,
-                ParserErrorCode.UNEXPECTED_TOKEN,
-              ]
-            : [CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT]);
-    verify([source]);
-  }
-
-  test_nonConstMapKey() async {
-    Source source = addSource(r'''
-f(a) {
-  return const {a : 0};
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY]);
-    verify([source]);
-  }
-
-  test_nonConstMapKeyFromDeferredLibrary() async {
-    await resolveWithErrors(<String>[
-      r'''
-library lib1;
-const int c = 1;''',
-      r'''
-library root;
-import 'lib1.dart' deferred as a;
-f() {
-  return const {a.c : 0};
-}'''
-    ], [
-      CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY
-    ]);
-  }
-
-  test_nonConstMapKeyFromDeferredLibrary_nested() async {
-    await resolveWithErrors(<String>[
-      r'''
-library lib1;
-const int c = 1;''',
-      r'''
-library root;
-import 'lib1.dart' deferred as a;
-f() {
-  return const {a.c + 1 : 0};
-}'''
-    ], [
-      CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY
-    ]);
-  }
-
-  test_nonConstMapValue() async {
-    Source source = addSource(r'''
-f(a) {
-  return const {'a' : a};
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE]);
-    verify([source]);
-  }
-
-  test_nonConstMapValueFromDeferredLibrary() async {
-    await resolveWithErrors(<String>[
-      r'''
-library lib1;
-const int c = 1;''',
-      r'''
-library root;
-import 'lib1.dart' deferred as a;
-f() {
-  return const {'a' : a.c};
-}'''
-    ], [
-      CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY
-    ]);
-  }
-
-  test_nonConstMapValueFromDeferredLibrary_nested() async {
-    await resolveWithErrors(<String>[
-      r'''
-library lib1;
-const int c = 1;''',
-      r'''
-library root;
-import 'lib1.dart' deferred as a;
-f() {
-  return const {'a' : a.c + 1};
-}'''
-    ], [
-      CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY
+}
+''', [
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.MISSING_IDENTIFIER,
+      ParserErrorCode.MISSING_IDENTIFIER,
+      ParserErrorCode.MISSING_IDENTIFIER,
+      ParserErrorCode.UNEXPECTED_TOKEN,
+      ParserErrorCode.UNEXPECTED_TOKEN,
+      ParserErrorCode.UNEXPECTED_TOKEN,
     ]);
   }
 
   test_nonConstValueInInitializer_assert_condition() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A(int i) : assert(i.isNegative);
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_CONSTANT]);
   }
 
   test_nonConstValueInInitializer_assert_message() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A(int i) : assert(i < 0, 'isNegative = ${i.isNegative}');
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER]);
-    verify([source]);
-  }
-
-  test_nonConstValueInInitializer_binary_notBool_left() async {
-    Source source = addSource(r'''
-class A {
-  final bool a;
-  const A(String p) : a = p && true;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL,
-      StaticTypeWarningCode.NON_BOOL_OPERAND
-    ]);
-    verify([source]);
-  }
-
-  test_nonConstValueInInitializer_binary_notBool_right() async {
-    Source source = addSource(r'''
-class A {
-  final bool a;
-  const A(String p) : a = true && p;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL,
-      StaticTypeWarningCode.NON_BOOL_OPERAND
-    ]);
-    verify([source]);
-  }
-
-  test_nonConstValueInInitializer_binary_notInt() async {
-    Source source = addSource(r'''
-class A {
-  final int a;
-  const A(String p) : a = 5 & p;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_INT,
-      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
-    ]);
-    verify([source]);
-  }
-
-  test_nonConstValueInInitializer_binary_notNum() async {
-    Source source = addSource(r'''
-class A {
-  final int a;
-  const A(String p) : a = 5 + p;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CompileTimeErrorCode.CONST_EVAL_TYPE_NUM,
-      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
-    ]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_CONSTANT]);
   }
 
   test_nonConstValueInInitializer_field() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   static int C;
   final int a;
   const A() : a = C;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_CONSTANT]);
   }
 
   test_nonConstValueInInitializer_instanceCreation() async {
-    Source source = addSource(r'''
+    // TODO(scheglov): the error CONST_EVAL_THROWS_EXCEPTION is redundant and
+    // ought to be suppressed. Or not?
+    await assertErrorsInCode(r'''
 class A {
   A();
 }
@@ -4587,15 +3319,11 @@
   const B() : a = new A();
   final a;
 }
-var b = const B();''');
-    // TODO(scheglov): the error CONST_EVAL_THROWS_EXCEPTION is redundant and
-    // ought to be suppressed. Or not?
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER,
+var b = const B();
+''', [
+      CompileTimeErrorCode.INVALID_CONSTANT,
       CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION
     ]);
-    verify([source]);
   }
 
   test_nonConstValueInInitializer_instanceCreation_inDifferentFile() async {
@@ -4618,31 +3346,25 @@
   }
 
   test_nonConstValueInInitializer_redirecting() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   static var C;
   const A.named(p);
   const A() : this.named(C);
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_CONSTANT]);
   }
 
   test_nonConstValueInInitializer_super() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A(p);
 }
 class B extends A {
   static var C;
   const B() : super(C);
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.INVALID_CONSTANT]);
   }
 
   test_nonConstValueInInitializerFromDeferredLibrary_field() async {
@@ -4656,10 +3378,10 @@
 class A {
   final int x;
   const A() : x = a.c;
-}'''
+}
+'''
     ], <ErrorCode>[
-      CompileTimeErrorCode
-          .NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFERRED_LIBRARY
+      CompileTimeErrorCode.INVALID_CONSTANT
     ]);
   }
 
@@ -4667,17 +3389,18 @@
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-const int c = 1;''',
+const int c = 1;
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
 class A {
   final int x;
   const A() : x = a.c + 1;
-}'''
+}
+'''
     ], <ErrorCode>[
-      CompileTimeErrorCode
-          .NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFERRED_LIBRARY
+      CompileTimeErrorCode.INVALID_CONSTANT
     ]);
   }
 
@@ -4685,17 +3408,18 @@
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-const int c = 1;''',
+const int c = 1;
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
 class A {
   const A.named(p);
   const A() : this.named(a.c);
-}'''
+}
+'''
     ], <ErrorCode>[
-      CompileTimeErrorCode
-          .NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFERRED_LIBRARY
+      CompileTimeErrorCode.INVALID_CONSTANT
     ]);
   }
 
@@ -4703,7 +3427,8 @@
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-const int c = 1;''',
+const int c = 1;
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as a;
@@ -4712,366 +3437,303 @@
 }
 class B extends A {
   const B() : super(a.c);
-}'''
+}
+'''
     ], <ErrorCode>[
-      CompileTimeErrorCode
-          .NON_CONSTANT_VALUE_IN_INITIALIZER_FROM_DEFERRED_LIBRARY
+      CompileTimeErrorCode.INVALID_CONSTANT
     ]);
   }
 
   test_nonGenerativeConstructor_explicit() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   factory A.named() => null;
 }
 class B extends A {
   B() : super.named();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR]);
   }
 
   test_nonGenerativeConstructor_implicit() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   factory A() => null;
 }
 class B extends A {
   B();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR]);
   }
 
   test_nonGenerativeConstructor_implicit2() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   factory A() => null;
 }
 class B extends A {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.NON_GENERATIVE_CONSTRUCTOR]);
   }
 
   test_notEnoughRequiredArguments_const() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A(int p);
 }
 main() {
   const A();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.NOT_ENOUGH_REQUIRED_ARGUMENTS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.NOT_ENOUGH_REQUIRED_ARGUMENTS]);
   }
 
   test_notEnoughRequiredArguments_const_super() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A(int p);
 }
 class B extends A {
   const B() : super();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.NOT_ENOUGH_REQUIRED_ARGUMENTS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.NOT_ENOUGH_REQUIRED_ARGUMENTS]);
   }
 
   test_objectCannotExtendAnotherClass() async {
-    Source source = addSource(r'''
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.OBJECT_CANNOT_EXTEND_ANOTHER_CLASS]);
-    verify([source]);
+    await assertErrorsInCode(r'''
+class Object extends List {}
+''', [CompileTimeErrorCode.OBJECT_CANNOT_EXTEND_ANOTHER_CLASS]);
   }
 
   test_optionalParameterInOperator_named() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   operator +({p}) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.OPTIONAL_PARAMETER_IN_OPERATOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.OPTIONAL_PARAMETER_IN_OPERATOR]);
   }
 
   test_optionalParameterInOperator_positional() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   operator +([p]) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.OPTIONAL_PARAMETER_IN_OPERATOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.OPTIONAL_PARAMETER_IN_OPERATOR]);
   }
 
   test_partOfNonPart() async {
-    Source source = addSource(r'''
+    newFile("/l2.dart", content: '''
+library l2;
+''');
+    await assertErrorsInCode(r'''
 library l1;
-part 'l2.dart';''');
-    addNamedSource("/l2.dart", "library l2;");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.PART_OF_NON_PART]);
-    verify([source]);
+part 'l2.dart';
+''', [CompileTimeErrorCode.PART_OF_NON_PART]);
   }
 
   test_partOfNonPart_self() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 library lib;
-part 'test.dart';''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.PART_OF_NON_PART]);
-    verify([source]);
+part 'test.dart';
+''', [CompileTimeErrorCode.PART_OF_NON_PART]);
   }
 
   test_prefix_assignment_compound_in_method() async {
-    addNamedSource('/lib.dart', 'library lib;');
-    Source source = addSource('''
+    newFile('/lib.dart', content: '''
+library lib;
+''');
+    await assertErrorsInCode('''
 import 'lib.dart' as p;
 class C {
   f() {
     p += 1;
   }
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
-    verify([source]);
+''', [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
   }
 
   test_prefix_assignment_compound_not_in_method() async {
-    addNamedSource('/lib.dart', 'library lib;');
-    Source source = addSource('''
+    newFile('/lib.dart', content: '''
+library lib;
+''');
+    await assertErrorsInCode('''
 import 'lib.dart' as p;
 f() {
   p += 1;
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
-    verify([source]);
+''', [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
   }
 
   test_prefix_assignment_in_method() async {
-    addNamedSource('/lib.dart', 'library lib;');
-    Source source = addSource('''
+    newFile('/lib.dart', content: '''
+library lib;
+''');
+    await assertErrorsInCode('''
 import 'lib.dart' as p;
 class C {
   f() {
     p = 1;
   }
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
-    verify([source]);
+''', [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
   }
 
   test_prefix_assignment_not_in_method() async {
-    addNamedSource('/lib.dart', 'library lib;');
-    Source source = addSource('''
+    newFile('/lib.dart', content: '''
+library lib;
+''');
+    await assertErrorsInCode('''
 import 'lib.dart' as p;
 f() {
   p = 1;
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
-    verify([source]);
+''', [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
   }
 
   test_prefix_conditionalPropertyAccess_call_loadLibrary() async {
-    addNamedSource('/lib.dart', '''
+    newFile('/lib.dart', content: '''
 library lib;
 ''');
-    Source source = addSource('''
+    await assertErrorsInCode('''
 import 'lib.dart' deferred as p;
 f() {
   p?.loadLibrary();
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
-    verify([source]);
+''', [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
   }
 
   test_prefix_conditionalPropertyAccess_get() async {
-    addNamedSource('/lib.dart', '''
+    newFile('/lib.dart', content: '''
 library lib;
 var x;
 ''');
-    Source source = addSource('''
+    await assertErrorsInCode('''
 import 'lib.dart' as p;
 f() {
   return p?.x;
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
-    verify([source]);
+''', [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
   }
 
   test_prefix_conditionalPropertyAccess_get_loadLibrary() async {
-    addNamedSource('/lib.dart', '''
+    newFile('/lib.dart', content: '''
 library lib;
 ''');
-    Source source = addSource('''
+    await assertErrorsInCode('''
 import 'lib.dart' deferred as p;
 f() {
   return p?.loadLibrary;
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
-    verify([source]);
+''', [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
   }
 
   test_prefix_conditionalPropertyAccess_set() async {
-    addNamedSource('/lib.dart', '''
+    newFile('/lib.dart', content: '''
 library lib;
 var x;
 ''');
-    Source source = addSource('''
+    await assertErrorsInCode('''
 import 'lib.dart' as p;
 f() {
   p?.x = null;
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
-    verify([source]);
+''', [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
   }
 
   test_prefix_conditionalPropertyAccess_set_loadLibrary() async {
-    addNamedSource('/lib.dart', '''
+    newFile('/lib.dart', content: '''
 library lib;
 ''');
-    Source source = addSource('''
+    await assertErrorsInCode('''
 import 'lib.dart' deferred as p;
 f() {
   p?.loadLibrary = null;
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
-    verify([source]);
+''', [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
   }
 
   test_prefixCollidesWithTopLevelMembers_functionTypeAlias() async {
-    addNamedSource("/lib.dart", r'''
+    newFile("/lib.dart", content: r'''
 library lib;
-class A{}''');
-    Source source = addSource(r'''
+class A{}
+''');
+    await assertErrorsInCode(r'''
 import 'lib.dart' as p;
 typedef p();
-p.A a;''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER]);
-    verify([source]);
+p.A a;
+''', [CompileTimeErrorCode.PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER]);
   }
 
   test_prefixCollidesWithTopLevelMembers_topLevelFunction() async {
-    addNamedSource("/lib.dart", r'''
+    newFile("/lib.dart", content: r'''
 library lib;
-class A{}''');
-    Source source = addSource(r'''
+class A{}
+''');
+    await assertErrorsInCode(r'''
 import 'lib.dart' as p;
 p() {}
-p.A a;''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER]);
-    verify([source]);
+p.A a;
+''', [CompileTimeErrorCode.PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER]);
   }
 
   test_prefixCollidesWithTopLevelMembers_topLevelVariable() async {
-    addNamedSource("/lib.dart", r'''
+    newFile("/lib.dart", content: r'''
 library lib;
-class A{}''');
-    Source source = addSource(r'''
+class A{}
+''');
+    await assertErrorsInCode(r'''
 import 'lib.dart' as p;
 var p = null;
-p.A a;''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER]);
-    verify([source]);
+p.A a;
+''', [CompileTimeErrorCode.PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER]);
   }
 
   test_prefixCollidesWithTopLevelMembers_type() async {
-    addNamedSource("/lib.dart", r'''
+    newFile("/lib.dart", content: r'''
 library lib;
-class A{}''');
-    Source source = addSource(r'''
+class A{}
+''');
+    await assertErrorsInCode(r'''
 import 'lib.dart' as p;
 class p {}
-p.A a;''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER]);
-    verify([source]);
+p.A a;
+''', [CompileTimeErrorCode.PREFIX_COLLIDES_WITH_TOP_LEVEL_MEMBER]);
   }
 
   test_prefixNotFollowedByDot() async {
-    addNamedSource('/lib.dart', 'library lib;');
-    Source source = addSource('''
+    newFile('/lib.dart', content: '''
+library lib;
+''');
+    await assertErrorsInCode('''
 import 'lib.dart' as p;
 f() {
   return p;
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
-    verify([source]);
+''', [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
   }
 
   test_prefixNotFollowedByDot_compoundAssignment() async {
-    addNamedSource('/lib.dart', 'library lib;');
-    Source source = addSource('''
+    newFile('/lib.dart', content: '''
+library lib;
+''');
+    await assertErrorsInCode('''
 import 'lib.dart' as p;
 f() {
   p += 1;
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
-    verify([source]);
+''', [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
   }
 
   test_prefixNotFollowedByDot_conditionalMethodInvocation() async {
-    addNamedSource('/lib.dart', '''
+    newFile('/lib.dart', content: '''
 library lib;
 g() {}
 ''');
-    Source source = addSource('''
+    await assertErrorsInCode('''
 import 'lib.dart' as p;
 f() {
   p?.g();
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
-    verify([source]);
+''', [CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT]);
   }
 
   test_privateCollisionInClassTypeAlias_mixinAndMixin() {
@@ -5133,61 +3795,45 @@
   }
 
   test_privateOptionalParameter() async {
-    Source source = addSource("f({var _p}) {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.PRIVATE_OPTIONAL_PARAMETER]);
-    verify([source]);
+    await assertErrorsInCode('''
+f({var _p}) {}
+''', [CompileTimeErrorCode.PRIVATE_OPTIONAL_PARAMETER]);
   }
 
   test_privateOptionalParameter_fieldFormal() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   var _p;
   A({this._p: 0});
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.PRIVATE_OPTIONAL_PARAMETER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.PRIVATE_OPTIONAL_PARAMETER]);
   }
 
   test_privateOptionalParameter_withDefaultValue() async {
-    Source source = addSource("f({_p : 0}) {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.PRIVATE_OPTIONAL_PARAMETER]);
-    verify([source]);
+    await assertErrorsInCode('''
+f({_p : 0}) {}
+''', [CompileTimeErrorCode.PRIVATE_OPTIONAL_PARAMETER]);
   }
 
   test_recursiveCompileTimeConstant() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A();
   final m = const A();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT]);
   }
 
   test_recursiveCompileTimeConstant_cycle() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 const x = y + 1;
-const y = x + 1;''');
-    await computeAnalysisResult(source);
-    if (!enableNewAnalysisDriver) {
-      assertErrors(source, [
-        CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
-        CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
-      ]);
-    } else {
-      assertErrors(source, [
-        CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
-        CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
-        StrongModeCode.TOP_LEVEL_CYCLE,
-        StrongModeCode.TOP_LEVEL_CYCLE,
-      ]);
-    }
-    verify([source]);
+const y = x + 1;
+''', [
+      CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
+      CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
+      StrongModeCode.TOP_LEVEL_CYCLE,
+      StrongModeCode.TOP_LEVEL_CYCLE,
+    ]);
   }
 
   test_recursiveCompileTimeConstant_fromMapLiteral() async {
@@ -5198,96 +3844,67 @@
 const int y = x;
 ''',
     );
-    Source source = addSource(r'''
+    // No errors, because the cycle is not in this source.
+    await assertNoErrorsInCode(r'''
 import 'constants.dart';
 final z = {x: 0, y: 1};
 ''');
-    await computeAnalysisResult(source);
-    // No errors, because the cycle is not in this source.
-    assertNoErrors(source);
-    verify([source]);
   }
 
   test_recursiveCompileTimeConstant_initializer_after_toplevel_var() async {
-    Source source = addSource('''
+    await assertErrorsInCode('''
 const y = const C();
 class C {
   const C() : x = y;
   final x;
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT]);
-    verify([source]);
+''', [CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT]);
   }
 
   test_recursiveCompileTimeConstant_singleVariable() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 const x = x;
-''');
-    await computeAnalysisResult(source);
-    if (!enableNewAnalysisDriver) {
-      assertErrors(source, [
-        CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
-      ]);
-    } else {
-      assertErrors(source, [
-        CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
-        StrongModeCode.TOP_LEVEL_CYCLE
-      ]);
-    }
-    verify([source]);
+''', [
+      CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
+      StrongModeCode.TOP_LEVEL_CYCLE
+    ]);
   }
 
   test_recursiveCompileTimeConstant_singleVariable_fromConstList() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 const elems = const [
   const [
     1, elems, 3,
   ],
 ];
-''');
-    await computeAnalysisResult(source);
-    if (!enableNewAnalysisDriver) {
-      assertErrors(source, [
-        CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
-      ]);
-    } else {
-      assertErrors(source, [
-        CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
-        StrongModeCode.TOP_LEVEL_CYCLE,
-      ]);
-    }
-    verify([source]);
+''', [
+      CompileTimeErrorCode.RECURSIVE_COMPILE_TIME_CONSTANT,
+      StrongModeCode.TOP_LEVEL_CYCLE,
+    ]);
   }
 
   test_recursiveConstructorRedirect() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A.a() : this.b();
   A.b() : this.a();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT,
       CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT
     ]);
-    verify([source]);
   }
 
   test_recursiveConstructorRedirect_directSelfReference() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A() : this();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.RECURSIVE_CONSTRUCTOR_REDIRECT]);
   }
 
   test_recursiveFactoryRedirect() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A implements B {
   factory A() = C;
 }
@@ -5296,9 +3913,8 @@
 }
 class C implements A {
   factory C() = B;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
       CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
       CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
@@ -5306,38 +3922,32 @@
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE
     ]);
-    verify([source]);
   }
 
   test_recursiveFactoryRedirect_directSelfReference() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   factory A() = A;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT]);
   }
 
   test_recursiveFactoryRedirect_diverging() async {
     // Analysis should terminate even though the redirections don't reach a
     // fixed point.  (C<int> redirects to C<C<int>>, then to C<C<C<int>>>, and
     // so on).
-    Source source = addSource('''
+    await assertErrorsInCode('''
 class C<T> {
   const factory C() = C<C<T>>;
 }
 main() {
   const C<int>();
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT]);
-    verify([source]);
+''', [CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT]);
   }
 
   test_recursiveFactoryRedirect_generic() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A<T> implements B<T> {
   factory A() = C;
 }
@@ -5346,9 +3956,8 @@
 }
 class C<T> implements A<T> {
   factory C() = B;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
       CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
       CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
@@ -5356,11 +3965,10 @@
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE
     ]);
-    verify([source]);
   }
 
   test_recursiveFactoryRedirect_named() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A implements B {
   factory A.nameA() = C.nameC;
 }
@@ -5369,9 +3977,8 @@
 }
 class C implements A {
   factory C.nameC() = B.nameB;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
       CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
       CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
@@ -5379,7 +3986,6 @@
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE
     ]);
-    verify([source]);
   }
 
   /**
@@ -5387,7 +3993,7 @@
    * not the part of a cycle.
    */
   test_recursiveFactoryRedirect_outsideCycle() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   factory A() = C;
 }
@@ -5396,136 +4002,115 @@
 }
 class C implements A, B {
   factory C() = B;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
       CompileTimeErrorCode.RECURSIVE_FACTORY_REDIRECT,
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE
     ]);
-    verify([source]);
   }
 
   test_redirectGenerativeToMissingConstructor() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A() : this.noSuchConstructor();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR]);
+}
+''', [CompileTimeErrorCode.REDIRECT_GENERATIVE_TO_MISSING_CONSTRUCTOR],
+        verify: false);
   }
 
   test_redirectGenerativeToNonGenerativeConstructor() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A() : this.x();
   factory A.x() => null;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CompileTimeErrorCode.REDIRECT_GENERATIVE_TO_NON_GENERATIVE_CONSTRUCTOR
-    ]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.REDIRECT_GENERATIVE_TO_NON_GENERATIVE_CONSTRUCTOR]);
   }
 
   test_redirectToMissingConstructor_named() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A implements B{
   A() {}
 }
 class B {
   const factory B() = A.name;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.REDIRECT_TO_MISSING_CONSTRUCTOR]);
+}
+''', [CompileTimeErrorCode.REDIRECT_TO_MISSING_CONSTRUCTOR], verify: false);
   }
 
   test_redirectToMissingConstructor_unnamed() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A implements B{
   A.name() {}
 }
 class B {
   const factory B() = A;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.REDIRECT_TO_MISSING_CONSTRUCTOR]);
+}
+''', [CompileTimeErrorCode.REDIRECT_TO_MISSING_CONSTRUCTOR]);
   }
 
   test_redirectToNonClass_notAType() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 int A;
 class B {
   const factory B() = A;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.REDIRECT_TO_NON_CLASS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.REDIRECT_TO_NON_CLASS]);
   }
 
   test_redirectToNonClass_undefinedIdentifier() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class B {
   const factory B() = A;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.REDIRECT_TO_NON_CLASS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.REDIRECT_TO_NON_CLASS]);
   }
 
   test_redirectToNonConstConstructor() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A.a() {}
   const factory A.b() = A.a;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.REDIRECT_TO_NON_CONST_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.REDIRECT_TO_NON_CONST_CONSTRUCTOR]);
   }
 
   test_referencedBeforeDeclaration_hideInBlock_comment() async {
-    Source source = addSource(r'''
+    await assertNoErrorsInCode(r'''
 main() {
   /// [v] is a variable.
   var v = 2;
 }
-print(x) {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
+print(x) {}
+''');
   }
 
   test_referencedBeforeDeclaration_hideInBlock_function() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 var v = 1;
 main() {
   print(v);
   v() {}
 }
-print(x) {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
+print(x) {}
+''', [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
   }
 
   test_referencedBeforeDeclaration_hideInBlock_local() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 var v = 1;
 main() {
   print(v);
   var v = 2;
 }
-print(x) {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
+print(x) {}
+''', [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
   }
 
   test_referencedBeforeDeclaration_hideInBlock_subBlock() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 var v = 1;
 main() {
   {
@@ -5533,158 +4118,131 @@
   }
   var v = 2;
 }
-print(x) {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
+print(x) {}
+''', [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
   }
 
   test_referencedBeforeDeclaration_inInitializer_closure() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 main() {
   var v = () => v;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
+}
+''', [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
   }
 
   test_referencedBeforeDeclaration_inInitializer_directly() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 main() {
   var v = v;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
+}
+''', [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
   }
 
   test_referencedBeforeDeclaration_type_localFunction() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 void testTypeRef() {
   String s = '';
   int String(int x) => x + 1;
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
+''', [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
   }
 
   test_referencedBeforeDeclaration_type_localVariable() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 void testTypeRef() {
   String s = '';
   var String = '';
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
+''', [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
   }
 
   test_rethrowOutsideCatch() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f() {
   rethrow;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.RETHROW_OUTSIDE_CATCH]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.RETHROW_OUTSIDE_CATCH]);
   }
 
   test_returnInGenerativeConstructor() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A() { return 0; }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.RETURN_IN_GENERATIVE_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.RETURN_IN_GENERATIVE_CONSTRUCTOR]);
   }
 
   test_returnInGenerativeConstructor_expressionFunctionBody() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A() => null;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.RETURN_IN_GENERATIVE_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.RETURN_IN_GENERATIVE_CONSTRUCTOR]);
   }
 
   test_returnInGenerator_asyncStar() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f() async* {
   return 0;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                CompileTimeErrorCode.RETURN_IN_GENERATOR,
-                CompileTimeErrorCode.RETURN_IN_GENERATOR
-              ]
-            : [CompileTimeErrorCode.RETURN_IN_GENERATOR]);
-    verify([source]);
+}
+''', [
+      CompileTimeErrorCode.RETURN_IN_GENERATOR,
+      CompileTimeErrorCode.RETURN_IN_GENERATOR
+    ]);
   }
 
   test_returnInGenerator_syncStar() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f() sync* {
   return 0;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [
-                CompileTimeErrorCode.RETURN_IN_GENERATOR,
-                CompileTimeErrorCode.RETURN_IN_GENERATOR
-              ]
-            : [CompileTimeErrorCode.RETURN_IN_GENERATOR]);
-    verify([source]);
+}
+''', [
+      CompileTimeErrorCode.RETURN_IN_GENERATOR,
+      CompileTimeErrorCode.RETURN_IN_GENERATOR
+    ]);
   }
 
   test_sharedDeferredPrefix() async {
     await resolveWithErrors(<String>[
       r'''
 library lib1;
-f1() {}''',
+f1() {}
+''',
       r'''
 library lib2;
-f2() {}''',
+f2() {}
+''',
       r'''
 library root;
 import 'lib1.dart' deferred as lib;
 import 'lib2.dart' as lib;
-main() { lib.f1(); lib.f2(); }'''
+main() { lib.f1(); lib.f2(); }
+'''
     ], <ErrorCode>[
       CompileTimeErrorCode.SHARED_DEFERRED_PREFIX
     ]);
   }
 
   test_superInInvalidContext_binaryExpression() async {
-    Source source = addSource("var v = super + 0;");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
-    // no verify(), 'super.v' is not resolved
+    await assertErrorsInCode('''
+var v = super + 0;
+''', [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
   }
 
   test_superInInvalidContext_constructorFieldInitializer() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   m() {}
 }
 class B extends A {
   var f;
   B() : f = super.m();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
-    // no verify(), 'super.m' is not resolved
+}
+''', [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT], verify: false);
   }
 
   test_superInInvalidContext_factoryConstructor() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   m() {}
 }
@@ -5693,113 +4251,96 @@
     super.m();
     return null;
   }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
-    // no verify(), 'super.m' is not resolved
+}
+''', [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT], verify: false);
   }
 
   test_superInInvalidContext_instanceVariableInitializer() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   var a;
 }
 class B extends A {
  var b = super.a;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
-    // no verify(), 'super.a' is not resolved
+}
+''', [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
   }
 
   test_superInInvalidContext_staticMethod() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   static m() {}
 }
 class B extends A {
   static n() { return super.m(); }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
-    // no verify(), 'super.m' is not resolved
+}
+''', [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT], verify: false);
   }
 
   test_superInInvalidContext_staticVariableInitializer() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   static int a = 0;
 }
 class B extends A {
   static int b = super.a;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
-    // no verify(), 'super.a' is not resolved
+}
+''', [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
   }
 
   test_superInInvalidContext_topLevelFunction() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f() {
   super.f();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
-    // no verify(), 'super.f' is not resolved
+}
+''', [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
   }
 
   test_superInInvalidContext_topLevelVariableInitializer() async {
-    Source source = addSource("var v = super.y;");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
-    // no verify(), 'super.y' is not resolved
+    await assertErrorsInCode('''
+var v = super.y;
+''', [CompileTimeErrorCode.SUPER_IN_INVALID_CONTEXT]);
   }
 
   test_superInitializerInObject() async {
-    Source source = addSource(r'''
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.SUPER_INITIALIZER_IN_OBJECT]);
-    verify([source]);
+    await assertErrorsInCode(r'''
+class Object {
+  Object() : super();
+}
+''', [CompileTimeErrorCode.SUPER_INITIALIZER_IN_OBJECT]);
   }
 
   test_superInRedirectingConstructor_redirectionSuper() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class B {
   B() : this.name(), super();
   B.name() {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.SUPER_IN_REDIRECTING_CONSTRUCTOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.SUPER_IN_REDIRECTING_CONSTRUCTOR]);
   }
 
   test_superInRedirectingConstructor_superRedirection() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class B {
   B() : super(), this.name();
   B.name() {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.SUPER_IN_REDIRECTING_CONSTRUCTOR,
       StrongModeCode.INVALID_SUPER_INVOCATION
     ]);
-    verify([source]);
   }
 
   test_symbol_constructor_badArgs() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 var s1 = const Symbol('3');
 var s2 = const Symbol(3);
 var s3 = const Symbol();
 var s4 = const Symbol('x', 'y');
-var s5 = const Symbol('x', foo: 'x');''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+var s5 = const Symbol('x', foo: 'x');
+''', [
       CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
       CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
       StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE,
@@ -5807,44 +4348,31 @@
       CompileTimeErrorCode.EXTRA_POSITIONAL_ARGUMENTS,
       CompileTimeErrorCode.UNDEFINED_NAMED_PARAMETER
     ]);
-    verify([source]);
   }
 
   test_test_fieldInitializerOutsideConstructor_topLevelFunction() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f(this.x(y)) {}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source,
-        usingFastaParser
-            ? [CompileTimeErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR]
-            : [
-                ParserErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR,
-                CompileTimeErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR
-              ]);
-    verify([source]);
+''', [CompileTimeErrorCode.FIELD_INITIALIZER_OUTSIDE_CONSTRUCTOR]);
   }
 
   test_typeAliasCannotReferenceItself_11987() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 typedef void F(List<G> l);
 typedef void G(List<F> l);
 main() {
   F foo(G g) => g;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+}
+''', [
       CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF,
       CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF
     ]);
-    verify([source]);
   }
 
   test_typeAliasCannotReferenceItself_19459() async {
     // A complex example involving multiple classes.  This is legal, since
     // typedef F references itself only via a class.
-    Source source = addSource(r'''
+    await assertNoErrorsInCode(r'''
 class A<B, C> {}
 abstract class D {
   f(E e);
@@ -5852,289 +4380,232 @@
 abstract class E extends A<dynamic, F> {}
 typedef D F();
 ''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
   }
 
   test_typeAliasCannotReferenceItself_functionTypedParameter_returnType() async {
-    Source source = addSource("typedef A(A b());");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
-    verify([source]);
+    await assertErrorsInCode('''
+typedef A(A b());
+''', [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
   }
 
   test_typeAliasCannotReferenceItself_generic() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 typedef F = void Function(List<G> l);
 typedef G = void Function(List<F> l);
 main() {
   F foo(G g) => g;
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+''', [
       CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF,
       CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF
     ]);
-    verify([source]);
   }
 
   test_typeAliasCannotReferenceItself_parameterType_named() async {
-    Source source = addSource("typedef A({A a});");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
-    verify([source]);
+    await assertErrorsInCode('''
+typedef A({A a});
+''', [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
   }
 
   test_typeAliasCannotReferenceItself_parameterType_positional() async {
-    Source source = addSource("typedef A([A a]);");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
-    verify([source]);
+    await assertErrorsInCode('''
+typedef A([A a]);
+''', [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
   }
 
   test_typeAliasCannotReferenceItself_parameterType_required() async {
-    Source source = addSource("typedef A(A a);");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
-    verify([source]);
+    await assertErrorsInCode('''
+typedef A(A a);
+''', [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
   }
 
   test_typeAliasCannotReferenceItself_parameterType_typeArgument() async {
-    Source source = addSource("typedef A(List<A> a);");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
-    verify([source]);
+    await assertErrorsInCode('''
+typedef A(List<A> a);
+''', [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
   }
 
   test_typeAliasCannotReferenceItself_returnClass_withTypeAlias() async {
     // A typedef is allowed to indirectly reference itself via a class.
-    Source source = addSource(r'''
+    await assertNoErrorsInCode(r'''
 typedef C A();
 typedef A B();
 class C {
   B a;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
+}
+''');
   }
 
   test_typeAliasCannotReferenceItself_returnType() async {
-    Source source = addSource("typedef A A();");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
-    verify([source]);
+    await assertErrorsInCode('''
+typedef A A();
+''', [CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF]);
   }
 
   test_typeAliasCannotReferenceItself_returnType_indirect() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 typedef B A();
-typedef A B();''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+typedef A B();
+''', [
       CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF,
       CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF
     ]);
-    verify([source]);
   }
 
   test_typeAliasCannotReferenceItself_typeVariableBounds() async {
-    Source source = addSource("typedef A<T extends A<int>>();");
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+    await assertErrorsInCode('''
+typedef A<T extends A<int>>();
+''', [
       CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF,
       StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
     ]);
-    verify([source]);
   }
 
   test_typeArgumentNotMatchingBounds_const() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class B {}
 class G<E extends A> {
   const G();
 }
-f() { return const G<B>(); }''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-    verify([source]);
+f() { return const G<B>(); }
+''', [CompileTimeErrorCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
   }
 
   test_typedef_infiniteParameterBoundCycle() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 typedef F<X extends F> = F Function();
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+''', [
       CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF,
       StrongModeCode.NOT_INSTANTIATED_BOUND,
     ]);
-    verify([source]);
   }
 
   test_undefinedAnnotation_unresolved_identifier() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 @unresolved
 main() {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.UNDEFINED_ANNOTATION]);
+}
+''', [CompileTimeErrorCode.UNDEFINED_ANNOTATION]);
   }
 
   test_undefinedAnnotation_unresolved_invocation() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 @Unresolved()
 main() {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.UNDEFINED_ANNOTATION]);
+}
+''', [CompileTimeErrorCode.UNDEFINED_ANNOTATION]);
   }
 
   test_undefinedAnnotation_unresolved_prefixedIdentifier() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 import 'dart:math' as p;
 @p.unresolved
 main() {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.UNDEFINED_ANNOTATION]);
+}
+''', [CompileTimeErrorCode.UNDEFINED_ANNOTATION]);
   }
 
   test_undefinedAnnotation_useLibraryScope() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 @foo
 class A {
   static const foo = null;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.UNDEFINED_ANNOTATION]);
+}
+''', [CompileTimeErrorCode.UNDEFINED_ANNOTATION]);
   }
 
   test_undefinedClass_const() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f() {
   return const A();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.UNDEFINED_CLASS]);
-    verify([source]);
+}
+''', [StaticWarningCode.UNDEFINED_CLASS]);
   }
 
   test_undefinedConstructorInInitializer_explicit_named() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {}
 class B extends A {
   B() : super.named();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER]);
-    // no verify(), "super.named()" is not resolved
+}
+''', [CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER],
+        verify: false);
   }
 
   test_undefinedConstructorInInitializer_explicit_unnamed() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A.named() {}
 }
 class B extends A {
   B() : super();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT]);
   }
 
   test_undefinedConstructorInInitializer_implicit() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   A.named() {}
 }
 class B extends A {
   B();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT]);
   }
 
   test_undefinedNamedParameter() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   const A();
 }
 main() {
   const A(p: 0);
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.UNDEFINED_NAMED_PARAMETER]);
-    // no verify(), 'p' is not resolved
+}
+''', [CompileTimeErrorCode.UNDEFINED_NAMED_PARAMETER]);
   }
 
   test_uriDoesNotExist_export() async {
-    Source source = addSource("export 'unknown.dart';");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
+    await assertErrorsInCode('''
+export 'unknown.dart';
+''', [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
   }
 
   test_uriDoesNotExist_import() async {
-    Source source = addSource("import 'unknown.dart';");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
+    await assertErrorsInCode('''
+import 'unknown.dart';
+''', [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
   }
 
   test_uriDoesNotExist_import_appears_after_deleting_target() async {
-    Source test = addSource("import 'target.dart';");
-    Source target = addNamedSource("/target.dart", "");
+    Source target = addNamedSource("/target.dart", '''
+''');
+    Source test = addSource('''
+import 'target.dart';
+''');
     await computeAnalysisResult(test);
     assertErrors(test, [HintCode.UNUSED_IMPORT]);
 
     // Remove the overlay in the same way as AnalysisServer.
     deleteFile(target.fullName);
-    if (enableNewAnalysisDriver) {
-      driver.removeFile(target.fullName);
-    } else {
-      analysisContext2.setContents(target, null);
-      ChangeSet changeSet = new ChangeSet()..removedSource(target);
-      analysisContext2.applyChanges(changeSet);
-    }
+    driver.removeFile(target.fullName);
 
     await computeAnalysisResult(test);
     assertErrors(test, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
   }
 
   test_uriDoesNotExist_import_disappears_when_fixed() async {
-    Source source = addSource("import 'target.dart';");
+    Source source = addSource('''
+import 'target.dart';
+''');
     await computeAnalysisResult(source);
     assertErrors(source, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
 
     String targetPath = convertPath('/target.dart');
-    if (enableNewAnalysisDriver) {
-      // Add an overlay in the same way as AnalysisServer.
-      fileContentOverlay[targetPath] = '';
-      driver.changeFile(targetPath);
-    } else {
-      // Check that the file is represented as missing.
-      Source target = analysisContext2.getSourcesWithFullName(targetPath).first;
-      expect(analysisContext2.getModificationStamp(target), -1);
-
-      // Add an overlay in the same way as AnalysisServer.
-      analysisContext2
-        ..setContents(target, "")
-        ..handleContentsChanged(target, null, "", true);
-    }
+    // Add an overlay in the same way as AnalysisServer.
+    fileContentOverlay[targetPath] = '';
+    driver.changeFile(targetPath);
 
     // Make sure the error goes away.
     await computeAnalysisResult(source);
@@ -6142,311 +4613,232 @@
   }
 
   test_uriDoesNotExist_part() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 library lib;
-part 'unknown.dart';''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
+part 'unknown.dart';
+''', [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
   }
 
   test_uriWithInterpolation_constant() async {
-    Source source = addSource("import 'stuff_\$platform.dart';");
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+    await assertErrorsInCode('''
+import 'stuff_\$platform.dart';
+''', [
       CompileTimeErrorCode.URI_WITH_INTERPOLATION,
       StaticWarningCode.UNDEFINED_IDENTIFIER
     ]);
-    // We cannot verify resolution with an unresolvable
-    // URI: 'stuff_$platform.dart'
   }
 
   test_uriWithInterpolation_nonConstant() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 library lib;
-part '${'a'}.dart';''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.URI_WITH_INTERPOLATION]);
-    // We cannot verify resolution with an unresolvable URI: '${'a'}.dart'
+part '${'a'}.dart';
+''', [CompileTimeErrorCode.URI_WITH_INTERPOLATION]);
   }
 
   test_wrongNumberOfParametersForOperator1() async {
-    await _check_wrongNumberOfParametersForOperator1("<");
-    await _check_wrongNumberOfParametersForOperator1(">");
-    await _check_wrongNumberOfParametersForOperator1("<=");
-    await _check_wrongNumberOfParametersForOperator1(">=");
-    await _check_wrongNumberOfParametersForOperator1("+");
-    await _check_wrongNumberOfParametersForOperator1("/");
-    await _check_wrongNumberOfParametersForOperator1("~/");
-    await _check_wrongNumberOfParametersForOperator1("*");
-    await _check_wrongNumberOfParametersForOperator1("%");
-    await _check_wrongNumberOfParametersForOperator1("|");
-    await _check_wrongNumberOfParametersForOperator1("^");
-    await _check_wrongNumberOfParametersForOperator1("&");
-    await _check_wrongNumberOfParametersForOperator1("<<");
-    await _check_wrongNumberOfParametersForOperator1(">>");
-    await _check_wrongNumberOfParametersForOperator1("[]");
+    await _check_wrongNumberOfParametersForOperator1('<');
+    await _check_wrongNumberOfParametersForOperator1('>');
+    await _check_wrongNumberOfParametersForOperator1('<=');
+    await _check_wrongNumberOfParametersForOperator1('>=');
+    await _check_wrongNumberOfParametersForOperator1('+');
+    await _check_wrongNumberOfParametersForOperator1('/');
+    await _check_wrongNumberOfParametersForOperator1('~/');
+    await _check_wrongNumberOfParametersForOperator1('*');
+    await _check_wrongNumberOfParametersForOperator1('%');
+    await _check_wrongNumberOfParametersForOperator1('|');
+    await _check_wrongNumberOfParametersForOperator1('^');
+    await _check_wrongNumberOfParametersForOperator1('&');
+    await _check_wrongNumberOfParametersForOperator1('<<');
+    await _check_wrongNumberOfParametersForOperator1('>>');
+    await _check_wrongNumberOfParametersForOperator1('[]');
   }
 
   test_wrongNumberOfParametersForOperator_minus() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   operator -(a, b) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR_MINUS]);
   }
 
   test_wrongNumberOfParametersForOperator_tilde() async {
-    await _check_wrongNumberOfParametersForOperator("~", "a");
-    await _check_wrongNumberOfParametersForOperator("~", "a, b");
+    await _check_wrongNumberOfParametersForOperator('~', 'a');
+    await _check_wrongNumberOfParametersForOperator('~', 'a, b');
   }
 
   test_wrongNumberOfParametersForSetter_function_named() async {
-    Source source = addSource("set x({p}) {}");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
-    verify([source]);
+    await assertErrorsInCode('''
+set x({p}) {}
+''', [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
   }
 
   test_wrongNumberOfParametersForSetter_function_optional() async {
-    Source source = addSource("set x([p]) {}");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
-    verify([source]);
+    await assertErrorsInCode('''
+set x([p]) {}
+''', [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
   }
 
   test_wrongNumberOfParametersForSetter_function_tooFew() async {
-    Source source = addSource("set x() {}");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
-    verify([source]);
+    await assertErrorsInCode('''
+set x() {}
+''', [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
   }
 
   test_wrongNumberOfParametersForSetter_function_tooMany() async {
-    Source source = addSource("set x(a, b) {}");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
-    verify([source]);
+    await assertErrorsInCode('''
+set x(a, b) {}
+''', [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
   }
 
   test_wrongNumberOfParametersForSetter_method_named() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   set x({p}) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
   }
 
   test_wrongNumberOfParametersForSetter_method_optional() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   set x([p]) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
   }
 
   test_wrongNumberOfParametersForSetter_method_tooFew() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   set x() {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
   }
 
   test_wrongNumberOfParametersForSetter_method_tooMany() async {
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 class A {
   set x(a, b) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER]);
   }
 
   test_yield_used_as_identifier_in_async_method() async {
-    Source source = addSource('''
+    await assertErrorsInCode('''
 f() async {
   var yield = 1;
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
   }
 
   test_yield_used_as_identifier_in_async_star_method() async {
-    Source source = addSource('''
+    await assertErrorsInCode('''
 f() async* {
   var yield = 1;
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
   }
 
   test_yield_used_as_identifier_in_sync_star_method() async {
-    Source source = addSource('''
+    await assertErrorsInCode('''
 f() sync* {
   var yield = 1;
 }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
-    verify([source]);
+''', [ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER]);
   }
 
   test_yieldEachInNonGenerator_async() async {
     // TODO(brianwilkerson) We are currently parsing the yield statement as a
     // binary expression.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f() async {
   yield* 0;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.YIELD_EACH_IN_NON_GENERATOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.YIELD_EACH_IN_NON_GENERATOR]);
   }
 
   test_yieldEachInNonGenerator_sync() async {
     // TODO(brianwilkerson) We are currently parsing the yield statement as a
     // binary expression.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f() {
   yield* 0;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.YIELD_IN_NON_GENERATOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.YIELD_IN_NON_GENERATOR]);
   }
 
   test_yieldInNonGenerator_async() async {
     // TODO(brianwilkerson) We are currently trying to parse the yield statement
     // as a binary expression.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f() async {
   yield 0;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.YIELD_IN_NON_GENERATOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.YIELD_IN_NON_GENERATOR]);
   }
 
   test_yieldInNonGenerator_sync() async {
     // TODO(brianwilkerson) We are currently trying to parse the yield statement
     // as a binary expression.
-    Source source = addSource(r'''
+    await assertErrorsInCode(r'''
 f() {
   yield 0;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.YIELD_EACH_IN_NON_GENERATOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.YIELD_EACH_IN_NON_GENERATOR]);
   }
 
   Future<void> _check_constEvalThrowsException_binary_null(
       String expr, bool resolved) async {
-    Source source = addSource("const C = $expr;");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]);
-    if (resolved) {
-      verify([source]);
-    }
+    await assertErrorsInCode('''
+const C = $expr;
+''', [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION], verify: false);
   }
 
-  Future<void> _check_constEvalTypeBool_withParameter_binary(
-      String expr) async {
-    Source source = addSource('''
-class A {
-  final a;
-  const A(bool p) : a = $expr;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL,
-      StaticTypeWarningCode.NON_BOOL_OPERAND
-    ]);
-    verify([source]);
-  }
-
-  Future<void> _check_constEvalTypeBoolOrInt_withParameter_binary(
-      String expr) async {
-    Source source = addSource('''
-class A {
-  final a;
-  const A(int p) : a = $expr;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+  Future<void> _check_constEvalTypeBoolOrInt_binary(String expr) async {
+    await assertErrorsInCode('''
+const int a = 0;
+const _ = $expr;
+''', [
       CompileTimeErrorCode.CONST_EVAL_TYPE_BOOL_INT,
       StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
     ]);
-    verify([source]);
   }
 
-  Future<void> _check_constEvalTypeInt_withParameter_binary(String expr) async {
-    Source source = addSource('''
-class A {
-  final a;
-  const A(int p) : a = $expr;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+  Future<void> _check_constEvalTypeInt_binary(String expr) async {
+    await assertErrorsInCode('''
+const int a = 0;
+const _ = $expr;
+''', [
       CompileTimeErrorCode.CONST_EVAL_TYPE_INT,
       StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
     ]);
-    verify([source]);
   }
 
-  Future<void> _check_constEvalTypeNum_withParameter_binary(String expr) async {
-    Source source = addSource('''
-class A {
-  final a;
-  const A(num p) : a = $expr;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
+  Future<void> _check_constEvalTypeNum_binary(String expr) async {
+    await assertErrorsInCode('''
+const num a = 0;
+const _ = $expr;
+''', [
       CompileTimeErrorCode.CONST_EVAL_TYPE_NUM,
       StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
     ]);
-    verify([source]);
   }
 
   Future<void> _check_wrongNumberOfParametersForOperator(
       String name, String parameters) async {
-    Source source = addSource('''
+    await assertErrorsInCode('''
 class A {
   operator $name($parameters) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR]);
-    verify([source]);
+}
+''', [CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_OPERATOR]);
   }
 
   Future<void> _check_wrongNumberOfParametersForOperator1(String name) async {
-    await _check_wrongNumberOfParametersForOperator(name, "");
-    await _check_wrongNumberOfParametersForOperator(name, "a, b");
+    await _check_wrongNumberOfParametersForOperator(name, '');
+    await _check_wrongNumberOfParametersForOperator(name, 'a, b');
   }
 
   Future<void> _privateCollisionInMixinApplicationTest(String testCode) async {
-    addNamedSource('/lib1.dart', '''
+    newFile('/lib1.dart', content: '''
 class A {
   int _x;
 }
@@ -6455,10 +4847,7 @@
   int _x;
 }
 ''');
-    Source source = addSource(testCode);
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.PRIVATE_COLLISION_IN_MIXIN_APPLICATION]);
-    verify([source]);
+    await assertErrorsInCode(testCode,
+        [CompileTimeErrorCode.PRIVATE_COLLISION_IN_MIXIN_APPLICATION]);
   }
 }
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
deleted file mode 100644
index 9c33cd5..0000000
--- a/pkg/analyzer/test/generated/compile_time_error_code_driver_test.dart
+++ /dev/null
@@ -1,623 +0,0 @@
-// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/src/dart/analysis/experiments.dart';
-import 'package:analyzer/src/dart/error/syntactic_errors.dart';
-import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import 'compile_time_error_code.dart';
-import 'resolver_test_case.dart';
-
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(CompileTimeErrorCodeTest_Driver);
-    defineReflectiveTests(ConstSetElementTypeImplementsEqualsTest);
-    defineReflectiveTests(ControlFlowCollectionsTest);
-    defineReflectiveTests(InvalidTypeArgumentInConstSetTest);
-    defineReflectiveTests(NonConstSetElementFromDeferredLibraryTest);
-    defineReflectiveTests(NonConstSetElementTest);
-  });
-}
-
-@reflectiveTest
-class CompileTimeErrorCodeTest_Driver extends CompileTimeErrorCodeTestBase {
-  @override
-  bool get enableNewAnalysisDriver => true;
-
-  @override
-  @failingTest
-  test_awaitInWrongContext_sync() {
-    return super.test_awaitInWrongContext_sync();
-  }
-
-  @override
-  @failingTest
-  test_constEvalThrowsException() {
-    return super.test_constEvalThrowsException();
-  }
-
-  @override
-  @failingTest
-  test_invalidIdentifierInAsync_async() {
-    return super.test_invalidIdentifierInAsync_async();
-  }
-
-  @override
-  @failingTest
-  test_invalidIdentifierInAsync_await() {
-    return super.test_invalidIdentifierInAsync_await();
-  }
-
-  @override
-  @failingTest
-  test_invalidIdentifierInAsync_yield() {
-    return super.test_invalidIdentifierInAsync_yield();
-  }
-
-  @override
-  @failingTest
-  test_mixinOfNonClass() {
-    return super.test_mixinOfNonClass();
-  }
-
-  @override
-  @failingTest
-  test_objectCannotExtendAnotherClass() {
-    return super.test_objectCannotExtendAnotherClass();
-  }
-
-  @override
-  @failingTest
-  test_superInitializerInObject() {
-    return super.test_superInitializerInObject();
-  }
-
-  @override
-  @failingTest
-  test_yieldEachInNonGenerator_async() {
-    return super.test_yieldEachInNonGenerator_async();
-  }
-
-  @override
-  @failingTest
-  test_yieldEachInNonGenerator_sync() {
-    return super.test_yieldEachInNonGenerator_sync();
-  }
-
-  @override
-  @failingTest
-  test_yieldInNonGenerator_async() {
-    return super.test_yieldInNonGenerator_async();
-  }
-
-  @override
-  @failingTest
-  test_yieldInNonGenerator_sync() {
-    return super.test_yieldInNonGenerator_sync();
-  }
-}
-
-@reflectiveTest
-class ConstSetElementTypeImplementsEqualsTest extends ResolverTestCase {
-  @override
-  List<String> get enabledExperiments => [EnableString.set_literals];
-
-  @override
-  bool get enableNewAnalysisDriver => true;
-
-  test_constField() async {
-    Source source = addSource(r'''
-class A {
-  static const a = const A();
-  const A();
-  operator ==(other) => false;
-}
-main() {
-  const {A.a};
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS]);
-    verify([source]);
-  }
-
-  test_direct() async {
-    Source source = addSource(r'''
-class A {
-  const A();
-  operator ==(other) => false;
-}
-main() {
-  const {const A()};
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS]);
-    verify([source]);
-  }
-
-  test_dynamic() async {
-    // Note: static type of B.a is "dynamic", but actual type of the const
-    // object is A.  We need to make sure we examine the actual type when
-    // deciding whether there is a problem with operator==.
-    Source source = addSource(r'''
-class A {
-  const A();
-  operator ==(other) => false;
-}
-class B {
-  static const a = const A();
-}
-main() {
-  const {B.a};
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS]);
-    verify([source]);
-  }
-
-  test_factory() async {
-    Source source = addSource(r'''
-class A { const factory A() = B; }
-
-class B implements A {
-  const B();
-
-  operator ==(o) => true;
-}
-
-main() {
-  var m = const {const A()};
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS]);
-    verify([source]);
-  }
-
-  test_super() async {
-    Source source = addSource(r'''
-class A {
-  const A();
-  operator ==(other) => false;
-}
-class B extends A {
-  const B();
-}
-main() {
-  const {const B()};
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS]);
-    verify([source]);
-  }
-}
-
-@reflectiveTest
-class ControlFlowCollectionsTest extends ResolverTestCase {
-  @override
-  List<String> get enabledExperiments =>
-      [EnableString.control_flow_collections, EnableString.set_literals];
-
-  @override
-  bool get enableNewAnalysisDriver => true;
-
-  test_awaitForIn_declaredVariableWrongType() async {
-    await assertErrorsInCode('''
-import 'dart:async';
-f() async {
-  Stream<String> stream;
-  await for (int i in stream) {}
-}
-''', [StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE]);
-  }
-
-  test_awaitForIn_existingVariableWrongType() async {
-    await assertErrorsInCode('''
-import 'dart:async';
-f() async {
-  Stream<String> stream;
-  int i;
-  await for (i in stream) {}
-}
-''', [StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE]);
-  }
-
-  test_awaitForIn_notStream() async {
-    await assertErrorsInCode('''
-f() async {
-  await for (var i in true) {}
-}
-''', [StaticTypeWarningCode.FOR_IN_OF_INVALID_TYPE]);
-  }
-
-  test_duplicateDefinition_for_initializers() async {
-    Source source = addSource(r'''
-f() {
-  for (int i = 0, i = 0; i < 5;) {}
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
-    verify([source]);
-  }
-
-  test_expectedOneListTypeArgument() async {
-    await assertErrorsInCode(r'''
-main() {
-  <int, int>[];
-}''', [StaticTypeWarningCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS]);
-  }
-
-  test_expectedOneSetTypeArgument() async {
-    await assertErrorsInCode(r'''
-main() {
-  <int, int, int>{2, 3};
-}''', [StaticTypeWarningCode.EXPECTED_ONE_SET_TYPE_ARGUMENTS]);
-  }
-
-  test_expectedTwoMapTypeArguments_three() async {
-    await assertErrorsInCode(r'''
-main() {
-  <int, int, int>{};
-}''', [StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS]);
-  }
-
-  test_forIn_declaredVariableWrongType() async {
-    await assertErrorsInCode('''
-f() {
-  for (int i in <String>[]) {}
-}
-''', [StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE]);
-  }
-
-  test_forIn_existingVariableWrongType() async {
-    await assertErrorsInCode('''
-f() {
-  int i;
-  for (i in <String>[]) {}
-}
-''', [StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE]);
-  }
-
-  test_forIn_notIterable() async {
-    await assertErrorsInCode('''
-f() {
-  for (var i in true) {}
-}
-''', [StaticTypeWarningCode.FOR_IN_OF_INVALID_TYPE]);
-  }
-
-  test_forIn_typeBoundBad() async {
-    await assertErrorsInCode('''
-class Foo<T extends Iterable<int>> {
-  void method(T iterable) {
-    for (String i in iterable) {}
-  }
-}
-''', [StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE]);
-  }
-
-  test_forInWithConstVariable_forEach_identifier() async {
-    Source source = addSource(r'''
-f() {
-  const x = 0;
-  for (x in [0, 1, 2]) {}
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.FOR_IN_WITH_CONST_VARIABLE]);
-    verify([source]);
-  }
-
-  test_forInWithConstVariable_forEach_loopVariable() async {
-    Source source = addSource(r'''
-f() {
-  for (const x in [0, 1, 2]) {}
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.FOR_IN_WITH_CONST_VARIABLE]);
-    verify([source]);
-  }
-
-  test_generalizedVoid_useOfInForeachIterableError() async {
-    Source source = addSource(r'''
-void main() {
-  void x;
-  for (var v in x) {}
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
-  }
-
-  test_generalizedVoid_useOfVoidInForeachVariableError() async {
-    Source source = addSource(r'''
-void main() {
-  void x;
-  var y;
-  for (y in x) {}
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
-  }
-
-  test_invalidTypeArgumentInConstList() async {
-    Source source = addSource(r'''
-class A<E> {
-  m() {
-    return const <E>[];
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_LIST]);
-    verify([source]);
-  }
-
-  test_invalidTypeArgumentInConstMap_key() async {
-    Source source = addSource(r'''
-class A<E> {
-  m() {
-    return const <E, String>{};
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_MAP]);
-    verify([source]);
-  }
-
-  test_invalidTypeArgumentInConstMap_value() async {
-    Source source = addSource(r'''
-class A<E> {
-  m() {
-    return const <String, E>{};
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_MAP]);
-    verify([source]);
-  }
-
-  test_invalidTypeArgumentInConstSet_class() async {
-    Source source = addSource(r'''
-class A<E> {
-  m() {
-    return const <E>{};
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_SET]);
-    verify([source]);
-  }
-
-  test_listElementTypeNotAssignable_const() async {
-    Source source = addSource("var v = const <String>[42];");
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CheckedModeCompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE]);
-    verify([source]);
-  }
-
-  test_listElementTypeNotAssignable_nonConst() async {
-    Source source = addSource("var v = <String> [42];");
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE]);
-    verify([source]);
-  }
-
-  test_mapKeyTypeNotAssignable_const() async {
-    Source source = addSource("var v = const <String, int >{1 : 2};");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CheckedModeCompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE]);
-    verify([source]);
-  }
-
-  test_mapKeyTypeNotAssignable_nonConst() async {
-    Source source = addSource("var v = <String, int >{1 : 2};");
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE]);
-    verify([source]);
-  }
-
-  test_mapValueTypeNotAssignable_const() async {
-    Source source = addSource("var v = const <String, String>{'a' : 2};");
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CheckedModeCompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE]);
-    verify([source]);
-  }
-
-  test_mapValueTypeNotAssignable_nonConst() async {
-    Source source = addSource("var v = <String, String>{'a' : 2};");
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE]);
-    verify([source]);
-  }
-
-  test_nonBoolCondition_for_declaration() async {
-    // https://github.com/dart-lang/sdk/issues/24713
-    await assertErrorsInCode(r'''
-f() {
-  for (int i = 0; 3;) {}
-}
-''', [StaticTypeWarningCode.NON_BOOL_CONDITION]);
-  }
-
-  test_nonBoolCondition_for_expression() async {
-    // https://github.com/dart-lang/sdk/issues/24713
-    await assertErrorsInCode(r'''
-f() {
-  int i;
-  for (i = 0; 3;) {}
-}''', [StaticTypeWarningCode.NON_BOOL_CONDITION]);
-  }
-
-  test_nonConstMapAsExpressionStatement_begin() async {
-    Source source = addSource(r'''
-f() {
-  {'a' : 0, 'b' : 1}.length;
-}''');
-    await computeAnalysisResult(source);
-    // TODO(danrubel) Fasta is not recovering.
-    assertErrors(source, [
-      ParserErrorCode.UNEXPECTED_TOKEN,
-      ParserErrorCode.UNEXPECTED_TOKEN,
-      ParserErrorCode.UNEXPECTED_TOKEN,
-      ParserErrorCode.EXPECTED_TOKEN,
-      ParserErrorCode.EXPECTED_TOKEN,
-      ParserErrorCode.EXPECTED_TOKEN,
-      ParserErrorCode.EXPECTED_TOKEN,
-      ParserErrorCode.EXPECTED_TOKEN,
-      ParserErrorCode.EXPECTED_TOKEN,
-      ParserErrorCode.EXPECTED_TOKEN,
-      ParserErrorCode.MISSING_IDENTIFIER,
-      ParserErrorCode.MISSING_IDENTIFIER,
-      ParserErrorCode.MISSING_IDENTIFIER,
-      ParserErrorCode.MISSING_IDENTIFIER
-    ]);
-//    assertErrors(
-//        source, [CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT]);
-    verify([source]);
-  }
-
-  test_nonConstMapAsExpressionStatement_only() async {
-    Source source = addSource(r'''
-f() {
-  {'a' : 0, 'b' : 1};
-}''');
-    await computeAnalysisResult(source);
-    // TODO(danrubel) Fasta is not recovering.
-    assertErrors(source, [
-      ParserErrorCode.UNEXPECTED_TOKEN,
-      ParserErrorCode.UNEXPECTED_TOKEN,
-      ParserErrorCode.UNEXPECTED_TOKEN,
-      ParserErrorCode.EXPECTED_TOKEN,
-      ParserErrorCode.EXPECTED_TOKEN,
-      ParserErrorCode.EXPECTED_TOKEN,
-      ParserErrorCode.EXPECTED_TOKEN,
-      ParserErrorCode.EXPECTED_TOKEN,
-      ParserErrorCode.EXPECTED_TOKEN,
-      ParserErrorCode.EXPECTED_TOKEN,
-      ParserErrorCode.MISSING_IDENTIFIER,
-      ParserErrorCode.MISSING_IDENTIFIER,
-      ParserErrorCode.MISSING_IDENTIFIER
-    ]);
-//    assertErrors(
-//        source, [CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT]);
-    verify([source]);
-  }
-
-  test_setElementTypeNotAssignable_const() async {
-    Source source = addSource("var v = const <String>{42};");
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CheckedModeCompileTimeErrorCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE]);
-    verify([source]);
-  }
-
-  test_setElementTypeNotAssignable_nonConst() async {
-    Source source = addSource("var v = <String>{42};");
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE]);
-    verify([source]);
-  }
-}
-
-@reflectiveTest
-class InvalidTypeArgumentInConstSetTest extends ResolverTestCase {
-  @override
-  List<String> get enabledExperiments => [EnableString.set_literals];
-
-  @override
-  bool get enableNewAnalysisDriver => true;
-
-  test_class() async {
-    Source source = addSource(r'''
-class A<E> {
-  m() {
-    return const <E>{};
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_SET]);
-    verify([source]);
-  }
-}
-
-@reflectiveTest
-class NonConstSetElementFromDeferredLibraryTest extends ResolverTestCase {
-  @override
-  List<String> get enabledExperiments => [EnableString.set_literals];
-
-  @override
-  bool get enableNewAnalysisDriver => true;
-
-  test_topLevelVariable_immediate() async {
-    await resolveWithErrors(<String>[
-      r'''
-library lib1;
-const int c = 1;''',
-      r'''
-library root;
-import 'lib1.dart' deferred as a;
-f() {
-  return const {a.c};
-}'''
-    ], [
-      CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY
-    ]);
-  }
-
-  test_topLevelVariable_nested() async {
-    await resolveWithErrors(<String>[
-      r'''
-library lib1;
-const int c = 1;''',
-      r'''
-library root;
-import 'lib1.dart' deferred as a;
-f() {
-  return const {a.c + 1};
-}'''
-    ], [
-      CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY
-    ]);
-  }
-}
-
-@reflectiveTest
-class NonConstSetElementTest extends ResolverTestCase {
-  @override
-  List<String> get enabledExperiments => [EnableString.set_literals];
-
-  @override
-  bool get enableNewAnalysisDriver => true;
-
-  test_parameter() async {
-    Source source = addSource(r'''
-f(a) {
-  return const {a};
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
-    verify([source]);
-  }
-}
diff --git a/pkg/analyzer/test/generated/compile_time_error_code_test.dart b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
new file mode 100644
index 0000000..f8b7ac6
--- /dev/null
+++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
@@ -0,0 +1,393 @@
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/dart/error/syntactic_errors.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../src/dart/resolution/driver_resolution.dart';
+import 'compile_time_error_code.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(CompileTimeErrorCodeTest);
+    defineReflectiveTests(CompileTimeErrorCodeTest_WithUIAsCode);
+    defineReflectiveTests(ControlFlowCollectionsTest);
+    defineReflectiveTests(InvalidTypeArgumentInConstSetTest);
+  });
+}
+
+@reflectiveTest
+class CompileTimeErrorCodeTest extends CompileTimeErrorCodeTestBase {
+  @override
+  @failingTest
+  test_awaitInWrongContext_sync() {
+    return super.test_awaitInWrongContext_sync();
+  }
+
+  @override
+  @failingTest
+  test_constEvalThrowsException() {
+    return super.test_constEvalThrowsException();
+  }
+
+  @override
+  @failingTest
+  test_mixinOfNonClass() {
+    return super.test_mixinOfNonClass();
+  }
+
+  @override
+  @failingTest
+  test_objectCannotExtendAnotherClass() {
+    return super.test_objectCannotExtendAnotherClass();
+  }
+
+  @override
+  @failingTest
+  test_superInitializerInObject() {
+    return super.test_superInitializerInObject();
+  }
+
+  @override
+  @failingTest
+  test_yieldEachInNonGenerator_async() {
+    return super.test_yieldEachInNonGenerator_async();
+  }
+
+  @override
+  @failingTest
+  test_yieldEachInNonGenerator_sync() {
+    return super.test_yieldEachInNonGenerator_sync();
+  }
+
+  @override
+  @failingTest
+  test_yieldInNonGenerator_async() {
+    return super.test_yieldInNonGenerator_async();
+  }
+
+  @override
+  @failingTest
+  test_yieldInNonGenerator_sync() {
+    return super.test_yieldInNonGenerator_sync();
+  }
+}
+
+@reflectiveTest
+class CompileTimeErrorCodeTest_WithUIAsCode extends DriverResolutionTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections
+    ];
+
+  test_defaultValueInFunctionTypeAlias_new_named() async {
+    // This test used to fail with UI as code enabled. Test the fix here.
+    await assertErrorCodesInCode('''
+typedef F = int Function({Map<String, String> m: const {}});
+''', [
+      ParserErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE,
+    ]);
+  }
+
+  test_defaultValueInFunctionTypeAlias_new_named_ambiguous() async {
+    // Test that the strong checker does not crash when given an ambiguous
+    // set or map literal.
+    await assertErrorCodesInCode('''
+typedef F = int Function({Object m: const {1, 2: 3}});
+''', [
+      ParserErrorCode.DEFAULT_VALUE_IN_FUNCTION_TYPE,
+      CompileTimeErrorCode.AMBIGUOUS_SET_OR_MAP_LITERAL_BOTH,
+    ]);
+  }
+}
+
+@reflectiveTest
+class ControlFlowCollectionsTest extends DriverResolutionTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [EnableString.control_flow_collections];
+
+  test_awaitForIn_declaredVariableWrongType() async {
+    await assertErrorCodesInCode('''
+import 'dart:async';
+f() async {
+  Stream<String> stream;
+  await for (int i in stream) {}
+}
+''', [StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE]);
+  }
+
+  test_awaitForIn_existingVariableWrongType() async {
+    await assertErrorCodesInCode('''
+import 'dart:async';
+f() async {
+  Stream<String> stream;
+  int i;
+  await for (i in stream) {}
+}
+''', [StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE]);
+  }
+
+  test_awaitForIn_notStream() async {
+    await assertErrorCodesInCode('''
+f() async {
+  await for (var i in true) {}
+}
+''', [StaticTypeWarningCode.FOR_IN_OF_INVALID_TYPE]);
+  }
+
+  test_duplicateDefinition_for_initializers() async {
+    await assertErrorCodesInCode(r'''
+f() {
+  for (int i = 0, i = 0; i < 5;) {}
+}
+''', [CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+  }
+
+  test_expectedOneListTypeArgument() async {
+    await assertErrorCodesInCode(r'''
+main() {
+  <int, int>[];
+}''', [StaticTypeWarningCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS]);
+  }
+
+  test_expectedOneSetTypeArgument() async {
+    await assertErrorCodesInCode(r'''
+main() {
+  <int, int, int>{2, 3};
+}''', [StaticTypeWarningCode.EXPECTED_ONE_SET_TYPE_ARGUMENTS]);
+  }
+
+  test_expectedTwoMapTypeArguments_three_ambiguous() async {
+    // TODO(brianwilkerson) We probably need a new error code for "expected
+    //  either one or two type arguments" to handle the ambiguous case.
+    await assertErrorCodesInCode(r'''
+main() {
+  <int, int, int>{};
+}''', [StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS]);
+  }
+
+  test_expectedTwoMapTypeArguments_three_map() async {
+    await assertErrorCodesInCode(r'''
+main() {
+  <int, int, int>{1:2};
+}''', [StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS]);
+  }
+
+  test_forIn_declaredVariableWrongType() async {
+    await assertErrorCodesInCode('''
+f() {
+  for (int i in <String>[]) {}
+}
+''', [StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE]);
+  }
+
+  test_forIn_existingVariableWrongType() async {
+    await assertErrorCodesInCode('''
+f() {
+  int i;
+  for (i in <String>[]) {}
+}
+''', [StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE]);
+  }
+
+  test_forIn_notIterable() async {
+    await assertErrorCodesInCode('''
+f() {
+  for (var i in true) {}
+}
+''', [StaticTypeWarningCode.FOR_IN_OF_INVALID_TYPE]);
+  }
+
+  test_forIn_typeBoundBad() async {
+    await assertErrorCodesInCode('''
+class Foo<T extends Iterable<int>> {
+  void method(T iterable) {
+    for (String i in iterable) {}
+  }
+}
+''', [StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE]);
+  }
+
+  test_forInWithConstVariable_forEach_identifier() async {
+    await assertErrorCodesInCode(r'''
+f() {
+  const x = 0;
+  for (x in [0, 1, 2]) {}
+}
+''', [CompileTimeErrorCode.FOR_IN_WITH_CONST_VARIABLE]);
+  }
+
+  test_forInWithConstVariable_forEach_loopVariable() async {
+    await assertErrorCodesInCode(r'''
+f() {
+  for (const x in [0, 1, 2]) {}
+}
+''', [CompileTimeErrorCode.FOR_IN_WITH_CONST_VARIABLE]);
+  }
+
+  test_generalizedVoid_useOfInForeachIterableError() async {
+    await assertErrorCodesInCode(r'''
+void main() {
+  void x;
+  for (var v in x) {}
+}
+''', [StaticWarningCode.USE_OF_VOID_RESULT]);
+  }
+
+  test_generalizedVoid_useOfVoidInForeachVariableError() async {
+    await assertErrorCodesInCode(r'''
+void main() {
+  void x;
+  var y;
+  for (y in x) {}
+}
+''', [StaticWarningCode.USE_OF_VOID_RESULT]);
+  }
+
+  test_invalidTypeArgumentInConstList() async {
+    await assertErrorCodesInCode(r'''
+class A<E> {
+  m() {
+    return const <E>[];
+  }
+}
+''', [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_LIST]);
+  }
+
+  test_invalidTypeArgumentInConstMap_key() async {
+    await assertErrorCodesInCode(r'''
+class A<E> {
+  m() {
+    return const <E, String>{};
+  }
+}
+''', [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_MAP]);
+  }
+
+  test_invalidTypeArgumentInConstMap_value() async {
+    await assertErrorCodesInCode(r'''
+class A<E> {
+  m() {
+    return const <String, E>{};
+  }
+}
+''', [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_MAP]);
+  }
+
+  test_invalidTypeArgumentInConstSet_class() async {
+    await assertErrorCodesInCode(r'''
+class A<E> {
+  m() {
+    return const <E>{};
+  }
+}
+''', [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_SET]);
+  }
+
+  test_listElementTypeNotAssignable_const() async {
+    await assertErrorCodesInCode('''
+var v = const <String>[42];
+''', [StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE]);
+  }
+
+  test_mapValueTypeNotAssignable_const() async {
+    await assertErrorCodesInCode('''
+var v = const <String, String>{'a' : 2};
+''', [StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE]);
+  }
+
+  test_nonBoolCondition_for_declaration() async {
+    // https://github.com/dart-lang/sdk/issues/24713
+    await assertErrorCodesInCode(r'''
+f() {
+  for (int i = 0; 3;) {}
+}
+''', [StaticTypeWarningCode.NON_BOOL_CONDITION]);
+  }
+
+  test_nonBoolCondition_for_expression() async {
+    // https://github.com/dart-lang/sdk/issues/24713
+    await assertErrorCodesInCode(r'''
+f() {
+  int i;
+  for (i = 0; 3;) {}
+}''', [StaticTypeWarningCode.NON_BOOL_CONDITION]);
+  }
+
+  test_nonConstMapAsExpressionStatement_begin() async {
+    // TODO(danrubel) Fasta is not recovering well.
+    // Ideally we would produce a single diagnostic:
+    // CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT
+    await assertErrorCodesInCode(r'''
+f() {
+  {'a' : 0, 'b' : 1}.length;
+}
+''', [
+      ParserErrorCode.UNEXPECTED_TOKEN,
+      ParserErrorCode.UNEXPECTED_TOKEN,
+      ParserErrorCode.UNEXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.MISSING_IDENTIFIER,
+      ParserErrorCode.MISSING_IDENTIFIER,
+      ParserErrorCode.MISSING_IDENTIFIER,
+      ParserErrorCode.MISSING_IDENTIFIER
+    ]);
+  }
+
+  test_nonConstMapAsExpressionStatement_only() async {
+    // TODO(danrubel) Fasta is not recovering well.
+    // Ideally we would produce a single diagnostic:
+    // CompileTimeErrorCode.NON_CONST_MAP_AS_EXPRESSION_STATEMENT
+    await assertErrorCodesInCode(r'''
+f() {
+  {'a' : 0, 'b' : 1};
+}
+''', [
+      ParserErrorCode.UNEXPECTED_TOKEN,
+      ParserErrorCode.UNEXPECTED_TOKEN,
+      ParserErrorCode.UNEXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.EXPECTED_TOKEN,
+      ParserErrorCode.MISSING_IDENTIFIER,
+      ParserErrorCode.MISSING_IDENTIFIER,
+      ParserErrorCode.MISSING_IDENTIFIER
+    ]);
+  }
+
+  test_setElementTypeNotAssignable_const() async {
+    await assertErrorCodesInCode('''
+var v = const <String>{42};
+''', [StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE]);
+  }
+}
+
+@reflectiveTest
+class InvalidTypeArgumentInConstSetTest extends DriverResolutionTest {
+  test_class() async {
+    await assertErrorCodesInCode(r'''
+class A<E> {
+  m() {
+    return const <E>{};
+  }
+}
+''', [CompileTimeErrorCode.INVALID_TYPE_ARGUMENT_IN_CONST_SET]);
+  }
+}
diff --git a/pkg/analyzer/test/generated/constant_test.dart b/pkg/analyzer/test/generated/constant_test.dart
index d4e7df3..7d8db75 100644
--- a/pkg/analyzer/test/generated/constant_test.dart
+++ b/pkg/analyzer/test/generated/constant_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/generated/element_resolver_test.dart b/pkg/analyzer/test/generated/element_resolver_test.dart
index 4808365..8cb223e 100644
--- a/pkg/analyzer/test/generated/element_resolver_test.dart
+++ b/pkg/analyzer/test/generated/element_resolver_test.dart
@@ -12,6 +12,7 @@
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/inheritance_manager2.dart';
+import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/element_resolver.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/resolver.dart';
@@ -838,6 +839,32 @@
     _listener.assertNoErrors();
   }
 
+  @failingTest
+  test_visitPostfixExpression_bang() async {
+    InterfaceType numType = _typeProvider.numType;
+    SimpleIdentifier operand = AstTestFactory.identifier3("i");
+    operand.staticType = numType;
+    PostfixExpression expression =
+        AstTestFactory.postfixExpression(operand, TokenType.BANG);
+    // TODO(danrubel): fails with Unsupported operation
+    _resolveNode(expression);
+    _listener.assertErrorsWithCodes([StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+  }
+
+  @failingTest
+  test_visitPostfixExpression_bang_NNBD() async {
+    // TODO(danrubel): enable NNBD
+    InterfaceType numType = _typeProvider.numType;
+    SimpleIdentifier operand = AstTestFactory.identifier3("i");
+    operand.staticType = numType;
+    PostfixExpression expression =
+        AstTestFactory.postfixExpression(operand, TokenType.BANG);
+    _resolveNode(expression);
+    // TODO(danrubel): fails with Unsupported operation
+    expect(expression.staticElement, getMethod(numType, "!"));
+    _listener.assertNoErrors();
+  }
+
   test_visitPrefixedIdentifier_dynamic() async {
     DartType dynamicType = _typeProvider.dynamicType;
     SimpleIdentifier target = AstTestFactory.identifier3("a");
@@ -1257,9 +1284,6 @@
 @reflectiveTest
 class PreviewDart2Test extends ResolverTestCase {
   @override
-  bool get enableNewAnalysisDriver => true;
-
-  @override
   void setUp() {
     AnalysisOptionsImpl options = new AnalysisOptionsImpl();
     resetWith(options: options);
diff --git a/pkg/analyzer/test/generated/engine_test.dart b/pkg/analyzer/test/generated/engine_test.dart
index 8f80f48..dfd1476 100644
--- a/pkg/analyzer/test/generated/engine_test.dart
+++ b/pkg/analyzer/test/generated/engine_test.dart
@@ -1,25 +1,10 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'dart:async';
-
-import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/error/error.dart';
-import 'package:analyzer/src/cancelable_future.dart';
-import 'package:analyzer/src/context/builder.dart' show EmbedderYamlLocator;
-import 'package:analyzer/src/context/cache.dart';
-import 'package:analyzer/src/context/context.dart';
-import 'package:analyzer/src/context/source.dart';
-import 'package:analyzer/src/generated/constant.dart';
 import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/source_io.dart';
-import 'package:analyzer/src/plugin/resolver_provider.dart';
 import 'package:analyzer/src/string_source.dart';
-import 'package:analyzer/src/task/api/model.dart';
-import 'package:html/dom.dart' show Document;
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -78,55 +63,6 @@
   }
 }
 
-/**
- * A listener used to gather the [ImplicitAnalysisEvent]s that are produced
- * during analysis.
- */
-class AnalyzedSourcesListener {
-  /**
-   * The events that have been gathered.
-   */
-  List<ImplicitAnalysisEvent> actualEvents = <ImplicitAnalysisEvent>[];
-
-  /**
-   * The sources that are being implicitly analyzed.
-   */
-  List<Source> analyzedSources = <Source>[];
-
-  /**
-   * Assert that the given source is currently being implicitly analyzed.
-   */
-  void expectAnalyzed(Source source) {
-    expect(analyzedSources, contains(source));
-  }
-
-  /**
-   * Assert that the given source is not currently being implicitly analyzed.
-   */
-  void expectNotAnalyzed(Source source) {
-    expect(analyzedSources, isNot(contains(source)));
-  }
-
-  /**
-   * Record that the given event was produced.
-   */
-  void onData(ImplicitAnalysisEvent event) {
-    actualEvents.add(event);
-    if (event.isAnalyzed) {
-      analyzedSources.add(event.source);
-    } else {
-      analyzedSources.remove(event.source);
-    }
-  }
-}
-
-class MockSourceFactory extends SourceFactoryImpl {
-  MockSourceFactory() : super([]);
-  Source resolveUri(Source containingSource, String containedUri) {
-    throw new UnimplementedError();
-  }
-}
-
 @reflectiveTest
 class SourcesChangedEventTest {
   void test_added() {
@@ -197,492 +133,3 @@
     expect(event.wereSourcesRemoved, wereSourcesRemoved);
   }
 }
-
-class SourcesChangedListener {
-  List<SourcesChangedEvent> actualEvents = [];
-
-  void assertEvent(
-      {bool wereSourcesAdded: false,
-      List<Source> changedSources: const <Source>[],
-      bool wereSourcesRemovedOrDeleted: false}) {
-    if (actualEvents.isEmpty) {
-      fail('Expected event but found none');
-    }
-    SourcesChangedEvent actual = actualEvents.removeAt(0);
-    SourcesChangedEventTest.assertEvent(actual,
-        wereSourcesAdded: wereSourcesAdded,
-        changedSources: changedSources,
-        wereSourcesRemoved: wereSourcesRemovedOrDeleted);
-  }
-
-  void assertNoMoreEvents() {
-    expect(actualEvents, []);
-  }
-
-  void onData(SourcesChangedEvent event) {
-    actualEvents.add(event);
-  }
-}
-
-/**
- * An analysis context in which almost every method will cause a test to fail
- * when invoked.
- */
-class TestAnalysisContext implements InternalAnalysisContext {
-  @override
-  final ReentrantSynchronousStream<InvalidatedResult> onResultInvalidated =
-      new ReentrantSynchronousStream<InvalidatedResult>();
-
-  @override
-  ResultProvider resultProvider;
-
-  @override
-  AnalysisCache get analysisCache {
-    fail("Unexpected invocation of analysisCache");
-  }
-
-  @override
-  AnalysisOptions get analysisOptions {
-    fail("Unexpected invocation of getAnalysisOptions");
-  }
-
-  @override
-  void set analysisOptions(AnalysisOptions options) {
-    fail("Unexpected invocation of setAnalysisOptions");
-  }
-
-  @override
-  void set analysisPriorityOrder(List<Source> sources) {
-    fail("Unexpected invocation of setAnalysisPriorityOrder");
-  }
-
-  @override
-  CacheConsistencyValidator get cacheConsistencyValidator {
-    fail("Unexpected invocation of cacheConsistencyValidator");
-  }
-
-  @override
-  set contentCache(ContentCache value) {
-    fail("Unexpected invocation of setContentCache");
-  }
-
-  @override
-  DeclaredVariables get declaredVariables {
-    fail("Unexpected invocation of getDeclaredVariables");
-  }
-
-  @deprecated
-  @override
-  EmbedderYamlLocator get embedderYamlLocator {
-    fail("Unexpected invocation of get embedderYamlLocator");
-  }
-
-  @override
-  List<AnalysisTarget> get explicitTargets {
-    fail("Unexpected invocation of visitCacheItems");
-  }
-
-  @override
-  ResolverProvider get fileResolverProvider {
-    fail("Unexpected invocation of fileResolverProvider");
-  }
-
-  @override
-  void set fileResolverProvider(ResolverProvider resolverProvider) {
-    fail("Unexpected invocation of fileResolverProvider");
-  }
-
-  @override
-  List<Source> get htmlSources {
-    fail("Unexpected invocation of getHtmlSources");
-  }
-
-  @override
-  Stream<ImplicitAnalysisEvent> get implicitAnalysisEvents {
-    fail("Unexpected invocation of analyzedSources");
-  }
-
-  bool get isActive {
-    fail("Unexpected invocation of isActive");
-  }
-
-  void set isActive(bool isActive) {
-    fail("Unexpected invocation of isActive");
-  }
-
-  @override
-  bool get isDisposed {
-    fail("Unexpected invocation of isDisposed");
-  }
-
-  @override
-  List<Source> get launchableClientLibrarySources {
-    fail("Unexpected invocation of getLaunchableClientLibrarySources");
-  }
-
-  @override
-  List<Source> get launchableServerLibrarySources {
-    fail("Unexpected invocation of getLaunchableServerLibrarySources");
-  }
-
-  @override
-  List<Source> get librarySources {
-    fail("Unexpected invocation of getLibrarySources");
-  }
-
-  @override
-  String get name {
-    fail("Unexpected invocation of name");
-  }
-
-  @override
-  set name(String value) {
-    fail("Unexpected invocation of name");
-  }
-
-  @override
-  Stream<SourcesChangedEvent> get onSourcesChanged {
-    fail("Unexpected invocation of onSourcesChanged");
-  }
-
-  @override
-  List<Source> get prioritySources {
-    fail("Unexpected invocation of getPrioritySources");
-  }
-
-  @override
-  List<AnalysisTarget> get priorityTargets {
-    fail("Unexpected invocation of visitCacheItems");
-  }
-
-  @override
-  CachePartition get privateAnalysisCachePartition {
-    fail("Unexpected invocation of privateAnalysisCachePartition");
-  }
-
-  @override
-  SourceFactory get sourceFactory {
-    fail("Unexpected invocation of getSourceFactory");
-  }
-
-  @override
-  void set sourceFactory(SourceFactory factory) {
-    fail("Unexpected invocation of setSourceFactory");
-  }
-
-  @override
-  List<Source> get sources {
-    fail("Unexpected invocation of sources");
-  }
-
-  @override
-  TypeProvider get typeProvider {
-    fail("Unexpected invocation of getTypeProvider");
-  }
-
-  @override
-  void set typeProvider(TypeProvider typeProvider) {
-    fail("Unexpected invocation of set typeProvider");
-  }
-
-  @override
-  TypeSystem get typeSystem {
-    fail("Unexpected invocation of getTypeSystem");
-  }
-
-  @override
-  List<WorkManager> get workManagers {
-    fail("Unexpected invocation of workManagers");
-  }
-
-  @override
-  bool aboutToComputeResult(CacheEntry entry, ResultDescriptor result) {
-    fail("Unexpected invocation of aboutToComputeResult");
-  }
-
-  @override
-  void addListener(AnalysisListener listener) {
-    fail("Unexpected invocation of addListener");
-  }
-
-  @override
-  void applyAnalysisDelta(AnalysisDelta delta) {
-    fail("Unexpected invocation of applyAnalysisDelta");
-  }
-
-  @override
-  void applyChanges(ChangeSet changeSet) {
-    fail("Unexpected invocation of applyChanges");
-  }
-
-  @override
-  String computeDocumentationComment(Element element) {
-    fail("Unexpected invocation of computeDocumentationComment");
-  }
-
-  @override
-  List<AnalysisError> computeErrors(Source source) {
-    fail("Unexpected invocation of computeErrors");
-  }
-
-  @override
-  List<Source> computeExportedLibraries(Source source) {
-    fail("Unexpected invocation of computeExportedLibraries");
-  }
-
-  @override
-  List<Source> computeImportedLibraries(Source source) {
-    fail("Unexpected invocation of computeImportedLibraries");
-  }
-
-  @override
-  SourceKind computeKindOf(Source source) {
-    fail("Unexpected invocation of computeKindOf");
-  }
-
-  @override
-  LibraryElement computeLibraryElement(Source source) {
-    fail("Unexpected invocation of computeLibraryElement");
-  }
-
-  @override
-  LineInfo computeLineInfo(Source source) {
-    fail("Unexpected invocation of computeLineInfo");
-  }
-
-  @override
-  CancelableFuture<CompilationUnit> computeResolvedCompilationUnitAsync(
-      Source source, Source librarySource) {
-    fail("Unexpected invocation of getResolvedCompilationUnitFuture");
-  }
-
-  @override
-  V computeResult<V>(AnalysisTarget target, ResultDescriptor<V> result) {
-    fail("Unexpected invocation of computeResult");
-  }
-
-  @override
-  void dispose() {
-    fail("Unexpected invocation of dispose");
-  }
-
-  @override
-  List<CompilationUnit> ensureResolvedDartUnits(Source source) {
-    fail("Unexpected invocation of ensureResolvedDartUnits");
-  }
-
-  @override
-  bool exists(Source source) {
-    fail("Unexpected invocation of exists");
-  }
-
-  @override
-  CacheEntry getCacheEntry(AnalysisTarget target) {
-    fail("Unexpected invocation of visitCacheItems");
-  }
-
-  @override
-  CompilationUnitElement getCompilationUnitElement(
-      Source unitSource, Source librarySource) {
-    fail("Unexpected invocation of getCompilationUnitElement");
-  }
-
-  @deprecated
-  @override
-  V getConfigurationData<V>(ResultDescriptor<V> key) {
-    fail("Unexpected invocation of getConfigurationData");
-  }
-
-  @override
-  TimestampedData<String> getContents(Source source) {
-    fail("Unexpected invocation of getContents");
-  }
-
-  @override
-  InternalAnalysisContext getContextFor(Source source) {
-    fail("Unexpected invocation of getContextFor");
-  }
-
-  @override
-  Element getElement(ElementLocation location) {
-    fail("Unexpected invocation of getElement");
-  }
-
-  @override
-  AnalysisErrorInfo getErrors(Source source) {
-    fail("Unexpected invocation of getErrors");
-  }
-
-  @override
-  List<Source> getHtmlFilesReferencing(Source source) {
-    fail("Unexpected invocation of getHtmlFilesReferencing");
-  }
-
-  @override
-  SourceKind getKindOf(Source source) {
-    fail("Unexpected invocation of getKindOf");
-  }
-
-  @override
-  List<Source> getLibrariesContaining(Source source) {
-    fail("Unexpected invocation of getLibrariesContaining");
-  }
-
-  @override
-  List<Source> getLibrariesDependingOn(Source librarySource) {
-    fail("Unexpected invocation of getLibrariesDependingOn");
-  }
-
-  @override
-  List<Source> getLibrariesReferencedFromHtml(Source htmlSource) {
-    fail("Unexpected invocation of getLibrariesReferencedFromHtml");
-  }
-
-  @override
-  LibraryElement getLibraryElement(Source source) {
-    fail("Unexpected invocation of getLibraryElement");
-  }
-
-  @override
-  LineInfo getLineInfo(Source source) {
-    fail("Unexpected invocation of getLineInfo");
-  }
-
-  @override
-  int getModificationStamp(Source source) {
-    fail("Unexpected invocation of getModificationStamp");
-  }
-
-  @override
-  ChangeNoticeImpl getNotice(Source source) {
-    fail("Unexpected invocation of getNotice");
-  }
-
-  @override
-  Namespace getPublicNamespace(LibraryElement library) {
-    fail("Unexpected invocation of getPublicNamespace");
-  }
-
-  @override
-  CompilationUnit getResolvedCompilationUnit(
-      Source unitSource, LibraryElement library) {
-    fail("Unexpected invocation of getResolvedCompilationUnit");
-  }
-
-  @override
-  CompilationUnit getResolvedCompilationUnit2(
-      Source unitSource, Source librarySource) {
-    fail("Unexpected invocation of getResolvedCompilationUnit");
-  }
-
-  @override
-  V getResult<V>(AnalysisTarget target, ResultDescriptor<V> result) {
-    fail("Unexpected invocation of getResult");
-  }
-
-  @override
-  List<Source> getSourcesWithFullName(String path) {
-    fail("Unexpected invocation of getSourcesWithFullName");
-  }
-
-  @override
-  bool handleContentsChanged(
-      Source source, String originalContents, String newContents, bool notify) {
-    fail("Unexpected invocation of handleContentsChanged");
-  }
-
-  @override
-  void invalidateLibraryHints(Source librarySource) {
-    fail("Unexpected invocation of invalidateLibraryHints");
-  }
-
-  @override
-  bool isClientLibrary(Source librarySource) {
-    fail("Unexpected invocation of isClientLibrary");
-  }
-
-  @override
-  bool isServerLibrary(Source librarySource) {
-    fail("Unexpected invocation of isServerLibrary");
-  }
-
-  @override
-  Stream<ResultChangedEvent> onResultChanged(ResultDescriptor descriptor) {
-    fail("Unexpected invocation of onResultChanged");
-  }
-
-  @deprecated
-  @override
-  Stream<ComputedResult> onResultComputed(ResultDescriptor descriptor) {
-    fail("Unexpected invocation of onResultComputed");
-  }
-
-  @override
-  CompilationUnit parseCompilationUnit(Source source) {
-    fail("Unexpected invocation of parseCompilationUnit");
-  }
-
-  @override
-  Document parseHtmlDocument(Source source) {
-    fail("Unexpected invocation of parseHtmlDocument");
-  }
-
-  @override
-  AnalysisResult performAnalysisTask() {
-    fail("Unexpected invocation of performAnalysisTask");
-  }
-
-  @override
-  void recordLibraryElements(Map<Source, LibraryElement> elementMap) {
-    fail("Unexpected invocation of recordLibraryElements");
-  }
-
-  @override
-  void removeListener(AnalysisListener listener) {
-    fail("Unexpected invocation of removeListener");
-  }
-
-  @override
-  CompilationUnit resolveCompilationUnit(
-      Source unitSource, LibraryElement library) {
-    fail("Unexpected invocation of resolveCompilationUnit");
-  }
-
-  @override
-  CompilationUnit resolveCompilationUnit2(
-      Source unitSource, Source librarySource) {
-    fail("Unexpected invocation of resolveCompilationUnit");
-  }
-
-  @override
-  void setChangedContents(Source source, String contents, int offset,
-      int oldLength, int newLength) {
-    fail("Unexpected invocation of setChangedContents");
-  }
-
-  @deprecated
-  @override
-  void setConfigurationData(ResultDescriptor key, Object data) {
-    fail("Unexpected invocation of setConfigurationData");
-  }
-
-  @override
-  void setContents(Source source, String contents) {
-    fail("Unexpected invocation of setContents");
-  }
-
-  @override
-  bool shouldErrorsBeAnalyzed(Source source) {
-    fail("Unexpected invocation of shouldErrorsBeAnalyzed");
-  }
-
-  @override
-  void test_flushAstStructures(Source source) {
-    fail("Unexpected invocation of test_flushAstStructures");
-  }
-
-  @override
-  void visitContentCache(ContentCacheVisitor visitor) {
-    fail("Unexpected invocation of visitContentCache");
-  }
-}
diff --git a/pkg/analyzer/test/generated/error_suppression.dart b/pkg/analyzer/test/generated/error_suppression.dart
deleted file mode 100644
index 80027a4..0000000
--- a/pkg/analyzer/test/generated/error_suppression.dart
+++ /dev/null
@@ -1,229 +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/error/error.dart';
-import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/source_io.dart';
-
-import 'resolver_test_case.dart';
-
-abstract class ErrorSuppressionTest extends ResolverTestCase {
-  String get ignoredCode => 'const_initialized_with_non_constant_value';
-
-  List<ErrorCode> get reportedCodes => [
-        CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE,
-      ];
-
-  List<ErrorCode> get reportedCodesWithAssignment => [
-        StaticTypeWarningCode.INVALID_ASSIGNMENT,
-        CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE,
-      ];
-
-  test_error_code_mismatch() async {
-    Source source = addSource('''
-// ignore: $ignoredCode
-int x = '';
-const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, reportedCodesWithAssignment);
-  }
-
-  test_ignore_first() async {
-    Source source = addSource('''
-// ignore: invalid_assignment
-int x = '';
-// ... but no ignore here ...
-const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, reportedCodes);
-  }
-
-  test_ignore_first_trailing() async {
-    Source source = addSource('''
-int x = ''; // ignore: invalid_assignment
-// ... but no ignore here ...
-const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, reportedCodes);
-  }
-
-  test_ignore_for_file() async {
-    Source source = addSource('''
-int x = '';  //INVALID_ASSIGNMENT
-const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
-// ignore_for_file: invalid_assignment
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, reportedCodes);
-  }
-
-  test_ignore_for_file_whitespace_variant() async {
-    Source source = addSource('''
-//ignore_for_file:   $ignoredCode , invalid_assignment
-int x = '';  //INVALID_ASSIGNMENT
-const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, []);
-  }
-
-  test_ignore_only_trailing() async {
-    Source source = addSource('''
-int x = ''; // ignore: invalid_assignment
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, []);
-  }
-
-  test_ignore_second() async {
-    Source source = addSource('''
-//INVALID_ASSIGNMENT
-int x = '';
-// ignore: $ignoredCode
-const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-  }
-
-  test_ignore_second_trailing() async {
-    Source source = addSource('''
-//INVALID_ASSIGNMENT
-int x = '';
-const y = x; // ignore: $ignoredCode
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-  }
-
-  test_ignore_upper_case() async {
-    Source source = addSource('''
-int x = ''; // ignore: INVALID_ASSIGNMENT
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, []);
-  }
-
-  test_invalid_error_code() async {
-    Source source = addSource('''
-// ignore: right_format_wrong_code
-int x = '';
-const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, reportedCodesWithAssignment);
-  }
-
-  test_missing_error_codes() async {
-    Source source = addSource('''
-    int x = 3;
-// ignore:
-const String y = x; //INVALID_ASSIGNMENT, CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, reportedCodesWithAssignment);
-  }
-
-  test_missing_metadata_suffix() async {
-    Source source = addSource('''
-// ignore invalid_assignment
-String y = 3; //INVALID_ASSIGNMENT
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-  }
-
-  test_multiple_comments() async {
-    Source source = addSource('''
-int x = ''; //This is the first comment...
-// ignore: $ignoredCode
-const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-  }
-
-  test_multiple_ignore_for_files() async {
-    Source source = addSource('''
-int x = '';  //INVALID_ASSIGNMENT
-const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
-// ignore_for_file: invalid_assignment,$ignoredCode
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, []);
-  }
-
-  test_multiple_ignores() async {
-    Source source = addSource('''
-int x = 3;
-// ignore: invalid_assignment, $ignoredCode
-const String y = x; //INVALID_ASSIGNMENT, CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, []);
-  }
-
-  test_multiple_ignores_trailing() async {
-    Source source = addSource('''
-int x = 3;
-const String y = x; // ignore: invalid_assignment, $ignoredCode
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, []);
-  }
-
-  test_multiple_ignores_whitespace_variant_1() async {
-    Source source = addSource('''
-int x = 3;
-//ignore:invalid_assignment,$ignoredCode
-const String y = x; //INVALID_ASSIGNMENT, CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, []);
-  }
-
-  test_multiple_ignores_whitespace_variant_2() async {
-    Source source = addSource('''
-int x = 3;
-//ignore: invalid_assignment,$ignoredCode
-const String y = x; //INVALID_ASSIGNMENT, CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, []);
-  }
-
-  test_multiple_ignores_whitespace_variant_3() async {
-    Source source = addSource('''
-int x = 3;
-// ignore: invalid_assignment,$ignoredCode
-const String y = x; //INVALID_ASSIGNMENT, CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, []);
-  }
-
-  test_no_ignores() async {
-    Source source = addSource('''
-int x = '';  //INVALID_ASSIGNMENT
-const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, reportedCodesWithAssignment);
-  }
-
-  test_trailing_not_above() async {
-    Source source = addSource('''
-int x = ''; // ignore: invalid_assignment
-int y = '';
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      StaticTypeWarningCode.INVALID_ASSIGNMENT,
-    ]);
-  }
-}
diff --git a/pkg/analyzer/test/generated/error_suppression_driver_test.dart b/pkg/analyzer/test/generated/error_suppression_driver_test.dart
deleted file mode 100644
index 77e0f57..0000000
--- a/pkg/analyzer/test/generated/error_suppression_driver_test.dart
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import 'error_suppression.dart';
-
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(ErrorSuppressionTest_Driver);
-  });
-}
-
-@reflectiveTest
-class ErrorSuppressionTest_Driver extends ErrorSuppressionTest {
-  @override
-  bool get enableNewAnalysisDriver => true;
-}
diff --git a/pkg/analyzer/test/generated/error_suppression_test.dart b/pkg/analyzer/test/generated/error_suppression_test.dart
new file mode 100644
index 0000000..fc6c5d50c
--- /dev/null
+++ b/pkg/analyzer/test/generated/error_suppression_test.dart
@@ -0,0 +1,237 @@
+// 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/error/error.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/generated/source_io.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'resolver_test_case.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ErrorSuppressionTest);
+  });
+}
+
+@reflectiveTest
+class ErrorSuppressionTest extends ResolverTestCase {
+  String get ignoredCode => 'const_initialized_with_non_constant_value';
+
+  List<ErrorCode> get reportedCodes => [
+        CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE,
+      ];
+
+  List<ErrorCode> get reportedCodesWithAssignment => [
+        StaticTypeWarningCode.INVALID_ASSIGNMENT,
+        CompileTimeErrorCode.CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE,
+      ];
+
+  test_error_code_mismatch() async {
+    Source source = addSource('''
+// ignore: $ignoredCode
+int x = '';
+const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, reportedCodesWithAssignment);
+  }
+
+  test_ignore_first() async {
+    Source source = addSource('''
+// ignore: invalid_assignment
+int x = '';
+// ... but no ignore here ...
+const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, reportedCodes);
+  }
+
+  test_ignore_first_trailing() async {
+    Source source = addSource('''
+int x = ''; // ignore: invalid_assignment
+// ... but no ignore here ...
+const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, reportedCodes);
+  }
+
+  test_ignore_for_file() async {
+    Source source = addSource('''
+int x = '';  //INVALID_ASSIGNMENT
+const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
+// ignore_for_file: invalid_assignment
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, reportedCodes);
+  }
+
+  test_ignore_for_file_whitespace_variant() async {
+    Source source = addSource('''
+//ignore_for_file:   $ignoredCode , invalid_assignment
+int x = '';  //INVALID_ASSIGNMENT
+const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, []);
+  }
+
+  test_ignore_only_trailing() async {
+    Source source = addSource('''
+int x = ''; // ignore: invalid_assignment
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, []);
+  }
+
+  test_ignore_second() async {
+    Source source = addSource('''
+//INVALID_ASSIGNMENT
+int x = '';
+// ignore: $ignoredCode
+const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
+  }
+
+  test_ignore_second_trailing() async {
+    Source source = addSource('''
+//INVALID_ASSIGNMENT
+int x = '';
+const y = x; // ignore: $ignoredCode
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
+  }
+
+  test_ignore_upper_case() async {
+    Source source = addSource('''
+int x = ''; // ignore: INVALID_ASSIGNMENT
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, []);
+  }
+
+  test_invalid_error_code() async {
+    Source source = addSource('''
+// ignore: right_format_wrong_code
+int x = '';
+const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, reportedCodesWithAssignment);
+  }
+
+  test_missing_error_codes() async {
+    Source source = addSource('''
+    int x = 3;
+// ignore:
+const String y = x; //INVALID_ASSIGNMENT, CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, reportedCodesWithAssignment);
+  }
+
+  test_missing_metadata_suffix() async {
+    Source source = addSource('''
+// ignore invalid_assignment
+String y = 3; //INVALID_ASSIGNMENT
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
+  }
+
+  test_multiple_comments() async {
+    Source source = addSource('''
+int x = ''; //This is the first comment...
+// ignore: $ignoredCode
+const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
+  }
+
+  test_multiple_ignore_for_files() async {
+    Source source = addSource('''
+int x = '';  //INVALID_ASSIGNMENT
+const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
+// ignore_for_file: invalid_assignment,$ignoredCode
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, []);
+  }
+
+  test_multiple_ignores() async {
+    Source source = addSource('''
+int x = 3;
+// ignore: invalid_assignment, $ignoredCode
+const String y = x; //INVALID_ASSIGNMENT, CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, []);
+  }
+
+  test_multiple_ignores_trailing() async {
+    Source source = addSource('''
+int x = 3;
+const String y = x; // ignore: invalid_assignment, $ignoredCode
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, []);
+  }
+
+  test_multiple_ignores_whitespace_variant_1() async {
+    Source source = addSource('''
+int x = 3;
+//ignore:invalid_assignment,$ignoredCode
+const String y = x; //INVALID_ASSIGNMENT, CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, []);
+  }
+
+  test_multiple_ignores_whitespace_variant_2() async {
+    Source source = addSource('''
+int x = 3;
+//ignore: invalid_assignment,$ignoredCode
+const String y = x; //INVALID_ASSIGNMENT, CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, []);
+  }
+
+  test_multiple_ignores_whitespace_variant_3() async {
+    Source source = addSource('''
+int x = 3;
+// ignore: invalid_assignment,$ignoredCode
+const String y = x; //INVALID_ASSIGNMENT, CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, []);
+  }
+
+  test_no_ignores() async {
+    Source source = addSource('''
+int x = '';  //INVALID_ASSIGNMENT
+const y = x; //CONST_INITIALIZED_WITH_NON_CONSTANT_VALUE
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, reportedCodesWithAssignment);
+  }
+
+  test_trailing_not_above() async {
+    Source source = addSource('''
+int x = ''; // ignore: invalid_assignment
+int y = '';
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [
+      StaticTypeWarningCode.INVALID_ASSIGNMENT,
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/generated/hint_code_driver_test.dart b/pkg/analyzer/test/generated/hint_code_driver_test.dart
deleted file mode 100644
index c7a7758..0000000
--- a/pkg/analyzer/test/generated/hint_code_driver_test.dart
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import 'hint_code_test.dart';
-
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(HintCodeTest_Driver);
-  });
-}
-
-@reflectiveTest
-class HintCodeTest_Driver extends HintCodeTest {
-  @override
-  bool get enableNewAnalysisDriver => true;
-}
diff --git a/pkg/analyzer/test/generated/hint_code_test.dart b/pkg/analyzer/test/generated/hint_code_test.dart
index 6695ba9..d13e5f5 100644
--- a/pkg/analyzer/test/generated/hint_code_test.dart
+++ b/pkg/analyzer/test/generated/hint_code_test.dart
@@ -2,7 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/error/error.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/parser.dart';
@@ -15,347 +14,15 @@
 
 main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(CrossPackageHintCodeTest);
+    defineReflectiveTests(HintCodeTest);
   });
 }
 
-final metaLibraryStub = r'''
-library meta;
-
-const _AlwaysThrows alwaysThrows = const _AlwaysThrows();
-const _Factory factory = const _Factory();
-const Immutable immutable = const Immutable();
-const _Literal literal = const _Literal();
-const _MustCallSuper mustCallSuper = const _MustCallSuper();
-const _Protected protected = const _Protected();
-const Required required = const Required();
-const _Sealed sealed = const _Sealed();
-const _VisibleForTesting visibleForTesting = const _VisibleForTesting();
-
-class Immutable {
-  final String reason;
-  const Immutable([this.reason]);
-}
-class _AlwaysThrows {
-  const _AlwaysThrows();
-}
-class _Factory {
-  const _Factory();
-}
-class _Literal {
-  const _Literal();
-}
-class _MustCallSuper {
-  const _MustCallSuper();
-}
-class _Protected {
-  const _Protected();
-}
-class Required {
-  final String reason;
-  const Required([this.reason]);
-}
-class _Sealed {
-  const _Sealed();
-}
-class _VisibleForTesting {
-  const _VisibleForTesting();
-}
-''';
-
-@reflectiveTest
-class CrossPackageHintCodeTest extends ResolverTestCase {
-  @override
-  bool get enableNewAnalysisDriver => true;
-
-  test_subtypeOfSealedClass_extending() async {
-    super.resetWith(packages: [
-      ['meta', metaLibraryStub],
-      [
-        'foo',
-        r'''
-import 'package:meta/meta.dart';
-@sealed class Foo {}
-'''
-      ]
-    ]);
-
-    _newPubPackageRoot('/pkg1');
-    Source source = addNamedSource('/pkg1/lib/lib1.dart', r'''
-                    import 'package:foo/foo.dart';
-                    class Bar extends Foo {}
-                    ''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.SUBTYPE_OF_SEALED_CLASS]);
-    verify([source]);
-  }
-
-  test_subtypeOfSealedClass_implementing() async {
-    super.resetWith(packages: [
-      ['meta', metaLibraryStub],
-      [
-        'foo',
-        r'''
-import 'package:meta/meta.dart';
-@sealed class Foo {}
-'''
-      ]
-    ]);
-
-    _newPubPackageRoot('/pkg1');
-    Source source = addNamedSource('/pkg1/lib/lib1.dart', r'''
-                    import 'package:foo/foo.dart';
-                    class Bar implements Foo {}
-                    ''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.SUBTYPE_OF_SEALED_CLASS]);
-    verify([source]);
-  }
-
-  test_subtypeOfSealedClass_mixinApplication() async {
-    super.resetWith(packages: [
-      ['meta', metaLibraryStub],
-      [
-        'foo',
-        r'''
-import 'package:meta/meta.dart';
-@sealed class Foo {}
-'''
-      ]
-    ]);
-
-    _newPubPackageRoot('/pkg1');
-    Source source = addNamedSource('/pkg1/lib/lib1.dart', r'''
-                    import 'package:foo/foo.dart';
-                    class Bar1 {}
-                    class Bar2 = Bar1 with Foo;
-                    ''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.SUBTYPE_OF_SEALED_CLASS]);
-    verify([source]);
-  }
-
-  test_subtypeOfSealedClass_mixinImplements() async {
-    super.resetWith(packages: [
-      ['meta', metaLibraryStub],
-      [
-        'foo',
-        r'''
-import 'package:meta/meta.dart';
-@sealed class Foo {}
-'''
-      ]
-    ]);
-
-    _newPubPackageRoot('/pkg1');
-    Source source = addNamedSource('/pkg1/lib/lib1.dart', r'''
-                    import 'package:foo/foo.dart';
-                    mixin Bar implements Foo {}
-                    ''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.SUBTYPE_OF_SEALED_CLASS]);
-    verify([source]);
-  }
-
-  test_subtypeOfSealedClass_mixinOn() async {
-    super.resetWith(packages: [
-      ['meta', metaLibraryStub],
-      [
-        'foo',
-        r'''
-import 'package:meta/meta.dart';
-@sealed class Foo {}
-'''
-      ]
-    ]);
-
-    _newPubPackageRoot('/pkg1');
-    Source source = addNamedSource('/pkg1/lib/lib1.dart', r'''
-                    import 'package:foo/foo.dart';
-                    mixin Bar on Foo {}
-                    ''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.MIXIN_ON_SEALED_CLASS]);
-    verify([source]);
-  }
-
-  test_subtypeOfSealedClass_with() async {
-    super.resetWith(packages: [
-      ['meta', metaLibraryStub],
-      [
-        'foo',
-        r'''
-import 'package:meta/meta.dart';
-@sealed class Foo {}
-'''
-      ]
-    ]);
-
-    _newPubPackageRoot('/pkg1');
-    Source source = addNamedSource('/pkg1/lib/lib1.dart', r'''
-                    import 'package:foo/foo.dart';
-                    class Bar extends Object with Foo {}
-                    ''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.SUBTYPE_OF_SEALED_CLASS]);
-    verify([source]);
-  }
-
-  test_subtypeOfSealedClass_withinLibrary_OK() async {
-    super.resetWith(packages: [
-      ['meta', metaLibraryStub],
-    ]);
-
-    _newPubPackageRoot('/pkg1');
-    Source source = addNamedSource('/pkg1/lib/lib1.dart', r'''
-                    import 'package:meta/meta.dart';
-                    @sealed class Foo {}
-
-                    class Bar1 extends Foo {}
-                    class Bar2 implements Foo {}
-                    class Bar4 = Bar1 with Foo;
-                    mixin Bar5 on Foo {}
-                    mixin Bar6 implements Foo {}
-                    ''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_subtypeOfSealedClass_withinPackageLibDirectory_OK() async {
-    super.resetWith(packages: [
-      ['meta', metaLibraryStub],
-    ]);
-
-    _newPubPackageRoot('/pkg1');
-    Source source1 = addNamedSource('/pkg1/lib/lib1.dart', r'''
-                     import 'package:meta/meta.dart';
-                     @sealed class Foo {}
-                     ''');
-    Source source2 = addNamedSource('/pkg1/lib/src/lib2.dart', r'''
-                     import '../lib1.dart';
-                     class Bar1 extends Foo {}
-                     class Bar2 implements Foo {}
-                     class Bar4 = Bar1 with Foo;
-                     mixin Bar5 on Foo {}
-                     mixin Bar6 implements Foo {}
-                     ''');
-    await computeAnalysisResult(source1);
-    await computeAnalysisResult(source2);
-    assertNoErrors(source1);
-    assertNoErrors(source2);
-    verify([source1, source2]);
-  }
-
-  test_subtypeOfSealedClass_withinPackageTestDirectory_OK() async {
-    super.resetWith(packages: [
-      ['meta', metaLibraryStub],
-    ]);
-
-    newFolder('/pkg1');
-    _newPubPackageRoot('/pkg1');
-
-    Source source1 = addNamedSource('/pkg1/lib/lib1.dart', r'''
-                     import 'package:meta/meta.dart';
-                     @sealed class Foo {}
-                     ''');
-    Source source2 = addNamedSource('/pkg1/test/test.dart', r'''
-                     import '../lib/lib1.dart';
-                     class Bar1 extends Foo {}
-                     class Bar2 implements Foo {}
-                     class Bar4 = Bar1 with Foo;
-                     mixin Bar5 on Foo {}
-                     mixin Bar6 implements Foo {}
-                     ''');
-    await computeAnalysisResult(source1);
-    await computeAnalysisResult(source2);
-    assertNoErrors(source1);
-    assertNoErrors(source2);
-    verify([source1, source2]);
-  }
-
-  test_subtypeOfSealedClass_withinPart_OK() async {
-    super.resetWith(packages: [
-      ['meta', metaLibraryStub],
-    ]);
-
-    _newPubPackageRoot('/pkg1');
-    Source source1 = addNamedSource('/pkg1/lib/lib1.dart', r'''
-                     import 'package:meta/meta.dart';
-                     part 'part1.dart';
-                     @sealed class Foo {}
-                     ''');
-    addNamedSource('/pkg1/lib/part1.dart', r'''
-                     part of 'lib1.dart';
-                     class Bar1 extends Foo {}
-                     class Bar2 implements Foo {}
-                     class Bar4 = Bar1 with Foo;
-                     mixin Bar5 on Foo {}
-                     mixin Bar6 implements Foo {}
-                     ''');
-    await computeAnalysisResult(source1);
-    assertNoErrors(source1);
-    verify([source1]);
-  }
-
-  test_subtypeOfSealedMixin_mixinApplication() async {
-    super.resetWith(packages: [
-      ['meta', metaLibraryStub],
-      [
-        'foo',
-        r'''
-import 'package:meta/meta.dart';
-@sealed mixin Foo {}
-'''
-      ]
-    ]);
-
-    _newPubPackageRoot('/pkg1');
-    Source source = addNamedSource('/pkg1/lib/lib1.dart', r'''
-                    import 'package:foo/foo.dart';
-                    class Bar1 {}
-                    class Bar2 = Bar1 with Foo;
-                    ''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.SUBTYPE_OF_SEALED_CLASS]);
-    verify([source]);
-  }
-
-  test_subtypeOfSealedMixin_with() async {
-    super.resetWith(packages: [
-      ['meta', metaLibraryStub],
-      [
-        'foo',
-        r'''
-import 'package:meta/meta.dart';
-@sealed mixin Foo {}
-'''
-      ]
-    ]);
-
-    _newPubPackageRoot('/pkg1');
-    Source source = addNamedSource('/pkg1/lib/lib1.dart', r'''
-                    import 'package:foo/foo.dart';
-                    class Bar extends Object with Foo {}
-                    ''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.SUBTYPE_OF_SEALED_CLASS]);
-    verify([source]);
-  }
-
-  /// Write a pubspec file at [root], so that BestPracticesVerifier can see
-  /// that [root] is the root of a PubWorkspace, and a PubWorkspacePackage.
-  void _newPubPackageRoot(String root) {
-    newFile('$root/pubspec.yaml');
-  }
-}
-
 @reflectiveTest
 class HintCodeTest extends ResolverTestCase {
   @override
   void reset() {
     super.resetWith(packages: [
-      ['meta', metaLibraryStub],
       [
         'js',
         r'''
@@ -365,557 +32,9 @@
 }
 '''
       ],
-      [
-        'angular_meta',
-        r'''
-library angular.meta;
-
-const _VisibleForTemplate visibleForTemplate = const _VisibleForTemplate();
-
-class _VisibleForTemplate {
-  const _VisibleForTemplate();
-}
-'''
-      ],
     ]);
   }
 
-  test_deadCode_deadBlock_conditionalElse() async {
-    Source source = addSource(r'''
-f() {
-  true ? 1 : 2;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  test_deadCode_deadBlock_conditionalElse_nested() async {
-    // test that a dead else-statement can't generate additional violations
-    Source source = addSource(r'''
-f() {
-  true ? true : false && false;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  test_deadCode_deadBlock_conditionalIf() async {
-    Source source = addSource(r'''
-f() {
-  false ? 1 : 2;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  test_deadCode_deadBlock_conditionalIf_nested() async {
-    // test that a dead then-statement can't generate additional violations
-    Source source = addSource(r'''
-f() {
-  false ? false && false : true;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  test_deadCode_deadBlock_else() async {
-    Source source = addSource(r'''
-f() {
-  if(true) {} else {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  test_deadCode_deadBlock_else_nested() async {
-    // test that a dead else-statement can't generate additional violations
-    Source source = addSource(r'''
-f() {
-  if(true) {} else {if (false) {}}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  test_deadCode_deadBlock_if() async {
-    Source source = addSource(r'''
-f() {
-  if(false) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  test_deadCode_deadBlock_if_nested() async {
-    // test that a dead then-statement can't generate additional violations
-    Source source = addSource(r'''
-f() {
-  if(false) {if(false) {}}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  test_deadCode_deadBlock_while() async {
-    Source source = addSource(r'''
-f() {
-  while(false) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  test_deadCode_deadBlock_while_nested() async {
-    // test that a dead while body can't generate additional violations
-    Source source = addSource(r'''
-f() {
-  while(false) {if(false) {}}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  test_deadCode_deadCatch_catchFollowingCatch() async {
-    Source source = addSource(r'''
-class A {}
-f() {
-  try {} catch (e) {} catch (e) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE_CATCH_FOLLOWING_CATCH]);
-    verify([source]);
-  }
-
-  test_deadCode_deadCatch_catchFollowingCatch_nested() async {
-    // test that a dead catch clause can't generate additional violations
-    Source source = addSource(r'''
-class A {}
-f() {
-  try {} catch (e) {} catch (e) {if(false) {}}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE_CATCH_FOLLOWING_CATCH]);
-    verify([source]);
-  }
-
-  test_deadCode_deadCatch_catchFollowingCatch_object() async {
-    Source source = addSource(r'''
-f() {
-  try {} on Object catch (e) {} catch (e) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE_CATCH_FOLLOWING_CATCH]);
-    verify([source]);
-  }
-
-  test_deadCode_deadCatch_catchFollowingCatch_object_nested() async {
-    // test that a dead catch clause can't generate additional violations
-    Source source = addSource(r'''
-f() {
-  try {} on Object catch (e) {} catch (e) {if(false) {}}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE_CATCH_FOLLOWING_CATCH]);
-    verify([source]);
-  }
-
-  test_deadCode_deadCatch_onCatchSubtype() async {
-    Source source = addSource(r'''
-class A {}
-class B extends A {}
-f() {
-  try {} on A catch (e) {} on B catch (e) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE_ON_CATCH_SUBTYPE]);
-    verify([source]);
-  }
-
-  test_deadCode_deadCatch_onCatchSubtype_nested() async {
-    // test that a dead catch clause can't generate additional violations
-    Source source = addSource(r'''
-class A {}
-class B extends A {}
-f() {
-  try {} on A catch (e) {} on B catch (e) {if(false) {}}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE_ON_CATCH_SUBTYPE]);
-    verify([source]);
-  }
-
-  test_deadCode_deadFinalReturnInCase() async {
-    Source source = addSource(r'''
-f() {
-  switch (true) {
-  case true:
-    try {
-      int a = 1;
-    } finally {
-      return;
-    }
-    return;
-  default:
-    break;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  test_deadCode_deadFinalStatementInCase() async {
-    Source source = addSource(r'''
-f() {
-  switch (true) {
-  case true:
-    try {
-      int a = 1;
-    } finally {
-      return;
-    }
-    int b = 1;
-  default:
-    break;
-  }
-}''');
-    // A single dead statement at the end of a switch case that is not a
-    // terminating statement will yield two errors.
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [HintCode.DEAD_CODE, StaticWarningCode.CASE_BLOCK_NOT_TERMINATED]);
-    verify([source]);
-  }
-
-  test_deadCode_deadOperandLHS_and() async {
-    Source source = addSource(r'''
-f() {
-  bool b = false && false;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  test_deadCode_deadOperandLHS_and_nested() async {
-    Source source = addSource(r'''
-f() {
-  bool b = false && (false && false);
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  test_deadCode_deadOperandLHS_or() async {
-    Source source = addSource(r'''
-f() {
-  bool b = true || true;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  test_deadCode_deadOperandLHS_or_nested() async {
-    Source source = addSource(r'''
-f() {
-  bool b = true || (false && false);
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  test_deadCode_statementAfterAlwaysThrowsFunction() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-
-@alwaysThrows
-void a() {
-  throw 'msg';
-}
-
-f() {
-  var one = 1;
-  a();
-  var two = 2;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  @failingTest
-  test_deadCode_statementAfterAlwaysThrowsGetter() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-
-class C {
-  @alwaysThrows
-  int get a {
-    throw 'msg';
-  }
-}
-
-f() {
-  var one = 1;
-  new C().a;
-  var two = 2;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  test_deadCode_statementAfterAlwaysThrowsMethod() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-
-class C {
-  @alwaysThrows
-  void a() {
-    throw 'msg';
-  }
-}
-
-f() {
-  var one = 1;
-  new C().a();
-  var two = 2;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  test_deadCode_statementAfterBreak_inDefaultCase() async {
-    Source source = addSource(r'''
-f(v) {
-  switch(v) {
-    case 1:
-    default:
-      break;
-      var a;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  test_deadCode_statementAfterBreak_inForEachStatement() async {
-    Source source = addSource(r'''
-f() {
-  var list;
-  for(var l in list) {
-    break;
-    var a;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  test_deadCode_statementAfterBreak_inForStatement() async {
-    Source source = addSource(r'''
-f() {
-  for(;;) {
-    break;
-    var a;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  test_deadCode_statementAfterBreak_inSwitchCase() async {
-    Source source = addSource(r'''
-f(v) {
-  switch(v) {
-    case 1:
-      break;
-      var a;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  test_deadCode_statementAfterBreak_inWhileStatement() async {
-    Source source = addSource(r'''
-f(v) {
-  while(v) {
-    break;
-    var a;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  test_deadCode_statementAfterContinue_inForEachStatement() async {
-    Source source = addSource(r'''
-f() {
-  var list;
-  for(var l in list) {
-    continue;
-    var a;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  test_deadCode_statementAfterContinue_inForStatement() async {
-    Source source = addSource(r'''
-f() {
-  for(;;) {
-    continue;
-    var a;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  test_deadCode_statementAfterContinue_inWhileStatement() async {
-    Source source = addSource(r'''
-f(v) {
-  while(v) {
-    continue;
-    var a;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  test_deadCode_statementAfterExitingIf_returns() async {
-    Source source = addSource(r'''
-f() {
-  if (1 > 2) {
-    return;
-  } else {
-    return;
-  }
-  var one = 1;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  test_deadCode_statementAfterRethrow() async {
-    Source source = addSource(r'''
-f() {
-  try {
-    var one = 1;
-  } catch (e) {
-    rethrow;
-    var two = 2;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  test_deadCode_statementAfterReturn_function() async {
-    Source source = addSource(r'''
-f() {
-  var one = 1;
-  return;
-  var two = 2;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  test_deadCode_statementAfterReturn_ifStatement() async {
-    Source source = addSource(r'''
-f(bool b) {
-  if(b) {
-    var one = 1;
-    return;
-    var two = 2;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  test_deadCode_statementAfterReturn_method() async {
-    Source source = addSource(r'''
-class A {
-  m() {
-    var one = 1;
-    return;
-    var two = 2;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  test_deadCode_statementAfterReturn_nested() async {
-    Source source = addSource(r'''
-f() {
-  var one = 1;
-  return;
-  if(false) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  test_deadCode_statementAfterReturn_twoReturns() async {
-    Source source = addSource(r'''
-f() {
-  var one = 1;
-  return;
-  var two = 2;
-  return;
-  var three = 3;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  test_deadCode_statementAfterThrow() async {
-    Source source = addSource(r'''
-f() {
-  var one = 1;
-  throw 'Stop here';
-  var two = 2;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
   test_deprecatedFunction_class() async {
     Source source = addSource(r'''
 class Function {}
@@ -969,51 +88,6 @@
     verify([source]);
   }
 
-  test_duplicateImport() async {
-    Source source = addSource(r'''
-library L;
-import 'lib1.dart';
-import 'lib1.dart';
-A a;''');
-    addNamedSource("/lib1.dart", r'''
-library lib1;
-class A {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DUPLICATE_IMPORT]);
-    verify([source]);
-  }
-
-  test_duplicateImport2() async {
-    Source source = addSource(r'''
-library L;
-import 'lib1.dart';
-import 'lib1.dart';
-import 'lib1.dart';
-A a;''');
-    addNamedSource("/lib1.dart", r'''
-library lib1;
-class A {}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [HintCode.DUPLICATE_IMPORT, HintCode.DUPLICATE_IMPORT]);
-    verify([source]);
-  }
-
-  test_duplicateImport3() async {
-    Source source = addSource(r'''
-library L;
-import 'lib1.dart' as M show A hide B;
-import 'lib1.dart' as M show A hide B;
-M.A a;''');
-    addNamedSource("/lib1.dart", r'''
-library lib1;
-class A {}
-class B {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DUPLICATE_IMPORT]);
-    verify([source]);
-  }
-
   test_duplicateShownHiddenName_hidden() async {
     Source source = addSource(r'''
 library L;
@@ -1040,1155 +114,6 @@
     verify([source]);
   }
 
-  test_factory__expr_return_null_OK() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-
-class Stateful {
-  @factory
-  State createState() => null;
-}
-
-class State { }
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_factory_abstract_OK() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-
-abstract class Stateful {
-  @factory
-  State createState();
-}
-
-class State { }
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_factory_bad_return() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-
-class Stateful {
-  State _s = new State();
-
-  @factory
-  State createState() => _s;
-}
-
-class State { }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.INVALID_FACTORY_METHOD_IMPL]);
-    verify([source]);
-  }
-
-  test_factory_block_OK() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-
-class Stateful {
-  @factory
-  State createState() {
-    return new State();
-  }
-}
-
-class State { }
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_factory_block_return_null_OK() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-
-class Stateful {
-  @factory
-  State createState() {
-    return null;
-  }
-}
-
-class State { }
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_factory_expr_OK() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-
-class Stateful {
-  @factory
-  State createState() => new State();
-}
-
-class State { }
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_factory_misplaced_annotation() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-
-@factory
-class X {
-  @factory
-  int x;
-}
-
-@factory
-main() { }
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      HintCode.INVALID_FACTORY_ANNOTATION,
-      HintCode.INVALID_FACTORY_ANNOTATION,
-      HintCode.INVALID_FACTORY_ANNOTATION
-    ]);
-    verify([source]);
-  }
-
-  test_factory_no_return_type_OK() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-
-class Stateful {
-  @factory
-  createState() {
-    return new Stateful();
-  }
-}
-''');
-    // Null return types will get flagged elsewhere, no need to pile-on here.
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_factory_subclass_OK() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-
-abstract class Stateful {
-  @factory
-  State createState();
-}
-
-class MyThing extends Stateful {
-  @override
-  State createState() {
-    print('my state');
-    return new MyState();
-  }
-}
-
-class State { }
-class MyState extends State { }
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_factory_void_return() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-
-class Stateful {
-  @factory
-  void createState() {}
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.INVALID_FACTORY_METHOD_DECL]);
-    verify([source]);
-  }
-
-  test_importDeferredLibraryWithLoadFunction() async {
-    await resolveWithErrors(<String>[
-      r'''
-library lib1;
-loadLibrary() {}
-f() {}''',
-      r'''
-library root;
-import 'lib1.dart' deferred as lib1;
-main() { lib1.f(); }'''
-    ], <ErrorCode>[
-      HintCode.IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION
-    ]);
-  }
-
-  test_invalidImmutableAnnotation_method() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @immutable
-  void m() {}
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.INVALID_IMMUTABLE_ANNOTATION]);
-    verify([source]);
-  }
-
-  test_invalidLiteralAnnotation_nonConstConstructor() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @literal
-  A() {}
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.INVALID_LITERAL_ANNOTATION]);
-    verify([source]);
-  }
-
-  test_nonConstCallToLiteralConstructor_nonConstContext() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @literal
-  const A();
-}
-void main() {
-  var a = A();
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR]);
-    verify([source]);
-  }
-
-  test_nonConstCallToLiteralConstructor_usingNew() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @literal
-  const A();
-}
-void main() {
-  var a = new A();
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [HintCode.NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR_USING_NEW]);
-    verify([source]);
-  }
-
-  test_nonConstCallToLiteralConstructor_namedConstructor() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @literal
-  const A.named();
-}
-void main() {
-  var a = A.named();
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR]);
-    verify([source]);
-  }
-
-  test_invalidLiteralAnnotation_nonConstructor() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @literal
-  void m() {}
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.INVALID_LITERAL_ANNOTATION]);
-    verify([source]);
-  }
-
-  test_invalidSealedAnnotation_onClass() async {
-    Source source = addNamedSource('/lib1.dart', r'''
-import 'package:meta/meta.dart';
-
-@sealed class A {}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidSealedAnnotation_onMixin() async {
-    Source source = addNamedSource('/lib1.dart', r'''
-import 'package:meta/meta.dart';
-
-@sealed mixin M {}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.INVALID_SEALED_ANNOTATION]);
-    verify([source]);
-  }
-
-  test_invalidSealedAnnotation_onMixinApplication() async {
-    Source source = addNamedSource('/lib1.dart', r'''
-import 'package:meta/meta.dart';
-
-abstract class A {}
-
-abstract class B {}
-
-@sealed abstract class M = A with B;
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidSealedAnnotation_onNonClass() async {
-    Source source = addNamedSource('/lib1.dart', r'''
-import 'package:meta/meta.dart';
-
-@sealed m({a = 1}) => null;
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.INVALID_SEALED_ANNOTATION]);
-    verify([source]);
-  }
-
-  test_invalidUseOfProtectedMember_closure() async {
-    Source source = addNamedSource('/lib1.dart', r'''
-import 'package:meta/meta.dart';
-
-class A {
-  @protected
-  int a() => 42;
-}
-''');
-    Source source2 = addNamedSource('/lib2.dart', r'''
-import 'lib1.dart';
-
-void main() {
-  var leak = new A().a;
-  print(leak);
-}
-''');
-    await computeAnalysisResult(source);
-    await computeAnalysisResult(source2);
-    assertErrors(source2, [HintCode.INVALID_USE_OF_PROTECTED_MEMBER]);
-    assertNoErrors(source);
-    verify([source, source2]);
-  }
-
-  test_invalidUseOfProtectedMember_field() async {
-    Source source = addNamedSource('/lib1.dart', r'''
-import 'package:meta/meta.dart';
-class A {
-  @protected
-  int a;
-}
-''');
-    Source source2 = addNamedSource('/lib2.dart', r'''
-import 'lib1.dart';
-
-abstract class B {
-  int b() => new A().a;
-}
-''');
-    await computeAnalysisResult(source);
-    await computeAnalysisResult(source2);
-    assertErrors(source2, [HintCode.INVALID_USE_OF_PROTECTED_MEMBER]);
-    assertNoErrors(source);
-    verify([source, source2]);
-  }
-
-  test_invalidUseOfProtectedMember_field_OK() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @protected
-  int a;
-}
-abstract class B implements A {
-  int b() => a;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidUseOfProtectedMember_fromSuperclassConstraint() async {
-    Source sourceA = addNamedSource('/a.dart', r'''
-import 'package:meta/meta.dart';
-
-abstract class A {
-  @protected
-  void foo() {}
-}
-''');
-    Source sourceM = addNamedSource('/m.dart', r'''
-import 'a.dart';
-
-mixin M on A {
-  @override
-  void foo() {
-    super.foo();
-  }
-}
-''');
-
-    await computeAnalysisResult(sourceA);
-    await computeAnalysisResult(sourceM);
-    assertNoErrors(sourceA);
-    assertNoErrors(sourceM);
-    verify([sourceA, sourceM]);
-  }
-
-  test_invalidUseOfProtectedMember_function() async {
-    Source source = addNamedSource('/lib1.dart', r'''
-import 'package:meta/meta.dart';
-class A {
-  @protected
-  void a(){ }
-}
-''');
-    Source source2 = addNamedSource('/lib2.dart', r'''
-import 'lib1.dart';
-
-main() {
-  new A().a();
-}
-''');
-    await computeAnalysisResult(source);
-    await computeAnalysisResult(source2);
-    assertErrors(source2, [HintCode.INVALID_USE_OF_PROTECTED_MEMBER]);
-    assertNoErrors(source);
-    verify([source, source2]);
-  }
-
-  test_invalidUseOfProtectedMember_function_OK() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @protected
-  int a() => 0;
-}
-
-abstract class B implements A {
-  int b() => a();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidUseOfProtectedMember_function_OK2() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @protected
-  void a(){ }
-}
-main() {
-  new A().a();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidUseOfProtectedMember_getter() async {
-    Source source = addNamedSource('/lib1.dart', r'''
-import 'package:meta/meta.dart';
-class A {
-  @protected
-  int get a => 42;
-}
-''');
-    Source source2 = addNamedSource('/lib2.dart', r'''
-import 'lib1.dart';
-
-class B {
-  A a;
-  int b() => a.a;
-}
-''');
-    await computeAnalysisResult(source);
-    await computeAnalysisResult(source2);
-    assertErrors(source2, [HintCode.INVALID_USE_OF_PROTECTED_MEMBER]);
-    assertNoErrors(source);
-    verify([source, source2]);
-  }
-
-  test_invalidUseOfProtectedMember_getter_OK() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @protected
-  int get a => 42;
-}
-abstract class B implements A {
-  int b() => a;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidUseOfProtectedMember_in_docs_OK() async {
-    addNamedSource('/a.dart', r'''
-import 'package:meta/meta.dart';
-
-class A {
-  @protected
-  int c = 0;
-
-  @protected
-  int get b => 0;
-
-  @protected
-  int a() => 0;
-}
-''');
-    Source source = addSource(r'''
-import 'a.dart';
-
-/// OK: [A.a], [A.b], [A.c].
-f() {}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidUseOfProtectedMember_message() async {
-    Source source = addNamedSource('/lib1.dart', r'''
-import 'package:meta/meta.dart';
-class A {
-  @protected
-  void a(){ }
-}
-''');
-    Source source2 = addNamedSource('/lib2.dart', r'''
-import 'lib1.dart';
-
-class B {
-  void b() => new A().a();
-}
-''');
-    await computeAnalysisResult(source);
-    await computeAnalysisResult(source2);
-    assertErrors(source2, [HintCode.INVALID_USE_OF_PROTECTED_MEMBER]);
-    verify([source, source2]);
-  }
-
-  test_invalidUseOfProtectedMember_method_1() async {
-    Source source = addNamedSource('/lib1.dart', r'''
-import 'package:meta/meta.dart';
-class A {
-  @protected
-  void a(){ }
-}
-''');
-    Source source2 = addNamedSource('/lib2.dart', r'''
-import 'lib1.dart';
-
-class B {
-  void b() => new A().a();
-}
-''');
-
-    await computeAnalysisResult(source);
-    await computeAnalysisResult(source2);
-    assertErrors(source2, [HintCode.INVALID_USE_OF_PROTECTED_MEMBER]);
-    assertNoErrors(source);
-    verify([source, source2]);
-  }
-
-  test_invalidUseOfProtectedMember_method_OK() async {
-    // https://github.com/dart-lang/linter/issues/257
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-
-typedef void VoidCallback();
-
-class State<E> {
-  @protected
-  void setState(VoidCallback fn) {}
-}
-
-class Button extends State<Object> {
-  void handleSomething() {
-    setState(() {});
-  }
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidUseOfProtectedMember_OK_1() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @protected
-  void a(){ }
-}
-class B extends A {
-  void b() => a();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidUseOfProtectedMember_OK_2() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @protected
-  void a(){ }
-}
-class B extends Object with A {
-  void b() => a();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidUseOfProtectedMember_OK_3() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @protected m1() {}
-}
-class B extends A {
-  static m2(A a) => a.m1();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidUseOfProtectedMember_OK_4() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @protected
-  void a(){ }
-}
-class B extends A {
-  void a() => a();
-}
-main() {
-  new B().a();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidUseOfProtectedMember_OK_field() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @protected
-  int a = 42;
-}
-class B extends A {
-  int b() => a;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidUseOfProtectedMember_OK_getter() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @protected
-  int get a => 42;
-}
-class B extends A {
-  int b() => a;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidUseOfProtectedMember_OK_setter() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @protected
-  void set a(int i) { }
-}
-class B extends A {
-  void b(int i) {
-    a = i;
-  }
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidUseOfProtectedMember_OK_setter_2() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  int _a;
-  @protected
-  void set a(int a) { _a = a; }
-  A(int a) {
-    this.a = a;
-  }
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidUseOfProtectedMember_setter() async {
-    Source source = addNamedSource('/lib1.dart', r'''
-import 'package:meta/meta.dart';
-class A {
-  @protected
-  void set a(int i) { }
-}
-''');
-    Source source2 = addNamedSource('/lib2.dart', r'''
-import 'lib1.dart';
-
-class B{
-  A a;
-  b(int i) {
-    a.a = i;
-  }
-}
-''');
-    await computeAnalysisResult(source);
-    await computeAnalysisResult(source2);
-    assertErrors(source2, [HintCode.INVALID_USE_OF_PROTECTED_MEMBER]);
-    assertNoErrors(source);
-    verify([source, source2]);
-  }
-
-  test_invalidUseOfProtectedMember_setter_OK() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @protected
-  void set a(int i) { }
-}
-abstract class B implements A {
-  b(int i) {
-    a = i;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidUseOfProtectedMember_topLevelVariable() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-@protected
-int x = 0;
-main() {
-  print(x);
-}''');
-    // TODO(brianwilkerson) This should produce a hint because the annotation is
-    // being applied to the wrong kind of declaration.
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidUseOfVisibleForTemplateMember_constructor() async {
-    Source source = addNamedSource('/lib1.dart', r'''
-import 'package:angular_meta/angular_meta.dart';
-class A {
-  int _x;
-
-  @visibleForTemplate
-  A.forTemplate(this._x);
-}
-''');
-    Source source2 = addNamedSource('/lib2.dart', r'''
-import 'lib1.dart';
-
-void main() {
-  new A.forTemplate(0);
-}
-''');
-    await computeAnalysisResult(source);
-    await computeAnalysisResult(source2);
-    assertErrors(
-        source2, [HintCode.INVALID_USE_OF_VISIBLE_FOR_TEMPLATE_MEMBER]);
-    verify([source, source2]);
-  }
-
-  test_invalidUseOfVisibleForTemplateMember_export_OK() async {
-    Source source = addNamedSource('/lib1.dart', r'''
-import 'package:angular_meta/angular_meta.dart';
-
-@visibleForTemplate
-int fn0() => 1;
-''');
-    Source source2 = addNamedSource('/lib2.dart', r'''
-export 'lib1.dart' show fn0;
-''');
-    await computeAnalysisResult(source);
-    await computeAnalysisResult(source2);
-    assertNoErrors(source2);
-    verify([source, source2]);
-  }
-
-  test_invalidUseOfVisibleForTemplateMember_method() async {
-    Source source = addNamedSource('/lib1.dart', r'''
-import 'package:angular_meta/angular_meta.dart';
-class A {
-  @visibleForTemplate
-  void a(){ }
-}
-''');
-    Source source2 = addNamedSource('/lib2.dart', r'''
-import 'lib1.dart';
-
-class B {
-  void b() => new A().a();
-}
-''');
-    await computeAnalysisResult(source);
-    await computeAnalysisResult(source2);
-    assertErrors(
-        source2, [HintCode.INVALID_USE_OF_VISIBLE_FOR_TEMPLATE_MEMBER]);
-    verify([source, source2]);
-  }
-
-  test_invalidUseOfVisibleForTemplateMember_method_OK() async {
-    Source source = addNamedSource('/lib1.dart', r'''
-import 'package:angular_meta/angular_meta.dart';
-class A {
-  @visibleForTemplate
-  void a(){ }
-}
-''');
-    Source source2 = addNamedSource('/lib1.template.dart', r'''
-import 'lib1.dart';
-
-class B {
-  void b() => new A().a();
-}
-''');
-    await computeAnalysisResult(source);
-    await computeAnalysisResult(source2);
-    assertNoErrors(source2);
-    verify([source, source2]);
-  }
-
-  test_invalidUseOfVisibleForTemplateMember_propertyAccess() async {
-    Source source = addNamedSource('/lib1.dart', r'''
-import 'package:angular_meta/angular_meta.dart';
-class A {
-  @visibleForTemplate
-  int get a => 7;
-
-  @visibleForTemplate
-  set b(_) => 7;
-}
-''');
-    Source source2 = addNamedSource('/lib2.dart', r'''
-import 'lib1.dart';
-
-void main() {
-  new A().a;
-  new A().b = 6;
-}
-''');
-    await computeAnalysisResult(source);
-    await computeAnalysisResult(source2);
-    assertErrors(source2, [
-      HintCode.INVALID_USE_OF_VISIBLE_FOR_TEMPLATE_MEMBER,
-      HintCode.INVALID_USE_OF_VISIBLE_FOR_TEMPLATE_MEMBER
-    ]);
-    verify([source, source2]);
-  }
-
-  test_invalidUseOfVisibleForTemplateMember_topLevelFunction() async {
-    Source source = addNamedSource('/lib1.dart', r'''
-import 'package:angular_meta/angular_meta.dart';
-
-@visibleForTemplate
-int fn0() => 1;
-''');
-    Source source2 = addNamedSource('/lib2.dart', r'''
-import 'lib1.dart';
-
-void main() {
-  fn0();
-}
-''');
-    await computeAnalysisResult(source);
-    await computeAnalysisResult(source2);
-    assertErrors(
-        source2, [HintCode.INVALID_USE_OF_VISIBLE_FOR_TEMPLATE_MEMBER]);
-    verify([source, source2]);
-  }
-
-  test_invalidUseOfVisibleForTestingMember_constructor() async {
-    Source source = addNamedSource('/lib1.dart', r'''
-import 'package:meta/meta.dart';
-class A {
-  int _x;
-
-  @visibleForTesting
-  A.forTesting(this._x);
-}
-''');
-    Source source2 = addNamedSource('/lib2.dart', r'''
-import 'lib1.dart';
-
-void main() {
-  new A.forTesting(0);
-}
-''');
-    await computeAnalysisResult(source);
-    await computeAnalysisResult(source2);
-    assertErrors(source2, [HintCode.INVALID_USE_OF_VISIBLE_FOR_TESTING_MEMBER]);
-    verify([source, source2]);
-  }
-
-  test_invalidUseOfVisibleForTestingMember_export_OK() async {
-    Source source = addNamedSource('/lib1.dart', r'''
-import 'package:meta/meta.dart';
-
-@visibleForTesting
-int fn0() => 1;
-''');
-    Source source2 = addNamedSource('/lib2.dart', r'''
-export 'lib1.dart' show fn0;
-''');
-    await computeAnalysisResult(source);
-    await computeAnalysisResult(source2);
-    assertNoErrors(source2);
-    verify([source, source2]);
-  }
-
-  test_invalidUseOfVisibleForTestingMember_method() async {
-    Source source = addNamedSource('/lib1.dart', r'''
-import 'package:meta/meta.dart';
-class A {
-  @visibleForTesting
-  void a(){ }
-}
-''');
-    Source source2 = addNamedSource('/lib2.dart', r'''
-import 'lib1.dart';
-
-class B {
-  void b() => new A().a();
-}
-''');
-    await computeAnalysisResult(source);
-    await computeAnalysisResult(source2);
-    assertErrors(source2, [HintCode.INVALID_USE_OF_VISIBLE_FOR_TESTING_MEMBER]);
-    verify([source, source2]);
-  }
-
-  test_invalidUseOfVisibleForTestingMember_method_OK() async {
-    Source source = addNamedSource('/lib1.dart', r'''
-import 'package:meta/meta.dart';
-class A {
-  @visibleForTesting
-  void a(){ }
-}
-''');
-    Source source2 = addNamedSource('/test/test1.dart', r'''
-import '../lib1.dart';
-
-class B {
-  void b() => new A().a();
-}
-''');
-    Source source3 = addNamedSource('/testing/lib1.dart', r'''
-import '../lib1.dart';
-
-class C {
-  void b() => new A().a();
-}
-''');
-    await computeAnalysisResult(source);
-    await computeAnalysisResult(source2);
-    await computeAnalysisResult(source3);
-    assertNoErrors(source2);
-    assertNoErrors(source3);
-    verify([source, source2, source3]);
-  }
-
-  test_invalidUseOfVisibleForTestingMember_propertyAccess() async {
-    Source source = addNamedSource('/lib1.dart', r'''
-import 'package:meta/meta.dart';
-class A {
-  @visibleForTesting
-  int get a => 7;
-
-  @visibleForTesting
-  set b(_) => 7;
-}
-''');
-    Source source2 = addNamedSource('/lib2.dart', r'''
-import 'lib1.dart';
-
-void main() {
-  new A().a;
-  new A().b = 6;
-}
-''');
-    await computeAnalysisResult(source);
-    await computeAnalysisResult(source2);
-    assertErrors(source2, [
-      HintCode.INVALID_USE_OF_VISIBLE_FOR_TESTING_MEMBER,
-      HintCode.INVALID_USE_OF_VISIBLE_FOR_TESTING_MEMBER
-    ]);
-    verify([source, source2]);
-  }
-
-  test_invalidUseOfVisibleForTestingMember_topLevelFunction() async {
-    Source source = addNamedSource('/lib1.dart', r'''
-import 'package:meta/meta.dart';
-
-@visibleForTesting
-int fn0() => 1;
-''');
-    Source source2 = addNamedSource('/lib2.dart', r'''
-import 'lib1.dart';
-
-void main() {
-  fn0();
-}
-''');
-    await computeAnalysisResult(source);
-    await computeAnalysisResult(source2);
-    assertErrors(source2, [HintCode.INVALID_USE_OF_VISIBLE_FOR_TESTING_MEMBER]);
-    verify([source, source2]);
-  }
-
-  test_invalidUseProtectedAndForTemplate_asProtected_OK() async {
-    Source source = addNamedSource('/lib1.dart', r'''
-import 'package:angular_meta/angular_meta.dart';
-import 'package:meta/meta.dart';
-class A {
-  @protected
-  @visibleForTemplate
-  void a(){ }
-}
-''');
-    Source source2 = addNamedSource('/lib2.dart', r'''
-import 'lib1.dart';
-
-class B extends A {
-  void b() => new A().a();
-}
-''');
-    await computeAnalysisResult(source);
-    await computeAnalysisResult(source2);
-    assertNoErrors(source2);
-    verify([source, source2]);
-  }
-
-  test_invalidUseProtectedAndForTemplate_asTemplate_OK() async {
-    Source source = addNamedSource('/lib1.dart', r'''
-import 'package:angular_meta/angular_meta.dart';
-import 'package:meta/meta.dart';
-class A {
-  @protected
-  @visibleForTemplate
-  void a(){ }
-}
-''');
-    Source source2 = addNamedSource('/lib1.template.dart', r'''
-import 'lib1.dart';
-
-void main() {
-  new A().a();
-}
-''');
-    await computeAnalysisResult(source);
-    await computeAnalysisResult(source2);
-    assertNoErrors(source2);
-    verify([source, source2]);
-  }
-
-  test_invalidUseProtectedAndForTesting_asProtected_OK() async {
-    Source source = addNamedSource('/lib1.dart', r'''
-import 'package:meta/meta.dart';
-class A {
-  @protected
-  @visibleForTesting
-  void a(){ }
-}
-''');
-    Source source2 = addNamedSource('/lib2.dart', r'''
-import 'lib1.dart';
-
-class B extends A {
-  void b() => new A().a();
-}
-''');
-    await computeAnalysisResult(source);
-    await computeAnalysisResult(source2);
-    assertNoErrors(source2);
-    verify([source, source2]);
-  }
-
-  test_invalidUseProtectedAndForTesting_asTesting_OK() async {
-    Source source = addNamedSource('/lib1.dart', r'''
-import 'package:meta/meta.dart';
-class A {
-  @protected
-  @visibleForTesting
-  void a(){ }
-}
-''');
-    Source source2 = addNamedSource('/test/test1.dart', r'''
-import '../lib1.dart';
-
-void main() {
-  new A().a();
-}
-''');
-    await computeAnalysisResult(source);
-    await computeAnalysisResult(source2);
-    assertNoErrors(source2);
-    verify([source, source2]);
-  }
-
   test_isDouble() async {
     AnalysisOptionsImpl options = new AnalysisOptionsImpl();
     options.dart2jsHint = true;
@@ -2310,761 +235,6 @@
     verify([source]);
   }
 
-  test_missingReturn_async() async {
-    Source source = addSource('''
-import 'dart:async';
-Future<int> f() async {}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.MISSING_RETURN]);
-    verify([source]);
-  }
-
-  test_missingReturn_factory() async {
-    Source source = addSource(r'''
-class A {
-  factory A() {}
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.MISSING_RETURN]);
-    verify([source]);
-  }
-
-  test_missingReturn_function() async {
-    Source source = addSource("int f() {}");
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.MISSING_RETURN]);
-    verify([source]);
-  }
-
-  test_missingReturn_method() async {
-    Source source = addSource(r'''
-class A {
-  int m() {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.MISSING_RETURN]);
-    verify([source]);
-  }
-
-  test_missingReturn_method_inferred() async {
-    Source source = addSource(r'''
-abstract class A {
-  int m();
-}
-class B extends A {
-  m() {}
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.MISSING_RETURN]);
-    verify([source]);
-  }
-
-  test_mustBeImmutable_direct() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-@immutable
-class A {
-  int x;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.MUST_BE_IMMUTABLE]);
-    verify([source]);
-  }
-
-  test_mustBeImmutable_directMixin() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-@immutable
-mixin A {
-  int x;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.MUST_BE_IMMUTABLE]);
-    verify([source]);
-  }
-
-  test_mustBeImmutable_extends() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-@immutable
-class A {}
-class B extends A {
-  int x;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.MUST_BE_IMMUTABLE]);
-    verify([source]);
-  }
-
-  test_mustBeImmutable_fromMixin() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-@immutable
-class A {}
-class B {
-  int x;
-}
-class C extends A with B {}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.MUST_BE_IMMUTABLE]);
-    verify([source]);
-  }
-
-  test_mustBeImmutable_instance() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-@immutable
-class A {
-  static int x;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, []);
-    verify([source]);
-  }
-
-  test_mustBeImmutable_mixinApplication() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-@immutable
-class A {}
-class B {
-  int x;
-}
-class C = A with B;
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.MUST_BE_IMMUTABLE]);
-    verify([source]);
-  }
-
-  test_mustBeImmutable_mixinApplicationBase() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  int x;
-}
-class B {}
-@immutable
-class C = A with B;
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.MUST_BE_IMMUTABLE]);
-    verify([source]);
-  }
-
-  test_mustCallSuper() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @mustCallSuper
-  void a() {}
-}
-class B extends A {
-  @override
-  void a()
-  {}
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.MUST_CALL_SUPER]);
-    verify([source]);
-  }
-
-  test_mustCallSuper_fromInterface() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @mustCallSuper
-  void a() {}
-}
-class C implements A {
-  @override
-  void a() {}
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, []);
-    verify([source]);
-  }
-
-  test_mustCallSuper_indirect() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @mustCallSuper
-  void a() {}
-}
-class C extends A {
-  @override
-  void a() {
-    super.a();
-  }
-}
-class D extends C {
-  @override
-  void a() {}
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.MUST_CALL_SUPER]);
-    verify([source]);
-  }
-
-  test_mustCallSuper_overridden() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @mustCallSuper
-  void a() {}
-}
-class C extends A {
-  @override
-  void a() {
-    super.a(); //OK
-  }
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, []);
-    verify([source]);
-  }
-
-  test_mustCallSuper_overridden_w_future() async {
-    //https://github.com/flutter/flutter/issues/11646
-    Source source = addSource(r'''
-import 'dart:async';
-import 'package:meta/meta.dart';
-class A {
-  @mustCallSuper
-  Future<Null> bar() => new Future<Null>.value();
-}
-class C extends A {
-  @override
-  Future<Null> bar() {
-    final value = super.bar();
-    return value.then((Null _) {
-      return null;
-    });
-  }
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, []);
-    verify([source]);
-  }
-
-  test_mustCallSuper_overridden_w_future2() async {
-    //https://github.com/flutter/flutter/issues/11646
-    Source source = addSource(r'''
-import 'dart:async';
-import 'package:meta/meta.dart';
-class A {
-  @mustCallSuper
-  Future<Null> bar() => new Future<Null>.value();
-}
-class C extends A {
-  @override
-  Future<Null> bar() {
-    return super.bar().then((Null _) {
-      return null;
-    });
-  }
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, []);
-    verify([source]);
-  }
-
-  test_no_missingReturn_async_futureOrVoid() async {
-    Source source = addSource('''
-import 'dart:async';
-FutureOr<void> f(Future f) async {}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_no_missingReturn_async_futureVoid() async {
-    Source source = addSource('''
-import 'dart:async';
-Future<void> f() async {}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nullAwareBeforeOperator_minus() async {
-    Source source = addSource(r'''
-m(x) {
-  x?.a - '';
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.NULL_AWARE_BEFORE_OPERATOR]);
-    verify([source]);
-  }
-
-  test_nullAwareBeforeOperator_ok_assignment() async {
-    Source source = addSource(r'''
-m(x) {
-  x?.a = '';
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nullAwareBeforeOperator_ok_equal_equal() async {
-    Source source = addSource(r'''
-m(x) {
-  x?.a == '';
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nullAwareBeforeOperator_ok_is() async {
-    Source source = addSource(r'''
-m(x) {
-  x?.a is String;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nullAwareBeforeOperator_ok_is_not() async {
-    Source source = addSource(r'''
-m(x) {
-  x?.a is! String;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nullAwareBeforeOperator_ok_not_equal() async {
-    Source source = addSource(r'''
-m(x) {
-  x?.a != '';
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nullAwareBeforeOperator_ok_question_question() async {
-    Source source = addSource(r'''
-m(x) {
-  x?.a ?? true;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nullAwareInCondition_assert() async {
-    Source source = addSource(r'''
-m(x) {
-  assert (x?.a);
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
-    verify([source]);
-  }
-
-  test_nullAwareInCondition_conditionalExpression() async {
-    Source source = addSource(r'''
-m(x) {
-  return x?.a ? 0 : 1;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
-    verify([source]);
-  }
-
-  test_nullAwareInCondition_do() async {
-    Source source = addSource(r'''
-m(x) {
-  do {} while (x?.a);
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
-    verify([source]);
-  }
-
-  test_nullAwareInCondition_for() async {
-    Source source = addSource(r'''
-m(x) {
-  for (var v = x; v?.a; v = v.next) {}
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
-    verify([source]);
-  }
-
-  test_nullAwareInCondition_if() async {
-    Source source = addSource(r'''
-m(x) {
-  if (x?.a) {}
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
-    verify([source]);
-  }
-
-  test_nullAwareInCondition_if_parenthesized() async {
-    Source source = addSource(r'''
-m(x) {
-  if ((x?.a)) {}
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
-    verify([source]);
-  }
-
-  test_nullAwareInCondition_while() async {
-    Source source = addSource(r'''
-m(x) {
-  while (x?.a) {}
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_CONDITION]);
-    verify([source]);
-  }
-
-  test_nullAwareInLogicalOperator_conditionalAnd_first() async {
-    Source source = addSource(r'''
-m(x) {
-  x?.a && x.b;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
-    verify([source]);
-  }
-
-  test_nullAwareInLogicalOperator_conditionalAnd_second() async {
-    Source source = addSource(r'''
-m(x) {
-  x.a && x?.b;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
-    verify([source]);
-  }
-
-  test_nullAwareInLogicalOperator_conditionalAnd_third() async {
-    Source source = addSource(r'''
-m(x) {
-  x.a && x.b && x?.c;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
-    verify([source]);
-  }
-
-  test_nullAwareInLogicalOperator_conditionalOr_first() async {
-    Source source = addSource(r'''
-m(x) {
-  x?.a || x.b;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
-    verify([source]);
-  }
-
-  test_nullAwareInLogicalOperator_conditionalOr_second() async {
-    Source source = addSource(r'''
-m(x) {
-  x.a || x?.b;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
-    verify([source]);
-  }
-
-  test_nullAwareInLogicalOperator_conditionalOr_third() async {
-    Source source = addSource(r'''
-m(x) {
-  x.a || x.b || x?.c;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
-    verify([source]);
-  }
-
-  test_nullAwareInLogicalOperator_not() async {
-    Source source = addSource(r'''
-m(x) {
-  !x?.a;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
-    verify([source]);
-  }
-
-  @failingTest
-  test_overrideEqualsButNotHashCode() async {
-    Source source = addSource(r'''
-class A {
-  bool operator ==(x) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.OVERRIDE_EQUALS_BUT_NOT_HASH_CODE]);
-    verify([source]);
-  }
-
-  test_overrideOnNonOverridingField_invalid() async {
-    Source source = addSource(r'''
-class A {
-}
-class B extends A {
-  @override
-  final int m = 1;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.OVERRIDE_ON_NON_OVERRIDING_FIELD]);
-    verify([source]);
-  }
-
-  test_overrideOnNonOverridingGetter_invalid() async {
-    Source source = addSource(r'''
-class A {
-}
-class B extends A {
-  @override
-  int get m => 1;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.OVERRIDE_ON_NON_OVERRIDING_GETTER]);
-    verify([source]);
-  }
-
-  test_overrideOnNonOverridingMethod_invalid() async {
-    Source source = addSource(r'''
-class A {
-}
-class B extends A {
-  @override
-  int m() => 1;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.OVERRIDE_ON_NON_OVERRIDING_METHOD]);
-    verify([source]);
-  }
-
-  test_overrideOnNonOverridingSetter_invalid() async {
-    Source source = addSource(r'''
-class A {
-}
-class B extends A {
-  @override
-  set m(int x) {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.OVERRIDE_ON_NON_OVERRIDING_SETTER]);
-    verify([source]);
-  }
-
-  test_required_constructor_param() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-
-class C {
-  C({@Required('must specify an `a`') int a}) {}
-}
-
-main() {
-  new C();
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.MISSING_REQUIRED_PARAM_WITH_DETAILS]);
-    verify([source]);
-  }
-
-  test_required_constructor_param_no_reason() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-
-class C {
-  C({@required int a}) {}
-}
-
-main() {
-  new C();
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.MISSING_REQUIRED_PARAM]);
-    verify([source]);
-  }
-
-  test_required_constructor_param_null_reason() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-
-class C {
-  C({@Required(null) int a}) {}
-}
-
-main() {
-  new C();
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.MISSING_REQUIRED_PARAM]);
-    verify([source]);
-  }
-
-  test_required_constructor_param_OK() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-
-class C {
-  C({@required int a}) {}
-}
-
-main() {
-  new C(a: 2);
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_required_constructor_param_redirecting_cons_call() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-
-class C {
-  C({@required int x});
-  C.named() : this();
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.MISSING_REQUIRED_PARAM]);
-    verify([source]);
-  }
-
-  test_required_constructor_param_super_call() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-
-class C {
-  C({@Required('must specify an `a`') int a}) {}
-}
-
-class D extends C {
-  D() : super();
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.MISSING_REQUIRED_PARAM_WITH_DETAILS]);
-    verify([source]);
-  }
-
-  test_required_function_param() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-
-void f({@Required('must specify an `a`') int a}) {}
-
-main() {
-  f();
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.MISSING_REQUIRED_PARAM_WITH_DETAILS]);
-    verify([source]);
-  }
-
-  test_required_method_param() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  void m({@Required('must specify an `a`') int a}) {}
-}
-f() {
-  new A().m();
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.MISSING_REQUIRED_PARAM_WITH_DETAILS]);
-    verify([source]);
-  }
-
-  test_required_method_param_in_other_lib() async {
-    addNamedSource('/a_lib.dart', r'''
-library a_lib;
-import 'package:meta/meta.dart';
-class A {
-  void m({@Required('must specify an `a`') int a}) {}
-}
-''');
-
-    Source source = addSource(r'''
-import "a_lib.dart";
-f() {
-  new A().m();
-}
-''');
-
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.MISSING_REQUIRED_PARAM_WITH_DETAILS]);
-    verify([source]);
-  }
-
-  test_required_typedef_function_param() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-
-String test(C c) => c.m()();
-
-typedef String F({@required String x});
-
-class C {
-  F m() => ({@required String x}) => null;
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.MISSING_REQUIRED_PARAM]);
-    verify([source]);
-  }
-
   test_strongMode_downCastCompositeHint() async {
     AnalysisOptionsImpl options = new AnalysisOptionsImpl();
     options.strongModeHints = true;
diff --git a/pkg/analyzer/test/generated/invalid_code.dart b/pkg/analyzer/test/generated/invalid_code.dart
deleted file mode 100644
index b7e6944..0000000
--- a/pkg/analyzer/test/generated/invalid_code.dart
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:async';
-
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:test/test.dart';
-
-import 'resolver_test_case.dart';
-
-/**
- * Tests for various end-to-end cases when invalid code caused exceptions
- * in one or another Analyzer subsystem. We are not interested not in specific
- * errors generated, but we want to make sure that there is at least one,
- * and analysis finishes without exceptions.
- */
-abstract class InvalidCodeTest extends ResolverTestCase {
-  @override
-  AnalysisOptions get defaultAnalysisOptions => new AnalysisOptionsImpl();
-
-  /**
-   * This code results in a method with the empty name, and the default
-   * constructor, which also has the empty name. The `Map` in `f` initializer
-   * references the empty name.
-   */
-  test_constructorAndMethodNameCollision() async {
-    await _assertCanBeAnalyzed('''
-class C {
-  var f = { : };
-  @ ();
-}
-''');
-  }
-
-  test_genericFunction_asTypeArgument_ofUnresolvedClass() async {
-    await _assertCanBeAnalyzed(r'''
-C<int Function()> c;
-''');
-  }
-
-  Future<void> _assertCanBeAnalyzed(String text) async {
-    Source source = addSource(text);
-    var analysisResult = await computeAnalysisResult(source);
-    expect(analysisResult.errors, isNotEmpty);
-  }
-}
diff --git a/pkg/analyzer/test/generated/invalid_code_driver_test.dart b/pkg/analyzer/test/generated/invalid_code_driver_test.dart
deleted file mode 100644
index b457f67..0000000
--- a/pkg/analyzer/test/generated/invalid_code_driver_test.dart
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import 'invalid_code.dart';
-
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(InvalidCodeTest_Driver);
-  });
-}
-
-@reflectiveTest
-class InvalidCodeTest_Driver extends InvalidCodeTest {
-  @override
-  bool get enableNewAnalysisDriver => true;
-}
diff --git a/pkg/analyzer/test/generated/invalid_code_test.dart b/pkg/analyzer/test/generated/invalid_code_test.dart
new file mode 100644
index 0000000..3d24f99
--- /dev/null
+++ b/pkg/analyzer/test/generated/invalid_code_test.dart
@@ -0,0 +1,56 @@
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/generated/source.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'resolver_test_case.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(InvalidCodeTest);
+  });
+}
+
+/**
+ * Tests for various end-to-end cases when invalid code caused exceptions
+ * in one or another Analyzer subsystem. We are not interested not in specific
+ * errors generated, but we want to make sure that there is at least one,
+ * and analysis finishes without exceptions.
+ */
+@reflectiveTest
+class InvalidCodeTest extends ResolverTestCase {
+  @override
+  AnalysisOptions get defaultAnalysisOptions => new AnalysisOptionsImpl();
+
+  /**
+   * This code results in a method with the empty name, and the default
+   * constructor, which also has the empty name. The `Map` in `f` initializer
+   * references the empty name.
+   */
+  test_constructorAndMethodNameCollision() async {
+    await _assertCanBeAnalyzed('''
+class C {
+  var f = { : };
+  @ ();
+}
+''');
+  }
+
+  test_genericFunction_asTypeArgument_ofUnresolvedClass() async {
+    await _assertCanBeAnalyzed(r'''
+C<int Function()> c;
+''');
+  }
+
+  Future<void> _assertCanBeAnalyzed(String text) async {
+    Source source = addSource(text);
+    var analysisResult = await computeAnalysisResult(source);
+    expect(analysisResult.errors, isNotEmpty);
+  }
+}
diff --git a/pkg/analyzer/test/generated/non_error_resolver.dart b/pkg/analyzer/test/generated/non_error_resolver.dart
deleted file mode 100644
index 3d06cd2..0000000
--- a/pkg/analyzer/test/generated/non_error_resolver.dart
+++ /dev/null
@@ -1,6028 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:async';
-
-import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/dart/ast/standard_resolution_map.dart';
-import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/error/error.dart';
-import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode;
-import 'package:analyzer/src/generated/source_io.dart';
-import 'package:test/test.dart';
-
-import 'resolver_test_case.dart';
-
-class NonErrorResolverTestBase extends ResolverTestCase {
-  @override
-  AnalysisOptions get defaultAnalysisOptions => new AnalysisOptionsImpl();
-
-  fail_undefinedEnumConstant() async {
-    Source source = addSource(r'''
-enum E { ONE }
-E e() {
-  return E.TWO;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_ambiguousExport() async {
-    Source source = addSource(r'''
-library L;
-export 'lib1.dart';
-export 'lib2.dart';''');
-    addNamedSource("/lib1.dart", r'''
-library lib1;
-class M {}''');
-    addNamedSource("/lib2.dart", r'''
-library lib2;
-class N {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_ambiguousExport_combinators_hide() async {
-    Source source = addSource(r'''
-library L;
-export 'lib1.dart';
-export 'lib2.dart' hide B;''');
-    addNamedSource("/lib1.dart", r'''
-library L1;
-class A {}
-class B {}''');
-    addNamedSource("/lib2.dart", r'''
-library L2;
-class B {}
-class C {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_ambiguousExport_combinators_show() async {
-    Source source = addSource(r'''
-library L;
-export 'lib1.dart';
-export 'lib2.dart' show C;''');
-    addNamedSource("/lib1.dart", r'''
-library L1;
-class A {}
-class B {}''');
-    addNamedSource("/lib2.dart", r'''
-library L2;
-class B {}
-class C {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_ambiguousExport_sameDeclaration() async {
-    Source source = addSource(r'''
-library L;
-export 'lib.dart';
-export 'lib.dart';''');
-    addNamedSource("/lib.dart", r'''
-library lib;
-class N {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_ambiguousImport_dart_implicitHide() async {
-    Source source = addSource(r'''
-import 'dart:async';
-import 'lib.dart';
-main() {
-  print(Future.zero);
-}
-''');
-    addNamedSource('/lib.dart', r'''
-class Future {
-  static const zero = 0;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-  }
-
-  test_ambiguousImport_hideCombinator() async {
-    Source source = addSource(r'''
-import 'lib1.dart';
-import 'lib2.dart';
-import 'lib3.dart' hide N;
-main() {
-  new N1();
-  new N2();
-  new N3();
-}''');
-    addNamedSource("/lib1.dart", r'''
-library lib1;
-class N {}
-class N1 {}''');
-    addNamedSource("/lib2.dart", r'''
-library lib2;
-class N {}
-class N2 {}''');
-    addNamedSource("/lib3.dart", r'''
-library lib3;
-class N {}
-class N3 {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-  }
-
-  test_ambiguousImport_showCombinator() async {
-    Source source = addSource(r'''
-import 'lib1.dart';
-import 'lib2.dart' show N, N2;
-main() {
-  new N1();
-  new N2();
-}''');
-    addNamedSource("/lib1.dart", r'''
-library lib1;
-class N {}
-class N1 {}''');
-    addNamedSource("/lib2.dart", r'''
-library lib2;
-class N {}
-class N2 {}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.UNUSED_SHOWN_NAME]);
-  }
-
-  test_annotated_partOfDeclaration() async {
-    Source source = addSource('library L; part "part.dart";');
-    addNamedSource('/part.dart', '@deprecated part of L;');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_argumentTypeNotAssignable_classWithCall_Function() async {
-    Source source = addSource(r'''
-  caller(Function callee) {
-    callee();
-  }
-
-  class CallMeBack {
-    call() => 0;
-  }
-
-  main() {
-    caller(new CallMeBack());
-  }''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_argumentTypeNotAssignable_fieldFormalParameterElement_member() async {
-    Source source = addSource(r'''
-class ObjectSink<T> {
-  void sink(T object) {
-    new TimestampedObject<T>(object);
-  }
-}
-class TimestampedObject<E> {
-  E object2;
-  TimestampedObject(this.object2);
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_argumentTypeNotAssignable_invocation_functionParameter_generic() async {
-    Source source = addSource(r'''
-class A<K> {
-  m(f(K k), K v) {
-    f(v);
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_argumentTypeNotAssignable_invocation_typedef_generic() async {
-    Source source = addSource(r'''
-typedef A<T>(T p);
-f(A<int> a) {
-  a(1);
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_argumentTypeNotAssignable_Object_Function() async {
-    Source source = addSource(r'''
-main() {
-  process(() {});
-}
-process(Object x) {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_argumentTypeNotAssignable_optionalNew() async {
-    resetWith(options: new AnalysisOptionsImpl());
-    Source source = addSource(r'''
-class Widget { }
-
-class MaterialPageRoute {
-  final Widget Function() builder;
-  const MaterialPageRoute({this.builder});
-}
-
-void main() {
-  print(MaterialPageRoute(
-      builder: () { return Widget(); }
-  ));
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_argumentTypeNotAssignable_typedef_local() async {
-    Source source = addSource(r'''
-typedef A(int p1, String p2);
-A getA() => null;
-f() {
-  A a = getA();
-  a(1, '2');
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_argumentTypeNotAssignable_typedef_parameter() async {
-    Source source = addSource(r'''
-typedef A(int p1, String p2);
-f(A a) {
-  a(1, '2');
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_assert_with_message_await() async {
-    Source source = addSource('''
-import 'dart:async';
-f() async {
-  assert(false, await g());
-}
-Future<String> g() => null;
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_assert_with_message_dynamic() async {
-    Source source = addSource('''
-f() {
-  assert(false, g());
-}
-g() => null;
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_assert_with_message_non_string() async {
-    Source source = addSource('''
-f() {
-  assert(false, 3);
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_assert_with_message_null() async {
-    Source source = addSource('''
-f() {
-  assert(false, null);
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_assert_with_message_string() async {
-    Source source = addSource('''
-f() {
-  assert(false, 'message');
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_assert_with_message_suppresses_unused_var_hint() async {
-    Source source = addSource('''
-f() {
-  String message = 'msg';
-  assert(true, message);
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_assignability_function_expr_rettype_from_typedef_cls() async {
-    // In the code below, the type of (() => f()) has a return type which is
-    // a class, and that class is inferred from the return type of the typedef
-    // F.
-    Source source = addSource('''
-class C {}
-typedef C F();
-F f;
-main() {
-  F f2 = (() => f());
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_assignability_function_expr_rettype_from_typedef_typedef() async {
-    // In the code below, the type of (() => f()) has a return type which is
-    // a typedef, and that typedef is inferred from the return type of the
-    // typedef F.
-    Source source = addSource('''
-typedef G F();
-typedef G();
-F f;
-main() {
-  F f2 = (() => f());
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_assignmentToFinal_prefixNegate() async {
-    Source source = addSource(r'''
-f() {
-  final x = 0;
-  -x;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_assignmentToFinalNoSetter_prefixedIdentifier() async {
-    Source source = addSource(r'''
-class A {
-  int get x => 0;
-  set x(v) {}
-}
-main() {
-  A a = new A();
-  a.x = 0;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_assignmentToFinalNoSetter_propertyAccess() async {
-    Source source = addSource(r'''
-class A {
-  int get x => 0;
-  set x(v) {}
-}
-class B {
-  static A a;
-}
-main() {
-  B.a.x = 0;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_assignmentToFinals_importWithPrefix() async {
-    Source source = addSource(r'''
-library lib;
-import 'lib1.dart' as foo;
-main() {
-  foo.x = true;
-}''');
-    addNamedSource("/lib1.dart", r'''
-library lib1;
-bool x = false;''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_async_dynamic_with_return() async {
-    Source source = addSource('''
-dynamic f() async {
-  return;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_async_dynamic_with_return_value() async {
-    Source source = addSource('''
-dynamic f() async {
-  return 5;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_async_dynamic_without_return() async {
-    Source source = addSource('''
-dynamic f() async {}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_async_expression_function_type() async {
-    Source source = addSource('''
-import 'dart:async';
-typedef Future<int> F(int i);
-main() {
-  F f = (int i) async => i;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_async_flattened() async {
-    Source source = addSource('''
-import 'dart:async';
-typedef Future<int> CreatesFutureInt();
-main() {
-  CreatesFutureInt createFutureInt = () async => f();
-  Future<int> futureInt = createFutureInt();
-  futureInt.then((int i) => print(i));
-}
-Future<int> f() => null;
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_async_future_dynamic_with_return() async {
-    Source source = addSource('''
-import 'dart:async';
-Future<dynamic> f() async {
-  return;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_async_future_dynamic_with_return_value() async {
-    Source source = addSource('''
-import 'dart:async';
-Future<dynamic> f() async {
-  return 5;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_async_future_dynamic_without_return() async {
-    Source source = addSource('''
-import 'dart:async';
-Future<dynamic> f() async {}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_async_future_int_with_return_future_int() async {
-    Source source = addSource('''
-import 'dart:async';
-Future<int> f() async {
-  return new Future<int>.value(5);
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_async_future_int_with_return_value() async {
-    Source source = addSource('''
-import 'dart:async';
-Future<int> f() async {
-  return 5;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_async_future_null_with_return() async {
-    Source source = addSource('''
-import 'dart:async';
-Future<Null> f() async {
-  return;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_async_future_null_without_return() async {
-    Source source = addSource('''
-import 'dart:async';
-Future<Null> f() async {}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_async_future_object_with_return_value() async {
-    Source source = addSource('''
-import 'dart:async';
-Future<Object> f() async {
-  return 5;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_async_future_with_return() async {
-    Source source = addSource('''
-import 'dart:async';
-Future f() async {
-  return;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_async_future_with_return_value() async {
-    Source source = addSource('''
-import 'dart:async';
-Future f() async {
-  return 5;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_async_future_without_return() async {
-    Source source = addSource('''
-import 'dart:async';
-Future f() async {}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_async_with_return() async {
-    Source source = addSource('''
-f() async {
-  return;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_async_with_return_value() async {
-    Source source = addSource('''
-f() async {
-  return 5;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_async_without_return() async {
-    Source source = addSource('''
-f() async {}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_asyncForInWrongContext_async() async {
-    Source source = addSource(r'''
-f(list) async {
-  await for (var e in list) {
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_asyncForInWrongContext_asyncStar() async {
-    Source source = addSource(r'''
-f(list) async* {
-  await for (var e in list) {
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_await_flattened() async {
-    Source source = addSource('''
-import 'dart:async';
-Future<Future<int>> ffi() => null;
-f() async {
-  Future<int> b = await ffi();
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_await_simple() async {
-    Source source = addSource('''
-import 'dart:async';
-Future<int> fi() => null;
-f() async {
-  int a = await fi();
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_awaitInWrongContext_async() async {
-    Source source = addSource(r'''
-f(x, y) async {
-  return await x + await y;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_awaitInWrongContext_asyncStar() async {
-    Source source = addSource(r'''
-f(x, y) async* {
-  yield await x + await y;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_breakWithoutLabelInSwitch() async {
-    Source source = addSource(r'''
-class A {
-  void m(int i) {
-    switch (i) {
-      case 0:
-        break;
-    }
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_bug_24539_getter() async {
-    Source source = addSource('''
-class C<T> {
-  List<Foo> get x => null;
-}
-
-typedef Foo(param);
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_bug_24539_setter() async {
-    Source source = addSource('''
-class C<T> {
-  void set x(List<Foo> value) {}
-}
-
-typedef Foo(param);
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_builtInIdentifierAsType_dynamic() async {
-    Source source = addSource(r'''
-f() {
-  dynamic x;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_caseBlockNotTerminated() async {
-    Source source = addSource(r'''
-f(int p) {
-  for (int i = 0; i < 10; i++) {
-    switch (p) {
-      case 0:
-        break;
-      case 1:
-        continue;
-      case 2:
-        return;
-      case 3:
-        throw new Object();
-      case 4:
-      case 5:
-        return;
-      case 6:
-      default:
-        return;
-    }
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_caseBlockNotTerminated_lastCase() async {
-    Source source = addSource(r'''
-f(int p) {
-  switch (p) {
-    case 0:
-      p = p + 1;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_caseExpressionTypeImplementsEquals() async {
-    Source source = addSource(r'''
-print(p) {}
-
-abstract class B {
-  final id;
-  const B(this.id);
-  String toString() => 'C($id)';
-  /** Equality is identity equality, the id isn't used. */
-  bool operator==(Object other);
-  }
-
-class C extends B {
-  const C(id) : super(id);
-}
-
-void doSwitch(c) {
-  switch (c) {
-  case const C(0): print('Switch: 0'); break;
-  case const C(1): print('Switch: 1'); break;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_caseExpressionTypeImplementsEquals_int() async {
-    Source source = addSource(r'''
-f(int i) {
-  switch(i) {
-    case(1) : return 1;
-    default: return 0;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_caseExpressionTypeImplementsEquals_Object() async {
-    Source source = addSource(r'''
-class IntWrapper {
-  final int value;
-  const IntWrapper(this.value);
-}
-
-f(IntWrapper intWrapper) {
-  switch(intWrapper) {
-    case(const IntWrapper(1)) : return 1;
-    default: return 0;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_caseExpressionTypeImplementsEquals_String() async {
-    Source source = addSource(r'''
-f(String s) {
-  switch(s) {
-    case('1') : return 1;
-    default: return 0;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_class_type_alias_documentationComment() async {
-    Source source = addSource('''
-/**
- * Documentation
- */
-class C = D with E;
-
-class D {}
-class E {}''');
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    CompilationUnit unit = analysisResult.unit;
-    ClassElement classC =
-        resolutionMap.elementDeclaredByCompilationUnit(unit).getType('C');
-    expect(classC.documentationComment, isNotNull);
-  }
-
-  test_concreteClassWithAbstractMember() async {
-    Source source = addSource(r'''
-abstract class A {
-  m();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_concreteClassWithAbstractMember_inherited() async {
-    Source source = addSource(r'''
-class A {
-  m() {}
-}
-class B extends A {
-  m();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_conflictingConstructorNameAndMember_setter() async {
-    Source source = addSource(r'''
-class A {
-A.x() {}
-set x(_) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_conflictingStaticGetterAndInstanceSetter_thisClass() async {
-    Source source = addSource(r'''
-class A {
-  static get x => 0;
-  static set x(int p) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_const_constructor_with_named_generic_parameter() async {
-    Source source = addSource('''
-class C<T> {
-  const C({T t});
-}
-const c = const C(t: 1);
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_const_dynamic() async {
-    Source source = addSource('''
-const Type d = dynamic;
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_const_imported_defaultParameterValue_withImportPrefix() async {
-    Source source = addNamedSource("/a.dart", r'''
-import 'b.dart';
-const b = const B();
-''');
-    addNamedSource("/b.dart", r'''
-import 'c.dart' as ccc;
-class B {
-  const B([p = ccc.value]);
-}
-''');
-    addNamedSource("/c.dart", r'''
-const int value = 12345;
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_constConstructorWithNonConstSuper_explicit() async {
-    Source source = addSource(r'''
-class A {
-  const A();
-}
-class B extends A {
-  const B(): super();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_constConstructorWithNonConstSuper_redirectingFactory() async {
-    Source source = addSource(r'''
-class A {
-  A();
-}
-class B implements C {
-  const B();
-}
-class C extends A {
-  const factory C() = B;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_constConstructorWithNonConstSuper_unresolved() async {
-    Source source = addSource(r'''
-class A {
-  A.a();
-}
-class B extends A {
-  const B(): super();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT]);
-    verify([source]);
-  }
-
-  test_constConstructorWithNonFinalField_finalInstanceVar() async {
-    Source source = addSource(r'''
-class A {
-  final int x = 0;
-  const A();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_constConstructorWithNonFinalField_static() async {
-    Source source = addSource(r'''
-class A {
-  static int x;
-  const A();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_constConstructorWithNonFinalField_syntheticField() async {
-    Source source = addSource(r'''
-class A {
-  const A();
-  set x(value) {}
-  get x {return 0;}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_constDeferredClass_new() async {
-    await resolveWithErrors(<String>[
-      r'''
-library lib1;
-class A {
-  const A.b();
-}''',
-      r'''
-library root;
-import 'lib1.dart' deferred as a;
-main() {
-  new a.A.b();
-}'''
-    ], <ErrorCode>[]);
-  }
-
-  test_constEval_functionTypeLiteral() async {
-    Source source = addSource(r'''
-typedef F();
-const C = F;''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_constEval_propertyExtraction_fieldStatic_targetType() async {
-    addNamedSource("/math.dart", r'''
-library math;
-const PI = 3.14;''');
-    Source source = addSource(r'''
-import 'math.dart' as math;
-const C = math.PI;''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_constEval_propertyExtraction_methodStatic_targetType() async {
-    Source source = addSource(r'''
-class A {
-  const A();
-  static m() {}
-}
-const C = A.m;''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_constEval_symbol() async {
-    addNamedSource("/math.dart", r'''
-library math;
-const PI = 3.14;''');
-    Source source = addSource(r'''
-const C = #foo;
-foo() {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_constEvalTypeBoolNumString_equal() async {
-    Source source = addSource(r'''
-class B {
-  final v;
-  const B.a1(bool p) : v = p == true;
-  const B.a2(bool p) : v = p == false;
-  const B.a3(bool p) : v = p == 0;
-  const B.a4(bool p) : v = p == 0.0;
-  const B.a5(bool p) : v = p == '';
-  const B.b1(int p) : v = p == true;
-  const B.b2(int p) : v = p == false;
-  const B.b3(int p) : v = p == 0;
-  const B.b4(int p) : v = p == 0.0;
-  const B.b5(int p) : v = p == '';
-  const B.c1(String p) : v = p == true;
-  const B.c2(String p) : v = p == false;
-  const B.c3(String p) : v = p == 0;
-  const B.c4(String p) : v = p == 0.0;
-  const B.c5(String p) : v = p == '';
-  const B.n1(num p) : v = p == null;
-  const B.n2(num p) : v = null == p;
-  const B.n3(Object p) : v = p == null;
-  const B.n4(Object p) : v = null == p;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-  }
-
-  test_constEvalTypeBoolNumString_notEqual() async {
-    Source source = addSource(r'''
-class B {
-  final v;
-  const B.a1(bool p) : v = p != true;
-  const B.a2(bool p) : v = p != false;
-  const B.a3(bool p) : v = p != 0;
-  const B.a4(bool p) : v = p != 0.0;
-  const B.a5(bool p) : v = p != '';
-  const B.b1(int p) : v = p != true;
-  const B.b2(int p) : v = p != false;
-  const B.b3(int p) : v = p != 0;
-  const B.b4(int p) : v = p != 0.0;
-  const B.b5(int p) : v = p != '';
-  const B.c1(String p) : v = p != true;
-  const B.c2(String p) : v = p != false;
-  const B.c3(String p) : v = p != 0;
-  const B.c4(String p) : v = p != 0.0;
-  const B.c5(String p) : v = p != '';
-  const B.n1(num p) : v = p != null;
-  const B.n2(num p) : v = null != p;
-  const B.n3(Object p) : v = p != null;
-  const B.n4(Object p) : v = null != p;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_constEvAlTypeNum_String() async {
-    Source source = addSource(r'''
-const String A = 'a';
-const String B = A + 'b';
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_constMapKeyExpressionTypeImplementsEquals_abstract() async {
-    Source source = addSource(r'''
-abstract class B {
-  final id;
-  const B(this.id);
-  String toString() => 'C($id)';
-  /** Equality is identity equality, the id isn't used. */
-  bool operator==(Object other);
-  }
-
-class C extends B {
-  const C(id) : super(id);
-}
-
-Map getMap() {
-  return const { const C(0): 'Map: 0' };
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_constNotInitialized_field() async {
-    Source source = addSource(r'''
-class A {
-  static const int x = 0;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_constNotInitialized_local() async {
-    Source source = addSource(r'''
-main() {
-  const int x = 0;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_constRedirectSkipsSupertype() async {
-    // Since C redirects to C.named, it doesn't implicitly refer to B's
-    // unnamed constructor.  Therefore there is no cycle.
-    Source source = addSource('''
-class B {
-  final x;
-  const B() : x = y;
-  const B.named() : x = null;
-}
-class C extends B {
-  const C() : this.named();
-  const C.named() : super.named();
-}
-const y = const C();
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_constructorDeclaration_scope_signature() async {
-    Source source = addSource(r'''
-const app = 0;
-class A {
-  A(@app int app) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_constWithNonConstantArgument_constField() async {
-    Source source = addSource(r'''
-class A {
-  const A(x);
-}
-main() {
-  const A(double.INFINITY);
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_constWithNonConstantArgument_literals() async {
-    Source source = addSource(r'''
-class A {
-  const A(a, b, c, d);
-}
-f() { return const A(true, 0, 1.0, '2'); }''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_constWithTypeParameters_direct() async {
-    Source source = addSource(r'''
-class A<T> {
-  static const V = const A<int>();
-  const A();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_constWithUndefinedConstructor() async {
-    Source source = addSource(r'''
-class A {
-  const A.name();
-}
-f() {
-  return const A.name();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_constWithUndefinedConstructorDefault() async {
-    Source source = addSource(r'''
-class A {
-  const A();
-}
-f() {
-  return const A();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_defaultValueInFunctionTypeAlias() async {
-    Source source = addSource("typedef F([x]);");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_defaultValueInFunctionTypedParameter_named() async {
-    Source source = addSource("f(g({p})) {}");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_defaultValueInFunctionTypedParameter_optional() async {
-    Source source = addSource("f(g([p])) {}");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_deprecatedMemberUse_hide() async {
-    Source source = addSource(r'''
-library lib;
-import 'lib1.dart' hide B;
-A a = new A();''');
-    addNamedSource("/lib1.dart", r'''
-library lib1;
-class A {}
-@deprecated
-class B {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_duplicateDefinition_emptyName() async {
-    // Note: This code has two FunctionElements '() {}' with an empty name,
-    // this tests that the empty string is not put into the scope
-    // (more than once).
-    Source source = addSource(r'''
-Map _globalMap = {
-  'a' : () {},
-  'b' : () {}
-};''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_duplicateDefinition_getter() async {
-    Source source = addSource("bool get a => true;");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_duplicatePart() async {
-    addNamedSource('/part1.dart', 'part of lib;');
-    addNamedSource('/part2.dart', 'part of lib;');
-    Source source = addSource(r'''
-library lib;
-part 'part1.dart';
-part 'part2.dart';
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_dynamicIdentifier() async {
-    Source source = addSource(r'''
-main() {
-  var v = dynamic;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_empty_generator_async() async {
-    Source source = addSource('''
-import 'dart:async';
-Stream<int> f() async* {
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_empty_generator_sync() async {
-    Source source = addSource('''
-Iterable<int> f() sync* {
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_expectedOneListTypeArgument() async {
-    Source source = addSource(r'''
-main() {
-  <int> [];
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_expectedTwoMapTypeArguments() async {
-    Source source = addSource(r'''
-main() {
-  <int, int> {};
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_exportDuplicatedLibraryUnnamed() async {
-    Source source = addSource(r'''
-library test;
-export 'lib1.dart';
-export 'lib2.dart';''');
-    addNamedSource("/lib1.dart", "");
-    addNamedSource("/lib2.dart", "");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_exportOfNonLibrary_libraryDeclared() async {
-    Source source = addSource(r'''
-library L;
-export 'lib1.dart';''');
-    addNamedSource("/lib1.dart", "library lib1;");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_exportOfNonLibrary_libraryNotDeclared() async {
-    Source source = addSource(r'''
-library L;
-export 'lib1.dart';''');
-    addNamedSource("/lib1.dart", "");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_extraPositionalArguments_function() async {
-    Source source = addSource(r'''
-f(p1, p2) {}
-main() {
-  f(1, 2);
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_extraPositionalArguments_Function() async {
-    Source source = addSource(r'''
-f(Function a) {
-  a(1, 2);
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_extraPositionalArguments_typedef_local() async {
-    Source source = addSource(r'''
-typedef A(p1, p2);
-A getA() => null;
-f() {
-  A a = getA();
-  a(1, 2);
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_extraPositionalArguments_typedef_parameter() async {
-    Source source = addSource(r'''
-typedef A(p1, p2);
-f(A a) {
-  a(1, 2);
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_fieldFormalParameter_functionTyped_named() async {
-    Source source = addSource(r'''
-class C {
-  final Function field;
-
-  C({String this.field(int value)});
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_fieldFormalParameter_genericFunctionTyped() async {
-    Source source = addSource(r'''
-class C {
-  final Object Function(int, double) field;
-
-  C(String Function(num, Object) this.field);
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_fieldFormalParameter_genericFunctionTyped_named() async {
-    Source source = addSource(r'''
-class C {
-  final Object Function(int, double) field;
-
-  C({String Function(num, Object) this.field});
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_fieldInitializedByMultipleInitializers() async {
-    Source source = addSource(r'''
-class A {
-  int x;
-  int y;
-  A() : x = 0, y = 0 {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_fieldInitializedInInitializerAndDeclaration_fieldNotFinal() async {
-    Source source = addSource(r'''
-class A {
-  int x = 0;
-  A() : x = 1 {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_fieldInitializedInInitializerAndDeclaration_finalFieldNotSet() async {
-    Source source = addSource(r'''
-class A {
-  final int x;
-  A() : x = 1 {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_fieldInitializerOutsideConstructor() async {
-    Source source = addSource(r'''
-class A {
-  int x;
-  A(this.x) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_fieldInitializerOutsideConstructor_defaultParameters() async {
-    Source source = addSource(r'''
-class A {
-  int x;
-  A([this.x]) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_fieldInitializerRedirectingConstructor_super() async {
-    Source source = addSource(r'''
-class A {
-  A() {}
-}
-class B extends A {
-  int x;
-  B(this.x) : super();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_finalInitializedInDeclarationAndConstructor_initializer() async {
-    Source source = addSource(r'''
-class A {
-  final x;
-  A() : x = 1 {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_finalInitializedInDeclarationAndConstructor_initializingFormal() async {
-    Source source = addSource(r'''
-class A {
-  final x;
-  A(this.x) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_finalNotInitialized_atDeclaration() async {
-    Source source = addSource(r'''
-class A {
-  final int x = 0;
-  A() {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_finalNotInitialized_fieldFormal() async {
-    Source source = addSource(r'''
-class A {
-  final int x = 0;
-  A() {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_finalNotInitialized_functionTypedFieldFormal() async {
-    Source source = addSource(r'''
-class A {
-  final Function x;
-  A(int this.x(int p)) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_finalNotInitialized_hasNativeClause_hasConstructor() async {
-    Source source = addSource(r'''
-class A native 'something' {
-  final int x;
-  A() {}
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.NATIVE_CLAUSE_IN_NON_SDK_CODE]);
-    verify([source]);
-  }
-
-  test_finalNotInitialized_hasNativeClause_noConstructor() async {
-    Source source = addSource(r'''
-class A native 'something' {
-  final int x;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.NATIVE_CLAUSE_IN_NON_SDK_CODE]);
-    verify([source]);
-  }
-
-  test_finalNotInitialized_initializer() async {
-    Source source = addSource(r'''
-class A {
-  final int x;
-  A() : x = 0 {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_finalNotInitialized_redirectingConstructor() async {
-    Source source = addSource(r'''
-class A {
-  final int x;
-  A(this.x);
-  A.named() : this (42);
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_forEach_genericFunctionType() async {
-    Source source = addSource(r'''
-main() {
-  for (Null Function<T>(T, Null) e in <dynamic>[]) {
-    e;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_functionDeclaration_scope_returnType() async {
-    Source source = addSource("int f(int) { return 0; }");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_functionDeclaration_scope_signature() async {
-    Source source = addSource(r'''
-const app = 0;
-f(@app int app) {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_functionTypeAlias_scope_returnType() async {
-    Source source = addSource("typedef int f(int);");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_functionTypeAlias_scope_signature() async {
-    Source source = addSource(r'''
-const app = 0;
-typedef int f(@app int app);''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_functionWithoutCall() async {
-    Source source = addSource(r'''
-abstract class A implements Function {
-}
-class B implements A {
-  void call() {}
-}
-class C extends A {
-  void call() {}
-}
-class D extends C {
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_functionWithoutCall_doesNotImplementFunction() async {
-    Source source = addSource("class A {}");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_functionWithoutCall_staticCallMethod() async {
-    Source source = addSource(r'''
-class A { }
-class B extends A {
-  static call() { }
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_functionWithoutCall_withNoSuchMethod() async {
-    // 16078
-    Source source = addSource(r'''
-class A implements Function {
-  noSuchMethod(inv) {
-    return 42;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_functionWithoutCall_withNoSuchMethod_mixin() async {
-    Source source = addSource(r'''
-class A {
-  noSuchMethod(inv) {}
-}
-class B extends Object with A implements Function {
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_functionWithoutCall_withNoSuchMethod_superclass() async {
-    Source source = addSource(r'''
-class A {
-  noSuchMethod(inv) {}
-}
-class B extends A implements Function {
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_genericTypeAlias_castsAndTypeChecks_hasTypeParameters() async {
-    Source source = addSource('''
-typedef Foo<S> = S Function<T>(T x);
-
-main(Object p) {
-  (p as Foo)<int>(3);
-  if (p is Foo) {
-    p<int>(3);
-  }
-  (p as Foo<String>)<int>(3);
-  if (p is Foo<String>) {
-    p<int>(3);
-  }
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_genericTypeAlias_castsAndTypeChecks_noTypeParameters() async {
-    Source source = addSource('''
-typedef Foo = T Function<T>(T x);
-
-main(Object p) {
-  (p as Foo)<int>(3);
-  if (p is Foo) {
-    p<int>(3);
-  }
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_genericTypeAlias_fieldAndReturnType_noTypeParameters() async {
-    Source source = addSource(r'''
-typedef Foo = int Function<T>(T x);
-int foo<T>(T x) => 3;
-Foo bar() => foo;
-void test1() {
-  bar()<String>("hello");
-}
-
-class A {
-  Foo f;
-  void test() {
-    f<String>("hello");
-  }
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_genericTypeAlias_fieldAndReturnType_typeParameters_arguments() async {
-    Source source = addSource(r'''
-typedef Foo<S> = S Function<T>(T x);
-int foo<T>(T x) => 3;
-Foo<int> bar() => foo;
-void test1() {
-  bar()<String>("hello");
-}
-
-class A {
-  Foo<int> f;
-  void test() {
-    f<String>("hello");
-  }
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_genericTypeAlias_fieldAndReturnType_typeParameters_noArguments() async {
-    Source source = addSource(r'''
-typedef Foo<S> = S Function<T>(T x);
-int foo<T>(T x) => 3;
-Foo bar() => foo;
-void test1() {
-  bar()<String>("hello");
-}
-
-class A {
-  Foo f;
-  void test() {
-    f<String>("hello");
-  }
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_genericTypeAlias_invalidGenericFunctionType() async {
-    Source source = addSource('''
-typedef F = int;
-main(p) {
-  p is F;
-}
-''');
-    await computeAnalysisResult(source);
-    // There is a parse error, but no crashes.
-    assertErrors(source, [ParserErrorCode.INVALID_GENERIC_FUNCTION_TYPE]);
-    verify([source]);
-  }
-
-  test_genericTypeAlias_noTypeParameters() async {
-    Source source = addSource(r'''
-typedef Foo = int Function<T>(T x);
-int foo<T>(T x) => 3;
-void test1() {
-  Foo y = foo;
-  // These two should be equivalent
-  foo<String>("hello");
-  y<String>("hello");
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_genericTypeAlias_typeParameters() async {
-    Source source = addSource(r'''
-typedef Foo<S> = S Function<T>(T x);
-int foo<T>(T x) => 3;
-void test1() {
-  Foo<int> y = foo;
-  // These two should be equivalent
-  foo<String>("hello");
-  y<String>("hello");
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_implicitThisReferenceInInitializer_constructorName() async {
-    Source source = addSource(r'''
-class A {
-  A.named() {}
-}
-class B {
-  var v;
-  B() : v = new A.named();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_implicitThisReferenceInInitializer_prefixedIdentifier() async {
-    Source source = addSource(r'''
-class A {
-  var f;
-}
-class B {
-  var v;
-  B(A a) : v = a.f;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_implicitThisReferenceInInitializer_qualifiedMethodInvocation() async {
-    Source source = addSource(r'''
-class A {
-  f() {}
-}
-class B {
-  var v;
-  B() : v = new A().f();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_implicitThisReferenceInInitializer_qualifiedPropertyAccess() async {
-    Source source = addSource(r'''
-class A {
-  var f;
-}
-class B {
-  var v;
-  B() : v = new A().f;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_implicitThisReferenceInInitializer_staticField_thisClass() async {
-    Source source = addSource(r'''
-class A {
-  var v;
-  A() : v = f;
-  static var f;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_implicitThisReferenceInInitializer_staticGetter() async {
-    Source source = addSource(r'''
-class A {
-  var v;
-  A() : v = f;
-  static get f => 42;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_implicitThisReferenceInInitializer_staticMethod() async {
-    Source source = addSource(r'''
-class A {
-  var v;
-  A() : v = f();
-  static f() => 42;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_implicitThisReferenceInInitializer_topLevelField() async {
-    Source source = addSource(r'''
-class A {
-  var v;
-  A() : v = f;
-}
-var f = 42;''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_implicitThisReferenceInInitializer_topLevelFunction() async {
-    Source source = addSource(r'''
-class A {
-  var v;
-  A() : v = f();
-}
-f() => 42;''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_implicitThisReferenceInInitializer_topLevelGetter() async {
-    Source source = addSource(r'''
-class A {
-  var v;
-  A() : v = f;
-}
-get f => 42;''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_implicitThisReferenceInInitializer_typeParameter() async {
-    Source source = addSource(r'''
-class A<T> {
-  var v;
-  A(p) : v = (p is T);
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_importDuplicatedLibraryName() async {
-    Source source = addSource(r'''
-library test;
-import 'lib.dart';
-import 'lib.dart';''');
-    addNamedSource("/lib.dart", "library lib;");
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      HintCode.UNUSED_IMPORT,
-      HintCode.UNUSED_IMPORT,
-      HintCode.DUPLICATE_IMPORT
-    ]);
-    verify([source]);
-  }
-
-  test_importDuplicatedLibraryUnnamed() async {
-    Source source = addSource(r'''
-library test;
-import 'lib1.dart';
-import 'lib2.dart';''');
-    addNamedSource("/lib1.dart", "");
-    addNamedSource("/lib2.dart", "");
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      // No warning on duplicate import (https://github.com/dart-lang/sdk/issues/24156)
-      HintCode.UNUSED_IMPORT,
-      HintCode.UNUSED_IMPORT
-    ]);
-    verify([source]);
-  }
-
-  test_importOfNonLibrary_libraryDeclared() async {
-    Source source = addSource(r'''
-library lib;
-import 'part.dart';
-A a;''');
-    addNamedSource("/part.dart", r'''
-library lib1;
-class A {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_importOfNonLibrary_libraryNotDeclared() async {
-    Source source = addSource(r'''
-library lib;
-import 'part.dart';
-A a;''');
-    addNamedSource("/part.dart", "class A {}");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_importPrefixes_withFirstLetterDifference() async {
-    Source source = addSource(r'''
-library L;
-import 'lib1.dart' as math;
-import 'lib2.dart' as path;
-main() {
-  math.test1();
-  path.test2();
-}''');
-    addNamedSource("/lib1.dart", r'''
-library lib1;
-test1() {}''');
-    addNamedSource("/lib2.dart", r'''
-library lib2;
-test2() {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_inconsistentCaseExpressionTypes() async {
-    Source source = addSource(r'''
-f(var p) {
-  switch (p) {
-    case 1:
-      break;
-    case 2:
-      break;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_inconsistentMethodInheritance_accessors_typeParameter2() async {
-    Source source = addSource(r'''
-abstract class A<E> {
-  E get x {return null;}
-}
-class B<E> {
-  E get x {return null;}
-}
-class C<E> extends A<E> implements B<E> {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_inconsistentMethodInheritance_accessors_typeParameters1() async {
-    Source source = addSource(r'''
-abstract class A<E> {
-  E get x;
-}
-abstract class B<E> {
-  E get x;
-}
-class C<E> implements A<E>, B<E> {
-  E get x => null;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_inconsistentMethodInheritance_accessors_typeParameters_diamond() async {
-    Source source = addSource(r'''
-abstract class F<E> extends B<E> {}
-class D<E> extends F<E> {
-  external E get g;
-}
-abstract class C<E> {
-  E get g;
-}
-abstract class B<E> implements C<E> {
-  E get g { return null; }
-}
-class A<E> extends B<E> implements D<E> {
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_inconsistentMethodInheritance_methods_typeParameter2() async {
-    Source source = addSource(r'''
-class A<E> {
-  x(E e) {}
-}
-class B<E> {
-  x(E e) {}
-}
-class C<E> extends A<E> implements B<E> {
-  x(E e) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_inconsistentMethodInheritance_methods_typeParameters1() async {
-    Source source = addSource(r'''
-class A<E> {
-  x(E e) {}
-}
-class B<E> {
-  x(E e) {}
-}
-class C<E> implements A<E>, B<E> {
-  x(E e) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_inconsistentMethodInheritance_simple() async {
-    Source source = addSource(r'''
-abstract class A {
-  x();
-}
-abstract class B {
-  x();
-}
-class C implements A, B {
-  x() {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_infer_mixin_new_syntax() async {
-    Source source = addSource('''
-abstract class A<T> {}
-
-class B {}
-
-mixin M<T> on A<T> {}
-
-class C extends A<B> with M {}
-''');
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    CompilationUnit unit = analysisResult.unit;
-    ClassElement classC =
-        resolutionMap.elementDeclaredByCompilationUnit(unit).getType('C');
-    expect(classC.mixins, hasLength(1));
-    expect(classC.mixins[0].toString(), 'M<B>');
-  }
-
-  test_infer_mixin_with_substitution_functionType_new_syntax() async {
-    Source source = addSource('''
-abstract class A<T> {}
-
-class B {}
-
-mixin M<T, U> on A<T Function(U)> {}
-
-class C extends A<int Function(String)> with M {}
-''');
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    CompilationUnit unit = analysisResult.unit;
-    ClassElement classC =
-        resolutionMap.elementDeclaredByCompilationUnit(unit).getType('C');
-    expect(classC.mixins, hasLength(1));
-    expect(classC.mixins[0].toString(), 'M<int, String>');
-  }
-
-  test_infer_mixin_with_substitution_new_syntax() async {
-    Source source = addSource('''
-abstract class A<T> {}
-
-class B {}
-
-mixin M<T> on A<List<T>> {}
-
-class C extends A<List<B>> with M {}
-''');
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    CompilationUnit unit = analysisResult.unit;
-    ClassElement classC =
-        resolutionMap.elementDeclaredByCompilationUnit(unit).getType('C');
-    expect(classC.mixins, hasLength(1));
-    expect(classC.mixins[0].toString(), 'M<B>');
-  }
-
-  test_initializingFormalForNonExistentField() async {
-    Source source = addSource(r'''
-class A {
-  int x;
-  A(this.x) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_instance_creation_inside_annotation() async {
-    Source source = addSource('''
-class C {
-  const C();
-}
-class D {
-  final C c;
-  const D(this.c);
-}
-@D(const C())
-f() {}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_instanceAccessToStaticMember_fromComment() async {
-    Source source = addSource(r'''
-class A {
-  static m() {}
-}
-/// [A.m]
-main() {
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_instanceAccessToStaticMember_topLevel() async {
-    Source source = addSource(r'''
-m() {}
-main() {
-  m();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_instanceMemberAccessFromStatic_fromComment() async {
-    Source source = addSource(r'''
-class A {
-  m() {}
-  /// [m]
-  static foo() {
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_instanceMethodNameCollidesWithSuperclassStatic_field() async {
-    Source source = addSource(r'''
-import 'lib.dart';
-class B extends A {
-  _m() {}
-}''');
-    addNamedSource("/lib.dart", r'''
-library L;
-class A {
-  static var _m;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_instanceMethodNameCollidesWithSuperclassStatic_method() async {
-    Source source = addSource(r'''
-import 'lib.dart';
-class B extends A {
-  _m() {}
-}''');
-    addNamedSource("/lib.dart", r'''
-library L;
-class A {
-  static _m() {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_integerLiteralOutOfRange_negative_leadingZeros() async {
-    Source source = addSource('int x = -000923372036854775809;');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-  }
-
-  test_integerLiteralOutOfRange_negative_small() async {
-    Source source = addSource('int x = -42;');
-    await computeAnalysisResult(source);
-    assertErrors(source);
-  }
-
-  test_integerLiteralOutOfRange_negative_valid() async {
-    Source source = addSource('int x = -9223372036854775808;');
-    await computeAnalysisResult(source);
-    assertErrors(source);
-  }
-
-  test_integerLiteralOutOfRange_positive_leadingZeros() async {
-    Source source = addSource('int x = 000923372036854775808;');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-  }
-
-  test_integerLiteralOutOfRange_positive_valid() async {
-    Source source = addSource('int x = 9223372036854775807;');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-  }
-
-  test_integerLiteralOutOfRange_positive_zero() async {
-    Source source = addSource('int x = 0;');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-  }
-
-  test_intLiteralInDoubleContext() async {
-    Source source = addSource(r'''
-void takeDouble(double x) {}
-void main() {
-  takeDouble(0);
-  takeDouble(-0);
-  takeDouble(0x0);
-  takeDouble(-0x0);
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_intLiteralInDoubleContext_const() async {
-    Source source = addSource(r'''
-class C {
-  const C(double x)
-    : assert((x + 3) / 2 == 1.5)
-    , assert(x == 0.0);
-}
-@C(0)
-@C(-0)
-@C(0x0)
-@C(-0x0)
-void main() {
-  const C(0);
-  const C(-0);
-  const C(0x0);
-  const C(-0x0);
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidAnnotation_constantVariable_field() async {
-    Source source = addSource(r'''
-@A.C
-class A {
-  static const C = 0;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidAnnotation_constantVariable_field_importWithPrefix() async {
-    addNamedSource("/lib.dart", r'''
-library lib;
-class A {
-  static const C = 0;
-}''');
-    Source source = addSource(r'''
-import 'lib.dart' as p;
-@p.A.C
-main() {
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidAnnotation_constantVariable_topLevel() async {
-    Source source = addSource(r'''
-const C = 0;
-@C
-main() {
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidAnnotation_constantVariable_topLevel_importWithPrefix() async {
-    addNamedSource("/lib.dart", r'''
-library lib;
-const C = 0;''');
-    Source source = addSource(r'''
-import 'lib.dart' as p;
-@p.C
-main() {
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidAnnotation_constConstructor_importWithPrefix() async {
-    addNamedSource("/lib.dart", r'''
-library lib;
-class A {
-  const A(int p);
-}''');
-    Source source = addSource(r'''
-import 'lib.dart' as p;
-@p.A(42)
-main() {
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidAnnotation_constConstructor_named_importWithPrefix() async {
-    addNamedSource("/lib.dart", r'''
-library lib;
-class A {
-  const A.named(int p);
-}''');
-    Source source = addSource(r'''
-import 'lib.dart' as p;
-@p.A.named(42)
-main() {
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidAssignment() async {
-    Source source = addSource(r'''
-f() {
-  var x;
-  var y;
-  x = y;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidAssignment_compoundAssignment() async {
-    Source source = addSource(r'''
-class byte {
-  int _value;
-  byte(this._value);
-  byte operator +(int val) { return this; }
-}
-
-void main() {
-  byte b = new byte(52);
-  b += 3;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidAssignment_defaultValue_named() async {
-    Source source = addSource(r'''
-f({String x: '0'}) {
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidAssignment_defaultValue_optional() async {
-    Source source = addSource(r'''
-f([String x = '0']) {
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidAssignment_ifNullAssignment_compatibleType() async {
-    Source source = addSource('''
-void f(int i) {
-  num n;
-  n ??= i;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidAssignment_ifNullAssignment_sameType() async {
-    Source source = addSource('''
-void f(int i) {
-  int j;
-  j ??= i;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidAssignment_implicitlyImplementFunctionViaCall_1() async {
-    // 18341
-    //
-    // This test and
-    // 'test_invalidAssignment_implicitlyImplementFunctionViaCall_2()'
-    // are closely related: here we see that 'I' checks as a subtype of
-    // 'IntToInt'.
-    Source source = addSource(r'''
-class I {
-  int call(int x) => 0;
-}
-class C implements I {
-  noSuchMethod(_) => null;
-}
-typedef int IntToInt(int x);
-IntToInt f = new I();''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidAssignment_implicitlyImplementFunctionViaCall_2() async {
-    // 18341
-    //
-    // Here 'C' checks as a subtype of 'I', but 'C' does not
-    // check as a subtype of 'IntToInt'. Together with
-    // 'test_invalidAssignment_implicitlyImplementFunctionViaCall_1()' we see
-    // that subtyping is not transitive here.
-    Source source = addSource(r'''
-class I {
-  int call(int x) => 0;
-}
-class C implements I {
-  noSuchMethod(_) => null;
-}
-typedef int IntToInt(int x);
-IntToInt f = new C();''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidAssignment_implicitlyImplementFunctionViaCall_3() async {
-    // 18341
-    //
-    // Like 'test_invalidAssignment_implicitlyImplementFunctionViaCall_2()',
-    // but uses type 'Function' instead of more precise type 'IntToInt' for 'f'.
-    Source source = addSource(r'''
-class I {
-  int call(int x) => 0;
-}
-class C implements I {
-  noSuchMethod(_) => null;
-}
-typedef int IntToInt(int x);
-Function f = new C();''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidAssignment_implicitlyImplementFunctionViaCall_4() async {
-    // 18341
-    //
-    // Like 'test_invalidAssignment_implicitlyImplementFunctionViaCall_2()',
-    // but uses type 'VoidToInt' instead of more precise type 'IntToInt' for
-    // 'f'.
-    //
-    // Here 'C <: IntToInt <: VoidToInt', but the spec gives no transitivity
-    // rule for '<:'. However, many of the :/tools/test.py tests assume this
-    // transitivity for 'JsBuilder' objects, assigning them to
-    // '(String) -> dynamic'. The declared type of 'JsBuilder.call' is
-    // '(String, [dynamic]) -> Expression'.
-    Source source = addSource(r'''
-class I {
-  int call([int x]) => 0;
-}
-class C implements I {
-  noSuchMethod(_) => null;
-}
-typedef int VoidToInt();
-VoidToInt f = new C();''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidAssignment_postfixExpression_localVariable() async {
-    Source source = addSource(r'''
-class A {
-  A operator+(_) => this;
-}
-
-f(A a) {
-  a++;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidAssignment_postfixExpression_property() async {
-    Source source = addSource(r'''
-class A {
-  A operator+(_) => this;
-}
-
-class C {
-  A a;
-}
-
-f(C c) {
-  c.a++;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidAssignment_prefixExpression_localVariable() async {
-    Source source = addSource(r'''
-class A {
-  A operator+(_) => this;
-}
-
-f(A a) {
-  ++a;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidAssignment_prefixExpression_property() async {
-    Source source = addSource(r'''
-class A {
-  A operator+(_) => this;
-}
-
-class C {
-  A a;
-}
-
-f(C c) {
-  ++c.a;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidAssignment_toDynamic() async {
-    Source source = addSource(r'''
-f() {
-  var g;
-  g = () => 0;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidFactoryNameNotAClass() async {
-    Source source = addSource(r'''
-class A {
-  factory A() => null;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidIdentifierInAsync() async {
-    Source source = addSource(r'''
-class A {
-  m() {
-    int async;
-    int await;
-    int yield;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidMethodOverrideNamedParamType() async {
-    Source source = addSource(r'''
-class A {
-  m({int a}) {}
-}
-class B implements A {
-  m({int a, int b}) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidOverrideNamed_unorderedNamedParameter() async {
-    Source source = addSource(r'''
-class A {
-  m({a, b}) {}
-}
-class B extends A {
-  m({b, a}) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidOverrideRequired_less() async {
-    Source source = addSource(r'''
-class A {
-  m(a, b) {}
-}
-class B extends A {
-  m(a, [b]) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidOverrideRequired_same() async {
-    Source source = addSource(r'''
-class A {
-  m(a) {}
-}
-class B extends A {
-  m(a) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidOverrideReturnType_returnType_interface() async {
-    Source source = addNamedSource("/test.dart", r'''
-abstract class A {
-  num m();
-}
-class B implements A {
-  int m() { return 1; }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidOverrideReturnType_returnType_interface2() async {
-    Source source = addNamedSource("/test.dart", r'''
-abstract class A {
-  num m();
-}
-abstract class B implements A {
-}
-class C implements B {
-  int m() { return 1; }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidOverrideReturnType_returnType_mixin() async {
-    Source source = addNamedSource("/test.dart", r'''
-class A {
-  num m() { return 0; }
-}
-class B extends Object with A {
-  int m() { return 1; }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidOverrideReturnType_returnType_parameterizedTypes() async {
-    Source source = addSource(r'''
-abstract class A<E> {
-  List<E> m();
-}
-class B extends A<dynamic> {
-  List<dynamic> m() { return new List<dynamic>(); }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidOverrideReturnType_returnType_sameType() async {
-    Source source = addNamedSource("/test.dart", r'''
-class A {
-  int m() { return 0; }
-}
-class B extends A {
-  int m() { return 1; }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidOverrideReturnType_returnType_superclass() async {
-    Source source = addNamedSource("/test.dart", r'''
-class A {
-  num m() { return 0; }
-}
-class B extends A {
-  int m() { return 1; }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidOverrideReturnType_returnType_superclass2() async {
-    Source source = addNamedSource("/test.dart", r'''
-class A {
-  num m() { return 0; }
-}
-class B extends A {
-}
-class C extends B {
-  int m() { return 1; }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidOverrideReturnType_returnType_void() async {
-    Source source = addSource(r'''
-class A {
-  void m() {}
-}
-class B extends A {
-  int m() { return 0; }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidReferenceToThis_constructor() async {
-    Source source = addSource(r'''
-class A {
-  A() {
-    var v = this;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidReferenceToThis_instanceMethod() async {
-    Source source = addSource(r'''
-class A {
-  m() {
-    var v = this;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidTypeArgumentForKey() async {
-    Source source = addSource(r'''
-class A {
-  m() {
-    return const <int, int>{};
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidTypeArgumentInConstList() async {
-    Source source = addSource(r'''
-class A<E> {
-  m() {
-    return <E>[];
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidTypeArgumentInConstMap() async {
-    Source source = addSource(r'''
-class A<E> {
-  m() {
-    return <String, E>{};
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  Future test_issue32114() async {
-    addNamedSource('/a.dart', '''
-class O {}
-
-typedef T Func<T extends O>(T e);
-''');
-    addNamedSource('/b.dart', '''
-import 'a.dart';
-export 'a.dart' show Func;
-
-abstract class A<T extends O> {
-  Func<T> get func;
-}
-''');
-    final Source source = addSource('''
-import 'b.dart';
-
-class B extends A {
-  Func get func => (x) => x;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_issue_24191() async {
-    Source source = addSource('''
-import 'dart:async';
-
-abstract class S extends Stream {}
-f(S s) async {
-  await for (var v in s) {
-    print(v);
-  }
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_issue_32394() async {
-    Source source = addSource('''
-var x = y.map((a) => a.toString());
-var y = [3];
-var z = x.toList();
-
-void main() {
-  String p = z;
-}
-''');
-    var result = await computeAnalysisResult(source);
-    var z = result.unit.declaredElement.topLevelVariables
-        .where((e) => e.name == 'z')
-        .single;
-    expect(z.type.toString(), 'List<String>');
-    assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-    verify([source]);
-  }
-
-  test_issue_35320_lists() async {
-    addNamedSource('/lib.dart', '''
-const x = const <String>['a'];
-''');
-    Source source = addSource('''
-import 'lib.dart';
-const y = const <String>['b'];
-int f(v) {
-  switch(v) {
-    case x:
-      return 0;
-    case y:
-      return 1;
-    default:
-      return 2;
-  }
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_issue_35320_maps() async {
-    addNamedSource('/lib.dart', '''
-const x = const <String, String>{'a': 'b'};
-''');
-    Source source = addSource('''
-import 'lib.dart';
-const y = const <String, String>{'c': 'd'};
-int f(v) {
-  switch(v) {
-    case x:
-      return 0;
-    case y:
-      return 1;
-    default:
-      return 2;
-  }
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_listElementTypeNotAssignable() async {
-    Source source = addSource(r'''
-var v1 = <int> [42];
-var v2 = const <int> [42];''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_loadLibraryDefined() async {
-    await resolveWithErrors(<String>[
-      r'''
-library lib1;
-foo() => 22;''',
-      r'''
-import 'lib1.dart' deferred as other;
-main() {
-  other.loadLibrary().then((_) => other.foo());
-}'''
-    ], <ErrorCode>[]);
-  }
-
-  test_local_generator_async() async {
-    Source source = addSource('''
-f() {
-  return () async* { yield 0; };
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_local_generator_sync() async {
-    Source source = addSource('''
-f() {
-  return () sync* { yield 0; };
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_mapKeyTypeNotAssignable() async {
-    Source source = addSource("var v = <String, int > {'a' : 1};");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_metadata_enumConstantDeclaration() async {
-    Source source = addSource(r'''
-const x = 1;
-enum E {
-  aaa,
-  @x
-  bbb
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_methodDeclaration_scope_signature() async {
-    Source source = addSource(r'''
-const app = 0;
-class A {
-  foo(@app int app) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_misMatchedGetterAndSetterTypes_instance_sameTypes() async {
-    Source source = addSource(r'''
-class C {
-  int get x => 0;
-  set x(int v) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_misMatchedGetterAndSetterTypes_instance_unspecifiedGetter() async {
-    Source source = addSource(r'''
-class C {
-  get x => 0;
-  set x(String v) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_misMatchedGetterAndSetterTypes_instance_unspecifiedSetter() async {
-    Source source = addSource(r'''
-class C {
-  int get x => 0;
-  set x(v) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_misMatchedGetterAndSetterTypes_topLevel_sameTypes() async {
-    Source source = addSource(r'''
-int get x => 0;
-set x(int v) {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_misMatchedGetterAndSetterTypes_topLevel_unspecifiedGetter() async {
-    Source source = addSource(r'''
-get x => 0;
-set x(String v) {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_misMatchedGetterAndSetterTypes_topLevel_unspecifiedSetter() async {
-    Source source = addSource(r'''
-int get x => 0;
-set x(v) {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_missingEnumConstantInSwitch_all() async {
-    Source source = addSource(r'''
-enum E { A, B, C }
-
-f(E e) {
-  switch (e) {
-    case E.A: break;
-    case E.B: break;
-    case E.C: break;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_missingEnumConstantInSwitch_default() async {
-    Source source = addSource(r'''
-enum E { A, B, C }
-
-f(E e) {
-  switch (e) {
-    case E.B: break;
-    default: break;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_mixedReturnTypes_differentScopes() async {
-    Source source = addSource(r'''
-class C {
-  m(int x) {
-    f(int y) {
-      return;
-    }
-    f(x);
-    return 0;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_mixedReturnTypes_ignoreImplicit() async {
-    Source source = addSource(r'''
-f(bool p) {
-  if (p) return 42;
-  // implicit 'return;' is ignored
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_mixedReturnTypes_ignoreImplicit2() async {
-    Source source = addSource(r'''
-f(bool p) {
-  if (p) {
-    return 42;
-  } else {
-    return 42;
-  }
-  // implicit 'return;' is ignored
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_mixedReturnTypes_sameKind() async {
-    Source source = addSource(r'''
-class C {
-  m(int x) {
-    if (x < 0) {
-      return 1;
-    }
-    return 0;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_mixin_of_mixin_type_argument_inference() async {
-    // In the code below, B's superclass constraints don't include A, because
-    // superclass constraints are determined from the mixin's superclass, and
-    // B's superclass is Object.  So no mixin type inference is attempted, and
-    // "with B" is interpreted as "with B<dynamic>".
-    Source source = addSource('''
-class A<T> {}
-class B<T> = Object with A<T>;
-class C = Object with B;
-''');
-    var result = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    var bReference = result.unit.declaredElement.getType('C').mixins[0];
-    expect(bReference.typeArguments[0].toString(), 'dynamic');
-  }
-
-  test_mixin_of_mixin_type_argument_inference_cascaded_mixin() async {
-    // In the code below, B has a single superclass constraint, A1, because
-    // superclass constraints are determined from the mixin's superclass, and
-    // B's superclass is "Object with A1<T>".  So mixin type inference succeeds
-    // (since C's base class implements A1<int>), and "with B" is interpreted as
-    // "with B<int>".
-    Source source = addSource('''
-class A1<T> {}
-class A2<T> {}
-class B<T> = Object with A1<T>, A2<T>;
-class Base implements A1<int> {}
-class C = Base with B;
-''');
-    var result = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    var bReference = result.unit.declaredElement.getType('C').mixins[0];
-    expect(bReference.typeArguments[0].toString(), 'int');
-  }
-
-  test_mixinDeclaresConstructor() async {
-    Source source = addSource(r'''
-class A {
-  m() {}
-}
-class B extends Object with A {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_mixinDeclaresConstructor_factory() async {
-    Source source = addSource(r'''
-class A {
-  factory A() => null;
-}
-class B extends Object with A {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_mixinInference_with_actual_mixins() async {
-    Source source = addSource('''
-class I<X> {}
-
-mixin M0<T> on I<T> {}
-
-mixin M1<T> on I<T> {
-  T foo() => null;
-}
-
-class A = I<int> with M0, M1;
-
-void main () {
-  var x = new A().foo();
-}
-''');
-    var result = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    var main = result.unit.declarations.last as FunctionDeclaration;
-    var mainBody = main.functionExpression.body as BlockFunctionBody;
-    var xDecl = mainBody.block.statements[0] as VariableDeclarationStatement;
-    var xElem = xDecl.variables.variables[0].declaredElement;
-    expect(xElem.type.toString(), 'int');
-  }
-
-  test_mixinInheritsFromNotObject_classDeclaration_extends_new_syntax() async {
-    Source source = addSource(r'''
-class A {}
-mixin B on A {}
-class C extends A with B {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_mixinInheritsFromNotObject_classDeclaration_mixTypeAlias() async {
-    Source source = addSource(r'''
-class A {}
-class B = Object with A;
-class C extends Object with B {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_mixinInheritsFromNotObject_typeAlias_extends_new_syntax() async {
-    Source source = addSource(r'''
-class A {}
-mixin B on A {}
-class C = A with B;''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_mixinInheritsFromNotObject_typedef_mixTypeAlias() async {
-    Source source = addSource(r'''
-class A {}
-class B = Object with A;
-class C = Object with B;''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_mixinReferencesSuper_new_syntax() async {
-    Source source = addSource(r'''
-mixin A {
-  toString() => super.toString();
-}
-class B extends Object with A {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_multipleSuperInitializers_no() async {
-    Source source = addSource(r'''
-class A {}
-class B extends A {
-  B() {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_multipleSuperInitializers_single() async {
-    Source source = addSource(r'''
-class A {}
-class B extends A {
-  B() : super() {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nativeConstConstructor() async {
-    Source source = addSource(r'''
-import 'dart-ext:x';
-class Foo {
-  const Foo() native 'Foo_Foo';
-  const factory Foo.foo() native 'Foo_Foo_foo';
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.CONST_CONSTRUCTOR_WITH_BODY]);
-    // Cannot verify the AST because the import's URI cannot be resolved.
-  }
-
-  test_nativeFunctionBodyInNonSDKCode_function() async {
-    Source source = addSource(r'''
-import 'dart-ext:x';
-int m(a) native 'string';''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    // Cannot verify the AST because the import's URI cannot be resolved.
-  }
-
-  test_newWithAbstractClass_factory() async {
-    Source source = addSource(r'''
-abstract class A {
-  factory A() { return new B(); }
-}
-class B implements A {
-  B() {}
-}
-A f() {
-  return new A();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_newWithUndefinedConstructor() async {
-    Source source = addSource(r'''
-class A {
-  A.name() {}
-}
-f() {
-  new A.name();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_newWithUndefinedConstructorDefault() async {
-    Source source = addSource(r'''
-class A {
-  A() {}
-}
-f() {
-  new A();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonAbstractClassInheritsAbstractMemberOne_abstractsDontOverrideConcretes_getter() async {
-    Source source = addSource(r'''
-class A {
-  int get g => 0;
-}
-abstract class B extends A {
-  int get g;
-}
-class C extends B {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonAbstractClassInheritsAbstractMemberOne_abstractsDontOverrideConcretes_method() async {
-    Source source = addSource(r'''
-class A {
-  m(p) {}
-}
-abstract class B extends A {
-  m(p);
-}
-class C extends B {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonAbstractClassInheritsAbstractMemberOne_abstractsDontOverrideConcretes_setter() async {
-    Source source = addSource(r'''
-class A {
-  set s(v) {}
-}
-abstract class B extends A {
-  set s(v);
-}
-class C extends B {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonAbstractClassInheritsAbstractMemberOne_classTypeAlias_interface() async {
-    // 15979
-    Source source = addSource(r'''
-abstract class M {}
-abstract class A {}
-abstract class I {
-  m();
-}
-abstract class B = A with M implements I;''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonAbstractClassInheritsAbstractMemberOne_classTypeAlias_mixin() async {
-    // 15979
-    Source source = addSource(r'''
-abstract class M {
-  m();
-}
-abstract class A {}
-abstract class B = A with M;''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonAbstractClassInheritsAbstractMemberOne_classTypeAlias_superclass() async {
-    // 15979
-    Source source = addSource(r'''
-class M {}
-abstract class A {
-  m();
-}
-abstract class B = A with M;''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonAbstractClassInheritsAbstractMemberOne_mixin_getter() async {
-    // 17034
-    Source source = addSource(r'''
-class A {
-  var a;
-}
-abstract class M {
-  get a;
-}
-class B extends A with M {}
-class C extends B {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonAbstractClassInheritsAbstractMemberOne_mixin_method() async {
-    Source source = addSource(r'''
-class A {
-  m() {}
-}
-abstract class M {
-  m();
-}
-class B extends A with M {}
-class C extends B {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonAbstractClassInheritsAbstractMemberOne_mixin_setter() async {
-    Source source = addSource(r'''
-class A {
-  var a;
-}
-abstract class M {
-  set a(dynamic v);
-}
-class B extends A with M {}
-class C extends B {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonAbstractClassInheritsAbstractMemberOne_noSuchMethod_accessor() async {
-    Source source = addSource(r'''
-abstract class A {
-  int get g;
-}
-class B extends A {
-  noSuchMethod(v) => '';
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonAbstractClassInheritsAbstractMemberOne_noSuchMethod_method() async {
-    Source source = addSource(r'''
-abstract class A {
-  m(p);
-}
-class B extends A {
-  noSuchMethod(v) => '';
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonAbstractClassInheritsAbstractMemberOne_noSuchMethod_mixin() async {
-    Source source = addSource(r'''
-class A {
-  noSuchMethod(v) => '';
-}
-class B extends Object with A {
-  m(p);
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonAbstractClassInheritsAbstractMemberOne_noSuchMethod_superclass() async {
-    Source source = addSource(r'''
-class A {
-  noSuchMethod(v) => '';
-}
-class B extends A {
-  m(p);
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonAbstractClassInheritsAbstractMemberOne_overridesMethodInObject() async {
-    Source source = addSource(r'''
-class A {
-  String toString([String prefix = '']) => '${prefix}Hello';
-}
-class C {}
-class B extends A with C {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonBoolExpression_interfaceType() async {
-    Source source = addSource(r'''
-f() {
-  assert(true);
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonBoolNegationExpression() async {
-    Source source = addSource(r'''
-f(bool pb, pd) {
-  !true;
-  !false;
-  !pb;
-  !pd;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonBoolNegationExpression_dynamic() async {
-    Source source = addSource(r'''
-f1(bool dynamic) {
-  !dynamic;
-}
-f2() {
-  bool dynamic = true;
-  !dynamic;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonBoolOperand_and_bool() async {
-    Source source = addSource(r'''
-bool f(bool left, bool right) {
-  return left && right;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonBoolOperand_and_dynamic() async {
-    Source source = addSource(r'''
-bool f(left, dynamic right) {
-  return left && right;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonBoolOperand_or_bool() async {
-    Source source = addSource(r'''
-bool f(bool left, bool right) {
-  return left || right;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonBoolOperand_or_dynamic() async {
-    Source source = addSource(r'''
-bool f(dynamic left, right) {
-  return left || right;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonConstantDefaultValue_constField() async {
-    Source source = addSource(r'''
-f([a = double.INFINITY]) {
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonConstantDefaultValue_function_named() async {
-    Source source = addSource("f({x : 2 + 3}) {}");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonConstantDefaultValue_function_positional() async {
-    Source source = addSource("f([x = 2 + 3]) {}");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonConstantDefaultValue_inConstructor_named() async {
-    Source source = addSource(r'''
-class A {
-  A({x : 2 + 3}) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonConstantDefaultValue_inConstructor_positional() async {
-    Source source = addSource(r'''
-class A {
-  A([x = 2 + 3]) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonConstantDefaultValue_method_named() async {
-    Source source = addSource(r'''
-class A {
-  m({x : 2 + 3}) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonConstantDefaultValue_method_positional() async {
-    Source source = addSource(r'''
-class A {
-  m([x = 2 + 3]) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonConstantDefaultValue_typedConstList() async {
-    Source source = addSource(r'''
-class A {
-  m([p111 = const <String>[]]) {}
-}
-class B extends A {
-  m([p222 = const <String>[]]) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonConstantValueInInitializer_namedArgument() async {
-    Source source = addSource(r'''
-class A {
-  final a;
-  const A({this.a});
-}
-class B extends A {
-  const B({b}) : super(a: b);
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonConstCaseExpression_constField() async {
-    Source source = addSource(r'''
-f(double p) {
-  switch (p) {
-    case double.INFINITY:
-      return true;
-    default:
-      return false;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [CompileTimeErrorCode.CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS]);
-    verify([source]);
-  }
-
-  test_nonConstCaseExpression_typeLiteral() async {
-    Source source = addSource(r'''
-f(Type t) {
-  switch (t) {
-    case bool:
-    case int:
-      return true;
-    default:
-      return false;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonConstListElement_constField() async {
-    Source source = addSource(r'''
-main() {
-  const [double.INFINITY];
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonConstMapAsExpressionStatement_const() async {
-    Source source = addSource(r'''
-f() {
-  const {'a' : 0, 'b' : 1};
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonConstMapAsExpressionStatement_notExpressionStatement() async {
-    Source source = addSource(r'''
-f() {
-  var m = {'a' : 0, 'b' : 1};
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonConstMapAsExpressionStatement_typeArguments() async {
-    Source source = addSource(r'''
-f() {
-  <String, int> {'a' : 0, 'b' : 1};
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonConstMapKey_constField() async {
-    Source source = addSource(r'''
-main() {
-  const {double.INFINITY: 0};
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source,
-        [CompileTimeErrorCode.CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS]);
-    verify([source]);
-  }
-
-  test_nonConstMapValue_constField() async {
-    Source source = addSource(r'''
-main() {
-  const {0: double.INFINITY};
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonConstValueInInitializer_binary_bool() async {
-    Source source = addSource(r'''
-class A {
-  final v;
-  const A.a1(bool p) : v = p && true;
-  const A.a2(bool p) : v = true && p;
-  const A.b1(bool p) : v = p || true;
-  const A.b2(bool p) : v = true || p;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.DEAD_CODE]);
-    verify([source]);
-  }
-
-  test_nonConstValueInInitializer_binary_dynamic() async {
-    Source source = addSource(r'''
-class A {
-  final v;
-  const A.a1(p) : v = p + 5;
-  const A.a2(p) : v = 5 + p;
-  const A.b1(p) : v = p - 5;
-  const A.b2(p) : v = 5 - p;
-  const A.c1(p) : v = p * 5;
-  const A.c2(p) : v = 5 * p;
-  const A.d1(p) : v = p / 5;
-  const A.d2(p) : v = 5 / p;
-  const A.e1(p) : v = p ~/ 5;
-  const A.e2(p) : v = 5 ~/ p;
-  const A.f1(p) : v = p > 5;
-  const A.f2(p) : v = 5 > p;
-  const A.g1(p) : v = p < 5;
-  const A.g2(p) : v = 5 < p;
-  const A.h1(p) : v = p >= 5;
-  const A.h2(p) : v = 5 >= p;
-  const A.i1(p) : v = p <= 5;
-  const A.i2(p) : v = 5 <= p;
-  const A.j1(p) : v = p % 5;
-  const A.j2(p) : v = 5 % p;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    // operations on "p" are not resolved
-  }
-
-  test_nonConstValueInInitializer_binary_int() async {
-    Source source = addSource(r'''
-class A {
-  final v;
-  const A.a1(int p) : v = p ^ 5;
-  const A.a2(int p) : v = 5 ^ p;
-  const A.b1(int p) : v = p & 5;
-  const A.b2(int p) : v = 5 & p;
-  const A.c1(int p) : v = p | 5;
-  const A.c2(int p) : v = 5 | p;
-  const A.d1(int p) : v = p >> 5;
-  const A.d2(int p) : v = 5 >> p;
-  const A.e1(int p) : v = p << 5;
-  const A.e2(int p) : v = 5 << p;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonConstValueInInitializer_binary_num() async {
-    Source source = addSource(r'''
-class A {
-  final v;
-  const A.a1(num p) : v = p + 5;
-  const A.a2(num p) : v = 5 + p;
-  const A.b1(num p) : v = p - 5;
-  const A.b2(num p) : v = 5 - p;
-  const A.c1(num p) : v = p * 5;
-  const A.c2(num p) : v = 5 * p;
-  const A.d1(num p) : v = p / 5;
-  const A.d2(num p) : v = 5 / p;
-  const A.e1(num p) : v = p ~/ 5;
-  const A.e2(num p) : v = 5 ~/ p;
-  const A.f1(num p) : v = p > 5;
-  const A.f2(num p) : v = 5 > p;
-  const A.g1(num p) : v = p < 5;
-  const A.g2(num p) : v = 5 < p;
-  const A.h1(num p) : v = p >= 5;
-  const A.h2(num p) : v = 5 >= p;
-  const A.i1(num p) : v = p <= 5;
-  const A.i2(num p) : v = 5 <= p;
-  const A.j1(num p) : v = p % 5;
-  const A.j2(num p) : v = 5 % p;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonConstValueInInitializer_field() async {
-    Source source = addSource(r'''
-class A {
-  final int a;
-  const A() : a = 5;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonConstValueInInitializer_redirecting() async {
-    Source source = addSource(r'''
-class A {
-  const A.named(p);
-  const A() : this.named(42);
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonConstValueInInitializer_super() async {
-    Source source = addSource(r'''
-class A {
-  const A(p);
-}
-class B extends A {
-  const B() : super(42);
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonConstValueInInitializer_unary() async {
-    Source source = addSource(r'''
-class A {
-  final v;
-  const A.a(bool p) : v = !p;
-  const A.b(int p) : v = ~p;
-  const A.c(num p) : v = -p;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonGenerativeConstructor() async {
-    Source source = addSource(r'''
-class A {
-  A.named() {}
-  factory A() => null;
-}
-class B extends A {
-  B() : super.named();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonTypeInCatchClause_isClass() async {
-    Source source = addSource(r'''
-f() {
-  try {
-  } on String catch (e) {
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonTypeInCatchClause_isFunctionTypeAlias() async {
-    Source source = addSource(r'''
-typedef F();
-f() {
-  try {
-  } on F catch (e) {
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonTypeInCatchClause_isTypeParameter() async {
-    Source source = addSource(r'''
-class A<T> {
-  f() {
-    try {
-    } on T catch (e) {
-    }
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonTypeInCatchClause_noType() async {
-    Source source = addSource(r'''
-f() {
-  try {
-  } catch (e) {
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonVoidReturnForOperator_no() async {
-    Source source = addSource(r'''
-class A {
-  operator []=(a, b) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonVoidReturnForOperator_void() async {
-    Source source = addSource(r'''
-class A {
-  void operator []=(a, b) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonVoidReturnForSetter_function_no() async {
-    Source source = addSource("set x(v) {}");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonVoidReturnForSetter_function_void() async {
-    Source source = addSource("void set x(v) {}");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonVoidReturnForSetter_method_no() async {
-    Source source = addSource(r'''
-class A {
-  set x(v) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonVoidReturnForSetter_method_void() async {
-    Source source = addSource(r'''
-class A {
-  void set x(v) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_null_callOperator() async {
-    Source source = addSource(r'''
-main() {
-  null + 5;
-  null == 5;
-  null[0];
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      StaticTypeWarningCode.UNDEFINED_METHOD,
-      StaticTypeWarningCode.UNDEFINED_METHOD
-    ]);
-  }
-
-  test_optionalNew_rewrite() async {
-    resetWith(options: new AnalysisOptionsImpl());
-    Source source = addSource(r'''
-import 'b.dart';
-main() {
-  const B.named1();
-  const B.named2();
-  const B.named3();
-  const B.named4();
-}
-''');
-    addNamedSource("/a.dart", r'''
-class A {
-  const A();
-  const A.named();
-}
-''');
-    addNamedSource("/b.dart", r'''
-import 'a.dart';
-import 'a.dart' as p;
-
-const _a1 = A();
-const _a2 = A.named();
-const _a3 = p.A();
-const _a4 = p.A.named();
-
-class B {
-  const B.named1({this.a: _a1}) : assert(a != null);
-  const B.named2({this.a: _a2}) : assert(a != null);
-  const B.named3({this.a: _a3}) : assert(a != null);
-  const B.named4({this.a: _a4}) : assert(a != null);
-
-  final A a;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_optionalNew_rewrite_instantiatesToBounds() async {
-    resetWith(options: new AnalysisOptionsImpl());
-    Source source = addSource(r'''
-import 'b.dart';
-
-@B.named1()
-@B.named2()
-@B.named3()
-@B.named4()
-@B.named5()
-@B.named6()
-@B.named7()
-@B.named8()
-main() {}
-''');
-    addNamedSource("/a.dart", r'''
-class Unbounded<T> {
-  const Unbounded();
-  const Unbounded.named();
-}
-class Bounded<T extends String> {
-  const Bounded();
-  const Bounded.named();
-}
-''');
-    addNamedSource("/b.dart", r'''
-import 'a.dart';
-import 'a.dart' as p;
-
-const unbounded1 = Unbounded();
-const unbounded2 = Unbounded.named();
-const unbounded3 = p.Unbounded();
-const unbounded4 = p.Unbounded.named();
-const bounded1 = Bounded();
-const bounded2 = Bounded.named();
-const bounded3 = p.Bounded();
-const bounded4 = p.Bounded.named();
-
-class B {
-  const B.named1({this.unbounded: unbounded1}) : bounded = null;
-  const B.named2({this.unbounded: unbounded2}) : bounded = null;
-  const B.named3({this.unbounded: unbounded3}) : bounded = null;
-  const B.named4({this.unbounded: unbounded4}) : bounded = null;
-  const B.named5({this.bounded: bounded1}) : unbounded = null;
-  const B.named6({this.bounded: bounded2}) : unbounded = null;
-  const B.named7({this.bounded: bounded3}) : unbounded = null;
-  const B.named8({this.bounded: bounded4}) : unbounded = null;
-
-  final Unbounded unbounded;
-  final Bounded bounded;
-}
-''');
-    final result = await computeAnalysisResult(source);
-    expect(result.unit.declarations, hasLength(1));
-    final mainDecl = result.unit.declarations[0];
-    expect(mainDecl.metadata, hasLength(8));
-    mainDecl.metadata.forEach((metadata) {
-      final value = metadata.elementAnnotation.computeConstantValue();
-      expect(value, isNotNull);
-      expect(value.type.toString(), 'B');
-      final unbounded = value.getField('unbounded');
-      final bounded = value.getField('bounded');
-      if (!unbounded.isNull) {
-        expect(bounded.isNull, true);
-        expect(unbounded.type.name, 'Unbounded');
-        expect(unbounded.type.typeArguments, hasLength(1));
-        expect(unbounded.type.typeArguments[0].isDynamic, isTrue);
-      } else {
-        expect(unbounded.isNull, true);
-        expect(bounded.type.name, 'Bounded');
-        expect(bounded.type.typeArguments, hasLength(1));
-        expect(bounded.type.typeArguments[0].name, 'String');
-      }
-    });
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_optionalParameterInOperator_required() async {
-    Source source = addSource(r'''
-class A {
-  operator +(p) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_parameterScope_local() async {
-    // Parameter names shouldn't conflict with the name of the function they
-    // are enclosed in.
-    Source source = addSource(r'''
-f() {
-  g(g) {
-    h(g);
-  }
-}
-h(x) {}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_parameterScope_method() async {
-    // Parameter names shouldn't conflict with the name of the function they
-    // are enclosed in.
-    Source source = addSource(r'''
-class C {
-  g(g) {
-    h(g);
-  }
-}
-h(x) {}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_parameterScope_topLevel() async {
-    // Parameter names shouldn't conflict with the name of the function they
-    // are enclosed in.
-    Source source = addSource(r'''
-g(g) {
-  h(g);
-}
-h(x) {}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_parametricCallFunction() async {
-    Source source = addSource(r'''
-f() {
-  var c = new C();
-  c<String>().codeUnits;
-}
-
-class C {
-  T call<T>() => null;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_prefixCollidesWithTopLevelMembers() async {
-    addNamedSource("/lib.dart", r'''
-library lib;
-class A {}''');
-    Source source = addSource(r'''
-import 'lib.dart' as p;
-typedef P();
-p2() {}
-var p3;
-class p4 {}
-p.A a;''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_propagateTypeArgs_intoBounds() async {
-    Source source = addSource(r'''
-abstract class A<E> {}
-abstract class B<F> implements A<F>{}
-abstract class C<G, H extends A<G>> {}
-class D<I> extends C<I, B<I>> {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_propagateTypeArgs_intoSupertype() async {
-    Source source = addSource(r'''
-class A<T> {
-  A(T p);
-  A.named(T p);
-}
-class B<S> extends A<S> {
-  B(S p) : super(p);
-  B.named(S p) : super.named(p);
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_recursiveConstructorRedirect() async {
-    Source source = addSource(r'''
-class A {
-  A.a() : this.b();
-  A.b() : this.c();
-  A.c() {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_recursiveFactoryRedirect() async {
-    Source source = addSource(r'''
-class A {
-  factory A() = B;
-}
-class B implements A {
-  factory B() = C;
-}
-class C implements B {
-  factory C() => null;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_redirectToInvalidFunctionType() async {
-    Source source = addSource(r'''
-class A implements B {
-  A(int p) {}
-}
-class B {
-  factory B(int p) = A;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_redirectToNonConstConstructor() async {
-    Source source = addSource(r'''
-class A {
-  const A.a();
-  const factory A.b() = A.a;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_referencedBeforeDeclaration_cascade() async {
-    Source source = addSource(r'''
-testRequestHandler() {}
-
-main() {
-  var s1 = null;
-  testRequestHandler()
-    ..stream(s1);
-  var stream = 123;
-  print(stream);
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_referenceToDeclaredVariableInInitializer_constructorName() async {
-    Source source = addSource(r'''
-class A {
-  A.x() {}
-}
-f() {
-  var x = new A.x();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_referenceToDeclaredVariableInInitializer_methodName() async {
-    Source source = addSource(r'''
-class A {
-  x() {}
-}
-f(A a) {
-  var x = a.x();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_referenceToDeclaredVariableInInitializer_propertyName() async {
-    Source source = addSource(r'''
-class A {
-  var x;
-}
-f(A a) {
-  var x = a.x;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_regress34906() async {
-    Source source = addSource(r'''
-typedef G<X, Y extends Function(X)> = X Function(Function(Y));
-G<dynamic, Function(Null)> superBoundedG;
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_rethrowOutsideCatch() async {
-    Source source = addSource(r'''
-class A {
-  void m() {
-    try {} catch (e) {rethrow;}
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_return_in_generator_async() async {
-    Source source = addSource('''
-import 'dart:async';
-Stream<int> f() async* {
-  return;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_return_in_generator_sync() async {
-    Source source = addSource('''
-Iterable<int> f() sync* {
-  return;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_returnInGenerativeConstructor() async {
-    Source source = addSource(r'''
-class A {
-  A() { return; }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_returnInGenerator_async() async {
-    Source source = addSource(r'''
-f() async {
-  return 0;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_returnInGenerator_sync() async {
-    Source source = addSource(r'''
-f() {
-  return 0;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_returnOfInvalidType_async() async {
-    Source source = addSource(r'''
-import 'dart:async';
-class A {
-  Future<int> m() async {
-    return 0;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_returnOfInvalidType_dynamic() async {
-    Source source = addSource(r'''
-class TypeError {}
-class A {
-  static void testLogicalOp() {
-    testOr(a, b, onTypeError) {
-      try {
-        return a || b;
-      } on TypeError catch (t) {
-        return onTypeError;
-      }
-    }
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_returnOfInvalidType_subtype() async {
-    Source source = addSource(r'''
-class A {}
-class B extends A {}
-A f(B b) { return b; }''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_returnOfInvalidType_supertype() async {
-    Source source = addSource(r'''
-class A {}
-class B extends A {}
-B f(A a) { return a; }''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_returnOfInvalidType_typeParameter_18468() async {
-    // https://code.google.com/p/dart/issues/detail?id=18468
-    //
-    // This test verifies that the type of T is more specific than Type,
-    // where T is a type parameter and Type is the type Type from
-    // core, this particular test case comes from issue 18468.
-    //
-    // A test cannot be added to TypeParameterTypeImplTest since the types
-    // returned out of the TestTypeProvider don't have a mock 'dart.core'
-    // enclosing library element.
-    // See TypeParameterTypeImpl.isMoreSpecificThan().
-    Source source = addSource(r'''
-class Foo<T> {
-  Type get t => T;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source);
-    verify([source]);
-  }
-
-  test_returnOfInvalidType_void() async {
-    Source source = addSource(r'''
-void f1() {}
-void f2() { return; }
-void f3() { return null; }
-void f4() { return g1(); }
-void f5() { return g2(); }
-void f6() => throw 42;
-g1() {}
-void g2() {}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_returnWithoutValue_noReturnType() async {
-    Source source = addSource("f() { return; }");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_returnWithoutValue_void() async {
-    Source source = addSource("void f() { return; }");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_reversedTypeArguments() async {
-    Source source = addSource(r'''
-class Codec<S1, T1> {
-  Codec<T1, S1> get inverted => new _InvertedCodec<T1, S1>(this);
-}
-class _InvertedCodec<T2, S2> extends Codec<T2, S2> {
-  _InvertedCodec(Codec<S2, T2> codec);
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_sharedDeferredPrefix() async {
-    await resolveWithErrors(<String>[
-      r'''
-library lib1;
-f1() {}''',
-      r'''
-library lib2;
-f2() {}''',
-      r'''
-library lib3;
-f3() {}''',
-      r'''
-library root;
-import 'lib1.dart' deferred as lib1;
-import 'lib2.dart' as lib;
-import 'lib3.dart' as lib;
-main() { lib1.f1(); lib.f2(); lib.f3(); }'''
-    ], <ErrorCode>[]);
-  }
-
-  test_staticAccessToInstanceMember_annotation() async {
-    Source source = addSource(r'''
-class A {
-  const A.name();
-}
-@A.name()
-main() {
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_staticAccessToInstanceMember_method() async {
-    Source source = addSource(r'''
-class A {
-  static m() {}
-}
-main() {
-  A.m;
-  A.m();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_staticAccessToInstanceMember_propertyAccess_field() async {
-    Source source = addSource(r'''
-class A {
-  static var f;
-}
-main() {
-  A.f;
-  A.f = 1;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_staticAccessToInstanceMember_propertyAccess_propertyAccessor() async {
-    Source source = addSource(r'''
-class A {
-  static get f => 42;
-  static set f(x) {}
-}
-main() {
-  A.f;
-  A.f = 1;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_superInInvalidContext() async {
-    Source source = addSource(r'''
-class A {
-  m() {}
-}
-class B extends A {
-  B() {
-    var v = super.m();
-  }
-  n() {
-    var v = super.m();
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_typeAliasCannotReferenceItself_returnClass_withTypeAlias() async {
-    Source source = addSource(r'''
-typedef B A();
-class B {
-  A a;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_typeArgument_boundToFunctionType() async {
-    Source source = addSource("class A<T extends void Function(T)>{}");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_typeArgumentNotMatchingBounds_const() async {
-    Source source = addSource(r'''
-class A {}
-class B extends A {}
-class G<E extends A> {
-  const G();
-}
-f() { return const G<B>(); }''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_typeArgumentNotMatchingBounds_new() async {
-    Source source = addSource(r'''
-class A {}
-class B extends A {}
-class G<E extends A> {}
-f() { return new G<B>(); }''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_typeArgumentNotMatchingBounds_ofFunctionTypeAlias_hasBound() async {
-    Source source = addSource(r'''
-class A {}
-class B extends A {}
-typedef F<T extends A>();
-F<A> fa;
-F<B> fb;
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_typeArgumentNotMatchingBounds_ofFunctionTypeAlias_hasBound2() async {
-    Source source = addSource(r'''
-class MyClass<T> {}
-typedef MyFunction<T, P extends MyClass<T>>();
-class A<T, P extends MyClass<T>> {
-  MyFunction<T, P> f;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_typeArgumentNotMatchingBounds_ofFunctionTypeAlias_noBound() async {
-    Source source = addSource(r'''
-typedef F<T>();
-F<int> f1;
-F<String> f2;
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_typePromotion_booleanAnd_useInRight() async {
-    Source source = addSource(r'''
-main(Object p) {
-  p is String && p.length != 0;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_typePromotion_booleanAnd_useInRight_accessedInClosureRight_noAssignment() async {
-    Source source = addSource(r'''
-callMe(f()) { f(); }
-main(Object p) {
-  (p is String) && callMe(() { p.length; });
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_typePromotion_conditional_issue14655() async {
-    Source source = addSource(r'''
-class A {}
-class B extends A {}
-class C extends B {
-  mc() {}
-}
-print(_) {}
-main(A p) {
-  (p is C) && (print(() => p) && (p is B)) ? p.mc() : p = null;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_typePromotion_conditional_useInThen() async {
-    Source source = addSource(r'''
-main(Object p) {
-  p is String ? p.length : 0;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_typePromotion_conditional_useInThen_accessedInClosure_noAssignment() async {
-    Source source = addSource(r'''
-callMe(f()) { f(); }
-main(Object p) {
-  p is String ? callMe(() { p.length; }) : 0;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_typePromotion_functionType_arg_ignoreIfNotMoreSpecific() async {
-    Source source = addSource(r'''
-typedef FuncB(B b);
-typedef FuncA(A a);
-class A {}
-class B {}
-main(FuncA f) {
-  if (f is FuncB) {
-    f(new A());
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_typePromotion_functionType_return_ignoreIfNotMoreSpecific() async {
-    Source source = addSource(r'''
-class A {}
-typedef FuncAtoDyn(A a);
-typedef FuncDynToDyn(x);
-main(FuncAtoDyn f) {
-  if (f is FuncDynToDyn) {
-    A a = f(new A());
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_typePromotion_functionType_return_voidToDynamic() async {
-    Source source = addSource(r'''
-typedef FuncDynToDyn(x);
-typedef void FuncDynToVoid(x);
-class A {}
-main(FuncDynToVoid f) {
-  if (f is FuncDynToDyn) {
-    A a = f(null);
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_typePromotion_if_accessedInClosure_noAssignment() async {
-    Source source = addSource(r'''
-callMe(f()) { f(); }
-main(Object p) {
-  if (p is String) {
-    callMe(() {
-      p.length;
-    });
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_typePromotion_if_extends_moreSpecific() async {
-    Source source = addSource(r'''
-class V {}
-class VP extends V {}
-class A<T> {}
-class B<S> extends A<S> {
-  var b;
-}
-
-main(A<V> p) {
-  if (p is B<VP>) {
-    p.b;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_typePromotion_if_hasAssignment_outsideAfter() async {
-    Source source = addSource(r'''
-main(Object p) {
-  if (p is String) {
-    p.length;
-  }
-  p = 0;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_typePromotion_if_hasAssignment_outsideBefore() async {
-    Source source = addSource(r'''
-main(Object p, Object p2) {
-  p = p2;
-  if (p is String) {
-    p.length;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_typePromotion_if_implements_moreSpecific() async {
-    Source source = addSource(r'''
-class V {}
-class VP extends V {}
-class A<T> {}
-class B<S> implements A<S> {
-  var b;
-}
-
-main(A<V> p) {
-  if (p is B<VP>) {
-    p.b;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_typePromotion_if_inClosure_assignedAfter_inSameFunction() async {
-    Source source = addSource(r'''
-main() {
-  f(Object p) {
-    if (p is String) {
-      p.length;
-    }
-    p = 0;
-  };
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_typePromotion_if_is_and_left() async {
-    Source source = addSource(r'''
-bool tt() => true;
-main(Object p) {
-  if (p is String && tt()) {
-    p.length;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_typePromotion_if_is_and_right() async {
-    Source source = addSource(r'''
-bool tt() => true;
-main(Object p) {
-  if (tt() && p is String) {
-    p.length;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_typePromotion_if_is_and_subThenSuper() async {
-    Source source = addSource(r'''
-class A {
-  var a;
-}
-class B extends A {
-  var b;
-}
-main(Object p) {
-  if (p is B && p is A) {
-    p.a;
-    p.b;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_typePromotion_if_is_parenthesized() async {
-    Source source = addSource(r'''
-main(Object p) {
-  if ((p is String)) {
-    p.length;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_typePromotion_if_is_single() async {
-    Source source = addSource(r'''
-main(Object p) {
-  if (p is String) {
-    p.length;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_typePromotion_parentheses() async {
-    Source source = addSource(r'''
-main(Object p) {
-  (p is String) ? p.length : 0;
-  (p) is String ? p.length : 0;
-  ((p)) is String ? p.length : 0;
-  ((p) is String) ? p.length : 0;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_typeType_class() async {
-    Source source = addSource(r'''
-class C {}
-f(Type t) {}
-main() {
-  f(C);
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_typeType_class_prefixed() async {
-    addNamedSource("/lib.dart", r'''
-library lib;
-class C {}''');
-    Source source = addSource(r'''
-import 'lib.dart' as p;
-f(Type t) {}
-main() {
-  f(p.C);
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_typeType_functionTypeAlias() async {
-    Source source = addSource(r'''
-typedef F();
-f(Type t) {}
-main() {
-  f(F);
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_typeType_functionTypeAlias_prefixed() async {
-    addNamedSource("/lib.dart", r'''
-library lib;
-typedef F();''');
-    Source source = addSource(r'''
-import 'lib.dart' as p;
-f(Type t) {}
-main() {
-  f(p.F);
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_undefinedConstructorInInitializer_explicit_named() async {
-    Source source = addSource(r'''
-class A {
-  A.named() {}
-}
-class B extends A {
-  B() : super.named();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_undefinedConstructorInInitializer_explicit_unnamed() async {
-    Source source = addSource(r'''
-class A {
-  A() {}
-}
-class B extends A {
-  B() : super();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_undefinedConstructorInInitializer_hasOptionalParameters() async {
-    Source source = addSource(r'''
-class A {
-  A([p]) {}
-}
-class B extends A {
-  B();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_undefinedConstructorInInitializer_implicit() async {
-    Source source = addSource(r'''
-class A {
-  A() {}
-}
-class B extends A {
-  B();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_undefinedConstructorInInitializer_redirecting() async {
-    Source source = addSource(r'''
-class Foo {
-  Foo.ctor();
-}
-class Bar extends Foo {
-  Bar() : this.ctor();
-  Bar.ctor() : super.ctor();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_undefinedGetter_static_conditionalAccess() async {
-    // The conditional access operator '?.' can be used to access static
-    // fields.
-    Source source = addSource('''
-class A {
-  static var x;
-}
-var a = A?.x;
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_undefinedGetter_typeSubstitution() async {
-    Source source = addSource(r'''
-class A<E> {
-  E element;
-}
-class B extends A<List> {
-  m() {
-    element.last;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_undefinedIdentifier_synthetic_whenExpression() async {
-    Source source = addSource(r'''
-print(x) {}
-main() {
-  print(is String);
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [ParserErrorCode.MISSING_IDENTIFIER]);
-  }
-
-  test_undefinedIdentifier_synthetic_whenMethodName() async {
-    Source source = addSource(r'''
-print(x) {}
-main(int p) {
-  p.();
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      ParserErrorCode.MISSING_IDENTIFIER,
-      ParserErrorCode.MISSING_IDENTIFIER,
-      StaticTypeWarningCode.UNDEFINED_GETTER
-    ]);
-  }
-
-  test_undefinedMethod_functionExpression_callMethod() async {
-    Source source = addSource(r'''
-main() {
-  (() => null).call();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    // A call to verify(source) fails as '.call()' isn't resolved.
-  }
-
-  test_undefinedMethod_functionExpression_directCall() async {
-    Source source = addSource(r'''
-main() {
-  (() => null)();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    // A call to verify(source) fails as '(() => null)()' isn't resolved.
-  }
-
-  test_undefinedMethod_static_conditionalAccess() async {
-    // The conditional access operator '?.' can be used to access static
-    // methods.
-    Source source = addSource('''
-class A {
-  static void m() {}
-}
-f() { A?.m(); }
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_undefinedOperator_index() async {
-    Source source = addSource(r'''
-class A {
-  operator [](a) {}
-  operator []=(a, b) {}
-}
-f(A a) {
-  a[0];
-  a[0] = 1;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_undefinedOperator_tilde() async {
-    Source source = addSource(r'''
-const A = 3;
-const B = ~((1 << A) - 1);''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_undefinedSetter_importWithPrefix() async {
-    addNamedSource("/lib.dart", r'''
-library lib;
-set y(int value) {}''');
-    Source source = addSource(r'''
-import 'lib.dart' as x;
-main() {
-  x.y = 0;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_undefinedSetter_static_conditionalAccess() async {
-    // The conditional access operator '?.' can be used to access static
-    // fields.
-    Source source = addSource('''
-class A {
-  static var x;
-}
-f() { A?.x = 1; }
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_undefinedSuperMethod_field() async {
-    Source source = addSource(r'''
-class A {
-  var m;
-}
-class B extends A {
-  f() {
-    super.m();
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_undefinedSuperMethod_method() async {
-    Source source = addSource(r'''
-class A {
-  m() {}
-}
-class B extends A {
-  f() {
-    super.m();
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_unusedShownName_unresolved() async {
-    Source source = addSource(r'''
-import 'dart:math' show max, FooBar;
-main() {
-  print(max(1, 2));
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.UNDEFINED_SHOWN_NAME]);
-  }
-
-  test_uriDoesNotExist_dll() async {
-    addNamedSource("/lib.dll", "");
-    Source source = addSource("import 'dart-ext:lib';");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-  }
-
-  test_uriDoesNotExist_dylib() async {
-    addNamedSource("/lib.dylib", "");
-    Source source = addSource("import 'dart-ext:lib';");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-  }
-
-  test_uriDoesNotExist_so() async {
-    addNamedSource("/lib.so", "");
-    Source source = addSource("import 'dart-ext:lib';");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-  }
-
-  Future test_useDynamicWithPrefix() async {
-    final Source source = addSource('''
-import 'dart:core' as core;
-
-core.dynamic dynamicVariable;
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_wrongNumberOfParametersForOperator1() async {
-    await _check_wrongNumberOfParametersForOperator1("<");
-    await _check_wrongNumberOfParametersForOperator1(">");
-    await _check_wrongNumberOfParametersForOperator1("<=");
-    await _check_wrongNumberOfParametersForOperator1(">=");
-    await _check_wrongNumberOfParametersForOperator1("+");
-    await _check_wrongNumberOfParametersForOperator1("/");
-    await _check_wrongNumberOfParametersForOperator1("~/");
-    await _check_wrongNumberOfParametersForOperator1("*");
-    await _check_wrongNumberOfParametersForOperator1("%");
-    await _check_wrongNumberOfParametersForOperator1("|");
-    await _check_wrongNumberOfParametersForOperator1("^");
-    await _check_wrongNumberOfParametersForOperator1("&");
-    await _check_wrongNumberOfParametersForOperator1("<<");
-    await _check_wrongNumberOfParametersForOperator1(">>");
-    await _check_wrongNumberOfParametersForOperator1("[]");
-  }
-
-  test_wrongNumberOfParametersForOperator_index() async {
-    Source source = addSource(r'''
-class A {
-  operator []=(a, b) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_wrongNumberOfParametersForOperator_minus() async {
-    await _check_wrongNumberOfParametersForOperator("-", "");
-    await _check_wrongNumberOfParametersForOperator("-", "a");
-  }
-
-  test_wrongNumberOfParametersForSetter() async {
-    Source source = addSource(r'''
-class A {
-  set x(a) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_yield_async_to_dynamic_type() async {
-    Source source = addSource('''
-dynamic f() async* {
-  yield 3;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_yield_async_to_generic_type() async {
-    Source source = addSource('''
-import 'dart:async';
-Stream f() async* {
-  yield 3;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_yield_async_to_parameterized_type() async {
-    Source source = addSource('''
-import 'dart:async';
-Stream<int> f() async* {
-  yield 3;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_yield_async_to_untyped() async {
-    Source source = addSource('''
-f() async* {
-  yield 3;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_yield_each_async_dynamic_to_dynamic() async {
-    Source source = addSource('''
-f() async* {
-  yield* g();
-}
-g() => null;
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_yield_each_async_dynamic_to_stream() async {
-    Source source = addSource('''
-import 'dart:async';
-Stream f() async* {
-  yield* g();
-}
-g() => null;
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_yield_each_async_dynamic_to_typed_stream() async {
-    Source source = addSource('''
-import 'dart:async';
-Stream<int> f() async* {
-  yield* g();
-}
-g() => null;
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_yield_each_async_stream_to_dynamic() async {
-    Source source = addSource('''
-import 'dart:async';
-f() async* {
-  yield* g();
-}
-Stream g() => null;
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_yield_each_async_typed_stream_to_dynamic() async {
-    Source source = addSource('''
-import 'dart:async';
-f() async* {
-  yield* g();
-}
-Stream<int> g() => null;
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_yield_each_async_typed_stream_to_typed_stream() async {
-    Source source = addSource('''
-import 'dart:async';
-Stream<int> f() async* {
-  yield* g();
-}
-Stream<int> g() => null;
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_yield_each_sync_dynamic_to_dynamic() async {
-    Source source = addSource('''
-f() sync* {
-  yield* g();
-}
-g() => null;
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_yield_each_sync_dynamic_to_iterable() async {
-    Source source = addSource('''
-Iterable f() sync* {
-  yield* g();
-}
-g() => null;
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_yield_each_sync_dynamic_to_typed_iterable() async {
-    Source source = addSource('''
-Iterable<int> f() sync* {
-  yield* g();
-}
-g() => null;
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_yield_each_sync_iterable_to_dynamic() async {
-    Source source = addSource('''
-f() sync* {
-  yield* g();
-}
-Iterable g() => null;
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_yield_each_sync_typed_iterable_to_dynamic() async {
-    Source source = addSource('''
-f() sync* {
-  yield* g();
-}
-Iterable<int> g() => null;
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_yield_each_sync_typed_iterable_to_typed_iterable() async {
-    Source source = addSource('''
-Iterable<int> f() sync* {
-  yield* g();
-}
-Iterable<int> g() => null;
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_yield_sync_to_dynamic_type() async {
-    Source source = addSource('''
-dynamic f() sync* {
-  yield 3;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_yield_sync_to_generic_type() async {
-    Source source = addSource('''
-Iterable f() sync* {
-  yield 3;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_yield_sync_to_parameterized_type() async {
-    Source source = addSource('''
-Iterable<int> f() sync* {
-  yield 3;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_yield_sync_to_untyped() async {
-    Source source = addSource('''
-f() sync* {
-  yield 3;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_yieldInNonGenerator_asyncStar() async {
-    Source source = addSource(r'''
-f() async* {
-  yield 0;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_yieldInNonGenerator_syncStar() async {
-    Source source = addSource(r'''
-f() sync* {
-  yield 0;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  Future<void> _check_wrongNumberOfParametersForOperator(
-      String name, String parameters) async {
-    Source source = addSource("""
-class A {
-  operator $name($parameters) {}
-}""");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  Future<void> _check_wrongNumberOfParametersForOperator1(String name) async {
-    await _check_wrongNumberOfParametersForOperator(name, "a");
-  }
-}
diff --git a/pkg/analyzer/test/generated/non_error_resolver_driver_test.dart b/pkg/analyzer/test/generated/non_error_resolver_driver_test.dart
deleted file mode 100644
index 0e14cfb..0000000
--- a/pkg/analyzer/test/generated/non_error_resolver_driver_test.dart
+++ /dev/null
@@ -1,74 +0,0 @@
-// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/src/dart/analysis/experiments.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import 'non_error_resolver.dart';
-import 'resolver_test_case.dart';
-
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(NonErrorResolverTest_Driver);
-    defineReflectiveTests(NonConstantValueInInitializer);
-  });
-}
-
-@reflectiveTest
-class NonConstantValueInInitializer extends ResolverTestCase {
-  @override
-  List<String> get enabledExperiments => [EnableString.constant_update_2018];
-
-  @override
-  bool get enableNewAnalysisDriver => true;
-
-  test_intLiteralInDoubleContext_const_exact() async {
-    Source source = addSource(r'''
-const double x = 0;
-class C {
-  const C(double y) : assert(y is double), assert(x is double);
-}
-@C(0)
-@C(-0)
-@C(0x0)
-@C(-0x0)
-void main() {
-  const C(0);
-  const C(-0);
-  const C(0x0);
-  const C(-0x0);
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_isCheckInConstAssert() async {
-    Source source = addSource(r'''
-class C {
-  const C() : assert(1 is int);
-}
-
-void main() {
-  const C();
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-}
-
-@reflectiveTest
-class NonErrorResolverTest_Driver extends NonErrorResolverTestBase {
-  @override
-  bool get enableNewAnalysisDriver => true;
-
-  @override
-  @failingTest
-  test_null_callOperator() {
-    return super.test_null_callOperator();
-  }
-}
diff --git a/pkg/analyzer/test/generated/non_error_resolver_test.dart b/pkg/analyzer/test/generated/non_error_resolver_test.dart
new file mode 100644
index 0000000..a033b5c
--- /dev/null
+++ b/pkg/analyzer/test/generated/non_error_resolver_test.dart
@@ -0,0 +1,6085 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/standard_resolution_map.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/error/error.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/generated/parser.dart' show ParserErrorCode;
+import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/generated/source_io.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'resolver_test_case.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NonErrorResolverTest);
+    defineReflectiveTests(NonErrorResolverWithUiAsCodeTest);
+    defineReflectiveTests(NonConstantValueInInitializer);
+  });
+}
+
+@reflectiveTest
+class NonConstantValueInInitializer extends ResolverTestCase {
+  @override
+  List<String> get enabledExperiments => [EnableString.constant_update_2018];
+
+  test_intLiteralInDoubleContext_const_exact() async {
+    Source source = addSource(r'''
+const double x = 0;
+class C {
+  const C(double y) : assert(y is double), assert(x is double);
+}
+@C(0)
+@C(-0)
+@C(0x0)
+@C(-0x0)
+void main() {
+  const C(0);
+  const C(-0);
+  const C(0x0);
+  const C(-0x0);
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_isCheckInConstAssert() async {
+    Source source = addSource(r'''
+class C {
+  const C() : assert(1 is int);
+}
+
+void main() {
+  const C();
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+}
+
+@reflectiveTest
+class NonErrorResolverTest extends ResolverTestCase {
+  @override
+  AnalysisOptions get defaultAnalysisOptions => new AnalysisOptionsImpl();
+
+  test_ambiguousExport() async {
+    Source source = addSource(r'''
+library L;
+export 'lib1.dart';
+export 'lib2.dart';''');
+    addNamedSource("/lib1.dart", r'''
+library lib1;
+class M {}''');
+    addNamedSource("/lib2.dart", r'''
+library lib2;
+class N {}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_ambiguousExport_combinators_hide() async {
+    Source source = addSource(r'''
+library L;
+export 'lib1.dart';
+export 'lib2.dart' hide B;''');
+    addNamedSource("/lib1.dart", r'''
+library L1;
+class A {}
+class B {}''');
+    addNamedSource("/lib2.dart", r'''
+library L2;
+class B {}
+class C {}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_ambiguousExport_combinators_show() async {
+    Source source = addSource(r'''
+library L;
+export 'lib1.dart';
+export 'lib2.dart' show C;''');
+    addNamedSource("/lib1.dart", r'''
+library L1;
+class A {}
+class B {}''');
+    addNamedSource("/lib2.dart", r'''
+library L2;
+class B {}
+class C {}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_ambiguousExport_sameDeclaration() async {
+    Source source = addSource(r'''
+library L;
+export 'lib.dart';
+export 'lib.dart';''');
+    addNamedSource("/lib.dart", r'''
+library lib;
+class N {}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_ambiguousImport_dart_implicitHide() async {
+    Source source = addSource(r'''
+import 'dart:async';
+import 'lib.dart';
+main() {
+  print(Future.zero);
+}
+''');
+    addNamedSource('/lib.dart', r'''
+class Future {
+  static const zero = 0;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+  }
+
+  test_ambiguousImport_hideCombinator() async {
+    Source source = addSource(r'''
+import 'lib1.dart';
+import 'lib2.dart';
+import 'lib3.dart' hide N;
+main() {
+  new N1();
+  new N2();
+  new N3();
+}''');
+    addNamedSource("/lib1.dart", r'''
+library lib1;
+class N {}
+class N1 {}''');
+    addNamedSource("/lib2.dart", r'''
+library lib2;
+class N {}
+class N2 {}''');
+    addNamedSource("/lib3.dart", r'''
+library lib3;
+class N {}
+class N3 {}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+  }
+
+  test_ambiguousImport_showCombinator() async {
+    Source source = addSource(r'''
+import 'lib1.dart';
+import 'lib2.dart' show N, N2;
+main() {
+  new N1();
+  new N2();
+}''');
+    addNamedSource("/lib1.dart", r'''
+library lib1;
+class N {}
+class N1 {}''');
+    addNamedSource("/lib2.dart", r'''
+library lib2;
+class N {}
+class N2 {}''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [HintCode.UNUSED_SHOWN_NAME]);
+  }
+
+  test_annotated_partOfDeclaration() async {
+    Source source = addSource('library L; part "part.dart";');
+    addNamedSource('/part.dart', '@deprecated part of L;');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_argumentTypeNotAssignable_classWithCall_Function() async {
+    Source source = addSource(r'''
+  caller(Function callee) {
+    callee();
+  }
+
+  class CallMeBack {
+    call() => 0;
+  }
+
+  main() {
+    caller(new CallMeBack());
+  }''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_argumentTypeNotAssignable_fieldFormalParameterElement_member() async {
+    Source source = addSource(r'''
+class ObjectSink<T> {
+  void sink(T object) {
+    new TimestampedObject<T>(object);
+  }
+}
+class TimestampedObject<E> {
+  E object2;
+  TimestampedObject(this.object2);
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_argumentTypeNotAssignable_invocation_functionParameter_generic() async {
+    Source source = addSource(r'''
+class A<K> {
+  m(f(K k), K v) {
+    f(v);
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_argumentTypeNotAssignable_invocation_typedef_generic() async {
+    Source source = addSource(r'''
+typedef A<T>(T p);
+f(A<int> a) {
+  a(1);
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_argumentTypeNotAssignable_Object_Function() async {
+    Source source = addSource(r'''
+main() {
+  process(() {});
+}
+process(Object x) {}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_argumentTypeNotAssignable_optionalNew() async {
+    resetWith(options: new AnalysisOptionsImpl());
+    Source source = addSource(r'''
+class Widget { }
+
+class MaterialPageRoute {
+  final Widget Function() builder;
+  const MaterialPageRoute({this.builder});
+}
+
+void main() {
+  print(MaterialPageRoute(
+      builder: () { return Widget(); }
+  ));
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_argumentTypeNotAssignable_typedef_local() async {
+    Source source = addSource(r'''
+typedef A(int p1, String p2);
+A getA() => null;
+f() {
+  A a = getA();
+  a(1, '2');
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_argumentTypeNotAssignable_typedef_parameter() async {
+    Source source = addSource(r'''
+typedef A(int p1, String p2);
+f(A a) {
+  a(1, '2');
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_assert_with_message_await() async {
+    Source source = addSource('''
+import 'dart:async';
+f() async {
+  assert(false, await g());
+}
+Future<String> g() => null;
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_assert_with_message_dynamic() async {
+    Source source = addSource('''
+f() {
+  assert(false, g());
+}
+g() => null;
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_assert_with_message_non_string() async {
+    Source source = addSource('''
+f() {
+  assert(false, 3);
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_assert_with_message_null() async {
+    Source source = addSource('''
+f() {
+  assert(false, null);
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_assert_with_message_string() async {
+    Source source = addSource('''
+f() {
+  assert(false, 'message');
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_assert_with_message_suppresses_unused_var_hint() async {
+    Source source = addSource('''
+f() {
+  String message = 'msg';
+  assert(true, message);
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_assignability_function_expr_rettype_from_typedef_cls() async {
+    // In the code below, the type of (() => f()) has a return type which is
+    // a class, and that class is inferred from the return type of the typedef
+    // F.
+    Source source = addSource('''
+class C {}
+typedef C F();
+F f;
+main() {
+  F f2 = (() => f());
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_assignability_function_expr_rettype_from_typedef_typedef() async {
+    // In the code below, the type of (() => f()) has a return type which is
+    // a typedef, and that typedef is inferred from the return type of the
+    // typedef F.
+    Source source = addSource('''
+typedef G F();
+typedef G();
+F f;
+main() {
+  F f2 = (() => f());
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_assignmentToFinal_prefixNegate() async {
+    Source source = addSource(r'''
+f() {
+  final x = 0;
+  -x;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_assignmentToFinalNoSetter_prefixedIdentifier() async {
+    Source source = addSource(r'''
+class A {
+  int get x => 0;
+  set x(v) {}
+}
+main() {
+  A a = new A();
+  a.x = 0;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_assignmentToFinalNoSetter_propertyAccess() async {
+    Source source = addSource(r'''
+class A {
+  int get x => 0;
+  set x(v) {}
+}
+class B {
+  static A a;
+}
+main() {
+  B.a.x = 0;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_assignmentToFinals_importWithPrefix() async {
+    Source source = addSource(r'''
+library lib;
+import 'lib1.dart' as foo;
+main() {
+  foo.x = true;
+}''');
+    addNamedSource("/lib1.dart", r'''
+library lib1;
+bool x = false;''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_async_dynamic_with_return() async {
+    Source source = addSource('''
+dynamic f() async {
+  return;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_async_dynamic_with_return_value() async {
+    Source source = addSource('''
+dynamic f() async {
+  return 5;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_async_dynamic_without_return() async {
+    Source source = addSource('''
+dynamic f() async {}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_async_expression_function_type() async {
+    Source source = addSource('''
+import 'dart:async';
+typedef Future<int> F(int i);
+main() {
+  F f = (int i) async => i;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_async_flattened() async {
+    Source source = addSource('''
+import 'dart:async';
+typedef Future<int> CreatesFutureInt();
+main() {
+  CreatesFutureInt createFutureInt = () async => f();
+  Future<int> futureInt = createFutureInt();
+  futureInt.then((int i) => print(i));
+}
+Future<int> f() => null;
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_async_future_dynamic_with_return() async {
+    Source source = addSource('''
+import 'dart:async';
+Future<dynamic> f() async {
+  return;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_async_future_dynamic_with_return_value() async {
+    Source source = addSource('''
+import 'dart:async';
+Future<dynamic> f() async {
+  return 5;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_async_future_dynamic_without_return() async {
+    Source source = addSource('''
+import 'dart:async';
+Future<dynamic> f() async {}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_async_future_int_with_return_future_int() async {
+    Source source = addSource('''
+import 'dart:async';
+Future<int> f() async {
+  return new Future<int>.value(5);
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_async_future_int_with_return_value() async {
+    Source source = addSource('''
+import 'dart:async';
+Future<int> f() async {
+  return 5;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_async_future_null_with_return() async {
+    Source source = addSource('''
+import 'dart:async';
+Future<Null> f() async {
+  return;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_async_future_null_without_return() async {
+    Source source = addSource('''
+import 'dart:async';
+Future<Null> f() async {}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_async_future_object_with_return_value() async {
+    Source source = addSource('''
+import 'dart:async';
+Future<Object> f() async {
+  return 5;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_async_future_with_return() async {
+    Source source = addSource('''
+import 'dart:async';
+Future f() async {
+  return;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_async_future_with_return_value() async {
+    Source source = addSource('''
+import 'dart:async';
+Future f() async {
+  return 5;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_async_future_without_return() async {
+    Source source = addSource('''
+import 'dart:async';
+Future f() async {}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_async_with_return() async {
+    Source source = addSource('''
+f() async {
+  return;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_async_with_return_value() async {
+    Source source = addSource('''
+f() async {
+  return 5;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_async_without_return() async {
+    Source source = addSource('''
+f() async {}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_asyncForInWrongContext_async() async {
+    Source source = addSource(r'''
+f(list) async {
+  await for (var e in list) {
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_asyncForInWrongContext_asyncStar() async {
+    Source source = addSource(r'''
+f(list) async* {
+  await for (var e in list) {
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_await_flattened() async {
+    Source source = addSource('''
+import 'dart:async';
+Future<Future<int>> ffi() => null;
+f() async {
+  Future<int> b = await ffi();
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_await_simple() async {
+    Source source = addSource('''
+import 'dart:async';
+Future<int> fi() => null;
+f() async {
+  int a = await fi();
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_awaitInWrongContext_async() async {
+    Source source = addSource(r'''
+f(x, y) async {
+  return await x + await y;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_awaitInWrongContext_asyncStar() async {
+    Source source = addSource(r'''
+f(x, y) async* {
+  yield await x + await y;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_breakWithoutLabelInSwitch() async {
+    Source source = addSource(r'''
+class A {
+  void m(int i) {
+    switch (i) {
+      case 0:
+        break;
+    }
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_bug_24539_getter() async {
+    Source source = addSource('''
+class C<T> {
+  List<Foo> get x => null;
+}
+
+typedef Foo(param);
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_bug_24539_setter() async {
+    Source source = addSource('''
+class C<T> {
+  void set x(List<Foo> value) {}
+}
+
+typedef Foo(param);
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_builtInIdentifierAsType_dynamic() async {
+    Source source = addSource(r'''
+f() {
+  dynamic x;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_caseBlockNotTerminated() async {
+    Source source = addSource(r'''
+f(int p) {
+  for (int i = 0; i < 10; i++) {
+    switch (p) {
+      case 0:
+        break;
+      case 1:
+        continue;
+      case 2:
+        return;
+      case 3:
+        throw new Object();
+      case 4:
+      case 5:
+        return;
+      case 6:
+      default:
+        return;
+    }
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_caseBlockNotTerminated_lastCase() async {
+    Source source = addSource(r'''
+f(int p) {
+  switch (p) {
+    case 0:
+      p = p + 1;
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_caseExpressionTypeImplementsEquals() async {
+    Source source = addSource(r'''
+print(p) {}
+
+abstract class B {
+  final id;
+  const B(this.id);
+  String toString() => 'C($id)';
+  /** Equality is identity equality, the id isn't used. */
+  bool operator==(Object other);
+  }
+
+class C extends B {
+  const C(id) : super(id);
+}
+
+void doSwitch(c) {
+  switch (c) {
+  case const C(0): print('Switch: 0'); break;
+  case const C(1): print('Switch: 1'); break;
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_caseExpressionTypeImplementsEquals_int() async {
+    Source source = addSource(r'''
+f(int i) {
+  switch(i) {
+    case(1) : return 1;
+    default: return 0;
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_caseExpressionTypeImplementsEquals_Object() async {
+    Source source = addSource(r'''
+class IntWrapper {
+  final int value;
+  const IntWrapper(this.value);
+}
+
+f(IntWrapper intWrapper) {
+  switch(intWrapper) {
+    case(const IntWrapper(1)) : return 1;
+    default: return 0;
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_caseExpressionTypeImplementsEquals_String() async {
+    Source source = addSource(r'''
+f(String s) {
+  switch(s) {
+    case('1') : return 1;
+    default: return 0;
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_class_type_alias_documentationComment() async {
+    Source source = addSource('''
+/**
+ * Documentation
+ */
+class C = D with E;
+
+class D {}
+class E {}''');
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    ClassElement classC =
+        resolutionMap.elementDeclaredByCompilationUnit(unit).getType('C');
+    expect(classC.documentationComment, isNotNull);
+  }
+
+  test_closure_in_type_inferred_variable_in_other_lib() async {
+    Source source = addSource('''
+import 'other.dart';
+var x = y;
+    ''');
+    addNamedSource('/other.dart', '''
+var y = (Object x) => x is int && x.isEven;
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_concreteClassWithAbstractMember() async {
+    Source source = addSource(r'''
+abstract class A {
+  m();
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_concreteClassWithAbstractMember_inherited() async {
+    Source source = addSource(r'''
+class A {
+  m() {}
+}
+class B extends A {
+  m();
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_conflictingConstructorNameAndMember_setter() async {
+    Source source = addSource(r'''
+class A {
+A.x() {}
+set x(_) {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_conflictingStaticGetterAndInstanceSetter_thisClass() async {
+    Source source = addSource(r'''
+class A {
+  static get x => 0;
+  static set x(int p) {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_const_constructor_with_named_generic_parameter() async {
+    Source source = addSource('''
+class C<T> {
+  const C({T t});
+}
+const c = const C(t: 1);
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_const_dynamic() async {
+    Source source = addSource('''
+const Type d = dynamic;
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_const_imported_defaultParameterValue_withImportPrefix() async {
+    Source source = addNamedSource("/a.dart", r'''
+import 'b.dart';
+const b = const B();
+''');
+    addNamedSource("/b.dart", r'''
+import 'c.dart' as ccc;
+class B {
+  const B([p = ccc.value]);
+}
+''');
+    addNamedSource("/c.dart", r'''
+const int value = 12345;
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_constConstructorWithNonConstSuper_explicit() async {
+    Source source = addSource(r'''
+class A {
+  const A();
+}
+class B extends A {
+  const B(): super();
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_constConstructorWithNonConstSuper_redirectingFactory() async {
+    Source source = addSource(r'''
+class A {
+  A();
+}
+class B implements C {
+  const B();
+}
+class C extends A {
+  const factory C() = B;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_constConstructorWithNonConstSuper_unresolved() async {
+    Source source = addSource(r'''
+class A {
+  A.a();
+}
+class B extends A {
+  const B(): super();
+}''');
+    await computeAnalysisResult(source);
+    assertErrors(source,
+        [CompileTimeErrorCode.UNDEFINED_CONSTRUCTOR_IN_INITIALIZER_DEFAULT]);
+    verify([source]);
+  }
+
+  test_constConstructorWithNonFinalField_finalInstanceVar() async {
+    Source source = addSource(r'''
+class A {
+  final int x = 0;
+  const A();
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_constConstructorWithNonFinalField_static() async {
+    Source source = addSource(r'''
+class A {
+  static int x;
+  const A();
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_constConstructorWithNonFinalField_syntheticField() async {
+    Source source = addSource(r'''
+class A {
+  const A();
+  set x(value) {}
+  get x {return 0;}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_constDeferredClass_new() async {
+    await resolveWithErrors(<String>[
+      r'''
+library lib1;
+class A {
+  const A.b();
+}''',
+      r'''
+library root;
+import 'lib1.dart' deferred as a;
+main() {
+  new a.A.b();
+}'''
+    ], <ErrorCode>[]);
+  }
+
+  test_constEval_functionTypeLiteral() async {
+    Source source = addSource(r'''
+typedef F();
+const C = F;''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_constEval_propertyExtraction_fieldStatic_targetType() async {
+    addNamedSource("/math.dart", r'''
+library math;
+const PI = 3.14;''');
+    Source source = addSource(r'''
+import 'math.dart' as math;
+const C = math.PI;''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_constEval_propertyExtraction_methodStatic_targetType() async {
+    Source source = addSource(r'''
+class A {
+  const A();
+  static m() {}
+}
+const C = A.m;''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_constEval_symbol() async {
+    addNamedSource("/math.dart", r'''
+library math;
+const PI = 3.14;''');
+    Source source = addSource(r'''
+const C = #foo;
+foo() {}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_constEvalTypeBoolNumString_equal() async {
+    Source source = addSource(r'''
+class B {
+  final v;
+  const B.a1(bool p) : v = p == true;
+  const B.a2(bool p) : v = p == false;
+  const B.a3(bool p) : v = p == 0;
+  const B.a4(bool p) : v = p == 0.0;
+  const B.a5(bool p) : v = p == '';
+  const B.b1(int p) : v = p == true;
+  const B.b2(int p) : v = p == false;
+  const B.b3(int p) : v = p == 0;
+  const B.b4(int p) : v = p == 0.0;
+  const B.b5(int p) : v = p == '';
+  const B.c1(String p) : v = p == true;
+  const B.c2(String p) : v = p == false;
+  const B.c3(String p) : v = p == 0;
+  const B.c4(String p) : v = p == 0.0;
+  const B.c5(String p) : v = p == '';
+  const B.n1(num p) : v = p == null;
+  const B.n2(num p) : v = null == p;
+  const B.n3(Object p) : v = p == null;
+  const B.n4(Object p) : v = null == p;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+  }
+
+  test_constEvalTypeBoolNumString_notEqual() async {
+    Source source = addSource(r'''
+class B {
+  final v;
+  const B.a1(bool p) : v = p != true;
+  const B.a2(bool p) : v = p != false;
+  const B.a3(bool p) : v = p != 0;
+  const B.a4(bool p) : v = p != 0.0;
+  const B.a5(bool p) : v = p != '';
+  const B.b1(int p) : v = p != true;
+  const B.b2(int p) : v = p != false;
+  const B.b3(int p) : v = p != 0;
+  const B.b4(int p) : v = p != 0.0;
+  const B.b5(int p) : v = p != '';
+  const B.c1(String p) : v = p != true;
+  const B.c2(String p) : v = p != false;
+  const B.c3(String p) : v = p != 0;
+  const B.c4(String p) : v = p != 0.0;
+  const B.c5(String p) : v = p != '';
+  const B.n1(num p) : v = p != null;
+  const B.n2(num p) : v = null != p;
+  const B.n3(Object p) : v = p != null;
+  const B.n4(Object p) : v = null != p;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_constEvAlTypeNum_String() async {
+    Source source = addSource(r'''
+const String A = 'a';
+const String B = A + 'b';
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_constNotInitialized_field() async {
+    Source source = addSource(r'''
+class A {
+  static const int x = 0;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_constNotInitialized_local() async {
+    Source source = addSource(r'''
+main() {
+  const int x = 0;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_constRedirectSkipsSupertype() async {
+    // Since C redirects to C.named, it doesn't implicitly refer to B's
+    // unnamed constructor.  Therefore there is no cycle.
+    Source source = addSource('''
+class B {
+  final x;
+  const B() : x = y;
+  const B.named() : x = null;
+}
+class C extends B {
+  const C() : this.named();
+  const C.named() : super.named();
+}
+const y = const C();
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_constructorDeclaration_scope_signature() async {
+    Source source = addSource(r'''
+const app = 0;
+class A {
+  A(@app int app) {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_constWithNonConstantArgument_constField() async {
+    Source source = addSource(r'''
+class A {
+  const A(x);
+}
+main() {
+  const A(double.INFINITY);
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_constWithNonConstantArgument_literals() async {
+    Source source = addSource(r'''
+class A {
+  const A(a, b, c, d);
+}
+f() { return const A(true, 0, 1.0, '2'); }''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_constWithTypeParameters_direct() async {
+    Source source = addSource(r'''
+class A<T> {
+  static const V = const A<int>();
+  const A();
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_constWithUndefinedConstructor() async {
+    Source source = addSource(r'''
+class A {
+  const A.name();
+}
+f() {
+  return const A.name();
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_constWithUndefinedConstructorDefault() async {
+    Source source = addSource(r'''
+class A {
+  const A();
+}
+f() {
+  return const A();
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_defaultValueInFunctionTypeAlias() async {
+    Source source = addSource("typedef F([x]);");
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_defaultValueInFunctionTypedParameter_named() async {
+    Source source = addSource("f(g({p})) {}");
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_defaultValueInFunctionTypedParameter_optional() async {
+    Source source = addSource("f(g([p])) {}");
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_deprecatedMemberUse_hide() async {
+    Source source = addSource(r'''
+library lib;
+import 'lib1.dart' hide B;
+A a = new A();''');
+    addNamedSource("/lib1.dart", r'''
+library lib1;
+class A {}
+@deprecated
+class B {}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_duplicateDefinition_emptyName() async {
+    // Note: This code has two FunctionElements '() {}' with an empty name,
+    // this tests that the empty string is not put into the scope
+    // (more than once).
+    Source source = addSource(r'''
+Map _globalMap = {
+  'a' : () {},
+  'b' : () {}
+};''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_duplicateDefinition_getter() async {
+    Source source = addSource("bool get a => true;");
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_duplicatePart() async {
+    addNamedSource('/part1.dart', 'part of lib;');
+    addNamedSource('/part2.dart', 'part of lib;');
+    Source source = addSource(r'''
+library lib;
+part 'part1.dart';
+part 'part2.dart';
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_dynamicIdentifier() async {
+    Source source = addSource(r'''
+main() {
+  var v = dynamic;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_empty_generator_async() async {
+    Source source = addSource('''
+import 'dart:async';
+Stream<int> f() async* {
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_empty_generator_sync() async {
+    Source source = addSource('''
+Iterable<int> f() sync* {
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_expectedOneListTypeArgument() async {
+    Source source = addSource(r'''
+main() {
+  <int> [];
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_expectedTwoMapTypeArguments() async {
+    Source source = addSource(r'''
+main() {
+  <int, int> {};
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_exportDuplicatedLibraryUnnamed() async {
+    Source source = addSource(r'''
+library test;
+export 'lib1.dart';
+export 'lib2.dart';''');
+    addNamedSource("/lib1.dart", "");
+    addNamedSource("/lib2.dart", "");
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_exportOfNonLibrary_libraryDeclared() async {
+    Source source = addSource(r'''
+library L;
+export 'lib1.dart';''');
+    addNamedSource("/lib1.dart", "library lib1;");
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_exportOfNonLibrary_libraryNotDeclared() async {
+    Source source = addSource(r'''
+library L;
+export 'lib1.dart';''');
+    addNamedSource("/lib1.dart", "");
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_extraPositionalArguments_function() async {
+    Source source = addSource(r'''
+f(p1, p2) {}
+main() {
+  f(1, 2);
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_extraPositionalArguments_Function() async {
+    Source source = addSource(r'''
+f(Function a) {
+  a(1, 2);
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_extraPositionalArguments_typedef_local() async {
+    Source source = addSource(r'''
+typedef A(p1, p2);
+A getA() => null;
+f() {
+  A a = getA();
+  a(1, 2);
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_extraPositionalArguments_typedef_parameter() async {
+    Source source = addSource(r'''
+typedef A(p1, p2);
+f(A a) {
+  a(1, 2);
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_fieldFormalParameter_functionTyped_named() async {
+    Source source = addSource(r'''
+class C {
+  final Function field;
+
+  C({String this.field(int value)});
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_fieldFormalParameter_genericFunctionTyped() async {
+    Source source = addSource(r'''
+class C {
+  final Object Function(int, double) field;
+
+  C(String Function(num, Object) this.field);
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_fieldFormalParameter_genericFunctionTyped_named() async {
+    Source source = addSource(r'''
+class C {
+  final Object Function(int, double) field;
+
+  C({String Function(num, Object) this.field});
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_fieldInitializedByMultipleInitializers() async {
+    Source source = addSource(r'''
+class A {
+  int x;
+  int y;
+  A() : x = 0, y = 0 {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_fieldInitializedInInitializerAndDeclaration_fieldNotFinal() async {
+    Source source = addSource(r'''
+class A {
+  int x = 0;
+  A() : x = 1 {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_fieldInitializedInInitializerAndDeclaration_finalFieldNotSet() async {
+    Source source = addSource(r'''
+class A {
+  final int x;
+  A() : x = 1 {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_fieldInitializerOutsideConstructor() async {
+    Source source = addSource(r'''
+class A {
+  int x;
+  A(this.x) {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_fieldInitializerOutsideConstructor_defaultParameters() async {
+    Source source = addSource(r'''
+class A {
+  int x;
+  A([this.x]) {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_fieldInitializerRedirectingConstructor_super() async {
+    Source source = addSource(r'''
+class A {
+  A() {}
+}
+class B extends A {
+  int x;
+  B(this.x) : super();
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_finalInitializedInDeclarationAndConstructor_initializer() async {
+    Source source = addSource(r'''
+class A {
+  final x;
+  A() : x = 1 {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_finalInitializedInDeclarationAndConstructor_initializingFormal() async {
+    Source source = addSource(r'''
+class A {
+  final x;
+  A(this.x) {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_finalNotInitialized_atDeclaration() async {
+    Source source = addSource(r'''
+class A {
+  final int x = 0;
+  A() {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_finalNotInitialized_fieldFormal() async {
+    Source source = addSource(r'''
+class A {
+  final int x = 0;
+  A() {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_finalNotInitialized_functionTypedFieldFormal() async {
+    Source source = addSource(r'''
+class A {
+  final Function x;
+  A(int this.x(int p)) {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_finalNotInitialized_hasNativeClause_hasConstructor() async {
+    Source source = addSource(r'''
+class A native 'something' {
+  final int x;
+  A() {}
+}''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [ParserErrorCode.NATIVE_CLAUSE_IN_NON_SDK_CODE]);
+    verify([source]);
+  }
+
+  test_finalNotInitialized_hasNativeClause_noConstructor() async {
+    Source source = addSource(r'''
+class A native 'something' {
+  final int x;
+}''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [ParserErrorCode.NATIVE_CLAUSE_IN_NON_SDK_CODE]);
+    verify([source]);
+  }
+
+  test_finalNotInitialized_initializer() async {
+    Source source = addSource(r'''
+class A {
+  final int x;
+  A() : x = 0 {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_finalNotInitialized_redirectingConstructor() async {
+    Source source = addSource(r'''
+class A {
+  final int x;
+  A(this.x);
+  A.named() : this (42);
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_for_in_scope() async {
+    Source source = addSource('''
+main() {
+  List<List<int>> x = [[1]];
+  for (int x in x.first) {
+    print(x.isEven);
+  }
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_forEach_genericFunctionType() async {
+    Source source = addSource(r'''
+main() {
+  for (Null Function<T>(T, Null) e in <dynamic>[]) {
+    e;
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_functionDeclaration_scope_returnType() async {
+    Source source = addSource("int f(int) { return 0; }");
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_functionDeclaration_scope_signature() async {
+    Source source = addSource(r'''
+const app = 0;
+f(@app int app) {}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_functionTypeAlias_scope_returnType() async {
+    Source source = addSource("typedef int f(int);");
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_functionTypeAlias_scope_signature() async {
+    Source source = addSource(r'''
+const app = 0;
+typedef int f(@app int app);''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_functionWithoutCall() async {
+    Source source = addSource(r'''
+abstract class A implements Function {
+}
+class B implements A {
+  void call() {}
+}
+class C extends A {
+  void call() {}
+}
+class D extends C {
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_functionWithoutCall_doesNotImplementFunction() async {
+    Source source = addSource("class A {}");
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_functionWithoutCall_staticCallMethod() async {
+    Source source = addSource(r'''
+class A { }
+class B extends A {
+  static call() { }
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_functionWithoutCall_withNoSuchMethod() async {
+    // 16078
+    Source source = addSource(r'''
+class A implements Function {
+  noSuchMethod(inv) {
+    return 42;
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_functionWithoutCall_withNoSuchMethod_mixin() async {
+    Source source = addSource(r'''
+class A {
+  noSuchMethod(inv) {}
+}
+class B extends Object with A implements Function {
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_functionWithoutCall_withNoSuchMethod_superclass() async {
+    Source source = addSource(r'''
+class A {
+  noSuchMethod(inv) {}
+}
+class B extends A implements Function {
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_genericTypeAlias_castsAndTypeChecks_hasTypeParameters() async {
+    Source source = addSource('''
+typedef Foo<S> = S Function<T>(T x);
+
+main(Object p) {
+  (p as Foo)<int>(3);
+  if (p is Foo) {
+    p<int>(3);
+  }
+  (p as Foo<String>)<int>(3);
+  if (p is Foo<String>) {
+    p<int>(3);
+  }
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_genericTypeAlias_castsAndTypeChecks_noTypeParameters() async {
+    Source source = addSource('''
+typedef Foo = T Function<T>(T x);
+
+main(Object p) {
+  (p as Foo)<int>(3);
+  if (p is Foo) {
+    p<int>(3);
+  }
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_genericTypeAlias_fieldAndReturnType_noTypeParameters() async {
+    Source source = addSource(r'''
+typedef Foo = int Function<T>(T x);
+int foo<T>(T x) => 3;
+Foo bar() => foo;
+void test1() {
+  bar()<String>("hello");
+}
+
+class A {
+  Foo f;
+  void test() {
+    f<String>("hello");
+  }
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_genericTypeAlias_fieldAndReturnType_typeParameters_arguments() async {
+    Source source = addSource(r'''
+typedef Foo<S> = S Function<T>(T x);
+int foo<T>(T x) => 3;
+Foo<int> bar() => foo;
+void test1() {
+  bar()<String>("hello");
+}
+
+class A {
+  Foo<int> f;
+  void test() {
+    f<String>("hello");
+  }
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_genericTypeAlias_fieldAndReturnType_typeParameters_noArguments() async {
+    Source source = addSource(r'''
+typedef Foo<S> = S Function<T>(T x);
+int foo<T>(T x) => 3;
+Foo bar() => foo;
+void test1() {
+  bar()<String>("hello");
+}
+
+class A {
+  Foo f;
+  void test() {
+    f<String>("hello");
+  }
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_genericTypeAlias_invalidGenericFunctionType() async {
+    Source source = addSource('''
+typedef F = int;
+main(p) {
+  p is F;
+}
+''');
+    await computeAnalysisResult(source);
+    // There is a parse error, but no crashes.
+    assertErrors(source, [ParserErrorCode.INVALID_GENERIC_FUNCTION_TYPE]);
+    verify([source]);
+  }
+
+  test_genericTypeAlias_noTypeParameters() async {
+    Source source = addSource(r'''
+typedef Foo = int Function<T>(T x);
+int foo<T>(T x) => 3;
+void test1() {
+  Foo y = foo;
+  // These two should be equivalent
+  foo<String>("hello");
+  y<String>("hello");
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_genericTypeAlias_typeParameters() async {
+    Source source = addSource(r'''
+typedef Foo<S> = S Function<T>(T x);
+int foo<T>(T x) => 3;
+void test1() {
+  Foo<int> y = foo;
+  // These two should be equivalent
+  foo<String>("hello");
+  y<String>("hello");
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_implicitThisReferenceInInitializer_constructorName() async {
+    Source source = addSource(r'''
+class A {
+  A.named() {}
+}
+class B {
+  var v;
+  B() : v = new A.named();
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_implicitThisReferenceInInitializer_prefixedIdentifier() async {
+    Source source = addSource(r'''
+class A {
+  var f;
+}
+class B {
+  var v;
+  B(A a) : v = a.f;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_implicitThisReferenceInInitializer_qualifiedMethodInvocation() async {
+    Source source = addSource(r'''
+class A {
+  f() {}
+}
+class B {
+  var v;
+  B() : v = new A().f();
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_implicitThisReferenceInInitializer_qualifiedPropertyAccess() async {
+    Source source = addSource(r'''
+class A {
+  var f;
+}
+class B {
+  var v;
+  B() : v = new A().f;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_implicitThisReferenceInInitializer_staticField_thisClass() async {
+    Source source = addSource(r'''
+class A {
+  var v;
+  A() : v = f;
+  static var f;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_implicitThisReferenceInInitializer_staticGetter() async {
+    Source source = addSource(r'''
+class A {
+  var v;
+  A() : v = f;
+  static get f => 42;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_implicitThisReferenceInInitializer_staticMethod() async {
+    Source source = addSource(r'''
+class A {
+  var v;
+  A() : v = f();
+  static f() => 42;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_implicitThisReferenceInInitializer_topLevelField() async {
+    Source source = addSource(r'''
+class A {
+  var v;
+  A() : v = f;
+}
+var f = 42;''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_implicitThisReferenceInInitializer_topLevelFunction() async {
+    Source source = addSource(r'''
+class A {
+  var v;
+  A() : v = f();
+}
+f() => 42;''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_implicitThisReferenceInInitializer_topLevelGetter() async {
+    Source source = addSource(r'''
+class A {
+  var v;
+  A() : v = f;
+}
+get f => 42;''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_implicitThisReferenceInInitializer_typeParameter() async {
+    Source source = addSource(r'''
+class A<T> {
+  var v;
+  A(p) : v = (p is T);
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_importDuplicatedLibraryName() async {
+    Source source = addSource(r'''
+library test;
+import 'lib.dart';
+import 'lib.dart';''');
+    addNamedSource("/lib.dart", "library lib;");
+    await computeAnalysisResult(source);
+    assertErrors(source, [
+      HintCode.UNUSED_IMPORT,
+      HintCode.UNUSED_IMPORT,
+      HintCode.DUPLICATE_IMPORT
+    ]);
+    verify([source]);
+  }
+
+  test_importDuplicatedLibraryUnnamed() async {
+    Source source = addSource(r'''
+library test;
+import 'lib1.dart';
+import 'lib2.dart';''');
+    addNamedSource("/lib1.dart", "");
+    addNamedSource("/lib2.dart", "");
+    await computeAnalysisResult(source);
+    assertErrors(source, [
+      // No warning on duplicate import (https://github.com/dart-lang/sdk/issues/24156)
+      HintCode.UNUSED_IMPORT,
+      HintCode.UNUSED_IMPORT
+    ]);
+    verify([source]);
+  }
+
+  test_importOfNonLibrary_libraryDeclared() async {
+    Source source = addSource(r'''
+library lib;
+import 'part.dart';
+A a;''');
+    addNamedSource("/part.dart", r'''
+library lib1;
+class A {}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_importOfNonLibrary_libraryNotDeclared() async {
+    Source source = addSource(r'''
+library lib;
+import 'part.dart';
+A a;''');
+    addNamedSource("/part.dart", "class A {}");
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_importPrefixes_withFirstLetterDifference() async {
+    Source source = addSource(r'''
+library L;
+import 'lib1.dart' as math;
+import 'lib2.dart' as path;
+main() {
+  math.test1();
+  path.test2();
+}''');
+    addNamedSource("/lib1.dart", r'''
+library lib1;
+test1() {}''');
+    addNamedSource("/lib2.dart", r'''
+library lib2;
+test2() {}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_inconsistentCaseExpressionTypes() async {
+    Source source = addSource(r'''
+f(var p) {
+  switch (p) {
+    case 1:
+      break;
+    case 2:
+      break;
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_inconsistentMethodInheritance_accessors_typeParameter2() async {
+    Source source = addSource(r'''
+abstract class A<E> {
+  E get x {return null;}
+}
+class B<E> {
+  E get x {return null;}
+}
+class C<E> extends A<E> implements B<E> {}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_inconsistentMethodInheritance_accessors_typeParameters1() async {
+    Source source = addSource(r'''
+abstract class A<E> {
+  E get x;
+}
+abstract class B<E> {
+  E get x;
+}
+class C<E> implements A<E>, B<E> {
+  E get x => null;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_inconsistentMethodInheritance_accessors_typeParameters_diamond() async {
+    Source source = addSource(r'''
+abstract class F<E> extends B<E> {}
+class D<E> extends F<E> {
+  external E get g;
+}
+abstract class C<E> {
+  E get g;
+}
+abstract class B<E> implements C<E> {
+  E get g { return null; }
+}
+class A<E> extends B<E> implements D<E> {
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_inconsistentMethodInheritance_methods_typeParameter2() async {
+    Source source = addSource(r'''
+class A<E> {
+  x(E e) {}
+}
+class B<E> {
+  x(E e) {}
+}
+class C<E> extends A<E> implements B<E> {
+  x(E e) {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_inconsistentMethodInheritance_methods_typeParameters1() async {
+    Source source = addSource(r'''
+class A<E> {
+  x(E e) {}
+}
+class B<E> {
+  x(E e) {}
+}
+class C<E> implements A<E>, B<E> {
+  x(E e) {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_inconsistentMethodInheritance_simple() async {
+    Source source = addSource(r'''
+abstract class A {
+  x();
+}
+abstract class B {
+  x();
+}
+class C implements A, B {
+  x() {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_infer_mixin_new_syntax() async {
+    Source source = addSource('''
+abstract class A<T> {}
+
+class B {}
+
+mixin M<T> on A<T> {}
+
+class C extends A<B> with M {}
+''');
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    ClassElement classC =
+        resolutionMap.elementDeclaredByCompilationUnit(unit).getType('C');
+    expect(classC.mixins, hasLength(1));
+    expect(classC.mixins[0].toString(), 'M<B>');
+  }
+
+  test_infer_mixin_with_substitution_functionType_new_syntax() async {
+    Source source = addSource('''
+abstract class A<T> {}
+
+class B {}
+
+mixin M<T, U> on A<T Function(U)> {}
+
+class C extends A<int Function(String)> with M {}
+''');
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    CompilationUnit unit = analysisResult.unit;
+    ClassElement classC =
+        resolutionMap.elementDeclaredByCompilationUnit(unit).getType('C');
+    expect(classC.mixins, hasLength(1));
+    expect(classC.mixins[0].toString(), 'M<int, String>');
+  }
+
+  test_infer_mixin_with_substitution_new_syntax() async {
+    Source source = addSource('''
+abstract class A<T> {}
+
+class B {}
+
+mixin M<T> on A<List<T>> {}
+
+class C extends A<List<B>> with M {}
+''');
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    CompilationUnit unit = analysisResult.unit;
+    ClassElement classC =
+        resolutionMap.elementDeclaredByCompilationUnit(unit).getType('C');
+    expect(classC.mixins, hasLength(1));
+    expect(classC.mixins[0].toString(), 'M<B>');
+  }
+
+  test_initializingFormalForNonExistentField() async {
+    Source source = addSource(r'''
+class A {
+  int x;
+  A(this.x) {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_instance_creation_inside_annotation() async {
+    Source source = addSource('''
+class C {
+  const C();
+}
+class D {
+  final C c;
+  const D(this.c);
+}
+@D(const C())
+f() {}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_instanceAccessToStaticMember_fromComment() async {
+    Source source = addSource(r'''
+class A {
+  static m() {}
+}
+/// [A.m]
+main() {
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_instanceAccessToStaticMember_topLevel() async {
+    Source source = addSource(r'''
+m() {}
+main() {
+  m();
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_instanceMemberAccessFromStatic_fromComment() async {
+    Source source = addSource(r'''
+class A {
+  m() {}
+  /// [m]
+  static foo() {
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_instanceMethodNameCollidesWithSuperclassStatic_field() async {
+    Source source = addSource(r'''
+import 'lib.dart';
+class B extends A {
+  _m() {}
+}''');
+    addNamedSource("/lib.dart", r'''
+library L;
+class A {
+  static var _m;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_instanceMethodNameCollidesWithSuperclassStatic_method() async {
+    Source source = addSource(r'''
+import 'lib.dart';
+class B extends A {
+  _m() {}
+}''');
+    addNamedSource("/lib.dart", r'''
+library L;
+class A {
+  static _m() {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_integerLiteralOutOfRange_negative_leadingZeros() async {
+    Source source = addSource('int x = -000923372036854775809;');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+  }
+
+  test_integerLiteralOutOfRange_negative_small() async {
+    Source source = addSource('int x = -42;');
+    await computeAnalysisResult(source);
+    assertErrors(source);
+  }
+
+  test_integerLiteralOutOfRange_negative_valid() async {
+    Source source = addSource('int x = -9223372036854775808;');
+    await computeAnalysisResult(source);
+    assertErrors(source);
+  }
+
+  test_integerLiteralOutOfRange_positive_leadingZeros() async {
+    Source source = addSource('int x = 000923372036854775808;');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+  }
+
+  test_integerLiteralOutOfRange_positive_valid() async {
+    Source source = addSource('int x = 9223372036854775807;');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+  }
+
+  test_integerLiteralOutOfRange_positive_zero() async {
+    Source source = addSource('int x = 0;');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+  }
+
+  test_intLiteralInDoubleContext() async {
+    Source source = addSource(r'''
+void takeDouble(double x) {}
+void main() {
+  takeDouble(0);
+  takeDouble(-0);
+  takeDouble(0x0);
+  takeDouble(-0x0);
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_intLiteralInDoubleContext_const() async {
+    Source source = addSource(r'''
+class C {
+  const C(double x)
+    : assert((x + 3) / 2 == 1.5)
+    , assert(x == 0.0);
+}
+@C(0)
+@C(-0)
+@C(0x0)
+@C(-0x0)
+void main() {
+  const C(0);
+  const C(-0);
+  const C(0x0);
+  const C(-0x0);
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidAnnotation_constantVariable_field() async {
+    Source source = addSource(r'''
+@A.C
+class A {
+  static const C = 0;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidAnnotation_constantVariable_field_importWithPrefix() async {
+    addNamedSource("/lib.dart", r'''
+library lib;
+class A {
+  static const C = 0;
+}''');
+    Source source = addSource(r'''
+import 'lib.dart' as p;
+@p.A.C
+main() {
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidAnnotation_constantVariable_topLevel() async {
+    Source source = addSource(r'''
+const C = 0;
+@C
+main() {
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidAnnotation_constantVariable_topLevel_importWithPrefix() async {
+    addNamedSource("/lib.dart", r'''
+library lib;
+const C = 0;''');
+    Source source = addSource(r'''
+import 'lib.dart' as p;
+@p.C
+main() {
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidAnnotation_constConstructor_importWithPrefix() async {
+    addNamedSource("/lib.dart", r'''
+library lib;
+class A {
+  const A(int p);
+}''');
+    Source source = addSource(r'''
+import 'lib.dart' as p;
+@p.A(42)
+main() {
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidAnnotation_constConstructor_named_importWithPrefix() async {
+    addNamedSource("/lib.dart", r'''
+library lib;
+class A {
+  const A.named(int p);
+}''');
+    Source source = addSource(r'''
+import 'lib.dart' as p;
+@p.A.named(42)
+main() {
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidAssignment() async {
+    Source source = addSource(r'''
+f() {
+  var x;
+  var y;
+  x = y;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidAssignment_compoundAssignment() async {
+    Source source = addSource(r'''
+class byte {
+  int _value;
+  byte(this._value);
+  byte operator +(int val) { return this; }
+}
+
+void main() {
+  byte b = new byte(52);
+  b += 3;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidAssignment_defaultValue_named() async {
+    Source source = addSource(r'''
+f({String x: '0'}) {
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidAssignment_defaultValue_optional() async {
+    Source source = addSource(r'''
+f([String x = '0']) {
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidAssignment_ifNullAssignment_compatibleType() async {
+    Source source = addSource('''
+void f(int i) {
+  num n;
+  n ??= i;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidAssignment_ifNullAssignment_sameType() async {
+    Source source = addSource('''
+void f(int i) {
+  int j;
+  j ??= i;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidAssignment_implicitlyImplementFunctionViaCall_1() async {
+    // 18341
+    //
+    // This test and
+    // 'test_invalidAssignment_implicitlyImplementFunctionViaCall_2()'
+    // are closely related: here we see that 'I' checks as a subtype of
+    // 'IntToInt'.
+    Source source = addSource(r'''
+class I {
+  int call(int x) => 0;
+}
+class C implements I {
+  noSuchMethod(_) => null;
+}
+typedef int IntToInt(int x);
+IntToInt f = new I();''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidAssignment_implicitlyImplementFunctionViaCall_2() async {
+    // 18341
+    //
+    // Here 'C' checks as a subtype of 'I', but 'C' does not
+    // check as a subtype of 'IntToInt'. Together with
+    // 'test_invalidAssignment_implicitlyImplementFunctionViaCall_1()' we see
+    // that subtyping is not transitive here.
+    Source source = addSource(r'''
+class I {
+  int call(int x) => 0;
+}
+class C implements I {
+  noSuchMethod(_) => null;
+}
+typedef int IntToInt(int x);
+IntToInt f = new C();''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidAssignment_implicitlyImplementFunctionViaCall_3() async {
+    // 18341
+    //
+    // Like 'test_invalidAssignment_implicitlyImplementFunctionViaCall_2()',
+    // but uses type 'Function' instead of more precise type 'IntToInt' for 'f'.
+    Source source = addSource(r'''
+class I {
+  int call(int x) => 0;
+}
+class C implements I {
+  noSuchMethod(_) => null;
+}
+typedef int IntToInt(int x);
+Function f = new C();''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidAssignment_implicitlyImplementFunctionViaCall_4() async {
+    // 18341
+    //
+    // Like 'test_invalidAssignment_implicitlyImplementFunctionViaCall_2()',
+    // but uses type 'VoidToInt' instead of more precise type 'IntToInt' for
+    // 'f'.
+    //
+    // Here 'C <: IntToInt <: VoidToInt', but the spec gives no transitivity
+    // rule for '<:'. However, many of the :/tools/test.py tests assume this
+    // transitivity for 'JsBuilder' objects, assigning them to
+    // '(String) -> dynamic'. The declared type of 'JsBuilder.call' is
+    // '(String, [dynamic]) -> Expression'.
+    Source source = addSource(r'''
+class I {
+  int call([int x]) => 0;
+}
+class C implements I {
+  noSuchMethod(_) => null;
+}
+typedef int VoidToInt();
+VoidToInt f = new C();''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidAssignment_postfixExpression_localVariable() async {
+    Source source = addSource(r'''
+class A {
+  A operator+(_) => this;
+}
+
+f(A a) {
+  a++;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidAssignment_postfixExpression_property() async {
+    Source source = addSource(r'''
+class A {
+  A operator+(_) => this;
+}
+
+class C {
+  A a;
+}
+
+f(C c) {
+  c.a++;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidAssignment_prefixExpression_localVariable() async {
+    Source source = addSource(r'''
+class A {
+  A operator+(_) => this;
+}
+
+f(A a) {
+  ++a;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidAssignment_prefixExpression_property() async {
+    Source source = addSource(r'''
+class A {
+  A operator+(_) => this;
+}
+
+class C {
+  A a;
+}
+
+f(C c) {
+  ++c.a;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidAssignment_toDynamic() async {
+    Source source = addSource(r'''
+f() {
+  var g;
+  g = () => 0;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidFactoryNameNotAClass() async {
+    Source source = addSource(r'''
+class A {
+  factory A() => null;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidIdentifierInAsync() async {
+    Source source = addSource(r'''
+class A {
+  m() {
+    int async;
+    int await;
+    int yield;
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidMethodOverrideNamedParamType() async {
+    Source source = addSource(r'''
+class A {
+  m({int a}) {}
+}
+class B implements A {
+  m({int a, int b}) {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidOverrideNamed_unorderedNamedParameter() async {
+    Source source = addSource(r'''
+class A {
+  m({a, b}) {}
+}
+class B extends A {
+  m({b, a}) {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidOverrideRequired_less() async {
+    Source source = addSource(r'''
+class A {
+  m(a, b) {}
+}
+class B extends A {
+  m(a, [b]) {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidOverrideRequired_same() async {
+    Source source = addSource(r'''
+class A {
+  m(a) {}
+}
+class B extends A {
+  m(a) {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidOverrideReturnType_returnType_interface() async {
+    Source source = addNamedSource("/test.dart", r'''
+abstract class A {
+  num m();
+}
+class B implements A {
+  int m() { return 1; }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidOverrideReturnType_returnType_interface2() async {
+    Source source = addNamedSource("/test.dart", r'''
+abstract class A {
+  num m();
+}
+abstract class B implements A {
+}
+class C implements B {
+  int m() { return 1; }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidOverrideReturnType_returnType_mixin() async {
+    Source source = addNamedSource("/test.dart", r'''
+class A {
+  num m() { return 0; }
+}
+class B extends Object with A {
+  int m() { return 1; }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidOverrideReturnType_returnType_parameterizedTypes() async {
+    Source source = addSource(r'''
+abstract class A<E> {
+  List<E> m();
+}
+class B extends A<dynamic> {
+  List<dynamic> m() { return new List<dynamic>(); }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidOverrideReturnType_returnType_sameType() async {
+    Source source = addNamedSource("/test.dart", r'''
+class A {
+  int m() { return 0; }
+}
+class B extends A {
+  int m() { return 1; }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidOverrideReturnType_returnType_superclass() async {
+    Source source = addNamedSource("/test.dart", r'''
+class A {
+  num m() { return 0; }
+}
+class B extends A {
+  int m() { return 1; }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidOverrideReturnType_returnType_superclass2() async {
+    Source source = addNamedSource("/test.dart", r'''
+class A {
+  num m() { return 0; }
+}
+class B extends A {
+}
+class C extends B {
+  int m() { return 1; }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidOverrideReturnType_returnType_void() async {
+    Source source = addSource(r'''
+class A {
+  void m() {}
+}
+class B extends A {
+  int m() { return 0; }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidReferenceToThis_constructor() async {
+    Source source = addSource(r'''
+class A {
+  A() {
+    var v = this;
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidReferenceToThis_instanceMethod() async {
+    Source source = addSource(r'''
+class A {
+  m() {
+    var v = this;
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidTypeArgumentForKey() async {
+    Source source = addSource(r'''
+class A {
+  m() {
+    return const <int, int>{};
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidTypeArgumentInConstList() async {
+    Source source = addSource(r'''
+class A<E> {
+  m() {
+    return <E>[];
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_invalidTypeArgumentInConstMap() async {
+    Source source = addSource(r'''
+class A<E> {
+  m() {
+    return <String, E>{};
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  Future test_issue32114() async {
+    addNamedSource('/a.dart', '''
+class O {}
+
+typedef T Func<T extends O>(T e);
+''');
+    addNamedSource('/b.dart', '''
+import 'a.dart';
+export 'a.dart' show Func;
+
+abstract class A<T extends O> {
+  Func<T> get func;
+}
+''');
+    final Source source = addSource('''
+import 'b.dart';
+
+class B extends A {
+  Func get func => (x) => x;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_issue_24191() async {
+    Source source = addSource('''
+import 'dart:async';
+
+abstract class S extends Stream {}
+f(S s) async {
+  await for (var v in s) {
+    print(v);
+  }
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_issue_32394() async {
+    Source source = addSource('''
+var x = y.map((a) => a.toString());
+var y = [3];
+var z = x.toList();
+
+void main() {
+  String p = z;
+}
+''');
+    var result = await computeAnalysisResult(source);
+    var z = result.unit.declaredElement.topLevelVariables
+        .where((e) => e.name == 'z')
+        .single;
+    expect(z.type.toString(), 'List<String>');
+    assertErrors(source, [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
+    verify([source]);
+  }
+
+  test_issue_35320_lists() async {
+    addNamedSource('/lib.dart', '''
+const x = const <String>['a'];
+''');
+    Source source = addSource('''
+import 'lib.dart';
+const y = const <String>['b'];
+int f(v) {
+  switch(v) {
+    case x:
+      return 0;
+    case y:
+      return 1;
+    default:
+      return 2;
+  }
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_issue_35320_maps() async {
+    addNamedSource('/lib.dart', '''
+const x = const <String, String>{'a': 'b'};
+''');
+    Source source = addSource('''
+import 'lib.dart';
+const y = const <String, String>{'c': 'd'};
+int f(v) {
+  switch(v) {
+    case x:
+      return 0;
+    case y:
+      return 1;
+    default:
+      return 2;
+  }
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_listElementTypeNotAssignable() async {
+    Source source = addSource(r'''
+var v1 = <int> [42];
+var v2 = const <int> [42];''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_loadLibraryDefined() async {
+    await resolveWithErrors(<String>[
+      r'''
+library lib1;
+foo() => 22;''',
+      r'''
+import 'lib1.dart' deferred as other;
+main() {
+  other.loadLibrary().then((_) => other.foo());
+}'''
+    ], <ErrorCode>[]);
+  }
+
+  test_local_generator_async() async {
+    Source source = addSource('''
+f() {
+  return () async* { yield 0; };
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_local_generator_sync() async {
+    Source source = addSource('''
+f() {
+  return () sync* { yield 0; };
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_mapKeyTypeNotAssignable() async {
+    Source source = addSource("var v = <String, int > {'a' : 1};");
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_metadata_enumConstantDeclaration() async {
+    Source source = addSource(r'''
+const x = 1;
+enum E {
+  aaa,
+  @x
+  bbb
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_methodDeclaration_scope_signature() async {
+    Source source = addSource(r'''
+const app = 0;
+class A {
+  foo(@app int app) {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_misMatchedGetterAndSetterTypes_instance_sameTypes() async {
+    Source source = addSource(r'''
+class C {
+  int get x => 0;
+  set x(int v) {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_misMatchedGetterAndSetterTypes_instance_unspecifiedGetter() async {
+    Source source = addSource(r'''
+class C {
+  get x => 0;
+  set x(String v) {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_misMatchedGetterAndSetterTypes_instance_unspecifiedSetter() async {
+    Source source = addSource(r'''
+class C {
+  int get x => 0;
+  set x(v) {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_misMatchedGetterAndSetterTypes_topLevel_sameTypes() async {
+    Source source = addSource(r'''
+int get x => 0;
+set x(int v) {}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_misMatchedGetterAndSetterTypes_topLevel_unspecifiedGetter() async {
+    Source source = addSource(r'''
+get x => 0;
+set x(String v) {}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_misMatchedGetterAndSetterTypes_topLevel_unspecifiedSetter() async {
+    Source source = addSource(r'''
+int get x => 0;
+set x(v) {}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_missingEnumConstantInSwitch_all() async {
+    Source source = addSource(r'''
+enum E { A, B, C }
+
+f(E e) {
+  switch (e) {
+    case E.A: break;
+    case E.B: break;
+    case E.C: break;
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_missingEnumConstantInSwitch_default() async {
+    Source source = addSource(r'''
+enum E { A, B, C }
+
+f(E e) {
+  switch (e) {
+    case E.B: break;
+    default: break;
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_mixedReturnTypes_differentScopes() async {
+    Source source = addSource(r'''
+class C {
+  m(int x) {
+    f(int y) {
+      return;
+    }
+    f(x);
+    return 0;
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_mixedReturnTypes_ignoreImplicit() async {
+    Source source = addSource(r'''
+f(bool p) {
+  if (p) return 42;
+  // implicit 'return;' is ignored
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_mixedReturnTypes_ignoreImplicit2() async {
+    Source source = addSource(r'''
+f(bool p) {
+  if (p) {
+    return 42;
+  } else {
+    return 42;
+  }
+  // implicit 'return;' is ignored
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_mixedReturnTypes_sameKind() async {
+    Source source = addSource(r'''
+class C {
+  m(int x) {
+    if (x < 0) {
+      return 1;
+    }
+    return 0;
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_mixin_of_mixin_type_argument_inference() async {
+    // In the code below, B's superclass constraints don't include A, because
+    // superclass constraints are determined from the mixin's superclass, and
+    // B's superclass is Object.  So no mixin type inference is attempted, and
+    // "with B" is interpreted as "with B<dynamic>".
+    Source source = addSource('''
+class A<T> {}
+class B<T> = Object with A<T>;
+class C = Object with B;
+''');
+    var result = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    var bReference = result.unit.declaredElement.getType('C').mixins[0];
+    expect(bReference.typeArguments[0].toString(), 'dynamic');
+  }
+
+  test_mixin_of_mixin_type_argument_inference_cascaded_mixin() async {
+    // In the code below, B has a single superclass constraint, A1, because
+    // superclass constraints are determined from the mixin's superclass, and
+    // B's superclass is "Object with A1<T>".  So mixin type inference succeeds
+    // (since C's base class implements A1<int>), and "with B" is interpreted as
+    // "with B<int>".
+    Source source = addSource('''
+class A1<T> {}
+class A2<T> {}
+class B<T> = Object with A1<T>, A2<T>;
+class Base implements A1<int> {}
+class C = Base with B;
+''');
+    var result = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    var bReference = result.unit.declaredElement.getType('C').mixins[0];
+    expect(bReference.typeArguments[0].toString(), 'int');
+  }
+
+  test_mixinDeclaresConstructor() async {
+    Source source = addSource(r'''
+class A {
+  m() {}
+}
+class B extends Object with A {}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_mixinDeclaresConstructor_factory() async {
+    Source source = addSource(r'''
+class A {
+  factory A() => null;
+}
+class B extends Object with A {}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_mixinInference_with_actual_mixins() async {
+    Source source = addSource('''
+class I<X> {}
+
+mixin M0<T> on I<T> {}
+
+mixin M1<T> on I<T> {
+  T foo() => null;
+}
+
+class A = I<int> with M0, M1;
+
+void main () {
+  var x = new A().foo();
+}
+''');
+    var result = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    var main = result.unit.declarations.last as FunctionDeclaration;
+    var mainBody = main.functionExpression.body as BlockFunctionBody;
+    var xDecl = mainBody.block.statements[0] as VariableDeclarationStatement;
+    var xElem = xDecl.variables.variables[0].declaredElement;
+    expect(xElem.type.toString(), 'int');
+  }
+
+  test_mixinInheritsFromNotObject_classDeclaration_extends_new_syntax() async {
+    Source source = addSource(r'''
+class A {}
+mixin B on A {}
+class C extends A with B {}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_mixinInheritsFromNotObject_classDeclaration_mixTypeAlias() async {
+    Source source = addSource(r'''
+class A {}
+class B = Object with A;
+class C extends Object with B {}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_mixinInheritsFromNotObject_typeAlias_extends_new_syntax() async {
+    Source source = addSource(r'''
+class A {}
+mixin B on A {}
+class C = A with B;''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_mixinInheritsFromNotObject_typedef_mixTypeAlias() async {
+    Source source = addSource(r'''
+class A {}
+class B = Object with A;
+class C = Object with B;''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_mixinReferencesSuper_new_syntax() async {
+    Source source = addSource(r'''
+mixin A {
+  toString() => super.toString();
+}
+class B extends Object with A {}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_multipleSuperInitializers_no() async {
+    Source source = addSource(r'''
+class A {}
+class B extends A {
+  B() {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_multipleSuperInitializers_single() async {
+    Source source = addSource(r'''
+class A {}
+class B extends A {
+  B() : super() {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nativeConstConstructor() async {
+    Source source = addSource(r'''
+import 'dart-ext:x';
+class Foo {
+  const Foo() native 'Foo_Foo';
+  const factory Foo.foo() native 'Foo_Foo_foo';
+}''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [ParserErrorCode.CONST_CONSTRUCTOR_WITH_BODY]);
+    // Cannot verify the AST because the import's URI cannot be resolved.
+  }
+
+  test_nativeFunctionBodyInNonSDKCode_function() async {
+    Source source = addSource(r'''
+import 'dart-ext:x';
+int m(a) native 'string';''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    // Cannot verify the AST because the import's URI cannot be resolved.
+  }
+
+  test_newWithAbstractClass_factory() async {
+    Source source = addSource(r'''
+abstract class A {
+  factory A() { return new B(); }
+}
+class B implements A {
+  B() {}
+}
+A f() {
+  return new A();
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_newWithUndefinedConstructor() async {
+    Source source = addSource(r'''
+class A {
+  A.name() {}
+}
+f() {
+  new A.name();
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_newWithUndefinedConstructorDefault() async {
+    Source source = addSource(r'''
+class A {
+  A() {}
+}
+f() {
+  new A();
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonAbstractClassInheritsAbstractMemberOne_abstractsDontOverrideConcretes_getter() async {
+    Source source = addSource(r'''
+class A {
+  int get g => 0;
+}
+abstract class B extends A {
+  int get g;
+}
+class C extends B {}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonAbstractClassInheritsAbstractMemberOne_abstractsDontOverrideConcretes_method() async {
+    Source source = addSource(r'''
+class A {
+  m(p) {}
+}
+abstract class B extends A {
+  m(p);
+}
+class C extends B {}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonAbstractClassInheritsAbstractMemberOne_abstractsDontOverrideConcretes_setter() async {
+    Source source = addSource(r'''
+class A {
+  set s(v) {}
+}
+abstract class B extends A {
+  set s(v);
+}
+class C extends B {}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonAbstractClassInheritsAbstractMemberOne_classTypeAlias_interface() async {
+    // 15979
+    Source source = addSource(r'''
+abstract class M {}
+abstract class A {}
+abstract class I {
+  m();
+}
+abstract class B = A with M implements I;''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonAbstractClassInheritsAbstractMemberOne_classTypeAlias_mixin() async {
+    // 15979
+    Source source = addSource(r'''
+abstract class M {
+  m();
+}
+abstract class A {}
+abstract class B = A with M;''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonAbstractClassInheritsAbstractMemberOne_classTypeAlias_superclass() async {
+    // 15979
+    Source source = addSource(r'''
+class M {}
+abstract class A {
+  m();
+}
+abstract class B = A with M;''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonAbstractClassInheritsAbstractMemberOne_mixin_getter() async {
+    // 17034
+    Source source = addSource(r'''
+class A {
+  var a;
+}
+abstract class M {
+  get a;
+}
+class B extends A with M {}
+class C extends B {}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonAbstractClassInheritsAbstractMemberOne_mixin_method() async {
+    Source source = addSource(r'''
+class A {
+  m() {}
+}
+abstract class M {
+  m();
+}
+class B extends A with M {}
+class C extends B {}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonAbstractClassInheritsAbstractMemberOne_mixin_setter() async {
+    Source source = addSource(r'''
+class A {
+  var a;
+}
+abstract class M {
+  set a(dynamic v);
+}
+class B extends A with M {}
+class C extends B {}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonAbstractClassInheritsAbstractMemberOne_noSuchMethod_accessor() async {
+    Source source = addSource(r'''
+abstract class A {
+  int get g;
+}
+class B extends A {
+  noSuchMethod(v) => '';
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonAbstractClassInheritsAbstractMemberOne_noSuchMethod_method() async {
+    Source source = addSource(r'''
+abstract class A {
+  m(p);
+}
+class B extends A {
+  noSuchMethod(v) => '';
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonAbstractClassInheritsAbstractMemberOne_noSuchMethod_mixin() async {
+    Source source = addSource(r'''
+class A {
+  noSuchMethod(v) => '';
+}
+class B extends Object with A {
+  m(p);
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonAbstractClassInheritsAbstractMemberOne_noSuchMethod_superclass() async {
+    Source source = addSource(r'''
+class A {
+  noSuchMethod(v) => '';
+}
+class B extends A {
+  m(p);
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonAbstractClassInheritsAbstractMemberOne_overridesMethodInObject() async {
+    Source source = addSource(r'''
+class A {
+  String toString([String prefix = '']) => '${prefix}Hello';
+}
+class C {}
+class B extends A with C {}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonBoolExpression_interfaceType() async {
+    Source source = addSource(r'''
+f() {
+  assert(true);
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonBoolNegationExpression() async {
+    Source source = addSource(r'''
+f(bool pb, pd) {
+  !true;
+  !false;
+  !pb;
+  !pd;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonBoolNegationExpression_dynamic() async {
+    Source source = addSource(r'''
+f1(bool dynamic) {
+  !dynamic;
+}
+f2() {
+  bool dynamic = true;
+  !dynamic;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonBoolOperand_and_bool() async {
+    Source source = addSource(r'''
+bool f(bool left, bool right) {
+  return left && right;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonBoolOperand_and_dynamic() async {
+    Source source = addSource(r'''
+bool f(left, dynamic right) {
+  return left && right;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonBoolOperand_or_bool() async {
+    Source source = addSource(r'''
+bool f(bool left, bool right) {
+  return left || right;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonBoolOperand_or_dynamic() async {
+    Source source = addSource(r'''
+bool f(dynamic left, right) {
+  return left || right;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonConstantDefaultValue_constField() async {
+    Source source = addSource(r'''
+f([a = double.INFINITY]) {
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonConstantDefaultValue_function_named() async {
+    Source source = addSource("f({x : 2 + 3}) {}");
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonConstantDefaultValue_function_positional() async {
+    Source source = addSource("f([x = 2 + 3]) {}");
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonConstantDefaultValue_inConstructor_named() async {
+    Source source = addSource(r'''
+class A {
+  A({x : 2 + 3}) {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonConstantDefaultValue_inConstructor_positional() async {
+    Source source = addSource(r'''
+class A {
+  A([x = 2 + 3]) {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonConstantDefaultValue_method_named() async {
+    Source source = addSource(r'''
+class A {
+  m({x : 2 + 3}) {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonConstantDefaultValue_method_positional() async {
+    Source source = addSource(r'''
+class A {
+  m([x = 2 + 3]) {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonConstantDefaultValue_typedConstList() async {
+    Source source = addSource(r'''
+class A {
+  m([p111 = const <String>[]]) {}
+}
+class B extends A {
+  m([p222 = const <String>[]]) {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonConstantValueInInitializer_namedArgument() async {
+    Source source = addSource(r'''
+class A {
+  final a;
+  const A({this.a});
+}
+class B extends A {
+  const B({b}) : super(a: b);
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonConstCaseExpression_constField() async {
+    Source source = addSource(r'''
+f(double p) {
+  switch (p) {
+    case double.INFINITY:
+      return true;
+    default:
+      return false;
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertErrors(
+        source, [CompileTimeErrorCode.CASE_EXPRESSION_TYPE_IMPLEMENTS_EQUALS]);
+    verify([source]);
+  }
+
+  test_nonConstCaseExpression_typeLiteral() async {
+    Source source = addSource(r'''
+f(Type t) {
+  switch (t) {
+    case bool:
+    case int:
+      return true;
+    default:
+      return false;
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonConstListElement_constField() async {
+    Source source = addSource(r'''
+main() {
+  const [double.INFINITY];
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonConstMapAsExpressionStatement_const() async {
+    Source source = addSource(r'''
+f() {
+  const {'a' : 0, 'b' : 1};
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonConstMapAsExpressionStatement_notExpressionStatement() async {
+    Source source = addSource(r'''
+f() {
+  var m = {'a' : 0, 'b' : 1};
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonConstMapAsExpressionStatement_typeArguments() async {
+    Source source = addSource(r'''
+f() {
+  <String, int> {'a' : 0, 'b' : 1};
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonConstMapValue_constField() async {
+    Source source = addSource(r'''
+main() {
+  const {0: double.INFINITY};
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonConstValueInInitializer_binary_bool() async {
+    Source source = addSource(r'''
+class A {
+  final v;
+  const A.a1(bool p) : v = p && true;
+  const A.a2(bool p) : v = true && p;
+  const A.b1(bool p) : v = p || true;
+  const A.b2(bool p) : v = true || p;
+}''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [HintCode.DEAD_CODE]);
+    verify([source]);
+  }
+
+  test_nonConstValueInInitializer_binary_dynamic() async {
+    Source source = addSource(r'''
+class A {
+  final v;
+  const A.a1(p) : v = p + 5;
+  const A.a2(p) : v = 5 + p;
+  const A.b1(p) : v = p - 5;
+  const A.b2(p) : v = 5 - p;
+  const A.c1(p) : v = p * 5;
+  const A.c2(p) : v = 5 * p;
+  const A.d1(p) : v = p / 5;
+  const A.d2(p) : v = 5 / p;
+  const A.e1(p) : v = p ~/ 5;
+  const A.e2(p) : v = 5 ~/ p;
+  const A.f1(p) : v = p > 5;
+  const A.f2(p) : v = 5 > p;
+  const A.g1(p) : v = p < 5;
+  const A.g2(p) : v = 5 < p;
+  const A.h1(p) : v = p >= 5;
+  const A.h2(p) : v = 5 >= p;
+  const A.i1(p) : v = p <= 5;
+  const A.i2(p) : v = 5 <= p;
+  const A.j1(p) : v = p % 5;
+  const A.j2(p) : v = 5 % p;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    // operations on "p" are not resolved
+  }
+
+  test_nonConstValueInInitializer_binary_int() async {
+    Source source = addSource(r'''
+class A {
+  final v;
+  const A.a1(int p) : v = p ^ 5;
+  const A.a2(int p) : v = 5 ^ p;
+  const A.b1(int p) : v = p & 5;
+  const A.b2(int p) : v = 5 & p;
+  const A.c1(int p) : v = p | 5;
+  const A.c2(int p) : v = 5 | p;
+  const A.d1(int p) : v = p >> 5;
+  const A.d2(int p) : v = 5 >> p;
+  const A.e1(int p) : v = p << 5;
+  const A.e2(int p) : v = 5 << p;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonConstValueInInitializer_binary_num() async {
+    Source source = addSource(r'''
+class A {
+  final v;
+  const A.a1(num p) : v = p + 5;
+  const A.a2(num p) : v = 5 + p;
+  const A.b1(num p) : v = p - 5;
+  const A.b2(num p) : v = 5 - p;
+  const A.c1(num p) : v = p * 5;
+  const A.c2(num p) : v = 5 * p;
+  const A.d1(num p) : v = p / 5;
+  const A.d2(num p) : v = 5 / p;
+  const A.e1(num p) : v = p ~/ 5;
+  const A.e2(num p) : v = 5 ~/ p;
+  const A.f1(num p) : v = p > 5;
+  const A.f2(num p) : v = 5 > p;
+  const A.g1(num p) : v = p < 5;
+  const A.g2(num p) : v = 5 < p;
+  const A.h1(num p) : v = p >= 5;
+  const A.h2(num p) : v = 5 >= p;
+  const A.i1(num p) : v = p <= 5;
+  const A.i2(num p) : v = 5 <= p;
+  const A.j1(num p) : v = p % 5;
+  const A.j2(num p) : v = 5 % p;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonConstValueInInitializer_field() async {
+    Source source = addSource(r'''
+class A {
+  final int a;
+  const A() : a = 5;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonConstValueInInitializer_redirecting() async {
+    Source source = addSource(r'''
+class A {
+  const A.named(p);
+  const A() : this.named(42);
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonConstValueInInitializer_super() async {
+    Source source = addSource(r'''
+class A {
+  const A(p);
+}
+class B extends A {
+  const B() : super(42);
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonConstValueInInitializer_unary() async {
+    Source source = addSource(r'''
+class A {
+  final v;
+  const A.a(bool p) : v = !p;
+  const A.b(int p) : v = ~p;
+  const A.c(num p) : v = -p;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonGenerativeConstructor() async {
+    Source source = addSource(r'''
+class A {
+  A.named() {}
+  factory A() => null;
+}
+class B extends A {
+  B() : super.named();
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonTypeInCatchClause_isClass() async {
+    Source source = addSource(r'''
+f() {
+  try {
+  } on String catch (e) {
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonTypeInCatchClause_isFunctionTypeAlias() async {
+    Source source = addSource(r'''
+typedef F();
+f() {
+  try {
+  } on F catch (e) {
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonTypeInCatchClause_isTypeParameter() async {
+    Source source = addSource(r'''
+class A<T> {
+  f() {
+    try {
+    } on T catch (e) {
+    }
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonTypeInCatchClause_noType() async {
+    Source source = addSource(r'''
+f() {
+  try {
+  } catch (e) {
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonVoidReturnForOperator_no() async {
+    Source source = addSource(r'''
+class A {
+  operator []=(a, b) {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonVoidReturnForOperator_void() async {
+    Source source = addSource(r'''
+class A {
+  void operator []=(a, b) {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonVoidReturnForSetter_function_no() async {
+    Source source = addSource("set x(v) {}");
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonVoidReturnForSetter_function_void() async {
+    Source source = addSource("void set x(v) {}");
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonVoidReturnForSetter_method_no() async {
+    Source source = addSource(r'''
+class A {
+  set x(v) {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_nonVoidReturnForSetter_method_void() async {
+    Source source = addSource(r'''
+class A {
+  void set x(v) {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  @failingTest
+  test_null_callOperator() async {
+    Source source = addSource(r'''
+main() {
+  null + 5;
+  null == 5;
+  null[0];
+}''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [
+      StaticTypeWarningCode.UNDEFINED_METHOD,
+      StaticTypeWarningCode.UNDEFINED_METHOD
+    ]);
+  }
+
+  test_optionalNew_rewrite() async {
+    resetWith(options: new AnalysisOptionsImpl());
+    Source source = addSource(r'''
+import 'b.dart';
+main() {
+  const B.named1();
+  const B.named2();
+  const B.named3();
+  const B.named4();
+}
+''');
+    addNamedSource("/a.dart", r'''
+class A {
+  const A();
+  const A.named();
+}
+''');
+    addNamedSource("/b.dart", r'''
+import 'a.dart';
+import 'a.dart' as p;
+
+const _a1 = A();
+const _a2 = A.named();
+const _a3 = p.A();
+const _a4 = p.A.named();
+
+class B {
+  const B.named1({this.a: _a1}) : assert(a != null);
+  const B.named2({this.a: _a2}) : assert(a != null);
+  const B.named3({this.a: _a3}) : assert(a != null);
+  const B.named4({this.a: _a4}) : assert(a != null);
+
+  final A a;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_optionalNew_rewrite_instantiatesToBounds() async {
+    resetWith(options: new AnalysisOptionsImpl());
+    Source source = addSource(r'''
+import 'b.dart';
+
+@B.named1()
+@B.named2()
+@B.named3()
+@B.named4()
+@B.named5()
+@B.named6()
+@B.named7()
+@B.named8()
+main() {}
+''');
+    addNamedSource("/a.dart", r'''
+class Unbounded<T> {
+  const Unbounded();
+  const Unbounded.named();
+}
+class Bounded<T extends String> {
+  const Bounded();
+  const Bounded.named();
+}
+''');
+    addNamedSource("/b.dart", r'''
+import 'a.dart';
+import 'a.dart' as p;
+
+const unbounded1 = Unbounded();
+const unbounded2 = Unbounded.named();
+const unbounded3 = p.Unbounded();
+const unbounded4 = p.Unbounded.named();
+const bounded1 = Bounded();
+const bounded2 = Bounded.named();
+const bounded3 = p.Bounded();
+const bounded4 = p.Bounded.named();
+
+class B {
+  const B.named1({this.unbounded: unbounded1}) : bounded = null;
+  const B.named2({this.unbounded: unbounded2}) : bounded = null;
+  const B.named3({this.unbounded: unbounded3}) : bounded = null;
+  const B.named4({this.unbounded: unbounded4}) : bounded = null;
+  const B.named5({this.bounded: bounded1}) : unbounded = null;
+  const B.named6({this.bounded: bounded2}) : unbounded = null;
+  const B.named7({this.bounded: bounded3}) : unbounded = null;
+  const B.named8({this.bounded: bounded4}) : unbounded = null;
+
+  final Unbounded unbounded;
+  final Bounded bounded;
+}
+''');
+    final result = await computeAnalysisResult(source);
+    expect(result.unit.declarations, hasLength(1));
+    final mainDecl = result.unit.declarations[0];
+    expect(mainDecl.metadata, hasLength(8));
+    mainDecl.metadata.forEach((metadata) {
+      final value = metadata.elementAnnotation.computeConstantValue();
+      expect(value, isNotNull);
+      expect(value.type.toString(), 'B');
+      final unbounded = value.getField('unbounded');
+      final bounded = value.getField('bounded');
+      if (!unbounded.isNull) {
+        expect(bounded.isNull, true);
+        expect(unbounded.type.name, 'Unbounded');
+        expect(unbounded.type.typeArguments, hasLength(1));
+        expect(unbounded.type.typeArguments[0].isDynamic, isTrue);
+      } else {
+        expect(unbounded.isNull, true);
+        expect(bounded.type.name, 'Bounded');
+        expect(bounded.type.typeArguments, hasLength(1));
+        expect(bounded.type.typeArguments[0].name, 'String');
+      }
+    });
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_optionalParameterInOperator_required() async {
+    Source source = addSource(r'''
+class A {
+  operator +(p) {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_parameterScope_local() async {
+    // Parameter names shouldn't conflict with the name of the function they
+    // are enclosed in.
+    Source source = addSource(r'''
+f() {
+  g(g) {
+    h(g);
+  }
+}
+h(x) {}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_parameterScope_method() async {
+    // Parameter names shouldn't conflict with the name of the function they
+    // are enclosed in.
+    Source source = addSource(r'''
+class C {
+  g(g) {
+    h(g);
+  }
+}
+h(x) {}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_parameterScope_topLevel() async {
+    // Parameter names shouldn't conflict with the name of the function they
+    // are enclosed in.
+    Source source = addSource(r'''
+g(g) {
+  h(g);
+}
+h(x) {}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_parametricCallFunction() async {
+    Source source = addSource(r'''
+f() {
+  var c = new C();
+  c<String>().codeUnits;
+}
+
+class C {
+  T call<T>() => null;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_prefixCollidesWithTopLevelMembers() async {
+    addNamedSource("/lib.dart", r'''
+library lib;
+class A {}''');
+    Source source = addSource(r'''
+import 'lib.dart' as p;
+typedef P();
+p2() {}
+var p3;
+class p4 {}
+p.A a;''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_propagateTypeArgs_intoBounds() async {
+    Source source = addSource(r'''
+abstract class A<E> {}
+abstract class B<F> implements A<F>{}
+abstract class C<G, H extends A<G>> {}
+class D<I> extends C<I, B<I>> {}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_propagateTypeArgs_intoSupertype() async {
+    Source source = addSource(r'''
+class A<T> {
+  A(T p);
+  A.named(T p);
+}
+class B<S> extends A<S> {
+  B(S p) : super(p);
+  B.named(S p) : super.named(p);
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_recursiveConstructorRedirect() async {
+    Source source = addSource(r'''
+class A {
+  A.a() : this.b();
+  A.b() : this.c();
+  A.c() {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_recursiveFactoryRedirect() async {
+    Source source = addSource(r'''
+class A {
+  factory A() = B;
+}
+class B implements A {
+  factory B() = C;
+}
+class C implements B {
+  factory C() => null;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_redirectToInvalidFunctionType() async {
+    Source source = addSource(r'''
+class A implements B {
+  A(int p) {}
+}
+class B {
+  factory B(int p) = A;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_redirectToNonConstConstructor() async {
+    Source source = addSource(r'''
+class A {
+  const A.a();
+  const factory A.b() = A.a;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_referencedBeforeDeclaration_cascade() async {
+    Source source = addSource(r'''
+testRequestHandler() {}
+
+main() {
+  var s1 = null;
+  testRequestHandler()
+    ..stream(s1);
+  var stream = 123;
+  print(stream);
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_referenceToDeclaredVariableInInitializer_constructorName() async {
+    Source source = addSource(r'''
+class A {
+  A.x() {}
+}
+f() {
+  var x = new A.x();
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_referenceToDeclaredVariableInInitializer_methodName() async {
+    Source source = addSource(r'''
+class A {
+  x() {}
+}
+f(A a) {
+  var x = a.x();
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_referenceToDeclaredVariableInInitializer_propertyName() async {
+    Source source = addSource(r'''
+class A {
+  var x;
+}
+f(A a) {
+  var x = a.x;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_regress34906() async {
+    Source source = addSource(r'''
+typedef G<X, Y extends Function(X)> = X Function(Function(Y));
+G<dynamic, Function(Null)> superBoundedG;
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_rethrowOutsideCatch() async {
+    Source source = addSource(r'''
+class A {
+  void m() {
+    try {} catch (e) {rethrow;}
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_return_in_generator_async() async {
+    Source source = addSource('''
+import 'dart:async';
+Stream<int> f() async* {
+  return;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_return_in_generator_sync() async {
+    Source source = addSource('''
+Iterable<int> f() sync* {
+  return;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_returnInGenerativeConstructor() async {
+    Source source = addSource(r'''
+class A {
+  A() { return; }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_returnInGenerator_async() async {
+    Source source = addSource(r'''
+f() async {
+  return 0;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_returnInGenerator_sync() async {
+    Source source = addSource(r'''
+f() {
+  return 0;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_returnOfInvalidType_async() async {
+    Source source = addSource(r'''
+import 'dart:async';
+class A {
+  Future<int> m() async {
+    return 0;
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_returnOfInvalidType_dynamic() async {
+    Source source = addSource(r'''
+class TypeError {}
+class A {
+  static void testLogicalOp() {
+    testOr(a, b, onTypeError) {
+      try {
+        return a || b;
+      } on TypeError catch (t) {
+        return onTypeError;
+      }
+    }
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_returnOfInvalidType_subtype() async {
+    Source source = addSource(r'''
+class A {}
+class B extends A {}
+A f(B b) { return b; }''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_returnOfInvalidType_supertype() async {
+    Source source = addSource(r'''
+class A {}
+class B extends A {}
+B f(A a) { return a; }''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_returnOfInvalidType_typeParameter_18468() async {
+    // https://code.google.com/p/dart/issues/detail?id=18468
+    //
+    // This test verifies that the type of T is more specific than Type,
+    // where T is a type parameter and Type is the type Type from
+    // core, this particular test case comes from issue 18468.
+    //
+    // A test cannot be added to TypeParameterTypeImplTest since the types
+    // returned out of the TestTypeProvider don't have a mock 'dart.core'
+    // enclosing library element.
+    // See TypeParameterTypeImpl.isMoreSpecificThan().
+    Source source = addSource(r'''
+class Foo<T> {
+  Type get t => T;
+}''');
+    await computeAnalysisResult(source);
+    assertErrors(source);
+    verify([source]);
+  }
+
+  test_returnOfInvalidType_void() async {
+    Source source = addSource(r'''
+void f1() {}
+void f2() { return; }
+void f3() { return null; }
+void f4() { return g1(); }
+void f5() { return g2(); }
+void f6() => throw 42;
+g1() {}
+void g2() {}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_returnWithoutValue_noReturnType() async {
+    Source source = addSource("f() { return; }");
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_returnWithoutValue_void() async {
+    Source source = addSource("void f() { return; }");
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_reversedTypeArguments() async {
+    Source source = addSource(r'''
+class Codec<S1, T1> {
+  Codec<T1, S1> get inverted => new _InvertedCodec<T1, S1>(this);
+}
+class _InvertedCodec<T2, S2> extends Codec<T2, S2> {
+  _InvertedCodec(Codec<S2, T2> codec);
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_sharedDeferredPrefix() async {
+    await resolveWithErrors(<String>[
+      r'''
+library lib1;
+f1() {}''',
+      r'''
+library lib2;
+f2() {}''',
+      r'''
+library lib3;
+f3() {}''',
+      r'''
+library root;
+import 'lib1.dart' deferred as lib1;
+import 'lib2.dart' as lib;
+import 'lib3.dart' as lib;
+main() { lib1.f1(); lib.f2(); lib.f3(); }'''
+    ], <ErrorCode>[]);
+  }
+
+  test_staticAccessToInstanceMember_annotation() async {
+    Source source = addSource(r'''
+class A {
+  const A.name();
+}
+@A.name()
+main() {
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_staticAccessToInstanceMember_method() async {
+    Source source = addSource(r'''
+class A {
+  static m() {}
+}
+main() {
+  A.m;
+  A.m();
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_staticAccessToInstanceMember_propertyAccess_field() async {
+    Source source = addSource(r'''
+class A {
+  static var f;
+}
+main() {
+  A.f;
+  A.f = 1;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_staticAccessToInstanceMember_propertyAccess_propertyAccessor() async {
+    Source source = addSource(r'''
+class A {
+  static get f => 42;
+  static set f(x) {}
+}
+main() {
+  A.f;
+  A.f = 1;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_superInInvalidContext() async {
+    Source source = addSource(r'''
+class A {
+  m() {}
+}
+class B extends A {
+  B() {
+    var v = super.m();
+  }
+  n() {
+    var v = super.m();
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_typeAliasCannotReferenceItself_returnClass_withTypeAlias() async {
+    Source source = addSource(r'''
+typedef B A();
+class B {
+  A a;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_typeArgument_boundToFunctionType() async {
+    Source source = addSource("class A<T extends void Function(T)>{}");
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_typeArgumentNotMatchingBounds_const() async {
+    Source source = addSource(r'''
+class A {}
+class B extends A {}
+class G<E extends A> {
+  const G();
+}
+f() { return const G<B>(); }''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_typeArgumentNotMatchingBounds_new() async {
+    Source source = addSource(r'''
+class A {}
+class B extends A {}
+class G<E extends A> {}
+f() { return new G<B>(); }''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_typeArgumentNotMatchingBounds_ofFunctionTypeAlias_hasBound() async {
+    Source source = addSource(r'''
+class A {}
+class B extends A {}
+typedef F<T extends A>();
+F<A> fa;
+F<B> fb;
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_typeArgumentNotMatchingBounds_ofFunctionTypeAlias_hasBound2() async {
+    Source source = addSource(r'''
+class MyClass<T> {}
+typedef MyFunction<T, P extends MyClass<T>>();
+class A<T, P extends MyClass<T>> {
+  MyFunction<T, P> f;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_typeArgumentNotMatchingBounds_ofFunctionTypeAlias_noBound() async {
+    Source source = addSource(r'''
+typedef F<T>();
+F<int> f1;
+F<String> f2;
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_typePromotion_booleanAnd_useInRight() async {
+    Source source = addSource(r'''
+main(Object p) {
+  p is String && p.length != 0;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_typePromotion_booleanAnd_useInRight_accessedInClosureRight_noAssignment() async {
+    Source source = addSource(r'''
+callMe(f()) { f(); }
+main(Object p) {
+  (p is String) && callMe(() { p.length; });
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_typePromotion_conditional_issue14655() async {
+    Source source = addSource(r'''
+class A {}
+class B extends A {}
+class C extends B {
+  mc() {}
+}
+print(_) {}
+main(A p) {
+  (p is C) && (print(() => p) && (p is B)) ? p.mc() : p = null;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_typePromotion_conditional_useInThen() async {
+    Source source = addSource(r'''
+main(Object p) {
+  p is String ? p.length : 0;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_typePromotion_conditional_useInThen_accessedInClosure_noAssignment() async {
+    Source source = addSource(r'''
+callMe(f()) { f(); }
+main(Object p) {
+  p is String ? callMe(() { p.length; }) : 0;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_typePromotion_functionType_arg_ignoreIfNotMoreSpecific() async {
+    Source source = addSource(r'''
+typedef FuncB(B b);
+typedef FuncA(A a);
+class A {}
+class B {}
+main(FuncA f) {
+  if (f is FuncB) {
+    f(new A());
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_typePromotion_functionType_return_ignoreIfNotMoreSpecific() async {
+    Source source = addSource(r'''
+class A {}
+typedef FuncAtoDyn(A a);
+typedef FuncDynToDyn(x);
+main(FuncAtoDyn f) {
+  if (f is FuncDynToDyn) {
+    A a = f(new A());
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_typePromotion_functionType_return_voidToDynamic() async {
+    Source source = addSource(r'''
+typedef FuncDynToDyn(x);
+typedef void FuncDynToVoid(x);
+class A {}
+main(FuncDynToVoid f) {
+  if (f is FuncDynToDyn) {
+    A a = f(null);
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_typePromotion_if_accessedInClosure_noAssignment() async {
+    Source source = addSource(r'''
+callMe(f()) { f(); }
+main(Object p) {
+  if (p is String) {
+    callMe(() {
+      p.length;
+    });
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_typePromotion_if_extends_moreSpecific() async {
+    Source source = addSource(r'''
+class V {}
+class VP extends V {}
+class A<T> {}
+class B<S> extends A<S> {
+  var b;
+}
+
+main(A<V> p) {
+  if (p is B<VP>) {
+    p.b;
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_typePromotion_if_hasAssignment_outsideAfter() async {
+    Source source = addSource(r'''
+main(Object p) {
+  if (p is String) {
+    p.length;
+  }
+  p = 0;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_typePromotion_if_hasAssignment_outsideBefore() async {
+    Source source = addSource(r'''
+main(Object p, Object p2) {
+  p = p2;
+  if (p is String) {
+    p.length;
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_typePromotion_if_implements_moreSpecific() async {
+    Source source = addSource(r'''
+class V {}
+class VP extends V {}
+class A<T> {}
+class B<S> implements A<S> {
+  var b;
+}
+
+main(A<V> p) {
+  if (p is B<VP>) {
+    p.b;
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_typePromotion_if_inClosure_assignedAfter_inSameFunction() async {
+    Source source = addSource(r'''
+main() {
+  f(Object p) {
+    if (p is String) {
+      p.length;
+    }
+    p = 0;
+  };
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_typePromotion_if_is_and_left() async {
+    Source source = addSource(r'''
+bool tt() => true;
+main(Object p) {
+  if (p is String && tt()) {
+    p.length;
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_typePromotion_if_is_and_right() async {
+    Source source = addSource(r'''
+bool tt() => true;
+main(Object p) {
+  if (tt() && p is String) {
+    p.length;
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_typePromotion_if_is_and_subThenSuper() async {
+    Source source = addSource(r'''
+class A {
+  var a;
+}
+class B extends A {
+  var b;
+}
+main(Object p) {
+  if (p is B && p is A) {
+    p.a;
+    p.b;
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_typePromotion_if_is_parenthesized() async {
+    Source source = addSource(r'''
+main(Object p) {
+  if ((p is String)) {
+    p.length;
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_typePromotion_if_is_single() async {
+    Source source = addSource(r'''
+main(Object p) {
+  if (p is String) {
+    p.length;
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_typePromotion_parentheses() async {
+    Source source = addSource(r'''
+main(Object p) {
+  (p is String) ? p.length : 0;
+  (p) is String ? p.length : 0;
+  ((p)) is String ? p.length : 0;
+  ((p) is String) ? p.length : 0;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_typeType_class() async {
+    Source source = addSource(r'''
+class C {}
+f(Type t) {}
+main() {
+  f(C);
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_typeType_class_prefixed() async {
+    addNamedSource("/lib.dart", r'''
+library lib;
+class C {}''');
+    Source source = addSource(r'''
+import 'lib.dart' as p;
+f(Type t) {}
+main() {
+  f(p.C);
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_typeType_functionTypeAlias() async {
+    Source source = addSource(r'''
+typedef F();
+f(Type t) {}
+main() {
+  f(F);
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_typeType_functionTypeAlias_prefixed() async {
+    addNamedSource("/lib.dart", r'''
+library lib;
+typedef F();''');
+    Source source = addSource(r'''
+import 'lib.dart' as p;
+f(Type t) {}
+main() {
+  f(p.F);
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_undefinedConstructorInInitializer_explicit_named() async {
+    Source source = addSource(r'''
+class A {
+  A.named() {}
+}
+class B extends A {
+  B() : super.named();
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_undefinedConstructorInInitializer_explicit_unnamed() async {
+    Source source = addSource(r'''
+class A {
+  A() {}
+}
+class B extends A {
+  B() : super();
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_undefinedConstructorInInitializer_hasOptionalParameters() async {
+    Source source = addSource(r'''
+class A {
+  A([p]) {}
+}
+class B extends A {
+  B();
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_undefinedConstructorInInitializer_implicit() async {
+    Source source = addSource(r'''
+class A {
+  A() {}
+}
+class B extends A {
+  B();
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_undefinedConstructorInInitializer_redirecting() async {
+    Source source = addSource(r'''
+class Foo {
+  Foo.ctor();
+}
+class Bar extends Foo {
+  Bar() : this.ctor();
+  Bar.ctor() : super.ctor();
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  @failingTest
+  test_undefinedEnumConstant() async {
+    Source source = addSource(r'''
+enum E { ONE }
+E e() {
+  return E.TWO;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_undefinedGetter_static_conditionalAccess() async {
+    // The conditional access operator '?.' can be used to access static
+    // fields.
+    Source source = addSource('''
+class A {
+  static var x;
+}
+var a = A?.x;
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_undefinedGetter_typeSubstitution() async {
+    Source source = addSource(r'''
+class A<E> {
+  E element;
+}
+class B extends A<List> {
+  m() {
+    element.last;
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_undefinedIdentifier_synthetic_whenExpression() async {
+    Source source = addSource(r'''
+print(x) {}
+main() {
+  print(is String);
+}''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [ParserErrorCode.MISSING_IDENTIFIER]);
+  }
+
+  test_undefinedIdentifier_synthetic_whenMethodName() async {
+    Source source = addSource(r'''
+print(x) {}
+main(int p) {
+  p.();
+}''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [
+      ParserErrorCode.MISSING_IDENTIFIER,
+      ParserErrorCode.MISSING_IDENTIFIER,
+      StaticTypeWarningCode.UNDEFINED_GETTER
+    ]);
+  }
+
+  test_undefinedMethod_functionExpression_callMethod() async {
+    Source source = addSource(r'''
+main() {
+  (() => null).call();
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    // A call to verify(source) fails as '.call()' isn't resolved.
+  }
+
+  test_undefinedMethod_functionExpression_directCall() async {
+    Source source = addSource(r'''
+main() {
+  (() => null)();
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    // A call to verify(source) fails as '(() => null)()' isn't resolved.
+  }
+
+  test_undefinedMethod_static_conditionalAccess() async {
+    // The conditional access operator '?.' can be used to access static
+    // methods.
+    Source source = addSource('''
+class A {
+  static void m() {}
+}
+f() { A?.m(); }
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_undefinedOperator_index() async {
+    Source source = addSource(r'''
+class A {
+  operator [](a) {}
+  operator []=(a, b) {}
+}
+f(A a) {
+  a[0];
+  a[0] = 1;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_undefinedOperator_tilde() async {
+    Source source = addSource(r'''
+const A = 3;
+const B = ~((1 << A) - 1);''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_undefinedSetter_importWithPrefix() async {
+    addNamedSource("/lib.dart", r'''
+library lib;
+set y(int value) {}''');
+    Source source = addSource(r'''
+import 'lib.dart' as x;
+main() {
+  x.y = 0;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_undefinedSetter_static_conditionalAccess() async {
+    // The conditional access operator '?.' can be used to access static
+    // fields.
+    Source source = addSource('''
+class A {
+  static var x;
+}
+f() { A?.x = 1; }
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_undefinedSuperMethod_field() async {
+    Source source = addSource(r'''
+class A {
+  var m;
+}
+class B extends A {
+  f() {
+    super.m();
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_undefinedSuperMethod_method() async {
+    Source source = addSource(r'''
+class A {
+  m() {}
+}
+class B extends A {
+  f() {
+    super.m();
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_unusedShownName_unresolved() async {
+    Source source = addSource(r'''
+import 'dart:math' show max, FooBar;
+main() {
+  print(max(1, 2));
+}
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [HintCode.UNDEFINED_SHOWN_NAME]);
+  }
+
+  test_uriDoesNotExist_dll() async {
+    addNamedSource("/lib.dll", "");
+    Source source = addSource("import 'dart-ext:lib';");
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+  }
+
+  test_uriDoesNotExist_dylib() async {
+    addNamedSource("/lib.dylib", "");
+    Source source = addSource("import 'dart-ext:lib';");
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+  }
+
+  test_uriDoesNotExist_so() async {
+    addNamedSource("/lib.so", "");
+    Source source = addSource("import 'dart-ext:lib';");
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+  }
+
+  Future test_useDynamicWithPrefix() async {
+    final Source source = addSource('''
+import 'dart:core' as core;
+
+core.dynamic dynamicVariable;
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_wrongNumberOfParametersForOperator1() async {
+    await _check_wrongNumberOfParametersForOperator1("<");
+    await _check_wrongNumberOfParametersForOperator1(">");
+    await _check_wrongNumberOfParametersForOperator1("<=");
+    await _check_wrongNumberOfParametersForOperator1(">=");
+    await _check_wrongNumberOfParametersForOperator1("+");
+    await _check_wrongNumberOfParametersForOperator1("/");
+    await _check_wrongNumberOfParametersForOperator1("~/");
+    await _check_wrongNumberOfParametersForOperator1("*");
+    await _check_wrongNumberOfParametersForOperator1("%");
+    await _check_wrongNumberOfParametersForOperator1("|");
+    await _check_wrongNumberOfParametersForOperator1("^");
+    await _check_wrongNumberOfParametersForOperator1("&");
+    await _check_wrongNumberOfParametersForOperator1("<<");
+    await _check_wrongNumberOfParametersForOperator1(">>");
+    await _check_wrongNumberOfParametersForOperator1("[]");
+  }
+
+  test_wrongNumberOfParametersForOperator_index() async {
+    Source source = addSource(r'''
+class A {
+  operator []=(a, b) {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_wrongNumberOfParametersForOperator_minus() async {
+    await _check_wrongNumberOfParametersForOperator("-", "");
+    await _check_wrongNumberOfParametersForOperator("-", "a");
+  }
+
+  test_wrongNumberOfParametersForSetter() async {
+    Source source = addSource(r'''
+class A {
+  set x(a) {}
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_yield_async_to_dynamic_type() async {
+    Source source = addSource('''
+dynamic f() async* {
+  yield 3;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_yield_async_to_generic_type() async {
+    Source source = addSource('''
+import 'dart:async';
+Stream f() async* {
+  yield 3;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_yield_async_to_parameterized_type() async {
+    Source source = addSource('''
+import 'dart:async';
+Stream<int> f() async* {
+  yield 3;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_yield_async_to_untyped() async {
+    Source source = addSource('''
+f() async* {
+  yield 3;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_yield_each_async_dynamic_to_dynamic() async {
+    Source source = addSource('''
+f() async* {
+  yield* g();
+}
+g() => null;
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_yield_each_async_dynamic_to_stream() async {
+    Source source = addSource('''
+import 'dart:async';
+Stream f() async* {
+  yield* g();
+}
+g() => null;
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_yield_each_async_dynamic_to_typed_stream() async {
+    Source source = addSource('''
+import 'dart:async';
+Stream<int> f() async* {
+  yield* g();
+}
+g() => null;
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_yield_each_async_stream_to_dynamic() async {
+    Source source = addSource('''
+import 'dart:async';
+f() async* {
+  yield* g();
+}
+Stream g() => null;
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_yield_each_async_typed_stream_to_dynamic() async {
+    Source source = addSource('''
+import 'dart:async';
+f() async* {
+  yield* g();
+}
+Stream<int> g() => null;
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_yield_each_async_typed_stream_to_typed_stream() async {
+    Source source = addSource('''
+import 'dart:async';
+Stream<int> f() async* {
+  yield* g();
+}
+Stream<int> g() => null;
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_yield_each_sync_dynamic_to_dynamic() async {
+    Source source = addSource('''
+f() sync* {
+  yield* g();
+}
+g() => null;
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_yield_each_sync_dynamic_to_iterable() async {
+    Source source = addSource('''
+Iterable f() sync* {
+  yield* g();
+}
+g() => null;
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_yield_each_sync_dynamic_to_typed_iterable() async {
+    Source source = addSource('''
+Iterable<int> f() sync* {
+  yield* g();
+}
+g() => null;
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_yield_each_sync_iterable_to_dynamic() async {
+    Source source = addSource('''
+f() sync* {
+  yield* g();
+}
+Iterable g() => null;
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_yield_each_sync_typed_iterable_to_dynamic() async {
+    Source source = addSource('''
+f() sync* {
+  yield* g();
+}
+Iterable<int> g() => null;
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_yield_each_sync_typed_iterable_to_typed_iterable() async {
+    Source source = addSource('''
+Iterable<int> f() sync* {
+  yield* g();
+}
+Iterable<int> g() => null;
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_yield_sync_to_dynamic_type() async {
+    Source source = addSource('''
+dynamic f() sync* {
+  yield 3;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_yield_sync_to_generic_type() async {
+    Source source = addSource('''
+Iterable f() sync* {
+  yield 3;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_yield_sync_to_parameterized_type() async {
+    Source source = addSource('''
+Iterable<int> f() sync* {
+  yield 3;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_yield_sync_to_untyped() async {
+    Source source = addSource('''
+f() sync* {
+  yield 3;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_yieldInNonGenerator_asyncStar() async {
+    Source source = addSource(r'''
+f() async* {
+  yield 0;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_yieldInNonGenerator_syncStar() async {
+    Source source = addSource(r'''
+f() sync* {
+  yield 0;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  Future<void> _check_wrongNumberOfParametersForOperator(
+      String name, String parameters) async {
+    Source source = addSource("""
+class A {
+  operator $name($parameters) {}
+}""");
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  Future<void> _check_wrongNumberOfParametersForOperator1(String name) async {
+    await _check_wrongNumberOfParametersForOperator(name, "a");
+  }
+}
+
+@reflectiveTest
+class NonErrorResolverWithUiAsCodeTest extends NonErrorResolverTest {
+  @override
+  List<String> get enabledExperiments =>
+      [EnableString.spread_collections, EnableString.control_flow_collections];
+}
diff --git a/pkg/analyzer/test/generated/non_hint_code.dart b/pkg/analyzer/test/generated/non_hint_code.dart
deleted file mode 100644
index 206e154..0000000
--- a/pkg/analyzer/test/generated/non_hint_code.dart
+++ /dev/null
@@ -1,924 +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/error/error.dart';
-import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/source_io.dart';
-
-import 'resolver_test_case.dart';
-
-abstract class NonHintCodeTest extends ResolverTestCase {
-  @override
-  void reset() {
-    super.resetWith(packages: [
-      [
-        'meta',
-        r'''
-library meta;
-
-const _AlwaysThrows alwaysThrows = const _AlwaysThrows();
-const _Literal literal = const _Literal();
-
-class _AlwaysThrows {
-  const _AlwaysThrows();
-}
-class _Literal {
-  const _Literal();
-}
-'''
-      ]
-    ]);
-  }
-
-  test_async_future_object_without_return() async {
-    Source source = addSource('''
-import 'dart:async';
-Future<Object> f() async {}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [HintCode.MISSING_RETURN]);
-    verify([source]);
-  }
-
-  test_deadCode_afterForEachWithBreakLabel() async {
-    Source source = addSource('''
-f() {
-  named: {
-    for (var x in [1]) {
-      if (x == null)
-        break named;
-    }
-    return;
-  }
-  print('not dead');
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_deadCode_afterForWithBreakLabel() async {
-    Source source = addSource('''
-f() {
-  named: {
-    for (int i = 0; i < 7; i++) {
-      if (i == null)
-        break named;
-    }
-    return;
-  }
-  print('not dead');
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_deadCode_afterTryCatch() async {
-    Source source = addSource('''
-main() {
-  try {
-    return f();
-  } catch (e) {
-    print(e);
-  }
-  print('not dead');
-}
-f() {
-  throw 'foo';
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_deadCode_deadBlock_conditionalElse_debugConst() async {
-    Source source = addSource(r'''
-const bool DEBUG = true;
-f() {
-  DEBUG ? 1 : 2;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_deadCode_deadBlock_conditionalIf_debugConst() async {
-    Source source = addSource(r'''
-const bool DEBUG = false;
-f() {
-  DEBUG ? 1 : 2;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_deadCode_deadBlock_else() async {
-    Source source = addSource(r'''
-const bool DEBUG = true;
-f() {
-  if(DEBUG) {} else {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_deadCode_deadBlock_if_debugConst_prefixedIdentifier() async {
-    Source source = addSource(r'''
-class A {
-  static const bool DEBUG = false;
-}
-f() {
-  if(A.DEBUG) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_deadCode_deadBlock_if_debugConst_prefixedIdentifier2() async {
-    Source source = addSource(r'''
-library L;
-import 'lib2.dart';
-f() {
-  if(A.DEBUG) {}
-}''');
-    addNamedSource("/lib2.dart", r'''
-library lib2;
-class A {
-  static const bool DEBUG = false;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_deadCode_deadBlock_if_debugConst_propertyAccessor() async {
-    Source source = addSource(r'''
-library L;
-import 'lib2.dart' as LIB;
-f() {
-  if(LIB.A.DEBUG) {}
-}''');
-    addNamedSource("/lib2.dart", r'''
-library lib2;
-class A {
-  static const bool DEBUG = false;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_deadCode_deadBlock_if_debugConst_simpleIdentifier() async {
-    Source source = addSource(r'''
-const bool DEBUG = false;
-f() {
-  if(DEBUG) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_deadCode_deadBlock_while_debugConst() async {
-    Source source = addSource(r'''
-const bool DEBUG = false;
-f() {
-  while(DEBUG) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_deadCode_deadCatch_onCatchSubtype() async {
-    Source source = addSource(r'''
-class A {}
-class B extends A {}
-f() {
-  try {} on B catch (e) {} on A catch (e) {} catch (e) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_deadCode_deadFinalBreakInCase() async {
-    Source source = addSource(r'''
-f() {
-  switch (true) {
-  case true:
-    try {
-      int a = 1;
-    } finally {
-      return;
-    }
-    break;
-  default:
-    break;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_deadCode_deadOperandLHS_and_debugConst() async {
-    Source source = addSource(r'''
-const bool DEBUG = false;
-f() {
-  bool b = DEBUG && false;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_deadCode_deadOperandLHS_or_debugConst() async {
-    Source source = addSource(r'''
-const bool DEBUG = true;
-f() {
-  bool b = DEBUG || true;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_deadCode_statementAfterIfWithoutElse() async {
-    Source source = addSource(r'''
-f() {
-  if (1 < 0) {
-    return;
-  }
-  int a = 1;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_duplicateImport_as() async {
-    Source source = addSource(r'''
-library L;
-import 'lib1.dart';
-import 'lib1.dart' as one;
-A a;
-one.A a2;''');
-    addNamedSource("/lib1.dart", r'''
-library lib1;
-class A {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_duplicateImport_hide() async {
-    Source source = addSource(r'''
-library L;
-import 'lib1.dart';
-import 'lib1.dart' hide A;
-A a;
-B b;''');
-    addNamedSource("/lib1.dart", r'''
-library lib1;
-class A {}
-class B {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_duplicateImport_show() async {
-    Source source = addSource(r'''
-library L;
-import 'lib1.dart';
-import 'lib1.dart' show A;
-A a;
-B b;''');
-    addNamedSource("/lib1.dart", r'''
-library lib1;
-class A {}
-class B {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_importDeferredLibraryWithLoadFunction() async {
-    await resolveWithErrors(<String>[
-      r'''
-library lib1;
-f() {}''',
-      r'''
-library root;
-import 'lib1.dart' deferred as lib1;
-main() { lib1.f(); }'''
-    ], const <ErrorCode>[]);
-  }
-
-  test_issue20904BuggyTypePromotionAtIfJoin_1() async {
-    // https://code.google.com/p/dart/issues/detail?id=20904
-    Source source = addSource(r'''
-f(var message, var dynamic_) {
-  if (message is Function) {
-    message = dynamic_;
-  }
-  int s = message;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_issue20904BuggyTypePromotionAtIfJoin_3() async {
-    // https://code.google.com/p/dart/issues/detail?id=20904
-    Source source = addSource(r'''
-f(var message) {
-  var dynamic_;
-  if (message is Function) {
-    message = dynamic_;
-  } else {
-    return;
-  }
-  int s = message;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_issue20904BuggyTypePromotionAtIfJoin_4() async {
-    // https://code.google.com/p/dart/issues/detail?id=20904
-    Source source = addSource(r'''
-f(var message) {
-  if (message is Function) {
-    message = '';
-  } else {
-    return;
-  }
-  String s = message;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_missingReturn_alwaysThrows() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-
-@alwaysThrows
-void a() {
-  throw 'msg';
-}
-
-int f() {
-  a();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_missingReturn_emptyFunctionBody() async {
-    Source source = addSource(r'''
-abstract class A {
-  int m();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_missingReturn_expressionFunctionBody() async {
-    Source source = addSource("int f() => 0;");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_missingReturn_futureVoidReturnType() async {
-    Source source = addSource('''
-import 'dart:async';
-Future<void> f() async {}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_missingReturn_noReturnType() async {
-    Source source = addSource("f() {}");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_missingReturn_voidReturnType() async {
-    Source source = addSource("void f() {}");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nullAwareInCondition_for_noCondition() async {
-    Source source = addSource(r'''
-m(x) {
-  for (var v = x; ; v++) {}
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nullAwareInCondition_if_notTopLevel() async {
-    Source source = addSource(r'''
-m(x) {
-  if (x?.y == null) {}
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_overrideEqualsButNotHashCode() async {
-    Source source = addSource(r'''
-class A {
-  bool operator ==(x) { return x; }
-  get hashCode => 0;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_invalidLiteralAnnotation_constConstructor() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @literal
-  const A();
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonConstCallToLiteralConstructor_constCreation() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @literal
-  const A();
-}
-
-void main() {
-  const a = const A();
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonConstCallToLiteralConstructor_constContextCreation() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @literal
-  const A();
-}
-
-void main() {
-  const a = A();
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_nonConstCallToLiteralConstructor_unconstableCreation() async {
-    Source source = addSource(r'''
-import 'package:meta/meta.dart';
-class A {
-  @literal
-  const A(List list);
-}
-
-void main() {
-  var a = A(new List());
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_overrideOnNonOverridingField_inInterface() async {
-    Source source = addSource(r'''
-class A {
-  int get a => 0;
-  void set b(_) {}
-  int c;
-}
-class B implements A {
-  @override
-  final int a = 1;
-  @override
-  int b;
-  @override
-  int c;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-      source,
-      [CompileTimeErrorCode.INVALID_OVERRIDE],
-    );
-    verify([source]);
-  }
-
-  test_overrideOnNonOverridingField_inSuperclass() async {
-    Source source = addSource(r'''
-class A {
-  int get a => 0;
-  void set b(_) {}
-  int c;
-}
-class B extends A {
-  @override
-  final int a = 1;
-  @override
-  int b;
-  @override
-  int c;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(
-      source,
-      [CompileTimeErrorCode.INVALID_OVERRIDE],
-    );
-    verify([source]);
-  }
-
-  test_overrideOnNonOverridingGetter_inInterface() async {
-    Source source = addSource(r'''
-class A {
-  int get m => 0;
-}
-class B implements A {
-  @override
-  int get m => 1;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_overrideOnNonOverridingGetter_inSuperclass() async {
-    Source source = addSource(r'''
-class A {
-  int get m => 0;
-}
-class B extends A {
-  @override
-  int get m => 1;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_overrideOnNonOverridingMethod_inInterface() async {
-    Source source = addSource(r'''
-class A {
-  int m() => 0;
-}
-class B implements A {
-  @override
-  int m() => 1;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_overrideOnNonOverridingMethod_inInterfaces() async {
-    Source source = addSource(r'''
-abstract class I {
-  void foo(int _);
-}
-
-abstract class J {
-  void foo(String _);
-}
-
-class C implements I, J {
-  @override
-  void foo(Object _) {}
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_overrideOnNonOverridingMethod_inSuperclass() async {
-    Source source = addSource(r'''
-class A {
-  int m() => 0;
-}
-class B extends A {
-  @override
-  int m() => 1;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_overrideOnNonOverridingMethod_inSuperclass_abstract() async {
-    Source source = addSource(r'''
-abstract class A {
-  int m();
-}
-class B extends A {
-  @override
-  int m() => 1;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_overrideOnNonOverridingSetter_inInterface() async {
-    Source source = addSource(r'''
-class A {
-  set m(int x) {}
-}
-class B implements A {
-  @override
-  set m(int x) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_overrideOnNonOverridingSetter_inSuperclass() async {
-    Source source = addSource(r'''
-class A {
-  set m(int x) {}
-}
-class B extends A {
-  @override
-  set m(int x) {}
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_propagatedFieldType() async {
-    Source source = addSource(r'''
-class A { }
-class X<T> {
-  final x = new List<T>();
-}
-class Z {
-  final X<A> y = new X<A>();
-  foo() {
-    y.x.add(new A());
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_proxy_annotation_prefixed() async {
-    Source source = addSource(r'''
-library L;
-@proxy
-class A {}
-f(var a) {
-  a = new A();
-  a.m();
-  var x = a.g;
-  a.s = 1;
-  var y = a + a;
-  a++;
-  ++a;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-  }
-
-  test_proxy_annotation_prefixed2() async {
-    Source source = addSource(r'''
-library L;
-@proxy
-class A {}
-class B {
-  f(var a) {
-    a = new A();
-    a.m();
-    var x = a.g;
-    a.s = 1;
-    var y = a + a;
-    a++;
-    ++a;
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-  }
-
-  test_proxy_annotation_prefixed3() async {
-    Source source = addSource(r'''
-library L;
-class B {
-  f(var a) {
-    a = new A();
-    a.m();
-    var x = a.g;
-    a.s = 1;
-    var y = a + a;
-    a++;
-    ++a;
-  }
-}
-@proxy
-class A {}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-  }
-
-  test_undefinedMethod_assignmentExpression_inSubtype() async {
-    Source source = addSource(r'''
-class A {}
-class B extends A {
-  operator +(B b) {return new B();}
-}
-f(var a, var a2) {
-  a = new A();
-  a2 = new A();
-  a += a2;
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-  }
-
-  test_undefinedMethod_dynamic() async {
-    Source source = addSource(r'''
-class D<T extends dynamic> {
-  fieldAccess(T t) => t.abc;
-  methodAccess(T t) => t.xyz(1, 2, 'three');
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-  }
-
-  test_undefinedMethod_unionType_all() async {
-    Source source = addSource(r'''
-class A {
-  int m(int x) => 0;
-}
-class B {
-  String m() => '0';
-}
-f(A a, B b) {
-  var ab;
-  if (0 < 1) {
-    ab = a;
-  } else {
-    ab = b;
-  }
-  ab.m();
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-  }
-
-  test_undefinedMethod_unionType_some() async {
-    Source source = addSource(r'''
-class A {
-  int m(int x) => 0;
-}
-class B {}
-f(A a, B b) {
-  var ab;
-  if (0 < 1) {
-    ab = a;
-  } else {
-    ab = b;
-  }
-  ab.m(0);
-}''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-  }
-}
-
-class PubSuggestionCodeTest extends ResolverTestCase {
-  // TODO(brianwilkerson) The tests in this class are not being run, and all but
-  //  the first would fail. We should implement these checks and enable the
-  //  tests.
-  test_import_package() async {
-    Source source = addSource("import 'package:somepackage/other.dart';");
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
-  }
-
-  test_import_packageWithDotDot() async {
-    Source source = addSource("import 'package:somepackage/../other.dart';");
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CompileTimeErrorCode.URI_DOES_NOT_EXIST,
-      HintCode.PACKAGE_IMPORT_CONTAINS_DOT_DOT
-    ]);
-  }
-
-  test_import_packageWithLeadingDotDot() async {
-    Source source = addSource("import 'package:../other.dart';");
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      CompileTimeErrorCode.URI_DOES_NOT_EXIST,
-      HintCode.PACKAGE_IMPORT_CONTAINS_DOT_DOT
-    ]);
-  }
-
-  test_import_referenceIntoLibDirectory() async {
-    addNamedSource("/myproj/pubspec.yaml", "");
-    addNamedSource("/myproj/lib/other.dart", "");
-    Source source =
-        addNamedSource("/myproj/web/test.dart", "import '../lib/other.dart';");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [HintCode.FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE]);
-  }
-
-  test_import_referenceIntoLibDirectory_no_pubspec() async {
-    addNamedSource("/myproj/lib/other.dart", "");
-    Source source =
-        addNamedSource("/myproj/web/test.dart", "import '../lib/other.dart';");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-  }
-
-  test_import_referenceOutOfLibDirectory() async {
-    addNamedSource("/myproj/pubspec.yaml", "");
-    addNamedSource("/myproj/web/other.dart", "");
-    Source source =
-        addNamedSource("/myproj/lib/test.dart", "import '../web/other.dart';");
-    await computeAnalysisResult(source);
-    assertErrors(
-        source, [HintCode.FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE]);
-  }
-
-  test_import_referenceOutOfLibDirectory_no_pubspec() async {
-    addNamedSource("/myproj/web/other.dart", "");
-    Source source =
-        addNamedSource("/myproj/lib/test.dart", "import '../web/other.dart';");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-  }
-
-  test_import_valid_inside_lib1() async {
-    addNamedSource("/myproj/pubspec.yaml", "");
-    addNamedSource("/myproj/lib/other.dart", "");
-    Source source =
-        addNamedSource("/myproj/lib/test.dart", "import 'other.dart';");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-  }
-
-  test_import_valid_inside_lib2() async {
-    addNamedSource("/myproj/pubspec.yaml", "");
-    addNamedSource("/myproj/lib/bar/other.dart", "");
-    Source source = addNamedSource(
-        "/myproj/lib/foo/test.dart", "import '../bar/other.dart';");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-  }
-
-  test_import_valid_outside_lib() async {
-    addNamedSource("/myproj/pubspec.yaml", "");
-    addNamedSource("/myproj/web/other.dart", "");
-    Source source =
-        addNamedSource("/myproj/lib2/test.dart", "import '../web/other.dart';");
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-  }
-}
diff --git a/pkg/analyzer/test/generated/non_hint_code_driver_test.dart b/pkg/analyzer/test/generated/non_hint_code_driver_test.dart
deleted file mode 100644
index c7c53cf..0000000
--- a/pkg/analyzer/test/generated/non_hint_code_driver_test.dart
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import 'non_hint_code.dart';
-
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(NonHintCodeTest_Driver);
-  });
-}
-
-@reflectiveTest
-class NonHintCodeTest_Driver extends NonHintCodeTest {
-  @override
-  bool get enableNewAnalysisDriver => true;
-}
diff --git a/pkg/analyzer/test/generated/non_hint_code_test.dart b/pkg/analyzer/test/generated/non_hint_code_test.dart
new file mode 100644
index 0000000..24c5811
--- /dev/null
+++ b/pkg/analyzer/test/generated/non_hint_code_test.dart
@@ -0,0 +1,307 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/source_io.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'resolver_test_case.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NonHintCodeTest);
+  });
+}
+
+@reflectiveTest
+class NonHintCodeTest extends ResolverTestCase {
+  test_async_future_object_without_return() async {
+    Source source = addSource('''
+import 'dart:async';
+Future<Object> f() async {}
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [HintCode.MISSING_RETURN]);
+    verify([source]);
+  }
+
+  test_issue20904BuggyTypePromotionAtIfJoin_1() async {
+    // https://code.google.com/p/dart/issues/detail?id=20904
+    Source source = addSource(r'''
+f(var message, var dynamic_) {
+  if (message is Function) {
+    message = dynamic_;
+  }
+  int s = message;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_issue20904BuggyTypePromotionAtIfJoin_3() async {
+    // https://code.google.com/p/dart/issues/detail?id=20904
+    Source source = addSource(r'''
+f(var message) {
+  var dynamic_;
+  if (message is Function) {
+    message = dynamic_;
+  } else {
+    return;
+  }
+  int s = message;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_issue20904BuggyTypePromotionAtIfJoin_4() async {
+    // https://code.google.com/p/dart/issues/detail?id=20904
+    Source source = addSource(r'''
+f(var message) {
+  if (message is Function) {
+    message = '';
+  } else {
+    return;
+  }
+  String s = message;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_propagatedFieldType() async {
+    Source source = addSource(r'''
+class A { }
+class X<T> {
+  final x = new List<T>();
+}
+class Z {
+  final X<A> y = new X<A>();
+  foo() {
+    y.x.add(new A());
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_proxy_annotation_prefixed() async {
+    Source source = addSource(r'''
+library L;
+@proxy
+class A {}
+f(var a) {
+  a = new A();
+  a.m();
+  var x = a.g;
+  a.s = 1;
+  var y = a + a;
+  a++;
+  ++a;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+  }
+
+  test_proxy_annotation_prefixed2() async {
+    Source source = addSource(r'''
+library L;
+@proxy
+class A {}
+class B {
+  f(var a) {
+    a = new A();
+    a.m();
+    var x = a.g;
+    a.s = 1;
+    var y = a + a;
+    a++;
+    ++a;
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+  }
+
+  test_proxy_annotation_prefixed3() async {
+    Source source = addSource(r'''
+library L;
+class B {
+  f(var a) {
+    a = new A();
+    a.m();
+    var x = a.g;
+    a.s = 1;
+    var y = a + a;
+    a++;
+    ++a;
+  }
+}
+@proxy
+class A {}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+  }
+
+  test_undefinedMethod_assignmentExpression_inSubtype() async {
+    Source source = addSource(r'''
+class A {}
+class B extends A {
+  operator +(B b) {return new B();}
+}
+f(var a, var a2) {
+  a = new A();
+  a2 = new A();
+  a += a2;
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+  }
+
+  test_undefinedMethod_dynamic() async {
+    Source source = addSource(r'''
+class D<T extends dynamic> {
+  fieldAccess(T t) => t.abc;
+  methodAccess(T t) => t.xyz(1, 2, 'three');
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+  }
+
+  test_undefinedMethod_unionType_all() async {
+    Source source = addSource(r'''
+class A {
+  int m(int x) => 0;
+}
+class B {
+  String m() => '0';
+}
+f(A a, B b) {
+  var ab;
+  if (0 < 1) {
+    ab = a;
+  } else {
+    ab = b;
+  }
+  ab.m();
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+  }
+
+  test_undefinedMethod_unionType_some() async {
+    Source source = addSource(r'''
+class A {
+  int m(int x) => 0;
+}
+class B {}
+f(A a, B b) {
+  var ab;
+  if (0 < 1) {
+    ab = a;
+  } else {
+    ab = b;
+  }
+  ab.m(0);
+}''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+  }
+}
+
+class PubSuggestionCodeTest extends ResolverTestCase {
+  // TODO(brianwilkerson) The tests in this class are not being run, and all but
+  //  the first would fail. We should implement these checks and enable the
+  //  tests.
+  test_import_package() async {
+    Source source = addSource("import 'package:somepackage/other.dart';");
+    await computeAnalysisResult(source);
+    assertErrors(source, [CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
+  }
+
+  test_import_packageWithDotDot() async {
+    Source source = addSource("import 'package:somepackage/../other.dart';");
+    await computeAnalysisResult(source);
+    assertErrors(source, [
+      CompileTimeErrorCode.URI_DOES_NOT_EXIST,
+      HintCode.PACKAGE_IMPORT_CONTAINS_DOT_DOT
+    ]);
+  }
+
+  test_import_packageWithLeadingDotDot() async {
+    Source source = addSource("import 'package:../other.dart';");
+    await computeAnalysisResult(source);
+    assertErrors(source, [
+      CompileTimeErrorCode.URI_DOES_NOT_EXIST,
+      HintCode.PACKAGE_IMPORT_CONTAINS_DOT_DOT
+    ]);
+  }
+
+  test_import_referenceIntoLibDirectory() async {
+    addNamedSource("/myproj/pubspec.yaml", "");
+    addNamedSource("/myproj/lib/other.dart", "");
+    Source source =
+        addNamedSource("/myproj/web/test.dart", "import '../lib/other.dart';");
+    await computeAnalysisResult(source);
+    assertErrors(
+        source, [HintCode.FILE_IMPORT_OUTSIDE_LIB_REFERENCES_FILE_INSIDE]);
+  }
+
+  test_import_referenceIntoLibDirectory_no_pubspec() async {
+    addNamedSource("/myproj/lib/other.dart", "");
+    Source source =
+        addNamedSource("/myproj/web/test.dart", "import '../lib/other.dart';");
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+  }
+
+  test_import_referenceOutOfLibDirectory() async {
+    addNamedSource("/myproj/pubspec.yaml", "");
+    addNamedSource("/myproj/web/other.dart", "");
+    Source source =
+        addNamedSource("/myproj/lib/test.dart", "import '../web/other.dart';");
+    await computeAnalysisResult(source);
+    assertErrors(
+        source, [HintCode.FILE_IMPORT_INSIDE_LIB_REFERENCES_FILE_OUTSIDE]);
+  }
+
+  test_import_referenceOutOfLibDirectory_no_pubspec() async {
+    addNamedSource("/myproj/web/other.dart", "");
+    Source source =
+        addNamedSource("/myproj/lib/test.dart", "import '../web/other.dart';");
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+  }
+
+  test_import_valid_inside_lib1() async {
+    addNamedSource("/myproj/pubspec.yaml", "");
+    addNamedSource("/myproj/lib/other.dart", "");
+    Source source =
+        addNamedSource("/myproj/lib/test.dart", "import 'other.dart';");
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+  }
+
+  test_import_valid_inside_lib2() async {
+    addNamedSource("/myproj/pubspec.yaml", "");
+    addNamedSource("/myproj/lib/bar/other.dart", "");
+    Source source = addNamedSource(
+        "/myproj/lib/foo/test.dart", "import '../bar/other.dart';");
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+  }
+
+  test_import_valid_outside_lib() async {
+    addNamedSource("/myproj/pubspec.yaml", "");
+    addNamedSource("/myproj/web/other.dart", "");
+    Source source =
+        addNamedSource("/myproj/lib2/test.dart", "import '../web/other.dart';");
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+  }
+}
diff --git a/pkg/analyzer/test/generated/parser_fasta_listener.dart b/pkg/analyzer/test/generated/parser_fasta_listener.dart
index 7217806..45b0b61 100644
--- a/pkg/analyzer/test/generated/parser_fasta_listener.dart
+++ b/pkg/analyzer/test/generated/parser_fasta_listener.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/generated/parser_fasta_test.dart b/pkg/analyzer/test/generated/parser_fasta_test.dart
index 4809b48..ef81da6 100644
--- a/pkg/analyzer/test/generated/parser_fasta_test.dart
+++ b/pkg/analyzer/test/generated/parser_fasta_test.dart
@@ -7,10 +7,10 @@
 import 'package:analyzer/dart/ast/token.dart' show Token, TokenType;
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/error/listener.dart' show ErrorReporter;
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/ast/token.dart';
 import 'package:analyzer/src/dart/scanner/scanner.dart';
+import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/fasta/ast_builder.dart';
 import 'package:analyzer/src/generated/parser.dart' as analyzer;
 import 'package:analyzer/src/generated/utilities_dart.dart';
@@ -56,43 +56,12 @@
 class ClassMemberParserTest_Fasta extends FastaParserTestCase
     with ClassMemberParserTestMixin {
   void test_parseClassMember_operator_gtgtgt() {
-    final sourceText = 'class C { bool operator >>>(other) => false; }';
-
-    // ---------------------------------------------------
-    // TODO(danrubel): Replace this section with a call to parseCompilationUnit
-    // once '>>>' token support is enabled permanently.
-
-    var source = new StringSource(sourceText, 'parser_test_StringSource.dart');
-    GatheringErrorListener errorListener =
-        new GatheringErrorListener(checkRanges: true);
-
-    // Scan tokens
-    StringScanner scanner = new StringScanner(sourceText, includeComments: true)
-      ..enableGtGtGt = true;
-    Token tokens = scanner.tokenize();
-    expect(scanner.hasErrors, isFalse);
-
-    // Run parser
-    ErrorReporter errorReporter = new ErrorReporter(errorListener, source);
-    fasta.Parser parser = new fasta.Parser(null);
-    parser.enableSetLiterals = IsEnabledByDefault.set_literals;
-    AstBuilder astBuilder = new AstBuilder(errorReporter, source.uri, true);
-    parser.listener = astBuilder;
-    astBuilder.parser = parser;
-    parser.parseUnit(tokens);
-
-    CompilationUnitImpl unit = astBuilder.pop();
-    expect(unit, isNotNull);
-    unit.localDeclarations = astBuilder.localDeclarations;
-    errorListener.assertNoErrors();
-
-    // ---------------------------------------------------
-
+    CompilationUnitImpl unit = parseCompilationUnit(
+        'class C { bool operator >>>(other) => false; }',
+        enableGtGtGt: true);
     ClassDeclaration declaration = unit.declarations[0];
-    ClassMember member = declaration.members[0];
-    expect(member, isNotNull);
-    expect(member, new TypeMatcher<MethodDeclaration>());
-    MethodDeclaration method = member;
+    MethodDeclaration method = declaration.members[0];
+
     expect(method.documentationComment, isNull);
     expect(method.externalKeyword, isNull);
     expect(method.modifierKeyword, isNull);
@@ -104,6 +73,24 @@
     expect(method.parameters, isNotNull);
     expect(method.body, isNotNull);
   }
+
+  void test_parseClassMember_operator_gtgtgteq() {
+    CompilationUnitImpl unit = parseCompilationUnit(
+        'class C { foo(int value) { x >>>= value; } }',
+        enableGtGtGtEq: true);
+    ClassDeclaration declaration = unit.declarations[0];
+    MethodDeclaration method = declaration.members[0];
+    BlockFunctionBody blockFunctionBody = method.body;
+    NodeList<Statement> statements = blockFunctionBody.block.statements;
+    expect(statements, hasLength(1));
+    ExpressionStatement statement = statements[0];
+    AssignmentExpression assignment = statement.expression;
+    SimpleIdentifier leftHandSide = assignment.leftHandSide;
+    expect(leftHandSide.name, 'x');
+    expect(assignment.operator.lexeme, '>>>=');
+    SimpleIdentifier rightHandSide = assignment.rightHandSide;
+    expect(rightHandSide.name, 'value');
+  }
 }
 
 /**
@@ -121,13 +108,12 @@
         errors: errors,
         expectedEndOffset: expectedEndOffset,
         inAsync: inAsync,
-        parseSetLiterals: true,
         parseSpreadCollections: true,
         parseControlFlowCollections: true);
   }
 
   void test_listLiteral_for() {
-    ListLiteral2 list = parseCollectionLiteral(
+    ListLiteral list = parseCollectionLiteral(
       '[1, await for (var x in list) 2]',
       inAsync: true,
     );
@@ -149,7 +135,7 @@
   }
 
   void test_listLiteral_forIf() {
-    ListLiteral2 list = parseCollectionLiteral(
+    ListLiteral list = parseCollectionLiteral(
       '[1, await for (var x in list) if (c) 2]',
       inAsync: true,
     );
@@ -177,7 +163,7 @@
   }
 
   void test_listLiteral_forSpread() {
-    ListLiteral2 list =
+    ListLiteral list =
         parseCollectionLiteral('[1, for (int x = 0; x < 10; ++x) ...[2]]');
     expect(list.elements, hasLength(2));
     IntegerLiteral first = list.elements[0];
@@ -200,7 +186,7 @@
   }
 
   void test_listLiteral_if() {
-    ListLiteral2 list = parseCollectionLiteral('[1, if (true) 2]');
+    ListLiteral list = parseCollectionLiteral('[1, if (true) 2]');
     expect(list.elements, hasLength(2));
     IntegerLiteral first = list.elements[0];
     expect(first.value, 1);
@@ -214,7 +200,7 @@
   }
 
   void test_listLiteral_ifElse() {
-    ListLiteral2 list = parseCollectionLiteral('[1, if (true) 2 else 5]');
+    ListLiteral list = parseCollectionLiteral('[1, if (true) 2 else 5]');
     expect(list.elements, hasLength(2));
     IntegerLiteral first = list.elements[0];
     expect(first.value, 1);
@@ -229,7 +215,7 @@
   }
 
   void test_listLiteral_ifElseFor() {
-    ListLiteral2 list =
+    ListLiteral list =
         parseCollectionLiteral('[1, if (true) 2 else for (a in b) 5]');
     expect(list.elements, hasLength(2));
     IntegerLiteral first = list.elements[0];
@@ -250,7 +236,7 @@
   }
 
   void test_listLiteral_ifElseSpread() {
-    ListLiteral2 list =
+    ListLiteral list =
         parseCollectionLiteral('[1, if (true) ...[2] else ...?[5]]');
     expect(list.elements, hasLength(2));
     IntegerLiteral first = list.elements[0];
@@ -266,7 +252,7 @@
   }
 
   void test_listLiteral_ifFor() {
-    ListLiteral2 list = parseCollectionLiteral('[1, if (true) for (a in b) 2]');
+    ListLiteral list = parseCollectionLiteral('[1, if (true) for (a in b) 2]');
     expect(list.elements, hasLength(2));
     IntegerLiteral first = list.elements[0];
     expect(first.value, 1);
@@ -285,7 +271,7 @@
   }
 
   void test_listLiteral_ifSpread() {
-    ListLiteral2 list = parseCollectionLiteral('[1, if (true) ...[2]]');
+    ListLiteral list = parseCollectionLiteral('[1, if (true) ...[2]]');
     expect(list.elements, hasLength(2));
     IntegerLiteral first = list.elements[0];
     expect(first.value, 1);
@@ -299,38 +285,39 @@
   }
 
   void test_listLiteral_spread() {
-    ListLiteral2 list = parseCollectionLiteral('[1, ...[2]]');
+    ListLiteral list = parseCollectionLiteral('[1, ...[2]]');
     expect(list.elements, hasLength(2));
     IntegerLiteral first = list.elements[0];
     expect(first.value, 1);
 
     SpreadElement element = list.elements[1];
     expect(element.spreadOperator.lexeme, '...');
-    ListLiteral2 spreadExpression = element.expression;
+    ListLiteral spreadExpression = element.expression;
     expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_listLiteral_spreadQ() {
-    ListLiteral2 list = parseCollectionLiteral('[1, ...?[2]]');
+    ListLiteral list = parseCollectionLiteral('[1, ...?[2]]');
     expect(list.elements, hasLength(2));
     IntegerLiteral first = list.elements[0];
     expect(first.value, 1);
 
     SpreadElement element = list.elements[1];
     expect(element.spreadOperator.lexeme, '...?');
-    ListLiteral2 spreadExpression = element.expression;
+    ListLiteral spreadExpression = element.expression;
     expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_mapLiteral_for() {
-    MapLiteral2 map = parseCollectionLiteral('{1:7, await for (y in list) 2:3}',
+    SetOrMapLiteral map = parseCollectionLiteral(
+        '{1:7, await for (y in list) 2:3}',
         inAsync: true);
-    expect(map.entries, hasLength(2));
-    MapLiteralEntry first = map.entries[0];
+    expect(map.elements, hasLength(2));
+    MapLiteralEntry first = map.elements[0];
     IntegerLiteral firstValue = first.value;
     expect(firstValue.value, 7);
 
-    ForElement second = map.entries[1];
+    ForElement second = map.elements[1];
     expect(second.awaitKeyword, isNotNull);
     expect(second.forKeyword.isKeyword, isTrue);
     expect(second.leftParenthesis.lexeme, '(');
@@ -344,15 +331,15 @@
   }
 
   void test_mapLiteral_forIf() {
-    MapLiteral2 map = parseCollectionLiteral(
+    SetOrMapLiteral map = parseCollectionLiteral(
         '{1:7, await for (y in list) if (c) 2:3}',
         inAsync: true);
-    expect(map.entries, hasLength(2));
-    MapLiteralEntry first = map.entries[0];
+    expect(map.elements, hasLength(2));
+    MapLiteralEntry first = map.elements[0];
     IntegerLiteral firstValue = first.value;
     expect(firstValue.value, 7);
 
-    ForElement second = map.entries[1];
+    ForElement second = map.elements[1];
     expect(second.awaitKeyword, isNotNull);
     expect(second.forKeyword.isKeyword, isTrue);
     expect(second.leftParenthesis.lexeme, '(');
@@ -373,14 +360,14 @@
   }
 
   void test_mapLiteral_forSpread() {
-    MapLiteral2 map =
+    SetOrMapLiteral map =
         parseCollectionLiteral('{1:7, for (x = 0; x < 10; ++x) ...{2:3}}');
-    expect(map.entries, hasLength(2));
-    MapLiteralEntry first = map.entries[0];
+    expect(map.elements, hasLength(2));
+    MapLiteralEntry first = map.elements[0];
     IntegerLiteral firstValue = first.value;
     expect(firstValue.value, 7);
 
-    ForElement second = map.entries[1];
+    ForElement second = map.elements[1];
     expect(second.awaitKeyword, isNull);
     expect(second.forKeyword.isKeyword, isTrue);
     expect(second.leftParenthesis.lexeme, '(');
@@ -398,13 +385,13 @@
   }
 
   void test_mapLiteral_if() {
-    MapLiteral2 map = parseCollectionLiteral('{1:1, if (true) 2:4}');
-    expect(map.entries, hasLength(2));
-    MapLiteralEntry first = map.entries[0];
+    SetOrMapLiteral map = parseCollectionLiteral('{1:1, if (true) 2:4}');
+    expect(map.elements, hasLength(2));
+    MapLiteralEntry first = map.elements[0];
     IntegerLiteral firstValue = first.value;
     expect(firstValue.value, 1);
 
-    IfElement second = map.entries[1];
+    IfElement second = map.elements[1];
     BooleanLiteral condition = second.condition;
     expect(condition.value, isTrue);
     MapLiteralEntry thenElement = second.thenElement;
@@ -414,13 +401,14 @@
   }
 
   void test_mapLiteral_ifElse() {
-    MapLiteral2 map = parseCollectionLiteral('{1:1, if (true) 2:4 else 5:6}');
-    expect(map.entries, hasLength(2));
-    MapLiteralEntry first = map.entries[0];
+    SetOrMapLiteral map =
+        parseCollectionLiteral('{1:1, if (true) 2:4 else 5:6}');
+    expect(map.elements, hasLength(2));
+    MapLiteralEntry first = map.elements[0];
     IntegerLiteral firstValue = first.value;
     expect(firstValue.value, 1);
 
-    IfElement second = map.entries[1];
+    IfElement second = map.elements[1];
     BooleanLiteral condition = second.condition;
     expect(condition.value, isTrue);
     MapLiteralEntry thenElement = second.thenElement;
@@ -432,14 +420,14 @@
   }
 
   void test_mapLiteral_ifElseFor() {
-    MapLiteral2 map =
+    SetOrMapLiteral map =
         parseCollectionLiteral('{1:1, if (true) 2:4 else for (c in d) 5:6}');
-    expect(map.entries, hasLength(2));
-    MapLiteralEntry first = map.entries[0];
+    expect(map.elements, hasLength(2));
+    MapLiteralEntry first = map.elements[0];
     IntegerLiteral firstValue = first.value;
     expect(firstValue.value, 1);
 
-    IfElement second = map.entries[1];
+    IfElement second = map.elements[1];
     BooleanLiteral condition = second.condition;
     expect(condition.value, isTrue);
     MapLiteralEntry thenElement = second.thenElement;
@@ -456,36 +444,36 @@
   }
 
   void test_mapLiteral_ifElseSpread() {
-    MapLiteral2 map =
+    SetOrMapLiteral map =
         parseCollectionLiteral('{1:7, if (true) ...{2:4} else ...?{5:6}}');
-    expect(map.entries, hasLength(2));
-    MapLiteralEntry first = map.entries[0];
+    expect(map.elements, hasLength(2));
+    MapLiteralEntry first = map.elements[0];
     IntegerLiteral firstValue = first.value;
     expect(firstValue.value, 7);
 
-    IfElement second = map.entries[1];
+    IfElement second = map.elements[1];
     BooleanLiteral condition = second.condition;
     expect(condition.value, isTrue);
     SpreadElement thenElement = second.thenElement;
     expect(thenElement.spreadOperator.lexeme, '...');
     SpreadElement elseElement = second.elseElement;
     expect(elseElement.spreadOperator.lexeme, '...?');
-    MapLiteral2 elseElementExpression = elseElement.expression;
-    expect(elseElementExpression.entries, hasLength(1));
-    MapLiteralEntry entry = elseElementExpression.entries[0];
+    SetOrMapLiteral elseElementExpression = elseElement.expression;
+    expect(elseElementExpression.elements, hasLength(1));
+    MapLiteralEntry entry = elseElementExpression.elements[0];
     IntegerLiteral entryValue = entry.value;
     expect(entryValue.value, 6);
   }
 
   void test_mapLiteral_ifFor() {
-    MapLiteral2 map =
+    SetOrMapLiteral map =
         parseCollectionLiteral('{1:1, if (true) for (a in b) 2:4}');
-    expect(map.entries, hasLength(2));
-    MapLiteralEntry first = map.entries[0];
+    expect(map.elements, hasLength(2));
+    MapLiteralEntry first = map.elements[0];
     IntegerLiteral firstValue = first.value;
     expect(firstValue.value, 1);
 
-    IfElement second = map.entries[1];
+    IfElement second = map.elements[1];
     BooleanLiteral condition = second.condition;
     expect(condition.value, isTrue);
 
@@ -500,13 +488,13 @@
   }
 
   void test_mapLiteral_ifSpread() {
-    MapLiteral2 map = parseCollectionLiteral('{1:1, if (true) ...{2:4}}');
-    expect(map.entries, hasLength(2));
-    MapLiteralEntry first = map.entries[0];
+    SetOrMapLiteral map = parseCollectionLiteral('{1:1, if (true) ...{2:4}}');
+    expect(map.elements, hasLength(2));
+    MapLiteralEntry first = map.elements[0];
     IntegerLiteral firstValue = first.value;
     expect(firstValue.value, 1);
 
-    IfElement second = map.entries[1];
+    IfElement second = map.elements[1];
     BooleanLiteral condition = second.condition;
     expect(condition.value, isTrue);
     SpreadElement thenElement = second.thenElement;
@@ -515,79 +503,80 @@
   }
 
   void test_mapLiteral_spread() {
-    MapLiteral2 map = parseCollectionLiteral('{1: 2, ...{3: 4}}');
+    SetOrMapLiteral map = parseCollectionLiteral('{1: 2, ...{3: 4}}');
     expect(map.constKeyword, isNull);
     expect(map.typeArguments, isNull);
-    expect(map.entries, hasLength(2));
+    expect(map.elements, hasLength(2));
 
-    SpreadElement element = map.entries[1];
+    SpreadElement element = map.elements[1];
     expect(element.spreadOperator.lexeme, '...');
-    MapLiteral2 spreadExpression = element.expression;
-    expect(spreadExpression.entries, hasLength(1));
+    SetOrMapLiteral spreadExpression = element.expression;
+    expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_mapLiteral_spread2_typed() {
-    MapLiteral2 map = parseCollectionLiteral('<int, int>{1: 2, ...{3: 4}}');
+    SetOrMapLiteral map = parseCollectionLiteral('<int, int>{1: 2, ...{3: 4}}');
     expect(map.constKeyword, isNull);
     expect(map.typeArguments.arguments, hasLength(2));
-    expect(map.entries, hasLength(2));
+    expect(map.elements, hasLength(2));
 
-    SpreadElement element = map.entries[1];
+    SpreadElement element = map.elements[1];
     expect(element.spreadOperator.lexeme, '...');
-    MapLiteral2 spreadExpression = element.expression;
-    expect(spreadExpression.entries, hasLength(1));
+    SetOrMapLiteral spreadExpression = element.expression;
+    expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_mapLiteral_spread_typed() {
-    MapLiteral2 map = parseCollectionLiteral('<int, int>{...{3: 4}}');
+    SetOrMapLiteral map = parseCollectionLiteral('<int, int>{...{3: 4}}');
     expect(map.constKeyword, isNull);
     expect(map.typeArguments.arguments, hasLength(2));
-    expect(map.entries, hasLength(1));
+    expect(map.elements, hasLength(1));
 
-    SpreadElement element = map.entries[0];
+    SpreadElement element = map.elements[0];
     expect(element.spreadOperator.lexeme, '...');
-    MapLiteral2 spreadExpression = element.expression;
-    expect(spreadExpression.entries, hasLength(1));
+    SetOrMapLiteral spreadExpression = element.expression;
+    expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_mapLiteral_spreadQ() {
-    MapLiteral2 map = parseCollectionLiteral('{1: 2, ...?{3: 4}}');
+    SetOrMapLiteral map = parseCollectionLiteral('{1: 2, ...?{3: 4}}');
     expect(map.constKeyword, isNull);
     expect(map.typeArguments, isNull);
-    expect(map.entries, hasLength(2));
+    expect(map.elements, hasLength(2));
 
-    SpreadElement element = map.entries[1];
+    SpreadElement element = map.elements[1];
     expect(element.spreadOperator.lexeme, '...?');
-    MapLiteral2 spreadExpression = element.expression;
-    expect(spreadExpression.entries, hasLength(1));
+    SetOrMapLiteral spreadExpression = element.expression;
+    expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_mapLiteral_spreadQ2_typed() {
-    MapLiteral2 map = parseCollectionLiteral('<int, int>{1: 2, ...?{3: 4}}');
+    SetOrMapLiteral map =
+        parseCollectionLiteral('<int, int>{1: 2, ...?{3: 4}}');
     expect(map.constKeyword, isNull);
     expect(map.typeArguments.arguments, hasLength(2));
-    expect(map.entries, hasLength(2));
+    expect(map.elements, hasLength(2));
 
-    SpreadElement element = map.entries[1];
+    SpreadElement element = map.elements[1];
     expect(element.spreadOperator.lexeme, '...?');
-    MapLiteral2 spreadExpression = element.expression;
-    expect(spreadExpression.entries, hasLength(1));
+    SetOrMapLiteral spreadExpression = element.expression;
+    expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_mapLiteral_spreadQ_typed() {
-    MapLiteral2 map = parseCollectionLiteral('<int, int>{...?{3: 4}}');
+    SetOrMapLiteral map = parseCollectionLiteral('<int, int>{...?{3: 4}}');
     expect(map.constKeyword, isNull);
     expect(map.typeArguments.arguments, hasLength(2));
-    expect(map.entries, hasLength(1));
+    expect(map.elements, hasLength(1));
 
-    SpreadElement element = map.entries[0];
+    SpreadElement element = map.elements[0];
     expect(element.spreadOperator.lexeme, '...?');
-    MapLiteral2 spreadExpression = element.expression;
-    expect(spreadExpression.entries, hasLength(1));
+    SetOrMapLiteral spreadExpression = element.expression;
+    expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_setLiteral_if() {
-    SetLiteral2 setLiteral = parseCollectionLiteral('{1, if (true) 2}');
+    SetOrMapLiteral setLiteral = parseCollectionLiteral('{1, if (true) 2}');
     expect(setLiteral.elements, hasLength(2));
     IntegerLiteral first = setLiteral.elements[0];
     expect(first.value, 1);
@@ -601,7 +590,8 @@
   }
 
   void test_setLiteral_ifElse() {
-    SetLiteral2 setLiteral = parseCollectionLiteral('{1, if (true) 2 else 5}');
+    SetOrMapLiteral setLiteral =
+        parseCollectionLiteral('{1, if (true) 2 else 5}');
     expect(setLiteral.elements, hasLength(2));
     IntegerLiteral first = setLiteral.elements[0];
     expect(first.value, 1);
@@ -616,7 +606,7 @@
   }
 
   void test_setLiteral_ifElseSpread() {
-    SetLiteral2 setLiteral =
+    SetOrMapLiteral setLiteral =
         parseCollectionLiteral('{1, if (true) ...{2} else ...?[5]}');
     expect(setLiteral.elements, hasLength(2));
     IntegerLiteral first = setLiteral.elements[0];
@@ -627,16 +617,17 @@
     expect(condition.value, isTrue);
     SpreadElement thenElement = second.thenElement;
     expect(thenElement.spreadOperator.lexeme, '...');
-    SetLiteral2 theExpression = thenElement.expression;
+    SetOrMapLiteral theExpression = thenElement.expression;
     expect(theExpression.elements, hasLength(1));
     SpreadElement elseElement = second.elseElement;
     expect(elseElement.spreadOperator.lexeme, '...?');
-    ListLiteral2 elseExpression = elseElement.expression;
+    ListLiteral elseExpression = elseElement.expression;
     expect(elseExpression.elements, hasLength(1));
   }
 
   void test_setLiteral_ifSpread() {
-    SetLiteral2 setLiteral = parseCollectionLiteral('{1, if (true) ...[2]}');
+    SetOrMapLiteral setLiteral =
+        parseCollectionLiteral('{1, if (true) ...[2]}');
     expect(setLiteral.elements, hasLength(2));
     IntegerLiteral first = setLiteral.elements[0];
     expect(first.value, 1);
@@ -650,7 +641,7 @@
   }
 
   void test_setLiteral_spread2() {
-    SetLiteral2 set = parseCollectionLiteral('{3, ...[4]}');
+    SetOrMapLiteral set = parseCollectionLiteral('{3, ...[4]}');
     expect(set.constKeyword, isNull);
     expect(set.typeArguments, isNull);
     expect(set.elements, hasLength(2));
@@ -659,12 +650,12 @@
 
     SpreadElement element = set.elements[1];
     expect(element.spreadOperator.lexeme, '...');
-    ListLiteral2 spreadExpression = element.expression;
+    ListLiteral spreadExpression = element.expression;
     expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_setLiteral_spread2Q() {
-    SetLiteral2 set = parseCollectionLiteral('{3, ...?[4]}');
+    SetOrMapLiteral set = parseCollectionLiteral('{3, ...?[4]}');
     expect(set.constKeyword, isNull);
     expect(set.typeArguments, isNull);
     expect(set.elements, hasLength(2));
@@ -673,56 +664,56 @@
 
     SpreadElement element = set.elements[1];
     expect(element.spreadOperator.lexeme, '...?');
-    ListLiteral2 spreadExpression = element.expression;
+    ListLiteral spreadExpression = element.expression;
     expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_setLiteral_spread_typed() {
-    SetLiteral2 set = parseCollectionLiteral('<int>{...[3]}');
+    SetOrMapLiteral set = parseCollectionLiteral('<int>{...[3]}');
     expect(set.constKeyword, isNull);
     expect(set.typeArguments, isNotNull);
     expect(set.elements, hasLength(1));
 
     SpreadElement element = set.elements[0];
     expect(element.spreadOperator.lexeme, '...');
-    ListLiteral2 spreadExpression = element.expression;
+    ListLiteral spreadExpression = element.expression;
     expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_setLiteral_spreadQ_typed() {
-    SetLiteral2 set = parseCollectionLiteral('<int>{...?[3]}');
+    SetOrMapLiteral set = parseCollectionLiteral('<int>{...?[3]}');
     expect(set.constKeyword, isNull);
     expect(set.typeArguments, isNotNull);
     expect(set.elements, hasLength(1));
 
     SpreadElement element = set.elements[0];
     expect(element.spreadOperator.lexeme, '...?');
-    ListLiteral2 spreadExpression = element.expression;
+    ListLiteral spreadExpression = element.expression;
     expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_setOrMapLiteral_spread() {
-    MapLiteral2 map = parseCollectionLiteral('{...{3: 4}}');
+    SetOrMapLiteral map = parseCollectionLiteral('{...{3: 4}}');
     expect(map.constKeyword, isNull);
     expect(map.typeArguments, isNull);
-    expect(map.entries, hasLength(1));
+    expect(map.elements, hasLength(1));
 
-    SpreadElement element = map.entries[0];
+    SpreadElement element = map.elements[0];
     expect(element.spreadOperator.lexeme, '...');
-    MapLiteral2 spreadExpression = element.expression;
-    expect(spreadExpression.entries, hasLength(1));
+    SetOrMapLiteral spreadExpression = element.expression;
+    expect(spreadExpression.elements, hasLength(1));
   }
 
   void test_setOrMapLiteral_spreadQ() {
-    MapLiteral2 map = parseCollectionLiteral('{...?{3: 4}}');
+    SetOrMapLiteral map = parseCollectionLiteral('{...?{3: 4}}');
     expect(map.constKeyword, isNull);
     expect(map.typeArguments, isNull);
-    expect(map.entries, hasLength(1));
+    expect(map.elements, hasLength(1));
 
-    SpreadElement element = map.entries[0];
+    SpreadElement element = map.elements[0];
     expect(element.spreadOperator.lexeme, '...?');
-    MapLiteral2 spreadExpression = element.expression;
-    expect(spreadExpression.entries, hasLength(1));
+    SetOrMapLiteral spreadExpression = element.expression;
+    expect(spreadExpression.elements, hasLength(1));
   }
 }
 
@@ -743,7 +734,7 @@
     Expression elseExpression = expression.elseExpression;
     expect(elseExpression, isSimpleIdentifier);
     assertErrors(
-        errors: [expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 9, 1)]);
+        errors: [expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 9, 1)]);
   }
 
   void test_conditionalExpression_precedence_nullableType_as3() {
@@ -759,7 +750,7 @@
     Expression elseExpression = expression.elseExpression;
     expect(elseExpression, isSimpleIdentifier);
     assertErrors(
-        errors: [expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 10, 1)]);
+        errors: [expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 10, 1)]);
   }
 
   void test_conditionalExpression_precedence_nullableType_is2() {
@@ -774,7 +765,7 @@
     Expression elseExpression = expression.elseExpression;
     expect(elseExpression, isSimpleIdentifier);
     assertErrors(
-        errors: [expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 11, 1)]);
+        errors: [expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 11, 1)]);
   }
 
   void test_conditionalExpression_precedence_nullableType_is3() {
@@ -790,7 +781,7 @@
     Expression elseExpression = expression.elseExpression;
     expect(elseExpression, isSimpleIdentifier);
     assertErrors(
-        errors: [expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 12, 1)]);
+        errors: [expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 12, 1)]);
   }
 }
 
@@ -800,6 +791,79 @@
 @reflectiveTest
 class ErrorParserTest_Fasta extends FastaParserTestCase
     with ErrorParserTestMixin {
+  void test_await_missing_async2_issue36048() {
+    parseCompilationUnit('''
+main() { // missing async
+  await foo.bar();
+}
+''', errors: [
+      expectedError(CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT, 28, 5)
+    ]);
+  }
+
+  void test_await_missing_async3_issue36048() {
+    parseCompilationUnit('''
+main() { // missing async
+  (await foo);
+}
+''', errors: [
+      expectedError(CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT, 29, 5)
+    ]);
+  }
+
+  void test_await_missing_async4_issue36048() {
+    parseCompilationUnit('''
+main() { // missing async
+  [await foo];
+}
+''', errors: [
+      expectedError(CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT, 29, 5)
+    ]);
+  }
+
+  void test_await_missing_async_issue36048() {
+    parseCompilationUnit('''
+main() { // missing async
+  await foo();
+}
+''', errors: [
+      expectedError(CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT, 28, 5)
+    ]);
+  }
+
+  void test_constructor_super_field() {
+    // https://github.com/dart-lang/sdk/issues/36262
+    // https://github.com/dart-lang/sdk/issues/31198
+    parseCompilationUnit('class B extends A { B(): super().foo {} }', errors: [
+      expectedError(ParserErrorCode.INVALID_SUPER_IN_INITIALIZER, 25, 5),
+    ]);
+  }
+
+  void test_constructor_super_method() {
+    // https://github.com/dart-lang/sdk/issues/36262
+    // https://github.com/dart-lang/sdk/issues/31198
+    parseCompilationUnit('class B extends A { B(): super().foo() {} }',
+        errors: [
+          expectedError(ParserErrorCode.INVALID_SUPER_IN_INITIALIZER, 25, 5),
+        ]);
+  }
+
+  void test_constructor_this_field() {
+    // https://github.com/dart-lang/sdk/issues/36262
+    // https://github.com/dart-lang/sdk/issues/31198
+    parseCompilationUnit('class B extends A { B(): this().foo; }', errors: [
+      expectedError(ParserErrorCode.INVALID_THIS_IN_INITIALIZER, 25, 4),
+    ]);
+  }
+
+  void test_constructor_this_method() {
+    // https://github.com/dart-lang/sdk/issues/36262
+    // https://github.com/dart-lang/sdk/issues/31198
+    parseCompilationUnit('class B extends A { B(): this().foo(); }', errors: [
+      expectedError(ParserErrorCode.INVALID_THIS_IN_INITIALIZER, 25, 4),
+    ]);
+  }
+
   @override
   void test_expectedListOrMapLiteral() {
     // The fasta parser returns an 'IntegerLiteralImpl' when parsing '1'.
@@ -814,6 +878,11 @@
     //super.test_expectedStringLiteral();
   }
 
+  void test_factory_issue_36400() {
+    parseCompilationUnit('class T { T factory T() { return null; } }',
+        errors: [expectedError(ParserErrorCode.TYPE_BEFORE_FACTORY, 10, 1)]);
+  }
+
   void test_getterNativeWithBody() {
     createParser('String get m native "str" => 0;');
     parser.parseClassMember('C') as MethodDeclaration;
@@ -864,36 +933,47 @@
 @reflectiveTest
 class ExpressionParserTest_Fasta extends FastaParserTestCase
     with ExpressionParserTestMixin {
+  void test_binaryExpression_allOperators() {
+    // https://github.com/dart-lang/sdk/issues/36255
+    for (TokenType type in TokenType.all) {
+      if (type.precedence > 0) {
+        var source = 'a ${type.lexeme} b';
+        try {
+          parseExpression(source);
+        } on TestFailure {
+          // Ensure that there are no infinite loops or exceptions thrown
+          // by the parser. Test failures are fine.
+        }
+      }
+    }
+  }
+
   void test_listLiteral_spread() {
     // TODO(danrubel): Remove this once spread_collections is enabled by default
     ListLiteral list = parseExpression('[1, ...[2]]', errors: [
-      expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 4, 3),
+      expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 4, 3),
     ]);
-    expect(list.elements, hasLength(2));
+    expect(list.elements, hasLength(1));
     IntegerLiteral first = list.elements[0];
     expect(first.value, 1);
-    ListLiteral second = list.elements[1];
-    expect(second.elements, hasLength(1));
   }
 
   void test_listLiteral_spreadQ() {
     // TODO(danrubel): Remove this once spread_collections is enabled by default
     ListLiteral list = parseExpression('[1, ...?[2]]', errors: [
-      expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 4, 4),
+      expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 4, 4),
     ]);
-    expect(list.elements, hasLength(2));
+    expect(list.elements, hasLength(1));
     IntegerLiteral first = list.elements[0];
     expect(first.value, 1);
-    ListLiteral second = list.elements[1];
-    expect(second.elements, hasLength(1));
   }
 
   void test_mapLiteral() {
-    MapLiteral map = parseExpression('{3: 6}', parseSetLiterals: true);
+    SetOrMapLiteral map = parseExpression('{3: 6}');
     expect(map.constKeyword, isNull);
     expect(map.typeArguments, isNull);
-    expect(map.entries, hasLength(1));
-    MapLiteralEntry entry = map.entries[0];
+    expect(map.elements, hasLength(1));
+    MapLiteralEntry entry = map.elements[0];
     IntegerLiteral key = entry.key;
     expect(key.value, 3);
     IntegerLiteral value = entry.value;
@@ -901,11 +981,11 @@
   }
 
   void test_mapLiteral_const() {
-    MapLiteral map = parseExpression('const {3: 6}', parseSetLiterals: true);
+    SetOrMapLiteral map = parseExpression('const {3: 6}');
     expect(map.constKeyword, isNotNull);
     expect(map.typeArguments, isNull);
-    expect(map.entries, hasLength(1));
-    MapLiteralEntry entry = map.entries[0];
+    expect(map.elements, hasLength(1));
+    MapLiteralEntry entry = map.elements[0];
     IntegerLiteral key = entry.key;
     expect(key.value, 3);
     IntegerLiteral value = entry.value;
@@ -913,20 +993,18 @@
   }
 
   void test_mapLiteral_invalid_set_entry() {
-    MapLiteral map =
-        parseExpression('<int, int>{1}', parseSetLiterals: true, errors: [
+    SetOrMapLiteral map = parseExpression('<int, int>{1}', errors: [
       expectedError(ParserErrorCode.EXPECTED_TOKEN, 12, 1),
       expectedError(ParserErrorCode.MISSING_IDENTIFIER, 12, 1),
     ]);
     expect(map.constKeyword, isNull);
     expect(map.typeArguments.arguments, hasLength(2));
-    expect(map.entries, hasLength(1));
+    expect(map.elements, hasLength(1));
   }
 
   @failingTest
   void test_mapLiteral_invalid_too_many_type_arguments1() {
-    MapLiteral map =
-        parseExpression('<int, int, int>{}', parseSetLiterals: true, errors: [
+    SetOrMapLiteral map = parseExpression('<int, int, int>{}', errors: [
       // TODO(danrubel): Currently the resolver reports invalid number of
       // type arguments, but the parser could report this.
       expectedError(
@@ -936,13 +1014,12 @@
           3),
     ]);
     expect(map.constKeyword, isNull);
-    expect(map.entries, hasLength(0));
+    expect(map.elements, hasLength(0));
   }
 
   @failingTest
   void test_mapLiteral_invalid_too_many_type_arguments2() {
-    MapLiteral map =
-        parseExpression('<int, int, int>{1}', parseSetLiterals: true, errors: [
+    SetOrMapLiteral map = parseExpression('<int, int, int>{1}', errors: [
       // TODO(danrubel): Currently the resolver reports invalid number of
       // type arguments, but the parser could report this.
       expectedError(
@@ -952,67 +1029,69 @@
           3),
     ]);
     expect(map.constKeyword, isNull);
-    expect(map.entries, hasLength(0));
+    expect(map.elements, hasLength(0));
   }
 
   void test_mapLiteral_spread() {
     // TODO(danrubel): Remove this once spread_collections is enabled by default
-    MapLiteral map = parseExpression('{1: 2, ...{3: 4}}',
-        parseSetLiterals: true,
-        errors: [expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 7, 3)]);
+    SetOrMapLiteral map = parseExpression('{1: 2, ...{3: 4}}', errors: [
+      expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 7, 3),
+    ]);
     expect(map.constKeyword, isNull);
     expect(map.typeArguments, isNull);
-    expect(map.entries, hasLength(1));
+    expect(map.elements, hasLength(1));
   }
 
   void test_mapLiteral_spread2_typed() {
     // TODO(danrubel): Remove this once spread_collections is enabled by default
-    MapLiteral map = parseExpression('<int, int>{1: 2, ...{3: 4}}',
-        parseSetLiterals: true,
-        errors: [expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 17, 3)]);
+    SetOrMapLiteral map =
+        parseExpression('<int, int>{1: 2, ...{3: 4}}', errors: [
+      expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 17, 3),
+    ]);
     expect(map.constKeyword, isNull);
     expect(map.typeArguments.arguments, hasLength(2));
-    expect(map.entries, hasLength(1));
+    expect(map.elements, hasLength(1));
   }
 
   void test_mapLiteral_spread_typed() {
     // TODO(danrubel): Remove this once spread_collections is enabled by default
-    MapLiteral map = parseExpression('<int, int>{...{3: 4}}',
-        parseSetLiterals: true,
-        errors: [expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 11, 3)]);
+    SetOrMapLiteral map = parseExpression('<int, int>{...{3: 4}}', errors: [
+      expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 11, 3),
+    ]);
     expect(map.constKeyword, isNull);
     expect(map.typeArguments.arguments, hasLength(2));
-    expect(map.entries, hasLength(0));
+    expect(map.elements, hasLength(0));
   }
 
   void test_mapLiteral_spreadQ() {
     // TODO(danrubel): Remove this once spread_collections is enabled by default
-    MapLiteral map = parseExpression('{1: 2, ...?{3: 4}}',
-        parseSetLiterals: true,
-        errors: [expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 7, 4)]);
+    SetOrMapLiteral map = parseExpression('{1: 2, ...?{3: 4}}', errors: [
+      expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 7, 4),
+    ]);
     expect(map.constKeyword, isNull);
     expect(map.typeArguments, isNull);
-    expect(map.entries, hasLength(1));
+    expect(map.elements, hasLength(1));
   }
 
   void test_mapLiteral_spreadQ2_typed() {
     // TODO(danrubel): Remove this once spread_collections is enabled by default
-    MapLiteral map = parseExpression('<int, int>{1: 2, ...?{3: 4}}',
-        parseSetLiterals: true,
-        errors: [expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 17, 4)]);
+    SetOrMapLiteral map =
+        parseExpression('<int, int>{1: 2, ...?{3: 4}}', errors: [
+      expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 17, 4),
+    ]);
     expect(map.constKeyword, isNull);
     expect(map.typeArguments.arguments, hasLength(2));
-    expect(map.entries, hasLength(1));
+    expect(map.elements, hasLength(1));
   }
 
   void test_mapLiteral_spreadQ_typed() {
     // TODO(danrubel): Remove this once spread_collections is enabled by default
-    MapLiteral map = parseExpression('<int, int>{...?{3: 4}}',
-        parseSetLiterals: true,
-        errors: [expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 11, 4)]);
+    SetOrMapLiteral map = parseExpression('<int, int>{...?{3: 4}}', errors: [
+      expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 11, 4),
+    ]);
     expect(map.constKeyword, isNull);
     expect(map.typeArguments.arguments, hasLength(2));
-    expect(map.entries, hasLength(0));
+    expect(map.elements, hasLength(0));
   }
 
   @override
@@ -1034,7 +1113,7 @@
   }
 
   void test_setLiteral() {
-    SetLiteral set = parseExpression('{3}', parseSetLiterals: true);
+    SetOrMapLiteral set = parseExpression('{3}');
     expect(set.constKeyword, isNull);
     expect(set.typeArguments, isNull);
     expect(set.elements, hasLength(1));
@@ -1043,7 +1122,7 @@
   }
 
   void test_setLiteral_const() {
-    SetLiteral set = parseExpression('const {3, 6}', parseSetLiterals: true);
+    SetOrMapLiteral set = parseExpression('const {3, 6}');
     expect(set.constKeyword, isNotNull);
     expect(set.typeArguments, isNull);
     expect(set.elements, hasLength(2));
@@ -1054,7 +1133,7 @@
   }
 
   void test_setLiteral_const_typed() {
-    SetLiteral set = parseExpression('const <int>{3}', parseSetLiterals: true);
+    SetOrMapLiteral set = parseExpression('const <int>{3}');
     expect(set.constKeyword, isNotNull);
     expect(set.typeArguments.arguments, hasLength(1));
     NamedType typeArg = set.typeArguments.arguments[0];
@@ -1065,9 +1144,8 @@
   }
 
   void test_setLiteral_invalid_map_entry() {
-    SetLiteral set =
-        parseExpression('<int>{1: 1}', parseSetLiterals: true, errors: [
-      expectedError(ParserErrorCode.EXPECTED_TOKEN, 7, 1),
+    SetOrMapLiteral set = parseExpression('<int>{1: 1}', errors: [
+      expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 7, 1),
     ]);
     expect(set.constKeyword, isNull);
     expect(set.typeArguments.arguments, hasLength(1));
@@ -1077,7 +1155,7 @@
   }
 
   void test_setLiteral_nested_typeArgument() {
-    SetLiteral set = parseExpression('<Set<int>>{{3}}', parseSetLiterals: true);
+    SetOrMapLiteral set = parseExpression('<Set<int>>{{3}}');
     expect(set.constKeyword, isNull);
     expect(set.typeArguments.arguments, hasLength(1));
     NamedType typeArg1 = set.typeArguments.arguments[0];
@@ -1086,7 +1164,7 @@
     NamedType typeArg2 = typeArg1.typeArguments.arguments[0];
     expect(typeArg2.name.name, 'int');
     expect(set.elements.length, 1);
-    SetLiteral intSet = set.elements[0];
+    SetOrMapLiteral intSet = set.elements[0];
     expect(intSet.elements, hasLength(1));
     IntegerLiteral value = intSet.elements[0];
     expect(value.value, 3);
@@ -1094,58 +1172,46 @@
 
   void test_setLiteral_spread2() {
     // TODO(danrubel): Remove this once spread_collections is enabled by default
-    SetLiteral set = parseExpression('{3, ...[4]}',
-        parseSetLiterals: true,
-        errors: [expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 4, 3)]);
+    SetOrMapLiteral set = parseExpression('{3, ...[4]}',
+        errors: [expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 4, 3)]);
     expect(set.constKeyword, isNull);
     expect(set.typeArguments, isNull);
-    expect(set.elements, hasLength(2));
+    expect(set.elements, hasLength(1));
     IntegerLiteral value = set.elements[0];
     expect(value.value, 3);
-    ListLiteral list = set.elements[1];
-    expect(list.elements, hasLength(1));
   }
 
   void test_setLiteral_spread2Q() {
     // TODO(danrubel): Remove this once spread_collections is enabled by default
-    SetLiteral set = parseExpression('{3, ...?[4]}',
-        parseSetLiterals: true,
-        errors: [expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 4, 4)]);
+    SetOrMapLiteral set = parseExpression('{3, ...?[4]}',
+        errors: [expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 4, 4)]);
     expect(set.constKeyword, isNull);
     expect(set.typeArguments, isNull);
-    expect(set.elements, hasLength(2));
+    expect(set.elements, hasLength(1));
     IntegerLiteral value = set.elements[0];
     expect(value.value, 3);
-    ListLiteral list = set.elements[1];
-    expect(list.elements, hasLength(1));
   }
 
   void test_setLiteral_spread_typed() {
     // TODO(danrubel): Remove this once spread_collections is enabled by default
-    SetLiteral set = parseExpression('<int>{...[3]}',
-        parseSetLiterals: true,
-        errors: [expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 6, 3)]);
+    SetOrMapLiteral set = parseExpression('<int>{...[3]}',
+        errors: [expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 6, 3)]);
     expect(set.constKeyword, isNull);
     expect(set.typeArguments, isNotNull);
-    expect(set.elements, hasLength(1));
-    ListLiteral list = set.elements[0];
-    expect(list.elements, hasLength(1));
+    expect(set.elements, hasLength(0));
   }
 
   void test_setLiteral_spreadQ_typed() {
     // TODO(danrubel): Remove this once spread_collections is enabled by default
-    SetLiteral set = parseExpression('<int>{...?[3]}',
-        parseSetLiterals: true,
-        errors: [expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 6, 4)]);
+    SetOrMapLiteral set = parseExpression('<int>{...?[3]}',
+        errors: [expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 6, 4)]);
     expect(set.constKeyword, isNull);
     expect(set.typeArguments, isNotNull);
-    expect(set.elements, hasLength(1));
-    ListLiteral list = set.elements[0];
-    expect(list.elements, hasLength(1));
+    expect(set.elements, hasLength(0));
   }
 
   void test_setLiteral_typed() {
-    SetLiteral set = parseExpression('<int>{3}', parseSetLiterals: true);
+    SetOrMapLiteral set = parseExpression('<int>{3}');
     expect(set.constKeyword, isNull);
     expect(set.typeArguments.arguments, hasLength(1));
     NamedType typeArg = set.typeArguments.arguments[0];
@@ -1157,22 +1223,20 @@
 
   void test_setOrMapLiteral_spread() {
     // TODO(danrubel): Remove this once spread_collections is enabled by default
-    MapLiteral set = parseExpression('{...{3: 4}}',
-        parseSetLiterals: true,
-        errors: [expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 1, 3)]);
-    expect(set.constKeyword, isNull);
-    expect(set.typeArguments, isNull);
-    expect(set.entries, hasLength(0));
+    SetOrMapLiteral map = parseExpression('{...{3: 4}}',
+        errors: [expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 1, 3)]);
+    expect(map.constKeyword, isNull);
+    expect(map.typeArguments, isNull);
+    expect(map.elements, hasLength(0));
   }
 
   void test_setOrMapLiteral_spreadQ() {
     // TODO(danrubel): Remove this once spread_collections is enabled by default
-    MapLiteral set = parseExpression('{...?{3: 4}}',
-        parseSetLiterals: true,
-        errors: [expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 1, 4)]);
-    expect(set.constKeyword, isNull);
-    expect(set.typeArguments, isNull);
-    expect(set.entries, hasLength(0));
+    SetOrMapLiteral map = parseExpression('{...?{3: 4}}',
+        errors: [expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 1, 4)]);
+    expect(map.constKeyword, isNull);
+    expect(map.typeArguments, isNull);
+    expect(map.elements, hasLength(0));
   }
 }
 
@@ -1333,11 +1397,18 @@
 
   @override
   CompilationUnit parseCompilationUnit(String content,
-      {List<ErrorCode> codes, List<ExpectedError> errors}) {
+      {List<ErrorCode> codes,
+      List<ExpectedError> errors,
+      bool enableControlFlowCollections,
+      bool enableGtGtGt,
+      bool enableGtGtGtEq}) {
     GatheringErrorListener listener =
         new GatheringErrorListener(checkRanges: true);
 
-    CompilationUnit unit = parseCompilationUnit2(content, listener);
+    CompilationUnit unit = parseCompilationUnit2(content, listener,
+        enableControlFlowCollections: enableControlFlowCollections,
+        enableGtGtGt: enableGtGtGt,
+        enableGtGtGtEq: enableGtGtGtEq);
 
     // Assert and return result
     if (codes != null) {
@@ -1352,7 +1423,10 @@
   }
 
   CompilationUnit parseCompilationUnit2(
-      String content, GatheringErrorListener listener) {
+      String content, GatheringErrorListener listener,
+      {bool enableControlFlowCollections,
+      bool enableGtGtGt,
+      bool enableGtGtGtEq}) {
     var source = new StringSource(content, 'parser_test_StringSource.dart');
 
     void reportError(
@@ -1362,7 +1436,10 @@
     }
 
     // Scan tokens
-    ScannerResult result = scanString(content, includeComments: true);
+    ScannerResult result = scanString(content,
+        includeComments: true,
+        enableGtGtGt: enableGtGtGt ?? enableGtGtGtEq ?? false,
+        enableGtGtGtEq: enableGtGtGtEq ?? false);
     Token token = result.tokens;
     if (result.hasErrors) {
       // The default recovery strategy used by scanString
@@ -1377,11 +1454,15 @@
     // Run parser
     ErrorReporter errorReporter = new ErrorReporter(listener, source);
     fasta.Parser parser = new fasta.Parser(null);
-    parser.enableSetLiterals = IsEnabledByDefault.set_literals;
     AstBuilder astBuilder = new AstBuilder(errorReporter, source.uri, true);
     parser.listener = astBuilder;
     astBuilder.parser = parser;
     astBuilder.allowNativeClause = allowNativeClause;
+    if (enableControlFlowCollections != null) {
+      astBuilder.enableControlFlowCollections = enableControlFlowCollections;
+    }
+    astBuilder.enableTripleShift =
+        enableGtGtGt == true || enableGtGtGtEq == true;
     parser.parseUnit(_fastaTokens);
     CompilationUnitImpl unit = astBuilder.pop();
     unit.localDeclarations = astBuilder.localDeclarations;
@@ -1433,11 +1514,9 @@
       List<ExpectedError> errors,
       int expectedEndOffset,
       bool inAsync = false,
-      bool parseSetLiterals = false,
       bool parseSpreadCollections = false,
       bool parseControlFlowCollections = false}) {
     createParser(source, expectedEndOffset: expectedEndOffset);
-    _parserProxy.fastaParser.enableSetLiterals = parseSetLiterals;
     _parserProxy.astBuilder.enableSpreadCollections = parseSpreadCollections;
     _parserProxy.astBuilder.enableControlFlowCollections =
         parseControlFlowCollections;
@@ -1451,7 +1530,10 @@
 
   @override
   List<Expression> parseExpressionList(String code) {
-    return (_parseExpression('[$code]') as ListLiteral).elements.toList();
+    return (_parseExpression('[$code]') as ListLiteral)
+        .elements
+        .toList()
+        .cast<Expression>();
   }
 
   @override
@@ -1541,7 +1623,7 @@
   }
 
   @override
-  MapLiteral parseMapLiteral(
+  SetOrMapLiteral parseMapLiteral(
       analyzer.Token token, String typeArgumentsCode, String code) {
     String sc = '';
     if (token != null) {
@@ -1551,13 +1633,13 @@
       sc += typeArgumentsCode;
     }
     sc += code;
-    return parsePrimaryExpression(sc) as MapLiteral;
+    return parsePrimaryExpression(sc) as SetOrMapLiteral;
   }
 
   @override
   MapLiteralEntry parseMapLiteralEntry(String code) {
     var mapLiteral = parseMapLiteral(null, null, '{ $code }');
-    return mapLiteral.entries.single;
+    return mapLiteral.elements.single;
   }
 
   @override
@@ -1627,7 +1709,6 @@
       bool parseControlFlowCollections = false,
       bool inAsync = false}) {
     createParser(source, expectedEndOffset: expectedEndOffset);
-    _parserProxy.fastaParser.enableSetLiterals = parseSetLiterals;
     _parserProxy.astBuilder.enableSpreadCollections = parseSpreadCollections;
     _parserProxy.astBuilder.enableControlFlowCollections =
         parseControlFlowCollections;
@@ -1710,10 +1791,7 @@
 class NNBDParserTest_Fasta extends FastaParserTestCase {
   CompilationUnit parseNNBDCompilationUnit(String code,
       {List<ExpectedError> errors}) {
-    createParser('''
-@pragma('analyzer:non-nullable') library nnbd.parser.test;
-$code
-''');
+    createParser(code);
     _parserProxy.astBuilder.enableNonNullable = true;
     CompilationUnit unit = _parserProxy.parseCompilationUnit2();
     assertErrors(errors: errors);
@@ -1752,9 +1830,9 @@
   void test_conditional_error() {
     parseNNBDCompilationUnit('D? foo(X? x) { X ? ? x2 = x + bar(7) : y; }',
         errors: [
-          expectedError(ParserErrorCode.MISSING_IDENTIFIER, 78, 1),
-          expectedError(ParserErrorCode.EXPECTED_TOKEN, 99, 1),
-          expectedError(ParserErrorCode.MISSING_IDENTIFIER, 99, 1),
+          expectedError(ParserErrorCode.MISSING_IDENTIFIER, 19, 1),
+          expectedError(ParserErrorCode.EXPECTED_TOKEN, 40, 1),
+          expectedError(ParserErrorCode.MISSING_IDENTIFIER, 40, 1),
         ]);
   }
 
@@ -1764,7 +1842,7 @@
 
   void test_enableNonNullable_false() {
     parseCompilationUnit('main() { x is String? ? (x + y) : z; }',
-        errors: [expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 20, 1)]);
+        errors: [expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 20, 1)]);
   }
 
   void test_for() {
@@ -1841,31 +1919,168 @@
     expect(elseExpression, isSimpleIdentifier);
   }
 
-  void test_pragma_missing() {
-    createParser("library foo;");
-    _parserProxy.astBuilder.enableNonNullable = true;
-    CompilationUnitImpl unit = _parserProxy.parseCompilationUnit2();
-    expect(unit.hasPragmaAnalyzerNonNullable, false);
+  void test_nullCheck() {
+    var unit = parseNNBDCompilationUnit('f(int? y) { var x = y!; }');
+    FunctionDeclaration function = unit.declarations[0];
+    BlockFunctionBody body = function.functionExpression.body;
+    VariableDeclarationStatement statement = body.block.statements[0];
+    PostfixExpression expression = statement.variables.variables[0].initializer;
+    SimpleIdentifier identifier = expression.operand;
+    expect(identifier.name, 'y');
+    expect(expression.operator.lexeme, '!');
   }
 
-  void test_pragma_non_nullable() {
-    createParser("@pragma('analyzer:non-nullable') library foo;");
-    _parserProxy.astBuilder.enableNonNullable = true;
-    CompilationUnitImpl unit = _parserProxy.parseCompilationUnit2();
-    expect(unit.hasPragmaAnalyzerNonNullable, true);
+  void test_nullCheck_disabled() {
+    // TODO(danrubel): remove this once NNBD is enabled by default
+    var unit = parseCompilationUnit('f(int? y) { var x = y!; }', errors: [
+      expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 5, 1),
+      expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 21, 1),
+    ]);
+    FunctionDeclaration function = unit.declarations[0];
+    BlockFunctionBody body = function.functionExpression.body;
+    VariableDeclarationStatement statement = body.block.statements[0];
+    SimpleIdentifier identifier = statement.variables.variables[0].initializer;
+    expect(identifier.name, 'y');
   }
 
-  void test_pragma_non_nullable_not_enabled() {
-    createParser("@pragma('analyzer:non-nullable') library foo;");
-    CompilationUnitImpl unit = _parserProxy.parseCompilationUnit2();
-    expect(unit.hasPragmaAnalyzerNonNullable, false);
+  void test_nullCheckFunctionResult() {
+    parseNNBDCompilationUnit('f() { var x = g()! + 7; }');
   }
 
-  void test_pragma_other() {
-    createParser("@pragma('analyzer:foo') library foo;");
-    _parserProxy.astBuilder.enableNonNullable = true;
-    CompilationUnitImpl unit = _parserProxy.parseCompilationUnit2();
-    expect(unit.hasPragmaAnalyzerNonNullable, false);
+  void test_nullCheckIndexedValue() {
+    parseNNBDCompilationUnit('f(int? y) { var x = y[0]! + 7; }');
+  }
+
+  void test_nullCheckIndexedValue2() {
+    parseNNBDCompilationUnit('f(int? y) { var x = super.y[0]! + 7; }');
+  }
+
+  void test_nullCheckInExpression() {
+    parseNNBDCompilationUnit('f(int? y) { var x = y! + 7; }');
+  }
+
+  void test_nullCheckInExpression_disabled() {
+    // TODO(danrubel): remove this once NNBD is enabled by default
+    parseCompilationUnit('f(int? y) { var x = y! + 7; }', errors: [
+      expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 5, 1),
+      expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 21, 1),
+    ]);
+  }
+
+  void test_nullCheckMethodResult() {
+    parseNNBDCompilationUnit('f() { var x = g.m()! + 7; }');
+  }
+
+  void test_nullCheckMethodResult2() {
+    parseNNBDCompilationUnit('f() { var x = g?.m()! + 7; }');
+  }
+
+  void test_nullCheckMethodResult3() {
+    parseNNBDCompilationUnit('f() { var x = super.m()! + 7; }');
+  }
+
+  void test_nullCheckOnConstConstructor() {
+    parseNNBDCompilationUnit('f() { var x = const Foo()!; }');
+  }
+
+  void test_nullCheckOnConstructor() {
+    parseNNBDCompilationUnit('f() { var x = new Foo()!; }');
+  }
+
+  void test_nullCheckOnLiteral_disabled() {
+    // TODO(danrubel): remove this once NNBD is enabled by default
+    parseCompilationUnit('f() { var x = 0!; }',
+        errors: [expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 15, 1)]);
+  }
+
+  void test_nullCheckOnLiteralDouble() {
+    // Issues like this should be caught during later analysis
+    parseNNBDCompilationUnit('f() { var x = 1.2!; }');
+  }
+
+  void test_nullCheckOnLiteralInt() {
+    // Issues like this should be caught during later analysis
+    parseNNBDCompilationUnit('f() { var x = 0!; }');
+  }
+
+  void test_nullCheckOnLiteralList() {
+    // Issues like this should be caught during later analysis
+    parseNNBDCompilationUnit('f() { var x = [1,2]!; }');
+  }
+
+  void test_nullCheckOnLiteralMap() {
+    // Issues like this should be caught during later analysis
+    parseNNBDCompilationUnit('f() { var x = {1:2}!; }');
+  }
+
+  void test_nullCheckOnLiteralSet() {
+    // Issues like this should be caught during later analysis
+    parseNNBDCompilationUnit('f() { var x = {1,2}!; }');
+  }
+
+  void test_nullCheckOnLiteralString() {
+    // Issues like this should be caught during later analysis
+    parseNNBDCompilationUnit('f() { var x = "seven"!; }');
+  }
+
+  void test_nullCheckOnNull() {
+    // Issues like this should be caught during later analysis
+    parseNNBDCompilationUnit('f() { var x = null!; }');
+  }
+
+  void test_nullCheckOnSymbol() {
+    // Issues like this should be caught during later analysis
+    parseNNBDCompilationUnit('f() { var x = #seven!; }');
+  }
+
+  void test_nullCheckOnValue() {
+    parseNNBDCompilationUnit('f(Point p) { var x = p.y! + 7; }');
+  }
+
+  void test_nullCheckOnValue_disabled() {
+    // TODO(danrubel): remove this once NNBD is enabled by default
+    parseCompilationUnit('f(Point p) { var x = p.y! + 7; }',
+        errors: [expectedError(ParserErrorCode.EXPERIMENT_NOT_ENABLED, 24, 1)]);
+  }
+
+  void test_nullCheckParenthesizedExpression() {
+    parseNNBDCompilationUnit('f(int? y) { var x = (y)! + 7; }');
+  }
+
+  void test_nullCheckPropertyAccess() {
+    parseNNBDCompilationUnit('f() { var x = g.p! + 7; }');
+  }
+
+  void test_nullCheckPropertyAccess2() {
+    parseNNBDCompilationUnit('f() { var x = g?.p! + 7; }');
+  }
+
+  void test_nullCheckPropertyAccess3() {
+    parseNNBDCompilationUnit('f() { var x = super.p! + 7; }');
+  }
+
+  void test_postfix_null_assertion_and_unary_prefix_operator_precedence() {
+    // -x! is parsed as -(x!).
+    var unit = parseNNBDCompilationUnit('void main() { -x!; }');
+    var function = unit.declarations[0] as FunctionDeclaration;
+    var body = function.functionExpression.body as BlockFunctionBody;
+    var statement = body.block.statements[0] as ExpressionStatement;
+    var outerExpression = statement.expression as PrefixExpression;
+    expect(outerExpression.operator.type, TokenType.MINUS);
+    var innerExpression = outerExpression.operand as PostfixExpression;
+    expect(innerExpression.operator.type, TokenType.BANG);
+  }
+
+  void test_postfix_null_assertion_of_postfix_expression() {
+    // x++! is parsed as (x++)!.
+    var unit = parseNNBDCompilationUnit('void main() { x++!; }');
+    var function = unit.declarations[0] as FunctionDeclaration;
+    var body = function.functionExpression.body as BlockFunctionBody;
+    var statement = body.block.statements[0] as ExpressionStatement;
+    var outerExpression = statement.expression as PostfixExpression;
+    expect(outerExpression.operator.type, TokenType.BANG);
+    var innerExpression = outerExpression.operand as PostfixExpression;
+    expect(innerExpression.operator.type, TokenType.PLUS_PLUS);
   }
 }
 
@@ -2084,7 +2299,7 @@
   }
 
   void test_incompleteForEach2() {
-    ForStatement2 statement = parseStatement('for (String item i) {}',
+    ForStatement statement = parseStatement('for (String item i) {}',
         parseControlFlowCollections: true);
     listener.assertErrors([
       expectedError(ParserErrorCode.EXPECTED_TOKEN, 12, 4),
@@ -2202,7 +2417,7 @@
   }
 
   void test_parseForStatement_each_await2() {
-    ForStatement2 forStatement = parseStatement(
+    ForStatement forStatement = parseStatement(
       'await for (element in list) {}',
       inAsync: true,
       parseControlFlowCollections: true,
@@ -2220,7 +2435,7 @@
   }
 
   void test_parseForStatement_each_genericFunctionType2() {
-    ForStatement2 forStatement = parseStatement(
+    ForStatement forStatement = parseStatement(
       'for (void Function<T>(T) element in list) {}',
       parseControlFlowCollections: true,
     );
@@ -2237,7 +2452,7 @@
   }
 
   void test_parseForStatement_each_identifier2() {
-    ForStatement2 forStatement = parseStatement(
+    ForStatement forStatement = parseStatement(
       'for (element in list) {}',
       parseControlFlowCollections: true,
     );
@@ -2254,7 +2469,7 @@
   }
 
   void test_parseForStatement_each_noType_metadata2() {
-    ForStatement2 forStatement = parseStatement(
+    ForStatement forStatement = parseStatement(
       'for (@A var element in list) {}',
       parseControlFlowCollections: true,
     );
@@ -2272,7 +2487,7 @@
   }
 
   void test_parseForStatement_each_type2() {
-    ForStatement2 forStatement = parseStatement(
+    ForStatement forStatement = parseStatement(
       'for (A element in list) {}',
       parseControlFlowCollections: true,
     );
@@ -2289,7 +2504,7 @@
   }
 
   void test_parseForStatement_each_var2() {
-    ForStatement2 forStatement = parseStatement(
+    ForStatement forStatement = parseStatement(
       'for (var element in list) {}',
       parseControlFlowCollections: true,
     );
@@ -2306,7 +2521,7 @@
   }
 
   void test_parseForStatement_loop_c2() {
-    ForStatement2 forStatement = parseStatement(
+    ForStatement forStatement = parseStatement(
       'for (; i < count;) {}',
       parseControlFlowCollections: true,
     );
@@ -2324,7 +2539,7 @@
   }
 
   void test_parseForStatement_loop_cu2() {
-    ForStatement2 forStatement = parseStatement(
+    ForStatement forStatement = parseStatement(
       'for (; i < count; i++) {}',
       parseControlFlowCollections: true,
     );
@@ -2342,7 +2557,7 @@
   }
 
   void test_parseForStatement_loop_ecu2() {
-    ForStatement2 forStatement = parseStatement(
+    ForStatement forStatement = parseStatement(
       'for (i--; i < count; i++) {}',
       parseSpreadCollections: true,
     );
@@ -2360,7 +2575,7 @@
   }
 
   void test_parseForStatement_loop_i2() {
-    ForStatement2 forStatement = parseStatement(
+    ForStatement forStatement = parseStatement(
       'for (var i = 0;;) {}',
       parseSpreadCollections: true,
     );
@@ -2381,7 +2596,7 @@
   }
 
   void test_parseForStatement_loop_i_withMetadata2() {
-    ForStatement2 forStatement = parseStatement(
+    ForStatement forStatement = parseStatement(
       'for (@A var i = 0;;) {}',
       parseSpreadCollections: true,
     );
@@ -2402,7 +2617,7 @@
   }
 
   void test_parseForStatement_loop_ic2() {
-    ForStatement2 forStatement = parseStatement(
+    ForStatement forStatement = parseStatement(
       'for (var i = 0; i < count;) {}',
       parseSpreadCollections: true,
     );
@@ -2422,7 +2637,7 @@
   }
 
   void test_parseForStatement_loop_icu2() {
-    ForStatement2 forStatement = parseStatement(
+    ForStatement forStatement = parseStatement(
       'for (var i = 0; i < count; i++) {}',
       parseSpreadCollections: true,
     );
@@ -2442,7 +2657,7 @@
   }
 
   void test_parseForStatement_loop_iicuu2() {
-    ForStatement2 forStatement = parseStatement(
+    ForStatement forStatement = parseStatement(
       'for (int i = 0, j = count; i < j; i++, j--) {}',
       parseSpreadCollections: true,
     );
@@ -2462,7 +2677,7 @@
   }
 
   void test_parseForStatement_loop_iu2() {
-    ForStatement2 forStatement = parseStatement(
+    ForStatement forStatement = parseStatement(
       'for (var i = 0;; i++) {}',
       parseSpreadCollections: true,
     );
@@ -2482,7 +2697,7 @@
   }
 
   void test_parseForStatement_loop_u2() {
-    ForStatement2 forStatement = parseStatement(
+    ForStatement forStatement = parseStatement(
       'for (;; i++) {}',
       parseSpreadCollections: true,
     );
@@ -2539,6 +2754,101 @@
 @reflectiveTest
 class TopLevelParserTest_Fasta extends FastaParserTestCase
     with TopLevelParserTestMixin {
+  void test_languageVersion_afterImport() {
+    var unit = parseCompilationUnit('''
+import 'foo.dart';
+// @dart = 2.3
+main() {}
+''') as CompilationUnitImpl;
+    expect(unit.languageVersion, isNull);
+  }
+
+  void test_languageVersion_beforeComment() {
+    var unit = parseCompilationUnit('''
+// some other comment
+// @dart = 2.3
+// yet another comment
+import 'foo.dart';
+main() {}
+''') as CompilationUnitImpl;
+    expect(unit.languageVersion.major, 2);
+    expect(unit.languageVersion.minor, 3);
+  }
+
+  void test_languageVersion_beforeFunction() {
+    var unit = parseCompilationUnit('''
+// @dart = 2.3
+main() {}
+''') as CompilationUnitImpl;
+    expect(unit.languageVersion.major, 2);
+    expect(unit.languageVersion.minor, 3);
+  }
+
+  void test_languageVersion_beforeImport() {
+    var unit = parseCompilationUnit('''
+// @dart = 2.3
+import 'foo.dart';
+main() {}
+''') as CompilationUnitImpl;
+    expect(unit.languageVersion.major, 2);
+    expect(unit.languageVersion.minor, 3);
+  }
+
+  void test_languageVersion_beforeImport_afterScript() {
+    var unit = parseCompilationUnit('''
+#!/bin/dart
+// @dart = 2.3
+import 'foo.dart';
+main() {}
+''') as CompilationUnitImpl;
+    expect(unit.languageVersion.major, 2);
+    expect(unit.languageVersion.minor, 3);
+  }
+
+  void test_languageVersion_beforeLibrary() {
+    var unit = parseCompilationUnit('''
+// @dart = 2.3
+library foo;
+main() {}
+''') as CompilationUnitImpl;
+    expect(unit.languageVersion.major, 2);
+    expect(unit.languageVersion.minor, 3);
+  }
+
+  void test_languageVersion_incomplete_version() {
+    var unit = parseCompilationUnit('''
+// @dart = 2.
+library foo;
+main() {}
+''') as CompilationUnitImpl;
+    expect(unit.languageVersion, isNull);
+  }
+
+  void test_languageVersion_invalid_identifier() {
+    var unit = parseCompilationUnit('''
+// @dart = blat
+library foo;
+main() {}
+''') as CompilationUnitImpl;
+    expect(unit.languageVersion, isNull);
+  }
+
+  void test_languageVersion_invalid_version() {
+    var unit = parseCompilationUnit('''
+// @dart = 2.x
+library foo;
+main() {}
+''') as CompilationUnitImpl;
+    expect(unit.languageVersion, isNull);
+  }
+
+  void test_languageVersion_unspecified() {
+    var unit = parseCompilationUnit('''
+main() {}
+''') as CompilationUnitImpl;
+    expect(unit.languageVersion, isNull);
+  }
+
   void test_parseClassDeclaration_native_allowed() {
     allowNativeClause = true;
     test_parseClassDeclaration_native();
diff --git a/pkg/analyzer/test/generated/parser_test.dart b/pkg/analyzer/test/generated/parser_test.dart
index faf4a1c..13c908b 100644
--- a/pkg/analyzer/test/generated/parser_test.dart
+++ b/pkg/analyzer/test/generated/parser_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -204,7 +204,7 @@
 
   Expression parseLogicalOrExpression(String code);
 
-  MapLiteral parseMapLiteral(
+  SetOrMapLiteral parseMapLiteral(
       Token token, String typeArgumentsCode, String code);
 
   MapLiteralEntry parseMapLiteralEntry(String code);
@@ -3000,11 +3000,8 @@
   }
 
   void test_expectedInterpolationIdentifier() {
-    StringLiteral literal = parseExpression("'\$x\$'", errors: [
-      usingFastaParser
-          ? expectedError(ScannerErrorCode.UNEXPECTED_DOLLAR_IN_STRING, 4, 1)
-          : expectedError(ScannerErrorCode.MISSING_IDENTIFIER, 4, 1)
-    ]);
+    StringLiteral literal = parseExpression("'\$x\$'",
+        errors: [expectedError(ScannerErrorCode.MISSING_IDENTIFIER, 4, 1)]);
     expectNotNullIfNoErrors(literal);
   }
 
@@ -3012,11 +3009,8 @@
     // The scanner inserts an empty string token between the two $'s; we need to
     // make sure that the MISSING_IDENTIFIER error that is generated has a
     // nonzero width so that it will show up in the editor UI.
-    StringLiteral literal = parseExpression("'\$\$foo'", errors: [
-      usingFastaParser
-          ? expectedError(ScannerErrorCode.UNEXPECTED_DOLLAR_IN_STRING, 2, 1)
-          : expectedError(ScannerErrorCode.MISSING_IDENTIFIER, 2, 1)
-    ]);
+    StringLiteral literal = parseExpression("'\$\$foo'",
+        errors: [expectedError(ScannerErrorCode.MISSING_IDENTIFIER, 2, 1)]);
     expectNotNullIfNoErrors(literal);
   }
 
@@ -3938,12 +3932,32 @@
     );
   }
 
+  void test_invalidInterpolation_missingClosingBrace_issue35900() {
+    parseCompilationUnit(r"main () { print('${x' '); }",
+        errors: usingFastaParser
+            ? [
+                expectedError(ScannerErrorCode.EXPECTED_TOKEN, 23, 1),
+                expectedError(
+                    ScannerErrorCode.UNTERMINATED_STRING_LITERAL, 26, 1),
+                expectedError(ParserErrorCode.EXPECTED_TOKEN, 20, 3),
+                expectedError(ParserErrorCode.EXPECTED_STRING_LITERAL, 23, 1),
+                expectedError(ParserErrorCode.EXPECTED_EXECUTABLE, 27, 0),
+              ]
+            : [
+                expectedError(ScannerErrorCode.EXPECTED_TOKEN, 23, 1),
+                expectedError(
+                    ScannerErrorCode.UNTERMINATED_STRING_LITERAL, 26, 1),
+                expectedError(ParserErrorCode.EXPECTED_TOKEN, 20, 3),
+                expectedError(ParserErrorCode.EXPECTED_TOKEN, 23, 1),
+                expectedError(ParserErrorCode.EXPECTED_TOKEN, 23, 1),
+                expectedError(ParserErrorCode.EXPECTED_EXECUTABLE, 23, 1),
+                expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 23, 1),
+              ]);
+  }
+
   void test_invalidInterpolationIdentifier_startWithDigit() {
-    StringLiteral literal = parseExpression("'\$1'", errors: [
-      usingFastaParser
-          ? expectedError(ScannerErrorCode.UNEXPECTED_DOLLAR_IN_STRING, 2, 1)
-          : expectedError(ScannerErrorCode.MISSING_IDENTIFIER, 2, 1)
-    ]);
+    StringLiteral literal = parseExpression("'\$1'",
+        errors: [expectedError(ScannerErrorCode.MISSING_IDENTIFIER, 2, 1)]);
     expectNotNullIfNoErrors(literal);
   }
 
@@ -4697,18 +4711,16 @@
     createParser('(a, {b: 0)');
     FormalParameterList list = parser.parseFormalParameterList();
     expectNotNullIfNoErrors(list);
-    listener.assertErrors(usingFastaParser
-        ? [expectedError(ParserErrorCode.EXPECTED_TOKEN, 4, 1)]
-        : [expectedError(ScannerErrorCode.EXPECTED_TOKEN, 9, 1)]);
+    listener
+        .assertErrors([expectedError(ScannerErrorCode.EXPECTED_TOKEN, 9, 1)]);
   }
 
   void test_missingTerminatorForParameterGroup_optional() {
     createParser('(a, [b = 0)');
     FormalParameterList list = parser.parseFormalParameterList();
     expectNotNullIfNoErrors(list);
-    listener.assertErrors(usingFastaParser
-        ? [expectedError(ParserErrorCode.EXPECTED_TOKEN, 4, 1)]
-        : [expectedError(ScannerErrorCode.EXPECTED_TOKEN, 10, 1)]);
+    listener
+        .assertErrors([expectedError(ScannerErrorCode.EXPECTED_TOKEN, 10, 1)]);
   }
 
   void test_missingTypedefParameters_nonVoid() {
@@ -5365,6 +5377,20 @@
         errors: [expectedError(ParserErrorCode.TYPEDEF_IN_CLASS, 10, 7)]);
   }
 
+  void test_unexpectedCommaThenInterpolation() {
+    // https://github.com/Dart-Code/Dart-Code/issues/1548
+    parseCompilationUnit(r"main() { String s = 'a' 'b', 'c$foo'; return s; }",
+        errors: usingFastaParser
+            ? [
+                expectedError(ParserErrorCode.MISSING_IDENTIFIER, 29, 2),
+                expectedError(ParserErrorCode.EXPECTED_TOKEN, 29, 2),
+              ]
+            : [
+                expectedError(ParserErrorCode.MISSING_IDENTIFIER, 29, 2),
+                expectedError(ParserErrorCode.EXPECTED_TOKEN, 29, 1),
+              ]);
+  }
+
   void test_unexpectedTerminatorForParameterGroup_named() {
     createParser('(a, b})');
     FormalParameterList list = parser.parseFormalParameterList();
@@ -5698,7 +5724,7 @@
     if (usingFastaParser) {
       listener.assertErrors([
         expectedError(ParserErrorCode.EXPECTED_TOKEN, 9, 1),
-        expectedError(ParserErrorCode.EXPECTED_TOKEN, 4, 1)
+        expectedError(ScannerErrorCode.EXPECTED_TOKEN, 10, 1)
       ]);
     } else {
       listener.assertErrors([
@@ -5717,7 +5743,7 @@
     if (usingFastaParser) {
       listener.assertErrors([
         expectedError(ParserErrorCode.EXPECTED_TOKEN, 9, 1),
-        expectedError(ParserErrorCode.EXPECTED_TOKEN, 4, 1)
+        expectedError(ScannerErrorCode.EXPECTED_TOKEN, 10, 1)
       ]);
     } else {
       listener.assertErrors([
@@ -6288,9 +6314,9 @@
     Expression expression = parseConstExpression('const <A, B> {}');
     expect(expression, isNotNull);
     assertNoErrors();
-    var literal = expression as MapLiteral;
+    var literal = expression as SetOrMapLiteral;
     expect(literal.leftBracket, isNotNull);
-    expect(literal.entries, hasLength(0));
+    expect(literal.elements, hasLength(0));
     expect(literal.rightBracket, isNotNull);
     expect(literal.typeArguments, isNotNull);
   }
@@ -6299,9 +6325,9 @@
     Expression expression = parseExpression('const <A, B {}',
         errors: [expectedError(ParserErrorCode.EXPECTED_TOKEN, 10, 1)]);
     expect(expression, isNotNull);
-    var literal = expression as MapLiteral;
+    var literal = expression as SetOrMapLiteral;
     expect(literal.leftBracket, isNotNull);
-    expect(literal.entries, hasLength(0));
+    expect(literal.elements, hasLength(0));
     expect(literal.rightBracket, isNotNull);
     expect(literal.typeArguments, isNotNull);
   }
@@ -6310,9 +6336,9 @@
     Expression expression = parseConstExpression('const {}');
     expect(expression, isNotNull);
     assertNoErrors();
-    var literal = expression as MapLiteral;
+    var literal = expression as SetOrMapLiteral;
     expect(literal.leftBracket, isNotNull);
-    expect(literal.entries, hasLength(0));
+    expect(literal.elements, hasLength(0));
     expect(literal.rightBracket, isNotNull);
     expect(literal.typeArguments, isNull);
   }
@@ -6893,11 +6919,11 @@
     TypedLiteral literal = parseListOrMapLiteral(null, "{'1' : 1}");
     expect(literal, isNotNull);
     assertNoErrors();
-    var mapLiteral = literal as MapLiteral;
+    var mapLiteral = literal as SetOrMapLiteral;
     expect(mapLiteral.constKeyword, isNull);
     expect(mapLiteral.typeArguments, isNull);
     expect(mapLiteral.leftBracket, isNotNull);
-    expect(mapLiteral.entries, hasLength(1));
+    expect(mapLiteral.elements, hasLength(1));
     expect(mapLiteral.rightBracket, isNotNull);
   }
 
@@ -6906,11 +6932,11 @@
         parseListOrMapLiteral(null, "<String, int> {'1' : 1}");
     expect(literal, isNotNull);
     assertNoErrors();
-    var mapLiteral = literal as MapLiteral;
+    var mapLiteral = literal as SetOrMapLiteral;
     expect(mapLiteral.constKeyword, isNull);
     expect(mapLiteral.typeArguments, isNotNull);
     expect(mapLiteral.leftBracket, isNotNull);
-    expect(mapLiteral.entries, hasLength(1));
+    expect(mapLiteral.elements, hasLength(1));
     expect(mapLiteral.rightBracket, isNotNull);
   }
 
@@ -6938,40 +6964,41 @@
 
   void test_parseMapLiteral_empty() {
     Token token = TokenFactory.tokenFromKeyword(Keyword.CONST);
-    MapLiteral literal = parseMapLiteral(token, '<String, int>', '{}');
+    SetOrMapLiteral literal = parseMapLiteral(token, '<String, int>', '{}');
     expect(literal, isNotNull);
     assertNoErrors();
     expect(literal.constKeyword.keyword, Keyword.CONST);
     expect(literal.typeArguments, isNotNull);
     expect(literal.leftBracket, isNotNull);
-    expect(literal.entries, hasLength(0));
+    expect(literal.elements, hasLength(0));
     expect(literal.rightBracket, isNotNull);
   }
 
   void test_parseMapLiteral_multiple() {
-    MapLiteral literal = parseMapLiteral(null, null, "{'a' : b, 'x' : y}");
+    SetOrMapLiteral literal = parseMapLiteral(null, null, "{'a' : b, 'x' : y}");
     expect(literal, isNotNull);
     assertNoErrors();
     expect(literal.leftBracket, isNotNull);
-    expect(literal.entries, hasLength(2));
+    expect(literal.elements, hasLength(2));
     expect(literal.rightBracket, isNotNull);
   }
 
   void test_parseMapLiteral_multiple_trailing_comma() {
-    MapLiteral literal = parseMapLiteral(null, null, "{'a' : b, 'x' : y,}");
+    SetOrMapLiteral literal =
+        parseMapLiteral(null, null, "{'a' : b, 'x' : y,}");
     expect(literal, isNotNull);
     assertNoErrors();
     expect(literal.leftBracket, isNotNull);
-    expect(literal.entries, hasLength(2));
+    expect(literal.elements, hasLength(2));
     expect(literal.rightBracket, isNotNull);
   }
 
   void test_parseMapLiteral_single() {
-    MapLiteral literal = parseMapLiteral(null, null, "{'x' : y}");
+    SetOrMapLiteral literal = parseMapLiteral(null, null, "{'x' : y}");
     expect(literal, isNotNull);
     assertNoErrors();
     expect(literal.leftBracket, isNotNull);
-    expect(literal.entries, hasLength(1));
+    expect(literal.elements, hasLength(1));
     expect(literal.rightBracket, isNotNull);
   }
 
@@ -7255,7 +7282,7 @@
     Expression expression = parsePrimaryExpression('{}');
     expect(expression, isNotNull);
     assertNoErrors();
-    var literal = expression as MapLiteral;
+    var literal = expression as SetOrMapLiteral;
     expect(literal.typeArguments, isNull);
     expect(literal, isNotNull);
   }
@@ -7264,7 +7291,7 @@
     Expression expression = parsePrimaryExpression('<A, B>{}');
     expect(expression, isNotNull);
     assertNoErrors();
-    var literal = expression as MapLiteral;
+    var literal = expression as SetOrMapLiteral;
     expect(literal.typeArguments, isNotNull);
     expect(literal.typeArguments.arguments, hasLength(2));
   }
@@ -7888,6 +7915,18 @@
     expect(throwExpression.expression, isNotNull);
   }
 
+  void test_parseUnaryExpression_decrement_identifier_index() {
+    PrefixExpression expression = parseExpression('--a[0]');
+    expect(expression, isNotNull);
+    assertNoErrors();
+    expect(expression.operator, isNotNull);
+    expect(expression.operator.type, TokenType.MINUS_MINUS);
+    expect(expression.operand, isNotNull);
+    IndexExpression operand = expression.operand as IndexExpression;
+    expect(operand.realTarget, const TypeMatcher<SimpleIdentifier>());
+    expect(operand.index is IntegerLiteral, isTrue);
+  }
+
   void test_parseUnaryExpression_decrement_normal() {
     PrefixExpression expression = parseUnaryExpression('--x');
     expect(expression, isNotNull);
@@ -7940,6 +7979,18 @@
     expect(operand.operand, isNotNull);
   }
 
+  void test_parseUnaryExpression_increment_identifier_index() {
+    PrefixExpression expression = parseExpression('++a[0]');
+    expect(expression, isNotNull);
+    assertNoErrors();
+    expect(expression.operator, isNotNull);
+    expect(expression.operator.type, TokenType.PLUS_PLUS);
+    expect(expression.operand, isNotNull);
+    IndexExpression operand = expression.operand as IndexExpression;
+    expect(operand.realTarget, const TypeMatcher<SimpleIdentifier>());
+    expect(operand.index is IntegerLiteral, isTrue);
+  }
+
   void test_parseUnaryExpression_increment_normal() {
     PrefixExpression expression = parseUnaryExpression('++x');
     expect(expression, isNotNull);
@@ -7973,6 +8024,18 @@
     expect(operand.propertyName.name, "x");
   }
 
+  void test_parseUnaryExpression_minus_identifier_index() {
+    PrefixExpression expression = parseExpression('-a[0]');
+    expect(expression, isNotNull);
+    assertNoErrors();
+    expect(expression.operator, isNotNull);
+    expect(expression.operator.type, TokenType.MINUS);
+    expect(expression.operand, isNotNull);
+    IndexExpression operand = expression.operand as IndexExpression;
+    expect(operand.realTarget, const TypeMatcher<SimpleIdentifier>());
+    expect(operand.index is IntegerLiteral, isTrue);
+  }
+
   void test_parseUnaryExpression_minus_normal() {
     PrefixExpression expression = parseUnaryExpression('-x');
     expect(expression, isNotNull);
@@ -8026,6 +8089,18 @@
     expect(expression.operator.type, TokenType.TILDE);
     expect(expression.operand, isNotNull);
   }
+
+  void test_parseUnaryExpression_tilde_identifier_index() {
+    PrefixExpression expression = parseExpression('~a[0]');
+    expect(expression, isNotNull);
+    assertNoErrors();
+    expect(expression.operator, isNotNull);
+    expect(expression.operator.type, TokenType.TILDE);
+    expect(expression.operand, isNotNull);
+    IndexExpression operand = expression.operand as IndexExpression;
+    expect(operand.realTarget, const TypeMatcher<SimpleIdentifier>());
+    expect(operand.index is IntegerLiteral, isTrue);
+  }
 }
 
 /**
@@ -9543,7 +9618,10 @@
   List<Expression> parseExpressionList(String code) {
     if (usingFastaParser) {
       createParser('[$code]');
-      return (parser.parseExpression2() as ListLiteral).elements.toList();
+      return (parser.parseExpression2() as ListLiteral)
+          .elements
+          .toList()
+          .cast<Expression>();
     } else {
       createParser(code);
       return parser.parseExpressionList();
@@ -9679,7 +9757,7 @@
   }
 
   @override
-  MapLiteral parseMapLiteral(
+  SetOrMapLiteral parseMapLiteral(
       Token token, String typeArgumentsCode, String code) {
     if (usingFastaParser) {
       String sc = '';
@@ -9691,7 +9769,7 @@
       }
       sc += code;
       createParser(sc);
-      return parser.parseExpression2() as MapLiteral;
+      return parser.parseExpression2() as SetOrMapLiteral;
     } else {
       TypeArgumentList typeArguments;
       if (typeArgumentsCode != null) {
@@ -9707,7 +9785,7 @@
   MapLiteralEntry parseMapLiteralEntry(String code) {
     if (usingFastaParser) {
       var mapLiteral = parseMapLiteral(null, null, '{ $code }');
-      return mapLiteral.entries.single;
+      return mapLiteral.elements.single;
     } else {
       createParser(code);
       return parser.parseMapLiteralEntry();
@@ -10869,10 +10947,11 @@
     ]);
     expect(statement, isForStatement);
     expect(statement.toSource(), 'for (String item; i;) {}');
-    expect(statement.leftSeparator, isNotNull);
-    expect(statement.leftSeparator.type, TokenType.SEMICOLON);
-    expect(statement.rightSeparator, isNotNull);
-    expect(statement.rightSeparator.type, TokenType.SEMICOLON);
+    var forParts = statement.forLoopParts as ForParts;
+    expect(forParts.leftSeparator, isNotNull);
+    expect(forParts.leftSeparator.type, TokenType.SEMICOLON);
+    expect(forParts.rightSeparator, isNotNull);
+    expect(forParts.rightSeparator.type, TokenType.SEMICOLON);
   }
 
   void test_incompleteLocalVariable_atTheEndOfBlock() {
@@ -11130,6 +11209,7 @@
     MethodDeclaration method = declaration.members[0];
     expect(method.name.name, 'C');
     expect(method.isGetter, isTrue);
+    expect(method.parameters, isNull);
   }
 
   void test_issue_34610_initializers() {
@@ -11161,6 +11241,30 @@
   }
 
   void test_issue_34610_missing_param() {
+    final unit = parseCompilationUnit('class C { C => null; }',
+        errors: usingFastaParser
+            ? [expectedError(ParserErrorCode.MISSING_METHOD_PARAMETERS, 10, 1)]
+            : [
+                expectedError(ParserErrorCode.EXPECTED_CLASS_MEMBER, 18, 2),
+                expectedError(ParserErrorCode.EXPECTED_CLASS_MEMBER, 18, 2),
+                expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 18, 2),
+                expectedError(ParserErrorCode.EXPECTED_CLASS_MEMBER, 21, 4),
+                expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 21, 4),
+                expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 25, 1),
+              ]);
+    ClassDeclaration declaration = unit.declarations[0];
+    if (usingFastaParser) {
+      ConstructorDeclaration constructor = declaration.members[0];
+      expect(constructor.name, isNull);
+      expect(constructor.parameters, isNotNull);
+      expect(constructor.parameters.parameters, hasLength(0));
+    } else {
+      FieldDeclaration field = declaration.members[0];
+      expect(field.fields.type.toSource(), 'C');
+    }
+  }
+
+  void test_issue_34610_named_missing_param() {
     final unit = parseCompilationUnit('class C { C.named => null; }',
         errors: usingFastaParser
             ? [expectedError(ParserErrorCode.MISSING_METHOD_PARAMETERS, 10, 1)]
@@ -11184,6 +11288,38 @@
     }
   }
 
+  void test_issue_34610_set() {
+    final unit = parseCompilationUnit('class C { set C.named => null; }',
+        errors: usingFastaParser
+            ? [
+                expectedError(ParserErrorCode.MISSING_METHOD_PARAMETERS, 14, 1),
+                expectedError(ParserErrorCode.MISSING_FUNCTION_BODY, 15, 1),
+                expectedError(ParserErrorCode.EXPECTED_CLASS_MEMBER, 15, 1),
+                expectedError(ParserErrorCode.MISSING_METHOD_PARAMETERS, 16, 5),
+              ]
+            : [
+                expectedError(ParserErrorCode.EXPECTED_TOKEN, 15, 1),
+                expectedError(ParserErrorCode.MISSING_IDENTIFIER, 15, 1),
+                expectedError(ParserErrorCode.EXPECTED_TOKEN, 15, 1),
+                expectedError(
+                    ParserErrorCode.STATIC_SETTER_WITHOUT_BODY, 15, 1),
+                expectedError(ParserErrorCode.EXPECTED_CLASS_MEMBER, 15, 1),
+                expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 15, 1),
+                expectedError(ParserErrorCode.EXPECTED_CLASS_MEMBER, 22, 2),
+                expectedError(ParserErrorCode.EXPECTED_CLASS_MEMBER, 22, 2),
+                expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 22, 2),
+                expectedError(ParserErrorCode.EXPECTED_CLASS_MEMBER, 25, 4),
+                expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 25, 4),
+                expectedError(ParserErrorCode.UNEXPECTED_TOKEN, 29, 1),
+              ]);
+    ClassDeclaration declaration = unit.declarations[0];
+    MethodDeclaration method = declaration.members[0];
+    expect(method.name.name, 'C');
+    expect(method.isSetter, isTrue);
+    expect(method.parameters, isNotNull);
+    expect(method.parameters.parameters, hasLength(usingFastaParser ? 0 : 1));
+  }
+
   void test_keywordInPlaceOfIdentifier() {
     // TODO(brianwilkerson) We could do better with this.
     parseCompilationUnit("do() {}",
@@ -14576,15 +14712,15 @@
     // TODO(danrubel): remove this once control flow and spread collection
     // entry parsing is enabled by default
     String code = 'await for (element in list) {}';
-    var forStatement = _parseAsyncStatement(code) as ForEachStatement;
+    var forStatement = _parseAsyncStatement(code) as ForStatement;
     assertNoErrors();
-    expect(forStatement.awaitKeyword, isNotNull);
+    expect(forStatement.awaitKeyword, usingFastaParser ? isNotNull : isNull);
     expect(forStatement.forKeyword, isNotNull);
     expect(forStatement.leftParenthesis, isNotNull);
-    expect(forStatement.loopVariable, isNull);
-    expect(forStatement.identifier, isNotNull);
-    expect(forStatement.inKeyword, isNotNull);
-    expect(forStatement.iterable, isNotNull);
+    var forEachParts = forStatement.forLoopParts as ForEachPartsWithIdentifier;
+    expect(forEachParts.identifier, isNotNull);
+    expect(forEachParts.inKeyword, isNotNull);
+    expect(forEachParts.iterable, isNotNull);
     expect(forStatement.rightParenthesis, isNotNull);
     expect(forStatement.body, isNotNull);
   }
@@ -14594,15 +14730,15 @@
     // entry parsing is enabled by default
     var forStatement =
         parseStatement('for (void Function<T>(T) element in list) {}')
-            as ForEachStatement;
+            as ForStatement;
     assertNoErrors();
     expect(forStatement.awaitKeyword, isNull);
     expect(forStatement.forKeyword, isNotNull);
     expect(forStatement.leftParenthesis, isNotNull);
-    expect(forStatement.loopVariable, isNotNull);
-    expect(forStatement.identifier, isNull);
-    expect(forStatement.inKeyword, isNotNull);
-    expect(forStatement.iterable, isNotNull);
+    var forEachParts = forStatement.forLoopParts as ForEachPartsWithDeclaration;
+    expect(forEachParts.loopVariable, isNotNull);
+    expect(forEachParts.inKeyword, isNotNull);
+    expect(forEachParts.iterable, isNotNull);
     expect(forStatement.rightParenthesis, isNotNull);
     expect(forStatement.body, isNotNull);
   }
@@ -14611,15 +14747,15 @@
     // TODO(danrubel): remove this once control flow and spread collection
     // entry parsing is enabled by default
     var forStatement =
-        parseStatement('for (element in list) {}') as ForEachStatement;
+        parseStatement('for (element in list) {}') as ForStatement;
     assertNoErrors();
     expect(forStatement.awaitKeyword, isNull);
     expect(forStatement.forKeyword, isNotNull);
     expect(forStatement.leftParenthesis, isNotNull);
-    expect(forStatement.loopVariable, isNull);
-    expect(forStatement.identifier, isNotNull);
-    expect(forStatement.inKeyword, isNotNull);
-    expect(forStatement.iterable, isNotNull);
+    var forEachParts = forStatement.forLoopParts as ForEachPartsWithIdentifier;
+    expect(forEachParts.identifier, isNotNull);
+    expect(forEachParts.inKeyword, isNotNull);
+    expect(forEachParts.iterable, isNotNull);
     expect(forStatement.rightParenthesis, isNotNull);
     expect(forStatement.body, isNotNull);
   }
@@ -14628,16 +14764,16 @@
     // TODO(danrubel): remove this once control flow and spread collection
     // entry parsing is enabled by default
     var forStatement =
-        parseStatement('for (@A var element in list) {}') as ForEachStatement;
+        parseStatement('for (@A var element in list) {}') as ForStatement;
     assertNoErrors();
     expect(forStatement.awaitKeyword, isNull);
     expect(forStatement.forKeyword, isNotNull);
     expect(forStatement.leftParenthesis, isNotNull);
-    expect(forStatement.loopVariable, isNotNull);
-    expect(forStatement.loopVariable.metadata, hasLength(1));
-    expect(forStatement.identifier, isNull);
-    expect(forStatement.inKeyword, isNotNull);
-    expect(forStatement.iterable, isNotNull);
+    var forEachParts = forStatement.forLoopParts as ForEachPartsWithDeclaration;
+    expect(forEachParts.loopVariable, isNotNull);
+    expect(forEachParts.loopVariable.metadata, hasLength(1));
+    expect(forEachParts.inKeyword, isNotNull);
+    expect(forEachParts.iterable, isNotNull);
     expect(forStatement.rightParenthesis, isNotNull);
     expect(forStatement.body, isNotNull);
   }
@@ -14646,15 +14782,15 @@
     // TODO(danrubel): remove this once control flow and spread collection
     // entry parsing is enabled by default
     var forStatement =
-        parseStatement('for (A element in list) {}') as ForEachStatement;
+        parseStatement('for (A element in list) {}') as ForStatement;
     assertNoErrors();
     expect(forStatement.awaitKeyword, isNull);
     expect(forStatement.forKeyword, isNotNull);
     expect(forStatement.leftParenthesis, isNotNull);
-    expect(forStatement.loopVariable, isNotNull);
-    expect(forStatement.identifier, isNull);
-    expect(forStatement.inKeyword, isNotNull);
-    expect(forStatement.iterable, isNotNull);
+    var forEachParts = forStatement.forLoopParts as ForEachPartsWithDeclaration;
+    expect(forEachParts.loopVariable, isNotNull);
+    expect(forEachParts.inKeyword, isNotNull);
+    expect(forEachParts.iterable, isNotNull);
     expect(forStatement.rightParenthesis, isNotNull);
     expect(forStatement.body, isNotNull);
   }
@@ -14663,15 +14799,15 @@
     // TODO(danrubel): remove this once control flow and spread collection
     // entry parsing is enabled by default
     var forStatement =
-        parseStatement('for (var element in list) {}') as ForEachStatement;
+        parseStatement('for (var element in list) {}') as ForStatement;
     assertNoErrors();
     expect(forStatement.awaitKeyword, isNull);
     expect(forStatement.forKeyword, isNotNull);
     expect(forStatement.leftParenthesis, isNotNull);
-    expect(forStatement.loopVariable, isNotNull);
-    expect(forStatement.identifier, isNull);
-    expect(forStatement.inKeyword, isNotNull);
-    expect(forStatement.iterable, isNotNull);
+    var forEachParts = forStatement.forLoopParts as ForEachPartsWithDeclaration;
+    expect(forEachParts.loopVariable, isNotNull);
+    expect(forEachParts.inKeyword, isNotNull);
+    expect(forEachParts.iterable, isNotNull);
     expect(forStatement.rightParenthesis, isNotNull);
     expect(forStatement.body, isNotNull);
   }
@@ -14683,12 +14819,12 @@
     assertNoErrors();
     expect(forStatement.forKeyword, isNotNull);
     expect(forStatement.leftParenthesis, isNotNull);
-    expect(forStatement.variables, isNull);
-    expect(forStatement.initialization, isNull);
-    expect(forStatement.leftSeparator, isNotNull);
-    expect(forStatement.condition, isNotNull);
-    expect(forStatement.rightSeparator, isNotNull);
-    expect(forStatement.updaters, hasLength(0));
+    var forParts = forStatement.forLoopParts as ForPartsWithExpression;
+    expect(forParts.initialization, isNull);
+    expect(forParts.leftSeparator, isNotNull);
+    expect(forParts.condition, isNotNull);
+    expect(forParts.rightSeparator, isNotNull);
+    expect(forParts.updaters, hasLength(0));
     expect(forStatement.rightParenthesis, isNotNull);
     expect(forStatement.body, isNotNull);
   }
@@ -14701,12 +14837,12 @@
     assertNoErrors();
     expect(forStatement.forKeyword, isNotNull);
     expect(forStatement.leftParenthesis, isNotNull);
-    expect(forStatement.variables, isNull);
-    expect(forStatement.initialization, isNull);
-    expect(forStatement.leftSeparator, isNotNull);
-    expect(forStatement.condition, isNotNull);
-    expect(forStatement.rightSeparator, isNotNull);
-    expect(forStatement.updaters, hasLength(1));
+    var forParts = forStatement.forLoopParts as ForPartsWithExpression;
+    expect(forParts.initialization, isNull);
+    expect(forParts.leftSeparator, isNotNull);
+    expect(forParts.condition, isNotNull);
+    expect(forParts.rightSeparator, isNotNull);
+    expect(forParts.updaters, hasLength(1));
     expect(forStatement.rightParenthesis, isNotNull);
     expect(forStatement.body, isNotNull);
   }
@@ -14719,12 +14855,12 @@
     assertNoErrors();
     expect(forStatement.forKeyword, isNotNull);
     expect(forStatement.leftParenthesis, isNotNull);
-    expect(forStatement.variables, isNull);
-    expect(forStatement.initialization, isNotNull);
-    expect(forStatement.leftSeparator, isNotNull);
-    expect(forStatement.condition, isNotNull);
-    expect(forStatement.rightSeparator, isNotNull);
-    expect(forStatement.updaters, hasLength(1));
+    var forParts = forStatement.forLoopParts as ForPartsWithExpression;
+    expect(forParts.initialization, isNotNull);
+    expect(forParts.leftSeparator, isNotNull);
+    expect(forParts.condition, isNotNull);
+    expect(forParts.rightSeparator, isNotNull);
+    expect(forParts.updaters, hasLength(1));
     expect(forStatement.rightParenthesis, isNotNull);
     expect(forStatement.body, isNotNull);
   }
@@ -14736,15 +14872,15 @@
     assertNoErrors();
     expect(forStatement.forKeyword, isNotNull);
     expect(forStatement.leftParenthesis, isNotNull);
-    VariableDeclarationList variables = forStatement.variables;
+    var forParts = forStatement.forLoopParts as ForPartsWithDeclarations;
+    VariableDeclarationList variables = forParts.variables;
     expect(variables, isNotNull);
     expect(variables.metadata, hasLength(0));
     expect(variables.variables, hasLength(1));
-    expect(forStatement.initialization, isNull);
-    expect(forStatement.leftSeparator, isNotNull);
-    expect(forStatement.condition, isNull);
-    expect(forStatement.rightSeparator, isNotNull);
-    expect(forStatement.updaters, hasLength(0));
+    expect(forParts.leftSeparator, isNotNull);
+    expect(forParts.condition, isNull);
+    expect(forParts.rightSeparator, isNotNull);
+    expect(forParts.updaters, hasLength(0));
     expect(forStatement.rightParenthesis, isNotNull);
     expect(forStatement.body, isNotNull);
   }
@@ -14757,15 +14893,15 @@
     assertNoErrors();
     expect(forStatement.forKeyword, isNotNull);
     expect(forStatement.leftParenthesis, isNotNull);
-    VariableDeclarationList variables = forStatement.variables;
+    var forParts = forStatement.forLoopParts as ForPartsWithDeclarations;
+    VariableDeclarationList variables = forParts.variables;
     expect(variables, isNotNull);
     expect(variables.metadata, hasLength(1));
     expect(variables.variables, hasLength(1));
-    expect(forStatement.initialization, isNull);
-    expect(forStatement.leftSeparator, isNotNull);
-    expect(forStatement.condition, isNull);
-    expect(forStatement.rightSeparator, isNotNull);
-    expect(forStatement.updaters, hasLength(0));
+    expect(forParts.leftSeparator, isNotNull);
+    expect(forParts.condition, isNull);
+    expect(forParts.rightSeparator, isNotNull);
+    expect(forParts.updaters, hasLength(0));
     expect(forStatement.rightParenthesis, isNotNull);
     expect(forStatement.body, isNotNull);
   }
@@ -14778,14 +14914,14 @@
     assertNoErrors();
     expect(forStatement.forKeyword, isNotNull);
     expect(forStatement.leftParenthesis, isNotNull);
-    VariableDeclarationList variables = forStatement.variables;
+    var forParts = forStatement.forLoopParts as ForPartsWithDeclarations;
+    VariableDeclarationList variables = forParts.variables;
     expect(variables, isNotNull);
     expect(variables.variables, hasLength(1));
-    expect(forStatement.initialization, isNull);
-    expect(forStatement.leftSeparator, isNotNull);
-    expect(forStatement.condition, isNotNull);
-    expect(forStatement.rightSeparator, isNotNull);
-    expect(forStatement.updaters, hasLength(0));
+    expect(forParts.leftSeparator, isNotNull);
+    expect(forParts.condition, isNotNull);
+    expect(forParts.rightSeparator, isNotNull);
+    expect(forParts.updaters, hasLength(0));
     expect(forStatement.rightParenthesis, isNotNull);
     expect(forStatement.body, isNotNull);
   }
@@ -14798,14 +14934,14 @@
     assertNoErrors();
     expect(forStatement.forKeyword, isNotNull);
     expect(forStatement.leftParenthesis, isNotNull);
-    VariableDeclarationList variables = forStatement.variables;
+    var forParts = forStatement.forLoopParts as ForPartsWithDeclarations;
+    VariableDeclarationList variables = forParts.variables;
     expect(variables, isNotNull);
     expect(variables.variables, hasLength(1));
-    expect(forStatement.initialization, isNull);
-    expect(forStatement.leftSeparator, isNotNull);
-    expect(forStatement.condition, isNotNull);
-    expect(forStatement.rightSeparator, isNotNull);
-    expect(forStatement.updaters, hasLength(1));
+    expect(forParts.leftSeparator, isNotNull);
+    expect(forParts.condition, isNotNull);
+    expect(forParts.rightSeparator, isNotNull);
+    expect(forParts.updaters, hasLength(1));
     expect(forStatement.rightParenthesis, isNotNull);
     expect(forStatement.body, isNotNull);
   }
@@ -14819,14 +14955,14 @@
     assertNoErrors();
     expect(forStatement.forKeyword, isNotNull);
     expect(forStatement.leftParenthesis, isNotNull);
-    VariableDeclarationList variables = forStatement.variables;
+    var forParts = forStatement.forLoopParts as ForPartsWithDeclarations;
+    VariableDeclarationList variables = forParts.variables;
     expect(variables, isNotNull);
     expect(variables.variables, hasLength(2));
-    expect(forStatement.initialization, isNull);
-    expect(forStatement.leftSeparator, isNotNull);
-    expect(forStatement.condition, isNotNull);
-    expect(forStatement.rightSeparator, isNotNull);
-    expect(forStatement.updaters, hasLength(2));
+    expect(forParts.leftSeparator, isNotNull);
+    expect(forParts.condition, isNotNull);
+    expect(forParts.rightSeparator, isNotNull);
+    expect(forParts.updaters, hasLength(2));
     expect(forStatement.rightParenthesis, isNotNull);
     expect(forStatement.body, isNotNull);
   }
@@ -14839,14 +14975,14 @@
     assertNoErrors();
     expect(forStatement.forKeyword, isNotNull);
     expect(forStatement.leftParenthesis, isNotNull);
-    VariableDeclarationList variables = forStatement.variables;
+    var forParts = forStatement.forLoopParts as ForPartsWithDeclarations;
+    VariableDeclarationList variables = forParts.variables;
     expect(variables, isNotNull);
     expect(variables.variables, hasLength(1));
-    expect(forStatement.initialization, isNull);
-    expect(forStatement.leftSeparator, isNotNull);
-    expect(forStatement.condition, isNull);
-    expect(forStatement.rightSeparator, isNotNull);
-    expect(forStatement.updaters, hasLength(1));
+    expect(forParts.leftSeparator, isNotNull);
+    expect(forParts.condition, isNull);
+    expect(forParts.rightSeparator, isNotNull);
+    expect(forParts.updaters, hasLength(1));
     expect(forStatement.rightParenthesis, isNotNull);
     expect(forStatement.body, isNotNull);
   }
@@ -14858,12 +14994,12 @@
     assertNoErrors();
     expect(forStatement.forKeyword, isNotNull);
     expect(forStatement.leftParenthesis, isNotNull);
-    expect(forStatement.variables, isNull);
-    expect(forStatement.initialization, isNull);
-    expect(forStatement.leftSeparator, isNotNull);
-    expect(forStatement.condition, isNull);
-    expect(forStatement.rightSeparator, isNotNull);
-    expect(forStatement.updaters, hasLength(1));
+    var forParts = forStatement.forLoopParts as ForPartsWithExpression;
+    expect(forParts.initialization, isNull);
+    expect(forParts.leftSeparator, isNotNull);
+    expect(forParts.condition, isNull);
+    expect(forParts.rightSeparator, isNotNull);
+    expect(forParts.updaters, hasLength(1));
     expect(forStatement.rightParenthesis, isNotNull);
     expect(forStatement.body, isNotNull);
   }
diff --git a/pkg/analyzer/test/generated/resolver_driver_test.dart b/pkg/analyzer/test/generated/resolver_driver_test.dart
deleted file mode 100644
index 74af34f..0000000
--- a/pkg/analyzer/test/generated/resolver_driver_test.dart
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import 'resolver_test.dart';
-
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(StrictModeTest_Driver);
-    defineReflectiveTests(TypePropagationTest_Driver);
-  });
-}
-
-@reflectiveTest
-class StrictModeTest_Driver extends StrictModeTest {
-  @override
-  bool get enableNewAnalysisDriver => true;
-}
-
-@reflectiveTest
-class TypePropagationTest_Driver extends TypePropagationTest {
-  @override
-  bool get enableNewAnalysisDriver => true;
-}
diff --git a/pkg/analyzer/test/generated/resolver_test.dart b/pkg/analyzer/test/generated/resolver_test.dart
index 5d5b657..3da22d1 100644
--- a/pkg/analyzer/test/generated/resolver_test.dart
+++ b/pkg/analyzer/test/generated/resolver_test.dart
@@ -45,6 +45,8 @@
     defineReflectiveTests(LibraryScopeTest);
     defineReflectiveTests(PrefixedNamespaceTest);
     defineReflectiveTests(ScopeTest);
+    defineReflectiveTests(StrictModeTest);
+    defineReflectiveTests(TypePropagationTest);
     defineReflectiveTests(TypeProviderImplTest);
     defineReflectiveTests(TypeResolverVisitorTest);
   });
@@ -166,7 +168,7 @@
 @reflectiveTest
 class ErrorResolverTest extends DriverResolutionTest {
   test_breakLabelOnSwitchMember() async {
-    assertErrorsInCode(r'''
+    assertErrorCodesInCode(r'''
 class A {
   void m(int i) {
     switch (i) {
@@ -180,7 +182,7 @@
   }
 
   test_continueLabelOnSwitch() async {
-    assertErrorsInCode(r'''
+    assertErrorCodesInCode(r'''
 class A {
   void m(int i) {
     l: switch (i) {
@@ -199,7 +201,7 @@
   }
 }''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       ParserErrorCode.MISSING_FUNCTION_PARAMETERS,
       ParserErrorCode.EXPECTED_TOKEN
     ]);
@@ -568,22 +570,11 @@
 }
 
 /**
- * The class `StrictModeTest` contains tests to ensure that the correct errors and warnings
- * are reported when the analysis engine is run in strict mode.
+ * The class `StrictModeTest` contains tests to ensure that the correct errors
+ * and warnings are reported when the analysis engine is run in strict mode.
  */
-abstract class StrictModeTest extends ResolverTestCase {
-  fail_for() async {
-    Source source = addSource(r'''
-int f(List<int> list) {
-  num sum = 0;
-  for (num i = 0; i < list.length; i++) {
-    sum += list[i];
-  }
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
-  }
-
+@reflectiveTest
+class StrictModeTest extends ResolverTestCase {
   @override
   void setUp() {
     AnalysisOptionsImpl options = new AnalysisOptionsImpl();
@@ -637,6 +628,19 @@
     assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
   }
 
+  @failingTest
+  test_for() async {
+    Source source = addSource(r'''
+int f(List<int> list) {
+  num sum = 0;
+  for (num i = 0; i < list.length; i++) {
+    sum += list[i];
+  }
+}''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+  }
+
   test_forEach() async {
     Source source = addSource(r'''
 int f(List<int> list) {
@@ -722,17 +726,8 @@
   }
 }
 
-abstract class TypePropagationTest extends ResolverTestCase {
-  fail_propagatedReturnType_functionExpression() async {
-    // TODO(scheglov) disabled because we don't resolve function expression
-    String code = r'''
-main() {
-  var v = (() {return 42;})();
-}''';
-    CompilationUnit unit = await resolveSource(code);
-    assertAssignedType(code, unit, typeProvider.dynamicType);
-  }
-
+@reflectiveTest
+class TypePropagationTest extends ResolverTestCase {
   test_assignment_null() async {
     String code = r'''
 main() {
@@ -1000,6 +995,17 @@
     expect(methodInvoke.staticType, typeProvider.dynamicType);
   }
 
+  @failingTest
+  test_propagatedReturnType_functionExpression() async {
+    // TODO(scheglov) disabled because we don't resolve function expression
+    String code = r'''
+main() {
+  var v = (() {return 42;})();
+}''';
+    CompilationUnit unit = await resolveSource(code);
+    assertAssignedType(code, unit, typeProvider.dynamicType);
+  }
+
   /**
    * Return the resolved unit for the given [source].
    *
diff --git a/pkg/analyzer/test/generated/resolver_test_case.dart b/pkg/analyzer/test/generated/resolver_test_case.dart
index a682c9d..9f11907 100644
--- a/pkg/analyzer/test/generated/resolver_test_case.dart
+++ b/pkg/analyzer/test/generated/resolver_test_case.dart
@@ -313,11 +313,6 @@
 
 class ResolverTestCase extends EngineTestCase with ResourceProviderMixin {
   /**
-   * The analysis context used to parse the compilation units being resolved.
-   */
-  InternalAnalysisContext analysisContext2;
-
-  /**
    * Specifies if [assertErrors] should check for [HintCode.UNUSED_ELEMENT] and
    * [HintCode.UNUSED_FIELD].
    */
@@ -334,10 +329,7 @@
   FileContentOverlay fileContentOverlay = new FileContentOverlay();
   AnalysisDriver driver;
 
-  AnalysisContext get analysisContext => analysisContext2;
-
-  AnalysisOptions get analysisOptions =>
-      analysisContext?.analysisOptions ?? driver?.analysisOptions;
+  AnalysisOptions get analysisOptions => driver?.analysisOptions;
 
   /**
    * The default [AnalysisOptions] that should be used by [reset].
@@ -350,38 +342,27 @@
    */
   List<String> get enabledExperiments => null;
 
-  bool get enableNewAnalysisDriver => false;
-
   /**
    * Return a type provider that can be used to test the results of resolution.
    *
-   * @return a type provider
-   * @throws AnalysisException if dart:core cannot be resolved
+   * Throws an [AnalysisException] if `dart:core` cannot be resolved.
    */
   TypeProvider get typeProvider {
-    if (enableNewAnalysisDriver) {
-      if (analysisResults.isEmpty) {
-        fail('typeProvider called before computing an analysis result.');
-      }
-      return analysisResults
-          .values.first.unit.declaredElement.context.typeProvider;
-    } else {
-      return analysisContext2.typeProvider;
+    if (analysisResults.isEmpty) {
+      fail('typeProvider called before computing an analysis result.');
     }
+    return analysisResults
+        .values.first.unit.declaredElement.context.typeProvider;
   }
 
   /**
    * Return a type system that can be used to test the results of resolution.
    */
   TypeSystem get typeSystem {
-    if (enableNewAnalysisDriver) {
-      if (analysisResults.isEmpty) {
-        fail('typeSystem called before computing an analysis result.');
-      }
-      return analysisResults.values.first.typeSystem;
-    } else {
-      return analysisContext2.typeSystem;
+    if (analysisResults.isEmpty) {
+      fail('typeSystem called before computing an analysis result.');
     }
+    return analysisResults.values.first.typeSystem;
   }
 
   /**
@@ -393,14 +374,7 @@
     filePath = convertPath(filePath);
     File file = newFile(filePath, content: contents);
     Source source = file.createSource();
-    if (enableNewAnalysisDriver) {
-      driver.addFile(filePath);
-    } else {
-      analysisContext2.setContents(source, contents);
-      ChangeSet changeSet = new ChangeSet();
-      changeSet.addedSource(source);
-      analysisContext2.applyChanges(changeSet);
-    }
+    driver.addFile(filePath);
     return source;
   }
 
@@ -523,33 +497,11 @@
     expect(identifier.staticType, expectedStaticType);
   }
 
-  /**
-   * Change the contents of the given [source] to the given [contents].
-   */
-  void changeSource(Source source, String contents) {
-    analysisContext2.setContents(source, contents);
-    ChangeSet changeSet = new ChangeSet();
-    changeSet.changedSource(source);
-    analysisContext2.applyChanges(changeSet);
-  }
-
   Future<TestAnalysisResult> computeAnalysisResult(Source source) async {
     TestAnalysisResult analysisResult;
-    if (enableNewAnalysisDriver) {
-      ResolvedUnitResult result = await driver.getResult(source.fullName);
-      analysisResult = new TestAnalysisResult(
-          source, result.unit, result.errors, result.typeSystem);
-    } else {
-      analysisContext2.computeKindOf(source);
-      List<Source> libraries = analysisContext2.getLibrariesContaining(source);
-      if (libraries.length > 0) {
-        CompilationUnit unit =
-            analysisContext.resolveCompilationUnit2(source, libraries.first);
-        List<AnalysisError> errors = analysisContext.computeErrors(source);
-        analysisResult = new TestAnalysisResult(
-            source, unit, errors, analysisContext2.typeSystem);
-      }
-    }
+    ResolvedUnitResult result = await driver.getResult(source.fullName);
+    analysisResult = new TestAnalysisResult(
+        source, result.unit, result.errors, result.typeSystem);
     analysisResults[source] = analysisResult;
     return analysisResult;
   }
@@ -574,13 +526,10 @@
       "test");
 
   /**
-   * Create a source object representing a file with the given [fileName] and
-   * give it an empty content. Return the source that was created.
+   * Return a source object representing a file with the given [fileName].
    */
   Source createNamedSource(String fileName) {
-    Source source = getFile(fileName).createSource();
-    analysisContext2.setContents(source, '');
-    return source;
+    return getFile(fileName).createSource();
   }
 
   /**
@@ -676,84 +625,39 @@
     if (experiments != null) {
       (options as AnalysisOptionsImpl).enabledExperiments = experiments;
     }
-    if (enableNewAnalysisDriver) {
-      DartSdk sdk = new MockSdk(resourceProvider: resourceProvider)
-        ..context.analysisOptions = options;
+    DartSdk sdk = new MockSdk(resourceProvider: resourceProvider)
+      ..context.analysisOptions = options;
 
-      List<UriResolver> resolvers = <UriResolver>[
-        new DartUriResolver(sdk),
-        new ResourceUriResolver(resourceProvider)
-      ];
-      if (packages != null) {
-        var packageMap = <String, List<Folder>>{};
-        packages.forEach((args) {
-          String name = args[0];
-          String content = args[1];
-          File file = newFile('/packages/$name/$name.dart', content: content);
-          packageMap[name] = <Folder>[file.parent];
-        });
-        resolvers.add(new PackageMapUriResolver(resourceProvider, packageMap));
-      }
-      SourceFactory sourceFactory = new SourceFactory(resolvers);
-
-      PerformanceLog log = new PerformanceLog(_logBuffer);
-      AnalysisDriverScheduler scheduler = new AnalysisDriverScheduler(log);
-      driver = new AnalysisDriver(
-          scheduler,
-          log,
-          resourceProvider,
-          new MemoryByteStore(),
-          fileContentOverlay,
-          null,
-          sourceFactory,
-          options);
-      scheduler.start();
-    } else {
-      if (packages != null) {
-        var packageMap = <String, String>{};
-        packages.forEach((args) {
-          String name = args[0];
-          String content = args[1];
-          packageMap[name] = content;
-        });
-        analysisContext2 = AnalysisContextFactory.contextWithCoreAndPackages(
-            packageMap,
-            resourceProvider: resourceProvider);
-      } else if (options != null) {
-        analysisContext2 = AnalysisContextFactory.contextWithCoreAndOptions(
-            options,
-            resourceProvider: resourceProvider);
-      } else {
-        analysisContext2 = AnalysisContextFactory.contextWithCore(
-            resourceProvider: resourceProvider);
-      }
+    List<UriResolver> resolvers = <UriResolver>[
+      new DartUriResolver(sdk),
+      new ResourceUriResolver(resourceProvider)
+    ];
+    if (packages != null) {
+      var packageMap = <String, List<Folder>>{};
+      packages.forEach((args) {
+        String name = args[0];
+        String content = args[1];
+        File file = newFile('/packages/$name/$name.dart', content: content);
+        packageMap[name] = <Folder>[file.parent];
+      });
+      resolvers.add(new PackageMapUriResolver(resourceProvider, packageMap));
     }
+    SourceFactory sourceFactory = new SourceFactory(resolvers);
+
+    PerformanceLog log = new PerformanceLog(_logBuffer);
+    AnalysisDriverScheduler scheduler = new AnalysisDriverScheduler(log);
+    driver = new AnalysisDriver(
+        scheduler,
+        log,
+        resourceProvider,
+        new MemoryByteStore(),
+        fileContentOverlay,
+        null,
+        sourceFactory,
+        options);
+    scheduler.start();
   }
 
-  /**
-   * Given a library and all of its parts, resolve the contents of the library and the contents of
-   * the parts. This assumes that the sources for the library and its parts have already been added
-   * to the content provider using the method [addNamedSource].
-   *
-   * @param librarySource the source for the compilation unit that defines the library
-   * @return the element representing the resolved library
-   * @throws AnalysisException if the analysis could not be performed
-   */
-  LibraryElement resolve2(Source librarySource) =>
-      analysisContext2.computeLibraryElement(librarySource);
-
-  /**
-   * Return the resolved compilation unit corresponding to the given source in the given library.
-   *
-   * @param source the source of the compilation unit to be returned
-   * @param library the library in which the compilation unit is to be resolved
-   * @return the resolved compilation unit
-   * @throws Exception if the compilation unit could not be resolved
-   */
-  CompilationUnit resolveCompilationUnit(
-          Source source, LibraryElement library) =>
-      analysisContext2.resolveCompilationUnit(source, library);
-
   Future<CompilationUnit> resolveSource(String sourceText) =>
       resolveSource2('/test.dart', sourceText);
 
@@ -814,7 +718,6 @@
 
   @override
   void tearDown() {
-    analysisContext2 = null;
     AnalysisEngine.instance.clearCaches();
     super.tearDown();
   }
diff --git a/pkg/analyzer/test/generated/scanner_test.dart b/pkg/analyzer/test/generated/scanner_test.dart
index 62165ac..79a88bf 100644
--- a/pkg/analyzer/test/generated/scanner_test.dart
+++ b/pkg/analyzer/test/generated/scanner_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/generated/simple_resolver_test.dart b/pkg/analyzer/test/generated/simple_resolver_test.dart
index a4d99bb..47bfbff 100644
--- a/pkg/analyzer/test/generated/simple_resolver_test.dart
+++ b/pkg/analyzer/test/generated/simple_resolver_test.dart
@@ -260,7 +260,7 @@
 ''');
     await resolveTestFile();
 
-    var forStatement = findNode.forEachStatement('for (');
+    var forStatement = findNode.forStatement('for (');
     var breakStatement = findNode.breakStatement('break;');
     expect(breakStatement.target, same(forStatement));
   }
@@ -397,7 +397,7 @@
 ''');
     await resolveTestFile();
 
-    var forStatement = findNode.forEachStatement('for (');
+    var forStatement = findNode.forStatement('for (');
     var continueStatement = findNode.continueStatement('continue;');
     expect(continueStatement.target, same(forStatement));
   }
@@ -715,7 +715,8 @@
   a.f = a.f.toString();
 }''');
     await resolveTestFile();
-    assertTestErrors([StaticWarningCode.MISMATCHED_GETTER_AND_SETTER_TYPES]);
+    assertTestErrorsWithCodes(
+        [StaticWarningCode.MISMATCHED_GETTER_AND_SETTER_TYPES]);
     verifyTestResolved();
   }
 
@@ -795,7 +796,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
+    assertTestErrorsWithCodes([CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
     verifyTestResolved();
   }
 
@@ -823,7 +824,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
+    assertTestErrorsWithCodes([CompileTimeErrorCode.URI_DOES_NOT_EXIST]);
     verifyTestResolved();
   }
 
@@ -862,7 +863,7 @@
   b[0][0] = 'hi';
 }''');
     await resolveTestFile();
-    assertTestErrors([StaticTypeWarningCode.INVALID_ASSIGNMENT]);
+    assertTestErrorsWithCodes([StaticTypeWarningCode.INVALID_ASSIGNMENT]);
     verifyTestResolved();
   }
 
@@ -903,7 +904,8 @@
 class B {}
 class C = Object with A;''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.MIXIN_INHERITS_FROM_NOT_OBJECT]);
     verifyTestResolved();
 
     var a = findElement.class_('A');
@@ -917,7 +919,7 @@
 }
 class C = Object with A;''');
     await resolveTestFile();
-    assertTestErrors(
+    assertTestErrorsWithCodes(
       [CompileTimeErrorCode.MIXIN_CLASS_DECLARES_CONSTRUCTOR],
     );
     verifyTestResolved();
@@ -949,7 +951,7 @@
 }
 class C = Object with A;''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.MIXIN_REFERENCES_SUPER]);
+    assertTestErrorsWithCodes([CompileTimeErrorCode.MIXIN_REFERENCES_SUPER]);
     verifyTestResolved();
 
     var a = findElement.class_('A');
diff --git a/pkg/analyzer/test/generated/source_factory_test.dart b/pkg/analyzer/test/generated/source_factory_test.dart
index 767de68..ad4c7bd 100644
--- a/pkg/analyzer/test/generated/source_factory_test.dart
+++ b/pkg/analyzer/test/generated/source_factory_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/generated/static_type_analyzer_driver_test.dart b/pkg/analyzer/test/generated/static_type_analyzer_driver_test.dart
deleted file mode 100644
index 9aa12df..0000000
--- a/pkg/analyzer/test/generated/static_type_analyzer_driver_test.dart
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import 'static_type_analyzer_test.dart';
-
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(StaticTypeAnalyzer2Test_Driver);
-  });
-}
-
-@reflectiveTest
-class StaticTypeAnalyzer2Test_Driver extends StaticTypeAnalyzer2Test {
-  @override
-  bool get enableNewAnalysisDriver => true;
-}
diff --git a/pkg/analyzer/test/generated/static_type_analyzer_test.dart b/pkg/analyzer/test/generated/static_type_analyzer_test.dart
index c6bafc8..aebb310 100644
--- a/pkg/analyzer/test/generated/static_type_analyzer_test.dart
+++ b/pkg/analyzer/test/generated/static_type_analyzer_test.dart
@@ -8,7 +8,6 @@
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/inheritance_manager2.dart';
@@ -35,8 +34,10 @@
   defineReflectiveSuite(() {
     defineReflectiveTests(SetLiteralsTest);
     defineReflectiveTests(StaticTypeAnalyzerTest);
+    defineReflectiveTests(StaticTypeAnalyzer2Test);
     defineReflectiveTests(StaticTypeAnalyzer3Test);
     defineReflectiveTests(StaticTypeAnalyzerWithSetLiteralsTest);
+    defineReflectiveTests(StaticTypeAnalyzerWithStrictInferenceTest);
   });
 }
 
@@ -51,12 +52,6 @@
 
 @reflectiveTest
 class SetLiteralsTest extends StaticTypeAnalyzer2TestShared {
-  @override
-  List<String> get enabledExperiments => [EnableString.set_literals];
-
-  @override
-  bool get enableNewAnalysisDriver => true;
-
   test_emptySetLiteral_parameter_typed() async {
     String code = r'''
 main() {
@@ -73,7 +68,8 @@
 /**
  * Like [StaticTypeAnalyzerTest], but as end-to-end tests.
  */
-abstract class StaticTypeAnalyzer2Test extends StaticTypeAnalyzer2TestShared {
+@reflectiveTest
+class StaticTypeAnalyzer2Test extends StaticTypeAnalyzer2TestShared {
   test_FunctionExpressionInvocation_block() async {
     String code = r'''
 main() {
@@ -208,8 +204,6 @@
  */
 @reflectiveTest
 class StaticTypeAnalyzer3Test extends StaticTypeAnalyzer2TestShared {
-  bool get enableNewAnalysisDriver => true;
-
   test_emptyMapLiteral_initializer_var() async {
     String code = r'''
 main() {
@@ -1180,7 +1174,7 @@
 
   void test_visitMapLiteral_empty() {
     // {}
-    Expression node = AstTestFactory.mapLiteral2();
+    Expression node = AstTestFactory.setOrMapLiteral(null, null);
     DartType resultType = _analyze(node);
     _assertType2(
         _typeProvider.mapType.instantiate(
@@ -1191,8 +1185,8 @@
 
   void test_visitMapLiteral_nonEmpty() {
     // {"k" : 0}
-    Expression node = AstTestFactory.mapLiteral2(
-        [AstTestFactory.mapLiteralEntry("k", _resolvedInteger(0))]);
+    Expression node = AstTestFactory.setOrMapLiteral(
+        null, null, [AstTestFactory.mapLiteralEntry("k", _resolvedInteger(0))]);
     DartType resultType = _analyze(node);
     _assertType2(
         _typeProvider.mapType.instantiate(
@@ -1663,18 +1657,13 @@
 @reflectiveTest
 class StaticTypeAnalyzerWithSetLiteralsTest
     extends StaticTypeAnalyzer2TestShared {
-  @override
-  List<String> get enabledExperiments => [EnableString.set_literals];
-
-  bool get enableNewAnalysisDriver => true;
-
   test_emptySetLiteral_inferredFromLinkedHashSet() async {
     String code = r'''
 import 'dart:collection';
 LinkedHashSet<int> test4() => {};
 ''';
     await resolveTestUnit(code, noErrors: false);
-    expectExpressionType('{}', 'Set<?>');
+    expectExpressionType('{}', 'Set<dynamic>');
     await assertErrorsInCode(code, [StrongModeCode.INVALID_CAST_LITERAL_SET]);
   }
 
@@ -1687,3 +1676,80 @@
     expectExpressionType('{{}}', 'Set<Set<int>>');
   }
 }
+
+/**
+ * Tests of the static type analyzer with "strict-inference" enabled.
+ */
+@reflectiveTest
+class StaticTypeAnalyzerWithStrictInferenceTest
+    extends StaticTypeAnalyzer2TestShared {
+  @override
+  void setUp() {
+    super.setUp();
+    AnalysisOptionsImpl options = new AnalysisOptionsImpl();
+    options.strictInference = true;
+    resetWith(options: options);
+  }
+
+  test_localVariable() async {
+    String code = r'''
+f() {
+  var a;
+}
+''';
+    await resolveTestUnit(code, noErrors: false);
+    await assertErrorsInCode(
+        code, [HintCode.INFERENCE_FAILURE_ON_UNINITIALIZED_VARIABLE]);
+  }
+
+  test_localVariable_withInitializer() async {
+    String code = r'''
+f() {
+  var a = 7;
+}
+''';
+    await resolveTestUnit(code, noErrors: false);
+    await assertNoErrorsInCode(code);
+  }
+
+  test_localVariable_withType() async {
+    String code = r'''
+f() {
+  int a;
+  dynamic b;
+  Object c;
+  Null d;
+}
+''';
+    await resolveTestUnit(code, noErrors: false);
+    await assertNoErrorsInCode(code);
+  }
+
+  test_topLevelVariable() async {
+    String code = r'''
+var a;
+''';
+    await resolveTestUnit(code, noErrors: false);
+    await assertErrorsInCode(
+        code, [HintCode.INFERENCE_FAILURE_ON_UNINITIALIZED_VARIABLE]);
+  }
+
+  test_topLevelVariable_withInitializer() async {
+    String code = r'''
+var a = 7;
+''';
+    await resolveTestUnit(code, noErrors: false);
+    await assertNoErrorsInCode(code);
+  }
+
+  test_topLevelVariable_withType() async {
+    String code = r'''
+int a;
+dynamic b;
+Object c;
+Null d;
+''';
+    await resolveTestUnit(code, noErrors: false);
+    await assertNoErrorsInCode(code);
+  }
+}
diff --git a/pkg/analyzer/test/generated/static_type_warning_code.dart b/pkg/analyzer/test/generated/static_type_warning_code.dart
deleted file mode 100644
index 01f0538..0000000
--- a/pkg/analyzer/test/generated/static_type_warning_code.dart
+++ /dev/null
@@ -1,1755 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/source_io.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import 'resolver_test_case.dart';
-
-abstract class StaticTypeWarningCodeTest extends ResolverTestCase {
-  fail_undefinedEnumConstant() async {
-    // We need a way to set the parseEnum flag in the parser to true.
-    await assertErrorsInCode(r'''
-enum E { ONE }
-E e() {
-  return E.TWO;
-}''', [StaticTypeWarningCode.UNDEFINED_ENUM_CONSTANT]);
-  }
-
-  test_assert_message_suppresses_type_promotion() async {
-    // If a variable is assigned to inside the expression for an assert
-    // message, type promotion should be suppressed, just as it would be if the
-    // assignment occurred outside an assert statement.  (Note that it is a
-    // dubious practice for the computation of an assert message to have side
-    // effects, since it is only evaluated if the assert fails).
-    await assertErrorsInCode('''
-class C {
-  void foo() {}
-}
-
-f(Object x) {
-  if (x is C) {
-    x.foo();
-    assert(true, () { x = new C(); return 'msg'; }());
-  }
-}
-''', [StaticTypeWarningCode.UNDEFINED_METHOD]);
-    // Do not verify since `x.foo()` fails to resolve.
-  }
-
-  test_await_flattened() async {
-    await assertErrorsInCode('''
-import 'dart:async';
-Future<Future<int>> ffi() => null;
-f() async {
-  Future<int> b = await ffi(); 
-}
-''', []);
-  }
-
-  test_await_simple() async {
-    await assertErrorsInCode('''
-import 'dart:async';
-Future<int> fi() => null;
-f() async {
-  String a = await fi(); // Warning: int not assignable to String
-}
-''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-  }
-
-  test_awaitForIn_declaredVariableRightType() async {
-    await assertNoErrorsInCode('''
-import 'dart:async';
-f() async {
-  Stream<int> stream;
-  await for (int i in stream) {}
-}
-''');
-  }
-
-  test_awaitForIn_declaredVariableWrongType() async {
-    await assertErrorsInCode('''
-import 'dart:async';
-f() async {
-  Stream<String> stream;
-  await for (int i in stream) {}
-}
-''', [StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE]);
-  }
-
-  test_awaitForIn_downcast() async {
-    await assertNoErrorsInCode('''
-import 'dart:async';
-f() async {
-  Stream<num> stream;
-  await for (int i in stream) {}
-}
-''');
-  }
-
-  test_awaitForIn_dynamicStream() async {
-    await assertNoErrorsInCode('''
-f() async {
-  dynamic stream;
-  await for (int i in stream) {}
-}
-''');
-  }
-
-  test_awaitForIn_dynamicVariable() async {
-    await assertNoErrorsInCode('''
-import 'dart:async';
-f() async {
-  Stream<int> stream;
-  await for (var i in stream) {}
-}
-''');
-  }
-
-  test_awaitForIn_existingVariableRightType() async {
-    await assertNoErrorsInCode('''
-import 'dart:async';
-f() async {
-  Stream<int> stream;
-  int i;
-  await for (i in stream) {}
-}
-''');
-  }
-
-  test_awaitForIn_existingVariableWrongType() async {
-    await assertErrorsInCode('''
-import 'dart:async';
-f() async {
-  Stream<String> stream;
-  int i;
-  await for (i in stream) {}
-}
-''', [StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE]);
-  }
-
-  test_awaitForIn_notStream() async {
-    await assertErrorsInCode('''
-f() async {
-  await for (var i in true) {}
-}
-''', [StaticTypeWarningCode.FOR_IN_OF_INVALID_TYPE]);
-  }
-
-  test_awaitForIn_streamOfDynamic() async {
-    await assertNoErrorsInCode('''
-import 'dart:async';
-f() async {
-  Stream stream;
-  await for (int i in stream) {}
-}
-''');
-  }
-
-  test_awaitForIn_upcast() async {
-    await assertNoErrorsInCode('''
-import 'dart:async';
-f() async {
-  Stream<int> stream;
-  await for (num i in stream) {}
-}
-''');
-  }
-
-  test_bug21912() async {
-    await assertErrorsInCode('''
-class A {}
-class B extends A {}
-
-typedef T Function2<S, T>(S z);
-typedef B AToB(A x);
-typedef A BToA(B x);
-
-void main() {
-  {
-    Function2<Function2<A, B>, Function2<B, A>> t1;
-    Function2<AToB, BToA> t2;
-
-    Function2<Function2<int, double>, Function2<int, double>> left;
-
-    left = t1;
-    left = t2;
-  }
-}
-''', [
-      StaticTypeWarningCode.INVALID_ASSIGNMENT,
-      StaticTypeWarningCode.INVALID_ASSIGNMENT
-    ]);
-  }
-
-  test_expectedOneListTypeArgument() async {
-    await assertErrorsInCode(r'''
-main() {
-  <int, int> [];
-}''', [StaticTypeWarningCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS]);
-  }
-
-  @failingTest
-  test_expectedOneSetTypeArgument() async {
-    await assertErrorsInCode(r'''
-main() {
-  <int, int>{2, 3};
-}''', [StaticTypeWarningCode.EXPECTED_ONE_SET_TYPE_ARGUMENTS]);
-  }
-
-  test_expectedTwoMapTypeArguments_three() async {
-    await assertErrorsInCode(r'''
-main() {
-  <int, int, int> {};
-}''', [StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS]);
-  }
-
-  test_forIn_declaredVariableRightType() async {
-    await assertNoErrorsInCode('''
-f() {
-  for (int i in <int>[]) {}
-}
-''');
-  }
-
-  test_forIn_declaredVariableWrongType() async {
-    await assertErrorsInCode('''
-f() {
-  for (int i in <String>[]) {}
-}
-''', [StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE]);
-  }
-
-  test_forIn_downcast() async {
-    await assertNoErrorsInCode('''
-f() {
-  for (int i in <num>[]) {}
-}
-''');
-  }
-
-  test_forIn_dynamic() async {
-    await assertNoErrorsInCode('''
-f() {
-  dynamic d; // Could be [].
-  for (var i in d) {}
-}
-''');
-  }
-
-  test_forIn_dynamicIterable() async {
-    await assertNoErrorsInCode('''
-f() {
-  dynamic iterable;
-  for (int i in iterable) {}
-}
-''');
-  }
-
-  test_forIn_dynamicVariable() async {
-    await assertNoErrorsInCode('''
-f() {
-  for (var i in <int>[]) {}
-}
-''');
-  }
-
-  test_forIn_existingVariableRightType() async {
-    await assertNoErrorsInCode('''
-f() {
-  int i;
-  for (i in <int>[]) {}
-}
-''');
-  }
-
-  test_forIn_existingVariableWrongType() async {
-    await assertErrorsInCode('''
-f() {
-  int i;
-  for (i in <String>[]) {}
-}
-''', [StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE]);
-  }
-
-  test_forIn_iterableOfDynamic() async {
-    await assertNoErrorsInCode('''
-f() {
-  for (int i in []) {}
-}
-''');
-  }
-
-  test_forIn_notIterable() async {
-    await assertErrorsInCode('''
-f() {
-  for (var i in true) {}
-}
-''', [StaticTypeWarningCode.FOR_IN_OF_INVALID_TYPE]);
-  }
-
-  test_forIn_object() async {
-    await assertNoErrorsInCode('''
-f() {
-  Object o; // Could be [].
-  for (var i in o) {}
-}
-''');
-  }
-
-  test_forIn_typeBoundBad() async {
-    await assertErrorsInCode('''
-class Foo<T extends Iterable<int>> {
-  void method(T iterable) {
-    for (String i in iterable) {}
-  }
-}
-''', [StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE]);
-  }
-
-  test_forIn_typeBoundGood() async {
-    await assertNoErrorsInCode('''
-class Foo<T extends Iterable<int>> {
-  void method(T iterable) {
-    for (var i in iterable) {}
-  }
-}
-''');
-  }
-
-  test_forIn_upcast() async {
-    await assertNoErrorsInCode('''
-f() {
-  for (num i in <int>[]) {}
-}
-''');
-  }
-
-  test_illegalAsyncGeneratorReturnType_function_nonStream() async {
-    await assertErrorsInCode('''
-int f() async* {}
-''', [StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE]);
-  }
-
-  test_illegalAsyncGeneratorReturnType_function_subtypeOfStream() async {
-    await assertErrorsInCode('''
-import 'dart:async';
-abstract class SubStream<T> implements Stream<T> {}
-SubStream<int> f() async* {}
-''', [StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE]);
-  }
-
-  test_illegalAsyncGeneratorReturnType_method_nonStream() async {
-    await assertErrorsInCode('''
-class C {
-  int f() async* {}
-}
-''', [StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE]);
-  }
-
-  test_illegalAsyncGeneratorReturnType_method_subtypeOfStream() async {
-    await assertErrorsInCode('''
-import 'dart:async';
-abstract class SubStream<T> implements Stream<T> {}
-class C {
-  SubStream<int> f() async* {}
-}
-''', [StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE]);
-  }
-
-  test_illegalAsyncReturnType_function_nonFuture() async {
-    await assertErrorsInCode('''
-int f() async {}
-''', [
-      StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE,
-      HintCode.MISSING_RETURN
-    ]);
-  }
-
-  test_illegalAsyncReturnType_function_subtypeOfFuture() async {
-    await assertErrorsInCode('''
-import 'dart:async';
-abstract class SubFuture<T> implements Future<T> {}
-SubFuture<int> f() async {
-  return 0;
-}
-''', [StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE]);
-  }
-
-  test_illegalAsyncReturnType_method_nonFuture() async {
-    await assertErrorsInCode('''
-class C {
-  int m() async {}
-}
-''', [
-      StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE,
-      HintCode.MISSING_RETURN
-    ]);
-  }
-
-  test_illegalAsyncReturnType_method_subtypeOfFuture() async {
-    await assertErrorsInCode('''
-import 'dart:async';
-abstract class SubFuture<T> implements Future<T> {}
-class C {
-  SubFuture<int> m() async {
-    return 0;
-  }
-}
-''', [StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE]);
-  }
-
-  test_illegalSyncGeneratorReturnType_function_nonIterator() async {
-    await assertErrorsInCode('''
-int f() sync* {}
-''', [StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE]);
-  }
-
-  test_illegalSyncGeneratorReturnType_function_subclassOfIterator() async {
-    await assertErrorsInCode('''
-abstract class SubIterator<T> implements Iterator<T> {}
-SubIterator<int> f() sync* {}
-''', [StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE]);
-  }
-
-  test_illegalSyncGeneratorReturnType_method_nonIterator() async {
-    await assertErrorsInCode('''
-class C {
-  int f() sync* {}
-}
-''', [StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE]);
-  }
-
-  test_illegalSyncGeneratorReturnType_method_subclassOfIterator() async {
-    await assertErrorsInCode('''
-abstract class SubIterator<T> implements Iterator<T> {}
-class C {
-  SubIterator<int> f() sync* {}
-}
-''', [StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE]);
-  }
-
-  test_instanceAccessToStaticMember_method_reference() async {
-    await assertErrorsInCode(r'''
-class A {
-  static m() {}
-}
-main(A a) {
-  a.m;
-}''', [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
-  }
-
-  test_instanceAccessToStaticMember_propertyAccess_field() async {
-    await assertErrorsInCode(r'''
-class A {
-  static var f;
-}
-main(A a) {
-  a.f;
-}''', [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
-  }
-
-  test_instanceAccessToStaticMember_propertyAccess_getter() async {
-    await assertErrorsInCode(r'''
-class A {
-  static get f => 42;
-}
-main(A a) {
-  a.f;
-}''', [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
-  }
-
-  test_instanceAccessToStaticMember_propertyAccess_setter() async {
-    await assertErrorsInCode(r'''
-class A {
-  static set f(x) {}
-}
-main(A a) {
-  a.f = 42;
-}''', [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
-  }
-
-  test_invalidAssignment_compoundAssignment() async {
-    await assertErrorsInCode(r'''
-class byte {
-  int _value;
-  byte(this._value);
-  int operator +(int val) { return 0; }
-}
-
-void main() {
-  byte b = new byte(52);
-  b += 3;
-}''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-  }
-
-  test_invalidAssignment_defaultValue_named() async {
-    await assertErrorsInCode(r'''
-f({String x: 0}) {
-}''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-  }
-
-  test_invalidAssignment_defaultValue_optional() async {
-    await assertErrorsInCode(r'''
-f([String x = 0]) {
-}''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-  }
-
-  test_invalidAssignment_dynamic() async {
-    await assertErrorsInCode(r'''
-main() {
-  dynamic = 1;
-}
-''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-  }
-
-  test_invalidAssignment_functionExpressionInvocation() async {
-    await assertErrorsInCode('''
-main() {
-  String x = (() => 5)();
-}''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-  }
-
-  test_invalidAssignment_ifNullAssignment() async {
-    await assertErrorsInCode('''
-void f(int i) {
-  double d;
-  d ??= i;
-}
-''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-  }
-
-  test_invalidAssignment_instanceVariable() async {
-    await assertErrorsInCode(r'''
-class A {
-  int x;
-}
-f() {
-  A a;
-  a.x = '0';
-}''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-  }
-
-  test_invalidAssignment_localVariable() async {
-    await assertErrorsInCode(r'''
-f() {
-  int x;
-  x = '0';
-}''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-  }
-
-  test_invalidAssignment_postfixExpression_localVariable() async {
-    await assertErrorsInCode(r'''
-class A {
-  B operator+(_) => new B();
-}
-
-class B {}
-
-f(A a) {
-  a++;
-}
-''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-  }
-
-  test_invalidAssignment_postfixExpression_property() async {
-    await assertErrorsInCode(r'''
-class A {
-  B operator+(_) => new B();
-}
-
-class B {}
-
-class C {
-  A a;
-}
-
-f(C c) {
-  c.a++;
-}
-''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-  }
-
-  test_invalidAssignment_prefixExpression_localVariable() async {
-    await assertErrorsInCode(r'''
-class A {
-  B operator+(_) => new B();
-}
-
-class B {}
-
-f(A a) {
-  ++a;
-}
-''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-  }
-
-  test_invalidAssignment_prefixExpression_property() async {
-    await assertErrorsInCode(r'''
-class A {
-  B operator+(_) => new B();
-}
-
-class B {}
-
-class C {
-  A a;
-}
-
-f(C c) {
-  ++c.a;
-}
-''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-  }
-
-  test_invalidAssignment_regressionInIssue18468Fix() async {
-    // https://code.google.com/p/dart/issues/detail?id=18628
-    await assertErrorsInCode(r'''
-class C<T> {
-  T t = int;
-}''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-  }
-
-  test_invalidAssignment_staticVariable() async {
-    await assertErrorsInCode(r'''
-class A {
-  static int x;
-}
-f() {
-  A.x = '0';
-}''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-  }
-
-  test_invalidAssignment_topLevelVariableDeclaration() async {
-    await assertErrorsInCode(
-        "int x = 'string';", [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-  }
-
-  test_invalidAssignment_typeParameter() async {
-    // 14221
-    await assertErrorsInCode(r'''
-class B<T> {
-  T value;
-  void test(num n) {
-    value = n;
-  }
-}''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-  }
-
-  test_invalidAssignment_variableDeclaration() async {
-    await assertErrorsInCode(r'''
-class A {
-  int x = 'string';
-}''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
-  }
-
-  test_invocationOfNonFunctionExpression_literal() async {
-    await assertErrorsInCode(r'''
-f() {
-  3(5);
-}''', [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION]);
-  }
-
-  test_nonBoolCondition_conditional() async {
-    await assertErrorsInCode("f() { return 3 ? 2 : 1; }",
-        [StaticTypeWarningCode.NON_BOOL_CONDITION]);
-  }
-
-  test_nonBoolCondition_do() async {
-    await assertErrorsInCode(r'''
-f() {
-  do {} while (3);
-}''', [StaticTypeWarningCode.NON_BOOL_CONDITION]);
-  }
-
-  test_nonBoolCondition_for() async {
-    // https://github.com/dart-lang/sdk/issues/24713
-    await assertErrorsInCode(r'''
-f() {
-  for (;3;) {}
-}''', [StaticTypeWarningCode.NON_BOOL_CONDITION]);
-  }
-
-  test_nonBoolCondition_if() async {
-    await assertErrorsInCode(r'''
-f() {
-  if (3) return 2; else return 1;
-}''', [StaticTypeWarningCode.NON_BOOL_CONDITION]);
-  }
-
-  test_nonBoolCondition_while() async {
-    await assertErrorsInCode(r'''
-f() {
-  while (3) {}
-}''', [StaticTypeWarningCode.NON_BOOL_CONDITION]);
-  }
-
-  test_nonBoolExpression_functionType_bool() async {
-    Source source = addSource(r'''
-bool makeAssertion() => true;
-f() {
-  assert(makeAssertion);
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticTypeWarningCode.NON_BOOL_EXPRESSION]);
-    verify([source]);
-  }
-
-  test_nonBoolExpression_functionType_int() async {
-    await assertErrorsInCode(r'''
-int makeAssertion() => 1;
-f() {
-  assert(makeAssertion);
-}''', [StaticTypeWarningCode.NON_BOOL_EXPRESSION]);
-  }
-
-  test_nonBoolExpression_interfaceType() async {
-    await assertErrorsInCode(r'''
-f() {
-  assert(0);
-}''', [StaticTypeWarningCode.NON_BOOL_EXPRESSION]);
-  }
-
-  test_nonBoolNegationExpression() async {
-    await assertErrorsInCode(r'''
-f() {
-  !42;
-}''', [StaticTypeWarningCode.NON_BOOL_NEGATION_EXPRESSION]);
-  }
-
-  test_nonBoolOperand_and_left() async {
-    await assertErrorsInCode(r'''
-bool f(int left, bool right) {
-  return left && right;
-}''', [StaticTypeWarningCode.NON_BOOL_OPERAND]);
-  }
-
-  test_nonBoolOperand_and_right() async {
-    await assertErrorsInCode(r'''
-bool f(bool left, String right) {
-  return left && right;
-}''', [StaticTypeWarningCode.NON_BOOL_OPERAND]);
-  }
-
-  test_nonBoolOperand_or_left() async {
-    await assertErrorsInCode(r'''
-bool f(List<int> left, bool right) {
-  return left || right;
-}''', [StaticTypeWarningCode.NON_BOOL_OPERAND]);
-  }
-
-  test_nonBoolOperand_or_right() async {
-    await assertErrorsInCode(r'''
-bool f(bool left, double right) {
-  return left || right;
-}''', [StaticTypeWarningCode.NON_BOOL_OPERAND]);
-  }
-
-  test_nonTypeAsTypeArgument_notAType() async {
-    await assertErrorsInCode(r'''
-int A;
-class B<E> {}
-f(B<A> b) {}''', [StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT]);
-  }
-
-  test_nonTypeAsTypeArgument_undefinedIdentifier() async {
-    await assertErrorsInCode(r'''
-class B<E> {}
-f(B<A> b) {}''', [StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT]);
-  }
-
-  test_returnOfInvalidType_async_future_future_int_mismatches_future_int() async {
-    await assertErrorsInCode('''
-import 'dart:async';
-Future<int> f() async {
-  return g();
-}
-Future<Future<int>> g() => null;
-''', [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
-  }
-
-  test_returnOfInvalidType_async_future_int_mismatches_future_string() async {
-    await assertErrorsInCode('''
-import 'dart:async';
-Future<String> f() async {
-  return 5;
-}
-''', [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
-  }
-
-  test_returnOfInvalidType_async_future_int_mismatches_int() async {
-    await assertErrorsInCode('''
-int f() async {
-  return 5;
-}
-''', [
-      StaticTypeWarningCode.RETURN_OF_INVALID_TYPE,
-      StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE
-    ]);
-  }
-
-  test_returnOfInvalidType_expressionFunctionBody_function() async {
-    await assertErrorsInCode(
-        "int f() => '0';", [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
-  }
-
-  test_returnOfInvalidType_expressionFunctionBody_getter() async {
-    await assertErrorsInCode(
-        "int get g => '0';", [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
-  }
-
-  test_returnOfInvalidType_expressionFunctionBody_localFunction() async {
-    await assertErrorsInCode(r'''
-class A {
-  String m() {
-    int f() => '0';
-    return '0';
-  }
-}''', [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
-  }
-
-  test_returnOfInvalidType_expressionFunctionBody_method() async {
-    await assertErrorsInCode(r'''
-class A {
-  int f() => '0';
-}''', [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
-  }
-
-  test_returnOfInvalidType_function() async {
-    await assertErrorsInCode("int f() { return '0'; }",
-        [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
-  }
-
-  test_returnOfInvalidType_getter() async {
-    await assertErrorsInCode("int get g { return '0'; }",
-        [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
-  }
-
-  test_returnOfInvalidType_localFunction() async {
-    await assertErrorsInCode(r'''
-class A {
-  String m() {
-    int f() { return '0'; }
-    return '0';
-  }
-}''', [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
-  }
-
-  test_returnOfInvalidType_method() async {
-    await assertErrorsInCode(r'''
-class A {
-  int f() { return '0'; }
-}''', [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
-  }
-
-  test_returnOfInvalidType_not_issued_for_expressionFunctionBody_void() async {
-    await assertNoErrorsInCode("void f() => 42;");
-  }
-
-  test_returnOfInvalidType_not_issued_for_valid_generic_return() async {
-    await assertNoErrorsInCode(r'''
-abstract class F<T, U>  {
-  U get value;
-}
-
-abstract class G<T> {
-  T test(F<int, T> arg) => arg.value;
-}
-
-abstract class H<S> {
-  S test(F<int, S> arg) => arg.value;
-}
-
-void main() { }''');
-  }
-
-  test_returnOfInvalidType_void() async {
-    await assertErrorsInCode("void f() { return 42; }",
-        [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
-  }
-
-  test_typeArgumentNotMatchingBounds_classTypeAlias() async {
-    await assertErrorsInCode(r'''
-class A {}
-class B {}
-class C {}
-class G<E extends A> {}
-class D = G<B> with C;
-''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-  }
-
-  test_typeArgumentNotMatchingBounds_extends() async {
-    await assertErrorsInCode(r'''
-class A {}
-class B {}
-class G<E extends A> {}
-class C extends G<B>{}
-''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-  }
-
-  test_typeArgumentNotMatchingBounds_extends_regressionInIssue18468Fix() async {
-    // https://code.google.com/p/dart/issues/detail?id=18628
-    await assertErrorsInCode(r'''
-class X<T extends Type> {}
-class Y<U> extends X<U> {}
-''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-  }
-
-  test_typeArgumentNotMatchingBounds_fieldFormalParameter() async {
-    await assertErrorsInCode(r'''
-class A {}
-class B {}
-class G<E extends A> {}
-class C {
-  var f;
-  C(G<B> this.f) {}
-}''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-  }
-
-  test_typeArgumentNotMatchingBounds_functionReturnType() async {
-    await assertErrorsInCode(r'''
-class A {}
-class B {}
-class G<E extends A> {}
-G<B> f() { return null; }
-''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-  }
-
-  test_typeArgumentNotMatchingBounds_functionTypeAlias() async {
-    await assertErrorsInCode(r'''
-class A {}
-class B {}
-class G<E extends A> {}
-typedef G<B> f();
-''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-  }
-
-  test_typeArgumentNotMatchingBounds_functionTypedFormalParameter() async {
-    await assertErrorsInCode(r'''
-class A {}
-class B {}
-class G<E extends A> {}
-f(G<B> h()) {}
-''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-  }
-
-  test_typeArgumentNotMatchingBounds_implements() async {
-    await assertErrorsInCode(r'''
-class A {}
-class B {}
-class G<E extends A> {}
-class C implements G<B>{}
-''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-  }
-
-  test_typeArgumentNotMatchingBounds_is() async {
-    await assertErrorsInCode(r'''
-class A {}
-class B {}
-class G<E extends A> {}
-var b = 1 is G<B>;
-''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-  }
-
-  test_typeArgumentNotMatchingBounds_methodInvocation_localFunction() async {
-    await assertErrorsInCode(r'''
-class Point<T extends num> {
-  Point(T x, T y);
-}
-
-main() {
-  Point<T> f<T extends num>(T x, T y) {
-    return new Point<T>(x, y);
-  }
-  print(f<String>('hello', 'world'));
-}
-''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-  }
-
-  test_typeArgumentNotMatchingBounds_methodInvocation_method() async {
-    await assertErrorsInCode(r'''
-class Point<T extends num> {
-  Point(T x, T y);
-}
-
-class PointFactory {
-  Point<T> point<T extends num>(T x, T y) {
-    return new Point<T>(x, y);
-  }
-}
-
-f(PointFactory factory) {
-  print(factory.point<String>('hello', 'world'));
-}
-''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-  }
-
-  test_typeArgumentNotMatchingBounds_methodInvocation_topLevelFunction() async {
-    await assertErrorsInCode(r'''
-class Point<T extends num> {
-  Point(T x, T y);
-}
-
-Point<T> f<T extends num>(T x, T y) {
-  return new Point<T>(x, y);
-}
-
-main() {
-  print(f<String>('hello', 'world'));
-}
-''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-  }
-
-  test_typeArgumentNotMatchingBounds_methodReturnType() async {
-    await assertErrorsInCode(r'''
-class A {}
-class B {}
-class G<E extends A> {}
-class C {
-  G<B> m() { return null; }
-}''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-  }
-
-  test_typeArgumentNotMatchingBounds_new() async {
-    await assertErrorsInCode(r'''
-class A {}
-class B {}
-class G<E extends A> {}
-f() { return new G<B>(); }
-''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-  }
-
-  test_typeArgumentNotMatchingBounds_new_superTypeOfUpperBound() async {
-    await assertErrorsInCode(r'''
-class A {}
-class B extends A {}
-class C extends B {}
-class G<E extends B> {}
-f() { return new G<A>(); }
-''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-  }
-
-  test_typeArgumentNotMatchingBounds_ofFunctionTypeAlias() async {
-    await assertErrorsInCode(r'''
-class A {}
-class B {}
-typedef F<T extends A>();
-F<B> fff;
-''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-  }
-
-  test_typeArgumentNotMatchingBounds_parameter() async {
-    await assertErrorsInCode(r'''
-class A {}
-class B {}
-class G<E extends A> {}
-f(G<B> g) {}
-''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-  }
-
-  test_typeArgumentNotMatchingBounds_redirectingConstructor() async {
-    await assertErrorsInCode(r'''
-class A {}
-class B {}
-class X<T extends A> {
-  X(int x, int y) {}
-  factory X.name(int x, int y) = X<B>;
-}''', [
-      StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS,
-      StaticWarningCode.REDIRECT_TO_INVALID_RETURN_TYPE
-    ]);
-  }
-
-  test_typeArgumentNotMatchingBounds_typeArgumentList() async {
-    await assertErrorsInCode(r'''
-class A {}
-class B {}
-class C<E> {}
-class D<E extends A> {}
-C<D<B>> Var;
-''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-  }
-
-  test_typeArgumentNotMatchingBounds_typeParameter() async {
-    await assertErrorsInCode(r'''
-class A {}
-class B {}
-class C {}
-class G<E extends A> {}
-class D<F extends G<B>> {}
-''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-  }
-
-  test_typeArgumentNotMatchingBounds_variableDeclaration() async {
-    await assertErrorsInCode(r'''
-class A {}
-class B {}
-class G<E extends A> {}
-G<B> g;
-''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-  }
-
-  test_typeArgumentNotMatchingBounds_with() async {
-    await assertErrorsInCode(r'''
-class A {}
-class B {}
-class G<E extends A> {}
-class C extends Object with G<B>{}
-''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
-  }
-
-  test_typeParameterSupertypeOfItsBound() async {
-    await assertErrorsInCode(r'''
-class A<T extends T> {
-}
-''', [StaticTypeWarningCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND]);
-  }
-
-  test_typePromotion_booleanAnd_useInRight_accessedInClosureRight_mutated() async {
-    await assertErrorsInUnverifiedCode(r'''
-callMe(f()) { f(); }
-main(Object p) {
-  (p is String) && callMe(() { p.length; });
-  p = 0;
-}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
-  }
-
-  test_typePromotion_booleanAnd_useInRight_mutatedInLeft() async {
-    await assertErrorsInUnverifiedCode(r'''
-main(Object p) {
-  ((p is String) && ((p = 42) == 42)) && p.length != 0;
-}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
-  }
-
-  test_typePromotion_booleanAnd_useInRight_mutatedInRight() async {
-    await assertErrorsInUnverifiedCode(r'''
-main(Object p) {
-  (p is String) && (((p = 42) == 42) && p.length != 0);
-}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
-  }
-
-  test_typePromotion_conditional_useInThen_accessedInClosure_hasAssignment_after() async {
-    await assertErrorsInUnverifiedCode(r'''
-callMe(f()) { f(); }
-main(Object p) {
-  p is String ? callMe(() { p.length; }) : 0;
-  p = 42;
-}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
-  }
-
-  test_typePromotion_conditional_useInThen_accessedInClosure_hasAssignment_before() async {
-    await assertErrorsInUnverifiedCode(r'''
-callMe(f()) { f(); }
-main(Object p) {
-  p = 42;
-  p is String ? callMe(() { p.length; }) : 0;
-}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
-  }
-
-  test_typePromotion_conditional_useInThen_hasAssignment() async {
-    await assertErrorsInUnverifiedCode(r'''
-main(Object p) {
-  p is String ? (p.length + (p = 42)) : 0;
-}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
-  }
-
-  test_typePromotion_if_accessedInClosure_hasAssignment() async {
-    await assertErrorsInUnverifiedCode(r'''
-callMe(f()) { f(); }
-main(Object p) {
-  if (p is String) {
-    callMe(() {
-      p.length;
-    });
-  }
-  p = 0;
-}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
-  }
-
-  test_typePromotion_if_and_right_hasAssignment() async {
-    await assertErrorsInUnverifiedCode(r'''
-main(Object p) {
-  if (p is String && (p = null) == null) {
-    p.length;
-  }
-}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
-  }
-
-  test_typePromotion_if_extends_notMoreSpecific_dynamic() async {
-    await assertErrorsInUnverifiedCode(r'''
-class V {}
-class A<T> {}
-class B<S> extends A<S> {
-  var b;
-}
-
-main(A<V> p) {
-  if (p is B) {
-    p.b;
-  }
-}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
-  }
-
-  test_typePromotion_if_extends_notMoreSpecific_notMoreSpecificTypeArg() async {
-    await assertErrorsInUnverifiedCode(r'''
-class V {}
-class A<T> {}
-class B<S> extends A<S> {
-  var b;
-}
-
-main(A<V> p) {
-  if (p is B<int>) {
-    p.b;
-  }
-}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
-  }
-
-  test_typePromotion_if_hasAssignment_after() async {
-    await assertErrorsInUnverifiedCode(r'''
-main(Object p) {
-  if (p is String) {
-    p.length;
-    p = 0;
-  }
-}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
-  }
-
-  test_typePromotion_if_hasAssignment_before() async {
-    await assertErrorsInUnverifiedCode(r'''
-main(Object p) {
-  if (p is String) {
-    p = 0;
-    p.length;
-  }
-}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
-  }
-
-  test_typePromotion_if_hasAssignment_inClosure_anonymous_after() async {
-    await assertErrorsInUnverifiedCode(r'''
-main(Object p) {
-  if (p is String) {
-    p.length;
-  }
-  () {p = 0;};
-}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
-  }
-
-  test_typePromotion_if_hasAssignment_inClosure_anonymous_before() async {
-    await assertErrorsInUnverifiedCode(r'''
-main(Object p) {
-  () {p = 0;};
-  if (p is String) {
-    p.length;
-  }
-}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
-  }
-
-  test_typePromotion_if_hasAssignment_inClosure_function_after() async {
-    await assertErrorsInUnverifiedCode(r'''
-main(Object p) {
-  if (p is String) {
-    p.length;
-  }
-  f() {p = 0;};
-}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
-  }
-
-  test_typePromotion_if_hasAssignment_inClosure_function_before() async {
-    await assertErrorsInUnverifiedCode(r'''
-main(Object p) {
-  f() {p = 0;};
-  if (p is String) {
-    p.length;
-  }
-}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
-  }
-
-  test_typePromotion_if_implements_notMoreSpecific_dynamic() async {
-    await assertErrorsInUnverifiedCode(r'''
-class V {}
-class A<T> {}
-class B<S> implements A<S> {
-  var b;
-}
-
-main(A<V> p) {
-  if (p is B) {
-    p.b;
-  }
-}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
-  }
-
-  test_typePromotion_if_with_notMoreSpecific_dynamic() async {
-    await assertErrorsInUnverifiedCode(r'''
-class V {}
-class A<T> {}
-class B<S> extends Object with A<S> {
-  var b;
-}
-
-main(A<V> p) {
-  if (p is B) {
-    p.b;
-  }
-}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
-  }
-
-  test_undefinedGetter() async {
-    await assertErrorsInUnverifiedCode(r'''
-class T {}
-f(T e) { return e.m; }''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
-  }
-
-  test_undefinedGetter_generic_function_call() async {
-    // Referencing `.call` on a `Function` type works similarly to referencing
-    // it on `dynamic`--the reference is accepted at compile time, and all type
-    // checking is deferred until runtime.
-    await assertErrorsInUnverifiedCode('''
-f(Function f) {
-  return f.call;
-}
-''', []);
-  }
-
-  test_undefinedGetter_object_call() async {
-    await assertErrorsInUnverifiedCode('''
-f(Object o) {
-  return o.call;
-}
-''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
-  }
-
-  test_undefinedGetter_proxy_annotation_fakeProxy() async {
-    await assertErrorsInCode(r'''
-library L;
-class Fake {
-  const Fake();
-}
-const proxy = const Fake();
-@proxy class PrefixProxy {}
-main() {
-  new PrefixProxy().foo;
-}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
-  }
-
-  test_undefinedGetter_static() async {
-    await assertErrorsInUnverifiedCode(r'''
-class A {}
-var a = A.B;''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
-  }
-
-  test_undefinedGetter_typeLiteral_cascadeTarget() async {
-    await assertErrorsInCode(r'''
-class T {
-  static int get foo => 42;
-}
-main() {
-  T..foo;
-}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
-  }
-
-  test_undefinedGetter_typeLiteral_conditionalAccess() async {
-    // When applied to a type literal, the conditional access operator '?.'
-    // cannot be used to access instance getters of Type.
-    // TODO(brianwilkerson) We cannot verify because hashCode isn't resolved.
-    await assertErrorsInCode('''
-class A {}
-f() => A?.hashCode;
-''', [StaticTypeWarningCode.UNDEFINED_GETTER], verify: false);
-  }
-
-  test_undefinedGetter_wrongNumberOfTypeArguments_tooLittle() async {
-    await assertErrorsInCode(r'''
-class A<K, V> {
-  K element;
-}
-main(A<int> a) {
-  a.element.anyGetterExistsInDynamic;
-}''', [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
-  }
-
-  test_undefinedGetter_wrongNumberOfTypeArguments_tooMany() async {
-    await assertErrorsInCode(r'''
-class A<E> {
-  E element;
-}
-main(A<int,int> a) {
-  a.element.anyGetterExistsInDynamic;
-}''', [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
-  }
-
-  test_undefinedGetter_wrongOfTypeArgument() async {
-    await assertErrorsInCode(r'''
-class A<E> {
-  E element;
-}
-main(A<NoSuchType> a) {
-  a.element.anyGetterExistsInDynamic;
-}''', [StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT]);
-  }
-
-  test_undefinedMethod_assignmentExpression() async {
-    await assertErrorsInCode(r'''
-class A {}
-class B {
-  f(A a) {
-    A a2 = new A();
-    a += a2;
-  }
-}''', [StaticTypeWarningCode.UNDEFINED_METHOD]);
-  }
-
-  test_undefinedMethod_ignoreTypePropagation() async {
-    await assertErrorsInCode(r'''
-class A {}
-class B extends A {
-  m() {}
-}
-class C {
-  f() {
-    A a = new B();
-    a.m();
-  }
-}''', [StaticTypeWarningCode.UNDEFINED_METHOD]);
-  }
-
-  test_undefinedMethod_leastUpperBoundWithNull() async {
-    await assertErrorsInCode('f(bool b, int i) => (b ? null : i).foo();',
-        [StaticTypeWarningCode.UNDEFINED_METHOD]);
-  }
-
-  test_undefinedMethod_ofNull() async {
-    // TODO(scheglov) Track https://github.com/dart-lang/sdk/issues/28430 to
-    // decide whether a warning should be reported here.
-    await assertErrorsInCode(r'''
-Null f(int x) => null;
-main() {
-  f(42).abs();
-}
-''', [StaticTypeWarningCode.UNDEFINED_METHOD]);
-  }
-
-  test_undefinedMethodWithConstructor() async {
-    // TODO(brianwilkerson) We cannot verify because 'C' could not be resolved.
-    await assertErrorsInCode(r'''
-class C {
-  C.m();
-}
-f() {
-  C c = C.m();
-}''', [], verify: false);
-  }
-
-  test_undefinedOperator_indexBoth() async {
-    await assertErrorsInUnverifiedCode(r'''
-class A {}
-f(A a) {
-  a[0]++;
-}''', [
-      StaticTypeWarningCode.UNDEFINED_OPERATOR,
-      StaticTypeWarningCode.UNDEFINED_OPERATOR,
-    ]);
-  }
-
-  test_undefinedOperator_indexGetter() async {
-    await assertErrorsInUnverifiedCode(r'''
-class A {}
-f(A a) {
-  a[0];
-}''', [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
-  }
-
-  test_undefinedOperator_indexSetter() async {
-    await assertErrorsInUnverifiedCode(r'''
-class A {}
-f(A a) {
-  a[0] = 1;
-}''', [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
-  }
-
-  test_undefinedOperator_plus() async {
-    await assertErrorsInUnverifiedCode(r'''
-class A {}
-f(A a) {
-  a + 1;
-}''', [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
-  }
-
-  test_undefinedOperator_postfixExpression() async {
-    await assertErrorsInCode(r'''
-class A {}
-f(A a) {
-  a++;
-}''', [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
-  }
-
-  test_undefinedOperator_prefixExpression() async {
-    await assertErrorsInCode(r'''
-class A {}
-f(A a) {
-  ++a;
-}''', [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
-  }
-
-  test_undefinedSetter() async {
-    await assertErrorsInUnverifiedCode(r'''
-class T {}
-f(T e1) { e1.m = 0; }''', [StaticTypeWarningCode.UNDEFINED_SETTER]);
-  }
-
-  test_undefinedSetter_static() async {
-    await assertErrorsInUnverifiedCode(r'''
-class A {}
-f() { A.B = 0;}''', [StaticTypeWarningCode.UNDEFINED_SETTER]);
-  }
-
-  test_undefinedSetter_typeLiteral_cascadeTarget() async {
-    await assertErrorsInCode(r'''
-class T {
-  static void set foo(_) {}
-}
-main() {
-  T..foo = 42;
-}''', [StaticTypeWarningCode.UNDEFINED_SETTER]);
-  }
-
-  test_unqualifiedReferenceToNonLocalStaticMember_getter() async {
-    await assertErrorsInCode(r'''
-class A {
-  static int get a => 0;
-}
-class B extends A {
-  int b() {
-    return a;
-  }
-}''', [StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER]);
-  }
-
-  test_unqualifiedReferenceToNonLocalStaticMember_getter_invokeTarget() async {
-    await assertErrorsInCode(r'''
-class A {
-  static int foo;
-}
-
-class B extends A {
-  static bar() {
-    foo.abs();
-  }
-}
-''', [StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER]);
-  }
-
-  test_unqualifiedReferenceToNonLocalStaticMember_setter() async {
-    await assertErrorsInCode(r'''
-class A {
-  static set a(x) {}
-}
-class B extends A {
-  b(y) {
-    a = y;
-  }
-}''', [StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER]);
-  }
-
-  test_wrongNumberOfTypeArguments_class_tooFew() async {
-    await assertErrorsInCode(r'''
-class A<E, F> {}
-A<A> a = null;''', [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
-  }
-
-  test_wrongNumberOfTypeArguments_class_tooMany() async {
-    await assertErrorsInCode(r'''
-class A<E> {}
-A<A, A> a = null;''', [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
-  }
-
-  test_wrongNumberOfTypeArguments_classAlias() async {
-    await assertErrorsInCode(r'''
-class A {}
-class M {}
-class B<F extends num> = A<F> with M;''',
-        [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
-  }
-
-  test_wrongNumberOfTypeArguments_dynamic() async {
-    await assertErrorsInCode(r'''
-dynamic<int> v;
-''', [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
-  }
-
-  test_wrongNumberOfTypeArguments_typeParameter() async {
-    await assertErrorsInCode(r'''
-class C<T> {
-  T<int> f;
-}
-''', [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
-  }
-
-  test_wrongNumberOfTypeArguments_typeTest_tooFew() async {
-    await assertErrorsInCode(r'''
-class A {}
-class C<K, V> {}
-f(p) {
-  return p is C<A>;
-}''', [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
-  }
-
-  test_wrongNumberOfTypeArguments_typeTest_tooMany() async {
-    await assertErrorsInCode(r'''
-class A {}
-class C<E> {}
-f(p) {
-  return p is C<A, A>;
-}''', [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
-  }
-
-  test_yield_async_to_basic_type() async {
-    await assertErrorsInCode('''
-int f() async* {
-  yield 3;
-}
-''', [
-      StaticTypeWarningCode.YIELD_OF_INVALID_TYPE,
-      StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE
-    ]);
-  }
-
-  test_yield_async_to_iterable() async {
-    await assertErrorsInCode('''
-Iterable<int> f() async* {
-  yield 3;
-}
-''', [
-      StaticTypeWarningCode.YIELD_OF_INVALID_TYPE,
-      StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE
-    ]);
-  }
-
-  test_yield_async_to_mistyped_stream() async {
-    await assertErrorsInCode('''
-import 'dart:async';
-Stream<int> f() async* {
-  yield "foo";
-}
-''', [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
-  }
-
-  test_yield_each_async_non_stream() async {
-    await assertErrorsInCode('''
-f() async* {
-  yield* 0;
-}
-''', [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
-  }
-
-  test_yield_each_async_to_mistyped_stream() async {
-    await assertErrorsInCode('''
-import 'dart:async';
-Stream<int> f() async* {
-  yield* g();
-}
-Stream<String> g() => null;
-''', [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
-  }
-
-  test_yield_each_sync_non_iterable() async {
-    await assertErrorsInCode('''
-f() sync* {
-  yield* 0;
-}
-''', [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
-  }
-
-  test_yield_each_sync_to_mistyped_iterable() async {
-    await assertErrorsInCode('''
-Iterable<int> f() sync* {
-  yield* g();
-}
-Iterable<String> g() => null;
-''', [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
-  }
-
-  test_yield_sync_to_basic_type() async {
-    await assertErrorsInCode('''
-int f() sync* {
-  yield 3;
-}
-''', [
-      StaticTypeWarningCode.YIELD_OF_INVALID_TYPE,
-      StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE
-    ]);
-  }
-
-  test_yield_sync_to_mistyped_iterable() async {
-    await assertErrorsInCode('''
-Iterable<int> f() sync* {
-  yield "foo";
-}
-''', [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
-  }
-
-  test_yield_sync_to_stream() async {
-    await assertErrorsInCode('''
-import 'dart:async';
-Stream<int> f() sync* {
-  yield 3;
-}
-''', [
-      StaticTypeWarningCode.YIELD_OF_INVALID_TYPE,
-      StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE
-    ]);
-  }
-}
-
-abstract class StrongModeStaticTypeWarningCodeTest extends ResolverTestCase {
-  void setUp() {
-    super.setUp();
-    AnalysisOptionsImpl options = new AnalysisOptionsImpl();
-    resetWith(options: options);
-  }
-
-  test_legalAsyncGeneratorReturnType_function_supertypeOfStream() async {
-    await assertErrorsInCode('''
-import 'dart:async';
-f() async* { yield 42; }
-dynamic f2() async* { yield 42; }
-Object f3() async* { yield 42; }
-Stream f4() async* { yield 42; }
-Stream<dynamic> f5() async* { yield 42; }
-Stream<Object> f6() async* { yield 42; }
-Stream<num> f7() async* { yield 42; }
-Stream<int> f8() async* { yield 42; }
-''', []);
-  }
-
-  test_legalAsyncReturnType_function_supertypeOfFuture() async {
-    await assertErrorsInCode('''
-import 'dart:async';
-f() async { return 42; }
-dynamic f2() async { return 42; }
-Object f3() async { return 42; }
-Future f4() async { return 42; }
-Future<dynamic> f5() async { return 42; }
-Future<Object> f6() async { return 42; }
-Future<num> f7() async { return 42; }
-Future<int> f8() async { return 42; }
-''', []);
-  }
-
-  test_legalSyncGeneratorReturnType_function_supertypeOfIterable() async {
-    await assertErrorsInCode('''
-f() sync* { yield 42; }
-dynamic f2() sync* { yield 42; }
-Object f3() sync* { yield 42; }
-Iterable f4() sync* { yield 42; }
-Iterable<dynamic> f5() sync* { yield 42; }
-Iterable<Object> f6() sync* { yield 42; }
-Iterable<num> f7() sync* { yield 42; }
-Iterable<int> f8() sync* { yield 42; }
-''', []);
-  }
-}
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
deleted file mode 100644
index 6286728..0000000
--- a/pkg/analyzer/test/generated/static_type_warning_code_driver_test.dart
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import 'static_type_warning_code.dart';
-
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(StaticTypeWarningCodeTest_Driver);
-    defineReflectiveTests(StrongModeStaticTypeWarningCodeTest_Driver);
-  });
-}
-
-@reflectiveTest
-class StaticTypeWarningCodeTest_Driver extends StaticTypeWarningCodeTest {
-  @override
-  bool get enableNewAnalysisDriver => true;
-}
-
-@reflectiveTest
-class StrongModeStaticTypeWarningCodeTest_Driver
-    extends StrongModeStaticTypeWarningCodeTest {
-  @override
-  bool get enableNewAnalysisDriver => true;
-}
diff --git a/pkg/analyzer/test/generated/static_type_warning_code_test.dart b/pkg/analyzer/test/generated/static_type_warning_code_test.dart
new file mode 100644
index 0000000..23012b9
--- /dev/null
+++ b/pkg/analyzer/test/generated/static_type_warning_code_test.dart
@@ -0,0 +1,1767 @@
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/generated/source_io.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'resolver_test_case.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(StaticTypeWarningCodeTest);
+    defineReflectiveTests(StrongModeStaticTypeWarningCodeTest);
+  });
+}
+
+@reflectiveTest
+class StaticTypeWarningCodeTest extends ResolverTestCase {
+  test_assert_message_suppresses_type_promotion() async {
+    // If a variable is assigned to inside the expression for an assert
+    // message, type promotion should be suppressed, just as it would be if the
+    // assignment occurred outside an assert statement.  (Note that it is a
+    // dubious practice for the computation of an assert message to have side
+    // effects, since it is only evaluated if the assert fails).
+    await assertErrorsInCode('''
+class C {
+  void foo() {}
+}
+
+f(Object x) {
+  if (x is C) {
+    x.foo();
+    assert(true, () { x = new C(); return 'msg'; }());
+  }
+}
+''', [StaticTypeWarningCode.UNDEFINED_METHOD]);
+    // Do not verify since `x.foo()` fails to resolve.
+  }
+
+  test_await_flattened() async {
+    await assertErrorsInCode('''
+import 'dart:async';
+Future<Future<int>> ffi() => null;
+f() async {
+  Future<int> b = await ffi(); 
+}
+''', []);
+  }
+
+  test_await_simple() async {
+    await assertErrorsInCode('''
+import 'dart:async';
+Future<int> fi() => null;
+f() async {
+  String a = await fi(); // Warning: int not assignable to String
+}
+''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
+  }
+
+  test_awaitForIn_declaredVariableRightType() async {
+    await assertNoErrorsInCode('''
+import 'dart:async';
+f() async {
+  Stream<int> stream;
+  await for (int i in stream) {}
+}
+''');
+  }
+
+  test_awaitForIn_declaredVariableWrongType() async {
+    await assertErrorsInCode('''
+import 'dart:async';
+f() async {
+  Stream<String> stream;
+  await for (int i in stream) {}
+}
+''', [StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE]);
+  }
+
+  test_awaitForIn_downcast() async {
+    await assertNoErrorsInCode('''
+import 'dart:async';
+f() async {
+  Stream<num> stream;
+  await for (int i in stream) {}
+}
+''');
+  }
+
+  test_awaitForIn_dynamicStream() async {
+    await assertNoErrorsInCode('''
+f() async {
+  dynamic stream;
+  await for (int i in stream) {}
+}
+''');
+  }
+
+  test_awaitForIn_dynamicVariable() async {
+    await assertNoErrorsInCode('''
+import 'dart:async';
+f() async {
+  Stream<int> stream;
+  await for (var i in stream) {}
+}
+''');
+  }
+
+  test_awaitForIn_existingVariableRightType() async {
+    await assertNoErrorsInCode('''
+import 'dart:async';
+f() async {
+  Stream<int> stream;
+  int i;
+  await for (i in stream) {}
+}
+''');
+  }
+
+  test_awaitForIn_existingVariableWrongType() async {
+    await assertErrorsInCode('''
+import 'dart:async';
+f() async {
+  Stream<String> stream;
+  int i;
+  await for (i in stream) {}
+}
+''', [StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE]);
+  }
+
+  test_awaitForIn_notStream() async {
+    await assertErrorsInCode('''
+f() async {
+  await for (var i in true) {}
+}
+''', [StaticTypeWarningCode.FOR_IN_OF_INVALID_TYPE]);
+  }
+
+  test_awaitForIn_streamOfDynamic() async {
+    await assertNoErrorsInCode('''
+import 'dart:async';
+f() async {
+  Stream stream;
+  await for (int i in stream) {}
+}
+''');
+  }
+
+  test_awaitForIn_upcast() async {
+    await assertNoErrorsInCode('''
+import 'dart:async';
+f() async {
+  Stream<int> stream;
+  await for (num i in stream) {}
+}
+''');
+  }
+
+  test_bug21912() async {
+    await assertErrorsInCode('''
+class A {}
+class B extends A {}
+
+typedef T Function2<S, T>(S z);
+typedef B AToB(A x);
+typedef A BToA(B x);
+
+void main() {
+  {
+    Function2<Function2<A, B>, Function2<B, A>> t1;
+    Function2<AToB, BToA> t2;
+
+    Function2<Function2<int, double>, Function2<int, double>> left;
+
+    left = t1;
+    left = t2;
+  }
+}
+''', [
+      StaticTypeWarningCode.INVALID_ASSIGNMENT,
+      StaticTypeWarningCode.INVALID_ASSIGNMENT
+    ]);
+  }
+
+  test_expectedOneListTypeArgument() async {
+    await assertErrorsInCode(r'''
+main() {
+  <int, int> [];
+}''', [StaticTypeWarningCode.EXPECTED_ONE_LIST_TYPE_ARGUMENTS]);
+  }
+
+  @failingTest
+  test_expectedOneSetTypeArgument() async {
+    await assertErrorsInCode(r'''
+main() {
+  <int, int>{2, 3};
+}''', [StaticTypeWarningCode.EXPECTED_ONE_SET_TYPE_ARGUMENTS]);
+  }
+
+  test_expectedTwoMapTypeArguments_three() async {
+    await assertErrorsInCode(r'''
+main() {
+  <int, int, int> {};
+}''', [StaticTypeWarningCode.EXPECTED_TWO_MAP_TYPE_ARGUMENTS]);
+  }
+
+  test_forIn_declaredVariableRightType() async {
+    await assertNoErrorsInCode('''
+f() {
+  for (int i in <int>[]) {}
+}
+''');
+  }
+
+  test_forIn_declaredVariableWrongType() async {
+    await assertErrorsInCode('''
+f() {
+  for (int i in <String>[]) {}
+}
+''', [StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE]);
+  }
+
+  test_forIn_downcast() async {
+    await assertNoErrorsInCode('''
+f() {
+  for (int i in <num>[]) {}
+}
+''');
+  }
+
+  test_forIn_dynamic() async {
+    await assertNoErrorsInCode('''
+f() {
+  dynamic d; // Could be [].
+  for (var i in d) {}
+}
+''');
+  }
+
+  test_forIn_dynamicIterable() async {
+    await assertNoErrorsInCode('''
+f() {
+  dynamic iterable;
+  for (int i in iterable) {}
+}
+''');
+  }
+
+  test_forIn_dynamicVariable() async {
+    await assertNoErrorsInCode('''
+f() {
+  for (var i in <int>[]) {}
+}
+''');
+  }
+
+  test_forIn_existingVariableRightType() async {
+    await assertNoErrorsInCode('''
+f() {
+  int i;
+  for (i in <int>[]) {}
+}
+''');
+  }
+
+  test_forIn_existingVariableWrongType() async {
+    await assertErrorsInCode('''
+f() {
+  int i;
+  for (i in <String>[]) {}
+}
+''', [StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE]);
+  }
+
+  test_forIn_iterableOfDynamic() async {
+    await assertNoErrorsInCode('''
+f() {
+  for (int i in []) {}
+}
+''');
+  }
+
+  test_forIn_notIterable() async {
+    await assertErrorsInCode('''
+f() {
+  for (var i in true) {}
+}
+''', [StaticTypeWarningCode.FOR_IN_OF_INVALID_TYPE]);
+  }
+
+  test_forIn_object() async {
+    await assertNoErrorsInCode('''
+f() {
+  Object o; // Could be [].
+  for (var i in o) {}
+}
+''');
+  }
+
+  test_forIn_typeBoundBad() async {
+    await assertErrorsInCode('''
+class Foo<T extends Iterable<int>> {
+  void method(T iterable) {
+    for (String i in iterable) {}
+  }
+}
+''', [StaticTypeWarningCode.FOR_IN_OF_INVALID_ELEMENT_TYPE]);
+  }
+
+  test_forIn_typeBoundGood() async {
+    await assertNoErrorsInCode('''
+class Foo<T extends Iterable<int>> {
+  void method(T iterable) {
+    for (var i in iterable) {}
+  }
+}
+''');
+  }
+
+  test_forIn_upcast() async {
+    await assertNoErrorsInCode('''
+f() {
+  for (num i in <int>[]) {}
+}
+''');
+  }
+
+  test_illegalAsyncGeneratorReturnType_function_nonStream() async {
+    await assertErrorsInCode('''
+int f() async* {}
+''', [StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE]);
+  }
+
+  test_illegalAsyncGeneratorReturnType_function_subtypeOfStream() async {
+    await assertErrorsInCode('''
+import 'dart:async';
+abstract class SubStream<T> implements Stream<T> {}
+SubStream<int> f() async* {}
+''', [StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE]);
+  }
+
+  test_illegalAsyncGeneratorReturnType_method_nonStream() async {
+    await assertErrorsInCode('''
+class C {
+  int f() async* {}
+}
+''', [StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE]);
+  }
+
+  test_illegalAsyncGeneratorReturnType_method_subtypeOfStream() async {
+    await assertErrorsInCode('''
+import 'dart:async';
+abstract class SubStream<T> implements Stream<T> {}
+class C {
+  SubStream<int> f() async* {}
+}
+''', [StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE]);
+  }
+
+  test_illegalAsyncReturnType_function_nonFuture() async {
+    await assertErrorsInCode('''
+int f() async {}
+''', [
+      StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE,
+      HintCode.MISSING_RETURN
+    ]);
+  }
+
+  test_illegalAsyncReturnType_function_subtypeOfFuture() async {
+    await assertErrorsInCode('''
+import 'dart:async';
+abstract class SubFuture<T> implements Future<T> {}
+SubFuture<int> f() async {
+  return 0;
+}
+''', [StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE]);
+  }
+
+  test_illegalAsyncReturnType_method_nonFuture() async {
+    await assertErrorsInCode('''
+class C {
+  int m() async {}
+}
+''', [
+      StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE,
+      HintCode.MISSING_RETURN
+    ]);
+  }
+
+  test_illegalAsyncReturnType_method_subtypeOfFuture() async {
+    await assertErrorsInCode('''
+import 'dart:async';
+abstract class SubFuture<T> implements Future<T> {}
+class C {
+  SubFuture<int> m() async {
+    return 0;
+  }
+}
+''', [StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE]);
+  }
+
+  test_illegalSyncGeneratorReturnType_function_nonIterator() async {
+    await assertErrorsInCode('''
+int f() sync* {}
+''', [StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE]);
+  }
+
+  test_illegalSyncGeneratorReturnType_function_subclassOfIterator() async {
+    await assertErrorsInCode('''
+abstract class SubIterator<T> implements Iterator<T> {}
+SubIterator<int> f() sync* {}
+''', [StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE]);
+  }
+
+  test_illegalSyncGeneratorReturnType_method_nonIterator() async {
+    await assertErrorsInCode('''
+class C {
+  int f() sync* {}
+}
+''', [StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE]);
+  }
+
+  test_illegalSyncGeneratorReturnType_method_subclassOfIterator() async {
+    await assertErrorsInCode('''
+abstract class SubIterator<T> implements Iterator<T> {}
+class C {
+  SubIterator<int> f() sync* {}
+}
+''', [StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE]);
+  }
+
+  test_instanceAccessToStaticMember_method_reference() async {
+    await assertErrorsInCode(r'''
+class A {
+  static m() {}
+}
+main(A a) {
+  a.m;
+}''', [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
+  }
+
+  test_instanceAccessToStaticMember_propertyAccess_field() async {
+    await assertErrorsInCode(r'''
+class A {
+  static var f;
+}
+main(A a) {
+  a.f;
+}''', [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
+  }
+
+  test_instanceAccessToStaticMember_propertyAccess_getter() async {
+    await assertErrorsInCode(r'''
+class A {
+  static get f => 42;
+}
+main(A a) {
+  a.f;
+}''', [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
+  }
+
+  test_instanceAccessToStaticMember_propertyAccess_setter() async {
+    await assertErrorsInCode(r'''
+class A {
+  static set f(x) {}
+}
+main(A a) {
+  a.f = 42;
+}''', [StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER]);
+  }
+
+  test_invalidAssignment_compoundAssignment() async {
+    await assertErrorsInCode(r'''
+class byte {
+  int _value;
+  byte(this._value);
+  int operator +(int val) { return 0; }
+}
+
+void main() {
+  byte b = new byte(52);
+  b += 3;
+}''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
+  }
+
+  test_invalidAssignment_defaultValue_named() async {
+    await assertErrorsInCode(r'''
+f({String x: 0}) {
+}''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
+  }
+
+  test_invalidAssignment_defaultValue_optional() async {
+    await assertErrorsInCode(r'''
+f([String x = 0]) {
+}''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
+  }
+
+  test_invalidAssignment_dynamic() async {
+    await assertErrorsInCode(r'''
+main() {
+  dynamic = 1;
+}
+''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
+  }
+
+  test_invalidAssignment_functionExpressionInvocation() async {
+    await assertErrorsInCode('''
+main() {
+  String x = (() => 5)();
+}''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
+  }
+
+  test_invalidAssignment_ifNullAssignment() async {
+    await assertErrorsInCode('''
+void f(int i) {
+  double d;
+  d ??= i;
+}
+''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
+  }
+
+  test_invalidAssignment_instanceVariable() async {
+    await assertErrorsInCode(r'''
+class A {
+  int x;
+}
+f() {
+  A a;
+  a.x = '0';
+}''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
+  }
+
+  test_invalidAssignment_localVariable() async {
+    await assertErrorsInCode(r'''
+f() {
+  int x;
+  x = '0';
+}''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
+  }
+
+  test_invalidAssignment_postfixExpression_localVariable() async {
+    await assertErrorsInCode(r'''
+class A {
+  B operator+(_) => new B();
+}
+
+class B {}
+
+f(A a) {
+  a++;
+}
+''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
+  }
+
+  test_invalidAssignment_postfixExpression_property() async {
+    await assertErrorsInCode(r'''
+class A {
+  B operator+(_) => new B();
+}
+
+class B {}
+
+class C {
+  A a;
+}
+
+f(C c) {
+  c.a++;
+}
+''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
+  }
+
+  test_invalidAssignment_prefixExpression_localVariable() async {
+    await assertErrorsInCode(r'''
+class A {
+  B operator+(_) => new B();
+}
+
+class B {}
+
+f(A a) {
+  ++a;
+}
+''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
+  }
+
+  test_invalidAssignment_prefixExpression_property() async {
+    await assertErrorsInCode(r'''
+class A {
+  B operator+(_) => new B();
+}
+
+class B {}
+
+class C {
+  A a;
+}
+
+f(C c) {
+  ++c.a;
+}
+''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
+  }
+
+  test_invalidAssignment_regressionInIssue18468Fix() async {
+    // https://code.google.com/p/dart/issues/detail?id=18628
+    await assertErrorsInCode(r'''
+class C<T> {
+  T t = int;
+}''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
+  }
+
+  test_invalidAssignment_staticVariable() async {
+    await assertErrorsInCode(r'''
+class A {
+  static int x;
+}
+f() {
+  A.x = '0';
+}''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
+  }
+
+  test_invalidAssignment_topLevelVariableDeclaration() async {
+    await assertErrorsInCode(
+        "int x = 'string';", [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
+  }
+
+  test_invalidAssignment_typeParameter() async {
+    // 14221
+    await assertErrorsInCode(r'''
+class B<T> {
+  T value;
+  void test(num n) {
+    value = n;
+  }
+}''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
+  }
+
+  test_invalidAssignment_variableDeclaration() async {
+    await assertErrorsInCode(r'''
+class A {
+  int x = 'string';
+}''', [StaticTypeWarningCode.INVALID_ASSIGNMENT]);
+  }
+
+  test_invocationOfNonFunctionExpression_literal() async {
+    await assertErrorsInCode(r'''
+f() {
+  3(5);
+}''', [StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION_EXPRESSION]);
+  }
+
+  test_nonBoolCondition_conditional() async {
+    await assertErrorsInCode("f() { return 3 ? 2 : 1; }",
+        [StaticTypeWarningCode.NON_BOOL_CONDITION]);
+  }
+
+  test_nonBoolCondition_do() async {
+    await assertErrorsInCode(r'''
+f() {
+  do {} while (3);
+}''', [StaticTypeWarningCode.NON_BOOL_CONDITION]);
+  }
+
+  test_nonBoolCondition_for() async {
+    // https://github.com/dart-lang/sdk/issues/24713
+    await assertErrorsInCode(r'''
+f() {
+  for (;3;) {}
+}''', [StaticTypeWarningCode.NON_BOOL_CONDITION]);
+  }
+
+  test_nonBoolCondition_if() async {
+    await assertErrorsInCode(r'''
+f() {
+  if (3) return 2; else return 1;
+}''', [StaticTypeWarningCode.NON_BOOL_CONDITION]);
+  }
+
+  test_nonBoolCondition_while() async {
+    await assertErrorsInCode(r'''
+f() {
+  while (3) {}
+}''', [StaticTypeWarningCode.NON_BOOL_CONDITION]);
+  }
+
+  test_nonBoolExpression_functionType_bool() async {
+    Source source = addSource(r'''
+bool makeAssertion() => true;
+f() {
+  assert(makeAssertion);
+}''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [StaticTypeWarningCode.NON_BOOL_EXPRESSION]);
+    verify([source]);
+  }
+
+  test_nonBoolExpression_functionType_int() async {
+    await assertErrorsInCode(r'''
+int makeAssertion() => 1;
+f() {
+  assert(makeAssertion);
+}''', [StaticTypeWarningCode.NON_BOOL_EXPRESSION]);
+  }
+
+  test_nonBoolExpression_interfaceType() async {
+    await assertErrorsInCode(r'''
+f() {
+  assert(0);
+}''', [StaticTypeWarningCode.NON_BOOL_EXPRESSION]);
+  }
+
+  test_nonBoolNegationExpression() async {
+    await assertErrorsInCode(r'''
+f() {
+  !42;
+}''', [StaticTypeWarningCode.NON_BOOL_NEGATION_EXPRESSION]);
+  }
+
+  test_nonBoolOperand_and_left() async {
+    await assertErrorsInCode(r'''
+bool f(int left, bool right) {
+  return left && right;
+}''', [StaticTypeWarningCode.NON_BOOL_OPERAND]);
+  }
+
+  test_nonBoolOperand_and_right() async {
+    await assertErrorsInCode(r'''
+bool f(bool left, String right) {
+  return left && right;
+}''', [StaticTypeWarningCode.NON_BOOL_OPERAND]);
+  }
+
+  test_nonBoolOperand_or_left() async {
+    await assertErrorsInCode(r'''
+bool f(List<int> left, bool right) {
+  return left || right;
+}''', [StaticTypeWarningCode.NON_BOOL_OPERAND]);
+  }
+
+  test_nonBoolOperand_or_right() async {
+    await assertErrorsInCode(r'''
+bool f(bool left, double right) {
+  return left || right;
+}''', [StaticTypeWarningCode.NON_BOOL_OPERAND]);
+  }
+
+  test_nonTypeAsTypeArgument_notAType() async {
+    await assertErrorsInCode(r'''
+int A;
+class B<E> {}
+f(B<A> b) {}''', [StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT]);
+  }
+
+  test_nonTypeAsTypeArgument_undefinedIdentifier() async {
+    await assertErrorsInCode(r'''
+class B<E> {}
+f(B<A> b) {}''', [StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT]);
+  }
+
+  test_returnOfInvalidType_async_future_future_int_mismatches_future_int() async {
+    await assertErrorsInCode('''
+import 'dart:async';
+Future<int> f() async {
+  return g();
+}
+Future<Future<int>> g() => null;
+''', [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
+  }
+
+  test_returnOfInvalidType_async_future_int_mismatches_future_string() async {
+    await assertErrorsInCode('''
+import 'dart:async';
+Future<String> f() async {
+  return 5;
+}
+''', [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
+  }
+
+  test_returnOfInvalidType_async_future_int_mismatches_int() async {
+    await assertErrorsInCode('''
+int f() async {
+  return 5;
+}
+''', [
+      StaticTypeWarningCode.RETURN_OF_INVALID_TYPE,
+      StaticTypeWarningCode.ILLEGAL_ASYNC_RETURN_TYPE
+    ]);
+  }
+
+  test_returnOfInvalidType_expressionFunctionBody_function() async {
+    await assertErrorsInCode(
+        "int f() => '0';", [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
+  }
+
+  test_returnOfInvalidType_expressionFunctionBody_getter() async {
+    await assertErrorsInCode(
+        "int get g => '0';", [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
+  }
+
+  test_returnOfInvalidType_expressionFunctionBody_localFunction() async {
+    await assertErrorsInCode(r'''
+class A {
+  String m() {
+    int f() => '0';
+    return '0';
+  }
+}''', [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
+  }
+
+  test_returnOfInvalidType_expressionFunctionBody_method() async {
+    await assertErrorsInCode(r'''
+class A {
+  int f() => '0';
+}''', [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
+  }
+
+  test_returnOfInvalidType_function() async {
+    await assertErrorsInCode("int f() { return '0'; }",
+        [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
+  }
+
+  test_returnOfInvalidType_getter() async {
+    await assertErrorsInCode("int get g { return '0'; }",
+        [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
+  }
+
+  test_returnOfInvalidType_localFunction() async {
+    await assertErrorsInCode(r'''
+class A {
+  String m() {
+    int f() { return '0'; }
+    return '0';
+  }
+}''', [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
+  }
+
+  test_returnOfInvalidType_method() async {
+    await assertErrorsInCode(r'''
+class A {
+  int f() { return '0'; }
+}''', [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
+  }
+
+  test_returnOfInvalidType_not_issued_for_expressionFunctionBody_void() async {
+    await assertNoErrorsInCode("void f() => 42;");
+  }
+
+  test_returnOfInvalidType_not_issued_for_valid_generic_return() async {
+    await assertNoErrorsInCode(r'''
+abstract class F<T, U>  {
+  U get value;
+}
+
+abstract class G<T> {
+  T test(F<int, T> arg) => arg.value;
+}
+
+abstract class H<S> {
+  S test(F<int, S> arg) => arg.value;
+}
+
+void main() { }''');
+  }
+
+  test_returnOfInvalidType_void() async {
+    await assertErrorsInCode("void f() { return 42; }",
+        [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
+  }
+
+  test_typeArgumentNotMatchingBounds_classTypeAlias() async {
+    await assertErrorsInCode(r'''
+class A {}
+class B {}
+class C {}
+class G<E extends A> {}
+class D = G<B> with C;
+''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
+  }
+
+  test_typeArgumentNotMatchingBounds_extends() async {
+    await assertErrorsInCode(r'''
+class A {}
+class B {}
+class G<E extends A> {}
+class C extends G<B>{}
+''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
+  }
+
+  test_typeArgumentNotMatchingBounds_extends_regressionInIssue18468Fix() async {
+    // https://code.google.com/p/dart/issues/detail?id=18628
+    await assertErrorsInCode(r'''
+class X<T extends Type> {}
+class Y<U> extends X<U> {}
+''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
+  }
+
+  test_typeArgumentNotMatchingBounds_fieldFormalParameter() async {
+    await assertErrorsInCode(r'''
+class A {}
+class B {}
+class G<E extends A> {}
+class C {
+  var f;
+  C(G<B> this.f) {}
+}''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
+  }
+
+  test_typeArgumentNotMatchingBounds_functionReturnType() async {
+    await assertErrorsInCode(r'''
+class A {}
+class B {}
+class G<E extends A> {}
+G<B> f() { return null; }
+''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
+  }
+
+  test_typeArgumentNotMatchingBounds_functionTypeAlias() async {
+    await assertErrorsInCode(r'''
+class A {}
+class B {}
+class G<E extends A> {}
+typedef G<B> f();
+''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
+  }
+
+  test_typeArgumentNotMatchingBounds_functionTypedFormalParameter() async {
+    await assertErrorsInCode(r'''
+class A {}
+class B {}
+class G<E extends A> {}
+f(G<B> h()) {}
+''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
+  }
+
+  test_typeArgumentNotMatchingBounds_implements() async {
+    await assertErrorsInCode(r'''
+class A {}
+class B {}
+class G<E extends A> {}
+class C implements G<B>{}
+''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
+  }
+
+  test_typeArgumentNotMatchingBounds_is() async {
+    await assertErrorsInCode(r'''
+class A {}
+class B {}
+class G<E extends A> {}
+var b = 1 is G<B>;
+''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
+  }
+
+  test_typeArgumentNotMatchingBounds_methodInvocation_localFunction() async {
+    await assertErrorsInCode(r'''
+class Point<T extends num> {
+  Point(T x, T y);
+}
+
+main() {
+  Point<T> f<T extends num>(T x, T y) {
+    return new Point<T>(x, y);
+  }
+  print(f<String>('hello', 'world'));
+}
+''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
+  }
+
+  test_typeArgumentNotMatchingBounds_methodInvocation_method() async {
+    await assertErrorsInCode(r'''
+class Point<T extends num> {
+  Point(T x, T y);
+}
+
+class PointFactory {
+  Point<T> point<T extends num>(T x, T y) {
+    return new Point<T>(x, y);
+  }
+}
+
+f(PointFactory factory) {
+  print(factory.point<String>('hello', 'world'));
+}
+''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
+  }
+
+  test_typeArgumentNotMatchingBounds_methodInvocation_topLevelFunction() async {
+    await assertErrorsInCode(r'''
+class Point<T extends num> {
+  Point(T x, T y);
+}
+
+Point<T> f<T extends num>(T x, T y) {
+  return new Point<T>(x, y);
+}
+
+main() {
+  print(f<String>('hello', 'world'));
+}
+''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
+  }
+
+  test_typeArgumentNotMatchingBounds_methodReturnType() async {
+    await assertErrorsInCode(r'''
+class A {}
+class B {}
+class G<E extends A> {}
+class C {
+  G<B> m() { return null; }
+}''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
+  }
+
+  test_typeArgumentNotMatchingBounds_new() async {
+    await assertErrorsInCode(r'''
+class A {}
+class B {}
+class G<E extends A> {}
+f() { return new G<B>(); }
+''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
+  }
+
+  test_typeArgumentNotMatchingBounds_new_superTypeOfUpperBound() async {
+    await assertErrorsInCode(r'''
+class A {}
+class B extends A {}
+class C extends B {}
+class G<E extends B> {}
+f() { return new G<A>(); }
+''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
+  }
+
+  test_typeArgumentNotMatchingBounds_ofFunctionTypeAlias() async {
+    await assertErrorsInCode(r'''
+class A {}
+class B {}
+typedef F<T extends A>();
+F<B> fff;
+''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
+  }
+
+  test_typeArgumentNotMatchingBounds_parameter() async {
+    await assertErrorsInCode(r'''
+class A {}
+class B {}
+class G<E extends A> {}
+f(G<B> g) {}
+''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
+  }
+
+  test_typeArgumentNotMatchingBounds_redirectingConstructor() async {
+    await assertErrorsInCode(r'''
+class A {}
+class B {}
+class X<T extends A> {
+  X(int x, int y) {}
+  factory X.name(int x, int y) = X<B>;
+}''', [
+      StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS,
+      StaticWarningCode.REDIRECT_TO_INVALID_RETURN_TYPE
+    ]);
+  }
+
+  test_typeArgumentNotMatchingBounds_typeArgumentList() async {
+    await assertErrorsInCode(r'''
+class A {}
+class B {}
+class C<E> {}
+class D<E extends A> {}
+C<D<B>> Var;
+''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
+  }
+
+  test_typeArgumentNotMatchingBounds_typeParameter() async {
+    await assertErrorsInCode(r'''
+class A {}
+class B {}
+class C {}
+class G<E extends A> {}
+class D<F extends G<B>> {}
+''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
+  }
+
+  test_typeArgumentNotMatchingBounds_variableDeclaration() async {
+    await assertErrorsInCode(r'''
+class A {}
+class B {}
+class G<E extends A> {}
+G<B> g;
+''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
+  }
+
+  test_typeArgumentNotMatchingBounds_with() async {
+    await assertErrorsInCode(r'''
+class A {}
+class B {}
+class G<E extends A> {}
+class C extends Object with G<B>{}
+''', [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
+  }
+
+  test_typeParameterSupertypeOfItsBound() async {
+    await assertErrorsInCode(r'''
+class A<T extends T> {
+}
+''', [StaticTypeWarningCode.TYPE_PARAMETER_SUPERTYPE_OF_ITS_BOUND]);
+  }
+
+  test_typePromotion_booleanAnd_useInRight_accessedInClosureRight_mutated() async {
+    await assertErrorsInUnverifiedCode(r'''
+callMe(f()) { f(); }
+main(Object p) {
+  (p is String) && callMe(() { p.length; });
+  p = 0;
+}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
+  }
+
+  test_typePromotion_booleanAnd_useInRight_mutatedInLeft() async {
+    await assertErrorsInUnverifiedCode(r'''
+main(Object p) {
+  ((p is String) && ((p = 42) == 42)) && p.length != 0;
+}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
+  }
+
+  test_typePromotion_booleanAnd_useInRight_mutatedInRight() async {
+    await assertErrorsInUnverifiedCode(r'''
+main(Object p) {
+  (p is String) && (((p = 42) == 42) && p.length != 0);
+}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
+  }
+
+  test_typePromotion_conditional_useInThen_accessedInClosure_hasAssignment_after() async {
+    await assertErrorsInUnverifiedCode(r'''
+callMe(f()) { f(); }
+main(Object p) {
+  p is String ? callMe(() { p.length; }) : 0;
+  p = 42;
+}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
+  }
+
+  test_typePromotion_conditional_useInThen_accessedInClosure_hasAssignment_before() async {
+    await assertErrorsInUnverifiedCode(r'''
+callMe(f()) { f(); }
+main(Object p) {
+  p = 42;
+  p is String ? callMe(() { p.length; }) : 0;
+}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
+  }
+
+  test_typePromotion_conditional_useInThen_hasAssignment() async {
+    await assertErrorsInUnverifiedCode(r'''
+main(Object p) {
+  p is String ? (p.length + (p = 42)) : 0;
+}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
+  }
+
+  test_typePromotion_if_accessedInClosure_hasAssignment() async {
+    await assertErrorsInUnverifiedCode(r'''
+callMe(f()) { f(); }
+main(Object p) {
+  if (p is String) {
+    callMe(() {
+      p.length;
+    });
+  }
+  p = 0;
+}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
+  }
+
+  test_typePromotion_if_and_right_hasAssignment() async {
+    await assertErrorsInUnverifiedCode(r'''
+main(Object p) {
+  if (p is String && (p = null) == null) {
+    p.length;
+  }
+}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
+  }
+
+  test_typePromotion_if_extends_notMoreSpecific_dynamic() async {
+    await assertErrorsInUnverifiedCode(r'''
+class V {}
+class A<T> {}
+class B<S> extends A<S> {
+  var b;
+}
+
+main(A<V> p) {
+  if (p is B) {
+    p.b;
+  }
+}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
+  }
+
+  test_typePromotion_if_extends_notMoreSpecific_notMoreSpecificTypeArg() async {
+    await assertErrorsInUnverifiedCode(r'''
+class V {}
+class A<T> {}
+class B<S> extends A<S> {
+  var b;
+}
+
+main(A<V> p) {
+  if (p is B<int>) {
+    p.b;
+  }
+}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
+  }
+
+  test_typePromotion_if_hasAssignment_after() async {
+    await assertErrorsInUnverifiedCode(r'''
+main(Object p) {
+  if (p is String) {
+    p.length;
+    p = 0;
+  }
+}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
+  }
+
+  test_typePromotion_if_hasAssignment_before() async {
+    await assertErrorsInUnverifiedCode(r'''
+main(Object p) {
+  if (p is String) {
+    p = 0;
+    p.length;
+  }
+}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
+  }
+
+  test_typePromotion_if_hasAssignment_inClosure_anonymous_after() async {
+    await assertErrorsInUnverifiedCode(r'''
+main(Object p) {
+  if (p is String) {
+    p.length;
+  }
+  () {p = 0;};
+}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
+  }
+
+  test_typePromotion_if_hasAssignment_inClosure_anonymous_before() async {
+    await assertErrorsInUnverifiedCode(r'''
+main(Object p) {
+  () {p = 0;};
+  if (p is String) {
+    p.length;
+  }
+}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
+  }
+
+  test_typePromotion_if_hasAssignment_inClosure_function_after() async {
+    await assertErrorsInUnverifiedCode(r'''
+main(Object p) {
+  if (p is String) {
+    p.length;
+  }
+  f() {p = 0;};
+}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
+  }
+
+  test_typePromotion_if_hasAssignment_inClosure_function_before() async {
+    await assertErrorsInUnverifiedCode(r'''
+main(Object p) {
+  f() {p = 0;};
+  if (p is String) {
+    p.length;
+  }
+}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
+  }
+
+  test_typePromotion_if_implements_notMoreSpecific_dynamic() async {
+    await assertErrorsInUnverifiedCode(r'''
+class V {}
+class A<T> {}
+class B<S> implements A<S> {
+  var b;
+}
+
+main(A<V> p) {
+  if (p is B) {
+    p.b;
+  }
+}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
+  }
+
+  test_typePromotion_if_with_notMoreSpecific_dynamic() async {
+    await assertErrorsInUnverifiedCode(r'''
+class V {}
+class A<T> {}
+class B<S> extends Object with A<S> {
+  var b;
+}
+
+main(A<V> p) {
+  if (p is B) {
+    p.b;
+  }
+}
+''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
+  }
+
+  test_undefinedEnumConstant() async {
+    // We should be reporting UNDEFINED_ENUM_CONSTANT here.
+    await assertErrorsInCode(r'''
+enum E { ONE }
+E e() {
+  return E.TWO;
+}
+''', [StaticTypeWarningCode.UNDEFINED_GETTER], verify: false);
+  }
+
+  test_undefinedGetter() async {
+    await assertErrorsInUnverifiedCode(r'''
+class T {}
+f(T e) { return e.m; }
+''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
+  }
+
+  test_undefinedGetter_generic_function_call() async {
+    // Referencing `.call` on a `Function` type works similarly to referencing
+    // it on `dynamic`--the reference is accepted at compile time, and all type
+    // checking is deferred until runtime.
+    await assertErrorsInUnverifiedCode('''
+f(Function f) {
+  return f.call;
+}
+''', []);
+  }
+
+  test_undefinedGetter_object_call() async {
+    await assertErrorsInUnverifiedCode('''
+f(Object o) {
+  return o.call;
+}
+''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
+  }
+
+  test_undefinedGetter_proxy_annotation_fakeProxy() async {
+    await assertErrorsInCode(r'''
+library L;
+class Fake {
+  const Fake();
+}
+const proxy = const Fake();
+@proxy class PrefixProxy {}
+main() {
+  new PrefixProxy().foo;
+}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
+  }
+
+  test_undefinedGetter_static() async {
+    await assertErrorsInUnverifiedCode(r'''
+class A {}
+var a = A.B;''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
+  }
+
+  test_undefinedGetter_typeLiteral_cascadeTarget() async {
+    await assertErrorsInCode(r'''
+class T {
+  static int get foo => 42;
+}
+main() {
+  T..foo;
+}''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
+  }
+
+  test_undefinedGetter_typeLiteral_conditionalAccess() async {
+    // When applied to a type literal, the conditional access operator '?.'
+    // cannot be used to access instance getters of Type.
+    // TODO(brianwilkerson) We cannot verify because hashCode isn't resolved.
+    await assertErrorsInCode('''
+class A {}
+f() => A?.hashCode;
+''', [StaticTypeWarningCode.UNDEFINED_GETTER], verify: false);
+  }
+
+  test_undefinedGetter_wrongNumberOfTypeArguments_tooLittle() async {
+    await assertErrorsInCode(r'''
+class A<K, V> {
+  K element;
+}
+main(A<int> a) {
+  a.element.anyGetterExistsInDynamic;
+}''', [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
+  }
+
+  test_undefinedGetter_wrongNumberOfTypeArguments_tooMany() async {
+    await assertErrorsInCode(r'''
+class A<E> {
+  E element;
+}
+main(A<int,int> a) {
+  a.element.anyGetterExistsInDynamic;
+}''', [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
+  }
+
+  test_undefinedGetter_wrongOfTypeArgument() async {
+    await assertErrorsInCode(r'''
+class A<E> {
+  E element;
+}
+main(A<NoSuchType> a) {
+  a.element.anyGetterExistsInDynamic;
+}''', [StaticTypeWarningCode.NON_TYPE_AS_TYPE_ARGUMENT]);
+  }
+
+  test_undefinedMethod_assignmentExpression() async {
+    await assertErrorsInCode(r'''
+class A {}
+class B {
+  f(A a) {
+    A a2 = new A();
+    a += a2;
+  }
+}''', [StaticTypeWarningCode.UNDEFINED_METHOD]);
+  }
+
+  test_undefinedMethod_ignoreTypePropagation() async {
+    await assertErrorsInCode(r'''
+class A {}
+class B extends A {
+  m() {}
+}
+class C {
+  f() {
+    A a = new B();
+    a.m();
+  }
+}''', [StaticTypeWarningCode.UNDEFINED_METHOD]);
+  }
+
+  test_undefinedMethod_leastUpperBoundWithNull() async {
+    await assertErrorsInCode('f(bool b, int i) => (b ? null : i).foo();',
+        [StaticTypeWarningCode.UNDEFINED_METHOD]);
+  }
+
+  test_undefinedMethod_ofNull() async {
+    // TODO(scheglov) Track https://github.com/dart-lang/sdk/issues/28430 to
+    // decide whether a warning should be reported here.
+    await assertErrorsInCode(r'''
+Null f(int x) => null;
+main() {
+  f(42).abs();
+}
+''', [StaticTypeWarningCode.UNDEFINED_METHOD]);
+  }
+
+  test_undefinedMethodWithConstructor() async {
+    // TODO(brianwilkerson) We cannot verify because 'C' could not be resolved.
+    await assertErrorsInCode(r'''
+class C {
+  C.m();
+}
+f() {
+  C c = C.m();
+}''', [], verify: false);
+  }
+
+  test_undefinedOperator_indexBoth() async {
+    await assertErrorsInUnverifiedCode(r'''
+class A {}
+f(A a) {
+  a[0]++;
+}''', [
+      StaticTypeWarningCode.UNDEFINED_OPERATOR,
+      StaticTypeWarningCode.UNDEFINED_OPERATOR,
+    ]);
+  }
+
+  test_undefinedOperator_indexGetter() async {
+    await assertErrorsInUnverifiedCode(r'''
+class A {}
+f(A a) {
+  a[0];
+}''', [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+  }
+
+  test_undefinedOperator_indexSetter() async {
+    await assertErrorsInUnverifiedCode(r'''
+class A {}
+f(A a) {
+  a[0] = 1;
+}''', [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+  }
+
+  test_undefinedOperator_plus() async {
+    await assertErrorsInUnverifiedCode(r'''
+class A {}
+f(A a) {
+  a + 1;
+}''', [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+  }
+
+  test_undefinedOperator_postfixExpression() async {
+    await assertErrorsInCode(r'''
+class A {}
+f(A a) {
+  a++;
+}''', [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+  }
+
+  test_undefinedOperator_prefixExpression() async {
+    await assertErrorsInCode(r'''
+class A {}
+f(A a) {
+  ++a;
+}''', [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+  }
+
+  test_undefinedSetter() async {
+    await assertErrorsInUnverifiedCode(r'''
+class T {}
+f(T e1) { e1.m = 0; }''', [StaticTypeWarningCode.UNDEFINED_SETTER]);
+  }
+
+  test_undefinedSetter_static() async {
+    await assertErrorsInUnverifiedCode(r'''
+class A {}
+f() { A.B = 0;}''', [StaticTypeWarningCode.UNDEFINED_SETTER]);
+  }
+
+  test_undefinedSetter_typeLiteral_cascadeTarget() async {
+    await assertErrorsInCode(r'''
+class T {
+  static void set foo(_) {}
+}
+main() {
+  T..foo = 42;
+}''', [StaticTypeWarningCode.UNDEFINED_SETTER]);
+  }
+
+  test_unqualifiedReferenceToNonLocalStaticMember_getter() async {
+    await assertErrorsInCode(r'''
+class A {
+  static int get a => 0;
+}
+class B extends A {
+  int b() {
+    return a;
+  }
+}''', [StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER]);
+  }
+
+  test_unqualifiedReferenceToNonLocalStaticMember_getter_invokeTarget() async {
+    await assertErrorsInCode(r'''
+class A {
+  static int foo;
+}
+
+class B extends A {
+  static bar() {
+    foo.abs();
+  }
+}
+''', [StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER]);
+  }
+
+  test_unqualifiedReferenceToNonLocalStaticMember_setter() async {
+    await assertErrorsInCode(r'''
+class A {
+  static set a(x) {}
+}
+class B extends A {
+  b(y) {
+    a = y;
+  }
+}''', [StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER]);
+  }
+
+  test_wrongNumberOfTypeArguments_class_tooFew() async {
+    await assertErrorsInCode(r'''
+class A<E, F> {}
+A<A> a = null;''', [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
+  }
+
+  test_wrongNumberOfTypeArguments_class_tooMany() async {
+    await assertErrorsInCode(r'''
+class A<E> {}
+A<A, A> a = null;''', [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
+  }
+
+  test_wrongNumberOfTypeArguments_classAlias() async {
+    await assertErrorsInCode(r'''
+class A {}
+class M {}
+class B<F extends num> = A<F> with M;''',
+        [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
+  }
+
+  test_wrongNumberOfTypeArguments_dynamic() async {
+    await assertErrorsInCode(r'''
+dynamic<int> v;
+''', [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
+  }
+
+  test_wrongNumberOfTypeArguments_typeParameter() async {
+    await assertErrorsInCode(r'''
+class C<T> {
+  T<int> f;
+}
+''', [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
+  }
+
+  test_wrongNumberOfTypeArguments_typeTest_tooFew() async {
+    await assertErrorsInCode(r'''
+class A {}
+class C<K, V> {}
+f(p) {
+  return p is C<A>;
+}''', [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
+  }
+
+  test_wrongNumberOfTypeArguments_typeTest_tooMany() async {
+    await assertErrorsInCode(r'''
+class A {}
+class C<E> {}
+f(p) {
+  return p is C<A, A>;
+}''', [StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS]);
+  }
+
+  test_yield_async_to_basic_type() async {
+    await assertErrorsInCode('''
+int f() async* {
+  yield 3;
+}
+''', [
+      StaticTypeWarningCode.YIELD_OF_INVALID_TYPE,
+      StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE
+    ]);
+  }
+
+  test_yield_async_to_iterable() async {
+    await assertErrorsInCode('''
+Iterable<int> f() async* {
+  yield 3;
+}
+''', [
+      StaticTypeWarningCode.YIELD_OF_INVALID_TYPE,
+      StaticTypeWarningCode.ILLEGAL_ASYNC_GENERATOR_RETURN_TYPE
+    ]);
+  }
+
+  test_yield_async_to_mistyped_stream() async {
+    await assertErrorsInCode('''
+import 'dart:async';
+Stream<int> f() async* {
+  yield "foo";
+}
+''', [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
+  }
+
+  test_yield_each_async_non_stream() async {
+    await assertErrorsInCode('''
+f() async* {
+  yield* 0;
+}
+''', [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
+  }
+
+  test_yield_each_async_to_mistyped_stream() async {
+    await assertErrorsInCode('''
+import 'dart:async';
+Stream<int> f() async* {
+  yield* g();
+}
+Stream<String> g() => null;
+''', [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
+  }
+
+  test_yield_each_sync_non_iterable() async {
+    await assertErrorsInCode('''
+f() sync* {
+  yield* 0;
+}
+''', [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
+  }
+
+  test_yield_each_sync_to_mistyped_iterable() async {
+    await assertErrorsInCode('''
+Iterable<int> f() sync* {
+  yield* g();
+}
+Iterable<String> g() => null;
+''', [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
+  }
+
+  test_yield_sync_to_basic_type() async {
+    await assertErrorsInCode('''
+int f() sync* {
+  yield 3;
+}
+''', [
+      StaticTypeWarningCode.YIELD_OF_INVALID_TYPE,
+      StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE
+    ]);
+  }
+
+  test_yield_sync_to_mistyped_iterable() async {
+    await assertErrorsInCode('''
+Iterable<int> f() sync* {
+  yield "foo";
+}
+''', [StaticTypeWarningCode.YIELD_OF_INVALID_TYPE]);
+  }
+
+  test_yield_sync_to_stream() async {
+    await assertErrorsInCode('''
+import 'dart:async';
+Stream<int> f() sync* {
+  yield 3;
+}
+''', [
+      StaticTypeWarningCode.YIELD_OF_INVALID_TYPE,
+      StaticTypeWarningCode.ILLEGAL_SYNC_GENERATOR_RETURN_TYPE
+    ]);
+  }
+}
+
+@reflectiveTest
+class StrongModeStaticTypeWarningCodeTest extends ResolverTestCase {
+  void setUp() {
+    super.setUp();
+    AnalysisOptionsImpl options = new AnalysisOptionsImpl();
+    resetWith(options: options);
+  }
+
+  test_legalAsyncGeneratorReturnType_function_supertypeOfStream() async {
+    await assertErrorsInCode('''
+import 'dart:async';
+f() async* { yield 42; }
+dynamic f2() async* { yield 42; }
+Object f3() async* { yield 42; }
+Stream f4() async* { yield 42; }
+Stream<dynamic> f5() async* { yield 42; }
+Stream<Object> f6() async* { yield 42; }
+Stream<num> f7() async* { yield 42; }
+Stream<int> f8() async* { yield 42; }
+''', []);
+  }
+
+  test_legalAsyncReturnType_function_supertypeOfFuture() async {
+    await assertErrorsInCode('''
+import 'dart:async';
+f() async { return 42; }
+dynamic f2() async { return 42; }
+Object f3() async { return 42; }
+Future f4() async { return 42; }
+Future<dynamic> f5() async { return 42; }
+Future<Object> f6() async { return 42; }
+Future<num> f7() async { return 42; }
+Future<int> f8() async { return 42; }
+''', []);
+  }
+
+  test_legalSyncGeneratorReturnType_function_supertypeOfIterable() async {
+    await assertErrorsInCode('''
+f() sync* { yield 42; }
+dynamic f2() sync* { yield 42; }
+Object f3() sync* { yield 42; }
+Iterable f4() sync* { yield 42; }
+Iterable<dynamic> f5() sync* { yield 42; }
+Iterable<Object> f6() sync* { yield 42; }
+Iterable<num> f7() sync* { yield 42; }
+Iterable<int> f8() sync* { yield 42; }
+''', []);
+  }
+}
diff --git a/pkg/analyzer/test/generated/static_warning_code_driver_test.dart b/pkg/analyzer/test/generated/static_warning_code_driver_test.dart
deleted file mode 100644
index ec8e367..0000000
--- a/pkg/analyzer/test/generated/static_warning_code_driver_test.dart
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/src/dart/analysis/experiments.dart';
-import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import 'resolver_test_case.dart';
-import 'static_warning_code_test.dart';
-
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(SetElementTypeNotAssignableTest);
-    defineReflectiveTests(StaticWarningCodeTest_Driver);
-  });
-}
-
-@reflectiveTest
-class SetElementTypeNotAssignableTest extends ResolverTestCase {
-  @override
-  List<String> get enabledExperiments => [EnableString.set_literals];
-
-  @override
-  bool get enableNewAnalysisDriver => true;
-
-  test_setElementTypeNotAssignable() async {
-    Source source = addSource("var v = <String>{42};");
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE]);
-    verify([source]);
-  }
-}
-
-@reflectiveTest
-class StaticWarningCodeTest_Driver extends StaticWarningCodeTest {
-  @override
-  bool get enableNewAnalysisDriver => true;
-}
diff --git a/pkg/analyzer/test/generated/static_warning_code_test.dart b/pkg/analyzer/test/generated/static_warning_code_test.dart
index 53664c9..463cae1 100644
--- a/pkg/analyzer/test/generated/static_warning_code_test.dart
+++ b/pkg/analyzer/test/generated/static_warning_code_test.dart
@@ -4,7 +4,6 @@
 
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/error/error.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/generated/source_io.dart';
 import 'package:test/test.dart';
@@ -14,80 +13,12 @@
 
 main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(EqualValuesInConstSetTest);
+    defineReflectiveTests(StaticWarningCodeTest);
   });
 }
 
 @reflectiveTest
-class EqualValuesInConstSetTest extends ResolverTestCase {
-  @override
-  List<String> get enabledExperiments => [EnableString.set_literals];
-
-  @override
-  bool get enableNewAnalysisDriver => true;
-
-  test_simpleValues() async {
-    Source source = addSource('var s = const {0, 1, 0};');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.EQUAL_VALUES_IN_CONST_SET]);
-    verify([source]);
-  }
-
-  test_valuesWithEqualTypeParams() async {
-    Source source = addSource(r'''
-class A<T> {
-  const A();
-}
-var s = const {A<int>(), A<int>()};
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.EQUAL_VALUES_IN_CONST_SET]);
-    verify([source]);
-  }
-
-  test_valuesWithUnequalTypeParams() async {
-    // No error should be produced because A<int> and A<num> are different
-    // types.
-    Source source = addSource(r'''
-class A<T> {
-  const A();
-}
-const s = {A<int>(), A<num>()};
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-}
-
-abstract class StaticWarningCodeTest extends ResolverTestCase {
-  fail_argumentTypeNotAssignable_tearOff_required() async {
-    Source source = addSource(r'''
-class C {
-  Object/*=T*/ f/*<T>*/(Object/*=T*/ x) => x;
-}
-g(C c) {
-  var h = c.f/*<int>*/;
-  print(h('s'));
-}
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
-    verify([source]);
-  }
-
-  fail_undefinedIdentifier_commentReference() async {
-    Source source = addSource(r'''
-/** [m] xxx [new B.c] */
-class A {
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      StaticWarningCode.UNDEFINED_IDENTIFIER,
-      StaticWarningCode.UNDEFINED_IDENTIFIER
-    ]);
-  }
-
+class StaticWarningCodeTest extends ResolverTestCase {
   test_ambiguousImport_as() async {
     Source source = addSource(r'''
 import 'lib1.dart';
@@ -111,9 +42,7 @@
 Future v;
 ''');
     await computeAnalysisResult(source);
-    if (enableNewAnalysisDriver) {
-      assertErrors(source, [StaticWarningCode.AMBIGUOUS_IMPORT]);
-    }
+    assertErrors(source, [StaticWarningCode.AMBIGUOUS_IMPORT]);
   }
 
   test_ambiguousImport_extends() async {
@@ -645,6 +574,22 @@
     verify([source]);
   }
 
+  @failingTest
+  test_argumentTypeNotAssignable_tearOff_required() async {
+    Source source = addSource(r'''
+class C {
+  Object/*=T*/ f/*<T>*/(Object/*=T*/ x) => x;
+}
+g(C c) {
+  var h = c.f/*<int>*/;
+  print(h('s'));
+}
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
+    verify([source]);
+  }
+
   test_assignmentToClass() async {
     Source source = addSource('''
 class C {}
@@ -1010,37 +955,6 @@
         classA.declaredElement.type.instantiate([typeProvider.intType]));
   }
 
-  test_equalKeysInMap() async {
-    Source source = addSource("var m = {'a' : 0, 'b' : 1, 'a' : 2};");
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.EQUAL_KEYS_IN_MAP]);
-    verify([source]);
-  }
-
-  test_equalKeysInMap_withEqualTypeParams() async {
-    Source source = addSource(r'''
-class A<T> {
-  const A();
-}
-var m = {const A<int>(): 0, const A<int>(): 1};''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.EQUAL_KEYS_IN_MAP]);
-    verify([source]);
-  }
-
-  test_equalKeysInMap_withUnequalTypeParams() async {
-    // No error should be produced because A<int> and A<num> are different
-    // types.
-    Source source = addSource(r'''
-class A<T> {
-  const A();
-}
-var m = {const A<int>(): 0, const A<num>(): 1};''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
   test_exportDuplicatedLibraryNamed() async {
     Source source = addSource(r'''
 library test;
@@ -2324,27 +2238,6 @@
     verify([source]);
   }
 
-  test_listElementTypeNotAssignable() async {
-    Source source = addSource("var v = <String> [42];");
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE]);
-    verify([source]);
-  }
-
-  test_mapKeyTypeNotAssignable() async {
-    Source source = addSource("var v = <String, int > {1 : 2};");
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE]);
-    verify([source]);
-  }
-
-  test_mapValueTypeNotAssignable() async {
-    Source source = addSource("var v = <String, String> {'a' : 2};");
-    await computeAnalysisResult(source);
-    assertErrors(source, [StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE]);
-    verify([source]);
-  }
-
   test_mismatchedAccessorTypes_topLevel() async {
     Source source = addSource(r'''
 int get g { return 0; }
@@ -3579,6 +3472,19 @@
     assertErrors(source, [StaticWarningCode.UNDEFINED_CLASS_BOOLEAN]);
   }
 
+  @failingTest
+  test_undefinedIdentifier_commentReference() async {
+    Source source = addSource(r'''
+/** [m] xxx [new B.c] */
+class A {
+}''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [
+      StaticWarningCode.UNDEFINED_IDENTIFIER,
+      StaticWarningCode.UNDEFINED_IDENTIFIER
+    ]);
+  }
+
   test_undefinedIdentifier_for() async {
     Source source = addSource(r'''
 f(var l) {
diff --git a/pkg/analyzer/test/generated/strong_mode.dart b/pkg/analyzer/test/generated/strong_mode.dart
deleted file mode 100644
index d5d561b..0000000
--- a/pkg/analyzer/test/generated/strong_mode.dart
+++ /dev/null
@@ -1,4601 +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:async';
-
-import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/dart/ast/standard_resolution_map.dart';
-import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer/src/dart/element/element.dart';
-import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/source_io.dart';
-import 'package:analyzer/src/task/strong/ast_properties.dart';
-import 'package:analyzer/src/test_utilities/find_node.dart';
-import 'package:front_end/src/base/errors.dart';
-import 'package:test/test.dart';
-
-import '../utils.dart';
-import 'resolver_test_case.dart';
-
-/// Strong mode static analyzer local type inference tests
-abstract class StrongModeLocalInferenceTest extends ResolverTestCase {
-  TypeAssertions _assertions;
-
-  Asserter<DartType> _isDynamic;
-  Asserter<InterfaceType> _isFutureOfDynamic;
-  Asserter<InterfaceType> _isFutureOfInt;
-  Asserter<InterfaceType> _isFutureOfNull;
-  Asserter<InterfaceType> _isFutureOrOfInt;
-  Asserter<DartType> _isInt;
-  Asserter<DartType> _isNull;
-  Asserter<DartType> _isNum;
-  Asserter<DartType> _isObject;
-  Asserter<DartType> _isString;
-
-  AsserterBuilder2<Asserter<DartType>, Asserter<DartType>, DartType>
-      _isFunction2Of;
-  AsserterBuilder<List<Asserter<DartType>>, InterfaceType> _isFutureOf;
-  AsserterBuilder<List<Asserter<DartType>>, InterfaceType> _isFutureOrOf;
-  AsserterBuilderBuilder<Asserter<DartType>, List<Asserter<DartType>>, DartType>
-      _isInstantiationOf;
-  AsserterBuilder<Asserter<DartType>, InterfaceType> _isListOf;
-  AsserterBuilder2<Asserter<DartType>, Asserter<DartType>, InterfaceType>
-      _isMapOf;
-  AsserterBuilder<List<Asserter<DartType>>, InterfaceType> _isStreamOf;
-  AsserterBuilder<DartType, DartType> _isType;
-
-  AsserterBuilder<Element, DartType> _hasElement;
-  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;
-      _isNull = _assertions.isNull;
-      _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));
-      _isFutureOrOf =
-          _isInstantiationOf(_hasElementOf(typeProvider.futureOrType));
-      _isFutureOfDynamic = _isFutureOf([_isDynamic]);
-      _isFutureOfInt = _isFutureOf([_isInt]);
-      _isFutureOfNull = _isFutureOf([_isNull]);
-      _isFutureOrOfInt = _isFutureOrOf([_isInt]);
-      _isStreamOf = _isInstantiationOf(_hasElementOf(typeProvider.streamType));
-    }
-    return result;
-  }
-
-  @override
-  void setUp() {
-    super.setUp();
-    AnalysisOptionsImpl options = new AnalysisOptionsImpl();
-    resetWith(options: options);
-  }
-
-  test_async_method_propagation() async {
-    String code = r'''
-      import "dart:async";
-      class A {
-        Future f0() => new Future.value(3);
-        Future f1() async => new Future.value(3);
-        Future f2() async => await new Future.value(3);
-
-        Future<int> f3() => new Future.value(3);
-        Future<int> f4() async => new Future.value(3);
-        Future<int> f5() async => await new Future.value(3);
-
-        Future g0() { return new Future.value(3); }
-        Future g1() async { return new Future.value(3); }
-        Future g2() async { return await new Future.value(3); }
-
-        Future<int> g3() { return new Future.value(3); }
-        Future<int> g4() async { return new Future.value(3); }
-        Future<int> g5() async { return await new Future.value(3); }
-      }
-   ''';
-    CompilationUnit unit = await resolveSource(code);
-
-    void check(String name, Asserter<InterfaceType> typeTest) {
-      MethodDeclaration test = AstFinder.getMethodInClass(unit, "A", name);
-      FunctionBody body = test.body;
-      Expression returnExp;
-      if (body is ExpressionFunctionBody) {
-        returnExp = body.expression;
-      } else {
-        ReturnStatement stmt = (body as BlockFunctionBody).block.statements[0];
-        returnExp = stmt.expression;
-      }
-      DartType type = returnExp.staticType;
-      if (returnExp is AwaitExpression) {
-        type = returnExp.expression.staticType;
-      }
-      typeTest(type);
-    }
-
-    check("f0", _isFutureOfDynamic);
-    check("f1", _isFutureOfDynamic);
-    check("f2", _isFutureOfDynamic);
-
-    check("f3", _isFutureOfInt);
-    check("f4", _isFutureOfInt);
-    check("f5", _isFutureOfInt);
-
-    check("g0", _isFutureOfDynamic);
-    check("g1", _isFutureOfDynamic);
-    check("g2", _isFutureOfDynamic);
-
-    check("g3", _isFutureOfInt);
-    check("g4", _isFutureOfInt);
-    check("g5", _isFutureOfInt);
-  }
-
-  test_async_propagation() async {
-    String code = r'''
-      import "dart:async";
-
-      Future f0() => new Future.value(3);
-      Future f1() async => new Future.value(3);
-      Future f2() async => await new Future.value(3);
-
-      Future<int> f3() => new Future.value(3);
-      Future<int> f4() async => new Future.value(3);
-      Future<int> f5() async => await new Future.value(3);
-
-      Future g0() { return new Future.value(3); }
-      Future g1() async { return new Future.value(3); }
-      Future g2() async { return await new Future.value(3); }
-
-      Future<int> g3() { return new Future.value(3); }
-      Future<int> g4() async { return new Future.value(3); }
-      Future<int> g5() async { return await new Future.value(3); }
-   ''';
-    CompilationUnit unit = await resolveSource(code);
-
-    void check(String name, Asserter<InterfaceType> typeTest) {
-      FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, name);
-      FunctionBody body = test.functionExpression.body;
-      Expression returnExp;
-      if (body is ExpressionFunctionBody) {
-        returnExp = body.expression;
-      } else {
-        ReturnStatement stmt = (body as BlockFunctionBody).block.statements[0];
-        returnExp = stmt.expression;
-      }
-      DartType type = returnExp.staticType;
-      if (returnExp is AwaitExpression) {
-        type = returnExp.expression.staticType;
-      }
-      typeTest(type);
-    }
-
-    check("f0", _isFutureOfDynamic);
-    check("f1", _isFutureOfDynamic);
-    check("f2", _isFutureOfDynamic);
-
-    check("f3", _isFutureOfInt);
-    check("f4", _isFutureOfInt);
-    check("f5", _isFutureOfInt);
-
-    check("g0", _isFutureOfDynamic);
-    check("g1", _isFutureOfDynamic);
-    check("g2", _isFutureOfDynamic);
-
-    check("g3", _isFutureOfInt);
-    check("g4", _isFutureOfInt);
-    check("g5", _isFutureOfInt);
-  }
-
-  test_async_star_method_propagation() async {
-    String code = r'''
-      import "dart:async";
-      class A {
-        Stream g0() async* { yield []; }
-        Stream g1() async* { yield* new Stream(); }
-
-        Stream<List<int>> g2() async* { yield []; }
-        Stream<List<int>> g3() async* { yield* new Stream(); }
-      }
-    ''';
-    CompilationUnit unit = await resolveSource(code);
-
-    void check(String name, Asserter<InterfaceType> typeTest) {
-      MethodDeclaration test = AstFinder.getMethodInClass(unit, "A", name);
-      BlockFunctionBody body = test.body;
-      YieldStatement stmt = body.block.statements[0];
-      Expression exp = stmt.expression;
-      typeTest(exp.staticType);
-    }
-
-    check("g0", _isListOf(_isDynamic));
-    check("g1", _isStreamOf([_isDynamic]));
-
-    check("g2", _isListOf(_isInt));
-    check("g3", _isStreamOf([(DartType type) => _isListOf(_isInt)(type)]));
-  }
-
-  test_async_star_propagation() async {
-    String code = r'''
-      import "dart:async";
-
-      Stream g0() async* { yield []; }
-      Stream g1() async* { yield* new Stream(); }
-
-      Stream<List<int>> g2() async* { yield []; }
-      Stream<List<int>> g3() async* { yield* new Stream(); }
-   ''';
-    CompilationUnit unit = await resolveSource(code);
-
-    void check(String name, Asserter<InterfaceType> typeTest) {
-      FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, name);
-      BlockFunctionBody body = test.functionExpression.body;
-      YieldStatement stmt = body.block.statements[0];
-      Expression exp = stmt.expression;
-      typeTest(exp.staticType);
-    }
-
-    check("g0", _isListOf(_isDynamic));
-    check("g1", _isStreamOf([_isDynamic]));
-
-    check("g2", _isListOf(_isInt));
-    check("g3", _isStreamOf([(DartType type) => _isListOf(_isInt)(type)]));
-  }
-
-  test_cascadeExpression() async {
-    String code = r'''
-      class A<T> {
-        List<T> map(T a, List<T> mapper(T x)) => mapper(a);
-      }
-
-      void main () {
-        A<int> a = new A()..map(0, (x) => [x]);
-     }
-   ''';
-    CompilationUnit unit = await resolveSource(code);
-    List<Statement> statements =
-        AstFinder.getStatementsInTopLevelFunction(unit, "main");
-    CascadeExpression fetch(int i) {
-      VariableDeclarationStatement stmt = statements[i];
-      VariableDeclaration decl = stmt.variables.variables[0];
-      CascadeExpression exp = decl.initializer;
-      return exp;
-    }
-
-    Element elementA = AstFinder.getClass(unit, "A").declaredElement;
-
-    CascadeExpression cascade = fetch(0);
-    _isInstantiationOf(_hasElement(elementA))([_isInt])(cascade.staticType);
-    MethodInvocation invoke = cascade.cascadeSections[0];
-    FunctionExpression function = invoke.argumentList.arguments[1];
-    ExecutableElement f0 = function.declaredElement;
-    _isListOf(_isInt)(f0.type.returnType);
-    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
-    // 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;
-    _isInt(call.staticType);
-  }
-
-  test_constrainedByBounds3() async {
-    Source source = addSource(r'''
-      T f<T extends S, S extends int>(S x) => null;
-      void test() { var x = f(3); }
-   ''');
-    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_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_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)(null); }
-   ''';
-    Source source = addSource(code);
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-    assertErrors(source, [StrongModeCode.COULD_NOT_INFER]);
-    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_constructorInitializer_propagation() async {
-    String code = r'''
-      class A {
-        List<String> x;
-        A() : this.x = [];
-      }
-   ''';
-    CompilationUnit unit = await resolveSource(code);
-    ConstructorDeclaration constructor =
-        AstFinder.getConstructorInClass(unit, "A", null);
-    ConstructorFieldInitializer assignment = constructor.initializers[0];
-    Expression exp = assignment.expression;
-    _isListOf(_isString)(exp.staticType);
-  }
-
-  test_covarianceChecks() async {
-    var source = addSource(r'''
-class C<T> {
-  add(T t) {}
-  forEach(void f(T t)) {}
-}
-class D extends C<int> {
-  add(int t) {}
-  forEach(void f(int t)) {}
-}
-class E extends C<int> {
-  add(Object t) {}
-  forEach(void f(Null t)) {}
-}
-''');
-    var unit = (await computeAnalysisResult(source)).unit;
-    assertNoErrors(source);
-    var cAdd = AstFinder.getMethodInClass(unit, "C", "add");
-    var covariantC = getClassCovariantParameters(AstFinder.getClass(unit, "C"));
-    expect(covariantC.toList(), [cAdd.declaredElement.parameters[0]]);
-
-    var dAdd = AstFinder.getMethodInClass(unit, "D", "add");
-    var covariantD = getClassCovariantParameters(AstFinder.getClass(unit, "D"));
-    expect(covariantD.toList(), [dAdd.declaredElement.parameters[0]]);
-
-    var covariantE = getClassCovariantParameters(AstFinder.getClass(unit, "E"));
-    expect(covariantE.toList(), []);
-  }
-
-  test_covarianceChecks2() async {
-    var content = r'''
-class View<T1> {
-  View<T1> create() => this;
-}
-
-class Bar<T2> extends View<Bar<T2>> {}
-
-main() {
-  var b = new Bar<int>();
-  b.create();
-}
-''';
-    var source = addSource(content);
-    var unit = (await computeAnalysisResult(source)).unit;
-    assertNoErrors(source);
-
-    var findNode = FindNode(content, unit);
-    expect(getImplicitCast(findNode.methodInvocation('b.create')), isNull);
-  }
-
-  test_covarianceChecks_genericMethods() async {
-    var source = addSource(r'''
-class C<T> {
-  add<S>(T t) {}
-  forEach<S>(S f(T t)) {}
-}
-class D extends C<int> {
-  add<S>(int t) {}
-  forEach<S>(S f(int t)) {}
-}
-class E extends C<int> {
-  add<S>(Object t) {}
-  forEach<S>(S f(Null t)) {}
-}
-''');
-    var unit = (await computeAnalysisResult(source)).unit;
-    assertNoErrors(source);
-
-    var cAdd = AstFinder.getMethodInClass(unit, "C", "add");
-    var covariantC = getClassCovariantParameters(AstFinder.getClass(unit, "C"));
-    expect(covariantC.toList(), [cAdd.declaredElement.parameters[0]]);
-
-    var dAdd = AstFinder.getMethodInClass(unit, "D", "add");
-    var covariantD = getClassCovariantParameters(AstFinder.getClass(unit, "D"));
-    expect(covariantD.toList(), [dAdd.declaredElement.parameters[0]]);
-
-    var covariantE = getClassCovariantParameters(AstFinder.getClass(unit, "E"));
-    expect(covariantE.toList(), []);
-  }
-
-  test_covarianceChecks_returnFunction() async {
-    var source = addSource(r'''
-typedef F<T>(T t);
-typedef T R<T>();
-class C<T> {
-  F<T> f;
-
-  C();
-  factory C.fact() => new C<Null>();
-
-  F<T> get g => null;
-  F<T> m1() => null;
-  R<F<T>> m2() => null;
-
-  casts(C<T> other, T t) {
-    other.f;
-    other.g(t);
-    other.m1();
-    other.m2;
-
-    new C<T>.fact().f(t);
-    new C<int>.fact().g;
-    new C<int>.fact().m1;
-    new C<T>.fact().m2();
-
-    new C<Object>.fact().f(42);
-    new C<Object>.fact().g;
-    new C<Object>.fact().m1;
-    new C<Object>.fact().m2();
-
-    new C.fact().f(42);
-    new C.fact().g;
-    new C.fact().m1;
-    new C.fact().m2();
-  }
-
-  noCasts(T t) {
-    f;
-    g;
-    m1();
-    m2();
-
-    f(t);
-    g(t);
-    (f)(t);
-    (g)(t);
-    m1;
-    m2;
-
-    this.f;
-    this.g;
-    this.m1();
-    this.m2();
-    this.m1;
-    this.m2;
-    (this.m1)();
-    (this.m2)();
-    this.f(t);
-    this.g(t);
-    (this.f)(t);
-    (this.g)(t);
-
-    new C<int>().f;
-    new C<T>().g;
-    new C<int>().m1();
-    new C().m2();
-
-    new D().f;
-    new D().g;
-    new D().m1();
-    new D().m2();
-  }
-}
-class D extends C<num> {
-  noCasts(t) {
-    f;
-    this.g;
-    this.m1();
-    m2;
-
-    super.f;
-    super.g;
-    super.m1;
-    super.m2();
-  }
-}
-
-D d;
-C<Object> c;
-C cD;
-C<Null> cN;
-F<Object> f;
-F<Null> fN;
-R<F<Object>> rf;
-R<F<Null>> rfN;
-R<R<F<Object>>> rrf;
-R<R<F<Null>>> rrfN;
-Object obj;
-F<int> fi;
-R<F<int>> rfi;
-R<R<F<int>>> rrfi;
-
-casts() {
-  c.f;
-  c.g;
-  c.m1;
-  c.m1();
-  c.m2();
-
-  fN = c.f;
-  fN = c.g;
-  rfN = c.m1;
-  rrfN = c.m2;
-  fN = c.m1();
-  rfN = c.m2();
-
-  f = c.f;
-  f = c.g;
-  rf = c.m1;
-  rrf = c.m2;
-  f = c.m1();
-  rf = c.m2();
-  c.m2()();
-
-  c.f(obj);
-  c.g(obj);
-  (c.f)(obj);
-  (c.g)(obj);
-  (c.m1)();
-  c.m1()(obj);
-  (c.m2)();
-
-  cD.f;
-  cD.g;
-  cD.m1;
-  cD.m1();
-  cD.m2();
-}
-
-noCasts() {
-  fi = d.f;
-  fi = d.g;
-  rfi = d.m1;
-  fi = d.m1();
-  rrfi = d.m2;
-  rfi = d.m2();
-  d.f(42);
-  d.g(42);
-  (d.f)(42);
-  (d.g)(42);
-  d.m1()(42);
-  d.m2()()(42);
-
-  cN.f;
-  cN.g;
-  cN.m1;
-  cN.m1();
-  cN.m2();
-}
-''');
-    var unit = (await computeAnalysisResult(source)).unit;
-    assertNoErrors(source);
-
-    void expectCast(Statement statement, bool hasCast) {
-      var value = (statement as ExpressionStatement).expression;
-      if (value is AssignmentExpression) {
-        value = (value as AssignmentExpression).rightHandSide;
-      }
-      while (value is FunctionExpressionInvocation) {
-        value = (value as FunctionExpressionInvocation).function;
-      }
-      while (value is ParenthesizedExpression) {
-        value = (value as ParenthesizedExpression).expression;
-      }
-      var isCallingGetter =
-          value is MethodInvocation && !value.methodName.name.startsWith('m');
-      var cast = isCallingGetter
-          ? getImplicitOperationCast(value)
-          : getImplicitCast(value);
-      var castKind = isCallingGetter ? 'special cast' : 'cast';
-      expect(cast, hasCast ? isNotNull : isNull,
-          reason: '`$statement` should ' +
-              (hasCast ? '' : 'not ') +
-              'have a $castKind on `$value`.');
-    }
-
-    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'noCasts')) {
-      expectCast(s, false);
-    }
-    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'casts')) {
-      expectCast(s, true);
-    }
-    for (var s in AstFinder.getStatementsInMethod(unit, 'D', 'noCasts')) {
-      expectCast(s, false);
-    }
-    for (var s in AstFinder.getStatementsInTopLevelFunction(unit, 'noCasts')) {
-      expectCast(s, false);
-    }
-    for (var s in AstFinder.getStatementsInTopLevelFunction(unit, 'casts')) {
-      expectCast(s, true);
-    }
-  }
-
-  test_covarianceChecks_superclass() async {
-    var source = addSource(r'''
-class C<T> {
-  add(T t) {}
-  forEach(void f(T t)) {}
-}
-class D {
-  add(int t) {}
-  forEach(void f(int t)) {}
-}
-class E extends D implements C<int> {}
-''');
-    var unit = (await computeAnalysisResult(source)).unit;
-    assertNoErrors(source);
-    var cAdd = AstFinder.getMethodInClass(unit, "C", "add");
-    var covariantC = getClassCovariantParameters(AstFinder.getClass(unit, "C"));
-    expect(covariantC.toList(), [cAdd.declaredElement.parameters[0]]);
-
-    var dAdd = AstFinder.getMethodInClass(unit, "D", "add");
-    var covariantD = getClassCovariantParameters(AstFinder.getClass(unit, "D"));
-    expect(covariantD, null);
-
-    var classE = AstFinder.getClass(unit, "E");
-    var covariantE = getClassCovariantParameters(classE);
-    var superCovariantE = getSuperclassCovariantParameters(classE);
-    expect(covariantE.toList(), []);
-    expect(superCovariantE.toList(), [dAdd.declaredElement.parameters[0]]);
-  }
-
-  test_factoryConstructor_propagation() async {
-    String code = r'''
-      class A<T> {
-        factory A() { return new B(); }
-      }
-      class B<S> extends A<S> {}
-   ''';
-    CompilationUnit unit = await resolveSource(code);
-
-    ConstructorDeclaration constructor =
-        AstFinder.getConstructorInClass(unit, "A", null);
-    BlockFunctionBody body = constructor.body;
-    ReturnStatement stmt = body.block.statements[0];
-    InstanceCreationExpression exp = stmt.expression;
-    ClassElement elementB = AstFinder.getClass(unit, "B").declaredElement;
-    ClassElement elementA = AstFinder.getClass(unit, "A").declaredElement;
-    expect(resolutionMap.typeForTypeName(exp.constructorName.type).element,
-        elementB);
-    _isInstantiationOf(_hasElement(elementB))(
-        [_isType(elementA.typeParameters[0].type)])(exp.staticType);
-  }
-
-  test_fieldDeclaration_propagation() async {
-    String code = r'''
-      class A {
-        List<String> f0 = ["hello"];
-      }
-   ''';
-    CompilationUnit unit = await resolveSource(code);
-
-    VariableDeclaration field = AstFinder.getFieldInClass(unit, "A", "f0");
-
-    _isListOf(_isString)(field.initializer.staticType);
-  }
-
-  test_functionDeclaration_body_propagation() async {
-    String code = r'''
-      typedef T Function2<S, T>(S x);
-
-      List<int> test1() => [];
-
-      Function2<int, int> test2 (int x) {
-        Function2<String, int> inner() {
-          return (x) => x.length;
-        }
-        return (x) => x;
-     }
-   ''';
-    CompilationUnit unit = await resolveSource(code);
-
-    Asserter<InterfaceType> assertListOfInt = _isListOf(_isInt);
-
-    FunctionDeclaration test1 = AstFinder.getTopLevelFunction(unit, "test1");
-    ExpressionFunctionBody body = test1.functionExpression.body;
-    assertListOfInt(body.expression.staticType);
-
-    List<Statement> statements =
-        AstFinder.getStatementsInTopLevelFunction(unit, "test2");
-
-    FunctionDeclaration inner =
-        (statements[0] as FunctionDeclarationStatement).functionDeclaration;
-    BlockFunctionBody body0 = inner.functionExpression.body;
-    ReturnStatement return0 = body0.block.statements[0];
-    Expression anon0 = return0.expression;
-    FunctionType type0 = anon0.staticType;
-    expect(type0.returnType, typeProvider.intType);
-    expect(type0.normalParameterTypes[0], typeProvider.stringType);
-
-    FunctionExpression anon1 = (statements[1] as ReturnStatement).expression;
-    FunctionType type1 =
-        resolutionMap.elementDeclaredByFunctionExpression(anon1).type;
-    expect(type1.returnType, typeProvider.intType);
-    expect(type1.normalParameterTypes[0], typeProvider.intType);
-  }
-
-  test_functionLiteral_assignment_typedArguments() async {
-    String code = r'''
-      typedef T Function2<S, T>(S x);
-
-      void main () {
-        Function2<int, String> l0 = (int x) => null;
-        Function2<int, String> l1 = (int x) => "hello";
-        Function2<int, String> l2 = (String x) => "hello";
-        Function2<int, String> l3 = (int x) => 3;
-        Function2<int, String> l4 = (int x) {return 3;};
-     }
-   ''';
-    CompilationUnit unit = await resolveSource(code);
-    List<Statement> statements =
-        AstFinder.getStatementsInTopLevelFunction(unit, "main");
-    DartType literal(int i) {
-      VariableDeclarationStatement stmt = statements[i];
-      VariableDeclaration decl = stmt.variables.variables[0];
-      FunctionExpression exp = decl.initializer;
-      return resolutionMap.elementDeclaredByFunctionExpression(exp).type;
-    }
-
-    _isFunction2Of(_isInt, _isNull)(literal(0));
-    _isFunction2Of(_isInt, _isString)(literal(1));
-    _isFunction2Of(_isString, _isString)(literal(2));
-    _isFunction2Of(_isInt, _isString)(literal(3));
-    _isFunction2Of(_isInt, _isString)(literal(4));
-  }
-
-  test_functionLiteral_assignment_unTypedArguments() async {
-    String code = r'''
-      typedef T Function2<S, T>(S x);
-
-      void main () {
-        Function2<int, String> l0 = (x) => null;
-        Function2<int, String> l1 = (x) => "hello";
-        Function2<int, String> l2 = (x) => "hello";
-        Function2<int, String> l3 = (x) => 3;
-        Function2<int, String> l4 = (x) {return 3;};
-     }
-   ''';
-    CompilationUnit unit = await resolveSource(code);
-    List<Statement> statements =
-        AstFinder.getStatementsInTopLevelFunction(unit, "main");
-    DartType literal(int i) {
-      VariableDeclarationStatement stmt = statements[i];
-      VariableDeclaration decl = stmt.variables.variables[0];
-      FunctionExpression exp = decl.initializer;
-      return resolutionMap.elementDeclaredByFunctionExpression(exp).type;
-    }
-
-    _isFunction2Of(_isInt, _isNull)(literal(0));
-    _isFunction2Of(_isInt, _isString)(literal(1));
-    _isFunction2Of(_isInt, _isString)(literal(2));
-    _isFunction2Of(_isInt, _isString)(literal(3));
-    _isFunction2Of(_isInt, _isString)(literal(4));
-  }
-
-  test_functionLiteral_body_propagation() async {
-    String code = r'''
-      typedef T Function2<S, T>(S x);
-
-      void main () {
-        Function2<int, List<String>> l0 = (int x) => ["hello"];
-        Function2<int, List<String>> l1 = (String x) => ["hello"];
-        Function2<int, List<String>> l2 = (int x) => [3];
-        Function2<int, List<String>> l3 = (int x) {return [3];};
-     }
-   ''';
-    CompilationUnit unit = await resolveSource(code);
-    List<Statement> statements =
-        AstFinder.getStatementsInTopLevelFunction(unit, "main");
-    Expression functionReturnValue(int i) {
-      VariableDeclarationStatement stmt = statements[i];
-      VariableDeclaration decl = stmt.variables.variables[0];
-      FunctionExpression exp = decl.initializer;
-      FunctionBody body = exp.body;
-      if (body is ExpressionFunctionBody) {
-        return body.expression;
-      } else {
-        Statement stmt = (body as BlockFunctionBody).block.statements[0];
-        return (stmt as ReturnStatement).expression;
-      }
-    }
-
-    Asserter<InterfaceType> assertListOfString = _isListOf(_isString);
-    assertListOfString(functionReturnValue(0).staticType);
-    assertListOfString(functionReturnValue(1).staticType);
-    assertListOfString(functionReturnValue(2).staticType);
-    assertListOfString(functionReturnValue(3).staticType);
-  }
-
-  test_functionLiteral_functionExpressionInvocation_typedArguments() async {
-    String code = r'''
-      class Mapper<F, T> {
-        T map(T mapper(F x)) => mapper(null);
-      }
-
-      void main () {
-        (new Mapper<int, String>().map)((int x) => null);
-        (new Mapper<int, String>().map)((int x) => "hello");
-        (new Mapper<int, String>().map)((String x) => "hello");
-        (new Mapper<int, String>().map)((int x) => 3);
-        (new Mapper<int, String>().map)((int x) {return 3;});
-     }
-   ''';
-    CompilationUnit unit = await resolveSource(code);
-    List<Statement> statements =
-        AstFinder.getStatementsInTopLevelFunction(unit, "main");
-    DartType literal(int i) {
-      ExpressionStatement stmt = statements[i];
-      FunctionExpressionInvocation invk = stmt.expression;
-      FunctionExpression exp = invk.argumentList.arguments[0];
-      return resolutionMap.elementDeclaredByFunctionExpression(exp).type;
-    }
-
-    _isFunction2Of(_isInt, _isNull)(literal(0));
-    _isFunction2Of(_isInt, _isString)(literal(1));
-    _isFunction2Of(_isString, _isString)(literal(2));
-    _isFunction2Of(_isInt, _isString)(literal(3));
-    _isFunction2Of(_isInt, _isString)(literal(4));
-  }
-
-  test_functionLiteral_functionExpressionInvocation_unTypedArguments() async {
-    String code = r'''
-      class Mapper<F, T> {
-        T map(T mapper(F x)) => mapper(null);
-      }
-
-      void main () {
-        (new Mapper<int, String>().map)((x) => null);
-        (new Mapper<int, String>().map)((x) => "hello");
-        (new Mapper<int, String>().map)((x) => "hello");
-        (new Mapper<int, String>().map)((x) => 3);
-        (new Mapper<int, String>().map)((x) {return 3;});
-     }
-   ''';
-    CompilationUnit unit = await resolveSource(code);
-    List<Statement> statements =
-        AstFinder.getStatementsInTopLevelFunction(unit, "main");
-    DartType literal(int i) {
-      ExpressionStatement stmt = statements[i];
-      FunctionExpressionInvocation invk = stmt.expression;
-      FunctionExpression exp = invk.argumentList.arguments[0];
-      return resolutionMap.elementDeclaredByFunctionExpression(exp).type;
-    }
-
-    _isFunction2Of(_isInt, _isNull)(literal(0));
-    _isFunction2Of(_isInt, _isString)(literal(1));
-    _isFunction2Of(_isInt, _isString)(literal(2));
-    _isFunction2Of(_isInt, _isString)(literal(3));
-    _isFunction2Of(_isInt, _isString)(literal(4));
-  }
-
-  test_functionLiteral_functionInvocation_typedArguments() async {
-    String code = r'''
-      String map(String mapper(int x)) => mapper(null);
-
-      void main () {
-        map((int x) => null);
-        map((int x) => "hello");
-        map((String x) => "hello");
-        map((int x) => 3);
-        map((int x) {return 3;});
-     }
-   ''';
-    CompilationUnit unit = await resolveSource(code);
-    List<Statement> statements =
-        AstFinder.getStatementsInTopLevelFunction(unit, "main");
-    DartType literal(int i) {
-      ExpressionStatement stmt = statements[i];
-      MethodInvocation invk = stmt.expression;
-      FunctionExpression exp = invk.argumentList.arguments[0];
-      return resolutionMap.elementDeclaredByFunctionExpression(exp).type;
-    }
-
-    _isFunction2Of(_isInt, _isNull)(literal(0));
-    _isFunction2Of(_isInt, _isString)(literal(1));
-    _isFunction2Of(_isString, _isString)(literal(2));
-    _isFunction2Of(_isInt, _isString)(literal(3));
-    _isFunction2Of(_isInt, _isString)(literal(4));
-  }
-
-  test_functionLiteral_functionInvocation_unTypedArguments() async {
-    String code = r'''
-      String map(String mapper(int x)) => mapper(null);
-
-      void main () {
-        map((x) => null);
-        map((x) => "hello");
-        map((x) => "hello");
-        map((x) => 3);
-        map((x) {return 3;});
-     }
-   ''';
-    CompilationUnit unit = await resolveSource(code);
-    List<Statement> statements =
-        AstFinder.getStatementsInTopLevelFunction(unit, "main");
-    DartType literal(int i) {
-      ExpressionStatement stmt = statements[i];
-      MethodInvocation invk = stmt.expression;
-      FunctionExpression exp = invk.argumentList.arguments[0];
-      return resolutionMap.elementDeclaredByFunctionExpression(exp).type;
-    }
-
-    _isFunction2Of(_isInt, _isNull)(literal(0));
-    _isFunction2Of(_isInt, _isString)(literal(1));
-    _isFunction2Of(_isInt, _isString)(literal(2));
-    _isFunction2Of(_isInt, _isString)(literal(3));
-    _isFunction2Of(_isInt, _isString)(literal(4));
-  }
-
-  test_functionLiteral_methodInvocation_typedArguments() async {
-    String code = r'''
-      class Mapper<F, T> {
-        T map(T mapper(F x)) => mapper(null);
-      }
-
-      void main () {
-        new Mapper<int, String>().map((int x) => null);
-        new Mapper<int, String>().map((int x) => "hello");
-        new Mapper<int, String>().map((String x) => "hello");
-        new Mapper<int, String>().map((int x) => 3);
-        new Mapper<int, String>().map((int x) {return 3;});
-     }
-   ''';
-    CompilationUnit unit = await resolveSource(code);
-    List<Statement> statements =
-        AstFinder.getStatementsInTopLevelFunction(unit, "main");
-    DartType literal(int i) {
-      ExpressionStatement stmt = statements[i];
-      MethodInvocation invk = stmt.expression;
-      FunctionExpression exp = invk.argumentList.arguments[0];
-      return resolutionMap.elementDeclaredByFunctionExpression(exp).type;
-    }
-
-    _isFunction2Of(_isInt, _isNull)(literal(0));
-    _isFunction2Of(_isInt, _isString)(literal(1));
-    _isFunction2Of(_isString, _isString)(literal(2));
-    _isFunction2Of(_isInt, _isString)(literal(3));
-    _isFunction2Of(_isInt, _isString)(literal(4));
-  }
-
-  test_functionLiteral_methodInvocation_unTypedArguments() async {
-    String code = r'''
-      class Mapper<F, T> {
-        T map(T mapper(F x)) => mapper(null);
-      }
-
-      void main () {
-        new Mapper<int, String>().map((x) => null);
-        new Mapper<int, String>().map((x) => "hello");
-        new Mapper<int, String>().map((x) => "hello");
-        new Mapper<int, String>().map((x) => 3);
-        new Mapper<int, String>().map((x) {return 3;});
-     }
-   ''';
-    CompilationUnit unit = await resolveSource(code);
-    List<Statement> statements =
-        AstFinder.getStatementsInTopLevelFunction(unit, "main");
-    DartType literal(int i) {
-      ExpressionStatement stmt = statements[i];
-      MethodInvocation invk = stmt.expression;
-      FunctionExpression exp = invk.argumentList.arguments[0];
-      return resolutionMap.elementDeclaredByFunctionExpression(exp).type;
-    }
-
-    _isFunction2Of(_isInt, _isNull)(literal(0));
-    _isFunction2Of(_isInt, _isString)(literal(1));
-    _isFunction2Of(_isInt, _isString)(literal(2));
-    _isFunction2Of(_isInt, _isString)(literal(3));
-    _isFunction2Of(_isInt, _isString)(literal(4));
-  }
-
-  test_functionLiteral_unTypedArgument_propagation() async {
-    String code = r'''
-      typedef T Function2<S, T>(S x);
-
-      void main () {
-        Function2<int, int> l0 = (x) => x;
-        Function2<int, int> l1 = (x) => x+1;
-        Function2<int, String> l2 = (x) => x;
-        Function2<int, String> l3 = (x) => x.toLowerCase();
-        Function2<String, String> l4 = (x) => x.toLowerCase();
-     }
-   ''';
-    CompilationUnit unit = await resolveSource(code);
-    List<Statement> statements =
-        AstFinder.getStatementsInTopLevelFunction(unit, "main");
-    Expression functionReturnValue(int i) {
-      VariableDeclarationStatement stmt = statements[i];
-      VariableDeclaration decl = stmt.variables.variables[0];
-      FunctionExpression exp = decl.initializer;
-      FunctionBody body = exp.body;
-      if (body is ExpressionFunctionBody) {
-        return body.expression;
-      } else {
-        Statement stmt = (body as BlockFunctionBody).block.statements[0];
-        return (stmt as ReturnStatement).expression;
-      }
-    }
-
-    expect(functionReturnValue(0).staticType, typeProvider.intType);
-    expect(functionReturnValue(1).staticType, typeProvider.intType);
-    expect(functionReturnValue(2).staticType, typeProvider.intType);
-    expect(functionReturnValue(3).staticType, typeProvider.dynamicType);
-    expect(functionReturnValue(4).staticType, typeProvider.stringType);
-  }
-
-  test_futureOr_assignFromFuture() async {
-    // Test a Future<T> can be assigned to FutureOr<T>.
-    MethodInvocation invoke = await _testFutureOr(r'''
-    FutureOr<T> mk<T>(Future<T> x) => x;
-    test() => mk(new Future<int>.value(42));
-    ''');
-    _isFutureOrOfInt(invoke.staticType);
-  }
-
-  test_futureOr_assignFromValue() async {
-    // Test a T can be assigned to FutureOr<T>.
-    MethodInvocation invoke = await _testFutureOr(r'''
-    FutureOr<T> mk<T>(T x) => x;
-    test() => mk(42);
-    ''');
-    _isFutureOrOfInt(invoke.staticType);
-  }
-
-  test_futureOr_asyncExpressionBody() async {
-    // A FutureOr<T> can be used as the expression body for an async function
-    MethodInvocation invoke = await _testFutureOr(r'''
-    Future<T> mk<T>(FutureOr<T> x) async => x;
-    test() => mk(42);
-    ''');
-    _isFutureOfInt(invoke.staticType);
-  }
-
-  test_futureOr_asyncReturn() async {
-    // A FutureOr<T> can be used as the return value for an async function
-    MethodInvocation invoke = await _testFutureOr(r'''
-    Future<T> mk<T>(FutureOr<T> x) async { return x; }
-    test() => mk(42);
-    ''');
-    _isFutureOfInt(invoke.staticType);
-  }
-
-  test_futureOr_await() async {
-    // Test a FutureOr<T> can be awaited.
-    MethodInvocation invoke = await _testFutureOr(r'''
-    Future<T> mk<T>(FutureOr<T> x) async => await x;
-    test() => mk(42);
-    ''');
-    _isFutureOfInt(invoke.staticType);
-  }
-
-  test_futureOr_downwards1() async {
-    // Test that downwards inference interacts correctly with FutureOr
-    // parameters.
-    MethodInvocation invoke = await _testFutureOr(r'''
-    Future<T> mk<T>(FutureOr<T> x) => null;
-    Future<int> test() => mk(new Future<int>.value(42));
-    ''');
-    _isFutureOfInt(invoke.staticType);
-  }
-
-  test_futureOr_downwards2() async {
-    // Test that downwards inference interacts correctly with FutureOr
-    // parameters when the downwards context is FutureOr
-    MethodInvocation invoke = await _testFutureOr(r'''
-    Future<T> mk<T>(FutureOr<T> x) => null;
-    FutureOr<int> test() => mk(new Future<int>.value(42));
-    ''');
-    _isFutureOfInt(invoke.staticType);
-  }
-
-  test_futureOr_downwards3() async {
-    // Test that downwards inference correctly propogates into
-    // arguments.
-    MethodInvocation invoke = await _testFutureOr(r'''
-    Future<T> mk<T>(FutureOr<T> x) => null;
-    Future<int> test() => mk(new Future.value(42));
-    ''');
-    _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
-    MethodInvocation invoke = await _testFutureOr(r'''
-    Future<T> mk<T>(FutureOr<T> x) => null;
-    FutureOr<int> test() => mk(new Future.value(42));
-    ''');
-    _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
-    MethodInvocation invoke = await _testFutureOr(r'''
-    Future<T> mk<T>(FutureOr<T> x) => null;
-    FutureOr<num> test() => mk(new Future.value(42));
-    ''');
-    _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.
-    MethodInvocation invoke = await _testFutureOr(r'''
-    T mk<T>(T x) => null;
-    FutureOr<int> test() => mk(new Future.value(42));
-    ''');
-    _isFutureOrOfInt(invoke.staticType);
-    _isFutureOfInt(invoke.argumentList.arguments[0].staticType);
-  }
-
-  test_futureOr_downwards7() async {
-    // Test that downwards inference incorporates bounds correctly
-    // when instantiating type variables.
-    MethodInvocation invoke = await _testFutureOr(r'''
-      T mk<T extends Future<int>>(T x) => null;
-      FutureOr<int> test() => mk(new Future.value(42));
-    ''');
-    _isFutureOfInt(invoke.staticType);
-    _isFutureOfInt(invoke.argumentList.arguments[0].staticType);
-  }
-
-  test_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.
-    MethodInvocation invoke = await _testFutureOr(r'''
-    T mk<T extends Future<Object>>(T x) => null;
-    FutureOr<int> test() => mk(new Future.value(42));
-    ''');
-    _isFutureOfInt(invoke.staticType);
-    _isFutureOfInt(invoke.argumentList.arguments[0].staticType);
-  }
-
-  test_futureOr_downwards9() async {
-    // Test that downwards inference decomposes correctly with
-    // other composite types
-    MethodInvocation invoke = await _testFutureOr(r'''
-    List<T> mk<T>(T x) => null;
-    FutureOr<List<int>> test() => mk(3);
-    ''');
-    _isListOf(_isInt)(invoke.staticType);
-    _isInt(invoke.argumentList.arguments[0].staticType);
-  }
-
-  test_futureOr_methods1() async {
-    // Test that FutureOr has the Object methods
-    MethodInvocation invoke = await _testFutureOr(r'''
-    dynamic test(FutureOr<int> x) => x.toString();
-    ''');
-    _isString(invoke.staticType);
-  }
-
-  test_futureOr_methods2() async {
-    // Test that FutureOr does not have the constituent type methods
-    MethodInvocation invoke = await _testFutureOr(r'''
-    dynamic test(FutureOr<int> x) => x.abs();
-    ''', errors: [StaticTypeWarningCode.UNDEFINED_METHOD]);
-    _isDynamic(invoke.staticType);
-  }
-
-  test_futureOr_methods3() async {
-    // Test that FutureOr does not have the Future type methods
-    MethodInvocation invoke = await _testFutureOr(r'''
-    dynamic test(FutureOr<int> x) => x.then((x) => x);
-    ''', errors: [StaticTypeWarningCode.UNDEFINED_METHOD]);
-    _isDynamic(invoke.staticType);
-  }
-
-  test_futureOr_methods4() async {
-    // Test that FutureOr<dynamic> does not have all methods
-    MethodInvocation invoke = await _testFutureOr(r'''
-    dynamic test(FutureOr<dynamic> x) => x.abs();
-    ''', errors: [StaticTypeWarningCode.UNDEFINED_METHOD]);
-    _isDynamic(invoke.staticType);
-  }
-
-  test_futureOr_no_return() async {
-    MethodInvocation invoke = await _testFutureOr(r'''
-    FutureOr<T> mk<T>(Future<T> x) => x;
-    Future<int> f;
-    test() => f.then((int x) {});
-    ''');
-    _isFunction2Of(_isInt, _isNull)(
-        invoke.argumentList.arguments[0].staticType);
-    _isFutureOfNull(invoke.staticType);
-  }
-
-  test_futureOr_no_return_value() async {
-    MethodInvocation invoke = await _testFutureOr(r'''
-    FutureOr<T> mk<T>(Future<T> x) => x;
-    Future<int> f;
-    test() => f.then((int x) {return;});
-    ''');
-    _isFunction2Of(_isInt, _isNull)(
-        invoke.argumentList.arguments[0].staticType);
-    _isFutureOfNull(invoke.staticType);
-  }
-
-  test_futureOr_return_null() async {
-    MethodInvocation invoke = await _testFutureOr(r'''
-    FutureOr<T> mk<T>(Future<T> x) => x;
-    Future<int> f;
-    test() => f.then((int x) {return null;});
-    ''');
-    _isFunction2Of(_isInt, _isNull)(
-        invoke.argumentList.arguments[0].staticType);
-    _isFutureOfNull(invoke.staticType);
-  }
-
-  test_futureOr_upwards1() async {
-    // Test that upwards inference correctly prefers to instantiate type
-    // variables with the "smaller" solution when both are possible.
-    MethodInvocation invoke = await _testFutureOr(r'''
-    Future<T> mk<T>(FutureOr<T> x) => null;
-    dynamic test() => mk(new Future<int>.value(42));
-    ''');
-    _isFutureOfInt(invoke.staticType);
-  }
-
-  test_futureOr_upwards2() async {
-    // Test that upwards inference fails when the solution doesn't
-    // match the bound.
-    MethodInvocation invoke = await _testFutureOr(r'''
-    Future<T> mk<T extends Future<Object>>(FutureOr<T> x) => null;
-    dynamic test() => mk(new Future<int>.value(42));
-    ''', errors: [StrongModeCode.COULD_NOT_INFER]);
-    _isFutureOfInt(invoke.staticType);
-  }
-
-  test_futureOrNull_no_return() async {
-    MethodInvocation invoke = await _testFutureOr(r'''
-    FutureOr<T> mk<T>(Future<T> x) => x;
-    Future<int> f;
-    test() => f.then<Null>((int x) {});
-    ''');
-    _isFunction2Of(_isInt, _isNull)(
-        invoke.argumentList.arguments[0].staticType);
-    _isFutureOfNull(invoke.staticType);
-  }
-
-  test_futureOrNull_no_return_value() async {
-    MethodInvocation invoke = await _testFutureOr(r'''
-    FutureOr<T> mk<T>(Future<T> x) => x;
-    Future<int> f;
-    test() => f.then<Null>((int x) {return;});
-    ''');
-    _isFunction2Of(_isInt, _isNull)(
-        invoke.argumentList.arguments[0].staticType);
-    _isFutureOfNull(invoke.staticType);
-  }
-
-  test_futureOrNull_return_null() async {
-    MethodInvocation invoke = await _testFutureOr(r'''
-    FutureOr<T> mk<T>(Future<T> x) => x;
-    Future<int> f;
-    test() => f.then<Null>((int x) { return null;});
-    ''');
-    _isFunction2Of(_isInt, _isNull)(
-        invoke.argumentList.arguments[0].staticType);
-    _isFutureOfNull(invoke.staticType);
-  }
-
-  test_generic_partial() async {
-    // Test that upward and downward type inference handles partial
-    // type schemas correctly.  Downwards inference in a partial context
-    // (e.g. Map<String, ?>) should still allow upwards inference to fill
-    // in the missing information.
-    String code = r'''
-class A<T> {
-  A(T x);
-  A.fromA(A<T> a) {}
-  A.fromMap(Map<String, T> m) {}
-  A.fromList(List<T> m) {}
-  A.fromT(T t) {}
-  A.fromB(B<T, String> a) {}
-}
-
-class B<S, T> {
-  B(S s);
-}
-
-void test() {
-    var a0 = new A.fromA(new A(3));
-    var a1 = new A.fromMap({'hello' : 3});
-    var a2 = new A.fromList([3]);
-    var a3 = new A.fromT(3);
-    var a4 = new A.fromB(new B(3));
-}
-   ''';
-    CompilationUnit unit = await resolveSource(code);
-    Element elementA = AstFinder.getClass(unit, "A").declaredElement;
-    List<Statement> statements =
-        AstFinder.getStatementsInTopLevelFunction(unit, "test");
-    void check(int i) {
-      VariableDeclarationStatement stmt = statements[i];
-      VariableDeclaration decl = stmt.variables.variables[0];
-      Expression init = decl.initializer;
-      _isInstantiationOf(_hasElement(elementA))([_isInt])(init.staticType);
-    }
-
-    for (var i = 0; i < 5; i++) check(i);
-  }
-
-  test_inferConstructor_unknownTypeLowerBound() async {
-    Source source = addSource(r'''
-        class C<T> {
-          C(void callback(List<T> a));
-        }
-        test() {
-          // downwards inference pushes List<?> and in parameter position this
-          // becomes inferred as List<Null>.
-          var c = new C((items) {});
-        }
-        ''');
-    CompilationUnit unit = (await computeAnalysisResult(source)).unit;
-    assertNoErrors(source);
-    verify([source]);
-    DartType cType = findLocalVariable(unit, 'c').type;
-    Element elementC = AstFinder.getClass(unit, "C").declaredElement;
-
-    _isInstantiationOf(_hasElement(elementC))([_isDynamic])(cType);
-  }
-
-  test_inference_error_arguments() async {
-    Source source = addSource(r'''
-typedef R F<T, R>(T t);
-
-F<T, T> g<T>(F<T, T> f) => (x) => f(f(x));
-
-test() {
-  var h = g((int x) => 42.0);
-}
- ''');
-    await computeAnalysisResult(source);
-    _expectInferenceError(source, [
-      StrongModeCode.COULD_NOT_INFER,
-      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
-    ], r'''
-Couldn't infer type parameter 'T'.
-
-Tried to infer 'double' for 'T' which doesn't work:
-  Parameter 'f' declared as     '(T) → T'
-                but argument is '(int) → double'.
-
-Consider passing explicit type argument(s) to the generic.
-
-''');
-  }
-
-  test_inference_error_arguments2() async {
-    Source source = addSource(r'''
-typedef R F<T, R>(T t);
-
-F<T, T> g<T>(F<T, T> a, F<T, T> b) => (x) => a(b(x));
-
-test() {
-  var h = g((int x) => 42.0, (double x) => 42);
-}
- ''');
-    await computeAnalysisResult(source);
-    _expectInferenceError(source, [
-      StrongModeCode.COULD_NOT_INFER,
-      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE,
-      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
-    ], r'''
-Couldn't infer type parameter 'T'.
-
-Tried to infer 'num' for 'T' which doesn't work:
-  Parameter 'a' declared as     '(T) → T'
-                but argument is '(int) → double'.
-  Parameter 'b' declared as     '(T) → T'
-                but argument is '(double) → int'.
-
-Consider passing explicit type argument(s) to the generic.
-
-''');
-  }
-
-  test_inference_error_extendsFromReturn() async {
-    // This is not an inference error because we successfully infer Null.
-    Source source = addSource(r'''
-T max<T extends num>(T x, T y) => x;
-
-test() {
-  String hello = max(1, 2);
-}
- ''');
-    var analysisResult = await computeAnalysisResult(source);
-    assertErrors(source, [
-      StrongModeCode.INVALID_CAST_LITERAL,
-      StrongModeCode.INVALID_CAST_LITERAL
-    ]);
-    var unit = analysisResult.unit;
-    var h = (AstFinder.getStatementsInTopLevelFunction(unit, "test")[0]
-            as VariableDeclarationStatement)
-        .variables
-        .variables[0];
-    var call = h.initializer as MethodInvocation;
-    expect(call.staticInvokeType.toString(), '(Null, Null) → Null');
-  }
-
-  test_inference_error_extendsFromReturn2() async {
-    Source source = addSource(r'''
-typedef R F<T, R>(T t);
-F<T, T> g<T extends num>() => (y) => y;
-
-test() {
-  F<String, String> hello = g();
-}
- ''');
-    await computeAnalysisResult(source);
-    _expectInferenceError(source, [
-      StrongModeCode.COULD_NOT_INFER,
-    ], r'''
-Couldn't infer type parameter 'T'.
-
-Tried to infer 'String' for 'T' which doesn't work:
-  Type parameter 'T' declared to extend 'num'.
-The type 'String' was inferred from:
-  Return type declared as '(T) → T'
-              used where  '(String) → String' is required.
-
-Consider passing explicit type argument(s) to the generic.
-
-''');
-  }
-
-  test_inference_error_genericFunction() async {
-    Source source = addSource(r'''
-T max<T extends num>(T x, T y) => x < y ? y : x;
-abstract class Iterable<T> {
-  T get first;
-  S fold<S>(S s, S f(S s, T t));
-}
-test(Iterable values) {
-  num n = values.fold(values.first as num, max);
-}
- ''');
-    await computeAnalysisResult(source);
-    _expectInferenceError(source, [
-      StrongModeCode.COULD_NOT_INFER,
-      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
-    ], r'''
-Couldn't infer type parameter 'T'.
-
-Tried to infer 'dynamic' for 'T' which doesn't work:
-  Function type declared as '<T extends num>(T, T) → T'
-                used where  '(num, dynamic) → num' is required.
-
-Consider passing explicit type argument(s) to the generic.
-
-''');
-  }
-
-  test_inference_error_returnContext() async {
-    Source source = addSource(r'''
-typedef R F<T, R>(T t);
-
-F<T, T> g<T>(T t) => (x) => t;
-
-test() {
-  F<num, int> h = g(42);
-}
- ''');
-    await computeAnalysisResult(source);
-    _expectInferenceError(source, [StrongModeCode.COULD_NOT_INFER], r'''
-Couldn't infer type parameter 'T'.
-
-Tried to infer 'num' for 'T' which doesn't work:
-  Return type declared as '(T) → T'
-              used where  '(num) → int' is required.
-
-Consider passing explicit type argument(s) to the generic.
-
-''');
-  }
-
-  test_inference_hints() async {
-    Source source = addSource(r'''
-      void main () {
-        var x = 3;
-        List<int> l0 = [];
-     }
-   ''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_inference_simplePolymorphicRecursion_function() async {
-    // Regression test for https://github.com/dart-lang/sdk/issues/30980
-    // Check that inference works properly when inferring the type argument
-    // for a self-recursive call with a function type
-    var source = addSource(r'''
-void _mergeSort<T>(T Function(T) list, int compare(T a, T b), T Function(T) target) {
-  _mergeSort(list, compare, target);
-  _mergeSort(list, compare, list);
-  _mergeSort(target, compare, target);
-  _mergeSort(target, compare, list);
-}
-    ''');
-    var analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    var unit = analysisResult.unit;
-    var body = (AstFinder.getTopLevelFunction(unit, '_mergeSort')
-        .functionExpression
-        .body as BlockFunctionBody);
-    var stmts = body.block.statements;
-    for (ExpressionStatement stmt in stmts) {
-      MethodInvocation invoke = stmt.expression;
-      ParameterizedType fType = invoke.staticInvokeType;
-      expect(fType.typeArguments[0].toString(), 'T');
-    }
-  }
-
-  test_inference_simplePolymorphicRecursion_interface() async {
-    // Regression test for https://github.com/dart-lang/sdk/issues/30980
-    // Check that inference works properly when inferring the type argument
-    // for a self-recursive call with an interface type
-    var source = addSource(r'''
-void _mergeSort<T>(List<T> list, int compare(T a, T b), List<T> target) {
-  _mergeSort(list, compare, target);
-  _mergeSort(list, compare, list);
-  _mergeSort(target, compare, target);
-  _mergeSort(target, compare, list);
-}
-    ''');
-    var analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    var unit = analysisResult.unit;
-    var body = (AstFinder.getTopLevelFunction(unit, '_mergeSort')
-        .functionExpression
-        .body as BlockFunctionBody);
-    var stmts = body.block.statements;
-    for (ExpressionStatement stmt in stmts) {
-      MethodInvocation invoke = stmt.expression;
-      ParameterizedType fType = invoke.staticInvokeType;
-      expect(fType.typeArguments[0].toString(), 'T');
-    }
-  }
-
-  test_inference_simplePolymorphicRecursion_simple() async {
-    // Regression test for https://github.com/dart-lang/sdk/issues/30980
-    // Check that inference works properly when inferring the type argument
-    // for a self-recursive call with a simple type parameter
-    var source = addSource(r'''
-void _mergeSort<T>(T list, int compare(T a, T b), T target) {
-  _mergeSort(list, compare, target);
-  _mergeSort(list, compare, list);
-  _mergeSort(target, compare, target);
-  _mergeSort(target, compare, list);
-}
-    ''');
-    var analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    var unit = analysisResult.unit;
-    var body = (AstFinder.getTopLevelFunction(unit, '_mergeSort')
-        .functionExpression
-        .body as BlockFunctionBody);
-    var stmts = body.block.statements;
-    for (ExpressionStatement stmt in stmts) {
-      MethodInvocation invoke = stmt.expression;
-      ParameterizedType fType = invoke.staticInvokeType;
-      expect(fType.typeArguments[0].toString(), 'T');
-    }
-  }
-
-  test_inferGenericInstantiation() async {
-    // Verify that we don't infer '?` when we instantiate a generic function.
-    var source = addSource(r'''
-T f<T>(T x(T t)) => x(null);
-S g<S>(S s) => s;
-test() {
- var h = f(g);
-}
-    ''');
-    var analysisResult = await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-    var unit = analysisResult.unit;
-    var h = (AstFinder.getStatementsInTopLevelFunction(unit, "test")[0]
-            as VariableDeclarationStatement)
-        .variables
-        .variables[0];
-    _isDynamic(h.declaredElement.type);
-    var fCall = h.initializer as MethodInvocation;
-    expect(
-        fCall.staticInvokeType.toString(), '((dynamic) → dynamic) → dynamic');
-    var g = fCall.argumentList.arguments[0];
-    expect(g.staticType.toString(), '(dynamic) → dynamic');
-  }
-
-  test_inferGenericInstantiation2() async {
-    // Verify the behavior when we cannot infer an instantiation due to invalid
-    // constraints from an outer generic method.
-    var source = addSource(r'''
-T max<T extends num>(T x, T y) => x < y ? y : x;
-abstract class Iterable<T> {
-  T get first;
-  S fold<S>(S s, S f(S s, T t));
-}
-num test(Iterable values) => values.fold(values.first as num, max);
-    ''');
-    var analysisResult = await computeAnalysisResult(source);
-    assertErrors(source, [
-      StrongModeCode.COULD_NOT_INFER,
-      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
-    ]);
-    verify([source]);
-    var unit = analysisResult.unit;
-    var fold = (AstFinder.getTopLevelFunction(unit, 'test')
-            .functionExpression
-            .body as ExpressionFunctionBody)
-        .expression as MethodInvocation;
-    expect(
-        fold.staticInvokeType.toString(), '(num, (num, dynamic) → num) → num');
-    var max = fold.argumentList.arguments[1];
-    // TODO(jmesserly): arguably (num, num) → num is better here.
-    expect(max.staticType.toString(), '(dynamic, dynamic) → dynamic');
-  }
-
-  test_inferredFieldDeclaration_propagation() async {
-    // Regression test for https://github.com/dart-lang/sdk/issues/25546
-    String code = r'''
-      abstract class A {
-        Map<int, List<int>> get map;
-      }
-      class B extends A {
-        var map = { 42: [] };
-      }
-      class C extends A {
-        get map => { 43: [] };
-      }
-   ''';
-    CompilationUnit unit = await resolveSource(code);
-
-    Asserter<InterfaceType> assertListOfInt = _isListOf(_isInt);
-    Asserter<InterfaceType> assertMapOfIntToListOfInt =
-        _isMapOf(_isInt, (DartType type) => assertListOfInt(type));
-
-    VariableDeclaration mapB = AstFinder.getFieldInClass(unit, "B", "map");
-    MethodDeclaration mapC = AstFinder.getMethodInClass(unit, "C", "map");
-    assertMapOfIntToListOfInt(
-        resolutionMap.elementDeclaredByVariableDeclaration(mapB).type);
-    assertMapOfIntToListOfInt(
-        resolutionMap.elementDeclaredByMethodDeclaration(mapC).returnType);
-
-    MapLiteral mapLiteralB = mapB.initializer;
-    MapLiteral mapLiteralC = (mapC.body as ExpressionFunctionBody).expression;
-    assertMapOfIntToListOfInt(mapLiteralB.staticType);
-    assertMapOfIntToListOfInt(mapLiteralC.staticType);
-
-    ListLiteral listLiteralB = mapLiteralB.entries[0].value;
-    ListLiteral listLiteralC = mapLiteralC.entries[0].value;
-    assertListOfInt(listLiteralB.staticType);
-    assertListOfInt(listLiteralC.staticType);
-  }
-
-  test_instanceCreation() async {
-    String code = r'''
-      class A<S, T> {
-        S x;
-        T y;
-        A(this.x, this.y);
-        A.named(this.x, this.y);
-      }
-
-      class B<S, T> extends A<T, S> {
-        B(S y, T x) : super(x, y);
-        B.named(S y, T x) : super.named(x, y);
-      }
-
-      class C<S> extends B<S, S> {
-        C(S a) : super(a, a);
-        C.named(S a) : super.named(a, a);
-      }
-
-      class D<S, T> extends B<T, int> {
-        D(T a) : super(a, 3);
-        D.named(T a) : super.named(a, 3);
-      }
-
-      class E<S, T> extends A<C<S>, T> {
-        E(T a) : super(null, a);
-      }
-
-      class F<S, T> extends A<S, T> {
-        F(S x, T y, {List<S> a, List<T> b}) : super(x, y);
-        F.named(S x, T y, [S a, T b]) : super(a, b);
-      }
-
-      void test0() {
-        A<int, String> a0 = new A(3, "hello");
-        A<int, String> a1 = new A.named(3, "hello");
-        A<int, String> a2 = new A<int, String>(3, "hello");
-        A<int, String> a3 = new A<int, String>.named(3, "hello");
-        A<int, String> a4 = new A<int, dynamic>(3, "hello");
-        A<int, String> a5 = new A<dynamic, dynamic>.named(3, "hello");
-      }
-      void test1()  {
-        A<int, String> a0 = new A("hello", 3);
-        A<int, String> a1 = new A.named("hello", 3);
-      }
-      void test2() {
-        A<int, String> a0 = new B("hello", 3);
-        A<int, String> a1 = new B.named("hello", 3);
-        A<int, String> a2 = new B<String, int>("hello", 3);
-        A<int, String> a3 = new B<String, int>.named("hello", 3);
-        A<int, String> a4 = new B<String, dynamic>("hello", 3);
-        A<int, String> a5 = new B<dynamic, dynamic>.named("hello", 3);
-      }
-      void test3() {
-        A<int, String> a0 = new B(3, "hello");
-        A<int, String> a1 = new B.named(3, "hello");
-      }
-      void test4() {
-        A<int, int> a0 = new C(3);
-        A<int, int> a1 = new C.named(3);
-        A<int, int> a2 = new C<int>(3);
-        A<int, int> a3 = new C<int>.named(3);
-        A<int, int> a4 = new C<dynamic>(3);
-        A<int, int> a5 = new C<dynamic>.named(3);
-      }
-      void test5() {
-        A<int, int> a0 = new C("hello");
-        A<int, int> a1 = new C.named("hello");
-      }
-      void test6()  {
-        A<int, String> a0 = new D("hello");
-        A<int, String> a1 = new D.named("hello");
-        A<int, String> a2 = new D<int, String>("hello");
-        A<int, String> a3 = new D<String, String>.named("hello");
-        A<int, String> a4 = new D<num, dynamic>("hello");
-        A<int, String> a5 = new D<dynamic, dynamic>.named("hello");
-      }
-      void test7() {
-        A<int, String> a0 = new D(3);
-        A<int, String> a1 = new D.named(3);
-      }
-      void test8() {
-        A<C<int>, String> a0 = new E("hello");
-      }
-      void test9() { // Check named and optional arguments
-        A<int, String> a0 = new F(3, "hello", a: [3], b: ["hello"]);
-        A<int, String> a1 = new F(3, "hello", a: ["hello"], b:[3]);
-        A<int, String> a2 = new F.named(3, "hello", 3, "hello");
-        A<int, String> a3 = new F.named(3, "hello");
-        A<int, String> a4 = new F.named(3, "hello", "hello", 3);
-        A<int, String> a5 = new F.named(3, "hello", "hello");
-      }''';
-    CompilationUnit unit = await resolveSource(code);
-
-    Expression rhs(VariableDeclarationStatement stmt) {
-      VariableDeclaration decl = stmt.variables.variables[0];
-      Expression exp = decl.initializer;
-      return exp;
-    }
-
-    void hasType(Asserter<DartType> assertion, Expression exp) =>
-        assertion(exp.staticType);
-
-    Element elementA = AstFinder.getClass(unit, "A").declaredElement;
-    Element elementB = AstFinder.getClass(unit, "B").declaredElement;
-    Element elementC = AstFinder.getClass(unit, "C").declaredElement;
-    Element elementD = AstFinder.getClass(unit, "D").declaredElement;
-    Element elementE = AstFinder.getClass(unit, "E").declaredElement;
-    Element elementF = AstFinder.getClass(unit, "F").declaredElement;
-
-    AsserterBuilder<List<Asserter<DartType>>, DartType> assertAOf =
-        _isInstantiationOf(_hasElement(elementA));
-    AsserterBuilder<List<Asserter<DartType>>, DartType> assertBOf =
-        _isInstantiationOf(_hasElement(elementB));
-    AsserterBuilder<List<Asserter<DartType>>, DartType> assertCOf =
-        _isInstantiationOf(_hasElement(elementC));
-    AsserterBuilder<List<Asserter<DartType>>, DartType> assertDOf =
-        _isInstantiationOf(_hasElement(elementD));
-    AsserterBuilder<List<Asserter<DartType>>, DartType> assertEOf =
-        _isInstantiationOf(_hasElement(elementE));
-    AsserterBuilder<List<Asserter<DartType>>, DartType> assertFOf =
-        _isInstantiationOf(_hasElement(elementF));
-
-    {
-      List<Statement> statements =
-          AstFinder.getStatementsInTopLevelFunction(unit, "test0");
-
-      hasType(assertAOf([_isInt, _isString]), rhs(statements[0]));
-      hasType(assertAOf([_isInt, _isString]), rhs(statements[0]));
-      hasType(assertAOf([_isInt, _isString]), rhs(statements[1]));
-      hasType(assertAOf([_isInt, _isString]), rhs(statements[2]));
-      hasType(assertAOf([_isInt, _isString]), rhs(statements[3]));
-      hasType(assertAOf([_isInt, _isDynamic]), rhs(statements[4]));
-      hasType(assertAOf([_isDynamic, _isDynamic]), rhs(statements[5]));
-    }
-
-    {
-      List<Statement> statements =
-          AstFinder.getStatementsInTopLevelFunction(unit, "test1");
-      hasType(assertAOf([_isInt, _isString]), rhs(statements[0]));
-      hasType(assertAOf([_isInt, _isString]), rhs(statements[1]));
-    }
-
-    {
-      List<Statement> statements =
-          AstFinder.getStatementsInTopLevelFunction(unit, "test2");
-      hasType(assertBOf([_isString, _isInt]), rhs(statements[0]));
-      hasType(assertBOf([_isString, _isInt]), rhs(statements[1]));
-      hasType(assertBOf([_isString, _isInt]), rhs(statements[2]));
-      hasType(assertBOf([_isString, _isInt]), rhs(statements[3]));
-      hasType(assertBOf([_isString, _isDynamic]), rhs(statements[4]));
-      hasType(assertBOf([_isDynamic, _isDynamic]), rhs(statements[5]));
-    }
-
-    {
-      List<Statement> statements =
-          AstFinder.getStatementsInTopLevelFunction(unit, "test3");
-      hasType(assertBOf([_isString, _isInt]), rhs(statements[0]));
-      hasType(assertBOf([_isString, _isInt]), rhs(statements[1]));
-    }
-
-    {
-      List<Statement> statements =
-          AstFinder.getStatementsInTopLevelFunction(unit, "test4");
-      hasType(assertCOf([_isInt]), rhs(statements[0]));
-      hasType(assertCOf([_isInt]), rhs(statements[1]));
-      hasType(assertCOf([_isInt]), rhs(statements[2]));
-      hasType(assertCOf([_isInt]), rhs(statements[3]));
-      hasType(assertCOf([_isDynamic]), rhs(statements[4]));
-      hasType(assertCOf([_isDynamic]), rhs(statements[5]));
-    }
-
-    {
-      List<Statement> statements =
-          AstFinder.getStatementsInTopLevelFunction(unit, "test5");
-      hasType(assertCOf([_isInt]), rhs(statements[0]));
-      hasType(assertCOf([_isInt]), rhs(statements[1]));
-    }
-
-    {
-      // The first type parameter is not constrained by the
-      // context.  We could choose a tighter type, but currently
-      // we just use dynamic.
-      List<Statement> statements =
-          AstFinder.getStatementsInTopLevelFunction(unit, "test6");
-      hasType(assertDOf([_isDynamic, _isString]), rhs(statements[0]));
-      hasType(assertDOf([_isDynamic, _isString]), rhs(statements[1]));
-      hasType(assertDOf([_isInt, _isString]), rhs(statements[2]));
-      hasType(assertDOf([_isString, _isString]), rhs(statements[3]));
-      hasType(assertDOf([_isNum, _isDynamic]), rhs(statements[4]));
-      hasType(assertDOf([_isDynamic, _isDynamic]), rhs(statements[5]));
-    }
-
-    {
-      List<Statement> statements =
-          AstFinder.getStatementsInTopLevelFunction(unit, "test7");
-      hasType(assertDOf([_isDynamic, _isString]), rhs(statements[0]));
-      hasType(assertDOf([_isDynamic, _isString]), rhs(statements[1]));
-    }
-
-    {
-      List<Statement> statements =
-          AstFinder.getStatementsInTopLevelFunction(unit, "test8");
-      hasType(assertEOf([_isInt, _isString]), rhs(statements[0]));
-    }
-
-    {
-      List<Statement> statements =
-          AstFinder.getStatementsInTopLevelFunction(unit, "test9");
-      hasType(assertFOf([_isInt, _isString]), rhs(statements[0]));
-      hasType(assertFOf([_isInt, _isString]), rhs(statements[1]));
-      hasType(assertFOf([_isInt, _isString]), rhs(statements[2]));
-      hasType(assertFOf([_isInt, _isString]), rhs(statements[3]));
-      hasType(assertFOf([_isInt, _isString]), rhs(statements[4]));
-      hasType(assertFOf([_isInt, _isString]), rhs(statements[5]));
-    }
-  }
-
-  test_listLiteral_nested() async {
-    String code = r'''
-      void main () {
-        List<List<int>> l0 = [[]];
-        Iterable<List<int>> l1 = [[3]];
-        Iterable<List<int>> l2 = [[3], [4]];
-        List<List<int>> l3 = [["hello", 3], []];
-     }
-   ''';
-    CompilationUnit unit = await resolveSource(code);
-    List<Statement> statements =
-        AstFinder.getStatementsInTopLevelFunction(unit, "main");
-    ListLiteral literal(int i) {
-      VariableDeclarationStatement stmt = statements[i];
-      VariableDeclaration decl = stmt.variables.variables[0];
-      ListLiteral exp = decl.initializer;
-      return exp;
-    }
-
-    Asserter<InterfaceType> assertListOfInt = _isListOf(_isInt);
-    Asserter<InterfaceType> assertListOfListOfInt =
-        _isListOf((DartType type) => assertListOfInt(type));
-
-    assertListOfListOfInt(literal(0).staticType);
-    assertListOfListOfInt(literal(1).staticType);
-    assertListOfListOfInt(literal(2).staticType);
-    assertListOfListOfInt(literal(3).staticType);
-
-    assertListOfInt(literal(1).elements[0].staticType);
-    assertListOfInt(literal(2).elements[0].staticType);
-    assertListOfInt(literal(3).elements[0].staticType);
-  }
-
-  test_listLiteral_simple() async {
-    String code = r'''
-      void main () {
-        List<int> l0 = [];
-        List<int> l1 = [3];
-        List<int> l2 = ["hello"];
-        List<int> l3 = ["hello", 3];
-     }
-   ''';
-    CompilationUnit unit = await resolveSource(code);
-    List<Statement> statements =
-        AstFinder.getStatementsInTopLevelFunction(unit, "main");
-    DartType literal(int i) {
-      VariableDeclarationStatement stmt = statements[i];
-      VariableDeclaration decl = stmt.variables.variables[0];
-      ListLiteral exp = decl.initializer;
-      return exp.staticType;
-    }
-
-    Asserter<InterfaceType> assertListOfInt = _isListOf(_isInt);
-
-    assertListOfInt(literal(0));
-    assertListOfInt(literal(1));
-    assertListOfInt(literal(2));
-    assertListOfInt(literal(3));
-  }
-
-  test_listLiteral_simple_const() async {
-    String code = r'''
-      void main () {
-        const List<int> c0 = const [];
-        const List<int> c1 = const [3];
-        const List<int> c2 = const ["hello"];
-        const List<int> c3 = const ["hello", 3];
-     }
-   ''';
-    CompilationUnit unit = await resolveSource(code);
-    List<Statement> statements =
-        AstFinder.getStatementsInTopLevelFunction(unit, "main");
-    DartType literal(int i) {
-      VariableDeclarationStatement stmt = statements[i];
-      VariableDeclaration decl = stmt.variables.variables[0];
-      ListLiteral exp = decl.initializer;
-      return exp.staticType;
-    }
-
-    Asserter<InterfaceType> assertListOfInt = _isListOf(_isInt);
-
-    assertListOfInt(literal(0));
-    assertListOfInt(literal(1));
-    assertListOfInt(literal(2));
-    assertListOfInt(literal(3));
-  }
-
-  test_listLiteral_simple_disabled() async {
-    String code = r'''
-      void main () {
-        List<int> l0 = <num>[];
-        List<int> l1 = <num>[3];
-        List<int> l2 = <String>["hello"];
-        List<int> l3 = <dynamic>["hello", 3];
-     }
-   ''';
-    CompilationUnit unit = await resolveSource(code);
-    List<Statement> statements =
-        AstFinder.getStatementsInTopLevelFunction(unit, "main");
-    DartType literal(int i) {
-      VariableDeclarationStatement stmt = statements[i];
-      VariableDeclaration decl = stmt.variables.variables[0];
-      ListLiteral exp = decl.initializer;
-      return exp.staticType;
-    }
-
-    _isListOf(_isNum)(literal(0));
-    _isListOf(_isNum)(literal(1));
-    _isListOf(_isString)(literal(2));
-    _isListOf(_isDynamic)(literal(3));
-  }
-
-  test_listLiteral_simple_subtype() async {
-    String code = r'''
-      void main () {
-        Iterable<int> l0 = [];
-        Iterable<int> l1 = [3];
-        Iterable<int> l2 = ["hello"];
-        Iterable<int> l3 = ["hello", 3];
-     }
-   ''';
-    CompilationUnit unit = await resolveSource(code);
-    List<Statement> statements =
-        AstFinder.getStatementsInTopLevelFunction(unit, "main");
-    DartType literal(int i) {
-      VariableDeclarationStatement stmt = statements[i];
-      VariableDeclaration decl = stmt.variables.variables[0];
-      ListLiteral exp = decl.initializer;
-      return exp.staticType;
-    }
-
-    Asserter<InterfaceType> assertListOfInt = _isListOf(_isInt);
-
-    assertListOfInt(literal(0));
-    assertListOfInt(literal(1));
-    assertListOfInt(literal(2));
-    assertListOfInt(literal(3));
-  }
-
-  test_mapLiteral_nested() async {
-    String code = r'''
-      void main () {
-        Map<int, List<String>> l0 = {};
-        Map<int, List<String>> l1 = {3: ["hello"]};
-        Map<int, List<String>> l2 = {"hello": ["hello"]};
-        Map<int, List<String>> l3 = {3: [3]};
-        Map<int, List<String>> l4 = {3:["hello"], "hello": [3]};
-     }
-   ''';
-    CompilationUnit unit = await resolveSource(code);
-    List<Statement> statements =
-        AstFinder.getStatementsInTopLevelFunction(unit, "main");
-    MapLiteral literal(int i) {
-      VariableDeclarationStatement stmt = statements[i];
-      VariableDeclaration decl = stmt.variables.variables[0];
-      MapLiteral exp = decl.initializer;
-      return exp;
-    }
-
-    Asserter<InterfaceType> assertListOfString = _isListOf(_isString);
-    Asserter<InterfaceType> assertMapOfIntToListOfString =
-        _isMapOf(_isInt, (DartType type) => assertListOfString(type));
-
-    assertMapOfIntToListOfString(literal(0).staticType);
-    assertMapOfIntToListOfString(literal(1).staticType);
-    assertMapOfIntToListOfString(literal(2).staticType);
-    assertMapOfIntToListOfString(literal(3).staticType);
-    assertMapOfIntToListOfString(literal(4).staticType);
-
-    assertListOfString(literal(1).entries[0].value.staticType);
-    assertListOfString(literal(2).entries[0].value.staticType);
-    assertListOfString(literal(3).entries[0].value.staticType);
-    assertListOfString(literal(4).entries[0].value.staticType);
-  }
-
-  test_mapLiteral_simple() async {
-    String code = r'''
-      void main () {
-        Map<int, String> l0 = {};
-        Map<int, String> l1 = {3: "hello"};
-        Map<int, String> l2 = {"hello": "hello"};
-        Map<int, String> l3 = {3: 3};
-        Map<int, String> l4 = {3:"hello", "hello": 3};
-     }
-   ''';
-    CompilationUnit unit = await resolveSource(code);
-    List<Statement> statements =
-        AstFinder.getStatementsInTopLevelFunction(unit, "main");
-    DartType literal(int i) {
-      VariableDeclarationStatement stmt = statements[i];
-      VariableDeclaration decl = stmt.variables.variables[0];
-      MapLiteral exp = decl.initializer;
-      return exp.staticType;
-    }
-
-    Asserter<InterfaceType> assertMapOfIntToString =
-        _isMapOf(_isInt, _isString);
-
-    assertMapOfIntToString(literal(0));
-    assertMapOfIntToString(literal(1));
-    assertMapOfIntToString(literal(2));
-    assertMapOfIntToString(literal(3));
-  }
-
-  test_mapLiteral_simple_disabled() async {
-    String code = r'''
-      void main () {
-        Map<int, String> l0 = <int, dynamic>{};
-        Map<int, String> l1 = <int, dynamic>{3: "hello"};
-        Map<int, String> l2 = <int, dynamic>{"hello": "hello"};
-        Map<int, String> l3 = <int, dynamic>{3: 3};
-     }
-   ''';
-    CompilationUnit unit = await resolveSource(code);
-    List<Statement> statements =
-        AstFinder.getStatementsInTopLevelFunction(unit, "main");
-    DartType literal(int i) {
-      VariableDeclarationStatement stmt = statements[i];
-      VariableDeclaration decl = stmt.variables.variables[0];
-      MapLiteral exp = decl.initializer;
-      return exp.staticType;
-    }
-
-    Asserter<InterfaceType> assertMapOfIntToDynamic =
-        _isMapOf(_isInt, _isDynamic);
-
-    assertMapOfIntToDynamic(literal(0));
-    assertMapOfIntToDynamic(literal(1));
-    assertMapOfIntToDynamic(literal(2));
-    assertMapOfIntToDynamic(literal(3));
-  }
-
-  test_methodDeclaration_body_propagation() async {
-    String code = r'''
-      class A {
-        List<String> m0(int x) => ["hello"];
-        List<String> m1(int x) {return [3];}
-      }
-   ''';
-    CompilationUnit unit = await resolveSource(code);
-    Expression methodReturnValue(String methodName) {
-      MethodDeclaration method =
-          AstFinder.getMethodInClass(unit, "A", methodName);
-      FunctionBody body = method.body;
-      if (body is ExpressionFunctionBody) {
-        return body.expression;
-      } else {
-        Statement stmt = (body as BlockFunctionBody).block.statements[0];
-        return (stmt as ReturnStatement).expression;
-      }
-    }
-
-    Asserter<InterfaceType> assertListOfString = _isListOf(_isString);
-    assertListOfString(methodReturnValue("m0").staticType);
-    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.declaredElement;
-    FunctionType type = f0.type;
-    _isFunction2Of(_isString, _isInt)(type);
-  }
-
-  test_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.INVALID_CAST_LITERAL]);
-    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").declaredElement;
-
-    _isInstantiationOf(_hasElement(elementB))([_isNull])(type);
-  }
-
-  test_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").declaredElement;
-
-    _isInstantiationOf(_hasElement(elementB))([_isNum])(type);
-  }
-
-  test_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.INVALID_CAST_LITERAL,
-    ]);
-    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").declaredElement;
-
-    _isInstantiationOf(_hasElement(elementB))([_isNull])(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").declaredElement;
-
-    _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").declaredElement;
-
-    _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").declaredElement;
-
-    _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").declaredElement;
-
-    _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").declaredElement;
-
-    _isInstantiationOf(_hasElement(elementA))([_isNum, _isNum])(type);
-  }
-
-  test_redirectedConstructor_named() async {
-    Source source = addSource(r'''
-class A<T, U> implements B<T, U> {
-  A.named();
-}
-
-class B<T2, U2> {
-  factory B() = A.named;
-}
-   ''');
-    TestAnalysisResult result = await computeAnalysisResult(source);
-    assertNoErrors(source);
-
-    ClassDeclaration b = result.unit.declarations[1];
-    ConstructorDeclaration bConstructor = b.members[0];
-    ConstructorName redirected = bConstructor.redirectedConstructor;
-
-    TypeName typeName = redirected.type;
-    expect(typeName.type.toString(), 'A<T2, U2>');
-    expect(typeName.type.toString(), 'A<T2, U2>');
-
-    var constructorMember = redirected.staticElement;
-    expect(constructorMember.toString(), 'A.named() → A<T2, U2>');
-    expect(redirected.name.staticElement, constructorMember);
-  }
-
-  test_redirectedConstructor_self() async {
-    Source source = addSource(r'''
-class A<T> {
-  A();
-  factory A.redirected() = A;
-}
-   ''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-  }
-
-  test_redirectedConstructor_unnamed() async {
-    Source source = addSource(r'''
-class A<T, U> implements B<T, U> {
-  A();
-}
-
-class B<T2, U2> {
-  factory B() = A;
-}
-   ''');
-    TestAnalysisResult result = await computeAnalysisResult(source);
-    assertNoErrors(source);
-
-    ClassDeclaration b = result.unit.declarations[1];
-    ConstructorDeclaration bConstructor = b.members[0];
-    ConstructorName redirected = bConstructor.redirectedConstructor;
-
-    TypeName typeName = redirected.type;
-    expect(typeName.type.toString(), 'A<T2, U2>');
-    expect(typeName.type.toString(), 'A<T2, U2>');
-
-    expect(redirected.name, isNull);
-    expect(redirected.staticElement.toString(), 'A() → A<T2, U2>');
-  }
-
-  test_redirectingConstructor_propagation() async {
-    String code = r'''
-      class A {
-        A() : this.named([]);
-        A.named(List<String> x);
-      }
-   ''';
-    CompilationUnit unit = await resolveSource(code);
-
-    ConstructorDeclaration constructor =
-        AstFinder.getConstructorInClass(unit, "A", null);
-    RedirectingConstructorInvocation invocation = constructor.initializers[0];
-    Expression exp = invocation.argumentList.arguments[0];
-    _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_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);
-  }
-
-  test_returnType_variance3() async {
-    // Check that the variance heuristic chooses the most 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];
-    _isInt(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_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);
-  }
-
-  test_superConstructorInvocation_propagation() async {
-    String code = r'''
-      class B {
-        B(List<String> p);
-      }
-      class A extends B {
-        A() : super([]);
-      }
-   ''';
-    CompilationUnit unit = await resolveSource(code);
-
-    ConstructorDeclaration constructor =
-        AstFinder.getConstructorInClass(unit, "A", null);
-    SuperConstructorInvocation invocation = constructor.initializers[0];
-    Expression exp = invocation.argumentList.arguments[0];
-    _isListOf(_isString)(exp.staticType);
-  }
-
-  test_sync_star_method_propagation() async {
-    String code = r'''
-      import "dart:async";
-      class A {
-        Iterable f0() sync* { yield []; }
-        Iterable f1() sync* { yield* new List(); }
-
-        Iterable<List<int>> f2() sync* { yield []; }
-        Iterable<List<int>> f3() sync* { yield* new List(); }
-      }
-   ''';
-    CompilationUnit unit = await resolveSource(code);
-
-    void check(String name, Asserter<InterfaceType> typeTest) {
-      MethodDeclaration test = AstFinder.getMethodInClass(unit, "A", name);
-      BlockFunctionBody body = test.body;
-      YieldStatement stmt = body.block.statements[0];
-      Expression exp = stmt.expression;
-      typeTest(exp.staticType);
-    }
-
-    check("f0", _isListOf(_isDynamic));
-    check("f1", _isListOf(_isDynamic));
-
-    check("f2", _isListOf(_isInt));
-    check("f3", _isListOf((DartType type) => _isListOf(_isInt)(type)));
-  }
-
-  test_sync_star_propagation() async {
-    String code = r'''
-      import "dart:async";
-
-      Iterable f0() sync* { yield []; }
-      Iterable f1() sync* { yield* new List(); }
-
-      Iterable<List<int>> f2() sync* { yield []; }
-      Iterable<List<int>> f3() sync* { yield* new List(); }
-   ''';
-    CompilationUnit unit = await resolveSource(code);
-
-    void check(String name, Asserter<InterfaceType> typeTest) {
-      FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, name);
-      BlockFunctionBody body = test.functionExpression.body;
-      YieldStatement stmt = body.block.statements[0];
-      Expression exp = stmt.expression;
-      typeTest(exp.staticType);
-    }
-
-    check("f0", _isListOf(_isDynamic));
-    check("f1", _isListOf(_isDynamic));
-
-    check("f2", _isListOf(_isInt));
-    check("f3", _isListOf((DartType type) => _isListOf(_isInt)(type)));
-  }
-
-  /// Verifies the source has the expected [errorCodes] as well as the
-  /// expected [errorMessage].
-  void _expectInferenceError(
-      Source source, List<ErrorCode> errorCodes, String errorMessage) {
-    assertErrors(source, errorCodes);
-    var errors = analysisResults[source]
-        .errors
-        .where((e) => e.errorCode == StrongModeCode.COULD_NOT_INFER)
-        .map((e) => e.message)
-        .toList();
-    expect(errors.length, 1);
-    var actual = errors[0];
-    expect(actual,
-        errorMessage, // Print the literal error message for easy copy+paste:
-        reason: 'Actual error did not match expected error:\n$actual');
-  }
-
-  /// Helper method for testing `FutureOr<T>`.
-  ///
-  /// Validates that [code] produces [errors]. It should define a function
-  /// "test", whose body is an expression that invokes a method. Returns that
-  /// invocation.
-  Future<MethodInvocation> _testFutureOr(String code,
-      {List<ErrorCode> errors}) async {
-    Source source = addSource("""
-    import "dart:async";
-    $code""");
-    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
-
-    if (errors == null) {
-      assertNoErrors(source);
-    } else {
-      assertErrors(source, errors);
-    }
-    verify([source]);
-    FunctionDeclaration test =
-        AstFinder.getTopLevelFunction(analysisResult.unit, "test");
-    ExpressionFunctionBody body = test.functionExpression.body;
-    return body.expression;
-  }
-}
-
-/// Test cases for [StrongModeStaticTypeAnalyzer2Test]
-mixin StrongModeStaticTypeAnalyzer2TestCases
-    implements StaticTypeAnalyzer2TestShared {
-  void expectStaticInvokeType(String search, String type) {
-    var invocation = findIdentifier(search).parent as MethodInvocation;
-    expect(invocation.staticInvokeType.toString(), type);
-  }
-
-  test_dynamicObjectGetter_hashCode() async {
-    String code = r'''
-main() {
-  dynamic a = null;
-  var foo = a.hashCode;
-}
-''';
-    await resolveTestUnit(code);
-    expectInitializerType('foo', 'int');
-  }
-
-  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_promotion3() async {
-    // Test that promotion from FutureOr<T> to T works for type
-    // parameters T
-    String code = r'''
-    import "dart:async";
-    dynamic test<T extends num>(FutureOr<T> x) => (x is T) &&
-                                                  (x.abs() == 0);
-   ''';
-    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_generalizedVoid_assignToVoidOk() async {
-    Source source = addSource(r'''
-void main() {
-  void x;
-  x = 42;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-  }
-
-  test_genericFunction() async {
-    await resolveTestUnit(r'T f<T>(T x) => null;');
-    expectFunctionType('f', '<T>(T) → T',
-        elementTypeParams: '[T]', typeFormals: '[T]');
-    SimpleIdentifier f = findIdentifier('f');
-    FunctionElementImpl e = f.staticElement;
-    FunctionType ft = e.type.instantiate([typeProvider.stringType]);
-    expect(ft.toString(), '(String) → String');
-  }
-
-  test_genericFunction_bounds() async {
-    await resolveTestUnit(r'T f<T extends num>(T x) => null;');
-    expectFunctionType('f', '<T extends num>(T) → T',
-        elementTypeParams: '[T extends num]', typeFormals: '[T extends num]');
-  }
-
-  test_genericFunction_parameter() async {
-    await resolveTestUnit(r'''
-void g(T f<T>(T x)) {}
-''', noErrors: false // TODO(paulberry): remove when dartbug.com/28515 fixed.
-        );
-    expectFunctionType('f', '<T>(T) → T',
-        elementTypeParams: '[]', typeFormals: '[T]');
-    SimpleIdentifier f = findIdentifier('f');
-    ParameterElementImpl e = f.staticElement;
-    FunctionType type = e.type;
-    FunctionType ft = type.instantiate([typeProvider.stringType]);
-    expect(ft.toString(), '(String) → String');
-  }
-
-  test_genericFunction_static() async {
-    await resolveTestUnit(r'''
-class C<E> {
-  static T f<T>(T x) => null;
-}
-''');
-    expectFunctionType('f', '<T>(T) → T',
-        elementTypeParams: '[T]', typeFormals: '[T]');
-    SimpleIdentifier f = findIdentifier('f');
-    MethodElementImpl e = f.staticElement;
-    FunctionType ft = e.type.instantiate([typeProvider.stringType]);
-    expect(ft.toString(), '(String) → String');
-  }
-
-  test_genericFunction_typedef() async {
-    String code = r'''
-typedef T F<T>(T x);
-F f0;
-
-class C {
-  static F f1;
-  F f2;
-  void g(F f3) {
-    F f4;
-    f0(3);
-    f1(3);
-    f2(3);
-    f3(3);
-    f4(3);
-  }
-}
-
-class D<S> {
-  static F f1;
-  F f2;
-  void g(F f3) {
-    F f4;
-    f0(3);
-    f1(3);
-    f2(3);
-    f3(3);
-    f4(3);
-  }
-}
-''';
-    await resolveTestUnit(code);
-
-    checkBody(String className) {
-      List<Statement> statements =
-          AstFinder.getStatementsInMethod(testUnit, className, "g");
-
-      for (int i = 1; i <= 5; i++) {
-        Expression exp = (statements[i] as ExpressionStatement).expression;
-        expect(exp.staticType, typeProvider.dynamicType);
-      }
-    }
-
-    checkBody("C");
-    checkBody("D");
-  }
-
-  test_genericFunction_upwardsAndDownwards() async {
-    // Regression tests for https://github.com/dart-lang/sdk/issues/27586.
-    await resolveTestUnit(r'List<num> x = [1, 2];');
-    expectInitializerType('x', 'List<num>');
-  }
-
-  test_genericFunction_upwardsAndDownwards_Object() async {
-    // Regression tests for https://github.com/dart-lang/sdk/issues/27625.
-    await resolveTestUnit(r'''
-List<Object> aaa = [];
-List<Object> bbb = [1, 2, 3];
-List<Object> ccc = [null];
-List<Object> ddd = [1 as dynamic];
-List<Object> eee = [new Object()];
-    ''');
-    expectInitializerType('aaa', 'List<Object>');
-    expectInitializerType('bbb', 'List<Object>');
-    expectInitializerType('ccc', 'List<Object>');
-    expectInitializerType('ddd', 'List<Object>');
-    expectInitializerType('eee', 'List<Object>');
-  }
-
-  test_genericMethod() async {
-    await resolveTestUnit(r'''
-class C<E> {
-  List<T> f<T>(E e) => null;
-}
-main() {
-  C<String> cOfString;
-}
-''');
-    expectFunctionType('f', '<T>(E) → List<T>',
-        elementTypeParams: '[T]',
-        typeParams: '[E]',
-        typeArgs: '[E]',
-        typeFormals: '[T]');
-    SimpleIdentifier c = findIdentifier('cOfString');
-    FunctionType ft = (c.staticType as InterfaceType).getMethod('f').type;
-    expect(ft.toString(), '<T>(String) → List<T>');
-    ft = ft.instantiate([typeProvider.intType]);
-    expect(ft.toString(), '(String) → List<int>');
-    expect('${ft.typeArguments}/${ft.typeParameters}', '[String, int]/[E, T]');
-  }
-
-  test_genericMethod_explicitTypeParams() async {
-    await resolveTestUnit(r'''
-class C<E> {
-  List<T> f<T>(E e) => null;
-}
-main() {
-  C<String> cOfString;
-  var x = cOfString.f<int>('hi');
-}
-''');
-    MethodInvocation f = findIdentifier('f<int>').parent;
-    FunctionType ft = f.staticInvokeType;
-    expect(ft.toString(), '(String) → List<int>');
-    expect('${ft.typeArguments}/${ft.typeParameters}', '[String, int]/[E, T]');
-
-    SimpleIdentifier x = findIdentifier('x');
-    expect(x.staticType,
-        typeProvider.listType.instantiate([typeProvider.intType]));
-  }
-
-  test_genericMethod_functionExpressionInvocation_explicit() async {
-    await resolveTestUnit(r'''
-class C<E> {
-  T f<T>(T e) => null;
-  static T g<T>(T e) => null;
-  static T Function<T>(T) h = null;
-}
-
-T topF<T>(T e) => null;
-var topG = topF;
-void test<S>(T Function<T>(T) pf) {
-  var c = new C<int>();
-  T lf<T>(T e) => null;
-
-  var lambdaCall = (<E>(E e) => e)<int>(3);
-  var methodCall = (c.f)<int>(3);
-  var staticCall = (C.g)<int>(3);
-  var staticFieldCall = (C.h)<int>(3);
-  var topFunCall = (topF)<int>(3);
-  var topFieldCall = (topG)<int>(3);
-  var localCall = (lf)<int>(3);
-  var paramCall = (pf)<int>(3);
-}
-''');
-    expectIdentifierType('methodCall', "int");
-    expectIdentifierType('staticCall', "int");
-    expectIdentifierType('staticFieldCall', "int");
-    expectIdentifierType('topFunCall', "int");
-    expectIdentifierType('topFieldCall', "int");
-    expectIdentifierType('localCall', "int");
-    expectIdentifierType('paramCall', "int");
-    expectIdentifierType('lambdaCall', "int");
-  }
-
-  test_genericMethod_functionExpressionInvocation_functionTypedParameter_explicit() async {
-    await resolveTestUnit(r'''
-void test<S>(T pf<T>(T e)) {
-  var paramCall = (pf)<int>(3);
-}
-''', noErrors: false // TODO(paulberry): remove when dartbug.com/28515 fixed.
-        );
-    expectIdentifierType('paramCall', "int");
-  }
-
-  test_genericMethod_functionExpressionInvocation_functionTypedParameter_inferred() async {
-    await resolveTestUnit(r'''
-void test<S>(T pf<T>(T e)) {
-  var paramCall = (pf)(3);
-}
-''', noErrors: false // TODO(paulberry): remove when dartbug.com/28515 fixed.
-        );
-    expectIdentifierType('paramCall', "int");
-  }
-
-  test_genericMethod_functionExpressionInvocation_inferred() async {
-    await resolveTestUnit(r'''
-class C<E> {
-  T f<T>(T e) => null;
-  static T g<T>(T e) => null;
-  static T Function<T>(T) h = null;
-}
-
-T topF<T>(T e) => null;
-var topG = topF;
-void test<S>(T Function<T>(T) pf) {
-  var c = new C<int>();
-  T lf<T>(T e) => null;
-
-  var lambdaCall = (<E>(E e) => e)(3);
-  var methodCall = (c.f)(3);
-  var staticCall = (C.g)(3);
-  var staticFieldCall = (C.h)(3);
-  var topFunCall = (topF)(3);
-  var topFieldCall = (topG)(3);
-  var localCall = (lf)(3);
-  var paramCall = (pf)(3);
-}
-''', noErrors: false // TODO(paulberry): remove when dartbug.com/28515 fixed.
-        );
-    expectIdentifierType('methodCall', "int");
-    expectIdentifierType('staticCall', "int");
-    expectIdentifierType('staticFieldCall', "int");
-    expectIdentifierType('topFunCall', "int");
-    expectIdentifierType('topFieldCall', "int");
-    expectIdentifierType('localCall', "int");
-    expectIdentifierType('paramCall', "int");
-    expectIdentifierType('lambdaCall', "int");
-  }
-
-  test_genericMethod_functionInvocation_explicit() async {
-    await resolveTestUnit(r'''
-class C<E> {
-  T f<T>(T e) => null;
-  static T g<T>(T e) => null;
-  static T Function<T>(T) h = null;
-}
-
-T topF<T>(T e) => null;
-var topG = topF;
-void test<S>(T Function<T>(T) pf) {
-  var c = new C<int>();
-  T lf<T>(T e) => null;
-  var methodCall = c.f<int>(3);
-  var staticCall = C.g<int>(3);
-  var staticFieldCall = C.h<int>(3);
-  var topFunCall = topF<int>(3);
-  var topFieldCall = topG<int>(3);
-  var localCall = lf<int>(3);
-  var paramCall = pf<int>(3);
-}
-''');
-    expectIdentifierType('methodCall', "int");
-    expectIdentifierType('staticCall', "int");
-    expectIdentifierType('staticFieldCall', "int");
-    expectIdentifierType('topFunCall', "int");
-    expectIdentifierType('topFieldCall', "int");
-    expectIdentifierType('localCall', "int");
-    expectIdentifierType('paramCall', "int");
-  }
-
-  test_genericMethod_functionInvocation_functionTypedParameter_explicit() async {
-    await resolveTestUnit(r'''
-void test<S>(T pf<T>(T e)) {
-  var paramCall = pf<int>(3);
-}
-''', noErrors: false // TODO(paulberry): remove when dartbug.com/28515 fixed.
-        );
-    expectIdentifierType('paramCall', "int");
-  }
-
-  test_genericMethod_functionInvocation_functionTypedParameter_inferred() async {
-    await resolveTestUnit(r'''
-void test<S>(T pf<T>(T e)) {
-  var paramCall = pf(3);
-}
-''', noErrors: false // TODO(paulberry): remove when dartbug.com/28515 fixed.
-        );
-    expectIdentifierType('paramCall', "int");
-  }
-
-  test_genericMethod_functionInvocation_inferred() async {
-    await resolveTestUnit(r'''
-class C<E> {
-  T f<T>(T e) => null;
-  static T g<T>(T e) => null;
-  static T Function<T>(T) h = null;
-}
-
-T topF<T>(T e) => null;
-var topG = topF;
-void test<S>(T Function<T>(T) pf) {
-  var c = new C<int>();
-  T lf<T>(T e) => null;
-  var methodCall = c.f(3);
-  var staticCall = C.g(3);
-  var staticFieldCall = C.h(3);
-  var topFunCall = topF(3);
-  var topFieldCall = topG(3);
-  var localCall = lf(3);
-  var paramCall = pf(3);
-}
-''');
-    expectIdentifierType('methodCall', "int");
-    expectIdentifierType('staticCall', "int");
-    expectIdentifierType('staticFieldCall', "int");
-    expectIdentifierType('topFunCall', "int");
-    expectIdentifierType('topFieldCall', "int");
-    expectIdentifierType('localCall', "int");
-    expectIdentifierType('paramCall', "int");
-  }
-
-  test_genericMethod_functionTypedParameter() async {
-    await resolveTestUnit(r'''
-class C<E> {
-  List<T> f<T>(T f(E e)) => null;
-}
-main() {
-  C<String> cOfString;
-}
-''');
-    expectFunctionType('f', '<T>((E) → T) → List<T>',
-        elementTypeParams: '[T]',
-        typeParams: '[E]',
-        typeArgs: '[E]',
-        typeFormals: '[T]');
-
-    SimpleIdentifier c = findIdentifier('cOfString');
-    FunctionType ft = (c.staticType as InterfaceType).getMethod('f').type;
-    expect(ft.toString(), '<T>((String) → T) → List<T>');
-    ft = ft.instantiate([typeProvider.intType]);
-    expect(ft.toString(), '((String) → int) → List<int>');
-  }
-
-  test_genericMethod_functionTypedParameter_tearoff() async {
-    await resolveTestUnit(r'''
-void test<S>(T pf<T>(T e)) {
-  var paramTearOff = pf;
-}
-''', noErrors: false // TODO(paulberry): remove when dartbug.com/28515 fixed.
-        );
-    expectIdentifierType('paramTearOff', "<T>(T) → T");
-  }
-
-  test_genericMethod_implicitDynamic() async {
-    // Regression test for:
-    // https://github.com/dart-lang/sdk/issues/25100#issuecomment-162047588
-    // These should not cause any hints or warnings.
-    await resolveTestUnit(r'''
-class List<E> {
-  T map<T>(T f(E e)) => null;
-}
-void foo() {
-  List list = null;
-  list.map((e) => e);
-  list.map((e) => 3);
-}''');
-    expectIdentifierType('map((e) => e);', '<T>((dynamic) → T) → T');
-    expectIdentifierType('map((e) => 3);', '<T>((dynamic) → T) → T');
-
-    MethodInvocation m1 = findIdentifier('map((e) => e);').parent;
-    expect(m1.staticInvokeType.toString(), '((dynamic) → dynamic) → dynamic');
-    MethodInvocation m2 = findIdentifier('map((e) => 3);').parent;
-    expect(m2.staticInvokeType.toString(), '((dynamic) → int) → int');
-  }
-
-  test_genericMethod_max_doubleDouble() async {
-    String code = r'''
-import 'dart:math';
-main() {
-  var foo = max(1.0, 2.0);
-}
-''';
-    await resolveTestUnit(code);
-    expectInitializerType('foo', 'double');
-  }
-
-  test_genericMethod_max_doubleDouble_prefixed() async {
-    String code = r'''
-import 'dart:math' as math;
-main() {
-  var foo = math.max(1.0, 2.0);
-}
-''';
-    await resolveTestUnit(code);
-    expectInitializerType('foo', 'double');
-  }
-
-  test_genericMethod_max_doubleInt() async {
-    String code = r'''
-import 'dart:math';
-main() {
-  var foo = max(1.0, 2);
-}
-''';
-    await resolveTestUnit(code);
-    expectInitializerType('foo', 'num');
-  }
-
-  test_genericMethod_max_intDouble() async {
-    String code = r'''
-import 'dart:math';
-main() {
-  var foo = max(1, 2.0);
-}
-''';
-    await resolveTestUnit(code);
-    expectInitializerType('foo', 'num');
-  }
-
-  test_genericMethod_max_intInt() async {
-    String code = r'''
-import 'dart:math';
-main() {
-  var foo = max(1, 2);
-}
-''';
-    await resolveTestUnit(code);
-    expectInitializerType('foo', 'int');
-  }
-
-  test_genericMethod_nestedBound() async {
-    String code = r'''
-class Foo<T extends num> {
-  void method<U extends T>(U u) {
-    u.abs();
-  }
-}
-''';
-    // Just validate that there is no warning on the call to `.abs()`.
-    await resolveTestUnit(code);
-  }
-
-  test_genericMethod_nestedCapture() async {
-    await resolveTestUnit(r'''
-class C<T> {
-  T f<S>(S x) {
-    new C<S>().f<int>(3);
-    new C<S>().f; // tear-off
-    return null;
-  }
-}
-''');
-    MethodInvocation f = findIdentifier('f<int>(3);').parent;
-    expect(f.staticInvokeType.toString(), '(int) → S');
-    FunctionType ft = f.staticInvokeType;
-    expect('${ft.typeArguments}/${ft.typeParameters}', '[S, int]/[T, S]');
-
-    expectIdentifierType('f;', '<S₀>(S₀) → S');
-  }
-
-  test_genericMethod_nestedCaptureBounds() async {
-    await resolveTestUnit(r'''
-class C<T> {
-  T f<S extends T>(S x) {
-    new C<S>().f<int>(3);
-    new C<S>().f; // tear-off
-    return null;
-  }
-}
-''');
-    MethodInvocation f = findIdentifier('f<int>(3);').parent;
-    expect(f.staticInvokeType.toString(), '(int) → S');
-    FunctionType ft = f.staticInvokeType;
-    expect('${ft.typeArguments}/${ft.typeParameters}',
-        '[S, int]/[T, S extends T]');
-
-    expectIdentifierType('f;', '<S₀ extends S>(S₀) → S');
-  }
-
-  test_genericMethod_nestedFunctions() async {
-    await resolveTestUnit(r'''
-S f<S>(S x) {
-  g<S>(S x) => f;
-  return null;
-}
-''');
-    expectIdentifierType('f', '<S>(S) → S');
-    expectIdentifierType('g', '<S>(S) → <S>(S) → S');
-  }
-
-  test_genericMethod_override() async {
-    await resolveTestUnit(r'''
-class C {
-  T f<T>(T x) => null;
-}
-class D extends C {
-  T f<T>(T x) => null; // from D
-}
-''');
-    expectFunctionType('f<T>(T x) => null; // from D', '<T>(T) → T',
-        elementTypeParams: '[T]', typeFormals: '[T]');
-    SimpleIdentifier f = findIdentifier('f<T>(T x) => null; // from D');
-    MethodElementImpl e = f.staticElement;
-    FunctionType ft = e.type.instantiate([typeProvider.stringType]);
-    expect(ft.toString(), '(String) → String');
-  }
-
-  test_genericMethod_override_bounds() async {
-    await resolveTestUnit(r'''
-class A {}
-class B {
-  T f<T extends A>(T x) => null;
-}
-// override with the same bound is OK
-class C extends B {
-  T f<T extends A>(T x) => null;
-}
-// override with new name and the same bound is OK
-class D extends B {
-  Q f<Q extends A>(Q x) => null;
-}
-''');
-  }
-
-  test_genericMethod_override_covariant_field() async {
-    Source source = addSource(r'''
-abstract class A {
-  num get x;
-  set x(covariant num _);
-}
-
-class B extends A {
-  int x;
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_genericMethod_override_differentContextsSameBounds() async {
-    Source source = addSource(r'''
-        class GenericMethodBounds<T> {
-  Type get t => T;
-  GenericMethodBounds<E> foo<E extends T>() => new GenericMethodBounds<E>();
-  GenericMethodBounds<E> bar<E extends void Function(T)>() =>
-      new GenericMethodBounds<E>();
-}
-
-class GenericMethodBoundsDerived extends GenericMethodBounds<num> {
-  GenericMethodBounds<E> foo<E extends num>() => new GenericMethodBounds<E>();
-  GenericMethodBounds<E> bar<E extends void Function(num)>() =>
-      new GenericMethodBounds<E>();
-}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_genericMethod_override_invalidContravariantTypeParamBounds() async {
-    Source source = addSource(r'''
-class A {}
-class B extends A {}
-class C {
-  T f<T extends A>(T x) => null;
-}
-class D extends C {
-  T f<T extends B>(T x) => null;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_OVERRIDE]);
-    verify([source]);
-  }
-
-  test_genericMethod_override_invalidCovariantTypeParamBounds() async {
-    Source source = addSource(r'''
-class A {}
-class B extends A {}
-class C {
-  T f<T extends B>(T x) => null;
-}
-class D extends C {
-  T f<T extends A>(T x) => null;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_OVERRIDE]);
-    verify([source]);
-  }
-
-  test_genericMethod_override_invalidReturnType() async {
-    Source source = addSource(r'''
-class C {
-  Iterable<T> f<T>(T x) => null;
-}
-class D extends C {
-  String f<S>(S x) => null;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_OVERRIDE]);
-    verify([source]);
-  }
-
-  test_genericMethod_override_invalidTypeParamCount() async {
-    Source source = addSource(r'''
-class C {
-  T f<T>(T x) => null;
-}
-class D extends C {
-  S f<T, S>(T x) => null;
-}''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [CompileTimeErrorCode.INVALID_OVERRIDE]);
-    verify([source]);
-  }
-
-  test_genericMethod_propagatedType_promotion() async {
-    // Regression test for:
-    // https://github.com/dart-lang/sdk/issues/25340
-
-    // Note, after https://github.com/dart-lang/sdk/issues/25486 the original
-    // example won't work, as we now compute a static type and therefore discard
-    // the propagated type. So a new test was created that doesn't run under
-    // strong mode.
-    await resolveTestUnit(r'''
-abstract class Iter {
-  List<S> map<S>(S f(x));
-}
-class C {}
-C toSpan(dynamic element) {
-  if (element is Iter) {
-    var y = element.map(toSpan);
-  }
-  return null;
-}''');
-    expectIdentifierType('y = ', 'List<C>');
-  }
-
-  test_genericMethod_tearoff() async {
-    await resolveTestUnit(r'''
-class C<E> {
-  T f<T>(E e) => null;
-  static T g<T>(T e) => null;
-  static T Function<T>(T) h = null;
-}
-
-T topF<T>(T e) => null;
-var topG = topF;
-void test<S>(T Function<T>(T) pf) {
-  var c = new C<int>();
-  T lf<T>(T e) => null;
-  var methodTearOff = c.f;
-  var staticTearOff = C.g;
-  var staticFieldTearOff = C.h;
-  var topFunTearOff = topF;
-  var topFieldTearOff = topG;
-  var localTearOff = lf;
-  var paramTearOff = pf;
-}
-''');
-    expectIdentifierType('methodTearOff', "<T>(int) → T");
-    expectIdentifierType('staticTearOff', "<T>(T) → T");
-    expectIdentifierType('staticFieldTearOff', "<T>(T) → T");
-    expectIdentifierType('topFunTearOff', "<T>(T) → T");
-    expectIdentifierType('topFieldTearOff', "<T>(T) → T");
-    expectIdentifierType('localTearOff', "<T>(T) → T");
-    expectIdentifierType('paramTearOff', "<T>(T) → T");
-  }
-
-  test_genericMethod_tearoff_instantiated() async {
-    await resolveTestUnit(r'''
-class C<E> {
-  T f<T>(E e) => null;
-  static T g<T>(T e) => null;
-  static T Function<T>(T) h = null;
-}
-
-T topF<T>(T e) => null;
-var topG = topF;
-void test<S>(T pf<T>(T e)) {
-  var c = new C<int>();
-  T lf<T>(T e) => null;
-  var methodTearOffInst = c.f<int>;
-  var staticTearOffInst = C.g<int>;
-  var staticFieldTearOffInst = C.h<int>;
-  var topFunTearOffInst = topF<int>;
-  var topFieldTearOffInst = topG<int>;
-  var localTearOffInst = lf<int>;
-  var paramTearOffInst = pf<int>;
-}
-''');
-    expectIdentifierType('methodTearOffInst', "(int) → int");
-    expectIdentifierType('staticTearOffInst', "(int) → int");
-    expectIdentifierType('staticFieldTearOffInst', "(int) → int");
-    expectIdentifierType('topFunTearOffInst', "(int) → int");
-    expectIdentifierType('topFieldTearOffInst', "(int) → int");
-    expectIdentifierType('localTearOffInst', "(int) → int");
-    expectIdentifierType('paramTearOffInst', "(int) → int");
-  }
-
-  test_genericMethod_then() async {
-    String code = r'''
-import 'dart:async';
-String toString(int x) => x.toString();
-main() {
-  Future<int> bar = null;
-  var foo = bar.then(toString);
-}
-''';
-    await resolveTestUnit(code);
-
-    expectInitializerType('foo', 'Future<String>');
-  }
-
-  test_genericMethod_then_prefixed() async {
-    String code = r'''
-import 'dart:async' as async;
-String toString(int x) => x.toString();
-main() {
-  async.Future<int> bar = null;
-  var foo = bar.then(toString);
-}
-''';
-    await resolveTestUnit(code);
-    expectInitializerType('foo', 'Future<String>');
-  }
-
-  test_genericMethod_then_propagatedType() async {
-    // Regression test for https://github.com/dart-lang/sdk/issues/25482.
-    String code = r'''
-import 'dart:async';
-void main() {
-  Future<String> p;
-  var foo = p.then((r) => new Future<String>.value(3));
-}
-''';
-    await resolveTestUnit(code, noErrors: false);
-    // Note: this correctly reports the error
-    // StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE when run with the driver;
-    // when run without the driver, it reports no errors.  So we don't bother
-    // checking whether the correct errors were reported.
-    expectInitializerType('foo', 'Future<String>');
-  }
-
-  test_genericMethod_toplevel_field_staticTearoff() async {
-    await resolveTestUnit(r'''
-class C<E> {
-  static T g<T>(T e) => null;
-  static T Function<T>(T) h = null;
-}
-
-void test() {
-  var fieldRead = C.h;
-}
-''');
-    expectIdentifierType('fieldRead', "<T>(T) → T");
-  }
-
-  test_implicitBounds() async {
-    String code = r'''
-class A<T> {}
-
-class B<T extends num> {}
-
-class C<S extends int, T extends B<S>, U extends A> {}
-
-void test() {
-//
-  A ai;
-  B bi;
-  C ci;
-  var aa = new A();
-  var bb = new B();
-  var cc = new C();
-}
-''';
-    await resolveTestUnit(code);
-    expectIdentifierType('ai', "A<dynamic>");
-    expectIdentifierType('bi', "B<num>");
-    expectIdentifierType('ci', "C<int, B<int>, A<dynamic>>");
-    expectIdentifierType('aa', "A<dynamic>");
-    expectIdentifierType('bb', "B<num>");
-    expectIdentifierType('cc', "C<int, B<int>, A<dynamic>>");
-  }
-
-  test_inferClosureType_parameters() async {
-    Source source = addSource(r'''
-typedef F({bool p});
-foo(callback(F f)) {}
-main() {
-  foo((f) {
-    f(p: false);
-  });
-}
-''');
-    var result = await computeAnalysisResult(source);
-    var main = result.unit.declarations[2] as FunctionDeclaration;
-    var body = main.functionExpression.body as BlockFunctionBody;
-    var statement = body.block.statements[0] as ExpressionStatement;
-    var invocation = statement.expression as MethodInvocation;
-    var closure = invocation.argumentList.arguments[0] as FunctionExpression;
-    var closureType = closure.staticType as FunctionType;
-    var fType = closureType.parameters[0].type as FunctionType;
-    // The inferred type of "f" in "foo()" invocation must own its parameters.
-    ParameterElement p = fType.parameters[0];
-    expect(p.name, 'p');
-    expect(p.enclosingElement, same(fType.element));
-  }
-
-  test_instantiateToBounds_class_error_extension_malbounded() async {
-    // Test that superclasses are strictly checked for malbounded default
-    // types
-    String code = r'''
-class C<T0 extends List<T1>, T1 extends List<T0>> {}
-class D extends C {}
-''';
-    await resolveTestUnit(code, noErrors: false);
-    assertErrors(testSource, [StrongModeCode.NO_DEFAULT_BOUNDS]);
-  }
-
-  test_instantiateToBounds_class_error_instantiation_malbounded() async {
-    // Test that instance creations are strictly checked for malbounded default
-    // types
-    String code = r'''
-class C<T0 extends List<T1>, T1 extends List<T0>> {}
-void test() {
-  var c = new C();
-}
-''';
-    await resolveTestUnit(code, noErrors: false);
-    assertErrors(testSource, [StrongModeCode.NO_DEFAULT_BOUNDS]);
-    expectIdentifierType('c;', 'C<List<dynamic>, List<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);
-    assertNoErrors(testSource);
-    expectIdentifierType('c;', 'C<List<dynamic>, List<dynamic>>');
-  }
-
-  test_instantiateToBounds_class_error_recursion_self() async {
-    String code = r'''
-class C<T extends C<T>> {}
-C c;
-''';
-    await resolveTestUnit(code, noErrors: false);
-    assertNoErrors(testSource);
-    expectIdentifierType('c;', '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);
-    assertNoErrors(testSource);
-    expectIdentifierType('c;', 'C<A<dynamic>>');
-  }
-
-  test_instantiateToBounds_class_error_typedef() async {
-    String code = r'''
-typedef T F<T>(T x);
-class C<T extends F<T>> {}
-C c;
-''';
-    await resolveTestUnit(code, noErrors: false);
-    assertNoErrors(testSource);
-    expectIdentifierType('c;', 'C<(dynamic) → dynamic>');
-  }
-
-  test_instantiateToBounds_class_ok_implicitDynamic_multi() async {
-    String code = r'''
-class C<T0 extends Map<T1, T2>, T1 extends List, T2 extends int> {}
-C c;
-''';
-    await resolveTestUnit(code);
-    assertNoErrors(testSource);
-    expectIdentifierType(
-        'c;', 'C<Map<List<dynamic>, int>, List<dynamic>, int>');
-  }
-
-  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>> {}
-class D<T extends A> {}
-void main() {
-  A a;
-  B b;
-  C c;
-  D d;
-}
-''';
-    await resolveTestUnit(code);
-    assertNoErrors(testSource);
-    expectIdentifierType('a;', 'A<dynamic>');
-    expectIdentifierType('b;', 'B<num>');
-    expectIdentifierType('c;', 'C<List<int>>');
-    expectIdentifierType('d;', 'D<A<dynamic>>');
-  }
-
-  test_instantiateToBounds_generic_function_error_malbounded() async {
-    // Test that generic methods are strictly checked for malbounded default
-    // types
-    String code = r'''
-T0 f<T0 extends List<T1>, T1 extends List<T0>>() {}
-void g() {
-  var c = f();
-  return;
-}
-''';
-    await resolveTestUnit(code, noErrors: false);
-    assertErrors(testSource, [StrongModeCode.NO_DEFAULT_BOUNDS]);
-    expectIdentifierType('c;', 'List<dynamic>');
-  }
-
-  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', '(Null, Null) → void');
-  }
-
-  test_instantiateToBounds_method_ok_referenceOther_before2() async {
-    String code = r'''
-class C<T> {
-  Map<S0, S1> m<S0 extends T, S1 extends List<S0>>() => null;
-
-  void main() {
-    m();
-  }
-}
-''';
-    await resolveTestUnit(code);
-    assertNoErrors(testSource);
-    expectStaticInvokeType('m();', '() → Map<T, List<T>>');
-  }
-
-  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)', '(Null) → void');
-  }
-
-  test_instantiateToBounds_method_ok_simpleBounds2() async {
-    String code = r'''
-class C<T> {
-  S m<S extends T>() => null;
-
-  void main() {
-    m();
-  }
-}
-''';
-    await resolveTestUnit(code);
-    assertNoErrors(testSource);
-    expectStaticInvokeType('m();', '() → T');
-  }
-
-  test_issue32396() async {
-    await resolveTestUnit(r'''
-class C<E> {
-  static T g<T>(T e) => null;
-  static final h = g;
-}
-''');
-  }
-
-  test_notInstantiatedBound_class_error_recursion() async {
-    String code = r'''
-class A<T extends B> {} // points to a
-class B<T extends A> {} // points to b
-class C<T extends A> {} // points to a cyclical type
-''';
-    await resolveTestUnit(code, noErrors: false);
-    assertErrors(testSource, [
-      StrongModeCode.NOT_INSTANTIATED_BOUND,
-      StrongModeCode.NOT_INSTANTIATED_BOUND,
-      StrongModeCode.NOT_INSTANTIATED_BOUND,
-    ]);
-  }
-
-  test_notInstantiatedBound_class_error_recursion_less_direct() async {
-    String code = r'''
-class A<T extends B<A>> {}
-class B<T extends A<B>> {}
-''';
-    await resolveTestUnit(code, noErrors: false);
-    assertErrors(testSource, [
-      StrongModeCode.NOT_INSTANTIATED_BOUND,
-      StrongModeCode.NOT_INSTANTIATED_BOUND,
-    ]);
-  }
-
-  test_notInstantiatedBound_class_error_recursion_typedef() async {
-    String code = r'''
-typedef F(C value);
-class C<T extends F> {}
-class D<T extends C> {}
-''';
-    await resolveTestUnit(code, noErrors: false);
-    assertErrors(testSource, [
-      StrongModeCode.NOT_INSTANTIATED_BOUND,
-      StrongModeCode.NOT_INSTANTIATED_BOUND,
-      CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF,
-    ]);
-  }
-
-  test_notInstantiatedBound_error_class_argument() async {
-    String code = r'''
-class A<K, V extends List<K>> {}
-class C<T extends A> {}
-''';
-    await resolveTestUnit(code, noErrors: false);
-    assertErrors(testSource, [StrongModeCode.NOT_INSTANTIATED_BOUND]);
-  }
-
-  test_notInstantiatedBound_error_class_argument2() async {
-    String code = r'''
-class A<K, V extends List<List<K>>> {}
-class C<T extends A> {}
-''';
-    await resolveTestUnit(code, noErrors: false);
-    assertErrors(testSource, [StrongModeCode.NOT_INSTANTIATED_BOUND]);
-  }
-
-  test_notInstantiatedBound_error_class_direct() async {
-    String code = r'''
-class A<K, V extends K> {}
-class C<T extends A> {}
-''';
-    await resolveTestUnit(code, noErrors: false);
-    assertErrors(testSource, [StrongModeCode.NOT_INSTANTIATED_BOUND]);
-  }
-
-  test_notInstantiatedBound_error_class_indirect() async {
-    String code = r'''
-class A<K, V extends K> {}
-class C<T extends List<A>> {}
-''';
-    await resolveTestUnit(code, noErrors: false);
-    assertErrors(testSource, [StrongModeCode.NOT_INSTANTIATED_BOUND]);
-  }
-
-  test_notInstantiatedBound_error_functionType() async {
-    await resolveTestUnit(r'''
-class A<T extends Function(T)> {}
-class B<T extends T Function()> {}
-class C<T extends A> {}
-class D<T extends B> {}
-''', noErrors: false);
-    assertErrors(testSource, [
-      StrongModeCode.NOT_INSTANTIATED_BOUND,
-      StrongModeCode.NOT_INSTANTIATED_BOUND
-    ]);
-  }
-
-  test_notInstantiatedBound_error_typedef_argument() async {
-    String code = r'''
-class A<K, V extends List<K>> {}
-typedef void F<T extends A>();
-''';
-    await resolveTestUnit(code, noErrors: false);
-    assertErrors(testSource, [StrongModeCode.NOT_INSTANTIATED_BOUND]);
-  }
-
-  test_notInstantiatedBound_error_typedef_argument2() async {
-    String code = r'''
-class A<K, V extends List<List<K>>> {}
-typedef void F<T extends A>();
-''';
-    await resolveTestUnit(code, noErrors: false);
-    assertErrors(testSource, [StrongModeCode.NOT_INSTANTIATED_BOUND]);
-  }
-
-  test_notInstantiatedBound_error_typedef_direct() async {
-    String code = r'''
-class A<K, V extends K> {}
-typedef void F<T extends A>();
-''';
-    await resolveTestUnit(code, noErrors: false);
-    assertErrors(testSource, [StrongModeCode.NOT_INSTANTIATED_BOUND]);
-  }
-
-  test_notInstantiatedBound_ok_class() async {
-    String code = r'''
-class A<T extends int> {}
-class C1<T extends A> {}
-class C2<T extends List<A>> {}
-''';
-    await resolveTestUnit(code);
-    assertNoErrors(testSource);
-  }
-
-  test_notInstantiatedBound_ok_class_class2() async {
-    String code = r'''
-class A<T> {}
-class C<T extends A<int>> {}
-class D<T extends C> {}
-''';
-    await resolveTestUnit(code);
-    assertNoErrors(testSource);
-  }
-
-  test_notInstantiatedBound_ok_class_class3() async {
-    String code = r'''
-class A<T> {}
-class B<T extends int> {}
-class C<T extends A<B>> {}
-''';
-    await resolveTestUnit(code);
-    assertNoErrors(testSource);
-  }
-
-  test_notInstantiatedBound_ok_class_class4() async {
-    String code = r'''
-class A<K, V> {}
-class B<T extends int> {}
-class C<T extends A<B, B>> {}
-''';
-    await resolveTestUnit(code);
-    assertNoErrors(testSource);
-  }
-
-  test_notInstantiatedBound_ok_class_function() async {
-    String code = r'''
-class A<T extends void Function()> {}
-class B<T extends A> {}
-''';
-    await resolveTestUnit(code);
-    assertNoErrors(testSource);
-  }
-
-  test_notInstantiatedBound_ok_class_typedef() async {
-    String code = r'''
-typedef void F<T extends int>();
-class C<T extends F> {}
-''';
-    await resolveTestUnit(code);
-    assertNoErrors(testSource);
-  }
-
-  test_notInstantiatedBound_ok_typedef_class() async {
-    String code = r'''
-class C<T extends int> {}
-typedef void F<T extends C>();
-''';
-    await resolveTestUnit(code);
-    assertNoErrors(testSource);
-  }
-
-  test_objectMethodOnFunctions_Anonymous() async {
-    String code = r'''
-void main() {
-  var f = (x) => 3;
-  // No errors, correct type
-  var t0 = f.toString();
-  var t1 = f.toString;
-  var t2 = f.hashCode;
-
-  // Expressions, no errors, correct type
-  var t3 = (f).toString();
-  var t4 = (f).toString;
-  var t5 = (f).hashCode;
-
-  // Cascades, no errors
-  f..toString();
-  f..toString;
-  f..hashCode;
-
-  // Expression cascades, no errors
-  (f)..toString();
-  (f)..toString;
-  (f)..hashCode;
-}''';
-    await _objectMethodOnFunctions_helper2(code);
-  }
-
-  test_objectMethodOnFunctions_Function() async {
-    String code = r'''
-void main() {
-  Function f;
-  // No errors, correct type
-  var t0 = f.toString();
-  var t1 = f.toString;
-  var t2 = f.hashCode;
-
-  // Expressions, no errors, correct type
-  var t3 = (f).toString();
-  var t4 = (f).toString;
-  var t5 = (f).hashCode;
-
-  // Cascades, no errors
-  f..toString();
-  f..toString;
-  f..hashCode;
-
-  // Expression cascades, no errors
-  (f)..toString();
-  (f)..toString;
-  (f)..hashCode;
-}''';
-    await _objectMethodOnFunctions_helper2(code);
-  }
-
-  test_objectMethodOnFunctions_Static() async {
-    String code = r'''
-int f(int x) => null;
-void main() {
-  // No errors, correct type
-  var t0 = f.toString();
-  var t1 = f.toString;
-  var t2 = f.hashCode;
-
-  // Expressions, no errors, correct type
-  var t3 = (f).toString();
-  var t4 = (f).toString;
-  var t5 = (f).hashCode;
-
-  // Cascades, no errors
-  f..toString();
-  f..toString;
-  f..hashCode;
-
-  // Expression cascades, no errors
-  (f)..toString();
-  (f)..toString;
-  (f)..hashCode;
-}''';
-    await _objectMethodOnFunctions_helper2(code);
-  }
-
-  test_objectMethodOnFunctions_Typedef() async {
-    String code = r'''
-typedef bool Predicate<T>(T object);
-
-void main() {
-  Predicate<int> f;
-  // No errors, correct type
-  var t0 = f.toString();
-  var t1 = f.toString;
-  var t2 = f.hashCode;
-
-  // Expressions, no errors, correct type
-  var t3 = (f).toString();
-  var t4 = (f).toString;
-  var t5 = (f).hashCode;
-
-  // Cascades, no errors
-  f..toString();
-  f..toString;
-  f..hashCode;
-
-  // Expression cascades, no errors
-  (f)..toString();
-  (f)..toString;
-  (f)..hashCode;
-}''';
-    await _objectMethodOnFunctions_helper2(code);
-  }
-
-  test_returnOfInvalidType_object_void() async {
-    await assertErrorsInCode(
-        "Object f() { void voidFn() => null; return voidFn(); }",
-        [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
-  }
-
-  test_setterWithDynamicTypeIsError() async {
-    Source source = addSource(r'''
-class A {
-  dynamic set f(String s) => null;
-}
-dynamic set g(int x) => null;
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      StaticWarningCode.NON_VOID_RETURN_FOR_SETTER,
-      StaticWarningCode.NON_VOID_RETURN_FOR_SETTER
-    ]);
-    verify([source]);
-  }
-
-  test_setterWithExplicitVoidType_returningVoid() async {
-    Source source = addSource(r'''
-void returnsVoid() {}
-class A {
-  void set f(String s) => returnsVoid();
-}
-void set g(int x) => returnsVoid();
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_setterWithNoVoidType() async {
-    Source source = addSource(r'''
-class A {
-  set f(String s) {
-    return '42';
-  }
-}
-set g(int x) => 42;
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      StaticTypeWarningCode.RETURN_OF_INVALID_TYPE,
-    ]);
-    verify([source]);
-  }
-
-  test_setterWithNoVoidType_returningVoid() async {
-    Source source = addSource(r'''
-void returnsVoid() {}
-class A {
-  set f(String s) => returnsVoid();
-}
-set g(int x) => returnsVoid();
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_setterWithOtherTypeIsError() async {
-    Source source = addSource(r'''
-class A {
-  String set f(String s) => null;
-}
-Object set g(x) => null;
-''');
-    await computeAnalysisResult(source);
-    assertErrors(source, [
-      StaticWarningCode.NON_VOID_RETURN_FOR_SETTER,
-      StaticWarningCode.NON_VOID_RETURN_FOR_SETTER
-    ]);
-    verify([source]);
-  }
-
-  test_ternaryOperator_null_left() async {
-    String code = r'''
-main() {
-  var foo = (true) ? null : 3;
-}
-''';
-    await resolveTestUnit(code);
-    expectInitializerType('foo', 'int');
-  }
-
-  test_ternaryOperator_null_right() async {
-    String code = r'''
-main() {
-  var foo = (true) ? 3 : null;
-}
-''';
-    await resolveTestUnit(code);
-    expectInitializerType('foo', 'int');
-  }
-
-  Future<void> _objectMethodOnFunctions_helper2(String code) async {
-    await resolveTestUnit(code);
-    expectIdentifierType('t0', "String");
-    expectIdentifierType('t1', "() → String");
-    expectIdentifierType('t2', "int");
-    expectIdentifierType('t3', "String");
-    expectIdentifierType('t4', "() → String");
-    expectIdentifierType('t5', "int");
-  }
-}
-
-abstract class StrongModeTypePropagationTest extends ResolverTestCase {
-  @override
-  void setUp() {
-    super.setUp();
-    AnalysisOptionsImpl options = new AnalysisOptionsImpl();
-    resetWith(options: options);
-  }
-
-  test_foreachInference_dynamic_disabled() async {
-    String code = r'''
-main() {
-  var list = <int>[];
-  for (dynamic v in list) {
-    v; // marker
-  }
-}''';
-    CompilationUnit unit = await resolveSource(code);
-    assertPropagatedIterationType(code, unit, typeProvider.dynamicType);
-    assertTypeOfMarkedExpression(code, unit, typeProvider.dynamicType);
-  }
-
-  test_foreachInference_reusedVar_disabled() async {
-    String code = r'''
-main() {
-  var list = <int>[];
-  var v;
-  for (v in list) {
-    v; // marker
-  }
-}''';
-    CompilationUnit unit = await resolveSource(code);
-    assertPropagatedIterationType(code, unit, typeProvider.dynamicType);
-    assertTypeOfMarkedExpression(code, unit, typeProvider.dynamicType);
-  }
-
-  test_foreachInference_var() async {
-    String code = r'''
-main() {
-  var list = <int>[];
-  for (var v in list) {
-    v; // marker
-  }
-}''';
-    CompilationUnit unit = await resolveSource(code);
-    assertPropagatedIterationType(code, unit, typeProvider.intType);
-    assertTypeOfMarkedExpression(code, unit, typeProvider.intType);
-  }
-
-  test_foreachInference_var_iterable() async {
-    String code = r'''
-main() {
-  Iterable<int> list = <int>[];
-  for (var v in list) {
-    v; // marker
-  }
-}''';
-    CompilationUnit unit = await resolveSource(code);
-    assertPropagatedIterationType(code, unit, typeProvider.intType);
-    assertTypeOfMarkedExpression(code, unit, typeProvider.intType);
-  }
-
-  test_foreachInference_var_stream() async {
-    String code = r'''
-import 'dart:async';
-main() async {
-  Stream<int> stream = null;
-  await for (var v in stream) {
-    v; // marker
-  }
-}''';
-    CompilationUnit unit = await resolveSource(code);
-    assertPropagatedIterationType(code, unit, typeProvider.intType);
-    assertTypeOfMarkedExpression(code, unit, typeProvider.intType);
-  }
-
-  test_inconsistentMethodInheritance_inferFunctionTypeFromTypedef() async {
-    Source source = addSource(r'''
-typedef bool F<E>(E argument);
-
-abstract class Base {
-  f<E extends int>(F<int> x);
-}
-
-abstract class BaseCopy extends Base {
-}
-
-abstract class Override implements Base, BaseCopy {
-  f<E extends int>(x) => null;
-}
-
-class C extends Override implements Base {}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
-  }
-
-  test_localVariableInference_bottom_disabled() async {
-    String code = r'''
-main() {
-  var v = null;
-  v; // marker
-}''';
-    CompilationUnit unit = await resolveSource(code);
-    assertAssignedType(code, unit, typeProvider.dynamicType);
-    assertTypeOfMarkedExpression(code, unit, typeProvider.dynamicType);
-  }
-
-  test_localVariableInference_constant() async {
-    String code = r'''
-main() {
-  var v = 3;
-  v; // marker
-}''';
-    CompilationUnit unit = await resolveSource(code);
-    assertAssignedType(code, unit, typeProvider.intType);
-    assertTypeOfMarkedExpression(code, unit, typeProvider.intType);
-  }
-
-  test_localVariableInference_declaredType_disabled() async {
-    String code = r'''
-main() {
-  dynamic v = 3;
-  v; // marker
-}''';
-    CompilationUnit unit = await resolveSource(code);
-    assertAssignedType(code, unit, typeProvider.dynamicType);
-    assertTypeOfMarkedExpression(code, unit, typeProvider.dynamicType);
-  }
-
-  test_localVariableInference_noInitializer_disabled() async {
-    String code = r'''
-main() {
-  var v;
-  v = 3;
-  v; // marker
-}''';
-    CompilationUnit unit = await resolveSource(code);
-    assertAssignedType(code, unit, typeProvider.dynamicType);
-    assertTypeOfMarkedExpression(code, unit, typeProvider.dynamicType);
-  }
-
-  test_localVariableInference_transitive_field_inferred_lexical() async {
-    String code = r'''
-class A {
-  final x = 3;
-  f() {
-    var v = x;
-    return v; // marker
-  }
-}
-main() {
-}
-''';
-    CompilationUnit unit = await resolveSource(code);
-    assertAssignedType(code, unit, typeProvider.intType);
-    assertTypeOfMarkedExpression(code, unit, typeProvider.intType);
-  }
-
-  test_localVariableInference_transitive_field_inferred_reversed() async {
-    String code = r'''
-class A {
-  f() {
-    var v = x;
-    return v; // marker
-  }
-  final x = 3;
-}
-main() {
-}
-''';
-    CompilationUnit unit = await resolveSource(code);
-    assertAssignedType(code, unit, typeProvider.intType);
-    assertTypeOfMarkedExpression(code, unit, typeProvider.intType);
-  }
-
-  test_localVariableInference_transitive_field_lexical() async {
-    String code = r'''
-class A {
-  int x = 3;
-  f() {
-    var v = x;
-    return v; // marker
-  }
-}
-main() {
-}
-''';
-    CompilationUnit unit = await resolveSource(code);
-    assertAssignedType(code, unit, typeProvider.intType);
-    assertTypeOfMarkedExpression(code, unit, typeProvider.intType);
-  }
-
-  test_localVariableInference_transitive_field_reversed() async {
-    String code = r'''
-class A {
-  f() {
-    var v = x;
-    return v; // marker
-  }
-  int x = 3;
-}
-main() {
-}
-''';
-    CompilationUnit unit = await resolveSource(code);
-    assertAssignedType(code, unit, typeProvider.intType);
-    assertTypeOfMarkedExpression(code, unit, typeProvider.intType);
-  }
-
-  test_localVariableInference_transitive_list_local() async {
-    String code = r'''
-main() {
-  var x = <int>[3];
-  var v = x[0];
-  v; // marker
-}''';
-    CompilationUnit unit = await resolveSource(code);
-    assertAssignedType(code, unit, typeProvider.intType);
-    assertTypeOfMarkedExpression(code, unit, typeProvider.intType);
-  }
-
-  test_localVariableInference_transitive_local() async {
-    String code = r'''
-main() {
-  var x = 3;
-  var v = x;
-  v; // marker
-}''';
-    CompilationUnit unit = await resolveSource(code);
-    assertAssignedType(code, unit, typeProvider.intType);
-    assertTypeOfMarkedExpression(code, unit, typeProvider.intType);
-  }
-
-  test_localVariableInference_transitive_toplevel_inferred_lexical() async {
-    String code = r'''
-final x = 3;
-main() {
-  var v = x;
-  v; // marker
-}
-''';
-    CompilationUnit unit = await resolveSource(code);
-    assertAssignedType(code, unit, typeProvider.intType);
-    assertTypeOfMarkedExpression(code, unit, typeProvider.intType);
-  }
-
-  test_localVariableInference_transitive_toplevel_inferred_reversed() async {
-    String code = r'''
-main() {
-  var v = x;
-  v; // marker
-}
-final x = 3;
-''';
-    CompilationUnit unit = await resolveSource(code);
-    assertAssignedType(code, unit, typeProvider.intType);
-    assertTypeOfMarkedExpression(code, unit, typeProvider.intType);
-  }
-
-  test_localVariableInference_transitive_toplevel_lexical() async {
-    String code = r'''
-int x = 3;
-main() {
-  var v = x;
-  v; // marker
-}
-''';
-    CompilationUnit unit = await resolveSource(code);
-    assertAssignedType(code, unit, typeProvider.intType);
-    assertTypeOfMarkedExpression(code, unit, typeProvider.intType);
-  }
-
-  test_localVariableInference_transitive_toplevel_reversed() async {
-    String code = r'''
-main() {
-  var v = x;
-  v; // marker
-}
-int x = 3;
-''';
-    CompilationUnit unit = await resolveSource(code);
-    assertAssignedType(code, unit, typeProvider.intType);
-    assertTypeOfMarkedExpression(code, unit, typeProvider.intType);
-  }
-}
diff --git a/pkg/analyzer/test/generated/strong_mode_driver_test.dart b/pkg/analyzer/test/generated/strong_mode_driver_test.dart
deleted file mode 100644
index c6047e6..0000000
--- a/pkg/analyzer/test/generated/strong_mode_driver_test.dart
+++ /dev/null
@@ -1,116 +0,0 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import 'resolver_test_case.dart';
-import 'strong_mode.dart';
-
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(StrongModeLocalInferenceTest_Driver);
-    defineReflectiveTests(StrongModeStaticTypeAnalyzer2Test_Driver);
-    defineReflectiveTests(StrongModeTypePropagationTest_Driver);
-  });
-}
-
-@reflectiveTest
-class StrongModeLocalInferenceTest_Driver extends StrongModeLocalInferenceTest {
-  @override
-  bool get enableNewAnalysisDriver => true;
-}
-
-@reflectiveTest
-class StrongModeStaticTypeAnalyzer2Test_Driver
-    extends StaticTypeAnalyzer2TestShared
-    with StrongModeStaticTypeAnalyzer2TestCases {
-  @override
-  bool get enableNewAnalysisDriver => true;
-
-  void setUp() {
-    super.setUp();
-    AnalysisOptionsImpl options = new AnalysisOptionsImpl();
-    resetWith(options: options);
-  }
-
-  @failingTest
-  @override
-  test_genericFunction_parameter() {
-    return super.test_genericFunction_parameter();
-  }
-
-  @failingTest
-  @override
-  test_genericMethod_functionExpressionInvocation_functionTypedParameter_explicit() {
-    return super
-        .test_genericMethod_functionExpressionInvocation_functionTypedParameter_explicit();
-  }
-
-  @failingTest
-  @override
-  test_genericMethod_functionExpressionInvocation_functionTypedParameter_inferred() {
-    return super
-        .test_genericMethod_functionExpressionInvocation_functionTypedParameter_inferred();
-  }
-
-  @failingTest
-  @override
-  test_genericMethod_functionInvocation_functionTypedParameter_explicit() {
-    return super
-        .test_genericMethod_functionInvocation_functionTypedParameter_explicit();
-  }
-
-  @failingTest
-  @override
-  test_genericMethod_functionInvocation_functionTypedParameter_inferred() {
-    return super
-        .test_genericMethod_functionInvocation_functionTypedParameter_inferred();
-  }
-
-  @failingTest
-  @override
-  test_genericMethod_functionTypedParameter_tearoff() {
-    return super.test_genericMethod_functionTypedParameter_tearoff();
-  }
-
-  @override
-  @failingTest
-  test_genericMethod_nestedCaptureBounds() {
-    // https://github.com/dart-lang/sdk/issues/30236
-    return super.test_genericMethod_nestedCaptureBounds();
-  }
-
-  @override
-  @failingTest
-  test_genericMethod_tearoff_instantiated() {
-    return super.test_genericMethod_tearoff_instantiated();
-  }
-
-  @override
-  @failingTest
-  test_instantiateToBounds_class_error_extension_malbounded() {
-    return super.test_instantiateToBounds_class_error_extension_malbounded();
-  }
-
-  @override
-  @failingTest
-  test_instantiateToBounds_class_error_instantiation_malbounded() {
-    return super
-        .test_instantiateToBounds_class_error_instantiation_malbounded();
-  }
-
-  @override
-  @failingTest
-  test_instantiateToBounds_generic_function_error_malbounded() {
-    return super.test_instantiateToBounds_generic_function_error_malbounded();
-  }
-}
-
-@reflectiveTest
-class StrongModeTypePropagationTest_Driver
-    extends StrongModeTypePropagationTest {
-  @override
-  bool get enableNewAnalysisDriver => true;
-}
diff --git a/pkg/analyzer/test/generated/strong_mode_test.dart b/pkg/analyzer/test/generated/strong_mode_test.dart
new file mode 100644
index 0000000..ae7258d
--- /dev/null
+++ b/pkg/analyzer/test/generated/strong_mode_test.dart
@@ -0,0 +1,5765 @@
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/standard_resolution_map.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/dart/element/element.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/generated/source_io.dart';
+import 'package:analyzer/src/task/strong/ast_properties.dart';
+import 'package:analyzer/src/test_utilities/find_node.dart';
+import 'package:front_end/src/base/errors.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../utils.dart';
+import 'resolver_test_case.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(StrongModeLocalInferenceTest);
+    defineReflectiveTests(StrongModeStaticTypeAnalyzer2Test);
+    defineReflectiveTests(StrongModeTypePropagationTest);
+    defineReflectiveTests(StrongModeCastsWithUiAsCodeTest);
+  });
+}
+
+@reflectiveTest
+class StrongModeCastsWithUiAsCodeTest extends ResolverTestCase {
+  @override
+  List<String> get enabledExperiments =>
+      [EnableString.spread_collections, EnableString.control_flow_collections];
+
+  test_implicitCastMetadata_ifElement_condition() async {
+    var source = addSource(r'''
+class C {
+  dynamic dyn;
+  Object object;
+  bool boolean;
+
+  void casts() {
+    [if (dyn) null];
+    [if (object) null];
+    <int>{if (dyn) null};
+    <int>{if (object) null};
+    <int, int>{if (dyn) null: null};
+    <int, int>{if (object) null: null};
+  }
+
+  void noCasts() {
+    [if (boolean) null];
+    [if (null) null];
+    <int>{if (dyn) null};
+    <int>{if (object) null};
+    <int, int>{if (boolean) null : null};
+    <int, int>{if (null) null : null};
+  }
+}
+''');
+    var unit = (await computeAnalysisResult(source)).unit;
+    assertNoErrors(source);
+
+    Expression getCondition(ExpressionStatement s) {
+      Expression expression = s.expression;
+      IfElement ifElement;
+      if (expression is ListLiteral) {
+        ifElement = expression.elements[0];
+      } else if (expression is SetOrMapLiteral) {
+        ifElement = expression.elements[0];
+      }
+      return ifElement.condition;
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'casts')) {
+      var expression = getCondition(s);
+      var castType = getImplicitCast(expression);
+      expect(castType, isNotNull,
+          reason: 'Expression $expression does not have implicit cast');
+      expect(castType.toString(), equals('bool'));
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'noCasts')) {
+      var expression = getCondition(s);
+      var spreadCastType = getImplicitSpreadCast(expression);
+      expect(spreadCastType, isNull,
+          reason: 'Expression $expression should not have implicit cast');
+    }
+  }
+
+  test_implicitCastMetadata_ifElement_list_branches() async {
+    var source = addSource(r'''
+class C {
+  bool c;
+  dynamic dyn;
+  Object object;
+  num someNum;
+  int someInt;
+
+  void casts() {
+    <num>[if (c) dyn];
+    <num>[if (c) object];
+    <int>[if (c) dyn];
+    <int>[if (c) object];
+    <int>[if (c) someNum];
+    <Null>[if (c) dyn];
+    <Null>[if (c) object];
+    <Null>[if (c) someNum];
+    <Null>[if (c) someInt];
+    <num>[if (c) dyn else dyn];
+    <num>[if (c) object else object];
+    <int>[if (c) dyn else dyn];
+    <int>[if (c) object else object];
+    <int>[if (c) someNum else someNum];
+    <Null>[if (c) dyn else dyn];
+    <Null>[if (c) object else object];
+    <Null>[if (c) someNum else someNum];
+    <Null>[if (c) someInt else someInt];
+  }
+
+  void noCasts() {
+    <dynamic>[if (c) dyn];
+    <dynamic>[if (c) object];
+    <dynamic>[if (c) someNum];
+    <dynamic>[if (c) someInt];
+    <dynamic>[if (c) null];
+    <Object>[if (c) dyn];
+    <Object>[if (c) object];
+    <Object>[if (c) someNum];
+    <Object>[if (c) someInt];
+    <Object>[if (c) null];
+    <num>[if (c) someNum];
+    <num>[if (c) someInt];
+    <num>[if (c) null];
+    <int>[if (c) someInt];
+    <int>[if (c) null];
+    <Null>[if (c) null];
+    <dynamic>[if (c) dyn else dyn];
+    <dynamic>[if (c) object else object];
+    <dynamic>[if (c) someNum else someNum];
+    <dynamic>[if (c) someInt else someInt];
+    <dynamic>[if (c) null else null];
+    <Object>[if (c) dyn else dyn];
+    <Object>[if (c) object else object];
+    <Object>[if (c) someNum else someNum];
+    <Object>[if (c) someInt else someInt];
+    <Object>[if (c) null else null];
+    <num>[if (c) someNum else someNum];
+    <num>[if (c) someInt else someInt];
+    <num>[if (c) null else null];
+    <int>[if (c) someInt else someInt];
+    <int>[if (c) null else null];
+    <Null>[if (c) null else null];
+  }
+}
+''');
+    var unit = (await computeAnalysisResult(source)).unit;
+    assertNoErrors(source);
+
+    List<Expression> getBranches(ExpressionStatement s) {
+      ListLiteral literal = s.expression;
+      IfElement ifElement = literal.elements[0];
+      return ifElement.elseElement == null
+          ? [ifElement.thenElement]
+          : [ifElement.thenElement, ifElement.elseElement];
+    }
+
+    DartType getListElementType(ExpressionStatement s) {
+      ListLiteral literal = s.expression;
+      return literal.typeArguments.arguments[0].type;
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'casts')) {
+      for (var expression in getBranches(s)) {
+        var castType = getImplicitCast(expression);
+        expect(castType, isNotNull,
+            reason: 'Expression $expression does not have implicit cast');
+        expect(castType, equals(getListElementType(s)));
+      }
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'noCasts')) {
+      for (var expression in getBranches(s)) {
+        var castType = getImplicitCast(expression);
+        expect(castType, isNull,
+            reason: 'Expression $expression should not have implicit cast');
+      }
+    }
+  }
+
+  test_implicitCastMetadata_ifElement_map_keys() async {
+    var source = addSource(r'''
+class C {
+  bool c;
+  dynamic dyn;
+  Object object;
+  num someNum;
+  int someInt;
+
+  void casts() {
+    <num, dynamic>{if (c) dyn: null};
+    <num, dynamic>{if (c) object: null};
+    <int, dynamic>{if (c) dyn: null};
+    <int, dynamic>{if (c) object: null};
+    <int, dynamic>{if (c) someNum: null};
+    <Null, dynamic>{if (c) dyn: null};
+    <Null, dynamic>{if (c) object: null};
+    <Null, dynamic>{if (c) someNum: null};
+    <Null, dynamic>{if (c) someInt: null};
+    <num, dynamic>{if (c) dyn: null else dyn: null};
+    <num, dynamic>{if (c) object: null else object: null};
+    <int, dynamic>{if (c) dyn: null else dyn: null};
+    <int, dynamic>{if (c) object: null else object: null};
+    <int, dynamic>{if (c) someNum: null else someNum: null};
+    <Null, dynamic>{if (c) dyn: null else dyn: null};
+    <Null, dynamic>{if (c) object: null else object: null};
+    <Null, dynamic>{if (c) someNum: null else someNum: null};
+    <Null, dynamic>{if (c) someInt: null else someInt: null};
+  }
+
+  void noCasts() {
+    <dynamic, dynamic>{if (c) dyn: null};
+    <dynamic, dynamic>{if (c) object: null};
+    <dynamic, dynamic>{if (c) someNum: null};
+    <dynamic, dynamic>{if (c) someInt: null};
+    <dynamic, dynamic>{if (c) null: null};
+    <Object, dynamic>{if (c) dyn: null};
+    <Object, dynamic>{if (c) object: null};
+    <Object, dynamic>{if (c) someNum: null};
+    <Object, dynamic>{if (c) someInt: null};
+    <Object, dynamic>{if (c) null: null};
+    <num, dynamic>{if (c) someNum: null};
+    <num, dynamic>{if (c) someInt: null};
+    <num, dynamic>{if (c) null: null};
+    <int, dynamic>{if (c) someInt: null};
+    <int, dynamic>{if (c) null: null};
+    <Null, dynamic>{if (c) null: null};
+    <dynamic, dynamic>{if (c) dyn: null else dyn: null};
+    <dynamic, dynamic>{if (c) object: null else object: null};
+    <dynamic, dynamic>{if (c) someNum: null else someNum: null};
+    <dynamic, dynamic>{if (c) someInt: null else someInt: null};
+    <dynamic, dynamic>{if (c) null: null else null: null};
+    <Object, dynamic>{if (c) dyn: null else dyn: null};
+    <Object, dynamic>{if (c) object: null else object: null};
+    <Object, dynamic>{if (c) someNum: null else someNum: null};
+    <Object, dynamic>{if (c) someInt: null else someInt: null};
+    <Object, dynamic>{if (c) null: null else null: null};
+    <num, dynamic>{if (c) someNum: null else someNum: null};
+    <num, dynamic>{if (c) someInt: null else someInt: null};
+    <num, dynamic>{if (c) null: null else null: null};
+    <int, dynamic>{if (c) someInt: null else someInt: null};
+    <int, dynamic>{if (c) null: null else null: null};
+    <Null, dynamic>{if (c) null: null else null: null};
+  }
+}
+''');
+    var unit = (await computeAnalysisResult(source)).unit;
+    assertNoErrors(source);
+
+    List<Expression> getKeys(ExpressionStatement s) {
+      SetOrMapLiteral literal = s.expression;
+      IfElement ifElement = literal.elements[0];
+      return (ifElement.elseElement == null
+              ? [ifElement.thenElement]
+              : [ifElement.thenElement, ifElement.elseElement])
+          .cast<MapLiteralEntry>()
+          .map((elem) => elem.key)
+          .toList();
+    }
+
+    DartType getMapKeyType(ExpressionStatement s) {
+      SetOrMapLiteral literal = s.expression;
+      return literal.typeArguments.arguments[0].type;
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'casts')) {
+      for (var expression in getKeys(s)) {
+        var castType = getImplicitCast(expression);
+        expect(castType, isNotNull,
+            reason: 'Expression $expression does not have implicit cast');
+        expect(castType, equals(getMapKeyType(s)));
+      }
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'noCasts')) {
+      for (var expression in getKeys(s)) {
+        var castType = getImplicitCast(expression);
+        expect(castType, isNull,
+            reason: 'Expression $expression should not have implicit cast');
+      }
+    }
+  }
+
+  test_implicitCastMetadata_ifElement_map_values() async {
+    var source = addSource(r'''
+class C {
+  bool c;
+  dynamic dyn;
+  Object object;
+  num someNum;
+  int someInt;
+
+  void casts() {
+    <dynamic, num>{if (c) null: dyn};
+    <dynamic, num>{if (c) null: object};
+    <dynamic, int>{if (c) null: dyn};
+    <dynamic, int>{if (c) null: object};
+    <dynamic, int>{if (c) null: someNum};
+    <dynamic, Null>{if (c) null: dyn};
+    <dynamic, Null>{if (c) null: object};
+    <dynamic, Null>{if (c) null: someNum};
+    <dynamic, Null>{if (c) null: someInt};
+    <dynamic, num>{if (c) null: dyn else null: dyn};
+    <dynamic, num>{if (c) null: object else null: object};
+    <dynamic, int>{if (c) null: dyn else null: dyn};
+    <dynamic, int>{if (c) null: object else null: object};
+    <dynamic, int>{if (c) null: someNum else null: someNum};
+    <dynamic, Null>{if (c) null: dyn else null: dyn};
+    <dynamic, Null>{if (c) null: object else null: object};
+    <dynamic, Null>{if (c) null: someNum else null: someNum};
+    <dynamic, Null>{if (c) null: someInt else null: someInt};
+  }
+
+  void noCasts() {
+    <dynamic, dynamic>{if (c) null: dyn};
+    <dynamic, dynamic>{if (c) null: object};
+    <dynamic, dynamic>{if (c) null: someNum};
+    <dynamic, dynamic>{if (c) null: someInt};
+    <dynamic, dynamic>{if (c) null: null};
+    <dynamic, Object>{if (c) null: dyn};
+    <dynamic, Object>{if (c) null: object};
+    <dynamic, Object>{if (c) null: someNum};
+    <dynamic, Object>{if (c) null: someInt};
+    <dynamic, Object>{if (c) null: null};
+    <dynamic, num>{if (c) null: someNum};
+    <dynamic, num>{if (c) null: someInt};
+    <dynamic, num>{if (c) null: null};
+    <dynamic, int>{if (c) null: someInt};
+    <dynamic, int>{if (c) null: null};
+    <dynamic, Null>{if (c) null: null};
+    <dynamic, dynamic>{if (c) null: dyn else null: dyn};
+    <dynamic, dynamic>{if (c) null: object else null: object};
+    <dynamic, dynamic>{if (c) null: someNum else null: someNum};
+    <dynamic, dynamic>{if (c) null: someInt else null: someInt};
+    <dynamic, dynamic>{if (c) null: null else null: null};
+    <dynamic, Object>{if (c) null: dyn else null: dyn};
+    <dynamic, Object>{if (c) null: object else null: object};
+    <dynamic, Object>{if (c) null: someNum else null: someNum};
+    <dynamic, Object>{if (c) null: someInt else null: someInt};
+    <dynamic, Object>{if (c) null: null else null: null};
+    <dynamic, num>{if (c) null: someNum else null: someNum};
+    <dynamic, num>{if (c) null: someInt else null: someInt};
+    <dynamic, num>{if (c) null: null else null: null};
+    <dynamic, int>{if (c) null: someInt else null: someInt};
+    <dynamic, int>{if (c) null: null else null: null};
+    <dynamic, Null>{if (c) null: null else null: null};
+  }
+}
+''');
+    var unit = (await computeAnalysisResult(source)).unit;
+    assertNoErrors(source);
+
+    List<Expression> getValues(ExpressionStatement s) {
+      SetOrMapLiteral literal = s.expression;
+      IfElement ifElement = literal.elements[0];
+      return (ifElement.elseElement == null
+              ? [ifElement.thenElement]
+              : [ifElement.thenElement, ifElement.elseElement])
+          .cast<MapLiteralEntry>()
+          .map((elem) => elem.value)
+          .toList();
+    }
+
+    DartType getMapValueType(ExpressionStatement s) {
+      SetOrMapLiteral literal = s.expression;
+      return literal.typeArguments.arguments[1].type;
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'casts')) {
+      for (var expression in getValues(s)) {
+        var castType = getImplicitCast(expression);
+        expect(castType, isNotNull,
+            reason: 'Expression $expression does not have implicit cast');
+        expect(castType, equals(getMapValueType(s)));
+      }
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'noCasts')) {
+      for (var expression in getValues(s)) {
+        var castType = getImplicitCast(expression);
+        expect(castType, isNull,
+            reason: 'Expression $expression should not have implicit cast');
+      }
+    }
+  }
+
+  test_implicitCastMetadata_ifElement_set_trueBranch() async {
+    var source = addSource(r'''
+class C {
+  bool c;
+  dynamic dyn;
+  Object object;
+  num someNum;
+  int someInt;
+
+  void casts() {
+    <num>{if (c) dyn};
+    <num>{if (c) object};
+    <int>{if (c) dyn};
+    <int>{if (c) object};
+    <int>{if (c) someNum};
+    <Null>{if (c) dyn};
+    <Null>{if (c) object};
+    <Null>{if (c) someNum};
+    <Null>{if (c) someInt};
+    <num>{if (c) dyn else dyn};
+    <num>{if (c) object else object};
+    <int>{if (c) dyn else dyn};
+    <int>{if (c) object else object};
+    <int>{if (c) someNum else someNum};
+    <Null>{if (c) dyn else dyn};
+    <Null>{if (c) object else object};
+    <Null>{if (c) someNum else someNum};
+    <Null>{if (c) someInt else someInt};
+  }
+
+  void noCasts() {
+    <dynamic>{if (c) dyn};
+    <dynamic>{if (c) object};
+    <dynamic>{if (c) someNum};
+    <dynamic>{if (c) someInt};
+    <dynamic>{if (c) null};
+    <Object>{if (c) dyn};
+    <Object>{if (c) object};
+    <Object>{if (c) someNum};
+    <Object>{if (c) someInt};
+    <Object>{if (c) null};
+    <num>{if (c) someNum};
+    <num>{if (c) someInt};
+    <num>{if (c) null};
+    <int>{if (c) someInt};
+    <int>{if (c) null};
+    <Null>{if (c) null};
+    <dynamic>{if (c) dyn else dyn};
+    <dynamic>{if (c) object else object};
+    <dynamic>{if (c) someNum else someNum};
+    <dynamic>{if (c) someInt else someInt};
+    <dynamic>{if (c) null else null};
+    <Object>{if (c) dyn else dyn};
+    <Object>{if (c) object else object};
+    <Object>{if (c) someNum else someNum};
+    <Object>{if (c) someInt else someInt};
+    <Object>{if (c) null else null};
+    <num>{if (c) someNum else someNum};
+    <num>{if (c) someInt else someInt};
+    <num>{if (c) null else null};
+    <int>{if (c) someInt else someInt};
+    <int>{if (c) null else null};
+    <Null>{if (c) null else null};
+ }
+}
+''');
+    var unit = (await computeAnalysisResult(source)).unit;
+    assertNoErrors(source);
+
+    List<Expression> getBranches(ExpressionStatement s) {
+      SetOrMapLiteral literal = s.expression;
+      IfElement ifElement = literal.elements[0];
+      return ifElement.elseElement == null
+          ? [ifElement.thenElement]
+          : [ifElement.thenElement, ifElement.elseElement];
+    }
+
+    DartType getSetElementType(ExpressionStatement s) {
+      SetOrMapLiteral literal = s.expression;
+      return literal.typeArguments.arguments[0].type;
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'casts')) {
+      for (var expression in getBranches(s)) {
+        var castType = getImplicitCast(expression);
+        expect(castType, isNotNull,
+            reason: 'Expression $expression does not have implicit cast');
+        expect(castType, equals(getSetElementType(s)));
+      }
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'noCasts')) {
+      for (var expression in getBranches(s)) {
+        var castType = getImplicitCast(expression);
+        expect(castType, isNull,
+            reason: 'Expression $expression should not have implicit cast');
+      }
+    }
+  }
+
+  test_implicitCastMetadata_spread_list_elements() async {
+    var source = addSource(r'''
+class C {
+  dynamic dyn;
+  Iterable<int> iInt;
+  Iterable<Object> iObject;
+  Iterable<dynamic> iDynamic;
+  Iterable<Null> iNull;
+  List<int> lInt;
+  List<Object> lObject;
+  List<dynamic> lDynamic;
+  List<Null> lNull;
+
+  void casts() {
+    <int>[...dyn];
+    <num>[...dyn];
+    <int>[...iObject];
+    <int>[...iDynamic];
+    <int>[...lObject];
+    <int>[...lDynamic];
+    <Null>[...dyn];
+    <Null>[...iObject];
+    <Null>[...iDynamic];
+    <Null>[...iInt];
+    <Null>[...lObject];
+    <Null>[...lDynamic];
+    <Null>[...lInt];
+  }
+
+  void noCasts() {
+    [...dyn];
+    <dynamic>[...dyn];
+    <Object>[...dyn];
+    <dynamic>[...iInt];
+    <Object>[...iInt];
+    <Object>[...iNull];
+    <dynamic>[...lInt];
+    <Object>[...lInt];
+    <Object>[...lNull];
+    <dynamic>[...iObject];
+    <Object>[...iObject];
+    <Object>[...iNull];
+    <dynamic>[...lObject];
+    <Object>[...lObject];
+    <Object>[...lNull];
+    <dynamic>[...iDynamic];
+    <Object>[...iDynamic];
+    <Object>[...iNull];
+    <dynamic>[...lDynamic];
+    <Object>[...lDynamic];
+    <Object>[...lNull];
+    <num>[...iInt];
+    <num>[...lInt];
+    <num>[...iNull];
+    <num>[...lNull];
+    <int>[...iInt];
+    <int>[...lInt];
+    <int>[...iNull];
+    <int>[...lNull];
+    <Null>[...iNull];
+    <Null>[...lNull];
+  }
+}
+''');
+    var unit = (await computeAnalysisResult(source)).unit;
+    assertNoErrors(source);
+
+    Expression getSpreadExpression(ExpressionStatement s) {
+      ListLiteral literal = s.expression;
+      SpreadElement spread = literal.elements[0];
+      return spread.expression;
+    }
+
+    DartType getListElementType(ExpressionStatement s) {
+      ListLiteral literal = s.expression;
+      return literal.typeArguments.arguments[0].type;
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'casts')) {
+      var expression = getSpreadExpression(s);
+      var spreadCastType = getImplicitSpreadCast(expression);
+      expect(spreadCastType, isNotNull,
+          reason: 'Expression $expression does not have implicit cast');
+      expect(spreadCastType, equals(getListElementType(s)));
+    }
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'noCasts')) {
+      var expression = getSpreadExpression(s);
+      var spreadCastType = getImplicitSpreadCast(expression);
+      expect(spreadCastType, isNull,
+          reason: 'Expression $expression should not have implicit cast');
+    }
+  }
+
+  test_implicitCastMetadata_spread_list_iterable() async {
+    var source = addSource(r'''
+class C {
+  dynamic dyn;
+  Iterable<int> iInt;
+  Iterable<Object> iObject;
+  Iterable<dynamic> iDynamic;
+  Iterable<Null> iNull;
+  List<int> lInt;
+  List<Object> lObject;
+  List<dynamic> lDynamic;
+  List<Null> lNull;
+
+  void casts() {
+    [...dyn];
+    <int>[...dyn];
+    <num>[...dyn];
+  }
+
+  void noCasts() {
+    [...iInt];
+    [...iObject];
+    [...iDynamic];
+    [...iNull];
+    <Null>[...iInt];
+    <Null>[...iObject];
+    <Null>[...iDynamic];
+    <Null>[...iNull];
+    <int>[...iInt];
+    <int>[...iObject];
+    <int>[...iDynamic];
+    <int>[...iNull];
+    [...lInt];
+    [...lObject];
+    [...lDynamic];
+    [...lNull];
+    <Null>[...lInt];
+    <Null>[...lObject];
+    <Null>[...lDynamic];
+    <Null>[...lNull];
+    <int>[...lInt];
+    <int>[...lObject];
+    <int>[...lDynamic];
+    <int>[...lNull];
+  }
+}
+''');
+    var unit = (await computeAnalysisResult(source)).unit;
+    assertNoErrors(source);
+
+    Expression getSpreadExpression(ExpressionStatement e) {
+      ListLiteral expression = e.expression;
+      SpreadElement spread = expression.elements[0];
+      return spread.expression;
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'casts')) {
+      var expression = getSpreadExpression(s);
+      var spreadCastType = getImplicitCast(expression);
+      expect(spreadCastType, isNotNull,
+          reason: 'Expression $expression does not have implicit cast');
+      expect(spreadCastType.toString(), equals('Iterable<dynamic>'));
+    }
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'noCasts')) {
+      var expression = getSpreadExpression(s);
+      var spreadCastType = getImplicitCast(expression);
+      expect(spreadCastType, isNull,
+          reason: 'Expression $expression should not have implicit cast');
+    }
+  }
+
+  test_implicitCastMetadata_spread_map_keys() async {
+    var source = addSource(r'''
+abstract class HashMap<K, V> implements Map<K, V> {}
+class C {
+  dynamic dyn;
+  Map<int, dynamic> mIntDynamic;
+  Map<Object, dynamic> mObjectDynamic;
+  Map<dynamic, dynamic> mDynamicDynamic;
+  Map<Null, dynamic> mNullDynamic;
+  HashMap<int, dynamic> hIntDynamic;
+  HashMap<Object, dynamic> hObjectDynamic;
+  HashMap<dynamic, dynamic> hDynamicDynamic;
+  HashMap<Null, dynamic> hNullDynamic;
+
+  void casts() {
+    Map m0 = <int, dynamic>{...dyn};
+    Map m1 = <num, dynamic>{...dyn};
+    Map m2 = <int, dynamic>{...mObjectDynamic};
+    Map m3 = <int, dynamic>{...mDynamicDynamic};
+    Map m4 = <int, dynamic>{...hObjectDynamic};
+    Map m5 = <int, dynamic>{...hDynamicDynamic};
+    Map m6 = <Null, dynamic>{...dyn};
+    Map m7 = <Null, dynamic>{...mObjectDynamic};
+    Map m8 = <Null, dynamic>{...mDynamicDynamic};
+    Map m9 = <Null, dynamic>{...mIntDynamic};
+    Map m10 = <Null, dynamic>{...hObjectDynamic};
+    Map m11 = <Null, dynamic>{...hDynamicDynamic};
+    Map m12 = <Null, dynamic>{...hIntDynamic};
+  }
+
+  void noCasts() {
+    Map m0 = {...dyn};
+    Map m1 = <dynamic, dynamic>{...dyn};
+    Map m2 = <Object, dynamic>{...dyn};
+    Map m3 = <dynamic, dynamic>{...mIntDynamic};
+    Map m4 = <Object, dynamic>{...mIntDynamic};
+    Map m5 = <Object, dynamic>{...mNullDynamic};
+    Map m6 = <dynamic, dynamic>{...hIntDynamic};
+    Map m7 = <Object, dynamic>{...hIntDynamic};
+    Map m8 = <Object, dynamic>{...hNullDynamic};
+    Map m9 = <dynamic, dynamic>{...mObjectDynamic};
+    Map m10 = <Object, dynamic>{...mObjectDynamic};
+    Map m11 = <Object, dynamic>{...mNullDynamic};
+    Map m12 = <dynamic, dynamic>{...hObjectDynamic};
+    Map m13 = <Object, dynamic>{...hObjectDynamic};
+    Map m14 = <Object, dynamic>{...hNullDynamic};
+    Map m15 = <dynamic, dynamic>{...mDynamicDynamic};
+    Map m16 = <Object, dynamic>{...mDynamicDynamic};
+    Map m17 = <Object, dynamic>{...mNullDynamic};
+    Map m18 = <dynamic, dynamic>{...hDynamicDynamic};
+    Map m19 = <Object, dynamic>{...hDynamicDynamic};
+    Map m20 = <Object, dynamic>{...hNullDynamic};
+    Map m21 = <num, dynamic>{...mIntDynamic};
+    Map m22 = <num, dynamic>{...hIntDynamic};
+    Map m23 = <num, dynamic>{...mNullDynamic};
+    Map m24 = <num, dynamic>{...hNullDynamic};
+    Map m25 = <int, dynamic>{...hIntDynamic};
+    Map m26 = <int, dynamic>{...mIntDynamic};
+    Map m27 = <int, dynamic>{...mNullDynamic};
+    Map m28 = <int, dynamic>{...hNullDynamic};
+    Map m29 = <Null, dynamic>{...mNullDynamic};
+    Map m30 = <Null, dynamic>{...hNullDynamic};
+ }
+}
+''');
+    var unit = (await computeAnalysisResult(source)).unit;
+    assertNoErrors(source);
+
+    Expression getSpreadExpression(VariableDeclarationStatement s) {
+      VariableDeclaration declaration = s.variables.variables[0];
+      SetOrMapLiteral literal = declaration.initializer;
+      SpreadElement spread = literal.elements[0];
+      return spread.expression;
+    }
+
+    DartType getSetElementType(VariableDeclarationStatement s) {
+      VariableDeclaration declaration = s.variables.variables[0];
+      SetOrMapLiteral literal = declaration.initializer;
+      return literal.typeArguments.arguments[0].type;
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'casts')) {
+      var expression = getSpreadExpression(s);
+      var spreadCastType = getImplicitSpreadKeyCast(expression);
+      expect(spreadCastType, isNotNull,
+          reason: 'Expression $expression does not have implicit cast');
+      expect(spreadCastType, equals(getSetElementType(s)));
+    }
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'noCasts')) {
+      var expression = getSpreadExpression(s);
+      var spreadCastType = getImplicitSpreadKeyCast(expression);
+      expect(spreadCastType, isNull,
+          reason: 'Expression $expression should not have implicit cast');
+    }
+  }
+
+  test_implicitCastMetadata_spread_map_map() async {
+    var source = addSource(r'''
+abstract class HashMap<K, V> implements Map<K, V> {}
+class C {
+  dynamic dyn;
+  Map<int, int> mIntInt;
+  Map<int, Object> mIntObject;
+  Map<Object, int> mObjectInt;
+  Map<Object, Object> mObjectObject;
+  Map<dynamic, dynamic> mDynamicDynamic;
+  Map<Null, Null> mNullNull;
+  Map<Object, Null> mObjectNull;
+  Map<Null, Object> mNullObject;
+  HashMap<int, int> hIntInt;
+  HashMap<int, Object> hIntObject;
+  HashMap<Object, int> hObjectInt;
+  HashMap<Object, Object> hObjectObject;
+  HashMap<dynamic, dynamic> hDynamicDynamic;
+  HashMap<Null, Null> hNullNull;
+
+  void casts() {
+    Map m0 = {...dyn};
+    Map m1 = <int, int>{...dyn};
+    Map m2 = <num, int>{...dyn};
+    Map m3 = <int, num>{...dyn};
+    Map m4 = <num, num>{...dyn};
+  }
+
+  void noCasts() {
+    Map m0 = {...mIntInt};
+    Map m1 = {...mIntObject};
+    Map m2 = {...mObjectInt};
+    Map m3 = {...mObjectObject};
+    Map m4 = {...mDynamicDynamic};
+    Map m5 = {...mNullObject};
+    Map m6 = {...mObjectNull};
+    Map m7 = {...mNullNull};
+    Map m8 = <Null, Null>{...mIntInt};
+    Map m9 = <Null, Null>{...mObjectObject};
+    Map m10 = <Null, Null>{...mDynamicDynamic};
+    Map m11 = <Null, Null>{...mNullNull};
+    Map m12 = <int, int>{...mIntInt};
+    Map m13 = <int, int>{...mObjectObject};
+    Map m14 = <int, int>{...mDynamicDynamic};
+    Map m15 = <int, int>{...mNullNull};
+    Map m16 = {...hIntInt};
+    Map m17 = {...hObjectObject};
+    Map m18 = {...hDynamicDynamic};
+    Map m19 = {...hNullNull};
+    Map m20 = <Null, Null>{...hIntInt};
+    Map m21 = <Null, Null>{...hObjectObject};
+    Map m22 = <Null, Null>{...hDynamicDynamic};
+    Map m23 = <Null, Null>{...hNullNull};
+    Map m24 = <int, int>{...hIntInt};
+    Map m25 = <int, int>{...hObjectObject};
+    Map m26 = <int, int>{...hDynamicDynamic};
+    Map m27 = <int, int>{...hNullNull};
+  }
+}
+''');
+    var unit = (await computeAnalysisResult(source)).unit;
+    assertNoErrors(source);
+
+    Expression getSpreadExpression(VariableDeclarationStatement s) {
+      VariableDeclaration declaration = s.variables.variables[0];
+      SetOrMapLiteral literal = declaration.initializer;
+      SpreadElement spread = literal.elements[0];
+      return spread.expression;
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'casts')) {
+      var expression = getSpreadExpression(s);
+      var spreadCastType = getImplicitCast(expression);
+      expect(spreadCastType, isNotNull,
+          reason: 'Expression $expression does not have implicit cast');
+      expect(spreadCastType.toString(), equals('Map<dynamic, dynamic>'));
+    }
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'noCasts')) {
+      var expression = getSpreadExpression(s);
+      var spreadCastType = getImplicitCast(expression);
+      expect(spreadCastType, isNull,
+          reason: 'Expression $expression should not have implicit cast');
+    }
+  }
+
+  test_implicitCastMetadata_spread_map_values() async {
+    var source = addSource(r'''
+abstract class HashMap<K, V> implements Map<K, V> {}
+class C {
+  dynamic dyn;
+  Map<dynamic, int> mDynamicInt;
+  Map<dynamic, Object> mDynamicObject;
+  Map<dynamic, dynamic> mDynamicDynamic;
+  Map<dynamic, Null> mDynamicNull;
+  HashMap<dynamic, int> hDynamicInt;
+  HashMap<dynamic, Object> hDynamicObject;
+  HashMap<dynamic, dynamic> hDynamicDynamic;
+  HashMap<dynamic, Null> hDynamicNull;
+
+  void casts() {
+    Map m0 = <dynamic, int>{...dyn};
+    Map m1 = <dynamic, num>{...dyn};
+    Map m2 = <dynamic, int>{...mDynamicObject};
+    Map m3 = <dynamic, int>{...mDynamicDynamic};
+    Map m4 = <dynamic, int>{...hDynamicObject};
+    Map m5 = <dynamic, int>{...hDynamicDynamic};
+    Map m6 = <dynamic, Null>{...dyn};
+    Map m7 = <dynamic, Null>{...mDynamicObject};
+    Map m8 = <dynamic, Null>{...mDynamicDynamic};
+    Map m9 = <dynamic, Null>{...mDynamicInt};
+    Map m10 = <dynamic, Null>{...hDynamicObject};
+    Map m11 = <dynamic, Null>{...hDynamicDynamic};
+    Map m12 = <dynamic, Null>{...hDynamicInt};
+  }
+
+  void noCasts() {
+    Map m0 = {...dyn};
+    Map m1 = <dynamic, dynamic>{...dyn};
+    Map m2 = <dynamic, Object>{...dyn};
+    Map m3 = <dynamic, dynamic>{...mDynamicInt};
+    Map m4 = <dynamic, Object>{...mDynamicInt};
+    Map m5 = <dynamic, Object>{...mDynamicNull};
+    Map m6 = <dynamic, dynamic>{...hDynamicInt};
+    Map m7 = <dynamic, Object>{...hDynamicInt};
+    Map m8 = <dynamic, Object>{...hDynamicNull};
+    Map m9 = <dynamic, dynamic>{...mDynamicObject};
+    Map m10 = <dynamic, Object>{...mDynamicObject};
+    Map m11 = <dynamic, Object>{...mDynamicNull};
+    Map m12 = <dynamic, dynamic>{...hDynamicObject};
+    Map m13 = <dynamic, Object>{...hDynamicObject};
+    Map m14 = <dynamic, Object>{...hDynamicNull};
+    Map m15 = <dynamic, dynamic>{...mDynamicDynamic};
+    Map m16 = <dynamic, Object>{...mDynamicDynamic};
+    Map m17 = <dynamic, Object>{...mDynamicNull};
+    Map m18 = <dynamic, dynamic>{...hDynamicDynamic};
+    Map m19 = <dynamic, Object>{...hDynamicDynamic};
+    Map m20 = <dynamic, Object>{...hDynamicNull};
+    Map m21 = <dynamic, num>{...mDynamicInt};
+    Map m22 = <dynamic, num>{...hDynamicInt};
+    Map m23 = <dynamic, num>{...mDynamicNull};
+    Map m24 = <dynamic, num>{...hDynamicNull};
+    Map m25 = <dynamic, int>{...hDynamicInt};
+    Map m26 = <dynamic, int>{...mDynamicInt};
+    Map m27 = <dynamic, int>{...mDynamicNull};
+    Map m28 = <dynamic, int>{...hDynamicNull};
+    Map m29 = <dynamic, Null>{...mDynamicNull};
+    Map m30 = <dynamic, Null>{...hDynamicNull};
+ }
+}
+''');
+    var unit = (await computeAnalysisResult(source)).unit;
+    assertNoErrors(source);
+
+    Expression getSpreadExpression(VariableDeclarationStatement s) {
+      VariableDeclaration declaration = s.variables.variables[0];
+      SetOrMapLiteral literal = declaration.initializer;
+      SpreadElement spread = literal.elements[0];
+      return spread.expression;
+    }
+
+    DartType getValueType(VariableDeclarationStatement s) {
+      VariableDeclaration declaration = s.variables.variables[0];
+      SetOrMapLiteral literal = declaration.initializer;
+      return literal.typeArguments.arguments[1].type;
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'casts')) {
+      var expression = getSpreadExpression(s);
+      var spreadCastType = getImplicitSpreadValueCast(expression);
+      expect(spreadCastType, isNotNull,
+          reason: 'Expression $expression does not have implicit cast');
+      expect(spreadCastType, equals(getValueType(s)));
+    }
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'noCasts')) {
+      var expression = getSpreadExpression(s);
+      var spreadCastType = getImplicitSpreadValueCast(expression);
+      expect(spreadCastType, isNull,
+          reason: 'Expression $expression should not have implicit cast');
+    }
+  }
+
+  test_implicitCastMetadata_spread_set_elements() async {
+    var source = addSource(r'''
+class C {
+  dynamic dyn;
+  Iterable<int> iInt;
+  Iterable<Object> iObject;
+  Iterable<dynamic> iDynamic;
+  Iterable<Null> iNull;
+  List<int> lInt;
+  List<Object> lObject;
+  List<dynamic> lDynamic;
+  List<Null> lNull;
+
+  void casts() {
+    Set s0 = <int>{...dyn};
+    Set s1 = <num>{...dyn};
+    Set s2 = <int>{...iObject};
+    Set s3 = <int>{...iDynamic};
+    Set s4 = <int>{...lObject};
+    Set s5 = <int>{...lDynamic};
+    Set s6 = <Null>{...dyn};
+    Set s7 = <Null>{...iObject};
+    Set s8 = <Null>{...iDynamic};
+    Set s9 = <Null>{...iInt};
+    Set s10 = <Null>{...lObject};
+    Set s11 = <Null>{...lDynamic};
+    Set s12 = <Null>{...lInt};
+  }
+
+  void noCasts() {
+    Set s0 = {...dyn};
+    Set s1 = <dynamic>{...dyn};
+    Set s2 = <Object>{...dyn};
+    Set s3 = <dynamic>{...iInt};
+    Set s4 = <Object>{...iInt};
+    Set s5 = <Object>{...iNull};
+    Set s6 = <dynamic>{...lInt};
+    Set s7 = <Object>{...lInt};
+    Set s8 = <Object>{...lNull};
+    Set s9 = <dynamic>{...iObject};
+    Set s10 = <Object>{...iObject};
+    Set s11 = <Object>{...iNull};
+    Set s12 = <dynamic>{...lObject};
+    Set s13 = <Object>{...lObject};
+    Set s14 = <Object>{...lNull};
+    Set s15 = <dynamic>{...iDynamic};
+    Set s16 = <Object>{...iDynamic};
+    Set s17 = <Object>{...iNull};
+    Set s18 = <dynamic>{...lDynamic};
+    Set s19 = <Object>{...lDynamic};
+    Set s20 = <Object>{...lNull};
+    Set s21 = <num>{...iInt};
+    Set s22 = <num>{...lInt};
+    Set s23 = <num>{...iNull};
+    Set s24 = <num>{...lNull};
+    Set s25 = <int>{...iInt};
+    Set s26 = <int>{...lInt};
+    Set s27 = <int>{...iNull};
+    Set s28 = <int>{...lNull};
+    Set s29 = <Null>{...iNull};
+    Set s30 = <Null>{...lNull};
+  }
+}
+''');
+    var unit = (await computeAnalysisResult(source)).unit;
+    assertNoErrors(source);
+
+    Expression getSpreadExpression(VariableDeclarationStatement s) {
+      VariableDeclaration declaration = s.variables.variables[0];
+      SetOrMapLiteral literal = declaration.initializer;
+      SpreadElement spread = literal.elements[0];
+      return spread.expression;
+    }
+
+    DartType getKeyType(VariableDeclarationStatement s) {
+      VariableDeclaration declaration = s.variables.variables[0];
+      SetOrMapLiteral literal = declaration.initializer;
+      return literal.typeArguments.arguments[0].type;
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'casts')) {
+      var expression = getSpreadExpression(s);
+      var spreadCastType = getImplicitSpreadCast(expression);
+      expect(spreadCastType, isNotNull,
+          reason: 'Expression $expression does not have implicit cast');
+      expect(spreadCastType, equals(getKeyType(s)));
+    }
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'noCasts')) {
+      var expression = getSpreadExpression(s);
+      var spreadCastType = getImplicitSpreadCast(expression);
+      expect(spreadCastType, isNull,
+          reason: 'Expression $expression should not have implicit cast');
+    }
+  }
+
+  test_implicitCastMetadata_spread_set_iterable() async {
+    var source = addSource(r'''
+class C {
+  dynamic dyn;
+  Iterable<int> iInt;
+  Iterable<Object> iObject;
+  Iterable<dynamic> iDynamic;
+  Iterable<Null> iNull;
+  List<int> lInt;
+  List<Object> lObject;
+  List<dynamic> lDynamic;
+  List<Null> lNull;
+
+  void casts() {
+    Set s0 = {...dyn};
+    Set s1 = <int>{...dyn};
+    Set s2 = <num>{...dyn};
+  }
+
+  void noCasts() {
+    Set s0 = {...iInt};
+    Set s1 = {...iObject};
+    Set s2 = {...iDynamic};
+    Set s3 = {...iNull};
+    Set s4 = <Null>{...iInt};
+    Set s5 = <Null>{...iObject};
+    Set s6 = <Null>{...iDynamic};
+    Set s7 = <Null>{...iNull};
+    Set s8 = <int>{...iInt};
+    Set s9 = <int>{...iObject};
+    Set s10 = <int>{...iDynamic};
+    Set s11 = <int>{...iNull};
+    Set s12 = {...lInt};
+    Set s13 = {...lObject};
+    Set s14 = {...lDynamic};
+    Set s15 = {...lNull};
+    Set s16 = <Null>{...lInt};
+    Set s17 = <Null>{...lObject};
+    Set s18 = <Null>{...lDynamic};
+    Set s19 = <Null>{...lNull};
+    Set s20 = <int>{...lInt};
+    Set s21 = <int>{...lObject};
+    Set s22 = <int>{...lDynamic};
+  }
+}
+''');
+    var unit = (await computeAnalysisResult(source)).unit;
+    assertNoErrors(source);
+
+    Expression getSpreadExpression(VariableDeclarationStatement s) {
+      VariableDeclaration declaration = s.variables.variables[0];
+      SetOrMapLiteral literal = declaration.initializer;
+      SpreadElement spread = literal.elements[0];
+      return spread.expression;
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'casts')) {
+      var expression = getSpreadExpression(s);
+      var spreadCastType = getImplicitCast(expression);
+      expect(spreadCastType, isNotNull,
+          reason: 'Expression $expression does not have implicit cast');
+      expect(spreadCastType.toString(), equals('Iterable<dynamic>'));
+    }
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'noCasts')) {
+      var expression = getSpreadExpression(s);
+      var spreadCastType = getImplicitCast(expression);
+      expect(spreadCastType, isNull,
+          reason: 'Expression $expression should not have implicit cast');
+    }
+  }
+}
+
+/// Strong mode static analyzer local type inference tests
+@reflectiveTest
+class StrongModeLocalInferenceTest extends ResolverTestCase {
+  TypeAssertions _assertions;
+
+  Asserter<DartType> _isDynamic;
+  Asserter<InterfaceType> _isFutureOfDynamic;
+  Asserter<InterfaceType> _isFutureOfInt;
+  Asserter<InterfaceType> _isFutureOfNull;
+  Asserter<InterfaceType> _isFutureOrOfInt;
+  Asserter<DartType> _isInt;
+  Asserter<DartType> _isNull;
+  Asserter<DartType> _isNum;
+  Asserter<DartType> _isObject;
+  Asserter<DartType> _isString;
+
+  AsserterBuilder2<Asserter<DartType>, Asserter<DartType>, DartType>
+      _isFunction2Of;
+  AsserterBuilder<List<Asserter<DartType>>, InterfaceType> _isFutureOf;
+  AsserterBuilder<List<Asserter<DartType>>, InterfaceType> _isFutureOrOf;
+  AsserterBuilderBuilder<Asserter<DartType>, List<Asserter<DartType>>, DartType>
+      _isInstantiationOf;
+  AsserterBuilder<Asserter<DartType>, InterfaceType> _isListOf;
+  AsserterBuilder2<Asserter<DartType>, Asserter<DartType>, InterfaceType>
+      _isMapOf;
+  AsserterBuilder<List<Asserter<DartType>>, InterfaceType> _isStreamOf;
+  AsserterBuilder<DartType, DartType> _isType;
+
+  AsserterBuilder<Element, DartType> _hasElement;
+  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;
+      _isNull = _assertions.isNull;
+      _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));
+      _isFutureOrOf =
+          _isInstantiationOf(_hasElementOf(typeProvider.futureOrType));
+      _isFutureOfDynamic = _isFutureOf([_isDynamic]);
+      _isFutureOfInt = _isFutureOf([_isInt]);
+      _isFutureOfNull = _isFutureOf([_isNull]);
+      _isFutureOrOfInt = _isFutureOrOf([_isInt]);
+      _isStreamOf = _isInstantiationOf(_hasElementOf(typeProvider.streamType));
+    }
+    return result;
+  }
+
+  @override
+  void setUp() {
+    super.setUp();
+    AnalysisOptionsImpl options = new AnalysisOptionsImpl();
+    resetWith(options: options);
+  }
+
+  test_async_method_propagation() async {
+    String code = r'''
+      import "dart:async";
+      class A {
+        Future f0() => new Future.value(3);
+        Future f1() async => new Future.value(3);
+        Future f2() async => await new Future.value(3);
+
+        Future<int> f3() => new Future.value(3);
+        Future<int> f4() async => new Future.value(3);
+        Future<int> f5() async => await new Future.value(3);
+
+        Future g0() { return new Future.value(3); }
+        Future g1() async { return new Future.value(3); }
+        Future g2() async { return await new Future.value(3); }
+
+        Future<int> g3() { return new Future.value(3); }
+        Future<int> g4() async { return new Future.value(3); }
+        Future<int> g5() async { return await new Future.value(3); }
+      }
+   ''';
+    CompilationUnit unit = await resolveSource(code);
+
+    void check(String name, Asserter<InterfaceType> typeTest) {
+      MethodDeclaration test = AstFinder.getMethodInClass(unit, "A", name);
+      FunctionBody body = test.body;
+      Expression returnExp;
+      if (body is ExpressionFunctionBody) {
+        returnExp = body.expression;
+      } else {
+        ReturnStatement stmt = (body as BlockFunctionBody).block.statements[0];
+        returnExp = stmt.expression;
+      }
+      DartType type = returnExp.staticType;
+      if (returnExp is AwaitExpression) {
+        type = returnExp.expression.staticType;
+      }
+      typeTest(type);
+    }
+
+    check("f0", _isFutureOfDynamic);
+    check("f1", _isFutureOfDynamic);
+    check("f2", _isFutureOfDynamic);
+
+    check("f3", _isFutureOfInt);
+    check("f4", _isFutureOfInt);
+    check("f5", _isFutureOfInt);
+
+    check("g0", _isFutureOfDynamic);
+    check("g1", _isFutureOfDynamic);
+    check("g2", _isFutureOfDynamic);
+
+    check("g3", _isFutureOfInt);
+    check("g4", _isFutureOfInt);
+    check("g5", _isFutureOfInt);
+  }
+
+  test_async_propagation() async {
+    String code = r'''
+      import "dart:async";
+
+      Future f0() => new Future.value(3);
+      Future f1() async => new Future.value(3);
+      Future f2() async => await new Future.value(3);
+
+      Future<int> f3() => new Future.value(3);
+      Future<int> f4() async => new Future.value(3);
+      Future<int> f5() async => await new Future.value(3);
+
+      Future g0() { return new Future.value(3); }
+      Future g1() async { return new Future.value(3); }
+      Future g2() async { return await new Future.value(3); }
+
+      Future<int> g3() { return new Future.value(3); }
+      Future<int> g4() async { return new Future.value(3); }
+      Future<int> g5() async { return await new Future.value(3); }
+   ''';
+    CompilationUnit unit = await resolveSource(code);
+
+    void check(String name, Asserter<InterfaceType> typeTest) {
+      FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, name);
+      FunctionBody body = test.functionExpression.body;
+      Expression returnExp;
+      if (body is ExpressionFunctionBody) {
+        returnExp = body.expression;
+      } else {
+        ReturnStatement stmt = (body as BlockFunctionBody).block.statements[0];
+        returnExp = stmt.expression;
+      }
+      DartType type = returnExp.staticType;
+      if (returnExp is AwaitExpression) {
+        type = returnExp.expression.staticType;
+      }
+      typeTest(type);
+    }
+
+    check("f0", _isFutureOfDynamic);
+    check("f1", _isFutureOfDynamic);
+    check("f2", _isFutureOfDynamic);
+
+    check("f3", _isFutureOfInt);
+    check("f4", _isFutureOfInt);
+    check("f5", _isFutureOfInt);
+
+    check("g0", _isFutureOfDynamic);
+    check("g1", _isFutureOfDynamic);
+    check("g2", _isFutureOfDynamic);
+
+    check("g3", _isFutureOfInt);
+    check("g4", _isFutureOfInt);
+    check("g5", _isFutureOfInt);
+  }
+
+  test_async_star_method_propagation() async {
+    String code = r'''
+      import "dart:async";
+      class A {
+        Stream g0() async* { yield []; }
+        Stream g1() async* { yield* new Stream(); }
+
+        Stream<List<int>> g2() async* { yield []; }
+        Stream<List<int>> g3() async* { yield* new Stream(); }
+      }
+    ''';
+    CompilationUnit unit = await resolveSource(code);
+
+    void check(String name, Asserter<InterfaceType> typeTest) {
+      MethodDeclaration test = AstFinder.getMethodInClass(unit, "A", name);
+      BlockFunctionBody body = test.body;
+      YieldStatement stmt = body.block.statements[0];
+      Expression exp = stmt.expression;
+      typeTest(exp.staticType);
+    }
+
+    check("g0", _isListOf(_isDynamic));
+    check("g1", _isStreamOf([_isDynamic]));
+
+    check("g2", _isListOf(_isInt));
+    check("g3", _isStreamOf([(DartType type) => _isListOf(_isInt)(type)]));
+  }
+
+  test_async_star_propagation() async {
+    String code = r'''
+      import "dart:async";
+
+      Stream g0() async* { yield []; }
+      Stream g1() async* { yield* new Stream(); }
+
+      Stream<List<int>> g2() async* { yield []; }
+      Stream<List<int>> g3() async* { yield* new Stream(); }
+   ''';
+    CompilationUnit unit = await resolveSource(code);
+
+    void check(String name, Asserter<InterfaceType> typeTest) {
+      FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, name);
+      BlockFunctionBody body = test.functionExpression.body;
+      YieldStatement stmt = body.block.statements[0];
+      Expression exp = stmt.expression;
+      typeTest(exp.staticType);
+    }
+
+    check("g0", _isListOf(_isDynamic));
+    check("g1", _isStreamOf([_isDynamic]));
+
+    check("g2", _isListOf(_isInt));
+    check("g3", _isStreamOf([(DartType type) => _isListOf(_isInt)(type)]));
+  }
+
+  test_cascadeExpression() async {
+    String code = r'''
+      class A<T> {
+        List<T> map(T a, List<T> mapper(T x)) => mapper(a);
+      }
+
+      void main () {
+        A<int> a = new A()..map(0, (x) => [x]);
+     }
+   ''';
+    CompilationUnit unit = await resolveSource(code);
+    List<Statement> statements =
+        AstFinder.getStatementsInTopLevelFunction(unit, "main");
+    CascadeExpression fetch(int i) {
+      VariableDeclarationStatement stmt = statements[i];
+      VariableDeclaration decl = stmt.variables.variables[0];
+      CascadeExpression exp = decl.initializer;
+      return exp;
+    }
+
+    Element elementA = AstFinder.getClass(unit, "A").declaredElement;
+
+    CascadeExpression cascade = fetch(0);
+    _isInstantiationOf(_hasElement(elementA))([_isInt])(cascade.staticType);
+    MethodInvocation invoke = cascade.cascadeSections[0];
+    FunctionExpression function = invoke.argumentList.arguments[1];
+    ExecutableElement f0 = function.declaredElement;
+    _isListOf(_isInt)(f0.type.returnType);
+    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
+    // 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;
+    _isInt(call.staticType);
+  }
+
+  test_constrainedByBounds3() async {
+    Source source = addSource(r'''
+      T f<T extends S, S extends int>(S x) => null;
+      void test() { var x = f(3); }
+   ''');
+    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_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_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)(null); }
+   ''';
+    Source source = addSource(code);
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+    assertErrors(source, [StrongModeCode.COULD_NOT_INFER]);
+    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_constructorInitializer_propagation() async {
+    String code = r'''
+      class A {
+        List<String> x;
+        A() : this.x = [];
+      }
+   ''';
+    CompilationUnit unit = await resolveSource(code);
+    ConstructorDeclaration constructor =
+        AstFinder.getConstructorInClass(unit, "A", null);
+    ConstructorFieldInitializer assignment = constructor.initializers[0];
+    Expression exp = assignment.expression;
+    _isListOf(_isString)(exp.staticType);
+  }
+
+  test_covarianceChecks() async {
+    var source = addSource(r'''
+class C<T> {
+  add(T t) {}
+  forEach(void f(T t)) {}
+}
+class D extends C<int> {
+  add(int t) {}
+  forEach(void f(int t)) {}
+}
+class E extends C<int> {
+  add(Object t) {}
+  forEach(void f(Null t)) {}
+}
+''');
+    var unit = (await computeAnalysisResult(source)).unit;
+    assertNoErrors(source);
+    var cAdd = AstFinder.getMethodInClass(unit, "C", "add");
+    var covariantC = getClassCovariantParameters(AstFinder.getClass(unit, "C"));
+    expect(covariantC.toList(), [cAdd.declaredElement.parameters[0]]);
+
+    var dAdd = AstFinder.getMethodInClass(unit, "D", "add");
+    var covariantD = getClassCovariantParameters(AstFinder.getClass(unit, "D"));
+    expect(covariantD.toList(), [dAdd.declaredElement.parameters[0]]);
+
+    var covariantE = getClassCovariantParameters(AstFinder.getClass(unit, "E"));
+    expect(covariantE.toList(), []);
+  }
+
+  test_covarianceChecks2() async {
+    var content = r'''
+class View<T1> {
+  View<T1> create() => this;
+}
+
+class Bar<T2> extends View<Bar<T2>> {}
+
+main() {
+  var b = new Bar<int>();
+  b.create();
+}
+''';
+    var source = addSource(content);
+    var unit = (await computeAnalysisResult(source)).unit;
+    assertNoErrors(source);
+
+    var findNode = FindNode(content, unit);
+    expect(getImplicitCast(findNode.methodInvocation('b.create')), isNull);
+  }
+
+  test_covarianceChecks_genericMethods() async {
+    var source = addSource(r'''
+class C<T> {
+  add<S>(T t) {}
+  forEach<S>(S f(T t)) {}
+}
+class D extends C<int> {
+  add<S>(int t) {}
+  forEach<S>(S f(int t)) {}
+}
+class E extends C<int> {
+  add<S>(Object t) {}
+  forEach<S>(S f(Null t)) {}
+}
+''');
+    var unit = (await computeAnalysisResult(source)).unit;
+    assertNoErrors(source);
+
+    var cAdd = AstFinder.getMethodInClass(unit, "C", "add");
+    var covariantC = getClassCovariantParameters(AstFinder.getClass(unit, "C"));
+    expect(covariantC.toList(), [cAdd.declaredElement.parameters[0]]);
+
+    var dAdd = AstFinder.getMethodInClass(unit, "D", "add");
+    var covariantD = getClassCovariantParameters(AstFinder.getClass(unit, "D"));
+    expect(covariantD.toList(), [dAdd.declaredElement.parameters[0]]);
+
+    var covariantE = getClassCovariantParameters(AstFinder.getClass(unit, "E"));
+    expect(covariantE.toList(), []);
+  }
+
+  test_covarianceChecks_returnFunction() async {
+    var source = addSource(r'''
+typedef F<T>(T t);
+typedef T R<T>();
+class C<T> {
+  F<T> f;
+
+  C();
+  factory C.fact() => new C<Null>();
+
+  F<T> get g => null;
+  F<T> m1() => null;
+  R<F<T>> m2() => null;
+
+  casts(C<T> other, T t) {
+    other.f;
+    other.g(t);
+    other.m1();
+    other.m2;
+
+    new C<T>.fact().f(t);
+    new C<int>.fact().g;
+    new C<int>.fact().m1;
+    new C<T>.fact().m2();
+
+    new C<Object>.fact().f(42);
+    new C<Object>.fact().g;
+    new C<Object>.fact().m1;
+    new C<Object>.fact().m2();
+
+    new C.fact().f(42);
+    new C.fact().g;
+    new C.fact().m1;
+    new C.fact().m2();
+  }
+
+  noCasts(T t) {
+    f;
+    g;
+    m1();
+    m2();
+
+    f(t);
+    g(t);
+    (f)(t);
+    (g)(t);
+    m1;
+    m2;
+
+    this.f;
+    this.g;
+    this.m1();
+    this.m2();
+    this.m1;
+    this.m2;
+    (this.m1)();
+    (this.m2)();
+    this.f(t);
+    this.g(t);
+    (this.f)(t);
+    (this.g)(t);
+
+    new C<int>().f;
+    new C<T>().g;
+    new C<int>().m1();
+    new C().m2();
+
+    new D().f;
+    new D().g;
+    new D().m1();
+    new D().m2();
+  }
+}
+class D extends C<num> {
+  noCasts(t) {
+    f;
+    this.g;
+    this.m1();
+    m2;
+
+    super.f;
+    super.g;
+    super.m1;
+    super.m2();
+  }
+}
+
+D d;
+C<Object> c;
+C cD;
+C<Null> cN;
+F<Object> f;
+F<Null> fN;
+R<F<Object>> rf;
+R<F<Null>> rfN;
+R<R<F<Object>>> rrf;
+R<R<F<Null>>> rrfN;
+Object obj;
+F<int> fi;
+R<F<int>> rfi;
+R<R<F<int>>> rrfi;
+
+casts() {
+  c.f;
+  c.g;
+  c.m1;
+  c.m1();
+  c.m2();
+
+  fN = c.f;
+  fN = c.g;
+  rfN = c.m1;
+  rrfN = c.m2;
+  fN = c.m1();
+  rfN = c.m2();
+
+  f = c.f;
+  f = c.g;
+  rf = c.m1;
+  rrf = c.m2;
+  f = c.m1();
+  rf = c.m2();
+  c.m2()();
+
+  c.f(obj);
+  c.g(obj);
+  (c.f)(obj);
+  (c.g)(obj);
+  (c.m1)();
+  c.m1()(obj);
+  (c.m2)();
+
+  cD.f;
+  cD.g;
+  cD.m1;
+  cD.m1();
+  cD.m2();
+}
+
+noCasts() {
+  fi = d.f;
+  fi = d.g;
+  rfi = d.m1;
+  fi = d.m1();
+  rrfi = d.m2;
+  rfi = d.m2();
+  d.f(42);
+  d.g(42);
+  (d.f)(42);
+  (d.g)(42);
+  d.m1()(42);
+  d.m2()()(42);
+
+  cN.f;
+  cN.g;
+  cN.m1;
+  cN.m1();
+  cN.m2();
+}
+''');
+    var unit = (await computeAnalysisResult(source)).unit;
+    assertNoErrors(source);
+
+    void expectCast(Statement statement, bool hasCast) {
+      var value = (statement as ExpressionStatement).expression;
+      if (value is AssignmentExpression) {
+        value = (value as AssignmentExpression).rightHandSide;
+      }
+      while (value is FunctionExpressionInvocation) {
+        value = (value as FunctionExpressionInvocation).function;
+      }
+      while (value is ParenthesizedExpression) {
+        value = (value as ParenthesizedExpression).expression;
+      }
+      var isCallingGetter =
+          value is MethodInvocation && !value.methodName.name.startsWith('m');
+      var cast = isCallingGetter
+          ? getImplicitOperationCast(value)
+          : getImplicitCast(value);
+      var castKind = isCallingGetter ? 'special cast' : 'cast';
+      expect(cast, hasCast ? isNotNull : isNull,
+          reason: '`$statement` should ' +
+              (hasCast ? '' : 'not ') +
+              'have a $castKind on `$value`.');
+    }
+
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'noCasts')) {
+      expectCast(s, false);
+    }
+    for (var s in AstFinder.getStatementsInMethod(unit, 'C', 'casts')) {
+      expectCast(s, true);
+    }
+    for (var s in AstFinder.getStatementsInMethod(unit, 'D', 'noCasts')) {
+      expectCast(s, false);
+    }
+    for (var s in AstFinder.getStatementsInTopLevelFunction(unit, 'noCasts')) {
+      expectCast(s, false);
+    }
+    for (var s in AstFinder.getStatementsInTopLevelFunction(unit, 'casts')) {
+      expectCast(s, true);
+    }
+  }
+
+  test_covarianceChecks_superclass() async {
+    var source = addSource(r'''
+class C<T> {
+  add(T t) {}
+  forEach(void f(T t)) {}
+}
+class D {
+  add(int t) {}
+  forEach(void f(int t)) {}
+}
+class E extends D implements C<int> {}
+''');
+    var unit = (await computeAnalysisResult(source)).unit;
+    assertNoErrors(source);
+    var cAdd = AstFinder.getMethodInClass(unit, "C", "add");
+    var covariantC = getClassCovariantParameters(AstFinder.getClass(unit, "C"));
+    expect(covariantC.toList(), [cAdd.declaredElement.parameters[0]]);
+
+    var dAdd = AstFinder.getMethodInClass(unit, "D", "add");
+    var covariantD = getClassCovariantParameters(AstFinder.getClass(unit, "D"));
+    expect(covariantD, null);
+
+    var classE = AstFinder.getClass(unit, "E");
+    var covariantE = getClassCovariantParameters(classE);
+    var superCovariantE = getSuperclassCovariantParameters(classE);
+    expect(covariantE.toList(), []);
+    expect(superCovariantE.toList(), [dAdd.declaredElement.parameters[0]]);
+  }
+
+  test_factoryConstructor_propagation() async {
+    String code = r'''
+      class A<T> {
+        factory A() { return new B(); }
+      }
+      class B<S> extends A<S> {}
+   ''';
+    CompilationUnit unit = await resolveSource(code);
+
+    ConstructorDeclaration constructor =
+        AstFinder.getConstructorInClass(unit, "A", null);
+    BlockFunctionBody body = constructor.body;
+    ReturnStatement stmt = body.block.statements[0];
+    InstanceCreationExpression exp = stmt.expression;
+    ClassElement elementB = AstFinder.getClass(unit, "B").declaredElement;
+    ClassElement elementA = AstFinder.getClass(unit, "A").declaredElement;
+    expect(resolutionMap.typeForTypeName(exp.constructorName.type).element,
+        elementB);
+    _isInstantiationOf(_hasElement(elementB))(
+        [_isType(elementA.typeParameters[0].type)])(exp.staticType);
+  }
+
+  test_fieldDeclaration_propagation() async {
+    String code = r'''
+      class A {
+        List<String> f0 = ["hello"];
+      }
+   ''';
+    CompilationUnit unit = await resolveSource(code);
+
+    VariableDeclaration field = AstFinder.getFieldInClass(unit, "A", "f0");
+
+    _isListOf(_isString)(field.initializer.staticType);
+  }
+
+  test_functionDeclaration_body_propagation() async {
+    String code = r'''
+      typedef T Function2<S, T>(S x);
+
+      List<int> test1() => [];
+
+      Function2<int, int> test2 (int x) {
+        Function2<String, int> inner() {
+          return (x) => x.length;
+        }
+        return (x) => x;
+     }
+   ''';
+    CompilationUnit unit = await resolveSource(code);
+
+    Asserter<InterfaceType> assertListOfInt = _isListOf(_isInt);
+
+    FunctionDeclaration test1 = AstFinder.getTopLevelFunction(unit, "test1");
+    ExpressionFunctionBody body = test1.functionExpression.body;
+    assertListOfInt(body.expression.staticType);
+
+    List<Statement> statements =
+        AstFinder.getStatementsInTopLevelFunction(unit, "test2");
+
+    FunctionDeclaration inner =
+        (statements[0] as FunctionDeclarationStatement).functionDeclaration;
+    BlockFunctionBody body0 = inner.functionExpression.body;
+    ReturnStatement return0 = body0.block.statements[0];
+    Expression anon0 = return0.expression;
+    FunctionType type0 = anon0.staticType;
+    expect(type0.returnType, typeProvider.intType);
+    expect(type0.normalParameterTypes[0], typeProvider.stringType);
+
+    FunctionExpression anon1 = (statements[1] as ReturnStatement).expression;
+    FunctionType type1 =
+        resolutionMap.elementDeclaredByFunctionExpression(anon1).type;
+    expect(type1.returnType, typeProvider.intType);
+    expect(type1.normalParameterTypes[0], typeProvider.intType);
+  }
+
+  test_functionLiteral_assignment_typedArguments() async {
+    String code = r'''
+      typedef T Function2<S, T>(S x);
+
+      void main () {
+        Function2<int, String> l0 = (int x) => null;
+        Function2<int, String> l1 = (int x) => "hello";
+        Function2<int, String> l2 = (String x) => "hello";
+        Function2<int, String> l3 = (int x) => 3;
+        Function2<int, String> l4 = (int x) {return 3;};
+     }
+   ''';
+    CompilationUnit unit = await resolveSource(code);
+    List<Statement> statements =
+        AstFinder.getStatementsInTopLevelFunction(unit, "main");
+    DartType literal(int i) {
+      VariableDeclarationStatement stmt = statements[i];
+      VariableDeclaration decl = stmt.variables.variables[0];
+      FunctionExpression exp = decl.initializer;
+      return resolutionMap.elementDeclaredByFunctionExpression(exp).type;
+    }
+
+    _isFunction2Of(_isInt, _isNull)(literal(0));
+    _isFunction2Of(_isInt, _isString)(literal(1));
+    _isFunction2Of(_isString, _isString)(literal(2));
+    _isFunction2Of(_isInt, _isString)(literal(3));
+    _isFunction2Of(_isInt, _isString)(literal(4));
+  }
+
+  test_functionLiteral_assignment_unTypedArguments() async {
+    String code = r'''
+      typedef T Function2<S, T>(S x);
+
+      void main () {
+        Function2<int, String> l0 = (x) => null;
+        Function2<int, String> l1 = (x) => "hello";
+        Function2<int, String> l2 = (x) => "hello";
+        Function2<int, String> l3 = (x) => 3;
+        Function2<int, String> l4 = (x) {return 3;};
+     }
+   ''';
+    CompilationUnit unit = await resolveSource(code);
+    List<Statement> statements =
+        AstFinder.getStatementsInTopLevelFunction(unit, "main");
+    DartType literal(int i) {
+      VariableDeclarationStatement stmt = statements[i];
+      VariableDeclaration decl = stmt.variables.variables[0];
+      FunctionExpression exp = decl.initializer;
+      return resolutionMap.elementDeclaredByFunctionExpression(exp).type;
+    }
+
+    _isFunction2Of(_isInt, _isNull)(literal(0));
+    _isFunction2Of(_isInt, _isString)(literal(1));
+    _isFunction2Of(_isInt, _isString)(literal(2));
+    _isFunction2Of(_isInt, _isString)(literal(3));
+    _isFunction2Of(_isInt, _isString)(literal(4));
+  }
+
+  test_functionLiteral_body_propagation() async {
+    String code = r'''
+      typedef T Function2<S, T>(S x);
+
+      void main () {
+        Function2<int, List<String>> l0 = (int x) => ["hello"];
+        Function2<int, List<String>> l1 = (String x) => ["hello"];
+        Function2<int, List<String>> l2 = (int x) => [3];
+        Function2<int, List<String>> l3 = (int x) {return [3];};
+     }
+   ''';
+    CompilationUnit unit = await resolveSource(code);
+    List<Statement> statements =
+        AstFinder.getStatementsInTopLevelFunction(unit, "main");
+    Expression functionReturnValue(int i) {
+      VariableDeclarationStatement stmt = statements[i];
+      VariableDeclaration decl = stmt.variables.variables[0];
+      FunctionExpression exp = decl.initializer;
+      FunctionBody body = exp.body;
+      if (body is ExpressionFunctionBody) {
+        return body.expression;
+      } else {
+        Statement stmt = (body as BlockFunctionBody).block.statements[0];
+        return (stmt as ReturnStatement).expression;
+      }
+    }
+
+    Asserter<InterfaceType> assertListOfString = _isListOf(_isString);
+    assertListOfString(functionReturnValue(0).staticType);
+    assertListOfString(functionReturnValue(1).staticType);
+    assertListOfString(functionReturnValue(2).staticType);
+    assertListOfString(functionReturnValue(3).staticType);
+  }
+
+  test_functionLiteral_functionExpressionInvocation_typedArguments() async {
+    String code = r'''
+      class Mapper<F, T> {
+        T map(T mapper(F x)) => mapper(null);
+      }
+
+      void main () {
+        (new Mapper<int, String>().map)((int x) => null);
+        (new Mapper<int, String>().map)((int x) => "hello");
+        (new Mapper<int, String>().map)((String x) => "hello");
+        (new Mapper<int, String>().map)((int x) => 3);
+        (new Mapper<int, String>().map)((int x) {return 3;});
+     }
+   ''';
+    CompilationUnit unit = await resolveSource(code);
+    List<Statement> statements =
+        AstFinder.getStatementsInTopLevelFunction(unit, "main");
+    DartType literal(int i) {
+      ExpressionStatement stmt = statements[i];
+      FunctionExpressionInvocation invk = stmt.expression;
+      FunctionExpression exp = invk.argumentList.arguments[0];
+      return resolutionMap.elementDeclaredByFunctionExpression(exp).type;
+    }
+
+    _isFunction2Of(_isInt, _isNull)(literal(0));
+    _isFunction2Of(_isInt, _isString)(literal(1));
+    _isFunction2Of(_isString, _isString)(literal(2));
+    _isFunction2Of(_isInt, _isString)(literal(3));
+    _isFunction2Of(_isInt, _isString)(literal(4));
+  }
+
+  test_functionLiteral_functionExpressionInvocation_unTypedArguments() async {
+    String code = r'''
+      class Mapper<F, T> {
+        T map(T mapper(F x)) => mapper(null);
+      }
+
+      void main () {
+        (new Mapper<int, String>().map)((x) => null);
+        (new Mapper<int, String>().map)((x) => "hello");
+        (new Mapper<int, String>().map)((x) => "hello");
+        (new Mapper<int, String>().map)((x) => 3);
+        (new Mapper<int, String>().map)((x) {return 3;});
+     }
+   ''';
+    CompilationUnit unit = await resolveSource(code);
+    List<Statement> statements =
+        AstFinder.getStatementsInTopLevelFunction(unit, "main");
+    DartType literal(int i) {
+      ExpressionStatement stmt = statements[i];
+      FunctionExpressionInvocation invk = stmt.expression;
+      FunctionExpression exp = invk.argumentList.arguments[0];
+      return resolutionMap.elementDeclaredByFunctionExpression(exp).type;
+    }
+
+    _isFunction2Of(_isInt, _isNull)(literal(0));
+    _isFunction2Of(_isInt, _isString)(literal(1));
+    _isFunction2Of(_isInt, _isString)(literal(2));
+    _isFunction2Of(_isInt, _isString)(literal(3));
+    _isFunction2Of(_isInt, _isString)(literal(4));
+  }
+
+  test_functionLiteral_functionInvocation_typedArguments() async {
+    String code = r'''
+      String map(String mapper(int x)) => mapper(null);
+
+      void main () {
+        map((int x) => null);
+        map((int x) => "hello");
+        map((String x) => "hello");
+        map((int x) => 3);
+        map((int x) {return 3;});
+     }
+   ''';
+    CompilationUnit unit = await resolveSource(code);
+    List<Statement> statements =
+        AstFinder.getStatementsInTopLevelFunction(unit, "main");
+    DartType literal(int i) {
+      ExpressionStatement stmt = statements[i];
+      MethodInvocation invk = stmt.expression;
+      FunctionExpression exp = invk.argumentList.arguments[0];
+      return resolutionMap.elementDeclaredByFunctionExpression(exp).type;
+    }
+
+    _isFunction2Of(_isInt, _isNull)(literal(0));
+    _isFunction2Of(_isInt, _isString)(literal(1));
+    _isFunction2Of(_isString, _isString)(literal(2));
+    _isFunction2Of(_isInt, _isString)(literal(3));
+    _isFunction2Of(_isInt, _isString)(literal(4));
+  }
+
+  test_functionLiteral_functionInvocation_unTypedArguments() async {
+    String code = r'''
+      String map(String mapper(int x)) => mapper(null);
+
+      void main () {
+        map((x) => null);
+        map((x) => "hello");
+        map((x) => "hello");
+        map((x) => 3);
+        map((x) {return 3;});
+     }
+   ''';
+    CompilationUnit unit = await resolveSource(code);
+    List<Statement> statements =
+        AstFinder.getStatementsInTopLevelFunction(unit, "main");
+    DartType literal(int i) {
+      ExpressionStatement stmt = statements[i];
+      MethodInvocation invk = stmt.expression;
+      FunctionExpression exp = invk.argumentList.arguments[0];
+      return resolutionMap.elementDeclaredByFunctionExpression(exp).type;
+    }
+
+    _isFunction2Of(_isInt, _isNull)(literal(0));
+    _isFunction2Of(_isInt, _isString)(literal(1));
+    _isFunction2Of(_isInt, _isString)(literal(2));
+    _isFunction2Of(_isInt, _isString)(literal(3));
+    _isFunction2Of(_isInt, _isString)(literal(4));
+  }
+
+  test_functionLiteral_methodInvocation_typedArguments() async {
+    String code = r'''
+      class Mapper<F, T> {
+        T map(T mapper(F x)) => mapper(null);
+      }
+
+      void main () {
+        new Mapper<int, String>().map((int x) => null);
+        new Mapper<int, String>().map((int x) => "hello");
+        new Mapper<int, String>().map((String x) => "hello");
+        new Mapper<int, String>().map((int x) => 3);
+        new Mapper<int, String>().map((int x) {return 3;});
+     }
+   ''';
+    CompilationUnit unit = await resolveSource(code);
+    List<Statement> statements =
+        AstFinder.getStatementsInTopLevelFunction(unit, "main");
+    DartType literal(int i) {
+      ExpressionStatement stmt = statements[i];
+      MethodInvocation invk = stmt.expression;
+      FunctionExpression exp = invk.argumentList.arguments[0];
+      return resolutionMap.elementDeclaredByFunctionExpression(exp).type;
+    }
+
+    _isFunction2Of(_isInt, _isNull)(literal(0));
+    _isFunction2Of(_isInt, _isString)(literal(1));
+    _isFunction2Of(_isString, _isString)(literal(2));
+    _isFunction2Of(_isInt, _isString)(literal(3));
+    _isFunction2Of(_isInt, _isString)(literal(4));
+  }
+
+  test_functionLiteral_methodInvocation_unTypedArguments() async {
+    String code = r'''
+      class Mapper<F, T> {
+        T map(T mapper(F x)) => mapper(null);
+      }
+
+      void main () {
+        new Mapper<int, String>().map((x) => null);
+        new Mapper<int, String>().map((x) => "hello");
+        new Mapper<int, String>().map((x) => "hello");
+        new Mapper<int, String>().map((x) => 3);
+        new Mapper<int, String>().map((x) {return 3;});
+     }
+   ''';
+    CompilationUnit unit = await resolveSource(code);
+    List<Statement> statements =
+        AstFinder.getStatementsInTopLevelFunction(unit, "main");
+    DartType literal(int i) {
+      ExpressionStatement stmt = statements[i];
+      MethodInvocation invk = stmt.expression;
+      FunctionExpression exp = invk.argumentList.arguments[0];
+      return resolutionMap.elementDeclaredByFunctionExpression(exp).type;
+    }
+
+    _isFunction2Of(_isInt, _isNull)(literal(0));
+    _isFunction2Of(_isInt, _isString)(literal(1));
+    _isFunction2Of(_isInt, _isString)(literal(2));
+    _isFunction2Of(_isInt, _isString)(literal(3));
+    _isFunction2Of(_isInt, _isString)(literal(4));
+  }
+
+  test_functionLiteral_unTypedArgument_propagation() async {
+    String code = r'''
+      typedef T Function2<S, T>(S x);
+
+      void main () {
+        Function2<int, int> l0 = (x) => x;
+        Function2<int, int> l1 = (x) => x+1;
+        Function2<int, String> l2 = (x) => x;
+        Function2<int, String> l3 = (x) => x.toLowerCase();
+        Function2<String, String> l4 = (x) => x.toLowerCase();
+     }
+   ''';
+    CompilationUnit unit = await resolveSource(code);
+    List<Statement> statements =
+        AstFinder.getStatementsInTopLevelFunction(unit, "main");
+    Expression functionReturnValue(int i) {
+      VariableDeclarationStatement stmt = statements[i];
+      VariableDeclaration decl = stmt.variables.variables[0];
+      FunctionExpression exp = decl.initializer;
+      FunctionBody body = exp.body;
+      if (body is ExpressionFunctionBody) {
+        return body.expression;
+      } else {
+        Statement stmt = (body as BlockFunctionBody).block.statements[0];
+        return (stmt as ReturnStatement).expression;
+      }
+    }
+
+    expect(functionReturnValue(0).staticType, typeProvider.intType);
+    expect(functionReturnValue(1).staticType, typeProvider.intType);
+    expect(functionReturnValue(2).staticType, typeProvider.intType);
+    expect(functionReturnValue(3).staticType, typeProvider.dynamicType);
+    expect(functionReturnValue(4).staticType, typeProvider.stringType);
+  }
+
+  test_futureOr_assignFromFuture() async {
+    // Test a Future<T> can be assigned to FutureOr<T>.
+    MethodInvocation invoke = await _testFutureOr(r'''
+    FutureOr<T> mk<T>(Future<T> x) => x;
+    test() => mk(new Future<int>.value(42));
+    ''');
+    _isFutureOrOfInt(invoke.staticType);
+  }
+
+  test_futureOr_assignFromValue() async {
+    // Test a T can be assigned to FutureOr<T>.
+    MethodInvocation invoke = await _testFutureOr(r'''
+    FutureOr<T> mk<T>(T x) => x;
+    test() => mk(42);
+    ''');
+    _isFutureOrOfInt(invoke.staticType);
+  }
+
+  test_futureOr_asyncExpressionBody() async {
+    // A FutureOr<T> can be used as the expression body for an async function
+    MethodInvocation invoke = await _testFutureOr(r'''
+    Future<T> mk<T>(FutureOr<T> x) async => x;
+    test() => mk(42);
+    ''');
+    _isFutureOfInt(invoke.staticType);
+  }
+
+  test_futureOr_asyncReturn() async {
+    // A FutureOr<T> can be used as the return value for an async function
+    MethodInvocation invoke = await _testFutureOr(r'''
+    Future<T> mk<T>(FutureOr<T> x) async { return x; }
+    test() => mk(42);
+    ''');
+    _isFutureOfInt(invoke.staticType);
+  }
+
+  test_futureOr_await() async {
+    // Test a FutureOr<T> can be awaited.
+    MethodInvocation invoke = await _testFutureOr(r'''
+    Future<T> mk<T>(FutureOr<T> x) async => await x;
+    test() => mk(42);
+    ''');
+    _isFutureOfInt(invoke.staticType);
+  }
+
+  test_futureOr_downwards1() async {
+    // Test that downwards inference interacts correctly with FutureOr
+    // parameters.
+    MethodInvocation invoke = await _testFutureOr(r'''
+    Future<T> mk<T>(FutureOr<T> x) => null;
+    Future<int> test() => mk(new Future<int>.value(42));
+    ''');
+    _isFutureOfInt(invoke.staticType);
+  }
+
+  test_futureOr_downwards2() async {
+    // Test that downwards inference interacts correctly with FutureOr
+    // parameters when the downwards context is FutureOr
+    MethodInvocation invoke = await _testFutureOr(r'''
+    Future<T> mk<T>(FutureOr<T> x) => null;
+    FutureOr<int> test() => mk(new Future<int>.value(42));
+    ''');
+    _isFutureOfInt(invoke.staticType);
+  }
+
+  test_futureOr_downwards3() async {
+    // Test that downwards inference correctly propogates into
+    // arguments.
+    MethodInvocation invoke = await _testFutureOr(r'''
+    Future<T> mk<T>(FutureOr<T> x) => null;
+    Future<int> test() => mk(new Future.value(42));
+    ''');
+    _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
+    MethodInvocation invoke = await _testFutureOr(r'''
+    Future<T> mk<T>(FutureOr<T> x) => null;
+    FutureOr<int> test() => mk(new Future.value(42));
+    ''');
+    _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
+    MethodInvocation invoke = await _testFutureOr(r'''
+    Future<T> mk<T>(FutureOr<T> x) => null;
+    FutureOr<num> test() => mk(new Future.value(42));
+    ''');
+    _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.
+    MethodInvocation invoke = await _testFutureOr(r'''
+    T mk<T>(T x) => null;
+    FutureOr<int> test() => mk(new Future.value(42));
+    ''');
+    _isFutureOrOfInt(invoke.staticType);
+    _isFutureOfInt(invoke.argumentList.arguments[0].staticType);
+  }
+
+  test_futureOr_downwards7() async {
+    // Test that downwards inference incorporates bounds correctly
+    // when instantiating type variables.
+    MethodInvocation invoke = await _testFutureOr(r'''
+      T mk<T extends Future<int>>(T x) => null;
+      FutureOr<int> test() => mk(new Future.value(42));
+    ''');
+    _isFutureOfInt(invoke.staticType);
+    _isFutureOfInt(invoke.argumentList.arguments[0].staticType);
+  }
+
+  test_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.
+    MethodInvocation invoke = await _testFutureOr(r'''
+    T mk<T extends Future<Object>>(T x) => null;
+    FutureOr<int> test() => mk(new Future.value(42));
+    ''');
+    _isFutureOfInt(invoke.staticType);
+    _isFutureOfInt(invoke.argumentList.arguments[0].staticType);
+  }
+
+  test_futureOr_downwards9() async {
+    // Test that downwards inference decomposes correctly with
+    // other composite types
+    MethodInvocation invoke = await _testFutureOr(r'''
+    List<T> mk<T>(T x) => null;
+    FutureOr<List<int>> test() => mk(3);
+    ''');
+    _isListOf(_isInt)(invoke.staticType);
+    _isInt(invoke.argumentList.arguments[0].staticType);
+  }
+
+  test_futureOr_methods1() async {
+    // Test that FutureOr has the Object methods
+    MethodInvocation invoke = await _testFutureOr(r'''
+    dynamic test(FutureOr<int> x) => x.toString();
+    ''');
+    _isString(invoke.staticType);
+  }
+
+  test_futureOr_methods2() async {
+    // Test that FutureOr does not have the constituent type methods
+    MethodInvocation invoke = await _testFutureOr(r'''
+    dynamic test(FutureOr<int> x) => x.abs();
+    ''', errors: [StaticTypeWarningCode.UNDEFINED_METHOD]);
+    _isDynamic(invoke.staticType);
+  }
+
+  test_futureOr_methods3() async {
+    // Test that FutureOr does not have the Future type methods
+    MethodInvocation invoke = await _testFutureOr(r'''
+    dynamic test(FutureOr<int> x) => x.then((x) => x);
+    ''', errors: [StaticTypeWarningCode.UNDEFINED_METHOD]);
+    _isDynamic(invoke.staticType);
+  }
+
+  test_futureOr_methods4() async {
+    // Test that FutureOr<dynamic> does not have all methods
+    MethodInvocation invoke = await _testFutureOr(r'''
+    dynamic test(FutureOr<dynamic> x) => x.abs();
+    ''', errors: [StaticTypeWarningCode.UNDEFINED_METHOD]);
+    _isDynamic(invoke.staticType);
+  }
+
+  test_futureOr_no_return() async {
+    MethodInvocation invoke = await _testFutureOr(r'''
+    FutureOr<T> mk<T>(Future<T> x) => x;
+    Future<int> f;
+    test() => f.then((int x) {});
+    ''');
+    _isFunction2Of(_isInt, _isNull)(
+        invoke.argumentList.arguments[0].staticType);
+    _isFutureOfNull(invoke.staticType);
+  }
+
+  test_futureOr_no_return_value() async {
+    MethodInvocation invoke = await _testFutureOr(r'''
+    FutureOr<T> mk<T>(Future<T> x) => x;
+    Future<int> f;
+    test() => f.then((int x) {return;});
+    ''');
+    _isFunction2Of(_isInt, _isNull)(
+        invoke.argumentList.arguments[0].staticType);
+    _isFutureOfNull(invoke.staticType);
+  }
+
+  test_futureOr_return_null() async {
+    MethodInvocation invoke = await _testFutureOr(r'''
+    FutureOr<T> mk<T>(Future<T> x) => x;
+    Future<int> f;
+    test() => f.then((int x) {return null;});
+    ''');
+    _isFunction2Of(_isInt, _isNull)(
+        invoke.argumentList.arguments[0].staticType);
+    _isFutureOfNull(invoke.staticType);
+  }
+
+  test_futureOr_upwards1() async {
+    // Test that upwards inference correctly prefers to instantiate type
+    // variables with the "smaller" solution when both are possible.
+    MethodInvocation invoke = await _testFutureOr(r'''
+    Future<T> mk<T>(FutureOr<T> x) => null;
+    dynamic test() => mk(new Future<int>.value(42));
+    ''');
+    _isFutureOfInt(invoke.staticType);
+  }
+
+  test_futureOr_upwards2() async {
+    // Test that upwards inference fails when the solution doesn't
+    // match the bound.
+    MethodInvocation invoke = await _testFutureOr(r'''
+    Future<T> mk<T extends Future<Object>>(FutureOr<T> x) => null;
+    dynamic test() => mk(new Future<int>.value(42));
+    ''', errors: [StrongModeCode.COULD_NOT_INFER]);
+    _isFutureOfInt(invoke.staticType);
+  }
+
+  test_futureOrNull_no_return() async {
+    MethodInvocation invoke = await _testFutureOr(r'''
+    FutureOr<T> mk<T>(Future<T> x) => x;
+    Future<int> f;
+    test() => f.then<Null>((int x) {});
+    ''');
+    _isFunction2Of(_isInt, _isNull)(
+        invoke.argumentList.arguments[0].staticType);
+    _isFutureOfNull(invoke.staticType);
+  }
+
+  test_futureOrNull_no_return_value() async {
+    MethodInvocation invoke = await _testFutureOr(r'''
+    FutureOr<T> mk<T>(Future<T> x) => x;
+    Future<int> f;
+    test() => f.then<Null>((int x) {return;});
+    ''');
+    _isFunction2Of(_isInt, _isNull)(
+        invoke.argumentList.arguments[0].staticType);
+    _isFutureOfNull(invoke.staticType);
+  }
+
+  test_futureOrNull_return_null() async {
+    MethodInvocation invoke = await _testFutureOr(r'''
+    FutureOr<T> mk<T>(Future<T> x) => x;
+    Future<int> f;
+    test() => f.then<Null>((int x) { return null;});
+    ''');
+    _isFunction2Of(_isInt, _isNull)(
+        invoke.argumentList.arguments[0].staticType);
+    _isFutureOfNull(invoke.staticType);
+  }
+
+  test_generic_partial() async {
+    // Test that upward and downward type inference handles partial
+    // type schemas correctly.  Downwards inference in a partial context
+    // (e.g. Map<String, ?>) should still allow upwards inference to fill
+    // in the missing information.
+    String code = r'''
+class A<T> {
+  A(T x);
+  A.fromA(A<T> a) {}
+  A.fromMap(Map<String, T> m) {}
+  A.fromList(List<T> m) {}
+  A.fromT(T t) {}
+  A.fromB(B<T, String> a) {}
+}
+
+class B<S, T> {
+  B(S s);
+}
+
+void test() {
+    var a0 = new A.fromA(new A(3));
+    var a1 = new A.fromMap({'hello' : 3});
+    var a2 = new A.fromList([3]);
+    var a3 = new A.fromT(3);
+    var a4 = new A.fromB(new B(3));
+}
+   ''';
+    CompilationUnit unit = await resolveSource(code);
+    Element elementA = AstFinder.getClass(unit, "A").declaredElement;
+    List<Statement> statements =
+        AstFinder.getStatementsInTopLevelFunction(unit, "test");
+    void check(int i) {
+      VariableDeclarationStatement stmt = statements[i];
+      VariableDeclaration decl = stmt.variables.variables[0];
+      Expression init = decl.initializer;
+      _isInstantiationOf(_hasElement(elementA))([_isInt])(init.staticType);
+    }
+
+    for (var i = 0; i < 5; i++) check(i);
+  }
+
+  test_inferConstructor_unknownTypeLowerBound() async {
+    Source source = addSource(r'''
+        class C<T> {
+          C(void callback(List<T> a));
+        }
+        test() {
+          // downwards inference pushes List<?> and in parameter position this
+          // becomes inferred as List<Null>.
+          var c = new C((items) {});
+        }
+        ''');
+    CompilationUnit unit = (await computeAnalysisResult(source)).unit;
+    assertNoErrors(source);
+    verify([source]);
+    DartType cType = findLocalVariable(unit, 'c').type;
+    Element elementC = AstFinder.getClass(unit, "C").declaredElement;
+
+    _isInstantiationOf(_hasElement(elementC))([_isDynamic])(cType);
+  }
+
+  test_inference_error_arguments() async {
+    Source source = addSource(r'''
+typedef R F<T, R>(T t);
+
+F<T, T> g<T>(F<T, T> f) => (x) => f(f(x));
+
+test() {
+  var h = g((int x) => 42.0);
+}
+ ''');
+    await computeAnalysisResult(source);
+    _expectInferenceError(source, [
+      StrongModeCode.COULD_NOT_INFER,
+      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    ], r'''
+Couldn't infer type parameter 'T'.
+
+Tried to infer 'double' for 'T' which doesn't work:
+  Parameter 'f' declared as     '(T) → T'
+                but argument is '(int) → double'.
+
+Consider passing explicit type argument(s) to the generic.
+
+''');
+  }
+
+  test_inference_error_arguments2() async {
+    Source source = addSource(r'''
+typedef R F<T, R>(T t);
+
+F<T, T> g<T>(F<T, T> a, F<T, T> b) => (x) => a(b(x));
+
+test() {
+  var h = g((int x) => 42.0, (double x) => 42);
+}
+ ''');
+    await computeAnalysisResult(source);
+    _expectInferenceError(source, [
+      StrongModeCode.COULD_NOT_INFER,
+      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE,
+      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    ], r'''
+Couldn't infer type parameter 'T'.
+
+Tried to infer 'num' for 'T' which doesn't work:
+  Parameter 'a' declared as     '(T) → T'
+                but argument is '(int) → double'.
+  Parameter 'b' declared as     '(T) → T'
+                but argument is '(double) → int'.
+
+Consider passing explicit type argument(s) to the generic.
+
+''');
+  }
+
+  test_inference_error_extendsFromReturn() async {
+    // This is not an inference error because we successfully infer Null.
+    Source source = addSource(r'''
+T max<T extends num>(T x, T y) => x;
+
+test() {
+  String hello = max(1, 2);
+}
+ ''');
+    var analysisResult = await computeAnalysisResult(source);
+    assertErrors(source, [
+      StrongModeCode.INVALID_CAST_LITERAL,
+      StrongModeCode.INVALID_CAST_LITERAL
+    ]);
+    var unit = analysisResult.unit;
+    var h = (AstFinder.getStatementsInTopLevelFunction(unit, "test")[0]
+            as VariableDeclarationStatement)
+        .variables
+        .variables[0];
+    var call = h.initializer as MethodInvocation;
+    expect(call.staticInvokeType.toString(), '(Null, Null) → Null');
+  }
+
+  test_inference_error_extendsFromReturn2() async {
+    Source source = addSource(r'''
+typedef R F<T, R>(T t);
+F<T, T> g<T extends num>() => (y) => y;
+
+test() {
+  F<String, String> hello = g();
+}
+ ''');
+    await computeAnalysisResult(source);
+    _expectInferenceError(source, [
+      StrongModeCode.COULD_NOT_INFER,
+    ], r'''
+Couldn't infer type parameter 'T'.
+
+Tried to infer 'String' for 'T' which doesn't work:
+  Type parameter 'T' declared to extend 'num'.
+The type 'String' was inferred from:
+  Return type declared as '(T) → T'
+              used where  '(String) → String' is required.
+
+Consider passing explicit type argument(s) to the generic.
+
+''');
+  }
+
+  test_inference_error_genericFunction() async {
+    Source source = addSource(r'''
+T max<T extends num>(T x, T y) => x < y ? y : x;
+abstract class Iterable<T> {
+  T get first;
+  S fold<S>(S s, S f(S s, T t));
+}
+test(Iterable values) {
+  num n = values.fold(values.first as num, max);
+}
+ ''');
+    await computeAnalysisResult(source);
+    _expectInferenceError(source, [
+      StrongModeCode.COULD_NOT_INFER,
+      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    ], r'''
+Couldn't infer type parameter 'T'.
+
+Tried to infer 'dynamic' for 'T' which doesn't work:
+  Function type declared as '<T extends num>(T, T) → T'
+                used where  '(num, dynamic) → num' is required.
+
+Consider passing explicit type argument(s) to the generic.
+
+''');
+  }
+
+  test_inference_error_returnContext() async {
+    Source source = addSource(r'''
+typedef R F<T, R>(T t);
+
+F<T, T> g<T>(T t) => (x) => t;
+
+test() {
+  F<num, int> h = g(42);
+}
+ ''');
+    await computeAnalysisResult(source);
+    _expectInferenceError(source, [StrongModeCode.COULD_NOT_INFER], r'''
+Couldn't infer type parameter 'T'.
+
+Tried to infer 'num' for 'T' which doesn't work:
+  Return type declared as '(T) → T'
+              used where  '(num) → int' is required.
+
+Consider passing explicit type argument(s) to the generic.
+
+''');
+  }
+
+  test_inference_hints() async {
+    Source source = addSource(r'''
+      void main () {
+        var x = 3;
+        List<int> l0 = [];
+     }
+   ''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_inference_simplePolymorphicRecursion_function() async {
+    // Regression test for https://github.com/dart-lang/sdk/issues/30980
+    // Check that inference works properly when inferring the type argument
+    // for a self-recursive call with a function type
+    var source = addSource(r'''
+void _mergeSort<T>(T Function(T) list, int compare(T a, T b), T Function(T) target) {
+  _mergeSort(list, compare, target);
+  _mergeSort(list, compare, list);
+  _mergeSort(target, compare, target);
+  _mergeSort(target, compare, list);
+}
+    ''');
+    var analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    var unit = analysisResult.unit;
+    var body = (AstFinder.getTopLevelFunction(unit, '_mergeSort')
+        .functionExpression
+        .body as BlockFunctionBody);
+    var stmts = body.block.statements;
+    for (ExpressionStatement stmt in stmts) {
+      MethodInvocation invoke = stmt.expression;
+      ParameterizedType fType = invoke.staticInvokeType;
+      expect(fType.typeArguments[0].toString(), 'T');
+    }
+  }
+
+  test_inference_simplePolymorphicRecursion_interface() async {
+    // Regression test for https://github.com/dart-lang/sdk/issues/30980
+    // Check that inference works properly when inferring the type argument
+    // for a self-recursive call with an interface type
+    var source = addSource(r'''
+void _mergeSort<T>(List<T> list, int compare(T a, T b), List<T> target) {
+  _mergeSort(list, compare, target);
+  _mergeSort(list, compare, list);
+  _mergeSort(target, compare, target);
+  _mergeSort(target, compare, list);
+}
+    ''');
+    var analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    var unit = analysisResult.unit;
+    var body = (AstFinder.getTopLevelFunction(unit, '_mergeSort')
+        .functionExpression
+        .body as BlockFunctionBody);
+    var stmts = body.block.statements;
+    for (ExpressionStatement stmt in stmts) {
+      MethodInvocation invoke = stmt.expression;
+      ParameterizedType fType = invoke.staticInvokeType;
+      expect(fType.typeArguments[0].toString(), 'T');
+    }
+  }
+
+  test_inference_simplePolymorphicRecursion_simple() async {
+    // Regression test for https://github.com/dart-lang/sdk/issues/30980
+    // Check that inference works properly when inferring the type argument
+    // for a self-recursive call with a simple type parameter
+    var source = addSource(r'''
+void _mergeSort<T>(T list, int compare(T a, T b), T target) {
+  _mergeSort(list, compare, target);
+  _mergeSort(list, compare, list);
+  _mergeSort(target, compare, target);
+  _mergeSort(target, compare, list);
+}
+    ''');
+    var analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    var unit = analysisResult.unit;
+    var body = (AstFinder.getTopLevelFunction(unit, '_mergeSort')
+        .functionExpression
+        .body as BlockFunctionBody);
+    var stmts = body.block.statements;
+    for (ExpressionStatement stmt in stmts) {
+      MethodInvocation invoke = stmt.expression;
+      ParameterizedType fType = invoke.staticInvokeType;
+      expect(fType.typeArguments[0].toString(), 'T');
+    }
+  }
+
+  test_inferGenericInstantiation() async {
+    // Verify that we don't infer '?` when we instantiate a generic function.
+    var source = addSource(r'''
+T f<T>(T x(T t)) => x(null);
+S g<S>(S s) => s;
+test() {
+ var h = f(g);
+}
+    ''');
+    var analysisResult = await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+    var unit = analysisResult.unit;
+    var h = (AstFinder.getStatementsInTopLevelFunction(unit, "test")[0]
+            as VariableDeclarationStatement)
+        .variables
+        .variables[0];
+    _isDynamic(h.declaredElement.type);
+    var fCall = h.initializer as MethodInvocation;
+    expect(
+        fCall.staticInvokeType.toString(), '((dynamic) → dynamic) → dynamic');
+    var g = fCall.argumentList.arguments[0];
+    expect(g.staticType.toString(), '(dynamic) → dynamic');
+  }
+
+  test_inferGenericInstantiation2() async {
+    // Verify the behavior when we cannot infer an instantiation due to invalid
+    // constraints from an outer generic method.
+    var source = addSource(r'''
+T max<T extends num>(T x, T y) => x < y ? y : x;
+abstract class Iterable<T> {
+  T get first;
+  S fold<S>(S s, S f(S s, T t));
+}
+num test(Iterable values) => values.fold(values.first as num, max);
+    ''');
+    var analysisResult = await computeAnalysisResult(source);
+    assertErrors(source, [
+      StrongModeCode.COULD_NOT_INFER,
+      StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE
+    ]);
+    verify([source]);
+    var unit = analysisResult.unit;
+    var fold = (AstFinder.getTopLevelFunction(unit, 'test')
+            .functionExpression
+            .body as ExpressionFunctionBody)
+        .expression as MethodInvocation;
+    expect(
+        fold.staticInvokeType.toString(), '(num, (num, dynamic) → num) → num');
+    var max = fold.argumentList.arguments[1];
+    // TODO(jmesserly): arguably (num, num) → num is better here.
+    expect(max.staticType.toString(), '(dynamic, dynamic) → dynamic');
+  }
+
+  test_inferredFieldDeclaration_propagation() async {
+    // Regression test for https://github.com/dart-lang/sdk/issues/25546
+    String code = r'''
+      abstract class A {
+        Map<int, List<int>> get map;
+      }
+      class B extends A {
+        var map = { 42: [] };
+      }
+      class C extends A {
+        get map => { 43: [] };
+      }
+   ''';
+    CompilationUnit unit = await resolveSource(code);
+
+    Asserter<InterfaceType> assertListOfInt = _isListOf(_isInt);
+    Asserter<InterfaceType> assertMapOfIntToListOfInt =
+        _isMapOf(_isInt, (DartType type) => assertListOfInt(type));
+
+    VariableDeclaration mapB = AstFinder.getFieldInClass(unit, "B", "map");
+    MethodDeclaration mapC = AstFinder.getMethodInClass(unit, "C", "map");
+    assertMapOfIntToListOfInt(
+        resolutionMap.elementDeclaredByVariableDeclaration(mapB).type);
+    assertMapOfIntToListOfInt(
+        resolutionMap.elementDeclaredByMethodDeclaration(mapC).returnType);
+
+    SetOrMapLiteral mapLiteralB = mapB.initializer;
+    SetOrMapLiteral mapLiteralC =
+        (mapC.body as ExpressionFunctionBody).expression;
+    assertMapOfIntToListOfInt(mapLiteralB.staticType);
+    assertMapOfIntToListOfInt(mapLiteralC.staticType);
+
+    ListLiteral listLiteralB =
+        (mapLiteralB.elements[0] as MapLiteralEntry).value;
+    ListLiteral listLiteralC =
+        (mapLiteralC.elements[0] as MapLiteralEntry).value;
+    assertListOfInt(listLiteralB.staticType);
+    assertListOfInt(listLiteralC.staticType);
+  }
+
+  test_instanceCreation() async {
+    String code = r'''
+      class A<S, T> {
+        S x;
+        T y;
+        A(this.x, this.y);
+        A.named(this.x, this.y);
+      }
+
+      class B<S, T> extends A<T, S> {
+        B(S y, T x) : super(x, y);
+        B.named(S y, T x) : super.named(x, y);
+      }
+
+      class C<S> extends B<S, S> {
+        C(S a) : super(a, a);
+        C.named(S a) : super.named(a, a);
+      }
+
+      class D<S, T> extends B<T, int> {
+        D(T a) : super(a, 3);
+        D.named(T a) : super.named(a, 3);
+      }
+
+      class E<S, T> extends A<C<S>, T> {
+        E(T a) : super(null, a);
+      }
+
+      class F<S, T> extends A<S, T> {
+        F(S x, T y, {List<S> a, List<T> b}) : super(x, y);
+        F.named(S x, T y, [S a, T b]) : super(a, b);
+      }
+
+      void test0() {
+        A<int, String> a0 = new A(3, "hello");
+        A<int, String> a1 = new A.named(3, "hello");
+        A<int, String> a2 = new A<int, String>(3, "hello");
+        A<int, String> a3 = new A<int, String>.named(3, "hello");
+        A<int, String> a4 = new A<int, dynamic>(3, "hello");
+        A<int, String> a5 = new A<dynamic, dynamic>.named(3, "hello");
+      }
+      void test1()  {
+        A<int, String> a0 = new A("hello", 3);
+        A<int, String> a1 = new A.named("hello", 3);
+      }
+      void test2() {
+        A<int, String> a0 = new B("hello", 3);
+        A<int, String> a1 = new B.named("hello", 3);
+        A<int, String> a2 = new B<String, int>("hello", 3);
+        A<int, String> a3 = new B<String, int>.named("hello", 3);
+        A<int, String> a4 = new B<String, dynamic>("hello", 3);
+        A<int, String> a5 = new B<dynamic, dynamic>.named("hello", 3);
+      }
+      void test3() {
+        A<int, String> a0 = new B(3, "hello");
+        A<int, String> a1 = new B.named(3, "hello");
+      }
+      void test4() {
+        A<int, int> a0 = new C(3);
+        A<int, int> a1 = new C.named(3);
+        A<int, int> a2 = new C<int>(3);
+        A<int, int> a3 = new C<int>.named(3);
+        A<int, int> a4 = new C<dynamic>(3);
+        A<int, int> a5 = new C<dynamic>.named(3);
+      }
+      void test5() {
+        A<int, int> a0 = new C("hello");
+        A<int, int> a1 = new C.named("hello");
+      }
+      void test6()  {
+        A<int, String> a0 = new D("hello");
+        A<int, String> a1 = new D.named("hello");
+        A<int, String> a2 = new D<int, String>("hello");
+        A<int, String> a3 = new D<String, String>.named("hello");
+        A<int, String> a4 = new D<num, dynamic>("hello");
+        A<int, String> a5 = new D<dynamic, dynamic>.named("hello");
+      }
+      void test7() {
+        A<int, String> a0 = new D(3);
+        A<int, String> a1 = new D.named(3);
+      }
+      void test8() {
+        A<C<int>, String> a0 = new E("hello");
+      }
+      void test9() { // Check named and optional arguments
+        A<int, String> a0 = new F(3, "hello", a: [3], b: ["hello"]);
+        A<int, String> a1 = new F(3, "hello", a: ["hello"], b:[3]);
+        A<int, String> a2 = new F.named(3, "hello", 3, "hello");
+        A<int, String> a3 = new F.named(3, "hello");
+        A<int, String> a4 = new F.named(3, "hello", "hello", 3);
+        A<int, String> a5 = new F.named(3, "hello", "hello");
+      }''';
+    CompilationUnit unit = await resolveSource(code);
+
+    Expression rhs(VariableDeclarationStatement stmt) {
+      VariableDeclaration decl = stmt.variables.variables[0];
+      Expression exp = decl.initializer;
+      return exp;
+    }
+
+    void hasType(Asserter<DartType> assertion, Expression exp) =>
+        assertion(exp.staticType);
+
+    Element elementA = AstFinder.getClass(unit, "A").declaredElement;
+    Element elementB = AstFinder.getClass(unit, "B").declaredElement;
+    Element elementC = AstFinder.getClass(unit, "C").declaredElement;
+    Element elementD = AstFinder.getClass(unit, "D").declaredElement;
+    Element elementE = AstFinder.getClass(unit, "E").declaredElement;
+    Element elementF = AstFinder.getClass(unit, "F").declaredElement;
+
+    AsserterBuilder<List<Asserter<DartType>>, DartType> assertAOf =
+        _isInstantiationOf(_hasElement(elementA));
+    AsserterBuilder<List<Asserter<DartType>>, DartType> assertBOf =
+        _isInstantiationOf(_hasElement(elementB));
+    AsserterBuilder<List<Asserter<DartType>>, DartType> assertCOf =
+        _isInstantiationOf(_hasElement(elementC));
+    AsserterBuilder<List<Asserter<DartType>>, DartType> assertDOf =
+        _isInstantiationOf(_hasElement(elementD));
+    AsserterBuilder<List<Asserter<DartType>>, DartType> assertEOf =
+        _isInstantiationOf(_hasElement(elementE));
+    AsserterBuilder<List<Asserter<DartType>>, DartType> assertFOf =
+        _isInstantiationOf(_hasElement(elementF));
+
+    {
+      List<Statement> statements =
+          AstFinder.getStatementsInTopLevelFunction(unit, "test0");
+
+      hasType(assertAOf([_isInt, _isString]), rhs(statements[0]));
+      hasType(assertAOf([_isInt, _isString]), rhs(statements[0]));
+      hasType(assertAOf([_isInt, _isString]), rhs(statements[1]));
+      hasType(assertAOf([_isInt, _isString]), rhs(statements[2]));
+      hasType(assertAOf([_isInt, _isString]), rhs(statements[3]));
+      hasType(assertAOf([_isInt, _isDynamic]), rhs(statements[4]));
+      hasType(assertAOf([_isDynamic, _isDynamic]), rhs(statements[5]));
+    }
+
+    {
+      List<Statement> statements =
+          AstFinder.getStatementsInTopLevelFunction(unit, "test1");
+      hasType(assertAOf([_isInt, _isString]), rhs(statements[0]));
+      hasType(assertAOf([_isInt, _isString]), rhs(statements[1]));
+    }
+
+    {
+      List<Statement> statements =
+          AstFinder.getStatementsInTopLevelFunction(unit, "test2");
+      hasType(assertBOf([_isString, _isInt]), rhs(statements[0]));
+      hasType(assertBOf([_isString, _isInt]), rhs(statements[1]));
+      hasType(assertBOf([_isString, _isInt]), rhs(statements[2]));
+      hasType(assertBOf([_isString, _isInt]), rhs(statements[3]));
+      hasType(assertBOf([_isString, _isDynamic]), rhs(statements[4]));
+      hasType(assertBOf([_isDynamic, _isDynamic]), rhs(statements[5]));
+    }
+
+    {
+      List<Statement> statements =
+          AstFinder.getStatementsInTopLevelFunction(unit, "test3");
+      hasType(assertBOf([_isString, _isInt]), rhs(statements[0]));
+      hasType(assertBOf([_isString, _isInt]), rhs(statements[1]));
+    }
+
+    {
+      List<Statement> statements =
+          AstFinder.getStatementsInTopLevelFunction(unit, "test4");
+      hasType(assertCOf([_isInt]), rhs(statements[0]));
+      hasType(assertCOf([_isInt]), rhs(statements[1]));
+      hasType(assertCOf([_isInt]), rhs(statements[2]));
+      hasType(assertCOf([_isInt]), rhs(statements[3]));
+      hasType(assertCOf([_isDynamic]), rhs(statements[4]));
+      hasType(assertCOf([_isDynamic]), rhs(statements[5]));
+    }
+
+    {
+      List<Statement> statements =
+          AstFinder.getStatementsInTopLevelFunction(unit, "test5");
+      hasType(assertCOf([_isInt]), rhs(statements[0]));
+      hasType(assertCOf([_isInt]), rhs(statements[1]));
+    }
+
+    {
+      // The first type parameter is not constrained by the
+      // context.  We could choose a tighter type, but currently
+      // we just use dynamic.
+      List<Statement> statements =
+          AstFinder.getStatementsInTopLevelFunction(unit, "test6");
+      hasType(assertDOf([_isDynamic, _isString]), rhs(statements[0]));
+      hasType(assertDOf([_isDynamic, _isString]), rhs(statements[1]));
+      hasType(assertDOf([_isInt, _isString]), rhs(statements[2]));
+      hasType(assertDOf([_isString, _isString]), rhs(statements[3]));
+      hasType(assertDOf([_isNum, _isDynamic]), rhs(statements[4]));
+      hasType(assertDOf([_isDynamic, _isDynamic]), rhs(statements[5]));
+    }
+
+    {
+      List<Statement> statements =
+          AstFinder.getStatementsInTopLevelFunction(unit, "test7");
+      hasType(assertDOf([_isDynamic, _isString]), rhs(statements[0]));
+      hasType(assertDOf([_isDynamic, _isString]), rhs(statements[1]));
+    }
+
+    {
+      List<Statement> statements =
+          AstFinder.getStatementsInTopLevelFunction(unit, "test8");
+      hasType(assertEOf([_isInt, _isString]), rhs(statements[0]));
+    }
+
+    {
+      List<Statement> statements =
+          AstFinder.getStatementsInTopLevelFunction(unit, "test9");
+      hasType(assertFOf([_isInt, _isString]), rhs(statements[0]));
+      hasType(assertFOf([_isInt, _isString]), rhs(statements[1]));
+      hasType(assertFOf([_isInt, _isString]), rhs(statements[2]));
+      hasType(assertFOf([_isInt, _isString]), rhs(statements[3]));
+      hasType(assertFOf([_isInt, _isString]), rhs(statements[4]));
+      hasType(assertFOf([_isInt, _isString]), rhs(statements[5]));
+    }
+  }
+
+  test_listLiteral_nested() async {
+    String code = r'''
+      void main () {
+        List<List<int>> l0 = [[]];
+        Iterable<List<int>> l1 = [[3]];
+        Iterable<List<int>> l2 = [[3], [4]];
+        List<List<int>> l3 = [["hello", 3], []];
+     }
+   ''';
+    CompilationUnit unit = await resolveSource(code);
+    List<Statement> statements =
+        AstFinder.getStatementsInTopLevelFunction(unit, "main");
+    ListLiteral literal(int i) {
+      VariableDeclarationStatement stmt = statements[i];
+      VariableDeclaration decl = stmt.variables.variables[0];
+      ListLiteral exp = decl.initializer;
+      return exp;
+    }
+
+    Asserter<InterfaceType> assertListOfInt = _isListOf(_isInt);
+    Asserter<InterfaceType> assertListOfListOfInt =
+        _isListOf((DartType type) => assertListOfInt(type));
+
+    assertListOfListOfInt(literal(0).staticType);
+    assertListOfListOfInt(literal(1).staticType);
+    assertListOfListOfInt(literal(2).staticType);
+    assertListOfListOfInt(literal(3).staticType);
+
+    assertListOfInt((literal(1).elements[0] as Expression).staticType);
+    assertListOfInt((literal(2).elements[0] as Expression).staticType);
+    assertListOfInt((literal(3).elements[0] as Expression).staticType);
+  }
+
+  test_listLiteral_simple() async {
+    String code = r'''
+      void main () {
+        List<int> l0 = [];
+        List<int> l1 = [3];
+        List<int> l2 = ["hello"];
+        List<int> l3 = ["hello", 3];
+     }
+   ''';
+    CompilationUnit unit = await resolveSource(code);
+    List<Statement> statements =
+        AstFinder.getStatementsInTopLevelFunction(unit, "main");
+    DartType literal(int i) {
+      VariableDeclarationStatement stmt = statements[i];
+      VariableDeclaration decl = stmt.variables.variables[0];
+      ListLiteral exp = decl.initializer;
+      return exp.staticType;
+    }
+
+    Asserter<InterfaceType> assertListOfInt = _isListOf(_isInt);
+
+    assertListOfInt(literal(0));
+    assertListOfInt(literal(1));
+    assertListOfInt(literal(2));
+    assertListOfInt(literal(3));
+  }
+
+  test_listLiteral_simple_const() async {
+    String code = r'''
+      void main () {
+        const List<int> c0 = const [];
+        const List<int> c1 = const [3];
+        const List<int> c2 = const ["hello"];
+        const List<int> c3 = const ["hello", 3];
+     }
+   ''';
+    CompilationUnit unit = await resolveSource(code);
+    List<Statement> statements =
+        AstFinder.getStatementsInTopLevelFunction(unit, "main");
+    DartType literal(int i) {
+      VariableDeclarationStatement stmt = statements[i];
+      VariableDeclaration decl = stmt.variables.variables[0];
+      ListLiteral exp = decl.initializer;
+      return exp.staticType;
+    }
+
+    Asserter<InterfaceType> assertListOfInt = _isListOf(_isInt);
+
+    assertListOfInt(literal(0));
+    assertListOfInt(literal(1));
+    assertListOfInt(literal(2));
+    assertListOfInt(literal(3));
+  }
+
+  test_listLiteral_simple_disabled() async {
+    String code = r'''
+      void main () {
+        List<int> l0 = <num>[];
+        List<int> l1 = <num>[3];
+        List<int> l2 = <String>["hello"];
+        List<int> l3 = <dynamic>["hello", 3];
+     }
+   ''';
+    CompilationUnit unit = await resolveSource(code);
+    List<Statement> statements =
+        AstFinder.getStatementsInTopLevelFunction(unit, "main");
+    DartType literal(int i) {
+      VariableDeclarationStatement stmt = statements[i];
+      VariableDeclaration decl = stmt.variables.variables[0];
+      ListLiteral exp = decl.initializer;
+      return exp.staticType;
+    }
+
+    _isListOf(_isNum)(literal(0));
+    _isListOf(_isNum)(literal(1));
+    _isListOf(_isString)(literal(2));
+    _isListOf(_isDynamic)(literal(3));
+  }
+
+  test_listLiteral_simple_subtype() async {
+    String code = r'''
+      void main () {
+        Iterable<int> l0 = [];
+        Iterable<int> l1 = [3];
+        Iterable<int> l2 = ["hello"];
+        Iterable<int> l3 = ["hello", 3];
+     }
+   ''';
+    CompilationUnit unit = await resolveSource(code);
+    List<Statement> statements =
+        AstFinder.getStatementsInTopLevelFunction(unit, "main");
+    DartType literal(int i) {
+      VariableDeclarationStatement stmt = statements[i];
+      VariableDeclaration decl = stmt.variables.variables[0];
+      ListLiteral exp = decl.initializer;
+      return exp.staticType;
+    }
+
+    Asserter<InterfaceType> assertListOfInt = _isListOf(_isInt);
+
+    assertListOfInt(literal(0));
+    assertListOfInt(literal(1));
+    assertListOfInt(literal(2));
+    assertListOfInt(literal(3));
+  }
+
+  test_mapLiteral_nested() async {
+    String code = r'''
+      void main () {
+        Map<int, List<String>> l0 = {};
+        Map<int, List<String>> l1 = {3: ["hello"]};
+        Map<int, List<String>> l2 = {"hello": ["hello"]};
+        Map<int, List<String>> l3 = {3: [3]};
+        Map<int, List<String>> l4 = {3:["hello"], "hello": [3]};
+     }
+   ''';
+    CompilationUnit unit = await resolveSource(code);
+    List<Statement> statements =
+        AstFinder.getStatementsInTopLevelFunction(unit, "main");
+    SetOrMapLiteral literal(int i) {
+      VariableDeclarationStatement stmt = statements[i];
+      VariableDeclaration decl = stmt.variables.variables[0];
+      SetOrMapLiteral exp = decl.initializer;
+      return exp;
+    }
+
+    Asserter<InterfaceType> assertListOfString = _isListOf(_isString);
+    Asserter<InterfaceType> assertMapOfIntToListOfString =
+        _isMapOf(_isInt, (DartType type) => assertListOfString(type));
+
+    assertMapOfIntToListOfString(literal(0).staticType);
+    assertMapOfIntToListOfString(literal(1).staticType);
+    assertMapOfIntToListOfString(literal(2).staticType);
+    assertMapOfIntToListOfString(literal(3).staticType);
+    assertMapOfIntToListOfString(literal(4).staticType);
+
+    assertListOfString(
+        (literal(1).elements[0] as MapLiteralEntry).value.staticType);
+    assertListOfString(
+        (literal(2).elements[0] as MapLiteralEntry).value.staticType);
+    assertListOfString(
+        (literal(3).elements[0] as MapLiteralEntry).value.staticType);
+    assertListOfString(
+        (literal(4).elements[0] as MapLiteralEntry).value.staticType);
+  }
+
+  test_mapLiteral_simple() async {
+    String code = r'''
+      void main () {
+        Map<int, String> l0 = {};
+        Map<int, String> l1 = {3: "hello"};
+        Map<int, String> l2 = {"hello": "hello"};
+        Map<int, String> l3 = {3: 3};
+        Map<int, String> l4 = {3:"hello", "hello": 3};
+     }
+   ''';
+    CompilationUnit unit = await resolveSource(code);
+    List<Statement> statements =
+        AstFinder.getStatementsInTopLevelFunction(unit, "main");
+    DartType literal(int i) {
+      VariableDeclarationStatement stmt = statements[i];
+      VariableDeclaration decl = stmt.variables.variables[0];
+      SetOrMapLiteral exp = decl.initializer;
+      return exp.staticType;
+    }
+
+    Asserter<InterfaceType> assertMapOfIntToString =
+        _isMapOf(_isInt, _isString);
+
+    assertMapOfIntToString(literal(0));
+    assertMapOfIntToString(literal(1));
+    assertMapOfIntToString(literal(2));
+    assertMapOfIntToString(literal(3));
+  }
+
+  test_mapLiteral_simple_disabled() async {
+    String code = r'''
+      void main () {
+        Map<int, String> l0 = <int, dynamic>{};
+        Map<int, String> l1 = <int, dynamic>{3: "hello"};
+        Map<int, String> l2 = <int, dynamic>{"hello": "hello"};
+        Map<int, String> l3 = <int, dynamic>{3: 3};
+     }
+   ''';
+    CompilationUnit unit = await resolveSource(code);
+    List<Statement> statements =
+        AstFinder.getStatementsInTopLevelFunction(unit, "main");
+    DartType literal(int i) {
+      VariableDeclarationStatement stmt = statements[i];
+      VariableDeclaration decl = stmt.variables.variables[0];
+      SetOrMapLiteral exp = decl.initializer;
+      return exp.staticType;
+    }
+
+    Asserter<InterfaceType> assertMapOfIntToDynamic =
+        _isMapOf(_isInt, _isDynamic);
+
+    assertMapOfIntToDynamic(literal(0));
+    assertMapOfIntToDynamic(literal(1));
+    assertMapOfIntToDynamic(literal(2));
+    assertMapOfIntToDynamic(literal(3));
+  }
+
+  test_methodDeclaration_body_propagation() async {
+    String code = r'''
+      class A {
+        List<String> m0(int x) => ["hello"];
+        List<String> m1(int x) {return [3];}
+      }
+   ''';
+    CompilationUnit unit = await resolveSource(code);
+    Expression methodReturnValue(String methodName) {
+      MethodDeclaration method =
+          AstFinder.getMethodInClass(unit, "A", methodName);
+      FunctionBody body = method.body;
+      if (body is ExpressionFunctionBody) {
+        return body.expression;
+      } else {
+        Statement stmt = (body as BlockFunctionBody).block.statements[0];
+        return (stmt as ReturnStatement).expression;
+      }
+    }
+
+    Asserter<InterfaceType> assertListOfString = _isListOf(_isString);
+    assertListOfString(methodReturnValue("m0").staticType);
+    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.declaredElement;
+    FunctionType type = f0.type;
+    _isFunction2Of(_isString, _isInt)(type);
+  }
+
+  test_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.INVALID_CAST_LITERAL]);
+    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").declaredElement;
+
+    _isInstantiationOf(_hasElement(elementB))([_isNull])(type);
+  }
+
+  test_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").declaredElement;
+
+    _isInstantiationOf(_hasElement(elementB))([_isNum])(type);
+  }
+
+  test_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.INVALID_CAST_LITERAL,
+    ]);
+    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").declaredElement;
+
+    _isInstantiationOf(_hasElement(elementB))([_isNull])(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").declaredElement;
+
+    _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").declaredElement;
+
+    _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").declaredElement;
+
+    _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").declaredElement;
+
+    _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").declaredElement;
+
+    _isInstantiationOf(_hasElement(elementA))([_isNum, _isNum])(type);
+  }
+
+  test_redirectedConstructor_named() async {
+    Source source = addSource(r'''
+class A<T, U> implements B<T, U> {
+  A.named();
+}
+
+class B<T2, U2> {
+  factory B() = A.named;
+}
+   ''');
+    TestAnalysisResult result = await computeAnalysisResult(source);
+    assertNoErrors(source);
+
+    ClassDeclaration b = result.unit.declarations[1];
+    ConstructorDeclaration bConstructor = b.members[0];
+    ConstructorName redirected = bConstructor.redirectedConstructor;
+
+    TypeName typeName = redirected.type;
+    expect(typeName.type.toString(), 'A<T2, U2>');
+    expect(typeName.type.toString(), 'A<T2, U2>');
+
+    var constructorMember = redirected.staticElement;
+    expect(constructorMember.toString(), 'A.named() → A<T2, U2>');
+    expect(redirected.name.staticElement, constructorMember);
+  }
+
+  test_redirectedConstructor_self() async {
+    Source source = addSource(r'''
+class A<T> {
+  A();
+  factory A.redirected() = A;
+}
+   ''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+  }
+
+  test_redirectedConstructor_unnamed() async {
+    Source source = addSource(r'''
+class A<T, U> implements B<T, U> {
+  A();
+}
+
+class B<T2, U2> {
+  factory B() = A;
+}
+   ''');
+    TestAnalysisResult result = await computeAnalysisResult(source);
+    assertNoErrors(source);
+
+    ClassDeclaration b = result.unit.declarations[1];
+    ConstructorDeclaration bConstructor = b.members[0];
+    ConstructorName redirected = bConstructor.redirectedConstructor;
+
+    TypeName typeName = redirected.type;
+    expect(typeName.type.toString(), 'A<T2, U2>');
+    expect(typeName.type.toString(), 'A<T2, U2>');
+
+    expect(redirected.name, isNull);
+    expect(redirected.staticElement.toString(), 'A() → A<T2, U2>');
+  }
+
+  test_redirectingConstructor_propagation() async {
+    String code = r'''
+      class A {
+        A() : this.named([]);
+        A.named(List<String> x);
+      }
+   ''';
+    CompilationUnit unit = await resolveSource(code);
+
+    ConstructorDeclaration constructor =
+        AstFinder.getConstructorInClass(unit, "A", null);
+    RedirectingConstructorInvocation invocation = constructor.initializers[0];
+    Expression exp = invocation.argumentList.arguments[0];
+    _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_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);
+  }
+
+  test_returnType_variance3() async {
+    // Check that the variance heuristic chooses the most 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];
+    _isInt(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_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);
+  }
+
+  test_superConstructorInvocation_propagation() async {
+    String code = r'''
+      class B {
+        B(List<String> p);
+      }
+      class A extends B {
+        A() : super([]);
+      }
+   ''';
+    CompilationUnit unit = await resolveSource(code);
+
+    ConstructorDeclaration constructor =
+        AstFinder.getConstructorInClass(unit, "A", null);
+    SuperConstructorInvocation invocation = constructor.initializers[0];
+    Expression exp = invocation.argumentList.arguments[0];
+    _isListOf(_isString)(exp.staticType);
+  }
+
+  test_sync_star_method_propagation() async {
+    String code = r'''
+      import "dart:async";
+      class A {
+        Iterable f0() sync* { yield []; }
+        Iterable f1() sync* { yield* new List(); }
+
+        Iterable<List<int>> f2() sync* { yield []; }
+        Iterable<List<int>> f3() sync* { yield* new List(); }
+      }
+   ''';
+    CompilationUnit unit = await resolveSource(code);
+
+    void check(String name, Asserter<InterfaceType> typeTest) {
+      MethodDeclaration test = AstFinder.getMethodInClass(unit, "A", name);
+      BlockFunctionBody body = test.body;
+      YieldStatement stmt = body.block.statements[0];
+      Expression exp = stmt.expression;
+      typeTest(exp.staticType);
+    }
+
+    check("f0", _isListOf(_isDynamic));
+    check("f1", _isListOf(_isDynamic));
+
+    check("f2", _isListOf(_isInt));
+    check("f3", _isListOf((DartType type) => _isListOf(_isInt)(type)));
+  }
+
+  test_sync_star_propagation() async {
+    String code = r'''
+      import "dart:async";
+
+      Iterable f0() sync* { yield []; }
+      Iterable f1() sync* { yield* new List(); }
+
+      Iterable<List<int>> f2() sync* { yield []; }
+      Iterable<List<int>> f3() sync* { yield* new List(); }
+   ''';
+    CompilationUnit unit = await resolveSource(code);
+
+    void check(String name, Asserter<InterfaceType> typeTest) {
+      FunctionDeclaration test = AstFinder.getTopLevelFunction(unit, name);
+      BlockFunctionBody body = test.functionExpression.body;
+      YieldStatement stmt = body.block.statements[0];
+      Expression exp = stmt.expression;
+      typeTest(exp.staticType);
+    }
+
+    check("f0", _isListOf(_isDynamic));
+    check("f1", _isListOf(_isDynamic));
+
+    check("f2", _isListOf(_isInt));
+    check("f3", _isListOf((DartType type) => _isListOf(_isInt)(type)));
+  }
+
+  /// Verifies the source has the expected [errorCodes] as well as the
+  /// expected [errorMessage].
+  void _expectInferenceError(
+      Source source, List<ErrorCode> errorCodes, String errorMessage) {
+    assertErrors(source, errorCodes);
+    var errors = analysisResults[source]
+        .errors
+        .where((e) => e.errorCode == StrongModeCode.COULD_NOT_INFER)
+        .map((e) => e.message)
+        .toList();
+    expect(errors.length, 1);
+    var actual = errors[0];
+    expect(actual,
+        errorMessage, // Print the literal error message for easy copy+paste:
+        reason: 'Actual error did not match expected error:\n$actual');
+  }
+
+  /// Helper method for testing `FutureOr<T>`.
+  ///
+  /// Validates that [code] produces [errors]. It should define a function
+  /// "test", whose body is an expression that invokes a method. Returns that
+  /// invocation.
+  Future<MethodInvocation> _testFutureOr(String code,
+      {List<ErrorCode> errors}) async {
+    Source source = addSource("""
+    import "dart:async";
+    $code""");
+    TestAnalysisResult analysisResult = await computeAnalysisResult(source);
+
+    if (errors == null) {
+      assertNoErrors(source);
+    } else {
+      assertErrors(source, errors);
+    }
+    verify([source]);
+    FunctionDeclaration test =
+        AstFinder.getTopLevelFunction(analysisResult.unit, "test");
+    ExpressionFunctionBody body = test.functionExpression.body;
+    return body.expression;
+  }
+}
+
+@reflectiveTest
+class StrongModeStaticTypeAnalyzer2Test extends StaticTypeAnalyzer2TestShared
+    with StrongModeStaticTypeAnalyzer2TestCases {
+  void setUp() {
+    super.setUp();
+    AnalysisOptionsImpl options = new AnalysisOptionsImpl();
+    resetWith(options: options);
+  }
+
+  @failingTest
+  @override
+  test_genericFunction_parameter() {
+    return super.test_genericFunction_parameter();
+  }
+
+  @failingTest
+  @override
+  test_genericMethod_functionExpressionInvocation_functionTypedParameter_explicit() {
+    return super
+        .test_genericMethod_functionExpressionInvocation_functionTypedParameter_explicit();
+  }
+
+  @failingTest
+  @override
+  test_genericMethod_functionExpressionInvocation_functionTypedParameter_inferred() {
+    return super
+        .test_genericMethod_functionExpressionInvocation_functionTypedParameter_inferred();
+  }
+
+  @failingTest
+  @override
+  test_genericMethod_functionInvocation_functionTypedParameter_explicit() {
+    return super
+        .test_genericMethod_functionInvocation_functionTypedParameter_explicit();
+  }
+
+  @failingTest
+  @override
+  test_genericMethod_functionInvocation_functionTypedParameter_inferred() {
+    return super
+        .test_genericMethod_functionInvocation_functionTypedParameter_inferred();
+  }
+
+  @failingTest
+  @override
+  test_genericMethod_functionTypedParameter_tearoff() {
+    return super.test_genericMethod_functionTypedParameter_tearoff();
+  }
+
+  @override
+  @failingTest
+  test_genericMethod_nestedCaptureBounds() {
+    // https://github.com/dart-lang/sdk/issues/30236
+    return super.test_genericMethod_nestedCaptureBounds();
+  }
+
+  @override
+  @failingTest
+  test_genericMethod_tearoff_instantiated() {
+    return super.test_genericMethod_tearoff_instantiated();
+  }
+}
+
+/// Test cases for [StrongModeStaticTypeAnalyzer2Test]
+mixin StrongModeStaticTypeAnalyzer2TestCases
+    implements StaticTypeAnalyzer2TestShared {
+  void expectStaticInvokeType(String search, String type) {
+    var invocation = findIdentifier(search).parent as MethodInvocation;
+    expect(invocation.staticInvokeType.toString(), type);
+  }
+
+  test_dynamicObjectGetter_hashCode() async {
+    String code = r'''
+main() {
+  dynamic a = null;
+  var foo = a.hashCode;
+}
+''';
+    await resolveTestUnit(code);
+    expectInitializerType('foo', 'int');
+  }
+
+  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_promotion3() async {
+    // Test that promotion from FutureOr<T> to T works for type
+    // parameters T
+    String code = r'''
+    import "dart:async";
+    dynamic test<T extends num>(FutureOr<T> x) => (x is T) &&
+                                                  (x.abs() == 0);
+   ''';
+    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_generalizedVoid_assignToVoidOk() async {
+    Source source = addSource(r'''
+void main() {
+  void x;
+  x = 42;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+  }
+
+  test_genericFunction() async {
+    await resolveTestUnit(r'T f<T>(T x) => null;');
+    expectFunctionType('f', '<T>(T) → T',
+        elementTypeParams: '[T]', typeFormals: '[T]');
+    SimpleIdentifier f = findIdentifier('f');
+    FunctionElementImpl e = f.staticElement;
+    FunctionType ft = e.type.instantiate([typeProvider.stringType]);
+    expect(ft.toString(), '(String) → String');
+  }
+
+  test_genericFunction_bounds() async {
+    await resolveTestUnit(r'T f<T extends num>(T x) => null;');
+    expectFunctionType('f', '<T extends num>(T) → T',
+        elementTypeParams: '[T extends num]', typeFormals: '[T extends num]');
+  }
+
+  test_genericFunction_parameter() async {
+    await resolveTestUnit(r'''
+void g(T f<T>(T x)) {}
+''', noErrors: false // TODO(paulberry): remove when dartbug.com/28515 fixed.
+        );
+    expectFunctionType('f', '<T>(T) → T',
+        elementTypeParams: '[]', typeFormals: '[T]');
+    SimpleIdentifier f = findIdentifier('f');
+    ParameterElementImpl e = f.staticElement;
+    FunctionType type = e.type;
+    FunctionType ft = type.instantiate([typeProvider.stringType]);
+    expect(ft.toString(), '(String) → String');
+  }
+
+  test_genericFunction_static() async {
+    await resolveTestUnit(r'''
+class C<E> {
+  static T f<T>(T x) => null;
+}
+''');
+    expectFunctionType('f', '<T>(T) → T',
+        elementTypeParams: '[T]', typeFormals: '[T]');
+    SimpleIdentifier f = findIdentifier('f');
+    MethodElementImpl e = f.staticElement;
+    FunctionType ft = e.type.instantiate([typeProvider.stringType]);
+    expect(ft.toString(), '(String) → String');
+  }
+
+  test_genericFunction_typedef() async {
+    String code = r'''
+typedef T F<T>(T x);
+F f0;
+
+class C {
+  static F f1;
+  F f2;
+  void g(F f3) {
+    F f4;
+    f0(3);
+    f1(3);
+    f2(3);
+    f3(3);
+    f4(3);
+  }
+}
+
+class D<S> {
+  static F f1;
+  F f2;
+  void g(F f3) {
+    F f4;
+    f0(3);
+    f1(3);
+    f2(3);
+    f3(3);
+    f4(3);
+  }
+}
+''';
+    await resolveTestUnit(code);
+
+    checkBody(String className) {
+      List<Statement> statements =
+          AstFinder.getStatementsInMethod(testUnit, className, "g");
+
+      for (int i = 1; i <= 5; i++) {
+        Expression exp = (statements[i] as ExpressionStatement).expression;
+        expect(exp.staticType, typeProvider.dynamicType);
+      }
+    }
+
+    checkBody("C");
+    checkBody("D");
+  }
+
+  test_genericFunction_upwardsAndDownwards() async {
+    // Regression tests for https://github.com/dart-lang/sdk/issues/27586.
+    await resolveTestUnit(r'List<num> x = [1, 2];');
+    expectInitializerType('x', 'List<num>');
+  }
+
+  test_genericFunction_upwardsAndDownwards_Object() async {
+    // Regression tests for https://github.com/dart-lang/sdk/issues/27625.
+    await resolveTestUnit(r'''
+List<Object> aaa = [];
+List<Object> bbb = [1, 2, 3];
+List<Object> ccc = [null];
+List<Object> ddd = [1 as dynamic];
+List<Object> eee = [new Object()];
+    ''');
+    expectInitializerType('aaa', 'List<Object>');
+    expectInitializerType('bbb', 'List<Object>');
+    expectInitializerType('ccc', 'List<Object>');
+    expectInitializerType('ddd', 'List<Object>');
+    expectInitializerType('eee', 'List<Object>');
+  }
+
+  test_genericMethod() async {
+    await resolveTestUnit(r'''
+class C<E> {
+  List<T> f<T>(E e) => null;
+}
+main() {
+  C<String> cOfString;
+}
+''');
+    expectFunctionType('f', '<T>(E) → List<T>',
+        elementTypeParams: '[T]',
+        typeParams: '[E]',
+        typeArgs: '[E]',
+        typeFormals: '[T]');
+    SimpleIdentifier c = findIdentifier('cOfString');
+    FunctionType ft = (c.staticType as InterfaceType).getMethod('f').type;
+    expect(ft.toString(), '<T>(String) → List<T>');
+    ft = ft.instantiate([typeProvider.intType]);
+    expect(ft.toString(), '(String) → List<int>');
+    expect('${ft.typeArguments}/${ft.typeParameters}', '[String, int]/[E, T]');
+  }
+
+  test_genericMethod_explicitTypeParams() async {
+    await resolveTestUnit(r'''
+class C<E> {
+  List<T> f<T>(E e) => null;
+}
+main() {
+  C<String> cOfString;
+  var x = cOfString.f<int>('hi');
+}
+''');
+    MethodInvocation f = findIdentifier('f<int>').parent;
+    FunctionType ft = f.staticInvokeType;
+    expect(ft.toString(), '(String) → List<int>');
+    expect('${ft.typeArguments}/${ft.typeParameters}', '[String, int]/[E, T]');
+
+    SimpleIdentifier x = findIdentifier('x');
+    expect(x.staticType,
+        typeProvider.listType.instantiate([typeProvider.intType]));
+  }
+
+  test_genericMethod_functionExpressionInvocation_explicit() async {
+    await resolveTestUnit(r'''
+class C<E> {
+  T f<T>(T e) => null;
+  static T g<T>(T e) => null;
+  static T Function<T>(T) h = null;
+}
+
+T topF<T>(T e) => null;
+var topG = topF;
+void test<S>(T Function<T>(T) pf) {
+  var c = new C<int>();
+  T lf<T>(T e) => null;
+
+  var lambdaCall = (<E>(E e) => e)<int>(3);
+  var methodCall = (c.f)<int>(3);
+  var staticCall = (C.g)<int>(3);
+  var staticFieldCall = (C.h)<int>(3);
+  var topFunCall = (topF)<int>(3);
+  var topFieldCall = (topG)<int>(3);
+  var localCall = (lf)<int>(3);
+  var paramCall = (pf)<int>(3);
+}
+''');
+    expectIdentifierType('methodCall', "int");
+    expectIdentifierType('staticCall', "int");
+    expectIdentifierType('staticFieldCall', "int");
+    expectIdentifierType('topFunCall', "int");
+    expectIdentifierType('topFieldCall', "int");
+    expectIdentifierType('localCall', "int");
+    expectIdentifierType('paramCall', "int");
+    expectIdentifierType('lambdaCall', "int");
+  }
+
+  test_genericMethod_functionExpressionInvocation_functionTypedParameter_explicit() async {
+    await resolveTestUnit(r'''
+void test<S>(T pf<T>(T e)) {
+  var paramCall = (pf)<int>(3);
+}
+''', noErrors: false // TODO(paulberry): remove when dartbug.com/28515 fixed.
+        );
+    expectIdentifierType('paramCall', "int");
+  }
+
+  test_genericMethod_functionExpressionInvocation_functionTypedParameter_inferred() async {
+    await resolveTestUnit(r'''
+void test<S>(T pf<T>(T e)) {
+  var paramCall = (pf)(3);
+}
+''', noErrors: false // TODO(paulberry): remove when dartbug.com/28515 fixed.
+        );
+    expectIdentifierType('paramCall', "int");
+  }
+
+  test_genericMethod_functionExpressionInvocation_inferred() async {
+    await resolveTestUnit(r'''
+class C<E> {
+  T f<T>(T e) => null;
+  static T g<T>(T e) => null;
+  static T Function<T>(T) h = null;
+}
+
+T topF<T>(T e) => null;
+var topG = topF;
+void test<S>(T Function<T>(T) pf) {
+  var c = new C<int>();
+  T lf<T>(T e) => null;
+
+  var lambdaCall = (<E>(E e) => e)(3);
+  var methodCall = (c.f)(3);
+  var staticCall = (C.g)(3);
+  var staticFieldCall = (C.h)(3);
+  var topFunCall = (topF)(3);
+  var topFieldCall = (topG)(3);
+  var localCall = (lf)(3);
+  var paramCall = (pf)(3);
+}
+''', noErrors: false // TODO(paulberry): remove when dartbug.com/28515 fixed.
+        );
+    expectIdentifierType('methodCall', "int");
+    expectIdentifierType('staticCall', "int");
+    expectIdentifierType('staticFieldCall', "int");
+    expectIdentifierType('topFunCall', "int");
+    expectIdentifierType('topFieldCall', "int");
+    expectIdentifierType('localCall', "int");
+    expectIdentifierType('paramCall', "int");
+    expectIdentifierType('lambdaCall', "int");
+  }
+
+  test_genericMethod_functionInvocation_explicit() async {
+    await resolveTestUnit(r'''
+class C<E> {
+  T f<T>(T e) => null;
+  static T g<T>(T e) => null;
+  static T Function<T>(T) h = null;
+}
+
+T topF<T>(T e) => null;
+var topG = topF;
+void test<S>(T Function<T>(T) pf) {
+  var c = new C<int>();
+  T lf<T>(T e) => null;
+  var methodCall = c.f<int>(3);
+  var staticCall = C.g<int>(3);
+  var staticFieldCall = C.h<int>(3);
+  var topFunCall = topF<int>(3);
+  var topFieldCall = topG<int>(3);
+  var localCall = lf<int>(3);
+  var paramCall = pf<int>(3);
+}
+''');
+    expectIdentifierType('methodCall', "int");
+    expectIdentifierType('staticCall', "int");
+    expectIdentifierType('staticFieldCall', "int");
+    expectIdentifierType('topFunCall', "int");
+    expectIdentifierType('topFieldCall', "int");
+    expectIdentifierType('localCall', "int");
+    expectIdentifierType('paramCall', "int");
+  }
+
+  test_genericMethod_functionInvocation_functionTypedParameter_explicit() async {
+    await resolveTestUnit(r'''
+void test<S>(T pf<T>(T e)) {
+  var paramCall = pf<int>(3);
+}
+''', noErrors: false // TODO(paulberry): remove when dartbug.com/28515 fixed.
+        );
+    expectIdentifierType('paramCall', "int");
+  }
+
+  test_genericMethod_functionInvocation_functionTypedParameter_inferred() async {
+    await resolveTestUnit(r'''
+void test<S>(T pf<T>(T e)) {
+  var paramCall = pf(3);
+}
+''', noErrors: false // TODO(paulberry): remove when dartbug.com/28515 fixed.
+        );
+    expectIdentifierType('paramCall', "int");
+  }
+
+  test_genericMethod_functionInvocation_inferred() async {
+    await resolveTestUnit(r'''
+class C<E> {
+  T f<T>(T e) => null;
+  static T g<T>(T e) => null;
+  static T Function<T>(T) h = null;
+}
+
+T topF<T>(T e) => null;
+var topG = topF;
+void test<S>(T Function<T>(T) pf) {
+  var c = new C<int>();
+  T lf<T>(T e) => null;
+  var methodCall = c.f(3);
+  var staticCall = C.g(3);
+  var staticFieldCall = C.h(3);
+  var topFunCall = topF(3);
+  var topFieldCall = topG(3);
+  var localCall = lf(3);
+  var paramCall = pf(3);
+}
+''');
+    expectIdentifierType('methodCall', "int");
+    expectIdentifierType('staticCall', "int");
+    expectIdentifierType('staticFieldCall', "int");
+    expectIdentifierType('topFunCall', "int");
+    expectIdentifierType('topFieldCall', "int");
+    expectIdentifierType('localCall', "int");
+    expectIdentifierType('paramCall', "int");
+  }
+
+  test_genericMethod_functionTypedParameter() async {
+    await resolveTestUnit(r'''
+class C<E> {
+  List<T> f<T>(T f(E e)) => null;
+}
+main() {
+  C<String> cOfString;
+}
+''');
+    expectFunctionType('f', '<T>((E) → T) → List<T>',
+        elementTypeParams: '[T]',
+        typeParams: '[E]',
+        typeArgs: '[E]',
+        typeFormals: '[T]');
+
+    SimpleIdentifier c = findIdentifier('cOfString');
+    FunctionType ft = (c.staticType as InterfaceType).getMethod('f').type;
+    expect(ft.toString(), '<T>((String) → T) → List<T>');
+    ft = ft.instantiate([typeProvider.intType]);
+    expect(ft.toString(), '((String) → int) → List<int>');
+  }
+
+  test_genericMethod_functionTypedParameter_tearoff() async {
+    await resolveTestUnit(r'''
+void test<S>(T pf<T>(T e)) {
+  var paramTearOff = pf;
+}
+''', noErrors: false // TODO(paulberry): remove when dartbug.com/28515 fixed.
+        );
+    expectIdentifierType('paramTearOff', "<T>(T) → T");
+  }
+
+  test_genericMethod_implicitDynamic() async {
+    // Regression test for:
+    // https://github.com/dart-lang/sdk/issues/25100#issuecomment-162047588
+    // These should not cause any hints or warnings.
+    await resolveTestUnit(r'''
+class List<E> {
+  T map<T>(T f(E e)) => null;
+}
+void foo() {
+  List list = null;
+  list.map((e) => e);
+  list.map((e) => 3);
+}''');
+    expectIdentifierType('map((e) => e);', '<T>((dynamic) → T) → T');
+    expectIdentifierType('map((e) => 3);', '<T>((dynamic) → T) → T');
+
+    MethodInvocation m1 = findIdentifier('map((e) => e);').parent;
+    expect(m1.staticInvokeType.toString(), '((dynamic) → dynamic) → dynamic');
+    MethodInvocation m2 = findIdentifier('map((e) => 3);').parent;
+    expect(m2.staticInvokeType.toString(), '((dynamic) → int) → int');
+  }
+
+  test_genericMethod_max_doubleDouble() async {
+    String code = r'''
+import 'dart:math';
+main() {
+  var foo = max(1.0, 2.0);
+}
+''';
+    await resolveTestUnit(code);
+    expectInitializerType('foo', 'double');
+  }
+
+  test_genericMethod_max_doubleDouble_prefixed() async {
+    String code = r'''
+import 'dart:math' as math;
+main() {
+  var foo = math.max(1.0, 2.0);
+}
+''';
+    await resolveTestUnit(code);
+    expectInitializerType('foo', 'double');
+  }
+
+  test_genericMethod_max_doubleInt() async {
+    String code = r'''
+import 'dart:math';
+main() {
+  var foo = max(1.0, 2);
+}
+''';
+    await resolveTestUnit(code);
+    expectInitializerType('foo', 'num');
+  }
+
+  test_genericMethod_max_intDouble() async {
+    String code = r'''
+import 'dart:math';
+main() {
+  var foo = max(1, 2.0);
+}
+''';
+    await resolveTestUnit(code);
+    expectInitializerType('foo', 'num');
+  }
+
+  test_genericMethod_max_intInt() async {
+    String code = r'''
+import 'dart:math';
+main() {
+  var foo = max(1, 2);
+}
+''';
+    await resolveTestUnit(code);
+    expectInitializerType('foo', 'int');
+  }
+
+  test_genericMethod_nestedBound() async {
+    String code = r'''
+class Foo<T extends num> {
+  void method<U extends T>(U u) {
+    u.abs();
+  }
+}
+''';
+    // Just validate that there is no warning on the call to `.abs()`.
+    await resolveTestUnit(code);
+  }
+
+  test_genericMethod_nestedCapture() async {
+    await resolveTestUnit(r'''
+class C<T> {
+  T f<S>(S x) {
+    new C<S>().f<int>(3);
+    new C<S>().f; // tear-off
+    return null;
+  }
+}
+''');
+    MethodInvocation f = findIdentifier('f<int>(3);').parent;
+    expect(f.staticInvokeType.toString(), '(int) → S');
+    FunctionType ft = f.staticInvokeType;
+    expect('${ft.typeArguments}/${ft.typeParameters}', '[S, int]/[T, S]');
+
+    expectIdentifierType('f;', '<S₀>(S₀) → S');
+  }
+
+  test_genericMethod_nestedCaptureBounds() async {
+    await resolveTestUnit(r'''
+class C<T> {
+  T f<S extends T>(S x) {
+    new C<S>().f<int>(3);
+    new C<S>().f; // tear-off
+    return null;
+  }
+}
+''');
+    MethodInvocation f = findIdentifier('f<int>(3);').parent;
+    expect(f.staticInvokeType.toString(), '(int) → S');
+    FunctionType ft = f.staticInvokeType;
+    expect('${ft.typeArguments}/${ft.typeParameters}',
+        '[S, int]/[T, S extends T]');
+
+    expectIdentifierType('f;', '<S₀ extends S>(S₀) → S');
+  }
+
+  test_genericMethod_nestedFunctions() async {
+    await resolveTestUnit(r'''
+S f<S>(S x) {
+  g<S>(S x) => f;
+  return null;
+}
+''');
+    expectIdentifierType('f', '<S>(S) → S');
+    expectIdentifierType('g', '<S>(S) → <S>(S) → S');
+  }
+
+  test_genericMethod_override() async {
+    await resolveTestUnit(r'''
+class C {
+  T f<T>(T x) => null;
+}
+class D extends C {
+  T f<T>(T x) => null; // from D
+}
+''');
+    expectFunctionType('f<T>(T x) => null; // from D', '<T>(T) → T',
+        elementTypeParams: '[T]', typeFormals: '[T]');
+    SimpleIdentifier f = findIdentifier('f<T>(T x) => null; // from D');
+    MethodElementImpl e = f.staticElement;
+    FunctionType ft = e.type.instantiate([typeProvider.stringType]);
+    expect(ft.toString(), '(String) → String');
+  }
+
+  test_genericMethod_override_bounds() async {
+    await resolveTestUnit(r'''
+class A {}
+class B {
+  T f<T extends A>(T x) => null;
+}
+// override with the same bound is OK
+class C extends B {
+  T f<T extends A>(T x) => null;
+}
+// override with new name and the same bound is OK
+class D extends B {
+  Q f<Q extends A>(Q x) => null;
+}
+''');
+  }
+
+  test_genericMethod_override_covariant_field() async {
+    Source source = addSource(r'''
+abstract class A {
+  num get x;
+  set x(covariant num _);
+}
+
+class B extends A {
+  int x;
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_genericMethod_override_differentContextsSameBounds() async {
+    Source source = addSource(r'''
+        class GenericMethodBounds<T> {
+  Type get t => T;
+  GenericMethodBounds<E> foo<E extends T>() => new GenericMethodBounds<E>();
+  GenericMethodBounds<E> bar<E extends void Function(T)>() =>
+      new GenericMethodBounds<E>();
+}
+
+class GenericMethodBoundsDerived extends GenericMethodBounds<num> {
+  GenericMethodBounds<E> foo<E extends num>() => new GenericMethodBounds<E>();
+  GenericMethodBounds<E> bar<E extends void Function(num)>() =>
+      new GenericMethodBounds<E>();
+}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_genericMethod_override_invalidContravariantTypeParamBounds() async {
+    Source source = addSource(r'''
+class A {}
+class B extends A {}
+class C {
+  T f<T extends A>(T x) => null;
+}
+class D extends C {
+  T f<T extends B>(T x) => null;
+}''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [CompileTimeErrorCode.INVALID_OVERRIDE]);
+    verify([source]);
+  }
+
+  test_genericMethod_override_invalidCovariantTypeParamBounds() async {
+    Source source = addSource(r'''
+class A {}
+class B extends A {}
+class C {
+  T f<T extends B>(T x) => null;
+}
+class D extends C {
+  T f<T extends A>(T x) => null;
+}''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [CompileTimeErrorCode.INVALID_OVERRIDE]);
+    verify([source]);
+  }
+
+  test_genericMethod_override_invalidReturnType() async {
+    Source source = addSource(r'''
+class C {
+  Iterable<T> f<T>(T x) => null;
+}
+class D extends C {
+  String f<S>(S x) => null;
+}''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [CompileTimeErrorCode.INVALID_OVERRIDE]);
+    verify([source]);
+  }
+
+  test_genericMethod_override_invalidTypeParamCount() async {
+    Source source = addSource(r'''
+class C {
+  T f<T>(T x) => null;
+}
+class D extends C {
+  S f<T, S>(T x) => null;
+}''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [CompileTimeErrorCode.INVALID_OVERRIDE]);
+    verify([source]);
+  }
+
+  test_genericMethod_propagatedType_promotion() async {
+    // Regression test for:
+    // https://github.com/dart-lang/sdk/issues/25340
+
+    // Note, after https://github.com/dart-lang/sdk/issues/25486 the original
+    // example won't work, as we now compute a static type and therefore discard
+    // the propagated type. So a new test was created that doesn't run under
+    // strong mode.
+    await resolveTestUnit(r'''
+abstract class Iter {
+  List<S> map<S>(S f(x));
+}
+class C {}
+C toSpan(dynamic element) {
+  if (element is Iter) {
+    var y = element.map(toSpan);
+  }
+  return null;
+}''');
+    expectIdentifierType('y = ', 'List<C>');
+  }
+
+  test_genericMethod_tearoff() async {
+    await resolveTestUnit(r'''
+class C<E> {
+  T f<T>(E e) => null;
+  static T g<T>(T e) => null;
+  static T Function<T>(T) h = null;
+}
+
+T topF<T>(T e) => null;
+var topG = topF;
+void test<S>(T Function<T>(T) pf) {
+  var c = new C<int>();
+  T lf<T>(T e) => null;
+  var methodTearOff = c.f;
+  var staticTearOff = C.g;
+  var staticFieldTearOff = C.h;
+  var topFunTearOff = topF;
+  var topFieldTearOff = topG;
+  var localTearOff = lf;
+  var paramTearOff = pf;
+}
+''');
+    expectIdentifierType('methodTearOff', "<T>(int) → T");
+    expectIdentifierType('staticTearOff', "<T>(T) → T");
+    expectIdentifierType('staticFieldTearOff', "<T>(T) → T");
+    expectIdentifierType('topFunTearOff', "<T>(T) → T");
+    expectIdentifierType('topFieldTearOff', "<T>(T) → T");
+    expectIdentifierType('localTearOff', "<T>(T) → T");
+    expectIdentifierType('paramTearOff', "<T>(T) → T");
+  }
+
+  test_genericMethod_tearoff_instantiated() async {
+    await resolveTestUnit(r'''
+class C<E> {
+  T f<T>(E e) => null;
+  static T g<T>(T e) => null;
+  static T Function<T>(T) h = null;
+}
+
+T topF<T>(T e) => null;
+var topG = topF;
+void test<S>(T pf<T>(T e)) {
+  var c = new C<int>();
+  T lf<T>(T e) => null;
+  var methodTearOffInst = c.f<int>;
+  var staticTearOffInst = C.g<int>;
+  var staticFieldTearOffInst = C.h<int>;
+  var topFunTearOffInst = topF<int>;
+  var topFieldTearOffInst = topG<int>;
+  var localTearOffInst = lf<int>;
+  var paramTearOffInst = pf<int>;
+}
+''');
+    expectIdentifierType('methodTearOffInst', "(int) → int");
+    expectIdentifierType('staticTearOffInst', "(int) → int");
+    expectIdentifierType('staticFieldTearOffInst', "(int) → int");
+    expectIdentifierType('topFunTearOffInst', "(int) → int");
+    expectIdentifierType('topFieldTearOffInst', "(int) → int");
+    expectIdentifierType('localTearOffInst', "(int) → int");
+    expectIdentifierType('paramTearOffInst', "(int) → int");
+  }
+
+  test_genericMethod_then() async {
+    String code = r'''
+import 'dart:async';
+String toString(int x) => x.toString();
+main() {
+  Future<int> bar = null;
+  var foo = bar.then(toString);
+}
+''';
+    await resolveTestUnit(code);
+
+    expectInitializerType('foo', 'Future<String>');
+  }
+
+  test_genericMethod_then_prefixed() async {
+    String code = r'''
+import 'dart:async' as async;
+String toString(int x) => x.toString();
+main() {
+  async.Future<int> bar = null;
+  var foo = bar.then(toString);
+}
+''';
+    await resolveTestUnit(code);
+    expectInitializerType('foo', 'Future<String>');
+  }
+
+  test_genericMethod_then_propagatedType() async {
+    // Regression test for https://github.com/dart-lang/sdk/issues/25482.
+    String code = r'''
+import 'dart:async';
+void main() {
+  Future<String> p;
+  var foo = p.then((r) => new Future<String>.value(3));
+}
+''';
+    await resolveTestUnit(code, noErrors: false);
+    // Note: this correctly reports the error
+    // StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE when run with the driver;
+    // when run without the driver, it reports no errors.  So we don't bother
+    // checking whether the correct errors were reported.
+    expectInitializerType('foo', 'Future<String>');
+  }
+
+  test_genericMethod_toplevel_field_staticTearoff() async {
+    await resolveTestUnit(r'''
+class C<E> {
+  static T g<T>(T e) => null;
+  static T Function<T>(T) h = null;
+}
+
+void test() {
+  var fieldRead = C.h;
+}
+''');
+    expectIdentifierType('fieldRead', "<T>(T) → T");
+  }
+
+  test_implicitBounds() async {
+    String code = r'''
+class A<T> {}
+
+class B<T extends num> {}
+
+class C<S extends int, T extends B<S>, U extends A> {}
+
+void test() {
+//
+  A ai;
+  B bi;
+  C ci;
+  var aa = new A();
+  var bb = new B();
+  var cc = new C();
+}
+''';
+    await resolveTestUnit(code);
+    expectIdentifierType('ai', "A<dynamic>");
+    expectIdentifierType('bi', "B<num>");
+    expectIdentifierType('ci', "C<int, B<int>, A<dynamic>>");
+    expectIdentifierType('aa', "A<dynamic>");
+    expectIdentifierType('bb', "B<num>");
+    expectIdentifierType('cc', "C<int, B<int>, A<dynamic>>");
+  }
+
+  test_inferClosureType_parameters() async {
+    Source source = addSource(r'''
+typedef F({bool p});
+foo(callback(F f)) {}
+main() {
+  foo((f) {
+    f(p: false);
+  });
+}
+''');
+    var result = await computeAnalysisResult(source);
+    var main = result.unit.declarations[2] as FunctionDeclaration;
+    var body = main.functionExpression.body as BlockFunctionBody;
+    var statement = body.block.statements[0] as ExpressionStatement;
+    var invocation = statement.expression as MethodInvocation;
+    var closure = invocation.argumentList.arguments[0] as FunctionExpression;
+    var closureType = closure.staticType as FunctionType;
+    var fType = closureType.parameters[0].type as FunctionType;
+    // The inferred type of "f" in "foo()" invocation must own its parameters.
+    ParameterElement p = fType.parameters[0];
+    expect(p.name, 'p');
+    expect(p.enclosingElement, same(fType.element));
+  }
+
+  test_instantiateToBounds_class_error_extension_malbounded() async {
+    // Test that superclasses are strictly checked for malbounded default
+    // types
+    String code = r'''
+class C<T0 extends List<T1>, T1 extends List<T0>> {}
+class D extends C {}
+''';
+    await resolveTestUnit(code, noErrors: false);
+    assertErrors(
+        testSource, [StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS]);
+  }
+
+  test_instantiateToBounds_class_error_instantiation_malbounded() async {
+    // Test that instance creations are strictly checked for malbounded default
+    // types
+    String code = r'''
+class C<T0 extends List<T1>, T1 extends List<T0>> {}
+void test() {
+  var c = new C();
+}
+''';
+    await resolveTestUnit(code, noErrors: false);
+    assertErrors(testSource, [
+      StrongModeCode.COULD_NOT_INFER,
+      StaticTypeWarningCode.TYPE_ARGUMENT_NOT_MATCHING_BOUNDS
+    ]);
+    expectIdentifierType('c =', 'C<List<dynamic>, List<List<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);
+    assertNoErrors(testSource);
+    expectIdentifierType('c;', 'C<List<dynamic>, List<dynamic>>');
+  }
+
+  test_instantiateToBounds_class_error_recursion_self() async {
+    String code = r'''
+class C<T extends C<T>> {}
+C c;
+''';
+    await resolveTestUnit(code, noErrors: false);
+    assertNoErrors(testSource);
+    expectIdentifierType('c;', '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);
+    assertNoErrors(testSource);
+    expectIdentifierType('c;', 'C<A<dynamic>>');
+  }
+
+  test_instantiateToBounds_class_error_typedef() async {
+    String code = r'''
+typedef T F<T>(T x);
+class C<T extends F<T>> {}
+C c;
+''';
+    await resolveTestUnit(code, noErrors: false);
+    assertNoErrors(testSource);
+    expectIdentifierType('c;', 'C<(dynamic) → dynamic>');
+  }
+
+  test_instantiateToBounds_class_ok_implicitDynamic_multi() async {
+    String code = r'''
+class C<T0 extends Map<T1, T2>, T1 extends List, T2 extends int> {}
+C c;
+''';
+    await resolveTestUnit(code);
+    assertNoErrors(testSource);
+    expectIdentifierType(
+        'c;', 'C<Map<List<dynamic>, int>, List<dynamic>, int>');
+  }
+
+  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>> {}
+class D<T extends A> {}
+void main() {
+  A a;
+  B b;
+  C c;
+  D d;
+}
+''';
+    await resolveTestUnit(code);
+    assertNoErrors(testSource);
+    expectIdentifierType('a;', 'A<dynamic>');
+    expectIdentifierType('b;', 'B<num>');
+    expectIdentifierType('c;', 'C<List<int>>');
+    expectIdentifierType('d;', 'D<A<dynamic>>');
+  }
+
+  test_instantiateToBounds_generic_function_error_malbounded() async {
+    // Test that generic methods are strictly checked for malbounded default
+    // types
+    String code = r'''
+T0 f<T0 extends List<T1>, T1 extends List<T0>>() {}
+void g() {
+  var c = f();
+  return;
+}
+''';
+    await resolveTestUnit(code, noErrors: false);
+    assertErrors(
+        testSource, [HintCode.MISSING_RETURN, StrongModeCode.COULD_NOT_INFER]);
+    expectIdentifierType('c =', 'List<dynamic>');
+  }
+
+  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', '(Null, Null) → void');
+  }
+
+  test_instantiateToBounds_method_ok_referenceOther_before2() async {
+    String code = r'''
+class C<T> {
+  Map<S0, S1> m<S0 extends T, S1 extends List<S0>>() => null;
+
+  void main() {
+    m();
+  }
+}
+''';
+    await resolveTestUnit(code);
+    assertNoErrors(testSource);
+    expectStaticInvokeType('m();', '() → Map<T, List<T>>');
+  }
+
+  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)', '(Null) → void');
+  }
+
+  test_instantiateToBounds_method_ok_simpleBounds2() async {
+    String code = r'''
+class C<T> {
+  S m<S extends T>() => null;
+
+  void main() {
+    m();
+  }
+}
+''';
+    await resolveTestUnit(code);
+    assertNoErrors(testSource);
+    expectStaticInvokeType('m();', '() → T');
+  }
+
+  test_issue32396() async {
+    await resolveTestUnit(r'''
+class C<E> {
+  static T g<T>(T e) => null;
+  static final h = g;
+}
+''');
+  }
+
+  test_notInstantiatedBound_class_error_recursion() async {
+    String code = r'''
+class A<T extends B> {} // points to a
+class B<T extends A> {} // points to b
+class C<T extends A> {} // points to a cyclical type
+''';
+    await resolveTestUnit(code, noErrors: false);
+    assertErrors(testSource, [
+      StrongModeCode.NOT_INSTANTIATED_BOUND,
+      StrongModeCode.NOT_INSTANTIATED_BOUND,
+      StrongModeCode.NOT_INSTANTIATED_BOUND,
+    ]);
+  }
+
+  test_notInstantiatedBound_class_error_recursion_less_direct() async {
+    String code = r'''
+class A<T extends B<A>> {}
+class B<T extends A<B>> {}
+''';
+    await resolveTestUnit(code, noErrors: false);
+    assertErrors(testSource, [
+      StrongModeCode.NOT_INSTANTIATED_BOUND,
+      StrongModeCode.NOT_INSTANTIATED_BOUND,
+    ]);
+  }
+
+  test_notInstantiatedBound_class_error_recursion_typedef() async {
+    String code = r'''
+typedef F(C value);
+class C<T extends F> {}
+class D<T extends C> {}
+''';
+    await resolveTestUnit(code, noErrors: false);
+    assertErrors(testSource, [
+      StrongModeCode.NOT_INSTANTIATED_BOUND,
+      StrongModeCode.NOT_INSTANTIATED_BOUND,
+      CompileTimeErrorCode.TYPE_ALIAS_CANNOT_REFERENCE_ITSELF,
+    ]);
+  }
+
+  test_notInstantiatedBound_error_class_argument() async {
+    String code = r'''
+class A<K, V extends List<K>> {}
+class C<T extends A> {}
+''';
+    await resolveTestUnit(code, noErrors: false);
+    assertErrors(testSource, [StrongModeCode.NOT_INSTANTIATED_BOUND]);
+  }
+
+  test_notInstantiatedBound_error_class_argument2() async {
+    String code = r'''
+class A<K, V extends List<List<K>>> {}
+class C<T extends A> {}
+''';
+    await resolveTestUnit(code, noErrors: false);
+    assertErrors(testSource, [StrongModeCode.NOT_INSTANTIATED_BOUND]);
+  }
+
+  test_notInstantiatedBound_error_class_direct() async {
+    String code = r'''
+class A<K, V extends K> {}
+class C<T extends A> {}
+''';
+    await resolveTestUnit(code, noErrors: false);
+    assertErrors(testSource, [StrongModeCode.NOT_INSTANTIATED_BOUND]);
+  }
+
+  test_notInstantiatedBound_error_class_indirect() async {
+    String code = r'''
+class A<K, V extends K> {}
+class C<T extends List<A>> {}
+''';
+    await resolveTestUnit(code, noErrors: false);
+    assertErrors(testSource, [StrongModeCode.NOT_INSTANTIATED_BOUND]);
+  }
+
+  test_notInstantiatedBound_error_functionType() async {
+    await resolveTestUnit(r'''
+class A<T extends Function(T)> {}
+class B<T extends T Function()> {}
+class C<T extends A> {}
+class D<T extends B> {}
+''', noErrors: false);
+    assertErrors(testSource, [
+      StrongModeCode.NOT_INSTANTIATED_BOUND,
+      StrongModeCode.NOT_INSTANTIATED_BOUND
+    ]);
+  }
+
+  test_notInstantiatedBound_error_typedef_argument() async {
+    String code = r'''
+class A<K, V extends List<K>> {}
+typedef void F<T extends A>();
+''';
+    await resolveTestUnit(code, noErrors: false);
+    assertErrors(testSource, [StrongModeCode.NOT_INSTANTIATED_BOUND]);
+  }
+
+  test_notInstantiatedBound_error_typedef_argument2() async {
+    String code = r'''
+class A<K, V extends List<List<K>>> {}
+typedef void F<T extends A>();
+''';
+    await resolveTestUnit(code, noErrors: false);
+    assertErrors(testSource, [StrongModeCode.NOT_INSTANTIATED_BOUND]);
+  }
+
+  test_notInstantiatedBound_error_typedef_direct() async {
+    String code = r'''
+class A<K, V extends K> {}
+typedef void F<T extends A>();
+''';
+    await resolveTestUnit(code, noErrors: false);
+    assertErrors(testSource, [StrongModeCode.NOT_INSTANTIATED_BOUND]);
+  }
+
+  test_notInstantiatedBound_ok_class() async {
+    String code = r'''
+class A<T extends int> {}
+class C1<T extends A> {}
+class C2<T extends List<A>> {}
+''';
+    await resolveTestUnit(code);
+    assertNoErrors(testSource);
+  }
+
+  test_notInstantiatedBound_ok_class_class2() async {
+    String code = r'''
+class A<T> {}
+class C<T extends A<int>> {}
+class D<T extends C> {}
+''';
+    await resolveTestUnit(code);
+    assertNoErrors(testSource);
+  }
+
+  test_notInstantiatedBound_ok_class_class3() async {
+    String code = r'''
+class A<T> {}
+class B<T extends int> {}
+class C<T extends A<B>> {}
+''';
+    await resolveTestUnit(code);
+    assertNoErrors(testSource);
+  }
+
+  test_notInstantiatedBound_ok_class_class4() async {
+    String code = r'''
+class A<K, V> {}
+class B<T extends int> {}
+class C<T extends A<B, B>> {}
+''';
+    await resolveTestUnit(code);
+    assertNoErrors(testSource);
+  }
+
+  test_notInstantiatedBound_ok_class_function() async {
+    String code = r'''
+class A<T extends void Function()> {}
+class B<T extends A> {}
+''';
+    await resolveTestUnit(code);
+    assertNoErrors(testSource);
+  }
+
+  test_notInstantiatedBound_ok_class_typedef() async {
+    String code = r'''
+typedef void F<T extends int>();
+class C<T extends F> {}
+''';
+    await resolveTestUnit(code);
+    assertNoErrors(testSource);
+  }
+
+  test_notInstantiatedBound_ok_typedef_class() async {
+    String code = r'''
+class C<T extends int> {}
+typedef void F<T extends C>();
+''';
+    await resolveTestUnit(code);
+    assertNoErrors(testSource);
+  }
+
+  test_objectMethodOnFunctions_Anonymous() async {
+    String code = r'''
+void main() {
+  var f = (x) => 3;
+  // No errors, correct type
+  var t0 = f.toString();
+  var t1 = f.toString;
+  var t2 = f.hashCode;
+
+  // Expressions, no errors, correct type
+  var t3 = (f).toString();
+  var t4 = (f).toString;
+  var t5 = (f).hashCode;
+
+  // Cascades, no errors
+  f..toString();
+  f..toString;
+  f..hashCode;
+
+  // Expression cascades, no errors
+  (f)..toString();
+  (f)..toString;
+  (f)..hashCode;
+}''';
+    await _objectMethodOnFunctions_helper2(code);
+  }
+
+  test_objectMethodOnFunctions_Function() async {
+    String code = r'''
+void main() {
+  Function f;
+  // No errors, correct type
+  var t0 = f.toString();
+  var t1 = f.toString;
+  var t2 = f.hashCode;
+
+  // Expressions, no errors, correct type
+  var t3 = (f).toString();
+  var t4 = (f).toString;
+  var t5 = (f).hashCode;
+
+  // Cascades, no errors
+  f..toString();
+  f..toString;
+  f..hashCode;
+
+  // Expression cascades, no errors
+  (f)..toString();
+  (f)..toString;
+  (f)..hashCode;
+}''';
+    await _objectMethodOnFunctions_helper2(code);
+  }
+
+  test_objectMethodOnFunctions_Static() async {
+    String code = r'''
+int f(int x) => null;
+void main() {
+  // No errors, correct type
+  var t0 = f.toString();
+  var t1 = f.toString;
+  var t2 = f.hashCode;
+
+  // Expressions, no errors, correct type
+  var t3 = (f).toString();
+  var t4 = (f).toString;
+  var t5 = (f).hashCode;
+
+  // Cascades, no errors
+  f..toString();
+  f..toString;
+  f..hashCode;
+
+  // Expression cascades, no errors
+  (f)..toString();
+  (f)..toString;
+  (f)..hashCode;
+}''';
+    await _objectMethodOnFunctions_helper2(code);
+  }
+
+  test_objectMethodOnFunctions_Typedef() async {
+    String code = r'''
+typedef bool Predicate<T>(T object);
+
+void main() {
+  Predicate<int> f;
+  // No errors, correct type
+  var t0 = f.toString();
+  var t1 = f.toString;
+  var t2 = f.hashCode;
+
+  // Expressions, no errors, correct type
+  var t3 = (f).toString();
+  var t4 = (f).toString;
+  var t5 = (f).hashCode;
+
+  // Cascades, no errors
+  f..toString();
+  f..toString;
+  f..hashCode;
+
+  // Expression cascades, no errors
+  (f)..toString();
+  (f)..toString;
+  (f)..hashCode;
+}''';
+    await _objectMethodOnFunctions_helper2(code);
+  }
+
+  test_returnOfInvalidType_object_void() async {
+    await assertErrorsInCode(
+        "Object f() { void voidFn() => null; return voidFn(); }",
+        [StaticTypeWarningCode.RETURN_OF_INVALID_TYPE]);
+  }
+
+  test_setterWithDynamicTypeIsError() async {
+    Source source = addSource(r'''
+class A {
+  dynamic set f(String s) => null;
+}
+dynamic set g(int x) => null;
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [
+      StaticWarningCode.NON_VOID_RETURN_FOR_SETTER,
+      StaticWarningCode.NON_VOID_RETURN_FOR_SETTER
+    ]);
+    verify([source]);
+  }
+
+  test_setterWithExplicitVoidType_returningVoid() async {
+    Source source = addSource(r'''
+void returnsVoid() {}
+class A {
+  void set f(String s) => returnsVoid();
+}
+void set g(int x) => returnsVoid();
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_setterWithNoVoidType() async {
+    Source source = addSource(r'''
+class A {
+  set f(String s) {
+    return '42';
+  }
+}
+set g(int x) => 42;
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [
+      StaticTypeWarningCode.RETURN_OF_INVALID_TYPE,
+    ]);
+    verify([source]);
+  }
+
+  test_setterWithNoVoidType_returningVoid() async {
+    Source source = addSource(r'''
+void returnsVoid() {}
+class A {
+  set f(String s) => returnsVoid();
+}
+set g(int x) => returnsVoid();
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_setterWithOtherTypeIsError() async {
+    Source source = addSource(r'''
+class A {
+  String set f(String s) => null;
+}
+Object set g(x) => null;
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [
+      StaticWarningCode.NON_VOID_RETURN_FOR_SETTER,
+      StaticWarningCode.NON_VOID_RETURN_FOR_SETTER
+    ]);
+    verify([source]);
+  }
+
+  test_ternaryOperator_null_left() async {
+    String code = r'''
+main() {
+  var foo = (true) ? null : 3;
+}
+''';
+    await resolveTestUnit(code);
+    expectInitializerType('foo', 'int');
+  }
+
+  test_ternaryOperator_null_right() async {
+    String code = r'''
+main() {
+  var foo = (true) ? 3 : null;
+}
+''';
+    await resolveTestUnit(code);
+    expectInitializerType('foo', 'int');
+  }
+
+  Future<void> _objectMethodOnFunctions_helper2(String code) async {
+    await resolveTestUnit(code);
+    expectIdentifierType('t0', "String");
+    expectIdentifierType('t1', "() → String");
+    expectIdentifierType('t2', "int");
+    expectIdentifierType('t3', "String");
+    expectIdentifierType('t4', "() → String");
+    expectIdentifierType('t5', "int");
+  }
+}
+
+@reflectiveTest
+class StrongModeTypePropagationTest extends ResolverTestCase {
+  @override
+  void setUp() {
+    super.setUp();
+    AnalysisOptionsImpl options = new AnalysisOptionsImpl();
+    resetWith(options: options);
+  }
+
+  test_foreachInference_dynamic_disabled() async {
+    String code = r'''
+main() {
+  var list = <int>[];
+  for (dynamic v in list) {
+    v; // marker
+  }
+}''';
+    CompilationUnit unit = await resolveSource(code);
+    assertPropagatedIterationType(code, unit, typeProvider.dynamicType);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.dynamicType);
+  }
+
+  test_foreachInference_reusedVar_disabled() async {
+    String code = r'''
+main() {
+  var list = <int>[];
+  var v;
+  for (v in list) {
+    v; // marker
+  }
+}''';
+    CompilationUnit unit = await resolveSource(code);
+    assertPropagatedIterationType(code, unit, typeProvider.dynamicType);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.dynamicType);
+  }
+
+  test_foreachInference_var() async {
+    String code = r'''
+main() {
+  var list = <int>[];
+  for (var v in list) {
+    v; // marker
+  }
+}''';
+    CompilationUnit unit = await resolveSource(code);
+    assertPropagatedIterationType(code, unit, typeProvider.intType);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.intType);
+  }
+
+  test_foreachInference_var_iterable() async {
+    String code = r'''
+main() {
+  Iterable<int> list = <int>[];
+  for (var v in list) {
+    v; // marker
+  }
+}''';
+    CompilationUnit unit = await resolveSource(code);
+    assertPropagatedIterationType(code, unit, typeProvider.intType);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.intType);
+  }
+
+  test_foreachInference_var_stream() async {
+    String code = r'''
+import 'dart:async';
+main() async {
+  Stream<int> stream = null;
+  await for (var v in stream) {
+    v; // marker
+  }
+}''';
+    CompilationUnit unit = await resolveSource(code);
+    assertPropagatedIterationType(code, unit, typeProvider.intType);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.intType);
+  }
+
+  test_inconsistentMethodInheritance_inferFunctionTypeFromTypedef() async {
+    Source source = addSource(r'''
+typedef bool F<E>(E argument);
+
+abstract class Base {
+  f<E extends int>(F<int> x);
+}
+
+abstract class BaseCopy extends Base {
+}
+
+abstract class Override implements Base, BaseCopy {
+  f<E extends int>(x) => null;
+}
+
+class C extends Override implements Base {}
+''');
+    await computeAnalysisResult(source);
+    assertNoErrors(source);
+    verify([source]);
+  }
+
+  test_localVariableInference_bottom_disabled() async {
+    String code = r'''
+main() {
+  var v = null;
+  v; // marker
+}''';
+    CompilationUnit unit = await resolveSource(code);
+    assertAssignedType(code, unit, typeProvider.dynamicType);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.dynamicType);
+  }
+
+  test_localVariableInference_constant() async {
+    String code = r'''
+main() {
+  var v = 3;
+  v; // marker
+}''';
+    CompilationUnit unit = await resolveSource(code);
+    assertAssignedType(code, unit, typeProvider.intType);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.intType);
+  }
+
+  test_localVariableInference_declaredType_disabled() async {
+    String code = r'''
+main() {
+  dynamic v = 3;
+  v; // marker
+}''';
+    CompilationUnit unit = await resolveSource(code);
+    assertAssignedType(code, unit, typeProvider.dynamicType);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.dynamicType);
+  }
+
+  test_localVariableInference_noInitializer_disabled() async {
+    String code = r'''
+main() {
+  var v;
+  v = 3;
+  v; // marker
+}''';
+    CompilationUnit unit = await resolveSource(code);
+    assertAssignedType(code, unit, typeProvider.dynamicType);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.dynamicType);
+  }
+
+  test_localVariableInference_transitive_field_inferred_lexical() async {
+    String code = r'''
+class A {
+  final x = 3;
+  f() {
+    var v = x;
+    return v; // marker
+  }
+}
+main() {
+}
+''';
+    CompilationUnit unit = await resolveSource(code);
+    assertAssignedType(code, unit, typeProvider.intType);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.intType);
+  }
+
+  test_localVariableInference_transitive_field_inferred_reversed() async {
+    String code = r'''
+class A {
+  f() {
+    var v = x;
+    return v; // marker
+  }
+  final x = 3;
+}
+main() {
+}
+''';
+    CompilationUnit unit = await resolveSource(code);
+    assertAssignedType(code, unit, typeProvider.intType);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.intType);
+  }
+
+  test_localVariableInference_transitive_field_lexical() async {
+    String code = r'''
+class A {
+  int x = 3;
+  f() {
+    var v = x;
+    return v; // marker
+  }
+}
+main() {
+}
+''';
+    CompilationUnit unit = await resolveSource(code);
+    assertAssignedType(code, unit, typeProvider.intType);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.intType);
+  }
+
+  test_localVariableInference_transitive_field_reversed() async {
+    String code = r'''
+class A {
+  f() {
+    var v = x;
+    return v; // marker
+  }
+  int x = 3;
+}
+main() {
+}
+''';
+    CompilationUnit unit = await resolveSource(code);
+    assertAssignedType(code, unit, typeProvider.intType);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.intType);
+  }
+
+  test_localVariableInference_transitive_list_local() async {
+    String code = r'''
+main() {
+  var x = <int>[3];
+  var v = x[0];
+  v; // marker
+}''';
+    CompilationUnit unit = await resolveSource(code);
+    assertAssignedType(code, unit, typeProvider.intType);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.intType);
+  }
+
+  test_localVariableInference_transitive_local() async {
+    String code = r'''
+main() {
+  var x = 3;
+  var v = x;
+  v; // marker
+}''';
+    CompilationUnit unit = await resolveSource(code);
+    assertAssignedType(code, unit, typeProvider.intType);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.intType);
+  }
+
+  test_localVariableInference_transitive_toplevel_inferred_lexical() async {
+    String code = r'''
+final x = 3;
+main() {
+  var v = x;
+  v; // marker
+}
+''';
+    CompilationUnit unit = await resolveSource(code);
+    assertAssignedType(code, unit, typeProvider.intType);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.intType);
+  }
+
+  test_localVariableInference_transitive_toplevel_inferred_reversed() async {
+    String code = r'''
+main() {
+  var v = x;
+  v; // marker
+}
+final x = 3;
+''';
+    CompilationUnit unit = await resolveSource(code);
+    assertAssignedType(code, unit, typeProvider.intType);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.intType);
+  }
+
+  test_localVariableInference_transitive_toplevel_lexical() async {
+    String code = r'''
+int x = 3;
+main() {
+  var v = x;
+  v; // marker
+}
+''';
+    CompilationUnit unit = await resolveSource(code);
+    assertAssignedType(code, unit, typeProvider.intType);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.intType);
+  }
+
+  test_localVariableInference_transitive_toplevel_reversed() async {
+    String code = r'''
+main() {
+  var v = x;
+  v; // marker
+}
+int x = 3;
+''';
+    CompilationUnit unit = await resolveSource(code);
+    assertAssignedType(code, unit, typeProvider.intType);
+    assertTypeOfMarkedExpression(code, unit, typeProvider.intType);
+  }
+}
diff --git a/pkg/analyzer/test/generated/test_all.dart b/pkg/analyzer/test/generated/test_all.dart
index 5215932..4481253 100644
--- a/pkg/analyzer/test/generated/test_all.dart
+++ b/pkg/analyzer/test/generated/test_all.dart
@@ -1,45 +1,37 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import 'all_the_rest_test.dart' as all_the_rest;
-import 'checked_mode_compile_time_error_code_driver_test.dart'
-    as checked_mode_compile_time_error_code_driver_test;
-import 'compile_time_error_code_driver_test.dart'
-    as compile_time_error_code_driver_test;
-import 'constant_test.dart'
-    as constant_test; // ignore: deprecated_member_use_from_same_package
+import 'checked_mode_compile_time_error_code_test.dart'
+    as checked_mode_compile_time_error_code;
+import 'compile_time_error_code_test.dart' as compile_time_error_code;
+// ignore: deprecated_member_use_from_same_package
+import 'constant_test.dart' as constant_test;
 import 'declaration_resolver_test.dart' as declaration_resolver_test;
 import 'element_resolver_test.dart' as element_resolver_test;
 import 'engine_test.dart' as engine_test;
-import 'error_suppression_driver_test.dart' as error_suppression_driver_test;
-import 'hint_code_driver_test.dart' as hint_code_driver_test;
+import 'error_suppression_test.dart' as error_suppression;
 import 'hint_code_test.dart' as hint_code_test;
 import 'inheritance_manager_test.dart' as inheritance_manager_test;
-import 'invalid_code_driver_test.dart' as invalid_code_driver_test;
+import 'invalid_code_test.dart' as invalid_code;
 import 'java_core_test.dart' as java_core_test;
 import 'java_io_test.dart' as java_io_test;
-import 'non_error_resolver_driver_test.dart' as non_error_resolver_driver_test;
-import 'non_hint_code_driver_test.dart' as non_hint_code_driver_test;
+import 'non_error_resolver_test.dart' as non_error_resolver;
+import 'non_hint_code_test.dart' as non_hint_code;
 import 'parser_fasta_test.dart' as parser_fasta_test;
 import 'parser_test.dart' as parser_test;
-import 'resolver_driver_test.dart' as resolver_driver_test;
 import 'resolver_test.dart' as resolver_test;
 import 'scanner_test.dart' as scanner_test;
 import 'sdk_test.dart' as sdk_test;
 import 'simple_resolver_test.dart' as simple_resolver_test;
 import 'source_factory_test.dart' as source_factory_test;
-import 'static_type_analyzer_driver_test.dart'
-    as static_type_analyzer_driver_test;
 import 'static_type_analyzer_test.dart' as static_type_analyzer_test;
-import 'static_type_warning_code_driver_test.dart'
-    as static_type_warning_code_driver_test;
-import 'static_warning_code_driver_test.dart'
-    as static_warning_code_driver_test;
-import 'static_warning_code_test.dart' as static_warning_code_test;
-import 'strong_mode_driver_test.dart' as strong_mode_driver_test;
+import 'static_type_warning_code_test.dart' as static_type_warning_code;
+import 'static_warning_code_test.dart' as static_warning_code;
+import 'strong_mode_test.dart' as strong_mode;
 import 'type_system_test.dart' as type_system_test;
 import 'utilities_dart_test.dart' as utilities_dart_test;
 import 'utilities_test.dart' as utilities_test;
@@ -47,35 +39,31 @@
 main() {
   defineReflectiveSuite(() {
     all_the_rest.main();
-    checked_mode_compile_time_error_code_driver_test.main();
-    compile_time_error_code_driver_test.main();
+    checked_mode_compile_time_error_code.main();
+    compile_time_error_code.main();
     constant_test.main();
     declaration_resolver_test.main();
     element_resolver_test.main();
     engine_test.main();
-    error_suppression_driver_test.main();
-    hint_code_driver_test.main();
+    error_suppression.main();
     hint_code_test.main();
     inheritance_manager_test.main();
-    invalid_code_driver_test.main();
+    invalid_code.main();
     java_core_test.main();
     java_io_test.main();
-    non_error_resolver_driver_test.main();
-    non_hint_code_driver_test.main();
+    non_error_resolver.main();
+    non_hint_code.main();
     parser_fasta_test.main();
     parser_test.main();
-    resolver_driver_test.main();
     resolver_test.main();
     scanner_test.main();
     sdk_test.main();
     simple_resolver_test.main();
     source_factory_test.main();
-    static_type_analyzer_driver_test.main();
     static_type_analyzer_test.main();
-    static_type_warning_code_driver_test.main();
-    static_warning_code_driver_test.main();
-    static_warning_code_test.main();
-    strong_mode_driver_test.main();
+    static_type_warning_code.main();
+    static_warning_code.main();
+    strong_mode.main();
     type_system_test.main();
     utilities_dart_test.main();
     utilities_test.main();
diff --git a/pkg/analyzer/test/generated/test_support.dart b/pkg/analyzer/test/generated/test_support.dart
index 528bd33..25a512d 100644
--- a/pkg/analyzer/test/generated/test_support.dart
+++ b/pkg/analyzer/test/generated/test_support.dart
@@ -14,29 +14,19 @@
 import 'package:analyzer/src/generated/java_engine.dart';
 import 'package:analyzer/src/generated/parser.dart';
 import 'package:analyzer/src/generated/source.dart';
-import 'package:plugin/manager.dart';
-import 'package:plugin/plugin.dart';
 import 'package:test/test.dart';
 
 import 'analysis_context_factory.dart';
 
-/**
- * The class `EngineTestCase` defines utility methods for making assertions.
- */
+/// The class `EngineTestCase` defines utility methods for making assertions.
 class EngineTestCase {
-  /**
-   * Flag indicating whether the fasta parser is being used.
-   */
+  /// Return `true` if the fasta parser is being used.
   bool get usingFastaParser => Parser.useFasta;
 
-  /**
-   * Assert that the given collection has the same number of elements as the number of specified
-   * names, and that for each specified name, a corresponding element can be found in the given
-   * collection with that name.
-   *
-   * @param elements the elements
-   * @param names the names
-   */
+  /// Assert that the given collection of [elements] has the same number of
+  /// elements as the number of specified [names], and that for each specified
+  /// name, a corresponding element can be found in the given collection with
+  /// that name.
   void assertNamedElements(List<Element> elements, List<String> names) {
     for (String elemName in names) {
       bool found = false;
@@ -66,13 +56,8 @@
         resourceProvider: new MemoryResourceProvider());
   }
 
-  /**
-   * Return the getter in the given type with the given name. Inherited getters are ignored.
-   *
-   * @param type the type in which the getter is declared
-   * @param getterName the name of the getter to be returned
-   * @return the property accessor element representing the getter with the given name
-   */
+  /// Return the getter in the given [type] with the given [name]. Inherited
+  /// getters are ignored.
   PropertyAccessorElement getGetter(InterfaceType type, String getterName) {
     for (PropertyAccessorElement accessor in type.element.accessors) {
       if (accessor.isGetter && accessor.name == getterName) {
@@ -82,13 +67,8 @@
     fail("Could not find getter named $getterName in ${type.displayName}");
   }
 
-  /**
-   * Return the method in the given type with the given name. Inherited methods are ignored.
-   *
-   * @param type the type in which the method is declared
-   * @param methodName the name of the method to be returned
-   * @return the method element representing the method with the given name
-   */
+  /// Return the method in the given [type] with the given [name]. Inherited
+  /// methods are ignored.
   MethodElement getMethod(InterfaceType type, String methodName) {
     for (MethodElement method in type.element.methods) {
       if (method.name == methodName) {
@@ -98,17 +78,11 @@
     fail("Could not find method named $methodName in ${type.displayName}");
   }
 
-  void setUp() {
-    List<Plugin> plugins = <Plugin>[];
-    plugins.addAll(AnalysisEngine.instance.requiredPlugins);
-    new ExtensionManager().processPlugins(plugins);
-  }
+  void setUp() {}
 
   void tearDown() {}
 
-  /**
-   * @return the [AstNode] with requested type at offset of the "prefix".
-   */
+  /// Return the [AstNode] with requested type at offset of the [prefix].
   static AstNode findNode(
       AstNode root, String code, String prefix, Predicate<AstNode> predicate) {
     int offset = code.indexOf(prefix);
@@ -119,9 +93,7 @@
     return node.thisOrAncestorMatching(predicate);
   }
 
-  /**
-   * Find the [SimpleIdentifier] with at offset of the "prefix".
-   */
+  /// Find the [SimpleIdentifier] with at offset of the [prefix].
   static SimpleIdentifier findSimpleIdentifier(
       AstNode root, String code, String prefix) {
     int offset = code.indexOf(prefix);
@@ -132,110 +104,144 @@
   }
 }
 
-/**
- * A description of an error that is expected to be reported.
- */
+/// A description of an error that is expected to be reported.
 class ExpectedError {
-  /**
-   * An empty array of error descriptors used when no errors are expected.
-   */
+  /// An empty array of error descriptors used when no errors are expected.
   static List<ExpectedError> NO_ERRORS = <ExpectedError>[];
 
-  /**
-   * The error code associated with the error.
-   */
+  /// The error code associated with the error.
   final ErrorCode code;
 
-  /**
-   * The offset of the beginning of the error's region.
-   */
+  /// The offset of the beginning of the error's region.
   final int offset;
 
-  /**
-   * The offset of the beginning of the error's region.
-   */
+  /// The offset of the beginning of the error's region.
   final int length;
 
-  /**
-   * Initialize a newly created error description.
-   */
+  /// Initialize a newly created error description.
   ExpectedError(this.code, this.offset, this.length);
+
+  /// Return `true` if the [error] matches this description of what it's
+  /// expected to be.
+  bool matches(AnalysisError error) {
+    return error.offset == offset &&
+        error.length == length &&
+        error.errorCode == code;
+  }
 }
 
-/**
- * An error listener that collects all of the errors passed to it for later
- * examination.
- */
+/// An error listener that collects all of the errors passed to it for later
+/// examination.
 class GatheringErrorListener implements AnalysisErrorListener {
-  /**
-   * A flag indicating whether error ranges are to be compared when comparing
-   * expected and actual errors.
-   */
+  /// A flag indicating whether error ranges are to be compared when comparing
+  /// expected and actual errors.
   final bool checkRanges;
 
-  /**
-   * A list containing the errors that were collected.
-   */
+  /// A list containing the errors that were collected.
   List<AnalysisError> _errors = <AnalysisError>[];
 
-  /**
-   * A table mapping sources to the line information for the source.
-   */
+  /// A table mapping sources to the line information for the source.
   Map<Source, LineInfo> _lineInfoMap = <Source, LineInfo>{};
 
-  /**
-   * Initialize a newly created error listener to collect errors.
-   */
+  /// Initialize a newly created error listener to collect errors.
   GatheringErrorListener({this.checkRanges = Parser.useFasta});
 
-  /**
-   * Return the errors that were collected.
-   */
+  /// Return the errors that were collected.
   List<AnalysisError> get errors => _errors;
 
-  /**
-   * Return `true` if at least one error has been gathered.
-   */
+  /// Return `true` if at least one error has been gathered.
   bool get hasErrors => _errors.length > 0;
 
-  /**
-   * Add the given [errors] to this listener.
-   */
+  /// Add the given [errors] to this listener.
   void addAll(List<AnalysisError> errors) {
     for (AnalysisError error in errors) {
       onError(error);
     }
   }
 
-  /**
-   * Add all of the errors recorded by the given [listener] to this listener.
-   */
+  /// Add all of the errors recorded by the given [listener] to this listener.
   void addAll2(RecordingErrorListener listener) {
     addAll(listener.errors);
   }
 
-  /**
-   * Assert that the number of errors that have been gathered matches the number
-   * of [expectedErrors] and that they have the expected error codes and
-   * locations. The order in which the errors were gathered is ignored.
-   */
+  /// Assert that the number of errors that have been gathered matches the
+  /// number of [expectedErrors] and that they have the expected error codes and
+  /// locations. The order in which the errors were gathered is ignored.
   void assertErrors(List<ExpectedError> expectedErrors) {
-    if (_errors.length != expectedErrors.length) {
-      _fail(expectedErrors);
-    }
-    List<ExpectedError> remainingErrors = expectedErrors.toList();
-    for (AnalysisError error in _errors) {
-      if (!_foundAndRemoved(remainingErrors, error)) {
-        _fail(expectedErrors);
+    //
+    // Match actual errors to expected errors.
+    //
+    List<AnalysisError> unmatchedActual = errors.toList();
+    List<ExpectedError> unmatchedExpected = expectedErrors.toList();
+    int actualIndex = 0;
+    while (actualIndex < unmatchedActual.length) {
+      bool matchFound = false;
+      int expectedIndex = 0;
+      while (expectedIndex < unmatchedExpected.length) {
+        if (unmatchedExpected[expectedIndex]
+            .matches(unmatchedActual[actualIndex])) {
+          matchFound = true;
+          unmatchedActual.removeAt(actualIndex);
+          unmatchedExpected.removeAt(expectedIndex);
+          break;
+        }
+        expectedIndex++;
       }
+      if (!matchFound) {
+        actualIndex++;
+      }
+    }
+    //
+    // Write the results.
+    //
+    StringBuffer buffer = new StringBuffer();
+    if (unmatchedExpected.isNotEmpty) {
+      buffer.writeln('Expected but did not find:');
+      for (ExpectedError expected in unmatchedExpected) {
+        buffer.write('  ');
+        buffer.write(expected.code);
+        buffer.write(' [');
+        buffer.write(expected.offset);
+        buffer.write(', ');
+        buffer.write(expected.length);
+        buffer.writeln(']');
+      }
+    }
+    if (unmatchedActual.isNotEmpty) {
+      if (buffer.isNotEmpty) {
+        buffer.writeln();
+      }
+      buffer.writeln('Found but did not expect:');
+      for (AnalysisError actual in unmatchedActual) {
+        buffer.write('  ');
+        buffer.write(actual.errorCode);
+        buffer.write(' [');
+        buffer.write(actual.offset);
+        buffer.write(', ');
+        buffer.write(actual.length);
+        buffer.writeln(']');
+      }
+    }
+    if (buffer.isNotEmpty) {
+      errors.sort((first, second) => first.offset.compareTo(second.offset));
+      buffer.writeln();
+      buffer.writeln('To accept the current state, expect:');
+      for (AnalysisError actual in errors) {
+        buffer.write('  error(');
+        buffer.write(actual.errorCode);
+        buffer.write(', ');
+        buffer.write(actual.offset);
+        buffer.write(', ');
+        buffer.write(actual.length);
+        buffer.writeln('),');
+      }
+      fail(buffer.toString());
     }
   }
 
-  /**
-   * Assert that the number of errors that have been gathered matches the number
-   * of [expectedErrorCodes] and that they have the expected error codes. The
-   * order in which the errors were gathered is ignored.
-   */
+  /// Assert that the number of errors that have been gathered matches the
+  /// number of [expectedErrorCodes] and that they have the expected error
+  /// codes. The order in which the errors were gathered is ignored.
   void assertErrorsWithCodes(
       [List<ErrorCode> expectedErrorCodes = const <ErrorCode>[]]) {
     StringBuffer buffer = new StringBuffer();
@@ -316,12 +322,10 @@
     }
   }
 
-  /**
-   * Assert that the number of errors that have been gathered matches the number
-   * of [expectedSeverities] and that there are the same number of errors and
-   * warnings as specified by the argument. The order in which the errors were
-   * gathered is ignored.
-   */
+  /// Assert that the number of errors that have been gathered matches the
+  /// number of [expectedSeverities] and that there are the same number of
+  /// errors and warnings as specified by the argument. The order in which the
+  /// errors were gathered is ignored.
   void assertErrorsWithSeverities(List<ErrorSeverity> expectedSeverities) {
     int expectedErrorCount = 0;
     int expectedWarningCount = 0;
@@ -343,27 +347,23 @@
     }
     if (expectedErrorCount != actualErrorCount ||
         expectedWarningCount != actualWarningCount) {
-      fail(
-          "Expected $expectedErrorCount errors and $expectedWarningCount warnings, found $actualErrorCount errors and $actualWarningCount warnings");
+      fail("Expected $expectedErrorCount errors "
+          "and $expectedWarningCount warnings, "
+          "found $actualErrorCount errors "
+          "and $actualWarningCount warnings");
     }
   }
 
-  /**
-   * Assert that no errors have been gathered.
-   */
+  /// Assert that no errors have been gathered.
   void assertNoErrors() {
     assertErrors(ExpectedError.NO_ERRORS);
   }
 
-  /**
-   * Return the line information associated with the given [source], or `null`
-   * if no line information has been associated with the source.
-   */
+  /// Return the line information associated with the given [source], or `null`
+  /// if no line information has been associated with the source.
   LineInfo getLineInfo(Source source) => _lineInfoMap[source];
 
-  /**
-   * Return `true` if an error with the given [errorCode] has been gathered.
-   */
+  /// Return `true` if an error with the given [errorCode] has been gathered.
   bool hasError(ErrorCode errorCode) {
     for (AnalysisError error in _errors) {
       if (identical(error.errorCode, errorCode)) {
@@ -378,79 +378,17 @@
     _errors.add(error);
   }
 
-  /**
-   * Set the line information associated with the given [source] to the given
-   * list of [lineStarts].
-   */
+  /// Set the line information associated with the given [source] to the given
+  /// list of [lineStarts].
   void setLineInfo(Source source, List<int> lineStarts) {
     _lineInfoMap[source] = new LineInfo(lineStarts);
   }
-
-  /**
-   * Return `true` if the [actualError] matches the [expectedError].
-   */
-  bool _equalErrors(ExpectedError expectedError, AnalysisError actualError) {
-    if (!identical(expectedError.code, actualError.errorCode)) {
-      return false;
-    } else if (!checkRanges) {
-      return true;
-    }
-    return expectedError.offset == actualError.offset &&
-        expectedError.length == actualError.length;
-  }
-
-  /**
-   * Assert that the number of errors that have been gathered matches the number
-   * of [expectedErrors] and that they have the expected error codes. The order
-   * in which the errors were gathered is ignored.
-   */
-  void _fail(List<ExpectedError> expectedErrors) {
-    StringBuffer buffer = new StringBuffer();
-    buffer.write("Expected ");
-    buffer.write(expectedErrors.length);
-    buffer.write(" errors:");
-    for (ExpectedError error in expectedErrors) {
-      buffer.writeln();
-      int offset = error.offset;
-      buffer.write('  ${error.code} ($offset..${offset + error.length})');
-    }
-    buffer.writeln();
-    buffer.write("found ");
-    buffer.write(_errors.length);
-    buffer.write(" errors:");
-    for (AnalysisError error in _errors) {
-      buffer.writeln();
-      int offset = error.offset;
-      buffer.write('  ${error.errorCode} '
-          '($offset..${offset + error.length}): ${error.message}');
-    }
-    fail(buffer.toString());
-  }
-
-  /**
-   * Search through the given list of [errors] for an error that is equal to the
-   * [targetError]. If one is found, remove it from the list and return `true`,
-   * otherwise return `false` without modifying the list.
-   */
-  bool _foundAndRemoved(List<ExpectedError> errors, AnalysisError targetError) {
-    for (ExpectedError error in errors) {
-      if (_equalErrors(error, targetError)) {
-        errors.remove(error);
-        return true;
-      }
-    }
-    return false;
-  }
 }
 
-/**
- * Instances of the class [TestLogger] implement a logger that can be used by
- * tests.
- */
+/// Instances of the class [TestLogger] implement a logger that can be used by
+/// tests.
 class TestLogger implements Logger {
-  /**
-   * All logged messages.
-   */
+  /// All logged messages.
   List<String> log = [];
 
   @override
@@ -470,15 +408,11 @@
   int _modificationStamp = 0;
   bool exists2 = true;
 
-  /**
-   * A flag indicating whether an exception should be generated when an attempt
-   * is made to access the contents of this source.
-   */
+  /// A flag indicating whether an exception should be generated when an attempt
+  /// is made to access the contents of this source.
   bool generateExceptionOnRead = false;
 
-  /**
-   * The number of times that the contents of this source have been requested.
-   */
+  /// The number of times that the contents of this source have been requested.
   int readCount = 0;
 
   TestSource([this._name = '/test.dart', this._contents]);
diff --git a/pkg/analyzer/test/generated/type_system_test.dart b/pkg/analyzer/test/generated/type_system_test.dart
index 190bc9b..9084e64 100644
--- a/pkg/analyzer/test/generated/type_system_test.dart
+++ b/pkg/analyzer/test/generated/type_system_test.dart
@@ -35,9 +35,33 @@
     defineReflectiveTests(StrongGenericFunctionInferenceTest);
     defineReflectiveTests(StrongLeastUpperBoundTest);
     defineReflectiveTests(StrongGreatestLowerBoundTest);
+    defineReflectiveTests(TypeSystemTest);
   });
 }
 
+abstract class AbstractTypeSystemTest {
+  TypeProvider typeProvider;
+  Dart2TypeSystem typeSystem;
+
+  DartType get bottomType => typeProvider.bottomType;
+  InterfaceType get doubleType => typeProvider.doubleType;
+  DartType get dynamicType => typeProvider.dynamicType;
+  InterfaceType get functionType => typeProvider.functionType;
+  InterfaceType get intType => typeProvider.intType;
+  InterfaceType get iterableType => typeProvider.iterableType;
+  InterfaceType get listType => typeProvider.listType;
+  DartType get nullType => typeProvider.nullType;
+  InterfaceType get numType => typeProvider.numType;
+  InterfaceType get objectType => typeProvider.objectType;
+  InterfaceType get stringType => typeProvider.stringType;
+  DartType get voidType => VoidTypeImpl.instance;
+
+  void setUp() {
+    typeProvider = new TestTypeProvider();
+    typeSystem = new Dart2TypeSystem(typeProvider);
+  }
+}
+
 /**
  * Base class for testing LUB and GLB in spec and strong mode.
  */
@@ -826,26 +850,7 @@
 }
 
 @reflectiveTest
-class StrongAssignabilityTest {
-  TypeProvider typeProvider;
-  TypeSystem typeSystem;
-
-  DartType get bottomType => typeProvider.bottomType;
-  InterfaceType get doubleType => typeProvider.doubleType;
-  DartType get dynamicType => typeProvider.dynamicType;
-  InterfaceType get functionType => typeProvider.functionType;
-  InterfaceType get intType => typeProvider.intType;
-  InterfaceType get listType => typeProvider.listType;
-  InterfaceType get numType => typeProvider.numType;
-  InterfaceType get objectType => typeProvider.objectType;
-  InterfaceType get stringType => typeProvider.stringType;
-  DartType get voidType => VoidTypeImpl.instance;
-
-  void setUp() {
-    typeProvider = new TestTypeProvider();
-    typeSystem = new Dart2TypeSystem(typeProvider);
-  }
-
+class StrongAssignabilityTest extends AbstractTypeSystemTest {
   void test_isAssignableTo_bottom_isBottom() {
     DartType interfaceType = ElementFactory.classElement2('A', []).type;
     List<DartType> interassignable = <DartType>[
@@ -1111,28 +1116,7 @@
 }
 
 @reflectiveTest
-class StrongGenericFunctionInferenceTest {
-  TypeProvider typeProvider;
-  Dart2TypeSystem typeSystem;
-
-  DartType get bottomType => typeProvider.bottomType;
-  InterfaceType get doubleType => typeProvider.doubleType;
-  DartType get dynamicType => typeProvider.dynamicType;
-  InterfaceType get functionType => typeProvider.functionType;
-  InterfaceType get intType => typeProvider.intType;
-  InterfaceType get iterableType => typeProvider.iterableType;
-  InterfaceType get listType => typeProvider.listType;
-  DartType get nullType => typeProvider.nullType;
-  InterfaceType get numType => typeProvider.numType;
-  InterfaceType get objectType => typeProvider.objectType;
-  InterfaceType get stringType => typeProvider.stringType;
-  DartType get voidType => VoidTypeImpl.instance;
-
-  void setUp() {
-    typeProvider = new TestTypeProvider();
-    typeSystem = new Dart2TypeSystem(typeProvider);
-  }
-
+class StrongGenericFunctionInferenceTest extends AbstractTypeSystemTest {
   void test_boundedByAnotherTypeParameter() {
     // <TFrom, TTo extends Iterable<TFrom>>(TFrom) -> TTo
     var tFrom = TypeBuilder.variable('TFrom');
@@ -2293,3 +2277,167 @@
   static TypeParameterType variable(String name, {DartType bound}) =>
       ElementFactory.typeParameterWithType(name, bound).type;
 }
+
+@reflectiveTest
+class TypeSystemTest extends AbstractTypeSystemTest {
+  DartType get futureOrWithNoneType =>
+      typeProvider.futureOrType.instantiate([noneType]);
+  DartType get futureOrWithQuestionType =>
+      typeProvider.futureOrType.instantiate([questionType]);
+  DartType get futureOrWithStarType =>
+      typeProvider.futureOrType.instantiate([starType]);
+
+  DartType get noneType => (typeProvider.stringType as TypeImpl)
+      .withNullability(NullabilitySuffix.none);
+
+  DartType get questionType => (typeProvider.stringType as TypeImpl)
+      .withNullability(NullabilitySuffix.question);
+
+  DartType get starType => (typeProvider.stringType as TypeImpl)
+      .withNullability(NullabilitySuffix.star);
+
+  test_isNonNullable_dynamic() {
+    expect(typeSystem.isNonNullable(dynamicType), false);
+  }
+
+  test_isNonNullable_futureOr_noneArg() {
+    expect(typeSystem.isNonNullable(futureOrWithNoneType), true);
+  }
+
+  test_isNonNullable_futureOr_questionArg() {
+    expect(typeSystem.isNonNullable(futureOrWithQuestionType), true);
+  }
+
+  test_isNonNullable_futureOr_starArg() {
+    expect(typeSystem.isNonNullable(futureOrWithStarType), true);
+  }
+
+  test_isNonNullable_none() {
+    expect(typeSystem.isNonNullable(noneType), true);
+  }
+
+  test_isNonNullable_null() {
+    expect(typeSystem.isNonNullable(nullType), false);
+  }
+
+  test_isNonNullable_question() {
+    expect(typeSystem.isNonNullable(questionType), false);
+  }
+
+  test_isNonNullable_star() {
+    expect(typeSystem.isNonNullable(starType), true);
+  }
+
+  test_isNonNullable_void() {
+    expect(typeSystem.isNonNullable(voidType), false);
+  }
+
+  test_isNullable_dynamic() {
+    expect(typeSystem.isNullable(dynamicType), true);
+  }
+
+  test_isNullable_futureOr_noneArg() {
+    expect(typeSystem.isNullable(futureOrWithNoneType), true);
+  }
+
+  test_isNullable_futureOr_questionArg() {
+    expect(typeSystem.isNullable(futureOrWithQuestionType), true);
+  }
+
+  test_isNullable_futureOr_starArg() {
+    expect(typeSystem.isNullable(futureOrWithStarType), true);
+  }
+
+  test_isNullable_none() {
+    expect(typeSystem.isNullable(noneType), false);
+  }
+
+  test_isNullable_null() {
+    expect(typeSystem.isNullable(nullType), true);
+  }
+
+  test_isNullable_question() {
+    expect(typeSystem.isNullable(questionType), true);
+  }
+
+  test_isNullable_star() {
+    expect(typeSystem.isNullable(starType), true);
+  }
+
+  test_isNullable_void() {
+    expect(typeSystem.isNullable(voidType), true);
+  }
+
+  test_isPotentiallyNonNullable_dynamic() {
+    expect(typeSystem.isPotentiallyNonNullable(dynamicType), false);
+  }
+
+  test_isPotentiallyNonNullable_futureOr_noneArg() {
+    expect(typeSystem.isPotentiallyNonNullable(futureOrWithNoneType), false);
+  }
+
+  test_isPotentiallyNonNullable_futureOr_questionArg() {
+    expect(
+        typeSystem.isPotentiallyNonNullable(futureOrWithQuestionType), false);
+  }
+
+  test_isPotentiallyNonNullable_futureOr_starArg() {
+    expect(typeSystem.isPotentiallyNonNullable(futureOrWithStarType), false);
+  }
+
+  test_isPotentiallyNonNullable_none() {
+    expect(typeSystem.isPotentiallyNonNullable(noneType), true);
+  }
+
+  test_isPotentiallyNonNullable_null() {
+    expect(typeSystem.isPotentiallyNonNullable(nullType), false);
+  }
+
+  test_isPotentiallyNonNullable_question() {
+    expect(typeSystem.isPotentiallyNonNullable(questionType), false);
+  }
+
+  test_isPotentiallyNonNullable_star() {
+    expect(typeSystem.isPotentiallyNonNullable(starType), false);
+  }
+
+  test_isPotentiallyNonNullable_void() {
+    expect(typeSystem.isPotentiallyNonNullable(voidType), false);
+  }
+
+  test_isPotentiallyNullable_dynamic() {
+    expect(typeSystem.isPotentiallyNullable(dynamicType), true);
+  }
+
+  test_isPotentiallyNullable_futureOr_noneArg() {
+    expect(typeSystem.isPotentiallyNullable(futureOrWithNoneType), false);
+  }
+
+  test_isPotentiallyNullable_futureOr_questionArg() {
+    expect(typeSystem.isPotentiallyNullable(futureOrWithQuestionType), false);
+  }
+
+  test_isPotentiallyNullable_futureOr_starArg() {
+    expect(typeSystem.isPotentiallyNullable(futureOrWithStarType), false);
+  }
+
+  test_isPotentiallyNullable_none() {
+    expect(typeSystem.isPotentiallyNullable(noneType), false);
+  }
+
+  test_isPotentiallyNullable_null() {
+    expect(typeSystem.isPotentiallyNullable(nullType), true);
+  }
+
+  test_isPotentiallyNullable_question() {
+    expect(typeSystem.isPotentiallyNullable(questionType), true);
+  }
+
+  test_isPotentiallyNullable_star() {
+    expect(typeSystem.isPotentiallyNullable(starType), false);
+  }
+
+  test_isPotentiallyNullable_void() {
+    expect(typeSystem.isPotentiallyNullable(voidType), true);
+  }
+}
diff --git a/pkg/analyzer/test/generated/utilities_test.dart b/pkg/analyzer/test/generated/utilities_test.dart
index 4568043..8463f41 100644
--- a/pkg/analyzer/test/generated/utilities_test.dart
+++ b/pkg/analyzer/test/generated/utilities_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -471,6 +471,10 @@
     _assertCloneUnitMember('class C { C(A this.a); }');
   }
 
+  void test_visitForEachStatement_await() {
+    _assertCloneStatement('await for (var a in b) {}');
+  }
+
   void test_visitForEachStatement_declared() {
     _assertCloneStatement('for (var a in b) {}');
   }
@@ -1172,7 +1176,7 @@
   }
 
   Statement _parseStatement(String code) {
-    CompilationUnit unit = _parseUnit('main() { $code }');
+    CompilationUnit unit = _parseUnit('main() async { $code }');
     FunctionDeclaration main = unit.declarations.single;
     BlockFunctionBody body = main.functionExpression.body;
     return body.block.statements.single;
@@ -1702,39 +1706,43 @@
 }
 
 class Getter_NodeReplacerTest_test_forEachStatement_withIdentifier
-    implements NodeReplacerTest_Getter<ForEachStatement, Statement> {
+    implements NodeReplacerTest_Getter<ForStatement, Statement> {
   @override
-  Statement get(ForEachStatement node) => node.body;
+  Statement get(ForStatement node) => node.body;
 }
 
 class Getter_NodeReplacerTest_test_forEachStatement_withIdentifier_2
-    implements NodeReplacerTest_Getter<ForEachStatement, SimpleIdentifier> {
+    implements NodeReplacerTest_Getter<ForStatement, SimpleIdentifier> {
   @override
-  SimpleIdentifier get(ForEachStatement node) => node.identifier;
+  SimpleIdentifier get(ForStatement node) =>
+      (node.forLoopParts as ForEachPartsWithIdentifier).identifier;
 }
 
 class Getter_NodeReplacerTest_test_forEachStatement_withIdentifier_3
-    implements NodeReplacerTest_Getter<ForEachStatement, Expression> {
+    implements NodeReplacerTest_Getter<ForStatement, Expression> {
   @override
-  Expression get(ForEachStatement node) => node.iterable;
+  Expression get(ForStatement node) =>
+      (node.forLoopParts as ForEachParts).iterable;
 }
 
 class Getter_NodeReplacerTest_test_forEachStatement_withLoopVariable
-    implements NodeReplacerTest_Getter<ForEachStatement, Expression> {
+    implements NodeReplacerTest_Getter<ForStatement, Expression> {
   @override
-  Expression get(ForEachStatement node) => node.iterable;
+  Expression get(ForStatement node) =>
+      (node.forLoopParts as ForEachParts).iterable;
 }
 
 class Getter_NodeReplacerTest_test_forEachStatement_withLoopVariable_2
-    implements NodeReplacerTest_Getter<ForEachStatement, DeclaredIdentifier> {
+    implements NodeReplacerTest_Getter<ForStatement, DeclaredIdentifier> {
   @override
-  DeclaredIdentifier get(ForEachStatement node) => node.loopVariable;
+  DeclaredIdentifier get(ForStatement node) =>
+      (node.forLoopParts as ForEachPartsWithDeclaration).loopVariable;
 }
 
 class Getter_NodeReplacerTest_test_forEachStatement_withLoopVariable_3
-    implements NodeReplacerTest_Getter<ForEachStatement, Statement> {
+    implements NodeReplacerTest_Getter<ForStatement, Statement> {
   @override
-  Statement get(ForEachStatement node) => node.body;
+  Statement get(ForStatement node) => node.body;
 }
 
 class Getter_NodeReplacerTest_test_forStatement_withInitialization
@@ -1746,13 +1754,15 @@
 class Getter_NodeReplacerTest_test_forStatement_withInitialization_2
     implements NodeReplacerTest_Getter<ForStatement, Expression> {
   @override
-  Expression get(ForStatement node) => node.condition;
+  Expression get(ForStatement node) =>
+      (node.forLoopParts as ForParts).condition;
 }
 
 class Getter_NodeReplacerTest_test_forStatement_withInitialization_3
     implements NodeReplacerTest_Getter<ForStatement, Expression> {
   @override
-  Expression get(ForStatement node) => node.initialization;
+  Expression get(ForStatement node) =>
+      (node.forLoopParts as ForPartsWithExpression).initialization;
 }
 
 class Getter_NodeReplacerTest_test_forStatement_withVariables
@@ -1764,13 +1774,15 @@
 class Getter_NodeReplacerTest_test_forStatement_withVariables_2
     implements NodeReplacerTest_Getter<ForStatement, VariableDeclarationList> {
   @override
-  VariableDeclarationList get(ForStatement node) => node.variables;
+  VariableDeclarationList get(ForStatement node) =>
+      (node.forLoopParts as ForPartsWithDeclarations).variables;
 }
 
 class Getter_NodeReplacerTest_test_forStatement_withVariables_3
     implements NodeReplacerTest_Getter<ForStatement, Expression> {
   @override
-  Expression get(ForStatement node) => node.condition;
+  Expression get(ForStatement node) =>
+      (node.forLoopParts as ForParts).condition;
 }
 
 class Getter_NodeReplacerTest_test_functionDeclaration
@@ -2419,7 +2431,8 @@
       : super(arg0);
 
   @override
-  NodeList<Expression> getList(ForStatement node) => node.updaters;
+  NodeList<Expression> getList(ForStatement node) =>
+      (node.forLoopParts as ForParts).updaters;
 }
 
 class ListGetter_NodeReplacerTest_test_forStatement_withVariables
@@ -2428,7 +2441,8 @@
       : super(arg0);
 
   @override
-  NodeList<Expression> getList(ForStatement node) => node.updaters;
+  NodeList<Expression> getList(ForStatement node) =>
+      (node.forLoopParts as ForParts).updaters;
 }
 
 class ListGetter_NodeReplacerTest_test_hideCombinator
@@ -2464,19 +2478,19 @@
 }
 
 class ListGetter_NodeReplacerTest_test_listLiteral
-    extends NodeReplacerTest_ListGetter<ListLiteral, Expression> {
+    extends NodeReplacerTest_ListGetter<ListLiteral, CollectionElement> {
   ListGetter_NodeReplacerTest_test_listLiteral(int arg0) : super(arg0);
 
   @override
-  NodeList<Expression> getList(ListLiteral node) => node.elements;
+  NodeList<CollectionElement> getList(ListLiteral node) => node.elements;
 }
 
 class ListGetter_NodeReplacerTest_test_mapLiteral
-    extends NodeReplacerTest_ListGetter<MapLiteral, MapLiteralEntry> {
+    extends NodeReplacerTest_ListGetter<SetOrMapLiteral, CollectionElement> {
   ListGetter_NodeReplacerTest_test_mapLiteral(int arg0) : super(arg0);
 
   @override
-  NodeList<MapLiteralEntry> getList(MapLiteral node) => node.entries;
+  NodeList<CollectionElement> getList(SetOrMapLiteral node) => node.elements;
 }
 
 class ListGetter_NodeReplacerTest_test_showCombinator
@@ -3051,9 +3065,9 @@
   }
 
   void test_forEachStatement_withIdentifier() {
-    ForEachStatement node = AstTestFactory.forEachStatement2(
-        AstTestFactory.identifier3("i"),
-        AstTestFactory.identifier3("l"),
+    ForStatement node = AstTestFactory.forStatement(
+        AstTestFactory.forEachPartsWithIdentifier(
+            AstTestFactory.identifier3("i"), AstTestFactory.identifier3("l")),
         AstTestFactory.block());
     _assertReplace(node,
         new Getter_NodeReplacerTest_test_forEachStatement_withIdentifier_2());
@@ -3064,9 +3078,10 @@
   }
 
   void test_forEachStatement_withLoopVariable() {
-    ForEachStatement node = AstTestFactory.forEachStatement(
-        AstTestFactory.declaredIdentifier3("e"),
-        AstTestFactory.identifier3("l"),
+    ForStatement node = AstTestFactory.forStatement(
+        AstTestFactory.forEachPartsWithDeclaration(
+            AstTestFactory.declaredIdentifier3("e"),
+            AstTestFactory.identifier3("l")),
         AstTestFactory.block());
     _assertReplace(node,
         new Getter_NodeReplacerTest_test_forEachStatement_withLoopVariable_2());
@@ -3085,9 +3100,8 @@
 
   void test_forStatement_withInitialization() {
     ForStatement node = AstTestFactory.forStatement(
-        AstTestFactory.identifier3("a"),
-        AstTestFactory.booleanLiteral(true),
-        [AstTestFactory.integer(0)],
+        AstTestFactory.forPartsWithExpression(AstTestFactory.identifier3("a"),
+            AstTestFactory.booleanLiteral(true), [AstTestFactory.integer(0)]),
         AstTestFactory.block());
     _assertReplace(node,
         new Getter_NodeReplacerTest_test_forStatement_withInitialization_3());
@@ -3102,11 +3116,12 @@
   }
 
   void test_forStatement_withVariables() {
-    ForStatement node = AstTestFactory.forStatement2(
-        AstTestFactory.variableDeclarationList2(
-            null, [AstTestFactory.variableDeclaration("i")]),
-        AstTestFactory.booleanLiteral(true),
-        [AstTestFactory.integer(0)],
+    ForStatement node = AstTestFactory.forStatement(
+        AstTestFactory.forPartsWithDeclarations(
+            AstTestFactory.variableDeclarationList2(
+                null, [AstTestFactory.variableDeclaration("i")]),
+            AstTestFactory.booleanLiteral(true),
+            [AstTestFactory.integer(0)]),
         AstTestFactory.block());
     _assertReplace(
         node, new Getter_NodeReplacerTest_test_forStatement_withVariables_2());
@@ -3308,7 +3323,7 @@
   }
 
   void test_mapLiteral() {
-    MapLiteral node = AstTestFactory.mapLiteral(
+    SetOrMapLiteral node = AstTestFactory.setOrMapLiteral(
         null,
         AstTestFactory.typeArgumentList([AstTestFactory.typeName4("E")]),
         [AstTestFactory.mapLiteralEntry("k", AstTestFactory.identifier3("v"))]);
@@ -3619,7 +3634,7 @@
       AstNode clone = child.accept(new AstCloner());
       NodeReplacer.replace(child, clone);
       expect(getter.get(parent), clone);
-      expect(clone.parent, parent);
+      expect(clone.parent, child.parent);
     }
   }
 
diff --git a/pkg/analyzer/test/source/analysis_options_provider_test.dart b/pkg/analyzer/test/source/analysis_options_provider_test.dart
index d271900..33e23e4 100644
--- a/pkg/analyzer/test/source/analysis_options_provider_test.dart
+++ b/pkg/analyzer/test/source/analysis_options_provider_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/source/embedder_test.dart b/pkg/analyzer/test/source/embedder_test.dart
index 2068361..ad2cd7b 100644
--- a/pkg/analyzer/test/source/embedder_test.dart
+++ b/pkg/analyzer/test/source/embedder_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/source/error_processor_test.dart b/pkg/analyzer/test/source/error_processor_test.dart
index d55cd52..71d8d5e 100644
--- a/pkg/analyzer/test/source/error_processor_test.dart
+++ b/pkg/analyzer/test/source/error_processor_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -7,10 +7,7 @@
 import 'package:analyzer/src/analysis_options/analysis_options_provider.dart';
 import 'package:analyzer/src/context/context.dart';
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/task/options.dart';
-import 'package:plugin/manager.dart';
-import 'package:plugin/plugin.dart';
 import 'package:test/test.dart';
 import 'package:yaml/yaml.dart';
 
@@ -44,8 +41,6 @@
   AnalysisError annotate_overrides = new AnalysisError(
       new TestSource(), 0, 1, new LintCode('annotate_overrides', ''));
 
-  oneTimeSetup();
-
   setUp(() {
     context = new TestContext();
   });
@@ -162,11 +157,4 @@
 ErrorProcessor getProcessor(AnalysisError error) =>
     ErrorProcessor.getProcessor(context.analysisOptions, error);
 
-void oneTimeSetup() {
-  List<Plugin> plugins = <Plugin>[];
-  plugins.addAll(AnalysisEngine.instance.requiredPlugins);
-  ExtensionManager manager = new ExtensionManager();
-  manager.processPlugins(plugins);
-}
-
 class TestContext extends AnalysisContextImpl {}
diff --git a/pkg/analyzer/test/source/package_map_resolver_test.dart b/pkg/analyzer/test/source/package_map_resolver_test.dart
index ec716dc..498e8f7 100644
--- a/pkg/analyzer/test/source/package_map_resolver_test.dart
+++ b/pkg/analyzer/test/source/package_map_resolver_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/source/path_filter_test.dart b/pkg/analyzer/test/source/path_filter_test.dart
index 0dcba2e..279deb4 100644
--- a/pkg/analyzer/test/source/path_filter_test.dart
+++ b/pkg/analyzer/test/source/path_filter_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/source/sdk_ext_test.dart b/pkg/analyzer/test/source/sdk_ext_test.dart
index 4f542d1..0172bc6 100644
--- a/pkg/analyzer/test/source/sdk_ext_test.dart
+++ b/pkg/analyzer/test/source/sdk_ext_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/source/test_all.dart b/pkg/analyzer/test/source/test_all.dart
index f356dc3..0d8233d 100644
--- a/pkg/analyzer/test/source/test_all.dart
+++ b/pkg/analyzer/test/source/test_all.dart
@@ -5,14 +5,13 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import 'analysis_options_provider_test.dart' as analysis_options_provider_test;
-import 'embedder_test.dart'
-    as embedder_test; // ignore: deprecated_member_use_from_same_package
+import 'embedder_test.dart' // ignore: deprecated_member_use_from_same_package
+    as embedder_test;
 import 'error_processor_test.dart' as error_processor_test;
 import 'package_map_resolver_test.dart' as package_map_resolver_test;
 import 'path_filter_test.dart' as path_filter_test;
 import 'sdk_ext_test.dart' as sdk_ext_test;
 
-/// Utility for manually running all tests.
 main() {
   defineReflectiveSuite(() {
     analysis_options_provider_test.main();
diff --git a/pkg/analyzer/test/src/abstract_single_unit.dart b/pkg/analyzer/test/src/abstract_single_unit.dart
deleted file mode 100644
index d42f775..0000000
--- a/pkg/analyzer/test/src/abstract_single_unit.dart
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/error/error.dart';
-import 'package:analyzer/src/dart/ast/element_locator.dart';
-import 'package:analyzer/src/dart/ast/utilities.dart';
-import 'package:analyzer/src/generated/java_engine.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:test/test.dart';
-
-import 'context/abstract_context.dart';
-
-class AbstractSingleUnitTest extends AbstractContextTest {
-  bool verifyNoTestUnitErrors = true;
-
-  String testCode;
-  String testFile = '/test.dart';
-  Source testSource;
-  CompilationUnit testUnit;
-  CompilationUnitElement testUnitElement;
-  LibraryElement testLibraryElement;
-
-  Source addTestSource(String code, [Uri uri]) {
-    testCode = code;
-    testSource = addSource(testFile, code);
-    return testSource;
-  }
-
-  void assertNoErrorsInSource(Source source) {
-    List<AnalysisError> errors = context.getErrors(source).errors;
-    expect(errors, isEmpty);
-  }
-
-  Element findElement(String name, [ElementKind kind]) {
-    return findChildElement(testUnitElement, name, kind);
-  }
-
-  int findEnd(String search) {
-    return findOffset(search) + search.length;
-  }
-
-  /**
-   * Returns the [SimpleIdentifier] at the given search pattern.
-   */
-  SimpleIdentifier findIdentifier(String search) {
-    return findNodeAtString(search, (node) => node is SimpleIdentifier);
-  }
-
-  AstNode findNodeAtOffset(int offset, [Predicate<AstNode> predicate]) {
-    AstNode result = new NodeLocator(offset).searchWithin(testUnit);
-    if (result != null && predicate != null) {
-      result = result.thisOrAncestorMatching(predicate);
-    }
-    return result;
-  }
-
-  AstNode findNodeAtString(String search, [Predicate<AstNode> predicate]) {
-    int offset = findOffset(search);
-    return findNodeAtOffset(offset, predicate);
-  }
-
-  Element findNodeElementAtString(String search,
-      [Predicate<AstNode> predicate]) {
-    AstNode node = findNodeAtString(search, predicate);
-    if (node == null) {
-      return null;
-    }
-    return ElementLocator.locate(node);
-  }
-
-  int findOffset(String search) {
-    int offset = testCode.indexOf(search);
-    expect(offset, isNonNegative, reason: "Not found '$search' in\n$testCode");
-    return offset;
-  }
-
-  int getLeadingIdentifierLength(String search) {
-    int length = 0;
-    while (length < search.length) {
-      int c = search.codeUnitAt(length);
-      if (c >= 'a'.codeUnitAt(0) && c <= 'z'.codeUnitAt(0)) {
-        length++;
-        continue;
-      }
-      if (c >= 'A'.codeUnitAt(0) && c <= 'Z'.codeUnitAt(0)) {
-        length++;
-        continue;
-      }
-      if (c >= '0'.codeUnitAt(0) && c <= '9'.codeUnitAt(0)) {
-        length++;
-        continue;
-      }
-      break;
-    }
-    return length;
-  }
-
-  void resolveTestUnit(String code) {
-    addTestSource(code);
-    testUnit = resolveLibraryUnit(testSource);
-    if (verifyNoTestUnitErrors) {
-      assertNoErrorsInSource(testSource);
-    }
-    testUnitElement = testUnit.declaredElement;
-    testLibraryElement = testUnitElement.library;
-  }
-}
diff --git a/pkg/analyzer/test/src/context/abstract_context.dart b/pkg/analyzer/test/src/context/abstract_context.dart
deleted file mode 100644
index 131646e..0000000
--- a/pkg/analyzer/test/src/context/abstract_context.dart
+++ /dev/null
@@ -1,180 +0,0 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/dart/element/visitor.dart';
-import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/src/context/cache.dart';
-import 'package:analyzer/src/context/context.dart';
-import 'package:analyzer/src/file_system/file_system.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/sdk.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/task/api/model.dart';
-import 'package:analyzer/src/task/driver.dart';
-import 'package:analyzer/src/test_utilities/mock_sdk.dart';
-import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
-import 'package:plugin/manager.dart';
-import 'package:plugin/plugin.dart';
-import 'package:test/test.dart';
-
-/**
- * Finds an [Element] with the given [name].
- */
-Element findChildElement(Element root, String name, [ElementKind kind]) {
-  Element result = null;
-  root.accept(new _ElementVisitorFunctionWrapper((Element element) {
-    if (element.name != name) {
-      return;
-    }
-    if (kind != null && element.kind != kind) {
-      return;
-    }
-    result = element;
-  }));
-  return result;
-}
-
-/**
- * A function to be called for every [Element].
- */
-typedef void _ElementVisitorFunction(Element element);
-
-class AbstractContextTest with ResourceProviderMixin {
-  DartSdk sdk;
-  SourceFactory sourceFactory;
-  AnalysisContextImpl context;
-  AnalysisCache analysisCache;
-  AnalysisDriver analysisDriver;
-
-  UriResolver sdkResolver;
-  UriResolver resourceResolver;
-
-  AnalysisTask task;
-  Map<ResultDescriptor<dynamic>, dynamic> oldOutputs;
-  Map<ResultDescriptor<dynamic>, dynamic> outputs;
-
-  Source addSource(String path, String contents) {
-    Source source = newSource(path, contents);
-    ChangeSet changeSet = new ChangeSet();
-    changeSet.addedSource(source);
-    context.applyChanges(changeSet);
-    return source;
-  }
-
-  /**
-   * Assert that the given [elements] has the same number of items as the number
-   * of specified [names], and that for each specified name, a corresponding
-   * element can be found in the given collection with that name.
-   */
-  void assertNamedElements(List<Element> elements, List<String> names) {
-    for (String elemName in names) {
-      bool found = false;
-      for (Element elem in elements) {
-        if (elem.name == elemName) {
-          found = true;
-          break;
-        }
-      }
-      if (!found) {
-        StringBuffer buffer = new StringBuffer();
-        buffer.write("Expected element named: ");
-        buffer.write(elemName);
-        buffer.write("\n  but found: ");
-        for (Element elem in elements) {
-          buffer.write(elem.name);
-          buffer.write(", ");
-        }
-        fail(buffer.toString());
-      }
-    }
-    expect(elements, hasLength(names.length));
-  }
-
-  /**
-   * Compute the given [result] for the given [target].
-   */
-  void computeResult(AnalysisTarget target, ResultDescriptor result,
-      {Matcher matcher: null}) {
-    oldOutputs = outputs;
-    task = analysisDriver.computeResult(target, result);
-    if (matcher == null) {
-      expect(task, isNotNull);
-    } else {
-      expect(task, matcher);
-    }
-    expect(task.caughtException, isNull);
-    outputs = task.outputs;
-    for (ResultDescriptor descriptor in task.descriptor.results) {
-      expect(outputs, contains(descriptor));
-    }
-  }
-
-  AnalysisContextImpl createAnalysisContext() {
-    return new AnalysisContextImpl();
-  }
-
-  DartSdk createDartSdk() => new MockSdk(resourceProvider: resourceProvider);
-
-  Source newSource(String path, [String content = '']) {
-    File file = newFile(path, content: content);
-    return file.createSource();
-  }
-
-  List<Source> newSources(Map<String, String> sourceMap) {
-    List<Source> sources = <Source>[];
-    sourceMap.forEach((String path, String content) {
-      Source source = newSource(path, content);
-      sources.add(source);
-    });
-    return sources;
-  }
-
-  void prepareAnalysisContext([AnalysisOptions options]) {
-    sdk = createDartSdk();
-    sdkResolver = new DartUriResolver(sdk);
-    resourceResolver = new ResourceUriResolver(resourceProvider);
-    sourceFactory = new SourceFactory(
-        <UriResolver>[sdkResolver, resourceResolver], null, resourceProvider);
-    context = createAnalysisContext();
-    if (options != null) {
-      context.analysisOptions = options;
-    }
-    context.sourceFactory = sourceFactory;
-    analysisCache = context.analysisCache;
-    analysisDriver = context.driver;
-  }
-
-  CompilationUnit resolveLibraryUnit(Source source) {
-    return context.resolveCompilationUnit2(source, source);
-  }
-
-  void setUp() {
-    List<Plugin> plugins = <Plugin>[];
-    plugins.addAll(AnalysisEngine.instance.requiredPlugins);
-
-    ExtensionManager manager = new ExtensionManager();
-    manager.processPlugins(plugins);
-
-    prepareAnalysisContext();
-  }
-
-  void tearDown() {}
-}
-
-/**
- * Wraps the given [_ElementVisitorFunction] into an instance of
- * [GeneralizingElementVisitor].
- */
-class _ElementVisitorFunctionWrapper extends GeneralizingElementVisitor {
-  final _ElementVisitorFunction function;
-
-  _ElementVisitorFunctionWrapper(this.function);
-
-  visitElement(Element element) {
-    function(element);
-    super.visitElement(element);
-  }
-}
diff --git a/pkg/analyzer/test/src/context/builder_test.dart b/pkg/analyzer/test/src/context/builder_test.dart
index 5c6cd3c..cc22d22 100644
--- a/pkg/analyzer/test/src/context/builder_test.dart
+++ b/pkg/analyzer/test/src/context/builder_test.dart
@@ -952,6 +952,8 @@
     expect(actual.strongModeHints, expected.strongModeHints);
     expect(actual.implicitCasts, expected.implicitCasts);
     expect(actual.implicitDynamic, expected.implicitDynamic);
+    expect(actual.strictInference, expected.strictInference);
+    expect(actual.strictRawTypes, expected.strictRawTypes);
     expect(actual.trackCacheDependencies, expected.trackCacheDependencies);
     expect(actual.disableCacheFlushing, expected.disableCacheFlushing);
   }
diff --git a/pkg/analyzer/test/src/context/cache_test.dart b/pkg/analyzer/test/src/context/cache_test.dart
index 2b42c7d9..a689ff0 100644
--- a/pkg/analyzer/test/src/context/cache_test.dart
+++ b/pkg/analyzer/test/src/context/cache_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/context/source_test.dart b/pkg/analyzer/test/src/context/source_test.dart
index 45a5ffc..74b8c43 100644
--- a/pkg/analyzer/test/src/context/source_test.dart
+++ b/pkg/analyzer/test/src/context/source_test.dart
@@ -1,16 +1,15 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/src/context/source.dart';
 import 'package:analyzer/src/file_system/file_system.dart';
 import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:package_config/packages.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'abstract_context.dart';
-
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(SourceFactoryImplTest);
@@ -18,7 +17,7 @@
 }
 
 @reflectiveTest
-class SourceFactoryImplTest extends AbstractContextTest {
+class SourceFactoryImplTest with ResourceProviderMixin {
   void test_restoreUri() {
     String libPath = convertPath('/pkgs/somepkg/lib');
     Uri libUri = getFolder(libPath).toUri();
@@ -27,7 +26,7 @@
       <UriResolver>[new ResourceUriResolver(resourceProvider)],
       new _MockPackages(packageUriMap),
     );
-    Source libSource = newSource('/pkgs/somepkg/lib');
+    Source libSource = newFile('/pkgs/somepkg/lib').createSource();
     Uri uri = sourceFactory.restoreUri(libSource);
     try {
       expect(uri, Uri.parse('package:foo/'));
diff --git a/pkg/analyzer/test/src/dart/analysis/base.dart b/pkg/analyzer/test/src/dart/analysis/base.dart
index a834e3d..46ac748 100644
--- a/pkg/analyzer/test/src/dart/analysis/base.dart
+++ b/pkg/analyzer/test/src/dart/analysis/base.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -66,6 +66,8 @@
   String testFile;
   String testCode;
 
+  List<String> enabledExperiments = [];
+
   bool get disableChangesAndCacheAllResults => false;
 
   void addTestFile(String content, {bool priority: false}) {
@@ -104,8 +106,9 @@
         externalSummaries: externalSummaries);
   }
 
-  AnalysisOptionsImpl createAnalysisOptions() =>
-      new AnalysisOptionsImpl()..useFastaParser = analyzer.Parser.useFasta;
+  AnalysisOptionsImpl createAnalysisOptions() => new AnalysisOptionsImpl()
+    ..useFastaParser = analyzer.Parser.useFasta
+    ..enabledExperiments = enabledExperiments;
 
   int findOffset(String search) {
     int offset = testCode.indexOf(search);
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 ad06c6a..1a2be58 100644
--- a/pkg/analyzer/test/src/dart/analysis/byte_store_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/byte_store_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/analysis/cache_test.dart b/pkg/analyzer/test/src/dart/analysis/cache_test.dart
index 20f190d..60524d6 100644
--- a/pkg/analyzer/test/src/dart/analysis/cache_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/cache_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/analysis/context_root_test.dart b/pkg/analyzer/test/src/dart/analysis/context_root_test.dart
index 6edc6d2..3e8299f 100644
--- a/pkg/analyzer/test/src/dart/analysis/context_root_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/context_root_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/analysis/crc32_test.dart b/pkg/analyzer/test/src/dart/analysis/crc32_test.dart
index 2480507..cb7e682 100644
--- a/pkg/analyzer/test/src/dart/analysis/crc32_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/crc32_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/analysis/defined_names_test.dart b/pkg/analyzer/test/src/dart/analysis/defined_names_test.dart
index 336414a..63f3ad4 100644
--- a/pkg/analyzer/test/src/dart/analysis/defined_names_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/defined_names_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/analysis/dependency/reference_collector_test.dart b/pkg/analyzer/test/src/dart/analysis/dependency/reference_collector_test.dart
index aacbb42..36027c4 100644
--- a/pkg/analyzer/test/src/dart/analysis/dependency/reference_collector_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/dependency/reference_collector_test.dart
@@ -20,6 +20,7 @@
     defineReflectiveTests(ImplReferenceCollectorTest);
     defineReflectiveTests(ShadowReferenceCollectorTest);
     defineReflectiveTests(StatementReferenceCollectorTest);
+    defineReflectiveTests(StatementReferenceCollectorTest_SpreadCollections);
     defineReflectiveTests(TypeReferenceCollectorTest);
   });
 }
@@ -1385,10 +1386,6 @@
 
 @reflectiveTest
 class ExpressionReferenceCollectorTest_SetLiterals extends _Base {
-  @override
-  AnalysisOptionsImpl get analysisOptions =>
-      AnalysisOptionsImpl()..enabledExperiments = [EnableString.set_literals];
-
   test_setLiteral() async {
     var library = await buildTestLibrary(a, r'''
 test() {
@@ -2161,6 +2158,14 @@
 }
 
 @reflectiveTest
+class StatementReferenceCollectorTest_SpreadCollections
+    extends StatementReferenceCollectorTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [EnableString.spread_collections];
+}
+
+@reflectiveTest
 class TypeReferenceCollectorTest extends _Base {
   test_dynamic() async {
     var library = await buildTestLibrary(a, r'''
diff --git a/pkg/analyzer/test/src/dart/analysis/dependency/test_all.dart b/pkg/analyzer/test/src/dart/analysis/dependency/test_all.dart
index 0abdb5c..9ddb5bd 100644
--- a/pkg/analyzer/test/src/dart/analysis/dependency/test_all.dart
+++ b/pkg/analyzer/test/src/dart/analysis/dependency/test_all.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/analysis/driver_resolution_test.dart b/pkg/analyzer/test/src/dart/analysis/driver_resolution_test.dart
index f5d7695..b116529 100644
--- a/pkg/analyzer/test/src/dart/analysis/driver_resolution_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/driver_resolution_test.dart
@@ -2114,7 +2114,6 @@
     var fTypeParameter = fType.normalParameterTypes[0] as TypeParameterType;
     expect(fTypeParameter.element, same(fTypeTypeParameter));
     var tRef = findNode.simple('T>');
-    assertType(tRef, null);
     var functionTypeNode = tRef.parent.parent.parent as GenericFunctionType;
     var functionType = functionTypeNode.type as FunctionType;
     assertElement(tRef, functionType.typeFormals[0]);
@@ -2669,17 +2668,15 @@
 
   test_invalid_const_as() async {
     addTestFile(r'''
-class A {
-  final int a;
-  const A(num b) : a = b as int;
-}
+const num a = 1.2;
+const int b = a as int;
 ''');
     await resolveTestFile();
     expect(result.errors, isNotEmpty);
 
-    var bRef = findNode.simple('b as int');
-    assertElement(bRef, findElement.parameter('b'));
-    assertType(bRef, 'num');
+    var aRef = findNode.simple('a as int');
+    assertElement(aRef, findElement.topGet('a'));
+    assertType(aRef, 'num');
 
     assertTypeName(findNode.typeName('int;'), intElement, 'int');
   }
@@ -4941,12 +4938,12 @@
     BlockFunctionBody fooBody = fooDeclaration.body;
     List<Statement> statements = fooBody.block.statements;
 
-    ForEachStatement forEachStatement = statements[0];
+    ForStatement forEachStatement = statements[0];
     Block forBlock = forEachStatement.body;
+    var forEachParts =
+        forEachStatement.forLoopParts as ForEachPartsWithIdentifier;
 
-    expect(forEachStatement.loopVariable, isNull);
-
-    SimpleIdentifier vInFor = forEachStatement.identifier;
+    SimpleIdentifier vInFor = forEachParts.identifier;
     expect(vInFor.staticElement, same(vElement.setter));
     expect(vInFor.staticType, typeProvider.numType);
 
@@ -4976,12 +4973,12 @@
     LocalVariableElement vElement = vNode.declaredElement;
     expect(vElement.type, typeProvider.numType);
 
-    ForEachStatement forEachStatement = statements[1];
+    ForStatement forEachStatement = statements[1];
     Block forBlock = forEachStatement.body;
+    var forEachParts =
+        forEachStatement.forLoopParts as ForEachPartsWithIdentifier;
 
-    expect(forEachStatement.loopVariable, isNull);
-
-    SimpleIdentifier vInFor = forEachStatement.identifier;
+    SimpleIdentifier vInFor = forEachParts.identifier;
     expect(vInFor.staticElement, vElement);
     expect(vInFor.staticType, typeProvider.numType);
 
@@ -5011,12 +5008,12 @@
     TopLevelVariableElement vElement = vNode.declaredElement;
     expect(vElement.type, typeProvider.numType);
 
-    ForEachStatement forEachStatement = statements[0];
+    ForStatement forEachStatement = statements[0];
     Block forBlock = forEachStatement.body;
+    var forEachParts =
+        forEachStatement.forLoopParts as ForEachPartsWithIdentifier;
 
-    expect(forEachStatement.loopVariable, isNull);
-
-    SimpleIdentifier vInFor = forEachStatement.identifier;
+    SimpleIdentifier vInFor = forEachParts.identifier;
     expect(vInFor.staticElement, same(vElement.setter));
     expect(vInFor.staticType, typeProvider.numType);
 
@@ -5040,10 +5037,12 @@
 
     List<Statement> statements = _getMainStatements(result);
 
-    ForEachStatement forEachStatement = statements[0];
+    ForStatement forEachStatement = statements[0];
     Block forBlock = forEachStatement.body;
+    var forEachParts =
+        forEachStatement.forLoopParts as ForEachPartsWithDeclaration;
 
-    DeclaredIdentifier vNode = forEachStatement.loopVariable;
+    DeclaredIdentifier vNode = forEachParts.loopVariable;
     LocalVariableElement vElement = vNode.declaredElement;
     expect(vElement.type, typeProvider.intType);
 
@@ -5070,10 +5069,12 @@
 
     List<Statement> statements = _getMainStatements(result);
 
-    ForEachStatement forEachStatement = statements[0];
+    ForStatement forEachStatement = statements[0];
     Block forBlock = forEachStatement.body;
+    var forEachParts =
+        forEachStatement.forLoopParts as ForEachPartsWithDeclaration;
 
-    DeclaredIdentifier vNode = forEachStatement.loopVariable;
+    DeclaredIdentifier vNode = forEachParts.loopVariable;
     LocalVariableElement vElement = vNode.declaredElement;
     expect(vElement.type, typeProvider.numType);
 
@@ -5192,7 +5193,7 @@
 
     {
       ExpressionStatement statement = statements[0];
-      MapLiteral mapLiteral = statement.expression;
+      SetOrMapLiteral mapLiteral = statement.expression;
       expect(
           mapLiteral.staticType,
           typeProvider.mapType
@@ -5201,7 +5202,7 @@
 
     {
       ExpressionStatement statement = statements[1];
-      MapLiteral mapLiteral = statement.expression;
+      SetOrMapLiteral mapLiteral = statement.expression;
       expect(
           mapLiteral.staticType,
           typeProvider.mapType
@@ -5218,7 +5219,7 @@
     await resolveTestFile();
     expect(result.errors, isNotEmpty);
 
-    var literal = findNode.mapLiteral('<bool, int, double>{}');
+    var literal = findNode.setOrMapLiteral('<bool, int, double>{}');
     assertType(literal, 'Map<dynamic, dynamic>');
 
     var boolRef = findNode.simple('bool, ');
@@ -6725,7 +6726,7 @@
     await resolveTestFile();
     expect(result.errors, isEmpty);
 
-    var literal = findNode.setLiteral('<int>{}');
+    var literal = findNode.setOrMapLiteral('<int>{}');
     assertType(literal, 'Set<int>');
 
     var intRef = findNode.simple('int>{}');
diff --git a/pkg/analyzer/test/src/dart/analysis/file_byte_store_test.dart b/pkg/analyzer/test/src/dart/analysis/file_byte_store_test.dart
index 5975150..120aab9 100644
--- a/pkg/analyzer/test/src/dart/analysis/file_byte_store_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/file_byte_store_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/analysis/file_state_test.dart b/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
index 0a97168..f69ba70 100644
--- a/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/file_state_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -817,6 +817,7 @@
 class C {}
 typedef F();
 enum E {E1, E2}
+mixin M {}
 void f() {}
 var V1;
 get V2 => null;
@@ -827,6 +828,7 @@
 class _C {}
 typedef _F();
 enum _E {E1, E2}
+mixin _M {}
 void _f() {}
 var _V1;
 get _V2 => null;
@@ -840,11 +842,14 @@
       expect(declarations[name]?.kind, kind);
     }
 
-    expect(declarations.keys,
-        unorderedEquals(['C', 'F', 'E', 'f', 'V1', 'V2', 'V3', 'V4']));
+    expect(
+      declarations.keys,
+      unorderedEquals(['C', 'F', 'E', 'M', 'f', 'V1', 'V2', 'V3', 'V4']),
+    );
     assertHas('C', TopLevelDeclarationKind.type);
     assertHas('F', TopLevelDeclarationKind.type);
     assertHas('E', TopLevelDeclarationKind.type);
+    assertHas('M', TopLevelDeclarationKind.type);
     assertHas('f', TopLevelDeclarationKind.function);
     assertHas('V1', TopLevelDeclarationKind.variable);
     assertHas('V2', TopLevelDeclarationKind.variable);
diff --git a/pkg/analyzer/test/src/dart/analysis/fletcher16_test.dart b/pkg/analyzer/test/src/dart/analysis/fletcher16_test.dart
index e44e3a7..fb801e5 100644
--- a/pkg/analyzer/test/src/dart/analysis/fletcher16_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/fletcher16_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/analysis/mutex_test.dart b/pkg/analyzer/test/src/dart/analysis/mutex_test.dart
index 34a8d86..a70119a 100644
--- a/pkg/analyzer/test/src/dart/analysis/mutex_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/mutex_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/analysis/referenced_names_test.dart b/pkg/analyzer/test/src/dart/analysis/referenced_names_test.dart
index 097d3ed..d223d82 100644
--- a/pkg/analyzer/test/src/dart/analysis/referenced_names_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/referenced_names_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/analysis/results_test.dart b/pkg/analyzer/test/src/dart/analysis/results_test.dart
new file mode 100644
index 0000000..06a0b47
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/analysis/results_test.dart
@@ -0,0 +1,477 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/src/dart/analysis/results.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(GetElementDeclarationParsedTest);
+    defineReflectiveTests(GetElementDeclarationResolvedTest);
+  });
+}
+
+mixin GetElementDeclarationMixin implements DriverResolutionTest {
+  Future<ElementDeclarationResult> getElementDeclaration(Element element);
+
+  test_class() async {
+    addTestFile(r'''
+class A {}
+''');
+    await resolveTestFile();
+
+    var element = findNode.classDeclaration('A').declaredElement;
+    var result = await getElementDeclaration(element);
+    ClassDeclaration node = result.node;
+    expect(node.name.name, 'A');
+  }
+
+  test_class_duplicate() async {
+    addTestFile(r'''
+class A {} // 1
+class A {} // 2
+''');
+    await resolveTestFile();
+
+    {
+      var element = findNode.classDeclaration('A {} // 1').declaredElement;
+      var result = await getElementDeclaration(element);
+      ClassDeclaration node = result.node;
+      expect(node.name.name, 'A');
+      expect(
+        node.name.offset,
+        this.result.content.indexOf('A {} // 1'),
+      );
+    }
+
+    {
+      var element = findNode.classDeclaration('A {} // 2').declaredElement;
+      var result = await getElementDeclaration(element);
+      ClassDeclaration node = result.node;
+      expect(node.name.name, 'A');
+      expect(
+        node.name.offset,
+        this.result.content.indexOf('A {} // 2'),
+      );
+    }
+  }
+
+  test_class_inPart() async {
+    newFile('/test/lib/a.dart', content: r'''
+part of 'test.dart';
+class A {}
+''');
+    addTestFile(r'''
+part 'a.dart';
+''');
+    await resolveTestFile();
+
+    var library = this.result.unit.declaredElement.library;
+    var element = library.getType('A');
+    var result = await getElementDeclaration(element);
+    ClassDeclaration node = result.node;
+    expect(node.name.name, 'A');
+  }
+
+  test_class_missingName() async {
+    addTestFile('''
+class {}
+''');
+    await resolveTestFile();
+
+    var element = findNode.classDeclaration('class {}').declaredElement;
+    var result = await getElementDeclaration(element);
+    ClassDeclaration node = result.node;
+    expect(node.name.name, '');
+    expect(node.name.offset, 6);
+  }
+
+  test_classTypeAlias() async {
+    addTestFile(r'''
+mixin M {}
+class A {}
+class B = A with M;
+''');
+    await resolveTestFile();
+
+    var element = findElement.class_('B');
+    var result = await getElementDeclaration(element);
+    ClassTypeAlias node = result.node;
+    expect(node.name.name, 'B');
+  }
+
+  test_constructor() async {
+    addTestFile(r'''
+class A {
+  A();
+  A.named();
+}
+''');
+    await resolveTestFile();
+
+    {
+      var unnamed = findNode.constructor('A();').declaredElement;
+      var result = await getElementDeclaration(unnamed);
+      ConstructorDeclaration node = result.node;
+      expect(node.name, isNull);
+    }
+
+    {
+      var named = findNode.constructor('A.named();').declaredElement;
+      var result = await getElementDeclaration(named);
+      ConstructorDeclaration node = result.node;
+      expect(node.name.name, 'named');
+    }
+  }
+
+  test_constructor_duplicate_named() async {
+    addTestFile(r'''
+class A {
+  A.named(); // 1
+  A.named(); // 2
+}
+''');
+    await resolveTestFile();
+
+    {
+      var element = findNode.constructor('A.named(); // 1').declaredElement;
+      var result = await getElementDeclaration(element);
+      ConstructorDeclaration node = result.node;
+      expect(node.name.name, 'named');
+      expect(
+        node.name.offset,
+        this.result.content.indexOf('named(); // 1'),
+      );
+    }
+
+    {
+      var element = findNode.constructor('A.named(); // 2').declaredElement;
+      var result = await getElementDeclaration(element);
+      ConstructorDeclaration node = result.node;
+      expect(node.name.name, 'named');
+      expect(
+        node.name.offset,
+        this.result.content.indexOf('named(); // 2'),
+      );
+    }
+  }
+
+  test_constructor_duplicate_unnamed() async {
+    addTestFile(r'''
+class A {
+  A(); // 1
+  A(); // 2
+}
+''');
+    await resolveTestFile();
+
+    {
+      var element = findNode.constructor('A(); // 1').declaredElement;
+      var result = await getElementDeclaration(element);
+      ConstructorDeclaration node = result.node;
+      expect(node.name, isNull);
+      expect(
+        node.returnType.offset,
+        this.result.content.indexOf('A(); // 1'),
+      );
+    }
+
+    {
+      var element = findNode.constructor('A(); // 2').declaredElement;
+      var result = await getElementDeclaration(element);
+      ConstructorDeclaration node = result.node;
+      expect(node.name, isNull);
+      expect(
+        node.returnType.offset,
+        this.result.content.indexOf('A(); // 2'),
+      );
+    }
+  }
+
+  test_constructor_synthetic() async {
+    addTestFile(r'''
+class A {}
+''');
+    await resolveTestFile();
+
+    var element = findElement.class_('A').unnamedConstructor;
+    expect(element.isSynthetic, isTrue);
+
+    var result = await getElementDeclaration(element);
+    expect(result, isNull);
+  }
+
+  test_enum() async {
+    addTestFile(r'''
+enum MyEnum {a, b, c}
+''');
+    await resolveTestFile();
+
+    var element = findElement.enum_('MyEnum');
+    var result = await getElementDeclaration(element);
+    EnumDeclaration node = result.node;
+    expect(node.name.name, 'MyEnum');
+  }
+
+  test_enum_constant() async {
+    addTestFile(r'''
+enum MyEnum {a, b, c}
+''');
+    await resolveTestFile();
+
+    var element = findElement.field('a');
+    var result = await getElementDeclaration(element);
+    EnumConstantDeclaration node = result.node;
+    expect(node.name.name, 'a');
+  }
+
+  test_field() async {
+    addTestFile(r'''
+class C {
+  int foo;
+}
+''');
+    await resolveTestFile();
+
+    var element = findElement.field('foo');
+
+    var result = await getElementDeclaration(element);
+    VariableDeclaration node = result.node;
+    expect(node.name.name, 'foo');
+  }
+
+  test_functionDeclaration_local() async {
+    addTestFile(r'''
+main() {
+  void foo() {}
+}
+''');
+    await resolveTestFile();
+
+    var element = findElement.localFunction('foo');
+
+    var result = await getElementDeclaration(element);
+    FunctionDeclaration node = result.node;
+    expect(node.name.name, 'foo');
+  }
+
+  test_functionDeclaration_top() async {
+    addTestFile(r'''
+void foo() {}
+''');
+    await resolveTestFile();
+
+    var element = findElement.topFunction('foo');
+
+    var result = await getElementDeclaration(element);
+    FunctionDeclaration node = result.node;
+    expect(node.name.name, 'foo');
+  }
+
+  test_getter_class() async {
+    addTestFile(r'''
+class A {
+  int get x => 0;
+}
+''');
+    await resolveTestFile();
+
+    var element = findElement.getter('x');
+    var result = await getElementDeclaration(element);
+    MethodDeclaration node = result.node;
+    expect(node.name.name, 'x');
+    expect(node.isGetter, isTrue);
+  }
+
+  test_getter_top() async {
+    addTestFile(r'''
+int get x => 0;
+''');
+    await resolveTestFile();
+
+    var element = findElement.topGet('x');
+    var result = await getElementDeclaration(element);
+    FunctionDeclaration node = result.node;
+    expect(node.name.name, 'x');
+    expect(node.isGetter, isTrue);
+  }
+
+  test_localVariable() async {
+    addTestFile(r'''
+main() {
+  int foo;
+}
+''');
+    await resolveTestFile();
+
+    var element = findElement.localVar('foo');
+
+    var result = await getElementDeclaration(element);
+    VariableDeclaration node = result.node;
+    expect(node.name.name, 'foo');
+  }
+
+  test_method() async {
+    addTestFile(r'''
+class C {
+  void foo() {}
+}
+''');
+    await resolveTestFile();
+
+    var element = findElement.method('foo');
+
+    var result = await getElementDeclaration(element);
+    MethodDeclaration node = result.node;
+    expect(node.name.name, 'foo');
+  }
+
+  test_mixin() async {
+    addTestFile(r'''
+mixin M {}
+''');
+    await resolveTestFile();
+
+    var element = findElement.mixin('M');
+    var result = await getElementDeclaration(element);
+    MixinDeclaration node = result.node;
+    expect(node.name.name, 'M');
+  }
+
+  test_parameter() async {
+    addTestFile(r'''
+void f(int a) {}
+''');
+    await resolveTestFile();
+
+    var element = findElement.parameter('a');
+
+    var result = await getElementDeclaration(element);
+    SimpleFormalParameter node = result.node;
+    expect(node.identifier.name, 'a');
+  }
+
+  test_parameter_missingName_named() async {
+    addTestFile(r'''
+void f({@a}) {}
+''');
+    await resolveTestFile();
+
+    var f = findElement.topFunction('f');
+    var element = f.parameters.single;
+    expect(element.name, '');
+    expect(element.isNamed, isTrue);
+
+    var result = await getElementDeclaration(element);
+    DefaultFormalParameter node = result.node;
+    expect(node.identifier.name, '');
+  }
+
+  test_parameter_missingName_required() async {
+    addTestFile(r'''
+void f(@a) {}
+''');
+    await resolveTestFile();
+
+    var f = findElement.topFunction('f');
+    var element = f.parameters.single;
+    expect(element.name, '');
+    expect(element.isPositional, isTrue);
+
+    var result = await getElementDeclaration(element);
+    SimpleFormalParameter node = result.node;
+    expect(node.identifier.name, '');
+  }
+
+  test_setter_class() async {
+    addTestFile(r'''
+class A {
+  set x(_) {}
+}
+''');
+    await resolveTestFile();
+
+    var element = findElement.setter('x');
+    var result = await getElementDeclaration(element);
+    MethodDeclaration node = result.node;
+    expect(node.name.name, 'x');
+    expect(node.isSetter, isTrue);
+  }
+
+  test_setter_top() async {
+    addTestFile(r'''
+set x(_) {}
+''');
+    await resolveTestFile();
+
+    var element = findElement.topSet('x');
+    var result = await getElementDeclaration(element);
+    FunctionDeclaration node = result.node;
+    expect(node.name.name, 'x');
+    expect(node.isSetter, isTrue);
+  }
+
+  test_topLevelVariable() async {
+    addTestFile(r'''
+int foo;
+''');
+    await resolveTestFile();
+
+    var element = findElement.topVar('foo');
+
+    var result = await getElementDeclaration(element);
+    VariableDeclaration node = result.node;
+    expect(node.name.name, 'foo');
+  }
+
+  test_topLevelVariable_synthetic() async {
+    addTestFile(r'''
+int get foo => 0;
+''');
+    await resolveTestFile();
+
+    var element = findElement.topVar('foo');
+
+    var result = await getElementDeclaration(element);
+    expect(result, isNull);
+  }
+}
+
+@reflectiveTest
+class GetElementDeclarationParsedTest extends DriverResolutionTest
+    with GetElementDeclarationMixin {
+  @override
+  Future<ElementDeclarationResult> getElementDeclaration(
+      Element element) async {
+    var libraryPath = element.library.source.fullName;
+    var library = _getParsedLibrary(libraryPath);
+    return library.getElementDeclaration(element);
+  }
+
+  ParsedLibraryResultImpl _getParsedLibrary(String path) {
+    return driver.getParsedLibrary(path);
+  }
+}
+
+@reflectiveTest
+class GetElementDeclarationResolvedTest extends DriverResolutionTest
+    with GetElementDeclarationMixin {
+  @override
+  Future<ElementDeclarationResult> getElementDeclaration(
+      Element element) async {
+    var libraryPath = element.library.source.fullName;
+    var library = await _getResolvedLibrary(libraryPath);
+    return library.getElementDeclaration(element);
+  }
+
+  Future<ResolvedLibraryResult> _getResolvedLibrary(String path) {
+    return driver.getResolvedLibrary(path);
+  }
+}
diff --git a/pkg/analyzer/test/src/dart/analysis/session_helper_test.dart b/pkg/analyzer/test/src/dart/analysis/session_helper_test.dart
index f815fbc..7316c24 100644
--- a/pkg/analyzer/test/src/dart/analysis/session_helper_test.dart
+++ b/pkg/analyzer/test/src/dart/analysis/session_helper_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -76,258 +76,19 @@
   }
 
   test_getElementDeclaration_class() async {
-    newFile('/test/lib/test.dart', content: r'''
+    addTestFile(r'''
 class A {}
 ''');
     await resolveTestFile();
 
-    var element = findNode.classDeclaration('A').declaredElement;
+    var element = findElement.class_('A');
     var result = await helper.getElementDeclaration(element);
     ClassDeclaration node = result.node;
     expect(node.name.name, 'A');
   }
 
-  test_getElementDeclaration_class_duplicate() async {
-    newFile('/test/lib/test.dart', content: r'''
-class A {} // 1
-class A {} // 2
-''');
-    await resolveTestFile();
-
-    {
-      var element = findNode.classDeclaration('A {} // 1').declaredElement;
-      var result = await helper.getElementDeclaration(element);
-      ClassDeclaration node = result.node;
-      expect(node.name.name, 'A');
-      expect(
-        node.name.offset,
-        this.result.content.indexOf('A {} // 1'),
-      );
-    }
-
-    {
-      var element = findNode.classDeclaration('A {} // 2').declaredElement;
-      var result = await helper.getElementDeclaration(element);
-      ClassDeclaration node = result.node;
-      expect(node.name.name, 'A');
-      expect(
-        node.name.offset,
-        this.result.content.indexOf('A {} // 2'),
-      );
-    }
-  }
-
-  test_getElementDeclaration_class_inPart() async {
-    newFile('/test/lib/a.dart', content: r'''
-part of 'test.dart';
-class A {}
-''');
-    newFile('/test/lib/test.dart', content: r'''
-part 'a.dart';
-''');
-    await resolveTestFile();
-
-    var library = this.result.unit.declaredElement.library;
-    var element = library.getType('A');
-    var result = await helper.getElementDeclaration(element);
-    ClassDeclaration node = result.node;
-    expect(node.name.name, 'A');
-  }
-
-  test_getElementDeclaration_constructor() async {
-    newFile('/test/lib/test.dart', content: r'''
-class A {
-  A();
-  A.named();
-}
-''');
-    await resolveTestFile();
-
-    {
-      var unnamed = findNode.constructor('A();').declaredElement;
-      var result = await helper.getElementDeclaration(unnamed);
-      ConstructorDeclaration node = result.node;
-      expect(node.name, isNull);
-    }
-
-    {
-      var named = findNode.constructor('A.named();').declaredElement;
-      var result = await helper.getElementDeclaration(named);
-      ConstructorDeclaration node = result.node;
-      expect(node.name.name, 'named');
-    }
-  }
-
-  test_getElementDeclaration_constructor_duplicate_named() async {
-    newFile('/test/lib/test.dart', content: r'''
-class A {
-  A.named(); // 1
-  A.named(); // 2
-}
-''');
-    await resolveTestFile();
-
-    {
-      var element = findNode.constructor('A.named(); // 1').declaredElement;
-      var result = await helper.getElementDeclaration(element);
-      ConstructorDeclaration node = result.node;
-      expect(node.name.name, 'named');
-      expect(
-        node.name.offset,
-        this.result.content.indexOf('named(); // 1'),
-      );
-    }
-
-    {
-      var element = findNode.constructor('A.named(); // 2').declaredElement;
-      var result = await helper.getElementDeclaration(element);
-      ConstructorDeclaration node = result.node;
-      expect(node.name.name, 'named');
-      expect(
-        node.name.offset,
-        this.result.content.indexOf('named(); // 2'),
-      );
-    }
-  }
-
-  test_getElementDeclaration_constructor_duplicate_unnamed() async {
-    newFile('/test/lib/test.dart', content: r'''
-class A {
-  A(); // 1
-  A(); // 2
-}
-''');
-    await resolveTestFile();
-
-    {
-      var element = findNode.constructor('A(); // 1').declaredElement;
-      var result = await helper.getElementDeclaration(element);
-      ConstructorDeclaration node = result.node;
-      expect(node.name, isNull);
-      expect(
-        node.returnType.offset,
-        this.result.content.indexOf('A(); // 1'),
-      );
-    }
-
-    {
-      var element = findNode.constructor('A(); // 2').declaredElement;
-      var result = await helper.getElementDeclaration(element);
-      ConstructorDeclaration node = result.node;
-      expect(node.name, isNull);
-      expect(
-        node.returnType.offset,
-        this.result.content.indexOf('A(); // 2'),
-      );
-    }
-  }
-
-  test_getElementDeclaration_constructor_synthetic() async {
-    newFile('/test/lib/test.dart', content: r'''
-class A {}
-''');
-    await resolveTestFile();
-
-    var element = findElement.class_('A').unnamedConstructor;
-    expect(element.isSynthetic, isTrue);
-
-    var result = await helper.getElementDeclaration(element);
-    expect(result, isNull);
-  }
-
-  test_getElementDeclaration_field() async {
-    newFile('/test/lib/test.dart', content: r'''
-class C {
-  int foo;
-}
-''');
-    await resolveTestFile();
-
-    var element = findElement.field('foo');
-    var result = await helper.getElementDeclaration(element);
-    VariableDeclaration node = result.node;
-    expect(node.name.name, 'foo');
-  }
-
-  test_getElementDeclaration_functionDeclaration_local() async {
-    newFile('/test/lib/test.dart', content: r'''
-main() {
-  void foo() {}
-}
-''');
-    await resolveTestFile();
-
-    var element = findElement.localFunction('foo');
-    var result = await helper.getElementDeclaration(element);
-    FunctionDeclaration node = result.node;
-    expect(node.name.name, 'foo');
-  }
-
-  test_getElementDeclaration_functionDeclaration_top() async {
-    newFile('/test/lib/test.dart', content: r'''
-void foo() {}
-''');
-    await resolveTestFile();
-
-    var element = findElement.topFunction('foo');
-    var result = await helper.getElementDeclaration(element);
-    FunctionDeclaration node = result.node;
-    expect(node.name.name, 'foo');
-  }
-
-  test_getElementDeclaration_localVariable() async {
-    newFile('/test/lib/test.dart', content: r'''
-main() {
-  int foo;
-}
-''');
-    await resolveTestFile();
-
-    var element = findElement.localVar('foo');
-    var result = await helper.getElementDeclaration(element);
-    VariableDeclaration node = result.node;
-    expect(node.name.name, 'foo');
-  }
-
-  test_getElementDeclaration_method() async {
-    newFile('/test/lib/test.dart', content: r'''
-class C {
-  void foo() {}
-}
-''');
-    await resolveTestFile();
-
-    var element = findElement.method('foo');
-    var result = await helper.getElementDeclaration(element);
-    MethodDeclaration node = result.node;
-    expect(node.name.name, 'foo');
-  }
-
-  test_getElementDeclaration_topLevelVariable() async {
-    newFile('/test/lib/test.dart', content: r'''
-int foo;
-''');
-    await resolveTestFile();
-
-    var element = findElement.topVar('foo');
-    var result = await helper.getElementDeclaration(element);
-    VariableDeclaration node = result.node;
-    expect(node.name.name, 'foo');
-  }
-
-  test_getElementDeclaration_topLevelVariable_synthetic() async {
-    newFile('/test/lib/test.dart', content: r'''
-int get foo => 0;
-''');
-    await resolveTestFile();
-
-    var element = findElement.topVar('foo');
-    var result = await helper.getElementDeclaration(element);
-    expect(result, isNull);
-  }
-
   test_getResolvedUnitByElement() async {
-    newFile('/test/lib/test.dart', content: r'''
+    addTestFile(r'''
 class A {}
 class B {}
 ''');
diff --git a/pkg/analyzer/test/src/dart/analysis/test_all.dart b/pkg/analyzer/test/src/dart/analysis/test_all.dart
index 77d968e..481b428 100644
--- a/pkg/analyzer/test/src/dart/analysis/test_all.dart
+++ b/pkg/analyzer/test/src/dart/analysis/test_all.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -22,6 +22,7 @@
 import 'index_test.dart' as index;
 import 'mutex_test.dart' as mutex;
 import 'referenced_names_test.dart' as referenced_names;
+import 'results_test.dart' as results;
 import 'search_test.dart' as search;
 import 'session_helper_test.dart' as session_helper;
 import 'session_test.dart' as session;
@@ -47,6 +48,7 @@
     index.main();
     mutex.main();
     referenced_names.main();
+    results.main();
     search.main();
     session.main();
     session_helper.main();
diff --git a/pkg/analyzer/test/src/dart/ast/ast_test.dart b/pkg/analyzer/test/src/dart/ast/ast_test.dart
index f0a6265..7c10555 100644
--- a/pkg/analyzer/test/src/dart/ast/ast_test.dart
+++ b/pkg/analyzer/test/src/dart/ast/ast_test.dart
@@ -469,8 +469,6 @@
   String testSource;
   CompilationUnitImpl testUnit;
 
-  bool get enableNewAnalysisDriver => true;
-
   void assertIsConst(String snippet, bool expectedResult) {
     int index = testSource.indexOf(snippet);
     expect(index >= 0, isTrue);
diff --git a/pkg/analyzer/test/src/dart/ast/parse_base.dart b/pkg/analyzer/test/src/dart/ast/parse_base.dart
index a157430..78f17d5 100644
--- a/pkg/analyzer/test/src/dart/ast/parse_base.dart
+++ b/pkg/analyzer/test/src/dart/ast/parse_base.dart
@@ -35,24 +35,31 @@
     var useFasta = analysisOptions.useFastaParser;
     var parser = Parser(source, errorListener, useFasta: useFasta);
     parser.enableOptionalNewAndConst = true;
-    parser.enableSetLiterals = experimentStatus.set_literals;
     parser.enableNonNullable = experimentStatus.non_nullable;
     parser.enableSpreadCollections = experimentStatus.spread_collections;
     parser.enableControlFlowCollections =
         experimentStatus.control_flow_collections;
+    parser.enableTripleShift = experimentStatus.triple_shift;
 
     var unit = parser.parseCompilationUnit(token);
     unit.lineInfo = LineInfo(scanner.lineStarts);
 
-    return ParseResult(path, content, unit, errorListener.errors);
+    return ParseResult(
+      path,
+      content,
+      unit.lineInfo,
+      unit,
+      errorListener.errors,
+    );
   }
 }
 
 class ParseResult {
   final String path;
   final String content;
+  final LineInfo lineInfo;
   final CompilationUnit unit;
   final List<AnalysisError> errors;
 
-  ParseResult(this.path, this.content, this.unit, this.errors);
+  ParseResult(this.path, this.content, this.lineInfo, this.unit, this.errors);
 }
diff --git a/pkg/analyzer/test/src/dart/ast/test_all.dart b/pkg/analyzer/test/src/dart/ast/test_all.dart
index 25eb567..2f66d8c 100644
--- a/pkg/analyzer/test/src/dart/ast/test_all.dart
+++ b/pkg/analyzer/test/src/dart/ast/test_all.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/ast/utilities_test.dart b/pkg/analyzer/test/src/dart/ast/utilities_test.dart
index 1a9032b..31e9a56 100644
--- a/pkg/analyzer/test/src/dart/ast/utilities_test.dart
+++ b/pkg/analyzer/test/src/dart/ast/utilities_test.dart
@@ -394,8 +394,8 @@
     expect((toNode.updaters[0] as SimpleIdentifier).staticType, same(typeC));
   }
 
-  void test_visitForStatement2() {
-    ForStatement2 createNode() => astFactory.forStatement2(
+  void test_visitForStatement() {
+    ForStatement createNode() => astFactory.forStatement(
         forLoopParts: astFactory.forEachPartsWithIdentifier(
             identifier: AstTestFactory.identifier3('a'),
             iterable: AstTestFactory.identifier3('b')),
@@ -406,14 +406,14 @@
     DartType typeB = ElementFactory.classElement2("B").type;
     DartType typeC = ElementFactory.classElement2("C").type;
 
-    ForStatement2 fromNode = createNode();
+    ForStatement fromNode = createNode();
     ForEachPartsWithIdentifier fromForLoopParts = fromNode.forLoopParts;
     fromForLoopParts.identifier.staticType = typeA;
     (fromForLoopParts.iterable as SimpleIdentifier).staticType = typeB;
     ((fromNode.body as ExpressionStatement).expression as SimpleIdentifier)
         .staticType = typeC;
 
-    ForStatement2 toNode = createNode();
+    ForStatement toNode = createNode();
     ResolutionCopier.copyResolutionData(fromNode, toNode);
     ForEachPartsWithIdentifier toForLoopParts = fromNode.forLoopParts;
     expect(toForLoopParts.identifier.staticType, same(typeA));
@@ -563,67 +563,36 @@
   }
 
   void test_visitListLiteral() {
-    ListLiteral fromNode = AstTestFactory.listLiteral();
-    DartType staticType = ElementFactory.classElement2("C").type;
-    fromNode.staticType = staticType;
-    ListLiteral toNode = AstTestFactory.listLiteral();
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.staticType, same(staticType));
-  }
-
-  void test_visitListLiteral2() {
-    ListLiteral2 createNode() => astFactory.listLiteral2(
-        typeArguments:
-            AstTestFactory.typeArgumentList([AstTestFactory.typeName4('A')]),
-        elements: [AstTestFactory.identifier3('b')]);
-
-    DartType typeA = ElementFactory.classElement2("A").type;
-    DartType typeB = ElementFactory.classElement2("B").type;
-
-    ListLiteral2 fromNode = createNode();
-    (fromNode.typeArguments.arguments[0] as TypeName).type = typeA;
-    (fromNode.elements[0] as SimpleIdentifier).staticType = typeB;
-
-    ListLiteral2 toNode = createNode();
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect((toNode.typeArguments.arguments[0] as TypeName).type, same(typeA));
-    expect((toNode.elements[0] as SimpleIdentifier).staticType, same(typeB));
-  }
-
-  void test_visitMapLiteral() {
-    MapLiteral fromNode = AstTestFactory.mapLiteral2();
-    DartType staticType = ElementFactory.classElement2("C").type;
-    fromNode.staticType = staticType;
-    MapLiteral toNode = AstTestFactory.mapLiteral2();
-    ResolutionCopier.copyResolutionData(fromNode, toNode);
-    expect(toNode.staticType, same(staticType));
-  }
-
-  void test_visitMapLiteral2() {
-    MapLiteral2 createNode() => astFactory.mapLiteral2(
-        typeArguments: AstTestFactory.typeArgumentList(
-            [AstTestFactory.typeName4('A'), AstTestFactory.typeName4('B')]),
-        entries: [AstTestFactory.mapLiteralEntry3('c', 'd')]);
+    ListLiteral createNode() => astFactory.listLiteral(
+        null,
+        AstTestFactory.typeArgumentList([AstTestFactory.typeName4('A')]),
+        null,
+        [AstTestFactory.identifier3('b')],
+        null);
 
     DartType typeA = ElementFactory.classElement2("A").type;
     DartType typeB = ElementFactory.classElement2("B").type;
     DartType typeC = ElementFactory.classElement2("C").type;
-    DartType typeD = ElementFactory.classElement2("D").type;
 
-    MapLiteral2 fromNode = createNode();
+    ListLiteral fromNode = createNode();
     (fromNode.typeArguments.arguments[0] as TypeName).type = typeA;
-    (fromNode.typeArguments.arguments[1] as TypeName).type = typeB;
-    MapLiteralEntry fromEntry = fromNode.entries[0] as MapLiteralEntry;
-    (fromEntry.key as SimpleStringLiteral).staticType = typeC;
-    (fromEntry.value as SimpleStringLiteral).staticType = typeD;
+    (fromNode.elements[0] as SimpleIdentifier).staticType = typeB;
+    fromNode.staticType = typeC;
 
-    MapLiteral2 toNode = createNode();
+    ListLiteral toNode = createNode();
     ResolutionCopier.copyResolutionData(fromNode, toNode);
     expect((toNode.typeArguments.arguments[0] as TypeName).type, same(typeA));
-    expect((toNode.typeArguments.arguments[1] as TypeName).type, same(typeB));
-    MapLiteralEntry toEntry = fromNode.entries[0] as MapLiteralEntry;
-    expect((toEntry.key as SimpleStringLiteral).staticType, same(typeC));
-    expect((toEntry.value as SimpleStringLiteral).staticType, same(typeD));
+    expect((toNode.elements[0] as SimpleIdentifier).staticType, same(typeB));
+    expect(fromNode.staticType, same(typeC));
+  }
+
+  void test_visitMapLiteral() {
+    SetOrMapLiteral fromNode = AstTestFactory.setOrMapLiteral(null, null);
+    DartType staticType = ElementFactory.classElement2("C").type;
+    fromNode.staticType = staticType;
+    SetOrMapLiteral toNode = AstTestFactory.setOrMapLiteral(null, null);
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect(toNode.staticType, same(staticType));
   }
 
   void test_visitMethodInvocation() {
@@ -762,8 +731,35 @@
     expect(toNode.staticType, same(staticType));
   }
 
-  void test_visitSetLiteral2() {
-    SetLiteral2 createNode() => astFactory.setLiteral2(
+  void test_visitSetOrMapLiteral_map() {
+    SetOrMapLiteral createNode() => astFactory.setOrMapLiteral(
+        typeArguments: AstTestFactory.typeArgumentList(
+            [AstTestFactory.typeName4('A'), AstTestFactory.typeName4('B')]),
+        elements: [AstTestFactory.mapLiteralEntry3('c', 'd')]);
+
+    DartType typeA = ElementFactory.classElement2("A").type;
+    DartType typeB = ElementFactory.classElement2("B").type;
+    DartType typeC = ElementFactory.classElement2("C").type;
+    DartType typeD = ElementFactory.classElement2("D").type;
+
+    SetOrMapLiteral fromNode = createNode();
+    (fromNode.typeArguments.arguments[0] as TypeName).type = typeA;
+    (fromNode.typeArguments.arguments[1] as TypeName).type = typeB;
+    MapLiteralEntry fromEntry = fromNode.elements[0] as MapLiteralEntry;
+    (fromEntry.key as SimpleStringLiteral).staticType = typeC;
+    (fromEntry.value as SimpleStringLiteral).staticType = typeD;
+
+    SetOrMapLiteral toNode = createNode();
+    ResolutionCopier.copyResolutionData(fromNode, toNode);
+    expect((toNode.typeArguments.arguments[0] as TypeName).type, same(typeA));
+    expect((toNode.typeArguments.arguments[1] as TypeName).type, same(typeB));
+    MapLiteralEntry toEntry = fromNode.elements[0] as MapLiteralEntry;
+    expect((toEntry.key as SimpleStringLiteral).staticType, same(typeC));
+    expect((toEntry.value as SimpleStringLiteral).staticType, same(typeD));
+  }
+
+  void test_visitSetOrMapLiteral_set() {
+    SetOrMapLiteral createNode() => astFactory.setOrMapLiteral(
         typeArguments:
             AstTestFactory.typeArgumentList([AstTestFactory.typeName4('A')]),
         elements: [AstTestFactory.identifier3('b')]);
@@ -771,11 +767,11 @@
     DartType typeA = ElementFactory.classElement2("A").type;
     DartType typeB = ElementFactory.classElement2("B").type;
 
-    SetLiteral2 fromNode = createNode();
+    SetOrMapLiteral fromNode = createNode();
     (fromNode.typeArguments.arguments[0] as TypeName).type = typeA;
     (fromNode.elements[0] as SimpleIdentifier).staticType = typeB;
 
-    SetLiteral2 toNode = createNode();
+    SetOrMapLiteral toNode = createNode();
     ResolutionCopier.copyResolutionData(fromNode, toNode);
     expect((toNode.typeArguments.arguments[0] as TypeName).type, same(typeA));
     expect((toNode.elements[0] as SimpleIdentifier).staticType, same(typeB));
@@ -811,19 +807,19 @@
     SpreadElement createNode() => astFactory.spreadElement(
         spreadOperator:
             TokenFactory.tokenFromType(TokenType.PERIOD_PERIOD_PERIOD),
-        expression: astFactory
-            .listLiteral2(elements: [AstTestFactory.identifier3('a')]));
+        expression: astFactory.listLiteral(
+            null, null, null, [AstTestFactory.identifier3('a')], null));
 
     DartType typeA = ElementFactory.classElement2("A").type;
 
     SpreadElement fromNode = createNode();
-    ((fromNode.expression as ListLiteral2).elements[0] as SimpleIdentifier)
+    ((fromNode.expression as ListLiteral).elements[0] as SimpleIdentifier)
         .staticType = typeA;
 
     SpreadElement toNode = createNode();
     ResolutionCopier.copyResolutionData(fromNode, toNode);
     expect(
-        ((toNode.expression as ListLiteral2).elements[0] as SimpleIdentifier)
+        ((toNode.expression as ListLiteral).elements[0] as SimpleIdentifier)
             .staticType,
         same(typeA));
   }
@@ -1816,36 +1812,40 @@
   void test_visitForEachStatement_declared() {
     _assertSource(
         "for (var a in b) {}",
-        AstTestFactory.forEachStatement(AstTestFactory.declaredIdentifier3("a"),
-            AstTestFactory.identifier3("b"), AstTestFactory.block()));
+        AstTestFactory.forStatement(
+            AstTestFactory.forEachPartsWithDeclaration(
+                AstTestFactory.declaredIdentifier3("a"),
+                AstTestFactory.identifier3("b")),
+            AstTestFactory.block()));
   }
 
   void test_visitForEachStatement_variable() {
     _assertSource(
         "for (a in b) {}",
-        astFactory.forEachStatementWithReference(
-            null,
-            TokenFactory.tokenFromKeyword(Keyword.FOR),
-            TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
-            AstTestFactory.identifier3("a"),
-            TokenFactory.tokenFromKeyword(Keyword.IN),
-            AstTestFactory.identifier3("b"),
-            TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
-            AstTestFactory.block()));
+        astFactory.forStatement(
+            forKeyword: TokenFactory.tokenFromKeyword(Keyword.FOR),
+            leftParenthesis: TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
+            forLoopParts: astFactory.forEachPartsWithIdentifier(
+                identifier: AstTestFactory.identifier3("a"),
+                inKeyword: TokenFactory.tokenFromKeyword(Keyword.IN),
+                iterable: AstTestFactory.identifier3("b")),
+            rightParenthesis: TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
+            body: AstTestFactory.block()));
   }
 
   void test_visitForEachStatement_variable_await() {
     _assertSource(
         "await for (a in b) {}",
-        astFactory.forEachStatementWithReference(
-            TokenFactory.tokenFromString("await"),
-            TokenFactory.tokenFromKeyword(Keyword.FOR),
-            TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
-            AstTestFactory.identifier3("a"),
-            TokenFactory.tokenFromKeyword(Keyword.IN),
-            AstTestFactory.identifier3("b"),
-            TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
-            AstTestFactory.block()));
+        astFactory.forStatement(
+            awaitKeyword: TokenFactory.tokenFromString("await"),
+            forKeyword: TokenFactory.tokenFromKeyword(Keyword.FOR),
+            leftParenthesis: TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
+            forLoopParts: astFactory.forEachPartsWithIdentifier(
+                identifier: AstTestFactory.identifier3("a"),
+                inKeyword: TokenFactory.tokenFromKeyword(Keyword.IN),
+                iterable: AstTestFactory.identifier3("b")),
+            rightParenthesis: TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
+            body: AstTestFactory.block()));
   }
 
   void test_visitForElement() {
@@ -2047,10 +2047,10 @@
             updaters: [AstTestFactory.identifier3('u')]));
   }
 
-  void test_visitForStatement2() {
+  void test_visitForStatement() {
     _assertSource(
         'for (e in l) s;',
-        astFactory.forStatement2(
+        astFactory.forStatement(
             forLoopParts: astFactory.forEachPartsWithIdentifier(
                 identifier: AstTestFactory.identifier3('e'),
                 iterable: AstTestFactory.identifier3('l')),
@@ -2061,97 +2061,120 @@
   void test_visitForStatement_c() {
     _assertSource(
         "for (; c;) {}",
-        AstTestFactory.forStatement(null, AstTestFactory.identifier3("c"), null,
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithExpression(
+                null, AstTestFactory.identifier3("c"), null),
             AstTestFactory.block()));
   }
 
   void test_visitForStatement_cu() {
     _assertSource(
         "for (; c; u) {}",
-        AstTestFactory.forStatement(null, AstTestFactory.identifier3("c"),
-            [AstTestFactory.identifier3("u")], AstTestFactory.block()));
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithExpression(
+                null,
+                AstTestFactory.identifier3("c"),
+                [AstTestFactory.identifier3("u")]),
+            AstTestFactory.block()));
   }
 
   void test_visitForStatement_e() {
     _assertSource(
         "for (e;;) {}",
-        AstTestFactory.forStatement(AstTestFactory.identifier3("e"), null, null,
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithExpression(
+                AstTestFactory.identifier3("e"), null, null),
             AstTestFactory.block()));
   }
 
   void test_visitForStatement_ec() {
     _assertSource(
         "for (e; c;) {}",
-        AstTestFactory.forStatement(AstTestFactory.identifier3("e"),
-            AstTestFactory.identifier3("c"), null, AstTestFactory.block()));
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithExpression(
+                AstTestFactory.identifier3("e"),
+                AstTestFactory.identifier3("c"),
+                null),
+            AstTestFactory.block()));
   }
 
   void test_visitForStatement_ecu() {
     _assertSource(
         "for (e; c; u) {}",
         AstTestFactory.forStatement(
-            AstTestFactory.identifier3("e"),
-            AstTestFactory.identifier3("c"),
-            [AstTestFactory.identifier3("u")],
+            AstTestFactory.forPartsWithExpression(
+                AstTestFactory.identifier3("e"),
+                AstTestFactory.identifier3("c"),
+                [AstTestFactory.identifier3("u")]),
             AstTestFactory.block()));
   }
 
   void test_visitForStatement_eu() {
     _assertSource(
         "for (e;; u) {}",
-        AstTestFactory.forStatement(AstTestFactory.identifier3("e"), null,
-            [AstTestFactory.identifier3("u")], AstTestFactory.block()));
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithExpression(
+                AstTestFactory.identifier3("e"),
+                null,
+                [AstTestFactory.identifier3("u")]),
+            AstTestFactory.block()));
   }
 
   void test_visitForStatement_i() {
     _assertSource(
         "for (var i;;) {}",
-        AstTestFactory.forStatement2(
-            AstTestFactory.variableDeclarationList2(
-                Keyword.VAR, [AstTestFactory.variableDeclaration("i")]),
-            null,
-            null,
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithDeclarations(
+                AstTestFactory.variableDeclarationList2(
+                    Keyword.VAR, [AstTestFactory.variableDeclaration("i")]),
+                null,
+                null),
             AstTestFactory.block()));
   }
 
   void test_visitForStatement_ic() {
     _assertSource(
         "for (var i; c;) {}",
-        AstTestFactory.forStatement2(
-            AstTestFactory.variableDeclarationList2(
-                Keyword.VAR, [AstTestFactory.variableDeclaration("i")]),
-            AstTestFactory.identifier3("c"),
-            null,
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithDeclarations(
+                AstTestFactory.variableDeclarationList2(
+                    Keyword.VAR, [AstTestFactory.variableDeclaration("i")]),
+                AstTestFactory.identifier3("c"),
+                null),
             AstTestFactory.block()));
   }
 
   void test_visitForStatement_icu() {
     _assertSource(
         "for (var i; c; u) {}",
-        AstTestFactory.forStatement2(
-            AstTestFactory.variableDeclarationList2(
-                Keyword.VAR, [AstTestFactory.variableDeclaration("i")]),
-            AstTestFactory.identifier3("c"),
-            [AstTestFactory.identifier3("u")],
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithDeclarations(
+                AstTestFactory.variableDeclarationList2(
+                    Keyword.VAR, [AstTestFactory.variableDeclaration("i")]),
+                AstTestFactory.identifier3("c"),
+                [AstTestFactory.identifier3("u")]),
             AstTestFactory.block()));
   }
 
   void test_visitForStatement_iu() {
     _assertSource(
         "for (var i;; u) {}",
-        AstTestFactory.forStatement2(
-            AstTestFactory.variableDeclarationList2(
-                Keyword.VAR, [AstTestFactory.variableDeclaration("i")]),
-            null,
-            [AstTestFactory.identifier3("u")],
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithDeclarations(
+                AstTestFactory.variableDeclarationList2(
+                    Keyword.VAR, [AstTestFactory.variableDeclaration("i")]),
+                null,
+                [AstTestFactory.identifier3("u")]),
             AstTestFactory.block()));
   }
 
   void test_visitForStatement_u() {
     _assertSource(
         "for (;; u) {}",
-        AstTestFactory.forStatement(null, null,
-            [AstTestFactory.identifier3("u")], AstTestFactory.block()));
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithExpression(
+                null, null, [AstTestFactory.identifier3("u")]),
+            AstTestFactory.block()));
   }
 
   void test_visitFunctionDeclaration_external() {
@@ -2627,13 +2650,14 @@
         AstTestFactory.libraryIdentifier([AstTestFactory.identifier3("a")]));
   }
 
-  void test_visitListLiteral2_complex() {
+  void test_visitListLiteral_complex() {
     _assertSource(
         '<int>[0, for (e in l) 0, if (b) 1, ...[0]]',
-        astFactory.listLiteral2(
-            typeArguments: AstTestFactory.typeArgumentList(
-                [AstTestFactory.typeName4('int')]),
-            elements: [
+        astFactory.listLiteral(
+            null,
+            AstTestFactory.typeArgumentList([AstTestFactory.typeName4('int')]),
+            null,
+            [
               AstTestFactory.integer(0),
               astFactory.forElement(
                   forLoopParts: astFactory.forEachPartsWithIdentifier(
@@ -2646,41 +2670,10 @@
               astFactory.spreadElement(
                   spreadOperator: TokenFactory.tokenFromType(
                       TokenType.PERIOD_PERIOD_PERIOD),
-                  expression: astFactory
-                      .listLiteral2(elements: [AstTestFactory.integer(0)]))
-            ]));
-  }
-
-  void test_visitListLiteral2_withConst_withoutTypeArgs() {
-    _assertSource(
-        'const [0]',
-        astFactory.listLiteral2(
-            constKeyword: TokenFactory.tokenFromKeyword(Keyword.CONST),
-            elements: [AstTestFactory.integer(0)]));
-  }
-
-  void test_visitListLiteral2_withConst_withTypeArgs() {
-    _assertSource(
-        'const <int>[0]',
-        astFactory.listLiteral2(
-            constKeyword: TokenFactory.tokenFromKeyword(Keyword.CONST),
-            typeArguments: AstTestFactory.typeArgumentList(
-                [AstTestFactory.typeName4('int')]),
-            elements: [AstTestFactory.integer(0)]));
-  }
-
-  void test_visitListLiteral2_withoutConst_withoutTypeArgs() {
-    _assertSource(
-        '[0]', astFactory.listLiteral2(elements: [AstTestFactory.integer(0)]));
-  }
-
-  void test_visitListLiteral2_withoutConst_withTypeArgs() {
-    _assertSource(
-        '<int>[0]',
-        astFactory.listLiteral2(
-            typeArguments: AstTestFactory.typeArgumentList(
-                [AstTestFactory.typeName4('int')]),
-            elements: [AstTestFactory.integer(0)]));
+                  expression: astFactory.listLiteral(
+                      null, null, null, [AstTestFactory.integer(0)], null))
+            ],
+            null));
   }
 
   void test_visitListLiteral_const() {
@@ -2701,82 +2694,55 @@
         ]));
   }
 
-  void test_visitMapLiteral2_complex() {
+  void test_visitListLiteral_withConst_withoutTypeArgs() {
     _assertSource(
-        "<String, String>{'a' : 'b', for (c in d) 'e' : 'f', if (g) 'h' : 'i', ...{'j' : 'k'}}",
-        astFactory.mapLiteral2(
-            typeArguments: AstTestFactory.typeArgumentList([
-              AstTestFactory.typeName4('String'),
-              AstTestFactory.typeName4('String')
-            ]),
-            entries: [
-              AstTestFactory.mapLiteralEntry3('a', 'b'),
-              astFactory.forElement(
-                  forLoopParts: astFactory.forEachPartsWithIdentifier(
-                      identifier: AstTestFactory.identifier3('c'),
-                      iterable: AstTestFactory.identifier3('d')),
-                  body: AstTestFactory.mapLiteralEntry3('e', 'f')),
-              astFactory.ifElement(
-                  condition: AstTestFactory.identifier3('g'),
-                  thenElement: AstTestFactory.mapLiteralEntry3('h', 'i')),
-              astFactory.spreadElement(
-                  spreadOperator: TokenFactory.tokenFromType(
-                      TokenType.PERIOD_PERIOD_PERIOD),
-                  expression: astFactory.mapLiteral2(
-                      entries: [AstTestFactory.mapLiteralEntry3('j', 'k')]))
-            ]));
+        'const [0]',
+        astFactory.listLiteral(TokenFactory.tokenFromKeyword(Keyword.CONST),
+            null, null, [AstTestFactory.integer(0)], null));
   }
 
-  void test_visitMapLiteral2_withConst_withoutTypeArgs() {
+  void test_visitListLiteral_withConst_withTypeArgs() {
     _assertSource(
-        "const {'a' : 'b'}",
-        astFactory.mapLiteral2(
-            constKeyword: TokenFactory.tokenFromKeyword(Keyword.CONST),
-            entries: [AstTestFactory.mapLiteralEntry3('a', 'b')]));
+        'const <int>[0]',
+        astFactory.listLiteral(
+            TokenFactory.tokenFromKeyword(Keyword.CONST),
+            AstTestFactory.typeArgumentList([AstTestFactory.typeName4('int')]),
+            null,
+            [AstTestFactory.integer(0)],
+            null));
   }
 
-  void test_visitMapLiteral2_withConst_withTypeArgs() {
+  void test_visitListLiteral_withoutConst_withoutTypeArgs() {
     _assertSource(
-        "const <String, String>{'a' : 'b'}",
-        astFactory.mapLiteral2(
-            constKeyword: TokenFactory.tokenFromKeyword(Keyword.CONST),
-            typeArguments: AstTestFactory.typeArgumentList([
-              AstTestFactory.typeName4('String'),
-              AstTestFactory.typeName4('String')
-            ]),
-            entries: [AstTestFactory.mapLiteralEntry3('a', 'b')]));
+        '[0]',
+        astFactory.listLiteral(
+            null, null, null, [AstTestFactory.integer(0)], null));
   }
 
-  void test_visitMapLiteral2_withoutConst_withoutTypeArgs() {
+  void test_visitListLiteral_withoutConst_withTypeArgs() {
     _assertSource(
-        "{'a' : 'b'}",
-        astFactory
-            .mapLiteral2(entries: [AstTestFactory.mapLiteralEntry3('a', 'b')]));
-  }
-
-  void test_visitMapLiteral2_withoutConst_withTypeArgs() {
-    _assertSource(
-        "<String, String>{'a' : 'b'}",
-        astFactory.mapLiteral2(
-            typeArguments: AstTestFactory.typeArgumentList([
-              AstTestFactory.typeName4('String'),
-              AstTestFactory.typeName4('String')
-            ]),
-            entries: [AstTestFactory.mapLiteralEntry3('a', 'b')]));
+        '<int>[0]',
+        astFactory.listLiteral(
+            null,
+            AstTestFactory.typeArgumentList([AstTestFactory.typeName4('int')]),
+            null,
+            [AstTestFactory.integer(0)],
+            null));
   }
 
   void test_visitMapLiteral_const() {
-    _assertSource("const {}", AstTestFactory.mapLiteral(Keyword.CONST, null));
+    _assertSource(
+        "const {}", AstTestFactory.setOrMapLiteral(Keyword.CONST, null));
   }
 
   void test_visitMapLiteral_empty() {
-    _assertSource("{}", AstTestFactory.mapLiteral2());
+    _assertSource("{}", AstTestFactory.setOrMapLiteral(null, null));
   }
 
   void test_visitMapLiteral_nonEmpty() {
     _assertSource(
         "{'a' : a, 'b' : b, 'c' : c}",
-        AstTestFactory.mapLiteral2([
+        AstTestFactory.setOrMapLiteral(null, null, [
           AstTestFactory.mapLiteralEntry("a", AstTestFactory.identifier3("a")),
           AstTestFactory.mapLiteralEntry("b", AstTestFactory.identifier3("b")),
           AstTestFactory.mapLiteralEntry("c", AstTestFactory.identifier3("c"))
@@ -3143,10 +3109,74 @@
     _assertSource(scriptTag, AstTestFactory.scriptTag(scriptTag));
   }
 
-  void test_visitSetLiteral2_complex() {
+  void test_visitSetOrMapLiteral_map_complex() {
+    _assertSource(
+        "<String, String>{'a' : 'b', for (c in d) 'e' : 'f', if (g) 'h' : 'i', ...{'j' : 'k'}}",
+        astFactory.setOrMapLiteral(
+            typeArguments: AstTestFactory.typeArgumentList([
+              AstTestFactory.typeName4('String'),
+              AstTestFactory.typeName4('String')
+            ]),
+            elements: [
+              AstTestFactory.mapLiteralEntry3('a', 'b'),
+              astFactory.forElement(
+                  forLoopParts: astFactory.forEachPartsWithIdentifier(
+                      identifier: AstTestFactory.identifier3('c'),
+                      iterable: AstTestFactory.identifier3('d')),
+                  body: AstTestFactory.mapLiteralEntry3('e', 'f')),
+              astFactory.ifElement(
+                  condition: AstTestFactory.identifier3('g'),
+                  thenElement: AstTestFactory.mapLiteralEntry3('h', 'i')),
+              astFactory.spreadElement(
+                  spreadOperator: TokenFactory.tokenFromType(
+                      TokenType.PERIOD_PERIOD_PERIOD),
+                  expression: astFactory.setOrMapLiteral(
+                      elements: [AstTestFactory.mapLiteralEntry3('j', 'k')]))
+            ]));
+  }
+
+  void test_visitSetOrMapLiteral_map_withConst_withoutTypeArgs() {
+    _assertSource(
+        "const {'a' : 'b'}",
+        astFactory.setOrMapLiteral(
+            constKeyword: TokenFactory.tokenFromKeyword(Keyword.CONST),
+            elements: [AstTestFactory.mapLiteralEntry3('a', 'b')]));
+  }
+
+  void test_visitSetOrMapLiteral_map_withConst_withTypeArgs() {
+    _assertSource(
+        "const <String, String>{'a' : 'b'}",
+        astFactory.setOrMapLiteral(
+            constKeyword: TokenFactory.tokenFromKeyword(Keyword.CONST),
+            typeArguments: AstTestFactory.typeArgumentList([
+              AstTestFactory.typeName4('String'),
+              AstTestFactory.typeName4('String')
+            ]),
+            elements: [AstTestFactory.mapLiteralEntry3('a', 'b')]));
+  }
+
+  void test_visitSetOrMapLiteral_map_withoutConst_withoutTypeArgs() {
+    _assertSource(
+        "{'a' : 'b'}",
+        astFactory.setOrMapLiteral(
+            elements: [AstTestFactory.mapLiteralEntry3('a', 'b')]));
+  }
+
+  void test_visitSetOrMapLiteral_map_withoutConst_withTypeArgs() {
+    _assertSource(
+        "<String, String>{'a' : 'b'}",
+        astFactory.setOrMapLiteral(
+            typeArguments: AstTestFactory.typeArgumentList([
+              AstTestFactory.typeName4('String'),
+              AstTestFactory.typeName4('String')
+            ]),
+            elements: [AstTestFactory.mapLiteralEntry3('a', 'b')]));
+  }
+
+  void test_visitSetOrMapLiteral_set_complex() {
     _assertSource(
         '<int>{0, for (e in l) 0, if (b) 1, ...[0]}',
-        astFactory.setLiteral2(
+        astFactory.setOrMapLiteral(
             typeArguments: AstTestFactory.typeArgumentList(
                 [AstTestFactory.typeName4('int')]),
             elements: [
@@ -3162,38 +3192,38 @@
               astFactory.spreadElement(
                   spreadOperator: TokenFactory.tokenFromType(
                       TokenType.PERIOD_PERIOD_PERIOD),
-                  expression: astFactory
-                      .listLiteral2(elements: [AstTestFactory.integer(0)]))
+                  expression: astFactory.listLiteral(
+                      null, null, null, [AstTestFactory.integer(0)], null))
             ]));
   }
 
-  void test_visitSetLiteral2_withConst_withoutTypeArgs() {
+  void test_visitSetOrMapLiteral_set_withConst_withoutTypeArgs() {
     _assertSource(
         'const {0}',
-        astFactory.setLiteral2(
+        astFactory.setOrMapLiteral(
             constKeyword: TokenFactory.tokenFromKeyword(Keyword.CONST),
             elements: [AstTestFactory.integer(0)]));
   }
 
-  void test_visitSetLiteral2_withConst_withTypeArgs() {
+  void test_visitSetOrMapLiteral_set_withConst_withTypeArgs() {
     _assertSource(
         'const <int>{0}',
-        astFactory.setLiteral2(
+        astFactory.setOrMapLiteral(
             constKeyword: TokenFactory.tokenFromKeyword(Keyword.CONST),
             typeArguments: AstTestFactory.typeArgumentList(
                 [AstTestFactory.typeName4('int')]),
             elements: [AstTestFactory.integer(0)]));
   }
 
-  void test_visitSetLiteral2_withoutConst_withoutTypeArgs() {
-    _assertSource(
-        '{0}', astFactory.setLiteral2(elements: [AstTestFactory.integer(0)]));
+  void test_visitSetOrMapLiteral_set_withoutConst_withoutTypeArgs() {
+    _assertSource('{0}',
+        astFactory.setOrMapLiteral(elements: [AstTestFactory.integer(0)]));
   }
 
-  void test_visitSetLiteral2_withoutConst_withTypeArgs() {
+  void test_visitSetOrMapLiteral_set_withoutConst_withTypeArgs() {
     _assertSource(
         '<int>{0}',
-        astFactory.setLiteral2(
+        astFactory.setOrMapLiteral(
             typeArguments: AstTestFactory.typeArgumentList(
                 [AstTestFactory.typeName4('int')]),
             elements: [AstTestFactory.integer(0)]));
@@ -3248,8 +3278,8 @@
         astFactory.spreadElement(
             spreadOperator:
                 TokenFactory.tokenFromType(TokenType.PERIOD_PERIOD_PERIOD),
-            expression: astFactory
-                .listLiteral2(elements: [AstTestFactory.integer(0)])));
+            expression: astFactory.listLiteral(
+                null, null, null, [AstTestFactory.integer(0)], null)));
   }
 
   @failingTest
@@ -3261,8 +3291,8 @@
         astFactory.spreadElement(
             spreadOperator:
                 TokenFactory.tokenFromType(TokenType.PERIOD_PERIOD_PERIOD),
-            expression: astFactory
-                .listLiteral2(elements: [AstTestFactory.integer(0)])));
+            expression: astFactory.listLiteral(
+                null, null, null, [AstTestFactory.integer(0)], null)));
   }
 
   void test_visitStringInterpolation() {
@@ -4496,36 +4526,40 @@
   void test_visitForEachStatement_declared() {
     _assertSource(
         "for (var a in b) {}",
-        AstTestFactory.forEachStatement(AstTestFactory.declaredIdentifier3("a"),
-            AstTestFactory.identifier3("b"), AstTestFactory.block()));
+        AstTestFactory.forStatement(
+            AstTestFactory.forEachPartsWithDeclaration(
+                AstTestFactory.declaredIdentifier3("a"),
+                AstTestFactory.identifier3("b")),
+            AstTestFactory.block()));
   }
 
   void test_visitForEachStatement_variable() {
     _assertSource(
         "for (a in b) {}",
-        astFactory.forEachStatementWithReference(
-            null,
-            TokenFactory.tokenFromKeyword(Keyword.FOR),
-            TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
-            AstTestFactory.identifier3("a"),
-            TokenFactory.tokenFromKeyword(Keyword.IN),
-            AstTestFactory.identifier3("b"),
-            TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
-            AstTestFactory.block()));
+        astFactory.forStatement(
+            forKeyword: TokenFactory.tokenFromKeyword(Keyword.FOR),
+            leftParenthesis: TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
+            forLoopParts: astFactory.forEachPartsWithIdentifier(
+                identifier: AstTestFactory.identifier3("a"),
+                inKeyword: TokenFactory.tokenFromKeyword(Keyword.IN),
+                iterable: AstTestFactory.identifier3("b")),
+            rightParenthesis: TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
+            body: AstTestFactory.block()));
   }
 
   void test_visitForEachStatement_variable_await() {
     _assertSource(
         "await for (a in b) {}",
-        astFactory.forEachStatementWithReference(
-            TokenFactory.tokenFromString("await"),
-            TokenFactory.tokenFromKeyword(Keyword.FOR),
-            TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
-            AstTestFactory.identifier3("a"),
-            TokenFactory.tokenFromKeyword(Keyword.IN),
-            AstTestFactory.identifier3("b"),
-            TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
-            AstTestFactory.block()));
+        astFactory.forStatement(
+            awaitKeyword: TokenFactory.tokenFromString("await"),
+            forKeyword: TokenFactory.tokenFromKeyword(Keyword.FOR),
+            leftParenthesis: TokenFactory.tokenFromType(TokenType.OPEN_PAREN),
+            forLoopParts: astFactory.forEachPartsWithIdentifier(
+                identifier: AstTestFactory.identifier3("a"),
+                inKeyword: TokenFactory.tokenFromKeyword(Keyword.IN),
+                iterable: AstTestFactory.identifier3("b")),
+            rightParenthesis: TokenFactory.tokenFromType(TokenType.CLOSE_PAREN),
+            body: AstTestFactory.block()));
   }
 
   void test_visitForElement() {
@@ -4727,10 +4761,10 @@
             updaters: [AstTestFactory.identifier3('u')]));
   }
 
-  void test_visitForStatement2() {
+  void test_visitForStatement() {
     _assertSource(
         'for (e in l) s;',
-        astFactory.forStatement2(
+        astFactory.forStatement(
             forLoopParts: astFactory.forEachPartsWithIdentifier(
                 identifier: AstTestFactory.identifier3('e'),
                 iterable: AstTestFactory.identifier3('l')),
@@ -4741,97 +4775,120 @@
   void test_visitForStatement_c() {
     _assertSource(
         "for (; c;) {}",
-        AstTestFactory.forStatement(null, AstTestFactory.identifier3("c"), null,
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithExpression(
+                null, AstTestFactory.identifier3("c"), null),
             AstTestFactory.block()));
   }
 
   void test_visitForStatement_cu() {
     _assertSource(
         "for (; c; u) {}",
-        AstTestFactory.forStatement(null, AstTestFactory.identifier3("c"),
-            [AstTestFactory.identifier3("u")], AstTestFactory.block()));
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithExpression(
+                null,
+                AstTestFactory.identifier3("c"),
+                [AstTestFactory.identifier3("u")]),
+            AstTestFactory.block()));
   }
 
   void test_visitForStatement_e() {
     _assertSource(
         "for (e;;) {}",
-        AstTestFactory.forStatement(AstTestFactory.identifier3("e"), null, null,
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithExpression(
+                AstTestFactory.identifier3("e"), null, null),
             AstTestFactory.block()));
   }
 
   void test_visitForStatement_ec() {
     _assertSource(
         "for (e; c;) {}",
-        AstTestFactory.forStatement(AstTestFactory.identifier3("e"),
-            AstTestFactory.identifier3("c"), null, AstTestFactory.block()));
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithExpression(
+                AstTestFactory.identifier3("e"),
+                AstTestFactory.identifier3("c"),
+                null),
+            AstTestFactory.block()));
   }
 
   void test_visitForStatement_ecu() {
     _assertSource(
         "for (e; c; u) {}",
         AstTestFactory.forStatement(
-            AstTestFactory.identifier3("e"),
-            AstTestFactory.identifier3("c"),
-            [AstTestFactory.identifier3("u")],
+            AstTestFactory.forPartsWithExpression(
+                AstTestFactory.identifier3("e"),
+                AstTestFactory.identifier3("c"),
+                [AstTestFactory.identifier3("u")]),
             AstTestFactory.block()));
   }
 
   void test_visitForStatement_eu() {
     _assertSource(
         "for (e;; u) {}",
-        AstTestFactory.forStatement(AstTestFactory.identifier3("e"), null,
-            [AstTestFactory.identifier3("u")], AstTestFactory.block()));
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithExpression(
+                AstTestFactory.identifier3("e"),
+                null,
+                [AstTestFactory.identifier3("u")]),
+            AstTestFactory.block()));
   }
 
   void test_visitForStatement_i() {
     _assertSource(
         "for (var i;;) {}",
-        AstTestFactory.forStatement2(
-            AstTestFactory.variableDeclarationList2(
-                Keyword.VAR, [AstTestFactory.variableDeclaration("i")]),
-            null,
-            null,
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithDeclarations(
+                AstTestFactory.variableDeclarationList2(
+                    Keyword.VAR, [AstTestFactory.variableDeclaration("i")]),
+                null,
+                null),
             AstTestFactory.block()));
   }
 
   void test_visitForStatement_ic() {
     _assertSource(
         "for (var i; c;) {}",
-        AstTestFactory.forStatement2(
-            AstTestFactory.variableDeclarationList2(
-                Keyword.VAR, [AstTestFactory.variableDeclaration("i")]),
-            AstTestFactory.identifier3("c"),
-            null,
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithDeclarations(
+                AstTestFactory.variableDeclarationList2(
+                    Keyword.VAR, [AstTestFactory.variableDeclaration("i")]),
+                AstTestFactory.identifier3("c"),
+                null),
             AstTestFactory.block()));
   }
 
   void test_visitForStatement_icu() {
     _assertSource(
         "for (var i; c; u) {}",
-        AstTestFactory.forStatement2(
-            AstTestFactory.variableDeclarationList2(
-                Keyword.VAR, [AstTestFactory.variableDeclaration("i")]),
-            AstTestFactory.identifier3("c"),
-            [AstTestFactory.identifier3("u")],
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithDeclarations(
+                AstTestFactory.variableDeclarationList2(
+                    Keyword.VAR, [AstTestFactory.variableDeclaration("i")]),
+                AstTestFactory.identifier3("c"),
+                [AstTestFactory.identifier3("u")]),
             AstTestFactory.block()));
   }
 
   void test_visitForStatement_iu() {
     _assertSource(
         "for (var i;; u) {}",
-        AstTestFactory.forStatement2(
-            AstTestFactory.variableDeclarationList2(
-                Keyword.VAR, [AstTestFactory.variableDeclaration("i")]),
-            null,
-            [AstTestFactory.identifier3("u")],
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithDeclarations(
+                AstTestFactory.variableDeclarationList2(
+                    Keyword.VAR, [AstTestFactory.variableDeclaration("i")]),
+                null,
+                [AstTestFactory.identifier3("u")]),
             AstTestFactory.block()));
   }
 
   void test_visitForStatement_u() {
     _assertSource(
         "for (;; u) {}",
-        AstTestFactory.forStatement(null, null,
-            [AstTestFactory.identifier3("u")], AstTestFactory.block()));
+        AstTestFactory.forStatement(
+            AstTestFactory.forPartsWithExpression(
+                null, null, [AstTestFactory.identifier3("u")]),
+            AstTestFactory.block()));
   }
 
   void test_visitFunctionDeclaration_external() {
@@ -5307,13 +5364,14 @@
         AstTestFactory.libraryIdentifier([AstTestFactory.identifier3("a")]));
   }
 
-  void test_visitListLiteral2_complex() {
+  void test_visitListLiteral_complex() {
     _assertSource(
         '<int>[0, for (e in l) 0, if (b) 1, ...[0]]',
-        astFactory.listLiteral2(
-            typeArguments: AstTestFactory.typeArgumentList(
-                [AstTestFactory.typeName4('int')]),
-            elements: [
+        astFactory.listLiteral(
+            null,
+            AstTestFactory.typeArgumentList([AstTestFactory.typeName4('int')]),
+            null,
+            [
               AstTestFactory.integer(0),
               astFactory.forElement(
                   forLoopParts: astFactory.forEachPartsWithIdentifier(
@@ -5326,41 +5384,10 @@
               astFactory.spreadElement(
                   spreadOperator: TokenFactory.tokenFromType(
                       TokenType.PERIOD_PERIOD_PERIOD),
-                  expression: astFactory
-                      .listLiteral2(elements: [AstTestFactory.integer(0)]))
-            ]));
-  }
-
-  void test_visitListLiteral2_withConst_withoutTypeArgs() {
-    _assertSource(
-        'const [0]',
-        astFactory.listLiteral2(
-            constKeyword: TokenFactory.tokenFromKeyword(Keyword.CONST),
-            elements: [AstTestFactory.integer(0)]));
-  }
-
-  void test_visitListLiteral2_withConst_withTypeArgs() {
-    _assertSource(
-        'const <int>[0]',
-        astFactory.listLiteral2(
-            constKeyword: TokenFactory.tokenFromKeyword(Keyword.CONST),
-            typeArguments: AstTestFactory.typeArgumentList(
-                [AstTestFactory.typeName4('int')]),
-            elements: [AstTestFactory.integer(0)]));
-  }
-
-  void test_visitListLiteral2_withoutConst_withoutTypeArgs() {
-    _assertSource(
-        '[0]', astFactory.listLiteral2(elements: [AstTestFactory.integer(0)]));
-  }
-
-  void test_visitListLiteral2_withoutConst_withTypeArgs() {
-    _assertSource(
-        '<int>[0]',
-        astFactory.listLiteral2(
-            typeArguments: AstTestFactory.typeArgumentList(
-                [AstTestFactory.typeName4('int')]),
-            elements: [AstTestFactory.integer(0)]));
+                  expression: astFactory.listLiteral(
+                      null, null, null, [AstTestFactory.integer(0)], null))
+            ],
+            null));
   }
 
   void test_visitListLiteral_const() {
@@ -5381,82 +5408,55 @@
         ]));
   }
 
-  void test_visitMapLiteral2_complex() {
+  void test_visitListLiteral_withConst_withoutTypeArgs() {
     _assertSource(
-        "<String, String>{'a' : 'b', for (c in d) 'e' : 'f', if (g) 'h' : 'i', ...{'j' : 'k'}}",
-        astFactory.mapLiteral2(
-            typeArguments: AstTestFactory.typeArgumentList([
-              AstTestFactory.typeName4('String'),
-              AstTestFactory.typeName4('String')
-            ]),
-            entries: [
-              AstTestFactory.mapLiteralEntry3('a', 'b'),
-              astFactory.forElement(
-                  forLoopParts: astFactory.forEachPartsWithIdentifier(
-                      identifier: AstTestFactory.identifier3('c'),
-                      iterable: AstTestFactory.identifier3('d')),
-                  body: AstTestFactory.mapLiteralEntry3('e', 'f')),
-              astFactory.ifElement(
-                  condition: AstTestFactory.identifier3('g'),
-                  thenElement: AstTestFactory.mapLiteralEntry3('h', 'i')),
-              astFactory.spreadElement(
-                  spreadOperator: TokenFactory.tokenFromType(
-                      TokenType.PERIOD_PERIOD_PERIOD),
-                  expression: astFactory.mapLiteral2(
-                      entries: [AstTestFactory.mapLiteralEntry3('j', 'k')]))
-            ]));
+        'const [0]',
+        astFactory.listLiteral(TokenFactory.tokenFromKeyword(Keyword.CONST),
+            null, null, [AstTestFactory.integer(0)], null));
   }
 
-  void test_visitMapLiteral2_withConst_withoutTypeArgs() {
+  void test_visitListLiteral_withConst_withTypeArgs() {
     _assertSource(
-        "const {'a' : 'b'}",
-        astFactory.mapLiteral2(
-            constKeyword: TokenFactory.tokenFromKeyword(Keyword.CONST),
-            entries: [AstTestFactory.mapLiteralEntry3('a', 'b')]));
+        'const <int>[0]',
+        astFactory.listLiteral(
+            TokenFactory.tokenFromKeyword(Keyword.CONST),
+            AstTestFactory.typeArgumentList([AstTestFactory.typeName4('int')]),
+            null,
+            [AstTestFactory.integer(0)],
+            null));
   }
 
-  void test_visitMapLiteral2_withConst_withTypeArgs() {
+  void test_visitListLiteral_withoutConst_withoutTypeArgs() {
     _assertSource(
-        "const <String, String>{'a' : 'b'}",
-        astFactory.mapLiteral2(
-            constKeyword: TokenFactory.tokenFromKeyword(Keyword.CONST),
-            typeArguments: AstTestFactory.typeArgumentList([
-              AstTestFactory.typeName4('String'),
-              AstTestFactory.typeName4('String')
-            ]),
-            entries: [AstTestFactory.mapLiteralEntry3('a', 'b')]));
+        '[0]',
+        astFactory.listLiteral(
+            null, null, null, [AstTestFactory.integer(0)], null));
   }
 
-  void test_visitMapLiteral2_withoutConst_withoutTypeArgs() {
+  void test_visitListLiteral_withoutConst_withTypeArgs() {
     _assertSource(
-        "{'a' : 'b'}",
-        astFactory
-            .mapLiteral2(entries: [AstTestFactory.mapLiteralEntry3('a', 'b')]));
-  }
-
-  void test_visitMapLiteral2_withoutConst_withTypeArgs() {
-    _assertSource(
-        "<String, String>{'a' : 'b'}",
-        astFactory.mapLiteral2(
-            typeArguments: AstTestFactory.typeArgumentList([
-              AstTestFactory.typeName4('String'),
-              AstTestFactory.typeName4('String')
-            ]),
-            entries: [AstTestFactory.mapLiteralEntry3('a', 'b')]));
+        '<int>[0]',
+        astFactory.listLiteral(
+            null,
+            AstTestFactory.typeArgumentList([AstTestFactory.typeName4('int')]),
+            null,
+            [AstTestFactory.integer(0)],
+            null));
   }
 
   void test_visitMapLiteral_const() {
-    _assertSource("const {}", AstTestFactory.mapLiteral(Keyword.CONST, null));
+    _assertSource(
+        "const {}", AstTestFactory.setOrMapLiteral(Keyword.CONST, null));
   }
 
   void test_visitMapLiteral_empty() {
-    _assertSource("{}", AstTestFactory.mapLiteral2());
+    _assertSource("{}", AstTestFactory.setOrMapLiteral(null, null));
   }
 
   void test_visitMapLiteral_nonEmpty() {
     _assertSource(
         "{'a' : a, 'b' : b, 'c' : c}",
-        AstTestFactory.mapLiteral2([
+        AstTestFactory.setOrMapLiteral(null, null, [
           AstTestFactory.mapLiteralEntry("a", AstTestFactory.identifier3("a")),
           AstTestFactory.mapLiteralEntry("b", AstTestFactory.identifier3("b")),
           AstTestFactory.mapLiteralEntry("c", AstTestFactory.identifier3("c"))
@@ -5814,10 +5814,74 @@
     _assertSource(scriptTag, AstTestFactory.scriptTag(scriptTag));
   }
 
-  void test_visitSetLiteral2_complex() {
+  void test_visitSetOrMapLiteral_map_complex() {
+    _assertSource(
+        "<String, String>{'a' : 'b', for (c in d) 'e' : 'f', if (g) 'h' : 'i', ...{'j' : 'k'}}",
+        astFactory.setOrMapLiteral(
+            typeArguments: AstTestFactory.typeArgumentList([
+              AstTestFactory.typeName4('String'),
+              AstTestFactory.typeName4('String')
+            ]),
+            elements: [
+              AstTestFactory.mapLiteralEntry3('a', 'b'),
+              astFactory.forElement(
+                  forLoopParts: astFactory.forEachPartsWithIdentifier(
+                      identifier: AstTestFactory.identifier3('c'),
+                      iterable: AstTestFactory.identifier3('d')),
+                  body: AstTestFactory.mapLiteralEntry3('e', 'f')),
+              astFactory.ifElement(
+                  condition: AstTestFactory.identifier3('g'),
+                  thenElement: AstTestFactory.mapLiteralEntry3('h', 'i')),
+              astFactory.spreadElement(
+                  spreadOperator: TokenFactory.tokenFromType(
+                      TokenType.PERIOD_PERIOD_PERIOD),
+                  expression: astFactory.setOrMapLiteral(
+                      elements: [AstTestFactory.mapLiteralEntry3('j', 'k')]))
+            ]));
+  }
+
+  void test_visitSetOrMapLiteral_map_withConst_withoutTypeArgs() {
+    _assertSource(
+        "const {'a' : 'b'}",
+        astFactory.setOrMapLiteral(
+            constKeyword: TokenFactory.tokenFromKeyword(Keyword.CONST),
+            elements: [AstTestFactory.mapLiteralEntry3('a', 'b')]));
+  }
+
+  void test_visitSetOrMapLiteral_map_withConst_withTypeArgs() {
+    _assertSource(
+        "const <String, String>{'a' : 'b'}",
+        astFactory.setOrMapLiteral(
+            constKeyword: TokenFactory.tokenFromKeyword(Keyword.CONST),
+            typeArguments: AstTestFactory.typeArgumentList([
+              AstTestFactory.typeName4('String'),
+              AstTestFactory.typeName4('String')
+            ]),
+            elements: [AstTestFactory.mapLiteralEntry3('a', 'b')]));
+  }
+
+  void test_visitSetOrMapLiteral_map_withoutConst_withoutTypeArgs() {
+    _assertSource(
+        "{'a' : 'b'}",
+        astFactory.setOrMapLiteral(
+            elements: [AstTestFactory.mapLiteralEntry3('a', 'b')]));
+  }
+
+  void test_visitSetOrMapLiteral_map_withoutConst_withTypeArgs() {
+    _assertSource(
+        "<String, String>{'a' : 'b'}",
+        astFactory.setOrMapLiteral(
+            typeArguments: AstTestFactory.typeArgumentList([
+              AstTestFactory.typeName4('String'),
+              AstTestFactory.typeName4('String')
+            ]),
+            elements: [AstTestFactory.mapLiteralEntry3('a', 'b')]));
+  }
+
+  void test_visitSetOrMapLiteral_set_complex() {
     _assertSource(
         '<int>{0, for (e in l) 0, if (b) 1, ...[0]}',
-        astFactory.setLiteral2(
+        astFactory.setOrMapLiteral(
             typeArguments: AstTestFactory.typeArgumentList(
                 [AstTestFactory.typeName4('int')]),
             elements: [
@@ -5833,38 +5897,38 @@
               astFactory.spreadElement(
                   spreadOperator: TokenFactory.tokenFromType(
                       TokenType.PERIOD_PERIOD_PERIOD),
-                  expression: astFactory
-                      .listLiteral2(elements: [AstTestFactory.integer(0)]))
+                  expression: astFactory.listLiteral(
+                      null, null, null, [AstTestFactory.integer(0)], null))
             ]));
   }
 
-  void test_visitSetLiteral2_withConst_withoutTypeArgs() {
+  void test_visitSetOrMapLiteral_set_withConst_withoutTypeArgs() {
     _assertSource(
         'const {0}',
-        astFactory.setLiteral2(
+        astFactory.setOrMapLiteral(
             constKeyword: TokenFactory.tokenFromKeyword(Keyword.CONST),
             elements: [AstTestFactory.integer(0)]));
   }
 
-  void test_visitSetLiteral2_withConst_withTypeArgs() {
+  void test_visitSetOrMapLiteral_set_withConst_withTypeArgs() {
     _assertSource(
         'const <int>{0}',
-        astFactory.setLiteral2(
+        astFactory.setOrMapLiteral(
             constKeyword: TokenFactory.tokenFromKeyword(Keyword.CONST),
             typeArguments: AstTestFactory.typeArgumentList(
                 [AstTestFactory.typeName4('int')]),
             elements: [AstTestFactory.integer(0)]));
   }
 
-  void test_visitSetLiteral2_withoutConst_withoutTypeArgs() {
-    _assertSource(
-        '{0}', astFactory.setLiteral2(elements: [AstTestFactory.integer(0)]));
+  void test_visitSetOrMapLiteral_set_withoutConst_withoutTypeArgs() {
+    _assertSource('{0}',
+        astFactory.setOrMapLiteral(elements: [AstTestFactory.integer(0)]));
   }
 
-  void test_visitSetLiteral2_withoutConst_withTypeArgs() {
+  void test_visitSetOrMapLiteral_set_withoutConst_withTypeArgs() {
     _assertSource(
         '<int>{0}',
-        astFactory.setLiteral2(
+        astFactory.setOrMapLiteral(
             typeArguments: AstTestFactory.typeArgumentList(
                 [AstTestFactory.typeName4('int')]),
             elements: [AstTestFactory.integer(0)]));
@@ -5919,8 +5983,8 @@
         astFactory.spreadElement(
             spreadOperator:
                 TokenFactory.tokenFromType(TokenType.PERIOD_PERIOD_PERIOD),
-            expression: astFactory
-                .listLiteral2(elements: [AstTestFactory.integer(0)])));
+            expression: astFactory.listLiteral(
+                null, null, null, [AstTestFactory.integer(0)], null)));
   }
 
   @failingTest
@@ -5932,8 +5996,8 @@
         astFactory.spreadElement(
             spreadOperator:
                 TokenFactory.tokenFromType(TokenType.PERIOD_PERIOD_PERIOD),
-            expression: astFactory
-                .listLiteral2(elements: [AstTestFactory.integer(0)])));
+            expression: astFactory.listLiteral(
+                null, null, null, [AstTestFactory.integer(0)], null)));
   }
 
   void test_visitStringInterpolation() {
diff --git a/pkg/analyzer/test/src/dart/constant/evaluation_test.dart b/pkg/analyzer/test/src/dart/constant/evaluation_test.dart
index fe9fbf9..36e49bc 100644
--- a/pkg/analyzer/test/src/dart/constant/evaluation_test.dart
+++ b/pkg/analyzer/test/src/dart/constant/evaluation_test.dart
@@ -90,7 +90,11 @@
       'c',
       errorCodes: [CompileTimeErrorCode.INVALID_CONSTANT],
     );
-    expect(result, isNull);
+    if (analysisOptions.experimentStatus.constant_update_2018) {
+      expect(result.toIntValue(), 1);
+    } else {
+      expect(result, isNull);
+    }
   }
 
   test_visitConditionalExpression_eager_true_invalid_int() async {
@@ -211,7 +215,10 @@
     extends ConstantVisitorTestSupport {
   @override
   AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
-    ..enabledExperiments = [EnableString.constant_update_2018];
+    ..enabledExperiments = [
+      EnableString.constant_update_2018,
+      EnableString.triple_shift
+    ];
 
   test_visitAsExpression_instanceOfSameClass() async {
     await _resolveTestCode('''
@@ -284,6 +291,19 @@
     expect(result.type, typeProvider.nullType);
   }
 
+  test_visitAsExpression_potentialConst() async {
+    await assertNoErrorsInCode('''
+class A {
+  const A();
+}
+
+class MyClass {
+  final A a;
+  const MyClass(Object o) : a = o as A;
+}
+''');
+  }
+
   test_visitBinaryExpression_and_bool_known_known() async {
     await _resolveTestCode('''
 const c = false & true;
@@ -354,6 +374,15 @@
     expect(result.toIntValue(), 0);
   }
 
+  test_visitBinaryExpression_gtGtGt_negative_moreThan64Bits() async {
+    await _resolveTestCode('''
+const c = 0xFFFFFFFF >>> 65;
+''');
+    DartObjectImpl result = _evaluateConstant('c');
+    expect(result.type, typeProvider.intType);
+    expect(result.toIntValue(), 0);
+  }
+
   test_visitBinaryExpression_gtGtGt_negative_negativeBits() async {
     await _resolveTestCode('''
 const c = 0xFFFFFFFF >>> -2;
@@ -389,6 +418,15 @@
     expect(result.toIntValue(), 0);
   }
 
+  test_visitBinaryExpression_gtGtGt_positive_moreThan64Bits() async {
+    await _resolveTestCode('''
+const c = 0xFF >>> 65;
+''');
+    DartObjectImpl result = _evaluateConstant('c');
+    expect(result.type, typeProvider.intType);
+    expect(result.toIntValue(), 0);
+  }
+
   test_visitBinaryExpression_gtGtGt_positive_negativeBits() async {
     await _resolveTestCode('''
 const c = 0xFF >>> -2;
@@ -573,9 +611,9 @@
   test_visitConditionalExpression_lazy_false_invalid_int() async {
     await _resolveTestCode('''
 const c = false ? new C() : 0;
-class C {}
 ''');
-    DartObjectImpl result = _evaluateConstant('c');
+    DartObjectImpl result = _evaluateConstant('c',
+        errorCodes: [CompileTimeErrorCode.INVALID_CONSTANT]);
     expect(result.type, typeProvider.intType);
     expect(result.toIntValue(), 0);
   }
@@ -599,9 +637,10 @@
 
   test_visitConditionalExpression_lazy_true_int_invalid() async {
     await _resolveTestCode('''
-const c = true ? 1 : new C();
+const c = true ? 1: new C();
 ''');
-    DartObjectImpl result = _evaluateConstant('c');
+    DartObjectImpl result = _evaluateConstant('c',
+        errorCodes: [CompileTimeErrorCode.INVALID_CONSTANT]);
     expect(result.type, typeProvider.intType);
     expect(result.toIntValue(), 1);
   }
@@ -799,10 +838,49 @@
   AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
     ..enabledExperiments = [
       EnableString.control_flow_collections,
-      EnableString.set_literals,
       EnableString.spread_collections
     ];
 
+  test_listLiteral_ifElement_false_withElse() async {
+    await _resolveTestCode('''
+const c = [1, if (1 < 0) 2 else 3, 4];
+''');
+    DartObjectImpl result = _evaluateConstant('c');
+    expect(
+        result.type, typeProvider.listType.instantiate([typeProvider.intType]));
+    expect(result.toListValue().map((e) => e.toIntValue()), [1, 3, 4]);
+  }
+
+  test_listLiteral_ifElement_false_withoutElse() async {
+    await _resolveTestCode('''
+const c = [1, if (1 < 0) 2, 3];
+''');
+    DartObjectImpl result = _evaluateConstant('c');
+    expect(
+        result.type, typeProvider.listType.instantiate([typeProvider.intType]));
+    expect(result.toListValue().map((e) => e.toIntValue()), [1, 3]);
+  }
+
+  test_listLiteral_ifElement_true_withElse() async {
+    await _resolveTestCode('''
+const c = [1, if (1 > 0) 2 else 3, 4];
+''');
+    DartObjectImpl result = _evaluateConstant('c');
+    expect(
+        result.type, typeProvider.listType.instantiate([typeProvider.intType]));
+    expect(result.toListValue().map((e) => e.toIntValue()), [1, 2, 4]);
+  }
+
+  test_listLiteral_ifElement_true_withoutElse() async {
+    await _resolveTestCode('''
+const c = [1, if (1 > 0) 2, 3];
+''');
+    DartObjectImpl result = _evaluateConstant('c');
+    expect(
+        result.type, typeProvider.listType.instantiate([typeProvider.intType]));
+    expect(result.toListValue().map((e) => e.toIntValue()), [1, 2, 3]);
+  }
+
   test_listLiteral_nested() async {
     await _resolveTestCode('''
 const c = [1, if (1 > 0) if (2 > 1) 2, 3];
@@ -815,47 +893,7 @@
     expect(result.toListValue().map((e) => e.toIntValue()), [1, 2, 3]);
   }
 
-  test_listLiteral_withIf_false_withElse() async {
-    await _resolveTestCode('''
-const c = [1, if (1 < 0) 2 else 3, 4];
-''');
-    DartObjectImpl result = _evaluateConstant('c');
-    expect(
-        result.type, typeProvider.listType.instantiate([typeProvider.intType]));
-    expect(result.toListValue().map((e) => e.toIntValue()), [1, 3, 4]);
-  }
-
-  test_listLiteral_withIf_false_withoutElse() async {
-    await _resolveTestCode('''
-const c = [1, if (1 < 0) 2, 3];
-''');
-    DartObjectImpl result = _evaluateConstant('c');
-    expect(
-        result.type, typeProvider.listType.instantiate([typeProvider.intType]));
-    expect(result.toListValue().map((e) => e.toIntValue()), [1, 3]);
-  }
-
-  test_listLiteral_withIf_true_withElse() async {
-    await _resolveTestCode('''
-const c = [1, if (1 > 0) 2 else 3, 4];
-''');
-    DartObjectImpl result = _evaluateConstant('c');
-    expect(
-        result.type, typeProvider.listType.instantiate([typeProvider.intType]));
-    expect(result.toListValue().map((e) => e.toIntValue()), [1, 2, 4]);
-  }
-
-  test_listLiteral_withIf_true_withoutElse() async {
-    await _resolveTestCode('''
-const c = [1, if (1 > 0) 2, 3];
-''');
-    DartObjectImpl result = _evaluateConstant('c');
-    expect(
-        result.type, typeProvider.listType.instantiate([typeProvider.intType]));
-    expect(result.toListValue().map((e) => e.toIntValue()), [1, 2, 3]);
-  }
-
-  test_listLiteral_withSpread() async {
+  test_listLiteral_spreadElement() async {
     await _resolveTestCode('''
 const c = [1, ...[2, 3], 4];
 ''');
@@ -865,6 +903,66 @@
     expect(result.toListValue().map((e) => e.toIntValue()), [1, 2, 3, 4]);
   }
 
+  test_mapLiteral_ifElement_false_withElse() async {
+    await _resolveTestCode('''
+const c = {'a' : 1, if (1 < 0) 'b' : 2 else 'c' : 3, 'd' : 4};
+''');
+    DartObjectImpl result = _evaluateConstant('c');
+    expect(
+        result.type,
+        typeProvider.mapType
+            .instantiate([typeProvider.stringType, typeProvider.intType]));
+    Map<DartObject, DartObject> value = result.toMapValue();
+    expect(value.keys.map((e) => e.toStringValue()),
+        unorderedEquals(['a', 'c', 'd']));
+    expect(value.values.map((e) => e.toIntValue()), unorderedEquals([1, 3, 4]));
+  }
+
+  test_mapLiteral_ifElement_false_withoutElse() async {
+    await _resolveTestCode('''
+const c = {'a' : 1, if (1 < 0) 'b' : 2, 'c' : 3};
+''');
+    DartObjectImpl result = _evaluateConstant('c');
+    expect(
+        result.type,
+        typeProvider.mapType
+            .instantiate([typeProvider.stringType, typeProvider.intType]));
+    Map<DartObject, DartObject> value = result.toMapValue();
+    expect(
+        value.keys.map((e) => e.toStringValue()), unorderedEquals(['a', 'c']));
+    expect(value.values.map((e) => e.toIntValue()), unorderedEquals([1, 3]));
+  }
+
+  test_mapLiteral_ifElement_true_withElse() async {
+    await _resolveTestCode('''
+const c = {'a' : 1, if (1 > 0) 'b' : 2 else 'c' : 3, 'd' : 4};
+''');
+    DartObjectImpl result = _evaluateConstant('c');
+    expect(
+        result.type,
+        typeProvider.mapType
+            .instantiate([typeProvider.stringType, typeProvider.intType]));
+    Map<DartObject, DartObject> value = result.toMapValue();
+    expect(value.keys.map((e) => e.toStringValue()),
+        unorderedEquals(['a', 'b', 'd']));
+    expect(value.values.map((e) => e.toIntValue()), unorderedEquals([1, 2, 4]));
+  }
+
+  test_mapLiteral_ifElement_true_withoutElse() async {
+    await _resolveTestCode('''
+const c = {'a' : 1, if (1 > 0) 'b' : 2, 'c' : 3};
+''');
+    DartObjectImpl result = _evaluateConstant('c');
+    expect(
+        result.type,
+        typeProvider.mapType
+            .instantiate([typeProvider.stringType, typeProvider.intType]));
+    Map<DartObject, DartObject> value = result.toMapValue();
+    expect(value.keys.map((e) => e.toStringValue()),
+        unorderedEquals(['a', 'b', 'c']));
+    expect(value.values.map((e) => e.toIntValue()), unorderedEquals([1, 2, 3]));
+  }
+
   @failingTest
   test_mapLiteral_nested() async {
     // Fails because we're not yet parsing nested elements.
@@ -882,67 +980,7 @@
     expect(value.values.map((e) => e.toIntValue()), unorderedEquals([1, 2, 3]));
   }
 
-  test_mapLiteral_withIf_false_withElse() async {
-    await _resolveTestCode('''
-const c = {'a' : 1, if (1 < 0) 'b' : 2 else 'c' : 3, 'd' : 4};
-''');
-    DartObjectImpl result = _evaluateConstant('c');
-    expect(
-        result.type,
-        typeProvider.mapType
-            .instantiate([typeProvider.stringType, typeProvider.intType]));
-    Map<DartObject, DartObject> value = result.toMapValue();
-    expect(value.keys.map((e) => e.toStringValue()),
-        unorderedEquals(['a', 'c', 'd']));
-    expect(value.values.map((e) => e.toIntValue()), unorderedEquals([1, 3, 4]));
-  }
-
-  test_mapLiteral_withIf_false_withoutElse() async {
-    await _resolveTestCode('''
-const c = {'a' : 1, if (1 < 0) 'b' : 2, 'c' : 3};
-''');
-    DartObjectImpl result = _evaluateConstant('c');
-    expect(
-        result.type,
-        typeProvider.mapType
-            .instantiate([typeProvider.stringType, typeProvider.intType]));
-    Map<DartObject, DartObject> value = result.toMapValue();
-    expect(
-        value.keys.map((e) => e.toStringValue()), unorderedEquals(['a', 'c']));
-    expect(value.values.map((e) => e.toIntValue()), unorderedEquals([1, 3]));
-  }
-
-  test_mapLiteral_withIf_true_withElse() async {
-    await _resolveTestCode('''
-const c = {'a' : 1, if (1 > 0) 'b' : 2 else 'c' : 3, 'd' : 4};
-''');
-    DartObjectImpl result = _evaluateConstant('c');
-    expect(
-        result.type,
-        typeProvider.mapType
-            .instantiate([typeProvider.stringType, typeProvider.intType]));
-    Map<DartObject, DartObject> value = result.toMapValue();
-    expect(value.keys.map((e) => e.toStringValue()),
-        unorderedEquals(['a', 'b', 'd']));
-    expect(value.values.map((e) => e.toIntValue()), unorderedEquals([1, 2, 4]));
-  }
-
-  test_mapLiteral_withIf_true_withoutElse() async {
-    await _resolveTestCode('''
-const c = {'a' : 1, if (1 > 0) 'b' : 2, 'c' : 3};
-''');
-    DartObjectImpl result = _evaluateConstant('c');
-    expect(
-        result.type,
-        typeProvider.mapType
-            .instantiate([typeProvider.stringType, typeProvider.intType]));
-    Map<DartObject, DartObject> value = result.toMapValue();
-    expect(value.keys.map((e) => e.toStringValue()),
-        unorderedEquals(['a', 'b', 'c']));
-    expect(value.values.map((e) => e.toIntValue()), unorderedEquals([1, 2, 3]));
-  }
-
-  test_mapLiteral_withSpread() async {
+  test_mapLiteral_spreadElement() async {
     await _resolveTestCode('''
 const c = {'a' : 1, ...{'b' : 2, 'c' : 3}, 'd' : 4};
 ''');
@@ -958,6 +996,46 @@
         value.values.map((e) => e.toIntValue()), unorderedEquals([1, 2, 3, 4]));
   }
 
+  test_setLiteral_ifElement_false_withElse() async {
+    await _resolveTestCode('''
+const c = {1, if (1 < 0) 2 else 3, 4};
+''');
+    DartObjectImpl result = _evaluateConstant('c');
+    expect(
+        result.type, typeProvider.setType.instantiate([typeProvider.intType]));
+    expect(result.toSetValue().map((e) => e.toIntValue()), [1, 3, 4]);
+  }
+
+  test_setLiteral_ifElement_false_withoutElse() async {
+    await _resolveTestCode('''
+const c = {1, if (1 < 0) 2, 3};
+''');
+    DartObjectImpl result = _evaluateConstant('c');
+    expect(
+        result.type, typeProvider.setType.instantiate([typeProvider.intType]));
+    expect(result.toSetValue().map((e) => e.toIntValue()), [1, 3]);
+  }
+
+  test_setLiteral_ifElement_true_withElse() async {
+    await _resolveTestCode('''
+const c = {1, if (1 > 0) 2 else 3, 4};
+''');
+    DartObjectImpl result = _evaluateConstant('c');
+    expect(
+        result.type, typeProvider.setType.instantiate([typeProvider.intType]));
+    expect(result.toSetValue().map((e) => e.toIntValue()), [1, 2, 4]);
+  }
+
+  test_setLiteral_ifElement_true_withoutElse() async {
+    await _resolveTestCode('''
+const c = {1, if (1 > 0) 2, 3};
+''');
+    DartObjectImpl result = _evaluateConstant('c');
+    expect(
+        result.type, typeProvider.setType.instantiate([typeProvider.intType]));
+    expect(result.toSetValue().map((e) => e.toIntValue()), [1, 2, 3]);
+  }
+
   test_setLiteral_nested() async {
     await _resolveTestCode('''
 const c = {1, if (1 > 0) if (2 > 1) 2, 3};
@@ -968,47 +1046,7 @@
     expect(result.toSetValue().map((e) => e.toIntValue()), [1, 2, 3]);
   }
 
-  test_setLiteral_withIf_false_withElse() async {
-    await _resolveTestCode('''
-const c = {1, if (1 < 0) 2 else 3, 4};
-''');
-    DartObjectImpl result = _evaluateConstant('c');
-    expect(
-        result.type, typeProvider.setType.instantiate([typeProvider.intType]));
-    expect(result.toSetValue().map((e) => e.toIntValue()), [1, 3, 4]);
-  }
-
-  test_setLiteral_withIf_false_withoutElse() async {
-    await _resolveTestCode('''
-const c = {1, if (1 < 0) 2, 3};
-''');
-    DartObjectImpl result = _evaluateConstant('c');
-    expect(
-        result.type, typeProvider.setType.instantiate([typeProvider.intType]));
-    expect(result.toSetValue().map((e) => e.toIntValue()), [1, 3]);
-  }
-
-  test_setLiteral_withIf_true_withElse() async {
-    await _resolveTestCode('''
-const c = {1, if (1 > 0) 2 else 3, 4};
-''');
-    DartObjectImpl result = _evaluateConstant('c');
-    expect(
-        result.type, typeProvider.setType.instantiate([typeProvider.intType]));
-    expect(result.toSetValue().map((e) => e.toIntValue()), [1, 2, 4]);
-  }
-
-  test_setLiteral_withIf_true_withoutElse() async {
-    await _resolveTestCode('''
-const c = {1, if (1 > 0) 2, 3};
-''');
-    DartObjectImpl result = _evaluateConstant('c');
-    expect(
-        result.type, typeProvider.setType.instantiate([typeProvider.intType]));
-    expect(result.toSetValue().map((e) => e.toIntValue()), [1, 2, 3]);
-  }
-
-  test_setLiteral_withSpread() async {
+  test_setLiteral_spreadElement() async {
     await _resolveTestCode('''
 const c = {1, ...{2, 3}, 4};
 ''');
diff --git a/pkg/analyzer/test/src/dart/constant/potentially_constant_test.dart b/pkg/analyzer/test/src/dart/constant/potentially_constant_test.dart
new file mode 100644
index 0000000..c26a62f
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/constant/potentially_constant_test.dart
@@ -0,0 +1,869 @@
+// 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/src/dart/constant/potentially_constant.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(IsConstantTypeExpressionTest);
+    defineReflectiveTests(PotentiallyConstantTest);
+    defineReflectiveTests(PotentiallyConstantWithUIAsCodeTest);
+  });
+}
+
+@reflectiveTest
+class IsConstantTypeExpressionTest extends DriverResolutionTest {
+  test_class() async {
+    await _assertConst(r'''
+int x;
+''');
+  }
+
+  test_class_prefix() async {
+    newFile('/test/lib/a.dart', content: r'''
+class A {}
+''');
+    await _assertConst(r'''
+import 'a.dart' as p;
+p.A x;
+''');
+  }
+
+  test_class_prefix_deferred() async {
+    newFile('/test/lib/a.dart', content: r'''
+class A {}
+''');
+    await _assertNotConst(r'''
+import 'a.dart' deferred as p;
+p.A x;
+''');
+  }
+
+  test_class_typeArguments() async {
+    await _assertConst(r'''
+List<int> x;
+''');
+  }
+
+  test_class_typeArguments_notConst() async {
+    await _assertNotConst(r'''
+class A<T> {
+  m() {
+    List<T> x;
+  }
+}
+''');
+  }
+
+  test_dynamic() async {
+    await _assertConst(r'''
+dynamic x;
+''');
+  }
+
+  test_genericFunctionType() async {
+    await _assertConst(r'''
+int Function<T extends num, U>(int, bool) x;
+''');
+  }
+
+  test_genericFunctionType_formalParameterType() async {
+    await _assertNotConst(r'''
+class A<T> {
+  m() {
+    Function(T) x;
+  }
+}
+''');
+  }
+
+  test_genericFunctionType_returnType() async {
+    await _assertNotConst(r'''
+class A<T> {
+  m() {
+    T Function() x;
+  }
+}
+''');
+  }
+
+  test_genericFunctionType_typeParameterBound() async {
+    await _assertNotConst(r'''
+class A<T> {
+  m() {
+    Function<U extends T>() x;
+  }
+}
+''');
+  }
+
+  test_typeParameter() async {
+    await _assertNotConst(r'''
+class A<T> {
+  m() {
+    T x;
+  }
+}
+''');
+  }
+
+  test_void() async {
+    await _assertConst(r'''
+void x;
+''');
+  }
+
+  Future<void> _assertConst(String code) async {
+    addTestFile(code);
+    await resolveTestFile();
+
+    var type = findNode.variableDeclarationList('x;').type;
+    expect(isConstantTypeExpression(type), isTrue);
+  }
+
+  Future<void> _assertNotConst(String code) async {
+    addTestFile(code);
+    await resolveTestFile();
+
+    var type = findNode.variableDeclarationList('x;').type;
+    expect(isConstantTypeExpression(type), isFalse);
+  }
+}
+
+@reflectiveTest
+class PotentiallyConstantTest extends DriverResolutionTest {
+  test_adjacentStrings() async {
+    await _assertConst(r'''
+var x = 'a' 'b';
+''', () => _xInitializer());
+  }
+
+  test_asExpression() async {
+    await _assertConst(r'''
+const a = 0;
+var x = a as int;
+''', () => _xInitializer());
+  }
+
+  test_asExpression_final() async {
+    await _assertNotConst(r'''
+final a = 0;
+var x = a as int;
+''', () => _xInitializer(), () => [findNode.simple('a as')]);
+  }
+
+  test_asExpression_notConstType() async {
+    await _assertNotConst(r'''
+const a = 0;
+class A<T> {
+  m() {
+    var x = a as T;
+  }
+}
+''', () => _xInitializer(), () => [findNode.typeName('T;')]);
+  }
+
+  test_conditional() async {
+    await _assertConst(r'''
+const a = 0;
+const b = 0;
+const c = 0;
+var x = a ? b : c;
+''', () => _xInitializer());
+  }
+
+  test_conditional_final() async {
+    await _assertNotConst(
+        r'''
+final a = 0;
+final b = 0;
+final c = 0;
+var x = a ? b : c;
+''',
+        () => _xInitializer(),
+        () => [
+              findNode.simple('a ?'),
+              findNode.simple('b :'),
+              findNode.simple('c;')
+            ]);
+  }
+
+  test_instanceCreation() async {
+    await _assertNotConst(r'''
+class A {
+  const A();
+}
+
+var x = new A(); // x
+''', () => _xInitializer(), () => [findNode.instanceCreation('A(); // x')]);
+  }
+
+  test_instanceCreation_const() async {
+    await _assertConst(r'''
+class A {
+  const A();
+}
+
+var x = const A();
+''', () => _xInitializer());
+  }
+
+  test_isExpression() async {
+    await _assertConst(r'''
+const a = 0;
+var x = a is int;
+''', () => _xInitializer());
+  }
+
+  test_isExpression_final() async {
+    await _assertNotConst(r'''
+final a = 0;
+var x = a is int;
+''', () => _xInitializer(), () => [findNode.simple('a is')]);
+  }
+
+  test_isExpression_notConstType() async {
+    await _assertNotConst(r'''
+const a = 0;
+class A<T> {
+  m() {
+    var x = a is T;
+  }
+}
+''', () => _xInitializer(), () => [findNode.typeName('T;')]);
+  }
+
+  test_listLiteral() async {
+    await _assertConst(r'''
+var x = const [0, 1, 2];
+''', () => _xInitializer());
+  }
+
+  test_listLiteral_notConst() async {
+    await _assertNotConst(r'''
+var x = [0, 1, 2];
+''', () => _xInitializer(), () => [findNode.listLiteral('0,')]);
+  }
+
+  test_listLiteral_notConst_element() async {
+    await _assertNotConst(r'''
+final a = 0;
+final b = 1;
+var x = const [a, b, 2];
+''', () => _xInitializer(),
+        () => [findNode.simple('a,'), findNode.simple('b,')]);
+  }
+
+  test_listLiteral_typeArgument() async {
+    await _assertConst(r'''
+var x = const <int>[0, 1, 2];
+''', () => _xInitializer());
+  }
+
+  test_listLiteral_typeArgument_notConstType() async {
+    await _assertNotConst(r'''
+class A<T> {
+  m() {
+    var x = const <T>[0, 1, 2];
+  }
+}
+''', () => _xInitializer(), () => [findNode.typeName('T>[0')]);
+  }
+
+  test_literal_bool() async {
+    await _assertConst(r'''
+var x = true;
+''', () => _xInitializer());
+  }
+
+  test_literal_double() async {
+    await _assertConst(r'''
+var x = 1.2;
+''', () => _xInitializer());
+  }
+
+  test_literal_int() async {
+    await _assertConst(r'''
+var x = 0;
+''', () => _xInitializer());
+  }
+
+  test_literal_null() async {
+    await _assertConst(r'''
+var x = null;
+''', () => _xInitializer());
+  }
+
+  test_literal_simpleString() async {
+    await _assertConst(r'''
+var x = '123';
+''', () => _xInitializer());
+  }
+
+  test_literal_symbol() async {
+    await _assertConst(r'''
+var x = #a.b.c;
+''', () => _xInitializer());
+  }
+
+  test_mapLiteral() async {
+    await _assertConst(r'''
+var x = const {0: 1};
+''', () => _xInitializer());
+  }
+
+  test_mapLiteral_notConst() async {
+    await _assertNotConst(r'''
+var x = {0: 1};
+''', () => _xInitializer(), () => [findNode.setOrMapLiteral('0: 1')]);
+  }
+
+  test_mapLiteral_notConst_key() async {
+    await _assertNotConst(r'''
+final a = 1;
+final b = 2;
+var x = const {0: 0, a: 1, b: 2};
+''', () => _xInitializer(),
+        () => [findNode.simple('a:'), findNode.simple('b:')]);
+  }
+
+  test_mapLiteral_notConst_value() async {
+    await _assertNotConst(r'''
+final a = 1;
+final b = 2;
+var x = const {0: 0, 1: a, 2: b};
+''', () => _xInitializer(),
+        () => [findNode.simple('a,'), findNode.simple('b}')]);
+  }
+
+  test_mapLiteral_typeArgument() async {
+    await _assertConst(r'''
+var x = const <int, int>{0: 0};
+''', () => _xInitializer());
+  }
+
+  test_mapLiteral_typeArgument_notConstType() async {
+    await _assertNotConst(r'''
+class A<T> {
+  m() {
+    var x = const <T, T>{};
+  }
+}
+''', () => _xInitializer(),
+        () => [findNode.typeName('T,'), findNode.typeName('T>{')]);
+  }
+
+  test_methodInvocation_identical() async {
+    await _assertConst(r'''
+const a = 0;
+const b = 0;
+var x = identical(a, b);
+''', () => _xInitializer());
+  }
+
+  test_methodInvocation_identical_final() async {
+    await _assertNotConst(r'''
+final a = 0;
+final b = 0;
+var x = identical(a, b);
+''', () => _xInitializer(),
+        () => [findNode.simple('a,'), findNode.simple('b)')]);
+  }
+
+  test_methodInvocation_name() async {
+    await _assertNotConst(r'''
+const a = 0;
+const b = 0;
+var x = foo(a, b);
+''', () => _xInitializer(), () => [findNode.methodInvocation('foo')]);
+  }
+
+  test_methodInvocation_target() async {
+    await _assertNotConst(r'''
+var x = a.foo();
+''', () => _xInitializer(), () => [findNode.methodInvocation('a.foo()')]);
+  }
+
+  test_namedExpression() async {
+    await _assertConst(r'''
+void f({a}) {}
+
+var x = f(a: 0);
+''', () => findNode.namedExpression('a: 0'));
+  }
+
+  test_parenthesizedExpression_const() async {
+    await _assertConst(r'''
+const a = 0;
+var x = (a);
+''', () => _xInitializer());
+  }
+
+  test_parenthesizedExpression_final() async {
+    await _assertNotConst(r'''
+final a = 0;
+var x = (a);
+''', () => _xInitializer(), () => [findNode.simple('a);')]);
+  }
+
+  test_postfixExpression() async {
+    await _assertNotConst(r'''
+const a = 0;
+var x = a++;
+''', () => _xInitializer(), () => [findNode.postfix('a++')]);
+  }
+
+  test_prefixedIdentifier_importPrefix_deferred() async {
+    newFile('/test/lib/a.dart', content: r'''
+const a = 0;
+''');
+    await _assertNotConst(r'''
+import 'a.dart' deferred as p;
+var x = p.a + 1;
+''', () => _xInitializer(), () => [findNode.prefixed('p.a')]);
+  }
+
+  test_prefixedIdentifier_importPrefix_function() async {
+    newFile('/test/lib/a.dart', content: r'''
+void f() {}
+''');
+    await _assertConst(r'''
+import 'a.dart' as p;
+var x = p.f;
+''', () => _xInitializer());
+  }
+
+  test_prefixedIdentifier_importPrefix_topVar() async {
+    newFile('/test/lib/a.dart', content: r'''
+const a = 0;
+''');
+    await _assertConst(r'''
+import 'a.dart' as p;
+var x = p.a + 1;
+''', () => _xInitializer());
+  }
+
+  test_prefixedIdentifier_length_const() async {
+    await _assertConst(r'''
+const a = 'abc';
+var x = a.length;
+''', () => _xInitializer());
+  }
+
+  test_prefixedIdentifier_length_final() async {
+    await _assertNotConst(r'''
+final a = 'abc';
+var x = a.length;
+''', () => _xInitializer(), () => [findNode.simple('a.')]);
+  }
+
+  test_prefixedIdentifier_method_instance() async {
+    await _assertNotConst(r'''
+class A {
+  const A();
+  m() {};
+}
+
+const a = const A();
+
+var x = a.m;
+''', () => _xInitializer(), () => [findNode.prefixed('a.m')]);
+  }
+
+  test_prefixedIdentifier_method_static() async {
+    await _assertConst(r'''
+class A {
+  static m() {};
+}
+
+var x = A.m;
+''', () => _xInitializer());
+  }
+
+  test_prefixedIdentifier_method_static_viaInstance() async {
+    await _assertNotConst(r'''
+class A {
+  const A();
+  static m() {};
+}
+
+const a = const A();
+
+var x = a.m;
+''', () => _xInitializer(), () => [findNode.prefixed('a.m')]);
+  }
+
+  test_prefixedIdentifier_prefix_variable() async {
+    await _assertNotConst(r'''
+class A {
+  final a = 0;
+  const A();
+}
+
+const a = const A();
+
+var x = a.b + 1;
+''', () => _xInitializer(), () => [findNode.prefixed('a.b + 1')]);
+  }
+
+  test_prefixedIdentifier_staticField_const() async {
+    await _assertConst(r'''
+class A {
+  static const a = 0;
+}
+var x = A.a + 1;
+''', () => _xInitializer());
+  }
+
+  test_prefixedIdentifier_staticField_final() async {
+    await _assertNotConst(
+      r'''
+class A {
+  static final a = 0;
+}
+var x = A.a + 1;
+''',
+      () => _xInitializer(),
+      () => [findNode.prefixed('A.a')],
+    );
+  }
+
+  test_prefixExpression_bang() async {
+    await _assertConst(r'''
+const a = 0;
+var x = !a;
+''', () => _xInitializer());
+  }
+
+  test_prefixExpression_minus() async {
+    await _assertConst(r'''
+const a = 0;
+var x = -a;
+''', () => _xInitializer());
+  }
+
+  test_prefixExpression_minus_final() async {
+    await _assertNotConst(r'''
+final a = 0;
+var x = -a;
+''', () => _xInitializer(), () => [findNode.simple('a;')]);
+  }
+
+  test_prefixExpression_plusPlus() async {
+    await _assertNotConst(r'''
+const a = 0;
+var x = ++a;
+''', () => _xInitializer(), () => [findNode.prefix('++a')]);
+  }
+
+  test_prefixExpression_tilde() async {
+    await _assertConst(r'''
+const a = 0;
+var x = ~a;
+''', () => _xInitializer());
+  }
+
+  test_propertyAccess_length_final() async {
+    await _assertNotConst(r'''
+final a = 'abc';
+var x = (a).length;
+''', () => _xInitializer(), () => [findNode.simple('a).')]);
+  }
+
+  test_propertyAccess_length_stringLiteral() async {
+    await _assertConst(r'''
+var x = 'abc'.length;
+''', () => _xInitializer());
+  }
+
+  test_propertyAccess_staticField_withPrefix_const() async {
+    newFile('/test/lib/a.dart', content: r'''
+class A {
+  static const a = 0;
+}
+''');
+    await _assertConst(r'''
+import 'a.dart' as p;
+var x = p.A.a + 1;
+''', () => _xInitializer());
+  }
+
+  test_propertyAccess_staticField_withPrefix_deferred() async {
+    newFile('/test/lib/a.dart', content: r'''
+class A {
+  static const a = 0;
+}
+''');
+    await _assertNotConst(r'''
+import 'a.dart' deferred as p;
+var x = p.A.a + 1;
+''', () => _xInitializer(), () => [findNode.propertyAccess('p.A.a')]);
+  }
+
+  test_propertyAccess_staticField_withPrefix_final() async {
+    newFile('/test/lib/a.dart', content: r'''
+class A {
+  static final a = 0;
+}
+''');
+    await _assertNotConst(r'''
+import 'a.dart' as p;
+var x = p.A.a + 1;
+''', () => _xInitializer(), () => [findNode.simple('a + 1')]);
+  }
+
+  test_propertyAccess_target_instanceCreation() async {
+    await _assertNotConst(r'''
+class A {
+  final a = 0;
+}
+
+var x = A().a + 1;
+''', () => _xInitializer(), () => [findNode.propertyAccess('A().a')]);
+  }
+
+  test_propertyAccess_target_variable() async {
+    newFile('/test/lib/a.dart', content: r'''
+class A {
+  final a = 0;
+  const A();
+}
+
+const a = const A();
+''');
+    await _assertNotConst(r'''
+import 'a.dart' as p;
+
+var x = p.a.b + 1;
+''', () => _xInitializer(), () => [findNode.propertyAccess('p.a.b + 1')]);
+  }
+
+  test_setLiteral() async {
+    await _assertConst(r'''
+var x = const {0, 1, 2};
+''', () => _xInitializer());
+  }
+
+  test_setLiteral_notConst() async {
+    await _assertNotConst(r'''
+var x = {0, 1, 2};
+''', () => _xInitializer(), () => [findNode.setOrMapLiteral('0,')]);
+  }
+
+  test_setLiteral_notConst_element() async {
+    await _assertNotConst(r'''
+final a = 0;
+final b = 1;
+var x = const {a, b, 2};
+''', () => _xInitializer(),
+        () => [findNode.simple('a,'), findNode.simple('b,')]);
+  }
+
+  test_setLiteral_typeArgument() async {
+    await _assertConst(r'''
+var x = const <int>{0, 1, 2};
+''', () => _xInitializer());
+  }
+
+  test_setLiteral_typeArgument_notConstType() async {
+    await _assertNotConst(r'''
+class A<T> {
+  m() {
+    var x = const <T>{0, 1, 2};
+  }
+}
+''', () => _xInitializer(), () => [findNode.typeName('T>{0')]);
+  }
+
+  test_simpleIdentifier_function() async {
+    await _assertConst(r'''
+var x = f;
+
+void f() {}
+''', () => _xInitializer());
+  }
+
+  test_simpleIdentifier_localVar_const() async {
+    await _assertConst(r'''
+main() {
+  const a = 0;
+  var x = a + 1;
+}
+''', () => _xInitializer());
+  }
+
+  test_simpleIdentifier_localVar_final() async {
+    await _assertNotConst(
+      r'''
+main() {
+  final a = 0;
+  var x = a + 1;
+}
+''',
+      () => _xInitializer(),
+      () => [findNode.simple('a +')],
+    );
+  }
+
+  test_simpleIdentifier_method_static() async {
+    await _assertConst(r'''
+class A {
+  static m() {};
+
+  final Object f;
+
+  const A() : f = m; // ref
+}
+''', () => findNode.simple('m; // ref'));
+  }
+
+  test_simpleIdentifier_parameterOfConstConstructor_inBody() async {
+    await _assertNotConst(
+      r'''
+class C {
+  const C(int a) {
+    var x = a + 1;
+  }
+}
+''',
+      () => _xInitializer(),
+      () => [findNode.simple('a +')],
+    );
+  }
+
+  test_simpleIdentifier_parameterOfConstConstructor_inInitializer() async {
+    await _assertConst(r'''
+class C {
+  final int f;
+  const C(int a) : f = a + 1;
+}
+''', () => findNode.constructorFieldInitializer('f =').expression);
+  }
+
+  test_simpleIdentifier_topVar_const() async {
+    await _assertConst(r'''
+const a = 0;
+var x = a + 1;
+''', () => _xInitializer());
+  }
+
+  test_simpleIdentifier_topVar_final() async {
+    await _assertNotConst(
+      r'''
+final a = 0;
+var x = a + 1;
+''',
+      () => _xInitializer(),
+      () => [findNode.simple('a +')],
+    );
+  }
+
+  test_simpleIdentifier_type_class() async {
+    await _assertConst(r'''
+var x = int;
+''', () => _xInitializer());
+  }
+
+  test_stringInterpolation_topVar_const() async {
+    await _assertConst(r'''
+const a = 0;
+var x = 'a $a b';
+''', () => _xInitializer());
+  }
+
+  test_stringInterpolation_topVar_final() async {
+    await _assertNotConst(
+      r'''
+final a = 0;
+var x = 'a $a b';
+''',
+      () => _xInitializer(),
+      () => [findNode.simple('a b')],
+    );
+  }
+
+  test_stringLiteral() async {
+    await _assertConst(r'''
+var x = 'a';
+''', () => _xInitializer());
+  }
+
+  _assertConst(String code, AstNode Function() getNode) async {
+    addTestFile(code);
+    await resolveTestFile();
+
+    var node = getNode();
+    var notConstList = getNotPotentiallyConstants(node);
+    expect(notConstList, isEmpty);
+  }
+
+  _assertNotConst(String code, AstNode Function() getNode,
+      List<AstNode> Function() getNotConstList) async {
+    addTestFile(code);
+    await resolveTestFile();
+
+    var node = getNode();
+    var notConstList = getNotPotentiallyConstants(node);
+
+    var expectedNotConst = getNotConstList();
+    expect(notConstList, unorderedEquals(expectedNotConst));
+  }
+
+  Expression _xInitializer() {
+    return findNode.variableDeclaration('x = ').initializer;
+  }
+}
+
+@reflectiveTest
+class PotentiallyConstantWithUIAsCodeTest extends PotentiallyConstantTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = ['control-flow-collections', 'spread-collections'];
+
+  test_ifElement_then() async {
+    await _assertConst(r'''
+const a = 0;
+const b = 0;
+var x = const [if (a) b];
+''', () => _xInitializer());
+  }
+
+  test_ifElement_then_final() async {
+    await _assertNotConst(r'''
+final a = 0;
+final b = 0;
+var x = const [if (a) b];
+''', () => _xInitializer(),
+        () => [findNode.simple('a)'), findNode.simple('b]')]);
+  }
+
+  test_ifElement_thenElse() async {
+    await _assertConst(r'''
+const a = 0;
+const b = 0;
+const c = 0;
+var x = const [if (a) b else c];
+''', () => _xInitializer());
+  }
+
+  test_spreadElement() async {
+    await _assertConst(r'''
+const a = [0, 1, 2];
+var x = const [...a];
+''', () => _xInitializer());
+  }
+
+  test_spreadElement_final() async {
+    await _assertNotConst(r'''
+final a = [0, 1, 2];
+var x = const [...a];
+''', () => _xInitializer(), () => [findNode.simple('a];')]);
+  }
+}
diff --git a/pkg/analyzer/test/src/dart/constant/test_all.dart b/pkg/analyzer/test/src/dart/constant/test_all.dart
index 022da95..95c1b2e 100644
--- a/pkg/analyzer/test/src/dart/constant/test_all.dart
+++ b/pkg/analyzer/test/src/dart/constant/test_all.dart
@@ -5,13 +5,14 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import 'evaluation_test.dart' as evaluation;
+import 'potentially_constant_test.dart' as potentially_constant;
 import 'utilities_test.dart' as utilities;
 import 'value_test.dart' as value;
 
-/// Utility for manually running all tests.
 main() {
   defineReflectiveSuite(() {
     evaluation.main();
+    potentially_constant.main();
     utilities.main();
     value.main();
   }, name: 'constant');
diff --git a/pkg/analyzer/test/src/dart/constant/utilities_test.dart b/pkg/analyzer/test/src/dart/constant/utilities_test.dart
index 0fa3898..c374591 100644
--- a/pkg/analyzer/test/src/dart/constant/utilities_test.dart
+++ b/pkg/analyzer/test/src/dart/constant/utilities_test.dart
@@ -8,20 +8,18 @@
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/dart/ast/ast.dart';
 import 'package:analyzer/src/dart/ast/token.dart';
+import 'package:analyzer/src/dart/constant/evaluation.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/generated/constant.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/resolver.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/generated/source_io.dart';
 import 'package:analyzer/src/generated/testing/ast_test_factory.dart';
 import 'package:analyzer/src/generated/testing/element_factory.dart';
 import 'package:analyzer/src/generated/testing/test_type_provider.dart';
-import 'package:analyzer/src/task/dart.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../generated/engine_test.dart';
 import '../../../generated/test_support.dart';
 
 main() {
@@ -35,12 +33,10 @@
 class ConstantFinderTest {
   AstNode _node;
   TypeProvider _typeProvider;
-  AnalysisContext _context;
   Source _source;
 
   void setUp() {
     _typeProvider = new TestTypeProvider();
-    _context = new _TestAnalysisContext();
     _source = new TestSource();
   }
 
@@ -51,7 +47,7 @@
   void test_visitAnnotation_constantVariable() {
     CompilationUnitElement compilationUnitElement =
         ElementFactory.compilationUnit('/test.dart', _source)..source = _source;
-    ElementFactory.library(_context, 'L').definingCompilationUnit =
+    ElementFactory.library(null, 'L').definingCompilationUnit =
         compilationUnitElement;
     ElementAnnotationImpl elementAnnotation =
         new ElementAnnotationImpl(compilationUnitElement);
@@ -77,7 +73,7 @@
   void test_visitAnnotation_invocation() {
     CompilationUnitElement compilationUnitElement =
         ElementFactory.compilationUnit('/test.dart', _source)..source = _source;
-    ElementFactory.library(_context, 'L').definingCompilationUnit =
+    ElementFactory.library(null, 'L').definingCompilationUnit =
         compilationUnitElement;
     ElementAnnotationImpl elementAnnotation =
         new ElementAnnotationImpl(compilationUnitElement);
@@ -174,7 +170,6 @@
     Set<Annotation> annotations = new Set<Annotation>();
     for (ConstantEvaluationTarget target in _findConstants()) {
       if (target is ElementAnnotationImpl) {
-        expect(target.context, same(_context));
         expect(target.source, same(_source));
         annotations.add(target.annotationAst);
       }
@@ -348,8 +343,3 @@
     node.accept(referenceFinder);
   }
 }
-
-class _TestAnalysisContext extends TestAnalysisContext {
-  @override
-  InternalAnalysisContext getContextFor(Source source) => this;
-}
diff --git a/pkg/analyzer/test/src/dart/element/element_test.dart b/pkg/analyzer/test/src/dart/element/element_test.dart
index 565ee2d..1abce89 100644
--- a/pkg/analyzer/test/src/dart/element/element_test.dart
+++ b/pkg/analyzer/test/src/dart/element/element_test.dart
@@ -9,8 +9,7 @@
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/handle.dart';
 import 'package:analyzer/src/dart/element/type.dart';
-import 'package:analyzer/src/generated/engine.dart'
-    show AnalysisContext, AnalysisOptionsImpl;
+import 'package:analyzer/src/generated/engine.dart' show AnalysisContext;
 import 'package:analyzer/src/generated/source_io.dart';
 import 'package:analyzer/src/generated/testing/ast_test_factory.dart';
 import 'package:analyzer/src/generated/testing/element_factory.dart';
@@ -18,10 +17,8 @@
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../../generated/analysis_context_factory.dart'
-    show AnalysisContextHelper;
-import '../../../generated/resolver_test_case.dart';
 import '../../../generated/test_support.dart';
+import '../resolution/driver_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -29,7 +26,6 @@
     defineReflectiveTests(FieldElementImplTest);
     defineReflectiveTests(FunctionTypeImplTest);
     defineReflectiveTests(InterfaceTypeImplTest);
-    defineReflectiveTests(LocalVariableElementImplTest);
     defineReflectiveTests(TypeParameterTypeImplTest);
     defineReflectiveTests(VoidTypeImplTest);
     defineReflectiveTests(ClassElementImplTest);
@@ -37,9 +33,6 @@
     defineReflectiveTests(ElementLocationImplTest);
     defineReflectiveTests(ElementImplTest);
     defineReflectiveTests(LibraryElementImplTest);
-    defineReflectiveTests(MethodElementImplTest);
-    defineReflectiveTests(MethodMemberTest);
-    defineReflectiveTests(ParameterElementImplTest);
     defineReflectiveTests(PropertyAccessorElementImplTest);
     defineReflectiveTests(TopLevelVariableElementImplTest);
   });
@@ -872,34 +865,30 @@
   }
 }
 
-/// TODO(paulberry): migrate this test away from the task model.
-/// See dartbug.com/35734.
 @reflectiveTest
-class ElementAnnotationImplTest extends ResolverTestCase {
-  void test_computeConstantValue() {
-    addNamedSource('/a.dart', r'''
+class ElementAnnotationImplTest extends DriverResolutionTest {
+  test_computeConstantValue() async {
+    newFile('/test/lib/a.dart', content: r'''
 class A {
   final String f;
   const A(this.f);
 }
 void f(@A('x') int p) {}
 ''');
-    Source source = addSource(r'''
+    addTestFile(r'''
 import 'a.dart';
 main() {
   f(3);
 }
 ''');
-    LibraryElement library = resolve2(source);
-    CompilationUnit unit = resolveCompilationUnit(source, library);
-    FunctionDeclaration main = unit.declarations[0];
-    BlockFunctionBody body = main.functionExpression.body;
-    ExpressionStatement statement = body.block.statements[0];
-    MethodInvocation invocation = statement.expression;
-    ParameterElement parameter =
-        invocation.argumentList.arguments[0].staticParameterElement;
+    await resolveTestFile();
+
+    var argument = findNode.integerLiteral('3');
+    ParameterElement parameter = argument.staticParameterElement;
+
     ElementAnnotation annotation = parameter.metadata[0];
     expect(annotation.constantValue, isNull);
+
     DartObject value = annotation.computeConstantValue();
     expect(value, isNotNull);
     expect(value.getField('f').toStringValue(), 'x');
@@ -1068,54 +1057,20 @@
   }
 }
 
-/// TODO(paulberry): migrate this test away from the task model.
-/// See dartbug.com/35734.
 @reflectiveTest
-class FieldElementImplTest extends EngineTestCase {
-  @deprecated
-  void test_computeNode() {
-    AnalysisContextHelper contextHelper = new AnalysisContextHelper();
-    AnalysisContext context = contextHelper.context;
-    Source source = contextHelper.addSource("/test.dart", r'''
-class A {
-  int a;
-}
-enum B {B1, B2, B3}''');
-    // prepare CompilationUnitElement
-    LibraryElement libraryElement = context.computeLibraryElement(source);
-    CompilationUnitElement unitElement = libraryElement.definingCompilationUnit;
-    // A
-    {
-      FieldElement elementA = unitElement.getType("A").getField('a');
-      VariableDeclaration nodeA = elementA.computeNode();
-      expect(nodeA, isNotNull);
-      expect(nodeA.name.name, "a");
-      expect(nodeA.declaredElement, same(elementA));
-    }
-    // B
-    {
-      FieldElement elementB = unitElement.getEnum("B").getField('B2');
-      EnumConstantDeclaration nodeB = elementB.computeNode();
-      expect(nodeB, isNotNull);
-      expect(nodeB.name.name, "B2");
-      expect(nodeB.declaredElement, same(elementB));
-    }
-  }
-
-  void test_isEnumConstant() {
-    AnalysisContextHelper contextHelper = new AnalysisContextHelper();
-    AnalysisContext context = contextHelper.context;
-    Source source = contextHelper.addSource("/test.dart", r'''
+class FieldElementImplTest extends DriverResolutionTest {
+  test_isEnumConstant() async {
+    addTestFile(r'''
 enum B {B1, B2, B3}
 ''');
-    // prepare CompilationUnitElement
-    LibraryElement libraryElement = context.computeLibraryElement(source);
-    CompilationUnitElement unitElement = libraryElement.definingCompilationUnit;
+    await resolveTestFile();
 
-    FieldElement b2Element = unitElement.getEnum("B").getField('B2');
+    var B = findElement.enum_('B');
+
+    FieldElement b2Element = B.getField('B2');
     expect(b2Element.isEnumConstant, isTrue);
 
-    FieldElement indexElement = unitElement.getEnum("B").getField('index');
+    FieldElement indexElement = B.getField('index');
     expect(indexElement.isEnumConstant, isFalse);
   }
 }
@@ -2045,6 +2000,38 @@
     _typeProvider = new TestTypeProvider();
   }
 
+  test_asInstanceOf_explicitGeneric() {
+    // class A<E> {}
+    // class B implements A<C> {}
+    // class C {}
+    ClassElementImpl classA = ElementFactory.classElement2('A', ['E']);
+    ClassElementImpl classB = ElementFactory.classElement2('B');
+    ClassElementImpl classC = ElementFactory.classElement2('C');
+    classB.interfaces = <InterfaceType>[
+      classA.type.instantiate([classC.type])
+    ];
+
+    InterfaceTypeImpl targetType = classB.type as InterfaceTypeImpl;
+    InterfaceType result = targetType.asInstanceOf(classA);
+    expect(result, classA.type.instantiate([classC.type]));
+  }
+
+  test_asInstanceOf_passThroughGeneric() {
+    // class A<E> {}
+    // class B<E> implements A<E> {}
+    ClassElementImpl classA = ElementFactory.classElement2('A', ['E']);
+    ClassElementImpl classB = ElementFactory.classElement2('B', ['E']);
+    ClassElementImpl classC = ElementFactory.classElement2('C');
+    classB.interfaces = <InterfaceType>[
+      classA.type.instantiate([classB.typeParameters[0].type])
+    ];
+
+    InterfaceTypeImpl targetType =
+        classB.type.instantiate([classC.type]) as InterfaceTypeImpl;
+    InterfaceType result = targetType.asInstanceOf(classA);
+    expect(result, classA.type.instantiate([classC.type]));
+  }
+
   void test_computeLongestInheritancePathToObject_multipleInterfacePaths() {
     //
     //   Object
@@ -3674,214 +3661,6 @@
 }
 
 @reflectiveTest
-class LocalVariableElementImplTest extends EngineTestCase {}
-
-/// TODO(paulberry): migrate this test away from the task model.
-/// See dartbug.com/35734.
-@reflectiveTest
-class MethodElementImplTest extends EngineTestCase {
-  @deprecated
-  void test_computeNode() {
-    AnalysisContextHelper contextHelper = new AnalysisContextHelper();
-    AnalysisContext context = contextHelper.context;
-    Source source = contextHelper.addSource("/test.dart", r'''
-abstract class A {
-  String m1() => null;
-  m2();
-}
-''');
-    // prepare CompilationUnitElement
-    LibraryElement libraryElement = context.computeLibraryElement(source);
-    CompilationUnitElement unitElement = libraryElement.definingCompilationUnit;
-    // m1
-    {
-      MethodElement m1Element = unitElement.getType("A").getMethod('m1');
-      MethodDeclaration m1Node = m1Element.computeNode();
-      expect(m1Node, isNotNull);
-      expect(m1Node.name.name, "m1");
-      expect(m1Node.declaredElement, same(m1Element));
-    }
-    // m2
-    {
-      MethodElement m2Element = unitElement.getType("A").getMethod('m2');
-      MethodDeclaration m2Node = m2Element.computeNode();
-      expect(m2Node, isNotNull);
-      expect(m2Node.name.name, "m2");
-      expect(m2Node.declaredElement, same(m2Element));
-    }
-  }
-
-  @deprecated
-  void test_computeNode_withoutFunctionBody() {
-    AnalysisOptionsImpl options = new AnalysisOptionsImpl();
-    options.analyzeFunctionBodies = false;
-    AnalysisContextHelper contextHelper = new AnalysisContextHelper(options);
-    AnalysisContext context = contextHelper.context;
-    Source source = contextHelper.addSource("/test.dart", r'''
-abstract class A {
-  String m1() => null;
-  m2();
-}
-''');
-    // prepare CompilationUnitElement
-    LibraryElement libraryElement = context.computeLibraryElement(source);
-    CompilationUnitElement unitElement = libraryElement.definingCompilationUnit;
-    // m1
-    {
-      MethodElement m1Element = unitElement.getType("A").getMethod('m1');
-      MethodDeclaration m1Node = m1Element.computeNode();
-      expect(m1Node, isNotNull);
-      expect(m1Node.name.name, "m1");
-      expect(m1Node.declaredElement, same(m1Element));
-    }
-    // m2
-    {
-      MethodElement m2Element = unitElement.getType("A").getMethod('m2');
-      MethodDeclaration m2Node = m2Element.computeNode();
-      expect(m2Node, isNotNull);
-      expect(m2Node.name.name, "m2");
-      expect(m2Node.declaredElement, same(m2Element));
-    }
-  }
-}
-
-/// TODO(paulberry): migrate this test away from the task model.
-/// See dartbug.com/35734.
-@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(
-        // ignore: deprecated_member_use_from_same_package
-        BfElement.getReifiedType(objectType),
-        // ignore: deprecated_member_use_from_same_package
-        equals(AfElement.getReifiedType(objectType)));
-  }
-}
-
-/// TODO(paulberry): migrate this test away from the task model.
-/// See dartbug.com/35734.
-@reflectiveTest
-class ParameterElementImplTest extends EngineTestCase {
-  @deprecated
-  void test_computeNode_DefaultFormalParameter() {
-    AnalysisContextHelper contextHelper = new AnalysisContextHelper();
-    AnalysisContext context = contextHelper.context;
-    Source source = contextHelper.addSource("/test.dart", r'''
-main([int p = 42]) {
-}''');
-    // prepare CompilationUnitElement
-    LibraryElement libraryElement = context.computeLibraryElement(source);
-    CompilationUnitElement unitElement = libraryElement.definingCompilationUnit;
-    // p
-    {
-      ParameterElement element = unitElement.functions[0].parameters[0];
-      DefaultFormalParameter node = element.computeNode();
-      expect(node, isNotNull);
-      expect(node.identifier.name, 'p');
-      expect(node.declaredElement, same(element));
-    }
-  }
-
-  @deprecated
-  void test_computeNode_FieldFormalParameter() {
-    AnalysisContextHelper contextHelper = new AnalysisContextHelper();
-    AnalysisContext context = contextHelper.context;
-    Source source = contextHelper.addSource("/test.dart", r'''
-class A {
-  int p;
-  A(this.p) {
-  }
-}''');
-    // prepare CompilationUnitElement
-    LibraryElement libraryElement = context.computeLibraryElement(source);
-    CompilationUnitElement unitElement = libraryElement.definingCompilationUnit;
-    // p
-    {
-      ClassElement classA = unitElement.types[0];
-      ConstructorElement constructorA = classA.constructors[0];
-      FieldFormalParameterElement element = constructorA.parameters[0];
-      FieldFormalParameter node = element.computeNode();
-      expect(node, isNotNull);
-      expect(node.identifier.name, 'p');
-      expect(node.declaredElement, same(element));
-    }
-  }
-
-  @deprecated
-  void test_computeNode_FunctionTypedFormalParameter() {
-    AnalysisContextHelper contextHelper = new AnalysisContextHelper();
-    AnalysisContext context = contextHelper.context;
-    Source source = contextHelper.addSource("/test.dart", r'''
-main(p(int a, int b)) {
-}''');
-    // prepare CompilationUnitElement
-    LibraryElement libraryElement = context.computeLibraryElement(source);
-    CompilationUnitElement unitElement = libraryElement.definingCompilationUnit;
-    // p
-    {
-      ParameterElement element = unitElement.functions[0].parameters[0];
-      FunctionTypedFormalParameter node = element.computeNode();
-      expect(node, isNotNull);
-      expect(node.identifier.name, 'p');
-      expect(node.declaredElement, same(element));
-    }
-  }
-
-  @deprecated
-  void test_computeNode_SimpleFormalParameter() {
-    AnalysisContextHelper contextHelper = new AnalysisContextHelper();
-    AnalysisContext context = contextHelper.context;
-    Source source = contextHelper.addSource("/test.dart", r'''
-main(int p) {
-}''');
-    // prepare CompilationUnitElement
-    LibraryElement libraryElement = context.computeLibraryElement(source);
-    CompilationUnitElement unitElement = libraryElement.definingCompilationUnit;
-    // p
-    {
-      ParameterElement element = unitElement.functions[0].parameters[0];
-      SimpleFormalParameter node = element.computeNode();
-      expect(node, isNotNull);
-      expect(node.identifier.name, 'p');
-      expect(node.declaredElement, same(element));
-    }
-  }
-}
-
-@reflectiveTest
 class PropertyAccessorElementImplTest extends EngineTestCase {
   void test_matchesHandle_getter() {
     CompilationUnitElementImpl compilationUnitElement =
@@ -3926,30 +3705,25 @@
   }
 }
 
-/// TODO(paulberry): migrate this test away from the task model.
-/// See dartbug.com/35734.
 @reflectiveTest
-class TopLevelVariableElementImplTest extends ResolverTestCase {
-  void test_computeConstantValue() {
-    addNamedSource('/a.dart', r'''
+class TopLevelVariableElementImplTest extends DriverResolutionTest {
+  test_computeConstantValue() async {
+    newFile('/test/lib/a.dart', content: r'''
 const int C = 42;
 ''');
-    Source source = addSource(r'''
+    addTestFile(r'''
 import 'a.dart';
 main() {
   print(C);
 }
 ''');
-    LibraryElement library = resolve2(source);
-    CompilationUnit unit = resolveCompilationUnit(source, library);
-    FunctionDeclaration main = unit.declarations[0];
-    BlockFunctionBody body = main.functionExpression.body;
-    ExpressionStatement statement = body.block.statements[0];
-    MethodInvocation invocation = statement.expression;
-    SimpleIdentifier argument = invocation.argumentList.arguments[0];
+    await resolveTestFile();
+
+    SimpleIdentifier argument = findNode.simple('C);');
     PropertyAccessorElementImpl getter = argument.staticElement;
     TopLevelVariableElement constant = getter.variable;
     expect(constant.constantValue, isNull);
+
     DartObject value = constant.computeConstantValue();
     expect(value, isNotNull);
     expect(value.toIntValue(), 42);
diff --git a/pkg/analyzer/test/src/dart/element/inheritance_manager2_test.dart b/pkg/analyzer/test/src/dart/element/inheritance_manager2_test.dart
index 2755ffb..07b9de2 100644
--- a/pkg/analyzer/test/src/dart/element/inheritance_manager2_test.dart
+++ b/pkg/analyzer/test/src/dart/element/inheritance_manager2_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/element/test_all.dart b/pkg/analyzer/test/src/dart/element/test_all.dart
index f75596d..d51bf52 100644
--- a/pkg/analyzer/test/src/dart/element/test_all.dart
+++ b/pkg/analyzer/test/src/dart/element/test_all.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -7,6 +7,7 @@
 import 'element_test.dart' as element;
 import 'function_type_test.dart' as function_type;
 import 'inheritance_manager2_test.dart' as inheritance_manager2;
+import 'type_algebra_test.dart' as type_algebra;
 
 /// Utility for manually running all tests.
 main() {
@@ -14,5 +15,6 @@
     element.main();
     function_type.main();
     inheritance_manager2.main();
+    type_algebra.main();
   }, name: 'element');
 }
diff --git a/pkg/analyzer/test/src/dart/element/type_algebra_test.dart b/pkg/analyzer/test/src/dart/element/type_algebra_test.dart
new file mode 100644
index 0000000..5aa1321
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/element/type_algebra_test.dart
@@ -0,0 +1,271 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/dart/element/type_algebra.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(SubstituteEmptyTest);
+    defineReflectiveTests(SubstituteFromInterfaceTypeTest);
+    defineReflectiveTests(SubstituteFromPairsTest);
+    defineReflectiveTests(SubstituteFromUpperAndLowerBoundsTest);
+    defineReflectiveTests(SubstituteTest);
+  });
+}
+
+@reflectiveTest
+class SubstituteEmptyTest extends DriverResolutionTest {
+  test_interface() async {
+    addTestFile(r'''
+class A<T> {}
+''');
+    await resolveTestFile();
+
+    var type = findElement.class_('A').type;
+    var result = Substitution.empty.substituteType(type);
+    expect(result, same(type));
+  }
+}
+
+@reflectiveTest
+class SubstituteFromInterfaceTypeTest extends _Base {
+  test_interface() async {
+    addTestFile(r'''
+class A<T> {}
+class B<U> extends A<U> {}
+''');
+    await resolveTestFile();
+
+    var a = findElement.class_('A');
+    var b = findElement.class_('B');
+    var u = b.typeParameters.single;
+
+    var bType = _instantiate(b, [intType]);
+    var substitution = Substitution.fromInterfaceType(bType);
+
+    // `extends A<U>`
+    var type = _instantiate(a, [u.type]);
+    assertElementTypeString(type, 'A<U>');
+
+    var result = substitution.substituteType(type);
+    assertElementTypeString(result, 'A<int>');
+  }
+}
+
+@reflectiveTest
+class SubstituteFromPairsTest extends DriverResolutionTest {
+  test_interface() async {
+    addTestFile(r'''
+class A<T, U> {}
+''');
+    await resolveTestFile();
+
+    var a = findElement.class_('A');
+    var result = Substitution.fromPairs(
+      a.typeParameters,
+      [intType, doubleType],
+    ).substituteType(a.type);
+    assertElementTypeString(result, 'A<int, double>');
+  }
+}
+
+@reflectiveTest
+class SubstituteFromUpperAndLowerBoundsTest extends DriverResolutionTest {
+  test_function() async {
+    addTestFile(r'''
+typedef F<T> = T Function(T);
+''');
+    await resolveTestFile();
+
+    var type = findElement.genericTypeAlias('F').function.type;
+    var t = findElement.typeParameter('T');
+
+    var result = Substitution.fromUpperAndLowerBounds(
+      {t: intType},
+      {t: BottomTypeImpl.instance},
+    ).substituteType(type);
+    assertElementTypeString(result, '(<bottom>) → int');
+  }
+}
+
+@reflectiveTest
+class SubstituteTest extends _Base {
+  test_bottom() async {
+    addTestFile(r'''
+class A<T> {}
+''');
+    await resolveTestFile();
+
+    var t = findElement.typeParameter('T');
+    _assertIdenticalType(typeProvider.bottomType, {t: intType});
+  }
+
+  test_dynamic() async {
+    addTestFile(r'''
+class A<T> {}
+''');
+    await resolveTestFile();
+
+    var t = findElement.typeParameter('T');
+    _assertIdenticalType(typeProvider.dynamicType, {t: intType});
+  }
+
+  test_function_noTypeParameters() async {
+    addTestFile(r'''
+typedef F = bool Function(int);
+class B<T> {}
+''');
+    await resolveTestFile();
+
+    var type = findElement.genericTypeAlias('F').function.type;
+    var t = findElement.typeParameter('T');
+    _assertIdenticalType(type, {t: intType});
+  }
+
+  test_function_typeFormals() async {
+    addTestFile(r'''
+typedef F<T> = T Function<U extends T>(U);
+''');
+    await resolveTestFile();
+
+    var type = findElement.genericTypeAlias('F').function.type;
+    var t = findElement.typeParameter('T');
+    assertElementTypeString(type, '<U extends T>(U) → T');
+    _assertSubstitution(
+      type,
+      {t: intType},
+      '<U extends int>(U) → int',
+    );
+  }
+
+  test_function_typeParameters() async {
+    addTestFile(r'''
+typedef F<T, U> = T Function(U u, bool);
+''');
+    await resolveTestFile();
+
+    var type = findElement.genericTypeAlias('F').function.type;
+    var t = findElement.typeParameter('T');
+    var u = findElement.typeParameter('U');
+    assertElementTypeString(type, '(U, bool) → T');
+    _assertSubstitution(
+      type,
+      {t: intType},
+      '(U, bool) → int',
+    );
+    _assertSubstitution(
+      type,
+      {t: intType, u: doubleType},
+      '(double, bool) → int',
+    );
+  }
+
+  test_interface_arguments() async {
+    addTestFile(r'''
+class A<T> {}
+class B<U> {}
+''');
+    await resolveTestFile();
+
+    var a = findElement.class_('A');
+    var u = findElement.typeParameter('U');
+    var uType = new TypeParameterTypeImpl(u);
+
+    var type = _instantiate(a, [uType]);
+    assertElementTypeString(type, 'A<U>');
+    _assertSubstitution(type, {u: intType}, 'A<int>');
+  }
+
+  test_interface_arguments_deep() async {
+    addTestFile(r'''
+class A<T> {}
+class B<U> {}
+''');
+    await resolveTestFile();
+
+    var a = findElement.class_('A');
+    var u = findElement.typeParameter('U');
+    var uType = new TypeParameterTypeImpl(u);
+
+    var type = _instantiate(a, [
+      _instantiate(listElement, [uType])
+    ]);
+    assertElementTypeString(type, 'A<List<U>>');
+    _assertSubstitution(type, {u: intType}, 'A<List<int>>');
+  }
+
+  test_interface_noArguments() async {
+    addTestFile(r'''
+class A {}
+class B<T> {}
+''');
+    await resolveTestFile();
+
+    var a = findElement.class_('A');
+    var t = findElement.typeParameter('T');
+    _assertIdenticalType(a.type, {t: intType});
+  }
+
+  test_interface_noArguments_inArguments() async {
+    addTestFile(r'''
+class A<T> {}
+class B<U> {}
+''');
+    await resolveTestFile();
+
+    var a = findElement.class_('A');
+    var u = findElement.typeParameter('U');
+    _assertIdenticalType(
+      _instantiate(a, [intType]),
+      {u: doubleType},
+    );
+  }
+
+  test_void() async {
+    addTestFile(r'''
+class A<T> {}
+''');
+    await resolveTestFile();
+
+    var t = findElement.typeParameter('T');
+    _assertIdenticalType(voidType, {t: intType});
+  }
+
+  test_void_emptyMap() async {
+    addTestFile('');
+    await resolveTestFile();
+    _assertIdenticalType(voidType, {});
+  }
+
+  void _assertIdenticalType(
+      DartType type, Map<TypeParameterElement, DartType> substitution) {
+    var result = substitute(type, substitution);
+    expect(result, same(type));
+  }
+
+  void _assertSubstitution(
+    DartType type,
+    Map<TypeParameterElement, DartType> substitution,
+    String expected,
+  ) {
+    var result = substitute(type, substitution);
+    assertElementTypeString(result, expected);
+  }
+}
+
+class _Base extends DriverResolutionTest {
+  /// Intentionally low-level implementation for creating [InterfaceType]
+  /// for [ClassElement] and type arguments. We just create it explicitly,
+  /// without using `InterfaceType.instantiate()`.
+  InterfaceType _instantiate(ClassElement element, List<DartType> arguments) {
+    return new InterfaceTypeImpl(element)..typeArguments = arguments;
+  }
+}
diff --git a/pkg/analyzer/test/src/dart/resolution/assignment_test.dart b/pkg/analyzer/test/src/dart/resolution/assignment_test.dart
index 8e1a8a1..d5e4d8a 100644
--- a/pkg/analyzer/test/src/dart/resolution/assignment_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/assignment_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -160,7 +160,7 @@
     var cascade = findNode.cascade('<int, double>');
     assertType(cascade, 'Map<int, double>');
 
-    MapLiteral map = cascade.target;
+    SetOrMapLiteral map = cascade.target;
     assertType(map, 'Map<int, double>');
     assertTypeName(map.typeArguments.arguments[0], intElement, 'int');
     assertTypeName(map.typeArguments.arguments[1], doubleElement, 'double');
diff --git a/pkg/analyzer/test/src/dart/resolution/class_alias_test.dart b/pkg/analyzer/test/src/dart/resolution/class_alias_test.dart
index e97423c..37aa571 100644
--- a/pkg/analyzer/test/src/dart/resolution/class_alias_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/class_alias_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/resolution/class_test.dart b/pkg/analyzer/test/src/dart/resolution/class_test.dart
index f8ce37a..f384b0d 100644
--- a/pkg/analyzer/test/src/dart/resolution/class_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/class_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -32,7 +32,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.ABSTRACT_SUPER_MEMBER_REFERENCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.ABSTRACT_SUPER_MEMBER_REFERENCE]);
     assertElement(findNode.simple('foo; // ref'), findElement.getter('foo'));
   }
 
@@ -50,7 +51,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.ABSTRACT_SUPER_MEMBER_REFERENCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.ABSTRACT_SUPER_MEMBER_REFERENCE]);
     assertElement(
       findNode.simple('foo; // ref'),
       findElement.getter('foo', of: 'Foo'),
@@ -69,7 +71,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.ABSTRACT_SUPER_MEMBER_REFERENCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.ABSTRACT_SUPER_MEMBER_REFERENCE]);
     assertElement(findNode.simple('foo; // ref'), findElement.method('foo'));
   }
 
@@ -155,7 +158,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.ABSTRACT_SUPER_MEMBER_REFERENCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.ABSTRACT_SUPER_MEMBER_REFERENCE]);
     assertElement(findNode.simple('foo = 0;'), findElement.setter('foo'));
   }
 
@@ -167,7 +171,8 @@
 class C extends A implements B {}
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_GENERIC_INTERFACES]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_GENERIC_INTERFACES]);
   }
 
   test_conflictingGenericInterfaces_viaMixin() async {
@@ -178,7 +183,8 @@
 class C extends A with B {}
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_GENERIC_INTERFACES]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_GENERIC_INTERFACES]);
   }
 
   test_element_allSupertypes() async {
@@ -296,7 +302,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_AND_STATIC_FIELD,
     ]);
   }
@@ -309,7 +315,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_AND_STATIC_FIELD,
     ]);
   }
@@ -346,7 +352,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_AND_STATIC_FIELD,
     ]);
   }
@@ -359,7 +365,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.CONFLICTING_CONSTRUCTOR_AND_STATIC_METHOD,
     ]);
   }
@@ -398,7 +404,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_FIELD_AND_METHOD]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_FIELD_AND_METHOD]);
   }
 
   test_error_conflictingFieldAndMethod_inSuper_getter() async {
@@ -411,7 +418,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_FIELD_AND_METHOD]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_FIELD_AND_METHOD]);
   }
 
   test_error_conflictingFieldAndMethod_inSuper_setter() async {
@@ -424,7 +432,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_FIELD_AND_METHOD]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_FIELD_AND_METHOD]);
   }
 
   test_error_conflictingMethodAndField_inSuper_field() async {
@@ -437,7 +446,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_METHOD_AND_FIELD]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_METHOD_AND_FIELD]);
   }
 
   test_error_conflictingMethodAndField_inSuper_getter() async {
@@ -450,7 +460,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_METHOD_AND_FIELD]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_METHOD_AND_FIELD]);
   }
 
   test_error_conflictingMethodAndField_inSuper_setter() async {
@@ -463,7 +474,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_METHOD_AND_FIELD]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_METHOD_AND_FIELD]);
   }
 
   test_error_conflictingStaticAndInstance_inClass_getter_getter() async {
@@ -474,7 +486,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inClass_getter_method() async {
@@ -485,7 +498,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inClass_getter_setter() async {
@@ -496,7 +510,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inClass_method_getter() async {
@@ -507,7 +522,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inClass_method_method() async {
@@ -518,7 +534,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inClass_method_setter() async {
@@ -529,7 +546,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inClass_setter_getter() async {
@@ -540,7 +558,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inClass_setter_method() async {
@@ -551,7 +570,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inClass_setter_setter() async {
@@ -562,7 +582,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inInterface_getter_getter() async {
@@ -575,7 +596,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inInterface_getter_method() async {
@@ -588,7 +610,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inInterface_getter_setter() async {
@@ -601,7 +624,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inInterface_method_getter() async {
@@ -614,7 +638,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inInterface_method_method() async {
@@ -627,7 +652,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inInterface_method_setter() async {
@@ -640,7 +666,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inInterface_setter_method() async {
@@ -653,7 +680,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inInterface_setter_setter() async {
@@ -666,7 +694,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inMixin_getter_getter() async {
@@ -679,7 +708,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inMixin_getter_method() async {
@@ -692,7 +722,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inMixin_getter_setter() async {
@@ -705,7 +736,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inMixin_method_getter() async {
@@ -718,7 +750,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inMixin_method_method() async {
@@ -731,7 +764,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inMixin_method_setter() async {
@@ -744,7 +778,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inMixin_setter_method() async {
@@ -757,7 +792,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inMixin_setter_setter() async {
@@ -770,7 +806,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inSuper_getter_getter() async {
@@ -783,7 +820,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inSuper_getter_method() async {
@@ -796,7 +834,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inSuper_getter_setter() async {
@@ -809,7 +848,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inSuper_method_getter() async {
@@ -822,7 +862,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inSuper_method_method() async {
@@ -835,7 +876,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inSuper_method_setter() async {
@@ -848,7 +890,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inSuper_setter_method() async {
@@ -861,7 +904,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inSuper_setter_setter() async {
@@ -874,7 +918,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_duplicateConstructorDefault() async {
@@ -885,7 +930,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.DUPLICATE_CONSTRUCTOR_DEFAULT,
     ]);
   }
@@ -898,7 +943,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.DUPLICATE_CONSTRUCTOR_NAME,
     ]);
   }
@@ -911,7 +956,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+    assertTestErrorsWithCodes([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_error_duplicateDefinition_field_field_static() async {
@@ -922,7 +967,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+    assertTestErrorsWithCodes([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_error_duplicateDefinition_field_getter() async {
@@ -933,7 +978,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+    assertTestErrorsWithCodes([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_error_duplicateDefinition_field_method() async {
@@ -944,7 +989,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+    assertTestErrorsWithCodes([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_error_duplicateDefinition_getter_getter() async {
@@ -955,7 +1000,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+    assertTestErrorsWithCodes([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_error_duplicateDefinition_getter_method() async {
@@ -966,7 +1011,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+    assertTestErrorsWithCodes([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_error_duplicateDefinition_method_getter() async {
@@ -977,7 +1022,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+    assertTestErrorsWithCodes([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_error_duplicateDefinition_method_method() async {
@@ -988,7 +1033,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+    assertTestErrorsWithCodes([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_error_duplicateDefinition_method_setter() async {
@@ -999,7 +1044,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+    assertTestErrorsWithCodes([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_error_duplicateDefinition_OK_fieldFinal_setter() async {
@@ -1043,7 +1088,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+    assertTestErrorsWithCodes([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_error_duplicateDefinition_setter_setter() async {
@@ -1054,7 +1099,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+    assertTestErrorsWithCodes([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_error_extendsNonClass_dynamic() async {
@@ -1062,7 +1107,7 @@
 class A extends dynamic {}
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.EXTENDS_NON_CLASS,
     ]);
 
@@ -1076,7 +1121,7 @@
 class A extends E {}
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.EXTENDS_NON_CLASS,
     ]);
 
@@ -1093,7 +1138,7 @@
 class A extends M {} // ref
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.EXTENDS_NON_CLASS,
     ]);
 
@@ -1110,7 +1155,7 @@
 class A extends v {}
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.EXTENDS_NON_CLASS,
     ]);
 
@@ -1124,7 +1169,7 @@
 class B implements A, A {} // ref
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.IMPLEMENTS_REPEATED]);
+    assertTestErrorsWithCodes([CompileTimeErrorCode.IMPLEMENTS_REPEATED]);
 
     var a = findElement.class_('A');
     assertTypeName(findNode.typeName('A, A {} // ref'), a, 'A');
@@ -1136,7 +1181,7 @@
 class A {} class C{}
 class B implements A, A, A, A {}''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.IMPLEMENTS_REPEATED,
       CompileTimeErrorCode.IMPLEMENTS_REPEATED,
       CompileTimeErrorCode.IMPLEMENTS_REPEATED
@@ -1150,7 +1195,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
+    assertTestErrorsWithCodes([CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
   }
 
   test_error_memberWithClassName_getter_static() async {
@@ -1160,7 +1205,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
+    assertTestErrorsWithCodes([CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
 
     var method = findNode.methodDeclaration('C =>');
     expect(method.isGetter, isTrue);
@@ -1175,7 +1220,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
+    assertTestErrorsWithCodes([CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
   }
 
   test_error_memberWithClassName_setter_static() async {
@@ -1185,7 +1230,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
+    assertTestErrorsWithCodes([CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
 
     var method = findNode.methodDeclaration('C(_)');
     expect(method.isSetter, isTrue);
@@ -1200,7 +1245,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticWarningCode.MISMATCHED_GETTER_AND_SETTER_TYPES,
     ]);
   }
@@ -1220,7 +1265,7 @@
 abstract class X implements A, B {}
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticWarningCode.MISMATCHED_GETTER_AND_SETTER_TYPES,
     ]);
   }
@@ -1307,7 +1352,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER,
     ]);
   }
@@ -1320,7 +1365,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.WRONG_NUMBER_OF_PARAMETERS_FOR_SETTER,
     ]);
   }
@@ -1336,7 +1381,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticWarningCode.MISMATCHED_GETTER_AND_SETTER_TYPES,
     ]);
   }
@@ -1352,7 +1397,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticWarningCode.MISMATCHED_GETTER_AND_SETTER_TYPES,
     ]);
   }
@@ -1368,7 +1413,7 @@
 abstract class C implements A, B {}
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.INCONSISTENT_INHERITANCE,
     ]);
   }
@@ -1384,7 +1429,7 @@
 abstract class C implements A, B {}
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.INCONSISTENT_INHERITANCE,
     ]);
   }
@@ -1400,7 +1445,7 @@
 abstract class C implements A, B {}
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.INCONSISTENT_INHERITANCE,
     ]);
   }
@@ -1416,7 +1461,7 @@
 abstract class C implements A, B {}
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.INCONSISTENT_INHERITANCE_GETTER_AND_METHOD,
     ]);
   }
@@ -1432,7 +1477,7 @@
 abstract class C implements A, B {}
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.INCONSISTENT_INHERITANCE_GETTER_AND_METHOD,
     ]);
   }
@@ -1458,7 +1503,7 @@
 class A extends B {}
 class B extends A {}''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE
     ]);
@@ -1469,7 +1514,7 @@
 class A extends B {}
 class B implements A {}''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE
     ]);
@@ -1480,7 +1525,7 @@
 class A implements B {}
 class B implements A {}''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE
     ]);
@@ -1491,7 +1536,7 @@
 class M1 = Object with M2;
 class M2 = Object with M1;''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE
     ]);
@@ -1506,7 +1551,7 @@
 class M {}
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
     ]);
@@ -1517,7 +1562,7 @@
 abstract class A implements A {}
 class B implements A {}''');
     await resolveTestFile();
-    assertTestErrors(
+    assertTestErrorsWithCodes(
         [CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_IMPLEMENTS]);
   }
 
@@ -1527,7 +1572,7 @@
 abstract class B implements A {}
 class C implements A {}''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE
     ]);
@@ -1540,7 +1585,7 @@
 abstract class C implements A {}
 class D implements A {}''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE
@@ -1550,7 +1595,7 @@
   test_recursiveInterfaceInheritanceExtends() async {
     addTestFile("class A extends A {}");
     await resolveTestFile();
-    assertTestErrors(
+    assertTestErrorsWithCodes(
         [CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_EXTENDS]);
   }
 
@@ -1562,7 +1607,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_EXTENDS,
     ]);
   }
@@ -1570,7 +1615,7 @@
   test_recursiveInterfaceInheritanceImplements() async {
     addTestFile("class A implements A {}");
     await resolveTestFile();
-    assertTestErrors(
+    assertTestErrorsWithCodes(
         [CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_IMPLEMENTS]);
   }
 
@@ -1580,14 +1625,14 @@
 class M {}
 class B = A with M implements B;''');
     await resolveTestFile();
-    assertTestErrors(
+    assertTestErrorsWithCodes(
         [CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_IMPLEMENTS]);
   }
 
   test_recursiveInterfaceInheritanceWith() async {
     addTestFile("class M = Object with M;");
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_WITH,
     ]);
   }
@@ -1601,7 +1646,7 @@
   }
 }''');
     await resolveTestFile();
-    assertTestErrors([StaticTypeWarningCode.UNDEFINED_SUPER_GETTER]);
+    assertTestErrorsWithCodes([StaticTypeWarningCode.UNDEFINED_SUPER_GETTER]);
   }
 
   test_undefinedSuperMethod() async {
@@ -1613,7 +1658,7 @@
   }
 }''');
     await resolveTestFile();
-    assertTestErrors([StaticTypeWarningCode.UNDEFINED_SUPER_METHOD]);
+    assertTestErrorsWithCodes([StaticTypeWarningCode.UNDEFINED_SUPER_METHOD]);
   }
 
   test_undefinedSuperOperator_binaryExpression() async {
@@ -1625,7 +1670,7 @@
   }
 }''');
     await resolveTestFile();
-    assertTestErrors([StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR]);
+    assertTestErrorsWithCodes([StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR]);
   }
 
   test_undefinedSuperOperator_indexBoth() async {
@@ -1637,7 +1682,7 @@
   }
 }''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR,
       StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR,
     ]);
@@ -1652,7 +1697,7 @@
   }
 }''');
     await resolveTestFile();
-    assertTestErrors([StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR]);
+    assertTestErrorsWithCodes([StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR]);
   }
 
   test_undefinedSuperOperator_indexSetter() async {
@@ -1664,7 +1709,7 @@
   }
 }''');
     await resolveTestFile();
-    assertTestErrors([StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR]);
+    assertTestErrorsWithCodes([StaticTypeWarningCode.UNDEFINED_SUPER_OPERATOR]);
   }
 
   test_undefinedSuperSetter() async {
@@ -1676,6 +1721,6 @@
   }
 }''');
     await resolveTestFile();
-    assertTestErrors([StaticTypeWarningCode.UNDEFINED_SUPER_SETTER]);
+    assertTestErrorsWithCodes([StaticTypeWarningCode.UNDEFINED_SUPER_SETTER]);
   }
 }
diff --git a/pkg/analyzer/test/src/dart/resolution/comment_test.dart b/pkg/analyzer/test/src/dart/resolution/comment_test.dart
index 8fba266..dc7def9 100644
--- a/pkg/analyzer/test/src/dart/resolution/comment_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/comment_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/resolution/constant_test.dart b/pkg/analyzer/test/src/dart/resolution/constant_test.dart
index 4fde7c2..0283b13 100644
--- a/pkg/analyzer/test/src/dart/resolution/constant_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/constant_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -142,8 +142,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
-      CompileTimeErrorCode.NON_CONSTANT_VALUE_IN_INITIALIZER,
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.CONST_NOT_INITIALIZED,
       CompileTimeErrorCode.CONST_NOT_INITIALIZED,
     ]);
diff --git a/pkg/analyzer/test/src/dart/resolution/definite_assignment_test.dart b/pkg/analyzer/test/src/dart/resolution/definite_assignment_test.dart
index 48a15c7..367b0ee 100644
--- a/pkg/analyzer/test/src/dart/resolution/definite_assignment_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/definite_assignment_test.dart
@@ -7,6 +7,7 @@
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/src/dart/resolver/definite_assignment.dart';
+import 'package:analyzer/src/test_utilities/package_mixin.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -19,7 +20,8 @@
 }
 
 @reflectiveTest
-class DefiniteAssignmentTrackerTest extends DriverResolutionTest {
+class DefiniteAssignmentTrackerTest extends DriverResolutionTest
+    with PackageMixin {
   DefiniteAssignmentTracker tracker;
 
   /// Assert that only local variables with the given names are marked as read
@@ -1319,77 +1321,35 @@
   }
 
   @override
-  void visitForEachStatement(ForEachStatement node) {
-    var iterable = node.iterable;
-    var body = node.body;
-
-    tracker.beginForEachStatement(node);
-    iterable.accept(this);
-
-    tracker.beginForEachStatementBody();
-    body.accept(this);
-
-    tracker.endForEachStatement();
-  }
-
-  @override
   void visitForStatement(ForStatement node) {
-    var variables = node.variables;
-    var initialization = node.initialization;
-
-    var condition = node.condition;
-    var updaters = node.updaters;
-    var body = node.body;
-
-    tracker.beginForStatement(node);
-
-    variables?.accept(this);
-    initialization?.accept(this);
-    condition?.accept(this);
-
-    tracker.beginForStatementBody();
-    body?.accept(this);
-
-    tracker.beginForStatementUpdaters();
-    updaters?.accept(this);
-
-    tracker.endForStatement();
-  }
-
-  @override
-  void visitForStatement2(ForStatement2 node) {
     var parts = node.forLoopParts;
-    VariableDeclarationList variables;
-    Expression initialization;
-    Expression condition;
-    Expression iterable;
-    NodeList<Expression> updaters;
-    if (parts is ForPartsWithDeclarations) {
-      variables = parts.variables;
-      condition = parts.condition;
-      updaters = parts.updaters;
-    } else if (parts is ForPartsWithExpression) {
-      initialization = parts.initialization;
-      condition = parts.condition;
-      updaters = parts.updaters;
-    } else if (parts is ForEachParts) {
-      iterable = parts.iterable;
-    }
 
     tracker.beginForStatement2(node);
 
-    variables?.accept(this);
-    initialization?.accept(this);
-    condition?.accept(this);
-    iterable?.accept(this);
+    if (parts is ForParts) {
+      if (parts is ForPartsWithDeclarations) {
+        parts.variables?.accept(this);
+      } else if (parts is ForPartsWithExpression) {
+        parts.initialization?.accept(this);
+      } else {
+        throw new StateError('Unrecognized for loop parts');
+      }
+      parts.condition?.accept(this);
+    } else if (parts is ForEachParts) {
+      parts.iterable.accept(this);
+    } else {
+      throw new StateError('Unrecognized for loop parts');
+    }
 
-    tracker.beginForStatementBody();
+    tracker.beginForStatement2Body();
     node.body?.accept(this);
 
-    tracker.beginForStatementUpdaters();
-    updaters?.accept(this);
+    if (parts is ForParts) {
+      tracker.beginForStatementUpdaters();
+      parts.updaters?.accept(this);
+    }
 
-    tracker.endForStatement();
+    tracker.endForStatement2();
   }
 
   @override
@@ -1538,7 +1498,6 @@
   AstNode _getLabelTarget(AstNode node, LabelElement element) {
     for (; node != null; node = node.parent) {
       if (node is DoStatement ||
-          node is ForEachStatement ||
           node is ForStatement ||
           node is SwitchStatement ||
           node is WhileStatement) {
diff --git a/pkg/analyzer/test/src/dart/resolution/driver_resolution.dart b/pkg/analyzer/test/src/dart/resolution/driver_resolution.dart
index 50902ca..39405f2 100644
--- a/pkg/analyzer/test/src/dart/resolution/driver_resolution.dart
+++ b/pkg/analyzer/test/src/dart/resolution/driver_resolution.dart
@@ -27,20 +27,13 @@
   PerformanceLog logger;
 
   DartSdk sdk;
+  Map<String, List<Folder>> packageMap;
   AnalysisDriverScheduler scheduler;
   AnalysisDriver driver;
 
   /// Override this to change the analysis options for a given set of tests.
   AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl();
 
-  void addMetaPackage() {
-    newFile('/.pub-cache/meta/lib/meta.dart', content: r'''
-library meta;
-
-const alwaysThrows = const Object();
-''');
-  }
-
   @override
   Future<ResolvedUnitResult> resolveFile(String path) async {
     return await driver.getResult(path);
@@ -51,7 +44,9 @@
     logger = new PerformanceLog(logBuffer);
     scheduler = new AnalysisDriverScheduler(logger);
 
-    Map<String, List<Folder>> packageMap = <String, List<Folder>>{
+    // TODO(brianwilkerson) Create an empty package map by default and only add
+    //  packages in the tests that need them.
+    packageMap = <String, List<Folder>>{
       'test': [getFolder('/test/lib')],
       'aaa': [getFolder('/aaa/lib')],
       'bbb': [getFolder('/bbb/lib')],
diff --git a/pkg/analyzer/test/src/dart/resolution/enum_test.dart b/pkg/analyzer/test/src/dart/resolution/enum_test.dart
index 90a59b1..c731596 100644
--- a/pkg/analyzer/test/src/dart/resolution/enum_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/enum_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -27,7 +27,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_inference_listLiteral() async {
diff --git a/pkg/analyzer/test/src/dart/resolution/flow_analysis_test.dart b/pkg/analyzer/test/src/dart/resolution/flow_analysis_test.dart
index 4c7daeb..3143da1 100644
--- a/pkg/analyzer/test/src/dart/resolution/flow_analysis_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/flow_analysis_test.dart
@@ -9,7 +9,9 @@
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/dart/element/type_system.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/resolver/flow_analysis.dart';
+import 'package:analyzer/src/generated/engine.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -20,6 +22,7 @@
     defineReflectiveTests(NullableFlowTest);
     defineReflectiveTests(DefiniteAssignmentFlowTest);
     defineReflectiveTests(ReachableFlowTest);
+    defineReflectiveTests(ReachableFlowTest_SpreadCollections);
     defineReflectiveTests(TypePromotionFlowTest);
   });
 }
@@ -2115,6 +2118,13 @@
 }
 
 @reflectiveTest
+class ReachableFlowTest_SpreadCollections extends ReachableFlowTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => new AnalysisOptionsImpl()
+    ..enabledExperiments = [EnableString.spread_collections];
+}
+
+@reflectiveTest
 class TypePromotionFlowTest extends DriverResolutionTest {
   final Map<AstNode, DartType> promotedTypes = {};
 
@@ -2947,27 +2957,34 @@
   }
 
   @override
-  void visitForEachStatement(ForEachStatement node) {
-    var iterable = node.iterable;
-    var body = node.body;
-
-    iterable.accept(this);
-
-    assignedVariables.beginLoop();
-    body.accept(this);
-    assignedVariables.endLoop(node);
-  }
-
-  @override
   void visitForStatement(ForStatement node) {
-    node.initialization?.accept(this);
-    node.variables?.accept(this);
+    var forLoopParts = node.forLoopParts;
+    if (forLoopParts is ForParts) {
+      if (forLoopParts is ForPartsWithExpression) {
+        forLoopParts.initialization?.accept(this);
+      } else if (forLoopParts is ForPartsWithDeclarations) {
+        forLoopParts.variables?.accept(this);
+      } else {
+        throw new StateError('Unrecognized for loop parts');
+      }
 
-    assignedVariables.beginLoop();
-    node.condition?.accept(this);
-    node.body.accept(this);
-    node.updaters?.accept(this);
-    assignedVariables.endLoop(node);
+      assignedVariables.beginLoop();
+      forLoopParts.condition?.accept(this);
+      node.body.accept(this);
+      forLoopParts.updaters?.accept(this);
+      assignedVariables.endLoop(node);
+    } else if (forLoopParts is ForEachParts) {
+      var iterable = forLoopParts.iterable;
+      var body = node.body;
+
+      iterable.accept(this);
+
+      assignedVariables.beginLoop();
+      body.accept(this);
+      assignedVariables.endLoop(node);
+    } else {
+      throw new StateError('Unrecognized for loop parts');
+    }
   }
 
   @override
@@ -3215,47 +3232,9 @@
   }
 
   @override
-  void visitForEachStatement(ForEachStatement node) {
-    _checkUnreachableNode(node);
-
-    var iterable = node.iterable;
-    var body = node.body;
-
-    iterable.accept(this);
-    flow.forEachStatement_bodyBegin(assignedVariables[node]);
-
-    body.accept(this);
-
-    flow.forEachStatement_end();
-  }
-
-  @override
   void visitForStatement(ForStatement node) {
     _checkUnreachableNode(node);
 
-    var condition = node.condition;
-
-    node.initialization?.accept(this);
-    node.variables?.accept(this);
-
-    flow.forStatement_conditionBegin(assignedVariables[node]);
-    if (condition != null) {
-      condition.accept(this);
-    } else {
-      flow.trueLiteral(trueLiteral);
-    }
-
-    flow.forStatement_bodyBegin(node, condition ?? trueLiteral);
-    node.body.accept(this);
-
-    flow.forStatement_updaterBegin();
-    node.updaters?.accept(this);
-
-    flow.forStatement_end();
-  }
-
-  @override
-  void visitForStatement2(ForStatement2 node) {
     ForLoopParts parts = node.forLoopParts;
     if (parts is ForEachParts) {
       parts.iterable?.accept(this);
@@ -3516,7 +3495,6 @@
   AstNode _getLabelTarget(AstNode node, LabelElement element) {
     for (; node != null; node = node.parent) {
       if (node is DoStatement ||
-          node is ForEachStatement ||
           node is ForStatement ||
           node is SwitchStatement ||
           node is WhileStatement) {
diff --git a/pkg/analyzer/test/src/dart/resolution/for_element_test.dart b/pkg/analyzer/test/src/dart/resolution/for_element_test.dart
new file mode 100644
index 0000000..967b539
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/resolution/for_element_test.dart
@@ -0,0 +1,69 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ForEachElementTest);
+    defineReflectiveTests(ForLoopElementTest);
+  });
+}
+
+@reflectiveTest
+class ForEachElementTest extends DriverResolutionTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = ['control-flow-collections', 'spread-collections'];
+
+  test_declaredIdentifierScope() async {
+    addTestFile(r'''
+main() {
+  <int>[for (var i in [1, 2, 3]) i]; // 1
+  <double>[for (var i in [1.1, 2.2, 3.3]) i]; // 2
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    assertElement(
+      findNode.simple('i]; // 1'),
+      findNode.simple('i in [1, 2').staticElement,
+    );
+    assertElement(
+      findNode.simple('i]; // 2'),
+      findNode.simple('i in [1.1').staticElement,
+    );
+  }
+}
+
+@reflectiveTest
+class ForLoopElementTest extends DriverResolutionTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = ['control-flow-collections', 'spread-collections'];
+
+  test_declaredVariableScope() async {
+    addTestFile(r'''
+main() {
+  <int>[for (var i = 1; i < 10; i += 3) i]; // 1
+  <double>[for (var i = 1.1; i < 10; i += 5) i]; // 2
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    assertElement(
+      findNode.simple('i]; // 1'),
+      findNode.simple('i = 1;').staticElement,
+    );
+    assertElement(
+      findNode.simple('i]; // 2'),
+      findNode.simple('i = 1.1;').staticElement,
+    );
+  }
+}
diff --git a/pkg/analyzer/test/src/dart/resolution/for_in_test.dart b/pkg/analyzer/test/src/dart/resolution/for_in_test.dart
index e06e3a7..4c8f5b8 100644
--- a/pkg/analyzer/test/src/dart/resolution/for_in_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/for_in_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/resolution/generic_type_alias_test.dart b/pkg/analyzer/test/src/dart/resolution/generic_type_alias_test.dart
index 891c0f7..7974854 100644
--- a/pkg/analyzer/test/src/dart/resolution/generic_type_alias_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/generic_type_alias_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -29,7 +29,7 @@
 C<G> x;
 ''');
     await resolveTestFile();
-    assertTestErrors(
+    assertTestErrorsWithCodes(
       [CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT],
     );
   }
@@ -41,7 +41,7 @@
 C<Function<S>()> x;
 ''');
     await resolveTestFile();
-    assertTestErrors(
+    assertTestErrorsWithCodes(
       [CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT],
     );
   }
@@ -55,7 +55,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors(
+    assertTestErrorsWithCodes(
       [CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT],
     );
   }
@@ -69,7 +69,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors(
+    assertTestErrorsWithCodes(
       [CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT],
     );
   }
@@ -85,7 +85,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors(
+    assertTestErrorsWithCodes(
       [CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT],
     );
   }
@@ -97,7 +97,7 @@
 F<Function<S>()> x;
 ''');
     await resolveTestFile();
-    assertTestErrors(
+    assertTestErrorsWithCodes(
       [CompileTimeErrorCode.GENERIC_FUNCTION_TYPE_CANNOT_BE_TYPE_ARGUMENT],
     );
   }
diff --git a/pkg/analyzer/test/src/dart/resolution/import_prefix_test.dart b/pkg/analyzer/test/src/dart/resolution/import_prefix_test.dart
index 647c4c8..b9e9d61 100644
--- a/pkg/analyzer/test/src/dart/resolution/import_prefix_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/import_prefix_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -29,7 +29,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT,
     ]);
 
@@ -70,7 +70,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT,
     ]);
 
diff --git a/pkg/analyzer/test/src/dart/resolution/instance_creation_test.dart b/pkg/analyzer/test/src/dart/resolution/instance_creation_test.dart
index a4af48e..98ee882 100644
--- a/pkg/analyzer/test/src/dart/resolution/instance_creation_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/instance_creation_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -19,6 +19,24 @@
     with InstanceCreationResolutionMixin {}
 
 mixin InstanceCreationResolutionMixin implements ResolutionTest {
+  test_error_newWithInvalidTypeParameters_implicitNew_inference_top() async {
+    addTestFile(r'''
+final foo = Map<int>();
+''');
+    await resolveTestFile();
+    assertTestErrorsWithCodes([
+      StaticWarningCode.NEW_WITH_INVALID_TYPE_PARAMETERS,
+    ]);
+
+    var creation = findNode.instanceCreation('Map<int>');
+    assertInstanceCreation(
+      creation,
+      mapElement,
+      'Map<dynamic, dynamic>',
+      expectedConstructorMember: true,
+    );
+  }
+
   test_error_wrongNumberOfTypeArgumentsConstructor_explicitNew() async {
     addTestFile(r'''
 class Foo<X> {
@@ -30,7 +48,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR,
     ]);
 
@@ -45,24 +63,6 @@
 //    );
   }
 
-  test_error_newWithInvalidTypeParameters_implicitNew_inference_top() async {
-    addTestFile(r'''
-final foo = Map<int>();
-''');
-    await resolveTestFile();
-    assertTestErrors([
-      StaticWarningCode.NEW_WITH_INVALID_TYPE_PARAMETERS,
-    ]);
-
-    var creation = findNode.instanceCreation('Map<int>');
-    assertInstanceCreation(
-      creation,
-      mapElement,
-      'Map<dynamic, dynamic>',
-      expectedConstructorMember: true,
-    );
-  }
-
   test_error_wrongNumberOfTypeArgumentsConstructor_explicitNew_prefix() async {
     newFile('/test/lib/a.dart', content: '''
 class Foo<X> {
@@ -77,7 +77,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR,
     ]);
 
@@ -105,7 +105,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR,
     ]);
 
@@ -133,7 +133,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_CONSTRUCTOR,
     ]);
 
diff --git a/pkg/analyzer/test/src/dart/resolution/instance_member_inference_class_test.dart b/pkg/analyzer/test/src/dart/resolution/instance_member_inference_class_test.dart
index 4c0fd6a..1faee15 100644
--- a/pkg/analyzer/test/src/dart/resolution/instance_member_inference_class_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/instance_member_inference_class_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/resolution/instance_member_inference_mixin_test.dart b/pkg/analyzer/test/src/dart/resolution/instance_member_inference_mixin_test.dart
index 0ab92025..7c2104f 100644
--- a/pkg/analyzer/test/src/dart/resolution/instance_member_inference_mixin_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/instance_member_inference_mixin_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/resolution/method_invocation_test.dart b/pkg/analyzer/test/src/dart/resolution/method_invocation_test.dart
index 2af994d..307d438 100644
--- a/pkg/analyzer/test/src/dart/resolution/method_invocation_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/method_invocation_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -31,7 +31,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.ABSTRACT_SUPER_MEMBER_REFERENCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.ABSTRACT_SUPER_MEMBER_REFERENCE]);
 
     var invocation = findNode.methodInvocation('foo(0)');
     assertMethodInvocation(
@@ -55,7 +56,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.ABSTRACT_SUPER_MEMBER_REFERENCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.ABSTRACT_SUPER_MEMBER_REFERENCE]);
 
     var invocation = findNode.methodInvocation('foo(0)');
     assertMethodInvocation(
@@ -79,7 +81,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.ABSTRACT_SUPER_MEMBER_REFERENCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.ABSTRACT_SUPER_MEMBER_REFERENCE]);
 
     var invocation = findNode.methodInvocation('foo(); // ref');
     assertMethodInvocation(
@@ -187,7 +190,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticWarningCode.AMBIGUOUS_IMPORT,
     ]);
 
@@ -213,7 +216,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticWarningCode.AMBIGUOUS_IMPORT,
     ]);
 
@@ -233,7 +236,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticTypeWarningCode.INSTANCE_ACCESS_TO_STATIC_MEMBER,
     ]);
     _assertInvalidInvocation(
@@ -254,7 +257,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION,
     ]);
     _assertInvalidInvocation(
@@ -271,7 +274,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION,
     ]);
     _assertInvalidInvocation(
@@ -396,7 +399,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION,
     ]);
     _assertInvalidInvocation(
@@ -417,7 +420,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION,
     ]);
     _assertInvalidInvocation(
@@ -440,7 +443,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticTypeWarningCode.INVOCATION_OF_NON_FUNCTION,
     ]);
     _assertInvalidInvocation(
@@ -463,7 +466,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT,
     ]);
 
@@ -487,7 +490,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT,
     ]);
 
@@ -511,7 +514,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT,
     ]);
     _assertInvalidInvocation(
@@ -528,7 +531,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticTypeWarningCode.UNDEFINED_FUNCTION,
     ]);
     _assertUnresolvedMethodInvocation('foo(0)');
@@ -543,7 +546,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticTypeWarningCode.UNDEFINED_FUNCTION,
     ]);
     _assertUnresolvedMethodInvocation('foo(0);');
@@ -556,7 +559,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticWarningCode.UNDEFINED_IDENTIFIER,
     ]);
     _assertUnresolvedMethodInvocation('foo(0);');
@@ -570,7 +573,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticTypeWarningCode.UNDEFINED_METHOD,
     ]);
     _assertUnresolvedMethodInvocation('foo(0);');
@@ -586,7 +589,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticTypeWarningCode.UNDEFINED_METHOD,
     ]);
 
@@ -607,7 +610,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticTypeWarningCode.UNDEFINED_METHOD,
     ]);
     _assertUnresolvedMethodInvocation('foo(0);');
@@ -622,7 +625,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticTypeWarningCode.UNDEFINED_METHOD,
     ]);
 
@@ -637,7 +640,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticTypeWarningCode.UNDEFINED_METHOD,
     ]);
     _assertUnresolvedMethodInvocation('C.T();');
@@ -650,7 +653,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticTypeWarningCode.UNDEFINED_METHOD,
     ]);
     _assertUnresolvedMethodInvocation('foo(0);');
@@ -664,7 +667,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticTypeWarningCode.UNDEFINED_METHOD,
     ]);
     _assertUnresolvedMethodInvocation('foo(0);');
@@ -679,7 +682,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticTypeWarningCode.UNDEFINED_METHOD,
     ]);
     _assertUnresolvedMethodInvocation('foo(0);');
@@ -692,7 +695,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticTypeWarningCode.UNDEFINED_METHOD,
     ]);
   }
@@ -724,7 +727,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticTypeWarningCode.UNDEFINED_METHOD,
     ]);
     _assertUnresolvedMethodInvocation('_foo(0);');
@@ -741,7 +744,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticTypeWarningCode.UNDEFINED_METHOD,
     ]);
   }
@@ -756,7 +759,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticTypeWarningCode.UNDEFINED_METHOD,
     ]);
   }
@@ -772,7 +775,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticTypeWarningCode.UNDEFINED_SUPER_METHOD,
     ]);
     _assertUnresolvedMethodInvocation('foo(0);');
@@ -792,7 +795,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticTypeWarningCode.UNQUALIFIED_REFERENCE_TO_NON_LOCAL_STATIC_MEMBER,
     ]);
 
@@ -816,7 +819,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.URI_DOES_NOT_EXIST,
     ]);
     _assertUnresolvedMethodInvocation('foo(1);');
@@ -836,7 +839,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.URI_DOES_NOT_EXIST,
     ]);
     _assertUnresolvedMethodInvocation('foo(1);');
@@ -854,7 +857,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticWarningCode.USE_OF_VOID_RESULT,
     ]);
     _assertInvalidInvocation(
@@ -873,7 +876,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticWarningCode.USE_OF_VOID_RESULT,
     ]);
     _assertInvalidInvocation(
@@ -892,7 +895,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticWarningCode.USE_OF_VOID_RESULT,
     ]);
     assertMethodInvocation(
@@ -911,7 +914,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticWarningCode.USE_OF_VOID_RESULT,
     ]);
     _assertInvalidInvocation(
@@ -930,7 +933,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticWarningCode.USE_OF_VOID_RESULT,
     ]);
     // TODO(scheglov) Resolve fully, or don't resolve at all.
@@ -949,7 +952,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticWarningCode.USE_OF_VOID_RESULT,
     ]);
     // TODO(scheglov) Resolve fully, or don't resolve at all.
@@ -968,7 +971,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticWarningCode.USE_OF_VOID_RESULT,
     ]);
     // TODO(scheglov) Resolve fully, or don't resolve at all.
@@ -988,7 +991,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD,
     ]);
     assertMethodInvocation(
@@ -1008,7 +1011,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       StaticTypeWarningCode.WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD,
     ]);
     assertMethodInvocation(
@@ -1498,7 +1501,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.PREFIX_IDENTIFIER_NOT_FOLLOWED_BY_DOT,
     ]);
     assertElement(findNode.simple('math()'), findElement.prefix('math'));
diff --git a/pkg/analyzer/test/src/dart/resolution/mixin_test.dart b/pkg/analyzer/test/src/dart/resolution/mixin_test.dart
index 496f774..46ff61b 100644
--- a/pkg/analyzer/test/src/dart/resolution/mixin_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/mixin_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -150,7 +150,8 @@
 mixin M on A implements B {}
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_GENERIC_INTERFACES]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_GENERIC_INTERFACES]);
   }
 
   test_element() async {
@@ -237,7 +238,8 @@
 mixin as {}
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_NAME]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPE_NAME]);
   }
 
   test_error_builtInIdentifierAsTypeName_OK_on() async {
@@ -266,7 +268,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inClass_getter_method() async {
@@ -277,7 +280,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inClass_getter_setter() async {
@@ -288,7 +292,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inClass_method_getter() async {
@@ -299,7 +304,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inClass_method_method() async {
@@ -310,7 +316,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inClass_method_setter() async {
@@ -321,7 +328,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inClass_setter_getter() async {
@@ -332,7 +340,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inClass_setter_method() async {
@@ -343,7 +352,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inClass_setter_setter() async {
@@ -354,7 +364,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inConstraint_getter_getter() async {
@@ -367,7 +378,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inConstraint_getter_method() async {
@@ -380,7 +392,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inConstraint_getter_setter() async {
@@ -393,7 +406,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inConstraint_method_getter() async {
@@ -406,7 +420,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inConstraint_method_method() async {
@@ -419,7 +434,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inConstraint_method_setter() async {
@@ -432,7 +448,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inConstraint_setter_method() async {
@@ -445,7 +462,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inConstraint_setter_setter() async {
@@ -458,7 +476,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inInterface_getter_getter() async {
@@ -471,7 +490,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inInterface_getter_method() async {
@@ -484,7 +504,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inInterface_getter_setter() async {
@@ -497,7 +518,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inInterface_method_getter() async {
@@ -510,7 +532,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inInterface_method_method() async {
@@ -523,7 +546,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inInterface_method_setter() async {
@@ -536,7 +560,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inInterface_setter_method() async {
@@ -549,7 +574,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingStaticAndInstance_inInterface_setter_setter() async {
@@ -562,7 +588,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.CONFLICTING_STATIC_AND_INSTANCE]);
   }
 
   test_error_conflictingTypeVariableAndClass() async {
@@ -570,7 +597,7 @@
 mixin M<M> {}
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_CLASS,
     ]);
   }
@@ -582,7 +609,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER,
     ]);
   }
@@ -594,7 +621,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER,
     ]);
   }
@@ -606,7 +633,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER,
     ]);
   }
@@ -618,7 +645,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER,
     ]);
   }
@@ -630,7 +657,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.CONFLICTING_TYPE_VARIABLE_AND_MEMBER,
     ]);
   }
@@ -643,7 +670,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+    assertTestErrorsWithCodes([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_error_duplicateDefinition_field_method() async {
@@ -654,7 +681,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+    assertTestErrorsWithCodes([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_error_duplicateDefinition_getter() async {
@@ -665,7 +692,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+    assertTestErrorsWithCodes([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_error_duplicateDefinition_getter_method() async {
@@ -676,7 +703,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+    assertTestErrorsWithCodes([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_error_duplicateDefinition_method() async {
@@ -687,7 +714,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+    assertTestErrorsWithCodes([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_error_duplicateDefinition_method_getter() async {
@@ -698,7 +725,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+    assertTestErrorsWithCodes([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_error_duplicateDefinition_setter() async {
@@ -709,7 +736,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
+    assertTestErrorsWithCodes([CompileTimeErrorCode.DUPLICATE_DEFINITION]);
   }
 
   test_error_finalNotInitialized() async {
@@ -719,7 +746,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([StaticWarningCode.FINAL_NOT_INITIALIZED]);
+    assertTestErrorsWithCodes([StaticWarningCode.FINAL_NOT_INITIALIZED]);
   }
 
   test_error_finalNotInitialized_OK() async {
@@ -740,7 +767,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR,
       StaticWarningCode.FINAL_NOT_INITIALIZED_CONSTRUCTOR_1,
     ]);
@@ -754,7 +781,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR]);
 
     var element = findElement.mixin('M');
     var constructorElement = element.constructors.single;
@@ -775,7 +803,7 @@
     var mathImport = findElement.import('dart:math');
     var randomElement = mathImport.importedLibrary.getType('Random');
 
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.IMPLEMENTS_DEFERRED_CLASS,
     ]);
 
@@ -793,7 +821,7 @@
 ''');
     await resolveTestFile();
 
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.IMPLEMENTS_DISALLOWED_CLASS,
     ]);
 
@@ -810,7 +838,7 @@
 ''');
     await resolveTestFile();
 
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.IMPLEMENTS_NON_CLASS,
       ParserErrorCode.EXPECTED_TYPE_NAME,
     ]);
@@ -829,7 +857,7 @@
 ''');
     await resolveTestFile();
     CompileTimeErrorCode.IMPLEMENTS_REPEATED;
-    assertTestErrors([CompileTimeErrorCode.IMPLEMENTS_REPEATED]);
+    assertTestErrorsWithCodes([CompileTimeErrorCode.IMPLEMENTS_REPEATED]);
   }
 
   test_error_memberWithClassName_getter() async {
@@ -839,7 +867,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
+    assertTestErrorsWithCodes([CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
   }
 
   test_error_memberWithClassName_getter_static() async {
@@ -849,7 +877,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
+    assertTestErrorsWithCodes([CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
   }
 
   test_error_memberWithClassName_setter() async {
@@ -859,7 +887,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
+    assertTestErrorsWithCodes([CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
   }
 
   test_error_memberWithClassName_setter_static() async {
@@ -869,7 +897,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
+    assertTestErrorsWithCodes([CompileTimeErrorCode.MEMBER_WITH_CLASS_NAME]);
   }
 
   test_error_mixinApplicationConcreteSuperInvokedMemberType_method() async {
@@ -895,7 +923,7 @@
 abstract class X extends B with M {}
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.MIXIN_APPLICATION_CONCRETE_SUPER_INVOKED_MEMBER_TYPE,
     ]);
   }
@@ -933,7 +961,7 @@
 abstract class X extends A with M {}
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.MIXIN_APPLICATION_NO_CONCRETE_SUPER_INVOKED_MEMBER,
     ]);
   }
@@ -957,7 +985,7 @@
 class X extends A with M1, M2 {}
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.MIXIN_APPLICATION_NO_CONCRETE_SUPER_INVOKED_MEMBER
     ]);
   }
@@ -977,7 +1005,7 @@
 class X extends A with M {}
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.MIXIN_APPLICATION_NO_CONCRETE_SUPER_INVOKED_MEMBER
     ]);
   }
@@ -997,7 +1025,7 @@
 abstract class X extends A with M {}
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.MIXIN_APPLICATION_NO_CONCRETE_SUPER_INVOKED_MEMBER,
     ]);
   }
@@ -1147,7 +1175,7 @@
 abstract class X extends A with M {}
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.MIXIN_APPLICATION_NO_CONCRETE_SUPER_INVOKED_MEMBER,
     ]);
   }
@@ -1161,7 +1189,7 @@
 class X = Object with M;
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE,
     ]);
   }
@@ -1175,7 +1203,7 @@
 class X = A<double> with M;
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE,
     ]);
   }
@@ -1199,7 +1227,7 @@
 class X = C with M;
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE,
     ]);
   }
@@ -1265,7 +1293,7 @@
 class X = C with M;
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.MIXIN_APPLICATION_NOT_IMPLEMENTED_INTERFACE,
     ]);
   }
@@ -1279,7 +1307,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR]);
 
     // Even though it is an error for a mixin to declare a constructor,
     // we still build elements for constructors, and resolve them.
@@ -1310,7 +1339,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.MIXIN_INSTANTIATE]);
+    assertTestErrorsWithCodes([CompileTimeErrorCode.MIXIN_INSTANTIATE]);
 
     var creation = findNode.instanceCreation('M();');
     var m = findElement.mixin('M');
@@ -1328,7 +1357,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.MIXIN_DECLARES_CONSTRUCTOR,
       CompileTimeErrorCode.MIXIN_INSTANTIATE,
     ]);
@@ -1347,7 +1376,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.MIXIN_INSTANTIATE,
     ]);
 
@@ -1365,7 +1394,7 @@
     var mathImport = findElement.import('dart:math');
     var randomElement = mathImport.importedLibrary.getType('Random');
 
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.MIXIN_SUPER_CLASS_CONSTRAINT_DEFERRED_CLASS,
     ]);
 
@@ -1383,7 +1412,7 @@
 ''');
     await resolveTestFile();
 
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.MIXIN_SUPER_CLASS_CONSTRAINT_DISALLOWED_CLASS,
     ]);
 
@@ -1400,7 +1429,7 @@
 ''');
     await resolveTestFile();
 
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.MIXIN_SUPER_CLASS_CONSTRAINT_NON_INTERFACE,
     ]);
 
@@ -1418,7 +1447,7 @@
 ''');
     await resolveTestFile();
 
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.MIXIN_SUPER_CLASS_CONSTRAINT_NON_INTERFACE,
     ]);
 
@@ -1435,7 +1464,7 @@
 ''');
     await resolveTestFile();
 
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.MIXIN_SUPER_CLASS_CONSTRAINT_NON_INTERFACE,
       ParserErrorCode.EXPECTED_TYPE_NAME,
     ]);
@@ -1467,7 +1496,7 @@
 ''');
     await resolveTestFile();
     CompileTimeErrorCode.IMPLEMENTS_REPEATED;
-    assertTestErrors([CompileTimeErrorCode.ON_REPEATED]);
+    assertTestErrorsWithCodes([CompileTimeErrorCode.ON_REPEATED]);
   }
 
   test_error_undefinedSuperMethod() async {
@@ -1481,7 +1510,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([StaticTypeWarningCode.UNDEFINED_SUPER_METHOD]);
+    assertTestErrorsWithCodes([StaticTypeWarningCode.UNDEFINED_SUPER_METHOD]);
 
     var invocation = findNode.methodInvocation('foo(42)');
     assertElementNull(invocation.methodName);
@@ -1562,7 +1591,7 @@
 mixin M implements A, B {}
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.INCONSISTENT_INHERITANCE,
     ]);
   }
@@ -1578,7 +1607,7 @@
 mixin M implements A, B {}
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.INCONSISTENT_INHERITANCE,
     ]);
   }
@@ -1594,7 +1623,7 @@
 mixin M implements A, B {}
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.INCONSISTENT_INHERITANCE,
     ]);
   }
@@ -1610,7 +1639,7 @@
 mixin M on A, B {}
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.INCONSISTENT_INHERITANCE,
     ]);
   }
@@ -1626,7 +1655,7 @@
 mixin M on A, B {}
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.INCONSISTENT_INHERITANCE,
     ]);
   }
@@ -1642,7 +1671,7 @@
 mixin M on A, B {}
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.INCONSISTENT_INHERITANCE,
     ]);
   }
@@ -1658,7 +1687,7 @@
 mixin M implements A, B {}
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.INCONSISTENT_INHERITANCE_GETTER_AND_METHOD,
     ]);
   }
@@ -1674,7 +1703,7 @@
 mixin M implements A, B {}
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.INCONSISTENT_INHERITANCE_GETTER_AND_METHOD,
     ]);
   }
@@ -1690,7 +1719,7 @@
 mixin M implements A, B {}
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.INCONSISTENT_INHERITANCE_GETTER_AND_METHOD,
     ]);
   }
@@ -1706,7 +1735,7 @@
 mixin M implements A, B {}
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.INCONSISTENT_INHERITANCE_GETTER_AND_METHOD,
     ]);
   }
@@ -1726,7 +1755,7 @@
 abstract class X extends A with U1, U2, M {}
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.MIXIN_APPLICATION_NO_CONCRETE_SUPER_INVOKED_MEMBER,
       CompileTimeErrorCode.MIXIN_OF_NON_CLASS,
       CompileTimeErrorCode.MIXIN_OF_NON_CLASS,
@@ -1827,7 +1856,7 @@
 mixin A implements B {}
 mixin B implements A {}''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE
     ]);
@@ -1838,7 +1867,7 @@
 mixin A on B {}
 mixin B on A {}''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE,
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE
     ]);
@@ -1849,7 +1878,7 @@
 mixin A on A {}
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.RECURSIVE_INTERFACE_INHERITANCE_ON,
     ]);
   }
diff --git a/pkg/analyzer/test/src/dart/resolution/non_nullable_test.dart b/pkg/analyzer/test/src/dart/resolution/non_nullable_test.dart
index 0616164..820678a 100644
--- a/pkg/analyzer/test/src/dart/resolution/non_nullable_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/non_nullable_test.dart
@@ -1,8 +1,9 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/dart/error/syntactic_errors.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -11,13 +12,13 @@
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(NonNullableTest);
+    defineReflectiveTests(NullableTest);
   });
 }
 
 @reflectiveTest
 class NonNullableTest extends DriverResolutionTest {
-  static const _migrated = "@pragma('analyzer:non-nullable') library test;";
-
+  // TODO(danrubel): Implement a more fine grained way to specify non-nullable.
   @override
   AnalysisOptionsImpl get analysisOptions =>
       AnalysisOptionsImpl()..enabledExperiments = [EnableString.non_nullable];
@@ -25,41 +26,8 @@
   @override
   bool get typeToStringWithNullability => true;
 
-  test_class_hierarchy() async {
-    addTestFile('''
-class A {}
-
-class X1 extends A {} // 1
-class X2 implements A {} // 2
-class X3 with A {} // 3
-''');
-    await resolveTestFile();
-    assertNoTestErrors();
-
-    assertType(findNode.typeName('A {} // 1'), 'A!');
-    assertType(findNode.typeName('A {} // 2'), 'A!');
-    assertType(findNode.typeName('A {} // 3'), 'A!');
-  }
-
-  test_classTypeAlias_hierarchy() async {
-    addTestFile('''
-class A {}
-class B {}
-class C {}
-
-class X = A with B implements C;
-''');
-    await resolveTestFile();
-    assertNoTestErrors();
-
-    assertType(findNode.typeName('A with'), 'A!');
-    assertType(findNode.typeName('B implements'), 'B!');
-    assertType(findNode.typeName('C;'), 'C!');
-  }
-
   test_local_parameter_interfaceType() async {
     addTestFile('''
-$_migrated
 main() {
   f(int? a, int b) {}
 }
@@ -68,12 +36,11 @@
     assertNoTestErrors();
 
     assertType(findNode.typeName('int? a'), 'int?');
-    assertType(findNode.typeName('int b'), 'int!');
+    assertType(findNode.typeName('int b'), 'int');
   }
 
   test_local_returnType_interfaceType() async {
     addTestFile('''
-$_migrated
 main() {
   int? f() => 0;
   int g() => 0;
@@ -83,13 +50,12 @@
     assertNoTestErrors();
 
     assertType(findNode.typeName('int? f'), 'int?');
-    assertType(findNode.typeName('int g'), 'int!');
+    assertType(findNode.typeName('int g'), 'int');
   }
 
   @failingTest
   test_local_variable_genericFunctionType() async {
     addTestFile('''
-$_migrated
 main() {
   int? Function(bool, String?)? a;
 }
@@ -105,7 +71,6 @@
 
   test_local_variable_interfaceType() async {
     addTestFile('''
-$_migrated
 main() {
   int? a = 0;
   int b = 0;
@@ -115,12 +80,11 @@
     assertNoTestErrors();
 
     assertType(findNode.typeName('int? a'), 'int?');
-    assertType(findNode.typeName('int b'), 'int!');
+    assertType(findNode.typeName('int b'), 'int');
   }
 
   test_local_variable_interfaceType_generic() async {
     addTestFile('''
-$_migrated
 main() {
   List<int?>? a = [];
   List<int>? b = [];
@@ -132,29 +96,13 @@
     assertNoTestErrors();
 
     assertType(findNode.typeName('List<int?>? a'), 'List<int?>?');
-    assertType(findNode.typeName('List<int>? b'), 'List<int!>?');
-    assertType(findNode.typeName('List<int?> c'), 'List<int?>!');
-    assertType(findNode.typeName('List<int> d'), 'List<int!>!');
-  }
-
-  test_local_variable_interfaceType_notMigrated() async {
-    addTestFile('''
-main() {
-  int? a = 0;
-  int b = 0;
-}
-''');
-    await resolveTestFile();
-    assertNoTestErrors();
-
-    assertType(findNode.typeName('int? a'), 'int?');
-    assertType(findNode.typeName('int b'), 'int*');
+    assertType(findNode.typeName('List<int>? b'), 'List<int>?');
+    assertType(findNode.typeName('List<int?> c'), 'List<int?>');
+    assertType(findNode.typeName('List<int> d'), 'List<int>');
   }
 
   test_local_variable_typeParameter() async {
     addTestFile('''
-$_migrated
-
 class A<T> {
   main(T a) {
     T? b;
@@ -164,28 +112,24 @@
     await resolveTestFile();
     assertNoTestErrors();
 
-    assertType(findNode.typeName('T a'), 'T!');
+    assertType(findNode.typeName('T a'), 'T');
     assertType(findNode.typeName('T? b'), 'T?');
   }
 
-  test_mixin_hierarchy() async {
+  test_null_assertion_operator_removes_nullability() async {
     addTestFile('''
-class A {}
-
-mixin X1 on A {} // 1
-mixin X2 implements A {} // 2
+main() {
+  Object? x = null;
+  x!;
+}
 ''');
     await resolveTestFile();
     assertNoTestErrors();
-
-    assertType(findNode.typeName('A {} // 1'), 'A!');
-    assertType(findNode.typeName('A {} // 2'), 'A!');
+    assertType(findNode.postfix('x!'), 'Object');
   }
 
   test_typedef_classic() async {
     addTestFile('''
-$_migrated
-
 typedef int? F(bool a, String? b);
 
 main() {
@@ -195,14 +139,12 @@
     await resolveTestFile();
     assertNoTestErrors();
 
-    assertType(findNode.typeName('F? a'), '(bool!, String?) → int??');
+    assertType(findNode.typeName('F? a'), '(bool, String?) → int??');
   }
 
   @failingTest
   test_typedef_function() async {
     addTestFile('''
-$_migrated
-
 typedef F<T> = int? Function(bool, T, T?);
 
 main() {
@@ -218,3 +160,69 @@
     );
   }
 }
+
+@reflectiveTest
+class NullableTest extends DriverResolutionTest {
+  @override
+  bool get typeToStringWithNullability => true;
+
+  test_class_hierarchy() async {
+    addTestFile('''
+class A {}
+
+class X1 extends A {} // 1
+class X2 implements A {} // 2
+class X3 with A {} // 3
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    assertType(findNode.typeName('A {} // 1'), 'A');
+    assertType(findNode.typeName('A {} // 2'), 'A');
+    assertType(findNode.typeName('A {} // 3'), 'A');
+  }
+
+  test_classTypeAlias_hierarchy() async {
+    addTestFile('''
+class A {}
+class B {}
+class C {}
+
+class X = A with B implements C;
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    assertType(findNode.typeName('A with'), 'A');
+    assertType(findNode.typeName('B implements'), 'B');
+    assertType(findNode.typeName('C;'), 'C');
+  }
+
+  test_local_variable_interfaceType_notMigrated() async {
+    addTestFile('''
+main() {
+  int? a = 0;
+  int b = 0;
+}
+''');
+    await resolveTestFile();
+    assertTestErrorsWithCodes([ParserErrorCode.EXPERIMENT_NOT_ENABLED]);
+
+    assertType(findNode.typeName('int? a'), 'int*');
+    assertType(findNode.typeName('int b'), 'int*');
+  }
+
+  test_mixin_hierarchy() async {
+    addTestFile('''
+class A {}
+
+mixin X1 on A {} // 1
+mixin X2 implements A {} // 2
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+
+    assertType(findNode.typeName('A {} // 1'), 'A');
+    assertType(findNode.typeName('A {} // 2'), 'A');
+  }
+}
diff --git a/pkg/analyzer/test/src/dart/resolution/optional_const_test.dart b/pkg/analyzer/test/src/dart/resolution/optional_const_test.dart
index df32638..895ec43 100644
--- a/pkg/analyzer/test/src/dart/resolution/optional_const_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/optional_const_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/resolution/property_access_test.dart b/pkg/analyzer/test/src/dart/resolution/property_access_test.dart
index c127e27..dcc2d69 100644
--- a/pkg/analyzer/test/src/dart/resolution/property_access_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/property_access_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -28,7 +28,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.ABSTRACT_SUPER_MEMBER_REFERENCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.ABSTRACT_SUPER_MEMBER_REFERENCE]);
 
     var access = findNode.propertyAccess('foo; // ref');
     assertPropertyAccess(access, findElement.getter('foo', of: 'A'), 'int');
@@ -68,7 +69,8 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([CompileTimeErrorCode.ABSTRACT_SUPER_MEMBER_REFERENCE]);
+    assertTestErrorsWithCodes(
+        [CompileTimeErrorCode.ABSTRACT_SUPER_MEMBER_REFERENCE]);
 
     var access = findNode.propertyAccess('foo = v; // ref');
     assertPropertyAccess(
diff --git a/pkg/analyzer/test/src/dart/resolution/resolution.dart b/pkg/analyzer/test/src/dart/resolution/resolution.dart
index be8eb31..b713264 100644
--- a/pkg/analyzer/test/src/dart/resolution/resolution.dart
+++ b/pkg/analyzer/test/src/dart/resolution/resolution.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -42,6 +42,10 @@
 
   Element get dynamicElement => typeProvider.dynamicType.element;
 
+  bool get enableUnusedElement => false;
+
+  bool get enableUnusedLocalVariable => false;
+
   ClassElement get intElement => typeProvider.intType.element;
 
   InterfaceType get intType => typeProvider.intType;
@@ -62,6 +66,8 @@
   /// Whether `DartType.toString()` with nullability should be asked.
   bool get typeToStringWithNullability => false;
 
+  VoidType get voidType => VoidTypeImpl.instance;
+
   void addTestFile(String content) {
     newFile('/test/lib/test.dart', content: content);
   }
@@ -144,15 +150,28 @@
     expect(element.enclosingElement, expectedEnclosing);
   }
 
-  bool get enableUnusedLocalVariable => false;
+  Future<void> assertErrorCodesInCode(
+      String code, List<ErrorCode> errors) async {
+    addTestFile(code);
+    await resolveTestFile();
+    assertTestErrorsWithCodes(errors);
+  }
 
-  bool get enableUnusedElement => false;
+  Future<void> assertErrorsInCode(
+      String code, List<ExpectedError> expectedErrors) async {
+    addTestFile(code);
+    await resolveTestFile();
+
+    GatheringErrorListener errorListener = new GatheringErrorListener();
+    errorListener.addAll(result.errors);
+    errorListener.assertErrors(expectedErrors);
+  }
 
   /**
    * Assert that the number of error codes in reported [errors] matches the
    * number of [expected] error codes. The order of errors is ignored.
    */
-  void assertErrors(List<AnalysisError> errors,
+  void assertErrorsWithCodes(List<AnalysisError> errors,
       [List<ErrorCode> expected = const <ErrorCode>[]]) {
     var errorListener = new GatheringErrorListener();
     for (AnalysisError error in result.errors) {
@@ -173,12 +192,6 @@
     errorListener.assertErrorsWithCodes(expected);
   }
 
-  Future<void> assertErrorsInCode(String code, List<ErrorCode> errors) async {
-    addTestFile(code);
-    await resolveTestFile();
-    assertTestErrors(errors);
-  }
-
   void assertHasTestErrors() {
     expect(result.errors, isNotEmpty);
   }
@@ -317,7 +330,7 @@
   }
 
   void assertNoTestErrors() {
-    assertTestErrors(const <ErrorCode>[]);
+    assertTestErrorsWithCodes(const <ErrorCode>[]);
   }
 
   void assertPropertyAccess(
@@ -336,8 +349,8 @@
 //    assertTypeNull(superExpression);
   }
 
-  void assertTestErrors(List<ErrorCode> expected) {
-    assertErrors(result.errors, expected);
+  void assertTestErrorsWithCodes(List<ErrorCode> expected) {
+    assertErrorsWithCodes(result.errors, expected);
   }
 
   void assertTopGetRef(String search, String name) {
@@ -390,6 +403,9 @@
     expect(node.staticType, isNull);
   }
 
+  ExpectedError error(ErrorCode code, int offset, int length) =>
+      new ExpectedError(code, offset, length);
+
   Element getNodeElement(AstNode node) {
     if (node is Annotation) {
       return node.element;
diff --git a/pkg/analyzer/test/src/dart/resolution/test_all.dart b/pkg/analyzer/test/src/dart/resolution/test_all.dart
index d8c0076..ccbc919 100644
--- a/pkg/analyzer/test/src/dart/resolution/test_all.dart
+++ b/pkg/analyzer/test/src/dart/resolution/test_all.dart
@@ -1,49 +1,57 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'assignment_test.dart' as assignment_test;
-import 'class_test.dart' as class_test;
-import 'comment_test.dart' as comment_test;
-import 'constant_test.dart' as constant_test;
-import 'enum_test.dart' as enum_test;
-import 'flow_analysis_test.dart' as flow_analysis_test;
-import 'for_in_test.dart' as for_in_test;
-import 'generic_type_alias_test.dart' as generic_type_alias_test;
-import 'import_prefix_test.dart' as import_prefix_test;
-import 'instance_creation_test.dart' as instance_creation_test;
+import 'assignment_test.dart' as assignment;
+import 'class_alias_test.dart' as class_alias;
+import 'class_test.dart' as class_resolution;
+import 'comment_test.dart' as comment;
+import 'constant_test.dart' as constant;
+import 'definite_assignment_test.dart' as definite_assignment;
+import 'enum_test.dart' as enum_resolution;
+import 'flow_analysis_test.dart' as flow_analysis;
+import 'for_element_test.dart' as for_element;
+import 'for_in_test.dart' as for_in;
+import 'generic_type_alias_test.dart' as generic_type_alias;
+import 'import_prefix_test.dart' as import_prefix;
+import 'instance_creation_test.dart' as instance_creation;
 import 'instance_member_inference_class_test.dart'
-    as instance_member_inference_class_test;
+    as instance_member_inference_class;
 import 'instance_member_inference_mixin_test.dart'
-    as instance_member_inference_mixin_test;
-import 'method_invocation_test.dart' as method_invocation_test;
-import 'mixin_test.dart' as mixin_test;
-import 'non_nullable_test.dart' as non_nullable_test;
-import 'optional_const_test.dart' as optional_const_test;
-import 'property_access_test.dart' as property_access_test;
-import 'top_type_inference_test.dart' as top_type_inference_test;
+    as instance_member_inference_mixin;
+import 'method_invocation_test.dart' as method_invocation;
+import 'mixin_test.dart' as mixin_resolution;
+import 'non_nullable_test.dart' as non_nullable;
+import 'optional_const_test.dart' as optional_const;
+import 'property_access_test.dart' as property_access;
+import 'top_type_inference_test.dart' as top_type_inference;
+import 'type_inference/test_all.dart' as type_inference;
 
 main() {
   defineReflectiveSuite(() {
-    assignment_test.main();
-    class_test.main();
-    comment_test.main();
-    constant_test.main();
-    enum_test.main();
-    flow_analysis_test.main();
-    for_in_test.main();
-    generic_type_alias_test.main();
-    import_prefix_test.main();
-    instance_creation_test.main();
-    instance_member_inference_class_test.main();
-    instance_member_inference_mixin_test.main();
-    method_invocation_test.main();
-    mixin_test.main();
-    non_nullable_test.main();
-    optional_const_test.main();
-    property_access_test.main();
-    top_type_inference_test.main();
+    assignment.main();
+    class_alias.main();
+    class_resolution.main();
+    comment.main();
+    constant.main();
+    definite_assignment.main();
+    enum_resolution.main();
+    flow_analysis.main();
+    for_element.main();
+    for_in.main();
+    generic_type_alias.main();
+    import_prefix.main();
+    instance_creation.main();
+    instance_member_inference_class.main();
+    instance_member_inference_mixin.main();
+    method_invocation.main();
+    mixin_resolution.main();
+    non_nullable.main();
+    optional_const.main();
+    property_access.main();
+    top_type_inference.main();
+    type_inference.main();
   }, name: 'resolution');
 }
diff --git a/pkg/analyzer/test/src/dart/resolution/top_type_inference_test.dart b/pkg/analyzer/test/src/dart/resolution/top_type_inference_test.dart
index cdb193e..65de6ba 100644
--- a/pkg/analyzer/test/src/dart/resolution/top_type_inference_test.dart
+++ b/pkg/analyzer/test/src/dart/resolution/top_type_inference_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -41,7 +41,7 @@
 final b = new A().a;
 ''');
     await resolveTestFile();
-    assertTestErrors([StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
+    assertTestErrorsWithCodes([StrongModeCode.TOP_LEVEL_INSTANCE_GETTER]);
 
     assertElementTypeDynamic(findElement.field('a').type);
     assertElementTypeDynamic(findElement.topVar('b').type);
diff --git a/pkg/analyzer/test/src/dart/resolution/type_inference/list_literal_test.dart b/pkg/analyzer/test/src/dart/resolution/type_inference/list_literal_test.dart
new file mode 100644
index 0000000..1f90c94
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/resolution/type_inference/list_literal_test.dart
@@ -0,0 +1,333 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ListLiteralTest);
+    defineReflectiveTests(ListLiteralWithFlowControlAndSpreadCollectionsTest);
+  });
+}
+
+@reflectiveTest
+class ListLiteralTest extends DriverResolutionTest {
+  test_context_noTypeArgs_expression_conflict() async {
+    addTestFile('''
+List<int> a = ['a'];
+''');
+    await resolveTestFile();
+    assertType(findNode.listLiteral('['), 'List<int>');
+  }
+
+  test_context_noTypeArgs_expression_noConflict() async {
+    addTestFile('''
+List<int> a = [1];
+''');
+    await resolveTestFile();
+    assertType(findNode.listLiteral('['), 'List<int>');
+  }
+
+  test_context_noTypeArgs_noElements() async {
+    addTestFile('''
+List<String> a = [];
+''');
+    await resolveTestFile();
+    assertType(findNode.listLiteral('['), 'List<String>');
+  }
+
+  test_context_noTypeArgs_noElements_typeParameter() async {
+    addTestFile('''
+class A<E extends List<int>> {
+  E a = [];
+}
+''');
+    await resolveTestFile();
+    assertType(findNode.listLiteral('['), 'List<dynamic>');
+  }
+
+  test_context_noTypeArgs_noElements_typeParameter_dynamic() async {
+    addTestFile('''
+class A<E extends List<dynamic>> {
+  E a = [];
+}
+''');
+    await resolveTestFile();
+    assertType(findNode.listLiteral('['), 'List<dynamic>');
+  }
+
+  test_context_typeArgs_expression_conflictingContext() async {
+    addTestFile('''
+List<String> a = <int>[0];
+''');
+    await resolveTestFile();
+    assertType(findNode.listLiteral('['), 'List<int>');
+  }
+
+  test_context_typeArgs_expression_conflictingExpression() async {
+    addTestFile('''
+List<String> a = <String>[0];
+''');
+    await resolveTestFile();
+    assertType(findNode.listLiteral('['), 'List<String>');
+  }
+
+  @failingTest
+  test_context_typeArgs_expression_conflictingTypeArgs() async {
+    // Context type and element types both suggest `String`, so this should
+    // override the explicit type argument.
+    addTestFile('''
+List<String> a = <int>['a'];
+''');
+    await resolveTestFile();
+    assertType(findNode.listLiteral('['), 'List<String>');
+  }
+
+  test_context_typeArgs_expression_noConflict() async {
+    addTestFile('''
+List<String> a = <String>['a'];
+''');
+    await resolveTestFile();
+    assertType(findNode.listLiteral('['), 'List<String>');
+  }
+
+  test_context_typeArgs_noElements_conflict() async {
+    addTestFile('''
+List<String> a = <int>[];
+''');
+    await resolveTestFile();
+    assertType(findNode.listLiteral('['), 'List<int>');
+  }
+
+  test_context_typeArgs_noElements_noConflict() async {
+    addTestFile('''
+List<String> a = <String>[];
+''');
+    await resolveTestFile();
+    assertType(findNode.listLiteral('['), 'List<String>');
+  }
+
+  test_noContext_noTypeArgs_expressions_lubOfInt() async {
+    addTestFile('''
+var a = [1, 2, 3];
+''');
+    await resolveTestFile();
+    assertType(findNode.listLiteral('['), 'List<int>');
+  }
+
+  test_noContext_noTypeArgs_expressions_lubOfNum() async {
+    addTestFile('''
+var a = [1, 2.3, 4];
+''');
+    await resolveTestFile();
+    assertType(findNode.listLiteral('['), 'List<num>');
+  }
+
+  test_noContext_noTypeArgs_expressions_lubOfObject() async {
+    addTestFile('''
+var a = [1, '2', 3];
+''');
+    await resolveTestFile();
+    assertType(findNode.listLiteral('['), 'List<Object>');
+  }
+
+  test_noContext_noTypeArgs_noElements() async {
+    addTestFile('''
+var a = [];
+''');
+    await resolveTestFile();
+    assertType(findNode.listLiteral('['), 'List<dynamic>');
+  }
+
+  test_noContext_typeArgs_expression_conflict() async {
+    addTestFile('''
+var a = <String>[1];
+''');
+    await resolveTestFile();
+    assertType(findNode.listLiteral('['), 'List<String>');
+  }
+
+  test_noContext_typeArgs_expression_noConflict() async {
+    addTestFile('''
+var a = <int>[1];
+''');
+    await resolveTestFile();
+    assertType(findNode.listLiteral('['), 'List<int>');
+  }
+
+  @failingTest
+  test_noContext_typeArgs_expressions_conflict() async {
+    addTestFile('''
+var a = <int, String>[1, 2];
+''');
+    await resolveTestFile();
+    assertType(findNode.listLiteral('['), 'List<int>');
+  }
+
+  test_noContext_typeArgs_noElements() async {
+    addTestFile('''
+var a = <num>[];
+''');
+    await resolveTestFile();
+    assertType(findNode.listLiteral('['), 'List<num>');
+  }
+}
+
+@reflectiveTest
+class ListLiteralWithFlowControlAndSpreadCollectionsTest
+    extends ListLiteralTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections
+    ];
+
+  test_noContext_noTypeArgs_forEachWithDeclaration() async {
+    addTestFile('''
+List<int> c;
+var a = [for (int e in c) e * 2];
+''');
+    await resolveTestFile();
+    assertType(findNode.listLiteral('[for'), 'List<int>');
+  }
+
+  test_noContext_noTypeArgs_forEachWithIdentifier() async {
+    addTestFile('''
+List<int> c;
+int b;
+var a = [for (b in c) b * 2];
+''');
+    await resolveTestFile();
+    assertType(findNode.listLiteral('[for'), 'List<int>');
+  }
+
+  test_noContext_noTypeArgs_forWithDeclaration() async {
+    addTestFile('''
+var a = [for (var i = 0; i < 2; i++) i * 2];
+''');
+    await resolveTestFile();
+    assertType(findNode.listLiteral('[for'), 'List<int>');
+  }
+
+  test_noContext_noTypeArgs_forWithExpression() async {
+    addTestFile('''
+int i;
+var a = [for (i = 0; i < 2; i++) i * 2];
+''');
+    await resolveTestFile();
+    assertType(findNode.listLiteral('[for'), 'List<int>');
+  }
+
+  test_noContext_noTypeArgs_if() async {
+    addTestFile('''
+bool c = true;
+var a = [if (c) 1];
+''');
+    await resolveTestFile();
+    assertType(findNode.listLiteral('['), 'List<int>');
+  }
+
+  test_noContext_noTypeArgs_ifElse_lubOfInt() async {
+    addTestFile('''
+bool c = true;
+var a = [if (c) 1 else 2];
+''');
+    await resolveTestFile();
+    assertType(findNode.listLiteral('['), 'List<int>');
+  }
+
+  test_noContext_noTypeArgs_ifElse_lubOfNum() async {
+    addTestFile('''
+bool c = true;
+var a = [if (c) 1 else 2.3];
+''');
+    await resolveTestFile();
+    assertType(findNode.listLiteral('['), 'List<num>');
+  }
+
+  test_noContext_noTypeArgs_ifElse_lubOfObject() async {
+    addTestFile('''
+bool c = true;
+var a = [if (c) 1 else '2'];
+''');
+    await resolveTestFile();
+    assertType(findNode.listLiteral('['), 'List<Object>');
+  }
+
+  test_noContext_noTypeArgs_spread() async {
+    addTestFile('''
+List<int> c;
+var a = [...c];
+''');
+    await resolveTestFile();
+    assertType(findNode.listLiteral('[...'), 'List<int>');
+  }
+
+  test_noContext_noTypeArgs_spread_lubOfInt() async {
+    addTestFile('''
+List<int> c;
+List<int> b;
+var a = [...b, ...c];
+''');
+    await resolveTestFile();
+    assertType(findNode.listLiteral('[...'), 'List<int>');
+  }
+
+  test_noContext_noTypeArgs_spread_lubOfNum() async {
+    addTestFile('''
+List<int> c;
+List<double> b;
+var a = [...b, ...c];
+''');
+    await resolveTestFile();
+    assertType(findNode.listLiteral('[...'), 'List<num>');
+  }
+
+  test_noContext_noTypeArgs_spread_lubOfObject() async {
+    addTestFile('''
+List<int> c;
+List<String> b;
+var a = [...b, ...c];
+''');
+    await resolveTestFile();
+    assertType(findNode.listLiteral('[...'), 'List<Object>');
+  }
+
+  test_noContext_noTypeArgs_spread_nestedInIf_oneAmbiguous() async {
+    addTestFile('''
+List<int> c;
+dynamic d;
+var a = [if (0 < 1) ...c else ...d];
+''');
+    await resolveTestFile();
+    assertType(findNode.listLiteral('['), 'List<dynamic>');
+  }
+
+  test_noContext_noTypeArgs_spread_nullAware_nullAndNotNull() async {
+    addTestFile('''
+f() {
+  var futureNull = Future.value(null);
+  var a = [1, ...?await futureNull, 2];
+}
+''');
+    await resolveTestFile();
+    assertType(findNode.listLiteral('['), 'List<dynamic>');
+  }
+
+  test_noContext_noTypeArgs_spread_nullAware_onlyNull() async {
+    addTestFile('''
+f() {
+  var futureNull = Future.value(null);
+  var a = [...?await futureNull];
+}
+''');
+    await resolveTestFile();
+    assertType(findNode.listLiteral('['), 'List<Null>');
+  }
+}
diff --git a/pkg/analyzer/test/src/dart/resolution/type_inference/map_literal_test.dart b/pkg/analyzer/test/src/dart/resolution/type_inference/map_literal_test.dart
new file mode 100644
index 0000000..7c7d5cd
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/resolution/type_inference/map_literal_test.dart
@@ -0,0 +1,379 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(MapLiteralTest);
+    defineReflectiveTests(MapLiteralWithFlowControlAndSpreadCollectionsTest);
+  });
+}
+
+@reflectiveTest
+class MapLiteralTest extends DriverResolutionTest {
+  AstNode setOrMapLiteral(String search) => findNode.setOrMapLiteral(search);
+
+  test_context_noTypeArgs_entry_conflictingKey() async {
+    addTestFile('''
+Map<int, int> a = {'a' : 1};
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{'), 'Map<int, int>');
+  }
+
+  test_context_noTypeArgs_entry_conflictingValue() async {
+    addTestFile('''
+Map<int, int> a = {1 : 'a'};
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{'), 'Map<int, int>');
+  }
+
+  test_context_noTypeArgs_entry_noConflict() async {
+    addTestFile('''
+Map<int, int> a = {1 : 2};
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{'), 'Map<int, int>');
+  }
+
+  test_context_noTypeArgs_noEntries() async {
+    addTestFile('''
+Map<String, String> a = {};
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{'), 'Map<String, String>');
+  }
+
+  test_context_noTypeArgs_noEntries_typeParameters() async {
+    addTestFile('''
+class A<E extends Map<int, String>> {
+  E a = {};
+}
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{}'), 'Map<dynamic, dynamic>');
+  }
+
+  test_context_noTypeArgs_noEntries_typeParameters_dynamic() async {
+    addTestFile('''
+class A<E extends Map<dynamic, dynamic>> {
+  E a = {};
+}
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{}'), 'Map<dynamic, dynamic>');
+  }
+
+  test_context_typeArgs_entry_conflictingKey() async {
+    addTestFile('''
+Map<String, String> a = <String, String>{0 : 'a'};
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{'), 'Map<String, String>');
+  }
+
+  test_context_typeArgs_entry_conflictingValue() async {
+    addTestFile('''
+Map<String, String> a = <String, String>{'a' : 1};
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{'), 'Map<String, String>');
+  }
+
+  test_context_typeArgs_entry_noConflict() async {
+    addTestFile('''
+Map<String, String> a = <String, String>{'a' : 'b'};
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{'), 'Map<String, String>');
+  }
+
+  test_context_typeArgs_noEntries_conflict() async {
+    addTestFile('''
+Map<String, String> a = <int, int>{};
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{'), 'Map<int, int>');
+  }
+
+  test_context_typeArgs_noEntries_noConflict() async {
+    addTestFile('''
+Map<String, String> a = <String, String>{};
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{'), 'Map<String, String>');
+  }
+
+  test_default_constructor_param_typed() async {
+    addTestFile('''
+class C {
+  const C({x = const <String, int>{}});
+}
+''');
+    await resolveTestFile();
+  }
+
+  test_default_constructor_param_untyped() async {
+    addTestFile('''
+class C {
+  const C({x = const {}});
+}
+''');
+    await resolveTestFile();
+  }
+
+  test_noContext_noTypeArgs_expressions_lubOfIntAndString() async {
+    addTestFile('''
+var a = {1 : 'a', 2 : 'b', 3 : 'c'};
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{'), 'Map<int, String>');
+  }
+
+  test_noContext_noTypeArgs_expressions_lubOfNumAndNum() async {
+    addTestFile('''
+var a = {1 : 2, 3.0 : 4, 5 : 6.0};
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{'), 'Map<num, num>');
+  }
+
+  test_noContext_noTypeArgs_expressions_lubOfObjectAndObject() async {
+    addTestFile('''
+var a = {1 : '1', '2' : 2, 3 : '3'};
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{'), 'Map<Object, Object>');
+  }
+
+  test_noContext_noTypeArgs_noEntries() async {
+    addTestFile('''
+var a = {};
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{'), 'Map<dynamic, dynamic>');
+  }
+
+  test_noContext_typeArgs_entry_conflictingKey() async {
+    addTestFile('''
+var a = <String, int>{1 : 2};
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{'), 'Map<String, int>');
+  }
+
+  test_noContext_typeArgs_entry_conflictingValue() async {
+    addTestFile('''
+var a = <String, int>{'a' : 'b'};
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{'), 'Map<String, int>');
+  }
+
+  test_noContext_typeArgs_entry_noConflict() async {
+    addTestFile('''
+var a = <int, int>{1 : 2};
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{'), 'Map<int, int>');
+  }
+
+  test_noContext_typeArgs_expression_conflictingElement() async {
+    addTestFile('''
+var a = <int, String>{1};
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{'), 'Map<int, String>');
+  }
+
+  @failingTest
+  test_noContext_typeArgs_expressions_conflictingTypeArgs() async {
+    addTestFile('''
+var a = <int>{1 : 2, 3 : 4};
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{'), 'Map<int, int>');
+  }
+
+  test_noContext_typeArgs_noEntries() async {
+    addTestFile('''
+var a = <num, String>{};
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{'), 'Map<num, String>');
+  }
+}
+
+@reflectiveTest
+class MapLiteralWithFlowControlAndSpreadCollectionsTest extends MapLiteralTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections
+    ];
+
+  @override
+  AstNode setOrMapLiteral(String search) => findNode.setOrMapLiteral(search);
+
+  test_noContext_noTypeArgs_forEachWithDeclaration() async {
+    addTestFile('''
+List<int> c;
+var a = {for (int e in c) e : e * 2};
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{for'), 'Map<int, int>');
+  }
+
+  test_noContext_noTypeArgs_forEachWithIdentifier() async {
+    addTestFile('''
+List<int> c;
+int b;
+var a = {for (b in c) b * 2 : b};
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{for'), 'Map<int, int>');
+  }
+
+  test_noContext_noTypeArgs_forWithDeclaration() async {
+    addTestFile('''
+var a = {for (var i = 0; i < 2; i++) i : i * 2};
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{for'), 'Map<int, int>');
+  }
+
+  test_noContext_noTypeArgs_forWithExpression() async {
+    addTestFile('''
+int i;
+var a = {for (i = 0; i < 2; i++) i * 2 : i};
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{for'), 'Map<int, int>');
+  }
+
+  test_noContext_noTypeArgs_if() async {
+    addTestFile('''
+bool c = true;
+var a = {if (c) 1 : 2};
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{'), 'Map<int, int>');
+  }
+
+  test_noContext_noTypeArgs_ifElse_lubOfIntAndInt() async {
+    addTestFile('''
+bool c = true;
+var a = {if (c) 1 : 3 else 2 : 4};
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{'), 'Map<int, int>');
+  }
+
+  test_noContext_noTypeArgs_ifElse_lubOfNumAndNum() async {
+    addTestFile('''
+bool c = true;
+var a = {if (c) 1.0 : 3 else 2 : 4.0};
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{'), 'Map<num, num>');
+  }
+
+  test_noContext_noTypeArgs_ifElse_lubOfObjectAndObject() async {
+    addTestFile('''
+bool c = true;
+var a = {if (c) 1 : '1' else '2': 2 };
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{'), 'Map<Object, Object>');
+  }
+
+  test_noContext_noTypeArgs_spread() async {
+    addTestFile('''
+Map<int, int> c;
+var a = {...c};
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{...'), 'Map<int, int>');
+  }
+
+  test_noContext_noTypeArgs_spread_dynamic() async {
+    addTestFile('''
+var c = {};
+var a = {...c};
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{...'), 'Map<dynamic, dynamic>');
+  }
+
+  test_noContext_noTypeArgs_spread_lubOfIntAndInt() async {
+    addTestFile('''
+Map<int, int> c;
+Map<int, int> b;
+var a = {...b, ...c};
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{...'), 'Map<int, int>');
+  }
+
+  test_noContext_noTypeArgs_spread_lubOfNumAndNum() async {
+    addTestFile('''
+Map<int, double> c;
+Map<double, int> b;
+var a = {...b, ...c};
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{...'), 'Map<num, num>');
+  }
+
+  test_noContext_noTypeArgs_spread_lubOfObjectObject() async {
+    addTestFile('''
+Map<int, int> c;
+Map<String, String> b;
+var a = {...b, ...c};
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{...'), 'Map<Object, Object>');
+  }
+
+  test_noContext_noTypeArgs_spread_nestedInIf_oneAmbiguous() async {
+    addTestFile('''
+Map<String, int> c;
+dynamic d;
+var a = {if (0 < 1) ...c else ...d};
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{'), 'Map<dynamic, dynamic>');
+  }
+
+  @failingTest
+  test_noContext_noTypeArgs_spread_nullAware_nullAndNotNull() async {
+    addTestFile('''
+f() {
+  var futureNull = Future.value(null);
+  var a = {1 : 'a', ...?await futureNull, 2 : 'b'};
+}
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{1'), 'Map<int, String>');
+  }
+
+  test_noContext_noTypeArgs_spread_nullAware_onlyNull() async {
+    addTestFile('''
+f() {
+  var futureNull = Future.value(null);
+  var a = {...?await futureNull};
+}
+''');
+    await resolveTestFile();
+    assertType(setOrMapLiteral('{...'), 'dynamic');
+  }
+}
diff --git a/pkg/analyzer/test/src/dart/resolution/type_inference/set_literal_test.dart b/pkg/analyzer/test/src/dart/resolution/type_inference/set_literal_test.dart
new file mode 100644
index 0000000..b2da4b7
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/resolution/type_inference/set_literal_test.dart
@@ -0,0 +1,310 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(SetLiteralTest);
+    defineReflectiveTests(SetLiteralWithFlowControlAndSpreadCollectionsTest);
+  });
+}
+
+@reflectiveTest
+class SetLiteralTest extends DriverResolutionTest {
+  AstNode setLiteral(String search) => findNode.setOrMapLiteral(search);
+
+  test_context_noTypeArgs_expression_conflict() async {
+    addTestFile('''
+Set<int> a = {'a'};
+''');
+    await resolveTestFile();
+    assertType(setLiteral('{'), 'Set<int>');
+  }
+
+  test_context_noTypeArgs_expression_noConflict() async {
+    addTestFile('''
+Set<int> a = {1};
+''');
+    await resolveTestFile();
+    assertType(setLiteral('{'), 'Set<int>');
+  }
+
+  test_context_noTypeArgs_noElements() async {
+    addTestFile('''
+Set<String> a = {};
+''');
+    await resolveTestFile();
+    assertType(setLiteral('{'), 'Set<String>');
+  }
+
+  test_context_noTypeArgs_noElements_typeParameter() async {
+    addTestFile('''
+class A<E extends Set<int>> {
+  E a = {};
+}
+''');
+    await resolveTestFile();
+    assertType(setLiteral('{}'), 'Set<dynamic>');
+  }
+
+  test_context_noTypeArgs_noElements_typeParameter_dynamic() async {
+    addTestFile('''
+class A<E extends Set<dynamic>> {
+  E a = {};
+}
+''');
+    await resolveTestFile();
+    assertType(setLiteral('{}'), 'Set<dynamic>');
+  }
+
+  test_context_typeArgs_expression_conflictingExpression() async {
+    addTestFile('''
+Set<String> a = <String>{0};
+''');
+    await resolveTestFile();
+    assertType(setLiteral('{'), 'Set<String>');
+  }
+
+  @failingTest
+  test_context_typeArgs_expression_conflictingTypeArgs() async {
+    addTestFile('''
+Set<String> a = <int>{'a'};
+''');
+    await resolveTestFile();
+    assertType(setLiteral('{'), 'Set<String>');
+  }
+
+  test_context_typeArgs_expression_noConflict() async {
+    addTestFile('''
+Set<String> a = <String>{'a'};
+''');
+    await resolveTestFile();
+    assertType(setLiteral('{'), 'Set<String>');
+  }
+
+  test_context_typeArgs_noElements_conflict() async {
+    addTestFile('''
+Set<String> a = <int>{};
+''');
+    await resolveTestFile();
+    assertType(setLiteral('{'), 'Set<int>');
+  }
+
+  test_context_typeArgs_noElements_noConflict() async {
+    addTestFile('''
+Set<String> a = <String>{};
+''');
+    await resolveTestFile();
+    assertType(setLiteral('{'), 'Set<String>');
+  }
+
+  test_noContext_noTypeArgs_expressions_lubOfInt() async {
+    addTestFile('''
+var a = {1, 2, 3};
+''');
+    await resolveTestFile();
+    assertType(setLiteral('{'), 'Set<int>');
+  }
+
+  test_noContext_noTypeArgs_expressions_lubOfNum() async {
+    addTestFile('''
+var a = {1, 2.3, 4};
+''');
+    await resolveTestFile();
+    assertType(setLiteral('{'), 'Set<num>');
+  }
+
+  test_noContext_noTypeArgs_expressions_lubOfObject() async {
+    addTestFile('''
+var a = {1, '2', 3};
+''');
+    await resolveTestFile();
+    assertType(setLiteral('{'), 'Set<Object>');
+  }
+
+  test_noContext_typeArgs_expression_conflict() async {
+    addTestFile('''
+var a = <String>{1};
+''');
+    await resolveTestFile();
+    assertType(setLiteral('{'), 'Set<String>');
+  }
+
+  test_noContext_typeArgs_expression_noConflict() async {
+    addTestFile('''
+var a = <int>{1};
+''');
+    await resolveTestFile();
+    assertType(setLiteral('{'), 'Set<int>');
+  }
+
+  @failingTest
+  test_noContext_typeArgs_expressions_conflict() async {
+    addTestFile('''
+var a = <int, String>{1, 2};
+''');
+    await resolveTestFile();
+    assertType(setLiteral('{'), 'Set<int>');
+  }
+
+  test_noContext_typeArgs_noElements() async {
+    addTestFile('''
+var a = <num>{};
+''');
+    await resolveTestFile();
+    assertType(setLiteral('{'), 'Set<num>');
+  }
+}
+
+@reflectiveTest
+class SetLiteralWithFlowControlAndSpreadCollectionsTest extends SetLiteralTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections
+    ];
+
+  @override
+  AstNode setLiteral(String search) => findNode.setOrMapLiteral(search);
+
+  test_noContext_noTypeArgs_forEachWithDeclaration() async {
+    addTestFile('''
+List<int> c;
+var a = {for (int e in c) e * 2};
+''');
+    await resolveTestFile();
+    assertType(setLiteral('{for'), 'Set<int>');
+  }
+
+  test_noContext_noTypeArgs_forEachWithIdentifier() async {
+    addTestFile('''
+List<int> c;
+int b;
+var a = {for (b in c) b * 2};
+''');
+    await resolveTestFile();
+    assertType(setLiteral('{for'), 'Set<int>');
+  }
+
+  test_noContext_noTypeArgs_forWithDeclaration() async {
+    addTestFile('''
+var a = {for (var i = 0; i < 2; i++) i * 2};
+''');
+    await resolveTestFile();
+    assertType(setLiteral('{for'), 'Set<int>');
+  }
+
+  test_noContext_noTypeArgs_forWithExpression() async {
+    addTestFile('''
+int i;
+var a = {for (i = 0; i < 2; i++) i * 2};
+''');
+    await resolveTestFile();
+    assertType(setLiteral('{for'), 'Set<int>');
+  }
+
+  test_noContext_noTypeArgs_if() async {
+    addTestFile('''
+bool c = true;
+var a = {if (c) 1};
+''');
+    await resolveTestFile();
+    assertType(setLiteral('{'), 'Set<int>');
+  }
+
+  test_noContext_noTypeArgs_ifElse_lubOfInt() async {
+    addTestFile('''
+bool c = true;
+var a = {if (c) 1 else 2};
+''');
+    await resolveTestFile();
+    assertType(setLiteral('{'), 'Set<int>');
+  }
+
+  test_noContext_noTypeArgs_ifElse_lubOfNum() async {
+    addTestFile('''
+bool c = true;
+var a = {if (c) 1 else 2.3};
+''');
+    await resolveTestFile();
+    assertType(setLiteral('{'), 'Set<num>');
+  }
+
+  test_noContext_noTypeArgs_ifElse_lubOfObject() async {
+    addTestFile('''
+bool c = true;
+var a = {if (c) 1 else '2'};
+''');
+    await resolveTestFile();
+    assertType(setLiteral('{'), 'Set<Object>');
+  }
+
+  test_noContext_noTypeArgs_spread() async {
+    addTestFile('''
+List<int> c;
+var a = {...c};
+''');
+    await resolveTestFile();
+    assertType(setLiteral('{...'), 'Set<int>');
+  }
+
+  test_noContext_noTypeArgs_spread_lubOfInt() async {
+    addTestFile('''
+List<int> c;
+List<int> b;
+var a = {...b, ...c};
+''');
+    await resolveTestFile();
+    assertType(setLiteral('{...'), 'Set<int>');
+  }
+
+  test_noContext_noTypeArgs_spread_lubOfNum() async {
+    addTestFile('''
+List<int> c;
+List<double> b;
+var a = {...b, ...c};
+''');
+    await resolveTestFile();
+    assertType(setLiteral('{...'), 'Set<num>');
+  }
+
+  test_noContext_noTypeArgs_spread_lubOfObject() async {
+    addTestFile('''
+List<int> c;
+List<String> b;
+var a = {...b, ...c};
+''');
+    await resolveTestFile();
+    assertType(setLiteral('{...'), 'Set<Object>');
+  }
+
+  test_noContext_noTypeArgs_spread_nestedInIf_oneAmbiguous() async {
+    addTestFile('''
+List<int> c;
+dynamic d;
+var a = {if (0 < 1) ...c else ...d};
+''');
+    await resolveTestFile();
+    assertType(setLiteral('{'), 'Set<dynamic>');
+  }
+
+  @failingTest
+  test_noContext_noTypeArgs_spread_nullAware_nullAndNotNull() async {
+    addTestFile('''
+f() {
+  var futureNull = Future.value(null);
+  var a = {1, ...?await futureNull, 2};
+}
+''');
+    await resolveTestFile();
+    assertType(setLiteral('{1'), 'Set<int>');
+  }
+}
diff --git a/pkg/analyzer/test/src/dart/resolution/type_inference/test_all.dart b/pkg/analyzer/test/src/dart/resolution/type_inference/test_all.dart
new file mode 100644
index 0000000..54ada38
--- /dev/null
+++ b/pkg/analyzer/test/src/dart/resolution/type_inference/test_all.dart
@@ -0,0 +1,17 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'list_literal_test.dart' as list_literal;
+import 'map_literal_test.dart' as map_literal;
+import 'set_literal_test.dart' as set_literal;
+
+main() {
+  defineReflectiveSuite(() {
+    list_literal.main();
+    map_literal.main();
+    set_literal.main();
+  }, name: 'type inference');
+}
diff --git a/pkg/analyzer/test/src/dart/resolver/test_all.dart b/pkg/analyzer/test/src/dart/resolver/test_all.dart
index aff3b4f..e6430bd 100644
--- a/pkg/analyzer/test/src/dart/resolver/test_all.dart
+++ b/pkg/analyzer/test/src/dart/resolver/test_all.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dart/sdk/patch_test.dart b/pkg/analyzer/test/src/dart/sdk/patch_test.dart
index dd57aa6..0357f98 100644
--- a/pkg/analyzer/test/src/dart/sdk/patch_test.dart
+++ b/pkg/analyzer/test/src/dart/sdk/patch_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/dartdoc/dartdoc_directive_info_test.dart b/pkg/analyzer/test/src/dartdoc/dartdoc_directive_info_test.dart
new file mode 100644
index 0000000..43c386a
--- /dev/null
+++ b/pkg/analyzer/test/src/dartdoc/dartdoc_directive_info_test.dart
@@ -0,0 +1,84 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dartdoc/dartdoc_directive_info.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(DartdocDirectiveInfoTest);
+  });
+}
+
+@reflectiveTest
+class DartdocDirectiveInfoTest {
+  DartdocDirectiveInfo info = new DartdocDirectiveInfo();
+
+  test_processDartdoc_macro_defined() {
+    info.extractTemplate('''
+/**
+ * {@template foo}
+ * Body of the
+ * template.
+ * {@endtemplate}
+ */''');
+    String result = info.processDartdoc('''
+/**
+ * Before macro.
+ * {@macro foo}
+ * After macro.
+ */''');
+    expect(result, '''
+Before macro.
+Body of the
+template.
+After macro.''');
+  }
+
+  test_processDartdoc_macro_undefined() {
+    String result = info.processDartdoc('''
+/**
+ * {@macro foo}
+ */''');
+    expect(result, '''
+{@macro foo}''');
+  }
+
+  test_processDartdoc_multiple() {
+    info.extractTemplate('''
+/**
+ * {@template foo}
+ * First template.
+ * {@endtemplate}
+ */''');
+    info.extractTemplate('''
+/// {@template bar}
+/// Second template.
+/// {@endtemplate}''');
+    String result = info.processDartdoc('''
+/**
+ * Before macro.
+ * {@macro foo}
+ * Between macros.
+ * {@macro bar}
+ * After macro.
+ */''');
+    expect(result, '''
+Before macro.
+First template.
+Between macros.
+Second template.
+After macro.''');
+  }
+
+  test_processDartdoc_noMacro() {
+    String result = info.processDartdoc('''
+/**
+ * Comment without a macro.
+ */''');
+    expect(result, '''
+Comment without a macro.''');
+  }
+}
diff --git a/pkg/analyzer/test/src/dartdoc/test_all.dart b/pkg/analyzer/test/src/dartdoc/test_all.dart
new file mode 100644
index 0000000..963063a
--- /dev/null
+++ b/pkg/analyzer/test/src/dartdoc/test_all.dart
@@ -0,0 +1,13 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'dartdoc_directive_info_test.dart' as dartdoc_directive_info;
+
+main() {
+  defineReflectiveSuite(() {
+    dartdoc_directive_info.main();
+  }, name: 'dartdoc');
+}
diff --git a/pkg/analyzer/test/src/diagnostics/ambiguous_set_or_map_literal_test.dart b/pkg/analyzer/test/src/diagnostics/ambiguous_set_or_map_literal_test.dart
new file mode 100644
index 0000000..202c01bd
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/ambiguous_set_or_map_literal_test.dart
@@ -0,0 +1,57 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AmbiguousSetOrMapLiteralBothTest);
+    defineReflectiveTests(AmbiguousSetOrMapLiteralEitherTest);
+  });
+}
+
+@reflectiveTest
+class AmbiguousSetOrMapLiteralBothTest extends DriverResolutionTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections
+    ];
+
+  test_setAndMap() async {
+    assertErrorsInCode('''
+Map<int, int> map;
+Set<int> set;
+var c = {...set, ...map};
+''', [
+      error(CompileTimeErrorCode.AMBIGUOUS_SET_OR_MAP_LITERAL_BOTH, 41, 16),
+    ]);
+  }
+}
+
+@reflectiveTest
+class AmbiguousSetOrMapLiteralEitherTest extends DriverResolutionTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections
+    ];
+
+  test_setAndMap() async {
+    assertErrorsInCode('''
+var map;
+var set;
+var c = {...set, ...map};
+''', [
+      error(CompileTimeErrorCode.AMBIGUOUS_SET_OR_MAP_LITERAL_EITHER, 26, 16),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/argument_type_not_assignable_test.dart b/pkg/analyzer/test/src/diagnostics/argument_type_not_assignable_test.dart
index 5915938..28b285e 100644
--- a/pkg/analyzer/test/src/diagnostics/argument_type_not_assignable_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/argument_type_not_assignable_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../generated/resolver_test_case.dart';
+import '../dart/resolution/driver_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,10 +14,7 @@
 }
 
 @reflectiveTest
-class ArgumentTypeNotAssignableTest extends ResolverTestCase {
-  @override
-  bool get enableNewAnalysisDriver => true;
-
+class ArgumentTypeNotAssignableTest extends DriverResolutionTest {
   test_functionType() async {
     await assertErrorsInCode(r'''
 m() {
@@ -27,7 +24,9 @@
 class A {
   n(void f(int i)) {}
 }
-''', [StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
+''', [
+      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 31, 7),
+    ]);
   }
 
   test_interfaceType() async {
@@ -37,6 +36,8 @@
   n(i);
 }
 n(int i) {}
-''', [StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE]);
+''', [
+      error(StaticWarningCode.ARGUMENT_TYPE_NOT_ASSIGNABLE, 24, 1),
+    ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/async_keyword_used_as_identifier_test.dart b/pkg/analyzer/test/src/diagnostics/async_keyword_used_as_identifier_test.dart
new file mode 100644
index 0000000..28ab163
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/async_keyword_used_as_identifier_test.dart
@@ -0,0 +1,323 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/error/syntactic_errors.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AsyncKeywordUsedAsIdentifierTest);
+  });
+}
+
+@reflectiveTest
+class AsyncKeywordUsedAsIdentifierTest extends DriverResolutionTest {
+  test_async_annotation() async {
+    await assertErrorsInCode('''
+const int async = 0;
+f() async {
+  g(@async x) {}
+  g(0);
+}
+''', [
+      error(ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER, 38, 5),
+    ]);
+  }
+
+  test_async_argumentLabel() async {
+    await assertErrorsInCode('''
+f(c) async {
+  c.g(async: 0);
+}
+''', [
+      error(ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER, 19, 5),
+    ]);
+  }
+
+  test_async_async() async {
+    await assertErrorsInCode('''
+f() async {
+  var async = 1;
+  print(async);
+}
+''', [
+      error(ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER, 18, 5),
+      error(ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER, 37, 5),
+    ]);
+  }
+
+  test_async_asyncStar() async {
+    await assertErrorsInCode('''
+f() async* {
+  var async = 1;
+  print(async);
+}
+''', [
+      error(ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER, 19, 5),
+      error(ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER, 38, 5),
+    ]);
+  }
+
+  test_async_break() async {
+    await assertErrorsInCode('''
+f() async {
+  while (true) {
+    break async;
+  }
+}
+''', [
+      error(ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER, 39, 5),
+      error(CompileTimeErrorCode.LABEL_UNDEFINED, 39, 5),
+    ]);
+  }
+
+  test_async_catchException() async {
+    await assertErrorsInCode('''
+g() {}
+f() async {
+  try {
+    g();
+  } catch (async) { }
+}
+''', [
+      error(ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER, 47, 5),
+    ]);
+  }
+
+  test_async_catchStacktrace() async {
+    await assertErrorsInCode('''
+g() {}
+f() async {
+  try {
+    g();
+  } catch (e, async) { }
+}
+''', [
+      error(ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER, 50, 5),
+      error(HintCode.UNUSED_CATCH_STACK, 50, 5),
+    ]);
+  }
+
+  test_async_continue() async {
+    await assertErrorsInCode('''
+f() async {
+  while (true) {
+    continue async;
+  }
+}
+''', [
+      error(ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER, 42, 5),
+      error(CompileTimeErrorCode.LABEL_UNDEFINED, 42, 5),
+    ]);
+  }
+
+  test_async_for() async {
+    await assertErrorsInCode('''
+var async;
+f() async {
+  for (async in []) {}
+}
+''', [
+      error(ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER, 30, 5),
+    ]);
+  }
+
+  test_async_formalParameter() async {
+    await assertErrorsInCode('''
+f() async {
+  g(int async) {}
+  g(0);
+}
+''', [
+      error(ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER, 20, 5),
+    ]);
+  }
+
+  test_async_getter() async {
+    await assertErrorsInCode('''
+class C {
+  int get async => 1;
+}
+f() async {
+  return new C().async;
+}
+''', [
+      error(ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER, 63, 5),
+    ]);
+  }
+
+  test_async_invocation() async {
+    await assertErrorsInCode('''
+class C {
+  int async() => 1;
+}
+f() async {
+  return new C().async();
+}
+''', [
+      error(ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER, 61, 5),
+    ]);
+  }
+
+  test_async_invocation_cascaded() async {
+    await assertErrorsInCode('''
+class C {
+  int async() => 1;
+}
+f() async {
+  return new C()..async();
+}
+''', [
+      error(ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER, 62, 5),
+    ]);
+  }
+
+  test_async_label() async {
+    await assertErrorsInCode('''
+f() async {
+  async: g();
+}
+g() {}
+''', [
+      error(ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER, 14, 5),
+      error(HintCode.UNUSED_LABEL, 14, 6),
+    ]);
+  }
+
+  test_async_localFunction() async {
+    await assertErrorsInCode('''
+f() async {
+  int async() => null;
+  async();
+}
+''', [
+      error(ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER, 18, 5),
+      error(ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER, 37, 5),
+    ]);
+  }
+
+  test_async_prefix() async {
+    await assertErrorsInCode('''
+import 'dart:async' as async;
+f() async {
+  return new async.Future.value(0);
+}
+''', [
+      error(ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER, 55, 5),
+    ]);
+  }
+
+  test_async_setter() async {
+    await assertErrorsInCode('''
+class C {
+  void set async(int i) {}
+}
+f() async {
+  new C().async = 1;
+}
+''', [
+      error(ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER, 61, 5),
+    ]);
+  }
+
+  test_async_setter_cascaded() async {
+    await assertErrorsInCode('''
+class C {
+  void set async(int i) {}
+}
+f() async {
+  return new C()..async = 1;
+}
+''', [
+      error(ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER, 69, 5),
+    ]);
+  }
+
+  test_async_stringInterpolation() async {
+    await assertErrorsInCode(r'''
+int async = 1;
+f() async {
+  return "$async";
+}
+''', [
+      error(ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER, 38, 5),
+    ]);
+  }
+
+  test_async_suffix() async {
+    newFile("/test/lib/lib1.dart", content: r'''
+library lib1;
+int async;
+''');
+    await assertErrorsInCode('''
+import 'lib1.dart' as l;
+f() async {
+  return l.async;
+}
+''', [
+      error(ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER, 48, 5),
+    ]);
+  }
+
+  test_async_switchLabel() async {
+    await assertErrorsInCode('''
+f() async {
+  switch (0) {
+    async: case 0: break;
+  }
+}
+''', [
+      error(ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER, 31, 5),
+      error(HintCode.UNUSED_LABEL, 31, 6),
+    ]);
+  }
+
+  test_async_syncStar() async {
+    await assertErrorsInCode('''
+f() sync* {
+  var async = 1;
+  print(async);
+}
+''', [
+      error(ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER, 18, 5),
+      error(ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER, 37, 5),
+    ]);
+  }
+
+  test_await_async() async {
+    await assertErrorsInCode('''
+f() async {
+  var await = 1;
+}
+''', [
+      error(ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER, 18, 5),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 18, 5),
+    ]);
+  }
+
+  test_await_asyncStar() async {
+    await assertErrorsInCode('''
+f() async* {
+  var await = 1;
+}
+''', [
+      error(ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER, 19, 5),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 19, 5),
+    ]);
+  }
+
+  test_await_syncStar() async {
+    await assertErrorsInCode('''
+f() sync* {
+  var await = 1;
+}
+''', [
+      error(ParserErrorCode.ASYNC_KEYWORD_USED_AS_IDENTIFIER, 18, 5),
+      error(HintCode.UNUSED_LOCAL_VARIABLE, 18, 5),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/can_be_null_after_null_aware_test.dart b/pkg/analyzer/test/src/diagnostics/can_be_null_after_null_aware_test.dart
index 534c440..ee5b015 100644
--- a/pkg/analyzer/test/src/diagnostics/can_be_null_after_null_aware_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/can_be_null_after_null_aware_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../generated/resolver_test_case.dart';
+import '../dart/resolution/driver_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,16 +14,15 @@
 }
 
 @reflectiveTest
-class CanBeNullAfterNullAwareTest extends ResolverTestCase {
-  @override
-  bool get enableNewAnalysisDriver => true;
-
+class CanBeNullAfterNullAwareTest extends DriverResolutionTest {
   test_afterCascade() async {
     await assertErrorsInCode(r'''
 m(x) {
   x..a?.b.c;
 }
-''', [HintCode.CAN_BE_NULL_AFTER_NULL_AWARE]);
+''', [
+      error(HintCode.CAN_BE_NULL_AFTER_NULL_AWARE, 10, 6),
+    ]);
   }
 
   test_beforeCascade() async {
@@ -31,7 +30,9 @@
 m(x) {
   x?.a..m();
 }
-''', [HintCode.CAN_BE_NULL_AFTER_NULL_AWARE]);
+''', [
+      error(HintCode.CAN_BE_NULL_AFTER_NULL_AWARE, 9, 4),
+    ]);
   }
 
   test_cascadeWithParenthesis() async {
@@ -39,7 +40,9 @@
 m(x) {
   (x?.a)..m();
 }
-''', [HintCode.CAN_BE_NULL_AFTER_NULL_AWARE]);
+''', [
+      error(HintCode.CAN_BE_NULL_AFTER_NULL_AWARE, 9, 6),
+    ]);
   }
 
   test_definedForNull() async {
@@ -76,7 +79,9 @@
 m(x) {
   x?.a.b();
 }
-''', [HintCode.CAN_BE_NULL_AFTER_NULL_AWARE]);
+''', [
+      error(HintCode.CAN_BE_NULL_AFTER_NULL_AWARE, 9, 4),
+    ]);
   }
 
   test_multipleInvocations() async {
@@ -86,7 +91,9 @@
     ..m()
     ..m();
 }
-''', [HintCode.CAN_BE_NULL_AFTER_NULL_AWARE]);
+''', [
+      error(HintCode.CAN_BE_NULL_AFTER_NULL_AWARE, 9, 4),
+    ]);
   }
 
   test_parenthesized() async {
@@ -94,7 +101,9 @@
 m(x) {
   (x?.a).b;
 }
-''', [HintCode.CAN_BE_NULL_AFTER_NULL_AWARE]);
+''', [
+      error(HintCode.CAN_BE_NULL_AFTER_NULL_AWARE, 9, 6),
+    ]);
   }
 
   test_propertyAccess() async {
@@ -102,6 +111,8 @@
 m(x) {
   x?.a.b;
 }
-''', [HintCode.CAN_BE_NULL_AFTER_NULL_AWARE]);
+''', [
+      error(HintCode.CAN_BE_NULL_AFTER_NULL_AWARE, 9, 4),
+    ]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/const_constructor_param_type_mismatch_test.dart b/pkg/analyzer/test/src/diagnostics/const_constructor_param_type_mismatch_test.dart
new file mode 100644
index 0000000..1c179be
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/const_constructor_param_type_mismatch_test.dart
@@ -0,0 +1,119 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConstConstructorParamTypeMismatchTest);
+  });
+}
+
+/// TODO(paulberry): move other tests from [CheckedModeCompileTimeErrorCodeTest]
+/// to this class.
+@reflectiveTest
+class ConstConstructorParamTypeMismatchTest extends DriverResolutionTest {
+  test_int_to_double_reference_from_other_library_other_file_after() async {
+    addTestFile('''
+class C {
+  final double d;
+  const C(this.d);
+}
+const C constant = const C(0);
+''');
+    newFile('/test/lib/other.dart', content: '''
+import 'test.dart';
+class D {
+  final C c;
+  const D(this.c);
+}
+const D constant2 = const D(constant);
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+    var otherFileResult =
+        await resolveFile(convertPath('/test/lib/other.dart'));
+    expect(otherFileResult.errors, isEmpty);
+  }
+
+  test_int_to_double_reference_from_other_library_other_file_before() async {
+    addTestFile('''
+class C {
+  final double d;
+  const C(this.d);
+}
+const C constant = const C(0);
+''');
+    newFile('/test/lib/other.dart', content: '''
+import 'test.dart';
+class D {
+  final C c;
+  const D(this.c);
+}
+const D constant2 = const D(constant);
+''');
+    var otherFileResult =
+        await resolveFile(convertPath('/test/lib/other.dart'));
+    expect(otherFileResult.errors, isEmpty);
+    await resolveTestFile();
+    assertNoTestErrors();
+  }
+
+  test_int_to_double_single_library() async {
+    addTestFile('''
+class C {
+  final double d;
+  const C(this.d);
+}
+const C constant = const C(0);
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+  }
+
+  test_int_to_double_via_default_value_other_file_after() async {
+    addTestFile('''
+import 'other.dart';
+
+void main() {
+  const c = C();
+}
+''');
+    newFile('/test/lib/other.dart', content: '''
+class C {
+  final double x;
+  const C([this.x = 0]);
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+    var otherFileResult =
+        await resolveFile(convertPath('/test/lib/other.dart'));
+    expect(otherFileResult.errors, isEmpty);
+  }
+
+  test_int_to_double_via_default_value_other_file_before() async {
+    addTestFile('''
+import 'other.dart';
+
+void main() {
+  const c = C();
+}
+''');
+    newFile('/test/lib/other.dart', content: '''
+class C {
+  final double x;
+  const C([this.x = 0]);
+}
+''');
+    var otherFileResult =
+        await resolveFile(convertPath('/test/lib/other.dart'));
+    expect(otherFileResult.errors, isEmpty);
+    await resolveTestFile();
+    assertNoTestErrors();
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/const_constructor_with_mixin_with_field_test.dart b/pkg/analyzer/test/src/diagnostics/const_constructor_with_mixin_with_field_test.dart
index f8b4aec..662215a 100644
--- a/pkg/analyzer/test/src/diagnostics/const_constructor_with_mixin_with_field_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/const_constructor_with_mixin_with_field_test.dart
@@ -26,7 +26,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD,
       CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD,
     ]);
@@ -43,7 +43,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD,
     ]);
   }
@@ -85,7 +85,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD,
       CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_NON_FINAL_FIELD,
     ]);
@@ -102,7 +102,7 @@
 }
 ''');
     await resolveTestFile();
-    assertTestErrors([
+    assertTestErrorsWithCodes([
       CompileTimeErrorCode.CONST_CONSTRUCTOR_WITH_MIXIN_WITH_FIELD,
     ]);
   }
diff --git a/pkg/analyzer/test/src/diagnostics/const_eval_throws_exception_test.dart b/pkg/analyzer/test/src/diagnostics/const_eval_throws_exception_test.dart
new file mode 100644
index 0000000..ba1168f
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/const_eval_throws_exception_test.dart
@@ -0,0 +1,240 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConstEvalThrowsExceptionTest);
+    defineReflectiveTests(ConstEvalThrowsExceptionWithConstantUpdateTest);
+    defineReflectiveTests(ConstEvalThrowsExceptionWithUiAsCodeAndConstantsTest);
+    defineReflectiveTests(ConstEvalThrowsExceptionWithUIAsCodeTest);
+  });
+}
+
+/// TODO(paulberry): move other tests from [CheckedModeCompileTimeErrorCodeTest]
+/// and [CompileTimeErrorCodeTestBase] to this class.
+@reflectiveTest
+class ConstEvalThrowsExceptionTest extends DriverResolutionTest {
+  test_CastError_intToDouble_constructor_importAnalyzedAfter() async {
+    // See dartbug.com/35993
+    addTestFile(r'''
+import 'other.dart';
+
+void main() {
+  const foo = Foo(1);
+  const bar = Bar.some();
+  print("$foo, $bar");
+}
+''');
+    newFile('/test/lib/other.dart', content: '''
+class Foo {
+  final double value;
+
+  const Foo(this.value);
+}
+
+class Bar {
+  final Foo value;
+
+  const Bar(this.value);
+
+  const Bar.some() : this(const Foo(1));
+}''');
+    await resolveTestFile();
+    assertNoTestErrors();
+    var otherFileResult =
+        await resolveFile(convertPath('/test/lib/other.dart'));
+    expect(otherFileResult.errors, isEmpty);
+  }
+
+  test_CastError_intToDouble_constructor_importAnalyzedBefore() async {
+    // See dartbug.com/35993
+    addTestFile(r'''
+import 'other.dart';
+
+void main() {
+  const foo = Foo(1);
+  const bar = Bar.some();
+  print("$foo, $bar");
+}
+''');
+    newFile('/test/lib/other.dart', content: '''
+class Foo {
+  final double value;
+
+  const Foo(this.value);
+}
+
+class Bar {
+  final Foo value;
+
+  const Bar(this.value);
+
+  const Bar.some() : this(const Foo(1));
+}''');
+    var otherFileResult =
+        await resolveFile(convertPath('/test/lib/other.dart'));
+    expect(otherFileResult.errors, isEmpty);
+    await resolveTestFile();
+    assertNoTestErrors();
+  }
+
+  test_default_constructor_arg_empty_map_importAnalyzedAfter() async {
+    addTestFile('''
+import 'other.dart';
+
+main() {
+  var c = const C();
+}
+''');
+    newFile('/test/lib/other.dart', content: '''
+class C {
+  final Map<String, int> m;
+  const C({this.m = const <String, int>{}})
+    : assert(m != null);
+}
+''');
+    await resolveTestFile();
+    assertNoTestErrors();
+    var otherFileResult =
+        await resolveFile(convertPath('/test/lib/other.dart'));
+    expect(otherFileResult.errors, isEmpty);
+  }
+
+  test_default_constructor_arg_empty_map_importAnalyzedBefore() async {
+    addTestFile('''
+import 'other.dart';
+
+main() {
+  var c = const C();
+}
+''');
+    newFile('/test/lib/other.dart', content: '''
+class C {
+  final Map<String, int> m;
+  const C({this.m = const <String, int>{}})
+    : assert(m != null);
+}
+''');
+    var otherFileResult =
+        await resolveFile(convertPath('/test/lib/other.dart'));
+    expect(otherFileResult.errors, isEmpty);
+    await resolveTestFile();
+    assertNoTestErrors();
+  }
+}
+
+@reflectiveTest
+class ConstEvalThrowsExceptionWithConstantUpdateTest
+    extends ConstEvalThrowsExceptionTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.constant_update_2018,
+    ];
+
+  test_eqEq_nonPrimitiveRightOperand() async {
+    await assertNoErrorsInCode('''
+const c = const T.eq(1, const Object());
+class T {
+  final Object value;
+  const T.eq(Object o1, Object o2) : value = o1 == o2;
+}
+''');
+  }
+}
+
+@reflectiveTest
+class ConstEvalThrowsExceptionWithUiAsCodeAndConstantsTest
+    extends ConstEvalThrowsExceptionWithUIAsCodeTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+      EnableString.constant_update_2018
+    ];
+}
+
+@reflectiveTest
+class ConstEvalThrowsExceptionWithUIAsCodeTest
+    extends ConstEvalThrowsExceptionTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+    ];
+
+  test_ifElement_false_thenNotEvaluated() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic nil = null;
+const c = [if (1 < 0) nil + 1];
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+  }
+
+  test_ifElement_nonBoolCondition_list() async {
+    assertErrorCodesInCode(
+        '''
+const dynamic nonBool = 3;
+const c = const [if (nonBool) 'a'];
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]
+            : [
+                CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
+                CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT
+              ]);
+  }
+
+  test_ifElement_nonBoolCondition_map() async {
+    assertErrorCodesInCode(
+        '''
+const dynamic nonBool = null;
+const c = const {if (nonBool) 'a' : 1};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]
+            : [
+                CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
+                CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT
+              ]);
+  }
+
+  test_ifElement_nonBoolCondition_set() async {
+    assertErrorCodesInCode(
+        '''
+const dynamic nonBool = 'a';
+const c = const {if (nonBool) 3};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION]
+            : [
+                CompileTimeErrorCode.CONST_EVAL_THROWS_EXCEPTION,
+                CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT
+              ]);
+  }
+
+  test_ifElement_true_elseNotEvaluated() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic nil = null;
+const c = [if (0 < 1) 3 else nil + 1];
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/const_map_key_expression_type_implements_equals_test.dart b/pkg/analyzer/test/src/diagnostics/const_map_key_expression_type_implements_equals_test.dart
new file mode 100644
index 0000000..0a03667
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/const_map_key_expression_type_implements_equals_test.dart
@@ -0,0 +1,118 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConstMapKeyExpressionTypeImplementsEqualsTest);
+    defineReflectiveTests(
+      ConstMapKeyExpressionTypeImplementsEqualsWithUIAsCodeTest,
+    );
+  });
+}
+
+@reflectiveTest
+class ConstMapKeyExpressionTypeImplementsEqualsTest
+    extends DriverResolutionTest {
+  test_abstract() async {
+    await assertNoErrorsInCode(r'''
+class A {
+  const A();
+  bool operator==(Object other);
+}
+
+main() {
+  const {const A(): 0};
+}
+''');
+  }
+
+  test_constField() async {
+    await assertErrorCodesInCode(r'''
+main() {
+  const {double.INFINITY: 0};
+}
+''', [CompileTimeErrorCode.CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS]);
+  }
+
+  test_direct() async {
+    await assertErrorCodesInCode(r'''
+class A {
+  const A();
+  operator ==(other) => false;
+}
+
+main() {
+  const {const A() : 0};
+}
+''', [CompileTimeErrorCode.CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS]);
+  }
+
+  test_dynamic() async {
+    // Note: static type of B.a is "dynamic", but actual type of the const
+    // object is A.  We need to make sure we examine the actual type when
+    // deciding whether there is a problem with operator==.
+    await assertErrorCodesInCode(r'''
+class A {
+  const A();
+  operator ==(other) => false;
+}
+
+class B {
+  static const a = const A();
+}
+
+main() {
+  const {B.a : 0};
+}
+''', [CompileTimeErrorCode.CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS]);
+  }
+
+  test_factory() async {
+    await assertErrorCodesInCode(r'''
+class A {
+  const factory A() = B;
+}
+
+class B implements A {
+  const B();
+  operator ==(o) => true;
+}
+
+main() {
+  const {const A(): 42};
+}
+''', [CompileTimeErrorCode.CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS]);
+  }
+
+  test_super() async {
+    await assertErrorCodesInCode(r'''
+class A {
+  const A();
+  operator ==(other) => false;
+}
+
+class B extends A {
+  const B();
+}
+
+main() {
+  const {const B() : 0};
+}
+''', [CompileTimeErrorCode.CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS]);
+  }
+}
+
+@reflectiveTest
+class ConstMapKeyExpressionTypeImplementsEqualsWithUIAsCodeTest
+    extends ConstMapKeyExpressionTypeImplementsEqualsTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = ['control-flow-collections', 'spread-collections'];
+}
diff --git a/pkg/analyzer/test/src/diagnostics/const_set_element_type_implements_equals_test.dart b/pkg/analyzer/test/src/diagnostics/const_set_element_type_implements_equals_test.dart
new file mode 100644
index 0000000..ded7bfb
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/const_set_element_type_implements_equals_test.dart
@@ -0,0 +1,158 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConstSetElementTypeImplementsEqualsTest);
+    defineReflectiveTests(
+        ConstSetElementTypeImplementsEqualsWithUIAsCodeAndConstantsTest);
+    defineReflectiveTests(
+      ConstSetElementTypeImplementsEqualsWithUIAsCodeTest,
+    );
+  });
+}
+
+@reflectiveTest
+class ConstSetElementTypeImplementsEqualsTest extends DriverResolutionTest {
+  test_constField() async {
+    await assertErrorCodesInCode(r'''
+class A {
+  static const a = const A();
+  const A();
+  operator ==(other) => false;
+}
+main() {
+  const {A.a};
+}
+''', [CompileTimeErrorCode.CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS]);
+  }
+
+  test_direct() async {
+    await assertErrorCodesInCode(r'''
+class A {
+  const A();
+  operator ==(other) => false;
+}
+main() {
+  const {const A()};
+}
+''', [CompileTimeErrorCode.CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS]);
+  }
+
+  test_dynamic() async {
+    // Note: static type of B.a is "dynamic", but actual type of the const
+    // object is A.  We need to make sure we examine the actual type when
+    // deciding whether there is a problem with operator==.
+    await assertErrorCodesInCode(r'''
+class A {
+  const A();
+  operator ==(other) => false;
+}
+class B {
+  static const a = const A();
+}
+main() {
+  const {B.a};
+}
+''', [CompileTimeErrorCode.CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS]);
+  }
+
+  test_factory() async {
+    await assertErrorCodesInCode(r'''
+class A { const factory A() = B; }
+
+class B implements A {
+  const B();
+
+  operator ==(o) => true;
+}
+
+main() {
+  var m = const {const A()};
+}
+''', [CompileTimeErrorCode.CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS]);
+  }
+
+  test_super() async {
+    await assertErrorCodesInCode(r'''
+class A {
+  const A();
+  operator ==(other) => false;
+}
+class B extends A {
+  const B();
+}
+main() {
+  const {const B()};
+}
+''', [CompileTimeErrorCode.CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS]);
+  }
+}
+
+@reflectiveTest
+class ConstSetElementTypeImplementsEqualsWithUIAsCodeAndConstantsTest
+    extends ConstSetElementTypeImplementsEqualsWithUIAsCodeTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+      EnableString.constant_update_2018
+    ];
+}
+
+@reflectiveTest
+class ConstSetElementTypeImplementsEqualsWithUIAsCodeTest
+    extends ConstSetElementTypeImplementsEqualsTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections
+    ];
+
+  test_spread_list() async {
+    await assertErrorCodesInCode(
+        r'''
+class A {
+  const A();
+  operator ==(other) => false;
+}
+
+main() {
+  const {...[A()]};
+}
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS]
+            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+
+  test_spread_set() async {
+    await assertErrorCodesInCode(
+        r'''
+class A {
+  const A();
+  operator ==(other) => false;
+}
+
+main() {
+  const {...{A()}};
+}
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS]
+            : [
+                CompileTimeErrorCode.CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS,
+                CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT
+              ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/const_spread_expected_list_or_set_test.dart b/pkg/analyzer/test/src/diagnostics/const_spread_expected_list_or_set_test.dart
new file mode 100644
index 0000000..5863409
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/const_spread_expected_list_or_set_test.dart
@@ -0,0 +1,185 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConstSpreadExpectedListOrSetTest);
+    defineReflectiveTests(ConstSpreadExpectedListOrSetWithConstantsTest);
+  });
+}
+
+@reflectiveTest
+class ConstSpreadExpectedListOrSetTest extends DriverResolutionTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections
+    ];
+
+  test_const_listInt() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = 5;
+var b = const <int>[...a];
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.CONST_SPREAD_EXPECTED_LIST_OR_SET]
+            : [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+  }
+
+  test_const_listList() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = [5];
+var b = const <int>[...a];
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+  }
+
+  test_const_listMap() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = <int, int>{0: 1};
+var b = const <int>[...a];
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.CONST_SPREAD_EXPECTED_LIST_OR_SET]
+            : [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+  }
+
+  test_const_listNull() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = null;
+var b = const <int>[...a];
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.CONST_SPREAD_EXPECTED_LIST_OR_SET]
+            : [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+  }
+
+  test_const_listNull_nullable() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = null;
+var b = const <int>[...?a];
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+  }
+
+  test_const_listSet() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = <int>{5};
+var b = const <int>[...a];
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+  }
+
+  test_const_setInt() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = 5;
+var b = const <int>{...a};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.CONST_SPREAD_EXPECTED_LIST_OR_SET]
+            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+
+  test_const_setList() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = <int>[5];
+var b = const <int>{...a};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+
+  test_const_setMap() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = <int, int>{1: 2};
+var b = const <int>{...a};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.CONST_SPREAD_EXPECTED_LIST_OR_SET]
+            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+
+  test_const_setNull() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = null;
+var b = const <int>{...a};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.CONST_SPREAD_EXPECTED_LIST_OR_SET]
+            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+
+  test_const_setNull_nullable() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = null;
+var b = const <int>{...?a};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+
+  test_const_setSet() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = <int>{5};
+var b = const <int>{...a};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+
+  test_nonConst_listInt() async {
+    await assertNoErrorsInCode('''
+const dynamic a = 5;
+var b = <int>[...a];
+''');
+  }
+
+  test_nonConst_setInt() async {
+    await assertNoErrorsInCode('''
+const dynamic a = 5;
+var b = <int>{...a};
+''');
+  }
+}
+
+@reflectiveTest
+class ConstSpreadExpectedListOrSetWithConstantsTest
+    extends ConstSpreadExpectedListOrSetTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+      EnableString.constant_update_2018
+    ];
+}
diff --git a/pkg/analyzer/test/src/diagnostics/const_spread_expected_map_test.dart b/pkg/analyzer/test/src/diagnostics/const_spread_expected_map_test.dart
new file mode 100644
index 0000000..93d86bb
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/const_spread_expected_map_test.dart
@@ -0,0 +1,111 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ConstSpreadExpectedMapTest);
+    defineReflectiveTests(ConstSpreadExpectedMapWithConstantsTest);
+  });
+}
+
+@reflectiveTest
+class ConstSpreadExpectedMapTest extends DriverResolutionTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections
+    ];
+
+  test_const_mapInt() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = 5;
+var b = const <int, int>{...a};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.CONST_SPREAD_EXPECTED_MAP]
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_mapList() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = <int>[5];
+var b = const <int, int>{...a};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.CONST_SPREAD_EXPECTED_MAP]
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_mapMap() async {
+    await assertNoErrorsInCode('''
+const dynamic a = <int, int>{1: 2};
+var b = <int, int>{...a};
+''');
+  }
+
+  test_const_mapNull() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = null;
+var b = const <int, int>{...a};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.CONST_SPREAD_EXPECTED_MAP]
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_mapNull_nullable() async {
+    await assertNoErrorsInCode('''
+const dynamic a = null;
+var b = <int, int>{...?a};
+''');
+  }
+
+  test_const_mapSet() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = <int>{5};
+var b = const <int, int>{...a};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.CONST_SPREAD_EXPECTED_MAP]
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_nonConst_mapInt() async {
+    await assertNoErrorsInCode('''
+const dynamic a = 5;
+var b = <int, int>{...a};
+''');
+  }
+
+  test_nonConst_mapMap() async {
+    await assertNoErrorsInCode('''
+const dynamic a = {1: 2};
+var b = <int, int>{...a};
+''');
+  }
+}
+
+@reflectiveTest
+class ConstSpreadExpectedMapWithConstantsTest
+    extends ConstSpreadExpectedMapTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+      EnableString.constant_update_2018
+    ];
+}
diff --git a/pkg/analyzer/test/src/diagnostics/dead_code_test.dart b/pkg/analyzer/test/src/diagnostics/dead_code_test.dart
new file mode 100644
index 0000000..e97aa48
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/dead_code_test.dart
@@ -0,0 +1,700 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/test_utilities/package_mixin.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(DeadCodeTest);
+    defineReflectiveTests(UncheckedUseOfNullableValueTest);
+  });
+}
+
+@reflectiveTest
+class DeadCodeTest extends DriverResolutionTest with PackageMixin {
+  test_afterForEachWithBreakLabel() async {
+    await assertNoErrorsInCode(r'''
+f() {
+  named: {
+    for (var x in [1]) {
+      if (x == null)
+        break named;
+    }
+    return;
+  }
+  print('not dead');
+}
+''');
+  }
+
+  test_afterForWithBreakLabel() async {
+    await assertNoErrorsInCode(r'''
+f() {
+  named: {
+    for (int i = 0; i < 7; i++) {
+      if (i == null)
+        break named;
+    }
+    return;
+  }
+  print('not dead');
+}
+''');
+  }
+
+  test_afterTryCatch() async {
+    await assertNoErrorsInCode(r'''
+main() {
+  try {
+    return f();
+  } catch (e) {
+    print(e);
+  }
+  print('not dead');
+}
+f() {
+  throw 'foo';
+}
+''');
+  }
+
+  test_deadBlock_conditionalElse() async {
+    await assertErrorCodesInCode(r'''
+f() {
+  true ? 1 : 2;
+}''', [HintCode.DEAD_CODE]);
+  }
+
+  test_deadBlock_conditionalElse_debugConst() async {
+    await assertNoErrorsInCode(r'''
+const bool DEBUG = true;
+f() {
+  DEBUG ? 1 : 2;
+}''');
+  }
+
+  test_deadBlock_conditionalElse_nested() async {
+    // Test that a dead else-statement can't generate additional violations.
+    await assertErrorCodesInCode(r'''
+f() {
+  true ? true : false && false;
+}''', [HintCode.DEAD_CODE]);
+  }
+
+  test_deadBlock_conditionalIf() async {
+    await assertErrorCodesInCode(r'''
+f() {
+  false ? 1 : 2;
+}''', [HintCode.DEAD_CODE]);
+  }
+
+  test_deadBlock_conditionalIf_debugConst() async {
+    await assertNoErrorsInCode(r'''
+const bool DEBUG = false;
+f() {
+  DEBUG ? 1 : 2;
+}''');
+  }
+
+  test_deadBlock_conditionalIf_nested() async {
+    // Test that a dead then-statement can't generate additional violations.
+    await assertErrorCodesInCode(r'''
+f() {
+  false ? false && false : true;
+}''', [HintCode.DEAD_CODE]);
+  }
+
+  test_deadBlock_else() async {
+    await assertErrorCodesInCode(r'''
+f() {
+  if(true) {} else {}
+}''', [HintCode.DEAD_CODE]);
+  }
+
+  test_deadBlock_else_debugConst() async {
+    await assertNoErrorsInCode(r'''
+const bool DEBUG = true;
+f() {
+  if(DEBUG) {} else {}
+}''');
+  }
+
+  test_deadBlock_else_nested() async {
+    // Test that a dead else-statement can't generate additional violations.
+    await assertErrorCodesInCode(r'''
+f() {
+  if(true) {} else {if (false) {}}
+}''', [HintCode.DEAD_CODE]);
+  }
+
+  test_deadBlock_if() async {
+    await assertErrorCodesInCode(r'''
+f() {
+  if(false) {}
+}''', [HintCode.DEAD_CODE]);
+  }
+
+  test_deadBlock_if_debugConst_prefixedIdentifier() async {
+    await assertNoErrorsInCode(r'''
+class A {
+  static const bool DEBUG = false;
+}
+f() {
+  if(A.DEBUG) {}
+}''');
+  }
+
+  test_deadBlock_if_debugConst_prefixedIdentifier2() async {
+    newFile('/test/lib/lib2.dart', content: r'''
+library lib2;
+class A {
+  static const bool DEBUG = false;
+}''');
+    await assertNoErrorsInCode(r'''
+library L;
+import 'lib2.dart';
+f() {
+  if(A.DEBUG) {}
+}''');
+  }
+
+  test_deadBlock_if_debugConst_propertyAccessor() async {
+    newFile('/test/lib/lib2.dart', content: r'''
+library lib2;
+class A {
+  static const bool DEBUG = false;
+}''');
+    await assertNoErrorsInCode(r'''
+library L;
+import 'lib2.dart' as LIB;
+f() {
+  if(LIB.A.DEBUG) {}
+}''');
+  }
+
+  test_deadBlock_if_debugConst_simpleIdentifier() async {
+    await assertNoErrorsInCode(r'''
+const bool DEBUG = false;
+f() {
+  if(DEBUG) {}
+}''');
+  }
+
+  test_deadBlock_if_nested() async {
+    // Test that a dead then-statement can't generate additional violations.
+    await assertErrorCodesInCode(r'''
+f() {
+  if(false) {if(false) {}}
+}''', [HintCode.DEAD_CODE]);
+  }
+
+  test_deadBlock_while() async {
+    await assertErrorCodesInCode(r'''
+f() {
+  while(false) {}
+}''', [HintCode.DEAD_CODE]);
+  }
+
+  test_deadBlock_while_debugConst() async {
+    await assertNoErrorsInCode(r'''
+const bool DEBUG = false;
+f() {
+  while(DEBUG) {}
+}''');
+  }
+
+  test_deadBlock_while_nested() async {
+    // Test that a dead while body can't generate additional violations.
+    await assertErrorCodesInCode(r'''
+f() {
+  while(false) {if(false) {}}
+}''', [HintCode.DEAD_CODE]);
+  }
+
+  test_deadCatch_catchFollowingCatch() async {
+    await assertErrorCodesInCode(r'''
+class A {}
+f() {
+  try {} catch (e) {} catch (e) {}
+}''', [HintCode.DEAD_CODE_CATCH_FOLLOWING_CATCH]);
+  }
+
+  test_deadCatch_catchFollowingCatch_nested() async {
+    // Test that a dead catch clause can't generate additional violations.
+    await assertErrorCodesInCode(r'''
+class A {}
+f() {
+  try {} catch (e) {} catch (e) {if(false) {}}
+}''', [HintCode.DEAD_CODE_CATCH_FOLLOWING_CATCH]);
+  }
+
+  test_deadCatch_catchFollowingCatch_object() async {
+    await assertErrorCodesInCode(r'''
+f() {
+  try {} on Object catch (e) {} catch (e) {}
+}''', [HintCode.DEAD_CODE_CATCH_FOLLOWING_CATCH]);
+  }
+
+  test_deadCatch_catchFollowingCatch_object_nested() async {
+    // Test that a dead catch clause can't generate additional violations.
+    await assertErrorCodesInCode(r'''
+f() {
+  try {} on Object catch (e) {} catch (e) {if(false) {}}
+}''', [HintCode.DEAD_CODE_CATCH_FOLLOWING_CATCH]);
+  }
+
+  test_deadCatch_onCatchSubtype() async {
+    await assertErrorCodesInCode(r'''
+class A {}
+class B extends A {}
+f() {
+  try {} on A catch (e) {} on B catch (e) {}
+}''', [HintCode.DEAD_CODE_ON_CATCH_SUBTYPE]);
+  }
+
+  test_deadCatch_onCatchSubtype_nested() async {
+    // Test that a dead catch clause can't generate additional violations.
+    await assertErrorCodesInCode(r'''
+class A {}
+class B extends A {}
+f() {
+  try {} on A catch (e) {} on B catch (e) {if(false) {}}
+}''', [HintCode.DEAD_CODE_ON_CATCH_SUBTYPE]);
+  }
+
+  test_deadCatch_onCatchSupertype() async {
+    await assertNoErrorsInCode(r'''
+class A {}
+class B extends A {}
+f() {
+  try {} on B catch (e) {} on A catch (e) {} catch (e) {}
+}''');
+  }
+
+  test_deadFinalBreakInCase() async {
+    await assertNoErrorsInCode(r'''
+f() {
+  switch (true) {
+  case true:
+    try {
+      int a = 1;
+    } finally {
+      return;
+    }
+    break;
+  default:
+    break;
+  }
+}''');
+  }
+
+  test_deadFinalReturnInCase() async {
+    await assertErrorCodesInCode(r'''
+f() {
+  switch (true) {
+  case true:
+    try {
+      int a = 1;
+    } finally {
+      return;
+    }
+    return;
+  default:
+    break;
+  }
+}''', [HintCode.DEAD_CODE]);
+  }
+
+  test_deadFinalStatementInCase() async {
+    await assertErrorCodesInCode(r'''
+f() {
+  switch (true) {
+  case true:
+    try {
+      int a = 1;
+    } finally {
+      return;
+    }
+    throw 'msg';
+  default:
+    break;
+  }
+}''', [HintCode.DEAD_CODE]);
+  }
+
+  test_deadOperandLHS_and() async {
+    await assertErrorCodesInCode(r'''
+f() {
+  bool b = false && false;
+}''', [HintCode.DEAD_CODE]);
+  }
+
+  test_deadOperandLHS_and_debugConst() async {
+    await assertNoErrorsInCode(r'''
+const bool DEBUG = false;
+f() {
+  bool b = DEBUG && false;
+}''');
+  }
+
+  test_deadOperandLHS_and_nested() async {
+    await assertErrorCodesInCode(r'''
+f() {
+  bool b = false && (false && false);
+}''', [HintCode.DEAD_CODE]);
+  }
+
+  test_deadOperandLHS_or() async {
+    await assertErrorCodesInCode(r'''
+f() {
+  bool b = true || true;
+}''', [HintCode.DEAD_CODE]);
+  }
+
+  test_deadOperandLHS_or_debugConst() async {
+    await assertNoErrorsInCode(r'''
+const bool DEBUG = true;
+f() {
+  bool b = DEBUG || true;
+}''');
+  }
+
+  test_deadOperandLHS_or_nested() async {
+    await assertErrorCodesInCode(r'''
+f() {
+  bool b = true || (false && false);
+}''', [HintCode.DEAD_CODE]);
+  }
+
+  test_statementAfterAlwaysThrowsFunction() async {
+    addMetaPackage();
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+
+@alwaysThrows
+void a() {
+  throw 'msg';
+}
+
+f() {
+  var one = 1;
+  a();
+  var two = 2;
+}''', [HintCode.DEAD_CODE]);
+  }
+
+  @failingTest
+  test_statementAfterAlwaysThrowsGetter() async {
+    addMetaPackage();
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+
+class C {
+  @alwaysThrows
+  int get a {
+    throw 'msg';
+  }
+
+f() {
+  var one = 1;
+  new C().a;
+  var two = 2;
+}''', [HintCode.DEAD_CODE]);
+  }
+
+  test_statementAfterAlwaysThrowsMethod() async {
+    addMetaPackage();
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+
+class C {
+  @alwaysThrows
+  void a() {
+    throw 'msg';
+  }
+}
+
+f() {
+  var one = 1;
+  new C().a();
+  var two = 2;
+}''', [HintCode.DEAD_CODE]);
+  }
+
+  test_statementAfterBreak_inDefaultCase() async {
+    await assertErrorCodesInCode(r'''
+f(v) {
+  switch(v) {
+    case 1:
+    default:
+      break;
+      var a;
+  }
+}''', [HintCode.DEAD_CODE]);
+  }
+
+  test_statementAfterBreak_inForEachStatement() async {
+    await assertErrorCodesInCode(r'''
+f() {
+  var list;
+  for(var l in list) {
+    break;
+    var a;
+  }
+}''', [HintCode.DEAD_CODE]);
+  }
+
+  test_statementAfterBreak_inForStatement() async {
+    await assertErrorCodesInCode(r'''
+f() {
+  for(;;) {
+    break;
+    var a;
+  }
+}''', [HintCode.DEAD_CODE]);
+  }
+
+  test_statementAfterBreak_inSwitchCase() async {
+    await assertErrorCodesInCode(r'''
+f(v) {
+  switch(v) {
+    case 1:
+      break;
+      var a;
+  }
+}''', [HintCode.DEAD_CODE]);
+  }
+
+  test_statementAfterBreak_inWhileStatement() async {
+    await assertErrorCodesInCode(r'''
+f(v) {
+  while(v) {
+    break;
+    var a;
+  }
+}''', [HintCode.DEAD_CODE]);
+  }
+
+  test_statementAfterContinue_inForEachStatement() async {
+    await assertErrorCodesInCode(r'''
+f() {
+  var list;
+  for(var l in list) {
+    continue;
+    var a;
+  }
+}''', [HintCode.DEAD_CODE]);
+  }
+
+  test_statementAfterContinue_inForStatement() async {
+    await assertErrorCodesInCode(r'''
+f() {
+  for(;;) {
+    continue;
+    var a;
+  }
+}''', [HintCode.DEAD_CODE]);
+  }
+
+  test_statementAfterContinue_inWhileStatement() async {
+    await assertErrorCodesInCode(r'''
+f(v) {
+  while(v) {
+    continue;
+    var a;
+  }
+}''', [HintCode.DEAD_CODE]);
+  }
+
+  test_statementAfterExitingIf_returns() async {
+    await assertErrorCodesInCode(r'''
+f() {
+  if (1 > 2) {
+    return;
+  } else {
+    return;
+  }
+  var one = 1;
+}''', [HintCode.DEAD_CODE]);
+  }
+
+  test_statementAfterIfWithoutElse() async {
+    await assertNoErrorsInCode(r'''
+f() {
+  if (1 < 0) {
+    return;
+  }
+  int a = 1;
+}''');
+  }
+
+  test_statementAfterRethrow() async {
+    await assertErrorCodesInCode(r'''
+f() {
+  try {
+    var one = 1;
+  } catch (e) {
+    rethrow;
+    var two = 2;
+  }
+}''', [HintCode.DEAD_CODE]);
+  }
+
+  test_statementAfterReturn_function() async {
+    await assertErrorCodesInCode(r'''
+f() {
+  var one = 1;
+  return;
+  var two = 2;
+}''', [HintCode.DEAD_CODE]);
+  }
+
+  test_statementAfterReturn_ifStatement() async {
+    await assertErrorCodesInCode(r'''
+f(bool b) {
+  if(b) {
+    var one = 1;
+    return;
+    var two = 2;
+  }
+}''', [HintCode.DEAD_CODE]);
+  }
+
+  test_statementAfterReturn_method() async {
+    await assertErrorCodesInCode(r'''
+class A {
+  m() {
+    var one = 1;
+    return;
+    var two = 2;
+  }
+}''', [HintCode.DEAD_CODE]);
+  }
+
+  test_statementAfterReturn_nested() async {
+    await assertErrorCodesInCode(r'''
+f() {
+  var one = 1;
+  return;
+  if(false) {}
+}''', [HintCode.DEAD_CODE]);
+  }
+
+  test_statementAfterReturn_twoReturns() async {
+    await assertErrorCodesInCode(r'''
+f() {
+  var one = 1;
+  return;
+  var two = 2;
+  return;
+  var three = 3;
+}''', [HintCode.DEAD_CODE]);
+  }
+
+  test_statementAfterThrow() async {
+    await assertErrorCodesInCode(r'''
+f() {
+  var one = 1;
+  throw 'Stop here';
+  var two = 2;
+}''', [HintCode.DEAD_CODE]);
+  }
+}
+
+@reflectiveTest
+class UncheckedUseOfNullableValueTest extends DriverResolutionTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions =>
+      AnalysisOptionsImpl()..enabledExperiments = [EnableString.non_nullable];
+
+  test_nullCoalesce_dynamic() async {
+    await assertNoErrorsInCode(r'''
+@pragma('analyzer:non-nullable')
+library foo;
+
+m() {
+  dynamic x;
+  x ?? 1;
+}
+''');
+  }
+
+  test_nullCoalesce_nonNullable() async {
+    await assertErrorCodesInCode(r'''
+@pragma('analyzer:non-nullable')
+library foo;
+
+m() {
+  int x;
+  x ?? 1;
+}
+''', [HintCode.DEAD_CODE]);
+  }
+
+  test_nullCoalesce_nullable() async {
+    await assertNoErrorsInCode(r'''
+@pragma('analyzer:non-nullable')
+library foo;
+
+m() {
+  int? x;
+  x ?? 1;
+}
+''');
+  }
+
+  test_nullCoalesce_nullType() async {
+    await assertNoErrorsInCode(r'''
+@pragma('analyzer:non-nullable')
+library foo;
+
+m() {
+  Null x;
+  x ?? 1;
+}
+''');
+  }
+
+  test_nullCoalesceAssign_dynamic() async {
+    await assertNoErrorsInCode(r'''
+@pragma('analyzer:non-nullable')
+library foo;
+
+m() {
+  dynamic x;
+  x ??= 1;
+}
+''');
+  }
+
+  test_nullCoalesceAssign_nonNullable() async {
+    await assertErrorCodesInCode(r'''
+@pragma('analyzer:non-nullable')
+library foo;
+
+m() {
+  int x;
+  x ??= 1;
+}
+''', [HintCode.DEAD_CODE]);
+  }
+
+  test_nullCoalesceAssign_nullable() async {
+    await assertNoErrorsInCode(r'''
+@pragma('analyzer:non-nullable')
+library foo;
+
+m() {
+  int? x;
+  x ??= 1;
+}
+''');
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/deprecated_member_use_test.dart b/pkg/analyzer/test/src/diagnostics/deprecated_member_use_test.dart
index 2f91806..700ae9e 100644
--- a/pkg/analyzer/test/src/diagnostics/deprecated_member_use_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/deprecated_member_use_test.dart
@@ -3,6 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/source.dart';
+import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../../generated/resolver_test_case.dart';
@@ -15,216 +17,39 @@
 }
 
 @reflectiveTest
-class DeprecatedMemberUseTest extends ResolverTestCase {
-  @override
-  bool get enableNewAnalysisDriver => true;
-
-  /// Write a pubspec file at [root], so that BestPracticesVerifier can see that
-  /// [root] is the root of a PubWorkspace, and a PubWorkspacePackage.
-  void newPubPackage(String root) {
-    newFile('$root/pubspec.yaml');
-  }
-
-  test_methodInvocation_contructor() async {
-    resetWithFooLibrary(r'''
-class A {
-  @Deprecated('0.9')
-  m() {}
-}
-''');
-
-    newPubPackage('/pkg1');
-    assertErrorsInCode(r'''
-import 'package:foo/foo.dart';
-void main() => A().m();
-''', [HintCode.DEPRECATED_MEMBER_USE], sourceName: '/pkg1/lib/lib1.dart');
-  }
-
-  test_methodInvocation_constant() async {
-    resetWithFooLibrary(r'''
-class A {
-  @deprecated
-  m() {}
-}
-''');
-
-    newPubPackage('/pkg1');
-    assertErrorsInCode(r'''
-import 'package:foo/foo.dart';
-void main() => A().m();
-''', [HintCode.DEPRECATED_MEMBER_USE], sourceName: '/pkg1/lib/lib1.dart');
-  }
-
-  void resetWithFooLibrary(String source) {
-    super.resetWith(packages: [
-      ['foo', source]
-    ]);
-  }
-
-  test_export() async {
-    resetWithFooLibrary(r'''
-@deprecated
-library deprecated_library;
-class A {}
-''');
-
-    newPubPackage('/pkg1');
-    assertErrorsInCode('''
-export 'package:foo/foo.dart';
-''', [HintCode.DEPRECATED_MEMBER_USE], sourceName: '/pkg1/lib/lib1.dart');
-  }
-
-  test_import() async {
-    resetWithFooLibrary(r'''
-@deprecated
-library deprecated_library;
-class A {}
-''');
-
-    newPubPackage('/pkg1');
-    assertErrorsInCode(r'''
-import 'package:foo/foo.dart';
-f(A a) {}
-''', [HintCode.DEPRECATED_MEMBER_USE], sourceName: '/pkg1/lib/lib1.dart');
-  }
-
+class DeprecatedMemberUseFromSamePackageTest extends ResolverTestCase {
   test_basicWorkspace() async {
-    resetWithFooLibrary(r'''
+    addNamedSource('/workspace/lib/deprecated_library.dart', r'''
 @deprecated
 library deprecated_library;
 class A {}
 ''');
 
     assertErrorsInCode(r'''
-import 'package:foo/foo.dart';
+import 'deprecated_library.dart';
 f(A a) {}
-''', // This is a cross-package deprecated member usage.
-        [HintCode.DEPRECATED_MEMBER_USE],
-        sourceName: '/workspace/project/lib/lib1.dart');
+''', [HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE],
+        sourceName: '/workspace/lib/lib1.dart');
   }
 
   test_bazelWorkspace() async {
-    resetWithFooLibrary(r'''
-@deprecated
-library deprecated_library;
-class A {}
-''');
-
     newFile('/workspace/WORKSPACE');
     newFile('/workspace/project/BUILD');
     newFolder('/workspace/bazel-genfiles');
 
+    addNamedSource('/workspace/project/lib/deprecated_library.dart', r'''
+@deprecated
+library deprecated_library;
+class A {}
+''');
+
     assertErrorsInCode(r'''
-import 'package:foo/foo.dart';
+import 'deprecated_library.dart';
 f(A a) {}
-''', // This is a cross-package deprecated member usage.
-        [HintCode.DEPRECATED_MEMBER_USE],
+''', [HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE],
         sourceName: '/workspace/project/lib/lib1.dart');
   }
 
-  test_bazelWorkspace_sameWorkspace() async {
-    newFile('/workspace/WORKSPACE');
-    newFile('/workspace/project_a/BUILD');
-    newFile('/workspace/project_b/BUILD');
-    newFolder('/workspace/bazel-genfiles');
-
-    addNamedSource('/workspace/project_a/lib/deprecated_library.dart', r'''
-@deprecated
-library deprecated_library;
-class A {}
-''');
-
-    assertErrorsInCode(r'''
-import '../../project_a/lib/deprecated_library.dart';
-f(A a) {}
-''', // This is a same-workspace, cross-package deprecated member usage.
-        [HintCode.DEPRECATED_MEMBER_USE],
-        sourceName: '/workspace/project_b/lib/lib1.dart');
-  }
-
-  test_gnWorkspace() async {
-    resetWithFooLibrary(r'''
-@deprecated
-library deprecated_library;
-class A {}
-''');
-
-    newFolder('/workspace/.jiri_root');
-    newFile('/workspace/project/pubspec.yaml');
-    String buildDir = convertPath('out/debug-x87_128');
-    newFile('/workspace/.config',
-        content: 'FOO=foo\n'
-            'FUCHSIA_BUILD_DIR=$buildDir\n'
-            'BAR=bar\n');
-    newFile('/workspace/out/debug-x87_128/dartlang/gen/project/foo.packages');
-
-    assertErrorsInCode(r'''
-import 'package:foo/foo.dart';
-f(A a) {}
-''', // This is a cross-package deprecated member usage.
-        [HintCode.DEPRECATED_MEMBER_USE],
-        sourceName: '/workspace/project/lib/lib1.dart');
-  }
-
-  test_gnWorkspace_sameWorkspace() async {
-    newFolder('/workspace/.jiri_root');
-    newFile('/workspace/project_a/pubspec.yaml');
-    newFile('/workspace/project_b/pubspec.yaml');
-    newFile('/workspace/project_a/BUILD.gn');
-    newFile('/workspace/project_b/BUILD.gn');
-    String buildDir = convertPath('out/debug-x87_128');
-    newFile('/workspace/.config',
-        content: 'FOO=foo\n'
-            'FUCHSIA_BUILD_DIR=$buildDir\n');
-    newFile('/workspace/out/debug-x87_128/dartlang/gen/project_a/foo.packages');
-
-    addNamedSource('/workspace/project_a/lib/deprecated_library.dart', r'''
-@deprecated
-library deprecated_library;
-class A {}
-''');
-
-    assertErrorsInCode(r'''
-import '../../project_a/lib/deprecated_library.dart';
-f(A a) {}
-''', // This is a same-workspace, cross-package deprecated member usage.
-        [HintCode.DEPRECATED_MEMBER_USE],
-        sourceName: '/workspace/project_b/lib/lib1.dart');
-  }
-
-  test_packageBuildWorkspace() async {
-    resetWithFooLibrary(r'''
-@deprecated
-library deprecated_library;
-class A {}
-''');
-
-    newFolder('/workspace/.dart_tool/build/generated/project/lib');
-    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
-    assertErrorsInCode(r'''
-import 'package:foo/foo.dart';
-f(A a) {}
-''', // This is a cross-package deprecated member usage.
-        [HintCode.DEPRECATED_MEMBER_USE],
-        sourceName: '/workspace/package/lib/lib1.dart');
-  }
-}
-
-@reflectiveTest
-class DeprecatedMemberUseFromSamePackageTest extends ResolverTestCase {
-  @override
-  bool get enableNewAnalysisDriver => true;
-
-  test_methodInvocation_contructor() async {
-    assertErrorsInCode(r'''
-class A {
-  @Deprecated('0.9')
-  m() {}
-  n() {m();}
-}
-''', [HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE]);
-  }
-
   test_call() async {
     await assertErrorsInCode(r'''
 class A {
@@ -286,6 +111,29 @@
 ''', [HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE]);
   }
 
+  test_gnWorkspace() async {
+    newFolder('/workspace/.jiri_root');
+    newFile('/workspace/project/pubspec.yaml');
+    newFile('/workspace/project/BUILD.gn');
+    String buildDir = convertPath('out/debug-x87_128');
+    newFile('/workspace/.config',
+        content: 'FOO=foo\n'
+            'FUCHSIA_BUILD_DIR=$buildDir\n');
+    newFile('/workspace/out/debug-x87_128/dartlang/gen/project/foo.packages');
+
+    addNamedSource('/workspace/project/lib/deprecated_library.dart', r'''
+@deprecated
+library deprecated_library;
+class A {}
+''');
+
+    assertErrorsInCode(r'''
+import 'deprecated_library.dart';
+f(A a) {}
+''', [HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE],
+        sourceName: '/workspace/project/lib/lib1.dart');
+  }
+
   test_import() async {
     addNamedSource("/deprecated_library.dart", r'''
 @deprecated
@@ -451,6 +299,16 @@
 ''', [HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE]);
   }
 
+  test_methodInvocation_constructor() async {
+    assertErrorsInCode(r'''
+class A {
+  @Deprecated('0.9')
+  m() {}
+  n() {m();}
+}
+''', [HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE]);
+  }
+
   test_operator() async {
     await assertErrorsInCode(r'''
 class A {
@@ -464,6 +322,24 @@
 ''', [HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE]);
   }
 
+  test_packageBuildWorkspace() async {
+    newFolder('/workspace/.dart_tool/build/generated/project/lib');
+    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
+    newFileWithBytes('/workspace/.packages', 'project:lib/'.codeUnits);
+
+    addNamedSource('/workspace/lib/deprecated_library.dart', r'''
+@deprecated
+library deprecated_library;
+class A {}
+''');
+
+    assertErrorsInCode(r'''
+import 'deprecated_library.dart';
+f(A a) {}
+''', [HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE],
+        sourceName: '/workspace/lib/lib1.dart');
+  }
+
   test_parameter_named() async {
     await assertErrorsInCode(r'''
 class A {
@@ -559,77 +435,202 @@
 }
 ''', [HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE]);
   }
+}
+
+@reflectiveTest
+class DeprecatedMemberUseTest extends ResolverTestCase {
+  /// Write a pubspec file at [root], so that BestPracticesVerifier can see that
+  /// [root] is the root of a PubWorkspace, and a PubWorkspacePackage.
+  void newPubPackage(String root) {
+    newFile('$root/pubspec.yaml');
+  }
+
+  void resetWithFooLibrary(String source) {
+    super.resetWith(packages: [
+      ['foo', source]
+    ]);
+  }
 
   test_basicWorkspace() async {
-    addNamedSource('/workspace/lib/deprecated_library.dart', r'''
+    resetWithFooLibrary(r'''
 @deprecated
 library deprecated_library;
 class A {}
 ''');
 
     assertErrorsInCode(r'''
-import 'deprecated_library.dart';
+import 'package:foo/foo.dart';
 f(A a) {}
-''', [HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE],
-        sourceName: '/workspace/lib/lib1.dart');
+''', // This is a cross-package deprecated member usage.
+        [HintCode.DEPRECATED_MEMBER_USE],
+        sourceName: '/workspace/project/lib/lib1.dart');
   }
 
   test_bazelWorkspace() async {
+    resetWithFooLibrary(r'''
+@deprecated
+library deprecated_library;
+class A {}
+''');
+
     newFile('/workspace/WORKSPACE');
     newFile('/workspace/project/BUILD');
     newFolder('/workspace/bazel-genfiles');
 
-    addNamedSource('/workspace/project/lib/deprecated_library.dart', r'''
+    assertErrorsInCode(r'''
+import 'package:foo/foo.dart';
+f(A a) {}
+''', // This is a cross-package deprecated member usage.
+        [HintCode.DEPRECATED_MEMBER_USE],
+        sourceName: '/workspace/project/lib/lib1.dart');
+  }
+
+  test_bazelWorkspace_sameWorkspace() async {
+    newFile('/workspace/WORKSPACE');
+    newFile('/workspace/project_a/BUILD');
+    newFile('/workspace/project_b/BUILD');
+    newFolder('/workspace/bazel-genfiles');
+
+    addNamedSource('/workspace/project_a/lib/deprecated_library.dart', r'''
 @deprecated
 library deprecated_library;
 class A {}
 ''');
 
     assertErrorsInCode(r'''
-import 'deprecated_library.dart';
+import '../../project_a/lib/deprecated_library.dart';
 f(A a) {}
-''', [HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE],
-        sourceName: '/workspace/project/lib/lib1.dart');
+''', // This is a same-workspace, cross-package deprecated member usage.
+        [HintCode.DEPRECATED_MEMBER_USE],
+        sourceName: '/workspace/project_b/lib/lib1.dart');
+  }
+
+  test_export() async {
+    resetWithFooLibrary(r'''
+@deprecated
+library deprecated_library;
+class A {}
+''');
+
+    newPubPackage('/pkg1');
+    assertErrorsInCode('''
+export 'package:foo/foo.dart';
+''', [HintCode.DEPRECATED_MEMBER_USE], sourceName: '/pkg1/lib/lib1.dart');
   }
 
   test_gnWorkspace() async {
+    resetWithFooLibrary(r'''
+@deprecated
+library deprecated_library;
+class A {}
+''');
+
     newFolder('/workspace/.jiri_root');
     newFile('/workspace/project/pubspec.yaml');
-    newFile('/workspace/project/BUILD.gn');
+    String buildDir = convertPath('out/debug-x87_128');
+    newFile('/workspace/.config',
+        content: 'FOO=foo\n'
+            'FUCHSIA_BUILD_DIR=$buildDir\n'
+            'BAR=bar\n');
+    newFile('/workspace/out/debug-x87_128/dartlang/gen/project/foo.packages');
+
+    assertErrorsInCode(r'''
+import 'package:foo/foo.dart';
+f(A a) {}
+''', // This is a cross-package deprecated member usage.
+        [HintCode.DEPRECATED_MEMBER_USE],
+        sourceName: '/workspace/project/lib/lib1.dart');
+  }
+
+  test_gnWorkspace_sameWorkspace() async {
+    newFolder('/workspace/.jiri_root');
+    newFile('/workspace/project_a/pubspec.yaml');
+    newFile('/workspace/project_b/pubspec.yaml');
+    newFile('/workspace/project_a/BUILD.gn');
+    newFile('/workspace/project_b/BUILD.gn');
     String buildDir = convertPath('out/debug-x87_128');
     newFile('/workspace/.config',
         content: 'FOO=foo\n'
             'FUCHSIA_BUILD_DIR=$buildDir\n');
-    newFile('/workspace/out/debug-x87_128/dartlang/gen/project/foo.packages');
+    newFile('/workspace/out/debug-x87_128/dartlang/gen/project_a/foo.packages');
 
-    addNamedSource('/workspace/project/lib/deprecated_library.dart', r'''
+    addNamedSource('/workspace/project_a/lib/deprecated_library.dart', r'''
 @deprecated
 library deprecated_library;
 class A {}
 ''');
 
     assertErrorsInCode(r'''
-import 'deprecated_library.dart';
+import '../../project_a/lib/deprecated_library.dart';
 f(A a) {}
-''', [HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE],
-        sourceName: '/workspace/project/lib/lib1.dart');
+''', // This is a same-workspace, cross-package deprecated member usage.
+        [HintCode.DEPRECATED_MEMBER_USE],
+        sourceName: '/workspace/project_b/lib/lib1.dart');
+  }
+
+  test_import() async {
+    resetWithFooLibrary(r'''
+@deprecated
+library deprecated_library;
+class A {}
+''');
+
+    newPubPackage('/pkg1');
+    Source source = addNamedSource('/pkg1/lib/lib1.dart', r'''
+import 'package:foo/foo.dart';
+f(A a) {}
+''');
+    await computeAnalysisResult(source);
+    assertErrors(source, [HintCode.DEPRECATED_MEMBER_USE]);
+    this.verify([source]);
+    TestAnalysisResult result = analysisResults[source];
+    expect(result.errors[0].message, contains('package:foo/foo.dart'));
+  }
+
+  test_methodInvocation_constant() async {
+    resetWithFooLibrary(r'''
+class A {
+  @deprecated
+  m() {}
+}
+''');
+
+    newPubPackage('/pkg1');
+    assertErrorsInCode(r'''
+import 'package:foo/foo.dart';
+void main() => A().m();
+''', [HintCode.DEPRECATED_MEMBER_USE], sourceName: '/pkg1/lib/lib1.dart');
+  }
+
+  test_methodInvocation_contructor() async {
+    resetWithFooLibrary(r'''
+class A {
+  @Deprecated('0.9')
+  m() {}
+}
+''');
+
+    newPubPackage('/pkg1');
+    assertErrorsInCode(r'''
+import 'package:foo/foo.dart';
+void main() => A().m();
+''', [HintCode.DEPRECATED_MEMBER_USE], sourceName: '/pkg1/lib/lib1.dart');
   }
 
   test_packageBuildWorkspace() async {
-    newFolder('/workspace/.dart_tool/build/generated/project/lib');
-    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
-    newFileWithBytes('/workspace/.packages', 'project:lib/'.codeUnits);
-
-    addNamedSource('/workspace/lib/deprecated_library.dart', r'''
+    resetWithFooLibrary(r'''
 @deprecated
 library deprecated_library;
 class A {}
 ''');
 
+    newFolder('/workspace/.dart_tool/build/generated/project/lib');
+    newFileWithBytes('/workspace/pubspec.yaml', 'name: project'.codeUnits);
     assertErrorsInCode(r'''
-import 'deprecated_library.dart';
+import 'package:foo/foo.dart';
 f(A a) {}
-''', [HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE],
-        sourceName: '/workspace/lib/lib1.dart');
+''', // This is a cross-package deprecated member usage.
+        [HintCode.DEPRECATED_MEMBER_USE],
+        sourceName: '/workspace/package/lib/lib1.dart');
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/division_optimization_test.dart b/pkg/analyzer/test/src/diagnostics/division_optimization_test.dart
index 7fb98b8..1ef1b7e 100644
--- a/pkg/analyzer/test/src/diagnostics/division_optimization_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/division_optimization_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../generated/resolver_test_case.dart';
+import '../dart/resolution/driver_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,10 +14,7 @@
 }
 
 @reflectiveTest
-class DivisionOptimizationTest extends ResolverTestCase {
-  @override
-  bool get enableNewAnalysisDriver => true;
-
+class DivisionOptimizationTest extends DriverResolutionTest {
   test_divisionOptimization() async {
     await assertNoErrorsInCode(r'''
 f(int x, int y) {
@@ -27,7 +24,7 @@
   }
 
   test_double() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 f(double x, double y) {
   var v = (x / y).toInt();
 }
@@ -43,7 +40,7 @@
   }
 
   test_int() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 f(int x, int y) {
   var v = (x / y).toInt();
 }
@@ -62,7 +59,7 @@
   }
 
   test_wrappedInParentheses() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 f(int x, int y) {
   var v = (((x / y))).toInt();
 }
diff --git a/pkg/analyzer/test/src/diagnostics/duplicate_import_test.dart b/pkg/analyzer/test/src/diagnostics/duplicate_import_test.dart
new file mode 100644
index 0000000..d168502
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/duplicate_import_test.dart
@@ -0,0 +1,127 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(DuplicateImportTest);
+  });
+}
+
+@reflectiveTest
+class DuplicateImportTest extends DriverResolutionTest {
+  test_duplicateImport() async {
+    newFile('/lib2.dart', content: r'''
+library L;
+import 'lib1.dart';
+import 'lib1.dart';
+A a;''');
+
+    newFile('/lib1.dart', content: r'''
+library lib1;
+class A {}''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib2.dart');
+    assertTestErrorsWithCodes([HintCode.DUPLICATE_IMPORT]);
+  }
+
+  test_importsHaveIdenticalShowHide() async {
+    newFile('/lib2.dart', content: r'''
+library L;
+import 'lib1.dart' as M show A hide B;
+import 'lib1.dart' as M show A hide B;
+M.A a;''');
+
+    newFile('/lib1.dart', content: r'''
+library lib1;
+class A {}
+class B {}''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib2.dart');
+    assertTestErrorsWithCodes([HintCode.DUPLICATE_IMPORT]);
+  }
+
+  test_oneImportHasHide() async {
+    newFile('/lib2.dart', content: r'''
+library L;
+import 'lib1.dart';
+import 'lib1.dart' hide A;
+A a;
+B b;''');
+
+    newFile('/lib1.dart', content: r'''
+library lib1;
+class A {}
+class B {}''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib2.dart');
+    assertNoTestErrors();
+  }
+
+  test_oneImportHasShow() async {
+    newFile('/lib2.dart', content: r'''
+library L;
+import 'lib1.dart';
+import 'lib1.dart' show A;
+A a;
+B b;''');
+
+    newFile('/lib1.dart', content: r'''
+library lib1;
+class A {}
+class B {}''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib2.dart');
+    assertNoTestErrors();
+  }
+
+  test_oneImportUsesAs() async {
+    newFile('/lib2.dart', content: r'''
+library L;
+import 'lib1.dart';
+import 'lib1.dart' as one;
+A a;
+one.A a2;''');
+
+    newFile('/lib1.dart', content: r'''
+library lib1;
+class A {}''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib2.dart');
+    assertNoTestErrors();
+  }
+
+  test_twoDuplicateImports() async {
+    newFile('/lib2.dart', content: r'''
+library L;
+import 'lib1.dart';
+import 'lib1.dart';
+import 'lib1.dart';
+A a;''');
+    newFile('/lib1.dart', content: r'''
+library lib1;
+class A {}''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib2.dart');
+    assertTestErrorsWithCodes(
+        [HintCode.DUPLICATE_IMPORT, HintCode.DUPLICATE_IMPORT]);
+  }
+
+  /// Resolve the test file at [path].
+  ///
+  /// Similar to ResolutionTest.resolveTestFile, but a custom path is supported.
+  Future<void> _resolveTestFile(String path) async {
+    result = await resolveFile(convertPath(path));
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/equal_elements_in_const_set_test.dart b/pkg/analyzer/test/src/diagnostics/equal_elements_in_const_set_test.dart
new file mode 100644
index 0000000..91c8202f
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/equal_elements_in_const_set_test.dart
@@ -0,0 +1,157 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(EqualElementsInConstSetTest);
+    defineReflectiveTests(EqualElementsInConstSetWithUIAsCodeAndConstantsTest);
+    defineReflectiveTests(EqualElementsInConstSetWithUIAsCodeTest);
+  });
+}
+
+@reflectiveTest
+class EqualElementsInConstSetTest extends DriverResolutionTest {
+  test_const_entry() async {
+    await assertErrorCodesInCode('''
+var c = const {1, 2, 1};
+''', [CompileTimeErrorCode.EQUAL_ELEMENTS_IN_CONST_SET]);
+  }
+
+  test_const_instanceCreation_equalTypeArgs() async {
+    await assertErrorCodesInCode(r'''
+class A<T> {
+  const A();
+}
+
+var c = const {const A<int>(), const A<int>()};
+''', [CompileTimeErrorCode.EQUAL_ELEMENTS_IN_CONST_SET]);
+  }
+
+  test_const_instanceCreation_notEqualTypeArgs() async {
+    // No error because A<int> and A<num> are different types.
+    await assertNoErrorsInCode(r'''
+class A<T> {
+  const A();
+}
+
+var c = const {const A<int>(), const A<num>()};
+''');
+  }
+
+  test_nonConst_entry() async {
+    await assertNoErrorsInCode('''
+var c = {1, 2, 1};
+''');
+  }
+}
+
+@reflectiveTest
+class EqualElementsInConstSetWithUIAsCodeAndConstantsTest
+    extends EqualElementsInConstSetWithUIAsCodeTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+      EnableString.constant_update_2018
+    ];
+}
+
+@reflectiveTest
+class EqualElementsInConstSetWithUIAsCodeTest
+    extends EqualElementsInConstSetTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+    ];
+
+  test_const_ifElement_thenElseFalse() async {
+    await assertErrorCodesInCode(
+        '''
+var c = const {1, if (1 < 0) 2 else 1};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.EQUAL_ELEMENTS_IN_CONST_SET]
+            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+
+  test_const_ifElement_thenElseFalse_onlyElse() async {
+    assertErrorCodesInCode(
+        '''
+var c = const {if (0 < 1) 1 else 1};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+
+  test_const_ifElement_thenElseTrue() async {
+    assertErrorCodesInCode(
+        '''
+var c = const {1, if (0 < 1) 2 else 1};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+
+  test_const_ifElement_thenElseTrue_onlyThen() async {
+    assertErrorCodesInCode(
+        '''
+var c = const {if (0 < 1) 1 else 1};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+
+  test_const_ifElement_thenFalse() async {
+    assertErrorCodesInCode(
+        '''
+var c = const {2, if (1 < 0) 2};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+
+  test_const_ifElement_thenTrue() async {
+    await assertErrorCodesInCode(
+        '''
+var c = const {1, if (0 < 1) 1};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.EQUAL_ELEMENTS_IN_CONST_SET]
+            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+
+  test_const_spread__noDuplicate() async {
+    await assertErrorCodesInCode(
+        '''
+var c = const {1, ...{2}};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+
+  test_const_spread_hasDuplicate() async {
+    await assertErrorCodesInCode(
+        '''
+var c = const {1, ...{1}};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.EQUAL_ELEMENTS_IN_CONST_SET]
+            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/equal_keys_in_const_map_test.dart b/pkg/analyzer/test/src/diagnostics/equal_keys_in_const_map_test.dart
new file mode 100644
index 0000000..c4ff97b
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/equal_keys_in_const_map_test.dart
@@ -0,0 +1,156 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(EqualKeysInConstMapTest);
+    defineReflectiveTests(EqualKeysInConstMapWithUIAsCodeAndConstantsTest);
+    defineReflectiveTests(EqualKeysInConstMapWithUIAsCodeTest);
+  });
+}
+
+@reflectiveTest
+class EqualKeysInConstMapTest extends DriverResolutionTest {
+  test_const_entry() async {
+    await assertErrorCodesInCode('''
+var c = const {1: null, 2: null, 1: null};
+''', [CompileTimeErrorCode.EQUAL_KEYS_IN_CONST_MAP]);
+  }
+
+  test_const_instanceCreation_equalTypeArgs() async {
+    await assertErrorCodesInCode(r'''
+class A<T> {
+  const A();
+}
+
+var c = const {const A<int>(): null, const A<int>(): null};
+''', [CompileTimeErrorCode.EQUAL_KEYS_IN_CONST_MAP]);
+  }
+
+  test_const_instanceCreation_notEqualTypeArgs() async {
+    // No error because A<int> and A<num> are different types.
+    await assertNoErrorsInCode(r'''
+class A<T> {
+  const A();
+}
+
+var c = const {const A<int>(): null, const A<num>(): null};
+''');
+  }
+
+  test_nonConst_entry() async {
+    await assertNoErrorsInCode('''
+var c = {1: null, 2: null, 1: null};
+''');
+  }
+}
+
+@reflectiveTest
+class EqualKeysInConstMapWithUIAsCodeAndConstantsTest
+    extends EqualKeysInConstMapWithUIAsCodeTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+      EnableString.constant_update_2018
+    ];
+}
+
+@reflectiveTest
+class EqualKeysInConstMapWithUIAsCodeTest extends EqualKeysInConstMapTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+    ];
+
+  test_const_ifElement_thenElseFalse() async {
+    await assertErrorCodesInCode(
+        '''
+var c = const {1: null, if (1 < 0) 2: null else 1: null};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.EQUAL_KEYS_IN_CONST_MAP]
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_ifElement_thenElseFalse_onlyElse() async {
+    assertErrorCodesInCode(
+        '''
+var c = const {if (0 < 1) 1: null else 1: null};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_ifElement_thenElseTrue() async {
+    assertErrorCodesInCode(
+        '''
+var c = const {1: null, if (0 < 1) 2: null else 1: null};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_ifElement_thenElseTrue_onlyThen() async {
+    assertErrorCodesInCode(
+        '''
+var c = const {if (0 < 1) 1: null else 1: null};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_ifElement_thenFalse() async {
+    assertErrorCodesInCode(
+        '''
+var c = const {2: null, if (1 < 0) 2: 2};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_ifElement_thenTrue() async {
+    await assertErrorCodesInCode(
+        '''
+var c = const {1: null, if (0 < 1) 1: null};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.EQUAL_KEYS_IN_CONST_MAP]
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_spread__noDuplicate() async {
+    await assertErrorCodesInCode(
+        '''
+var c = const {1: null, ...{2: null}};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_spread_hasDuplicate() async {
+    await assertErrorCodesInCode(
+        '''
+var c = const {1: null, ...{1: null}};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.EQUAL_KEYS_IN_CONST_MAP]
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/expression_in_map_test.dart b/pkg/analyzer/test/src/diagnostics/expression_in_map_test.dart
new file mode 100644
index 0000000..b53dea9
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/expression_in_map_test.dart
@@ -0,0 +1,77 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/dart/error/syntactic_errors.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ExpressionInMapTest);
+    defineReflectiveTests(ExpressionInMapWithUiAsCodeTest);
+  });
+}
+
+@reflectiveTest
+class ExpressionInMapTest extends DriverResolutionTest {
+  bool get isUiAsCode => analysisOptions.experimentStatus.spread_collections;
+
+  test_map() async {
+    await assertErrorCodesInCode(
+      '''
+var m = <String, int>{'a', 'b' : 2};
+''',
+      isUiAsCode
+          ? [
+              CompileTimeErrorCode.EXPRESSION_IN_MAP,
+            ]
+          : [
+              ParserErrorCode.EXPECTED_TOKEN,
+              ParserErrorCode.MISSING_IDENTIFIER
+            ],
+    );
+  }
+
+  test_map_const() async {
+    await assertErrorCodesInCode(
+      '''
+var m = <String, int>{'a', 'b' : 2};
+''',
+      isUiAsCode
+          ? [
+              CompileTimeErrorCode.EXPRESSION_IN_MAP,
+            ]
+          : [
+              ParserErrorCode.EXPECTED_TOKEN,
+              ParserErrorCode.MISSING_IDENTIFIER
+            ],
+    );
+  }
+}
+
+@reflectiveTest
+class ExpressionInMapWithUiAsCodeTest extends ExpressionInMapTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+    ];
+
+  test_map() async {
+    await assertErrorCodesInCode('''
+var m = <String, int>{'a', 'b' : 2};
+''', [CompileTimeErrorCode.EXPRESSION_IN_MAP]);
+  }
+
+  test_map_const() async {
+    await assertErrorCodesInCode('''
+var m = <String, int>{'a', 'b' : 2};
+''', [CompileTimeErrorCode.EXPRESSION_IN_MAP]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/import_deferred_library_with_load_function_test.dart b/pkg/analyzer/test/src/diagnostics/import_deferred_library_with_load_function_test.dart
new file mode 100644
index 0000000..6563a8a
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/import_deferred_library_with_load_function_test.dart
@@ -0,0 +1,72 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ImportDeferredLibraryWithLoadFunctionTest);
+  });
+}
+
+@reflectiveTest
+class ImportDeferredLibraryWithLoadFunctionTest extends DriverResolutionTest {
+  test_deferredImport_withLoadLibraryFunction() async {
+    newFile('/pkg1/lib/lib1.dart', content: r'''
+library lib1;
+loadLibrary() {}
+f() {}''');
+
+    newFile('/pkg1/lib/lib2.dart', content: r'''
+library root;
+import 'lib1.dart' deferred as lib1;
+main() { lib1.f(); }''');
+
+    await _resolveTestFile('/pkg1/lib/lib1.dart');
+    await _resolveTestFile('/pkg1/lib/lib2.dart');
+    assertTestErrorsWithCodes(
+        [HintCode.IMPORT_DEFERRED_LIBRARY_WITH_LOAD_FUNCTION]);
+  }
+
+  test_deferredImport_withoutLoadLibraryFunction() async {
+    newFile('/pkg1/lib/lib1.dart', content: r'''
+library lib1;
+f() {}''');
+
+    newFile('/pkg1/lib/lib2.dart', content: r'''
+library root;
+import 'lib1.dart' deferred as lib1;
+main() { lib1.f(); }''');
+
+    await _resolveTestFile('/pkg1/lib/lib1.dart');
+    await _resolveTestFile('/pkg1/lib/lib2.dart');
+    assertNoTestErrors();
+  }
+
+  test_nonDeferredImport_withLoadLibraryFunction() async {
+    newFile('/pkg1/lib/lib1.dart', content: r'''
+library lib1;
+loadLibrary() {}
+f() {}''');
+
+    newFile('/pkg1/lib/lib2.dart', content: r'''
+library root;
+import 'lib1.dart' as lib1;
+main() { lib1.f(); }''');
+
+    await _resolveTestFile('/pkg1/lib/lib1.dart');
+    await _resolveTestFile('/pkg1/lib/lib2.dart');
+    assertNoTestErrors();
+  }
+
+  /// Resolve the test file at [path].
+  ///
+  /// Similar to ResolutionTest.resolveTestFile, but a custom path is supported.
+  Future<void> _resolveTestFile(String path) async {
+    result = await resolveFile(convertPath(path));
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_assignment_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_assignment_test.dart
index f35bbcc..6e45cc9 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_assignment_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_assignment_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../generated/resolver_test_case.dart';
+import '../dart/resolution/driver_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,12 +14,9 @@
 }
 
 @reflectiveTest
-class InvalidAssignmentTest extends ResolverTestCase {
-  @override
-  bool get enableNewAnalysisDriver => true;
-
+class InvalidAssignmentTest extends DriverResolutionTest {
   test_instanceVariable() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class A {
   int x;
 }
@@ -33,7 +30,7 @@
   }
 
   test_localVariable() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 f(var y) {
   if (y is String) {
     int x = y;
@@ -61,7 +58,7 @@
   }
 
   test_staticVariable() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class A {
   static int x;
 }
@@ -74,7 +71,7 @@
   }
 
   test_typeParameterRecursion_regress35306() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class A {}
 class B extends A {}
 class C extends D {}
@@ -90,7 +87,7 @@
 
   test_variableDeclaration() async {
     // 17971
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class Point {
   final num x, y;
   Point(this.x, this.y);
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_cast_new_expr_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_cast_new_expr_test.dart
index 125d43d..c60fc29 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_cast_new_expr_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_cast_new_expr_test.dart
@@ -3,9 +3,10 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../generated/resolver_test_case.dart';
+import '../dart/resolution/driver_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,15 +15,13 @@
 }
 
 @reflectiveTest
-class InvalidCastNewExprTest extends ResolverTestCase {
+class InvalidCastNewExprTest extends DriverResolutionTest {
   @override
-  List<String> get enabledExperiments => ['set-literals'];
-
-  @override
-  bool get enableNewAnalysisDriver => true;
+  AnalysisOptionsImpl get analysisOptions =>
+      AnalysisOptionsImpl()..enabledExperiments = ['set-literals'];
 
   test_listLiteral_const() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 const c = <B>[A()];
 class A {
   const A();
@@ -30,11 +29,14 @@
 class B extends A {
   const B();
 }
-''', [StrongModeCode.INVALID_CAST_NEW_EXPR]);
+''', [
+      StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE,
+      StrongModeCode.INVALID_CAST_NEW_EXPR,
+    ]);
   }
 
   test_listLiteral_nonConst() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 var c = <B>[A()];
 class A {
   const A();
@@ -46,7 +48,7 @@
   }
 
   test_setLiteral_const() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 const c = <B>{A()};
 class A {
   const A();
@@ -54,11 +56,14 @@
 class B extends A {
   const B();
 }
-''', [StrongModeCode.INVALID_CAST_NEW_EXPR]);
+''', [
+      StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE,
+      StrongModeCode.INVALID_CAST_NEW_EXPR,
+    ]);
   }
 
   test_setLiteral_nonConst() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 var c = <B>{A()};
 class A {
   const A();
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_factory_annotation_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_factory_annotation_test.dart
new file mode 100644
index 0000000..d692547
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/invalid_factory_annotation_test.dart
@@ -0,0 +1,49 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/test_utilities/package_mixin.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(InvalidFactoryAnnotationTest);
+  });
+}
+
+@reflectiveTest
+class InvalidFactoryAnnotationTest extends DriverResolutionTest
+    with PackageMixin {
+  test_class() async {
+    addMetaPackage();
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+@factory
+class X {
+}
+''', [HintCode.INVALID_FACTORY_ANNOTATION]);
+  }
+
+  test_field() async {
+    addMetaPackage();
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+class X {
+  @factory
+  int x;
+}
+''', [HintCode.INVALID_FACTORY_ANNOTATION]);
+  }
+
+  test_topLevelFunction() async {
+    addMetaPackage();
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+@factory
+main() { }
+''', [HintCode.INVALID_FACTORY_ANNOTATION]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_factory_method_impl_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_factory_method_impl_test.dart
new file mode 100644
index 0000000..b685325
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/invalid_factory_method_impl_test.dart
@@ -0,0 +1,143 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/test_utilities/package_mixin.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(InvalidFactoryMethodImplTest);
+  });
+}
+
+@reflectiveTest
+class InvalidFactoryMethodImplTest extends DriverResolutionTest
+    with PackageMixin {
+  test_abstract() async {
+    addMetaPackage();
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+abstract class Stateful {
+  @factory
+  State createState();
+}
+class State { }
+''');
+  }
+
+  test_badReturn() async {
+    addMetaPackage();
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+class Stateful {
+  State _s = new State();
+
+  @factory
+  State createState() => _s;
+}
+class State { }
+''', [HintCode.INVALID_FACTORY_METHOD_IMPL]);
+  }
+
+  test_block() async {
+    addMetaPackage();
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+class Stateful {
+  @factory
+  State createState() {
+    return new State();
+  }
+}
+class State { }
+''');
+  }
+
+  test_block_returnNull() async {
+    addMetaPackage();
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+class Stateful {
+  @factory
+  State createState() {
+    return null;
+  }
+}
+class State { }
+''');
+  }
+
+  test_expr() async {
+    addMetaPackage();
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+class Stateful {
+  @factory
+  State createState() => new State();
+}
+class State { }
+''');
+  }
+
+  test_expr_returnNull() async {
+    addMetaPackage();
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+class Stateful {
+  @factory
+  State createState() => null;
+}
+class State { }
+''');
+  }
+
+  test_noReturnType() async {
+    addMetaPackage();
+    // Null return types will get flagged elsewhere, no need to pile on here.
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+class Stateful {
+  @factory
+  createState() {
+    return new Stateful();
+  }
+}
+''');
+  }
+
+  test_subclass() async {
+    addMetaPackage();
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+abstract class Stateful {
+  @factory
+  State createState();
+}
+class MyThing extends Stateful {
+  @override
+  State createState() {
+    print('my state');
+    return new MyState();
+  }
+}
+class State { }
+class MyState extends State { }
+''');
+  }
+
+  test_voidReturn() async {
+    addMetaPackage();
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+
+class Stateful {
+  @factory
+  void createState() {}
+}
+''', [HintCode.INVALID_FACTORY_METHOD_DECL]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_immutable_annotation_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_immutable_annotation_test.dart
new file mode 100644
index 0000000..f494f73
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/invalid_immutable_annotation_test.dart
@@ -0,0 +1,41 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/test_utilities/package_mixin.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(InvalidImmutableAnnotationTest);
+  });
+}
+
+@reflectiveTest
+class InvalidImmutableAnnotationTest extends DriverResolutionTest
+    with PackageMixin {
+  test_class() async {
+    addMetaPackage();
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+@immutable
+class A {
+  const A();
+}
+''');
+  }
+
+  test_method() async {
+    addMetaPackage();
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  @immutable
+  void m() {}
+}
+''', [HintCode.INVALID_IMMUTABLE_ANNOTATION]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_literal_annotation_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_literal_annotation_test.dart
new file mode 100644
index 0000000..5a3c051
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/invalid_literal_annotation_test.dart
@@ -0,0 +1,52 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/test_utilities/package_mixin.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(InvalidLiteralAnnotationTest);
+  });
+}
+
+@reflectiveTest
+class InvalidLiteralAnnotationTest extends DriverResolutionTest
+    with PackageMixin {
+  test_constConstructor() async {
+    addMetaPackage();
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  @literal
+  const A();
+}
+''');
+  }
+
+  test_nonConstConstructor() async {
+    addMetaPackage();
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  @literal
+  A() {}
+}
+''', [HintCode.INVALID_LITERAL_ANNOTATION]);
+  }
+
+  test_nonConstructor() async {
+    addMetaPackage();
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  @literal
+  void m() {}
+}
+''', [HintCode.INVALID_LITERAL_ANNOTATION]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_override_different_default_values_named_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_override_different_default_values_named_test.dart
index 684a9c3..867b204 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_override_different_default_values_named_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_override_different_default_values_named_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -41,6 +41,70 @@
 }''');
   }
 
+  test_equal_values_generic_different_files() async {
+    newFile('/test/lib/other.dart', content: '''
+class C {
+  f({x: const ['x']}) {}
+}
+''');
+    await assertNoErrorsInCode('''
+import 'other.dart';
+class D extends C {
+  f({x: const ['x']}) {}
+}
+''');
+  }
+
+  test_equal_values_generic_undefined_value_base() async {
+    // Note: we expect some errors due to the constant referring to undefined
+    // values, but there should not be any INVALID_OVERRIDE... error.
+    await assertErrorCodesInCode('''
+class A {
+  m({x = Undefined.value}) {}
+}
+class B extends A {
+  m({x = 1}) {}
+}
+''', [
+      CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE,
+      StaticWarningCode.UNDEFINED_IDENTIFIER
+    ]);
+  }
+
+  test_equal_values_generic_undefined_value_both() async {
+    // Note: we expect some errors due to the constant referring to undefined
+    // values, but there should not be any INVALID_OVERRIDE... error.
+    await assertErrorCodesInCode('''
+class A {
+  m({x = Undefined.value}) {}
+}
+class B extends A {
+  m({x = Undefined2.value2}) {}
+}
+''', [
+      CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE,
+      CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE,
+      StaticWarningCode.UNDEFINED_IDENTIFIER,
+      StaticWarningCode.UNDEFINED_IDENTIFIER
+    ]);
+  }
+
+  test_equal_values_generic_undefined_value_derived() async {
+    // Note: we expect some errors due to the constant referring to undefined
+    // values, but there should not be any INVALID_OVERRIDE... error.
+    await assertErrorCodesInCode('''
+class A {
+  m({x = 1}) {}
+}
+class B extends A {
+  m({x = Undefined.value}) {}
+}
+''', [
+      CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE,
+      StaticWarningCode.UNDEFINED_IDENTIFIER
+    ]);
+  }
+
   test_equalValues() async {
     await assertNoErrorsInCode(r'''
 abstract class A {
@@ -111,7 +175,7 @@
   }
 
   Future<void> _assertError(String code) async {
-    await assertErrorsInCode(code, [
+    await assertErrorCodesInCode(code, [
       StaticWarningCode.INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_NAMED,
     ]);
   }
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_override_different_default_values_positional_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_override_different_default_values_positional_test.dart
index 0de7735..d1421cb 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_override_different_default_values_positional_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_override_different_default_values_positional_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -41,6 +41,70 @@
 }''');
   }
 
+  test_equal_values_generic_different_files() async {
+    newFile('/test/lib/other.dart', content: '''
+class C {
+  f([x = const ['x']]) {}
+}
+''');
+    await assertNoErrorsInCode('''
+import 'other.dart';
+class D extends C {
+  f([x = const ['x']]) {}
+}
+''');
+  }
+
+  test_equal_values_generic_undefined_value_base() async {
+    // Note: we expect some errors due to the constant referring to undefined
+    // values, but there should not be any INVALID_OVERRIDE... error.
+    await assertErrorCodesInCode('''
+class A {
+  m([x = Undefined.value]) {}
+}
+class B extends A {
+  m([x = 1]) {}
+}
+''', [
+      CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE,
+      StaticWarningCode.UNDEFINED_IDENTIFIER
+    ]);
+  }
+
+  test_equal_values_generic_undefined_value_both() async {
+    // Note: we expect some errors due to the constant referring to undefined
+    // values, but there should not be any INVALID_OVERRIDE... error.
+    await assertErrorCodesInCode('''
+class A {
+  m([x = Undefined.value]) {}
+}
+class B extends A {
+  m([x = Undefined2.value2]) {}
+}
+''', [
+      CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE,
+      CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE,
+      StaticWarningCode.UNDEFINED_IDENTIFIER,
+      StaticWarningCode.UNDEFINED_IDENTIFIER
+    ]);
+  }
+
+  test_equal_values_generic_undefined_value_derived() async {
+    // Note: we expect some errors due to the constant referring to undefined
+    // values, but there should not be any INVALID_OVERRIDE... error.
+    await assertErrorCodesInCode('''
+class A {
+  m([x = 1]) {}
+}
+class B extends A {
+  m([x = Undefined.value]) {}
+}
+''', [
+      CompileTimeErrorCode.NON_CONSTANT_DEFAULT_VALUE,
+      StaticWarningCode.UNDEFINED_IDENTIFIER
+    ]);
+  }
+
   test_equalValues() async {
     await assertNoErrorsInCode(r'''
 abstract class A {
@@ -111,7 +175,7 @@
   }
 
   Future<void> _assertError(String code) async {
-    await assertErrorsInCode(code, [
+    await assertErrorCodesInCode(code, [
       StaticWarningCode.INVALID_OVERRIDE_DIFFERENT_DEFAULT_VALUES_POSITIONAL,
     ]);
   }
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_required_param_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_required_param_test.dart
index d426e08..2194b85 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_required_param_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_required_param_test.dart
@@ -3,10 +3,10 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/test_utilities/package_mixin.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../generated/hint_code_test.dart' show metaLibraryStub;
-import '../../generated/resolver_test_case.dart';
+import '../dart/resolution/driver_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,43 +15,39 @@
 }
 
 @reflectiveTest
-class InvalidRequiredParamTest extends ResolverTestCase {
+class InvalidRequiredParamTest extends DriverResolutionTest with PackageMixin {
   @override
-  bool get enableNewAnalysisDriver => true;
-
-  @override
-  void reset() {
-    super.resetWith(packages: [
-      ['meta', metaLibraryStub]
-    ]);
+  void setUp() {
+    super.setUp();
+    addMetaPackage();
   }
 
   test_namedParameter_withDefault() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 import 'package:meta/meta.dart';
 
 m({@required a = 1}) => null;
 ''', [HintCode.INVALID_REQUIRED_PARAM]);
   }
 
-  test_positionalParameter_withDefault() async {
-    await assertErrorsInCode(r'''
-import 'package:meta/meta.dart';
-
-m([@required a = 1]) => null;
-''', [HintCode.INVALID_REQUIRED_PARAM]);
-  }
-
-  test_ppositionalParameter_noDefault() async {
-    await assertErrorsInCode(r'''
+  test_positionalParameter_noDefault() async {
+    await assertErrorCodesInCode(r'''
 import 'package:meta/meta.dart';
 
 m([@required a]) => null;
 ''', [HintCode.INVALID_REQUIRED_PARAM]);
   }
 
+  test_positionalParameter_withDefault() async {
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+
+m([@required a = 1]) => null;
+''', [HintCode.INVALID_REQUIRED_PARAM]);
+  }
+
   test_requiredParameter() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 import 'package:meta/meta.dart';
 
 m(@required a) => null;
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_sealed_annotation_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_sealed_annotation_test.dart
new file mode 100644
index 0000000..428a164
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/invalid_sealed_annotation_test.dart
@@ -0,0 +1,60 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/test_utilities/package_mixin.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(InvalidLiteralAnnotationTest);
+  });
+}
+
+@reflectiveTest
+class InvalidLiteralAnnotationTest extends DriverResolutionTest
+    with PackageMixin {
+  setUp() {
+    super.setUp();
+    addMetaPackage();
+  }
+
+  test_class() async {
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+
+@sealed class A {}
+''');
+  }
+
+  test_mixin() async {
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+
+@sealed mixin M {}
+''', [HintCode.INVALID_SEALED_ANNOTATION]);
+  }
+
+  test_mixinApplication() async {
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+
+abstract class A {}
+
+abstract class B {}
+
+@sealed abstract class M = A with B;
+''');
+  }
+
+  test_nonClass() async {
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+
+@sealed m({a = 1}) => null;
+''', [HintCode.INVALID_SEALED_ANNOTATION]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_use_of_protected_member_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_use_of_protected_member_test.dart
new file mode 100644
index 0000000..0458e81
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/invalid_use_of_protected_member_test.dart
@@ -0,0 +1,427 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/test_utilities/package_mixin.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(InvalidUseOfProtectedMemberTest);
+  });
+}
+
+@reflectiveTest
+class InvalidUseOfProtectedMemberTest extends DriverResolutionTest
+    with PackageMixin {
+  test_closure() async {
+    addMetaPackage();
+    newFile('/lib1.dart', content: r'''
+import 'package:meta/meta.dart';
+
+class A {
+  @protected
+  int a() => 42;
+}
+''');
+    newFile('/lib2.dart', content: r'''
+import 'lib1.dart';
+
+void main() {
+  var leak = new A().a;
+  print(leak);
+}
+''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib2.dart');
+    assertTestErrorsWithCodes([HintCode.INVALID_USE_OF_PROTECTED_MEMBER]);
+  }
+
+  test_extendingSubclass() async {
+    addMetaPackage();
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  @protected
+  void a(){ }
+}
+class B extends A {
+  void b() => a();
+}''');
+  }
+
+  test_field() async {
+    addMetaPackage();
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  @protected
+  int a = 42;
+}
+class B extends A {
+  int b() => a;
+}
+''');
+  }
+
+  test_field_outsideClassAndLibrary() async {
+    addMetaPackage();
+    newFile('/lib1.dart', content: r'''
+import 'package:meta/meta.dart';
+class A {
+  @protected
+  int a;
+}
+''');
+    newFile('/lib2.dart', content: r'''
+import 'lib1.dart';
+abstract class B {
+  int b() => new A().a;
+}
+''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib2.dart');
+    assertTestErrorsWithCodes([HintCode.INVALID_USE_OF_PROTECTED_MEMBER]);
+  }
+
+  test_field_subclassAndSameLibrary() async {
+    addMetaPackage();
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  @protected
+  int a;
+}
+abstract class B implements A {
+  int b() => a;
+}''');
+  }
+
+  test_fromSuperclassConstraint() async {
+    addMetaPackage();
+    newFile('/lib1.dart', content: r'''
+import 'package:meta/meta.dart';
+abstract class A {
+  @protected
+  void foo() {}
+}
+''');
+    newFile('/lib2.dart', content: r'''
+import 'lib1.dart';
+mixin M on A {
+  @override
+  void foo() {
+    super.foo();
+  }
+}
+''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib2.dart');
+    assertNoTestErrors();
+  }
+
+  test_function_outsideClassAndLibrary() async {
+    addMetaPackage();
+    newFile('/lib1.dart', content: r'''
+import 'package:meta/meta.dart';
+class A {
+  @protected
+  void a(){ }
+}
+''');
+    newFile('/lib2.dart', content: r'''
+import 'lib1.dart';
+
+main() {
+  new A().a();
+}
+''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib2.dart');
+    assertTestErrorsWithCodes([HintCode.INVALID_USE_OF_PROTECTED_MEMBER]);
+  }
+
+  test_function_sameLibrary() async {
+    addMetaPackage();
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  @protected
+  void a(){ }
+}
+main() {
+  new A().a();
+}''');
+  }
+
+  test_function_subclass() async {
+    addMetaPackage();
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  @protected
+  int a() => 0;
+}
+
+abstract class B implements A {
+  int b() => a();
+}''');
+  }
+
+  test_getter() async {
+    addMetaPackage();
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  @protected
+  int get a => 42;
+}
+class B extends A {
+  int b() => a;
+}
+''');
+  }
+
+  test_getter_outsideClassAndLibrary() async {
+    addMetaPackage();
+    newFile('/lib1.dart', content: r'''
+import 'package:meta/meta.dart';
+class A {
+  @protected
+  int get a => 42;
+}
+''');
+    newFile('/lib2.dart', content: r'''
+import 'lib1.dart';
+class B {
+  A a;
+  int b() => a.a;
+}
+''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib2.dart');
+    assertTestErrorsWithCodes([HintCode.INVALID_USE_OF_PROTECTED_MEMBER]);
+  }
+
+  test_getter_subclass() async {
+    addMetaPackage();
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  @protected
+  int get a => 42;
+}
+abstract class B implements A {
+  int b() => a;
+}''');
+  }
+
+  test_inDocs() async {
+    addMetaPackage();
+    newFile('/lib1.dart', content: r'''
+import 'package:meta/meta.dart';
+
+class A {
+  @protected
+  int c = 0;
+
+  @protected
+  int get b => 0;
+
+  @protected
+  int a() => 0;
+}
+''');
+    newFile('/lib2.dart', content: r'''
+import 'lib1.dart';
+/// OK: [A.a], [A.b], [A.c].
+f() {}
+''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib2.dart');
+    assertNoTestErrors();
+  }
+
+  test_method_outsideClassAndLibrary() async {
+    addMetaPackage();
+    newFile('/lib1.dart', content: r'''
+import 'package:meta/meta.dart';
+class A {
+  @protected
+  void a() {}
+}
+''');
+    newFile('/lib2.dart', content: r'''
+import 'lib1.dart';
+
+class B {
+  void b() => new A().a();
+}
+''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib2.dart');
+    assertTestErrorsWithCodes([HintCode.INVALID_USE_OF_PROTECTED_MEMBER]);
+  }
+
+  test_method_subclass() async {
+    // https://github.com/dart-lang/linter/issues/257
+    addMetaPackage();
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+
+typedef void VoidCallback();
+
+class State<E> {
+  @protected
+  void setState(VoidCallback fn) {}
+}
+
+class Button extends State<Object> {
+  void handleSomething() {
+    setState(() {});
+  }
+}
+''');
+  }
+
+  test_mixingIn() async {
+    addMetaPackage();
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  @protected
+  void a(){ }
+}
+class B extends Object with A {
+  void b() => a();
+}''');
+  }
+
+  test_mixingIn_asParameter() async {
+    addMetaPackage();
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  @protected m1() {}
+}
+class B extends A {
+  static m2(A a) => a.m1();
+}''');
+  }
+
+  test_sameLibrary() async {
+    addMetaPackage();
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  @protected
+  void a(){ }
+}
+class B extends A {
+  void a() => a();
+}
+main() {
+  new B().a();
+}''');
+  }
+
+  test_setter_outsideClassAndFile() async {
+    addMetaPackage();
+    newFile('/lib1.dart', content: r'''
+import 'package:meta/meta.dart';
+class A {
+  @protected
+  void set a(int i) { }
+}
+''');
+    newFile('/lib2.dart', content: r'''
+import 'lib1.dart';
+class B {
+  A a;
+  b(int i) {
+    a.a = i;
+  }
+}
+''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib2.dart');
+    assertTestErrorsWithCodes([HintCode.INVALID_USE_OF_PROTECTED_MEMBER]);
+  }
+
+  test_setter_sameClass() async {
+    addMetaPackage();
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  int _a;
+  @protected
+  void set a(int a) { _a = a; }
+  A(int a) {
+    this.a = a;
+  }
+}
+''');
+  }
+
+  test_setter_subclass() async {
+    addMetaPackage();
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  @protected
+  void set a(int i) { }
+}
+class B extends A {
+  void b(int i) {
+    a = i;
+  }
+}
+''');
+  }
+
+  test_setter_subclassImplementing() async {
+    addMetaPackage();
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  @protected
+  void set a(int i) { }
+}
+abstract class B implements A {
+  b(int i) {
+    a = i;
+  }
+}''');
+  }
+
+  test_topLevelVariable() async {
+    addMetaPackage();
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+@protected
+int x = 0;
+main() {
+  print(x);
+}''');
+    // TODO(brianwilkerson) This should produce a hint because the
+    // annotation is being applied to the wrong kind of declaration.
+  }
+
+  /// Resolve the test file at [path].
+  ///
+  /// Similar to ResolutionTest.resolveTestFile, but a custom path is supported.
+  Future<void> _resolveTestFile(String path) async {
+    result = await resolveFile(convertPath(path));
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_use_of_visible_for_template_member_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_use_of_visible_for_template_member_test.dart
new file mode 100644
index 0000000..f14c277
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/invalid_use_of_visible_for_template_member_test.dart
@@ -0,0 +1,229 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/test_utilities/package_mixin.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(InvalidUseOfVisibleForTemplateMemberTest);
+  });
+}
+
+@reflectiveTest
+class InvalidUseOfVisibleForTemplateMemberTest extends DriverResolutionTest
+    with PackageMixin {
+  void addAngularMetaPackage() {
+    Folder lib = addPubPackage('angular_meta');
+    newFile(join(lib.path, 'angular_meta.dart'), content: r'''
+library angular.meta;
+
+const _VisibleForTemplate visibleForTemplate = const _VisibleForTemplate();
+
+class _VisibleForTemplate {
+  const _VisibleForTemplate();
+}
+''');
+  }
+
+  test_constructor() async {
+    addAngularMetaPackage();
+    newFile('/lib1.dart', content: r'''
+import 'package:angular_meta/angular_meta.dart';
+class A {
+  int _x;
+
+  @visibleForTemplate
+  A.forTemplate(this._x);
+}
+''');
+    newFile('/lib2.dart', content: r'''
+import 'lib1.dart';
+
+void main() {
+  new A.forTemplate(0);
+}
+''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib2.dart');
+    assertTestErrorsWithCodes(
+        [HintCode.INVALID_USE_OF_VISIBLE_FOR_TEMPLATE_MEMBER]);
+  }
+
+  test_export() async {
+    addAngularMetaPackage();
+    newFile('/lib1.dart', content: r'''
+import 'package:angular_meta/angular_meta.dart';
+
+@visibleForTemplate
+int fn0() => 1;
+''');
+    newFile('/lib2.dart', content: r'''
+export 'lib1.dart' show fn0;
+''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib2.dart');
+    assertNoTestErrors();
+  }
+
+  test_method() async {
+    addAngularMetaPackage();
+    newFile('/lib1.dart', content: r'''
+import 'package:angular_meta/angular_meta.dart';
+class A {
+  @visibleForTemplate
+  void a(){ }
+}
+''');
+    newFile('/lib2.dart', content: r'''
+import 'lib1.dart';
+
+class B {
+  void b() => new A().a();
+}
+''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib2.dart');
+    assertTestErrorsWithCodes(
+        [HintCode.INVALID_USE_OF_VISIBLE_FOR_TEMPLATE_MEMBER]);
+  }
+
+  test_method_fromTemplate() async {
+    addAngularMetaPackage();
+    newFile('/lib1.dart', content: r'''
+import 'package:angular_meta/angular_meta.dart';
+class A {
+  @visibleForTemplate
+  void a(){ }
+}
+''');
+    addAngularMetaPackage();
+    newFile('/lib1.template.dart', content: r'''
+import 'lib1.dart';
+
+class B {
+  void b() => new A().a();
+}
+''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib1.template.dart');
+    assertNoTestErrors();
+  }
+
+  test_propertyAccess() async {
+    addAngularMetaPackage();
+    newFile('/lib1.dart', content: r'''
+import 'package:angular_meta/angular_meta.dart';
+class A {
+  @visibleForTemplate
+  int get a => 7;
+
+  @visibleForTemplate
+  set b(_) => 7;
+}
+''');
+    newFile('/lib2.dart', content: r'''
+import 'lib1.dart';
+
+void main() {
+  new A().a;
+  new A().b = 6;
+}
+''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib2.dart');
+    assertTestErrorsWithCodes([
+      HintCode.INVALID_USE_OF_VISIBLE_FOR_TEMPLATE_MEMBER,
+      HintCode.INVALID_USE_OF_VISIBLE_FOR_TEMPLATE_MEMBER
+    ]);
+  }
+
+  test_protectedAndForTemplate_usedAsProtected() async {
+    addAngularMetaPackage();
+    addMetaPackage();
+    newFile('/lib1.dart', content: r'''
+import 'package:angular_meta/angular_meta.dart';
+import 'package:meta/meta.dart';
+class A {
+  @protected
+  @visibleForTemplate
+  void a(){ }
+}
+''');
+    newFile('/lib2.dart', content: r'''
+import 'lib1.dart';
+class B extends A {
+  void b() => new A().a();
+}
+''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib2.dart');
+    assertNoTestErrors();
+  }
+
+  test_protectedAndForTemplate_usedAsTemplate() async {
+    addAngularMetaPackage();
+    addMetaPackage();
+    newFile('/lib1.dart', content: r'''
+import 'package:angular_meta/angular_meta.dart';
+import 'package:meta/meta.dart';
+class A {
+  @protected
+  @visibleForTemplate
+  void a(){ }
+}
+''');
+    addAngularMetaPackage();
+    addMetaPackage();
+    newFile('/lib1.template.dart', content: r'''
+import 'lib1.dart';
+void main() {
+  new A().a();
+}
+''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib1.template.dart');
+    assertNoTestErrors();
+  }
+
+  test_topLevelFunction() async {
+    addAngularMetaPackage();
+    newFile('/lib1.dart', content: r'''
+import 'package:angular_meta/angular_meta.dart';
+
+@visibleForTemplate
+int fn0() => 1;
+''');
+    newFile('/lib2.dart', content: r'''
+import 'lib1.dart';
+
+void main() {
+  fn0();
+}
+''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib2.dart');
+    assertTestErrorsWithCodes(
+        [HintCode.INVALID_USE_OF_VISIBLE_FOR_TEMPLATE_MEMBER]);
+  }
+
+  /// Resolve the test file at [path].
+  ///
+  /// Similar to ResolutionTest.resolveTestFile, but a custom path is supported.
+  Future<void> _resolveTestFile(String path) async {
+    result = await resolveFile(convertPath(path));
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_use_of_visible_for_testing_member_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_use_of_visible_for_testing_member_test.dart
new file mode 100644
index 0000000..984fbcf
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/invalid_use_of_visible_for_testing_member_test.dart
@@ -0,0 +1,239 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/test_utilities/package_mixin.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(InvalidUseOfVisibleForTestingMemberTest);
+  });
+}
+
+@reflectiveTest
+class InvalidUseOfVisibleForTestingMemberTest extends DriverResolutionTest
+    with PackageMixin {
+  test_constructor() async {
+    addMetaPackage();
+    newFile('/lib1.dart', content: r'''
+import 'package:meta/meta.dart';
+class A {
+  int _x;
+
+  @visibleForTesting
+  A.forTesting(this._x);
+}
+''');
+    newFile('/lib2.dart', content: r'''
+import 'lib1.dart';
+void main() {
+  new A.forTesting(0);
+}
+''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib2.dart');
+    assertTestErrorsWithCodes(
+        [HintCode.INVALID_USE_OF_VISIBLE_FOR_TESTING_MEMBER]);
+  }
+
+  test_export() async {
+    addMetaPackage();
+    newFile('/lib1.dart', content: r'''
+import 'package:meta/meta.dart';
+@visibleForTesting
+int fn0() => 1;
+''');
+    newFile('/lib2.dart', content: r'''
+export 'lib1.dart' show fn0;
+''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib2.dart');
+    assertNoTestErrors();
+  }
+
+  test_fromTestDirectory() async {
+    addMetaPackage();
+    newFile('/lib1.dart', content: r'''
+import 'package:meta/meta.dart';
+class A {
+  @visibleForTesting
+  void a(){ }
+}
+''');
+    newFile('/test/test.dart', content: r'''
+import '../lib1.dart';
+class B {
+  void b() => new A().a();
+}
+''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/test/test.dart');
+    assertNoTestErrors();
+  }
+
+  test_fromTestingDirectory() async {
+    addMetaPackage();
+    newFile('/lib1.dart', content: r'''
+import 'package:meta/meta.dart';
+class A {
+  @visibleForTesting
+  void a(){ }
+}
+''');
+    newFile('/testing/lib1.dart', content: r'''
+import '../lib1.dart';
+class C {
+  void b() => new A().a();
+}
+''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/testing/lib1.dart');
+    assertNoTestErrors();
+  }
+
+  test_getter() async {
+    addMetaPackage();
+    newFile('/lib1.dart', content: r'''
+import 'package:meta/meta.dart';
+class A {
+  @visibleForTesting
+  int get a => 7;
+}
+''');
+    newFile('/lib2.dart', content: r'''
+import 'lib1.dart';
+void main() {
+  new A().a;
+}
+''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib2.dart');
+    assertTestErrorsWithCodes(
+        [HintCode.INVALID_USE_OF_VISIBLE_FOR_TESTING_MEMBER]);
+  }
+
+  test_method() async {
+    addMetaPackage();
+    newFile('/lib1.dart', content: r'''
+import 'package:meta/meta.dart';
+class A {
+  @visibleForTesting
+  void a(){ }
+}
+''');
+    newFile('/lib2.dart', content: r'''
+import 'lib1.dart';
+class B {
+  void b() => new A().a();
+}
+''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib2.dart');
+    assertTestErrorsWithCodes(
+        [HintCode.INVALID_USE_OF_VISIBLE_FOR_TESTING_MEMBER]);
+  }
+
+  test_protectedAndForTesting_usedAsProtected() async {
+    addMetaPackage();
+    newFile('/lib1.dart', content: r'''
+import 'package:meta/meta.dart';
+class A {
+  @protected
+  @visibleForTesting
+  void a(){ }
+}
+''');
+    newFile('/lib2.dart', content: r'''
+import 'lib1.dart';
+class B extends A {
+  void b() => new A().a();
+}
+''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib2.dart');
+    assertNoTestErrors();
+  }
+
+  test_protectedAndForTesting_usedAsTesting() async {
+    addMetaPackage();
+    newFile('/lib1.dart', content: r'''
+import 'package:meta/meta.dart';
+class A {
+  @protected
+  @visibleForTesting
+  void a(){ }
+}
+''');
+    addMetaPackage();
+    newFile('/test/test1.dart', content: r'''
+import '../lib1.dart';
+void main() {
+  new A().a();
+}
+''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/test/test1.dart');
+    assertNoTestErrors();
+  }
+
+  test_setter() async {
+    addMetaPackage();
+    newFile('/lib1.dart', content: r'''
+import 'package:meta/meta.dart';
+class A {
+  @visibleForTesting
+  set b(_) => 7;
+}
+''');
+    newFile('/lib2.dart', content: r'''
+import 'lib1.dart';
+void main() {
+  new A().b = 6;
+}
+''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib2.dart');
+    assertTestErrorsWithCodes(
+        [HintCode.INVALID_USE_OF_VISIBLE_FOR_TESTING_MEMBER]);
+  }
+
+  test_topLevelFunction() async {
+    addMetaPackage();
+    newFile('/lib1.dart', content: r'''
+import 'package:meta/meta.dart';
+@visibleForTesting
+int fn0() => 1;
+''');
+    newFile('/lib2.dart', content: r'''
+import 'lib1.dart';
+void main() {
+  fn0();
+}
+''');
+
+    await _resolveTestFile('/lib1.dart');
+    await _resolveTestFile('/lib2.dart');
+    assertTestErrorsWithCodes(
+        [HintCode.INVALID_USE_OF_VISIBLE_FOR_TESTING_MEMBER]);
+  }
+
+  /// Resolve the test file at [path].
+  ///
+  /// Similar to ResolutionTest.resolveTestFile, but a custom path is supported.
+  Future<void> _resolveTestFile(String path) async {
+    result = await resolveFile(convertPath(path));
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/invalid_visibility_annotation_test.dart b/pkg/analyzer/test/src/diagnostics/invalid_visibility_annotation_test.dart
index b842600..b9523f5 100644
--- a/pkg/analyzer/test/src/diagnostics/invalid_visibility_annotation_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/invalid_visibility_annotation_test.dart
@@ -3,10 +3,10 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/test_utilities/package_mixin.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../generated/hint_code_test.dart' show metaLibraryStub;
-import '../../generated/resolver_test_case.dart';
+import '../dart/resolution/driver_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,119 +15,25 @@
 }
 
 @reflectiveTest
-class InvalidVisibilityAnnotationTest extends ResolverTestCase {
+class InvalidVisibilityAnnotationTest extends DriverResolutionTest
+    with PackageMixin {
   @override
-  bool get enableNewAnalysisDriver => true;
-
-  @override
-  void reset() {
-    super.resetWith(packages: [
-      ['meta', metaLibraryStub]
-    ]);
+  void setUp() {
+    super.setUp();
+    addMetaPackage();
   }
 
-  test_publicTopLevelVariable() async {
-    await assertErrorsInCode(r'''
-import 'package:meta/meta.dart';
-@visibleForTesting final _a = 1;
-''', [HintCode.INVALID_VISIBILITY_ANNOTATION]);
-  }
-
-  test_topLevelVariable_multiplePrivate() async {
-    await assertErrorsInCode(r'''
-import 'package:meta/meta.dart';
-@visibleForTesting final _a = 1, _b = 2;
-''', [
-      HintCode.INVALID_VISIBILITY_ANNOTATION,
-      HintCode.INVALID_VISIBILITY_ANNOTATION
-    ]);
-  }
-
-  test_topLevelVariable_multipleMixed() async {
-    await assertErrorsInCode(r'''
-import 'package:meta/meta.dart';
-@visibleForTesting final _a = 1, b = 2;
-''', [HintCode.INVALID_VISIBILITY_ANNOTATION]);
-  }
-
-  test_topLevelVariable_multiplePublic() async {
-    await assertNoErrorsInCode(r'''
-import 'package:meta/meta.dart';
-@visibleForTesting final a = 1, b = 2;
-''');
-  }
-
-  test_privateTopLevelFucntion() async {
-    await assertErrorsInCode(r'''
-import 'package:meta/meta.dart';
-@visibleForTesting void _f() {}
-''', [HintCode.INVALID_VISIBILITY_ANNOTATION]);
-  }
-
-  test_privateTopLevelFunction() async {
-    await assertErrorsInCode(r'''
-import 'package:meta/meta.dart';
-@visibleForTesting void _f() {}
-''', [HintCode.INVALID_VISIBILITY_ANNOTATION]);
-  }
-
-  test_privateEnum() async {
-    await assertErrorsInCode(r'''
-import 'package:meta/meta.dart';
-@visibleForTesting enum _E {a, b, c}
-''', [HintCode.INVALID_VISIBILITY_ANNOTATION]);
-  }
-
-  test_privateTypedef() async {
-    await assertErrorsInCode(r'''
-import 'package:meta/meta.dart';
-@visibleForTesting typedef _T = Function();
-''', [HintCode.INVALID_VISIBILITY_ANNOTATION]);
-  }
-
-  test_privateClass() async {
-    await assertErrorsInCode(r'''
-import 'package:meta/meta.dart';
-@visibleForTesting class _C {}
-''', [HintCode.INVALID_VISIBILITY_ANNOTATION]);
-  }
-
-  test_privateMixin() async {
-    await assertErrorsInCode(r'''
-import 'package:meta/meta.dart';
-@visibleForTesting mixin _M {}
-''', [HintCode.INVALID_VISIBILITY_ANNOTATION]);
-  }
-
-  test_privateConstructor() async {
-    await assertErrorsInCode(r'''
+  test_fields_multipleMixed() async {
+    await assertErrorCodesInCode(r'''
 import 'package:meta/meta.dart';
 class C {
-  @visibleForTesting C._() {}
-}
-''', [HintCode.INVALID_VISIBILITY_ANNOTATION]);
-  }
-
-  test_privateMethod() async {
-    await assertErrorsInCode(r'''
-import 'package:meta/meta.dart';
-class C {
-  @visibleForTesting void _m() {}
-}
-''', [HintCode.INVALID_VISIBILITY_ANNOTATION]);
-  }
-
-  test_privateField() async {
-    await assertErrorsInCode(r'''
-import 'package:meta/meta.dart';
-class C {
-  @visibleForTesting int _a;
+  @visibleForTesting int _a, b;
 }
 ''', [HintCode.INVALID_VISIBILITY_ANNOTATION]);
   }
 
   test_fields_multiplePrivate() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 import 'package:meta/meta.dart';
 class C {
   @visibleForTesting int _a, _b;
@@ -138,15 +44,6 @@
     ]);
   }
 
-  test_fields_multipleMixed() async {
-    await assertErrorsInCode(r'''
-import 'package:meta/meta.dart';
-class C {
-  @visibleForTesting int _a, b;
-}
-''', [HintCode.INVALID_VISIBILITY_ANNOTATION]);
-  }
-
   test_fields_multiplePublic() async {
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
@@ -156,6 +53,99 @@
 ''');
   }
 
+  test_privateClass() async {
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+@visibleForTesting class _C {}
+''', [HintCode.INVALID_VISIBILITY_ANNOTATION]);
+  }
+
+  test_privateConstructor() async {
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+class C {
+  @visibleForTesting C._() {}
+}
+''', [HintCode.INVALID_VISIBILITY_ANNOTATION]);
+  }
+
+  test_privateEnum() async {
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+@visibleForTesting enum _E {a, b, c}
+''', [HintCode.INVALID_VISIBILITY_ANNOTATION]);
+  }
+
+  test_privateField() async {
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+class C {
+  @visibleForTesting int _a;
+}
+''', [HintCode.INVALID_VISIBILITY_ANNOTATION]);
+  }
+
+  test_privateMethod() async {
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+class C {
+  @visibleForTesting void _m() {}
+}
+''', [HintCode.INVALID_VISIBILITY_ANNOTATION]);
+  }
+
+  test_privateMixin() async {
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+@visibleForTesting mixin _M {}
+''', [HintCode.INVALID_VISIBILITY_ANNOTATION]);
+  }
+
+  test_privateTopLevelFunction() async {
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+@visibleForTesting void _f() {}
+''', [HintCode.INVALID_VISIBILITY_ANNOTATION]);
+  }
+
+  test_privateTopLevelVariable() async {
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+@visibleForTesting final _a = 1;
+''', [HintCode.INVALID_VISIBILITY_ANNOTATION]);
+  }
+
+  test_privateTypedef() async {
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+@visibleForTesting typedef _T = Function();
+''', [HintCode.INVALID_VISIBILITY_ANNOTATION]);
+  }
+
+  test_topLevelVariable_multipleMixed() async {
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+@visibleForTesting final _a = 1, b = 2;
+''', [HintCode.INVALID_VISIBILITY_ANNOTATION]);
+  }
+
+  test_topLevelVariable_multiplePrivate() async {
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+@visibleForTesting final _a = 1, _b = 2;
+''', [
+      HintCode.INVALID_VISIBILITY_ANNOTATION,
+      HintCode.INVALID_VISIBILITY_ANNOTATION
+    ]);
+  }
+
+  test_topLevelVariable_multiplePublic() async {
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+@visibleForTesting final a = 1, b = 2;
+''');
+  }
+
   test_valid() async {
     await assertNoErrorsInCode(r'''
 import 'package:meta/meta.dart';
diff --git a/pkg/analyzer/test/src/diagnostics/list_element_type_not_assignable_test.dart b/pkg/analyzer/test/src/diagnostics/list_element_type_not_assignable_test.dart
new file mode 100644
index 0000000..65a09dc
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/list_element_type_not_assignable_test.dart
@@ -0,0 +1,218 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ListElementTypeNotAssignableTest);
+    defineReflectiveTests(
+        ListElementTypeNotAssignableWithUIAsCodeAndConstantsTest);
+    defineReflectiveTests(ListElementTypeNotAssignableWithUIAsCodeTest);
+  });
+}
+
+@reflectiveTest
+class ListElementTypeNotAssignableTest extends DriverResolutionTest {
+  test_const_stringInt() async {
+    await assertErrorCodesInCode('''
+var v = const <String>[42];
+''', [StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE]);
+  }
+
+  test_const_stringInt_dynamic() async {
+    await assertErrorCodesInCode('''
+const dynamic x = 42;
+var v = const <String>[x];
+''', [StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE]);
+  }
+
+  test_const_stringNull() async {
+    await assertNoErrorsInCode('''
+var v = const <String>[null];
+''');
+  }
+
+  test_const_stringNull_dynamic() async {
+    await assertNoErrorsInCode('''
+const dynamic x = null;
+var v = const <String>[x];
+''');
+  }
+
+  test_const_voidInt() async {
+    await assertNoErrorsInCode('''
+var v = const <void>[42];
+''');
+  }
+
+  test_nonConst_stringInt() async {
+    await assertErrorCodesInCode('''
+var v = <String>[42];
+''', [StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE]);
+  }
+
+  test_nonConst_stringInt_dynamic() async {
+    await assertNoErrorsInCode('''
+const dynamic x = 42;
+var v = <String>[x];
+''');
+  }
+
+  test_nonConst_voidInt() async {
+    await assertNoErrorsInCode('''
+var v = <void>[42];
+''');
+  }
+}
+
+@reflectiveTest
+class ListElementTypeNotAssignableWithUIAsCodeAndConstantsTest
+    extends ListElementTypeNotAssignableWithUIAsCodeTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+      EnableString.constant_update_2018
+    ];
+}
+
+@reflectiveTest
+class ListElementTypeNotAssignableWithUIAsCodeTest
+    extends ListElementTypeNotAssignableTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections
+    ];
+
+  test_const_ifElement_thenElseFalse_intInt() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = 0;
+const dynamic b = 0;
+var v = const <int>[if (1 < 0) a else b];
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+  }
+
+  test_const_ifElement_thenElseFalse_intString() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = 0;
+const dynamic b = 'b';
+var v = const <int>[if (1 < 0) a else b];
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE]
+            : [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+  }
+
+  test_const_ifElement_thenFalse_intString() async {
+    await assertErrorCodesInCode(
+        '''
+var v = const <int>[if (1 < 0) 'a'];
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE]
+            : [
+                StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE,
+                CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT
+              ]);
+  }
+
+  test_const_ifElement_thenFalse_intString_dynamic() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = 'a';
+var v = const <int>[if (1 < 0) a];
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+  }
+
+  test_const_ifElement_thenTrue_intInt() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = 0;
+var v = const <int>[if (true) a];
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+  }
+
+  test_const_ifElement_thenTrue_intString() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = 'a';
+var v = const <int>[if (true) a];
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE]
+            : [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+  }
+
+  test_const_spread_intInt() async {
+    await assertErrorCodesInCode(
+        '''
+var v = const <int>[...[0, 1]];
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+  }
+
+  test_nonConst_ifElement_thenElseFalse_intDynamic() async {
+    await assertNoErrorsInCode('''
+const dynamic a = 'a';
+const dynamic b = 'b';
+var v = <int>[if (1 < 0) a else b];
+''');
+  }
+
+  test_nonConst_ifElement_thenElseFalse_intInt() async {
+    await assertNoErrorsInCode('''
+const dynamic a = 0;
+const dynamic b = 0;
+var v = <int>[if (1 < 0) a else b];
+''');
+  }
+
+  test_nonConst_ifElement_thenFalse_intString() async {
+    await assertErrorCodesInCode('''
+var v = <int>[if (1 < 0) 'a'];
+''', [StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE]);
+  }
+
+  test_nonConst_ifElement_thenTrue_intDynamic() async {
+    await assertNoErrorsInCode('''
+const dynamic a = 'a';
+var v = <int>[if (true) a];
+''');
+  }
+
+  test_nonConst_ifElement_thenTrue_intInt() async {
+    await assertNoErrorsInCode('''
+const dynamic a = 0;
+var v = <int>[if (true) a];
+''');
+  }
+
+  test_nonConst_spread_intInt() async {
+    await assertNoErrorsInCode('''
+var v = <int>[...[0, 1]];
+''');
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/map_entry_not_in_map_test.dart b/pkg/analyzer/test/src/diagnostics/map_entry_not_in_map_test.dart
new file mode 100644
index 0000000..782e3e7
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/map_entry_not_in_map_test.dart
@@ -0,0 +1,65 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/dart/error/syntactic_errors.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(MapEntryNotInMapTest);
+    defineReflectiveTests(MapEntryNotInMapWithUiAsCodeTest);
+  });
+}
+
+@reflectiveTest
+class MapEntryNotInMapTest extends DriverResolutionTest {
+  bool get isUiAsCode => analysisOptions.experimentStatus.spread_collections;
+
+  test_set() async {
+    await assertErrorCodesInCode('''
+var c = <int>{1:2};
+''', [
+      isUiAsCode
+          ? CompileTimeErrorCode.MAP_ENTRY_NOT_IN_MAP
+          : ParserErrorCode.UNEXPECTED_TOKEN
+    ]);
+  }
+
+  test_set_const() async {
+    await assertErrorCodesInCode('''
+var c = const <int>{1:2};
+''', [
+      isUiAsCode
+          ? CompileTimeErrorCode.MAP_ENTRY_NOT_IN_MAP
+          : ParserErrorCode.UNEXPECTED_TOKEN
+    ]);
+  }
+}
+
+@reflectiveTest
+class MapEntryNotInMapWithUiAsCodeTest extends MapEntryNotInMapTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+    ];
+
+  test_set() async {
+    await assertErrorCodesInCode('''
+var c = <int>{1:2};
+''', [CompileTimeErrorCode.MAP_ENTRY_NOT_IN_MAP]);
+  }
+
+  test_set_const() async {
+    await assertErrorCodesInCode('''
+var c = const <int>{1:2};
+''', [CompileTimeErrorCode.MAP_ENTRY_NOT_IN_MAP]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/map_key_type_not_assignable_test.dart b/pkg/analyzer/test/src/diagnostics/map_key_type_not_assignable_test.dart
new file mode 100644
index 0000000..e629629
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/map_key_type_not_assignable_test.dart
@@ -0,0 +1,250 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(MapKeyTypeNotAssignableTest);
+    defineReflectiveTests(MapKeyTypeNotAssignableWithUIAsCodeAndConstantsTest);
+    defineReflectiveTests(MapKeyTypeNotAssignableWithUIAsCodeTest);
+  });
+}
+
+@reflectiveTest
+class MapKeyTypeNotAssignableTest extends DriverResolutionTest {
+  test_const_intInt_dynamic() async {
+    await assertNoErrorsInCode('''
+const dynamic a = 0;
+var v = const <int, bool>{a : true};
+''');
+  }
+
+  test_const_intString_dynamic() async {
+    await assertErrorCodesInCode('''
+const dynamic a = 'a';
+var v = const <int, bool>{a : true};
+''', [StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE]);
+  }
+
+  test_const_intString_value() async {
+    await assertErrorCodesInCode('''
+var v = const <int, bool>{'a' : true};
+''', [StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE]);
+  }
+
+  test_nonConst_intInt_dynamic() async {
+    await assertNoErrorsInCode('''
+const dynamic a = 0;
+var v = <int, bool>{a : true};
+''');
+  }
+
+  test_nonConst_intString_dynamic() async {
+    await assertNoErrorsInCode('''
+const dynamic a = 'a';
+var v = <int, bool>{a : true};
+''');
+  }
+
+  test_nonConst_intString_value() async {
+    await assertErrorCodesInCode('''
+var v = <int, bool>{'a' : true};
+''', [StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE]);
+  }
+}
+
+@reflectiveTest
+class MapKeyTypeNotAssignableWithUIAsCodeAndConstantsTest
+    extends MapKeyTypeNotAssignableWithUIAsCodeTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+      EnableString.constant_update_2018
+    ];
+}
+
+@reflectiveTest
+class MapKeyTypeNotAssignableWithUIAsCodeTest
+    extends MapKeyTypeNotAssignableTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections
+    ];
+
+  test_const_ifElement_thenElseFalse_intInt_dynamic() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = 0;
+const dynamic b = 0;
+var v = const <int, bool>{if (1 < 0) a: true else b: false};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_ifElement_thenElseFalse_intString_dynamic() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = 0;
+const dynamic b = 'b';
+var v = const <int, bool>{if (1 < 0) a: true else b: false};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE]
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_ifElement_thenFalse_intString_dynamic() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = 'a';
+var v = const <int, bool>{if (1 < 0) a: true};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_ifElement_thenFalse_intString_value() async {
+    await assertErrorCodesInCode(
+        '''
+var v = const <int, bool>{if (1 < 0) 'a': true};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE]
+            : [
+                StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE,
+                CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT
+              ]);
+  }
+
+  test_const_ifElement_thenTrue_intInt_dynamic() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = 0;
+var v = const <int, bool>{if (true) a: true};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_ifElement_thenTrue_intString_dynamic() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = 'a';
+var v = const <int, bool>{if (true) a: true};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE]
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_ifElement_thenTrue_notConst() async {
+    await assertErrorCodesInCode(
+        '''
+final a = 0;
+var v = const <int, bool>{if (1 < 2) a: true};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY]
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_spread_intInt() async {
+    await assertErrorCodesInCode(
+        '''
+var v = const <int, String>{...{1: 'a'}};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_spread_intString_dynamic() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = 'a';
+var v = const <int, String>{...{a: 'a'}};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE]
+            : [
+                StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE,
+                CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT
+              ]);
+  }
+
+  test_nonConst_ifElement_thenElseFalse_intInt_dynamic() async {
+    await assertNoErrorsInCode('''
+const dynamic a = 0;
+const dynamic b = 0;
+var v = <int, bool>{if (1 < 0) a: true else b: false};
+''');
+  }
+
+  test_nonConst_ifElement_thenElseFalse_intString_dynamic() async {
+    await assertNoErrorsInCode('''
+const dynamic a = 0;
+const dynamic b = 'b';
+var v = <int, bool>{if (1 < 0) a: true else b: false};
+''');
+  }
+
+  test_nonConst_ifElement_thenFalse_intString_value() async {
+    await assertErrorCodesInCode('''
+var v = <int, bool>{if (1 < 0) 'a': true};
+''', [StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE]);
+  }
+
+  test_nonConst_ifElement_thenTrue_intInt_dynamic() async {
+    await assertNoErrorsInCode('''
+const dynamic a = 0;
+var v = <int, bool>{if (true) a: true};
+''');
+  }
+
+  test_nonConst_ifElement_thenTrue_intString_dynamic() async {
+    await assertNoErrorsInCode('''
+const dynamic a = 'a';
+var v = <int, bool>{if (true) a: true};
+''');
+  }
+
+  test_nonConst_spread_intInt() async {
+    await assertNoErrorsInCode('''
+var v = <int, String>{...{1: 'a'}};
+''');
+  }
+
+  test_nonConst_spread_intNum() async {
+    await assertNoErrorsInCode('''
+var v = <int, int>{...<num, num>{1: 1}};
+''');
+  }
+
+  test_nonConst_spread_intString() async {
+    await assertErrorCodesInCode('''
+var v = <int, String>{...{'a': 'a'}};
+''', [StaticWarningCode.MAP_KEY_TYPE_NOT_ASSIGNABLE]);
+  }
+
+  test_nonConst_spread_intString_dynamic() async {
+    await assertNoErrorsInCode('''
+dynamic a = 'a';
+var v = <int, String>{...{a: 'a'}};
+''');
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/map_value_type_not_assignable_test.dart b/pkg/analyzer/test/src/diagnostics/map_value_type_not_assignable_test.dart
new file mode 100644
index 0000000..c5e15e3
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/map_value_type_not_assignable_test.dart
@@ -0,0 +1,250 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(MapValueTypeNotAssignableTest);
+    defineReflectiveTests(
+        MapValueTypeNotAssignableWithUIAsCodeAndConstantsTest);
+    defineReflectiveTests(MapValueTypeNotAssignableWithUIAsCodeTest);
+  });
+}
+
+@reflectiveTest
+class MapValueTypeNotAssignableTest extends DriverResolutionTest {
+  test_const_intInt_dynamic() async {
+    await assertNoErrorsInCode('''
+const dynamic a = 0;
+var v = const <bool, int>{true: a};
+''');
+  }
+
+  test_const_intString_dynamic() async {
+    await assertErrorCodesInCode('''
+const dynamic a = 'a';
+var v = const <bool, int>{true: a};
+''', [StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE]);
+  }
+
+  test_const_intString_value() async {
+    await assertErrorCodesInCode('''
+var v = const <bool, int>{true: 'a'};
+''', [StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE]);
+  }
+
+  test_nonConst_intInt_dynamic() async {
+    await assertNoErrorsInCode('''
+const dynamic a = 0;
+var v = <bool, int>{true: a};
+''');
+  }
+
+  test_nonConst_intString_dynamic() async {
+    await assertNoErrorsInCode('''
+const dynamic a = 'a';
+var v = <bool, int>{true: a};
+''');
+  }
+
+  test_nonConst_intString_value() async {
+    await assertErrorCodesInCode('''
+var v = <bool, int>{true: 'a'};
+''', [StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE]);
+  }
+}
+
+@reflectiveTest
+class MapValueTypeNotAssignableWithUIAsCodeAndConstantsTest
+    extends MapValueTypeNotAssignableWithUIAsCodeTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections
+    ];
+}
+
+@reflectiveTest
+class MapValueTypeNotAssignableWithUIAsCodeTest
+    extends MapValueTypeNotAssignableTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections
+    ];
+
+  test_const_ifElement_thenElseFalse_intInt_dynamic() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = 0;
+const dynamic b = 0;
+var v = const <bool, int>{if (1 < 0) true: a else false: b};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_ifElement_thenElseFalse_intString_dynamic() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = 0;
+const dynamic b = 'b';
+var v = const <bool, int>{if (1 < 0) true: a else false: b};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE]
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_ifElement_thenFalse_intString_dynamic() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = 'a';
+var v = const <bool, int>{if (1 < 0) true: a};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_ifElement_thenFalse_intString_value() async {
+    await assertErrorCodesInCode(
+        '''
+var v = const <bool, int>{if (1 < 0) true: 'a'};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE]
+            : [
+                StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE,
+                CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT
+              ]);
+  }
+
+  test_const_ifElement_thenTrue_intInt_dynamic() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = 0;
+var v = const <bool, int>{if (true) true: a};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_ifElement_thenTrue_intString_dynamic() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = 'a';
+var v = const <bool, int>{if (true) true: a};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE]
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_ifElement_thenTrue_notConst() async {
+    await assertErrorCodesInCode(
+        '''
+final a = 0;
+var v = const <bool, int>{if (1 < 2) true: a};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE]
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_spread_intInt() async {
+    await assertErrorCodesInCode(
+        '''
+var v = const <bool, int>{...{true: 1}};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_spread_intString_dynamic() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = 'a';
+var v = const <bool, int>{...{true: a}};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE]
+            : [
+                StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE,
+                CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT
+              ]);
+  }
+
+  test_nonConst_ifElement_thenElseFalse_intInt_dynamic() async {
+    await assertNoErrorsInCode('''
+const dynamic a = 0;
+const dynamic b = 0;
+var v = <bool, int>{if (1 < 0) true: a else false: b};
+''');
+  }
+
+  test_nonConst_ifElement_thenElseFalse_intString_dynamic() async {
+    await assertNoErrorsInCode('''
+const dynamic a = 0;
+const dynamic b = 'b';
+var v = <bool, int>{if (1 < 0) true: a else false: b};
+''');
+  }
+
+  test_nonConst_ifElement_thenFalse_intString_value() async {
+    await assertErrorCodesInCode('''
+var v = <bool, int>{if (1 < 0) true: 'a'};
+''', [StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE]);
+  }
+
+  test_nonConst_ifElement_thenTrue_intInt_dynamic() async {
+    await assertNoErrorsInCode('''
+const dynamic a = 0;
+var v = <bool, int>{if (true) true: a};
+''');
+  }
+
+  test_nonConst_ifElement_thenTrue_intString_dynamic() async {
+    await assertNoErrorsInCode('''
+const dynamic a = 'a';
+var v = <bool, int>{if (true) true: a};
+''');
+  }
+
+  test_nonConst_spread_intInt() async {
+    await assertNoErrorsInCode('''
+var v = <bool, int>{...{true: 1}};
+''');
+  }
+
+  test_nonConst_spread_intNum() async {
+    await assertNoErrorsInCode('''
+var v = <int, int>{...<num, num>{1: 1}};
+''');
+  }
+
+  test_nonConst_spread_intString() async {
+    await assertErrorCodesInCode('''
+var v = <bool, int>{...{true: 'a'}};
+''', [StaticWarningCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE]);
+  }
+
+  test_nonConst_spread_intString_dynamic() async {
+    await assertNoErrorsInCode('''
+const dynamic a = 'a';
+var v = <bool, int>{...{true: a}};
+''');
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/missing_required_param_test.dart b/pkg/analyzer/test/src/diagnostics/missing_required_param_test.dart
new file mode 100644
index 0000000..99866a3
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/missing_required_param_test.dart
@@ -0,0 +1,171 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/test_utilities/package_mixin.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(MissingRequiredParamTest);
+  });
+}
+
+@reflectiveTest
+class MissingRequiredParamTest extends DriverResolutionTest with PackageMixin {
+  test_constructorParam_argumentGiven() async {
+    addMetaPackage();
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+
+class C {
+  C({@required int a}) {}
+}
+
+main() {
+  new C(a: 2);
+}
+''');
+  }
+
+  test_constructorParam_missingArgument() async {
+    addMetaPackage();
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+class C {
+  C({@Required('must specify an `a`') int a}) {}
+}
+main() {
+  new C();
+}
+''', [HintCode.MISSING_REQUIRED_PARAM_WITH_DETAILS]);
+  }
+
+  test_constructorParam_noReason() async {
+    addMetaPackage();
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+
+class C {
+  C({@required int a}) {}
+}
+
+main() {
+  new C();
+}
+''', [HintCode.MISSING_REQUIRED_PARAM]);
+  }
+
+  test_constructorParam_nullReason() async {
+    addMetaPackage();
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+
+class C {
+  C({@Required(null) int a}) {}
+}
+
+main() {
+  new C();
+}
+''', [HintCode.MISSING_REQUIRED_PARAM]);
+  }
+
+  test_constructorParam_redirectingConstructorCall() async {
+    addMetaPackage();
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+class C {
+  C({@required int x});
+  C.named() : this();
+}
+''', [HintCode.MISSING_REQUIRED_PARAM]);
+  }
+
+  test_functionParam() async {
+    addMetaPackage();
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+
+void f({@Required('must specify an `a`') int a}) {}
+
+main() {
+  f();
+}
+''', [HintCode.MISSING_REQUIRED_PARAM_WITH_DETAILS]);
+  }
+
+  test_methodParam() async {
+    addMetaPackage();
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  void m({@Required('must specify an `a`') int a}) {}
+}
+f() {
+  new A().m();
+}
+''', [HintCode.MISSING_REQUIRED_PARAM_WITH_DETAILS]);
+  }
+
+  test_methodParam_inOtherLib() async {
+    addMetaPackage();
+    newFile('/a_lib.dart', content: r'''
+library a_lib;
+import 'package:meta/meta.dart';
+class A {
+  void m({@Required('must specify an `a`') int a}) {}
+}
+''');
+    newFile('/test.dart', content: r'''
+import "a_lib.dart";
+f() {
+  new A().m();
+}
+''');
+
+    await _resolveTestFile('/a_lib.dart');
+    await _resolveTestFile('/test.dart');
+    assertTestErrorsWithCodes([HintCode.MISSING_REQUIRED_PARAM_WITH_DETAILS]);
+  }
+
+  test_requiredConstructor_paramSuperCall() async {
+    addMetaPackage();
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+
+class C {
+  C({@Required('must specify an `a`') int a}) {}
+}
+
+class D extends C {
+  D() : super();
+}
+''', [HintCode.MISSING_REQUIRED_PARAM_WITH_DETAILS]);
+  }
+
+  test_typedef_functionParam() async {
+    addMetaPackage();
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+
+String test(C c) => c.m()();
+
+typedef String F({@required String x});
+
+class C {
+  F m() => ({@required String x}) => null;
+}
+''', [HintCode.MISSING_REQUIRED_PARAM]);
+  }
+
+  /// Resolve the test file at [path].
+  ///
+  /// Similar to ResolutionTest.resolveTestFile, but a custom path is supported.
+  Future<void> _resolveTestFile(String path) async {
+    result = await resolveFile(convertPath(path));
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/missing_return_test.dart b/pkg/analyzer/test/src/diagnostics/missing_return_test.dart
new file mode 100644
index 0000000..41042fb
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/missing_return_test.dart
@@ -0,0 +1,111 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/test_utilities/package_mixin.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(MissingReturnTest);
+  });
+}
+
+@reflectiveTest
+class MissingReturnTest extends DriverResolutionTest with PackageMixin {
+  test_alwaysThrows() async {
+    addMetaPackage();
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+
+@alwaysThrows
+void a() {
+  throw 'msg';
+}
+
+int f() {
+  a();
+}''');
+  }
+
+  test_async() async {
+    await assertErrorCodesInCode(r'''
+import 'dart:async';
+Future<int> f() async {}
+''', [HintCode.MISSING_RETURN]);
+  }
+
+  test_async_futureOrVoid() async {
+    await assertNoErrorsInCode(r'''
+import 'dart:async';
+FutureOr<void> f(Future f) async {}
+''');
+  }
+
+  test_async_futureVoid() async {
+    await assertNoErrorsInCode(r'''
+import 'dart:async';
+Future<void> f() async {}
+''');
+  }
+
+  test_emptyFunctionBody() async {
+    await assertNoErrorsInCode(r'''
+abstract class A {
+  int m();
+}''');
+  }
+
+  test_expressionFunctionBody() async {
+    await assertNoErrorsInCode(r'''
+int f() => 0;
+''');
+  }
+
+  test_factory() async {
+    await assertErrorCodesInCode(r'''
+class A {
+  factory A() {}
+}
+''', [HintCode.MISSING_RETURN]);
+  }
+
+  test_function() async {
+    await assertErrorCodesInCode(r'''
+int f() {}
+''', [HintCode.MISSING_RETURN]);
+  }
+
+  test_method() async {
+    await assertErrorCodesInCode(r'''
+class A {
+  int m() {}
+}''', [HintCode.MISSING_RETURN]);
+  }
+
+  test_method_inferred() async {
+    await assertErrorCodesInCode(r'''
+abstract class A {
+  int m();
+}
+class B extends A {
+  m() {}
+}
+''', [HintCode.MISSING_RETURN]);
+  }
+
+  test_noReturnType() async {
+    await assertNoErrorsInCode(r'''
+f() {}
+''');
+  }
+
+  test_voidReturnType() async {
+    await assertNoErrorsInCode(r'''
+void f() {}
+''');
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/mixin_on_sealed_class_test.dart b/pkg/analyzer/test/src/diagnostics/mixin_on_sealed_class_test.dart
new file mode 100644
index 0000000..4d96004
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/mixin_on_sealed_class_test.dart
@@ -0,0 +1,120 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/test_utilities/package_mixin.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(MixinOnSealedClassTest);
+  });
+}
+
+@reflectiveTest
+class MixinOnSealedClassTest extends DriverResolutionTest with PackageMixin {
+  test_mixinOnSealedClass() async {
+    addMetaPackage();
+    _addPackage('foo', r'''
+import 'package:meta/meta.dart';
+@sealed class Foo {}
+''');
+
+    _newPubPackageRoot('/pkg1');
+    newFile('/pkg1/lib/lib1.dart', content: r'''
+import 'package:foo/foo.dart';
+mixin Bar on Foo {}
+''');
+    await _resolveTestFile('/pkg1/lib/lib1.dart');
+    assertTestErrorsWithCodes([HintCode.MIXIN_ON_SEALED_CLASS]);
+  }
+
+  test_withinLibrary_OK() async {
+    addMetaPackage();
+
+    _newPubPackageRoot('/pkg1');
+    newFile('/pkg1/lib/lib1.dart', content: r'''
+import 'package:meta/meta.dart';
+@sealed class Foo {}
+
+mixin Bar on Foo {}
+''');
+    await _resolveTestFile('/pkg1/lib/lib1.dart');
+    assertNoTestErrors();
+  }
+
+  test_withinPackageLibDirectory_OK() async {
+    addMetaPackage();
+
+    _newPubPackageRoot('/pkg1');
+    newFile('/pkg1/lib/lib1.dart', content: r'''
+import 'package:meta/meta.dart';
+@sealed class Foo {}
+''');
+    newFile('/pkg1/lib/src/lib2.dart', content: r'''
+import '../lib1.dart';
+mixin Bar on Foo {}
+''');
+    await _resolveTestFile('/pkg1/lib/lib1.dart');
+    await _resolveTestFile('/pkg1/lib/src/lib2.dart');
+    assertNoTestErrors();
+  }
+
+  test_withinPackageTestDirectory_OK() async {
+    addMetaPackage();
+
+    _newPubPackageRoot('/pkg1');
+    newFile('/pkg1/lib/lib1.dart', content: r'''
+import 'package:meta/meta.dart';
+@sealed class Foo {}
+''');
+    newFile('/pkg1/test/test.dart', content: r'''
+import '../lib/lib1.dart';
+mixin Bar on Foo {}
+''');
+    await _resolveTestFile('/pkg1/lib/lib1.dart');
+    await _resolveTestFile('/pkg1/test/test.dart');
+    assertNoTestErrors();
+  }
+
+  test_withinPart_OK() async {
+    addMetaPackage();
+
+    _newPubPackageRoot('/pkg1');
+    newFile('/pkg1/lib/lib1.dart', content: r'''
+import 'package:meta/meta.dart';
+part 'part1.dart';
+@sealed class Foo {}
+''');
+    newFile('/pkg1/lib/part1.dart', content: r'''
+part of 'lib1.dart';
+mixin Bar on Foo {}
+''');
+    await _resolveTestFile('/pkg1/lib/lib1.dart');
+    assertNoTestErrors();
+  }
+
+  /// Add a package named [name], and one library file, with content
+  /// [libraryContent].
+  void _addPackage(String name, String libraryContent) {
+    Folder lib = addPubPackage(name);
+    newFile(join(lib.path, '$name.dart'), content: libraryContent);
+  }
+
+  /// Write a pubspec file at [root], so that BestPracticesVerifier can see
+  /// that [root] is the root of a PubWorkspace, and a PubWorkspacePackage.
+  void _newPubPackageRoot(String root) {
+    newFile('$root/pubspec.yaml');
+  }
+
+  /// Resolve the test file at [path].
+  ///
+  /// Similar to ResolutionTest.resolveTestFile, but a custom path is supported.
+  Future<void> _resolveTestFile(String path) async {
+    result = await resolveFile(convertPath(path));
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/must_be_immutable_test.dart b/pkg/analyzer/test/src/diagnostics/must_be_immutable_test.dart
new file mode 100644
index 0000000..e907d2c
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/must_be_immutable_test.dart
@@ -0,0 +1,111 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/test_utilities/package_mixin.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(MustBeImmutableTest);
+  });
+}
+
+@reflectiveTest
+class MustBeImmutableTest extends DriverResolutionTest with PackageMixin {
+  void setUp() {
+    super.setUp();
+    addMetaPackage();
+  }
+
+  test_directAnnotation() async {
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+@immutable
+class A {
+  int x;
+}
+''', [HintCode.MUST_BE_IMMUTABLE]);
+  }
+
+  test_directMixinAnnotation() async {
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+@immutable
+mixin A {
+  int x;
+}
+''', [HintCode.MUST_BE_IMMUTABLE]);
+  }
+
+  test_extendsClassWithAnnotation() async {
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+@immutable
+class A {}
+class B extends A {
+  int x;
+}
+''', [HintCode.MUST_BE_IMMUTABLE]);
+  }
+
+  test_finalField() async {
+    addMetaPackage();
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+@immutable
+class A {
+  final x = 7;
+}
+''');
+  }
+
+  test_fromMixinWithAnnotation() async {
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+@immutable
+class A {}
+class B {
+  int x;
+}
+class C extends A with B {}
+''', [HintCode.MUST_BE_IMMUTABLE]);
+  }
+
+  test_mixinApplication() async {
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+@immutable
+class A {}
+class B {
+  int x;
+}
+class C = A with B;
+''', [HintCode.MUST_BE_IMMUTABLE]);
+  }
+
+  test_mixinApplicationBase() async {
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  int x;
+}
+class B {}
+@immutable
+class C = A with B;
+''', [HintCode.MUST_BE_IMMUTABLE]);
+  }
+
+  test_staticField() async {
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+@immutable
+class A {
+  static int x;
+}
+''');
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/must_call_super_test.dart b/pkg/analyzer/test/src/diagnostics/must_call_super_test.dart
new file mode 100644
index 0000000..588df81
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/must_call_super_test.dart
@@ -0,0 +1,129 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/test_utilities/package_mixin.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(MustCallSuperTest);
+  });
+}
+
+@reflectiveTest
+class MustCallSuperTest extends DriverResolutionTest with PackageMixin {
+  setUp() {
+    super.setUp();
+    addMetaPackage();
+  }
+
+  test_containsSuperCall() async {
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  @mustCallSuper
+  void a() {}
+}
+class C extends A {
+  @override
+  void a() {
+    super.a(); // OK
+  }
+}
+''');
+  }
+
+  test_fromExtendingClass() async {
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  @mustCallSuper
+  void a() {}
+}
+class B extends A {
+  @override
+  void a()
+  {}
+}
+''', [HintCode.MUST_CALL_SUPER]);
+  }
+
+  test_fromInterface() async {
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  @mustCallSuper
+  void a() {}
+}
+class C implements A {
+  @override
+  void a() {}
+}
+''');
+  }
+
+  test_indirectlyInherited() async {
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  @mustCallSuper
+  void a() {}
+}
+class C extends A {
+  @override
+  void a() {
+    super.a();
+  }
+}
+class D extends C {
+  @override
+  void a() {}
+}
+''', [HintCode.MUST_CALL_SUPER]);
+  }
+
+  test_overriddenWithFuture() async {
+    // https://github.com/flutter/flutter/issues/11646
+    await assertNoErrorsInCode(r'''
+import 'dart:async';
+import 'package:meta/meta.dart';
+class A {
+  @mustCallSuper
+  Future<Null> bar() => new Future<Null>.value();
+}
+class C extends A {
+  @override
+  Future<Null> bar() {
+    final value = super.bar();
+    return value.then((Null _) {
+      return null;
+    });
+  }
+}
+''');
+  }
+
+  test_overriddenWithFuture2() async {
+    // https://github.com/flutter/flutter/issues/11646
+    await assertNoErrorsInCode(r'''
+import 'dart:async';
+import 'package:meta/meta.dart';
+class A {
+  @mustCallSuper
+  Future<Null> bar() => new Future<Null>.value();
+}
+class C extends A {
+  @override
+  Future<Null> bar() {
+    return super.bar().then((Null _) {
+      return null;
+    });
+  }
+}
+''');
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/non_bool_condition_test.dart b/pkg/analyzer/test/src/diagnostics/non_bool_condition_test.dart
new file mode 100644
index 0000000..3199d246
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/non_bool_condition_test.dart
@@ -0,0 +1,56 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+//    defineReflectiveTests(NonBoolConditionTest);
+    defineReflectiveTests(NonBoolConditionWithUIAsCodeAndConstantsTest);
+    defineReflectiveTests(NonBoolConditionWithUIAsCodeTest);
+  });
+}
+
+//@reflectiveTest
+class NonBoolConditionTest extends DriverResolutionTest {}
+
+@reflectiveTest
+class NonBoolConditionWithUIAsCodeAndConstantsTest
+    extends NonBoolConditionWithUIAsCodeTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+      EnableString.constant_update_2018
+    ];
+}
+
+@reflectiveTest
+class NonBoolConditionWithUIAsCodeTest extends NonBoolConditionTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+    ];
+
+  test_ifElement() async {
+    assertErrorCodesInCode(
+        '''
+const c = [if (3) 1];
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [StaticTypeWarningCode.NON_BOOL_CONDITION]
+            : [
+                StaticTypeWarningCode.NON_BOOL_CONDITION,
+                CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT
+              ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/non_const_call_to_literal_constructor.dart b/pkg/analyzer/test/src/diagnostics/non_const_call_to_literal_constructor.dart
new file mode 100644
index 0000000..3b24286
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/non_const_call_to_literal_constructor.dart
@@ -0,0 +1,116 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/test_utilities/package_mixin.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NonConstCallToLiteralConstructorTest);
+  });
+}
+
+@reflectiveTest
+class NonConstCallToLiteralConstructorTest extends DriverResolutionTest
+    with PackageMixin {
+  @override
+  void setUp() {
+    super.setUp();
+    addMetaPackage();
+  }
+
+  test_constConstructor() async {
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  @literal
+  const A();
+}
+''');
+  }
+
+  test_constContextCreation() async {
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  @literal
+  const A();
+}
+
+void main() {
+  const a = A();
+}
+''');
+  }
+
+  test_constCreation() async {
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  @literal
+  const A();
+}
+
+void main() {
+  const a = const A();
+}
+''');
+  }
+
+  test_namedConstructor() async {
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  @literal
+  const A.named();
+}
+void main() {
+  var a = A.named();
+}
+''', [HintCode.NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR]);
+  }
+
+  test_nonConstContext() async {
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  @literal
+  const A();
+}
+void main() {
+  var a = A();
+}
+''', [HintCode.NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR]);
+  }
+
+  test_unconstableCreation() async {
+    await assertNoErrorsInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  @literal
+  const A(List list);
+}
+
+void main() {
+  var a = A(new List());
+}
+''');
+  }
+
+  test_usingNew() async {
+    await assertErrorCodesInCode(r'''
+import 'package:meta/meta.dart';
+class A {
+  @literal
+  const A();
+}
+void main() {
+  var a = new A();
+}
+''', [HintCode.NON_CONST_CALL_TO_LITERAL_CONSTRUCTOR_USING_NEW]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_if_element_condition_from_deferred_library_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_if_element_condition_from_deferred_library_test.dart
new file mode 100644
index 0000000..759b7de
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_if_element_condition_from_deferred_library_test.dart
@@ -0,0 +1,162 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NonConstantIfElementConditionFromDeferredLibraryTest);
+  });
+}
+
+@reflectiveTest
+class NonConstantIfElementConditionFromDeferredLibraryTest
+    extends DriverResolutionTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections
+    ];
+
+  test_inList_deferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const bool c = true;''');
+    await assertErrorCodesInCode(
+        r'''
+import 'lib1.dart' deferred as a;
+f() {
+  return const [if(a.c) 0];
+}''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [
+                CompileTimeErrorCode
+                    .NON_CONSTANT_IF_ELEMENT_CONDITION_FROM_DEFERRED_LIBRARY
+              ]
+            : [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+  }
+
+  test_inList_nonConst() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const bool c = true;''');
+    await assertNoErrorsInCode(r'''
+import 'lib1.dart' deferred as a;
+f() {
+  return [if(a.c) 0];
+}''');
+  }
+
+  test_inList_notDeferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const bool c = true;''');
+    await assertErrorCodesInCode(
+        r'''
+import 'lib1.dart' as a;
+f() {
+  return const [if(a.c) 0];
+}''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+  }
+
+  test_inMap_deferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const bool c = true;''');
+    await assertErrorCodesInCode(
+        r'''
+import 'lib1.dart' deferred as a;
+f() {
+  return const {if(a.c) 0 : 0};
+}''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [
+                CompileTimeErrorCode
+                    .NON_CONSTANT_IF_ELEMENT_CONDITION_FROM_DEFERRED_LIBRARY
+              ]
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_inMap_notConst() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const bool c = true;''');
+    await assertNoErrorsInCode(r'''
+import 'lib1.dart' deferred as a;
+f() {
+  return {if(a.c) 0 : 0};
+}''');
+  }
+
+  test_inMap_notDeferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const bool c = true;''');
+    await assertErrorCodesInCode(
+        r'''
+import 'lib1.dart' as a;
+f() {
+  return const {if(a.c) 0 : 0};
+}''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_inSet_deferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const bool c = true;''');
+    await assertErrorCodesInCode(
+        r'''
+import 'lib1.dart' deferred as a;
+f() {
+  return const {if(a.c) 0};
+}''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [
+                CompileTimeErrorCode
+                    .NON_CONSTANT_IF_ELEMENT_CONDITION_FROM_DEFERRED_LIBRARY
+              ]
+            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+
+  test_inSet_notConst() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const bool c = true;''');
+    await assertNoErrorsInCode(r'''
+import 'lib1.dart' deferred as a;
+f() {
+  return {if(a.c) 0};
+}''');
+  }
+
+  test_inSet_notDeferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const bool c = true;''');
+    await assertErrorCodesInCode(
+        r'''
+import 'lib1.dart' as a;
+f() {
+  return const {if(a.c) 0};
+}''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+}
+
+@reflectiveTest
+class NonConstantIfElementConditionFromDeferredLibraryWithConstantsTest
+    extends NonConstantIfElementConditionFromDeferredLibraryTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+      EnableString.constant_update_2018
+    ];
+}
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_list_element_from_deferred_library_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_list_element_from_deferred_library_test.dart
new file mode 100644
index 0000000..8359de2
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_list_element_from_deferred_library_test.dart
@@ -0,0 +1,94 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NonConstantListElementFromDeferredLibraryTest);
+    defineReflectiveTests(
+        NonConstantListValueFromDeferredLibraryWithUiAsCodeAndConstantsTest);
+    defineReflectiveTests(
+        NonConstantListValueFromDeferredLibraryWithUiAsCodeTest);
+  });
+}
+
+@reflectiveTest
+class NonConstantListElementFromDeferredLibraryTest
+    extends DriverResolutionTest {
+  test_const_topLevel_deferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const int c = 1;''');
+    await assertErrorCodesInCode(r'''
+import 'lib1.dart' deferred as a;
+var v = const [a.c];
+''', [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY]);
+  }
+
+  test_const_topLevel_deferred_nested() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const int c = 1;''');
+    await assertErrorCodesInCode(r'''
+import 'lib1.dart' deferred as a;
+var v = const [a.c + 1];
+''', [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY]);
+  }
+}
+
+@reflectiveTest
+class NonConstantListValueFromDeferredLibraryWithUiAsCodeAndConstantsTest
+    extends NonConstantListValueFromDeferredLibraryWithUiAsCodeTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+      EnableString.constant_update_2018
+    ];
+}
+
+@reflectiveTest
+class NonConstantListValueFromDeferredLibraryWithUiAsCodeTest
+    extends NonConstantListElementFromDeferredLibraryTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections
+    ];
+
+  @failingTest
+  test_const_ifElement_thenTrue_deferredElse() async {
+    // reports wrong error code (which is not crucial to fix)
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const int c = 1;''');
+    await assertErrorCodesInCode(r'''
+import 'lib1.dart' deferred as a;
+const cond = true;
+var v = const [ if (cond) 'a' else a.c ];
+''', [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY]);
+  }
+
+  test_const_ifElement_thenTrue_deferredThen() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const int c = 1;''');
+    await assertErrorCodesInCode(
+        r'''
+import 'lib1.dart' deferred as a;
+const cond = true;
+var v = const [ if (cond) a.c ];
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [
+                CompileTimeErrorCode
+                    .NON_CONSTANT_LIST_ELEMENT_FROM_DEFERRED_LIBRARY
+              ]
+            : [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_list_element_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_list_element_test.dart
new file mode 100644
index 0000000..aafeb85
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_list_element_test.dart
@@ -0,0 +1,136 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NonConstantListElementTest);
+    defineReflectiveTests(NonConstantListElementWithUiAsCodeAndConstantsTest);
+    defineReflectiveTests(NonConstantListElementWithUiAsCodeTest);
+  });
+}
+
+@reflectiveTest
+class NonConstantListElementTest extends DriverResolutionTest {
+  test_const_topVar() async {
+    await assertErrorCodesInCode('''
+final dynamic a = 0;
+var v = const [a];
+''', [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+  }
+
+  test_const_topVar_nested() async {
+    await assertErrorCodesInCode(r'''
+final dynamic a = 0;
+var v = const [a + 1];
+''', [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+  }
+
+  test_nonConst_topVar() async {
+    await assertNoErrorsInCode('''
+final dynamic a = 0;
+var v = [a];
+''');
+  }
+}
+
+@reflectiveTest
+class NonConstantListElementWithUiAsCodeAndConstantsTest
+    extends NonConstantListElementWithUiAsCodeTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+      EnableString.constant_update_2018
+    ];
+}
+
+@reflectiveTest
+class NonConstantListElementWithUiAsCodeTest
+    extends NonConstantListElementTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+    ];
+
+  test_const_forElement() async {
+    await assertErrorCodesInCode(r'''
+const Set set = {};
+var v = const [for(final x in set) x];
+''', [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+  }
+
+  test_const_ifElement_thenElseFalse_finalElse() async {
+    await assertErrorCodesInCode('''
+final dynamic a = 0;
+var v = const [if (1 < 0) 0 else a];
+''', [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+  }
+
+  test_const_ifElement_thenElseFalse_finalThen() async {
+    await assertErrorCodesInCode('''
+final dynamic a = 0;
+var v = const [if (1 < 0) a else 0];
+''', [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+  }
+
+  test_const_ifElement_thenElseTrue_finalElse() async {
+    await assertErrorCodesInCode('''
+final dynamic a = 0;
+var v = const [if (1 > 0) 0 else a];
+''', [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+  }
+
+  test_const_ifElement_thenElseTrue_finalThen() async {
+    await assertErrorCodesInCode('''
+final dynamic a = 0;
+var v = const [if (1 > 0) a else 0];
+''', [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+  }
+
+  test_const_ifElement_thenFalse_constThen() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = 0;
+var v = const [if (1 < 0) a];
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+  }
+
+  test_const_ifElement_thenFalse_finalThen() async {
+    await assertErrorCodesInCode('''
+final dynamic a = 0;
+var v = const [if (1 < 0) a];
+''', [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+  }
+
+  test_const_ifElement_thenTrue_constThen() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = 0;
+var v = const [if (1 > 0) a];
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+  }
+
+  test_const_ifElement_thenTrue_finalThen() async {
+    await assertErrorCodesInCode('''
+final dynamic a = 0;
+var v = const [if (1 > 0) a];
+''', [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_map_element_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_map_element_test.dart
new file mode 100644
index 0000000..692b49b
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_map_element_test.dart
@@ -0,0 +1,365 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NonConstantMapElementWithUiAsCodeAndConstantTest);
+    defineReflectiveTests(NonConstantMapElementWithUiAsCodeTest);
+    defineReflectiveTests(NonConstantMapKeyTest);
+    defineReflectiveTests(NonConstantMapKeyWithUiAsCodeTest);
+    defineReflectiveTests(NonConstantMapValueTest);
+    defineReflectiveTests(NonConstantMapValueWithUiAsCodeTest);
+  });
+}
+
+@reflectiveTest
+class NonConstantMapElementWithUiAsCodeAndConstantTest
+    extends NonConstantMapElementWithUiAsCodeTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+      EnableString.constant_update_2018
+    ];
+}
+
+@reflectiveTest
+class NonConstantMapElementWithUiAsCodeTest extends DriverResolutionTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+    ];
+
+  test_forElement_cannotBeConst() async {
+    await assertErrorCodesInCode('''
+void main() {
+  const {1: null, for (final x in const []) null: null};
+}
+''', [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_forElement_nested_cannotBeConst() async {
+    await assertErrorCodesInCode('''
+void main() {
+  const {1: null, if (true) for (final x in const []) null: null};
+}
+''', [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_forElement_notConst_noError() async {
+    await assertNoErrorsInCode('''
+void main() {
+  var x;
+  print({x: x, for (final x2 in [x]) x2: x2});
+}
+''');
+  }
+
+  test_ifElement_mayBeConst() async {
+    await assertErrorCodesInCode(
+        '''
+void main() {
+  const {1: null, if (true) null: null};
+}
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_ifElement_nested_mayBeConst() async {
+    await assertErrorCodesInCode(
+        '''
+void main() {
+  const {1: null, if (true) if (true) null: null};
+}
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_ifElement_notConstCondition() async {
+    await assertErrorCodesInCode('''
+void main() {
+  bool notConst = true;
+  const {1: null, if (notConst) null: null};
+}
+''', [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_ifElementWithElse_mayBeConst() async {
+    await assertErrorCodesInCode(
+        '''
+void main() {
+  const isTrue = true;
+  const {1: null, if (isTrue) null: null else null: null};
+}
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_spreadElement_mayBeConst() async {
+    await assertErrorCodesInCode(
+        '''
+void main() {
+  const {1: null, ...{null: null}};
+}
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_spreadElement_notConst() async {
+    await assertErrorCodesInCode('''
+void main() {
+  var notConst = {};
+  const {1: null, ...notConst};
+}
+''', [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+}
+
+@reflectiveTest
+class NonConstantMapKeyTest extends DriverResolutionTest {
+  test_const_topVar() async {
+    await assertErrorCodesInCode('''
+final dynamic a = 0;
+var v = const <int, int>{a: 0};
+''', [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY]);
+  }
+
+  test_nonConst_topVar() async {
+    await assertNoErrorsInCode('''
+final dynamic a = 0;
+var v = <int, int>{a: 0};
+''');
+  }
+}
+
+@reflectiveTest
+class NonConstantMapKeyWithUiAsCodeTest extends NonConstantMapKeyTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+    ];
+
+  test_const_ifElement_thenElseFalse_finalElse() async {
+    await assertErrorCodesInCode(
+        '''
+final dynamic a = 0;
+var v = const <int, int>{if (1 < 0) 0: 0 else a: 0};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY]
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_ifElement_thenElseFalse_finalThen() async {
+    await assertErrorCodesInCode(
+        '''
+final dynamic a = 0;
+var v = const <int, int>{if (1 < 0) a: 0 else 0: 0};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY]
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_ifElement_thenElseTrue_finalElse() async {
+    await assertErrorCodesInCode(
+        '''
+final dynamic a = 0;
+var v = const <int, int>{if (1 > 0) 0: 0 else a: 0};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY]
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_ifElement_thenElseTrue_finalThen() async {
+    await assertErrorCodesInCode(
+        '''
+final dynamic a = 0;
+var v = const <int, int>{if (1 > 0) a: 0 else 0: 0};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY]
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_ifElement_thenFalse_constThen() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = 0;
+var v = const <int, int>{if (1 < 0) a: 0};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_ifElement_thenFalse_finalThen() async {
+    await assertErrorCodesInCode(
+        '''
+final dynamic a = 0;
+var v = const <int, int>{if (1 < 0) a: 0};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY]
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_ifElement_thenTrue_constThen() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = 0;
+var v = const <int, int>{if (1 > 0) a: 0};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_ifElement_thenTrue_finalThen() async {
+    await assertErrorCodesInCode(
+        '''
+final dynamic a = 0;
+var v = const <int, int>{if (1 > 0) a: 0};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY]
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+}
+
+@reflectiveTest
+class NonConstantMapValueTest extends DriverResolutionTest {
+  test_const_topVar() async {
+    await assertErrorCodesInCode('''
+final dynamic a = 0;
+var v = const <int, int>{0: a};
+''', [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE]);
+  }
+
+  test_nonConst_topVar() async {
+    await assertNoErrorsInCode('''
+final dynamic a = 0;
+var v = <int, int>{0: a};
+''');
+  }
+}
+
+@reflectiveTest
+class NonConstantMapValueWithUiAsCodeTest extends NonConstantMapValueTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+    ];
+
+  test_const_ifElement_thenElseFalse_finalElse() async {
+    await assertErrorCodesInCode(
+        '''
+final dynamic a = 0;
+var v = const <int, int>{if (1 < 0) 0: 0 else 0: a};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE]
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_ifElement_thenElseFalse_finalThen() async {
+    await assertErrorCodesInCode(
+        '''
+final dynamic a = 0;
+var v = const <int, int>{if (1 < 0) 0: a else 0: 0};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE]
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_ifElement_thenElseTrue_finalElse() async {
+    await assertErrorCodesInCode(
+        '''
+final dynamic a = 0;
+var v = const <int, int>{if (1 > 0) 0: 0 else 0: a};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE]
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_ifElement_thenElseTrue_finalThen() async {
+    await assertErrorCodesInCode(
+        '''
+final dynamic a = 0;
+var v = const <int, int>{if (1 > 0) 0: a else 0: 0};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE]
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_ifElement_thenFalse_constThen() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = 0;
+var v = const <int, int>{if (1 < 0) 0: a};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_ifElement_thenFalse_finalThen() async {
+    await assertErrorCodesInCode(
+        '''
+final dynamic a = 0;
+var v = const <int, int>{if (1 < 0) 0: a};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE]
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_ifElement_thenTrue_constThen() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = 0;
+var v = const <int, int>{if (1 > 0) 0: a};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_ifElement_thenTrue_finalThen() async {
+    await assertErrorCodesInCode(
+        '''
+final dynamic a = 0;
+var v = const <int, int>{if (1 > 0) 0: a};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE]
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_map_key_from_deferred_library_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_map_key_from_deferred_library_test.dart
new file mode 100644
index 0000000..43225c7
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_map_key_from_deferred_library_test.dart
@@ -0,0 +1,89 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NonConstantMapKeyFromDeferredLibraryTest);
+    defineReflectiveTests(
+        NonConstantMapKeyFromDeferredLibraryWithUiAsCodeAndConstantsTest);
+    defineReflectiveTests(NonConstantMapKeyFromDeferredLibraryWithUiAsCodeTest);
+  });
+}
+
+@reflectiveTest
+class NonConstantMapKeyFromDeferredLibraryTest extends DriverResolutionTest {
+  test_const_topLevel_deferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const int c = 1;''');
+    await assertErrorCodesInCode(r'''
+import 'lib1.dart' deferred as a;
+var v = const {a.c : 0};
+''', [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY]);
+  }
+
+  test_const_topLevel_deferred_nested() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const int c = 1;''');
+    await assertErrorCodesInCode(r'''
+import 'lib1.dart' deferred as a;
+var v = const {a.c + 1 : 0};
+''', [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY]);
+  }
+}
+
+@reflectiveTest
+class NonConstantMapKeyFromDeferredLibraryWithUiAsCodeAndConstantsTest
+    extends NonConstantMapKeyFromDeferredLibraryWithUiAsCodeTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+      EnableString.constant_update_2018
+    ];
+}
+
+@reflectiveTest
+class NonConstantMapKeyFromDeferredLibraryWithUiAsCodeTest
+    extends NonConstantMapKeyFromDeferredLibraryTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections
+    ];
+
+  @failingTest
+  test_const_ifElement_thenTrue_deferredElse() async {
+// reports wrong error code
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const int c = 1;''');
+    await assertErrorCodesInCode(r'''
+import 'lib1.dart' deferred as a;
+const cond = true;
+var v = const { if (cond) 0: 1 else a.c : 0};
+''', [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY]);
+  }
+
+  test_const_ifElement_thenTrue_deferredThen() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const int c = 1;''');
+    await assertErrorCodesInCode(
+        r'''
+import 'lib1.dart' deferred as a;
+const cond = true;
+var v = const { if (cond) a.c : 0};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY_FROM_DEFERRED_LIBRARY]
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_map_key_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_map_key_test.dart
new file mode 100644
index 0000000..48a454b
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_map_key_test.dart
@@ -0,0 +1,74 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NonConstantMapKeyTest);
+    defineReflectiveTests(NonConstantMapKeyWithUiAsCodeAndConstantsTest);
+    defineReflectiveTests(NonConstantMapKeyWithUiAsCodeTest);
+  });
+}
+
+@reflectiveTest
+class NonConstantMapKeyTest extends DriverResolutionTest {
+  test_const_topLevel() async {
+    await assertErrorCodesInCode(r'''
+final dynamic a = 0;
+var v = const {a : 0};
+''', [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY]);
+  }
+}
+
+@reflectiveTest
+class NonConstantMapKeyWithUiAsCodeAndConstantsTest
+    extends NonConstantMapKeyWithUiAsCodeTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+      EnableString.constant_update_2018
+    ];
+}
+
+@reflectiveTest
+class NonConstantMapKeyWithUiAsCodeTest extends NonConstantMapKeyTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections
+    ];
+
+  test_const_ifElement_thenTrue_elseFinal() async {
+    await assertErrorCodesInCode(
+        r'''
+final dynamic a = 0;
+const cond = true;
+var v = const {if (cond) 0: 1 else a : 0};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY]
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_const_ifElement_thenTrue_thenFinal() async {
+    await assertErrorCodesInCode(
+        r'''
+final dynamic a = 0;
+const cond = true;
+var v = const {if (cond) a : 0};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_KEY]
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_map_value_from_deferred_library_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_map_value_from_deferred_library_test.dart
new file mode 100644
index 0000000..ddfde67
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_map_value_from_deferred_library_test.dart
@@ -0,0 +1,93 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NonConstantMapValueFromDeferredLibraryTest);
+    defineReflectiveTests(
+        NonConstantMapValueFromDeferredLibraryWithUiAsCodeAndConstantsTest);
+    defineReflectiveTests(
+        NonConstantMapValueFromDeferredLibraryWithUiAsCodeTest);
+  });
+}
+
+@reflectiveTest
+class NonConstantMapValueFromDeferredLibraryTest extends DriverResolutionTest {
+  test_const_topLevel_deferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const int c = 1;''');
+    await assertErrorCodesInCode(r'''
+import 'lib1.dart' deferred as a;
+var v = const {'a' : a.c};
+''', [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY]);
+  }
+
+  test_const_topLevel_deferred_nested() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const int c = 1;''');
+    await assertErrorCodesInCode(r'''
+import 'lib1.dart' deferred as a;
+var v = const {'a' : a.c + 1};
+''', [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY]);
+  }
+}
+
+@reflectiveTest
+class NonConstantMapValueFromDeferredLibraryWithUiAsCodeAndConstantsTest
+    extends NonConstantMapValueFromDeferredLibraryWithUiAsCodeTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+      EnableString.constant_update_2018
+    ];
+}
+
+@reflectiveTest
+class NonConstantMapValueFromDeferredLibraryWithUiAsCodeTest
+    extends NonConstantMapValueFromDeferredLibraryTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections
+    ];
+
+  @failingTest
+  test_const_ifElement_thenTrue_elseDeferred() async {
+    // reports wrong error code
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const int c = 1;''');
+    await assertErrorCodesInCode(r'''
+import 'lib1.dart' deferred as a;
+const cond = true;
+var v = const { if (cond) 'a': 'b' else 'c' : a.c};
+''', [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY]);
+  }
+
+  test_const_ifElement_thenTrue_thenDeferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const int c = 1;''');
+    await assertErrorCodesInCode(
+        r'''
+import 'lib1.dart' deferred as a;
+const cond = true;
+var v = const { if (cond) 'a' : a.c};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [
+                CompileTimeErrorCode
+                    .NON_CONSTANT_MAP_VALUE_FROM_DEFERRED_LIBRARY
+              ]
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_map_value_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_map_value_test.dart
new file mode 100644
index 0000000..a88a96d
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_map_value_test.dart
@@ -0,0 +1,77 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NonConstantMapValueTest);
+    defineReflectiveTests(NonConstantMapValueWithUiAsCodeAndConstantsTest);
+    defineReflectiveTests(NonConstantMapValueWithUiAsCodeTest);
+  });
+}
+
+@reflectiveTest
+class NonConstantMapValueTest extends DriverResolutionTest {
+  test_const_topLevel() async {
+    await assertErrorCodesInCode(r'''
+final dynamic a = 0;
+var v = const {'a' : a};
+''', [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE]);
+  }
+}
+
+@reflectiveTest
+class NonConstantMapValueWithUiAsCodeAndConstantsTest
+    extends NonConstantMapValueWithUiAsCodeTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+      EnableString.constant_update_2018
+    ];
+}
+
+@reflectiveTest
+class NonConstantMapValueWithUiAsCodeTest extends NonConstantMapValueTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections
+    ];
+
+  test_const_ifTrue_elseFinal() async {
+    await assertErrorCodesInCode(
+        r'''
+final dynamic a = 0;
+const cond = true;
+var v = const {if (cond) 'a': 'b', 'c' : a};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE]
+            : [
+                CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE,
+                CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT
+              ]);
+  }
+
+  test_const_ifTrue_thenFinal() async {
+    await assertErrorCodesInCode(
+        r'''
+final dynamic a = 0;
+const cond = true;
+var v = const {if (cond) 'a' : a};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [CompileTimeErrorCode.NON_CONSTANT_MAP_VALUE]
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_set_element_from_deferred_library_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_set_element_from_deferred_library_test.dart
new file mode 100644
index 0000000..7a2ea68
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_set_element_from_deferred_library_test.dart
@@ -0,0 +1,94 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NonConstantSetElementFromDeferredLibraryTest);
+    defineReflectiveTests(
+        NonConstantSetElementFromDeferredLibraryWithUiAsCodeAndConstantsTest);
+    defineReflectiveTests(
+        NonConstantSetElementFromDeferredLibraryWithUiAsCodeTest);
+  });
+}
+
+@reflectiveTest
+class NonConstantSetElementFromDeferredLibraryTest
+    extends DriverResolutionTest {
+  test_const_topLevel_deferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const int c = 1;''');
+    await assertErrorCodesInCode(r'''
+import 'lib1.dart' deferred as a;
+var v = const {a.c};
+''', [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY]);
+  }
+
+  test_const_topLevel_deferred_nested() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const int c = 1;''');
+    await assertErrorCodesInCode(r'''
+import 'lib1.dart' deferred as a;
+var v = const {a.c + 1};
+''', [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY]);
+  }
+}
+
+@reflectiveTest
+class NonConstantSetElementFromDeferredLibraryWithUiAsCodeAndConstantsTest
+    extends NonConstantSetElementFromDeferredLibraryWithUiAsCodeTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+      EnableString.constant_update_2018
+    ];
+}
+
+@reflectiveTest
+class NonConstantSetElementFromDeferredLibraryWithUiAsCodeTest
+    extends NonConstantSetElementFromDeferredLibraryTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections
+    ];
+
+  @failingTest
+  test_const_ifElement_thenTrue_elseDeferred() async {
+    // reports wrong error code
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const int c = 1;''');
+    await assertErrorCodesInCode(r'''
+import 'lib1.dart' deferred as a;
+const cond = true;
+var v = const {if (cond) null else a.c};
+''', [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY]);
+  }
+
+  test_const_ifElement_thenTrue_thenDeferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const int c = 1;''');
+    await assertErrorCodesInCode(
+        r'''
+import 'lib1.dart' deferred as a;
+const cond = true;
+var v = const {if (cond) a.c};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [
+                CompileTimeErrorCode
+                    .NON_CONSTANT_SET_ELEMENT_FROM_DEFERRED_LIBRARY
+              ]
+            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_set_element_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_set_element_test.dart
new file mode 100644
index 0000000..753d602
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_set_element_test.dart
@@ -0,0 +1,135 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NonConstantSetElementTest);
+    defineReflectiveTests(NonConstantSetElementWithUiAsCodeAndConstantsTest);
+    defineReflectiveTests(NonConstantSetElementWithUiAsCodeTest);
+  });
+}
+
+@reflectiveTest
+class NonConstantSetElementTest extends DriverResolutionTest {
+  test_const_parameter() async {
+    await assertErrorCodesInCode(r'''
+f(a) {
+  return const {a};
+}''', [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+
+  test_const_topVar() async {
+    await assertErrorCodesInCode('''
+final dynamic a = 0;
+var v = const <int>{a};
+''', [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+
+  test_nonConst_topVar() async {
+    await assertNoErrorsInCode('''
+final dynamic a = 0;
+var v = <int>{a};
+''');
+  }
+}
+
+@reflectiveTest
+class NonConstantSetElementWithUiAsCodeAndConstantsTest
+    extends NonConstantSetElementWithUiAsCodeTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+      EnableString.constant_update_2018
+    ];
+}
+
+@reflectiveTest
+class NonConstantSetElementWithUiAsCodeTest extends NonConstantSetElementTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+    ];
+
+  test_const_ifElement_thenElseFalse_finalElse() async {
+    await assertErrorCodesInCode('''
+final dynamic a = 0;
+var v = const <int>{if (1 < 0) 0 else a};
+''', [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+
+  test_const_ifElement_thenElseFalse_finalThen() async {
+    await assertErrorCodesInCode('''
+final dynamic a = 0;
+var v = const <int>{if (1 < 0) a else 0};
+''', [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+
+  test_const_ifElement_thenElseTrue_finalElse() async {
+    await assertErrorCodesInCode('''
+final dynamic a = 0;
+var v = const <int>{if (1 > 0) 0 else a};
+''', [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+
+  test_const_ifElement_thenElseTrue_finalThen() async {
+    await assertErrorCodesInCode('''
+final dynamic a = 0;
+var v = const <int>{if (1 > 0) a else 0};
+''', [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+
+  test_const_ifElement_thenFalse_constThen() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = 0;
+var v = const <int>{if (1 < 0) a};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+
+  test_const_ifElement_thenFalse_finalThen() async {
+    await assertErrorCodesInCode('''
+final dynamic a = 0;
+var v = const <int>{if (1 < 0) a};
+''', [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+
+  test_const_ifElement_thenTrue_constThen() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = 0;
+var v = const <int>{if (1 > 0) a};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+
+  test_const_ifElement_thenTrue_finalThen() async {
+    await assertErrorCodesInCode('''
+final dynamic a = 0;
+var v = const <int>{if (1 > 0) a};
+''', [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+
+  test_const_spread_final() async {
+    await assertErrorCodesInCode(r'''
+final Set x = null;
+var v = const {...x};
+''', [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/non_constant_spread_expression_from_deferred_library_test.dart b/pkg/analyzer/test/src/diagnostics/non_constant_spread_expression_from_deferred_library_test.dart
new file mode 100644
index 0000000..5d0e702
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/non_constant_spread_expression_from_deferred_library_test.dart
@@ -0,0 +1,164 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NonConstantSpreadExpressionFromDeferredLibraryTest);
+    defineReflectiveTests(
+        NonConstantSpreadExpressionFromDeferredLibraryWithConstantsTest);
+  });
+}
+
+@reflectiveTest
+class NonConstantSpreadExpressionFromDeferredLibraryTest
+    extends DriverResolutionTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections
+    ];
+
+  test_inList_deferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const List c = [];''');
+    await assertErrorCodesInCode(
+        r'''
+import 'lib1.dart' deferred as a;
+f() {
+  return const [...a.c];
+}''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [
+                CompileTimeErrorCode
+                    .NON_CONSTANT_SPREAD_EXPRESSION_FROM_DEFERRED_LIBRARY
+              ]
+            : [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+  }
+
+  test_inList_deferred_notConst() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const List c = [];''');
+    await assertNoErrorsInCode(r'''
+import 'lib1.dart' deferred as a;
+f() {
+  return [...a.c];
+}''');
+  }
+
+  test_inList_notDeferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const List c = [];''');
+    await assertErrorCodesInCode(
+        r'''
+import 'lib1.dart' as a;
+f() {
+  return const [...a.c];
+}''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_LIST_ELEMENT]);
+  }
+
+  test_inMap_deferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const Map c = <int, int>{};''');
+    await assertErrorCodesInCode(
+        r'''
+import 'lib1.dart' deferred as a;
+f() {
+  return const {...a.c};
+}''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [
+                CompileTimeErrorCode
+                    .NON_CONSTANT_SPREAD_EXPRESSION_FROM_DEFERRED_LIBRARY
+              ]
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_inMap_notConst() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const Map c = <int, int>{};''');
+    await assertNoErrorsInCode(r'''
+import 'lib1.dart' deferred as a;
+f() {
+  return {...a.c};
+}''');
+  }
+
+  test_inMap_notDeferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const Map c = <int, int>{};''');
+    await assertErrorCodesInCode(
+        r'''
+import 'lib1.dart' as a;
+f() {
+  return const {...a.c};
+}''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_MAP_ELEMENT]);
+  }
+
+  test_inSet_deferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const Set c = <int>{};''');
+    await assertErrorCodesInCode(
+        r'''
+import 'lib1.dart' deferred as a;
+f() {
+  return const {...a.c};
+}''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [
+                CompileTimeErrorCode
+                    .NON_CONSTANT_SPREAD_EXPRESSION_FROM_DEFERRED_LIBRARY
+              ]
+            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+
+  test_inSet_notConst() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const Set c = <int>{};''');
+    await assertNoErrorsInCode(r'''
+import 'lib1.dart' deferred as a;
+f() {
+  return {...a.c};
+}''');
+  }
+
+  test_inSet_notDeferred() async {
+    newFile(convertPath('/test/lib/lib1.dart'), content: r'''
+const Set c = <int>{};''');
+    await assertErrorCodesInCode(
+        r'''
+import 'lib1.dart' as a;
+f() {
+  return const {...a.c};
+}''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+}
+
+@reflectiveTest
+class NonConstantSpreadExpressionFromDeferredLibraryWithConstantsTest
+    extends NonConstantSpreadExpressionFromDeferredLibraryTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+      EnableString.constant_update_2018
+    ];
+}
diff --git a/pkg/analyzer/test/src/diagnostics/not_iterable_spread_test.dart b/pkg/analyzer/test/src/diagnostics/not_iterable_spread_test.dart
new file mode 100644
index 0000000..08a4506
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/not_iterable_spread_test.dart
@@ -0,0 +1,67 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NotIterableSpreadTest);
+  });
+}
+
+@reflectiveTest
+class NotIterableSpreadTest extends DriverResolutionTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+    ];
+
+  test_iterable_list() async {
+    await assertNoErrorsInCode('''
+var a = [0];
+var v = [...a];
+''');
+  }
+
+  test_iterable_null() async {
+    await assertNoErrorsInCode('''
+var v = [...?null];
+''');
+  }
+
+  test_notIterable_direct() async {
+    await assertErrorCodesInCode('''
+var a = 0;
+var v = [...a];
+''', [CompileTimeErrorCode.NOT_ITERABLE_SPREAD]);
+  }
+
+  test_notIterable_forElement() async {
+    await assertErrorCodesInCode('''
+var a = 0;
+var v = [for (var i in []) ...a];
+''', [CompileTimeErrorCode.NOT_ITERABLE_SPREAD]);
+  }
+
+  test_notIterable_ifElement_else() async {
+    await assertErrorCodesInCode('''
+var a = 0;
+var v = [if (1 > 0) ...[] else ...a];
+''', [CompileTimeErrorCode.NOT_ITERABLE_SPREAD]);
+  }
+
+  test_notIterable_ifElement_then() async {
+    await assertErrorCodesInCode('''
+var a = 0;
+var v = [if (1 > 0) ...a];
+''', [CompileTimeErrorCode.NOT_ITERABLE_SPREAD]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/not_map_spread_test.dart b/pkg/analyzer/test/src/diagnostics/not_map_spread_test.dart
new file mode 100644
index 0000000..57031dd
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/not_map_spread_test.dart
@@ -0,0 +1,67 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NotMapSpreadTest);
+  });
+}
+
+@reflectiveTest
+class NotMapSpreadTest extends DriverResolutionTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+    ];
+
+  test_map() async {
+    await assertNoErrorsInCode('''
+var a = {0: 0};
+var v = <int, int>{...a};
+''');
+  }
+
+  test_map_null() async {
+    await assertNoErrorsInCode('''
+var v = <int, int>{...?null};
+''');
+  }
+
+  test_notMap_direct() async {
+    await assertErrorCodesInCode('''
+var a = 0;
+var v = <int, int>{...a};
+''', [CompileTimeErrorCode.NOT_MAP_SPREAD]);
+  }
+
+  test_notMap_forElement() async {
+    await assertErrorCodesInCode('''
+var a = 0;
+var v = <int, int>{for (var i in []) ...a};
+''', [CompileTimeErrorCode.NOT_MAP_SPREAD]);
+  }
+
+  test_notMap_ifElement_else() async {
+    await assertErrorCodesInCode('''
+var a = 0;
+var v = <int, int>{if (1 > 0) ...<int, int>{} else ...a};
+''', [CompileTimeErrorCode.NOT_MAP_SPREAD]);
+  }
+
+  test_notMap_ifElement_then() async {
+    await assertErrorCodesInCode('''
+var a = 0;
+var v = <int, int>{if (1 > 0) ...a};
+''', [CompileTimeErrorCode.NOT_MAP_SPREAD]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/not_null_aware_null_spread_test.dart b/pkg/analyzer/test/src/diagnostics/not_null_aware_null_spread_test.dart
new file mode 100644
index 0000000..45ffdf8
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/not_null_aware_null_spread_test.dart
@@ -0,0 +1,104 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NotNullAwareNullSpreadTest);
+  });
+}
+
+@reflectiveTest
+class NotNullAwareNullSpreadTest extends DriverResolutionTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+    ];
+
+  test_listLiteral_notNullAware_nullLiteral() async {
+    await assertErrorCodesInCode('''
+var v = [...null];
+''', [CompileTimeErrorCode.NOT_NULL_AWARE_NULL_SPREAD]);
+  }
+
+  test_listLiteral_notNullAware_nullTyped() async {
+    await assertErrorCodesInCode('''
+Null a = null;
+var v = [...a];
+''', [CompileTimeErrorCode.NOT_NULL_AWARE_NULL_SPREAD]);
+  }
+
+  test_listLiteral_nullAware_nullLiteral() async {
+    await assertNoErrorsInCode('''
+var v = [...?null];
+''');
+  }
+
+  test_listLiteral_nullAware_nullTyped() async {
+    await assertNoErrorsInCode('''
+Null a = null;
+var v = [...?a];
+''');
+  }
+
+  test_mapLiteral_notNullAware_nullLiteral() async {
+    await assertErrorCodesInCode('''
+var v = <int, int>{...null};
+''', [CompileTimeErrorCode.NOT_NULL_AWARE_NULL_SPREAD]);
+  }
+
+  test_mapLiteral_notNullAware_nullType() async {
+    await assertErrorCodesInCode('''
+Null a = null;
+var v = <int, int>{...a};
+''', [CompileTimeErrorCode.NOT_NULL_AWARE_NULL_SPREAD]);
+  }
+
+  test_mapLiteral_nullAware_nullLiteral() async {
+    await assertNoErrorsInCode('''
+var v = <int, int>{...?null};
+''');
+  }
+
+  test_mapLiteral_nullAware_nullType() async {
+    await assertNoErrorsInCode('''
+Null a = null;
+var v = <int, int>{...?a};
+''');
+  }
+
+  test_setLiteral_notNullAware_nullLiteral() async {
+    await assertErrorCodesInCode('''
+var v = <int>{...null};
+''', [CompileTimeErrorCode.NOT_NULL_AWARE_NULL_SPREAD]);
+  }
+
+  test_setLiteral_notNullAware_nullTyped() async {
+    await assertErrorCodesInCode('''
+Null a = null;
+var v = <int>{...a};
+''', [CompileTimeErrorCode.NOT_NULL_AWARE_NULL_SPREAD]);
+  }
+
+  test_setLiteral_nullAware_nullLiteral() async {
+    await assertNoErrorsInCode('''
+var v = <int>{...?null};
+''');
+  }
+
+  test_setLiteral_nullAware_nullTyped() async {
+    await assertNoErrorsInCode('''
+Null a = null;
+var v = <int>{...?a};
+''');
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/null_aware_before_operator_test.dart b/pkg/analyzer/test/src/diagnostics/null_aware_before_operator_test.dart
new file mode 100644
index 0000000..7f89a71
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/null_aware_before_operator_test.dart
@@ -0,0 +1,73 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NullAwareBeforeOperatorTest);
+  });
+}
+
+@reflectiveTest
+class NullAwareBeforeOperatorTest extends DriverResolutionTest {
+  test_assignment() async {
+    await assertNoErrorsInCode(r'''
+m(x) {
+  x?.a = '';
+}
+''');
+  }
+
+  test_equal_equal() async {
+    await assertNoErrorsInCode(r'''
+m(x) {
+  x?.a == '';
+}
+''');
+  }
+
+  test_is() async {
+    await assertNoErrorsInCode(r'''
+m(x) {
+  x?.a is String;
+}
+''');
+  }
+
+  test_is_not() async {
+    await assertNoErrorsInCode(r'''
+m(x) {
+  x?.a is! String;
+}
+''');
+  }
+
+  test_minus() async {
+    await assertErrorCodesInCode(r'''
+m(x) {
+  x?.a - '';
+}
+''', [HintCode.NULL_AWARE_BEFORE_OPERATOR]);
+  }
+
+  test_not_equal() async {
+    await assertNoErrorsInCode(r'''
+m(x) {
+  x?.a != '';
+}
+''');
+  }
+
+  test_question_question() async {
+    await assertNoErrorsInCode(r'''
+m(x) {
+  x?.a ?? true;
+}
+''');
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/null_aware_in_condition_test.dart b/pkg/analyzer/test/src/diagnostics/null_aware_in_condition_test.dart
new file mode 100644
index 0000000..89203f2
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/null_aware_in_condition_test.dart
@@ -0,0 +1,73 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NullAwareInConditionTest);
+  });
+}
+
+@reflectiveTest
+class NullAwareInConditionTest extends DriverResolutionTest {
+  test_assert() async {
+    await assertErrorCodesInCode(r'''
+m(x) {
+  assert (x?.a);
+}
+''', [HintCode.NULL_AWARE_IN_CONDITION]);
+  }
+
+  test_conditionalExpression() async {
+    await assertErrorCodesInCode(r'''
+m(x) {
+  return x?.a ? 0 : 1;
+}
+''', [HintCode.NULL_AWARE_IN_CONDITION]);
+  }
+
+  test_do() async {
+    await assertErrorCodesInCode(r'''
+m(x) {
+  do {} while (x?.a);
+}
+''', [HintCode.NULL_AWARE_IN_CONDITION]);
+  }
+
+  test_for() async {
+    await assertErrorCodesInCode(r'''
+m(x) {
+  for (var v = x; v?.a; v = v.next) {}
+}
+''', [HintCode.NULL_AWARE_IN_CONDITION]);
+  }
+
+  test_if() async {
+    await assertErrorCodesInCode(r'''
+m(x) {
+  if (x?.a) {}
+}
+''', [HintCode.NULL_AWARE_IN_CONDITION]);
+  }
+
+  test_if_parenthesized() async {
+    await assertErrorCodesInCode(r'''
+m(x) {
+  if ((x?.a)) {}
+}
+''', [HintCode.NULL_AWARE_IN_CONDITION]);
+  }
+
+  test_while() async {
+    await assertErrorCodesInCode(r'''
+m(x) {
+  while (x?.a) {}
+}
+''', [HintCode.NULL_AWARE_IN_CONDITION]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/null_aware_in_logical_operator_test.dart b/pkg/analyzer/test/src/diagnostics/null_aware_in_logical_operator_test.dart
new file mode 100644
index 0000000..b60810e
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/null_aware_in_logical_operator_test.dart
@@ -0,0 +1,89 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NullAwareInLogicalOperatorTest);
+  });
+}
+
+@reflectiveTest
+class NullAwareInLogicalOperatorTest extends DriverResolutionTest {
+  test_conditionalAnd_first() async {
+    await assertErrorCodesInCode(r'''
+m(x) {
+  x?.a && x.b;
+}
+''', [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
+  }
+
+  test_conditionalAnd_second() async {
+    await assertErrorCodesInCode(r'''
+m(x) {
+  x.a && x?.b;
+}
+''', [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
+  }
+
+  test_conditionalAnd_third() async {
+    await assertErrorCodesInCode(r'''
+m(x) {
+  x.a && x.b && x?.c;
+}
+''', [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
+  }
+
+  test_conditionalOr_first() async {
+    await assertErrorCodesInCode(r'''
+m(x) {
+  x?.a || x.b;
+}
+''', [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
+  }
+
+  test_conditionalOr_second() async {
+    await assertErrorCodesInCode(r'''
+m(x) {
+  x.a || x?.b;
+}
+''', [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
+  }
+
+  test_conditionalOr_third() async {
+    await assertErrorCodesInCode(r'''
+m(x) {
+  x.a || x.b || x?.c;
+}
+''', [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
+  }
+
+  test_for_noCondition() async {
+    await assertNoErrorsInCode(r'''
+m(x) {
+  for (var v = x; ; v++) {}
+}
+''');
+  }
+
+  test_if_notTopLevel() async {
+    await assertNoErrorsInCode(r'''
+m(x) {
+  if (x?.y == null) {}
+}
+''');
+  }
+
+  test_not() async {
+    await assertErrorCodesInCode(r'''
+m(x) {
+  !x?.a;
+}
+''', [HintCode.NULL_AWARE_IN_LOGICAL_OPERATOR]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/nullable_type_in_catch_clause_test.dart b/pkg/analyzer/test/src/diagnostics/nullable_type_in_catch_clause_test.dart
new file mode 100644
index 0000000..b500cd6
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/nullable_type_in_catch_clause_test.dart
@@ -0,0 +1,60 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NullableTypeInCatchClauseTest);
+  });
+}
+
+@reflectiveTest
+class NullableTypeInCatchClauseTest extends DriverResolutionTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions =>
+      AnalysisOptionsImpl()..enabledExperiments = [EnableString.non_nullable];
+
+  test_noOnClause() async {
+    assertNoErrorsInCode('''
+f() {
+  try {
+  } catch (e) {
+  }
+}
+''');
+  }
+
+  test_on_class() async {
+    assertErrorsInCode('''
+class A {}
+f() {
+  try {
+  } on A? {
+  }
+}
+''', [
+      error(CompileTimeErrorCode.NULLABLE_TYPE_IN_CATCH_CLAUSE, 32, 2),
+    ]);
+  }
+
+  test_on_typeParameter() async {
+    assertErrorsInCode('''
+class A<B> {
+  m() {
+    try {
+    } on B {
+    }
+  }
+}
+''', [
+      error(CompileTimeErrorCode.NULLABLE_TYPE_IN_CATCH_CLAUSE, 40, 1),
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/nullable_type_in_extends_clause_test.dart b/pkg/analyzer/test/src/diagnostics/nullable_type_in_extends_clause_test.dart
new file mode 100644
index 0000000..2478d79
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/nullable_type_in_extends_clause_test.dart
@@ -0,0 +1,69 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NullableTypeInExtendsClauseTest);
+  });
+}
+
+@reflectiveTest
+class NullableTypeInExtendsClauseTest extends DriverResolutionTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions =>
+      AnalysisOptionsImpl()..enabledExperiments = [EnableString.non_nullable];
+
+  test_class_nonNullable() async {
+    assertNoErrorsInCode('''
+class A {}
+class B extends A {}
+''');
+  }
+
+  test_class_nullable() async {
+    assertErrorCodesInCode('''
+class A {}
+class B extends A? {}
+''', [CompileTimeErrorCode.NULLABLE_TYPE_IN_EXTENDS_CLAUSE]);
+  }
+
+  test_classAlias_withClass_nonNullable() async {
+    assertNoErrorsInCode('''
+class A {}
+class B {}
+class C = A with B;
+''');
+  }
+
+  test_classAlias_withClass_nullable() async {
+    assertErrorCodesInCode('''
+class A {}
+class B {}
+class C = A? with B;
+''', [CompileTimeErrorCode.NULLABLE_TYPE_IN_EXTENDS_CLAUSE]);
+  }
+
+  test_classAlias_withMixin_nonNullable() async {
+    assertNoErrorsInCode('''
+class A {}
+mixin B {}
+class C = A with B;
+''');
+  }
+
+  test_classAlias_withMixin_nullable() async {
+    assertErrorCodesInCode('''
+class A {}
+mixin B {}
+class C = A? with B;
+''', [CompileTimeErrorCode.NULLABLE_TYPE_IN_EXTENDS_CLAUSE]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/nullable_type_in_implements_clause_test.dart b/pkg/analyzer/test/src/diagnostics/nullable_type_in_implements_clause_test.dart
new file mode 100644
index 0000000..ec81d73
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/nullable_type_in_implements_clause_test.dart
@@ -0,0 +1,51 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NullableTypeInImplementsClauseTest);
+  });
+}
+
+@reflectiveTest
+class NullableTypeInImplementsClauseTest extends DriverResolutionTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions =>
+      AnalysisOptionsImpl()..enabledExperiments = [EnableString.non_nullable];
+
+  test_class_nonNullable() async {
+    assertNoErrorsInCode('''
+class A {}
+class B implements A {}
+''');
+  }
+
+  test_class_nullable() async {
+    assertErrorCodesInCode('''
+class A {}
+class B implements A? {}
+''', [CompileTimeErrorCode.NULLABLE_TYPE_IN_IMPLEMENTS_CLAUSE]);
+  }
+
+  test_mixin_nonNullable() async {
+    assertNoErrorsInCode('''
+class A {}
+mixin B implements A {}
+''');
+  }
+
+  test_mixin_nullable() async {
+    assertErrorCodesInCode('''
+class A {}
+mixin B implements A? {}
+''', [CompileTimeErrorCode.NULLABLE_TYPE_IN_IMPLEMENTS_CLAUSE]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/nullable_type_in_on_clause_test.dart b/pkg/analyzer/test/src/diagnostics/nullable_type_in_on_clause_test.dart
new file mode 100644
index 0000000..d9613ee
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/nullable_type_in_on_clause_test.dart
@@ -0,0 +1,37 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NullableTypeInOnClauseTest);
+  });
+}
+
+@reflectiveTest
+class NullableTypeInOnClauseTest extends DriverResolutionTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions =>
+      AnalysisOptionsImpl()..enabledExperiments = [EnableString.non_nullable];
+
+  test_nonNullable() async {
+    assertNoErrorsInCode('''
+class A {}
+mixin B on A {}
+''');
+  }
+
+  test_nullable() async {
+    assertErrorCodesInCode('''
+class A {}
+mixin B on A? {}
+''', [CompileTimeErrorCode.NULLABLE_TYPE_IN_ON_CLAUSE]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/nullable_type_in_with_clause_test.dart b/pkg/analyzer/test/src/diagnostics/nullable_type_in_with_clause_test.dart
new file mode 100644
index 0000000..d25ad1f
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/nullable_type_in_with_clause_test.dart
@@ -0,0 +1,69 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(NullableTypeInWithClauseTest);
+  });
+}
+
+@reflectiveTest
+class NullableTypeInWithClauseTest extends DriverResolutionTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions =>
+      AnalysisOptionsImpl()..enabledExperiments = [EnableString.non_nullable];
+
+  test_class_nonNullable() async {
+    assertNoErrorsInCode('''
+class A {}
+class B with A {}
+''');
+  }
+
+  test_class_nullable() async {
+    assertErrorCodesInCode('''
+class A {}
+class B with A? {}
+''', [CompileTimeErrorCode.NULLABLE_TYPE_IN_WITH_CLAUSE]);
+  }
+
+  test_classAlias_withClass_nonNullable() async {
+    assertNoErrorsInCode('''
+class A {}
+class B {}
+class C = A with B;
+''');
+  }
+
+  test_classAlias_withClass_nullable() async {
+    assertErrorCodesInCode('''
+class A {}
+class B {}
+class C = A with B?;
+''', [CompileTimeErrorCode.NULLABLE_TYPE_IN_WITH_CLAUSE]);
+  }
+
+  test_classAlias_withMixin_nonNullable() async {
+    assertNoErrorsInCode('''
+class A {}
+mixin B {}
+class C = A with B;
+''');
+  }
+
+  test_classAlias_withMixin_nullable() async {
+    assertErrorCodesInCode('''
+class A {}
+mixin B {}
+class C = A with B?;
+''', [CompileTimeErrorCode.NULLABLE_TYPE_IN_WITH_CLAUSE]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/override_equals_but_not_hashcode_test.dart b/pkg/analyzer/test/src/diagnostics/override_equals_but_not_hashcode_test.dart
new file mode 100644
index 0000000..7ecb535
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/override_equals_but_not_hashcode_test.dart
@@ -0,0 +1,33 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(OverrideEqualsButNotHashCodeTest);
+  });
+}
+
+@reflectiveTest
+class OverrideEqualsButNotHashCodeTest extends DriverResolutionTest {
+  test_overrideBoth() async {
+    await assertNoErrorsInCode(r'''
+class A {
+  bool operator ==(x) { return x; }
+  get hashCode => 0;
+}''');
+  }
+
+  @failingTest
+  test_overrideEquals_andNotHashCode() async {
+    await assertErrorCodesInCode(r'''
+class A {
+  bool operator ==(x) {}
+}''', [HintCode.OVERRIDE_EQUALS_BUT_NOT_HASH_CODE]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_field_test.dart b/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_field_test.dart
new file mode 100644
index 0000000..514ad99
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_field_test.dart
@@ -0,0 +1,61 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(OverrideOnNonOverridingFieldTest);
+  });
+}
+
+@reflectiveTest
+class OverrideOnNonOverridingFieldTest extends DriverResolutionTest {
+  test_inInterface() async {
+    await assertErrorCodesInCode(r'''
+class A {
+  int get a => 0;
+  void set b(_) {}
+  int c;
+}
+class B implements A {
+  @override
+  final int a = 1;
+  @override
+  int b;
+  @override
+  int c;
+}''', [CompileTimeErrorCode.INVALID_OVERRIDE]);
+  }
+
+  test_inSuperclass() async {
+    await assertErrorCodesInCode(r'''
+class A {
+  int get a => 0;
+  void set b(_) {}
+  int c;
+}
+class B extends A {
+  @override
+  final int a = 1;
+  @override
+  int b;
+  @override
+  int c;
+}''', [CompileTimeErrorCode.INVALID_OVERRIDE]);
+  }
+
+  test_invalid() async {
+    await assertErrorCodesInCode(r'''
+class A {
+}
+class B extends A {
+  @override
+  final int m = 1;
+}''', [HintCode.OVERRIDE_ON_NON_OVERRIDING_FIELD]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_getter_test.dart b/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_getter_test.dart
new file mode 100644
index 0000000..58dfef6
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_getter_test.dart
@@ -0,0 +1,49 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(OverrideOnNonOverridingGetterTest);
+  });
+}
+
+@reflectiveTest
+class OverrideOnNonOverridingGetterTest extends DriverResolutionTest {
+  test_inInterface() async {
+    await assertNoErrorsInCode(r'''
+class A {
+  int get m => 0;
+}
+class B implements A {
+  @override
+  int get m => 1;
+}''');
+  }
+
+  test_inSupertype() async {
+    await assertNoErrorsInCode(r'''
+class A {
+  int get m => 0;
+}
+class B extends A {
+  @override
+  int get m => 1;
+}''');
+  }
+
+  test_invalid() async {
+    await assertErrorCodesInCode(r'''
+class A {
+}
+class B extends A {
+  @override
+  int get m => 1;
+}''', [HintCode.OVERRIDE_ON_NON_OVERRIDING_GETTER]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_method_test.dart b/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_method_test.dart
new file mode 100644
index 0000000..608295d
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_method_test.dart
@@ -0,0 +1,76 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(OverrideOnNonOverridingMethodTest);
+  });
+}
+
+@reflectiveTest
+class OverrideOnNonOverridingMethodTest extends DriverResolutionTest {
+  test_inInterface() async {
+    await assertNoErrorsInCode(r'''
+class A {
+  int m() => 1;
+}
+class B implements A {
+  @override
+  int m() => 1;
+}''');
+  }
+
+  test_inInterfaces() async {
+    await assertNoErrorsInCode(r'''
+abstract class I {
+  void foo(int _);
+}
+
+abstract class J {
+  void foo(String _);
+}
+
+class C implements I, J {
+  @override
+  void foo(Object _) {}
+}''');
+  }
+
+  test_inSuperclass() async {
+    await assertNoErrorsInCode(r'''
+class A {
+  int m() => 1;
+}
+class B extends A {
+  @override
+  int m() => 1;
+}''');
+  }
+
+  test_inSuperclass_abstract() async {
+    await assertNoErrorsInCode(r'''
+abstract class A {
+  int m();
+}
+class B extends A {
+  @override
+  int m() => 1;
+}''');
+  }
+
+  test_invalid() async {
+    await assertErrorCodesInCode(r'''
+class A {
+}
+class B extends A {
+  @override
+  int m() => 1;
+}''', [HintCode.OVERRIDE_ON_NON_OVERRIDING_METHOD]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_setter_test.dart b/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_setter_test.dart
new file mode 100644
index 0000000..0625741
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/override_on_non_overriding_setter_test.dart
@@ -0,0 +1,49 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(OverrideOnNonOverridingSetterTest);
+  });
+}
+
+@reflectiveTest
+class OverrideOnNonOverridingSetterTest extends DriverResolutionTest {
+  test_inInterface() async {
+    await assertNoErrorsInCode(r'''
+class A {
+  set m(int x) {}
+}
+class B implements A {
+  @override
+  set m(int x) {}
+}''');
+  }
+
+  test_inSupertype() async {
+    await assertNoErrorsInCode(r'''
+class A {
+  set m(int x) {}
+}
+class B extends A {
+  @override
+  set m(int x) {}
+}''');
+  }
+
+  test_invalid() async {
+    await assertErrorCodesInCode(r'''
+class A {
+}
+class B extends A {
+  @override
+  set m(int x) {}
+}''', [HintCode.OVERRIDE_ON_NON_OVERRIDING_SETTER]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/sdk_constraint_verifier_support.dart b/pkg/analyzer/test/src/diagnostics/sdk_constraint_verifier_support.dart
new file mode 100644
index 0000000..feb02f5
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/sdk_constraint_verifier_support.dart
@@ -0,0 +1,22 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/error/error.dart';
+import 'package:pub_semver/pub_semver.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+/// A base class designed to be used by tests of the hints produced by the
+/// SdkConstraintVerifier.
+class SdkConstraintVerifierTest extends DriverResolutionTest {
+  /// Verify that the [errorCodes] are produced if the [source] is analyzed in
+  /// a context that specifies the minimum SDK version to be [version].
+  verifyVersion(String version, String source,
+      {List<ErrorCode> errorCodes}) async {
+    driver.configure(
+        analysisOptions: analysisOptions
+          ..sdkVersionConstraint = VersionConstraint.parse(version));
+    await assertErrorCodesInCode(source, errorCodes ?? []);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/sdk_version_as_expression_in_const_context_test.dart b/pkg/analyzer/test/src/diagnostics/sdk_version_as_expression_in_const_context_test.dart
new file mode 100644
index 0000000..b63e481
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/sdk_version_as_expression_in_const_context_test.dart
@@ -0,0 +1,38 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'sdk_constraint_verifier_support.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(SdkVersionAsExpressionInConstContextTest);
+  });
+}
+
+@reflectiveTest
+class SdkVersionAsExpressionInConstContextTest
+    extends SdkConstraintVerifierTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [EnableString.constant_update_2018];
+
+  test_equals() {
+    verifyVersion('2.2.2', '''
+const dynamic a = 2;
+const c = (a as int) + 2;
+''');
+  }
+
+  test_lessThan() {
+    verifyVersion('2.2.0', '''
+const dynamic a = 2;
+const c = (a as int) + 2;
+''', errorCodes: [HintCode.SDK_VERSION_AS_EXPRESSION_IN_CONST_CONTEXT]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/sdk_version_async_exported_from_core_test.dart b/pkg/analyzer/test/src/diagnostics/sdk_version_async_exported_from_core_test.dart
new file mode 100644
index 0000000..7e04d6d
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/sdk_version_async_exported_from_core_test.dart
@@ -0,0 +1,129 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/error/hint_codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'sdk_constraint_verifier_support.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(SdkVersionAsyncExportedFromCoreTest);
+  });
+}
+
+@reflectiveTest
+class SdkVersionAsyncExportedFromCoreTest extends SdkConstraintVerifierTest {
+  test_equals_explicitImportOfAsync() async {
+    await verifyVersion('2.1.0', '''
+import 'dart:async';
+
+Future<int> zero() async => 0;
+''');
+  }
+
+  test_equals_explicitImportOfCore() async {
+    await verifyVersion('2.1.0', '''
+import 'dart:core';
+
+Future<int> zero() async => 0;
+''');
+  }
+
+  test_equals_explicitImportOfExportingLibrary() async {
+    newFile('/test/lib/exporter.dart', content: '''
+export 'dart:async';
+''');
+    await verifyVersion('2.1.0', '''
+import 'exporter.dart';
+
+Future<int> zero() async => 0;
+''');
+  }
+
+  test_equals_implicitImportOfCore() async {
+    await verifyVersion('2.1.0', '''
+Future<int> zero() async => 0;
+''');
+  }
+
+  test_equals_implicitImportOfCore_inPart() async {
+    newFile('/lib.dart', content: '''
+library lib;
+''');
+    await verifyVersion('2.1.0', '''
+part of lib;
+
+Future<int> zero() async => 0;
+''');
+  }
+
+  test_lessThan_explicitImportOfAsync() async {
+    await verifyVersion('2.0.0', '''
+import 'dart:async';
+
+Future<int> zero() async => 0;
+''');
+  }
+
+  test_lessThan_explicitImportOfCore() async {
+    await verifyVersion('2.0.0', '''
+import 'dart:core' show Future, int;
+
+Future<int> zero() async => 0;
+''', errorCodes: [HintCode.SDK_VERSION_ASYNC_EXPORTED_FROM_CORE]);
+  }
+
+  test_lessThan_explicitImportOfExportingLibrary() async {
+    newFile('/test/lib/exporter.dart', content: '''
+export 'dart:async';
+''');
+    await verifyVersion('2.0.0', '''
+import 'exporter.dart';
+
+Future<int> zero() async => 0;
+''');
+  }
+
+  test_lessThan_implicitImportOfCore() async {
+    await verifyVersion('2.0.0', '''
+Future<int> zero() async => 0;
+''', errorCodes: [HintCode.SDK_VERSION_ASYNC_EXPORTED_FROM_CORE]);
+  }
+
+  test_lessThan_implicitImportOfCore_inPart() async {
+    newFile('/lib.dart', content: '''
+library lib;
+''');
+    await verifyVersion('2.0.0', '''
+part of lib;
+
+Future<int> zero() async => 0;
+''', errorCodes: [HintCode.SDK_VERSION_ASYNC_EXPORTED_FROM_CORE]);
+  }
+
+  test_lessThan_onlyReferencedInExport_hide() async {
+    await verifyVersion('2.0.0', '''
+export 'dart:async' hide Future;
+''');
+  }
+
+  test_lessThan_onlyReferencedInExport_show() async {
+    await verifyVersion('2.0.0', '''
+export 'dart:async' show Future;
+''');
+  }
+
+  test_lessThan_onlyReferencedInImport_hide() async {
+    await verifyVersion('2.0.0', '''
+import 'dart:core' hide Future;
+''');
+  }
+
+  test_lessThan_onlyReferencedInImport_show() async {
+    await verifyVersion('2.0.0', '''
+import 'dart:core' show Future;
+''');
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/sdk_version_bool_operator_test.dart b/pkg/analyzer/test/src/diagnostics/sdk_version_bool_operator_test.dart
new file mode 100644
index 0000000..1b16612
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/sdk_version_bool_operator_test.dart
@@ -0,0 +1,95 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'sdk_constraint_verifier_support.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(SdkVersionBoolOperatorTest);
+  });
+}
+
+@reflectiveTest
+class SdkVersionBoolOperatorTest extends SdkConstraintVerifierTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [EnableString.constant_update_2018];
+
+  test_and_const_equals() {
+    verifyVersion('2.2.2', '''
+const c = true & false;
+''');
+  }
+
+  test_and_const_lessThan() {
+    verifyVersion('2.2.0', '''
+const c = true & false;
+''', errorCodes: [HintCode.SDK_VERSION_BOOL_OPERATOR]);
+  }
+
+  test_and_nonConst_equals() {
+    verifyVersion('2.2.2', '''
+var c = true & false;
+''');
+  }
+
+  test_and_nonConst_lessThan() {
+    verifyVersion('2.2.0', '''
+var c = true & false;
+''');
+  }
+
+  test_or_const_equals() {
+    verifyVersion('2.2.2', '''
+const c = true | false;
+''');
+  }
+
+  test_or_const_lessThan() {
+    verifyVersion('2.2.0', '''
+const c = true | false;
+''', errorCodes: [HintCode.SDK_VERSION_BOOL_OPERATOR]);
+  }
+
+  test_or_nonConst_equals() {
+    verifyVersion('2.2.2', '''
+var c = true | false;
+''');
+  }
+
+  test_or_nonConst_lessThan() {
+    verifyVersion('2.2.0', '''
+var c = true | false;
+''');
+  }
+
+  test_xor_const_equals() {
+    verifyVersion('2.2.2', '''
+const c = true ^ false;
+''');
+  }
+
+  test_xor_const_lessThan() {
+    verifyVersion('2.2.0', '''
+const c = true ^ false;
+''', errorCodes: [HintCode.SDK_VERSION_BOOL_OPERATOR]);
+  }
+
+  test_xor_nonConst_equals() {
+    verifyVersion('2.2.2', '''
+var c = true ^ false;
+''');
+  }
+
+  test_xor_nonConst_lessThan() {
+    verifyVersion('2.2.0', '''
+var c = true ^ false;
+''');
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/sdk_version_eq_eq_operator_test.dart b/pkg/analyzer/test/src/diagnostics/sdk_version_eq_eq_operator_test.dart
new file mode 100644
index 0000000..3d6b6ca
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/sdk_version_eq_eq_operator_test.dart
@@ -0,0 +1,63 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'sdk_constraint_verifier_support.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(SdkVersionEqEqOperatorTest);
+  });
+}
+
+@reflectiveTest
+class SdkVersionEqEqOperatorTest extends SdkConstraintVerifierTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [EnableString.constant_update_2018];
+
+  test_left_equals() {
+    verifyVersion('2.2.2', '''
+class A {
+  const A();
+}
+const A a = A();
+const c = a == null;
+''');
+  }
+
+  test_left_lessThan() {
+    verifyVersion('2.2.0', '''
+class A {
+  const A();
+}
+const A a = A();
+const c = a == null;
+''', errorCodes: [HintCode.SDK_VERSION_EQ_EQ_OPERATOR_IN_CONST_CONTEXT]);
+  }
+
+  test_right_equals() {
+    verifyVersion('2.2.2', '''
+class A {
+  const A();
+}
+const A a = A();
+const c = null == a;
+''');
+  }
+
+  test_right_lessThan() {
+    verifyVersion('2.2.0', '''
+class A {
+  const A();
+}
+const A a = A();
+const c = null == a;
+''', errorCodes: [HintCode.SDK_VERSION_EQ_EQ_OPERATOR_IN_CONST_CONTEXT]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/sdk_version_gt_gt_gt_operator_test.dart b/pkg/analyzer/test/src/diagnostics/sdk_version_gt_gt_gt_operator_test.dart
new file mode 100644
index 0000000..5e5f140
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/sdk_version_gt_gt_gt_operator_test.dart
@@ -0,0 +1,77 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'sdk_constraint_verifier_support.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(SdkVersionGtGtGtOperatorTest);
+  });
+}
+
+@reflectiveTest
+class SdkVersionGtGtGtOperatorTest extends SdkConstraintVerifierTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions =>
+      AnalysisOptionsImpl()..enabledExperiments = [EnableString.triple_shift];
+
+  test_const_equals() {
+    // TODO(brianwilkerson) Add '>>>' to MockSdk and remove the code
+    //  UNDEFINED_OPERATOR when triple_shift is enabled by default.
+    verifyVersion('2.2.2', '''
+const a = 42 >>> 3;
+''', errorCodes: [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+  }
+
+  test_const_lessThan() {
+    // TODO(brianwilkerson) Add '>>>' to MockSdk and remove the code
+    //  UNDEFINED_OPERATOR when triple_shift is enabled by default.
+    verifyVersion('2.2.0', '''
+const a = 42 >>> 3;
+''', errorCodes: [
+      StaticTypeWarningCode.UNDEFINED_OPERATOR,
+      HintCode.SDK_VERSION_GT_GT_GT_OPERATOR
+    ]);
+  }
+
+  test_declaration_equals() {
+    verifyVersion('2.2.2', '''
+class A {
+  A operator >>>(A a) => this;
+}
+''');
+  }
+
+  test_declaration_lessThan() {
+    verifyVersion('2.2.0', '''
+class A {
+  A operator >>>(A a) => this;
+}
+''', errorCodes: [HintCode.SDK_VERSION_GT_GT_GT_OPERATOR]);
+  }
+
+  test_nonConst_equals() {
+    // TODO(brianwilkerson) Add '>>>' to MockSdk and remove the code
+    //  UNDEFINED_OPERATOR when constant update is enabled by default.
+    verifyVersion('2.2.2', '''
+var a = 42 >>> 3;
+''', errorCodes: [StaticTypeWarningCode.UNDEFINED_OPERATOR]);
+  }
+
+  test_nonConst_lessThan() {
+    // TODO(brianwilkerson) Add '>>>' to MockSdk and remove the code
+    //  UNDEFINED_OPERATOR when constant update is enabled by default.
+    verifyVersion('2.2.0', '''
+var a = 42 >>> 3;
+''', errorCodes: [
+      StaticTypeWarningCode.UNDEFINED_OPERATOR,
+      HintCode.SDK_VERSION_GT_GT_GT_OPERATOR
+    ]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/sdk_version_is_expression_in_const_context_test.dart b/pkg/analyzer/test/src/diagnostics/sdk_version_is_expression_in_const_context_test.dart
new file mode 100644
index 0000000..70778cf
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/sdk_version_is_expression_in_const_context_test.dart
@@ -0,0 +1,38 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'sdk_constraint_verifier_support.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(SdkVersionIsExpressionInConstContextTest);
+  });
+}
+
+@reflectiveTest
+class SdkVersionIsExpressionInConstContextTest
+    extends SdkConstraintVerifierTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [EnableString.constant_update_2018];
+
+  test_equals() {
+    verifyVersion('2.2.2', '''
+const dynamic a = 2;
+const c = a is int;
+''');
+  }
+
+  test_lessThan() {
+    verifyVersion('2.2.0', '''
+const dynamic a = 2;
+const c = a is int;
+''', errorCodes: [HintCode.SDK_VERSION_IS_EXPRESSION_IN_CONST_CONTEXT]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/sdk_version_set_literal_test.dart b/pkg/analyzer/test/src/diagnostics/sdk_version_set_literal_test.dart
new file mode 100644
index 0000000..4a7b294
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/sdk_version_set_literal_test.dart
@@ -0,0 +1,35 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/error/hint_codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'sdk_constraint_verifier_support.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(SdkVersionSetLiteralTest);
+  });
+}
+
+@reflectiveTest
+class SdkVersionSetLiteralTest extends SdkConstraintVerifierTest {
+  test_equals() async {
+    await verifyVersion('2.2.0', '''
+Set<int> zero() => <int>{0};
+''');
+  }
+
+  test_greaterThan() async {
+    await verifyVersion('2.3.0', '''
+Set<int> zero() => <int>{0};
+''');
+  }
+
+  test_lessThan() async {
+    await verifyVersion('2.1.0', '''
+Set<int> zero() => <int>{0};
+''', errorCodes: [HintCode.SDK_VERSION_SET_LITERAL]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/sdk_version_ui_as_code_test.dart b/pkg/analyzer/test/src/diagnostics/sdk_version_ui_as_code_test.dart
new file mode 100644
index 0000000..d14a9a2
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/sdk_version_ui_as_code_test.dart
@@ -0,0 +1,44 @@
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/dart/error/hint_codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'sdk_constraint_verifier_support.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(SdkVersionUiAsCodeTest);
+  });
+}
+
+@reflectiveTest
+class SdkVersionUiAsCodeTest extends SdkConstraintVerifierTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections
+    ];
+
+  test_equals() async {
+    await verifyVersion('2.2.2', '''
+List<int> zero() => [for (var e in [0]) e];
+''');
+  }
+
+  test_greaterThan() async {
+    await verifyVersion('2.3.0', '''
+List<int> zero() => [...[0]];
+''');
+  }
+
+  test_lessThan() async {
+    await verifyVersion('2.2.1', '''
+List<int> zero() => [if (0 < 1) 0];
+''', errorCodes: [HintCode.SDK_VERSION_UI_AS_CODE]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/set_element_type_not_assignable_test.dart b/pkg/analyzer/test/src/diagnostics/set_element_type_not_assignable_test.dart
new file mode 100644
index 0000000..1a71c80
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/set_element_type_not_assignable_test.dart
@@ -0,0 +1,193 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(SetElementTypeNotAssignableTest);
+    defineReflectiveTests(
+        SetElementTypeNotAssignableWithUiAsCodeAndConstantTest);
+    defineReflectiveTests(SetElementTypeNotAssignableWithUIAsCodeTest);
+  });
+}
+
+@reflectiveTest
+class SetElementTypeNotAssignableTest extends DriverResolutionTest {
+  test_explicitTypeArgs_const() async {
+    await assertErrorCodesInCode('''
+var v = const <String>{42};
+''', [StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE]);
+  }
+
+  test_explicitTypeArgs_const_actualTypeMatch() async {
+    await assertNoErrorsInCode('''
+const dynamic x = null;
+var v = const <String>{x};
+''');
+  }
+
+  test_explicitTypeArgs_const_actualTypeMismatch() async {
+    await assertErrorCodesInCode('''
+const dynamic x = 42;
+var v = const <String>{x};
+''', [StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE]);
+  }
+
+  test_explicitTypeArgs_notConst() async {
+    await assertErrorCodesInCode('''
+var v = <String>{42};
+''', [StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE]);
+  }
+}
+
+@reflectiveTest
+class SetElementTypeNotAssignableWithUiAsCodeAndConstantTest
+    extends SetElementTypeNotAssignableWithUIAsCodeTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+      EnableString.constant_update_2018
+    ];
+}
+
+@reflectiveTest
+class SetElementTypeNotAssignableWithUIAsCodeTest
+    extends SetElementTypeNotAssignableTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections
+    ];
+
+  test_const_ifElement_thenElseFalse_intInt() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = 0;
+const dynamic b = 0;
+var v = const <int>{if (1 < 0) a else b};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+
+  test_const_ifElement_thenElseFalse_intString() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = 0;
+const dynamic b = 'b';
+var v = const <int>{if (1 < 0) a else b};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE]
+            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+
+  test_const_ifElement_thenFalse_intString() async {
+    await assertErrorCodesInCode(
+        '''
+var v = const <int>{if (1 < 0) 'a'};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE]
+            : [
+                StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE,
+                CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT
+              ]);
+  }
+
+  test_const_ifElement_thenFalse_intString_dynamic() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = 'a';
+var v = const <int>{if (1 < 0) a};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+
+  test_const_ifElement_thenTrue_intInt() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = 0;
+var v = const <int>{if (true) a};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+
+  test_const_ifElement_thenTrue_intString() async {
+    await assertErrorCodesInCode(
+        '''
+const dynamic a = 'a';
+var v = const <int>{if (true) a};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? [StaticWarningCode.SET_ELEMENT_TYPE_NOT_ASSIGNABLE]
+            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+
+  test_const_spread_intInt() async {
+    await assertErrorCodesInCode(
+        '''
+var v = const <int>{...[0, 1]};
+''',
+        analysisOptions.experimentStatus.constant_update_2018
+            ? []
+            : [CompileTimeErrorCode.NON_CONSTANT_SET_ELEMENT]);
+  }
+
+  test_nonConst_ifElement_thenElseFalse_intDynamic() async {
+    await assertNoErrorsInCode('''
+const dynamic a = 'a';
+const dynamic b = 'b';
+var v = <int>{if (1 < 0) a else b};
+''');
+  }
+
+  test_nonConst_ifElement_thenElseFalse_intInt() async {
+    await assertNoErrorsInCode('''
+const dynamic a = 0;
+const dynamic b = 0;
+var v = <int>{if (1 < 0) a else b};
+''');
+  }
+
+  test_nonConst_ifElement_thenFalse_intString() async {
+    await assertErrorCodesInCode('''
+var v = <int>[if (1 < 0) 'a'];
+''', [StaticWarningCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE]);
+  }
+
+  test_nonConst_ifElement_thenTrue_intDynamic() async {
+    await assertNoErrorsInCode('''
+const dynamic a = 'a';
+var v = <int>{if (true) a};
+''');
+  }
+
+  test_nonConst_ifElement_thenTrue_intInt() async {
+    await assertNoErrorsInCode('''
+const dynamic a = 0;
+var v = <int>{if (true) a};
+''');
+  }
+
+  test_nonConst_spread_intInt() async {
+    await assertNoErrorsInCode('''
+var v = <int>{...[0, 1]};
+''');
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/subtype_of_sealed_class_test.dart b/pkg/analyzer/test/src/diagnostics/subtype_of_sealed_class_test.dart
new file mode 100644
index 0000000..ab27d78
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/subtype_of_sealed_class_test.dart
@@ -0,0 +1,214 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/test_utilities/package_mixin.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(SubtypeOfSealedClassTest);
+  });
+}
+
+@reflectiveTest
+class SubtypeOfSealedClassTest extends DriverResolutionTest with PackageMixin {
+  test_extendingSealedClass() async {
+    addMetaPackage();
+    _addPackage('foo', r'''
+import 'package:meta/meta.dart';
+@sealed class Foo {}
+''');
+
+    _newPubPackageRoot('/pkg1');
+    newFile('/pkg1/lib/lib1.dart', content: r'''
+import 'package:foo/foo.dart';
+class Bar extends Foo {}
+''');
+    await _resolveTestFile('/pkg1/lib/lib1.dart');
+    assertTestErrorsWithCodes([HintCode.SUBTYPE_OF_SEALED_CLASS]);
+  }
+
+  test_implementingSealedClass() async {
+    addMetaPackage();
+    _addPackage('foo', r'''
+import 'package:meta/meta.dart';
+@sealed class Foo {}
+''');
+
+    _newPubPackageRoot('/pkg1');
+    newFile('/pkg1/lib/lib1.dart', content: r'''
+import 'package:foo/foo.dart';
+class Bar implements Foo {}
+''');
+    await _resolveTestFile('/pkg1/lib/lib1.dart');
+    assertTestErrorsWithCodes([HintCode.SUBTYPE_OF_SEALED_CLASS]);
+  }
+
+  test_mixinApplicationOfSealedClass() async {
+    addMetaPackage();
+    _addPackage('foo', r'''
+import 'package:meta/meta.dart';
+@sealed class Foo {}
+''');
+
+    _newPubPackageRoot('/pkg1');
+    newFile('/pkg1/lib/lib1.dart', content: r'''
+import 'package:foo/foo.dart';
+class Bar1 {}
+class Bar2 = Bar1 with Foo;
+''');
+    await _resolveTestFile('/pkg1/lib/lib1.dart');
+    assertTestErrorsWithCodes([HintCode.SUBTYPE_OF_SEALED_CLASS]);
+  }
+
+  test_mixinApplicationOfSealedMixin() async {
+    addMetaPackage();
+    _addPackage('foo', r'''
+import 'package:meta/meta.dart';
+@sealed mixin Foo {}
+''');
+
+    _newPubPackageRoot('/pkg1');
+    newFile('/pkg1/lib/lib1.dart', content: r'''
+import 'package:foo/foo.dart';
+class Bar1 {}
+class Bar2 = Bar1 with Foo;
+''');
+    await _resolveTestFile('/pkg1/lib/lib1.dart');
+    assertTestErrorsWithCodes([HintCode.SUBTYPE_OF_SEALED_CLASS]);
+  }
+
+  test_mixingInWithSealedMixin() async {
+    addMetaPackage();
+    _addPackage('foo', r'''
+import 'package:meta/meta.dart';
+@sealed mixin Foo {}
+''');
+
+    _newPubPackageRoot('/pkg1');
+    newFile('/pkg1/lib/lib1.dart', content: r'''
+import 'package:foo/foo.dart';
+class Bar extends Object with Foo {}
+''');
+    await _resolveTestFile('/pkg1/lib/lib1.dart');
+    assertTestErrorsWithCodes([HintCode.SUBTYPE_OF_SEALED_CLASS]);
+  }
+
+  test_mixinImplementsSealedClass() async {
+    addMetaPackage();
+    _addPackage('foo', r'''
+import 'package:meta/meta.dart';
+@sealed class Foo {}
+''');
+
+    _newPubPackageRoot('/pkg1');
+    newFile('/pkg1/lib/lib1.dart', content: r'''
+import 'package:foo/foo.dart';
+mixin Bar implements Foo {}
+''');
+    await _resolveTestFile('/pkg1/lib/lib1.dart');
+    assertTestErrorsWithCodes([HintCode.SUBTYPE_OF_SEALED_CLASS]);
+  }
+
+  test_withinLibrary_OK() async {
+    addMetaPackage();
+
+    _newPubPackageRoot('/pkg1');
+    newFile('/pkg1/lib/lib1.dart', content: r'''
+import 'package:meta/meta.dart';
+@sealed class Foo {}
+
+class Bar1 extends Foo {}
+class Bar2 implements Foo {}
+class Bar4 = Bar1 with Foo;
+mixin Bar5 implements Foo {}
+''');
+    await _resolveTestFile('/pkg1/lib/lib1.dart');
+    assertNoTestErrors();
+  }
+
+  test_withinPackageLibDirectory_OK() async {
+    addMetaPackage();
+
+    _newPubPackageRoot('/pkg1');
+    newFile('/pkg1/lib/lib1.dart', content: r'''
+import 'package:meta/meta.dart';
+@sealed class Foo {}
+''');
+    newFile('/pkg1/lib/src/lib2.dart', content: r'''
+import '../lib1.dart';
+class Bar1 extends Foo {}
+class Bar2 implements Foo {}
+class Bar4 = Bar1 with Foo;
+mixin Bar5 implements Foo {}
+''');
+    await _resolveTestFile('/pkg1/lib/lib1.dart');
+    await _resolveTestFile('/pkg1/lib/src/lib2.dart');
+    assertNoTestErrors();
+  }
+
+  test_withinPackageTestDirectory_OK() async {
+    addMetaPackage();
+
+    _newPubPackageRoot('/pkg1');
+    newFile('/pkg1/lib/lib1.dart', content: r'''
+import 'package:meta/meta.dart';
+@sealed class Foo {}
+''');
+    newFile('/pkg1/test/test.dart', content: r'''
+import '../lib/lib1.dart';
+class Bar1 extends Foo {}
+class Bar2 implements Foo {}
+class Bar4 = Bar1 with Foo;
+mixin Bar5 implements Foo {}
+''');
+    await _resolveTestFile('/pkg1/lib/lib1.dart');
+    await _resolveTestFile('/pkg1/test/test.dart');
+    assertNoTestErrors();
+  }
+
+  test_withinPart_OK() async {
+    addMetaPackage();
+
+    _newPubPackageRoot('/pkg1');
+    newFile('/pkg1/lib/lib1.dart', content: r'''
+import 'package:meta/meta.dart';
+part 'part1.dart';
+@sealed class Foo {}
+''');
+    newFile('/pkg1/lib/part1.dart', content: r'''
+part of 'lib1.dart';
+class Bar1 extends Foo {}
+class Bar2 implements Foo {}
+class Bar4 = Bar1 with Foo;
+mixin Bar5 implements Foo {}
+''');
+    await _resolveTestFile('/pkg1/lib/lib1.dart');
+    assertNoTestErrors();
+  }
+
+  /// Add a package named [name], and one library file, with content
+  /// [libraryContent].
+  void _addPackage(String name, String libraryContent) {
+    Folder lib = addPubPackage(name);
+    newFile(join(lib.path, '$name.dart'), content: libraryContent);
+  }
+
+  /// Write a pubspec file at [root], so that BestPracticesVerifier can see
+  /// that [root] is the root of a PubWorkspace, and a PubWorkspacePackage.
+  void _newPubPackageRoot(String root) {
+    newFile('$root/pubspec.yaml');
+  }
+
+  /// Resolve the test file at [path].
+  ///
+  /// Similar to ResolutionTest.resolveTestFile, but a custom path is supported.
+  Future<void> _resolveTestFile(String path) async {
+    result = await resolveFile(convertPath(path));
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/test_all.dart b/pkg/analyzer/test/src/diagnostics/test_all.dart
index 5deb7f2..56a1409 100644
--- a/pkg/analyzer/test/src/diagnostics/test_all.dart
+++ b/pkg/analyzer/test/src/diagnostics/test_all.dart
@@ -4,28 +4,137 @@
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
+import 'ambiguous_set_or_map_literal_test.dart' as ambiguous_set_or_map_literal;
 import 'argument_type_not_assignable_test.dart' as argument_type_not_assignable;
+import 'async_keyword_used_as_identifier_test.dart'
+    as async_keyword_used_as_identifier;
 import 'can_be_null_after_null_aware_test.dart' as can_be_null_after_null_aware;
+import 'const_constructor_param_type_mismatch_test.dart'
+    as const_constructor_param_type_mismatch;
+import 'const_constructor_with_mixin_with_field_test.dart'
+    as const_constructor_with_mixin_with_field;
+import 'const_eval_throws_exception_test.dart' as const_eval_throws_exception;
+import 'const_map_key_expression_type_implements_equals_test.dart'
+    as const_map_key_expression_type_implements_equals;
+import 'const_set_element_type_implements_equals_test.dart'
+    as const_set_element_type_implements_equals;
+import 'const_spread_expected_list_or_set_test.dart'
+    as const_spread_expected_list_or_set;
+import 'const_spread_expected_map_test.dart' as const_spread_expected_map;
+import 'dead_code_test.dart' as dead_code;
 import 'deprecated_member_use_test.dart' as deprecated_member_use;
 import 'division_optimization_test.dart' as division_optimization;
+import 'duplicate_import_test.dart' as duplicate_import;
+import 'equal_elements_in_const_set_test.dart' as equal_elements_in_const_set;
+import 'equal_keys_in_const_map_test.dart' as equal_keys_in_const_map;
+import 'expression_in_map_test.dart' as expression_in_map;
+import 'import_deferred_library_with_load_function_test.dart'
+    as import_deferred_library_with_load_function;
 import 'invalid_assignment_test.dart' as invalid_assignment;
 import 'invalid_cast_new_expr_test.dart' as invalid_cast_new_expr;
+import 'invalid_factory_annotation_test.dart' as invalid_factory_annotation;
+import 'invalid_factory_method_impl_test.dart' as invalid_factory_method_impl;
+import 'invalid_immutable_annotation_test.dart' as invalid_immutable_annotation;
+import 'invalid_literal_annotation_test.dart' as invalid_literal_annotation;
 import 'invalid_override_different_default_values_named_test.dart'
     as invalid_override_different_default_values_named;
 import 'invalid_override_different_default_values_positional_test.dart'
     as invalid_override_different_default_values_positional;
 import 'invalid_required_param_test.dart' as invalid_required_param;
+import 'invalid_sealed_annotation_test.dart' as invalid_sealed_annotation;
+import 'invalid_use_of_protected_member_test.dart'
+    as invalid_use_of_protected_member;
+import 'invalid_use_of_visible_for_template_member_test.dart'
+    as invalid_use_of_visible_for_template_member;
+import 'invalid_use_of_visible_for_testing_member_test.dart'
+    as invalid_use_of_visible_for_testing_member;
+import 'invalid_visibility_annotation_test.dart'
+    as invalid_visibility_annotation;
+import 'list_element_type_not_assignable_test.dart'
+    as list_element_type_not_assignable;
+import 'map_entry_not_in_map_test.dart' as map_entry_not_in_map;
+import 'map_key_type_not_assignable_test.dart' as map_key_type_not_assignable;
+import 'map_value_type_not_assignable_test.dart'
+    as map_value_type_not_assignable;
+import 'missing_required_param_test.dart' as missing_required_param;
+import 'missing_return_test.dart' as missing_return;
+import 'mixin_on_sealed_class_test.dart' as mixin_on_sealed_class;
+import 'must_be_immutable_test.dart' as must_be_immutable;
+import 'must_call_super_test.dart' as must_call_super;
+import 'non_bool_condition_test.dart' as non_bool_condition;
+import 'non_constant_if_element_condition_from_deferred_library_test.dart'
+    as non_constant_if_element_condition_from_deferred_library;
+import 'non_constant_list_element_from_deferred_library_test.dart'
+    as non_constant_list_element_from_deferred_library;
+import 'non_constant_list_element_test.dart' as non_constant_list_element;
+import 'non_constant_map_element_test.dart' as non_constant_map_element;
+import 'non_constant_map_key_from_deferred_library_test.dart'
+    as non_constant_map_key_from_deferred_library;
+import 'non_constant_map_key_test.dart' as non_constant_map_key;
+import 'non_constant_map_value_from_deferred_library_test.dart'
+    as non_constant_map_value_from_deferred_library;
+import 'non_constant_map_value_test.dart' as non_constant_map_value;
+import 'non_constant_set_element_from_deferred_library_test.dart'
+    as non_constant_set_element_from_deferred_library;
+import 'non_constant_set_element_test.dart' as non_constant_set_element;
+import 'non_constant_spread_expression_from_deferred_library_test.dart'
+    as non_constant_spread_expression_from_deferred_library;
+import 'not_iterable_spread_test.dart' as not_iterable_spread;
+import 'not_map_spread_test.dart' as not_map_spread;
+import 'not_null_aware_null_spread_test.dart' as not_null_aware_null_spread;
+import 'null_aware_before_operator_test.dart' as null_aware_before_operator;
+import 'null_aware_in_condition_test.dart' as null_aware_in_condition;
+import 'null_aware_in_logical_operator_test.dart'
+    as null_aware_in_logical_operator;
+import 'nullable_type_in_catch_clause_test.dart'
+    as nullable_type_in_catch_clause;
+import 'nullable_type_in_extends_clause_test.dart'
+    as nullable_type_in_extends_clause;
+import 'nullable_type_in_implements_clause_test.dart'
+    as nullable_type_in_implements_clause;
+import 'nullable_type_in_on_clause_test.dart' as nullable_type_in_on_clause;
+import 'nullable_type_in_with_clause_test.dart' as nullable_type_in_with_clause;
+import 'override_equals_but_not_hashcode_test.dart'
+    as override_equals_but_not_hashcode;
+import 'override_on_non_overriding_field_test.dart'
+    as override_on_non_overriding_field;
+import 'override_on_non_overriding_getter_test.dart'
+    as override_on_non_overriding_getter;
+import 'override_on_non_overriding_method_test.dart'
+    as override_on_non_overriding_method;
+import 'override_on_non_overriding_setter_test.dart'
+    as override_on_non_overriding_setter;
+import 'sdk_version_as_expression_in_const_context_test.dart'
+    as sdk_version_as_expression_in_const_context;
+import 'sdk_version_async_exported_from_core_test.dart'
+    as sdk_version_async_exported_from_core;
+import 'sdk_version_bool_operator_test.dart' as sdk_version_bool_operator;
+import 'sdk_version_eq_eq_operator_test.dart' as sdk_version_eq_eq_operator;
+import 'sdk_version_gt_gt_gt_operator_test.dart'
+    as sdk_version_gt_gt_gt_operator;
+import 'sdk_version_is_expression_in_const_context_test.dart'
+    as sdk_version_is_expression_in_const_context;
+import 'sdk_version_set_literal_test.dart' as sdk_version_set_literal;
+import 'sdk_version_ui_as_code_test.dart' as sdk_version_ui_as_code;
+import 'set_element_type_not_assignable_test.dart'
+    as set_element_type_not_assignable;
+import 'subtype_of_sealed_class_test.dart' as subtype_of_sealed_class;
 import 'top_level_instance_getter_test.dart' as top_level_instance_getter;
 import 'top_level_instance_method_test.dart' as top_level_instance_method;
 import 'type_check_is_not_null_test.dart' as type_check_is_not_null;
 import 'type_check_is_null_test.dart' as type_check_is_null;
+import 'unchecked_use_of_nullable_value_test.dart'
+    as unchecked_use_of_nullable_value;
 import 'undefined_getter_test.dart' as undefined_getter;
 import 'undefined_hidden_name_test.dart' as undefined_hidden_name;
+import 'undefined_identifier_test.dart' as undefined_identifier;
 import 'undefined_operator_test.dart' as undefined_operator;
+import 'undefined_prefixed_name_test.dart' as undefined_prefixed_name;
 import 'undefined_setter_test.dart' as undefined_setter;
 import 'undefined_shown_name_test.dart' as undefined_shown_name;
 import 'unnecessary_cast_test.dart' as unnecessary_cast;
 import 'unnecessary_no_such_method_test.dart' as unnecessary_no_such_method;
+import 'unnecessary_null_aware_call_test.dart' as unnecessary_null_aware_call;
 import 'unnecessary_type_check_false_test.dart' as unnecessary_type_check_false;
 import 'unnecessary_type_check_true_test.dart' as unnecessary_type_check_true;
 import 'unused_catch_clause_test.dart' as unused_catch_clause;
@@ -37,29 +146,105 @@
 import 'unused_local_variable_test.dart' as unused_local_variable;
 import 'unused_shown_name_test.dart' as unused_shown_name;
 import 'use_of_void_result_test.dart' as use_of_void_result;
+import 'variable_type_mismatch_test.dart' as variable_type_mismatch;
 
 main() {
   defineReflectiveSuite(() {
+    ambiguous_set_or_map_literal.main();
     argument_type_not_assignable.main();
+    async_keyword_used_as_identifier.main();
     can_be_null_after_null_aware.main();
+    const_constructor_param_type_mismatch.main();
+    const_constructor_with_mixin_with_field.main();
+    const_eval_throws_exception.main();
+    const_map_key_expression_type_implements_equals.main();
+    const_set_element_type_implements_equals.main();
+    const_spread_expected_list_or_set.main();
+    const_spread_expected_map.main();
+    dead_code.main();
     deprecated_member_use.main();
     division_optimization.main();
+    duplicate_import.main();
+    equal_elements_in_const_set.main();
+    equal_keys_in_const_map.main();
+    expression_in_map.main();
+    import_deferred_library_with_load_function.main();
     invalid_assignment.main();
     invalid_cast_new_expr.main();
+    invalid_factory_annotation.main();
+    invalid_factory_method_impl.main();
+    invalid_immutable_annotation.main();
+    invalid_literal_annotation.main();
     invalid_override_different_default_values_named.main();
     invalid_override_different_default_values_positional.main();
     invalid_required_param.main();
+    invalid_sealed_annotation.main();
+    invalid_use_of_protected_member.main();
+    invalid_use_of_visible_for_template_member.main();
+    invalid_use_of_visible_for_testing_member.main();
+    invalid_visibility_annotation.main();
+    list_element_type_not_assignable.main();
+    map_entry_not_in_map.main();
+    map_key_type_not_assignable.main();
+    map_value_type_not_assignable.main();
+    missing_required_param.main();
+    missing_return.main();
+    mixin_on_sealed_class.main();
+    must_be_immutable.main();
+    must_call_super.main();
+    non_bool_condition.main();
+    non_constant_if_element_condition_from_deferred_library.main();
+    non_constant_list_element.main();
+    non_constant_list_element_from_deferred_library.main();
+    non_constant_map_key.main();
+    non_constant_map_key_from_deferred_library.main();
+    non_constant_map_element.main();
+    non_constant_map_value.main();
+    non_constant_map_value_from_deferred_library.main();
+    non_constant_set_element.main();
+    non_constant_set_element_from_deferred_library.main();
+    non_constant_spread_expression_from_deferred_library.main();
+    not_iterable_spread.main();
+    not_map_spread.main();
+    not_null_aware_null_spread.main();
+    null_aware_before_operator.main();
+    null_aware_in_condition.main();
+    null_aware_in_logical_operator.main();
+    nullable_type_in_catch_clause.main();
+    nullable_type_in_extends_clause.main();
+    nullable_type_in_implements_clause.main();
+    nullable_type_in_on_clause.main();
+    nullable_type_in_with_clause.main();
+    override_equals_but_not_hashcode.main();
+    override_on_non_overriding_field.main();
+    override_on_non_overriding_getter.main();
+    override_on_non_overriding_method.main();
+    override_on_non_overriding_setter.main();
+    sdk_version_as_expression_in_const_context.main();
+    sdk_version_async_exported_from_core.main();
+    sdk_version_bool_operator.main();
+    sdk_version_eq_eq_operator.main();
+    sdk_version_gt_gt_gt_operator.main();
+    sdk_version_is_expression_in_const_context.main();
+    sdk_version_set_literal.main();
+    sdk_version_ui_as_code.main();
+    set_element_type_not_assignable.main();
+    subtype_of_sealed_class.main();
     top_level_instance_getter.main();
     top_level_instance_method.main();
     type_check_is_not_null.main();
     type_check_is_null.main();
+    unchecked_use_of_nullable_value.main();
     undefined_getter.main();
+    undefined_identifier.main();
     undefined_hidden_name.main();
     undefined_operator.main();
+    undefined_prefixed_name.main();
     undefined_setter.main();
     undefined_shown_name.main();
     unnecessary_cast.main();
     unnecessary_no_such_method.main();
+    unnecessary_null_aware_call.main();
     unnecessary_type_check_false.main();
     unnecessary_type_check_true.main();
     unused_catch_clause.main();
@@ -71,5 +256,6 @@
     unused_local_variable.main();
     unused_shown_name.main();
     use_of_void_result.main();
+    variable_type_mismatch.main();
   }, name: 'diagnostics');
 }
diff --git a/pkg/analyzer/test/src/diagnostics/top_level_instance_getter_test.dart b/pkg/analyzer/test/src/diagnostics/top_level_instance_getter_test.dart
index dae29d6..8427700 100644
--- a/pkg/analyzer/test/src/diagnostics/top_level_instance_getter_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/top_level_instance_getter_test.dart
@@ -76,7 +76,7 @@
   }
 
   test_implicitlyTyped() async {
-    await assertErrorsInCode('''
+    await assertErrorCodesInCode('''
 class A {
   get g => 0;
 }
@@ -85,7 +85,7 @@
   }
 
   test_implicitlyTyped_call() async {
-    await assertErrorsInCode('''
+    await assertErrorCodesInCode('''
 class A {
   get g => () => 0;
 }
@@ -95,7 +95,7 @@
   }
 
   test_implicitlyTyped_field() async {
-    await assertErrorsInCode('''
+    await assertErrorCodesInCode('''
 class A {
   var g = 0;
 }
@@ -104,7 +104,7 @@
   }
 
   test_implicitlyTyped_field_call() async {
-    await assertErrorsInCode('''
+    await assertErrorCodesInCode('''
 class A {
   var g = () => 0;
 }
@@ -114,7 +114,7 @@
   }
 
   test_implicitlyTyped_field_prefixedIdentifier() async {
-    await assertErrorsInCode('''
+    await assertErrorCodesInCode('''
 class A {
   var g = 0;
 }
@@ -126,7 +126,7 @@
   test_implicitlyTyped_fn() async {
     // The reference to a.x triggers TOP_LEVEL_INSTANCE_GETTER because f is
     // generic, so the type of a.x might affect the type of b.
-    await assertErrorsInCode('''
+    await assertErrorCodesInCode('''
 class A {
   var x = 0;
 }
@@ -178,7 +178,7 @@
   test_implicitlyTyped_invoke() async {
     // The reference to a.x triggers TOP_LEVEL_INSTANCE_GETTER because the
     // closure is generic, so the type of a.x might affect the type of b.
-    await assertErrorsInCode('''
+    await assertErrorCodesInCode('''
 class A {
   var x = 0;
 }
@@ -214,7 +214,7 @@
   test_implicitlyTyped_method() async {
     // The reference to a.x triggers TOP_LEVEL_INSTANCE_GETTER because f is
     // generic, so the type of a.x might affect the type of b.
-    await assertErrorsInCode('''
+    await assertErrorCodesInCode('''
 class A {
   var x = 0;
   int f<T>(int x) => 0;
@@ -253,7 +253,7 @@
   test_implicitlyTyped_new() async {
     // The reference to a.x triggers TOP_LEVEL_INSTANCE_GETTER because B is
     // generic, so the type of a.x might affect the type of b.
-    await assertErrorsInCode('''
+    await assertErrorCodesInCode('''
 class A {
   var x = 0;
 }
@@ -316,7 +316,7 @@
   test_implicitlyTyped_new_named() async {
     // The reference to a.x triggers TOP_LEVEL_INSTANCE_GETTER because B is
     // generic, so the type of a.x might affect the type of b.
-    await assertErrorsInCode('''
+    await assertErrorCodesInCode('''
 class A {
   var x = 0;
 }
@@ -384,7 +384,7 @@
 ''');
     // The reference to a.x triggers TOP_LEVEL_INSTANCE_GETTER because B is
     // generic, so the type of a.x might affect the type of b.
-    await assertErrorsInCode('''
+    await assertErrorCodesInCode('''
 import 'lib1.dart' as foo;
 class A {
   var x = 0;
@@ -395,7 +395,7 @@
   }
 
   test_implicitlyTyped_prefixedIdentifier() async {
-    await assertErrorsInCode('''
+    await assertErrorCodesInCode('''
 class A {
   get g => 0;
 }
@@ -407,7 +407,7 @@
   test_implicitlyTyped_propertyAccessLhs() async {
     // The reference to a.x triggers TOP_LEVEL_INSTANCE_GETTER because the type
     // of a.x affects the lookup of y, which in turn affects the type of b.
-    await assertErrorsInCode('''
+    await assertErrorCodesInCode('''
 class A {
   var x = new B();
   int operator[](int value) => 0;
diff --git a/pkg/analyzer/test/src/diagnostics/top_level_instance_method_test.dart b/pkg/analyzer/test/src/diagnostics/top_level_instance_method_test.dart
index 4e6dde5..221a7f0 100644
--- a/pkg/analyzer/test/src/diagnostics/top_level_instance_method_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/top_level_instance_method_test.dart
@@ -16,7 +16,7 @@
 @reflectiveTest
 class TopLevelInstanceMethodTest extends DriverResolutionTest {
   test_noParameter() async {
-    await assertErrorsInCode('''
+    await assertErrorCodesInCode('''
 class A {
   f() => 0;
 }
@@ -34,7 +34,7 @@
   }
 
   test_parameter_generic() async {
-    await assertErrorsInCode('''
+    await assertErrorCodesInCode('''
 class A {
   int f<T>(v) => 0;
 }
@@ -61,7 +61,7 @@
   }
 
   test_tearOff() async {
-    await assertErrorsInCode('''
+    await assertErrorCodesInCode('''
 class A {
   f() => 0;
 }
@@ -70,7 +70,7 @@
   }
 
   test_tearOff_parameter() async {
-    await assertErrorsInCode('''
+    await assertErrorCodesInCode('''
 class A {
   int f(v) => 0;
 }
diff --git a/pkg/analyzer/test/src/diagnostics/type_check_is_not_null_test.dart b/pkg/analyzer/test/src/diagnostics/type_check_is_not_null_test.dart
index a5d66af..9a473f0 100644
--- a/pkg/analyzer/test/src/diagnostics/type_check_is_not_null_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/type_check_is_not_null_test.dart
@@ -16,7 +16,7 @@
 @reflectiveTest
 class TypeCheckIsNotNullTest extends DriverResolutionTest {
   test_not_Null() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 bool m(i) {
   return i is! Null;
 }
diff --git a/pkg/analyzer/test/src/diagnostics/type_check_is_null_test.dart b/pkg/analyzer/test/src/diagnostics/type_check_is_null_test.dart
index 4f50661..42d8555 100644
--- a/pkg/analyzer/test/src/diagnostics/type_check_is_null_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/type_check_is_null_test.dart
@@ -16,7 +16,7 @@
 @reflectiveTest
 class TypeCheckIsNullTest extends DriverResolutionTest {
   test_is_Null() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 bool m(i) {
   return i is Null;
 }
diff --git a/pkg/analyzer/test/src/diagnostics/unchecked_use_of_nullable_value_test.dart b/pkg/analyzer/test/src/diagnostics/unchecked_use_of_nullable_value_test.dart
index 36dc5fb..ce2c1f0 100644
--- a/pkg/analyzer/test/src/diagnostics/unchecked_use_of_nullable_value_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unchecked_use_of_nullable_value_test.dart
@@ -4,9 +4,10 @@
 
 import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../generated/resolver_test_case.dart';
+import '../dart/resolution/driver_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,12 +16,10 @@
 }
 
 @reflectiveTest
-class UncheckedUseOfNullableValueTest extends ResolverTestCase {
+class UncheckedUseOfNullableValueTest extends DriverResolutionTest {
   @override
-  List<String> get enabledExperiments => [EnableString.non_nullable];
-
-  @override
-  bool get enableNewAnalysisDriver => true;
+  AnalysisOptionsImpl get analysisOptions =>
+      AnalysisOptionsImpl()..enabledExperiments = [EnableString.non_nullable];
 
   test_and_nonNullable() async {
     await assertNoErrorsInCode(r'''
@@ -32,7 +31,7 @@
   }
 
   test_and_nullable() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 m() {
   bool? x;
   if(x && true) {}
@@ -77,7 +76,7 @@
   }
 
   test_cascade_nullable() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 m() {
   int? x;
   x..isEven;
@@ -104,7 +103,7 @@
   }
 
   test_forLoop_nullable() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 m() {
   List? x;
   for (var y in x) {}
@@ -122,7 +121,7 @@
   }
 
   test_if_nullable() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 m() {
   bool? x;
   if (x) {}
@@ -140,7 +139,7 @@
   }
 
   test_index_nullable() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 m() {
   List? x;
   x[0];
@@ -161,7 +160,7 @@
   test_invoke_dynamicFunctionType_nullable() async {
     // test is failing because nullable function invocations aren't being
     // resolved correctly
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 m() {
   Function? x;
   x();
@@ -182,7 +181,7 @@
   test_invoke_nullable() async {
     // test is failing because nullable function invocations aren't being
     // resolved correctly
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 m() {
   Function()? x;
   x();
@@ -227,7 +226,7 @@
   }
 
   test_member_nullable() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 m() {
   int? x;
   x.isEven;
@@ -245,7 +244,7 @@
   }
 
   test_member_parenthesized_nullable() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 m() {
   int? x;
   (x).isEven;
@@ -299,7 +298,7 @@
   }
 
   test_method_nullable() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 m() {
   int? x;
   x.round();
@@ -335,7 +334,7 @@
   }
 
   test_minusEq_nullable() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 m() {
   int? x;
   x -= 1;
@@ -353,7 +352,7 @@
   }
 
   test_not_nullable() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 m() {
   bool? x;
   if(!x) {}
@@ -380,7 +379,7 @@
   }
 
   test_operatorMinus_nullable() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 m() {
   int? x;
   x - 3;
@@ -398,7 +397,7 @@
   }
 
   test_operatorPlus_nullable() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 m() {
   int? x;
   x + 3;
@@ -416,7 +415,7 @@
   }
 
   test_operatorPostfixDec_nullable() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 m() {
   int? x;
   x--;
@@ -434,7 +433,7 @@
   }
 
   test_operatorPostfixInc_nullable() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 m() {
   int? x;
   x++;
@@ -452,7 +451,7 @@
   }
 
   test_operatorPrefixDec_nullable() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 m() {
   int? x;
   --x;
@@ -470,7 +469,7 @@
   }
 
   test_operatorPrefixInc_nullable() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 m() {
   int? x;
   ++x;
@@ -488,7 +487,7 @@
   }
 
   test_operatorUnaryMinus_nullable() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 m() {
   int? x;
   -x;
@@ -506,7 +505,7 @@
   }
 
   test_or_nullable() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 m() {
   bool? x;
   if(x || false) {}
@@ -524,7 +523,7 @@
   }
 
   test_plusEq_nullable() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 m() {
   int? x;
   x += 1;
@@ -533,7 +532,7 @@
   }
 
   test_ternary_condition_nullable() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 m() {
   bool? x;
   x ? 0 : 1;
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_getter_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_getter_test.dart
index e0f34b6..e2ace47b 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_getter_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_getter_test.dart
@@ -4,9 +4,10 @@
 
 import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../generated/resolver_test_case.dart';
+import '../dart/resolution/driver_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -16,18 +17,15 @@
 }
 
 @reflectiveTest
-class UndefinedGetterTest extends ResolverTestCase {
-  @override
-  bool get enableNewAnalysisDriver => true;
-
+class UndefinedGetterTest extends DriverResolutionTest {
   test_ifStatement_notPromoted() async {
-    await assertErrorsInCode('''
+    await assertErrorCodesInCode('''
 f(int x) {
   if (x is String) {
     x.length;
   }
 }
-''', [StaticTypeWarningCode.UNDEFINED_GETTER], verify: false);
+''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
   test_ifStatement_promoted() async {
@@ -41,31 +39,29 @@
   }
 
   test_promotedTypeParameter_regress35305() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 void f<X extends num, Y extends X>(Y y) {
   if (y is int) {
     y.isEven;
   }
 }
-''', [StaticTypeWarningCode.UNDEFINED_GETTER], verify: false);
+''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 }
 
 @reflectiveTest
-class UndefinedGetterWithControlFlowCollectionsTest extends ResolverTestCase {
+class UndefinedGetterWithControlFlowCollectionsTest
+    extends DriverResolutionTest {
   @override
-  List<String> get enabledExperiments =>
-      [EnableString.control_flow_collections, EnableString.set_literals];
-
-  @override
-  bool get enableNewAnalysisDriver => true;
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [EnableString.control_flow_collections];
 
   test_ifElement_inList_notPromoted() async {
-    await assertErrorsInCode('''
+    await assertErrorCodesInCode('''
 f(int x) {
   return [if (x is String) x.length];
 }
-''', [StaticTypeWarningCode.UNDEFINED_GETTER], verify: false);
+''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
   test_ifElement_inList_promoted() async {
@@ -77,11 +73,11 @@
   }
 
   test_ifElement_inMap_notPromoted() async {
-    await assertErrorsInCode('''
+    await assertErrorCodesInCode('''
 f(int x) {
   return {if (x is String) x : x.length};
 }
-''', [StaticTypeWarningCode.UNDEFINED_GETTER], verify: false);
+''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
   test_ifElement_inMap_promoted() async {
@@ -93,11 +89,11 @@
   }
 
   test_ifElement_inSet_notPromoted() async {
-    await assertErrorsInCode('''
+    await assertErrorCodesInCode('''
 f(int x) {
   return {if (x is String) x.length};
 }
-''', [StaticTypeWarningCode.UNDEFINED_GETTER], verify: false);
+''', [StaticTypeWarningCode.UNDEFINED_GETTER]);
   }
 
   test_ifElement_inSet_promoted() async {
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_hidden_name_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_hidden_name_test.dart
index 3391749..888721c 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_hidden_name_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_hidden_name_test.dart
@@ -17,14 +17,14 @@
 class UndefinedHiddenNameTest extends DriverResolutionTest {
   test_export() async {
     newFile('/test/lib/lib1.dart');
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 export 'lib1.dart' hide a;
 ''', [HintCode.UNDEFINED_HIDDEN_NAME]);
   }
 
   test_import() async {
     newFile('/test/lib/lib1.dart');
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 import 'lib1.dart' hide a;
 ''', [HintCode.UNUSED_IMPORT, HintCode.UNDEFINED_HIDDEN_NAME]);
   }
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_identifier_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_identifier_test.dart
new file mode 100644
index 0000000..7b44210
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/undefined_identifier_test.dart
@@ -0,0 +1,63 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(UndefinedIdentifierTest);
+    defineReflectiveTests(UndefinedIdentifierWithControlFlowCollectionsTest);
+  });
+}
+
+@reflectiveTest
+class UndefinedIdentifierTest extends DriverResolutionTest {
+  test_forStatement_inBody() async {
+    await assertNoErrorsInCode('''
+f() {
+  for (int x in []) {
+    x;
+  }
+}
+''');
+  }
+
+  test_forStatement_outsideBody() async {
+    await assertErrorCodesInCode('''
+f() {
+  for (int x in []) {}
+  x;
+}
+''', [StaticWarningCode.UNDEFINED_IDENTIFIER]);
+  }
+}
+
+@reflectiveTest
+class UndefinedIdentifierWithControlFlowCollectionsTest
+    extends DriverResolutionTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [EnableString.control_flow_collections];
+
+  test_forElement_inList_insideElement() async {
+    await assertNoErrorsInCode('''
+f(Object x) {
+  return [for(int x in []) x, null];
+}
+''');
+  }
+
+  test_forElement_inList_outsideElement() async {
+    await assertErrorCodesInCode('''
+f() {
+  return [for (int x in []) null, x];
+}
+''', [StaticWarningCode.UNDEFINED_IDENTIFIER]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_operator_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_operator_test.dart
index b05ef9b..a10a3ee 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_operator_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_operator_test.dart
@@ -16,7 +16,7 @@
 @reflectiveTest
 class UndefinedOperatorTest extends DriverResolutionTest {
   test_binaryExpression() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class A {}
 f(var a) {
   if (a is A) {
@@ -27,7 +27,7 @@
   }
 
   test_binaryExpression_inSubtype() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class A {}
 class B extends A {
   operator +(B b) {}
@@ -41,7 +41,7 @@
   }
 
   test_indexBoth() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class A {}
 f(var a) {
   if (a is A) {
@@ -55,7 +55,7 @@
   }
 
   test_indexBoth_inSubtype() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class A {}
 class B extends A {
   operator [](int index) {}
@@ -72,7 +72,7 @@
   }
 
   test_indexGetter() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class A {}
 f(var a) {
   if (a is A) {
@@ -83,7 +83,7 @@
   }
 
   test_indexGetter_inSubtype() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class A {}
 class B extends A {
   operator [](int index) {}
@@ -97,7 +97,7 @@
   }
 
   test_indexSetter() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class A {}
 f(var a) {
   if (a is A) {
@@ -108,7 +108,7 @@
   }
 
   test_indexSetter_inSubtype() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class A {}
 class B extends A {
   operator []=(i, v) {}
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_prefixed_name_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_prefixed_name_test.dart
new file mode 100644
index 0000000..6de8429
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/undefined_prefixed_name_test.dart
@@ -0,0 +1,35 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(UndefinedPrefixedNameTest);
+  });
+}
+
+@reflectiveTest
+class UndefinedPrefixedNameTest extends DriverResolutionTest {
+  test_getterContext() async {
+    newFile('/test/lib/lib.dart');
+    await assertErrorCodesInCode('''
+import 'lib.dart' as p;
+f() => p.c;
+''', [StaticTypeWarningCode.UNDEFINED_PREFIXED_NAME]);
+  }
+
+  test_setterContext() async {
+    newFile('/test/lib/lib.dart');
+    await assertErrorCodesInCode('''
+import 'lib.dart' as p;
+f() {
+  p.c = 0;
+}
+''', [StaticTypeWarningCode.UNDEFINED_PREFIXED_NAME]);
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_setter_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_setter_test.dart
index fd9bafd..7306c0e 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_setter_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_setter_test.dart
@@ -16,7 +16,7 @@
 @reflectiveTest
 class UndefinedSetterTest extends DriverResolutionTest {
   test_inSubtype() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class A {}
 class B extends A {
   set b(x) {}
@@ -30,7 +30,7 @@
   }
 
   test_inType() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class A {}
 f(var a) {
   if(a is A) {
diff --git a/pkg/analyzer/test/src/diagnostics/undefined_shown_name_test.dart b/pkg/analyzer/test/src/diagnostics/undefined_shown_name_test.dart
index 9bbc57a..3243bb2 100644
--- a/pkg/analyzer/test/src/diagnostics/undefined_shown_name_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/undefined_shown_name_test.dart
@@ -17,14 +17,14 @@
 class UndefinedShownNameTest extends DriverResolutionTest {
   test_export() async {
     newFile('/test/lib/lib1.dart');
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 export 'lib1.dart' show a;
 ''', [HintCode.UNDEFINED_SHOWN_NAME]);
   }
 
   test_import() async {
     newFile('/test/lib/lib1.dart');
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 import 'lib1.dart' show a;
 ''', [HintCode.UNUSED_IMPORT, HintCode.UNDEFINED_SHOWN_NAME]);
   }
diff --git a/pkg/analyzer/test/src/diagnostics/unnecessary_cast_test.dart b/pkg/analyzer/test/src/diagnostics/unnecessary_cast_test.dart
index 28e76bf..0d89796 100644
--- a/pkg/analyzer/test/src/diagnostics/unnecessary_cast_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unnecessary_cast_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../generated/resolver_test_case.dart';
+import '../dart/resolution/driver_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,7 +14,7 @@
 }
 
 @reflectiveTest
-class UnnecessaryCastTest extends ResolverTestCase {
+class UnnecessaryCastTest extends DriverResolutionTest {
   test_conditionalExpression() async {
     await assertNoErrorsInCode(r'''
 abstract class I {}
@@ -57,6 +57,17 @@
 ''');
   }
 
+  test_generics() async {
+    // dartbug.com/18953
+    assertErrorCodesInCode(r'''
+import 'dart:async';
+Future<int> f() => new Future.value(0);
+void g(bool c) {
+  (c ? f(): new Future.value(0) as Future<int>).then((int value) {});
+}
+''', [HintCode.UNNECESSARY_CAST]);
+  }
+
   test_parameter_A() async {
     // dartbug.com/13855, dartbug.com/13732
     await assertNoErrorsInCode(r'''
@@ -81,7 +92,7 @@
   }
 
   test_type_supertype() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 m(int i) {
   var b = i as Object;
 }
@@ -89,24 +100,10 @@
   }
 
   test_type_type() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 m(num i) {
   var b = i as num;
 }
 ''', [HintCode.UNNECESSARY_CAST]);
   }
-
-  @override
-  bool get enableNewAnalysisDriver => true;
-
-  test_generics() async {
-    // dartbug.com/18953
-    assertErrorsInCode(r'''
-import 'dart:async';
-Future<int> f() => new Future.value(0);
-void g(bool c) {
-  (c ? f(): new Future.value(0) as Future<int>).then((int value) {});
-}
-''', [HintCode.UNNECESSARY_CAST]);
-  }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/unnecessary_no_such_method_test.dart b/pkg/analyzer/test/src/diagnostics/unnecessary_no_such_method_test.dart
index e6f36ad..0801ae0 100644
--- a/pkg/analyzer/test/src/diagnostics/unnecessary_no_such_method_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unnecessary_no_such_method_test.dart
@@ -16,7 +16,7 @@
 @reflectiveTest
 class UnnecessaryNoSuchMethodTest extends DriverResolutionTest {
   test_blockBody() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class A {
   noSuchMethod(x) => super.noSuchMethod(x);
 }
@@ -59,7 +59,7 @@
   }
 
   test_expressionBody() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class A {
   noSuchMethod(x) => super.noSuchMethod(x);
 }
diff --git a/pkg/analyzer/test/src/diagnostics/unnecessary_null_aware_call_test.dart b/pkg/analyzer/test/src/diagnostics/unnecessary_null_aware_call_test.dart
new file mode 100644
index 0000000..6ca3733
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/unnecessary_null_aware_call_test.dart
@@ -0,0 +1,117 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../../generated/resolver_test_case.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(UnnecessaryNullAwareCallTest);
+  });
+}
+
+@reflectiveTest
+class UnnecessaryNullAwareCallTest extends ResolverTestCase {
+  @override
+  List<String> get enabledExperiments => [EnableString.non_nullable];
+
+  test_getter_parenthesized_nonNull() async {
+    await assertErrorsInCode('''
+@pragma('analyzer:non-nullable')
+library foo;
+
+f() {
+  int x;
+  (x)?.isEven;
+}
+''', [HintCode.UNNECESSARY_NULL_AWARE_CALL]);
+  }
+
+  test_getter_parenthesized_nullable() async {
+    await assertNoErrorsInCode('''
+@pragma('analyzer:non-nullable')
+library foo;
+
+f() {
+  int? x;
+  (x)?.isEven;
+}
+''');
+  }
+
+  test_getter_simple_nonNull() async {
+    await assertErrorsInCode('''
+@pragma('analyzer:non-nullable')
+library foo;
+
+f() {
+  int x;
+  x?.isEven;
+}
+''', [HintCode.UNNECESSARY_NULL_AWARE_CALL]);
+  }
+
+  test_getter_simple_nullable() async {
+    await assertNoErrorsInCode('''
+@pragma('analyzer:non-nullable')
+library foo;
+
+f() {
+  int? x;
+  x?.isEven;
+}
+''');
+  }
+
+  test_method_parenthesized_nonNull() async {
+    await assertErrorsInCode('''
+@pragma('analyzer:non-nullable')
+library foo;
+
+f() {
+  int x;
+  (x)?.round();
+}
+''', [HintCode.UNNECESSARY_NULL_AWARE_CALL]);
+  }
+
+  test_method_parenthesized_nullable() async {
+    await assertNoErrorsInCode('''
+@pragma('analyzer:non-nullable')
+library foo;
+
+f() {
+  int? x;
+  (x)?.round();
+}
+''');
+  }
+
+  test_method_simple_nonNull() async {
+    await assertErrorsInCode('''
+@pragma('analyzer:non-nullable')
+library foo;
+
+f() {
+  int x;
+  x?.round();
+}
+''', [HintCode.UNNECESSARY_NULL_AWARE_CALL]);
+  }
+
+  test_method_simple_nullable() async {
+    await assertNoErrorsInCode('''
+@pragma('analyzer:non-nullable')
+library foo;
+
+f() {
+  int? x;
+  x?.round();
+}
+''');
+  }
+}
diff --git a/pkg/analyzer/test/src/diagnostics/unnecessary_type_check_false_test.dart b/pkg/analyzer/test/src/diagnostics/unnecessary_type_check_false_test.dart
index 6b48d25..e3316ad 100644
--- a/pkg/analyzer/test/src/diagnostics/unnecessary_type_check_false_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unnecessary_type_check_false_test.dart
@@ -16,13 +16,13 @@
 @reflectiveTest
 class UnnecessaryTypeCheckFalseTest extends DriverResolutionTest {
   test_null_not_Null() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 bool b = null is! Null;
 ''', [HintCode.UNNECESSARY_TYPE_CHECK_FALSE]);
   }
 
   test_type_not_dynamic() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 m(i) {
   bool b = i is! dynamic;
 }
@@ -30,7 +30,7 @@
   }
 
   test_type_not_object() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 m(i) {
   bool b = i is! Object;
 }
diff --git a/pkg/analyzer/test/src/diagnostics/unnecessary_type_check_true_test.dart b/pkg/analyzer/test/src/diagnostics/unnecessary_type_check_true_test.dart
index 44e96ea..269d39a 100644
--- a/pkg/analyzer/test/src/diagnostics/unnecessary_type_check_true_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unnecessary_type_check_true_test.dart
@@ -16,13 +16,13 @@
 @reflectiveTest
 class UnnecessaryTypeCheckTrueTest extends DriverResolutionTest {
   test_null_is_Null() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 bool b = null is Null;
 ''', [HintCode.UNNECESSARY_TYPE_CHECK_TRUE]);
   }
 
   test_type_is_dynamic() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 m(i) {
   bool b = i is dynamic;
 }
@@ -30,7 +30,7 @@
   }
 
   test_type_is_object() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 m(i) {
   bool b = i is Object;
 }
diff --git a/pkg/analyzer/test/src/diagnostics/unused_catch_clause_test.dart b/pkg/analyzer/test/src/diagnostics/unused_catch_clause_test.dart
index 841f0df..de74c41 100644
--- a/pkg/analyzer/test/src/diagnostics/unused_catch_clause_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unused_catch_clause_test.dart
@@ -19,7 +19,7 @@
   bool get enableUnusedLocalVariable => true;
 
   test_on_unusedException() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 main() {
   try {
   } on String catch (exception) {
diff --git a/pkg/analyzer/test/src/diagnostics/unused_catch_stack_test.dart b/pkg/analyzer/test/src/diagnostics/unused_catch_stack_test.dart
index 0a7330b..84303fa 100644
--- a/pkg/analyzer/test/src/diagnostics/unused_catch_stack_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unused_catch_stack_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/hint_codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../generated/resolver_test_case.dart';
+import '../dart/resolution/driver_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,13 +14,12 @@
 }
 
 @reflectiveTest
-class UnusedCatchStackTest extends ResolverTestCase {
+class UnusedCatchStackTest extends DriverResolutionTest {
   @override
-  bool get enableNewAnalysisDriver => true;
+  bool get enableUnusedLocalVariable => true;
 
   test_on_unusedStack() async {
-    enableUnusedLocalVariable = true;
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 main() {
   try {
   } on String catch (exception, stackTrace) {
@@ -30,7 +29,6 @@
   }
 
   test_on_usedStack() async {
-    enableUnusedLocalVariable = true;
     await assertNoErrorsInCode(r'''
 main() {
   try {
@@ -42,8 +40,7 @@
   }
 
   test_unusedStack() async {
-    enableUnusedLocalVariable = true;
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 main() {
   try {
   } catch (exception, stackTrace) {
@@ -53,7 +50,6 @@
   }
 
   test_usedStack() async {
-    enableUnusedLocalVariable = true;
     await assertNoErrorsInCode(r'''
 main() {
   try {
diff --git a/pkg/analyzer/test/src/diagnostics/unused_element_test.dart b/pkg/analyzer/test/src/diagnostics/unused_element_test.dart
index 871023a..8f16748 100644
--- a/pkg/analyzer/test/src/diagnostics/unused_element_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unused_element_test.dart
@@ -85,7 +85,7 @@
   }
 
   test_class_notUsed_inClassMember() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class _A {
   static staticMethod() {
     new _A();
@@ -98,7 +98,7 @@
   }
 
   test_class_notUsed_inConstructorName() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class _A {
   _A() {}
   _A.named() {}
@@ -107,7 +107,7 @@
   }
 
   test_class_notUsed_isExpression() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class _A {}
 main(p) {
   if (p is _A) {
@@ -117,7 +117,7 @@
   }
 
   test_class_notUsed_noReference() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class _A {}
 main() {
 }
@@ -125,7 +125,7 @@
   }
 
   test_class_notUsed_variableDeclaration() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class _A {}
 main() {
   _A v;
@@ -145,7 +145,7 @@
   }
 
   test_enum_notUsed_noReference() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 enum _MyEnum {A, B, C}
 main() {
 }
@@ -181,7 +181,7 @@
   }
 
   test_functionLocal_notUsed_noReference() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 main() {
   f() {}
 }
@@ -189,7 +189,7 @@
   }
 
   test_functionLocal_notUsed_referenceFromItself() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 main() {
   _f(int p) {
     _f(p - 1);
@@ -218,7 +218,7 @@
   }
 
   test_functionTop_notUsed_noReference() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 _f() {}
 main() {
 }
@@ -226,7 +226,7 @@
   }
 
   test_functionTop_notUsed_referenceFromItself() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 _f(int p) {
   _f(p - 1);
 }
@@ -274,7 +274,7 @@
   }
 
   test_functionTypeAlias_notUsed_noReference() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 typedef _F(a, b);
 main() {
 }
@@ -315,7 +315,7 @@
   }
 
   test_getter_notUsed_noReference() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class A {
   get _g => null;
 }
@@ -323,7 +323,7 @@
   }
 
   test_getter_notUsed_referenceFromItself() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class A {
   get _g {
     return _g;
@@ -477,7 +477,7 @@
   }
 
   test_method_notUsed_noReference() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class A {
   static _m() {}
 }
@@ -485,7 +485,7 @@
   }
 
   test_method_notUsed_referenceFromItself() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class A {
   static _m(int p) {
     _m(p - 1);
@@ -528,7 +528,7 @@
   }
 
   test_setter_notUsed_noReference() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class A {
   set _s(x) {}
 }
@@ -536,7 +536,7 @@
   }
 
   test_setter_notUsed_referenceFromItself() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class A {
   set _s(int x) {
     if (x > 5) {
@@ -567,7 +567,7 @@
   }
 
   test_topLevelVariable_notUsed() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 int _a = 1;
 main() {
   _a = 2;
diff --git a/pkg/analyzer/test/src/diagnostics/unused_field_test.dart b/pkg/analyzer/test/src/diagnostics/unused_field_test.dart
index 3fa352c..a0dacdb 100644
--- a/pkg/analyzer/test/src/diagnostics/unused_field_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unused_field_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../generated/resolver_test_case.dart';
+import '../dart/resolution/driver_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,10 +14,7 @@
 }
 
 @reflectiveTest
-class UnusedFieldTest extends ResolverTestCase {
-  @override
-  bool get enableNewAnalysisDriver => true;
-
+class UnusedFieldTest extends DriverResolutionTest {
   @override
   bool get enableUnusedElement => true;
 
@@ -108,7 +105,7 @@
   }
 
   test_unusedField_notUsed_compoundAssign() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class A {
   int _f;
   main() {
@@ -119,7 +116,7 @@
   }
 
   test_unusedField_notUsed_constructorFieldInitializers() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class A {
   int _f;
   A() : _f = 0;
@@ -128,7 +125,7 @@
   }
 
   test_unusedField_notUsed_fieldFormalParameter() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class A {
   int _f;
   A(this._f);
@@ -137,7 +134,7 @@
   }
 
   test_unusedField_notUsed_noReference() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class A {
   int _f;
 }
@@ -157,7 +154,7 @@
   }
 
   test_unusedField_notUsed_postfixExpr() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class A {
   int _f = 0;
   main() {
@@ -168,7 +165,7 @@
   }
 
   test_unusedField_notUsed_prefixExpr() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class A {
   int _f = 0;
   main() {
@@ -179,7 +176,7 @@
   }
 
   test_unusedField_notUsed_simpleAssignment() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class A {
   int _f;
   m() {
diff --git a/pkg/analyzer/test/src/diagnostics/unused_import_test.dart b/pkg/analyzer/test/src/diagnostics/unused_import_test.dart
index 34319e4..84ac848 100644
--- a/pkg/analyzer/test/src/diagnostics/unused_import_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unused_import_test.dart
@@ -3,10 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/source.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../generated/resolver_test_case.dart';
+import '../dart/resolution/driver_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,210 +14,142 @@
 }
 
 @reflectiveTest
-class UnusedImportTest extends ResolverTestCase {
-  @override
-  bool get enableNewAnalysisDriver => true;
-
+class UnusedImportTest extends DriverResolutionTest {
   test_annotationOnDirective() async {
-    Source source = addSource(r'''
-library L;
-@A()
-import 'lib1.dart';
-''');
-    Source source2 = addNamedSource("/lib1.dart", r'''
-library lib1;
+    newFile('/test/lib/lib1.dart', content: r'''
 class A {
   const A() {}
 }
 ''');
-    await computeAnalysisResult(source);
-    await computeAnalysisResult(source2);
-    assertErrors(source);
-    verify([source, source2]);
+    await assertNoErrorsInCode(r'''
+@A()
+import 'lib1.dart';
+''');
   }
 
   test_as() async {
-    Source source = addSource(r'''
-library L;
+    newFile('/test/lib/lib1.dart', content: r'''
+class A {}
+''');
+    await assertErrorCodesInCode(r'''
 import 'lib1.dart';
 import 'lib1.dart' as one;
 one.A a;
-''');
-    Source source2 = addNamedSource("/lib1.dart", r'''
-library lib1;
-class A {}
-''');
-    await computeAnalysisResult(source);
-    await computeAnalysisResult(source2);
-    assertErrors(source, [HintCode.UNUSED_IMPORT]);
-    assertNoErrors(source2);
-    verify([source, source2]);
+''', [HintCode.UNUSED_IMPORT]);
   }
 
   test_as_equalPrefixes_referenced() async {
     // 18818
-    Source source = addSource(r'''
-library L;
+    newFile('/test/lib/lib1.dart', content: r'''
+class A {}
+''');
+    newFile('/test/lib/lib2.dart', content: r'''
+class B {}
+''');
+    await assertNoErrorsInCode(r'''
 import 'lib1.dart' as one;
 import 'lib2.dart' as one;
 one.A a;
 one.B b;
 ''');
-    Source source2 = addNamedSource("/lib1.dart", r'''
-library lib1;
-class A {}
-''');
-    Source source3 = addNamedSource("/lib2.dart", r'''
-library lib2;
-class B {}
-''');
-    await computeAnalysisResult(source);
-    await computeAnalysisResult(source2);
-    await computeAnalysisResult(source3);
-    assertErrors(source);
-    assertNoErrors(source2);
-    assertNoErrors(source3);
-    verify([source, source2, source3]);
   }
 
   @failingTest
   test_as_equalPrefixes_unreferenced() async {
     // See todo at ImportsVerifier.prefixElementMap.
-    Source source = addSource(r'''
-library L;
+    newFile('/test/lib/lib1.dart', content: r'''
+class A {}
+''');
+    newFile('/test/lib/lib2.dart', content: r'''
+class B {}
+''');
+    await assertErrorCodesInCode(r'''
 import 'lib1.dart' as one;
 import 'lib2.dart' as one;
 one.A a;
-''');
-    Source source2 = addNamedSource("/lib1.dart", r'''
-library lib1;
-class A {}
-''');
-    Source source3 = addNamedSource("/lib2.dart", r'''
-library lib2;
-class B {}
-''');
-    await computeAnalysisResult(source);
-    await computeAnalysisResult(source2);
-    await computeAnalysisResult(source3);
-    assertErrors(source, [HintCode.UNUSED_IMPORT]);
-    assertNoErrors(source2);
-    assertNoErrors(source3);
-    verify([source, source2, source3]);
+''', [HintCode.UNUSED_IMPORT]);
   }
 
   test_core_library() async {
-    Source source = addSource(r'''
-library L;
+    await assertNoErrorsInCode(r'''
 import 'dart:core';
 ''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
   }
 
   test_export() async {
-    Source source = addSource(r'''
-library L;
-import 'lib1.dart';
-Two two;
-''');
-    addNamedSource("/lib1.dart", r'''
-library lib1;
+    newFile('/test/lib/lib1.dart', content: r'''
 export 'lib2.dart';
 class One {}
 ''');
-    addNamedSource("/lib2.dart", r'''
-library lib2;
+    newFile('/test/lib/lib2.dart', content: r'''
 class Two {}
 ''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
+    await assertNoErrorsInCode(r'''
+import 'lib1.dart';
+Two two;
+''');
   }
 
   test_export2() async {
-    Source source = addSource(r'''
-library L;
+    newFile('/test/lib/lib1.dart', content: r'''
+export 'lib2.dart';
+class One {}
+''');
+    newFile('/test/lib/lib2.dart', content: r'''
+export 'lib3.dart';
+class Two {}
+''');
+    newFile('/test/lib/lib3.dart', content: r'''
+class Three {}
+''');
+    await assertNoErrorsInCode(r'''
 import 'lib1.dart';
 Three three;
 ''');
-    addNamedSource("/lib1.dart", r'''
-library lib1;
-export 'lib2.dart';
-class One {}
-''');
-    addNamedSource("/lib2.dart", r'''
-library lib2;
-export 'lib3.dart';
-class Two {}
-''');
-    addNamedSource("/lib3.dart", r'''
-library lib3;
-class Three {}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
   }
 
   test_export_infiniteLoop() async {
-    Source source = addSource(r'''
-library L;
-import 'lib1.dart';
-Two two;
-''');
-    addNamedSource("/lib1.dart", r'''
-library lib1;
+    newFile('/test/lib/lib1.dart', content: r'''
 export 'lib2.dart';
 class One {}
 ''');
-    addNamedSource("/lib2.dart", r'''
-library lib2;
+    newFile('/test/lib/lib2.dart', content: r'''
 export 'lib3.dart';
 class Two {}
 ''');
-    addNamedSource("/lib3.dart", r'''
-library lib3;
+    newFile('/test/lib/lib3.dart', content: r'''
 export 'lib2.dart';
 class Three {}
 ''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
+    await assertNoErrorsInCode(r'''
+import 'lib1.dart';
+Two two;
+''');
   }
 
   test_hide() async {
-    Source source = addSource(r'''
-library L;
+    newFile('/test/lib/lib1.dart', content: r'''
+class A {}
+''');
+    await assertErrorCodesInCode(r'''
 import 'lib1.dart';
 import 'lib1.dart' hide A;
 A a;
-''');
-    Source source2 = addNamedSource("/lib1.dart", r'''
-library lib1;
-class A {}
-''');
-    await computeAnalysisResult(source);
-    await computeAnalysisResult(source2);
-    assertErrors(source, [HintCode.UNUSED_IMPORT]);
-    assertNoErrors(source2);
-    verify([source, source2]);
+''', [HintCode.UNUSED_IMPORT]);
   }
 
   test_inComment_libraryDirective() async {
-    Source source = addSource(r'''
+    await assertNoErrorsInCode(r'''
 /// Use [Future] class.
-library L;
 import 'dart:async';
 ''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
   }
 
   test_metadata() async {
-    Source source = addSource(r'''
-library L;
+    newFile('/test/lib/lib1.dart', content: r'''
+const x = 0;
+''');
+    await assertNoErrorsInCode(r'''
 @A(x)
 import 'lib1.dart';
 class A {
@@ -226,18 +157,14 @@
   const A(this.value);
 }
 ''');
-    addNamedSource("/lib1.dart", r'''
-library lib1;
-const x = 0;
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
   }
 
   test_prefix_topLevelFunction() async {
-    Source source = addSource(r'''
-library L;
+    newFile('/test/lib/lib1.dart', content: r'''
+class One {}
+topLevelFunction() {}
+''');
+    await assertNoErrorsInCode(r'''
 import 'lib1.dart' hide topLevelFunction;
 import 'lib1.dart' as one show topLevelFunction;
 class A {
@@ -247,19 +174,14 @@
   }
 }
 ''');
-    addNamedSource("/lib1.dart", r'''
-library lib1;
-class One {}
-topLevelFunction() {}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
   }
 
   test_prefix_topLevelFunction2() async {
-    Source source = addSource(r'''
-library L;
+    newFile('/test/lib/lib1.dart', content: r'''
+class One {}
+topLevelFunction() {}
+''');
+    await assertNoErrorsInCode(r'''
 import 'lib1.dart' hide topLevelFunction;
 import 'lib1.dart' as one show topLevelFunction;
 import 'lib1.dart' as two show topLevelFunction;
@@ -271,47 +193,24 @@
   }
 }
 ''');
-    addNamedSource("/lib1.dart", r'''
-library lib1;
-class One {}
-topLevelFunction() {}
-''');
-    await computeAnalysisResult(source);
-    assertNoErrors(source);
-    verify([source]);
   }
 
   test_show() async {
-    Source source = addSource(r'''
-library L;
-import 'lib1.dart' show A;
-import 'lib1.dart' show B;
-A a;
-''');
-    Source source2 = addNamedSource("/lib1.dart", r'''
-library lib1;
+    newFile('/test/lib/lib1.dart', content: r'''
 class A {}
 class B {}
 ''');
-    await computeAnalysisResult(source);
-    await computeAnalysisResult(source2);
-    assertErrors(source, [HintCode.UNUSED_IMPORT]);
-    assertNoErrors(source2);
-    verify([source, source2]);
+    await assertErrorCodesInCode(r'''
+import 'lib1.dart' show A;
+import 'lib1.dart' show B;
+A a;
+''', [HintCode.UNUSED_IMPORT]);
   }
 
   test_unusedImport() async {
-    Source source = addSource(r'''
-library L;
+    newFile('/test/lib/lib1.dart');
+    await assertErrorCodesInCode(r'''
 import 'lib1.dart';
-''');
-    Source source2 = addNamedSource("/lib1.dart", '''
-library lib1;
-''');
-    await computeAnalysisResult(source);
-    await computeAnalysisResult(source2);
-    assertErrors(source, [HintCode.UNUSED_IMPORT]);
-    assertNoErrors(source2);
-    verify([source, source2]);
+''', [HintCode.UNUSED_IMPORT]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/unused_label_test.dart b/pkg/analyzer/test/src/diagnostics/unused_label_test.dart
index e14f291..3322685 100644
--- a/pkg/analyzer/test/src/diagnostics/unused_label_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unused_label_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/error/codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../generated/resolver_test_case.dart';
+import '../dart/resolution/driver_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,12 +14,9 @@
 }
 
 @reflectiveTest
-class UnusedLabelTest extends ResolverTestCase {
-  @override
-  bool get enableNewAnalysisDriver => true;
-
+class UnusedLabelTest extends DriverResolutionTest {
   test_unused_inSwitch() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 f(x) {
   switch (x) {
     label: case 0:
@@ -32,7 +29,7 @@
   }
 
   test_unused_onWhile() async {
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 f(condition()) {
   label: while (condition()) {
     break;
diff --git a/pkg/analyzer/test/src/diagnostics/unused_local_variable_test.dart b/pkg/analyzer/test/src/diagnostics/unused_local_variable_test.dart
index ee12d06..d4281bc 100644
--- a/pkg/analyzer/test/src/diagnostics/unused_local_variable_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unused_local_variable_test.dart
@@ -5,7 +5,7 @@
 import 'package:analyzer/src/dart/error/hint_codes.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../generated/resolver_test_case.dart';
+import '../dart/resolution/driver_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -14,12 +14,11 @@
 }
 
 @reflectiveTest
-class UnusedLocalVariableTest extends ResolverTestCase {
+class UnusedLocalVariableTest extends DriverResolutionTest {
   @override
-  bool get enableNewAnalysisDriver => true;
+  bool get enableUnusedLocalVariable => true;
 
   test_inFor_underscore_ignored() async {
-    enableUnusedLocalVariable = true;
     await assertNoErrorsInCode(r'''
 main() {
   for (var _ in [1,2,3]) {
@@ -32,8 +31,7 @@
   }
 
   test_inFunction() async {
-    enableUnusedLocalVariable = true;
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 main() {
   var v = 1;
   v = 2;
@@ -42,8 +40,7 @@
   }
 
   test_inMethod() async {
-    enableUnusedLocalVariable = true;
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 class A {
   foo() {
     var v = 1;
@@ -54,7 +51,6 @@
   }
 
   test_isInvoked() async {
-    enableUnusedLocalVariable = true;
     await assertNoErrorsInCode(r'''
 typedef Foo();
 main() {
@@ -65,7 +61,6 @@
   }
 
   test_isNullAssigned() async {
-    enableUnusedLocalVariable = true;
     await assertNoErrorsInCode(r'''
 typedef Foo();
 main() {
@@ -77,8 +72,7 @@
   }
 
   test_isRead_notUsed_compoundAssign() async {
-    enableUnusedLocalVariable = true;
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 main() {
   var v = 1;
   v += 2;
@@ -87,8 +81,7 @@
   }
 
   test_isRead_notUsed_postfixExpr() async {
-    enableUnusedLocalVariable = true;
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 main() {
   var v = 1;
   v++;
@@ -97,8 +90,7 @@
   }
 
   test_isRead_notUsed_prefixExpr() async {
-    enableUnusedLocalVariable = true;
-    await assertErrorsInCode(r'''
+    await assertErrorCodesInCode(r'''
 main() {
   var v = 1;
   ++v;
@@ -107,7 +99,6 @@
   }
 
   test_isRead_usedArgument() async {
-    enableUnusedLocalVariable = true;
     await assertNoErrorsInCode(r'''
 main() {
   var v = 1;
@@ -118,7 +109,6 @@
   }
 
   test_isRead_usedInvocationTarget() async {
-    enableUnusedLocalVariable = true;
     await assertNoErrorsInCode(r'''
 class A {
   foo() {}
diff --git a/pkg/analyzer/test/src/diagnostics/unused_shown_name_test.dart b/pkg/analyzer/test/src/diagnostics/unused_shown_name_test.dart
index 7b9f834..fd823b1 100644
--- a/pkg/analyzer/test/src/diagnostics/unused_shown_name_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/unused_shown_name_test.dart
@@ -3,10 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/source.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../generated/resolver_test_case.dart';
+import '../dart/resolution/driver_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -15,89 +14,57 @@
 }
 
 @reflectiveTest
-class UnusedShownNameTest extends ResolverTestCase {
-  @override
-  bool get enableNewAnalysisDriver => true;
-
+class UnusedShownNameTest extends DriverResolutionTest {
   test_unreferenced() async {
-    Source source = addSource(r'''
-library L;
-import 'lib1.dart' show A, B;
-A a;
-''');
-    Source source2 = addNamedSource("/lib1.dart", r'''
-library lib1;
+    newFile('/test/lib/lib1.dart', content: r'''
 class A {}
 class B {}
 ''');
-    await computeAnalysisResult(source);
-    await computeAnalysisResult(source2);
-    assertErrors(source, [HintCode.UNUSED_SHOWN_NAME]);
-    assertNoErrors(source2);
-    verify([source, source2]);
+    assertErrorCodesInCode(r'''
+import 'lib1.dart' show A, B;
+A a;
+''', [HintCode.UNUSED_SHOWN_NAME]);
   }
 
   test_unusedShownName_as() async {
-    Source source = addSource(r'''
-library L;
-import 'lib1.dart' as p show A, B;
-p.A a;
-''');
-    Source source2 = addNamedSource("/lib1.dart", r'''
-library lib1;
+    newFile('/test/lib/lib1.dart', content: r'''
 class A {}
 class B {}
 ''');
-    await computeAnalysisResult(source);
-    await computeAnalysisResult(source2);
-    assertErrors(source, [HintCode.UNUSED_SHOWN_NAME]);
-    assertNoErrors(source2);
-    verify([source, source2]);
+    assertErrorCodesInCode(r'''
+import 'lib1.dart' as p show A, B;
+p.A a;
+''', [HintCode.UNUSED_SHOWN_NAME]);
   }
 
   test_unusedShownName_duplicates() async {
-    Source source = addSource(r'''
-library L;
-import 'lib1.dart' show A, B;
-import 'lib1.dart' show C, D;
-A a;
-C c;
-''');
-    Source source2 = addNamedSource("/lib1.dart", r'''
-library lib1;
+    newFile('/test/lib/lib1.dart', content: r'''
 class A {}
 class B {}
 class C {}
 class D {}
 ''');
-    await computeAnalysisResult(source);
-    await computeAnalysisResult(source2);
-    assertErrors(
-        source, [HintCode.UNUSED_SHOWN_NAME, HintCode.UNUSED_SHOWN_NAME]);
-    assertNoErrors(source2);
-    verify([source, source2]);
+    assertErrorCodesInCode(r'''
+import 'lib1.dart' show A, B;
+import 'lib1.dart' show C, D;
+A a;
+C c;
+''', [HintCode.UNUSED_SHOWN_NAME, HintCode.UNUSED_SHOWN_NAME]);
   }
 
   test_unusedShownName_topLevelVariable() async {
-    Source source = addSource(r'''
-library L;
-import 'lib1.dart' show var1, var2;
-import 'lib1.dart' show var3, var4;
-int a = var1;
-int b = var2;
-int c = var3;
-''');
-    Source source2 = addNamedSource("/lib1.dart", r'''
-library lib1;
+    newFile('/test/lib/lib1.dart', content: r'''
 const int var1 = 1;
 const int var2 = 2;
 const int var3 = 3;
 const int var4 = 4;
 ''');
-    await computeAnalysisResult(source);
-    await computeAnalysisResult(source2);
-    assertErrors(source, [HintCode.UNUSED_SHOWN_NAME]);
-    assertNoErrors(source2);
-    verify([source, source2]);
+    assertErrorCodesInCode(r'''
+import 'lib1.dart' show var1, var2;
+import 'lib1.dart' show var3, var4;
+int a = var1;
+int b = var2;
+int c = var3;
+''', [HintCode.UNUSED_SHOWN_NAME]);
   }
 }
diff --git a/pkg/analyzer/test/src/diagnostics/use_of_void_result_test.dart b/pkg/analyzer/test/src/diagnostics/use_of_void_result_test.dart
index dfe12c9..3d0a5a4 100644
--- a/pkg/analyzer/test/src/diagnostics/use_of_void_result_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/use_of_void_result_test.dart
@@ -4,7 +4,7 @@
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../generated/resolver_test_case.dart';
+import '../dart/resolution/driver_resolution.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -13,10 +13,7 @@
 }
 
 @reflectiveTest
-class UseOfVoidResultTest extends ResolverTestCase {
-  @override
-  bool get enableNewAnalysisDriver => true;
-
+class UseOfVoidResultTest extends DriverResolutionTest {
   test_implicitReturnValue() async {
     await assertNoErrorsInCode(r'''
 f() {}
diff --git a/pkg/analyzer/test/src/diagnostics/variable_type_mismatch_test.dart b/pkg/analyzer/test/src/diagnostics/variable_type_mismatch_test.dart
new file mode 100644
index 0000000..e366f23
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/variable_type_mismatch_test.dart
@@ -0,0 +1,33 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(VariableTypeMismatchTest);
+  });
+}
+
+/// TODO(paulberry): move other tests from [CheckedModeCompileTimeErrorCodeTest]
+/// to this class.
+@reflectiveTest
+class VariableTypeMismatchTest extends DriverResolutionTest {
+  @FailingTest(reason: 'Workaround for #35993 is too broad')
+  test_int_to_double_variable_reference_is_not_promoted() async {
+    // Note: in the following code, the declaration of `y` should produce an
+    // error because we should only promote literal ints to doubles; we
+    // shouldn't promote the reference to the variable `x`.
+    addTestFile('''
+const Object x = 0;
+const double y = x;
+    ''');
+    await resolveTestFile();
+    assertTestErrorsWithCodes(
+        [CheckedModeCompileTimeErrorCode.VARIABLE_TYPE_MISMATCH]);
+  }
+}
diff --git a/pkg/analyzer/test/src/fasta/recovery/missing_code_test.dart b/pkg/analyzer/test/src/fasta/recovery/missing_code_test.dart
index ad6a248..5ac8dc9 100644
--- a/pkg/analyzer/test/src/fasta/recovery/missing_code_test.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/missing_code_test.dart
@@ -13,6 +13,7 @@
     defineReflectiveTests(MapLiteralTest);
     defineReflectiveTests(MissingCodeTest);
     defineReflectiveTests(ParameterListTest);
+    defineReflectiveTests(TypedefTest);
   });
 }
 
@@ -36,6 +37,22 @@
 f() => [a, b, c];
 ''');
   }
+
+  void test_missingComma_afterIf() {
+    testRecovery('''
+f() => [a, if (x) b c];
+''', [ParserErrorCode.EXPECTED_ELSE_OR_COMMA], '''
+f() => [a, if (x) b, c];
+''', enableControlFlowCollections: true);
+  }
+
+  void test_missingComma_afterIfElse() {
+    testRecovery('''
+f() => [a, if (x) b else y c];
+''', [ParserErrorCode.EXPECTED_TOKEN], '''
+f() => [a, if (x) b else y, c];
+''', enableControlFlowCollections: true);
+  }
 }
 
 /**
@@ -71,6 +88,22 @@
 ''');
   }
 
+  void test_missingComma_afterIf() {
+    testRecovery('''
+f() => {a: b, if (x) c: d e: f};
+''', [ParserErrorCode.EXPECTED_ELSE_OR_COMMA], '''
+f() => {a: b, if (x) c: d, e: f};
+''', enableControlFlowCollections: true);
+  }
+
+  void test_missingComma_afterIfElse() {
+    testRecovery('''
+f() => {a: b, if (x) c: d else y: z e: f};
+''', [ParserErrorCode.EXPECTED_TOKEN], '''
+f() => {a: b, if (x) c: d else y: z, e: f};
+''', enableControlFlowCollections: true);
+  }
+
   void test_missingKey() {
     testRecovery('''
 f() => {: b};
@@ -210,6 +243,22 @@
     testUserDefinableOperatorWithSuper('==');
   }
 
+  void test_expressionBody_missingGt() {
+    testRecovery('''
+f(x) = x;
+''', [ParserErrorCode.MISSING_FUNCTION_BODY], '''
+f(x) => x;
+''');
+  }
+
+  void test_expressionBody_return() {
+    testRecovery('''
+f(x) return x;
+''', [ParserErrorCode.MISSING_FUNCTION_BODY], '''
+f(x) => x;
+''');
+  }
+
   void test_greaterThan() {
     testBinaryExpression('>');
   }
@@ -242,8 +291,7 @@
     testUserDefinableOperatorWithSuper('^');
   }
 
-  @failingTest
-  void test_initializerList_missingComma() {
+  void test_initializerList_missingComma_assert() {
     // https://github.com/dart-lang/sdk/issues/33241
     testRecovery('''
 class Test {
@@ -260,6 +308,40 @@
 ''');
   }
 
+  void test_initializerList_missingComma_field() {
+    // https://github.com/dart-lang/sdk/issues/33241
+    testRecovery('''
+class Test {
+  Test()
+    : assert(true)
+      x = 2;
+}
+''', [ParserErrorCode.EXPECTED_TOKEN], '''
+class Test {
+  Test()
+    : assert(true),
+      x = 2;
+}
+''');
+  }
+
+  void test_initializerList_missingComma_thisField() {
+    // https://github.com/dart-lang/sdk/issues/33241
+    testRecovery('''
+class Test {
+  Test()
+    : assert(true)
+      this.x = 2;
+}
+''', [ParserErrorCode.EXPECTED_TOKEN], '''
+class Test {
+  Test()
+    : assert(true),
+      this.x = 2;
+}
+''');
+  }
+
   void test_isExpression_missingLeft() {
     testRecovery('''
 f() {
@@ -397,10 +479,16 @@
     testUserDefinableOperatorWithSuper('*');
   }
 
+  @failingTest
   void test_stringInterpolation_unclosed() {
     // https://github.com/dart-lang/sdk/issues/946
     // TODO(brianwilkerson) Try to recover better. Ideally there would be a
     // single error about an unterminated interpolation block.
+
+    // https://github.com/dart-lang/sdk/issues/36101
+    // TODO(danrubel): improve recovery so that the scanner/parser associates
+    // `${` with a synthetic `}` inside the " " rather than the `}` at the end.
+
     testRecovery(r'''
 f() {
   print("${42");
@@ -712,3 +800,18 @@
 ''');
   }
 }
+
+/**
+ * Test how well the parser recovers when tokens are missing in a typedef.
+ */
+@reflectiveTest
+class TypedefTest extends AbstractRecoveryTest {
+  @failingTest
+  void test_missingFunction() {
+    testRecovery('''
+typedef Predicate = bool <E>(E element);
+''', [ParserErrorCode.MISSING_IDENTIFIER], '''
+typedef Predicate = bool Function<E>(E element);
+''');
+  }
+}
diff --git a/pkg/analyzer/test/src/fasta/recovery/recovery_test_support.dart b/pkg/analyzer/test/src/fasta/recovery/recovery_test_support.dart
index f42bcdd..d0cdb3b 100644
--- a/pkg/analyzer/test/src/fasta/recovery/recovery_test_support.dart
+++ b/pkg/analyzer/test/src/fasta/recovery/recovery_test_support.dart
@@ -19,13 +19,15 @@
   void testRecovery(
       String invalidCode, List<ErrorCode> errorCodes, String validCode,
       {CompilationUnit adjustValidUnitBeforeComparison(CompilationUnit unit),
+      bool enableControlFlowCollections,
       List<ErrorCode> expectedErrorsInValidCode}) {
     CompilationUnit validUnit;
 
     // Assert that the valid code is indeed valid.
     try {
-      validUnit =
-          parseCompilationUnit(validCode, codes: expectedErrorsInValidCode);
+      validUnit = parseCompilationUnit(validCode,
+          codes: expectedErrorsInValidCode,
+          enableControlFlowCollections: enableControlFlowCollections);
       validateTokenStream(validUnit.beginToken);
     } catch (e) {
 //      print('');
@@ -39,7 +41,8 @@
     // Compare the structures before asserting valid errors.
     GatheringErrorListener listener =
         new GatheringErrorListener(checkRanges: true);
-    CompilationUnit invalidUnit = parseCompilationUnit2(invalidCode, listener);
+    CompilationUnit invalidUnit = parseCompilationUnit2(invalidCode, listener,
+        enableControlFlowCollections: enableControlFlowCollections);
     validateTokenStream(invalidUnit.beginToken);
     if (adjustValidUnitBeforeComparison != null) {
       validUnit = adjustValidUnitBeforeComparison(validUnit);
diff --git a/pkg/analyzer/test/src/fasta/test_all.dart b/pkg/analyzer/test/src/fasta/test_all.dart
index 91b1a9c..adb1d99 100644
--- a/pkg/analyzer/test/src/fasta/test_all.dart
+++ b/pkg/analyzer/test/src/fasta/test_all.dart
@@ -7,11 +7,13 @@
 import 'ast_builder_test.dart' as ast_builder;
 import 'message_coverage_test.dart' as message_coverage;
 import 'recovery/test_all.dart' as recovery;
+import 'token_utils_test.dart' as token_utils;
 
 main() {
   defineReflectiveSuite(() {
     ast_builder.main();
     message_coverage.main();
     recovery.main();
+    token_utils.main();
   }, name: 'fasta');
 }
diff --git a/pkg/analyzer/test/src/hint/sdk_constraint_verifier.dart b/pkg/analyzer/test/src/hint/sdk_constraint_verifier.dart
deleted file mode 100644
index ad910f0..0000000
--- a/pkg/analyzer/test/src/hint/sdk_constraint_verifier.dart
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/error/error.dart';
-import 'package:analyzer/src/generated/engine.dart' show AnalysisOptionsImpl;
-import 'package:pub_semver/pub_semver.dart';
-
-import '../../generated/resolver_test_case.dart';
-import '../../generated/test_support.dart';
-
-/// A base class designed to be used by tests of the hints produced by an
-/// SdkConstraintVerifier.
-class SdkConstraintVerifierTest extends ResolverTestCase {
-  bool get enableNewAnalysisDriver => true;
-
-  verifyVersion(String version, String source,
-      {List<ErrorCode> errorCodes}) async {
-    driver.configure(
-        analysisOptions: AnalysisOptionsImpl()
-          ..sdkVersionConstraint = VersionConstraint.parse(version));
-
-    TestAnalysisResult result = await computeTestAnalysisResult(source);
-    GatheringErrorListener listener = new GatheringErrorListener();
-    listener.addAll(result.errors);
-    if (errorCodes == null) {
-      listener.assertNoErrors();
-    } else {
-      listener.assertErrorsWithCodes(errorCodes);
-    }
-  }
-}
diff --git a/pkg/analyzer/test/src/hint/sdk_version_async_exported_from_core_test.dart b/pkg/analyzer/test/src/hint/sdk_version_async_exported_from_core_test.dart
deleted file mode 100644
index a9f42b6..0000000
--- a/pkg/analyzer/test/src/hint/sdk_version_async_exported_from_core_test.dart
+++ /dev/null
@@ -1,129 +0,0 @@
-// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/src/dart/error/hint_codes.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import 'sdk_constraint_verifier.dart';
-
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(SdkVersionAsyncExportedFromCoreTest);
-  });
-}
-
-@reflectiveTest
-class SdkVersionAsyncExportedFromCoreTest extends SdkConstraintVerifierTest {
-  test_equals_explicitImportOfAsync() async {
-    await verifyVersion('2.1.0', '''
-import 'dart:async';
-
-Future<int> zero() async => 0;
-''');
-  }
-
-  test_equals_explicitImportOfCore() async {
-    await verifyVersion('2.1.0', '''
-import 'dart:core';
-
-Future<int> zero() async => 0;
-''');
-  }
-
-  test_equals_explicitImportOfExportingLibrary() async {
-    addNamedSource('/exporter.dart', '''
-export 'dart:async';
-''');
-    await verifyVersion('2.1.0', '''
-import 'exporter.dart';
-
-Future<int> zero() async => 0;
-''');
-  }
-
-  test_equals_implicitImportOfCore() async {
-    await verifyVersion('2.1.0', '''
-Future<int> zero() async => 0;
-''');
-  }
-
-  test_equals_implicitImportOfCore_inPart() async {
-    newFile('/lib.dart', content: '''
-library lib;
-''');
-    await verifyVersion('2.1.0', '''
-part of lib;
-
-Future<int> zero() async => 0;
-''');
-  }
-
-  test_lessThan_explicitImportOfAsync() async {
-    await verifyVersion('2.0.0', '''
-import 'dart:async';
-
-Future<int> zero() async => 0;
-''');
-  }
-
-  test_lessThan_explicitImportOfCore() async {
-    await verifyVersion('2.0.0', '''
-import 'dart:core' show Future, int;
-
-Future<int> zero() async => 0;
-''', errorCodes: [HintCode.SDK_VERSION_ASYNC_EXPORTED_FROM_CORE]);
-  }
-
-  test_lessThan_explicitImportOfExportingLibrary() async {
-    addNamedSource('/exporter.dart', '''
-export 'dart:async';
-''');
-    await verifyVersion('2.0.0', '''
-import 'exporter.dart';
-
-Future<int> zero() async => 0;
-''');
-  }
-
-  test_lessThan_implicitImportOfCore() async {
-    await verifyVersion('2.0.0', '''
-Future<int> zero() async => 0;
-''', errorCodes: [HintCode.SDK_VERSION_ASYNC_EXPORTED_FROM_CORE]);
-  }
-
-  test_lessThan_implicitImportOfCore_inPart() async {
-    newFile('/lib.dart', content: '''
-library lib;
-''');
-    await verifyVersion('2.0.0', '''
-part of lib;
-
-Future<int> zero() async => 0;
-''', errorCodes: [HintCode.SDK_VERSION_ASYNC_EXPORTED_FROM_CORE]);
-  }
-
-  test_lessThan_onlyReferencedInExport_hide() async {
-    await verifyVersion('2.0.0', '''
-export 'dart:async' hide Future;
-''');
-  }
-
-  test_lessThan_onlyReferencedInExport_show() async {
-    await verifyVersion('2.0.0', '''
-export 'dart:async' show Future;
-''');
-  }
-
-  test_lessThan_onlyReferencedInImport_hide() async {
-    await verifyVersion('2.0.0', '''
-import 'dart:core' hide Future;
-''');
-  }
-
-  test_lessThan_onlyReferencedInImport_show() async {
-    await verifyVersion('2.0.0', '''
-import 'dart:core' show Future;
-''');
-  }
-}
diff --git a/pkg/analyzer/test/src/hint/test_all.dart b/pkg/analyzer/test/src/hint/test_all.dart
index 0234ba4..0933671 100644
--- a/pkg/analyzer/test/src/hint/test_all.dart
+++ b/pkg/analyzer/test/src/hint/test_all.dart
@@ -5,12 +5,9 @@
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import 'sdk_constraint_extractor_test.dart' as sdk_constraint_extractor;
-import 'sdk_version_async_exported_from_core_test.dart'
-    as sdk_version_async_exported_from_core;
 
 main() {
   defineReflectiveSuite(() {
     sdk_constraint_extractor.main();
-    sdk_version_async_exported_from_core.main();
   }, name: 'hint');
 }
diff --git a/pkg/analyzer/test/src/lint/config_test.dart b/pkg/analyzer/test/src/lint/config_test.dart
index 2b44f9b..bd39e89 100644
--- a/pkg/analyzer/test/src/lint/config_test.dart
+++ b/pkg/analyzer/test/src/lint/config_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/lint/io_test.dart b/pkg/analyzer/test/src/lint/io_test.dart
index 3a377f0..e92b940 100644
--- a/pkg/analyzer/test/src/lint/io_test.dart
+++ b/pkg/analyzer/test/src/lint/io_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/lint/linter/linter_context_impl_test.dart b/pkg/analyzer/test/src/lint/linter/linter_context_impl_test.dart
index c8aed44..4c9693a 100644
--- a/pkg/analyzer/test/src/lint/linter/linter_context_impl_test.dart
+++ b/pkg/analyzer/test/src/lint/linter/linter_context_impl_test.dart
@@ -26,8 +26,6 @@
   CompilationUnitImpl testUnit;
   LinterContextImpl context;
 
-  bool get enableNewAnalysisDriver => true;
-
   void assertCanBeConst(String snippet, bool expectedResult) {
     int index = testSource.indexOf(snippet);
     expect(index >= 0, isTrue);
diff --git a/pkg/analyzer/test/src/lint/project_test.dart b/pkg/analyzer/test/src/lint/project_test.dart
index 5dcaa89..1c67dfb 100644
--- a/pkg/analyzer/test/src/lint/project_test.dart
+++ b/pkg/analyzer/test/src/lint/project_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/lint/pub_test.dart b/pkg/analyzer/test/src/lint/pub_test.dart
index aa3412e..ea778f3 100644
--- a/pkg/analyzer/test/src/lint/pub_test.dart
+++ b/pkg/analyzer/test/src/lint/pub_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/manifest/manifest_validator_test.dart b/pkg/analyzer/test/src/manifest/manifest_validator_test.dart
new file mode 100644
index 0000000..80f825a
--- /dev/null
+++ b/pkg/analyzer/test/src/manifest/manifest_validator_test.dart
@@ -0,0 +1,138 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/error/error.dart';
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/manifest/manifest_validator.dart';
+import 'package:analyzer/src/manifest/manifest_warning_code.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../../generated/test_support.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ManifestValidatorTest);
+  });
+}
+
+@reflectiveTest
+class ManifestValidatorTest with ResourceProviderMixin {
+  ManifestValidator validator;
+
+  /**
+   * Assert that when the validator is used on the given [content] the
+   * [expectedErrorCodes] are produced.
+   */
+  void assertErrors(String content, List<ErrorCode> expectedErrorCodes) {
+    List<AnalysisError> errors = validator.validate(content, true);
+    GatheringErrorListener listener = new GatheringErrorListener();
+    listener.addAll(errors);
+    listener.assertErrorsWithCodes(expectedErrorCodes);
+  }
+
+  /**
+   * Assert that when the validator is used on the given [content] no errors are
+   * produced.
+   */
+  void assertNoErrors(String content) {
+    assertErrors(content, []);
+  }
+
+  void setUp() {
+    File ManifestFile = getFile('/sample/Manifest.xml');
+    Source source = ManifestFile.createSource();
+    validator = new ManifestValidator(source);
+  }
+
+  test_hardwareNotSupported_error() {
+    assertErrors('''
+<manifest
+    xmlns:android="http://schemas.android.com/apk/res/android">
+    <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
+    <uses-feature android:name="android.software.home_screen" />
+</manifest>
+''', [ManifestWarningCode.UNSUPPORTED_CHROME_OS_HARDWARE]);
+  }
+
+  test_noTouchScreen_error() {
+    assertErrors('''
+<manifest
+    xmlns:android="http://schemas.android.com/apk/res/android">
+</manifest>
+''', [ManifestWarningCode.NO_TOUCHSCREEN_FEATURE]);
+  }
+
+  test_touchScreenNotSupported_error() {
+    assertErrors('''
+<manifest
+    xmlns:android="http://schemas.android.com/apk/res/android">
+    <uses-feature android:name="android.hardware.touchscreen" android:required="true"/>
+</manifest>
+''', [ManifestWarningCode.UNSUPPORTED_CHROME_OS_FEATURE]);
+  }
+
+  test_featureNotSupported_error() {
+    assertErrors('''
+<manifest
+    xmlns:android="http://schemas.android.com/apk/res/android">
+    <uses-feature android:name="android.hardware.touchscreen" />
+</manifest>
+''', [ManifestWarningCode.UNSUPPORTED_CHROME_OS_HARDWARE]);
+  }
+
+  test_cameraPermissions_error() {
+    assertErrors('''
+<manifest
+     xmlns:android="http://schemas.android.com/apk/res/android">
+    <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
+    <uses-permission android:name="android.permission.CAMERA" />
+</manifest>
+''', [ManifestWarningCode.CAMERA_PERMISSIONS_INCOMPATIBLE]);
+  }
+
+  test_screenOrientation_error() {
+    assertErrors('''
+<manifest
+     xmlns:android="http://schemas.android.com/apk/res/android">
+  <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
+  <application android:label="@string/app_name">
+    <activity android:name="testActivity"
+      android:screenOrientation="landscape"
+      android:exported="false">
+    </activity>
+  </application>
+</manifest>
+''', [ManifestWarningCode.SETTING_ORIENTATION_ON_ACTIVITY]);
+  }
+
+  test_resizeableactivity_error() {
+    assertErrors('''
+<manifest
+     xmlns:android="http://schemas.android.com/apk/res/android">
+  <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
+  <application android:label="@string/app_name">
+    <activity android:name="testActivity"
+      android:resizeableActivity="false"
+      android:exported="false">
+    </activity>
+  </application>
+</manifest>
+''', [ManifestWarningCode.NON_RESIZABLE_ACTIVITY]);
+  }
+
+  test_no_errors() {
+    assertErrors('''
+<manifest
+     xmlns:android="http://schemas.android.com/apk/res/android">
+  <uses-feature android:name="android.hardware.touchscreen" android:required="false" />
+  <activity android:name="testActivity"
+    android:resizeableActivity="true"
+    android:exported="false">
+  </activity>
+</manifest>
+''', []);
+  }
+}
diff --git a/pkg/analyzer/test/src/manifest/test_all.dart b/pkg/analyzer/test/src/manifest/test_all.dart
new file mode 100644
index 0000000..09e62ac
--- /dev/null
+++ b/pkg/analyzer/test/src/manifest/test_all.dart
@@ -0,0 +1,13 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'manifest_validator_test.dart' as manifest_test;
+
+main() {
+  defineReflectiveSuite(() {
+    manifest_test.main();
+  }, name: 'task');
+}
diff --git a/pkg/analyzer/test/src/options/options_rule_validator_test.dart b/pkg/analyzer/test/src/options/options_rule_validator_test.dart
index 5150828..c4aa442 100644
--- a/pkg/analyzer/test/src/options/options_rule_validator_test.dart
+++ b/pkg/analyzer/test/src/options/options_rule_validator_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/options/test_all.dart b/pkg/analyzer/test/src/options/test_all.dart
index e38e167..4d8d6a6 100644
--- a/pkg/analyzer/test/src/options/test_all.dart
+++ b/pkg/analyzer/test/src/options/test_all.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/pubspec/test_all.dart b/pkg/analyzer/test/src/pubspec/test_all.dart
index a7e7ebe..c4aa6ea 100644
--- a/pkg/analyzer/test/src/pubspec/test_all.dart
+++ b/pkg/analyzer/test/src/pubspec/test_all.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/services/available_declarations_test.dart b/pkg/analyzer/test/src/services/available_declarations_test.dart
index 2f03798..dbf23a4 100644
--- a/pkg/analyzer/test/src/services/available_declarations_test.dart
+++ b/pkg/analyzer/test/src/services/available_declarations_test.dart
@@ -1,11 +1,13 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/dart/analysis/analysis_context.dart';
 import 'package:analyzer/dart/analysis/analysis_context_collection.dart';
+import 'package:analyzer/file_system/file_system.dart';
 import 'package:analyzer/src/dart/analysis/analysis_context_collection.dart';
 import 'package:analyzer/src/dart/analysis/byte_store.dart';
+import 'package:analyzer/src/dart/analysis/driver_based_analysis_context.dart';
 import 'package:analyzer/src/services/available_declarations.dart';
 import 'package:analyzer/src/test_utilities/mock_sdk.dart';
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
@@ -17,6 +19,7 @@
   defineReflectiveSuite(() {
     defineReflectiveTests(AvailableDeclarationsTest);
     defineReflectiveTests(ChangeFileTest);
+    defineReflectiveTests(DartdocInfoTest);
     defineReflectiveTests(DeclarationTest);
     defineReflectiveTests(ExportTest);
     defineReflectiveTests(GetLibrariesTest);
@@ -200,11 +203,18 @@
     await _doAllTrackerWork();
 
     _assertHasLibrary('package:test/test.dart', declarations: [
-      _ExpectedDeclaration.class_('A'),
-      _ExpectedDeclaration.class_('B'),
-      _ExpectedDeclaration.class_('C'),
-      _ExpectedDeclaration.enum_('E'),
-      _ExpectedDeclaration.enumConstant('v', 'E'),
+      _ExpectedDeclaration.class_('A', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('B', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('C', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.enum_('E', [
+        _ExpectedDeclaration.enumConstant('v'),
+      ]),
     ]);
   }
 
@@ -237,15 +247,23 @@
 
     await _doAllTrackerWork();
     _assertHasLibrary('package:test/a.dart', declarations: [
-      _ExpectedDeclaration.class_('A'),
-      _ExpectedDeclaration.class_('B'),
+      _ExpectedDeclaration.class_('A', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('B', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasLibrary('package:test/b.dart', declarations: [
-      _ExpectedDeclaration.class_('B'),
+      _ExpectedDeclaration.class_('B', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasNoLibrary('package:test/c.dart');
     _assertHasLibrary('package:test/d.dart', declarations: [
-      _ExpectedDeclaration.class_('D'),
+      _ExpectedDeclaration.class_('D', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
 
     newFile(c, content: r'''
@@ -255,19 +273,33 @@
     await _doAllTrackerWork();
 
     _assertHasLibrary('package:test/a.dart', declarations: [
-      _ExpectedDeclaration.class_('A'),
-      _ExpectedDeclaration.class_('B'),
-      _ExpectedDeclaration.class_('C'),
+      _ExpectedDeclaration.class_('A', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('B', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('C', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasLibrary('package:test/b.dart', declarations: [
-      _ExpectedDeclaration.class_('B'),
-      _ExpectedDeclaration.class_('C'),
+      _ExpectedDeclaration.class_('B', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('C', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasLibrary('package:test/c.dart', declarations: [
-      _ExpectedDeclaration.class_('C'),
+      _ExpectedDeclaration.class_('C', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasLibrary('package:test/d.dart', declarations: [
-      _ExpectedDeclaration.class_('D'),
+      _ExpectedDeclaration.class_('D', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
   }
 
@@ -282,7 +314,9 @@
 
     await _doAllTrackerWork();
     _assertHasLibrary('package:test/a.dart', declarations: [
-      _ExpectedDeclaration.class_('A'),
+      _ExpectedDeclaration.class_('A', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasNoLibrary('package:test/b.dart');
 
@@ -293,10 +327,14 @@
     await _doAllTrackerWork();
 
     _assertHasLibrary('package:test/a.dart', declarations: [
-      _ExpectedDeclaration.class_('A'),
+      _ExpectedDeclaration.class_('A', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasLibrary('package:test/b.dart', declarations: [
-      _ExpectedDeclaration.class_('B'),
+      _ExpectedDeclaration.class_('B', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
 
     var librariesObject = declarationsContext.getLibraries(
@@ -324,11 +362,15 @@
 
     await _doAllTrackerWork();
     _assertHasLibrary('package:test/a.dart', declarations: [
-      _ExpectedDeclaration.class_('A'),
+      _ExpectedDeclaration.class_('A', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasNoLibrary('package:test/b.dart');
     _assertHasLibrary('package:test/c.dart', declarations: [
-      _ExpectedDeclaration.class_('C'),
+      _ExpectedDeclaration.class_('C', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
 
     newFile(b, content: r'''
@@ -339,15 +381,34 @@
     await _doAllTrackerWork();
 
     _assertHasLibrary('package:test/a.dart', declarations: [
-      _ExpectedDeclaration.class_('A'),
-      _ExpectedDeclaration.class_('B'),
+      _ExpectedDeclaration.class_('A', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('B', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasNoLibrary('package:test/b.dart');
     _assertHasLibrary('package:test/c.dart', declarations: [
-      _ExpectedDeclaration.class_('C'),
+      _ExpectedDeclaration.class_('C', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
   }
 
+  test_added_part_withoutLibrary() async {
+    var b = convertPath('/home/test/lib/b.dart');
+
+    newFile(b, content: r'''
+part of 'a.dart';
+''');
+    tracker.changeFile(b);
+    await _doAllTrackerWork();
+
+    _assertHasNoLibrary('package:test/a.dart');
+    _assertHasNoLibrary('package:test/b.dart');
+  }
+
   test_chooseContext_inAnalysisRoot() async {
     var homePath = convertPath('/home');
     var testPath = convertPath('/home/test');
@@ -366,7 +427,10 @@
     await _doAllTrackerWork();
 
     _assertDeclaration(
-      _getLibrary('package:test/test.dart'),
+      _getDeclaration(
+        _getLibrary('package:test/test.dart').declarations,
+        'A',
+      ),
       'A',
       DeclarationKind.CLASS,
       relevanceTags: ['package:test/test.dart::A'],
@@ -378,7 +442,10 @@
     await _doAllTrackerWork();
 
     _assertDeclaration(
-      _getLibrary('package:test/test.dart'),
+      _getDeclaration(
+        _getLibrary('package:test/test.dart').declarations,
+        'B',
+      ),
       'B',
       DeclarationKind.CLASS,
       relevanceTags: ['package:test/test.dart::B'],
@@ -410,7 +477,10 @@
     await _doAllTrackerWork();
 
     _assertDeclaration(
-      _getLibrary('package:aaa/a.dart'),
+      _getDeclaration(
+        _getLibrary('package:aaa/a.dart').declarations,
+        'A',
+      ),
       'A',
       DeclarationKind.CLASS,
       relevanceTags: ['package:aaa/a.dart::A'],
@@ -422,7 +492,10 @@
     await _doAllTrackerWork();
 
     _assertDeclaration(
-      _getLibrary('package:aaa/a.dart'),
+      _getDeclaration(
+        _getLibrary('package:aaa/a.dart').declarations,
+        'B',
+      ),
       'B',
       DeclarationKind.CLASS,
       relevanceTags: ['package:aaa/a.dart::B'],
@@ -441,7 +514,10 @@
     await _doAllTrackerWork();
 
     _assertDeclaration(
-      _getLibrary('dart:math'),
+      _getDeclaration(
+        _getLibrary('dart:math').declarations,
+        'A',
+      ),
       'A',
       DeclarationKind.CLASS,
       relevanceTags: ['dart:math::A'],
@@ -453,7 +529,10 @@
     await _doAllTrackerWork();
 
     _assertDeclaration(
-      _getLibrary('dart:math'),
+      _getDeclaration(
+        _getLibrary('dart:math').declarations,
+        'B',
+      ),
       'B',
       DeclarationKind.CLASS,
       relevanceTags: ['dart:math::B'],
@@ -484,19 +563,33 @@
 
     await _doAllTrackerWork();
     _assertHasLibrary('package:test/a.dart', declarations: [
-      _ExpectedDeclaration.class_('A'),
-      _ExpectedDeclaration.class_('B'),
-      _ExpectedDeclaration.class_('C'),
+      _ExpectedDeclaration.class_('A', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('B', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('C', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasLibrary('package:test/b.dart', declarations: [
-      _ExpectedDeclaration.class_('B'),
-      _ExpectedDeclaration.class_('C'),
+      _ExpectedDeclaration.class_('B', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('C', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasLibrary('package:test/c.dart', declarations: [
-      _ExpectedDeclaration.class_('C'),
+      _ExpectedDeclaration.class_('C', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasLibrary('package:test/d.dart', declarations: [
-      _ExpectedDeclaration.class_('D'),
+      _ExpectedDeclaration.class_('D', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
 
     deleteFile(c);
@@ -504,15 +597,23 @@
     await _doAllTrackerWork();
 
     _assertHasLibrary('package:test/a.dart', declarations: [
-      _ExpectedDeclaration.class_('A'),
-      _ExpectedDeclaration.class_('B'),
+      _ExpectedDeclaration.class_('A', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('B', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasLibrary('package:test/b.dart', declarations: [
-      _ExpectedDeclaration.class_('B'),
+      _ExpectedDeclaration.class_('B', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasNoLibrary('package:test/c.dart');
     _assertHasLibrary('package:test/d.dart', declarations: [
-      _ExpectedDeclaration.class_('D'),
+      _ExpectedDeclaration.class_('D', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
   }
 
@@ -536,6 +637,30 @@
     _assertHasLibrary('package:test/b.dart');
   }
 
+  test_deleted_library_ofPart() async {
+    var a = convertPath('/home/test/lib/a.dart');
+    var b = convertPath('/home/test/lib/b.dart');
+
+    newFile(a, content: r'''
+part 'b.dart';
+''');
+    newFile(b, content: r'''
+part of 'a.dart';
+''');
+    tracker.addContext(testAnalysisContext);
+
+    await _doAllTrackerWork();
+    _assertHasLibrary('package:test/a.dart');
+    _assertHasNoLibrary('package:test/b.dart');
+
+    deleteFile(a);
+    tracker.changeFile(a);
+    await _doAllTrackerWork();
+
+    _assertHasNoLibrary('package:test/a.dart');
+    _assertHasNoLibrary('package:test/b.dart');
+  }
+
   test_deleted_part() async {
     var a = convertPath('/home/test/lib/a.dart');
     var b = convertPath('/home/test/lib/b.dart');
@@ -556,11 +681,17 @@
 
     await _doAllTrackerWork();
     _assertHasLibrary('package:test/a.dart', declarations: [
-      _ExpectedDeclaration.class_('A'),
-      _ExpectedDeclaration.class_('B'),
+      _ExpectedDeclaration.class_('A', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('B', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasLibrary('package:test/c.dart', declarations: [
-      _ExpectedDeclaration.class_('C'),
+      _ExpectedDeclaration.class_('C', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
 
     deleteFile(b);
@@ -568,13 +699,30 @@
     await _doAllTrackerWork();
 
     _assertHasLibrary('package:test/a.dart', declarations: [
-      _ExpectedDeclaration.class_('A'),
+      _ExpectedDeclaration.class_('A', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasLibrary('package:test/c.dart', declarations: [
-      _ExpectedDeclaration.class_('C'),
+      _ExpectedDeclaration.class_('C', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
   }
 
+  test_deleted_part_withoutLibrary() async {
+    var b = convertPath('/home/test/lib/b.dart');
+
+    newFile(b, content: r'''
+part of 'a.dart';
+''');
+    tracker.addContext(testAnalysisContext);
+
+    await _doAllTrackerWork();
+    _assertHasNoLibrary('package:test/a.dart');
+    _assertHasNoLibrary('package:test/b.dart');
+  }
+
   test_updated_exported() async {
     var a = convertPath('/home/test/lib/a.dart');
     var b = convertPath('/home/test/lib/b.dart');
@@ -599,19 +747,33 @@
 
     await _doAllTrackerWork();
     _assertHasLibrary('package:test/a.dart', declarations: [
-      _ExpectedDeclaration.class_('A'),
-      _ExpectedDeclaration.class_('B'),
-      _ExpectedDeclaration.class_('C'),
+      _ExpectedDeclaration.class_('A', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('B', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('C', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasLibrary('package:test/b.dart', declarations: [
-      _ExpectedDeclaration.class_('B'),
-      _ExpectedDeclaration.class_('C'),
+      _ExpectedDeclaration.class_('B', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('C', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasLibrary('package:test/c.dart', declarations: [
-      _ExpectedDeclaration.class_('C'),
+      _ExpectedDeclaration.class_('C', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasLibrary('package:test/d.dart', declarations: [
-      _ExpectedDeclaration.class_('D'),
+      _ExpectedDeclaration.class_('D', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
 
     newFile(c, content: r'''
@@ -621,19 +783,33 @@
     await _doAllTrackerWork();
 
     _assertHasLibrary('package:test/a.dart', declarations: [
-      _ExpectedDeclaration.class_('A'),
-      _ExpectedDeclaration.class_('B'),
-      _ExpectedDeclaration.class_('C2'),
+      _ExpectedDeclaration.class_('A', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('B', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('C2', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasLibrary('package:test/b.dart', declarations: [
-      _ExpectedDeclaration.class_('B'),
-      _ExpectedDeclaration.class_('C2'),
+      _ExpectedDeclaration.class_('B', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('C2', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasLibrary('package:test/c.dart', declarations: [
-      _ExpectedDeclaration.class_('C2'),
+      _ExpectedDeclaration.class_('C2', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasLibrary('package:test/d.dart', declarations: [
-      _ExpectedDeclaration.class_('D'),
+      _ExpectedDeclaration.class_('D', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
   }
 
@@ -651,10 +827,14 @@
 
     await _doAllTrackerWork();
     _assertHasLibrary('package:test/a.dart', declarations: [
-      _ExpectedDeclaration.class_('A'),
+      _ExpectedDeclaration.class_('A', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasLibrary('package:test/b.dart', declarations: [
-      _ExpectedDeclaration.class_('B'),
+      _ExpectedDeclaration.class_('B', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
 
     newFile(a, content: r'''
@@ -664,10 +844,14 @@
     await _doAllTrackerWork();
 
     _assertHasLibrary('package:test/a.dart', declarations: [
-      _ExpectedDeclaration.class_('A2'),
+      _ExpectedDeclaration.class_('A2', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasLibrary('package:test/b.dart', declarations: [
-      _ExpectedDeclaration.class_('B'),
+      _ExpectedDeclaration.class_('B', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
   }
 
@@ -691,11 +875,17 @@
 
     await _doAllTrackerWork();
     _assertHasLibrary('package:test/a.dart', declarations: [
-      _ExpectedDeclaration.class_('A'),
-      _ExpectedDeclaration.class_('B'),
+      _ExpectedDeclaration.class_('A', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('B', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasLibrary('package:test/c.dart', declarations: [
-      _ExpectedDeclaration.class_('C'),
+      _ExpectedDeclaration.class_('C', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
 
     newFile(b, content: r'''
@@ -706,13 +896,73 @@
     await _doAllTrackerWork();
 
     _assertHasLibrary('package:test/a.dart', declarations: [
-      _ExpectedDeclaration.class_('A'),
-      _ExpectedDeclaration.class_('B2'),
+      _ExpectedDeclaration.class_('A', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('B2', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasLibrary('package:test/c.dart', declarations: [
-      _ExpectedDeclaration.class_('C'),
+      _ExpectedDeclaration.class_('C', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
   }
+
+  test_updated_part_withoutLibrary() async {
+    var b = convertPath('/home/test/lib/b.dart');
+
+    newFile(b, content: r'''
+part of 'a.dart';
+class B {}
+''');
+    tracker.addContext(testAnalysisContext);
+
+    await _doAllTrackerWork();
+    _assertHasNoLibrary('package:test/a.dart');
+    _assertHasNoLibrary('package:test/b.dart');
+
+    newFile(b, content: r'''
+part of 'a.dart';
+class B2 {}
+''');
+    tracker.changeFile(b);
+
+    await _doAllTrackerWork();
+    _assertHasNoLibrary('package:test/a.dart');
+    _assertHasNoLibrary('package:test/b.dart');
+  }
+}
+
+@reflectiveTest
+class DartdocInfoTest extends _Base {
+  test_samePackage() async {
+    File file = newFile('/home/aaa/lib/definition.dart', content: '''
+/// {@template foo}
+/// Body of the template.
+/// {@endtemplate}
+class A {}
+''');
+
+    createAnalysisContexts();
+
+    DriverBasedAnalysisContext context =
+        analysisContextCollection.contextFor(file.path);
+
+    tracker.addContext(context);
+    await _doAllTrackerWork();
+
+    String result =
+        tracker.getContext(context).dartdocDirectiveInfo.processDartdoc('''
+/// Before macro.
+/// {@macro foo}
+/// After macro.''');
+    expect(result, '''
+Before macro.
+Body of the template.
+After macro.''');
+  }
 }
 
 @reflectiveTest
@@ -738,27 +988,27 @@
 
     var library = _getLibrary('package:test/test.dart');
     _assertDeclaration(
-      library,
+      _getDeclaration(library.declarations, 'A'),
       'A',
       DeclarationKind.CLASS,
       relevanceTags: ['package:test/test.dart::A'],
     );
     _assertDeclaration(
-      library,
+      _getDeclaration(library.declarations, 'B'),
       'B',
       DeclarationKind.CLASS,
       isAbstract: true,
       relevanceTags: ['package:test/test.dart::B'],
     );
     _assertDeclaration(
-      library,
+      _getDeclaration(library.declarations, 'C'),
       'C',
       DeclarationKind.CLASS,
       isDeprecated: true,
       relevanceTags: ['package:test/test.dart::C'],
     );
     _assertDeclaration(
-      library,
+      _getDeclaration(library.declarations, 'D'),
       'D',
       DeclarationKind.CLASS,
       docSummary: 'aaa',
@@ -787,20 +1037,20 @@
 
     var library = _getLibrary('package:test/test.dart');
     _assertDeclaration(
-      library,
+      _getDeclaration(library.declarations, 'A'),
       'A',
       DeclarationKind.CLASS_TYPE_ALIAS,
       relevanceTags: ['package:test/test.dart::A'],
     );
     _assertDeclaration(
-      library,
+      _getDeclaration(library.declarations, 'B'),
       'B',
       DeclarationKind.CLASS_TYPE_ALIAS,
       isDeprecated: true,
       relevanceTags: ['package:test/test.dart::B'],
     );
     _assertDeclaration(
-      library,
+      _getDeclaration(library.declarations, 'C'),
       'C',
       DeclarationKind.CLASS_TYPE_ALIAS,
       docSummary: 'aaa',
@@ -809,6 +1059,105 @@
     );
   }
 
+  test_CONSTRUCTOR() async {
+    newFile('/home/test/lib/test.dart', content: r'''
+class C {
+  int f1;
+  int f2;
+
+  C() {}
+
+  C.a() {}
+
+  @deprecated
+  C.b() {}
+
+  /// aaa
+  ///
+  /// bbb bbb
+  C.c() {}
+
+  C.d(Map<String, int> p1, int p2, {double p3}) {}
+
+  C.e(this.f1, this.f2) {}
+}
+''');
+
+    tracker.addContext(testAnalysisContext);
+    await _doAllTrackerWork();
+
+    var library = _getLibrary('package:test/test.dart');
+    var classDeclaration = _getDeclaration(library.declarations, 'C');
+
+    _assertDeclaration(
+      _getDeclaration(classDeclaration.children, ''),
+      '',
+      DeclarationKind.CONSTRUCTOR,
+      parameterNames: [],
+      parameters: '()',
+      parameterTypes: [],
+      requiredParameterCount: 0,
+      returnType: 'C',
+    );
+    _assertDeclaration(
+      _getDeclaration(classDeclaration.children, 'a'),
+      'a',
+      DeclarationKind.CONSTRUCTOR,
+      parameterNames: [],
+      parameters: '()',
+      parameterTypes: [],
+      requiredParameterCount: 0,
+      returnType: 'C',
+    );
+    _assertDeclaration(
+      _getDeclaration(classDeclaration.children, 'b'),
+      'b',
+      DeclarationKind.CONSTRUCTOR,
+      isDeprecated: true,
+      parameters: '()',
+      parameterNames: [],
+      parameterTypes: [],
+      requiredParameterCount: 0,
+      returnType: 'C',
+    );
+    _assertDeclaration(
+      _getDeclaration(classDeclaration.children, 'c'),
+      'c',
+      DeclarationKind.CONSTRUCTOR,
+      docSummary: 'aaa',
+      docComplete: 'aaa\n\nbbb bbb',
+      parameters: '()',
+      parameterNames: [],
+      parameterTypes: [],
+      requiredParameterCount: 0,
+      returnType: 'C',
+    );
+    _assertDeclaration(
+      _getDeclaration(classDeclaration.children, 'd'),
+      'd',
+      DeclarationKind.CONSTRUCTOR,
+      defaultArgumentListString: 'p1, p2',
+      defaultArgumentListTextRanges: [0, 2, 4, 2],
+      parameters: '(Map<String, int> p1, int p2, {double p3})',
+      parameterNames: ['p1', 'p2', 'p3'],
+      parameterTypes: ['Map<String, int>', 'int', 'double'],
+      requiredParameterCount: 2,
+      returnType: 'C',
+    );
+    _assertDeclaration(
+      _getDeclaration(classDeclaration.children, 'e'),
+      'e',
+      DeclarationKind.CONSTRUCTOR,
+      defaultArgumentListString: 'f1, f2',
+      defaultArgumentListTextRanges: [0, 2, 4, 2],
+      parameters: '(this.f1, this.f2)',
+      parameterNames: ['f1', 'f2'],
+      parameterTypes: ['', ''],
+      requiredParameterCount: 2,
+      returnType: 'C',
+    );
+  }
+
   test_ENUM() async {
     newFile('/home/test/lib/test.dart', content: r'''
 enum A {v}
@@ -827,20 +1176,20 @@
 
     var library = _getLibrary('package:test/test.dart');
     _assertDeclaration(
-      library,
+      _getDeclaration(library.declarations, 'A'),
       'A',
       DeclarationKind.ENUM,
       relevanceTags: ['package:test/test.dart::A'],
     );
     _assertDeclaration(
-      library,
+      _getDeclaration(library.declarations, 'B'),
       'B',
       DeclarationKind.ENUM,
       isDeprecated: true,
       relevanceTags: ['package:test/test.dart::B'],
     );
     _assertDeclaration(
-      library,
+      _getDeclaration(library.declarations, 'C'),
       'C',
       DeclarationKind.ENUM,
       docSummary: 'aaa',
@@ -868,28 +1217,27 @@
     await _doAllTrackerWork();
 
     var library = _getLibrary('package:test/test.dart');
+    var enumDeclaration = _getDeclaration(library.declarations, 'MyEnum');
+
     _assertDeclaration(
-      library,
+      _getDeclaration(enumDeclaration.children, 'a'),
       'a',
       DeclarationKind.ENUM_CONSTANT,
-      name2: 'MyEnum',
       relevanceTags: ['package:test/test.dart::MyEnum'],
     );
     _assertDeclaration(
-      library,
+      _getDeclaration(enumDeclaration.children, 'b'),
       'b',
       DeclarationKind.ENUM_CONSTANT,
       isDeprecated: true,
-      name2: 'MyEnum',
       relevanceTags: ['package:test/test.dart::MyEnum'],
     );
     _assertDeclaration(
-      library,
+      _getDeclaration(enumDeclaration.children, 'c'),
       'c',
       DeclarationKind.ENUM_CONSTANT,
       docSummary: 'aaa',
       docComplete: 'aaa\n\nbbb bbb',
-      name2: 'MyEnum',
       relevanceTags: ['package:test/test.dart::MyEnum'],
     );
   }
@@ -915,40 +1263,125 @@
     await _doAllTrackerWork();
 
     var library = _getLibrary('package:test/test.dart');
-    _assertDeclaration(library, 'a', DeclarationKind.FUNCTION,
-        parameterNames: [],
-        parameters: '()',
-        parameterTypes: [],
-        requiredParameterCount: 0,
-        returnType: 'void');
-    _assertDeclaration(library, 'b', DeclarationKind.FUNCTION,
-        isDeprecated: true,
-        parameters: '()',
-        parameterNames: [],
-        parameterTypes: [],
-        requiredParameterCount: 0,
-        returnType: 'void');
-    _assertDeclaration(library, 'c', DeclarationKind.FUNCTION,
-        docSummary: 'aaa',
-        docComplete: 'aaa\n\nbbb bbb',
-        parameters: '()',
-        parameterNames: [],
-        parameterTypes: [],
-        requiredParameterCount: 0,
-        returnType: 'void');
-    _assertDeclaration(library, 'd', DeclarationKind.FUNCTION,
-        parameters: '(Map<String, int> p1, int p2, {double p3})',
-        parameterNames: ['p1', 'p2', 'p3'],
-        parameterTypes: ['Map<String, int>', 'int', 'double'],
-        requiredParameterCount: 2,
-        returnType: 'List<String>');
-    _assertDeclaration(library, 'e', DeclarationKind.FUNCTION,
-        parameters: '()',
-        parameterNames: [],
-        parameterTypes: [],
-        requiredParameterCount: 0,
-        returnType: 'void',
-        typeParameters: '<T extends num, U>');
+    _assertDeclaration(
+      _getDeclaration(library.declarations, 'a'),
+      'a',
+      DeclarationKind.FUNCTION,
+      parameterNames: [],
+      parameters: '()',
+      parameterTypes: [],
+      requiredParameterCount: 0,
+      returnType: 'void',
+    );
+    _assertDeclaration(
+      _getDeclaration(library.declarations, 'b'),
+      'b',
+      DeclarationKind.FUNCTION,
+      isDeprecated: true,
+      parameters: '()',
+      parameterNames: [],
+      parameterTypes: [],
+      requiredParameterCount: 0,
+      returnType: 'void',
+    );
+    _assertDeclaration(
+      _getDeclaration(library.declarations, 'c'),
+      'c',
+      DeclarationKind.FUNCTION,
+      docSummary: 'aaa',
+      docComplete: 'aaa\n\nbbb bbb',
+      parameters: '()',
+      parameterNames: [],
+      parameterTypes: [],
+      requiredParameterCount: 0,
+      returnType: 'void',
+    );
+    _assertDeclaration(
+      _getDeclaration(library.declarations, 'd'),
+      'd',
+      DeclarationKind.FUNCTION,
+      defaultArgumentListString: 'p1, p2',
+      defaultArgumentListTextRanges: [0, 2, 4, 2],
+      parameters: '(Map<String, int> p1, int p2, {double p3})',
+      parameterNames: ['p1', 'p2', 'p3'],
+      parameterTypes: ['Map<String, int>', 'int', 'double'],
+      requiredParameterCount: 2,
+      returnType: 'List<String>',
+    );
+    _assertDeclaration(
+      _getDeclaration(library.declarations, 'e'),
+      'e',
+      DeclarationKind.FUNCTION,
+      parameters: '()',
+      parameterNames: [],
+      parameterTypes: [],
+      requiredParameterCount: 0,
+      returnType: 'void',
+      typeParameters: '<T extends num, U>',
+    );
+  }
+
+  test_FUNCTION_defaultArgumentList() async {
+    newFile('/home/test/lib/test.dart', content: r'''
+void a() {}
+
+void b(int a, double bb, String ccc) {}
+
+void c(int a, [double b, String c]) {}
+
+void d(int a, {int b, @required int c, @required int d, int e}) {}
+''');
+
+    tracker.addContext(testAnalysisContext);
+    await _doAllTrackerWork();
+
+    var library = _getLibrary('package:test/test.dart');
+    _assertDeclaration(
+      _getDeclaration(library.declarations, 'a'),
+      'a',
+      DeclarationKind.FUNCTION,
+      parameterNames: [],
+      parameters: '()',
+      parameterTypes: [],
+      requiredParameterCount: 0,
+      returnType: 'void',
+    );
+    _assertDeclaration(
+      _getDeclaration(library.declarations, 'b'),
+      'b',
+      DeclarationKind.FUNCTION,
+      defaultArgumentListString: 'a, bb, ccc',
+      defaultArgumentListTextRanges: [0, 1, 3, 2, 7, 3],
+      parameters: '(int a, double bb, String ccc)',
+      parameterNames: ['a', 'bb', 'ccc'],
+      parameterTypes: ['int', 'double', 'String'],
+      requiredParameterCount: 3,
+      returnType: 'void',
+    );
+    _assertDeclaration(
+      _getDeclaration(library.declarations, 'c'),
+      'c',
+      DeclarationKind.FUNCTION,
+      defaultArgumentListString: 'a',
+      defaultArgumentListTextRanges: [0, 1],
+      parameters: '(int a, [double b, String c])',
+      parameterNames: ['a', 'b', 'c'],
+      parameterTypes: ['int', 'double', 'String'],
+      requiredParameterCount: 1,
+      returnType: 'void',
+    );
+    _assertDeclaration(
+      _getDeclaration(library.declarations, 'd'),
+      'd',
+      DeclarationKind.FUNCTION,
+      defaultArgumentListString: 'a, c: null, d: null',
+      defaultArgumentListTextRanges: [0, 1, 6, 4, 15, 4],
+      parameters: '(int a, {int b, @required int c, @required int d, int e})',
+      parameterNames: ['a', 'b', 'c', 'd', 'e'],
+      parameterTypes: ['int', 'int', 'int', 'int', 'int'],
+      requiredParameterCount: 1,
+      returnType: 'void',
+    );
   }
 
   test_FUNCTION_TYPE_ALIAS() async {
@@ -974,52 +1407,88 @@
     await _doAllTrackerWork();
 
     var library = _getLibrary('package:test/test.dart');
-    _assertDeclaration(library, 'A', DeclarationKind.FUNCTION_TYPE_ALIAS,
-        parameters: '()',
-        parameterNames: [],
-        parameterTypes: [],
-        relevanceTags: ['package:test/test.dart::A'],
-        requiredParameterCount: 0,
-        returnType: 'void');
-    _assertDeclaration(library, 'B', DeclarationKind.FUNCTION_TYPE_ALIAS,
-        isDeprecated: true,
-        parameters: '()',
-        parameterNames: [],
-        parameterTypes: [],
-        relevanceTags: ['package:test/test.dart::B'],
-        requiredParameterCount: 0,
-        returnType: 'void');
-    _assertDeclaration(library, 'C', DeclarationKind.FUNCTION_TYPE_ALIAS,
-        docSummary: 'aaa',
-        docComplete: 'aaa\n\nbbb bbb',
-        parameters: '()',
-        parameterNames: [],
-        parameterTypes: [],
-        relevanceTags: ['package:test/test.dart::C'],
-        requiredParameterCount: 0,
-        returnType: 'void');
-    _assertDeclaration(library, 'D', DeclarationKind.FUNCTION_TYPE_ALIAS,
-        parameters: '(int p1, [double p2, String p3])',
-        parameterNames: ['p1', 'p2', 'p3'],
-        parameterTypes: ['int', 'double', 'String'],
-        relevanceTags: ['package:test/test.dart::D'],
-        requiredParameterCount: 1,
-        returnType: 'int');
-    _assertDeclaration(library, 'E', DeclarationKind.FUNCTION_TYPE_ALIAS,
-        parameters: '(int, double, {String p3})',
-        parameterNames: ['', '', 'p3'],
-        parameterTypes: ['int', 'double', 'String'],
-        relevanceTags: ['package:test/test.dart::E'],
-        requiredParameterCount: 2,
-        returnType: 'void');
-    _assertDeclaration(library, 'F', DeclarationKind.FUNCTION_TYPE_ALIAS,
-        parameters: '()',
-        parameterNames: [],
-        parameterTypes: [],
-        requiredParameterCount: 0,
-        relevanceTags: ['package:test/test.dart::F'],
-        returnType: 'void',
-        typeParameters: '<T extends num, U>');
+    _assertDeclaration(
+      _getDeclaration(library.declarations, 'A'),
+      'A',
+      DeclarationKind.FUNCTION_TYPE_ALIAS,
+      parameters: '()',
+      parameterNames: [],
+      parameterTypes: [],
+      relevanceTags: ['package:test/test.dart::A'],
+      requiredParameterCount: 0,
+      returnType: 'void',
+    );
+    _assertDeclaration(
+      _getDeclaration(library.declarations, 'B'),
+      'B',
+      DeclarationKind.FUNCTION_TYPE_ALIAS,
+      isDeprecated: true,
+      parameters: '()',
+      parameterNames: [],
+      parameterTypes: [],
+      relevanceTags: ['package:test/test.dart::B'],
+      requiredParameterCount: 0,
+      returnType: 'void',
+    );
+    _assertDeclaration(
+      _getDeclaration(library.declarations, 'C'),
+      'C',
+      DeclarationKind.FUNCTION_TYPE_ALIAS,
+      docSummary: 'aaa',
+      docComplete: 'aaa\n\nbbb bbb',
+      parameters: '()',
+      parameterNames: [],
+      parameterTypes: [],
+      relevanceTags: ['package:test/test.dart::C'],
+      requiredParameterCount: 0,
+      returnType: 'void',
+    );
+    _assertDeclaration(
+      _getDeclaration(library.declarations, 'D'),
+      'D',
+      DeclarationKind.FUNCTION_TYPE_ALIAS,
+      parameters: '(int p1, [double p2, String p3])',
+      parameterNames: ['p1', 'p2', 'p3'],
+      parameterTypes: ['int', 'double', 'String'],
+      relevanceTags: ['package:test/test.dart::D'],
+      requiredParameterCount: 1,
+      returnType: 'int',
+    );
+    _assertDeclaration(
+      _getDeclaration(library.declarations, 'E'),
+      'E',
+      DeclarationKind.FUNCTION_TYPE_ALIAS,
+      parameters: '(int, double, {String p3})',
+      parameterNames: ['', '', 'p3'],
+      parameterTypes: ['int', 'double', 'String'],
+      relevanceTags: ['package:test/test.dart::E'],
+      requiredParameterCount: 2,
+      returnType: 'void',
+    );
+    _assertDeclaration(
+      _getDeclaration(library.declarations, 'F'),
+      'F',
+      DeclarationKind.FUNCTION_TYPE_ALIAS,
+      parameters: '()',
+      parameterNames: [],
+      parameterTypes: [],
+      requiredParameterCount: 0,
+      relevanceTags: ['package:test/test.dart::F'],
+      returnType: 'void',
+      typeParameters: '<T extends num, U>',
+    );
+  }
+
+  test_FUNCTION_TYPE_ALIAS_noFunction() async {
+    newFile('/home/test/lib/test.dart', content: r'''
+typedef A = ;
+''');
+
+    tracker.addContext(testAnalysisContext);
+    await _doAllTrackerWork();
+
+    var library = _getLibrary('package:test/test.dart');
+    _assertNoDeclaration(library, 'A');
   }
 
   test_GETTER() async {
@@ -1039,16 +1508,21 @@
     await _doAllTrackerWork();
 
     var library = _getLibrary('package:test/test.dart');
-    _assertDeclaration(library, 'a', DeclarationKind.GETTER, returnType: 'int');
     _assertDeclaration(
-      library,
+      _getDeclaration(library.declarations, 'a'),
+      'a',
+      DeclarationKind.GETTER,
+      returnType: 'int',
+    );
+    _assertDeclaration(
+      _getDeclaration(library.declarations, 'b'),
       'b',
       DeclarationKind.GETTER,
       isDeprecated: true,
       returnType: 'int',
     );
     _assertDeclaration(
-      library,
+      _getDeclaration(library.declarations, 'c'),
       'c',
       DeclarationKind.GETTER,
       docSummary: 'aaa',
@@ -1088,7 +1562,7 @@
 
     var library = _getLibrary('package:test/test.dart');
     _assertDeclaration(
-      library,
+      _getDeclaration(library.declarations, 'A'),
       'A',
       DeclarationKind.CLASS,
       relevanceTags: ['package:test/test.dart::A'],
@@ -1107,7 +1581,7 @@
 
     var library = _getLibrary('package:test/test.dart');
     _assertDeclaration(
-      library,
+      _getDeclaration(library.declarations, 'A'),
       'A',
       DeclarationKind.CLASS,
       relevanceTags: ['package:test/test.dart::A'],
@@ -1132,9 +1606,15 @@
 
     await _doAllTrackerWork();
     _assertHasLibrary('package:test/test.dart', declarations: [
-      _ExpectedDeclaration.class_('A'),
-      _ExpectedDeclaration.class_('B'),
-      _ExpectedDeclaration.class_('C'),
+      _ExpectedDeclaration.class_('A', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('B', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('C', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
   }
 
@@ -1153,8 +1633,36 @@
 
     await _doAllTrackerWork();
     _assertHasLibrary('package:test/test.dart', declarations: [
-      _ExpectedDeclaration.class_('A'),
-      _ExpectedDeclaration.class_('B'),
+      _ExpectedDeclaration.class_('A', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('B', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+    ]);
+  }
+
+  test_library_publicOnly_enum() async {
+    newFile('/home/test/lib/a.dart', content: r'''
+part of 'test.dart';
+enum A {a, _a}
+enum _A {a, _a}
+''');
+    newFile('/home/test/lib/test.dart', content: r'''
+part 'a.dart';
+enum B {b, _b}
+enum _B {b, _b}
+''');
+    tracker.addContext(testAnalysisContext);
+
+    await _doAllTrackerWork();
+    _assertHasLibrary('package:test/test.dart', declarations: [
+      _ExpectedDeclaration.enum_('A', [
+        _ExpectedDeclaration.enumConstant('a'),
+      ]),
+      _ExpectedDeclaration.enum_('B', [
+        _ExpectedDeclaration.enumConstant('b'),
+      ]),
     ]);
   }
 
@@ -1171,7 +1679,7 @@
 
     var library = _getLibrary('package:test/test.dart');
     _assertDeclaration(
-      library,
+      _getDeclaration(library.declarations, 'A'),
       'A',
       DeclarationKind.CLASS,
       locationOffset: code.indexOf('A {}'),
@@ -1181,7 +1689,7 @@
       relevanceTags: ['package:test/test.dart::A'],
     );
     _assertDeclaration(
-      library,
+      _getDeclaration(library.declarations, 'B'),
       'B',
       DeclarationKind.CLASS,
       locationOffset: code.indexOf('B {}'),
@@ -1211,20 +1719,20 @@
 
     var library = _getLibrary('package:test/test.dart');
     _assertDeclaration(
-      library,
+      _getDeclaration(library.declarations, 'A'),
       'A',
       DeclarationKind.MIXIN,
       relevanceTags: ['package:test/test.dart::A'],
     );
     _assertDeclaration(
-      library,
+      _getDeclaration(library.declarations, 'B'),
       'B',
       DeclarationKind.MIXIN,
       isDeprecated: true,
       relevanceTags: ['package:test/test.dart::B'],
     );
     _assertDeclaration(
-      library,
+      _getDeclaration(library.declarations, 'C'),
       'C',
       DeclarationKind.MIXIN,
       docSummary: 'aaa',
@@ -1251,7 +1759,7 @@
 
     var library = _getLibrary('package:test/test.dart');
     _assertDeclaration(
-      library,
+      _getDeclaration(library.declarations, 'a'),
       'a',
       DeclarationKind.SETTER,
       parameters: '(int value)',
@@ -1260,7 +1768,7 @@
       requiredParameterCount: 1,
     );
     _assertDeclaration(
-      library,
+      _getDeclaration(library.declarations, 'b'),
       'b',
       DeclarationKind.SETTER,
       isDeprecated: true,
@@ -1270,7 +1778,7 @@
       requiredParameterCount: 1,
     );
     _assertDeclaration(
-      library,
+      _getDeclaration(library.declarations, 'c'),
       'c',
       DeclarationKind.SETTER,
       docSummary: 'aaa',
@@ -1303,18 +1811,43 @@
     await _doAllTrackerWork();
 
     var library = _getLibrary('package:test/test.dart');
-    _assertDeclaration(library, 'a', DeclarationKind.VARIABLE,
-        returnType: 'int');
-    _assertDeclaration(library, 'b', DeclarationKind.VARIABLE,
-        isDeprecated: true, returnType: 'int');
-    _assertDeclaration(library, 'c', DeclarationKind.VARIABLE,
-        docSummary: 'aaa', docComplete: 'aaa\n\nbbb bbb', returnType: 'int');
-    _assertDeclaration(library, 'd', DeclarationKind.VARIABLE,
-        isConst: true, relevanceTags: ['dart:core::int'], returnType: '');
-    _assertDeclaration(library, 'e', DeclarationKind.VARIABLE,
-        isFinal: true,
-        relevanceTags: ['dart:core::double'],
-        returnType: 'double');
+    _assertDeclaration(
+      _getDeclaration(library.declarations, 'a'),
+      'a',
+      DeclarationKind.VARIABLE,
+      returnType: 'int',
+    );
+    _assertDeclaration(
+      _getDeclaration(library.declarations, 'b'),
+      'b',
+      DeclarationKind.VARIABLE,
+      isDeprecated: true,
+      returnType: 'int',
+    );
+    _assertDeclaration(
+      _getDeclaration(library.declarations, 'c'),
+      'c',
+      DeclarationKind.VARIABLE,
+      docSummary: 'aaa',
+      docComplete: 'aaa\n\nbbb bbb',
+      returnType: 'int',
+    );
+    _assertDeclaration(
+      _getDeclaration(library.declarations, 'd'),
+      'd',
+      DeclarationKind.VARIABLE,
+      isConst: true,
+      relevanceTags: ['dart:core::int'],
+      returnType: '',
+    );
+    _assertDeclaration(
+      _getDeclaration(library.declarations, 'e'),
+      'e',
+      DeclarationKind.VARIABLE,
+      isFinal: true,
+      relevanceTags: ['dart:core::double'],
+      returnType: 'double',
+    );
   }
 }
 
@@ -1334,9 +1867,15 @@
 
     await _doAllTrackerWork();
     _assertHasLibrary('package:test/test.dart', declarations: [
-      _ExpectedDeclaration.class_('A'),
-      _ExpectedDeclaration.class_('C'),
-      _ExpectedDeclaration.class_('D'),
+      _ExpectedDeclaration.class_('A', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('C', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('D', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
   }
 
@@ -1354,8 +1893,12 @@
 
     await _doAllTrackerWork();
     _assertHasLibrary('package:test/test.dart', declarations: [
-      _ExpectedDeclaration.class_('B'),
-      _ExpectedDeclaration.class_('D'),
+      _ExpectedDeclaration.class_('B', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('D', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
   }
 
@@ -1371,8 +1914,9 @@
 
     await _doAllTrackerWork();
     _assertHasLibrary('package:test/test.dart', declarations: [
-      _ExpectedDeclaration.enum_('E1'),
-      _ExpectedDeclaration.enumConstant('a', 'E1'),
+      _ExpectedDeclaration.enum_('E1', [
+        _ExpectedDeclaration.enumConstant('a'),
+      ]),
     ]);
   }
 
@@ -1394,19 +1938,33 @@
     await _doAllTrackerWork();
 
     _assertHasLibrary('package:test/a.dart', declarations: [
-      _ExpectedDeclaration.class_('A'),
-      _ExpectedDeclaration.class_('B'),
+      _ExpectedDeclaration.class_('A', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('B', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
 
     _assertHasLibrary('package:test/b.dart', declarations: [
-      _ExpectedDeclaration.class_('A'),
-      _ExpectedDeclaration.class_('B'),
+      _ExpectedDeclaration.class_('A', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('B', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
 
     _assertHasLibrary('package:test/test.dart', declarations: [
-      _ExpectedDeclaration.class_('A'),
-      _ExpectedDeclaration.class_('B'),
-      _ExpectedDeclaration.class_('C'),
+      _ExpectedDeclaration.class_('A', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('B', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('C', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
   }
 
@@ -1419,12 +1977,14 @@
 
     await _doAllTrackerWork();
     _assertHasLibrary('package:test/test.dart', declarations: [
-      _ExpectedDeclaration.enum_('E1'),
-      _ExpectedDeclaration.enumConstant('a', 'E1'),
-      _ExpectedDeclaration.enumConstant('b', 'E1'),
-      _ExpectedDeclaration.enum_('E2'),
-      _ExpectedDeclaration.enumConstant('a', 'E2'),
-      _ExpectedDeclaration.enumConstant('b', 'E2'),
+      _ExpectedDeclaration.enum_('E1', [
+        _ExpectedDeclaration.enumConstant('a'),
+        _ExpectedDeclaration.enumConstant('b'),
+      ]),
+      _ExpectedDeclaration.enum_('E2', [
+        _ExpectedDeclaration.enumConstant('a'),
+        _ExpectedDeclaration.enumConstant('b'),
+      ]),
     ]);
   }
 
@@ -1437,7 +1997,9 @@
 
     await _doAllTrackerWork();
     _assertHasLibrary('package:test/test.dart', declarations: [
-      _ExpectedDeclaration.class_('C'),
+      _ExpectedDeclaration.class_('C', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
   }
 
@@ -1458,18 +2020,30 @@
     await _doAllTrackerWork();
 
     _assertHasLibrary('package:test/a.dart', declarations: [
-      _ExpectedDeclaration.class_('A'),
+      _ExpectedDeclaration.class_('A', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
 
     _assertHasLibrary('package:test/b.dart', declarations: [
-      _ExpectedDeclaration.class_('A'),
-      _ExpectedDeclaration.class_('B'),
+      _ExpectedDeclaration.class_('A', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('B', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
 
     _assertHasLibrary('package:test/test.dart', declarations: [
-      _ExpectedDeclaration.class_('A'),
-      _ExpectedDeclaration.class_('B'),
-      _ExpectedDeclaration.class_('C'),
+      _ExpectedDeclaration.class_('A', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('B', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('C', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
   }
 
@@ -1487,7 +2061,9 @@
 
     await _doAllTrackerWork();
     _assertHasLibrary('package:test/test.dart', declarations: [
-      _ExpectedDeclaration.class_('A'),
+      _ExpectedDeclaration.class_('A', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
       _ExpectedDeclaration.mixin('B'),
     ]);
   }
@@ -1505,9 +2081,15 @@
 
     await _doAllTrackerWork();
     _assertHasLibrary('package:test/test.dart', declarations: [
-      _ExpectedDeclaration.class_('A'),
-      _ExpectedDeclaration.class_('B'),
-      _ExpectedDeclaration.class_('C'),
+      _ExpectedDeclaration.class_('A', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('B', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('C', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
   }
 }
@@ -1565,28 +2147,38 @@
     await _doAllTrackerWork();
 
     _assertHasLibrary('package:aaa/a.dart', declarations: [
-      _ExpectedDeclaration.class_('A'),
+      _ExpectedDeclaration.class_('A', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasNoLibrary('package:aaa/src/a2.dart');
 
     _assertHasLibrary('package:bbb/b.dart', declarations: [
-      _ExpectedDeclaration.class_('B'),
+      _ExpectedDeclaration.class_('B', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasNoLibrary('package:bbb/src/b2.dart');
 
     _assertHasLibrary('package:material_button/button.dart', declarations: [
-      _ExpectedDeclaration.class_('MaterialButton'),
+      _ExpectedDeclaration.class_('MaterialButton', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasLibrary(
       toUriStr('/home/material_button/test/button_test.dart'),
       declarations: [
-        _ExpectedDeclaration.class_('MaterialButtonTest'),
+        _ExpectedDeclaration.class_('MaterialButtonTest', [
+          _ExpectedDeclaration.constructor(''),
+        ]),
       ],
     );
     _assertHasLibrary(
       'package:material_button_testing/material_button_po.dart',
       declarations: [
-        _ExpectedDeclaration.class_('MaterialButtonPO'),
+        _ExpectedDeclaration.class_('MaterialButtonPO', [
+          _ExpectedDeclaration.constructor(''),
+        ]),
       ],
     );
 
@@ -1754,29 +2346,41 @@
     await _doAllTrackerWork();
 
     _assertHasLibrary('package:aaa/a.dart', declarations: [
-      _ExpectedDeclaration.class_('A'),
+      _ExpectedDeclaration.class_('A', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasNoLibrary('package:aaa/src/a2.dart');
 
     _assertHasLibrary('package:bbb/b.dart', declarations: [
-      _ExpectedDeclaration.class_('B'),
+      _ExpectedDeclaration.class_('B', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasNoLibrary('package:bbb/src/b2.dart');
 
     _assertHasLibrary('package:ccc/c.dart', declarations: [
-      _ExpectedDeclaration.class_('C'),
+      _ExpectedDeclaration.class_('C', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasNoLibrary('package:ccc/src/c2.dart');
 
     _assertHasLibrary('package:test/t.dart', declarations: [
-      _ExpectedDeclaration.class_('T'),
+      _ExpectedDeclaration.class_('T', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasLibrary('package:test/src/t2.dart', declarations: [
-      _ExpectedDeclaration.class_('T2'),
+      _ExpectedDeclaration.class_('T2', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
 
     _assertHasLibrary('package:basic/s.dart', declarations: [
-      _ExpectedDeclaration.class_('S'),
+      _ExpectedDeclaration.class_('S', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
 
     {
@@ -1929,23 +2533,35 @@
     await _doAllTrackerWork();
 
     _assertHasLibrary('package:aaa/a.dart', declarations: [
-      _ExpectedDeclaration.class_('A1'),
-      _ExpectedDeclaration.class_('A2'),
+      _ExpectedDeclaration.class_('A1', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
+      _ExpectedDeclaration.class_('A2', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasNoLibrary('package:aaa/src/a2.dart');
     _assertHasLibrary('package:bbb/b.dart', declarations: [
-      _ExpectedDeclaration.class_('B'),
+      _ExpectedDeclaration.class_('B', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasLibrary('package:test/t.dart', declarations: [
-      _ExpectedDeclaration.class_('T'),
+      _ExpectedDeclaration.class_('T', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasLibrary('package:test/src/t2.dart', declarations: [
-      _ExpectedDeclaration.class_('T2'),
+      _ExpectedDeclaration.class_('T2', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasLibrary(
       toUriStr('/home/test/test/t3.dart'),
       declarations: [
-        _ExpectedDeclaration.class_('T3'),
+        _ExpectedDeclaration.class_('T3', [
+          _ExpectedDeclaration.constructor(''),
+        ]),
       ],
     );
 
@@ -2021,7 +2637,9 @@
     await _doAllTrackerWork();
 
     _assertHasLibrary(aUri, declarations: [
-      _ExpectedDeclaration.class_('A'),
+      _ExpectedDeclaration.class_('A', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasNoLibrary(bUri);
 
@@ -2042,10 +2660,14 @@
     await _doAllTrackerWork();
 
     _assertHasLibrary(aUri, declarations: [
-      _ExpectedDeclaration.class_('A'),
+      _ExpectedDeclaration.class_('A', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
     _assertHasLibrary(bUri, declarations: [
-      _ExpectedDeclaration.class_('B'),
+      _ExpectedDeclaration.class_('B', [
+        _ExpectedDeclaration.constructor(''),
+      ]),
     ]);
 
     // The package can see package:bbb, but not package:aaa
@@ -2093,9 +2715,11 @@
   }
 
   void _assertDeclaration(
-    Library library,
+    Declaration declaration,
     String name,
     DeclarationKind kind, {
+    String defaultArgumentListString,
+    List<int> defaultArgumentListTextRanges,
     String docComplete,
     String docSummary,
     bool isAbstract = false,
@@ -2106,7 +2730,6 @@
     String locationPath,
     int locationStartColumn,
     int locationStartLine,
-    String name2,
     String parameters,
     List<String> parameterNames,
     List<String> parameterTypes,
@@ -2115,11 +2738,14 @@
     String returnType,
     String typeParameters,
   }) {
-    var declaration = _getDeclaration(library, name);
+    expect(declaration.defaultArgumentListString, defaultArgumentListString);
+    expect(
+      declaration.defaultArgumentListTextRanges,
+      defaultArgumentListTextRanges,
+    );
     expect(declaration.docComplete, docComplete);
     expect(declaration.docSummary, docSummary);
     expect(declaration.name, name);
-    expect(declaration.name2, name2);
     expect(declaration.kind, kind);
     expect(declaration.isAbstract, isAbstract);
     expect(declaration.isConst, isConst);
@@ -2140,16 +2766,20 @@
     }
   }
 
-  void _assertHasDeclaration(Library library, _ExpectedDeclaration expected) {
-    expect(
-      library.declarations,
-      contains(predicate((Declaration d) {
-        return d.name == expected.name &&
-            d.name2 == expected.name2 &&
-            d.kind == expected.kind;
-      })),
-      reason: '$expected',
-    );
+  void _assertHasDeclaration(
+      List<Declaration> declarations, _ExpectedDeclaration expected) {
+    var matching = declarations.where((d) {
+      return d.name == expected.name && d.kind == expected.kind;
+    }).toList();
+    if (matching.length != 1) {
+      fail('Expected $expected in\n${declarations.join('\n')}');
+    }
+
+    var actual = matching.single;
+    expect(actual.children, hasLength(expected.children.length));
+    for (var expectedChild in expected.children) {
+      _assertHasDeclaration(actual.children, expectedChild);
+    }
   }
 
   /// Assert that the current state has the library with the given [uri].
@@ -2163,7 +2793,7 @@
     if (declarations != null) {
       expect(library.declarations, hasLength(declarations.length));
       for (var expected in declarations) {
-        _assertHasDeclaration(library, expected);
+        _assertHasDeclaration(library.declarations, expected);
       }
     }
   }
@@ -2172,6 +2802,13 @@
     expect(uriToLibrary, isNot(contains(uri)));
   }
 
+  void _assertNoDeclaration(Library library, String name) {
+    expect(
+      library.declarations.where((declaration) => declaration.name == name),
+      isEmpty,
+    );
+  }
+
   void _createTracker() {
     uriToLibrary.clear();
 
@@ -2198,9 +2835,8 @@
     await pumpEventQueue();
   }
 
-  Declaration _getDeclaration(Library library, String name) {
-    return library.declarations
-        .singleWhere((declaration) => declaration.name == name);
+  Declaration _getDeclaration(List<Declaration> declarations, String name) {
+    return declarations.singleWhere((declaration) => declaration.name == name);
   }
 
   Library _getLibrary(String uriStr) {
@@ -2213,40 +2849,38 @@
 class _ExpectedDeclaration {
   final DeclarationKind kind;
   final String name;
-  final String name2;
+  final List<_ExpectedDeclaration> children;
 
-  _ExpectedDeclaration(this.kind, this.name, this.name2);
+  _ExpectedDeclaration(this.kind, this.name, {this.children: const []});
 
-  _ExpectedDeclaration.class_(String name)
-      : this(DeclarationKind.CLASS, name, null);
+  _ExpectedDeclaration.class_(String name, List<_ExpectedDeclaration> children)
+      : this(DeclarationKind.CLASS, name, children: children);
 
   _ExpectedDeclaration.classTypeAlias(String name)
-      : this(DeclarationKind.CLASS_TYPE_ALIAS, name, null);
+      : this(DeclarationKind.CLASS_TYPE_ALIAS, name);
 
-  _ExpectedDeclaration.enum_(String name)
-      : this(DeclarationKind.ENUM, name, null);
+  _ExpectedDeclaration.constructor(String name)
+      : this(DeclarationKind.CONSTRUCTOR, name);
 
-  _ExpectedDeclaration.enumConstant(String name, String name2)
-      : this(DeclarationKind.ENUM_CONSTANT, name, name2);
+  _ExpectedDeclaration.enum_(String name, List<_ExpectedDeclaration> children)
+      : this(DeclarationKind.ENUM, name, children: children);
+
+  _ExpectedDeclaration.enumConstant(String name)
+      : this(DeclarationKind.ENUM_CONSTANT, name);
 
   _ExpectedDeclaration.function(String name)
-      : this(DeclarationKind.FUNCTION, name, null);
+      : this(DeclarationKind.FUNCTION, name);
 
   _ExpectedDeclaration.functionTypeAlias(String name)
-      : this(DeclarationKind.FUNCTION_TYPE_ALIAS, name, null);
+      : this(DeclarationKind.FUNCTION_TYPE_ALIAS, name);
 
-  _ExpectedDeclaration.mixin(String name)
-      : this(DeclarationKind.MIXIN, name, null);
+  _ExpectedDeclaration.mixin(String name) : this(DeclarationKind.MIXIN, name);
 
   _ExpectedDeclaration.variable(String name)
-      : this(DeclarationKind.VARIABLE, name, null);
+      : this(DeclarationKind.VARIABLE, name);
 
   @override
   String toString() {
-    if (name2 != null) {
-      return '($kind, $name, $name2)';
-    } else {
-      return '($kind, $name)';
-    }
+    return '($kind, $name)';
   }
 }
diff --git a/pkg/analyzer/test/src/services/test_all.dart b/pkg/analyzer/test/src/services/test_all.dart
new file mode 100644
index 0000000..95e0ef4
--- /dev/null
+++ b/pkg/analyzer/test/src/services/test_all.dart
@@ -0,0 +1,13 @@
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'available_declarations_test.dart' as available_declarations;
+
+main() {
+  defineReflectiveSuite(() {
+    available_declarations.main();
+  }, name: 'services');
+}
diff --git a/pkg/analyzer/test/src/summary/api_signature_test.dart b/pkg/analyzer/test/src/summary/api_signature_test.dart
index 348d091..b302076 100644
--- a/pkg/analyzer/test/src/summary/api_signature_test.dart
+++ b/pkg/analyzer/test/src/summary/api_signature_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/summary/dependency_walker_test.dart b/pkg/analyzer/test/src/summary/dependency_walker_test.dart
index 15a7306..1e4e9dc 100644
--- a/pkg/analyzer/test/src/summary/dependency_walker_test.dart
+++ b/pkg/analyzer/test/src/summary/dependency_walker_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/summary/element_text.dart b/pkg/analyzer/test/src/summary/element_text.dart
index 2870078..61c752d 100644
--- a/pkg/analyzer/test/src/summary/element_text.dart
+++ b/pkg/analyzer/test/src/summary/element_text.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -55,15 +55,19 @@
 void checkElementText(LibraryElement library, String expected,
     {bool withCodeRanges: false,
     bool withConstElements: true,
+    bool withExportScope: false,
     bool withOffsets: false,
     bool withSyntheticAccessors: false,
-    bool withSyntheticFields: false}) {
+    bool withSyntheticFields: false,
+    bool withTypes: false}) {
   var writer = new _ElementWriter(
       withCodeRanges: withCodeRanges,
       withConstElements: withConstElements,
+      withExportScope: withExportScope,
       withOffsets: withOffsets,
       withSyntheticAccessors: withSyntheticAccessors,
-      withSyntheticFields: withSyntheticFields);
+      withSyntheticFields: withSyntheticFields,
+      withTypes: withTypes);
   writer.writeLibraryElement(library);
 
   String actualText = writer.buffer.toString();
@@ -125,18 +129,22 @@
  */
 class _ElementWriter {
   final bool withCodeRanges;
+  final bool withExportScope;
   final bool withOffsets;
   final bool withConstElements;
   final bool withSyntheticAccessors;
   final bool withSyntheticFields;
+  final bool withTypes;
   final StringBuffer buffer = new StringBuffer();
 
   _ElementWriter(
       {this.withCodeRanges,
       this.withConstElements: true,
+      this.withExportScope: false,
       this.withOffsets: false,
       this.withSyntheticAccessors: false,
-      this.withSyntheticFields: false});
+      this.withSyntheticFields: false,
+      this.withTypes: false});
 
   bool isDynamicType(DartType type) => type is DynamicTypeImpl;
 
@@ -272,7 +280,7 @@
 
     if (e is ConstructorElementImpl) {
       if (e.constantInitializers != null) {
-        writeList(' : ', '', e.constantInitializers, ', ', writeExpression);
+        writeList(' : ', '', e.constantInitializers, ', ', writeNode);
       }
     }
 
@@ -303,189 +311,6 @@
     buffer.writeln(';');
   }
 
-  void writeExpression(AstNode e, [Expression enclosing]) {
-    bool needsParenthesis = e is Expression &&
-        enclosing != null &&
-        e.precedence < enclosing.precedence;
-
-    if (needsParenthesis) {
-      buffer.write('(');
-    }
-
-    if (e == null) {
-      buffer.write('<null>');
-    } else if (e is SimpleIdentifier && e.name == '#invalidConst') {
-      buffer.write('#invalidConst');
-    } else if (e is Annotation) {
-      buffer.write('@');
-      writeExpression(e.name);
-      if (e.constructorName != null) {
-        buffer.write('.');
-        writeExpression(e.constructorName);
-      }
-      if (e.arguments != null) {
-        writeList('(', ')', e.arguments.arguments, ', ', writeExpression,
-            includeEmpty: true);
-      }
-    } else if (e is AssertInitializer) {
-      buffer.write('assert(');
-      writeExpression(e.condition);
-      if (e.message != null) {
-        buffer.write(', ');
-        writeExpression(e.message);
-      }
-      buffer.write(')');
-    } else if (e is BinaryExpression) {
-      writeExpression(e.leftOperand, e);
-      buffer.write(' ');
-      buffer.write(e.operator.lexeme);
-      buffer.write(' ');
-      writeExpression(e.rightOperand, e);
-    } else if (e is BooleanLiteral) {
-      buffer.write(e.value);
-    } else if (e is ConditionalExpression) {
-      writeExpression(e.condition);
-      buffer.write(' ? ');
-      writeExpression(e.thenExpression);
-      buffer.write(' : ');
-      writeExpression(e.elseExpression);
-    } else if (e is ConstructorFieldInitializer) {
-      writeExpression(e.fieldName);
-      buffer.write(' = ');
-      writeExpression(e.expression);
-    } else if (e is ConstructorName) {
-      writeExpression(e.type);
-      if (e.name != null) {
-        buffer.write('.');
-        writeExpression(e.name);
-      }
-    } else if (e is DoubleLiteral) {
-      buffer.write(e.value);
-    } else if (e is InstanceCreationExpression) {
-      if (e.keyword != null) {
-        buffer.write(e.keyword.lexeme);
-        buffer.write(' ');
-      }
-      writeExpression(e.constructorName);
-      writeList('(', ')', e.argumentList.arguments, ', ', writeExpression,
-          includeEmpty: true);
-    } else if (e is IntegerLiteral) {
-      buffer.write(e.value);
-    } else if (e is InterpolationExpression) {
-      buffer.write(r'${');
-      writeExpression(e.expression);
-      buffer.write(r'}');
-    } else if (e is InterpolationString) {
-      buffer.write(e.value.replaceAll("'", r"\'"));
-    } else if (e is ListLiteral) {
-      if (e.constKeyword != null) {
-        buffer.write('const ');
-      }
-      if (e.typeArguments != null) {
-        writeList('<', '>', e.typeArguments.arguments, ', ', writeExpression);
-      }
-      writeList('[', ']', e.elements, ', ', writeExpression,
-          includeEmpty: true);
-    } else if (e is Label) {
-      writeExpression(e.label);
-      buffer.write(': ');
-    } else if (e is MapLiteral) {
-      if (e.constKeyword != null) {
-        buffer.write('const ');
-      }
-      if (e.typeArguments != null) {
-        writeList('<', '>', e.typeArguments.arguments, ', ', writeExpression);
-      }
-      writeList('{', '}', e.entries, ', ', writeExpression, includeEmpty: true);
-    } else if (e is MapLiteralEntry) {
-      writeExpression(e.key);
-      buffer.write(': ');
-      writeExpression(e.value);
-    } else if (e is MethodInvocation) {
-      if (e.target != null) {
-        writeExpression(e.target);
-        buffer.write(e.operator);
-      }
-      writeExpression(e.methodName);
-      if (e.typeArguments != null) {
-        writeList('<', '>', e.typeArguments.arguments, ', ', writeExpression);
-      }
-      writeList('(', ')', e.argumentList.arguments, ', ', writeExpression,
-          includeEmpty: true);
-    } else if (e is NamedExpression) {
-      writeExpression(e.name);
-      buffer.write(e.expression);
-    } else if (e is NullLiteral) {
-      buffer.write('null');
-    } else if (e is PrefixExpression) {
-      buffer.write(e.operator.lexeme);
-      writeExpression(e.operand, e);
-    } else if (e is PrefixedIdentifier) {
-      writeExpression(e.prefix);
-      buffer.write('.');
-      writeExpression(e.identifier);
-    } else if (e is PropertyAccess) {
-      writeExpression(e.target, e);
-      buffer.write('.');
-      writeExpression(e.propertyName);
-    } else if (e is RedirectingConstructorInvocation) {
-      buffer.write('this');
-      if (e.constructorName != null) {
-        buffer.write('.');
-        writeExpression(e.constructorName);
-      }
-      writeList('(', ')', e.argumentList.arguments, ', ', writeExpression,
-          includeEmpty: true);
-    } else if (e is SimpleIdentifier) {
-      if (withConstElements) {
-        buffer.writeln();
-        buffer.write('  ' * 4);
-        buffer.write(e.name);
-        buffer.write('/*');
-        buffer.write('location: ');
-        buffer.write(_getElementLocationString(e.staticElement));
-        buffer.write('*/');
-      } else {
-        buffer.write(e.name);
-      }
-    } else if (e is SimpleStringLiteral) {
-      buffer.write("'");
-      buffer.write(e.value.replaceAll("'", r"\'"));
-      buffer.write("'");
-    } else if (e is StringInterpolation) {
-      buffer.write("'");
-      e.elements.forEach(writeExpression);
-      buffer.write("'");
-    } else if (e is SuperConstructorInvocation) {
-      buffer.write('super');
-      if (e.constructorName != null) {
-        buffer.write('.');
-        writeExpression(e.constructorName);
-      }
-      writeList('(', ')', e.argumentList.arguments, ', ', writeExpression,
-          includeEmpty: true);
-    } else if (e is SuperExpression) {
-      buffer.write('super');
-    } else if (e is SymbolLiteral) {
-      buffer.write('#');
-      writeList('', '', e.components, '.',
-          (Token token) => buffer.write(token.lexeme));
-    } else if (e is ThisExpression) {
-      buffer.write('this');
-    } else if (e is TypeName) {
-      writeExpression(e.name);
-      if (e.typeArguments != null) {
-        writeList('<', '>', e.typeArguments.arguments, ', ', writeExpression);
-      }
-    } else {
-      fail('Unsupported expression type: ${e.runtimeType}');
-    }
-
-    if (needsParenthesis) {
-      buffer.write(')');
-    }
-  }
-
   void writeFunctionElement(FunctionElement e) {
     writeDocumentation(e);
     writeMetadata(e, '', '\n');
@@ -562,6 +387,11 @@
     }
   }
 
+  void writeInterfaceTypeArgsComment(Expression e) {
+    var typeArguments = (e.staticType as InterfaceType).typeArguments;
+    writeList('/*typeArgs=', '*/', typeArguments, ',', writeType);
+  }
+
   void writeLibraryElement(LibraryElement e) {
     if (e.documentationComment != null) {
       buffer.writeln(e.documentationComment);
@@ -579,6 +409,8 @@
     e.parts.forEach(writePartElement);
 
     e.units.forEach(writeUnitElement);
+
+    writeExportScope(e);
   }
 
   void writeList<T>(String open, String close, List<T> items, String separator,
@@ -602,7 +434,7 @@
   void writeMetadata(Element e, String prefix, String separator) {
     if (e.metadata.isNotEmpty) {
       writeList(prefix, '', e.metadata, '$separator$prefix', (a) {
-        writeExpression((a as ElementAnnotationImpl).annotationAst);
+        writeNode((a as ElementAnnotationImpl).annotationAst);
       });
       buffer.write(separator);
     }
@@ -652,6 +484,223 @@
     }
   }
 
+  void writeNode(AstNode e, [Expression enclosing]) {
+    bool needsParenthesis = e is Expression &&
+        enclosing != null &&
+        e.precedence < enclosing.precedence;
+
+    if (needsParenthesis) {
+      buffer.write('(');
+    }
+
+    if (e == null) {
+      buffer.write('<null>');
+    } else if (e is SimpleIdentifier && e.name == '#invalidConst') {
+      buffer.write('#invalidConst');
+    } else if (e is AdjacentStrings) {
+      writeList("'", "'", e.strings, '',
+          (StringLiteral s) => buffer.write(s.stringValue),
+          includeEmpty: true);
+    } else if (e is Annotation) {
+      buffer.write('@');
+      writeNode(e.name);
+      if (e.constructorName != null) {
+        buffer.write('.');
+        writeNode(e.constructorName);
+      }
+      if (e.arguments != null) {
+        writeList('(', ')', e.arguments.arguments, ', ', writeNode,
+            includeEmpty: true);
+      }
+    } else if (e is AssertInitializer) {
+      buffer.write('assert(');
+      writeNode(e.condition);
+      if (e.message != null) {
+        buffer.write(', ');
+        writeNode(e.message);
+      }
+      buffer.write(')');
+    } else if (e is BinaryExpression) {
+      writeNode(e.leftOperand, e);
+      buffer.write(' ');
+      buffer.write(e.operator.lexeme);
+      buffer.write(' ');
+      writeNode(e.rightOperand, e);
+    } else if (e is BooleanLiteral) {
+      buffer.write(e.value);
+    } else if (e is ConditionalExpression) {
+      writeNode(e.condition);
+      buffer.write(' ? ');
+      writeNode(e.thenExpression);
+      buffer.write(' : ');
+      writeNode(e.elseExpression);
+    } else if (e is ConstructorFieldInitializer) {
+      writeNode(e.fieldName);
+      buffer.write(' = ');
+      writeNode(e.expression);
+    } else if (e is ConstructorName) {
+      writeNode(e.type);
+      if (e.name != null) {
+        buffer.write('.');
+        writeNode(e.name);
+      }
+    } else if (e is DoubleLiteral) {
+      buffer.write(e.value);
+    } else if (e is InstanceCreationExpression) {
+      if (e.keyword != null) {
+        buffer.write(e.keyword.lexeme);
+        buffer.write(' ');
+      }
+      if (withTypes && e.constructorName.type.typeArguments == null) {
+        writeInterfaceTypeArgsComment(e);
+      }
+      writeNode(e.constructorName);
+      writeList('(', ')', e.argumentList.arguments, ', ', writeNode,
+          includeEmpty: true);
+    } else if (e is IntegerLiteral) {
+      buffer.write(e.value);
+    } else if (e is InterpolationExpression) {
+      buffer.write(r'${');
+      writeNode(e.expression);
+      buffer.write(r'}');
+    } else if (e is InterpolationString) {
+      buffer.write(e.value.replaceAll("'", r"\'"));
+    } else if (e is ListLiteral) {
+      if (e.constKeyword != null) {
+        buffer.write('const ');
+      }
+      if (e.typeArguments != null) {
+        writeList('<', '>', e.typeArguments.arguments, ', ', writeNode);
+      } else if (withTypes) {
+        writeInterfaceTypeArgsComment(e);
+      }
+      writeList('[', ']', e.elements, ', ', writeNode, includeEmpty: true);
+    } else if (e is Label) {
+      writeNode(e.label);
+      buffer.write(': ');
+    } else if (e is SetOrMapLiteral) {
+      if (e.constKeyword != null) {
+        buffer.write('const ');
+      }
+      if (e.typeArguments != null) {
+        writeList('<', '>', e.typeArguments.arguments, ', ', writeNode);
+      } else if (withTypes) {
+        writeInterfaceTypeArgsComment(e);
+      }
+      writeList('{', '}', e.elements, ', ', writeNode, includeEmpty: true);
+      if (e.isMap) {
+        buffer.write('/*isMap*/');
+      }
+      if (e.isSet) {
+        buffer.write('/*isSet*/');
+      }
+    } else if (e is MapLiteralEntry) {
+      writeNode(e.key);
+      buffer.write(': ');
+      writeNode(e.value);
+    } else if (e is MethodInvocation) {
+      if (e.target != null) {
+        writeNode(e.target);
+        buffer.write(e.operator);
+      }
+      writeNode(e.methodName);
+      if (e.typeArguments != null) {
+        writeList('<', '>', e.typeArguments.arguments, ', ', writeNode);
+      }
+      writeList('(', ')', e.argumentList.arguments, ', ', writeNode,
+          includeEmpty: true);
+    } else if (e is NamedExpression) {
+      writeNode(e.name);
+      buffer.write(e.expression);
+    } else if (e is NullLiteral) {
+      buffer.write('null');
+    } else if (e is ParenthesizedExpression) {
+      writeNode(e.expression, e);
+    } else if (e is PrefixExpression) {
+      buffer.write(e.operator.lexeme);
+      writeNode(e.operand, e);
+    } else if (e is PrefixedIdentifier) {
+      writeNode(e.prefix);
+      buffer.write('.');
+      writeNode(e.identifier);
+    } else if (e is PropertyAccess) {
+      writeNode(e.target, e);
+      buffer.write('.');
+      writeNode(e.propertyName);
+    } else if (e is RedirectingConstructorInvocation) {
+      buffer.write('this');
+      if (e.constructorName != null) {
+        buffer.write('.');
+        writeNode(e.constructorName);
+      }
+      writeList('(', ')', e.argumentList.arguments, ', ', writeNode,
+          includeEmpty: true);
+    } else if (e is SimpleIdentifier) {
+      if (withConstElements) {
+        buffer.writeln();
+        buffer.write('  ' * 4);
+        buffer.write(e.name);
+        buffer.write('/*');
+        buffer.write('location: ');
+        buffer.write(_getElementLocationString(e.staticElement));
+        buffer.write('*/');
+      } else {
+        buffer.write(e.name);
+      }
+    } else if (e is SimpleStringLiteral) {
+      buffer.write("'");
+      buffer.write(e.value.replaceAll("'", r"\'"));
+      buffer.write("'");
+    } else if (e is StringInterpolation) {
+      buffer.write("'");
+      e.elements.forEach(writeNode);
+      buffer.write("'");
+    } else if (e is SuperConstructorInvocation) {
+      buffer.write('super');
+      if (e.constructorName != null) {
+        buffer.write('.');
+        writeNode(e.constructorName);
+      }
+      writeList('(', ')', e.argumentList.arguments, ', ', writeNode,
+          includeEmpty: true);
+    } else if (e is SuperExpression) {
+      buffer.write('super');
+    } else if (e is SymbolLiteral) {
+      buffer.write('#');
+      writeList('', '', e.components, '.',
+          (Token token) => buffer.write(token.lexeme));
+    } else if (e is ThisExpression) {
+      buffer.write('this');
+    } else if (e is ThrowExpression) {
+      buffer.write('throw ');
+      writeNode(e.expression);
+    } else if (e is TypeName) {
+      writeNode(e.name);
+      if (e.typeArguments != null) {
+        writeList('<', '>', e.typeArguments.arguments, ', ', writeNode);
+      }
+    } else if (e is SpreadElement) {
+      buffer.write(e.spreadOperator.lexeme);
+      writeNode(e.expression);
+    } else if (e is IfElement) {
+      buffer.write('if (');
+      writeNode(e.condition);
+      buffer.write(') ');
+      writeNode(e.thenElement);
+      var elseElement = e.elseElement;
+      if (elseElement != null) {
+        buffer.write(' else ');
+        writeNode(elseElement);
+      }
+    } else {
+      fail('Unsupported expression type: ${e.runtimeType}');
+    }
+
+    if (needsParenthesis) {
+      buffer.write(')');
+    }
+  }
+
   void writeParameterElement(ParameterElement e) {
     String defaultValueSeparator;
     Expression defaultValue;
@@ -700,7 +749,7 @@
 
     if (defaultValue != null) {
       buffer.write(defaultValueSeparator);
-      writeExpression(defaultValue);
+      writeNode(defaultValue);
     }
 
     buffer.write(closeString);
@@ -801,16 +850,13 @@
 
     if (!e.isSynthetic) {
       expect(e.getter, isNotNull);
-      expect(e.getter.isSynthetic, isTrue);
-      expect(e.getter.variable, same(e));
-      expect(e.getter.enclosingElement, same(e.enclosingElement));
+      _assertSyntheticAccessorEnclosing(e, e.getter);
+
       if (e.isFinal || e.isConst) {
         expect(e.setter, isNull);
       } else {
         expect(e.setter, isNotNull);
-        expect(e.setter.isSynthetic, isTrue);
-        expect(e.setter.variable, same(e.getter.variable));
-        expect(e.setter.enclosingElement, same(e.enclosingElement));
+        _assertSyntheticAccessorEnclosing(e, e.getter);
       }
     }
 
@@ -841,7 +887,7 @@
       Expression initializer = (e as ConstVariableElement).constantInitializer;
       if (initializer != null) {
         buffer.write(' = ');
-        writeExpression(initializer);
+        writeNode(initializer);
       }
     }
 
@@ -870,6 +916,7 @@
 
   void writeTypeParameterElement(TypeParameterElement e) {
     writeName(e);
+    writeCodeRange(e);
     if (e.bound != null && !e.bound.isObject) {
       buffer.write(' extends ');
       writeType(e.bound);
@@ -895,6 +942,22 @@
     e.functions.forEach(writeFunctionElement);
   }
 
+  void writeExportScope(LibraryElement e) {
+    if (!withExportScope) return;
+
+    buffer.writeln();
+    buffer.writeln('-' * 20);
+    buffer.writeln('Exports:');
+
+    var map = e.exportNamespace.definedNames;
+    var names = map.keys.toList()..sort();
+    for (var name in names) {
+      var element = map[name];
+      var elementLocationStr = _getElementLocationString(element);
+      buffer.writeln('  $name: $elementLocationStr');
+    }
+  }
+
   void writeUri(Source source) {
     if (source != null) {
       Uri uri = source.uri;
@@ -921,6 +984,23 @@
     }
   }
 
+  /// Assert that the [accessor] of the [property] is correctly linked to
+  /// the same enclosing element as the [property].
+  void _assertSyntheticAccessorEnclosing(
+      PropertyInducingElement property, PropertyAccessorElement accessor) {
+    expect(accessor.isSynthetic, isTrue);
+    expect(accessor.variable, same(property));
+
+    var propertyEnclosing = property.enclosingElement;
+    expect(accessor.enclosingElement, same(propertyEnclosing));
+
+    if (propertyEnclosing is CompilationUnitElement) {
+      expect(propertyEnclosing.accessors, contains(accessor));
+    } else if (propertyEnclosing is ClassElement) {
+      expect(propertyEnclosing.accessors, contains(accessor));
+    }
+  }
+
   String _getElementLocationString(Element element) {
     if (element == null) {
       return 'null';
@@ -952,5 +1032,6 @@
   final int offset;
   final int end;
   final String text;
+
   _Replacement(this.offset, this.end, this.text);
 }
diff --git a/pkg/analyzer/test/src/summary/expr_builder_test.dart b/pkg/analyzer/test/src/summary/expr_builder_test.dart
index e655fec..d2c9611 100644
--- a/pkg/analyzer/test/src/summary/expr_builder_test.dart
+++ b/pkg/analyzer/test/src/summary/expr_builder_test.dart
@@ -5,10 +5,10 @@
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/error/listener.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/scanner/reader.dart';
 import 'package:analyzer/src/dart/scanner/scanner.dart';
-import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/parser.dart';
 import 'package:analyzer/src/string_source.dart';
 import 'package:analyzer/src/summary/expr_builder.dart';
@@ -24,134 +24,15 @@
 main() {
   defineReflectiveSuite(() {
     defineReflectiveTests(ExprBuilderTest);
+    defineReflectiveTests(ExprBuilderWithConstantUpdateTest);
     defineReflectiveTests(TokensToStringTest);
   });
 }
 
-/// TODO(paulberry): migrate this test away from the task model.
-/// See dartbug.com/35734.
 @reflectiveTest
 class ExprBuilderTest extends ResynthesizeTestStrategyTwoPhase
     with ExprBuilderTestCases, ExprBuilderTestHelpers {}
 
-@reflectiveTest
-class TokensToStringTest {
-  void test_empty_list_no_space() {
-    // This is an interesting test case because "[]" is scanned as a single
-    // token, but the parser splits it into two.
-    _check('[]');
-  }
-
-  void test_empty_list_with_space() {
-    _check('[ ]');
-  }
-
-  void test_gt_gt_gt_in_type() {
-    // This is an interesting test case because ">>>" is scanned as a single
-    // token, but the parser splits it into three.
-    _check('A<B<C>>>[]');
-  }
-
-  void test_gt_gt_gt_in_type_split_both() {
-    _check('A<B<C> > >[]');
-  }
-
-  void test_gt_gt_gt_in_type_split_left() {
-    _check('A<B<C> >>[]');
-  }
-
-  void test_gt_gt_gt_in_type_split_right() {
-    _check('A<B<C>> >[]');
-  }
-
-  void test_gt_gt_in_type() {
-    // This is an interesting test case because ">>" is scanned as a single
-    // token, but the parser splits it into two.
-    _check('<A<B>>[]');
-  }
-
-  void test_gt_gt_in_type_split() {
-    _check('A<B> >[]');
-  }
-
-  void test_identifier() {
-    _check('foo');
-  }
-
-  void test_interpolation_expr_at_end_of_string() {
-    _check(r'"foo${bar}"');
-  }
-
-  void test_interpolation_expr_at_start_of_string() {
-    _check(r'"${foo}bar"');
-  }
-
-  void test_interpolation_expr_inside_string() {
-    _check(r'"foo${bar}baz"');
-  }
-
-  void test_interpolation_var_at_end_of_string() {
-    _check(r'"foo$bar"');
-  }
-
-  void test_interpolation_var_at_start_of_string() {
-    _check(r'"$foo bar"');
-  }
-
-  void test_interpolation_var_inside_string() {
-    _check(r'"foo$bar baz"');
-  }
-
-  void test_simple_string() {
-    _check('"foo"');
-  }
-
-  void _check(String originalString) {
-    var expression = _parseExpression(originalString);
-    var originalTokens =
-        _extractTokenList(expression.beginToken, expression.endToken);
-    var newString = tokensToString(expression.beginToken, expression.endToken);
-    var errorListener = AnalysisErrorListener.NULL_LISTENER;
-    var reader = new CharSequenceReader(newString);
-    var stringSource = new StringSource(newString, null);
-    var scanner = new Scanner(stringSource, reader, errorListener);
-    var startToken = scanner.tokenize();
-    var newTokens = _extractTokenList(startToken);
-    expect(newTokens, originalTokens);
-  }
-
-  List<String> _extractTokenList(Token startToken, [Token endToken]) {
-    var result = <String>[];
-    while (!startToken.isEof) {
-      if (!startToken.isSynthetic) result.add(startToken.lexeme);
-      if (identical(startToken, endToken)) break;
-      startToken = startToken.next;
-    }
-    return result;
-  }
-
-  Expression _parseExpression(String expressionString) {
-    // Note: to normalize the token string it's not sufficient to tokenize it
-    // and then pass the tokens to `tokensToString`; we also need to parse it
-    // because parsing modifies the token stream (splitting up `[]`, `>>`, and
-    // `>>>` tokens when circumstances warrant).
-    //
-    // We wrap the expression in "f() async => ...;" to ensure that the await
-    // keyword is properly parsed.
-    var sourceText = 'f() async => $expressionString;';
-    var errorListener = AnalysisErrorListener.NULL_LISTENER;
-    var reader = new CharSequenceReader(sourceText);
-    var stringSource = new StringSource(sourceText, null);
-    var scanner = new Scanner(stringSource, reader, errorListener);
-    var startToken = scanner.tokenize();
-    var parser = new Parser(stringSource, errorListener);
-    var compilationUnit = parser.parseCompilationUnit(startToken);
-    var f = compilationUnit.declarations[0] as FunctionDeclaration;
-    var body = f.functionExpression.body as ExpressionFunctionBody;
-    return body.expression;
-  }
-}
-
 /// Mixin containing test cases exercising the [ExprBuilder].  Intended to be
 /// applied to a class implementing [ResynthesizeTestStrategy], along with the
 /// mixin [ExprBuilderTestHelpers].
@@ -414,16 +295,188 @@
     checkSimpleExpression('0 <= 1');
   }
 
+  void test_list_for() {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var sourceText = '[for (i = 0; i < 10; i++) i]';
+    // Resynthesis inserts synthetic "const" tokens; work around that.
+    var expectedText = 'const $sourceText';
+    checkSimpleExpression(sourceText,
+        expectedText: expectedText, extraDeclarations: 'int i;');
+  }
+
+  void test_list_for_each_with_declaration_typed() {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var sourceText = '[for (int i in const []) i]';
+    // Resynthesis inserts synthetic "const" tokens; work around that.
+    var expectedText = 'const $sourceText';
+    var list = checkSimpleExpression(sourceText, expectedText: expectedText)
+        as ListLiteral;
+    var forElement = list.elements[0] as ForElement;
+    var loopParts = forElement.forLoopParts as ForEachPartsWithDeclaration;
+    var iElement = loopParts.loopVariable.identifier.staticElement;
+    var iRef = forElement.body as SimpleIdentifier;
+    expect(iRef.staticElement, same(iElement));
+  }
+
+  void test_list_for_each_with_declaration_untyped() {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var sourceText = '[for (var i in const []) i]';
+    // Resynthesis inserts synthetic "const" tokens; work around that.
+    var expectedText = 'const $sourceText';
+    var list = checkSimpleExpression(sourceText, expectedText: expectedText)
+        as ListLiteral;
+    var forElement = list.elements[0] as ForElement;
+    var loopParts = forElement.forLoopParts as ForEachPartsWithDeclaration;
+    var iElement = loopParts.loopVariable.identifier.staticElement;
+    var iRef = forElement.body as SimpleIdentifier;
+    expect(iRef.staticElement, same(iElement));
+  }
+
+  void test_list_for_each_with_identifier() {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var sourceText = '[for (i in const []) i]';
+    // Resynthesis inserts synthetic "const" tokens; work around that.
+    var expectedText = 'const $sourceText';
+    checkSimpleExpression(sourceText,
+        expectedText: expectedText, extraDeclarations: 'int i;');
+  }
+
+  void test_list_for_each_with_identifier_await() {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var sourceText = '[await for (i in const []) i]';
+    // Resynthesis inserts synthetic "const" tokens; work around that.
+    var expectedText = 'const $sourceText';
+    checkSimpleExpression(sourceText,
+        expectedText: expectedText, extraDeclarations: 'int i;');
+  }
+
+  void test_list_for_empty_condition() {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var sourceText = '[for (i = 0;; i++) i]';
+    // Resynthesis inserts synthetic "const" tokens; work around that.
+    var expectedText = 'const $sourceText';
+    checkSimpleExpression(sourceText,
+        expectedText: expectedText, extraDeclarations: 'int i;');
+  }
+
+  void test_list_for_empty_initializer() {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var sourceText = '[for (; i < 10; i++) i]';
+    // Resynthesis inserts synthetic "const" tokens; work around that.
+    var expectedText = 'const $sourceText';
+    checkSimpleExpression(sourceText,
+        expectedText: expectedText, extraDeclarations: 'int i;');
+  }
+
+  void test_list_for_two_updaters() {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var sourceText = '[for (i = 0; i < 10; i++, j++) i]';
+    // Resynthesis inserts synthetic "const" tokens; work around that.
+    var expectedText = 'const $sourceText';
+    checkSimpleExpression(sourceText,
+        expectedText: expectedText, extraDeclarations: 'int i; int j;');
+  }
+
+  void test_list_for_with_one_declaration_typed() {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var sourceText = '[for (int i = 0; i < 10; i++) i]';
+    // Resynthesis inserts synthetic "const" tokens; work around that.
+    var expectedText = 'const $sourceText';
+    var list = checkSimpleExpression(sourceText, expectedText: expectedText)
+        as ListLiteral;
+    var forElement = list.elements[0] as ForElement;
+    var loopParts = forElement.forLoopParts as ForPartsWithDeclarations;
+    var iElement = loopParts.variables.variables[0].name.staticElement;
+    var condition = loopParts.condition as BinaryExpression;
+    var iRef1 = condition.leftOperand as SimpleIdentifier;
+    expect(iRef1.staticElement, same(iElement));
+    var updater = loopParts.updaters[0] as PostfixExpression;
+    var iRef2 = updater.operand as SimpleIdentifier;
+    expect(iRef2.staticElement, same(iElement));
+    var iRef3 = forElement.body as SimpleIdentifier;
+    expect(iRef3.staticElement, same(iElement));
+  }
+
+  void test_list_for_with_one_declaration_untyped() {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var sourceText = '[for (var i = 0; i < 10; i++) i]';
+    // Resynthesis inserts synthetic "const" tokens; work around that.
+    var expectedText = 'const $sourceText';
+    var list = checkSimpleExpression(sourceText, expectedText: expectedText)
+        as ListLiteral;
+    var forElement = list.elements[0] as ForElement;
+    var loopParts = forElement.forLoopParts as ForPartsWithDeclarations;
+    var iElement = loopParts.variables.variables[0].name.staticElement;
+    var condition = loopParts.condition as BinaryExpression;
+    var iRef1 = condition.leftOperand as SimpleIdentifier;
+    expect(iRef1.staticElement, same(iElement));
+    var updater = loopParts.updaters[0] as PostfixExpression;
+    var iRef2 = updater.operand as SimpleIdentifier;
+    expect(iRef2.staticElement, same(iElement));
+    var iRef3 = forElement.body as SimpleIdentifier;
+    expect(iRef3.staticElement, same(iElement));
+  }
+
+  void test_list_for_with_two_declarations_untyped() {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var sourceText = '[for (var i = 0, j = 0; i < 10; j++) i]';
+    // Resynthesis inserts synthetic "const" tokens; work around that.
+    var expectedText = 'const $sourceText';
+    var list = checkSimpleExpression(sourceText, expectedText: expectedText)
+        as ListLiteral;
+    var forElement = list.elements[0] as ForElement;
+    var loopParts = forElement.forLoopParts as ForPartsWithDeclarations;
+    var iElement = loopParts.variables.variables[0].name.staticElement;
+    var jElement = loopParts.variables.variables[1].name.staticElement;
+    var condition = loopParts.condition as BinaryExpression;
+    var iRef1 = condition.leftOperand as SimpleIdentifier;
+    expect(iRef1.staticElement, same(iElement));
+    var updater = loopParts.updaters[0] as PostfixExpression;
+    var jRef = updater.operand as SimpleIdentifier;
+    expect(jRef.staticElement, same(jElement));
+    var iRef2 = forElement.body as SimpleIdentifier;
+    expect(iRef2.staticElement, same(iElement));
+  }
+
+  void test_list_for_with_uninitialized_declaration_untyped() {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var sourceText = '[for (var i; i < 10; i++) i]';
+    // Resynthesis inserts synthetic "const" tokens; work around that.
+    var expectedText = 'const $sourceText';
+    var list = checkSimpleExpression(sourceText, expectedText: expectedText)
+        as ListLiteral;
+    var forElement = list.elements[0] as ForElement;
+    var loopParts = forElement.forLoopParts as ForPartsWithDeclarations;
+    var iElement = loopParts.variables.variables[0].name.staticElement;
+    var condition = loopParts.condition as BinaryExpression;
+    var iRef1 = condition.leftOperand as SimpleIdentifier;
+    expect(iRef1.staticElement, same(iElement));
+    var updater = loopParts.updaters[0] as PostfixExpression;
+    var iRef2 = updater.operand as SimpleIdentifier;
+    expect(iRef2.staticElement, same(iElement));
+    var iRef3 = forElement.body as SimpleIdentifier;
+    expect(iRef3.staticElement, same(iElement));
+  }
+
+  void test_list_for_zero_updaters() {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var sourceText = '[for (i = 0; i < 10;) i]';
+    // Resynthesis inserts synthetic "const" tokens; work around that.
+    var expectedText = 'const $sourceText';
+    checkSimpleExpression(sourceText,
+        expectedText: expectedText, extraDeclarations: 'int i;');
+  }
+
   void test_makeSymbol() {
     checkSimpleExpression('#foo');
   }
 
   void test_makeTypedList_const() {
-    checkSimpleExpression('const <int> []');
+    checkSimpleExpression('const <int>[]');
   }
 
   void test_makeTypedMap_const() {
-    checkSimpleExpression('const <int, bool> {}');
+    checkSimpleExpression('const <int, bool>{}');
   }
 
   void test_makeUntypedList_const() {
@@ -434,6 +487,15 @@
     checkSimpleExpression('const {0 : false}');
   }
 
+  void test_map_for() {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var sourceText = '{1 : 2, for (i = 0; i < 10; i++) i : i}';
+    // Resynthesis inserts synthetic "const" tokens; work around that.
+    var expectedText = 'const $sourceText';
+    checkSimpleExpression(sourceText,
+        expectedText: expectedText, extraDeclarations: 'int i;');
+  }
+
   void test_modulo() {
     checkSimpleExpression('0 % 1');
   }
@@ -488,7 +550,6 @@
 
   @failingTest
   void test_pushLocalFunctionReference_nested() {
-    prepareAnalysisContext(new AnalysisOptionsImpl());
     var expr =
         checkSimpleExpression('(x) => (y) => x + y') as FunctionExpression;
     var outerFunctionElement = expr.declaredElement;
@@ -511,7 +572,6 @@
 
   @failingTest
   void test_pushLocalFunctionReference_paramReference() {
-    prepareAnalysisContext(new AnalysisOptionsImpl());
     var expr = checkSimpleExpression('(x, y) => x + y') as FunctionExpression;
     var localFunctionElement = expr.declaredElement;
     var xElement = localFunctionElement.parameters[0];
@@ -585,6 +645,15 @@
     checkSimpleExpression('true');
   }
 
+  void test_set_for() {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var sourceText = '{1, for (i = 0; i < 10; i++) i}';
+    // Resynthesis inserts synthetic "const" tokens; work around that.
+    var expectedText = 'const $sourceText';
+    checkSimpleExpression(sourceText,
+        expectedText: expectedText, extraDeclarations: 'int i;');
+  }
+
   void test_subtract() {
     checkSimpleExpression('0 - 1');
   }
@@ -698,3 +767,133 @@
     return encodeLibrary(source);
   }
 }
+
+@reflectiveTest
+class ExprBuilderWithConstantUpdateTest extends ResynthesizeTestStrategyTwoPhase
+    with ExprBuilderTestHelpers {
+  @override
+  ExperimentStatus get experimentStatus =>
+      new ExperimentStatus.fromStrings([EnableString.constant_update_2018]);
+
+  void test_bitShiftRightLogical() {
+    checkSimpleExpression('0 >>> 1');
+  }
+}
+
+@reflectiveTest
+class TokensToStringTest {
+  void test_empty_list_no_space() {
+    // This is an interesting test case because "[]" is scanned as a single
+    // token, but the parser splits it into two.
+    _check('[]');
+  }
+
+  void test_empty_list_with_space() {
+    _check('[ ]');
+  }
+
+  void test_gt_gt_gt_in_type() {
+    // This is an interesting test case because ">>>" is scanned as a single
+    // token, but the parser splits it into three.
+    _check('A<B<C>>>[]');
+  }
+
+  void test_gt_gt_gt_in_type_split_both() {
+    _check('A<B<C> > >[]');
+  }
+
+  void test_gt_gt_gt_in_type_split_left() {
+    _check('A<B<C> >>[]');
+  }
+
+  void test_gt_gt_gt_in_type_split_right() {
+    _check('A<B<C>> >[]');
+  }
+
+  void test_gt_gt_in_type() {
+    // This is an interesting test case because ">>" is scanned as a single
+    // token, but the parser splits it into two.
+    _check('<A<B>>[]');
+  }
+
+  void test_gt_gt_in_type_split() {
+    _check('A<B> >[]');
+  }
+
+  void test_identifier() {
+    _check('foo');
+  }
+
+  void test_interpolation_expr_at_end_of_string() {
+    _check(r'"foo${bar}"');
+  }
+
+  void test_interpolation_expr_at_start_of_string() {
+    _check(r'"${foo}bar"');
+  }
+
+  void test_interpolation_expr_inside_string() {
+    _check(r'"foo${bar}baz"');
+  }
+
+  void test_interpolation_var_at_end_of_string() {
+    _check(r'"foo$bar"');
+  }
+
+  void test_interpolation_var_at_start_of_string() {
+    _check(r'"$foo bar"');
+  }
+
+  void test_interpolation_var_inside_string() {
+    _check(r'"foo$bar baz"');
+  }
+
+  void test_simple_string() {
+    _check('"foo"');
+  }
+
+  void _check(String originalString) {
+    var expression = _parseExpression(originalString);
+    var originalTokens =
+        _extractTokenList(expression.beginToken, expression.endToken);
+    var newString = tokensToString(expression.beginToken, expression.endToken);
+    var errorListener = AnalysisErrorListener.NULL_LISTENER;
+    var reader = new CharSequenceReader(newString);
+    var stringSource = new StringSource(newString, null);
+    var scanner = new Scanner(stringSource, reader, errorListener);
+    var startToken = scanner.tokenize();
+    var newTokens = _extractTokenList(startToken);
+    expect(newTokens, originalTokens);
+  }
+
+  List<String> _extractTokenList(Token startToken, [Token endToken]) {
+    var result = <String>[];
+    while (!startToken.isEof) {
+      if (!startToken.isSynthetic) result.add(startToken.lexeme);
+      if (identical(startToken, endToken)) break;
+      startToken = startToken.next;
+    }
+    return result;
+  }
+
+  Expression _parseExpression(String expressionString) {
+    // Note: to normalize the token string it's not sufficient to tokenize it
+    // and then pass the tokens to `tokensToString`; we also need to parse it
+    // because parsing modifies the token stream (splitting up `[]`, `>>`, and
+    // `>>>` tokens when circumstances warrant).
+    //
+    // We wrap the expression in "f() async => ...;" to ensure that the await
+    // keyword is properly parsed.
+    var sourceText = 'f() async => $expressionString;';
+    var errorListener = AnalysisErrorListener.NULL_LISTENER;
+    var reader = new CharSequenceReader(sourceText);
+    var stringSource = new StringSource(sourceText, null);
+    var scanner = new Scanner(stringSource, reader, errorListener);
+    var startToken = scanner.tokenize();
+    var parser = new Parser(stringSource, errorListener);
+    var compilationUnit = parser.parseCompilationUnit(startToken);
+    var f = compilationUnit.declarations[0] as FunctionDeclaration;
+    var body = f.functionExpression.body as ExpressionFunctionBody;
+    return body.expression;
+  }
+}
diff --git a/pkg/analyzer/test/src/summary/flat_buffers_test.dart b/pkg/analyzer/test/src/summary/flat_buffers_test.dart
index c8fb485..405b5ac 100644
--- a/pkg/analyzer/test/src/summary/flat_buffers_test.dart
+++ b/pkg/analyzer/test/src/summary/flat_buffers_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -181,6 +181,7 @@
       builder.addInt32(4, 40);
       builder.addUint32(5, 0x9ABCDEF0);
       builder.addUint8(6, 0x9A);
+      builder.addFloat64(7, -12.34);
       Offset offset = builder.endTable();
       byteList = builder.finish(offset);
     }
@@ -194,6 +195,7 @@
     expect(const Int32Reader().vTableGet(buf, objectOffset, 4), 40);
     expect(const Uint32Reader().vTableGet(buf, objectOffset, 5), 0x9ABCDEF0);
     expect(const Uint8Reader().vTableGet(buf, objectOffset, 6), 0x9A);
+    expect(const Float64Reader().vTableGet(buf, objectOffset, 7), -12.34);
   }
 
   void test_writeList_of_Uint32() {
diff --git a/pkg/analyzer/test/src/summary/linker_test.dart b/pkg/analyzer/test/src/summary/linker_test.dart
index e406c24..ab21dcd 100644
--- a/pkg/analyzer/test/src/summary/linker_test.dart
+++ b/pkg/analyzer/test/src/summary/linker_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/summary/name_filter_test.dart b/pkg/analyzer/test/src/summary/name_filter_test.dart
index ef66cc5..73a80fe 100644
--- a/pkg/analyzer/test/src/summary/name_filter_test.dart
+++ b/pkg/analyzer/test/src/summary/name_filter_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/summary/package_bundle_reader_test.dart b/pkg/analyzer/test/src/summary/package_bundle_reader_test.dart
index 1061dba..9daafee 100644
--- a/pkg/analyzer/test/src/summary/package_bundle_reader_test.dart
+++ b/pkg/analyzer/test/src/summary/package_bundle_reader_test.dart
@@ -1,21 +1,14 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:analyzer/src/context/cache.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:analyzer/src/summary/package_bundle_reader.dart';
-import 'package:analyzer/src/task/api/dart.dart';
-import 'package:analyzer/src/task/api/general.dart';
-import 'package:analyzer/src/task/dart.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(ResynthesizerResultProviderTest);
     defineReflectiveTests(SummaryDataStoreTest);
   });
 }
@@ -31,125 +24,6 @@
 }
 
 @reflectiveTest
-class ResynthesizerResultProviderTest {
-  _SourceFactoryMock sourceFactory = new _SourceFactoryMock();
-  _InternalAnalysisContextMock context = new _InternalAnalysisContextMock();
-  UniversalCachePartition cachePartition;
-
-  Source source1 = new _SourceMock('package:p1/u1.dart', '/p1/lib/u1.dart');
-  Source source2 = new _SourceMock('package:p1/u2.dart', '/p1/lib/u2.dart');
-  Source source3 = new _SourceMock('package:p2/u1.dart', '/p2/lib/u1.dart');
-  CacheEntry entry1;
-  CacheEntry entry2;
-  CacheEntry entry3;
-
-  _PackageBundleMock bundle = new _PackageBundleMock();
-  _UnlinkedUnitMock unlinkedUnit1 = new _UnlinkedUnitMock();
-  _UnlinkedUnitMock unlinkedUnit2 = new _UnlinkedUnitMock();
-  _LinkedLibraryMock linkedLibrary = new _LinkedLibraryMock();
-
-  SummaryDataStore dataStore = new SummaryDataStore(<String>[]);
-  _TestResynthesizerResultProvider provider;
-
-  void setUp() {
-    cachePartition = new UniversalCachePartition(context);
-    entry1 = new CacheEntry(source1);
-    entry2 = new CacheEntry(source2);
-    entry3 = new CacheEntry(source3);
-    cachePartition.put(entry1);
-    cachePartition.put(entry2);
-    cachePartition.put(entry3);
-
-    sourceFactory.resolvedUriMap['package:p1/u1.dart'] = source1;
-    sourceFactory.resolvedUriMap['package:p1/u2.dart'] = source2;
-    context.sourceFactory = sourceFactory;
-
-    bundle.unlinkedUnitUris = <String>[
-      'package:p1/u1.dart',
-      'package:p1/u2.dart'
-    ];
-    bundle.unlinkedUnits = <UnlinkedUnit>[unlinkedUnit1, unlinkedUnit2];
-    bundle.linkedLibraryUris = <String>['package:p1/u1.dart'];
-    bundle.linkedLibraries = <LinkedLibrary>[linkedLibrary];
-    dataStore.addBundle('/p1.ds', bundle);
-
-    unlinkedUnit1.isPartOf = false;
-    unlinkedUnit2.isPartOf = true;
-
-    var namespace1 = _namespaceWithParts(['package:p1/u2.dart']);
-    var namespace2 = _namespaceWithParts([]);
-    unlinkedUnit1.publicNamespace = namespace1;
-    unlinkedUnit2.publicNamespace = namespace2;
-
-    provider = new _TestResynthesizerResultProvider(context, dataStore);
-    provider.sourcesWithResults.add(source1);
-    provider.sourcesWithResults.add(source2);
-  }
-
-  test_compute_CONTAINING_LIBRARIES_librarySource() {
-    bool success = provider.compute(entry1, CONTAINING_LIBRARIES);
-    expect(success, isTrue);
-    expect(entry1.getValue(CONTAINING_LIBRARIES), unorderedEquals([source1]));
-  }
-
-  test_compute_CONTAINING_LIBRARIES_partSource() {
-    bool success = provider.compute(entry2, CONTAINING_LIBRARIES);
-    expect(success, isTrue);
-    expect(entry2.getValue(CONTAINING_LIBRARIES), unorderedEquals([source1]));
-  }
-
-  test_compute_LINE_INFO_emptyLineStarts() {
-    unlinkedUnit1.lineStarts = <int>[];
-    bool success = provider.compute(entry1, LINE_INFO);
-    expect(success, isFalse);
-  }
-
-  test_compute_LINE_INFO_hasLineStarts() {
-    unlinkedUnit1.lineStarts = <int>[10, 20, 30];
-    bool success = provider.compute(entry1, LINE_INFO);
-    expect(success, isTrue);
-    expect(entry1.getValue(LINE_INFO).lineStarts, <int>[10, 20, 30]);
-  }
-
-  test_compute_MODIFICATION_TIME_hasResult() {
-    bool success = provider.compute(entry1, MODIFICATION_TIME);
-    expect(success, isTrue);
-    expect(entry1.getValue(MODIFICATION_TIME), 0);
-  }
-
-  test_compute_MODIFICATION_TIME_noResult() {
-    bool success = provider.compute(entry3, MODIFICATION_TIME);
-    expect(success, isFalse);
-    expect(entry3.getState(MODIFICATION_TIME), CacheState.INVALID);
-  }
-
-  test_compute_SOURCE_KIND_librarySource() {
-    bool success = provider.compute(entry1, SOURCE_KIND);
-    expect(success, isTrue);
-    expect(entry1.getValue(SOURCE_KIND), SourceKind.LIBRARY);
-  }
-
-  test_compute_SOURCE_KIND_librarySource_isPartOf() {
-    unlinkedUnit1.isPartOf = true;
-    bool success = provider.compute(entry1, SOURCE_KIND);
-    expect(success, isTrue);
-    expect(entry1.getValue(SOURCE_KIND), SourceKind.PART);
-  }
-
-  test_compute_SOURCE_KIND_noResults() {
-    bool success = provider.compute(entry3, SOURCE_KIND);
-    expect(success, isFalse);
-    expect(entry3.getState(SOURCE_KIND), CacheState.INVALID);
-  }
-
-  test_compute_SOURCE_KIND_partSource() {
-    bool success = provider.compute(entry2, SOURCE_KIND);
-    expect(success, isTrue);
-    expect(entry2.getValue(SOURCE_KIND), SourceKind.PART);
-  }
-}
-
-@reflectiveTest
 class SummaryDataStoreTest {
   SummaryDataStore dataStore =
       new SummaryDataStore(<String>[], disallowOverlappingSummaries: true);
@@ -289,16 +163,6 @@
   }
 }
 
-class _InternalAnalysisContextMock implements InternalAnalysisContext {
-  @override
-  SourceFactory sourceFactory;
-
-  @override
-  noSuchMethod(Invocation invocation) {
-    throw new StateError('Unexpected invocation of ${invocation.memberName}');
-  }
-}
-
 class _LinkedLibraryMock implements LinkedLibrary {
   @override
   noSuchMethod(Invocation invocation) {
@@ -328,54 +192,6 @@
   }
 }
 
-class _SourceFactoryMock implements SourceFactory {
-  Map<String, Source> resolvedUriMap = <String, Source>{};
-
-  @override
-  noSuchMethod(Invocation invocation) {
-    throw new StateError('Unexpected invocation of ${invocation.memberName}');
-  }
-
-  @override
-  Source resolveUri(Source containingSource, String containedUri) {
-    return resolvedUriMap[containedUri];
-  }
-}
-
-class _SourceMock implements Source {
-  @override
-  final Uri uri;
-
-  @override
-  final String fullName;
-
-  _SourceMock(String uriStr, this.fullName) : uri = Uri.parse(uriStr);
-
-  @override
-  Source get librarySource => null;
-
-  @override
-  Source get source => this;
-
-  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
-
-  @override
-  String toString() => '$uri ($fullName)';
-}
-
-class _TestResynthesizerResultProvider extends ResynthesizerResultProvider {
-  final Set<Source> sourcesWithResults = new Set<Source>();
-
-  _TestResynthesizerResultProvider(
-      InternalAnalysisContext context, SummaryDataStore dataStore)
-      : super(context, null, dataStore);
-
-  @override
-  bool hasResultsForSource(Source source) {
-    return sourcesWithResults.contains(source);
-  }
-}
-
 class _UnlinkedPublicNamespaceMock implements UnlinkedPublicNamespace {
   @override
   List<String> parts;
diff --git a/pkg/analyzer/test/src/summary/prelinker_test.dart b/pkg/analyzer/test/src/summary/prelinker_test.dart
index 6ac254a..59d8a62 100644
--- a/pkg/analyzer/test/src/summary/prelinker_test.dart
+++ b/pkg/analyzer/test/src/summary/prelinker_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/summary/resynthesize_ast2_test.dart b/pkg/analyzer/test/src/summary/resynthesize_ast2_test.dart
new file mode 100644
index 0000000..7ec7d23
--- /dev/null
+++ b/pkg/analyzer/test/src/summary/resynthesize_ast2_test.dart
@@ -0,0 +1,225 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/ast/ast.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/source.dart';
+import 'package:analyzer/src/generated/type_system.dart';
+import 'package:analyzer/src/summary/idl.dart';
+import 'package:analyzer/src/summary/summary_sdk.dart';
+import 'package:analyzer/src/summary2/link.dart';
+import 'package:analyzer/src/summary2/linked_bundle_context.dart';
+import 'package:analyzer/src/summary2/linked_element_factory.dart';
+import 'package:analyzer/src/summary2/reference.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'resynthesize_common.dart';
+import 'test_strategies.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(ResynthesizeAst2Test);
+  });
+}
+
+@reflectiveTest
+class ResynthesizeAst2Test extends ResynthesizeTestStrategyTwoPhase
+    with ResynthesizeTestCases {
+  /// The shared SDK bundle, computed once and shared among test invocations.
+  static LinkedNodeBundle _sdkBundle;
+
+  @override
+  bool get isAstBasedSummary => true;
+
+  LinkedNodeBundle get sdkBundle {
+    if (_sdkBundle != null) return _sdkBundle;
+
+    var inputLibraries = <LinkInputLibrary>[];
+    for (var sdkLibrary in sdk.sdkLibraries) {
+      var source = sourceFactory.resolveUri(null, sdkLibrary.shortName);
+      var text = getFile(source.fullName).readAsStringSync();
+      var unit = parseText(text);
+
+      var inputUnits = <LinkInputUnit>[];
+      _addLibraryUnits(source, unit, inputUnits);
+      inputLibraries.add(
+        LinkInputLibrary(source, inputUnits),
+      );
+    }
+
+    var sdkLinkResult = link(
+      AnalysisOptionsImpl(),
+      sourceFactory,
+      declaredVariables,
+      [],
+      inputLibraries,
+    );
+
+    var bytes = sdkLinkResult.bundle.toBuffer();
+    return _sdkBundle = LinkedNodeBundle.fromBuffer(bytes);
+  }
+
+  @override
+  Future<LibraryElementImpl> checkLibrary(String text,
+      {bool allowErrors = false, bool dumpSummaries = false}) async {
+    var source = addTestSource(text);
+
+    var inputLibraries = <LinkInputLibrary>[];
+    _addNonDartLibraries(Set(), inputLibraries, source);
+
+    var linkResult = link(
+      AnalysisOptionsImpl(),
+      sourceFactory,
+      declaredVariables,
+      [sdkBundle],
+      inputLibraries,
+    );
+
+    var analysisContext = _FakeAnalysisContext(sourceFactory);
+
+    var rootReference = Reference.root();
+    rootReference.getChild('dart:core').getChild('dynamic').element =
+        DynamicElementImpl.instance;
+
+    var elementFactory = LinkedElementFactory(
+      analysisContext,
+      null,
+      rootReference,
+    );
+    elementFactory.addBundle(
+      LinkedBundleContext(elementFactory, sdkBundle),
+    );
+    elementFactory.addBundle(
+      LinkedBundleContext(elementFactory, linkResult.bundle),
+    );
+
+    var dartCore = elementFactory.libraryOfUri('dart:core');
+    var dartAsync = elementFactory.libraryOfUri('dart:async');
+    var typeProvider = SummaryTypeProvider()
+      ..initializeCore(dartCore)
+      ..initializeAsync(dartAsync);
+    analysisContext.typeProvider = typeProvider;
+    analysisContext.typeSystem = Dart2TypeSystem(typeProvider);
+
+    dartCore.createLoadLibraryFunction(typeProvider);
+    dartAsync.createLoadLibraryFunction(typeProvider);
+
+    return elementFactory.libraryOfUri('${source.uri}');
+  }
+
+  @override
+  @failingTest
+  test_const_constructor_inferred_args() async {
+    await super.test_const_constructor_inferred_args();
+  }
+
+  @override
+  @failingTest
+  test_parameter_covariant_inherited() async {
+    await super.test_parameter_covariant_inherited();
+  }
+
+  @override
+  @failingTest
+  test_syntheticFunctionType_genericClosure() async {
+    // TODO(scheglov) Bug in TypeSystem.getLeastUpperBound().
+    // LUB(<T>(T) → int, <T>(T) → int) gives `(T) → int`, note absence of `<T>`.
+    await super.test_syntheticFunctionType_genericClosure();
+  }
+
+  void _addLibraryUnits(
+    Source definingSource,
+    CompilationUnit definingUnit,
+    List<LinkInputUnit> units,
+  ) {
+    units.add(
+      LinkInputUnit(definingSource, definingUnit),
+    );
+    for (var directive in definingUnit.directives) {
+      if (directive is PartDirective) {
+        var relativeUriStr = directive.uri.stringValue;
+
+        var partSource = sourceFactory.resolveUri(
+          definingSource,
+          relativeUriStr,
+        );
+
+        if (partSource != null) {
+          var text = _readSafely(partSource.fullName);
+          var unit = parseText(text, experimentStatus: experimentStatus);
+          units.add(
+            LinkInputUnit(partSource, unit),
+          );
+        } else {
+          var unit = parseText('', experimentStatus: experimentStatus);
+          units.add(
+            LinkInputUnit(partSource, unit),
+          );
+        }
+      }
+    }
+  }
+
+  void _addNonDartLibraries(
+    Set<Source> addedLibraries,
+    List<LinkInputLibrary> libraries,
+    Source source,
+  ) {
+    if (source == null ||
+        source.uri.isScheme('dart') ||
+        !addedLibraries.add(source)) {
+      return;
+    }
+
+    var text = _readSafely(source.fullName);
+    var unit = parseText(text, experimentStatus: experimentStatus);
+
+    var units = <LinkInputUnit>[];
+    _addLibraryUnits(source, unit, units);
+    libraries.add(
+      LinkInputLibrary(source, units),
+    );
+
+    void addRelativeUriStr(StringLiteral uriNode) {
+      var uriStr = uriNode.stringValue;
+      var uriSource = sourceFactory.resolveUri(source, uriStr);
+      _addNonDartLibraries(addedLibraries, libraries, uriSource);
+    }
+
+    for (var directive in unit.directives) {
+      if (directive is NamespaceDirective) {
+        addRelativeUriStr(directive.uri);
+        for (var configuration in directive.configurations) {
+          addRelativeUriStr(configuration.uri);
+        }
+      }
+    }
+  }
+
+  String _readSafely(String path) {
+    try {
+      var file = resourceProvider.getFile(path);
+      return file.readAsStringSync();
+    } catch (_) {
+      return '';
+    }
+  }
+}
+
+class _FakeAnalysisContext implements AnalysisContext {
+  final SourceFactory sourceFactory;
+  TypeProvider typeProvider;
+  Dart2TypeSystem typeSystem;
+
+  _FakeAnalysisContext(this.sourceFactory);
+
+  @override
+  AnalysisOptions get analysisOptions {
+    return AnalysisOptionsImpl();
+  }
+
+  noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
+}
diff --git a/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart b/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart
index a3b399e..70ecb30 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -22,11 +22,9 @@
   }
 }
 
-/// TODO(paulberry): migrate this test away from the task model.
-/// See dartbug.com/35734.
 @reflectiveTest
 class ResynthesizeAstStrongTest extends ResynthesizeTestStrategyTwoPhase
-    with ResynthesizeTestCases, ResynthesizeTestHelpers {
+    with ResynthesizeTestCases, GetElementTestCases, ResynthesizeTestHelpers {
   @failingTest // See dartbug.com/32290
   test_const_constructor_inferred_args() =>
       super.test_const_constructor_inferred_args();
@@ -37,10 +35,19 @@
   @failingTest // See dartbug.com/33441
   test_const_map_inferredType() => super.test_const_map_inferredType();
 
+  @failingTest // See dartbug.com/33441
+  test_const_set_inferredType() => super.test_const_set_inferredType();
+
   @override
   @failingTest
-  test_syntheticFunctionType_genericClosure() async {
-    await super.test_syntheticFunctionType_genericClosure();
+  test_defaultValue_refersToGenericClass() async {
+    await super.test_defaultValue_refersToGenericClass();
+  }
+
+  @override
+  @failingTest
+  test_infer_generic_typedef_complex() async {
+    await super.test_infer_generic_typedef_complex();
   }
 
   @override
@@ -48,16 +55,4 @@
   test_syntheticFunctionType_inGenericClass() async {
     await super.test_syntheticFunctionType_inGenericClass();
   }
-
-  @override
-  @failingTest
-  test_syntheticFunctionType_noArguments() async {
-    await super.test_syntheticFunctionType_noArguments();
-  }
-
-  @override
-  @failingTest
-  test_syntheticFunctionType_withArguments() async {
-    await super.test_syntheticFunctionType_withArguments();
-  }
 }
diff --git a/pkg/analyzer/test/src/summary/resynthesize_common.dart b/pkg/analyzer/test/src/summary/resynthesize_common.dart
index dd5daa7..b049e24 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_common.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_common.dart
@@ -6,32 +6,19 @@
 
 import 'package:analyzer/dart/analysis/declared_variables.dart';
 import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/dart/ast/standard_resolution_map.dart';
-import 'package:analyzer/dart/ast/token.dart';
-import 'package:analyzer/dart/constant/value.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer/error/error.dart';
-import 'package:analyzer/src/dart/ast/ast.dart';
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/src/context/context.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:analyzer/src/dart/element/element.dart';
-import 'package:analyzer/src/dart/element/handle.dart';
-import 'package:analyzer/src/dart/element/member.dart';
-import 'package:analyzer/src/dart/element/type.dart';
-import 'package:analyzer/src/error/codes.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/resolver.dart' show Namespace;
-import 'package:analyzer/src/generated/sdk.dart';
 import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/testing/ast_test_factory.dart';
 import 'package:analyzer/src/summary/idl.dart';
 import 'package:analyzer/src/summary/resynthesize.dart';
 import 'package:analyzer/src/test_utilities/mock_sdk.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:test/test.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import '../../generated/test_support.dart';
 import '../../util/element_type_matchers.dart';
-import '../abstract_single_unit.dart';
 import 'element_text.dart';
 import 'test_strategies.dart';
 
@@ -40,7 +27,13 @@
  *
  * The return type separator: →
  */
-abstract class AbstractResynthesizeTest extends AbstractSingleUnitTest {
+abstract class AbstractResynthesizeTest with ResourceProviderMixin {
+  DeclaredVariables declaredVariables = new DeclaredVariables();
+  SourceFactory sourceFactory;
+  MockSdk sdk;
+
+  String testFile;
+  Source testSource;
   Set<Source> otherLibrarySources = new Set<Source>();
 
   /**
@@ -49,69 +42,161 @@
    */
   bool allowMissingFiles = false;
 
+  AbstractResynthesizeTest() {
+    sdk = new MockSdk(resourceProvider: resourceProvider);
+
+    sourceFactory = SourceFactory(
+      [
+        DartUriResolver(sdk),
+        ResourceUriResolver(resourceProvider),
+      ],
+      null,
+      resourceProvider,
+    );
+
+    testFile = convertPath('/test.dart');
+  }
+
   void addLibrary(String uri) {
-    otherLibrarySources.add(context.sourceFactory.forUri(uri));
+    var source = sourceFactory.forUri(uri);
+    otherLibrarySources.add(source);
   }
 
   Source addLibrarySource(String filePath, String contents) {
-    Source source = addSource(filePath, contents);
+    var source = addSource(filePath, contents);
     otherLibrarySources.add(source);
     return source;
   }
 
-  void assertNoErrors(Source source) {
-    GatheringErrorListener errorListener = new GatheringErrorListener();
-    for (AnalysisError error in context.computeErrors(source)) {
-      expect(error.source, source);
-      ErrorCode errorCode = error.errorCode;
-      if (errorCode == HintCode.UNUSED_ELEMENT ||
-          errorCode == HintCode.UNUSED_FIELD) {
-        continue;
-      }
-      if (errorCode == HintCode.UNUSED_CATCH_CLAUSE ||
-          errorCode == HintCode.UNUSED_CATCH_STACK ||
-          errorCode == HintCode.UNUSED_LOCAL_VARIABLE) {
-        continue;
-      }
-      errorListener.onError(error);
-    }
-    errorListener.assertNoErrors();
+  Source addSource(String path, String contents) {
+    var file = newFile(path, content: contents);
+    var source = file.createSource();
+    return source;
+  }
+
+  Source addTestSource(String code, [Uri uri]) {
+    testSource = addSource(testFile, code);
+    return testSource;
   }
 
   /**
    * Verify that the [resynthesizer] didn't do any unnecessary work when
-   * resynthesizing [library].
+   * resynthesizing the library with the [expectedLibraryUri].
    */
-  void checkMinimalResynthesisWork(
-      TestSummaryResynthesizer resynthesizer, LibraryElement library) {
+  void checkMinimalResynthesisWork(TestSummaryResynthesizer resynthesizer,
+      Uri expectedLibraryUri, List<Uri> expectedUnitUriList) {
     // Check that no other summaries needed to be resynthesized to resynthesize
     // the library element.
     expect(resynthesizer.resynthesisCount, 3);
     // Check that the only linked summary consulted was that for [uri].
     expect(resynthesizer.linkedSummariesRequested, hasLength(1));
     expect(resynthesizer.linkedSummariesRequested.first,
-        library.source.uri.toString());
+        expectedLibraryUri.toString());
     // Check that the only unlinked summaries consulted were those for the
     // library in question.
-    Set<String> expectedCompilationUnitUris = library.units
-        .map((CompilationUnitElement unit) => unit.source.uri.toString())
-        .toSet();
+    var expectedUnitUriStrSet =
+        expectedUnitUriList.map((uri) => uri.toString()).toSet();
     for (String requestedUri in resynthesizer.unlinkedSummariesRequested) {
-      expect(expectedCompilationUnitUris, contains(requestedUri));
+      expect(expectedUnitUriStrSet, contains(requestedUri));
     }
   }
+}
 
-  DartSdk createDartSdk() => new MockSdk(resourceProvider: resourceProvider);
+/// Mixin containing test cases exercising summary resynthesis.  Intended to be
+/// applied to a class implementing [ResynthesizeTestStrategy], along with the
+/// mixin [ResynthesizeTestHelpers].
+mixin GetElementTestCases implements ResynthesizeTestHelpers {
+  test_getElement_class() async {
+    var resynthesized = _validateGetElement(
+      'class C { m() {} }',
+      ['C'],
+    );
+    expect(resynthesized, isClassElement);
+  }
+
+  test_getElement_constructor_named() async {
+    var resynthesized = _validateGetElement(
+      'class C { C.named(); }',
+      ['C', 'named'],
+    );
+    expect(resynthesized, isConstructorElement);
+  }
+
+  test_getElement_constructor_unnamed() async {
+    var resynthesized = _validateGetElement(
+      'class C { C(); }',
+      ['C', ''],
+    );
+    expect(resynthesized, isConstructorElement);
+  }
+
+  test_getElement_field() async {
+    var resynthesized = _validateGetElement(
+      'class C { var f; }',
+      ['C', 'f'],
+    );
+    expect(resynthesized, isFieldElement);
+  }
+
+  test_getElement_getter() async {
+    var resynthesized = _validateGetElement(
+      'class C { get f => null; }',
+      ['C', 'f?'],
+    );
+    expect(resynthesized, isPropertyAccessorElement);
+  }
+
+  test_getElement_method() async {
+    var resynthesized = _validateGetElement(
+      'class C { m() {} }',
+      ['C', 'm'],
+    );
+    expect(resynthesized, isMethodElement);
+  }
+
+  test_getElement_operator() async {
+    var resynthesized = _validateGetElement(
+      'class C { operator+(x) => null; }',
+      ['C', '+'],
+    );
+    expect(resynthesized, isMethodElement);
+  }
+
+  test_getElement_setter() async {
+    var resynthesized = _validateGetElement(
+      'class C { void set f(value) {} }',
+      ['C', 'f='],
+    );
+    expect(resynthesized, isPropertyAccessorElement);
+  }
+
+  test_getElement_unit() async {
+    var resynthesized = _validateGetElement('class C {}', []);
+    expect(resynthesized, isCompilationUnitElement);
+  }
 
   /**
-   * Create the analysis options that should be used for this test.
+   * Encode the library [text] into a summary and then use
+   * [TestSummaryResynthesizer.getElement] to retrieve just the element with
+   * the specified [names] from the resynthesized summary.
    */
-  AnalysisOptionsImpl createOptions() => new AnalysisOptionsImpl();
+  Element _validateGetElement(String text, List<String> names) {
+    Source source = addTestSource(text);
+    SummaryResynthesizer resynthesizer = encodeLibrary(source);
 
-  @override
-  void setUp() {
-    super.setUp();
-    prepareAnalysisContext(createOptions());
+    var locationComponents = [
+      source.uri.toString(),
+      source.uri.toString(),
+    ]..addAll(names);
+    var location = ElementLocationImpl.con3(locationComponents);
+
+    Element result = resynthesizer.getElement(location);
+    checkMinimalResynthesisWork(resynthesizer, source.uri, [source.uri]);
+    // Check that no other summaries needed to be resynthesized to resynthesize
+    // the library element.
+    expect(resynthesizer.resynthesisCount, 3);
+    expect(result.location, location);
+    return result;
   }
 }
 
@@ -259,6 +344,61 @@
 ''');
   }
 
+  test_class_alias_notSimplyBounded_self() async {
+    var library = await checkLibrary('''
+class C<T extends C> = D with E;
+class D {}
+class E {}
+''');
+    checkElementText(library, r'''
+notSimplyBounded class alias C<T extends C<dynamic>> extends D with E {
+  synthetic C() = D;
+}
+class D {
+}
+class E {
+}
+''');
+  }
+
+  test_class_alias_notSimplyBounded_simple_no_type_parameter_bound() async {
+    // If no bounds are specified, then the class is simply bounded by syntax
+    // alone, so there is no reason to assign it a slot.
+    var library = await checkLibrary('''
+class C<T> = D with E;
+class D {}
+class E {}
+''');
+    checkElementText(library, r'''
+class alias C<T> extends D with E {
+  synthetic C() = D;
+}
+class D {
+}
+class E {
+}
+''');
+  }
+
+  test_class_alias_notSimplyBounded_simple_non_generic() async {
+    // If no type parameters are specified, then the class is simply bounded, so
+    // there is no reason to assign it a slot.
+    var library = await checkLibrary('''
+class C = D with E;
+class D {}
+class E {}
+''');
+    checkElementText(library, r'''
+class alias C extends D with E {
+  synthetic C() = D;
+}
+class D {
+}
+class E {
+}
+''');
+  }
+
   test_class_alias_with_forwarding_constructors() async {
     addLibrarySource('/a.dart', '''
 class Base {
@@ -1099,6 +1239,189 @@
 ''');
   }
 
+  test_class_notSimplyBounded_circularity_via_typedef() async {
+    // C's type parameter T is not simply bounded because its bound, F, expands
+    // to `dynamic F(C)`, which refers to C.
+    var library = await checkLibrary('''
+class C<T extends F> {}
+typedef F(C value);
+''');
+    checkElementText(library, r'''
+notSimplyBounded typedef F = dynamic Function(C<dynamic> value);
+notSimplyBounded class C<T extends (C<dynamic>) → dynamic> {
+}
+''');
+  }
+
+  test_class_notSimplyBounded_circularity_with_type_params() async {
+    // C's type parameter T is simply bounded because even though it refers to
+    // C, it specifies a bound.
+    var library = await checkLibrary('''
+class C<T extends C<dynamic>> {}
+''');
+    checkElementText(library, r'''
+class C<T extends C<dynamic>> {
+}
+''');
+  }
+
+  test_class_notSimplyBounded_complex_by_cycle() async {
+    var library = await checkLibrary('''
+class C<T extends D> {}
+class D<T extends C> {}
+''');
+    checkElementText(library, r'''
+notSimplyBounded class C<T extends D<dynamic>> {
+}
+notSimplyBounded class D<T extends C<D<dynamic>>> {
+}
+''');
+  }
+
+  test_class_notSimplyBounded_complex_by_reference_to_cycle() async {
+    var library = await checkLibrary('''
+class C<T extends D> {}
+class D<T extends D> {}
+''');
+    checkElementText(library, r'''
+notSimplyBounded class C<T extends D<dynamic>> {
+}
+notSimplyBounded class D<T extends D<dynamic>> {
+}
+''');
+  }
+
+  test_class_notSimplyBounded_complex_by_use_of_parameter() async {
+    var library = await checkLibrary('''
+class C<T extends D<T>> {}
+class D<T> {}
+''');
+    checkElementText(library, r'''
+notSimplyBounded class C<T extends D<T>> {
+}
+class D<T> {
+}
+''');
+  }
+
+  test_class_notSimplyBounded_dependency_with_type_params() async {
+    // C's type parameter T is simply bounded because even though it refers to
+    // non-simply-bounded type D, it specifies a bound.
+    var library = await checkLibrary('''
+class C<T extends D<dynamic>> {}
+class D<T extends D<T>> {}
+''');
+    checkElementText(library, r'''
+class C<T extends D<dynamic>> {
+}
+notSimplyBounded class D<T extends D<T>> {
+}
+''');
+  }
+
+  test_class_notSimplyBounded_function_typed_bound_complex_via_parameter_type() async {
+    var library = await checkLibrary('''
+class C<T extends void Function(T)> {}
+''');
+    checkElementText(library, r'''
+notSimplyBounded class C<T extends (T) → void> {
+}
+''');
+  }
+
+  test_class_notSimplyBounded_function_typed_bound_complex_via_return_type() async {
+    var library = await checkLibrary('''
+class C<T extends T Function()> {}
+''');
+    checkElementText(library, r'''
+notSimplyBounded class C<T extends () → T> {
+}
+''');
+  }
+
+  test_class_notSimplyBounded_function_typed_bound_simple() async {
+    var library = await checkLibrary('''
+class C<T extends void Function()> {}
+''');
+    checkElementText(library, r'''
+class C<T extends () → void> {
+}
+''');
+  }
+
+  test_class_notSimplyBounded_refers_to_circular_typedef() async {
+    // C's type parameter T has a bound of F, which is a circular typedef.  This
+    // is illegal in Dart, but we need to make sure it doesn't lead to a crash
+    // or infinite loop.
+    var library = await checkLibrary('''
+class C<T extends F> {}
+typedef F(G value);
+typedef G(F value);
+''');
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+notSimplyBounded typedef F = dynamic Function(((dynamic) → dynamic) → dynamic value);
+notSimplyBounded typedef G = dynamic Function(((dynamic) → dynamic) → dynamic value);
+notSimplyBounded class C<T extends ((dynamic) → dynamic) → dynamic> {
+}
+''');
+    } else {
+      checkElementText(library, r'''
+notSimplyBounded typedef F = dynamic Function(((...) → dynamic) → dynamic value);
+notSimplyBounded typedef G = dynamic Function(((...) → dynamic) → dynamic value);
+notSimplyBounded class C<T extends ((...) → dynamic) → dynamic> {
+}
+''');
+    }
+  }
+
+  test_class_notSimplyBounded_self() async {
+    var library = await checkLibrary('''
+class C<T extends C> {}
+''');
+    checkElementText(library, r'''
+notSimplyBounded class C<T extends C<dynamic>> {
+}
+''');
+  }
+
+  test_class_notSimplyBounded_simple_because_non_generic() async {
+    // If no type parameters are specified, then the class is simply bounded, so
+    // there is no reason to assign it a slot.
+    var library = await checkLibrary('''
+class C {}
+''');
+    checkElementText(library, r'''
+class C {
+}
+''');
+  }
+
+  test_class_notSimplyBounded_simple_by_lack_of_cycles() async {
+    var library = await checkLibrary('''
+class C<T extends D> {}
+class D<T> {}
+''');
+    checkElementText(library, r'''
+class C<T extends D<dynamic>> {
+}
+class D<T> {
+}
+''');
+  }
+
+  test_class_notSimplyBounded_simple_by_syntax() async {
+    // If no bounds are specified, then the class is simply bounded by syntax
+    // alone, so there is no reason to assign it a slot.
+    var library = await checkLibrary('''
+class C<T> {}
+''');
+    checkElementText(library, r'''
+class C<T> {
+}
+''');
+  }
+
   test_class_setter_abstract() async {
     var library =
         await checkLibrary('abstract class C { void set x(int value); }');
@@ -1872,6 +2195,22 @@
         withConstElements: false);
   }
 
+  test_codeRange_type_parameter() async {
+    var library = await checkLibrary('''
+class A<T> {}
+void f<U extends num> {}
+''');
+    checkElementText(
+        library,
+        r'''
+class A/*codeOffset=0, codeLength=13*/<T/*codeOffset=8, codeLength=1*/> {
+}
+void f/*codeOffset=14, codeLength=24*/<U/*codeOffset=21, codeLength=13*/ extends num>() {}
+''',
+        withCodeRanges: true,
+        withConstElements: false);
+  }
+
   test_const_constructor_inferred_args() async {
     var library = await checkLibrary('''
 class C<T> {
@@ -1922,7 +2261,6 @@
   }
 
   test_const_invalid_field_const() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary(r'''
 class C {
   static const f = 1 + foo();
@@ -1939,7 +2277,6 @@
   }
 
   test_const_invalid_field_final() async {
-    variablesWithNotConstInitializers.add('f');
     var library = await checkLibrary(r'''
 class C {
   final f = 1 + foo();
@@ -1964,7 +2301,6 @@
   }
 
   test_const_invalid_topLevel() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary(r'''
 const v = 1 + foo();
 int foo() => 42;
@@ -2037,7 +2373,18 @@
 import 'a.dart' as p;
 const V = const p.C<int, String>.named(1, '222');
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+import 'a.dart' as p;
+const C<int, String> V = const
+        p/*location: test.dart;p*/.
+        C/*location: a.dart;C*/<
+        int/*location: dart:core;int*/,
+        String/*location: dart:core;String*/>.
+        named/*location: a.dart;C;named*/(1, '222');
+''');
+    } else {
+      checkElementText(library, r'''
 import 'a.dart' as p;
 const C<int, String> V = const
         C/*location: a.dart;C*/<
@@ -2045,6 +2392,7 @@
         String/*location: dart:core;String*/>.
         named/*location: a.dart;C;named*/(1, '222');
 ''');
+    }
   }
 
   test_const_invokeConstructor_generic_noTypeArguments() async {
@@ -2110,13 +2458,24 @@
 import 'a.dart' as p;
 const V = const p.C<int, String>();
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+import 'a.dart' as p;
+const C<int, String> V = const
+        p/*location: test.dart;p*/.
+        C/*location: a.dart;C*/<
+        int/*location: dart:core;int*/,
+        String/*location: dart:core;String*/>();
+''');
+    } else {
+      checkElementText(library, r'''
 import 'a.dart' as p;
 const C<int, String> V = const
         C/*location: a.dart;C*/<
         int/*location: dart:core;int*/,
         String/*location: dart:core;String*/>();
 ''');
+    }
   }
 
   test_const_invokeConstructor_named() async {
@@ -2126,7 +2485,19 @@
 }
 const V = const C.named(true, 1, 2, d: 'ccc', e: 3.4);
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+class C {
+  const C.named(bool a, int b, int c, {String d}, {double e});
+}
+const C V = const
+        C/*location: test.dart;C*/.
+        named/*location: test.dart;C;named*/(true, 1, 2,
+        d/*location: test.dart;C;named;d*/: 'ccc',
+        e/*location: test.dart;C;named;e*/: 3.4);
+''');
+    } else {
+      checkElementText(library, r'''
 class C {
   const C.named(bool a, int b, int c, {String d}, {double e});
 }
@@ -2136,6 +2507,7 @@
         d/*location: null*/: 'ccc',
         e/*location: null*/: 3.4);
 ''');
+    }
   }
 
   test_const_invokeConstructor_named_imported() async {
@@ -2166,31 +2538,49 @@
 import 'a.dart' as p;
 const V = const p.C.named();
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+import 'a.dart' as p;
+const C V = const
+        p/*location: test.dart;p*/.
+        C/*location: a.dart;C*/.
+        named/*location: a.dart;C;named*/();
+''');
+    } else {
+      checkElementText(library, r'''
 import 'a.dart' as p;
 const C V = const
         C/*location: a.dart;C*/.
         named/*location: a.dart;C;named*/();
 ''');
+    }
   }
 
   test_const_invokeConstructor_named_unresolved() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary(r'''
 class C {}
 const V = const C.named();
 ''', allowErrors: true);
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+class C {
+}
+const C V = const
+        C/*location: test.dart;C*/.
+        named/*location: null*/();
+''');
+    } else {
+      checkElementText(library, r'''
 class C {
 }
 const dynamic V = const
         C/*location: test.dart;C*/.
         named/*location: null*/();
 ''');
+    }
   }
 
   test_const_invokeConstructor_named_unresolved2() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary(r'''
 const V = const C.named();
 ''', allowErrors: true);
@@ -2202,7 +2592,6 @@
   }
 
   test_const_invokeConstructor_named_unresolved3() async {
-    shouldCompareLibraryElements = false;
     addLibrarySource('/a.dart', r'''
 class C {
 }
@@ -2211,17 +2600,26 @@
 import 'a.dart' as p;
 const V = const p.C.named();
 ''', allowErrors: true);
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+import 'a.dart' as p;
+const C V = const
+        p/*location: test.dart;p*/.
+        C/*location: a.dart;C*/.
+        named/*location: null*/();
+''');
+    } else {
+      checkElementText(library, r'''
 import 'a.dart' as p;
 const dynamic V = const
         p/*location: test.dart;p*/.
         C/*location: a.dart;C*/.
         named/*location: null*/();
 ''');
+    }
   }
 
   test_const_invokeConstructor_named_unresolved4() async {
-    shouldCompareLibraryElements = false;
     addLibrarySource('/a.dart', '');
     var library = await checkLibrary(r'''
 import 'a.dart' as p;
@@ -2237,7 +2635,6 @@
   }
 
   test_const_invokeConstructor_named_unresolved5() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary(r'''
 const V = const p.C.named();
 ''', allowErrors: true);
@@ -2250,18 +2647,27 @@
   }
 
   test_const_invokeConstructor_named_unresolved6() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary(r'''
 class C<T> {}
 const V = const C.named();
 ''', allowErrors: true);
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+class C<T> {
+}
+const C<dynamic> V = const
+        C/*location: test.dart;C*/.
+        named/*location: null*/();
+''');
+    } else {
+      checkElementText(library, r'''
 class C<T> {
 }
 const dynamic V = const
         C/*location: test.dart;C*/.
         named/*location: null*/();
 ''');
+    }
   }
 
   test_const_invokeConstructor_unnamed() async {
@@ -2307,15 +2713,23 @@
 import 'a.dart' as p;
 const V = const p.C();
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+import 'a.dart' as p;
+const C V = const
+        p/*location: test.dart;p*/.
+        C/*location: a.dart;C*/();
+''');
+    } else {
+      checkElementText(library, r'''
 import 'a.dart' as p;
 const C V = const
         C/*location: a.dart;C*/();
 ''');
+    }
   }
 
   test_const_invokeConstructor_unnamed_unresolved() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary(r'''
 const V = const C();
 ''', allowErrors: true);
@@ -2326,7 +2740,6 @@
   }
 
   test_const_invokeConstructor_unnamed_unresolved2() async {
-    shouldCompareLibraryElements = false;
     addLibrarySource('/a.dart', '');
     var library = await checkLibrary(r'''
 import 'a.dart' as p;
@@ -2341,7 +2754,6 @@
   }
 
   test_const_invokeConstructor_unnamed_unresolved3() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary(r'''
 const V = const p.C();
 ''', allowErrors: true);
@@ -2482,6 +2894,34 @@
 ''');
   }
 
+  test_const_list_if() async {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var library = await checkLibrary('''
+const Object x = const <int>[if (true) 1];
+''');
+    checkElementText(
+        library,
+        '''
+const Object x = const <
+        int/*location: dart:core;int*/>[if (true) 1];
+''',
+        withTypes: true);
+  }
+
+  test_const_list_if_else() async {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var library = await checkLibrary('''
+const Object x = const <int>[if (true) 1 else 2];
+''');
+    checkElementText(
+        library,
+        '''
+const Object x = const <
+        int/*location: dart:core;int*/>[if (true) 1 else 2];
+''',
+        withTypes: true);
+  }
+
   test_const_list_inferredType() async {
     // The summary needs to contain enough information so that when the constant
     // is resynthesized, the constant value can get the type that was computed
@@ -2489,10 +2929,95 @@
     var library = await checkLibrary('''
 const Object x = const [1];
 ''');
-    checkElementText(library, '''
+    if (isAstBasedSummary) {
+      checkElementText(
+          library,
+          '''
+const Object x = const /*typeArgs=int*/[1];
+''',
+          withTypes: true);
+    } else {
+      checkElementText(library, '''
 const Object x = const <
         int/*location: dart:core;int*/>[1];
 ''');
+    }
+  }
+
+  test_const_list_spread() async {
+    experimentStatus = ExperimentStatus(spread_collections: true);
+    var library = await checkLibrary('''
+const Object x = const <int>[...<int>[1]];
+''');
+    if (isAstBasedSummary) {
+      checkElementText(
+          library,
+          '''
+const Object x = const <
+        int/*location: dart:core;int*/>[...<
+        int/*location: dart:core;int*/>[1]];
+''',
+          withTypes: true);
+    } else {
+      checkElementText(library, '''
+const Object x = const <
+        int/*location: dart:core;int*/>[...const <
+        int/*location: dart:core;int*/>[1]];
+''');
+    }
+  }
+
+  test_const_list_spread_null_aware() async {
+    experimentStatus = ExperimentStatus(spread_collections: true);
+    var library = await checkLibrary('''
+const Object x = const <int>[...?<int>[1]];
+''');
+    if (isAstBasedSummary) {
+      checkElementText(
+          library,
+          '''
+const Object x = const <
+        int/*location: dart:core;int*/>[...?<
+        int/*location: dart:core;int*/>[1]];
+''',
+          withTypes: true);
+    } else {
+      checkElementText(library, '''
+const Object x = const <
+        int/*location: dart:core;int*/>[...?const <
+        int/*location: dart:core;int*/>[1]];
+''');
+    }
+  }
+
+  test_const_map_if() async {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var library = await checkLibrary('''
+const Object x = const <int, int>{if (true) 1: 2};
+''');
+    checkElementText(
+        library,
+        '''
+const Object x = const <
+        int/*location: dart:core;int*/,
+        int/*location: dart:core;int*/>{if (true) 1: 2}/*isMap*/;
+''',
+        withTypes: true);
+  }
+
+  test_const_map_if_else() async {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var library = await checkLibrary('''
+const Object x = const <int, int>{if (true) 1: 2 else 3: 4];
+''');
+    checkElementText(
+        library,
+        '''
+const Object x = const <
+        int/*location: dart:core;int*/,
+        int/*location: dart:core;int*/>{if (true) 1: 2 else 3: 4}/*isMap*/;
+''',
+        withTypes: true);
   }
 
   test_const_map_inferredType() async {
@@ -2502,11 +3027,74 @@
     var library = await checkLibrary('''
 const Object x = const {1: 1.0};
 ''');
-    checkElementText(library, '''
+    if (isAstBasedSummary) {
+      checkElementText(
+          library,
+          '''
+const Object x = const /*typeArgs=int,double*/{1: 1.0}/*isMap*/;
+''',
+          withTypes: true);
+    } else {
+      checkElementText(library, '''
 const Object x = const <
         int/*location: dart:core;int*/,
-        double/*location: dart:core;double*/>{1: 1.0};
+        double/*location: dart:core;double*/>{1: 1.0}/*isMap*/;
 ''');
+    }
+  }
+
+  test_const_map_spread() async {
+    experimentStatus = ExperimentStatus(spread_collections: true);
+    var library = await checkLibrary('''
+const Object x = const <int, int>{...<int, int>{1: 2}};
+''');
+    if (isAstBasedSummary) {
+      checkElementText(
+          library,
+          '''
+const Object x = const <
+        int/*location: dart:core;int*/,
+        int/*location: dart:core;int*/>{...<
+        int/*location: dart:core;int*/,
+        int/*location: dart:core;int*/>{1: 2}/*isMap*/}/*isMap*/;
+''',
+          withTypes: true);
+    } else {
+      checkElementText(library, '''
+const Object x = const <
+        int/*location: dart:core;int*/,
+        int/*location: dart:core;int*/>{...const <
+        int/*location: dart:core;int*/,
+        int/*location: dart:core;int*/>{1: 2}/*isMap*/}/*isMap*/;
+''');
+    }
+  }
+
+  test_const_map_spread_null_aware() async {
+    experimentStatus = ExperimentStatus(spread_collections: true);
+    var library = await checkLibrary('''
+const Object x = const <int, int>{...?<int, int>{1: 2}};
+''');
+    if (isAstBasedSummary) {
+      checkElementText(
+          library,
+          '''
+const Object x = const <
+        int/*location: dart:core;int*/,
+        int/*location: dart:core;int*/>{...?<
+        int/*location: dart:core;int*/,
+        int/*location: dart:core;int*/>{1: 2}/*isMap*/}/*isMap*/;
+''',
+          withTypes: true);
+    } else {
+      checkElementText(library, '''
+const Object x = const <
+        int/*location: dart:core;int*/,
+        int/*location: dart:core;int*/>{...?const <
+        int/*location: dart:core;int*/,
+        int/*location: dart:core;int*/>{1: 2}/*isMap*/}/*isMap*/;
+''');
+    }
   }
 
   test_const_parameterDefaultValue_initializingFormal_functionTyped() async {
@@ -2909,7 +3497,6 @@
   }
 
   test_const_reference_unresolved_prefix0() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary(r'''
 const V = foo;
 ''', allowErrors: true);
@@ -2920,7 +3507,6 @@
   }
 
   test_const_reference_unresolved_prefix1() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary(r'''
 class C {}
 const V = C.foo;
@@ -2935,7 +3521,6 @@
   }
 
   test_const_reference_unresolved_prefix2() async {
-    shouldCompareLibraryElements = false;
     addLibrarySource('/foo.dart', '''
 class C {}
 ''');
@@ -2952,6 +3537,102 @@
 ''');
   }
 
+  test_const_set_if() async {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var library = await checkLibrary('''
+const Object x = const <int>{if (true) 1};
+''');
+    checkElementText(
+        library,
+        '''
+const Object x = const <
+        int/*location: dart:core;int*/>{if (true) 1}/*isSet*/;
+''',
+        withTypes: true);
+  }
+
+  test_const_set_if_else() async {
+    experimentStatus = ExperimentStatus(control_flow_collections: true);
+    var library = await checkLibrary('''
+const Object x = const <int>{if (true) 1 else 2];
+''');
+    checkElementText(
+        library,
+        '''
+const Object x = const <
+        int/*location: dart:core;int*/>{if (true) 1 else 2}/*isSet*/;
+''',
+        withTypes: true);
+  }
+
+  test_const_set_inferredType() async {
+    // The summary needs to contain enough information so that when the constant
+    // is resynthesized, the constant value can get the type that was computed
+    // by type inference.
+    var library = await checkLibrary('''
+const Object x = const {1};
+''');
+    if (isAstBasedSummary) {
+      checkElementText(
+          library,
+          '''
+const Object x = const /*typeArgs=int*/{1}/*isSet*/;
+''',
+          withTypes: true);
+    } else {
+      checkElementText(library, '''
+const Object x = const <
+        int/*location: dart:core;int*/>{1}/*isSet*/;
+''');
+    }
+  }
+
+  test_const_set_spread() async {
+    experimentStatus = ExperimentStatus(spread_collections: true);
+    var library = await checkLibrary('''
+const Object x = const <int>{...<int>{1}};
+''');
+    if (isAstBasedSummary) {
+      checkElementText(
+          library,
+          '''
+const Object x = const <
+        int/*location: dart:core;int*/>{...<
+        int/*location: dart:core;int*/>{1}/*isSet*/}/*isSet*/;
+''',
+          withTypes: true);
+    } else {
+      checkElementText(library, '''
+const Object x = const <
+        int/*location: dart:core;int*/>{...const <
+        int/*location: dart:core;int*/>{1}/*isSet*/}/*isSet*/;
+''');
+    }
+  }
+
+  test_const_set_spread_null_aware() async {
+    experimentStatus = ExperimentStatus(spread_collections: true);
+    var library = await checkLibrary('''
+const Object x = const <int>{...?<int>{1}};
+''');
+    if (isAstBasedSummary) {
+      checkElementText(
+          library,
+          '''
+const Object x = const <
+        int/*location: dart:core;int*/>{...?<
+        int/*location: dart:core;int*/>{1}/*isSet*/}/*isSet*/;
+''',
+          withTypes: true);
+    } else {
+      checkElementText(library, '''
+const Object x = const <
+        int/*location: dart:core;int*/>{...?const <
+        int/*location: dart:core;int*/>{1}/*isSet*/}/*isSet*/;
+''');
+    }
+  }
+
   test_const_topLevel_binary() async {
     var library = await checkLibrary(r'''
 const vEqual = 1 == 2;
@@ -2999,18 +3680,30 @@
     var library = await checkLibrary(r'''
 const vConditional = (1 == 2) ? 11 : 22;
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+const int vConditional = (1 == 2) ? 11 : 22;
+''');
+    } else {
+      checkElementText(library, r'''
 const int vConditional = 1 == 2 ? 11 : 22;
 ''');
+    }
   }
 
   test_const_topLevel_identical() async {
     var library = await checkLibrary(r'''
 const vIdentical = (1 == 2) ? 11 : 22;
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+const int vIdentical = (1 == 2) ? 11 : 22;
+''');
+    } else {
+      checkElementText(library, r'''
 const int vIdentical = 1 == 2 ? 11 : 22;
 ''');
+    }
   }
 
   test_const_topLevel_ifNull() async {
@@ -3081,7 +3774,6 @@
   }
 
   test_const_topLevel_super() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary(r'''
 const vSuper = super;
 ''');
@@ -3091,7 +3783,6 @@
   }
 
   test_const_topLevel_this() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary(r'''
 const vThis = this;
 ''');
@@ -3101,14 +3792,19 @@
   }
 
   test_const_topLevel_throw() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary(r'''
 const c = throw 42;
 ''');
-    // This is a bug.
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+const dynamic c = throw 42;
+''');
+    } else {
+      // This is a bug.
+      checkElementText(library, r'''
 const dynamic c;
 ''');
+    }
   }
 
   test_const_topLevel_typedList() async {
@@ -3159,24 +3855,42 @@
 import 'a.dart' as p;
 const v = const <p.C>[];
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+import 'a.dart' as p;
+const List<C> v = const <
+        p/*location: test.dart;p*/.
+        C/*location: a.dart;C*/>[];
+''');
+    } else {
+      checkElementText(library, r'''
 import 'a.dart' as p;
 const List<C> v = const <
         C/*location: a.dart;C*/>[];
 ''');
+    }
   }
 
   test_const_topLevel_typedList_typedefArgument() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary(r'''
 typedef int F(String id);
 const v = const <F>[];
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+typedef F = int Function(String id);
+const List<(String) → int> v = const <
+        F/*location: test.dart;F*/>[];
+''');
+    } else {
+      // This is wrong.
+      // `F` must be the reference to `typedef F` element, not the type.
+      checkElementText(library, r'''
 typedef F = int Function(String id);
 const List<(String) → int> v = const <
         null/*location: test.dart;F;-*/>[];
 ''');
+    }
   }
 
   test_const_topLevel_typedMap() async {
@@ -3189,17 +3903,34 @@
     checkElementText(library, r'''
 const Map<dynamic, int> vDynamic1 = const <
         dynamic/*location: dynamic*/,
-        int/*location: dart:core;int*/>{};
+        int/*location: dart:core;int*/>{}/*isMap*/;
 const Map<int, dynamic> vDynamic2 = const <
         int/*location: dart:core;int*/,
-        dynamic/*location: dynamic*/>{};
+        dynamic/*location: dynamic*/>{}/*isMap*/;
 const Map<int, String> vInterface = const <
         int/*location: dart:core;int*/,
-        String/*location: dart:core;String*/>{};
+        String/*location: dart:core;String*/>{}/*isMap*/;
 const Map<int, List<String>> vInterfaceWithTypeArguments = const <
         int/*location: dart:core;int*/,
         List/*location: dart:core;List*/<
-        String/*location: dart:core;String*/>>{};
+        String/*location: dart:core;String*/>>{}/*isMap*/;
+''');
+  }
+
+  test_const_topLevel_typedSet() async {
+    var library = await checkLibrary(r'''
+const vDynamic1 = const <dynamic>{};
+const vInterface = const <int>{};
+const vInterfaceWithTypeArguments = const <List<String>>{};
+''');
+    checkElementText(library, r'''
+const Set<dynamic> vDynamic1 = const <
+        dynamic/*location: dynamic*/>{}/*isSet*/;
+const Set<int> vInterface = const <
+        int/*location: dart:core;int*/>{}/*isSet*/;
+const Set<List<String>> vInterfaceWithTypeArguments = const <
+        List/*location: dart:core;List*/<
+        String/*location: dart:core;String*/>>{}/*isSet*/;
 ''');
   }
 
@@ -3217,7 +3948,16 @@
 const v = const {0: 'aaa', 1: 'bbb', 2: 'ccc'};
 ''');
     checkElementText(library, r'''
-const Map<int, String> v = const {0: 'aaa', 1: 'bbb', 2: 'ccc'};
+const Map<int, String> v = const {0: 'aaa', 1: 'bbb', 2: 'ccc'}/*isMap*/;
+''');
+  }
+
+  test_const_topLevel_untypedSet() async {
+    var library = await checkLibrary(r'''
+const v = const {0, 1, 2};
+''');
+    checkElementText(library, r'''
+const Set<int> v = const {0, 1, 2}/*isSet*/;
 ''');
   }
 
@@ -3266,7 +4006,16 @@
   static const b = null;
 }
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+class C {
+  static const dynamic a =
+        b/*location: test.dart;C;b?*/;
+  static const dynamic b = null;
+}
+''');
+    } else {
+      checkElementText(library, r'''
 class C {
   static const dynamic a =
         C/*location: test.dart;C*/.
@@ -3274,6 +4023,7 @@
   static const dynamic b = null;
 }
 ''');
+    }
   }
 
   test_constExpr_pushReference_staticMethod_simpleIdentifier() async {
@@ -3283,7 +4033,16 @@
   static m() {}
 }
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+class C {
+  static const () → dynamic a =
+        m/*location: test.dart;C;m*/;
+  static dynamic m() {}
+}
+''');
+    } else {
+      checkElementText(library, r'''
 class C {
   static const () → dynamic a =
         C/*location: test.dart;C*/.
@@ -3291,6 +4050,7 @@
   static dynamic m() {}
 }
 ''');
+    }
   }
 
   test_constructor_documented() async {
@@ -3356,7 +4116,6 @@
   }
 
   test_constructor_initializers_field_notConst() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary('''
 class C {
   final x;
@@ -3442,7 +4201,19 @@
   const C() : super.aaa(1, b: 2);
 }
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+class A {
+  const A.aaa(dynamic a, {int b});
+}
+class C extends A {
+  const C() : super.
+        aaa/*location: test.dart;A;aaa*/(1,
+        b/*location: test.dart;A;aaa;b*/: 2);
+}
+''');
+    } else {
+      checkElementText(library, r'''
 class A {
   const A.aaa(dynamic a, {int b});
 }
@@ -3452,6 +4223,7 @@
         b/*location: null*/: 2);
 }
 ''');
+    }
   }
 
   test_constructor_initializers_superInvocation_unnamed() async {
@@ -3496,7 +4268,17 @@
   const C.named(a, {int b});
 }
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+class C {
+  const C() = C.named : this.
+        named/*location: test.dart;C;named*/(1,
+        b/*location: test.dart;C;named;b*/: 2);
+  const C.named(dynamic a, {int b});
+}
+''');
+    } else {
+      checkElementText(library, r'''
 class C {
   const C() = C.named : this.
         named/*location: test.dart;C;named*/(1,
@@ -3504,6 +4286,7 @@
   const C.named(dynamic a, {int b});
 }
 ''');
+    }
   }
 
   test_constructor_initializers_thisInvocation_unnamed() async {
@@ -3834,14 +4617,15 @@
   test_constructor_redirected_thisInvocation_named() async {
     var library = await checkLibrary('''
 class C {
-  C.named();
-  C() : this.named();
+  const C.named();
+  const C() : this.named();
 }
 ''');
     checkElementText(library, r'''
 class C {
-  C.named();
-  C() = C.named;
+  const C.named();
+  const C() = C.named : this.
+        named/*location: test.dart;C;named*/();
 }
 ''');
   }
@@ -3849,29 +4633,54 @@
   test_constructor_redirected_thisInvocation_named_generic() async {
     var library = await checkLibrary('''
 class C<T> {
-  C.named();
-  C() : this.named();
+  const C.named();
+  const C() : this.named();
 }
 ''');
     checkElementText(library, r'''
 class C<T> {
-  C.named();
-  C() = C<T>.named;
+  const C.named();
+  const C() = C<T>.named : this.
+        named/*location: test.dart;C;named*/();
 }
 ''');
   }
 
+  test_constructor_redirected_thisInvocation_named_notConst() async {
+    var library = await checkLibrary('''
+class C {
+  C.named();
+  C() : this.named();
+}
+''');
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+class C {
+  C.named();
+  C();
+}
+''');
+    } else {
+      checkElementText(library, r'''
+class C {
+  C.named();
+  C() = C.named;
+}
+''');
+    }
+  }
+
   test_constructor_redirected_thisInvocation_unnamed() async {
     var library = await checkLibrary('''
 class C {
-  C();
-  C.named() : this();
+  const C();
+  const C.named() : this();
 }
 ''');
     checkElementText(library, r'''
 class C {
-  C();
-  C.named() = C;
+  const C();
+  const C.named() = C : this();
 }
 ''');
   }
@@ -3879,18 +4688,42 @@
   test_constructor_redirected_thisInvocation_unnamed_generic() async {
     var library = await checkLibrary('''
 class C<T> {
-  C();
-  C.named() : this();
+  const C();
+  const C.named() : this();
 }
 ''');
     checkElementText(library, r'''
 class C<T> {
-  C();
-  C.named() = C<T>;
+  const C();
+  const C.named() = C<T> : this();
 }
 ''');
   }
 
+  test_constructor_redirected_thisInvocation_unnamed_notConst() async {
+    var library = await checkLibrary('''
+class C {
+  C();
+  C.named() : this();
+}
+''');
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+class C {
+  C();
+  C.named();
+}
+''');
+    } else {
+      checkElementText(library, r'''
+class C {
+  C();
+  C.named() = C;
+}
+''');
+    }
+  }
+
   test_constructor_withCycles_const() async {
     var library = await checkLibrary('''
 class C {
@@ -3963,6 +4796,29 @@
 ''');
   }
 
+  test_defaultValue_refersToGenericClass() async {
+    var library = await checkLibrary('''
+class B<T1, T2> {
+  const B();
+}
+class C {
+  void foo([B<int, double> b = const B()]) {}
+}
+''');
+    checkElementText(
+        library,
+        r'''
+class B<T1, T2> {
+  const B();
+}
+class C {
+  void foo([B<int, double> b = const /*typeArgs=int,double*/
+        B/*location: test.dart;B*/()]) {}
+}
+''',
+        withTypes: true);
+  }
+
   test_defaultValue_refersToGenericClass_constructor() async {
     var library = await checkLibrary('''
 class B<T> {
@@ -3972,7 +4828,21 @@
   const C([B<T> b = const B()]);
 }
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(
+          library,
+          r'''
+class B<T> {
+  const B();
+}
+class C<T> {
+  const C([B<T> b = const /*typeArgs=Null*/
+        B/*location: test.dart;B*/()]);
+}
+''',
+          withTypes: true);
+    } else {
+      checkElementText(library, r'''
 class B<T> {
   const B();
 }
@@ -3981,6 +4851,7 @@
         B/*location: test.dart;B*/()]);
 }
 ''');
+    }
   }
 
   test_defaultValue_refersToGenericClass_constructor2() async {
@@ -3993,7 +4864,23 @@
   const C([A<T> a = const B()]);
 }
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(
+          library,
+          r'''
+abstract class A<T> {
+}
+class B<T> implements A<T> {
+  const B();
+}
+class C<T> implements A<Iterable<T>> {
+  const C([A<T> a = const /*typeArgs=Null*/
+        B/*location: test.dart;B*/()]);
+}
+''',
+          withTypes: true);
+    } else {
+      checkElementText(library, r'''
 abstract class A<T> {
 }
 class B<T> implements A<T> {
@@ -4004,6 +4891,7 @@
         B/*location: test.dart;B*/()]);
 }
 ''');
+    }
   }
 
   test_defaultValue_refersToGenericClass_functionG() async {
@@ -4013,13 +4901,26 @@
 }
 void foo<T>([B<T> b = const B()]) {}
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(
+          library,
+          r'''
+class B<T> {
+  const B();
+}
+void foo<T>([B<T> b = const /*typeArgs=Null*/
+        B/*location: test.dart;B*/()]) {}
+''',
+          withTypes: true);
+    } else {
+      checkElementText(library, r'''
 class B<T> {
   const B();
 }
 void foo<T>([B<T> b = const
         B/*location: test.dart;B*/()]) {}
 ''');
+    }
   }
 
   test_defaultValue_refersToGenericClass_methodG() async {
@@ -4031,7 +4932,21 @@
   void foo<T>([B<T> b = const B()]) {}
 }
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(
+          library,
+          r'''
+class B<T> {
+  const B();
+}
+class C {
+  void foo<T>([B<T> b = const /*typeArgs=Null*/
+        B/*location: test.dart;B*/()]) {}
+}
+''',
+          withTypes: true);
+    } else {
+      checkElementText(library, r'''
 class B<T> {
   const B();
 }
@@ -4040,6 +4955,7 @@
         B/*location: test.dart;B*/()]) {}
 }
 ''');
+    }
   }
 
   test_defaultValue_refersToGenericClass_methodG_classG() async {
@@ -4051,7 +4967,21 @@
   void foo<E2>([B<E1, E2> b = const B()]) {}
 }
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(
+          library,
+          r'''
+class B<T1, T2> {
+  const B();
+}
+class C<E1> {
+  void foo<E2>([B<E1, E2> b = const /*typeArgs=Null,Null*/
+        B/*location: test.dart;B*/()]) {}
+}
+''',
+          withTypes: true);
+    } else {
+      checkElementText(library, r'''
 class B<T1, T2> {
   const B();
 }
@@ -4060,6 +4990,7 @@
         B/*location: test.dart;B*/()]) {}
 }
 ''');
+    }
   }
 
   test_defaultValue_refersToGenericClass_methodNG() async {
@@ -4071,7 +5002,21 @@
   void foo([B<T> b = const B()]) {}
 }
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(
+          library,
+          r'''
+class B<T> {
+  const B();
+}
+class C<T> {
+  void foo([B<T> b = const /*typeArgs=Null*/
+        B/*location: test.dart;B*/()]) {}
+}
+''',
+          withTypes: true);
+    } else {
+      checkElementText(library, r'''
 class B<T> {
   const B();
 }
@@ -4080,6 +5025,7 @@
         B/*location: test.dart;B*/()]) {}
 }
 ''');
+    }
   }
 
   test_enum_documented() async {
@@ -4219,9 +5165,16 @@
   test_export_class() async {
     addLibrarySource('/a.dart', 'class C {}');
     var library = await checkLibrary('export "a.dart";');
-    checkElementText(library, r'''
+    checkElementText(
+        library,
+        r'''
 export 'a.dart';
-''');
+
+--------------------
+Exports:
+  C: a.dart;C
+''',
+        withExportScope: true);
   }
 
   test_export_class_type_alias() async {
@@ -4231,13 +5184,20 @@
 class _E {}
 ''');
     var library = await checkLibrary('export "a.dart";');
-    checkElementText(library, r'''
+    checkElementText(
+        library,
+        r'''
 export 'a.dart';
-''');
+
+--------------------
+Exports:
+  C: a.dart;C
+''',
+        withExportScope: true);
   }
 
   test_export_configurations_useDefault() async {
-    context.declaredVariables =
+    declaredVariables =
         new DeclaredVariables.fromMap({'dart.library.io': 'false'});
     addLibrarySource('/foo.dart', 'class A {}');
     addLibrarySource('/foo_io.dart', 'class A {}');
@@ -4247,14 +5207,21 @@
   if (dart.library.io) 'foo_io.dart'
   if (dart.library.html) 'foo_html.dart';
 ''');
-    checkElementText(library, r'''
+    checkElementText(
+        library,
+        r'''
 export 'foo.dart';
-''');
+
+--------------------
+Exports:
+  A: foo.dart;A
+''',
+        withExportScope: true);
     expect(library.exports[0].exportedLibrary.source.shortName, 'foo.dart');
   }
 
   test_export_configurations_useFirst() async {
-    context.declaredVariables = new DeclaredVariables.fromMap(
+    declaredVariables = new DeclaredVariables.fromMap(
         {'dart.library.io': 'true', 'dart.library.html': 'true'});
     addLibrarySource('/foo.dart', 'class A {}');
     addLibrarySource('/foo_io.dart', 'class A {}');
@@ -4264,14 +5231,21 @@
   if (dart.library.io) 'foo_io.dart'
   if (dart.library.html) 'foo_html.dart';
 ''');
-    checkElementText(library, r'''
+    checkElementText(
+        library,
+        r'''
 export 'foo_io.dart';
-''');
+
+--------------------
+Exports:
+  A: foo_io.dart;A
+''',
+        withExportScope: true);
     expect(library.exports[0].exportedLibrary.source.shortName, 'foo_io.dart');
   }
 
   test_export_configurations_useSecond() async {
-    context.declaredVariables = new DeclaredVariables.fromMap(
+    declaredVariables = new DeclaredVariables.fromMap(
         {'dart.library.io': 'false', 'dart.library.html': 'true'});
     addLibrarySource('/foo.dart', 'class A {}');
     addLibrarySource('/foo_io.dart', 'class A {}');
@@ -4281,9 +5255,16 @@
   if (dart.library.io) 'foo_io.dart'
   if (dart.library.html) 'foo_html.dart';
 ''');
-    checkElementText(library, r'''
+    checkElementText(
+        library,
+        r'''
 export 'foo_html.dart';
-''');
+
+--------------------
+Exports:
+  A: foo_html.dart;A
+''',
+        withExportScope: true);
     ExportElement export = library.exports[0];
     expect(export.exportedLibrary.source.shortName, 'foo_html.dart');
   }
@@ -4291,9 +5272,16 @@
   test_export_function() async {
     addLibrarySource('/a.dart', 'f() {}');
     var library = await checkLibrary('export "a.dart";');
-    checkElementText(library, r'''
+    checkElementText(
+        library,
+        r'''
 export 'a.dart';
-''');
+
+--------------------
+Exports:
+  f: a.dart;f
+''',
+        withExportScope: true);
   }
 
   test_export_getter() async {
@@ -4308,71 +5296,134 @@
     addLibrary('dart:async');
     var library =
         await checkLibrary('export "dart:async" hide Stream, Future;');
-    checkElementText(library, r'''
+    checkElementText(
+        library,
+        r'''
 export 'dart:async' hide Stream, Future;
-''');
+
+--------------------
+Exports:
+  Completer: dart:async;Completer
+  FutureOr: dart:async;FutureOr
+  StreamIterator: dart:async;dart:async/stream.dart;StreamIterator
+  StreamSubscription: dart:async;dart:async/stream.dart;StreamSubscription
+  StreamTransformer: dart:async;dart:async/stream.dart;StreamTransformer
+  Timer: dart:async;Timer
+''',
+        withExportScope: true);
   }
 
   test_export_multiple_combinators() async {
     addLibrary('dart:async');
     var library =
         await checkLibrary('export "dart:async" hide Stream show Future;');
-    checkElementText(library, r'''
+    checkElementText(
+        library,
+        r'''
 export 'dart:async' hide Stream show Future;
-''');
+
+--------------------
+Exports:
+  Future: dart:async;Future
+''',
+        withExportScope: true);
   }
 
   test_export_setter() async {
     addLibrarySource('/a.dart', 'void set f(value) {}');
     var library = await checkLibrary('export "a.dart";');
-    checkElementText(library, r'''
+    checkElementText(
+        library,
+        r'''
 export 'a.dart';
-''');
+
+--------------------
+Exports:
+  f=: a.dart;f=
+''',
+        withExportScope: true);
   }
 
   test_export_show() async {
     addLibrary('dart:async');
     var library =
         await checkLibrary('export "dart:async" show Future, Stream;');
-    checkElementText(library, r'''
+    checkElementText(
+        library,
+        r'''
 export 'dart:async' show Future, Stream;
-''');
+
+--------------------
+Exports:
+  Future: dart:async;Future
+  Stream: dart:async;dart:async/stream.dart;Stream
+''',
+        withExportScope: true);
   }
 
   test_export_typedef() async {
     addLibrarySource('/a.dart', 'typedef F();');
     var library = await checkLibrary('export "a.dart";');
-    checkElementText(library, r'''
+    checkElementText(
+        library,
+        r'''
 export 'a.dart';
-''');
+
+--------------------
+Exports:
+  F: a.dart;F
+''',
+        withExportScope: true);
   }
 
   test_export_variable() async {
     addLibrarySource('/a.dart', 'var x;');
     var library = await checkLibrary('export "a.dart";');
-    checkElementText(library, r'''
+    checkElementText(
+        library,
+        r'''
 export 'a.dart';
-''');
+
+--------------------
+Exports:
+  x: a.dart;x?
+  x=: a.dart;x=
+''',
+        withExportScope: true);
   }
 
   test_export_variable_const() async {
     addLibrarySource('/a.dart', 'const x = 0;');
     var library = await checkLibrary('export "a.dart";');
-    checkElementText(library, r'''
+    checkElementText(
+        library,
+        r'''
 export 'a.dart';
-''');
+
+--------------------
+Exports:
+  x: a.dart;x?
+''',
+        withExportScope: true);
   }
 
   test_export_variable_final() async {
     addLibrarySource('/a.dart', 'final x = 0;');
     var library = await checkLibrary('export "a.dart";');
-    checkElementText(library, r'''
+    checkElementText(
+        library,
+        r'''
 export 'a.dart';
-''');
+
+--------------------
+Exports:
+  x: a.dart;x?
+''',
+        withExportScope: true);
   }
 
   test_exportImport_configurations_useDefault() async {
-    context.declaredVariables =
+    declaredVariables =
         new DeclaredVariables.fromMap({'dart.library.io': 'false'});
     addLibrarySource('/foo.dart', 'class A {}');
     addLibrarySource('/foo_io.dart', 'class A {}');
@@ -4396,7 +5447,7 @@
   }
 
   test_exportImport_configurations_useFirst() async {
-    context.declaredVariables = new DeclaredVariables.fromMap(
+    declaredVariables = new DeclaredVariables.fromMap(
         {'dart.library.io': 'true', 'dart.library.html': 'true'});
     addLibrarySource('/foo.dart', 'class A {}');
     addLibrarySource('/foo_io.dart', 'class A {}');
@@ -4423,14 +5474,19 @@
     addLibrarySource('/a.dart', 'library a;');
     addLibrarySource('/b.dart', 'library b;');
     var library = await checkLibrary('export "a.dart"; export "b.dart";');
-    checkElementText(library, r'''
+    checkElementText(
+        library,
+        r'''
 export 'a.dart';
 export 'b.dart';
-''');
+
+--------------------
+Exports:
+''',
+        withExportScope: true);
   }
 
   test_expr_invalid_typeParameter_asPrefix() async {
-    variablesWithNotConstInitializers.add('f');
     var library = await checkLibrary('''
 class C<T> {
   final f = T.k;
@@ -4886,7 +5942,6 @@
   }
 
   test_genericFunction_asFunctionReturnType() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary(r'''
 int Function(int a, String b) f() => null;
 ''');
@@ -4896,7 +5951,6 @@
   }
 
   test_genericFunction_asFunctionTypedParameterReturnType() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary(r'''
 void f(int Function(int a, String b) p(num c)) => null;
 ''');
@@ -4906,7 +5960,6 @@
   }
 
   test_genericFunction_asGenericFunctionReturnType() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary(r'''
 typedef F = void Function(String a) Function(int b);
 ''');
@@ -4916,7 +5969,6 @@
   }
 
   test_genericFunction_asMethodReturnType() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary(r'''
 class C {
   int Function(int a, String b) m() => null;
@@ -4930,7 +5982,6 @@
   }
 
   test_genericFunction_asParameterType() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary(r'''
 void f(int Function(int a, String b) p) => null;
 ''');
@@ -4940,7 +5991,6 @@
   }
 
   test_genericFunction_asTopLevelVariableType() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary(r'''
 int Function(int a, String b) v;
 ''');
@@ -4949,88 +5999,6 @@
 ''');
   }
 
-  test_getElement_constructor_named() async {
-    String text = 'class C { C.named(); }';
-    Source source = addLibrarySource('/test.dart', text);
-    ConstructorElement original = context
-        .computeLibraryElement(source)
-        .getType('C')
-        .getNamedConstructor('named');
-    expect(original, isNotNull);
-    ConstructorElement resynthesized = _validateGetElement(text, original);
-    compareConstructorElements(resynthesized, original, 'C.constructor named');
-  }
-
-  test_getElement_constructor_unnamed() async {
-    String text = 'class C { C(); }';
-    Source source = addLibrarySource('/test.dart', text);
-    ConstructorElement original =
-        context.computeLibraryElement(source).getType('C').unnamedConstructor;
-    expect(original, isNotNull);
-    ConstructorElement resynthesized = _validateGetElement(text, original);
-    compareConstructorElements(resynthesized, original, 'C.constructor');
-  }
-
-  test_getElement_field() async {
-    String text = 'class C { var f; }';
-    Source source = addLibrarySource('/test.dart', text);
-    FieldElement original =
-        context.computeLibraryElement(source).getType('C').getField('f');
-    expect(original, isNotNull);
-    FieldElement resynthesized = _validateGetElement(text, original);
-    compareFieldElements(resynthesized, original, 'C.field f');
-  }
-
-  test_getElement_getter() async {
-    String text = 'class C { get f => null; }';
-    Source source = addLibrarySource('/test.dart', text);
-    PropertyAccessorElement original =
-        context.computeLibraryElement(source).getType('C').getGetter('f');
-    expect(original, isNotNull);
-    PropertyAccessorElement resynthesized = _validateGetElement(text, original);
-    comparePropertyAccessorElements(resynthesized, original, 'C.getter f');
-  }
-
-  test_getElement_method() async {
-    String text = 'class C { f() {} }';
-    Source source = addLibrarySource('/test.dart', text);
-    MethodElement original =
-        context.computeLibraryElement(source).getType('C').getMethod('f');
-    expect(original, isNotNull);
-    MethodElement resynthesized = _validateGetElement(text, original);
-    compareMethodElements(resynthesized, original, 'C.method f');
-  }
-
-  test_getElement_operator() async {
-    String text = 'class C { operator+(x) => null; }';
-    Source source = addLibrarySource('/test.dart', text);
-    MethodElement original =
-        context.computeLibraryElement(source).getType('C').getMethod('+');
-    expect(original, isNotNull);
-    MethodElement resynthesized = _validateGetElement(text, original);
-    compareMethodElements(resynthesized, original, 'C.operator+');
-  }
-
-  test_getElement_setter() async {
-    String text = 'class C { void set f(value) {} }';
-    Source source = addLibrarySource('/test.dart', text);
-    PropertyAccessorElement original =
-        context.computeLibraryElement(source).getType('C').getSetter('f');
-    expect(original, isNotNull);
-    PropertyAccessorElement resynthesized = _validateGetElement(text, original);
-    comparePropertyAccessorElements(resynthesized, original, 'C.setter f');
-  }
-
-  test_getElement_unit() async {
-    String text = 'class C { f() {} }';
-    Source source = addLibrarySource('/test.dart', text);
-    CompilationUnitElement original =
-        context.computeLibraryElement(source).definingCompilationUnit;
-    expect(original, isNotNull);
-    CompilationUnitElement resynthesized = _validateGetElement(text, original);
-    compareCompilationUnitElements(resynthesized, original);
-  }
-
   test_getter_documented() async {
     var library = await checkLibrary('''
 // Extra comment so doc comment offset != 0
@@ -5074,9 +6042,7 @@
 ''');
   }
 
-  @failingTest
   test_implicitConstructor_named_const() async {
-    // TODO(paulberry, scheglov): get this to pass
     var library = await checkLibrary('''
 class C {
   final Object x;
@@ -5084,7 +6050,27 @@
 }
 const x = C.named(42);
 ''');
-    checkElementText(library, 'TODO(paulberry, scheglov)');
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+class C {
+  final Object x;
+  const C.named(Object this.x);
+}
+const C x =
+        C/*location: test.dart;C*/.
+        named/*location: test.dart;C;named*/(42);
+''');
+    } else {
+      checkElementText(library, r'''
+class C {
+  final Object x;
+  const C.named(Object this.x);
+}
+const C x = const
+        C/*location: test.dart;C*/.
+        named/*location: test.dart;C;named*/(42);
+''');
+    }
   }
 
   test_implicitTopLevelVariable_getterFirst() async {
@@ -5106,8 +6092,9 @@
   }
 
   test_import_configurations_useDefault() async {
-    context.declaredVariables =
-        new DeclaredVariables.fromMap({'dart.library.io': 'false'});
+    declaredVariables = new DeclaredVariables.fromMap({
+      'dart.library.io': 'false',
+    });
     addLibrarySource('/foo.dart', 'class A {}');
     addLibrarySource('/foo_io.dart', 'class A {}');
     addLibrarySource('/foo_html.dart', 'class A {}');
@@ -5128,8 +6115,10 @@
   }
 
   test_import_configurations_useFirst() async {
-    context.declaredVariables = new DeclaredVariables.fromMap(
-        {'dart.library.io': 'true', 'dart.library.html': 'true'});
+    declaredVariables = new DeclaredVariables.fromMap({
+      'dart.library.io': 'true',
+      'dart.library.html': 'true',
+    });
     addLibrarySource('/foo.dart', 'class A {}');
     addLibrarySource('/foo_io.dart', 'class A {}');
     addLibrarySource('/foo_html.dart', 'class A {}');
@@ -5196,7 +6185,6 @@
 
   test_import_invalidUri_metadata() async {
     allowMissingFiles = true;
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary('''
 @foo
 import '';
@@ -5291,9 +6279,7 @@
 ''');
   }
 
-  @failingTest
-  void test_infer_generic_typedef_complex() async {
-    // TODO(paulberry, scheglov): get this test to pass.
+  test_infer_generic_typedef_complex() async {
     var library = await checkLibrary('''
 typedef F<T> = D<T,U> Function<U>();
 class C<V> {
@@ -5303,10 +6289,21 @@
 D<int,U> f<U>() => null;
 const x = const C(f);
 ''');
-    checkElementText(library, '''TODO(paulberry, scheglov)''');
+    checkElementText(library, '''
+typedef F<T> = D<T, U> Function<U>();
+class C<V> {
+  const C(<U>() → D<V, U> f);
+}
+class D<T, U> {
+}
+const C<int> x = const
+        C/*location: test.dart;C*/(
+        f/*location: test.dart;f*/);
+D<int, U> f<U>() {}
+''');
   }
 
-  void test_infer_generic_typedef_simple() async {
+  test_infer_generic_typedef_simple() async {
     var library = await checkLibrary('''
 typedef F = D<T> Function<T>();
 class C {
@@ -5386,7 +6383,7 @@
   }
 
   test_inference_issue_32394() async {
-    // Test the type inference involed in dartbug.com/32394
+    // Test the type inference involved in dartbug.com/32394
     var library = await checkLibrary('''
 var x = y.map((a) => a.toString());
 var y = [3];
@@ -5522,6 +6519,30 @@
 ''');
   }
 
+  test_inferred_type_initializer_cycle() async {
+    var library = await checkLibrary(r'''
+var a = b + 1;
+var b = c + 2;
+var c = a + 3;
+var d = 4;
+''');
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+dynamic a;
+dynamic b;
+dynamic c;
+int d;
+''');
+    } else {
+      checkElementText(library, r'''
+dynamic a/*error: dependencyCycle*/;
+dynamic b/*error: dependencyCycle*/;
+dynamic c/*error: dependencyCycle*/;
+int d;
+''');
+    }
+  }
+
   test_inferred_type_is_typedef() async {
     var library = await checkLibrary('typedef int F(String s);'
         ' class C extends D { var v; }'
@@ -5690,7 +6711,6 @@
   }
 
   test_inferredType_implicitCreation() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary(r'''
 class A {
   A();
@@ -5710,7 +6730,6 @@
   }
 
   test_inferredType_implicitCreation_prefixed() async {
-    shouldCompareLibraryElements = false;
     addLibrarySource('/foo.dart', '''
 class A {
   A();
@@ -5732,7 +6751,6 @@
   test_inferredType_usesSyntheticFunctionType_functionTypedParam() async {
     // AnalysisContext does not set the enclosing element for the synthetic
     // FunctionElement created for the [f, g] type argument.
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary('''
 int f(int x(String y)) => null;
 String g(int x(String y)) => null;
@@ -5939,7 +6957,6 @@
   }
 
   test_invalid_annotation_prefixed_constructor() async {
-    shouldCompareLibraryElements = false;
     addLibrarySource('/a.dart', r'''
 class C {
   const C.named();
@@ -5962,7 +6979,6 @@
   }
 
   test_invalid_annotation_unprefixed_constructor() async {
-    shouldCompareLibraryElements = false;
     addLibrarySource('/a.dart', r'''
 class C {
   const C.named();
@@ -5999,8 +7015,6 @@
   }
 
   test_invalid_nameConflict_imported() async {
-    shouldCompareLibraryElements = false;
-    namesThatCannotBeResolved.add('V');
     addLibrarySource('/a.dart', 'V() {}');
     addLibrarySource('/b.dart', 'V() {}');
     var library = await checkLibrary('''
@@ -6017,8 +7031,6 @@
   }
 
   test_invalid_nameConflict_imported_exported() async {
-    shouldCompareLibraryElements = false;
-    namesThatCannotBeResolved.add('V');
     addLibrarySource('/a.dart', 'V() {}');
     addLibrarySource('/b.dart', 'V() {}');
     addLibrarySource('/c.dart', r'''
@@ -6029,27 +7041,42 @@
 import 'c.dart';
 foo([p = V]) {}
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+import 'c.dart';
+dynamic foo([dynamic p =
+        V/*location: a.dart;V*/]) {}
+''');
+    } else {
+      checkElementText(library, r'''
 import 'c.dart';
 dynamic foo([dynamic p =
         V/*location: null*/]) {}
 ''');
+    }
   }
 
   test_invalid_nameConflict_local() async {
-    shouldCompareLibraryElements = false;
-    namesThatCannotBeResolved.add('V');
     var library = await checkLibrary('''
 foo([p = V]) {}
 V() {}
 var V;
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+dynamic V;
+dynamic foo([dynamic p =
+        V/*location: test.dart;V?*/]) {}
+dynamic V() {}
+''');
+    } else {
+      checkElementText(library, r'''
 dynamic V;
 dynamic foo([dynamic p =
         V/*location: null*/]) {}
 dynamic V() {}
 ''');
+    }
   }
 
   test_invalid_setterParameter_fieldFormalParameter() async {
@@ -6082,7 +7109,6 @@
 
   test_invalidUri_part_emptyUri() async {
     allowMissingFiles = true;
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary(r'''
 part '';
 class B extends A {}
@@ -6099,7 +7125,6 @@
 
   test_invalidUris() async {
     allowMissingFiles = true;
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary(r'''
 import ':[invaliduri]';
 import ':[invaliduri]:foo.dart';
@@ -6491,7 +7516,18 @@
 @foo.A.named()
 class C {}
 ''');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+import 'foo.dart' as foo;
+@
+        foo/*location: test.dart;foo*/.
+        A/*location: foo.dart;A*/.
+        named/*location: foo.dart;A;named*/()
+class C {
+}
+''');
+    } else {
+      checkElementText(library, r'''
 import 'foo.dart' as foo;
 @
         A/*location: foo.dart;A*/.
@@ -6499,6 +7535,7 @@
 class C {
 }
 ''');
+    }
   }
 
   test_metadata_constructor_call_unnamed() async {
@@ -6518,13 +7555,24 @@
     addLibrarySource('/foo.dart', 'class A { const A(); }');
     var library =
         await checkLibrary('import "foo.dart" as foo; @foo.A() class C {}');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+import 'foo.dart' as foo;
+@
+        foo/*location: test.dart;foo*/.
+        A/*location: foo.dart;A*/()
+class C {
+}
+''');
+    } else {
+      checkElementText(library, r'''
 import 'foo.dart' as foo;
 @
         A/*location: foo.dart;A*/()
 class C {
 }
 ''');
+    }
   }
 
   test_metadata_constructor_call_with_args() async {
@@ -6725,15 +7773,24 @@
   }
 
   test_metadata_invalid_classDeclaration() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary('f(_) {} @f(42) class C {}');
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+@
+        f/*location: test.dart;f*/(42)
+class C {
+}
+dynamic f(dynamic _) {}
+''');
+    } else {
+      checkElementText(library, r'''
 @
         __unresolved__/*location: null*/
 class C {
 }
 dynamic f(dynamic _) {}
 ''');
+    }
   }
 
   test_metadata_libraryDirective() async {
@@ -6841,6 +7898,23 @@
 ''');
   }
 
+  test_metadata_simpleFormalParameter_method() async {
+    var library = await checkLibrary('''
+const a = null;
+
+class C {
+  m(@a x) {}
+}
+''');
+    checkElementText(library, r'''
+class C {
+  dynamic m(@
+        a/*location: test.dart;a?*/ dynamic x) {}
+}
+const dynamic a = null;
+''');
+  }
+
   test_metadata_simpleFormalParameter_withDefault() async {
     var library = await checkLibrary('const a = null; f([@a x = null]) {}');
     checkElementText(library, r'''
@@ -7048,7 +8122,6 @@
   }
 
   test_nameConflict_exportedAndLocal() async {
-    namesThatCannotBeResolved.add('V');
     addLibrarySource('/a.dart', 'class C {}');
     addLibrarySource('/c.dart', '''
 export 'a.dart';
@@ -7065,7 +8138,6 @@
   }
 
   test_nameConflict_exportedAndLocal_exported() async {
-    namesThatCannotBeResolved.add('V');
     addLibrarySource('/a.dart', 'class C {}');
     addLibrarySource('/c.dart', '''
 export 'a.dart';
@@ -7083,7 +8155,6 @@
   }
 
   test_nameConflict_exportedAndParted() async {
-    namesThatCannotBeResolved.add('V');
     addLibrarySource('/a.dart', 'class C {}');
     addLibrarySource('/b.dart', '''
 part of lib;
@@ -7195,6 +8266,58 @@
 ''');
   }
 
+  test_new_typedef_notSimplyBounded_self() async {
+    var library = await checkLibrary('''
+typedef F<T extends F> = void Function();
+''');
+    checkElementText(library, r'''
+notSimplyBounded typedef F<T extends () → void> = void Function();
+''');
+  }
+
+  test_new_typedef_notSimplyBounded_simple_no_bounds() async {
+    var library = await checkLibrary('''
+typedef F<T> = void Function();
+''');
+    checkElementText(library, r'''
+typedef F<T> = void Function();
+''');
+  }
+
+  test_new_typedef_notSimplyBounded_simple_non_generic() async {
+    var library = await checkLibrary('''
+typedef F = void Function();
+''');
+    checkElementText(library, r'''
+typedef F = void Function();
+''');
+  }
+
+  test_old_typedef_notSimplyBounded_self() async {
+    var library = await checkLibrary('''
+typedef void F<T extends F>();
+''');
+    checkElementText(library, r'''
+notSimplyBounded typedef F<T extends () → void> = void Function();
+''');
+  }
+
+  test_old_typedef_notSimplyBounded_simple_because_non_generic() async {
+    var library = await checkLibrary('''
+typedef void F();
+''');
+    checkElementText(library, r'''
+typedef F = void Function();
+''');
+  }
+
+  test_old_typedef_notSimplyBounded_simple_no_bounds() async {
+    var library = await checkLibrary('typedef void F<T>();');
+    checkElementText(library, r'''
+typedef F<T> = void Function();
+''');
+  }
+
   test_operator() async {
     var library =
         await checkLibrary('class C { C operator+(C other) => null; }');
@@ -7438,7 +8561,6 @@
 
   test_parts_invalidUri() async {
     allowMissingFiles = true;
-    shouldCompareLibraryElements = false;
     addSource('/foo/bar.dart', 'part of my.lib;');
     var library = await checkLibrary('library my.lib; part "foo/";');
     checkElementText(library, r'''
@@ -7452,7 +8574,6 @@
 
   test_parts_invalidUri_nullStringValue() async {
     allowMissingFiles = true;
-    shouldCompareLibraryElements = false;
     addSource('/foo/bar.dart', 'part of my.lib;');
     var library = await checkLibrary(r'''
 library my.lib;
@@ -7738,6 +8859,21 @@
 ''');
   }
 
+  test_type_inference_multiplyDefinedElement() async {
+    addLibrarySource('/a.dart', 'class C {}');
+    addLibrarySource('/b.dart', 'class C {}');
+    var library = await checkLibrary('''
+import 'a.dart';
+import 'b.dart';
+var v = C;
+''');
+    checkElementText(library, r'''
+import 'a.dart';
+import 'b.dart';
+dynamic v;
+''');
+  }
+
   test_type_inference_nested_function() async {
     var library = await checkLibrary('''
 var x = (t) => (u) => t + u;
@@ -7807,6 +8943,15 @@
 ''');
   }
 
+  test_type_invalid_unresolvedPrefix() async {
+    var library = await checkLibrary('''
+p.C v;
+''', allowErrors: true);
+    checkElementText(library, r'''
+dynamic v;
+''');
+  }
+
   test_type_reference_lib_to_lib() async {
     var library = await checkLibrary('''
 class C {}
@@ -8149,7 +9294,6 @@
   }
 
   test_typedef_generic_asFieldType() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary(r'''
 typedef Foo<S> = S Function<T>(T x);
 class A {
@@ -8164,6 +9308,116 @@
 ''');
   }
 
+  test_typedef_notSimplyBounded_dependency_via_param_type_new_style_name_included() async {
+    // F is considered "not simply bounded" because it expands to a type that
+    // refers to C, which is not simply bounded.
+    var library = await checkLibrary('''
+typedef F = void Function(C c);
+class C<T extends C<T>> {}
+''');
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+notSimplyBounded typedef F = void Function(C<dynamic> c);
+notSimplyBounded class C<T extends C<T>> {
+}
+''');
+    } else {
+      checkElementText(library, r'''
+notSimplyBounded typedef F = void Function(C<C<dynamic>> c);
+notSimplyBounded class C<T extends C<T>> {
+}
+''');
+    }
+  }
+
+  test_typedef_notSimplyBounded_dependency_via_param_type_new_style_name_omitted() async {
+    // F is considered "not simply bounded" because it expands to a type that
+    // refers to C, which is not simply bounded.
+    var library = await checkLibrary('''
+typedef F = void Function(C);
+class C<T extends C<T>> {}
+''');
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+notSimplyBounded typedef F = void Function(C<dynamic> );
+notSimplyBounded class C<T extends C<T>> {
+}
+''');
+    } else {
+      checkElementText(library, r'''
+notSimplyBounded typedef F = void Function(C<C<dynamic>> );
+notSimplyBounded class C<T extends C<T>> {
+}
+''');
+    }
+  }
+
+  test_typedef_notSimplyBounded_dependency_via_param_type_old_style() async {
+    // F is considered "not simply bounded" because it expands to a type that
+    // refers to C, which is not simply bounded.
+    var library = await checkLibrary('''
+typedef void F(C c);
+class C<T extends C<T>> {}
+''');
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+notSimplyBounded typedef F = void Function(C<dynamic> c);
+notSimplyBounded class C<T extends C<T>> {
+}
+''');
+    } else {
+      checkElementText(library, r'''
+notSimplyBounded typedef F = void Function(C<C<dynamic>> c);
+notSimplyBounded class C<T extends C<T>> {
+}
+''');
+    }
+  }
+
+  test_typedef_notSimplyBounded_dependency_via_return_type_new_style() async {
+    // F is considered "not simply bounded" because it expands to a type that
+    // refers to C, which is not simply bounded.
+    var library = await checkLibrary('''
+typedef F = C Function();
+class C<T extends C<T>> {}
+''');
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+notSimplyBounded typedef F = C<dynamic> Function();
+notSimplyBounded class C<T extends C<T>> {
+}
+''');
+    } else {
+      checkElementText(library, r'''
+notSimplyBounded typedef F = C<C<dynamic>> Function();
+notSimplyBounded class C<T extends C<T>> {
+}
+''');
+    }
+  }
+
+  test_typedef_notSimplyBounded_dependency_via_return_type_old_style() async {
+    // F is considered "not simply bounded" because it expands to a type that
+    // refers to C, which is not simply bounded.
+    var library = await checkLibrary('''
+typedef C F();
+class C<T extends C<T>> {}
+''');
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+notSimplyBounded typedef F = C<dynamic> Function();
+notSimplyBounded class C<T extends C<T>> {
+}
+''');
+    } else {
+      checkElementText(library, r'''
+notSimplyBounded typedef F = C<C<dynamic>> Function();
+notSimplyBounded class C<T extends C<T>> {
+}
+''');
+    }
+  }
+
   test_typedef_parameter_parameters() async {
     var library = await checkLibrary('typedef F(g(x, y));');
     checkElementText(library, r'''
@@ -8259,7 +9513,6 @@
   }
 
   test_typedef_type_parameters_bound_recursive() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary('typedef void F<T extends F>();');
     // Typedefs cannot reference themselves.
     checkElementText(library, r'''
@@ -8268,12 +9521,17 @@
   }
 
   test_typedef_type_parameters_bound_recursive2() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary('typedef void F<T extends List<F>>();');
     // Typedefs cannot reference themselves.
-    checkElementText(library, r'''
+    if (isAstBasedSummary) {
+      checkElementText(library, r'''
+notSimplyBounded typedef F<T extends List<dynamic>> = void Function();
+''');
+    } else {
+      checkElementText(library, r'''
 notSimplyBounded typedef F<T extends List<() → void>> = void Function();
 ''');
+    }
   }
 
   test_typedef_type_parameters_f_bound_complex() async {
@@ -8306,9 +9564,7 @@
 ''');
   }
 
-  @failingTest
   test_unresolved_annotation_instanceCreation_argument_super() async {
-    // TODO(scheglov) fix https://github.com/dart-lang/sdk/issues/28553
     var library = await checkLibrary('''
 class A {
   const A(_);
@@ -8319,17 +9575,16 @@
 ''', allowErrors: true);
     checkElementText(library, r'''
 class A {
-  A(_);
+  const A(dynamic _);
 }
-
+@
+        A/*location: test.dart;A*/(super)
 class C {
-  synthetic C();
 }
 ''');
   }
 
   test_unresolved_annotation_instanceCreation_argument_this() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary('''
 class A {
   const A(_);
@@ -8350,7 +9605,6 @@
   }
 
   test_unresolved_annotation_namedConstructorCall_noClass() async {
-    shouldCompareLibraryElements = false;
     var library =
         await checkLibrary('@foo.bar() class C {}', allowErrors: true);
     checkElementText(library, r'''
@@ -8363,7 +9617,6 @@
   }
 
   test_unresolved_annotation_namedConstructorCall_noConstructor() async {
-    shouldCompareLibraryElements = false;
     var library =
         await checkLibrary('@String.foo() class C {}', allowErrors: true);
     checkElementText(library, r'''
@@ -8376,7 +9629,6 @@
   }
 
   test_unresolved_annotation_prefixedIdentifier_badPrefix() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary('@foo.bar class C {}', allowErrors: true);
     checkElementText(library, r'''
 @
@@ -8388,7 +9640,6 @@
   }
 
   test_unresolved_annotation_prefixedIdentifier_noDeclaration() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary(
         'import "dart:async" as foo; @foo.bar class C {}',
         allowErrors: true);
@@ -8403,7 +9654,6 @@
   }
 
   test_unresolved_annotation_prefixedNamedConstructorCall_badPrefix() async {
-    shouldCompareLibraryElements = false;
     var library =
         await checkLibrary('@foo.bar.baz() class C {}', allowErrors: true);
     checkElementText(library, r'''
@@ -8417,7 +9667,6 @@
   }
 
   test_unresolved_annotation_prefixedNamedConstructorCall_noClass() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary(
         'import "dart:async" as foo; @foo.bar.baz() class C {}',
         allowErrors: true);
@@ -8433,7 +9682,6 @@
   }
 
   test_unresolved_annotation_prefixedNamedConstructorCall_noConstructor() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary(
         'import "dart:async" as foo; @foo.Future.bar() class C {}',
         allowErrors: true);
@@ -8449,7 +9697,6 @@
   }
 
   test_unresolved_annotation_prefixedUnnamedConstructorCall_badPrefix() async {
-    shouldCompareLibraryElements = false;
     var library =
         await checkLibrary('@foo.bar() class C {}', allowErrors: true);
     checkElementText(library, r'''
@@ -8462,7 +9709,6 @@
   }
 
   test_unresolved_annotation_prefixedUnnamedConstructorCall_noClass() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary(
         'import "dart:async" as foo; @foo.bar() class C {}',
         allowErrors: true);
@@ -8477,7 +9723,6 @@
   }
 
   test_unresolved_annotation_simpleIdentifier() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary('@foo class C {}', allowErrors: true);
     checkElementText(library, r'''
 @
@@ -8488,7 +9733,6 @@
   }
 
   test_unresolved_annotation_unnamedConstructorCall_noClass() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary('@foo() class C {}', allowErrors: true);
     checkElementText(library, r'''
 @
@@ -8530,7 +9774,6 @@
   }
 
   test_unused_type_parameter() async {
-    shouldCompareLibraryElements = false;
     var library = await checkLibrary('''
 class C<T> {
   void f() {}
@@ -8768,1272 +10011,17 @@
 int j;
 ''');
   }
-
-  /**
-   * Encode the library containing [original] into a summary and then use
-   * [TestSummaryResynthesizer.getElement] to retrieve just the original
-   * element from the resynthesized summary.
-   */
-  Element _validateGetElement(String text, Element original) {
-    SummaryResynthesizer resynthesizer = encodeLibrary(original.library.source);
-    ElementLocationImpl location = original.location;
-    Element result = resynthesizer.getElement(location);
-    checkMinimalResynthesisWork(resynthesizer, original.library);
-    // Check that no other summaries needed to be resynthesized to resynthesize
-    // the library element.
-    expect(resynthesizer.resynthesisCount, 3);
-    expect(result.location, location);
-    return result;
-  }
 }
 
 /// Mixin containing helper methods for testing summary resynthesis.  Intended
 /// to be applied to a class implementing [ResynthesizeTestStrategy].
 mixin ResynthesizeTestHelpers implements ResynthesizeTestStrategy {
-  /**
-   * Names of variables which have initializers that are not valid constants,
-   * so they are not resynthesized.
-   */
-  final variablesWithNotConstInitializers = Set<String>();
-
-  /**
-   * Tests may set this to `false` to indicate that resynthesized elements
-   * should not be compare with elements created using AnalysisContext.
-   */
-  bool shouldCompareLibraryElements = true;
-
-  /**
-   * Names that cannot be resolved, e.g. because of duplicate declaration.
-   */
-  final namesThatCannotBeResolved = Set<String>();
-
-  /**
-   * Verify that the given prefix is safe to elide from a resynthesized AST.
-   */
-  void checkElidablePrefix(SimpleIdentifier prefix) {
-    if (prefix.staticElement is! PrefixElement &&
-        prefix.staticElement is! ClassElement) {
-      fail('Prefix of type ${prefix.staticElement.runtimeType}'
-          ' should not have been elided');
-    }
-  }
-
   Future<LibraryElementImpl> checkLibrary(String text,
       {bool allowErrors: false, bool dumpSummaries: false}) async {
     Source source = addTestSource(text);
-    LibraryElementImpl resynthesized = _encodeDecodeLibraryElement(source);
-    LibraryElementImpl original = context.computeLibraryElement(source);
-    if (!allowErrors) {
-      List<AnalysisError> errors = context.computeErrors(source);
-      if (errors.where((e) => e.message.startsWith('unused')).isNotEmpty) {
-        fail('Analysis errors: $errors');
-      }
-    }
-    if (shouldCompareLibraryElements) {
-      checkLibraryElements(original, resynthesized);
-    }
-    return resynthesized;
-  }
-
-  void checkLibraryElements(
-      LibraryElementImpl original, LibraryElementImpl resynthesized) {
-    compareElements(resynthesized, original, '(library)');
-    expect(resynthesized.displayName, original.displayName);
-    expect(original.enclosingElement, isNull);
-    expect(resynthesized.enclosingElement, isNull);
-    expect(resynthesized.hasExtUri, original.hasExtUri);
-    compareCompilationUnitElements(resynthesized.definingCompilationUnit,
-        original.definingCompilationUnit);
-    expect(resynthesized.parts.length, original.parts.length, reason: 'parts');
-    for (int i = 0; i < resynthesized.parts.length; i++) {
-      compareCompilationUnitElements(resynthesized.parts[i], original.parts[i]);
-    }
-    expect(resynthesized.imports.length, original.imports.length,
-        reason: 'imports');
-    for (int i = 0; i < resynthesized.imports.length; i++) {
-      ImportElement originalImport = original.imports[i];
-      compareImportElements(
-          resynthesized.imports[i], originalImport, originalImport.toString());
-    }
-    expect(resynthesized.exports.length, original.exports.length,
-        reason: 'exports');
-    for (int i = 0; i < resynthesized.exports.length; i++) {
-      ExportElement originalExport = original.exports[i];
-      compareExportElements(
-          resynthesized.exports[i], originalExport, originalExport.toString());
-    }
-    expect(resynthesized.nameLength, original.nameLength);
-    compareNamespaces(resynthesized.publicNamespace, original.publicNamespace,
-        '(public namespace)');
-    compareNamespaces(resynthesized.exportNamespace, original.exportNamespace,
-        '(export namespace)');
-    if (original.entryPoint == null) {
-      expect(resynthesized.entryPoint, isNull);
-    } else {
-      expect(resynthesized.entryPoint, isNotNull);
-      compareFunctionElements(
-          resynthesized.entryPoint, original.entryPoint, '(entry point)');
-    }
-    // The libraries `dart:core` and `dart:async` cannot create their
-    // `loadLibrary` functions until after both are created.
-    if (original.name != 'dart.core' && original.name != 'dart.async') {
-      compareExecutableElements(
-          resynthesized.loadLibraryFunction as ExecutableElementImpl,
-          original.loadLibraryFunction as ExecutableElementImpl,
-          '(loadLibraryFunction)');
-    }
-    expect(resynthesized.libraryCycle.toSet(), original.libraryCycle.toSet());
-  }
-
-  void checkPossibleLocalElements(Element resynthesized, Element original) {
-    if (original is! LocalElement && resynthesized is! LocalElement) {
-      return;
-    }
-    if (original is LocalElement && resynthesized is LocalElement) {
-      expect(resynthesized.visibleRange, original.visibleRange);
-    } else {
-      fail('Incompatible local elements '
-          '${resynthesized.runtimeType} vs. ${original.runtimeType}');
-    }
-  }
-
-  void checkPossibleMember(
-      Element resynthesized, Element original, String desc) {
-    Element resynthesizedNonHandle = resynthesized is ElementHandle
-        ? resynthesized.actualElement
-        : resynthesized;
-    if (original is Member) {
-      expect(resynthesizedNonHandle, new TypeMatcher<Member>(), reason: desc);
-      if (resynthesizedNonHandle is Member) {
-        List<DartType> resynthesizedTypeArguments =
-            resynthesizedNonHandle.definingType.typeArguments;
-        List<DartType> originalTypeArguments =
-            original.definingType.typeArguments;
-        expect(
-            resynthesizedTypeArguments, hasLength(originalTypeArguments.length),
-            reason: desc);
-        for (int i = 0; i < originalTypeArguments.length; i++) {
-          compareTypeImpls(resynthesizedTypeArguments[i],
-              originalTypeArguments[i], '$desc type argument $i');
-        }
-      }
-    } else {
-      expect(
-          resynthesizedNonHandle, isNot(new TypeMatcher<ConstructorMember>()),
-          reason: desc);
-    }
-  }
-
-  void compareClassElements(ClassElement r, ClassElement o, String desc) {
-    compareElements(r, o, desc);
-    expect(r.fields.length, o.fields.length, reason: '$desc fields.length');
-    for (int i = 0; i < r.fields.length; i++) {
-      String name = o.fields[i].name;
-      compareFieldElements(r.fields[i], o.fields[i], '$desc.field $name');
-    }
-    compareTypes(r.supertype, o.supertype, '$desc supertype');
-    expect(r.interfaces.length, o.interfaces.length,
-        reason: '$desc interfaces.length');
-    for (int i = 0; i < r.interfaces.length; i++) {
-      compareTypes(r.interfaces[i], o.interfaces[i],
-          '$desc interface ${o.interfaces[i].name}');
-    }
-    expect(r.mixins.length, o.mixins.length, reason: '$desc mixins.length');
-    for (int i = 0; i < r.mixins.length; i++) {
-      compareTypes(r.mixins[i], o.mixins[i], '$desc mixin ${o.mixins[i].name}');
-    }
-    expect(r.typeParameters.length, o.typeParameters.length,
-        reason: '$desc typeParameters.length');
-    for (int i = 0; i < r.typeParameters.length; i++) {
-      compareTypeParameterElements(r.typeParameters[i], o.typeParameters[i],
-          '$desc type parameter ${o.typeParameters[i].name}');
-    }
-    expect(r.constructors.length, o.constructors.length,
-        reason: '$desc constructors.length');
-    for (int i = 0; i < r.constructors.length; i++) {
-      compareConstructorElements(r.constructors[i], o.constructors[i],
-          '$desc constructor ${o.constructors[i].name}');
-    }
-    expect(r.accessors.length, o.accessors.length,
-        reason: '$desc accessors.length');
-    List<PropertyAccessorElement> rAccessors = _getSortedPropertyAccessors(r);
-    List<PropertyAccessorElement> oAccessors = _getSortedPropertyAccessors(o);
-    for (int i = 0; i < r.accessors.length; i++) {
-      comparePropertyAccessorElements(
-          rAccessors[i], oAccessors[i], '$desc accessor ${oAccessors[i].name}');
-    }
-    expect(r.methods.length, o.methods.length, reason: '$desc methods.length');
-    for (int i = 0; i < r.methods.length; i++) {
-      compareMethodElements(
-          r.methods[i], o.methods[i], '$desc.${o.methods[i].name}');
-    }
-    compareTypes(r.type, o.type, desc);
-    if (r is ClassElementImpl && o is ClassElementImpl) {
-      expect(r.hasBeenInferred, o.hasBeenInferred, reason: desc);
-    }
-  }
-
-  void compareCompilationUnitElements(CompilationUnitElementImpl resynthesized,
-      CompilationUnitElementImpl original) {
-    String desc = 'Compilation unit ${original.source.uri}';
-    expect(resynthesized.source, original.source);
-    expect(resynthesized.librarySource, original.librarySource);
-    compareLineInfo(resynthesized.lineInfo, original.lineInfo);
-
-    expect(resynthesized.types.length, original.types.length,
-        reason: '$desc.types.length');
-    for (int i = 0; i < resynthesized.types.length; i++) {
-      compareClassElements(
-          resynthesized.types[i], original.types[i], original.types[i].name);
-    }
-
-    // TODO(scheglov) Uncomment once the tasks based implementation is ready.
-//    expect(resynthesized.mixins.length, original.mixins.length,
-//        reason: '$desc.mixins.length');
-//    for (int i = 0; i < resynthesized.mixins.length; i++) {
-//      compareClassElements(
-//          resynthesized.mixins[i], original.mixins[i], original.mixins[i].name);
-//    }
-
-    expect(resynthesized.topLevelVariables.length,
-        original.topLevelVariables.length,
-        reason: '$desc.topLevelVariables.length');
-    for (int i = 0; i < resynthesized.topLevelVariables.length; i++) {
-      String name = resynthesized.topLevelVariables[i].name;
-      compareTopLevelVariableElements(
-          resynthesized.topLevelVariables[i],
-          original.topLevelVariables
-              .singleWhere((TopLevelVariableElement e) => e.name == name),
-          '$desc.topLevelVariables[$name]');
-    }
-    expect(resynthesized.functions.length, original.functions.length,
-        reason: '$desc.functions.length');
-    for (int i = 0; i < resynthesized.functions.length; i++) {
-      compareFunctionElements(resynthesized.functions[i], original.functions[i],
-          '$desc.functions[$i] /* ${original.functions[i].name} */');
-    }
-    expect(resynthesized.functionTypeAliases.length,
-        original.functionTypeAliases.length,
-        reason: '$desc.functionTypeAliases.length');
-    for (int i = 0; i < resynthesized.functionTypeAliases.length; i++) {
-      compareFunctionTypeAliasElements(
-          resynthesized.functionTypeAliases[i],
-          original.functionTypeAliases[i],
-          original.functionTypeAliases[i].name);
-    }
-    expect(resynthesized.enums.length, original.enums.length,
-        reason: '$desc.enums.length');
-    for (int i = 0; i < resynthesized.enums.length; i++) {
-      compareClassElements(
-          resynthesized.enums[i], original.enums[i], original.enums[i].name);
-    }
-    expect(resynthesized.accessors.length, original.accessors.length,
-        reason: '$desc.accessors.length');
-    for (int i = 0; i < resynthesized.accessors.length; i++) {
-      String name = resynthesized.accessors[i].name;
-      if (original.accessors[i].isGetter) {
-        comparePropertyAccessorElements(
-            resynthesized.accessors[i],
-            original.accessors
-                .singleWhere((PropertyAccessorElement e) => e.name == name),
-            '$desc.accessors[$i] /* getter $name */');
-      } else {
-        comparePropertyAccessorElements(
-            resynthesized.accessors[i],
-            original.accessors
-                .singleWhere((PropertyAccessorElement e) => e.name == name),
-            '$desc.accessors[$i] /* setter $name */');
-      }
-    }
-    // Note: no need to test CompilationUnitElementImpl._offsetToElementMap
-    // since it is built on demand when needed (see
-    // CompilationUnitElementImpl.getElementAt])
-  }
-
-  void compareConstAstLists(
-      List<Object> rItems, List<Object> oItems, String desc) {
-    if (rItems == null && oItems == null) {
-      return;
-    }
-    expect(rItems != null && oItems != null, isTrue);
-    expect(rItems, hasLength(oItems.length));
-    for (int i = 0; i < oItems.length; i++) {
-      Object rItem = rItems[i];
-      Object oItem = oItems[i];
-      if (rItem is Expression && oItem is Expression) {
-        compareConstAsts(rItem, oItem, desc);
-      } else if (rItem is TypeName && oItem is TypeName) {
-        compareConstAsts(rItem.name, oItem.name, desc);
-      } else if (rItem is InterpolationString && oItem is InterpolationString) {
-        expect(rItem.value, oItem.value);
-      } else if (rItem is InterpolationExpression &&
-          oItem is InterpolationExpression) {
-        compareConstAsts(rItem.expression, oItem.expression, desc);
-      } else if (rItem is MapLiteralEntry && oItem is MapLiteralEntry) {
-        compareConstAsts(rItem.key, oItem.key, desc);
-        compareConstAsts(rItem.value, oItem.value, desc);
-      } else if (oItem is ConstructorFieldInitializer &&
-          rItem is ConstructorFieldInitializer) {
-        compareConstAsts(rItem.fieldName, oItem.fieldName, desc);
-        if (variablesWithNotConstInitializers.contains(rItem.fieldName.name)) {
-          expect(rItem.expression, isNull, reason: desc);
-        } else {
-          compareConstAsts(rItem.expression, oItem.expression, desc);
-        }
-      } else if (oItem is AssertInitializer && rItem is AssertInitializer) {
-        compareConstAsts(rItem.condition, oItem.condition, '$desc condition');
-        compareConstAsts(rItem.message, oItem.message, '$desc message');
-      } else if (oItem is SuperConstructorInvocation &&
-          rItem is SuperConstructorInvocation) {
-        compareElements(rItem.staticElement, oItem.staticElement, desc);
-        compareConstAsts(rItem.constructorName, oItem.constructorName, desc);
-        compareConstAstLists(
-            rItem.argumentList.arguments, oItem.argumentList.arguments, desc);
-      } else if (oItem is RedirectingConstructorInvocation &&
-          rItem is RedirectingConstructorInvocation) {
-        compareElements(rItem.staticElement, oItem.staticElement, desc);
-        compareConstAsts(rItem.constructorName, oItem.constructorName, desc);
-        compareConstAstLists(
-            rItem.argumentList.arguments, oItem.argumentList.arguments, desc);
-      } else {
-        fail('$desc Incompatible item types: '
-            '${rItem.runtimeType} vs. ${oItem.runtimeType}');
-      }
-    }
-  }
-
-  void compareConstAsts(AstNode r, AstNode o, String desc) {
-    if (o == null) {
-      expect(r, isNull, reason: desc);
-    } else {
-      expect(r, isNotNull, reason: desc);
-      // ConstantAstCloner does not copy static types, and constant values
-      // computer does not use static types. So, we don't set them during
-      // resynthesis and should not check them here.
-      if (o is ParenthesizedExpression) {
-        // We don't resynthesize parenthesis, so just ignore it.
-        compareConstAsts(r, o.expression, desc);
-      } else if (o is SimpleIdentifier && r is SimpleIdentifier) {
-        expect(r.name, o.name, reason: desc);
-        if (namesThatCannotBeResolved.contains(r.name)) {
-          expect(r.staticElement, isNull);
-        } else {
-          compareElements(r.staticElement, o.staticElement, desc);
-        }
-      } else if (o is PrefixedIdentifier && r is SimpleIdentifier) {
-        // We don't resynthesize prefixed identifiers when the prefix refers to
-        // a PrefixElement or a ClassElement.  We use simple identifiers with
-        // correct elements.
-        if (o.prefix.staticElement is PrefixElement ||
-            o.prefix.staticElement is ClassElement) {
-          compareConstAsts(r, o.identifier, desc);
-        } else {
-          fail('Prefix of type ${o.prefix.staticElement.runtimeType} should not'
-              ' have been elided');
-        }
-      } else if (o is SimpleIdentifier && r is PrefixedIdentifier) {
-        // In 'class C {static const a = 0; static const b = a;}' the reference
-        // to 'a' in 'b' is serialized as a fully qualified 'C.a' reference.
-        if (r.prefix.staticElement is ClassElement) {
-          Element oElement = resolutionMap.staticElementForIdentifier(o);
-          compareElements(
-              r.prefix.staticElement, oElement?.enclosingElement, desc);
-          compareConstAsts(r.identifier, o, desc);
-        } else {
-          fail('Prefix of type ${r.prefix.staticElement.runtimeType} should not'
-              ' have been elided');
-        }
-      } else if (o is PropertyAccess &&
-          o.target is PrefixedIdentifier &&
-          r is PrefixedIdentifier) {
-        // We don't resynthesize prefixed identifiers when the prefix refers to
-        // a PrefixElement or a ClassElement.  Which means that if the original
-        // expression was e.g. `prefix.topLevelVariableName.length`, it will get
-        // resynthesized as `topLevelVariableName.length`
-        PrefixedIdentifier oTarget = o.target;
-        checkElidablePrefix(oTarget.prefix);
-        compareConstAsts(
-            r,
-            AstTestFactory.identifier(oTarget.identifier, o.propertyName),
-            desc);
-      } else if (o is PrefixedIdentifier && r is PrefixedIdentifier) {
-        compareConstAsts(r.prefix, o.prefix, desc);
-        compareConstAsts(r.identifier, o.identifier, desc);
-      } else if (o is PropertyAccess && r is PropertyAccess) {
-        compareConstAsts(r.target, o.target, desc);
-        String oName = o.propertyName.name;
-        String rName = r.propertyName.name;
-        expect(rName, oName, reason: desc);
-        if (oName == 'length') {
-          compareElements(
-              r.propertyName.staticElement, o.propertyName.staticElement, desc);
-        }
-      } else if (o is PropertyAccess &&
-          o.target is PrefixedIdentifier &&
-          r is SimpleIdentifier) {
-        // We don't resynthesize property access when it takes the form
-        // `prefixName.className.staticMember`.  We just resynthesize a
-        // SimpleIdentifier correctly resolved to the static member.
-        PrefixedIdentifier oTarget = o.target;
-        checkElidablePrefix(oTarget.prefix);
-        checkElidablePrefix(oTarget.identifier);
-        compareConstAsts(r, o.propertyName, desc);
-      } else if (o is SuperExpression && r is SuperExpression) {
-        // Nothing to compare.
-      } else if (o is ThisExpression && r is ThisExpression) {
-        // Nothing to compare.
-      } else if (o is NullLiteral) {
-        expect(r, new TypeMatcher<NullLiteral>(), reason: desc);
-      } else if (o is BooleanLiteral && r is BooleanLiteral) {
-        expect(r.value, o.value, reason: desc);
-      } else if (o is IntegerLiteral && r is IntegerLiteral) {
-        expect(r.value ?? 0, o.value ?? 0, reason: desc);
-      } else if (o is IntegerLiteral && r is PrefixExpression) {
-        expect(r.operator.type, TokenType.MINUS);
-        IntegerLiteral ri = r.operand;
-        expect(-ri.value, o.value, reason: desc);
-      } else if (o is DoubleLiteral && r is DoubleLiteral) {
-        if (r.value != null &&
-            r.value.isNaN &&
-            o.value != null &&
-            o.value.isNaN) {
-          // NaN is not comparable.
-        } else {
-          expect(r.value, o.value, reason: desc);
-        }
-      } else if (o is StringInterpolation && r is StringInterpolation) {
-        compareConstAstLists(r.elements, o.elements, desc);
-      } else if (o is StringLiteral && r is StringLiteral) {
-        // We don't keep all the tokens of AdjacentStrings.
-        // So, we can compare only their values.
-        expect(r.stringValue, o.stringValue, reason: desc);
-      } else if (o is SymbolLiteral && r is SymbolLiteral) {
-        // We don't keep all the tokens of symbol literals.
-        // So, we can compare only their values.
-        expect(r.components.map((t) => t.lexeme).join('.'),
-            o.components.map((t) => t.lexeme).join('.'),
-            reason: desc);
-      } else if (o is NamedExpression && r is NamedExpression) {
-        expect(r.name.label.name, o.name.label.name, reason: desc);
-        compareConstAsts(r.expression, o.expression, desc);
-      } else if (o is BinaryExpression && r is BinaryExpression) {
-        expect(r.operator.lexeme, o.operator.lexeme, reason: desc);
-        compareConstAsts(r.leftOperand, o.leftOperand, desc);
-        compareConstAsts(r.rightOperand, o.rightOperand, desc);
-      } else if (o is PrefixExpression && r is PrefixExpression) {
-        expect(r.operator.lexeme, o.operator.lexeme, reason: desc);
-        compareConstAsts(r.operand, o.operand, desc);
-      } else if (o is ConditionalExpression && r is ConditionalExpression) {
-        compareConstAsts(r.condition, o.condition, desc);
-        compareConstAsts(r.thenExpression, o.thenExpression, desc);
-        compareConstAsts(r.elseExpression, o.elseExpression, desc);
-      } else if (o is ListLiteral && r is ListLiteral) {
-        compareConstAstLists(
-            r.typeArguments?.arguments, o.typeArguments?.arguments, desc);
-        compareConstAstLists(r.elements, o.elements, desc);
-      } else if (o is MapLiteral && r is MapLiteral) {
-        compareConstAstLists(
-            r.typeArguments?.arguments, o.typeArguments?.arguments, desc);
-        compareConstAstLists(r.entries, o.entries, desc);
-      } else if (o is MethodInvocation && r is MethodInvocation) {
-        compareConstAsts(r.target, o.target, desc);
-        compareConstAsts(r.methodName, o.methodName, desc);
-        compareConstAstLists(
-            r.typeArguments?.arguments, o.typeArguments?.arguments, desc);
-        compareConstAstLists(
-            r.argumentList?.arguments, o.argumentList?.arguments, desc);
-      } else if (o is InstanceCreationExpression &&
-          r is InstanceCreationExpression) {
-        compareElements(r.staticElement, o.staticElement, desc);
-        ConstructorName oConstructor = o.constructorName;
-        ConstructorName rConstructor = r.constructorName;
-        expect(oConstructor, isNotNull, reason: desc);
-        expect(rConstructor, isNotNull, reason: desc);
-        // Note: just compare rConstructor.staticElement and
-        // oConstructor.staticElement as elements, because we just want to
-        // check that they're pointing to the correct elements; we don't want
-        // to check that their constructor initializers match, because that
-        // could lead to infinite regress.
-        compareElements(
-            rConstructor.staticElement, oConstructor.staticElement, desc);
-        TypeName oType = oConstructor.type;
-        TypeName rType = rConstructor.type;
-        expect(oType, isNotNull, reason: desc);
-        expect(rType, isNotNull, reason: desc);
-        compareConstAsts(rType.name, oType.name, desc);
-        compareConstAsts(rConstructor.name, oConstructor.name, desc);
-        // In strong mode type inference is performed, so that
-        // `C<int> v = new C();` is serialized as `C<int> v = new C<int>();`.
-        // So, if there are not type arguments originally, not need to check.
-        if (oType.typeArguments?.arguments?.isNotEmpty ?? false) {
-          compareConstAstLists(rType.typeArguments?.arguments,
-              oType.typeArguments?.arguments, desc);
-        }
-        compareConstAstLists(
-            r.argumentList.arguments, o.argumentList.arguments, desc);
-      } else if (o is AnnotationImpl && r is AnnotationImpl) {
-        expect(o.atSign.lexeme, r.atSign.lexeme, reason: desc);
-        Identifier rName = r.name;
-        Identifier oName = o.name;
-        if (oName is PrefixedIdentifier &&
-            rName is PrefixedIdentifier &&
-            o.constructorName != null &&
-            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);
-          compareConstAsts(r.constructorName, o.constructorName, desc);
-        }
-        compareConstAstLists(
-            r.arguments?.arguments, o.arguments?.arguments, desc);
-        compareElements(r.element, o.element, desc);
-        // elementAnnotation should be null; it is only used in the full AST.
-        expect(o.elementAnnotation, isNull);
-        expect(r.elementAnnotation, isNull);
-      } else {
-        fail('Not implemented for ${r.runtimeType} vs. ${o.runtimeType}');
-      }
-    }
-  }
-
-  void compareConstructorElements(ConstructorElement resynthesized,
-      ConstructorElement original, String desc) {
-    if (original == null && resynthesized == null) {
-      return;
-    }
-    compareExecutableElements(resynthesized, original, desc);
-    ConstructorElementImpl resynthesizedImpl =
-        getActualElement(resynthesized, desc);
-    ConstructorElementImpl originalImpl = getActualElement(original, desc);
-    if (original.isConst) {
-      compareConstAstLists(resynthesizedImpl.constantInitializers,
-          originalImpl.constantInitializers, desc);
-    }
-    if (original.redirectedConstructor == null) {
-      expect(resynthesized.redirectedConstructor, isNull, reason: desc);
-    } else {
-      compareConstructorElements(resynthesized.redirectedConstructor,
-          original.redirectedConstructor, '$desc redirectedConstructor');
-    }
-    checkPossibleMember(resynthesized, original, desc);
-    expect(resynthesized.nameEnd, original.nameEnd, reason: desc);
-    expect(resynthesized.periodOffset, original.periodOffset, reason: desc);
-    expect(resynthesizedImpl.isCycleFree, originalImpl.isCycleFree,
-        reason: desc);
-  }
-
-  void compareConstValues(
-      DartObject resynthesized, DartObject original, String desc) {
-    if (original == null) {
-      expect(resynthesized, isNull, reason: desc);
-    } else {
-      expect(resynthesized, isNotNull, reason: desc);
-      compareTypes(resynthesized.type, original.type, desc);
-      expect(resynthesized.hasKnownValue, original.hasKnownValue, reason: desc);
-      if (original.isNull) {
-        expect(resynthesized.isNull, isTrue, reason: desc);
-      } else if (original.toBoolValue() != null) {
-        expect(resynthesized.toBoolValue(), original.toBoolValue(),
-            reason: desc);
-      } else if (original.toIntValue() != null) {
-        expect(resynthesized.toIntValue(), original.toIntValue(), reason: desc);
-      } else if (original.toDoubleValue() != null) {
-        expect(resynthesized.toDoubleValue(), original.toDoubleValue(),
-            reason: desc);
-      } else if (original.toListValue() != null) {
-        List<DartObject> resynthesizedList = resynthesized.toListValue();
-        List<DartObject> originalList = original.toListValue();
-        expect(resynthesizedList, hasLength(originalList.length));
-        for (int i = 0; i < originalList.length; i++) {
-          compareConstValues(resynthesizedList[i], originalList[i], desc);
-        }
-      } else if (original.toMapValue() != null) {
-        Map<DartObject, DartObject> resynthesizedMap =
-            resynthesized.toMapValue();
-        Map<DartObject, DartObject> originalMap = original.toMapValue();
-        expect(resynthesizedMap, hasLength(originalMap.length));
-        List<DartObject> resynthesizedKeys = resynthesizedMap.keys.toList();
-        List<DartObject> originalKeys = originalMap.keys.toList();
-        for (int i = 0; i < originalKeys.length; i++) {
-          DartObject resynthesizedKey = resynthesizedKeys[i];
-          DartObject originalKey = originalKeys[i];
-          compareConstValues(resynthesizedKey, originalKey, desc);
-          DartObject resynthesizedValue = resynthesizedMap[resynthesizedKey];
-          DartObject originalValue = originalMap[originalKey];
-          compareConstValues(resynthesizedValue, originalValue, desc);
-        }
-      } else if (original.toStringValue() != null) {
-        expect(resynthesized.toStringValue(), original.toStringValue(),
-            reason: desc);
-      } else if (original.toSymbolValue() != null) {
-        expect(resynthesized.toSymbolValue(), original.toSymbolValue(),
-            reason: desc);
-      } else if (original.toTypeValue() != null) {
-        fail('Not implemented');
-      }
-    }
-  }
-
-  void compareElementAnnotations(ElementAnnotationImpl resynthesized,
-      ElementAnnotationImpl original, String desc) {
-    if (original.element == null) {
-      expect(resynthesized.element, isNull);
-    } else {
-      expect(resynthesized.element, isNotNull, reason: desc);
-      expect(resynthesized.element.kind, original.element.kind, reason: desc);
-      expect(resynthesized.element.location, original.element.location,
-          reason: desc);
-    }
-    expect(resynthesized.compilationUnit, isNotNull, reason: desc);
-    expect(resynthesized.compilationUnit.location,
-        original.compilationUnit.location,
-        reason: desc);
-    expect(resynthesized.annotationAst, isNotNull, reason: desc);
-    compareConstAsts(resynthesized.annotationAst, original.annotationAst, desc);
-  }
-
-  void compareElementLocations(
-      Element resynthesized, Element original, String desc) {
-    bool hasFunctionElementByValue(Element e) {
-      if (e == null) {
-        return false;
-      }
-      if (e is FunctionElementImpl_forLUB) {
-        return true;
-      }
-      return hasFunctionElementByValue(e.enclosingElement);
-    }
-
-    if (hasFunctionElementByValue(resynthesized)) {
-      // We resynthesize elements representing types of local functions
-      // without corresponding name offsets, so their locations don't have
-      // corresponding valid @offset components. Also, we don't put
-      // resynthesized local functions into initializers of variables.
-      return;
-    }
-    expect(resynthesized.location, original.location, reason: desc);
-  }
-
-  void compareElements(Element resynthesized, Element original, String desc) {
-    ElementImpl rImpl = getActualElement(resynthesized, desc);
-    ElementImpl oImpl = getActualElement(original, desc);
-    if (oImpl == null && rImpl == null) {
-      return;
-    }
-    if (oImpl is PrefixElement) {
-      // TODO(scheglov) prefixes cannot be resynthesized
-      return;
-    }
-    expect(original, isNotNull);
-    expect(resynthesized, isNotNull, reason: desc);
-    if (rImpl is DefaultParameterElementImpl && oImpl is ParameterElementImpl) {
-      // This is ok provided the resynthesized parameter element doesn't have
-      // any evaluation result.
-      expect(rImpl.evaluationResult, isNull);
-    } else {
-      Type rRuntimeType;
-      if (rImpl is ConstFieldElementImpl) {
-        rRuntimeType = ConstFieldElementImpl;
-      } else if (rImpl is FunctionElementImpl) {
-        rRuntimeType = FunctionElementImpl;
-      } else {
-        rRuntimeType = rImpl.runtimeType;
-      }
-      expect(rRuntimeType, oImpl.runtimeType);
-    }
-    expect(resynthesized.kind, original.kind);
-    compareElementLocations(resynthesized, original, desc);
-    expect(resynthesized.name, original.name);
-    expect(resynthesized.nameOffset, original.nameOffset,
-        reason: '$desc.nameOffset');
-    expect(rImpl.codeOffset, oImpl.codeOffset, reason: desc);
-    expect(rImpl.codeLength, oImpl.codeLength, reason: desc);
-    expect(resynthesized.documentationComment, original.documentationComment,
-        reason: desc);
-    compareMetadata(resynthesized.metadata, original.metadata, desc);
-
-    // Validate modifiers.
-    for (Modifier modifier in Modifier.values) {
-      bool got = _hasModifier(resynthesized, modifier);
-      bool want = _hasModifier(original, modifier);
-      expect(got, want,
-          reason: 'Mismatch in $desc.$modifier: got $got, want $want');
-    }
-
-    // Validate members.
-    if (oImpl is Member) {
-      expect(rImpl, new TypeMatcher<Member>(), reason: desc);
-    } else {
-      expect(rImpl, isNot(new TypeMatcher<Member>()), reason: desc);
-    }
-  }
-
-  void compareExecutableElements(
-      ExecutableElement resynthesized, ExecutableElement original, String desc,
-      {bool shallow: false}) {
-    compareElements(resynthesized, original, desc);
-    compareParameterElementLists(
-        resynthesized.parameters, original.parameters, desc);
-    if (!original.hasImplicitReturnType) {
-      compareTypes(
-          resynthesized.returnType, original.returnType, '$desc return type');
-    }
-    if (!shallow) {
-      compareTypes(resynthesized.type, original.type, desc);
-    }
-    expect(resynthesized.typeParameters.length, original.typeParameters.length);
-    for (int i = 0; i < resynthesized.typeParameters.length; i++) {
-      compareTypeParameterElements(
-          resynthesized.typeParameters[i],
-          original.typeParameters[i],
-          '$desc type parameter ${original.typeParameters[i].name}');
-    }
-  }
-
-  void compareExportElements(ExportElementImpl resynthesized,
-      ExportElementImpl original, String desc) {
-    expect(resynthesized.exportedLibrary.location,
-        original.exportedLibrary.location);
-    expect(resynthesized.combinators.length, original.combinators.length);
-    for (int i = 0; i < resynthesized.combinators.length; i++) {
-      compareNamespaceCombinators(
-          resynthesized.combinators[i], original.combinators[i]);
-    }
-  }
-
-  void compareFieldElements(
-      FieldElementImpl resynthesized, FieldElementImpl original, String desc) {
-    comparePropertyInducingElements(resynthesized, original, desc);
-  }
-
-  void compareFunctionElements(
-      FunctionElement resynthesized, FunctionElement original, String desc,
-      {bool shallow: false}) {
-    if (original == null && resynthesized == null) {
-      return;
-    }
-    expect(resynthesized, isNotNull, reason: desc);
-    compareExecutableElements(resynthesized, original, desc, shallow: shallow);
-    checkPossibleLocalElements(resynthesized, original);
-  }
-
-  void compareFunctionTypeAliasElements(FunctionTypeAliasElement resynthesized,
-      FunctionTypeAliasElement original, String desc) {
-    compareElements(resynthesized, original, desc);
-    ElementImpl rImpl = getActualElement(resynthesized, desc);
-    ElementImpl oImpl = getActualElement(original, desc);
-    if (rImpl is GenericTypeAliasElementImpl) {
-      if (oImpl is GenericTypeAliasElementImpl) {
-        compareGenericFunctionTypeElements(
-            rImpl.function, oImpl.function, '$desc.function');
-      } else {
-        fail(
-            'Resynthesized a GenericTypeAliasElementImpl, but expected a ${oImpl.runtimeType}');
-      }
-    } else {
-      fail('Resynthesized a ${rImpl.runtimeType}');
-    }
-    compareTypes(resynthesized.type, original.type, desc);
-    expect(resynthesized.typeParameters.length, original.typeParameters.length);
-    for (int i = 0; i < resynthesized.typeParameters.length; i++) {
-      compareTypeParameterElements(
-          resynthesized.typeParameters[i],
-          original.typeParameters[i],
-          '$desc.typeParameters[$i] /* ${original.typeParameters[i].name} */');
-    }
-  }
-
-  void compareGenericFunctionTypeElements(
-      GenericFunctionTypeElement resynthesized,
-      GenericFunctionTypeElement original,
-      String desc) {
-    if (resynthesized == null) {
-      if (original != null) {
-        fail('Failed to resynthesize generic function type');
-      }
-    } else if (original == null) {
-      fail('Resynthesizes a generic function type when none expected');
-    }
-    compareTypeParameterElementLists(resynthesized.typeParameters,
-        original.typeParameters, '$desc.typeParameters');
-    compareParameterElementLists(
-        resynthesized.parameters, original.parameters, '$desc.parameters');
-    compareTypes(
-        resynthesized.returnType, original.returnType, '$desc.returnType');
-  }
-
-  void compareImportElements(ImportElementImpl resynthesized,
-      ImportElementImpl original, String desc) {
-    expect(resynthesized.importedLibrary.location,
-        original.importedLibrary.location,
-        reason: '$desc importedLibrary location');
-    expect(resynthesized.prefixOffset, original.prefixOffset,
-        reason: '$desc prefixOffset');
-    if (original.prefix == null) {
-      expect(resynthesized.prefix, isNull, reason: '$desc prefix');
-    } else {
-      comparePrefixElements(
-          resynthesized.prefix, original.prefix, original.prefix.name);
-    }
-    expect(resynthesized.combinators.length, original.combinators.length,
-        reason: '$desc combinators');
-    for (int i = 0; i < resynthesized.combinators.length; i++) {
-      compareNamespaceCombinators(
-          resynthesized.combinators[i], original.combinators[i]);
-    }
-  }
-
-  void compareLabelElements(
-      LabelElementImpl resynthesized, LabelElementImpl original, String desc) {
-    expect(resynthesized.isOnSwitchMember, original.isOnSwitchMember,
-        reason: desc);
-    expect(resynthesized.isOnSwitchStatement, original.isOnSwitchStatement,
-        reason: desc);
-    compareElements(resynthesized, original, desc);
-  }
-
-  void compareLineInfo(LineInfo resynthesized, LineInfo original) {
-    expect(resynthesized.lineCount, original.lineCount);
-    expect(resynthesized.lineStarts, original.lineStarts);
-  }
-
-  void compareMetadata(List<ElementAnnotation> resynthesized,
-      List<ElementAnnotation> original, String desc) {
-    expect(resynthesized, hasLength(original.length), reason: desc);
-    for (int i = 0; i < original.length; i++) {
-      compareElementAnnotations(
-          resynthesized[i], original[i], '$desc annotation $i');
-    }
-  }
-
-  void compareMethodElements(MethodElementImpl resynthesized,
-      MethodElementImpl original, String desc) {
-    // TODO(paulberry): do we need to deal with
-    // MultiplyInheritedMethodElementImpl?
-    compareExecutableElements(resynthesized, original, desc);
-  }
-
-  void compareNamespaceCombinators(
-      NamespaceCombinator resynthesized, NamespaceCombinator original) {
-    if (original is ShowElementCombinatorImpl &&
-        resynthesized is ShowElementCombinatorImpl) {
-      expect(resynthesized.shownNames, original.shownNames,
-          reason: 'shownNames');
-      expect(resynthesized.offset, original.offset, reason: 'offset');
-      expect(resynthesized.end, original.end, reason: 'end');
-    } else if (original is HideElementCombinatorImpl &&
-        resynthesized is HideElementCombinatorImpl) {
-      expect(resynthesized.hiddenNames, original.hiddenNames,
-          reason: 'hiddenNames');
-    } else if (resynthesized.runtimeType != original.runtimeType) {
-      fail(
-          'Type mismatch: expected ${original.runtimeType}, got ${resynthesized.runtimeType}');
-    } else {
-      fail('Unimplemented comparison for ${original.runtimeType}');
-    }
-  }
-
-  void compareNamespaces(
-      Namespace resynthesized, Namespace original, String desc) {
-    Map<String, Element> resynthesizedMap = resynthesized.definedNames;
-    Map<String, Element> originalMap = original.definedNames;
-    expect(resynthesizedMap.keys.toSet(), originalMap.keys.toSet(),
-        reason: desc);
-    for (String key in originalMap.keys) {
-      Element resynthesizedElement = resynthesizedMap[key];
-      Element originalElement = originalMap[key];
-      compareElements(resynthesizedElement, originalElement, key);
-    }
-  }
-
-  void compareParameterElementLists(
-      List<ParameterElement> resynthesizedParameters,
-      List<ParameterElement> originalParameters,
-      String desc) {
-    expect(resynthesizedParameters.length, originalParameters.length);
-    for (int i = 0; i < resynthesizedParameters.length; i++) {
-      compareParameterElements(
-          resynthesizedParameters[i],
-          originalParameters[i],
-          '$desc.parameters[$i] /* ${originalParameters[i].name} */');
-    }
-  }
-
-  void compareParameterElements(
-      ParameterElement resynthesized, ParameterElement original, String desc) {
-    compareVariableElements(resynthesized, original, desc);
-    compareParameterElementLists(
-        resynthesized.parameters, original.parameters, desc);
-    // ignore: deprecated_member_use_from_same_package
-    expect(resynthesized.parameterKind, original.parameterKind, reason: desc);
-    expect(resynthesized.isInitializingFormal, original.isInitializingFormal,
-        reason: desc);
-    expect(resynthesized is FieldFormalParameterElementImpl,
-        original is FieldFormalParameterElementImpl);
-    if (resynthesized is FieldFormalParameterElementImpl &&
-        original is FieldFormalParameterElementImpl) {
-      if (original.field == null) {
-        expect(resynthesized.field, isNull, reason: '$desc field');
-      } else {
-        expect(resynthesized.field, isNotNull, reason: '$desc field');
-        compareFieldElements(
-            resynthesized.field, original.field, '$desc field');
-      }
-    }
-    expect(resynthesized.defaultValueCode, original.defaultValueCode,
-        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);
-  }
-
-  void comparePrefixElements(PrefixElementImpl resynthesized,
-      PrefixElementImpl original, String desc) {
-    compareElements(resynthesized, original, desc);
-  }
-
-  void comparePropertyAccessorElements(
-      PropertyAccessorElementImpl resynthesized,
-      PropertyAccessorElementImpl original,
-      String desc) {
-    // TODO(paulberry): do I need to worry about
-    // MultiplyInheritedPropertyAccessorElementImpl?
-    compareExecutableElements(resynthesized, original, desc);
-    expect(resynthesized.variable, isNotNull);
-    expect(resynthesized.variable.location, original.variable.location);
-  }
-
-  void comparePropertyInducingElements(
-      PropertyInducingElementImpl resynthesized,
-      PropertyInducingElementImpl original,
-      String desc) {
-    compareVariableElements(resynthesized, original, desc);
-    if (original.getter == null) {
-      expect(resynthesized.getter, isNull);
-    } else {
-      expect(resynthesized.getter, isNotNull);
-      expect(resynthesized.getter.location, original.getter.location);
-    }
-    if (original.setter == null) {
-      expect(resynthesized.setter, isNull);
-    } else {
-      expect(resynthesized.setter, isNotNull);
-      expect(resynthesized.setter.location, original.setter.location);
-    }
-  }
-
-  void compareTopLevelVariableElements(
-      TopLevelVariableElementImpl resynthesized,
-      TopLevelVariableElementImpl original,
-      String desc) {
-    comparePropertyInducingElements(resynthesized, original, desc);
-  }
-
-  void compareTypeImpls(
-      TypeImpl resynthesized, TypeImpl original, String desc) {
-    compareElementLocations(
-        resynthesized.element, original.element, '$desc.element.location');
-    expect(resynthesized.name, original.name, reason: '$desc.name');
-  }
-
-  void compareTypeParameterElementLists(
-      List<TypeParameterElement> resynthesized,
-      List<TypeParameterElement> original,
-      String desc) {
-    int length = original.length;
-    expect(resynthesized.length, length, reason: '$desc.length');
-    for (int i = 0; i < length; i++) {
-      compareTypeParameterElements(resynthesized[i], original[i], '$desc[$i]');
-    }
-  }
-
-  void compareTypeParameterElements(TypeParameterElement resynthesized,
-      TypeParameterElement original, String desc) {
-    compareElements(resynthesized, original, desc);
-    compareTypes(resynthesized.type, original.type, '$desc.type');
-    compareTypes(resynthesized.bound, original.bound, '$desc.bound');
-  }
-
-  void compareTypes(DartType resynthesized, DartType original, String desc) {
-    if (original == null) {
-      expect(resynthesized, isNull, reason: desc);
-    } else if (resynthesized is InterfaceTypeImpl &&
-        original is InterfaceTypeImpl) {
-      compareTypeImpls(resynthesized, original, desc);
-      expect(resynthesized.typeArguments.length, original.typeArguments.length,
-          reason: '$desc.typeArguments.length');
-      for (int i = 0; i < resynthesized.typeArguments.length; i++) {
-        compareTypes(resynthesized.typeArguments[i], original.typeArguments[i],
-            '$desc.typeArguments[$i] /* ${original.typeArguments[i].name} */');
-      }
-    } else if (resynthesized is TypeParameterTypeImpl &&
-        original is TypeParameterTypeImpl) {
-      compareTypeImpls(resynthesized, original, desc);
-    } else if (resynthesized is DynamicTypeImpl &&
-        original is DynamicTypeImpl) {
-      expect(resynthesized, same(original));
-    } else if (resynthesized is UndefinedTypeImpl &&
-        original is UndefinedTypeImpl) {
-      expect(resynthesized, same(original));
-    } else if (resynthesized is FunctionTypeImpl &&
-        original is FunctionTypeImpl) {
-      compareTypeImpls(resynthesized, original, desc);
-      expect(resynthesized.isInstantiated, original.isInstantiated,
-          reason: desc);
-      if (original.element.enclosingElement == null &&
-          original.element is FunctionElement) {
-        expect(resynthesized.element, isFunctionElement);
-        expect(resynthesized.element.enclosingElement, isNull, reason: desc);
-        compareFunctionElements(
-            resynthesized.element, original.element, '$desc.element',
-            shallow: true);
-        expect(resynthesized.element.type, same(resynthesized));
-      }
-      expect(resynthesized.typeArguments.length, original.typeArguments.length,
-          reason: '$desc.typeArguments.length');
-      for (int i = 0; i < resynthesized.typeArguments.length; i++) {
-        if (resynthesized.typeArguments[i].isDynamic &&
-            original.typeArguments[i] is TypeParameterType) {
-          // It's ok for type arguments to get converted to `dynamic` if they
-          // are not used.
-          expect(
-              isTypeParameterUsed(
-                  original.typeArguments[i], original.element.type),
-              isFalse);
-        } else {
-          compareTypes(
-              resynthesized.typeArguments[i],
-              original.typeArguments[i],
-              '$desc.typeArguments[$i] /* ${original.typeArguments[i].name} */');
-        }
-      }
-      if (original.typeParameters == null) {
-        expect(resynthesized.typeParameters, isNull, reason: desc);
-      } else {
-        expect(resynthesized.typeParameters, isNotNull, reason: desc);
-        expect(
-            resynthesized.typeParameters.length, original.typeParameters.length,
-            reason: desc);
-        for (int i = 0; i < resynthesized.typeParameters.length; i++) {
-          compareTypeParameterElements(resynthesized.typeParameters[i],
-              original.typeParameters[i], '$desc.typeParameters[$i]');
-        }
-      }
-      expect(resynthesized.typeFormals.length, original.typeFormals.length,
-          reason: desc);
-      for (int i = 0; i < resynthesized.typeFormals.length; i++) {
-        compareTypeParameterElements(resynthesized.typeFormals[i],
-            original.typeFormals[i], '$desc.typeFormals[$i]');
-      }
-    } else if (resynthesized is VoidTypeImpl && original is VoidTypeImpl) {
-      expect(resynthesized, same(original));
-    } else if (resynthesized is DynamicTypeImpl &&
-        original is UndefinedTypeImpl) {
-      // TODO(scheglov) In the strong mode constant variable like
-      //  `var V = new Unresolved()` gets `UndefinedTypeImpl`, and it gets
-      // `DynamicTypeImpl` in the spec mode.
-    } else if (resynthesized is BottomTypeImpl && original is BottomTypeImpl) {
-      expect(resynthesized, same(original));
-    } else if (resynthesized.runtimeType != original.runtimeType) {
-      fail('Type mismatch: expected $original,'
-          ' got $resynthesized ($desc)');
-    } else {
-      fail('Unimplemented comparison for ${original.runtimeType}');
-    }
-  }
-
-  void compareVariableElements(
-      VariableElement resynthesized, VariableElement original, String desc) {
-    compareElements(resynthesized, original, desc);
-    if ((resynthesized as VariableElementImpl).typeInferenceError == null) {
-      compareTypes(resynthesized.type, original.type, '$desc.type');
-    }
-    VariableElementImpl resynthesizedActual =
-        getActualElement(resynthesized, desc);
-    VariableElementImpl originalActual = getActualElement(original, desc);
-    compareFunctionElements(resynthesizedActual.initializer,
-        originalActual.initializer, '$desc.initializer');
-    if (originalActual is ConstVariableElement) {
-      Element oEnclosing = original.enclosingElement;
-      if (oEnclosing is ClassElement && oEnclosing.isEnum) {
-        compareConstValues(resynthesized.constantValue, original.constantValue,
-            '$desc.constantValue');
-      } else {
-        Expression initializer = resynthesizedActual.constantInitializer;
-        if (variablesWithNotConstInitializers.contains(resynthesized.name)) {
-          expect(initializer, isNull, reason: desc);
-        } else {
-          compareConstAsts(initializer, originalActual.constantInitializer,
-              '$desc.constantInitializer');
-        }
-      }
-    }
-    checkPossibleMember(resynthesized, original, desc);
-    checkPossibleLocalElements(resynthesized, original);
-  }
-
-  ElementImpl getActualElement(Element element, String desc) {
-    if (element == null) {
-      return null;
-    } else if (element is ElementImpl) {
-      return element;
-    } else if (element is ElementHandle) {
-      Element actualElement = element.actualElement;
-      // A handle should never point to a member, because if it did, then
-      // "is Member" checks on the handle would produce the wrong result.
-      expect(actualElement, isNot(new TypeMatcher<Member>()), reason: desc);
-      return getActualElement(actualElement, desc);
-    } else if (element is Member) {
-      return getActualElement(element.baseElement, desc);
-    } else {
-      fail('Unexpected type for resynthesized ($desc):'
-          ' ${element.runtimeType}');
-    }
-  }
-
-  /**
-   * Determine if [type] makes use of the given [typeParameter].
-   */
-  bool isTypeParameterUsed(TypeParameterType typeParameter, DartType type) {
-    if (type is FunctionType) {
-      return isTypeParameterUsed(typeParameter, type.returnType) ||
-          type.parameters.any((ParameterElement e) =>
-              isTypeParameterUsed(typeParameter, e.type));
-    } else if (type is InterfaceType) {
-      return type.typeArguments
-          .any((DartType t) => isTypeParameterUsed(typeParameter, t));
-    } else if (type is TypeParameterType) {
-      return type == typeParameter;
-    } else {
-      expect(type.isDynamic || type.isVoid, isTrue);
-      return false;
-    }
-  }
-
-  LibraryElementImpl _encodeDecodeLibraryElement(Source source) {
     SummaryResynthesizer resynthesizer = encodeLibrary(source);
     return resynthesizer.getLibraryElement(source.uri.toString());
   }
-
-  List<PropertyAccessorElement> _getSortedPropertyAccessors(
-      ClassElement classElement) {
-    List<PropertyAccessorElement> accessors = classElement.accessors.toList();
-    accessors.sort((a, b) => a.displayName.compareTo(b.displayName));
-    return accessors;
-  }
-
-  bool _hasModifier(Element element, Modifier modifier) {
-    if (modifier == Modifier.ABSTRACT) {
-      if (element is ClassElement) {
-        return element.isAbstract;
-      }
-      if (element is ExecutableElement) {
-        return element.isAbstract;
-      }
-      return false;
-    } else if (modifier == Modifier.ASYNCHRONOUS) {
-      if (element is ExecutableElement) {
-        return element.isAsynchronous;
-      }
-      return false;
-    } else if (modifier == Modifier.CONST) {
-      if (element is VariableElement) {
-        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;
-      }
-      return false;
-    } else if (modifier == Modifier.ENUM) {
-      if (element is ClassElement) {
-        return element.isEnum;
-      }
-      return false;
-    } else if (modifier == Modifier.EXTERNAL) {
-      if (element is ExecutableElement) {
-        return element.isExternal;
-      }
-      return false;
-    } else if (modifier == Modifier.FACTORY) {
-      if (element is ConstructorElement) {
-        return element.isFactory;
-      }
-      return false;
-    } else if (modifier == Modifier.FINAL) {
-      if (element is VariableElement) {
-        return element.isFinal;
-      }
-      return false;
-    } else if (modifier == Modifier.GENERATOR) {
-      if (element is ExecutableElement) {
-        return element.isGenerator;
-      }
-      return false;
-    } else if (modifier == Modifier.GETTER) {
-      if (element is PropertyAccessorElement) {
-        return element.isGetter;
-      }
-      return false;
-    } else if (modifier == Modifier.HAS_EXT_URI) {
-      if (element is LibraryElement) {
-        return element.hasExtUri;
-      }
-      return false;
-    } else if (modifier == Modifier.IMPLICIT_TYPE) {
-      if (element is ExecutableElement) {
-        return element.hasImplicitReturnType;
-      }
-      return false;
-    } else if (modifier == Modifier.MIXIN_APPLICATION) {
-      if (element is ClassElement) {
-        return element.isMixinApplication;
-      }
-      return false;
-    } else if (modifier == Modifier.REFERENCES_SUPER) {
-      if (element is ClassElement) {
-        return element.hasReferenceToSuper;
-      }
-      return false;
-    } else if (modifier == Modifier.SETTER) {
-      if (element is PropertyAccessorElement) {
-        return element.isSetter;
-      }
-      return false;
-    } else if (modifier == Modifier.STATIC) {
-      if (element is ExecutableElement) {
-        return element.isStatic;
-      } else if (element is FieldElement) {
-        return element.isStatic;
-      }
-      return false;
-    } else if (modifier == Modifier.SYNTHETIC) {
-      return element.isSynthetic;
-    }
-    throw new UnimplementedError(
-        'Modifier $modifier for ${element?.runtimeType}');
-  }
 }
 
 class TestSummaryResynthesizer extends SummaryResynthesizer {
@@ -10053,12 +10041,13 @@
    */
   final Set<String> linkedSummariesRequested = new Set<String>();
 
-  TestSummaryResynthesizer(AnalysisContext context, this.unlinkedSummaries,
+  TestSummaryResynthesizer(AnalysisContextImpl context, this.unlinkedSummaries,
       this.linkedSummaries, this.allowMissingFiles)
       : super(context, null, context.sourceFactory, true) {
     // Clear after resynthesizing TypeProvider in super().
     unlinkedSummariesRequested.clear();
     linkedSummariesRequested.clear();
+    context.typeProvider = typeProvider;
   }
 
   @override
diff --git a/pkg/analyzer/test/src/summary/summarize_ast_strong_test.dart b/pkg/analyzer/test/src/summary/summarize_ast_strong_test.dart
index b83b616..7a9c6bf 100644
--- a/pkg/analyzer/test/src/summary/summarize_ast_strong_test.dart
+++ b/pkg/analyzer/test/src/summary/summarize_ast_strong_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/summary/summary_common.dart b/pkg/analyzer/test/src/summary/summary_common.dart
index 71fd7cd..e4043ad 100644
--- a/pkg/analyzer/test/src/summary/summary_common.dart
+++ b/pkg/analyzer/test/src/summary/summary_common.dart
@@ -805,6 +805,19 @@
     return findVariable(variableName, failIfAbsent: true);
   }
 
+  test_constExpr_binary_bitShiftRightLogical() {
+    experimentStatus = ExperimentStatus(constant_update_2018: true);
+    UnlinkedVariable variable = serializeVariableText('const v = 1 >>> 2;');
+    assertUnlinkedConst(variable.initializer.bodyExpr, '1 >>> 2', operators: [
+      UnlinkedExprOperation.pushInt,
+      UnlinkedExprOperation.pushInt,
+      UnlinkedExprOperation.bitShiftRightLogical
+    ], ints: [
+      1,
+      2
+    ]);
+  }
+
   test_apiSignature() {
     List<int> signature1;
     List<int> signature2;
@@ -2754,6 +2767,72 @@
         ]);
   }
 
+  test_constExpr_list_if() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable =
+        serializeVariableText('const v = [if (true) 1];');
+    assertUnlinkedConst(variable.initializer.bodyExpr, '[if (true) 1]',
+        operators: [
+          UnlinkedExprOperation.pushTrue,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.ifElement,
+          UnlinkedExprOperation.makeUntypedList
+        ],
+        ints: [
+          1,
+          1
+        ]);
+  }
+
+  test_constExpr_list_if_else() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable =
+        serializeVariableText('const v = [if (true) 1 else 2];');
+    assertUnlinkedConst(variable.initializer.bodyExpr, '[if (true) 1 else 2]',
+        operators: [
+          UnlinkedExprOperation.pushTrue,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.ifElseElement,
+          UnlinkedExprOperation.makeUntypedList
+        ],
+        ints: [
+          1,
+          2,
+          1
+        ]);
+  }
+
+  test_constExpr_list_spread() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable = serializeVariableText('const v = [...[]];');
+    assertUnlinkedConst(variable.initializer.bodyExpr, '[...[]]', operators: [
+      UnlinkedExprOperation.makeUntypedList,
+      UnlinkedExprOperation.spreadElement,
+      UnlinkedExprOperation.makeUntypedList
+    ], ints: [
+      0,
+      1
+    ]);
+  }
+
+  test_constExpr_list_spread_null_aware() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable = serializeVariableText('const v = [...?[]];');
+    assertUnlinkedConst(variable.initializer.bodyExpr, '[...?[]]', operators: [
+      UnlinkedExprOperation.makeUntypedList,
+      UnlinkedExprOperation.nullAwareSpreadElement,
+      UnlinkedExprOperation.makeUntypedList
+    ], ints: [
+      0,
+      1
+    ]);
+  }
+
   test_constExpr_makeSymbol() {
     UnlinkedVariable variable = serializeVariableText('const v = #a.bb.ccc;');
     assertUnlinkedConst(variable.initializer.bodyExpr, '#a.bb.ccc',
@@ -2884,11 +2963,14 @@
         operators: [
           UnlinkedExprOperation.pushInt,
           UnlinkedExprOperation.pushString,
+          UnlinkedExprOperation.makeMapLiteralEntry,
           UnlinkedExprOperation.pushInt,
           UnlinkedExprOperation.pushString,
+          UnlinkedExprOperation.makeMapLiteralEntry,
           UnlinkedExprOperation.pushInt,
           UnlinkedExprOperation.pushString,
-          UnlinkedExprOperation.makeTypedMap
+          UnlinkedExprOperation.makeMapLiteralEntry,
+          UnlinkedExprOperation.makeTypedMap2
         ],
         ints: [
           11,
@@ -2917,11 +2999,14 @@
         operators: [
           UnlinkedExprOperation.pushInt,
           UnlinkedExprOperation.pushString,
+          UnlinkedExprOperation.makeMapLiteralEntry,
           UnlinkedExprOperation.pushInt,
           UnlinkedExprOperation.pushString,
+          UnlinkedExprOperation.makeMapLiteralEntry,
           UnlinkedExprOperation.pushInt,
           UnlinkedExprOperation.pushString,
-          UnlinkedExprOperation.makeTypedMap
+          UnlinkedExprOperation.makeMapLiteralEntry,
+          UnlinkedExprOperation.makeTypedMap2
         ],
         ints: [
           11,
@@ -3078,11 +3163,14 @@
         operators: [
           UnlinkedExprOperation.pushInt,
           UnlinkedExprOperation.pushString,
+          UnlinkedExprOperation.makeMapLiteralEntry,
           UnlinkedExprOperation.pushInt,
           UnlinkedExprOperation.pushString,
+          UnlinkedExprOperation.makeMapLiteralEntry,
           UnlinkedExprOperation.pushInt,
           UnlinkedExprOperation.pushString,
-          UnlinkedExprOperation.makeUntypedMap
+          UnlinkedExprOperation.makeMapLiteralEntry,
+          UnlinkedExprOperation.makeUntypedSetOrMap
         ],
         ints: [
           11,
@@ -3108,12 +3196,129 @@
         UnlinkedExprOperation.pushInt,
         UnlinkedExprOperation.pushInt,
         UnlinkedExprOperation.pushInt,
-        UnlinkedExprOperation.makeUntypedSet
+        UnlinkedExprOperation.makeUntypedSetOrMap
       ],
       ints: [11, 22, 33, 3],
     );
   }
 
+  test_constExpr_map_if() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable =
+        serializeVariableText('const v = <int, int>{if (true) 1 : 2};');
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, '<int, int>{if (true) 1 : 2}',
+        operators: [
+          UnlinkedExprOperation.pushTrue,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.makeMapLiteralEntry,
+          UnlinkedExprOperation.ifElement,
+          UnlinkedExprOperation.makeTypedMap2
+        ],
+        ints: [
+          1,
+          2,
+          1
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, 'dart:core', 'int',
+              expectedKind: ReferenceKind.classOrEnum),
+          (EntityRef r) => checkTypeRef(r, 'dart:core', 'int',
+              expectedKind: ReferenceKind.classOrEnum)
+        ]);
+  }
+
+  test_constExpr_map_if_else() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable = serializeVariableText(
+        'const v = <int, int>{if (true) 1 : 2 else 3 : 4};');
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, '<int, int>{if (true) 1 : 2 else 3 : 4}',
+        operators: [
+          UnlinkedExprOperation.pushTrue,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.makeMapLiteralEntry,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.makeMapLiteralEntry,
+          UnlinkedExprOperation.ifElseElement,
+          UnlinkedExprOperation.makeTypedMap2
+        ],
+        ints: [
+          1,
+          2,
+          3,
+          4,
+          1
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, 'dart:core', 'int',
+              expectedKind: ReferenceKind.classOrEnum),
+          (EntityRef r) => checkTypeRef(r, 'dart:core', 'int',
+              expectedKind: ReferenceKind.classOrEnum)
+        ]);
+  }
+
+  test_constExpr_map_spread() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable =
+        serializeVariableText('const v = <int, String>{...<int, String>{}};');
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, '<int, String>{...<int, String>{}}',
+        operators: [
+          UnlinkedExprOperation.makeTypedMap2,
+          UnlinkedExprOperation.spreadElement,
+          UnlinkedExprOperation.makeTypedMap2
+        ],
+        ints: [
+          0,
+          1
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, 'dart:core', 'int',
+              expectedKind: ReferenceKind.classOrEnum),
+          (EntityRef r) => checkTypeRef(r, 'dart:core', 'String',
+              expectedKind: ReferenceKind.classOrEnum),
+          (EntityRef r) => checkTypeRef(r, 'dart:core', 'int',
+              expectedKind: ReferenceKind.classOrEnum),
+          (EntityRef r) => checkTypeRef(r, 'dart:core', 'String',
+              expectedKind: ReferenceKind.classOrEnum)
+        ]);
+  }
+
+  test_constExpr_map_spread_null_aware() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable =
+        serializeVariableText('const v = <int, String>{...?<int, String>{}};');
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, '<int, String>{...?<int, String>{}}',
+        operators: [
+          UnlinkedExprOperation.makeTypedMap2,
+          UnlinkedExprOperation.nullAwareSpreadElement,
+          UnlinkedExprOperation.makeTypedMap2
+        ],
+        ints: [
+          0,
+          1
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, 'dart:core', 'int',
+              expectedKind: ReferenceKind.classOrEnum),
+          (EntityRef r) => checkTypeRef(r, 'dart:core', 'String',
+              expectedKind: ReferenceKind.classOrEnum),
+          (EntityRef r) => checkTypeRef(r, 'dart:core', 'int',
+              expectedKind: ReferenceKind.classOrEnum),
+          (EntityRef r) => checkTypeRef(r, 'dart:core', 'String',
+              expectedKind: ReferenceKind.classOrEnum)
+        ]);
+  }
+
   test_constExpr_parenthesized() {
     UnlinkedVariable variable = serializeVariableText('const v = (1 + 2) * 3;');
     assertUnlinkedConst(variable.initializer.bodyExpr, '(1 + 2) * 3',
@@ -3832,6 +4037,99 @@
         operators: [UnlinkedExprOperation.pushTrue]);
   }
 
+  test_constExpr_set_if() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable =
+        serializeVariableText('const v = <int>{if (true) 1};');
+    assertUnlinkedConst(variable.initializer.bodyExpr, '<int>{if (true) 1}',
+        operators: [
+          UnlinkedExprOperation.pushTrue,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.ifElement,
+          UnlinkedExprOperation.makeTypedSet
+        ],
+        ints: [
+          1,
+          1
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, 'dart:core', 'int',
+              expectedKind: ReferenceKind.classOrEnum)
+        ]);
+  }
+
+  test_constExpr_set_if_else() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable =
+        serializeVariableText('const v = <int>{if (true) 1 else 2};');
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, '<int>{if (true) 1 else 2}',
+        operators: [
+          UnlinkedExprOperation.pushTrue,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.ifElseElement,
+          UnlinkedExprOperation.makeTypedSet
+        ],
+        ints: [
+          1,
+          2,
+          1
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, 'dart:core', 'int',
+              expectedKind: ReferenceKind.classOrEnum)
+        ]);
+  }
+
+  test_constExpr_set_spread() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable =
+        serializeVariableText('const v = <int>{...<int>{}};');
+    assertUnlinkedConst(variable.initializer.bodyExpr, '<int>{...<int>{}}',
+        operators: [
+          UnlinkedExprOperation.makeTypedSet,
+          UnlinkedExprOperation.spreadElement,
+          UnlinkedExprOperation.makeTypedSet
+        ],
+        ints: [
+          0,
+          1
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, 'dart:core', 'int',
+              expectedKind: ReferenceKind.classOrEnum),
+          (EntityRef r) => checkTypeRef(r, 'dart:core', 'int',
+              expectedKind: ReferenceKind.classOrEnum)
+        ]);
+  }
+
+  test_constExpr_set_spread_null_aware() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable =
+        serializeVariableText('const v = <int>{...?<int>{}};');
+    assertUnlinkedConst(variable.initializer.bodyExpr, '<int>{...?<int>{}}',
+        operators: [
+          UnlinkedExprOperation.makeTypedSet,
+          UnlinkedExprOperation.nullAwareSpreadElement,
+          UnlinkedExprOperation.makeTypedSet
+        ],
+        ints: [
+          0,
+          1
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, 'dart:core', 'int',
+              expectedKind: ReferenceKind.classOrEnum),
+          (EntityRef r) => checkTypeRef(r, 'dart:core', 'int',
+              expectedKind: ReferenceKind.classOrEnum)
+        ]);
+  }
+
   test_constructor() {
     String text = 'class C { C(); }';
     UnlinkedExecutable executable =
@@ -7365,6 +7663,483 @@
         forTypeInferenceOnly: true);
   }
 
+  test_expr_list_for() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable =
+        serializeVariableText('int i; var v = [for (i = 0; i < 10; i++) i];');
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, '[for (i = 0; i < 10; i++) i]',
+        isValidConst: false,
+        operators: [
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.assignToRef,
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.less,
+          UnlinkedExprOperation.assignToRef,
+          UnlinkedExprOperation.forParts,
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.forElement,
+          UnlinkedExprOperation.makeUntypedList
+        ],
+        assignmentOperators: [
+          UnlinkedExprAssignOperator.assign,
+          UnlinkedExprAssignOperator.postfixIncrement
+        ],
+        ints: [
+          0,
+          10,
+          1,
+          1
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor)
+        ]);
+  }
+
+  test_expr_list_for_each_with_declaration_typed() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable =
+        serializeVariableText('var v = [for (int i in []) i];');
+    assertUnlinkedConst(variable.initializer.bodyExpr, '[for (int i in []) i]',
+        isValidConst: false,
+        operators: [
+          UnlinkedExprOperation.makeUntypedList,
+          UnlinkedExprOperation.forEachPartsWithTypedDeclaration,
+          UnlinkedExprOperation.pushParameter,
+          UnlinkedExprOperation.forElement,
+          UnlinkedExprOperation.makeUntypedList
+        ],
+        ints: [
+          0,
+          1
+        ],
+        strings: [
+          'i',
+          'i'
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, 'dart:core', 'int')
+        ]);
+  }
+
+  test_expr_list_for_each_with_declaration_untyped() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable =
+        serializeVariableText('var v = [for (var i in []) i];');
+    assertUnlinkedConst(variable.initializer.bodyExpr, '[for (var i in []) i]',
+        isValidConst: false,
+        operators: [
+          UnlinkedExprOperation.makeUntypedList,
+          UnlinkedExprOperation.forEachPartsWithUntypedDeclaration,
+          UnlinkedExprOperation.pushParameter,
+          UnlinkedExprOperation.forElement,
+          UnlinkedExprOperation.makeUntypedList
+        ],
+        ints: [
+          0,
+          1
+        ],
+        strings: [
+          'i',
+          'i'
+        ]);
+  }
+
+  test_expr_list_for_each_with_identifier() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable =
+        serializeVariableText('int i; var v = [for (i in []) i];');
+    assertUnlinkedConst(variable.initializer.bodyExpr, '[for (i in []) i]',
+        isValidConst: false,
+        operators: [
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.makeUntypedList,
+          UnlinkedExprOperation.forEachPartsWithIdentifier,
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.forElement,
+          UnlinkedExprOperation.makeUntypedList
+        ],
+        ints: [
+          0,
+          1
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor)
+        ]);
+  }
+
+  test_expr_list_for_each_with_identifier_await() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable =
+        serializeVariableText('int i; var v = [await for (i in []) i];');
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, '[await for (i in []) i]',
+        isValidConst: false,
+        operators: [
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.makeUntypedList,
+          UnlinkedExprOperation.forEachPartsWithIdentifier,
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.forElementWithAwait,
+          UnlinkedExprOperation.makeUntypedList
+        ],
+        ints: [
+          0,
+          1
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor)
+        ]);
+  }
+
+  test_expr_list_for_empty_condition() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable =
+        serializeVariableText('int i; var v = [for (i = 0;; i++) i];');
+    assertUnlinkedConst(variable.initializer.bodyExpr, '[for (i = 0;; i++) i]',
+        isValidConst: false,
+        operators: [
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.assignToRef,
+          UnlinkedExprOperation.pushEmptyExpression,
+          UnlinkedExprOperation.assignToRef,
+          UnlinkedExprOperation.forParts,
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.forElement,
+          UnlinkedExprOperation.makeUntypedList
+        ],
+        assignmentOperators: [
+          UnlinkedExprAssignOperator.assign,
+          UnlinkedExprAssignOperator.postfixIncrement
+        ],
+        ints: [
+          0,
+          1,
+          1
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor)
+        ]);
+  }
+
+  test_expr_list_for_empty_initializer() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable =
+        serializeVariableText('int i; var v = [for (; i < 10; i++) i];');
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, '[for (; i < 10; i++) i]',
+        isValidConst: false,
+        operators: [
+          UnlinkedExprOperation.pushEmptyExpression,
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.less,
+          UnlinkedExprOperation.assignToRef,
+          UnlinkedExprOperation.forParts,
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.forElement,
+          UnlinkedExprOperation.makeUntypedList
+        ],
+        assignmentOperators: [
+          UnlinkedExprAssignOperator.postfixIncrement
+        ],
+        ints: [
+          10,
+          1,
+          1
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor)
+        ]);
+  }
+
+  test_expr_list_for_two_updaters() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable = serializeVariableText(
+        'int i; int j; var v = [for (i = 0; i < 10; i++, j++) i];');
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, '[for (i = 0; i < 10; i++, j++) i]',
+        isValidConst: false,
+        operators: [
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.assignToRef,
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.less,
+          UnlinkedExprOperation.assignToRef,
+          UnlinkedExprOperation.assignToRef,
+          UnlinkedExprOperation.forParts,
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.forElement,
+          UnlinkedExprOperation.makeUntypedList
+        ],
+        assignmentOperators: [
+          UnlinkedExprAssignOperator.assign,
+          UnlinkedExprAssignOperator.postfixIncrement,
+          UnlinkedExprAssignOperator.postfixIncrement
+        ],
+        ints: [
+          0,
+          10,
+          2,
+          1
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'j',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor)
+        ]);
+  }
+
+  test_expr_list_for_with_one_declaration_typed() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable =
+        serializeVariableText('var v = [for (int i = 0; i < 10; i++) i];');
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, '[for (int i = 0; i < 10; i++) i]',
+        isValidConst: false,
+        operators: [
+          UnlinkedExprOperation.variableDeclarationStart,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.variableDeclaration,
+          UnlinkedExprOperation.forInitializerDeclarationsTyped,
+          UnlinkedExprOperation.pushParameter,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.less,
+          UnlinkedExprOperation.assignToParameter,
+          UnlinkedExprOperation.forParts,
+          UnlinkedExprOperation.pushParameter,
+          UnlinkedExprOperation.forElement,
+          UnlinkedExprOperation.makeUntypedList
+        ],
+        assignmentOperators: [
+          UnlinkedExprAssignOperator.postfixIncrement
+        ],
+        ints: [
+          0,
+          0,
+          1,
+          10,
+          1,
+          1
+        ],
+        strings: [
+          'i',
+          'i',
+          'i',
+          'i'
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, 'dart:core', 'int')
+        ]);
+  }
+
+  test_expr_list_for_with_one_declaration_untyped() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable =
+        serializeVariableText('var v = [for (var i = 0; i < 10; i++) i];');
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, '[for (var i = 0; i < 10; i++) i]',
+        isValidConst: false,
+        operators: [
+          UnlinkedExprOperation.variableDeclarationStart,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.variableDeclaration,
+          UnlinkedExprOperation.forInitializerDeclarationsUntyped,
+          UnlinkedExprOperation.pushParameter,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.less,
+          UnlinkedExprOperation.assignToParameter,
+          UnlinkedExprOperation.forParts,
+          UnlinkedExprOperation.pushParameter,
+          UnlinkedExprOperation.forElement,
+          UnlinkedExprOperation.makeUntypedList
+        ],
+        assignmentOperators: [
+          UnlinkedExprAssignOperator.postfixIncrement
+        ],
+        ints: [
+          0,
+          0,
+          1,
+          10,
+          1,
+          1
+        ],
+        strings: [
+          'i',
+          'i',
+          'i',
+          'i'
+        ]);
+  }
+
+  test_expr_list_for_with_two_declarations_untyped() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable = serializeVariableText(
+        'var v = [for (var i = 0, j = 0; i < 10; i++) i];');
+    assertUnlinkedConst(variable.initializer.bodyExpr,
+        '[for (var i = 0, j = 0; i < 10; i++) i]',
+        isValidConst: false,
+        operators: [
+          UnlinkedExprOperation.variableDeclarationStart,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.variableDeclaration,
+          UnlinkedExprOperation.variableDeclarationStart,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.variableDeclaration,
+          UnlinkedExprOperation.forInitializerDeclarationsUntyped,
+          UnlinkedExprOperation.pushParameter,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.less,
+          UnlinkedExprOperation.assignToParameter,
+          UnlinkedExprOperation.forParts,
+          UnlinkedExprOperation.pushParameter,
+          UnlinkedExprOperation.forElement,
+          UnlinkedExprOperation.makeUntypedList
+        ],
+        assignmentOperators: [
+          UnlinkedExprAssignOperator.postfixIncrement
+        ],
+        ints: [
+          0,
+          0,
+          0,
+          0,
+          2,
+          10,
+          1,
+          1
+        ],
+        strings: [
+          'i',
+          'j',
+          'i',
+          'i',
+          'i'
+        ]);
+  }
+
+  test_expr_list_for_with_uninitialized_declaration_untyped() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable =
+        serializeVariableText('var v = [for (var i; i < 10; i++) i];');
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, '[for (var i; i < 10; i++) i]',
+        isValidConst: false,
+        operators: [
+          UnlinkedExprOperation.variableDeclarationStart,
+          UnlinkedExprOperation.pushEmptyExpression,
+          UnlinkedExprOperation.variableDeclaration,
+          UnlinkedExprOperation.forInitializerDeclarationsUntyped,
+          UnlinkedExprOperation.pushParameter,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.less,
+          UnlinkedExprOperation.assignToParameter,
+          UnlinkedExprOperation.forParts,
+          UnlinkedExprOperation.pushParameter,
+          UnlinkedExprOperation.forElement,
+          UnlinkedExprOperation.makeUntypedList
+        ],
+        assignmentOperators: [
+          UnlinkedExprAssignOperator.postfixIncrement
+        ],
+        ints: [
+          0,
+          1,
+          10,
+          1,
+          1
+        ],
+        strings: [
+          'i',
+          'i',
+          'i',
+          'i'
+        ]);
+  }
+
+  test_expr_list_for_zero_updaters() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable =
+        serializeVariableText('int i; var v = [for (i = 0; i < 10;) i];');
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, '[for (i = 0; i < 10;) i]',
+        isValidConst: false,
+        operators: [
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.assignToRef,
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.less,
+          UnlinkedExprOperation.forParts,
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.forElement,
+          UnlinkedExprOperation.makeUntypedList
+        ],
+        assignmentOperators: [
+          UnlinkedExprAssignOperator.assign
+        ],
+        ints: [
+          0,
+          10,
+          0,
+          1
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor)
+        ]);
+  }
+
   test_expr_makeTypedList() {
     UnlinkedVariable variable =
         serializeVariableText('var v = <int>[11, 22, 33];');
@@ -7383,7 +8158,7 @@
         'var v = <int, String>{11: "aaa", 22: "bbb", 33: "ccc"};');
     assertUnlinkedConst(variable.initializer.bodyExpr,
         '<int, String>{11: "aaa", 22: "bbb", 33: "ccc"}',
-        operators: [UnlinkedExprOperation.makeTypedMap],
+        operators: [UnlinkedExprOperation.makeTypedMap2],
         ints: [0],
         referenceValidators: [
           (EntityRef r) => checkTypeRef(r, 'dart:core', 'int',
@@ -7429,11 +8204,14 @@
         operators: [
           UnlinkedExprOperation.pushInt,
           UnlinkedExprOperation.pushString,
+          UnlinkedExprOperation.makeMapLiteralEntry,
           UnlinkedExprOperation.pushInt,
           UnlinkedExprOperation.pushString,
+          UnlinkedExprOperation.makeMapLiteralEntry,
           UnlinkedExprOperation.pushInt,
           UnlinkedExprOperation.pushString,
-          UnlinkedExprOperation.makeUntypedMap
+          UnlinkedExprOperation.makeMapLiteralEntry,
+          UnlinkedExprOperation.makeUntypedSetOrMap
         ],
         ints: [11, 22, 33, 3],
         strings: ['aaa', 'bbb', 'ccc'],
@@ -7448,12 +8226,107 @@
           UnlinkedExprOperation.pushInt,
           UnlinkedExprOperation.pushInt,
           UnlinkedExprOperation.pushInt,
-          UnlinkedExprOperation.makeUntypedSet
+          UnlinkedExprOperation.makeUntypedSetOrMap
         ],
         ints: [11, 22, 33, 3],
         forTypeInferenceOnly: true);
   }
 
+  test_expr_map_for() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable = serializeVariableText(
+        'int i; var v = {1: 2, for (i = 0; i < 10; i++) i: i};');
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, '{1: 2, for (i = 0; i < 10; i++) i: i}',
+        isValidConst: false,
+        operators: [
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.makeMapLiteralEntry,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.assignToRef,
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.less,
+          UnlinkedExprOperation.assignToRef,
+          UnlinkedExprOperation.forParts,
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.makeMapLiteralEntry,
+          UnlinkedExprOperation.forElement,
+          UnlinkedExprOperation.makeUntypedSetOrMap
+        ],
+        assignmentOperators: [
+          UnlinkedExprAssignOperator.assign,
+          UnlinkedExprAssignOperator.postfixIncrement
+        ],
+        ints: [
+          1,
+          2,
+          0,
+          10,
+          1,
+          2
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor)
+        ]);
+  }
+
+  test_expr_set_for() {
+    experimentStatus = ExperimentStatus(
+        control_flow_collections: true, spread_collections: true);
+    UnlinkedVariable variable = serializeVariableText(
+        'int i; var v = {1, for (i = 0; i < 10; i++) i};');
+    assertUnlinkedConst(
+        variable.initializer.bodyExpr, '{1, for (i = 0; i < 10; i++) i}',
+        isValidConst: false,
+        operators: [
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.assignToRef,
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.pushInt,
+          UnlinkedExprOperation.less,
+          UnlinkedExprOperation.assignToRef,
+          UnlinkedExprOperation.forParts,
+          UnlinkedExprOperation.pushReference,
+          UnlinkedExprOperation.forElement,
+          UnlinkedExprOperation.makeUntypedSetOrMap
+        ],
+        assignmentOperators: [
+          UnlinkedExprAssignOperator.assign,
+          UnlinkedExprAssignOperator.postfixIncrement
+        ],
+        ints: [
+          1,
+          0,
+          10,
+          1,
+          2
+        ],
+        referenceValidators: [
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor),
+          (EntityRef r) => checkTypeRef(r, null, 'i',
+              expectedKind: ReferenceKind.topLevelPropertyAccessor)
+        ]);
+  }
+
   test_expr_super() {
     UnlinkedVariable variable = serializeVariableText('''
 final v = super;
@@ -10772,10 +11645,10 @@
     var errorListener = AnalysisErrorListener.NULL_LISTENER;
     var reader = new CharSequenceReader(sourceText);
     var stringSource = new StringSource(sourceText, null);
-    var scanner = new Scanner(stringSource, reader, errorListener);
+    var scanner = new Scanner(stringSource, reader, errorListener)
+      ..enableGtGtGt = true;
     var startToken = scanner.tokenize();
     var parser = new Parser(stringSource, errorListener)
-      ..enableSetLiterals = experimentStatus.set_literals
       ..enableNonNullable = experimentStatus.non_nullable;
     var compilationUnit = parser.parseCompilationUnit(startToken);
     var f = compilationUnit.declarations[0] as FunctionDeclaration;
diff --git a/pkg/analyzer/test/src/summary/test_all.dart b/pkg/analyzer/test/src/summary/test_all.dart
index 1ffc606..184c0e7 100644
--- a/pkg/analyzer/test/src/summary/test_all.dart
+++ b/pkg/analyzer/test/src/summary/test_all.dart
@@ -1,29 +1,37 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'expr_builder_test.dart' as expr_builder_test;
-import 'in_summary_source_test.dart' as in_summary_source_test;
-import 'linker_test.dart' as linker_test;
-import 'name_filter_test.dart' as name_filter_test;
-import 'package_bundle_reader_test.dart' as package_bundle_reader_test;
-import 'prelinker_test.dart' as prelinker_test;
-import 'resynthesize_ast_test.dart' as resynthesize_ast_test;
-import 'summarize_ast_strong_test.dart' as summarize_ast_strong_test;
-import 'top_level_inference_test.dart' as top_level_inference_test;
+import 'api_signature_test.dart' as api_signature;
+import 'dependency_walker_test.dart' as dependency_walker;
+import 'expr_builder_test.dart' as expr_builder;
+import 'flat_buffers_test.dart' as flat_buffers;
+import 'in_summary_source_test.dart' as in_summary_source;
+import 'linker_test.dart' as linker;
+import 'name_filter_test.dart' as name_filter;
+import 'package_bundle_reader_test.dart' as package_bundle_reader;
+import 'prelinker_test.dart' as prelinker;
+import 'resynthesize_ast2_test.dart' as resynthesize_ast2;
+import 'resynthesize_ast_test.dart' as resynthesize_ast;
+import 'summarize_ast_strong_test.dart' as summarize_ast_strong;
+import 'top_level_inference_test.dart' as top_level_inference;
 
 main() {
   defineReflectiveSuite(() {
-    expr_builder_test.main();
-    in_summary_source_test.main();
-    linker_test.main();
-    name_filter_test.main();
-    package_bundle_reader_test.main();
-    prelinker_test.main();
-    resynthesize_ast_test.main();
-    summarize_ast_strong_test.main();
-    top_level_inference_test.main();
+    api_signature.main();
+    dependency_walker.main();
+    expr_builder.main();
+    flat_buffers.main();
+    in_summary_source.main();
+    linker.main();
+    name_filter.main();
+    package_bundle_reader.main();
+    prelinker.main();
+    resynthesize_ast2.main();
+    resynthesize_ast.main();
+    summarize_ast_strong.main();
+    top_level_inference.main();
   }, name: 'summary');
 }
diff --git a/pkg/analyzer/test/src/summary/test_strategies.dart b/pkg/analyzer/test/src/summary/test_strategies.dart
index fe525e0..bc55e22 100644
--- a/pkg/analyzer/test/src/summary/test_strategies.dart
+++ b/pkg/analyzer/test/src/summary/test_strategies.dart
@@ -1,14 +1,14 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:analyzer/dart/analysis/declared_variables.dart';
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/ast/token.dart';
-import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/file_system/memory_file_system.dart';
-import 'package:analyzer/src/context/context.dart';
 import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/dart/analysis/restricted_analysis_context.dart';
 import 'package:analyzer/src/dart/scanner/reader.dart';
 import 'package:analyzer/src/dart/scanner/scanner.dart';
 import 'package:analyzer/src/generated/engine.dart';
@@ -22,7 +22,6 @@
 import 'package:analyzer/src/summary/prelink.dart';
 import 'package:analyzer/src/summary/summarize_ast.dart';
 import 'package:analyzer/src/summary/summarize_elements.dart';
-import 'package:analyzer/src/task/api/general.dart';
 import 'package:analyzer/src/test_utilities/mock_sdk.dart';
 import 'package:path/path.dart' show posix;
 import 'package:test/test.dart';
@@ -35,19 +34,22 @@
   return posix.toUri(absolutePath).toString();
 }
 
-CompilationUnit _parseText(
+CompilationUnit parseText(
   String text, {
   ExperimentStatus experimentStatus,
 }) {
   experimentStatus ??= ExperimentStatus();
   CharSequenceReader reader = new CharSequenceReader(text);
   Scanner scanner =
-      new Scanner(null, reader, AnalysisErrorListener.NULL_LISTENER);
+      new Scanner(null, reader, AnalysisErrorListener.NULL_LISTENER)
+        ..enableGtGtGt = experimentStatus.constant_update_2018;
   Token token = scanner.tokenize();
-  Parser parser =
-      new Parser(NonExistingSource.unknown, AnalysisErrorListener.NULL_LISTENER)
-        ..enableSetLiterals = experimentStatus.set_literals
-        ..enableNonNullable = experimentStatus.non_nullable;
+  Parser parser = new Parser(
+      NonExistingSource.unknown, AnalysisErrorListener.NULL_LISTENER)
+    ..enableNonNullable = experimentStatus.non_nullable
+    ..enableSpreadCollections = experimentStatus.spread_collections
+    ..enableControlFlowCollections = experimentStatus.control_flow_collections
+    ..enableTripleShift = experimentStatus.triple_shift;
   CompilationUnit unit = parser.parseCompilationUnit(token);
   unit.lineInfo = new LineInfo(scanner.lineStarts);
   return unit;
@@ -99,7 +101,9 @@
 
   void set allowMissingFiles(bool value);
 
-  AnalysisContextImpl get context;
+  set declaredVariables(DeclaredVariables declaredVariables);
+
+  bool get isAstBasedSummary => false;
 
   MemoryResourceProvider get resourceProvider;
 
@@ -115,12 +119,10 @@
 
   Source addTestSource(String code, [Uri uri]);
 
-  void checkMinimalResynthesisWork(
-      TestSummaryResynthesizer resynthesizer, LibraryElement library);
+  void checkMinimalResynthesisWork(TestSummaryResynthesizer resynthesizer,
+      Uri expectedLibraryUri, List<Uri> expectedUnitUriList);
 
   TestSummaryResynthesizer encodeLibrary(Source source);
-
-  void prepareAnalysisContext([AnalysisOptions options]);
 }
 
 /// Implementation of [SummaryBlackBoxTestStrategy] that drives summary
@@ -137,6 +139,9 @@
 
   PackageBundleAssembler bundleAssembler = new PackageBundleAssembler();
 
+  @override
+  bool get isAstBasedSummary => false;
+
   TestSummaryResynthesizer encodeLibrary(Source source) {
     _serializeLibrary(source);
 
@@ -170,17 +175,24 @@
     }
 
     Set<String> nonSdkLibraryUris = serializedSources
-        .where((Source source) =>
-            !source.isInSystemLibrary &&
-            context.computeKindOf(source) == SourceKind.LIBRARY)
+        .where((Source source) => !source.isInSystemLibrary)
         .map((Source source) => source.uri.toString())
         .toSet();
 
+    var analysisOptions = AnalysisOptionsImpl()
+      ..enabledExperiments = experimentStatus.toStringList();
+
     Map<String, LinkedLibrary> linkedSummaries = link(nonSdkLibraryUris,
-        getDependency, getUnit, context.declaredVariables.get);
+        getDependency, getUnit, declaredVariables, analysisOptions);
+
+    var analysisContext = RestrictedAnalysisContext(
+      analysisOptions,
+      declaredVariables,
+      sourceFactory,
+    );
 
     return new TestSummaryResynthesizer(
-        context,
+        analysisContext,
         new Map<String, UnlinkedUnit>()
           ..addAll(SerializedMockSdk.instance.uriToUnlinkedUnit)
           ..addAll(unlinkedSummaries),
@@ -204,17 +216,21 @@
       }
     }
     return uriToUnit.putIfAbsent(uriStr, () {
-      int modificationTime = context.computeResult(source, MODIFICATION_TIME);
-      if (modificationTime < 0) {
+      var file = getFile(source.fullName);
+
+      String contents;
+      if (file.exists) {
+        contents = file.readAsStringSync();
+      } else {
         // Source does not exist.
         if (!allowMissingFiles) {
           fail('Unexpectedly tried to get unlinked summary for $source');
         }
-        return null;
+        contents = '';
       }
 
-      String contents = context.getContents(source).data;
-      CompilationUnit unit = _parseText(contents);
+      CompilationUnit unit =
+          parseText(contents, experimentStatus: experimentStatus);
 
       UnlinkedUnitBuilder unlinkedUnit = serializeAstUnlinked(unit);
       bundleAssembler.addUnlinkedUnit(source, unlinkedUnit);
@@ -231,7 +247,7 @@
     }
 
     UnlinkedUnit getPart(String absoluteUri) {
-      Source source = context.sourceFactory.forUri(absoluteUri);
+      Source source = sourceFactory.forUri(absoluteUri);
       return _getUnlinkedUnit(source);
     }
 
@@ -242,9 +258,9 @@
     UnlinkedUnit definingUnit = _getUnlinkedUnit(librarySource);
     if (definingUnit != null) {
       LinkedLibraryBuilder linkedLibrary = prelink(librarySource.uri.toString(),
-          definingUnit, getPart, getImport, context.declaredVariables.get);
+          definingUnit, getPart, getImport, declaredVariables);
       linkedLibrary.dependencies.skip(1).forEach((LinkedDependency d) {
-        Source source = context.sourceFactory.forUri(d.uri);
+        Source source = sourceFactory.forUri(d.uri);
         _serializeLibrary(source);
       });
     }
@@ -263,6 +279,7 @@
   final Map<String, UnlinkedUnit> uriToUnlinkedUnit;
 
   final Map<String, LinkedLibrary> uriToLinkedLibrary;
+
   SerializedMockSdk._(this.uriToUnlinkedUnit, this.uriToLinkedLibrary);
 
   static SerializedMockSdk _serializeMockSdk() {
@@ -368,11 +385,12 @@
     }
 
     linked = new LinkedLibrary.fromBuffer(prelink(
-        _linkerInputs._testDartUri.toString(),
-        _linkerInputs._unlinkedDefiningUnit,
-        getPart,
-        getImport,
-        (String declaredVariable) => null).toBuffer());
+            _linkerInputs._testDartUri.toString(),
+            _linkerInputs._unlinkedDefiningUnit,
+            getPart,
+            getImport,
+            DeclaredVariables())
+        .toBuffer());
     _validateLinkedLibrary(linked);
   }
 }
@@ -432,9 +450,9 @@
     Map<String, LinkedLibraryBuilder> linkedLibraries = setupForLink(
         _linkerInputs.linkedLibraries,
         _linkerInputs.getUnit,
-        _linkerInputs.getDeclaredVariable);
+        _linkerInputs.declaredVariables);
     linker = new Linker(linkedLibraries, _linkerInputs.getDependency,
-        _linkerInputs.getUnit, null);
+        _linkerInputs.getUnit, null, analysisOptions);
   }
 }
 
@@ -472,11 +490,9 @@
       this._dependentLinkedLibraries,
       this._dependentUnlinkedUnits);
 
-  Set<String> get linkedLibraries => _uriToUnit.keys.toSet();
+  DeclaredVariables get declaredVariables => DeclaredVariables();
 
-  String getDeclaredVariable(String name) {
-    return null;
-  }
+  Set<String> get linkedLibraries => _uriToUnit.keys.toSet();
 
   LinkedLibrary getDependency(String absoluteUri) {
     Map<String, LinkedLibrary> sdkLibraries =
@@ -519,6 +535,9 @@
 
   _LinkerInputs _linkerInputs;
 
+  AnalysisOptions get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = experimentStatus.toStringList();
+
   bool get _allowMissingFiles;
 
   @override
@@ -528,7 +547,7 @@
 
   @override
   void addNamedSource(String filePath, String contents) {
-    CompilationUnit unit = _parseText(contents);
+    CompilationUnit unit = parseText(contents);
     UnlinkedUnitBuilder unlinkedUnit = serializeAstUnlinked(unit);
     _filesToLink.uriToUnit[absUri(filePath)] = unlinkedUnit;
   }
@@ -543,7 +562,8 @@
         linkerInputs.linkedLibraries,
         linkerInputs.getDependency,
         linkerInputs.getUnit,
-        linkerInputs.getDeclaredVariable);
+        linkerInputs.declaredVariables,
+        analysisOptions);
     linkedLibraries.forEach(assembler.addLinkedLibrary);
     linkerInputs._uriToUnit.forEach((String uri, UnlinkedUnit unit) {
       assembler.addUnlinkedUnitViaUri(uri, unit);
@@ -552,8 +572,7 @@
   }
 
   UnlinkedUnitBuilder createUnlinkedSummary(Uri uri, String text) =>
-      serializeAstUnlinked(
-          _parseText(text, experimentStatus: experimentStatus));
+      serializeAstUnlinked(parseText(text, experimentStatus: experimentStatus));
 
   _LinkerInputs _createLinkerInputs(String text,
       {String path: '/test.dart', String uri}) {
@@ -608,7 +627,8 @@
         _linkerInputs.linkedLibraries,
         _linkerInputs.getDependency,
         _linkerInputs.getUnit,
-        (name) => null)[_linkerInputs._testDartUri.toString()];
+        DeclaredVariables(),
+        analysisOptions)[_linkerInputs._testDartUri.toString()];
     expect(linked, isNotNull);
     _validateLinkedLibrary(linked);
     unlinkedUnits = <UnlinkedUnit>[_linkerInputs._unlinkedDefiningUnit];
diff --git a/pkg/analyzer/test/src/summary/top_level_inference_test.dart b/pkg/analyzer/test/src/summary/top_level_inference_test.dart
index 9151786..77990a8 100644
--- a/pkg/analyzer/test/src/summary/top_level_inference_test.dart
+++ b/pkg/analyzer/test/src/summary/top_level_inference_test.dart
@@ -6,6 +6,8 @@
 
 import 'package:analyzer/dart/analysis/results.dart';
 import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import '../dart/analysis/base.dart';
@@ -16,6 +18,8 @@
   defineReflectiveSuite(() {
     defineReflectiveTests(TopLevelInferenceTest);
     defineReflectiveTests(TopLevelInferenceErrorsTest);
+    defineReflectiveTests(TopLevelInferenceTestWithSpread);
+    defineReflectiveTests(TopLevelInferenceErrorsTestWithUiAsCode);
 //    defineReflectiveTests(ApplyCheckElementTextReplacements);
   });
 }
@@ -29,9 +33,6 @@
 
 @reflectiveTest
 class TopLevelInferenceErrorsTest extends AbstractStrongTest {
-  @override
-  bool get enableNewAnalysisDriver => true;
-
   test_initializer_additive() async {
     await _assertErrorOnlyLeft(['+', '-']);
   }
@@ -365,6 +366,14 @@
 }
 
 @reflectiveTest
+class TopLevelInferenceErrorsTestWithUiAsCode
+    extends TopLevelInferenceErrorsTest {
+  @override
+  List<String> get enabledExperiments =>
+      [EnableString.spread_collections, EnableString.control_flow_collections];
+}
+
+@reflectiveTest
 class TopLevelInferenceTest extends BaseAnalysisDriverTest {
   test_initializer_additive() async {
     var library = await _encodeDecodeLibrary(r'''
@@ -2629,3 +2638,15 @@
     return result.element.library;
   }
 }
+
+@reflectiveTest
+class TopLevelInferenceTestWithSpread extends TopLevelInferenceTest {
+  @override
+  List<String> get enabledExperiments => [EnableString.spread_collections];
+
+  @override
+  @failingTest
+  test_initializer_literal_map_untyped_empty() async {
+    fail('times out.');
+  }
+}
diff --git a/pkg/analyzer/test/src/summary2/ast_binary_writer_integration_test.dart b/pkg/analyzer/test/src/summary2/ast_binary_writer_integration_test.dart
new file mode 100644
index 0000000..e79a3a7
--- /dev/null
+++ b/pkg/analyzer/test/src/summary2/ast_binary_writer_integration_test.dart
@@ -0,0 +1,132 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:io';
+
+import 'package:analyzer/file_system/physical_file_system.dart';
+import 'package:analyzer/source/line_info.dart';
+import 'package:analyzer/src/summary/format.dart';
+import 'package:analyzer/src/summary/idl.dart';
+import 'package:analyzer/src/summary2/ast_binary_reader.dart';
+import 'package:analyzer/src/summary2/ast_binary_writer.dart';
+import 'package:analyzer/src/summary2/ast_text_printer.dart';
+import 'package:analyzer/src/summary2/linked_bundle_context.dart';
+import 'package:analyzer/src/summary2/linked_element_factory.dart';
+import 'package:analyzer/src/summary2/linked_unit_context.dart';
+import 'package:analyzer/src/summary2/linking_bundle_context.dart';
+import 'package:analyzer/src/summary2/reference.dart';
+import 'package:analyzer/src/summary2/tokens_writer.dart';
+import 'package:front_end/src/testing/package_root.dart' as package_root;
+import 'package:test/test.dart';
+
+import '../dart/ast/parse_base.dart';
+
+main() {
+  group('AstBinaryWriter |', () {
+    _buildTests();
+  });
+}
+
+/// Parse the [code] into AST, serialize using [AstBinaryWriter], read using
+/// [AstBinaryReader], and dump back into code. The resulting code must be
+/// the same as the input [code].
+///
+/// Whitespaces and newlines are normalized and ignored.
+/// Files with parsing errors are silently skipped.
+void _assertCode(ParseBase base, String code) {
+  code = code.trimRight();
+  code = code.replaceAll('\t', ' ');
+  code = code.replaceAll('\r\n', '\n');
+  code = code.replaceAll('\r', '\n');
+
+  LineInfo lineInfo;
+  LinkedNodeUnit linkedNodeUnit;
+  {
+    var path = base.newFile('/home/test/lib/test.dart', content: code).path;
+
+    ParseResult parseResult;
+    try {
+      parseResult = base.parseUnit(path);
+    } catch (e) {
+      return;
+    }
+
+    // Code with parsing errors cannot be restored.
+    if (parseResult.errors.isNotEmpty) {
+      return;
+    }
+
+    lineInfo = parseResult.lineInfo;
+    var originalUnit = parseResult.unit;
+
+    TokensResult tokensResult = TokensWriter().writeTokens(
+      originalUnit.beginToken,
+      originalUnit.endToken,
+    );
+    var tokensContext = tokensResult.toContext();
+
+    var rootReference = Reference.root();
+    var dynamicRef = rootReference.getChild('dart:core').getChild('dynamic');
+
+    var linkingBundleContext = LinkingBundleContext(dynamicRef);
+    var writer = new AstBinaryWriter(linkingBundleContext, tokensContext);
+    var unitLinkedNode = writer.writeNode(originalUnit);
+
+    linkedNodeUnit = LinkedNodeUnitBuilder(
+      node: unitLinkedNode,
+      tokens: tokensResult.tokens,
+    );
+  }
+
+  var rootReference = Reference.root();
+  var bundleContext = LinkedBundleContext(
+    LinkedElementFactory(null, null, rootReference),
+    LinkedNodeBundleBuilder(
+      references: LinkedNodeReferencesBuilder(name: ['']),
+    ),
+  );
+  var unitContext = LinkedUnitContext(
+    bundleContext,
+    null,
+    0,
+    null,
+    linkedNodeUnit,
+  );
+
+  var reader = AstBinaryReader(unitContext);
+  var deserializedUnit = reader.readNode(linkedNodeUnit.node);
+
+  var buffer = StringBuffer();
+  deserializedUnit.accept(
+    AstTextPrinter(buffer, lineInfo),
+  );
+
+  expect(buffer.toString(), code);
+}
+
+void _buildTests() {
+  var provider = PhysicalResourceProvider.INSTANCE;
+  var pathContext = provider.pathContext;
+
+  var packageRoot = pathContext.normalize(package_root.packageRoot);
+  var dartFiles = Directory(packageRoot)
+      .listSync(recursive: true)
+      .whereType<File>()
+      .where((e) => e.path.endsWith('.dart'))
+      .toList();
+
+  var base = ParseBase();
+  for (var file in dartFiles) {
+    // TODO(scheglov) https://github.com/dart-lang/sdk/issues/36262
+    if (file.path.endsWith('issue_31198.dart')) {
+      continue;
+    }
+
+    var relPath = pathContext.relative(file.path, from: packageRoot);
+    test(relPath, () {
+      var code = file.readAsStringSync();
+      _assertCode(base, code);
+    });
+  }
+}
diff --git a/pkg/analyzer/test/src/summary2/ast_binary_writer_test.dart b/pkg/analyzer/test/src/summary2/ast_binary_writer_test.dart
new file mode 100644
index 0000000..e23f4c1
--- /dev/null
+++ b/pkg/analyzer/test/src/summary2/ast_binary_writer_test.dart
@@ -0,0 +1,167 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/summary/format.dart';
+import 'package:analyzer/src/summary2/ast_binary_reader.dart';
+import 'package:analyzer/src/summary2/ast_binary_writer.dart';
+import 'package:analyzer/src/summary2/linked_bundle_context.dart';
+import 'package:analyzer/src/summary2/linked_element_factory.dart';
+import 'package:analyzer/src/summary2/linked_unit_context.dart';
+import 'package:analyzer/src/summary2/linking_bundle_context.dart';
+import 'package:analyzer/src/summary2/reference.dart';
+import 'package:analyzer/src/summary2/tokens_writer.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/driver_resolution.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AstBinaryWriterTest);
+  });
+}
+
+/// Just a very simple test that at least something works.
+@reflectiveTest
+class AstBinaryWriterTest extends DriverResolutionTest {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.non_nullable,
+      EnableString.spread_collections,
+    ];
+
+  test_classTypeAlias() async {
+    _assertUnresolvedCode('''
+mixin M1 {}
+mixin M2 {}
+
+class I1 {}
+class I2 {}
+
+class X = Object with M1, M2 implements I1, I2;
+''');
+  }
+
+  test_configuration() async {
+    _assertUnresolvedCode('''
+import 'dart:math'
+  if (a.b.c == 'd1') 'e1'
+  if (a.b.c == 'd2') 'e2';
+''');
+  }
+
+  test_emptyStatement() async {
+    _assertUnresolvedCode('''
+main() {
+  if (true);
+}
+''');
+  }
+
+  test_forElement() async {
+    _assertUnresolvedCode('''
+main() {
+  return [1, for (var i = 0; i < 10; i++) i * i, 2];
+}
+''');
+  }
+
+  test_ifElement() async {
+    _assertUnresolvedCode('''
+main(bool b) {
+  return [1, if (b) 2 else 3, 4];
+}
+''');
+  }
+
+  test_labeledStatement() async {
+    _assertUnresolvedCode('''
+main() {
+  a: b: 42;
+}
+''');
+  }
+
+  test_scriptTag() async {
+    _assertUnresolvedCode('''
+#!/bin/dart
+
+main() {}
+''');
+  }
+
+  test_simple() async {
+    _assertUnresolvedCode('''
+const zero = 0;
+
+@zero
+class A<T extends num> {}
+
+class B extends A<int> {}
+
+void f() { // ref
+  1 + 2.0;
+  <double>[1, 2];
+}
+''');
+  }
+
+  test_spreadElement() async {
+    _assertUnresolvedCode('''
+main() {
+var a = [1, 2, 3];
+  return [...a];
+}
+''');
+  }
+
+  void _assertUnresolvedCode(String inputCode) {
+    var path = convertPath('/test/lib/test.dart');
+    newFile(path, content: inputCode);
+
+    var parseResult = driver.parseFileSync(path);
+    var originalUnit = parseResult.unit;
+    var originalCode = originalUnit.toSource();
+
+    var tokensResult = TokensWriter().writeTokens(
+      originalUnit.beginToken,
+      originalUnit.endToken,
+    );
+    var tokensContext = tokensResult.toContext();
+
+    var rootReference = Reference.root();
+    var dynamicRef = rootReference.getChild('dart:core').getChild('dynamic');
+
+    var linkingBundleContext = LinkingBundleContext(dynamicRef);
+    var writer = new AstBinaryWriter(linkingBundleContext, tokensContext);
+    var builder = writer.writeNode(originalUnit);
+
+    var bundleContext = LinkedBundleContext(
+      LinkedElementFactory(null, null, rootReference),
+      LinkedNodeBundleBuilder(
+        references: LinkedNodeReferencesBuilder(name: ['']),
+      ),
+    );
+    var unitContext = LinkedUnitContext(
+      bundleContext,
+      null,
+      0,
+      null,
+      LinkedNodeUnitBuilder(
+        node: builder,
+        tokens: tokensResult.tokens,
+      ),
+    );
+
+    var reader = AstBinaryReader(unitContext);
+    var deserializedUnit = reader.readNode(builder);
+    var deserializedCode = deserializedUnit.toSource();
+
+    expect(deserializedCode, originalCode);
+  }
+}
diff --git a/pkg/analyzer/test/src/summary2/ast_text_printer_integration_test.dart b/pkg/analyzer/test/src/summary2/ast_text_printer_integration_test.dart
new file mode 100644
index 0000000..48bbada
--- /dev/null
+++ b/pkg/analyzer/test/src/summary2/ast_text_printer_integration_test.dart
@@ -0,0 +1,44 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:io';
+
+import 'package:analyzer/file_system/physical_file_system.dart';
+import 'package:front_end/src/testing/package_root.dart' as package_root;
+import 'package:test/test.dart';
+
+import '../dart/ast/parse_base.dart';
+import 'ast_text_printer_test.dart';
+
+main() {
+  group('Parse and print AST |', () {
+    _buildTests();
+  });
+}
+
+void _buildTests() {
+  var provider = PhysicalResourceProvider.INSTANCE;
+  var pathContext = provider.pathContext;
+
+  var packageRoot = pathContext.normalize(package_root.packageRoot);
+  var dartFiles = Directory(packageRoot)
+      .listSync(recursive: true)
+      .whereType<File>()
+      .where((e) => e.path.endsWith('.dart'))
+      .toList();
+
+  var base = ParseBase();
+  for (var file in dartFiles) {
+    // TODO(scheglov) https://github.com/dart-lang/sdk/issues/36262
+    if (file.path.endsWith('issue_31198.dart')) {
+      continue;
+    }
+
+    var relPath = pathContext.relative(file.path, from: packageRoot);
+    test(relPath, () {
+      var code = file.readAsStringSync();
+      assertParseCodeAndPrintAst(base, code, mightHasParseErrors: true);
+    });
+  }
+}
diff --git a/pkg/analyzer/test/src/summary2/ast_text_printer_test.dart b/pkg/analyzer/test/src/summary2/ast_text_printer_test.dart
new file mode 100644
index 0000000..7e04023
--- /dev/null
+++ b/pkg/analyzer/test/src/summary2/ast_text_printer_test.dart
@@ -0,0 +1,124 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/generated/engine.dart';
+import 'package:analyzer/src/summary2/ast_text_printer.dart';
+import 'package:test/test.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/ast/parse_base.dart';
+
+main() {
+  defineReflectiveSuite(() {
+    defineReflectiveTests(AstTextPrinterTest);
+    defineReflectiveTests(AstTextPrinterWithUiAsCodeTest);
+  });
+}
+
+/// Assert that the [code] parsed into AST, when it does not have parse errors,
+/// and printed with [AstTextPrinter], gives exactly the same [code].
+///
+/// Whitespaces and newlines are normalized and ignored.
+void assertParseCodeAndPrintAst(ParseBase base, String code,
+    {bool mightHasParseErrors: false}) {
+  code = code.trimRight();
+  code = code.replaceAll('\t', ' ');
+  code = code.replaceAll('\r\n', '\n');
+  code = code.replaceAll('\r', '\n');
+
+  var path = base.newFile('/home/test/lib/test.dart', content: code).path;
+
+  ParseResult parseResult;
+  try {
+    parseResult = base.parseUnit(path);
+  } catch (e) {
+    return;
+  }
+
+  // Code with parsing errors cannot be restored.
+  if (parseResult.errors.isNotEmpty) {
+    if (mightHasParseErrors) return;
+    expect(parseResult.errors, isEmpty);
+  }
+
+  var buffer = StringBuffer();
+  parseResult.unit.accept(
+    AstTextPrinter(buffer, parseResult.lineInfo),
+  );
+
+//    print('---------------------');
+//    print(buffer.toString());
+//    print('---------------------');
+  expect(buffer.toString(), code);
+}
+
+@reflectiveTest
+class AstTextPrinterTest extends ParseBase {
+  test_commentOnly() async {
+    assertParseCodeAndPrintAst(this, r'''
+// aaa
+// bbb
+''');
+  }
+
+  test_simple() async {
+    assertParseCodeAndPrintAst(this, r'''
+class C {
+  void foo() {
+    1;
+    2 + 3;
+  }
+}
+''');
+  }
+
+  test_spaces_emptyLine() async {
+    assertParseCodeAndPrintAst(this, '''
+class A {}
+${' ' * 2}
+class B {}
+''');
+  }
+}
+
+@reflectiveTest
+class AstTextPrinterWithUiAsCodeTest extends ParseBase {
+  @override
+  AnalysisOptionsImpl get analysisOptions => AnalysisOptionsImpl()
+    ..enabledExperiments = [
+      EnableString.control_flow_collections,
+      EnableString.spread_collections,
+    ];
+
+  test_forElement() async {
+    assertParseCodeAndPrintAst(this, r'''
+var _ = [1, for (var v in [2, 3, 4]) v, 5];
+''');
+  }
+
+  test_ifElement_then() async {
+    assertParseCodeAndPrintAst(this, r'''
+var _ = [1, if (true) 2, 3];
+''');
+  }
+
+  test_ifElement_thenElse() async {
+    assertParseCodeAndPrintAst(this, r'''
+var _ = [1, if (true) 2 else 3, 4];
+''');
+  }
+
+  test_spreadElement() async {
+    assertParseCodeAndPrintAst(this, r'''
+var _ = [1, ...[2, 3], 4];
+''');
+  }
+
+  test_spreadElement_nullable() async {
+    assertParseCodeAndPrintAst(this, r'''
+var _ = [1, ...?[2, 3], 4];
+''');
+  }
+}
diff --git a/pkg/analyzer/test/src/summary2/test_all.dart b/pkg/analyzer/test/src/summary2/test_all.dart
new file mode 100644
index 0000000..d7b4c0b
--- /dev/null
+++ b/pkg/analyzer/test/src/summary2/test_all.dart
@@ -0,0 +1,15 @@
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import 'ast_binary_writer_test.dart' as ast_binary_writer;
+import 'ast_text_printer_test.dart' as ast_text_printer;
+
+main() {
+  defineReflectiveSuite(() {
+    ast_binary_writer.main();
+    ast_text_printer.main();
+  }, name: 'summary2');
+}
diff --git a/pkg/analyzer/test/src/task/dart_work_manager_test.dart b/pkg/analyzer/test/src/task/dart_work_manager_test.dart
deleted file mode 100644
index 1a83d55..0000000
--- a/pkg/analyzer/test/src/task/dart_work_manager_test.dart
+++ /dev/null
@@ -1,994 +0,0 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/error/error.dart' show AnalysisError;
-import 'package:analyzer/exception/exception.dart';
-import 'package:analyzer/src/context/cache.dart';
-import 'package:analyzer/src/dart/scanner/scanner.dart' show ScannerErrorCode;
-import 'package:analyzer/src/generated/engine.dart'
-    show
-        AnalysisContext,
-        AnalysisErrorInfo,
-        AnalysisErrorInfoImpl,
-        AnalysisOptions,
-        AnalysisOptionsImpl,
-        CacheState,
-        ChangeNoticeImpl,
-        InternalAnalysisContext;
-import 'package:analyzer/src/generated/sdk.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/testing/ast_test_factory.dart';
-import 'package:analyzer/src/task/api/dart.dart';
-import 'package:analyzer/src/task/api/general.dart';
-import 'package:analyzer/src/task/api/model.dart';
-import 'package:analyzer/src/task/dart.dart';
-import 'package:analyzer/src/task/dart_work_manager.dart';
-import 'package:test/test.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import '../../generated/test_support.dart';
-
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(DartWorkManagerTest);
-  });
-}
-
-@reflectiveTest
-class DartWorkManagerTest {
-  _InternalAnalysisContextMock context = new _InternalAnalysisContextMock();
-  AnalysisCache cache;
-  DartWorkManager manager;
-
-  CaughtException caughtException = new CaughtException(null, null);
-
-  Source source1 = new TestSource('1.dart');
-  Source source2 = new TestSource('2.dart');
-  Source source3 = new TestSource('3.dart');
-  Source source4 = new TestSource('4.dart');
-  CacheEntry entry1;
-  CacheEntry entry2;
-  CacheEntry entry3;
-  CacheEntry entry4;
-
-  void expect_librarySourceQueue(List<Source> sources) {
-    expect(manager.librarySourceQueue, unorderedEquals(sources));
-  }
-
-  void expect_unknownSourceQueue(List<Source> sources) {
-    expect(manager.unknownSourceQueue, unorderedEquals(sources));
-  }
-
-  void setUp() {
-    cache = context.analysisCache;
-    manager = new DartWorkManager(context);
-    entry1 = _getOrCreateEntry(source1);
-    entry2 = _getOrCreateEntry(source2);
-    entry3 = _getOrCreateEntry(source3);
-    entry4 = _getOrCreateEntry(source4);
-  }
-
-  void test_applyChange_add() {
-    // add source1
-    manager.applyChange([source1], [], []);
-    expect_unknownSourceQueue([source1]);
-    expect_librarySourceQueue([]);
-    // add source2
-    manager.applyChange([source2], [], []);
-    expect_librarySourceQueue([]);
-    expect_unknownSourceQueue([source1, source2]);
-  }
-
-  void test_applyChange_add_duplicate() {
-    // add source1
-    manager.applyChange([source1], [], []);
-    expect_unknownSourceQueue([source1]);
-    expect_librarySourceQueue([]);
-    // add source2
-    manager.applyChange([source1], [], []);
-    expect_librarySourceQueue([]);
-    expect_unknownSourceQueue([source1]);
-  }
-
-  void test_applyChange_addRemove() {
-    manager.applyChange([source1, source2], [], [source2, source3]);
-    expect_unknownSourceQueue([source1]);
-    expect_librarySourceQueue([]);
-  }
-
-  void test_applyChange_change() {
-    manager.librarySourceQueue.addAll([source1, source3]);
-    manager.unknownSourceQueue.addAll([source4]);
-    // change source1
-    manager.applyChange([], [source1], []);
-    expect_librarySourceQueue([source3]);
-    expect_unknownSourceQueue([source4, source1]);
-  }
-
-  /**
-   * When we perform limited invalidation, we keep [SOURCE_KIND] valid. So, we
-   * don't need to put such sources into [DartWorkManager.unknownSourceQueue],
-   * and remove from [DartWorkManager.librarySourceQueue].
-   */
-  void test_applyChange_change_hasSourceKind() {
-    entry1.setValue(SOURCE_KIND, SourceKind.LIBRARY, []);
-    manager.librarySourceQueue.addAll([source1, source2]);
-    manager.unknownSourceQueue.addAll([source3]);
-    // change source1
-    manager.applyChange([], [source1, source2], []);
-    expect_librarySourceQueue([source1]);
-    expect_unknownSourceQueue([source2, source3]);
-  }
-
-  void test_applyChange_remove() {
-    manager.librarySourceQueue.addAll([source1, source3]);
-    manager.unknownSourceQueue.addAll([source4]);
-    // remove source1
-    manager.applyChange([], [], [source1]);
-    expect_librarySourceQueue([source3]);
-    expect_unknownSourceQueue([source4]);
-    // remove source3
-    manager.applyChange([], [], [source3]);
-    expect_librarySourceQueue([]);
-    expect_unknownSourceQueue([source4]);
-    // remove source4
-    manager.applyChange([], [], [source4]);
-    expect_librarySourceQueue([]);
-    expect_unknownSourceQueue([]);
-  }
-
-  void test_applyChange_updatePartsLibraries_changeLibrary() {
-    Source part1 = new TestSource('part1.dart');
-    Source part2 = new TestSource('part2.dart');
-    Source part3 = new TestSource('part3.dart');
-    Source library1 = new TestSource('library1.dart');
-    Source library2 = new TestSource('library2.dart');
-    manager.partLibrariesMap[part1] = [library1, library2];
-    manager.partLibrariesMap[part2] = [library2];
-    manager.partLibrariesMap[part3] = [library1];
-    manager.libraryPartsMap[library1] = [part1, part3];
-    manager.libraryPartsMap[library2] = [part1, part2];
-    _getOrCreateEntry(part1).setValue(CONTAINING_LIBRARIES, [], []);
-    expect(cache.getState(part1, CONTAINING_LIBRARIES), CacheState.VALID);
-    // change library1
-    manager.applyChange([], [library1], []);
-    expect(manager.partLibrariesMap[part1], unorderedEquals([library2]));
-    expect(manager.partLibrariesMap[part2], unorderedEquals([library2]));
-    expect(manager.partLibrariesMap[part3], unorderedEquals([]));
-    expect(manager.libraryPartsMap[library1], isNull);
-    expect(manager.libraryPartsMap[library2], [part1, part2]);
-    expect(cache.getState(part1, CONTAINING_LIBRARIES), CacheState.INVALID);
-  }
-
-  void test_applyChange_updatePartsLibraries_changePart() {
-    Source part1 = new TestSource('part1.dart');
-    Source part2 = new TestSource('part2.dart');
-    Source part3 = new TestSource('part3.dart');
-    Source library1 = new TestSource('library1.dart');
-    Source library2 = new TestSource('library2.dart');
-    manager.partLibrariesMap[part1] = [library1, library2];
-    manager.partLibrariesMap[part2] = [library2];
-    manager.partLibrariesMap[part3] = [library1];
-    manager.libraryPartsMap[library1] = [part1, part3];
-    manager.libraryPartsMap[library2] = [part1, part2];
-    _getOrCreateEntry(part1).setValue(CONTAINING_LIBRARIES, [], []);
-    expect(cache.getState(part1, CONTAINING_LIBRARIES), CacheState.VALID);
-    // change part1
-    manager.applyChange([], [part1], []);
-    expect(manager.partLibrariesMap[part2], unorderedEquals([library2]));
-    expect(manager.partLibrariesMap[part3], unorderedEquals([library1]));
-    expect(manager.libraryPartsMap[library1], [part1, part3]);
-    expect(manager.libraryPartsMap[library2], [part1, part2]);
-    expect(cache.getState(part1, CONTAINING_LIBRARIES), CacheState.INVALID);
-  }
-
-  void test_applyChange_updatePartsLibraries_removeLibrary() {
-    Source part1 = new TestSource('part1.dart');
-    Source part2 = new TestSource('part2.dart');
-    Source part3 = new TestSource('part3.dart');
-    Source library1 = new TestSource('library1.dart');
-    Source library2 = new TestSource('library2.dart');
-    manager.partLibrariesMap[part1] = [library1, library2];
-    manager.partLibrariesMap[part2] = [library2];
-    manager.partLibrariesMap[part3] = [library1];
-    manager.libraryPartsMap[library1] = [part1, part3];
-    manager.libraryPartsMap[library2] = [part1, part2];
-    // remove library1
-    manager.applyChange([], [], [library1]);
-    expect(manager.partLibrariesMap[part1], unorderedEquals([library2]));
-    expect(manager.partLibrariesMap[part2], unorderedEquals([library2]));
-    expect(manager.partLibrariesMap[part3], unorderedEquals([]));
-    expect(manager.libraryPartsMap[library1], isNull);
-    expect(manager.libraryPartsMap[library2], [part1, part2]);
-  }
-
-  void test_applyChange_updatePartsLibraries_removePart() {
-    Source part1 = new TestSource('part1.dart');
-    Source part2 = new TestSource('part2.dart');
-    Source part3 = new TestSource('part3.dart');
-    Source library1 = new TestSource('library1.dart');
-    Source library2 = new TestSource('library2.dart');
-    manager.partLibrariesMap[part1] = [library1, library2];
-    manager.partLibrariesMap[part2] = [library2];
-    manager.partLibrariesMap[part3] = [library1];
-    manager.libraryPartsMap[library1] = [part1, part3];
-    manager.libraryPartsMap[library2] = [part1, part2];
-    // remove part1
-    manager.applyChange([], [], [part1]);
-    expect(manager.partLibrariesMap[part1], isNull);
-    expect(manager.partLibrariesMap[part2], unorderedEquals([library2]));
-    expect(manager.partLibrariesMap[part3], unorderedEquals([library1]));
-    expect(manager.libraryPartsMap[library1], [part1, part3]);
-    expect(manager.libraryPartsMap[library2], [part1, part2]);
-  }
-
-  void test_applyPriorityTargets_isLibrary_computeErrors() {
-    context.setShouldErrorsBeAnalyzed(source2, true);
-    context.setShouldErrorsBeAnalyzed(source3, true);
-    entry1.setValue(SOURCE_KIND, SourceKind.LIBRARY, []);
-    entry2.setValue(SOURCE_KIND, SourceKind.LIBRARY, []);
-    entry3.setValue(SOURCE_KIND, SourceKind.LIBRARY, []);
-    manager.priorityResultQueue
-        .add(new TargetedResult(source1, LIBRARY_ERRORS_READY));
-    manager.priorityResultQueue
-        .add(new TargetedResult(source2, LIBRARY_ERRORS_READY));
-    // -source1 +source3
-    manager.applyPriorityTargets([source2, source3]);
-    expect(
-        manager.priorityResultQueue,
-        unorderedEquals([
-          new TargetedResult(source2, LIBRARY_ERRORS_READY),
-          new TargetedResult(source3, LIBRARY_ERRORS_READY)
-        ]));
-    // get next request
-    TargetedResult request = manager.getNextResult();
-    expect(request.target, source2);
-    expect(request.result, LIBRARY_ERRORS_READY);
-  }
-
-  void test_applyPriorityTargets_isLibrary_computeUnit() {
-    context.setShouldErrorsBeAnalyzed(source2, false);
-    context.setShouldErrorsBeAnalyzed(source3, false);
-    entry1.setValue(SOURCE_KIND, SourceKind.LIBRARY, []);
-    entry2.setValue(SOURCE_KIND, SourceKind.LIBRARY, []);
-    entry3.setValue(SOURCE_KIND, SourceKind.LIBRARY, []);
-    manager.priorityResultQueue
-        .add(new TargetedResult(source1, LIBRARY_ERRORS_READY));
-    manager.priorityResultQueue
-        .add(new TargetedResult(source2, LIBRARY_ERRORS_READY));
-    // -source1 +source3
-    manager.applyPriorityTargets([source2, source3]);
-    expect(
-        manager.priorityResultQueue,
-        unorderedEquals([
-          new TargetedResult(
-              new LibrarySpecificUnit(source2, source2), RESOLVED_UNIT),
-          new TargetedResult(
-              new LibrarySpecificUnit(source3, source3), RESOLVED_UNIT),
-        ]));
-  }
-
-  void test_applyPriorityTargets_isPart() {
-    entry1.setValue(SOURCE_KIND, SourceKind.PART, []);
-    entry2.setValue(SOURCE_KIND, SourceKind.LIBRARY, []);
-    entry3.setValue(SOURCE_KIND, SourceKind.LIBRARY, []);
-    // +source2 +source3
-    context.getLibrariesContainingMap[source1] = <Source>[source2, source3];
-    manager.applyPriorityTargets([source1]);
-    expect(
-        manager.priorityResultQueue,
-        unorderedEquals([
-          new TargetedResult(source2, LIBRARY_ERRORS_READY),
-          new TargetedResult(source3, LIBRARY_ERRORS_READY)
-        ]));
-    // get next request
-    TargetedResult request = manager.getNextResult();
-    expect(request.target, source2);
-    expect(request.result, LIBRARY_ERRORS_READY);
-  }
-
-  void test_applyPriorityTargets_isUnknown() {
-    manager.applyPriorityTargets([source2, source3]);
-    expect(
-        manager.priorityResultQueue,
-        unorderedEquals([
-          new TargetedResult(source2, SOURCE_KIND),
-          new TargetedResult(source3, SOURCE_KIND)
-        ]));
-    // get next request
-    TargetedResult request = manager.getNextResult();
-    expect(request.target, source2);
-    expect(request.result, SOURCE_KIND);
-  }
-
-  void test_getErrors() {
-    AnalysisError error1 =
-        new AnalysisError(source1, 1, 0, ScannerErrorCode.MISSING_DIGIT);
-    AnalysisError error2 =
-        new AnalysisError(source1, 2, 0, ScannerErrorCode.MISSING_DIGIT);
-    context.getLibrariesContainingMap[source1] = <Source>[source2];
-    entry1.setValue(SCAN_ERRORS, <AnalysisError>[error1], []);
-    context
-        .getCacheEntry(new LibrarySpecificUnit(source2, source1))
-        .setValue(VERIFY_ERRORS, <AnalysisError>[error2], []);
-    List<AnalysisError> errors = manager.getErrors(source1);
-    expect(errors, unorderedEquals([error1, error2]));
-  }
-
-  void test_getErrors_hasFullList() {
-    AnalysisError error1 =
-        new AnalysisError(source1, 1, 0, ScannerErrorCode.MISSING_DIGIT);
-    AnalysisError error2 =
-        new AnalysisError(source1, 2, 0, ScannerErrorCode.MISSING_DIGIT);
-    context.getLibrariesContainingMap[source1] = <Source>[source2];
-    entry1.setValue(DART_ERRORS, <AnalysisError>[error1, error2], []);
-    List<AnalysisError> errors = manager.getErrors(source1);
-    expect(errors, unorderedEquals([error1, error2]));
-  }
-
-  void test_getLibrariesContainingPart() {
-    context.aboutToComputeEverything = false;
-    Source part1 = new TestSource('part1.dart');
-    Source part2 = new TestSource('part2.dart');
-    Source part3 = new TestSource('part3.dart');
-    Source library1 = new TestSource('library1.dart');
-    Source library2 = new TestSource('library2.dart');
-    manager.partLibrariesMap[part1] = [library1, library2];
-    manager.partLibrariesMap[part2] = [library2];
-    manager.libraryPartsMap[library1] = [part1];
-    manager.libraryPartsMap[library2] = [part1, part2];
-    // getLibrariesContainingPart
-    expect(manager.getLibrariesContainingPart(part1),
-        unorderedEquals([library1, library2]));
-    expect(
-        manager.getLibrariesContainingPart(part2), unorderedEquals([library2]));
-    expect(manager.getLibrariesContainingPart(part3), isEmpty);
-  }
-
-  void test_getLibrariesContainingPart_askResultProvider() {
-    Source part1 = new TestSource('part1.dart');
-    Source part2 = new TestSource('part2.dart');
-    Source part3 = new TestSource('part3.dart');
-    Source library1 = new TestSource('library1.dart');
-    Source library2 = new TestSource('library2.dart');
-    // configure AnalysisContext mock
-    context.aboutToComputeResultMap[CONTAINING_LIBRARIES] =
-        (CacheEntry entry, ResultDescriptor result) {
-      if (entry.target == part1) {
-        entry.setValue(result as ResultDescriptor<List<Source>>,
-            <Source>[library1, library2], []);
-        return true;
-      }
-      if (entry.target == part2) {
-        entry.setValue(
-            result as ResultDescriptor<List<Source>>, <Source>[library2], []);
-        return true;
-      }
-      return false;
-    };
-    // getLibrariesContainingPart
-    expect(manager.getLibrariesContainingPart(part1),
-        unorderedEquals([library1, library2]));
-    expect(
-        manager.getLibrariesContainingPart(part2), unorderedEquals([library2]));
-    expect(manager.getLibrariesContainingPart(part3), isEmpty);
-  }
-
-  void test_getLibrariesContainingPart_inSDK() {
-    _SourceMock part = new _SourceMock('part.dart');
-    part.isInSystemLibrary = true;
-    // SDK work manager
-    _DartWorkManagerMock sdkDartWorkManagerMock = new _DartWorkManagerMock();
-    sdkDartWorkManagerMock.librariesContainingPartMap[part] = <Source>[
-      source2,
-      source3
-    ];
-    // SDK context mock
-    _InternalAnalysisContextMock sdkContextMock =
-        new _InternalAnalysisContextMock();
-    sdkContextMock.workManagers = <WorkManager>[sdkDartWorkManagerMock];
-    // SDK mock
-    _DartSdkMock sdkMock = new _DartSdkMock();
-    sdkMock.context = sdkContextMock;
-    // SourceFactory mock
-    _SourceFactoryMock sourceFactory = new _SourceFactoryMock();
-    sourceFactory.dartSdk = sdkMock;
-    context.sourceFactory = sourceFactory;
-    // SDK source mock
-    _SourceMock source = new _SourceMock('test.dart');
-    source.source = source;
-    source.isInSystemLibrary = true;
-    // validate
-    expect(manager.getLibrariesContainingPart(part),
-        unorderedEquals([source2, source3]));
-  }
-
-  void test_getNextResult_hasLibraries_firstIsError() {
-    entry1.setErrorState(caughtException, [LIBRARY_ERRORS_READY]);
-    manager.librarySourceQueue.addAll([source1, source2]);
-    TargetedResult request = manager.getNextResult();
-    expect(request.target, source2);
-    expect(request.result, LIBRARY_ERRORS_READY);
-    // source1 is out, source2 is waiting
-    expect_librarySourceQueue([source2]);
-  }
-
-  void test_getNextResult_hasLibraries_firstIsInvalid() {
-    entry1.setState(LIBRARY_ERRORS_READY, CacheState.INVALID);
-    manager.librarySourceQueue.addAll([source1, source2]);
-    TargetedResult request = manager.getNextResult();
-    expect(request.target, source1);
-    expect(request.result, LIBRARY_ERRORS_READY);
-    // no changes until computed
-    expect_librarySourceQueue([source1, source2]);
-  }
-
-  void test_getNextResult_hasLibraries_firstIsValid() {
-    entry1.setValue(LIBRARY_ERRORS_READY, true, []);
-    manager.librarySourceQueue.addAll([source1, source2]);
-    TargetedResult request = manager.getNextResult();
-    expect(request.target, source2);
-    expect(request.result, LIBRARY_ERRORS_READY);
-    // source1 is out, source2 is waiting
-    expect_librarySourceQueue([source2]);
-  }
-
-  void test_getNextResult_hasPriority_firstIsError() {
-    manager.addPriorityResult(source1, SOURCE_KIND);
-    manager.addPriorityResult(source2, SOURCE_KIND);
-    expect(
-        manager.priorityResultQueue,
-        unorderedEquals([
-          new TargetedResult(source1, SOURCE_KIND),
-          new TargetedResult(source2, SOURCE_KIND)
-        ]));
-    // configure state and get next result
-    entry1.setErrorState(caughtException, [SOURCE_KIND]);
-    TargetedResult request = manager.getNextResult();
-    expect(request.target, source2);
-    expect(request.result, SOURCE_KIND);
-    // source1 is out, source2 is waiting
-    expect(manager.priorityResultQueue,
-        unorderedEquals([new TargetedResult(source2, SOURCE_KIND)]));
-  }
-
-  void test_getNextResult_hasPriority_firstIsValid() {
-    manager.addPriorityResult(source1, SOURCE_KIND);
-    manager.addPriorityResult(source2, SOURCE_KIND);
-    expect(
-        manager.priorityResultQueue,
-        unorderedEquals([
-          new TargetedResult(source1, SOURCE_KIND),
-          new TargetedResult(source2, SOURCE_KIND)
-        ]));
-    // configure state and get next result
-    entry1.setValue(SOURCE_KIND, SourceKind.LIBRARY, []);
-    TargetedResult request = manager.getNextResult();
-    expect(request.target, source2);
-    expect(request.result, SOURCE_KIND);
-    // source1 is out, source2 is waiting
-    expect(manager.priorityResultQueue,
-        unorderedEquals([new TargetedResult(source2, SOURCE_KIND)]));
-  }
-
-  void test_getNextResult_hasUnknown_firstIsError() {
-    entry1.setErrorState(caughtException, [SOURCE_KIND]);
-    manager.unknownSourceQueue.addAll([source1, source2]);
-    TargetedResult request = manager.getNextResult();
-    expect(request.target, source2);
-    expect(request.result, SOURCE_KIND);
-    // source1 is out, source2 is waiting
-    expect_librarySourceQueue([]);
-    expect_unknownSourceQueue([source2]);
-  }
-
-  void test_getNextResult_hasUnknown_firstIsInvalid() {
-    manager.unknownSourceQueue.addAll([source1, source2]);
-    TargetedResult request = manager.getNextResult();
-    expect(request.target, source1);
-    expect(request.result, SOURCE_KIND);
-    // no changes until computed
-    expect_librarySourceQueue([]);
-    expect_unknownSourceQueue([source1, source2]);
-  }
-
-  void test_getNextResult_hasUnknown_firstIsValid() {
-    entry1.setValue(SOURCE_KIND, SourceKind.LIBRARY, []);
-    manager.unknownSourceQueue.addAll([source1, source2]);
-    TargetedResult request = manager.getNextResult();
-    expect(request.target, source2);
-    expect(request.result, SOURCE_KIND);
-    // source1 is out, source2 is waiting
-    expect_librarySourceQueue([]);
-    expect_unknownSourceQueue([source2]);
-  }
-
-  void test_getNextResult_nothingToDo() {
-    TargetedResult request = manager.getNextResult();
-    expect(request, isNull);
-  }
-
-  void test_getNextResultPriority_hasLibrary() {
-    manager.librarySourceQueue.addAll([source1]);
-    expect(manager.getNextResultPriority(), WorkOrderPriority.NORMAL);
-  }
-
-  void test_getNextResultPriority_hasPriority() {
-    manager.addPriorityResult(source1, SOURCE_KIND);
-    expect(manager.getNextResultPriority(), WorkOrderPriority.PRIORITY);
-  }
-
-  void test_getNextResultPriority_hasUnknown() {
-    manager.unknownSourceQueue.addAll([source1]);
-    expect(manager.getNextResultPriority(), WorkOrderPriority.NORMAL);
-  }
-
-  void test_getNextResultPriority_nothingToDo() {
-    expect(manager.getNextResultPriority(), WorkOrderPriority.NONE);
-  }
-
-  void test_onAnalysisOptionsChanged() {
-    context.everythingExists = true;
-    // set cache values
-    entry1.setValue(PARSED_UNIT, AstTestFactory.compilationUnit(), []);
-    entry1.setValue(IMPORTED_LIBRARIES, <Source>[], []);
-    entry1.setValue(EXPLICITLY_IMPORTED_LIBRARIES, <Source>[], []);
-    entry1.setValue(EXPORTED_LIBRARIES, <Source>[], []);
-    entry1.setValue(INCLUDED_PARTS, <Source>[], []);
-    // configure LibrarySpecificUnit
-    LibrarySpecificUnit unitTarget = new LibrarySpecificUnit(source2, source3);
-    CacheEntry unitEntry = new CacheEntry(unitTarget);
-    cache.put(unitEntry);
-    unitEntry.setValue(BUILD_LIBRARY_ERRORS, <AnalysisError>[], []);
-    expect(unitEntry.getState(BUILD_LIBRARY_ERRORS), CacheState.VALID);
-    // notify
-    manager.onAnalysisOptionsChanged();
-    // resolution is invalidated
-    expect(unitEntry.getState(BUILD_LIBRARY_ERRORS), CacheState.INVALID);
-    // ...but URIs are still value
-    expect(entry1.getState(PARSED_UNIT), CacheState.VALID);
-    expect(entry1.getState(IMPORTED_LIBRARIES), CacheState.VALID);
-    expect(entry1.getState(EXPLICITLY_IMPORTED_LIBRARIES), CacheState.VALID);
-    expect(entry1.getState(EXPORTED_LIBRARIES), CacheState.VALID);
-    expect(entry1.getState(INCLUDED_PARTS), CacheState.VALID);
-  }
-
-  void test_onResultInvalidated_scheduleInvalidatedLibraries() {
-    // make source3 implicit
-    entry3.explicitlyAdded = false;
-    // set SOURCE_KIND
-    entry1.setValue(SOURCE_KIND, SourceKind.LIBRARY, []);
-    entry2.setValue(SOURCE_KIND, SourceKind.PART, []);
-    entry3.setValue(SOURCE_KIND, SourceKind.LIBRARY, []);
-    // set LIBRARY_ERRORS_READY for source1 and source3
-    entry1.setValue(LIBRARY_ERRORS_READY, true, []);
-    entry3.setValue(LIBRARY_ERRORS_READY, true, []);
-    // invalidate LIBRARY_ERRORS_READY for source1, schedule it
-    entry1.setState(LIBRARY_ERRORS_READY, CacheState.INVALID);
-    expect_librarySourceQueue([source1]);
-    // invalidate LIBRARY_ERRORS_READY for source3, implicit, not scheduled
-    entry3.setState(LIBRARY_ERRORS_READY, CacheState.INVALID);
-    expect_librarySourceQueue([source1]);
-  }
-
-  void test_onSourceFactoryChanged() {
-    context.everythingExists = true;
-    // set cache values
-    entry1.setValue(PARSED_UNIT, AstTestFactory.compilationUnit(), []);
-    entry1.setValue(IMPORTED_LIBRARIES, <Source>[], []);
-    entry1.setValue(EXPLICITLY_IMPORTED_LIBRARIES, <Source>[], []);
-    entry1.setValue(EXPORTED_LIBRARIES, <Source>[], []);
-    entry1.setValue(INCLUDED_PARTS, <Source>[], []);
-    entry1.setValue(LIBRARY_SPECIFIC_UNITS, <LibrarySpecificUnit>[], []);
-    entry1.setValue(UNITS, <Source>[], []);
-    // configure LibrarySpecificUnit
-    LibrarySpecificUnit unitTarget = new LibrarySpecificUnit(source2, source3);
-    CacheEntry unitEntry = new CacheEntry(unitTarget);
-    cache.put(unitEntry);
-    unitEntry.setValue(BUILD_LIBRARY_ERRORS, <AnalysisError>[], []);
-    expect(unitEntry.getState(BUILD_LIBRARY_ERRORS), CacheState.VALID);
-    // notify
-    manager.onSourceFactoryChanged();
-    // resolution is invalidated
-    expect(unitEntry.getState(BUILD_LIBRARY_ERRORS), CacheState.INVALID);
-    // ...and URIs resolution too
-    expect(entry1.getState(PARSED_UNIT), CacheState.INVALID);
-    expect(entry1.getState(IMPORTED_LIBRARIES), CacheState.INVALID);
-    expect(entry1.getState(EXPLICITLY_IMPORTED_LIBRARIES), CacheState.INVALID);
-    expect(entry1.getState(EXPORTED_LIBRARIES), CacheState.INVALID);
-    expect(entry1.getState(INCLUDED_PARTS), CacheState.INVALID);
-    expect(entry1.getState(LIBRARY_SPECIFIC_UNITS), CacheState.INVALID);
-    expect(entry1.getState(UNITS), CacheState.INVALID);
-  }
-
-  void test_resultsComputed_errors_forLibrarySpecificUnit() {
-    LineInfo lineInfo = new LineInfo([0]);
-    AnalysisError error1 =
-        new AnalysisError(source1, 1, 0, ScannerErrorCode.MISSING_DIGIT);
-    AnalysisError error2 =
-        new AnalysisError(source1, 2, 0, ScannerErrorCode.MISSING_DIGIT);
-    context.getLibrariesContainingMap[source1] = <Source>[source2];
-    context.errorsMap[source1] =
-        new AnalysisErrorInfoImpl([error1, error2], lineInfo);
-    entry1.setValue(LINE_INFO, lineInfo, []);
-    entry1.setValue(SCAN_ERRORS, <AnalysisError>[error1], []);
-    AnalysisTarget unitTarget = new LibrarySpecificUnit(source2, source1);
-    context
-        .getCacheEntry(unitTarget)
-        .setValue(VERIFY_ERRORS, <AnalysisError>[error2], []);
-    // RESOLVED_UNIT is ready, set errors
-    manager.resultsComputed(
-        unitTarget, {RESOLVED_UNIT: AstTestFactory.compilationUnit()});
-    // all of the errors are included
-    ChangeNoticeImpl notice = context.getNotice(source1);
-    expect(notice.errors, unorderedEquals([error1, error2]));
-    expect(notice.lineInfo, lineInfo);
-  }
-
-  void test_resultsComputed_errors_forSource() {
-    LineInfo lineInfo = new LineInfo([0]);
-    AnalysisError error1 =
-        new AnalysisError(source1, 1, 0, ScannerErrorCode.MISSING_DIGIT);
-    AnalysisError error2 =
-        new AnalysisError(source1, 2, 0, ScannerErrorCode.MISSING_DIGIT);
-    context.getLibrariesContainingMap[source1] = <Source>[source2];
-    context.errorsMap[source1] =
-        new AnalysisErrorInfoImpl([error1, error2], lineInfo);
-    entry1.setValue(LINE_INFO, lineInfo, []);
-    entry1.setValue(SCAN_ERRORS, <AnalysisError>[error1], []);
-    entry1.setValue(PARSE_ERRORS, <AnalysisError>[error2], []);
-    // PARSED_UNIT is ready, set errors
-    manager.resultsComputed(
-        source1, {PARSED_UNIT: AstTestFactory.compilationUnit()});
-    // all of the errors are included
-    ChangeNoticeImpl notice = context.getNotice(source1);
-    expect(notice.errors, unorderedEquals([error1, error2]));
-    expect(notice.lineInfo, lineInfo);
-  }
-
-  void test_resultsComputed_includedParts_updatePartLibraries() {
-    Source part1 = new TestSource('part1.dart');
-    Source part2 = new TestSource('part2.dart');
-    Source part3 = new TestSource('part3.dart');
-    Source library1 = new TestSource('library1.dart');
-    Source library2 = new TestSource('library2.dart');
-    _getOrCreateEntry(part1).setValue(CONTAINING_LIBRARIES, [], []);
-    expect(cache.getState(part1, CONTAINING_LIBRARIES), CacheState.VALID);
-    // configure AnalysisContext mock
-    context.prioritySources = <Source>[];
-    context.analyzeAllErrors = false;
-    // library1 parts
-    manager.resultsComputed(library1, <ResultDescriptor, dynamic>{
-      INCLUDED_PARTS: [part1, part2],
-      SOURCE_KIND: SourceKind.LIBRARY
-    });
-    expect(manager.partLibrariesMap[part1], [library1]);
-    expect(manager.partLibrariesMap[part2], [library1]);
-    expect(manager.partLibrariesMap[part3], isNull);
-    expect(manager.libraryPartsMap[library1], [part1, part2]);
-    expect(manager.libraryPartsMap[library2], isNull);
-    // library2 parts
-    manager.resultsComputed(library2, <ResultDescriptor, dynamic>{
-      INCLUDED_PARTS: [part2, part3],
-      SOURCE_KIND: SourceKind.LIBRARY
-    });
-    expect(manager.partLibrariesMap[part1], [library1]);
-    expect(manager.partLibrariesMap[part2], [library1, library2]);
-    expect(manager.partLibrariesMap[part3], [library2]);
-    expect(manager.libraryPartsMap[library1], [part1, part2]);
-    expect(manager.libraryPartsMap[library2], [part2, part3]);
-    // part1 CONTAINING_LIBRARIES
-    expect(cache.getState(part1, CONTAINING_LIBRARIES), CacheState.INVALID);
-  }
-
-  void test_resultsComputed_inSDK() {
-    _DartWorkManagerMock sdkDartWorkManagerMock = new _DartWorkManagerMock();
-    // SDK context mock
-    _InternalAnalysisContextMock sdkContextMock =
-        new _InternalAnalysisContextMock();
-    sdkContextMock.workManagers = <WorkManager>[sdkDartWorkManagerMock];
-    // SDK mock
-    _DartSdkMock sdkMock = new _DartSdkMock();
-    sdkMock.context = sdkContextMock;
-    // SourceFactory mock
-    _SourceFactoryMock sourceFactory = new _SourceFactoryMock();
-    sourceFactory.dartSdk = sdkMock;
-    context.sourceFactory = sourceFactory;
-    // SDK source mock
-    _SourceMock source = new _SourceMock('test.dart');
-    source.source = source;
-    source.isInSystemLibrary = true;
-    // notify and validate
-    Map<ResultDescriptor, dynamic> outputs = <ResultDescriptor, dynamic>{};
-    manager.resultsComputed(source, outputs);
-    var bySourceMap = sdkDartWorkManagerMock.resultsComputedCounts[source];
-    expect(bySourceMap, isNotNull);
-    expect(bySourceMap[outputs], 1);
-  }
-
-  void test_resultsComputed_noSourceKind() {
-    manager.unknownSourceQueue.addAll([source1, source2]);
-    manager.resultsComputed(source1, {});
-    expect_librarySourceQueue([]);
-    expect_unknownSourceQueue([source1, source2]);
-  }
-
-  void test_resultsComputed_notDart() {
-    manager.unknownSourceQueue.addAll([source1, source2]);
-    manager.resultsComputed(new TestSource('test.html'), {});
-    expect_librarySourceQueue([]);
-    expect_unknownSourceQueue([source1, source2]);
-  }
-
-  void test_resultsComputed_parsedUnit() {
-    LineInfo lineInfo = new LineInfo([0]);
-    context.getLibrariesContainingMap[source1] = <Source>[];
-    context.errorsMap[source1] = new AnalysisErrorInfoImpl([], lineInfo);
-    entry1.setValue(LINE_INFO, lineInfo, []);
-    CompilationUnit unit = AstTestFactory.compilationUnit();
-    manager.resultsComputed(source1, {PARSED_UNIT: unit});
-    ChangeNoticeImpl notice = context.getNotice(source1);
-    expect(notice.parsedDartUnit, unit);
-    expect(notice.resolvedDartUnit, isNull);
-    expect(notice.lineInfo, lineInfo);
-  }
-
-  void test_resultsComputed_resolvedUnit() {
-    LineInfo lineInfo = new LineInfo([0]);
-    context.getLibrariesContainingMap[source2] = <Source>[];
-    context.errorsMap[source2] = new AnalysisErrorInfoImpl([], lineInfo);
-    entry2.setValue(LINE_INFO, lineInfo, []);
-    CompilationUnit unit = AstTestFactory.compilationUnit();
-    manager.resultsComputed(
-        new LibrarySpecificUnit(source1, source2), {RESOLVED_UNIT: unit});
-    ChangeNoticeImpl notice = context.getNotice(source2);
-    expect(notice.parsedDartUnit, isNull);
-    expect(notice.resolvedDartUnit, unit);
-    expect(notice.lineInfo, lineInfo);
-  }
-
-  void test_resultsComputed_sourceKind_isLibrary() {
-    manager.unknownSourceQueue.addAll([source1, source2, source3]);
-    context.prioritySources = <Source>[];
-    context.shouldErrorsBeAnalyzedMap[source2] = true;
-    manager.resultsComputed(source2, {SOURCE_KIND: SourceKind.LIBRARY});
-    expect_librarySourceQueue([source2]);
-    expect_unknownSourceQueue([source1, source3]);
-  }
-
-  void test_resultsComputed_sourceKind_isLibrary_isPriority_computeErrors() {
-    manager.unknownSourceQueue.addAll([source1, source2, source3]);
-    context.prioritySources = <Source>[source2];
-    context.shouldErrorsBeAnalyzedMap[source2] = true;
-    manager.resultsComputed(source2, {SOURCE_KIND: SourceKind.LIBRARY});
-    expect_unknownSourceQueue([source1, source3]);
-    expect(manager.priorityResultQueue,
-        unorderedEquals([new TargetedResult(source2, LIBRARY_ERRORS_READY)]));
-  }
-
-  void test_resultsComputed_sourceKind_isLibrary_isPriority_computeUnit() {
-    manager.unknownSourceQueue.addAll([source1, source2, source3]);
-    context.prioritySources = <Source>[source2];
-    context.shouldErrorsBeAnalyzedMap[source2] = false;
-    manager.resultsComputed(source2, {SOURCE_KIND: SourceKind.LIBRARY});
-    expect_unknownSourceQueue([source1, source3]);
-    expect(
-        manager.priorityResultQueue,
-        unorderedEquals([
-          new TargetedResult(
-              new LibrarySpecificUnit(source2, source2), RESOLVED_UNIT)
-        ]));
-  }
-
-  void test_resultsComputed_sourceKind_isPart() {
-    manager.unknownSourceQueue.addAll([source1, source2, source3]);
-    manager.resultsComputed(source2, {SOURCE_KIND: SourceKind.PART});
-    expect_librarySourceQueue([]);
-    expect_unknownSourceQueue([source1, source3]);
-  }
-
-  void test_resultsComputed_updatePartsLibraries_partParsed() {
-    Source part = new TestSource('part.dart');
-    expect(manager.libraryPartsMap, isEmpty);
-    // part.dart parsed, no changes is the map of libraries
-    manager.resultsComputed(part, <ResultDescriptor, dynamic>{
-      SOURCE_KIND: SourceKind.PART,
-      INCLUDED_PARTS: <Source>[]
-    });
-    expect(manager.libraryPartsMap, isEmpty);
-  }
-
-  void test_unitIncrementallyResolved() {
-    manager.unitIncrementallyResolved(source1, source2);
-    expect_librarySourceQueue([source1]);
-  }
-
-  CacheEntry _getOrCreateEntry(Source source, [bool explicit = true]) {
-    CacheEntry entry = cache.get(source);
-    if (entry == null) {
-      entry = new CacheEntry(source);
-      entry.explicitlyAdded = explicit;
-      cache.put(entry);
-    }
-    return entry;
-  }
-}
-
-class _DartSdkMock implements DartSdk {
-  AnalysisContext context;
-
-  @override
-  noSuchMethod(Invocation invocation) {
-    throw new StateError('Unexpected invocation of ${invocation.memberName}');
-  }
-}
-
-class _DartWorkManagerMock implements DartWorkManager {
-  Map<Source, List<Source>> librariesContainingPartMap =
-      <Source, List<Source>>{};
-
-  Map<Source, Map<Map<ResultDescriptor, dynamic>, int>> resultsComputedCounts =
-      <Source, Map<Map<ResultDescriptor, dynamic>, int>>{};
-
-  @override
-  List<Source> getLibrariesContainingPart(Source part) {
-    return librariesContainingPartMap[part] ?? <Source>[];
-  }
-
-  @override
-  noSuchMethod(Invocation invocation) {
-    throw new StateError('Unexpected invocation of ${invocation.memberName}');
-  }
-
-  @override
-  void resultsComputed(
-      AnalysisTarget target, Map<ResultDescriptor, dynamic> outputs) {
-    Map<Map<ResultDescriptor, dynamic>, int> bySourceMap =
-        resultsComputedCounts.putIfAbsent(target, () => {});
-    bySourceMap[outputs] = (bySourceMap[outputs] ?? 0) + 1;
-  }
-}
-
-class _InternalAnalysisContextMock implements InternalAnalysisContext {
-  @override
-  CachePartition privateAnalysisCachePartition;
-
-  @override
-  AnalysisCache analysisCache;
-
-  @override
-  SourceFactory sourceFactory;
-
-  bool analyzeAllErrors;
-
-  bool everythingExists = false;
-
-  bool aboutToComputeEverything;
-
-  @override
-  List<Source> prioritySources = <Source>[];
-
-  @override
-  List<WorkManager> workManagers = <WorkManager>[];
-
-  Map<Source, List<Source>> getLibrariesContainingMap =
-      <Source, List<Source>>{};
-
-  Map<Source, bool> shouldErrorsBeAnalyzedMap = <Source, bool>{};
-
-  Map<ResultDescriptor, bool Function(CacheEntry entry, ResultDescriptor)>
-      aboutToComputeResultMap =
-      <ResultDescriptor, bool Function(CacheEntry entry, ResultDescriptor)>{};
-
-  Map<Source, AnalysisErrorInfo> errorsMap = <Source, AnalysisErrorInfo>{};
-
-  Map<Source, ChangeNoticeImpl> _pendingNotices = <Source, ChangeNoticeImpl>{};
-
-  @override
-  final AnalysisOptions analysisOptions = new AnalysisOptionsImpl();
-
-  @override
-  final ReentrantSynchronousStream<InvalidatedResult> onResultInvalidated =
-      new ReentrantSynchronousStream<InvalidatedResult>();
-
-  _InternalAnalysisContextMock() {
-    privateAnalysisCachePartition = new UniversalCachePartition(this);
-    analysisCache = new AnalysisCache([privateAnalysisCachePartition]);
-    analysisCache.onResultInvalidated.listen((InvalidatedResult event) {
-      onResultInvalidated.add(event);
-    });
-  }
-
-  @override
-  bool aboutToComputeResult(CacheEntry entry, ResultDescriptor result) {
-    if (aboutToComputeEverything != null) {
-      return aboutToComputeEverything;
-    }
-    bool Function(CacheEntry entry, ResultDescriptor) function =
-        aboutToComputeResultMap[result];
-    if (function == null) {
-      return false;
-    }
-    return function(entry, result);
-  }
-
-  @override
-  bool exists(Source source) {
-    return everythingExists;
-  }
-
-  @override
-  CacheEntry getCacheEntry(AnalysisTarget target) {
-    CacheEntry entry = analysisCache.get(target);
-    if (entry == null) {
-      entry = new CacheEntry(target);
-      analysisCache.put(entry);
-    }
-    return entry;
-  }
-
-  @override
-  AnalysisErrorInfo getErrors(Source source) => errorsMap[source];
-
-  List<Source> getLibrariesContaining(Source source) {
-    return getLibrariesContainingMap[source];
-  }
-
-  @override
-  ChangeNoticeImpl getNotice(Source source) {
-    return _pendingNotices.putIfAbsent(
-        source, () => new ChangeNoticeImpl(source));
-  }
-
-  @override
-  noSuchMethod(Invocation invocation) {
-    throw new StateError('Unexpected invocation of ${invocation.memberName}');
-  }
-
-  void setShouldErrorsBeAnalyzed(Source source, bool value) {
-    shouldErrorsBeAnalyzedMap[source] = value;
-  }
-
-  @override
-  bool shouldErrorsBeAnalyzed(Source source) {
-    if (analyzeAllErrors != null) {
-      return analyzeAllErrors;
-    }
-    return shouldErrorsBeAnalyzedMap[source];
-  }
-}
-
-class _SourceFactoryMock implements SourceFactory {
-  DartSdk dartSdk;
-
-  @override
-  noSuchMethod(Invocation invocation) {
-    throw new StateError('Unexpected invocation of ${invocation.memberName}');
-  }
-}
-
-class _SourceMock implements Source {
-  @override
-  final String shortName;
-
-  @override
-  bool isInSystemLibrary = false;
-
-  @override
-  Source source;
-
-  _SourceMock(this.shortName);
-
-  @override
-  String get fullName => '/' + shortName;
-
-  @override
-  noSuchMethod(Invocation invocation) {
-    throw new StateError('Unexpected invocation of ${invocation.memberName}');
-  }
-
-  @override
-  String toString() => fullName;
-}
diff --git a/pkg/analyzer/test/src/task/general_test.dart b/pkg/analyzer/test/src/task/general_test.dart
deleted file mode 100644
index e5e3b2b..0000000
--- a/pkg/analyzer/test/src/task/general_test.dart
+++ /dev/null
@@ -1,99 +0,0 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/task/api/general.dart';
-import 'package:analyzer/src/task/api/model.dart';
-import 'package:analyzer/src/task/general.dart';
-import 'package:test/test.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import '../../generated/test_support.dart';
-
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(GetContentTaskTest);
-  });
-}
-
-@reflectiveTest
-class GetContentTaskTest extends EngineTestCase {
-  test_buildInputs() {
-    AnalysisTarget target = new TestSource();
-    Map<String, TaskInput> inputs = GetContentTask.buildInputs(target);
-    expect(inputs, isEmpty);
-  }
-
-  test_constructor() {
-    AnalysisContext context = new _MockContext();
-    AnalysisTarget target = new TestSource();
-    GetContentTask task = new GetContentTask(context, target);
-    expect(task, isNotNull);
-    expect(task.context, context);
-    expect(task.target, target);
-  }
-
-  test_createTask() {
-    AnalysisContext context = new _MockContext();
-    AnalysisTarget target = new TestSource();
-    GetContentTask task = GetContentTask.createTask(context, target);
-    expect(task, isNotNull);
-    expect(task.context, context);
-    expect(task.target, target);
-  }
-
-  test_descriptor() {
-    AnalysisContext context = new _MockContext();
-    AnalysisTarget target = new TestSource();
-    GetContentTask task = new GetContentTask(context, target);
-    expect(task.descriptor, GetContentTask.DESCRIPTOR);
-  }
-
-  test_perform() {
-    _MockContext context = new _MockContext();
-    Source target = new TestSource();
-    GetContentTask task = new GetContentTask(context, target);
-    context.getContentsResponse[target] =
-        () => new TimestampedData<String>(42, 'foo');
-    task.perform();
-    expect(task.caughtException, isNull);
-    expect(task.outputs, hasLength(2));
-    expect(task.outputs[CONTENT], 'foo');
-    expect(task.outputs[MODIFICATION_TIME], 42);
-  }
-
-  void test_perform_exception() {
-    _MockContext context = new _MockContext();
-    Source target = new TestSource();
-    GetContentTask task = new GetContentTask(context, target);
-    context.getContentsResponse[target] = () => throw 'My exception!';
-    task.perform();
-    expect(task.caughtException, isNull);
-    expect(task.outputs, hasLength(2));
-    expect(task.outputs[CONTENT], '');
-    expect(task.outputs[MODIFICATION_TIME], -1);
-  }
-}
-
-class _MockContext implements AnalysisContext {
-  Map<Source, TimestampedData<String> Function()> getContentsResponse =
-      <Source, TimestampedData<String> Function()>{};
-
-  String get name => 'mock';
-
-  @override
-  TimestampedData<String> getContents(Source source) {
-    TimestampedData<String> Function() response = getContentsResponse[source];
-    if (response == null) {
-      fail('Unexpected invocation of getContents');
-    }
-    return response();
-  }
-
-  @override
-  noSuchMethod(Invocation invocation) {
-    fail('Unexpected invocation of ${invocation.memberName}');
-  }
-}
diff --git a/pkg/analyzer/test/src/task/html_work_manager_test.dart b/pkg/analyzer/test/src/task/html_work_manager_test.dart
deleted file mode 100644
index 714894a..0000000
--- a/pkg/analyzer/test/src/task/html_work_manager_test.dart
+++ /dev/null
@@ -1,420 +0,0 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/error/error.dart' show AnalysisError;
-import 'package:analyzer/exception/exception.dart';
-import 'package:analyzer/src/context/cache.dart';
-import 'package:analyzer/src/context/context.dart';
-import 'package:analyzer/src/context/source.dart';
-import 'package:analyzer/src/error/codes.dart' show HtmlErrorCode;
-import 'package:analyzer/src/generated/engine.dart'
-    show
-        AnalysisEngine,
-        AnalysisErrorInfo,
-        AnalysisErrorInfoImpl,
-        CacheState,
-        ChangeNoticeImpl,
-        InternalAnalysisContext;
-import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/task/api/dart.dart';
-import 'package:analyzer/src/task/api/general.dart';
-import 'package:analyzer/src/task/api/html.dart';
-import 'package:analyzer/src/task/api/model.dart';
-import 'package:analyzer/src/task/html.dart';
-import 'package:analyzer/src/task/html_work_manager.dart';
-import 'package:test/test.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import '../../generated/test_support.dart';
-
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(HtmlWorkManagerTest);
-    defineReflectiveTests(HtmlWorkManagerIntegrationTest);
-  });
-}
-
-@reflectiveTest
-class HtmlWorkManagerIntegrationTest {
-  InternalAnalysisContext context = new AnalysisContextImpl();
-  HtmlWorkManager manager;
-
-  Source source1 = new TestSource('1.html');
-  Source source2 = new TestSource('2.html');
-  CacheEntry entry1;
-  CacheEntry entry2;
-
-  void expect_sourceQueue(List<Source> sources) {
-    expect(manager.sourceQueue, unorderedEquals(sources));
-  }
-
-  void setUp() {
-    manager = new HtmlWorkManager(context);
-    entry1 = context.getCacheEntry(source1);
-    entry2 = context.getCacheEntry(source2);
-  }
-
-  void
-      test_onResultInvalidated_scheduleInvalidatedLibrariesAfterSetSourceFactory() {
-    // Change the source factory, changing the analysis cache from when
-    // the work manager was constructed. This used to create a failure
-    // case for test_onResultInvalidated_scheduleInvalidLibraries so its
-    // tested here.
-    context.sourceFactory = new SourceFactoryImpl(<UriResolver>[]);
-
-    // now just do the same checks as
-    // test_onResultInvalidated_scheduleInvalidLibraries
-
-    // set HTML_ERRORS for source1 and source2
-    entry1.setValue(HTML_ERRORS, [], []);
-    entry2.setValue(HTML_ERRORS, [], []);
-    // invalidate HTML_ERRORS for source1, schedule it
-    entry1.setState(HTML_ERRORS, CacheState.INVALID);
-    expect_sourceQueue([source1]);
-    // invalidate HTML_ERRORS for source2, schedule it
-    entry2.setState(HTML_ERRORS, CacheState.INVALID);
-    expect_sourceQueue([source1, source2]);
-  }
-}
-
-@reflectiveTest
-class HtmlWorkManagerTest {
-  _InternalAnalysisContextMock context = new _InternalAnalysisContextMock();
-  AnalysisCache cache;
-  HtmlWorkManager manager;
-
-  CaughtException caughtException = new CaughtException(null, null);
-
-  Source source1 = new TestSource('1.html');
-  Source source2 = new TestSource('2.html');
-  Source source3 = new TestSource('3.html');
-  Source source4 = new TestSource('4.html');
-  CacheEntry entry1;
-  CacheEntry entry2;
-  CacheEntry entry3;
-  CacheEntry entry4;
-
-  void expect_sourceQueue(List<Source> sources) {
-    expect(manager.sourceQueue, unorderedEquals(sources));
-  }
-
-  void setUp() {
-    cache = context.analysisCache;
-    manager = new HtmlWorkManager(context);
-    entry1 = context.getCacheEntry(source1);
-    entry2 = context.getCacheEntry(source2);
-    entry3 = context.getCacheEntry(source3);
-    entry4 = context.getCacheEntry(source4);
-  }
-
-  void test_applyChange_add() {
-    // add source1
-    manager.applyChange([source1], [], []);
-    expect_sourceQueue([source1]);
-    // add source2
-    manager.applyChange([source2], [], []);
-    expect_sourceQueue([source1, source2]);
-  }
-
-  void test_applyChange_add_duplicate() {
-    // add source1
-    manager.applyChange([source1], [], []);
-    expect_sourceQueue([source1]);
-    // add source1 again
-    manager.applyChange([source1], [], []);
-    expect_sourceQueue([source1]);
-  }
-
-  void test_applyChange_change() {
-    // change source1
-    manager.applyChange([], [source1], []);
-    expect_sourceQueue([source1]);
-  }
-
-  void test_applyChange_change_afterAdd() {
-    manager.applyChange([source1, source2], [], []);
-    // change source1
-    manager.applyChange([], [source1], []);
-    expect_sourceQueue([source1, source2]);
-  }
-
-  void test_applyChange_remove() {
-    manager.applyChange([source1, source2], [], []);
-    // remove source1
-    manager.applyChange([], [], [source1]);
-    expect_sourceQueue([source2]);
-    // remove source2
-    manager.applyChange([], [], [source2]);
-    expect_sourceQueue([]);
-    // remove source3
-    manager.applyChange([], [], [source3]);
-    expect_sourceQueue([]);
-  }
-
-  void test_applyPriorityTargets() {
-    context.setShouldErrorsBeAnalyzed(source2, true);
-    context.setShouldErrorsBeAnalyzed(source3, true);
-    manager.priorityResultQueue.add(new TargetedResult(source1, HTML_ERRORS));
-    manager.priorityResultQueue.add(new TargetedResult(source2, HTML_ERRORS));
-    // -source1 +source3
-    manager.applyPriorityTargets([source2, source3]);
-    expect(
-        manager.priorityResultQueue,
-        unorderedEquals([
-          new TargetedResult(source2, HTML_ERRORS),
-          new TargetedResult(source3, HTML_ERRORS)
-        ]));
-    // get next request
-    TargetedResult request = manager.getNextResult();
-    expect(request.target, source2);
-    expect(request.result, HTML_ERRORS);
-  }
-
-  void test_getErrors_fullList() {
-    AnalysisError error1 =
-        new AnalysisError(source1, 1, 0, HtmlErrorCode.PARSE_ERROR, ['']);
-    AnalysisError error2 =
-        new AnalysisError(source1, 2, 0, HtmlErrorCode.PARSE_ERROR, ['']);
-    entry1.setValue(HTML_DOCUMENT_ERRORS, <AnalysisError>[error1], []);
-
-    DartScript script = new DartScript(source1, []);
-    entry1.setValue(DART_SCRIPTS, [script], []);
-    CacheEntry scriptEntry = context.getCacheEntry(script);
-    scriptEntry.setValue(DART_ERRORS, [error2], []);
-
-    List<AnalysisError> errors = manager.getErrors(source1);
-    expect(errors, unorderedEquals([error1, error2]));
-  }
-
-  void test_getErrors_partialList() {
-    AnalysisError error1 =
-        new AnalysisError(source1, 1, 0, HtmlErrorCode.PARSE_ERROR, ['']);
-    AnalysisError error2 =
-        new AnalysisError(source1, 2, 0, HtmlErrorCode.PARSE_ERROR, ['']);
-    entry1.setValue(HTML_DOCUMENT_ERRORS, <AnalysisError>[error1, error2], []);
-
-    List<AnalysisError> errors = manager.getErrors(source1);
-    expect(errors, unorderedEquals([error1, error2]));
-  }
-
-  void test_getNextResult_hasNormal_firstIsError() {
-    entry1.setErrorState(caughtException, [HTML_ERRORS]);
-    manager.sourceQueue.addAll([source1, source2]);
-    TargetedResult request = manager.getNextResult();
-    expect(request.target, source2);
-    expect(request.result, HTML_ERRORS);
-    // source1 is out, source2 is waiting
-    expect_sourceQueue([source2]);
-  }
-
-  void test_getNextResult_hasNormal_firstIsInvalid() {
-    entry1.setState(HTML_ERRORS, CacheState.INVALID);
-    manager.sourceQueue.addAll([source1, source2]);
-    TargetedResult request = manager.getNextResult();
-    expect(request.target, source1);
-    expect(request.result, HTML_ERRORS);
-    // no changes until computed
-    expect_sourceQueue([source1, source2]);
-  }
-
-  void test_getNextResult_hasNormal_firstIsValid() {
-    entry1.setValue(HTML_ERRORS, [], []);
-    manager.sourceQueue.addAll([source1, source2]);
-    TargetedResult request = manager.getNextResult();
-    expect(request.target, source2);
-    expect(request.result, HTML_ERRORS);
-    // source1 is out, source2 is waiting
-    expect_sourceQueue([source2]);
-  }
-
-  void test_getNextResult_hasNormalAndPriority() {
-    entry1.setState(HTML_ERRORS, CacheState.INVALID);
-    manager.sourceQueue.addAll([source1, source2]);
-    manager.addPriorityResult(source3, HTML_ERRORS);
-
-    TargetedResult request = manager.getNextResult();
-    expect(request.target, source3);
-    expect(request.result, HTML_ERRORS);
-    // no changes until computed
-    expect_sourceQueue([source1, source2]);
-  }
-
-  void test_getNextResult_hasPriority() {
-    manager.addPriorityResult(source1, HTML_ERRORS);
-    manager.addPriorityResult(source2, HTML_ERRORS);
-    expect(
-        manager.priorityResultQueue,
-        unorderedEquals([
-          new TargetedResult(source1, HTML_ERRORS),
-          new TargetedResult(source2, HTML_ERRORS)
-        ]));
-
-    TargetedResult request = manager.getNextResult();
-    expect(request.target, source1);
-    expect(request.result, HTML_ERRORS);
-    // no changes until computed
-    expect(
-        manager.priorityResultQueue,
-        unorderedEquals([
-          new TargetedResult(source1, HTML_ERRORS),
-          new TargetedResult(source2, HTML_ERRORS)
-        ]));
-  }
-
-  void test_getNextResult_nothingToDo() {
-    TargetedResult request = manager.getNextResult();
-    expect(request, isNull);
-  }
-
-  void test_getNextResultPriority_hasPriority() {
-    manager.addPriorityResult(source1, SOURCE_KIND);
-    expect(manager.getNextResultPriority(), WorkOrderPriority.PRIORITY);
-  }
-
-  void test_getNextResultPriority_hasSource() {
-    manager.sourceQueue.addAll([source1]);
-    expect(manager.getNextResultPriority(), WorkOrderPriority.NORMAL);
-  }
-
-  void test_getNextResultPriority_nothingToDo() {
-    expect(manager.getNextResultPriority(), WorkOrderPriority.NONE);
-  }
-
-  void test_onAnalysisOptionsChanged() {
-    context.everythingExists = true;
-    // set cache values
-    entry1.setValue(DART_SCRIPTS, [], []);
-    entry1.setValue(HTML_DOCUMENT, null, []);
-    entry1.setValue(HTML_DOCUMENT_ERRORS, [], []);
-    entry1.setValue(HTML_ERRORS, [], []);
-    entry1.setValue(REFERENCED_LIBRARIES, [], []);
-    // notify
-    manager.onAnalysisOptionsChanged();
-    // Only resolution-based values are invalidated.
-    expect(entry1.getState(DART_SCRIPTS), CacheState.VALID);
-    expect(entry1.getState(HTML_DOCUMENT), CacheState.VALID);
-    expect(entry1.getState(HTML_DOCUMENT_ERRORS), CacheState.VALID);
-    expect(entry1.getState(HTML_ERRORS), CacheState.INVALID);
-    expect(entry1.getState(REFERENCED_LIBRARIES), CacheState.VALID);
-  }
-
-  void test_onResultInvalidated_scheduleInvalidatedLibraries() {
-    // set HTML_ERRORS for source1 and source3
-    entry1.setValue(HTML_ERRORS, [], []);
-    entry3.setValue(HTML_ERRORS, [], []);
-    // invalidate HTML_ERRORS for source1, schedule it
-    entry1.setState(HTML_ERRORS, CacheState.INVALID);
-    expect_sourceQueue([source1]);
-    // invalidate HTML_ERRORS for source3, schedule it
-    entry3.setState(HTML_ERRORS, CacheState.INVALID);
-    expect_sourceQueue([source1, source3]);
-  }
-
-  void test_onSourceFactoryChanged() {
-    context.everythingExists = true;
-    // set cache values
-    entry1.setValue(DART_SCRIPTS, [], []);
-    entry1.setValue(HTML_DOCUMENT, null, []);
-    entry1.setValue(HTML_DOCUMENT_ERRORS, [], []);
-    entry1.setValue(HTML_ERRORS, [], []);
-    entry1.setValue(REFERENCED_LIBRARIES, [], []);
-    // notify
-    manager.onSourceFactoryChanged();
-    // Only resolution-based values are invalidated.
-    expect(entry1.getState(DART_SCRIPTS), CacheState.VALID);
-    expect(entry1.getState(HTML_DOCUMENT), CacheState.VALID);
-    expect(entry1.getState(HTML_DOCUMENT_ERRORS), CacheState.VALID);
-    expect(entry1.getState(HTML_ERRORS), CacheState.INVALID);
-    expect(entry1.getState(REFERENCED_LIBRARIES), CacheState.INVALID);
-  }
-
-  void test_resultsComputed_errors() {
-    AnalysisError error1 =
-        new AnalysisError(source1, 1, 0, HtmlErrorCode.PARSE_ERROR, ['']);
-    AnalysisError error2 =
-        new AnalysisError(source1, 2, 0, HtmlErrorCode.PARSE_ERROR, ['']);
-    LineInfo lineInfo = new LineInfo([0]);
-    entry1.setValue(LINE_INFO, lineInfo, []);
-    entry1.setValue(HTML_ERRORS, <AnalysisError>[error1, error2], []);
-    // RESOLVED_UNIT is ready, set errors
-    manager.resultsComputed(source1, {HTML_ERRORS: null});
-    // all of the errors are included
-    ChangeNoticeImpl notice = context.getNotice(source1);
-    expect(notice.errors, unorderedEquals([error1, error2]));
-    expect(notice.lineInfo, lineInfo);
-  }
-}
-
-class _InternalAnalysisContextMock implements InternalAnalysisContext {
-  @override
-  CachePartition privateAnalysisCachePartition;
-
-  @override
-  AnalysisCache analysisCache;
-
-  bool everythingExists = false;
-
-  Map<Source, bool> shouldErrorsBeAnalyzedMap = <Source, bool>{};
-
-  // The production version is a stream that carries messages from the cache
-  // since the cache changes. Here, we can just pass the inner stream because
-  // it doesn't change.
-  Map<Source, ChangeNoticeImpl> _pendingNotices = <Source, ChangeNoticeImpl>{};
-
-  _InternalAnalysisContextMock() {
-    privateAnalysisCachePartition = new UniversalCachePartition(this);
-    analysisCache = new AnalysisCache([privateAnalysisCachePartition]);
-  }
-
-  @override
-  get onResultInvalidated => analysisCache.onResultInvalidated;
-
-  @override
-  bool exists(Source source) {
-    return everythingExists;
-  }
-
-  @override
-  CacheEntry getCacheEntry(AnalysisTarget target) {
-    CacheEntry entry = analysisCache.get(target);
-    if (entry == null) {
-      entry = new CacheEntry(target);
-      analysisCache.put(entry);
-    }
-    return entry;
-  }
-
-  @override
-  AnalysisErrorInfo getErrors(Source source) {
-    String name = source.shortName;
-    List<AnalysisError> errors = AnalysisError.NO_ERRORS;
-    if (AnalysisEngine.isDartFileName(name) || source is DartScript) {
-      errors = getCacheEntry(source).getValue(DART_ERRORS);
-    } else if (AnalysisEngine.isHtmlFileName(name)) {
-      errors = getCacheEntry(source).getValue(HTML_ERRORS);
-    }
-    return new AnalysisErrorInfoImpl(
-        errors, getCacheEntry(source).getValue(LINE_INFO));
-  }
-
-  @override
-  ChangeNoticeImpl getNotice(Source source) {
-    return _pendingNotices.putIfAbsent(
-        source, () => new ChangeNoticeImpl(source));
-  }
-
-  @override
-  noSuchMethod(Invocation invocation) {
-    throw new StateError('Unexpected invocation of ${invocation.memberName}');
-  }
-
-  void setShouldErrorsBeAnalyzed(Source source, bool value) {
-    shouldErrorsBeAnalyzedMap[source] = value;
-  }
-
-  @override
-  bool shouldErrorsBeAnalyzed(Source source) {
-    return shouldErrorsBeAnalyzedMap[source];
-  }
-}
diff --git a/pkg/analyzer/test/src/task/inputs_test.dart b/pkg/analyzer/test/src/task/inputs_test.dart
deleted file mode 100644
index c8963d3..0000000
--- a/pkg/analyzer/test/src/task/inputs_test.dart
+++ /dev/null
@@ -1,1073 +0,0 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/src/task/api/model.dart';
-import 'package:analyzer/src/task/inputs.dart';
-import 'package:analyzer/src/task/model.dart';
-import 'package:test/test.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import '../../generated/test_support.dart';
-
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(ConstantTaskInputBuilderTest);
-    defineReflectiveTests(ConstantTaskInputTest);
-    defineReflectiveTests(ListTaskInputImplTest);
-    defineReflectiveTests(ListToListTaskInputTest);
-    defineReflectiveTests(ListToListTaskInputBuilderTest);
-    defineReflectiveTests(ListToMapTaskInputBuilderTest);
-    defineReflectiveTests(ListToMapTaskInputTest);
-    defineReflectiveTests(ObjectToListTaskInputBuilderTest);
-    defineReflectiveTests(ObjectToListTaskInputTest);
-    defineReflectiveTests(SimpleTaskInputTest);
-    defineReflectiveTests(SimpleTaskInputBuilderTest);
-    defineReflectiveTests(TopLevelTaskInputBuilderTest);
-  });
-}
-
-@reflectiveTest
-class ConstantTaskInputBuilderTest extends EngineTestCase {
-  static final int value = 7;
-  static final ConstantTaskInput<int> input = new ConstantTaskInput<int>(value);
-
-  ConstantTaskInputBuilder builder;
-
-  void setUp() {
-    super.setUp();
-    builder = new ConstantTaskInputBuilder(input);
-  }
-
-  test_create() {
-    expect(builder, isNotNull);
-    expect(builder.input, input);
-  }
-
-  test_currentResult_afterOneMoveNext() {
-    builder.moveNext();
-    expect(builder.currentResult, null);
-  }
-
-  test_currentResult_beforeMoveNext() {
-    expect(builder.currentResult, null);
-  }
-
-  test_currentTarget_afterOneMoveNext() {
-    builder.moveNext();
-    expect(builder.currentTarget, null);
-  }
-
-  test_currentTarget_beforeMoveNext() {
-    expect(builder.currentTarget, null);
-  }
-
-  test_currentValue_afterOneMoveNext() {
-    builder.moveNext();
-    expect(() {
-      builder.currentValue = 'value';
-    }, throwsStateError);
-  }
-
-  test_currentValue_beforeMoveNext() {
-    expect(() {
-      builder.currentValue = 'value';
-    }, throwsStateError);
-  }
-
-  test_currentValueNotAvailable_afterOneMoveNext() {
-    builder.moveNext();
-    expect(() {
-      builder.currentValueNotAvailable();
-    }, throwsStateError);
-  }
-
-  test_currentValueNotAvailable_beforeMoveNext() {
-    expect(() {
-      builder.currentValueNotAvailable();
-    }, throwsStateError);
-  }
-
-  test_inputValue_afterOneMoveNext() {
-    builder.moveNext();
-    expect(builder.inputValue, value);
-  }
-
-  test_inputValue_beforeMoveNext() {
-    expect(builder.inputValue, value);
-  }
-
-  test_moveNext() {
-    expect(builder.moveNext(), false);
-    expect(builder.moveNext(), false);
-  }
-}
-
-@reflectiveTest
-class ConstantTaskInputTest extends EngineTestCase {
-  test_create() {
-    int value = 3;
-    ConstantTaskInput<int> input = new ConstantTaskInput<int>(value);
-    expect(input, isNotNull);
-    expect(input.value, value);
-  }
-
-  test_createBuilder() {
-    ConstantTaskInput<int> input = new ConstantTaskInput<int>(5);
-    expect(input.createBuilder(), new TypeMatcher<ConstantTaskInputBuilder>());
-  }
-}
-
-@reflectiveTest
-class ListTaskInputImplTest extends EngineTestCase {
-  static final AnalysisTarget target = new TestSource();
-  static final ResultDescriptor<List<AnalysisTarget>> result1 =
-      new ResultDescriptorImpl<List<AnalysisTarget>>('result1', null);
-  static final result2 = new ResultDescriptorImpl<int>('result2', null);
-
-  test_create() {
-    var input = new ListTaskInputImpl<AnalysisTarget>(target, result1);
-    expect(input, isNotNull);
-    expect(input.target, target);
-    expect(input.result, result1);
-  }
-
-  test_createBuilder() {
-    var input = new ListTaskInputImpl<AnalysisTarget>(target, result1);
-    expect(input.createBuilder(), new TypeMatcher<SimpleTaskInputBuilder>());
-  }
-
-  test_toList() {
-    var input = new ListTaskInputImpl<AnalysisTarget>(target, result1);
-    ListTaskInput<String> input2 =
-        input.toList((target) => new SimpleTaskInput<String>(target, null));
-    expect(
-        input2, new TypeMatcher<ListToListTaskInput<AnalysisTarget, String>>());
-  }
-
-  test_toListOf() {
-    var input = new ListTaskInputImpl<AnalysisTarget>(target, result1);
-    ListTaskInput<int> input2 = input.toListOf(result2);
-    expect(input2, new TypeMatcher<ListToListTaskInput<AnalysisTarget, int>>());
-  }
-
-  test_toMap() {
-    var input = new ListTaskInputImpl<AnalysisTarget>(target, result1);
-    MapTaskInput<AnalysisTarget, String> input2 =
-        input.toMap((target) => new SimpleTaskInput<String>(target, null));
-    expect(
-        input2, new TypeMatcher<ListToMapTaskInput<AnalysisTarget, String>>());
-  }
-
-  test_toMapOf() {
-    var input = new ListTaskInputImpl<AnalysisTarget>(target, result1);
-    MapTaskInput<AnalysisTarget, int> input2 = input.toMapOf(result2);
-    expect(input2, new TypeMatcher<ListToMapTaskInput<AnalysisTarget, int>>());
-  }
-}
-
-@reflectiveTest
-class ListToListTaskInputBuilderTest extends EngineTestCase {
-  static final AnalysisTarget target1 = new TestSource();
-  static final ResultDescriptorImpl<List> result1 =
-      new ResultDescriptorImpl<List>('result1', null);
-  static final ResultDescriptorImpl result2 =
-      new ResultDescriptorImpl('result2', null);
-  static final ListToListTaskInput input = new ListToListTaskInput(
-      result1.of(target1), (element) => result2.of(element));
-
-  test_create() {
-    ListToListTaskInputBuilder builder = new ListToListTaskInputBuilder(input);
-    expect(builder, isNotNull);
-    expect(builder.input, input);
-  }
-
-  test_currentResult_afterComplete() {
-    ListToListTaskInputBuilder builder = new ListToListTaskInputBuilder(input);
-    builder.moveNext();
-    builder.currentValue = [];
-    builder.moveNext();
-    expect(builder.currentResult, null);
-  }
-
-  test_currentResult_afterCurrentValueNotAvailable() {
-    ListToListTaskInputBuilder builder = new ListToListTaskInputBuilder(input);
-    builder.moveNext();
-    builder.currentValueNotAvailable();
-    builder.moveNext();
-    expect(builder.currentResult, null);
-  }
-
-  test_currentResult_afterOneMoveNext() {
-    ListToListTaskInputBuilder builder = new ListToListTaskInputBuilder(input);
-    builder.moveNext();
-    expect(builder.currentResult, result1);
-  }
-
-  test_currentResult_beforeMoveNext() {
-    ListToListTaskInputBuilder builder = new ListToListTaskInputBuilder(input);
-    expect(builder.currentResult, null);
-  }
-
-  test_currentTarget_afterComplete() {
-    ListToListTaskInputBuilder builder = new ListToListTaskInputBuilder(input);
-    builder.moveNext();
-    builder.currentValue = [];
-    builder.moveNext();
-    expect(builder.currentTarget, null);
-  }
-
-  test_currentTarget_afterCurrentValueNotAvailable() {
-    ListToListTaskInputBuilder builder = new ListToListTaskInputBuilder(input);
-    builder.moveNext();
-    builder.currentValueNotAvailable();
-    builder.moveNext();
-    expect(builder.currentTarget, null);
-  }
-
-  test_currentTarget_afterOneMoveNext() {
-    ListToListTaskInputBuilder builder = new ListToListTaskInputBuilder(input);
-    builder.moveNext();
-    expect(builder.currentTarget, target1);
-  }
-
-  test_currentTarget_beforeMoveNext() {
-    ListToListTaskInputBuilder builder = new ListToListTaskInputBuilder(input);
-    expect(builder.currentTarget, null);
-  }
-
-  test_currentValue_afterOneMoveNext() {
-    ListToListTaskInputBuilder builder = new ListToListTaskInputBuilder(input);
-    builder.moveNext();
-    builder.currentValue = [];
-  }
-
-  test_currentValue_beforeMoveNext() {
-    ListToListTaskInputBuilder builder = new ListToListTaskInputBuilder(input);
-    expect(() {
-      builder.currentValue = [];
-    }, throwsStateError);
-  }
-
-  test_currentValueNotAvailable_afterOneMoveNext() {
-    ListToListTaskInputBuilder builder = new ListToListTaskInputBuilder(input);
-    builder.moveNext();
-    builder.currentValueNotAvailable();
-  }
-
-  test_currentValueNotAvailable_beforeMoveNext() {
-    ListToListTaskInputBuilder builder = new ListToListTaskInputBuilder(input);
-    expect(() {
-      builder.currentValueNotAvailable();
-    }, throwsStateError);
-  }
-
-  test_inputValue_afterComplete() {
-    AnalysisTarget target2 = new TestSource();
-    AnalysisTarget target3 = new TestSource();
-    String value2 = 'value2';
-    String value3 = 'value3';
-    ListToListTaskInputBuilder builder = new ListToListTaskInputBuilder(input);
-    builder.moveNext(); // Advance to requesting the list
-    builder.currentValue = [target2, target3];
-    builder.moveNext(); // Advance to requesting result2 for target2
-    builder.currentValue = value2;
-    builder.moveNext(); // Advance to requesting result2 for target3
-    builder.currentValue = value3;
-    builder.moveNext(); // Advance to the end
-    var inputValue = builder.inputValue;
-    expect(inputValue, new TypeMatcher<List>());
-    List list = inputValue;
-    expect(list.length, 2);
-    expect(list[0], value2);
-    expect(list[1], value3);
-  }
-
-  test_inputValue_afterFirstValueNotAvailable() {
-    AnalysisTarget target2 = new TestSource();
-    AnalysisTarget target3 = new TestSource();
-    String value3 = 'value3';
-    ListToListTaskInputBuilder builder = new ListToListTaskInputBuilder(input);
-    builder.moveNext(); // Advance to requesting the list
-    builder.currentValue = [target2, target3];
-    builder.moveNext(); // Advance to requesting result2 for target2
-    builder.currentValueNotAvailable();
-    builder.moveNext(); // Advance to requesting result2 for target3
-    builder.currentValue = value3;
-    builder.moveNext(); // Advance to the end
-    var inputValue = builder.inputValue;
-    expect(inputValue, new TypeMatcher<List>());
-    List list = inputValue;
-    expect(list, orderedEquals([value3]));
-  }
-
-  test_inputValue_afterListNotAvailable() {
-    ListToListTaskInputBuilder builder = new ListToListTaskInputBuilder(input);
-    builder.moveNext(); // Advance to requesting the list
-    builder.currentValueNotAvailable();
-    builder.moveNext(); // Advance to the end
-    var inputValue = builder.inputValue;
-    expect(inputValue, new TypeMatcher<List>());
-    List list = inputValue;
-    expect(list, isEmpty);
-  }
-
-  test_inputValue_afterOneMoveNext() {
-    ListToListTaskInputBuilder builder = new ListToListTaskInputBuilder(input);
-    builder.moveNext();
-    expect(() => builder.inputValue, throwsStateError);
-  }
-
-  test_inputValue_beforeMoveNext() {
-    ListToListTaskInputBuilder builder = new ListToListTaskInputBuilder(input);
-    expect(() => builder.inputValue, throwsStateError);
-  }
-
-  test_moveNext_withoutSet() {
-    ListToListTaskInputBuilder builder = new ListToListTaskInputBuilder(input);
-    expect(builder.moveNext(), true);
-    expect(() => builder.moveNext(), throwsStateError);
-  }
-
-  test_moveNext_withSet() {
-    ListToListTaskInputBuilder builder = new ListToListTaskInputBuilder(input);
-    expect(builder.moveNext(), true);
-    builder.currentValue = [];
-    expect(builder.moveNext(), false);
-    expect(builder.moveNext(), false);
-  }
-}
-
-@reflectiveTest
-class ListToListTaskInputTest extends EngineTestCase {
-  static final AnalysisTarget target = new TestSource();
-  static final ResultDescriptorImpl<List> result =
-      new ResultDescriptorImpl<List>('result', null);
-
-  test_create() {
-    SimpleTaskInput<List> baseAccessor = result.of(target);
-    GenerateTaskInputs generate = (object) => null;
-    ListToListTaskInput input = new ListToListTaskInput(baseAccessor, generate);
-    expect(input, isNotNull);
-    expect(input.baseAccessor, baseAccessor);
-    expect(input.generateTaskInputs, equals(generate));
-  }
-
-  test_createBuilder() {
-    SimpleTaskInput<List> baseAccessor = result.of(target);
-    GenerateTaskInputs generate = (object) => null;
-    ListToListTaskInput input = new ListToListTaskInput(baseAccessor, generate);
-    expect(input.createBuilder(), isNotNull);
-  }
-}
-
-@reflectiveTest
-class ListToMapTaskInputBuilderTest extends EngineTestCase {
-  static final AnalysisTarget target1 = new TestSource('target1');
-  static final ResultDescriptorImpl<List> result1 =
-      new ResultDescriptorImpl<List>('result1', null);
-  static final ResultDescriptorImpl result2 =
-      new ResultDescriptorImpl('result2', null);
-  static final ListToMapTaskInput input = new ListToMapTaskInput(
-      result1.of(target1), (element) => result2.of(element));
-
-  test_create() {
-    ListToMapTaskInputBuilder builder = new ListToMapTaskInputBuilder(input);
-    expect(builder, isNotNull);
-    expect(builder.input, input);
-  }
-
-  test_currentResult_afterComplete() {
-    ListToMapTaskInputBuilder builder = new ListToMapTaskInputBuilder(input);
-    builder.moveNext();
-    builder.currentValue = [];
-    builder.moveNext();
-    expect(builder.currentResult, null);
-  }
-
-  test_currentResult_afterCurrentValueNotAvailable() {
-    ListToMapTaskInputBuilder builder = new ListToMapTaskInputBuilder(input);
-    builder.moveNext();
-    builder.currentValueNotAvailable();
-    builder.moveNext();
-    expect(builder.currentResult, null);
-  }
-
-  test_currentResult_afterOneMoveNext() {
-    ListToMapTaskInputBuilder builder = new ListToMapTaskInputBuilder(input);
-    builder.moveNext();
-    expect(builder.currentResult, result1);
-  }
-
-  test_currentResult_beforeMoveNext() {
-    ListToMapTaskInputBuilder builder = new ListToMapTaskInputBuilder(input);
-    expect(builder.currentResult, null);
-  }
-
-  test_currentTarget_afterComplete() {
-    ListToMapTaskInputBuilder builder = new ListToMapTaskInputBuilder(input);
-    builder.moveNext();
-    builder.currentValue = [];
-    builder.moveNext();
-    expect(builder.currentTarget, null);
-  }
-
-  test_currentTarget_afterCurrentValueNotAvailable() {
-    ListToMapTaskInputBuilder builder = new ListToMapTaskInputBuilder(input);
-    builder.moveNext();
-    builder.currentValueNotAvailable();
-    builder.moveNext();
-    expect(builder.currentTarget, null);
-  }
-
-  test_currentTarget_afterOneMoveNext() {
-    ListToMapTaskInputBuilder builder = new ListToMapTaskInputBuilder(input);
-    builder.moveNext();
-    expect(builder.currentTarget, target1);
-  }
-
-  test_currentTarget_beforeMoveNext() {
-    ListToMapTaskInputBuilder builder = new ListToMapTaskInputBuilder(input);
-    expect(builder.currentTarget, null);
-  }
-
-  test_currentValue_afterOneMoveNext() {
-    ListToMapTaskInputBuilder builder = new ListToMapTaskInputBuilder(input);
-    builder.moveNext();
-    builder.currentValue = [];
-  }
-
-  test_currentValue_beforeMoveNext() {
-    ListToMapTaskInputBuilder builder = new ListToMapTaskInputBuilder(input);
-    expect(() {
-      builder.currentValue = [];
-    }, throwsStateError);
-  }
-
-  test_currentValueNotAvailable_afterOneMoveNext() {
-    ListToMapTaskInputBuilder builder = new ListToMapTaskInputBuilder(input);
-    builder.moveNext();
-    builder.currentValueNotAvailable();
-  }
-
-  test_currentValueNotAvailable_beforeMoveNext() {
-    ListToMapTaskInputBuilder builder = new ListToMapTaskInputBuilder(input);
-    expect(() {
-      builder.currentValueNotAvailable();
-    }, throwsStateError);
-  }
-
-  test_inputValue_afterComplete() {
-    AnalysisTarget target2 = new TestSource('target2');
-    AnalysisTarget target3 = new TestSource('target3');
-    String value2 = 'value2';
-    String value3 = 'value3';
-    ListToMapTaskInputBuilder builder = new ListToMapTaskInputBuilder(input);
-    builder.moveNext(); // Advance to requesting the list
-    builder.currentValue = [target2, target3];
-    builder.moveNext(); // Advance to requesting result2 for target2
-    builder.currentValue = value2;
-    builder.moveNext(); // Advance to requesting result2 for target3
-    builder.currentValue = value3;
-    builder.moveNext(); // Advance to the end
-    var inputValue = builder.inputValue;
-    expect(inputValue, new TypeMatcher<Map>());
-    expect(inputValue.length, 2);
-    expect(inputValue, containsPair(target2, value2));
-    expect(inputValue, containsPair(target3, value3));
-  }
-
-  test_inputValue_afterFirstValueNotAvailable() {
-    AnalysisTarget target2 = new TestSource('target2');
-    AnalysisTarget target3 = new TestSource('target3');
-    String value3 = 'value3';
-    ListToMapTaskInputBuilder builder = new ListToMapTaskInputBuilder(input);
-    builder.moveNext(); // Advance to requesting the list
-    builder.currentValue = [target2, target3];
-    builder.moveNext(); // Advance to requesting result2 for target2
-    builder.currentValueNotAvailable();
-    builder.moveNext(); // Advance to requesting result2 for target3
-    builder.currentValue = value3;
-    builder.moveNext(); // Advance to the end
-    var inputValue = builder.inputValue;
-    expect(inputValue, new TypeMatcher<Map>());
-    expect(inputValue, hasLength(1));
-    expect(inputValue, containsPair(target3, value3));
-  }
-
-  test_inputValue_afterListNotAvailable() {
-    ListToMapTaskInputBuilder builder = new ListToMapTaskInputBuilder(input);
-    builder.moveNext(); // Advance to requesting the list
-    builder.currentValueNotAvailable();
-    builder.moveNext(); // Advance to the end
-    var inputValue = builder.inputValue;
-    expect(inputValue, new TypeMatcher<Map>());
-    expect(inputValue, isEmpty);
-  }
-
-  test_inputValue_afterOneMoveNext() {
-    ListToMapTaskInputBuilder builder = new ListToMapTaskInputBuilder(input);
-    builder.moveNext();
-    expect(() => builder.inputValue, throwsStateError);
-  }
-
-  test_inputValue_beforeMoveNext() {
-    ListToMapTaskInputBuilder builder = new ListToMapTaskInputBuilder(input);
-    expect(() => builder.inputValue, throwsStateError);
-  }
-
-  test_moveNext_withoutSet() {
-    ListToMapTaskInputBuilder builder = new ListToMapTaskInputBuilder(input);
-    expect(builder.moveNext(), true);
-    expect(() => builder.moveNext(), throwsStateError);
-  }
-
-  test_moveNext_withSet() {
-    ListToMapTaskInputBuilder builder = new ListToMapTaskInputBuilder(input);
-    expect(builder.moveNext(), true);
-    builder.currentValue = [];
-    expect(builder.moveNext(), false);
-    expect(builder.moveNext(), false);
-  }
-}
-
-@reflectiveTest
-class ListToMapTaskInputTest extends EngineTestCase {
-  static final AnalysisTarget target = new TestSource();
-  static final ResultDescriptorImpl<List> result =
-      new ResultDescriptorImpl<List>('result', null);
-
-  test_create() {
-    SimpleTaskInput<List> baseAccessor = result.of(target);
-    GenerateTaskInputs generate = (object) => null;
-    ListToMapTaskInput input = new ListToMapTaskInput(baseAccessor, generate);
-    expect(input, isNotNull);
-    expect(input.baseAccessor, baseAccessor);
-    expect(input.generateTaskInputs, equals(generate));
-  }
-
-  test_createBuilder() {
-    SimpleTaskInput<List> baseAccessor = result.of(target);
-    GenerateTaskInputs generate = (object) => null;
-    ListToMapTaskInput input = new ListToMapTaskInput(baseAccessor, generate);
-    expect(input.createBuilder(), isNotNull);
-  }
-}
-
-@reflectiveTest
-class ObjectToListTaskInputBuilderTest {
-  static final AnalysisTarget target = new TestSource();
-  static final ResultDescriptorImpl result =
-      new ResultDescriptorImpl('result', null);
-  static final SimpleTaskInput baseInput = new SimpleTaskInput(target, result);
-  static final mapper = (Object x) => [x];
-  static final ObjectToListTaskInput input =
-      new ObjectToListTaskInput(baseInput, mapper);
-
-  ObjectToListTaskInputBuilder builder;
-
-  void setUp() {
-    builder = new ObjectToListTaskInputBuilder(input);
-  }
-
-  test_create() {
-    expect(builder, isNotNull);
-    expect(builder.input, input);
-  }
-
-  test_currentResult_afterComplete() {
-    builder.moveNext();
-    builder.currentValue = 'value';
-    builder.moveNext();
-    expect(builder.currentResult, null);
-  }
-
-  test_currentResult_afterCurrentValueNotAvailable() {
-    builder.moveNext();
-    builder.currentValueNotAvailable();
-    builder.moveNext();
-    expect(builder.currentResult, null);
-  }
-
-  test_currentResult_afterOneMoveNext() {
-    builder.moveNext();
-    expect(builder.currentResult, result);
-  }
-
-  test_currentResult_beforeMoveNext() {
-    expect(builder.currentResult, null);
-  }
-
-  test_currentTarget_afterComplete() {
-    builder.moveNext();
-    builder.currentValue = 'value';
-    builder.moveNext();
-    expect(builder.currentTarget, null);
-  }
-
-  test_currentTarget_afterCurrentValueNotAvailable() {
-    builder.moveNext();
-    builder.currentValueNotAvailable();
-    builder.moveNext();
-    expect(builder.currentTarget, null);
-  }
-
-  test_currentTarget_afterOneMoveNext() {
-    builder.moveNext();
-    expect(builder.currentTarget, target);
-  }
-
-  test_currentTarget_beforeMoveNext() {
-    expect(builder.currentTarget, null);
-  }
-
-  test_currentValue_afterOneMoveNext() {
-    builder.moveNext();
-    builder.currentValue = 'value';
-  }
-
-  test_currentValue_beforeMoveNext() {
-    expect(() {
-      builder.currentValue = 'value';
-    }, throwsStateError);
-  }
-
-  test_currentValueNotAvailable_afterOneMoveNext() {
-    builder.moveNext();
-    builder.currentValueNotAvailable();
-  }
-
-  test_currentValueNotAvailable_beforeMoveNext() {
-    expect(() {
-      builder.currentValueNotAvailable();
-    }, throwsStateError);
-  }
-
-  test_inputValue_afterComplete() {
-    builder.moveNext();
-    String value = 'value';
-    builder.currentValue = value;
-    builder.moveNext();
-    expect(builder.inputValue, [value]);
-  }
-
-  test_inputValue_afterCurrentValueNotAvailable() {
-    builder.moveNext();
-    builder.currentValueNotAvailable();
-    builder.moveNext();
-    expect(builder.inputValue, [null]);
-  }
-
-  test_inputValue_afterOneMoveNext() {
-    builder.moveNext();
-    expect(() => builder.inputValue, throwsStateError);
-  }
-
-  test_inputValue_beforeMoveNext() {
-    expect(() => builder.inputValue, throwsStateError);
-  }
-
-  test_moveNext_withoutSet() {
-    expect(builder.moveNext(), true);
-    expect(() => builder.moveNext(), throwsStateError);
-  }
-
-  test_moveNext_withSet() {
-    expect(builder.moveNext(), true);
-    builder.currentValue = 'value';
-    expect(builder.moveNext(), false);
-    expect(builder.moveNext(), false);
-  }
-}
-
-@reflectiveTest
-class ObjectToListTaskInputTest extends EngineTestCase {
-  static final AnalysisTarget target = new TestSource();
-  static final ResultDescriptorImpl result =
-      new ResultDescriptorImpl('result', null);
-
-  test_create() {
-    SimpleTaskInput baseInput = new SimpleTaskInput(target, result);
-    var mapper = (Object x) => [x];
-    ObjectToListTaskInput input = new ObjectToListTaskInput(baseInput, mapper);
-    expect(input, isNotNull);
-    expect(input.baseInput, baseInput);
-    expect(input.mapper, equals(mapper));
-  }
-
-  test_createBuilder() {
-    SimpleTaskInput baseInput = new SimpleTaskInput(target, result);
-    var mapper = (Object x) => [x];
-    ObjectToListTaskInput input = new ObjectToListTaskInput(baseInput, mapper);
-    expect(
-        input.createBuilder(), new TypeMatcher<ObjectToListTaskInputBuilder>());
-  }
-}
-
-@reflectiveTest
-class SimpleTaskInputBuilderTest {
-  static final AnalysisTarget target = new TestSource();
-  static final ResultDescriptorImpl result =
-      new ResultDescriptorImpl('result', null);
-  static final SimpleTaskInput input = new SimpleTaskInput(target, result);
-
-  SimpleTaskInputBuilder builder;
-
-  void setUp() {
-    builder = new SimpleTaskInputBuilder(input);
-  }
-
-  test_create() {
-    expect(builder, isNotNull);
-    expect(builder.input, input);
-  }
-
-  test_currentResult_afterComplete() {
-    builder.moveNext();
-    builder.currentValue = 'value';
-    builder.moveNext();
-    expect(builder.currentResult, null);
-  }
-
-  test_currentResult_afterCurrentValueNotAvailable() {
-    builder.moveNext();
-    builder.currentValueNotAvailable();
-    builder.moveNext();
-    expect(builder.currentResult, null);
-  }
-
-  test_currentResult_afterOneMoveNext() {
-    builder.moveNext();
-    expect(builder.currentResult, result);
-  }
-
-  test_currentResult_beforeMoveNext() {
-    expect(builder.currentResult, null);
-  }
-
-  test_currentTarget_afterComplete() {
-    builder.moveNext();
-    builder.currentValue = 'value';
-    builder.moveNext();
-    expect(builder.currentTarget, null);
-  }
-
-  test_currentTarget_afterCurrentValueNotAvailable() {
-    builder.moveNext();
-    builder.currentValueNotAvailable();
-    builder.moveNext();
-    expect(builder.currentTarget, null);
-  }
-
-  test_currentTarget_afterOneMoveNext() {
-    builder.moveNext();
-    expect(builder.currentTarget, target);
-  }
-
-  test_currentTarget_beforeMoveNext() {
-    expect(builder.currentTarget, null);
-  }
-
-  test_currentValue_afterOneMoveNext() {
-    builder.moveNext();
-    builder.currentValue = 'value';
-  }
-
-  test_currentValue_beforeMoveNext() {
-    expect(() {
-      builder.currentValue = 'value';
-    }, throwsStateError);
-  }
-
-  test_currentValueNotAvailable_afterOneMoveNext() {
-    builder.moveNext();
-    builder.currentValueNotAvailable();
-  }
-
-  test_currentValueNotAvailable_beforeMoveNext() {
-    expect(() {
-      builder.currentValueNotAvailable();
-    }, throwsStateError);
-  }
-
-  test_inputValue_afterComplete() {
-    builder.moveNext();
-    String value = 'value';
-    builder.currentValue = value;
-    builder.moveNext();
-    expect(builder.inputValue, value);
-  }
-
-  test_inputValue_afterCurrentValueNotAvailable() {
-    builder.moveNext();
-    builder.currentValueNotAvailable();
-    builder.moveNext();
-    expect(builder.inputValue, isNull);
-  }
-
-  test_inputValue_afterOneMoveNext() {
-    builder.moveNext();
-    expect(() => builder.inputValue, throwsStateError);
-  }
-
-  test_inputValue_beforeMoveNext() {
-    expect(() => builder.inputValue, throwsStateError);
-  }
-
-  test_moveNext_withoutSet() {
-    expect(builder.moveNext(), true);
-    expect(() => builder.moveNext(), throwsStateError);
-  }
-
-  test_moveNext_withSet() {
-    expect(builder.moveNext(), true);
-    builder.currentValue = 'value';
-    expect(builder.moveNext(), false);
-    expect(builder.moveNext(), false);
-  }
-}
-
-@reflectiveTest
-class SimpleTaskInputTest extends EngineTestCase {
-  static final AnalysisTarget target = new TestSource();
-  static final ResultDescriptorImpl result =
-      new ResultDescriptorImpl('result', null);
-
-  test_create() {
-    SimpleTaskInput input = new SimpleTaskInput(target, result);
-    expect(input, isNotNull);
-    expect(input.target, target);
-    expect(input.result, result);
-  }
-
-  test_createBuilder() {
-    SimpleTaskInput input = new SimpleTaskInput(target, result);
-    expect(input.createBuilder(), new TypeMatcher<SimpleTaskInputBuilder>());
-  }
-}
-
-@reflectiveTest
-class TopLevelTaskInputBuilderTest extends EngineTestCase {
-  static final AnalysisTarget target = new TestSource();
-  static final ResultDescriptorImpl result1 =
-      new ResultDescriptorImpl('result1', null);
-  static final ResultDescriptorImpl result2 =
-      new ResultDescriptorImpl('result2', null);
-  static final SimpleTaskInput input1 = new SimpleTaskInput(target, result1);
-  static final SimpleTaskInput input2 = new SimpleTaskInput(target, result2);
-
-  test_create() {
-    Map<String, TaskInput> inputDescriptors = {};
-    TopLevelTaskInputBuilder builder =
-        new TopLevelTaskInputBuilder(inputDescriptors);
-    expect(builder, isNotNull);
-    expect(builder.inputDescriptors, inputDescriptors);
-  }
-
-  test_currentResult_afterComplete() {
-    Map<String, TaskInput> inputDescriptors = {'one': input1};
-    TopLevelTaskInputBuilder builder =
-        new TopLevelTaskInputBuilder(inputDescriptors);
-    builder.moveNext();
-    builder.currentValue = 'value1';
-    builder.moveNext();
-    expect(builder.currentResult, null);
-  }
-
-  test_currentResult_afterCurrentValueNotAvailable() {
-    Map<String, TaskInput> inputDescriptors = {'one': input1};
-    TopLevelTaskInputBuilder builder =
-        new TopLevelTaskInputBuilder(inputDescriptors);
-    builder.moveNext();
-    builder.currentValueNotAvailable();
-    builder.moveNext();
-    expect(builder.currentResult, null);
-  }
-
-  test_currentResult_afterOneMoveNext() {
-    Map<String, TaskInput> inputDescriptors = {'one': input1, 'two': input2};
-    TopLevelTaskInputBuilder builder =
-        new TopLevelTaskInputBuilder(inputDescriptors);
-    builder.moveNext();
-    expect(builder.currentResult, result1);
-  }
-
-  test_currentResult_afterTwoMoveNext_withConstantInput() {
-    ConstantTaskInput<int> constantInput = new ConstantTaskInput<int>(11);
-    Map<String, TaskInput> inputDescriptors = <String, TaskInput>{
-      'one': input1,
-      'constant': constantInput,
-      'two': input2
-    };
-    TopLevelTaskInputBuilder builder =
-        new TopLevelTaskInputBuilder(inputDescriptors);
-    builder.moveNext();
-    builder.currentValue = 'value1';
-    builder.moveNext();
-    expect(builder.currentResult, result2);
-  }
-
-  test_currentResult_beforeMoveNext() {
-    Map<String, TaskInput> inputDescriptors = {};
-    TopLevelTaskInputBuilder builder =
-        new TopLevelTaskInputBuilder(inputDescriptors);
-    expect(builder.currentResult, null);
-  }
-
-  test_currentTarget_afterComplete() {
-    Map<String, TaskInput> inputDescriptors = {'one': input1};
-    TopLevelTaskInputBuilder builder =
-        new TopLevelTaskInputBuilder(inputDescriptors);
-    builder.moveNext();
-    builder.currentValue = 'value1';
-    builder.moveNext();
-    expect(builder.currentTarget, null);
-  }
-
-  test_currentTarget_afterCurrentValueNotAvailable() {
-    Map<String, TaskInput> inputDescriptors = {'one': input1};
-    TopLevelTaskInputBuilder builder =
-        new TopLevelTaskInputBuilder(inputDescriptors);
-    builder.moveNext();
-    builder.currentValueNotAvailable();
-    builder.moveNext();
-    expect(builder.currentTarget, null);
-  }
-
-  test_currentTarget_afterOneMoveNext() {
-    Map<String, TaskInput> inputDescriptors = {'one': input1};
-    TopLevelTaskInputBuilder builder =
-        new TopLevelTaskInputBuilder(inputDescriptors);
-    builder.moveNext();
-    expect(builder.currentTarget, target);
-  }
-
-  test_currentTarget_afterTwoMoveNext_withConstantInput() {
-    ConstantTaskInput<int> constantInput = new ConstantTaskInput<int>(11);
-    Map<String, TaskInput> inputDescriptors = <String, TaskInput>{
-      'one': input1,
-      'constant': constantInput,
-      'two': input2
-    };
-    TopLevelTaskInputBuilder builder =
-        new TopLevelTaskInputBuilder(inputDescriptors);
-    builder.moveNext();
-    builder.currentValue = 'value1';
-    builder.moveNext();
-    expect(builder.currentTarget, target);
-  }
-
-  test_currentTarget_beforeMoveNext() {
-    Map<String, TaskInput> inputDescriptors = {};
-    TopLevelTaskInputBuilder builder =
-        new TopLevelTaskInputBuilder(inputDescriptors);
-    expect(builder.currentTarget, null);
-  }
-
-  test_currentValue_afterOneMoveNext() {
-    Map<String, TaskInput> inputDescriptors = {'one': input1};
-    TopLevelTaskInputBuilder builder =
-        new TopLevelTaskInputBuilder(inputDescriptors);
-    builder.moveNext();
-    builder.currentValue = 'value1';
-  }
-
-  test_currentValue_beforeMoveNext() {
-    Map<String, TaskInput> inputDescriptors = {'one': input1};
-    TopLevelTaskInputBuilder builder =
-        new TopLevelTaskInputBuilder(inputDescriptors);
-    expect(() {
-      builder.currentValue = 'value1';
-    }, throwsStateError);
-  }
-
-  test_currentValueNotAvailable_afterOneMoveNext() {
-    Map<String, TaskInput> inputDescriptors = {'one': input1};
-    TopLevelTaskInputBuilder builder =
-        new TopLevelTaskInputBuilder(inputDescriptors);
-    builder.moveNext();
-    builder.currentValueNotAvailable();
-  }
-
-  test_currentValueNotAvailable_beforeMoveNext() {
-    Map<String, TaskInput> inputDescriptors = {'one': input1};
-    TopLevelTaskInputBuilder builder =
-        new TopLevelTaskInputBuilder(inputDescriptors);
-    expect(() {
-      builder.currentValueNotAvailable();
-    }, throwsStateError);
-  }
-
-  test_inputValue_afterComplete() {
-    String key1 = 'one';
-    String key2 = 'two';
-    String value1 = 'value1';
-    String value2 = 'value2';
-    Map<String, TaskInput> inputDescriptors = {key1: input1, key2: input2};
-    TopLevelTaskInputBuilder builder =
-        new TopLevelTaskInputBuilder(inputDescriptors);
-    builder.moveNext(); // Advance to requesting result1 for target
-    builder.currentValue = value1;
-    builder.moveNext(); // Advance to requesting result2 for target
-    builder.currentValue = value2;
-    builder.moveNext(); // Advance to the end
-    var inputValue = builder.inputValue;
-    expect(inputValue, new TypeMatcher<Map>());
-    Map inputs = inputValue;
-    expect(inputs.length, 2);
-    expect(inputs, containsPair(key1, value1));
-    expect(inputs, containsPair(key2, value2));
-  }
-
-  test_inputValue_afterOneMoveNext() {
-    Map<String, TaskInput> inputDescriptors = {'one': input1};
-    TopLevelTaskInputBuilder builder =
-        new TopLevelTaskInputBuilder(inputDescriptors);
-    builder.moveNext();
-    expect(() => builder.inputValue, throwsStateError);
-  }
-
-  test_inputValue_afterOneValueNotAvailable() {
-    String key1 = 'one';
-    String key2 = 'two';
-    String value2 = 'value2';
-    Map<String, TaskInput> inputDescriptors = {key1: input1, key2: input2};
-    TopLevelTaskInputBuilder builder =
-        new TopLevelTaskInputBuilder(inputDescriptors);
-    builder.moveNext(); // Advance to requesting result1 for target
-    builder.currentValueNotAvailable();
-    builder.moveNext(); // Advance to requesting result2 for target
-    builder.currentValue = value2;
-    builder.moveNext(); // Advance to the end
-    var inputValue = builder.inputValue;
-    expect(inputValue, new TypeMatcher<Map>());
-    Map inputs = inputValue;
-    expect(inputs, hasLength(1));
-    expect(inputs, containsPair(key2, value2));
-  }
-
-  test_inputValue_beforeMoveNext() {
-    Map<String, TaskInput> inputDescriptors = {};
-    TopLevelTaskInputBuilder builder =
-        new TopLevelTaskInputBuilder(inputDescriptors);
-    expect(() => builder.inputValue, throwsStateError);
-  }
-
-  test_moveNext_withoutSet() {
-    Map<String, TaskInput> inputDescriptors = {'one': input1};
-    TopLevelTaskInputBuilder builder =
-        new TopLevelTaskInputBuilder(inputDescriptors);
-    expect(builder.moveNext(), true);
-    expect(() => builder.moveNext(), throwsStateError);
-  }
-
-  test_moveNext_withSet() {
-    Map<String, TaskInput> inputDescriptors = {'one': input1};
-    TopLevelTaskInputBuilder builder =
-        new TopLevelTaskInputBuilder(inputDescriptors);
-    expect(builder.moveNext(), true);
-    builder.currentValue = 'value1';
-    expect(builder.moveNext(), false);
-    expect(builder.moveNext(), false);
-  }
-}
diff --git a/pkg/analyzer/test/src/task/manager_test.dart b/pkg/analyzer/test/src/task/manager_test.dart
deleted file mode 100644
index b91e829..0000000
--- a/pkg/analyzer/test/src/task/manager_test.dart
+++ /dev/null
@@ -1,130 +0,0 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/exception/exception.dart';
-import 'package:analyzer/src/task/api/model.dart';
-import 'package:analyzer/src/task/manager.dart';
-import 'package:test/test.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import '../../generated/test_support.dart';
-
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(TaskManagerTest);
-  });
-}
-
-@reflectiveTest
-class TaskManagerTest extends EngineTestCase {
-  static final ResultDescriptor result1 = new ResultDescriptor('result1', null);
-  static final ResultDescriptor result2 = new ResultDescriptor('result2', null);
-
-  test_addGeneralResult() {
-    TaskManager manager = new TaskManager();
-    manager.addGeneralResult(result1);
-    Set<ResultDescriptor> results = manager.generalResults;
-    expect(results, unorderedEquals([result1]));
-  }
-
-  test_addPriorityResult() {
-    TaskManager manager = new TaskManager();
-    manager.addPriorityResult(result1);
-    Set<ResultDescriptor> results = manager.priorityResults;
-    expect(results, unorderedEquals([result1]));
-  }
-
-  test_addTaskDescriptor() {
-    TaskManager manager = new TaskManager();
-    TaskDescriptor descriptor =
-        new TaskDescriptor('task', null, null, [result1]);
-    manager.addTaskDescriptor(descriptor);
-    expect(manager.taskMap.length, 1);
-  }
-
-  test_constructor() {
-    TaskManager manager = new TaskManager();
-    expect(manager, isNotNull);
-    expect(manager.generalResults, isEmpty);
-    expect(manager.priorityResults, isEmpty);
-  }
-
-  test_findTask_defined() {
-    TaskManager manager = new TaskManager();
-    TaskDescriptor descriptor =
-        new TaskDescriptor('task', null, null, [result1]);
-    manager.addTaskDescriptor(descriptor);
-    AnalysisTarget target = new TestSource();
-    expect(manager.findTask(target, result1), descriptor);
-  }
-
-  test_findTask_empty() {
-    TaskManager manager = new TaskManager();
-    AnalysisTarget target = new TestSource();
-    expect(() => manager.findTask(target, result1),
-        throwsA(new TypeMatcher<AnalysisException>()));
-  }
-
-  test_findTask_multiple() {
-    TaskManager manager = new TaskManager();
-    TaskDescriptor descriptor1 =
-        new TaskDescriptor('task1', null, null, [result1]);
-    manager.addTaskDescriptor(descriptor1);
-    TaskDescriptor descriptor2 =
-        new TaskDescriptor('task2', null, null, [result1]);
-    manager.addTaskDescriptor(descriptor2);
-    TaskDescriptor descriptor3 =
-        new TaskDescriptor('task3', null, null, [result2]);
-    manager.addTaskDescriptor(descriptor3);
-
-    AnalysisTarget target = new TestSource();
-    TaskDescriptor task = manager.findTask(target, result1);
-    expect(task == descriptor1 || task == descriptor2, true);
-  }
-
-  test_findTask_undefined() {
-    TaskManager manager = new TaskManager();
-    TaskDescriptor descriptor =
-        new TaskDescriptor('task', null, null, [result1]);
-    manager.addTaskDescriptor(descriptor);
-    AnalysisTarget target = new TestSource();
-    expect(() => manager.findTask(target, result2),
-        throwsA(new TypeMatcher<AnalysisException>()));
-  }
-
-  test_removeGeneralResult_absent() {
-    TaskManager manager = new TaskManager();
-    manager.addGeneralResult(result1);
-    Set<ResultDescriptor> results = manager.generalResults;
-    expect(results, unorderedEquals([result1]));
-  }
-
-  test_removeGeneralResult_present() {
-    TaskManager manager = new TaskManager();
-    manager.addGeneralResult(result1);
-    manager.addGeneralResult(result2);
-    Set<ResultDescriptor> results = manager.generalResults;
-    expect(results, unorderedEquals([result1, result2]));
-    manager.removeGeneralResult(result1);
-    expect(results, unorderedEquals([result2]));
-  }
-
-  test_removePriorityResult_absent() {
-    TaskManager manager = new TaskManager();
-    manager.addPriorityResult(result1);
-    manager.removePriorityResult(result2);
-    Set<ResultDescriptor> results = manager.priorityResults;
-    expect(results, unorderedEquals([result1]));
-  }
-
-  test_removePriorityResult_present() {
-    TaskManager manager = new TaskManager();
-    manager.addPriorityResult(result1);
-    manager.addPriorityResult(result2);
-    Set<ResultDescriptor> results = manager.priorityResults;
-    expect(results, unorderedEquals([result1, result2]));
-    manager.removePriorityResult(result1);
-    expect(results, unorderedEquals([result2]));
-  }
-}
diff --git a/pkg/analyzer/test/src/task/model_test.dart b/pkg/analyzer/test/src/task/model_test.dart
deleted file mode 100644
index 65b78ca..0000000
--- a/pkg/analyzer/test/src/task/model_test.dart
+++ /dev/null
@@ -1,152 +0,0 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/exception/exception.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/task/api/model.dart';
-import 'package:analyzer/src/task/model.dart';
-import 'package:test/test.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import '../../generated/test_support.dart';
-import 'test_support.dart';
-
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(AnalysisTaskTest);
-    defineReflectiveTests(ResultDescriptorImplTest);
-    defineReflectiveTests(SimpleResultCachingPolicyTest);
-    defineReflectiveTests(TaskDescriptorImplTest);
-  });
-}
-
-@reflectiveTest
-class AnalysisTaskTest extends EngineTestCase {
-  test_getRequiredInput_missingKey() {
-    AnalysisTarget target = new TestSource();
-    AnalysisTask task = new TestAnalysisTask(null, target);
-    task.inputs = {'a': 'b'};
-    expect(() => task.getRequiredInput('c'),
-        throwsA(new TypeMatcher<AnalysisException>()));
-  }
-
-  test_getRequiredInput_noInputs() {
-    AnalysisTarget target = new TestSource();
-    AnalysisTask task = new TestAnalysisTask(null, target);
-    expect(() => task.getRequiredInput('x'),
-        throwsA(new TypeMatcher<AnalysisException>()));
-  }
-
-  test_getRequiredInput_valid() {
-    AnalysisTarget target = new TestSource();
-    AnalysisTask task = new TestAnalysisTask(null, target);
-    String key = 'a';
-    String value = 'b';
-    task.inputs = {key: value};
-    expect(task.getRequiredInput(key), value);
-  }
-
-  test_getRequiredSource() {
-    AnalysisTarget target = new TestSource();
-    AnalysisTask task = new TestAnalysisTask(null, target);
-    expect(task.getRequiredSource(), target);
-  }
-}
-
-@reflectiveTest
-class ResultDescriptorImplTest extends EngineTestCase {
-  test_create_withCachingPolicy() {
-    ResultCachingPolicy policy = new SimpleResultCachingPolicy(128, 16);
-    ResultDescriptorImpl result =
-        new ResultDescriptorImpl('result', null, cachingPolicy: policy);
-    expect(result.cachingPolicy, same(policy));
-  }
-
-  test_create_withoutCachingPolicy() {
-    ResultDescriptorImpl result = new ResultDescriptorImpl('result', null);
-    ResultCachingPolicy cachingPolicy = result.cachingPolicy;
-    expect(cachingPolicy, isNotNull);
-    expect(cachingPolicy.maxActiveSize, -1);
-    expect(cachingPolicy.maxIdleSize, -1);
-  }
-
-  test_create_withoutContribution() {
-    expect(new ResultDescriptorImpl('name', null), isNotNull);
-  }
-
-  test_inputFor() {
-    AnalysisTarget target = new TestSource();
-    ResultDescriptorImpl result = new ResultDescriptorImpl('result', null);
-    TaskInput input = result.of(target);
-    expect(input, isNotNull);
-  }
-
-  test_name() {
-    String name = 'result';
-    ResultDescriptorImpl result = new ResultDescriptorImpl(name, null);
-    expect(result.name, name);
-  }
-}
-
-@reflectiveTest
-class SimpleResultCachingPolicyTest extends EngineTestCase {
-  test_create() {
-    ResultCachingPolicy policy = new SimpleResultCachingPolicy(256, 32);
-    expect(policy.maxActiveSize, 256);
-    expect(policy.maxIdleSize, 32);
-    expect(policy.measure(null), 1);
-  }
-}
-
-@reflectiveTest
-class TaskDescriptorImplTest extends EngineTestCase {
-  test_create_noOptionalArgs() {
-    String name = 'name';
-    BuildTask buildTask = (context, target) => null;
-    CreateTaskInputs createTaskInputs = (target) => null;
-    List<ResultDescriptor> results = <ResultDescriptor>[];
-    TaskDescriptorImpl descriptor =
-        new TaskDescriptorImpl(name, buildTask, createTaskInputs, results);
-    expect(descriptor, isNotNull);
-    expect(descriptor.name, name);
-    expect(descriptor.buildTask, equals(buildTask));
-    expect(descriptor.createTaskInputs, equals(createTaskInputs));
-    expect(descriptor.suitabilityFor(null), TaskSuitability.LOWEST);
-    expect(descriptor.results, results);
-  }
-
-  test_create_withIsAppropriateFor() {
-    String name = 'name';
-    BuildTask buildTask = (context, target) => null;
-    CreateTaskInputs createTaskInputs = (target) => null;
-    List<ResultDescriptor> results = <ResultDescriptor>[];
-    SuitabilityFor suitabilityFor = (target) => TaskSuitability.NONE;
-    TaskDescriptorImpl descriptor = new TaskDescriptorImpl(
-        name, buildTask, createTaskInputs, results,
-        suitabilityFor: suitabilityFor);
-    expect(descriptor, isNotNull);
-    expect(descriptor.name, name);
-    expect(descriptor.buildTask, equals(buildTask));
-    expect(descriptor.createTaskInputs, equals(createTaskInputs));
-    expect(descriptor.suitabilityFor(null), TaskSuitability.NONE);
-    expect(descriptor.results, results);
-  }
-
-  test_createTask() {
-    BuildTask buildTask =
-        (context, target) => new TestAnalysisTask(context, target);
-    CreateTaskInputs createTaskInputs = (target) => null;
-    List<ResultDescriptor> results = <ResultDescriptor>[];
-    TaskDescriptorImpl descriptor =
-        new TaskDescriptorImpl('name', buildTask, createTaskInputs, results);
-    AnalysisContext context = null;
-    AnalysisTarget target = new TestSource();
-    Map<String, dynamic> inputs = {};
-    AnalysisTask createTask = descriptor.createTask(context, target, inputs);
-    expect(createTask, isNotNull);
-    expect(createTask.context, context);
-    expect(createTask.inputs, inputs);
-    expect(createTask.target, target);
-  }
-}
diff --git a/pkg/analyzer/test/src/task/options_test.dart b/pkg/analyzer/test/src/task/options_test.dart
index 02f48c5..11182d9 100644
--- a/pkg/analyzer/test/src/task/options_test.dart
+++ b/pkg/analyzer/test/src/task/options_test.dart
@@ -11,20 +11,22 @@
 import 'package:analyzer/src/analysis_options/analysis_options_provider.dart';
 import 'package:analyzer/src/analysis_options/error/option_codes.dart';
 import 'package:analyzer/src/dart/error/hint_codes.dart';
+import 'package:analyzer/src/dart/error/syntactic_errors.dart';
 import 'package:analyzer/src/error/codes.dart';
 import 'package:analyzer/src/file_system/file_system.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
 import 'package:analyzer/src/lint/linter.dart';
 import 'package:analyzer/src/lint/registry.dart';
+import 'package:analyzer/src/manifest/manifest_warning_code.dart';
 import 'package:analyzer/src/task/options.dart';
+import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 import 'package:yaml/yaml.dart';
 
 import '../../generated/test_support.dart';
 import '../../resource_utils.dart';
-import '../context/abstract_context.dart';
 
 main() {
   defineReflectiveSuite(() {
@@ -36,14 +38,11 @@
   });
 }
 
-final isGenerateOptionsErrorsTask =
-    new TypeMatcher<GenerateOptionsErrorsTask>();
-
 @reflectiveTest
-class ContextConfigurationTest extends AbstractContextTest {
-  final AnalysisOptionsProvider optionsProvider = new AnalysisOptionsProvider();
+class ContextConfigurationTest {
+  final AnalysisOptions analysisOptions = AnalysisOptionsImpl();
 
-  AnalysisOptions get analysisOptions => context.analysisOptions;
+  final AnalysisOptionsProvider optionsProvider = AnalysisOptionsProvider();
 
   void configureContext(String optionsSource) =>
       applyToAnalysisOptions(analysisOptions, parseOptions(optionsSource));
@@ -128,6 +127,24 @@
     List<String> names = analysisOptions.enabledPluginNames;
     expect(names, ['angular2']);
   }
+
+  test_configure_chromeos_checks() {
+    configureContext('''
+analyzer:
+  optional-checks:
+    chrome-os-manifest-checks
+''');
+    expect(true, analysisOptions.chromeOsManifestChecks);
+  }
+
+  test_configure_chromeos_checks_map() {
+    configureContext('''
+analyzer:
+  optional-checks:
+    chrome-os-manifest-checks : true
+''');
+    expect(true, analysisOptions.chromeOsManifestChecks);
+  }
 }
 
 @reflectiveTest
@@ -201,7 +218,6 @@
         removeCode(StrongModeCode.INVALID_SUPER_INVOCATION);
         removeCode(StrongModeCode.NON_GROUND_TYPE_CHECK_INFO);
         removeCode(StrongModeCode.DYNAMIC_INVOKE);
-        removeCode(StrongModeCode.INVALID_FIELD_OVERRIDE);
         removeCode(StrongModeCode.IMPLICIT_DYNAMIC_PARAMETER);
         removeCode(StrongModeCode.IMPLICIT_DYNAMIC_RETURN);
         removeCode(StrongModeCode.IMPLICIT_DYNAMIC_VARIABLE);
@@ -212,16 +228,19 @@
         removeCode(StrongModeCode.IMPLICIT_DYNAMIC_FUNCTION);
         removeCode(StrongModeCode.IMPLICIT_DYNAMIC_METHOD);
         removeCode(StrongModeCode.IMPLICIT_DYNAMIC_INVOKE);
-        removeCode(StrongModeCode.NO_DEFAULT_BOUNDS);
         removeCode(StrongModeCode.NOT_INSTANTIATED_BOUND);
         removeCode(StrongModeCode.TOP_LEVEL_CYCLE);
         removeCode(StrongModeCode.TOP_LEVEL_FUNCTION_LITERAL_BLOCK);
         removeCode(StrongModeCode.TOP_LEVEL_IDENTIFIER_NO_TYPE);
         removeCode(StrongModeCode.TOP_LEVEL_INSTANCE_GETTER);
         removeCode(StrongModeCode.TOP_LEVEL_INSTANCE_METHOD);
-        removeCode(StrongModeCode.TOP_LEVEL_UNSUPPORTED);
       } else if (errorType == TodoCode) {
         declaredNames.remove('TODO_REGEX');
+      } else if (errorType == ParserErrorCode) {
+        declaredNames.remove('CONST_AFTER_FACTORY');
+      } else if (errorType == ManifestWarningCode) {
+        declaredNames.remove('NON_RESIZABLE_ACTIVITY');
+        declaredNames.remove('SETTING_ORIENTATION_ON_ACTIVITY');
       }
 
       // Assert that all remaining declared names are in errorCodeValues
@@ -262,7 +281,7 @@
 }
 
 @reflectiveTest
-class GenerateOldOptionsErrorsTaskTest extends AbstractContextTest {
+class GenerateOldOptionsErrorsTaskTest with ResourceProviderMixin {
   final AnalysisOptionsProvider optionsProvider = new AnalysisOptionsProvider();
 
   String get optionsFilePath => '/${AnalysisEngine.ANALYSIS_OPTIONS_FILE}';
@@ -288,7 +307,7 @@
   }
 
   void validate(String content, List<ErrorCode> expected) {
-    final Source source = newSource(optionsFilePath, content);
+    final source = newFile(optionsFilePath, content: content).createSource();
     var options = optionsProvider.getOptionsFromSource(source);
     final OptionsFileValidator validator = new OptionsFileValidator(source);
     var errors = validator.validate(options);
@@ -373,15 +392,7 @@
 analyzer:
   language:
     unsupported: true
-''', [AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITHOUT_VALUES]);
-  }
-
-  test_analyzer_language_unsupported_value() {
-    validate('''
-analyzer:
-  strong-mode:
-    implicit-dynamic: foo
-''', [AnalysisOptionsWarningCode.UNSUPPORTED_VALUE]);
+''', [AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITH_LEGAL_VALUES]);
   }
 
   test_analyzer_lint_codes_recognized() {
@@ -431,6 +442,14 @@
 ''', [AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITH_LEGAL_VALUES]);
   }
 
+  test_analyzer_strong_mode_unsupported_value() {
+    validate('''
+analyzer:
+  strong-mode:
+    implicit-dynamic: foo
+''', [AnalysisOptionsWarningCode.UNSUPPORTED_VALUE]);
+  }
+
   test_analyzer_supported_exclude() {
     validate('''
 analyzer:
@@ -469,6 +488,22 @@
     ''', [AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITH_LEGAL_VALUE]);
   }
 
+  test_chromeos_manifest_checks() {
+    validate('''
+analyzer:
+  optional-checks:
+    chrome-os-manifest-checks
+''', []);
+  }
+
+  test_chromeos_manifest_checks_invalid() {
+    validate('''
+analyzer:
+  optional-checks:
+    chromeos-manifest
+''', [AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITH_LEGAL_VALUE]);
+  }
+
   void validate(String source, List<ErrorCode> expected) {
     var options = optionsProvider.getOptionsFromString(source);
     var errors = validator.validate(options);
diff --git a/pkg/analyzer/test/src/task/options_work_manager_test.dart b/pkg/analyzer/test/src/task/options_work_manager_test.dart
deleted file mode 100644
index 8845781..0000000
--- a/pkg/analyzer/test/src/task/options_work_manager_test.dart
+++ /dev/null
@@ -1,311 +0,0 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/error/error.dart' show AnalysisError;
-import 'package:analyzer/exception/exception.dart';
-import 'package:analyzer/src/context/cache.dart';
-import 'package:analyzer/src/error/codes.dart' show AnalysisOptionsErrorCode;
-import 'package:analyzer/src/generated/engine.dart'
-    show
-        AnalysisEngine,
-        AnalysisErrorInfo,
-        AnalysisErrorInfoImpl,
-        CacheState,
-        ChangeNoticeImpl,
-        InternalAnalysisContext;
-import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/task/api/dart.dart';
-import 'package:analyzer/src/task/api/general.dart';
-import 'package:analyzer/src/task/api/model.dart';
-import 'package:analyzer/src/task/options.dart';
-import 'package:analyzer/src/task/options_work_manager.dart';
-import 'package:test/test.dart';
-import 'package:test_reflective_loader/test_reflective_loader.dart';
-
-import '../../generated/test_support.dart';
-
-main() {
-  defineReflectiveSuite(() {
-    defineReflectiveTests(OptionsWorkManagerNewFileTest);
-    defineReflectiveTests(OptionsWorkManagerOldFileTest);
-  });
-}
-
-@reflectiveTest
-class OptionsWorkManagerNewFileTest extends OptionsWorkManagerTest {
-  String get optionsFile => AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE;
-}
-
-@reflectiveTest
-class OptionsWorkManagerOldFileTest extends OptionsWorkManagerTest {
-  String get optionsFile => AnalysisEngine.ANALYSIS_OPTIONS_FILE;
-}
-
-abstract class OptionsWorkManagerTest {
-  _InternalAnalysisContextMock context = new _InternalAnalysisContextMock();
-  AnalysisCache cache;
-  OptionsWorkManager manager;
-
-  CaughtException caughtException = new CaughtException(null, null);
-
-  Source source1;
-
-  Source source2;
-  Source source3;
-  Source source4;
-  CacheEntry entry1;
-  CacheEntry entry2;
-  CacheEntry entry3;
-  CacheEntry entry4;
-  String get optionsFile;
-
-  void expect_sourceQueue(List<Source> sources) {
-    expect(manager.sourceQueue, unorderedEquals(sources));
-  }
-
-  void setUp() {
-    cache = context.analysisCache;
-    manager = new OptionsWorkManager(context);
-    source1 = new TestSource('test1/$optionsFile');
-    source2 = new TestSource('test2/$optionsFile');
-    source3 = new TestSource('test3/$optionsFile');
-    source4 = new TestSource('test4/$optionsFile');
-    entry1 = context.getCacheEntry(source1);
-    entry2 = context.getCacheEntry(source2);
-    entry3 = context.getCacheEntry(source3);
-    entry4 = context.getCacheEntry(source4);
-  }
-
-  void test_applyChange_add() {
-    // add source1
-    manager.applyChange([source1], [], []);
-    expect_sourceQueue([source1]);
-    // add source2
-    manager.applyChange([source2], [], []);
-    expect_sourceQueue([source1, source2]);
-  }
-
-  void test_applyChange_add_duplicate() {
-    // add source1
-    manager.applyChange([source1], [], []);
-    expect_sourceQueue([source1]);
-    // add source1 again
-    manager.applyChange([source1], [], []);
-    expect_sourceQueue([source1]);
-  }
-
-  void test_applyChange_change() {
-    // change source1
-    manager.applyChange([], [source1], []);
-    expect_sourceQueue([source1]);
-  }
-
-  void test_applyChange_change_afterAdd() {
-    manager.applyChange([source1, source2], [], []);
-    // change source1
-    manager.applyChange([], [source1], []);
-    expect_sourceQueue([source1, source2]);
-  }
-
-  void test_applyChange_remove() {
-    manager.applyChange([source1, source2], [], []);
-    // remove source1
-    manager.applyChange([], [], [source1]);
-    expect_sourceQueue([source2]);
-    // remove source2
-    manager.applyChange([], [], [source2]);
-    expect_sourceQueue([]);
-    // remove source3
-    manager.applyChange([], [], [source3]);
-    expect_sourceQueue([]);
-  }
-
-  void test_applyPriorityTargets() {
-    context.setShouldErrorsBeAnalyzed(source2, true);
-    context.setShouldErrorsBeAnalyzed(source3, true);
-    manager.priorityResultQueue
-        .add(new TargetedResult(source1, ANALYSIS_OPTIONS_ERRORS));
-    manager.priorityResultQueue
-        .add(new TargetedResult(source2, ANALYSIS_OPTIONS_ERRORS));
-    // -source1 +source3
-    manager.applyPriorityTargets([source2, source3]);
-    expect(
-        manager.priorityResultQueue,
-        unorderedEquals([
-          new TargetedResult(source2, ANALYSIS_OPTIONS_ERRORS),
-          new TargetedResult(source3, ANALYSIS_OPTIONS_ERRORS)
-        ]));
-    // get next request
-    TargetedResult request = manager.getNextResult();
-    expect(request.target, source2);
-    expect(request.result, ANALYSIS_OPTIONS_ERRORS);
-  }
-
-  void test_getErrors() {
-    AnalysisError error1 = new AnalysisError(
-        source1, 1, 0, AnalysisOptionsErrorCode.PARSE_ERROR, ['']);
-    AnalysisError error2 = new AnalysisError(
-        source1, 2, 0, AnalysisOptionsErrorCode.PARSE_ERROR, ['']);
-    entry1
-        .setValue(ANALYSIS_OPTIONS_ERRORS, <AnalysisError>[error1, error2], []);
-
-    List<AnalysisError> errors = manager.getErrors(source1);
-    expect(errors, unorderedEquals([error1, error2]));
-  }
-
-  void test_getNextResult_hasNormal_firstIsError() {
-    entry1.setErrorState(caughtException, [ANALYSIS_OPTIONS_ERRORS]);
-    manager.sourceQueue.addAll([source1, source2]);
-    TargetedResult request = manager.getNextResult();
-    expect(request.target, source2);
-    expect(request.result, ANALYSIS_OPTIONS_ERRORS);
-    // source1 is out, source2 is waiting
-    expect_sourceQueue([source2]);
-  }
-
-  void test_getNextResult_hasNormal_firstIsInvalid() {
-    entry1.setState(ANALYSIS_OPTIONS_ERRORS, CacheState.INVALID);
-    manager.sourceQueue.addAll([source1, source2]);
-    TargetedResult request = manager.getNextResult();
-    expect(request.target, source1);
-    expect(request.result, ANALYSIS_OPTIONS_ERRORS);
-    // no changes until computed
-    expect_sourceQueue([source1, source2]);
-  }
-
-  void test_getNextResult_hasNormal_firstIsValid() {
-    entry1.setValue(ANALYSIS_OPTIONS_ERRORS, [], []);
-    manager.sourceQueue.addAll([source1, source2]);
-    TargetedResult request = manager.getNextResult();
-    expect(request.target, source2);
-    expect(request.result, ANALYSIS_OPTIONS_ERRORS);
-    // source1 is out, source2 is waiting
-    expect_sourceQueue([source2]);
-  }
-
-  void test_getNextResult_hasNormalAndPriority() {
-    entry1.setState(ANALYSIS_OPTIONS_ERRORS, CacheState.INVALID);
-    manager.sourceQueue.addAll([source1, source2]);
-    manager.addPriorityResult(source3, ANALYSIS_OPTIONS_ERRORS);
-
-    TargetedResult request = manager.getNextResult();
-    expect(request.target, source3);
-    expect(request.result, ANALYSIS_OPTIONS_ERRORS);
-    // no changes until computed
-    expect_sourceQueue([source1, source2]);
-  }
-
-  void test_getNextResult_hasPriority() {
-    manager.addPriorityResult(source1, ANALYSIS_OPTIONS_ERRORS);
-    manager.addPriorityResult(source2, ANALYSIS_OPTIONS_ERRORS);
-    expect(
-        manager.priorityResultQueue,
-        unorderedEquals([
-          new TargetedResult(source1, ANALYSIS_OPTIONS_ERRORS),
-          new TargetedResult(source2, ANALYSIS_OPTIONS_ERRORS)
-        ]));
-
-    TargetedResult request = manager.getNextResult();
-    expect(request.target, source1);
-    expect(request.result, ANALYSIS_OPTIONS_ERRORS);
-    // no changes until computed
-    expect(
-        manager.priorityResultQueue,
-        unorderedEquals([
-          new TargetedResult(source1, ANALYSIS_OPTIONS_ERRORS),
-          new TargetedResult(source2, ANALYSIS_OPTIONS_ERRORS)
-        ]));
-  }
-
-  void test_getNextResult_nothingToDo() {
-    TargetedResult request = manager.getNextResult();
-    expect(request, isNull);
-  }
-
-  void test_getNextResultPriority_hasPriority() {
-    manager.addPriorityResult(source1, SOURCE_KIND);
-    expect(manager.getNextResultPriority(), WorkOrderPriority.PRIORITY);
-  }
-
-  void test_getNextResultPriority_hasSource() {
-    manager.sourceQueue.addAll([source1]);
-    expect(manager.getNextResultPriority(), WorkOrderPriority.NORMAL);
-  }
-
-  void test_getNextResultPriority_nothingToDo() {
-    expect(manager.getNextResultPriority(), WorkOrderPriority.NONE);
-  }
-
-  void test_resultsComputed_errors() {
-    AnalysisError error1 = new AnalysisError(
-        source1, 1, 0, AnalysisOptionsErrorCode.PARSE_ERROR, ['']);
-    AnalysisError error2 = new AnalysisError(
-        source1, 2, 0, AnalysisOptionsErrorCode.PARSE_ERROR, ['']);
-    LineInfo lineInfo = new LineInfo([0]);
-    entry1.setValue(LINE_INFO, lineInfo, []);
-    entry1
-        .setValue(ANALYSIS_OPTIONS_ERRORS, <AnalysisError>[error1, error2], []);
-    // RESOLVED_UNIT is ready, set errors
-    manager.resultsComputed(source1, {ANALYSIS_OPTIONS_ERRORS: null});
-    // all of the errors are included
-    ChangeNoticeImpl notice = context.getNotice(source1);
-    expect(notice.errors, unorderedEquals([error1, error2]));
-    expect(notice.lineInfo, lineInfo);
-  }
-}
-
-class _InternalAnalysisContextMock implements InternalAnalysisContext {
-  @override
-  CachePartition privateAnalysisCachePartition;
-
-  @override
-  AnalysisCache analysisCache;
-
-  Map<Source, bool> shouldErrorsBeAnalyzedMap = <Source, bool>{};
-
-  Map<Source, ChangeNoticeImpl> _pendingNotices = <Source, ChangeNoticeImpl>{};
-
-  _InternalAnalysisContextMock() {
-    privateAnalysisCachePartition = new UniversalCachePartition(this);
-    analysisCache = new AnalysisCache([privateAnalysisCachePartition]);
-  }
-
-  @override
-  CacheEntry getCacheEntry(AnalysisTarget target) {
-    CacheEntry entry = analysisCache.get(target);
-    if (entry == null) {
-      entry = new CacheEntry(target);
-      analysisCache.put(entry);
-    }
-    return entry;
-  }
-
-  @override
-  AnalysisErrorInfo getErrors(Source source) {
-    List<AnalysisError> errors = AnalysisError.NO_ERRORS;
-    if (AnalysisEngine.isAnalysisOptionsFileName(source.shortName)) {
-      errors = getCacheEntry(source).getValue(ANALYSIS_OPTIONS_ERRORS);
-    }
-    return new AnalysisErrorInfoImpl(
-        errors, getCacheEntry(source).getValue(LINE_INFO));
-  }
-
-  @override
-  ChangeNoticeImpl getNotice(Source source) =>
-      _pendingNotices.putIfAbsent(source, () => new ChangeNoticeImpl(source));
-
-  @override
-  noSuchMethod(Invocation invocation) {
-    throw new StateError('Unexpected invocation of ${invocation.memberName}');
-  }
-
-  void setShouldErrorsBeAnalyzed(Source source, bool value) {
-    shouldErrorsBeAnalyzedMap[source] = value;
-  }
-
-  @override
-  bool shouldErrorsBeAnalyzed(Source source) {
-    return shouldErrorsBeAnalyzedMap[source];
-  }
-}
diff --git a/pkg/analyzer/test/src/task/strong/checker_test.dart b/pkg/analyzer/test/src/task/strong/checker_test.dart
index f46df08..f247d09 100644
--- a/pkg/analyzer/test/src/task/strong/checker_test.dart
+++ b/pkg/analyzer/test/src/task/strong/checker_test.dart
@@ -2,17 +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.
 
+import 'package:analyzer/src/dart/analysis/experiments.dart';
+import 'package:analyzer/src/test_utilities/package_mixin.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
 import 'strong_test_helper.dart';
 
 void main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(CheckerTest_Driver);
+    defineReflectiveTests(CheckerTest);
+    defineReflectiveTests(CheckerWithUiAsCodeTest);
   });
 }
 
-abstract class CheckerTest extends AbstractStrongTest {
+@reflectiveTest
+class CheckerTest extends AbstractStrongTest with PackageMixin {
   test_awaitForInCastsStreamElementToVariable() async {
     await checkFile('''
 import 'dart:async';
@@ -369,7 +373,6 @@
     ''');
   }
 
-  @failingTest // See dartbug.com/32918
   test_constantGenericTypeArg_infer() async {
     // Regression test for https://github.com/dart-lang/sdk/issues/26141
     await checkFile('''
@@ -2305,11 +2308,11 @@
 
   test_implicitDynamic_mapLiteral() async {
     addFile(r'''
-var m0 = /*error:IMPLICIT_DYNAMIC_MAP_LITERAL*/{};
-Map m1 = /*error:IMPLICIT_DYNAMIC_MAP_LITERAL*/{};
-Map<dynamic, dynamic> m2 = /*error:IMPLICIT_DYNAMIC_MAP_LITERAL*/{};
+var m0 = /*info:INFERRED_TYPE_LITERAL,error:IMPLICIT_DYNAMIC_MAP_LITERAL*/{};
+Map m1 = /*info:INFERRED_TYPE_LITERAL,error:IMPLICIT_DYNAMIC_MAP_LITERAL*/{};
+Map<dynamic, dynamic> m2 = /*info:INFERRED_TYPE_LITERAL,error:IMPLICIT_DYNAMIC_MAP_LITERAL*/{};
 dynamic d = 42;
-var m3 = /*error:IMPLICIT_DYNAMIC_MAP_LITERAL*/{d: d};
+var m3 = /*info:INFERRED_TYPE_LITERAL,error:IMPLICIT_DYNAMIC_MAP_LITERAL*/{d: d};
 var m4 = /*info:INFERRED_TYPE_LITERAL,error:IMPLICIT_DYNAMIC_MAP_LITERAL*/{'x': d, 'y': d};
 var m5 = /*info:INFERRED_TYPE_LITERAL,error:IMPLICIT_DYNAMIC_MAP_LITERAL*/{d: 'x'};
 
@@ -2535,7 +2538,6 @@
     ''');
   }
 
-  @failingTest // Does not work with old task model
   test_interfacesFromMixinsUsedTwiceAreChecked() {
     // Regression test for https://github.com/dart-lang/sdk/issues/29782
     return checkFile(r'''
@@ -3647,6 +3649,265 @@
 ''');
   }
 
+  test_strictInference_collectionLiterals() async {
+    addFile(r'''
+main() {
+  var emptyList = /*info:INFERENCE_FAILURE_ON_COLLECTION_LITERAL*/[];
+  var emptyMap = /*info:INFERENCE_FAILURE_ON_COLLECTION_LITERAL*/{};
+
+  var upwardsInfersDynamicList = /*info:INFERENCE_FAILURE_ON_COLLECTION_LITERAL*/[42 as dynamic];
+  var upwardsInfersDynamicSet = /*info:INFERENCE_FAILURE_ON_COLLECTION_LITERAL*/{42 as dynamic};
+
+
+  dynamic d;
+  var upwardsInfersDynamicMap1 = /*info:INFERENCE_FAILURE_ON_COLLECTION_LITERAL*/{d: 2};
+  var upwardsInfersDynamicMap2 = /*info:INFERENCE_FAILURE_ON_COLLECTION_LITERAL*/{4: d};
+  var upwardsInfersDynamicMap3 = /*info:INFERENCE_FAILURE_ON_COLLECTION_LITERAL*/{d: d};
+}
+    ''');
+    await check(strictInference: true);
+  }
+
+  test_strictInference_instanceCreation() async {
+    addFile(r'''
+class C<T> {
+  C([T t]);
+  C.of(T t);
+  factory C.from(Object e) => C();
+}
+
+main() {
+  // These should be allowed:
+  C<int> downwardsInferenceIsOK = C();
+  C<dynamic> downwardsInferenceDynamicIsOK = C();
+  var inferredFromConstructorParameterIsOK = C(42);
+  var explicitDynamicIsOK = C<dynamic>(42);
+
+  var rawConstructorCall = /*info:INFERENCE_FAILURE_ON_INSTANCE_CREATION*/C();
+  var upwardsInfersDynamic = /*info:INFERENCE_FAILURE_ON_INSTANCE_CREATION*/C(42 as dynamic);
+  var namedConstructor = /*info:INFERENCE_FAILURE_ON_INSTANCE_CREATION*/C.of(42 as dynamic);
+  var factoryConstructor = /*info:INFERENCE_FAILURE_ON_INSTANCE_CREATION*/C.from(42);
+}
+    ''');
+    await check(strictInference: true);
+  }
+
+  test_strictInference_instanceCreation_optionalTypeArgs() async {
+    addMetaPackage();
+    addFile(r'''
+import 'package:meta/meta.dart';
+@optionalTypeArgs
+class C<T> {
+  C([T t]);
+  C.of(T t);
+  factory C.from(Object e) => C();
+}
+
+main() {
+  var rawConstructorCall = C();
+  var upwardsInfersDynamic = C(42 as dynamic);
+  var namedConstructor = C.of(42 as dynamic);
+  var factoryConstructor = C.from(42);
+}
+    ''');
+    await check(strictInference: true);
+  }
+
+  test_strictRawTypes_classes() async {
+    addFile(r'''
+class C<T> {
+  C([T t]);
+}
+
+class M<T> {}
+
+class ExtendRawType extends /*info:STRICT_RAW_TYPE*/C {}
+class MixinRawType extends Object with /*info:STRICT_RAW_TYPE*/M {}
+class ImplementRawType implements /*info:STRICT_RAW_TYPE*/C {}
+class MixinApplicationRawType = Object with /*info:STRICT_RAW_TYPE*/M;
+
+class ClassWithNumBound<T extends num> {}
+class ClassWithObjectBound<T extends Object> {}
+class ClassWithDynamicBound<T extends dynamic> {}
+
+class ClassWithRawTypeBound<T extends /*info:STRICT_RAW_TYPE*/List> {}
+
+/*info:STRICT_RAW_TYPE*/C topLevelField;
+/*info:STRICT_RAW_TYPE*/C get topLevelGetter => null;
+set topLevelSetter(/*info:STRICT_RAW_TYPE*/C c) {}
+
+/*info:STRICT_RAW_TYPE*/C returnType() => null;
+parameterType(/*info:STRICT_RAW_TYPE*/C c) {}
+
+C<int> explicitTypeArgsAreOK;
+
+main() {
+  {
+    ClassWithNumBound classWithNumBoundOK;
+    ClassWithObjectBound classWithObjectBoundOK;
+    /*info:STRICT_RAW_TYPE*/ClassWithDynamicBound classWithDynamicBound;
+    /*info:STRICT_RAW_TYPE*/C rawConstructorCallFromType = C();
+  }
+
+  {
+    // These should be allowed:
+    List<int> downwardsInferenceIsOK = [];
+    List<dynamic> downwardsInferenceDynamicIsOK = [];
+    var upwardsInferNonDynamicIsOK = [42];
+    var explicitDynamicIsOK = <dynamic>[42];
+
+    var rawListOfLists = </*info:STRICT_RAW_TYPE*/List>[];
+    /*info:STRICT_RAW_TYPE*/List rawListFromType = [];
+  }
+
+  {
+    // These should be allowed:
+    List<int> downwardsInferenceIsOK = [];
+    List<dynamic> downwardsInferenceDynamicIsOK = [];
+    var upwardsInferNonDynamicIsOK = [42];
+    var explicitDynamicIsOK = <dynamic>[42];
+
+    var rawListOfLists = </*info:STRICT_RAW_TYPE*/List>[];
+    /*info:STRICT_RAW_TYPE*/List rawListFromType = [];
+  }
+
+  {
+    // These should be allowed:
+    Set<int> downwardsInferenceIsOK = {};
+    Set<dynamic> downwardsInferenceDynamicIsOK = {};
+    var upwardsInferNonDynamicIsOK = {42};
+    var explicitDynamicIsOK = <dynamic>{42};
+
+    var rawSetOfSets = </*info:STRICT_RAW_TYPE*/Set>{};
+    /*info:STRICT_RAW_TYPE*/Set rawSetFromType = {};
+  }
+
+  {
+    // These should be allowed:
+    Map<int, int> downwardsInferenceIsOK = {};
+    Map<dynamic, int> downwardsInferenceDynamicIsOK1 = {};
+    Map<int, dynamic> downwardsInferenceDynamicIsOK2 = {};
+    Map<dynamic, dynamic> downwardsInferenceDynamicIsOK3 = {};
+
+    var upwardsInferNonDynamicIsOK = {4: 2};
+    var explicitDynamicIsOK = <dynamic, dynamic>{4: 2};
+
+    var rawMapOfMaps = </*info:STRICT_RAW_TYPE*/Map>{};
+    /*info:STRICT_RAW_TYPE*/Map rawMapFromType = {};
+  }
+
+  {
+    Object isCheck;
+    if (isCheck is /*info:STRICT_RAW_TYPE*/List) {}
+    if (isCheck is /*info:STRICT_RAW_TYPE*/C) {}
+
+    if (isCheck is List<dynamic>) {}
+    if (isCheck is List<int>) {}
+    if (isCheck is C<dynamic>) {}
+    if (isCheck is C<int>) {}
+  }
+}
+    ''');
+    await check(strictRawTypes: true);
+  }
+
+  test_strictRawTypes_classes_optionalTypeArgs() async {
+    addMetaPackage();
+    addFile(r'''
+import 'package:meta/meta.dart';
+@optionalTypeArgs
+class C<T> {
+  C([T t]);
+}
+
+@optionalTypeArgs
+class M<T> {}
+
+class ExtendRawType extends C {}
+class MixinRawType extends Object with M {}
+class ImplementRawType implements C {}
+class MixinApplicationRawType = Object with M;
+
+C topLevelField;
+C get topLevelGetter => null;
+set topLevelSetter(C c) {}
+
+C returnType() => null;
+parameterType(C c) {}
+
+C<int> explicitTypeArgsAreOK;
+
+main() {
+  // These should be allowed:
+  C<int> downwardsInferenceIsOK = C();
+  C<dynamic> downwardsInferenceDynamicIsOK = C();
+  var inferredFromConstructorParameterIsOK = C(42);
+  var explicitDynamicIsOK = C<dynamic>(42);
+
+  var rawConstructorCall = C();
+  C rawConstructorCallFromType = C();
+  var upwardsInfersDynamic = C(42 as dynamic);
+
+  Object isChecksAreAllowed;
+  if (isChecksAreAllowed is C) {}
+}
+    ''');
+
+    await check(strictRawTypes: true);
+  }
+
+  test_strictRawTypes_typedefs() async {
+    addFile(r'''
+typedef T F1<T>(T _);
+typedef F2<T> = T Function(T);
+typedef G1<T> = S Function<S>(T);
+typedef G2<T> = S Function<S>(S); // right side does not use `T`
+
+typedef G3 = T Function<T>(T); // typedef has no type params.
+
+testTypedefs() {
+  /*info:STRICT_RAW_TYPE*/F1 rawTypedefDart1Syntax;
+  /*info:STRICT_RAW_TYPE*/F2 rawTypedefDart2Syntax;
+  /*info:STRICT_RAW_TYPE*/G1 rawTypedefGenericFunction;
+  /*info:STRICT_RAW_TYPE*/G2 rawTypedefGenericFunction2;
+  {
+    F1<dynamic> explicitTypedefDart1SyntaxIsOK;
+    F2<dynamic> explicitTypedefDart2SyntaxIsOK;
+    G1<dynamic> explicitTypedefGenericFunctionIsOK;
+    G2<dynamic> explicitTypedefGenericFunction2IsOK;
+    G3 typedefWithoutTypeParamsIsOK;
+  }
+  {
+    F1<int> explicitTypedefDart1SyntaxIsOK;
+    F2<int> explicitTypedefDart2SyntaxIsOK;
+    G1<int> explicitTypedefGenericFunctionIsOK;
+    G2<int> explicitTypedefGenericFunction2IsOK;
+  }
+}
+    ''');
+    await check(strictRawTypes: true);
+  }
+
+  test_strictRawTypes_typedefs_optionalTypeArgs() async {
+    addMetaPackage();
+    addFile(r'''
+import 'package:meta/meta.dart';
+
+@optionalTypeArgs typedef T F1<T>(T _);
+@optionalTypeArgs typedef F2<T> = T Function(T);
+@optionalTypeArgs typedef G1<T> = S Function<S>(T);
+@optionalTypeArgs typedef G2<T> = S Function<S>(S);
+
+testTypedefs() {
+  F1 rawTypedefDart1Syntax;
+  F2 rawTypedefDart2Syntax;
+  G1 rawTypedefGenericFunction;
+  G2 rawTypedefGenericFunction2;
+}
+    ''');
+    await check(strictRawTypes: true);
+  }
+
   test_superCallPlacement() async {
     await checkFile('''
 class Base {
@@ -3926,13 +4187,13 @@
  // TODO(leafp): We can't currently test for key errors since the
  // error marker binds to the entire entry.
   {
-     Map m = {s: i};
-     m = {s: s};
-     m = {s: n};
-     m = {s: i,
+     Map m = /*info:INFERRED_TYPE_LITERAL*/{s: i};
+     m = /*info:INFERRED_TYPE_LITERAL*/{s: s};
+     m = /*info:INFERRED_TYPE_LITERAL*/{s: n};
+     m = /*info:INFERRED_TYPE_LITERAL*/{s: i,
           s: n,
           s: s};
-     m = {i: s,
+     m = /*info:INFERRED_TYPE_LITERAL*/{i: s,
           n: s,
           s: s};
   }
@@ -4275,11 +4536,626 @@
 }
 
 @reflectiveTest
-class CheckerTest_Driver extends CheckerTest {
+class CheckerWithUiAsCodeTest extends AbstractStrongTest {
   @override
-  bool get enableNewAnalysisDriver => true;
+  List<String> get enabledExperiments =>
+      [EnableString.spread_collections, EnableString.control_flow_collections];
 
-  @override // Passes with driver
-  test_interfacesFromMixinsUsedTwiceAreChecked() =>
-      super.test_interfacesFromMixinsUsedTwiceAreChecked();
+  test_list_ifElement_dynamicCondition_disableImplicitCasts() async {
+    addFile(r'''
+dynamic c;
+void main() {
+  <int>[if (/*error:NON_BOOL_CONDITION*/c) 0];
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_list_ifElement_dynamicCondition_implicitCasts() async {
+    addFile(r'''
+dynamic c;
+void main() {
+  <int>[if (/*info:DYNAMIC_CAST*/c) 0];
+}
+''');
+    await check();
+  }
+
+  test_list_ifElement_falseBranch_dynamic_disableImplicitCasts() async {
+    addFile(r'''
+bool c;
+dynamic dyn;
+void main() {
+  <int>[if (c) 0 else /*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/dyn];
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_list_ifElement_falseBranch_dynamic_implicitCasts() async {
+    addFile(r'''
+bool c;
+dynamic dyn;
+void main() {
+  <int>[if (c) 0 else /*info:DYNAMIC_CAST*/dyn];
+}
+''');
+    await check();
+  }
+
+  test_list_ifElement_falseBranch_supertype_disableImplicitCasts() async {
+    addFile(r'''
+bool c;
+num someNum;
+void main() {
+  <int>[if (c) 0 else /*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/someNum];
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_list_ifElement_falseBranch_supertype_implicitCasts() async {
+    addFile(r'''
+bool c;
+num someNum;
+void main() {
+  <int>[if (c) 0 else /*info:DOWN_CAST_IMPLICIT*/someNum];
+}
+''');
+    await check();
+  }
+
+  test_list_ifElement_objectCondition_disableImplicitCasts() async {
+    addFile(r'''
+Object c;
+void main() {
+  <int>[if (/*error:NON_BOOL_CONDITION*/c) 0];
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_list_ifElement_objectCondition_implicitCasts() async {
+    addFile(r'''
+Object c;
+void main() {
+  <int>[if (/*info:DOWN_CAST_IMPLICIT*/c) 0];
+}
+''');
+    await check();
+  }
+
+  test_list_ifElement_trueBranch_dynamic_disableImplicitCasts() async {
+    addFile(r'''
+bool c;
+dynamic dyn;
+void main() {
+  <int>[if (c) /*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/dyn];
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_list_ifElement_trueBranch_dynamic_implicitCasts() async {
+    addFile(r'''
+bool c;
+dynamic dyn;
+void main() {
+  <int>[if (c) /*info:DYNAMIC_CAST*/dyn];
+}
+''');
+    await check();
+  }
+
+  test_list_ifElement_trueBranch_supertype_disableImplicitCasts() async {
+    addFile(r'''
+bool c;
+num someNum;
+void main() {
+  <int>[if (c) /*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/someNum];
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_list_ifElement_trueBranch_supertype_implicitCasts() async {
+    addFile(r'''
+bool c;
+num someNum;
+void main() {
+  <int>[if (c) /*info:DOWN_CAST_IMPLICIT*/someNum];
+}
+''');
+    await check();
+  }
+
+  test_map_ifElement_dynamicCondition_disableImplicitCasts() async {
+    addFile(r'''
+dynamic c;
+void main() {
+  <int, int>{if (/*error:NON_BOOL_CONDITION*/c) 0: 0};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_map_ifElement_dynamicCondition_implicitCasts() async {
+    addFile(r'''
+dynamic c;
+void main() {
+  <int, int>{if (/*info:DYNAMIC_CAST*/c) 0: 0};
+}
+''');
+    await check();
+  }
+
+  test_map_ifElement_falseBranch_dynamicKey_disableImplicitCasts() async {
+    addFile(r'''
+bool c;
+dynamic dyn;
+void main() {
+  <int, int>{if (c) 0:0 else /*error:MAP_KEY_TYPE_NOT_ASSIGNABLE*/dyn:0};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_map_ifElement_falseBranch_dynamicKey_implicitCasts() async {
+    addFile(r'''
+bool c;
+dynamic dyn;
+void main() {
+  <int, int>{if (c) 0:0 else /*info:DYNAMIC_CAST*/dyn:0};
+}
+''');
+    await check();
+  }
+
+  test_map_ifElement_falseBranch_dynamicValue_disableImplicitCasts() async {
+    addFile(r'''
+bool c;
+dynamic dyn;
+void main() {
+  <int, int>{if (c) 0:0 else 0:/*error:MAP_VALUE_TYPE_NOT_ASSIGNABLE*/dyn};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_map_ifElement_falseBranch_dynamicValue_implicitCasts() async {
+    addFile(r'''
+bool c;
+dynamic dyn;
+void main() {
+  <int, int>{if (c) 0:0 else 0:/*info:DYNAMIC_CAST*/dyn};
+}
+''');
+    await check();
+  }
+
+  test_map_ifElement_falseBranch_supertypeKey_disableImplicitCasts() async {
+    addFile(r'''
+bool c;
+num someNum;
+void main() {
+  <int, int>{if (c) 0:0 else /*error:MAP_KEY_TYPE_NOT_ASSIGNABLE*/someNum:0};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_map_ifElement_falseBranch_supertypeKey_implicitCasts() async {
+    addFile(r'''
+bool c;
+num someNum;
+void main() {
+  <int, int>{if (c) 0:0 else /*info:DOWN_CAST_IMPLICIT*/someNum:0};
+}
+''');
+    await check();
+  }
+
+  test_map_ifElement_falseBranch_supertypeValue_disableImplicitCasts() async {
+    addFile(r'''
+bool c;
+num someNum;
+void main() {
+  <int, int>{if (c) 0:0 else 0:/*error:MAP_VALUE_TYPE_NOT_ASSIGNABLE*/someNum};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_map_ifElement_falseBranch_supertypeValue_implicitCasts() async {
+    addFile(r'''
+bool c;
+num someNum;
+void main() {
+  <int, int>{if (c) 0:0 else 0:/*info:DOWN_CAST_IMPLICIT*/someNum};
+}
+''');
+    await check();
+  }
+
+  test_map_ifElement_objectCondition_disableImplicitCasts() async {
+    addFile(r'''
+Object c;
+void main() {
+  <int, int>{if (/*error:NON_BOOL_CONDITION*/c) 0: 0};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_map_ifElement_objectCondition_implicitCasts() async {
+    addFile(r'''
+Object c;
+void main() {
+  <int, int>{if (/*info:DOWN_CAST_IMPLICIT*/c) 0: 0};
+}
+''');
+    await check();
+  }
+
+  test_map_ifElement_trueBranch_dynamicKey_disableImplicitCasts() async {
+    addFile(r'''
+bool c;
+dynamic dyn;
+void main() {
+  <int, int>{if (c) /*error:MAP_KEY_TYPE_NOT_ASSIGNABLE*/dyn:0 else 0:0};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_map_ifElement_trueBranch_dynamicKey_implicitCasts() async {
+    addFile(r'''
+bool c;
+dynamic dyn;
+void main() {
+  <int, int>{if (c) /*info:DYNAMIC_CAST*/dyn:0 else 0:0};
+}
+''');
+    await check();
+  }
+
+  test_map_ifElement_trueBranch_dynamicValue_disableImplicitCasts() async {
+    addFile(r'''
+bool c;
+dynamic dyn;
+void main() {
+  <int, int>{if (c) 0:/*error:MAP_VALUE_TYPE_NOT_ASSIGNABLE*/dyn else 0:0};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_map_ifElement_trueBranch_dynamicValue_implicitCasts() async {
+    addFile(r'''
+bool c;
+dynamic dyn;
+void main() {
+  <int, int>{if (c) 0:/*info:DYNAMIC_CAST*/dyn else 0:0};
+}
+''');
+    await check();
+  }
+
+  test_map_ifElement_trueBranch_supertypeKey_disableImplicitCasts() async {
+    addFile(r'''
+bool c;
+num someNum;
+void main() {
+  <int, int>{if (c) /*error:MAP_KEY_TYPE_NOT_ASSIGNABLE*/someNum:0 else 0:0};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_map_ifElement_trueBranch_supertypeKey_implicitCasts() async {
+    addFile(r'''
+bool c;
+num someNum;
+void main() {
+  <int, int>{if (c) /*info:DOWN_CAST_IMPLICIT*/someNum:0 else 0:0};
+}
+''');
+    await check();
+  }
+
+  test_map_ifElement_trueBranch_supertypeValue_disableImplicitCasts() async {
+    addFile(r'''
+bool c;
+num someNum;
+void main() {
+  <int, int>{if (c) 0:/*error:MAP_VALUE_TYPE_NOT_ASSIGNABLE*/someNum else 0:0};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_map_ifElement_trueBranch_supertypeValue_implicitCasts() async {
+    addFile(r'''
+bool c;
+num someNum;
+void main() {
+  <int, int>{if (c) 0:/*info:DOWN_CAST_IMPLICIT*/someNum else 0:0};
+}
+''');
+    await check();
+  }
+
+  test_set_ifElement_dynamicCondition_disableImplicitCasts() async {
+    addFile(r'''
+dynamic c;
+void main() {
+  <int>{if (/*error:NON_BOOL_CONDITION*/c) 0};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_set_ifElement_dynamicCondition_implicitCasts() async {
+    addFile(r'''
+dynamic c;
+void main() {
+  <int>{if (/*info:DYNAMIC_CAST*/c) 0};
+}
+''');
+    await check();
+  }
+
+  test_set_ifElement_falseBranch_dynamic_disableImplicitCasts() async {
+    addFile(r'''
+bool c;
+dynamic dyn;
+void main() {
+  <int>{if (c) 0 else /*error:SET_ELEMENT_TYPE_NOT_ASSIGNABLE*/dyn};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_set_ifElement_falseBranch_dynamic_implicitCasts() async {
+    addFile(r'''
+bool c;
+dynamic dyn;
+void main() {
+  <int>{if (c) 0 else /*info:DYNAMIC_CAST*/dyn};
+}
+''');
+    await check();
+  }
+
+  test_set_ifElement_falseBranch_supertype_disableImplicitCasts() async {
+    addFile(r'''
+bool c;
+num someNum;
+void main() {
+  <int>{if (c) 0 else /*error:SET_ELEMENT_TYPE_NOT_ASSIGNABLE*/someNum};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_set_ifElement_falseBranch_supertype_implicitCasts() async {
+    addFile(r'''
+bool c;
+num someNum;
+void main() {
+  <int>{if (c) 0 else /*info:DOWN_CAST_IMPLICIT*/someNum};
+}
+''');
+    await check();
+  }
+
+  test_set_ifElement_objectCondition_disableImplicitCasts() async {
+    addFile(r'''
+Object c;
+void main() {
+  <int>{if (/*error:NON_BOOL_CONDITION*/c) 0};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_set_ifElement_objectCondition_implicitCasts() async {
+    addFile(r'''
+Object c;
+void main() {
+  <int>{if (/*info:DOWN_CAST_IMPLICIT*/c) 0};
+}
+''');
+    await check();
+  }
+
+  test_set_ifElement_trueBranch_dynamic_disableImplicitCasts() async {
+    addFile(r'''
+bool c;
+dynamic dyn;
+void main() {
+  <int>{if (c) /*error:SET_ELEMENT_TYPE_NOT_ASSIGNABLE*/dyn};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_set_ifElement_trueBranch_dynamic_implicitCasts() async {
+    addFile(r'''
+bool c;
+dynamic dyn;
+void main() {
+  <int>[if (c) /*info:DYNAMIC_CAST*/dyn];
+}
+''');
+    await check();
+  }
+
+  test_set_ifElement_trueBranch_supertype_disableImplicitCasts() async {
+    addFile(r'''
+bool c;
+num someNum;
+void main() {
+  <int>{if (c) /*error:SET_ELEMENT_TYPE_NOT_ASSIGNABLE*/someNum};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_set_ifElement_trueBranch_supertype_implicitCasts() async {
+    addFile(r'''
+bool c;
+num someNum;
+void main() {
+  <int>{if (c) /*info:DOWN_CAST_IMPLICIT*/someNum};
+}
+''');
+    await check();
+  }
+
+  @failingTest
+  test_spread_dynamicInList_disableImplicitCasts() async {
+    // TODO(mfairhurst) fix this, see https://github.com/dart-lang/sdk/issues/36267
+    addFile(r'''
+dynamic dyn;
+void main() {
+  [.../*error:INVALID_ASSIGNMENT*/dyn];
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_spread_dynamicInList_implicitCasts() async {
+    addFile(r'''
+dynamic dyn;
+void main() {
+  [.../*info:DYNAMIC_CAST*/dyn];
+}
+''');
+    await check();
+  }
+
+  @failingTest
+  test_spread_dynamicInMap_disableImplicitCasts() async {
+    // TODO(mfairhurst) fix this, see https://github.com/dart-lang/sdk/issues/36267
+    addFile(r'''
+dynamic dyn;
+void main() {
+  <dynamic, dynamic>{.../*error:INVALID_ASSIGNMENT*/dyn};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_spread_dynamicInMap_implicitCasts() async {
+    addFile(r'''
+dynamic dyn;
+void main() {
+  <dynamic, dynamic>{.../*info:DYNAMIC_CAST*/dyn};
+}
+''');
+    await check();
+  }
+
+  @failingTest
+  test_spread_dynamicInSet_disableImplicitCasts() async {
+    // TODO(mfairhurst) fix this, see https://github.com/dart-lang/sdk/issues/36267
+    addFile(r'''
+dynamic dyn;
+void main() {
+  <dynamic>{.../*error:INVALID_ASSIGNMENT*/dyn};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_spread_dynamicInSet_implicitCasts() async {
+    addFile(r'''
+dynamic dyn;
+void main() {
+  <dynamic>{.../*info:DYNAMIC_CAST*/dyn};
+}
+''');
+    await check();
+  }
+
+  test_spread_listElement_disableImplicitCasts() async {
+    addFile(r'''
+Iterable<num> i;
+void main() {
+  <int>[.../*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/i];
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_spread_listElement_implicitCasts() async {
+    addFile(r'''
+Iterable<num> i;
+void main() {
+  <int>[.../*info:DOWN_CAST_IMPLICIT*/i];
+}
+''');
+    await check();
+  }
+
+  test_spread_mapKey_disableImplicitCasts() async {
+    addFile(r'''
+Map<num, dynamic> map;
+void main() {
+  <int, dynamic>{1: 2, .../*error:MAP_KEY_TYPE_NOT_ASSIGNABLE*/map};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_spread_mapKey_implicitCasts() async {
+    addFile(r'''
+Map<num, dynamic> map;
+void main() {
+  <int, dynamic>{1: 2, .../*info:DOWN_CAST_IMPLICIT*/map};
+}
+''');
+    await check();
+  }
+
+  test_spread_mapValue_disableImplicitCasts() async {
+    addFile(r'''
+Map<dynamic, num> map;
+void main() {
+  <dynamic, int>{1: 2, .../*error:MAP_VALUE_TYPE_NOT_ASSIGNABLE*/map};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_spread_mapValue_implicitCasts() async {
+    addFile(r'''
+Map<dynamic, num> map;
+void main() {
+  <dynamic, int>{1: 2, .../*info:DOWN_CAST_IMPLICIT*/map};
+}
+''');
+    await check();
+  }
+
+  test_spread_setElement_disableImplicitCasts() async {
+    addFile(r'''
+Iterable<num> i;
+void main() {
+  <int>{.../*error:SET_ELEMENT_TYPE_NOT_ASSIGNABLE*/i};
+}
+''');
+    await check(implicitCasts: false);
+  }
+
+  test_spread_setElement_implicitCasts() async {
+    addFile(r'''
+Iterable<num> i;
+void main() {
+  <int>{.../*info:DOWN_CAST_IMPLICIT*/i};
+}
+''');
+    await check();
+  }
 }
diff --git a/pkg/analyzer/test/src/task/strong/dart2_inference_test.dart b/pkg/analyzer/test/src/task/strong/dart2_inference_test.dart
index 0036bd3..c2960c3 100644
--- a/pkg/analyzer/test/src/task/strong/dart2_inference_test.dart
+++ b/pkg/analyzer/test/src/task/strong/dart2_inference_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -28,9 +28,6 @@
   @override
   AnalysisOptions get defaultAnalysisOptions => new AnalysisOptionsImpl();
 
-  @override
-  bool get enableNewAnalysisDriver => true;
-
   test_bool_assert() async {
     var code = r'''
 T f<T>() => null;
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 80c62f1..4a036db 100644
--- a/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
+++ b/pkg/analyzer/test/src/task/strong/inferred_type_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -6,7 +6,6 @@
 
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:test/test.dart';
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
@@ -16,7 +15,7 @@
 
 void main() {
   defineReflectiveSuite(() {
-    defineReflectiveTests(InferredTypeTest_Driver);
+    defineReflectiveTests(InferredTypeTest);
     defineReflectiveTests(InferredTypeTest_SetLiterals);
   });
 }
@@ -1309,7 +1308,7 @@
   test_downwardsInferenceOnListLiterals_inferDownwards() async {
     await checkFileElement('''
 void foo([List<String> list1 = /*info:INFERRED_TYPE_LITERAL*/const [],
-          List<String> list2 = /*info:INFERRED_TYPE_LITERAL*/const [/*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE,error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/42]]) {
+          List<String> list2 = /*info:INFERRED_TYPE_LITERAL*/const [/*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/42]]) {
 }
 
 void main() {
@@ -1340,8 +1339,8 @@
   {
     const List<int> c0 = /*info:INFERRED_TYPE_LITERAL*/const [];
     const List<int> c1 = /*info:INFERRED_TYPE_LITERAL*/const [3];
-    const List<int> c2 = /*info:INFERRED_TYPE_LITERAL*/const [/*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE,error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello"];
-    const List<int> c3 = /*info:INFERRED_TYPE_LITERAL*/const [/*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE,error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello", 3];
+    const List<int> c2 = /*info:INFERRED_TYPE_LITERAL*/const [/*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello"];
+    const List<int> c3 = /*info:INFERRED_TYPE_LITERAL*/const [/*error:LIST_ELEMENT_TYPE_NOT_ASSIGNABLE*/"hello", 3];
   }
 }
 ''');
@@ -1411,7 +1410,7 @@
 void foo([Map<int, String> m1 = /*info:INFERRED_TYPE_LITERAL*/const {1: "hello"},
     Map<int, String> m2 = /*info:INFERRED_TYPE_LITERAL*/const {
       // One error is from type checking and the other is from const evaluation.
-      /*error:MAP_KEY_TYPE_NOT_ASSIGNABLE,error:MAP_KEY_TYPE_NOT_ASSIGNABLE*/"hello":
+      /*error:MAP_KEY_TYPE_NOT_ASSIGNABLE*/"hello":
           "world"
     }]) {
 }
@@ -1432,11 +1431,11 @@
     };
   }
   {
-    Map<dynamic, dynamic> l0 = {};
-    Map<dynamic, dynamic> l1 = {3: "hello"};
-    Map<dynamic, dynamic> l2 = {"hello": "hello"};
-    Map<dynamic, dynamic> l3 = {3: 3};
-    Map<dynamic, dynamic> l4 = {3:"hello", "hello": 3};
+    Map<dynamic, dynamic> l0 = /*info:INFERRED_TYPE_LITERAL*/{};
+    Map<dynamic, dynamic> l1 = /*info:INFERRED_TYPE_LITERAL*/{3: "hello"};
+    Map<dynamic, dynamic> l2 = /*info:INFERRED_TYPE_LITERAL*/{"hello": "hello"};
+    Map<dynamic, dynamic> l3 = /*info:INFERRED_TYPE_LITERAL*/{3: 3};
+    Map<dynamic, dynamic> l4 = /*info:INFERRED_TYPE_LITERAL*/{3:"hello", "hello": 3};
   }
   {
     Map<dynamic, String> l0 = /*info:INFERRED_TYPE_LITERAL*/{};
@@ -1471,16 +1470,16 @@
     const Map<int, String> l0 = /*info:INFERRED_TYPE_LITERAL*/const {};
     const Map<int, String> l1 = /*info:INFERRED_TYPE_LITERAL*/const {3: "hello"};
     const Map<int, String> l2 = /*info:INFERRED_TYPE_LITERAL*/const {
-      /*error:MAP_KEY_TYPE_NOT_ASSIGNABLE,error:MAP_KEY_TYPE_NOT_ASSIGNABLE*/"hello":
+      /*error:MAP_KEY_TYPE_NOT_ASSIGNABLE*/"hello":
           "hello"
     };
     const Map<int, String> l3 = /*info:INFERRED_TYPE_LITERAL*/const {
-      3: /*error:MAP_VALUE_TYPE_NOT_ASSIGNABLE,error:MAP_VALUE_TYPE_NOT_ASSIGNABLE*/3
+      3: /*error:MAP_VALUE_TYPE_NOT_ASSIGNABLE*/3
     };
     const Map<int, String> l4 = /*info:INFERRED_TYPE_LITERAL*/const {
       3:"hello",
-      /*error:MAP_KEY_TYPE_NOT_ASSIGNABLE,error:MAP_KEY_TYPE_NOT_ASSIGNABLE*/"hello":
-          /*error:MAP_VALUE_TYPE_NOT_ASSIGNABLE,error:MAP_VALUE_TYPE_NOT_ASSIGNABLE*/3
+      /*error:MAP_KEY_TYPE_NOT_ASSIGNABLE*/"hello":
+          /*error:MAP_VALUE_TYPE_NOT_ASSIGNABLE*/3
     };
   }
 }
@@ -1505,7 +1504,7 @@
 Iterable<Map<int, int>> bar() sync* {
   yield /*info:INFERRED_TYPE_LITERAL*/{};
   yield /*error:YIELD_OF_INVALID_TYPE*/new List();
-  yield* {};
+  yield* /*info:INFERRED_TYPE_LITERAL*/{};
   yield* /*info:INFERRED_TYPE_ALLOCATION*/new List();
 }
 ''');
@@ -2547,13 +2546,13 @@
   b = /*error:INVALID_ASSIGNMENT*/"hi";
   b = new B(3);
   c1 = [];
-  c1 = /*error:INVALID_ASSIGNMENT*/{};
+  c1 = /*error:INVALID_ASSIGNMENT,info:INFERRED_TYPE_LITERAL*/{};
   c2 = [];
-  c2 = /*error:INVALID_ASSIGNMENT*/{};
-  d = {};
+  c2 = /*error:INVALID_ASSIGNMENT,info:INFERRED_TYPE_LITERAL*/{};
+  d = /*info:INFERRED_TYPE_LITERAL*/{};
   d = /*error:INVALID_ASSIGNMENT*/3;
   e = new A();
-  e = /*error:INVALID_ASSIGNMENT*/{};
+  e = /*error:INVALID_ASSIGNMENT,info:INFERRED_TYPE_LITERAL*/{};
   f = 3;
   f = /*error:INVALID_ASSIGNMENT*/false;
   g = 1;
@@ -4394,75 +4393,6 @@
 @reflectiveTest
 class InferredTypeTest extends AbstractStrongTest with InferredTypeMixin {
   @override
-  bool get mayCheckTypesOfLocals => true;
-
-  @override
-  Future<CompilationUnitElement> checkFileElement(String content) async {
-    CompilationUnit unit = await checkFile(content);
-    return unit.declaredElement;
-  }
-
-  @override
-  @failingTest
-  test_circularReference_viaClosures() {
-    return super.test_circularReference_viaClosures();
-  }
-
-  @override
-  @failingTest
-  test_circularReference_viaClosures_initializerTypes() {
-    return super.test_circularReference_viaClosures_initializerTypes();
-  }
-
-  @override
-  @failingTest
-  test_instantiateToBounds_typeName_error1() {
-    // Test doesn't work with the old task model
-    return super.test_instantiateToBounds_typeName_error1();
-  }
-
-  @override
-  @failingTest
-  test_instantiateToBounds_typeName_error2() {
-    // Test doesn't work with the old task model
-    return super.test_instantiateToBounds_typeName_error2();
-  }
-
-  @override
-  @failingTest
-  test_instantiateToBounds_typeName_error3() {
-    // Test doesn't work with the old task model
-    return super.test_instantiateToBounds_typeName_error3();
-  }
-
-  @override
-  @failingTest
-  test_instantiateToBounds_typeName_OK_hasBound_definedAfter() {
-    return super.test_instantiateToBounds_typeName_OK_hasBound_definedAfter();
-  }
-
-  @override
-  @failingTest
-  test_unsafeBlockClosureInference_functionCall_explicitDynamicParam_viaExpr1() {
-    return super
-        .test_unsafeBlockClosureInference_functionCall_explicitDynamicParam_viaExpr1();
-  }
-
-  @failingTest
-  @override
-  test_unsafeBlockClosureInference_functionCall_explicitTypeParam_viaExpr1() {
-    return super
-        .test_unsafeBlockClosureInference_functionCall_explicitTypeParam_viaExpr1();
-  }
-}
-
-@reflectiveTest
-class InferredTypeTest_Driver extends AbstractStrongTest
-    with InferredTypeMixin {
-  @override
-  bool get enableNewAnalysisDriver => true;
-
-  @override
   bool get hasExtraTaskModelPass => false;
 
   @override
@@ -4493,12 +4423,6 @@
 class InferredTypeTest_SetLiterals extends AbstractStrongTest
     with InferredTypeMixin {
   @override
-  List<String> get enabledExperiments => [EnableString.set_literals];
-
-  @override
-  bool get enableNewAnalysisDriver => true;
-
-  @override
   bool get hasExtraTaskModelPass => false;
 
   @override
@@ -4531,7 +4455,7 @@
 Iterable<Map<int, int>> bar() sync* {
   yield /*info:INFERRED_TYPE_LITERAL*/{};
   yield /*error:YIELD_OF_INVALID_TYPE*/new List();
-  yield* {};
+  yield* /*info:INFERRED_TYPE_LITERAL*/{};
   yield* /*info:INFERRED_TYPE_ALLOCATION*/new List();
 }
 ''');
diff --git a/pkg/analyzer/test/src/task/strong/strong_test_helper.dart b/pkg/analyzer/test/src/task/strong/strong_test_helper.dart
index 521f759..03726eb 100644
--- a/pkg/analyzer/test/src/task/strong/strong_test_helper.dart
+++ b/pkg/analyzer/test/src/task/strong/strong_test_helper.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -12,9 +12,7 @@
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/error/error.dart';
-import 'package:analyzer/error/listener.dart';
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/file_system/memory_file_system.dart';
 import 'package:analyzer/source/error_processor.dart';
 import 'package:analyzer/src/dart/analysis/byte_store.dart';
 import 'package:analyzer/src/dart/analysis/driver.dart';
@@ -25,6 +23,7 @@
 import 'package:analyzer/src/file_system/file_system.dart';
 import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/source.dart';
+import 'package:analyzer/src/source/package_map_resolver.dart';
 import 'package:analyzer/src/test_utilities/mock_sdk.dart';
 import 'package:analyzer/src/test_utilities/resource_provider_mixin.dart';
 import 'package:source_span/source_span.dart';
@@ -78,7 +77,7 @@
 }
 
 void _expectErrors(AnalysisOptions analysisOptions, CompilationUnit unit,
-    List<AnalysisError> actualErrors) {
+    Iterable<AnalysisError> actualErrors) {
   var expectedErrors = _findExpectedErrors(unit.beginToken);
 
   var actualMap = new SplayTreeMap<int, List<AnalysisError>>();
@@ -238,15 +237,15 @@
 }
 
 class AbstractStrongTest with ResourceProviderMixin {
-  bool _checkCalled = false;
+  bool _checkCalled = true;
 
   AnalysisContext _context = null;
   AnalysisDriver _driver = null;
 
-  bool get enableNewAnalysisDriver => false;
-
   List<String> get enabledExperiments => [];
 
+  Map<String, List<Folder>> packageMap;
+
   /// Adds a file to check. The file should contain:
   ///
   ///   * all expected failures are listed in the source code using comments
@@ -266,8 +265,9 @@
   ///
   /// For a single file, you may also use [checkFile].
   void addFile(String content, {String name: '/main.dart'}) {
-    name = name.replaceFirst('^package:', '/packages/');
+    name = name.replaceFirst(RegExp('^package:'), '/packages/');
     newFile(name, content: content);
+    _checkCalled = false;
   }
 
   /// Run the checker on a program, staring from '/main.dart', and verifies that
@@ -278,7 +278,10 @@
   ///
   /// Returns the main resolved library. This can be used for further checks.
   Future<CompilationUnit> check(
-      {bool implicitCasts: true, bool implicitDynamic: true}) async {
+      {bool implicitCasts: true,
+      bool implicitDynamic: true,
+      bool strictInference: false,
+      bool strictRawTypes: false}) async {
     _checkCalled = true;
 
     File mainFile = getFile('/main.dart');
@@ -288,58 +291,66 @@
     analysisOptions.strongModeHints = true;
     analysisOptions.implicitCasts = implicitCasts;
     analysisOptions.implicitDynamic = implicitDynamic;
+    analysisOptions.strictInference = strictInference;
+    analysisOptions.strictRawTypes = strictRawTypes;
     analysisOptions.enabledExperiments = enabledExperiments;
 
     var mockSdk = new MockSdk(resourceProvider: resourceProvider);
     mockSdk.context.analysisOptions = analysisOptions;
 
-    SourceFactory sourceFactory;
-    {
-      var uriResolver = new _TestUriResolver(resourceProvider);
-      sourceFactory =
-          new SourceFactory([new DartUriResolver(mockSdk), uriResolver]);
-    }
+    SourceFactory sourceFactory = new SourceFactory([
+      new DartUriResolver(mockSdk),
+      new PackageMapUriResolver(resourceProvider, packageMap),
+      new ResourceUriResolver(resourceProvider),
+    ]);
 
     CompilationUnit mainUnit;
-    if (enableNewAnalysisDriver) {
-      StringBuffer logBuffer = new StringBuffer();
-      FileContentOverlay fileContentOverlay = new FileContentOverlay();
-      PerformanceLog log = new PerformanceLog(logBuffer);
-      AnalysisDriverScheduler scheduler = new AnalysisDriverScheduler(log);
-      _driver = new AnalysisDriver(
-          scheduler,
-          log,
-          resourceProvider,
-          new MemoryByteStore(),
-          fileContentOverlay,
-          null,
-          sourceFactory,
-          analysisOptions);
-      scheduler.start();
+    StringBuffer logBuffer = new StringBuffer();
+    FileContentOverlay fileContentOverlay = new FileContentOverlay();
+    PerformanceLog log = new PerformanceLog(logBuffer);
+    AnalysisDriverScheduler scheduler = new AnalysisDriverScheduler(log);
+    _driver = new AnalysisDriver(
+        scheduler,
+        log,
+        resourceProvider,
+        new MemoryByteStore(),
+        fileContentOverlay,
+        null,
+        sourceFactory,
+        analysisOptions);
+    scheduler.start();
 
-      mainUnit = (await _driver.getResult(mainFile.path)).unit;
-    } else {
-      _context = AnalysisEngine.instance.createAnalysisContext();
-      _context.analysisOptions = analysisOptions;
-      _context.sourceFactory = sourceFactory;
+    mainUnit = (await _driver.getResult(mainFile.path)).unit;
 
-      // Run the checker on /main.dart.
-      Source mainSource = sourceFactory.forUri2(mainFile.toUri());
-      mainUnit = _context.resolveCompilationUnit2(mainSource, mainSource);
+    bool isRelevantError(AnalysisError error) {
+      var code = error.errorCode;
+      // We don't care about these.
+      if (code == HintCode.UNUSED_ELEMENT ||
+          code == HintCode.UNUSED_FIELD ||
+          code == HintCode.UNUSED_IMPORT ||
+          code == HintCode.UNUSED_LOCAL_VARIABLE ||
+          code == TodoCode.TODO) {
+        return false;
+      }
+      if (strictInference || strictRawTypes) {
+        // When testing strict-inference or strict-raw-types, ignore anything
+        // else.
+        return code.errorSeverity.ordinal > ErrorSeverity.INFO.ordinal ||
+            code == HintCode.INFERENCE_FAILURE_ON_COLLECTION_LITERAL ||
+            code == HintCode.INFERENCE_FAILURE_ON_INSTANCE_CREATION ||
+            code == HintCode.STRICT_RAW_TYPE;
+      }
+      return true;
     }
 
-    var collector = new _ErrorCollector(analysisOptions);
-
     // Extract expectations from the comments in the test files, and
     // check that all errors we emit are included in the expected map.
     LibraryElement mainLibrary =
         resolutionMap.elementDeclaredByCompilationUnit(mainUnit).library;
     Set<LibraryElement> allLibraries = _reachableLibraries(mainLibrary);
+
     for (LibraryElement library in allLibraries) {
       for (CompilationUnitElement unit in library.units) {
-        var errors = <AnalysisError>[];
-        collector.errors = errors;
-
         var source = unit.source;
         if (source.uri.scheme == 'dart') {
           continue;
@@ -347,13 +358,8 @@
 
         var analysisResult = await _resolve(source);
 
-        errors.addAll(analysisResult.errors.where((e) =>
-            // We don't care about any of these:
-            e.errorCode != HintCode.UNUSED_ELEMENT &&
-            e.errorCode != HintCode.UNUSED_FIELD &&
-            e.errorCode != HintCode.UNUSED_IMPORT &&
-            e.errorCode != HintCode.UNUSED_LOCAL_VARIABLE &&
-            e.errorCode != TodoCode.TODO));
+        Iterable<AnalysisError> errors =
+            analysisResult.errors.where(isRelevantError);
         _expectErrors(analysisOptions, analysisResult.unit, errors);
       }
     }
@@ -374,7 +380,9 @@
   }
 
   void setUp() {
-    AnalysisEngine.instance.processRequiredPlugins();
+    packageMap = {
+      'meta': [getFolder('/.pub-cache/meta/lib')],
+    };
   }
 
   void tearDown() {
@@ -386,31 +394,8 @@
   }
 
   Future<_TestAnalysisResult> _resolve(Source source) async {
-    if (enableNewAnalysisDriver) {
-      var result = await _driver.getResult(source.fullName);
-      return new _TestAnalysisResult(source, result.unit, result.errors);
-    } else {
-      List<Source> libraries = _context.getLibrariesContaining(source);
-      var unit = _context.resolveCompilationUnit2(source, libraries.single);
-      var errors = _context.computeErrors(source);
-      return new _TestAnalysisResult(source, unit, errors);
-    }
-  }
-}
-
-class _ErrorCollector implements AnalysisErrorListener {
-  final AnalysisOptions analysisOptions;
-  List<AnalysisError> errors;
-  final bool hints;
-
-  _ErrorCollector(this.analysisOptions, {this.hints: true});
-
-  void onError(AnalysisError error) {
-    // Unless DDC hints are requested, filter them out.
-    var HINT = ErrorSeverity.INFO.ordinal;
-    if (hints || _errorSeverity(analysisOptions, error).ordinal > HINT) {
-      errors.add(error);
-    }
+    var result = await _driver.getResult(source.fullName);
+    return new _TestAnalysisResult(source, result.unit, result.errors);
   }
 }
 
@@ -464,20 +449,3 @@
   final List<AnalysisError> errors;
   _TestAnalysisResult(this.source, this.unit, this.errors);
 }
-
-class _TestUriResolver extends ResourceUriResolver {
-  final MemoryResourceProvider provider;
-  _TestUriResolver(provider)
-      : provider = provider,
-        super(provider);
-
-  @override
-  Source resolveAbsolute(Uri uri, [Uri actualUri]) {
-    if (uri.scheme == 'package') {
-      return (provider.getResource(
-              provider.convertPath('/packages/' + uri.path)) as File)
-          .createSource(uri);
-    }
-    return super.resolveAbsolute(uri, actualUri);
-  }
-}
diff --git a/pkg/analyzer/test/src/task/strong/test_all.dart b/pkg/analyzer/test/src/task/strong/test_all.dart
index cf07437..69e4bd3 100644
--- a/pkg/analyzer/test/src/task/strong/test_all.dart
+++ b/pkg/analyzer/test/src/task/strong/test_all.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/task/test_all.dart b/pkg/analyzer/test/src/task/test_all.dart
index f8f989c5..d6f96c1f 100644
--- a/pkg/analyzer/test/src/task/test_all.dart
+++ b/pkg/analyzer/test/src/task/test_all.dart
@@ -4,27 +4,12 @@
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'dart_work_manager_test.dart' as dart_work_manager_test;
-import 'general_test.dart' as general_test;
-import 'html_work_manager_test.dart' as html_work_manager_test;
-import 'inputs_test.dart' as inputs_test;
-import 'manager_test.dart' as manager_test;
-import 'model_test.dart' as model_test;
 import 'options_test.dart' as options_test;
-import 'options_work_manager_test.dart' as options_work_manager_test;
 import 'strong/test_all.dart' as strong_mode_test_all;
 
-/// Utility for manually running all tests.
 main() {
   defineReflectiveSuite(() {
-    dart_work_manager_test.main();
-    general_test.main();
-    html_work_manager_test.main();
-    inputs_test.main();
-    manager_test.main();
-    model_test.main();
     options_test.main();
-    options_work_manager_test.main();
     strong_mode_test_all.main();
   }, name: 'task');
 }
diff --git a/pkg/analyzer/test/src/task/test_support.dart b/pkg/analyzer/test/src/task/test_support.dart
deleted file mode 100644
index 7415324..0000000
--- a/pkg/analyzer/test/src/task/test_support.dart
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analyzer/exception/exception.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/task/api/model.dart';
-
-/**
- * A configurable analysis task that can be used by tests.
- */
-class TestAnalysisTask extends AnalysisTask {
-  /**
-   * The descriptor describing this task.
-   */
-  TaskDescriptor descriptor;
-
-  /**
-   * The exception that is to be "thrown" by this task.
-   */
-  CaughtException exception;
-
-  /**
-   * The results whose values are to be provided as outputs from this task.
-   */
-  List<ResultDescriptor> results;
-
-  /**
-   * The next value that is to be used for a result.
-   */
-  int value;
-
-  @override
-  final bool handlesDependencyCycles;
-
-  TestAnalysisTask(AnalysisContext context, AnalysisTarget target,
-      {this.descriptor,
-      this.exception,
-      this.handlesDependencyCycles: false,
-      this.results,
-      this.value: 1})
-      : super(context, target);
-
-  @override
-  String get description => 'Test task';
-
-  @override
-  internalPerform() {
-    if (exception != null) {
-      caughtException = exception;
-    } else if (results != null) {
-      for (ResultDescriptor result in results) {
-        outputs[result] = value++;
-      }
-    } else if (descriptor != null) {
-      for (ResultDescriptor result in descriptor.results) {
-        outputs[result] = value++;
-      }
-    }
-  }
-}
diff --git a/pkg/analyzer/test/src/test_all.dart b/pkg/analyzer/test/src/test_all.dart
index 011e198..80fbf6b 100644
--- a/pkg/analyzer/test/src/test_all.dart
+++ b/pkg/analyzer/test/src/test_all.dart
@@ -7,30 +7,41 @@
 import 'command_line/test_all.dart' as command_line;
 import 'context/test_all.dart' as context;
 import 'dart/test_all.dart' as dart;
+import 'dartdoc/test_all.dart' as dartdoc;
 import 'diagnostics/test_all.dart' as diagnostics;
 import 'fasta/test_all.dart' as fasta;
+import 'hint/test_all.dart' as hint;
 import 'lint/test_all.dart' as lint;
+import 'manifest/test_all.dart' as manifest;
 import 'options/test_all.dart' as options;
 import 'pubspec/test_all.dart' as pubspec;
+import 'services/test_all.dart' as services;
 import 'source/test_all.dart' as source;
 import 'summary/test_all.dart' as summary;
+import 'summary2/test_all.dart' as summary2;
 import 'task/test_all.dart' as task;
 import 'util/test_all.dart' as util;
+import 'workspace/test_all.dart' as workspace;
 
-/// Utility for manually running all tests.
 main() {
   defineReflectiveSuite(() {
     command_line.main();
     context.main();
     dart.main();
+    dartdoc.main();
     diagnostics.main();
     fasta.main();
+    hint.main();
     lint.main();
+    manifest.main();
     options.main();
     pubspec.main();
+    services.main();
     source.main();
     summary.main();
+    summary2.main();
     task.main();
     util.main();
+    workspace.main();
   }, name: 'src');
 }
diff --git a/pkg/analyzer/test/src/util/yaml_test.dart b/pkg/analyzer/test/src/util/yaml_test.dart
index d184a38..683708e 100644
--- a/pkg/analyzer/test/src/util/yaml_test.dart
+++ b/pkg/analyzer/test/src/util/yaml_test.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/test/src/workspace/gn_test.dart b/pkg/analyzer/test/src/workspace/gn_test.dart
index 8cd0a5b..5d15441 100644
--- a/pkg/analyzer/test/src/workspace/gn_test.dart
+++ b/pkg/analyzer/test/src/workspace/gn_test.dart
@@ -42,8 +42,7 @@
     newFolder('/workspace/some/code');
     newFile('/workspace/some/code/pubspec.yaml');
     String buildDir = convertPath('out/debug-x87_128');
-    newFile('/workspace/.config',
-        content: 'FOO=foo\n' + 'FUCHSIA_BUILD_DIR="$buildDir"\n' + 'BAR=bar\n');
+    newFile('/workspace/.fx-build-dir', content: '$buildDir\n');
     newFile('/workspace/out/debug-x87_128/dartlang/gen/some/code/foo.packages');
     GnWorkspace workspace =
         GnWorkspace.find(resourceProvider, convertPath('/workspace/some/code'));
@@ -56,8 +55,7 @@
     newFolder('/workspace/some/code');
     newFile('/workspace/some/code/pubspec.yaml');
     String buildDir = convertPath('out/debug-x87_128');
-    newFile('/workspace/.config',
-        content: 'FOO=foo\n' + 'FUCHSIA_BUILD_DIR="$buildDir"\n' + 'BAR=bar\n');
+    newFile('/workspace/.fx-build-dir', content: '$buildDir\n');
     String packageLocation = convertPath('/workspace/this/is/the/package');
     Uri packageUri = resourceProvider.pathContext.toUri(packageLocation);
     newFile('/workspace/out/debug-x87_128/dartlang/gen/some/code/foo.packages',
@@ -75,8 +73,7 @@
     newFolder('/workspace/some/code');
     newFile('/workspace/some/code/pubspec.yaml');
     String buildDir = convertPath('/workspace/out/debug-x87_128');
-    newFile('/workspace/.config',
-        content: 'FOO=foo\n' + 'FUCHSIA_BUILD_DIR="$buildDir"\n' + 'BAR=bar\n');
+    newFile('/workspace/.fx-build-dir', content: '$buildDir\n');
     String packageLocation = convertPath('/workspace/this/is/the/package');
     Uri packageUri = resourceProvider.pathContext.toUri(packageLocation);
     newFile('/workspace/out/debug-x87_128/dartlang/gen/some/code/foo.packages',
@@ -109,7 +106,7 @@
     newFolder('/workspace/.jiri_root');
     newFolder('/workspace/some/code');
     newFile('/workspace/some/code/pubspec.yaml');
-    newFile('/workspace/.config', content: 'FOO=foo\n' + 'BAR=bar\n');
+    newFile('/workspace/.fx-build-dir', content: '');
     String packageLocation = convertPath('/workspace/this/is/the/package');
     Uri packageUri = resourceProvider.pathContext.toUri(packageLocation);
     newFile('/workspace/out/debug-x87_128/dartlang/gen/some/code/foo.packages',
@@ -127,8 +124,7 @@
     newFolder('/workspace/some/code');
     newFile('/workspace/some/code/pubspec.yaml');
     String buildDir = convertPath('out/release-y22_256');
-    newFile('/workspace/.config',
-        content: 'FOO=foo\n' + 'FUCHSIA_BUILD_DIR="$buildDir"\n' + 'BAR=bar\n');
+    newFile('/workspace/.fx-build-dir', content: '$buildDir\n');
     String packageLocation = convertPath('/workspace/this/is/the/package');
     Uri packageUri = resourceProvider.pathContext.toUri(packageLocation);
     newFile('/workspace/out/debug-x87_128/dartlang/gen/some/code/foo.packages',
@@ -152,8 +148,7 @@
     newFolder('/workspace/some/code');
     newFile('/workspace/some/code/pubspec.yaml');
     String buildDir = convertPath('out/debug-x87_128');
-    newFile('/workspace/.config',
-        content: 'FOO=foo\n' + 'FUCHSIA_BUILD_DIR=$buildDir\n' + 'BAR=bar\n');
+    newFile('/workspace/.fx-build-dir', content: '$buildDir\n');
     String packageOneLocation = convertPath('/workspace/this/is/the/package');
     Uri packageOneUri = resourceProvider.pathContext.toUri(packageOneLocation);
     newFile('/workspace/out/debug-x87_128/dartlang/gen/some/code/foo.packages',
@@ -179,8 +174,7 @@
   GnWorkspace _buildStandardGnWorkspace() {
     newFolder('/ws/.jiri_root');
     String buildDir = convertPath('out/debug-x87_128');
-    newFile('/ws/.config',
-        content: 'FOO=foo\n' + 'FUCHSIA_BUILD_DIR="$buildDir"\n' + 'BAR=bar\n');
+    newFile('/ws/.fx-build-dir', content: '$buildDir\n');
     newFile('/ws/out/debug-x87_128/dartlang/gen/some/code/foo.packages');
     newFolder('/ws/some/code');
     return GnWorkspace.find(resourceProvider, convertPath('/ws/some/code'));
diff --git a/pkg/analyzer/test/src/workspace/test_all.dart b/pkg/analyzer/test/src/workspace/test_all.dart
index c2e0512..edf5bd0 100644
--- a/pkg/analyzer/test/src/workspace/test_all.dart
+++ b/pkg/analyzer/test/src/workspace/test_all.dart
@@ -1,19 +1,21 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'basic_test.dart' as basic_test;
-import 'bazel_test.dart' as bazel_test;
-import 'gn_test.dart' as gn_test;
-import 'package_build_test.dart' as package_build_test;
+import 'basic_test.dart' as basic;
+import 'bazel_test.dart' as bazel;
+import 'gn_test.dart' as gn;
+import 'package_build_test.dart' as package_build;
+import 'pub_test.dart' as pub;
 
 main() {
   defineReflectiveSuite(() {
-    basic_test.main();
-    bazel_test.main();
-    gn_test.main();
-    package_build_test.main();
+    basic.main();
+    bazel.main();
+    gn.main();
+    package_build.main();
+    pub.main();
   }, name: 'workspace');
 }
diff --git a/pkg/analyzer/test/test_all.dart b/pkg/analyzer/test/test_all.dart
index d0c8dfd..a27c273 100644
--- a/pkg/analyzer/test/test_all.dart
+++ b/pkg/analyzer/test/test_all.dart
@@ -1,10 +1,10 @@
-// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:test_reflective_loader/test_reflective_loader.dart';
 
-import 'cancelable_future_test.dart' as cancelable_future_test;
+import 'cancelable_future_test.dart' as cancelable_future;
 import 'dart/test_all.dart' as dart;
 import 'error/test_all.dart' as error;
 import 'file_system/test_all.dart' as file_system;
@@ -13,11 +13,11 @@
 import 'parse_compilation_unit_test.dart' as parse_compilation_unit;
 import 'source/test_all.dart' as source;
 import 'src/test_all.dart' as src;
+import 'verify_tests_test.dart' as verify_tests;
 
-/// Utility for manually running all tests.
 main() {
   defineReflectiveSuite(() {
-    cancelable_future_test.main();
+    cancelable_future.main();
     dart.main();
     error.main();
     file_system.main();
@@ -26,5 +26,6 @@
     parse_compilation_unit.main();
     source.main();
     src.main();
+    verify_tests.main();
   }, name: 'analyzer');
 }
diff --git a/pkg/analyzer/test/util/ast_type_matchers.dart b/pkg/analyzer/test/util/ast_type_matchers.dart
index a56dddf..d47a240 100644
--- a/pkg/analyzer/test/util/ast_type_matchers.dart
+++ b/pkg/analyzer/test/util/ast_type_matchers.dart
@@ -111,13 +111,19 @@
 
 const isFieldFormalParameter = const TypeMatcher<FieldFormalParameter>();
 
-const isForEachStatement = const TypeMatcher<ForEachStatement>();
+/// TODO(paulberry): remove the explicit type `Matcher` once an SDK has been
+/// released that includes ba5644b76cb811e8f01ffb375b87d20d6295749c.
+final Matcher isForEachStatement = predicate(
+    (Object o) => o is ForStatement && o.forLoopParts is ForEachParts);
 
 const isFormalParameter = const TypeMatcher<FormalParameter>();
 
 const isFormalParameterList = const TypeMatcher<FormalParameterList>();
 
-const isForStatement = const TypeMatcher<ForStatement>();
+/// TODO(paulberry): remove the explicit type `Matcher` once an SDK has been
+/// released that includes ba5644b76cb811e8f01ffb375b87d20d6295749c.
+final Matcher isForStatement =
+    predicate((Object o) => o is ForStatement && o.forLoopParts is ForParts);
 
 const isFunctionBody = const TypeMatcher<FunctionBody>();
 
@@ -179,7 +185,10 @@
 
 const isLiteral = const TypeMatcher<Literal>();
 
-const isMapLiteral = const TypeMatcher<MapLiteral>();
+/// TODO(paulberry): remove the explicit type `Matcher` once an SDK has been
+/// released that includes ba5644b76cb811e8f01ffb375b87d20d6295749c.
+final Matcher isMapLiteral =
+    predicate((Object o) => o is SetOrMapLiteral && o.isMap);
 
 const isMapLiteralEntry = const TypeMatcher<MapLiteralEntry>();
 
@@ -234,7 +243,10 @@
 
 const isScriptTag = const TypeMatcher<ScriptTag>();
 
-const isSetLiteral = const TypeMatcher<SetLiteral>();
+/// TODO(paulberry): remove the explicit type `Matcher` once an SDK has been
+/// released that includes ba5644b76cb811e8f01ffb375b87d20d6295749c.
+final Matcher isSetLiteral =
+    predicate((Object o) => o is SetOrMapLiteral && o.isSet);
 
 const isShowCombinator = const TypeMatcher<ShowCombinator>();
 
diff --git a/pkg/analyzer/test/verify_tests_test.dart b/pkg/analyzer/test/verify_tests_test.dart
new file mode 100644
index 0000000..147ae8a
--- /dev/null
+++ b/pkg/analyzer/test/verify_tests_test.dart
@@ -0,0 +1,84 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/analysis/analysis_context.dart';
+import 'package:analyzer/dart/analysis/analysis_context_collection.dart';
+import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/dart/analysis/session.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/file_system/physical_file_system.dart';
+import 'package:front_end/src/testing/package_root.dart' as package_root;
+import 'package:path/path.dart' as path;
+import 'package:test/test.dart';
+
+main() {
+  PhysicalResourceProvider provider = PhysicalResourceProvider.INSTANCE;
+  String packageRoot = provider.pathContext.normalize(package_root.packageRoot);
+  String analyzerPath = provider.pathContext.join(packageRoot, 'analyzer');
+  String testDirPath = provider.pathContext.join(analyzerPath, 'test');
+
+  AnalysisContextCollection collection = new AnalysisContextCollection(
+      includedPaths: <String>[testDirPath], resourceProvider: provider);
+  List<AnalysisContext> contexts = collection.contexts;
+  if (contexts.length != 1) {
+    fail('The test directory contains multiple analysis contexts.');
+  }
+
+  buildTestsIn(
+      contexts[0].currentSession, testDirPath, provider.getFolder(testDirPath));
+}
+
+void buildTestsIn(
+    AnalysisSession session, String testDirPath, Folder directory) {
+  List<String> testFileNames = [];
+  File testAllFile;
+  List<Resource> children = directory.getChildren();
+  children.sort((first, second) => first.shortName.compareTo(second.shortName));
+  for (Resource child in children) {
+    if (child is Folder) {
+      if (child.getChildAssumingFile('test_all.dart').exists) {
+        testFileNames.add('${child.shortName}/test_all.dart');
+      }
+      buildTestsIn(session, testDirPath, child);
+    } else if (child is File) {
+      String name = child.shortName;
+      if (name == 'test_all.dart') {
+        testAllFile = child;
+      } else if (name.endsWith('_integration_test.dart')) {
+        // ignored
+      } else if (name.endsWith('_test.dart')) {
+        testFileNames.add(name);
+      }
+    }
+  }
+  String relativePath = path.relative(directory.path, from: testDirPath);
+  test(relativePath, () {
+    if (testFileNames.isEmpty) {
+      return;
+    }
+    if (testAllFile == null) {
+      fail('Missing "test_all.dart" in $relativePath');
+    }
+    ParsedUnitResult result = session.getParsedUnit(testAllFile.path);
+    if (result.state != ResultState.VALID) {
+      fail('Could not parse ${testAllFile.path}');
+    }
+    List<String> importedFiles = [];
+    for (var directive in result.unit.directives) {
+      if (directive is ImportDirective) {
+        importedFiles.add(directive.uri.stringValue);
+      }
+    }
+    List<String> missingFiles = [];
+    for (String testFileName in testFileNames) {
+      if (!importedFiles.contains(testFileName)) {
+        missingFiles.add(testFileName);
+      }
+    }
+    if (missingFiles.isNotEmpty) {
+      fail('Tests missing from "test_all.dart": ${missingFiles.join(', ')}');
+    }
+  });
+}
diff --git a/pkg/analyzer/tool/analysis_driver/inspect_exception.dart b/pkg/analyzer/tool/analysis_driver/inspect_exception.dart
index 9813944..b15b904 100644
--- a/pkg/analyzer/tool/analysis_driver/inspect_exception.dart
+++ b/pkg/analyzer/tool/analysis_driver/inspect_exception.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/tool/summary/check_test.dart b/pkg/analyzer/tool/summary/check_test.dart
index ff689ba..af669fb 100644
--- a/pkg/analyzer/tool/summary/check_test.dart
+++ b/pkg/analyzer/tool/summary/check_test.dart
@@ -13,7 +13,10 @@
  * user to run generate.dart.
  */
 main() async {
-  String pkgPath = normalize(join(package_root.packageRoot, 'analyzer'));
-  await GeneratedContent.checkAll(
-      pkgPath, 'tool/summary/generate.dart', allTargets);
+  var idlFolderPath = normalize(
+      join(package_root.packageRoot, 'analyzer', 'lib', 'src', 'summary'));
+  var idlPath = normalize(join(idlFolderPath, 'idl.dart'));
+  await GeneratedContent.checkAll(idlFolderPath,
+      'pkg/analyzer/tool/summary/generate.dart', getAllTargets(idlPath),
+      args: [idlPath]);
 }
diff --git a/pkg/analyzer/tool/summary/dump_inferred_types.dart b/pkg/analyzer/tool/summary/dump_inferred_types.dart
index a5167b0..81d2a34 100644
--- a/pkg/analyzer/tool/summary/dump_inferred_types.dart
+++ b/pkg/analyzer/tool/summary/dump_inferred_types.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -7,6 +7,7 @@
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/src/dart/element/type.dart';
+import 'package:analyzer/src/generated/engine.dart';
 import 'package:analyzer/src/generated/utilities_dart.dart';
 import 'package:analyzer/src/summary/base.dart';
 import 'package:analyzer/src/summary/idl.dart';
@@ -40,7 +41,8 @@
 
   InferredTypeCollector(
       GetDependencyCallback getDependency, GetUnitCallback getUnit)
-      : _linker = new Linker({}, getDependency, getUnit, null);
+      : _linker =
+            new Linker({}, getDependency, getUnit, null, AnalysisOptionsImpl());
 
   /**
    * If an inferred type exists matching the given [slot], record that it is the
diff --git a/pkg/analyzer/tool/summary/generate.dart b/pkg/analyzer/tool/summary/generate.dart
index d4d5157..798e369 100644
--- a/pkg/analyzer/tool/summary/generate.dart
+++ b/pkg/analyzer/tool/summary/generate.dart
@@ -2,57 +2,55 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/**
- * This file contains code to generate serialization/deserialization logic for
- * summaries based on an "IDL" description of the summary format (written in
- * stylized Dart).
- *
- * For each class in the "IDL" input, two corresponding classes are generated:
- * - A class with the same name which represents deserialized summary data in
- *   memory.  This class has read-only semantics.
- * - A "builder" class which can be used to generate serialized summary data.
- *   This class has write-only semantics.
- *
- * Each of the "builder" classes has a single `finish` method which writes
- * the entity being built into the given FlatBuffer and returns the `Offset`
- * reference to it.
- */
+/// This file contains code to generate serialization/deserialization logic for
+/// summaries based on an "IDL" description of the summary format (written in
+/// stylized Dart).
+///
+/// For each class in the "IDL" input, two corresponding classes are generated:
+/// - A class with the same name which represents deserialized summary data in
+///   memory.  This class has read-only semantics.
+/// - A "builder" class which can be used to generate serialized summary data.
+///   This class has write-only semantics.
+///
+/// Each of the "builder" classes has a single `finish` method which writes
+/// the entity being built into the given FlatBuffer and returns the `Offset`
+/// reference to it.
 import 'dart:convert';
 import 'dart:io';
 
 import 'package:analysis_tool/tools.dart';
-import 'package:analyzer/src/dart/analysis/experiments.dart';
 import 'package:front_end/src/fasta/scanner/string_scanner.dart';
 import 'package:front_end/src/scanner/token.dart' show Token;
-import 'package:front_end/src/testing/package_root.dart' as package_root;
-import 'package:path/path.dart';
 
 import 'idl_model.dart' as idlModel;
 import 'mini_ast.dart';
 
-main() async {
-  String pkgPath = normalize(join(package_root.packageRoot, 'analyzer'));
-  await GeneratedContent.generateAll(pkgPath, allTargets);
+main(List<String> args) async {
+  if (args.length != 1) {
+    print('Error: IDL path is required');
+    print('usage: dart generate.dart path/to/idl.dart');
+  }
+  String idlPath = args[0];
+  await GeneratedContent.generateAll(
+      File(idlPath).parent.path, getAllTargets(idlPath));
 }
 
-final List<GeneratedContent> allTargets = <GeneratedContent>[
-  formatTarget,
-  schemaTarget
-];
+List<GeneratedContent> getAllTargets(String idlPath) {
+  final GeneratedFile formatTarget =
+      new GeneratedFile('format.dart', (_) async {
+    _CodeGenerator codeGenerator = new _CodeGenerator(idlPath);
+    codeGenerator.generateFormatCode();
+    return codeGenerator._outBuffer.toString();
+  });
 
-final GeneratedFile formatTarget =
-    new GeneratedFile('lib/src/summary/format.dart', (String pkgPath) async {
-  _CodeGenerator codeGenerator = new _CodeGenerator(pkgPath);
-  codeGenerator.generateFormatCode();
-  return codeGenerator._outBuffer.toString();
-});
+  final GeneratedFile schemaTarget = new GeneratedFile('format.fbs', (_) async {
+    _CodeGenerator codeGenerator = new _CodeGenerator(idlPath);
+    codeGenerator.generateFlatBufferSchema();
+    return codeGenerator._outBuffer.toString();
+  });
 
-final GeneratedFile schemaTarget =
-    new GeneratedFile('lib/src/summary/format.fbs', (String pkgPath) async {
-  _CodeGenerator codeGenerator = new _CodeGenerator(pkgPath);
-  codeGenerator.generateFlatBufferSchema();
-  return codeGenerator._outBuffer.toString();
-});
+  return <GeneratedContent>[formatTarget, schemaTarget];
+}
 
 typedef String _StringToString(String s);
 
@@ -60,24 +58,17 @@
   static const String _throwDeprecated =
       "throw new UnimplementedError('attempt to access deprecated field')";
 
-  /**
-   * Buffer in which generated code is accumulated.
-   */
+  /// Buffer in which generated code is accumulated.
   final StringBuffer _outBuffer = new StringBuffer();
 
-  /**
-   * Current indentation level.
-   */
+  /// Current indentation level.
   String _indentation = '';
 
-  /**
-   * Semantic model of the "IDL" input file.
-   */
+  /// Semantic model of the "IDL" input file.
   idlModel.Idl _idl;
 
-  _CodeGenerator(String pkgPath) {
+  _CodeGenerator(String idlPath) {
     // Parse the input "IDL" file.
-    String idlPath = join(pkgPath, 'lib', 'src', 'summary', 'idl.dart');
     File idlFile = new File(idlPath);
     String idlText =
         idlFile.readAsStringSync().replaceAll(new RegExp('\r\n?'), '\n');
@@ -86,16 +77,13 @@
     var startingToken = scanner.tokenize();
     var listener = new MiniAstBuilder();
     var parser = new MiniAstParser(listener);
-    parser.enableSetLiterals = IsEnabledByDefault.set_literals;
     parser.parseUnit(startingToken);
     extractIdl(listener.compilationUnit);
     checkIdl();
   }
 
-  /**
-   * Perform basic sanity checking of the IDL (over and above that done by
-   * [extractIdl]).
-   */
+  /// Perform basic sanity checking of the IDL (over and above that done by
+  /// [extractIdl]).
   void checkIdl() {
     _idl.classes.forEach((String name, idlModel.ClassDeclaration cls) {
       if (cls.fileIdentifier != null) {
@@ -145,10 +133,8 @@
     });
   }
 
-  /**
-   * Generate a string representing the Dart type which should be used to
-   * represent [type] when deserialized.
-   */
+  /// Generate a string representing the Dart type which should be used to
+  /// represent [type] when deserialized.
   String dartType(idlModel.FieldType type) {
     String baseType = idlPrefix(type.typeName);
     if (type.isList) {
@@ -158,13 +144,11 @@
     }
   }
 
-  /**
-   * Generate a Dart expression representing the default value for a field
-   * having the given [type], or `null` if there is no default value.
-   *
-   * If [builder] is `true`, the returned type should be appropriate for use in
-   * a builder class.
-   */
+  /// Generate a Dart expression representing the default value for a field
+  /// having the given [type], or `null` if there is no default value.
+  ///
+  /// If [builder] is `true`, the returned type should be appropriate for use in
+  /// a builder class.
   String defaultValue(idlModel.FieldType type, bool builder) {
     if (type.isList) {
       if (builder) {
@@ -177,6 +161,8 @@
     } else if (_idl.enums.containsKey(type.typeName)) {
       return '${idlPrefix(type.typeName)}.'
           '${_idl.enums[type.typeName].values[0].name}';
+    } else if (type.typeName == 'double') {
+      return '0.0';
     } else if (type.typeName == 'int') {
       return '0';
     } else if (type.typeName == 'String') {
@@ -188,10 +174,8 @@
     }
   }
 
-  /**
-   * Generate a string representing the Dart type which should be used to
-   * represent [type] while building a serialized data structure.
-   */
+  /// Generate a string representing the Dart type which should be used to
+  /// represent [type] while building a serialized data structure.
   String encodedType(idlModel.FieldType type) {
     String typeStr;
     if (_idl.classes.containsKey(type.typeName)) {
@@ -206,10 +190,8 @@
     }
   }
 
-  /**
-   * Process the AST in [idlParsed] and store the resulting semantic model in
-   * [_idl].  Also perform some error checking.
-   */
+  /// Process the AST in [idlParsed] and store the resulting semantic model in
+  /// [_idl].  Also perform some error checking.
   void extractIdl(CompilationUnit idlParsed) {
     _idl = new idlModel.Idl();
     for (CompilationUnitMember decl in idlParsed.declarations) {
@@ -218,6 +200,7 @@
         bool isDeprecated = false;
         String fileIdentifier;
         String clsName = decl.name;
+        String variantField;
         for (Annotation annotation in decl.metadata) {
           if (annotation.arguments != null &&
               annotation.name == 'TopLevel' &&
@@ -240,11 +223,33 @@
               annotation.name == 'deprecated' &&
               annotation.constructorName == null) {
             isDeprecated = true;
+          } else if (annotation.arguments != null &&
+              annotation.name == 'Variant' &&
+              annotation.constructorName == null) {
+            if (annotation.arguments.length == 1) {
+              Expression arg = annotation.arguments[0];
+              if (arg is StringLiteral) {
+                variantField = arg.stringValue;
+              } else {
+                throw new Exception(
+                  'Class `$clsName`: @Variant argument must be a string literal',
+                );
+              }
+            } else if (annotation.arguments.length != 0) {
+              throw Exception(
+                'Class `$clsName`: @Variant requires 1 argument',
+              );
+            }
           }
         }
-        String doc = _getNodeDoc(decl);
         idlModel.ClassDeclaration cls = new idlModel.ClassDeclaration(
-            doc, clsName, isTopLevel, fileIdentifier, isDeprecated);
+          documentation: _getNodeDoc(decl),
+          name: clsName,
+          isTopLevel: isTopLevel,
+          fileIdentifier: fileIdentifier,
+          isDeprecated: isDeprecated,
+          variantField: variantField,
+        );
         _idl.classes[clsName] = cls;
         String expectedBase = 'base.SummaryClass';
         if (decl.superclass == null || decl.superclass.name != expectedBase) {
@@ -253,61 +258,7 @@
         }
         for (ClassMember classMember in decl.members) {
           if (classMember is MethodDeclaration && classMember.isGetter) {
-            String desc = '$clsName.${classMember.name}';
-            if (classMember.returnType == null) {
-              throw new Exception('Class member needs a type: $desc');
-            }
-            TypeName type = classMember.returnType;
-            bool isList = false;
-            if (type.name == 'List' &&
-                type.typeArguments != null &&
-                type.typeArguments.length == 1) {
-              isList = true;
-              type = type.typeArguments[0];
-            }
-            if (type.typeArguments != null) {
-              throw new Exception('Cannot handle type arguments in `$type`');
-            }
-            int id;
-            bool isDeprecated = false;
-            bool isInformative = false;
-            for (Annotation annotation in classMember.metadata) {
-              if (annotation.name == 'Id') {
-                if (id != null) {
-                  throw new Exception(
-                      'Duplicate @id annotation ($classMember)');
-                }
-                if (annotation.arguments == null) {
-                  throw new Exception('@Id must be passed an argument');
-                }
-                if (annotation.arguments.length != 1) {
-                  throw new Exception(
-                      '@Id must be passed exactly one argument ($desc)');
-                }
-                Expression expression = annotation.arguments[0];
-                if (expression is IntegerLiteral) {
-                  id = expression.value;
-                } else {
-                  throw new Exception(
-                      '@Id parameter must be an integer literal ($desc)');
-                }
-              } else if (annotation.name == 'deprecated') {
-                if (annotation.arguments != null) {
-                  throw new Exception('@deprecated does not take args ($desc)');
-                }
-                isDeprecated = true;
-              } else if (annotation.name == 'informative') {
-                isInformative = true;
-              }
-            }
-            if (id == null) {
-              throw new Exception('Missing @id annotation ($desc)');
-            }
-            String doc = _getNodeDoc(classMember);
-            idlModel.FieldType fieldType =
-                new idlModel.FieldType(type.name, isList);
-            cls.allFields.add(new idlModel.FieldDeclaration(doc,
-                classMember.name, fieldType, id, isDeprecated, isInformative));
+            _addFieldForGetter(cls, classMember);
           } else if (classMember is ConstructorDeclaration &&
               classMember.name.endsWith('fromBuffer')) {
             // Ignore `fromBuffer` declarations; they simply forward to the
@@ -332,10 +283,8 @@
     }
   }
 
-  /**
-   * Generate a string representing the FlatBuffer schema type which should be
-   * used to represent [type].
-   */
+  /// Generate a string representing the FlatBuffer schema type which should be
+  /// used to represent [type].
   String fbsType(idlModel.FieldType type) {
     String typeStr;
     switch (type.typeName) {
@@ -368,9 +317,7 @@
     }
   }
 
-  /**
-   * Entry point to the code generator when generating the "format.fbs" file.
-   */
+  /// Entry point to the code generator when generating the "format.fbs" file.
   void generateFlatBufferSchema() {
     outputHeader();
     for (idlModel.EnumDeclaration enm in _idl.enums.values) {
@@ -423,9 +370,7 @@
     }
   }
 
-  /**
-   * Entry point to the code generator when generating the "format.dart" file.
-   */
+  /// Entry point to the code generator when generating the "format.dart" file.
   void generateFormatCode() {
     outputHeader();
     out('library analyzer.src.summary.format;');
@@ -461,10 +406,8 @@
     }
   }
 
-  /**
-   * Add the prefix `idl.` to a type name, unless that type name is the name of
-   * a built-in type.
-   */
+  /// Add the prefix `idl.` to a type name, unless that type name is the name of
+  /// a built-in type.
   String idlPrefix(String s) {
     switch (s) {
       case 'bool':
@@ -477,9 +420,7 @@
     }
   }
 
-  /**
-   * Execute [callback] with two spaces added to [_indentation].
-   */
+  /// Execute [callback] with two spaces added to [_indentation].
   void indent(void callback()) {
     String oldIndentation = _indentation;
     try {
@@ -490,10 +431,8 @@
     }
   }
 
-  /**
-   * Add the string [s] to the output as a single line, indenting as
-   * appropriate.
-   */
+  /// Add the string [s] to the output as a single line, indenting as
+  /// appropriate.
   void out([String s = '']) {
     if (s == '') {
       _outBuffer.writeln('');
@@ -509,22 +448,185 @@
   }
 
   void outputHeader() {
-    out('// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file');
+    out('// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file');
     out('// for details. All rights reserved. Use of this source code is governed by a');
     out('// BSD-style license that can be found in the LICENSE file.');
     out('//');
     out('// This file has been automatically generated.  Please do not edit it manually.');
-    out('// To regenerate the file, use the script "pkg/analyzer/tool/generate_files".');
+    out('// To regenerate the file, use the SDK script');
+    out('// "pkg/analyzer/tool/summary/generate.dart \$IDL_FILE_PATH",');
+    out('// or "pkg/analyzer/tool/generate_files" for the analyzer package IDL/sources.');
     out();
   }
 
-  /**
-   * Enclose [s] in quotes, escaping as necessary.
-   */
+  /// Enclose [s] in quotes, escaping as necessary.
   String quoted(String s) {
     return json.encode(s);
   }
 
+  void _addFieldForGetter(
+    idlModel.ClassDeclaration cls,
+    MethodDeclaration getter,
+  ) {
+    var desc = '${cls.name}.${getter.name}';
+    if (getter.returnType == null) {
+      throw new Exception('Getter needs a type: $desc');
+    }
+
+    var type = getter.returnType;
+
+    var isList = false;
+    if (type.name == 'List' &&
+        type.typeArguments != null &&
+        type.typeArguments.length == 1) {
+      isList = true;
+      type = type.typeArguments[0];
+    }
+    if (type.typeArguments != null) {
+      throw new Exception('Cannot handle type arguments in `$type`');
+    }
+
+    int id;
+    List<String> variants;
+    bool isDeprecated = false;
+    bool isInformative = false;
+
+    for (Annotation annotation in getter.metadata) {
+      if (annotation.name == 'Id') {
+        if (id != null) {
+          throw new Exception('Duplicate @id annotation ($getter)');
+        }
+        if (annotation.arguments == null) {
+          throw Exception('@Id must be passed an argument ($desc)');
+        }
+        if (annotation.arguments.length != 1) {
+          throw Exception('@Id must be passed exactly one argument ($desc)');
+        }
+
+        var idExpression = annotation.arguments[0];
+        if (idExpression is IntegerLiteral) {
+          id = idExpression.value;
+        } else {
+          throw new Exception(
+            '@Id argument must be an integer literal ($desc)',
+          );
+        }
+      } else if (annotation.name == 'deprecated') {
+        if (annotation.arguments != null) {
+          throw new Exception('@deprecated does not take args ($desc)');
+        }
+        isDeprecated = true;
+      } else if (annotation.name == 'informative') {
+        isInformative = true;
+      } else if (annotation.name == 'VariantId') {
+        if (id != null) {
+          throw Exception('Cannot specify both @Id and @VariantId ($getter)');
+        }
+        if (variants != null) {
+          throw Exception('Duplicate @VariantId annotation ($getter)');
+        }
+
+        if (annotation.arguments == null) {
+          throw Exception('@VariantId must be given arguments ($desc)');
+        }
+        if (annotation.arguments.length != 2) {
+          throw Exception(
+            '@VariantId must be given exactly two arguments ($desc)',
+          );
+        }
+
+        var idExpression = annotation.arguments[0];
+        if (idExpression is IntegerLiteral) {
+          id = idExpression.value;
+        } else {
+          throw Exception(
+            '@VariantId argument must be an integer literal ($desc)',
+          );
+        }
+
+        var variantExpression = annotation.arguments[1];
+        if (variantExpression is NamedExpression) {
+          if (variantExpression.name == 'variant') {
+            variants = [variantExpression.expression.toCode()];
+          } else if (variantExpression.name == 'variantList') {
+            variants = (variantExpression.expression as ListLiteral)
+                .elements
+                .map((e) => e.toCode())
+                .toList();
+          } else {
+            throw Exception(
+              'Only "key" or "keyList" expected in @VariantId ($desc)',
+            );
+          }
+        } else {
+          throw Exception(
+            'The second argument of @VariantId must be named ($desc)',
+          );
+        }
+      }
+    }
+    if (id == null) {
+      throw new Exception('Missing @id annotation ($desc)');
+    }
+
+    var fieldType = new idlModel.FieldType(type.name, isList);
+
+    String name = getter.name;
+    Map<String, List<String>> variantMap;
+    if (variants != null) {
+      var fieldsWithSameId =
+          cls.allFields.where((field) => field.id == id).toList();
+      if (fieldsWithSameId.isNotEmpty) {
+        var existingField = fieldsWithSameId.first;
+        if (existingField.variantMap == null) {
+          throw Exception('$desc: id $id is already used as a non-variant '
+              'field: ${existingField.name}');
+        }
+
+        var map = existingField.variantMap;
+        for (var variant in variants) {
+          for (var logicalName in map.keys) {
+            if (map[logicalName].contains(variant)) {
+              throw Exception('$desc: id $id is already used for $logicalName');
+            }
+          }
+        }
+
+        if (existingField.type != fieldType) {
+          throw Exception(
+            '$desc: id $id is already used with type ${existingField.type}',
+          );
+        }
+
+        map.putIfAbsent(getter.name, () => <String>[]).addAll(variants);
+        return;
+      } else {
+        name = 'variantField_$id';
+        variantMap = <String, List<String>>{getter.name: variants};
+      }
+    }
+
+    cls.allFields.add(
+      idlModel.FieldDeclaration(
+        documentation: _getNodeDoc(getter),
+        name: name,
+        type: fieldType,
+        id: id,
+        isDeprecated: isDeprecated,
+        isInformative: isInformative,
+        variantMap: variantMap,
+      ),
+    );
+  }
+
+  Iterable<String> _computeVariants(idlModel.ClassDeclaration cls) {
+    return cls.fields
+        .map((f) => f.variantMap?.values ?? [])
+        .expand((v) => v)
+        .expand((v) => v)
+        .toSet();
+  }
+
   void _generateBuilder(idlModel.ClassDeclaration cls) {
     String name = cls.name;
     String builderName = name + 'Builder';
@@ -541,6 +643,7 @@
         String typeStr = encodedType(type);
         out('$typeStr _$fieldName;');
       }
+
       // Generate getters and setters.
       for (idlModel.FieldDeclaration field in cls.allFields) {
         String fieldName = field.name;
@@ -549,47 +652,105 @@
         String def = defaultValue(fieldType, true);
         String defSuffix = def == null ? '' : ' ??= $def';
         out();
-        out('@override');
         if (field.isDeprecated) {
+          out('@override');
           out('Null get $fieldName => $_throwDeprecated;');
         } else {
-          out('$typeStr get $fieldName => _$fieldName$defSuffix;');
-          out();
-          outDoc(field.documentation);
-          constructorParams.add('$typeStr $fieldName');
-          out('void set $fieldName($typeStr value) {');
-          indent(() {
-            String stateFieldName = '_' + fieldName;
-            // Validate that int(s) are non-negative.
-            if (fieldType.typeName == 'int') {
-              if (!fieldType.isList) {
-                out('assert(value == null || value >= 0);');
-              } else {
-                out('assert(value == null || value.every((e) => e >= 0));');
-              }
+          if (field.variantMap != null) {
+            for (var logicalName in field.variantMap.keys) {
+              var variants = field.variantMap[logicalName];
+              out('@override');
+              out('$typeStr get $logicalName {');
+              indent(() {
+                out(_variantAssertStatement(cls, variants));
+                out('return _${field.name}$defSuffix;');
+              });
+              out('}');
+              out();
             }
-            // Set the value.
-            out('this.$stateFieldName = value;');
-          });
-          out('}');
+          } else {
+            out('@override');
+            out('$typeStr get $fieldName => _$fieldName$defSuffix;');
+          }
+          out();
+
+          constructorParams.add('$typeStr $fieldName');
+
+          outDoc(field.documentation);
+
+          if (field.variantMap != null) {
+            for (var logicalName in field.variantMap.keys) {
+              var variants = field.variantMap[logicalName];
+              out('set $logicalName($typeStr value) {');
+              indent(() {
+                out(_variantAssertStatement(cls, variants));
+                _generateNonNegativeInt(fieldType);
+                out('_variantField_${field.id} = value;');
+              });
+              out('}');
+              out();
+            }
+          } else {
+            out('set $fieldName($typeStr value) {');
+            indent(() {
+              _generateNonNegativeInt(fieldType);
+              out('this._$fieldName = value;');
+            });
+            out('}');
+          }
         }
       }
       // Generate constructor.
       out();
-      out('$builderName({${constructorParams.join(', ')}})');
-      List<idlModel.FieldDeclaration> fields = cls.fields.toList();
-      for (int i = 0; i < fields.length; i++) {
-        idlModel.FieldDeclaration field = fields[i];
-        String prefix = i == 0 ? '  : ' : '    ';
-        String suffix = i == fields.length - 1 ? ';' : ',';
-        out('${prefix}_${field.name} = ${field.name}$suffix');
+      if (cls.variantField != null) {
+        for (var variant in _computeVariants(cls)) {
+          var constructorName = variant.split('.')[1];
+          out('$builderName.$constructorName({');
+
+          for (var field in cls.fields) {
+            if (field.variantMap != null) {
+              for (var property in field.variantMap.keys) {
+                if (field.variantMap[property].contains(variant)) {
+                  out('${encodedType(field.type)} $property,');
+                }
+              }
+            }
+          }
+
+          out('}) : ');
+
+          out('_${cls.variantField} = idl.$variant');
+
+          var separator = ',';
+          for (var field in cls.fields) {
+            if (field.variantMap != null) {
+              for (var property in field.variantMap.keys) {
+                if (field.variantMap[property].contains(variant)) {
+                  out('$separator _${field.name} = $property');
+                  separator = ', ';
+                }
+              }
+            }
+          }
+
+          out(';');
+          out();
+        }
+      } else {
+        out('$builderName({${constructorParams.join(', ')}})');
+        List<idlModel.FieldDeclaration> fields = cls.fields.toList();
+        for (int i = 0; i < fields.length; i++) {
+          idlModel.FieldDeclaration field = fields[i];
+          String prefix = i == 0 ? '  : ' : '    ';
+          String suffix = i == fields.length - 1 ? ';' : ',';
+          out('${prefix}_${field.name} = ${field.name}$suffix');
+        }
       }
+
       // Generate flushInformative().
       {
         out();
-        out('/**');
-        out(' * Flush [informative] data recursively.');
-        out(' */');
+        out('/// Flush [informative] data recursively.');
         out('void flushInformative() {');
         indent(() {
           for (idlModel.FieldDeclaration field in cls.fields) {
@@ -611,9 +772,7 @@
       // Generate collectApiSignature().
       {
         out();
-        out('/**');
-        out(' * Accumulate non-[informative] data into [signature].');
-        out(' */');
+        out('/// Accumulate non-[informative] data into [signature].');
         out('void collectApiSignature(api_sig.ApiSignature signature) {');
         indent(() {
           List<idlModel.FieldDeclaration> sortedFields = cls.fields.toList()
@@ -736,6 +895,9 @@
           } else if (fieldType.typeName == 'bool') {
             condition = '$valueName == true';
             writeCode = 'fbBuilder.addBool($index, true);';
+          } else if (fieldType.typeName == 'double') {
+            condition += ' && $valueName != ${defaultValue(fieldType, true)}';
+            writeCode = 'fbBuilder.addFloat64($index, $valueName);';
           } else if (fieldType.typeName == 'int') {
             condition += ' && $valueName != ${defaultValue(fieldType, true)}';
             writeCode = 'fbBuilder.addUint32($index, $valueName);';
@@ -829,6 +991,8 @@
           }
         } else if (typeName == 'bool') {
           readCode = 'const fb.BoolReader()';
+        } else if (typeName == 'double') {
+          readCode = 'const fb.Float64Reader()';
         } else if (typeName == 'int') {
           readCode = 'const fb.Uint32Reader()';
         } else if (typeName == 'String') {
@@ -841,19 +1005,37 @@
         assert(readCode != null);
         // Write the getter implementation.
         out();
-        out('@override');
         String returnType = dartType(type);
         if (field.isDeprecated) {
+          out('@override');
           out('Null get $fieldName => $_throwDeprecated;');
         } else {
-          out('$returnType get $fieldName {');
-          indent(() {
-            String readExpr =
-                '$readCode.vTableGet(_bc, _bcOffset, $index, $def)';
-            out('_$fieldName ??= $readExpr;');
-            out('return _$fieldName;');
-          });
-          out('}');
+          if (field.variantMap != null) {
+            for (var logicalName in field.variantMap.keys) {
+              var variants = field.variantMap[logicalName];
+              out('@override');
+              out('$returnType get $logicalName {');
+              indent(() {
+                out(_variantAssertStatement(cls, variants));
+                String readExpr =
+                    '$readCode.vTableGet(_bc, _bcOffset, $index, $def)';
+                out('_$fieldName ??= $readExpr;');
+                out('return _$fieldName;');
+              });
+              out('}');
+              out();
+            }
+          } else {
+            out('@override');
+            out('$returnType get $fieldName {');
+            indent(() {
+              String readExpr =
+                  '$readCode.vTableGet(_bc, _bcOffset, $index, $def)';
+              out('_$fieldName ??= $readExpr;');
+              out('return _$fieldName;');
+            });
+            out('}');
+          }
         }
       }
     });
@@ -865,55 +1047,122 @@
     String mixinName = '_${name}Mixin';
     out('abstract class $mixinName implements ${idlPrefix(name)} {');
     indent(() {
+      String jsonCondition(idlModel.FieldType type, String name) {
+        if (type.isList) {
+          return '$name.isNotEmpty';
+        } else {
+          return '$name != ${defaultValue(type, false)}';
+        }
+      }
+
+      String jsonStore(idlModel.FieldType type, String name) {
+        _StringToString convertItem;
+        if (_idl.classes.containsKey(type.typeName)) {
+          convertItem = (String name) => '$name.toJson()';
+        } else if (_idl.enums.containsKey(type.typeName)) {
+          // TODO(paulberry): it would be better to generate a const list of
+          // strings so that we don't have to do this kludge.
+          convertItem = (String name) => "$name.toString().split('.')[1]";
+        } else if (type.typeName == 'double') {
+          convertItem =
+              (String name) => '$name.isFinite ? $name : $name.toString()';
+        }
+        String convertField;
+        if (convertItem == null) {
+          convertField = name;
+        } else if (type.isList) {
+          convertField = '$name.map((_value) =>'
+              ' ${convertItem('_value')}).toList()';
+        } else {
+          convertField = convertItem(name);
+        }
+        return '_result[${quoted(name)}] = $convertField';
+      }
+
       // Write toJson().
       out('@override');
       out('Map<String, Object> toJson() {');
       indent(() {
         out('Map<String, Object> _result = <String, Object>{};');
-        for (idlModel.FieldDeclaration field in cls.fields) {
-          String condition;
-          if (field.type.isList) {
-            condition = '${field.name}.isNotEmpty';
-          } else {
-            condition = '${field.name} != ${defaultValue(field.type, false)}';
-          }
-          _StringToString convertItem;
-          if (_idl.classes.containsKey(field.type.typeName)) {
-            convertItem = (String name) => '$name.toJson()';
-          } else if (_idl.enums.containsKey(field.type.typeName)) {
-            // TODO(paulberry): it would be better to generate a const list of
-            // strings so that we don't have to do this kludge.
-            convertItem = (String name) => "$name.toString().split('.')[1]";
-          } else if (field.type.typeName == 'double') {
-            convertItem =
-                (String name) => '$name.isFinite ? $name : $name.toString()';
-          }
-          String convertField;
-          if (convertItem == null) {
-            convertField = field.name;
-          } else if (field.type.isList) {
-            convertField = '${field.name}.map((_value) =>'
-                ' ${convertItem('_value')}).toList()';
-          } else {
-            convertField = convertItem(field.name);
-          }
-          String storeField = '_result[${quoted(field.name)}] = $convertField';
-          out('if ($condition) $storeField;');
+
+        if (cls.variantField != null) {
+          indent(() {
+            for (idlModel.FieldDeclaration field in cls.fields) {
+              if (field.variantMap == null) {
+                var condition = jsonCondition(field.type, field.name);
+                var storeField = jsonStore(field.type, field.name);
+                out('if ($condition) $storeField;');
+              }
+            }
+            for (var variant in _computeVariants(cls)) {
+              out('if (${cls.variantField} == idl.$variant) {');
+              indent(() {
+                for (idlModel.FieldDeclaration field in cls.fields) {
+                  if (field.variantMap != null) {
+                    for (var logicalName in field.variantMap.keys) {
+                      if (field.variantMap[logicalName].contains(variant)) {
+                        var condition = jsonCondition(field.type, logicalName);
+                        var storeField = jsonStore(field.type, logicalName);
+                        out('if ($condition) $storeField;');
+                      }
+                    }
+                  }
+                }
+              });
+              out('}');
+            }
+          });
+        } else {
+          indent(() {
+            for (idlModel.FieldDeclaration field in cls.fields) {
+              String condition = jsonCondition(field.type, field.name);
+              String storeField = jsonStore(field.type, field.name);
+              out('if ($condition) $storeField;');
+            }
+          });
         }
+
         out('return _result;');
       });
       out('}');
       out();
+
       // Write toMap().
       out('@override');
-      out('Map<String, Object> toMap() => {');
-      indent(() {
-        for (idlModel.FieldDeclaration field in cls.fields) {
-          String fieldName = field.name;
-          out('${quoted(fieldName)}: $fieldName,');
+      if (cls.variantField != null) {
+        out('Map<String, Object> toMap() {');
+        for (var variant in _computeVariants(cls)) {
+          out('if (${cls.variantField} == idl.$variant) {');
+          indent(() {
+            out('return {');
+            for (idlModel.FieldDeclaration field in cls.fields) {
+              if (field.variantMap != null) {
+                for (var logicalName in field.variantMap.keys) {
+                  if (field.variantMap[logicalName].contains(variant)) {
+                    out('${quoted(logicalName)}: $logicalName,');
+                  }
+                }
+              } else {
+                String fieldName = field.name;
+                out('${quoted(fieldName)}: $fieldName,');
+              }
+            }
+            out('};');
+          });
+          out('}');
         }
-      });
-      out('};');
+        out('throw StateError("Unexpected \$${cls.variantField}");');
+        out('}');
+      } else {
+        out('Map<String, Object> toMap() => {');
+        indent(() {
+          for (idlModel.FieldDeclaration field in cls.fields) {
+            String fieldName = field.name;
+            out('${quoted(fieldName)}: $fieldName,');
+          }
+        });
+        out('};');
+      }
       out();
       // Write toString().
       out('@override');
@@ -922,6 +1171,16 @@
     out('}');
   }
 
+  void _generateNonNegativeInt(idlModel.FieldType fieldType) {
+    if (fieldType.typeName == 'int') {
+      if (!fieldType.isList) {
+        out('assert(value == null || value >= 0);');
+      } else {
+        out('assert(value == null || value.every((e) => e >= 0));');
+      }
+    }
+  }
+
   void _generateReader(idlModel.ClassDeclaration cls) {
     String name = cls.name;
     String readerName = '_${name}Reader';
@@ -946,12 +1205,10 @@
     out('}');
   }
 
-  /**
-   * Generate a call to the appropriate method of [ApiSignature] for the type
-   * [typeName], using the data named by [ref].  If [couldBeNull] is `true`,
-   * generate code to handle the possibility that [ref] is `null` (substituting
-   * in the appropriate default value).
-   */
+  /// Generate a call to the appropriate method of [ApiSignature] for the type
+  /// [typeName], using the data named by [ref].  If [couldBeNull] is `true`,
+  /// generate code to handle the possibility that [ref] is `null` (substituting
+  /// in the appropriate default value).
   void _generateSignatureCall(String typeName, String ref, bool couldBeNull) {
     if (_idl.enums.containsKey(typeName)) {
       if (couldBeNull) {
@@ -996,10 +1253,8 @@
     }
   }
 
-  /**
-   * Return the documentation text of the given [node], or `null` if the [node]
-   * does not have a comment.  Each line is `\n` separated.
-   */
+  /// Return the documentation text of the given [node], or `null` if the [node]
+  /// does not have a comment.  Each line is `\n` separated.
   String _getNodeDoc(AnnotatedNode node) {
     Comment comment = node.documentationComment;
     if (comment != null && comment.isDocumentation) {
@@ -1020,4 +1275,14 @@
     }
     return null;
   }
+
+  String _variantAssertStatement(
+    idlModel.ClassDeclaration class_,
+    List<String> variants,
+  ) {
+    var assertCondition = variants
+        ?.map((key) => '${class_.variantField} == idl.$key')
+        ?.join(' || ');
+    return 'assert($assertCondition);';
+  }
 }
diff --git a/pkg/analyzer/tool/summary/idl_model.dart b/pkg/analyzer/tool/summary/idl_model.dart
index 31252e2..597e669 100644
--- a/pkg/analyzer/tool/summary/idl_model.dart
+++ b/pkg/analyzer/tool/summary/idl_model.dart
@@ -7,6 +7,8 @@
  * semantic model of the IDL used to code generate summary serialization and
  * deserialization code.
  */
+import 'package:meta/meta.dart';
+
 /**
  * Information about a single class defined in the IDL.
  */
@@ -32,9 +34,16 @@
    */
   final bool isDeprecated;
 
-  ClassDeclaration(String documentation, String name, this.isTopLevel,
-      this.fileIdentifier, this.isDeprecated)
-      : super(documentation, name);
+  final String variantField;
+
+  ClassDeclaration({
+    @required String documentation,
+    @required this.fileIdentifier,
+    @required String name,
+    @required this.isDeprecated,
+    @required this.isTopLevel,
+    @required this.variantField,
+  }) : super(documentation, name);
 
   /**
    * Get the non-deprecated fields defined in the class.
@@ -105,9 +114,20 @@
    */
   final bool isInformative;
 
-  FieldDeclaration(String documentation, String name, this.type, this.id,
-      this.isDeprecated, this.isInformative)
-      : super(documentation, name);
+  /**
+   * Maps logical property names to variants in which this field is available.
+   */
+  final Map<String, List<String>> variantMap;
+
+  FieldDeclaration({
+    @required String documentation,
+    @required String name,
+    @required this.type,
+    @required this.id,
+    @required this.isDeprecated,
+    @required this.isInformative,
+    @required this.variantMap,
+  }) : super(documentation, name);
 }
 
 /**
@@ -128,6 +148,20 @@
   FieldType(this.typeName, this.isList);
 
   @override
+  int get hashCode {
+    var hash = 0x3fffffff & typeName.hashCode;
+    hash = 0x3fffffff & (hash * 31 + (hash ^ isList.hashCode));
+    return hash;
+  }
+
+  bool operator ==(Object other) {
+    if (other is FieldType) {
+      return other.typeName == typeName && other.isList == isList;
+    }
+    return false;
+  }
+
+  @override
   String toString() => isList ? 'List<$typeName>' : typeName;
 }
 
diff --git a/pkg/analyzer/tool/summary/inspect.dart b/pkg/analyzer/tool/summary/inspect.dart
index e1daf10..b968118 100644
--- a/pkg/analyzer/tool/summary/inspect.dart
+++ b/pkg/analyzer/tool/summary/inspect.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
diff --git a/pkg/analyzer/tool/summary/mini_ast.dart b/pkg/analyzer/tool/summary/mini_ast.dart
index 031b497..cf52e31 100644
--- a/pkg/analyzer/tool/summary/mini_ast.dart
+++ b/pkg/analyzer/tool/summary/mini_ast.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -114,7 +114,11 @@
 }
 
 /// "Mini AST" representation of an expression.
-class Expression {}
+class Expression {
+  String toCode() {
+    throw UnimplementedError('$runtimeType');
+  }
+}
 
 /// "Mini AST" representation of an integer literal.
 class IntegerLiteral extends Expression {
@@ -123,6 +127,43 @@
   IntegerLiteral(this.value);
 }
 
+/// "Mini AST" representation of a list literal.
+class ListLiteral extends Expression {
+  final Token leftBracket;
+  final List<Expression> elements;
+  final Token rightBracket;
+
+  ListLiteral(this.leftBracket, this.elements, this.rightBracket);
+
+  @override
+  String toCode() {
+    return '[' + elements.map((e) => e.toCode()).join(', ') + ']';
+  }
+}
+
+/// "Mini AST" representation of a named expression.
+class NamedExpression extends Expression {
+  final String name;
+  final Token colon;
+  final Expression expression;
+
+  NamedExpression(this.name, this.colon, this.expression);
+}
+
+/// "Mini AST" representation of a named expression.
+class PrefixedIdentifier extends Expression {
+  final String prefix;
+  final Token operator;
+  final String identifier;
+
+  PrefixedIdentifier(this.prefix, this.operator, this.identifier);
+
+  @override
+  String toCode() {
+    return '$prefix.$identifier';
+  }
+}
+
 /// "Mini AST" representation of a method declaration.
 class MethodDeclaration extends ClassMember {
   final bool isGetter;
@@ -370,10 +411,15 @@
   @override
   void handleSend(Token beginToken, Token endToken) {
     debugEvent("Send");
-    pop(); // Arguments
+
+    var arguments = pop();
     pop(); // Type arguments
-    pop(); // Receiver
-    push(new UnknownExpression());
+    if (arguments != null) {
+      pop(); // Receiver
+      push(new UnknownExpression());
+    } else {
+      // Property get.
+    }
   }
 
   @override
@@ -383,6 +429,31 @@
   }
 
   @override
+  void handleNamedArgument(Token colon) {
+    var expression = pop();
+    var name = pop();
+    push(NamedExpression(name, colon, expression));
+  }
+
+  @override
+  void handleLiteralList(
+      int count, Token leftBracket, Token constKeyword, Token rightBracket) {
+    debugEvent("LiteralList");
+
+    var elements = List<Object>(count);
+    popList(count, elements);
+    pop(); // type arguments
+
+    push(
+      ListLiteral(
+        leftBracket,
+        List<Expression>.from(elements),
+        rightBracket,
+      ),
+    );
+  }
+
+  @override
   void endTopLevelFields(Token staticToken, Token covariantToken,
       Token varFinalOrConst, int count, Token beginToken, Token endToken) {
     // We ignore top level variable declarations; they are present just to make
@@ -416,9 +487,20 @@
   @override
   void endBinaryExpression(Token token) {
     debugEvent("BinaryExpression");
-    pop(); // RHS
-    pop(); // LHS
-    push(new UnknownExpression());
+
+    if (identical('.', token.stringValue)) {
+      var rightOperand = pop();
+      var leftOperand = pop();
+      if (leftOperand is String && !leftOperand.contains('.')) {
+        push(PrefixedIdentifier(leftOperand, token, rightOperand));
+      } else {
+        push(new UnknownExpression());
+      }
+    } else {
+      pop(); // RHS
+      pop(); // LHS
+      push(new UnknownExpression());
+    }
   }
 
   @override
@@ -486,6 +568,11 @@
     push(new TypeName(name, typeArguments));
   }
 
+  @override
+  void handleNonNullAssertExpression(Token bang) {
+    reportNonNullAssertExpressionNotEnabled(bang);
+  }
+
   /// Calls [pop] and creates a list with the appropriate type parameter `T`
   /// from the resulting `List<dynamic>`.
   List<T> popTypedList<T>() {
diff --git a/pkg/analyzer/tool/task_dependency_graph/check_test.dart b/pkg/analyzer/tool/task_dependency_graph/check_test.dart
deleted file mode 100644
index efc365d..0000000
--- a/pkg/analyzer/tool/task_dependency_graph/check_test.dart
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:analysis_tool/tools.dart';
-import 'package:front_end/src/testing/package_root.dart' as package_root;
-import 'package:path/path.dart';
-
-import 'generate.dart';
-
-/**
- * Check that the target file has been code generated.  If it hasn't tell the
- * user to run generate.dart.
- */
-main() async {
-  String pkgPath = normalize(join(package_root.packageRoot, 'analyzer'));
-  await GeneratedContent.checkAll(pkgPath,
-      'tool/task_dependency_graph/generate.dart', <GeneratedContent>[target]);
-}
diff --git a/pkg/analyzer/tool/task_dependency_graph/generate.dart b/pkg/analyzer/tool/task_dependency_graph/generate.dart
deleted file mode 100644
index da4e3a9..0000000
--- a/pkg/analyzer/tool/task_dependency_graph/generate.dart
+++ /dev/null
@@ -1,400 +0,0 @@
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/**
- * This file contains code to output a description of tasks and their
- * dependencies in ".dot" format.  Prior to running, the user should run "pub
- * get" in the analyzer directory to ensure that a "packages" folder exists.
- *
- * TODO(paulberry):
- * - Add general.dart and html.dart for completeness.
- * - Use Graphviz's "record" feature to produce more compact output
- *   (http://www.graphviz.org/content/node-shapes#record)
- * - Produce a warning if a result descriptor is found which isn't the output
- *   of exactly one task.
- * - Convert this tool to use package_config to find the package map.
- */
-import 'dart:async';
-import 'dart:io' hide File;
-import 'dart:io' as io;
-
-import 'package:analysis_tool/tools.dart';
-import 'package:analyzer/dart/analysis/results.dart';
-import 'package:analyzer/dart/ast/ast.dart';
-import 'package:analyzer/dart/ast/visitor.dart';
-import 'package:analyzer/dart/element/element.dart';
-import 'package:analyzer/dart/element/type.dart';
-import 'package:analyzer/file_system/physical_file_system.dart';
-import 'package:analyzer/src/context/builder.dart';
-import 'package:analyzer/src/dart/analysis/byte_store.dart';
-import 'package:analyzer/src/dart/analysis/driver.dart';
-import 'package:analyzer/src/dart/analysis/file_state.dart';
-import 'package:analyzer/src/dart/analysis/performance_logger.dart';
-import 'package:analyzer/src/dart/sdk/sdk.dart';
-import 'package:analyzer/src/file_system/file_system.dart';
-import 'package:analyzer/src/generated/constant.dart';
-import 'package:analyzer/src/generated/engine.dart';
-import 'package:analyzer/src/generated/resolver.dart';
-import 'package:analyzer/src/generated/sdk.dart';
-import 'package:analyzer/src/generated/source.dart';
-import 'package:analyzer/src/generated/source_io.dart';
-import 'package:analyzer/src/source/package_map_resolver.dart';
-import 'package:front_end/src/testing/package_root.dart' as package_root;
-import 'package:path/path.dart' as path;
-import 'package:path/path.dart';
-
-/**
- * Generate the target .dot file.
- */
-main() async {
-  String pkgPath = normalize(join(package_root.packageRoot, 'analyzer'));
-  await GeneratedContent.generateAll(
-      pkgPath, <GeneratedContent>[target, htmlTarget]);
-}
-
-final GeneratedFile htmlTarget = new GeneratedFile(
-    'doc/tasks.html', (String pkgPath) => new Driver(pkgPath).generateHtml());
-
-final GeneratedFile target = new GeneratedFile(
-    'tool/task_dependency_graph/tasks.dot',
-    (String pkgPath) => new Driver(pkgPath).generateFileContents());
-
-typedef void GetterFinderCallback(PropertyAccessorElement element);
-
-class Driver {
-  static bool hasInitializedPlugins = false;
-  PhysicalResourceProvider resourceProvider;
-  AnalysisDriver driver;
-  InterfaceType resultDescriptorType;
-  InterfaceType listOfResultDescriptorType;
-  ClassElement enginePluginClass;
-  CompilationUnitElement taskUnitElement;
-  InterfaceType extensionPointIdType;
-
-  final String rootDir;
-
-  Driver(String pkgPath) : rootDir = new Directory(pkgPath).absolute.path;
-
-  /**
-   * Get an [io.File] object corresponding to the file in which the generated
-   * graph should be output.
-   */
-  io.File get file => new io.File(
-      path.join(rootDir, 'tool', 'task_dependency_graph', 'tasks.dot'));
-
-  /**
-   * Starting at [node], find all calls to registerExtension() which refer to
-   * the given [extensionIdVariable], and execute [callback] for the associated
-   * result descriptors.
-   */
-  void findExtensions(AstNode node, TopLevelVariableElement extensionIdVariable,
-      void callback(String descriptorName)) {
-    Set<PropertyAccessorElement> resultDescriptors =
-        new Set<PropertyAccessorElement>();
-    node.accept(new ExtensionFinder(
-        resultDescriptorType, extensionIdVariable, resultDescriptors.add));
-    for (PropertyAccessorElement resultDescriptor in resultDescriptors) {
-      callback(resultDescriptor.name);
-    }
-  }
-
-  /**
-   * Starting at [node], find all references to a getter of type
-   * `List<ResultDescriptor>`, and execute [callback] on the getter names.
-   */
-  void findResultDescriptorLists(
-      AstNode node, void callback(String descriptorListName)) {
-    Set<PropertyAccessorElement> resultDescriptorLists =
-        new Set<PropertyAccessorElement>();
-    node.accept(new GetterFinder(
-        listOfResultDescriptorType, resultDescriptorLists.add));
-    for (PropertyAccessorElement resultDescriptorList
-        in resultDescriptorLists) {
-      // We only care about result descriptor lists associated with getters in
-      // the engine plugin class.
-      if (resultDescriptorList.enclosingElement != enginePluginClass) {
-        continue;
-      }
-      callback(resultDescriptorList.name);
-    }
-  }
-
-  void findResultDescriptors(
-      AstNode node, void callback(String descriptorName)) {
-    Set<PropertyAccessorElement> resultDescriptors =
-        new Set<PropertyAccessorElement>();
-    node.accept(new GetterFinder(resultDescriptorType, resultDescriptors.add));
-    for (PropertyAccessorElement resultDescriptor in resultDescriptors) {
-      callback(resultDescriptor.name);
-    }
-  }
-
-  /**
-   * Generate the task dependency graph and return it as a [String].
-   */
-  Future<String> generateFileContents() async {
-    String data = await generateGraphData();
-    return '''
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-//
-// This file has been automatically generated.  Please do not edit it manually.
-// To regenerate the file, use the script
-// "pkg/analyzer/tool/task_dependency_graph/generate.dart".
-//
-// To render this graph using Graphviz (www.graphviz.org) use the command:
-// "dot tasks.dot -Tpdf -O".
-digraph G {
-$data
-}
-''';
-  }
-
-  Future<String> generateGraphData() async {
-    if (!hasInitializedPlugins) {
-      AnalysisEngine.instance.processRequiredPlugins();
-      hasInitializedPlugins = true;
-    }
-    List<String> lines = <String>[];
-    resourceProvider = PhysicalResourceProvider.INSTANCE;
-    DartSdk sdk = new FolderBasedDartSdk(resourceProvider,
-        FolderBasedDartSdk.defaultSdkDirectory(resourceProvider));
-
-    ContextBuilderOptions builderOptions = new ContextBuilderOptions();
-    if (Platform.packageConfig != null) {
-      builderOptions.defaultPackageFilePath =
-          Uri.parse(Platform.packageConfig).toFilePath();
-    } else {
-      // Let the context builder use the default algorithm for package
-      // resolution.
-    }
-
-    ContextBuilder builder = new ContextBuilder(resourceProvider, null, null,
-        options: builderOptions);
-    List<UriResolver> uriResolvers = [
-      new DartUriResolver(sdk),
-      new PackageMapUriResolver(resourceProvider,
-          builder.convertPackagesToMap(builder.createPackageMap(''))),
-      new ResourceUriResolver(resourceProvider)
-    ];
-
-    var logger = new PerformanceLog(null);
-    var scheduler = new AnalysisDriverScheduler(logger);
-    driver = new AnalysisDriver(
-        scheduler,
-        logger,
-        resourceProvider,
-        new MemoryByteStore(),
-        new FileContentOverlay(),
-        null,
-        new SourceFactory(uriResolvers),
-        new AnalysisOptionsImpl());
-    scheduler.start();
-
-    TypeProvider typeProvider = await driver.currentSession.typeProvider;
-
-    String dartDartPath = path.join(rootDir, 'lib', 'src', 'task', 'dart.dart');
-    String taskPath = path.join(rootDir, 'lib', 'src', 'plugin', 'task.dart');
-    String modelPath =
-        path.join(rootDir, 'lib', 'src', 'task', 'api', 'model.dart');
-    String enginePluginPath =
-        path.join(rootDir, 'lib', 'src', 'plugin', 'engine_plugin.dart');
-
-    CompilationUnitElement modelElement = await getUnitElement(modelPath);
-    InterfaceType analysisTaskType = modelElement.getType('AnalysisTask').type;
-    DartType dynamicType = typeProvider.dynamicType;
-    resultDescriptorType = modelElement
-        .getType('ResultDescriptor')
-        .type
-        .instantiate([dynamicType]);
-    listOfResultDescriptorType =
-        typeProvider.listType.instantiate([resultDescriptorType]);
-    CompilationUnit enginePluginUnit = await getUnit(enginePluginPath);
-    enginePluginClass =
-        enginePluginUnit.declaredElement.getType('EnginePlugin');
-    extensionPointIdType =
-        enginePluginUnit.declaredElement.getType('ExtensionPointId').type;
-    CompilationUnit dartDartUnit = await getUnit(dartDartPath);
-    CompilationUnit taskUnit = await getUnit(taskPath);
-    taskUnitElement = taskUnit.declaredElement;
-    Set<String> results = new Set<String>();
-    Set<String> resultLists = new Set<String>();
-    for (CompilationUnitMember dartUnitMember in dartDartUnit.declarations) {
-      if (dartUnitMember is ClassDeclaration) {
-        ClassDeclaration clazz = dartUnitMember;
-        if (!clazz.isAbstract &&
-            clazz.declaredElement.type.isSubtypeOf(analysisTaskType)) {
-          String task = clazz.name.name;
-
-          MethodDeclaration buildInputsAst;
-          VariableDeclaration descriptorField;
-          for (ClassMember classMember in clazz.members) {
-            if (classMember is MethodDeclaration &&
-                classMember.name.name == 'buildInputs') {
-              buildInputsAst = classMember;
-            }
-            if (classMember is FieldDeclaration) {
-              for (VariableDeclaration field in classMember.fields.variables) {
-                if (field.name.name == 'DESCRIPTOR') {
-                  descriptorField = field;
-                }
-              }
-            }
-          }
-
-          findResultDescriptors(buildInputsAst, (String input) {
-            results.add(input);
-            lines.add('  $input -> $task');
-          });
-          findResultDescriptorLists(buildInputsAst, (String input) {
-            resultLists.add(input);
-            lines.add('  $input -> $task');
-          });
-          findResultDescriptors(descriptorField, (String out) {
-            results.add(out);
-            lines.add('  $task -> $out');
-          });
-        }
-      }
-    }
-    for (String resultList in resultLists) {
-      lines.add('  $resultList [shape=hexagon]');
-      TopLevelVariableElement extensionIdVariable = _getExtensionId(resultList);
-      findExtensions(enginePluginUnit, extensionIdVariable, (String extension) {
-        results.add(extension);
-        lines.add('  $extension -> $resultList');
-      });
-    }
-    for (String result in results) {
-      lines.add('  $result [shape=box]');
-    }
-    lines.sort();
-    return lines.join('\n');
-  }
-
-  Future<String> generateHtml() async {
-    var data = await generateGraphData();
-    return '''
-<!DOCTYPE html>
-<html>
-<head>
-    <title>Analysis Task Dependency Graph</title>
-    <link rel="stylesheet" href="support/style.css">
-    <script src="support/viz.js"></script>
-    <script type="application/dart" src="support/web_app.dart.js"></script>
-    <script src="support/dart.js"></script>
-</head>
-<body>
-<button id="zoomBtn">Zoom</button>
-<script type="text/vnd.graphviz" id="dot">
-digraph G {
-  tooltip="Analysis Task Dependency Graph";
-  node [fontname=Helvetica];
-  edge [fontname=Helvetica, fontcolor=gray];
-$data
-}
-</script>
-</body>
-</html>
-''';
-  }
-
-  Future<CompilationUnit> getUnit(String path) async {
-    var result = await driver.getResult(path);
-    return result.unit;
-  }
-
-  Future<CompilationUnitElement> getUnitElement(String path) async {
-    UnitElementResult result = await driver.getUnitElement(path);
-    return result.element;
-  }
-
-  /**
-   * Find the result list getter having name [resultListGetterName] in the
-   * [EnginePlugin] class, and use the [ExtensionPointId] annotation on that
-   * getter to find the associated [TopLevelVariableElement] which can be used
-   * to register extensions for that getter.
-   */
-  TopLevelVariableElement _getExtensionId(String resultListGetterName) {
-    PropertyAccessorElement getter =
-        enginePluginClass.getGetter(resultListGetterName);
-    for (ElementAnnotation annotation in getter.metadata) {
-      DartObjectImpl annotationValue = annotation.constantValue;
-      if (annotationValue.type.isSubtypeOf(extensionPointIdType)) {
-        String extensionPointId =
-            annotationValue.fields['extensionPointId'].toStringValue();
-        for (TopLevelVariableElement variable
-            in taskUnitElement.topLevelVariables) {
-          if (variable.name == extensionPointId) {
-            return variable;
-          }
-        }
-      }
-    }
-    throw new Exception(
-        'Could not find extension ID corresponding to $resultListGetterName');
-  }
-}
-
-/**
- * Visitor that finds calls that register extension points.  Specifically, we
- * look for calls of the form `method(extensionIdVariable, resultDescriptor)`,
- * where `resultDescriptor` has type [resultDescriptorType], and we pass the
- * corresponding result descriptor names to [callback].
- */
-class ExtensionFinder extends GeneralizingAstVisitor {
-  final InterfaceType resultDescriptorType;
-  final TopLevelVariableElement extensionIdVariable;
-  final GetterFinderCallback callback;
-
-  ExtensionFinder(
-      this.resultDescriptorType, this.extensionIdVariable, this.callback);
-
-  @override
-  visitIdentifier(Identifier node) {
-    Element element = node.staticElement;
-    if (element is PropertyAccessorElement &&
-        element.isGetter &&
-        element.variable == extensionIdVariable) {
-      AstNode parent = node.parent;
-      if (parent is ArgumentList &&
-          parent.arguments.length == 2 &&
-          parent.arguments[0] == node) {
-        Expression extension = parent.arguments[1];
-        if (extension is Identifier) {
-          Element element = extension.staticElement;
-          if (element is PropertyAccessorElement &&
-              element.isGetter &&
-              element.returnType.isSubtypeOf(resultDescriptorType)) {
-            callback(element);
-            return;
-          }
-        }
-      }
-      throw new Exception('Could not decode extension setup: $parent');
-    }
-  }
-}
-
-/**
- * Visitor that finds references to getters having a specific type (or a
- * subtype of that type)
- */
-class GetterFinder extends GeneralizingAstVisitor {
-  final InterfaceType type;
-  final GetterFinderCallback callback;
-
-  GetterFinder(this.type, this.callback);
-
-  @override
-  visitIdentifier(Identifier node) {
-    Element element = node.staticElement;
-    if (element is PropertyAccessorElement &&
-        element.isGetter &&
-        element.returnType.isSubtypeOf(type)) {
-      callback(element);
-    }
-  }
-}
diff --git a/pkg/analyzer/tool/task_dependency_graph/tasks.dot b/pkg/analyzer/tool/task_dependency_graph/tasks.dot
deleted file mode 100644
index a812143..0000000
--- a/pkg/analyzer/tool/task_dependency_graph/tasks.dot
+++ /dev/null
@@ -1,363 +0,0 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-//
-// This file has been automatically generated.  Please do not edit it manually.
-// To regenerate the file, use the script
-// "pkg/analyzer/tool/task_dependency_graph/generate.dart".
-//
-// To render this graph using Graphviz (www.graphviz.org) use the command:
-// "dot tasks.dot -Tpdf -O".
-digraph G {
-  BUILD_DIRECTIVES_ERRORS -> LibraryUnitErrorsTask
-  BUILD_DIRECTIVES_ERRORS [shape=box]
-  BUILD_LIBRARY_ERRORS -> LibraryUnitErrorsTask
-  BUILD_LIBRARY_ERRORS [shape=box]
-  BuildCompilationUnitElementTask -> COMPILATION_UNIT_CONSTANTS
-  BuildCompilationUnitElementTask -> COMPILATION_UNIT_ELEMENT
-  BuildCompilationUnitElementTask -> CREATED_RESOLVED_UNIT1
-  BuildCompilationUnitElementTask -> RESOLVED_UNIT1
-  BuildDirectiveElementsTask -> BUILD_DIRECTIVES_ERRORS
-  BuildDirectiveElementsTask -> LIBRARY_ELEMENT2
-  BuildEnumMemberElementsTask -> CREATED_RESOLVED_UNIT3
-  BuildEnumMemberElementsTask -> RESOLVED_UNIT3
-  BuildExportNamespaceTask -> LIBRARY_ELEMENT4
-  BuildLibraryElementTask -> BUILD_LIBRARY_ERRORS
-  BuildLibraryElementTask -> IS_LAUNCHABLE
-  BuildLibraryElementTask -> LIBRARY_ELEMENT1
-  BuildPublicNamespaceTask -> LIBRARY_ELEMENT3
-  BuildSourceExportClosureTask -> EXPORT_SOURCE_CLOSURE
-  BuildTypeProviderTask -> TYPE_PROVIDER
-  COMPILATION_UNIT_CONSTANTS -> EvaluateUnitConstantsTask
-  COMPILATION_UNIT_CONSTANTS [shape=box]
-  COMPILATION_UNIT_ELEMENT [shape=box]
-  CONSTANT_DEPENDENCIES -> ComputeConstantValueTask
-  CONSTANT_DEPENDENCIES [shape=box]
-  CONSTANT_EXPRESSIONS_DEPENDENCIES -> EvaluateUnitConstantsTask
-  CONSTANT_EXPRESSIONS_DEPENDENCIES [shape=box]
-  CONSTANT_EXPRESSION_RESOLVED -> ComputeConstantDependenciesTask
-  CONSTANT_EXPRESSION_RESOLVED [shape=box]
-  CONSTANT_VALUE -> ComputeConstantValueTask
-  CONSTANT_VALUE -> EvaluateUnitConstantsTask
-  CONSTANT_VALUE -> VerifyUnitTask
-  CONSTANT_VALUE [shape=box]
-  CONTAINING_LIBRARIES -> DartErrorsTask
-  CONTAINING_LIBRARIES [shape=box]
-  CONTENT -> ScanDartTask
-  CONTENT [shape=box]
-  CREATED_RESOLVED_UNIT [shape=box]
-  CREATED_RESOLVED_UNIT1 [shape=box]
-  CREATED_RESOLVED_UNIT10 -> InferInstanceMembersInUnitTask
-  CREATED_RESOLVED_UNIT10 -> InferStaticVariableTypeTask
-  CREATED_RESOLVED_UNIT10 -> PartiallyResolveUnitReferencesTask
-  CREATED_RESOLVED_UNIT10 -> ResolveInstanceFieldsInUnitTask
-  CREATED_RESOLVED_UNIT10 -> ResolveUnitTask
-  CREATED_RESOLVED_UNIT10 [shape=box]
-  CREATED_RESOLVED_UNIT11 -> ResolveConstantExpressionTask
-  CREATED_RESOLVED_UNIT11 [shape=box]
-  CREATED_RESOLVED_UNIT12 [shape=box]
-  CREATED_RESOLVED_UNIT2 [shape=box]
-  CREATED_RESOLVED_UNIT3 [shape=box]
-  CREATED_RESOLVED_UNIT4 [shape=box]
-  CREATED_RESOLVED_UNIT5 [shape=box]
-  CREATED_RESOLVED_UNIT6 [shape=box]
-  CREATED_RESOLVED_UNIT7 [shape=box]
-  CREATED_RESOLVED_UNIT8 -> ResolveInstanceFieldsInUnitTask
-  CREATED_RESOLVED_UNIT8 [shape=box]
-  CREATED_RESOLVED_UNIT9 -> InferInstanceMembersInUnitTask
-  CREATED_RESOLVED_UNIT9 [shape=box]
-  ComputeConstantDependenciesTask -> CONSTANT_DEPENDENCIES
-  ComputeConstantValueTask -> CONSTANT_VALUE
-  ComputeInferableStaticVariableDependenciesTask -> INFERABLE_STATIC_VARIABLE_DEPENDENCIES
-  ComputeLibraryCycleTask -> LIBRARY_CYCLE
-  ComputeLibraryCycleTask -> LIBRARY_CYCLE_DEPENDENCIES
-  ComputeLibraryCycleTask -> LIBRARY_CYCLE_UNITS
-  ComputeRequiredConstantsTask -> PENDING_ERRORS
-  ComputeRequiredConstantsTask -> REQUIRED_CONSTANTS
-  ContainingLibrariesTask -> CONTAINING_LIBRARIES
-  DART_ERRORS -> LibraryErrorsReadyTask
-  DART_ERRORS [shape=box]
-  DART_SCRIPTS -> ScanDartTask
-  DART_SCRIPTS [shape=box]
-  DartErrorsTask -> DART_ERRORS
-  EXPLICITLY_IMPORTED_LIBRARIES [shape=box]
-  EXPORTED_LIBRARIES -> BuildDirectiveElementsTask
-  EXPORTED_LIBRARIES -> ReadyLibraryElement2Task
-  EXPORTED_LIBRARIES -> ReadyLibraryElement5Task
-  EXPORTED_LIBRARIES -> ReadyLibraryElement7Task
-  EXPORTED_LIBRARIES -> ResolveDirectiveElementsTask
-  EXPORTED_LIBRARIES -> ResolveTopLevelLibraryTypeBoundsTask
-  EXPORTED_LIBRARIES [shape=box]
-  EXPORT_SOURCE_CLOSURE -> BuildExportNamespaceTask
-  EXPORT_SOURCE_CLOSURE -> ResolveTopLevelUnitTypeBoundsTask
-  EXPORT_SOURCE_CLOSURE [shape=box]
-  EvaluateUnitConstantsTask -> CREATED_RESOLVED_UNIT12
-  EvaluateUnitConstantsTask -> RESOLVED_UNIT12
-  GatherUsedImportedElementsTask -> USED_IMPORTED_ELEMENTS
-  GatherUsedLocalElementsTask -> USED_LOCAL_ELEMENTS
-  GenerateHintsTask -> HINTS
-  GenerateLintsTask -> LINTS
-  HINTS -> LibraryUnitErrorsTask
-  HINTS [shape=box]
-  IGNORE_INFO -> DartErrorsTask
-  IGNORE_INFO [shape=box]
-  IMPORTED_LIBRARIES -> BuildDirectiveElementsTask
-  IMPORTED_LIBRARIES -> ReadyLibraryElement2Task
-  IMPORTED_LIBRARIES -> ReadyLibraryElement5Task
-  IMPORTED_LIBRARIES -> ReadyLibraryElement7Task
-  IMPORTED_LIBRARIES -> ResolveDirectiveElementsTask
-  IMPORTED_LIBRARIES -> ResolveTopLevelLibraryTypeBoundsTask
-  IMPORTED_LIBRARIES -> ResolveTopLevelUnitTypeBoundsTask
-  IMPORTED_LIBRARIES [shape=box]
-  INCLUDED_PARTS -> BuildLibraryElementTask
-  INCLUDED_PARTS [shape=box]
-  INFERABLE_STATIC_VARIABLES_IN_UNIT -> InferStaticVariableTypesInUnitTask
-  INFERABLE_STATIC_VARIABLES_IN_UNIT [shape=box]
-  INFERABLE_STATIC_VARIABLE_DEPENDENCIES -> InferStaticVariableTypeTask
-  INFERABLE_STATIC_VARIABLE_DEPENDENCIES [shape=box]
-  INFERRED_STATIC_VARIABLE -> InferStaticVariableTypeTask
-  INFERRED_STATIC_VARIABLE -> InferStaticVariableTypesInUnitTask
-  INFERRED_STATIC_VARIABLE [shape=box]
-  IS_LAUNCHABLE [shape=box]
-  InferInstanceMembersInUnitTask -> CREATED_RESOLVED_UNIT10
-  InferInstanceMembersInUnitTask -> RESOLVED_UNIT10
-  InferStaticVariableTypeTask -> INFERRED_STATIC_VARIABLE
-  InferStaticVariableTypeTask -> STATIC_VARIABLE_RESOLUTION_ERRORS
-  InferStaticVariableTypesInUnitTask -> CREATED_RESOLVED_UNIT8
-  InferStaticVariableTypesInUnitTask -> RESOLVED_UNIT8
-  InferStaticVariableTypesInUnitTask -> STATIC_VARIABLE_RESOLUTION_ERRORS_IN_UNIT
-  LIBRARY_CYCLE [shape=box]
-  LIBRARY_CYCLE_DEPENDENCIES -> InferInstanceMembersInUnitTask
-  LIBRARY_CYCLE_DEPENDENCIES -> InferStaticVariableTypeTask
-  LIBRARY_CYCLE_DEPENDENCIES -> PartiallyResolveUnitReferencesTask
-  LIBRARY_CYCLE_DEPENDENCIES -> ResolveInstanceFieldsInUnitTask
-  LIBRARY_CYCLE_DEPENDENCIES [shape=box]
-  LIBRARY_CYCLE_UNITS -> InferInstanceMembersInUnitTask
-  LIBRARY_CYCLE_UNITS -> ResolveInstanceFieldsInUnitTask
-  LIBRARY_CYCLE_UNITS -> ResolveUnitTask
-  LIBRARY_CYCLE_UNITS [shape=box]
-  LIBRARY_ELEMENT -> LibraryErrorsReadyTask
-  LIBRARY_ELEMENT [shape=box]
-  LIBRARY_ELEMENT1 -> BuildDirectiveElementsTask
-  LIBRARY_ELEMENT1 -> ResolveVariableReferencesTask
-  LIBRARY_ELEMENT1 [shape=box]
-  LIBRARY_ELEMENT2 -> BuildPublicNamespaceTask
-  LIBRARY_ELEMENT2 -> BuildSourceExportClosureTask
-  LIBRARY_ELEMENT2 -> ComputeLibraryCycleTask
-  LIBRARY_ELEMENT2 -> ReadyLibraryElement2Task
-  LIBRARY_ELEMENT2 -> ResolveDirectiveElementsTask
-  LIBRARY_ELEMENT2 [shape=box]
-  LIBRARY_ELEMENT3 -> BuildExportNamespaceTask
-  LIBRARY_ELEMENT3 -> BuildTypeProviderTask
-  LIBRARY_ELEMENT3 [shape=box]
-  LIBRARY_ELEMENT4 -> ResolveTopLevelLibraryTypeBoundsTask
-  LIBRARY_ELEMENT4 -> ResolveTopLevelUnitTypeBoundsTask
-  LIBRARY_ELEMENT4 [shape=box]
-  LIBRARY_ELEMENT5 -> ResolveLibraryTypeNamesTask
-  LIBRARY_ELEMENT5 -> ResolveTopLevelLibraryTypeBoundsTask
-  LIBRARY_ELEMENT5 -> ResolveUnitTypeNamesTask
-  LIBRARY_ELEMENT5 [shape=box]
-  LIBRARY_ELEMENT6 -> PartiallyResolveUnitReferencesTask
-  LIBRARY_ELEMENT6 -> ReadyLibraryElement5Task
-  LIBRARY_ELEMENT6 -> ResolveInstanceFieldsInUnitTask
-  LIBRARY_ELEMENT6 -> ResolvedUnit7InLibraryTask
-  LIBRARY_ELEMENT6 [shape=box]
-  LIBRARY_ELEMENT7 -> ReadyLibraryElement7Task
-  LIBRARY_ELEMENT7 -> ResolvedUnit7InLibraryClosureTask
-  LIBRARY_ELEMENT7 [shape=box]
-  LIBRARY_ELEMENT8 -> ResolveLibraryReferencesTask
-  LIBRARY_ELEMENT8 -> ResolveUnitTask
-  LIBRARY_ELEMENT8 [shape=box]
-  LIBRARY_ELEMENT9 -> EvaluateUnitConstantsTask
-  LIBRARY_ELEMENT9 -> ResolveLibraryTask
-  LIBRARY_ELEMENT9 [shape=box]
-  LIBRARY_ERRORS_READY [shape=box]
-  LIBRARY_SPECIFIC_UNITS -> GenerateHintsTask
-  LIBRARY_SPECIFIC_UNITS -> ReadyResolvedUnitTask
-  LIBRARY_SPECIFIC_UNITS -> ResolveLibraryReferencesTask
-  LIBRARY_SPECIFIC_UNITS -> ResolveLibraryTypeNamesTask
-  LIBRARY_SPECIFIC_UNITS -> ResolveTopLevelLibraryTypeBoundsTask
-  LIBRARY_SPECIFIC_UNITS -> ResolvedUnit7InLibraryTask
-  LIBRARY_SPECIFIC_UNITS [shape=box]
-  LIBRARY_UNIT_ERRORS -> dartErrorsForUnit
-  LIBRARY_UNIT_ERRORS [shape=box]
-  LINE_INFO -> BuildCompilationUnitElementTask
-  LINE_INFO -> DartErrorsTask
-  LINE_INFO -> ParseDartTask
-  LINE_INFO [shape=box]
-  LINTS -> LibraryUnitErrorsTask
-  LINTS [shape=box]
-  LibraryErrorsReadyTask -> LIBRARY_ERRORS_READY
-  LibraryUnitErrorsTask -> LIBRARY_UNIT_ERRORS
-  MODIFICATION_TIME -> BuildDirectiveElementsTask
-  MODIFICATION_TIME -> BuildLibraryElementTask
-  MODIFICATION_TIME -> ParseDartTask
-  MODIFICATION_TIME -> ResolveDirectiveElementsTask
-  MODIFICATION_TIME -> ScanDartTask
-  MODIFICATION_TIME -> VerifyUnitTask
-  MODIFICATION_TIME [shape=box]
-  PARSED_UNIT -> BuildCompilationUnitElementTask
-  PARSED_UNIT [shape=box]
-  PARSE_ERRORS -> dartErrorsForSource
-  PARSE_ERRORS [shape=box]
-  PENDING_ERRORS -> VerifyUnitTask
-  PENDING_ERRORS [shape=box]
-  ParseDartTask -> EXPLICITLY_IMPORTED_LIBRARIES
-  ParseDartTask -> EXPORTED_LIBRARIES
-  ParseDartTask -> IMPORTED_LIBRARIES
-  ParseDartTask -> INCLUDED_PARTS
-  ParseDartTask -> LIBRARY_SPECIFIC_UNITS
-  ParseDartTask -> PARSED_UNIT
-  ParseDartTask -> PARSE_ERRORS
-  ParseDartTask -> REFERENCED_SOURCES
-  ParseDartTask -> SOURCE_KIND
-  ParseDartTask -> UNITS
-  PartiallyResolveUnitReferencesTask -> CREATED_RESOLVED_UNIT7
-  PartiallyResolveUnitReferencesTask -> INFERABLE_STATIC_VARIABLES_IN_UNIT
-  PartiallyResolveUnitReferencesTask -> RESOLVED_UNIT7
-  READY_LIBRARY_ELEMENT2 -> ComputeLibraryCycleTask
-  READY_LIBRARY_ELEMENT2 -> ReadyLibraryElement2Task
-  READY_LIBRARY_ELEMENT2 [shape=box]
-  READY_LIBRARY_ELEMENT6 -> PartiallyResolveUnitReferencesTask
-  READY_LIBRARY_ELEMENT6 -> ReadyLibraryElement5Task
-  READY_LIBRARY_ELEMENT6 [shape=box]
-  READY_LIBRARY_ELEMENT7 -> ReadyLibraryElement7Task
-  READY_LIBRARY_ELEMENT7 -> ResolvedUnit7InLibraryClosureTask
-  READY_LIBRARY_ELEMENT7 [shape=box]
-  READY_RESOLVED_UNIT -> ResolveLibraryTask
-  READY_RESOLVED_UNIT -> VerifyUnitTask
-  READY_RESOLVED_UNIT [shape=box]
-  REFERENCED_SOURCES -> BuildDirectiveElementsTask
-  REFERENCED_SOURCES -> ResolveDirectiveElementsTask
-  REFERENCED_SOURCES -> VerifyUnitTask
-  REFERENCED_SOURCES [shape=box]
-  REQUIRED_CONSTANTS -> VerifyUnitTask
-  REQUIRED_CONSTANTS [shape=box]
-  RESOLVED_UNIT -> ComputeRequiredConstantsTask
-  RESOLVED_UNIT -> GenerateHintsTask
-  RESOLVED_UNIT -> GenerateLintsTask
-  RESOLVED_UNIT -> ReadyResolvedUnitTask
-  RESOLVED_UNIT -> VerifyUnitTask
-  RESOLVED_UNIT [shape=box]
-  RESOLVED_UNIT1 -> BuildDirectiveElementsTask
-  RESOLVED_UNIT1 -> BuildLibraryElementTask
-  RESOLVED_UNIT1 -> ResolveDirectiveElementsTask
-  RESOLVED_UNIT1 [shape=box]
-  RESOLVED_UNIT10 -> ResolveUnitTask
-  RESOLVED_UNIT10 [shape=box]
-  RESOLVED_UNIT11 -> EvaluateUnitConstantsTask
-  RESOLVED_UNIT11 -> GatherUsedImportedElementsTask
-  RESOLVED_UNIT11 -> GatherUsedLocalElementsTask
-  RESOLVED_UNIT11 -> ResolveLibraryReferencesTask
-  RESOLVED_UNIT11 [shape=box]
-  RESOLVED_UNIT12 -> StrongModeVerifyUnitTask
-  RESOLVED_UNIT12 [shape=box]
-  RESOLVED_UNIT2 -> BuildEnumMemberElementsTask
-  RESOLVED_UNIT2 [shape=box]
-  RESOLVED_UNIT3 -> ResolveTopLevelUnitTypeBoundsTask
-  RESOLVED_UNIT3 [shape=box]
-  RESOLVED_UNIT4 -> ResolveTopLevelLibraryTypeBoundsTask
-  RESOLVED_UNIT4 -> ResolveUnitTypeNamesTask
-  RESOLVED_UNIT4 [shape=box]
-  RESOLVED_UNIT5 -> ResolveLibraryTypeNamesTask
-  RESOLVED_UNIT5 -> ResolveVariableReferencesTask
-  RESOLVED_UNIT5 [shape=box]
-  RESOLVED_UNIT6 -> PartiallyResolveUnitReferencesTask
-  RESOLVED_UNIT6 [shape=box]
-  RESOLVED_UNIT7 -> ComputeInferableStaticVariableDependenciesTask
-  RESOLVED_UNIT7 -> InferStaticVariableTypeTask
-  RESOLVED_UNIT7 -> InferStaticVariableTypesInUnitTask
-  RESOLVED_UNIT7 -> ResolvedUnit7InLibraryTask
-  RESOLVED_UNIT7 [shape=box]
-  RESOLVED_UNIT8 -> ResolveInstanceFieldsInUnitTask
-  RESOLVED_UNIT8 [shape=box]
-  RESOLVED_UNIT9 -> InferInstanceMembersInUnitTask
-  RESOLVED_UNIT9 [shape=box]
-  RESOLVE_DIRECTIVES_ERRORS -> LibraryUnitErrorsTask
-  RESOLVE_DIRECTIVES_ERRORS [shape=box]
-  RESOLVE_TYPE_BOUNDS_ERRORS -> LibraryUnitErrorsTask
-  RESOLVE_TYPE_BOUNDS_ERRORS [shape=box]
-  RESOLVE_TYPE_NAMES_ERRORS -> LibraryUnitErrorsTask
-  RESOLVE_TYPE_NAMES_ERRORS [shape=box]
-  RESOLVE_UNIT_ERRORS -> LibraryUnitErrorsTask
-  RESOLVE_UNIT_ERRORS [shape=box]
-  ReadyLibraryElement2Task -> READY_LIBRARY_ELEMENT2
-  ReadyLibraryElement5Task -> READY_LIBRARY_ELEMENT6
-  ReadyLibraryElement7Task -> READY_LIBRARY_ELEMENT7
-  ReadyResolvedUnitTask -> READY_RESOLVED_UNIT
-  ResolveConstantExpressionTask -> CONSTANT_EXPRESSION_RESOLVED
-  ResolveDirectiveElementsTask -> CREATED_RESOLVED_UNIT2
-  ResolveDirectiveElementsTask -> RESOLVED_UNIT2
-  ResolveDirectiveElementsTask -> RESOLVE_DIRECTIVES_ERRORS
-  ResolveInstanceFieldsInUnitTask -> CREATED_RESOLVED_UNIT9
-  ResolveInstanceFieldsInUnitTask -> RESOLVED_UNIT9
-  ResolveLibraryReferencesTask -> LIBRARY_ELEMENT9
-  ResolveLibraryTask -> LIBRARY_ELEMENT
-  ResolveLibraryTypeNamesTask -> LIBRARY_ELEMENT6
-  ResolveTopLevelLibraryTypeBoundsTask -> LIBRARY_ELEMENT5
-  ResolveTopLevelUnitTypeBoundsTask -> CREATED_RESOLVED_UNIT4
-  ResolveTopLevelUnitTypeBoundsTask -> RESOLVED_UNIT4
-  ResolveTopLevelUnitTypeBoundsTask -> RESOLVE_TYPE_BOUNDS_ERRORS
-  ResolveUnitTask -> CONSTANT_EXPRESSIONS_DEPENDENCIES
-  ResolveUnitTask -> CREATED_RESOLVED_UNIT11
-  ResolveUnitTask -> RESOLVED_UNIT11
-  ResolveUnitTask -> RESOLVE_UNIT_ERRORS
-  ResolveUnitTypeNamesTask -> CREATED_RESOLVED_UNIT5
-  ResolveUnitTypeNamesTask -> RESOLVED_UNIT5
-  ResolveUnitTypeNamesTask -> RESOLVE_TYPE_NAMES_ERRORS
-  ResolveVariableReferencesTask -> CREATED_RESOLVED_UNIT6
-  ResolveVariableReferencesTask -> RESOLVED_UNIT6
-  ResolveVariableReferencesTask -> VARIABLE_REFERENCE_ERRORS
-  ResolvedUnit7InLibraryClosureTask -> LIBRARY_ELEMENT8
-  ResolvedUnit7InLibraryTask -> LIBRARY_ELEMENT7
-  SCAN_ERRORS -> dartErrorsForSource
-  SCAN_ERRORS [shape=box]
-  SOURCE_KIND -> BuildDirectiveElementsTask
-  SOURCE_KIND -> ResolveDirectiveElementsTask
-  SOURCE_KIND [shape=box]
-  STATIC_VARIABLE_RESOLUTION_ERRORS -> InferStaticVariableTypesInUnitTask
-  STATIC_VARIABLE_RESOLUTION_ERRORS [shape=box]
-  STATIC_VARIABLE_RESOLUTION_ERRORS_IN_UNIT -> LibraryUnitErrorsTask
-  STATIC_VARIABLE_RESOLUTION_ERRORS_IN_UNIT [shape=box]
-  STRONG_MODE_ERRORS -> LibraryUnitErrorsTask
-  STRONG_MODE_ERRORS [shape=box]
-  ScanDartTask -> IGNORE_INFO
-  ScanDartTask -> LINE_INFO
-  ScanDartTask -> SCAN_ERRORS
-  ScanDartTask -> TOKEN_STREAM
-  StrongModeVerifyUnitTask -> CREATED_RESOLVED_UNIT
-  StrongModeVerifyUnitTask -> RESOLVED_UNIT
-  StrongModeVerifyUnitTask -> STRONG_MODE_ERRORS
-  TOKEN_STREAM -> ParseDartTask
-  TOKEN_STREAM [shape=box]
-  TYPE_PROVIDER -> BuildEnumMemberElementsTask
-  TYPE_PROVIDER -> ComputeConstantDependenciesTask
-  TYPE_PROVIDER -> ComputeConstantValueTask
-  TYPE_PROVIDER -> GenerateHintsTask
-  TYPE_PROVIDER -> InferInstanceMembersInUnitTask
-  TYPE_PROVIDER -> InferStaticVariableTypeTask
-  TYPE_PROVIDER -> PartiallyResolveUnitReferencesTask
-  TYPE_PROVIDER -> ResolveInstanceFieldsInUnitTask
-  TYPE_PROVIDER -> ResolveLibraryTypeNamesTask
-  TYPE_PROVIDER -> ResolveUnitTask
-  TYPE_PROVIDER -> ResolveUnitTypeNamesTask
-  TYPE_PROVIDER -> ResolveVariableReferencesTask
-  TYPE_PROVIDER -> StrongModeVerifyUnitTask
-  TYPE_PROVIDER -> VerifyUnitTask
-  TYPE_PROVIDER [shape=box]
-  UNITS -> LibraryErrorsReadyTask
-  UNITS [shape=box]
-  USED_IMPORTED_ELEMENTS -> GenerateHintsTask
-  USED_IMPORTED_ELEMENTS [shape=box]
-  USED_LOCAL_ELEMENTS -> GenerateHintsTask
-  USED_LOCAL_ELEMENTS [shape=box]
-  VARIABLE_REFERENCE_ERRORS -> LibraryUnitErrorsTask
-  VARIABLE_REFERENCE_ERRORS [shape=box]
-  VERIFY_ERRORS -> LibraryUnitErrorsTask
-  VERIFY_ERRORS [shape=box]
-  VerifyUnitTask -> VERIFY_ERRORS
-  dartErrorsForSource -> DartErrorsTask
-  dartErrorsForSource [shape=hexagon]
-  dartErrorsForUnit -> DartErrorsTask
-  dartErrorsForUnit [shape=hexagon]
-}
diff --git a/pkg/analyzer_cli/lib/src/build_mode.dart b/pkg/analyzer_cli/lib/src/build_mode.dart
index ee2a239..b2e0dfb 100644
--- a/pkg/analyzer_cli/lib/src/build_mode.dart
+++ b/pkg/analyzer_cli/lib/src/build_mode.dart
@@ -312,18 +312,21 @@
         }
       }
 
+      ErrorSeverity severity;
+      if (options.buildSummaryOnly) {
+        severity = ErrorSeverity.NONE;
+      } else {
+        // Process errors.
+        await _printErrors(outputPath: options.buildAnalysisOutput);
+        severity = await _computeMaxSeverity();
+      }
+
       if (dependencyTracker != null) {
         io.File file = new io.File(dependencyTracker.outputPath);
         file.writeAsStringSync(dependencyTracker.dependencies.join('\n'));
       }
 
-      if (options.buildSummaryOnly) {
-        return ErrorSeverity.NONE;
-      } else {
-        // Process errors.
-        await _printErrors(outputPath: options.buildAnalysisOutput);
-        return await _computeMaxSeverity();
-      }
+      return severity;
     });
   }
 
@@ -354,8 +357,12 @@
             uriToUnit[absoluteUri];
       }
 
-      Map<String, LinkedLibraryBuilder> linkResult = link(libraryUris,
-          getDependency, getUnit, analysisDriver.declaredVariables.get);
+      Map<String, LinkedLibraryBuilder> linkResult = link(
+          libraryUris,
+          getDependency,
+          getUnit,
+          analysisDriver.declaredVariables,
+          analysisOptions);
       linkResult.forEach(assembler.addLinkedLibrary);
     });
   }
@@ -442,7 +449,9 @@
 
     var sourceFactory = new SourceFactory(<UriResolver>[
       new DartUriResolver(sdk),
-      new InSummaryUriResolver(resourceProvider, summaryDataStore),
+      new TrackingInSummaryUriResolver(
+          new InSummaryUriResolver(resourceProvider, summaryDataStore),
+          dependencyTracker),
       new ExplicitSourceResolver(uriToFileMap)
     ]);
 
@@ -557,6 +566,22 @@
 }
 
 /**
+ * Tracks paths to dependencies, really just a thin api around a Set<String>.
+ */
+class DependencyTracker {
+  final _dependencies = Set<String>();
+
+  /// The path to the file to create once tracking is done.
+  final String outputPath;
+
+  DependencyTracker(this.outputPath);
+
+  Iterable<String> get dependencies => _dependencies;
+
+  void record(String path) => _dependencies.add(path);
+}
+
+/**
  * [PackageBundleProvider] that always reads from the [ResourceProvider].
  */
 class DirectPackageBundleProvider implements PackageBundleProvider {
@@ -721,17 +746,24 @@
 }
 
 /**
- * Tracks paths to dependencies, really just a thin api around a Set<String>.
+ * Wrapper for [InSummaryUriResolver] that tracks accesses to summaries.
  */
-class DependencyTracker {
-  final _dependencies = Set<String>();
+class TrackingInSummaryUriResolver extends UriResolver {
+  // May be null.
+  final DependencyTracker dependencyTracker;
+  final InSummaryUriResolver inSummaryUriResolver;
 
-  Iterable<String> get dependencies => _dependencies;
+  TrackingInSummaryUriResolver(
+      this.inSummaryUriResolver, this.dependencyTracker);
 
-  /// The path to the file to create once tracking is done.
-  final String outputPath;
-
-  DependencyTracker(this.outputPath);
-
-  void record(String path) => _dependencies.add(path);
+  @override
+  Source resolveAbsolute(Uri uri, [Uri actualUri]) {
+    var source = inSummaryUriResolver.resolveAbsolute(uri, actualUri);
+    if (dependencyTracker != null &&
+        source != null &&
+        source is InSummarySource) {
+      dependencyTracker.record(source.summaryPath);
+    }
+    return source;
+  }
 }
diff --git a/pkg/analyzer_cli/lib/src/driver.dart b/pkg/analyzer_cli/lib/src/driver.dart
index 8b2b808..bd54543 100644
--- a/pkg/analyzer_cli/lib/src/driver.dart
+++ b/pkg/analyzer_cli/lib/src/driver.dart
@@ -24,6 +24,7 @@
 import 'package:analyzer/src/generated/utilities_general.dart'
     show PerformanceTag;
 import 'package:analyzer/src/plugin/resolver_provider.dart';
+import 'package:analyzer/src/manifest/manifest_validator.dart';
 import 'package:analyzer/src/pubspec/pubspec_validator.dart';
 import 'package:analyzer/src/source/package_map_resolver.dart';
 import 'package:analyzer/src/source/path_filter.dart';
@@ -52,8 +53,6 @@
 import 'package:package_config/packages_file.dart' as pkgfile show parse;
 import 'package:package_config/src/packages_impl.dart' show MapPackages;
 import 'package:path/path.dart' as path;
-import 'package:plugin/manager.dart';
-import 'package:plugin/plugin.dart';
 import 'package:telemetry/crash_reporting.dart';
 import 'package:telemetry/telemetry.dart' as telemetry;
 import 'package:yaml/yaml.dart';
@@ -100,9 +99,6 @@
 
   ContextCache contextCache;
 
-  /// The plugins that are defined outside the `analyzer_cli` package.
-  List<Plugin> _userDefinedPlugins = <Plugin>[];
-
   /// The driver that was most recently created by a call to [_analyzeAll], or
   /// `null` if [_analyzeAll] hasn't been called yet.
   @visibleForTesting
@@ -149,11 +145,6 @@
   CrashReportSender get crashReportSender => (_crashReportSender ??=
       new CrashReportSender('Dart_analyzer_cli', analytics));
 
-  @override
-  void set userDefinedPlugins(List<Plugin> plugins) {
-    _userDefinedPlugins = plugins ?? <Plugin>[];
-  }
-
   /**
    * Converts the given [filePath] into absolute and normalized.
    */
@@ -173,7 +164,7 @@
 
     StringUtilities.INTERNER = new MappedInterner();
 
-    _processPlugins();
+    linter.registerLintRules();
 
     // Parse commandline options.
     CommandLineOptions options = CommandLineOptions.parse(args);
@@ -357,9 +348,8 @@
           File file = resourceProvider.getFile(path);
           String content = file.readAsStringSync();
           LineInfo lineInfo = new LineInfo.fromContent(content);
-          List<AnalysisError> errors =
-              GenerateOptionsErrorsTask.analyzeAnalysisOptions(
-                  file.createSource(), content, analysisDriver.sourceFactory);
+          List<AnalysisError> errors = analyzeAnalysisOptions(
+              file.createSource(), content, analysisDriver.sourceFactory);
           formatter.formatErrors([new AnalysisErrorInfoImpl(errors, lineInfo)]);
           for (AnalysisError error in errors) {
             ErrorSeverity severity = determineProcessedSeverity(
@@ -389,6 +379,25 @@
           } catch (exception) {
             // If the file cannot be analyzed, ignore it.
           }
+        } else if (shortName == AnalysisEngine.ANDROID_MANIFEST_FILE) {
+          try {
+            File file = resourceProvider.getFile(path);
+            String content = file.readAsStringSync();
+            ManifestValidator validator =
+                new ManifestValidator(file.createSource());
+            LineInfo lineInfo = new LineInfo.fromContent(content);
+            List<AnalysisError> errors = validator.validate(
+                content, analysisDriver.analysisOptions.chromeOsManifestChecks);
+            formatter
+                .formatErrors([new AnalysisErrorInfoImpl(errors, lineInfo)]);
+            for (AnalysisError error in errors) {
+              ErrorSeverity severity = determineProcessedSeverity(
+                  error, options, analysisDriver.analysisOptions);
+              allResult = allResult.max(severity);
+            }
+          } catch (exception) {
+            // If the file cannot be analyzed, ignore it.
+          }
         } else {
           dartFiles.add(path);
           var file = analysisDriver.fsState.getFileForPath(path);
@@ -555,7 +564,8 @@
         for (io.FileSystemEntity entry
             in directory.listSync(recursive: true, followLinks: false)) {
           String relative = path.relative(entry.path, from: directory.path);
-          if (AnalysisEngine.isDartFileName(entry.path) &&
+          if ((AnalysisEngine.isDartFileName(entry.path) ||
+                  AnalysisEngine.isManifestFileName(entry.path)) &&
               entry is io.File &&
               !pathFilter.ignored(entry.path) &&
               !_isInHiddenDir(relative)) {
@@ -735,17 +745,6 @@
   bool _isInHiddenDir(String relative) =>
       path.split(relative).any((part) => part.startsWith("."));
 
-  void _processPlugins() {
-    List<Plugin> plugins = <Plugin>[];
-    plugins.addAll(AnalysisEngine.instance.requiredPlugins);
-    plugins.addAll(_userDefinedPlugins);
-
-    ExtensionManager manager = new ExtensionManager();
-    manager.processPlugins(plugins);
-
-    linter.registerLintRules();
-  }
-
   /// Analyze a single source.
   Future<ErrorSeverity> _runAnalyzer(
       FileState file, CommandLineOptions options, ErrorFormatter formatter) {
diff --git a/pkg/analyzer_cli/lib/src/error_formatter.dart b/pkg/analyzer_cli/lib/src/error_formatter.dart
index 72ea9ed..4bcfb70 100644
--- a/pkg/analyzer_cli/lib/src/error_formatter.dart
+++ b/pkg/analyzer_cli/lib/src/error_formatter.dart
@@ -312,6 +312,7 @@
   static final int _slashCodeUnit = '\\'.codeUnitAt(0);
   static final int _newline = '\n'.codeUnitAt(0);
   static final int _return = '\r'.codeUnitAt(0);
+  final Set<AnalysisError> _seenErrors = <AnalysisError>{};
 
   MachineErrorFormatter(
       StringSink out, CommandLineOptions options, AnalysisStats stats,
@@ -322,6 +323,10 @@
 
   void formatError(
       Map<AnalysisError, LineInfo> errorToLine, AnalysisError error) {
+    // Ensure we don't over-report (#36062).
+    if (!_seenErrors.add(error)) {
+      return;
+    }
     Source source = error.source;
     var location = errorToLine[error].getLocation(error.offset);
     int length = error.length;
diff --git a/pkg/analyzer_cli/lib/starter.dart b/pkg/analyzer_cli/lib/starter.dart
index 09db5bf..88a232c 100644
--- a/pkg/analyzer_cli/lib/starter.dart
+++ b/pkg/analyzer_cli/lib/starter.dart
@@ -7,7 +7,6 @@
 
 import 'package:analyzer/src/plugin/resolver_provider.dart';
 import 'package:analyzer_cli/src/driver.dart';
-import 'package:plugin/plugin.dart';
 
 /**
  * An object that can be used to start a command-line analysis. This class
@@ -30,11 +29,6 @@
   void set packageResolverProvider(ResolverProvider provider);
 
   /**
-   * Set the [plugins] that are defined outside the analyzer_cli package.
-   */
-  void set userDefinedPlugins(List<Plugin> plugins);
-
-  /**
    * Use the given command-line [arguments] to start this analyzer.
    *
    * If [sendPort] is provided it is used for bazel worker communication
diff --git a/pkg/analyzer_cli/pubspec.yaml b/pkg/analyzer_cli/pubspec.yaml
index bfa2b84..cac47aa 100644
--- a/pkg/analyzer_cli/pubspec.yaml
+++ b/pkg/analyzer_cli/pubspec.yaml
@@ -8,7 +8,6 @@
   collection: ^1.14.1
   linter: ^0.1.16
   package_config: '>=0.1.5 <2.0.0'
-  plugin: '>=0.1.0 <0.3.0'
   protobuf: ^0.9.0
   telemetry: ^0.0.1
   yaml: ^2.1.2
diff --git a/pkg/analyzer_cli/test/driver_test.dart b/pkg/analyzer_cli/test/driver_test.dart
index aa44888..054521d 100644
--- a/pkg/analyzer_cli/test/driver_test.dart
+++ b/pkg/analyzer_cli/test/driver_test.dart
@@ -806,6 +806,30 @@
       expect(exitCode, 0);
     });
   }
+
+  test_manifestFileChecks() async {
+    await withTempDirAsync((tempDir) async {
+      String filePath =
+          path.join(tempDir, AnalysisEngine.ANALYSIS_OPTIONS_YAML_FILE);
+      new File(filePath).writeAsStringSync('''
+analyzer:
+  optional-checks:
+    chrome-os-manifest-checks: true
+''');
+      String manifestPath =
+          path.join(tempDir, AnalysisEngine.ANDROID_MANIFEST_FILE);
+      new File(manifestPath).writeAsStringSync('''
+<manifest
+    xmlns:android="http://schemas.android.com/apk/res/android">
+    <uses-feature android:name="android.software.home_screen" />
+</manifest>
+''');
+      await drive(manifestPath, options: filePath);
+      expect(bulletToDash(outSink),
+          contains("warning - This feature is not supported on Chrome OS"));
+      expect(exitCode, 0);
+    });
+  }
 }
 
 @reflectiveTest
diff --git a/pkg/analyzer_cli/test/errors_reported_once_test.dart b/pkg/analyzer_cli/test/errors_reported_once_test.dart
index 7127abf..be311d7 100644
--- a/pkg/analyzer_cli/test/errors_reported_once_test.dart
+++ b/pkg/analyzer_cli/test/errors_reported_once_test.dart
@@ -53,4 +53,23 @@
     expect(output, contains(unusedWarning));
     expect(unusedWarning.allMatches(output).toList(), hasLength(1));
   }
+
+  test_once_machine() async {
+    String testDir = path.join(testDirectory, 'data', 'errors_reported_once');
+    Driver driver = new Driver(isTesting: true);
+    await driver.start([
+      '--format',
+      'machine',
+      path.join(testDir, 'foo.dart'),
+      path.join(testDir, 'bar.dart')
+    ]);
+
+    expect(exitCode, 0);
+
+    // Ensure that we only have one copy of the error.
+    final String unusedWarning = 'Unused import';
+    String output = errorSink.toString();
+    expect(output, contains(unusedWarning));
+    expect(unusedWarning.allMatches(output).toList(), hasLength(1));
+  }
 }
diff --git a/pkg/analyzer_cli/test/mocks.dart b/pkg/analyzer_cli/test/mocks.dart
index 49f7251..3d3ad59 100644
--- a/pkg/analyzer_cli/test/mocks.dart
+++ b/pkg/analyzer_cli/test/mocks.dart
@@ -63,6 +63,9 @@
   @override
   String name;
 
+  @override
+  String url;
+
   MockErrorCode(this.type, this.errorSeverity, this.name);
 
   @override
diff --git a/pkg/analyzer_plugin/CHANGELOG.md b/pkg/analyzer_plugin/CHANGELOG.md
index 94e7e97..923ee0c 100644
--- a/pkg/analyzer_plugin/CHANGELOG.md
+++ b/pkg/analyzer_plugin/CHANGELOG.md
@@ -1,5 +1,11 @@
 # Changelog
 
+## 0.0.1-alpha.7
+
+- Remove CompletionSuggestion.elementUri, replaced with AvailableSuggestionSet.
+- Remove 'importUri' from CompletionSuggestion.
+- Include type parameters into suggested code completions.
+
 ## 0.0.1-alpha.4
 
 - Upgrade the Dart SDK version contraint
diff --git a/pkg/analyzer_plugin/doc/api.html b/pkg/analyzer_plugin/doc/api.html
index 0d84b98..53599dd 100644
--- a/pkg/analyzer_plugin/doc/api.html
+++ b/pkg/analyzer_plugin/doc/api.html
@@ -900,6 +900,11 @@
         <p>
           The name, as a string, of the error code associated with this error.
         </p>
+      </dd><dt class="field"><b>url: String<span style="color:#999999"> (optional)</span></b></dt><dd>
+        
+        <p>
+          The URL of a page containing documentation associated with this error.
+        </p>
       </dd><dt class="field"><b>hasFix: bool<span style="color:#999999"> (optional)</span></b></dt><dd>
         
         <p>
@@ -1004,12 +1009,6 @@
           is only defined if the displayed text should be different than the
           completion.  Otherwise it is omitted.
         </p>
-      </dd><dt class="field"><b>elementUri: String<span style="color:#999999"> (optional)</span></b></dt><dd>
-        
-        <p>
-          The URI of the element corresponding to this suggestion. It will be
-          set whenever analysis server is able to compute it.
-        </p>
       </dd><dt class="field"><b>selectionOffset: int</b></dt><dd>
         
         <p>
@@ -1120,12 +1119,6 @@
           The type of the options parameter being suggested. This field is
           omitted if the parameterName field is omitted.
         </p>
-      </dd><dt class="field"><b>importUri: String<span style="color:#999999"> (optional)</span></b></dt><dd>
-        
-        <p>
-          The import to be added if the suggestion is out of scope and needs
-          an import to be added to be in scope.
-        </p>
       </dd></dl></dd><dt class="typeDefinition"><a name="type_CompletionSuggestionKind">CompletionSuggestionKind: String</a></dt><dd>
     <p>
       An enumeration of the kinds of elements that can be included in a
diff --git a/pkg/analyzer_plugin/lib/protocol/protocol_common.dart b/pkg/analyzer_plugin/lib/protocol/protocol_common.dart
index b7718d7..cbc0442 100644
--- a/pkg/analyzer_plugin/lib/protocol/protocol_common.dart
+++ b/pkg/analyzer_plugin/lib/protocol/protocol_common.dart
@@ -102,6 +102,7 @@
  *   "message": String
  *   "correction": optional String
  *   "code": String
+ *   "url": optional String
  *   "hasFix": optional bool
  * }
  *
@@ -120,6 +121,8 @@
 
   String _code;
 
+  String _url;
+
   bool _hasFix;
 
   /**
@@ -206,6 +209,18 @@
   }
 
   /**
+   * The URL of a page containing documentation associated with this error.
+   */
+  String get url => _url;
+
+  /**
+   * The URL of a page containing documentation associated with this error.
+   */
+  void set url(String value) {
+    this._url = value;
+  }
+
+  /**
    * A hint to indicate to interested clients that this error has an associated
    * fix (or fixes). The absence of this field implies there are not known to
    * be fixes. Note that since the operation to calculate whether fixes apply
@@ -233,13 +248,14 @@
 
   AnalysisError(AnalysisErrorSeverity severity, AnalysisErrorType type,
       Location location, String message, String code,
-      {String correction, bool hasFix}) {
+      {String correction, String url, bool hasFix}) {
     this.severity = severity;
     this.type = type;
     this.location = location;
     this.message = message;
     this.correction = correction;
     this.code = code;
+    this.url = url;
     this.hasFix = hasFix;
   }
 
@@ -288,12 +304,16 @@
       } else {
         throw jsonDecoder.mismatch(jsonPath, "code");
       }
+      String url;
+      if (json.containsKey("url")) {
+        url = jsonDecoder.decodeString(jsonPath + ".url", json["url"]);
+      }
       bool hasFix;
       if (json.containsKey("hasFix")) {
         hasFix = jsonDecoder.decodeBool(jsonPath + ".hasFix", json["hasFix"]);
       }
       return new AnalysisError(severity, type, location, message, code,
-          correction: correction, hasFix: hasFix);
+          correction: correction, url: url, hasFix: hasFix);
     } else {
       throw jsonDecoder.mismatch(jsonPath, "AnalysisError", json);
     }
@@ -310,6 +330,9 @@
       result["correction"] = correction;
     }
     result["code"] = code;
+    if (url != null) {
+      result["url"] = url;
+    }
     if (hasFix != null) {
       result["hasFix"] = hasFix;
     }
@@ -328,6 +351,7 @@
           message == other.message &&
           correction == other.correction &&
           code == other.code &&
+          url == other.url &&
           hasFix == other.hasFix;
     }
     return false;
@@ -342,6 +366,7 @@
     hash = JenkinsSmiHash.combine(hash, message.hashCode);
     hash = JenkinsSmiHash.combine(hash, correction.hashCode);
     hash = JenkinsSmiHash.combine(hash, code.hashCode);
+    hash = JenkinsSmiHash.combine(hash, url.hashCode);
     hash = JenkinsSmiHash.combine(hash, hasFix.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
@@ -598,7 +623,6 @@
  *   "relevance": int
  *   "completion": String
  *   "displayText": optional String
- *   "elementUri": optional String
  *   "selectionOffset": int
  *   "selectionLength": int
  *   "isDeprecated": bool
@@ -616,7 +640,6 @@
  *   "hasNamedParameters": optional bool
  *   "parameterName": optional String
  *   "parameterType": optional String
- *   "importUri": optional String
  * }
  *
  * Clients may not extend, implement or mix-in this class.
@@ -630,8 +653,6 @@
 
   String _displayText;
 
-  String _elementUri;
-
   int _selectionOffset;
 
   int _selectionLength;
@@ -666,8 +687,6 @@
 
   String _parameterType;
 
-  String _importUri;
-
   /**
    * The kind of element being suggested.
    */
@@ -732,20 +751,6 @@
   }
 
   /**
-   * The URI of the element corresponding to this suggestion. It will be set
-   * whenever analysis server is able to compute it.
-   */
-  String get elementUri => _elementUri;
-
-  /**
-   * The URI of the element corresponding to this suggestion. It will be set
-   * whenever analysis server is able to compute it.
-   */
-  void set elementUri(String value) {
-    this._elementUri = value;
-  }
-
-  /**
    * The offset, relative to the beginning of the completion, of where the
    * selection should be placed after insertion.
    */
@@ -997,20 +1002,6 @@
     this._parameterType = value;
   }
 
-  /**
-   * The import to be added if the suggestion is out of scope and needs an
-   * import to be added to be in scope.
-   */
-  String get importUri => _importUri;
-
-  /**
-   * The import to be added if the suggestion is out of scope and needs an
-   * import to be added to be in scope.
-   */
-  void set importUri(String value) {
-    this._importUri = value;
-  }
-
   CompletionSuggestion(
       CompletionSuggestionKind kind,
       int relevance,
@@ -1020,7 +1011,6 @@
       bool isDeprecated,
       bool isPotential,
       {String displayText,
-      String elementUri,
       String docSummary,
       String docComplete,
       String declaringType,
@@ -1033,13 +1023,11 @@
       int requiredParameterCount,
       bool hasNamedParameters,
       String parameterName,
-      String parameterType,
-      String importUri}) {
+      String parameterType}) {
     this.kind = kind;
     this.relevance = relevance;
     this.completion = completion;
     this.displayText = displayText;
-    this.elementUri = elementUri;
     this.selectionOffset = selectionOffset;
     this.selectionLength = selectionLength;
     this.isDeprecated = isDeprecated;
@@ -1057,7 +1045,6 @@
     this.hasNamedParameters = hasNamedParameters;
     this.parameterName = parameterName;
     this.parameterType = parameterType;
-    this.importUri = importUri;
   }
 
   factory CompletionSuggestion.fromJson(
@@ -1092,11 +1079,6 @@
         displayText = jsonDecoder.decodeString(
             jsonPath + ".displayText", json["displayText"]);
       }
-      String elementUri;
-      if (json.containsKey("elementUri")) {
-        elementUri = jsonDecoder.decodeString(
-            jsonPath + ".elementUri", json["elementUri"]);
-      }
       int selectionOffset;
       if (json.containsKey("selectionOffset")) {
         selectionOffset = jsonDecoder.decodeInt(
@@ -1194,15 +1176,9 @@
         parameterType = jsonDecoder.decodeString(
             jsonPath + ".parameterType", json["parameterType"]);
       }
-      String importUri;
-      if (json.containsKey("importUri")) {
-        importUri = jsonDecoder.decodeString(
-            jsonPath + ".importUri", json["importUri"]);
-      }
       return new CompletionSuggestion(kind, relevance, completion,
           selectionOffset, selectionLength, isDeprecated, isPotential,
           displayText: displayText,
-          elementUri: elementUri,
           docSummary: docSummary,
           docComplete: docComplete,
           declaringType: declaringType,
@@ -1215,8 +1191,7 @@
           requiredParameterCount: requiredParameterCount,
           hasNamedParameters: hasNamedParameters,
           parameterName: parameterName,
-          parameterType: parameterType,
-          importUri: importUri);
+          parameterType: parameterType);
     } else {
       throw jsonDecoder.mismatch(jsonPath, "CompletionSuggestion", json);
     }
@@ -1231,9 +1206,6 @@
     if (displayText != null) {
       result["displayText"] = displayText;
     }
-    if (elementUri != null) {
-      result["elementUri"] = elementUri;
-    }
     result["selectionOffset"] = selectionOffset;
     result["selectionLength"] = selectionLength;
     result["isDeprecated"] = isDeprecated;
@@ -1277,9 +1249,6 @@
     if (parameterType != null) {
       result["parameterType"] = parameterType;
     }
-    if (importUri != null) {
-      result["importUri"] = importUri;
-    }
     return result;
   }
 
@@ -1293,7 +1262,6 @@
           relevance == other.relevance &&
           completion == other.completion &&
           displayText == other.displayText &&
-          elementUri == other.elementUri &&
           selectionOffset == other.selectionOffset &&
           selectionLength == other.selectionLength &&
           isDeprecated == other.isDeprecated &&
@@ -1313,8 +1281,7 @@
           requiredParameterCount == other.requiredParameterCount &&
           hasNamedParameters == other.hasNamedParameters &&
           parameterName == other.parameterName &&
-          parameterType == other.parameterType &&
-          importUri == other.importUri;
+          parameterType == other.parameterType;
     }
     return false;
   }
@@ -1326,7 +1293,6 @@
     hash = JenkinsSmiHash.combine(hash, relevance.hashCode);
     hash = JenkinsSmiHash.combine(hash, completion.hashCode);
     hash = JenkinsSmiHash.combine(hash, displayText.hashCode);
-    hash = JenkinsSmiHash.combine(hash, elementUri.hashCode);
     hash = JenkinsSmiHash.combine(hash, selectionOffset.hashCode);
     hash = JenkinsSmiHash.combine(hash, selectionLength.hashCode);
     hash = JenkinsSmiHash.combine(hash, isDeprecated.hashCode);
@@ -1344,7 +1310,6 @@
     hash = JenkinsSmiHash.combine(hash, hasNamedParameters.hashCode);
     hash = JenkinsSmiHash.combine(hash, parameterName.hashCode);
     hash = JenkinsSmiHash.combine(hash, parameterType.hashCode);
-    hash = JenkinsSmiHash.combine(hash, importUri.hashCode);
     return JenkinsSmiHash.finish(hash);
   }
 }
diff --git a/pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_core.dart b/pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_core.dart
index 298c22c..5051946 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_core.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_core.dart
@@ -21,17 +21,17 @@
   String eol = null;
 
   /**
-   * The change that is being built.
-   */
-  final SourceChange _change = new SourceChange('');
-
-  /**
    * A table mapping group ids to the associated linked edit groups.
    */
   final Map<String, LinkedEditGroup> _linkedEditGroups =
       <String, LinkedEditGroup>{};
 
   /**
+   * The source change selection or `null` if none.
+   */
+  Position _selection;
+
+  /**
    * The range of the selection for the change being built, or `null` if there
    * is no selection.
    */
@@ -44,6 +44,11 @@
   final Set<Position> _lockedPositions = new HashSet<Position>.identity();
 
   /**
+   * A map of absolute normalized path to file edit builder.
+   */
+  final _fileEditBuilders = <String, FileEditBuilderImpl>{};
+
+  /**
    * Initialize a newly created change builder.
    */
   ChangeBuilderImpl();
@@ -53,27 +58,34 @@
 
   @override
   SourceChange get sourceChange {
+    final SourceChange change = new SourceChange('');
+    for (var builder in _fileEditBuilders.values) {
+      if (builder.hasEdits) {
+        change.addFileEdit(builder.fileEdit);
+        builder.finalize();
+      }
+    }
     _linkedEditGroups.forEach((String name, LinkedEditGroup group) {
-      _change.addLinkedEditGroup(group);
+      change.addLinkedEditGroup(group);
     });
-    _linkedEditGroups.clear();
-    return _change;
+    if (_selection != null) {
+      change.selection = _selection;
+    }
+    return change;
   }
 
   @override
   Future<void> addFileEdit(
       String path, void buildFileEdit(FileEditBuilder builder)) async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
-    FileEditBuilderImpl builder = await createFileEditBuilder(path);
+    FileEditBuilderImpl builder = _fileEditBuilders[path];
     if (builder == null) {
-      return;
+      builder = await createFileEditBuilder(path);
+      if (builder != null) {
+        _fileEditBuilders[path] = builder;
+      }
     }
-
-    buildFileEdit(builder);
-    if (builder.hasEdits) {
-      _change.addFileEdit(builder.fileEdit);
-      await builder.finalize();
+    if (builder != null) {
+      buildFileEdit(builder);
     }
   }
 
@@ -102,7 +114,7 @@
 
   @override
   void setSelection(Position position) {
-    _change.selection = position;
+    _selection = position;
   }
 
   void _setSelectionRange(SourceRange range) {
@@ -126,9 +138,8 @@
         _updatePosition(position);
       }
     }
-    Position selection = _change.selection;
-    if (selection != null) {
-      _updatePosition(selection);
+    if (_selection != null) {
+      _updatePosition(_selection);
     }
   }
 }
@@ -288,8 +299,10 @@
 
   @override
   void addDeletion(SourceRange range) {
-    EditBuilderImpl builder = createEditBuilder(range.offset, range.length);
-    _addEdit(builder);
+    if (range.length > 0) {
+      EditBuilderImpl builder = createEditBuilder(range.offset, range.length);
+      _addEdit(builder);
+    }
   }
 
   @override
@@ -347,9 +360,7 @@
   /**
    * Finalize the source file edit that is being built.
    */
-  Future<void> finalize() async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
+  void finalize() {
     // Nothing to do.
   }
 
diff --git a/pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_dart.dart b/pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_dart.dart
index 5ce4c0e..86a386f 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_dart.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/change_builder/change_builder_dart.dart
@@ -72,7 +72,24 @@
       throw new AnalysisException('Cannot analyze "$path"');
     }
     int timeStamp = state == ResultState.VALID ? 0 : -1;
-    return DartFileEditBuilderImpl(this, path, timeStamp, session, result.unit);
+
+    CompilationUnit unit = result.unit;
+    CompilationUnitElement declaredUnit = unit.declaredElement;
+    CompilationUnitElement libraryUnit =
+        declaredUnit.library.definingCompilationUnit;
+
+    DartFileEditBuilderImpl libraryEditBuilder;
+    if (libraryUnit != declaredUnit) {
+      // If the receiver is a part file builder, then proactively cache the
+      // library file builder so that imports can be finalized synchronously.
+      await addFileEdit(libraryUnit.source.fullName,
+          (DartFileEditBuilder builder) {
+        libraryEditBuilder = builder as DartFileEditBuilderImpl;
+      });
+    }
+
+    return DartFileEditBuilderImpl(
+        this, path, timeStamp, session, unit, libraryEditBuilder);
   }
 }
 
@@ -1123,6 +1140,12 @@
   final LibraryElement libraryElement;
 
   /**
+   * The change builder for the library
+   * or `null` if the receiver is the builder for the library.
+   */
+  final DartFileEditBuilderImpl libraryChangeBuilder;
+
+  /**
    * The optional generator of prefixes for new imports.
    */
   ImportPrefixGenerator importPrefixGenerator;
@@ -1134,17 +1157,27 @@
   Map<Uri, _LibraryToImport> librariesToImport = {};
 
   /**
+   * A mapping from libraries that need to be imported relatively in order to
+   * make visible the names used in generated code, to information about these
+   * imports.
+   */
+  Map<String, _LibraryToImport> librariesToRelativelyImport = {};
+
+  /**
    * Initialize a newly created builder to build a source file edit within the
    * change being built by the given [changeBuilder]. The file being edited has
    * the given [path] and [timeStamp], and the given fully resolved [unit].
    */
   DartFileEditBuilderImpl(DartChangeBuilderImpl changeBuilder, String path,
-      int timeStamp, this.session, this.unit)
+      int timeStamp, this.session, this.unit, this.libraryChangeBuilder)
       : libraryElement = unit.declaredElement.library,
         super(changeBuilder, path, timeStamp);
 
   @override
-  bool get hasEdits => super.hasEdits || librariesToImport.isNotEmpty;
+  bool get hasEdits =>
+      super.hasEdits ||
+      librariesToImport.isNotEmpty ||
+      librariesToRelativelyImport.isNotEmpty;
 
   @override
   void addInsertion(int offset, void buildEdit(DartEditBuilder builder)) =>
@@ -1181,21 +1214,12 @@
   }
 
   @override
-  Future<void> finalize() async {
-    // TODO(brianwilkerson) Determine whether this await is necessary.
-    await null;
+  void finalize() {
     if (librariesToImport.isNotEmpty) {
-      CompilationUnitElement definingUnitElement =
-          libraryElement.definingCompilationUnit;
-      if (definingUnitElement == unit.declaredElement) {
-        _addLibraryImports(librariesToImport.values);
-      } else {
-        await (changeBuilder as DartChangeBuilder).addFileEdit(
-            definingUnitElement.source.fullName, (DartFileEditBuilder builder) {
-          (builder as DartFileEditBuilderImpl)
-              ._addLibraryImports(librariesToImport.values);
-        });
-      }
+      _addLibraryImports(librariesToImport.values);
+    }
+    if (librariesToRelativelyImport.isNotEmpty) {
+      _addLibraryImports(librariesToRelativelyImport.values);
     }
   }
 
@@ -1204,15 +1228,20 @@
     return _importLibrary(uri).uriText;
   }
 
+  String importLibraryWithRelativeUri(String uriText, [String prefix = null]) {
+    return _importLibraryWithRelativeUri(uriText, prefix).uriText;
+  }
+
   @override
   ImportLibraryElementResult importLibraryElement({
     @required ResolvedLibraryResult targetLibrary,
     @required String targetPath,
     @required int targetOffset,
     @required LibraryElement requestedLibrary,
-    @required String requestedName,
+    @required Element requestedElement,
   }) {
-    if (librariesToImport.isNotEmpty) {
+    if (librariesToImport.isNotEmpty ||
+        librariesToRelativelyImport.isNotEmpty) {
       throw StateError('Only one library can be safely imported.');
     }
 
@@ -1221,13 +1250,14 @@
       targetPath: targetPath,
       targetOffset: targetOffset,
       requestedLibrary: requestedLibrary,
-      requestedName: requestedName,
+      requestedElement: requestedElement,
     );
 
     var prefix = request.prefix;
     if (request.uri != null) {
       var uriText = _getLibraryUriText(request.uri);
-      librariesToImport[request.uri] = _LibraryToImport(uriText, prefix);
+      (libraryChangeBuilder ?? this).librariesToImport[request.uri] =
+          _LibraryToImport(uriText, prefix);
     }
 
     return ImportLibraryElementResultImpl(prefix);
@@ -1266,11 +1296,14 @@
     // Prepare information about existing imports.
     LibraryDirective libraryDirective;
     List<ImportDirective> importDirectives = <ImportDirective>[];
+    PartDirective partDirective;
     for (Directive directive in unit.directives) {
       if (directive is LibraryDirective) {
         libraryDirective = directive;
       } else if (directive is ImportDirective) {
         importDirectives.add(directive);
+      } else if (directive is PartDirective) {
+        partDirective = directive;
       }
     }
 
@@ -1396,15 +1429,28 @@
     // Insert imports: after the library directive.
     if (libraryDirective != null) {
       addInsertion(libraryDirective.end, (EditBuilder builder) {
+        builder.writeln();
+        builder.writeln();
         for (int i = 0; i < importList.length; i++) {
           var import = importList[i];
-          if (i == 0) {
+          writeImport(builder, import);
+          if (i != importList.length - 1) {
             builder.writeln();
           }
-          builder.writeln();
+        }
+      });
+      return;
+    }
+
+    // Insert imports: before a part directive.
+    if (partDirective != null) {
+      addInsertion(partDirective.offset, (EditBuilder builder) {
+        for (int i = 0; i < importList.length; i++) {
+          var import = importList[i];
           writeImport(builder, import);
           builder.writeln();
         }
+        builder.writeln();
       });
       return;
     }
@@ -1446,31 +1492,45 @@
   }
 
   /**
-   * Computes the best URI to import [what] into the target library.
+   * Computes the best URI to import [uri] into the target library.
    */
-  String _getLibraryUriText(Uri what) {
-    if (what.scheme == 'file') {
+  String _getLibraryUriText(Uri uri) {
+    if (uri.scheme == 'file') {
       var pathContext = session.resourceProvider.pathContext;
-      String whatPath = pathContext.fromUri(what);
+      String whatPath = pathContext.fromUri(uri);
       String libraryPath = libraryElement.source.fullName;
       String libraryFolder = pathContext.dirname(libraryPath);
       String relativeFile = pathContext.relative(whatPath, from: libraryFolder);
       return pathContext.split(relativeFile).join('/');
     }
-    return what.toString();
+    return uri.toString();
   }
 
   /**
    * Arrange to have an import added for the library with the given [uri].
    */
   _LibraryToImport _importLibrary(Uri uri) {
-    var import = librariesToImport[uri];
+    var import = (libraryChangeBuilder ?? this).librariesToImport[uri];
     if (import == null) {
       String uriText = _getLibraryUriText(uri);
       String prefix =
           importPrefixGenerator != null ? importPrefixGenerator(uri) : null;
       import = new _LibraryToImport(uriText, prefix);
-      librariesToImport[uri] = import;
+      (libraryChangeBuilder ?? this).librariesToImport[uri] = import;
+    }
+    return import;
+  }
+
+  /**
+   * Arrange to have an import added for the library with the given relative
+   * [uriText].
+   */
+  _LibraryToImport _importLibraryWithRelativeUri(String uriText,
+      [String prefix = null]) {
+    var import = librariesToRelativelyImport[uriText];
+    if (import == null) {
+      import = new _LibraryToImport(uriText, prefix);
+      librariesToRelativelyImport[uriText] = import;
     }
     return import;
   }
diff --git a/pkg/analyzer_plugin/lib/src/utilities/change_builder/dart/import_library_element.dart b/pkg/analyzer_plugin/lib/src/utilities/change_builder/dart/import_library_element.dart
index 086f7c6..b9e33ed 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/change_builder/dart/import_library_element.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/change_builder/dart/import_library_element.dart
@@ -13,13 +13,13 @@
   @required String targetPath,
   @required int targetOffset,
   @required LibraryElement requestedLibrary,
-  @required String requestedName,
+  @required Element requestedElement,
 }) {
   var targetLibrary = targetResolvedLibrary.element;
 
   var requestedLibraryUri = requestedLibrary.source.uri;
-  var requestedElement = requestedLibrary.exportNamespace.get(requestedName);
   var requestedElementUri = requestedElement.librarySource.uri;
+  var requestedName = requestedElement.displayName;
 
   // If the element is defined in this library, then no prefix needed.
   if (targetLibrary == requestedElement.library) {
diff --git a/pkg/analyzer_plugin/lib/src/utilities/change_builder/dart/syntactic_scope.dart b/pkg/analyzer_plugin/lib/src/utilities/change_builder/dart/syntactic_scope.dart
index 71cf0f0..2f545d1 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/change_builder/dart/syntactic_scope.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/change_builder/dart/syntactic_scope.dart
@@ -142,18 +142,6 @@
   }
 
   @override
-  void visitForEachStatement(ForEachStatement node) {
-    if (!_isCoveredBy(node)) return;
-
-    if (node.loopVariable != null && _isCoveredBy(node.body)) {
-      _addName(node.loopVariable.identifier);
-    }
-
-    node.iterable?.accept(this);
-    node.body.accept(this);
-  }
-
-  @override
   void visitForElement(ForElement node) {
     if (!_isCoveredBy(node)) return;
 
@@ -166,22 +154,9 @@
   void visitForStatement(ForStatement node) {
     if (!_isCoveredBy(node)) return;
 
-    if (node.variables != null) {
-      _addVariables(node.variables);
-    }
-
-    node.condition?.accept(this);
-    node.updaters?.accept(this);
-    node.body.accept(this);
-  }
-
-  @override
-  void visitForStatement2(ForStatement2 node) {
-    if (!_isCoveredBy(node)) return;
-
     _addForLoopParts(node.forLoopParts, node.body);
 
-    super.visitForStatement2(node);
+    super.visitForStatement(node);
   }
 
   @override
@@ -250,6 +225,20 @@
     _visitClassOrMixinMembers(node);
   }
 
+  @override
+  void visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
+    // `TypeName^` is recovered as `<noType> TypeName;`, remove the name.
+    var variableList = node.variables;
+    if (variableList.keyword == null && variableList.type == null) {
+      for (var variable in variableList.variables) {
+        names.remove(variable.name.name);
+      }
+      return;
+    }
+
+    super.visitTopLevelVariableDeclaration(node);
+  }
+
   void _addForLoopParts(ForLoopParts forLoopParts, AstNode body) {
     if (forLoopParts is ForEachPartsWithDeclaration) {
       if (_isCoveredBy(body)) {
@@ -263,6 +252,8 @@
   void _addFormalParameter(FormalParameter parameter) {
     if (parameter is DefaultFormalParameter) {
       _addFormalParameter(parameter.parameter);
+    } else if (parameter is FieldFormalParameter) {
+      _addName(parameter.identifier);
     } else if (parameter is FunctionTypedFormalParameter) {
       _addName(parameter.identifier);
       var parameters = parameter.parameters;
@@ -283,9 +274,10 @@
   }
 
   void _addName(SimpleIdentifier node) {
-    if (node != null) {
-      names.add(node.name);
-    }
+    if (node == null) return;
+    if (node.end == offset) return;
+
+    names.add(node.name);
   }
 
   void _addTypeParameters(TypeParameterList typeParameterList) {
diff --git a/pkg/analyzer_plugin/lib/src/utilities/completion/optype.dart b/pkg/analyzer_plugin/lib/src/utilities/completion/optype.dart
index bddc32d..93c1024 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/completion/optype.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/completion/optype.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/dart/ast/syntactic_entity.dart';
 import 'package:analyzer/dart/ast/token.dart';
 import 'package:analyzer/dart/ast/visitor.dart';
 import 'package:analyzer/dart/element/element.dart';
@@ -599,15 +600,18 @@
   }
 
   @override
-  void visitForEachStatement(ForEachStatement node) {
-    if (identical(entity, node.identifier)) {
+  visitForEachParts(ForEachParts node) {
+    if (node is ForEachPartsWithIdentifier &&
+        identical(entity, node.identifier)) {
       optype.includeTypeNameSuggestions = true;
     }
-    if (identical(entity, node.loopVariable)) {
+    if (node is ForEachPartsWithDeclaration &&
+        identical(entity, node.loopVariable)) {
       optype.includeTypeNameSuggestions = true;
     }
     if (identical(entity, node.inKeyword) && offset <= node.inKeyword.offset) {
-      if (node.identifier == null && node.loopVariable == null) {
+      if (!(node is ForEachPartsWithIdentifier && node.identifier != null ||
+          node is ForEachPartsWithDeclaration && node.loopVariable != null)) {
         optype.includeTypeNameSuggestions = true;
       }
     }
@@ -655,7 +659,7 @@
   }
 
   @override
-  void visitForStatement(ForStatement node) {
+  visitForParts(ForParts node) {
     var entity = this.entity;
     if (_isEntityPrevTokenSynthetic()) {
       // Actual: for (var v i^)
@@ -668,13 +672,6 @@
       //                    ^
       optype.includeVarNameSuggestions = true;
     } else {
-      // for (^) {}
-      // for (Str^ str = null;) {}
-      // In theory it is possible to specify any expression in initializer,
-      // but for any practical use we need only types.
-      if (entity == node.initialization || entity == node.variables) {
-        optype.includeTypeNameSuggestions = true;
-      }
       // for (; ^) {}
       if (entity == node.condition) {
         optype.includeTypeNameSuggestions = true;
@@ -690,6 +687,33 @@
   }
 
   @override
+  void visitForStatement(ForStatement node) {
+    var entity = this.entity;
+    var entity2 = entity; // Work around limitations of type promotion
+    if (entity2 is SyntacticEntity &&
+        entity2.offset >= node.forLoopParts.offset &&
+        entity2.end <= node.forLoopParts.end) {
+      // Older versions of the analyzer yield elements of `node.forLoopParts`
+      // when iterating through children of `ForEachStatement`.  Handle this
+      // situation by simulating the behavior of newer versions of the analyzer.
+      // TODO(paulberry): remove this case once we require a version of analyzer
+      // containing a1349ac52972a4c69e1b05079ed1662b3b0f8c3f
+      if (entity2.offset == node.forLoopParts.offset) {
+        entity = node.forLoopParts;
+      } else {
+        return node.forLoopParts.accept(this);
+      }
+    }
+    // for (^) {}
+    // for (Str^ str = null;) {}
+    // In theory it is possible to specify any expression in initializer,
+    // but for any practical use we need only types.
+    if (entity == node.forLoopParts) {
+      optype.includeTypeNameSuggestions = true;
+    }
+  }
+
+  @override
   void visitFunctionDeclaration(FunctionDeclaration node) {
     if (identical(entity, node.returnType) ||
         identical(entity, node.name) && node.returnType == null) {
diff --git a/pkg/analyzer_plugin/lib/src/utilities/completion/suggestion_builder.dart b/pkg/analyzer_plugin/lib/src/utilities/completion/suggestion_builder.dart
index d0fbadc..d5122fc75 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/completion/suggestion_builder.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/completion/suggestion_builder.dart
@@ -5,7 +5,6 @@
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/file_system/file_system.dart';
-import 'package:analyzer/src/generated/source.dart' show Source, UriKind;
 import 'package:analyzer_plugin/protocol/protocol_common.dart'
     hide Element, ElementKind;
 import 'package:analyzer_plugin/src/utilities/documentation.dart';
@@ -81,8 +80,7 @@
   CompletionSuggestion forElement(Element element,
       {String completion,
       CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
-      int relevance: DART_RELEVANCE_DEFAULT,
-      Source importForSource}) {
+      int relevance: DART_RELEVANCE_DEFAULT}) {
     // Copied from analysis_server/lib/src/services/completion/dart/suggestion_builder.dart
     if (element == null) {
       return null;
@@ -137,35 +135,6 @@
       addDefaultArgDetails(
           suggestion, element, requiredParameters, namedParameters);
     }
-    if (importForSource != null) {
-      String srcPath =
-          resourceProvider.pathContext.dirname(importForSource.fullName);
-      LibraryElement libElem = element.library;
-      if (libElem != null) {
-        Source libSource = libElem.source;
-        if (libSource != null) {
-          UriKind uriKind = libSource.uriKind;
-          if (uriKind == UriKind.DART_URI) {
-            suggestion.importUri = libSource.uri.toString();
-          } else if (uriKind == UriKind.PACKAGE_URI) {
-            suggestion.importUri = libSource.uri.toString();
-          } else if (uriKind == UriKind.FILE_URI &&
-              element.source.uriKind == UriKind.FILE_URI) {
-            try {
-              suggestion.importUri = resourceProvider.pathContext
-                  .relative(libSource.fullName, from: srcPath);
-            } catch (_) {
-              // ignored
-            }
-          }
-        }
-      }
-      if (suggestion.importUri == null) {
-        // Do not include out of scope suggestions
-        // for which we cannot determine an import
-        return null;
-      }
-    }
     return suggestion;
   }
 
diff --git a/pkg/analyzer_plugin/lib/src/utilities/visitors/local_declaration_visitor.dart b/pkg/analyzer_plugin/lib/src/utilities/visitors/local_declaration_visitor.dart
index dca1c1a..99bb973 100644
--- a/pkg/analyzer_plugin/lib/src/utilities/visitors/local_declaration_visitor.dart
+++ b/pkg/analyzer_plugin/lib/src/utilities/visitors/local_declaration_visitor.dart
@@ -43,6 +43,8 @@
 
   void declaredMethod(MethodDeclaration declaration);
 
+  void declaredMixin(MixinDeclaration declaration) {}
+
   void declaredParam(SimpleIdentifier name, TypeAnnotation type);
 
   void declaredTopLevelVar(
@@ -131,6 +133,9 @@
           declaration.functionType,
           declaration.functionType.typeParameters,
         );
+      } else if (declaration is MixinDeclaration) {
+        declaredMixin(declaration);
+        _visitTypeParameters(declaration, declaration.typeParameters);
       }
     });
   }
@@ -142,31 +147,30 @@
   }
 
   @override
-  void visitForEachStatement(ForEachStatement node) {
-    SimpleIdentifier id;
-    TypeAnnotation type;
-    DeclaredIdentifier loopVar = node.loopVariable;
-    if (loopVar != null) {
-      id = loopVar.identifier;
-      type = loopVar.type;
-    } else {
-      id = node.identifier;
-      type = null;
-    }
-    if (id != null) {
-      // If there is no loop variable, don't declare it.
-      declaredLocalVar(id, type);
-    }
-    visitNode(node);
-  }
-
-  @override
-  void visitForStatement(ForStatement node) {
-    VariableDeclarationList varList = node.variables;
-    if (varList != null) {
-      varList.variables.forEach((VariableDeclaration varDecl) {
-        declaredLocalVar(varDecl.name, varList.type);
-      });
+  visitForStatement(ForStatement node) {
+    var forLoopParts = node.forLoopParts;
+    if (forLoopParts is ForEachPartsWithDeclaration) {
+      DeclaredIdentifier loopVar = forLoopParts.loopVariable;
+      if (loopVar != null) {
+        SimpleIdentifier id = loopVar.identifier;
+        if (id != null) {
+          // If there is no loop variable, don't declare it.
+          declaredLocalVar(id, loopVar.type);
+        }
+      }
+    } else if (forLoopParts is ForEachPartsWithIdentifier) {
+      SimpleIdentifier id = forLoopParts.identifier;
+      if (id != null) {
+        // If there is no loop variable, don't declare it.
+        declaredLocalVar(id, null);
+      }
+    } else if (forLoopParts is ForPartsWithDeclarations) {
+      VariableDeclarationList varList = forLoopParts.variables;
+      if (varList != null) {
+        varList.variables.forEach((VariableDeclaration varDecl) {
+          declaredLocalVar(varDecl.name, varList.type);
+        });
+      }
     }
     visitNode(node);
   }
diff --git a/pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_dart.dart b/pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_dart.dart
index 50e2721..a00516b 100644
--- a/pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_dart.dart
+++ b/pkg/analyzer_plugin/lib/utilities/change_builder/change_builder_dart.dart
@@ -380,7 +380,7 @@
     @required String targetPath,
     @required int targetOffset,
     @required LibraryElement requestedLibrary,
-    @required String requestedName,
+    @required Element requestedElement,
   });
 
   /**
diff --git a/pkg/analyzer_plugin/lib/utilities/completion/suggestion_builder.dart b/pkg/analyzer_plugin/lib/utilities/completion/suggestion_builder.dart
index 8ce11fa..3ad0713 100644
--- a/pkg/analyzer_plugin/lib/utilities/completion/suggestion_builder.dart
+++ b/pkg/analyzer_plugin/lib/utilities/completion/suggestion_builder.dart
@@ -5,7 +5,6 @@
 import 'package:analyzer/dart/element/element.dart';
 import 'package:analyzer_plugin/protocol/protocol_common.dart' hide Element;
 import 'package:analyzer_plugin/utilities/completion/relevance.dart';
-import 'package:analyzer/src/generated/source.dart' show Source;
 
 /**
  * An object used to build code completion suggestions for Dart code.
@@ -13,13 +12,10 @@
 abstract class SuggestionBuilder {
   /**
    * Return a suggestion based on the given [element], or `null` if a suggestion
-   * is not appropriate for the given element. If the suggestion is not
-   * currently in scope, then specify [importForSource] as the source to which
-   * an import should be added.
+   * is not appropriate for the given element.
    */
   CompletionSuggestion forElement(Element element,
       {String completion,
       CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
-      int relevance: DART_RELEVANCE_DEFAULT,
-      Source importForSource});
+      int relevance: DART_RELEVANCE_DEFAULT});
 }
diff --git a/pkg/analyzer_plugin/pubspec.yaml b/pkg/analyzer_plugin/pubspec.yaml
index c1c6502..5ac22f2 100644
--- a/pkg/analyzer_plugin/pubspec.yaml
+++ b/pkg/analyzer_plugin/pubspec.yaml
@@ -1,6 +1,6 @@
 name: analyzer_plugin
 description: A framework for building plugins for the analysis server.
-version: 0.0.1-alpha.6
+version: 0.0.1-alpha.7
 author: Dart Team <misc@dartlang.org>
 homepage: https://github.com/dart-lang/sdk/tree/master/pkg/analyzer_plugin
 
@@ -8,9 +8,9 @@
   sdk: '>=1.8.0 <3.0.0'
 
 dependencies:
-  analyzer: '^0.34.2'
+  analyzer: '^0.35.3'
   charcode: '^1.1.0'
-  html: '^0.13.1'
+  html: '>=0.13.1 <0.15.0'
   meta: ^1.0.2
   path: '^1.4.1'
   pub_semver: '^1.3.2'
diff --git a/pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart b/pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart
index d95c14d..9e28ca2 100644
--- a/pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart
+++ b/pkg/analyzer_plugin/test/integration/support/protocol_matchers.dart
@@ -34,6 +34,7 @@
  *   "message": String
  *   "correction": optional String
  *   "code": String
+ *   "url": optional String
  *   "hasFix": optional bool
  * }
  */
@@ -46,6 +47,7 @@
           "code": isString
         }, optionalFields: {
           "correction": isString,
+          "url": isString,
           "hasFix": isBool
         }));
 
@@ -134,7 +136,6 @@
  *   "relevance": int
  *   "completion": String
  *   "displayText": optional String
- *   "elementUri": optional String
  *   "selectionOffset": int
  *   "selectionLength": int
  *   "isDeprecated": bool
@@ -152,7 +153,6 @@
  *   "hasNamedParameters": optional bool
  *   "parameterName": optional String
  *   "parameterType": optional String
- *   "importUri": optional String
  * }
  */
 final Matcher isCompletionSuggestion =
@@ -166,7 +166,6 @@
           "isPotential": isBool
         }, optionalFields: {
           "displayText": isString,
-          "elementUri": isString,
           "docSummary": isString,
           "docComplete": isString,
           "declaringType": isString,
@@ -179,8 +178,7 @@
           "requiredParameterCount": isInt,
           "hasNamedParameters": isBool,
           "parameterName": isString,
-          "parameterType": isString,
-          "importUri": isString
+          "parameterType": isString
         }));
 
 /**
diff --git a/pkg/analyzer_plugin/test/src/utilities/change_builder/change_builder_dart_test.dart b/pkg/analyzer_plugin/test/src/utilities/change_builder/change_builder_dart_test.dart
index a3be8b8..5aae60f 100644
--- a/pkg/analyzer_plugin/test/src/utilities/change_builder/change_builder_dart_test.dart
+++ b/pkg/analyzer_plugin/test/src/utilities/change_builder/change_builder_dart_test.dart
@@ -1604,25 +1604,6 @@
 @reflectiveTest
 class ImportLibraryTest extends AbstractContextTest
     with DartChangeBuilderMixin {
-  test_afterLibraryDirective_dart() async {
-    await _assertImportLibrary(
-      initialCode: '''
-library test;
-
-class A {}
-''',
-      uriList: ['dart:async'],
-      expectedCode: '''
-library test;
-
-import 'dart:async';
-
-
-class A {}
-''',
-    );
-  }
-
   test_dart_beforeDart() async {
     await _assertImportLibrary(
       initialCode: '''
@@ -1765,6 +1746,58 @@
     );
   }
 
+  test_noImports_afterLibrary_hasDeclaration() async {
+    await _assertImportLibrary(
+      initialCode: '''
+library test;
+
+class A {}
+''',
+      uriList: ['dart:async'],
+      expectedCode: '''
+library test;
+
+import 'dart:async';
+
+class A {}
+''',
+    );
+  }
+
+  test_noImports_afterLibrary_hasPart() async {
+    await _assertImportLibrary(
+      initialCode: '''
+library test;
+
+part 'a.dart';
+''',
+      uriList: ['dart:aaa', 'dart:bbb'],
+      expectedCode: '''
+library test;
+
+import 'dart:aaa';
+import 'dart:bbb';
+
+part 'a.dart';
+''',
+    );
+  }
+
+  test_noImports_beforePart() async {
+    await _assertImportLibrary(
+      initialCode: '''
+part 'a.dart';
+''',
+      uriList: ['dart:aaa', 'dart:bbb'],
+      expectedCode: '''
+import 'dart:aaa';
+import 'dart:bbb';
+
+part 'a.dart';
+''',
+    );
+  }
+
   test_package_afterDart() async {
     await _assertImportLibrary(
       initialCode: '''
diff --git a/pkg/analyzer_plugin/test/src/utilities/change_builder/dart/import_library_element_test.dart b/pkg/analyzer_plugin/test/src/utilities/change_builder/dart/import_library_element_test.dart
index 7f5ea6f..8873d2e 100644
--- a/pkg/analyzer_plugin/test/src/utilities/change_builder/dart/import_library_element_test.dart
+++ b/pkg/analyzer_plugin/test/src/utilities/change_builder/dart/import_library_element_test.dart
@@ -16,6 +16,7 @@
   defineReflectiveSuite(() {
     defineReflectiveTests(ImportLibraryElementTest);
     defineReflectiveTests(ImportLibraryElement_existingImport_Test);
+    defineReflectiveTests(ImportLibraryElement_incompleteCode_Test);
     defineReflectiveTests(ImportLibraryElement_newImport_withoutPrefix_Test);
     defineReflectiveTests(ImportLibraryElement_newImport_withPrefix_Test);
   });
@@ -159,6 +160,47 @@
 }
 
 @reflectiveTest
+class ImportLibraryElement_incompleteCode_Test extends _Base {
+  test_formalParameter() async {
+    newFile('/home/test/lib/a.dart', content: 'class A {}');
+    newFile('/home/test/lib/b.dart', content: r'''
+export 'a.dart';
+''');
+    await _assertImportLibraryElement(
+      initialCode: r'''
+f(A^) {}
+''',
+      uriStr: 'package:test/a.dart',
+      name: 'A',
+      expectedCode: r'''
+import 'package:test/a.dart';
+
+f(A) {}
+''',
+    );
+  }
+
+  test_topLevelVariable() async {
+    newFile('/home/test/lib/a.dart', content: 'class A {}');
+    newFile('/home/test/lib/b.dart', content: r'''
+export 'a.dart';
+''');
+    await _assertImportLibraryElement(
+      initialCode: r'''
+A^
+''',
+      uriStr: 'package:test/a.dart',
+      name: 'A',
+      expectedCode: r'''
+import 'package:test/a.dart';
+
+A
+''',
+    );
+  }
+}
+
+@reflectiveTest
 class ImportLibraryElement_newImport_withoutPrefix_Test extends _Base {
   test_exported() async {
     newFile('/home/test/lib/a.dart', content: 'class A {}');
@@ -468,11 +510,9 @@
     );
   }
 
-  @failingTest
   test_shadowed_class_inPart() async {
     newFile('/home/test/lib/a.dart', content: 'class C {}');
     newFile('/home/test/lib/p.dart', content: 'class C {}');
-    // TODO(scheglov) "import" must be before "part"
     await _assertImportLibraryElement(
       initialCode: r'''
 part 'p.dart';
@@ -735,8 +775,8 @@
     var resolvedLibrary = await session.getResolvedLibrary(path);
     var requestedLibrary = await session.getLibraryByUri(uriStr);
 
-    var element = requestedLibrary.exportNamespace.get(name);
-    expect(element, isNotNull, reason: '`$name` in $uriStr');
+    var requestedElement = requestedLibrary.exportNamespace.get(name);
+    expect(requestedElement, isNotNull, reason: '`$name` in $uriStr');
 
     var builder = newBuilder();
     await builder.addFileEdit(path, (builder) {
@@ -745,7 +785,7 @@
         targetPath: path,
         targetOffset: offset,
         requestedLibrary: requestedLibrary,
-        requestedName: name,
+        requestedElement: requestedElement,
       );
       expect(result.prefix, expectedPrefix);
     });
diff --git a/pkg/analyzer_plugin/test/src/utilities/change_builder/dart/syntactic_scope_test.dart b/pkg/analyzer_plugin/test/src/utilities/change_builder/dart/syntactic_scope_test.dart
index d4f04be..40bdcbc 100644
--- a/pkg/analyzer_plugin/test/src/utilities/change_builder/dart/syntactic_scope_test.dart
+++ b/pkg/analyzer_plugin/test/src/utilities/change_builder/dart/syntactic_scope_test.dart
@@ -279,14 +279,14 @@
   test_ConstructorDeclaration() {
     _assertScopeNames(code: r'''
 class N1<N2> extends N3 {
-  N1.N4(N5 ^1) {
+  N1.N4(N5, this.N6, ^1) {
     ^2
   }
   ^3
 }
 ''', expected: r'''
-1: N2, N5
-2: N2, N5
+1: N2, N5, N6
+2: N2, N5, N6
 3: N2
 ''');
   }
diff --git a/pkg/analyzer_plugin/test/src/utilities/completion/completion_target_test.dart b/pkg/analyzer_plugin/test/src/utilities/completion/completion_target_test.dart
index 37958bb..8f42f89 100644
--- a/pkg/analyzer_plugin/test/src/utilities/completion/completion_target_test.dart
+++ b/pkg/analyzer_plugin/test/src/utilities/completion/completion_target_test.dart
@@ -6,6 +6,7 @@
 
 import 'package:analyzer/dart/ast/ast.dart';
 import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/src/generated/engine.dart' as analyzer;
 import 'package:analyzer/src/generated/parser.dart' as analyzer;
 import 'package:analyzer/src/test_utilities/find_element.dart';
 import 'package:analyzer_plugin/src/utilities/completion/completion_target.dart';
@@ -663,20 +664,33 @@
     assertTarget('new C();', '{var f; {var x;} new C();}');
   }
 
-  test_MapLiteralEntry() async {
-    // MapLiteralEntry  MapLiteral  VariableDeclaration
+  test_MapLiteral_expression() async {
+    super.setUp();
+    final experimentStatus =
+        (this.driver.analysisOptions as analyzer.AnalysisOptionsImpl)
+            .experimentStatus;
+    if (experimentStatus.control_flow_collections ||
+        experimentStatus.spread_collections) {
+      // SimpleIdentifier  MapLiteral  VariableDeclaration
+      await createTarget('foo = {1: 2, T^');
+      assertTarget('T', '{1 : 2, T}');
+    } else {
+      // TODO(b/35569): remove this branch of test behavior
+
+      // SimpleIdentifier  MapLiteralEntry  MapLiteral  VariableDeclaration
+      await createTarget('foo = {1: 2, T^');
+      assertTarget('T : ', '{1 : 2, T : }');
+    }
+  }
+
+  test_MapLiteral_empty() async {
+    // MapLiteral  VariableDeclaration
     await createTarget('foo = {^');
     // fasta scanner inserts synthetic closing '}'
     assertTarget('}', '{}');
   }
 
-  test_MapLiteralEntry1() async {
-    // MapLiteralEntry  MapLiteral  VariableDeclaration
-    await createTarget('foo = {1: 2, T^');
-    assertTarget('T : ', '{1 : 2, T : }');
-  }
-
-  test_MapLiteralEntry2() async {
+  test_MapLiteralEntry() async {
     // SimpleIdentifier  MapLiteralEntry  MapLiteral  VariableDeclaration
     await createTarget('foo = {7:T^};');
     assertTarget('T', '7 : T');
diff --git a/pkg/analyzer_plugin/test/src/utilities/visitors/local_declaration_visitor_test.dart b/pkg/analyzer_plugin/test/src/utilities/visitors/local_declaration_visitor_test.dart
index fd96c31..ee9466e 100644
--- a/pkg/analyzer_plugin/test/src/utilities/visitors/local_declaration_visitor_test.dart
+++ b/pkg/analyzer_plugin/test/src/utilities/visitors/local_declaration_visitor_test.dart
@@ -45,8 +45,8 @@
     FunctionDeclaration f = declarations[1] as FunctionDeclaration;
     expect(f, isNotNull);
     BlockFunctionBody body = f.functionExpression.body as BlockFunctionBody;
-    Statement statement = body.block.statements[0];
-    expect(statement, const TypeMatcher<ForEachStatement>());
+    var statement = body.block.statements[0] as ForStatement;
+    expect(statement.forLoopParts, const TypeMatcher<ForEachParts>());
     statement.accept(new TestVisitor(statement.offset));
   }
 }
diff --git a/pkg/analyzer_plugin/test/test_all.dart b/pkg/analyzer_plugin/test/test_all.dart
index 155cc47..b5cdb54 100644
--- a/pkg/analyzer_plugin/test/test_all.dart
+++ b/pkg/analyzer_plugin/test/test_all.dart
@@ -8,12 +8,14 @@
 import 'plugin/test_all.dart' as plugin;
 import 'src/test_all.dart' as src;
 import 'utilities/test_all.dart' as utilities;
+import 'verify_tests_test.dart' as verify_tests;
 
 main() {
   defineReflectiveSuite(() {
     plugin.main();
     src.main();
     utilities.main();
+    verify_tests.main();
     defineReflectiveSuite(() {
       defineReflectiveTests(SpecTest);
     }, name: 'spec');
diff --git a/pkg/analyzer_plugin/test/utilities/completion/completion_contributor_util.dart b/pkg/analyzer_plugin/test/utilities/completion/completion_contributor_util.dart
index 665a350..d7a9ec2 100644
--- a/pkg/analyzer_plugin/test/utilities/completion/completion_contributor_util.dart
+++ b/pkg/analyzer_plugin/test/utilities/completion/completion_contributor_util.dart
@@ -95,7 +95,6 @@
   CompletionSuggestion assertSuggest(String completion,
       {CompletionSuggestionKind csKind: CompletionSuggestionKind.INVOCATION,
       int relevance: DART_RELEVANCE_DEFAULT,
-      String importUri,
       ElementKind elemKind: null,
       bool isDeprecated: false,
       bool isPotential: false,
@@ -117,7 +116,6 @@
     } else {
       expect(cs.relevance, equals(relevance), reason: completion);
     }
-    expect(cs.importUri, importUri);
     expect(cs.selectionOffset, equals(selectionOffset ?? completion.length));
     expect(cs.selectionLength, equals(0));
     expect(cs.isDeprecated, equals(isDeprecated));
@@ -153,7 +151,6 @@
 
   CompletionSuggestion assertSuggestClass(String name,
       {int relevance: DART_RELEVANCE_DEFAULT,
-      String importUri,
       CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
       bool isDeprecated: false,
       String elemFile,
@@ -162,7 +159,6 @@
     CompletionSuggestion cs = assertSuggest(name,
         csKind: kind,
         relevance: relevance,
-        importUri: importUri,
         isDeprecated: isDeprecated,
         elemFile: elemFile,
         elemOffset: elemOffset);
@@ -193,13 +189,11 @@
 
   CompletionSuggestion assertSuggestConstructor(String name,
       {int relevance: DART_RELEVANCE_DEFAULT,
-      String importUri,
       int elemOffset,
       String defaultArgListString: _UNCHECKED,
       List<int> defaultArgumentListTextRanges}) {
     CompletionSuggestion cs = assertSuggest(name,
         relevance: relevance,
-        importUri: importUri,
         elemOffset: elemOffset,
         defaultArgListString: defaultArgListString,
         defaultArgumentListTextRanges: defaultArgumentListTextRanges);
@@ -232,13 +226,11 @@
 
   CompletionSuggestion assertSuggestField(String name, String type,
       {int relevance: DART_RELEVANCE_DEFAULT,
-      String importUri,
       CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
       bool isDeprecated: false}) {
     CompletionSuggestion cs = assertSuggest(name,
         csKind: kind,
         relevance: relevance,
-        importUri: importUri,
         elemKind: ElementKind.FIELD,
         isDeprecated: isDeprecated);
     // The returnType represents the type of a field
@@ -258,13 +250,11 @@
       {CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
       bool isDeprecated: false,
       int relevance: DART_RELEVANCE_DEFAULT,
-      String importUri,
       String defaultArgListString: _UNCHECKED,
       List<int> defaultArgumentListTextRanges}) {
     CompletionSuggestion cs = assertSuggest(name,
         csKind: kind,
         relevance: relevance,
-        importUri: importUri,
         isDeprecated: isDeprecated,
         defaultArgListString: defaultArgListString,
         defaultArgumentListTextRanges: defaultArgumentListTextRanges);
@@ -295,13 +285,9 @@
       String name, String returnType,
       {bool isDeprecated: false,
       int relevance: DART_RELEVANCE_DEFAULT,
-      CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
-      String importUri}) {
+      CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION}) {
     CompletionSuggestion cs = assertSuggest(name,
-        csKind: kind,
-        relevance: relevance,
-        importUri: importUri,
-        isDeprecated: isDeprecated);
+        csKind: kind, relevance: relevance, isDeprecated: isDeprecated);
     if (returnType != null) {
       expect(cs.returnType, returnType);
     } else if (isNullExpectedReturnTypeConsideredDynamic) {
@@ -328,13 +314,11 @@
 
   CompletionSuggestion assertSuggestGetter(String name, String returnType,
       {int relevance: DART_RELEVANCE_DEFAULT,
-      String importUri,
       CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
       bool isDeprecated: false}) {
     CompletionSuggestion cs = assertSuggest(name,
         csKind: kind,
         relevance: relevance,
-        importUri: importUri,
         elemKind: ElementKind.GETTER,
         isDeprecated: isDeprecated);
     expect(cs.returnType, returnType != null ? returnType : 'dynamic');
@@ -352,7 +336,6 @@
   CompletionSuggestion assertSuggestMethod(
       String name, String declaringType, String returnType,
       {int relevance: DART_RELEVANCE_DEFAULT,
-      String importUri,
       CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
       bool isDeprecated: false,
       String defaultArgListString: _UNCHECKED,
@@ -360,7 +343,6 @@
     CompletionSuggestion cs = assertSuggest(name,
         csKind: kind,
         relevance: relevance,
-        importUri: importUri,
         isDeprecated: isDeprecated,
         defaultArgListString: defaultArgListString,
         defaultArgumentListTextRanges: defaultArgumentListTextRanges);
@@ -381,14 +363,10 @@
 
   CompletionSuggestion assertSuggestName(String name,
       {int relevance: DART_RELEVANCE_DEFAULT,
-      String importUri,
       CompletionSuggestionKind kind: CompletionSuggestionKind.IDENTIFIER,
       bool isDeprecated: false}) {
     CompletionSuggestion cs = assertSuggest(name,
-        csKind: kind,
-        relevance: relevance,
-        importUri: importUri,
-        isDeprecated: isDeprecated);
+        csKind: kind, relevance: relevance, isDeprecated: isDeprecated);
     expect(cs.completion, equals(name));
     expect(cs.element, isNull);
     assertHasNoParameterInfo(cs);
@@ -397,13 +375,9 @@
 
   CompletionSuggestion assertSuggestSetter(String name,
       {int relevance: DART_RELEVANCE_DEFAULT,
-      String importUri,
       CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION}) {
     CompletionSuggestion cs = assertSuggest(name,
-        csKind: kind,
-        relevance: relevance,
-        importUri: importUri,
-        elemKind: ElementKind.SETTER);
+        csKind: kind, relevance: relevance, elemKind: ElementKind.SETTER);
     Element element = cs.element;
     expect(element, isNotNull);
     expect(element.kind, equals(ElementKind.SETTER));
@@ -420,10 +394,9 @@
 
   CompletionSuggestion assertSuggestTopLevelVar(String name, String returnType,
       {int relevance: DART_RELEVANCE_DEFAULT,
-      CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION,
-      String importUri}) {
-    CompletionSuggestion cs = assertSuggest(name,
-        csKind: kind, relevance: relevance, importUri: importUri);
+      CompletionSuggestionKind kind: CompletionSuggestionKind.INVOCATION}) {
+    CompletionSuggestion cs =
+        assertSuggest(name, csKind: kind, relevance: relevance);
     if (returnType != null) {
       expect(cs.returnType, returnType);
     } else if (isNullExpectedReturnTypeConsideredDynamic) {
diff --git a/pkg/analyzer_plugin/test/verify_tests_test.dart b/pkg/analyzer_plugin/test/verify_tests_test.dart
new file mode 100644
index 0000000..6b3ccd0
--- /dev/null
+++ b/pkg/analyzer_plugin/test/verify_tests_test.dart
@@ -0,0 +1,85 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:analyzer/dart/analysis/analysis_context.dart';
+import 'package:analyzer/dart/analysis/analysis_context_collection.dart';
+import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/dart/analysis/session.dart';
+import 'package:analyzer/dart/ast/ast.dart';
+import 'package:analyzer/file_system/file_system.dart';
+import 'package:analyzer/file_system/physical_file_system.dart';
+import 'package:front_end/src/testing/package_root.dart' as package_root;
+import 'package:path/path.dart' as path;
+import 'package:test/test.dart';
+
+main() {
+  PhysicalResourceProvider provider = PhysicalResourceProvider.INSTANCE;
+  String packageRoot = provider.pathContext.normalize(package_root.packageRoot);
+  String analysisServerPath =
+      provider.pathContext.join(packageRoot, 'analysis_server');
+  String testDirPath = provider.pathContext.join(analysisServerPath, 'test');
+
+  AnalysisContextCollection collection = new AnalysisContextCollection(
+      includedPaths: <String>[testDirPath], resourceProvider: provider);
+  List<AnalysisContext> contexts = collection.contexts;
+  if (contexts.length != 1) {
+    fail('The test directory contains multiple analysis contexts.');
+  }
+
+  buildTestsIn(
+      contexts[0].currentSession, testDirPath, provider.getFolder(testDirPath));
+}
+
+void buildTestsIn(
+    AnalysisSession session, String testDirPath, Folder directory) {
+  List<String> testFileNames = [];
+  File testAllFile;
+  List<Resource> children = directory.getChildren();
+  children.sort((first, second) => first.shortName.compareTo(second.shortName));
+  for (Resource child in children) {
+    if (child is Folder) {
+      if (child.shortName == 'integration') {
+        continue;
+      } else if (child.getChildAssumingFile('test_all.dart').exists) {
+        testFileNames.add('${child.shortName}/test_all.dart');
+      }
+      buildTestsIn(session, testDirPath, child);
+    } else if (child is File) {
+      String name = child.shortName;
+      if (name == 'test_all.dart') {
+        testAllFile = child;
+      } else if (name.endsWith('_test.dart')) {
+        testFileNames.add(name);
+      }
+    }
+  }
+  String relativePath = path.relative(directory.path, from: testDirPath);
+  test(relativePath, () {
+    if (testFileNames.isEmpty) {
+      return;
+    }
+    if (testAllFile == null) {
+      fail('Missing "test_all.dart" in $relativePath');
+    }
+    ParsedUnitResult result = session.getParsedUnit(testAllFile.path);
+    if (result.state != ResultState.VALID) {
+      fail('Could not parse ${testAllFile.path}');
+    }
+    List<String> importedFiles = [];
+    for (var directive in result.unit.directives) {
+      if (directive is ImportDirective) {
+        importedFiles.add(directive.uri.stringValue);
+      }
+    }
+    List<String> missingFiles = [];
+    for (String testFileName in testFileNames) {
+      if (!importedFiles.contains(testFileName)) {
+        missingFiles.add(testFileName);
+      }
+    }
+    if (missingFiles.isNotEmpty) {
+      fail('Tests missing from "test_all.dart": ${missingFiles.join(', ')}');
+    }
+  });
+}
diff --git a/pkg/analyzer_plugin/tool/spec/check_all_test.dart b/pkg/analyzer_plugin/tool/spec/check_all_test.dart
index 82806db..9de2a717 100644
--- a/pkg/analyzer_plugin/tool/spec/check_all_test.dart
+++ b/pkg/analyzer_plugin/tool/spec/check_all_test.dart
@@ -19,5 +19,5 @@
   int index = components.indexOf('analyzer_plugin');
   String pkgPath = joinAll(components.sublist(0, index + 1));
   await GeneratedContent.checkAll(
-      pkgPath, join('tool', 'spec', 'generate_all.dart'), allTargets);
+      pkgPath, join(pkgPath, 'tool', 'spec', 'generate_all.dart'), allTargets);
 }
diff --git a/pkg/analyzer_plugin/tool/spec/common_types_spec.html b/pkg/analyzer_plugin/tool/spec/common_types_spec.html
index d12b351..3572838 100644
--- a/pkg/analyzer_plugin/tool/spec/common_types_spec.html
+++ b/pkg/analyzer_plugin/tool/spec/common_types_spec.html
@@ -95,6 +95,12 @@
           The name, as a string, of the error code associated with this error.
         </p>
       </field>
+      <field name="url" optional="true">
+        <ref>String</ref>
+        <p>
+          The URL of a page containing documentation associated with this error.
+        </p>
+      </field>
       <field name="hasFix" optional="true">
         <ref>bool</ref>
         <p>
@@ -206,13 +212,6 @@
           completion.  Otherwise it is omitted.
         </p>
       </field>
-      <field name="elementUri" optional="true">
-        <ref>String</ref>
-        <p>
-          The URI of the element corresponding to this suggestion. It will be
-          set whenever analysis server is able to compute it.
-        </p>
-      </field>
       <field name="selectionOffset">
         <ref>int</ref>
         <p>
@@ -346,13 +345,6 @@
           omitted if the parameterName field is omitted.
         </p>
       </field>
-      <field name="importUri" optional="true">
-        <ref>String</ref>
-        <p>
-          The import to be added if the suggestion is out of scope and needs
-          an import to be added to be in scope.
-        </p>
-      </field>
     </object>
   </type>
   <type name="CompletionSuggestionKind">
diff --git a/pkg/async_helper/lib/async_helper.dart b/pkg/async_helper/lib/async_helper.dart
index 961d1d6..509af15 100644
--- a/pkg/async_helper/lib/async_helper.dart
+++ b/pkg/async_helper/lib/async_helper.dart
@@ -25,6 +25,8 @@
 
 import 'dart:async';
 
+import 'package:expect/expect.dart';
+
 bool _initialized = false;
 int _asyncLevel = 0;
 
@@ -87,3 +89,52 @@
   asyncStart();
   return f().then(asyncSuccess);
 }
+
+/// Calls [f] and verifies that it throws a `T`.
+///
+/// The optional [check] function can provide additional validation that the
+/// correct object is being thrown. For example, to check the content of the
+/// thrown object you could write this:
+///
+///     asyncExpectThrows<MyException>(myThrowingFunction,
+///          (e) => e.myMessage.contains("WARNING"));
+///
+/// If `f` fails an expectation (i.e., throws an [ExpectException]), that
+/// exception is not caught by [asyncExpectThrows]. The test is still considered
+/// failing.
+void asyncExpectThrows<T>(Future<void> f(),
+    [bool check(T error), String reason]) {
+  var type = "";
+  if (T != dynamic && T != Object) type = "<$T>";
+  var header = "asyncExpectThrows$type(${reason ?? ''}):";
+
+  // TODO(rnystrom): It might useful to validate that T is not bound to
+  // ExpectException since that won't work.
+
+  if (f is! Function()) {
+    // Only throws from executing the function body should count as throwing.
+    // The failure to even call `f` should throw outside the try/catch.
+    Expect.testError("$header Function not callable with zero arguments.");
+  }
+
+  var result = f();
+  if (result is! Future) {
+    Expect.testError("$header Function did not return a Future.");
+  }
+
+  asyncStart();
+  result.then((_) {
+    throw ExpectException("$header Did not throw.");
+  }).catchError((error, stack) {
+    // A test failure doesn't count as throwing.
+    if (error is ExpectException) throw error;
+
+    if (error is! T || (check != null && !check(error))) {
+      // Throws something unexpected.
+      throw ExpectException(
+          "$header Unexpected '${Error.safeToString(error)}'\n$stack");
+    }
+
+    asyncEnd();
+  });
+}
diff --git a/pkg/build_integration/lib/file_system/multi_root.dart b/pkg/build_integration/lib/file_system/multi_root.dart
index ed1bb8c..b5edb1b 100644
--- a/pkg/build_integration/lib/file_system/multi_root.dart
+++ b/pkg/build_integration/lib/file_system/multi_root.dart
@@ -52,7 +52,11 @@
       _delegate ??= await _resolveEntity();
 
   Future<FileSystemEntity> _resolveEntity() async {
-    if (uri.scheme == multiRootFileSystem.markerScheme && uri.isAbsolute) {
+    if (uri.scheme == multiRootFileSystem.markerScheme) {
+      if (!uri.isAbsolute) {
+        throw new FileSystemException(
+            uri, "This MultiRootFileSystem only handles absolutes URIs: $uri");
+      }
       var original = multiRootFileSystem.original;
       assert(uri.path.startsWith('/'));
       var path = uri.path.substring(1);
@@ -60,6 +64,7 @@
         var candidate = original.entityForUri(root.resolve(path));
         if (await candidate.exists()) return candidate;
       }
+      return MissingFileSystemEntity(uri);
     }
     return multiRootFileSystem.original.entityForUri(uri);
   }
@@ -76,6 +81,24 @@
   Future<String> readAsString() async => (await delegate).readAsString();
 }
 
+class MissingFileSystemEntity implements FileSystemEntity {
+  @override
+  final Uri uri;
+
+  MissingFileSystemEntity(this.uri);
+
+  @override
+  Future<bool> exists() => Future.value(false);
+
+  @override
+  Future<List<int>> readAsBytes() =>
+      Future.error(FileSystemException(uri, 'File not found'));
+
+  @override
+  Future<String> readAsString() =>
+      Future.error(FileSystemException(uri, 'File not found'));
+}
+
 Uri _normalize(root) {
   Uri uri = root;
   return uri.path.endsWith('/') ? uri : uri.replace(path: '${uri.path}/');
diff --git a/pkg/build_integration/pubspec.yaml b/pkg/build_integration/pubspec.yaml
index b746b5c..722a284 100644
--- a/pkg/build_integration/pubspec.yaml
+++ b/pkg/build_integration/pubspec.yaml
@@ -10,3 +10,6 @@
 
 dependencies:
   front_end: ^0.1.0
+
+dev_dependencies:
+  test: any
diff --git a/pkg/build_integration/test/file_system/multi_root_test.dart b/pkg/build_integration/test/file_system/multi_root_test.dart
index e86fc3f..e92249a 100644
--- a/pkg/build_integration/test/file_system/multi_root_test.dart
+++ b/pkg/build_integration/test/file_system/multi_root_test.dart
@@ -8,6 +8,7 @@
 
 import 'package:build_integration/file_system/multi_root.dart';
 import 'package:front_end/src/api_prototype/memory_file_system.dart';
+import 'package:front_end/src/api_prototype/file_system.dart';
 
 import 'package:test/test.dart';
 
@@ -122,4 +123,17 @@
     expect(await effectiveUriOf('multi-root:///../../A/B/a/8.dart'),
         'multi-root:///A/B/a/8.dart');
   });
+
+  test('multi-root handles all multi-root scheme uris, even if missing',
+      () async {
+    expect(await effectiveUriOf('multi-root:///doesnt/exist.dart'),
+        'multi-root:///doesnt/exist.dart');
+    expect(await exists('multi-root:///doesnt/exist.dart'), isFalse);
+    expect(
+        read('multi-root:///doesnt/exist.dart'),
+        throwsA(const TypeMatcher<FileSystemException>()
+            .having((e) => e.message, 'message', 'File not found')
+            .having((e) => e.uri, 'uri',
+                equals(Uri.parse('multi-root:///doesnt/exist.dart')))));
+  });
 }
diff --git a/pkg/compiler/analysis_options.yaml b/pkg/compiler/analysis_options.yaml
index af22f6b..deba0e5 100644
--- a/pkg/compiler/analysis_options.yaml
+++ b/pkg/compiler/analysis_options.yaml
@@ -10,3 +10,7 @@
     deprecated_member_use: ignore
     # Allow deprecated calls from within the same package
     deprecated_member_use_from_same_package: ignore
+
+linter:
+  rules:
+    - annotate_overrides
diff --git a/pkg/compiler/lib/compiler.dart b/pkg/compiler/lib/compiler.dart
index 11816ed..3da6d59 100644
--- a/pkg/compiler/lib/compiler.dart
+++ b/pkg/compiler/lib/compiler.dart
@@ -170,5 +170,6 @@
   /// diagnostic kinds.
   const Diagnostic(this.ordinal, this.name);
 
+  @override
   String toString() => name;
 }
diff --git a/pkg/compiler/lib/src/apiimpl.dart b/pkg/compiler/lib/src/apiimpl.dart
index f54520a..4888037 100644
--- a/pkg/compiler/lib/src/apiimpl.dart
+++ b/pkg/compiler/lib/src/apiimpl.dart
@@ -22,7 +22,9 @@
 /// Implements the [Compiler] using a [api.CompilerInput] for supplying the
 /// sources.
 class CompilerImpl extends Compiler {
+  @override
   final Measurer measurer;
+  @override
   api.CompilerInput provider;
   api.CompilerDiagnostics handler;
 
@@ -81,6 +83,7 @@
     return future;
   }
 
+  @override
   Future<bool> run(Uri uri) {
     Duration setupDuration = measurer.elapsedWallClock;
     return selfTask.measureSubtask("impl.run", () {
@@ -146,6 +149,7 @@
         ' (${percent.toStringAsFixed(2)}%)');
   }
 
+  @override
   void reportDiagnostic(DiagnosticMessage message,
       List<DiagnosticMessage> infos, api.Diagnostic kind) {
     _reportDiagnosticMessage(message, kind);
@@ -193,11 +197,14 @@
 
 class _Environment implements Environment {
   final Map<String, String> definitions;
+  Map<String, String> _completeMap;
   Set<String> supportedLibraries;
 
   _Environment(this.definitions);
 
+  @override
   String valueOf(String name) {
+    if (_completeMap != null) return _completeMap[name];
     var result = definitions[name];
     if (result != null || definitions.containsKey(name)) return result;
     if (!name.startsWith(_dartLibraryEnvironmentPrefix)) return null;
@@ -209,6 +216,22 @@
     if (supportedLibraries.contains(libraryName)) return "true";
     return null;
   }
+
+  @override
+  Map<String, String> toMap() {
+    if (_completeMap == null) {
+      _completeMap = new Map<String, String>.from(definitions);
+      for (String libraryName in supportedLibraries) {
+        if (!libraryName.startsWith("_")) {
+          String key = '${_dartLibraryEnvironmentPrefix}${libraryName}';
+          if (!definitions.containsKey(key)) {
+            _completeMap[key] = "true";
+          }
+        }
+      }
+    }
+    return _completeMap;
+  }
 }
 
 /// For every 'dart:' library, a corresponding environment variable is set
diff --git a/pkg/compiler/lib/src/closure.dart b/pkg/compiler/lib/src/closure.dart
index 467dfe1c3..343d58b 100644
--- a/pkg/compiler/lib/src/closure.dart
+++ b/pkg/compiler/lib/src/closure.dart
@@ -307,14 +307,18 @@
 
   BoxLocal(this.container);
 
+  @override
   String get name => container.name;
 
+  @override
   bool operator ==(other) {
     return other is BoxLocal && other.container == container;
   }
 
+  @override
   int get hashCode => container.hashCode;
 
+  @override
   String toString() => 'BoxLocal($name)';
 }
 
@@ -324,12 +328,15 @@
 
   ThisLocal(this.enclosingClass);
 
+  @override
   String get name => 'this';
 
+  @override
   bool operator ==(other) {
     return other is ThisLocal && other.enclosingClass == enclosingClass;
   }
 
+  @override
   int get hashCode => enclosingClass.hashCode;
 }
 
@@ -339,15 +346,19 @@
 
   TypeVariableLocal(this.typeVariable);
 
+  @override
   String get name => typeVariable.element.name;
 
+  @override
   int get hashCode => typeVariable.hashCode;
 
+  @override
   bool operator ==(other) {
     if (other is! TypeVariableLocal) return false;
     return typeVariable == other.typeVariable;
   }
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write('type_variable_local(');
diff --git a/pkg/compiler/lib/src/commandline_options.dart b/pkg/compiler/lib/src/commandline_options.dart
index 991fb58..576cfc4 100644
--- a/pkg/compiler/lib/src/commandline_options.dart
+++ b/pkg/compiler/lib/src/commandline_options.dart
@@ -22,8 +22,6 @@
   static const String enableCheckedMode = '--enable-checked-mode';
   static const String enableAsserts = '--enable-asserts';
   static const String enableDiagnosticColors = '--enable-diagnostic-colors';
-  static const String enableExperimentalMirrors =
-      '--enable-experimental-mirrors';
   static const String experimentalTrackAllocations =
       '--experimental-track-allocations';
   static const String experimentalAllocationsPath =
@@ -43,6 +41,8 @@
   static const String experimentCallInstrumentation =
       '--experiment-call-instrumentation';
 
+  static const String experimentNewRti = '--experiment-new-rti';
+
   static const String enableLanguageExperiments = '--enable-experiment';
 
   static const String fastStartup = '--fast-startup';
@@ -81,9 +81,11 @@
   static const String progress = '--show-internal-progress';
   static const String version = '--version';
 
+  static const String dillDependencies = '--dill-dependencies';
   static const String readData = '--read-data';
   static const String writeData = '--write-data';
   static const String cfeOnly = '--cfe-only';
+  static const String debugGlobalInference = '--debug-global-inference';
 
   static const String serverMode = '--server-mode';
 
diff --git a/pkg/compiler/lib/src/common/codegen.dart b/pkg/compiler/lib/src/common/codegen.dart
index a0c99af..ec92751 100644
--- a/pkg/compiler/lib/src/common/codegen.dart
+++ b/pkg/compiler/lib/src/common/codegen.dart
@@ -46,6 +46,7 @@
 
   _CodegenImpact();
 
+  @override
   void apply(WorldImpactVisitor visitor) {
     staticUses.forEach(visitor.visitStaticUse);
     dynamicUses.forEach(visitor.visitDynamicUse);
@@ -59,6 +60,7 @@
         .add(new Pair<DartType, DartType>(subtype, supertype));
   }
 
+  @override
   Iterable<Pair<DartType, DartType>> get typeVariableBoundsSubtypeChecks {
     return _typeVariableBoundsSubtypeChecks != null
         ? _typeVariableBoundsSubtypeChecks
@@ -70,6 +72,7 @@
     _constSymbols.add(name);
   }
 
+  @override
   Iterable<String> get constSymbols {
     return _constSymbols != null ? _constSymbols : const <String>[];
   }
@@ -79,6 +82,7 @@
     _specializedGetInterceptors.add(classes);
   }
 
+  @override
   Iterable<Set<ClassEntity>> get specializedGetInterceptors {
     return _specializedGetInterceptors != null
         ? _specializedGetInterceptors
@@ -89,6 +93,7 @@
     _usesInterceptor = true;
   }
 
+  @override
   bool get usesInterceptor => _usesInterceptor;
 
   void registerAsyncMarker(AsyncMarker asyncMarker) {
@@ -96,6 +101,7 @@
     _asyncMarkers.add(asyncMarker);
   }
 
+  @override
   Iterable<AsyncMarker> get asyncMarkers {
     return _asyncMarkers != null
         ? _asyncMarkers.iterable(AsyncMarker.values)
@@ -125,6 +131,7 @@
 
   bool get isForResolution => false;
 
+  @override
   String toString() => 'CodegenRegistry for $currentElement';
 
   @deprecated
diff --git a/pkg/compiler/lib/src/common/names.dart b/pkg/compiler/lib/src/common/names.dart
index 5d1116c..ec947a4 100644
--- a/pkg/compiler/lib/src/common/names.dart
+++ b/pkg/compiler/lib/src/common/names.dart
@@ -231,4 +231,8 @@
 
   /// The URI for 'package:js'.
   static final Uri package_js = new Uri(scheme: 'package', path: 'js/js.dart');
+
+  /// The URI for 'package:meta/dart2js.dart'.
+  static final Uri package_meta_dart2js =
+      new Uri(scheme: 'package', path: 'meta/dart2js.dart');
 }
diff --git a/pkg/compiler/lib/src/common/resolution.dart b/pkg/compiler/lib/src/common/resolution.dart
index ad9214f..e8ac328 100644
--- a/pkg/compiler/lib/src/common/resolution.dart
+++ b/pkg/compiler/lib/src/common/resolution.dart
@@ -14,6 +14,7 @@
 
   Iterable<Feature> get features => const <Feature>[];
   Iterable<MapLiteralUse> get mapLiterals => const <MapLiteralUse>[];
+  Iterable<SetLiteralUse> get setLiterals => const <SetLiteralUse>[];
   Iterable<ListLiteralUse> get listLiterals => const <ListLiteralUse>[];
   Iterable<String> get constSymbolNames => const <String>[];
   Iterable<ConstantExpression> get constantLiterals =>
diff --git a/pkg/compiler/lib/src/common/tasks.dart b/pkg/compiler/lib/src/common/tasks.dart
index 83a1e0d..077972c 100644
--- a/pkg/compiler/lib/src/common/tasks.dart
+++ b/pkg/compiler/lib/src/common/tasks.dart
@@ -32,8 +32,10 @@
   /// only measure time if measurements are enabled.
   bool get _isDisabled => _watch == null;
 
-  /// Name to use for reporting timing information. Subclasses should override
-  /// this with a proper name, otherwise we use the runtime type of the task.
+  /// Name to use for reporting timing information.
+  ///
+  /// Subclasses should override this with a proper name, otherwise we use the
+  /// runtime type of the task.
   String get name => "Unknown task '${this.runtimeType}'";
 
   bool get isRunning => _watch?.isRunning == true;
@@ -208,6 +210,7 @@
 }
 
 class GenericTask extends CompilerTask {
+  @override
   final String name;
   GenericTask(this.name, Measurer measurer) : super(measurer);
 }
@@ -230,6 +233,7 @@
   final bool enableTaskMeasurements;
 
   static int _hashCodeGenerator = 197;
+  @override
   final int hashCode = _hashCodeGenerator++;
 
   Measurer({this.enableTaskMeasurements: false});
diff --git a/pkg/compiler/lib/src/common_elements.dart b/pkg/compiler/lib/src/common_elements.dart
index 124cfce..008c8d3 100644
--- a/pkg/compiler/lib/src/common_elements.dart
+++ b/pkg/compiler/lib/src/common_elements.dart
@@ -7,12 +7,12 @@
 
 import 'common.dart';
 import 'common/names.dart' show Identifiers, Uris;
+import 'constants/constant_system.dart' as constant_system;
 import 'constants/expressions.dart' show ConstantExpression;
 import 'constants/values.dart';
 import 'elements/entities.dart';
 import 'elements/types.dart';
 import 'inferrer/abstract_value_domain.dart';
-import 'js_backend/constant_system_javascript.dart';
 import 'js_backend/native_data.dart' show NativeBasicData;
 import 'kernel/dart2js_target.dart';
 import 'universe/selector.dart' show Selector;
@@ -58,6 +58,9 @@
   /// The `List` class defined in 'dart:core';
   ClassEntity get listClass;
 
+  /// The `Set` class defined in 'dart:core';
+  ClassEntity get setClass;
+
   /// The `Map` class defined in 'dart:core';
   ClassEntity get mapClass;
 
@@ -100,19 +103,25 @@
   /// The `NativeTypedData` class from dart:typed_data.
   ClassEntity get typedDataClass;
 
-  /// Constructor of the `Symbol` class in dart:internal. This getter will
-  /// ensure that `Symbol` is resolved and lookup the constructor on demand.
+  /// Constructor of the `Symbol` class in dart:internal.
+  ///
+  /// This getter will ensure that `Symbol` is resolved and lookup the
+  /// constructor on demand.
   ConstructorEntity get symbolConstructorTarget;
 
-  /// Whether [element] is the same as [symbolConstructor]. Used to check
-  /// for the constructor without computing it until it is likely to be seen.
+  /// 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(ConstructorEntity element);
 
   /// The function `identical` in dart:core.
   FunctionEntity get identicalFunction;
 
-  /// Whether [element] is the `Function.apply` method. This will not
-  /// resolve the apply method if it hasn't been seen yet during compilation.
+  /// Whether [element] is the `Function.apply` method.
+  ///
+  /// This will not resolve the apply method if it hasn't been seen yet during
+  /// compilation.
   bool isFunctionApplyMethod(MemberEntity element);
 
   /// The `dynamic` type.
@@ -133,9 +142,6 @@
   /// The `double` type defined in 'dart:core'.
   InterfaceType get doubleType;
 
-  /// The `Resource` type defined in 'dart:core'.
-  InterfaceType get resourceType;
-
   /// The `String` type defined in 'dart:core'.
   InterfaceType get stringType;
 
@@ -162,6 +168,12 @@
   /// If no type argument is provided, the canonical raw type is returned.
   InterfaceType listType([DartType elementType]);
 
+  /// Returns an instance of the `Set` type defined in 'dart:core' with
+  /// [elementType] as its type argument.
+  ///
+  /// If no type argument is provided, the canonical raw type is returned.
+  InterfaceType setType([DartType elementType]);
+
   /// Returns an instance of the `Map` type defined in 'dart:core' with
   /// [keyType] and [valueType] as its type arguments.
   ///
@@ -198,21 +210,25 @@
   InterfaceType getConstantMapTypeFor(InterfaceType sourceType,
       {bool hasProtoKey: false, bool onlyStringKeys: false});
 
+  InterfaceType getConstantSetTypeFor(InterfaceType sourceType);
+
   FieldEntity get symbolField;
 
   InterfaceType get symbolImplementationType;
 
   // From dart:core
   ClassEntity get mapLiteralClass;
-
   ConstructorEntity get mapLiteralConstructor;
-
   ConstructorEntity get mapLiteralConstructorEmpty;
-
   FunctionEntity get mapLiteralUntypedMaker;
-
   FunctionEntity get mapLiteralUntypedEmptyMaker;
 
+  ClassEntity get setLiteralClass;
+  ConstructorEntity get setLiteralConstructor;
+  ConstructorEntity get setLiteralConstructorEmpty;
+  FunctionEntity get setLiteralUntypedMaker;
+  FunctionEntity get setLiteralUntypedEmptyMaker;
+
   FunctionEntity get objectNoSuchMethod;
 
   bool isDefaultNoSuchMethodImplementation(FunctionEntity element);
@@ -315,6 +331,8 @@
 
   ClassEntity get constMapLiteralClass;
 
+  ClassEntity get constSetLiteralClass;
+
   ClassEntity get typeVariableClass;
 
   ClassEntity get jsInvocationMirrorClass;
@@ -469,12 +487,9 @@
 
   // From dart:_js_embedded_names
 
+  /// Holds the class for the [JsGetName] enum.
   ClassEntity get jsGetNameEnum;
 
-  ClassEntity get expectNoInlineClass;
-
-  ClassEntity get expectAssumeDynamicClass;
-
   /// Returns `true` if [member] is a "foreign helper", that is, a member whose
   /// semantics is defined synthetically and not through Dart code.
   ///
@@ -491,14 +506,6 @@
 
   ClassEntity get jsAnonymousClass;
 
-  ClassEntity get noSideEffectsClass;
-
-  ClassEntity get noThrowsClass;
-
-  ClassEntity get noInlineClass;
-
-  ClassEntity get forceInlineClass;
-
   ClassEntity get pragmaClass;
   FieldEntity get pragmaClassNameField;
   FieldEntity get pragmaClassOptionsField;
@@ -522,13 +529,15 @@
 }
 
 abstract class JCommonElements implements CommonElements {
-  /// Returns `true` if [element] is the unnamed constructor of `List`. This
-  /// will not resolve the constructor if it hasn't been seen yet during
+  /// Returns `true` if [element] is the unnamed constructor of `List`.
+  ///
+  /// This will not resolve the constructor if it hasn't been seen yet during
   /// compilation.
   bool isUnnamedListConstructor(ConstructorEntity element);
 
-  /// Returns `true` if [element] is the 'filled' constructor of `List`. This
-  /// will not resolve the constructor if it hasn't been seen yet during
+  /// Returns `true` if [element] is the 'filled' constructor of `List`.
+  ///
+  /// This will not resolve the constructor if it hasn't been seen yet during
   /// compilation.
   bool isFilledListConstructor(ConstructorEntity element);
 
@@ -578,6 +587,7 @@
 
   ClassEntity get typedArrayOfDoubleClass;
 
+  /// Holds the class for the [JsBuiltins] enum.
   ClassEntity get jsBuiltinEnum;
 
   bool isForeign(MemberEntity element);
@@ -593,134 +603,144 @@
 
   CommonElementsImpl(this._env);
 
-  /// The `Object` class defined in 'dart:core'.
   ClassEntity _objectClass;
+  @override
   ClassEntity get objectClass =>
       _objectClass ??= _findClass(coreLibrary, 'Object');
 
-  /// The `bool` class defined in 'dart:core'.
   ClassEntity _boolClass;
+  @override
   ClassEntity get boolClass => _boolClass ??= _findClass(coreLibrary, 'bool');
 
-  /// The `num` class defined in 'dart:core'.
   ClassEntity _numClass;
+  @override
   ClassEntity get numClass => _numClass ??= _findClass(coreLibrary, 'num');
 
-  /// The `int` class defined in 'dart:core'.
   ClassEntity _intClass;
+  @override
   ClassEntity get intClass => _intClass ??= _findClass(coreLibrary, 'int');
 
-  /// The `double` class defined in 'dart:core'.
   ClassEntity _doubleClass;
+  @override
   ClassEntity get doubleClass =>
       _doubleClass ??= _findClass(coreLibrary, 'double');
 
-  /// The `String` class defined in 'dart:core'.
   ClassEntity _stringClass;
+  @override
   ClassEntity get stringClass =>
       _stringClass ??= _findClass(coreLibrary, 'String');
 
-  /// The `Function` class defined in 'dart:core'.
   ClassEntity _functionClass;
+  @override
   ClassEntity get functionClass =>
       _functionClass ??= _findClass(coreLibrary, 'Function');
 
-  /// The `Resource` class defined in 'dart:core'.
   ClassEntity _resourceClass;
+  @override
   ClassEntity get resourceClass =>
       _resourceClass ??= _findClass(coreLibrary, 'Resource');
 
-  /// The `Symbol` class defined in 'dart:core'.
   ClassEntity _symbolClass;
+  @override
   ClassEntity get symbolClass =>
       _symbolClass ??= _findClass(coreLibrary, 'Symbol');
 
-  /// The `Null` class defined in 'dart:core'.
   ClassEntity _nullClass;
+  @override
   ClassEntity get nullClass => _nullClass ??= _findClass(coreLibrary, 'Null');
 
-  /// The `Type` class defined in 'dart:core'.
   ClassEntity _typeClass;
+  @override
   ClassEntity get typeClass => _typeClass ??= _findClass(coreLibrary, 'Type');
 
-  /// The `StackTrace` class defined in 'dart:core';
   ClassEntity _stackTraceClass;
+  @override
   ClassEntity get stackTraceClass =>
       _stackTraceClass ??= _findClass(coreLibrary, 'StackTrace');
 
-  /// The `List` class defined in 'dart:core';
   ClassEntity _listClass;
+  @override
   ClassEntity get listClass => _listClass ??= _findClass(coreLibrary, 'List');
 
-  /// The `Map` class defined in 'dart:core';
+  ClassEntity _setClass;
+  @override
+  ClassEntity get setClass => _setClass ??= _findClass(coreLibrary, 'Set');
+
   ClassEntity _mapClass;
+  @override
   ClassEntity get mapClass => _mapClass ??= _findClass(coreLibrary, 'Map');
 
-  /// The `_UnmodifiableSet` class defined in 'dart:collection';
   ClassEntity _unmodifiableSetClass;
+  @override
   ClassEntity get unmodifiableSetClass => _unmodifiableSetClass ??=
       _findClass(_env.lookupLibrary(Uris.dart_collection), '_UnmodifiableSet');
 
-  /// The `Iterable` class defined in 'dart:core';
   ClassEntity _iterableClass;
+  @override
   ClassEntity get iterableClass =>
       _iterableClass ??= _findClass(coreLibrary, 'Iterable');
 
-  /// The `Future` class defined in 'async';.
   ClassEntity _futureClass;
+  @override
   ClassEntity get futureClass =>
       _futureClass ??= _findClass(asyncLibrary, 'Future');
 
-  /// The `Stream` class defined in 'async';
   ClassEntity _streamClass;
+  @override
   ClassEntity get streamClass =>
       _streamClass ??= _findClass(asyncLibrary, 'Stream');
 
-  /// The dart:core library.
   LibraryEntity _coreLibrary;
+  @override
   LibraryEntity get coreLibrary =>
       _coreLibrary ??= _env.lookupLibrary(Uris.dart_core, required: true);
 
-  /// The dart:async library.
   LibraryEntity _asyncLibrary;
+  @override
   LibraryEntity get asyncLibrary =>
       _asyncLibrary ??= _env.lookupLibrary(Uris.dart_async);
 
-  /// The dart:mirrors library. Null if the program doesn't access dart:mirrors.
+  /// The dart:mirrors library.
+  ///
+  /// Null if the program doesn't access dart:mirrors.
   LibraryEntity _mirrorsLibrary;
+  @override
   LibraryEntity get mirrorsLibrary =>
       _mirrorsLibrary ??= _env.lookupLibrary(Uris.dart_mirrors);
 
-  /// The dart:typed_data library.
   LibraryEntity _typedDataLibrary;
+  @override
   LibraryEntity get typedDataLibrary =>
       _typedDataLibrary ??= _env.lookupLibrary(Uris.dart__native_typed_data);
 
   LibraryEntity _jsHelperLibrary;
+  @override
   LibraryEntity get jsHelperLibrary =>
       _jsHelperLibrary ??= _env.lookupLibrary(Uris.dart__js_helper);
 
   LibraryEntity _interceptorsLibrary;
+  @override
   LibraryEntity get interceptorsLibrary =>
       _interceptorsLibrary ??= _env.lookupLibrary(Uris.dart__interceptors);
 
   LibraryEntity _foreignLibrary;
+  @override
   LibraryEntity get foreignLibrary =>
       _foreignLibrary ??= _env.lookupLibrary(Uris.dart__foreign_helper);
 
   /// Reference to the internal library to lookup functions to always inline.
   LibraryEntity _internalLibrary;
+  @override
   LibraryEntity get internalLibrary => _internalLibrary ??=
       _env.lookupLibrary(Uris.dart__internal, required: true);
 
-  /// The `NativeTypedData` class from dart:typed_data.
   ClassEntity _typedDataClass;
+  @override
   ClassEntity get typedDataClass =>
       _typedDataClass ??= _findClass(typedDataLibrary, 'NativeTypedData');
 
-  /// Constructor of the `Symbol` class in dart:internal. This getter will
-  /// ensure that `Symbol` is resolved and lookup the constructor on demand.
   ConstructorEntity _symbolConstructorTarget;
+  @override
   ConstructorEntity get symbolConstructorTarget {
     // TODO(johnniwinther): Kernel does not include redirecting factories
     // so this cannot be found in kernel. Find a consistent way to handle
@@ -755,8 +775,7 @@
         _findConstructor(symbolClass, '', required: false);
   }
 
-  /// Whether [element] is the same as [symbolConstructor]. Used to check
-  /// for the constructor without computing it until it is likely to be seen.
+  @override
   bool isSymbolConstructor(ConstructorEntity element) {
     assert(element != null);
     _ensureSymbolConstructorDependencies();
@@ -764,74 +783,72 @@
         element == _symbolConstructorTarget;
   }
 
-  /// The function `identical` in dart:core.
   FunctionEntity _identicalFunction;
+  @override
   FunctionEntity get identicalFunction =>
       _identicalFunction ??= _findLibraryMember(coreLibrary, 'identical');
 
-  /// Whether [element] is the `Function.apply` method. This will not
-  /// resolve the apply method if it hasn't been seen yet during compilation.
+  @override
   bool isFunctionApplyMethod(MemberEntity element) =>
       element.name == 'apply' && element.enclosingClass == functionClass;
 
-  /// Returns `true` if [element] is the unnamed constructor of `List`. This
-  /// will not resolve the constructor if it hasn't been seen yet during
+  /// Returns `true` if [element] is the unnamed constructor of `List`.
+  ///
+  /// This will not resolve the constructor if it hasn't been seen yet during
   /// compilation.
+  @override
   bool isUnnamedListConstructor(ConstructorEntity element) =>
       (element.name == '' && element.enclosingClass == listClass) ||
       (element.name == 'list' && element.enclosingClass == jsArrayClass);
 
-  /// Returns `true` if [element] is the 'filled' constructor of `List`. This
-  /// will not resolve the constructor if it hasn't been seen yet during
+  /// Returns `true` if [element] is the 'filled' constructor of `List`.
+  ///
+  /// This will not resolve the constructor if it hasn't been seen yet during
   /// compilation.
+  @override
   bool isFilledListConstructor(ConstructorEntity element) =>
       element.name == 'filled' && element.enclosingClass == listClass;
 
-  /// The `dynamic` type.
+  @override
   DynamicType get dynamicType => _env.dynamicType;
 
-  /// The `Object` type defined in 'dart:core'.
+  @override
   InterfaceType get objectType => _getRawType(objectClass);
 
-  /// The `bool` type defined in 'dart:core'.
+  @override
   InterfaceType get boolType => _getRawType(boolClass);
 
-  /// The `num` type defined in 'dart:core'.
+  @override
   InterfaceType get numType => _getRawType(numClass);
 
-  /// The `int` type defined in 'dart:core'.
+  @override
   InterfaceType get intType => _getRawType(intClass);
 
-  /// The `double` type defined in 'dart:core'.
+  @override
   InterfaceType get doubleType => _getRawType(doubleClass);
 
-  /// The `Resource` type defined in 'dart:core'.
-  InterfaceType get resourceType => _getRawType(resourceClass);
-
-  /// The `String` type defined in 'dart:core'.
+  @override
   InterfaceType get stringType => _getRawType(stringClass);
 
-  /// The `Symbol` type defined in 'dart:core'.
+  @override
   InterfaceType get symbolType => _getRawType(symbolClass);
 
-  /// The `Function` type defined in 'dart:core'.
+  @override
   InterfaceType get functionType => _getRawType(functionClass);
 
-  /// The `Null` type defined in 'dart:core'.
+  @override
   InterfaceType get nullType => _getRawType(nullClass);
 
-  /// The `Type` type defined in 'dart:core'.
+  @override
   InterfaceType get typeType => _getRawType(typeClass);
 
+  @override
   InterfaceType get typeLiteralType => _getRawType(typeLiteralClass);
 
-  /// The `StackTrace` type defined in 'dart:core';
+  @override
   InterfaceType get stackTraceType => _getRawType(stackTraceClass);
 
-  /// 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.
+  @override
   InterfaceType listType([DartType elementType]) {
     if (elementType == null) {
       return _getRawType(listClass);
@@ -839,10 +856,15 @@
     return _createInterfaceType(listClass, [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.
+  @override
+  InterfaceType setType([DartType elementType]) {
+    if (elementType == null) {
+      return _getRawType(setClass);
+    }
+    return _createInterfaceType(setClass, [elementType]);
+  }
+
+  @override
   InterfaceType mapType([DartType keyType, DartType valueType]) {
     if (keyType == null && valueType == null) {
       return _getRawType(mapClass);
@@ -854,10 +876,7 @@
     return _createInterfaceType(mapClass, [keyType, 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.
+  @override
   InterfaceType iterableType([DartType elementType]) {
     if (elementType == null) {
       return _getRawType(iterableClass);
@@ -865,10 +884,7 @@
     return _createInterfaceType(iterableClass, [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.
+  @override
   InterfaceType futureType([DartType elementType]) {
     if (elementType == null) {
       return _getRawType(futureClass);
@@ -876,10 +892,7 @@
     return _createInterfaceType(futureClass, [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.
+  @override
   InterfaceType streamType([DartType elementType]) {
     if (elementType == null) {
       return _getRawType(streamClass);
@@ -887,17 +900,17 @@
     return _createInterfaceType(streamClass, [elementType]);
   }
 
-  /// Returns `true` if [element] is a superclass of `String` or `num`.
+  @override
   bool isNumberOrStringSupertype(ClassEntity element) {
     return element == _findClass(coreLibrary, 'Comparable', required: false);
   }
 
-  /// Returns `true` if [element] is a superclass of `String`.
+  @override
   bool isStringOnlySupertype(ClassEntity element) {
     return element == _findClass(coreLibrary, 'Pattern', required: false);
   }
 
-  /// Returns `true` if [element] is a superclass of `List`.
+  @override
   bool isListSupertype(ClassEntity element) => element == iterableClass;
 
   ClassEntity _findClass(LibraryEntity library, String name,
@@ -935,6 +948,7 @@
     return _env.createInterfaceType(cls, typeArguments);
   }
 
+  @override
   InterfaceType getConstantMapTypeFor(InterfaceType sourceType,
       {bool hasProtoKey: false, bool onlyStringKeys: false}) {
     ClassEntity classElement = onlyStringKeys
@@ -948,11 +962,21 @@
     }
   }
 
+  @override
+  InterfaceType getConstantSetTypeFor(InterfaceType sourceType) =>
+      sourceType.treatAsRaw
+          ? _env.getRawType(constSetLiteralClass)
+          : _env.createInterfaceType(
+              constSetLiteralClass, sourceType.typeArguments);
+
+  @override
   FieldEntity get symbolField => symbolImplementationField;
 
+  @override
   InterfaceType get symbolImplementationType =>
       _env.getRawType(symbolImplementationClass);
 
+  @override
   bool isDefaultEqualityImplementation(MemberEntity element) {
     assert(element.name == '==');
     ClassEntity classElement = element.enclosingClass;
@@ -964,6 +988,7 @@
   // From dart:core
 
   ClassEntity _mapLiteralClass;
+  @override
   ClassEntity get mapLiteralClass {
     if (_mapLiteralClass == null) {
       _mapLiteralClass = _env.lookupClass(coreLibrary, 'LinkedHashMap');
@@ -992,32 +1017,85 @@
         _env.lookupLocalClassMember(mapLiteralClass, '_makeEmpty');
   }
 
+  @override
   ConstructorEntity get mapLiteralConstructor {
     _ensureMapLiteralHelpers();
     return _mapLiteralConstructor;
   }
 
+  @override
   ConstructorEntity get mapLiteralConstructorEmpty {
     _ensureMapLiteralHelpers();
     return _mapLiteralConstructorEmpty;
   }
 
+  @override
   FunctionEntity get mapLiteralUntypedMaker {
     _ensureMapLiteralHelpers();
     return _mapLiteralUntypedMaker;
   }
 
+  @override
   FunctionEntity get mapLiteralUntypedEmptyMaker {
     _ensureMapLiteralHelpers();
     return _mapLiteralUntypedEmptyMaker;
   }
 
+  ClassEntity _setLiteralClass;
+  @override
+  ClassEntity get setLiteralClass => _setLiteralClass ??=
+      _findClass(_env.lookupLibrary(Uris.dart_collection), 'LinkedHashSet');
+
+  ConstructorEntity _setLiteralConstructor;
+  ConstructorEntity _setLiteralConstructorEmpty;
+  FunctionEntity _setLiteralUntypedMaker;
+  FunctionEntity _setLiteralUntypedEmptyMaker;
+
+  void _ensureSetLiteralHelpers() {
+    if (_setLiteralConstructor != null) return;
+
+    _setLiteralConstructor =
+        _env.lookupConstructor(setLiteralClass, '_literal');
+    _setLiteralConstructorEmpty =
+        _env.lookupConstructor(setLiteralClass, '_empty');
+    _setLiteralUntypedMaker =
+        _env.lookupLocalClassMember(setLiteralClass, '_makeLiteral');
+    _setLiteralUntypedEmptyMaker =
+        _env.lookupLocalClassMember(setLiteralClass, '_makeEmpty');
+  }
+
+  @override
+  ConstructorEntity get setLiteralConstructor {
+    _ensureSetLiteralHelpers();
+    return _setLiteralConstructor;
+  }
+
+  @override
+  ConstructorEntity get setLiteralConstructorEmpty {
+    _ensureSetLiteralHelpers();
+    return _setLiteralConstructorEmpty;
+  }
+
+  @override
+  FunctionEntity get setLiteralUntypedMaker {
+    _ensureSetLiteralHelpers();
+    return _setLiteralUntypedMaker;
+  }
+
+  @override
+  FunctionEntity get setLiteralUntypedEmptyMaker {
+    _ensureSetLiteralHelpers();
+    return _setLiteralUntypedEmptyMaker;
+  }
+
   FunctionEntity _objectNoSuchMethod;
+  @override
   FunctionEntity get objectNoSuchMethod {
     return _objectNoSuchMethod ??=
         _env.lookupLocalClassMember(objectClass, Identifiers.noSuchMethod_);
   }
 
+  @override
   bool isDefaultNoSuchMethodImplementation(FunctionEntity element) {
     ClassEntity classElement = element.enclosingClass;
     return classElement == objectClass ||
@@ -1032,59 +1110,78 @@
   FunctionEntity _findAsyncHelperFunction(String name) =>
       _findLibraryMember(asyncLibrary, name);
 
+  @override
   FunctionEntity get asyncHelperStartSync =>
       _findAsyncHelperFunction("_asyncStartSync");
+  @override
   FunctionEntity get asyncHelperAwait =>
       _findAsyncHelperFunction("_asyncAwait");
+  @override
   FunctionEntity get asyncHelperReturn =>
       _findAsyncHelperFunction("_asyncReturn");
+  @override
   FunctionEntity get asyncHelperRethrow =>
       _findAsyncHelperFunction("_asyncRethrow");
 
+  @override
   FunctionEntity get wrapBody =>
       _findAsyncHelperFunction("_wrapJsFunctionForAsync");
 
+  @override
   FunctionEntity get yieldStar => _env.lookupLocalClassMember(
       _findAsyncHelperClass("_IterationMarker"), "yieldStar");
 
+  @override
   FunctionEntity get yieldSingle => _env.lookupLocalClassMember(
       _findAsyncHelperClass("_IterationMarker"), "yieldSingle");
 
+  @override
   FunctionEntity get syncStarUncaughtError => _env.lookupLocalClassMember(
       _findAsyncHelperClass("_IterationMarker"), "uncaughtError");
 
+  @override
   FunctionEntity get asyncStarHelper =>
       _findAsyncHelperFunction("_asyncStarHelper");
 
+  @override
   FunctionEntity get streamOfController =>
       _findAsyncHelperFunction("_streamOfController");
 
+  @override
   FunctionEntity get endOfIteration => _env.lookupLocalClassMember(
       _findAsyncHelperClass("_IterationMarker"), "endOfIteration");
 
+  @override
   ClassEntity get syncStarIterable =>
       _findAsyncHelperClass("_SyncStarIterable");
 
+  @override
   ClassEntity get futureImplementation => _findAsyncHelperClass('_Future');
 
+  @override
   ClassEntity get controllerStream =>
       _findAsyncHelperClass("_ControllerStream");
 
+  @override
   ClassEntity get streamIterator => _findAsyncHelperClass("StreamIterator");
 
+  @override
   ConstructorEntity get streamIteratorConstructor =>
       _env.lookupConstructor(streamIterator, "");
 
   FunctionEntity _syncStarIterableFactory;
+  @override
   FunctionEntity get syncStarIterableFactory => _syncStarIterableFactory ??=
       _findAsyncHelperFunction('_makeSyncStarIterable');
 
   FunctionEntity _asyncAwaitCompleterFactory;
+  @override
   FunctionEntity get asyncAwaitCompleterFactory =>
       _asyncAwaitCompleterFactory ??=
           _findAsyncHelperFunction('_makeAsyncAwaitCompleter');
 
   FunctionEntity _asyncStarStreamControllerFactory;
+  @override
   FunctionEntity get asyncStarStreamControllerFactory =>
       _asyncStarStreamControllerFactory ??=
           _findAsyncHelperFunction('_makeAsyncStarStreamController');
@@ -1097,92 +1194,112 @@
       _findLibraryMember(interceptorsLibrary, name);
 
   ClassEntity _jsInterceptorClass;
+  @override
   ClassEntity get jsInterceptorClass =>
       _jsInterceptorClass ??= _findInterceptorsClass('Interceptor');
 
   ClassEntity _jsStringClass;
+  @override
   ClassEntity get jsStringClass =>
       _jsStringClass ??= _findInterceptorsClass('JSString');
 
   ClassEntity _jsArrayClass;
+  @override
   ClassEntity get jsArrayClass =>
       _jsArrayClass ??= _findInterceptorsClass('JSArray');
 
   ClassEntity _jsNumberClass;
+  @override
   ClassEntity get jsNumberClass =>
       _jsNumberClass ??= _findInterceptorsClass('JSNumber');
 
   ClassEntity _jsIntClass;
+  @override
   ClassEntity get jsIntClass => _jsIntClass ??= _findInterceptorsClass('JSInt');
 
   ClassEntity _jsDoubleClass;
+  @override
   ClassEntity get jsDoubleClass =>
       _jsDoubleClass ??= _findInterceptorsClass('JSDouble');
 
   ClassEntity _jsNullClass;
+  @override
   ClassEntity get jsNullClass =>
       _jsNullClass ??= _findInterceptorsClass('JSNull');
 
   ClassEntity _jsBoolClass;
+  @override
   ClassEntity get jsBoolClass =>
       _jsBoolClass ??= _findInterceptorsClass('JSBool');
 
   ClassEntity _jsPlainJavaScriptObjectClass;
+  @override
   ClassEntity get jsPlainJavaScriptObjectClass =>
       _jsPlainJavaScriptObjectClass ??=
           _findInterceptorsClass('PlainJavaScriptObject');
 
   ClassEntity _jsUnknownJavaScriptObjectClass;
+  @override
   ClassEntity get jsUnknownJavaScriptObjectClass =>
       _jsUnknownJavaScriptObjectClass ??=
           _findInterceptorsClass('UnknownJavaScriptObject');
 
   ClassEntity _jsJavaScriptFunctionClass;
+  @override
   ClassEntity get jsJavaScriptFunctionClass => _jsJavaScriptFunctionClass ??=
       _findInterceptorsClass('JavaScriptFunction');
 
   ClassEntity _jsJavaScriptObjectClass;
+  @override
   ClassEntity get jsJavaScriptObjectClass =>
       _jsJavaScriptObjectClass ??= _findInterceptorsClass('JavaScriptObject');
 
   ClassEntity _jsIndexableClass;
+  @override
   ClassEntity get jsIndexableClass =>
       _jsIndexableClass ??= _findInterceptorsClass('JSIndexable');
 
   ClassEntity _jsMutableIndexableClass;
+  @override
   ClassEntity get jsMutableIndexableClass =>
       _jsMutableIndexableClass ??= _findInterceptorsClass('JSMutableIndexable');
 
   ClassEntity _jsMutableArrayClass;
+  @override
   ClassEntity get jsMutableArrayClass =>
       _jsMutableArrayClass ??= _findInterceptorsClass('JSMutableArray');
 
   ClassEntity _jsFixedArrayClass;
+  @override
   ClassEntity get jsFixedArrayClass =>
       _jsFixedArrayClass ??= _findInterceptorsClass('JSFixedArray');
 
   ClassEntity _jsExtendableArrayClass;
+  @override
   ClassEntity get jsExtendableArrayClass =>
       _jsExtendableArrayClass ??= _findInterceptorsClass('JSExtendableArray');
 
   ClassEntity _jsUnmodifiableArrayClass;
+  @override
   ClassEntity get jsUnmodifiableArrayClass => _jsUnmodifiableArrayClass ??=
       _findInterceptorsClass('JSUnmodifiableArray');
 
   ClassEntity _jsPositiveIntClass;
+  @override
   ClassEntity get jsPositiveIntClass =>
       _jsPositiveIntClass ??= _findInterceptorsClass('JSPositiveInt');
 
   ClassEntity _jsUInt32Class;
+  @override
   ClassEntity get jsUInt32Class =>
       _jsUInt32Class ??= _findInterceptorsClass('JSUInt32');
 
   ClassEntity _jsUInt31Class;
+  @override
   ClassEntity get jsUInt31Class =>
       _jsUInt31Class ??= _findInterceptorsClass('JSUInt31');
 
-  /// Returns `true` member is the 'findIndexForNativeSubclassType' method
-  /// declared in `dart:_interceptors`.
+  @override
   bool isFindIndexForNativeSubclassType(MemberEntity member) {
     return member.name == 'findIndexForNativeSubclassType' &&
         member.isTopLevel &&
@@ -1190,24 +1307,28 @@
   }
 
   FunctionEntity _getNativeInterceptorMethod;
+  @override
   FunctionEntity get getNativeInterceptorMethod =>
       _getNativeInterceptorMethod ??=
           _findInterceptorsFunction('getNativeInterceptor');
 
-  /// Returns `true` if [selector] applies to `JSIndexable.length`.
+  @override
   bool appliesToJsIndexableLength(Selector selector) {
     return selector.name == 'length' && (selector.isGetter || selector.isCall);
   }
 
   ConstructorEntity _jsArrayTypedConstructor;
+  @override
   ConstructorEntity get jsArrayTypedConstructor =>
       _jsArrayTypedConstructor ??= _findConstructor(jsArrayClass, 'typed');
 
   FunctionEntity _jsArrayRemoveLast;
+  @override
   FunctionEntity get jsArrayRemoveLast =>
       _jsArrayRemoveLast ??= _findClassMember(jsArrayClass, 'removeLast');
 
   FunctionEntity _jsArrayAdd;
+  @override
   FunctionEntity get jsArrayAdd =>
       _jsArrayAdd ??= _findClassMember(jsArrayClass, 'add');
 
@@ -1215,16 +1336,14 @@
     return cls.name == 'JSString' && cls.library == interceptorsLibrary;
   }
 
+  @override
   bool isJsStringSplit(MemberEntity member) {
     return member.name == 'split' &&
         member.isInstanceMember &&
         _isJsStringClass(member.enclosingClass);
   }
 
-  /// Returns `true` if [selector] applies to `JSString.split` on [receiver]
-  /// in the given [world].
-  ///
-  /// Returns `false` if `JSString.split` is not available.
+  @override
   bool appliesToJsStringSplit(Selector selector, AbstractValue receiver,
       AbstractValueDomain abstractValueDomain) {
     if (_jsStringSplit == null) {
@@ -1242,23 +1361,28 @@
   }
 
   FunctionEntity _jsStringSplit;
+  @override
   FunctionEntity get jsStringSplit =>
       _jsStringSplit ??= _findClassMember(jsStringClass, 'split');
 
   FunctionEntity _jsStringToString;
+  @override
   FunctionEntity get jsStringToString =>
       _jsStringToString ??= _findClassMember(jsStringClass, 'toString');
 
   FunctionEntity _jsStringOperatorAdd;
+  @override
   FunctionEntity get jsStringOperatorAdd =>
       _jsStringOperatorAdd ??= _findClassMember(jsStringClass, '+');
 
   ClassEntity _jsConstClass;
+  @override
   ClassEntity get jsConstClass =>
       _jsConstClass ??= _findClass(foreignLibrary, 'JS_CONST');
 
   // From package:js
   ClassEntity _jsAnnotationClass;
+  @override
   ClassEntity get jsAnnotationClass {
     if (_jsAnnotationClass == null) {
       LibraryEntity library = _env.lookupLibrary(Uris.package_js);
@@ -1269,6 +1393,7 @@
   }
 
   ClassEntity _jsAnonymousClass;
+  @override
   ClassEntity get jsAnonymousClass {
     if (_jsAnonymousClass == null) {
       LibraryEntity library = _env.lookupLibrary(Uris.package_js);
@@ -1278,8 +1403,7 @@
     return _jsAnonymousClass;
   }
 
-  // From dart:_js_helper
-  // TODO(johnniwinther): Avoid the need for this (from [CheckedModeHelper]).
+  @override
   FunctionEntity findHelperFunction(String name) => _findHelperFunction(name);
 
   FunctionEntity _findHelperFunction(String name) =>
@@ -1289,168 +1413,194 @@
       _findClass(jsHelperLibrary, name);
 
   ClassEntity _closureClass;
+  @override
   ClassEntity get closureClass => _closureClass ??= _findHelperClass('Closure');
 
   ClassEntity _boundClosureClass;
+  @override
   ClassEntity get boundClosureClass =>
       _boundClosureClass ??= _findHelperClass('BoundClosure');
 
   ClassEntity _typeLiteralClass;
+  @override
   ClassEntity get typeLiteralClass =>
       _typeLiteralClass ??= _findHelperClass('TypeImpl');
 
   ClassEntity _constMapLiteralClass;
+  @override
   ClassEntity get constMapLiteralClass =>
       _constMapLiteralClass ??= _findHelperClass('ConstantMap');
 
+  // TODO(fishythefish): Implement a `ConstantSet` class and update the backend
+  // impacts + constant emitter accordingly.
+  ClassEntity _constSetLiteralClass;
+  @override
+  ClassEntity get constSetLiteralClass =>
+      _constSetLiteralClass ??= unmodifiableSetClass;
+
   ClassEntity _typeVariableClass;
+  @override
   ClassEntity get typeVariableClass =>
       _typeVariableClass ??= _findHelperClass('TypeVariable');
 
-  ClassEntity _noSideEffectsClass;
-  ClassEntity get noSideEffectsClass =>
-      _noSideEffectsClass ??= _findHelperClass('NoSideEffects');
-
-  ClassEntity _noThrowsClass;
-  ClassEntity get noThrowsClass =>
-      _noThrowsClass ??= _findHelperClass('NoThrows');
-
-  ClassEntity _noInlineClass;
-  ClassEntity get noInlineClass =>
-      _noInlineClass ??= _findHelperClass('NoInline');
-
-  ClassEntity _forceInlineClass;
-  ClassEntity get forceInlineClass =>
-      _forceInlineClass ??= _findHelperClass('ForceInline');
-
   ClassEntity _pragmaClass;
+  @override
   ClassEntity get pragmaClass =>
       _pragmaClass ??= _findClass(coreLibrary, 'pragma');
 
   FieldEntity _pragmaClassNameField;
+  @override
   FieldEntity get pragmaClassNameField =>
       _pragmaClassNameField ??= _findClassMember(pragmaClass, 'name');
 
   FieldEntity _pragmaClassOptionsField;
+  @override
   FieldEntity get pragmaClassOptionsField =>
       _pragmaClassOptionsField ??= _findClassMember(pragmaClass, 'options');
 
   ClassEntity _jsInvocationMirrorClass;
+  @override
   ClassEntity get jsInvocationMirrorClass =>
       _jsInvocationMirrorClass ??= _findHelperClass('JSInvocationMirror');
 
   MemberEntity _invocationTypeArgumentGetter;
+  @override
   MemberEntity get invocationTypeArgumentGetter =>
       _invocationTypeArgumentGetter ??=
           _findClassMember(jsInvocationMirrorClass, 'typeArguments');
 
-  /// Interface used to determine if an object has the JavaScript
-  /// indexing behavior. The interface is only visible to specific libraries.
   ClassEntity _jsIndexingBehaviorInterface;
+  @override
   ClassEntity get jsIndexingBehaviorInterface =>
       _jsIndexingBehaviorInterface ??=
           _findHelperClass('JavaScriptIndexingBehavior');
 
+  @override
   ClassEntity get stackTraceHelperClass => _findHelperClass('_StackTrace');
 
+  @override
   ClassEntity get constantMapClass =>
-      _findHelperClass(JavaScriptMapConstant.DART_CLASS);
+      _findHelperClass(constant_system.JavaScriptMapConstant.DART_CLASS);
+  @override
   ClassEntity get constantStringMapClass =>
-      _findHelperClass(JavaScriptMapConstant.DART_STRING_CLASS);
+      _findHelperClass(constant_system.JavaScriptMapConstant.DART_STRING_CLASS);
+  @override
   ClassEntity get constantProtoMapClass =>
-      _findHelperClass(JavaScriptMapConstant.DART_PROTO_CLASS);
-  ClassEntity get generalConstantMapClass =>
-      _findHelperClass(JavaScriptMapConstant.DART_GENERAL_CLASS);
+      _findHelperClass(constant_system.JavaScriptMapConstant.DART_PROTO_CLASS);
+  @override
+  ClassEntity get generalConstantMapClass => _findHelperClass(
+      constant_system.JavaScriptMapConstant.DART_GENERAL_CLASS);
 
+  @override
   ClassEntity get annotationCreatesClass => _findHelperClass('Creates');
 
+  @override
   ClassEntity get annotationReturnsClass => _findHelperClass('Returns');
 
+  @override
   ClassEntity get annotationJSNameClass => _findHelperClass('JSName');
 
-  /// The class for native annotations defined in dart:_js_helper.
   ClassEntity _nativeAnnotationClass;
+  @override
   ClassEntity get nativeAnnotationClass =>
       _nativeAnnotationClass ??= _findHelperClass('Native');
 
   ConstructorEntity _typeVariableConstructor;
+  @override
   ConstructorEntity get typeVariableConstructor => _typeVariableConstructor ??=
       _env.lookupConstructor(typeVariableClass, '');
 
   FunctionEntity _assertTest;
+  @override
   FunctionEntity get assertTest =>
       _assertTest ??= _findHelperFunction('assertTest');
 
   FunctionEntity _assertThrow;
+  @override
   FunctionEntity get assertThrow =>
       _assertThrow ??= _findHelperFunction('assertThrow');
 
   FunctionEntity _assertHelper;
+  @override
   FunctionEntity get assertHelper =>
       _assertHelper ??= _findHelperFunction('assertHelper');
 
   FunctionEntity _assertUnreachableMethod;
+  @override
   FunctionEntity get assertUnreachableMethod =>
       _assertUnreachableMethod ??= _findHelperFunction('assertUnreachable');
 
-  /// Holds the method "getIsolateAffinityTag" when dart:_js_helper has been
-  /// loaded.
   FunctionEntity _getIsolateAffinityTagMarker;
+  @override
   FunctionEntity get getIsolateAffinityTagMarker =>
       _getIsolateAffinityTagMarker ??=
           _findHelperFunction('getIsolateAffinityTag');
 
-  /// Holds the method "requiresPreamble" in _js_helper.
   FunctionEntity _requiresPreambleMarker;
+  @override
   FunctionEntity get requiresPreambleMarker =>
       _requiresPreambleMarker ??= _findHelperFunction('requiresPreamble');
 
+  @override
   FunctionEntity get loadLibraryWrapper =>
       _findHelperFunction("_loadLibraryWrapper");
 
+  @override
   FunctionEntity get loadDeferredLibrary =>
       _findHelperFunction("loadDeferredLibrary");
 
+  @override
   FunctionEntity get boolConversionCheck =>
       _findHelperFunction('boolConversionCheck');
 
+  @override
   FunctionEntity get traceHelper => _findHelperFunction('traceHelper');
 
+  @override
   FunctionEntity get closureFromTearOff =>
       _findHelperFunction('closureFromTearOff');
 
+  @override
   FunctionEntity get isJsIndexable => _findHelperFunction('isJsIndexable');
 
+  @override
   FunctionEntity get throwIllegalArgumentException =>
       _findHelperFunction('iae');
 
+  @override
   FunctionEntity get throwIndexOutOfRangeException =>
       _findHelperFunction('ioore');
 
+  @override
   FunctionEntity get exceptionUnwrapper =>
       _findHelperFunction('unwrapException');
 
+  @override
   FunctionEntity get throwRuntimeError =>
       _findHelperFunction('throwRuntimeError');
 
+  @override
   FunctionEntity get throwUnsupportedError =>
       _findHelperFunction('throwUnsupportedError');
 
+  @override
   FunctionEntity get throwTypeError => _findHelperFunction('throwTypeError');
 
+  @override
   FunctionEntity get throwAbstractClassInstantiationError =>
       _findHelperFunction('throwAbstractClassInstantiationError');
 
   FunctionEntity _cachedCheckConcurrentModificationError;
+  @override
   FunctionEntity get checkConcurrentModificationError =>
       _cachedCheckConcurrentModificationError ??=
           _findHelperFunction('checkConcurrentModificationError');
 
+  @override
   FunctionEntity get throwConcurrentModificationError =>
       _findHelperFunction('throwConcurrentModificationError');
 
-  /// Return `true` if [member] is the 'checkInt' function defined in
-  /// dart:_js_helpers.
+  @override
   bool isCheckInt(MemberEntity member) {
     return member.isFunction &&
         member.isTopLevel &&
@@ -1458,8 +1608,7 @@
         member.name == 'checkInt';
   }
 
-  /// Return `true` if [member] is the 'checkNum' function defined in
-  /// dart:_js_helpers.
+  @override
   bool isCheckNum(MemberEntity member) {
     return member.isFunction &&
         member.isTopLevel &&
@@ -1467,8 +1616,7 @@
         member.name == 'checkNum';
   }
 
-  /// Return `true` if [member] is the 'checkString' function defined in
-  /// dart:_js_helpers.
+  @override
   bool isCheckString(MemberEntity member) {
     return member.isFunction &&
         member.isTopLevel &&
@@ -1476,92 +1624,123 @@
         member.name == 'checkString';
   }
 
+  @override
   FunctionEntity get stringInterpolationHelper => _findHelperFunction('S');
 
+  @override
   FunctionEntity get wrapExceptionHelper =>
       _findHelperFunction('wrapException');
 
+  @override
   FunctionEntity get throwExpressionHelper =>
       _findHelperFunction('throwExpression');
 
+  @override
   FunctionEntity get closureConverter =>
       _findHelperFunction('convertDartClosureToJS');
 
+  @override
   FunctionEntity get traceFromException =>
       _findHelperFunction('getTraceFromException');
 
+  @override
   FunctionEntity get setRuntimeTypeInfo =>
       _findHelperFunction('setRuntimeTypeInfo');
 
+  @override
   FunctionEntity get getRuntimeTypeInfo =>
       _findHelperFunction('getRuntimeTypeInfo');
 
+  @override
   FunctionEntity get getTypeArgumentByIndex =>
       _findHelperFunction('getTypeArgumentByIndex');
 
+  @override
   FunctionEntity get computeSignature =>
       _findHelperFunction('computeSignature');
 
+  @override
   FunctionEntity get getRuntimeTypeArguments =>
       _findHelperFunction('getRuntimeTypeArguments');
 
+  @override
   FunctionEntity get getRuntimeTypeArgument =>
       _findHelperFunction('getRuntimeTypeArgument');
 
+  @override
   FunctionEntity get getRuntimeTypeArgumentIntercepted =>
       _findHelperFunction('getRuntimeTypeArgumentIntercepted');
 
+  @override
   FunctionEntity get assertIsSubtype => _findHelperFunction('assertIsSubtype');
 
+  @override
   FunctionEntity get checkSubtype => _findHelperFunction('checkSubtype');
 
+  @override
   FunctionEntity get assertSubtype => _findHelperFunction('assertSubtype');
 
+  @override
   FunctionEntity get subtypeCast => _findHelperFunction('subtypeCast');
 
+  @override
   FunctionEntity get functionTypeTest =>
       _findHelperFunction('functionTypeTest');
 
+  @override
   FunctionEntity get futureOrTest => _findHelperFunction('futureOrTest');
 
+  @override
   FunctionEntity get checkSubtypeOfRuntimeType =>
       _findHelperFunction('checkSubtypeOfRuntimeType');
 
+  @override
   FunctionEntity get assertSubtypeOfRuntimeType =>
       _findHelperFunction('assertSubtypeOfRuntimeType');
 
+  @override
   FunctionEntity get subtypeOfRuntimeTypeCast =>
       _findHelperFunction('subtypeOfRuntimeTypeCast');
 
+  @override
   FunctionEntity get checkDeferredIsLoaded =>
       _findHelperFunction('checkDeferredIsLoaded');
 
+  @override
   FunctionEntity get throwNoSuchMethod =>
       _findHelperFunction('throwNoSuchMethod');
 
+  @override
   FunctionEntity get createRuntimeType =>
       _findHelperFunction('createRuntimeType');
 
+  @override
   FunctionEntity get fallThroughError =>
       _findHelperFunction("getFallThroughError");
 
+  @override
   FunctionEntity get createInvocationMirror =>
       _findHelperFunction('createInvocationMirror');
 
+  @override
   bool isCreateInvocationMirrorHelper(MemberEntity member) {
     return member.isTopLevel &&
         member.name == '_createInvocationMirror' &&
         member.library == coreLibrary;
   }
 
+  @override
   FunctionEntity get createUnmangledInvocationMirror =>
       _findHelperFunction('createUnmangledInvocationMirror');
 
+  @override
   FunctionEntity get cyclicThrowHelper =>
       _findHelperFunction("throwCyclicInit");
 
+  @override
   FunctionEntity get defineProperty => _findHelperFunction('defineProperty');
 
+  @override
   bool isExtractTypeArguments(FunctionEntity member) {
     return member.name == 'extractTypeArguments' &&
         member.library == internalLibrary;
@@ -1578,22 +1757,27 @@
     }
   }
 
+  @override
   ClassEntity getInstantiationClass(int typeArgumentCount) {
     _checkTypeArgumentCount(typeArgumentCount);
     return _findHelperClass('Instantiation$typeArgumentCount');
   }
 
+  @override
   FunctionEntity getInstantiateFunction(int typeArgumentCount) {
     _checkTypeArgumentCount(typeArgumentCount);
     return _findHelperFunction('instantiate$typeArgumentCount');
   }
 
+  @override
   FunctionEntity get instantiatedGenericFunctionType =>
       _findHelperFunction('instantiatedGenericFunctionType');
 
+  @override
   FunctionEntity get extractFunctionTypeObjectFromInternal =>
       _findHelperFunction('extractFunctionTypeObjectFromInternal');
 
+  @override
   bool isInstantiationClass(ClassEntity cls) {
     return cls.library == _jsHelperLibrary &&
         cls.name != 'Instantiation' &&
@@ -1603,15 +1787,18 @@
   // From dart:_internal
 
   ClassEntity _symbolImplementationClass;
+  @override
   ClassEntity get symbolImplementationClass =>
       _symbolImplementationClass ??= _findClass(internalLibrary, 'Symbol');
 
-  /// Used to annotate items that have the keyword "native".
   ClassEntity _externalNameClass;
+  @override
   ClassEntity get externalNameClass =>
       _externalNameClass ??= _findClass(internalLibrary, 'ExternalName');
+  @override
   InterfaceType get externalNameType => _getRawType(externalNameClass);
 
+  @override
   ConstructorEntity get symbolValidatedConstructor =>
       _symbolValidatedConstructor ??=
           _findConstructor(symbolImplementationClass, 'validated');
@@ -1624,6 +1811,7 @@
           required: true);
 
   ConstructorEntity _symbolValidatedConstructor;
+  @override
   bool isSymbolValidatedConstructor(ConstructorEntity element) {
     if (_symbolValidatedConstructor != null) {
       return element == _symbolValidatedConstructor;
@@ -1634,11 +1822,13 @@
   // From dart:_native_typed_data
 
   ClassEntity _typedArrayOfIntClass;
+  @override
   ClassEntity get typedArrayOfIntClass => _typedArrayOfIntClass ??= _findClass(
       _env.lookupLibrary(Uris.dart__native_typed_data, required: true),
       'NativeTypedArrayOfInt');
 
   ClassEntity _typedArrayOfDoubleClass;
+  @override
   ClassEntity get typedArrayOfDoubleClass =>
       _typedArrayOfDoubleClass ??= _findClass(
           _env.lookupLibrary(Uris.dart__native_typed_data, required: true),
@@ -1646,54 +1836,18 @@
 
   // From dart:_js_embedded_names
 
-  /// Holds the class for the [JsGetName] enum.
   ClassEntity _jsGetNameEnum;
+  @override
   ClassEntity get jsGetNameEnum => _jsGetNameEnum ??= _findClass(
       _env.lookupLibrary(Uris.dart__js_embedded_names, required: true),
       'JsGetName');
 
-  /// Holds the class for the [JsBuiltins] enum.
   ClassEntity _jsBuiltinEnum;
+  @override
   ClassEntity get jsBuiltinEnum => _jsBuiltinEnum ??= _findClass(
       _env.lookupLibrary(Uris.dart__js_embedded_names, required: true),
       'JsBuiltin');
 
-  static final Uri PACKAGE_EXPECT =
-      new Uri(scheme: 'package', path: 'expect/expect.dart');
-
-  bool _expectAnnotationChecked = false;
-  ClassEntity _expectNoInlineClass;
-  ClassEntity _expectAssumeDynamicClass;
-
-  void _ensureExpectAnnotations() {
-    if (!_expectAnnotationChecked) {
-      _expectAnnotationChecked = true;
-      LibraryEntity library = _env.lookupLibrary(PACKAGE_EXPECT);
-      if (library != null) {
-        _expectNoInlineClass = _env.lookupClass(library, 'NoInline');
-        _expectAssumeDynamicClass = _env.lookupClass(library, 'AssumeDynamic');
-        if (_expectNoInlineClass == null || _expectAssumeDynamicClass == null) {
-          // This is not the package you're looking for.
-          _expectNoInlineClass = null;
-          _expectAssumeDynamicClass = null;
-        }
-      }
-    }
-  }
-
-  ClassEntity get expectNoInlineClass {
-    _ensureExpectAnnotations();
-    return _expectNoInlineClass;
-  }
-
-  ClassEntity get expectAssumeDynamicClass {
-    _ensureExpectAnnotations();
-    return _expectAssumeDynamicClass;
-  }
-
-  static final Uri PACKAGE_META_DART2JS =
-      new Uri(scheme: 'package', path: 'meta/dart2js.dart');
-
   bool _metaAnnotationChecked = false;
   ClassEntity _metaNoInlineClass;
   ClassEntity _metaTryInlineClass;
@@ -1701,7 +1855,7 @@
   void _ensureMetaAnnotations() {
     if (!_metaAnnotationChecked) {
       _metaAnnotationChecked = true;
-      LibraryEntity library = _env.lookupLibrary(PACKAGE_META_DART2JS);
+      LibraryEntity library = _env.lookupLibrary(Uris.package_meta_dart2js);
       if (library != null) {
         _metaNoInlineClass = _env.lookupClass(library, '_NoInline');
         _metaTryInlineClass = _env.lookupClass(library, '_TryInline');
@@ -1714,34 +1868,28 @@
     }
   }
 
+  @override
   ClassEntity get metaNoInlineClass {
     _ensureMetaAnnotations();
     return _metaNoInlineClass;
   }
 
+  @override
   ClassEntity get metaTryInlineClass {
     _ensureMetaAnnotations();
     return _metaTryInlineClass;
   }
 
+  @override
   bool isForeign(MemberEntity element) => element.library == foreignLibrary;
 
-  /// Returns `true` if [member] is a "foreign helper", that is, a member whose
-  /// semantics is defined synthetically and not through Dart code.
-  ///
-  /// Most foreign helpers are located in the `dart:_foreign_helper` library.
+  @override
   bool isForeignHelper(MemberEntity member) {
     return member.library == foreignLibrary ||
         isCreateInvocationMirrorHelper(member);
   }
 
-  /// Returns `true` if [function] is allowed to be external.
-  ///
-  /// This returns `true` for foreign helpers, from environment constructors and
-  /// members of libraries that support native.
-  ///
-  /// This returns `false` for JS interop members which therefore must be
-  /// allowed to be external through the JS interop annotation handling.
+  @override
   bool isExternalAllowed(FunctionEntity function) {
     return isForeignHelper(function) ||
         (function is ConstructorEntity &&
@@ -1752,8 +1900,7 @@
         function.library.canonicalUri == Uris.dart_mirrors;
   }
 
-  /// Returns `true` if the implementation of the 'operator ==' [function] is
-  /// known to handle `null` as argument.
+  @override
   bool operatorEqHandlesNullArgument(FunctionEntity function) {
     assert(function.name == '==',
         failedAt(function, "Unexpected function $function."));
@@ -1763,6 +1910,7 @@
         cls == jsNullClass;
   }
 
+  @override
   ClassEntity getDefaultSuperclass(
       ClassEntity cls, NativeBasicData nativeBasicData) {
     if (nativeBasicData.isJsInteropClass(cls)) {
diff --git a/pkg/compiler/lib/src/compile_time_constants.dart b/pkg/compiler/lib/src/compile_time_constants.dart
index 9055af7..20e7219 100644
--- a/pkg/compiler/lib/src/compile_time_constants.dart
+++ b/pkg/compiler/lib/src/compile_time_constants.dart
@@ -5,15 +5,11 @@
 library dart2js.compile_time_constant_evaluator;
 
 import 'common/tasks.dart' show CompilerTask, Measurer;
-import 'constants/constant_system.dart';
 import 'elements/entities.dart';
 
 /// A [ConstantEnvironment] provides access for constants compiled for variable
 /// initializers.
-abstract class ConstantEnvironment {
-  /// The [ConstantSystem] used by this environment.
-  ConstantSystem get constantSystem;
-}
+abstract class ConstantEnvironment {}
 
 /// A [BackendConstantEnvironment] provides access to constants needed for
 /// backend implementation.
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index b35401a..03f5b05 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -78,7 +78,7 @@
 
   api.CompilerOutput get outputProvider => _outputProvider;
 
-  Uri _mainLibraryUri;
+  List<CodeLocation> _userCodeLocations = <CodeLocation>[];
 
   JClosedWorld backendClosedWorldForTesting;
 
@@ -221,7 +221,8 @@
         measurer.startWallClock();
 
         return new Future.sync(() => runInternal(uri))
-            .catchError((error) => _reporter.onError(uri, error))
+            .catchError((error, StackTrace stackTrace) =>
+                _reporter.onError(uri, error, stackTrace))
             .whenComplete(() {
           measurer.stopWallClock();
         }).then((_) {
@@ -230,20 +231,7 @@
       });
 
   Future runInternal(Uri uri) async {
-    // TODO(ahe): This prevents memory leaks when invoking the compiler
-    // multiple times. Implement a better mechanism where we can store
-    // such caches in the compiler and get access to them through a
-    // suitably maintained static reference to the current compiler.
-    clearStringTokenCanonicalizer();
-    Selector.canonicalizedValues.clear();
-
-    // The selector objects held in static fields must remain canonical.
-    for (Selector selector in Selectors.ALL) {
-      Selector.canonicalizedValues
-          .putIfAbsent(selector.hashCode, () => <Selector>[])
-          .add(selector);
-    }
-
+    clearState();
     assert(uri != null);
     // As far as I can tell, this branch is only used by test code.
     reporter.log('Compiling $uri (${options.buildId})');
@@ -251,6 +239,10 @@
     if (options.readDataUri != null) {
       GlobalTypeInferenceResults results =
           await serializationTask.deserialize();
+      if (options.debugGlobalInference) {
+        performGlobalTypeInference(results.closedWorld);
+        return;
+      }
       generateJavaScriptCode(results);
     } else {
       KernelResult result = await kernelLoader.load(uri);
@@ -260,7 +252,6 @@
         return;
       }
       if (options.cfeOnly) return;
-      _mainLibraryUri = result.rootLibraryUri;
 
       frontendStrategy.registerLoadedLibraries(result);
       for (Uri uri in result.libraries) {
@@ -282,6 +273,23 @@
     }
   }
 
+  /// Clear the internal compiler state to prevent memory leaks when invoking
+  /// the compiler multiple times (e.g. in batch mode).
+  // TODO(ahe): implement a better mechanism where we can store
+  // such caches in the compiler and get access to them through a
+  // suitably maintained static reference to the current compiler.
+  void clearState() {
+    clearStringTokenCanonicalizer();
+    Selector.canonicalizedValues.clear();
+
+    // The selector objects held in static fields must remain canonical.
+    for (Selector selector in Selectors.ALL) {
+      Selector.canonicalizedValues
+          .putIfAbsent(selector.hashCode, () => <Selector>[])
+          .add(selector);
+    }
+  }
+
   /// Starts the resolution phase, creating the [ResolutionEnqueuer] if not
   /// already created.
   ///
@@ -391,6 +399,7 @@
   }
 
   void compileFromKernel(Uri rootLibraryUri, Iterable<Uri> libraries) {
+    _userCodeLocations.add(new CodeLocation(rootLibraryUri));
     selfTask.measureSubtask("compileFromKernel", () {
       JClosedWorld closedWorld = selfTask.measureSubtask("computeClosedWorld",
           () => computeClosedWorld(rootLibraryUri, libraries));
@@ -562,25 +571,11 @@
     if (element == null) return assumeInUserCode;
     Uri libraryUri = _uriFromElement(element);
     if (libraryUri == null) return false;
-    Iterable<CodeLocation> userCodeLocations =
-        computeUserCodeLocations(assumeInUserCode: assumeInUserCode);
-    return userCodeLocations.any(
+    if (_userCodeLocations.isEmpty && assumeInUserCode) return true;
+    return _userCodeLocations.any(
         (CodeLocation codeLocation) => codeLocation.inSameLocation(libraryUri));
   }
 
-  Iterable<CodeLocation> computeUserCodeLocations(
-      {bool assumeInUserCode: false}) {
-    List<CodeLocation> userCodeLocations = <CodeLocation>[];
-    if (_mainLibraryUri != null) {
-      userCodeLocations.add(new CodeLocation(_mainLibraryUri));
-    }
-    if (userCodeLocations.isEmpty && assumeInUserCode) {
-      // Assume in user code since [mainApp] has not been set yet.
-      userCodeLocations.add(const AnyLocation());
-    }
-    return userCodeLocations;
-  }
-
   /// Return a canonical URI for the source of [element].
   ///
   /// For a package library with canonical URI 'package:foo/bar/baz.dart' the
@@ -669,6 +664,7 @@
 
 class CompilerDiagnosticReporter extends DiagnosticReporter {
   final Compiler compiler;
+  @override
   final DiagnosticOptions options;
 
   Entity _currentElement;
@@ -686,6 +682,7 @@
 
   Entity get currentElement => _currentElement;
 
+  @override
   DiagnosticMessage createMessage(Spannable spannable, MessageKind messageKind,
       [Map arguments = const {}]) {
     SourceSpan span = spanFromSpannable(spannable);
@@ -694,22 +691,26 @@
     return new DiagnosticMessage(span, spannable, message);
   }
 
+  @override
   void reportError(DiagnosticMessage message,
       [List<DiagnosticMessage> infos = const <DiagnosticMessage>[]]) {
     reportDiagnosticInternal(message, infos, api.Diagnostic.ERROR);
   }
 
+  @override
   void reportWarning(DiagnosticMessage message,
       [List<DiagnosticMessage> infos = const <DiagnosticMessage>[]]) {
     reportDiagnosticInternal(message, infos, api.Diagnostic.WARNING);
   }
 
+  @override
   void reportHint(DiagnosticMessage message,
       [List<DiagnosticMessage> infos = const <DiagnosticMessage>[]]) {
     reportDiagnosticInternal(message, infos, api.Diagnostic.HINT);
   }
 
   @deprecated
+  @override
   void reportInfo(Spannable node, MessageKind messageKind,
       [Map arguments = const {}]) {
     reportDiagnosticInternal(createMessage(node, messageKind, arguments),
@@ -775,6 +776,7 @@
   /// Perform an operation, [f], returning the return value from [f].  If an
   /// error occurs then report it as having occurred during compilation of
   /// [element].  Can be nested.
+  @override
   withCurrentElement(Entity element, f()) {
     Entity old = currentElement;
     _currentElement = element;
@@ -828,6 +830,7 @@
     throw 'No error location.';
   }
 
+  @override
   SourceSpan spanFromSpannable(Spannable spannable) {
     if (spannable == CURRENT_ELEMENT_SPANNABLE) {
       spannable = currentElement;
@@ -848,6 +851,7 @@
     }
   }
 
+  @override
   internalError(Spannable spannable, reason) {
     String message = tryToString(reason);
     reportDiagnosticInternal(
@@ -882,6 +886,7 @@
     return element != null ? element : currentElement;
   }
 
+  @override
   void log(message) {
     Message msg = MessageTemplate.TEMPLATES[MessageKind.GENERIC]
         .message({'text': '$message'});
@@ -897,7 +902,7 @@
     }
   }
 
-  onError(Uri uri, error) {
+  onError(Uri uri, error, StackTrace stackTrace) {
     try {
       if (!hasCrashed) {
         hasCrashed = true;
@@ -915,7 +920,7 @@
     } catch (doubleFault) {
       // Ignoring exceptions in exception handling.
     }
-    throw error;
+    return new Future.error(error, stackTrace);
   }
 
   @override
@@ -949,11 +954,13 @@
   final Map<Entity, WorldImpact> _impactCache;
   _MapImpactCacheDeleter(this._impactCache);
 
+  @override
   void uncacheWorldImpact(Entity element) {
     if (retainDataForTesting) return;
     _impactCache.remove(element);
   }
 
+  @override
   void emptyCache() {
     if (retainDataForTesting) return;
     _impactCache.clear();
@@ -963,7 +970,11 @@
 class _EmptyEnvironment implements Environment {
   const _EmptyEnvironment();
 
+  @override
   String valueOf(String key) => null;
+
+  @override
+  Map<String, String> toMap() => const {};
 }
 
 /// Interface for showing progress during compilation.
@@ -986,6 +997,7 @@
 
   ProgressImpl(this._reporter);
 
+  @override
   void showProgress(String prefix, int count, String suffix) {
     if (_stopwatch.elapsedMilliseconds > 500) {
       _reporter.log('$prefix$count$suffix');
@@ -993,6 +1005,7 @@
     }
   }
 
+  @override
   void startPhase() {
     _stopwatch.reset();
   }
@@ -1004,12 +1017,14 @@
 class InteractiveProgress implements Progress {
   final Stopwatch _stopwatchPhase = new Stopwatch()..start();
   final Stopwatch _stopwatchInterval = new Stopwatch()..start();
+  @override
   void startPhase() {
     print('');
     _stopwatchPhase.reset();
     _stopwatchInterval.reset();
   }
 
+  @override
   void showProgress(String prefix, int count, String suffix) {
     if (_stopwatchInterval.elapsedMilliseconds > 500) {
       var time = _stopwatchPhase.elapsedMilliseconds / 1000;
diff --git a/pkg/compiler/lib/src/constant_system_dart.dart b/pkg/compiler/lib/src/constant_system_dart.dart
deleted file mode 100644
index 1fc88a5..0000000
--- a/pkg/compiler/lib/src/constant_system_dart.dart
+++ /dev/null
@@ -1,496 +0,0 @@
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library dart2js.constant_system.dart;
-
-import 'constants/constant_system.dart';
-import 'constants/values.dart';
-import 'common_elements.dart' show CommonElements;
-import 'elements/types.dart';
-
-const DART_CONSTANT_SYSTEM = const DartConstantSystem();
-
-class BitNotOperation implements UnaryOperation {
-  final String name = '~';
-  const BitNotOperation();
-  ConstantValue fold(ConstantValue constant) {
-    if (constant.isInt) {
-      IntConstantValue intConstant = constant;
-      return DART_CONSTANT_SYSTEM.createInt(~intConstant.intValue);
-    }
-    return null;
-  }
-}
-
-class NegateOperation implements UnaryOperation {
-  final String name = 'negate';
-  const NegateOperation();
-  ConstantValue fold(ConstantValue constant) {
-    if (constant.isInt) {
-      IntConstantValue intConstant = constant;
-      return DART_CONSTANT_SYSTEM.createInt(-intConstant.intValue);
-    }
-    if (constant.isDouble) {
-      DoubleConstantValue doubleConstant = constant;
-      return DART_CONSTANT_SYSTEM.createDouble(-doubleConstant.doubleValue);
-    }
-    return null;
-  }
-}
-
-class NotOperation implements UnaryOperation {
-  final String name = '!';
-  const NotOperation();
-  ConstantValue fold(ConstantValue constant) {
-    if (constant.isBool) {
-      BoolConstantValue boolConstant = constant;
-      return DART_CONSTANT_SYSTEM.createBool(!boolConstant.boolValue);
-    }
-    return null;
-  }
-}
-
-/// Operations that only work if both arguments are integers.
-abstract class BinaryBitOperation implements BinaryOperation {
-  const BinaryBitOperation();
-  ConstantValue fold(ConstantValue left, ConstantValue right) {
-    if (left.isInt && right.isInt) {
-      IntConstantValue leftInt = left;
-      IntConstantValue rightInt = right;
-      BigInt resultValue = foldInts(leftInt.intValue, rightInt.intValue);
-      if (resultValue == null) return null;
-      return DART_CONSTANT_SYSTEM.createInt(resultValue);
-    }
-    return null;
-  }
-
-  BigInt foldInts(BigInt left, BigInt right);
-}
-
-class BitOrOperation extends BinaryBitOperation {
-  final String name = '|';
-  const BitOrOperation();
-  BigInt foldInts(BigInt left, BigInt right) => left | right;
-  apply(left, right) => left | right;
-}
-
-class BitAndOperation extends BinaryBitOperation {
-  final String name = '&';
-  const BitAndOperation();
-  BigInt foldInts(BigInt left, BigInt right) => left & right;
-  apply(left, right) => left & right;
-}
-
-class BitXorOperation extends BinaryBitOperation {
-  final String name = '^';
-  const BitXorOperation();
-  BigInt foldInts(BigInt left, BigInt right) => left ^ right;
-  apply(left, right) => left ^ right;
-}
-
-class ShiftLeftOperation extends BinaryBitOperation {
-  final String name = '<<';
-  const ShiftLeftOperation();
-  BigInt foldInts(BigInt left, BigInt right) {
-    // TODO(floitsch): find a better way to guard against excessive shifts to
-    // the left.
-    if (right > new BigInt.from(100) || right < BigInt.zero) return null;
-    return left << right.toInt();
-  }
-
-  apply(left, right) => left << right;
-}
-
-class ShiftRightOperation extends BinaryBitOperation {
-  final String name = '>>';
-  const ShiftRightOperation();
-  BigInt foldInts(BigInt left, BigInt right) {
-    if (right < BigInt.zero) return null;
-    return left >> right.toInt();
-  }
-
-  apply(left, right) => left >> right;
-}
-
-abstract class BinaryBoolOperation implements BinaryOperation {
-  const BinaryBoolOperation();
-  ConstantValue fold(ConstantValue left, ConstantValue right) {
-    if (left.isBool && right.isBool) {
-      BoolConstantValue leftBool = left;
-      BoolConstantValue rightBool = right;
-      bool resultValue = foldBools(leftBool.boolValue, rightBool.boolValue);
-      return DART_CONSTANT_SYSTEM.createBool(resultValue);
-    }
-    return null;
-  }
-
-  bool foldBools(bool left, bool right);
-}
-
-class BooleanAndOperation extends BinaryBoolOperation {
-  final String name = '&&';
-  const BooleanAndOperation();
-  bool foldBools(bool left, bool right) => left && right;
-  apply(left, right) => left && right;
-}
-
-class BooleanOrOperation extends BinaryBoolOperation {
-  final String name = '||';
-  const BooleanOrOperation();
-  bool foldBools(bool left, bool right) => left || right;
-  apply(left, right) => left || right;
-}
-
-abstract class ArithmeticNumOperation implements BinaryOperation {
-  const ArithmeticNumOperation();
-  ConstantValue fold(ConstantValue left, ConstantValue right) {
-    if (left.isNum && right.isNum) {
-      NumConstantValue leftNum = left;
-      NumConstantValue rightNum = right;
-      var foldedValue;
-      if (left.isInt && right.isInt) {
-        IntConstantValue leftInt = leftNum;
-        IntConstantValue rightInt = rightNum;
-        foldedValue = foldInts(leftInt.intValue, rightInt.intValue);
-      } else {
-        foldedValue = foldNums(leftNum.doubleValue, rightNum.doubleValue);
-      }
-      // A division by 0 means that we might not have a folded value.
-      if (foldedValue == null) return null;
-      if (left.isInt && right.isInt && !isDivide() || isTruncatingDivide()) {
-        assert(foldedValue is BigInt);
-        return DART_CONSTANT_SYSTEM.createInt(foldedValue);
-      } else {
-        return DART_CONSTANT_SYSTEM.createDouble(foldedValue);
-      }
-    }
-    return null;
-  }
-
-  bool isDivide() => false;
-  bool isTruncatingDivide() => false;
-  foldInts(BigInt left, BigInt right);
-  foldNums(num left, num right);
-}
-
-class SubtractOperation extends ArithmeticNumOperation {
-  final String name = '-';
-  const SubtractOperation();
-  BigInt foldInts(BigInt left, BigInt right) => left - right;
-  num foldNums(num left, num right) => left - right;
-  apply(left, right) => left - right;
-}
-
-class MultiplyOperation extends ArithmeticNumOperation {
-  final String name = '*';
-  const MultiplyOperation();
-  BigInt foldInts(BigInt left, BigInt right) => left * right;
-  num foldNums(num left, num right) => left * right;
-  apply(left, right) => left * right;
-}
-
-class ModuloOperation extends ArithmeticNumOperation {
-  final String name = '%';
-  const ModuloOperation();
-  BigInt foldInts(BigInt left, BigInt right) {
-    if (right == BigInt.zero) return null;
-    return left % right;
-  }
-
-  num foldNums(num left, num right) => left % right;
-  apply(left, right) => left % right;
-}
-
-class RemainderOperation extends ArithmeticNumOperation {
-  final String name = 'remainder';
-  const RemainderOperation();
-  BigInt foldInts(BigInt left, BigInt right) => null;
-  // Not a defined constant operation.
-  num foldNums(num left, num right) => null;
-  apply(left, right) => left.remainder(right);
-}
-
-class TruncatingDivideOperation extends ArithmeticNumOperation {
-  final String name = '~/';
-  const TruncatingDivideOperation();
-  BigInt foldInts(BigInt left, BigInt right) {
-    if (right == BigInt.zero) return null;
-    return left ~/ right;
-  }
-
-  BigInt foldNums(num left, num right) {
-    num ratio = left / right;
-    if (ratio.isNaN || ratio.isInfinite) return null;
-    return new BigInt.from(ratio.truncate().toInt());
-  }
-
-  apply(left, right) => left ~/ right;
-  bool isTruncatingDivide() => true;
-}
-
-class DivideOperation extends ArithmeticNumOperation {
-  final String name = '/';
-  const DivideOperation();
-  double foldInts(BigInt left, BigInt right) => left / right;
-  num foldNums(num left, num right) => left / right;
-  bool isDivide() => true;
-  apply(left, right) => left / right;
-}
-
-class AddOperation implements BinaryOperation {
-  final String name = '+';
-  const AddOperation();
-  ConstantValue fold(ConstantValue left, ConstantValue right) {
-    if (left.isInt && right.isInt) {
-      IntConstantValue leftInt = left;
-      IntConstantValue rightInt = right;
-      BigInt result = leftInt.intValue + rightInt.intValue;
-      return DART_CONSTANT_SYSTEM.createInt(result);
-    } else if (left.isNum && right.isNum) {
-      NumConstantValue leftNum = left;
-      NumConstantValue rightNum = right;
-      double result = leftNum.doubleValue + rightNum.doubleValue;
-      return DART_CONSTANT_SYSTEM.createDouble(result);
-    } else if (left.isString && right.isString) {
-      StringConstantValue leftString = left;
-      StringConstantValue rightString = right;
-      String result = leftString.stringValue + rightString.stringValue;
-      return DART_CONSTANT_SYSTEM.createString(result);
-    } else {
-      return null;
-    }
-  }
-
-  apply(left, right) => left + right;
-}
-
-abstract class RelationalNumOperation implements BinaryOperation {
-  const RelationalNumOperation();
-  ConstantValue fold(ConstantValue left, ConstantValue right) {
-    if (!left.isNum || !right.isNum) return null;
-    bool foldedValue;
-    if (left.isInt && right.isInt) {
-      IntConstantValue leftInt = left;
-      IntConstantValue rightInt = right;
-      foldedValue = foldInts(leftInt.intValue, rightInt.intValue);
-    } else {
-      NumConstantValue leftNum = left;
-      NumConstantValue rightNum = right;
-      foldedValue = foldNums(leftNum.doubleValue, rightNum.doubleValue);
-    }
-    assert(foldedValue != null);
-    return DART_CONSTANT_SYSTEM.createBool(foldedValue);
-  }
-
-  bool foldInts(BigInt left, BigInt right);
-  bool foldNums(num left, num right);
-}
-
-class LessOperation extends RelationalNumOperation {
-  final String name = '<';
-  const LessOperation();
-  bool foldInts(BigInt left, BigInt right) => left < right;
-  bool foldNums(num left, num right) => left < right;
-  apply(left, right) => left < right;
-}
-
-class LessEqualOperation extends RelationalNumOperation {
-  final String name = '<=';
-  const LessEqualOperation();
-  bool foldInts(BigInt left, BigInt right) => left <= right;
-  bool foldNums(num left, num right) => left <= right;
-  apply(left, right) => left <= right;
-}
-
-class GreaterOperation extends RelationalNumOperation {
-  final String name = '>';
-  const GreaterOperation();
-  bool foldInts(BigInt left, BigInt right) => left > right;
-  bool foldNums(num left, num right) => left > right;
-  apply(left, right) => left > right;
-}
-
-class GreaterEqualOperation extends RelationalNumOperation {
-  final String name = '>=';
-  const GreaterEqualOperation();
-  bool foldInts(BigInt left, BigInt right) => left >= right;
-  bool foldNums(num left, num right) => left >= right;
-  apply(left, right) => left >= right;
-}
-
-class EqualsOperation implements BinaryOperation {
-  final String name = '==';
-  const EqualsOperation();
-  ConstantValue fold(ConstantValue left, ConstantValue right) {
-    // Numbers need to be treated specially because: NaN != NaN, -0.0 == 0.0,
-    // and 1 == 1.0.
-    if (left.isInt && right.isInt) {
-      IntConstantValue leftInt = left;
-      IntConstantValue rightInt = right;
-      bool result = leftInt.intValue == rightInt.intValue;
-      return DART_CONSTANT_SYSTEM.createBool(result);
-    }
-
-    if (left.isNum && right.isNum) {
-      NumConstantValue leftNum = left;
-      NumConstantValue rightNum = right;
-      bool result = leftNum.doubleValue == rightNum.doubleValue;
-      return DART_CONSTANT_SYSTEM.createBool(result);
-    }
-
-    if (left.isConstructedObject) {
-      if (right.isNull) {
-        return DART_CONSTANT_SYSTEM.createBool(false);
-      }
-      // Unless we know that the user-defined object does not implement the
-      // equality operator we cannot fold here.
-      return null;
-    }
-
-    return DART_CONSTANT_SYSTEM.createBool(left == right);
-  }
-
-  apply(left, right) => left == right;
-}
-
-class IdentityOperation implements BinaryOperation {
-  final String name = '===';
-  const IdentityOperation();
-  BoolConstantValue fold(ConstantValue left, ConstantValue right) {
-    // In order to preserve runtime semantics which says that NaN !== NaN don't
-    // constant fold NaN === NaN. Otherwise the output depends on inlined
-    // variables and other optimizations.
-    if (left.isNaN && right.isNaN) return null;
-    return DART_CONSTANT_SYSTEM.createBool(left == right);
-  }
-
-  apply(left, right) => identical(left, right);
-}
-
-class IfNullOperation implements BinaryOperation {
-  final String name = '??';
-  const IfNullOperation();
-  ConstantValue fold(ConstantValue left, ConstantValue right) {
-    if (left.isNull) return right;
-    return left;
-  }
-
-  apply(left, right) => left ?? right;
-}
-
-class CodeUnitAtOperation implements BinaryOperation {
-  String get name => 'charCodeAt';
-  const CodeUnitAtOperation();
-  ConstantValue fold(ConstantValue left, ConstantValue right) => null;
-  apply(left, right) => left.codeUnitAt(right);
-}
-
-class CodeUnitAtRuntimeOperation extends CodeUnitAtOperation {
-  const CodeUnitAtRuntimeOperation();
-  IntConstantValue fold(ConstantValue left, ConstantValue right) {
-    if (left.isString && right.isInt) {
-      StringConstantValue stringConstant = left;
-      IntConstantValue indexConstant = right;
-      String string = stringConstant.stringValue;
-      int index = indexConstant.intValue.toInt();
-      if (index < 0 || index >= string.length) return null;
-      int value = string.codeUnitAt(index);
-      return DART_CONSTANT_SYSTEM.createIntFromInt(value);
-    }
-    return null;
-  }
-}
-
-class UnfoldedUnaryOperation implements UnaryOperation {
-  final String name;
-  const UnfoldedUnaryOperation(this.name);
-  ConstantValue fold(ConstantValue constant) {
-    return null;
-  }
-}
-
-/// A constant system implementing the Dart semantics. This system relies on
-/// the underlying runtime-system. That is, if dart2js is run in an environment
-/// that doesn't correctly implement Dart's semantics this constant system will
-/// not return the correct values.
-class DartConstantSystem extends ConstantSystem {
-  final add = const AddOperation();
-  final bitAnd = const BitAndOperation();
-  final bitNot = const BitNotOperation();
-  final bitOr = const BitOrOperation();
-  final bitXor = const BitXorOperation();
-  final booleanAnd = const BooleanAndOperation();
-  final booleanOr = const BooleanOrOperation();
-  final divide = const DivideOperation();
-  final equal = const EqualsOperation();
-  final greaterEqual = const GreaterEqualOperation();
-  final greater = const GreaterOperation();
-  final identity = const IdentityOperation();
-  final ifNull = const IfNullOperation();
-  final lessEqual = const LessEqualOperation();
-  final less = const LessOperation();
-  final modulo = const ModuloOperation();
-  final multiply = const MultiplyOperation();
-  final negate = const NegateOperation();
-  final not = const NotOperation();
-  final remainder = const RemainderOperation();
-  final shiftLeft = const ShiftLeftOperation();
-  final shiftRight = const ShiftRightOperation();
-  final subtract = const SubtractOperation();
-  final truncatingDivide = const TruncatingDivideOperation();
-  final codeUnitAt = const CodeUnitAtOperation();
-  final round = const UnfoldedUnaryOperation('round');
-  final abs = const UnfoldedUnaryOperation('abs');
-
-  const DartConstantSystem();
-
-  @override
-  IntConstantValue createInt(BigInt i) => new IntConstantValue(i);
-
-  @override
-  DoubleConstantValue createDouble(double d) => new DoubleConstantValue(d);
-
-  @override
-  StringConstantValue createString(String string) {
-    return new StringConstantValue(string);
-  }
-
-  @override
-  BoolConstantValue createBool(bool value) => new BoolConstantValue(value);
-
-  @override
-  NullConstantValue createNull() => new NullConstantValue();
-
-  @override
-  ListConstantValue createList(InterfaceType type, List<ConstantValue> values) {
-    return new ListConstantValue(type, values);
-  }
-
-  @override
-  MapConstantValue createMap(CommonElements commonElements, InterfaceType type,
-      List<ConstantValue> keys, List<ConstantValue> values) {
-    return new MapConstantValue(type, keys, values);
-  }
-
-  @override
-  ConstantValue createType(CommonElements commonElements, DartType type) {
-    InterfaceType implementationType = commonElements.typeLiteralType;
-    return new TypeConstantValue(type, implementationType);
-  }
-
-  @override
-  ConstantValue createSymbol(CommonElements commonElements, String text) {
-    throw new UnsupportedError('DartConstantSystem.createSymbol');
-  }
-
-  bool isInt(ConstantValue constant) => constant.isInt;
-  bool isDouble(ConstantValue constant) => constant.isDouble;
-  bool isString(ConstantValue constant) => constant.isString;
-  bool isBool(ConstantValue constant) => constant.isBool;
-  bool isNull(ConstantValue constant) => constant.isNull;
-
-  bool isSubtype(DartTypes types, DartType s, DartType t) {
-    return types.isSubtype(s, t);
-  }
-}
diff --git a/pkg/compiler/lib/src/constants/constant_system.dart b/pkg/compiler/lib/src/constants/constant_system.dart
index 91d89f2..2d154b7 100644
--- a/pkg/compiler/lib/src/constants/constant_system.dart
+++ b/pkg/compiler/lib/src/constants/constant_system.dart
@@ -2,13 +2,253 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+/// Constant system following the semantics for Dart code that has been
+/// compiled to JavaScript.
 library dart2js.constant_system;
 
 import '../common_elements.dart' show CommonElements;
+import '../elements/entities.dart';
 import '../elements/operators.dart';
 import '../elements/types.dart';
 import 'values.dart';
 
+final _BITS32 = new BigInt.from(0xFFFFFFFF);
+
+const add = const AddOperation();
+const bitAnd = const BitAndOperation();
+const bitNot = const BitNotOperation();
+const bitOr = const BitOrOperation();
+const bitXor = const BitXorOperation();
+const booleanAnd = const BooleanAndOperation();
+const booleanOr = const BooleanOrOperation();
+const divide = const DivideOperation();
+const equal = const EqualsOperation();
+const greaterEqual = const GreaterEqualOperation();
+const greater = const GreaterOperation();
+const identity = const IdentityOperation();
+const ifNull = const IfNullOperation();
+const lessEqual = const LessEqualOperation();
+const less = const LessOperation();
+const modulo = const ModuloOperation();
+const multiply = const MultiplyOperation();
+const negate = const NegateOperation();
+const not = const NotOperation();
+const remainder = const RemainderOperation();
+const shiftLeft = const ShiftLeftOperation();
+const shiftRight = const ShiftRightOperation();
+const subtract = const SubtractOperation();
+const truncatingDivide = const TruncatingDivideOperation();
+const codeUnitAt = const CodeUnitAtOperation();
+const round = const RoundOperation();
+const abs = const UnfoldedUnaryOperation('abs');
+
+/// Returns true if [value] will turn into NaN or infinity
+/// at runtime.
+bool _integerBecomesNanOrInfinity(BigInt value) {
+  double doubleValue = value.toDouble();
+  return doubleValue.isNaN || doubleValue.isInfinite;
+}
+
+NumConstantValue _convertToJavaScriptConstant(NumConstantValue constant) {
+  if (constant.isInt) {
+    IntConstantValue intConstant = constant;
+    BigInt intValue = intConstant.intValue;
+    if (_integerBecomesNanOrInfinity(intValue)) {
+      return new DoubleConstantValue(intValue.toDouble());
+    }
+    // If the integer loses precision with JavaScript numbers, use
+    // the floored version JavaScript will use.
+    BigInt floorValue = new BigInt.from(intValue.toDouble());
+    if (floorValue != intValue) {
+      return new IntConstantValue(floorValue);
+    }
+  } else if (constant.isDouble) {
+    DoubleConstantValue doubleResult = constant;
+    double doubleValue = doubleResult.doubleValue;
+    if (!doubleValue.isInfinite &&
+        !doubleValue.isNaN &&
+        !constant.isMinusZero) {
+      double truncated = doubleValue.truncateToDouble();
+      if (truncated == doubleValue) {
+        return new IntConstantValue(new BigInt.from(truncated));
+      }
+    }
+  }
+  return constant;
+}
+
+NumConstantValue createInt(BigInt i) =>
+    _convertToJavaScriptConstant(new IntConstantValue(i));
+NumConstantValue createIntFromInt(int i) => createInt(new BigInt.from(i));
+NumConstantValue _createInt32(BigInt i) => new IntConstantValue(i & _BITS32);
+NumConstantValue createDouble(double d) =>
+    _convertToJavaScriptConstant(new DoubleConstantValue(d));
+StringConstantValue createString(String string) =>
+    new StringConstantValue(string);
+BoolConstantValue createBool(bool value) => new BoolConstantValue(value);
+NullConstantValue createNull() => new NullConstantValue();
+ListConstantValue createList(InterfaceType type, List<ConstantValue> values) =>
+    new ListConstantValue(type, values);
+
+ConstantValue createType(CommonElements commonElements, DartType type) {
+  InterfaceType instanceType = commonElements.typeLiteralType;
+  return new TypeConstantValue(type, instanceType);
+}
+
+/// Returns true if the [constant] is an integer at runtime.
+///
+/// Integer checks report true for -0.0, INFINITY, and -INFINITY.  At
+/// runtime an 'X is int' check is implemented as:
+///
+/// typeof(X) === "number" && Math.floor(X) === X
+///
+/// We consistently match that runtime semantics at compile time as well.
+bool isInt(ConstantValue constant) =>
+    constant.isInt ||
+    constant.isMinusZero ||
+    constant.isPositiveInfinity ||
+    constant.isNegativeInfinity;
+
+/// Returns true if the [constant] is a double at runtime.
+bool isDouble(ConstantValue constant) =>
+    constant.isDouble && !constant.isMinusZero;
+
+/// Returns true if the [constant] is a string at runtime.
+bool isString(ConstantValue constant) => constant.isString;
+
+/// Returns true if the [constant] is a boolean at runtime.
+bool isBool(ConstantValue constant) => constant.isBool;
+
+/// Returns true if the [constant] is null at runtime.
+bool isNull(ConstantValue constant) => constant.isNull;
+
+bool isSubtype(DartTypes types, DartType s, DartType t) {
+  // At runtime, an integer is both an integer and a double: the
+  // integer type check is Math.floor, which will return true only
+  // for real integers, and our double type check is 'typeof number'
+  // which will return true for both integers and doubles.
+  if (s == types.commonElements.intType &&
+      t == types.commonElements.doubleType) {
+    return true;
+  }
+  return types.isSubtype(s, t);
+}
+
+SetConstantValue createSet(CommonElements commonElements,
+    InterfaceType sourceType, List<ConstantValue> values) {
+  InterfaceType type = commonElements.getConstantSetTypeFor(sourceType);
+  DartType elementType = type.typeArguments.first;
+  InterfaceType mapType =
+      commonElements.mapType(elementType, commonElements.nullType);
+  List<NullConstantValue> nulls = new List<NullConstantValue>.filled(
+      values.length, const NullConstantValue());
+  MapConstantValue entries = createMap(commonElements, mapType, values, nulls);
+  return new JavaScriptSetConstant(type, entries);
+}
+
+MapConstantValue createMap(
+    CommonElements commonElements,
+    InterfaceType sourceType,
+    List<ConstantValue> keys,
+    List<ConstantValue> values) {
+  bool onlyStringKeys = true;
+  ConstantValue protoValue = null;
+  for (int i = 0; i < keys.length; i++) {
+    dynamic key = keys[i];
+    if (key.isString) {
+      if (key.stringValue == JavaScriptMapConstant.PROTO_PROPERTY) {
+        protoValue = values[i];
+      }
+    } else {
+      onlyStringKeys = false;
+      // Don't handle __proto__ values specially in the general map case.
+      protoValue = null;
+      break;
+    }
+  }
+
+  bool hasProtoKey = (protoValue != null);
+  InterfaceType keysType;
+  if (sourceType.treatAsRaw) {
+    keysType = commonElements.listType();
+  } else {
+    keysType = commonElements.listType(sourceType.typeArguments.first);
+  }
+  ListConstantValue keysList = new ListConstantValue(keysType, keys);
+  InterfaceType type = commonElements.getConstantMapTypeFor(sourceType,
+      hasProtoKey: hasProtoKey, onlyStringKeys: onlyStringKeys);
+  return new JavaScriptMapConstant(
+      type, keysList, values, protoValue, onlyStringKeys);
+}
+
+ConstantValue createSymbol(CommonElements commonElements, String text) {
+  InterfaceType type = commonElements.symbolImplementationType;
+  FieldEntity field = commonElements.symbolField;
+  ConstantValue argument = createString(text);
+  // TODO(johnniwinther): Use type arguments when all uses no longer expect
+  // a [FieldElement].
+  var fields = <FieldEntity, ConstantValue>{field: argument};
+  return new ConstructedConstantValue(type, fields);
+}
+
+UnaryOperation lookupUnary(UnaryOperator operator) {
+  switch (operator.kind) {
+    case UnaryOperatorKind.COMPLEMENT:
+      return bitNot;
+    case UnaryOperatorKind.NEGATE:
+      return negate;
+    case UnaryOperatorKind.NOT:
+      return not;
+    default:
+      return null;
+  }
+}
+
+BinaryOperation lookupBinary(BinaryOperator operator) {
+  switch (operator.kind) {
+    case BinaryOperatorKind.ADD:
+      return add;
+    case BinaryOperatorKind.SUB:
+      return subtract;
+    case BinaryOperatorKind.MUL:
+      return multiply;
+    case BinaryOperatorKind.DIV:
+      return divide;
+    case BinaryOperatorKind.MOD:
+      return modulo;
+    case BinaryOperatorKind.IDIV:
+      return truncatingDivide;
+    case BinaryOperatorKind.OR:
+      return bitOr;
+    case BinaryOperatorKind.AND:
+      return bitAnd;
+    case BinaryOperatorKind.XOR:
+      return bitXor;
+    case BinaryOperatorKind.LOGICAL_OR:
+      return booleanOr;
+    case BinaryOperatorKind.LOGICAL_AND:
+      return booleanAnd;
+    case BinaryOperatorKind.SHL:
+      return shiftLeft;
+    case BinaryOperatorKind.SHR:
+      return shiftRight;
+    case BinaryOperatorKind.LT:
+      return less;
+    case BinaryOperatorKind.LTEQ:
+      return lessEqual;
+    case BinaryOperatorKind.GT:
+      return greater;
+    case BinaryOperatorKind.GTEQ:
+      return greaterEqual;
+    case BinaryOperatorKind.EQ:
+      return equal;
+    case BinaryOperatorKind.IF_NULL:
+      return ifNull;
+    default:
+      return null;
+  }
+}
+
 abstract class Operation {
   String get name;
 }
@@ -24,125 +264,757 @@
   apply(left, right);
 }
 
-/// A [ConstantSystem] is responsible for creating constants and folding them.
-abstract class ConstantSystem {
-  BinaryOperation get add;
-  BinaryOperation get bitAnd;
-  UnaryOperation get bitNot;
-  BinaryOperation get bitOr;
-  BinaryOperation get bitXor;
-  BinaryOperation get booleanAnd;
-  BinaryOperation get booleanOr;
-  BinaryOperation get divide;
-  BinaryOperation get equal;
-  BinaryOperation get greaterEqual;
-  BinaryOperation get greater;
-  BinaryOperation get identity;
-  BinaryOperation get ifNull;
-  BinaryOperation get lessEqual;
-  BinaryOperation get less;
-  BinaryOperation get modulo;
-  BinaryOperation get multiply;
-  UnaryOperation get negate;
-  UnaryOperation get not;
-  BinaryOperation get remainder;
-  BinaryOperation get shiftLeft;
-  BinaryOperation get shiftRight;
-  BinaryOperation get subtract;
-  BinaryOperation get truncatingDivide;
+class BitNotOperation implements UnaryOperation {
+  @override
+  final String name = '~';
 
-  BinaryOperation get codeUnitAt;
-  UnaryOperation get round;
-  UnaryOperation get abs;
+  const BitNotOperation();
 
-  const ConstantSystem();
-
-  ConstantValue createInt(BigInt i);
-  ConstantValue createIntFromInt(int i) => createInt(new BigInt.from(i));
-  ConstantValue createDouble(double d);
-  ConstantValue createString(String string);
-  ConstantValue createBool(bool value);
-  ConstantValue createNull();
-  ConstantValue createList(InterfaceType type, List<ConstantValue> values);
-  ConstantValue createMap(CommonElements commonElements, InterfaceType type,
-      List<ConstantValue> keys, List<ConstantValue> values);
-  ConstantValue createType(CommonElements commonElements, DartType type);
-  ConstantValue createSymbol(CommonElements commonElements, String text);
-
-  // We need to special case the subtype check for JavaScript constant
-  // system because an int is a double at runtime.
-  bool isSubtype(DartTypes types, DartType s, DartType t);
-
-  /// Returns true if the [constant] is an integer at runtime.
-  bool isInt(ConstantValue constant);
-
-  /// Returns true if the [constant] is a double at runtime.
-  bool isDouble(ConstantValue constant);
-
-  /// Returns true if the [constant] is a string at runtime.
-  bool isString(ConstantValue constant);
-
-  /// Returns true if the [constant] is a boolean at runtime.
-  bool isBool(ConstantValue constant);
-
-  /// Returns true if the [constant] is null at runtime.
-  bool isNull(ConstantValue constant);
-
-  UnaryOperation lookupUnary(UnaryOperator operator) {
-    switch (operator.kind) {
-      case UnaryOperatorKind.COMPLEMENT:
-        return bitNot;
-      case UnaryOperatorKind.NEGATE:
-        return negate;
-      case UnaryOperatorKind.NOT:
-        return not;
-      default:
-        return null;
+  @override
+  ConstantValue fold(ConstantValue constant) {
+    if (isInt(constant)) {
+      // In JavaScript we don't check for -0 and treat it as if it was zero.
+      if (constant.isMinusZero) {
+        constant = createInt(BigInt.zero);
+      }
+      IntConstantValue intConstant = constant;
+      // We convert the result of bit-operations to 32 bit unsigned integers.
+      return _createInt32(~intConstant.intValue);
     }
+    return null;
+  }
+}
+
+class NegateOperation implements UnaryOperation {
+  @override
+  final String name = 'negate';
+
+  const NegateOperation();
+
+  @override
+  ConstantValue fold(ConstantValue constant) {
+    ConstantValue _fold(ConstantValue constant) {
+      if (constant.isInt) {
+        IntConstantValue intConstant = constant;
+        return createInt(-intConstant.intValue);
+      }
+      if (constant.isDouble) {
+        DoubleConstantValue doubleConstant = constant;
+        return createDouble(-doubleConstant.doubleValue);
+      }
+      return null;
+    }
+
+    if (constant.isInt) {
+      IntConstantValue intConstant = constant;
+      if (intConstant.intValue == BigInt.zero) {
+        return createDouble(-0.0);
+      }
+    }
+    return _fold(constant);
+  }
+}
+
+class NotOperation implements UnaryOperation {
+  @override
+  final String name = '!';
+
+  const NotOperation();
+
+  @override
+  ConstantValue fold(ConstantValue constant) {
+    if (constant.isBool) {
+      BoolConstantValue boolConstant = constant;
+      return createBool(!boolConstant.boolValue);
+    }
+    return null;
+  }
+}
+
+/// Operations that only work if both arguments are integers.
+abstract class BinaryBitOperation implements BinaryOperation {
+  const BinaryBitOperation();
+
+  @override
+  ConstantValue fold(ConstantValue left, ConstantValue right) {
+    ConstantValue _fold(ConstantValue left, ConstantValue right) {
+      if (left.isInt && right.isInt) {
+        IntConstantValue leftInt = left;
+        IntConstantValue rightInt = right;
+        BigInt resultValue = foldInts(leftInt.intValue, rightInt.intValue);
+        if (resultValue == null) return null;
+        return createInt(resultValue);
+      }
+      return null;
+    }
+
+    // In JavaScript we don't check for -0 and treat it as if it was zero.
+    if (left.isMinusZero) {
+      left = createInt(BigInt.zero);
+    }
+    if (right.isMinusZero) {
+      right = createInt(BigInt.zero);
+    }
+    IntConstantValue result = _fold(left, right);
+    if (result != null) {
+      // We convert the result of bit-operations to 32 bit unsigned integers.
+      return _createInt32(result.intValue);
+    }
+    return result;
   }
 
-  BinaryOperation lookupBinary(BinaryOperator operator) {
-    switch (operator.kind) {
-      case BinaryOperatorKind.ADD:
-        return add;
-      case BinaryOperatorKind.SUB:
-        return subtract;
-      case BinaryOperatorKind.MUL:
-        return multiply;
-      case BinaryOperatorKind.DIV:
-        return divide;
-      case BinaryOperatorKind.MOD:
-        return modulo;
-      case BinaryOperatorKind.IDIV:
-        return truncatingDivide;
-      case BinaryOperatorKind.OR:
-        return bitOr;
-      case BinaryOperatorKind.AND:
-        return bitAnd;
-      case BinaryOperatorKind.XOR:
-        return bitXor;
-      case BinaryOperatorKind.LOGICAL_OR:
-        return booleanOr;
-      case BinaryOperatorKind.LOGICAL_AND:
-        return booleanAnd;
-      case BinaryOperatorKind.SHL:
-        return shiftLeft;
-      case BinaryOperatorKind.SHR:
-        return shiftRight;
-      case BinaryOperatorKind.LT:
-        return less;
-      case BinaryOperatorKind.LTEQ:
-        return lessEqual;
-      case BinaryOperatorKind.GT:
-        return greater;
-      case BinaryOperatorKind.GTEQ:
-        return greaterEqual;
-      case BinaryOperatorKind.EQ:
-        return equal;
-      case BinaryOperatorKind.IF_NULL:
-        return ifNull;
-      default:
-        return null;
+  BigInt foldInts(BigInt left, BigInt right);
+}
+
+class BitAndOperation extends BinaryBitOperation {
+  @override
+  final String name = '&';
+
+  const BitAndOperation();
+
+  @override
+  BigInt foldInts(BigInt left, BigInt right) => left & right;
+
+  @override
+  apply(left, right) => left & right;
+}
+
+class BitOrOperation extends BinaryBitOperation {
+  @override
+  final String name = '|';
+
+  const BitOrOperation();
+
+  @override
+  BigInt foldInts(BigInt left, BigInt right) => left | right;
+
+  @override
+  apply(left, right) => left | right;
+}
+
+class BitXorOperation extends BinaryBitOperation {
+  @override
+  final String name = '^';
+
+  const BitXorOperation();
+
+  @override
+  BigInt foldInts(BigInt left, BigInt right) => left ^ right;
+
+  @override
+  apply(left, right) => left ^ right;
+}
+
+class ShiftLeftOperation extends BinaryBitOperation {
+  @override
+  final String name = '<<';
+
+  const ShiftLeftOperation();
+
+  @override
+  BigInt foldInts(BigInt left, BigInt right) {
+    // TODO(floitsch): find a better way to guard against excessive shifts to
+    // the left.
+    if (right > new BigInt.from(100) || right < BigInt.zero) return null;
+    return left << right.toInt();
+  }
+
+  @override
+  apply(left, right) => left << right;
+}
+
+class ShiftRightOperation extends BinaryBitOperation {
+  @override
+  final String name = '>>';
+
+  const ShiftRightOperation();
+
+  @override
+  ConstantValue fold(ConstantValue left, ConstantValue right) {
+    // Truncate the input value to 32 bits if necessary.
+    if (left.isInt) {
+      IntConstantValue intConstant = left;
+      BigInt value = intConstant.intValue;
+      BigInt truncatedValue = value & _BITS32;
+      if (value < BigInt.zero) {
+        // Sign-extend if the input was negative. The current semantics don't
+        // make much sense, since we only look at bit 31.
+        // TODO(floitsch): we should treat the input to right shifts as
+        // unsigned.
+
+        // A 32 bit complement-two value x can be computed by:
+        //    x_u - 2^32 (where x_u is its unsigned representation).
+        // Example: 0xFFFFFFFF - 0x100000000 => -1.
+        // We simply and with the sign-bit and multiply by two. If the sign-bit
+        // was set, then the result is 0. Otherwise it will become 2^32.
+        final BigInt SIGN_BIT = new BigInt.from(0x80000000);
+        truncatedValue -= BigInt.two * (truncatedValue & SIGN_BIT);
+      }
+      if (value != truncatedValue) {
+        left = createInt(truncatedValue);
+      }
     }
+    return super.fold(left, right);
+  }
+
+  @override
+  BigInt foldInts(BigInt left, BigInt right) {
+    if (right < BigInt.zero) return null;
+    return left >> right.toInt();
+  }
+
+  @override
+  apply(left, right) => left >> right;
+}
+
+abstract class BinaryBoolOperation implements BinaryOperation {
+  const BinaryBoolOperation();
+
+  @override
+  ConstantValue fold(ConstantValue left, ConstantValue right) {
+    if (left.isBool && right.isBool) {
+      BoolConstantValue leftBool = left;
+      BoolConstantValue rightBool = right;
+      bool resultValue = foldBools(leftBool.boolValue, rightBool.boolValue);
+      return createBool(resultValue);
+    }
+    return null;
+  }
+
+  bool foldBools(bool left, bool right);
+}
+
+class BooleanAndOperation extends BinaryBoolOperation {
+  @override
+  final String name = '&&';
+
+  const BooleanAndOperation();
+
+  @override
+  bool foldBools(bool left, bool right) => left && right;
+
+  @override
+  apply(left, right) => left && right;
+}
+
+class BooleanOrOperation extends BinaryBoolOperation {
+  @override
+  final String name = '||';
+
+  const BooleanOrOperation();
+
+  @override
+  bool foldBools(bool left, bool right) => left || right;
+
+  @override
+  apply(left, right) => left || right;
+}
+
+abstract class ArithmeticNumOperation implements BinaryOperation {
+  const ArithmeticNumOperation();
+
+  @override
+  ConstantValue fold(ConstantValue left, ConstantValue right) {
+    ConstantValue _fold(ConstantValue left, ConstantValue right) {
+      if (left.isNum && right.isNum) {
+        NumConstantValue leftNum = left;
+        NumConstantValue rightNum = right;
+        var foldedValue;
+        if (left.isInt && right.isInt) {
+          IntConstantValue leftInt = leftNum;
+          IntConstantValue rightInt = rightNum;
+          foldedValue = foldInts(leftInt.intValue, rightInt.intValue);
+        } else {
+          foldedValue = foldNums(leftNum.doubleValue, rightNum.doubleValue);
+        }
+        // A division by 0 means that we might not have a folded value.
+        if (foldedValue == null) return null;
+        if (left.isInt && right.isInt && !isDivide() || isTruncatingDivide()) {
+          assert(foldedValue is BigInt);
+          return createInt(foldedValue);
+        } else {
+          return createDouble(foldedValue);
+        }
+      }
+      return null;
+    }
+
+    ConstantValue result = _fold(left, right);
+    if (result == null) return result;
+    return _convertToJavaScriptConstant(result);
+  }
+
+  bool isDivide() => false;
+  bool isTruncatingDivide() => false;
+  foldInts(BigInt left, BigInt right);
+  foldNums(num left, num right);
+}
+
+class SubtractOperation extends ArithmeticNumOperation {
+  @override
+  final String name = '-';
+
+  const SubtractOperation();
+
+  @override
+  BigInt foldInts(BigInt left, BigInt right) => left - right;
+
+  @override
+  num foldNums(num left, num right) => left - right;
+
+  @override
+  apply(left, right) => left - right;
+}
+
+class MultiplyOperation extends ArithmeticNumOperation {
+  @override
+  final String name = '*';
+
+  const MultiplyOperation();
+
+  @override
+  BigInt foldInts(BigInt left, BigInt right) => left * right;
+
+  @override
+  num foldNums(num left, num right) => left * right;
+
+  @override
+  apply(left, right) => left * right;
+}
+
+class ModuloOperation extends ArithmeticNumOperation {
+  @override
+  final String name = '%';
+
+  const ModuloOperation();
+
+  @override
+  BigInt foldInts(BigInt left, BigInt right) {
+    if (right == BigInt.zero) return null;
+    return left % right;
+  }
+
+  @override
+  num foldNums(num left, num right) => left % right;
+
+  @override
+  apply(left, right) => left % right;
+}
+
+class RemainderOperation extends ArithmeticNumOperation {
+  @override
+  final String name = 'remainder';
+
+  const RemainderOperation();
+
+  @override
+  BigInt foldInts(BigInt left, BigInt right) {
+    if (right == BigInt.zero) return null;
+    return left.remainder(right);
+  }
+
+  @override
+  num foldNums(num left, num right) => left.remainder(right);
+
+  @override
+  apply(left, right) => left.remainder(right);
+}
+
+class TruncatingDivideOperation extends ArithmeticNumOperation {
+  @override
+  final String name = '~/';
+
+  const TruncatingDivideOperation();
+
+  @override
+  BigInt foldInts(BigInt left, BigInt right) {
+    if (right == BigInt.zero) return null;
+    return left ~/ right;
+  }
+
+  @override
+  BigInt foldNums(num left, num right) {
+    num ratio = left / right;
+    if (ratio.isNaN || ratio.isInfinite) return null;
+    return new BigInt.from(ratio.truncate().toInt());
+  }
+
+  @override
+  apply(left, right) => left ~/ right;
+
+  @override
+  bool isTruncatingDivide() => true;
+}
+
+class DivideOperation extends ArithmeticNumOperation {
+  @override
+  final String name = '/';
+
+  const DivideOperation();
+
+  @override
+  double foldInts(BigInt left, BigInt right) => left / right;
+
+  @override
+  num foldNums(num left, num right) => left / right;
+
+  @override
+  bool isDivide() => true;
+
+  @override
+  apply(left, right) => left / right;
+}
+
+class AddOperation implements BinaryOperation {
+  @override
+  final String name = '+';
+
+  const AddOperation();
+
+  @override
+  ConstantValue fold(ConstantValue left, ConstantValue right) {
+    ConstantValue _fold(ConstantValue left, ConstantValue right) {
+      if (left.isInt && right.isInt) {
+        IntConstantValue leftInt = left;
+        IntConstantValue rightInt = right;
+        BigInt result = leftInt.intValue + rightInt.intValue;
+        return createInt(result);
+      } else if (left.isNum && right.isNum) {
+        NumConstantValue leftNum = left;
+        NumConstantValue rightNum = right;
+        double result = leftNum.doubleValue + rightNum.doubleValue;
+        return createDouble(result);
+      } else if (left.isString && right.isString) {
+        StringConstantValue leftString = left;
+        StringConstantValue rightString = right;
+        String result = leftString.stringValue + rightString.stringValue;
+        return createString(result);
+      } else {
+        return null;
+      }
+    }
+
+    ConstantValue result = _fold(left, right);
+    if (result != null && result.isNum) {
+      return _convertToJavaScriptConstant(result);
+    }
+    return result;
+  }
+
+  @override
+  apply(left, right) => left + right;
+}
+
+abstract class RelationalNumOperation implements BinaryOperation {
+  const RelationalNumOperation();
+
+  @override
+  ConstantValue fold(ConstantValue left, ConstantValue right) {
+    if (!left.isNum || !right.isNum) return null;
+    bool foldedValue;
+    if (left.isInt && right.isInt) {
+      IntConstantValue leftInt = left;
+      IntConstantValue rightInt = right;
+      foldedValue = foldInts(leftInt.intValue, rightInt.intValue);
+    } else {
+      NumConstantValue leftNum = left;
+      NumConstantValue rightNum = right;
+      foldedValue = foldNums(leftNum.doubleValue, rightNum.doubleValue);
+    }
+    assert(foldedValue != null);
+    return createBool(foldedValue);
+  }
+
+  bool foldInts(BigInt left, BigInt right);
+  bool foldNums(num left, num right);
+}
+
+class LessOperation extends RelationalNumOperation {
+  @override
+  final String name = '<';
+
+  const LessOperation();
+
+  @override
+  bool foldInts(BigInt left, BigInt right) => left < right;
+
+  @override
+  bool foldNums(num left, num right) => left < right;
+
+  @override
+  apply(left, right) => left < right;
+}
+
+class LessEqualOperation extends RelationalNumOperation {
+  @override
+  final String name = '<=';
+
+  const LessEqualOperation();
+
+  @override
+  bool foldInts(BigInt left, BigInt right) => left <= right;
+
+  @override
+  bool foldNums(num left, num right) => left <= right;
+
+  @override
+  apply(left, right) => left <= right;
+}
+
+class GreaterOperation extends RelationalNumOperation {
+  @override
+  final String name = '>';
+
+  const GreaterOperation();
+
+  @override
+  bool foldInts(BigInt left, BigInt right) => left > right;
+
+  @override
+  bool foldNums(num left, num right) => left > right;
+
+  @override
+  apply(left, right) => left > right;
+}
+
+class GreaterEqualOperation extends RelationalNumOperation {
+  @override
+  final String name = '>=';
+
+  const GreaterEqualOperation();
+
+  @override
+  bool foldInts(BigInt left, BigInt right) => left >= right;
+
+  @override
+  bool foldNums(num left, num right) => left >= right;
+
+  @override
+  apply(left, right) => left >= right;
+}
+
+class EqualsOperation implements BinaryOperation {
+  @override
+  final String name = '==';
+
+  const EqualsOperation();
+
+  @override
+  ConstantValue fold(ConstantValue left, ConstantValue right) {
+    // Numbers need to be treated specially because: NaN != NaN, -0.0 == 0.0,
+    // and 1 == 1.0.
+    if (left.isInt && right.isInt) {
+      IntConstantValue leftInt = left;
+      IntConstantValue rightInt = right;
+      bool result = leftInt.intValue == rightInt.intValue;
+      return createBool(result);
+    }
+
+    if (left.isNum && right.isNum) {
+      NumConstantValue leftNum = left;
+      NumConstantValue rightNum = right;
+      bool result = leftNum.doubleValue == rightNum.doubleValue;
+      return createBool(result);
+    }
+
+    if (left.isConstructedObject) {
+      if (right.isNull) {
+        return createBool(false);
+      }
+      // Unless we know that the user-defined object does not implement the
+      // equality operator we cannot fold here.
+      return null;
+    }
+
+    return createBool(left == right);
+  }
+
+  @override
+  apply(left, right) => left == right;
+}
+
+class IdentityOperation implements BinaryOperation {
+  @override
+  final String name = '===';
+
+  const IdentityOperation();
+
+  @override
+  BoolConstantValue fold(ConstantValue left, ConstantValue right) {
+    BoolConstantValue _fold(ConstantValue left, ConstantValue right) {
+      // In order to preserve runtime semantics which says that NaN !== NaN
+      // don't constant fold NaN === NaN. Otherwise the output depends on
+      // inlined variables and other optimizations.
+      if (left.isNaN && right.isNaN) return new FalseConstantValue();
+      return createBool(left == right);
+    }
+
+    BoolConstantValue result = _fold(left, right);
+    if (result == null || result.boolValue) return result;
+    // In JavaScript -0.0 === 0 and all doubles are equal to their integer
+    // values. Furthermore NaN !== NaN.
+    if (left.isInt && right.isInt) {
+      IntConstantValue leftInt = left;
+      IntConstantValue rightInt = right;
+      return new BoolConstantValue(leftInt.intValue == rightInt.intValue);
+    }
+    if (left.isNum && right.isNum) {
+      NumConstantValue leftNum = left;
+      NumConstantValue rightNum = right;
+      double leftDouble = leftNum.doubleValue;
+      double rightDouble = rightNum.doubleValue;
+      return new BoolConstantValue(leftDouble == rightDouble);
+    }
+    return result;
+  }
+
+  @override
+  apply(left, right) => identical(left, right);
+}
+
+class IfNullOperation implements BinaryOperation {
+  @override
+  final String name = '??';
+
+  const IfNullOperation();
+
+  @override
+  ConstantValue fold(ConstantValue left, ConstantValue right) {
+    if (left.isNull) return right;
+    return left;
+  }
+
+  @override
+  apply(left, right) => left ?? right;
+}
+
+class CodeUnitAtOperation implements BinaryOperation {
+  @override
+  final String name = 'charCodeAt';
+
+  const CodeUnitAtOperation();
+
+  @override
+  IntConstantValue fold(ConstantValue left, ConstantValue right) {
+    if (left.isString && right.isInt) {
+      StringConstantValue stringConstant = left;
+      IntConstantValue indexConstant = right;
+      String string = stringConstant.stringValue;
+      int index = indexConstant.intValue.toInt();
+      if (index < 0 || index >= string.length) return null;
+      int value = string.codeUnitAt(index);
+      return createIntFromInt(value);
+    }
+    return null;
+  }
+
+  @override
+  apply(left, right) => left.codeUnitAt(right);
+}
+
+class RoundOperation implements UnaryOperation {
+  @override
+  final String name = 'round';
+
+  const RoundOperation();
+
+  @override
+  ConstantValue fold(ConstantValue constant) {
+    // Be careful to round() only values that do not throw on either the host or
+    // target platform.
+    ConstantValue tryToRound(double value) {
+      // Due to differences between browsers, only 'round' easy cases. Avoid
+      // cases where nudging the value up or down changes the answer.
+      // 13 digits is safely within the ~15 digit precision of doubles.
+      const severalULP = 0.0000000000001;
+      // Use 'roundToDouble()' to avoid exceptions on rounding the nudged value.
+      double rounded = value.roundToDouble();
+      double rounded1 = (value * (1.0 + severalULP)).roundToDouble();
+      double rounded2 = (value * (1.0 - severalULP)).roundToDouble();
+      if (rounded != rounded1 || rounded != rounded2) return null;
+      return _convertToJavaScriptConstant(
+          new IntConstantValue(new BigInt.from(value.round())));
+    }
+
+    if (constant.isInt) {
+      IntConstantValue intConstant = constant;
+      double value = intConstant.intValue.toDouble();
+      if (value >= -double.maxFinite && value <= double.maxFinite) {
+        return tryToRound(value);
+      }
+    }
+    if (constant.isDouble) {
+      DoubleConstantValue doubleConstant = constant;
+      double value = doubleConstant.doubleValue;
+      // NaN and infinities will throw.
+      if (value.isNaN) return null;
+      if (value.isInfinite) return null;
+      return tryToRound(value);
+    }
+    return null;
+  }
+}
+
+class UnfoldedUnaryOperation implements UnaryOperation {
+  @override
+  final String name;
+
+  const UnfoldedUnaryOperation(this.name);
+
+  @override
+  ConstantValue fold(ConstantValue constant) {
+    return null;
+  }
+}
+
+class JavaScriptSetConstant extends SetConstantValue {
+  final MapConstantValue entries;
+
+  JavaScriptSetConstant(InterfaceType type, this.entries)
+      : super(type, entries.keys);
+
+  @override
+  List<ConstantValue> getDependencies() => [entries];
+}
+
+class JavaScriptMapConstant extends MapConstantValue {
+  /// The [PROTO_PROPERTY] must not be used as normal property in any JavaScript
+  /// object. It would change the prototype chain.
+  static const String PROTO_PROPERTY = "__proto__";
+
+  /// The dart class implementing constant map literals.
+  static const String DART_CLASS = "ConstantMap";
+  static const String DART_STRING_CLASS = "ConstantStringMap";
+  static const String DART_PROTO_CLASS = "ConstantProtoMap";
+  static const String DART_GENERAL_CLASS = "GeneralConstantMap";
+  static const String LENGTH_NAME = "_length";
+  static const String JS_OBJECT_NAME = "_jsObject";
+  static const String KEYS_NAME = "_keys";
+  static const String PROTO_VALUE = "_protoValue";
+  static const String JS_DATA_NAME = "_jsData";
+
+  final ListConstantValue keyList;
+  final ConstantValue protoValue;
+  final bool onlyStringKeys;
+
+  JavaScriptMapConstant(InterfaceType type, ListConstantValue keyList,
+      List<ConstantValue> values, this.protoValue, this.onlyStringKeys)
+      : this.keyList = keyList,
+        super(type, keyList.entries, values);
+  @override
+  bool get isMap => true;
+
+  @override
+  List<ConstantValue> getDependencies() {
+    List<ConstantValue> result = <ConstantValue>[];
+    if (onlyStringKeys) {
+      result.add(keyList);
+    } else {
+      // Add the keys individually to avoid generating an unused list constant
+      // for the keys.
+      result.addAll(keys);
+    }
+    result.addAll(values);
+    return result;
   }
 }
diff --git a/pkg/compiler/lib/src/constants/constructors.dart b/pkg/compiler/lib/src/constants/constructors.dart
index e575b5a..3b9fb60 100644
--- a/pkg/compiler/lib/src/constants/constructors.dart
+++ b/pkg/compiler/lib/src/constants/constructors.dart
@@ -74,13 +74,16 @@
   GenerativeConstantConstructor(this.type, this.defaultValues, this.fieldMap,
       this.assertions, this.superConstructorInvocation);
 
+  @override
   ConstantConstructorKind get kind => ConstantConstructorKind.GENERATIVE;
 
+  @override
   InterfaceType computeInstanceType(
       EvaluationEnvironment environment, InterfaceType newType) {
     return environment.substByContext(type, newType);
   }
 
+  @override
   InstanceData computeInstanceData(EvaluationEnvironment environment,
       List<ConstantExpression> arguments, CallStructure callStructure) {
     NormalizedArguments args =
@@ -96,10 +99,12 @@
     return appliedInstanceData;
   }
 
+  @override
   accept(ConstantConstructorVisitor visitor, arg) {
     return visitor.visitGenerative(this, arg);
   }
 
+  @override
   int get hashCode {
     int hash = Hashing.objectHash(type);
     hash = Hashing.mapHash(defaultValues, hash);
@@ -107,6 +112,7 @@
     return Hashing.objectHash(superConstructorInvocation, hash);
   }
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! GenerativeConstantConstructor) return false;
@@ -116,6 +122,7 @@
         mapEquals(fieldMap, other.fieldMap);
   }
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write("{'type': $type");
@@ -181,16 +188,19 @@
   RedirectingGenerativeConstantConstructor(
       this.defaultValues, this.thisConstructorInvocation);
 
+  @override
   ConstantConstructorKind get kind {
     return ConstantConstructorKind.REDIRECTING_GENERATIVE;
   }
 
+  @override
   InterfaceType computeInstanceType(
       EvaluationEnvironment environment, InterfaceType newType) {
     return environment.substByContext(
         thisConstructorInvocation.computeInstanceType(environment), newType);
   }
 
+  @override
   InstanceData computeInstanceData(EvaluationEnvironment environment,
       List<ConstantExpression> arguments, CallStructure callStructure) {
     NormalizedArguments args =
@@ -201,15 +211,18 @@
     return appliedInstanceData;
   }
 
+  @override
   accept(ConstantConstructorVisitor visitor, arg) {
     return visitor.visitRedirectingGenerative(this, arg);
   }
 
+  @override
   int get hashCode {
     int hash = Hashing.objectHash(thisConstructorInvocation);
     return Hashing.mapHash(defaultValues, hash);
   }
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! RedirectingGenerativeConstantConstructor) return false;
@@ -218,6 +231,7 @@
             defaultValues, other.defaultValues);
   }
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write("{'type': ${thisConstructorInvocation.type}");
@@ -236,16 +250,19 @@
 
   RedirectingFactoryConstantConstructor(this.targetConstructorInvocation);
 
+  @override
   ConstantConstructorKind get kind {
     return ConstantConstructorKind.REDIRECTING_FACTORY;
   }
 
+  @override
   InterfaceType computeInstanceType(
       EvaluationEnvironment environment, InterfaceType newType) {
     return environment.substByContext(
         targetConstructorInvocation.computeInstanceType(environment), newType);
   }
 
+  @override
   InstanceData computeInstanceData(EvaluationEnvironment environment,
       List<ConstantExpression> arguments, CallStructure callStructure) {
     ConstantConstructor constantConstructor =
@@ -254,20 +271,24 @@
         environment, arguments, callStructure);
   }
 
+  @override
   accept(ConstantConstructorVisitor visitor, arg) {
     return visitor.visitRedirectingFactory(this, arg);
   }
 
+  @override
   int get hashCode {
     return Hashing.objectHash(targetConstructorInvocation);
   }
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! RedirectingFactoryConstantConstructor) return false;
     return targetConstructorInvocation == other.targetConstructorInvocation;
   }
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write("{");
diff --git a/pkg/compiler/lib/src/constants/evaluation.dart b/pkg/compiler/lib/src/constants/evaluation.dart
index 386a2ee..f360735 100644
--- a/pkg/compiler/lib/src/constants/evaluation.dart
+++ b/pkg/compiler/lib/src/constants/evaluation.dart
@@ -24,12 +24,6 @@
   /// Type in the enclosing constructed
   InterfaceType get enclosingConstructedType;
 
-  /// Whether the immediate parent is a set literal.
-  ///
-  /// Used to distinguish map-literal from set-literal errors. This will be
-  /// removed once the CFE reports errors on constants.
-  bool get immediateUnderSetLiteral;
-
   /// Read environments string passed in using the '-Dname=value' option.
   String readFromEnvironment(String name);
 
@@ -77,8 +71,8 @@
 
 abstract class EvaluationEnvironmentBase implements EvaluationEnvironment {
   Link<Spannable> _spannableStack = const Link<Spannable>();
+  @override
   InterfaceType enclosingConstructedType;
-  bool immediateUnderSetLiteral = false;
   final Set<FieldEntity> _currentlyEvaluatedFields = new Set<FieldEntity>();
   final bool constantRequired;
 
@@ -86,6 +80,7 @@
     _spannableStack = _spannableStack.prepend(spannable);
   }
 
+  @override
   bool get checkCasts => true;
 
   DiagnosticReporter get reporter;
@@ -126,14 +121,10 @@
     _spannableStack = _spannableStack.prepend(constructor);
     var old = enclosingConstructedType;
     enclosingConstructedType = type;
-    if (type.element == commonElements.unmodifiableSetClass) {
-      immediateUnderSetLiteral = true;
-    }
     ConstantValue result = evaluate();
     // All const set literals have as an immediate child a const map. The map
     // evaluate method calls evaluateMapBody and reset this flag immediately.
     // Because there are no other children, the flag is kept false.
-    assert(!immediateUnderSetLiteral);
     enclosingConstructedType = old;
     _spannableStack = _spannableStack.tail;
     return result;
@@ -141,7 +132,6 @@
 
   @override
   ConstantValue evaluateMapBody(ConstantValue evaluate()) {
-    immediateUnderSetLiteral = false;
     return evaluate();
   }
 
@@ -251,6 +241,7 @@
     return value;
   }
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write('NormalizedArguments[');
diff --git a/pkg/compiler/lib/src/constants/expressions.dart b/pkg/compiler/lib/src/constants/expressions.dart
index 82f640d..bb24531 100644
--- a/pkg/compiler/lib/src/constants/expressions.dart
+++ b/pkg/compiler/lib/src/constants/expressions.dart
@@ -4,9 +4,11 @@
 
 library dart2js.constants.expressions;
 
+import 'dart:collection';
+
 import '../common.dart';
-import '../constants/constant_system.dart';
 import '../common_elements.dart';
+import '../constants/constant_system.dart' as constant_system;
 import '../elements/entities.dart';
 import '../elements/operators.dart';
 import '../elements/types.dart';
@@ -32,6 +34,7 @@
   INT,
   INT_FROM_ENVIRONMENT,
   LIST,
+  SET,
   MAP,
   NULL,
   STRING,
@@ -70,10 +73,8 @@
   /// Substitute free variables using arguments.
   ConstantExpression apply(NormalizedArguments arguments) => this;
 
-  /// Compute the [ConstantValue] for this expression using the [environment]
-  /// and the [constantSystem].
-  ConstantValue evaluate(
-      EvaluationEnvironment environment, ConstantSystem constantSystem);
+  /// Compute the [ConstantValue] for this expression using the [environment].
+  ConstantValue evaluate(EvaluationEnvironment environment);
 
   /// Returns the type of this constant expression, if it is independent of the
   /// environment values.
@@ -98,10 +99,12 @@
 
   int _computeHashCode();
 
+  @override
   int get hashCode => _hashCode ??= _computeHashCode();
 
   bool _equals(covariant ConstantExpression other);
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! ConstantExpression) return false;
@@ -110,6 +113,7 @@
     return _equals(other);
   }
 
+  @override
   String toString() {
     assertDebugMode('Use ConstantExpression.toDartText() or '
         'ConstantExpression.toStructuredText() instead of '
@@ -135,15 +139,16 @@
 
 /// A synthetic constant used to recover from errors.
 class ErroneousConstantExpression extends ConstantExpression {
+  @override
   ConstantExpressionKind get kind => ConstantExpressionKind.ERRONEOUS;
 
+  @override
   accept(ConstantExpressionVisitor visitor, [context]) {
     // Do nothing. This is an error.
   }
 
   @override
-  ConstantValue evaluate(
-      EvaluationEnvironment environment, ConstantSystem constantSystem) {
+  ConstantValue evaluate(EvaluationEnvironment environment) {
     // TODO(johnniwinther): Use non-constant values for errors.
     return new NonConstantValue();
   }
@@ -166,8 +171,10 @@
 
   BoolConstantExpression(this.boolValue);
 
+  @override
   ConstantExpressionKind get kind => ConstantExpressionKind.BOOL;
 
+  @override
   accept(ConstantExpressionVisitor visitor, [context]) {
     return visitor.visitBool(this, context);
   }
@@ -178,9 +185,8 @@
   }
 
   @override
-  ConstantValue evaluate(
-      EvaluationEnvironment environment, ConstantSystem constantSystem) {
-    return constantSystem.createBool(boolValue);
+  ConstantValue evaluate(EvaluationEnvironment environment) {
+    return constant_system.createBool(boolValue);
   }
 
   @override
@@ -202,8 +208,10 @@
 
   IntConstantExpression(this.intValue);
 
+  @override
   ConstantExpressionKind get kind => ConstantExpressionKind.INT;
 
+  @override
   accept(ConstantExpressionVisitor visitor, [context]) {
     return visitor.visitInt(this, context);
   }
@@ -214,9 +222,8 @@
   }
 
   @override
-  ConstantValue evaluate(
-      EvaluationEnvironment environment, ConstantSystem constantSystem) {
-    return constantSystem.createInt(intValue);
+  ConstantValue evaluate(EvaluationEnvironment environment) {
+    return constant_system.createInt(intValue);
   }
 
   @override
@@ -238,8 +245,10 @@
 
   DoubleConstantExpression(this.doubleValue);
 
+  @override
   ConstantExpressionKind get kind => ConstantExpressionKind.DOUBLE;
 
+  @override
   accept(ConstantExpressionVisitor visitor, [context]) {
     return visitor.visitDouble(this, context);
   }
@@ -250,9 +259,8 @@
   }
 
   @override
-  ConstantValue evaluate(
-      EvaluationEnvironment environment, ConstantSystem constantSystem) {
-    return constantSystem.createDouble(doubleValue);
+  ConstantValue evaluate(EvaluationEnvironment environment) {
+    return constant_system.createDouble(doubleValue);
   }
 
   @override
@@ -274,8 +282,10 @@
 
   StringConstantExpression(this.stringValue);
 
+  @override
   ConstantExpressionKind get kind => ConstantExpressionKind.STRING;
 
+  @override
   accept(ConstantExpressionVisitor visitor, [context]) {
     return visitor.visitString(this, context);
   }
@@ -286,9 +296,8 @@
   }
 
   @override
-  ConstantValue evaluate(
-      EvaluationEnvironment environment, ConstantSystem constantSystem) {
-    return constantSystem.createString(stringValue);
+  ConstantValue evaluate(EvaluationEnvironment environment) {
+    return constant_system.createString(stringValue);
   }
 
   @override
@@ -308,8 +317,10 @@
 class NullConstantExpression extends ConstantExpression {
   NullConstantExpression();
 
+  @override
   ConstantExpressionKind get kind => ConstantExpressionKind.NULL;
 
+  @override
   accept(ConstantExpressionVisitor visitor, [context]) {
     return visitor.visitNull(this, context);
   }
@@ -320,9 +331,8 @@
   }
 
   @override
-  ConstantValue evaluate(
-      EvaluationEnvironment environment, ConstantSystem constantSystem) {
-    return constantSystem.createNull();
+  ConstantValue evaluate(EvaluationEnvironment environment) {
+    return constant_system.createNull();
   }
 
   @override
@@ -343,8 +353,10 @@
 
   ListConstantExpression(this.type, this.values);
 
+  @override
   ConstantExpressionKind get kind => ConstantExpressionKind.LIST;
 
+  @override
   accept(ConstantExpressionVisitor visitor, [context]) {
     return visitor.visitList(this, context);
   }
@@ -362,12 +374,12 @@
   }
 
   @override
-  ConstantValue evaluate(
-      EvaluationEnvironment environment, ConstantSystem constantSystem) {
-    return constantSystem.createList(type,
-        values.map((v) => v.evaluate(environment, constantSystem)).toList());
+  ConstantValue evaluate(EvaluationEnvironment environment) {
+    return constant_system.createList(
+        type, values.map((v) => v.evaluate(environment)).toList());
   }
 
+  @override
   ConstantExpression apply(NormalizedArguments arguments) {
     return new ListConstantExpression(
         type, values.map((v) => v.apply(arguments)).toList());
@@ -402,6 +414,77 @@
   bool get isPotential => values.any((e) => e.isPotential);
 }
 
+/// Literal set constant.
+class SetConstantExpression extends ConstantExpression {
+  final InterfaceType type;
+  final List<ConstantExpression> values;
+
+  SetConstantExpression(this.type, this.values);
+
+  @override
+  ConstantExpressionKind get kind => ConstantExpressionKind.SET;
+
+  @override
+  accept(ConstantExpressionVisitor visitor, [context]) {
+    return visitor.visitSet(this, context);
+  }
+
+  @override
+  ConstantExpression apply(NormalizedArguments arguments) =>
+      new SetConstantExpression(
+          type, values.map((v) => v.apply(arguments)).toList());
+
+  @override
+  ConstantValue evaluate(EvaluationEnvironment environment) {
+    // TODO(fishythefish): Delete once the CFE provides these error messages.
+    Set<ConstantValue> set = new LinkedHashSet<ConstantValue>();
+    for (int i = 0; i < values.length; i++) {
+      ConstantValue value = values[i].evaluate(environment);
+      if (!value.isConstant) return new NonConstantValue();
+      if (!set.add(value)) {
+        environment.reportError(values[i], MessageKind.EQUAL_SET_ENTRY, {});
+      }
+    }
+
+    return constant_system.createSet(
+        environment.commonElements, type, set.toList());
+  }
+
+  @override
+  DartType getKnownType(CommonElements commonElements) => type;
+
+  @override
+  void _createStructuredText(StringBuffer sb) {
+    sb.write('Set(type=$type,values=[');
+    String delimiter = '';
+    for (ConstantExpression value in values) {
+      sb.write(delimiter);
+      value._createStructuredText(sb);
+      delimiter = ',';
+    }
+    sb.write('])');
+  }
+
+  @override
+  int _computeHashCode() => Hashing.listHash(values, Hashing.objectHash(type));
+
+  @override
+  bool _equals(SetConstantExpression other) {
+    if (type != other.type) return false;
+    if (values.length != other.values.length) return false;
+    for (int i = 0; i < values.length; i++) {
+      if (values[i] != other.values[i]) return false;
+    }
+    return true;
+  }
+
+  @override
+  bool get isImplicit => false;
+
+  @override
+  bool get isPotential => values.any((v) => v.isPotential);
+}
+
 /// Literal map constant.
 class MapConstantExpression extends ConstantExpression {
   final InterfaceType type;
@@ -410,8 +493,10 @@
 
   MapConstantExpression(this.type, this.keys, this.values);
 
+  @override
   ConstantExpressionKind get kind => ConstantExpressionKind.MAP;
 
+  @override
   accept(ConstantExpressionVisitor visitor, [context]) {
     return visitor.visitMap(this, context);
   }
@@ -431,36 +516,30 @@
   }
 
   @override
-  ConstantValue evaluate(
-      EvaluationEnvironment environment, ConstantSystem constantSystem) {
+  ConstantValue evaluate(EvaluationEnvironment environment) {
     // TODO(sigmund): delete once the CFE provides these error messages.
-    bool isSetLiteral = environment.immediateUnderSetLiteral;
     return environment.evaluateMapBody(() {
       Map<ConstantValue, ConstantValue> map = <ConstantValue, ConstantValue>{};
       for (int i = 0; i < keys.length; i++) {
-        ConstantValue key = keys[i].evaluate(environment, constantSystem);
+        ConstantValue key = keys[i].evaluate(environment);
         if (!key.isConstant) {
           return new NonConstantValue();
         }
-        ConstantValue value = values[i].evaluate(environment, constantSystem);
+        ConstantValue value = values[i].evaluate(environment);
         if (!value.isConstant) {
           return new NonConstantValue();
         }
         if (map.containsKey(key)) {
-          environment.reportError(
-              keys[i],
-              isSetLiteral
-                  ? MessageKind.EQUAL_SET_ENTRY
-                  : MessageKind.EQUAL_MAP_ENTRY_KEY,
-              {});
+          environment.reportError(keys[i], MessageKind.EQUAL_MAP_ENTRY_KEY, {});
         }
         map[key] = value;
       }
-      return constantSystem.createMap(environment.commonElements, type,
+      return constant_system.createMap(environment.commonElements, type,
           map.keys.toList(), map.values.toList());
     });
   }
 
+  @override
   ConstantExpression apply(NormalizedArguments arguments) {
     return new MapConstantExpression(
         type,
@@ -513,8 +592,10 @@
     assert(!arguments.contains(null));
   }
 
+  @override
   ConstantExpressionKind get kind => ConstantExpressionKind.CONSTRUCTED;
 
+  @override
   accept(ConstantExpressionVisitor visitor, [context]) {
     return visitor.visitConstructed(this, context);
   }
@@ -547,14 +628,14 @@
         .computeInstanceType(environment, type);
   }
 
+  @override
   ConstructedConstantExpression apply(NormalizedArguments arguments) {
     return new ConstructedConstantExpression(type, target, callStructure,
         this.arguments.map((a) => a.apply(arguments)).toList());
   }
 
   @override
-  ConstantValue evaluate(
-      EvaluationEnvironment environment, ConstantSystem constantSystem) {
+  ConstantValue evaluate(EvaluationEnvironment environment) {
     InterfaceType instanceType = computeInstanceType(environment);
     return environment.evaluateConstructor(target, instanceType, () {
       InstanceData instanceData = computeInstanceData(environment);
@@ -566,7 +647,7 @@
           <FieldEntity, ConstantValue>{};
       instanceData.fieldMap
           .forEach((FieldEntity field, ConstantExpression constant) {
-        ConstantValue value = constant.evaluate(environment, constantSystem);
+        ConstantValue value = constant.evaluate(environment);
         assert(
             value != null,
             failedAt(CURRENT_ELEMENT_SPANNABLE,
@@ -578,7 +659,7 @@
         }
       });
       for (AssertConstantExpression assertion in instanceData.assertions) {
-        if (!assertion.evaluate(environment, constantSystem).isConstant) {
+        if (!assertion.evaluate(environment).isConstant) {
           isValidAsConstant = false;
         }
       }
@@ -626,8 +707,10 @@
 
   ConcatenateConstantExpression(this.expressions);
 
+  @override
   ConstantExpressionKind get kind => ConstantExpressionKind.CONCATENATE;
 
+  @override
   accept(ConstantExpressionVisitor visitor, [context]) {
     return visitor.visitConcatenate(this, context);
   }
@@ -644,18 +727,18 @@
     sb.write('])');
   }
 
+  @override
   ConstantExpression apply(NormalizedArguments arguments) {
     return new ConcatenateConstantExpression(
         expressions.map((a) => a.apply(arguments)).toList());
   }
 
   @override
-  ConstantValue evaluate(
-      EvaluationEnvironment environment, ConstantSystem constantSystem) {
+  ConstantValue evaluate(EvaluationEnvironment environment) {
     bool isValid = true;
     StringBuffer sb = new StringBuffer();
     for (ConstantExpression expression in expressions) {
-      ConstantValue value = expression.evaluate(environment, constantSystem);
+      ConstantValue value = expression.evaluate(environment);
       if (!value.isConstant) {
         isValid = false;
         // Use `continue` instead of `return` here to report all errors in the
@@ -687,7 +770,7 @@
       }
     }
     if (isValid) {
-      return constantSystem.createString(sb.toString());
+      return constant_system.createString(sb.toString());
     }
     return new NonConstantValue();
   }
@@ -726,8 +809,10 @@
 
   SymbolConstantExpression(this.name);
 
+  @override
   ConstantExpressionKind get kind => ConstantExpressionKind.SYMBOL;
 
+  @override
   accept(ConstantExpressionVisitor visitor, [context]) {
     return visitor.visitSymbol(this, context);
   }
@@ -746,9 +831,8 @@
   }
 
   @override
-  ConstantValue evaluate(
-      EvaluationEnvironment environment, ConstantSystem constantSystem) {
-    return constantSystem.createSymbol(environment.commonElements, name);
+  ConstantValue evaluate(EvaluationEnvironment environment) {
+    return constant_system.createSymbol(environment.commonElements, name);
   }
 
   @override
@@ -767,8 +851,10 @@
         "Unexpected type constant type: $type");
   }
 
+  @override
   ConstantExpressionKind get kind => ConstantExpressionKind.TYPE;
 
+  @override
   accept(ConstantExpressionVisitor visitor, [context]) {
     return visitor.visitType(this, context);
   }
@@ -779,9 +865,8 @@
   }
 
   @override
-  ConstantValue evaluate(
-      EvaluationEnvironment environment, ConstantSystem constantSystem) {
-    return constantSystem.createType(environment.commonElements, type);
+  ConstantValue evaluate(EvaluationEnvironment environment) {
+    return constant_system.createType(environment.commonElements, type);
   }
 
   @override
@@ -805,8 +890,10 @@
 
   AsConstantExpression(this.expression, this.type);
 
+  @override
   ConstantExpressionKind get kind => ConstantExpressionKind.AS;
 
+  @override
   accept(ConstantExpressionVisitor visitor, [context]) {
     return visitor.visitAs(this, context);
   }
@@ -819,8 +906,7 @@
   }
 
   @override
-  ConstantValue evaluate(
-      EvaluationEnvironment environment, ConstantSystem constantSystem) {
+  ConstantValue evaluate(EvaluationEnvironment environment) {
     // Running example for comments:
     //
     //     class A<T> {
@@ -835,8 +921,7 @@
     // We visit `t as A.T` while evaluating `const B<num>(0)`.
 
     // The expression value is `0`.
-    ConstantValue expressionValue =
-        expression.evaluate(environment, constantSystem);
+    ConstantValue expressionValue = expression.evaluate(environment);
 
     if (!environment.checkCasts) return expressionValue;
 
@@ -849,7 +934,7 @@
 
     // Check that the expression type, `int`, is a subtype of the type in
     // context, `num`.
-    if (!constantSystem.isSubtype(
+    if (!constant_system.isSubtype(
         environment.types, expressionType, typeInContext)) {
       // TODO(sigmund): consider reporting different messages and error
       // locations for implicit vs explicit casts.
@@ -884,8 +969,10 @@
 
   FieldConstantExpression(this.element);
 
+  @override
   ConstantExpressionKind get kind => ConstantExpressionKind.FIELD;
 
+  @override
   accept(ConstantExpressionVisitor visitor, [context]) {
     return visitor.visitField(this, context);
   }
@@ -896,11 +983,10 @@
   }
 
   @override
-  ConstantValue evaluate(
-      EvaluationEnvironment environment, ConstantSystem constantSystem) {
+  ConstantValue evaluate(EvaluationEnvironment environment) {
     return environment.evaluateField(element, () {
       ConstantExpression constant = environment.getFieldConstant(element);
-      return constant.evaluate(environment, constantSystem);
+      return constant.evaluate(environment);
     });
   }
 
@@ -919,8 +1005,10 @@
 
   LocalVariableConstantExpression(this.element);
 
+  @override
   ConstantExpressionKind get kind => ConstantExpressionKind.LOCAL_VARIABLE;
 
+  @override
   accept(ConstantExpressionVisitor visitor, [context]) {
     return visitor.visitLocalVariable(this, context);
   }
@@ -931,10 +1019,9 @@
   }
 
   @override
-  ConstantValue evaluate(
-      EvaluationEnvironment environment, ConstantSystem constantSystem) {
+  ConstantValue evaluate(EvaluationEnvironment environment) {
     ConstantExpression constant = environment.getLocalConstant(element);
-    return constant.evaluate(environment, constantSystem);
+    return constant.evaluate(environment);
   }
 
   @override
@@ -953,8 +1040,10 @@
 
   FunctionConstantExpression(this.element, this.type);
 
+  @override
   ConstantExpressionKind get kind => ConstantExpressionKind.FUNCTION;
 
+  @override
   accept(ConstantExpressionVisitor visitor, [context]) {
     return visitor.visitFunction(this, context);
   }
@@ -965,8 +1054,7 @@
   }
 
   @override
-  ConstantValue evaluate(
-      EvaluationEnvironment environment, ConstantSystem constantSystem) {
+  ConstantValue evaluate(EvaluationEnvironment environment) {
     return new FunctionConstantValue(element, type);
   }
 
@@ -997,8 +1085,10 @@
   static bool potentialOperator(BinaryOperator operator) =>
       PRECEDENCE_MAP[operator.kind] != null;
 
+  @override
   ConstantExpressionKind get kind => ConstantExpressionKind.BINARY;
 
+  @override
   accept(ConstantExpressionVisitor visitor, [context]) {
     return visitor.visitBinary(this, context);
   }
@@ -1013,13 +1103,32 @@
   }
 
   @override
-  ConstantValue evaluate(
-      EvaluationEnvironment environment, ConstantSystem constantSystem) {
-    ConstantValue leftValue = left.evaluate(environment, constantSystem);
-    ConstantValue rightValue = right.evaluate(environment, constantSystem);
-    if (!leftValue.isConstant || !rightValue.isConstant) {
-      return new NonConstantValue();
+  ConstantValue evaluate(EvaluationEnvironment environment) {
+    ConstantValue leftValue = left.evaluate(environment);
+    if (!leftValue.isConstant) return new NonConstantValue();
+    ConstantValue rightValue;
+    // Short-circuit && and || operators.
+    switch (operator.kind) {
+      case BinaryOperatorKind.LOGICAL_AND:
+        if (leftValue.isBool && leftValue.isFalse) {
+          rightValue = new FalseConstantValue();
+        } else {
+          rightValue = right.evaluate(environment);
+        }
+        break;
+
+      case BinaryOperatorKind.LOGICAL_OR:
+        if (leftValue.isBool && leftValue.isTrue) {
+          rightValue = new TrueConstantValue();
+        } else {
+          rightValue = right.evaluate(environment);
+        }
+        break;
+      default:
+        rightValue = right.evaluate(environment);
     }
+
+    if (!rightValue.isConstant) return new NonConstantValue();
     bool isValid = true;
     switch (operator.kind) {
       case BinaryOperatorKind.EQ:
@@ -1218,11 +1327,12 @@
       switch (operator.kind) {
         case BinaryOperatorKind.NOT_EQ:
           BoolConstantValue equals =
-              constantSystem.equal.fold(leftValue, rightValue);
+              constant_system.equal.fold(leftValue, rightValue);
           return equals.negate();
         default:
-          ConstantValue value =
-              constantSystem.lookupBinary(operator).fold(leftValue, rightValue);
+          ConstantValue value = constant_system
+              .lookupBinary(operator)
+              .fold(leftValue, rightValue);
           if (value != null) {
             return value;
           }
@@ -1233,11 +1343,13 @@
     return new NonConstantValue();
   }
 
+  @override
   ConstantExpression apply(NormalizedArguments arguments) {
     return new BinaryConstantExpression(
         left.apply(arguments), operator, right.apply(arguments));
   }
 
+  @override
   // ignore: MISSING_RETURN
   InterfaceType getKnownType(CommonElements commonElements) {
     DartType knownLeftType = left.getKnownType(commonElements);
@@ -1290,6 +1402,7 @@
     }
   }
 
+  @override
   int get precedence => PRECEDENCE_MAP[operator.kind];
 
   @override
@@ -1341,8 +1454,10 @@
 
   IdenticalConstantExpression(this.left, this.right);
 
+  @override
   ConstantExpressionKind get kind => ConstantExpressionKind.IDENTICAL;
 
+  @override
   accept(ConstantExpressionVisitor visitor, [context]) {
     return visitor.visitIdentical(this, context);
   }
@@ -1357,21 +1472,22 @@
   }
 
   @override
-  ConstantValue evaluate(
-      EvaluationEnvironment environment, ConstantSystem constantSystem) {
-    ConstantValue leftValue = left.evaluate(environment, constantSystem);
-    ConstantValue rightValue = right.evaluate(environment, constantSystem);
+  ConstantValue evaluate(EvaluationEnvironment environment) {
+    ConstantValue leftValue = left.evaluate(environment);
+    ConstantValue rightValue = right.evaluate(environment);
     if (leftValue.isConstant && rightValue.isConstant) {
-      return constantSystem.identity.fold(leftValue, rightValue);
+      return constant_system.identity.fold(leftValue, rightValue);
     }
     return new NonConstantValue();
   }
 
+  @override
   ConstantExpression apply(NormalizedArguments arguments) {
     return new IdenticalConstantExpression(
         left.apply(arguments), right.apply(arguments));
   }
 
+  @override
   int get precedence => 15;
 
   @override
@@ -1403,8 +1519,10 @@
     assert(PRECEDENCE_MAP[operator.kind] != null);
   }
 
+  @override
   ConstantExpressionKind get kind => ConstantExpressionKind.UNARY;
 
+  @override
   accept(ConstantExpressionVisitor visitor, [context]) {
     return visitor.visitUnary(this, context);
   }
@@ -1417,10 +1535,8 @@
   }
 
   @override
-  ConstantValue evaluate(
-      EvaluationEnvironment environment, ConstantSystem constantSystem) {
-    ConstantValue expressionValue =
-        expression.evaluate(environment, constantSystem);
+  ConstantValue evaluate(EvaluationEnvironment environment) {
+    ConstantValue expressionValue = expression.evaluate(environment);
     bool isValid = true;
     switch (operator.kind) {
       case UnaryOperatorKind.NOT:
@@ -1459,7 +1575,7 @@
     }
     if (isValid) {
       ConstantValue value =
-          constantSystem.lookupUnary(operator).fold(expressionValue);
+          constant_system.lookupUnary(operator).fold(expressionValue);
       if (value != null) {
         return value;
       }
@@ -1467,10 +1583,12 @@
     return new NonConstantValue();
   }
 
+  @override
   ConstantExpression apply(NormalizedArguments arguments) {
     return new UnaryConstantExpression(operator, expression.apply(arguments));
   }
 
+  @override
   int get precedence => PRECEDENCE_MAP[operator.kind];
 
   @override
@@ -1506,8 +1624,10 @@
 
   StringLengthConstantExpression(this.expression);
 
+  @override
   ConstantExpressionKind get kind => ConstantExpressionKind.STRING_LENGTH;
 
+  @override
   accept(ConstantExpressionVisitor visitor, [context]) {
     return visitor.visitStringLength(this, context);
   }
@@ -1520,9 +1640,8 @@
   }
 
   @override
-  ConstantValue evaluate(
-      EvaluationEnvironment environment, ConstantSystem constantSystem) {
-    ConstantValue value = expression.evaluate(environment, constantSystem);
+  ConstantValue evaluate(EvaluationEnvironment environment) {
+    ConstantValue value = expression.evaluate(environment);
     if (!value.isString) {
       environment.reportError(
           expression, MessageKind.INVALID_CONSTANT_STRING_LENGTH_TYPE, {
@@ -1532,15 +1651,17 @@
       return new NonConstantValue();
     } else {
       StringConstantValue stringValue = value;
-      return constantSystem
+      return constant_system
           .createInt(new BigInt.from(stringValue.stringValue.length));
     }
   }
 
+  @override
   ConstantExpression apply(NormalizedArguments arguments) {
     return new StringLengthConstantExpression(expression.apply(arguments));
   }
 
+  @override
   int get precedence => 15;
 
   @override
@@ -1571,8 +1692,10 @@
 
   ConditionalConstantExpression(this.condition, this.trueExp, this.falseExp);
 
+  @override
   ConstantExpressionKind get kind => ConstantExpressionKind.CONDITIONAL;
 
+  @override
   accept(ConstantExpressionVisitor visitor, [context]) {
     return visitor.visitConditional(this, context);
   }
@@ -1588,11 +1711,13 @@
     sb.write(')');
   }
 
+  @override
   ConstantExpression apply(NormalizedArguments arguments) {
     return new ConditionalConstantExpression(condition.apply(arguments),
         trueExp.apply(arguments), falseExp.apply(arguments));
   }
 
+  @override
   int get precedence => 3;
 
   @override
@@ -1610,12 +1735,10 @@
   }
 
   @override
-  ConstantValue evaluate(
-      EvaluationEnvironment environment, ConstantSystem constantSystem) {
-    ConstantValue conditionValue =
-        condition.evaluate(environment, constantSystem);
-    ConstantValue trueValue = trueExp.evaluate(environment, constantSystem);
-    ConstantValue falseValue = falseExp.evaluate(environment, constantSystem);
+  ConstantValue evaluate(EvaluationEnvironment environment) {
+    ConstantValue conditionValue = condition.evaluate(environment);
+    ConstantValue trueValue = trueExp.evaluate(environment);
+    ConstantValue falseValue = falseExp.evaluate(environment);
     bool isValid = true;
     if (!conditionValue.isBool) {
       environment.reportError(
@@ -1657,10 +1780,12 @@
 
   PositionalArgumentReference(this.index);
 
+  @override
   ConstantExpressionKind get kind {
     return ConstantExpressionKind.POSITIONAL_REFERENCE;
   }
 
+  @override
   accept(ConstantExpressionVisitor visitor, [context]) {
     return visitor.visitPositional(this, context);
   }
@@ -1670,6 +1795,7 @@
     sb.write('Positional(index=$index)');
   }
 
+  @override
   ConstantExpression apply(NormalizedArguments arguments) {
     return arguments.getPositionalArgument(index);
   }
@@ -1681,9 +1807,8 @@
   bool _equals(PositionalArgumentReference other) => index == other.index;
 
   @override
-  ConstantValue evaluate(
-      EvaluationEnvironment environment, ConstantSystem constantSystem) {
-    throw new UnsupportedError('PositionalArgumentReference.evaluate');
+  ConstantValue evaluate(EvaluationEnvironment environment) {
+    return new NonConstantValue();
   }
 
   @override
@@ -1696,10 +1821,12 @@
 
   NamedArgumentReference(this.name);
 
+  @override
   ConstantExpressionKind get kind {
     return ConstantExpressionKind.NAMED_REFERENCE;
   }
 
+  @override
   accept(ConstantExpressionVisitor visitor, [context]) {
     return visitor.visitNamed(this, context);
   }
@@ -1709,6 +1836,7 @@
     sb.write('Named(name=$name)');
   }
 
+  @override
   ConstantExpression apply(NormalizedArguments arguments) {
     return arguments.getNamedArgument(name);
   }
@@ -1720,9 +1848,8 @@
   bool _equals(NamedArgumentReference other) => name == other.name;
 
   @override
-  ConstantValue evaluate(
-      EvaluationEnvironment environment, ConstantSystem constantSystem) {
-    throw new UnsupportedError('NamedArgumentReference.evaluate');
+  ConstantValue evaluate(EvaluationEnvironment environment) {
+    return new NonConstantValue();
   }
 
   @override
@@ -1777,10 +1904,12 @@
       ConstantExpression name, ConstantExpression defaultValue)
       : super(name, defaultValue);
 
+  @override
   ConstantExpressionKind get kind {
     return ConstantExpressionKind.BOOL_FROM_ENVIRONMENT;
   }
 
+  @override
   accept(ConstantExpressionVisitor visitor, [context]) {
     return visitor.visitBoolFromEnvironment(this, context);
   }
@@ -1799,15 +1928,13 @@
   }
 
   @override
-  ConstantValue evaluate(
-      EvaluationEnvironment environment, ConstantSystem constantSystem) {
-    ConstantValue nameConstantValue =
-        name.evaluate(environment, constantSystem);
+  ConstantValue evaluate(EvaluationEnvironment environment) {
+    ConstantValue nameConstantValue = name.evaluate(environment);
     ConstantValue defaultConstantValue;
     if (defaultValue != null) {
-      defaultConstantValue = defaultValue.evaluate(environment, constantSystem);
+      defaultConstantValue = defaultValue.evaluate(environment);
     } else {
-      defaultConstantValue = constantSystem.createBool(false);
+      defaultConstantValue = constant_system.createBool(false);
     }
     if (!nameConstantValue.isConstant || !defaultConstantValue.isConstant) {
       return new NonConstantValue();
@@ -1829,9 +1956,9 @@
       String text =
           environment.readFromEnvironment(nameStringConstantValue.stringValue);
       if (text == 'true') {
-        return constantSystem.createBool(true);
+        return constant_system.createBool(true);
       } else if (text == 'false') {
-        return constantSystem.createBool(false);
+        return constant_system.createBool(false);
       } else {
         return defaultConstantValue;
       }
@@ -1839,6 +1966,7 @@
     return new NonConstantValue();
   }
 
+  @override
   ConstantExpression apply(NormalizedArguments arguments) {
     return new BoolFromEnvironmentConstantExpression(name.apply(arguments),
         defaultValue != null ? defaultValue.apply(arguments) : null);
@@ -1856,10 +1984,12 @@
       ConstantExpression name, ConstantExpression defaultValue)
       : super(name, defaultValue);
 
+  @override
   ConstantExpressionKind get kind {
     return ConstantExpressionKind.INT_FROM_ENVIRONMENT;
   }
 
+  @override
   accept(ConstantExpressionVisitor visitor, [context]) {
     return visitor.visitIntFromEnvironment(this, context);
   }
@@ -1878,15 +2008,13 @@
   }
 
   @override
-  ConstantValue evaluate(
-      EvaluationEnvironment environment, ConstantSystem constantSystem) {
-    ConstantValue nameConstantValue =
-        name.evaluate(environment, constantSystem);
+  ConstantValue evaluate(EvaluationEnvironment environment) {
+    ConstantValue nameConstantValue = name.evaluate(environment);
     ConstantValue defaultConstantValue;
     if (defaultValue != null) {
-      defaultConstantValue = defaultValue.evaluate(environment, constantSystem);
+      defaultConstantValue = defaultValue.evaluate(environment);
     } else {
-      defaultConstantValue = constantSystem.createNull();
+      defaultConstantValue = constant_system.createNull();
     }
     if (!nameConstantValue.isConstant || !defaultConstantValue.isConstant) {
       return new NonConstantValue();
@@ -1914,12 +2042,13 @@
       if (value == null) {
         return defaultConstantValue;
       } else {
-        return constantSystem.createInt(value);
+        return constant_system.createInt(value);
       }
     }
     return new NonConstantValue();
   }
 
+  @override
   ConstantExpression apply(NormalizedArguments arguments) {
     return new IntFromEnvironmentConstantExpression(name.apply(arguments),
         defaultValue != null ? defaultValue.apply(arguments) : null);
@@ -1937,10 +2066,12 @@
       ConstantExpression name, ConstantExpression defaultValue)
       : super(name, defaultValue);
 
+  @override
   ConstantExpressionKind get kind {
     return ConstantExpressionKind.STRING_FROM_ENVIRONMENT;
   }
 
+  @override
   accept(ConstantExpressionVisitor visitor, [context]) {
     return visitor.visitStringFromEnvironment(this, context);
   }
@@ -1959,15 +2090,13 @@
   }
 
   @override
-  ConstantValue evaluate(
-      EvaluationEnvironment environment, ConstantSystem constantSystem) {
-    ConstantValue nameConstantValue =
-        name.evaluate(environment, constantSystem);
+  ConstantValue evaluate(EvaluationEnvironment environment) {
+    ConstantValue nameConstantValue = name.evaluate(environment);
     ConstantValue defaultConstantValue;
     if (defaultValue != null) {
-      defaultConstantValue = defaultValue.evaluate(environment, constantSystem);
+      defaultConstantValue = defaultValue.evaluate(environment);
     } else {
-      defaultConstantValue = constantSystem.createNull();
+      defaultConstantValue = constant_system.createNull();
     }
     if (!nameConstantValue.isConstant || !defaultConstantValue.isConstant) {
       return new NonConstantValue();
@@ -1991,12 +2120,13 @@
       if (text == null) {
         return defaultConstantValue;
       } else {
-        return constantSystem.createString(text);
+        return constant_system.createString(text);
       }
     }
     return new NonConstantValue();
   }
 
+  @override
   ConstantExpression apply(NormalizedArguments arguments) {
     return new StringFromEnvironmentConstantExpression(name.apply(arguments),
         defaultValue != null ? defaultValue.apply(arguments) : null);
@@ -2040,10 +2170,8 @@
   }
 
   @override
-  ConstantValue evaluate(
-      EvaluationEnvironment environment, ConstantSystem constantSystem) {
-    ConstantValue conditionValue =
-        condition.evaluate(environment, constantSystem);
+  ConstantValue evaluate(EvaluationEnvironment environment) {
+    ConstantValue conditionValue = condition.evaluate(environment);
     bool validAssert;
     if (environment.enableAssertions) {
       // Boolean conversion:
@@ -2054,7 +2182,7 @@
     }
     if (!validAssert) {
       if (message != null) {
-        ConstantValue value = message.evaluate(environment, constantSystem);
+        ConstantValue value = message.evaluate(environment);
         if (value is StringConstantValue) {
           String text = '${value.stringValue}';
           environment.reportError(this,
@@ -2080,6 +2208,7 @@
     return visitor.visitAssert(this, context);
   }
 
+  @override
   ConstantExpression apply(NormalizedArguments arguments) {
     return new AssertConstantExpression(
         condition.apply(arguments), message?.apply(arguments));
@@ -2092,6 +2221,7 @@
 
   InstantiationConstantExpression(this.typeArguments, this.expression);
 
+  @override
   ConstantExpressionKind get kind => ConstantExpressionKind.INSTANTIATION;
 
   @override
@@ -2102,12 +2232,11 @@
   }
 
   @override
-  ConstantValue evaluate(
-      EvaluationEnvironment environment, ConstantSystem constantSystem) {
+  ConstantValue evaluate(EvaluationEnvironment environment) {
     List<DartType> typeArgumentsInContext =
         typeArguments.map(environment.getTypeInContext).toList();
-    return new InstantiationConstantValue(typeArgumentsInContext,
-        expression.evaluate(environment, constantSystem));
+    return new InstantiationConstantValue(
+        typeArgumentsInContext, expression.evaluate(environment));
   }
 
   @override
@@ -2115,6 +2244,7 @@
     return Hashing.objectHash(expression, Hashing.listHash(typeArguments));
   }
 
+  @override
   ConstantExpression apply(NormalizedArguments arguments) {
     return new InstantiationConstantExpression(
         typeArguments, expression.apply(arguments));
@@ -2151,6 +2281,7 @@
   R visitString(StringConstantExpression exp, A context);
   R visitNull(NullConstantExpression exp, A context);
   R visitList(ListConstantExpression exp, A context);
+  R visitSet(SetConstantExpression exp, A context);
   R visitMap(MapConstantExpression exp, A context);
   R visitConstructed(ConstructedConstantExpression exp, A context);
   R visitConcatenate(ConcatenateConstantExpression exp, A context);
@@ -2261,6 +2392,15 @@
   }
 
   @override
+  void visitSet(SetConstantExpression exp, [_]) {
+    sb.write('const ');
+    writeTypeArguments(exp.type);
+    sb.write('{');
+    sb.writeAll(exp.values, ', ');
+    sb.write('}');
+  }
+
+  @override
   void visitMap(MapConstantExpression exp, [_]) {
     sb.write('const ');
     writeTypeArguments(exp.type);
@@ -2465,5 +2605,6 @@
     sb.write(')');
   }
 
+  @override
   String toString() => sb.toString();
 }
diff --git a/pkg/compiler/lib/src/constants/values.dart b/pkg/compiler/lib/src/constants/values.dart
index 3d30d3b..ffb7acf 100644
--- a/pkg/compiler/lib/src/constants/values.dart
+++ b/pkg/compiler/lib/src/constants/values.dart
@@ -19,6 +19,7 @@
   BOOL,
   STRING,
   LIST,
+  SET,
   MAP,
   CONSTRUCTED,
   TYPE,
@@ -39,6 +40,7 @@
   R visitBool(covariant BoolConstantValue constant, covariant A arg);
   R visitString(covariant StringConstantValue constant, covariant A arg);
   R visitList(covariant ListConstantValue constant, covariant A arg);
+  R visitSet(covariant SetConstantValue constant, covariant A arg);
   R visitMap(covariant MapConstantValue constant, covariant A arg);
   R visitConstructed(
       covariant ConstructedConstantValue constant, covariant A arg);
@@ -68,6 +70,7 @@
   bool get isNum => false;
   bool get isString => false;
   bool get isList => false;
+  bool get isSet => false;
   bool get isMap => false;
   bool get isConstructedObject => false;
   bool get isFunction => false;
@@ -110,6 +113,7 @@
 
   ConstantValueKind get kind;
 
+  @override
   String toString() {
     assertDebugMode("Use ConstantValue.toDartText() or "
         "ConstantValue.toStructuredText() "
@@ -125,23 +129,31 @@
 
   FunctionConstantValue(this.element, this.type);
 
+  @override
   bool get isFunction => true;
 
+  @override
   bool operator ==(var other) {
     if (other is! FunctionConstantValue) return false;
     return identical(other.element, element);
   }
 
+  @override
   List<ConstantValue> getDependencies() => const <ConstantValue>[];
 
+  @override
   FunctionType getType(CommonElements types) => type;
 
+  @override
   int get hashCode => (17 * element.hashCode) & 0x7fffffff;
 
+  @override
   accept(ConstantValueVisitor visitor, arg) => visitor.visitFunction(this, arg);
 
+  @override
   ConstantValueKind get kind => ConstantValueKind.FUNCTION;
 
+  @override
   String toDartText() {
     if (element.enclosingClass != null) {
       return '${element.enclosingClass.name}.${element.name}';
@@ -150,6 +162,7 @@
     }
   }
 
+  @override
   String toStructuredText() {
     return 'FunctionConstant(${toDartText()})';
   }
@@ -158,16 +171,20 @@
 abstract class PrimitiveConstantValue extends ConstantValue {
   const PrimitiveConstantValue();
 
+  @override
   bool get isPrimitive => true;
 
+  @override
   bool operator ==(var other) {
     // Making this method abstract does not give us an error.
     throw new UnsupportedError('PrimitiveConstant.==');
   }
 
+  @override
   int get hashCode => throw new UnsupportedError('PrimitiveConstant.hashCode');
 
   // Primitive constants don't have dependencies.
+  @override
   List<ConstantValue> getDependencies() => const <ConstantValue>[];
 }
 
@@ -179,27 +196,36 @@
 
   const NullConstantValue._internal();
 
+  @override
   bool get isNull => true;
 
+  @override
   DartType getType(CommonElements types) => types.nullType;
 
+  @override
   bool operator ==(other) => other is NullConstantValue;
 
   // The magic constant has no meaning. It is just a random value.
+  @override
   int get hashCode => 785965825;
 
+  @override
   accept(ConstantValueVisitor visitor, arg) => visitor.visitNull(this, arg);
 
+  @override
   ConstantValueKind get kind => ConstantValueKind.NULL;
 
+  @override
   String toStructuredText() => 'NullConstant';
 
+  @override
   String toDartText() => 'null';
 }
 
 abstract class NumConstantValue extends PrimitiveConstantValue {
   double get doubleValue;
 
+  @override
   bool get isNum => true;
 
   const NumConstantValue();
@@ -212,6 +238,7 @@
   // to create new ones every time those values are used.
   static Map<BigInt, IntConstantValue> _cachedValues = {};
 
+  @override
   double get doubleValue => intValue.toDouble();
 
   factory IntConstantValue(BigInt value) {
@@ -227,6 +254,7 @@
 
   const IntConstantValue._internal(this.intValue);
 
+  @override
   bool get isInt => true;
 
   bool isUInt31() => intValue.toUnsigned(31) == intValue;
@@ -235,12 +263,16 @@
 
   bool isPositive() => intValue >= BigInt.zero;
 
+  @override
   bool get isZero => intValue == BigInt.zero;
 
+  @override
   bool get isOne => intValue == BigInt.one;
 
+  @override
   DartType getType(CommonElements types) => types.intType;
 
+  @override
   bool operator ==(var other) {
     // Ints and doubles are treated as separate constants.
     if (other is! IntConstantValue) return false;
@@ -248,18 +280,24 @@
     return intValue == otherInt.intValue;
   }
 
+  @override
   int get hashCode => intValue.hashCode & Hashing.SMI_MASK;
 
+  @override
   accept(ConstantValueVisitor visitor, arg) => visitor.visitInt(this, arg);
 
+  @override
   ConstantValueKind get kind => ConstantValueKind.INT;
 
+  @override
   String toStructuredText() => 'IntConstant(${toDartText()})';
 
+  @override
   String toDartText() => intValue.toString();
 }
 
 class DoubleConstantValue extends NumConstantValue {
+  @override
   final double doubleValue;
 
   factory DoubleConstantValue(double value) {
@@ -280,23 +318,32 @@
 
   const DoubleConstantValue._internal(this.doubleValue);
 
+  @override
   bool get isDouble => true;
 
+  @override
   bool get isNaN => doubleValue.isNaN;
 
   // We need to check for the negative sign since -0.0 == 0.0.
+  @override
   bool get isMinusZero => doubleValue == 0.0 && doubleValue.isNegative;
 
+  @override
   bool get isZero => doubleValue == 0.0;
 
+  @override
   bool get isOne => doubleValue == 1.0;
 
+  @override
   bool get isPositiveInfinity => doubleValue == double.infinity;
 
+  @override
   bool get isNegativeInfinity => doubleValue == -double.infinity;
 
+  @override
   DartType getType(CommonElements types) => types.doubleType;
 
+  @override
   bool operator ==(var other) {
     if (other is! DoubleConstantValue) return false;
     DoubleConstantValue otherDouble = other;
@@ -310,14 +357,19 @@
     }
   }
 
+  @override
   int get hashCode => doubleValue.hashCode;
 
+  @override
   accept(ConstantValueVisitor visitor, arg) => visitor.visitDouble(this, arg);
 
+  @override
   ConstantValueKind get kind => ConstantValueKind.DOUBLE;
 
+  @override
   String toStructuredText() => 'DoubleConstant(${toDartText()})';
 
+  @override
   String toDartText() => doubleValue.toString();
 }
 
@@ -328,18 +380,23 @@
 
   const BoolConstantValue._internal();
 
+  @override
   bool get isBool => true;
 
   bool get boolValue;
 
+  @override
   DartType getType(CommonElements types) => types.boolType;
 
   BoolConstantValue negate();
 
+  @override
   accept(ConstantValueVisitor visitor, arg) => visitor.visitBool(this, arg);
 
+  @override
   ConstantValueKind get kind => ConstantValueKind.BOOL;
 
+  @override
   String toStructuredText() => 'BoolConstant(${toDartText()})';
 }
 
@@ -348,18 +405,24 @@
 
   const TrueConstantValue._internal() : super._internal();
 
+  @override
   bool get isTrue => true;
 
+  @override
   bool get boolValue => true;
 
+  @override
   FalseConstantValue negate() => new FalseConstantValue();
 
+  @override
   bool operator ==(var other) => identical(this, other);
 
   // The magic constant is just a random value. It does not have any
   // significance.
+  @override
   int get hashCode => 499;
 
+  @override
   String toDartText() => boolValue.toString();
 }
 
@@ -368,24 +431,31 @@
 
   const FalseConstantValue._internal() : super._internal();
 
+  @override
   bool get isFalse => true;
 
+  @override
   bool get boolValue => false;
 
+  @override
   TrueConstantValue negate() => new TrueConstantValue();
 
+  @override
   bool operator ==(var other) => identical(this, other);
 
   // The magic constant is just a random value. It does not have any
   // significance.
+  @override
   int get hashCode => 536555975;
 
+  @override
   String toDartText() => boolValue.toString();
 }
 
 class StringConstantValue extends PrimitiveConstantValue {
   final String stringValue;
 
+  @override
   final int hashCode;
 
   // TODO(floitsch): cache StringConstants.
@@ -393,10 +463,13 @@
       : this.stringValue = value,
         this.hashCode = value.hashCode;
 
+  @override
   bool get isString => true;
 
+  @override
   DartType getType(CommonElements types) => types.stringType;
 
+  @override
   bool operator ==(var other) {
     if (identical(this, other)) return true;
     if (other is! StringConstantValue) return false;
@@ -409,13 +482,17 @@
 
   int get length => stringValue.length;
 
+  @override
   accept(ConstantValueVisitor visitor, arg) => visitor.visitString(this, arg);
 
+  @override
   ConstantValueKind get kind => ConstantValueKind.STRING;
 
   // TODO(johnniwinther): Ensure correct escaping.
+  @override
   String toDartText() => '"${stringValue}"';
 
+  @override
   String toStructuredText() => 'StringConstant(${toDartText()})';
 }
 
@@ -424,8 +501,10 @@
 
   ObjectConstantValue(this.type);
 
+  @override
   bool get isObject => true;
 
+  @override
   DartType getType(CommonElements types) => type;
 
   void _unparseTypeArguments(StringBuffer sb) {
@@ -443,28 +522,37 @@
 
   TypeConstantValue(this.representedType, InterfaceType type) : super(type);
 
+  @override
   bool get isType => true;
 
+  @override
   bool operator ==(other) {
     return other is TypeConstantValue &&
-        representedType == other.representedType;
+        representedType.unaliased == other.representedType.unaliased;
   }
 
-  int get hashCode => representedType.hashCode * 13;
+  @override
+  int get hashCode => representedType.unaliased.hashCode * 13;
 
+  @override
   List<ConstantValue> getDependencies() => const <ConstantValue>[];
 
+  @override
   accept(ConstantValueVisitor visitor, arg) => visitor.visitType(this, arg);
 
+  @override
   ConstantValueKind get kind => ConstantValueKind.TYPE;
 
+  @override
   String toDartText() => '$representedType';
 
+  @override
   String toStructuredText() => 'TypeConstant(${representedType})';
 }
 
 class ListConstantValue extends ObjectConstantValue {
   final List<ConstantValue> entries;
+  @override
   final int hashCode;
 
   ListConstantValue(InterfaceType type, List<ConstantValue> entries)
@@ -472,8 +560,10 @@
         hashCode = Hashing.listHash(entries, Hashing.objectHash(type)),
         super(type);
 
+  @override
   bool get isList => true;
 
+  @override
   bool operator ==(var other) {
     if (identical(this, other)) return true;
     if (other is! ListConstantValue) return false;
@@ -487,14 +577,18 @@
     return true;
   }
 
+  @override
   List<ConstantValue> getDependencies() => entries;
 
   int get length => entries.length;
 
+  @override
   accept(ConstantValueVisitor visitor, arg) => visitor.visitList(this, arg);
 
+  @override
   ConstantValueKind get kind => ConstantValueKind.LIST;
 
+  @override
   String toDartText() {
     StringBuffer sb = new StringBuffer();
     _unparseTypeArguments(sb);
@@ -507,6 +601,7 @@
     return sb.toString();
   }
 
+  @override
   String toStructuredText() {
     StringBuffer sb = new StringBuffer();
     sb.write('ListConstant(');
@@ -521,9 +616,70 @@
   }
 }
 
-class MapConstantValue extends ObjectConstantValue {
+abstract class SetConstantValue extends ObjectConstantValue {
+  final List<ConstantValue> values;
+  @override
+  final int hashCode;
+
+  SetConstantValue(InterfaceType type, List<ConstantValue> values)
+      : values = values,
+        hashCode = Hashing.listHash(values, Hashing.objectHash(type)),
+        super(type);
+
+  @override
+  bool get isSet => true;
+
+  @override
+  bool operator ==(var other) {
+    if (identical(this, other)) return true;
+    if (other is! SetConstantValue) return false;
+    SetConstantValue otherSet = other;
+    if (hashCode != otherSet.hashCode) return false;
+    if (type != otherSet.type) return false;
+    if (length != otherSet.length) return false;
+    for (int i = 0; i < values.length; i++) {
+      if (values[i] != otherSet.values[i]) return false;
+    }
+    return true;
+  }
+
+  @override
+  List<ConstantValue> getDependencies() => values;
+
+  int get length => values.length;
+
+  @override
+  accept(ConstantValueVisitor visitor, arg) => visitor.visitSet(this, arg);
+
+  @override
+  String toDartText() {
+    StringBuffer sb = new StringBuffer();
+    _unparseTypeArguments(sb);
+    sb.write('{');
+    sb.writeAll(values.map((v) => v.toDartText()), ',');
+    sb.write('}');
+    return sb.toString();
+  }
+
+  @override
+  String toStructuredText() {
+    StringBuffer sb = new StringBuffer();
+    sb.write('SetConstant(');
+    _unparseTypeArguments(sb);
+    sb.write('{');
+    sb.writeAll(values.map((v) => v.toStructuredText()), ', ');
+    sb.write('})');
+    return sb.toString();
+  }
+
+  @override
+  ConstantValueKind get kind => ConstantValueKind.SET;
+}
+
+abstract class MapConstantValue extends ObjectConstantValue {
   final List<ConstantValue> keys;
   final List<ConstantValue> values;
+  @override
   final int hashCode;
   Map<ConstantValue, ConstantValue> _lookupMap;
 
@@ -537,8 +693,10 @@
     assert(keys.length == values.length);
   }
 
+  @override
   bool get isMap => true;
 
+  @override
   bool operator ==(var other) {
     if (identical(this, other)) return true;
     if (other is! MapConstantValue) return false;
@@ -553,6 +711,7 @@
     return true;
   }
 
+  @override
   List<ConstantValue> getDependencies() {
     List<ConstantValue> result = <ConstantValue>[];
     result.addAll(keys);
@@ -568,10 +727,13 @@
     return lookupMap[key];
   }
 
+  @override
   accept(ConstantValueVisitor visitor, arg) => visitor.visitMap(this, arg);
 
+  @override
   ConstantValueKind get kind => ConstantValueKind.MAP;
 
+  @override
   String toDartText() {
     StringBuffer sb = new StringBuffer();
     _unparseTypeArguments(sb);
@@ -586,6 +748,7 @@
     return sb.toString();
   }
 
+  @override
   String toStructuredText() {
     StringBuffer sb = new StringBuffer();
     sb.write('MapConstant(');
@@ -609,28 +772,37 @@
 
   InterceptorConstantValue(this.cls);
 
+  @override
   bool get isInterceptor => true;
 
+  @override
   bool operator ==(other) {
     return other is InterceptorConstantValue && cls == other.cls;
   }
 
+  @override
   int get hashCode => cls.hashCode * 43;
 
+  @override
   List<ConstantValue> getDependencies() => const <ConstantValue>[];
 
+  @override
   accept(ConstantValueVisitor visitor, arg) {
     return visitor.visitInterceptor(this, arg);
   }
 
+  @override
   DartType getType(CommonElements types) => types.dynamicType;
 
+  @override
   ConstantValueKind get kind => ConstantValueKind.INTERCEPTOR;
 
+  @override
   String toDartText() {
     return 'interceptor($cls)';
   }
 
+  @override
   String toStructuredText() {
     return 'InterceptorConstant(${cls.name})';
   }
@@ -642,26 +814,35 @@
 
   SyntheticConstantValue(this.valueKind, this.payload);
 
+  @override
   bool get isDummy => true;
 
+  @override
   bool operator ==(other) {
     return other is SyntheticConstantValue && payload == other.payload;
   }
 
+  @override
   get hashCode => payload.hashCode * 17 + valueKind.hashCode;
 
+  @override
   List<ConstantValue> getDependencies() => const <ConstantValue>[];
 
+  @override
   accept(ConstantValueVisitor visitor, arg) {
     return visitor.visitSynthetic(this, arg);
   }
 
+  @override
   DartType getType(CommonElements types) => types.dynamicType;
 
+  @override
   ConstantValueKind get kind => ConstantValueKind.SYNTHETIC;
 
+  @override
   String toDartText() => 'synthetic($valueKind, $payload)';
 
+  @override
   String toStructuredText() => 'SyntheticConstant($valueKind, $payload)';
 }
 
@@ -669,6 +850,7 @@
   // TODO(johnniwinther): Make [fields] private to avoid misuse of the map
   // ordering and mutability.
   final Map<FieldEntity, ConstantValue> fields;
+  @override
   final int hashCode;
 
   ConstructedConstantValue(
@@ -681,8 +863,10 @@
     assert(!fields.containsValue(null));
   }
 
+  @override
   bool get isConstructedObject => true;
 
+  @override
   bool operator ==(var otherVar) {
     if (identical(this, otherVar)) return true;
     if (otherVar is! ConstructedConstantValue) return false;
@@ -696,18 +880,22 @@
     return true;
   }
 
+  @override
   List<ConstantValue> getDependencies() => fields.values.toList();
 
+  @override
   accept(ConstantValueVisitor visitor, arg) {
     return visitor.visitConstructed(this, arg);
   }
 
+  @override
   ConstantValueKind get kind => ConstantValueKind.CONSTRUCTED;
 
   Iterable<FieldEntity> get _fieldsSortedByName {
     return fields.keys.toList()..sort((a, b) => a.name.compareTo(b.name));
   }
 
+  @override
   String toDartText() {
     StringBuffer sb = new StringBuffer();
     sb.write(type.element.name);
@@ -726,6 +914,7 @@
     return sb.toString();
   }
 
+  @override
   String toStructuredText() {
     StringBuffer sb = new StringBuffer();
     sb.write('ConstructedConstant(');
@@ -751,6 +940,7 @@
 
   InstantiationConstantValue(this.typeArguments, this.function);
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     return other is InstantiationConstantValue &&
@@ -763,21 +953,27 @@
     return Hashing.objectHash(function, Hashing.listHash(typeArguments));
   }
 
+  @override
   List<ConstantValue> getDependencies() => <ConstantValue>[function];
 
+  @override
   accept(ConstantValueVisitor visitor, arg) =>
       visitor.visitInstantiation(this, arg);
 
+  @override
   DartType getType(CommonElements types) {
     FunctionType type = function.getType(types);
     return type.instantiate(typeArguments);
   }
 
+  @override
   ConstantValueKind get kind => ConstantValueKind.INSTANTIATION;
 
+  @override
   String toDartText() =>
       '<${typeArguments.join(', ')}>(${function.toDartText()})';
 
+  @override
   String toStructuredText() {
     return 'InstantiationConstant($typeArguments,'
         '${function.toStructuredText()})';
@@ -804,25 +1000,33 @@
 
   bool get isReference => true;
 
+  @override
   bool operator ==(other) {
     return other is DeferredGlobalConstantValue &&
         referenced == other.referenced &&
         unit == other.unit;
   }
 
+  @override
   get hashCode => (referenced.hashCode * 17 + unit.hashCode) & 0x3fffffff;
 
+  @override
   List<ConstantValue> getDependencies() => <ConstantValue>[referenced];
 
+  @override
   accept(ConstantValueVisitor visitor, arg) =>
       visitor.visitDeferredGlobal(this, arg);
 
+  @override
   DartType getType(CommonElements types) => referenced.getType(types);
 
+  @override
   ConstantValueKind get kind => ConstantValueKind.DEFERRED_GLOBAL;
 
+  @override
   String toDartText() => 'deferred_global(${referenced.toDartText()})';
 
+  @override
   String toStructuredText() {
     return 'DeferredGlobalConstant(${referenced.toStructuredText()})';
   }
@@ -832,6 +1036,7 @@
 /// expression.
 // TODO(johnniwinther): Expand this to contain the error kind.
 class NonConstantValue extends ConstantValue {
+  @override
   bool get isConstant => false;
 
   @override
@@ -845,6 +1050,7 @@
   @override
   DartType getType(CommonElements types) => types.dynamicType;
 
+  @override
   ConstantValueKind get kind => ConstantValueKind.NON_CONSTANT;
 
   @override
diff --git a/pkg/compiler/lib/src/dart2js.dart b/pkg/compiler/lib/src/dart2js.dart
index 50b8aeb..c829eaa 100644
--- a/pkg/compiler/lib/src/dart2js.dart
+++ b/pkg/compiler/lib/src/dart2js.dart
@@ -127,7 +127,7 @@
   bool showHints;
   bool enableColors;
   int optimizationLevel = null;
-  Uri platformBinaries = fe.computePlatformBinariesLocation();
+  Uri platformBinaries;
   Map<String, String> environment = new Map<String, String>();
   CompilationStrategy compilationStrategy = CompilationStrategy.direct;
 
@@ -250,12 +250,18 @@
       fail("Cannot read and write serialized simultaneously.");
     }
     if (argument != Flags.readData) {
-      readDataUri = currentDirectory
-          .resolve(nativeToUriPath(extractPath(argument, isDirectory: false)));
+      readDataUri = nativeToUri(extractPath(argument, isDirectory: false));
     }
     compilationStrategy = CompilationStrategy.fromData;
   }
 
+  void setDillDependencies(String argument) {
+    String dependencies = extractParameter(argument);
+    String uriDependencies = dependencies.splitMapJoin(',',
+        onMatch: (_) => ',', onNonMatch: (p) => '${nativeToUri(p)}');
+    options.add('${Flags.dillDependencies}=${uriDependencies}');
+  }
+
   void setCfeOnly(String argument) {
     compilationStrategy = CompilationStrategy.toKernel;
   }
@@ -265,12 +271,24 @@
       fail("Cannot read and write serialized simultaneously.");
     }
     if (argument != Flags.writeData) {
-      writeDataUri = currentDirectory
-          .resolve(nativeToUriPath(extractPath(argument, isDirectory: false)));
+      writeDataUri = nativeToUri(extractPath(argument, isDirectory: false));
     }
     compilationStrategy = CompilationStrategy.toData;
   }
 
+  void setDumpInfo(String argument) {
+    passThrough(Flags.dumpInfo);
+    if (argument == Flags.dumpInfo || argument == "${Flags.dumpInfo}=json") {
+      return;
+    }
+    if (argument == "${Flags.dumpInfo}=binary") {
+      passThrough(argument);
+      return;
+    }
+    helpAndFail("Error: Unsupported dump-info format '$argument', "
+        "supported formats are: json or binary");
+  }
+
   void handleThrowOnError(String argument) {
     throwOnError = true;
     String parameter = extractParameter(argument, isOptionalArgument: true);
@@ -328,9 +346,11 @@
     new OptionHandler(Flags.version, (_) => wantVersion = true),
     new OptionHandler('--library-root=.+', ignoreOption),
     new OptionHandler('--libraries-spec=.+', setLibrarySpecificationUri),
+    new OptionHandler('${Flags.dillDependencies}=.+', setDillDependencies),
     new OptionHandler('${Flags.readData}|${Flags.readData}=.+', setReadData),
     new OptionHandler('${Flags.writeData}|${Flags.writeData}=.+', setWriteData),
     new OptionHandler(Flags.cfeOnly, setCfeOnly),
+    new OptionHandler(Flags.debugGlobalInference, passThrough),
     new OptionHandler('--out=.+|-o.*', setOutput, multipleArguments: true),
     new OptionHandler('-O.*', setOptimizationLevel),
     new OptionHandler(Flags.allowMockCompilation, ignoreOption),
@@ -372,12 +392,12 @@
     new OptionHandler('--deferred-map=.+', passThrough),
     new OptionHandler(Flags.newDeferredSplit, passThrough),
     new OptionHandler(Flags.reportInvalidInferredDeferredTypes, passThrough),
-    new OptionHandler(Flags.dumpInfo, passThrough),
+    new OptionHandler('${Flags.dumpInfo}|${Flags.dumpInfo}=.+', setDumpInfo),
     new OptionHandler('--disallow-unsafe-eval', ignoreOption),
     new OptionHandler(Option.showPackageWarnings, passThrough),
     new OptionHandler(Option.enableLanguageExperiments, passThrough),
     new OptionHandler(Flags.useContentSecurityPolicy, passThrough),
-    new OptionHandler(Flags.enableExperimentalMirrors, passThrough),
+    new OptionHandler('--enable-experimental-mirrors', ignoreOption),
     new OptionHandler(Flags.enableAssertMessage, passThrough),
     new OptionHandler('--strong', ignoreOption),
     new OptionHandler(Flags.previewDart2, ignoreOption),
@@ -407,10 +427,11 @@
     new OptionHandler(Flags.experimentalTrackAllocations, passThrough),
     new OptionHandler("${Flags.experimentalAllocationsPath}=.+", passThrough),
 
-    new OptionHandler(Flags.experimentLocalNames, passThrough),
+    new OptionHandler(Flags.experimentLocalNames, ignoreOption),
     new OptionHandler(Flags.experimentStartupFunctions, passThrough),
     new OptionHandler(Flags.experimentToBoolean, passThrough),
     new OptionHandler(Flags.experimentCallInstrumentation, passThrough),
+    new OptionHandler(Flags.experimentNewRti, passThrough),
 
     // The following three options must come last.
     new OptionHandler('-D.+=.*', addInEnvironment),
@@ -650,6 +671,7 @@
 class AbortLeg {
   final message;
   AbortLeg(this.message);
+  @override
   toString() => 'Aborted due to --throw-on-error: $message';
 }
 
@@ -874,10 +896,10 @@
     Generates a json file with a mapping from each deferred import to a list of
     the part.js files that will be loaded.
 
-  --dump-info
-    Generates an out.info.json file with information about the generated code.
-    You can inspect the generated file with the viewer at:
-        https://dart-lang.github.io/dump-info-visualizer/
+  --dump-info[=<format>]
+    Generates information about the generated code. 'format' can be either
+    'json' or 'binary'.
+    You can inspect the generated data using tools from 'package:dart2js_info'.
 
   --generate-code-with-compile-time-errors
     Generates output even if the program contains compile-time errors. Use the
diff --git a/pkg/compiler/lib/src/deferred_load.dart b/pkg/compiler/lib/src/deferred_load.dart
index d2fd134..a412c65 100644
--- a/pkg/compiler/lib/src/deferred_load.dart
+++ b/pkg/compiler/lib/src/deferred_load.dart
@@ -8,7 +8,8 @@
 
 import 'common/tasks.dart' show CompilerTask;
 import 'common.dart';
-import 'common_elements.dart' show ElementEnvironment, KElementEnvironment;
+import 'common_elements.dart'
+    show CommonElements, ElementEnvironment, KElementEnvironment;
 import 'compiler.dart' show Compiler;
 import 'constants/values.dart'
     show
@@ -51,6 +52,7 @@
 
   OutputUnit(this.isMainOutput, this.name, this._imports);
 
+  @override
   int compareTo(OutputUnit other) {
     if (identical(this, other)) return 0;
     if (isMainOutput && !other.isMainOutput) return -1;
@@ -76,6 +78,7 @@
 
   Set<ImportEntity> get importsForTesting => _imports;
 
+  @override
   String toString() => "OutputUnit($name, $_imports)";
 }
 
@@ -83,7 +86,7 @@
 /// import is loaded. Elements that are used by several deferred imports are in
 /// shared OutputUnits.
 abstract class DeferredLoadTask extends CompilerTask {
-  /// The name of this task.
+  @override
   String get name => 'Deferred Loading';
 
   /// The OutputUnit that will be loaded when the program starts.
@@ -142,6 +145,9 @@
 
   KElementEnvironment get elementEnvironment =>
       compiler.frontendStrategy.elementEnvironment;
+
+  CommonElements get commonElements => compiler.frontendStrategy.commonElements;
+
   DiagnosticReporter get reporter => compiler.reporter;
 
   /// Given [imports] that refer to an element from a library, determine whether
@@ -245,42 +251,17 @@
   void collectConstantsInBody(MemberEntity element, Dependencies dependencies);
 
   /// Recursively collects all the dependencies of [type].
-  void _collectTypeDependencies(DartType type, Dependencies dependencies) {
-    if (type is FunctionType) {
-      _collectFunctionTypeDependencies(type, dependencies);
-    } else if (type is TypedefType) {
-      _collectTypeArgumentDependencies(type.typeArguments, dependencies);
-      _collectTypeDependencies(type.unaliased, dependencies);
-    } else if (type is InterfaceType) {
-      _collectTypeArgumentDependencies(type.typeArguments, dependencies);
-      // TODO(sigmund): when we are able to split classes from types in our
-      // runtime-type representation, this should track type.element as a type
-      // dependency instead.
-      dependencies.addClass(type.element);
-    }
+  void _collectTypeDependencies(DartType type, Dependencies dependencies,
+      [ImportEntity import]) {
+    new TypeDependencyVisitor(dependencies, import, commonElements).visit(type);
   }
 
   void _collectTypeArgumentDependencies(
-      Iterable<DartType> typeArguments, Dependencies dependencies) {
+      Iterable<DartType> typeArguments, Dependencies dependencies,
+      [ImportEntity import]) {
     if (typeArguments == null) return;
-    typeArguments.forEach((t) => _collectTypeDependencies(t, dependencies));
-  }
-
-  void _collectFunctionTypeDependencies(
-      FunctionType type, Dependencies dependencies) {
-    for (FunctionTypeVariable typeVariable in type.typeVariables) {
-      _collectTypeDependencies(typeVariable.bound, dependencies);
-    }
-    for (DartType argumentType in type.parameterTypes) {
-      _collectTypeDependencies(argumentType, dependencies);
-    }
-    for (DartType argumentType in type.optionalParameterTypes) {
-      _collectTypeDependencies(argumentType, dependencies);
-    }
-    for (DartType argumentType in type.namedParameterTypes) {
-      _collectTypeDependencies(argumentType, dependencies);
-    }
-    _collectTypeDependencies(type.returnType, dependencies);
+    new TypeDependencyVisitor(dependencies, import, commonElements)
+        .visitList(typeArguments);
   }
 
   /// Extract any dependencies that are known from the impact of [element].
@@ -299,8 +280,7 @@
                 failedAt(usedEntity, "Unexpected static use $staticUse."));
             KLocalFunction localFunction = usedEntity;
             // TODO(sra): Consult KClosedWorld to see if signature is needed.
-            _collectFunctionTypeDependencies(
-                localFunction.functionType, dependencies);
+            _collectTypeDependencies(localFunction.functionType, dependencies);
             dependencies.localFunctions.add(localFunction);
           }
           switch (staticUse.kind) {
@@ -336,6 +316,10 @@
                     interface.element, typeUse.deferredImport);
               }
               break;
+            case TypeUseKind.CONST_INSTANTIATION:
+              _collectTypeDependencies(
+                  type, dependencies, typeUse.deferredImport);
+              break;
             case TypeUseKind.INSTANTIATION:
             case TypeUseKind.NATIVE_INSTANTIATION:
             case TypeUseKind.IS_CHECK:
@@ -605,14 +589,6 @@
     });
   }
 
-  /// Adds extra dependencies coming from mirror usage.
-  void addDeferredMirrorElements(WorkQueue queue);
-
-  /// Add extra dependencies coming from mirror usage in [root] marking it with
-  /// [newSet].
-  void addMirrorElementsForLibrary(
-      WorkQueue queue, LibraryEntity root, ImportSet newSet);
-
   /// Computes a unique string for the name field for each outputUnit.
   void _createOutputUnits() {
     int counter = 1;
@@ -1092,6 +1068,7 @@
     return result;
   }
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write('ImportSet(size: $length, ');
@@ -1200,6 +1177,7 @@
 
   ClassWorkItem(this.cls, ImportSet newSet) : super(newSet);
 
+  @override
   void update(DeferredLoadTask task, WorkQueue queue) {
     queue.pendingClasses.remove(cls);
     ImportSet oldSet = task._classToSet[cls];
@@ -1215,6 +1193,7 @@
 
   MemberWorkItem(this.member, ImportSet newSet) : super(newSet);
 
+  @override
   void update(DeferredLoadTask task, WorkQueue queue) {
     queue.pendingMembers.remove(member);
     ImportSet oldSet = task._memberToSet[member];
@@ -1230,6 +1209,7 @@
 
   ConstantWorkItem(this.constant, ImportSet newSet) : super(newSet);
 
+  @override
   void update(DeferredLoadTask task, WorkQueue queue) {
     queue.pendingConstants.remove(constant);
     ImportSet oldSet = task._constantToSet[constant];
@@ -1459,6 +1439,21 @@
     return outputUnitTo._imports.containsAll(outputUnitFrom._imports);
   }
 
+  /// Returns `true` if constant [to] is reachable from element [from] without
+  /// crossing a deferred import.
+  ///
+  /// For example, if we have two deferred libraries `A` and `B` that both
+  /// import a library `C`, then even though elements from `A` and `C` end up in
+  /// different output units, there is a non-deferred path between `A` and `C`.
+  bool hasOnlyNonDeferredImportPathsToConstant(
+      MemberEntity from, ConstantValue to) {
+    OutputUnit outputUnitFrom = outputUnitForMember(from);
+    OutputUnit outputUnitTo = outputUnitForConstant(to);
+    if (outputUnitTo == mainOutputUnit) return true;
+    if (outputUnitFrom == mainOutputUnit) return false;
+    return outputUnitTo._imports.containsAll(outputUnitFrom._imports);
+  }
+
   /// Registers that a constant is used in the same deferred output unit as
   /// [field].
   void registerConstantDeferredUse(
@@ -1583,3 +1578,72 @@
     }
   }
 }
+
+class TypeDependencyVisitor implements DartTypeVisitor<void, Null> {
+  final Dependencies _dependencies;
+  final ImportEntity _import;
+  final CommonElements _commonElements;
+
+  TypeDependencyVisitor(this._dependencies, this._import, this._commonElements);
+
+  @override
+  void visit(DartType type, [_]) {
+    type.accept(this, null);
+  }
+
+  void visitList(List<DartType> types) {
+    types.forEach(visit);
+  }
+
+  @override
+  void visitFutureOrType(FutureOrType type, Null argument) {
+    _dependencies.addClass(_commonElements.futureClass);
+    visit(type.typeArgument);
+  }
+
+  @override
+  void visitDynamicType(DynamicType type, Null argument) {
+    // Nothing to add.
+  }
+
+  @override
+  void visitTypedefType(TypedefType type, Null argument) {
+    visitList(type.typeArguments);
+    visit(type.unaliased);
+  }
+
+  @override
+  void visitInterfaceType(InterfaceType type, Null argument) {
+    visitList(type.typeArguments);
+    // TODO(sigmund): when we are able to split classes from types in our
+    // runtime-type representation, this should track type.element as a type
+    // dependency instead.
+    _dependencies.addClass(type.element, _import);
+  }
+
+  @override
+  void visitFunctionType(FunctionType type, Null argument) {
+    for (FunctionTypeVariable typeVariable in type.typeVariables) {
+      visit(typeVariable.bound);
+    }
+    visitList(type.parameterTypes);
+    visitList(type.optionalParameterTypes);
+    visitList(type.namedParameterTypes);
+    visit(type.returnType);
+  }
+
+  @override
+  void visitFunctionTypeVariable(FunctionTypeVariable type, Null argument) {
+    // Nothing to add. Handled in [visitFunctionType].
+  }
+
+  @override
+  void visitTypeVariableType(TypeVariableType type, Null argument) {
+    // TODO(johnniwinther): Do we need to collect the bound?
+  }
+
+  @override
+  void visitVoidType(VoidType type, Null argument) {
+    // Nothing to add.
+  }
+}
diff --git a/pkg/compiler/lib/src/diagnostics/code_location.dart b/pkg/compiler/lib/src/diagnostics/code_location.dart
index 63fee22..8e923f9 100644
--- a/pkg/compiler/lib/src/diagnostics/code_location.dart
+++ b/pkg/compiler/lib/src/diagnostics/code_location.dart
@@ -40,10 +40,12 @@
 
   SchemeLocation(this.uri);
 
+  @override
   bool inSameLocation(Uri uri) {
     return this.uri.scheme == uri.scheme;
   }
 
+  @override
   String relativize(Uri baseUri) {
     return uri_extras.relativize(baseUri, uri, false);
   }
@@ -58,10 +60,12 @@
 
   PackageLocation(this.packageName);
 
+  @override
   bool inSameLocation(Uri uri) {
     return uri.scheme == 'package' && uri.path.startsWith('$packageName/');
   }
 
+  @override
   String relativize(Uri baseUri) => 'package:$packageName';
 }
 
@@ -73,8 +77,10 @@
 
   UriLocation(this.uri);
 
+  @override
   bool inSameLocation(Uri uri) => this.uri == uri;
 
+  @override
   String relativize(Uri baseUri) {
     return uri_extras.relativize(baseUri, uri, false);
   }
@@ -84,7 +90,9 @@
 class AnyLocation implements CodeLocation {
   const AnyLocation();
 
+  @override
   bool inSameLocation(Uri uri) => true;
 
+  @override
   String relativize(Uri baseUri) => '$baseUri';
 }
diff --git a/pkg/compiler/lib/src/diagnostics/messages.dart b/pkg/compiler/lib/src/diagnostics/messages.dart
index a3532c9..d04410f 100644
--- a/pkg/compiler/lib/src/diagnostics/messages.dart
+++ b/pkg/compiler/lib/src/diagnostics/messages.dart
@@ -88,6 +88,7 @@
   LIBRARY_NOT_FOUND,
   MIRRORS_LIBRARY_NOT_SUPPORT_WITH_CFE,
   MISSING_EXPRESSION_IN_THROW,
+  NATIVE_NON_INSTANCE_IN_NON_NATIVE_CLASS,
   NO_SUCH_SUPER_MEMBER,
   NON_NATIVE_EXTERNAL,
   NOT_A_COMPILE_TIME_CONSTANT,
@@ -607,7 +608,7 @@
 
       MessageKind.INVALID_LOGICAL_OR_OPERAND_TYPE: const MessageTemplate(
           MessageKind.INVALID_LOGICAL_OR_OPERAND_TYPE,
-          "`#{constant}` of type '#{type}' is not a valid logical and operand. "
+          "`#{constant}` of type '#{type}' is not a valid logical or operand. "
           "Must be a value of type 'bool'."),
 
       MessageKind.INVALID_CONSTANT_CONSTRUCTOR: const MessageTemplate(
@@ -677,6 +678,10 @@
               "Try removing 'external' keyword or annotating the function "
               "as a js-interop function."),
 
+      MessageKind.NATIVE_NON_INSTANCE_IN_NON_NATIVE_CLASS: const MessageTemplate(
+          MessageKind.NATIVE_NON_INSTANCE_IN_NON_NATIVE_CLASS,
+          "Native non-instance members are only allowed in native classes."),
+
       // TODO(32557): Remove these when issue 32557 is fixed.
       MessageKind.SWITCH_CASE_VALUE_OVERRIDES_EQUALS: const MessageTemplate(
           MessageKind.SWITCH_CASE_VALUE_OVERRIDES_EQUALS,
@@ -692,6 +697,7 @@
           "'case' expression of type '#{type}'."),
     }); // End of TEMPLATES.
 
+  @override
   String toString() => template;
 
   Message message([Map arguments = const {}, bool terse = false]) {
@@ -738,15 +744,18 @@
     return message;
   }
 
+  @override
   String toString() {
     return computeMessage();
   }
 
+  @override
   bool operator ==(other) {
     if (other is! Message) return false;
     return (template == other.template) && (toString() == other.toString());
   }
 
+  @override
   int get hashCode => throw new UnsupportedError('Message.hashCode');
 
   static String convertToString(value) {
diff --git a/pkg/compiler/lib/src/diagnostics/source_span.dart b/pkg/compiler/lib/src/diagnostics/source_span.dart
index 3fffc29..2b24c11 100644
--- a/pkg/compiler/lib/src/diagnostics/source_span.dart
+++ b/pkg/compiler/lib/src/diagnostics/source_span.dart
@@ -13,15 +13,18 @@
 
   const SourceSpan(this.uri, this.begin, this.end);
 
+  @override
   int get hashCode {
     return 13 * uri.hashCode + 17 * begin.hashCode + 19 * end.hashCode;
   }
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! SourceSpan) return false;
     return uri == other.uri && begin == other.begin && end == other.end;
   }
 
+  @override
   String toString() => 'SourceSpan($uri, $begin, $end)';
 }
diff --git a/pkg/compiler/lib/src/diagnostics/spannable.dart b/pkg/compiler/lib/src/diagnostics/spannable.dart
index cdba684..356e2e4 100644
--- a/pkg/compiler/lib/src/diagnostics/spannable.dart
+++ b/pkg/compiler/lib/src/diagnostics/spannable.dart
@@ -14,6 +14,7 @@
 
   const _SpannableSentinel(this.name);
 
+  @override
   String toString() => name;
 }
 
@@ -33,6 +34,7 @@
   final String message;
   SpannableAssertionFailure(this.node, this.message);
 
+  @override
   String toString() => 'Assertion failure'
       '${message != null ? ': $message' : ''}';
 }
diff --git a/pkg/compiler/lib/src/dump_info.dart b/pkg/compiler/lib/src/dump_info.dart
index d3f9c4d..35be4dd 100644
--- a/pkg/compiler/lib/src/dump_info.dart
+++ b/pkg/compiler/lib/src/dump_info.dart
@@ -8,6 +8,8 @@
     show ChunkedConversionSink, JsonEncoder, StringConversionSink;
 
 import 'package:dart2js_info/info.dart';
+import 'package:dart2js_info/json_info_codec.dart';
+import 'package:dart2js_info/binary_serialization.dart' as dump_info;
 
 import '../compiler_new.dart';
 import 'common/names.dart';
@@ -16,16 +18,18 @@
 import 'common_elements.dart' show JElementEnvironment;
 import 'compiler.dart' show Compiler;
 import 'constants/values.dart' show ConstantValue, InterceptorConstantValue;
-import 'deferred_load.dart' show OutputUnit;
+import 'deferred_load.dart' show OutputUnit, deferredPartFileName;
 import 'elements/entities.dart';
 import 'inferrer/abstract_value_domain.dart';
 import 'inferrer/types.dart'
     show GlobalTypeInferenceMemberResult, GlobalTypeInferenceResults;
 import 'js/js.dart' as jsAst;
 import 'js_backend/js_backend.dart' show JavaScriptBackend;
+import 'js_backend/field_analysis.dart';
 import 'universe/codegen_world_builder.dart';
 import 'universe/world_impact.dart'
     show ImpactUseCase, WorldImpact, WorldImpactVisitorImpl;
+import 'util/sink_adapter.dart';
 import 'world.dart' show JClosedWorld;
 
 class ElementInfoCollector {
@@ -48,11 +52,11 @@
   void run() {
     dumpInfoTask._constantToNode.forEach((constant, node) {
       // TODO(sigmund): add dependencies on other constants
-      var size = dumpInfoTask._nodeData[node].length;
-      var code = jsAst.prettyPrint(node,
-          enableMinification: compiler.options.enableMinification);
+      var span = dumpInfoTask._nodeData[node];
       var info = new ConstantInfo(
-          size: size, code: code, outputUnit: _unitInfoForConstant(constant));
+          size: span.end - span.start,
+          code: [span],
+          outputUnit: _unitInfoForConstant(constant));
       _constantToInfo[constant] = info;
       result.constants.add(info);
     });
@@ -124,7 +128,7 @@
     }
 
     int size = dumpInfoTask.sizeOf(field);
-    String code = dumpInfoTask.codeOf(field);
+    List<CodeSpan> code = dumpInfoTask.codeOf(field);
 
     // TODO(het): Why doesn't `size` account for the code size already?
     if (code != null) size += code.length;
@@ -137,9 +141,9 @@
         outputUnit: _unitInfoForMember(field),
         isConst: field.isConst);
     _entityToInfo[field] = info;
-    if (codegenWorldBuilder.hasConstantFieldInitializer(field)) {
-      info.initializer = _constantToInfo[
-          codegenWorldBuilder.getConstantFieldInitializer(field)];
+    FieldAnalysisData fieldData = closedWorld.fieldAnalysis.getFieldData(field);
+    if (fieldData.initialValue != null) {
+      info.initializer = _constantToInfo[fieldData.initialValue];
     }
 
     if (compiler.options.experimentCallInstrumentation) {
@@ -261,7 +265,7 @@
           : false,
       isExternal: function.isExternal,
     );
-    String code = dumpInfoTask.codeOf(function);
+    List<CodeSpan> code = dumpInfoTask.codeOf(function);
 
     List<ParameterInfo> parameters = <ParameterInfo>[];
     List<String> inferredParameterTypes = <String>[];
@@ -340,8 +344,11 @@
       // emitter is used it will fail here.
       JavaScriptBackend backend = compiler.backend;
       assert(outputUnit.name != null || outputUnit.isMainOutput);
-      OutputUnitInfo info = new OutputUnitInfo(
-          outputUnit.name, backend.emitter.emitter.generatedSize(outputUnit));
+      var filename = outputUnit.isMainOutput
+          ? compiler.options.outputUri.pathSegments.last
+          : deferredPartFileName(compiler.options, outputUnit.name);
+      OutputUnitInfo info = new OutputUnitInfo(filename, outputUnit.name,
+          backend.emitter.emitter.generatedSize(outputUnit));
       info.imports
           .addAll(closedWorld.outputUnitData.getImportNames(outputUnit));
       result.outputUnits.add(info);
@@ -389,11 +396,13 @@
 class DumpInfoTask extends CompilerTask implements InfoReporter {
   static const ImpactUseCase IMPACT_USE = const ImpactUseCase('Dump info');
   final Compiler compiler;
+  final bool useBinaryFormat;
 
-  DumpInfoTask(Compiler compiler)
-      : compiler = compiler,
+  DumpInfoTask(this.compiler)
+      : useBinaryFormat = compiler.options.useDumpInfoBinaryFormat,
         super(compiler.measurer);
 
+  @override
   String get name => "Dump Info";
 
   ElementInfoCollector infoCollector;
@@ -404,7 +413,7 @@
   /// Data associated with javascript AST nodes. The map only contains keys for
   /// nodes that we care about.  Keys are automatically added when
   /// [registerEntityAst] is called.
-  final Map<jsAst.Node, _CodeData> _nodeData = <jsAst.Node, _CodeData>{};
+  final Map<jsAst.Node, CodeSpan> _nodeData = <jsAst.Node, CodeSpan>{};
 
   // A mapping from Dart Entities to Javascript AST Nodes.
   final Map<Entity, List<jsAst.Node>> _entityToNodes =
@@ -425,6 +434,7 @@
     _programSize = programSize;
   }
 
+  @override
   void reportInlined(FunctionEntity element, MemberEntity inlinedFrom) {
     inlineCount.putIfAbsent(element, () => 0);
     inlineCount[element] += 1;
@@ -475,7 +485,7 @@
       _entityToNodes
           .putIfAbsent(entity, () => new List<jsAst.Node>())
           .add(code);
-      _nodeData[code] ??= _CodeData();
+      _nodeData[code] ??= useBinaryFormat ? new CodeSpan() : new _CodeData();
     }
   }
 
@@ -484,34 +494,39 @@
       assert(_constantToNode[constant] == null ||
           _constantToNode[constant] == code);
       _constantToNode[constant] = code;
-      _nodeData[code] ??= _CodeData();
+      _nodeData[code] ??= useBinaryFormat ? new CodeSpan() : new _CodeData();
     }
   }
 
+  bool get shouldEmitText => !useBinaryFormat;
   // TODO(sigmund): delete the stack once we stop emitting the source text.
   List<_CodeData> _stack = [];
   void enterNode(jsAst.Node node, int start) {
     var data = _nodeData[node];
-    if (data != null) {
+    data?.start = start;
+
+    if (shouldEmitText && data != null) {
       _stack.add(data);
-      data.start = start;
     }
   }
 
   void emit(String string) {
-    // Note: historically we emitted the full body of classes and methods, so
-    // instance methods ended up emitted twice.  Once we use a different
-    // encoding of dump info, we also plan to remove this duplication.
-    _stack.forEach((f) => f.text.write(string));
+    if (shouldEmitText) {
+      // Note: historically we emitted the full body of classes and methods, so
+      // instance methods ended up emitted twice.  Once we use a different
+      // encoding of dump info, we also plan to remove this duplication.
+      _stack.forEach((f) => f._text.write(string));
+    }
   }
 
   void exitNode(jsAst.Node node, int start, int end, int closing) {
     var data = _nodeData[node];
-    if (data == null) return;
-    var last = _stack.removeLast();
-    assert(data == last);
-    assert(data.start == start);
-    data.end = end;
+    data?.end = end;
+    if (shouldEmitText && data != null) {
+      var last = _stack.removeLast();
+      assert(data == last);
+      assert(data.start == start);
+    }
   }
 
   /// Returns the size of the source code that was generated for an entity.
@@ -524,17 +539,16 @@
     }
   }
 
-  int sizeOfNode(jsAst.Node node) => _nodeData[node].length ?? 0;
+  int sizeOfNode(jsAst.Node node) {
+    CodeSpan span = _nodeData[node];
+    if (span == null) return 0;
+    return span.end - span.start;
+  }
 
-  String codeOf(Entity entity) {
+  List<CodeSpan> codeOf(MemberEntity entity) {
     List<jsAst.Node> code = _entityToNodes[entity];
-    if (code == null) return null;
-    // Concatenate rendered ASTs.
-    StringBuffer sb = new StringBuffer();
-    for (jsAst.Node ast in code) {
-      sb.writeln(_nodeData[ast].text);
-    }
-    return sb.toString();
+    if (code == null) return const [];
+    return code.map((ast) => _nodeData[ast]).toList();
   }
 
   void dumpInfo(JClosedWorld closedWorld,
@@ -543,20 +557,46 @@
       infoCollector = new ElementInfoCollector(
           compiler, this, closedWorld, globalInferenceResults)
         ..run();
-      StringBuffer jsonBuffer = new StringBuffer();
-      dumpInfoJson(jsonBuffer, closedWorld);
-      compiler.outputProvider.createOutputSink(
-          compiler.options.outputUri.pathSegments.last,
-          'info.json',
-          OutputType.dumpInfo)
-        ..add(jsonBuffer.toString())
-        ..close();
-      BasicInfo.resetIds();
+
+      var allInfo = buildDumpInfoData(closedWorld);
+      if (useBinaryFormat) {
+        dumpInfoBinary(allInfo);
+      } else {
+        dumpInfoJson(allInfo);
+      }
     });
   }
 
-  void dumpInfoJson(StringSink buffer, JClosedWorld closedWorld) {
+  void dumpInfoJson(AllInfo data) {
+    StringBuffer jsonBuffer = new StringBuffer();
     JsonEncoder encoder = const JsonEncoder.withIndent('  ');
+    ChunkedConversionSink<Object> sink = encoder.startChunkedConversion(
+        new StringConversionSink.fromStringSink(jsonBuffer));
+    sink.add(new AllInfoJsonCodec(isBackwardCompatible: true).encode(data));
+    compiler.outputProvider.createOutputSink(
+        compiler.options.outputUri.pathSegments.last,
+        'info.json',
+        OutputType.dumpInfo)
+      ..add(jsonBuffer.toString())
+      ..close();
+    compiler.reporter.reportInfo(NO_LOCATION_SPANNABLE, MessageKind.GENERIC, {
+      'text': "View the dumped .info.json file at "
+          "https://dart-lang.github.io/dump-info-visualizer"
+    });
+  }
+
+  void dumpInfoBinary(AllInfo data) {
+    var name = compiler.options.outputUri.pathSegments.last + ".info.data";
+    Sink<List<int>> sink = new BinaryOutputSinkAdapter(compiler.outputProvider
+        .createBinarySink(compiler.options.outputUri.resolve(name)));
+    dump_info.encode(data, sink);
+    compiler.reporter.reportInfo(NO_LOCATION_SPANNABLE, MessageKind.GENERIC, {
+      'text': "Use `package:dart2js_info` to parse and process the dumped "
+          ".info.data file."
+    });
+  }
+
+  AllInfo buildDumpInfoData(JClosedWorld closedWorld) {
     Stopwatch stopwatch = new Stopwatch();
     stopwatch.start();
 
@@ -573,8 +613,8 @@
         // Don't register dart2js builtin functions that are not recorded.
         Info useInfo = infoCollector._entityToInfo[selection.selectedEntity];
         if (useInfo == null) continue;
-        info.uses.add(
-            new DependencyInfo(useInfo, '${selection.receiverConstraint}'));
+        info.uses.add(new DependencyInfo(
+            useInfo, selection.receiverConstraint?.toString()));
       }
     }
 
@@ -588,8 +628,8 @@
       for (Selection selection in uses) {
         Info useInfo = infoCollector._entityToInfo[selection.selectedEntity];
         if (useInfo == null) continue;
-        info.uses.add(
-            new DependencyInfo(useInfo, '${selection.receiverConstraint}'));
+        info.uses.add(new DependencyInfo(
+            useInfo, selection.receiverConstraint?.toString()));
       }
     }
 
@@ -629,24 +669,15 @@
         isMirrorsUsed: closedWorld.backendUsage.isMirrorsUsed,
         minified: compiler.options.enableMinification);
 
-    ChunkedConversionSink<Object> sink = encoder.startChunkedConversion(
-        new StringConversionSink.fromStringSink(buffer));
-    sink.add(new AllInfoJsonCodec().encode(result));
-    compiler.reporter.reportInfo(NO_LOCATION_SPANNABLE, MessageKind.GENERIC, {
-      'text': "View the dumped .info.json file at "
-          "https://dart-lang.github.io/dump-info-visualizer"
-    });
+    return result;
   }
 }
 
 /// Helper class to store what dump-info will show for a piece of code.
-///
-/// Currently we print out the actual text, in the future, we will only emit
-/// start and end offsets.
-class _CodeData {
-  int start;
-  int end;
-  StringBuffer text = new StringBuffer();
-
+// TODO(sigmund): delete once we no longer emit text by default.
+class _CodeData extends CodeSpan {
+  StringBuffer _text = new StringBuffer();
+  @override
+  String get text => '$_text';
   int get length => end - start;
 }
diff --git a/pkg/compiler/lib/src/elements/entities.dart b/pkg/compiler/lib/src/elements/entities.dart
index a3a5c4d..a621644 100644
--- a/pkg/compiler/lib/src/elements/entities.dart
+++ b/pkg/compiler/lib/src/elements/entities.dart
@@ -53,6 +53,7 @@
 
   ImportEntity(this.isDeferred, this.name, this.uri, this.enclosingLibraryUri);
 
+  @override
   String toString() => 'import($name:${isDeferred ? ' deferred' : ''})';
 }
 
@@ -196,6 +197,7 @@
   const AsyncMarker._(this.asyncParserState,
       {this.isAsync: false, this.isYielding: false});
 
+  @override
   String toString() {
     return '${isAsync ? 'async' : 'sync'}${isYielding ? '*' : ''}';
   }
@@ -326,6 +328,7 @@
         namedParameters, typeParameters);
   }
 
+  @override
   int get hashCode => Hashing.listHash(
       namedParameters,
       Hashing.objectHash(
@@ -333,6 +336,7 @@
           Hashing.objectHash(
               requiredParameters, Hashing.objectHash(typeParameters))));
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! ParameterStructure) return false;
@@ -368,6 +372,7 @@
     return sb.toString();
   }
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write('ParameterStructure(');
diff --git a/pkg/compiler/lib/src/elements/indexed.dart b/pkg/compiler/lib/src/elements/indexed.dart
index 56defb0..e83b8a0 100644
--- a/pkg/compiler/lib/src/elements/indexed.dart
+++ b/pkg/compiler/lib/src/elements/indexed.dart
@@ -13,18 +13,21 @@
 abstract class IndexedLibrary extends _Indexed implements LibraryEntity {
   /// Library index used for fast lookup in [KernelToElementMapBase].
   int get libraryIndex => _index;
+  @override
   int get hashCode => 7 * _index + 2;
 }
 
 abstract class IndexedClass extends _Indexed implements ClassEntity {
   /// Class index used for fast lookup in [KernelToElementMapBase].
   int get classIndex => _index;
+  @override
   int get hashCode => 7 * _index + 1;
 }
 
 abstract class IndexedMember extends _Indexed implements MemberEntity {
   /// Member index used for fast lookup in [KernelToElementMapBase].
   int get memberIndex => _index;
+  @override
   int get hashCode => 7 * _index;
 }
 
diff --git a/pkg/compiler/lib/src/elements/jumps.dart b/pkg/compiler/lib/src/elements/jumps.dart
index 05a25e7..53bf887 100644
--- a/pkg/compiler/lib/src/elements/jumps.dart
+++ b/pkg/compiler/lib/src/elements/jumps.dart
@@ -20,6 +20,7 @@
 /// A jump target is the reference point of a statement or switch-case,
 /// either by label or as the default target of a break or continue.
 abstract class JumpTarget extends Local {
+  @override
   String get name => 'target';
 
   bool get isTarget => isBreakTarget || isContinueTarget;
diff --git a/pkg/compiler/lib/src/elements/names.dart b/pkg/compiler/lib/src/elements/names.dart
index dd60ab4..0a004de 100644
--- a/pkg/compiler/lib/src/elements/names.dart
+++ b/pkg/compiler/lib/src/elements/names.dart
@@ -61,57 +61,77 @@
 }
 
 class PublicName implements Name {
+  @override
   final String text;
+  @override
   final bool isSetter;
 
   const PublicName(this.text, {this.isSetter: false});
 
+  @override
   Name get getter => isSetter ? new PublicName(text) : this;
 
+  @override
   Name get setter => isSetter ? this : new PublicName(text, isSetter: true);
 
+  @override
   bool isAccessibleFrom(LibraryEntity element) => true;
 
+  @override
   bool get isPrivate => false;
 
+  @override
   int get hashCode => similarHashCode;
 
+  @override
   bool operator ==(other) {
     if (other is! PublicName) return false;
     return isSimilarTo(other);
   }
 
+  @override
   bool isSimilarTo(Name other) =>
       text == other.text && isSetter == other.isSetter;
+  @override
   int get similarHashCode => text.hashCode + 11 * isSetter.hashCode;
 
+  @override
   LibraryEntity get library => null;
 
+  @override
   String toString() => isSetter ? '$text=' : text;
 }
 
 class PrivateName extends PublicName {
+  @override
   final LibraryEntity library;
 
   PrivateName(String text, this.library, {bool isSetter: false})
       : super(text, isSetter: isSetter);
 
+  @override
   Name get getter => isSetter ? new PrivateName(text, library) : this;
 
+  @override
   Name get setter {
     return isSetter ? this : new PrivateName(text, library, isSetter: true);
   }
 
+  @override
   bool isAccessibleFrom(LibraryEntity element) => library == element;
 
+  @override
   bool get isPrivate => true;
 
+  @override
   int get hashCode => super.hashCode + 13 * library.hashCode;
 
+  @override
   bool operator ==(other) {
     if (other is! PrivateName) return false;
     return super == (other) && library == other.library;
   }
 
+  @override
   String toString() => '${library.name}#${super.toString()}';
 }
diff --git a/pkg/compiler/lib/src/elements/operators.dart b/pkg/compiler/lib/src/elements/operators.dart
index ddc9cff3..e3fc7d9 100644
--- a/pkg/compiler/lib/src/elements/operators.dart
+++ b/pkg/compiler/lib/src/elements/operators.dart
@@ -26,6 +26,7 @@
   Selector get selector => new Selector(SelectorKind.OPERATOR,
       new PublicName(selectorName), CallStructure.NO_ARGS);
 
+  @override
   String toString() => name;
 
   /// The unary ! operator.
@@ -102,6 +103,7 @@
 
   String get selectorName => name;
 
+  @override
   String toString() => name;
 
   /// The == operator.
@@ -297,8 +299,10 @@
 class _NotEqualsOperator extends BinaryOperator {
   const _NotEqualsOperator() : super._(BinaryOperatorKind.NOT_EQ, '!=');
 
+  @override
   bool get isUserDefinable => false;
 
+  @override
   String get selectorName => '==';
 }
 
@@ -308,8 +312,10 @@
   const _LogicalOperator(BinaryOperatorKind kind, String name)
       : super._(kind, name);
 
+  @override
   bool get isUserDefinable => false;
 
+  @override
   String get selectorName => null;
 }
 
@@ -318,7 +324,9 @@
   const _IfNullOperator(BinaryOperatorKind kind, String name)
       : super._(kind, name);
 
+  @override
   bool get isUserDefinable => false;
 
+  @override
   String get selectorName => '??';
 }
diff --git a/pkg/compiler/lib/src/elements/types.dart b/pkg/compiler/lib/src/elements/types.dart
index d42f31a..ef7c2f8 100644
--- a/pkg/compiler/lib/src/elements/types.dart
+++ b/pkg/compiler/lib/src/elements/types.dart
@@ -144,6 +144,7 @@
     return _assumptionMap[a]?.contains(b) ?? false;
   }
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write('_Assumptions(');
@@ -165,25 +166,31 @@
 
   InterfaceType(this.element, this.typeArguments);
 
+  @override
   bool get isInterfaceType => true;
 
+  @override
   bool get isObject {
     return element.name == 'Object' &&
         element.library.canonicalUri == Uris.dart_core;
   }
 
+  @override
   bool get containsTypeVariables =>
       typeArguments.any((type) => type.containsTypeVariables);
 
+  @override
   void forEachTypeVariable(f(TypeVariableType variable)) {
     typeArguments.forEach((type) => type.forEachTypeVariable(f));
   }
 
+  @override
   bool _containsFreeTypeVariables(List<FunctionTypeVariable> bindings) {
     return typeArguments
         .any((type) => type._containsFreeTypeVariables(bindings));
   }
 
+  @override
   InterfaceType subst(List<DartType> arguments, List<DartType> parameters) {
     if (typeArguments.isEmpty) {
       // Return fast on non-generic types.
@@ -203,6 +210,7 @@
     return this;
   }
 
+  @override
   bool get treatAsRaw {
     for (DartType type in typeArguments) {
       if (!type.treatAsDynamic) return false;
@@ -214,6 +222,7 @@
   R accept<R, A>(DartTypeVisitor<R, A> visitor, A argument) =>
       visitor.visitInterfaceType(this, argument);
 
+  @override
   int get hashCode {
     int hash = element.hashCode;
     for (DartType argument in typeArguments) {
@@ -223,12 +232,14 @@
     return hash;
   }
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! InterfaceType) return false;
     return _equalsInternal(other, null);
   }
 
+  @override
   bool _equals(DartType other, _Assumptions assumptions) {
     if (identical(this, other)) return true;
     if (other is! InterfaceType) return false;
@@ -240,6 +251,7 @@
         _equalTypes(typeArguments, other.typeArguments, assumptions);
   }
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write(element.name);
@@ -262,22 +274,28 @@
 class TypedefType extends DartType {
   final TypedefEntity element;
   final List<DartType> typeArguments;
+  @override
   final FunctionType unaliased;
 
   TypedefType(this.element, this.typeArguments, this.unaliased);
 
+  @override
   bool get isTypedef => true;
 
+  @override
   bool get containsTypeVariables =>
       typeArguments.any((type) => type.containsTypeVariables);
 
+  @override
   void forEachTypeVariable(f(TypeVariableType variable)) {
     typeArguments.forEach((type) => type.forEachTypeVariable(f));
   }
 
+  @override
   bool _containsFreeTypeVariables(List<FunctionTypeVariable> bindings) =>
       typeArguments.any((type) => type._containsFreeTypeVariables(bindings));
 
+  @override
   TypedefType subst(List<DartType> arguments, List<DartType> parameters) {
     if (typeArguments.isEmpty) {
       // Return fast on non-generic types.
@@ -299,6 +317,7 @@
     return this;
   }
 
+  @override
   bool get treatAsRaw {
     for (DartType type in typeArguments) {
       if (!type.treatAsDynamic) return false;
@@ -310,6 +329,7 @@
   R accept<R, A>(DartTypeVisitor<R, A> visitor, A argument) =>
       visitor.visitTypedefType(this, argument);
 
+  @override
   int get hashCode {
     int hash = element.hashCode;
     for (DartType argument in typeArguments) {
@@ -319,12 +339,14 @@
     return hash;
   }
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! TypedefType) return false;
     return _equalsInternal(other, null);
   }
 
+  @override
   bool _equals(DartType other, _Assumptions assumptions) {
     if (identical(this, other)) return true;
     if (other is! TypedefType) return false;
@@ -336,6 +358,7 @@
         _equalTypes(typeArguments, other.typeArguments, assumptions);
   }
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write(element.name);
@@ -360,16 +383,21 @@
 
   TypeVariableType(this.element);
 
+  @override
   bool get isTypeVariable => true;
 
+  @override
   bool get containsTypeVariables => true;
 
+  @override
   void forEachTypeVariable(f(TypeVariableType variable)) {
     f(this);
   }
 
+  @override
   bool _containsFreeTypeVariables(List<FunctionTypeVariable> bindings) => true;
 
+  @override
   DartType subst(List<DartType> arguments, List<DartType> parameters) {
     assert(arguments.length == parameters.length);
     if (parameters.isEmpty) {
@@ -388,8 +416,10 @@
   R accept<R, A>(DartTypeVisitor<R, A> visitor, A argument) =>
       visitor.visitTypeVariableType(this, argument);
 
+  @override
   int get hashCode => 17 * element.hashCode;
 
+  @override
   bool operator ==(other) {
     if (other is! TypeVariableType) return false;
     return identical(other.element, element);
@@ -403,6 +433,7 @@
     return false;
   }
 
+  @override
   String toString() => '${element.typeDeclaration.name}.${element.name}';
 }
 
@@ -438,12 +469,14 @@
   @override
   bool get isFunctionTypeVariable => true;
 
+  @override
   bool _containsFreeTypeVariables(List<FunctionTypeVariable> bindings) {
     if (bindings == null) return true;
     if (bindings.indexOf(this) >= 0) return false;
     return true;
   }
 
+  @override
   DartType subst(List<DartType> arguments, List<DartType> parameters) {
     assert(arguments.length == parameters.length);
     if (parameters.isEmpty) {
@@ -458,8 +491,10 @@
     return this;
   }
 
+  @override
   int get hashCode => index.hashCode * 19;
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! FunctionTypeVariable) return false;
@@ -478,14 +513,17 @@
   R accept<R, A>(DartTypeVisitor<R, A> visitor, A argument) =>
       visitor.visitFunctionTypeVariable(this, argument);
 
+  @override
   String toString() => '#${new String.fromCharCode(0x41 + index)}';
 }
 
 class VoidType extends DartType {
   const VoidType();
 
+  @override
   bool get isVoid => true;
 
+  @override
   DartType subst(List<DartType> arguments, List<DartType> parameters) {
     // `void` cannot be substituted.
     return this;
@@ -495,6 +533,7 @@
   R accept<R, A>(DartTypeVisitor<R, A> visitor, A argument) =>
       visitor.visitVoidType(this, argument);
 
+  @override
   int get hashCode => 6007;
 
   @override
@@ -502,6 +541,7 @@
     return identical(this, other);
   }
 
+  @override
   String toString() => 'void';
 }
 
@@ -514,6 +554,7 @@
   @override
   bool get treatAsDynamic => true;
 
+  @override
   DartType subst(List<DartType> arguments, List<DartType> parameters) {
     // `dynamic` cannot be substituted.
     return this;
@@ -523,6 +564,7 @@
   R accept<R, A>(DartTypeVisitor<R, A> visitor, A argument) =>
       visitor.visitDynamicType(this, argument);
 
+  @override
   int get hashCode => 91;
 
   @override
@@ -530,6 +572,7 @@
     return identical(this, other);
   }
 
+  @override
   String toString() => 'dynamic';
 }
 
@@ -565,6 +608,7 @@
     assert(!typeVariables.contains(null), "Invalid type variables in $this.");
   }
 
+  @override
   bool get containsTypeVariables {
     return typeVariables.any((type) => type.bound.containsTypeVariables) ||
         returnType.containsTypeVariables ||
@@ -573,6 +617,7 @@
         namedParameterTypes.any((type) => type.containsTypeVariables);
   }
 
+  @override
   void forEachTypeVariable(f(TypeVariableType variable)) {
     typeVariables.forEach((type) => type.bound.forEachTypeVariable(f));
     returnType.forEachTypeVariable(f);
@@ -581,6 +626,7 @@
     namedParameterTypes.forEach((type) => type.forEachTypeVariable(f));
   }
 
+  @override
   bool _containsFreeTypeVariables(List<FunctionTypeVariable> bindings) {
     int restore;
     if (typeVariables.isNotEmpty) {
@@ -604,8 +650,10 @@
     return result;
   }
 
+  @override
   bool get isFunctionType => true;
 
+  @override
   DartType subst(List<DartType> arguments, List<DartType> parameters) {
     if (parameters.isEmpty) {
       assert(arguments.isEmpty);
@@ -669,6 +717,7 @@
   R accept<R, A>(DartTypeVisitor<R, A> visitor, A argument) =>
       visitor.visitFunctionType(this, argument);
 
+  @override
   int get hashCode {
     int hash = 3 * returnType.hashCode;
     for (DartType parameter in parameterTypes) {
@@ -686,12 +735,14 @@
     return hash;
   }
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! FunctionType) return false;
     return _equalsInternal(other, null);
   }
 
+  @override
   bool _equals(DartType other, _Assumptions assumptions) {
     if (identical(this, other)) return true;
     if (other is! FunctionType) return false;
@@ -728,6 +779,7 @@
     return result;
   }
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write(returnType);
@@ -811,26 +863,33 @@
     return new FutureOrType(newTypeArgument);
   }
 
+  @override
   bool get containsTypeVariables => typeArgument.containsTypeVariables;
 
+  @override
   void forEachTypeVariable(f(TypeVariableType variable)) {
     typeArgument.forEachTypeVariable(f);
   }
 
+  @override
   bool _containsFreeTypeVariables(List<FunctionTypeVariable> bindings) =>
       typeArgument._containsFreeTypeVariables(bindings);
 
+  @override
   R accept<R, A>(DartTypeVisitor<R, A> visitor, A argument) =>
       visitor.visitFutureOrType(this, argument);
 
+  @override
   int get hashCode => typeArgument.hashCode * 13;
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! FutureOrType) return false;
     return _equalsInternal(other, null);
   }
 
+  @override
   bool _equals(DartType other, _Assumptions assumptions) {
     if (identical(this, other)) return true;
     if (other is! FutureOrType) return false;
@@ -841,6 +900,7 @@
     return typeArgument._equals(other.typeArgument, assumptions);
   }
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write('FutureOr');
@@ -964,10 +1024,12 @@
   /// Returns the declared bound of [element].
   DartType getTypeVariableBound(TypeVariableEntity element);
 
+  @override
   bool visitType(T t, T s) {
     throw 'internal error: unknown type ${t}';
   }
 
+  @override
   bool visitVoidType(VoidType t, T s) {
     assert(s is! VoidType);
     return false;
@@ -983,6 +1045,7 @@
 
   bool invalidCallableType(covariant DartType callType, covariant DartType s);
 
+  @override
   bool visitInterfaceType(InterfaceType t, covariant DartType s) {
     ensureResolved(t);
 
@@ -1015,6 +1078,7 @@
     return false;
   }
 
+  @override
   bool visitFunctionType(FunctionType t, DartType s) {
     if (s == commonElements.functionType) {
       return true;
@@ -1141,6 +1205,7 @@
     return true;
   }
 
+  @override
   bool visitTypeVariableType(TypeVariableType t, T s) {
     // Identity check is handled in [isSubtype].
     DartType bound = getTypeVariableBound(t.element);
@@ -1168,6 +1233,7 @@
     return true;
   }
 
+  @override
   bool visitFunctionTypeVariable(FunctionTypeVariable t, DartType s) {
     if (!s.isFunctionTypeVariable) return false;
     return assumptions.isAssumed(t, s);
@@ -1194,27 +1260,33 @@
     return t.accept(this, s);
   }
 
+  @override
   bool invalidTypeArguments(T t, T s) {
     return !isMoreSpecific(t, s);
   }
 
+  @override
   bool invalidFunctionReturnTypes(T t, T s) {
     if (s.treatAsDynamic && t.isVoid) return true;
     return !s.isVoid && !isMoreSpecific(t, s);
   }
 
+  @override
   bool invalidFunctionParameterTypes(T t, T s) {
     return !isMoreSpecific(t, s);
   }
 
+  @override
   bool invalidTypeVariableBounds(T bound, T s) {
     return !isMoreSpecific(bound, s);
   }
 
+  @override
   bool invalidCallableType(covariant DartType callType, covariant DartType s) {
     return !isMoreSpecific(callType, s);
   }
 
+  @override
   bool visitFutureOrType(FutureOrType t, covariant DartType s) {
     return false;
   }
@@ -1244,26 +1316,32 @@
     return isSubtype(t, s) || isSubtype(s, t);
   }
 
+  @override
   bool invalidTypeArguments(T t, T s) {
     return !isSubtype(t, s);
   }
 
+  @override
   bool invalidFunctionReturnTypes(T t, T s) {
     return !isSubtype(t, s);
   }
 
+  @override
   bool invalidFunctionParameterTypes(T t, T s) {
     return !isSubtype(s, t);
   }
 
+  @override
   bool invalidTypeVariableBounds(T bound, T s) {
     return !isSubtype(bound, s);
   }
 
+  @override
   bool invalidCallableType(covariant DartType callType, covariant DartType s) {
     return !isSubtype(callType, s);
   }
 
+  @override
   bool visitFutureOrType(FutureOrType t, covariant DartType s) {
     if (s.isFutureOr) {
       FutureOrType sFutureOr = s;
@@ -1280,6 +1358,7 @@
     extends SubtypeVisitor<T> {
   bool _assumeInstantiations = true;
 
+  @override
   bool isSubtype(DartType t, DartType s) {
     if (t is TypeVariableType || s is TypeVariableType) {
       return true;
@@ -1291,6 +1370,7 @@
     return super.isSubtype(t, s);
   }
 
+  @override
   int getCommonTypeVariablesCount(FunctionType t, FunctionType s) {
     if (t.typeVariables.length == s.typeVariables.length) {
       return t.typeVariables.length;
diff --git a/pkg/compiler/lib/src/enqueue.dart b/pkg/compiler/lib/src/enqueue.dart
index 4defca5..ef66b6e 100644
--- a/pkg/compiler/lib/src/enqueue.dart
+++ b/pkg/compiler/lib/src/enqueue.dart
@@ -39,6 +39,7 @@
   CodegenEnqueuer codegenEnqueuerForTesting;
   final Compiler compiler;
 
+  @override
   String get name => 'Enqueue';
 
   EnqueueTask(Compiler compiler)
@@ -189,12 +190,14 @@
 
   ImpactStrategy get impactStrategy => _impactStrategy;
 
+  @override
   void open(ImpactStrategy impactStrategy, FunctionEntity mainMethod,
       Iterable<Uri> libraries) {
     _impactStrategy = impactStrategy;
     listener.onQueueOpen(this, mainMethod, libraries);
   }
 
+  @override
   void close() {
     // TODO(johnniwinther): Set [_impactStrategy] to `null` and [queueIsClosed]
     // to `true` here.
@@ -224,9 +227,11 @@
   static const ImpactUseCase IMPACT_USE =
       const ImpactUseCase('ResolutionEnqueuer');
 
+  @override
   final CompilerTask task;
   final String name;
   final CompilerOptions _options;
+  @override
   final EnqueuerListener listener;
 
   final Set<ClassEntity> _recentClasses = new Setlet<ClassEntity>();
@@ -235,6 +240,7 @@
   final WorkItemBuilder _workItemBuilder;
   final DiagnosticReporter _reporter;
 
+  @override
   bool queueIsClosed = false;
 
   WorldImpactVisitor _impactVisitor;
@@ -251,8 +257,10 @@
     _impactVisitor = new EnqueuerImplImpactVisitor(this);
   }
 
+  @override
   ResolutionWorldBuilder get worldBuilder => _worldBuilder;
 
+  @override
   bool get queueIsEmpty => _queue.isEmpty;
 
   @override
@@ -262,8 +270,10 @@
     }
   }
 
+  @override
   Iterable<ClassEntity> get processedClasses => _worldBuilder.processedClasses;
 
+  @override
   void applyImpact(WorldImpact worldImpact, {var impactSource}) {
     if (worldImpact.isEmpty) return;
     impactStrategy.visitImpact(
@@ -283,12 +293,14 @@
     });
   }
 
+  @override
   bool checkNoEnqueuedInvokedInstanceMethods(
       ElementEnvironment elementEnvironment) {
     if (Enqueuer.skipEnqueuerCheckForTesting) return true;
     return checkEnqueuerConsistency(elementEnvironment);
   }
 
+  @override
   void checkClass(ClassEntity cls) {
     _worldBuilder.processClassMembers(cls,
         (MemberEntity member, EnumSet<MemberUse> useSet) {
@@ -296,7 +308,7 @@
         _reporter.internalError(member,
             'Unenqueued use of $member: ${useSet.iterable(MemberUse.values)}');
       }
-    });
+    }, dryRun: true);
   }
 
   /// Callback for applying the use of a [member].
@@ -330,12 +342,14 @@
     }
   }
 
+  @override
   void processDynamicUse(DynamicUse dynamicUse) {
     task.measure(() {
       _worldBuilder.registerDynamicUse(dynamicUse, _applyMemberUse);
     });
   }
 
+  @override
   void processConstantUse(ConstantUse constantUse) {
     task.measure(() {
       if (_worldBuilder.registerConstantUse(constantUse)) {
@@ -346,6 +360,7 @@
     });
   }
 
+  @override
   void processStaticUse(StaticUse staticUse) {
     _worldBuilder.registerStaticUse(staticUse, _applyMemberUse);
     // TODO(johnniwinther): Add `ResolutionWorldBuilder.registerConstructorUse`
@@ -367,10 +382,12 @@
     }
   }
 
+  @override
   void processTypeUse(TypeUse typeUse) {
     DartType type = typeUse.type;
     switch (typeUse.kind) {
       case TypeUseKind.INSTANTIATION:
+      case TypeUseKind.CONST_INSTANTIATION:
         _registerInstantiatedType(type, globalDependency: false);
         break;
       case TypeUseKind.NATIVE_INSTANTIATION:
@@ -439,6 +456,7 @@
         _queue.isNotEmpty || _recentClasses.isNotEmpty || _recentConstants);
   }
 
+  @override
   void forEach(void f(WorkItem work)) {
     _forEach(f);
     if (onEmptyForTesting != null) {
@@ -447,18 +465,23 @@
     }
   }
 
+  @override
   void logSummary(void log(String message)) {
     log('Resolved ${processedEntities.length} elements.');
     listener.logSummary(log);
   }
 
+  @override
   String toString() => 'Enqueuer($name)';
 
+  @override
   Iterable<MemberEntity> get processedEntities =>
       _worldBuilder.processedMembers;
 
+  @override
   ImpactUseCase get impactUse => IMPACT_USE;
 
+  @override
   bool get isResolutionQueue => true;
 
   /// Registers [entity] as processed by the resolution enqueuer. Used only for
diff --git a/pkg/compiler/lib/src/environment.dart b/pkg/compiler/lib/src/environment.dart
index 29c9861..67db9ac 100644
--- a/pkg/compiler/lib/src/environment.dart
+++ b/pkg/compiler/lib/src/environment.dart
@@ -13,4 +13,7 @@
   /// Note that `bool.fromEnvironment` and `int.fromEnvironment` are also
   /// implemented in terms of `String.fromEnvironment`.
   String valueOf(String key);
+
+  /// Returns the full environment as map.
+  Map<String, String> toMap();
 }
diff --git a/pkg/compiler/lib/src/filenames.dart b/pkg/compiler/lib/src/filenames.dart
index 32aca53..be671f9 100644
--- a/pkg/compiler/lib/src/filenames.dart
+++ b/pkg/compiler/lib/src/filenames.dart
@@ -31,4 +31,7 @@
 
 final Uri currentDirectory = Uri.base;
 
+Uri nativeToUri(String filename) =>
+    currentDirectory.resolve(nativeToUriPath(filename));
+
 String appendSlash(String path) => path.endsWith('/') ? path : '$path/';
diff --git a/pkg/compiler/lib/src/frontend_strategy.dart b/pkg/compiler/lib/src/frontend_strategy.dart
index 23a1cee..4d0e320 100644
--- a/pkg/compiler/lib/src/frontend_strategy.dart
+++ b/pkg/compiler/lib/src/frontend_strategy.dart
@@ -13,7 +13,7 @@
 import 'elements/types.dart';
 import 'enqueue.dart';
 import 'js_backend/annotations.dart';
-import 'js_backend/allocator_analysis.dart' show KAllocatorAnalysis;
+import 'js_backend/field_analysis.dart' show KFieldAnalysis;
 import 'js_backend/backend_usage.dart';
 import 'js_backend/interceptor_data.dart';
 import 'js_backend/native_data.dart';
@@ -45,7 +45,7 @@
   DartTypes get dartTypes;
 
   /// Returns the [AnnotationProcessor] for this strategy.
-  AnnotationProcessor get annotationProcesser;
+  AnnotationProcessor get annotationProcessor;
 
   NativeBasicData get nativeBasicData;
 
@@ -70,7 +70,7 @@
       InterceptorDataBuilder interceptorDataBuilder,
       BackendUsageBuilder backendUsageBuilder,
       RuntimeTypesNeedBuilder rtiNeedBuilder,
-      KAllocatorAnalysis allocatorAnalysis,
+      KFieldAnalysis allocatorAnalysis,
       NativeResolutionEnqueuer nativeResolutionEnqueuer,
       NoSuchMethodRegistry noSuchMethodRegistry,
       AnnotationsDataBuilder annotationsDataBuilder,
@@ -85,7 +85,8 @@
       NativeDataBuilder nativeDataBuilder,
       AnnotationsDataBuilder annotationsDataBuilder,
       ImpactTransformer impactTransformer,
-      Map<Entity, WorldImpact> impactCache);
+      Map<Entity, WorldImpact> impactCache,
+      KFieldAnalysis fieldAnalysis);
 
   /// Computes the main function from [mainLibrary] adding additional world
   /// impact to [impactBuilder].
@@ -116,6 +117,7 @@
       new NativeBasicDataBuilderImpl();
   NativeBasicData _nativeBasicData;
 
+  @override
   NativeBasicData get nativeBasicData {
     if (_nativeBasicData == null) {
       _nativeBasicData = nativeBasicDataBuilder.close(elementEnvironment);
diff --git a/pkg/compiler/lib/src/helpers/debug_collection.dart b/pkg/compiler/lib/src/helpers/debug_collection.dart
index c7b9f79..1636e9e 100644
--- a/pkg/compiler/lib/src/helpers/debug_collection.dart
+++ b/pkg/compiler/lib/src/helpers/debug_collection.dart
@@ -21,15 +21,20 @@
     putIfAbsentCallback = value;
   }
 
+  @override
   Map<RK, RV> cast<RK, RV>() => Map.castFrom<K, V, RK, RV>(this);
+  @override
   bool containsValue(Object value) {
     return sourceMap.containsValue(value);
   }
 
+  @override
   bool containsKey(Object key) => sourceMap.containsKey(key);
 
+  @override
   V operator [](Object key) => sourceMap[key];
 
+  @override
   void operator []=(K key, V value) {
     if (indexSetCallback != null) {
       indexSetCallback('[]=', key, value);
@@ -37,6 +42,7 @@
     sourceMap[key] = value;
   }
 
+  @override
   V putIfAbsent(K key, V ifAbsent()) {
     return sourceMap.putIfAbsent(key, () {
       V v = ifAbsent();
@@ -47,8 +53,10 @@
     });
   }
 
+  @override
   void addAll(Map<K, V> other) => sourceMap.addAll(other);
 
+  @override
   V remove(Object key) {
     if (removeCallback != null) {
       removeCallback('remove', key, sourceMap[key]);
@@ -56,6 +64,7 @@
     return sourceMap.remove(key);
   }
 
+  @override
   void clear() {
     if (removeCallback != null) {
       removeCallback('clear', sourceMap, null);
@@ -63,34 +72,46 @@
     sourceMap.clear();
   }
 
+  @override
   void forEach(void f(K key, V value)) => sourceMap.forEach(f);
 
+  @override
   Iterable<K> get keys => sourceMap.keys;
 
+  @override
   Iterable<V> get values => sourceMap.values;
 
+  @override
   Iterable<MapEntry<K, V>> get entries => sourceMap.entries;
 
+  @override
   void addEntries(Iterable<MapEntry<K, V>> entries) {
     sourceMap.addEntries(entries);
   }
 
+  @override
   Map<K2, V2> map<K2, V2>(MapEntry<K2, V2> transform(K key, V value)) =>
       sourceMap.map(transform);
 
+  @override
   int get length => sourceMap.length;
 
+  @override
   bool get isEmpty => sourceMap.isEmpty;
 
+  @override
   bool get isNotEmpty => sourceMap.isNotEmpty;
 
+  @override
   V update(K key, V update(V value), {V ifAbsent()}) =>
       sourceMap.update(key, update, ifAbsent: ifAbsent);
 
+  @override
   void updateAll(V update(K key, V value)) {
     sourceMap.updateAll(update);
   }
 
+  @override
   void removeWhere(bool test(K key, V value)) {
     sourceMap.removeWhere(test);
   }
@@ -101,74 +122,105 @@
 
   DebugIterable(this.iterable);
 
+  @override
   Iterator<E> get iterator => iterable.iterator;
 
+  @override
   Iterable<R> cast<R>() => Iterable.castFrom<E, R>(this);
+  @override
   Iterable<T> map<T>(T f(E element)) => iterable.map(f);
 
+  @override
   Iterable<E> where(bool test(E element)) => iterable.where(test);
 
+  @override
   Iterable<T> expand<T>(Iterable<T> f(E element)) => iterable.expand(f);
 
+  @override
   bool contains(Object element) => iterable.contains(element);
 
+  @override
   void forEach(void f(E element)) => iterable.forEach(f);
 
+  @override
   E reduce(E combine(E value, E element)) => iterable.reduce(combine);
 
+  @override
   T fold<T>(T initialValue, T combine(T previousValue, E element)) {
     return iterable.fold(initialValue, combine);
   }
 
+  @override
   bool every(bool test(E element)) => iterable.every(test);
 
+  @override
   String join([String separator = ""]) => iterable.join(separator);
 
+  @override
   bool any(bool test(E element)) => iterable.any(test);
 
+  @override
   List<E> toList({bool growable: true}) {
     return iterable.toList(growable: growable);
   }
 
+  @override
   Set<E> toSet() => iterable.toSet();
 
+  @override
   int get length => iterable.length;
 
+  @override
   bool get isEmpty => iterable.isEmpty;
 
+  @override
   bool get isNotEmpty => iterable.isNotEmpty;
 
+  @override
   Iterable<E> take(int n) => iterable.take(n);
 
+  @override
   Iterable<E> takeWhile(bool test(E value)) => iterable.takeWhile(test);
 
+  @override
   Iterable<E> skip(int n) => iterable.skip(n);
 
+  @override
   Iterable<E> skipWhile(bool test(E value)) => iterable.skipWhile(test);
 
+  @override
   E get first => iterable.first;
 
+  @override
   E get last => iterable.last;
 
+  @override
   E get single => iterable.single;
 
+  @override
   E firstWhere(bool test(E element), {E orElse()}) {
     return iterable.firstWhere(test, orElse: orElse);
   }
 
+  @override
   E lastWhere(bool test(E element), {E orElse()}) {
     return iterable.lastWhere(test, orElse: orElse);
   }
 
+  @override
   E singleWhere(bool test(E element), {E orElse()}) =>
       iterable.singleWhere(test, orElse: orElse);
 
+  @override
   E elementAt(int index) => iterable.elementAt(index);
 
+  @override
   Iterable<E> followedBy(Iterable<E> other) => iterable.followedBy(other);
 
+  @override
   Iterable<T> whereType<T>() => iterable.whereType<T>();
 
+  @override
   String toString() => iterable.toString();
 }
 
@@ -181,29 +233,38 @@
 
   List<E> get list => iterable;
 
+  @override
   List<R> cast<R>() => List.castFrom<E, R>(this);
+  @override
   List<E> operator +(List<E> other) => list + other;
 
+  @override
   E operator [](int index) => list[index];
 
+  @override
   void operator []=(int index, E value) {
     list[index] = value;
   }
 
+  @override
   void set first(E element) {
     list.first = element;
   }
 
+  @override
   void set last(E element) {
     list.last = element;
   }
 
+  @override
   int get length => list.length;
 
+  @override
   void set length(int newLength) {
     list.length = newLength;
   }
 
+  @override
   void add(E value) {
     if (addCallback != null) {
       addCallback('add', value, null);
@@ -211,6 +272,7 @@
     list.add(value);
   }
 
+  @override
   void addAll(Iterable<E> iterable) {
     if (addAllCallback != null) {
       addAllCallback('addAll', iterable, null);
@@ -218,62 +280,85 @@
     list.addAll(iterable);
   }
 
+  @override
   Iterable<E> get reversed => list.reversed;
 
+  @override
   void sort([int compare(E a, E b)]) => list.sort(compare);
 
+  @override
   void shuffle([random]) => list.shuffle(random);
 
+  @override
   int indexOf(E element, [int start = 0]) => list.indexOf(element, start);
 
+  @override
   int indexWhere(bool test(E element), [int start = 0]) =>
       list.indexWhere(test, start);
 
+  @override
   int lastIndexOf(E element, [int start]) => list.lastIndexOf(element, start);
 
+  @override
   int lastIndexWhere(bool test(E element), [int start]) =>
       list.lastIndexWhere(test, start);
 
+  @override
   void clear() => list.clear();
 
+  @override
   void insert(int index, E element) => list.insert(index, element);
 
+  @override
   void insertAll(int index, Iterable<E> iterable) {
     list.insertAll(index, iterable);
   }
 
+  @override
   void setAll(int index, Iterable<E> iterable) => list.setAll(index, iterable);
 
+  @override
   bool remove(Object value) => list.remove(value);
 
+  @override
   E removeAt(int index) => list.removeAt(index);
 
+  @override
   E removeLast() => list.removeLast();
 
+  @override
   void removeWhere(bool test(E element)) => list.removeWhere(test);
 
+  @override
   void retainWhere(bool test(E element)) => list.retainWhere(test);
 
+  @override
   List<E> sublist(int start, [int end]) => list.sublist(start, end);
 
+  @override
   Iterable<E> getRange(int start, int end) => list.getRange(start, end);
 
+  @override
   void setRange(int start, int end, Iterable<E> iterable, [int skipCount = 0]) {
     list.setRange(start, end, iterable, skipCount);
   }
 
+  @override
   void removeRange(int start, int end) {
     list.removeRange(start, end);
   }
 
+  @override
   void fillRange(int start, int end, [E fillValue]) {
     list.fillRange(start, end, fillValue);
   }
 
+  @override
   void replaceRange(int start, int end, Iterable<E> replacement) {
     list.replaceRange(start, end, replacement);
   }
 
+  @override
   Map<int, E> asMap() => list.asMap();
 }
 
@@ -284,9 +369,12 @@
 
   Set<E> get set => iterable;
 
+  @override
   Set<R> cast<R>() => Set.castFrom<E, R>(this);
+  @override
   bool contains(Object value) => set.contains(value);
 
+  @override
   bool add(E value) {
     if (addCallback != null) {
       addCallback('add', value, null);
@@ -294,32 +382,45 @@
     return set.add(value);
   }
 
+  @override
   void addAll(Iterable<E> elements) {
     elements.forEach(add);
   }
 
+  @override
   bool remove(Object value) => set.remove(value);
 
+  @override
   E lookup(Object object) => set.lookup(object);
 
+  @override
   void removeAll(Iterable<Object> elements) => set.removeAll(elements);
 
+  @override
   void retainAll(Iterable<Object> elements) => set.retainAll(elements);
 
+  @override
   void removeWhere(bool test(E element)) => set.removeWhere(test);
 
+  @override
   void retainWhere(bool test(E element)) => set.retainWhere(test);
 
+  @override
   bool containsAll(Iterable<Object> other) => set.containsAll(other);
 
+  @override
   Set<E> intersection(Set<Object> other) => set.intersection(other);
 
+  @override
   Set<E> union(Set<E> other) => set.union(other);
 
+  @override
   Set<E> difference(Set<Object> other) => set.difference(other);
 
+  @override
   void clear() => set.clear();
 
+  @override
   Set<E> toSet() => set.toSet();
 }
 
diff --git a/pkg/compiler/lib/src/helpers/expensive_map.dart b/pkg/compiler/lib/src/helpers/expensive_map.dart
index ed95b22..149e811 100644
--- a/pkg/compiler/lib/src/helpers/expensive_map.dart
+++ b/pkg/compiler/lib/src/helpers/expensive_map.dart
@@ -17,28 +17,39 @@
     }
   }
 
+  @override
   int get length => _maps[0].length;
+  @override
   bool get isEmpty => _maps[0].isEmpty;
+  @override
   bool get isNotEmpty => _maps[0].isNotEmpty;
 
+  @override
   Iterable<K> get keys => _maps[0].keys;
+  @override
   Iterable<V> get values => _maps[0].values;
 
+  @override
   bool containsKey(Object key) => _maps[0].containsKey(key);
+  @override
   bool containsValue(Object value) => _maps[0].containsValue(value);
 
+  @override
   V operator [](Object key) => _maps[0][key];
 
+  @override
   void forEach(void action(K key, V value)) {
     _maps[0].forEach(action);
   }
 
+  @override
   void operator []=(K key, V value) {
     for (int i = 0; i < _maps.length; i++) {
       _maps[i][key] = value;
     }
   }
 
+  @override
   V putIfAbsent(K key, V ifAbsent()) {
     if (containsKey(key)) return this[key];
     V value = ifAbsent();
@@ -46,12 +57,14 @@
     return value;
   }
 
+  @override
   void addAll(Map<K, V> other) {
     for (int i = 0; i < _maps.length; i++) {
       _maps[i].addAll(other);
     }
   }
 
+  @override
   V remove(Object key) {
     V result = _maps[0].remove(key);
     for (int i = 1; i < _maps.length; i++) {
@@ -60,24 +73,30 @@
     return result;
   }
 
+  @override
   void clear() {
     for (int i = 0; i < _maps.length; i++) {
       _maps[i].clear();
     }
   }
 
+  @override
   Map<KR, VR> cast<KR, VR>() => Map.castFrom<K, V, KR, VR>(this);
+  @override
   Iterable<MapEntry<K, V>> get entries => _maps[0].entries;
 
+  @override
   void addEntries(Iterable<MapEntry<K, V>> entries) {
     for (int i = 0; i < _maps.length; i++) {
       _maps[i].addEntries(entries);
     }
   }
 
+  @override
   Map<KR, VR> map<KR, VR>(MapEntry<KR, VR> transform(K key, V value)) =>
       _maps[0].map(transform);
 
+  @override
   V update(K key, V update(V value), {V ifAbsent()}) {
     V result;
     for (int i = 0; i < _maps.length; i++) {
@@ -86,17 +105,20 @@
     return result;
   }
 
+  @override
   void updateAll(V update(K key, V value)) {
     for (int i = 0; i < _maps.length; i++) {
       _maps[i].updateAll(update);
     }
   }
 
+  @override
   void removeWhere(bool test(K key, V value)) {
     for (int i = 0; i < _maps.length; i++) {
       _maps[i].removeWhere(test);
     }
   }
 
+  @override
   String toString() => "expensive(${_maps[0]}x${_maps.length})";
 }
diff --git a/pkg/compiler/lib/src/helpers/expensive_set.dart b/pkg/compiler/lib/src/helpers/expensive_set.dart
index f4c2f4f..4c5101e 100644
--- a/pkg/compiler/lib/src/helpers/expensive_set.dart
+++ b/pkg/compiler/lib/src/helpers/expensive_set.dart
@@ -17,19 +17,27 @@
     }
   }
 
+  @override
   int get length => _sets[0].length;
+  @override
   bool get isEmpty => _sets[0].isEmpty;
+  @override
   bool get isNotEmpty => _sets[0].isNotEmpty;
 
+  @override
   Iterator<E> get iterator => _sets[0].iterator;
 
+  @override
   bool contains(Object object) => _sets[0].contains(object);
+  @override
   E lookup(Object object) => _sets[0].lookup(object);
 
+  @override
   void forEach(void action(E element)) {
     _sets[0].forEach(action);
   }
 
+  @override
   bool add(E element) {
     bool result = _sets[0].add(element);
     for (int i = 1; i < _sets.length; i++) {
@@ -38,12 +46,14 @@
     return result;
   }
 
+  @override
   void addAll(Iterable<E> objects) {
     for (E each in objects) {
       add(each);
     }
   }
 
+  @override
   bool remove(Object object) {
     bool result = _sets[0].remove(object);
     for (int i = 1; i < _sets.length; i++) {
@@ -52,26 +62,31 @@
     return result;
   }
 
+  @override
   void clear() {
     for (int i = 0; i < _sets.length; i++) {
       _sets[i].clear();
     }
   }
 
+  @override
   void removeAll(Iterable<Object> objectsToRemove) {
     for (var each in objectsToRemove) {
       remove(each);
     }
   }
 
+  @override
   void removeWhere(bool test(E element)) {
     removeAll(this.toList().where((e) => test(e)));
   }
 
+  @override
   void retainWhere(bool test(E element)) {
     removeAll(toList().where((e) => !test(e)));
   }
 
+  @override
   bool containsAll(Iterable<Object> other) {
     for (Object object in other) {
       if (!this.contains(object)) return false;
@@ -81,6 +96,7 @@
 
   Set _newSet() => new ExpensiveSet(_sets.length);
 
+  @override
   Set<E> intersection(Set<Object> other) {
     Set<E> result = _newSet();
     if (other.length < this.length) {
@@ -95,10 +111,12 @@
     return result;
   }
 
+  @override
   Set<E> union(Set<E> other) {
     return _newSet()..addAll(this)..addAll(other);
   }
 
+  @override
   Set<E> difference(Set<Object> other) {
     Set<E> result = _newSet();
     for (E element in this) {
@@ -107,6 +125,7 @@
     return result;
   }
 
+  @override
   void retainAll(Iterable objectsToRetain) {
     Set retainSet;
     if (objectsToRetain is Set) {
@@ -117,6 +136,7 @@
     retainWhere(retainSet.contains);
   }
 
+  @override
   Set<E> toSet() {
     var result = new ExpensiveSet<E>(_sets.length);
     for (int i = 0; i < _sets.length; i++) {
@@ -125,5 +145,6 @@
     return result;
   }
 
+  @override
   String toString() => "expensive(${_sets[0]}x${_sets.length})";
 }
diff --git a/pkg/compiler/lib/src/helpers/helpers.dart b/pkg/compiler/lib/src/helpers/helpers.dart
index 2182fc0..bf34252 100644
--- a/pkg/compiler/lib/src/helpers/helpers.dart
+++ b/pkg/compiler/lib/src/helpers/helpers.dart
@@ -32,6 +32,7 @@
 }
 
 class _DebugIndentation extends Indentation {
+  @override
   final String indentationUnit = " ";
 }
 
diff --git a/pkg/compiler/lib/src/helpers/stats.dart b/pkg/compiler/lib/src/helpers/stats.dart
index 935ac8c..e524b54 100644
--- a/pkg/compiler/lib/src/helpers/stats.dart
+++ b/pkg/compiler/lib/src/helpers/stats.dart
@@ -212,6 +212,7 @@
 class DebugOutput implements StatsOutput {
   const DebugOutput();
 
+  @override
   void println(String text) => debugPrint(text);
 }
 
@@ -222,6 +223,7 @@
 
   SinkOutput(this.sink);
 
+  @override
   void println(String text) {
     sink.add(text);
     sink.add('\n');
@@ -272,6 +274,7 @@
 
 /// Abstract base class for [ConsolePrinter] and [XMLPrinter].
 abstract class BasePrinter extends StatsPrinter with Indentation {
+  @override
   final int examples;
   final StatsOutput output;
 
@@ -287,6 +290,7 @@
   ConsolePrinter({StatsOutput output: const DebugOutput(), int examples: 10})
       : super(output: output, examples: examples);
 
+  @override
   void open(String id,
       [Map<String, dynamic> data = const <String, dynamic>{}]) {
     if (extraLevel > 0) return;
@@ -316,17 +320,20 @@
     indentMore();
   }
 
+  @override
   void close(String id) {
     if (extraLevel > 0) return;
 
     indentLess();
   }
 
+  @override
   void beginExtra() {
     if (extraLevel == 0) output.println('$indentation...');
     extraLevel++;
   }
 
+  @override
   void endExtra() {
     extraLevel--;
   }
@@ -340,6 +347,7 @@
   XMLPrinter({output: const DebugOutput(), int examples: 10})
       : super(output: output, examples: examples);
 
+  @override
   void start(String id) {
     if (!opened) {
       output.println('<?xml version="1.0" encoding="UTF-8"?>');
@@ -348,10 +356,12 @@
     open(id);
   }
 
+  @override
   void end(String id) {
     close(id);
   }
 
+  @override
   void open(String id,
       [Map<String, dynamic> data = const <String, dynamic>{}]) {
     StringBuffer sb = new StringBuffer();
@@ -367,15 +377,18 @@
     indentMore();
   }
 
+  @override
   void close(String id) {
     indentLess();
     output.println('${indentation}</$id>');
   }
 
+  @override
   void beginExtra() {
     open('extra');
   }
 
+  @override
   void endExtra() {
     close('extra');
   }
@@ -450,6 +463,7 @@
     }
   }
 
+  @override
   int compareTo(_StackTraceNode other) {
     // Sorts in decreasing count order.
     return other.count - count;
@@ -479,6 +493,7 @@
     }
   }
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     printOn(sb, '');
@@ -493,6 +508,7 @@
 
   _StackTraceTree(this.id, this.sampleFrequency) : super.root();
 
+  @override
   void dumpTraces(StatsPrinter printer) {
     printer.open('trace', {
       'id': id,
@@ -519,10 +535,12 @@
   Map<dynamic, Map<dynamic, List>> countersMap =
       <dynamic, Map<dynamic, List>>{};
   Map<dynamic, _StackTraceTree> traceMap = {};
+  @override
   int stackTraceSampleFrequency = 1;
 
   ActiveStats(StatsPrinter this.printer);
 
+  @override
   void recordMap(id, key, value, {fromExisting(value)}) {
     Map map = maps.putIfAbsent(id, () => {});
     if (fromExisting != null && map.containsKey(key)) {
@@ -532,16 +550,19 @@
     }
   }
 
+  @override
   Map getMap(key) {
     return maps[key];
   }
 
+  @override
   void recordFrequency(id, value, [example]) {
     Map<dynamic, List> map = frequencyMaps.putIfAbsent(id, () => {});
     map.putIfAbsent(value, () => []);
     map[value].add(example);
   }
 
+  @override
   void recordFrequencies(id, Map<dynamic, Iterable> frequencyMap) {
     Map<dynamic, List> map = frequencyMaps.putIfAbsent(id, () => {});
     frequencyMap.forEach((value, examples) {
@@ -550,6 +571,7 @@
     });
   }
 
+  @override
   Iterable recordedFrequencies(id, value) {
     Map<dynamic, List> map = frequencyMaps[id];
     if (map == null) return const [];
@@ -558,15 +580,18 @@
     return list;
   }
 
+  @override
   void recordCounter(id, [reason, example]) {
     Map<dynamic, List> map = countersMap.putIfAbsent(id, () => {});
     map.putIfAbsent(reason, () => []).add(example);
   }
 
+  @override
   void recordElement(key, element, {data}) {
     setsMap.putIfAbsent(key, () => new Map())[element] = data;
   }
 
+  @override
   void recordTrace(key, {int sampleFrequency}) {
     if (sampleFrequency == null) {
       sampleFrequency = stackTraceSampleFrequency;
@@ -576,12 +601,14 @@
         .sample();
   }
 
+  @override
   Iterable getList(String key) {
     Map map = setsMap[key];
     if (map == null) return const [];
     return map.keys;
   }
 
+  @override
   void dumpStats({void beforeClose()}) {
     printer.start('stats');
     dumpFrequencies();
@@ -688,6 +715,7 @@
     tree.dumpTraces(printer);
   }
 
+  @override
   void dumpCorrelation(keyA, Iterable a, keyB, Iterable b,
       {Map dataA, Map dataB}) {
     printer.child('correlations', {'title': '$keyA vs $keyB'}, () {
diff --git a/pkg/compiler/lib/src/helpers/trace.dart b/pkg/compiler/lib/src/helpers/trace.dart
index 104c227..51022cd 100644
--- a/pkg/compiler/lib/src/helpers/trace.dart
+++ b/pkg/compiler/lib/src/helpers/trace.dart
@@ -232,6 +232,7 @@
     return sb.toString();
   }
 
+  @override
   String toString() {
     return prettify();
   }
@@ -269,6 +270,7 @@
     sb.write('$fileText $lineNoText$columnNoText $method\n');
   }
 
+  @override
   int get hashCode {
     return 13 * index +
         17 * file.hashCode +
@@ -277,6 +279,7 @@
         29 * method.hashCode;
   }
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! StackTraceLine) return false;
@@ -287,6 +290,7 @@
         method == other.method;
   }
 
+  @override
   String toString() => "$method @ $file [$lineNo:$columnNo]";
 }
 
diff --git a/pkg/compiler/lib/src/helpers/track_map.dart b/pkg/compiler/lib/src/helpers/track_map.dart
index 6cb7121..23d3ce4 100644
--- a/pkg/compiler/lib/src/helpers/track_map.dart
+++ b/pkg/compiler/lib/src/helpers/track_map.dart
@@ -48,23 +48,34 @@
     });
   }
 
+  @override
   int get length => _map.length;
+  @override
   bool get isEmpty => _map.isEmpty;
+  @override
   bool get isNotEmpty => _map.isNotEmpty;
 
+  @override
   Iterable<K> get keys => _map.keys;
+  @override
   Iterable<V> get values => _map.values;
 
+  @override
   bool containsKey(Object key) => _map.containsKey(key);
+  @override
   bool containsValue(Object value) => _map.containsValue(value);
 
+  @override
   V operator [](Object key) => _map[key];
+  @override
   String toString() => _map.toString();
 
+  @override
   void forEach(void action(K key, V value)) {
     _map.forEach(action);
   }
 
+  @override
   void operator []=(K key, V value) {
     if (!_map.containsKey(key)) {
       _notifyLengthChanged(1);
@@ -72,6 +83,7 @@
     }
   }
 
+  @override
   V putIfAbsent(K key, V ifAbsent()) {
     if (containsKey(key)) return this[key];
     V value = ifAbsent();
@@ -79,6 +91,7 @@
     return value;
   }
 
+  @override
   V remove(Object key) {
     if (_map.containsKey(key)) {
       _notifyLengthChanged(-1);
@@ -86,32 +99,41 @@
     return _map.remove(key);
   }
 
+  @override
   void addAll(Map<K, V> other) {
     other.forEach((key, value) => this[key] = value);
   }
 
+  @override
   void clear() {
     _notifyLengthChanged(-_map.length);
     _map.clear();
   }
 
+  @override
   Map<KR, VR> cast<KR, VR>() => _map.cast<KR, VR>();
+  @override
   Iterable<MapEntry<K, V>> get entries => _map.entries;
 
+  @override
   void addEntries(Iterable<MapEntry<K, V>> entries) {
     for (var entry in entries) this[entry.key] = entry.value;
   }
 
+  @override
   Map<KR, VR> map<KR, VR>(MapEntry<KR, VR> transform(K key, V value)) =>
       _map.map(transform);
 
+  @override
   V update(K key, V update(V value), {V ifAbsent()}) =>
       _map.update(key, update, ifAbsent: ifAbsent);
 
+  @override
   void updateAll(V update(K key, V value)) {
     _map.updateAll(update);
   }
 
+  @override
   void removeWhere(bool test(K key, V value)) {
     int before = _map.length;
     _map.removeWhere(test);
diff --git a/pkg/compiler/lib/src/inferrer/abstract_value_domain.dart b/pkg/compiler/lib/src/inferrer/abstract_value_domain.dart
index 6322222..1503b1d 100644
--- a/pkg/compiler/lib/src/inferrer/abstract_value_domain.dart
+++ b/pkg/compiler/lib/src/inferrer/abstract_value_domain.dart
@@ -45,6 +45,7 @@
 
   static AbstractBool maybeOrFalse(bool value) => value ? Maybe : False;
 
+  @override
   String toString() =>
       'AbstractBool.${_value == null ? 'Maybe' : (_value ? 'True' : 'False')}';
 }
@@ -99,6 +100,10 @@
   /// runtime.
   AbstractValue get listType;
 
+  /// The [AbstractValue] that represents a non-null subtype of `Set` at
+  /// runtime.
+  AbstractValue get setType;
+
   /// The [AbstractValue] that represents a non-null subtype of `Map` at
   /// runtime.
   AbstractValue get mapType;
@@ -133,6 +138,10 @@
   /// runtime.
   AbstractValue get constListType;
 
+  /// The [AbstractValue] that represents a non-null constant set literal at
+  /// runtime.
+  AbstractValue get constSetType;
+
   /// The [AbstractValue] that represents a non-null constant map literal at
   /// runtime.
   AbstractValue get constMapType;
@@ -377,6 +386,24 @@
   /// represent a container value at runtime.
   int getContainerLength(AbstractValue value);
 
+  /// Returns `true` if [value] represents a set value at runtime.
+  bool isSet(covariant AbstractValue value);
+
+  /// Creates a set value specialization of [originalValue] with the inferred
+  /// [elementType] runtime value.
+  ///
+  /// The [allocationNode] is used to identify this particular set allocation.
+  /// The [allocationElement] is used only for debugging.
+  AbstractValue createSetValue(
+      AbstractValue originalValue,
+      Object allocationNode,
+      MemberEntity allocationElement,
+      AbstractValue elementType);
+
+  /// Returns the element type of [value] if it represents a set value at
+  /// runtime. Returns [dynamicType] otherwise.
+  AbstractValue getSetElementType(AbstractValue value);
+
   /// Returns `true` if [value] represents a map value at runtime.
   bool isMap(covariant AbstractValue value);
 
diff --git a/pkg/compiler/lib/src/inferrer/builder_kernel.dart b/pkg/compiler/lib/src/inferrer/builder_kernel.dart
index 204cdce..585c560 100644
--- a/pkg/compiler/lib/src/inferrer/builder_kernel.dart
+++ b/pkg/compiler/lib/src/inferrer/builder_kernel.dart
@@ -7,16 +7,18 @@
 import '../closure.dart';
 import '../common.dart';
 import '../common/names.dart';
-import '../constants/constant_system.dart';
+import '../constants/constant_system.dart' as constant_system;
 import '../constants/values.dart';
 import '../elements/entities.dart';
 import '../elements/jumps.dart';
 import '../elements/types.dart';
 import '../inferrer/abstract_value_domain.dart';
 import '../inferrer/types.dart';
+import '../ir/constants.dart';
 import '../ir/static_type_provider.dart';
 import '../ir/util.dart';
 import '../js_backend/backend.dart';
+import '../js_backend/field_analysis.dart';
 import '../js_model/element_map.dart';
 import '../js_model/locals.dart' show JumpVisitor;
 import '../js_model/js_world.dart';
@@ -24,6 +26,7 @@
 import '../options.dart';
 import '../universe/selector.dart';
 import '../universe/side_effects.dart';
+import '../util/util.dart';
 import 'inferrer_engine.dart';
 import 'locals_handler.dart';
 import 'type_graph_nodes.dart';
@@ -433,11 +436,16 @@
 
   @override
   TypeInformation visitInstantiation(ir.Instantiation node) {
+    return createInstantiationTypeInformation(visit(node.expression));
+  }
+
+  TypeInformation createInstantiationTypeInformation(
+      TypeInformation expressionType) {
     // TODO(sra): Add a TypeInformation for Instantiations.  Instantiated
     // generic methods will need to be traced separately, and have the
     // information gathered in tracing reflected back to the generic method. For
     // now, pass along the uninstantiated method.
-    return visit(node.expression);
+    return expressionType;
   }
 
   @override
@@ -454,6 +462,10 @@
 
   @override
   TypeInformation visitNullLiteral(ir.NullLiteral literal) {
+    return createNullTypeInformation();
+  }
+
+  TypeInformation createNullTypeInformation() {
     return _types.nullType;
   }
 
@@ -605,14 +617,21 @@
   }
 
   @override
-  TypeInformation visitListLiteral(ir.ListLiteral listLiteral) {
+  TypeInformation visitListLiteral(ir.ListLiteral node) {
+    return createListTypeInformation(
+        node, node.expressions.map((e) => visit(e)),
+        isConst: node.isConst);
+  }
+
+  TypeInformation createListTypeInformation(
+      ir.TreeNode node, Iterable<TypeInformation> elementTypes,
+      {bool isConst}) {
     // We only set the type once. We don't need to re-visit the children
     // when re-analyzing the node.
-    return _inferrer.concreteTypes.putIfAbsent(listLiteral, () {
+    return _inferrer.concreteTypes.putIfAbsent(node, () {
       TypeInformation elementType;
       int length = 0;
-      for (ir.Expression element in listLiteral.expressions) {
-        TypeInformation type = visit(element);
+      for (TypeInformation type in elementTypes) {
         elementType = elementType == null
             ? _types.allocatePhi(null, null, type, isTry: false)
             : _types.addPhiInput(null, elementType, type);
@@ -622,25 +641,58 @@
           ? _types.nonNullEmpty()
           : _types.simplifyPhi(null, null, elementType);
       TypeInformation containerType =
-          listLiteral.isConst ? _types.constListType : _types.growableListType;
+          isConst ? _types.constListType : _types.growableListType;
       return _types.allocateList(
-          containerType, listLiteral, _analyzedMember, elementType, length);
+          containerType, node, _analyzedMember, elementType, length);
+    });
+  }
+
+  @override
+  TypeInformation visitSetLiteral(ir.SetLiteral node) {
+    return createSetTypeInformation(node, node.expressions.map((e) => visit(e)),
+        isConst: node.isConst);
+  }
+
+  TypeInformation createSetTypeInformation(
+      ir.TreeNode node, Iterable<TypeInformation> elementTypes,
+      {bool isConst}) {
+    return _inferrer.concreteTypes.putIfAbsent(node, () {
+      TypeInformation elementType;
+      for (TypeInformation type in elementTypes) {
+        elementType = elementType == null
+            ? _types.allocatePhi(null, null, type, isTry: false)
+            : _types.addPhiInput(null, elementType, type);
+      }
+      elementType = elementType == null
+          ? _types.nonNullEmpty()
+          : _types.simplifyPhi(null, null, elementType);
+      TypeInformation containerType =
+          isConst ? _types.constSetType : _types.setType;
+      return _types.allocateSet(
+          containerType, node, _analyzedMember, elementType);
     });
   }
 
   @override
   TypeInformation visitMapLiteral(ir.MapLiteral node) {
+    return createMapTypeInformation(
+        node, node.entries.map((e) => new Pair(visit(e.key), visit(e.value))),
+        isConst: node.isConst);
+  }
+
+  TypeInformation createMapTypeInformation(ir.TreeNode node,
+      Iterable<Pair<TypeInformation, TypeInformation>> entryTypes,
+      {bool isConst}) {
     return _inferrer.concreteTypes.putIfAbsent(node, () {
       List keyTypes = <TypeInformation>[];
       List valueTypes = <TypeInformation>[];
 
-      for (ir.MapEntry entry in node.entries) {
-        keyTypes.add(visit(entry.key));
-        valueTypes.add(visit(entry.value));
+      for (Pair<TypeInformation, TypeInformation> entryType in entryTypes) {
+        keyTypes.add(entryType.a);
+        valueTypes.add(entryType.b);
       }
 
-      TypeInformation type =
-          node.isConst ? _types.constMapType : _types.mapType;
+      TypeInformation type = isConst ? _types.constMapType : _types.mapType;
       return _types.allocateMap(
           type, node, _analyzedMember, keyTypes, valueTypes);
     });
@@ -657,32 +709,45 @@
 
   @override
   TypeInformation visitBoolLiteral(ir.BoolLiteral node) {
-    return _types.boolLiteralType(node.value);
+    return createBoolTypeInformation(node.value);
+  }
+
+  TypeInformation createBoolTypeInformation(bool value) {
+    return _types.boolLiteralType(value);
   }
 
   @override
   TypeInformation visitIntLiteral(ir.IntLiteral node) {
-    ConstantSystem constantSystem = _closedWorld.constantSystem;
+    return createIntTypeInformation(node.value);
+  }
+
+  TypeInformation createIntTypeInformation(int value) {
     // The JavaScript backend may turn this literal into a double at
     // runtime.
     return _types.getConcreteTypeFor(_closedWorld.abstractValueDomain
         .computeAbstractValueForConstant(
-            constantSystem.createIntFromInt(node.value)));
+            constant_system.createIntFromInt(value)));
   }
 
   @override
   TypeInformation visitDoubleLiteral(ir.DoubleLiteral node) {
-    ConstantSystem constantSystem = _closedWorld.constantSystem;
-    // The JavaScript backend may turn this literal into an integer at
+    return createDoubleTypeInformation(node.value);
+  }
+
+  TypeInformation createDoubleTypeInformation(double value) {
+    // The JavaScript backend may turn this literal into a double at
     // runtime.
     return _types.getConcreteTypeFor(_closedWorld.abstractValueDomain
-        .computeAbstractValueForConstant(
-            constantSystem.createDouble(node.value)));
+        .computeAbstractValueForConstant(constant_system.createDouble(value)));
   }
 
   @override
   TypeInformation visitStringLiteral(ir.StringLiteral node) {
-    return _types.stringLiteralType(node.value);
+    return createStringTypeInformation(node.value);
+  }
+
+  TypeInformation createStringTypeInformation(String value) {
+    return _types.stringLiteralType(value);
   }
 
   @override
@@ -703,12 +768,20 @@
 
   @override
   TypeInformation visitSymbolLiteral(ir.SymbolLiteral node) {
+    return createSymbolLiteralTypeInformation();
+  }
+
+  TypeInformation createSymbolLiteralTypeInformation() {
     return _types
         .nonNullSubtype(_closedWorld.commonElements.symbolImplementationClass);
   }
 
   @override
   TypeInformation visitTypeLiteral(ir.TypeLiteral node) {
+    return createTypeLiteralInformation();
+  }
+
+  TypeInformation createTypeLiteralInformation() {
     return _types.typeType;
   }
 
@@ -883,15 +956,10 @@
     if (variable != null) {
       Local local = _localsMap.getLocalVariable(variable);
       if (!_capturedVariables.contains(local)) {
-        TypeInformation refinedType = _types
-            .refineReceiver(selector, mask, receiverType, isConditional: false);
         DartType type = _localsMap.getLocalType(_elementMap, local);
         _state.updateLocal(
-            _inferrer, _capturedAndBoxed, local, refinedType, node, type);
-        List<Refinement> refinements = _localRefinementMap[variable];
-        if (refinements != null) {
-          refinements.add(new Refinement(selector, mask));
-        }
+            _inferrer, _capturedAndBoxed, local, receiverType, node, type,
+            isNullable: selector.appliesToNullWithoutThrow());
       }
     }
 
@@ -928,60 +996,16 @@
         callType, node, selector, mask, receiverType, arguments);
   }
 
-  /// Map from synthesized variables created for non-null operations to observed
-  /// refinements. This is used to refine locals in cases like:
-  ///
-  ///     local?.method()
-  ///
-  /// which in kernel is encoded as
-  ///
-  ///     let #t1 = local in #t1 == null ? null : #1.method()
-  ///
-  Map<ir.VariableDeclaration, List<Refinement>> _localRefinementMap =
-      <ir.VariableDeclaration, List<Refinement>>{};
-
   @override
   TypeInformation visitLet(ir.Let node) {
-    ir.VariableDeclaration alias;
-    ir.Expression body = node.body;
-    if (node.variable.name == null &&
-        node.variable.isFinal &&
-        node.variable.initializer is ir.VariableGet &&
-        body is ir.ConditionalExpression &&
-        body.condition is ir.MethodInvocation &&
-        body.then is ir.NullLiteral) {
-      ir.VariableGet get = node.variable.initializer;
-      ir.MethodInvocation invocation = body.condition;
-      ir.Expression receiver = invocation.receiver;
-      if (invocation.name.name == '==' &&
-          receiver is ir.VariableGet &&
-          receiver.variable == node.variable &&
-          invocation.arguments.positional.single is ir.NullLiteral) {
-        // We have
-        //   let #t1 = local in #t1 == null ? null : e
-        alias = get.variable;
-        _localRefinementMap[node.variable] = <Refinement>[];
-      }
-    }
     visit(node.variable);
-    TypeInformation type = visit(body);
-    if (alias != null) {
-      List<Refinement> refinements = _localRefinementMap.remove(node.variable);
-      if (refinements.isNotEmpty) {
-        Local local = _localsMap.getLocalVariable(alias);
-        DartType type = _localsMap.getLocalType(_elementMap, local);
-        TypeInformation localType =
-            _state.readLocal(_inferrer, _capturedAndBoxed, local);
-        for (Refinement refinement in refinements) {
-          localType = _types.refineReceiver(
-              refinement.selector, refinement.mask, localType,
-              isConditional: true);
-          _state.updateLocal(
-              _inferrer, _capturedAndBoxed, local, localType, node, type);
-        }
-      }
-    }
-    return type;
+    return visit(node.body);
+  }
+
+  @override
+  TypeInformation visitBlockExpression(ir.BlockExpression node) {
+    visit(node.body);
+    return visit(node.value);
   }
 
   @override
@@ -1103,16 +1127,23 @@
   /// Try to find the length given to a fixed array constructor call.
   int _findLength(ir.Arguments arguments) {
     ir.Expression firstArgument = arguments.positional.first;
-    if (firstArgument is ir.IntLiteral) {
+    if (firstArgument is ir.ConstantExpression &&
+        firstArgument.constant is ir.DoubleConstant) {
+      ir.DoubleConstant constant = firstArgument.constant;
+      double doubleValue = constant.value;
+      int truncatedValue = doubleValue.truncate();
+      if (doubleValue == truncatedValue) {
+        return truncatedValue;
+      }
+    } else if (firstArgument is ir.IntLiteral) {
       return firstArgument.value;
     } else if (firstArgument is ir.StaticGet) {
       MemberEntity member = _elementMap.getMember(firstArgument.target);
-      if (member.isField &&
-          (member.isStatic || member.isTopLevel) &&
-          _closedWorld.fieldNeverChanges(member)) {
-        ConstantValue value = _elementMap.getFieldConstantValue(member);
-        if (value != null && value.isInt) {
-          IntConstantValue intValue = value;
+      if (member.isField) {
+        FieldAnalysisData fieldData =
+            _closedWorld.fieldAnalysis.getFieldData(member);
+        if (fieldData.isEffectivelyConstant && fieldData.constantValue.isInt) {
+          IntConstantValue intValue = fieldData.constantValue;
           return intValue.intValue.toInt();
         }
       }
@@ -1270,8 +1301,14 @@
 
   @override
   TypeInformation visitStaticGet(ir.StaticGet node) {
-    MemberEntity member = _elementMap.getMember(node.target);
     AbstractValue mask = _memberData.typeOfSend(node);
+    assert(mask == null);
+    return createStaticGetTypeInformation(node, node.target, mask: mask);
+  }
+
+  TypeInformation createStaticGetTypeInformation(ir.Node node, ir.Member target,
+      {AbstractValue mask}) {
+    MemberEntity member = _elementMap.getMember(target);
     return handleStaticInvoke(
         node, new Selector.getter(member.memberName), mask, member, null);
   }
@@ -1537,7 +1574,8 @@
       Local local = _localsMap.getLocalVariable(variable);
       DartType type = _localsMap.getLocalType(_elementMap, local);
       _state.updateLocal(
-          _inferrer, _capturedAndBoxed, local, localFunctionType, node, type);
+          _inferrer, _capturedAndBoxed, local, localFunctionType, node, type,
+          isNullable: false);
     }
 
     // We don't put the closure in the work queue of the
@@ -1653,12 +1691,15 @@
       }
       Local local = _localsMap.getLocalVariable(exception);
       _state.updateLocal(
-          _inferrer, _capturedAndBoxed, local, mask, node, const DynamicType());
+          _inferrer, _capturedAndBoxed, local, mask, node, const DynamicType(),
+          isNullable: false /* `throw null` produces a NullThrownError */);
     }
     ir.VariableDeclaration stackTrace = node.stackTrace;
     if (stackTrace != null) {
       Local local = _localsMap.getLocalVariable(stackTrace);
       // TODO(johnniwinther): Use a mask based on [StackTrace].
+      // Note: stack trace may be null if users omit a stack in
+      // `completer.completeError`.
       _state.updateLocal(_inferrer, _capturedAndBoxed, local,
           _types.dynamicType, node, const DynamicType());
     }
@@ -1798,6 +1839,114 @@
     // TODO(johnniwinther): Maybe this should be [empty] instead?
     return _types.dynamicType;
   }
+
+  @override
+  TypeInformation visitConstantExpression(ir.ConstantExpression node) {
+    return node.constant.accept(new TypeInformationConstantVisitor(this, node));
+  }
+}
+
+class TypeInformationConstantVisitor
+    implements ir.ConstantVisitor<TypeInformation> {
+  final KernelTypeGraphBuilder builder;
+  final ir.ConstantExpression expression;
+
+  TypeInformationConstantVisitor(this.builder, this.expression);
+
+  @override
+  TypeInformation defaultConstant(ir.Constant node) {
+    throw new UnsupportedError("Unexpected constant: "
+        "${node} (${node.runtimeType})");
+  }
+
+  @override
+  TypeInformation visitNullConstant(ir.NullConstant node) {
+    return builder.createNullTypeInformation();
+  }
+
+  @override
+  TypeInformation visitBoolConstant(ir.BoolConstant node) {
+    return builder.createBoolTypeInformation(node.value);
+  }
+
+  @override
+  TypeInformation visitIntConstant(ir.IntConstant node) {
+    return builder.createIntTypeInformation(node.value);
+  }
+
+  @override
+  TypeInformation visitDoubleConstant(ir.DoubleConstant node) {
+    return builder.createDoubleTypeInformation(node.value);
+  }
+
+  @override
+  TypeInformation visitStringConstant(ir.StringConstant node) {
+    return builder.createStringTypeInformation(node.value);
+  }
+
+  @override
+  TypeInformation visitSymbolConstant(ir.SymbolConstant node) {
+    return builder.createSymbolLiteralTypeInformation();
+  }
+
+  @override
+  TypeInformation visitMapConstant(ir.MapConstant node) {
+    return builder.createMapTypeInformation(
+        new ConstantReference(expression, node),
+        node.entries
+            .map((e) => new Pair(e.key.accept(this), e.value.accept(this))),
+        isConst: true);
+  }
+
+  @override
+  TypeInformation visitListConstant(ir.ListConstant node) {
+    return builder.createListTypeInformation(
+        new ConstantReference(expression, node),
+        node.entries.map((e) => e.accept(this)),
+        isConst: true);
+  }
+
+  @override
+  TypeInformation visitSetConstant(ir.SetConstant node) {
+    return builder.createSetTypeInformation(
+        new ConstantReference(expression, node),
+        node.entries.map((e) => e.accept(this)),
+        isConst: true);
+  }
+
+  @override
+  TypeInformation visitInstanceConstant(ir.InstanceConstant node) {
+    node.fieldValues.forEach((ir.Reference reference, ir.Constant value) {
+      builder._inferrer.recordTypeOfField(
+          builder._elementMap.getField(reference.asField), value.accept(this));
+    });
+    return builder._types.getConcreteTypeFor(builder
+        ._closedWorld.abstractValueDomain
+        .createNonNullExact(builder._elementMap.getClass(node.classNode)));
+  }
+
+  @override
+  TypeInformation visitPartialInstantiationConstant(
+      ir.PartialInstantiationConstant node) {
+    return builder
+        .createInstantiationTypeInformation(node.tearOffConstant.accept(this));
+  }
+
+  @override
+  TypeInformation visitTearOffConstant(ir.TearOffConstant node) {
+    return builder.createStaticGetTypeInformation(node, node.procedure);
+  }
+
+  @override
+  TypeInformation visitTypeLiteralConstant(ir.TypeLiteralConstant node) {
+    return builder.createTypeLiteralInformation();
+  }
+
+  @override
+  TypeInformation visitUnevaluatedConstant(ir.UnevaluatedConstant node) {
+    assert(false, "Unexpected unevaluated constant: $node");
+    return builder._types.dynamicType;
+  }
 }
 
 class Refinement {
@@ -1889,9 +2038,10 @@
       Local local,
       TypeInformation type,
       ir.Node node,
-      DartType staticType) {
+      DartType staticType,
+      {isNullable: true}) {
     assert(type != null);
-    type = inferrer.types.narrowType(type, staticType);
+    type = inferrer.types.narrowType(type, staticType, isNullable: isNullable);
 
     FieldEntity field = capturedAndBoxed[local];
     if (field != null) {
@@ -1907,10 +2057,9 @@
       Local local,
       DartType type,
       ir.Node node) {
-    TypeInformation existing = readLocal(inferrer, capturedAndBoxed, local);
-    TypeInformation newType =
-        inferrer.types.narrowType(existing, type, isNullable: false);
-    updateLocal(inferrer, capturedAndBoxed, local, newType, node, type);
+    TypeInformation currentType = readLocal(inferrer, capturedAndBoxed, local);
+    updateLocal(inferrer, capturedAndBoxed, local, currentType, node, type,
+        isNullable: false);
   }
 
   LocalState mergeFlow(InferrerEngine inferrer, LocalState other) {
@@ -2003,6 +2152,7 @@
     sb.write('\n]');
   }
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write('LocalState(');
diff --git a/pkg/compiler/lib/src/inferrer/closure_tracer.dart b/pkg/compiler/lib/src/inferrer/closure_tracer.dart
index e7ecf72..7558fcc 100644
--- a/pkg/compiler/lib/src/inferrer/closure_tracer.dart
+++ b/pkg/compiler/lib/src/inferrer/closure_tracer.dart
@@ -28,6 +28,7 @@
         "${tracedElements.where((f) => f.isAbstract)}");
   }
 
+  @override
   ApplyableTypeInformation get tracedType => super.tracedType;
 
   void run() {
diff --git a/pkg/compiler/lib/src/inferrer/inferrer_engine.dart b/pkg/compiler/lib/src/inferrer/inferrer_engine.dart
index 2eedb7b..a33cffc 100644
--- a/pkg/compiler/lib/src/inferrer/inferrer_engine.dart
+++ b/pkg/compiler/lib/src/inferrer/inferrer_engine.dart
@@ -33,6 +33,7 @@
 import 'locals_handler.dart';
 import 'list_tracer.dart';
 import 'map_tracer.dart';
+import 'set_tracer.dart';
 import 'type_graph_dump.dart';
 import 'type_graph_inferrer.dart';
 import 'type_graph_nodes.dart';
@@ -58,6 +59,8 @@
   ]);
 
   CompilerOptions get options;
+
+  /// The [JClosedWorld] on which inference reasoning is based.
   JClosedWorld get closedWorld;
   DiagnosticReporter get reporter;
   AbstractValueDomain get abstractValueDomain =>
@@ -69,7 +72,7 @@
   NoSuchMethodData get noSuchMethodData => closedWorld.noSuchMethodData;
 
   TypeSystem get types;
-  Map<ir.Node, TypeInformation> get concreteTypes;
+  Map<ir.TreeNode, TypeInformation> get concreteTypes;
   InferredDataBuilder get inferredDataBuilder;
 
   FunctionEntity get mainElement;
@@ -78,6 +81,7 @@
 
   void analyze(MemberEntity member);
   void analyzeListAndEnqueue(ListTypeInformation info);
+  void analyzeSetAndEnqueue(SetTypeInformation info);
   void analyzeMapAndEnqueue(MapTypeInformation info);
 
   /// Notifies to the inferrer that [analyzedElement] can have return type
@@ -250,6 +254,7 @@
   final Map<Local, TypeInformation> defaultTypeOfParameter =
       new Map<Local, TypeInformation>();
   final WorkQueue workQueue = new WorkQueue();
+  @override
   final FunctionEntity mainElement;
   final Set<MemberEntity> analyzedElements = new Set<MemberEntity>();
 
@@ -261,18 +266,23 @@
   int overallRefineCount = 0;
   int addedInGraph = 0;
 
+  @override
   final CompilerOptions options;
   final Progress progress;
+  @override
   final DiagnosticReporter reporter;
   final CompilerOutput _compilerOutput;
 
-  /// The [JClosedWorld] on which inference reasoning is based.
+  @override
   final JsClosedWorld closedWorld;
+  @override
   final InferredDataBuilder inferredDataBuilder;
 
+  @override
   final TypeSystem types;
-  final Map<ir.Node, TypeInformation> concreteTypes =
-      new Map<ir.Node, TypeInformation>();
+  @override
+  final Map<ir.TreeNode, TypeInformation> concreteTypes =
+      new Map<ir.TreeNode, TypeInformation>();
 
   final Set<ConstructorEntity> generativeConstructorsExposingThis =
       new Set<ConstructorEntity>();
@@ -298,6 +308,7 @@
 
   ElementEnvironment get _elementEnvironment => closedWorld.elementEnvironment;
 
+  @override
   void forEachElementMatching(
       Selector selector, AbstractValue mask, bool f(MemberEntity element)) {
     Iterable<MemberEntity> elements = closedWorld.locateMembers(selector, mask);
@@ -307,6 +318,7 @@
   }
 
   // TODO(johnniwinther): Make this private again.
+  @override
   GlobalTypeInferenceElementData dataOfMember(MemberEntity element) =>
       _memberData[element] ??= new KernelGlobalTypeInferenceElementData();
 
@@ -340,6 +352,7 @@
     }
   }
 
+  @override
   TypeInformation typeOfNativeBehavior(NativeBehavior nativeBehavior) {
     if (nativeBehavior == null) return types.dynamicType;
     List typesReturned = nativeBehavior.typesReturned;
@@ -380,6 +393,7 @@
     return returnType;
   }
 
+  @override
   void updateSelectorInMember(MemberEntity owner, CallType callType,
       ir.Node node, Selector selector, AbstractValue mask) {
     KernelGlobalTypeInferenceElementData data = dataOfMember(owner);
@@ -401,26 +415,31 @@
     }
   }
 
+  @override
   bool checkIfExposesThis(ConstructorEntity element) {
     return generativeConstructorsExposingThis.contains(element);
   }
 
+  @override
   void recordExposesThis(ConstructorEntity element, bool exposesThis) {
     if (exposesThis) {
       generativeConstructorsExposingThis.add(element);
     }
   }
 
+  @override
   bool returnsListElementType(Selector selector, AbstractValue mask) {
     return mask != null &&
         abstractValueDomain.isContainer(mask) &&
         returnsListElementTypeSet.contains(selector);
   }
 
+  @override
   bool returnsMapValueType(Selector selector, AbstractValue mask) {
     return mask != null && abstractValueDomain.isMap(mask) && selector.isIndex;
   }
 
+  @override
   void analyzeListAndEnqueue(ListTypeInformation info) {
     if (info.analyzed) return;
     info.analyzed = true;
@@ -441,6 +460,25 @@
     workQueue.add(info.elementType);
   }
 
+  @override
+  void analyzeSetAndEnqueue(SetTypeInformation info) {
+    if (info.analyzed) return;
+    info.analyzed = true;
+
+    SetTracerVisitor tracer = new SetTracerVisitor(info, this);
+    bool succeeded = tracer.run();
+    if (!succeeded) return;
+
+    info.bailedOut = false;
+    info.elementType.inferred = true;
+
+    tracer.assignments.forEach(info.elementType.addAssignment);
+    // Enqueue the set for later refinement.
+    workQueue.add(info);
+    workQueue.add(info.elementType);
+  }
+
+  @override
   void analyzeMapAndEnqueue(MapTypeInformation info) {
     if (info.analyzed) return;
     info.analyzed = true;
@@ -466,6 +504,7 @@
     workQueue.add(info);
   }
 
+  @override
   void runOverAllElements() {
     analyzeAllElements();
     TypeGraphDump dump =
@@ -480,6 +519,11 @@
       analyzeListAndEnqueue(info);
     });
 
+    // Try to infer element types of sets and compute their escape information.
+    types.allocatedSets.values.forEach((TypeInformation info) {
+      analyzeSetAndEnqueue(info);
+    });
+
     // Try to infer the key and value types for maps and compute the values'
     // escape information.
     types.allocatedMaps.values.forEach((TypeInformation info) {
@@ -587,6 +631,13 @@
             'at ${abstractValueDomain.getAllocationElement(info.originalType)}'
             'after ${info.refineCount}');
       });
+      types.allocatedSets.values.forEach((_info) {
+        SetTypeInformation info = _info;
+        print('${info.type} '
+            'for ${abstractValueDomain.getAllocationNode(info.originalType)} '
+            'at ${abstractValueDomain.getAllocationElement(info.originalType)} '
+            'after ${info.refineCount}');
+      });
       types.allocatedMaps.values.forEach((_info) {
         MapTypeInformation info = _info;
         print('${info.type} '
@@ -702,6 +753,7 @@
     return function;
   }
 
+  @override
   void analyze(MemberEntity element) {
     if (analyzedElements.contains(element)) return;
     analyzedElements.add(element);
@@ -806,7 +858,7 @@
   /// Returns the [ConstantValue] for the initial value of [field], or
   /// `null` if the initializer is not a constant value.
   ConstantValue getFieldConstant(FieldEntity field) {
-    return closedWorld.elementMap.getFieldConstantValue(field);
+    return closedWorld.fieldAnalysis.getFieldData(field).initialValue;
   }
 
   /// Returns `true` if [cls] has a 'call' method.
@@ -875,6 +927,7 @@
     workQueue.addAll(types.allocatedCalls);
   }
 
+  @override
   void updateParameterAssignments(TypeInformation caller, MemberEntity callee,
       ArgumentsTypes arguments, Selector selector, AbstractValue mask,
       {bool remove, bool addToQueue: true}) {
@@ -939,6 +992,7 @@
     }
   }
 
+  @override
   void setDefaultTypeOfParameter(Local parameter, TypeInformation type,
       {bool isInstanceMember}) {
     assert(
@@ -966,6 +1020,7 @@
     }
   }
 
+  @override
   TypeInformation getDefaultTypeOfParameter(Local parameter) {
     return defaultTypeOfParameter.putIfAbsent(parameter, () {
       return new PlaceholderTypeInformation(
@@ -973,29 +1028,35 @@
     });
   }
 
+  @override
   bool hasAlreadyComputedTypeOfParameterDefault(Local parameter) {
     TypeInformation seen = defaultTypeOfParameter[parameter];
     return (seen != null && seen is! PlaceholderTypeInformation);
   }
 
+  @override
   TypeInformation typeOfParameter(Local element) {
     return types.getInferredTypeOfParameter(element);
   }
 
+  @override
   TypeInformation typeOfMember(MemberEntity element) {
     if (element is FunctionEntity) return types.functionType;
     return types.getInferredTypeOfMember(element);
   }
 
+  @override
   TypeInformation returnTypeOfMember(MemberEntity element) {
     if (element is! FunctionEntity) return types.dynamicType;
     return types.getInferredTypeOfMember(element);
   }
 
+  @override
   void recordTypeOfField(FieldEntity element, TypeInformation type) {
     types.getInferredTypeOfMember(element).addAssignment(type);
   }
 
+  @override
   void recordReturnType(FunctionEntity element, TypeInformation type) {
     TypeInformation info = types.getInferredTypeOfMember(element);
     if (element.name == '==') {
@@ -1008,6 +1069,7 @@
     if (info.assignments.isEmpty) info.addAssignment(type);
   }
 
+  @override
   TypeInformation addReturnTypeForMethod(
       FunctionEntity element, TypeInformation unused, TypeInformation newType) {
     TypeInformation type = types.getInferredTypeOfMember(element);
@@ -1020,6 +1082,7 @@
     return type;
   }
 
+  @override
   TypeInformation registerCalledMember(
       Object node,
       Selector selector,
@@ -1059,6 +1122,7 @@
     return info;
   }
 
+  @override
   TypeInformation registerCalledSelector(
       CallType callType,
       ir.Node node,
@@ -1101,6 +1165,7 @@
     return info;
   }
 
+  @override
   TypeInformation registerAwait(ir.Node node, TypeInformation argument) {
     AwaitTypeInformation info = new AwaitTypeInformation(
         abstractValueDomain, types.currentMember, node);
@@ -1109,6 +1174,7 @@
     return info;
   }
 
+  @override
   TypeInformation registerYield(ir.Node node, TypeInformation argument) {
     YieldTypeInformation info = new YieldTypeInformation(
         abstractValueDomain, types.currentMember, node);
@@ -1117,6 +1183,7 @@
     return info;
   }
 
+  @override
   TypeInformation registerCalledClosure(
       ir.Node node,
       Selector selector,
@@ -1142,6 +1209,7 @@
     return info;
   }
 
+  @override
   void close() {
     for (MemberTypeInformation typeInformation
         in types.memberTypeInformations.values) {
@@ -1149,6 +1217,7 @@
     }
   }
 
+  @override
   void clear() {
     if (retainDataForTesting) return;
 
@@ -1176,16 +1245,19 @@
     generativeConstructorsExposingThis.clear();
 
     types.allocatedMaps.values.forEach(cleanup);
+    types.allocatedSets.values.forEach(cleanup);
     types.allocatedLists.values.forEach(cleanup);
 
     _memberData.clear();
   }
 
+  @override
   Iterable<MemberEntity> getCallersOfForTesting(MemberEntity element) {
     MemberTypeInformation info = types.getInferredTypeOfMember(element);
     return info.callersForTesting;
   }
 
+  @override
   TypeInformation typeOfMemberWithSelector(
       MemberEntity element, Selector selector) {
     if (element.name == Identifiers.noSuchMethod_ &&
@@ -1215,11 +1287,7 @@
     }
   }
 
-  /// Returns true if global optimizations such as type inferencing can apply to
-  /// the field [element].
-  ///
-  /// One category of elements that do not apply is runtime helpers that the
-  /// backend calls, but the optimizations don't see those calls.
+  @override
   bool canFieldBeUsedForGlobalOptimizations(FieldEntity element) {
     if (closedWorld.backendUsage.isFieldUsedByBackend(element)) {
       return false;
@@ -1230,11 +1298,7 @@
     return true;
   }
 
-  /// Returns true if global optimizations such as type inferencing can apply to
-  /// the parameter [element].
-  ///
-  /// One category of elements that do not apply is runtime helpers that the
-  /// backend calls, but the optimizations don't see those calls.
+  @override
   bool canFunctionParametersBeUsedForGlobalOptimizations(
       FunctionEntity function) {
     return !closedWorld.backendUsage.isFunctionUsedByBackend(function);
@@ -1261,6 +1325,9 @@
   bool checkMapNode(ir.Node node) => true;
 
   @override
+  bool checkSetNode(ir.Node node) => true;
+
+  @override
   bool checkListNode(ir.Node node) => true;
 
   @override
@@ -1391,7 +1458,7 @@
         sendMap, iteratorMap, currentMap, moveNextMap);
   }
 
-  /// Serializes this [GlobalTypeInferenceElementData] to [sink].
+  @override
   void writeToDataSink(DataSink sink, AbstractValueDomain abstractValueDomain) {
     sink.begin(tag);
     sink.writeTreeNodeMap(
diff --git a/pkg/compiler/lib/src/inferrer/list_tracer.dart b/pkg/compiler/lib/src/inferrer/list_tracer.dart
index dfe10a0..0f7aa07 100644
--- a/pkg/compiler/lib/src/inferrer/list_tracer.dart
+++ b/pkg/compiler/lib/src/inferrer/list_tracer.dart
@@ -154,10 +154,12 @@
     }
   }
 
+  @override
   visitClosureCallSiteTypeInformation(ClosureCallSiteTypeInformation info) {
     bailout('Passed to a closure');
   }
 
+  @override
   visitStaticCallSiteTypeInformation(StaticCallSiteTypeInformation info) {
     super.visitStaticCallSiteTypeInformation(info);
     MemberEntity called = info.calledElement;
@@ -167,6 +169,7 @@
     }
   }
 
+  @override
   visitDynamicCallSiteTypeInformation(DynamicCallSiteTypeInformation info) {
     super.visitDynamicCallSiteTypeInformation(info);
     Selector selector = info.selector;
diff --git a/pkg/compiler/lib/src/inferrer/locals_handler.dart b/pkg/compiler/lib/src/inferrer/locals_handler.dart
index aff2896..a94ddbd 100644
--- a/pkg/compiler/lib/src/inferrer/locals_handler.dart
+++ b/pkg/compiler/lib/src/inferrer/locals_handler.dart
@@ -170,6 +170,7 @@
     sb.write(']');
   }
 
+  @override
   String toString() {
     String rest = parent == null ? "null" : parent.toString();
     return '{$variables} $rest';
@@ -253,12 +254,16 @@
       : positional = const [],
         named = const {};
 
+  @override
   int get length => positional.length + named.length;
 
+  @override
   Iterator<TypeInformation> get iterator => new ArgumentsTypesIterator(this);
 
+  @override
   String toString() => "{ positional = $positional, named = $named }";
 
+  @override
   bool operator ==(other) {
     if (positional.length != other.positional.length) return false;
     if (named.length != other.named.length) return false;
@@ -272,19 +277,23 @@
     return result;
   }
 
+  @override
   int get hashCode => throw new UnsupportedError('ArgumentsTypes.hashCode');
 
   bool hasNoArguments() => positional.isEmpty && named.isEmpty;
 
+  @override
   void forEach(void f(TypeInformation type)) {
     positional.forEach(f);
     named.values.forEach(f);
   }
 
+  @override
   bool every(bool f(TypeInformation type)) {
     return positional.every(f) && named.values.every(f);
   }
 
+  @override
   bool contains(Object type) {
     return positional.contains(type) || named.containsValue(type);
   }
@@ -302,8 +311,10 @@
   Iterator<TypeInformation> get _currentIterator =>
       _iteratePositional ? positional : named;
 
+  @override
   TypeInformation get current => _currentIterator.current;
 
+  @override
   bool moveNext() {
     if (_iteratePositional && positional.moveNext()) {
       return true;
@@ -587,6 +598,7 @@
     sb.write('\n]');
   }
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write('LocalsHandler(');
diff --git a/pkg/compiler/lib/src/inferrer/map_tracer.dart b/pkg/compiler/lib/src/inferrer/map_tracer.dart
index e9da06a..4925dfc 100644
--- a/pkg/compiler/lib/src/inferrer/map_tracer.dart
+++ b/pkg/compiler/lib/src/inferrer/map_tracer.dart
@@ -58,10 +58,12 @@
     return false;
   }
 
+  @override
   visitClosureCallSiteTypeInformation(ClosureCallSiteTypeInformation info) {
     bailout('Passed to a closure');
   }
 
+  @override
   visitStaticCallSiteTypeInformation(StaticCallSiteTypeInformation info) {
     super.visitStaticCallSiteTypeInformation(info);
     MemberEntity called = info.calledElement;
@@ -71,6 +73,7 @@
     }
   }
 
+  @override
   visitDynamicCallSiteTypeInformation(DynamicCallSiteTypeInformation info) {
     super.visitDynamicCallSiteTypeInformation(info);
     Selector selector = info.selector;
diff --git a/pkg/compiler/lib/src/inferrer/node_tracer.dart b/pkg/compiler/lib/src/inferrer/node_tracer.dart
index e0abccf..987cb11 100644
--- a/pkg/compiler/lib/src/inferrer/node_tracer.dart
+++ b/pkg/compiler/lib/src/inferrer/node_tracer.dart
@@ -51,6 +51,31 @@
   'checkGrowable',
 ]);
 
+Set<String> doesNotEscapeSetSet = new Set<String>.from(const <String>[
+  // From Object.
+  '==',
+  'hashCode',
+  'toString',
+  'noSuchMethod',
+  'runtimeType',
+
+  // From Iterable.
+  'isEmpty',
+  'isNotEmpty',
+  'length',
+  'contains',
+  'join',
+
+  // From Set.
+  'add',
+  'addAll',
+  'clear',
+  'containsAll',
+  'remove',
+  'removeAll',
+  'retainAll',
+]);
+
 Set<String> doesNotEscapeMapSet = new Set<String>.from(const <String>[
   // From Object.
   '==',
@@ -81,17 +106,23 @@
 
   TracerVisitor(this.tracedType, this.inferrer);
 
-  // Work list that gets populated with [TypeInformation] that could
-  // contain the container.
+  /// Work list that gets populated with [TypeInformation] that could
+  /// contain the container.
   final List<TypeInformation> workList = <TypeInformation>[];
 
-  // Work list of lists to analyze after analyzing the users of a
-  // [TypeInformation]. We know the [tracedType] has been stored in these
-  // lists and we must check how it escapes from these lists.
+  /// Work list of lists to analyze after analyzing the users of a
+  /// [TypeInformation]. We know the [tracedType] has been stored in these
+  /// lists and we must check how it escapes from these lists.
   final List<ListTypeInformation> listsToAnalyze = <ListTypeInformation>[];
-  // Work list of maps to analyze after analyzing the users of a
-  // [TypeInformation]. We know the [tracedType] has been stored in these
-  // maps and we must check how it escapes from these maps.
+
+  /// Work list of sets to analyze after analyzing the users of a
+  /// [TypeInformation]. We know the [tracedType] has been stored in these sets
+  /// and we must check how it escapes from these sets.
+  final List<SetTypeInformation> setsToAnalyze = <SetTypeInformation>[];
+
+  /// Work list of maps to analyze after analyzing the users of a
+  /// [TypeInformation]. We know the [tracedType] has been stored in these
+  /// maps and we must check how it escapes from these maps.
   final List<MapTypeInformation> mapsToAnalyze = <MapTypeInformation>[];
 
   final Setlet<TypeInformation> flowsInto = new Setlet<TypeInformation>();
@@ -136,6 +167,9 @@
       while (!listsToAnalyze.isEmpty) {
         analyzeStoredIntoList(listsToAnalyze.removeLast());
       }
+      while (setsToAnalyze.isNotEmpty) {
+        analyzeStoredIntoSet(setsToAnalyze.removeLast());
+      }
       while (!mapsToAnalyze.isEmpty) {
         analyzeStoredIntoMap(mapsToAnalyze.removeLast());
       }
@@ -150,10 +184,12 @@
     continueAnalyzing = false;
   }
 
+  @override
   void visitAwaitTypeInformation(AwaitTypeInformation info) {
     bailout("Passed through await");
   }
 
+  @override
   void visitYieldTypeInformation(YieldTypeInformation info) {
     // TODO(29344): The enclosing sync*/async/async* method could have a
     // tracable TypeInformation for the Iterable / Future / Stream with an
@@ -162,47 +198,70 @@
     bailout("Passed through yield");
   }
 
+  @override
   void visitNarrowTypeInformation(NarrowTypeInformation info) {
     addNewEscapeInformation(info);
   }
 
+  @override
   void visitPhiElementTypeInformation(PhiElementTypeInformation info) {
     addNewEscapeInformation(info);
   }
 
+  @override
   void visitElementInContainerTypeInformation(
       ElementInContainerTypeInformation info) {
     addNewEscapeInformation(info);
   }
 
+  @override
+  void visitElementInSetTypeInformation(ElementInSetTypeInformation info) {
+    addNewEscapeInformation(info);
+  }
+
+  @override
   void visitKeyInMapTypeInformation(KeyInMapTypeInformation info) {
     // We do not track the use of keys from a map, so we have to bail.
     bailout('Used as key in Map');
   }
 
+  @override
   void visitValueInMapTypeInformation(ValueInMapTypeInformation info) {
     addNewEscapeInformation(info);
   }
 
+  @override
   void visitListTypeInformation(ListTypeInformation info) {
     listsToAnalyze.add(info);
   }
 
+  @override
+  void visitSetTypeInformation(SetTypeInformation info) {
+    setsToAnalyze.add(info);
+  }
+
+  @override
   void visitMapTypeInformation(MapTypeInformation info) {
     mapsToAnalyze.add(info);
   }
 
+  @override
   void visitConcreteTypeInformation(ConcreteTypeInformation info) {}
 
+  @override
   void visitStringLiteralTypeInformation(StringLiteralTypeInformation info) {}
 
+  @override
   void visitBoolLiteralTypeInformation(BoolLiteralTypeInformation info) {}
 
+  @override
   void visitClosureTypeInformation(ClosureTypeInformation info) {}
 
+  @override
   void visitClosureCallSiteTypeInformation(
       ClosureCallSiteTypeInformation info) {}
 
+  @override
   visitStaticCallSiteTypeInformation(StaticCallSiteTypeInformation info) {
     MemberEntity called = info.calledElement;
     TypeInformation inferred = inferrer.types.getInferredTypeOfMember(called);
@@ -216,14 +275,35 @@
     if (list.bailedOut) {
       bailout('Stored in a list that bailed out');
     } else {
-      list.flowsInto.forEach((flow) {
-        flow.users.forEach((dynamic user) {
-          if (user is! DynamicCallSiteTypeInformation) return;
-          if (user.receiver != flow) return;
-          if (inferrer.returnsListElementTypeSet.contains(user.selector)) {
-            addNewEscapeInformation(user);
-          } else if (!doesNotEscapeListSet.contains(user.selector.name)) {
-            bailout('Escape from a list via [${user.selector.name}]');
+      list.flowsInto.forEach((TypeInformation flow) {
+        flow.users.forEach((TypeInformation user) {
+          if (user is DynamicCallSiteTypeInformation) {
+            if (user.receiver != flow) return;
+            if (inferrer.returnsListElementTypeSet.contains(user.selector)) {
+              addNewEscapeInformation(user);
+            } else if (!doesNotEscapeListSet.contains(user.selector.name)) {
+              bailout('Escape from a list via [${user.selector.name}]');
+            }
+          }
+        });
+      });
+    }
+  }
+
+  void analyzeStoredIntoSet(SetTypeInformation set) {
+    inferrer.analyzeSetAndEnqueue(set);
+    if (set.bailedOut) {
+      bailout('Stored in a set that bailed out');
+    } else {
+      set.flowsInto.forEach((TypeInformation flow) {
+        flow.users.forEach((TypeInformation user) {
+          if (user is DynamicCallSiteTypeInformation) {
+            if (user.receiver != flow) return;
+            if (user.selector.isIndex) {
+              addNewEscapeInformation(user);
+            } else if (!doesNotEscapeSetSet.contains(user.selector.name)) {
+              bailout('Escape from a set via [${user.selector.name}]');
+            }
           }
         });
       });
@@ -235,14 +315,15 @@
     if (map.bailedOut) {
       bailout('Stored in a map that bailed out');
     } else {
-      map.flowsInto.forEach((flow) {
-        flow.users.forEach((dynamic user) {
-          if (user is! DynamicCallSiteTypeInformation) return;
-          if (user.receiver != flow) return;
-          if (user.selector.isIndex) {
-            addNewEscapeInformation(user);
-          } else if (!doesNotEscapeMapSet.contains(user.selector.name)) {
-            bailout('Escape from a map via [${user.selector.name}]');
+      map.flowsInto.forEach((TypeInformation flow) {
+        flow.users.forEach((TypeInformation user) {
+          if (user is DynamicCallSiteTypeInformation) {
+            if (user.receiver != flow) return;
+            if (user.selector.isIndex) {
+              addNewEscapeInformation(user);
+            } else if (!doesNotEscapeMapSet.contains(user.selector.name)) {
+              bailout('Escape from a map via [${user.selector.name}]');
+            }
           }
         });
       });
@@ -298,6 +379,7 @@
     }
   }
 
+  @override
   void visitDynamicCallSiteTypeInformation(
       DynamicCallSiteTypeInformation info) {
     void addsToContainer(AbstractValue mask) {
@@ -433,6 +515,7 @@
     return cls != null && cls.isClosure;
   }
 
+  @override
   void visitMemberTypeInformation(MemberTypeInformation info) {
     if (info.isClosurized) {
       bailout('Returned from a closurized method');
@@ -447,6 +530,7 @@
     addNewEscapeInformation(info);
   }
 
+  @override
   void visitParameterTypeInformation(ParameterTypeInformation info) {
     if (inferrer.closedWorld.nativeData.isNativeMember(info.method)) {
       bailout('Passed to a native method');
diff --git a/pkg/compiler/lib/src/inferrer/set_tracer.dart b/pkg/compiler/lib/src/inferrer/set_tracer.dart
new file mode 100644
index 0000000..6c809ad
--- /dev/null
+++ b/pkg/compiler/lib/src/inferrer/set_tracer.dart
@@ -0,0 +1,131 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library compiler.src.inferrer.set_tracer;
+
+import '../elements/entities.dart';
+import '../js_backend/backend.dart' show JavaScriptBackend;
+import '../universe/selector.dart' show Selector;
+import 'node_tracer.dart';
+import 'type_graph_nodes.dart';
+
+/// A set of selector names that [Set] implements and which we know do not
+/// change the element type of the set or let the set escape to code that might
+/// change the element type.
+Set<String> okSetSelectorSet = new Set<String>.from(const <String>[
+  // From Object.
+  '==',
+  'hashCode',
+  'toString',
+  'noSuchMethod',
+  'runtimeType',
+
+  // From Iterable.
+  'iterator',
+  'map',
+  'where',
+  'expand',
+  'contains',
+  'forEach',
+  'reduce',
+  'fold',
+  'every',
+  'join',
+  'any',
+  'toList',
+  'toSet',
+  'length',
+  'isEmpty',
+  'isNotEmpty',
+  'take',
+  'takeWhile',
+  'skip',
+  'skipWhile',
+  'first',
+  'last',
+  'single',
+  'firstWhere',
+  'lastWhere',
+  'singleWhere',
+  'elementAt',
+
+  // From Set.
+  'clear',
+  'containsAll',
+  'difference',
+  'intersection',
+  'lookup',
+  'remove',
+  'removeAll',
+  'removeWhere',
+  'retainAll',
+  'retainWhere',
+  'union',
+]);
+
+class SetTracerVisitor extends TracerVisitor {
+  List<TypeInformation> assignments = <TypeInformation>[];
+
+  SetTracerVisitor(tracedType, inferrer) : super(tracedType, inferrer);
+
+  /// Returns [true] if the analysis completed successfully, [false] if it
+  /// bailed out. In the former case, [assignments] holds a list of
+  /// [TypeInformation] nodes that flow into the element type of this set.
+  bool run() {
+    analyze();
+    SetTypeInformation set = tracedType;
+    if (continueAnalyzing) {
+      set.addFlowsIntoTargets(flowsInto);
+      return true;
+    }
+    assignments = null;
+    return false;
+  }
+
+  @override
+  visitClosureCallSiteTypeInformation(ClosureCallSiteTypeInformation info) {
+    bailout('Passed to a closure');
+  }
+
+  @override
+  visitStaticCallSiteTypeInformation(StaticCallSiteTypeInformation info) {
+    super.visitStaticCallSiteTypeInformation(info);
+    MemberEntity called = info.calledElement;
+    if (inferrer.closedWorld.commonElements.isForeign(called) &&
+        called.name == JavaScriptBackend.JS) {
+      bailout('Used in JS ${info.debugName}');
+    }
+  }
+
+  @override
+  visitDynamicCallSiteTypeInformation(DynamicCallSiteTypeInformation info) {
+    super.visitDynamicCallSiteTypeInformation(info);
+    Selector selector = info.selector;
+    String selectorName = selector.name;
+    if (currentUser == info.receiver) {
+      if (!okSetSelectorSet.contains(selectorName)) {
+        if (selector.isCall) {
+          switch (selectorName) {
+            case 'add':
+              assignments.add(info.arguments.positional[0]);
+              break;
+            case 'addAll':
+              // TODO(fishythefish): Extract type argument from type
+              // information.
+              bailout('Adding iterable with unknown typeinfo to current set');
+              break;
+            default:
+              bailout('Set used in a not-ok selector [$selectorName]');
+          }
+          return;
+        }
+      }
+    } else if (selector.isCall &&
+        (info.hasClosureCallTargets ||
+            info.concreteTargets.any((element) => !element.isFunction))) {
+      bailout('Passed to a closure');
+      return;
+    }
+  }
+}
diff --git a/pkg/compiler/lib/src/inferrer/trivial.dart b/pkg/compiler/lib/src/inferrer/trivial.dart
index 86df64c..9d4d5ef 100644
--- a/pkg/compiler/lib/src/inferrer/trivial.dart
+++ b/pkg/compiler/lib/src/inferrer/trivial.dart
@@ -16,6 +16,7 @@
 class TrivialAbstractValue implements AbstractValue {
   const TrivialAbstractValue();
 
+  @override
   String toString() => '?';
 }
 
@@ -146,6 +147,22 @@
   bool isMap(AbstractValue value) => false;
 
   @override
+  AbstractValue getSetElementType(AbstractValue value) {
+    throw new UnsupportedError("TrivialAbstractValueDomain.getSetElementType");
+  }
+
+  @override
+  AbstractValue createSetValue(
+          AbstractValue originalValue,
+          Object allocationNode,
+          MemberEntity allocationElement,
+          AbstractValue elementType) =>
+      const TrivialAbstractValue();
+
+  @override
+  bool isSet(AbstractValue value) => false;
+
+  @override
   int getContainerLength(AbstractValue value) => null;
 
   @override
@@ -356,6 +373,9 @@
   AbstractValue get constMapType => const TrivialAbstractValue();
 
   @override
+  AbstractValue get constSetType => const TrivialAbstractValue();
+
+  @override
   AbstractValue get constListType => const TrivialAbstractValue();
 
   @override
@@ -383,6 +403,9 @@
   AbstractValue get mapType => const TrivialAbstractValue();
 
   @override
+  AbstractValue get setType => const TrivialAbstractValue();
+
+  @override
   AbstractValue get listType => const TrivialAbstractValue();
 
   @override
@@ -450,5 +473,6 @@
   @override
   bool canHit(MemberEntity element, Name name, World world) => true;
 
+  @override
   String toString() => 'TrivialUniverseSelectorConstraints:$hashCode';
 }
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_dump.dart b/pkg/compiler/lib/src/inferrer/type_graph_dump.dart
index 9eadce5..70d3fa0 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_dump.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_dump.dart
@@ -317,6 +317,7 @@
     }
   }
 
+  @override
   void visitNarrowTypeInformation(NarrowTypeInformation info) {
     // Omit unused Narrows.
     if (!PRINT_GRAPH_ALL_NODES && info.users.isEmpty) return;
@@ -324,42 +325,61 @@
         color: narrowColor);
   }
 
+  @override
   void visitPhiElementTypeInformation(PhiElementTypeInformation info) {
     // Omit unused Phis.
     if (!PRINT_GRAPH_ALL_NODES && info.users.isEmpty) return;
     addNode(info, 'Phi ${info.variable?.name ?? ''}', color: phiColor);
   }
 
+  @override
   void visitElementInContainerTypeInformation(
       ElementInContainerTypeInformation info) {
     addNode(info, 'ElementInContainer');
   }
 
+  @override
+  void visitElementInSetTypeInformation(ElementInSetTypeInformation info) {
+    addNode(info, 'ElementInSet');
+  }
+
+  @override
   void visitKeyInMapTypeInformation(KeyInMapTypeInformation info) {
     addNode(info, 'KeyInMap');
   }
 
+  @override
   void visitValueInMapTypeInformation(ValueInMapTypeInformation info) {
     addNode(info, 'ValueInMap');
   }
 
+  @override
   void visitListTypeInformation(ListTypeInformation info) {
     addNode(info, 'List');
   }
 
+  @override
+  void visitSetTypeInformation(SetTypeInformation info) {
+    addNode(info, 'Set');
+  }
+
+  @override
   void visitMapTypeInformation(MapTypeInformation info) {
     addNode(info, 'Map');
   }
 
+  @override
   void visitConcreteTypeInformation(ConcreteTypeInformation info) {
     addNode(info, 'Concrete');
   }
 
+  @override
   void visitStringLiteralTypeInformation(StringLiteralTypeInformation info) {
     String text = shorten(info.value).replaceAll('\n', '\\n');
     addNode(info, 'StringLiteral\n"$text"');
   }
 
+  @override
   void visitBoolLiteralTypeInformation(BoolLiteralTypeInformation info) {
     addNode(info, 'BoolLiteral\n${info.value}');
   }
@@ -379,38 +399,46 @@
     addNode(info, text, color: callColor, inputs: inputs);
   }
 
+  @override
   void visitClosureCallSiteTypeInformation(
       ClosureCallSiteTypeInformation info) {
     handleCall(info, 'ClosureCallSite', {});
   }
 
+  @override
   void visitStaticCallSiteTypeInformation(StaticCallSiteTypeInformation info) {
     handleCall(info, 'StaticCallSite', {});
   }
 
+  @override
   void visitDynamicCallSiteTypeInformation(
       DynamicCallSiteTypeInformation info) {
     handleCall(info, 'DynamicCallSite', {'obj': info.receiver});
   }
 
+  @override
   void visitMemberTypeInformation(MemberTypeInformation info) {
     addNode(info, 'Member\n${info.debugName}');
   }
 
+  @override
   void visitParameterTypeInformation(ParameterTypeInformation info) {
     addNode(info, 'Parameter ${info.debugName}');
   }
 
+  @override
   void visitClosureTypeInformation(ClosureTypeInformation info) {
     String text = shorten('${info.debugName}');
     addNode(info, 'Closure\n$text');
   }
 
+  @override
   void visitAwaitTypeInformation(AwaitTypeInformation info) {
     String text = shorten('${info.debugName}');
     addNode(info, 'Await\n$text');
   }
 
+  @override
   void visitYieldTypeInformation(YieldTypeInformation info) {
     String text = shorten('${info.debugName}');
     addNode(info, 'Yield\n$text');
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart b/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
index d9f69ca..d1b919c 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
@@ -62,6 +62,7 @@
   AbstractValueDomain get abstractValueDomain =>
       closedWorld.abstractValueDomain;
 
+  @override
   GlobalTypeInferenceResults analyzeMain(FunctionEntity main) {
     inferrer = createInferrerEngineFor(main);
     inferrer.runOverAllElements();
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
index 794e62d..b8d5dcc 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
@@ -79,6 +79,7 @@
 
   // TypeInformations are unique. Store an arbitrary identity hash code.
   static int _staticHashCode = 0;
+  @override
   final int hashCode = _staticHashCode = (_staticHashCode + 1).toUnsigned(30);
 
   bool get isConcrete => false;
@@ -248,14 +249,17 @@
       AbstractValueDomain abstractValueDomain, MemberTypeInformation context)
       : super(abstractValueDomain.emptyType, context);
 
+  @override
   void accept(TypeInformationVisitor visitor) {
     throw new UnsupportedError("Cannot visit placeholder");
   }
 
+  @override
   AbstractValue computeType(InferrerEngine inferrer) {
     throw new UnsupportedError("Cannot refine placeholder");
   }
 
+  @override
   toString() => "Placeholder [$hashCode]";
 }
 
@@ -296,11 +300,15 @@
     }
   }
 
+  @override
   Iterator<TypeInformation> get iterator => assignments.keys.iterator;
+  @override
   Iterable<TypeInformation> where(Function f) => assignments.keys.where(f);
 
+  @override
   bool contains(Object info) => assignments.containsKey(info);
 
+  @override
   String toString() => assignments.keys.toList().toString();
 }
 
@@ -386,6 +394,7 @@
 
   MemberEntity get member => _member;
 
+  @override
   String get debugName => '$member';
 
   void addCall(MemberEntity caller, Object node) {
@@ -438,6 +447,7 @@
   // [users] is accurate. The inference stops tracking users for stable types.
   // Note that we only override the getter, the setter will still modify the
   // state of the [isStable] field inherited from [TypeInformation].
+  @override
   bool get isStable => super.isStable && !isClosurized;
 
   AbstractValue handleSpecialCases(InferrerEngine inferrer);
@@ -469,6 +479,7 @@
   AbstractValue _potentiallyNarrowType(
       AbstractValue mask, InferrerEngine inferrer);
 
+  @override
   AbstractValue computeType(InferrerEngine inferrer) {
     AbstractValue special = handleSpecialCases(inferrer);
     if (special != null) return potentiallyNarrowType(special, inferrer);
@@ -476,16 +487,20 @@
         inferrer.types.computeTypeMask(assignments), inferrer);
   }
 
+  @override
   AbstractValue safeType(InferrerEngine inferrer) {
     return potentiallyNarrowType(super.safeType(inferrer), inferrer);
   }
 
+  @override
   String toString() => 'Member $_member $type';
 
+  @override
   accept(TypeInformationVisitor visitor) {
     return visitor.visitMemberTypeInformation(this);
   }
 
+  @override
   void cleanup() {
     _callers = null;
     super.cleanup();
@@ -505,6 +520,7 @@
       AbstractValueDomain abstractValueDomain, FieldEntity element, this._type)
       : super._internal(abstractValueDomain, element);
 
+  @override
   AbstractValue handleSpecialCases(InferrerEngine inferrer) {
     if (!inferrer.canFieldBeUsedForGlobalOptimizations(_field) ||
         inferrer.assumeDynamic(_field)) {
@@ -527,11 +543,13 @@
     return null;
   }
 
+  @override
   AbstractValue _potentiallyNarrowType(
       AbstractValue mask, InferrerEngine inferrer) {
     return _narrowType(inferrer.closedWorld, mask, _type);
   }
 
+  @override
   bool hasStableType(InferrerEngine inferrer) {
     // The number of assignments of non-final fields is
     // not stable. Therefore such a field cannot be stable.
@@ -550,10 +568,12 @@
       FunctionEntity element, this._type)
       : super._internal(abstractValueDomain, element);
 
+  @override
   AbstractValue handleSpecialCases(InferrerEngine inferrer) {
     return _handleFunctionCase(_getter, inferrer);
   }
 
+  @override
   AbstractValue _potentiallyNarrowType(
       AbstractValue mask, InferrerEngine inferrer) {
     return _narrowType(inferrer.closedWorld, mask, _type.returnType);
@@ -567,10 +587,12 @@
       AbstractValueDomain abstractValueDomain, FunctionEntity element)
       : super._internal(abstractValueDomain, element);
 
+  @override
   AbstractValue handleSpecialCases(InferrerEngine inferrer) {
     return _handleFunctionCase(_setter, inferrer);
   }
 
+  @override
   AbstractValue _potentiallyNarrowType(
       AbstractValue mask, InferrerEngine inferrer) {
     return mask;
@@ -585,15 +607,18 @@
       FunctionEntity element, this._type)
       : super._internal(abstractValueDomain, element);
 
+  @override
   AbstractValue handleSpecialCases(InferrerEngine inferrer) {
     return _handleFunctionCase(_method, inferrer);
   }
 
+  @override
   AbstractValue _potentiallyNarrowType(
       AbstractValue mask, InferrerEngine inferrer) {
     return _narrowType(inferrer.closedWorld, mask, _type.returnType);
   }
 
+  @override
   bool hasStableType(InferrerEngine inferrer) => false;
 }
 
@@ -605,6 +630,7 @@
       ConstructorEntity element, this._type)
       : super._internal(abstractValueDomain, element);
 
+  @override
   AbstractValue handleSpecialCases(InferrerEngine inferrer) {
     AbstractValueDomain abstractValueDomain = inferrer.abstractValueDomain;
     if (_constructor.isFromEnvironmentConstructor) {
@@ -624,11 +650,13 @@
     return _handleFunctionCase(_constructor, inferrer);
   }
 
+  @override
   AbstractValue _potentiallyNarrowType(
       AbstractValue mask, InferrerEngine inferrer) {
     return _narrowType(inferrer.closedWorld, mask, _type.returnType);
   }
 
+  @override
   bool hasStableType(InferrerEngine inferrer) {
     return super.hasStableType(inferrer);
   }
@@ -641,15 +669,18 @@
       AbstractValueDomain abstractValueDomain, ConstructorEntity element)
       : super._internal(abstractValueDomain, element);
 
+  @override
   AbstractValue handleSpecialCases(InferrerEngine inferrer) {
     return _handleFunctionCase(_constructor, inferrer);
   }
 
+  @override
   AbstractValue _potentiallyNarrowType(
       AbstractValue mask, InferrerEngine inferrer) {
     return mask;
   }
 
+  @override
   bool hasStableType(InferrerEngine inferrer) {
     return super.hasStableType(inferrer);
   }
@@ -708,6 +739,7 @@
 
   bool get isRegularParameter => !_isInitializingFormal;
 
+  @override
   String get debugName => '$parameter';
 
   void tagAsTearOffClosureParameter(InferrerEngine inferrer) {
@@ -805,6 +837,7 @@
     return mask;
   }
 
+  @override
   AbstractValue computeType(InferrerEngine inferrer) {
     AbstractValue special = handleSpecialCases(inferrer);
     if (special != null) return special;
@@ -812,10 +845,12 @@
         inferrer.types.computeTypeMask(assignments), inferrer);
   }
 
+  @override
   AbstractValue safeType(InferrerEngine inferrer) {
     return potentiallyNarrowType(super.safeType(inferrer), inferrer);
   }
 
+  @override
   bool hasStableType(InferrerEngine inferrer) {
     // The number of assignments of parameters of instance methods is
     // not stable. Therefore such a parameter cannot be stable.
@@ -825,10 +860,12 @@
     return super.hasStableType(inferrer);
   }
 
+  @override
   accept(TypeInformationVisitor visitor) {
     return visitor.visitParameterTypeInformation(this);
   }
 
+  @override
   String toString() => 'Parameter $_parameter $type';
 
   @override
@@ -882,6 +919,7 @@
     assert(_call is ir.Node);
   }
 
+  @override
   String toString() => 'Call site $debugName $type';
 
   /// Add [this] to the graph being computed by [engine].
@@ -913,6 +951,7 @@
     return inferrer.types.getInferredTypeOfMember(calledElement);
   }
 
+  @override
   void addToGraph(InferrerEngine inferrer) {
     MemberTypeInformation callee = _getCalledTypeInfo(inferrer);
     callee.addCall(caller, _call);
@@ -937,6 +976,7 @@
     return inferrer.typeOfMemberWithSelector(calledElement, selector);
   }
 
+  @override
   AbstractValue computeType(InferrerEngine inferrer) {
     if (isSynthesized) {
       assert(arguments != null);
@@ -946,12 +986,15 @@
     }
   }
 
+  @override
   Iterable<MemberEntity> get callees => [calledElement];
 
+  @override
   accept(TypeInformationVisitor visitor) {
     return visitor.visitStaticCallSiteTypeInformation(this);
   }
 
+  @override
   bool hasStableType(InferrerEngine inferrer) {
     bool isStable = _getCalledTypeInfo(inferrer).isStable;
     return isStable &&
@@ -959,6 +1002,7 @@
         super.hasStableType(inferrer);
   }
 
+  @override
   void removeAndClearReferences(InferrerEngine inferrer) {
     ElementTypeInformation callee = _getCalledTypeInfo(inferrer);
     callee.removeUser(this);
@@ -995,6 +1039,7 @@
     assert(validCallType(_callType, _call));
   }
 
+  @override
   void addToGraph(InferrerEngine inferrer) {
     assert(receiver != null);
     AbstractValue typeMask = computeTypedSelector(inferrer);
@@ -1024,6 +1069,7 @@
   /// methods on closures.
   Iterable<MemberEntity> get concreteTargets => _concreteTargets;
 
+  @override
   Iterable<MemberEntity> get callees => _concreteTargets;
 
   AbstractValue computeTypedSelector(InferrerEngine inferrer) {
@@ -1151,6 +1197,7 @@
     }
   }
 
+  @override
   AbstractValue computeType(InferrerEngine inferrer) {
     JClosedWorld closedWorld = inferrer.closedWorld;
     AbstractValueDomain abstractValueDomain = closedWorld.abstractValueDomain;
@@ -1248,6 +1295,7 @@
     return result;
   }
 
+  @override
   void giveUp(InferrerEngine inferrer, {bool clearAssignments: true}) {
     if (!abandonInferencing) {
       inferrer.updateSelectorInMember(caller, _callType, _call, selector, mask);
@@ -1269,6 +1317,7 @@
     super.giveUp(inferrer, clearAssignments: clearAssignments);
   }
 
+  @override
   void removeAndClearReferences(InferrerEngine inferrer) {
     for (MemberEntity element in _concreteTargets) {
       MemberTypeInformation callee =
@@ -1281,12 +1330,15 @@
     super.removeAndClearReferences(inferrer);
   }
 
+  @override
   String toString() => 'Call site $debugName on ${receiver.type} $type';
 
+  @override
   accept(TypeInformationVisitor visitor) {
     return visitor.visitDynamicCallSiteTypeInformation(this);
   }
 
+  @override
   bool hasStableType(InferrerEngine inferrer) {
     return receiver.isStable &&
         _concreteTargets.every((MemberEntity element) =>
@@ -1312,23 +1364,29 @@
       : super(abstractValueDomain, context, call, enclosing, selector, mask,
             arguments, inLoop);
 
+  @override
   void addToGraph(InferrerEngine inferrer) {
     arguments.forEach((info) => info.addUser(this));
     closure.addUser(this);
   }
 
+  @override
   AbstractValue computeType(InferrerEngine inferrer) => safeType(inferrer);
 
+  @override
   Iterable<MemberEntity> get callees {
     throw new UnsupportedError("Cannot compute callees of a closure call.");
   }
 
+  @override
   String toString() => 'Closure call $debugName on $closure';
 
+  @override
   accept(TypeInformationVisitor visitor) {
     return visitor.visitClosureCallSiteTypeInformation(this);
   }
 
+  @override
   void removeAndClearReferences(InferrerEngine inferrer) {
     // This method is a placeholder for the following comment:
     // We should maintain the information that the closure is a user
@@ -1353,40 +1411,51 @@
     this.isStable = true;
   }
 
+  @override
   bool get isConcrete => true;
 
+  @override
   void addUser(TypeInformation user) {
     // Nothing to do, a concrete type does not get updated so never
     // needs to notify its users.
   }
 
+  @override
   void addUsersOf(TypeInformation other) {
     // Nothing to do, a concrete type does not get updated so never
     // needs to notify its users.
   }
 
+  @override
   void removeUser(TypeInformation user) {}
 
+  @override
   void addAssignment(TypeInformation assignment) {
     throw "Not supported";
   }
 
+  @override
   void removeAssignment(TypeInformation assignment) {
     throw "Not supported";
   }
 
+  @override
   AbstractValue computeType(InferrerEngine inferrer) => type;
 
+  @override
   bool reset(InferrerEngine inferrer) {
     throw "Not supported";
   }
 
+  @override
   String toString() => 'Type $type';
 
+  @override
   accept(TypeInformationVisitor visitor) {
     return visitor.visitConcreteTypeInformation(this);
   }
 
+  @override
   bool hasStableType(InferrerEngine inferrer) => true;
 }
 
@@ -1399,8 +1468,10 @@
             mask, new StringConstantValue(value)));
 
   String asString() => value;
+  @override
   String toString() => 'Type $type value ${value}';
 
+  @override
   accept(TypeInformationVisitor visitor) {
     return visitor.visitStringLiteralTypeInformation(this);
   }
@@ -1414,8 +1485,10 @@
       : super(abstractValueDomain.createPrimitiveValue(
             mask, value ? new TrueConstantValue() : new FalseConstantValue()));
 
+  @override
   String toString() => 'Type $type value ${value}';
 
+  @override
   accept(TypeInformationVisitor visitor) {
     return visitor.visitBoolLiteralTypeInformation(this);
   }
@@ -1447,11 +1520,13 @@
     addAssignment(narrowedType);
   }
 
+  @override
   addAssignment(TypeInformation info) {
     super.addAssignment(info);
     assert(assignments.length == 1);
   }
 
+  @override
   AbstractValue computeType(InferrerEngine inferrer) {
     AbstractValueDomain abstractValueDomain = inferrer.abstractValueDomain;
     AbstractValue input = assignments.first.type;
@@ -1469,10 +1544,12 @@
     return intersection;
   }
 
+  @override
   String toString() {
     return 'Narrow to $typeAnnotation $type';
   }
 
+  @override
   accept(TypeInformationVisitor visitor) {
     return visitor.visitNarrowTypeInformation(this);
   }
@@ -1492,11 +1569,13 @@
     if (parentType != null) addAssignment(parentType);
   }
 
+  @override
   AbstractValue computeType(InferrerEngine inferrer) {
     if (!inferred) return safeType(inferrer);
     return inferrer.types.computeTypeMask(assignments);
   }
 
+  @override
   bool hasStableType(InferrerEngine inferrer) {
     return inferred && super.hasStableType(inferrer);
   }
@@ -1531,16 +1610,20 @@
     elementType.addUser(this);
   }
 
+  @override
   String toString() => 'List type $type';
 
+  @override
   accept(TypeInformationVisitor visitor) {
     return visitor.visitListTypeInformation(this);
   }
 
+  @override
   bool hasStableType(InferrerEngine inferrer) {
     return elementType.isStable && super.hasStableType(inferrer);
   }
 
+  @override
   AbstractValue computeType(InferrerEngine inferrer) {
     AbstractValueDomain abstractValueDomain = inferrer.abstractValueDomain;
     AbstractValue mask = type;
@@ -1557,8 +1640,10 @@
     return mask;
   }
 
+  @override
   AbstractValue safeType(InferrerEngine inferrer) => originalType;
 
+  @override
   void cleanup() {
     super.cleanup();
     elementType.cleanup();
@@ -1573,13 +1658,82 @@
       MemberTypeInformation context, elementType)
       : super(abstractValueDomain, context, elementType);
 
+  @override
   String toString() => 'Element in container $type';
 
+  @override
   accept(TypeInformationVisitor visitor) {
     return visitor.visitElementInContainerTypeInformation(this);
   }
 }
 
+/// A [SetTypeInformation] is a [TypeInformation] created for sets.
+class SetTypeInformation extends TypeInformation with TracedTypeInformation {
+  final ElementInSetTypeInformation elementType;
+
+  final AbstractValue originalType;
+
+  SetTypeInformation(
+      MemberTypeInformation context, this.originalType, this.elementType)
+      : super(originalType, context) {
+    elementType.addUser(this);
+  }
+
+  @override
+  String toString() => 'Set type $type';
+
+  @override
+  accept(TypeInformationVisitor visitor) {
+    return visitor.visitSetTypeInformation(this);
+  }
+
+  @override
+  AbstractValue computeType(InferrerEngine inferrer) {
+    AbstractValueDomain abstractValueDomain = inferrer.abstractValueDomain;
+    AbstractValue mask = type;
+    if (!abstractValueDomain.isSet(type) ||
+        abstractValueDomain.getSetElementType(type) != elementType.type) {
+      return abstractValueDomain.createSetValue(
+          abstractValueDomain.getGeneralization(originalType),
+          abstractValueDomain.getAllocationNode(originalType),
+          abstractValueDomain.getAllocationElement(originalType),
+          elementType.type);
+    }
+    return mask;
+  }
+
+  @override
+  AbstractValue safeType(InferrerEngine inferrer) => originalType;
+
+  @override
+  bool hasStableType(InferrerEngine inferrer) {
+    return elementType.isStable && super.hasStableType(inferrer);
+  }
+
+  @override
+  void cleanup() {
+    super.cleanup();
+    elementType.cleanup();
+    _flowsInto = null;
+  }
+}
+
+/// An [ElementInSetTypeInformation] holds the common type of the elements in a
+/// [SetTypeInformation].
+class ElementInSetTypeInformation extends InferredTypeInformation {
+  ElementInSetTypeInformation(AbstractValueDomain abstractValueDomain,
+      MemberTypeInformation context, elementType)
+      : super(abstractValueDomain, context, elementType);
+
+  @override
+  String toString() => 'Element in set $type';
+
+  @override
+  accept(TypeInformationVisitor visitor) {
+    return visitor.visitElementInSetTypeInformation(this);
+  }
+}
+
 /// A [MapTypeInformation] is a [TypeInformation] created
 /// for maps.
 class MapTypeInformation extends TypeInformation with TracedTypeInformation {
@@ -1654,10 +1808,12 @@
     typeInfoMap.values.forEach((v) => v.inferred = true);
   }
 
+  @override
   addAssignment(TypeInformation other) {
     throw "not supported";
   }
 
+  @override
   accept(TypeInformationVisitor visitor) {
     return visitor.visitMapTypeInformation(this);
   }
@@ -1686,6 +1842,7 @@
     }
   }
 
+  @override
   AbstractValue computeType(InferrerEngine inferrer) {
     AbstractValueDomain abstractValueDomain = inferrer.abstractValueDomain;
     if (abstractValueDomain.isDictionary(type) != inDictionaryMode) {
@@ -1716,14 +1873,17 @@
     return type;
   }
 
+  @override
   AbstractValue safeType(InferrerEngine inferrer) => originalType;
 
+  @override
   bool hasStableType(InferrerEngine inferrer) {
     return keyType.isStable &&
         valueType.isStable &&
         super.hasStableType(inferrer);
   }
 
+  @override
   void cleanup() {
     super.cleanup();
     keyType.cleanup();
@@ -1734,6 +1894,7 @@
     _flowsInto = null;
   }
 
+  @override
   String toString() {
     return 'Map $type (K:$keyType, V:$valueType) contents $typeInfoMap';
   }
@@ -1746,10 +1907,12 @@
       MemberTypeInformation context, TypeInformation keyType)
       : super(abstractValueDomain, context, keyType);
 
+  @override
   accept(TypeInformationVisitor visitor) {
     return visitor.visitKeyInMapTypeInformation(this);
   }
 
+  @override
   String toString() => 'Key in Map $type';
 }
 
@@ -1766,16 +1929,19 @@
       [this.nonNull = false])
       : super(abstractValueDomain, context, valueType);
 
+  @override
   accept(TypeInformationVisitor visitor) {
     return visitor.visitValueInMapTypeInformation(this);
   }
 
+  @override
   AbstractValue computeType(InferrerEngine inferrer) {
     return nonNull
         ? super.computeType(inferrer)
         : inferrer.abstractValueDomain.includeNull(super.computeType(inferrer));
   }
 
+  @override
   String toString() => 'Value in Map $type';
 }
 
@@ -1791,12 +1957,15 @@
       {this.isTry})
       : super(abstractValueDomain.emptyType, context);
 
+  @override
   AbstractValue computeType(InferrerEngine inferrer) {
     return inferrer.types.computeTypeMask(assignments);
   }
 
+  @override
   String toString() => 'Phi($hashCode) $variable $type';
 
+  @override
   void _toStructuredText(
       StringBuffer sb, String indent, Set<TypeInformation> seen) {
     if (seen.add(this)) {
@@ -1811,6 +1980,7 @@
     }
   }
 
+  @override
   accept(TypeInformationVisitor visitor) {
     return visitor.visitPhiElementTypeInformation(this);
   }
@@ -1826,20 +1996,25 @@
 
   FunctionEntity get closure => _element;
 
+  @override
   AbstractValue computeType(InferrerEngine inferrer) => safeType(inferrer);
 
+  @override
   AbstractValue safeType(InferrerEngine inferrer) {
     return inferrer.types.functionType.type;
   }
 
   String get debugName => '$closure';
 
+  @override
   String toString() => 'Closure $_element';
 
+  @override
   accept(TypeInformationVisitor visitor) {
     return visitor.visitClosureTypeInformation(this);
   }
 
+  @override
   bool hasStableType(InferrerEngine inferrer) {
     return false;
   }
@@ -1886,12 +2061,15 @@
       : super(abstractValueDomain.emptyType, context);
 
   // TODO(22894): Compute a better type here.
+  @override
   AbstractValue computeType(InferrerEngine inferrer) => safeType(inferrer);
 
   String get debugName => '$_node';
 
+  @override
   String toString() => 'Await';
 
+  @override
   accept(TypeInformationVisitor visitor) {
     return visitor.visitAwaitTypeInformation(this);
   }
@@ -1904,12 +2082,15 @@
       MemberTypeInformation context, this._node)
       : super(abstractValueDomain.emptyType, context);
 
+  @override
   AbstractValue computeType(InferrerEngine inferrer) => safeType(inferrer);
 
   String get debugName => '$_node';
 
+  @override
   String toString() => 'Yield';
 
+  @override
   accept(TypeInformationVisitor visitor) {
     return visitor.visitYieldTypeInformation(this);
   }
@@ -1920,9 +2101,11 @@
   T visitPhiElementTypeInformation(PhiElementTypeInformation info);
   T visitElementInContainerTypeInformation(
       ElementInContainerTypeInformation info);
+  T visitElementInSetTypeInformation(ElementInSetTypeInformation info);
   T visitKeyInMapTypeInformation(KeyInMapTypeInformation info);
   T visitValueInMapTypeInformation(ValueInMapTypeInformation info);
   T visitListTypeInformation(ListTypeInformation info);
+  T visitSetTypeInformation(SetTypeInformation info);
   T visitMapTypeInformation(MapTypeInformation info);
   T visitConcreteTypeInformation(ConcreteTypeInformation info);
   T visitStringLiteralTypeInformation(StringLiteralTypeInformation info);
diff --git a/pkg/compiler/lib/src/inferrer/type_system.dart b/pkg/compiler/lib/src/inferrer/type_system.dart
index 21c5316..c5c32cf 100644
--- a/pkg/compiler/lib/src/inferrer/type_system.dart
+++ b/pkg/compiler/lib/src/inferrer/type_system.dart
@@ -6,7 +6,6 @@
 import '../common.dart';
 import '../elements/entities.dart';
 import '../elements/types.dart';
-import '../universe/selector.dart';
 import '../world.dart';
 import 'abstract_value_domain.dart';
 import 'type_graph_nodes.dart';
@@ -36,6 +35,9 @@
   /// Returns whether [node] is valid as a list allocation node.
   bool checkListNode(ir.Node node);
 
+  /// Returns whether [node] is valid as a set allocation node.
+  bool checkSetNode(ir.Node node);
+
   /// Returns whether [node] is valid as a map allocation node.
   bool checkMapNode(ir.Node node);
 
@@ -64,6 +66,10 @@
   final Map<ir.TreeNode, ListTypeInformation> allocatedLists =
       new Map<ir.TreeNode, ListTypeInformation>();
 
+  /// [SetTypeInformation] for allocated Sets.
+  final Map<ir.TreeNode, SetTypeInformation> allocatedSets =
+      new Map<ir.TreeNode, SetTypeInformation>();
+
   /// [MapTypeInformation] for allocated Maps.
   final Map<ir.TreeNode, TypeInformation> allocatedMaps =
       new Map<ir.TreeNode, TypeInformation>();
@@ -92,6 +98,7 @@
         parameterTypeInformations.values,
         memberTypeInformations.values,
         allocatedLists.values,
+        allocatedSets.values,
         allocatedMaps.values,
         allocatedClosures,
         concreteTypes.values,
@@ -205,6 +212,14 @@
         getConcreteTypeFor(_abstractValueDomain.growableListType);
   }
 
+  TypeInformation setTypeCache;
+  TypeInformation get setType =>
+      setTypeCache ??= getConcreteTypeFor(_abstractValueDomain.setType);
+
+  TypeInformation constSetTypeCache;
+  TypeInformation get constSetType => constSetTypeCache ??=
+      getConcreteTypeFor(_abstractValueDomain.constSetType);
+
   TypeInformation mapTypeCache;
   TypeInformation get mapType {
     if (mapTypeCache != null) return mapTypeCache;
@@ -293,52 +308,28 @@
     return info.type != mask;
   }
 
-  /// Returns a new receiver type for this [selector] applied to
-  /// [receiverType].
-  ///
-  /// The option [isConditional] is true when [selector] was seen in a
-  /// conditional send (e.g.  `a?.selector`), in which case the returned type
-  /// may be null.
-  TypeInformation refineReceiver(
-      Selector selector, AbstractValue mask, TypeInformation receiver,
-      {bool isConditional}) {
-    if (_abstractValueDomain.isExact(receiver.type).isDefinitelyTrue) {
-      return receiver;
-    }
-    AbstractValue otherType = _closedWorld.computeReceiverType(selector, mask);
-    // Conditional sends (a?.b) can still narrow the possible types of `a`,
-    // however, we still need to consider that `a` may be null.
-    if (isConditional) {
-      // Note: we don't check that receiver.type.isNullable here because this is
-      // called during the graph construction.
-      otherType = _abstractValueDomain.includeNull(otherType);
-    }
-    // If this is refining to nullable subtype of `Object` just return
-    // the receiver. We know the narrowing is useless.
-    if (_abstractValueDomain.isNull(otherType).isPotentiallyTrue &&
-        _abstractValueDomain.containsAll(otherType).isPotentiallyTrue) {
-      return receiver;
-    }
-    TypeInformation newType =
-        new NarrowTypeInformation(_abstractValueDomain, receiver, otherType);
-    allocatedTypes.add(newType);
-    return newType;
-  }
+  bool _isNonNullNarrow(TypeInformation type) =>
+      type is NarrowTypeInformation &&
+      _abstractValueDomain.isNull(type.typeAnnotation).isDefinitelyFalse;
 
   /// Returns the intersection between [type] and [annotation].
   /// [isNullable] indicates whether the annotation implies a null
   /// type.
   TypeInformation narrowType(TypeInformation type, DartType annotation,
       {bool isNullable: true}) {
-    if (annotation.treatAsDynamic) return type;
-    if (annotation.isVoid) return type;
     AbstractValue otherType;
-    if (annotation.isInterfaceType) {
+    if (annotation.isVoid) return type;
+    if (annotation.treatAsDynamic) {
+      if (isNullable) return type;
+      // If the input is already narrowed to be not-null, there is no value
+      // in adding another narrowing node.
+      if (_isNonNullNarrow(type)) return type;
+      otherType = _abstractValueDomain.excludeNull(dynamicType.type);
+    } else if (annotation.isInterfaceType) {
       InterfaceType interface = annotation;
       if (interface.element == _closedWorld.commonElements.objectClass) {
-        if (isNullable) {
-          return type;
-        }
+        if (isNullable) return type;
+        if (_isNonNullNarrow(type)) return type;
         otherType = _abstractValueDomain.excludeNull(dynamicType.type);
       } else {
         otherType =
@@ -357,23 +348,9 @@
     if (isNullable) {
       otherType = _abstractValueDomain.includeNull(otherType);
     }
-    if (_abstractValueDomain.isExact(type.type).isDefinitelyTrue) {
-      return type;
-    } else {
-      TypeInformation newType =
-          new NarrowTypeInformation(_abstractValueDomain, type, otherType);
-      allocatedTypes.add(newType);
-      return newType;
-    }
-  }
-
-  /// Returns the non-nullable type of [type].
-  TypeInformation narrowNotNull(TypeInformation type) {
-    if (_abstractValueDomain.isExact(type.type).isDefinitelyTrue) {
-      return type;
-    }
-    TypeInformation newType = new NarrowTypeInformation(_abstractValueDomain,
-        type, _abstractValueDomain.excludeNull(dynamicType.type));
+    if (_abstractValueDomain.isExact(type.type).isDefinitelyTrue) return type;
+    TypeInformation newType =
+        new NarrowTypeInformation(_abstractValueDomain, type, otherType);
     allocatedTypes.add(newType);
     return newType;
   }
@@ -454,7 +431,7 @@
   }
 
   TypeInformation allocateList(
-      TypeInformation type, ir.Node node, MemberEntity enclosing,
+      TypeInformation type, ir.TreeNode node, MemberEntity enclosing,
       [TypeInformation elementType, int length]) {
     assert(strategy.checkListNode(node));
     ClassEntity typedDataClass = _closedWorld.commonElements.typedDataClass;
@@ -494,29 +471,64 @@
     return result;
   }
 
+  TypeInformation allocateSet(
+      TypeInformation type, ir.TreeNode node, MemberEntity enclosing,
+      [TypeInformation elementType]) {
+    assert(strategy.checkSetNode(node));
+    bool isConst = type.type == _abstractValueDomain.constSetType;
+
+    AbstractValue elementTypeMask =
+        isConst ? elementType.type : dynamicType.type;
+    AbstractValue mask = _abstractValueDomain.createSetValue(
+        type.type, node, enclosing, elementTypeMask);
+    ElementInSetTypeInformation element = new ElementInSetTypeInformation(
+        _abstractValueDomain, currentMember, elementType);
+    element.inferred = isConst;
+
+    allocatedTypes.add(element);
+    return allocatedSets[node] =
+        new SetTypeInformation(currentMember, mask, element);
+  }
+
   TypeInformation allocateMap(
-      ConcreteTypeInformation type, ir.Node node, MemberEntity element,
+      ConcreteTypeInformation type, ir.TreeNode node, MemberEntity element,
       [List<TypeInformation> keyTypes, List<TypeInformation> valueTypes]) {
     assert(strategy.checkMapNode(node));
     assert(keyTypes.length == valueTypes.length);
     bool isFixed = (type.type == _abstractValueDomain.constMapType);
 
-    AbstractValue keyType, valueType;
+    TypeInformation keyType, valueType;
+    for (int i = 0; i < keyTypes.length; ++i) {
+      TypeInformation type = keyTypes[i];
+      keyType = keyType == null
+          ? allocatePhi(null, null, type, isTry: false)
+          : addPhiInput(null, keyType, type);
+
+      type = valueTypes[i];
+      valueType = valueType == null
+          ? allocatePhi(null, null, type, isTry: false)
+          : addPhiInput(null, valueType, type);
+    }
+
+    keyType =
+        keyType == null ? nonNullEmpty() : simplifyPhi(null, null, keyType);
+    valueType =
+        valueType == null ? nonNullEmpty() : simplifyPhi(null, null, valueType);
+
+    AbstractValue keyTypeMask, valueTypeMask;
     if (isFixed) {
-      keyType = keyTypes.fold(nonNullEmptyType.type,
-          (type, info) => _abstractValueDomain.union(type, info.type));
-      valueType = valueTypes.fold(nonNullEmptyType.type,
-          (type, info) => _abstractValueDomain.union(type, info.type));
+      keyTypeMask = keyType.type;
+      valueTypeMask = valueType.type;
     } else {
-      keyType = valueType = dynamicType.type;
+      keyTypeMask = valueTypeMask = dynamicType.type;
     }
     AbstractValue mask = _abstractValueDomain.createMapValue(
-        type.type, node, element, keyType, valueType);
+        type.type, node, element, keyTypeMask, valueTypeMask);
 
-    TypeInformation keyTypeInfo =
-        new KeyInMapTypeInformation(_abstractValueDomain, currentMember, null);
+    TypeInformation keyTypeInfo = new KeyInMapTypeInformation(
+        _abstractValueDomain, currentMember, keyType);
     TypeInformation valueTypeInfo = new ValueInMapTypeInformation(
-        _abstractValueDomain, currentMember, null);
+        _abstractValueDomain, currentMember, valueType);
     allocatedTypes.add(keyTypeInfo);
     allocatedTypes.add(valueTypeInfo);
 
@@ -623,14 +635,20 @@
     // mapped iterable, we save the intermediate results to avoid computing them
     // again.
     var list = [];
+    bool isDynamicIngoringNull = false;
+    bool mayBeNull = false;
     for (AbstractValue mask in masks) {
       // Don't do any work on computing unions if we know that after all that
       // work the result will be `dynamic`.
       // TODO(sigmund): change to `mask == dynamicType` so we can continue to
       // track the non-nullable bit.
       if (_abstractValueDomain.containsAll(mask).isPotentiallyTrue) {
-        return dynamicType;
+        isDynamicIngoringNull = true;
       }
+      if (_abstractValueDomain.isNull(mask).isPotentiallyTrue) {
+        mayBeNull = true;
+      }
+      if (isDynamicIngoringNull && mayBeNull) return dynamicType;
       list.add(mask);
     }
 
@@ -640,8 +658,12 @@
           newType == null ? mask : _abstractValueDomain.union(newType, mask);
       // Likewise - stop early if we already reach dynamic.
       if (_abstractValueDomain.containsAll(newType).isPotentiallyTrue) {
-        return dynamicType;
+        isDynamicIngoringNull = true;
       }
+      if (_abstractValueDomain.isNull(newType).isPotentiallyTrue) {
+        mayBeNull = true;
+      }
+      if (isDynamicIngoringNull && mayBeNull) return dynamicType;
     }
 
     return newType ?? _abstractValueDomain.emptyType;
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/constants.dart b/pkg/compiler/lib/src/inferrer/typemasks/constants.dart
index c539521..9b5232f 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/constants.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/constants.dart
@@ -5,6 +5,7 @@
 library types.constants;
 
 import '../../common.dart';
+import '../../constants/constant_system.dart' as constant_system;
 import '../../constants/values.dart';
 import '../../js_backend/js_backend.dart' show SyntheticConstantKind;
 import '../../world.dart' show JClosedWorld;
@@ -37,7 +38,7 @@
   @override
   TypeMask visitDouble(DoubleConstantValue constant, JClosedWorld closedWorld) {
     // We have to recognize double constants that are 'is int'.
-    if (closedWorld.constantSystem.isInt(constant)) {
+    if (constant_system.isInt(constant)) {
       if (constant.isMinusZero) {
         return closedWorld.abstractValueDomain.uint31Type;
       } else {
@@ -104,6 +105,11 @@
   }
 
   @override
+  TypeMask visitSet(SetConstantValue constant, JClosedWorld closedWorld) {
+    return closedWorld.abstractValueDomain.constSetType;
+  }
+
+  @override
   TypeMask visitMap(MapConstantValue constant, JClosedWorld closedWorld) {
     return closedWorld.abstractValueDomain.constMapType;
   }
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/container_type_mask.dart b/pkg/compiler/lib/src/inferrer/typemasks/container_type_mask.dart
index 4b27265..f2fda3d 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/container_type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/container_type_mask.dart
@@ -4,20 +4,21 @@
 
 part of masks;
 
-/// A [ContainerTypeMask] is a [TypeMask] for a specific allocation
-/// site of a container (currently only List) that will get specialized
-/// once the [TypeGraphInferrer] phase finds an element type for it.
+/// A [TypeMask] for a specific allocation site of a container (currently only
+/// List) that will get specialized once the [TypeGraphInferrer] phase finds an
+/// element type for it.
 class ContainerTypeMask extends AllocationTypeMask {
   /// Tag used for identifying serialized [ContainerTypeMask] objects in a
   /// debugging data stream.
   static const String tag = 'container-type-mask';
 
+  @override
   final TypeMask forwardTo;
 
-  // The [Node] where this type mask was created.
-  final ir.TreeNode allocationNode;
+  @override
+  final ir.Node allocationNode;
 
-  // The [Entity] where this type mask was created.
+  @override
   final MemberEntity allocationElement;
 
   // The element type of this container.
@@ -44,6 +45,7 @@
   }
 
   /// Serializes this [ContainerTypeMask] to [sink].
+  @override
   void writeToDataSink(DataSink sink) {
     sink.writeEnum(TypeMaskKind.container);
     sink.begin(tag);
@@ -55,6 +57,7 @@
     sink.end(tag);
   }
 
+  @override
   TypeMask nullable() {
     return isNullable
         ? this
@@ -62,6 +65,7 @@
             allocationElement, elementType, length);
   }
 
+  @override
   TypeMask nonNullable() {
     return isNullable
         ? new ContainerTypeMask(forwardTo.nonNullable(), allocationNode,
@@ -69,9 +73,12 @@
         : this;
   }
 
+  @override
   bool get isContainer => true;
+  @override
   bool get isExact => true;
 
+  @override
   bool equalsDisregardNull(other) {
     if (other is! ContainerTypeMask) return false;
     return super.equalsDisregardNull(other) &&
@@ -80,12 +87,14 @@
         length == other.length;
   }
 
+  @override
   TypeMask intersection(TypeMask other, JClosedWorld closedWorld) {
     TypeMask forwardIntersection = forwardTo.intersection(other, closedWorld);
     if (forwardIntersection.isEmptyOrNull) return forwardIntersection;
     return forwardIntersection.isNullable ? nullable() : nonNullable();
   }
 
+  @override
   TypeMask union(dynamic other, JClosedWorld closedWorld) {
     if (this == other) {
       return this;
@@ -113,13 +122,16 @@
     }
   }
 
+  @override
   bool operator ==(other) => super == other;
 
+  @override
   int get hashCode {
     return computeHashCode(
         allocationNode, isNullable, elementType, length, forwardTo);
   }
 
+  @override
   String toString() {
     return 'Container($forwardTo, element: $elementType, length: $length)';
   }
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/dictionary_type_mask.dart b/pkg/compiler/lib/src/inferrer/typemasks/dictionary_type_mask.dart
index 8463350..ef15561 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/dictionary_type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/dictionary_type_mask.dart
@@ -20,7 +20,7 @@
 
   DictionaryTypeMask(
       TypeMask forwardTo,
-      ir.TreeNode allocationNode,
+      ir.Node allocationNode,
       MemberEntity allocationElement,
       TypeMask keyType,
       TypeMask valueType,
@@ -44,6 +44,7 @@
   }
 
   /// Serializes this [DictionaryTypeMask] to [sink].
+  @override
   void writeToDataSink(DataSink sink) {
     sink.writeEnum(TypeMaskKind.dictionary);
     sink.begin(tag);
@@ -59,6 +60,7 @@
     sink.end(tag);
   }
 
+  @override
   TypeMask nullable() {
     return isNullable
         ? this
@@ -66,6 +68,7 @@
             allocationElement, keyType, valueType, _typeMap);
   }
 
+  @override
   TypeMask nonNullable() {
     return isNullable
         ? new DictionaryTypeMask(forwardTo.nonNullable(), allocationNode,
@@ -73,13 +76,16 @@
         : this;
   }
 
+  @override
   bool get isDictionary => true;
+  @override
   bool get isExact => true;
 
   bool containsKey(String key) => _typeMap.containsKey(key);
 
   TypeMask getValueForKey(String key) => _typeMap[key];
 
+  @override
   bool equalsDisregardNull(other) {
     if (other is! DictionaryTypeMask) return false;
     return allocationNode == other.allocationNode &&
@@ -90,12 +96,14 @@
             (k) => _typeMap.containsKey(k) && _typeMap[k] == other._typeMap[k]);
   }
 
+  @override
   TypeMask intersection(TypeMask other, JClosedWorld closedWorld) {
     TypeMask forwardIntersection = forwardTo.intersection(other, closedWorld);
     if (forwardIntersection.isEmptyOrNull) return forwardIntersection;
     return forwardIntersection.isNullable ? nullable() : nonNullable();
   }
 
+  @override
   TypeMask union(dynamic other, JClosedWorld closedWorld) {
     if (this == other) {
       return this;
@@ -135,12 +143,15 @@
     }
   }
 
+  @override
   bool operator ==(other) => super == other;
 
+  @override
   int get hashCode {
     return computeHashCode(allocationNode, isNullable, _typeMap, forwardTo);
   }
 
+  @override
   String toString() {
     return 'Dictionary($forwardTo, key: $keyType, '
         'value: $valueType, map: $_typeMap)';
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/flat_type_mask.dart b/pkg/compiler/lib/src/inferrer/typemasks/flat_type_mask.dart
index 41db5e8..b7845d2 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/flat_type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/flat_type_mask.dart
@@ -78,6 +78,7 @@
   }
 
   /// Serializes this [FlatTypeMask] to [sink].
+  @override
   void writeToDataSink(DataSink sink) {
     sink.writeEnum(TypeMaskKind.flat);
     sink.begin(tag);
@@ -90,17 +91,30 @@
       ? ClassQuery.EXACT
       : (isSubclass ? ClassQuery.SUBCLASS : ClassQuery.SUBTYPE);
 
+  @override
   bool get isEmpty => isEmptyOrNull && !isNullable;
+  @override
   bool get isNull => isEmptyOrNull && isNullable;
+  @override
   bool get isEmptyOrNull => (flags >> 1) == EMPTY;
+  @override
   bool get isExact => (flags >> 1) == EXACT;
+  @override
   bool get isNullable => (flags & 1) != 0;
 
+  @override
   bool get isUnion => false;
+  @override
   bool get isContainer => false;
+  @override
+  bool get isSet => false;
+  @override
   bool get isMap => false;
+  @override
   bool get isDictionary => false;
+  @override
   bool get isForwarding => false;
+  @override
   bool get isValue => false;
 
   // TODO(kasperl): Get rid of these. They should not be a visible
@@ -109,14 +123,17 @@
   bool get isSubclass => (flags >> 1) == SUBCLASS;
   bool get isSubtype => (flags >> 1) == SUBTYPE;
 
+  @override
   TypeMask nullable() {
     return isNullable ? this : new FlatTypeMask.internal(base, flags | 1);
   }
 
+  @override
   TypeMask nonNullable() {
     return isNullable ? new FlatTypeMask.internal(base, flags & ~1) : this;
   }
 
+  @override
   bool contains(ClassEntity other, JClosedWorld closedWorld) {
     if (isEmptyOrNull) {
       return false;
@@ -161,6 +178,7 @@
     return false;
   }
 
+  @override
   bool isInMask(TypeMask other, JClosedWorld closedWorld) {
     if (isEmptyOrNull) return isNullable ? other.isNullable : true;
     // The empty type contains no classes.
@@ -194,10 +212,12 @@
     return satisfies(otherBase, closedWorld);
   }
 
+  @override
   bool containsMask(TypeMask other, JClosedWorld closedWorld) {
     return other.isInMask(this, closedWorld);
   }
 
+  @override
   bool containsOnlyInt(JClosedWorld closedWorld) {
     CommonElements commonElements = closedWorld.commonElements;
     return base == closedWorld.commonElements.intClass ||
@@ -207,11 +227,13 @@
         base == commonElements.jsUInt32Class;
   }
 
+  @override
   bool containsOnlyDouble(JClosedWorld closedWorld) {
     return base == closedWorld.commonElements.doubleClass ||
         base == closedWorld.commonElements.jsDoubleClass;
   }
 
+  @override
   bool containsOnlyNum(JClosedWorld closedWorld) {
     return containsOnlyInt(closedWorld) ||
         containsOnlyDouble(closedWorld) ||
@@ -219,28 +241,31 @@
         base == closedWorld.commonElements.jsNumberClass;
   }
 
+  @override
   bool containsOnlyBool(JClosedWorld closedWorld) {
     return base == closedWorld.commonElements.boolClass ||
         base == closedWorld.commonElements.jsBoolClass;
   }
 
+  @override
   bool containsOnlyString(JClosedWorld closedWorld) {
     return base == closedWorld.commonElements.stringClass ||
         base == closedWorld.commonElements.jsStringClass;
   }
 
+  @override
   bool containsOnly(ClassEntity cls) {
     return base == cls;
   }
 
+  @override
   bool satisfies(ClassEntity cls, JClosedWorld closedWorld) {
     if (isEmptyOrNull) return false;
     if (closedWorld.classHierarchy.isSubtypeOf(base, cls)) return true;
     return false;
   }
 
-  /// Returns the [Entity] if this type represents a single class, otherwise
-  /// returns `null`.  This method is conservative.
+  @override
   ClassEntity singleClass(JClosedWorld closedWorld) {
     if (isEmptyOrNull) return null;
     if (isNullable) return null; // It is Null and some other class.
@@ -256,12 +281,13 @@
     }
   }
 
-  /// Returns whether or not this type mask contains all types.
+  @override
   bool containsAll(JClosedWorld closedWorld) {
     if (isEmptyOrNull || isExact) return false;
     return identical(base, closedWorld.commonElements.objectClass);
   }
 
+  @override
   TypeMask union(TypeMask other, JClosedWorld closedWorld) {
     assert(other != null);
     assert(TypeMask.assertIsNormalized(this, closedWorld));
@@ -351,6 +377,7 @@
         : this;
   }
 
+  @override
   TypeMask intersection(TypeMask other, JClosedWorld closedWorld) {
     assert(other != null);
     if (other is! FlatTypeMask) return other.intersection(this, closedWorld);
@@ -424,6 +451,7 @@
     }
   }
 
+  @override
   bool isDisjoint(TypeMask other, JClosedWorld closedWorld) {
     if (other is! FlatTypeMask) return other.isDisjoint(this, closedWorld);
     FlatTypeMask flatOther = other;
@@ -513,9 +541,7 @@
         : new TypeMask.nonNullEmpty();
   }
 
-  /// Returns whether [element] is a potential target when being
-  /// invoked on this type mask. [selector] is used to ensure library
-  /// privacy is taken into account.
+  @override
   bool canHit(MemberEntity element, Name name, JClosedWorld closedWorld) {
     CommonElements commonElements = closedWorld.commonElements;
     assert(element.name == name.text);
@@ -551,6 +577,7 @@
     }
   }
 
+  @override
   bool needsNoSuchMethodHandling(
       Selector selector, covariant JClosedWorld closedWorld) {
     // A call on an empty type mask is either dead code, or a call on
@@ -565,6 +592,7 @@
     return closedWorld.needsNoSuchMethod(base, selector, _classQuery);
   }
 
+  @override
   MemberEntity locateSingleMember(Selector selector, JClosedWorld closedWorld) {
     if (isEmptyOrNull) return null;
     if (closedWorld.includesClosureCall(selector, this)) return null;
@@ -592,6 +620,7 @@
     return null;
   }
 
+  @override
   bool operator ==(var other) {
     if (identical(this, other)) return true;
     if (other is! FlatTypeMask) return false;
@@ -599,10 +628,12 @@
     return (flags == otherMask.flags) && (base == otherMask.base);
   }
 
+  @override
   int get hashCode {
     return (base == null ? 0 : base.hashCode) + 31 * flags.hashCode;
   }
 
+  @override
   String toString() {
     if (isEmptyOrNull) return isNullable ? '[null]' : '[empty]';
     StringBuffer buffer = new StringBuffer();
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/forwarding_type_mask.dart b/pkg/compiler/lib/src/inferrer/typemasks/forwarding_type_mask.dart
index 7b8e73a..8d86f0c 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/forwarding_type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/forwarding_type_mask.dart
@@ -11,67 +11,93 @@
 
   ForwardingTypeMask();
 
+  @override
   bool get isEmptyOrNull => forwardTo.isEmptyOrNull;
+  @override
   bool get isEmpty => forwardTo.isEmpty;
+  @override
   bool get isNullable => forwardTo.isNullable;
+  @override
   bool get isNull => forwardTo.isNull;
+  @override
   bool get isExact => forwardTo.isExact;
 
+  @override
   bool get isUnion => false;
+  @override
   bool get isContainer => false;
+  @override
+  bool get isSet => false;
+  @override
   bool get isMap => false;
+  @override
   bool get isDictionary => false;
+  @override
   bool get isValue => false;
+  @override
   bool get isForwarding => true;
 
+  @override
   bool isInMask(TypeMask other, JClosedWorld closedWorld) {
     return forwardTo.isInMask(other, closedWorld);
   }
 
+  @override
   bool containsMask(TypeMask other, JClosedWorld closedWorld) {
     return forwardTo.containsMask(other, closedWorld);
   }
 
+  @override
   bool containsOnlyInt(JClosedWorld closedWorld) {
     return forwardTo.containsOnlyInt(closedWorld);
   }
 
+  @override
   bool containsOnlyDouble(JClosedWorld closedWorld) {
     return forwardTo.containsOnlyDouble(closedWorld);
   }
 
+  @override
   bool containsOnlyNum(JClosedWorld closedWorld) {
     return forwardTo.containsOnlyNum(closedWorld);
   }
 
+  @override
   bool containsOnlyBool(JClosedWorld closedWorld) {
     return forwardTo.containsOnlyBool(closedWorld);
   }
 
+  @override
   bool containsOnlyString(JClosedWorld closedWorld) {
     return forwardTo.containsOnlyString(closedWorld);
   }
 
+  @override
   bool containsOnly(ClassEntity cls) {
     return forwardTo.containsOnly(cls);
   }
 
+  @override
   bool satisfies(ClassEntity cls, JClosedWorld closedWorld) {
     return forwardTo.satisfies(cls, closedWorld);
   }
 
+  @override
   bool contains(ClassEntity cls, JClosedWorld closedWorld) {
     return forwardTo.contains(cls, closedWorld);
   }
 
+  @override
   bool containsAll(JClosedWorld closedWorld) {
     return forwardTo.containsAll(closedWorld);
   }
 
+  @override
   ClassEntity singleClass(JClosedWorld closedWorld) {
     return forwardTo.singleClass(closedWorld);
   }
 
+  @override
   TypeMask union(other, JClosedWorld closedWorld) {
     if (this == other) {
       return this;
@@ -83,23 +109,28 @@
     return forwardTo.union(other, closedWorld);
   }
 
+  @override
   bool isDisjoint(TypeMask other, JClosedWorld closedWorld) {
     return forwardTo.isDisjoint(other, closedWorld);
   }
 
+  @override
   TypeMask intersection(TypeMask other, JClosedWorld closedWorld) {
     return forwardTo.intersection(other, closedWorld);
   }
 
+  @override
   bool needsNoSuchMethodHandling(
       Selector selector, covariant JClosedWorld closedWorld) {
     return forwardTo.needsNoSuchMethodHandling(selector, closedWorld);
   }
 
+  @override
   bool canHit(MemberEntity element, Name name, JClosedWorld closedWorld) {
     return forwardTo.canHit(element, name, closedWorld);
   }
 
+  @override
   MemberEntity locateSingleMember(Selector selector, JClosedWorld closedWorld) {
     return forwardTo.locateSingleMember(selector, closedWorld);
   }
@@ -113,16 +144,18 @@
     }
   }
 
+  @override
   bool operator ==(other) {
     return equalsDisregardNull(other) && isNullable == other.isNullable;
   }
 
+  @override
   int get hashCode => throw "Subclass should implement hashCode getter";
 }
 
 abstract class AllocationTypeMask extends ForwardingTypeMask {
-  // The [ir.TreeNode] where this type mask was created.
-  ir.TreeNode get allocationNode;
+  // The [ir.Node] where this type mask was created.
+  ir.Node get allocationNode;
 
   // The [Entity] where this type mask was created.
   MemberEntity get allocationElement;
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/map_type_mask.dart b/pkg/compiler/lib/src/inferrer/typemasks/map_type_mask.dart
index 2486256..3b4d729 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/map_type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/map_type_mask.dart
@@ -12,12 +12,13 @@
   /// debugging data stream.
   static const String tag = 'map-type-mask';
 
+  @override
   final TypeMask forwardTo;
 
-  // The [Node] where this type mask was created.
-  final ir.TreeNode allocationNode;
+  @override
+  final ir.Node allocationNode;
 
-  // The [MemberEntity] where this type mask was created.
+  @override
   final MemberEntity allocationElement;
 
   // The value type of this map.
@@ -44,6 +45,7 @@
   }
 
   /// Serializes this [MapTypeMask] to [sink].
+  @override
   void writeToDataSink(DataSink sink) {
     sink.writeEnum(TypeMaskKind.map);
     sink.begin(tag);
@@ -55,6 +57,7 @@
     sink.end(tag);
   }
 
+  @override
   TypeMask nullable() {
     return isNullable
         ? this
@@ -62,6 +65,7 @@
             allocationElement, keyType, valueType);
   }
 
+  @override
   TypeMask nonNullable() {
     return isNullable
         ? new MapTypeMask(forwardTo.nonNullable(), allocationNode,
@@ -69,10 +73,14 @@
         : this;
   }
 
+  @override
   bool get isContainer => false;
+  @override
   bool get isMap => true;
+  @override
   bool get isExact => true;
 
+  @override
   bool equalsDisregardNull(other) {
     if (other is! MapTypeMask) return false;
     return super.equalsDisregardNull(other) &&
@@ -81,12 +89,14 @@
         valueType == other.valueType;
   }
 
+  @override
   TypeMask intersection(TypeMask other, JClosedWorld closedWorld) {
     TypeMask forwardIntersection = forwardTo.intersection(other, closedWorld);
     if (forwardIntersection.isEmptyOrNull) return forwardIntersection;
     return forwardIntersection.isNullable ? nullable() : nonNullable();
   }
 
+  @override
   TypeMask union(dynamic other, JClosedWorld closedWorld) {
     if (this == other) {
       return this;
@@ -128,13 +138,16 @@
     }
   }
 
+  @override
   bool operator ==(other) => super == other;
 
+  @override
   int get hashCode {
     return computeHashCode(
         allocationNode, isNullable, keyType, valueType, forwardTo);
   }
 
+  @override
   String toString() {
     return 'Map($forwardTo, key: $keyType, value: $valueType)';
   }
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/masks.dart b/pkg/compiler/lib/src/inferrer/typemasks/masks.dart
index 03ccfef..748c280 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/masks.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/masks.dart
@@ -29,6 +29,7 @@
 part 'flat_type_mask.dart';
 part 'forwarding_type_mask.dart';
 part 'map_type_mask.dart';
+part 'set_type_mask.dart';
 part 'type_mask.dart';
 part 'union_type_mask.dart';
 part 'value_type_mask.dart';
@@ -57,6 +58,8 @@
   TypeMask _constListType;
   TypeMask _fixedListType;
   TypeMask _growableListType;
+  TypeMask _setType;
+  TypeMask _constSetType;
   TypeMask _mapType;
   TypeMask _constMapType;
   TypeMask _stringType;
@@ -142,6 +145,14 @@
           commonElements.jsExtendableArrayClass, _closedWorld);
 
   @override
+  TypeMask get setType => _setType ??=
+      new TypeMask.nonNullSubtype(commonElements.setLiteralClass, _closedWorld);
+
+  @override
+  TypeMask get constSetType => _constSetType ??= new TypeMask.nonNullSubtype(
+      commonElements.constSetLiteralClass, _closedWorld);
+
+  @override
   TypeMask get mapType => _mapType ??=
       new TypeMask.nonNullSubtype(commonElements.mapLiteralClass, _closedWorld);
 
@@ -705,6 +716,11 @@
   }
 
   @override
+  bool isSet(TypeMask value) {
+    return value.isSet;
+  }
+
+  @override
   bool isContainer(TypeMask value) {
     return value.isContainer;
   }
@@ -745,6 +761,21 @@
   }
 
   @override
+  AbstractValue createSetValue(AbstractValue forwardTo, Object allocationNode,
+      MemberEntity allocationElement, AbstractValue elementType) {
+    return new SetTypeMask(
+        forwardTo, allocationNode, allocationElement, elementType);
+  }
+
+  @override
+  AbstractValue getSetElementType(AbstractValue value) {
+    if (value is SetTypeMask) {
+      return value.elementType ?? dynamicType;
+    }
+    return dynamicType;
+  }
+
+  @override
   bool isSpecializationOf(
       AbstractValue specialization, AbstractValue generalization) {
     return specialization is ForwardingTypeMask &&
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/set_type_mask.dart b/pkg/compiler/lib/src/inferrer/typemasks/set_type_mask.dart
new file mode 100644
index 0000000..0b1ffb6e
--- /dev/null
+++ b/pkg/compiler/lib/src/inferrer/typemasks/set_type_mask.dart
@@ -0,0 +1,117 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+part of masks;
+
+/// A [SetTypeMask] is a [TypeMask] for a specific allocation site of a set
+/// (currently only the internal Set class) that will get specialized once the
+/// [TypeGraphInferrer] phase finds an element type for it.
+class SetTypeMask extends AllocationTypeMask {
+  /// Tag used for identifying serialized [SetTypeMask] objects in a debugging
+  /// data stream.
+  static const String tag = 'set-type-mask';
+
+  @override
+  final TypeMask forwardTo;
+
+  @override
+  final ir.Node allocationNode;
+
+  @override
+  final MemberEntity allocationElement;
+
+  // The element type of this set.
+  final TypeMask elementType;
+
+  SetTypeMask(this.forwardTo, this.allocationNode, this.allocationElement,
+      this.elementType);
+
+  /// Deserializes a [SetTypeMask] object from [source].
+  factory SetTypeMask.readFromDataSource(
+      DataSource source, JClosedWorld closedWorld) {
+    source.begin(tag);
+    TypeMask forwardTo = new TypeMask.readFromDataSource(source, closedWorld);
+    ir.TreeNode allocationNode = source.readTreeNodeOrNull();
+    MemberEntity allocationElement = source.readMemberOrNull();
+    TypeMask elementType = new TypeMask.readFromDataSource(source, closedWorld);
+    source.end(tag);
+    return new SetTypeMask(
+        forwardTo, allocationNode, allocationElement, elementType);
+  }
+
+  /// Serializes this [SetTypeMask] to [sink].
+  @override
+  void writeToDataSink(DataSink sink) {
+    sink.writeEnum(TypeMaskKind.set);
+    sink.begin(tag);
+    forwardTo.writeToDataSink(sink);
+    sink.writeTreeNodeOrNull(allocationNode);
+    sink.writeMemberOrNull(allocationElement);
+    elementType.writeToDataSink(sink);
+    sink.end(tag);
+  }
+
+  @override
+  TypeMask nullable() => isNullable
+      ? this
+      : new SetTypeMask(
+          forwardTo.nullable(), allocationNode, allocationElement, elementType);
+
+  @override
+  TypeMask nonNullable() => isNullable
+      ? new SetTypeMask(forwardTo.nonNullable(), allocationNode,
+          allocationElement, elementType)
+      : this;
+
+  @override
+  bool get isSet => true;
+
+  @override
+  bool get isExact => true;
+
+  @override
+  bool equalsDisregardNull(other) {
+    if (other is! SetTypeMask) return false;
+    return super.equalsDisregardNull(other) &&
+        allocationNode == other.allocationNode &&
+        elementType == other.elementType;
+  }
+
+  @override
+  TypeMask intersection(TypeMask other, JClosedWorld closedWorld) {
+    TypeMask forwardIntersection = forwardTo.intersection(other, closedWorld);
+    if (forwardIntersection.isEmptyOrNull) return forwardIntersection;
+    return forwardIntersection.isNullable ? nullable() : nonNullable();
+  }
+
+  @override
+  TypeMask union(dynamic other, JClosedWorld closedWorld) {
+    if (this == other) {
+      return this;
+    } else if (equalsDisregardNull(other)) {
+      return other.isNullable ? other : this;
+    } else if (other.isEmptyOrNull) {
+      return other.isNullable ? this.nullable() : this;
+    } else if (other.isSet &&
+        elementType != null &&
+        other.elementType != null) {
+      TypeMask newElementType =
+          elementType.union(other.elementType, closedWorld);
+      TypeMask newForwardTo = forwardTo.union(other.forwardTo, closedWorld);
+      return new SetTypeMask(newForwardTo, null, null, newElementType);
+    } else {
+      return forwardTo.union(other, closedWorld);
+    }
+  }
+
+  @override
+  bool operator ==(other) => super == other;
+
+  @override
+  int get hashCode =>
+      computeHashCode(allocationNode, isNullable, elementType, forwardTo);
+
+  @override
+  String toString() => 'Set($forwardTo, element: $elementType)';
+}
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/type_mask.dart b/pkg/compiler/lib/src/inferrer/typemasks/type_mask.dart
index d54859d..21a4723 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/type_mask.dart
@@ -48,6 +48,7 @@
     return _masks.add(mask);
   }
 
+  @override
   String toString() {
     if (isAll) {
       return '<all>';
@@ -98,6 +99,7 @@
   flat,
   union,
   container,
+  set,
   map,
   dictionary,
   value,
@@ -230,6 +232,8 @@
         return new UnionTypeMask.readFromDataSource(source, closedWorld);
       case TypeMaskKind.container:
         return new ContainerTypeMask.readFromDataSource(source, closedWorld);
+      case TypeMaskKind.set:
+        return new SetTypeMask.readFromDataSource(source, closedWorld);
       case TypeMaskKind.map:
         return new MapTypeMask.readFromDataSource(source, closedWorld);
       case TypeMaskKind.dictionary:
@@ -329,6 +333,9 @@
   /// Returns `true` if this mask is a [ContainerTypeMask].
   bool get isContainer;
 
+  /// Returns `true` if this mask is a [SetTypeMask].
+  bool get isSet;
+
   /// Returns `true` if this mask is a [MapTypeMask].
   bool get isMap;
 
@@ -355,6 +362,7 @@
   ///
   /// Note: This may differ from semantic equality in the set containment sense.
   ///   Use [containsMask] and [isInMask] for that, instead.
+  @override
   bool operator ==(other);
 
   /// If this returns `true`, [other] is guaranteed to be a supertype of this
@@ -392,7 +400,10 @@
   TypeMask intersection(TypeMask other, JClosedWorld closedWorld);
 
   /// Returns whether [element] is a potential target when being invoked on this
-  /// type mask. [name] is used to ensure library privacy is taken into account.
+  /// type mask.
+  ///
+  ///
+  /// [name] is used to ensure library privacy is taken into account.
   bool canHit(MemberEntity element, Name name, JClosedWorld closedWorld);
 
   /// Returns whether this [TypeMask] applied to [selector] can hit a
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/union_type_mask.dart b/pkg/compiler/lib/src/inferrer/typemasks/union_type_mask.dart
index 2f1f9de..1c3b7ec 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/union_type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/union_type_mask.dart
@@ -34,6 +34,7 @@
   }
 
   /// Serializes this [UnionTypeMask] to [sink].
+  @override
   void writeToDataSink(DataSink sink) {
     sink.writeEnum(TypeMaskKind.union);
     sink.begin(tag);
@@ -161,6 +162,7 @@
     return new TypeMask(bestElement, bestKind, isNullable, closedWorld);
   }
 
+  @override
   TypeMask union(dynamic other, JClosedWorld closedWorld) {
     other = TypeMask.nonForwardingMask(other);
     if (!other.isUnion && disjointMasks.contains(other)) return this;
@@ -175,6 +177,7 @@
     return new TypeMask.unionOf(newList, closedWorld);
   }
 
+  @override
   TypeMask intersection(dynamic other, JClosedWorld closedWorld) {
     other = TypeMask.nonForwardingMask(other);
     if (!other.isUnion && disjointMasks.contains(other)) return other;
@@ -197,6 +200,7 @@
     return new TypeMask.unionOf(intersections, closedWorld);
   }
 
+  @override
   bool isDisjoint(TypeMask other, JClosedWorld closedWorld) {
     for (var current in disjointMasks) {
       if (!current.isDisjoint(other, closedWorld)) return false;
@@ -204,6 +208,7 @@
     return true;
   }
 
+  @override
   TypeMask nullable() {
     if (isNullable) return this;
     List<FlatTypeMask> newList = new List<FlatTypeMask>.from(disjointMasks);
@@ -211,6 +216,7 @@
     return new UnionTypeMask._internal(newList);
   }
 
+  @override
   TypeMask nonNullable() {
     if (!isNullable) return this;
     Iterable<FlatTypeMask> newIterable = disjointMasks.map((e) {
@@ -220,16 +226,29 @@
     return new UnionTypeMask._internal(newIterable);
   }
 
+  @override
   bool get isEmptyOrNull => false;
+  @override
   bool get isEmpty => false;
+  @override
   bool get isNull => false;
+  @override
   bool get isNullable => disjointMasks.any((e) => e.isNullable);
+  @override
   bool get isExact => false;
+  @override
   bool get isUnion => true;
+  @override
   bool get isContainer => false;
+  @override
+  bool get isSet => false;
+  @override
   bool get isMap => false;
+  @override
   bool get isDictionary => false;
+  @override
   bool get isForwarding => false;
+  @override
   bool get isValue => false;
 
   /// Checks whether [other] is contained in this union.
@@ -267,6 +286,7 @@
     return members.every((ClassEntity cls) => this.contains(cls, closedWorld));
   }
 
+  @override
   bool isInMask(TypeMask other, JClosedWorld closedWorld) {
     other = TypeMask.nonForwardingMask(other);
     if (isNullable && !other.isNullable) return false;
@@ -295,6 +315,7 @@
     return disjointMasks.every((mask) => mask.isInMask(other, closedWorld));
   }
 
+  @override
   bool containsMask(TypeMask other, JClosedWorld closedWorld) {
     other = TypeMask.nonForwardingMask(other);
     if (other.isNullable && !isNullable) return false;
@@ -310,55 +331,68 @@
     return contained;
   }
 
+  @override
   bool containsOnlyInt(JClosedWorld closedWorld) {
     return disjointMasks.every((mask) => mask.containsOnlyInt(closedWorld));
   }
 
+  @override
   bool containsOnlyDouble(JClosedWorld closedWorld) {
     return disjointMasks.every((mask) => mask.containsOnlyDouble(closedWorld));
   }
 
+  @override
   bool containsOnlyNum(JClosedWorld closedWorld) {
     return disjointMasks.every((mask) {
       return mask.containsOnlyNum(closedWorld);
     });
   }
 
+  @override
   bool containsOnlyBool(JClosedWorld closedWorld) {
     return disjointMasks.every((mask) => mask.containsOnlyBool(closedWorld));
   }
 
+  @override
   bool containsOnlyString(JClosedWorld closedWorld) {
     return disjointMasks.every((mask) => mask.containsOnlyString(closedWorld));
   }
 
+  @override
   bool containsOnly(ClassEntity element) {
     return disjointMasks.every((mask) => mask.containsOnly(element));
   }
 
+  @override
   bool satisfies(ClassEntity cls, JClosedWorld closedWorld) {
     return disjointMasks.every((mask) => mask.satisfies(cls, closedWorld));
   }
 
+  @override
   bool contains(ClassEntity cls, JClosedWorld closedWorld) {
     return disjointMasks.any((e) => e.contains(cls, closedWorld));
   }
 
+  @override
   bool containsAll(JClosedWorld closedWorld) {
     return disjointMasks.any((mask) => mask.containsAll(closedWorld));
   }
 
+  @override
   ClassEntity singleClass(JClosedWorld closedWorld) => null;
 
+  @override
   bool needsNoSuchMethodHandling(Selector selector, JClosedWorld closedWorld) {
     return disjointMasks
         .any((e) => e.needsNoSuchMethodHandling(selector, closedWorld));
   }
 
+  @override
   bool canHit(MemberEntity element, Name name, JClosedWorld closedWorld) {
     return disjointMasks.any((e) => e.canHit(element, name, closedWorld));
   }
 
+  @override
   MemberEntity locateSingleMember(Selector selector, JClosedWorld closedWorld) {
     MemberEntity candidate;
     for (FlatTypeMask mask in disjointMasks) {
@@ -374,6 +408,7 @@
     return candidate;
   }
 
+  @override
   String toString() {
     String masksString =
         (disjointMasks.map((TypeMask mask) => mask.toString()).toList()..sort())
@@ -381,6 +416,7 @@
     return 'Union($masksString)';
   }
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
 
@@ -397,6 +433,7 @@
         containsAll();
   }
 
+  @override
   int get hashCode {
     int hashCode = isNullable ? 86 : 43;
     // The order of the masks in [disjointMasks] must not affect the
diff --git a/pkg/compiler/lib/src/inferrer/typemasks/value_type_mask.dart b/pkg/compiler/lib/src/inferrer/typemasks/value_type_mask.dart
index 45c1300..1c965dc 100644
--- a/pkg/compiler/lib/src/inferrer/typemasks/value_type_mask.dart
+++ b/pkg/compiler/lib/src/inferrer/typemasks/value_type_mask.dart
@@ -9,6 +9,7 @@
   /// debugging data stream.
   static const String tag = 'value-type-mask';
 
+  @override
   final TypeMask forwardTo;
   final PrimitiveConstantValue value;
 
@@ -25,6 +26,7 @@
   }
 
   /// Serializes this [ValueTypeMask] to [sink].
+  @override
   void writeToDataSink(DataSink sink) {
     sink.writeEnum(TypeMaskKind.value);
     sink.begin(tag);
@@ -33,35 +35,43 @@
     sink.end(tag);
   }
 
+  @override
   TypeMask nullable() {
     return isNullable ? this : new ValueTypeMask(forwardTo.nullable(), value);
   }
 
+  @override
   TypeMask nonNullable() {
     return isNullable
         ? new ValueTypeMask(forwardTo.nonNullable(), value)
         : this;
   }
 
+  @override
   bool get isValue => true;
 
+  @override
   bool equalsDisregardNull(other) {
     if (other is! ValueTypeMask) return false;
     return super.equalsDisregardNull(other) && value == other.value;
   }
 
+  @override
   TypeMask intersection(TypeMask other, JClosedWorld closedWorld) {
     TypeMask forwardIntersection = forwardTo.intersection(other, closedWorld);
     if (forwardIntersection.isEmptyOrNull) return forwardIntersection;
     return forwardIntersection.isNullable ? nullable() : nonNullable();
   }
 
+  @override
   bool operator ==(other) => super == other;
 
+  @override
   int get hashCode {
     return computeHashCode(value, isNullable, forwardTo);
   }
 
+  @override
   String toString() {
     return 'Value($forwardTo, value: ${value.toDartText()})';
   }
diff --git a/pkg/compiler/lib/src/inferrer/types.dart b/pkg/compiler/lib/src/inferrer/types.dart
index 6a1017b..265d76d 100644
--- a/pkg/compiler/lib/src/inferrer/types.dart
+++ b/pkg/compiler/lib/src/inferrer/types.dart
@@ -147,6 +147,7 @@
 /// Global analysis that infers concrete types.
 class GlobalTypeInferenceTask extends CompilerTask {
   // TODO(sigmund): rename at the same time as our benchmarking tools.
+  @override
   final String name = 'Type inference';
 
   final Compiler compiler;
@@ -187,7 +188,9 @@
   /// in a debugging data stream.
   static const String tag = 'global-type-inference-results';
 
+  @override
   final JClosedWorld closedWorld;
+  @override
   final InferredData inferredData;
   final GlobalTypeInferenceMemberResult _deadFieldResult;
   final GlobalTypeInferenceMemberResult _deadMethodResult;
@@ -240,6 +243,7 @@
         allocatedLists);
   }
 
+  @override
   void writeToDataSink(DataSink sink) {
     sink.writeBool(false); // Is _not_ trivial.
     sink.begin(tag);
@@ -365,8 +369,10 @@
   bool isFixedArrayCheckedForGrowable(ir.Node ctorCall) =>
       checkedForGrowableLists.contains(ctorCall);
 
+  @override
   AbstractValue typeOfNewList(ir.Node node) => _allocatedLists[node];
 
+  @override
   AbstractValue typeOfListLiteral(ir.Node node) => _allocatedLists[node];
 }
 
@@ -377,9 +383,13 @@
   static const String tag = 'global-type-inference-member-result';
 
   final GlobalTypeInferenceElementData _data;
+  @override
   final AbstractValue returnType;
+  @override
   final AbstractValue type;
+  @override
   final bool throwsAlways;
+  @override
   final bool isCalledOnce;
 
   GlobalTypeInferenceMemberResultImpl(this._data, this.returnType, this.type,
@@ -403,6 +413,7 @@
         throwsAlways: throwsAlways, isCalledOnce: isCalledOnce);
   }
 
+  @override
   void writeToDataSink(DataSink sink, AbstractValueDomain abstractValueDomain) {
     sink.begin(tag);
     sink.writeValueOrNull(_data, (GlobalTypeInferenceElementData data) {
@@ -415,19 +426,26 @@
     sink.end(tag);
   }
 
+  @override
   AbstractValue typeOfSend(ir.Node node) => _data?.typeOfSend(node);
+  @override
   AbstractValue typeOfGetter(ir.Node node) => _data?.typeOfGetter(node);
+  @override
   AbstractValue typeOfIterator(ir.Node node) => _data?.typeOfIterator(node);
+  @override
   AbstractValue typeOfIteratorMoveNext(ir.Node node) =>
       _data?.typeOfIteratorMoveNext(node);
+  @override
   AbstractValue typeOfIteratorCurrent(ir.Node node) =>
       _data?.typeOfIteratorCurrent(node);
 }
 
 class TrivialGlobalTypeInferenceResults implements GlobalTypeInferenceResults {
+  @override
   final JClosedWorld closedWorld;
   final TrivialGlobalTypeInferenceMemberResult _trivialMemberResult;
   final AbstractValue _trivialParameterResult;
+  @override
   final InferredData inferredData = new TrivialInferredData();
 
   TrivialGlobalTypeInferenceResults(this.closedWorld)
@@ -435,6 +453,7 @@
             closedWorld.abstractValueDomain.dynamicType),
         _trivialParameterResult = closedWorld.abstractValueDomain.dynamicType;
 
+  @override
   void writeToDataSink(DataSink sink) {
     sink.writeBool(true); // Is trivial.
   }
@@ -497,6 +516,7 @@
   @override
   bool get isCalledOnce => false;
 
+  @override
   void writeToDataSink(DataSink sink, AbstractValueDomain abstractValueDomain) {
     throw new UnsupportedError(
         "TrivialGlobalTypeInferenceMemberResult.writeToDataSink");
@@ -539,6 +559,7 @@
   @override
   bool get isCalledOnce => false;
 
+  @override
   void writeToDataSink(DataSink sink, AbstractValueDomain abstractValueDomain) {
     throw new UnsupportedError(
         "DeadFieldGlobalTypeInferenceResult.writeToDataSink");
@@ -581,6 +602,7 @@
   @override
   bool get isCalledOnce => false;
 
+  @override
   void writeToDataSink(DataSink sink, AbstractValueDomain abstractValueDomain) {
     throw new UnsupportedError(
         "DeadFieldGlobalTypeInferenceResult.writeToDataSink");
diff --git a/pkg/compiler/lib/src/io/code_output.dart b/pkg/compiler/lib/src/io/code_output.dart
index 9ccc4b3..d7342ef 100644
--- a/pkg/compiler/lib/src/io/code_output.dart
+++ b/pkg/compiler/lib/src/io/code_output.dart
@@ -50,9 +50,11 @@
 }
 
 class _SourceLocationsImpl implements SourceLocations {
+  @override
   final String name;
   final AbstractCodeOutput codeOutput;
   Map<int, List<SourceLocation>> markers = <int, List<SourceLocation>>{};
+  @override
   Map<int, List<FrameEntry>> frameMarkers = <int, List<FrameEntry>>{};
 
   _SourceLocationsImpl(this.name, this.codeOutput);
@@ -143,6 +145,7 @@
 abstract class AbstractCodeOutput extends CodeOutput {
   Map<String, _SourceLocationsImpl> sourceLocationsMap =
       <String, _SourceLocationsImpl>{};
+  @override
   bool isClosed = false;
 
   void _addInternal(String text);
@@ -199,10 +202,12 @@
   @override
   int get length => buffer.length;
 
+  @override
   String getText() {
     return buffer.toString();
   }
 
+  @override
   String toString() {
     throw "Don't use CodeBuffer.toString() since it drops sourcemap data.";
   }
@@ -210,6 +215,7 @@
 
 /// [CodeOutput] using a [CompilationOutput] as backend.
 class StreamCodeOutput extends AbstractCodeOutput {
+  @override
   int length = 0;
   final OutputSink output;
   final List<CodeOutputListener> _listeners;
@@ -225,6 +231,7 @@
     }
   }
 
+  @override
   void close() {
     output.close();
     super.close();
diff --git a/pkg/compiler/lib/src/io/kernel_source_information.dart b/pkg/compiler/lib/src/io/kernel_source_information.dart
index 3e63370..520fbb40 100644
--- a/pkg/compiler/lib/src/io/kernel_source_information.dart
+++ b/pkg/compiler/lib/src/io/kernel_source_information.dart
@@ -109,6 +109,8 @@
       location = node.location;
       offset = node.fileOffset;
     }
+    assert(
+        location != null, "No location found for $node (${node.runtimeType})");
     return new KernelSourceLocation(location, offset, name);
   }
 
@@ -483,8 +485,11 @@
 }
 
 class KernelSourceLocation extends AbstractSourceLocation {
+  @override
   final int offset;
+  @override
   final String sourceName;
+  @override
   final Uri sourceUri;
 
   KernelSourceLocation(ir.Location location, this.offset, this.sourceName)
diff --git a/pkg/compiler/lib/src/io/location_provider.dart b/pkg/compiler/lib/src/io/location_provider.dart
index a015bab..fff55c5 100644
--- a/pkg/compiler/lib/src/io/location_provider.dart
+++ b/pkg/compiler/lib/src/io/location_provider.dart
@@ -40,7 +40,7 @@
   @override
   Location getLocation(int offset) {
     RangeError.checkValueInInterval(offset, 0, length, 'offset');
-    return new Source(lineStarts, null).getLocation(null, offset);
+    return new Source(lineStarts, null, null, null).getLocation(null, offset);
   }
 
   @override
@@ -49,6 +49,7 @@
     this.length = length;
   }
 
+  @override
   String toString() {
     return 'lineStarts=$lineStarts,length=$length';
   }
diff --git a/pkg/compiler/lib/src/io/position_information.dart b/pkg/compiler/lib/src/io/position_information.dart
index 0d3b387..732b841 100644
--- a/pkg/compiler/lib/src/io/position_information.dart
+++ b/pkg/compiler/lib/src/io/position_information.dart
@@ -23,6 +23,7 @@
   @override
   final SourceLocation innerPosition;
 
+  @override
   final List<FrameContext> inliningContext;
 
   PositionSourceInformation(
@@ -49,11 +50,13 @@
     return new SourceSpan(uri, offset, offset);
   }
 
+  @override
   int get hashCode {
     return 0x7FFFFFFF &
         (startPosition.hashCode * 17 + innerPosition.hashCode * 19);
   }
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! PositionSourceInformation) return false;
@@ -78,6 +81,7 @@
     return sb.toString();
   }
 
+  @override
   String get shortText {
     if (startPosition != null) {
       return _computeText(startPosition.sourceUri.pathSegments.last);
@@ -86,6 +90,7 @@
     }
   }
 
+  @override
   String toString() {
     if (startPosition != null) {
       return _computeText('${startPosition.sourceUri}');
@@ -152,6 +157,7 @@
     }
   }
 
+  @override
   String toString() {
     return 'CodePosition(start=$startPosition,'
         'end=$endPosition,closing=$closingPosition)';
@@ -178,6 +184,7 @@
     _codePositionMap[node] = codePosition;
   }
 
+  @override
   CodePosition operator [](js.Node node) => _codePositionMap[node];
 }
 
@@ -295,6 +302,7 @@
     }
   }
 
+  @override
   void process(js.Node node, BufferedCodeOutput code) {
     new JavaScriptTracer(codePositionMap, reader, traceListeners).apply(node);
     inliningListener?.finish();
@@ -379,6 +387,7 @@
 class InliningTraceListener extends TraceListener
     with NodeToSourceInformationMixin {
   final SourceMapper sourceMapper;
+  @override
   final SourceInformationReader reader;
   final Map<int, List<FrameContext>> _frames = {};
 
@@ -459,6 +468,7 @@
 class PositionTraceListener extends TraceListener
     with NodeToSourceInformationMixin {
   final SourceMapper sourceMapper;
+  @override
   final SourceInformationReader reader;
 
   PositionTraceListener(this.sourceMapper, this.reader);
@@ -752,6 +762,7 @@
 
   int get value => subexpressionOffset;
 
+  @override
   String toString() {
     return 'Offset[statementOffset=$statementOffset,'
         'leftToRightOffset=$leftToRightOffset,'
@@ -1369,12 +1380,14 @@
     return sb.toString();
   }
 
+  @override
   String toString() => getCoverageReport();
 }
 
 /// [TraceListener] that registers [onStep] callbacks with [coverage].
 class CoverageListener extends TraceListener with NodeToSourceInformationMixin {
   final Coverage coverage;
+  @override
   final SourceInformationReader reader;
 
   CoverageListener(this.coverage, this.reader);
diff --git a/pkg/compiler/lib/src/io/source_file.dart b/pkg/compiler/lib/src/io/source_file.dart
index ff227ae..1b358bc 100644
--- a/pkg/compiler/lib/src/io/source_file.dart
+++ b/pkg/compiler/lib/src/io/source_file.dart
@@ -17,16 +17,23 @@
 /// a UTF-8 encoded [List<int>] of bytes.
 abstract class SourceFile<T> implements Input<T>, LocationProvider {
   /// The absolute URI of the source file.
+  @override
   Uri get uri;
 
+  @override
   InputKind get inputKind => InputKind.UTF8;
 
   kernel.Source cachedKernelSource;
 
   kernel.Source get kernelSource {
-    return cachedKernelSource ??=
-        new kernel.Source(lineStarts, slowUtf8ZeroTerminatedBytes())
-          ..cachedText = slowText();
+    // TODO(johnniwinther): Instead of creating a new Source object,
+    // we should use the one provided by the front-end.
+    return cachedKernelSource ??= new kernel.Source(
+        lineStarts,
+        slowUtf8ZeroTerminatedBytes(),
+        uri /* TODO(jensj): What is the import URI? */,
+        uri)
+      ..cachedText = slowText();
   }
 
   /// The name of the file.
@@ -83,6 +90,7 @@
     return starts;
   }
 
+  @override
   kernel.Location getLocation(int offset) {
     return kernelSource.getLocation(null, offset);
   }
@@ -172,6 +180,7 @@
 }
 
 class Utf8BytesSourceFile extends SourceFile<List<int>> {
+  @override
   final Uri uri;
 
   /// The UTF-8 encoded content of the source file.
@@ -184,22 +193,27 @@
   Utf8BytesSourceFile(this.uri, List<int> content)
       : this.zeroTerminatedContent = _zeroTerminateIfNecessary(content);
 
+  @override
   List<int> get data => zeroTerminatedContent;
 
+  @override
   String slowText() {
     // Don't convert the trailing zero byte.
     return utf8.decoder
         .convert(zeroTerminatedContent, 0, zeroTerminatedContent.length - 1);
   }
 
+  @override
   List<int> slowUtf8ZeroTerminatedBytes() => zeroTerminatedContent;
 
+  @override
   String slowSubstring(int start, int end) {
     // TODO(lry): to make this faster, the scanner could record the UTF-8 slack
     // for all positions of the source text. We could use [:content.sublist:].
     return slowText().substring(start, end);
   }
 
+  @override
   int get length {
     if (lengthCache == -1) {
       // During scanning the length is not yet assigned, so we use a slow path.
@@ -208,17 +222,20 @@
     return lengthCache;
   }
 
+  @override
   set length(int v) => lengthCache = v;
   int lengthCache = -1;
 }
 
 class CachingUtf8BytesSourceFile extends Utf8BytesSourceFile {
   String cachedText;
+  @override
   final String filename;
 
   CachingUtf8BytesSourceFile(Uri uri, this.filename, List<int> content)
       : super(uri, content);
 
+  @override
   String slowText() {
     if (cachedText == null) {
       cachedText = super.slowText();
@@ -228,7 +245,9 @@
 }
 
 class StringSourceFile extends SourceFile<List<int>> {
+  @override
   final Uri uri;
+  @override
   final String filename;
   final String text;
 
@@ -240,26 +259,35 @@
   StringSourceFile.fromName(String filename, String text)
       : this(new Uri(path: filename), filename, text);
 
+  @override
   List<int> get data => utf8.encode(text);
 
+  @override
   int get length => text.length;
+  @override
   set length(int v) {}
 
+  @override
   String slowText() => text;
 
+  @override
   List<int> slowUtf8ZeroTerminatedBytes() {
     return _zeroTerminateIfNecessary(utf8.encode(text));
   }
 
+  @override
   String slowSubstring(int start, int end) => text.substring(start, end);
 }
 
 /// Binary input data.
 class Binary implements Input<List<int>> {
+  @override
   final Uri uri;
+  @override
   final List<int> data;
 
   Binary(this.uri, this.data);
 
+  @override
   InputKind get inputKind => InputKind.binary;
 }
diff --git a/pkg/compiler/lib/src/io/source_information.dart b/pkg/compiler/lib/src/io/source_information.dart
index 756340b..64ca507 100644
--- a/pkg/compiler/lib/src/io/source_information.dart
+++ b/pkg/compiler/lib/src/io/source_information.dart
@@ -53,6 +53,7 @@
 
   FrameContext(this.callInformation, this.inlinedMethodName);
 
+  @override
   String toString() => "(FrameContext: $callInformation, $inlinedMethodName)";
 }
 
@@ -225,12 +226,14 @@
   /// `true` if the offset within the length of the source file.
   bool get isValid;
 
+  @override
   int get hashCode {
     return sourceUri.hashCode * 17 +
         offset.hashCode * 19 +
         sourceName.hashCode * 23;
   }
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! SourceLocation) return false;
@@ -241,6 +244,7 @@
 
   String get shortText => '${sourceUri?.pathSegments?.last}:[$line,$column]';
 
+  @override
   String toString() => '${sourceUri}:[${line},${column}]';
 }
 
@@ -263,38 +267,44 @@
   AbstractSourceLocation.fromOther(AbstractSourceLocation location)
       : this.fromLocation(location._location);
 
-  /// The absolute URI of the source file of this source location.
+  @override
   Uri get sourceUri => _sourceFile.uri;
 
-  /// The character offset of the this source location into the source file.
+  @override
   int get offset;
 
-  /// The 1-based line number of the [offset].
+  @override
   int get line => (_location ??= _sourceFile.getLocation(offset)).line;
 
-  /// The 1-based column number of the [offset] with its line.
+  @override
   int get column => (_location ??= _sourceFile.getLocation(offset)).column;
 
-  /// The name associated with this source location, if any.
+  @override
   String get sourceName;
 
-  /// `true` if the offset within the length of the source file.
+  @override
   bool get isValid => offset < _sourceFile.length;
 
+  @override
   String get shortText => '${sourceUri.pathSegments.last}:[$line,$column]';
 
+  @override
   String toString() => '${sourceUri}:[$line,$column]';
 }
 
 class OffsetSourceLocation extends AbstractSourceLocation {
+  @override
   final int offset;
+  @override
   final String sourceName;
 
   OffsetSourceLocation(SourceFile sourceFile, this.offset, this.sourceName)
       : super(sourceFile);
 
+  @override
   String get shortText => '${super.shortText}:$sourceName';
 
+  @override
   String toString() => '${super.toString()}:$sourceName';
 }
 
@@ -365,6 +375,7 @@
 
   String get shortName => '<no-location>';
 
+  @override
   String toString() => '<no-location>';
 }
 
diff --git a/pkg/compiler/lib/src/ir/annotations.dart b/pkg/compiler/lib/src/ir/annotations.dart
new file mode 100644
index 0000000..ae07571
--- /dev/null
+++ b/pkg/compiler/lib/src/ir/annotations.dart
@@ -0,0 +1,366 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:kernel/ast.dart' as ir;
+import '../common/names.dart';
+
+class IrAnnotationData {
+  Map<ir.Class, String> _nativeClassNames = {};
+  Set<ir.Member> _nativeMembers = {};
+  Map<ir.Member, String> _nativeMemberNames = {};
+  Map<ir.Member, List<String>> _createsAnnotations = {};
+  Map<ir.Member, List<String>> _returnsAnnotations = {};
+
+  Map<ir.Library, String> _jsInteropLibraryNames = {};
+  Map<ir.Class, String> _jsInteropClassNames = {};
+  Set<ir.Class> _anonymousJsInteropClasses = {};
+  Map<ir.Member, String> _jsInteropMemberNames = {};
+
+  Map<ir.Member, List<PragmaAnnotationData>> _memberPragmaAnnotations = {};
+
+  // Returns the text from the `@Native(<text>)` annotation of [node], if any.
+  String getNativeClassName(ir.Class node) => _nativeClassNames[node];
+
+  // Returns `true` if [node] has a native body, as in `method() native;`.
+  bool hasNativeBody(ir.Member node) => _nativeMembers.contains(node);
+
+  // Returns the text from the `@JSName(<text>)` annotation of [node], if any.
+  String getNativeMemberName(ir.Member node) => _nativeMemberNames[node];
+
+  // Returns a list of the text from the `@Creates(<text>)` annotation of
+  // [node].
+  List<String> getCreatesAnnotations(ir.Member node) =>
+      _createsAnnotations[node] ?? const [];
+
+  // Returns a list of the text from the `@Returns(<text>)` annotation of
+  // [node].
+  List<String> getReturnsAnnotations(ir.Member node) =>
+      _returnsAnnotations[node] ?? const [];
+
+  // Returns the text from the `@JS(<text>)` annotation of [node], if any.
+  String getJsInteropLibraryName(ir.Library node) =>
+      _jsInteropLibraryNames[node];
+
+  // Returns the text from the `@JS(<text>)` annotation of [node], if any.
+  String getJsInteropClassName(ir.Class node) => _jsInteropClassNames[node];
+
+  // Returns `true` if [node] is annotated with `@anonymous`.
+  bool isAnonymousJsInteropClass(ir.Class node) =>
+      _anonymousJsInteropClasses.contains(node);
+
+  // Returns the text from the `@JS(<text>)` annotation of [node], if any.
+  String getJsInteropMemberName(ir.Member node) => _jsInteropMemberNames[node];
+
+  // Returns a list of the `@pragma('dart2js:<suffix>')` annotations on [node].
+  List<PragmaAnnotationData> getMemberPragmaAnnotationData(ir.Member node) =>
+      _memberPragmaAnnotations[node] ?? const [];
+
+  void forEachNativeClass(void Function(ir.Class, String) f) {
+    _nativeClassNames.forEach(f);
+  }
+
+  void forEachJsInteropLibrary(void Function(ir.Library, String) f) {
+    _jsInteropLibraryNames.forEach(f);
+  }
+
+  void forEachJsInteropClass(
+      void Function(ir.Class, String, {bool isAnonymous}) f) {
+    _jsInteropClassNames.forEach((ir.Class node, String name) {
+      f(node, name, isAnonymous: isAnonymousJsInteropClass(node));
+    });
+  }
+
+  void forEachJsInteropMember(void Function(ir.Member, String) f) {
+    _jsInteropLibraryNames.forEach((ir.Library library, _) {
+      for (ir.Member member in library.members) {
+        if (member.isExternal) {
+          f(member, _jsInteropMemberNames[member] ?? member.name.name);
+        }
+      }
+    });
+    _jsInteropClassNames.forEach((ir.Class cls, _) {
+      for (ir.Member member in cls.members) {
+        if (member is ir.Field) continue;
+        String name = _jsInteropMemberNames[member];
+        if (member.isExternal) {
+          name ??= member.name.name;
+        }
+        f(member, name);
+      }
+    });
+  }
+
+  void forEachNativeMethodData(
+      void Function(ir.Member, String name, Iterable<String> createsAnnotations,
+              Iterable<String> returnsAnnotations)
+          f) {
+    for (ir.Member node in _nativeMembers) {
+      if (node is! ir.Field) {
+        String name = _nativeMemberNames[node] ?? node.name.name;
+        f(node, name, getCreatesAnnotations(node), getReturnsAnnotations(node));
+      }
+    }
+  }
+
+  void forEachNativeFieldData(
+      void Function(ir.Member, String name, Iterable<String> createsAnnotations,
+              Iterable<String> returnsAnnotations)
+          f) {
+    for (ir.Class cls in _nativeClassNames.keys) {
+      for (ir.Field field in cls.fields) {
+        if (field.isInstanceMember) {
+          String name = _nativeMemberNames[field] ?? field.name.name;
+          f(field, name, getCreatesAnnotations(field),
+              getReturnsAnnotations(field));
+        }
+      }
+    }
+  }
+}
+
+IrAnnotationData processAnnotations(ir.Component component) {
+  IrAnnotationData data = new IrAnnotationData();
+
+  void processMember(ir.Member member) {
+    List<PragmaAnnotationData> pragmaAnnotations;
+    List<String> createsAnnotations;
+    List<String> returnsAnnotations;
+    for (ir.Expression annotation in member.annotations) {
+      if (annotation is ir.ConstantExpression) {
+        ir.Constant constant = annotation.constant;
+
+        String jsName = _getJsInteropName(constant);
+        if (jsName != null) {
+          data._jsInteropMemberNames[member] = jsName;
+        }
+
+        bool isNativeMember = _isNativeMember(constant);
+        if (isNativeMember) {
+          data._nativeMembers.add(member);
+        }
+
+        String nativeName = _getNativeMemberName(constant);
+        if (nativeName != null) {
+          data._nativeMemberNames[member] = nativeName;
+        }
+
+        String creates = _getCreatesAnnotation(constant);
+        if (creates != null) {
+          if (createsAnnotations == null) {
+            data._createsAnnotations[member] = createsAnnotations = [];
+          }
+          createsAnnotations.add(creates);
+        }
+
+        String returns = _getReturnsAnnotation(constant);
+        if (returns != null) {
+          if (returnsAnnotations == null) {
+            data._returnsAnnotations[member] = returnsAnnotations = [];
+          }
+          returnsAnnotations.add(returns);
+        }
+
+        PragmaAnnotationData pragmaAnnotation = _getPragmaAnnotation(constant);
+        if (pragmaAnnotation != null) {
+          if (pragmaAnnotations == null) {
+            data._memberPragmaAnnotations[member] = pragmaAnnotations = [];
+          }
+          pragmaAnnotations.add(pragmaAnnotation);
+        }
+      }
+    }
+  }
+
+  for (ir.Library library in component.libraries) {
+    for (ir.Expression annotation in library.annotations) {
+      if (annotation is ir.ConstantExpression) {
+        ir.Constant constant = annotation.constant;
+
+        String jsName = _getJsInteropName(constant);
+        if (jsName != null) {
+          data._jsInteropLibraryNames[library] = jsName;
+        }
+      }
+    }
+    for (ir.Class cls in library.classes) {
+      for (ir.Expression annotation in cls.annotations) {
+        if (annotation is ir.ConstantExpression) {
+          ir.Constant constant = annotation.constant;
+
+          String nativeClassName = _getNativeClassName(constant);
+          if (nativeClassName != null) {
+            data._nativeClassNames[cls] = nativeClassName;
+          }
+
+          String jsName = _getJsInteropName(constant);
+          if (jsName != null) {
+            data._jsInteropClassNames[cls] = jsName;
+          }
+
+          bool isAnonymousJsInteropClass = _isAnonymousJsInterop(constant);
+          if (isAnonymousJsInteropClass) {
+            data._anonymousJsInteropClasses.add(cls);
+          }
+        }
+      }
+      for (ir.Member member in cls.members) {
+        processMember(member);
+      }
+    }
+    for (ir.Member member in library.members) {
+      processMember(member);
+    }
+  }
+  return data;
+}
+
+String _getNativeClassName(ir.Constant constant) {
+  if (constant is ir.InstanceConstant) {
+    // TODO(johnniwinther): Add an IrCommonElements for these queries; i.e.
+    // `commonElements.isNativeAnnotationClass(constant.classNode)`.
+    if (constant.classNode.name == 'Native' &&
+        constant.classNode.enclosingLibrary.importUri == Uris.dart__js_helper) {
+      if (constant.fieldValues.length == 1) {
+        ir.Constant fieldValue = constant.fieldValues.values.single;
+        String name;
+        if (fieldValue is ir.StringConstant) {
+          name = fieldValue.value;
+        }
+        if (name != null) {
+          return name;
+        }
+      }
+    }
+  }
+  return null;
+}
+
+bool _isNativeMember(ir.Constant constant) {
+  return constant is ir.InstanceConstant &&
+      constant.classNode.name == 'ExternalName' &&
+      constant.classNode.enclosingLibrary.importUri == Uris.dart__internal;
+}
+
+String _getNativeMemberName(ir.Constant constant) {
+  if (constant is ir.InstanceConstant &&
+      constant.classNode.name == 'JSName' &&
+      constant.classNode.enclosingLibrary.importUri == Uris.dart__js_helper) {
+    assert(constant.fieldValues.length == 1);
+    ir.Constant fieldValue = constant.fieldValues.values.single;
+    if (fieldValue is ir.StringConstant) {
+      return fieldValue.value;
+    }
+  }
+  return null;
+}
+
+String _getCreatesAnnotation(ir.Constant constant) {
+  if (constant is ir.InstanceConstant &&
+      constant.classNode.name == 'Creates' &&
+      constant.classNode.enclosingLibrary.importUri == Uris.dart__js_helper) {
+    assert(constant.fieldValues.length == 1);
+    ir.Constant fieldValue = constant.fieldValues.values.single;
+    if (fieldValue is ir.StringConstant) {
+      return fieldValue.value;
+    }
+  }
+  return null;
+}
+
+String _getReturnsAnnotation(ir.Constant constant) {
+  if (constant is ir.InstanceConstant &&
+      constant.classNode.name == 'Returns' &&
+      constant.classNode.enclosingLibrary.importUri == Uris.dart__js_helper) {
+    assert(constant.fieldValues.length == 1);
+    ir.Constant fieldValue = constant.fieldValues.values.single;
+    if (fieldValue is ir.StringConstant) {
+      return fieldValue.value;
+    }
+  }
+  return null;
+}
+
+String _getJsInteropName(ir.Constant constant) {
+  if (constant is ir.InstanceConstant &&
+      constant.classNode.name == 'JS' &&
+      constant.classNode.enclosingLibrary.importUri == Uris.package_js) {
+    assert(constant.fieldValues.length == 1);
+    ir.Constant fieldValue = constant.fieldValues.values.single;
+    if (fieldValue is ir.NullConstant) {
+      return '';
+    } else if (fieldValue is ir.StringConstant) {
+      return fieldValue.value;
+    }
+  }
+  return null;
+}
+
+bool _isAnonymousJsInterop(ir.Constant constant) {
+  return constant is ir.InstanceConstant &&
+      constant.classNode.name == '_Anonymous' &&
+      constant.classNode.enclosingLibrary.importUri == Uris.package_js;
+}
+
+class PragmaAnnotationData {
+  // TODO(johnniwinther): Support non 'dart2js:' pragma names if necessary.
+  final String suffix;
+
+  // TODO(johnniwinther): Support options objects when necessary.
+  final bool hasOptions;
+
+  const PragmaAnnotationData(this.suffix, {this.hasOptions: false});
+
+  String get name => 'dart2js:$suffix';
+
+  @override
+  String toString() => 'PragmaAnnotationData($name)';
+}
+
+PragmaAnnotationData _getPragmaAnnotation(ir.Constant constant) {
+  if (constant is! ir.InstanceConstant) return null;
+  ir.InstanceConstant value = constant;
+  ir.Class cls = value.classNode;
+  Uri uri = cls.enclosingLibrary.importUri;
+  if (uri == Uris.package_meta_dart2js) {
+    if (cls.name == '_NoInline') {
+      return const PragmaAnnotationData('noInline');
+    } else if (cls.name == '_TryInline') {
+      return const PragmaAnnotationData('tryInline');
+    }
+  } else if (uri == Uris.dart_core && cls.name == 'pragma') {
+    ir.Constant nameValue;
+    ir.Constant optionsValue;
+    value.fieldValues.forEach((ir.Reference reference, ir.Constant fieldValue) {
+      ir.Field field = reference.asField;
+      if (field.name.name == 'name') {
+        nameValue = fieldValue;
+      } else if (field.name.name == 'options') {
+        optionsValue = fieldValue;
+      }
+    });
+    if (nameValue is! ir.StringConstant) return null;
+    ir.StringConstant stringValue = nameValue;
+    String name = stringValue.value;
+    String prefix = 'dart2js:';
+    if (!name.startsWith(prefix)) return null;
+    String suffix = name.substring(prefix.length);
+    return new PragmaAnnotationData(suffix,
+        hasOptions: optionsValue is! ir.NullConstant);
+  }
+  return null;
+}
+
+List<PragmaAnnotationData> computePragmaAnnotationDataFromIr(ir.Member member) {
+  List<PragmaAnnotationData> annotations = [];
+  for (ir.Expression metadata in member.annotations) {
+    if (metadata is! ir.ConstantExpression) continue;
+    ir.ConstantExpression constantExpression = metadata;
+    ir.Constant constant = constantExpression.constant;
+    PragmaAnnotationData data = _getPragmaAnnotation(constant);
+    if (data != null) {
+      annotations.add(data);
+    }
+  }
+  return annotations;
+}
diff --git a/pkg/compiler/lib/src/ir/cached_static_type.dart b/pkg/compiler/lib/src/ir/cached_static_type.dart
index 5daea39..6067b5e 100644
--- a/pkg/compiler/lib/src/ir/cached_static_type.dart
+++ b/pkg/compiler/lib/src/ir/cached_static_type.dart
@@ -14,6 +14,7 @@
 /// and a precomputed cache for complex expression type.
 class CachedStaticType extends StaticTypeBase implements StaticTypeProvider {
   final Map<ir.Expression, ir.DartType> _cache;
+  @override
   final ThisInterfaceType thisType;
 
   CachedStaticType(
diff --git a/pkg/compiler/lib/src/ir/closure.dart b/pkg/compiler/lib/src/ir/closure.dart
index c53f10f..d237f3f 100644
--- a/pkg/compiler/lib/src/ir/closure.dart
+++ b/pkg/compiler/lib/src/ir/closure.dart
@@ -17,6 +17,7 @@
   Map<ir.TreeNode, KernelScopeInfo> closuresToGenerate =
       <ir.TreeNode, KernelScopeInfo>{};
 
+  @override
   String toString() {
     return '$scopeInfo\n$capturedScopesMap\n$closuresToGenerate';
   }
@@ -76,6 +77,7 @@
       this.thisUsedAsFreeVariableIfNeedsRti,
       this.hasThisLocal);
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write('KernelScopeInfo(this=$hasThisLocal,');
@@ -185,6 +187,9 @@
   /// A type variable passed as the type argument of a list literal.
   listLiteral,
 
+  /// A type variable passed as the type argument of a set literal.
+  setLiteral,
+
   /// A type variable passed as the type argument of a map literal.
   mapLiteral,
 
@@ -307,12 +312,16 @@
   static const VariableUse listLiteral =
       const VariableUse._simple(VariableUseKind.listLiteral);
 
+  static const VariableUse setLiteral =
+      const VariableUse._simple(VariableUseKind.setLiteral);
+
   static const VariableUse mapLiteral =
       const VariableUse._simple(VariableUseKind.mapLiteral);
 
   static const VariableUse fieldType =
       const VariableUse._simple(VariableUseKind.fieldType);
 
+  @override
   int get hashCode =>
       kind.hashCode * 11 +
       member.hashCode * 13 +
@@ -320,6 +329,7 @@
       invocation.hashCode * 19 +
       instantiation.hashCode * 23;
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! VariableUse) return false;
@@ -330,6 +340,7 @@
         instantiation == other.instantiation;
   }
 
+  @override
   String toString() => 'VariableUse(kind=$kind,member=$member,'
       'localFunction=$localFunction,invocation=$invocation,'
       'instantiation=$instantiation)';
@@ -392,21 +403,26 @@
   TypeVariableTypeWithContext.internal(
       this.type, this.context, this.kind, this.typeDeclaration);
 
+  @override
   accept(ir.Visitor v) {
     throw new UnsupportedError('TypeVariableTypeWithContext.accept');
   }
 
+  @override
   visitChildren(ir.Visitor v) {
     throw new UnsupportedError('TypeVariableTypeWithContext.visitChildren');
   }
 
+  @override
   int get hashCode => type.hashCode;
 
+  @override
   bool operator ==(other) {
     if (other is! TypeVariableTypeWithContext) return false;
     return type == other.type && context == other.context;
   }
 
+  @override
   String toString() =>
       'TypeVariableTypeWithContext(type=$type,context=$context,'
       'kind=$kind,typeDeclaration=$typeDeclaration)';
diff --git a/pkg/compiler/lib/src/ir/constants.dart b/pkg/compiler/lib/src/ir/constants.dart
new file mode 100644
index 0000000..06a6eb3
--- /dev/null
+++ b/pkg/compiler/lib/src/ir/constants.dart
@@ -0,0 +1,189 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:kernel/ast.dart' as ir;
+import 'package:kernel/type_environment.dart' as ir;
+import 'package:front_end/src/api_prototype/constant_evaluator.dart' as ir;
+import 'package:front_end/src/api_unstable/dart2js.dart' as ir;
+
+import '../kernel/dart2js_target.dart';
+
+typedef ReportErrorFunction = void Function(
+    ir.LocatedMessage message, List<ir.LocatedMessage> context);
+
+class Dart2jsConstantEvaluator extends ir.ConstantEvaluator {
+  final bool _supportReevaluationForTesting;
+
+  bool requiresConstant;
+
+  Dart2jsConstantEvaluator(
+      ir.TypeEnvironment typeEnvironment, ReportErrorFunction reportError,
+      {bool enableAsserts,
+      Map<String, String> environment: const {},
+      bool supportReevaluationForTesting: false})
+      : _supportReevaluationForTesting = supportReevaluationForTesting,
+        super(const Dart2jsConstantsBackend(), environment, typeEnvironment,
+            enableAsserts, new ErrorReporter(reportError));
+
+  @override
+  ErrorReporter get errorReporter => super.errorReporter;
+
+  @override
+  ir.Constant evaluate(ir.Expression node, {bool requireConstant: true}) {
+    errorReporter.requiresConstant = requireConstant;
+    if (node is ir.ConstantExpression) {
+      ir.Constant constant = node.constant;
+      if (constant is ir.UnevaluatedConstant) {
+        ir.Constant result = super.evaluate(constant.expression);
+        assert(
+            result is ir.UnevaluatedConstant ||
+                !result.accept(const UnevaluatedConstantFinder()),
+            "Invalid constant result $result from ${constant.expression}.");
+        if (!_supportReevaluationForTesting) {
+          node.constant = result;
+        }
+        return result;
+      }
+      return constant;
+    }
+    if (requireConstant) {
+      // TODO(johnniwinther): Handle reporting of compile-time constant
+      // evaluation errors.
+      return super.evaluate(node);
+    } else {
+      try {
+        return super.evaluate(node);
+      } catch (e) {
+        return null;
+      }
+    }
+  }
+}
+
+class ErrorReporter implements ir.ErrorReporter {
+  final ReportErrorFunction _reportError;
+  bool requiresConstant;
+
+  ErrorReporter(this._reportError);
+
+  @override
+  void reportInvalidExpression(ir.InvalidExpression node) {
+    // Ignore.
+  }
+
+  @override
+  void report(ir.LocatedMessage message, List<ir.LocatedMessage> context) {
+    if (requiresConstant) {
+      _reportError(message, context);
+    }
+  }
+}
+
+/// [ir.Constant] visitor that returns `true` if the visitor constant contains
+/// an [ir.UnevaluatedConstant].
+class UnevaluatedConstantFinder extends ir.ConstantVisitor<bool> {
+  const UnevaluatedConstantFinder();
+
+  @override
+  bool defaultConstant(ir.Constant node) => false;
+
+  @override
+  bool visitUnevaluatedConstant(ir.UnevaluatedConstant node) => true;
+
+  @override
+  bool visitPartialInstantiationConstant(ir.PartialInstantiationConstant node) {
+    return node.tearOffConstant.accept(this);
+  }
+
+  @override
+  bool visitInstanceConstant(ir.InstanceConstant node) {
+    for (ir.Constant value in node.fieldValues.values) {
+      if (value.accept(this)) {
+        return true;
+      }
+    }
+    return false;
+  }
+
+  @override
+  bool visitSetConstant(ir.SetConstant node) {
+    for (ir.Constant value in node.entries) {
+      if (value.accept(this)) {
+        return true;
+      }
+    }
+    return false;
+  }
+
+  @override
+  bool visitListConstant(ir.ListConstant node) {
+    for (ir.Constant value in node.entries) {
+      if (value.accept(this)) {
+        return true;
+      }
+    }
+    return false;
+  }
+
+  @override
+  bool visitMapConstant(ir.MapConstant node) {
+    for (ir.ConstantMapEntry entry in node.entries) {
+      if (entry.key.accept(this)) {
+        return true;
+      }
+      if (entry.value.accept(this)) {
+        return true;
+      }
+    }
+    return false;
+  }
+}
+
+/// Class to represent a reference to a constant in allocation nodes.
+///
+/// This class is needed in order to support serialization of references to
+/// constant nodes. Since the constant nodes are not [ir.TreeNode]s we can only
+/// serialize the constants as values which would bypass by the canonicalization
+/// performed by the CFE. This class extends only as a trick to easily pass
+/// it through serialization.
+///
+/// By adding a reference to the constant expression in which the constant
+/// occurred, we can serialize references to constants in two steps: a reference
+/// to the constant expression followed by an index of the referred constant
+/// in the traversal order of the constant held by the constant expression.
+///
+/// This is used for list, map, and set literals.
+class ConstantReference extends ir.TreeNode {
+  final ir.ConstantExpression expression;
+  final ir.Constant constant;
+
+  ConstantReference(this.expression, this.constant);
+
+  @override
+  void visitChildren(ir.Visitor v) {
+    throw new UnsupportedError("ConstantReference.visitChildren");
+  }
+
+  @override
+  accept(ir.TreeVisitor v) {
+    throw new UnsupportedError("ConstantReference.accept");
+  }
+
+  @override
+  transformChildren(ir.Transformer v) {
+    throw new UnsupportedError("ConstantReference.transformChildren");
+  }
+
+  @override
+  int get hashCode => 13 * constant.hashCode;
+
+  @override
+  bool operator ==(Object other) {
+    if (identical(this, other)) return true;
+    return other is ConstantReference && constant == other.constant;
+  }
+
+  @override
+  String toString() => 'ConstantReference(constant=$constant)';
+}
diff --git a/pkg/compiler/lib/src/ir/debug.dart b/pkg/compiler/lib/src/ir/debug.dart
index a61a77a..27fad8e 100644
--- a/pkg/compiler/lib/src/ir/debug.dart
+++ b/pkg/compiler/lib/src/ir/debug.dart
@@ -12,6 +12,7 @@
 import '../util/util.dart' show Indentation, Tagging;
 
 class DebugPrinter extends Visitor with Indentation, Tagging<Node> {
+  @override
   StringBuffer sb = new StringBuffer();
 
   void visitNodeWithChildren(Node node, String type, [Map params]) {
diff --git a/pkg/compiler/lib/src/ir/impact.dart b/pkg/compiler/lib/src/ir/impact.dart
index f7118bd..d635b78 100644
--- a/pkg/compiler/lib/src/ir/impact.dart
+++ b/pkg/compiler/lib/src/ir/impact.dart
@@ -10,6 +10,7 @@
 import 'package:kernel/type_environment.dart' as ir;
 
 import '../common.dart';
+import 'constants.dart';
 import 'impact_data.dart';
 import 'runtime_type_analysis.dart';
 import 'scope.dart';
@@ -88,7 +89,10 @@
 
   void registerTypeLiteral(ir.DartType type, ir.LibraryDependency import);
 
-  void registerFieldInitializer(ir.Field node);
+  void registerFieldInitialization(ir.Field node);
+
+  void registerFieldConstantInitialization(
+      ir.Field node, ConstantReference constant);
 
   void registerLoadLibrary();
 
@@ -111,6 +115,9 @@
       ir.LibraryDependency import,
       {bool isConst});
 
+  void registerConstInstantiation(ir.Class cls, List<ir.DartType> typeArguments,
+      ir.LibraryDependency import);
+
   void registerStaticInvocation(
       ir.Procedure target,
       int positionalArguments,
@@ -186,6 +193,7 @@
 
 abstract class ImpactBuilderBase extends StaticTypeVisitor
     implements ImpactRegistry {
+  @override
   final VariableScopeModel variableScopeModel;
 
   ImpactBuilderBase(ir.TypeEnvironment typeEnvironment,
@@ -396,7 +404,7 @@
 
   @override
   void handleFieldInitializer(ir.FieldInitializer node) {
-    registerFieldInitializer(node.field);
+    registerFieldInitialization(node.field);
   }
 
   @override
@@ -404,6 +412,7 @@
     registerLoadLibrary();
   }
 
+  @override
   void handleRedirectingInitializer(
       ir.RedirectingInitializer node, ArgumentTypes argumentTypes) {
     registerRedirectingInitializer(
@@ -641,24 +650,159 @@
     return super.visitSwitchStatement(node);
   }
 
+  @override
   void handleRuntimeTypeUse(ir.PropertyGet node, RuntimeTypeUseKind kind,
       ir.DartType receiverType, ir.DartType argumentType) {
     registerRuntimeTypeUse(node, kind, receiverType, argumentType);
   }
+
+  @override
+  void handleConstantExpression(ir.ConstantExpression node) {
+    ir.LibraryDependency import = getDeferredImport(node);
+    node.constant.accept(new ConstantImpactVisitor(this, import, node));
+  }
 }
 
 /// Visitor that builds an [ImpactData] object for the world impact.
 class ImpactBuilder extends ImpactBuilderBase with ImpactRegistryMixin {
+  @override
   final bool useAsserts;
 
+  @override
   final inferEffectivelyFinalVariableTypes;
 
   ImpactBuilder(ir.TypeEnvironment typeEnvironment,
       ir.ClassHierarchy classHierarchy, VariableScopeModel variableScopeModel,
       {this.useAsserts: false, this.inferEffectivelyFinalVariableTypes: true})
       : super(typeEnvironment, classHierarchy, variableScopeModel);
+
+  ImpactBuilderData computeImpact(ir.Member node) {
+    if (retainDataForTesting) {
+      typeMapsForTesting = {};
+    }
+    node.accept(this);
+    return new ImpactBuilderData(
+        impactData, typeMapsForTesting, cachedStaticTypes);
+  }
 }
 
 /// Return the named arguments names as a list of strings.
 List<String> _getNamedArguments(ir.Arguments arguments) =>
     arguments.named.map((n) => n.name).toList();
+
+class ImpactBuilderData {
+  final ImpactData impactData;
+  final Map<ir.Expression, TypeMap> typeMapsForTesting;
+  final Map<ir.Expression, ir.DartType> cachedStaticTypes;
+
+  ImpactBuilderData(
+      this.impactData, this.typeMapsForTesting, this.cachedStaticTypes);
+}
+
+class ConstantImpactVisitor implements ir.ConstantVisitor<void> {
+  final ImpactRegistry registry;
+  final ir.LibraryDependency import;
+  final ir.ConstantExpression expression;
+
+  ConstantImpactVisitor(this.registry, this.import, this.expression);
+
+  @override
+  void defaultConstant(ir.Constant node) {
+    throw new UnsupportedError(
+        "Unexpected constant ${node} (${node.runtimeType}).");
+  }
+
+  @override
+  void visitUnevaluatedConstant(ir.UnevaluatedConstant node) {
+    // Do nothing. This occurs when the constant couldn't be evaluated because
+    // of a compile-time error.
+  }
+
+  @override
+  void visitTypeLiteralConstant(ir.TypeLiteralConstant node) {
+    registry.registerTypeLiteral(node.type, import);
+  }
+
+  @override
+  void visitTearOffConstant(ir.TearOffConstant node) {
+    registry.registerStaticTearOff(node.procedure, import);
+  }
+
+  @override
+  void visitPartialInstantiationConstant(ir.PartialInstantiationConstant node) {
+    registry.registerGenericInstantiation(
+        node.tearOffConstant.procedure.function.functionType, node.types);
+    node.tearOffConstant.accept(this);
+  }
+
+  @override
+  void visitInstanceConstant(ir.InstanceConstant node) {
+    registry.registerConstInstantiation(
+        node.classNode, node.typeArguments, import);
+    node.fieldValues.forEach((ir.Reference reference, ir.Constant value) {
+      ir.Field field = reference.asField;
+      registry.registerFieldConstantInitialization(
+          field, new ConstantReference(expression, value));
+      value.accept(this);
+    });
+  }
+
+  @override
+  void visitSetConstant(ir.SetConstant node) {
+    registry.registerSetLiteral(node.typeArgument,
+        isConst: true, isEmpty: node.entries.isEmpty);
+    for (ir.Constant element in node.entries) {
+      element.accept(this);
+    }
+  }
+
+  @override
+  void visitListConstant(ir.ListConstant node) {
+    registry.registerListLiteral(node.typeArgument,
+        isConst: true, isEmpty: node.entries.isEmpty);
+    for (ir.Constant element in node.entries) {
+      element.accept(this);
+    }
+  }
+
+  @override
+  void visitMapConstant(ir.MapConstant node) {
+    registry.registerMapLiteral(node.keyType, node.valueType,
+        isConst: true, isEmpty: node.entries.isEmpty);
+    for (ir.ConstantMapEntry entry in node.entries) {
+      entry.key.accept(this);
+      entry.value.accept(this);
+    }
+  }
+
+  @override
+  void visitSymbolConstant(ir.SymbolConstant node) {
+    // TODO(johnniwinther): Handle the library reference.
+    registry.registerSymbolLiteral(node.name);
+  }
+
+  @override
+  void visitStringConstant(ir.StringConstant node) {
+    registry.registerStringLiteral(node.value);
+  }
+
+  @override
+  void visitDoubleConstant(ir.DoubleConstant node) {
+    registry.registerDoubleLiteral(node.value);
+  }
+
+  @override
+  void visitIntConstant(ir.IntConstant node) {
+    registry.registerIntLiteral(node.value);
+  }
+
+  @override
+  void visitBoolConstant(ir.BoolConstant node) {
+    registry.registerBoolLiteral(node.value);
+  }
+
+  @override
+  void visitNullConstant(ir.NullConstant node) {
+    registry.registerNullLiteral();
+  }
+}
diff --git a/pkg/compiler/lib/src/ir/impact_data.dart b/pkg/compiler/lib/src/ir/impact_data.dart
index 20bd480..543d3ed 100644
--- a/pkg/compiler/lib/src/ir/impact_data.dart
+++ b/pkg/compiler/lib/src/ir/impact_data.dart
@@ -8,6 +8,7 @@
 
 import '../serialization/serialization.dart';
 import '../util/enumset.dart';
+import 'constants.dart';
 import 'impact.dart';
 import 'runtime_type_analysis.dart';
 import 'static_type.dart';
@@ -188,6 +189,14 @@
   }
 
   @override
+  void registerConstInstantiation(ir.Class cls, List<ir.DartType> typeArguments,
+      ir.LibraryDependency import) {
+    _data._constInstantiations ??= [];
+    _data._constInstantiations
+        .add(new _ConstInstantiation(cls, typeArguments, import));
+  }
+
+  @override
   void registerLazyField() {
     _registerFeature(_Feature.lazyField);
   }
@@ -216,12 +225,19 @@
   }
 
   @override
-  void registerFieldInitializer(ir.Field node) {
+  void registerFieldInitialization(ir.Field node) {
     _data._fieldInitializers ??= [];
     _data._fieldInitializers.add(node);
   }
 
   @override
+  void registerFieldConstantInitialization(
+      ir.Field node, ConstantReference constant) {
+    _data._fieldConstantInitializers ??= {};
+    _data._fieldConstantInitializers.putIfAbsent(node, () => []).add(constant);
+  }
+
+  @override
   void registerTypeLiteral(ir.DartType type, ir.LibraryDependency import) {
     _data._typeLiterals ??= [];
     _data._typeLiterals.add(new _TypeLiteral(type, import));
@@ -469,10 +485,12 @@
   List<_LocalFunctionInvocation> _localFunctionInvocations;
   List<_StaticInvocation> _staticInvocations;
   List<_ConstructorInvocation> _constructorInvocations;
+  List<_ConstInstantiation> _constInstantiations;
   EnumSet<_Feature> _features;
   List<_TypeUse> _typeUses;
   List<_RedirectingInitializer> _redirectingInitializers;
   List<ir.Field> _fieldInitializers;
+  Map<ir.Field, List<ConstantReference>> _fieldConstantInitializers;
   List<_TypeLiteral> _typeLiterals;
   List<ir.TreeNode> _localFunctions;
   List<_GenericInstantiation> _genericInstantiations;
@@ -546,6 +564,8 @@
         () => new _RedirectingInitializer.fromDataSource(source),
         emptyAsNull: true);
     _fieldInitializers = source.readMemberNodes(emptyAsNull: true);
+    _fieldConstantInitializers =
+        source.readMemberMap(() => source.readTreeNodes(), emptyAsNull: true);
     _typeLiterals = source.readList(
         () => new _TypeLiteral.fromDataSource(source),
         emptyAsNull: true);
@@ -640,6 +660,8 @@
         (_RedirectingInitializer o) => o.toDataSink(sink),
         allowNull: true);
     sink.writeMemberNodes(_fieldInitializers, allowNull: true);
+    sink.writeMemberNodeMap(_fieldConstantInitializers, sink.writeTreeNodes,
+        allowNull: true);
     sink.writeList(_typeLiterals, (_TypeLiteral o) => o.toDataSink(sink),
         allowNull: true);
     sink.writeTreeNodes(_localFunctions, allowNull: true);
@@ -795,6 +817,12 @@
             isConst: data.isConst);
       }
     }
+    if (_constInstantiations != null) {
+      for (_ConstInstantiation data in _constInstantiations) {
+        registry.registerConstInstantiation(
+            data.cls, data.typeArguments, data.import);
+      }
+    }
     if (_features != null) {
       for (_Feature data in _features.iterable(_Feature.values)) {
         switch (data) {
@@ -878,9 +906,17 @@
     }
     if (_fieldInitializers != null) {
       for (ir.Field data in _fieldInitializers) {
-        registry.registerFieldInitializer(data);
+        registry.registerFieldInitialization(data);
       }
     }
+    if (_fieldConstantInitializers != null) {
+      _fieldConstantInitializers
+          .forEach((ir.Field field, List<ConstantReference> constants) {
+        for (ConstantReference constant in constants) {
+          registry.registerFieldConstantInitialization(field, constant);
+        }
+      });
+    }
     if (_typeLiterals != null) {
       for (_TypeLiteral data in _typeLiterals) {
         registry.registerTypeLiteral(data.type, data.import);
@@ -1312,6 +1348,33 @@
   }
 }
 
+class _ConstInstantiation {
+  static const String tag = '_ConstInstantiation';
+
+  final ir.Class cls;
+  final List<ir.DartType> typeArguments;
+  final ir.LibraryDependency import;
+
+  _ConstInstantiation(this.cls, this.typeArguments, this.import);
+
+  factory _ConstInstantiation.fromDataSource(DataSource source) {
+    source.begin(tag);
+    ir.Class cls = source.readClassNode();
+    List<ir.DartType> typeArguments = source.readDartTypeNodes();
+    ir.LibraryDependency import = source.readLibraryDependencyNodeOrNull();
+    source.end(tag);
+    return new _ConstInstantiation(cls, typeArguments, import);
+  }
+
+  void toDataSink(DataSink sink) {
+    sink.begin(tag);
+    sink.writeClassNode(cls);
+    sink.writeDartTypeNodes(typeArguments);
+    sink.writeLibraryDependencyNodeOrNull(import);
+    sink.end(tag);
+  }
+}
+
 enum _Feature {
   lazyField,
   loadLibrary,
diff --git a/pkg/compiler/lib/src/ir/modular.dart b/pkg/compiler/lib/src/ir/modular.dart
new file mode 100644
index 0000000..9d7ea73
--- /dev/null
+++ b/pkg/compiler/lib/src/ir/modular.dart
@@ -0,0 +1,30 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:kernel/ast.dart' as ir;
+import 'package:kernel/class_hierarchy.dart' as ir;
+import 'package:kernel/core_types.dart' as ir;
+import 'package:kernel/type_algebra.dart' as ir;
+import 'package:kernel/type_environment.dart' as ir;
+
+import '../js_backend/annotations.dart';
+import '../util/enumset.dart';
+import 'annotations.dart';
+import 'impact.dart';
+import 'scope.dart';
+
+class ModularMemberData {
+  final ScopeModel scopeModel;
+  final ImpactBuilderData impactBuilderData;
+
+  ModularMemberData(this.scopeModel, this.impactBuilderData);
+}
+
+abstract class ModularStrategy {
+  List<PragmaAnnotationData> getPragmaAnnotationData(ir.Member node);
+
+  // TODO(johnniwinther): Avoid the need for passing [pragmaAnnotations].
+  ModularMemberData getModularMemberData(
+      ir.Member node, EnumSet<PragmaAnnotation> pragmaAnnotations);
+}
diff --git a/pkg/compiler/lib/src/ir/runtime_type_analysis.dart b/pkg/compiler/lib/src/ir/runtime_type_analysis.dart
index cde8217..d7e1d75 100644
--- a/pkg/compiler/lib/src/ir/runtime_type_analysis.dart
+++ b/pkg/compiler/lib/src/ir/runtime_type_analysis.dart
@@ -63,6 +63,7 @@
     throw new UnsupportedError("Unexpected RuntimeTypeUseKind $kind.");
   }
 
+  @override
   String toString() {
     return "RuntimeTypeUseData(kind=$kind,"
         "receiverGet=$leftRuntimeTypeExpression,receiver=$receiver,"
diff --git a/pkg/compiler/lib/src/ir/scope.dart b/pkg/compiler/lib/src/ir/scope.dart
index 1b547d2..2a9cee6 100644
--- a/pkg/compiler/lib/src/ir/scope.dart
+++ b/pkg/compiler/lib/src/ir/scope.dart
@@ -5,46 +5,25 @@
 import 'package:kernel/ast.dart' as ir;
 import 'closure.dart';
 import 'scope_visitor.dart';
+import 'package:front_end/src/api_prototype/constant_evaluator.dart' as ir;
 
 class ScopeModel {
   final ClosureScopeModel closureScopeModel;
   final VariableScopeModel variableScopeModel;
+  final InitializerComplexity initializerComplexity;
 
-  ScopeModel(this.closureScopeModel, this.variableScopeModel);
+  const ScopeModel(
+      {this.closureScopeModel,
+      this.variableScopeModel,
+      this.initializerComplexity})
+      : assert(initializerComplexity != null);
 
   /// Inspect members and mark if those members capture any state that needs to
   /// be marked as free variables.
-  static ScopeModel computeScopeModel(ir.Member node) {
-    if (node.isAbstract && !node.isExternal) return null;
-    if (node is ir.Field && !node.isInstanceMember) {
-      ir.Field field = node;
-      // Skip top-level/static fields without an initializer.
-      if (field.initializer == null) return null;
-    }
-
-    bool hasThisLocal = false;
-    if (node is ir.Constructor) {
-      hasThisLocal = true;
-    } else if (node is ir.Procedure && node.kind == ir.ProcedureKind.Factory) {
-      hasThisLocal = false;
-    } else if (node.isInstanceMember) {
-      hasThisLocal = true;
-    }
-    ClosureScopeModel closureScopeModel = new ClosureScopeModel();
-    ScopeModelBuilder translator =
-        new ScopeModelBuilder(closureScopeModel, hasThisLocal: hasThisLocal);
-    if (node is ir.Field) {
-      if (node is ir.Field && node.initializer != null) {
-        node.accept(translator);
-      } else {
-        assert(node.isInstanceMember);
-        closureScopeModel.scopeInfo = new KernelScopeInfo(true);
-      }
-    } else {
-      assert(node is ir.Procedure || node is ir.Constructor);
-      node.accept(translator);
-    }
-    return new ScopeModel(closureScopeModel, translator.variableScopeModel);
+  factory ScopeModel.from(
+      ir.Member node, ir.ConstantEvaluator constantEvaluator) {
+    ScopeModelBuilder builder = new ScopeModelBuilder(constantEvaluator);
+    return builder.computeModel(node);
   }
 }
 
@@ -95,6 +74,7 @@
 class VariableScopeImpl implements VariableScope {
   List<VariableScope> _subScopes;
   Set<ir.VariableDeclaration> _assignedVariables;
+  @override
   bool hasContinueSwitch = false;
 
   void addSubScope(VariableScope scope) {
@@ -107,6 +87,7 @@
     _assignedVariables.add(variable);
   }
 
+  @override
   Iterable<ir.VariableDeclaration> get assignedVariables sync* {
     if (_assignedVariables != null) {
       yield* _assignedVariables;
diff --git a/pkg/compiler/lib/src/ir/scope_visitor.dart b/pkg/compiler/lib/src/ir/scope_visitor.dart
index 2e7061a..ede0784 100644
--- a/pkg/compiler/lib/src/ir/scope_visitor.dart
+++ b/pkg/compiler/lib/src/ir/scope_visitor.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:kernel/ast.dart' as ir;
+import 'package:front_end/src/api_prototype/constant_evaluator.dart' as ir;
 
 import 'closure.dart';
 import 'scope.dart';
@@ -11,8 +12,11 @@
 /// assigned/captured/free at various points to build a [ClosureScopeModel] and
 /// a [VariableScopeModel] that can respond to queries about how a particular
 /// variable is being used at any point in the code.
-class ScopeModelBuilder extends ir.Visitor<void> with VariableCollectorMixin {
-  ClosureScopeModel _model;
+class ScopeModelBuilder extends ir.Visitor<InitializerComplexity>
+    with VariableCollectorMixin {
+  final ir.ConstantEvaluator _constantEvaluator;
+
+  final ClosureScopeModel _model = new ClosureScopeModel();
 
   /// A map of each visited call node with the associated information about what
   /// variables are captured/used. Each ir.Node key corresponds to a scope that
@@ -60,7 +64,7 @@
   /// The current scope we are in.
   KernelScopeInfo _currentScopeInfo;
 
-  final bool _hasThisLocal;
+  bool _hasThisLocal;
 
   /// Keeps track of the number of boxes that we've created so that they each
   /// have unique names.
@@ -73,21 +77,57 @@
   /// type variable usage, such as type argument in method invocations.
   VariableUse _currentTypeUsage;
 
-  ScopeModelBuilder(this._model, {bool hasThisLocal})
-      : this._hasThisLocal = hasThisLocal;
+  ScopeModelBuilder(this._constantEvaluator);
+
+  ScopeModel computeModel(ir.Member node) {
+    if (node.isAbstract && !node.isExternal) {
+      return const ScopeModel(
+          initializerComplexity: const InitializerComplexity.lazy());
+    }
+
+    if (node is ir.Constructor) {
+      _hasThisLocal = true;
+    } else if (node is ir.Procedure && node.kind == ir.ProcedureKind.Factory) {
+      _hasThisLocal = false;
+    } else if (node.isInstanceMember) {
+      _hasThisLocal = true;
+    } else {
+      _hasThisLocal = false;
+    }
+
+    InitializerComplexity initializerComplexity =
+        const InitializerComplexity.lazy();
+    if (node is ir.Field) {
+      if (node.initializer != null) {
+        initializerComplexity = node.accept(this);
+      } else {
+        initializerComplexity = const InitializerComplexity.constant();
+        _model.scopeInfo = new KernelScopeInfo(_hasThisLocal);
+      }
+    } else {
+      assert(node is ir.Procedure || node is ir.Constructor);
+      node.accept(this);
+    }
+    return new ScopeModel(
+        closureScopeModel: _model,
+        variableScopeModel: variableScopeModel,
+        initializerComplexity: initializerComplexity);
+  }
 
   @override
-  ir.DartType defaultNode(ir.Node node) =>
+  InitializerComplexity defaultNode(ir.Node node) =>
       throw UnsupportedError('Unhandled node $node (${node.runtimeType})');
 
-  void visitNode(ir.Node node) {
+  InitializerComplexity visitNode(ir.Node node) {
     return node?.accept(this);
   }
 
-  void visitNodes(List<ir.Node> nodes) {
+  InitializerComplexity visitNodes(List<ir.Node> nodes) {
+    InitializerComplexity complexity = const InitializerComplexity.constant();
     for (ir.Node node in nodes) {
-      visitNode(node);
+      complexity = complexity.combine(visitNode(node));
     }
+    return complexity;
   }
 
   /// Update the [CapturedScope] object corresponding to
@@ -167,12 +207,12 @@
   }
 
   @override
-  void visitNamedExpression(ir.NamedExpression node) {
-    visitNode(node.value);
+  InitializerComplexity visitNamedExpression(ir.NamedExpression node) {
+    return visitNode(node.value);
   }
 
   @override
-  void visitTryCatch(ir.TryCatch node) {
+  InitializerComplexity visitTryCatch(ir.TryCatch node) {
     bool oldInTry = _inTry;
     _inTry = true;
     visitInVariableScope(node, () {
@@ -180,10 +220,11 @@
     });
     visitNodes(node.catches);
     _inTry = oldInTry;
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitTryFinally(ir.TryFinally node) {
+  InitializerComplexity visitTryFinally(ir.TryFinally node) {
     bool oldInTry = _inTry;
     _inTry = true;
     visitInVariableScope(node, () {
@@ -191,21 +232,24 @@
     });
     visitNode(node.finalizer);
     _inTry = oldInTry;
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitVariableGet(ir.VariableGet node) {
+  InitializerComplexity visitVariableGet(ir.VariableGet node) {
     _markVariableAsUsed(node.variable, VariableUse.explicit);
     // Don't visit `node.promotedType`.
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitVariableSet(ir.VariableSet node) {
+  InitializerComplexity visitVariableSet(ir.VariableSet node) {
     _mutatedVariables.add(node.variable);
     _markVariableAsUsed(node.variable, VariableUse.explicit);
     visitInContext(node.variable.type, VariableUse.localType);
     visitNode(node.value);
     registerAssignedVariable(node.variable);
+    return const InitializerComplexity.lazy();
   }
 
   void _handleVariableDeclaration(
@@ -219,8 +263,9 @@
   }
 
   @override
-  void visitVariableDeclaration(ir.VariableDeclaration node) {
+  InitializerComplexity visitVariableDeclaration(ir.VariableDeclaration node) {
     _handleVariableDeclaration(node, VariableUse.localType);
+    return const InitializerComplexity.lazy();
   }
 
   /// Add this variable to the set of free variables if appropriate and add to
@@ -255,12 +300,15 @@
   }
 
   @override
-  void visitThisExpression(ir.ThisExpression thisExpression) {
-    if (_hasThisLocal) _registerNeedsThis(VariableUse.explicit);
+  InitializerComplexity visitThisExpression(ir.ThisExpression thisExpression) {
+    if (_hasThisLocal) {
+      _registerNeedsThis(VariableUse.explicit);
+    }
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitTypeParameter(ir.TypeParameter typeParameter) {
+  InitializerComplexity visitTypeParameter(ir.TypeParameter typeParameter) {
     ir.TreeNode context = _executableContext;
     TypeVariableTypeWithContext typeVariable = new TypeVariableTypeWithContext(
         new ir.TypeParameterType(typeParameter),
@@ -288,6 +336,7 @@
         _useTypeVariableAsLocal(typeVariable, _currentTypeUsage);
       }
     }
+    return const InitializerComplexity.constant();
   }
 
   /// Add `this` as a variable that needs to be accessed (and thus may become a
@@ -306,7 +355,7 @@
   }
 
   @override
-  void visitForInStatement(ir.ForInStatement node) {
+  InitializerComplexity visitForInStatement(ir.ForInStatement node) {
     // We need to set `inTry` to true if this is an async for-in because we
     // desugar it into a try-finally in the SSA phase.
     bool oldInTry = _inTry;
@@ -323,28 +372,33 @@
     if (node.isAsync) {
       _inTry = oldInTry;
     }
-  }
-
-  void visitWhileStatement(ir.WhileStatement node) {
-    enterNewScope(node, () {
-      visitInVariableScope(node, () {
-        visitNode(node.condition);
-        visitNode(node.body);
-      });
-    });
-  }
-
-  void visitDoStatement(ir.DoStatement node) {
-    enterNewScope(node, () {
-      visitInVariableScope(node, () {
-        visitNode(node.body);
-        visitNode(node.condition);
-      });
-    });
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitForStatement(ir.ForStatement node) {
+  InitializerComplexity visitWhileStatement(ir.WhileStatement node) {
+    enterNewScope(node, () {
+      visitInVariableScope(node, () {
+        visitNode(node.condition);
+        visitNode(node.body);
+      });
+    });
+    return const InitializerComplexity.lazy();
+  }
+
+  @override
+  InitializerComplexity visitDoStatement(ir.DoStatement node) {
+    enterNewScope(node, () {
+      visitInVariableScope(node, () {
+        visitNode(node.body);
+        visitNode(node.condition);
+      });
+    });
+    return const InitializerComplexity.lazy();
+  }
+
+  @override
+  InitializerComplexity visitForStatement(ir.ForStatement node) {
     List<ir.VariableDeclaration> boxedLoopVariables =
         <ir.VariableDeclaration>[];
     enterNewScope(node, () {
@@ -382,20 +436,24 @@
       }
     });
     KernelCapturedScope scope = _scopesCapturedInClosureMap[node];
-    if (scope == null) return;
-    _scopesCapturedInClosureMap[node] = new KernelCapturedLoopScope(
-        scope.boxedVariables,
-        scope.capturedVariablesAccessor,
-        boxedLoopVariables,
-        scope.localsUsedInTryOrSync,
-        scope.freeVariables,
-        scope.freeVariablesForRti,
-        scope.thisUsedAsFreeVariable,
-        scope.thisUsedAsFreeVariableIfNeedsRti,
-        scope.hasThisLocal);
+    if (scope != null) {
+      _scopesCapturedInClosureMap[node] = new KernelCapturedLoopScope(
+          scope.boxedVariables,
+          scope.capturedVariablesAccessor,
+          boxedLoopVariables,
+          scope.localsUsedInTryOrSync,
+          scope.freeVariables,
+          scope.freeVariablesForRti,
+          scope.thisUsedAsFreeVariable,
+          scope.thisUsedAsFreeVariableIfNeedsRti,
+          scope.hasThisLocal);
+    }
+    return const InitializerComplexity.lazy();
   }
 
-  void visitSuperMethodInvocation(ir.SuperMethodInvocation node) {
+  @override
+  InitializerComplexity visitSuperMethodInvocation(
+      ir.SuperMethodInvocation node) {
     if (_hasThisLocal) {
       _registerNeedsThis(VariableUse.explicit);
     }
@@ -405,19 +463,24 @@
     }
     visitNodes(node.arguments.positional);
     visitNodes(node.arguments.named);
+    return const InitializerComplexity.lazy();
   }
 
-  void visitSuperPropertySet(ir.SuperPropertySet node) {
+  @override
+  InitializerComplexity visitSuperPropertySet(ir.SuperPropertySet node) {
     if (_hasThisLocal) {
       _registerNeedsThis(VariableUse.explicit);
     }
     visitNode(node.value);
+    return const InitializerComplexity.lazy();
   }
 
-  void visitSuperPropertyGet(ir.SuperPropertyGet node) {
+  @override
+  InitializerComplexity visitSuperPropertyGet(ir.SuperPropertyGet node) {
     if (_hasThisLocal) {
       _registerNeedsThis(VariableUse.explicit);
     }
+    return const InitializerComplexity.lazy();
   }
 
   void visitInvokable(ir.TreeNode node, void f()) {
@@ -492,132 +555,155 @@
   }
 
   @override
-  void visitField(ir.Field node) {
+  InitializerComplexity visitField(ir.Field node) {
     _currentTypeUsage = VariableUse.fieldType;
+    InitializerComplexity complexity;
     visitInvokable(node, () {
-      visitNode(node.initializer);
+      complexity = visitNode(node.initializer);
     });
     _currentTypeUsage = null;
+    return complexity;
   }
 
   @override
-  void visitConstructor(ir.Constructor node) {
+  InitializerComplexity visitConstructor(ir.Constructor node) {
     visitInvokable(node, () {
       visitNodes(node.initializers);
       visitNode(node.function);
     });
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitProcedure(ir.Procedure node) {
+  InitializerComplexity visitProcedure(ir.Procedure node) {
     visitInvokable(node, () {
       visitNode(node.function);
     });
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitFunctionExpression(ir.FunctionExpression node) {
+  InitializerComplexity visitFunctionExpression(ir.FunctionExpression node) {
     visitInvokable(node, () {
       visitInVariableScope(node, () {
         visitNode(node.function);
       });
     });
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitFunctionDeclaration(ir.FunctionDeclaration node) {
+  InitializerComplexity visitFunctionDeclaration(ir.FunctionDeclaration node) {
     visitInvokable(node, () {
       visitInVariableScope(node, () {
         visitNode(node.function);
       });
     });
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitDynamicType(ir.DynamicType node) {}
+  InitializerComplexity visitDynamicType(ir.DynamicType node) =>
+      const InitializerComplexity.constant();
 
   @override
-  void visitBottomType(ir.BottomType node) {}
+  InitializerComplexity visitBottomType(ir.BottomType node) =>
+      const InitializerComplexity.lazy();
 
   @override
-  void visitInvalidType(ir.InvalidType node) {}
+  InitializerComplexity visitInvalidType(ir.InvalidType node) =>
+      const InitializerComplexity.lazy();
 
   @override
-  void visitVoidType(ir.VoidType node) {}
+  InitializerComplexity visitVoidType(ir.VoidType node) =>
+      const InitializerComplexity.constant();
 
   @override
-  void visitInterfaceType(ir.InterfaceType node) {
-    visitNodes(node.typeArguments);
+  InitializerComplexity visitInterfaceType(ir.InterfaceType node) {
+    return visitNodes(node.typeArguments);
   }
 
   @override
-  void visitFunctionType(ir.FunctionType node) {
-    visitNode(node.returnType);
-    visitNodes(node.positionalParameters);
-    visitNodes(node.namedParameters);
-    visitNodes(node.typeParameters);
+  InitializerComplexity visitFunctionType(ir.FunctionType node) {
+    InitializerComplexity complexity = visitNode(node.returnType);
+    complexity = complexity.combine(visitNodes(node.positionalParameters));
+    complexity = complexity.combine(visitNodes(node.namedParameters));
+    return complexity.combine(visitNodes(node.typeParameters));
   }
 
   @override
-  void visitNamedType(ir.NamedType node) {
-    visitNode(node.type);
+  InitializerComplexity visitNamedType(ir.NamedType node) {
+    return visitNode(node.type);
   }
 
   @override
-  void visitTypeParameterType(ir.TypeParameterType node) {
+  InitializerComplexity visitTypeParameterType(ir.TypeParameterType node) {
     _analyzeTypeVariable(node, _currentTypeUsage);
+    return const InitializerComplexity.lazy();
   }
 
-  void visitInContext(ir.Node node, VariableUse use) {
+  InitializerComplexity visitInContext(ir.Node node, VariableUse use) {
     VariableUse oldCurrentTypeUsage = _currentTypeUsage;
     _currentTypeUsage = use;
-    visitNode(node);
+    InitializerComplexity complexity = visitNode(node);
     _currentTypeUsage = oldCurrentTypeUsage;
+    return complexity;
   }
 
-  void visitNodesInContext(List<ir.Node> nodes, VariableUse use) {
+  InitializerComplexity visitNodesInContext(
+      List<ir.Node> nodes, VariableUse use) {
     VariableUse oldCurrentTypeUsage = _currentTypeUsage;
     _currentTypeUsage = use;
-    visitNodes(nodes);
+    InitializerComplexity complexity = visitNodes(nodes);
     _currentTypeUsage = oldCurrentTypeUsage;
+    return complexity;
   }
 
   @override
-  void visitTypeLiteral(ir.TypeLiteral node) {
-    visitInContext(node.type, VariableUse.explicit);
+  InitializerComplexity visitTypeLiteral(ir.TypeLiteral node) {
+    return visitInContext(node.type, VariableUse.explicit);
   }
 
   @override
-  void visitIsExpression(ir.IsExpression node) {
+  InitializerComplexity visitIsExpression(ir.IsExpression node) {
     visitNode(node.operand);
     visitInContext(node.type, VariableUse.explicit);
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitAsExpression(ir.AsExpression node) {
+  InitializerComplexity visitAsExpression(ir.AsExpression node) {
     visitNode(node.operand);
     visitInContext(node.type,
         node.isTypeError ? VariableUse.implicitCast : VariableUse.explicit);
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitAwaitExpression(ir.AwaitExpression node) {
+  InitializerComplexity visitAwaitExpression(ir.AwaitExpression node) {
     visitNode(node.operand);
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitYieldStatement(ir.YieldStatement node) {
+  InitializerComplexity visitYieldStatement(ir.YieldStatement node) {
     visitNode(node.expression);
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitLoadLibrary(ir.LoadLibrary node) {}
+  InitializerComplexity visitLoadLibrary(ir.LoadLibrary node) {
+    return const InitializerComplexity.lazy();
+  }
 
   @override
-  void visitCheckLibraryIsLoaded(ir.CheckLibraryIsLoaded node) {}
+  InitializerComplexity visitCheckLibraryIsLoaded(
+      ir.CheckLibraryIsLoaded node) {
+    return const InitializerComplexity.lazy();
+  }
 
   @override
-  void visitFunctionNode(ir.FunctionNode node) {
+  InitializerComplexity visitFunctionNode(ir.FunctionNode node) {
     VariableUse parameterUsage = node.parent is ir.Member
         ? new VariableUse.memberParameter(node.parent)
         : new VariableUse.localParameter(node.parent);
@@ -634,59 +720,105 @@
             ? new VariableUse.memberReturnType(node.parent)
             : new VariableUse.localReturnType(node.parent));
     visitNode(node.body);
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitListLiteral(ir.ListLiteral node) {
-    visitInContext(node.typeArgument, VariableUse.listLiteral);
+  InitializerComplexity visitListLiteral(ir.ListLiteral node) {
+    InitializerComplexity complexity =
+        visitInContext(node.typeArgument, VariableUse.listLiteral);
+    complexity = complexity.combine(visitNodes(node.expressions));
+    if (node.isConst) {
+      return const InitializerComplexity.constant();
+    } else {
+      return complexity.makeEager();
+    }
+  }
+
+  @override
+  InitializerComplexity visitSetLiteral(ir.SetLiteral node) {
+    InitializerComplexity complexity =
+        visitInContext(node.typeArgument, VariableUse.setLiteral);
+    complexity = complexity.combine(visitNodes(node.expressions));
+    if (node.isConst) {
+      return const InitializerComplexity.constant();
+    } else {
+      return complexity.makeEager();
+    }
+  }
+
+  @override
+  InitializerComplexity visitMapLiteral(ir.MapLiteral node) {
+    InitializerComplexity complexity =
+        visitInContext(node.keyType, VariableUse.mapLiteral);
+    complexity = complexity
+        .combine(visitInContext(node.valueType, VariableUse.mapLiteral));
+    complexity = complexity.combine(visitNodes(node.entries));
+    if (node.isConst) {
+      return const InitializerComplexity.constant();
+    } else {
+      return complexity.makeEager();
+    }
+  }
+
+  @override
+  InitializerComplexity visitMapEntry(ir.MapEntry node) {
+    InitializerComplexity complexity = visitNode(node.key);
+    return complexity.combine(visitNode(node.value));
+  }
+
+  @override
+  InitializerComplexity visitNullLiteral(ir.NullLiteral node) =>
+      const InitializerComplexity.constant();
+
+  @override
+  InitializerComplexity visitStringLiteral(ir.StringLiteral node) =>
+      const InitializerComplexity.constant();
+
+  @override
+  InitializerComplexity visitIntLiteral(ir.IntLiteral node) =>
+      const InitializerComplexity.constant();
+
+  @override
+  InitializerComplexity visitDoubleLiteral(ir.DoubleLiteral node) =>
+      const InitializerComplexity.constant();
+
+  @override
+  InitializerComplexity visitSymbolLiteral(ir.SymbolLiteral node) =>
+      const InitializerComplexity.constant();
+
+  @override
+  InitializerComplexity visitBoolLiteral(ir.BoolLiteral node) =>
+      const InitializerComplexity.constant();
+
+  @override
+  InitializerComplexity visitStringConcatenation(ir.StringConcatenation node) {
     visitNodes(node.expressions);
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitMapLiteral(ir.MapLiteral node) {
-    visitInContext(node.keyType, VariableUse.mapLiteral);
-    visitInContext(node.valueType, VariableUse.mapLiteral);
-    visitNodes(node.entries);
+  InitializerComplexity visitStaticGet(ir.StaticGet node) {
+    ir.Member target = node.target;
+    if (target is ir.Field) {
+      return target.isConst
+          ? const InitializerComplexity.constant()
+          : new InitializerComplexity.eager(fields: <ir.Field>{target});
+    } else if (target is ir.Procedure &&
+        target.kind == ir.ProcedureKind.Method) {
+      return const InitializerComplexity.constant();
+    }
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitMapEntry(ir.MapEntry node) {
-    visitNode(node.key);
+  InitializerComplexity visitStaticSet(ir.StaticSet node) {
     visitNode(node.value);
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitNullLiteral(ir.NullLiteral node) {}
-
-  @override
-  void visitStringLiteral(ir.StringLiteral node) {}
-  @override
-  void visitIntLiteral(ir.IntLiteral node) {}
-
-  @override
-  void visitDoubleLiteral(ir.DoubleLiteral node) {}
-
-  @override
-  void visitSymbolLiteral(ir.SymbolLiteral node) {}
-
-  @override
-  void visitBoolLiteral(ir.BoolLiteral node) {}
-
-  @override
-  void visitStringConcatenation(ir.StringConcatenation node) {
-    visitNodes(node.expressions);
-  }
-
-  @override
-  void visitStaticGet(ir.StaticGet node) {}
-
-  @override
-  void visitStaticSet(ir.StaticSet node) {
-    visitNode(node.value);
-  }
-
-  @override
-  void visitStaticInvocation(ir.StaticInvocation node) {
+  InitializerComplexity visitStaticInvocation(ir.StaticInvocation node) {
     if (node.arguments.types.isNotEmpty) {
       VariableUse usage;
       if (node.target.kind == ir.ProcedureKind.Factory) {
@@ -699,28 +831,36 @@
     }
     visitNodes(node.arguments.positional);
     visitNodes(node.arguments.named);
+    return node.isConst
+        ? const InitializerComplexity.constant()
+        : const InitializerComplexity.lazy();
   }
 
   @override
-  void visitConstructorInvocation(ir.ConstructorInvocation node) {
+  InitializerComplexity visitConstructorInvocation(
+      ir.ConstructorInvocation node) {
     if (node.arguments.types.isNotEmpty) {
       visitNodesInContext(node.arguments.types,
           new VariableUse.constructorTypeArgument(node.target));
     }
     visitNodes(node.arguments.positional);
     visitNodes(node.arguments.named);
+    return node.isConst
+        ? const InitializerComplexity.constant()
+        : const InitializerComplexity.lazy();
   }
 
   @override
-  void visitConditionalExpression(ir.ConditionalExpression node) {
-    visitNode(node.condition);
-    visitNode(node.then);
-    visitNode(node.otherwise);
+  InitializerComplexity visitConditionalExpression(
+      ir.ConditionalExpression node) {
+    InitializerComplexity complexity = visitNode(node.condition);
+    complexity = complexity.combine(visitNode(node.then));
+    return complexity.combine(visitNode(node.otherwise));
     // Don't visit `node.staticType`.
   }
 
   @override
-  void visitMethodInvocation(ir.MethodInvocation node) {
+  InitializerComplexity visitMethodInvocation(ir.MethodInvocation node) {
     ir.TreeNode receiver = node.receiver;
     visitNode(receiver);
     if (node.arguments.types.isNotEmpty) {
@@ -737,164 +877,209 @@
     }
     visitNodes(node.arguments.positional);
     visitNodes(node.arguments.named);
+    // TODO(johnniwinther): Recognize constant operations.
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitPropertyGet(ir.PropertyGet node) {
+  InitializerComplexity visitPropertyGet(ir.PropertyGet node) {
     visitNode(node.receiver);
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitPropertySet(ir.PropertySet node) {
+  InitializerComplexity visitPropertySet(ir.PropertySet node) {
     visitNode(node.receiver);
     visitNode(node.value);
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitDirectPropertyGet(ir.DirectPropertyGet node) {
+  InitializerComplexity visitDirectPropertyGet(ir.DirectPropertyGet node) {
     visitNode(node.receiver);
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitDirectPropertySet(ir.DirectPropertySet node) {
+  InitializerComplexity visitDirectPropertySet(ir.DirectPropertySet node) {
     visitNode(node.receiver);
     visitNode(node.value);
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitNot(ir.Not node) {
-    visitNode(node.operand);
+  InitializerComplexity visitNot(ir.Not node) {
+    return visitNode(node.operand);
   }
 
   @override
-  void visitLogicalExpression(ir.LogicalExpression node) {
-    visitNode(node.left);
-    visitNode(node.right);
+  InitializerComplexity visitLogicalExpression(ir.LogicalExpression node) {
+    InitializerComplexity complexity = visitNode(node.left);
+    return complexity.combine(visitNode(node.right));
   }
 
   @override
-  void visitLet(ir.Let node) {
+  InitializerComplexity visitLet(ir.Let node) {
     visitNode(node.variable);
     visitNode(node.body);
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitCatch(ir.Catch node) {
+  InitializerComplexity visitBlockExpression(ir.BlockExpression node) {
+    visitNode(node.body);
+    visitNode(node.value);
+    return const InitializerComplexity.lazy();
+  }
+
+  @override
+  InitializerComplexity visitCatch(ir.Catch node) {
     visitInContext(node.guard, VariableUse.explicit);
     visitNode(node.exception);
     visitNode(node.stackTrace);
     visitInVariableScope(node, () {
       visitNode(node.body);
     });
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitInstantiation(ir.Instantiation node) {
-    visitNodesInContext(
+  InitializerComplexity visitInstantiation(ir.Instantiation node) {
+    InitializerComplexity complexity = visitNodesInContext(
         node.typeArguments, new VariableUse.instantiationTypeArgument(node));
-    visitNode(node.expression);
+    return complexity.combine(visitNode(node.expression));
   }
 
   @override
-  void visitThrow(ir.Throw node) {
+  InitializerComplexity visitThrow(ir.Throw node) {
     visitNode(node.expression);
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitRethrow(ir.Rethrow node) {}
+  InitializerComplexity visitRethrow(ir.Rethrow node) =>
+      const InitializerComplexity.lazy();
 
   @override
-  void visitBlock(ir.Block node) {
+  InitializerComplexity visitBlock(ir.Block node) {
     visitNodes(node.statements);
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitAssertStatement(ir.AssertStatement node) {
+  InitializerComplexity visitAssertStatement(ir.AssertStatement node) {
     visitInVariableScope(node, () {
       visitNode(node.condition);
       visitNode(node.message);
     });
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitReturnStatement(ir.ReturnStatement node) {
+  InitializerComplexity visitReturnStatement(ir.ReturnStatement node) {
     visitNode(node.expression);
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitEmptyStatement(ir.EmptyStatement node) {}
+  InitializerComplexity visitEmptyStatement(ir.EmptyStatement node) {
+    return const InitializerComplexity.lazy();
+  }
 
   @override
-  void visitExpressionStatement(ir.ExpressionStatement node) {
+  InitializerComplexity visitExpressionStatement(ir.ExpressionStatement node) {
     visitNode(node.expression);
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitSwitchStatement(ir.SwitchStatement node) {
+  InitializerComplexity visitSwitchStatement(ir.SwitchStatement node) {
     visitNode(node.expression);
     visitInVariableScope(node, () {
       visitNodes(node.cases);
     });
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitSwitchCase(ir.SwitchCase node) {
+  InitializerComplexity visitSwitchCase(ir.SwitchCase node) {
     visitNode(node.body);
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitContinueSwitchStatement(ir.ContinueSwitchStatement node) {
+  InitializerComplexity visitContinueSwitchStatement(
+      ir.ContinueSwitchStatement node) {
     registerContinueSwitch();
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitBreakStatement(ir.BreakStatement node) {}
+  InitializerComplexity visitBreakStatement(ir.BreakStatement node) {
+    return const InitializerComplexity.lazy();
+  }
 
   @override
-  void visitLabeledStatement(ir.LabeledStatement node) {
+  InitializerComplexity visitLabeledStatement(ir.LabeledStatement node) {
     visitNode(node.body);
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitFieldInitializer(ir.FieldInitializer node) {
+  InitializerComplexity visitFieldInitializer(ir.FieldInitializer node) {
     visitNode(node.value);
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitLocalInitializer(ir.LocalInitializer node) {
+  InitializerComplexity visitLocalInitializer(ir.LocalInitializer node) {
     visitNode(node.variable.initializer);
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitSuperInitializer(ir.SuperInitializer node) {
+  InitializerComplexity visitSuperInitializer(ir.SuperInitializer node) {
     if (node.arguments.types.isNotEmpty) {
       visitNodesInContext(node.arguments.types,
           new VariableUse.constructorTypeArgument(node.target));
     }
     visitNodes(node.arguments.positional);
     visitNodes(node.arguments.named);
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitRedirectingInitializer(ir.RedirectingInitializer node) {
+  InitializerComplexity visitRedirectingInitializer(
+      ir.RedirectingInitializer node) {
     if (node.arguments.types.isNotEmpty) {
       visitNodesInContext(node.arguments.types,
           new VariableUse.constructorTypeArgument(node.target));
     }
     visitNodes(node.arguments.positional);
     visitNodes(node.arguments.named);
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitAssertInitializer(ir.AssertInitializer node) {
+  InitializerComplexity visitAssertInitializer(ir.AssertInitializer node) {
     visitNode(node.statement);
+    return const InitializerComplexity.lazy();
   }
 
   @override
-  void visitIfStatement(ir.IfStatement node) {
+  InitializerComplexity visitIfStatement(ir.IfStatement node) {
     visitNode(node.condition);
     visitNode(node.then);
     visitNode(node.otherwise);
+    return const InitializerComplexity.lazy();
+  }
+
+  @override
+  InitializerComplexity visitConstantExpression(ir.ConstantExpression node) {
+    if (node.constant is ir.UnevaluatedConstant) {
+      node.constant = _constantEvaluator.evaluate(node);
+    }
+    return const InitializerComplexity.constant();
   }
 
   /// Returns true if the node is a field, or a constructor (factory or
@@ -940,3 +1125,99 @@
     _markVariableAsUsed(typeVariable, usage);
   }
 }
+
+enum ComplexityLevel {
+  constant,
+  potentiallyEager,
+  definitelyLazy,
+}
+
+class InitializerComplexity {
+  final ComplexityLevel level;
+  final Set<ir.Field> fields;
+
+  // TODO(johnniwinther): This should hold the constant literal from CFE when
+  // provided.
+  const InitializerComplexity.constant()
+      : level = ComplexityLevel.constant,
+        fields = null;
+
+  // TODO(johnniwinther): Use this to collect data on the size of the
+  //  initializer.
+  InitializerComplexity.eager({this.fields})
+      : level = ComplexityLevel.potentiallyEager;
+
+  const InitializerComplexity.lazy()
+      : level = ComplexityLevel.definitelyLazy,
+        fields = null;
+
+  InitializerComplexity combine(InitializerComplexity other) {
+    if (identical(this, other)) {
+      return this;
+    } else if (isLazy || other.isLazy) {
+      return const InitializerComplexity.lazy();
+    } else if (isEager || other.isEager) {
+      if (fields != null && other.fields != null) {
+        fields.addAll(other.fields);
+        return this;
+      } else if (fields != null) {
+        return this;
+      } else {
+        return other;
+      }
+    } else if (isConstant && other.isConstant) {
+      // TODO(johnniwinther): This is case doesn't work if InitializerComplexity
+      // objects of constant complexity hold the constant literal.
+      return this;
+    } else if (isEager) {
+      assert(other.isConstant);
+      return this;
+    } else {
+      assert(isConstant);
+      assert(other.isEager);
+      return other;
+    }
+  }
+
+  InitializerComplexity makeEager() {
+    if (isLazy || isEager) {
+      return this;
+    } else {
+      return new InitializerComplexity.eager();
+    }
+  }
+
+  bool get isConstant => level == ComplexityLevel.constant;
+
+  bool get isEager => level == ComplexityLevel.potentiallyEager;
+
+  bool get isLazy => level == ComplexityLevel.definitelyLazy;
+
+  /// Returns a short textual representation used for testing.
+  String get shortText {
+    StringBuffer sb = new StringBuffer();
+    switch (level) {
+      case ComplexityLevel.constant:
+        sb.write('constant');
+        break;
+      case ComplexityLevel.potentiallyEager:
+        sb.write('eager');
+        if (fields != null) {
+          sb.write('&fields=[');
+          List<String> names = fields.map((f) => f.name.name).toList()..sort();
+          sb.write(names.join(','));
+          sb.write(']');
+        }
+        break;
+      case ComplexityLevel.definitelyLazy:
+        sb.write('lazy');
+        break;
+      default:
+        throw new UnsupportedError("Unexpected complexity level $level");
+    }
+    return sb.toString();
+  }
+
+  @override
+  String toString() => 'InitializerComplexity($shortText)';
+}
diff --git a/pkg/compiler/lib/src/ir/static_type.dart b/pkg/compiler/lib/src/ir/static_type.dart
index 8ec8bad..7aee79e 100644
--- a/pkg/compiler/lib/src/ir/static_type.dart
+++ b/pkg/compiler/lib/src/ir/static_type.dart
@@ -58,6 +58,7 @@
 
   VariableScopeModel get variableScopeModel;
 
+  @override
   ThisInterfaceType get thisType {
     assert(_thisType != null);
     return _thisType;
@@ -163,6 +164,9 @@
     while (type is ir.TypeParameterType) {
       type = (type as ir.TypeParameterType).parameter.bound;
     }
+    if (type == typeEnvironment.nullType) {
+      return superclass.bottomType;
+    }
     if (type is ir.InterfaceType) {
       ir.InterfaceType upcastType =
           typeEnvironment.getTypeAsInstanceOf(type, superclass);
@@ -170,6 +174,7 @@
     } else if (type is ir.BottomType) {
       return superclass.bottomType;
     }
+    // TODO(johnniwinther): Should we assert that this doesn't happen?
     return superclass.rawType;
   }
 
@@ -249,11 +254,35 @@
   ir.DartType visitPropertySet(ir.PropertySet node) {
     ir.DartType receiverType = visitNode(node.receiver);
     ir.DartType valueType = super.visitPropertySet(node);
-    if (node.interfaceTarget == null && receiverType is ir.InterfaceType) {
-      node.interfaceTarget = hierarchy
+    ir.Member interfaceTarget = node.interfaceTarget;
+    if (interfaceTarget == null && receiverType is ir.InterfaceType) {
+      interfaceTarget = hierarchy
           .getInterfaceMember(receiverType.classNode, node.name, setter: true);
+      if (interfaceTarget != null) {
+        ir.Class superclass = interfaceTarget.enclosingClass;
+        ir.Substitution receiverSubstitution =
+            ir.Substitution.fromInterfaceType(
+                getTypeAsInstanceOf(receiverType, superclass));
+        ir.DartType setterType =
+            receiverSubstitution.substituteType(interfaceTarget.setterType);
+        if (!typeEnvironment.isSubtypeOf(valueType, setterType)) {
+          // We need to insert an implicit cast to preserve the invariant that
+          // a property set with a known interface target is also statically
+          // checked.
+          ir.AsExpression implicitCast =
+              new ir.AsExpression(node.value, setterType)
+                ..isTypeError = true
+                ..parent = node;
+          node.value = implicitCast;
+          // Visit the newly created as expression; the original value has
+          // already been visited.
+          handleAsExpression(implicitCast, valueType);
+          valueType = setterType;
+        }
+        node.interfaceTarget = interfaceTarget;
+      }
     }
-    receiverType = _narrowInstanceReceiver(node.interfaceTarget, receiverType);
+    receiverType = _narrowInstanceReceiver(interfaceTarget, receiverType);
     handlePropertySet(node, receiverType, valueType);
     return valueType;
   }
@@ -415,6 +444,106 @@
     return false;
   }
 
+  /// Update the interface target on [node].
+  ///
+  /// This inserts any implicit cast of the arguments necessary to uphold the
+  /// invariant that a method invocation with an interface target handles
+  /// the static types at the call site.
+  void _updateMethodInvocationTarget(
+      ir.MethodInvocation node,
+      ArgumentTypes argumentTypes,
+      ir.DartType functionType,
+      ir.Member interfaceTarget) {
+    // TODO(johnniwinther): Handle incremental target improvement.
+    if (node.interfaceTarget != null) return;
+    node.interfaceTarget = interfaceTarget;
+    if (functionType is! ir.FunctionType) return;
+    ir.FunctionType parameterTypes = functionType;
+    Map<int, ir.DartType> neededPositionalChecks = {};
+    for (int i = 0; i < node.arguments.positional.length; i++) {
+      ir.DartType argumentType = argumentTypes.positional[i];
+      ir.DartType parameterType = parameterTypes.positionalParameters[i];
+      if (!typeEnvironment.isSubtypeOf(argumentType, parameterType)) {
+        neededPositionalChecks[i] = parameterType;
+      }
+    }
+    Map<int, ir.DartType> neededNamedChecks = {};
+    for (int argumentIndex = 0;
+        argumentIndex < node.arguments.named.length;
+        argumentIndex++) {
+      ir.NamedExpression namedArgument = node.arguments.named[argumentIndex];
+      ir.DartType argumentType = argumentTypes.named[argumentIndex];
+      ir.DartType parameterType = parameterTypes.namedParameters
+          .singleWhere((namedType) => namedType.name == namedArgument.name)
+          .type;
+      if (!typeEnvironment.isSubtypeOf(argumentType, parameterType)) {
+        neededNamedChecks[argumentIndex] = parameterType;
+      }
+    }
+    if (neededPositionalChecks.isEmpty && neededNamedChecks.isEmpty) {
+      // No implicit casts needed
+      return;
+    }
+
+    List<ir.VariableDeclaration> letVariables = [];
+
+    // Arguments need to be hoisted to an enclosing let expression in order
+    // to ensure that the arguments are evaluated before any implicit cast.
+
+    ir.Expression updateArgument(ir.Expression expression, ir.TreeNode parent,
+        ir.DartType argumentType, ir.DartType checkedParameterType) {
+      ir.VariableDeclaration variable =
+          new ir.VariableDeclaration.forValue(expression, type: argumentType);
+      // Visit the newly created variable declaration.
+      handleVariableDeclaration(variable);
+      letVariables.add(variable);
+      ir.VariableGet get = new ir.VariableGet(variable)..parent = parent;
+      // Visit the newly created variable get.
+      handleVariableGet(get, argumentType);
+      cachedStaticTypes[get] = argumentType;
+
+      if (checkedParameterType == null) {
+        return get;
+      }
+      // We need to insert an implicit cast to preserve the invariant that
+      // a method invocation with a known interface target is also
+      // statically checked.
+      ir.AsExpression implicitCast =
+          new ir.AsExpression(get, checkedParameterType)
+            ..isTypeError = true
+            ..parent = parent;
+      // Visit the newly created as expression; the original value has
+      // already been visited.
+      handleAsExpression(implicitCast, argumentType);
+      return implicitCast;
+    }
+
+    for (int index = 0; index < node.arguments.positional.length; index++) {
+      ir.DartType argumentType = argumentTypes.positional[index];
+      node.arguments.positional[index] = updateArgument(
+          node.arguments.positional[index],
+          node.arguments,
+          argumentType,
+          neededPositionalChecks[index]);
+    }
+    for (int argumentIndex = 0;
+        argumentIndex < node.arguments.named.length;
+        argumentIndex++) {
+      ir.NamedExpression namedArgument = node.arguments.named[argumentIndex];
+      ir.DartType argumentType = argumentTypes.named[argumentIndex];
+      namedArgument.value = updateArgument(namedArgument.value, namedArgument,
+          argumentType, neededNamedChecks[argumentIndex]);
+    }
+
+    ir.Expression dummy = new ir.NullLiteral();
+    node.replaceWith(dummy);
+    ir.Expression body = node;
+    for (ir.VariableDeclaration variable in letVariables.reversed) {
+      body = new ir.Let(variable, body);
+    }
+    dummy.replaceWith(body);
+  }
+
   /// Computes the result type of the method invocation [node] on a receiver of
   /// type [receiverType].
   ///
@@ -436,20 +565,17 @@
       ir.Member member =
           hierarchy.getInterfaceMember(receiverType.classNode, node.name);
       if (_isApplicable(node.arguments, member)) {
-        interfaceTarget = node.interfaceTarget = member;
+        interfaceTarget = member;
       }
     }
     if (interfaceTarget != null) {
-      if (isSpecialCasedBinaryOperator(interfaceTarget)) {
-        ir.DartType argumentType = argumentTypes.positional[0];
-        return typeEnvironment.getTypeOfOverloadedArithmetic(
-            receiverType, argumentType);
-      }
       ir.Class superclass = interfaceTarget.enclosingClass;
-      receiverType = getTypeAsInstanceOf(receiverType, superclass);
-      ir.DartType getterType = ir.Substitution.fromInterfaceType(receiverType)
-          .substituteType(interfaceTarget.getterType);
+      ir.Substitution receiverSubstitution = ir.Substitution.fromInterfaceType(
+          getTypeAsInstanceOf(receiverType, superclass));
+      ir.DartType getterType =
+          receiverSubstitution.substituteType(interfaceTarget.getterType);
       if (getterType is ir.FunctionType) {
+        ir.FunctionType functionType = getterType;
         List<ir.DartType> typeArguments = node.arguments.types;
         if (interfaceTarget is ir.Procedure &&
             interfaceTarget.function.typeParameters.isNotEmpty &&
@@ -457,15 +583,22 @@
           // If this was a dynamic call the invocation does not have the
           // inferred default type arguments so we need to create them here
           // to perform a valid substitution.
-          ir.Substitution substitution =
-              ir.Substitution.fromInterfaceType(receiverType);
           typeArguments = interfaceTarget.function.typeParameters
-              .map((t) => substitution.substituteType(t.defaultType))
+              .map((t) => receiverSubstitution.substituteType(t.defaultType))
               .toList();
         }
-        return ir.Substitution.fromPairs(
-                getterType.typeParameters, typeArguments)
-            .substituteType(getterType.returnType);
+        getterType = ir.Substitution.fromPairs(
+                functionType.typeParameters, typeArguments)
+            .substituteType(functionType.withoutTypeParameters);
+      }
+      _updateMethodInvocationTarget(
+          node, argumentTypes, getterType, interfaceTarget);
+      if (isSpecialCasedBinaryOperator(interfaceTarget)) {
+        ir.DartType argumentType = argumentTypes.positional[0];
+        return typeEnvironment.getTypeOfOverloadedArithmetic(
+            receiverType, argumentType);
+      } else if (getterType is ir.FunctionType) {
+        return getterType.returnType;
       } else {
         return const ir.DynamicType();
       }
@@ -790,6 +923,12 @@
     return super.visitLet(node);
   }
 
+  @override
+  ir.DartType visitBlockExpression(ir.BlockExpression node) {
+    visitNode(node.body);
+    return super.visitBlockExpression(node);
+  }
+
   ir.DartType _computeInstantiationType(
       ir.Instantiation node, ir.FunctionType expressionType) {
     return ir.Substitution.fromPairs(
@@ -823,6 +962,7 @@
     return type;
   }
 
+  @override
   ir.DartType visitExpressionStatement(ir.ExpressionStatement node) {
     visitNode(node.expression);
     return null;
@@ -1227,6 +1367,14 @@
     }
     handleVariableDeclaration(node);
   }
+
+  void handleConstantExpression(ir.ConstantExpression node) {}
+
+  @override
+  ir.DartType visitConstantExpression(ir.ConstantExpression node) {
+    handleConstantExpression(node);
+    return super.visitConstantExpression(node);
+  }
 }
 
 class ArgumentTypes {
@@ -1291,6 +1439,7 @@
     return candidate;
   }
 
+  @override
   int get hashCode {
     if (_hashCode == null) {
       _hashCode = Hashing.setHash(falseTypes,
@@ -1299,6 +1448,7 @@
     return _hashCode;
   }
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     return other is TypeHolder &&
@@ -1324,6 +1474,7 @@
     sb.write('}');
   }
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write('TypeHolder(');
@@ -1561,6 +1712,7 @@
     sb.write(']');
   }
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write('TargetInfo(');
@@ -1705,6 +1857,7 @@
     return sb.toString();
   }
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write('TypeMap(');
diff --git a/pkg/compiler/lib/src/ir/static_type_base.dart b/pkg/compiler/lib/src/ir/static_type_base.dart
index 5cd8001..2da7c24 100644
--- a/pkg/compiler/lib/src/ir/static_type_base.dart
+++ b/pkg/compiler/lib/src/ir/static_type_base.dart
@@ -14,6 +14,7 @@
 class DoesNotCompleteType extends ir.BottomType {
   const DoesNotCompleteType();
 
+  @override
   String toString() => 'DoesNotCompleteType()';
 }
 
@@ -27,6 +28,7 @@
       ? new ThisInterfaceType(type.classNode, type.typeArguments)
       : null;
 
+  @override
   String toString() => 'this:${super.toString()}';
 }
 
@@ -40,6 +42,7 @@
       ? new ExactInterfaceType(type.classNode, type.typeArguments)
       : null;
 
+  @override
   String toString() => 'exact:${super.toString()}';
 }
 
@@ -79,6 +82,7 @@
     }
   }
 
+  @override
   ir.DartType defaultExpression(ir.Expression node) {
     throw fail('Unhandled node $node (${node.runtimeType})');
   }
@@ -208,6 +212,11 @@
   }
 
   @override
+  ir.DartType visitBlockExpression(ir.BlockExpression node) {
+    return visitNode(node.value);
+  }
+
+  @override
   ir.DartType visitInvalidExpression(ir.InvalidExpression node) =>
       const DoesNotCompleteType();
 
@@ -215,4 +224,10 @@
   ir.DartType visitLoadLibrary(ir.LoadLibrary node) {
     return typeEnvironment.futureType(const ir.DynamicType());
   }
+
+  @override
+  ir.DartType visitConstantExpression(ir.ConstantExpression node) {
+    // TODO(johnniwinther): Include interface exactness where applicable.
+    return node.getStaticType(typeEnvironment);
+  }
 }
diff --git a/pkg/compiler/lib/src/ir/types.dart b/pkg/compiler/lib/src/ir/types.dart
index 6d0f40d..ec95dff 100644
--- a/pkg/compiler/lib/src/ir/types.dart
+++ b/pkg/compiler/lib/src/ir/types.dart
@@ -99,18 +99,22 @@
 
   KernelOrderedTypeSetBuilder(this.elementMap, ClassEntity cls) : super(cls);
 
+  @override
   InterfaceType getThisType(ClassEntity cls) {
     return elementMap.getThisType(cls);
   }
 
+  @override
   InterfaceType substByContext(InterfaceType type, InterfaceType context) {
     return elementMap.substByContext(type, context);
   }
 
+  @override
   int getHierarchyDepth(ClassEntity cls) {
     return elementMap.getHierarchyDepth(cls);
   }
 
+  @override
   OrderedTypeSet getOrderedTypeSet(ClassEntity cls) {
     return elementMap.getOrderedTypeSet(cls);
   }
@@ -141,6 +145,7 @@
 
 class KernelSubtypeVisitor extends SubtypeVisitor<DartType>
     with AbstractTypeRelationMixin {
+  @override
   final IrToElementMap elementMap;
 
   KernelSubtypeVisitor(this.elementMap);
@@ -148,6 +153,7 @@
 
 class _KernelPotentialSubtypeVisitor extends PotentialSubtypeVisitor<DartType>
     with AbstractTypeRelationMixin {
+  @override
   final IrToElementMap elementMap;
 
   _KernelPotentialSubtypeVisitor(this.elementMap);
diff --git a/pkg/compiler/lib/src/ir/util.dart b/pkg/compiler/lib/src/ir/util.dart
index 0a749db..9850a1a 100644
--- a/pkg/compiler/lib/src/ir/util.dart
+++ b/pkg/compiler/lib/src/ir/util.dart
@@ -91,6 +91,7 @@
 
   ir.Let get let => syntheticVariable.parent;
 
+  @override
   String toString() => let.toString();
 }
 
@@ -133,7 +134,7 @@
   // instead of:
   //
   //   (let _ = check(prefix) in prefix::field).property
-  if (node is ir.StaticGet) {
+  if (node is ir.StaticGet || node is ir.ConstantExpression) {
     while (parent is ir.PropertyGet || parent is ir.MethodInvocation) {
       parent = parent.parent;
     }
diff --git a/pkg/compiler/lib/src/ir/visitors.dart b/pkg/compiler/lib/src/ir/visitors.dart
index 549ad34..b5b5e64 100644
--- a/pkg/compiler/lib/src/ir/visitors.dart
+++ b/pkg/compiler/lib/src/ir/visitors.dart
@@ -9,8 +9,10 @@
 import 'package:kernel/type_environment.dart' as ir;
 
 import '../common.dart';
+import '../constants/constant_system.dart' as constant_system;
 import '../constants/constructors.dart';
 import '../constants/expressions.dart';
+import '../constants/values.dart';
 import '../common_elements.dart';
 import '../elements/entities.dart';
 import '../elements/operators.dart';
@@ -61,6 +63,7 @@
     return constant;
   }
 
+  @override
   ConstantExpression defaultExpression(ir.Expression node) {
     if (requireConstant) {
       failNode ??= node;
@@ -211,6 +214,22 @@
   }
 
   @override
+  ConstantExpression visitSetLiteral(ir.SetLiteral node) {
+    if (!node.isConst) {
+      return defaultExpression(node);
+    }
+    DartType elementType = elementMap.getDartType(node.typeArgument);
+    List<ConstantExpression> values = <ConstantExpression>[];
+    for (ir.Expression expression in node.expressions) {
+      ConstantExpression value = visit(expression);
+      if (value == null) return null;
+      values.add(value);
+    }
+    return new SetConstantExpression(
+        _commonElements.setType(elementType), values);
+  }
+
+  @override
   ConstantExpression visitListLiteral(ir.ListLiteral node) {
     if (!node.isConst) {
       return defaultExpression(node);
@@ -415,6 +434,11 @@
     return defaultExpression(node);
   }
 
+  @override
+  ConstantExpression visitBlockExpression(ir.BlockExpression node) {
+    return defaultExpression(node);
+  }
+
   /// Compute the [ConstantConstructor] corresponding to the const constructor
   /// [node].
   ConstantConstructor computeConstantConstructor(ir.Constructor node) {
@@ -634,3 +658,123 @@
     return elementMap.commonElements.nullType;
   }
 }
+
+class ConstantValuefier implements ir.ConstantVisitor<ConstantValue> {
+  final IrToElementMap elementMap;
+
+  ConstantValuefier(this.elementMap);
+
+  @override
+  ConstantValue defaultConstant(ir.Constant node) {
+    throw new UnsupportedError(
+        "Unexpected constant $node (${node.runtimeType}).");
+  }
+
+  @override
+  ConstantValue visitUnevaluatedConstant(ir.UnevaluatedConstant node) {
+    throw new UnsupportedError("Unexpected unevaluated constant $node.");
+  }
+
+  @override
+  ConstantValue visitTypeLiteralConstant(ir.TypeLiteralConstant node) {
+    return constant_system.createType(
+        elementMap.commonElements, elementMap.getDartType(node.type));
+  }
+
+  @override
+  ConstantValue visitTearOffConstant(ir.TearOffConstant node) {
+    FunctionEntity function = elementMap.getMethod(node.procedure);
+    DartType type = elementMap.getFunctionType(node.procedure.function);
+    return new FunctionConstantValue(function, type);
+  }
+
+  @override
+  ConstantValue visitPartialInstantiationConstant(
+      ir.PartialInstantiationConstant node) {
+    List<DartType> typeArguments = [];
+    for (ir.DartType type in node.types) {
+      typeArguments.add(elementMap.getDartType(type));
+    }
+    FunctionConstantValue function = node.tearOffConstant.accept(this);
+    return new InstantiationConstantValue(typeArguments, function);
+  }
+
+  @override
+  ConstantValue visitInstanceConstant(ir.InstanceConstant node) {
+    InterfaceType type =
+        elementMap.createInterfaceType(node.classNode, node.typeArguments);
+    Map<FieldEntity, ConstantValue> fields = {};
+    node.fieldValues.forEach((ir.Reference reference, ir.Constant value) {
+      FieldEntity field = elementMap.getField(reference.asField);
+      fields[field] = value.accept(this);
+    });
+    return new ConstructedConstantValue(type, fields);
+  }
+
+  @override
+  ConstantValue visitListConstant(ir.ListConstant node) {
+    List<ConstantValue> elements = [];
+    for (ir.Constant element in node.entries) {
+      elements.add(element.accept(this));
+    }
+    DartType type = elementMap.commonElements
+        .listType(elementMap.getDartType(node.typeArgument));
+    return constant_system.createList(type, elements);
+  }
+
+  @override
+  ConstantValue visitSetConstant(ir.SetConstant node) {
+    List<ConstantValue> elements = [];
+    for (ir.Constant element in node.entries) {
+      elements.add(element.accept(this));
+    }
+    DartType type = elementMap.commonElements
+        .setType(elementMap.getDartType(node.typeArgument));
+    return constant_system.createSet(elementMap.commonElements, type, elements);
+  }
+
+  @override
+  ConstantValue visitMapConstant(ir.MapConstant node) {
+    List<ConstantValue> keys = [];
+    List<ConstantValue> values = [];
+    for (ir.ConstantMapEntry element in node.entries) {
+      keys.add(element.key.accept(this));
+      values.add(element.value.accept(this));
+    }
+    DartType type = elementMap.commonElements.mapType(
+        elementMap.getDartType(node.keyType),
+        elementMap.getDartType(node.valueType));
+    return constant_system.createMap(
+        elementMap.commonElements, type, keys, values);
+  }
+
+  @override
+  ConstantValue visitSymbolConstant(ir.SymbolConstant node) {
+    return constant_system.createSymbol(elementMap.commonElements, node.name);
+  }
+
+  @override
+  ConstantValue visitStringConstant(ir.StringConstant node) {
+    return constant_system.createString(node.value);
+  }
+
+  @override
+  ConstantValue visitDoubleConstant(ir.DoubleConstant node) {
+    return constant_system.createDouble(node.value);
+  }
+
+  @override
+  ConstantValue visitIntConstant(ir.IntConstant node) {
+    return constant_system.createIntFromInt(node.value);
+  }
+
+  @override
+  ConstantValue visitBoolConstant(ir.BoolConstant node) {
+    return constant_system.createBool(node.value);
+  }
+
+  @override
+  ConstantValue visitNullConstant(ir.NullConstant node) {
+    return constant_system.createNull();
+  }
+}
diff --git a/pkg/compiler/lib/src/js/js.dart b/pkg/compiler/lib/src/js/js.dart
index 523cd66..c62d6f3 100644
--- a/pkg/compiler/lib/src/js/js.dart
+++ b/pkg/compiler/lib/src/js/js.dart
@@ -134,6 +134,7 @@
   final bool _protectForEval;
   LiteralString _cachedLiteral;
 
+  @override
   Iterable<Node> get containedNodes => [tree];
 
   /// A [js.Literal] that represents the string result of unparsing [ast].
diff --git a/pkg/compiler/lib/src/js/js_debug.dart b/pkg/compiler/lib/src/js/js_debug.dart
index d191491..9eaca9f 100644
--- a/pkg/compiler/lib/src/js/js_debug.dart
+++ b/pkg/compiler/lib/src/js/js_debug.dart
@@ -24,6 +24,7 @@
 /// Visitor that creates an XML-like representation of the structure of a
 /// JavaScript [Node].
 class DebugPrinter extends BaseVisitor with Indentation, Tagging<Node> {
+  @override
   StringBuffer sb = new StringBuffer();
 
   void visitNodeWithChildren(Node node, String type, [Map params]) {
diff --git a/pkg/compiler/lib/src/js/js_source_mapping.dart b/pkg/compiler/lib/src/js/js_source_mapping.dart
index 13735ca..ff8a155 100644
--- a/pkg/compiler/lib/src/js/js_source_mapping.dart
+++ b/pkg/compiler/lib/src/js/js_source_mapping.dart
@@ -63,6 +63,7 @@
 
   SourceMapperProviderImpl(this.provider);
 
+  @override
   SourceMapper createSourceMapper(String name) {
     return new SourceLocationsMapper(provider.createSourceLocations(name));
   }
diff --git a/pkg/compiler/lib/src/js/placeholder_safety.dart b/pkg/compiler/lib/src/js/placeholder_safety.dart
index 48b71cc..72d1e8d 100644
--- a/pkg/compiler/lib/src/js/placeholder_safety.dart
+++ b/pkg/compiler/lib/src/js/placeholder_safety.dart
@@ -60,16 +60,19 @@
     return node.accept(this);
   }
 
+  @override
   int visitNode(js.Node node) {
     safe = false;
     super.visitNode(node);
     return UNKNOWN_VALUE;
   }
 
+  @override
   int visitLiteralNull(js.LiteralNull node) {
     return UNKNOWN_VALUE;
   }
 
+  @override
   int visitLiteral(js.Literal node) {
     return NONNULL_VALUE;
   }
@@ -81,26 +84,32 @@
     return position;
   }
 
+  @override
   int visitInterpolatedExpression(js.InterpolatedExpression node) {
     return handleInterpolatedNode(node);
   }
 
+  @override
   int visitInterpolatedLiteral(js.InterpolatedLiteral node) {
     return handleInterpolatedNode(node);
   }
 
+  @override
   int visitInterpolatedSelector(js.InterpolatedSelector node) {
     return handleInterpolatedNode(node);
   }
 
+  @override
   int visitInterpolatedStatement(js.InterpolatedStatement node) {
     return handleInterpolatedNode(node);
   }
 
+  @override
   int visitInterpolatedDeclaration(js.InterpolatedDeclaration node) {
     return handleInterpolatedNode(node);
   }
 
+  @override
   int visitObjectInitializer(js.ObjectInitializer node) {
     for (js.Property property in node.properties) {
       visit(property);
@@ -108,21 +117,25 @@
     return NONNULL_VALUE;
   }
 
+  @override
   int visitProperty(js.Property node) {
     visit(node.name);
     visit(node.value);
     return UNKNOWN_VALUE;
   }
 
+  @override
   int visitArrayInitializer(js.ArrayInitializer node) {
     node.elements.forEach(visit);
     return NONNULL_VALUE;
   }
 
+  @override
   int visitArrayHole(js.ArrayHole node) {
     return UNKNOWN_VALUE;
   }
 
+  @override
   int visitAccess(js.PropertyAccess node) {
     int first = visit(node.receiver);
     visit(node.selector);
@@ -131,6 +144,7 @@
     return UNKNOWN_VALUE;
   }
 
+  @override
   int visitAssignment(js.Assignment node) {
     js.Expression left = node.leftHandSide;
     js.Expression right = node.value;
@@ -172,6 +186,7 @@
     return leftToRight();
   }
 
+  @override
   int visitCall(js.Call node) {
     // TODO(sra): Recognize JavaScript built-ins like
     // 'Object.prototype.hasOwnProperty.call'.
@@ -180,12 +195,14 @@
     return unsafe(UNKNOWN_VALUE);
   }
 
+  @override
   int visitNew(js.New node) {
     visit(node.target);
     node.arguments.forEach(visit);
     return unsafe(NONNULL_VALUE);
   }
 
+  @override
   int visitBinary(js.Binary node) {
     switch (node.op) {
       // We make the non-conservative assumption that these operations are not
@@ -238,6 +255,7 @@
     }
   }
 
+  @override
   int visitConditional(js.Conditional node) {
     visit(node.condition);
     // TODO(sra): Might be safe, e.g.  "# ? 1 : 2".
@@ -247,11 +265,13 @@
     return UNKNOWN_VALUE;
   }
 
+  @override
   int visitThrow(js.Throw node) {
     visit(node.expression);
     return unsafe(UNKNOWN_VALUE);
   }
 
+  @override
   int visitPrefix(js.Prefix node) {
     if (node.op == 'typeof') {
       // "typeof a" first evaluates to a Reference. If the Reference is to a
@@ -287,12 +307,14 @@
     }
   }
 
+  @override
   int visitPostfix(js.Postfix node) {
     assert(node.op == '--' || node.op == '++');
     visit(node.argument);
     return NONNULL_VALUE; // Always a number, even for "(a=null, a++)".
   }
 
+  @override
   int visitVariableUse(js.VariableUse node) {
     // We could get a ReferenceError unless the variable is in scope.  For JS
     // fragments, the only use of VariableUse outside a `function(){...}` should
@@ -315,6 +337,7 @@
     }
   }
 
+  @override
   int visitFun(js.Fun node) {
     bool oldSafe = safe;
     int oldNextPosition = nextPosition;
diff --git a/pkg/compiler/lib/src/js/rewrite_async.dart b/pkg/compiler/lib/src/js/rewrite_async.dart
index 68fffe8..b3768c4 100644
--- a/pkg/compiler/lib/src/js/rewrite_async.dart
+++ b/pkg/compiler/lib/src/js/rewrite_async.dart
@@ -1510,6 +1510,7 @@
   }
 
   /// See the comments of [rewriteFunction] for more explanation.
+  @override
   void visitTry(js.Try node) {
     if (!shouldTransform(node)) {
       js.Block body = translateToBlock(node.body);
@@ -1721,6 +1722,7 @@
 }
 
 class AsyncRewriter extends AsyncRewriterBase {
+  @override
   bool get isAsync => true;
 
   /// The Completer that will finish an async function.
@@ -1787,6 +1789,7 @@
     reporter.internalError(spannable, "Yield in non-generating async function");
   }
 
+  @override
   void addErrorExit(SourceInformation sourceInformation) {
     if (!hasHandlerLabels) return; // rethrow handled in method boilerplate.
     beginLabel(rethrowLabel);
@@ -1803,6 +1806,7 @@
   /// Returning from an async method calls [asyncStarHelper] with the result.
   /// (the result might have been stored in [returnValue] by some finally
   /// block).
+  @override
   void addSuccessExit(SourceInformation sourceInformation) {
     if (analysis.hasExplicitReturns) {
       beginLabel(exitLabel);
@@ -1929,6 +1933,7 @@
 }
 
 class SyncStarRewriter extends AsyncRewriterBase {
+  @override
   bool get isSyncStar => true;
 
   /// Constructor creating the Iterable for a sync* method. Called with
@@ -2068,6 +2073,7 @@
     }).withSourceInformation(functionSourceInformation);
   }
 
+  @override
   void addErrorExit(SourceInformation sourceInformation) {
     hasHandlerLabels = true; // TODO(sra): Add short form error handler.
     beginLabel(rethrowLabel);
@@ -2080,6 +2086,7 @@
   }
 
   /// Returning from a sync* function returns an [endOfIteration] marker.
+  @override
   void addSuccessExit(SourceInformation sourceInformation) {
     if (analysis.hasExplicitReturns) {
       beginLabel(exitLabel);
@@ -2114,6 +2121,7 @@
 }
 
 class AsyncStarRewriter extends AsyncRewriterBase {
+  @override
   bool get isAsyncStar => true;
 
   /// The stack of labels of finally blocks to assign to [next] if the
diff --git a/pkg/compiler/lib/src/js_backend/allocator_analysis.dart b/pkg/compiler/lib/src/js_backend/allocator_analysis.dart
deleted file mode 100644
index 123f627..0000000
--- a/pkg/compiler/lib/src/js_backend/allocator_analysis.dart
+++ /dev/null
@@ -1,157 +0,0 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:kernel/ast.dart' as ir;
-
-import '../constants/values.dart';
-import '../js_model/elements.dart' show JField;
-import '../js_model/js_world_builder.dart';
-import '../kernel/element_map.dart';
-import '../kernel/kernel_strategy.dart';
-import '../kernel/kelements.dart' show KClass, KField;
-import '../options.dart';
-import '../serialization/serialization.dart';
-
-abstract class AllocatorAnalysis {}
-
-/// AllocatorAnalysis
-///
-/// Analysis to determine features of the allocator functions. The allocator
-/// function takes parameters for each field initializer and initializes the
-/// fields.  Parameters may be omitted if the initializer is always the same
-/// constant value.  How the allocator is emitted will determine what kind of
-/// constants can be handled.  The initial implementation only permits `null`.
-
-// TODO(sra): Analysis to determine field order. Current field order is
-// essentially declaration order, subclass first. We can reorder fields so that
-// fields initialized with the same constant are together to allow chained
-// initialization. Fields of a class and superclass can be reordered to allow
-// chaining, e.g.
-//
-//     this.x = this.z = null;
-//
-class KAllocatorAnalysis implements AllocatorAnalysis {
-  final KernelToElementMap _elementMap;
-
-  final Map<KField, ConstantValue> _fixedInitializers = {};
-
-  KAllocatorAnalysis(KernelFrontEndStrategy kernelStrategy)
-      : _elementMap = kernelStrategy.elementMap;
-
-  // Register class during resolution. Use simple syntactic analysis to find
-  // null-initialized fields.
-  void registerInstantiatedClass(KClass class_) {
-    ir.Class classNode = _elementMap.getClassNode(class_);
-
-    Map<ir.Field, ConstantValue> inits = {};
-    for (ir.Field field in classNode.fields) {
-      if (!field.isInstanceMember) continue;
-      ir.Expression initializer = field.initializer;
-      // TODO(sra): Should really be using constant evaluator to determine
-      // value.
-      if (initializer == null || initializer is ir.NullLiteral) {
-        inits[field] = const NullConstantValue();
-      } else if (initializer is ir.IntLiteral) {
-        BigInt intValue = BigInt.from(initializer.value).toUnsigned(64);
-        inits[field] = IntConstantValue(intValue);
-      } else if (initializer is ir.BoolLiteral) {
-        inits[field] = BoolConstantValue(initializer.value);
-      } else if (initializer is ir.StringLiteral) {
-        if (initializer.value.length <= 20) {
-          inits[field] = StringConstantValue(initializer.value);
-        }
-      }
-    }
-
-    for (ir.Constructor constructor in classNode.constructors) {
-      for (ir.Initializer initializer in constructor.initializers) {
-        if (initializer is ir.FieldInitializer) {
-          // TODO(sra): Check explicit initializer value to see if consistent
-          // over all constructors.
-          inits.remove(initializer.field);
-        }
-      }
-    }
-
-    inits.forEach((ir.Field fieldNode, ConstantValue value) {
-      _fixedInitializers[_elementMap.getField(fieldNode)] = value;
-    });
-  }
-
-  ConstantValue getFixedInitializerForTesting(KField field) =>
-      _fixedInitializers[field];
-}
-
-class JAllocatorAnalysis implements AllocatorAnalysis {
-  /// Tag used for identifying serialized [JAllocatorAnalysis] objects in a
-  /// debugging data stream.
-  static const String tag = 'allocator-analysis';
-
-  // --csp and --fast-startup have different constraints to the generated code.
-  final Map<JField, ConstantValue> _fixedInitializers = {};
-
-  JAllocatorAnalysis._();
-
-  /// Deserializes a [JAllocatorAnalysis] object from [source].
-  factory JAllocatorAnalysis.readFromDataSource(
-      DataSource source, CompilerOptions options) {
-    source.begin(tag);
-    JAllocatorAnalysis analysis = new JAllocatorAnalysis._();
-    int fieldCount = source.readInt();
-    for (int i = 0; i < fieldCount; i++) {
-      JField field = source.readMember();
-      ConstantValue value = source.readConstant();
-      analysis._fixedInitializers[field] = value;
-    }
-    source.end(tag);
-    return analysis;
-  }
-
-  /// Serializes this [JAllocatorAnalysis] to [sink].
-  void writeToDataSink(DataSink sink) {
-    sink.begin(tag);
-    sink.writeInt(_fixedInitializers.length);
-    _fixedInitializers.forEach((JField field, ConstantValue value) {
-      sink.writeMember(field);
-      sink.writeConstant(value);
-    });
-    sink.end(tag);
-  }
-
-  static JAllocatorAnalysis from(KAllocatorAnalysis kAnalysis,
-      JsToFrontendMap map, CompilerOptions options) {
-    var result = JAllocatorAnalysis._();
-
-    kAnalysis._fixedInitializers.forEach((KField kField, ConstantValue value) {
-      // TODO(sra): Translate constant, but Null and these primitives do not
-      // need translating.
-      if (value.isNull || value.isInt || value.isBool || value.isString) {
-        JField jField = map.toBackendMember(kField);
-        if (jField != null) {
-          result._fixedInitializers[jField] = value;
-        }
-      }
-    });
-
-    return result;
-  }
-
-  bool get _isEnabled {
-    return true;
-  }
-  // TODO(sra): Add way to let injected fields be initialized to a constant in
-  // allocator.
-
-  bool isInitializedInAllocator(JField field) {
-    if (!_isEnabled) return false;
-    return _fixedInitializers[field] != null;
-  }
-
-  /// Return constant for a field initialized in allocator. Returns `null` for
-  /// fields not initialized in allocator.
-  ConstantValue initializerValue(JField field) {
-    assert(_isEnabled);
-    return _fixedInitializers[field];
-  }
-}
diff --git a/pkg/compiler/lib/src/js_backend/annotations.dart b/pkg/compiler/lib/src/js_backend/annotations.dart
index 5290143..1464c0b 100644
--- a/pkg/compiler/lib/src/js_backend/annotations.dart
+++ b/pkg/compiler/lib/src/js_backend/annotations.dart
@@ -4,37 +4,21 @@
 
 library js_backend.backend.annotations;
 
+import 'package:kernel/ast.dart' as ir;
+
+import '../common.dart';
 import '../common_elements.dart' show KCommonElements, KElementEnvironment;
 import '../constants/values.dart';
 import '../diagnostics/diagnostic_listener.dart';
 import '../diagnostics/messages.dart';
 import '../elements/entities.dart';
+import '../ir/annotations.dart';
+import '../ir/util.dart';
 import '../kernel/dart2js_target.dart';
+import '../options.dart';
 import '../serialization/serialization.dart';
 import '../util/enumset.dart';
 
-/// Returns `true` if inference of parameter types is disabled for [element].
-bool _assumeDynamic(KElementEnvironment elementEnvironment,
-    KCommonElements commonElements, MemberEntity element) {
-  return _hasAnnotation(
-      elementEnvironment, element, commonElements.expectAssumeDynamicClass);
-}
-
-/// Returns `true` if [element] is annotated with [annotationClass].
-bool _hasAnnotation(KElementEnvironment elementEnvironment,
-    MemberEntity element, ClassEntity annotationClass) {
-  if (annotationClass == null) return false;
-  for (ConstantValue value in elementEnvironment.getMemberMetadata(element)) {
-    if (value.isConstructedObject) {
-      ConstructedConstantValue constructedConstant = value;
-      if (constructedConstant.type.element == annotationClass) {
-        return true;
-      }
-    }
-  }
-  return false;
-}
-
 class PragmaAnnotation {
   final int _index;
   final String name;
@@ -52,9 +36,12 @@
     return _index;
   }
 
+  /// Tells the optimizing compiler to not inline the annotated method.
   static const PragmaAnnotation noInline =
       const PragmaAnnotation(0, 'noInline', forFunctionsOnly: true);
 
+  /// Tells the optimizing compiler to always inline the annotated method, if
+  /// possible.
   static const PragmaAnnotation tryInline =
       const PragmaAnnotation(1, 'tryInline', forFunctionsOnly: true);
 
@@ -62,24 +49,29 @@
       2, 'disableFinal',
       forFunctionsOnly: true, internalOnly: true);
 
-  static const PragmaAnnotation noElision = const PragmaAnnotation(
-      3, 'noElision',
-      forFieldsOnly: true, internalOnly: true);
+  static const PragmaAnnotation noElision =
+      const PragmaAnnotation(3, 'noElision');
 
+  /// Tells the optimizing compiler that the annotated method cannot throw.
+  /// Requires @pragma('dart2js:noInline') to function correctly.
   static const PragmaAnnotation noThrows = const PragmaAnnotation(4, 'noThrows',
       forFunctionsOnly: true, internalOnly: true);
 
+  /// Tells the optimizing compiler that the annotated method has no
+  /// side-effects. Allocations don't count as side-effects, since they can be
+  /// dropped without changing the semantics of the program.
+  ///
+  /// Requires @pragma('dart2js:noInline') to function correctly.
   static const PragmaAnnotation noSideEffects = const PragmaAnnotation(
       5, 'noSideEffects',
       forFunctionsOnly: true, internalOnly: true);
 
-  // TODO(johnniwinther): Remove this.
-  static const PragmaAnnotation trustTypeAnnotations = const PragmaAnnotation(
-      6, 'trustTypeAnnotations',
-      forFunctionsOnly: true, internalOnly: true);
-
+  /// Use this as metadata on method declarations to disable closed world
+  /// assumptions on parameters, effectively assuming that the runtime arguments
+  /// could be any value. Note that the constraints due to static types still
+  /// apply.
   static const PragmaAnnotation assumeDynamic = const PragmaAnnotation(
-      7, 'assumeDynamic',
+      6, 'assumeDynamic',
       forFunctionsOnly: true, internalOnly: true);
 
   static const List<PragmaAnnotation> values = [
@@ -89,27 +81,15 @@
     noElision,
     noThrows,
     noSideEffects,
-    trustTypeAnnotations,
     assumeDynamic,
   ];
 }
 
-Set<PragmaAnnotation> processMemberAnnotations(
-    DiagnosticReporter reporter,
+List<PragmaAnnotationData> computePragmaAnnotationData(
     KCommonElements commonElements,
     KElementEnvironment elementEnvironment,
-    AnnotationsDataBuilder annotationsDataBuilder,
     MemberEntity element) {
-  EnumSet<PragmaAnnotation> values = new EnumSet<PragmaAnnotation>();
-
-  if (_assumeDynamic(elementEnvironment, commonElements, element)) {
-    values.add(PragmaAnnotation.assumeDynamic);
-  }
-
-  LibraryEntity library = element.library;
-  bool platformAnnotationsAllowed = library.canonicalUri.scheme == 'dart' ||
-      maybeEnableNative(library.canonicalUri);
-
+  List<PragmaAnnotationData> annotations = [];
   for (ConstantValue constantValue
       in elementEnvironment.getMemberMetadata(element)) {
     if (!constantValue.isConstructedObject) continue;
@@ -117,73 +97,11 @@
     ClassEntity cls = value.type.element;
     assert(cls != null); // Unresolved classes null.
 
-    if (platformAnnotationsAllowed) {
-      if (cls == commonElements.forceInlineClass) {
-        values.add(PragmaAnnotation.tryInline);
-        if (element is! FunctionEntity) {
-          reporter.internalError(element,
-              "@TryInline() is only allowed in methods and constructors.");
-        }
-      } else if (cls == commonElements.noInlineClass) {
-        values.add(PragmaAnnotation.noInline);
-        if (element is! FunctionEntity) {
-          reporter.internalError(element,
-              "@NoInline() is only allowed in methods and constructors.");
-        }
-      } else if (cls == commonElements.noThrowsClass) {
-        values.add(PragmaAnnotation.noThrows);
-        bool isValid = true;
-        if (element is FunctionEntity) {
-          if (element.isTopLevel) {
-            isValid = true;
-          } else if (element.isStatic) {
-            isValid = true;
-          } else if (element is ConstructorEntity &&
-              element.isFactoryConstructor) {
-            isValid = true;
-          }
-        } else {
-          isValid = false;
-        }
-        if (!isValid) {
-          reporter.internalError(
-              element,
-              "@NoThrows() is currently limited to top-level"
-              " or static functions and factory constructors.");
-        }
-      } else if (cls == commonElements.noSideEffectsClass) {
-        values.add(PragmaAnnotation.noSideEffects);
-        if (element is! FunctionEntity) {
-          reporter.internalError(element,
-              "@NoSideEffects() is only allowed in methods and constructors.");
-        }
-      }
-    }
-
-    if (cls == commonElements.expectNoInlineClass) {
-      values.add(PragmaAnnotation.noInline);
-      if (element is! FunctionEntity) {
-        reporter.internalError(element,
-            "@NoInline() is only allowed in methods and constructors.");
-      }
-    } else if (cls == commonElements.metaNoInlineClass) {
-      values.add(PragmaAnnotation.noInline);
-      if (element is! FunctionEntity) {
-        reporter.internalError(
-            element, "@noInline is only allowed in methods and constructors.");
-      }
+    if (cls == commonElements.metaNoInlineClass) {
+      annotations.add(const PragmaAnnotationData('noInline'));
     } else if (cls == commonElements.metaTryInlineClass) {
-      values.add(PragmaAnnotation.tryInline);
-      if (element is! FunctionEntity) {
-        reporter.internalError(
-            element, "@tryInline is only allowed in methods and constructors.");
-      }
+      annotations.add(const PragmaAnnotationData('tryInline'));
     } else if (cls == commonElements.pragmaClass) {
-      // Recognize:
-      //
-      //     @pragma('dart2js:noInline')
-      //     @pragma('dart2js:tryInline')
-      //
       ConstantValue nameValue =
           value.fields[commonElements.pragmaClassNameField];
       if (nameValue == null || !nameValue.isString) continue;
@@ -194,65 +112,98 @@
 
       ConstantValue optionsValue =
           value.fields[commonElements.pragmaClassOptionsField];
-      bool found = false;
-      for (PragmaAnnotation annotation in PragmaAnnotation.values) {
-        if (annotation.name == suffix) {
-          found = true;
-          values.add(annotation);
+      annotations.add(
+          new PragmaAnnotationData(suffix, hasOptions: !optionsValue.isNull));
+    }
+  }
+  return annotations;
+}
 
-          if (!optionsValue.isNull) {
-            reporter.reportErrorMessage(element, MessageKind.GENERIC,
-                {'text': "@pragma('$name') annotation does not take options"});
-          }
-          if (annotation.forFunctionsOnly) {
-            if (element is! FunctionEntity) {
-              reporter.reportErrorMessage(element, MessageKind.GENERIC, {
-                'text': "@pragma('$name') annotation is only supported "
-                    "for methods and constructors."
-              });
-            }
-          }
-          if (annotation.forFieldsOnly) {
-            if (element is! FieldEntity) {
-              reporter.reportErrorMessage(element, MessageKind.GENERIC, {
-                'text': "@pragma('$name') annotation is only supported "
-                    "for fields."
-              });
-            }
-          }
-          if (annotation.internalOnly && !platformAnnotationsAllowed) {
-            reporter.reportErrorMessage(element, MessageKind.GENERIC,
-                {'text': "Unrecognized dart2js pragma @pragma('$name')"});
-          }
-          break;
+EnumSet<PragmaAnnotation> processMemberAnnotations(
+    CompilerOptions options,
+    DiagnosticReporter reporter,
+    ir.Member member,
+    List<PragmaAnnotationData> pragmaAnnotationData) {
+  EnumSet<PragmaAnnotation> values = new EnumSet<PragmaAnnotation>();
+
+  Uri uri = member.enclosingLibrary.importUri;
+  bool platformAnnotationsAllowed =
+      options.testMode || uri.scheme == 'dart' || maybeEnableNative(uri);
+
+  for (PragmaAnnotationData data in pragmaAnnotationData) {
+    String name = data.name;
+    String suffix = data.suffix;
+    bool found = false;
+    for (PragmaAnnotation annotation in PragmaAnnotation.values) {
+      if (annotation.name == suffix) {
+        found = true;
+        values.add(annotation);
+
+        if (data.hasOptions) {
+          reporter.reportErrorMessage(
+              computeSourceSpanFromTreeNode(member),
+              MessageKind.GENERIC,
+              {'text': "@pragma('$name') annotation does not take options"});
         }
+        if (annotation.forFunctionsOnly) {
+          if (member is! ir.Procedure && member is! ir.Constructor) {
+            reporter.reportErrorMessage(
+                computeSourceSpanFromTreeNode(member), MessageKind.GENERIC, {
+              'text': "@pragma('$name') annotation is only supported "
+                  "for methods and constructors."
+            });
+          }
+        }
+        if (annotation.forFieldsOnly) {
+          if (member is! ir.Field) {
+            reporter.reportErrorMessage(
+                computeSourceSpanFromTreeNode(member), MessageKind.GENERIC, {
+              'text': "@pragma('$name') annotation is only supported "
+                  "for fields."
+            });
+          }
+        }
+        if (annotation.internalOnly && !platformAnnotationsAllowed) {
+          reporter.reportErrorMessage(
+              computeSourceSpanFromTreeNode(member),
+              MessageKind.GENERIC,
+              {'text': "Unrecognized dart2js pragma @pragma('$name')"});
+        }
+        break;
       }
-      if (!found) {
-        reporter.reportErrorMessage(element, MessageKind.GENERIC,
-            {'text': "Unknown dart2js pragma @pragma('$name')"});
-      }
+    }
+    if (!found) {
+      reporter.reportErrorMessage(
+          computeSourceSpanFromTreeNode(member),
+          MessageKind.GENERIC,
+          {'text': "Unknown dart2js pragma @pragma('$name')"});
     }
   }
 
   if (values.contains(PragmaAnnotation.tryInline) &&
       values.contains(PragmaAnnotation.noInline)) {
-    reporter.reportErrorMessage(element, MessageKind.GENERIC,
-        {'text': '@tryInline must not be used with @noInline.'});
+    reporter.reportErrorMessage(
+        computeSourceSpanFromTreeNode(member), MessageKind.GENERIC, {
+      'text': "@pragma('dart2js:tryInline') must not be used with "
+          "@pragma('dart2js:noInline')."
+    });
     values.remove(PragmaAnnotation.tryInline);
   }
   if (values.contains(PragmaAnnotation.noThrows) &&
       !values.contains(PragmaAnnotation.noInline)) {
     reporter.internalError(
-        element, "@NoThrows() should always be combined with @noInline.");
+        computeSourceSpanFromTreeNode(member),
+        "@pragma('dart2js:noThrows') should always be combined with "
+        "@pragma('dart2js:noInline').");
   }
   if (values.contains(PragmaAnnotation.noSideEffects) &&
       !values.contains(PragmaAnnotation.noInline)) {
     reporter.internalError(
-        element, "@NoSideEffects() should always be combined with @noInline.");
+        computeSourceSpanFromTreeNode(member),
+        "@pragma('dart2js:noSideEffects') should always be combined with "
+        "@pragma('dart2js:noInline').");
   }
-  annotationsDataBuilder.registerPragmaAnnotations(element, values);
-  return new Set<PragmaAnnotation>.from(
-      values.iterable(PragmaAnnotation.values));
+  return values;
 }
 
 abstract class AnnotationsData {
@@ -263,14 +214,14 @@
   /// Serializes this [AnnotationsData] to [sink].
   void writeToDataSink(DataSink sink);
 
-  /// Returns `true` if [member] has an `@AssumeDynamic()` annotation.
+  /// Returns `true` if [member] has an `@pragma('dart2js:assumeDynamic')` annotation.
   bool hasAssumeDynamic(MemberEntity member);
 
-  /// Returns `true` if [member] has a `@NoInline()`, `@noInline`, or
+  /// Returns `true` if [member] has a `@pragma('dart2js:noInline')`, or
   /// `@pragma('dart2js:noInline')` annotation.
   bool hasNoInline(MemberEntity member);
 
-  /// Returns `true` if [member] has a `@ForceInline()`, `@tryInline`, or
+  /// Returns `true` if [member] has a `@pragma('dart2js:tryInline')`, or
   /// `@pragma('dart2js:tryInline')` annotation.
   bool hasTryInline(MemberEntity member);
 
@@ -278,7 +229,8 @@
   /// annotation.
   bool hasDisableFinal(MemberEntity member);
 
-  /// Returns `true` if [member] has a `@pragma('dart2js:noElision')` annotation.
+  /// Returns `true` if [member] has a `@pragma('dart2js:noElision')`
+  /// annotation.
   bool hasNoElision(MemberEntity member);
 
   /// Returns `true` if [member] has a `@NoThrows()` annotation.
@@ -287,18 +239,20 @@
   /// Returns `true` if [member] has a `@NoSideEffects()` annotation.
   bool hasNoSideEffects(MemberEntity member);
 
-  /// Calls [f] for all functions with a `@NoInline()`, `@noInline`, or
+  /// Calls [f] for all functions with a `@pragma('dart2js:noInline')`, or
   /// `@pragma('dart2js:noInline')` annotation.
   void forEachNoInline(void f(FunctionEntity function));
 
-  /// Calls [f] for all functions with a `@ForceInline()`, `@tryInline`, or
+  /// Calls [f] for all functions with a `@pragma('dart2js:tryInline')`, or
   /// `@pragma('dart2js:tryInline')` annotation.
   void forEachTryInline(void f(FunctionEntity function));
 
-  /// Calls [f] for all functions with a `@NoThrows()` annotation.
+  /// Calls [f] for all functions with a `@pragma('dart2js:noThrows')`
+  /// annotation.
   void forEachNoThrows(void f(FunctionEntity function));
 
-  /// Calls [f] for all functions with a `@NoSideEffects()` annotation.
+  /// Calls [f] for all functions with a `@pragma('dart2js:noSideEffects')`
+  /// annotation.
   void forEachNoSideEffects(void f(FunctionEntity function));
 }
 
@@ -319,6 +273,7 @@
     return new AnnotationsDataImpl(pragmaAnnotations);
   }
 
+  @override
   void writeToDataSink(DataSink sink) {
     sink.begin(tag);
     sink.writeMemberMap(pragmaAnnotations, (EnumSet<PragmaAnnotation> set) {
@@ -332,27 +287,35 @@
     return set != null && set.contains(annotation);
   }
 
+  @override
   bool hasAssumeDynamic(MemberEntity member) =>
       _hasPragma(member, PragmaAnnotation.assumeDynamic);
 
+  @override
   bool hasNoInline(MemberEntity member) =>
       _hasPragma(member, PragmaAnnotation.noInline);
 
+  @override
   bool hasTryInline(MemberEntity member) =>
       _hasPragma(member, PragmaAnnotation.tryInline);
 
+  @override
   bool hasDisableFinal(MemberEntity member) =>
       _hasPragma(member, PragmaAnnotation.disableFinal);
 
+  @override
   bool hasNoElision(MemberEntity member) =>
       _hasPragma(member, PragmaAnnotation.noElision);
 
+  @override
   bool hasNoThrows(MemberEntity member) =>
       _hasPragma(member, PragmaAnnotation.noThrows);
 
+  @override
   bool hasNoSideEffects(MemberEntity member) =>
       _hasPragma(member, PragmaAnnotation.noSideEffects);
 
+  @override
   void forEachNoInline(void f(FunctionEntity function)) {
     pragmaAnnotations
         .forEach((MemberEntity member, EnumSet<PragmaAnnotation> set) {
@@ -362,6 +325,7 @@
     });
   }
 
+  @override
   void forEachTryInline(void f(FunctionEntity function)) {
     pragmaAnnotations
         .forEach((MemberEntity member, EnumSet<PragmaAnnotation> set) {
@@ -371,6 +335,7 @@
     });
   }
 
+  @override
   void forEachNoThrows(void f(FunctionEntity function)) {
     pragmaAnnotations
         .forEach((MemberEntity member, EnumSet<PragmaAnnotation> set) {
@@ -380,6 +345,7 @@
     });
   }
 
+  @override
   void forEachNoSideEffects(void f(FunctionEntity function)) {
     pragmaAnnotations
         .forEach((MemberEntity member, EnumSet<PragmaAnnotation> set) {
diff --git a/pkg/compiler/lib/src/js_backend/backend.dart b/pkg/compiler/lib/src/js_backend/backend.dart
index 5d868e8..6f44b97 100644
--- a/pkg/compiler/lib/src/js_backend/backend.dart
+++ b/pkg/compiler/lib/src/js_backend/backend.dart
@@ -12,7 +12,6 @@
 import '../common_elements.dart'
     show CommonElements, ElementEnvironment, JElementEnvironment;
 import '../compiler.dart' show Compiler;
-import '../constants/constant_system.dart';
 import '../deferred_load.dart' show DeferredLoadTask;
 import '../dump_info.dart' show DumpInfoTask;
 import '../elements/entities.dart';
@@ -43,7 +42,7 @@
     show ImpactStrategy, ImpactUseCase, WorldImpact, WorldImpactVisitor;
 import '../util/util.dart';
 import '../world.dart' show JClosedWorld;
-import 'allocator_analysis.dart';
+import 'field_analysis.dart';
 import 'annotations.dart';
 import 'backend_impact.dart';
 import 'backend_usage.dart';
@@ -351,7 +350,7 @@
   /// constructors for custom elements.
   CustomElementsCodegenAnalysis _customElementsCodegenAnalysis;
 
-  KAllocatorAnalysis _allocatorResolutionAnalysis;
+  KFieldAnalysis _fieldAnalysis;
 
   /// Support for classifying `noSuchMethod` implementations.
   NoSuchMethodRegistry noSuchMethodRegistry;
@@ -400,16 +399,11 @@
         this, compiler.measurer, sourceInformationStrategy);
   }
 
-  /// The [ConstantSystem] used to interpret compile-time constants for this
-  /// backend.
-  ConstantSystem get constantSystem => constants.constantSystem;
-
   DiagnosticReporter get reporter => compiler.reporter;
 
   ImpactCacheDeleter get impactCacheDeleter => compiler.impactCacheDeleter;
 
-  KAllocatorAnalysis get allocatorResolutionAnalysisForTesting =>
-      _allocatorResolutionAnalysis;
+  KFieldAnalysis get fieldAnalysisForTesting => _fieldAnalysis;
 
   /// Resolution support for generating table of interceptors and
   /// constructors for custom elements.
@@ -525,7 +519,7 @@
 
   /// Called when the resolution queue has been closed.
   void onResolutionEnd() {
-    frontendStrategy.annotationProcesser.processJsInteropAnnotations(
+    frontendStrategy.annotationProcessor.processJsInteropAnnotations(
         frontendStrategy.nativeBasicData, nativeDataBuilder);
   }
 
@@ -546,13 +540,11 @@
         compiler.frontendStrategy.createNativeClassFinder(nativeBasicData));
     _nativeDataBuilder = new NativeDataBuilderImpl(nativeBasicData);
     _customElementsResolutionAnalysis = new CustomElementsResolutionAnalysis(
-        constantSystem,
         elementEnvironment,
         commonElements,
         nativeBasicData,
         _backendUsageBuilder);
-    _allocatorResolutionAnalysis =
-        new KAllocatorAnalysis(compiler.frontendStrategy);
+    _fieldAnalysis = new KFieldAnalysis(compiler.frontendStrategy);
     ClassQueries classQueries = compiler.frontendStrategy.createClassQueries();
     ClassHierarchyBuilder classHierarchyBuilder =
         new ClassHierarchyBuilder(commonElements, classQueries);
@@ -587,7 +579,7 @@
             noSuchMethodRegistry,
             customElementsResolutionAnalysis,
             _nativeResolutionEnqueuer,
-            _allocatorResolutionAnalysis,
+            _fieldAnalysis,
             compiler.deferredLoadTask),
         compiler.frontendStrategy.createResolutionWorldBuilder(
             nativeBasicData,
@@ -595,7 +587,7 @@
             interceptorDataBuilder,
             _backendUsageBuilder,
             rtiNeedBuilder,
-            _allocatorResolutionAnalysis,
+            _fieldAnalysis,
             _nativeResolutionEnqueuer,
             noSuchMethodRegistry,
             annotationsDataBuilder,
@@ -607,7 +599,8 @@
             _nativeDataBuilder,
             annotationsDataBuilder,
             impactTransformer,
-            compiler.impactCache));
+            compiler.impactCache,
+            _fieldAnalysis));
   }
 
   /// Creates an [Enqueuer] for code generation specific to this backend.
@@ -620,10 +613,7 @@
     CommonElements commonElements = closedWorld.commonElements;
     BackendImpacts impacts = new BackendImpacts(commonElements);
     _customElementsCodegenAnalysis = new CustomElementsCodegenAnalysis(
-        constantSystem,
-        commonElements,
-        elementEnvironment,
-        closedWorld.nativeData);
+        commonElements, elementEnvironment, closedWorld.nativeData);
     _nativeCodegenEnqueuer = new NativeCodegenEnqueuer(
         compiler.options,
         elementEnvironment,
@@ -736,7 +726,7 @@
   /// been loaded.
   void setAnnotations(LibraryEntity library) {
     AnnotationProcessor processor =
-        compiler.frontendStrategy.annotationProcesser;
+        compiler.frontendStrategy.annotationProcessor;
     if (maybeEnableNative(library.canonicalUri)) {
       processor.extractNativeAnnotations(library);
     }
diff --git a/pkg/compiler/lib/src/js_backend/backend_impact.dart b/pkg/compiler/lib/src/js_backend/backend_impact.dart
index f553d9f..36d9600 100644
--- a/pkg/compiler/lib/src/js_backend/backend_impact.dart
+++ b/pkg/compiler/lib/src/js_backend/backend_impact.dart
@@ -298,6 +298,15 @@
     ]);
   }
 
+  BackendImpact _constantSetLiteral;
+
+  BackendImpact get constantSetLiteral =>
+      _constantSetLiteral ??= new BackendImpact(instantiatedClasses: [
+        _commonElements.constSetLiteralClass,
+      ], otherImpacts: [
+        constantMapLiteral
+      ]);
+
   BackendImpact _symbolConstructor;
 
   BackendImpact get symbolConstructor {
@@ -570,6 +579,15 @@
         ]);
   }
 
+  BackendImpact _setClass;
+
+  BackendImpact get setClass => _setClass ??= new BackendImpact(globalClasses: [
+        // The backend will use a literal list to initialize the entries
+        // of the set.
+        _commonElements.listClass,
+        _commonElements.setLiteralClass,
+      ]);
+
   BackendImpact _boundClosureClass;
 
   BackendImpact get boundClosureClass {
@@ -601,6 +619,16 @@
     ]);
   }
 
+  BackendImpact _setLiteralClass;
+
+  BackendImpact get setLiteralClass =>
+      _setLiteralClass ??= new BackendImpact(globalUses: [
+        _commonElements.setLiteralConstructor,
+        _commonElements.setLiteralConstructorEmpty,
+        _commonElements.setLiteralUntypedMaker,
+        _commonElements.setLiteralUntypedEmptyMaker,
+      ]);
+
   BackendImpact _closureClass;
 
   BackendImpact get closureClass {
diff --git a/pkg/compiler/lib/src/js_backend/backend_usage.dart b/pkg/compiler/lib/src/js_backend/backend_usage.dart
index 39612fd..09ce162 100644
--- a/pkg/compiler/lib/src/js_backend/backend_usage.dart
+++ b/pkg/compiler/lib/src/js_backend/backend_usage.dart
@@ -113,13 +113,13 @@
   /// `true` if a core-library function requires the preamble file to function.
   bool requiresPreamble = false;
 
-  /// `true` if `Function.apply` is used.
+  @override
   bool isFunctionApplyUsed = false;
 
   /// `true` if 'dart:mirrors' features are used.
   bool isMirrorsUsed = false;
 
-  /// `true` if `noSuchMethod` is used.
+  @override
   bool isNoSuchMethodUsed = false;
 
   BackendUsageBuilderImpl(this._frontendStrategy);
@@ -165,6 +165,8 @@
       return true;
     } else if (element == _commonElements.listClass ||
         element == _commonElements.mapLiteralClass ||
+        element == _commonElements.setLiteralClass ||
+        element == _commonElements.unmodifiableSetClass ||
         element == _commonElements.functionClass ||
         element == _commonElements.stringClass) {
       // TODO(johnniwinther): Avoid these.
@@ -188,6 +190,7 @@
     }
   }
 
+  @override
   void processBackendImpact(BackendImpact backendImpact) {
     for (FunctionEntity staticUse in backendImpact.staticUses) {
       assert(staticUse != null);
@@ -221,6 +224,7 @@
     }
   }
 
+  @override
   void registerUsedMember(MemberEntity member) {
     if (member == _commonElements.getIsolateAffinityTagMarker) {
       _needToInitializeIsolateAffinityTag = true;
@@ -233,6 +237,7 @@
     }
   }
 
+  @override
   void registerGlobalFunctionDependency(FunctionEntity element) {
     assert(element != null);
     if (_globalFunctionDependencies == null) {
@@ -241,6 +246,7 @@
     _globalFunctionDependencies.add(element);
   }
 
+  @override
   void registerGlobalClassDependency(ClassEntity element) {
     assert(element != null);
     if (_globalClassDependencies == null) {
@@ -254,6 +260,7 @@
     _runtimeTypeUses.add(runtimeTypeUse);
   }
 
+  @override
   BackendUsage close() {
     return new BackendUsageImpl(
         globalFunctionDependencies: _globalFunctionDependencies,
@@ -287,19 +294,21 @@
 
   final Set<RuntimeTypeUse> _runtimeTypeUses;
 
+  @override
   bool needToInitializeIsolateAffinityTag;
+  @override
   bool needToInitializeDispatchProperty;
 
-  /// `true` if a core-library function requires the preamble file to function.
+  @override
   final bool requiresPreamble;
 
-  /// `true` if `Function.apply` is used.
+  @override
   final bool isFunctionApplyUsed;
 
-  /// `true` if 'dart:mirrors' features are used.
+  @override
   final bool isMirrorsUsed;
 
-  /// `true` if `noSuchMethod` is used.
+  @override
   final bool isNoSuchMethodUsed;
 
   BackendUsageImpl(
@@ -355,6 +364,7 @@
         isNoSuchMethodUsed: isNoSuchMethodUsed);
   }
 
+  @override
   void writeToDataSink(DataSink sink) {
     sink.begin(tag);
     sink.writeMembers(_globalFunctionDependencies);
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 71bb262..751295e 100644
--- a/pkg/compiler/lib/src/js_backend/checked_mode_helpers.dart
+++ b/pkg/compiler/lib/src/js_backend/checked_mode_helpers.dart
@@ -37,8 +37,10 @@
 class PropertyCheckedModeHelper extends CheckedModeHelper {
   const PropertyCheckedModeHelper(String name) : super(name);
 
+  @override
   CallStructure get callStructure => CallStructure.TWO_ARGS;
 
+  @override
   void generateAdditionalArguments(SsaCodeGenerator codegen, Namer namer,
       HTypeConversion node, List<jsAst.Expression> arguments) {
     DartType type = node.typeExpression;
@@ -50,8 +52,10 @@
 class TypeVariableCheckedModeHelper extends CheckedModeHelper {
   const TypeVariableCheckedModeHelper(String name) : super(name);
 
+  @override
   CallStructure get callStructure => CallStructure.TWO_ARGS;
 
+  @override
   void generateAdditionalArguments(SsaCodeGenerator codegen, Namer namer,
       HTypeConversion node, List<jsAst.Expression> arguments) {
     assert(node.typeExpression.isTypeVariable);
@@ -63,8 +67,10 @@
 class FunctionTypeRepresentationCheckedModeHelper extends CheckedModeHelper {
   const FunctionTypeRepresentationCheckedModeHelper(String name) : super(name);
 
+  @override
   CallStructure get callStructure => CallStructure.TWO_ARGS;
 
+  @override
   void generateAdditionalArguments(SsaCodeGenerator codegen, Namer namer,
       HTypeConversion node, List<jsAst.Expression> arguments) {
     assert(node.typeExpression.isFunctionType);
@@ -76,8 +82,10 @@
 class FutureOrRepresentationCheckedModeHelper extends CheckedModeHelper {
   const FutureOrRepresentationCheckedModeHelper(String name) : super(name);
 
+  @override
   CallStructure get callStructure => CallStructure.TWO_ARGS;
 
+  @override
   void generateAdditionalArguments(SsaCodeGenerator codegen, Namer namer,
       HTypeConversion node, List<jsAst.Expression> arguments) {
     assert(node.typeExpression.isFutureOr);
@@ -89,8 +97,10 @@
 class SubtypeCheckedModeHelper extends CheckedModeHelper {
   const SubtypeCheckedModeHelper(String name) : super(name);
 
+  @override
   CallStructure get callStructure => const CallStructure.unnamed(4);
 
+  @override
   void generateAdditionalArguments(SsaCodeGenerator codegen, Namer namer,
       HTypeConversion node, List<jsAst.Expression> arguments) {
     // TODO(sra): Move these calls into the SSA graph so that the arguments can
@@ -117,6 +127,7 @@
     const CheckedModeHelper('doubleTypeCheck'),
     const CheckedModeHelper('numTypeCast'),
     const CheckedModeHelper('numTypeCheck'),
+    const CheckedModeHelper('boolConversionCheck'),
     const CheckedModeHelper('boolTypeCast'),
     const CheckedModeHelper('boolTypeCheck'),
     const CheckedModeHelper('intTypeCast'),
diff --git a/pkg/compiler/lib/src/js_backend/constant_emitter.dart b/pkg/compiler/lib/src/js_backend/constant_emitter.dart
index e705bb1..86cbeb5 100644
--- a/pkg/compiler/lib/src/js_backend/constant_emitter.dart
+++ b/pkg/compiler/lib/src/js_backend/constant_emitter.dart
@@ -4,6 +4,7 @@
 
 import '../common.dart';
 import '../common_elements.dart';
+import '../constants/constant_system.dart' as constant_system;
 import '../constants/values.dart';
 import '../elements/entities.dart';
 import '../elements/types.dart';
@@ -13,8 +14,7 @@
 import '../js_emitter/code_emitter_task.dart';
 import '../options.dart';
 import '../universe/codegen_world_builder.dart';
-import 'allocator_analysis.dart' show JAllocatorAnalysis;
-import 'constant_system_javascript.dart';
+import 'field_analysis.dart' show JFieldAnalysis;
 import 'js_backend.dart';
 import 'runtime_types.dart';
 
@@ -38,7 +38,7 @@
   final CodegenWorldBuilder _worldBuilder;
   final RuntimeTypesNeed _rtiNeed;
   final RuntimeTypesEncoder _rtiEncoder;
-  final JAllocatorAnalysis _allocatorAnalysis;
+  final JFieldAnalysis _fieldAnalysis;
   final CodeEmitterTask _task;
   final _ConstantReferenceGenerator constantReferenceGenerator;
   final _ConstantListGenerator makeConstantList;
@@ -52,7 +52,7 @@
       this._worldBuilder,
       this._rtiNeed,
       this._rtiEncoder,
-      this._allocatorAnalysis,
+      this._fieldAnalysis,
       this._task,
       this.constantReferenceGenerator,
       this.makeConstantList);
@@ -184,12 +184,37 @@
   }
 
   @override
-  jsAst.Expression visitMap(JavaScriptMapConstant constant, [_]) {
+  jsAst.Expression visitSet(constant_system.JavaScriptSetConstant constant,
+      [_]) {
+    InterfaceType sourceType = constant.type;
+    ClassEntity classElement = sourceType.element;
+    String className = classElement.name;
+    if (!identical(classElement, _commonElements.constSetLiteralClass)) {
+      failedAt(
+          classElement, "Compiler encoutered unexpected set class $className");
+    }
+
+    List<jsAst.Expression> arguments = <jsAst.Expression>[
+      constantReferenceGenerator(constant.entries),
+    ];
+
+    if (_rtiNeed.classNeedsTypeArguments(classElement)) {
+      arguments.add(_reifiedTypeArguments(constant, sourceType.typeArguments));
+    }
+
+    jsAst.Expression constructor = _emitter.constructorAccess(classElement);
+    return new jsAst.New(constructor, arguments);
+  }
+
+  @override
+  jsAst.Expression visitMap(constant_system.JavaScriptMapConstant constant,
+      [_]) {
     jsAst.Expression jsMap() {
       List<jsAst.Property> properties = <jsAst.Property>[];
       for (int i = 0; i < constant.length; i++) {
         StringConstantValue key = constant.keys[i];
-        if (key.stringValue == JavaScriptMapConstant.PROTO_PROPERTY) {
+        if (key.stringValue ==
+            constant_system.JavaScriptMapConstant.PROTO_PROPERTY) {
           continue;
         }
 
@@ -226,17 +251,21 @@
     _worldBuilder.forEachInstanceField(classElement,
         (ClassEntity enclosing, FieldEntity field, {bool isElided}) {
       if (isElided) return;
-      if (field.name == JavaScriptMapConstant.LENGTH_NAME) {
+      if (field.name == constant_system.JavaScriptMapConstant.LENGTH_NAME) {
         arguments
             .add(new jsAst.LiteralNumber('${constant.keyList.entries.length}'));
-      } else if (field.name == JavaScriptMapConstant.JS_OBJECT_NAME) {
+      } else if (field.name ==
+          constant_system.JavaScriptMapConstant.JS_OBJECT_NAME) {
         arguments.add(jsMap());
-      } else if (field.name == JavaScriptMapConstant.KEYS_NAME) {
+      } else if (field.name ==
+          constant_system.JavaScriptMapConstant.KEYS_NAME) {
         arguments.add(constantReferenceGenerator(constant.keyList));
-      } else if (field.name == JavaScriptMapConstant.PROTO_VALUE) {
+      } else if (field.name ==
+          constant_system.JavaScriptMapConstant.PROTO_VALUE) {
         assert(constant.protoValue != null);
         arguments.add(constantReferenceGenerator(constant.protoValue));
-      } else if (field.name == JavaScriptMapConstant.JS_DATA_NAME) {
+      } else if (field.name ==
+          constant_system.JavaScriptMapConstant.JS_DATA_NAME) {
         arguments.add(jsGeneralMap());
       } else {
         failedAt(field,
@@ -244,11 +273,12 @@
       }
       emittedArgumentCount++;
     });
-    if ((className == JavaScriptMapConstant.DART_STRING_CLASS &&
+    if ((className == constant_system.JavaScriptMapConstant.DART_STRING_CLASS &&
             emittedArgumentCount != 3) ||
-        (className == JavaScriptMapConstant.DART_PROTO_CLASS &&
+        (className == constant_system.JavaScriptMapConstant.DART_PROTO_CLASS &&
             emittedArgumentCount != 4) ||
-        (className == JavaScriptMapConstant.DART_GENERAL_CLASS &&
+        (className ==
+                constant_system.JavaScriptMapConstant.DART_GENERAL_CLASS &&
             emittedArgumentCount != 1)) {
       failedAt(classElement,
           "Compiler and ${className} disagree on number of fields.");
@@ -322,7 +352,7 @@
     _worldBuilder.forEachInstanceField(element, (_, FieldEntity field,
         {bool isElided}) {
       if (isElided) return;
-      if (!_allocatorAnalysis.isInitializedInAllocator(field)) {
+      if (!_fieldAnalysis.getFieldData(field).isInitializedInAllocator) {
         fields.add(constantReferenceGenerator(constant.fields[field]));
       }
     });
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 6b9de6a..2b65955 100644
--- a/pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart
+++ b/pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart
@@ -4,10 +4,7 @@
 
 import '../compile_time_constants.dart';
 import '../compiler.dart' show Compiler;
-import '../constants/constant_system.dart';
-import '../constant_system_dart.dart';
 import '../elements/entities.dart';
-import 'constant_system_javascript.dart';
 
 /// [ConstantCompilerTask] for compilation of constants for the JavaScript
 /// backend.
@@ -17,18 +14,14 @@
 /// [DartConstantCompiler] for the frontend interpretation of the constants and
 /// to a [JavaScriptConstantCompiler] for the backend interpretation.
 class JavaScriptConstantTask extends ConstantCompilerTask {
-  ConstantSystem dartConstantSystem;
   JavaScriptConstantCompiler jsConstantCompiler;
 
   JavaScriptConstantTask(Compiler compiler)
-      : this.dartConstantSystem = const DartConstantSystem(),
-        this.jsConstantCompiler = new JavaScriptConstantCompiler(),
+      : this.jsConstantCompiler = new JavaScriptConstantCompiler(),
         super(compiler.measurer);
 
-  String get name => 'ConstantHandler';
-
   @override
-  ConstantSystem get constantSystem => dartConstantSystem;
+  String get name => 'ConstantHandler';
 }
 
 /// The [JavaScriptConstantCompiler] is used to keep track of compile-time
@@ -41,8 +34,6 @@
 
   JavaScriptConstantCompiler();
 
-  ConstantSystem get constantSystem => JavaScriptConstantSystem.only;
-
   @override
   void registerLazyStatic(FieldEntity element) {
     lazyStatics.add(element);
diff --git a/pkg/compiler/lib/src/js_backend/constant_system_javascript.dart b/pkg/compiler/lib/src/js_backend/constant_system_javascript.dart
deleted file mode 100644
index 21eabbf..0000000
--- a/pkg/compiler/lib/src/js_backend/constant_system_javascript.dart
+++ /dev/null
@@ -1,445 +0,0 @@
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library dart2js.constant_system.js;
-
-import '../constant_system_dart.dart';
-import '../constants/constant_system.dart';
-import '../constants/values.dart';
-import '../common_elements.dart' show CommonElements;
-import '../elements/types.dart';
-import '../elements/entities.dart';
-
-class JavaScriptBitNotOperation extends BitNotOperation {
-  const JavaScriptBitNotOperation();
-
-  ConstantValue fold(ConstantValue constant) {
-    if (JavaScriptConstantSystem.only.isInt(constant)) {
-      // In JavaScript we don't check for -0 and treat it as if it was zero.
-      if (constant.isMinusZero) {
-        constant = DART_CONSTANT_SYSTEM.createInt(BigInt.zero);
-      }
-      IntConstantValue intConstant = constant;
-      // We convert the result of bit-operations to 32 bit unsigned integers.
-      return JavaScriptConstantSystem.only.createInt32(~intConstant.intValue);
-    }
-    return null;
-  }
-}
-
-/// In JavaScript we truncate the result to an unsigned 32 bit integer. Also, -0
-/// is treated as if it was the integer 0.
-class JavaScriptBinaryBitOperation implements BinaryOperation {
-  final BinaryBitOperation dartBitOperation;
-
-  const JavaScriptBinaryBitOperation(this.dartBitOperation);
-
-  String get name => dartBitOperation.name;
-
-  ConstantValue fold(ConstantValue left, ConstantValue right) {
-    // In JavaScript we don't check for -0 and treat it as if it was zero.
-    if (left.isMinusZero) {
-      left = DART_CONSTANT_SYSTEM.createInt(BigInt.zero);
-    }
-    if (right.isMinusZero) {
-      right = DART_CONSTANT_SYSTEM.createInt(BigInt.zero);
-    }
-    IntConstantValue result = dartBitOperation.fold(left, right);
-    if (result != null) {
-      // We convert the result of bit-operations to 32 bit unsigned integers.
-      return JavaScriptConstantSystem.only.createInt32(result.intValue);
-    }
-    return result;
-  }
-
-  apply(left, right) => dartBitOperation.apply(left, right);
-}
-
-class JavaScriptShiftRightOperation extends JavaScriptBinaryBitOperation {
-  const JavaScriptShiftRightOperation() : super(const ShiftRightOperation());
-
-  ConstantValue fold(ConstantValue left, ConstantValue right) {
-    // Truncate the input value to 32 bits if necessary.
-    if (left.isInt) {
-      IntConstantValue intConstant = left;
-      BigInt value = intConstant.intValue;
-      BigInt truncatedValue = value & JavaScriptConstantSystem.only.BITS32;
-      if (value < BigInt.zero) {
-        // Sign-extend if the input was negative. The current semantics don't
-        // make much sense, since we only look at bit 31.
-        // TODO(floitsch): we should treat the input to right shifts as
-        // unsigned.
-
-        // A 32 bit complement-two value x can be computed by:
-        //    x_u - 2^32 (where x_u is its unsigned representation).
-        // Example: 0xFFFFFFFF - 0x100000000 => -1.
-        // We simply and with the sign-bit and multiply by two. If the sign-bit
-        // was set, then the result is 0. Otherwise it will become 2^32.
-        final BigInt SIGN_BIT = new BigInt.from(0x80000000);
-        truncatedValue -= BigInt.two * (truncatedValue & SIGN_BIT);
-      }
-      if (value != truncatedValue) {
-        left = DART_CONSTANT_SYSTEM.createInt(truncatedValue);
-      }
-    }
-    return super.fold(left, right);
-  }
-}
-
-class JavaScriptNegateOperation implements UnaryOperation {
-  final NegateOperation dartNegateOperation = const NegateOperation();
-
-  const JavaScriptNegateOperation();
-
-  String get name => dartNegateOperation.name;
-
-  ConstantValue fold(ConstantValue constant) {
-    if (constant.isInt) {
-      IntConstantValue intConstant = constant;
-      if (intConstant.intValue == BigInt.zero) {
-        return JavaScriptConstantSystem.only.createDouble(-0.0);
-      }
-    }
-    return dartNegateOperation.fold(constant);
-  }
-}
-
-class JavaScriptAddOperation implements BinaryOperation {
-  final _addOperation = const AddOperation();
-  String get name => _addOperation.name;
-
-  const JavaScriptAddOperation();
-
-  ConstantValue fold(ConstantValue left, ConstantValue right) {
-    ConstantValue result = _addOperation.fold(left, right);
-    if (result != null && result.isNum) {
-      return JavaScriptConstantSystem.only.convertToJavaScriptConstant(result);
-    }
-    return result;
-  }
-
-  apply(left, right) => _addOperation.apply(left, right);
-}
-
-class JavaScriptRemainderOperation extends ArithmeticNumOperation {
-  String get name => 'remainder';
-
-  const JavaScriptRemainderOperation();
-
-  BigInt foldInts(BigInt left, BigInt right) {
-    if (right == BigInt.zero) return null;
-    return left.remainder(right);
-  }
-
-  num foldNums(num left, num right) => left.remainder(right);
-  apply(left, right) => left.remainder(right);
-}
-
-class JavaScriptBinaryArithmeticOperation implements BinaryOperation {
-  final BinaryOperation dartArithmeticOperation;
-
-  const JavaScriptBinaryArithmeticOperation(this.dartArithmeticOperation);
-
-  String get name => dartArithmeticOperation.name;
-
-  ConstantValue fold(ConstantValue left, ConstantValue right) {
-    ConstantValue result = dartArithmeticOperation.fold(left, right);
-    if (result == null) return result;
-    return JavaScriptConstantSystem.only.convertToJavaScriptConstant(result);
-  }
-
-  apply(left, right) => dartArithmeticOperation.apply(left, right);
-}
-
-class JavaScriptIdentityOperation implements BinaryOperation {
-  final IdentityOperation dartIdentityOperation = const IdentityOperation();
-
-  const JavaScriptIdentityOperation();
-
-  String get name => dartIdentityOperation.name;
-
-  BoolConstantValue fold(ConstantValue left, ConstantValue right) {
-    BoolConstantValue result = dartIdentityOperation.fold(left, right);
-    if (result == null || result.boolValue) return result;
-    // In JavaScript -0.0 === 0 and all doubles are equal to their integer
-    // values. Furthermore NaN !== NaN.
-    if (left.isInt && right.isInt) {
-      IntConstantValue leftInt = left;
-      IntConstantValue rightInt = right;
-      return new BoolConstantValue(leftInt.intValue == rightInt.intValue);
-    }
-    if (left.isNum && right.isNum) {
-      NumConstantValue leftNum = left;
-      NumConstantValue rightNum = right;
-      double leftDouble = leftNum.doubleValue;
-      double rightDouble = rightNum.doubleValue;
-      return new BoolConstantValue(leftDouble == rightDouble);
-    }
-    return result;
-  }
-
-  apply(left, right) => identical(left, right);
-}
-
-class JavaScriptRoundOperation implements UnaryOperation {
-  const JavaScriptRoundOperation();
-  String get name => DART_CONSTANT_SYSTEM.round.name;
-  ConstantValue fold(ConstantValue constant) {
-    // Be careful to round() only values that do not throw on either the host or
-    // target platform.
-    ConstantValue tryToRound(double value) {
-      // Due to differences between browsers, only 'round' easy cases. Avoid
-      // cases where nudging the value up or down changes the answer.
-      // 13 digits is safely within the ~15 digit precision of doubles.
-      const severalULP = 0.0000000000001;
-      // Use 'roundToDouble()' to avoid exceptions on rounding the nudged value.
-      double rounded = value.roundToDouble();
-      double rounded1 = (value * (1.0 + severalULP)).roundToDouble();
-      double rounded2 = (value * (1.0 - severalULP)).roundToDouble();
-      if (rounded != rounded1 || rounded != rounded2) return null;
-      return JavaScriptConstantSystem.only.convertToJavaScriptConstant(
-          new IntConstantValue(new BigInt.from(value.round())));
-    }
-
-    if (constant.isInt) {
-      IntConstantValue intConstant = constant;
-      double value = intConstant.intValue.toDouble();
-      if (value >= -double.maxFinite && value <= double.maxFinite) {
-        return tryToRound(value);
-      }
-    }
-    if (constant.isDouble) {
-      DoubleConstantValue doubleConstant = constant;
-      double value = doubleConstant.doubleValue;
-      // NaN and infinities will throw.
-      if (value.isNaN) return null;
-      if (value.isInfinite) return null;
-      return tryToRound(value);
-    }
-    return null;
-  }
-}
-
-/// Constant system following the semantics for Dart code that has been
-/// compiled to JavaScript.
-class JavaScriptConstantSystem extends ConstantSystem {
-  final BITS32 = new BigInt.from(0xFFFFFFFF);
-
-  final add = const JavaScriptAddOperation();
-  final bitAnd = const JavaScriptBinaryBitOperation(const BitAndOperation());
-  final bitNot = const JavaScriptBitNotOperation();
-  final bitOr = const JavaScriptBinaryBitOperation(const BitOrOperation());
-  final bitXor = const JavaScriptBinaryBitOperation(const BitXorOperation());
-  final booleanAnd = const BooleanAndOperation();
-  final booleanOr = const BooleanOrOperation();
-  final divide =
-      const JavaScriptBinaryArithmeticOperation(const DivideOperation());
-  final equal = const EqualsOperation();
-  final greaterEqual = const GreaterEqualOperation();
-  final greater = const GreaterOperation();
-  final identity = const JavaScriptIdentityOperation();
-  final ifNull = const IfNullOperation();
-  final lessEqual = const LessEqualOperation();
-  final less = const LessOperation();
-  final modulo =
-      const JavaScriptBinaryArithmeticOperation(const ModuloOperation());
-  final multiply =
-      const JavaScriptBinaryArithmeticOperation(const MultiplyOperation());
-  final negate = const JavaScriptNegateOperation();
-  final not = const NotOperation();
-  final remainder = const JavaScriptRemainderOperation();
-  final shiftLeft =
-      const JavaScriptBinaryBitOperation(const ShiftLeftOperation());
-  final shiftRight = const JavaScriptShiftRightOperation();
-  final subtract =
-      const JavaScriptBinaryArithmeticOperation(const SubtractOperation());
-  final truncatingDivide = const JavaScriptBinaryArithmeticOperation(
-      const TruncatingDivideOperation());
-  final codeUnitAt = const CodeUnitAtRuntimeOperation();
-  final round = const JavaScriptRoundOperation();
-  final abs = const UnfoldedUnaryOperation('abs');
-
-  static final JavaScriptConstantSystem only =
-      new JavaScriptConstantSystem._internal();
-
-  JavaScriptConstantSystem._internal();
-
-  /// Returns true if [value] will turn into NaN or infinity
-  /// at runtime.
-  bool integerBecomesNanOrInfinity(BigInt value) {
-    double doubleValue = value.toDouble();
-    return doubleValue.isNaN || doubleValue.isInfinite;
-  }
-
-  NumConstantValue convertToJavaScriptConstant(NumConstantValue constant) {
-    if (constant.isInt) {
-      IntConstantValue intConstant = constant;
-      BigInt intValue = intConstant.intValue;
-      if (integerBecomesNanOrInfinity(intValue)) {
-        return new DoubleConstantValue(intValue.toDouble());
-      }
-      // If the integer loses precision with JavaScript numbers, use
-      // the floored version JavaScript will use.
-      BigInt floorValue = new BigInt.from(intValue.toDouble());
-      if (floorValue != intValue) {
-        return new IntConstantValue(floorValue);
-      }
-    } else if (constant.isDouble) {
-      DoubleConstantValue doubleResult = constant;
-      double doubleValue = doubleResult.doubleValue;
-      if (!doubleValue.isInfinite &&
-          !doubleValue.isNaN &&
-          !constant.isMinusZero) {
-        double truncated = doubleValue.truncateToDouble();
-        if (truncated == doubleValue) {
-          return new IntConstantValue(new BigInt.from(truncated));
-        }
-      }
-    }
-    return constant;
-  }
-
-  @override
-  NumConstantValue createInt(BigInt i) {
-    return convertToJavaScriptConstant(new IntConstantValue(i));
-  }
-
-  NumConstantValue createInt32(BigInt i) => new IntConstantValue(i & BITS32);
-  NumConstantValue createDouble(double d) =>
-      convertToJavaScriptConstant(new DoubleConstantValue(d));
-  StringConstantValue createString(String string) {
-    return new StringConstantValue(string);
-  }
-
-  BoolConstantValue createBool(bool value) => new BoolConstantValue(value);
-  NullConstantValue createNull() => new NullConstantValue();
-
-  @override
-  ListConstantValue createList(InterfaceType type, List<ConstantValue> values) {
-    return new ListConstantValue(type, values);
-  }
-
-  @override
-  ConstantValue createType(CommonElements commonElements, DartType type) {
-    InterfaceType instanceType = commonElements.typeLiteralType;
-    return new TypeConstantValue(type, instanceType);
-  }
-
-  // Integer checks report true for -0.0, INFINITY, and -INFINITY.  At
-  // runtime an 'X is int' check is implemented as:
-  //
-  // typeof(X) === "number" && Math.floor(X) === X
-  //
-  // We consistently match that runtime semantics at compile time as well.
-  bool isInt(ConstantValue constant) {
-    return constant.isInt ||
-        constant.isMinusZero ||
-        constant.isPositiveInfinity ||
-        constant.isNegativeInfinity;
-  }
-
-  bool isDouble(ConstantValue constant) =>
-      constant.isDouble && !constant.isMinusZero;
-  bool isString(ConstantValue constant) => constant.isString;
-  bool isBool(ConstantValue constant) => constant.isBool;
-  bool isNull(ConstantValue constant) => constant.isNull;
-
-  bool isSubtype(DartTypes types, DartType s, DartType t) {
-    // At runtime, an integer is both an integer and a double: the
-    // integer type check is Math.floor, which will return true only
-    // for real integers, and our double type check is 'typeof number'
-    // which will return true for both integers and doubles.
-    if (s == types.commonElements.intType &&
-        t == types.commonElements.doubleType) {
-      return true;
-    }
-    return types.isSubtype(s, t);
-  }
-
-  MapConstantValue createMap(
-      CommonElements commonElements,
-      InterfaceType sourceType,
-      List<ConstantValue> keys,
-      List<ConstantValue> values) {
-    bool onlyStringKeys = true;
-    ConstantValue protoValue = null;
-    for (int i = 0; i < keys.length; i++) {
-      dynamic key = keys[i];
-      if (key.isString) {
-        if (key.stringValue == JavaScriptMapConstant.PROTO_PROPERTY) {
-          protoValue = values[i];
-        }
-      } else {
-        onlyStringKeys = false;
-        // Don't handle __proto__ values specially in the general map case.
-        protoValue = null;
-        break;
-      }
-    }
-
-    bool hasProtoKey = (protoValue != null);
-    InterfaceType keysType;
-    if (sourceType.treatAsRaw) {
-      keysType = commonElements.listType();
-    } else {
-      keysType = commonElements.listType(sourceType.typeArguments.first);
-    }
-    ListConstantValue keysList = new ListConstantValue(keysType, keys);
-    InterfaceType type = commonElements.getConstantMapTypeFor(sourceType,
-        hasProtoKey: hasProtoKey, onlyStringKeys: onlyStringKeys);
-    return new JavaScriptMapConstant(
-        type, keysList, values, protoValue, onlyStringKeys);
-  }
-
-  @override
-  ConstantValue createSymbol(CommonElements commonElements, String text) {
-    InterfaceType type = commonElements.symbolImplementationType;
-    FieldEntity field = commonElements.symbolField;
-    ConstantValue argument = createString(text);
-    // TODO(johnniwinther): Use type arguments when all uses no longer expect
-    // a [FieldElement].
-    var fields = <FieldEntity, ConstantValue>{field: argument};
-    return new ConstructedConstantValue(type, fields);
-  }
-}
-
-class JavaScriptMapConstant extends MapConstantValue {
-  /// The [PROTO_PROPERTY] must not be used as normal property in any JavaScript
-  /// object. It would change the prototype chain.
-  static const String PROTO_PROPERTY = "__proto__";
-
-  /// The dart class implementing constant map literals.
-  static const String DART_CLASS = "ConstantMap";
-  static const String DART_STRING_CLASS = "ConstantStringMap";
-  static const String DART_PROTO_CLASS = "ConstantProtoMap";
-  static const String DART_GENERAL_CLASS = "GeneralConstantMap";
-  static const String LENGTH_NAME = "_length";
-  static const String JS_OBJECT_NAME = "_jsObject";
-  static const String KEYS_NAME = "_keys";
-  static const String PROTO_VALUE = "_protoValue";
-  static const String JS_DATA_NAME = "_jsData";
-
-  final ListConstantValue keyList;
-  final ConstantValue protoValue;
-  final bool onlyStringKeys;
-
-  JavaScriptMapConstant(InterfaceType type, ListConstantValue keyList,
-      List<ConstantValue> values, this.protoValue, this.onlyStringKeys)
-      : this.keyList = keyList,
-        super(type, keyList.entries, values);
-  bool get isMap => true;
-
-  List<ConstantValue> getDependencies() {
-    List<ConstantValue> result = <ConstantValue>[];
-    if (onlyStringKeys) {
-      result.add(keyList);
-    } else {
-      // Add the keys individually to avoid generating an unused list constant
-      // for the keys.
-      result.addAll(keys);
-    }
-    result.addAll(values);
-    return result;
-  }
-}
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 79a4453..16be5f2 100644
--- a/pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart
+++ b/pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import '../common_elements.dart';
-import '../constants/constant_system.dart';
+import '../constants/constant_system.dart' as constant_system;
 import '../constants/values.dart';
 import '../elements/entities.dart';
 import '../elements/types.dart';
@@ -81,16 +81,16 @@
 }
 
 class CustomElementsResolutionAnalysis extends CustomElementsAnalysisBase {
+  @override
   final CustomElementsAnalysisJoin join;
 
   CustomElementsResolutionAnalysis(
-      ConstantSystem constantSystem,
       ElementEnvironment elementEnvironment,
       CommonElements commonElements,
       NativeBasicData nativeData,
       BackendUsageBuilder backendUsageBuilder)
       : join = new CustomElementsAnalysisJoin(
-            constantSystem, elementEnvironment, commonElements, nativeData,
+            elementEnvironment, commonElements, nativeData,
             backendUsageBuilder: backendUsageBuilder),
         super(elementEnvironment, commonElements, nativeData) {
     // TODO(sra): Remove this work-around.  We should mark allClassesSelected in
@@ -118,15 +118,13 @@
 }
 
 class CustomElementsCodegenAnalysis extends CustomElementsAnalysisBase {
+  @override
   final CustomElementsAnalysisJoin join;
 
-  CustomElementsCodegenAnalysis(
-      ConstantSystem constantSystem,
-      CommonElements commonElements,
-      ElementEnvironment elementEnvironment,
-      NativeBasicData nativeData)
+  CustomElementsCodegenAnalysis(CommonElements commonElements,
+      ElementEnvironment elementEnvironment, NativeBasicData nativeData)
       : join = new CustomElementsAnalysisJoin(
-            constantSystem, elementEnvironment, commonElements, nativeData),
+            elementEnvironment, commonElements, nativeData),
         super(elementEnvironment, commonElements, nativeData) {
     // TODO(sra): Remove this work-around.  We should mark allClassesSelected in
     // both joins only when we see a construct generating an unknown [Type] but
@@ -149,7 +147,6 @@
 }
 
 class CustomElementsAnalysisJoin {
-  final ConstantSystem _constantSystem;
   final ElementEnvironment _elementEnvironment;
   final CommonElements _commonElements;
   final NativeBasicData _nativeData;
@@ -175,8 +172,8 @@
   // ClassesOutput: classes requiring metadata.
   final Set<ClassEntity> activeClasses = new Set<ClassEntity>();
 
-  CustomElementsAnalysisJoin(this._constantSystem, this._elementEnvironment,
-      this._commonElements, this._nativeData,
+  CustomElementsAnalysisJoin(
+      this._elementEnvironment, this._commonElements, this._nativeData,
       {BackendUsageBuilder backendUsageBuilder})
       : this._backendUsageBuilder = backendUsageBuilder,
         this.forResolution = backendUsageBuilder != null;
@@ -217,7 +214,7 @@
 
   TypeConstantValue _makeTypeConstant(ClassEntity cls) {
     DartType type = _elementEnvironment.getRawType(cls);
-    return _constantSystem.createType(_commonElements, type);
+    return constant_system.createType(_commonElements, type);
   }
 
   List<ConstructorEntity> computeEscapingConstructors(ClassEntity cls) {
diff --git a/pkg/compiler/lib/src/js_backend/enqueuer.dart b/pkg/compiler/lib/src/js_backend/enqueuer.dart
index 72910ae..9eb8195 100644
--- a/pkg/compiler/lib/src/js_backend/enqueuer.dart
+++ b/pkg/compiler/lib/src/js_backend/enqueuer.dart
@@ -37,8 +37,11 @@
   final CodegenWorldBuilderImpl _worldBuilder;
   final WorkItemBuilder _workItemBuilder;
 
+  @override
   bool queueIsClosed = false;
+  @override
   final CompilerTask task;
+  @override
   final EnqueuerListener listener;
   final CompilerOptions _options;
 
@@ -62,8 +65,10 @@
     _impactVisitor = new EnqueuerImplImpactVisitor(this);
   }
 
+  @override
   CodegenWorldBuilder get worldBuilder => _worldBuilder;
 
+  @override
   bool get queueIsEmpty => _queue.isEmpty;
 
   @override
@@ -74,6 +79,7 @@
   }
 
   /// Returns [:true:] if this enqueuer is the resolution enqueuer.
+  @override
   bool get isResolutionQueue => false;
 
   /// Create a [WorkItem] for [entity] and add it to the work list if it has not
@@ -92,6 +98,7 @@
     _queue.add(workItem);
   }
 
+  @override
   void applyImpact(WorldImpact worldImpact, {var impactSource}) {
     if (worldImpact.isEmpty) return;
     impactStrategy.visitImpact(
@@ -106,18 +113,21 @@
     });
   }
 
+  @override
   bool checkNoEnqueuedInvokedInstanceMethods(
       ElementEnvironment elementEnvironment) {
     return checkEnqueuerConsistency(elementEnvironment);
   }
 
+  @override
   void checkClass(ClassEntity cls) {
-    _worldBuilder.processClassMembers(cls, (MemberEntity member, useSet) {
+    _worldBuilder.processClassMembers(cls,
+        (MemberEntity member, EnumSet<MemberUse> useSet) {
       if (useSet.isNotEmpty) {
         failedAt(member,
             'Unenqueued use of $member: ${useSet.iterable(MemberUse.values)}');
       }
-    });
+    }, dryRun: true);
   }
 
   /// Callback for applying the use of a [cls].
@@ -148,12 +158,14 @@
     }
   }
 
+  @override
   void processDynamicUse(DynamicUse dynamicUse) {
     task.measure(() {
       _worldBuilder.registerDynamicUse(dynamicUse, _applyMemberUse);
     });
   }
 
+  @override
   void processStaticUse(StaticUse staticUse) {
     _worldBuilder.registerStaticUse(staticUse, _applyMemberUse);
     switch (staticUse.kind) {
@@ -171,6 +183,7 @@
     }
   }
 
+  @override
   void processTypeUse(TypeUse typeUse) {
     DartType type = typeUse.type;
     switch (typeUse.kind) {
@@ -210,9 +223,12 @@
       case TypeUseKind.TYPE_ARGUMENT:
         _worldBuilder.registerTypeArgument(type);
         break;
+      case TypeUseKind.CONST_INSTANTIATION:
+        failedAt(CURRENT_ELEMENT_SPANNABLE, "Unexpected type use: $typeUse.");
     }
   }
 
+  @override
   void processConstantUse(ConstantUse constantUse) {
     task.measure(() {
       if (_worldBuilder.registerConstantUse(constantUse)) {
@@ -252,6 +268,7 @@
         _queue.isNotEmpty || _recentClasses.isNotEmpty || _recentConstants);
   }
 
+  @override
   void forEach(void f(WorkItem work)) {
     _forEach(f);
     if (onEmptyForTesting != null) {
@@ -276,8 +293,10 @@
     listener.logSummary(log);
   }
 
+  @override
   String toString() => 'Enqueuer($name)';
 
+  @override
   ImpactUseCase get impactUse => IMPACT_USE;
 
   @override
diff --git a/pkg/compiler/lib/src/js_backend/field_analysis.dart b/pkg/compiler/lib/src/js_backend/field_analysis.dart
new file mode 100644
index 0000000..7349b4d
--- /dev/null
+++ b/pkg/compiler/lib/src/js_backend/field_analysis.dart
@@ -0,0 +1,633 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:kernel/ast.dart' as ir;
+
+import '../common.dart';
+import '../constants/values.dart';
+import '../elements/entities.dart';
+import '../elements/entity_utils.dart';
+import '../ir/scope_visitor.dart';
+import '../js_model/elements.dart' show JField;
+import '../js_model/js_world_builder.dart';
+import '../kernel/element_map.dart';
+import '../kernel/kernel_strategy.dart';
+import '../kernel/kelements.dart' show KClass, KField, KConstructor;
+import '../kernel/kernel_world.dart';
+import '../options.dart';
+import '../serialization/serialization.dart';
+import '../universe/member_usage.dart';
+
+/// AllocatorAnalysis
+///
+/// Analysis to determine features of the allocator functions. The allocator
+/// function takes parameters for each field initializer and initializes the
+/// fields.  Parameters may be omitted if the initializer is always the same
+/// constant value.  How the allocator is emitted will determine what kind of
+/// constants can be handled.  The initial implementation only permits `null`.
+
+// TODO(sra): Analysis to determine field order. Current field order is
+// essentially declaration order, subclass first. We can reorder fields so that
+// fields initialized with the same constant are together to allow chained
+// initialization. Fields of a class and superclass can be reordered to allow
+// chaining, e.g.
+//
+//     this.x = this.z = null;
+//
+class KFieldAnalysis {
+  final KernelToElementMap _elementMap;
+
+  final Map<KClass, ClassData> _classData = {};
+  final Map<KField, StaticFieldData> _staticFieldData = {};
+
+  KFieldAnalysis(KernelFrontEndStrategy kernelStrategy)
+      : _elementMap = kernelStrategy.elementMap;
+
+  // Register class during resolution. Use simple syntactic analysis to find
+  // null-initialized fields.
+  void registerInstantiatedClass(KClass class_) {
+    ir.Class classNode = _elementMap.getClassNode(class_);
+
+    List<KConstructor> constructors = [];
+    Map<KField, AllocatorData> fieldData = {};
+    for (ir.Field field in classNode.fields) {
+      if (!field.isInstanceMember) continue;
+
+      FieldEntity fieldElement = _elementMap.getField(field);
+      ir.Expression expression = field.initializer;
+      ConstantValue value = _elementMap.getConstantValue(expression,
+          requireConstant: false, implicitNull: true);
+      if (value != null && value.isConstant) {
+        fieldData[fieldElement] = new AllocatorData(value);
+      }
+    }
+
+    for (ir.Constructor constructor in classNode.constructors) {
+      KConstructor constructorElement = _elementMap.getConstructor(constructor);
+      constructors.add(constructorElement);
+      for (ir.Initializer initializer in constructor.initializers) {
+        if (initializer is ir.FieldInitializer) {
+          AllocatorData data =
+              fieldData[_elementMap.getField(initializer.field)];
+          if (data == null) {
+            // TODO(johnniwinther): Support initializers with side-effects?
+
+            // The field has a non-constant initializer.
+            continue;
+          }
+
+          Initializer initializerValue = const Initializer.complex();
+          ir.Expression value = initializer.value;
+          ConstantValue constantValue = _elementMap.getConstantValue(value,
+              requireConstant: false, implicitNull: true);
+          if (constantValue != null && constantValue.isConstant) {
+            initializerValue = new Initializer.direct(constantValue);
+          } else if (value is ir.VariableGet) {
+            ir.VariableDeclaration parameter = value.variable;
+            int position =
+                constructor.function.positionalParameters.indexOf(parameter);
+            if (position != -1) {
+              if (position >= constructor.function.requiredParameterCount) {
+                constantValue = _elementMap.getConstantValue(
+                    parameter.initializer,
+                    requireConstant: false,
+                    implicitNull: true);
+                if (constantValue != null && constantValue.isConstant) {
+                  initializerValue =
+                      new Initializer.positional(position, constantValue);
+                }
+              }
+            } else {
+              position =
+                  constructor.function.namedParameters.indexOf(parameter);
+              if (position != -1) {
+                constantValue = _elementMap.getConstantValue(
+                    parameter.initializer,
+                    requireConstant: false,
+                    implicitNull: true);
+                if (constantValue != null && constantValue.isConstant) {
+                  initializerValue =
+                      new Initializer.named(parameter.name, constantValue);
+                }
+              }
+            }
+          }
+          data.initializers[constructorElement] = initializerValue;
+        }
+      }
+    }
+    _classData[class_] = new ClassData(constructors, fieldData);
+  }
+
+  void registerStaticField(KField field, InitializerComplexity complexity) {
+    ir.Field node = _elementMap.getMemberNode(field);
+    ir.Expression expression = node.initializer;
+    ConstantValue value = _elementMap.getConstantValue(expression,
+        requireConstant: node.isConst, implicitNull: true);
+    if (value != null && !value.isConstant) {
+      value = null;
+    }
+    // TODO(johnniwinther): Remove evaluation of constant when [complexity]
+    // holds the constant literal from CFE.
+    _staticFieldData[field] = new StaticFieldData(value, complexity);
+  }
+
+  AllocatorData getAllocatorDataForTesting(KField field) {
+    return _classData[field.enclosingClass].fieldData[field];
+  }
+
+  StaticFieldData getStaticFieldDataForTesting(KField field) {
+    return _staticFieldData[field];
+  }
+}
+
+class ClassData {
+  final List<KConstructor> constructors;
+  final Map<KField, AllocatorData> fieldData;
+
+  ClassData(this.constructors, this.fieldData);
+}
+
+class StaticFieldData {
+  final ConstantValue initialValue;
+  final InitializerComplexity complexity;
+
+  StaticFieldData(this.initialValue, this.complexity);
+
+  bool get hasDependencies => complexity != null && complexity.fields != null;
+}
+
+class AllocatorData {
+  final ConstantValue initialValue;
+  final Map<KConstructor, Initializer> initializers = {};
+
+  AllocatorData(this.initialValue);
+
+  @override
+  String toString() =>
+      'AllocatorData(initialValue=${initialValue?.toStructuredText()},'
+      'initializers=$initializers)';
+}
+
+enum InitializerKind {
+  direct,
+  positional,
+  named,
+  complex,
+}
+
+class Initializer {
+  final InitializerKind kind;
+  final int index;
+  final String name;
+  final ConstantValue value;
+
+  Initializer.direct(this.value)
+      : kind = InitializerKind.direct,
+        index = null,
+        name = null;
+
+  Initializer.positional(this.index, this.value)
+      : kind = InitializerKind.positional,
+        name = null;
+
+  Initializer.named(this.name, this.value)
+      : kind = InitializerKind.named,
+        index = null;
+
+  const Initializer.complex()
+      : kind = InitializerKind.complex,
+        index = null,
+        name = null,
+        value = null;
+
+  String get shortText {
+    switch (kind) {
+      case InitializerKind.direct:
+        return value.toStructuredText();
+      case InitializerKind.positional:
+        return '$index:${value.toStructuredText()}';
+      case InitializerKind.named:
+        return '$name:${value.toStructuredText()}';
+      case InitializerKind.complex:
+        return '?';
+    }
+    throw new UnsupportedError('Unexpected kind $kind');
+  }
+
+  @override
+  String toString() => shortText;
+}
+
+class JFieldAnalysis {
+  /// Tag used for identifying serialized [JFieldAnalysis] objects in a
+  /// debugging data stream.
+  static const String tag = 'field-analysis';
+
+  // --csp and --fast-startup have different constraints to the generated code.
+
+  final Map<FieldEntity, FieldAnalysisData> _fieldData;
+
+  JFieldAnalysis._(this._fieldData);
+
+  /// Deserializes a [JFieldAnalysis] object from [source].
+  factory JFieldAnalysis.readFromDataSource(
+      DataSource source, CompilerOptions options) {
+    source.begin(tag);
+    Map<FieldEntity, FieldAnalysisData> fieldData = source
+        .readMemberMap(() => new FieldAnalysisData.fromDataSource(source));
+    source.end(tag);
+    return new JFieldAnalysis._(fieldData);
+  }
+
+  /// Serializes this [JFieldAnalysis] to [sink].
+  void writeToDataSink(DataSink sink) {
+    sink.begin(tag);
+    sink.writeMemberMap(
+        _fieldData, (FieldAnalysisData data) => data.writeToDataSink(sink));
+    sink.end(tag);
+  }
+
+  factory JFieldAnalysis.from(KClosedWorldImpl closedWorld, JsToFrontendMap map,
+      CompilerOptions options) {
+    Map<FieldEntity, FieldAnalysisData> fieldData = {};
+
+    bool canBeElided(FieldEntity field) {
+      return !closedWorld.annotationsData.hasNoElision(field) &&
+          !closedWorld.nativeData.isNativeMember(field);
+    }
+
+    closedWorld.fieldAnalysis._classData
+        .forEach((ClassEntity cls, ClassData classData) {
+      classData.fieldData.forEach((KField kField, AllocatorData data) {
+        JField jField = map.toBackendMember(kField);
+        if (jField == null) {
+          return;
+        }
+
+        // TODO(johnniwinther): Should elided static fields be removed from the
+        // J model? Static setters might still assign to them.
+
+        MemberUsage memberUsage = closedWorld.liveMemberUsage[kField];
+        if (!memberUsage.hasRead) {
+          if (canBeElided(kField)) {
+            fieldData[jField] = const FieldAnalysisData(isElided: true);
+          }
+        } else {
+          if (data.initialValue != null) {
+            ConstantValue initialValue;
+            bool isTooComplex = false;
+
+            void includeInitialValue(ConstantValue value) {
+              if (isTooComplex) return;
+              if (initialValue == null) {
+                initialValue = value;
+              } else if (initialValue != value) {
+                initialValue = null;
+                isTooComplex = true;
+              }
+            }
+
+            memberUsage.initialConstants.forEach(includeInitialValue);
+
+            bool inAllConstructors = true;
+            for (KConstructor constructor in classData.constructors) {
+              if (isTooComplex) {
+                break;
+              }
+
+              MemberUsage constructorUsage =
+                  closedWorld.liveMemberUsage[constructor];
+              if (constructorUsage == null) {
+                // This constructor isn't called.
+                continue;
+              }
+              ParameterStructure invokedParameters =
+                  closedWorld.annotationsData.hasNoElision(constructor)
+                      ? constructor.parameterStructure
+                      : constructorUsage.invokedParameters;
+
+              Initializer initializer = data.initializers[constructor];
+              if (initializer == null) {
+                inAllConstructors = false;
+              } else {
+                switch (initializer.kind) {
+                  case InitializerKind.direct:
+                    includeInitialValue(initializer.value);
+                    break;
+                  case InitializerKind.positional:
+                    if (initializer.index >=
+                        invokedParameters.positionalParameters) {
+                      includeInitialValue(initializer.value);
+                    } else {
+                      isTooComplex = true;
+                    }
+                    break;
+                  case InitializerKind.named:
+                    if (!invokedParameters.namedParameters
+                        .contains(initializer.name)) {
+                      includeInitialValue(initializer.value);
+                    } else {
+                      isTooComplex = true;
+                    }
+                    break;
+                  case InitializerKind.complex:
+                    isTooComplex = true;
+                    break;
+                }
+              }
+            }
+            if (!inAllConstructors) {
+              includeInitialValue(data.initialValue);
+            }
+            if (!isTooComplex && initialValue != null) {
+              ConstantValue value = map.toBackendConstant(initialValue);
+              bool isEffectivelyConstant = false;
+              bool isInitializedInAllocator = false;
+              assert(value != null);
+              if (!memberUsage.hasWrite && canBeElided(kField)) {
+                isEffectivelyConstant = true;
+              } else if (value.isNull ||
+                  value.isInt ||
+                  value.isBool ||
+                  value.isString) {
+                // TODO(johnniwinther,sra): Support non-primitive constants in
+                // allocators when it does cause allocators to deoptimized
+                // because of deferred loading.
+                isInitializedInAllocator = true;
+              }
+              fieldData[jField] = new FieldAnalysisData(
+                  initialValue: value,
+                  isEffectivelyFinal: isEffectivelyConstant,
+                  isElided: isEffectivelyConstant,
+                  isInitializedInAllocator: isInitializedInAllocator);
+            }
+          }
+        }
+      });
+    });
+
+    List<KField> independentFields = [];
+    List<KField> dependentFields = [];
+
+    closedWorld.liveMemberUsage
+        .forEach((MemberEntity member, MemberUsage memberUsage) {
+      if (member.isField && !member.isInstanceMember) {
+        StaticFieldData staticFieldData =
+            closedWorld.fieldAnalysis._staticFieldData[member];
+        if (staticFieldData.hasDependencies) {
+          dependentFields.add(member);
+        } else {
+          independentFields.add(member);
+        }
+      }
+    });
+
+    // Fields already processed.
+    Set<KField> processedFields = {};
+
+    // Fields currently being processed. Use for detecting cyclic dependencies.
+    Set<KField> currentFields = {};
+
+    // Index ascribed to eager fields that depend on other fields. This is
+    // used to sort the field in emission to ensure that used fields have been
+    // initialized when read.
+    int eagerCreationIndex = 0;
+
+    /// Computes the [FieldAnalysisData] for the JField corresponding to
+    /// [kField].
+    ///
+    /// If the data is currently been computed, that is, [kField] has a
+    /// cyclic dependency, `null` is returned.
+    FieldAnalysisData processField(KField kField) {
+      JField jField = map.toBackendMember(kField);
+      // TODO(johnniwinther): Can we assert that [jField] exists?
+      if (jField == null) return null;
+
+      FieldAnalysisData data = fieldData[jField];
+      if (processedFields.contains(kField)) {
+        // We only store data for non-trivial [FieldAnalysisData].
+        return data ?? const FieldAnalysisData();
+      }
+      if (currentFields.contains(kField)) {
+        // Cyclic dependency.
+        return null;
+      }
+      currentFields.add(kField);
+      MemberUsage memberUsage = closedWorld.liveMemberUsage[kField];
+      if (!memberUsage.hasRead && canBeElided(kField)) {
+        data = fieldData[jField] = const FieldAnalysisData(isElided: true);
+      } else {
+        bool isEffectivelyFinal = !memberUsage.hasWrite;
+        StaticFieldData staticFieldData =
+            closedWorld.fieldAnalysis._staticFieldData[kField];
+        ConstantValue value = map
+            .toBackendConstant(staticFieldData.initialValue, allowNull: true);
+
+        // If the field is effectively final with a constant initializer we
+        // elide the field, if allowed, because it is effectively constant.
+        bool isElided =
+            isEffectivelyFinal && value != null && canBeElided(kField);
+
+        bool isEager;
+
+        // If the field is eager and dependent on other eager fields,
+        // [eagerFieldDependencies] holds these fields and [creationIndex] is
+        // given the creation order index used to ensure that all dependencies
+        // have been assigned their values before this field is initialized.
+        //
+        // Since we only need the values of [eagerFieldDependencies] for testing
+        // and only the non-emptiness for determining the need for creation
+        // order indices, [eagerFieldDependencies] is non-null if the field has
+        // dependencies but only hold these when [retainDataForTesting] is
+        // `true`.
+        List<FieldEntity> eagerFieldDependencies;
+        int creationIndex = null;
+
+        if (isElided) {
+          // If the field is elided it needs no initializer and is therefore
+          // not eager.
+          isEager = false;
+        } else {
+          // If the field has a constant initializer we know it can be
+          // initialized eagerly.
+          //
+          // Ideally this should be the same as
+          // `staticFieldData.complexity.isConstant` but currently the constant
+          // evaluator handles cases that the analysis doesn't, so we use the
+          // better result.
+          isEager = value != null;
+          if (!isEager) {
+            // The field might be eager depending on the initializer complexity
+            // and its dependencies.
+            InitializerComplexity complexity = staticFieldData.complexity;
+            isEager = complexity?.isEager ?? false;
+            if (isEager && complexity.fields != null) {
+              for (ir.Field node in complexity.fields) {
+                KField otherField = closedWorld.elementMap.getField(node);
+                FieldAnalysisData otherData = processField(otherField);
+                if (otherData == null) {
+                  // Cyclic dependency on [otherField].
+                  isEager = false;
+                  break;
+                }
+                if (otherData.isLazy) {
+                  // [otherField] needs lazy initialization.
+                  isEager = false;
+                  break;
+                }
+                if (!otherData.isEffectivelyFinal) {
+                  // [otherField] might not hold its initial value when this field
+                  // is accessed the first time, so we need to initialize this
+                  // field lazily.
+                  isEager = false;
+                  break;
+                }
+                if (!otherData.isEffectivelyConstant) {
+                  eagerFieldDependencies ??= [];
+                  if (retainDataForTesting) {
+                    eagerFieldDependencies.add(map.toBackendMember(otherField));
+                  }
+                }
+              }
+            }
+          }
+
+          if (isEager && eagerFieldDependencies != null) {
+            creationIndex = eagerCreationIndex++;
+            if (!retainDataForTesting) {
+              eagerFieldDependencies = null;
+            }
+          } else {
+            eagerFieldDependencies = null;
+          }
+        }
+
+        data = fieldData[jField] = new FieldAnalysisData(
+            initialValue: value,
+            isEffectivelyFinal: isEffectivelyFinal,
+            isElided: isElided,
+            isEager: isEager,
+            eagerCreationIndex: creationIndex,
+            eagerFieldDependenciesForTesting: eagerFieldDependencies);
+      }
+
+      currentFields.remove(kField);
+      processedFields.add(kField);
+      return data;
+    }
+
+    // Process independent fields in no particular order. The emitter sorts
+    // these later.
+    independentFields.forEach(processField);
+
+    // Process dependent fields in declaration order to make ascribed creation
+    // indices stable. The emitter uses the creation indices for sorting
+    // dependent fields.
+    dependentFields.sort((KField a, KField b) {
+      int result =
+          compareLibrariesUris(a.library.canonicalUri, b.library.canonicalUri);
+      if (result != 0) return result;
+      ir.Location aLocation = closedWorld.elementMap.getMemberNode(a).location;
+      ir.Location bLocation = closedWorld.elementMap.getMemberNode(b).location;
+      result = compareSourceUris(aLocation.file, bLocation.file);
+      if (result != 0) return result;
+      result = aLocation.line.compareTo(bLocation.line);
+      if (result != 0) return result;
+      return aLocation.column.compareTo(bLocation.column);
+    });
+
+    dependentFields.forEach(processField);
+
+    return new JFieldAnalysis._(fieldData);
+  }
+
+  // TODO(sra): Add way to let injected fields be initialized to a constant in
+  // allocator.
+
+  FieldAnalysisData getFieldData(JField field) {
+    return _fieldData[field] ?? const FieldAnalysisData();
+  }
+}
+
+// TODO(johnniwinther): Merge this into [FieldData].
+class FieldAnalysisData {
+  static const String tag = 'field-analysis-data';
+
+  final ConstantValue initialValue;
+  final bool isInitializedInAllocator;
+  final bool isEffectivelyFinal;
+  final bool isElided;
+
+  /// If `true` the field is not effectively constant but the initializer can be
+  /// generated eagerly without the need for lazy initialization wrapper.
+  final bool isEager;
+
+  /// Index ascribed to eager fields that depend on other fields. This is
+  /// used to sort the field in emission to ensure that used fields have been
+  /// initialized when read.
+  final int eagerCreationIndex;
+
+  final List<FieldEntity> eagerFieldDependenciesForTesting;
+
+  const FieldAnalysisData(
+      {this.initialValue,
+      this.isInitializedInAllocator: false,
+      this.isEffectivelyFinal: false,
+      this.isElided: false,
+      this.isEager: false,
+      this.eagerCreationIndex: null,
+      this.eagerFieldDependenciesForTesting: null});
+
+  factory FieldAnalysisData.fromDataSource(DataSource source) {
+    source.begin(tag);
+
+    ConstantValue initialValue = source.readConstantOrNull();
+    bool isInitializedInAllocator = source.readBool();
+    bool isEffectivelyFinal = source.readBool();
+    bool isElided = source.readBool();
+    bool isEager = source.readBool();
+    int eagerCreationIndex = source.readIntOrNull();
+    List<FieldEntity> eagerFieldDependencies =
+        source.readMembers<FieldEntity>(emptyAsNull: true);
+    source.end(tag);
+    return new FieldAnalysisData(
+        initialValue: initialValue,
+        isInitializedInAllocator: isInitializedInAllocator,
+        isEffectivelyFinal: isEffectivelyFinal,
+        isElided: isElided,
+        isEager: isEager,
+        eagerCreationIndex: eagerCreationIndex,
+        eagerFieldDependenciesForTesting: eagerFieldDependencies);
+  }
+
+  void writeToDataSink(DataSink sink) {
+    sink.begin(tag);
+    sink.writeConstantOrNull(initialValue);
+    sink.writeBool(isInitializedInAllocator);
+    sink.writeBool(isEffectivelyFinal);
+    sink.writeBool(isElided);
+    sink.writeBool(isEager);
+    sink.writeIntOrNull(eagerCreationIndex);
+    sink.writeMembers(eagerFieldDependenciesForTesting, allowNull: true);
+    sink.end(tag);
+  }
+
+  /// If `true` the initializer for this field requires a lazy initialization
+  /// wrapper.
+  bool get isLazy => initialValue == null && !isEager;
+
+  bool get isEffectivelyConstant =>
+      isEffectivelyFinal && isElided && initialValue != null;
+
+  ConstantValue get constantValue => isEffectivelyFinal ? initialValue : null;
+
+  @override
+  String toString() =>
+      'FieldAnalysisData(initialValue=${initialValue?.toStructuredText()},'
+      'isInitializedInAllocator=$isInitializedInAllocator,'
+      'isEffectivelyFinal=$isEffectivelyFinal,isElided=$isElided,'
+      'isEager=$isEager,eagerCreationIndex=$eagerCreationIndex,'
+      'eagerFieldDependencies=$eagerFieldDependenciesForTesting)';
+}
diff --git a/pkg/compiler/lib/src/js_backend/field_naming_mixin.dart b/pkg/compiler/lib/src/js_backend/field_naming_mixin.dart
index 828dd25..a0fb0b3 100644
--- a/pkg/compiler/lib/src/js_backend/field_naming_mixin.dart
+++ b/pkg/compiler/lib/src/js_backend/field_naming_mixin.dart
@@ -189,7 +189,9 @@
 /// as a separator between method names and argument counts and does not appear
 /// in generated names themselves.
 class _MixinFieldNamingScope extends _FieldNamingScope {
+  @override
   int get _localFieldNameCounter => registry.globalCount;
+  @override
   void set _localFieldNameCounter(int val) {
     registry.globalCount = val;
   }
@@ -204,6 +206,7 @@
       _FieldNamingScope superScope, _FieldNamingRegistry registry)
       : super.inherit(container, superScope, registry);
 
+  @override
   jsAst.Name _nextName() {
     jsAst.Name proposed = super._nextName();
     return new CompoundName([proposed, Namer._literalDollar]);
@@ -221,6 +224,7 @@
   @override
   bool containsField(_) => true;
 
+  @override
   jsAst.Name operator [](Entity field) {
     if (!names.containsKey(field)) add(field);
     return names[field];
diff --git a/pkg/compiler/lib/src/js_backend/frequency_namer.dart b/pkg/compiler/lib/src/js_backend/frequency_namer.dart
index 781d1ef..36ff852 100644
--- a/pkg/compiler/lib/src/js_backend/frequency_namer.dart
+++ b/pkg/compiler/lib/src/js_backend/frequency_namer.dart
@@ -7,6 +7,7 @@
 class FrequencyBasedNamer extends Namer
     with _MinifiedFieldNamer, _MinifiedOneShotInterceptorNamer
     implements jsAst.TokenFinalizer {
+  @override
   _FieldNamingRegistry fieldRegistry;
   List<TokenName> tokens = new List<TokenName>();
 
@@ -14,21 +15,35 @@
       new Maplet<NamingScope, TokenScope>();
 
   // Some basic settings for smaller names
+  @override
   String get isolateName => 'I';
+  @override
   String get isolatePropertiesName => 'p';
+  @override
   bool get shouldMinify => true;
 
+  @override
   final String getterPrefix = 'g';
+  @override
   final String setterPrefix = 's';
+  @override
   final String callPrefix = ''; // this will create function names $<n>
+  @override
   String get operatorIsPrefix => r'$i';
+  @override
   String get operatorAsPrefix => r'$a';
+  @override
   String get callCatchAllName => r'$C';
+  @override
   String get requiredParameterField => r'$R';
+  @override
   String get defaultValuesField => r'$D';
+  @override
   String get operatorSignature => r'$S';
+  @override
   String get genericInstantiationPrefix => r'$I';
 
+  @override
   jsAst.Name get staticsPropertyName =>
       _staticsPropertyName ??= getFreshName(instanceScope, 'static');
 
diff --git a/pkg/compiler/lib/src/js_backend/impact_transformer.dart b/pkg/compiler/lib/src/js_backend/impact_transformer.dart
index 9a04642..5536b96 100644
--- a/pkg/compiler/lib/src/js_backend/impact_transformer.dart
+++ b/pkg/compiler/lib/src/js_backend/impact_transformer.dart
@@ -154,6 +154,7 @@
       DartType type = typeUse.type;
       switch (typeUse.kind) {
         case TypeUseKind.INSTANTIATION:
+        case TypeUseKind.CONST_INSTANTIATION:
         case TypeUseKind.NATIVE_INSTANTIATION:
           break;
         case TypeUseKind.IS_CHECK:
@@ -225,6 +226,15 @@
       }
     }
 
+    for (SetLiteralUse setLiteralUse in worldImpact.setLiterals) {
+      if (setLiteralUse.isConstant) {
+        registerImpact(_impacts.constantSetLiteral);
+      } else {
+        transformed
+            .registerTypeUse(new TypeUse.instantiation(setLiteralUse.type));
+      }
+    }
+
     for (ListLiteralUse listLiteralUse in worldImpact.listLiterals) {
       // TODO(johnniwinther): Use the [isConstant] and [isEmpty] property when
       // factory constructors are registered directly.
diff --git a/pkg/compiler/lib/src/js_backend/inferred_data.dart b/pkg/compiler/lib/src/js_backend/inferred_data.dart
index ad5be30..be9b3dc 100644
--- a/pkg/compiler/lib/src/js_backend/inferred_data.dart
+++ b/pkg/compiler/lib/src/js_backend/inferred_data.dart
@@ -121,6 +121,7 @@
         functionsThatMightBePassedToApply);
   }
 
+  @override
   void writeToDataSink(DataSink sink) {
     sink.writeBool(false); // Is _not_ trivial.
     sink.begin(tag);
@@ -235,6 +236,7 @@
   }
 
   /// Compute [SideEffects] for all registered [SideEffectBuilder]s.
+  @override
   InferredData close(JClosedWorld closedWorld) {
     assert(_sideEffectsBuilders != null,
         "Inferred data has already been computed.");
diff --git a/pkg/compiler/lib/src/js_backend/interceptor_data.dart b/pkg/compiler/lib/src/js_backend/interceptor_data.dart
index 06c66ae..1d604c9 100644
--- a/pkg/compiler/lib/src/js_backend/interceptor_data.dart
+++ b/pkg/compiler/lib/src/js_backend/interceptor_data.dart
@@ -35,8 +35,16 @@
   bool fieldHasInterceptedSetter(FieldEntity element);
   bool isInterceptedName(String name);
   bool isInterceptedSelector(Selector selector);
+
+  /// Returns `true` iff [selector] matches an element defined in a class mixed
+  /// into an intercepted class.
+  ///
+  /// These selectors are not eligible for the 'dummy explicit receiver'
+  /// optimization.
   bool isInterceptedMixinSelector(
       Selector selector, AbstractValue mask, JClosedWorld closedWorld);
+
+  /// Set of classes whose methods are intercepted.
   Iterable<ClassEntity> get interceptedClasses;
   bool isMixedIntoInterceptedClass(ClassEntity element);
 
@@ -71,7 +79,7 @@
   /// know whether a send must be intercepted or not.
   final Map<String, Set<MemberEntity>> interceptedMembers;
 
-  /// Set of classes whose methods are intercepted.
+  @override
   final Set<ClassEntity> interceptedClasses;
 
   /// Set of classes used as mixins on intercepted (native and primitive)
@@ -125,6 +133,7 @@
         classesMixedIntoInterceptedClasses);
   }
 
+  @override
   void writeToDataSink(DataSink sink) {
     sink.begin(tag);
     sink.writeInt(interceptedMembers.length);
@@ -137,6 +146,7 @@
     sink.end(tag);
   }
 
+  @override
   bool isInterceptedMethod(MemberEntity element) {
     if (!element.isInstanceMember) return false;
     // TODO(johnniwinther): Avoid this hack.
@@ -146,25 +156,27 @@
     return interceptedMembers[element.name] != null;
   }
 
+  @override
   bool fieldHasInterceptedGetter(FieldEntity element) {
     return interceptedMembers[element.name] != null;
   }
 
+  @override
   bool fieldHasInterceptedSetter(FieldEntity element) {
     return interceptedMembers[element.name] != null;
   }
 
+  @override
   bool isInterceptedName(String name) {
     return interceptedMembers[name] != null;
   }
 
+  @override
   bool isInterceptedSelector(Selector selector) {
     return interceptedMembers[selector.name] != null;
   }
 
-  /// Returns `true` iff [selector] matches an element defined in a class mixed
-  /// into an intercepted class.  These selectors are not eligible for the
-  /// 'dummy explicit receiver' optimization.
+  @override
   bool isInterceptedMixinSelector(
       Selector selector, AbstractValue mask, JClosedWorld closedWorld) {
     Set<MemberEntity> elements =
@@ -203,6 +215,7 @@
   /// Returns a set of interceptor classes that contain a member named [name]
   ///
   /// Returns an empty set if there is no class. Do not modify the returned set.
+  @override
   Set<ClassEntity> getInterceptedClassesOn(
       String name, JClosedWorld closedWorld) {
     Set<MemberEntity> intercepted = interceptedMembers[name];
@@ -244,6 +257,7 @@
     return result;
   }
 
+  @override
   bool isInterceptedClass(ClassEntity element) {
     if (element == null) return false;
     if (_nativeData.isNativeOrExtendsNative(element)) return true;
@@ -252,9 +266,11 @@
     return false;
   }
 
+  @override
   bool isMixedIntoInterceptedClass(ClassEntity element) =>
       classesMixedIntoInterceptedClasses.contains(element);
 
+  @override
   bool mayGenerateInstanceofCheck(DartType type, JClosedWorld closedWorld) {
     // We can use an instanceof check for raw types that have no subclass that
     // is mixed-in or in an implements clause.
@@ -291,6 +307,7 @@
   InterceptorDataBuilderImpl(
       this._nativeData, this._elementEnvironment, this._commonElements);
 
+  @override
   InterceptorData close() {
     return new InterceptorDataImpl(
         _nativeData,
@@ -300,6 +317,7 @@
         _classesMixedIntoInterceptedClasses);
   }
 
+  @override
   void addInterceptorsForNativeClassMembers(ClassEntity cls) {
     _elementEnvironment.forEachClassMember(cls,
         (ClassEntity cls, MemberEntity member) {
@@ -317,6 +335,7 @@
     });
   }
 
+  @override
   void addInterceptors(ClassEntity cls) {
     if (_interceptedClasses.add(cls)) {
       _elementEnvironment.forEachClassMember(cls,
diff --git a/pkg/compiler/lib/src/js_backend/minify_namer.dart b/pkg/compiler/lib/src/js_backend/minify_namer.dart
index 2d772ff..3179a2f 100644
--- a/pkg/compiler/lib/src/js_backend/minify_namer.dart
+++ b/pkg/compiler/lib/src/js_backend/minify_namer.dart
@@ -16,21 +16,35 @@
     fieldRegistry = new _FieldNamingRegistry(this);
   }
 
+  @override
   _FieldNamingRegistry fieldRegistry;
 
+  @override
   String get isolateName => 'I';
+  @override
   String get isolatePropertiesName => 'p';
+  @override
   bool get shouldMinify => true;
 
+  @override
   final String getterPrefix = 'g';
+  @override
   final String setterPrefix = 's';
+  @override
   final String callPrefix = ''; // this will create function names $<n>
+  @override
   String get operatorIsPrefix => r'$i';
+  @override
   String get operatorAsPrefix => r'$a';
+  @override
   String get callCatchAllName => r'$C';
+  @override
   String get requiredParameterField => r'$R';
+  @override
   String get defaultValuesField => r'$D';
+  @override
   String get operatorSignature => r'$S';
+  @override
   String get genericInstantiationPrefix => r'$I';
 
   final ALPHABET_CHARACTERS = 52; // a-zA-Z.
diff --git a/pkg/compiler/lib/src/js_backend/namer.dart b/pkg/compiler/lib/src/js_backend/namer.dart
index 51674ab..0648b9c 100644
--- a/pkg/compiler/lib/src/js_backend/namer.dart
+++ b/pkg/compiler/lib/src/js_backend/namer.dart
@@ -14,6 +14,7 @@
 import '../closure.dart';
 import '../common.dart';
 import '../common/names.dart' show Identifiers, Names, Selectors;
+import '../constants/constant_system.dart' as constant_system;
 import '../constants/values.dart';
 import '../common_elements.dart' show CommonElements, ElementEnvironment;
 import '../diagnostics/invariant.dart' show DEBUG_MODE;
@@ -31,7 +32,6 @@
 import '../util/util.dart';
 import '../world.dart' show JClosedWorld;
 import 'backend.dart';
-import 'constant_system_javascript.dart';
 import 'native_data.dart';
 import 'runtime_types.dart';
 
@@ -574,7 +574,7 @@
   }
 
   /// Used to disambiguate names for constants in [constantName].
-  final NamingScope constantScope = new NamingScope();
+  final NamingScope _constantScope = new NamingScope();
 
   /// Used to store scopes for instances of [PrivatelyNamedJsEntity]
   final Map<Entity, NamingScope> _privateNamingScopes = {};
@@ -583,8 +583,8 @@
 
   final Map<LibraryEntity, String> libraryLongNames = HashMap();
 
-  final Map<ConstantValue, jsAst.Name> constantNames = HashMap();
-  final Map<ConstantValue, String> constantLongNames = {};
+  final Map<ConstantValue, jsAst.Name> _constantNames = HashMap();
+  final Map<ConstantValue, String> _constantLongNames = {};
   ConstantCanonicalHasher _constantHasher;
 
   /// Maps private names to a library that may use that name without prefixing
@@ -718,25 +718,25 @@
     // function constants since the function-implementation itself serves as
     // constant and can be accessed directly.
     assert(!constant.isFunction);
-    jsAst.Name result = constantNames[constant];
+    jsAst.Name result = _constantNames[constant];
     if (result == null) {
       String longName = constantLongName(constant);
-      result = getFreshName(constantScope, longName);
-      constantNames[constant] = result;
+      result = getFreshName(_constantScope, longName);
+      _constantNames[constant] = result;
     }
     return _newReference(result);
   }
 
   /// Proposed name for [constant].
   String constantLongName(ConstantValue constant) {
-    String longName = constantLongNames[constant];
+    String longName = _constantLongNames[constant];
     if (longName == null) {
       _constantHasher ??=
           new ConstantCanonicalHasher(rtiEncoder, _codegenWorldBuilder);
       longName = new ConstantNamingVisitor(
               rtiEncoder, _codegenWorldBuilder, _constantHasher)
           .getName(constant);
-      constantLongNames[constant] = longName;
+      _constantLongNames[constant] = longName;
     }
     return longName;
   }
@@ -816,7 +816,10 @@
     FunctionEntity function = method.function;
     return _disambiguateInternalMember(method, () {
       String invocationName = operatorNameToIdentifier(function.name);
-      return '${invocationName}\$body\$${method.enclosingClass.name}';
+      // TODO(sra): If the generator is for a closure's 'call' method, we don't
+      // need to incorporate the enclosing class.
+      String className = method.enclosingClass.name.replaceAll('&', '_');
+      return '${invocationName}\$body\$${className}';
     });
   }
 
@@ -1968,7 +1971,18 @@
   }
 
   @override
-  void visitMap(covariant JavaScriptMapConstant constant, [_]) {
+  void visitSet(SetConstantValue constant, [_]) {
+    // TODO(9476): Incorporate type parameters into name.
+    addRoot('Set');
+    if (constant.length == 0) {
+      add('empty');
+    } else {
+      add(getHashTag(constant, 5));
+    }
+  }
+
+  @override
+  void visitMap(covariant constant_system.JavaScriptMapConstant constant, [_]) {
     // TODO(9476): Incorporate type parameters into name.
     addRoot('Map');
     if (constant.length == 0) {
@@ -2139,6 +2153,11 @@
   }
 
   @override
+  int visitSet(SetConstantValue constant, [_]) {
+    return _hashList(constant.length, constant.values);
+  }
+
+  @override
   int visitMap(MapConstantValue constant, [_]) {
     int hash = _hashList(constant.length, constant.keys);
     return _hashList(hash, constant.values);
@@ -2272,24 +2291,30 @@
     return sb.toString();
   }
 
+  @override
   visit(DartType type, [_]) {
     type.accept(this, null);
   }
 
+  @override
   visitType(DartType type, _) {}
 
+  @override
   visitInterfaceType(InterfaceType type, _) {
     sb.write(type.element.name);
   }
 
+  @override
   visitTypedefType(TypedefType type, _) {
     sb.write(type.element.name);
   }
 
+  @override
   visitTypeVariableType(TypeVariableType type, _) {
     sb.write(type.element.name);
   }
 
+  @override
   visitFunctionType(FunctionType type, _) {
     if (rtiEncoder.isSimpleFunctionType(type)) {
       sb.write('args${type.parameterTypes.length}');
diff --git a/pkg/compiler/lib/src/js_backend/namer_names.dart b/pkg/compiler/lib/src/js_backend/namer_names.dart
index 9f351e3..db0819d 100644
--- a/pkg/compiler/lib/src/js_backend/namer_names.dart
+++ b/pkg/compiler/lib/src/js_backend/namer_names.dart
@@ -9,6 +9,7 @@
   int get _kind;
   _NamerName get _target => this;
 
+  @override
   String toString() {
     if (DEBUG_MODE) {
       return 'Name($key)';
@@ -21,21 +22,27 @@
 
 // ignore: STRONG_MODE_INVALID_METHOD_OVERRIDE_FROM_BASE
 class StringBackedName extends _NamerName {
+  @override
   final String name;
+  @override
   int get _kind => _NamerNameKinds.StringBacked.index;
 
   StringBackedName(this.name);
 
+  @override
   String get key => name;
 
+  @override
   operator ==(other) {
     if (other is _NameReference) other = other._target;
     if (identical(this, other)) return true;
     return (other is StringBackedName) && other.name == name;
   }
 
+  @override
   int get hashCode => name.hashCode;
 
+  @override
   int compareTo(covariant _NamerName other) {
     other = other._target;
     if (other._kind != _kind) return other._kind - _kind;
@@ -47,16 +54,21 @@
 abstract class _PrefixedName extends _NamerName implements jsAst.AstContainer {
   final jsAst.Name prefix;
   final jsAst.Name base;
+  @override
   int get _kind;
 
+  @override
   Iterable<jsAst.Node> get containedNodes => [prefix, base];
 
   _PrefixedName(this.prefix, this.base);
 
+  @override
   String get name => prefix.name + base.name;
 
+  @override
   String get key => prefix.key + base.key;
 
+  @override
   bool operator ==(other) {
     if (other is _NameReference) other = other._target;
     if (identical(this, other)) return true;
@@ -64,8 +76,10 @@
     return other.base == base && other.prefix == prefix;
   }
 
+  @override
   int get hashCode => base.hashCode * 13 + prefix.hashCode;
 
+  @override
   int compareTo(covariant _NamerName other) {
     other = other._target;
     if (other._kind != _kind) return other._kind - _kind;
@@ -83,6 +97,7 @@
 
 // ignore: STRONG_MODE_INVALID_METHOD_OVERRIDE_FROM_BASE
 class GetterName extends _PrefixedName {
+  @override
   int get _kind => _NamerNameKinds.Getter.index;
 
   GetterName(jsAst.Name prefix, jsAst.Name base) : super(prefix, base);
@@ -90,6 +105,7 @@
 
 // ignore: STRONG_MODE_INVALID_METHOD_OVERRIDE_FROM_BASE
 class SetterName extends _PrefixedName {
+  @override
   int get _kind => _NamerNameKinds.Setter.index;
 
   SetterName(jsAst.Name prefix, jsAst.Name base) : super(prefix, base);
@@ -97,6 +113,7 @@
 
 // ignore: STRONG_MODE_INVALID_METHOD_OVERRIDE_FROM_BASE
 class _AsyncName extends _PrefixedName {
+  @override
   int get _kind => _NamerNameKinds.Async.index;
 
   _AsyncName(jsAst.Name prefix, jsAst.Name base) : super(prefix, base);
@@ -108,14 +125,17 @@
 // ignore: STRONG_MODE_INVALID_METHOD_OVERRIDE_FROM_BASE
 class CompoundName extends _NamerName implements jsAst.AstContainer {
   final List<_NamerName> _parts;
+  @override
   int get _kind => _NamerNameKinds.Compound.index;
   String _cachedName;
   int _cachedHashCode = -1;
 
+  @override
   Iterable<jsAst.Node> get containedNodes => _parts;
 
   CompoundName(this._parts);
 
+  @override
   String get name {
     if (_cachedName == null) {
       _cachedName = _parts.map((jsAst.Name name) => name.name).join();
@@ -123,8 +143,10 @@
     return _cachedName;
   }
 
+  @override
   String get key => _parts.map((_NamerName name) => name.key).join();
 
+  @override
   bool operator ==(other) {
     if (other is _NameReference) other = other._target;
     if (identical(this, other)) return true;
@@ -136,6 +158,7 @@
     return true;
   }
 
+  @override
   int get hashCode {
     if (_cachedHashCode < 0) {
       _cachedHashCode = 0;
@@ -146,6 +169,7 @@
     return _cachedHashCode;
   }
 
+  @override
   int compareTo(covariant _NamerName other) {
     other = other._target;
     if (other._kind != _kind) return other._kind - _kind;
@@ -163,8 +187,10 @@
 
 // ignore: STRONG_MODE_INVALID_METHOD_OVERRIDE_FROM_BASE
 class TokenName extends _NamerName implements jsAst.ReferenceCountedAstNode {
+  @override
   int get _kind => _NamerNameKinds.Token.index;
   String _name;
+  @override
   final String key;
   final TokenScope _scope;
   int _rc = 0;
@@ -173,6 +199,7 @@
 
   bool get isFinalized => _name != null;
 
+  @override
   String get name {
     assert(isFinalized);
     return _name;
@@ -186,6 +213,7 @@
     return key.compareTo(otherToken.key);
   }
 
+  @override
   markSeen(jsAst.TokenCounter counter) => _rc++;
 
   @override
@@ -209,15 +237,20 @@
 
 // ignore: STRONG_MODE_INVALID_METHOD_OVERRIDE_FROM_BASE
 class _NameReference extends _NamerName implements jsAst.AstContainer {
+  @override
   _NamerName _target;
 
+  @override
   int get _kind => _target._kind;
+  @override
   String get key => _target.key;
 
+  @override
   Iterable<jsAst.Node> get containedNodes => [_target];
 
   _NameReference(this._target);
 
+  @override
   String get name => _target.name;
 
   @override
diff --git a/pkg/compiler/lib/src/js_backend/native_data.dart b/pkg/compiler/lib/src/js_backend/native_data.dart
index a491286..3342b54 100644
--- a/pkg/compiler/lib/src/js_backend/native_data.dart
+++ b/pkg/compiler/lib/src/js_backend/native_data.dart
@@ -4,9 +4,13 @@
 
 library js_backend.native_data;
 
+import 'package:kernel/ast.dart' as ir;
+
 import '../common.dart';
 import '../common_elements.dart' show ElementEnvironment;
 import '../elements/entities.dart';
+import '../ir/annotations.dart';
+import '../kernel/element_map.dart';
 import '../native/behavior.dart' show NativeBehavior;
 import '../serialization/serialization.dart';
 import '../util/util.dart';
@@ -63,6 +67,7 @@
       NativeDataImpl.readFromDataSource;
 
   /// Serializes this [NativeData] to [sink].
+  @override
   void writeToDataSink(DataSink sink);
 
   /// Returns `true` if [element] corresponds to a native JavaScript member.
@@ -96,7 +101,7 @@
   /// JavaScript names for the library and/or the enclosing class.
   String getFixedBackendMethodPath(FunctionEntity element);
 
-  /// Returns `true` if [element] is a JsInterop method.
+  @override
   bool isJsInteropMember(MemberEntity element);
 
   /// Returns the explicit js interop name for library [element].
@@ -158,26 +163,11 @@
   /// Registers the [behavior] for writing to the native [field].
   void setNativeFieldStoreBehavior(FieldEntity field, NativeBehavior behavior);
 
-  /// Marks [element] as an explicit part of JsInterop. The js interop name is
-  /// expected to be computed later.
-  void markAsJsInteropMember(MemberEntity element);
-
-  /// Sets the native [name] for the member [element]. This name is used for
-  /// [element] in the generated JavaScript.
+  /// Sets the native [name] for the member [element].
+  ///
+  /// This name is used for [element] in the generated JavaScript.
   void setNativeMemberName(MemberEntity element, String name);
 
-  /// Sets the explicit js interop [name] for the library [element].
-  void setJsInteropLibraryName(LibraryEntity element, String name);
-
-  /// Marks [element] as having an `@Anonymous` annotation.
-  void markJsInteropClassAsAnonymous(ClassEntity element);
-
-  /// Sets the explicit js interop [name] for the class [element].
-  void setJsInteropClassName(ClassEntity element, String name);
-
-  /// Sets the explicit js interop [name] for the member [element].
-  void setJsInteropMemberName(MemberEntity element, String name);
-
   /// Closes this builder and creates the resulting [NativeData] object.
   NativeData close();
 }
@@ -202,11 +192,7 @@
   /// The JavaScript members implemented via typed JavaScript interop.
   Map<MemberEntity, String> jsInteropMembers = <MemberEntity, String>{};
 
-  /// Sets the native tag info for [cls].
-  ///
-  /// The tag info string contains comma-separated 'words' which are either
-  /// dispatch tags (having JavaScript identifier syntax) and directives that
-  /// begin with `!`.
+  @override
   void setNativeClassTagInfo(ClassEntity cls, String tagText) {
     assert(
         !_closed,
@@ -267,6 +253,7 @@
     jsInteropMembers[element] = name;
   }
 
+  @override
   NativeBasicData close(ElementEnvironment environment) {
     _closed = true;
     return new NativeBasicDataImpl(
@@ -314,6 +301,38 @@
       this.anonymousJsInteropClasses,
       this.jsInteropMembers);
 
+  factory NativeBasicDataImpl.fromIr(
+      KernelToElementMap map, IrAnnotationData data) {
+    ElementEnvironment env = map.elementEnvironment;
+    Map<ClassEntity, NativeClassTag> nativeClassTagInfo = {};
+    Map<LibraryEntity, String> jsInteropLibraries = {};
+    Map<ClassEntity, String> jsInteropClasses = {};
+    Set<ClassEntity> anonymousJsInteropClasses = {};
+    Map<MemberEntity, String> jsInteropMembers = {};
+
+    data.forEachNativeClass((ir.Class node, String text) {
+      nativeClassTagInfo[map.getClass(node)] = new NativeClassTag(text);
+    });
+    data.forEachJsInteropLibrary((ir.Library node, String name) {
+      jsInteropLibraries[env.lookupLibrary(node.importUri, required: true)] =
+          name;
+    });
+    data.forEachJsInteropClass((ir.Class node, String name,
+        {bool isAnonymous}) {
+      ClassEntity cls = map.getClass(node);
+      jsInteropClasses[cls] = name;
+      if (isAnonymous) {
+        anonymousJsInteropClasses.add(cls);
+      }
+    });
+    data.forEachJsInteropMember((ir.Member node, String name) {
+      jsInteropMembers[map.getMember(node)] = name;
+    });
+
+    return new NativeBasicDataImpl(env, nativeClassTagInfo, jsInteropLibraries,
+        jsInteropClasses, anonymousJsInteropClasses, jsInteropMembers);
+  }
+
   factory NativeBasicDataImpl.readFromDataSource(
       DataSource source, ElementEnvironment elementEnvironment) {
     source.begin(tag);
@@ -340,6 +359,7 @@
         jsInteropMembers);
   }
 
+  @override
   void writeToDataSink(DataSink sink) {
     sink.begin(tag);
     sink.writeClassMap(nativeClassTagInfo, (NativeClassTag tag) {
@@ -383,6 +403,7 @@
     return jsInteropClasses.containsKey(element);
   }
 
+  /// Returns `true` if [element] is explicitly marked as part of JsInterop.
   bool _isJsInteropMember(MemberEntity element) {
     return jsInteropMembers.containsKey(element);
   }
@@ -438,29 +459,9 @@
   Map<MemberEntity, NativeBehavior> nativeFieldStoreBehavior =
       <FieldEntity, NativeBehavior>{};
 
-  /// The JavaScript names for libraries implemented via typed JavaScript
-  /// interop.
-  final Map<LibraryEntity, String> jsInteropLibraries;
+  NativeDataBuilderImpl(this._nativeBasicData);
 
-  /// JavaScript interop classes annotated with `@anonymous`
-  final Set<ClassEntity> anonymousJsInteropClasses;
-
-  /// The JavaScript names for classes implemented via typed JavaScript
-  /// interop.
-  final Map<ClassEntity, String> jsInteropClasses;
-
-  /// The JavaScript names for members implemented via typed JavaScript
-  /// interop.
-  final Map<MemberEntity, String> jsInteropMembers;
-
-  NativeDataBuilderImpl(this._nativeBasicData)
-      : jsInteropLibraries = _nativeBasicData.jsInteropLibraries,
-        jsInteropClasses = _nativeBasicData.jsInteropClasses,
-        anonymousJsInteropClasses = _nativeBasicData.anonymousJsInteropClasses,
-        jsInteropMembers = _nativeBasicData.jsInteropMembers;
-
-  /// Sets the native [name] for the member [element]. This name is used for
-  /// [element] in the generated JavaScript.
+  @override
   void setNativeMemberName(MemberEntity element, String name) {
     // TODO(johnniwinther): Avoid setting this more than once. The enqueuer
     // might enqueue [element] several times (before processing it) and computes
@@ -475,69 +476,24 @@
     nativeMemberName[element] = name;
   }
 
-  /// Registers the [behavior] for calling the native [method].
+  @override
   void setNativeMethodBehavior(FunctionEntity method, NativeBehavior behavior) {
     nativeMethodBehavior[method] = behavior;
   }
 
-  /// Registers the [behavior] for reading from the native [field].
+  @override
   void setNativeFieldLoadBehavior(FieldEntity field, NativeBehavior behavior) {
     nativeFieldLoadBehavior[field] = behavior;
   }
 
-  /// Registers the [behavior] for writing to the native [field].
+  @override
   void setNativeFieldStoreBehavior(FieldEntity field, NativeBehavior behavior) {
     nativeFieldStoreBehavior[field] = behavior;
   }
 
-  /// Sets the explicit js interop [name] for the library [element].
-  void setJsInteropLibraryName(LibraryEntity element, String name) {
-    assert(
-        _nativeBasicData.isJsInteropLibrary(element),
-        failedAt(element,
-            'Library $element is not js interop but given a js interop name.'));
-    jsInteropLibraries[element] = name;
-  }
-
   @override
-  void markJsInteropClassAsAnonymous(ClassEntity element) {
-    anonymousJsInteropClasses.add(element);
-  }
-
-  /// Sets the explicit js interop [name] for the class [element].
-  void setJsInteropClassName(ClassEntity element, String name) {
-    assert(
-        _nativeBasicData.isJsInteropClass(element),
-        failedAt(element,
-            'Class $element is not js interop but given a js interop name.'));
-    jsInteropClasses[element] = name;
-  }
-
-  @override
-  void markAsJsInteropMember(MemberEntity element) {
-    jsInteropMembers[element] = null;
-  }
-
-  /// Sets the explicit js interop [name] for the member [element].
-  void setJsInteropMemberName(MemberEntity element, String name) {
-    assert(
-        jsInteropMembers.containsKey(element),
-        failedAt(element,
-            'Member $element is not js interop but given a js interop name.'));
-    jsInteropMembers[element] = name;
-  }
-
-  @override
-  NativeData close() => new NativeDataImpl(
-      _nativeBasicData,
-      nativeMemberName,
-      nativeMethodBehavior,
-      nativeFieldLoadBehavior,
-      nativeFieldStoreBehavior,
-      jsInteropLibraries,
-      anonymousJsInteropClasses,
-      jsInteropClasses,
-      jsInteropMembers);
+  NativeData close() => new NativeDataImpl(_nativeBasicData, nativeMemberName,
+      nativeMethodBehavior, nativeFieldLoadBehavior, nativeFieldStoreBehavior);
 }
 
 // TODO(johnniwinther): Remove fields that overlap with [NativeBasicData], like
@@ -565,31 +521,54 @@
   /// Cache for [NativeBehavior]s for writing to native fields.
   final Map<MemberEntity, NativeBehavior> nativeFieldStoreBehavior;
 
-  /// The JavaScript names for libraries implemented via typed JavaScript
-  /// interop.
-  final Map<LibraryEntity, String> jsInteropLibraries;
-
-  /// JavaScript interop classes annotated with `@anonymous`
-  final Set<ClassEntity> anonymousJsInteropClasses;
-
-  /// The JavaScript names for classes implemented via typed JavaScript
-  /// interop.
-  final Map<ClassEntity, String> jsInteropClasses;
-
-  /// The JavaScript names for members implemented via typed JavaScript
-  /// interop.
-  final Map<MemberEntity, String> jsInteropMembers;
-
   NativeDataImpl(
       this._nativeBasicData,
       this.nativeMemberName,
       this.nativeMethodBehavior,
       this.nativeFieldLoadBehavior,
-      this.nativeFieldStoreBehavior,
-      this.jsInteropLibraries,
-      this.anonymousJsInteropClasses,
-      this.jsInteropClasses,
-      this.jsInteropMembers);
+      this.nativeFieldStoreBehavior);
+
+  factory NativeDataImpl.fromIr(KernelToElementMap map, IrAnnotationData data) {
+    NativeBasicDataImpl nativeBasicData =
+        new NativeBasicDataImpl.fromIr(map, data);
+    Map<MemberEntity, String> nativeMemberName = {};
+    Map<FunctionEntity, NativeBehavior> nativeMethodBehavior = {};
+    Map<MemberEntity, NativeBehavior> nativeFieldLoadBehavior = {};
+    Map<MemberEntity, NativeBehavior> nativeFieldStoreBehavior = {};
+
+    data.forEachNativeMethodData((ir.Member node,
+        String name,
+        Iterable<String> createsAnnotations,
+        Iterable<String> returnsAnnotations) {
+      MemberEntity member = map.getMember(node);
+      nativeMemberName[member] = name;
+      bool isJsInterop = nativeBasicData.isJsInteropMember(member);
+      nativeMethodBehavior[member] = map.getNativeBehaviorForMethod(
+          node, createsAnnotations, returnsAnnotations,
+          isJsInterop: isJsInterop);
+    });
+
+    data.forEachNativeFieldData((ir.Member node,
+        String name,
+        Iterable<String> createsAnnotations,
+        Iterable<String> returnsAnnotations) {
+      FieldEntity field = map.getMember(node);
+      nativeMemberName[field] = name;
+      bool isJsInterop = nativeBasicData.isJsInteropMember(field);
+      nativeFieldLoadBehavior[field] = map.getNativeBehaviorForFieldLoad(
+          node, createsAnnotations, returnsAnnotations,
+          isJsInterop: isJsInterop);
+      nativeFieldStoreBehavior[field] =
+          map.getNativeBehaviorForFieldStore(node);
+    });
+
+    return new NativeDataImpl(
+        nativeBasicData,
+        nativeMemberName,
+        nativeMethodBehavior,
+        nativeFieldLoadBehavior,
+        nativeFieldStoreBehavior);
+  }
 
   factory NativeDataImpl.readFromDataSource(
       DataSource source, ElementEnvironment elementEnvironment) {
@@ -604,26 +583,16 @@
         .readMemberMap(() => new NativeBehavior.readFromDataSource(source));
     Map<MemberEntity, NativeBehavior> nativeFieldStoreBehavior = source
         .readMemberMap(() => new NativeBehavior.readFromDataSource(source));
-    Map<LibraryEntity, String> jsInteropLibraries =
-        source.readLibraryMap(source.readString);
-    Set<ClassEntity> anonymousJsInteropClasses = source.readClasses().toSet();
-    Map<ClassEntity, String> jsInteropClasses =
-        source.readClassMap(source.readString);
-    Map<MemberEntity, String> jsInteropMembers =
-        source.readMemberMap(source.readString);
     source.end(tag);
     return new NativeDataImpl(
         nativeBasicData,
         nativeMemberName,
         nativeMethodBehavior,
         nativeFieldLoadBehavior,
-        nativeFieldStoreBehavior,
-        jsInteropLibraries,
-        anonymousJsInteropClasses,
-        jsInteropClasses,
-        jsInteropMembers);
+        nativeFieldStoreBehavior);
   }
 
+  @override
   void writeToDataSink(DataSink sink) {
     sink.begin(tag);
     _nativeBasicData.writeToDataSink(sink);
@@ -641,65 +610,78 @@
       behavior.writeToDataSink(sink);
     });
 
-    sink.writeLibraryMap(jsInteropLibraries, sink.writeString);
-    sink.writeClasses(anonymousJsInteropClasses);
-    sink.writeClassMap(jsInteropClasses, sink.writeString);
-    sink.writeMemberMap(jsInteropMembers, sink.writeString);
     sink.end(tag);
   }
 
   @override
+  Map<LibraryEntity, String> get jsInteropLibraries =>
+      _nativeBasicData.jsInteropLibraries;
+
+  @override
+  Set<ClassEntity> get anonymousJsInteropClasses =>
+      _nativeBasicData.anonymousJsInteropClasses;
+
+  @override
+  Map<ClassEntity, String> get jsInteropClasses =>
+      _nativeBasicData.jsInteropClasses;
+
+  @override
+  Map<MemberEntity, String> get jsInteropMembers =>
+      _nativeBasicData.jsInteropMembers;
+
+  @override
   bool isAnonymousJsInteropClass(ClassEntity element) {
     return anonymousJsInteropClasses.contains(element);
   }
 
-  /// Returns `true` if [cls] is a native class.
+  @override
   bool isNativeClass(ClassEntity element) =>
       _nativeBasicData.isNativeClass(element);
 
-  /// Returns the list of non-directive native tag words for [cls].
+  @override
   List<String> getNativeTagsOfClass(ClassEntity cls) =>
       _nativeBasicData.getNativeTagsOfClass(cls);
 
-  /// Returns `true` if [cls] has a `!nonleaf` tag word.
+  @override
   bool hasNativeTagsForcedNonLeaf(ClassEntity cls) =>
       _nativeBasicData.hasNativeTagsForcedNonLeaf(cls);
 
+  @override
   bool get isJsInteropUsed => _nativeBasicData.isJsInteropUsed;
 
-  /// Returns `true` if [element] is a JsInterop library.
+  @override
   bool isJsInteropLibrary(LibraryEntity element) =>
       _nativeBasicData.isJsInteropLibrary(element);
 
-  /// Returns `true` if [element] is a JsInterop class.
+  @override
   bool isJsInteropClass(ClassEntity element) =>
       _nativeBasicData.isJsInteropClass(element);
 
-  /// Returns `true` if [element] or any of its superclasses is native.
+  @override
   bool isNativeOrExtendsNative(ClassEntity element) =>
       _nativeBasicData.isNativeOrExtendsNative(element);
 
-  /// Returns the explicit js interop name for library [element].
+  @override
   String getJsInteropLibraryName(LibraryEntity element) {
     return jsInteropLibraries[element];
   }
 
-  /// Returns the explicit js interop name for class [element].
+  @override
   String getJsInteropClassName(ClassEntity element) {
     return jsInteropClasses[element];
   }
 
-  /// Returns the explicit js interop name for member [element].
+  @override
   String getJsInteropMemberName(MemberEntity element) {
     return jsInteropMembers[element];
   }
 
-  /// Returns `true` if [element] is explicitly marked as part of JsInterop.
+  @override
   bool _isJsInteropMember(MemberEntity element) {
     return jsInteropMembers.containsKey(element);
   }
 
-  /// Returns `true` if [element] is a JsInterop method.
+  @override
   bool isJsInteropMember(MemberEntity element) {
     if (element.isFunction ||
         element.isConstructor ||
@@ -721,14 +703,12 @@
     }
   }
 
-  /// Returns `true` if the name of [element] is fixed for the generated
-  /// JavaScript.
+  @override
   bool hasFixedBackendName(MemberEntity element) {
     return isJsInteropMember(element) || nativeMemberName.containsKey(element);
   }
 
-  /// Computes the name for [element] to use in the generated JavaScript. This
-  /// is either given through a native annotation or a js interop annotation.
+  @override
   String getFixedBackendName(MemberEntity element) {
     String name = nativeMemberName[element];
     if (name == null && isJsInteropMember(element)) {
@@ -774,6 +754,7 @@
   /// For example: fixedBackendPath for the static method createMap in the
   /// Map class of the goog.map JavaScript library would have path
   /// "goog.maps.Map".
+  @override
   String getFixedBackendMethodPath(FunctionEntity element) {
     if (!isJsInteropMember(element)) return null;
     if (element.isInstanceMember) return 'this';
@@ -793,13 +774,13 @@
     return _jsLibraryNameHelper(element.library);
   }
 
-  /// Returns `true` if [element] is a native member of a native class.
+  @override
   bool isNativeMember(MemberEntity element) {
     if (isJsInteropMember(element)) return true;
     return nativeMemberName.containsKey(element);
   }
 
-  /// Returns the [NativeBehavior] for calling the native [method].
+  @override
   NativeBehavior getNativeMethodBehavior(FunctionEntity method) {
     assert(
         nativeMethodBehavior.containsKey(method),
@@ -808,7 +789,7 @@
     return nativeMethodBehavior[method];
   }
 
-  /// Returns the [NativeBehavior] for reading from the native [field].
+  @override
   NativeBehavior getNativeFieldLoadBehavior(FieldEntity field) {
     assert(
         nativeFieldLoadBehavior.containsKey(field),
@@ -819,7 +800,7 @@
     return nativeFieldLoadBehavior[field];
   }
 
-  /// Returns the [NativeBehavior] for writing to the native [field].
+  @override
   NativeBehavior getNativeFieldStoreBehavior(FieldEntity field) {
     assert(
         nativeFieldStoreBehavior.containsKey(field),
@@ -828,8 +809,7 @@
     return nativeFieldStoreBehavior[field];
   }
 
-  /// Apply JS$ escaping scheme to convert possible escaped Dart names into
-  /// JS names.
+  @override
   String computeUnescapedJSInteropName(String name) {
     return name.startsWith(_jsInteropEscapePrefix)
         ? name.substring(_jsInteropEscapePrefix.length)
@@ -869,13 +849,16 @@
     return sb.toString();
   }
 
+  @override
   int get hashCode => Hashing.listHash(names, isNonLeaf.hashCode);
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! NativeClassTag) return false;
     return equalElements(names, other.names) && isNonLeaf == other.isNonLeaf;
   }
 
+  @override
   String toString() => text;
 }
diff --git a/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart b/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart
index 3dc3075..3589a76 100644
--- a/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart
+++ b/pkg/compiler/lib/src/js_backend/no_such_method_registry.dart
@@ -94,13 +94,17 @@
 
   NoSuchMethodResolver get internalResolverForTesting => _resolver;
 
+  @override
   bool get hasThrowingNoSuchMethod => throwingImpls.isNotEmpty;
+  @override
   bool get hasComplexNoSuchMethod => otherImpls.isNotEmpty;
 
+  @override
   void registerNoSuchMethod(FunctionEntity noSuchMethodElement) {
     _uncategorizedImpls.add(noSuchMethodElement);
   }
 
+  @override
   void onQueueEmpty() {
     _uncategorizedImpls.forEach(_categorizeImpl);
     _uncategorizedImpls.clear();
@@ -161,6 +165,7 @@
     }
   }
 
+  @override
   NoSuchMethodData close() {
     return new NoSuchMethodDataImpl(
         throwingImpls, otherImpls, forwardingSyntaxImpls);
@@ -234,6 +239,7 @@
       ..complexReturningImpls.addAll(complexReturningImpls);
   }
 
+  @override
   void writeToDataSink(DataSink sink) {
     sink.begin(tag);
     sink.writeMembers(throwingImpls);
@@ -244,9 +250,7 @@
     sink.end(tag);
   }
 
-  /// Now that type inference is complete, split category D into two
-  /// subcategories: D1, those that have no return type, and D2, those
-  /// that have a return type.
+  @override
   void categorizeComplexImplementations(GlobalTypeInferenceResults results) {
     otherImpls.forEach((FunctionEntity element) {
       if (results.resultOfMember(element).throwsAlways) {
@@ -257,7 +261,7 @@
     });
   }
 
-  /// Emits a diagnostic
+  @override
   void emitDiagnostic(DiagnosticReporter reporter) {
     throwingImpls.forEach((e) {
       if (!forwardingSyntaxImpls.contains(e)) {
@@ -276,9 +280,7 @@
     });
   }
 
-  /// Returns [true] if the given element is a complex [noSuchMethod]
-  /// implementation. An implementation is complex if it falls into
-  /// category D, as described above.
+  @override
   bool isComplex(FunctionEntity element) {
     assert(element.name == Identifiers.noSuchMethod_);
     return otherImpls.contains(element);
diff --git a/pkg/compiler/lib/src/js_backend/resolution_listener.dart b/pkg/compiler/lib/src/js_backend/resolution_listener.dart
index 9c2fc09..e084b4c 100644
--- a/pkg/compiler/lib/src/js_backend/resolution_listener.dart
+++ b/pkg/compiler/lib/src/js_backend/resolution_listener.dart
@@ -17,7 +17,7 @@
 import '../universe/use.dart' show StaticUse, TypeUse;
 import '../universe/world_impact.dart'
     show WorldImpact, WorldImpactBuilder, WorldImpactBuilderImpl;
-import 'allocator_analysis.dart';
+import 'field_analysis.dart';
 import 'backend_impact.dart';
 import 'backend_usage.dart';
 import 'checked_mode_helpers.dart';
@@ -43,7 +43,7 @@
   final CustomElementsResolutionAnalysis _customElementsAnalysis;
 
   final NativeResolutionEnqueuer _nativeEnqueuer;
-  final KAllocatorAnalysis _allocatorAnalysis;
+  final KFieldAnalysis _fieldAnalysis;
 
   /// True when we enqueue the loadLibrary code.
   bool _isLoadLibraryFunctionResolved = false;
@@ -59,7 +59,7 @@
       this._noSuchMethodRegistry,
       this._customElementsAnalysis,
       this._nativeEnqueuer,
-      this._allocatorAnalysis,
+      this._fieldAnalysis,
       this._deferredLoadTask);
 
   void _registerBackendImpact(
@@ -328,12 +328,16 @@
       _registerBackendImpact(impactBuilder, _impacts.functionClass);
     } else if (cls == _commonElements.mapClass) {
       _registerBackendImpact(impactBuilder, _impacts.mapClass);
+    } else if (cls == _commonElements.setClass) {
+      _registerBackendImpact(impactBuilder, _impacts.setClass);
     } else if (cls == _commonElements.boundClosureClass) {
       _registerBackendImpact(impactBuilder, _impacts.boundClosureClass);
     } else if (_nativeData.isNativeOrExtendsNative(cls)) {
       _registerBackendImpact(impactBuilder, _impacts.nativeOrExtendsClass);
     } else if (cls == _commonElements.mapLiteralClass) {
       _registerBackendImpact(impactBuilder, _impacts.mapLiteralClass);
+    } else if (cls == _commonElements.setLiteralClass) {
+      _registerBackendImpact(impactBuilder, _impacts.setLiteralClass);
     }
     if (cls == _commonElements.closureClass) {
       _registerBackendImpact(impactBuilder, _impacts.closureClass);
@@ -405,7 +409,7 @@
 
   @override
   WorldImpact registerInstantiatedClass(ClassEntity cls) {
-    _allocatorAnalysis.registerInstantiatedClass(cls);
+    _fieldAnalysis.registerInstantiatedClass(cls);
     return _processClass(cls);
   }
 
diff --git a/pkg/compiler/lib/src/js_backend/runtime_types.dart b/pkg/compiler/lib/src/js_backend/runtime_types.dart
index b9a0d33..5094315 100644
--- a/pkg/compiler/lib/src/js_backend/runtime_types.dart
+++ b/pkg/compiler/lib/src/js_backend/runtime_types.dart
@@ -124,6 +124,7 @@
 class TrivialRuntimeTypesNeed implements RuntimeTypesNeed {
   const TrivialRuntimeTypesNeed();
 
+  @override
   void writeToDataSink(DataSink sink) {
     sink.writeBool(true); // Is trivial.
   }
@@ -244,6 +245,7 @@
 class TrivialRuntimeTypesChecksBuilder implements RuntimeTypesChecksBuilder {
   final JClosedWorld _closedWorld;
   final TrivialRuntimeTypesSubstitutions _substitutions;
+  @override
   bool rtiChecksBuilderClosed = false;
 
   TrivialRuntimeTypesChecksBuilder(this._closedWorld, this._substitutions);
@@ -299,6 +301,7 @@
 
   ClassCollector(this._elementEnvironment);
 
+  @override
   void addClass(ClassEntity cls) {
     if (classes.add(cls)) {
       _elementEnvironment.forEachSupertype(cls, (InterfaceType type) {
@@ -633,7 +636,9 @@
 }
 
 class TrivialRuntimeTypesSubstitutions extends RuntimeTypesSubstitutionsMixin {
+  @override
   final JClosedWorld _closedWorld;
+  @override
   TypeChecks _requiredChecks;
 
   TrivialRuntimeTypesSubstitutions(this._closedWorld);
@@ -786,6 +791,7 @@
         instantiationsNeedingTypeArguments);
   }
 
+  @override
   void writeToDataSink(DataSink sink) {
     sink.writeBool(false); // Is _not_ trivial.
     sink.begin(tag);
@@ -802,16 +808,19 @@
 
   bool checkClass(covariant ClassEntity cls) => true;
 
+  @override
   bool classNeedsTypeArguments(ClassEntity cls) {
     assert(checkClass(cls));
     if (!_elementEnvironment.isGenericClass(cls)) return false;
     return classesNeedingTypeArguments.contains(cls);
   }
 
+  @override
   bool methodNeedsSignature(FunctionEntity function) {
     return methodsNeedingSignature.contains(function);
   }
 
+  @override
   bool methodNeedsTypeArguments(FunctionEntity function) {
     return methodsNeedingTypeArguments.contains(function);
   }
@@ -1047,6 +1056,10 @@
       _getClassNode(commonElements.jsArrayClass)
           .addDependency(_getClassNode(commonElements.listClass));
     }
+    if (commonElements.setLiteralClass != null) {
+      _getClassNode(commonElements.setLiteralClass)
+          .addDependency(_getClassNode(commonElements.setClass));
+    }
     if (commonElements.mapLiteralClass != null) {
       _getClassNode(commonElements.mapLiteralClass)
           .addDependency(_getClassNode(commonElements.mapClass));
@@ -1394,6 +1407,7 @@
 
   String get kind;
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write(kind);
@@ -1408,8 +1422,10 @@
 
   ClassNode(this.cls);
 
+  @override
   Entity get entity => cls;
 
+  @override
   String get kind => 'class';
 }
 
@@ -1423,6 +1439,7 @@
   MethodNode(this.function, this.parameterStructure,
       {this.isCallTarget, this.instanceName, this.isNoSuchMethod: false});
 
+  @override
   Entity get entity => function;
 
   bool selectorApplies(Selector selector) {
@@ -1432,8 +1449,10 @@
         selector.callStructure.signatureApplies(parameterStructure);
   }
 
+  @override
   String get kind => 'method';
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write('MethodNode(');
@@ -1888,6 +1907,7 @@
 
 class _RuntimeTypesChecks implements RuntimeTypesChecks {
   final RuntimeTypesSubstitutions _substitutions;
+  @override
   final TypeChecks requiredChecks;
   final Iterable<ClassEntity> _typeLiterals;
   final Iterable<ClassEntity> _typeArguments;
@@ -1916,6 +1936,7 @@
 class RuntimeTypesImpl extends _RuntimeTypesBase
     with RuntimeTypesSubstitutionsMixin
     implements RuntimeTypesChecksBuilder {
+  @override
   final JClosedWorld _closedWorld;
 
   // The set of type arguments tested against type variable bounds.
@@ -1925,13 +1946,16 @@
 
   TypeChecks cachedRequiredChecks;
 
+  @override
   bool rtiChecksBuilderClosed = false;
 
   RuntimeTypesImpl(this._closedWorld) : super(_closedWorld.dartTypes);
 
   JCommonElements get _commonElements => _closedWorld.commonElements;
+  @override
   JElementEnvironment get _elementEnvironment =>
       _closedWorld.elementEnvironment;
+  @override
   RuntimeTypesNeed get _rtiNeed => _closedWorld.rtiNeed;
 
   @override
@@ -1954,6 +1978,7 @@
     _genericInstantiations.add(instantiation);
   }
 
+  @override
   RuntimeTypesChecks computeRequiredChecks(
       CodegenWorldBuilder codegenWorldBuilder, CompilerOptions options) {
     TypeVariableTests typeVariableTests = new TypeVariableTests(
@@ -1975,14 +2000,32 @@
     Set<ClassEntity> typeLiterals = new Set<ClassEntity>();
     Set<ClassEntity> typeArguments = new Set<ClassEntity>();
 
+    // The [liveTypeVisitor] is used to register class use in the type of
+    // instantiated objects like `new T` and the function types of
+    // tear offs and closures.
+    //
+    // A type found in a covariant position of such types is considered live
+    // whereas a type found in a contravariant position of such types is
+    // considered tested.
+    //
+    // For instance
+    //
+    //    new A<B Function(C)>();
+    //
+    // makes A and B live but C tested.
     TypeVisitor liveTypeVisitor =
         new TypeVisitor(onClass: (ClassEntity cls, {TypeVisitorState state}) {
       ClassUse classUse = classUseMap.putIfAbsent(cls, () => new ClassUse());
       switch (state) {
-        case TypeVisitorState.typeArgument:
+        case TypeVisitorState.covariantTypeArgument:
           classUse.typeArgument = true;
           typeArguments.add(cls);
           break;
+        case TypeVisitorState.contravariantTypeArgument:
+          classUse.typeArgument = true;
+          classUse.checkedTypeArgument = true;
+          typeArguments.add(cls);
+          break;
         case TypeVisitorState.typeLiteral:
           classUse.typeLiteral = true;
           typeLiterals.add(cls);
@@ -1992,15 +2035,31 @@
       }
     });
 
+    // The [testedTypeVisitor] is used to register class use in type tests like
+    // `o is T` and `o as T` (both implicit and explicit).
+    //
+    // A type found in a covariant position of such types is considered tested
+    // whereas a type found in a contravariant position of such types is
+    // considered live.
+    //
+    // For instance
+    //
+    //    o is A<B Function(C)>;
+    //
+    // makes A and B tested but C live.
     TypeVisitor testedTypeVisitor =
         new TypeVisitor(onClass: (ClassEntity cls, {TypeVisitorState state}) {
       ClassUse classUse = classUseMap.putIfAbsent(cls, () => new ClassUse());
       switch (state) {
-        case TypeVisitorState.typeArgument:
+        case TypeVisitorState.covariantTypeArgument:
           classUse.typeArgument = true;
           classUse.checkedTypeArgument = true;
           typeArguments.add(cls);
           break;
+        case TypeVisitorState.contravariantTypeArgument:
+          classUse.typeArgument = true;
+          typeArguments.add(cls);
+          break;
         case TypeVisitorState.typeLiteral:
           break;
         case TypeVisitorState.direct:
@@ -2014,6 +2073,7 @@
       classUse.instance = true;
     });
 
+    Set<ClassEntity> visitedSuperClasses = {};
     codegenWorldBuilder.instantiatedTypes.forEach((InterfaceType type) {
       liveTypeVisitor.visitType(type, TypeVisitorState.direct);
       ClassUse classUse =
@@ -2021,31 +2081,54 @@
       classUse.directInstance = true;
       FunctionType callType = _types.getCallType(type);
       if (callType != null) {
-        testedTypeVisitor.visitType(callType, TypeVisitorState.direct);
+        liveTypeVisitor.visitType(callType, TypeVisitorState.direct);
+      }
+
+      // Superclass might make classes live as type arguments. For instance
+      //
+      //    class A {}
+      //    class B<T> {}
+      //    class C implements B<A> {}
+      //    main() => new C();
+      //
+      // Here `A` is live as a type argument through the liveness of `C`.
+      for (InterfaceType supertype
+          in _closedWorld.dartTypes.getSupertypes(type.element)) {
+        if (supertype.typeArguments.isEmpty &&
+            visitedSuperClasses.contains(supertype.element)) {
+          // If [superclass] is not generic then a second visit cannot add more
+          // information that the first. In the example above, visiting `C`
+          // twice can only result in a second registration of `A` as live
+          // type argument.
+          break;
+        }
+        visitedSuperClasses.add(supertype.element);
+        liveTypeVisitor.visitType(supertype, TypeVisitorState.direct);
       }
     });
 
     for (FunctionEntity element
         in codegenWorldBuilder.staticFunctionsNeedingGetter) {
       FunctionType functionType = _elementEnvironment.getFunctionType(element);
-      testedTypeVisitor.visitType(functionType, TypeVisitorState.direct);
+      liveTypeVisitor.visitType(functionType, TypeVisitorState.direct);
     }
 
     for (FunctionEntity element in codegenWorldBuilder.closurizedMembers) {
       FunctionType functionType = _elementEnvironment.getFunctionType(element);
-      testedTypeVisitor.visitType(functionType, TypeVisitorState.direct);
+      liveTypeVisitor.visitType(functionType, TypeVisitorState.direct);
     }
 
     void processMethodTypeArguments(_, Set<DartType> typeArguments) {
       for (DartType typeArgument in typeArguments) {
-        liveTypeVisitor.visit(typeArgument, TypeVisitorState.typeArgument);
+        liveTypeVisitor.visit(
+            typeArgument, TypeVisitorState.covariantTypeArgument);
       }
     }
 
     codegenWorldBuilder.forEachStaticTypeArgument(processMethodTypeArguments);
     codegenWorldBuilder.forEachDynamicTypeArgument(processMethodTypeArguments);
     codegenWorldBuilder.liveTypeArguments.forEach((DartType type) {
-      liveTypeVisitor.visitType(type, TypeVisitorState.typeArgument);
+      liveTypeVisitor.visitType(type, TypeVisitorState.covariantTypeArgument);
     });
     codegenWorldBuilder.constTypeLiterals.forEach((DartType type) {
       liveTypeVisitor.visitType(type, TypeVisitorState.typeLiteral);
@@ -2098,7 +2181,8 @@
             DartType bound =
                 _elementEnvironment.getTypeVariableBound(typeVariable.element);
             processCheckedType(bound);
-            liveTypeVisitor.visit(bound, TypeVisitorState.typeArgument);
+            liveTypeVisitor.visit(
+                bound, TypeVisitorState.covariantTypeArgument);
           }
         }
       }
@@ -2408,6 +2492,7 @@
   jsAst.Expression visit(DartType type, Emitter emitter) =>
       type.accept(this, emitter);
 
+  @override
   jsAst.Expression visitTypeVariableType(
       TypeVariableType type, Emitter emitter) {
     if (typedefBindings != null) {
@@ -2417,6 +2502,7 @@
     return onVariable(type);
   }
 
+  @override
   jsAst.Expression visitFunctionTypeVariable(
       FunctionTypeVariable type, Emitter emitter) {
     int position = functionTypeVariables.indexOf(type);
@@ -2424,6 +2510,7 @@
     return js.number(functionTypeVariables.length - position - 1);
   }
 
+  @override
   jsAst.Expression visitDynamicType(DynamicType type, Emitter emitter) {
     return getDynamicValue();
   }
@@ -2440,6 +2527,7 @@
     return new jsAst.ArrayInitializer(elements);
   }
 
+  @override
   jsAst.Expression visitInterfaceType(InterfaceType type, Emitter emitter) {
     jsAst.Expression name = getJavaScriptClassName(type.element, emitter);
     jsAst.Expression result;
@@ -2504,6 +2592,7 @@
     return jsAst.js.expressionTemplateFor("# === -2");
   }
 
+  @override
   jsAst.Expression visitFunctionType(FunctionType type, Emitter emitter) {
     List<jsAst.Property> properties = <jsAst.Property>[];
 
@@ -2562,10 +2651,12 @@
     return new jsAst.ObjectInitializer(properties);
   }
 
+  @override
   jsAst.Expression visitVoidType(VoidType type, Emitter emitter) {
     return getVoidValue();
   }
 
+  @override
   jsAst.Expression visitTypedefType(TypedefType type, Emitter emitter) {
     bool shouldEncode = shouldEncodeTypedef(type);
     DartType unaliasedType = type.unaliased;
@@ -2642,6 +2733,7 @@
 class TypeCheckMapping implements TypeChecks {
   final Map<ClassEntity, ClassChecks> map = new Map<ClassEntity, ClassChecks>();
 
+  @override
   ClassChecks operator [](ClassEntity element) {
     ClassChecks result = map[element];
     return result != null ? result : const ClassChecks.empty();
@@ -2651,8 +2743,10 @@
     map[element] = checks;
   }
 
+  @override
   Iterable<ClassEntity> get classes => map.keys;
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     for (ClassEntity holder in classes) {
@@ -2683,15 +2777,18 @@
     }
   }
 
+  @override
   visitTypedefType(TypedefType type, bool isTypeArgument) {
     collect(type.unaliased, isTypeArgument: isTypeArgument);
   }
 
+  @override
   visitInterfaceType(InterfaceType type, bool isTypeArgument) {
     if (isTypeArgument) addClass(type.element);
     collectAll(type.typeArguments, isTypeArgument: true);
   }
 
+  @override
   visitFunctionType(FunctionType type, _) {
     collect(type.returnType, isTypeArgument: true);
     collectAll(type.parameterTypes, isTypeArgument: true);
@@ -2715,10 +2812,12 @@
     }
   }
 
+  @override
   visitTypedefType(TypedefType type, bool inFunctionType) {
     collect(type.unaliased, inFunctionType: inFunctionType);
   }
 
+  @override
   visitInterfaceType(InterfaceType type, bool inFunctionType) {
     if (inFunctionType) {
       classes.add(type.element);
@@ -2726,6 +2825,7 @@
     collectAll(type.typeArguments, inFunctionType: inFunctionType);
   }
 
+  @override
   visitFunctionType(FunctionType type, _) {
     collect(type.returnType, inFunctionType: true);
     collectAll(type.parameterTypes, inFunctionType: true);
@@ -2776,6 +2876,7 @@
 
   bool get isJsInterop => length != null;
 
+  @override
   String toString() => 'Substitution(isTrivial=$isTrivial,'
       'isFunction=$isFunction,isJsInterop=$isJsInterop,arguments=$arguments,'
       'parameters=$parameters,length=$length)';
@@ -2787,16 +2888,23 @@
   final ClassEntity cls;
   final bool needsIs;
   final Substitution substitution;
+  @override
   final int hashCode = _nextHash = (_nextHash + 100003).toUnsigned(30);
   static int _nextHash = 0;
 
   TypeCheck(this.cls, this.substitution, {this.needsIs: true});
 
+  @override
   String toString() =>
       'TypeCheck(cls=$cls,needsIs=$needsIs,substitution=$substitution)';
 }
 
-enum TypeVisitorState { direct, typeArgument, typeLiteral }
+enum TypeVisitorState {
+  direct,
+  covariantTypeArgument,
+  contravariantTypeArgument,
+  typeLiteral,
+}
 
 class TypeVisitor extends DartTypeVisitor<void, TypeVisitorState> {
   Set<FunctionTypeVariable> _visitedFunctionTypeVariables =
@@ -2812,6 +2920,34 @@
 
   visitType(DartType type, TypeVisitorState state) => type.accept(this, state);
 
+  TypeVisitorState covariantArgument(TypeVisitorState state) {
+    switch (state) {
+      case TypeVisitorState.direct:
+        return TypeVisitorState.covariantTypeArgument;
+      case TypeVisitorState.covariantTypeArgument:
+        return TypeVisitorState.covariantTypeArgument;
+      case TypeVisitorState.contravariantTypeArgument:
+        return TypeVisitorState.contravariantTypeArgument;
+      case TypeVisitorState.typeLiteral:
+        return TypeVisitorState.typeLiteral;
+    }
+    throw new UnsupportedError("Unexpected TypeVisitorState $state");
+  }
+
+  TypeVisitorState contravariantArgument(TypeVisitorState state) {
+    switch (state) {
+      case TypeVisitorState.direct:
+        return TypeVisitorState.contravariantTypeArgument;
+      case TypeVisitorState.covariantTypeArgument:
+        return TypeVisitorState.contravariantTypeArgument;
+      case TypeVisitorState.contravariantTypeArgument:
+        return TypeVisitorState.covariantTypeArgument;
+      case TypeVisitorState.typeLiteral:
+        return TypeVisitorState.typeLiteral;
+    }
+    throw new UnsupportedError("Unexpected TypeVisitorState $state");
+  }
+
   visitTypes(List<DartType> types, TypeVisitorState state) {
     for (DartType type in types) {
       visitType(type, state);
@@ -2830,11 +2966,7 @@
     if (onClass != null) {
       onClass(type.element, state: state);
     }
-    visitTypes(
-        type.typeArguments,
-        state == TypeVisitorState.typeLiteral
-            ? state
-            : TypeVisitorState.typeArgument);
+    visitTypes(type.typeArguments, covariantArgument(state));
   }
 
   @override
@@ -2844,13 +2976,10 @@
     }
     // Visit all nested types as type arguments; these types are not runtime
     // instances but runtime type representations.
-    state = state == TypeVisitorState.typeLiteral
-        ? state
-        : TypeVisitorState.typeArgument;
-    visitType(type.returnType, state);
-    visitTypes(type.parameterTypes, state);
-    visitTypes(type.optionalParameterTypes, state);
-    visitTypes(type.namedParameterTypes, state);
+    visitType(type.returnType, covariantArgument(state));
+    visitTypes(type.parameterTypes, contravariantArgument(state));
+    visitTypes(type.optionalParameterTypes, contravariantArgument(state));
+    visitTypes(type.namedParameterTypes, contravariantArgument(state));
     _visitedFunctionTypeVariables.removeAll(type.typeVariables);
   }
 
@@ -2887,6 +3016,7 @@
 
   Iterable<TypeCheck> get checks => _map.values;
 
+  @override
   String toString() {
     return 'ClassChecks($checks)';
   }
@@ -2981,6 +3111,7 @@
   /// type arguments.
   bool get isLive => directInstance || typeArgument;
 
+  @override
   String toString() {
     List<String> properties = <String>[];
     if (instance) {
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 fb31e92..81b9f9e 100644
--- a/pkg/compiler/lib/src/js_emitter/class_stub_generator.dart
+++ b/pkg/compiler/lib/src/js_emitter/class_stub_generator.dart
@@ -9,6 +9,7 @@
 import '../elements/entities.dart';
 import '../js/js.dart' as jsAst;
 import '../js/js.dart' show js;
+import '../js_backend/field_analysis.dart';
 import '../js_backend/namer.dart' show Namer;
 import '../js_backend/interceptor_data.dart' show InterceptorData;
 import '../options.dart';
@@ -108,8 +109,14 @@
         }
         return js('#.#()', [receiver, getterName]);
       } else {
-        jsAst.Name fieldName = _namer.instanceFieldPropertyName(member);
-        return js('#.#', [receiver, fieldName]);
+        FieldAnalysisData fieldData =
+            _closedWorld.fieldAnalysis.getFieldData(member);
+        if (fieldData.isEffectivelyConstant) {
+          return _emitter.constantReference(fieldData.constantValue);
+        } else {
+          jsAst.Name fieldName = _namer.instanceFieldPropertyName(member);
+          return js('#.#', [receiver, fieldName]);
+        }
       }
     }
 
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 7fac11d..0320701 100644
--- a/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart
+++ b/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart
@@ -67,6 +67,7 @@
     return _emitter;
   }
 
+  @override
   String get name => 'Code emitter';
 
   /// Returns true, if the emitter supports reflection.
@@ -189,7 +190,7 @@
           namer,
           this,
           closedWorld,
-          closedWorld.allocatorAnalysis,
+          closedWorld.fieldAnalysis,
           inferredData,
           backend.sourceInformationStrategy,
           closedWorld.sorter,
@@ -268,6 +269,7 @@
 }
 
 abstract class EmitterBase implements Emitter {
+  @override
   Program programForTesting;
   Namer get namer;
 
diff --git a/pkg/compiler/lib/src/js_emitter/constant_ordering.dart b/pkg/compiler/lib/src/js_emitter/constant_ordering.dart
index 93b4e7d..9306361 100644
--- a/pkg/compiler/lib/src/js_emitter/constant_ordering.dart
+++ b/pkg/compiler/lib/src/js_emitter/constant_ordering.dart
@@ -27,6 +27,7 @@
     _dartTypeOrdering = new _DartTypeOrdering(this);
   }
 
+  @override
   int compare(ConstantValue a, ConstantValue b) => compareValues(a, b);
 
   int compareValues(ConstantValue a, ConstantValue b) {
@@ -75,44 +76,60 @@
     return _dartTypeOrdering.compare(a, b);
   }
 
+  @override
   int visitFunction(FunctionConstantValue a, FunctionConstantValue b) {
     return compareMembers(a.element, b.element);
   }
 
+  @override
   int visitNull(NullConstantValue a, NullConstantValue b) {
     return 0;
   }
 
+  @override
   int visitNonConstant(NonConstantValue a, NonConstantValue b) {
     return 0;
   }
 
+  @override
   int visitInt(IntConstantValue a, IntConstantValue b) {
     return a.intValue.compareTo(b.intValue);
   }
 
+  @override
   int visitDouble(DoubleConstantValue a, DoubleConstantValue b) {
     return a.doubleValue.compareTo(b.doubleValue);
   }
 
+  @override
   int visitBool(BoolConstantValue a, BoolConstantValue b) {
     int aInt = a.boolValue ? 1 : 0;
     int bInt = b.boolValue ? 1 : 0;
     return aInt.compareTo(bInt);
   }
 
+  @override
   int visitString(StringConstantValue a, StringConstantValue b) {
     String aString = a.stringValue;
     String bString = b.stringValue;
     return aString.compareTo(bString);
   }
 
+  @override
   int visitList(ListConstantValue a, ListConstantValue b) {
     int r = compareLists(compareValues, a.entries, b.entries);
     if (r != 0) return r;
     return compareDartTypes(a.type, b.type);
   }
 
+  @override
+  int visitSet(SetConstantValue a, SetConstantValue b) {
+    int r = compareLists(compareValues, a.values, b.values);
+    if (r != 0) return r;
+    return compareDartTypes(a.type, b.type);
+  }
+
+  @override
   int visitMap(MapConstantValue a, MapConstantValue b) {
     int r = compareLists(compareValues, a.keys, b.keys);
     if (r != 0) return r;
@@ -121,6 +138,7 @@
     return compareDartTypes(a.type, b.type);
   }
 
+  @override
   int visitConstructed(ConstructedConstantValue a, ConstructedConstantValue b) {
     int r = compareDartTypes(a.type, b.type);
     if (r != 0) return r;
@@ -138,16 +156,19 @@
         aFields.map((field) => b.fields[field]).toList());
   }
 
+  @override
   int visitType(TypeConstantValue a, TypeConstantValue b) {
     int r = compareDartTypes(a.representedType, b.representedType);
     if (r != 0) return r;
     return compareDartTypes(a.type, b.type);
   }
 
+  @override
   int visitInterceptor(InterceptorConstantValue a, InterceptorConstantValue b) {
     return compareClasses(a.cls, b.cls);
   }
 
+  @override
   int visitSynthetic(SyntheticConstantValue a, SyntheticConstantValue b) {
     // [SyntheticConstantValue]s have abstract fields that are set only by
     // convention.  Lucky for us, they do not occur as top level constant, only
@@ -176,6 +197,7 @@
     }
   }
 
+  @override
   int visitDeferredGlobal(
       DeferredGlobalConstantValue a, DeferredGlobalConstantValue b) {
     int r = compareValues(a.referenced, b.referenced);
@@ -183,6 +205,7 @@
     return a.unit.compareTo(b.unit);
   }
 
+  @override
   int visitInstantiation(
       InstantiationConstantValue a, InstantiationConstantValue b) {
     int r = compareValues(a.function, b.function);
@@ -201,32 +224,50 @@
   static const int BOOL = 5;
   static const int STRING = 6;
   static const int LIST = 7;
-  static const int MAP = 8;
-  static const int CONSTRUCTED = 9;
-  static const int TYPE = 10;
-  static const int INTERCEPTOR = 11;
-  static const int SYNTHETIC = 12;
-  static const int DEFERRED_GLOBAL = 13;
-  static const int NONCONSTANT = 14;
-  static const int INSTANTIATION = 15;
+  static const int SET = 8;
+  static const int MAP = 9;
+  static const int CONSTRUCTED = 10;
+  static const int TYPE = 11;
+  static const int INTERCEPTOR = 12;
+  static const int SYNTHETIC = 13;
+  static const int DEFERRED_GLOBAL = 14;
+  static const int NONCONSTANT = 15;
+  static const int INSTANTIATION = 16;
 
   static int kind(ConstantValue constant) =>
       constant.accept(const _KindVisitor(), null);
 
+  @override
   int visitFunction(FunctionConstantValue a, _) => FUNCTION;
+  @override
   int visitNull(NullConstantValue a, _) => NULL;
+  @override
   int visitNonConstant(NonConstantValue a, _) => NONCONSTANT;
+  @override
   int visitInt(IntConstantValue a, _) => INT;
+  @override
   int visitDouble(DoubleConstantValue a, _) => DOUBLE;
+  @override
   int visitBool(BoolConstantValue a, _) => BOOL;
+  @override
   int visitString(StringConstantValue a, _) => STRING;
+  @override
   int visitList(ListConstantValue a, _) => LIST;
+  @override
+  int visitSet(SetConstantValue a, _) => SET;
+  @override
   int visitMap(MapConstantValue a, _) => MAP;
+  @override
   int visitConstructed(ConstructedConstantValue a, _) => CONSTRUCTED;
+  @override
   int visitType(TypeConstantValue a, _) => TYPE;
+  @override
   int visitInterceptor(InterceptorConstantValue a, _) => INTERCEPTOR;
+  @override
   int visitSynthetic(SyntheticConstantValue a, _) => SYNTHETIC;
+  @override
   int visitDeferredGlobal(DeferredGlobalConstantValue a, _) => DEFERRED_GLOBAL;
+  @override
   int visitInstantiation(InstantiationConstantValue a, _) => INSTANTIATION;
 }
 
@@ -238,11 +279,17 @@
     return type.accept(const _DartTypeKindVisitor(), null);
   }
 
+  @override
   int visitVoidType(covariant VoidType type, _) => 6;
+  @override
   int visitTypeVariableType(covariant TypeVariableType type, _) => 3;
+  @override
   int visitFunctionType(covariant FunctionType type, _) => 0;
+  @override
   int visitInterfaceType(covariant InterfaceType type, _) => 1;
+  @override
   int visitTypedefType(covariant TypedefType type, _) => 2;
+  @override
   int visitDynamicType(covariant DynamicType type, _) => 5;
 }
 
@@ -262,16 +309,19 @@
     return r;
   }
 
+  @override
   int visitVoidType(covariant VoidType type, covariant VoidType other) {
     throw new UnsupportedError('Unreachable');
   }
 
+  @override
   int visitTypeVariableType(
       covariant TypeVariableType type, covariant TypeVariableType other) {
     throw new UnsupportedError(
         "Type variables are not expected in constants: '$type' in '$_root'");
   }
 
+  @override
   int visitFunctionType(
       covariant FunctionType type, covariant FunctionType other) {
     int r = _compareTypeArguments(type.parameterTypes, other.parameterTypes);
@@ -288,6 +338,7 @@
     return compare(type.returnType, other.returnType);
   }
 
+  @override
   int visitInterfaceType(
       covariant InterfaceType type, covariant InterfaceType other) {
     int r = _constantOrdering.compareClasses(type.element, other.element);
@@ -295,6 +346,7 @@
     return _compareTypeArguments(type.typeArguments, other.typeArguments);
   }
 
+  @override
   int visitTypedefType(
       covariant TypedefType type, covariant TypedefType other) {
     int r = _constantOrdering.compareTypedefs(type.element, other.element);
@@ -302,6 +354,7 @@
     return _compareTypeArguments(type.typeArguments, other.typeArguments);
   }
 
+  @override
   int visitDynamicType(
       covariant DynamicType type, covariant DynamicType other) {
     throw new UnsupportedError('Unreachable');
diff --git a/pkg/compiler/lib/src/js_emitter/metadata_collector.dart b/pkg/compiler/lib/src/js_emitter/metadata_collector.dart
index db2d3c0..39b2574 100644
--- a/pkg/compiler/lib/src/js_emitter/metadata_collector.dart
+++ b/pkg/compiler/lib/src/js_emitter/metadata_collector.dart
@@ -29,18 +29,22 @@
 abstract class _MetadataEntry extends jsAst.DeferredNumber
     implements Comparable, jsAst.ReferenceCountedAstNode {
   jsAst.Expression get entry;
+  @override
   int get value;
   int get _rc;
 
   // Mark this entry as seen. On the first time this is seen, the visitor
   // will be applied to the [entry] to also mark potential [_MetadataEntry]
   // instances in the [entry] as seen.
+  @override
   markSeen(jsAst.TokenCounter visitor);
 }
 
 class _BoundMetadataEntry extends _MetadataEntry {
   int _value = -1;
+  @override
   int _rc = 0;
+  @override
   final jsAst.Expression entry;
 
   _BoundMetadataEntry(this.entry);
@@ -52,6 +56,7 @@
     _value = value;
   }
 
+  @override
   int get value {
     assert(isFinalized);
     return _value;
@@ -59,13 +64,16 @@
 
   bool get isUsed => _rc > 0;
 
+  @override
   markSeen(jsAst.BaseVisitor visitor) {
     _rc++;
     if (_rc == 1) entry.accept(visitor);
   }
 
+  @override
   int compareTo(covariant _MetadataEntry other) => other._rc - this._rc;
 
+  @override
   String toString() => '_BoundMetadataEntry($hashCode,rc=$_rc,_value=$_value)';
 }
 
@@ -78,11 +86,13 @@
     _value = value;
   }
 
+  @override
   jsAst.Expression get value {
     assert(_value != null);
     return _value;
   }
 
+  @override
   int get precedenceLevel => js_precedence.PRIMARY;
 }
 
diff --git a/pkg/compiler/lib/src/js_emitter/model.dart b/pkg/compiler/lib/src/js_emitter/model.dart
index 9fb47bc..247a1ef 100644
--- a/pkg/compiler/lib/src/js_emitter/model.dart
+++ b/pkg/compiler/lib/src/js_emitter/model.dart
@@ -83,6 +83,7 @@
   Holder(this.name, this.index,
       {this.isStaticStateHolder: false, this.isConstantsHolder: false});
 
+  @override
   String toString() {
     return 'Holder(name=${name})';
   }
@@ -136,8 +137,10 @@
       : super(outputUnit, outputFileName, libraries, staticNonFinalFields,
             staticLazilyInitializedFields, constants);
 
+  @override
   bool get isMainFragment => true;
 
+  @override
   String toString() {
     return 'MainFragment()';
   }
@@ -158,8 +161,10 @@
       : super(outputUnit, outputFileName, libraries, staticNonFinalFields,
             staticLazilyInitializedFields, constants);
 
+  @override
   bool get isMainFragment => false;
 
+  @override
   String toString() {
     return 'DeferredFragment(name=${name})';
   }
@@ -172,6 +177,7 @@
 
   Constant(this.name, this.holder, this.value);
 
+  @override
   String toString() {
     return 'Constant(name=${name.key},value=${value.toStructuredText()})';
   }
@@ -190,11 +196,13 @@
   final List<StaticMethod> statics;
   final List<Class> classes;
 
+  @override
   final List<Field> staticFieldsForReflection;
 
   Library(this.element, this.uri, this.statics, this.classes,
       this.staticFieldsForReflection);
 
+  @override
   String toString() {
     return 'Library(uri=${uri},element=${element})';
   }
@@ -213,10 +221,12 @@
   final js.Expression code;
   final bool isFinal;
   final bool isLazy;
+  final bool isInitializedByConstant;
 
   StaticField(this.element, this.name, this.getterName, this.holder, this.code,
-      this.isFinal, this.isLazy);
+      {this.isFinal, this.isLazy, this.isInitializedByConstant: false});
 
+  @override
   String toString() {
     return 'StaticField(name=${name.key},element=${element})';
   }
@@ -241,6 +251,7 @@
 
   /// noSuchMethod stubs in the special case that the class is Object.
   final List<StubMethod> noSuchMethodStubs;
+  @override
   final List<Field> staticFieldsForReflection;
   final bool hasRtiField; // Per-instance runtime type information pseudo-field.
   final bool onlyForRti;
@@ -315,6 +326,7 @@
   int get superclassHolderIndex =>
       (superclass == null) ? 0 : superclass.holder.index;
 
+  @override
   String toString() => 'Class(name=${name.key},element=$element)';
 }
 
@@ -351,8 +363,10 @@
             isClosureBaseClass: false,
             isSuperMixinApplication: false);
 
+  @override
   bool get isSimpleMixinApplication => true;
 
+  @override
   String toString() => 'Mixin(name=${name.key},element=$element)';
 }
 
@@ -384,6 +398,8 @@
 
   final ConstantValue initializerInAllocator;
 
+  final ConstantValue constantValue;
+
   final bool isElided;
 
   // TODO(floitsch): support renamed fields.
@@ -395,6 +411,7 @@
       this.setterFlags,
       this.needsCheckedSetter,
       this.initializerInAllocator,
+      this.constantValue,
       this.isElided);
 
   bool get needsGetter => getterFlags != 0;
@@ -409,6 +426,7 @@
   bool get needsInterceptedGetterOnThis => getterFlags == 3;
   bool get needsInterceptedSetterOnThis => setterFlags == 3;
 
+  @override
   String toString() {
     return 'Field(name=${name.key},element=${element})';
   }
@@ -516,8 +534,10 @@
     assert(isClosureCallMethod != null);
   }
 
+  @override
   bool get isStatic => false;
 
+  @override
   String toString() {
     return 'InstanceMethod(name=${name.key},element=${element}'
         ',code=${js.nodeToString(code)})';
@@ -531,6 +551,7 @@
   StubMethod(js.Name name, js.Expression code, {MemberEntity element})
       : super(element, name, code);
 
+  @override
   String toString() {
     return 'StubMethod(name=${name.key},element=${element}'
         ',code=${js.nodeToString(code)})';
@@ -558,6 +579,7 @@
       {MemberEntity element})
       : super(name, code, element: element);
 
+  @override
   String toString() {
     return 'ParameterStubMethod(name=${name.key}, callName=${callName?.key}'
         ', element=${element}'
@@ -570,6 +592,7 @@
 }
 
 class StaticDartMethod extends DartMethod implements StaticMethod {
+  @override
   final Holder holder;
 
   StaticDartMethod(
@@ -595,8 +618,10 @@
             functionType: functionType,
             applyIndex: applyIndex);
 
+  @override
   bool get isStatic => true;
 
+  @override
   String toString() {
     return 'StaticDartMethod(name=${name.key},element=${element}'
         ',code=${js.nodeToString(code)})';
@@ -604,10 +629,12 @@
 }
 
 class StaticStubMethod extends StubMethod implements StaticMethod {
+  @override
   Holder holder;
   StaticStubMethod(js.Name name, this.holder, js.Expression code)
       : super(name, code);
 
+  @override
   String toString() {
     return 'StaticStubMethod(name=${name.key},element=${element}}'
         ',code=${js.nodeToString(code)})';
diff --git a/pkg/compiler/lib/src/js_emitter/program_builder/collector.dart b/pkg/compiler/lib/src/js_emitter/program_builder/collector.dart
index e57a3ab..d0e09c8 100644
--- a/pkg/compiler/lib/src/js_emitter/program_builder/collector.dart
+++ b/pkg/compiler/lib/src/js_emitter/program_builder/collector.dart
@@ -263,21 +263,36 @@
   void computeNeededStaticNonFinalFields() {
     addToOutputUnit(FieldEntity element) {
       List<FieldEntity> list = outputStaticNonFinalFieldLists.putIfAbsent(
-          // ignore: UNNECESSARY_CAST
-          _outputUnitData.outputUnitForMember(element as MemberEntity),
+          _outputUnitData.outputUnitForMember(element),
           () => new List<FieldEntity>());
       list.add(element);
     }
 
-    Iterable<FieldEntity> fields =
+    List<FieldEntity> fields =
         // TODO(johnniwinther): This should be accessed from a codegen closed
         // world.
         _worldBuilder.allReferencedStaticFields.where((FieldEntity field) {
-      return field.isAssignable &&
-          _worldBuilder.hasConstantFieldInitializer(field);
-    });
+      return _closedWorld.fieldAnalysis.getFieldData(field).isEager;
+    }).toList();
 
-    _sorter.sortMembers(fields).forEach((MemberEntity e) => addToOutputUnit(e));
+    fields.sort((FieldEntity a, FieldEntity b) {
+      FieldAnalysisData aFieldData = _closedWorld.fieldAnalysis.getFieldData(a);
+      FieldAnalysisData bFieldData = _closedWorld.fieldAnalysis.getFieldData(b);
+      int aIndex = aFieldData.eagerCreationIndex;
+      int bIndex = bFieldData.eagerCreationIndex;
+      if (aIndex != null && bIndex != null) {
+        return aIndex.compareTo(bIndex);
+      } else if (aIndex != null) {
+        // Sort [b] before [a].
+        return 1;
+      } else if (bIndex != null) {
+        // Sort [a] before [b].
+        return -1;
+      } else {
+        return _sorter.compareMembersByLocation(a, b);
+      }
+    });
+    fields.forEach(addToOutputUnit);
   }
 
   void computeNeededLibraries() {
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 b981d83..f5b5b0c 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
@@ -18,7 +18,8 @@
 import '../../elements/types.dart';
 import '../../io/source_information.dart';
 import '../../js/js.dart' as js;
-import '../../js_backend/allocator_analysis.dart' show JAllocatorAnalysis;
+import '../../js_backend/field_analysis.dart'
+    show FieldAnalysisData, JFieldAnalysis;
 import '../../js_backend/backend.dart' show SuperMemberData;
 import '../../js_backend/backend_usage.dart';
 import '../../js_backend/constant_handler_javascript.dart'
@@ -79,7 +80,7 @@
   final Namer _namer;
   final CodeEmitterTask _task;
   final JClosedWorld _closedWorld;
-  final JAllocatorAnalysis _allocatorAnalysis;
+  final JFieldAnalysis _fieldAnalysis;
   final InferredData _inferredData;
   final SourceInformationStrategy _sourceInformationStrategy;
 
@@ -123,7 +124,7 @@
       this._namer,
       this._task,
       this._closedWorld,
-      this._allocatorAnalysis,
+      this._fieldAnalysis,
       this._inferredData,
       this._sourceInformationStrategy,
       this._sorter,
@@ -406,23 +407,30 @@
   }
 
   StaticField _buildStaticField(FieldEntity element) {
-    ConstantValue initialValue =
-        _worldBuilder.getConstantFieldInitializer(element);
-    // TODO(zarah): The holder should not be registered during building of
-    // a static field.
-    _registry.registerHolder(_namer.globalObjectForConstant(initialValue),
-        isConstantsHolder: true);
-    js.Expression code = _task.emitter.constantReference(initialValue);
+    FieldAnalysisData fieldData = _fieldAnalysis.getFieldData(element);
+    ConstantValue initialValue = fieldData.initialValue;
+    js.Expression code;
+    if (initialValue != null) {
+      // TODO(zarah): The holder should not be registered during building of
+      // a static field.
+      _registry.registerHolder(_namer.globalObjectForConstant(initialValue),
+          isConstantsHolder: true);
+      code = _task.emitter.constantReference(initialValue);
+    } else {
+      assert(fieldData.isEager);
+      code = _generatedCode[element];
+    }
     js.Name name = _namer.globalPropertyNameForMember(element);
-    bool isFinal = false;
-    bool isLazy = false;
 
     // TODO(floitsch): we shouldn't update the registry in the middle of
     // building a static field. (Note that the static-state holder was
     // already registered earlier, and that we just call the register to get
     // the holder-instance.
-    return new StaticField(element, name, null, _registerStaticStateHolder(),
-        code, isFinal, isLazy);
+    return new StaticField(
+        element, name, null, _registerStaticStateHolder(), code,
+        isFinal: false,
+        isLazy: false,
+        isInitializedByConstant: initialValue != null);
   }
 
   List<StaticField> _buildStaticLazilyInitializedFields(
@@ -448,14 +456,13 @@
 
     js.Name name = _namer.globalPropertyNameForMember(element);
     js.Name getterName = _namer.lazyInitializerName(element);
-    bool isFinal = !element.isAssignable;
-    bool isLazy = true;
     // TODO(floitsch): we shouldn't update the registry in the middle of
     // building a static field. (Note that the static-state holder was
     // already registered earlier, and that we just call the register to get
     // the holder-instance.
-    return new StaticField(element, name, getterName,
-        _registerStaticStateHolder(), code, isFinal, isLazy);
+    return new StaticField(
+        element, name, getterName, _registerStaticStateHolder(), code,
+        isFinal: !element.isAssignable, isLazy: true);
   }
 
   List<Library> _buildLibraries(LibrariesMap librariesMap) {
@@ -701,12 +708,16 @@
     if (!onlyForRti) {
       if (_elementEnvironment.isSuperMixinApplication(cls)) {
         List<MemberEntity> members = <MemberEntity>[];
-        _elementEnvironment.forEachLocalClassMember(cls, (MemberEntity member) {
+        void add(MemberEntity member) {
           if (member.enclosingClass == cls) {
             members.add(member);
             isSuperMixinApplication = true;
           }
-        });
+        }
+
+        _elementEnvironment.forEachLocalClassMember(cls, add);
+        _elementEnvironment.forEachInjectedClassMember(cls, add);
+
         if (members.isNotEmpty) {
           _sorter.sortMembers(members).forEach(visitMember);
         }
@@ -754,7 +765,13 @@
           assert(!field.needsUncheckedSetter);
           FieldEntity element = field.element;
           js.Expression code = _generatedCode[element];
-          assert(code != null);
+          if (code == null) {
+            // TODO(johnniwinther): Static types are not honoured in the dynamic
+            // uses created in codegen, leading to dead code, as known by the
+            // closed world computation, being triggered by the codegen
+            // enqueuer. We cautiously generate an empty function for this case.
+            code = js.js("function() {}");
+          }
           js.Name name = _namer.deriveSetterName(field.accessorName);
           checkedSetters.add(_buildStubMethod(name, code, element: element));
         }
@@ -1067,9 +1084,14 @@
         }
       }
 
-      ConstantValue initializerInAllocator = null;
-      if (_allocatorAnalysis.isInitializedInAllocator(field)) {
-        initializerInAllocator = _allocatorAnalysis.initializerValue(field);
+      FieldAnalysisData fieldData = _fieldAnalysis.getFieldData(field);
+      ConstantValue initializerInAllocator;
+      if (fieldData.isInitializedInAllocator) {
+        initializerInAllocator = fieldData.initialValue;
+      }
+      ConstantValue constantValue;
+      if (fieldData.isEffectivelyConstant) {
+        constantValue = fieldData.constantValue;
       }
 
       fields.add(new Field(
@@ -1080,7 +1102,8 @@
           setterFlags,
           needsCheckedSetter,
           initializerInAllocator,
-          _closedWorld.elidedFields.contains(field)));
+          constantValue,
+          fieldData.isElided));
     }
 
     FieldVisitor visitor = new FieldVisitor(_options, _elementEnvironment,
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 f6be1c1..75acab7 100644
--- a/pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart
@@ -41,6 +41,7 @@
 class Emitter extends emitterTask.EmitterBase {
   final Compiler _compiler;
   final JClosedWorld _closedWorld;
+  @override
   final Namer namer;
   final ModelEmitter _emitter;
 
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 965e232..1cac12f 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
@@ -434,14 +434,16 @@
 
 // Instantiates all constants.
 #constants;
+
+// Emits the embedded globals. Due to type checks in eager initializers this is
+// needed before static non-final fields initializers.
+#embeddedGlobals;
+
 // Initializes the static non-final fields (with their constant values).
 #staticNonFinalFields;
 // Creates lazy getters for statics that must run initializers on first access.
 #lazyStatics;
 
-// Emits the embedded globals.
-#embeddedGlobals;
-
 // Sets up the native support.
 // Native-support uses setOrUpdateInterceptorsByTag and setOrUpdateLeafTags.
 #nativeSupport;
@@ -1078,17 +1080,31 @@
   Method generateGetter(Field field) {
     assert(field.needsGetter);
 
-    String template;
-    if (field.needsInterceptedGetterOnReceiver) {
-      template = "function(receiver) { return receiver[#]; }";
-    } else if (field.needsInterceptedGetterOnThis) {
-      template = "function(receiver) { return this[#]; }";
+    js.Expression code;
+    if (field.isElided) {
+      ConstantValue constantValue = field.constantValue;
+      if (constantValue == null) {
+        // TODO(johnniwinther): Static types are not honoured in the dynamic
+        // uses created in codegen, leading to dead code, as known by the closed
+        // world computation, being triggered by the codegen enqueuer. We
+        // cautiously generate a null constant for this case.
+        constantValue = new NullConstantValue();
+      }
+      code = js.js(
+          "function() { return #; }", generateConstantReference(constantValue));
     } else {
-      assert(!field.needsInterceptedGetter);
-      template = "function() { return this[#]; }";
+      String template;
+      if (field.needsInterceptedGetterOnReceiver) {
+        template = "function(receiver) { return receiver[#]; }";
+      } else if (field.needsInterceptedGetterOnThis) {
+        template = "function(receiver) { return this[#]; }";
+      } else {
+        assert(!field.needsInterceptedGetter);
+        template = "function() { return this[#]; }";
+      }
+      js.Expression fieldName = js.quoteName(field.name);
+      code = js.js(template, fieldName);
     }
-    js.Expression fieldName = js.quoteName(field.name);
-    js.Expression code = js.js(template, fieldName);
     js.Name getterName = namer.deriveGetterName(field.accessorName);
     return new StubMethod(getterName, code);
   }
@@ -1589,8 +1605,43 @@
     //
     Iterable<js.Statement> statements = fields.map((StaticField field) {
       assert(field.holder.isStaticStateHolder);
-      js.Statement statement = js.js
-          .statement("#.# = #;", [field.holder.name, field.name, field.code]);
+      js.Statement statement;
+      if (field.isInitializedByConstant) {
+        statement = js.js
+            .statement("#.# = #;", [field.holder.name, field.name, field.code]);
+      } else {
+        // This is a bit of a hack. Field initializers are generated as a
+        // function ending with a return statement. We replace the function
+        // with the body block and replace the return statement with an
+        // assignment to the field.
+        //
+        // Since unneeded blocks are not generated in the output,
+        // the statement(s) of the initializes are inlined in the emitted code.
+        //
+        // This is a cheap way of supporting eager fields (as opposed to
+        // generating one SSA graph for all eager fields) though it does not
+        // avoid redundant declaration of local variable, for instance for
+        // type arguments.
+        js.Fun code = field.code;
+        if (code.params.isEmpty &&
+            code.body.statements.length == 1 &&
+            code.body.statements.last is js.Return) {
+          // For now we only support initializers of the form
+          //
+          //   function() { return e; }
+          //
+          // To avoid unforeseen consequences of having parameters and locals
+          // in the initializer code.
+          js.Return last = code.body.statements.last;
+          statement = js.js.statement(
+              "#.# = #;", [field.holder.name, field.name, last.value]);
+        } else {
+          // Safe fallback in the event of a field initializer with no return
+          // statement as the last statement.
+          statement = js.js
+              .statement("#.# = #();", [field.holder.name, field.name, code]);
+        }
+      }
       registerEntityAst(field.element, statement,
           library: field.element.library);
       return statement;
@@ -1941,10 +1992,12 @@
     _value = value;
   }
 
+  @override
   js.Expression get value {
     assert(_value != null);
     return _value;
   }
 
+  @override
   int get precedenceLevel => js_precedence.PRIMARY;
 }
diff --git a/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart b/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart
index d091e73..3233491 100644
--- a/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart
@@ -32,7 +32,8 @@
 import '../../../compiler_new.dart';
 import '../../common.dart';
 import '../../compiler.dart' show Compiler;
-import '../../constants/values.dart' show ConstantValue, FunctionConstantValue;
+import '../../constants/values.dart'
+    show ConstantValue, FunctionConstantValue, NullConstantValue;
 import '../../common_elements.dart' show CommonElements;
 import '../../elements/entities.dart';
 import '../../hash/sha1.dart' show Hasher;
@@ -89,7 +90,7 @@
         compiler.codegenWorldBuilder,
         _closedWorld.rtiNeed,
         compiler.backend.rtiEncoder,
-        _closedWorld.allocatorAnalysis,
+        _closedWorld.fieldAnalysis,
         task,
         this.generateConstantReference,
         constantListGenerator);
diff --git a/pkg/compiler/lib/src/js_model/closure.dart b/pkg/compiler/lib/src/js_model/closure.dart
index 5057b6a..d3295fe 100644
--- a/pkg/compiler/lib/src/js_model/closure.dart
+++ b/pkg/compiler/lib/src/js_model/closure.dart
@@ -7,7 +7,6 @@
 import '../closure.dart';
 import '../common.dart';
 import '../constants/expressions.dart';
-import '../constants/values.dart';
 import '../elements/entities.dart';
 import '../elements/names.dart' show Name;
 import '../elements/types.dart';
@@ -65,6 +64,7 @@
   }
 
   /// Serializes this [ClosureData] to [sink].
+  @override
   void writeToDataSink(DataSink sink) {
     sink.begin(tag);
     sink.writeMemberMap(
@@ -259,6 +259,12 @@
               return true;
             }
             break;
+          case VariableUseKind.setLiteral:
+            if (rtiNeed.classNeedsTypeArguments(
+                _elementMap.commonElements.setLiteralClass)) {
+              return true;
+            }
+            break;
           case VariableUseKind.mapLiteral:
             if (rtiNeed.classNeedsTypeArguments(
                 _elementMap.commonElements.mapLiteralClass)) {
@@ -425,6 +431,7 @@
   static const String tag = 'scope-info';
 
   final Iterable<Local> localsUsedInTryOrSync;
+  @override
   final Local thisLocal;
   final Map<Local, JRecordField> boxedVariables;
 
@@ -450,15 +457,18 @@
     }
   }
 
+  @override
   void forEachBoxedVariable(f(Local local, FieldEntity field)) {
     boxedVariables.forEach((Local l, JRecordField box) {
       f(l, box);
     });
   }
 
+  @override
   bool localIsUsedInTryOrSync(Local variable) =>
       localsUsedInTryOrSync.contains(variable);
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write('this=$thisLocal,');
@@ -466,6 +476,7 @@
     return sb.toString();
   }
 
+  @override
   bool isBoxedVariable(Local variable) => boxedVariables.containsKey(variable);
 
   factory JsScopeInfo.readFromDataSource(DataSource source) {
@@ -497,6 +508,7 @@
   /// debugging data stream.
   static const String tag = 'captured-scope';
 
+  @override
   final Local context;
 
   JsCapturedScope.internal(
@@ -517,6 +529,7 @@
             boxedVariables.isNotEmpty ? boxedVariables.values.first.box : null,
         super.from(boxedVariables, capturedScope, localsMap, elementMap);
 
+  @override
   bool get requiresContextBox => boxedVariables.isNotEmpty;
 
   factory JsCapturedScope.readFromDataSource(DataSource source) {
@@ -550,6 +563,7 @@
   /// debugging data stream.
   static const String tag = 'captured-loop-scope';
 
+  @override
   final List<Local> boxedLoopVariables;
 
   JsCapturedLoopScope.internal(
@@ -572,6 +586,7 @@
             .toList(),
         super.from(boxedVariables, capturedScope, localsMap, elementMap);
 
+  @override
   bool get hasBoxedLoopVariables => boxedLoopVariables.isNotEmpty;
 
   factory JsCapturedLoopScope.readFromDataSource(DataSource source) {
@@ -610,10 +625,14 @@
   /// debugging data stream.
   static const String tag = 'closure-representation-info';
 
+  @override
   JFunction callMethod;
   JSignatureMethod signatureMethod;
+  @override
   final Local closureEntity;
+  @override
   final Local thisLocal;
+  @override
   final JClass closureClassEntity;
 
   final Map<Local, JField> localToFieldMap;
@@ -669,6 +688,7 @@
         localToFieldMap);
   }
 
+  @override
   void writeToDataSink(DataSink sink) {
     sink.writeEnum(ScopeInfoKind.closureRepresentationInfo);
     sink.begin(tag);
@@ -684,6 +704,7 @@
     sink.end(tag);
   }
 
+  @override
   List<Local> get createdFieldEntities => localToFieldMap.keys.toList();
 
   @override
@@ -697,13 +718,16 @@
     return null;
   }
 
+  @override
   FieldEntity get thisFieldEntity => localToFieldMap[thisLocal];
 
+  @override
   void forEachFreeVariable(f(Local variable, JField field)) {
     localToFieldMap.forEach(f);
     boxedVariables.forEach(f);
   }
 
+  @override
   bool get isClosure => true;
 }
 
@@ -723,6 +747,7 @@
     return new JClosureClass(library, name);
   }
 
+  @override
   void writeToDataSink(DataSink sink) {
     sink.writeEnum(JClassKind.closure);
     sink.begin(tag);
@@ -734,6 +759,7 @@
   @override
   bool get isClosure => true;
 
+  @override
   String toString() => '${jsElementPrefix}closure_class($name)';
 }
 
@@ -742,16 +768,20 @@
 
   AnonymousClosureLocal(this.closureClass);
 
+  @override
   String get name => '';
 
+  @override
   int get hashCode => closureClass.hashCode * 13;
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! AnonymousClosureLocal) return false;
     return closureClass == other.closureClass;
   }
 
+  @override
   String toString() =>
       '${jsElementPrefix}anonymous_closure_local(${closureClass.name})';
 }
@@ -761,6 +791,7 @@
   /// debugging data stream.
   static const String tag = 'closure-field';
 
+  @override
   final String declaredName;
 
   JClosureField(
@@ -889,6 +920,7 @@
     return new JRecord(library, name);
   }
 
+  @override
   void writeToDataSink(DataSink sink) {
     sink.writeEnum(JClassKind.record);
     sink.begin(tag);
@@ -897,8 +929,10 @@
     sink.end(tag);
   }
 
+  @override
   bool get isClosure => false;
 
+  @override
   String toString() => '${jsElementPrefix}record_container($name)';
 }
 
@@ -986,6 +1020,7 @@
   /// debugging data stream.
   static const String tag = 'closure-class-definition';
 
+  @override
   final SourceSpan location;
 
   ClosureClassDefinition(this.location);
@@ -1005,20 +1040,25 @@
     sink.end(tag);
   }
 
+  @override
   ClassKind get kind => ClassKind.closure;
 
+  @override
   ir.Node get node =>
       throw new UnsupportedError('ClosureClassDefinition.node for $location');
 
+  @override
   String toString() => 'ClosureClassDefinition(kind:$kind,location:$location)';
 }
 
 abstract class ClosureMemberData implements JMemberData {
+  @override
   final MemberDefinition definition;
   final InterfaceType memberThisType;
 
   ClosureMemberData(this.definition, this.memberThisType);
 
+  @override
   Map<ir.Expression, ir.DartType> get staticTypes {
     // The cached types are stored in the data for enclosing member.
     throw new UnsupportedError("ClosureMemberData.staticTypes");
@@ -1038,7 +1078,9 @@
   static const String tag = 'closure-function-data';
 
   final FunctionType functionType;
+  @override
   final ir.FunctionNode functionNode;
+  @override
   final ClassTypeVariableAccess classTypeVariableAccess;
 
   ClosureFunctionData(
@@ -1063,6 +1105,7 @@
         functionNode, classTypeVariableAccess);
   }
 
+  @override
   void writeToDataSink(DataSink sink) {
     sink.writeEnum(JMemberDataKind.closureFunction);
     sink.begin(tag);
@@ -1099,6 +1142,7 @@
     return new ClosureFieldData(definition, memberThisType);
   }
 
+  @override
   void writeToDataSink(DataSink sink) {
     sink.writeEnum(JMemberDataKind.closureField);
     sink.begin(tag);
@@ -1143,25 +1187,6 @@
   }
 
   @override
-  ConstantValue getConstantFieldInitializer(IrToElementMap elementMap) {
-    failedAt(
-        definition.location,
-        "Unexpected field ${definition} in "
-        "ClosureFieldData.getConstantFieldInitializer");
-    return null;
-  }
-
-  @override
-  bool hasConstantFieldInitializer(IrToElementMap elementMap) {
-    return false;
-  }
-
-  @override
-  ConstantValue getFieldConstantValue(IrToElementMap elementMap) {
-    return null;
-  }
-
-  @override
   ClassTypeVariableAccess get classTypeVariableAccess =>
       ClassTypeVariableAccess.none;
 }
@@ -1171,8 +1196,11 @@
   /// debugging data stream.
   static const String tag = 'closure-member-definition';
 
+  @override
   final SourceSpan location;
+  @override
   final MemberKind kind;
+  @override
   final ir.TreeNode node;
 
   ClosureMemberDefinition(this.location, this.kind, this.node)
@@ -1188,6 +1216,7 @@
     return new ClosureMemberDefinition(location, kind, node);
   }
 
+  @override
   void writeToDataSink(DataSink sink) {
     sink.writeEnum(kind);
     sink.begin(tag);
@@ -1196,6 +1225,7 @@
     sink.end(tag);
   }
 
+  @override
   String toString() => 'ClosureMemberDefinition(kind:$kind,location:$location)';
 }
 
@@ -1204,6 +1234,7 @@
   /// a debugging data stream.
   static const String tag = 'record-definition';
 
+  @override
   final SourceSpan location;
 
   RecordContainerDefinition(this.location);
@@ -1223,11 +1254,14 @@
     sink.end(tag);
   }
 
+  @override
   ClassKind get kind => ClassKind.record;
 
+  @override
   ir.Node get node => throw new UnsupportedError(
       'RecordContainerDefinition.node for $location');
 
+  @override
   String toString() =>
       'RecordContainerDefinition(kind:$kind,location:$location)';
 }
diff --git a/pkg/compiler/lib/src/js_model/element_map.dart b/pkg/compiler/lib/src/js_model/element_map.dart
index b495237..2afbce4 100644
--- a/pkg/compiler/lib/src/js_model/element_map.dart
+++ b/pkg/compiler/lib/src/js_model/element_map.dart
@@ -144,10 +144,6 @@
   js.Template getJsBuiltinTemplate(
       ConstantValue constant, CodeEmitterTask emitter);
 
-  /// Return the [ConstantValue] the initial value of [field] or `null` if
-  /// the initializer is not a constant expression.
-  ConstantValue getFieldConstantValue(FieldEntity field);
-
   /// Returns a [Spannable] for a message pointing to the IR [node] in the
   /// context of [member].
   Spannable getSpannable(MemberEntity member, ir.Node node);
@@ -388,6 +384,7 @@
   /// debugging data stream.
   static const String tag = 'regular-member-definition';
 
+  @override
   final ir.Member node;
 
   RegularMemberDefinition(this.node);
@@ -407,10 +404,13 @@
     sink.end(tag);
   }
 
+  @override
   SourceSpan get location => computeSourceSpanFromTreeNode(node);
 
+  @override
   MemberKind get kind => MemberKind.regular;
 
+  @override
   String toString() => 'RegularMemberDefinition(kind:$kind,'
       'node:$node,location:$location)';
 }
@@ -421,7 +421,9 @@
   /// debugging data stream.
   static const String tag = 'special-member-definition';
 
+  @override
   final ir.TreeNode node;
+  @override
   final MemberKind kind;
 
   SpecialMemberDefinition(this.node, this.kind);
@@ -442,8 +444,10 @@
     sink.end(tag);
   }
 
+  @override
   SourceSpan get location => computeSourceSpanFromTreeNode(node);
 
+  @override
   String toString() => 'SpecialMemberDefinition(kind:$kind,'
       'node:$node,location:$location)';
 }
@@ -484,6 +488,7 @@
   /// debugging data stream.
   static const String tag = 'regular-class-definition';
 
+  @override
   final ir.Class node;
 
   RegularClassDefinition(this.node);
@@ -495,6 +500,7 @@
     return new RegularClassDefinition(node);
   }
 
+  @override
   void writeToDataSink(DataSink sink) {
     sink.writeEnum(kind);
     sink.begin(tag);
@@ -502,10 +508,13 @@
     sink.end(tag);
   }
 
+  @override
   SourceSpan get location => computeSourceSpanFromTreeNode(node);
 
+  @override
   ClassKind get kind => ClassKind.regular;
 
+  @override
   String toString() => 'RegularClassDefinition(kind:$kind,'
       'node:$node,location:$location)';
 }
diff --git a/pkg/compiler/lib/src/js_model/element_map_impl.dart b/pkg/compiler/lib/src/js_model/element_map_impl.dart
index ad03cc0..657dadf 100644
--- a/pkg/compiler/lib/src/js_model/element_map_impl.dart
+++ b/pkg/compiler/lib/src/js_model/element_map_impl.dart
@@ -16,7 +16,6 @@
 import '../common/names.dart';
 import '../common_elements.dart';
 import '../compile_time_constants.dart';
-import '../constants/constant_system.dart';
 import '../constants/constructors.dart';
 import '../constants/evaluation.dart';
 import '../constants/expressions.dart';
@@ -37,7 +36,7 @@
 import '../ir/static_type_provider.dart';
 import '../ir/util.dart';
 import '../js/js.dart' as js;
-import '../js_backend/constant_system_javascript.dart';
+import '../js_backend/annotations.dart';
 import '../js_backend/namer.dart';
 import '../js_backend/native_data.dart';
 import '../js_emitter/code_emitter_task.dart';
@@ -61,12 +60,6 @@
 
 /// Interface for kernel queries needed to implement the [CodegenWorldBuilder].
 abstract class JsToWorldBuilder implements JsToElementMap {
-  /// Returns `true` if [field] has a constant initializer.
-  bool hasConstantFieldInitializer(FieldEntity field);
-
-  /// Returns the constant initializer for [field].
-  ConstantValue getConstantFieldInitializer(FieldEntity field);
-
   /// Calls [f] for each parameter of [function] providing the type and name of
   /// the parameter and the [defaultValue] if the parameter is optional.
   void forEachParameter(FunctionEntity function,
@@ -95,6 +88,7 @@
   static const String nestedClosuresTag = 'nested-closures';
 
   final CompilerOptions options;
+  @override
   final DiagnosticReporter reporter;
   CommonElementsImpl _commonElements;
   JsElementEnvironment _elementEnvironment;
@@ -149,7 +143,8 @@
       this.reporter,
       Environment environment,
       KernelToElementMapImpl _elementMap,
-      Map<MemberEntity, MemberUsage> liveMemberUsage)
+      Map<MemberEntity, MemberUsage> liveMemberUsage,
+      AnnotationsData annotations)
       : this.options = _elementMap.options {
     _elementEnvironment = new JsElementEnvironment(this);
     _commonElements = new CommonElementsImpl(_elementEnvironment);
@@ -221,8 +216,8 @@
       LibraryEntity newLibrary = libraries.getEntity(oldLibrary.libraryIndex);
       ClassEntity newClass =
           oldClass != null ? classes.getEntity(oldClass.classIndex) : null;
-      IndexedMember newMember =
-          convertMember(newLibrary, newClass, oldMember, memberUsage);
+      IndexedMember newMember = convertMember(
+          newLibrary, newClass, oldMember, memberUsage, annotations);
       members.register(newMember, data.convert());
       assert(
           newMember.memberIndex == oldMember.memberIndex,
@@ -489,8 +484,10 @@
     sink.end(tag);
   }
 
+  @override
   DartTypes get types => _types;
 
+  @override
   JsElementEnvironment get elementEnvironment => _elementEnvironment;
 
   @override
@@ -603,11 +600,13 @@
     return new InterfaceType(getClass(cls), getDartTypes(typeArguments));
   }
 
+  @override
   LibraryEntity getLibrary(ir.Library node) => getLibraryInternal(node);
 
   @override
   ClassEntity getClass(ir.Class node) => getClassInternal(node);
 
+  @override
   InterfaceType getSuperType(IndexedClass cls) {
     assert(checkFamily(cls));
     JClassData data = classes.getData(cls);
@@ -638,6 +637,7 @@
     }
   }
 
+  @override
   TypeVariableEntity getTypeVariable(ir.TypeParameter node) =>
       getTypeVariableInternal(node);
 
@@ -738,6 +738,7 @@
     throw new UnsupportedError("Unexpected member: $node");
   }
 
+  @override
   MemberEntity getSuperMember(MemberEntity context, ir.Name name,
       {bool setter: false}) {
     // We can no longer trust the interface target of the super access since it
@@ -794,9 +795,11 @@
   @override
   DartType getDartType(ir.DartType type) => _typeConverter.convert(type);
 
+  @override
   TypeVariableType getTypeVariableType(ir.TypeParameterType type) =>
       getDartType(type);
 
+  @override
   List<DartType> getDartTypes(List<ir.DartType> types) {
     List<DartType> list = <DartType>[];
     types.forEach((ir.DartType type) {
@@ -805,6 +808,7 @@
     return list;
   }
 
+  @override
   InterfaceType getInterfaceType(ir.InterfaceType type) =>
       _typeConverter.convert(type);
 
@@ -882,6 +886,7 @@
         constantRequired: requireConstant);
   }
 
+  @override
   DartType substByContext(DartType type, InterfaceType context) {
     return type.subst(
         context.typeArguments, getThisType(context.element).typeArguments);
@@ -892,6 +897,7 @@
   /// If [type] doesn't have a `call` member `null` is returned. If [type] has
   /// an invalid `call` member (non-method or a synthesized method with both
   /// optional and named parameters) a [DynamicType] is returned.
+  @override
   DartType getCallType(InterfaceType type) {
     IndexedClass cls = type.element;
     assert(checkFamily(cls));
@@ -902,6 +908,7 @@
     return null;
   }
 
+  @override
   InterfaceType getThisType(IndexedClass cls) {
     assert(checkFamily(cls));
     JClassData data = classes.getData(cls);
@@ -934,6 +941,7 @@
     return data.getFieldType(this);
   }
 
+  @override
   DartType getTypeVariableBound(IndexedTypeVariable typeVariable) {
     assert(checkFamily(typeVariable));
     JTypeVariableData data = typeVariables.getData(typeVariable);
@@ -1019,6 +1027,7 @@
     return data.getFieldConstantExpression(this);
   }
 
+  @override
   InterfaceType asInstanceOf(InterfaceType type, ClassEntity cls) {
     assert(checkFamily(cls));
     OrderedTypeSet orderedTypeSet = getOrderedTypeSet(type.element);
@@ -1030,6 +1039,7 @@
     return supertype;
   }
 
+  @override
   OrderedTypeSet getOrderedTypeSet(IndexedClass cls) {
     assert(checkFamily(cls));
     JClassData data = classes.getData(cls);
@@ -1037,6 +1047,7 @@
     return data.orderedTypeSet;
   }
 
+  @override
   int getHierarchyDepth(IndexedClass cls) {
     assert(checkFamily(cls));
     JClassData data = classes.getData(cls);
@@ -1044,6 +1055,7 @@
     return data.orderedTypeSet.maxDepth;
   }
 
+  @override
   Iterable<InterfaceType> getInterfaces(IndexedClass cls) {
     assert(checkFamily(cls));
     JClassData data = classes.getData(cls);
@@ -1061,6 +1073,7 @@
     return classes.getData(cls).definition;
   }
 
+  @override
   ImportEntity getImport(ir.LibraryDependency node) {
     ir.Library library = node.parent;
     JLibraryData data = libraries.getData(getLibraryInternal(library));
@@ -1082,6 +1095,7 @@
     return _classHierarchy;
   }
 
+  @override
   StaticTypeProvider getStaticTypeProvider(MemberEntity member) {
     MemberDefinition memberDefinition = members.getData(member).definition;
     Map<ir.Expression, ir.DartType> cachedStaticTypes;
@@ -1118,11 +1132,13 @@
         new ThisInterfaceType.from(thisType));
   }
 
+  @override
   Name getName(ir.Name name) {
     return new Name(
         name.name, name.isPrivate ? getLibrary(name.library) : null);
   }
 
+  @override
   CallStructure getCallStructure(ir.Arguments arguments) {
     int argumentCount = arguments.positional.length + arguments.named.length;
     List<String> namedArguments = arguments.named.map((e) => e.name).toList();
@@ -1130,6 +1146,7 @@
         argumentCount, namedArguments, arguments.types.length);
   }
 
+  @override
   Selector getSelector(ir.Expression node) {
     // TODO(efortuna): This is screaming for a common interface between
     // PropertyGet and SuperPropertyGet (and same for *Get). Talk to kernel
@@ -1262,8 +1279,8 @@
     return node.arguments.positional[index].accept(new Stringifier());
   }
 
-  /// Computes the [native.NativeBehavior] for a call to the [JS] function.
   // TODO(johnniwinther): Cache this for later use.
+  @override
   NativeBehavior getNativeBehaviorForJsCall(ir.StaticInvocation node) {
     if (node.arguments.positional.length < 2 ||
         node.arguments.named.isNotEmpty) {
@@ -1294,9 +1311,8 @@
         commonElements);
   }
 
-  /// Computes the [NativeBehavior] for a call to the [JS_BUILTIN]
-  /// function.
   // TODO(johnniwinther): Cache this for later use.
+  @override
   NativeBehavior getNativeBehaviorForJsBuiltinCall(ir.StaticInvocation node) {
     if (node.arguments.positional.length < 1) {
       reporter.internalError(
@@ -1322,9 +1338,8 @@
         commonElements);
   }
 
-  /// Computes the [NativeBehavior] for a call to the
-  /// [JS_EMBEDDED_GLOBAL] function.
   // TODO(johnniwinther): Cache this for later use.
+  @override
   NativeBehavior getNativeBehaviorForJsEmbeddedGlobalCall(
       ir.StaticInvocation node) {
     if (node.arguments.positional.length < 1) {
@@ -1357,6 +1372,7 @@
         commonElements);
   }
 
+  @override
   js.Name getNameForJsGetName(ConstantValue constant, Namer namer) {
     int index = extractEnumIndexFromConstantValue(
         constant, commonElements.jsGetNameEnum);
@@ -1379,8 +1395,13 @@
     return null;
   }
 
+  @override
   ConstantValue getConstantValue(ir.Expression node,
       {bool requireConstant: true, bool implicitNull: false}) {
+    if (node is ir.ConstantExpression) {
+      return node.constant.accept(new ConstantValuefier(this));
+    }
+
     ConstantExpression constant;
     if (node == null) {
       if (!implicitNull) {
@@ -1418,6 +1439,7 @@
     return metadata;
   }
 
+  @override
   FunctionEntity getSuperNoSuchMethod(ClassEntity cls) {
     while (cls != null) {
       cls = elementEnvironment.getSuperClass(cls);
@@ -1533,8 +1555,12 @@
     return createTypedef(library, typedef.name);
   }
 
-  MemberEntity convertMember(LibraryEntity library, ClassEntity cls,
-      IndexedMember member, MemberUsage memberUsage) {
+  MemberEntity convertMember(
+      LibraryEntity library,
+      ClassEntity cls,
+      IndexedMember member,
+      MemberUsage memberUsage,
+      AnnotationsData annotations) {
     Name memberName = new Name(member.memberName.text, library,
         isSetter: member.memberName.isSetter);
     if (member.isField) {
@@ -1545,17 +1571,19 @@
           isConst: field.isConst);
     } else if (member.isConstructor) {
       IndexedConstructor constructor = member;
+      ParameterStructure parameterStructure =
+          annotations.hasNoElision(constructor)
+              ? constructor.parameterStructure
+              : memberUsage.invokedParameters;
       if (constructor.isFactoryConstructor) {
         // TODO(redemption): This should be a JFunction.
-        return createFactoryConstructor(
-            cls, memberName, memberUsage.invokedParameters,
+        return createFactoryConstructor(cls, memberName, parameterStructure,
             isExternal: constructor.isExternal,
             isConst: constructor.isConst,
             isFromEnvironmentConstructor:
                 constructor.isFromEnvironmentConstructor);
       } else {
-        return createGenerativeConstructor(
-            cls, memberName, memberUsage.invokedParameters,
+        return createGenerativeConstructor(cls, memberName, parameterStructure,
             isExternal: constructor.isExternal, isConst: constructor.isConst);
       }
     } else if (member.isGetter) {
@@ -1572,8 +1600,11 @@
           isAbstract: setter.isAbstract);
     } else {
       IndexedFunction function = member;
-      return createMethod(library, cls, memberName,
-          memberUsage.invokedParameters, function.asyncMarker,
+      ParameterStructure parameterStructure = annotations.hasNoElision(function)
+          ? function.parameterStructure
+          : memberUsage.invokedParameters;
+      return createMethod(
+          library, cls, memberName, parameterStructure, function.asyncMarker,
           isStatic: function.isStatic,
           isExternal: function.isExternal,
           isAbstract: function.isAbstract);
@@ -1729,25 +1760,6 @@
   }
 
   @override
-  ConstantValue getFieldConstantValue(covariant IndexedField field) {
-    assert(checkFamily(field));
-    JFieldData data = members.getData(field);
-    return data.getFieldConstantValue(this);
-  }
-
-  @override
-  bool hasConstantFieldInitializer(covariant IndexedField field) {
-    JFieldData data = members.getData(field);
-    return data.hasConstantFieldInitializer(this);
-  }
-
-  @override
-  ConstantValue getConstantFieldInitializer(covariant IndexedField field) {
-    JFieldData data = members.getData(field);
-    return data.getConstantFieldInitializer(this);
-  }
-
-  @override
   void forEachParameter(covariant IndexedFunction function,
       void f(DartType type, String name, ConstantValue defaultValue),
       {bool isNative: false}) {
@@ -2466,9 +2478,13 @@
 
 /// [BehaviorBuilder] for kernel based elements.
 class JsBehaviorBuilder extends BehaviorBuilder {
+  @override
   final ElementEnvironment elementEnvironment;
+  @override
   final CommonElements commonElements;
+  @override
   final DiagnosticReporter reporter;
+  @override
   final NativeBasicData nativeBasicData;
   final CompilerOptions _options;
 
@@ -2491,17 +2507,13 @@
 
   JsConstantEnvironment(this._elementMap, this._environment);
 
-  @override
-  ConstantSystem get constantSystem => JavaScriptConstantSystem.only;
-
   ConstantValue _getConstantValue(
       Spannable spannable, ConstantExpression expression,
       {bool constantRequired}) {
     return _valueMap.putIfAbsent(expression, () {
-      return expression.evaluate(
-          new JsEvaluationEnvironment(_elementMap, _environment, spannable,
-              constantRequired: constantRequired),
-          constantSystem);
+      return expression.evaluate(new JsEvaluationEnvironment(
+          _elementMap, _environment, spannable,
+          constantRequired: constantRequired));
     });
   }
 }
diff --git a/pkg/compiler/lib/src/js_model/elements.dart b/pkg/compiler/lib/src/js_model/elements.dart
index 4afe45a..2818e69 100644
--- a/pkg/compiler/lib/src/js_model/elements.dart
+++ b/pkg/compiler/lib/src/js_model/elements.dart
@@ -20,7 +20,9 @@
   /// debugging data stream.
   static const String tag = 'library';
 
+  @override
   final String name;
+  @override
   final Uri canonicalUri;
 
   JLibrary(this.name, this.canonicalUri);
@@ -42,6 +44,7 @@
     sink.end(tag);
   }
 
+  @override
   String toString() => '${jsElementPrefix}library($name)';
 }
 
@@ -53,9 +56,12 @@
   /// debugging data stream.
   static const String tag = 'class';
 
+  @override
   final JLibrary library;
 
+  @override
   final String name;
+  @override
   final bool isAbstract;
 
   JClass(this.library, this.name, {this.isAbstract});
@@ -92,6 +98,7 @@
   @override
   bool get isClosure => false;
 
+  @override
   String toString() => '${jsElementPrefix}class($name)';
 }
 
@@ -100,8 +107,10 @@
   /// debugging data stream.
   static const String tag = 'typedef';
 
+  @override
   final JLibrary library;
 
+  @override
   final String name;
 
   JTypedef(this.library, this.name);
@@ -123,6 +132,7 @@
     sink.end(tag);
   }
 
+  @override
   String toString() => '${jsElementPrefix}typedef($name)';
 }
 
@@ -143,7 +153,9 @@
 }
 
 abstract class JMember extends IndexedMember {
+  @override
   final JLibrary library;
+  @override
   final JClass enclosingClass;
   final Name _name;
   final bool _isStatic;
@@ -186,8 +198,10 @@
   /// Serializes this [JMember] to [sink].
   void writeToDataSink(DataSink sink);
 
+  @override
   String get name => _name.text;
 
+  @override
   Name get memberName => _name;
 
   @override
@@ -225,14 +239,18 @@
 
   String get _kind;
 
+  @override
   String toString() => '${jsElementPrefix}$_kind'
       '(${enclosingClass != null ? '${enclosingClass.name}.' : ''}$name)';
 }
 
 abstract class JFunction extends JMember
     implements FunctionEntity, IndexedFunction {
+  @override
   final ParameterStructure parameterStructure;
+  @override
   final bool isExternal;
+  @override
   final AsyncMarker asyncMarker;
 
   JFunction(JLibrary library, JClass enclosingClass, Name name,
@@ -243,6 +261,7 @@
 
 abstract class JConstructor extends JFunction
     implements ConstructorEntity, IndexedConstructor {
+  @override
   final bool isConst;
 
   JConstructor(
@@ -267,6 +286,7 @@
   @override
   bool get isFromEnvironmentConstructor => false;
 
+  @override
   String get _kind => 'constructor';
 }
 
@@ -370,6 +390,7 @@
   /// debugging data stream.
   static const String tag = 'constructor-body';
 
+  @override
   final JConstructor constructor;
 
   JConstructorBody(this.constructor, ParameterStructure parameterStructure)
@@ -395,6 +416,7 @@
     sink.end(tag);
   }
 
+  @override
   String get _kind => 'constructor_body';
 }
 
@@ -403,6 +425,7 @@
   /// debugging data stream.
   static const String tag = 'method';
 
+  @override
   final bool isAbstract;
 
   JMethod(JLibrary library, JClass enclosingClass, Name name,
@@ -461,6 +484,7 @@
   @override
   bool get isFunction => true;
 
+  @override
   String get _kind => 'method';
 }
 
@@ -471,6 +495,7 @@
 
   final JFunction function;
   final DartType elementType;
+  @override
   final int hashCode;
 
   JGeneratorBody(this.function, this.elementType)
@@ -496,6 +521,7 @@
     sink.end(tag);
   }
 
+  @override
   String get _kind => 'generator_body';
 }
 
@@ -504,6 +530,7 @@
   /// debugging data stream.
   static const String tag = 'getter';
 
+  @override
   final bool isAbstract;
 
   JGetter(JLibrary library, JClass enclosingClass, Name name,
@@ -560,6 +587,7 @@
   @override
   bool get isGetter => true;
 
+  @override
   String get _kind => 'getter';
 }
 
@@ -568,6 +596,7 @@
   /// debugging data stream.
   static const String tag = 'setter';
 
+  @override
   final bool isAbstract;
 
   JSetter(JLibrary library, JClass enclosingClass, Name name,
@@ -624,6 +653,7 @@
   @override
   bool get isSetter => true;
 
+  @override
   String get _kind => 'setter';
 }
 
@@ -632,7 +662,9 @@
   /// debugging data stream.
   static const String tag = 'field';
 
+  @override
   final bool isAssignable;
+  @override
   final bool isConst;
 
   JField(JLibrary library, JClass enclosingClass, Name name,
@@ -683,6 +715,7 @@
   @override
   bool get isField => true;
 
+  @override
   String get _kind => 'field';
 }
 
@@ -718,6 +751,7 @@
     sink.end(tag);
   }
 
+  @override
   String get _kind => 'closure_call';
 }
 
@@ -740,6 +774,7 @@
     return new JSignatureMethod(cls);
   }
 
+  @override
   void writeToDataSink(DataSink sink) {
     sink.writeEnum(JMemberKind.signatureMethod);
     sink.begin(tag);
@@ -747,6 +782,7 @@
     sink.end(tag);
   }
 
+  @override
   String get _kind => 'signature';
 }
 
@@ -758,8 +794,11 @@
   /// debugging data stream.
   static const String tag = 'type-variable';
 
+  @override
   final Entity typeDeclaration;
+  @override
   final String name;
+  @override
   final int index;
 
   JTypeVariable(this.typeDeclaration, this.name, this.index);
@@ -818,6 +857,7 @@
     sink.end(tag);
   }
 
+  @override
   String toString() =>
       '${jsElementPrefix}type_variable(${typeDeclaration.name}.$name)';
 }
diff --git a/pkg/compiler/lib/src/js_model/env.dart b/pkg/compiler/lib/src/js_model/env.dart
index 17cc2e9..4bd4808 100644
--- a/pkg/compiler/lib/src/js_model/env.dart
+++ b/pkg/compiler/lib/src/js_model/env.dart
@@ -209,13 +209,13 @@
   MemberEntity lookupMember(IrToElementMap elementMap, String name,
       {bool setter: false});
 
-  /// Calls [f] for each member of the class.
+  /// Calls [f] for each member of [cls].
   void forEachMember(IrToElementMap elementMap, void f(MemberEntity member));
 
-  /// Return the [ConstructorEntity] for the constructor [name] in the class.
+  /// Return the [ConstructorEntity] for the constructor [name] in [cls].
   ConstructorEntity lookupConstructor(IrToElementMap elementMap, String name);
 
-  /// Calls [f] for each constructor of the class.
+  /// Calls [f] for each constructor of [cls].
   void forEachConstructor(
       IrToElementMap elementMap, void f(ConstructorEntity constructor));
 
@@ -230,11 +230,13 @@
   /// debugging data stream.
   static const String tag = 'class-env';
 
+  @override
   final ir.Class cls;
   final Map<String, ir.Member> _constructorMap;
   final Map<String, ir.Member> _memberMap;
   final Map<String, ir.Member> _setterMap;
   final List<ir.Member> _members; // in declaration order.
+  @override
   final bool isSuperMixinApplication;
 
   /// Constructor bodies created for this class.
@@ -272,31 +274,30 @@
     sink.end(tag);
   }
 
+  @override
   bool get isUnnamedMixinApplication => cls.isAnonymousMixin;
 
-  /// Return the [MemberEntity] for the member [name] in [cls]. If [setter] is
-  /// `true`, the setter or assignable field corresponding to [name] is
-  /// returned.
+  @override
   MemberEntity lookupMember(IrToElementMap elementMap, String name,
       {bool setter: false}) {
     ir.Member member = setter ? _setterMap[name] : _memberMap[name];
     return member != null ? elementMap.getMember(member) : null;
   }
 
-  /// Calls [f] for each member of [cls].
+  @override
   void forEachMember(IrToElementMap elementMap, void f(MemberEntity member)) {
     _members.forEach((ir.Member member) {
       f(elementMap.getMember(member));
     });
   }
 
-  /// Return the [ConstructorEntity] for the constructor [name] in [cls].
+  @override
   ConstructorEntity lookupConstructor(IrToElementMap elementMap, String name) {
     ir.Member constructor = _constructorMap[name];
     return constructor != null ? elementMap.getConstructor(constructor) : null;
   }
 
-  /// Calls [f] for each constructor of [cls].
+  @override
   void forEachConstructor(
       IrToElementMap elementMap, void f(ConstructorEntity constructor)) {
     _constructorMap.values.forEach((ir.Member constructor) {
@@ -309,6 +310,7 @@
     _constructorBodyList.add(constructorBody);
   }
 
+  @override
   void forEachConstructorBody(void f(ConstructorBodyEntity constructor)) {
     _constructorBodyList?.forEach(f);
   }
@@ -454,15 +456,23 @@
   static const String tag = 'class-data';
 
   final ir.Class cls;
+  @override
   final ClassDefinition definition;
+  @override
   bool isMixinApplication;
   bool isCallTypeComputed = false;
 
+  @override
   InterfaceType thisType;
+  @override
   InterfaceType rawType;
+  @override
   InterfaceType supertype;
+  @override
   InterfaceType mixedInType;
+  @override
   List<InterfaceType> interfaces;
+  @override
   OrderedTypeSet orderedTypeSet;
 
   JClassDataImpl(this.cls, this.definition);
@@ -484,8 +494,10 @@
     sink.end(tag);
   }
 
+  @override
   bool get isEnumClass => cls != null && cls.isEnum;
 
+  @override
   DartType get callType => null;
 }
 
@@ -543,12 +555,15 @@
 abstract class JMemberDataImpl implements JMemberData {
   final ir.Member node;
 
+  @override
   final MemberDefinition definition;
 
+  @override
   final Map<ir.Expression, ir.DartType> staticTypes;
 
   JMemberDataImpl(this.node, this.definition, this.staticTypes);
 
+  @override
   InterfaceType getMemberThisType(JsToElementMap elementMap) {
     MemberEntity member = elementMap.getMember(node);
     ClassEntity cls = member.enclosingClass;
@@ -575,6 +590,7 @@
   ir.FunctionNode get functionNode;
   List<TypeVariableType> _typeVariables;
 
+  @override
   List<TypeVariableType> getFunctionTypeVariables(
       covariant JsKernelToElementMap elementMap) {
     if (_typeVariables == null) {
@@ -602,6 +618,7 @@
 abstract class FunctionDataForEachParameterMixin implements FunctionData {
   ir.FunctionNode get functionNode;
 
+  @override
   void forEachParameter(
       JsToElementMap elementMap,
       ParameterStructure parameterStructure,
@@ -637,6 +654,7 @@
   /// debugging data stream.
   static const String tag = 'function-data';
 
+  @override
   final ir.FunctionNode functionNode;
   FunctionType _type;
 
@@ -664,6 +682,7 @@
     return new FunctionDataImpl(node, functionNode, definition, staticTypes);
   }
 
+  @override
   void writeToDataSink(DataSink sink) {
     sink.writeEnum(JMemberDataKind.function);
     sink.begin(tag);
@@ -673,6 +692,7 @@
     sink.end(tag);
   }
 
+  @override
   FunctionType getFunctionType(covariant JsKernelToElementMap elementMap) {
     return _type ??= elementMap.getFunctionType(functionNode);
   }
@@ -689,8 +709,10 @@
   /// debugging data stream.
   static const String tag = 'signature-function-data';
 
+  @override
   final MemberDefinition definition;
   final InterfaceType memberThisType;
+  @override
   final ClassTypeVariableAccess classTypeVariableAccess;
   final List<ir.TypeParameter> typeParameters;
 
@@ -710,6 +732,7 @@
         definition, memberThisType, typeParameters, classTypeVariableAccess);
   }
 
+  @override
   void writeToDataSink(DataSink sink) {
     sink.writeEnum(JMemberDataKind.signature);
     sink.begin(tag);
@@ -723,10 +746,12 @@
   @override
   Map<ir.Expression, ir.DartType> get staticTypes => const {};
 
+  @override
   FunctionType getFunctionType(covariant JsKernelToElementMap elementMap) {
     throw new UnsupportedError("SignatureFunctionData.getFunctionType");
   }
 
+  @override
   List<TypeVariableType> getFunctionTypeVariables(IrToElementMap elementMap) {
     return typeParameters
         .map<TypeVariableType>((ir.TypeParameter typeParameter) {
@@ -734,6 +759,7 @@
     }).toList();
   }
 
+  @override
   void forEachParameter(
       JsToElementMap elementMap,
       ParameterStructure parameterStructure,
@@ -742,6 +768,7 @@
     throw new UnimplementedError('SignatureData.forEachParameter');
   }
 
+  @override
   InterfaceType getMemberThisType(JsToElementMap elementMap) {
     return memberThisType;
   }
@@ -752,14 +779,17 @@
 
   DelegatedFunctionData(this.baseData);
 
+  @override
   FunctionType getFunctionType(covariant JsKernelToElementMap elementMap) {
     return baseData.getFunctionType(elementMap);
   }
 
+  @override
   List<TypeVariableType> getFunctionTypeVariables(IrToElementMap elementMap) {
     return baseData.getFunctionTypeVariables(elementMap);
   }
 
+  @override
   void forEachParameter(
       JsToElementMap elementMap,
       ParameterStructure parameterStructure,
@@ -769,10 +799,12 @@
         isNative: isNative);
   }
 
+  @override
   InterfaceType getMemberThisType(JsToElementMap elementMap) {
     return baseData.getMemberThisType(elementMap);
   }
 
+  @override
   ClassTypeVariableAccess get classTypeVariableAccess =>
       baseData.classTypeVariableAccess;
 }
@@ -782,6 +814,7 @@
   /// a debugging data stream.
   static const String tag = 'generator-body-data';
 
+  @override
   final MemberDefinition definition;
 
   GeneratorBodyFunctionData(FunctionData baseData, this.definition)
@@ -797,6 +830,7 @@
     return new GeneratorBodyFunctionData(baseData, definition);
   }
 
+  @override
   void writeToDataSink(DataSink sink) {
     sink.writeEnum(JMemberDataKind.generatorBody);
     sink.begin(tag);
@@ -848,6 +882,7 @@
         node, functionNode, definition, staticTypes);
   }
 
+  @override
   void writeToDataSink(DataSink sink) {
     sink.writeEnum(JMemberDataKind.constructor);
     sink.begin(tag);
@@ -858,6 +893,7 @@
     sink.end(tag);
   }
 
+  @override
   ConstantConstructor getConstructorConstant(
       JsKernelToElementMap elementMap, ConstructorEntity constructor) {
     if (_constantConstructor == null) {
@@ -909,6 +945,7 @@
         node, functionNode, definition, staticTypes);
   }
 
+  @override
   void writeToDataSink(DataSink sink) {
     sink.writeEnum(JMemberDataKind.constructorBody);
     sink.begin(tag);
@@ -930,14 +967,6 @@
 
   ConstantExpression getFieldConstantExpression(
       JsKernelToElementMap elementMap);
-
-  /// Return the [ConstantValue] the initial value of [field] or `null` if
-  /// the initializer is not a constant expression.
-  ConstantValue getFieldConstantValue(JsKernelToElementMap elementMap);
-
-  bool hasConstantFieldInitializer(JsKernelToElementMap elementMap);
-
-  ConstantValue getConstantFieldInitializer(JsKernelToElementMap elementMap);
 }
 
 class JFieldDataImpl extends JMemberDataImpl implements JFieldData {
@@ -946,8 +975,6 @@
   static const String tag = 'field-data';
 
   DartType _type;
-  bool _isConstantComputed = false;
-  ConstantValue _constantValue;
   ConstantExpression _constantExpression;
 
   JFieldDataImpl(ir.Field node, MemberDefinition definition,
@@ -965,6 +992,7 @@
     return new JFieldDataImpl(node, definition, staticTypes);
   }
 
+  @override
   void writeToDataSink(DataSink sink) {
     sink.writeEnum(JMemberDataKind.field);
     sink.begin(tag);
@@ -974,12 +1002,15 @@
     sink.end(tag);
   }
 
+  @override
   ir.Field get node => super.node;
 
+  @override
   DartType getFieldType(covariant JsKernelToElementMap elementMap) {
     return _type ??= elementMap.getDartType(node.type);
   }
 
+  @override
   ConstantExpression getFieldConstantExpression(
       JsKernelToElementMap elementMap) {
     if (_constantExpression == null) {
@@ -997,33 +1028,6 @@
   }
 
   @override
-  ConstantValue getFieldConstantValue(JsKernelToElementMap elementMap) {
-    if (!_isConstantComputed) {
-      _constantValue = elementMap.getConstantValue(node.initializer,
-          requireConstant: node.isConst, implicitNull: !node.isConst);
-      _isConstantComputed = true;
-    }
-    return _constantValue;
-  }
-
-  @override
-  bool hasConstantFieldInitializer(JsKernelToElementMap elementMap) {
-    return getFieldConstantValue(elementMap) != null;
-  }
-
-  @override
-  ConstantValue getConstantFieldInitializer(JsKernelToElementMap elementMap) {
-    ConstantValue value = getFieldConstantValue(elementMap);
-    assert(
-        value != null,
-        failedAt(
-            definition.location,
-            "Field ${definition} doesn't have a "
-            "constant initial value."));
-    return value;
-  }
-
-  @override
   ClassTypeVariableAccess get classTypeVariableAccess {
     if (node.isInstanceMember) return ClassTypeVariableAccess.instanceField;
     return ClassTypeVariableAccess.none;
diff --git a/pkg/compiler/lib/src/js_model/js_strategy.dart b/pkg/compiler/lib/src/js_model/js_strategy.dart
index 8715893..2090143 100644
--- a/pkg/compiler/lib/src/js_model/js_strategy.dart
+++ b/pkg/compiler/lib/src/js_model/js_strategy.dart
@@ -26,7 +26,6 @@
 import '../js_backend/native_data.dart';
 import '../kernel/kernel_strategy.dart';
 import '../native/behavior.dart';
-import '../options.dart';
 import '../ssa/builder_kernel.dart';
 import '../ssa/nodes.dart';
 import '../ssa/ssa.dart';
@@ -64,7 +63,8 @@
         _compiler.reporter,
         _compiler.environment,
         strategy.elementMap,
-        closedWorld.liveMemberUsage);
+        closedWorld.liveMemberUsage,
+        closedWorld.annotationsData);
     GlobalLocalsMap _globalLocalsMap = new GlobalLocalsMap();
     ClosureDataBuilder closureDataBuilder = new ClosureDataBuilder(
         _elementMap, _globalLocalsMap, _compiler.options);
@@ -137,21 +137,9 @@
   KernelCodegenWorkItemBuilder(
       this._backend, this._closedWorld, this._globalInferenceResults);
 
-  CompilerOptions get _options => _backend.compiler.options;
-
   @override
   CodegenWorkItem createWorkItem(MemberEntity entity) {
     if (entity.isAbstract) return null;
-
-    // Codegen inlines field initializers. It only needs to generate
-    // code for checked setters.
-    if (entity.isField && entity.isInstanceMember) {
-      if (!_options.parameterCheckPolicy.isEmitted ||
-          entity.enclosingClass.isClosure) {
-        return null;
-      }
-    }
-
     return new KernelCodegenWorkItem(
         _backend, _closedWorld, _globalInferenceResults, entity);
   }
@@ -160,7 +148,9 @@
 class KernelCodegenWorkItem extends CodegenWorkItem {
   final JavaScriptBackend _backend;
   final JClosedWorld _closedWorld;
+  @override
   final MemberEntity element;
+  @override
   final CodegenRegistry registry;
   final GlobalTypeInferenceResults _globalInferenceResults;
 
@@ -219,73 +209,88 @@
       _globalInferenceResults
           .resultOfMember(e is ConstructorBodyEntity ? e.constructor : e);
 
+  @override
   AbstractValue getReturnTypeOf(FunctionEntity function) {
     return AbstractValueFactory.inferredReturnTypeForElement(
         function, _globalInferenceResults);
   }
 
+  @override
   AbstractValue receiverTypeOfInvocation(
       ir.MethodInvocation node, AbstractValueDomain abstractValueDomain) {
     return _targetResults.typeOfSend(node);
   }
 
+  @override
   AbstractValue receiverTypeOfGet(ir.PropertyGet node) {
     return _targetResults.typeOfSend(node);
   }
 
+  @override
   AbstractValue receiverTypeOfDirectGet(ir.DirectPropertyGet node) {
     return _targetResults.typeOfSend(node);
   }
 
+  @override
   AbstractValue receiverTypeOfSet(
       ir.PropertySet node, AbstractValueDomain abstractValueDomain) {
     return _targetResults.typeOfSend(node);
   }
 
+  @override
   AbstractValue typeOfListLiteral(
       ir.ListLiteral listLiteral, AbstractValueDomain abstractValueDomain) {
     return _globalInferenceResults.typeOfListLiteral(listLiteral) ??
         abstractValueDomain.dynamicType;
   }
 
+  @override
   AbstractValue typeOfIterator(ir.ForInStatement node) {
     return _targetResults.typeOfIterator(node);
   }
 
+  @override
   AbstractValue typeOfIteratorCurrent(ir.ForInStatement node) {
     return _targetResults.typeOfIteratorCurrent(node);
   }
 
+  @override
   AbstractValue typeOfIteratorMoveNext(ir.ForInStatement node) {
     return _targetResults.typeOfIteratorMoveNext(node);
   }
 
+  @override
   bool isJsIndexableIterator(
       ir.ForInStatement node, AbstractValueDomain abstractValueDomain) {
     AbstractValue mask = typeOfIterator(node);
     return abstractValueDomain.isJsIndexableAndIterable(mask).isDefinitelyTrue;
   }
 
+  @override
   AbstractValue inferredIndexType(ir.ForInStatement node) {
     return AbstractValueFactory.inferredTypeForSelector(
         new Selector.index(), typeOfIterator(node), _globalInferenceResults);
   }
 
+  @override
   AbstractValue getInferredTypeOf(MemberEntity member) {
     return AbstractValueFactory.inferredTypeForMember(
         member, _globalInferenceResults);
   }
 
+  @override
   AbstractValue getInferredTypeOfParameter(Local parameter) {
     return AbstractValueFactory.inferredTypeForParameter(
         parameter, _globalInferenceResults);
   }
 
+  @override
   AbstractValue selectorTypeOf(Selector selector, AbstractValue mask) {
     return AbstractValueFactory.inferredTypeForSelector(
         selector, mask, _globalInferenceResults);
   }
 
+  @override
   AbstractValue typeFromNativeBehavior(
       NativeBehavior nativeBehavior, JClosedWorld closedWorld) {
     return AbstractValueFactory.fromNativeBehavior(nativeBehavior, closedWorld);
diff --git a/pkg/compiler/lib/src/js_model/js_world.dart b/pkg/compiler/lib/src/js_model/js_world.dart
index 3f6ca05..bcb9df1 100644
--- a/pkg/compiler/lib/src/js_model/js_world.dart
+++ b/pkg/compiler/lib/src/js_model/js_world.dart
@@ -9,7 +9,6 @@
 import '../common.dart';
 import '../common/names.dart';
 import '../common_elements.dart' show JCommonElements, JElementEnvironment;
-import '../constants/constant_system.dart';
 import '../deferred_load.dart';
 import '../diagnostics/diagnostic_listener.dart';
 import '../elements/entities.dart';
@@ -20,9 +19,8 @@
 import '../inferrer/abstract_value_domain.dart';
 import '../js_emitter/sorter.dart';
 import '../js_backend/annotations.dart';
-import '../js_backend/allocator_analysis.dart';
+import '../js_backend/field_analysis.dart';
 import '../js_backend/backend_usage.dart';
-import '../js_backend/constant_system_javascript.dart';
 import '../js_backend/interceptor_data.dart';
 import '../js_backend/native_data.dart';
 import '../js_backend/no_such_method_registry.dart';
@@ -43,9 +41,13 @@
 class JsClosedWorld implements JClosedWorld {
   static const String tag = 'closed-world';
 
+  @override
   final NativeData nativeData;
+  @override
   final InterceptorData interceptorData;
+  @override
   final BackendUsage backendUsage;
+  @override
   final NoSuchMethodData noSuchMethodData;
 
   FunctionSet _allFunctions;
@@ -66,21 +68,29 @@
   /// Members that are written either directly or through a setter selector.
   final Set<MemberEntity> assignedInstanceMembers;
 
+  @override
   final Set<ClassEntity> liveNativeClasses;
 
+  @override
   final Set<MemberEntity> processedMembers;
 
+  @override
   final ClassHierarchy classHierarchy;
 
   final JsKernelToElementMap elementMap;
+  @override
   final RuntimeTypesNeed rtiNeed;
   AbstractValueDomain _abstractValueDomain;
-  final JAllocatorAnalysis allocatorAnalysis;
+  @override
+  final JFieldAnalysis fieldAnalysis;
+  @override
   final AnnotationsData annotationsData;
+  @override
   final GlobalLocalsMap globalLocalsMap;
+  @override
   final ClosureData closureDataLookup;
+  @override
   final OutputUnitData outputUnitData;
-  final Set<FieldEntity> elidedFields;
   Sorter _sorter;
 
   JsClosedWorld(
@@ -89,7 +99,7 @@
       this.interceptorData,
       this.backendUsage,
       this.rtiNeed,
-      this.allocatorAnalysis,
+      this.fieldAnalysis,
       this.noSuchMethodData,
       this.implementedClasses,
       this.liveNativeClasses,
@@ -103,8 +113,7 @@
       this.annotationsData,
       this.globalLocalsMap,
       this.closureDataLookup,
-      this.outputUnitData,
-      this.elidedFields) {
+      this.outputUnitData) {
     _abstractValueDomain = abstractValueStrategy.createDomain(this);
   }
 
@@ -134,8 +143,8 @@
     BackendUsage backendUsage = new BackendUsage.readFromDataSource(source);
     RuntimeTypesNeed rtiNeed = new RuntimeTypesNeed.readFromDataSource(
         source, elementMap.elementEnvironment);
-    JAllocatorAnalysis allocatorAnalysis =
-        new JAllocatorAnalysis.readFromDataSource(source, options);
+    JFieldAnalysis allocatorAnalysis =
+        new JFieldAnalysis.readFromDataSource(source, options);
     NoSuchMethodData noSuchMethodData =
         new NoSuchMethodData.readFromDataSource(source);
 
@@ -158,8 +167,6 @@
     OutputUnitData outputUnitData =
         new OutputUnitData.readFromDataSource(source);
 
-    Set<FieldEntity> elidedFields = source.readMembers<FieldEntity>().toSet();
-
     source.end(tag);
 
     return new JsClosedWorld(
@@ -182,8 +189,7 @@
         annotationsData,
         globalLocalsMap,
         closureData,
-        outputUnitData,
-        elidedFields);
+        outputUnitData);
   }
 
   /// Serializes this [JsClosedWorld] to [sink].
@@ -197,7 +203,7 @@
     interceptorData.writeToDataSink(sink);
     backendUsage.writeToDataSink(sink);
     rtiNeed.writeToDataSink(sink);
-    allocatorAnalysis.writeToDataSink(sink);
+    fieldAnalysis.writeToDataSink(sink);
     noSuchMethodData.writeToDataSink(sink);
     sink.writeClasses(implementedClasses);
     sink.writeClasses(liveNativeClasses);
@@ -211,19 +217,19 @@
     annotationsData.writeToDataSink(sink);
     closureDataLookup.writeToDataSink(sink);
     outputUnitData.writeToDataSink(sink);
-    sink.writeMembers(elidedFields);
     sink.end(tag);
   }
 
-  ConstantSystem get constantSystem => JavaScriptConstantSystem.only;
-
+  @override
   JElementEnvironment get elementEnvironment => elementMap.elementEnvironment;
 
+  @override
   JCommonElements get commonElements => elementMap.commonElements;
 
+  @override
   DartTypes get dartTypes => elementMap.types;
 
-  /// Returns `true` if [cls] is implemented by an instantiated class.
+  @override
   bool isImplemented(ClassEntity cls) {
     return implementedClasses.contains(cls);
   }
@@ -248,20 +254,19 @@
     return classSet != null ? classSet.getLubOfInstantiatedSubtypes() : null;
   }
 
-  /// Returns `true` if [cls] is mixed into a live class.
+  @override
   bool isUsedAsMixin(ClassEntity cls) {
     return !mixinUsesOf(cls).isEmpty;
   }
 
-  /// Returns `true` if any live class that mixes in [cls] implements [type].
+  @override
   bool hasAnySubclassOfMixinUseThatImplements(
       ClassEntity cls, ClassEntity type) {
     return mixinUsesOf(cls)
         .any((use) => hasAnySubclassThatImplements(use, type));
   }
 
-  /// Returns `true` if every subtype of [x] is a subclass of [y] or a subclass
-  /// of a mixin application of [y].
+  @override
   bool everySubtypeIsSubclassOfOrMixinUseOf(ClassEntity x, ClassEntity y) {
     Map<ClassEntity, bool> secondMap =
         _subtypeCoveredByCache[x] ??= <ClassEntity, bool>{};
@@ -271,7 +276,7 @@
             isSubclassOfMixinUseOf(cls, y));
   }
 
-  /// Returns `true` if any subclass of [superclass] implements [type].
+  @override
   bool hasAnySubclassThatImplements(ClassEntity superclass, ClassEntity type) {
     Set<ClassEntity> subclasses = typesImplementedBySubclasses[superclass];
     if (subclasses == null) return false;
@@ -329,7 +334,7 @@
     }
   }
 
-  /// Returns an iterable over the common supertypes of the [classes].
+  @override
   Iterable<ClassEntity> commonSupertypesOf(Iterable<ClassEntity> classes) {
     Iterator<ClassEntity> iterator = classes.iterator;
     if (!iterator.moveNext()) return const <ClassEntity>[];
@@ -369,7 +374,7 @@
     return commonSupertypes;
   }
 
-  /// Returns an iterable over the live mixin applications that mixin [cls].
+  @override
   Iterable<ClassEntity> mixinUsesOf(ClassEntity cls) {
     if (_liveMixinUses == null) {
       _liveMixinUses = new Map<ClassEntity, List<ClassEntity>>();
@@ -397,15 +402,14 @@
     return uses != null ? uses : const <ClassEntity>[];
   }
 
-  /// Returns `true` if any live class that mixes in [mixin] is also a subclass
-  /// of [superclass].
+  @override
   bool hasAnySubclassThatMixes(ClassEntity superclass, ClassEntity mixin) {
     return mixinUsesOf(mixin).any((ClassEntity each) {
       return classHierarchy.isSubclassOf(each, superclass);
     });
   }
 
-  /// Returns `true` if [cls] or any superclass mixes in [mixin].
+  @override
   bool isSubclassOfMixinUseOf(ClassEntity cls, ClassEntity mixin) {
     if (isUsedAsMixin(mixin)) {
       ClassEntity current = cls;
@@ -426,12 +430,7 @@
     }
   }
 
-  /// Returns `true` if [selector] on [receiver] can hit a `call` method on a
-  /// subclass of `Closure`.
-  ///
-  /// Every implementation of `Closure` has a 'call' method with its own
-  /// signature so it cannot be modelled by a [FunctionEntity]. Also,
-  /// call-methods for tear-off are not part of the element model.
+  @override
   bool includesClosureCall(Selector selector, AbstractValue receiver) {
     return selector.name == Identifiers.call &&
         (receiver == null ||
@@ -441,6 +440,7 @@
                 .isPotentiallyTrue);
   }
 
+  @override
   AbstractValue computeReceiverType(Selector selector, AbstractValue receiver) {
     _ensureFunctionSet();
     if (includesClosureCall(selector, receiver)) {
@@ -449,6 +449,7 @@
     return _allFunctions.receiverType(selector, receiver, abstractValueDomain);
   }
 
+  @override
   Iterable<MemberEntity> locateMembers(
       Selector selector, AbstractValue receiver) {
     _ensureFunctionSet();
@@ -462,6 +463,7 @@
         .any((each) => each.isGetter);
   }
 
+  @override
   MemberEntity locateSingleMember(Selector selector, AbstractValue receiver) {
     if (includesClosureCall(selector, receiver)) {
       return null;
@@ -470,6 +472,7 @@
     return abstractValueDomain.locateSingleMember(receiver, selector);
   }
 
+  @override
   bool fieldNeverChanges(MemberEntity element) {
     if (!element.isField) return false;
     if (nativeData.isNativeMember(element)) {
diff --git a/pkg/compiler/lib/src/js_model/js_world_builder.dart b/pkg/compiler/lib/src/js_model/js_world_builder.dart
index 3b39476..c8210a9 100644
--- a/pkg/compiler/lib/src/js_model/js_world_builder.dart
+++ b/pkg/compiler/lib/src/js_model/js_world_builder.dart
@@ -7,6 +7,7 @@
 import '../closure.dart';
 import '../common.dart';
 import '../common_elements.dart';
+import '../constants/constant_system.dart' as constant_system;
 import '../constants/values.dart';
 import '../deferred_load.dart';
 import '../elements/entities.dart';
@@ -16,8 +17,8 @@
 import '../inferrer/abstract_value_domain.dart';
 import '../ir/closure.dart';
 import '../js_backend/annotations.dart';
-import '../js_backend/allocator_analysis.dart';
 import '../js_backend/backend_usage.dart';
+import '../js_backend/field_analysis.dart';
 import '../js_backend/interceptor_data.dart';
 import '../js_backend/native_data.dart';
 import '../js_backend/no_such_method_registry.dart';
@@ -28,7 +29,6 @@
 import '../universe/class_hierarchy.dart';
 import '../universe/class_set.dart';
 import '../universe/feature.dart';
-import '../universe/member_usage.dart';
 import '../universe/selector.dart';
 import '../world.dart';
 import 'closure.dart';
@@ -192,8 +192,8 @@
         map.toBackendFunctionSet(oldNoSuchMethodData.otherImpls),
         map.toBackendFunctionSet(oldNoSuchMethodData.forwardingSyntaxImpls));
 
-    JAllocatorAnalysis allocatorAnalysis =
-        JAllocatorAnalysis.from(closedWorld.allocatorAnalysis, map, _options);
+    JFieldAnalysis allocatorAnalysis =
+        JFieldAnalysis.from(closedWorld, map, _options);
 
     AnnotationsDataImpl oldAnnotationsData = closedWorld.annotationsData;
     AnnotationsData annotationsData = new AnnotationsDataImpl(
@@ -202,19 +202,6 @@
     OutputUnitData outputUnitData =
         _convertOutputUnitData(map, kOutputUnitData, closureData);
 
-    Set<FieldEntity> elidedFields = new Set();
-    closedWorld.liveMemberUsage
-        .forEach((MemberEntity member, MemberUsage memberUsage) {
-      // TODO(johnniwinther): Should elided static fields be removed from the
-      // J model? Static setters might still assign to them.
-      if (member.isField &&
-          !memberUsage.hasRead &&
-          !closedWorld.annotationsData.hasNoElision(member) &&
-          !closedWorld.nativeData.isNativeMember(member)) {
-        elidedFields.add(map.toBackendMember(member));
-      }
-    });
-
     return new JsClosedWorld(
         _elementMap,
         nativeData,
@@ -239,8 +226,7 @@
         annotationsData,
         _globalLocalsMap,
         closureData,
-        outputUnitData,
-        elidedFields);
+        outputUnitData);
   }
 
   BackendUsage _convertBackendUsage(
@@ -354,25 +340,12 @@
     Map<MemberEntity, NativeBehavior> nativeFieldStoreBehavior =
         map.toBackendMemberMap(
             nativeData.nativeFieldStoreBehavior, convertNativeBehavior);
-    Map<LibraryEntity, String> jsInteropLibraryNames =
-        map.toBackendLibraryMap(nativeData.jsInteropLibraries, identity);
-    Set<ClassEntity> anonymousJsInteropClasses =
-        map.toBackendClassSet(nativeData.anonymousJsInteropClasses);
-    Map<ClassEntity, String> jsInteropClassNames =
-        map.toBackendClassMap(nativeData.jsInteropClasses, identity);
-    Map<MemberEntity, String> jsInteropMemberNames =
-        map.toBackendMemberMap(nativeData.jsInteropMembers, identity);
-
     return new NativeDataImpl(
         nativeBasicData,
         nativeMemberName,
         nativeMethodBehavior,
         nativeFieldLoadBehavior,
-        nativeFieldStoreBehavior,
-        jsInteropLibraryNames,
-        anonymousJsInteropClasses,
-        jsInteropClassNames,
-        jsInteropMemberNames);
+        nativeFieldStoreBehavior);
   }
 
   InterceptorData _convertInterceptorData(JsToFrontendMap map,
@@ -608,7 +581,7 @@
 
   DartType toBackendType(DartType type, {bool allowFreeVariables: false});
 
-  ConstantValue toBackendConstant(ConstantValue value);
+  ConstantValue toBackendConstant(ConstantValue value, {bool allowNull: false});
 
   Set<LibraryEntity> toBackendLibrarySet(Iterable<LibraryEntity> set) {
     return set.map(toBackendLibrary).toSet();
@@ -687,6 +660,7 @@
 
   JsToFrontendMapImpl(this._backend);
 
+  @override
   DartType toBackendType(DartType type, {bool allowFreeVariables: false}) =>
       type == null
           ? null
@@ -704,14 +678,17 @@
     return toBackendLibrary(entity);
   }
 
+  @override
   LibraryEntity toBackendLibrary(covariant IndexedLibrary library) {
     return _backend.libraries.getEntity(library.libraryIndex);
   }
 
+  @override
   ClassEntity toBackendClass(covariant IndexedClass cls) {
     return _backend.classes.getEntity(cls.classIndex);
   }
 
+  @override
   MemberEntity toBackendMember(covariant IndexedMember member) {
     return _backend.members.getEntity(member.memberIndex);
   }
@@ -730,7 +707,15 @@
         .getEntity(indexedTypeVariable.typeVariableIndex);
   }
 
-  ConstantValue toBackendConstant(ConstantValue constant) {
+  @override
+  ConstantValue toBackendConstant(ConstantValue constant,
+      {bool allowNull: false}) {
+    if (constant == null) {
+      if (!allowNull) {
+        throw new UnsupportedError('Null not allowed as constant value.');
+      }
+      return null;
+    }
     return constant.accept(new _ConstantConverter(toBackendEntity), null);
   }
 }
@@ -842,19 +827,28 @@
   _ConstantConverter(this.toBackendEntity)
       : typeConverter = new _TypeConverter();
 
+  @override
   ConstantValue visitNull(NullConstantValue constant, _) => constant;
+  @override
   ConstantValue visitInt(IntConstantValue constant, _) => constant;
+  @override
   ConstantValue visitDouble(DoubleConstantValue constant, _) => constant;
+  @override
   ConstantValue visitBool(BoolConstantValue constant, _) => constant;
+  @override
   ConstantValue visitString(StringConstantValue constant, _) => constant;
+  @override
   ConstantValue visitSynthetic(SyntheticConstantValue constant, _) => constant;
+  @override
   ConstantValue visitNonConstant(NonConstantValue constant, _) => constant;
 
+  @override
   ConstantValue visitFunction(FunctionConstantValue constant, _) {
     return new FunctionConstantValue(toBackendEntity(constant.element),
         typeConverter.visit(constant.type, toBackendEntity));
   }
 
+  @override
   ConstantValue visitList(ListConstantValue constant, _) {
     DartType type = typeConverter.visit(constant.type, toBackendEntity);
     List<ConstantValue> entries = _handleValues(constant.entries);
@@ -864,18 +858,35 @@
     return new ListConstantValue(type, entries);
   }
 
-  ConstantValue visitMap(MapConstantValue constant, _) {
-    var type = typeConverter.visit(constant.type, toBackendEntity);
-    List<ConstantValue> keys = _handleValues(constant.keys);
-    List<ConstantValue> values = _handleValues(constant.values);
-    if (identical(keys, constant.keys) &&
-        identical(values, constant.values) &&
-        type == constant.type) {
+  @override
+  ConstantValue visitSet(
+      covariant constant_system.JavaScriptSetConstant constant, _) {
+    DartType type = typeConverter.visit(constant.type, toBackendEntity);
+    MapConstantValue entries = constant.entries.accept(this, null);
+    if (identical(entries, constant.entries) && type == constant.type) {
       return constant;
     }
-    return new MapConstantValue(type, keys, values);
+    return new constant_system.JavaScriptSetConstant(type, entries);
   }
 
+  @override
+  ConstantValue visitMap(
+      covariant constant_system.JavaScriptMapConstant constant, _) {
+    DartType type = typeConverter.visit(constant.type, toBackendEntity);
+    ListConstantValue keys = constant.keyList.accept(this, null);
+    List<ConstantValue> values = _handleValues(constant.values);
+    ConstantValue protoValue = constant.protoValue?.accept(this, null);
+    if (identical(keys, constant.keys) &&
+        identical(values, constant.values) &&
+        type == constant.type &&
+        protoValue == constant.protoValue) {
+      return constant;
+    }
+    return new constant_system.JavaScriptMapConstant(
+        type, keys, values, protoValue, constant.onlyStringKeys);
+  }
+
+  @override
   ConstantValue visitConstructed(ConstructedConstantValue constant, _) {
     DartType type = typeConverter.visit(constant.type, toBackendEntity);
     Map<FieldEntity, ConstantValue> fields = {};
@@ -887,6 +898,7 @@
     return new ConstructedConstantValue(type, fields);
   }
 
+  @override
   ConstantValue visitType(TypeConstantValue constant, _) {
     DartType type = typeConverter.visit(constant.type, toBackendEntity);
     DartType representedType =
@@ -897,18 +909,21 @@
     return new TypeConstantValue(representedType, type);
   }
 
+  @override
   ConstantValue visitInterceptor(InterceptorConstantValue constant, _) {
     // Interceptor constants are only created in the SSA graph builder.
     throw new UnsupportedError(
         "Unexpected visitInterceptor ${constant.toStructuredText()}");
   }
 
+  @override
   ConstantValue visitDeferredGlobal(DeferredGlobalConstantValue constant, _) {
     // Deferred global constants are only created in the SSA graph builder.
     throw new UnsupportedError(
         "Unexpected DeferredGlobalConstantValue ${constant.toStructuredText()}");
   }
 
+  @override
   ConstantValue visitInstantiation(InstantiationConstantValue constant, _) {
     ConstantValue function = constant.function.accept(this, null);
     List<DartType> typeArguments =
diff --git a/pkg/compiler/lib/src/js_model/locals.dart b/pkg/compiler/lib/src/js_model/locals.dart
index 2281cd9..d6666c0 100644
--- a/pkg/compiler/lib/src/js_model/locals.dart
+++ b/pkg/compiler/lib/src/js_model/locals.dart
@@ -138,6 +138,7 @@
   }
 
   /// Serializes this [KernelToLocalsMapImpl] to [sink].
+  @override
   void writeToDataSink(DataSink sink) {
     sink.begin(tag);
     sink.writeMember(currentMember);
@@ -187,6 +188,7 @@
     }
   }
 
+  @override
   MemberEntity get currentMember => _currentMember;
 
   Local getLocalByIndex(int index) {
@@ -451,11 +453,16 @@
   static const String tag = 'jump-target';
 
   final MemberEntity memberContext;
+  @override
   final int nestingLevel;
   List<LabelDefinition> _labels;
+  @override
   final bool isSwitch;
+  @override
   final bool isSwitchCase;
+  @override
   bool isBreakTarget;
+  @override
   bool isContinueTarget;
 
   JJumpTarget(this.memberContext, this.nestingLevel,
@@ -527,6 +534,7 @@
     return _labels ?? const <LabelDefinition>[];
   }
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write('JJumpTarget(');
@@ -548,9 +556,13 @@
 }
 
 class JLabelDefinition extends LabelDefinition {
+  @override
   final JumpTarget target;
+  @override
   final String labelName;
+  @override
   bool isBreakTarget;
+  @override
   bool isContinueTarget;
 
   JLabelDefinition(this.target, this.labelName,
@@ -558,6 +570,7 @@
 
   @override
   String get name => labelName;
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write('JLabelDefinition(');
@@ -573,6 +586,7 @@
 }
 
 class JLocal extends IndexedLocal {
+  @override
   final String name;
   final MemberEntity memberContext;
 
@@ -585,6 +599,7 @@
 
   String get _kind => 'local';
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write('$_kind(');
diff --git a/pkg/compiler/lib/src/kernel/dart2js_target.dart b/pkg/compiler/lib/src/kernel/dart2js_target.dart
index a021418..3d32f5f 100644
--- a/pkg/compiler/lib/src/kernel/dart2js_target.dart
+++ b/pkg/compiler/lib/src/kernel/dart2js_target.dart
@@ -10,7 +10,6 @@
 import 'package:kernel/core_types.dart';
 import 'package:kernel/class_hierarchy.dart';
 import 'package:kernel/target/targets.dart';
-import 'package:kernel/transformations/constants.dart' show ConstantsBackend;
 import 'invocation_mirror_constants.dart';
 
 const Iterable<String> _allowedDartSchemePaths = const <String>[
@@ -31,7 +30,8 @@
   bool allowedTestLibrary() {
     String scriptName = uri.path;
     return scriptName.contains('tests/compiler/dart2js_native') ||
-        scriptName.contains('tests/compiler/dart2js_extra');
+        scriptName.contains('tests/compiler/dart2js_extra') ||
+        scriptName.contains('generated_tests/dart2js_native/native_test');
   }
 
   bool allowedDartLibrary() {
@@ -45,14 +45,18 @@
 /// A kernel [Target] to configure the Dart Front End for dart2js.
 class Dart2jsTarget extends Target {
   final TargetFlags flags;
+  @override
   final String name;
 
   Dart2jsTarget(this.name, this.flags);
 
+  @override
   bool get legacyMode => flags.legacyMode;
 
+  @override
   bool get enableNoSuchMethodForwarders => !flags.legacyMode;
 
+  @override
   List<String> get extraRequiredLibraries => _requiredLibraries[name];
 
   @override
@@ -75,6 +79,9 @@
   bool get errorOnUnexactWebIntLiterals => true;
 
   @override
+  bool get supportsSetLiterals => true;
+
+  @override
   void performModularTransformationsOnLibraries(
       ir.Component component,
       CoreTypes coreTypes,
@@ -140,10 +147,9 @@
     return new ir.InvalidExpression(null);
   }
 
-  // TODO(askesc): Return specialized dart2js constants backend.
   @override
   ConstantsBackend constantsBackend(CoreTypes coreTypes) =>
-      new ConstantsBackend();
+      const Dart2jsConstantsBackend();
 }
 
 // TODO(sigmund): this "extraRequiredLibraries" needs to be removed...
@@ -188,3 +194,10 @@
     'dart:mirrors',
   ]
 };
+
+class Dart2jsConstantsBackend extends ConstantsBackend {
+  const Dart2jsConstantsBackend();
+
+  @override
+  NumberSemantics get numberSemantics => NumberSemantics.js;
+}
diff --git a/pkg/compiler/lib/src/kernel/deferred_load.dart b/pkg/compiler/lib/src/kernel/deferred_load.dart
index ecdbd9f..87a90be 100644
--- a/pkg/compiler/lib/src/kernel/deferred_load.dart
+++ b/pkg/compiler/lib/src/kernel/deferred_load.dart
@@ -95,22 +95,6 @@
     node.function?.accept(visitor);
   }
 
-  /// Adds extra dependencies coming from mirror usage.
-  @override
-  void addDeferredMirrorElements(WorkQueue queue) {
-    throw new UnsupportedError(
-        "KernelDeferredLoadTask.addDeferredMirrorElements");
-  }
-
-  /// Add extra dependencies coming from mirror usage in [root] marking it with
-  /// [newSet].
-  @override
-  void addMirrorElementsForLibrary(
-      WorkQueue queue, LibraryEntity root, ImportSet newSet) {
-    throw new UnsupportedError(
-        "KernelDeferredLoadTask.addMirrorElementsForLibrary");
-  }
-
   Set<ir.NamedNode> additionalExports(ir.Library library) {
     return _additionalExportsSets[library] ??= new Set<ir.NamedNode>.from(
         library.additionalExports.map((ir.Reference ref) => ref.node));
@@ -177,6 +161,15 @@
   }
 
   @override
+  void visitSetLiteral(ir.SetLiteral literal) {
+    if (literal.isConst) {
+      add(literal);
+    } else {
+      super.visitSetLiteral(literal);
+    }
+  }
+
+  @override
   void visitMapLiteral(ir.MapLiteral literal) {
     if (literal.isConst) {
       add(literal);
@@ -218,5 +211,11 @@
     // TODO(johnniwinther): The CFE should mark constant instantiations as
     // constant.
     add(node, required: false);
+    super.visitInstantiation(node);
+  }
+
+  @override
+  void visitConstantExpression(ir.ConstantExpression node) {
+    add(node);
   }
 }
diff --git a/pkg/compiler/lib/src/kernel/element_map.dart b/pkg/compiler/lib/src/kernel/element_map.dart
index 8fd2d17..3c523ff 100644
--- a/pkg/compiler/lib/src/kernel/element_map.dart
+++ b/pkg/compiler/lib/src/kernel/element_map.dart
@@ -108,8 +108,6 @@
   js.Name getNameForJsGetName(ConstantValue constant, Namer namer);
 
   /// Computes the [ConstantValue] for the constant [expression].
-  // TODO(johnniwinther): Move to [KernelToElementMapForBuilding]. This is only
-  // used in impact builder for symbol constants.
   ConstantValue getConstantValue(ir.Expression expression,
       {bool requireConstant: true, bool implicitNull: false});
 
@@ -144,11 +142,9 @@
   ConstructorEntity getSuperConstructor(
       ir.Constructor constructor, ir.Member target);
 
-  /// Returns `true` is [node] has a `@Native(...)` annotation.
-  bool isNativeClass(ir.Class node);
-
   /// Computes the native behavior for reading the native [field].
   NativeBehavior getNativeBehaviorForFieldLoad(ir.Field field,
+      Iterable<String> createsAnnotations, Iterable<String> returnsAnnotations,
       {bool isJsInterop});
 
   /// Computes the native behavior for writing to the native [field].
@@ -157,6 +153,7 @@
   /// Computes the native behavior for calling the function or constructor
   /// [member].
   NativeBehavior getNativeBehaviorForMethod(ir.Member member,
+      Iterable<String> createsAnnotations, Iterable<String> returnsAnnotations,
       {bool isJsInterop});
 
   /// Compute the kind of foreign helper function called by [node], if any.
diff --git a/pkg/compiler/lib/src/kernel/element_map_impl.dart b/pkg/compiler/lib/src/kernel/element_map_impl.dart
index 343e484..7a2b12a 100644
--- a/pkg/compiler/lib/src/kernel/element_map_impl.dart
+++ b/pkg/compiler/lib/src/kernel/element_map_impl.dart
@@ -4,7 +4,7 @@
 
 library dart2js.kernel.element_map;
 
-import 'package:front_end/src/api_unstable/dart2js.dart' show Link, LinkBuilder;
+import 'package:front_end/src/api_unstable/dart2js.dart' as ir;
 import 'package:js_runtime/shared/embedded_names.dart';
 import 'package:kernel/ast.dart' as ir;
 import 'package:kernel/class_hierarchy.dart' as ir;
@@ -17,7 +17,6 @@
 import '../common/resolution.dart';
 import '../common_elements.dart';
 import '../compile_time_constants.dart';
-import '../constants/constant_system.dart';
 import '../constants/constructors.dart';
 import '../constants/evaluation.dart';
 import '../constants/expressions.dart';
@@ -28,6 +27,8 @@
 import '../elements/types.dart';
 import '../environment.dart';
 import '../frontend_strategy.dart';
+import '../ir/annotations.dart';
+import '../ir/constants.dart';
 import '../ir/debug.dart';
 import '../ir/element_map.dart';
 import '../ir/impact.dart';
@@ -40,7 +41,6 @@
 import '../js/js.dart' as js;
 import '../js_backend/annotations.dart';
 import '../js_backend/backend.dart' show JavaScriptBackend;
-import '../js_backend/constant_system_javascript.dart';
 import '../js_backend/namer.dart';
 import '../js_backend/native_data.dart';
 import '../js_backend/no_such_method_registry.dart';
@@ -62,16 +62,13 @@
 part 'native_basic_data.dart';
 part 'no_such_method_resolver.dart';
 
-/// If `true` kernel impacts are computed as [ImpactData] directly on kernel
-/// and converted to the K model afterwards. This is a pre-step to modularizing
-/// the world impact computation.
-bool useImpactDataForTesting = false;
-
 /// Implementation of [KernelToElementMap] that only supports world
 /// impact computation.
 class KernelToElementMapImpl implements KernelToElementMap, IrToElementMap {
   final CompilerOptions options;
+  @override
   final DiagnosticReporter reporter;
+  final Environment _environment;
   CommonElementsImpl _commonElements;
   KernelElementEnvironment _elementEnvironment;
   DartTypeConverter _typeConverter;
@@ -79,6 +76,8 @@
   KernelDartTypes _types;
   ir.TypeEnvironment _typeEnvironment;
   ir.ClassHierarchy _classHierarchy;
+  Dart2jsConstantEvaluator _constantEvaluator;
+  ConstantValuefier _constantValuefier;
 
   /// Library environment. Used for fast lookup.
   KProgramEnv env = new KProgramEnv();
@@ -120,17 +119,20 @@
 
   Map<KMember, Map<ir.Expression, TypeMap>> typeMapsForTesting;
 
-  KernelToElementMapImpl(this.reporter, Environment environment,
-      this._frontendStrategy, this.options) {
+  KernelToElementMapImpl(
+      this.reporter, this._environment, this._frontendStrategy, this.options) {
     _elementEnvironment = new KernelElementEnvironment(this);
     _commonElements = new CommonElementsImpl(_elementEnvironment);
-    _constantEnvironment = new KernelConstantEnvironment(this, environment);
+    _constantEnvironment = new KernelConstantEnvironment(this, _environment);
     _typeConverter = new DartTypeConverter(this);
     _types = new KernelDartTypes(this);
+    _constantValuefier = new ConstantValuefier(this);
   }
 
+  @override
   DartTypes get types => _types;
 
+  @override
   KernelElementEnvironment get elementEnvironment => _elementEnvironment;
 
   @override
@@ -252,6 +254,7 @@
   @override
   ClassEntity getClass(ir.Class node) => getClassInternal(node);
 
+  @override
   InterfaceType getSuperType(IndexedClass cls) {
     assert(checkFamily(cls));
     KClassData data = classes.getData(cls);
@@ -282,6 +285,7 @@
     }
   }
 
+  @override
   TypeVariableEntity getTypeVariable(ir.TypeParameter node) =>
       getTypeVariableInternal(node);
 
@@ -306,8 +310,8 @@
         }
 
         InterfaceType supertype;
-        LinkBuilder<InterfaceType> linkBuilder =
-            new LinkBuilder<InterfaceType>();
+        ir.LinkBuilder<InterfaceType> linkBuilder =
+            new ir.LinkBuilder<InterfaceType>();
         if (node.isMixinDeclaration) {
           // A mixin declaration
           //
@@ -349,12 +353,12 @@
         node.implementedTypes.forEach((ir.Supertype supertype) {
           linkBuilder.addLast(processSupertype(supertype));
         });
-        Link<InterfaceType> interfaces =
-            linkBuilder.toLink(const Link<InterfaceType>());
+        ir.Link<InterfaceType> interfaces =
+            linkBuilder.toLink(const ir.Link<InterfaceType>());
         OrderedTypeSetBuilder setBuilder =
             new KernelOrderedTypeSetBuilder(this, cls);
         data.orderedTypeSet = setBuilder.createOrderedTypeSet(
-            data.supertype, interfaces.reverse(const Link<InterfaceType>()));
+            data.supertype, interfaces.reverse(const ir.Link<InterfaceType>()));
         data.interfaces = new List<InterfaceType>.from(interfaces.toList());
       }
     }
@@ -382,6 +386,7 @@
     throw new UnsupportedError("Unexpected member: $node");
   }
 
+  @override
   MemberEntity getSuperMember(MemberEntity context, ir.Name name,
       {bool setter: false}) {
     // We can no longer trust the interface target of the super access since it
@@ -411,6 +416,7 @@
   ConstructorEntity getConstructor(ir.Member node) =>
       getConstructorInternal(node);
 
+  @override
   ConstructorEntity getSuperConstructor(
       ir.Constructor sourceNode, ir.Member targetNode) {
     ConstructorEntity source = getConstructor(sourceNode);
@@ -441,6 +447,7 @@
   @override
   DartType getDartType(ir.DartType type) => _typeConverter.convert(type);
 
+  @override
   TypeVariableType getTypeVariableType(ir.TypeParameterType type) =>
       getDartType(type);
 
@@ -452,6 +459,7 @@
     return list;
   }
 
+  @override
   InterfaceType getInterfaceType(ir.InterfaceType type) =>
       _typeConverter.convert(type);
 
@@ -529,6 +537,7 @@
         constantRequired: requireConstant, checkCasts: checkCasts);
   }
 
+  @override
   DartType substByContext(DartType type, InterfaceType context) {
     return type.subst(
         context.typeArguments, getThisType(context.element).typeArguments);
@@ -539,6 +548,7 @@
   /// If [type] doesn't have a `call` member `null` is returned. If [type] has
   /// an invalid `call` member (non-method or a synthesized method with both
   /// optional and named parameters) a [DynamicType] is returned.
+  @override
   DartType getCallType(InterfaceType type) {
     IndexedClass cls = type.element;
     assert(checkFamily(cls));
@@ -549,6 +559,7 @@
     return null;
   }
 
+  @override
   InterfaceType getThisType(IndexedClass cls) {
     assert(checkFamily(cls));
     KClassData data = classes.getData(cls);
@@ -581,6 +592,7 @@
     return data.getFunctionTypeVariables(this);
   }
 
+  @override
   DartType getTypeVariableBound(IndexedTypeVariable typeVariable) {
     assert(checkFamily(typeVariable));
     KTypeVariableData data = typeVariables.getData(typeVariable);
@@ -673,6 +685,7 @@
     return data.getFieldConstantExpression(this);
   }
 
+  @override
   InterfaceType asInstanceOf(InterfaceType type, ClassEntity cls) {
     assert(checkFamily(cls));
     OrderedTypeSet orderedTypeSet = getOrderedTypeSet(type.element);
@@ -684,6 +697,7 @@
     return supertype;
   }
 
+  @override
   OrderedTypeSet getOrderedTypeSet(IndexedClass cls) {
     assert(checkFamily(cls));
     KClassData data = classes.getData(cls);
@@ -691,6 +705,7 @@
     return data.orderedTypeSet;
   }
 
+  @override
   int getHierarchyDepth(IndexedClass cls) {
     assert(checkFamily(cls));
     KClassData data = classes.getData(cls);
@@ -698,6 +713,7 @@
     return data.orderedTypeSet.maxDepth;
   }
 
+  @override
   Iterable<InterfaceType> getInterfaces(IndexedClass cls) {
     assert(checkFamily(cls));
     KClassData data = classes.getData(cls);
@@ -705,11 +721,13 @@
     return data.interfaces;
   }
 
+  @override
   ir.Member getMemberNode(covariant IndexedMember member) {
     assert(checkFamily(member));
     return members.getData(member).node;
   }
 
+  @override
   ir.Class getClassNode(covariant IndexedClass cls) {
     assert(checkFamily(cls));
     return classes.getData(cls).node;
@@ -719,6 +737,7 @@
     return typedefs.getData(typedef).node;
   }
 
+  @override
   ImportEntity getImport(ir.LibraryDependency node) {
     if (node == null) return null;
     ir.Library library = node.parent;
@@ -726,26 +745,33 @@
     return data.imports[node];
   }
 
+  @override
   ir.TypeEnvironment get typeEnvironment {
-    if (_typeEnvironment == null) {
-      _typeEnvironment ??= new ir.TypeEnvironment(
-          new ir.CoreTypes(env.mainComponent), classHierarchy);
-    }
-    return _typeEnvironment;
+    return _typeEnvironment ??= new ir.TypeEnvironment(
+        new ir.CoreTypes(env.mainComponent), classHierarchy);
   }
 
+  @override
   ir.ClassHierarchy get classHierarchy {
-    if (_classHierarchy == null) {
-      _classHierarchy ??= new ir.ClassHierarchy(env.mainComponent);
-    }
-    return _classHierarchy;
+    return _classHierarchy ??= new ir.ClassHierarchy(env.mainComponent);
   }
 
+  Dart2jsConstantEvaluator get constantEvaluator {
+    return _constantEvaluator ??= new Dart2jsConstantEvaluator(typeEnvironment,
+        (ir.LocatedMessage message, List<ir.LocatedMessage> context) {
+      reportLocatedMessage(reporter, message, context);
+    },
+        enableAsserts: options.enableUserAssertions,
+        environment: _environment.toMap());
+  }
+
+  @override
   Name getName(ir.Name name) {
     return new Name(
         name.name, name.isPrivate ? getLibrary(name.library) : null);
   }
 
+  @override
   CallStructure getCallStructure(ir.Arguments arguments) {
     int argumentCount = arguments.positional.length + arguments.named.length;
     List<String> namedArguments = arguments.named.map((e) => e.name).toList();
@@ -767,6 +793,7 @@
         namedParameters, includeTypeParameters ? typeParameters : 0);
   }
 
+  @override
   Selector getInvocationSelector(ir.Name irName, int positionalArguments,
       List<String> namedArguments, int typeArguments) {
     Name name = getName(irName);
@@ -875,8 +902,8 @@
     return node.arguments.positional[index].accept(new Stringifier());
   }
 
-  /// Computes the [NativeBehavior] for a call to the [JS] function.
   // TODO(johnniwinther): Cache this for later use.
+  @override
   NativeBehavior getNativeBehaviorForJsCall(ir.StaticInvocation node) {
     if (node.arguments.positional.length < 2 ||
         node.arguments.named.isNotEmpty) {
@@ -907,9 +934,8 @@
         commonElements);
   }
 
-  /// Computes the [NativeBehavior] for a call to the [JS_BUILTIN]
-  /// function.
   // TODO(johnniwinther): Cache this for later use.
+  @override
   NativeBehavior getNativeBehaviorForJsBuiltinCall(ir.StaticInvocation node) {
     if (node.arguments.positional.length < 1) {
       reporter.internalError(
@@ -935,9 +961,8 @@
         commonElements);
   }
 
-  /// Computes the [NativeBehavior] for a call to the
-  /// [JS_EMBEDDED_GLOBAL] function.
   // TODO(johnniwinther): Cache this for later use.
+  @override
   NativeBehavior getNativeBehaviorForJsEmbeddedGlobalCall(
       ir.StaticInvocation node) {
     if (node.arguments.positional.length < 1) {
@@ -970,6 +995,7 @@
         commonElements);
   }
 
+  @override
   js.Name getNameForJsGetName(ConstantValue constant, Namer namer) {
     int index = extractEnumIndexFromConstantValue(
         constant, commonElements.jsGetNameEnum);
@@ -992,10 +1018,25 @@
     return null;
   }
 
+  @override
   ConstantValue getConstantValue(ir.Expression node,
       {bool requireConstant: true,
       bool implicitNull: false,
       bool checkCasts: true}) {
+    if (node is ir.ConstantExpression) {
+      ir.Constant constant =
+          constantEvaluator.evaluate(node, requireConstant: requireConstant);
+      if (constant == null) {
+        if (requireConstant) {
+          throw new UnsupportedError(
+              'No constant for ${DebugPrinter.prettyPrint(node)}');
+        }
+        return null;
+      } else {
+        return constant.accept(_constantValuefier);
+      }
+    }
+
     ConstantExpression constant;
     if (node == null) {
       if (!implicitNull) {
@@ -1035,6 +1076,7 @@
     return metadata;
   }
 
+  @override
   FunctionEntity getSuperNoSuchMethod(ClassEntity cls) {
     while (cls != null) {
       cls = elementEnvironment.getSuperClass(cls);
@@ -1305,12 +1347,10 @@
   }
 
   /// NativeBasicData is need for computation of the default super class.
+  @override
   NativeBasicData get nativeBasicData => _frontendStrategy.nativeBasicData;
 
-  /// Adds libraries in [component] to the set of libraries.
-  ///
-  /// The main method of the first component is used as the main method for the
-  /// compilation.
+  @override
   void addComponent(ir.Component component) {
     env.addComponent(component);
   }
@@ -1319,32 +1359,31 @@
       _nativeBehaviorBuilder ??= new KernelBehaviorBuilder(elementEnvironment,
           commonElements, nativeBasicData, reporter, options);
 
-  ResolutionImpact computeWorldImpact(
-      KMember member,
-      VariableScopeModel variableScopeModel,
-      Set<PragmaAnnotation> annotations) {
+  ResolutionImpact computeWorldImpact(KMember member,
+      VariableScopeModel variableScopeModel, Set<PragmaAnnotation> annotations,
+      {ImpactBuilderData impactBuilderData}) {
     KMemberData memberData = members.getData(member);
     ir.Member node = memberData.node;
 
-    if (useImpactDataForTesting) {
-      ImpactBuilder builder = new ImpactBuilder(
-          typeEnvironment, classHierarchy, variableScopeModel,
-          useAsserts: options.enableUserAssertions,
-          inferEffectivelyFinalVariableTypes:
-              !annotations.contains(PragmaAnnotation.disableFinal));
-      if (retainDataForTesting) {
+    if (impactBuilderData != null) {
+      if (impactBuilderData.typeMapsForTesting != null) {
         typeMapsForTesting ??= {};
-        typeMapsForTesting[member] = builder.typeMapsForTesting = {};
+        typeMapsForTesting[member] = impactBuilderData.typeMapsForTesting;
       }
-      node.accept(builder);
-      ImpactData impactData = builder.impactData;
-      memberData.staticTypes = builder.cachedStaticTypes;
-      KernelImpactConverter converter =
-          new KernelImpactConverter(this, member, reporter, options);
+      ImpactData impactData = impactBuilderData.impactData;
+      memberData.staticTypes = impactBuilderData.cachedStaticTypes;
+      KernelImpactConverter converter = new KernelImpactConverter(
+          this, member, reporter, options, _constantValuefier);
       return converter.convert(impactData);
     } else {
       KernelImpactBuilder builder = new KernelImpactBuilder(
-          this, member, reporter, options, variableScopeModel, annotations);
+          this,
+          member,
+          reporter,
+          options,
+          variableScopeModel,
+          annotations,
+          _constantValuefier);
       if (retainDataForTesting) {
         typeMapsForTesting ??= {};
         typeMapsForTesting[member] = builder.typeMapsForTesting = {};
@@ -1355,11 +1394,6 @@
     }
   }
 
-  ScopeModel computeScopeModel(KMember member) {
-    ir.Member node = members.getData(member).node;
-    return ScopeModel.computeScopeModel(node);
-  }
-
   Map<ir.Expression, ir.DartType> getCachedStaticTypes(KMember member) {
     Map<ir.Expression, ir.DartType> staticTypes =
         members.getData(member).staticTypes;
@@ -1453,21 +1487,7 @@
     return _getTypedefNode(typedef);
   }
 
-  /// Returns `true` is [node] has a `@Native(...)` annotation.
-  // TODO(johnniwinther): Cache this for later use.
-  bool isNativeClass(ir.Class node) {
-    for (ir.Expression annotation in node.annotations) {
-      if (annotation is ir.ConstructorInvocation) {
-        FunctionEntity target = getConstructor(annotation.target);
-        if (target.enclosingClass == commonElements.nativeAnnotationClass) {
-          return true;
-        }
-      }
-    }
-    return false;
-  }
-
-  /// Compute the kind of foreign helper function called by [node], if any.
+  @override
   ForeignKind getForeignKind(ir.StaticInvocation node) {
     if (commonElements.isForeignHelper(getMember(node.target))) {
       switch (node.target.name.name) {
@@ -1484,8 +1504,7 @@
     return ForeignKind.NONE;
   }
 
-  /// Computes the [InterfaceType] referenced by a call to the
-  /// [JS_INTERCEPTOR_CONSTANT] function, if any.
+  @override
   InterfaceType getInterfaceTypeForJsInterceptorCall(ir.StaticInvocation node) {
     if (node.arguments.positional.length != 1 ||
         node.arguments.named.isNotEmpty) {
@@ -1499,27 +1518,28 @@
     return null;
   }
 
-  /// Computes the native behavior for reading the native [field].
   // TODO(johnniwinther): Cache this for later use.
+  @override
   NativeBehavior getNativeBehaviorForFieldLoad(ir.Field field,
+      Iterable<String> createsAnnotations, Iterable<String> returnsAnnotations,
       {bool isJsInterop}) {
     DartType type = getDartType(field.type);
-    List<ConstantValue> metadata = getMetadata(field.annotations);
-    return nativeBehaviorBuilder.buildFieldLoadBehavior(
-        type, metadata, typeLookup(resolveAsRaw: false),
+    return nativeBehaviorBuilder.buildFieldLoadBehavior(type,
+        createsAnnotations, returnsAnnotations, typeLookup(resolveAsRaw: false),
         isJsInterop: isJsInterop);
   }
 
-  /// Computes the native behavior for writing to the native [field].
   // TODO(johnniwinther): Cache this for later use.
+  @override
   NativeBehavior getNativeBehaviorForFieldStore(ir.Field field) {
     DartType type = getDartType(field.type);
     return nativeBehaviorBuilder.buildFieldStoreBehavior(type);
   }
 
-  /// Computes the native behavior for calling [member].
   // TODO(johnniwinther): Cache this for later use.
+  @override
   NativeBehavior getNativeBehaviorForMethod(ir.Member member,
+      Iterable<String> createsAnnotations, Iterable<String> returnsAnnotations,
       {bool isJsInterop}) {
     DartType type;
     if (member is ir.Procedure) {
@@ -1529,9 +1549,8 @@
     } else {
       failedAt(CURRENT_ELEMENT_SPANNABLE, "Unexpected method node $member.");
     }
-    List<ConstantValue> metadata = getMetadata(member.annotations);
-    return nativeBehaviorBuilder.buildMethodBehavior(
-        type, metadata, typeLookup(resolveAsRaw: false),
+    return nativeBehaviorBuilder.buildMethodBehavior(type, createsAnnotations,
+        returnsAnnotations, typeLookup(resolveAsRaw: false),
         isJsInterop: isJsInterop);
   }
 
@@ -1849,9 +1868,13 @@
 
 /// [BehaviorBuilder] for kernel based elements.
 class KernelBehaviorBuilder extends BehaviorBuilder {
+  @override
   final ElementEnvironment elementEnvironment;
+  @override
   final CommonElements commonElements;
+  @override
   final DiagnosticReporter reporter;
+  @override
   final NativeBasicData nativeBasicData;
   final CompilerOptions _options;
 
@@ -1874,17 +1897,13 @@
 
   KernelConstantEnvironment(this._elementMap, this._environment);
 
-  @override
-  ConstantSystem get constantSystem => JavaScriptConstantSystem.only;
-
   ConstantValue _getConstantValue(
       Spannable spannable, ConstantExpression expression,
       {bool constantRequired, bool checkCasts: true}) {
     return _valueMap.putIfAbsent(expression, () {
-      return expression.evaluate(
-          new KernelEvaluationEnvironment(_elementMap, _environment, spannable,
-              constantRequired: constantRequired, checkCasts: checkCasts),
-          constantSystem);
+      return expression.evaluate(new KernelEvaluationEnvironment(
+          _elementMap, _environment, spannable,
+          constantRequired: constantRequired, checkCasts: checkCasts));
     });
   }
 }
@@ -1894,6 +1913,7 @@
 class KernelEvaluationEnvironment extends EvaluationEnvironmentBase {
   final KernelToElementMapImpl _elementMap;
   final Environment _environment;
+  @override
   final bool checkCasts;
 
   KernelEvaluationEnvironment(
@@ -1939,56 +1959,231 @@
   bool get enableAssertions => _elementMap.options.enableUserAssertions;
 }
 
-class KernelNativeMemberResolver extends NativeMemberResolverBase {
-  final KernelToElementMap elementMap;
-  final NativeBasicData nativeBasicData;
-  final NativeDataBuilder nativeDataBuilder;
+class KernelNativeMemberResolver implements NativeMemberResolver {
+  static final RegExp _identifier = new RegExp(r'^[a-zA-Z_$][a-zA-Z0-9_$]*$');
+
+  final KernelToElementMapImpl _elementMap;
+  final NativeBasicData _nativeBasicData;
+  final NativeDataBuilder _nativeDataBuilder;
 
   KernelNativeMemberResolver(
-      this.elementMap, this.nativeBasicData, this.nativeDataBuilder);
+      this._elementMap, this._nativeBasicData, this._nativeDataBuilder);
+
+  KElementEnvironment get _elementEnvironment => _elementMap.elementEnvironment;
+
+  CommonElements get _commonElements => _elementMap.commonElements;
 
   @override
-  KElementEnvironment get elementEnvironment => elementMap.elementEnvironment;
-
-  @override
-  CommonElements get commonElements => elementMap.commonElements;
-
-  @override
-  NativeBehavior computeNativeFieldStoreBehavior(covariant KField field) {
-    ir.Field node = elementMap.getMemberNode(field);
-    return elementMap.getNativeBehaviorForFieldStore(node);
+  void resolveNativeMember(ir.Member node, IrAnnotationData annotationData) {
+    bool isJsInterop = _isJsInteropMember(node);
+    if (node is ir.Procedure || node is ir.Constructor) {
+      FunctionEntity method = _elementMap.getMember(node);
+      bool isNative = _processMethodAnnotations(node, annotationData);
+      if (isNative || isJsInterop) {
+        NativeBehavior behavior = _computeNativeMethodBehavior(
+            method, annotationData,
+            isJsInterop: isJsInterop);
+        _nativeDataBuilder.setNativeMethodBehavior(method, behavior);
+      }
+    } else if (node is ir.Field) {
+      FieldEntity field = _elementMap.getMember(node);
+      bool isNative = _processFieldAnnotations(node, annotationData);
+      if (isNative || isJsInterop) {
+        NativeBehavior fieldLoadBehavior = _computeNativeFieldLoadBehavior(
+            field, annotationData,
+            isJsInterop: isJsInterop);
+        NativeBehavior fieldStoreBehavior =
+            _computeNativeFieldStoreBehavior(field);
+        _nativeDataBuilder.setNativeFieldLoadBehavior(field, fieldLoadBehavior);
+        _nativeDataBuilder.setNativeFieldStoreBehavior(
+            field, fieldStoreBehavior);
+      }
+    }
   }
 
-  @override
-  NativeBehavior computeNativeFieldLoadBehavior(covariant KField field,
+  /// Process the potentially native [field]. Adds information from metadata
+  /// attributes. Returns `true` of [method] is native.
+  bool _processFieldAnnotations(
+      ir.Field node, IrAnnotationData annotationData) {
+    if (node.isInstanceMember &&
+        _nativeBasicData
+            .isNativeClass(_elementMap.getClass(node.enclosingClass))) {
+      // Exclude non-instance (static) fields - they are not really native and
+      // are compiled as isolate globals.  Access of a property of a constructor
+      // function or a non-method property in the prototype chain, must be coded
+      // using a JS-call.
+      _setNativeName(node, annotationData);
+      return true;
+    } else {
+      String name = _findJsNameFromAnnotation(node, annotationData);
+      if (name != null) {
+        failedAt(
+            computeSourceSpanFromTreeNode(node),
+            '@JSName(...) annotation is not supported for static fields: '
+            '$node.');
+      }
+    }
+    return false;
+  }
+
+  /// Process the potentially native [method]. Adds information from metadata
+  /// attributes. Returns `true` of [method] is native.
+  bool _processMethodAnnotations(
+      ir.Member node, IrAnnotationData annotationData) {
+    if (_isNativeMethod(node, annotationData)) {
+      if (node.enclosingClass != null && !node.isInstanceMember) {
+        if (!_nativeBasicData
+            .isNativeClass(_elementMap.getClass(node.enclosingClass))) {
+          _elementMap.reporter.reportErrorMessage(
+              computeSourceSpanFromTreeNode(node),
+              MessageKind.NATIVE_NON_INSTANCE_IN_NON_NATIVE_CLASS);
+          return false;
+        }
+        _setNativeNameForStaticMethod(node, annotationData);
+      } else {
+        _setNativeName(node, annotationData);
+      }
+      return true;
+    }
+    return false;
+  }
+
+  /// Sets the native name of [element], either from an annotation, or
+  /// defaulting to the Dart name.
+  void _setNativeName(ir.Member node, IrAnnotationData annotationData) {
+    String name = _findJsNameFromAnnotation(node, annotationData);
+    name ??= node.name.name;
+    _nativeDataBuilder.setNativeMemberName(_elementMap.getMember(node), name);
+  }
+
+  /// Sets the native name of the static native method [element], using the
+  /// following rules:
+  /// 1. If [element] has a @JSName annotation that is an identifier, qualify
+  ///    that identifier to the @Native name of the enclosing class
+  /// 2. If [element] has a @JSName annotation that is not an identifier,
+  ///    use the declared @JSName as the expression
+  /// 3. If [element] does not have a @JSName annotation, qualify the name of
+  ///    the method with the @Native name of the enclosing class.
+  void _setNativeNameForStaticMethod(
+      ir.Member node, IrAnnotationData annotationData) {
+    String name = _findJsNameFromAnnotation(node, annotationData);
+    name ??= node.name.name;
+    if (_isIdentifier(name)) {
+      ClassEntity cls = _elementMap.getClass(node.enclosingClass);
+      List<String> nativeNames = _nativeBasicData.getNativeTagsOfClass(cls);
+      if (nativeNames.length != 1) {
+        failedAt(
+            computeSourceSpanFromTreeNode(node),
+            'Unable to determine a native name for the enclosing class, '
+            'options: $nativeNames');
+      }
+      _nativeDataBuilder.setNativeMemberName(
+          _elementMap.getMember(node), '${nativeNames[0]}.$name');
+    } else {
+      _nativeDataBuilder.setNativeMemberName(_elementMap.getMember(node), name);
+    }
+  }
+
+  bool _isIdentifier(String s) => _identifier.hasMatch(s);
+
+  /// Returns the JSName annotation string or `null` if no JSName annotation is
+  /// present.
+  String _findJsNameFromAnnotation(
+      ir.Member node, IrAnnotationData annotationData) {
+    String jsName;
+    if (annotationData != null) {
+      jsName = annotationData.getNativeMemberName(node);
+    } else {
+      SourceSpan sourceSpan = computeSourceSpanFromTreeNode(node);
+      for (ConstantValue value in _elementEnvironment
+          .getMemberMetadata(_elementMap.getMember(node))) {
+        String name = readAnnotationName(
+            sourceSpan, value, _commonElements.annotationJSNameClass);
+        if (jsName == null) {
+          jsName = name;
+        } else if (name != null) {
+          failedAt(
+              sourceSpan, 'Too many JSName annotations: ${value.toDartText()}');
+        }
+      }
+    }
+    return jsName;
+  }
+
+  NativeBehavior _computeNativeFieldStoreBehavior(covariant KField field) {
+    ir.Field node = _elementMap.getMemberNode(field);
+    return _elementMap.getNativeBehaviorForFieldStore(node);
+  }
+
+  NativeBehavior _computeNativeFieldLoadBehavior(
+      KField field, IrAnnotationData annotationData,
       {bool isJsInterop}) {
-    ir.Field node = elementMap.getMemberNode(field);
-    return elementMap.getNativeBehaviorForFieldLoad(node,
+    ir.Field node = _elementMap.getMemberNode(field);
+    Iterable<String> createsAnnotations;
+    Iterable<String> returnsAnnotations;
+    if (annotationData != null) {
+      createsAnnotations = annotationData.getCreatesAnnotations(node);
+      returnsAnnotations = annotationData.getReturnsAnnotations(node);
+    } else {
+      List<ConstantValue> metadata =
+          _elementEnvironment.getMemberMetadata(field);
+      createsAnnotations = getCreatesAnnotations(
+          _elementMap.reporter, _elementMap.commonElements, metadata);
+      returnsAnnotations = getReturnsAnnotations(
+          _elementMap.reporter, _elementMap.commonElements, metadata);
+    }
+    return _elementMap.getNativeBehaviorForFieldLoad(
+        node, createsAnnotations, returnsAnnotations,
         isJsInterop: isJsInterop);
   }
 
-  @override
-  NativeBehavior computeNativeMethodBehavior(covariant KFunction function,
+  NativeBehavior _computeNativeMethodBehavior(
+      KFunction function, IrAnnotationData annotationData,
       {bool isJsInterop}) {
-    ir.Member node = elementMap.getMemberNode(function);
-    return elementMap.getNativeBehaviorForMethod(node,
+    ir.Member node = _elementMap.getMemberNode(function);
+    Iterable<String> createsAnnotations;
+    Iterable<String> returnsAnnotations;
+    if (annotationData != null) {
+      createsAnnotations = annotationData.getCreatesAnnotations(node);
+      returnsAnnotations = annotationData.getReturnsAnnotations(node);
+    } else {
+      List<ConstantValue> metadata =
+          _elementEnvironment.getMemberMetadata(function);
+      createsAnnotations = getCreatesAnnotations(
+          _elementMap.reporter, _elementMap.commonElements, metadata);
+      returnsAnnotations = getReturnsAnnotations(
+          _elementMap.reporter, _elementMap.commonElements, metadata);
+    }
+    return _elementMap.getNativeBehaviorForMethod(
+        node, createsAnnotations, returnsAnnotations,
         isJsInterop: isJsInterop);
   }
 
-  @override
-  bool isNativeMethod(covariant KFunction function) {
-    if (!maybeEnableNative(function.library.canonicalUri)) return false;
-    ir.Member node = elementMap.getMemberNode(function);
-    return node.annotations.any((ir.Expression expression) {
-      return expression is ir.ConstructorInvocation &&
-          elementMap.getInterfaceType(expression.constructedType) ==
-              commonElements.externalNameType;
-    });
+  bool _isNativeMethod(ir.Member node, IrAnnotationData annotationData) {
+    if (!maybeEnableNative(node.enclosingLibrary.importUri)) return false;
+    bool hasNativeBody;
+    if (annotationData != null) {
+      hasNativeBody = annotationData.hasNativeBody(node);
+    } else {
+      hasNativeBody = node.annotations.any((ir.Expression expression) {
+        return expression is ir.ConstructorInvocation &&
+            _elementMap.getInterfaceType(expression.constructedType) ==
+                _commonElements.externalNameType;
+      });
+    }
+    if (!hasNativeBody &&
+        node.isExternal &&
+        !_nativeBasicData.isJsInteropMember(_elementMap.getMember(node))) {
+      // TODO(johnniwinther): Should we change dart:html and friends to use
+      //  `external` instead of the native body syntax?
+      _elementMap.reporter.reportErrorMessage(
+          computeSourceSpanFromTreeNode(node), MessageKind.NON_NATIVE_EXTERNAL);
+    }
+    return hasNativeBody;
   }
 
-  @override
-  bool isJsInteropMember(MemberEntity element) {
-    return nativeBasicData.isJsInteropMember(element);
+  bool _isJsInteropMember(ir.Member node) {
+    return _nativeBasicData.isJsInteropMember(_elementMap.getMember(node));
   }
 }
 
@@ -2027,3 +2222,22 @@
     return elementMap.getAppliedMixin(cls);
   }
 }
+
+DiagnosticMessage _createDiagnosticMessage(
+    DiagnosticReporter reporter, ir.LocatedMessage message) {
+  SourceSpan sourceSpan = new SourceSpan(
+      message.uri, message.charOffset, message.charOffset + message.length);
+  return reporter.createMessage(
+      sourceSpan, MessageKind.GENERIC, {'text': message.message});
+}
+
+void reportLocatedMessage(DiagnosticReporter reporter,
+    ir.LocatedMessage message, List<ir.LocatedMessage> context) {
+  DiagnosticMessage diagnosticMessage =
+      _createDiagnosticMessage(reporter, message);
+  List<DiagnosticMessage> infos = [];
+  for (ir.LocatedMessage message in context) {
+    infos.add(_createDiagnosticMessage(reporter, message));
+  }
+  reporter.reportError(diagnosticMessage, infos);
+}
diff --git a/pkg/compiler/lib/src/kernel/env.dart b/pkg/compiler/lib/src/kernel/env.dart
index 7ed64b3..0f004e3 100644
--- a/pkg/compiler/lib/src/kernel/env.dart
+++ b/pkg/compiler/lib/src/kernel/env.dart
@@ -253,13 +253,13 @@
   MemberEntity lookupMember(IrToElementMap elementMap, String name,
       {bool setter: false});
 
-  /// Calls [f] for each member of the class.
+  /// Calls [f] for each member of [cls].
   void forEachMember(IrToElementMap elementMap, void f(MemberEntity member));
 
-  /// Return the [ConstructorEntity] for the constructor [name] in the class.
+  /// Return the [ConstructorEntity] for the constructor [name] in [cls].
   ConstructorEntity lookupConstructor(IrToElementMap elementMap, String name);
 
-  /// Calls [f] for each constructor of the class.
+  /// Calls [f] for each constructor of [cls].
   void forEachConstructor(
       IrToElementMap elementMap, void f(ConstructorEntity constructor));
 
@@ -285,6 +285,7 @@
 
 /// Environment for fast lookup of class members.
 class KClassEnvImpl implements KClassEnv {
+  @override
   final ir.Class cls;
 
   Map<String, ir.Member> _constructorMap;
@@ -301,8 +302,10 @@
   KClassEnvImpl.internal(this.cls, this._constructorMap, this._memberMap,
       this._setterMap, this._members, this._isSuperMixinApplication);
 
+  @override
   bool get isUnnamedMixinApplication => cls.isAnonymousMixin;
 
+  @override
   bool get isSuperMixinApplication {
     assert(_isSuperMixinApplication != null);
     return _isSuperMixinApplication;
@@ -354,6 +357,7 @@
         initializers: <ir.Initializer>[superInitializer]);
   }
 
+  @override
   void ensureMembers(KernelToElementMapImpl elementMap) {
     _ensureMaps(elementMap);
   }
@@ -502,9 +506,7 @@
     _members = members;
   }
 
-  /// Return the [MemberEntity] for the member [name] in [cls]. If [setter] is
-  /// `true`, the setter or assignable field corresponding to [name] is
-  /// returned.
+  @override
   MemberEntity lookupMember(IrToElementMap elementMap, String name,
       {bool setter: false}) {
     _ensureMaps(elementMap);
@@ -512,7 +514,7 @@
     return member != null ? elementMap.getMember(member) : null;
   }
 
-  /// Calls [f] for each member of [cls].
+  @override
   void forEachMember(IrToElementMap elementMap, void f(MemberEntity member)) {
     _ensureMaps(elementMap);
     _members.forEach((ir.Member member) {
@@ -520,14 +522,14 @@
     });
   }
 
-  /// Return the [ConstructorEntity] for the constructor [name] in [cls].
+  @override
   ConstructorEntity lookupConstructor(IrToElementMap elementMap, String name) {
     _ensureMaps(elementMap);
     ir.Member constructor = _constructorMap[name];
     return constructor != null ? elementMap.getConstructor(constructor) : null;
   }
 
-  /// Calls [f] for each constructor of [cls].
+  @override
   void forEachConstructor(
       IrToElementMap elementMap, void f(ConstructorEntity constructor)) {
     _ensureMaps(elementMap);
@@ -541,10 +543,12 @@
     _constructorBodyList.add(constructorBody);
   }
 
+  @override
   void forEachConstructorBody(void f(ConstructorBodyEntity constructor)) {
     _constructorBodyList?.forEach(f);
   }
 
+  @override
   JClassEnv convert(IrToElementMap elementMap,
       Map<MemberEntity, MemberUsage> liveMemberUsage) {
     Map<String, ir.Member> constructorMap;
@@ -621,30 +625,42 @@
 }
 
 class KClassDataImpl implements KClassData {
+  @override
   final ir.Class node;
+  @override
   bool isMixinApplication;
   bool isCallTypeComputed = false;
 
+  @override
   InterfaceType thisType;
+  @override
   InterfaceType rawType;
+  @override
   InterfaceType supertype;
+  @override
   InterfaceType mixedInType;
+  @override
   List<InterfaceType> interfaces;
+  @override
   OrderedTypeSet orderedTypeSet;
 
   Iterable<ConstantValue> _metadata;
 
   KClassDataImpl(this.node);
 
+  @override
   bool get isEnumClass => node.isEnum;
 
+  @override
   DartType get callType => null;
 
+  @override
   Iterable<ConstantValue> getMetadata(
       covariant KernelToElementMapImpl elementMap) {
     return _metadata ??= elementMap.getMetadata(node.annotations);
   }
 
+  @override
   JClassData convert() {
     return new JClassDataImpl(node, new RegularClassDefinition(node));
   }
@@ -666,19 +682,23 @@
 }
 
 abstract class KMemberDataImpl implements KMemberData {
+  @override
   final ir.Member node;
 
   Iterable<ConstantValue> _metadata;
 
+  @override
   Map<ir.Expression, ir.DartType> staticTypes;
 
   KMemberDataImpl(this.node);
 
+  @override
   Iterable<ConstantValue> getMetadata(
       covariant KernelToElementMapImpl elementMap) {
     return _metadata ??= elementMap.getMetadata(node.annotations);
   }
 
+  @override
   InterfaceType getMemberThisType(JsToElementMap elementMap) {
     MemberEntity member = elementMap.getMember(node);
     ClassEntity cls = member.enclosingClass;
@@ -702,6 +722,7 @@
   ir.FunctionNode get functionNode;
   List<TypeVariableType> _typeVariables;
 
+  @override
   List<TypeVariableType> getFunctionTypeVariables(
       covariant KernelToElementMapImpl elementMap) {
     if (_typeVariables == null) {
@@ -729,15 +750,18 @@
 class KFunctionDataImpl extends KMemberDataImpl
     with KFunctionDataMixin
     implements KFunctionData {
+  @override
   final ir.FunctionNode functionNode;
   FunctionType _type;
 
   KFunctionDataImpl(ir.Member node, this.functionNode) : super(node);
 
+  @override
   FunctionType getFunctionType(covariant KernelToElementMapImpl elementMap) {
     return _type ??= elementMap.getFunctionType(functionNode);
   }
 
+  @override
   void forEachParameter(JsToElementMap elementMap,
       void f(DartType type, String name, ConstantValue defaultValue)) {
     void handleParameter(ir.VariableDeclaration node, {bool isOptional: true}) {
@@ -789,6 +813,7 @@
   KConstructorDataImpl(ir.Member node, ir.FunctionNode functionNode)
       : super(node, functionNode);
 
+  @override
   ConstantConstructor getConstructorConstant(
       KernelToElementMapImpl elementMap, ConstructorEntity constructor) {
     if (_constantConstructor == null) {
@@ -827,30 +852,23 @@
 
   ConstantExpression getFieldConstantExpression(
       KernelToElementMapImpl elementMap);
-
-  /// Return the [ConstantValue] the initial value of [field] or `null` if
-  /// the initializer is not a constant expression.
-  ConstantValue getFieldConstantValue(KernelToElementMapImpl elementMap);
-
-  bool hasConstantFieldInitializer(KernelToElementMapImpl elementMap);
-
-  ConstantValue getConstantFieldInitializer(KernelToElementMapImpl elementMap);
 }
 
 class KFieldDataImpl extends KMemberDataImpl implements KFieldData {
   DartType _type;
-  bool _isConstantComputed = false;
-  ConstantValue _constantValue;
   ConstantExpression _constantExpression;
 
   KFieldDataImpl(ir.Field node) : super(node);
 
+  @override
   ir.Field get node => super.node;
 
+  @override
   DartType getFieldType(covariant KernelToElementMapImpl elementMap) {
     return _type ??= elementMap.getDartType(node.type);
   }
 
+  @override
   ConstantExpression getFieldConstantExpression(
       KernelToElementMapImpl elementMap) {
     if (_constantExpression == null) {
@@ -868,33 +886,6 @@
   }
 
   @override
-  ConstantValue getFieldConstantValue(KernelToElementMapImpl elementMap) {
-    if (!_isConstantComputed) {
-      _constantValue = elementMap.getConstantValue(node.initializer,
-          requireConstant: node.isConst, implicitNull: !node.isConst);
-      _isConstantComputed = true;
-    }
-    return _constantValue;
-  }
-
-  @override
-  bool hasConstantFieldInitializer(KernelToElementMapImpl elementMap) {
-    return getFieldConstantValue(elementMap) != null;
-  }
-
-  @override
-  ConstantValue getConstantFieldInitializer(KernelToElementMapImpl elementMap) {
-    ConstantValue value = getFieldConstantValue(elementMap);
-    assert(
-        value != null,
-        failedAt(
-            computeSourceSpanFromTreeNode(node),
-            "Field ${node} doesn't have a "
-            "constant initial value."));
-    return value;
-  }
-
-  @override
   ClassTypeVariableAccess get classTypeVariableAccess {
     if (node.isInstanceMember) return ClassTypeVariableAccess.instanceField;
     return ClassTypeVariableAccess.none;
diff --git a/pkg/compiler/lib/src/kernel/front_end_adapter.dart b/pkg/compiler/lib/src/kernel/front_end_adapter.dart
index 169237d..571f11f 100644
--- a/pkg/compiler/lib/src/kernel/front_end_adapter.dart
+++ b/pkg/compiler/lib/src/kernel/front_end_adapter.dart
@@ -32,6 +32,7 @@
 }
 
 class _CompilerFileSystemEntity implements fe.FileSystemEntity {
+  @override
   final Uri uri;
   final CompilerFileSystem fs;
 
diff --git a/pkg/compiler/lib/src/kernel/kelements.dart b/pkg/compiler/lib/src/kernel/kelements.dart
index ce9a04a..1ac70af 100644
--- a/pkg/compiler/lib/src/kernel/kelements.dart
+++ b/pkg/compiler/lib/src/kernel/kelements.dart
@@ -13,18 +13,24 @@
 const String kElementPrefix = 'k:';
 
 class KLibrary extends IndexedLibrary {
+  @override
   final String name;
+  @override
   final Uri canonicalUri;
 
   KLibrary(this.name, this.canonicalUri);
 
+  @override
   String toString() => '${kElementPrefix}library($name)';
 }
 
 class KClass extends IndexedClass {
+  @override
   final KLibrary library;
 
+  @override
   final String name;
+  @override
   final bool isAbstract;
 
   KClass(this.library, this.name, {this.isAbstract});
@@ -32,21 +38,27 @@
   @override
   bool get isClosure => false;
 
+  @override
   String toString() => '${kElementPrefix}class($name)';
 }
 
 class KTypedef extends IndexedTypedef {
+  @override
   final KLibrary library;
 
+  @override
   final String name;
 
   KTypedef(this.library, this.name);
 
+  @override
   String toString() => '${kElementPrefix}typedef($name)';
 }
 
 abstract class KMember extends IndexedMember {
+  @override
   final KLibrary library;
+  @override
   final KClass enclosingClass;
   final Name _name;
   final bool _isStatic;
@@ -54,8 +66,10 @@
   KMember(this.library, this.enclosingClass, this._name, {bool isStatic: false})
       : _isStatic = isStatic;
 
+  @override
   String get name => _name.text;
 
+  @override
   Name get memberName => _name;
 
   @override
@@ -93,14 +107,18 @@
 
   String get _kind;
 
+  @override
   String toString() => '${kElementPrefix}$_kind'
       '(${enclosingClass != null ? '${enclosingClass.name}.' : ''}$name)';
 }
 
 abstract class KFunction extends KMember
     implements FunctionEntity, IndexedFunction {
+  @override
   final ParameterStructure parameterStructure;
+  @override
   final bool isExternal;
+  @override
   final AsyncMarker asyncMarker;
 
   KFunction(KLibrary library, KClass enclosingClass, Name name,
@@ -111,6 +129,7 @@
 
 abstract class KConstructor extends KFunction
     implements ConstructorEntity, IndexedConstructor {
+  @override
   final bool isConst;
 
   KConstructor(
@@ -135,6 +154,7 @@
   @override
   bool get isFromEnvironmentConstructor => false;
 
+  @override
   String get _kind => 'constructor';
 }
 
@@ -169,26 +189,8 @@
   bool get isGenerativeConstructor => false;
 }
 
-class KConstructorBody extends KFunction implements ConstructorBodyEntity {
-  final ConstructorEntity constructor;
-
-  KConstructorBody(this.constructor)
-      : super(
-            constructor.library,
-            constructor.enclosingClass,
-            constructor.memberName,
-            constructor.parameterStructure,
-            AsyncMarker.SYNC,
-            isStatic: false,
-            isExternal: false);
-
-  @override
-  bool get isFunction => true;
-
-  String get _kind => 'constructor_body';
-}
-
 class KMethod extends KFunction {
+  @override
   final bool isAbstract;
 
   KMethod(KLibrary library, KClass enclosingClass, Name name,
@@ -200,10 +202,12 @@
   @override
   bool get isFunction => true;
 
+  @override
   String get _kind => 'method';
 }
 
 class KGetter extends KFunction {
+  @override
   final bool isAbstract;
 
   KGetter(KLibrary library, KClass enclosingClass, Name name,
@@ -216,10 +220,12 @@
   @override
   bool get isGetter => true;
 
+  @override
   String get _kind => 'getter';
 }
 
 class KSetter extends KFunction {
+  @override
   final bool isAbstract;
 
   KSetter(KLibrary library, KClass enclosingClass, Name name,
@@ -234,11 +240,14 @@
   @override
   bool get isSetter => true;
 
+  @override
   String get _kind => 'setter';
 }
 
 class KField extends KMember implements FieldEntity, IndexedField {
+  @override
   final bool isAssignable;
+  @override
   final bool isConst;
 
   KField(KLibrary library, KClass enclosingClass, Name name,
@@ -248,21 +257,27 @@
   @override
   bool get isField => true;
 
+  @override
   String get _kind => 'field';
 }
 
 class KTypeVariable extends IndexedTypeVariable {
+  @override
   final Entity typeDeclaration;
+  @override
   final String name;
+  @override
   final int index;
 
   KTypeVariable(this.typeDeclaration, this.name, this.index);
 
+  @override
   String toString() =>
       '${kElementPrefix}type_variable(${typeDeclaration.name}.$name)';
 }
 
 class KLocalFunction implements Local {
+  @override
   final String name;
   final MemberEntity memberContext;
   final Entity executableContext;
@@ -272,19 +287,24 @@
   KLocalFunction(
       this.name, this.memberContext, this.executableContext, this.node);
 
+  @override
   String toString() => '${kElementPrefix}local_function'
       '(${memberContext.name}.${name ?? '<anonymous>'})';
 }
 
 class KLocalTypeVariable implements TypeVariableEntity {
+  @override
   final Entity typeDeclaration;
+  @override
   final String name;
+  @override
   final int index;
   DartType bound;
   DartType defaultType;
 
   KLocalTypeVariable(this.typeDeclaration, this.name, this.index);
 
+  @override
   String toString() =>
       '${kElementPrefix}local_type_variable(${typeDeclaration.name}.$name)';
 }
diff --git a/pkg/compiler/lib/src/kernel/kernel_impact.dart b/pkg/compiler/lib/src/kernel/kernel_impact.dart
index 4853aab..e32ea87 100644
--- a/pkg/compiler/lib/src/kernel/kernel_impact.dart
+++ b/pkg/compiler/lib/src/kernel/kernel_impact.dart
@@ -13,14 +13,17 @@
 import '../constants/values.dart';
 import '../elements/entities.dart';
 import '../elements/types.dart';
+import '../ir/constants.dart';
+import '../ir/impact.dart';
+import '../ir/impact_data.dart';
 import '../ir/runtime_type_analysis.dart';
 import '../ir/scope.dart';
 import '../ir/static_type.dart';
-import '../ir/impact.dart';
-import '../ir/impact_data.dart';
 import '../ir/util.dart';
+import '../ir/visitors.dart';
 import '../js_backend/annotations.dart';
 import '../js_backend/native_data.dart';
+import '../native/behavior.dart';
 import '../options.dart';
 import '../resolution/registry.dart' show ResolutionWorldImpactBuilder;
 import '../universe/call_structure.dart';
@@ -33,26 +36,43 @@
 /// Visitor that computes the world impact of a member.
 class KernelImpactBuilder extends ImpactBuilderBase
     with KernelImpactRegistryMixin {
+  @override
   final ResolutionWorldImpactBuilder impactBuilder;
+  @override
   final KernelToElementMap elementMap;
+  @override
   final DiagnosticReporter reporter;
+  @override
   final CompilerOptions _options;
+  @override
   final MemberEntity currentMember;
   final Set<PragmaAnnotation> _annotations;
+  @override
+  final ConstantValuefier _constantValuefier;
 
-  KernelImpactBuilder(this.elementMap, this.currentMember, this.reporter,
-      this._options, VariableScopeModel variableScopeModel, this._annotations)
+  KernelImpactBuilder(
+      this.elementMap,
+      this.currentMember,
+      this.reporter,
+      this._options,
+      VariableScopeModel variableScopeModel,
+      this._annotations,
+      this._constantValuefier)
       : this.impactBuilder =
             new ResolutionWorldImpactBuilder('${currentMember}'),
         super(elementMap.typeEnvironment, elementMap.classHierarchy,
             variableScopeModel);
 
+  @override
   CommonElements get commonElements => elementMap.commonElements;
 
+  @override
   NativeBasicData get _nativeBasicData => elementMap.nativeBasicData;
 
+  @override
   bool get useAsserts => _options.enableUserAssertions;
 
+  @override
   bool get inferEffectivelyFinalVariableTypes =>
       !_annotations.contains(PragmaAnnotation.disableFinal);
 }
@@ -60,21 +80,31 @@
 /// Converts a [ImpactData] object based on kernel to the corresponding
 /// [ResolutionImpact] based on the K model.
 class KernelImpactConverter extends KernelImpactRegistryMixin {
+  @override
   final ResolutionWorldImpactBuilder impactBuilder;
+  @override
   final KernelToElementMap elementMap;
+  @override
   final DiagnosticReporter reporter;
+  @override
   final CompilerOptions _options;
+  @override
   final MemberEntity currentMember;
+  @override
+  final ConstantValuefier _constantValuefier;
 
-  KernelImpactConverter(
-      this.elementMap, this.currentMember, this.reporter, this._options)
+  KernelImpactConverter(this.elementMap, this.currentMember, this.reporter,
+      this._options, this._constantValuefier)
       : this.impactBuilder =
             new ResolutionWorldImpactBuilder('${currentMember}');
 
+  @override
   ir.TypeEnvironment get typeEnvironment => elementMap.typeEnvironment;
 
+  @override
   CommonElements get commonElements => elementMap.commonElements;
 
+  @override
   NativeBasicData get _nativeBasicData => elementMap.nativeBasicData;
 
   /// Converts a [ImpactData] object based on kernel to the corresponding
@@ -96,6 +126,7 @@
   ir.TypeEnvironment get typeEnvironment;
   CommonElements get commonElements;
   NativeBasicData get _nativeBasicData;
+  ConstantValuefier get _constantValuefier;
 
   Object _computeReceiverConstraint(
       ir.DartType receiverType, ClassRelation relation) {
@@ -131,11 +162,21 @@
   @override
   void registerFieldNode(ir.Field field) {
     if (field.isInstanceMember &&
-        elementMap.isNativeClass(field.enclosingClass)) {
+        _nativeBasicData
+            .isNativeClass(elementMap.getClass(field.enclosingClass))) {
       MemberEntity member = elementMap.getMember(field);
+      // TODO(johnniwinther): NativeDataBuilder already has the native behavior
+      // at this point. Use that instead.
       bool isJsInterop = _nativeBasicData.isJsInteropMember(member);
-      impactBuilder.registerNativeData(elementMap
-          .getNativeBehaviorForFieldLoad(field, isJsInterop: isJsInterop));
+      List<ConstantValue> metadata =
+          elementMap.elementEnvironment.getMemberMetadata(member);
+      Iterable<String> createsAnnotations =
+          getCreatesAnnotations(reporter, commonElements, metadata);
+      Iterable<String> returnsAnnotations =
+          getReturnsAnnotations(reporter, commonElements, metadata);
+      impactBuilder.registerNativeData(elementMap.getNativeBehaviorForFieldLoad(
+          field, createsAnnotations, returnsAnnotations,
+          isJsInterop: isJsInterop));
       impactBuilder
           .registerNativeData(elementMap.getNativeBehaviorForFieldStore(field));
     }
@@ -145,9 +186,18 @@
   void registerConstructorNode(ir.Constructor constructor) {
     MemberEntity member = elementMap.getMember(constructor);
     if (constructor.isExternal && !commonElements.isForeignHelper(member)) {
+      // TODO(johnniwinther): NativeDataBuilder already has the native behavior
+      // at this point. Use that instead.
       bool isJsInterop = _nativeBasicData.isJsInteropMember(member);
-      impactBuilder.registerNativeData(elementMap
-          .getNativeBehaviorForMethod(constructor, isJsInterop: isJsInterop));
+      List<ConstantValue> metadata =
+          elementMap.elementEnvironment.getMemberMetadata(member);
+      Iterable<String> createsAnnotations =
+          getCreatesAnnotations(reporter, commonElements, metadata);
+      Iterable<String> returnsAnnotations =
+          getReturnsAnnotations(reporter, commonElements, metadata);
+      impactBuilder.registerNativeData(elementMap.getNativeBehaviorForMethod(
+          constructor, createsAnnotations, returnsAnnotations,
+          isJsInterop: isJsInterop));
     }
   }
 
@@ -182,9 +232,18 @@
   void registerProcedureNode(ir.Procedure procedure) {
     MemberEntity member = elementMap.getMember(procedure);
     if (procedure.isExternal && !commonElements.isForeignHelper(member)) {
+      // TODO(johnniwinther): NativeDataBuilder already has the native behavior
+      // at this point. Use that instead.
       bool isJsInterop = _nativeBasicData.isJsInteropMember(member);
-      impactBuilder.registerNativeData(elementMap
-          .getNativeBehaviorForMethod(procedure, isJsInterop: isJsInterop));
+      List<ConstantValue> metadata =
+          elementMap.elementEnvironment.getMemberMetadata(member);
+      Iterable<String> createsAnnotations =
+          getCreatesAnnotations(reporter, commonElements, metadata);
+      Iterable<String> returnsAnnotations =
+          getReturnsAnnotations(reporter, commonElements, metadata);
+      impactBuilder.registerNativeData(elementMap.getNativeBehaviorForMethod(
+          procedure, createsAnnotations, returnsAnnotations,
+          isJsInterop: isJsInterop));
     }
   }
 
@@ -231,7 +290,10 @@
   @override
   void registerSetLiteral(ir.DartType elementType,
       {bool isConst, bool isEmpty}) {
-    // TODO(johnniwinther,fishythefish): Register set literals.
+    impactBuilder.registerSetLiteral(new SetLiteralUse(
+        commonElements.setType(elementMap.getDartType(elementType)),
+        isConstant: isConst,
+        isEmpty: isEmpty));
   }
 
   @override
@@ -281,6 +343,16 @@
     }
   }
 
+  @override
+  void registerConstInstantiation(ir.Class cls, List<ir.DartType> typeArguments,
+      ir.LibraryDependency import) {
+    ImportEntity deferredImport = elementMap.getImport(import);
+    InterfaceType type = elementMap.createInterfaceType(cls, typeArguments);
+    impactBuilder
+        .registerTypeUse(new TypeUse.constInstantiation(type, deferredImport));
+  }
+
+  @override
   void registerConstConstructorInvocationNode(ir.ConstructorInvocation node) {
     assert(node.isConst);
     ConstructorEntity constructor = elementMap.getConstructor(node.target);
@@ -666,6 +738,7 @@
     impactBuilder.registerFeature(Feature.THROW_EXPRESSION);
   }
 
+  @override
   void registerSyncForIn(ir.DartType iterableType) {
     // TODO(johnniwinther): Use receiver constraints for the dynamic uses in
     // strong mode.
@@ -675,6 +748,7 @@
     impactBuilder.registerDynamicUse(new DynamicUse(Selectors.moveNext));
   }
 
+  @override
   void registerAsyncForIn(ir.DartType iterableType) {
     // TODO(johnniwinther): Use receiver constraints for the dynamic uses in
     // strong mode.
@@ -684,14 +758,17 @@
     impactBuilder.registerDynamicUse(new DynamicUse(Selectors.moveNext));
   }
 
+  @override
   void registerCatch() {
     impactBuilder.registerFeature(Feature.CATCH_STATEMENT);
   }
 
+  @override
   void registerStackTrace() {
     impactBuilder.registerFeature(Feature.STACK_TRACE_IN_CATCH);
   }
 
+  @override
   void registerCatchType(ir.DartType type) {
     impactBuilder
         .registerTypeUse(new TypeUse.catchType(elementMap.getDartType(type)));
@@ -711,12 +788,20 @@
   }
 
   @override
-  void registerFieldInitializer(ir.Field node) {
+  void registerFieldInitialization(ir.Field node) {
     impactBuilder
         .registerStaticUse(new StaticUse.fieldInit(elementMap.getField(node)));
   }
 
   @override
+  void registerFieldConstantInitialization(
+      ir.Field node, ConstantReference constant) {
+    impactBuilder.registerStaticUse(new StaticUse.fieldConstantInit(
+        elementMap.getField(node),
+        constant.constant.accept(_constantValuefier)));
+  }
+
+  @override
   void registerRedirectingInitializer(
       ir.Constructor constructor,
       int positionalArguments,
diff --git a/pkg/compiler/lib/src/kernel/kernel_strategy.dart b/pkg/compiler/lib/src/kernel/kernel_strategy.dart
index 32d2c7a..1559108 100644
--- a/pkg/compiler/lib/src/kernel/kernel_strategy.dart
+++ b/pkg/compiler/lib/src/kernel/kernel_strategy.dart
@@ -4,6 +4,8 @@
 
 library dart2js.kernel.frontend_strategy;
 
+import 'package:kernel/ast.dart' as ir;
+
 import '../common.dart';
 import '../common/backend_api.dart';
 import '../common/resolution.dart';
@@ -17,10 +19,13 @@
 import '../enqueue.dart';
 import '../environment.dart' as env;
 import '../frontend_strategy.dart';
+import '../ir/annotations.dart';
 import '../ir/closure.dart' show ClosureScopeModel;
+import '../ir/impact.dart';
+import '../ir/modular.dart';
 import '../ir/scope.dart' show ScopeModel;
 import '../js_backend/annotations.dart';
-import '../js_backend/allocator_analysis.dart' show KAllocatorAnalysis;
+import '../js_backend/field_analysis.dart' show KFieldAnalysis;
 import '../js_backend/backend_usage.dart';
 import '../js_backend/interceptor_data.dart';
 import '../js_backend/native_data.dart';
@@ -33,6 +38,7 @@
 import '../universe/resolution_world_builder.dart';
 import '../universe/world_builder.dart';
 import '../universe/world_impact.dart';
+import '../util/enumset.dart';
 import 'deferred_load.dart';
 import 'element_map.dart';
 import 'element_map_impl.dart';
@@ -46,35 +52,52 @@
   KernelToElementMapImpl _elementMap;
   RuntimeTypesNeedBuilder _runtimeTypesNeedBuilder;
 
-  KernelAnnotationProcessor _annotationProcesser;
+  KernelAnnotationProcessor _annotationProcessor;
 
   final Map<MemberEntity, ClosureScopeModel> closureModels = {};
 
+  ModularStrategy _modularStrategy;
+  IrAnnotationData _irAnnotationData;
+
   KernelFrontEndStrategy(this._compilerTask, this._options,
       DiagnosticReporter reporter, env.Environment environment) {
     assert(_compilerTask != null);
     _elementMap =
         new KernelToElementMapImpl(reporter, environment, this, _options);
+    _modularStrategy = new KernelModularStrategy(_compilerTask, _elementMap);
   }
 
   @override
   void registerLoadedLibraries(KernelResult kernelResult) {
     _elementMap.addComponent(kernelResult.component);
+    if (_options.useCFEConstants) {
+      _irAnnotationData = processAnnotations(kernelResult.component);
+    }
+    _annotationProcessor = new KernelAnnotationProcessor(
+        elementMap, nativeBasicDataBuilder, _irAnnotationData);
   }
 
+  IrAnnotationData get irAnnotationDataForTesting => _irAnnotationData;
+
+  ModularStrategy get modularStrategyForTesting => _modularStrategy;
+
   @override
   ElementEnvironment get elementEnvironment => _elementMap.elementEnvironment;
 
   @override
   CommonElements get commonElements => _elementMap.commonElements;
 
+  @override
   DartTypes get dartTypes => _elementMap.types;
 
   KernelToElementMap get elementMap => _elementMap;
 
   @override
-  AnnotationProcessor get annotationProcesser => _annotationProcesser ??=
-      new KernelAnnotationProcessor(elementMap, nativeBasicDataBuilder);
+  AnnotationProcessor get annotationProcessor {
+    assert(_annotationProcessor != null,
+        "AnnotationProcessor has not been created.");
+    return _annotationProcessor;
+  }
 
   @override
   DeferredLoadTask createDeferredLoadTask(Compiler compiler) =>
@@ -86,16 +109,17 @@
         _elementMap.elementEnvironment, nativeBasicData);
   }
 
+  @override
   NoSuchMethodResolver createNoSuchMethodResolver() {
     return new KernelNoSuchMethodResolver(elementMap);
   }
 
-  /// Computes the main function from [mainLibrary] adding additional world
-  /// impact to [impactBuilder].
+  @override
   FunctionEntity computeMain(WorldImpactBuilder impactBuilder) {
     return elementEnvironment.mainFunction;
   }
 
+  @override
   RuntimeTypesNeedBuilder createRuntimeTypesNeedBuilder() {
     return _runtimeTypesNeedBuilder ??= _options.disableRtiOptimization
         ? const TrivialRuntimeTypesNeedBuilder()
@@ -103,16 +127,18 @@
             elementEnvironment, _elementMap.types);
   }
 
+  @override
   RuntimeTypesNeedBuilder get runtimeTypesNeedBuilderForTesting =>
       _runtimeTypesNeedBuilder;
 
+  @override
   ResolutionWorldBuilder createResolutionWorldBuilder(
       NativeBasicData nativeBasicData,
       NativeDataBuilder nativeDataBuilder,
       InterceptorDataBuilder interceptorDataBuilder,
       BackendUsageBuilder backendUsageBuilder,
       RuntimeTypesNeedBuilder rtiNeedBuilder,
-      KAllocatorAnalysis allocatorAnalysis,
+      KFieldAnalysis allocatorAnalysis,
       NativeResolutionEnqueuer nativeResolutionEnqueuer,
       NoSuchMethodRegistry noSuchMethodRegistry,
       AnnotationsDataBuilder annotationsDataBuilder,
@@ -145,7 +171,8 @@
       NativeDataBuilder nativeDataBuilder,
       AnnotationsDataBuilder annotationsDataBuilder,
       ImpactTransformer impactTransformer,
-      Map<Entity, WorldImpact> impactCache) {
+      Map<Entity, WorldImpact> impactCache,
+      KFieldAnalysis fieldAnalysis) {
     return new KernelWorkItemBuilder(
         _compilerTask,
         elementMap,
@@ -154,9 +181,13 @@
         annotationsDataBuilder,
         impactTransformer,
         closureModels,
-        impactCache);
+        impactCache,
+        fieldAnalysis,
+        _modularStrategy,
+        _irAnnotationData);
   }
 
+  @override
   ClassQueries createClassQueries() {
     return new KernelClassQueries(elementMap);
   }
@@ -173,8 +204,11 @@
   final ImpactTransformer _impactTransformer;
   final NativeMemberResolver _nativeMemberResolver;
   final AnnotationsDataBuilder _annotationsDataBuilder;
-  final Map<MemberEntity, ClosureScopeModel> closureModels;
-  final Map<Entity, WorldImpact> impactCache;
+  final Map<MemberEntity, ClosureScopeModel> _closureModels;
+  final Map<Entity, WorldImpact> _impactCache;
+  final KFieldAnalysis _fieldAnalysis;
+  final ModularStrategy _modularStrategy;
+  final IrAnnotationData _irAnnotationData;
 
   KernelWorkItemBuilder(
       this._compilerTask,
@@ -183,8 +217,11 @@
       NativeDataBuilder nativeDataBuilder,
       this._annotationsDataBuilder,
       this._impactTransformer,
-      this.closureModels,
-      this.impactCache)
+      this._closureModels,
+      this._impactCache,
+      this._fieldAnalysis,
+      this._modularStrategy,
+      this._irAnnotationData)
       : _nativeMemberResolver = new KernelNativeMemberResolver(
             _elementMap, nativeBasicData, nativeDataBuilder);
 
@@ -197,8 +234,11 @@
         _nativeMemberResolver,
         _annotationsDataBuilder,
         entity,
-        closureModels,
-        impactCache);
+        _closureModels,
+        _impactCache,
+        _fieldAnalysis,
+        _modularStrategy,
+        _irAnnotationData);
   }
 }
 
@@ -208,9 +248,13 @@
   final ImpactTransformer _impactTransformer;
   final NativeMemberResolver _nativeMemberResolver;
   final AnnotationsDataBuilder _annotationsDataBuilder;
+  @override
   final MemberEntity element;
-  final Map<MemberEntity, ClosureScopeModel> closureModels;
-  final Map<Entity, WorldImpact> impactCache;
+  final Map<MemberEntity, ClosureScopeModel> _closureModels;
+  final Map<Entity, WorldImpact> _impactCache;
+  final KFieldAnalysis _fieldAnalysis;
+  final ModularStrategy _modularStrategy;
+  final IrAnnotationData _irAnnotationData;
 
   KernelWorkItem(
       this._compilerTask,
@@ -219,36 +263,101 @@
       this._nativeMemberResolver,
       this._annotationsDataBuilder,
       this.element,
-      this.closureModels,
-      this.impactCache);
+      this._closureModels,
+      this._impactCache,
+      this._fieldAnalysis,
+      this._modularStrategy,
+      this._irAnnotationData);
 
   @override
   WorldImpact run() {
     return _compilerTask.measure(() {
-      _nativeMemberResolver.resolveNativeMember(element);
-      Set<PragmaAnnotation> annotations = processMemberAnnotations(
+      ir.Member node = _elementMap.getMemberNode(element);
+      _nativeMemberResolver.resolveNativeMember(node, _irAnnotationData);
+
+      List<PragmaAnnotationData> pragmaAnnotationData =
+          _modularStrategy.getPragmaAnnotationData(node);
+
+      EnumSet<PragmaAnnotation> annotations = processMemberAnnotations(
+          _elementMap.options,
           _elementMap.reporter,
-          _elementMap.commonElements,
-          _elementMap.elementEnvironment,
-          _annotationsDataBuilder,
-          element);
-      ScopeModel scopeModel = _compilerTask.measureSubtask('closures', () {
-        ScopeModel scopeModel = _elementMap.computeScopeModel(element);
-        if (scopeModel?.closureScopeModel != null) {
-          closureModels[element] = scopeModel.closureScopeModel;
-        }
-        return scopeModel;
-      });
+          _elementMap.getMemberNode(element),
+          pragmaAnnotationData);
+      _annotationsDataBuilder.registerPragmaAnnotations(element, annotations);
+
+      ModularMemberData modularMemberData =
+          _modularStrategy.getModularMemberData(node, annotations);
+      ScopeModel scopeModel = modularMemberData.scopeModel;
+      if (scopeModel.closureScopeModel != null) {
+        _closureModels[element] = scopeModel.closureScopeModel;
+      }
+      if (element.isField && !element.isInstanceMember) {
+        _fieldAnalysis.registerStaticField(
+            element, scopeModel.initializerComplexity);
+      }
+      ImpactBuilderData impactBuilderData = modularMemberData.impactBuilderData;
       return _compilerTask.measureSubtask('worldImpact', () {
         ResolutionImpact impact = _elementMap.computeWorldImpact(
-            element, scopeModel?.variableScopeModel, annotations);
+            element,
+            scopeModel.variableScopeModel,
+            new Set<PragmaAnnotation>.from(
+                annotations.iterable(PragmaAnnotation.values)),
+            impactBuilderData: impactBuilderData);
         WorldImpact worldImpact =
             _impactTransformer.transformResolutionImpact(impact);
-        if (impactCache != null) {
-          impactCache[element] = worldImpact;
+        if (_impactCache != null) {
+          _impactCache[element] = worldImpact;
         }
         return worldImpact;
       });
     });
   }
+
+  @override
+  String toString() => 'KernelWorkItem($element)';
+}
+
+/// If `true` kernel impacts are computed as [ImpactData] directly on kernel
+/// and converted to the K model afterwards. This is a pre-step to modularizing
+/// the world impact computation.
+bool useImpactDataForTesting = false;
+
+class KernelModularStrategy extends ModularStrategy {
+  final CompilerTask _compilerTask;
+  final KernelToElementMapImpl _elementMap;
+
+  KernelModularStrategy(this._compilerTask, this._elementMap);
+
+  @override
+  List<PragmaAnnotationData> getPragmaAnnotationData(ir.Member node) {
+    if (_elementMap.options.useCFEConstants) {
+      return computePragmaAnnotationDataFromIr(node);
+    } else {
+      return computePragmaAnnotationData(_elementMap.commonElements,
+          _elementMap.elementEnvironment, _elementMap.getMember(node));
+    }
+  }
+
+  @override
+  ModularMemberData getModularMemberData(
+      ir.Member node, EnumSet<PragmaAnnotation> annotations) {
+    ScopeModel scopeModel = _compilerTask.measureSubtask('closures',
+        () => new ScopeModel.from(node, _elementMap.constantEvaluator));
+    ImpactBuilderData impactBuilderData;
+    if (useImpactDataForTesting) {
+      // TODO(johnniwinther): Always create and use the [ImpactBuilderData].
+      // Currently it is a bit half-baked since we cannot compute data that
+      // depend on metadata, so these parts of the impact data need to be
+      // computed during conversion to [ResolutionImpact].
+      impactBuilderData = _compilerTask.measureSubtask('worldImpact', () {
+        ImpactBuilder builder = new ImpactBuilder(_elementMap.typeEnvironment,
+            _elementMap.classHierarchy, scopeModel.variableScopeModel,
+            useAsserts: _elementMap.options.enableUserAssertions,
+            inferEffectivelyFinalVariableTypes:
+                !annotations.contains(PragmaAnnotation.disableFinal));
+        return builder.computeImpact(node);
+      });
+    }
+    return new ModularMemberData(scopeModel, impactBuilderData);
+  }
 }
diff --git a/pkg/compiler/lib/src/kernel/kernel_world.dart b/pkg/compiler/lib/src/kernel/kernel_world.dart
index 1167b48..c9d4200 100644
--- a/pkg/compiler/lib/src/kernel/kernel_world.dart
+++ b/pkg/compiler/lib/src/kernel/kernel_world.dart
@@ -8,7 +8,7 @@
 
 import '../elements/types.dart';
 import '../js_backend/annotations.dart';
-import '../js_backend/allocator_analysis.dart' show KAllocatorAnalysis;
+import '../js_backend/field_analysis.dart' show KFieldAnalysis;
 import '../js_backend/backend_usage.dart';
 import '../js_backend/interceptor_data.dart';
 import '../js_backend/native_data.dart';
@@ -24,33 +24,48 @@
 
 class KClosedWorldImpl implements KClosedWorld {
   final KernelToElementMapImpl elementMap;
+  @override
   final KElementEnvironment elementEnvironment;
+  @override
   final DartTypes dartTypes;
+  @override
   final KCommonElements commonElements;
+  @override
   final NativeData nativeData;
+  @override
   final InterceptorData interceptorData;
+  @override
   final BackendUsage backendUsage;
+  @override
   final NoSuchMethodData noSuchMethodData;
 
+  @override
   final Map<ClassEntity, Set<ClassEntity>> mixinUses;
 
+  @override
   final Map<ClassEntity, Set<ClassEntity>> typesImplementedBySubclasses;
 
   // TODO(johnniwinther): Can this be derived from [ClassSet]s?
   final Set<ClassEntity> _implementedClasses;
 
+  @override
   final Iterable<MemberEntity> liveInstanceMembers;
 
-  /// Members that are written either directly or through a setter selector.
+  @override
   final Iterable<MemberEntity> assignedInstanceMembers;
-  final KAllocatorAnalysis allocatorAnalysis;
+  @override
+  final KFieldAnalysis fieldAnalysis;
 
+  @override
   final Iterable<ClassEntity> liveNativeClasses;
 
+  @override
   final Map<MemberEntity, MemberUsage> liveMemberUsage;
 
+  @override
   final ClassHierarchy classHierarchy;
 
+  @override
   final AnnotationsData annotationsData;
 
   RuntimeTypesNeed _rtiNeed;
@@ -66,7 +81,7 @@
       this.noSuchMethodData,
       ResolutionWorldBuilder resolutionWorldBuilder,
       RuntimeTypesNeedBuilder rtiNeedBuilder,
-      this.allocatorAnalysis,
+      this.fieldAnalysis,
       Set<ClassEntity> implementedClasses,
       this.liveNativeClasses,
       this.liveInstanceMembers,
@@ -81,9 +96,10 @@
         resolutionWorldBuilder, this, options);
   }
 
+  @override
   RuntimeTypesNeed get rtiNeed => _rtiNeed;
 
-  /// Returns `true` if [cls] is implemented by an instantiated class.
+  @override
   bool isImplemented(ClassEntity cls) {
     return _implementedClasses.contains(cls);
   }
diff --git a/pkg/compiler/lib/src/kernel/loader.dart b/pkg/compiler/lib/src/kernel/loader.dart
index 7b56f28..d1cd03c 100644
--- a/pkg/compiler/lib/src/kernel/loader.dart
+++ b/pkg/compiler/lib/src/kernel/loader.dart
@@ -51,29 +51,62 @@
       : initializedCompilerState = _options.kernelInitializedCompilerState,
         super(measurer);
 
+  @override
   String get name => 'kernel loader';
 
   /// Loads an entire Kernel [Component] from a file on disk.
   Future<KernelResult> load(Uri resolvedUri) {
     return measure(() async {
+      String targetName =
+          _options.compileForServer ? "dart2js_server" : "dart2js";
+      String platform = '${targetName}_platform.dill';
       var isDill = resolvedUri.path.endsWith('.dill');
       ir.Component component;
       if (isDill) {
-        api.Input input = await _compilerInput.readFromUri(resolvedUri,
-            inputKind: api.InputKind.binary);
         component = new ir.Component();
-        new BinaryBuilder(input.data).readComponent(component);
+        Future<void> read(Uri uri) async {
+          api.Input input = await _compilerInput.readFromUri(uri,
+              inputKind: api.InputKind.binary);
+          new BinaryBuilder(input.data).readComponent(component);
+        }
+
+        await read(resolvedUri);
+        if (_options.dillDependencies != null) {
+          // Modular compiles do not include the platform on the input dill
+          // either.
+          if (_options.platformBinaries != null) {
+            await read(_options.platformBinaries.resolve(platform));
+          }
+          for (Uri dependency in _options.dillDependencies) {
+            await read(dependency);
+          }
+        }
+
+        // This is not expected to be null when creating a whole-program .dill
+        // file, but needs to be checked for modular inputs.
+        if (component.mainMethod == null) {
+          // TODO(sigmund): move this so that we use the same error template
+          // from the CFE.
+          _reporter.reportError(_reporter.createMessage(NO_LOCATION_SPANNABLE,
+              MessageKind.GENERIC, {'text': "No 'main' method found."}));
+          return null;
+        }
       } else {
-        String targetName =
-            _options.compileForServer ? "dart2js_server" : "dart2js";
-        String platform = '${targetName}_platform.dill';
+        List<Uri> dependencies = [];
+        if (_options.platformBinaries != null) {
+          dependencies.add(_options.platformBinaries.resolve(platform));
+        }
+        if (_options.dillDependencies != null) {
+          dependencies.addAll(_options.dillDependencies);
+        }
         initializedCompilerState = fe.initializeCompiler(
             initializedCompilerState,
             new Dart2jsTarget(targetName, new TargetFlags()),
             _options.librariesSpecificationUri,
-            _options.platformBinaries.resolve(platform),
+            dependencies,
             _options.packageConfig,
-            experimentalFlags: _options.languageExperiments);
+            experimentalFlags: _options.languageExperiments,
+            enableAsserts: _options.enableUserAssertions);
         component = await fe.compile(
             initializedCompilerState,
             false,
@@ -157,5 +190,6 @@
     assert(rootLibraryUri != null);
   }
 
+  @override
   String toString() => 'root=$rootLibraryUri,libraries=${libraries}';
 }
diff --git a/pkg/compiler/lib/src/kernel/native_basic_data.dart b/pkg/compiler/lib/src/kernel/native_basic_data.dart
index 5aa12e1..745afa5 100644
--- a/pkg/compiler/lib/src/kernel/native_basic_data.dart
+++ b/pkg/compiler/lib/src/kernel/native_basic_data.dart
@@ -8,22 +8,32 @@
 class KernelAnnotationProcessor implements AnnotationProcessor {
   final KernelToElementMapImpl elementMap;
   final NativeBasicDataBuilder _nativeBasicDataBuilder;
+  final IrAnnotationData annotationData;
 
-  KernelAnnotationProcessor(this.elementMap, this._nativeBasicDataBuilder);
+  KernelAnnotationProcessor(
+      this.elementMap, this._nativeBasicDataBuilder, this.annotationData);
 
+  @override
   void extractNativeAnnotations(LibraryEntity library) {
     KElementEnvironment elementEnvironment = elementMap.elementEnvironment;
     KCommonElements commonElements = elementMap.commonElements;
 
     elementEnvironment.forEachClass(library, (ClassEntity cls) {
+      ir.Class node = elementMap.getClassNode(cls);
       String annotationName;
-      for (ConstantValue value in elementEnvironment.getClassMetadata(cls)) {
-        String name = readAnnotationName(
-            cls, value, commonElements.nativeAnnotationClass);
-        if (annotationName == null) {
-          annotationName = name;
-        } else if (name != null) {
-          failedAt(cls, 'Too many name annotations.');
+      if (annotationData != null) {
+        annotationName = annotationData.getNativeClassName(node);
+      } else {
+        // TODO(johnniwinther): Remove this branch when we use constants from
+        // CFE.
+        for (ConstantValue value in elementEnvironment.getClassMetadata(cls)) {
+          String name = readAnnotationName(
+              cls, value, commonElements.nativeAnnotationClass);
+          if (annotationName == null) {
+            annotationName = name;
+          } else if (name != null) {
+            failedAt(cls, 'Too many name annotations.');
+          }
         }
       }
       if (annotationName != null) {
@@ -59,19 +69,34 @@
     }
   }
 
+  @override
   void extractJsInteropAnnotations(LibraryEntity library) {
     DiagnosticReporter reporter = elementMap.reporter;
     KElementEnvironment elementEnvironment = elementMap.elementEnvironment;
     KCommonElements commonElements = elementMap.commonElements;
 
-    String libraryName = getJsInteropName(
-        library, elementEnvironment.getLibraryMetadata(library));
+    ir.Library libraryNode = elementMap.getLibraryNode(library);
+    String libraryName;
+    if (annotationData != null) {
+      libraryName = annotationData.getJsInteropLibraryName(libraryNode);
+    } else {
+      // TODO(johnniwinther): Remove this when we use constants from CFE.
+      libraryName = getJsInteropName(
+          library, elementEnvironment.getLibraryMetadata(library));
+    }
     final bool isExplicitlylyJsLibrary = libraryName != null;
     bool isJsLibrary = isExplicitlylyJsLibrary;
 
     elementEnvironment.forEachLibraryMember(library, (MemberEntity member) {
-      String memberName = getJsInteropName(
-          library, elementEnvironment.getMemberMetadata(member));
+      ir.Member memberNode = elementMap.getMemberNode(member);
+      String memberName;
+      if (annotationData != null) {
+        memberName = annotationData.getJsInteropMemberName(memberNode);
+      } else {
+        // TODO(johnniwinther): Remove this when we use constants from CFE.
+        memberName = getJsInteropName(
+            library, elementEnvironment.getMemberMetadata(member));
+      }
       if (member.isField) {
         if (memberName != null) {
           // TODO(34174): Disallow js-interop fields.
@@ -106,15 +131,29 @@
     });
 
     elementEnvironment.forEachClass(library, (ClassEntity cls) {
-      Iterable<ConstantValue> metadata =
-          elementEnvironment.getClassMetadata(cls);
-      String className = getJsInteropName(cls, metadata);
+      Iterable<ConstantValue> metadata;
+      ir.Class classNode = elementMap.getClassNode(cls);
+      String className;
+      if (annotationData != null) {
+        className = annotationData.getJsInteropClassName(classNode);
+      } else {
+        metadata = elementEnvironment.getClassMetadata(cls);
+        // TODO(johnniwinther): Remove this when we use constants from CFE.
+        className = getJsInteropName(cls, metadata);
+      }
       if (className != null) {
-        bool isAnonymous = false;
-        for (ConstantValue value in metadata) {
-          if (isAnnotation(cls, value, commonElements.jsAnonymousClass)) {
-            isAnonymous = true;
-            break;
+        bool isAnonymous;
+        if (annotationData != null) {
+          isAnonymous = annotationData.isAnonymousJsInteropClass(classNode);
+        } else {
+          isAnonymous = false;
+          // TODO(johnniwinther): Remove this branch when we use constants from
+          // CFE.
+          for (ConstantValue value in metadata) {
+            if (isAnnotation(cls, value, commonElements.jsAnonymousClass)) {
+              isAnonymous = true;
+              break;
+            }
           }
         }
         // TODO(johnniwinther): Report an error if the class is anonymous but
@@ -132,9 +171,15 @@
                 member, MessageKind.IMPLICIT_JS_INTEROP_FIELD_NOT_SUPPORTED);*/
           } else {
             FunctionEntity function = member;
-            String memberName = getJsInteropName(
-                library, elementEnvironment.getMemberMetadata(function));
-
+            ir.Member memberNode = elementMap.getMemberNode(member);
+            String memberName;
+            if (annotationData != null) {
+              memberName = annotationData.getJsInteropMemberName(memberNode);
+            } else {
+              // TODO(johnniwinther): Remove this when we use constants from CFE.
+              memberName = getJsInteropName(
+                  library, elementEnvironment.getMemberMetadata(function));
+            }
             if (function.isExternal) {
               memberName ??= function.name;
             }
@@ -253,9 +298,15 @@
       // before a superclass that has not yet had "markJsInteropClass" called on
       // it.
       elementEnvironment.forEachClass(library, (ClassEntity cls) {
-        Iterable<ConstantValue> metadata =
-            elementEnvironment.getClassMetadata(cls);
-        String className = getJsInteropName(cls, metadata);
+        ir.Class classNode = elementMap.getClassNode(cls);
+        String className;
+        if (annotationData != null) {
+          className = annotationData.getJsInteropClassName(classNode);
+        } else {
+          // TODO(johnniwinther): Remove this when we use constants from CFE.
+          className ??=
+              getJsInteropName(cls, elementEnvironment.getClassMetadata(cls));
+        }
         if (className != null) {
           bool implementsJsJavaScriptObjectClass = false;
           elementEnvironment.forEachSupertype(cls, (InterfaceType supertype) {
diff --git a/pkg/compiler/lib/src/native/behavior.dart b/pkg/compiler/lib/src/native/behavior.dart
index 07e03da..5bb7e12 100644
--- a/pkg/compiler/lib/src/native/behavior.dart
+++ b/pkg/compiler/lib/src/native/behavior.dart
@@ -24,8 +24,10 @@
   /// The type Object, but no subtypes:
   static const JsObject = const SpecialType._('=Object');
 
+  @override
   int get hashCode => name.hashCode;
 
+  @override
   String toString() => name;
 
   static SpecialType fromName(String name) {
@@ -68,6 +70,7 @@
     return this;
   }
 
+  @override
   String toString() {
     if (this == NEVER) return 'never';
     if (this == MAY) return 'may';
@@ -258,6 +261,7 @@
     sink.end(tag);
   }
 
+  @override
   String toString() {
     return 'NativeBehavior('
         'returns: ${typesReturned}'
@@ -736,14 +740,12 @@
 
   NativeBehavior _behavior;
 
-  void _overrideWithAnnotations(
-      Iterable<ConstantValue> metadata, TypeLookup lookupType) {
-    if (metadata.isEmpty) return;
+  void _overrideWithAnnotations(Iterable<String> createsAnnotations,
+      Iterable<String> returnsAnnotations, TypeLookup lookupType) {
+    if (createsAnnotations.isEmpty && returnsAnnotations.isEmpty) return;
 
-    List creates =
-        _collect(metadata, commonElements.annotationCreatesClass, lookupType);
-    List returns =
-        _collect(metadata, commonElements.annotationReturnsClass, lookupType);
+    List creates = _collect(createsAnnotations, lookupType);
+    List returns = _collect(returnsAnnotations, lookupType);
 
     if (creates != null) {
       _behavior.typesInstantiated
@@ -760,22 +762,9 @@
   /// Returns a list of type constraints from the annotations of
   /// [annotationClass].
   /// Returns `null` if no constraints.
-  List _collect(Iterable<ConstantValue> metadata, ClassEntity annotationClass,
-      TypeLookup lookupType) {
+  List _collect(Iterable<String> annotations, TypeLookup lookupType) {
     var types = null;
-    for (ConstantValue value in metadata) {
-      if (!value.isConstructedObject) continue;
-      ConstructedConstantValue constructedObject = value;
-      if (constructedObject.type.element != annotationClass) continue;
-
-      Iterable<ConstantValue> fields = constructedObject.fields.values;
-      // TODO(sra): Better validation of the constant.
-      if (fields.length != 1 || !fields.single.isString) {
-        reporter.internalError(CURRENT_ELEMENT_SPANNABLE,
-            'Annotations needs one string: ${value.toStructuredText()}');
-      }
-      StringConstantValue specStringConstant = fields.single;
-      String specString = specStringConstant.stringValue;
+    for (String specString in annotations) {
       for (final typeString in specString.split('|')) {
         var type = NativeBehavior._parseType(typeString, lookupType);
         if (types == null) types = [];
@@ -847,7 +836,10 @@
   }
 
   NativeBehavior buildFieldLoadBehavior(
-      DartType type, Iterable<ConstantValue> metadata, TypeLookup lookupType,
+      DartType type,
+      Iterable<String> createsAnnotations,
+      Iterable<String> returnsAnnotations,
+      TypeLookup lookupType,
       {bool isJsInterop}) {
     _behavior = new NativeBehavior();
     // TODO(sigmund,sra): consider doing something better for numeric types.
@@ -857,7 +849,8 @@
     // Declared types are nullable.
     _behavior.typesReturned.add(commonElements.nullType);
     _capture(type, isJsInterop);
-    _overrideWithAnnotations(metadata, lookupType);
+    _overrideWithAnnotations(
+        createsAnnotations, returnsAnnotations, lookupType);
     return _behavior;
   }
 
@@ -869,8 +862,11 @@
     return _behavior;
   }
 
-  NativeBehavior buildMethodBehavior(FunctionType type,
-      Iterable<ConstantValue> metadata, TypeLookup lookupType,
+  NativeBehavior buildMethodBehavior(
+      FunctionType type,
+      Iterable<String> createAnnotations,
+      Iterable<String> returnsAnnotations,
+      TypeLookup lookupType,
       {bool isJsInterop}) {
     _behavior = new NativeBehavior();
     DartType returnType = type.returnType;
@@ -899,7 +895,40 @@
       _escape(type, isJsInterop);
     }
 
-    _overrideWithAnnotations(metadata, lookupType);
+    _overrideWithAnnotations(createAnnotations, returnsAnnotations, lookupType);
     return _behavior;
   }
 }
+
+List<String> _getAnnotations(DiagnosticReporter reporter,
+    Iterable<ConstantValue> metadata, ClassEntity cls) {
+  List<String> annotations = [];
+  for (ConstantValue value in metadata) {
+    if (!value.isConstructedObject) continue;
+    ConstructedConstantValue constructedObject = value;
+    if (constructedObject.type.element != cls) continue;
+
+    Iterable<ConstantValue> fields = constructedObject.fields.values;
+    // TODO(sra): Better validation of the constant.
+    if (fields.length != 1 || !fields.single.isString) {
+      reporter.internalError(CURRENT_ELEMENT_SPANNABLE,
+          'Annotations needs one string: ${value.toStructuredText()}');
+    }
+    StringConstantValue specStringConstant = fields.single;
+    String specString = specStringConstant.stringValue;
+    annotations.add(specString);
+  }
+  return annotations;
+}
+
+List<String> getCreatesAnnotations(DiagnosticReporter reporter,
+    CommonElements commonElements, Iterable<ConstantValue> metadata) {
+  return _getAnnotations(
+      reporter, metadata, commonElements.annotationCreatesClass);
+}
+
+List<String> getReturnsAnnotations(DiagnosticReporter reporter,
+    CommonElements commonElements, Iterable<ConstantValue> metadata) {
+  return _getAnnotations(
+      reporter, metadata, commonElements.annotationReturnsClass);
+}
diff --git a/pkg/compiler/lib/src/native/enqueue.dart b/pkg/compiler/lib/src/native/enqueue.dart
index dfd4b8f..4552d00 100644
--- a/pkg/compiler/lib/src/native/enqueue.dart
+++ b/pkg/compiler/lib/src/native/enqueue.dart
@@ -40,6 +40,7 @@
   final Set<ClassEntity> _registeredClasses = new Set<ClassEntity>();
   final Set<ClassEntity> _unusedClasses = new Set<ClassEntity>();
 
+  @override
   bool get hasInstantiatedNativeClasses => !_registeredClasses.isEmpty;
 
   /// Log message reported if all native types are used.
@@ -56,6 +57,7 @@
 
   bool get enableLiveTypeAnalysis => _options.enableNativeLiveTypeAnalysis;
 
+  @override
   void onInstantiatedType(InterfaceType type) {
     if (_unusedClasses.remove(type.element)) {
       _registeredClasses.add(type.element);
@@ -77,6 +79,7 @@
     }
   }
 
+  @override
   void registerNativeBehavior(
       WorldImpactBuilder impactBuilder, NativeBehavior nativeBehavior, cause) {
     _processNativeBehavior(impactBuilder, nativeBehavior, cause);
@@ -161,6 +164,7 @@
     });
   }
 
+  @override
   void logSummary(void log(String message)) {
     if (_allUsedMessage != null) {
       log(_allUsedMessage);
@@ -189,6 +193,7 @@
 
   Iterable<ClassEntity> get liveNativeClasses => _registeredClasses;
 
+  @override
   WorldImpact processNativeClasses(Iterable<Uri> libraries) {
     WorldImpactBuilderImpl impactBuilder = new WorldImpactBuilderImpl();
     Iterable<ClassEntity> nativeClasses =
@@ -201,6 +206,7 @@
     return impactBuilder;
   }
 
+  @override
   void logSummary(void log(String message)) {
     super.logSummary(log);
     log('Resolved ${_registeredClasses.length} native elements used, '
@@ -225,6 +231,7 @@
       this._nativeData)
       : super(options, elementEnvironment, commonElements, dartTypes);
 
+  @override
   WorldImpact processNativeClasses(Iterable<Uri> libraries) {
     WorldImpactBuilderImpl impactBuilder = new WorldImpactBuilderImpl();
     _unusedClasses.addAll(_nativeClasses);
@@ -247,6 +254,7 @@
     return impactBuilder;
   }
 
+  @override
   void _registerTypeUses(
       WorldImpactBuilder impactBuilder, Set<ClassEntity> classes, cause) {
     super._registerTypeUses(impactBuilder, classes, cause);
@@ -288,6 +296,7 @@
     directSubtypes.add(cls);
   }
 
+  @override
   void logSummary(void log(String message)) {
     super.logSummary(log);
     log('Compiled ${_registeredClasses.length} native classes, '
diff --git a/pkg/compiler/lib/src/native/js.dart b/pkg/compiler/lib/src/native/js.dart
index 0c83197..bbc8bd0 100644
--- a/pkg/compiler/lib/src/native/js.dart
+++ b/pkg/compiler/lib/src/native/js.dart
@@ -41,18 +41,21 @@
     node.accept(this);
   }
 
+  @override
   void visitLiteralExpression(js.LiteralExpression node) {
     sideEffects.setAllSideEffects();
     sideEffects.setDependsOnSomething();
     node.visitChildren(this);
   }
 
+  @override
   void visitLiteralStatement(js.LiteralStatement node) {
     sideEffects.setAllSideEffects();
     sideEffects.setDependsOnSomething();
     node.visitChildren(this);
   }
 
+  @override
   void visitAssignment(js.Assignment node) {
     sideEffects.setChangesStaticProperty();
     sideEffects.setChangesInstanceProperty();
@@ -60,32 +63,38 @@
     node.visitChildren(this);
   }
 
+  @override
   void visitVariableInitialization(js.VariableInitialization node) {
     node.visitChildren(this);
   }
 
+  @override
   void visitCall(js.Call node) {
     sideEffects.setAllSideEffects();
     sideEffects.setDependsOnSomething();
     node.visitChildren(this);
   }
 
+  @override
   void visitBinary(js.Binary node) {
     node.visitChildren(this);
   }
 
+  @override
   void visitThrow(js.Throw node) {
     // TODO(ngeoffray): Incorporate a mayThrow flag in the
     // [SideEffects] class.
     sideEffects.setAllSideEffects();
   }
 
+  @override
   void visitNew(js.New node) {
     sideEffects.setAllSideEffects();
     sideEffects.setDependsOnSomething();
     node.visitChildren(this);
   }
 
+  @override
   void visitPrefix(js.Prefix node) {
     if (node.op == 'delete') {
       sideEffects.setChangesStaticProperty();
@@ -95,14 +104,17 @@
     node.visitChildren(this);
   }
 
+  @override
   void visitVariableUse(js.VariableUse node) {
     sideEffects.setDependsOnStaticPropertyStore();
   }
 
+  @override
   void visitPostfix(js.Postfix node) {
     node.visitChildren(this);
   }
 
+  @override
   void visitAccess(js.PropertyAccess node) {
     sideEffects.setDependsOnIndexStore();
     sideEffects.setDependsOnInstancePropertyStore();
@@ -149,43 +161,53 @@
     return node.accept(this);
   }
 
+  @override
   NativeThrowBehavior visitNode(js.Node node) {
     return NativeThrowBehavior.MAY;
   }
 
+  @override
   NativeThrowBehavior visitLiteral(js.Literal node) {
     return NativeThrowBehavior.NEVER;
   }
 
+  @override
   NativeThrowBehavior visitInterpolatedExpression(js.InterpolatedNode node) {
     return NativeThrowBehavior.NEVER;
   }
 
+  @override
   NativeThrowBehavior visitInterpolatedSelector(js.InterpolatedNode node) {
     return NativeThrowBehavior.NEVER;
   }
 
+  @override
   NativeThrowBehavior visitArrayInitializer(js.ArrayInitializer node) {
     return node.elements.map(visit).fold(NativeThrowBehavior.NEVER, sequence);
   }
 
+  @override
   NativeThrowBehavior visitArrayHole(js.ArrayHole node) {
     return NativeThrowBehavior.NEVER;
   }
 
+  @override
   NativeThrowBehavior visitObjectInitializer(js.ObjectInitializer node) {
     return node.properties.map(visit).fold(NativeThrowBehavior.NEVER, sequence);
   }
 
+  @override
   NativeThrowBehavior visitProperty(js.Property node) {
     return sequence(visit(node.name), visit(node.value));
   }
 
+  @override
   NativeThrowBehavior visitAssignment(js.Assignment node) {
     // TODO(sra): Can we make "#.p = #" be null(1)?
     return NativeThrowBehavior.MAY;
   }
 
+  @override
   NativeThrowBehavior visitCall(js.Call node) {
     js.Expression target = node.target;
     if (target is js.PropertyAccess && _isFirstInterpolatedProperty(target)) {
@@ -201,11 +223,13 @@
     return NativeThrowBehavior.MAY;
   }
 
+  @override
   NativeThrowBehavior visitNew(js.New node) {
     // TODO(sra): `new Array(x)` where `x` is a small number.
     return NativeThrowBehavior.MAY;
   }
 
+  @override
   NativeThrowBehavior visitBinary(js.Binary node) {
     NativeThrowBehavior left = visit(node.left);
     NativeThrowBehavior right = visit(node.right);
@@ -248,10 +272,12 @@
     }
   }
 
+  @override
   NativeThrowBehavior visitThrow(js.Throw node) {
     return sequence(visit(node.expression), NativeThrowBehavior.MAY);
   }
 
+  @override
   NativeThrowBehavior visitPrefix(js.Prefix node) {
     if (node.op == 'typeof' && node.argument is js.VariableUse)
       return NativeThrowBehavior.NEVER;
@@ -269,6 +295,7 @@
     }
   }
 
+  @override
   NativeThrowBehavior visitVariableUse(js.VariableUse node) {
     // We could get a ReferenceError unless the variable is in scope. The AST
     // could distinguish in-scope and out-of scope references. For JS fragments,
@@ -284,6 +311,7 @@
     }
   }
 
+  @override
   NativeThrowBehavior visitAccess(js.PropertyAccess node) {
     js.Node receiver = node.receiver;
     NativeThrowBehavior first = visit(receiver);
diff --git a/pkg/compiler/lib/src/native/resolver.dart b/pkg/compiler/lib/src/native/resolver.dart
index f621d9e..e72f3ab 100644
--- a/pkg/compiler/lib/src/native/resolver.dart
+++ b/pkg/compiler/lib/src/native/resolver.dart
@@ -2,151 +2,19 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import 'package:kernel/ast.dart' as ir;
+
 import '../common.dart';
-import '../common_elements.dart' show CommonElements, KElementEnvironment;
+import '../common_elements.dart' show KElementEnvironment;
 import '../constants/values.dart';
 import '../elements/entities.dart';
+import '../ir/annotations.dart';
 import '../js_backend/native_data.dart';
-import 'behavior.dart';
 
 /// Interface for computing native members.
 abstract class NativeMemberResolver {
-  /// Computes whether [element] is native or JsInterop.
-  void resolveNativeMember(MemberEntity element);
-}
-
-abstract class NativeMemberResolverBase implements NativeMemberResolver {
-  static final RegExp _identifier = new RegExp(r'^[a-zA-Z_$][a-zA-Z0-9_$]*$');
-
-  KElementEnvironment get elementEnvironment;
-  CommonElements get commonElements;
-  NativeBasicData get nativeBasicData;
-  NativeDataBuilder get nativeDataBuilder;
-
-  bool isJsInteropMember(covariant MemberEntity element);
-  bool isNativeMethod(covariant FunctionEntity element);
-
-  NativeBehavior computeNativeMethodBehavior(covariant FunctionEntity function,
-      {bool isJsInterop});
-  NativeBehavior computeNativeFieldLoadBehavior(covariant FieldEntity field,
-      {bool isJsInterop});
-  NativeBehavior computeNativeFieldStoreBehavior(covariant FieldEntity field);
-
-  @override
-  void resolveNativeMember(MemberEntity element) {
-    bool isJsInterop = isJsInteropMember(element);
-    if (element.isFunction ||
-        element.isConstructor ||
-        element.isGetter ||
-        element.isSetter) {
-      FunctionEntity method = element;
-      bool isNative = _processMethodAnnotations(method);
-      if (isNative || isJsInterop) {
-        NativeBehavior behavior =
-            computeNativeMethodBehavior(method, isJsInterop: isJsInterop);
-        nativeDataBuilder.setNativeMethodBehavior(method, behavior);
-      }
-    } else if (element.isField) {
-      FieldEntity field = element;
-      bool isNative = _processFieldAnnotations(field);
-      if (isNative || isJsInterop) {
-        NativeBehavior fieldLoadBehavior =
-            computeNativeFieldLoadBehavior(field, isJsInterop: isJsInterop);
-        NativeBehavior fieldStoreBehavior =
-            computeNativeFieldStoreBehavior(field);
-        nativeDataBuilder.setNativeFieldLoadBehavior(field, fieldLoadBehavior);
-        nativeDataBuilder.setNativeFieldStoreBehavior(
-            field, fieldStoreBehavior);
-      }
-    }
-  }
-
-  /// Process the potentially native [field]. Adds information from metadata
-  /// attributes. Returns `true` of [method] is native.
-  bool _processFieldAnnotations(covariant FieldEntity element) {
-    if (element.isInstanceMember &&
-        nativeBasicData.isNativeClass(element.enclosingClass)) {
-      // Exclude non-instance (static) fields - they are not really native and
-      // are compiled as isolate globals.  Access of a property of a constructor
-      // function or a non-method property in the prototype chain, must be coded
-      // using a JS-call.
-      _setNativeName(element);
-      return true;
-    } else {
-      String name = _findJsNameFromAnnotation(element);
-      if (name != null) {
-        failedAt(element,
-            '@JSName(...) annotation is not supported for static fields.');
-      }
-    }
-    return false;
-  }
-
-  /// Process the potentially native [method]. Adds information from metadata
-  /// attributes. Returns `true` of [method] is native.
-  bool _processMethodAnnotations(covariant FunctionEntity method) {
-    if (isNativeMethod(method)) {
-      if (method.isStatic) {
-        _setNativeNameForStaticMethod(method);
-      } else {
-        _setNativeName(method);
-      }
-      return true;
-    }
-    return false;
-  }
-
-  /// Sets the native name of [element], either from an annotation, or
-  /// defaulting to the Dart name.
-  void _setNativeName(MemberEntity element) {
-    String name = _findJsNameFromAnnotation(element);
-    if (name == null) name = element.name;
-    nativeDataBuilder.setNativeMemberName(element, name);
-  }
-
-  /// Sets the native name of the static native method [element], using the
-  /// following rules:
-  /// 1. If [element] has a @JSName annotation that is an identifier, qualify
-  ///    that identifier to the @Native name of the enclosing class
-  /// 2. If [element] has a @JSName annotation that is not an identifier,
-  ///    use the declared @JSName as the expression
-  /// 3. If [element] does not have a @JSName annotation, qualify the name of
-  ///    the method with the @Native name of the enclosing class.
-  void _setNativeNameForStaticMethod(FunctionEntity element) {
-    String name = _findJsNameFromAnnotation(element);
-    if (name == null) name = element.name;
-    if (_isIdentifier(name)) {
-      List<String> nativeNames =
-          nativeBasicData.getNativeTagsOfClass(element.enclosingClass);
-      if (nativeNames.length != 1) {
-        failedAt(
-            element,
-            'Unable to determine a native name for the enclosing class, '
-            'options: $nativeNames');
-      }
-      nativeDataBuilder.setNativeMemberName(element, '${nativeNames[0]}.$name');
-    } else {
-      nativeDataBuilder.setNativeMemberName(element, name);
-    }
-  }
-
-  bool _isIdentifier(String s) => _identifier.hasMatch(s);
-
-  /// Returns the JSName annotation string or `null` if no JSName annotation is
-  /// present.
-  String _findJsNameFromAnnotation(MemberEntity element) {
-    String jsName = null;
-    for (ConstantValue value in elementEnvironment.getMemberMetadata(element)) {
-      String name = readAnnotationName(
-          element, value, commonElements.annotationJSNameClass);
-      if (jsName == null) {
-        jsName = name;
-      } else if (name != null) {
-        failedAt(element, 'Too many JSName annotations: ${value.toDartText()}');
-      }
-    }
-    return jsName;
-  }
+  /// Computes whether [node] is native or JsInterop.
+  void resolveNativeMember(ir.Member node, IrAnnotationData annotationData);
 }
 
 /// Determines all native classes in a set of libraries.
@@ -163,6 +31,7 @@
 
   BaseNativeClassFinder(this._elementEnvironment, this._nativeBasicData);
 
+  @override
   Iterable<ClassEntity> computeNativeClasses(Iterable<Uri> libraries) {
     Set<ClassEntity> nativeClasses = new Set<ClassEntity>();
     libraries.forEach((uri) => _processNativeClassesInLibrary(
diff --git a/pkg/compiler/lib/src/null_compiler_output.dart b/pkg/compiler/lib/src/null_compiler_output.dart
index 95206bb..b01e544 100644
--- a/pkg/compiler/lib/src/null_compiler_output.dart
+++ b/pkg/compiler/lib/src/null_compiler_output.dart
@@ -29,10 +29,13 @@
 
   NullSink(this.name);
 
+  @override
   void add(String value) {}
 
+  @override
   void close() {}
 
+  @override
   String toString() => name;
 
   /// Convenience method for getting an [api.CompilerOutputProvider].
@@ -53,5 +56,6 @@
   @override
   void close() {}
 
+  @override
   String toString() => 'NullBinarySink($uri)';
 }
diff --git a/pkg/compiler/lib/src/options.dart b/pkg/compiler/lib/src/options.dart
index 89e4c55..f91b15b 100644
--- a/pkg/compiler/lib/src/options.dart
+++ b/pkg/compiler/lib/src/options.dart
@@ -7,6 +7,7 @@
 import 'package:front_end/src/api_unstable/dart2js.dart' as fe;
 
 import 'commandline_options.dart' show Flags;
+import 'util/util.dart';
 
 /// Options used for controlling diagnostic messages.
 abstract class DiagnosticOptions {
@@ -51,6 +52,19 @@
   /// If not null then [packageRoot] should be null.
   Uri packageConfig;
 
+  /// List of kernel files to load.
+  ///
+  /// When compiling modularly, this contains kernel files that are needed
+  /// to compile a single module.
+  ///
+  /// When linking, this contains all kernel files that form part of the final
+  /// program.
+  ///
+  /// At this time, this list points to full kernel files. In the future, we may
+  /// use a list of outline files for modular compiles, and only use full kernel
+  /// files for linking.
+  List<Uri> dillDependencies;
+
   /// Location from which serialized inference data is read.
   ///
   /// If this is set, the [entryPoint] is expected to be a .dill file and the
@@ -66,6 +80,15 @@
   /// [outputUri].
   bool cfeOnly = false;
 
+  /// Flag only meant for dart2js developers to iterate on global inference
+  /// changes.
+  ///
+  /// When working on large apps this flag allows to load serialized data for
+  /// the app (via --read-data), reuse its closed world, and rerun the global
+  /// inference phase (even though the serialized data already contains a global
+  /// inference result).
+  bool debugGlobalInference = false;
+
   /// Resolved constant "environment" values passed to the compiler via the `-D`
   /// flags.
   Map<String, String> environment = const <String, String>{};
@@ -73,6 +96,10 @@
   /// Flags enabling language experiments.
   Map<fe.ExperimentalFlag, bool> languageExperiments = {};
 
+  /// `true` if CFE performs constant evaluation.
+  bool get useCFEConstants =>
+      languageExperiments[fe.ExperimentalFlag.constantUpdate2018];
+
   /// A possibly null state object for kernel compilation.
   fe.InitializedCompilerState kernelInitializedCompilerState;
 
@@ -127,15 +154,19 @@
   bool disableProgramSplit = false;
 
   /// Diagnostic option: If `true`, warnings cause the compilation to fail.
+  @override
   bool fatalWarnings = false;
 
   /// Diagnostic option: Emit terse diagnostics without howToFix.
+  @override
   bool terseDiagnostics = false;
 
   /// Diagnostic option: If `true`, warnings are not reported.
+  @override
   bool suppressWarnings = false;
 
   /// Diagnostic option: If `true`, hints are not reported.
+  @override
   bool suppressHints = false;
 
   /// Diagnostic option: List of packages for which warnings and hints are
@@ -152,12 +183,15 @@
   /// Whether to disable optimization for need runtime type information.
   bool disableRtiOptimization = false;
 
-  /// Whether to emit a .json file with a summary of the information used by the
-  /// compiler during optimization. This includes resolution details,
-  /// dependencies between elements, results of type inference, and the output
-  /// code for each function.
+  /// Whether to emit a summary of the information used by the compiler during
+  /// optimization. This includes resolution details, dependencies between
+  /// elements, results of type inference, and data about generated code.
   bool dumpInfo = false;
 
+  /// Whether to use the new dump-info binary format. This will be the default
+  /// after a transitional period.
+  bool useDumpInfoBinaryFormat = false;
+
   /// Whether we allow passing an extra argument to `assert`, containing a
   /// reason for why an assertion fails. (experimental)
   ///
@@ -165,10 +199,6 @@
   /// without causing dart2js to crash. The flag has no effect.
   bool enableAssertMessage = true;
 
-  /// Whether the user specified a flag to allow the use of dart:mirrors. This
-  /// silences a warning produced by the compiler.
-  bool enableExperimentalMirrors = false;
-
   /// Whether to enable minification
   // TODO(sigmund): rename to minify
   bool enableMinification = false;
@@ -191,7 +221,7 @@
   /// Whether to generate a source-map file together with the output program.
   bool generateSourceMap = true;
 
-  /// URI of the main output if the compiler is generating source maps.
+  /// URI of the main output of the compiler.
   Uri outputUri;
 
   /// Location of the libraries specification file.
@@ -237,6 +267,13 @@
   /// This is an internal configuration option derived from other flags.
   CheckPolicy implicitDowncastCheckPolicy;
 
+  /// What the compiler should do with a boolean value in a condition context
+  /// when the language specification says it is a runtime error for it to be
+  /// null.
+  ///
+  /// This is an internal configuration option derived from other flags.
+  CheckPolicy conditionCheckPolicy;
+
   /// Whether to generate code compliant with content security policy (CSP).
   bool useContentSecurityPolicy = false;
 
@@ -265,9 +302,6 @@
   /// This is an experimental feature.
   bool experimentalTrackAllocations = false;
 
-  /// Expermental optimization.
-  bool experimentLocalNames = false;
-
   /// Experimental part file function generation.
   bool experimentStartupFunctions = false;
 
@@ -280,6 +314,9 @@
   /// called.
   bool experimentCallInstrumentation = false;
 
+  /// Experimental use of the new (Q2 2019) RTI system.
+  bool experimentNewRti = false;
+
   /// The path to the file that contains the profiled allocations.
   ///
   /// The file must contain the Map that was produced by using
@@ -298,6 +335,11 @@
   /// Create an options object by parsing flags from [options].
   static CompilerOptions parse(List<String> options,
       {Uri librariesSpecificationUri, Uri platformBinaries}) {
+    Map<fe.ExperimentalFlag, bool> languageExperiments =
+        _extractExperiments(options);
+    if (equalMaps(languageExperiments, fe.defaultExperimentalFlags)) {
+      platformBinaries ??= fe.computePlatformBinariesLocation();
+    }
     return new CompilerOptions()
       ..librariesSpecificationUri = librariesSpecificationUri
       ..allowMockCompilation = _hasOption(options, Flags.allowMockCompilation)
@@ -316,7 +358,7 @@
       ..suppressHints = _hasOption(options, Flags.suppressHints)
       ..shownPackageWarnings =
           _extractOptionalCsvOption(options, Flags.showPackageWarnings)
-      ..languageExperiments = _extractExperiments(options)
+      ..languageExperiments = languageExperiments
       ..disableInlining = _hasOption(options, Flags.disableInlining)
       ..disableProgramSplit = _hasOption(options, Flags.disableProgramSplit)
       ..disableTypeInference = _hasOption(options, Flags.disableTypeInference)
@@ -325,8 +367,8 @@
       ..disableRtiOptimization =
           _hasOption(options, Flags.disableRtiOptimization)
       ..dumpInfo = _hasOption(options, Flags.dumpInfo)
-      ..enableExperimentalMirrors =
-          _hasOption(options, Flags.enableExperimentalMirrors)
+      ..useDumpInfoBinaryFormat =
+          _hasOption(options, "${Flags.dumpInfo}=binary")
       ..enableMinification = _hasOption(options, Flags.minify)
       .._disableMinification = _hasOption(options, Flags.noMinify)
       ..enableNativeLiveTypeAnalysis =
@@ -337,12 +379,12 @@
           _hasOption(options, Flags.experimentalTrackAllocations)
       ..experimentalAllocationsPath = _extractStringOption(
           options, "${Flags.experimentalAllocationsPath}=", null)
-      ..experimentLocalNames = _hasOption(options, Flags.experimentLocalNames)
       ..experimentStartupFunctions =
           _hasOption(options, Flags.experimentStartupFunctions)
       ..experimentToBoolean = _hasOption(options, Flags.experimentToBoolean)
       ..experimentCallInstrumentation =
           _hasOption(options, Flags.experimentCallInstrumentation)
+      ..experimentNewRti = _hasOption(options, Flags.experimentNewRti)
       ..generateCodeWithCompileTimeErrors =
           _hasOption(options, Flags.generateCodeWithCompileTimeErrors)
       ..generateSourceMap = !_hasOption(options, Flags.noSourceMaps)
@@ -366,9 +408,12 @@
       ..useNewSourceInfo = _hasOption(options, Flags.useNewSourceInfo)
       ..verbose = _hasOption(options, Flags.verbose)
       ..showInternalProgress = _hasOption(options, Flags.progress)
+      ..dillDependencies =
+          _extractUriListOption(options, '${Flags.dillDependencies}')
       ..readDataUri = _extractUriOption(options, '${Flags.readData}=')
       ..writeDataUri = _extractUriOption(options, '${Flags.writeData}=')
-      ..cfeOnly = _hasOption(options, Flags.cfeOnly);
+      ..cfeOnly = _hasOption(options, Flags.cfeOnly)
+      ..debugGlobalInference = _hasOption(options, Flags.debugGlobalInference);
   }
 
   void validate() {
@@ -389,7 +434,8 @@
     if (packageRoot != null && !packageRoot.path.endsWith("/")) {
       throw new ArgumentError("[packageRoot] must end with a /");
     }
-    if (platformBinaries == null) {
+    if (platformBinaries == null &&
+        equalMaps(languageExperiments, fe.defaultExperimentalFlags)) {
       throw new ArgumentError("Missing required ${Flags.platformBinaries}");
     }
   }
@@ -427,9 +473,11 @@
     if (omitImplicitChecks) {
       parameterCheckPolicy = CheckPolicy.trusted;
       implicitDowncastCheckPolicy = CheckPolicy.trusted;
+      conditionCheckPolicy = CheckPolicy.trusted;
     } else {
       parameterCheckPolicy = CheckPolicy.checked;
       implicitDowncastCheckPolicy = CheckPolicy.checked;
+      conditionCheckPolicy = CheckPolicy.checked;
     }
 
     if (_disableMinification) {
@@ -438,14 +486,17 @@
   }
 
   /// Returns `true` if warnings and hints are shown for all packages.
+  @override
   bool get showAllPackageWarnings {
     return shownPackageWarnings != null && shownPackageWarnings.isEmpty;
   }
 
   /// Returns `true` if warnings and hints are hidden for all packages.
+  @override
   bool get hidePackageWarnings => shownPackageWarnings == null;
 
   /// Returns `true` if warnings should be should for [uri].
+  @override
   bool showPackageWarningsFor(Uri uri) {
     if (showAllPackageWarnings) {
       return true;
@@ -474,6 +525,7 @@
   static const trusted = const CheckPolicy(isTrusted: true);
   static const checked = const CheckPolicy(isEmitted: true);
 
+  @override
   String toString() => 'CheckPolicy(isTrusted=$isTrusted,'
       'isEmitted=$isEmitted)';
 }
@@ -513,6 +565,15 @@
   return null;
 }
 
+/// Extract list of comma separated Uris provided for [flag]. Returns an
+/// empty list if [option] contain [flag] without arguments. Returns `null` if
+/// [option] doesn't contain [flag] with or without arguments.
+List<Uri> _extractUriListOption(List<String> options, String flag) {
+  List<String> stringUris = _extractOptionalCsvOption(options, flag);
+  if (stringUris == null) return null;
+  return stringUris.map(Uri.parse).toList();
+}
+
 Map<fe.ExperimentalFlag, bool> _extractExperiments(List<String> options) {
   List<String> experiments =
       _extractOptionalCsvOption(options, Flags.enableLanguageExperiments);
diff --git a/pkg/compiler/lib/src/ordered_typeset.dart b/pkg/compiler/lib/src/ordered_typeset.dart
index efec511..ce4ff17 100644
--- a/pkg/compiler/lib/src/ordered_typeset.dart
+++ b/pkg/compiler/lib/src/ordered_typeset.dart
@@ -175,6 +175,7 @@
     return null;
   }
 
+  @override
   String toString() => types.toString();
 }
 
@@ -213,6 +214,7 @@
   int getHierarchyDepth(covariant ClassEntity cls);
   OrderedTypeSet getOrderedTypeSet(covariant ClassEntity cls);
 
+  @override
   OrderedTypeSet createOrderedTypeSet(
       InterfaceType supertype, Link<DartType> interfaces) {
     // TODO(15296): Collapse these iterations to one when the order is not
@@ -305,6 +307,7 @@
     return new OrderedTypeSet.internal(levels, levels.last);
   }
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     for (int depth = 0; depth <= maxDepth; depth++) {
diff --git a/pkg/compiler/lib/src/resolution/registry.dart b/pkg/compiler/lib/src/resolution/registry.dart
index 18f373a..9fdb9bb 100644
--- a/pkg/compiler/lib/src/resolution/registry.dart
+++ b/pkg/compiler/lib/src/resolution/registry.dart
@@ -17,6 +17,7 @@
   final String name;
   EnumSet<Feature> _features;
   Setlet<MapLiteralUse> _mapLiterals;
+  Setlet<SetLiteralUse> _setLiterals;
   Setlet<ListLiteralUse> _listLiterals;
   Setlet<String> _constSymbolNames;
   Setlet<ConstantExpression> _constantLiterals;
@@ -41,6 +42,16 @@
     return _mapLiterals != null ? _mapLiterals : const <MapLiteralUse>[];
   }
 
+  void registerSetLiteral(SetLiteralUse setLiteralUse) {
+    assert(setLiteralUse != null);
+    _setLiterals ??= new Setlet<SetLiteralUse>();
+    _setLiterals.add(setLiteralUse);
+  }
+
+  @override
+  Iterable<SetLiteralUse> get setLiterals =>
+      _setLiterals ?? const <SetLiteralUse>[];
+
   void registerListLiteral(ListLiteralUse listLiteralUse) {
     assert(listLiteralUse != null);
     _listLiterals ??= new Setlet<ListLiteralUse>();
@@ -92,6 +103,7 @@
     _constantLiterals.add(constant);
   }
 
+  @override
   Iterable<ConstantExpression> get constantLiterals {
     return _constantLiterals != null
         ? _constantLiterals
@@ -129,6 +141,7 @@
     return _genericInstantiations ?? const <GenericInstantiation>[];
   }
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write('ResolutionWorldImpactBuilder($name)');
@@ -145,6 +158,12 @@
         sb.write('\n  $use');
       }
     }
+    if (_setLiterals != null) {
+      sb.write('\n set-literals:');
+      for (SetLiteralUse use in _setLiterals) {
+        sb.write('\n  $use');
+      }
+    }
     if (_listLiterals != null) {
       sb.write('\n list-literals:');
       for (ListLiteralUse use in _listLiterals) {
diff --git a/pkg/compiler/lib/src/serialization/abstract_sink.dart b/pkg/compiler/lib/src/serialization/abstract_sink.dart
index d63db8f..dfe4e9b 100644
--- a/pkg/compiler/lib/src/serialization/abstract_sink.dart
+++ b/pkg/compiler/lib/src/serialization/abstract_sink.dart
@@ -43,6 +43,7 @@
     _importIndex = new IndexedSink<ImportEntity>(this);
   }
 
+  @override
   void begin(String tag) {
     if (useDataKinds) {
       _tags ??= <String>[];
@@ -51,6 +52,7 @@
     }
   }
 
+  @override
   void end(Object tag) {
     if (useDataKinds) {
       _end(tag);
@@ -207,6 +209,7 @@
     _writeIntInternal(value);
   }
 
+  @override
   void writeTreeNode(ir.TreeNode value) {
     _writeDataKind(DataKind.treeNode);
     _writeTreeNode(value);
@@ -229,6 +232,12 @@
     } else if (value is ir.TypeParameter) {
       _writeEnumInternal(_TreeNodeKind.typeParameter);
       _writeTypeParameter(value);
+    } else if (value is ConstantReference) {
+      _writeEnumInternal(_TreeNodeKind.constant);
+      _writeTreeNode(value.expression);
+      _ConstantNodeIndexerVisitor indexer = new _ConstantNodeIndexerVisitor();
+      value.expression.constant.accept(indexer);
+      _writeIntInternal(indexer.getIndex(value.constant));
     } else {
       _writeEnumInternal(_TreeNodeKind.node);
       ir.TreeNode member = value;
@@ -294,22 +303,27 @@
     if (useDataKinds) _writeEnumInternal(kind);
   }
 
+  @override
   void writeLibrary(IndexedLibrary value) {
     writeInt(value.libraryIndex);
   }
 
+  @override
   void writeClass(IndexedClass value) {
     writeInt(value.classIndex);
   }
 
+  @override
   void writeTypedef(IndexedTypedef value) {
     writeInt(value.typedefIndex);
   }
 
+  @override
   void writeMember(IndexedMember value) {
     writeInt(value.memberIndex);
   }
 
+  @override
   void writeLocal(Local local) {
     if (local is JLocal) {
       writeEnum(LocalKind.jLocal);
@@ -395,11 +409,18 @@
         writeDartType(constant.type);
         writeConstants(constant.entries);
         break;
-      case ConstantValueKind.MAP:
-        MapConstantValue constant = value;
+      case ConstantValueKind.SET:
+        constant_system.JavaScriptSetConstant constant = value;
         writeDartType(constant.type);
-        writeConstants(constant.keys);
+        writeConstant(constant.entries);
+        break;
+      case ConstantValueKind.MAP:
+        constant_system.JavaScriptMapConstant constant = value;
+        writeDartType(constant.type);
+        writeConstant(constant.keyList);
         writeConstants(constant.values);
+        writeConstantOrNull(constant.protoValue);
+        writeBool(constant.onlyStringKeys);
         break;
       case ConstantValueKind.CONSTRUCTED:
         ConstructedConstantValue constant = value;
diff --git a/pkg/compiler/lib/src/serialization/abstract_source.dart b/pkg/compiler/lib/src/serialization/abstract_source.dart
index 792ae23..f4160ce 100644
--- a/pkg/compiler/lib/src/serialization/abstract_source.dart
+++ b/pkg/compiler/lib/src/serialization/abstract_source.dart
@@ -27,14 +27,17 @@
     _importIndex = new IndexedSource<ImportEntity>(this);
   }
 
+  @override
   void begin(String tag) {
     if (useDataKinds) _begin(tag);
   }
 
+  @override
   void end(String tag) {
     if (useDataKinds) _end(tag);
   }
 
+  @override
   void registerComponentLookup(ComponentLookup componentLookup) {
     assert(_componentLookup == null);
     _componentLookup = componentLookup;
@@ -45,6 +48,7 @@
     return _componentLookup;
   }
 
+  @override
   void registerEntityLookup(EntityLookup entityLookup) {
     assert(_entityLookup == null);
     _entityLookup = entityLookup;
@@ -55,6 +59,7 @@
     return _entityLookup;
   }
 
+  @override
   void registerLocalLookup(LocalLookup localLookup) {
     assert(_localLookup == null);
     _localLookup = localLookup;
@@ -71,18 +76,22 @@
     return source.read(f);
   }
 
+  @override
   IndexedLibrary readLibrary() {
     return getIndexedLibrary(readInt());
   }
 
+  @override
   IndexedClass readClass() {
     return getIndexedClass(readInt());
   }
 
+  @override
   IndexedTypedef readTypedef() {
     return getIndexedTypedef(readInt());
   }
 
+  @override
   IndexedMember readMember() {
     return getIndexedMember(readInt());
   }
@@ -409,6 +418,7 @@
     return _readConstant();
   }
 
+  @override
   double readDoubleValue() {
     _checkDataKind(DataKind.double);
     return _readDoubleValue();
@@ -423,6 +433,7 @@
     return data.getFloat64(0);
   }
 
+  @override
   int readIntegerValue() {
     _checkDataKind(DataKind.int);
     return _readBigInt().toInt();
@@ -457,11 +468,18 @@
         DartType type = readDartType();
         List<ConstantValue> entries = readConstants();
         return new ListConstantValue(type, entries);
+      case ConstantValueKind.SET:
+        DartType type = readDartType();
+        MapConstantValue entries = readConstant();
+        return new constant_system.JavaScriptSetConstant(type, entries);
       case ConstantValueKind.MAP:
         DartType type = readDartType();
-        List<ConstantValue> keys = readConstants();
+        ListConstantValue keyList = readConstant();
         List<ConstantValue> values = readConstants();
-        return new MapConstantValue(type, keys, values);
+        ConstantValue protoValue = readConstantOrNull();
+        bool onlyStringKeys = readBool();
+        return new constant_system.JavaScriptMapConstant(
+            type, keyList, values, protoValue, onlyStringKeys);
       case ConstantValueKind.CONSTRUCTED:
         InterfaceType type = readDartType();
         Map<FieldEntity, ConstantValue> fields =
@@ -500,6 +518,14 @@
         return _readFunctionNode();
       case _TreeNodeKind.typeParameter:
         return _readTypeParameter();
+      case _TreeNodeKind.constant:
+        // TODO(johnniwinther): Support serialization within a member context
+        // and use this to temporarily cache constant node indices.
+        ir.ConstantExpression expression = _readTreeNode();
+        _ConstantNodeIndexerVisitor indexer = new _ConstantNodeIndexerVisitor();
+        expression.constant.accept(indexer);
+        ir.Constant constant = indexer.getConstant(_readIntInternal());
+        return new ConstantReference(expression, constant);
       case _TreeNodeKind.node:
         _MemberData data = _readMemberData();
         int index = _readIntInternal();
diff --git a/pkg/compiler/lib/src/serialization/binary_sink.dart b/pkg/compiler/lib/src/serialization/binary_sink.dart
index ae11f9b..3f771b4 100644
--- a/pkg/compiler/lib/src/serialization/binary_sink.dart
+++ b/pkg/compiler/lib/src/serialization/binary_sink.dart
@@ -16,9 +16,11 @@
       : _bufferedSink = new BufferedSink(sink),
         super(useDataKinds: useDataKinds);
 
+  @override
   void _begin(String tag) {
     // TODO(johnniwinther): Support tags in binary serialization?
   }
+  @override
   void _end(String tag) {
     // TODO(johnniwinther): Support tags in binary serialization?
   }
@@ -57,6 +59,7 @@
     _writeIntInternal(value.index);
   }
 
+  @override
   void close() {
     _bufferedSink.flushAndDestroy();
     _bufferedSink = null;
@@ -64,5 +67,6 @@
   }
 
   /// Returns the number of bytes written to this data sink.
+  @override
   int get length => _length;
 }
diff --git a/pkg/compiler/lib/src/serialization/binary_source.dart b/pkg/compiler/lib/src/serialization/binary_source.dart
index c68e4c9..11132b9 100644
--- a/pkg/compiler/lib/src/serialization/binary_source.dart
+++ b/pkg/compiler/lib/src/serialization/binary_source.dart
@@ -14,7 +14,9 @@
   BinarySourceImpl(this._bytes, {bool useDataKinds: false})
       : super(useDataKinds: useDataKinds);
 
+  @override
   void _begin(String tag) {}
+  @override
   void _end(String tag) {}
 
   int _readByte() => _bytes[_byteOffset++];
diff --git a/pkg/compiler/lib/src/serialization/helpers.dart b/pkg/compiler/lib/src/serialization/helpers.dart
index d6db5f2..40cc83d 100644
--- a/pkg/compiler/lib/src/serialization/helpers.dart
+++ b/pkg/compiler/lib/src/serialization/helpers.dart
@@ -48,7 +48,8 @@
   node,
   functionNode,
   typeParameter,
-  functionDeclarationVariable
+  functionDeclarationVariable,
+  constant,
 }
 
 /// Enum used for identifying [ir.FunctionNode] context in serialization.
@@ -71,14 +72,17 @@
 
   Tag(this.value);
 
+  @override
   int get hashCode => value.hashCode * 13;
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! Tag) return false;
     return value == other.value;
   }
 
+  @override
   String toString() => 'Tag($value)';
 }
 
@@ -102,6 +106,7 @@
 
   DartTypeWriter(this._sink);
 
+  @override
   void visit(covariant DartType type,
           List<FunctionTypeVariable> functionTypeVariables) =>
       type.accept(this, functionTypeVariables);
@@ -114,11 +119,13 @@
     }
   }
 
+  @override
   void visitVoidType(covariant VoidType type,
       List<FunctionTypeVariable> functionTypeVariables) {
     _sink.writeEnum(DartTypeKind.voidType);
   }
 
+  @override
   void visitTypeVariableType(covariant TypeVariableType type,
       List<FunctionTypeVariable> functionTypeVariables) {
     _sink.writeEnum(DartTypeKind.typeVariable);
@@ -126,6 +133,7 @@
     _sink.writeInt(typeVariable.typeVariableIndex);
   }
 
+  @override
   void visitFunctionTypeVariable(covariant FunctionTypeVariable type,
       List<FunctionTypeVariable> functionTypeVariables) {
     int index = functionTypeVariables.indexOf(type);
@@ -138,6 +146,7 @@
     }
   }
 
+  @override
   void visitFunctionType(covariant FunctionType type,
       List<FunctionTypeVariable> functionTypeVariables) {
     _sink.writeEnum(DartTypeKind.functionType);
@@ -157,6 +166,7 @@
     }
   }
 
+  @override
   void visitInterfaceType(covariant InterfaceType type,
       List<FunctionTypeVariable> functionTypeVariables) {
     _sink.writeEnum(DartTypeKind.interfaceType);
@@ -164,6 +174,7 @@
     visitTypes(type.typeArguments, functionTypeVariables);
   }
 
+  @override
   void visitTypedefType(covariant TypedefType type,
       List<FunctionTypeVariable> functionTypeVariables) {
     _sink.writeEnum(DartTypeKind.typedef);
@@ -172,11 +183,13 @@
     _sink._writeDartType(type.unaliased, functionTypeVariables);
   }
 
+  @override
   void visitDynamicType(covariant DynamicType type,
       List<FunctionTypeVariable> functionTypeVariables) {
     _sink.writeEnum(DartTypeKind.dynamicType);
   }
 
+  @override
   void visitFutureOrType(covariant FutureOrType type,
       List<FunctionTypeVariable> functionTypeVariables) {
     _sink.writeEnum(DartTypeKind.futureOr);
@@ -217,27 +230,32 @@
     }
   }
 
+  @override
   void defaultDartType(
       ir.DartType node, List<ir.TypeParameter> functionTypeVariables) {
     throw new UnsupportedError(
         "Unexpected ir.DartType $node (${node.runtimeType}).");
   }
 
+  @override
   void visitInvalidType(
       ir.InvalidType node, List<ir.TypeParameter> functionTypeVariables) {
     _sink.writeEnum(DartTypeNodeKind.invalidType);
   }
 
+  @override
   void visitDynamicType(
       ir.DynamicType node, List<ir.TypeParameter> functionTypeVariables) {
     _sink.writeEnum(DartTypeNodeKind.dynamicType);
   }
 
+  @override
   void visitVoidType(
       ir.VoidType node, List<ir.TypeParameter> functionTypeVariables) {
     _sink.writeEnum(DartTypeNodeKind.voidType);
   }
 
+  @override
   void visitBottomType(
       ir.BottomType node, List<ir.TypeParameter> functionTypeVariables) {
     if (node == const DoesNotCompleteType()) {
@@ -247,6 +265,7 @@
     }
   }
 
+  @override
   void visitInterfaceType(
       ir.InterfaceType node, List<ir.TypeParameter> functionTypeVariables) {
     if (node is ThisInterfaceType) {
@@ -260,6 +279,7 @@
     visitTypes(node.typeArguments, functionTypeVariables);
   }
 
+  @override
   void visitFunctionType(
       ir.FunctionType node, List<ir.TypeParameter> functionTypeVariables) {
     _sink.writeEnum(DartTypeNodeKind.functionType);
@@ -286,6 +306,7 @@
     _sink.end(functionTypeNodeTag);
   }
 
+  @override
   void visitTypeParameterType(
       ir.TypeParameterType node, List<ir.TypeParameter> functionTypeVariables) {
     int index = functionTypeVariables.indexOf(node.parameter);
@@ -302,6 +323,7 @@
     }
   }
 
+  @override
   void visitTypedefType(
       ir.TypedefType node, List<ir.TypeParameter> functionTypeVariables) {
     _sink.writeEnum(DartTypeNodeKind.typedef);
diff --git a/pkg/compiler/lib/src/serialization/member_data.dart b/pkg/compiler/lib/src/serialization/member_data.dart
index b4aeee12..f088210 100644
--- a/pkg/compiler/lib/src/serialization/member_data.dart
+++ b/pkg/compiler/lib/src/serialization/member_data.dart
@@ -108,6 +108,7 @@
     return _members[name];
   }
 
+  @override
   String toString() => '_LibraryData($node(${identityHashCode(node)}))';
 }
 
@@ -137,6 +138,7 @@
     return _members[name];
   }
 
+  @override
   String toString() => '_ClassData($node(${identityHashCode(node)}))';
 }
 
@@ -180,5 +182,6 @@
     return index;
   }
 
+  @override
   String toString() => '_MemberData($node(${identityHashCode(node)}))';
 }
diff --git a/pkg/compiler/lib/src/serialization/mixins.dart b/pkg/compiler/lib/src/serialization/mixins.dart
index be891a1..695d112 100644
--- a/pkg/compiler/lib/src/serialization/mixins.dart
+++ b/pkg/compiler/lib/src/serialization/mixins.dart
@@ -156,6 +156,20 @@
   }
 
   @override
+  Map<K, V> readMemberNodeMap<K extends ir.Member, V>(V f(),
+      {bool emptyAsNull: false}) {
+    int count = readInt();
+    if (count == 0 && emptyAsNull) return null;
+    Map<K, V> map = {};
+    for (int i = 0; i < count; i++) {
+      ir.Member node = readMemberNode();
+      V value = f();
+      map[node] = value;
+    }
+    return map;
+  }
+
+  @override
   Map<K, V> readTreeNodeMap<K extends ir.TreeNode, V>(V f(),
       {bool emptyAsNull: false}) {
     int count = readInt();
@@ -256,6 +270,15 @@
   }
 
   @override
+  ConstantValue readConstantOrNull() {
+    bool hasClass = readBool();
+    if (hasClass) {
+      return readConstant();
+    }
+    return null;
+  }
+
+  @override
   List<E> readConstants<E extends ConstantValue>({bool emptyAsNull: false}) {
     int count = readInt();
     if (count == 0 && emptyAsNull) return null;
@@ -533,6 +556,21 @@
   }
 
   @override
+  void writeMemberNodeMap<V>(Map<ir.Member, V> map, void f(V value),
+      {bool allowNull: false}) {
+    if (map == null) {
+      assert(allowNull);
+      writeInt(0);
+    } else {
+      writeInt(map.length);
+      map.forEach((ir.Member key, V value) {
+        writeMemberNode(key);
+        f(value);
+      });
+    }
+  }
+
+  @override
   void writeTreeNodeMap<V>(Map<ir.TreeNode, V> map, void f(V value),
       {bool allowNull: false}) {
     if (map == null) {
@@ -611,6 +649,14 @@
   }
 
   @override
+  void writeConstantOrNull(ConstantValue value) {
+    writeBool(value != null);
+    if (value != null) {
+      writeConstant(value);
+    }
+  }
+
+  @override
   void writeConstants(Iterable<ConstantValue> values, {bool allowNull: false}) {
     if (values == null) {
       assert(allowNull);
diff --git a/pkg/compiler/lib/src/serialization/node_indexer.dart b/pkg/compiler/lib/src/serialization/node_indexer.dart
index 7087849..8e92ebf 100644
--- a/pkg/compiler/lib/src/serialization/node_indexer.dart
+++ b/pkg/compiler/lib/src/serialization/node_indexer.dart
@@ -93,6 +93,12 @@
   }
 
   @override
+  void visitSetLiteral(ir.SetLiteral node) {
+    registerNode(node);
+    super.visitSetLiteral(node);
+  }
+
+  @override
   void visitMapLiteral(ir.MapLiteral node) {
     registerNode(node);
     super.visitMapLiteral(node);
@@ -187,4 +193,108 @@
     registerNode(node);
     super.visitSuperPropertyGet(node);
   }
+
+  @override
+  void visitConstantExpression(ir.ConstantExpression node) {
+    registerNode(node);
+    super.visitConstantExpression(node);
+  }
+}
+
+/// Visitor that ascribes an index to all [ir.Constant]s that we potentially
+/// need to reference for serialization and deserialization.
+///
+/// Currently this is only list, map, and set constants, which are used as
+/// allocation identities in the global inference.
+class _ConstantNodeIndexerVisitor implements ir.ConstantVisitor<void> {
+  int _currentIndex = 0;
+  final Map<int, ir.Constant> _indexToNodeMap = {};
+  final Map<ir.Constant, int> _nodeToIndexMap = {};
+
+  void registerConstant(ir.Constant node) {
+    _indexToNodeMap[_currentIndex] = node;
+    _nodeToIndexMap[node] = _currentIndex;
+    _currentIndex++;
+  }
+
+  int getIndex(ir.Constant node) {
+    assert(_nodeToIndexMap.containsKey(node), "Constant without index: $node");
+    return _nodeToIndexMap[node];
+  }
+
+  ir.Constant getConstant(int index) {
+    assert(
+        _indexToNodeMap.containsKey(index), "Index without constant: $index");
+    return _indexToNodeMap[index];
+  }
+
+  @override
+  void visitUnevaluatedConstant(ir.UnevaluatedConstant node) {}
+
+  @override
+  void visitTypeLiteralConstant(ir.TypeLiteralConstant node) {}
+
+  @override
+  void visitTearOffConstant(ir.TearOffConstant node) {}
+
+  @override
+  void visitPartialInstantiationConstant(ir.PartialInstantiationConstant node) {
+    node.tearOffConstant.accept(this);
+  }
+
+  @override
+  void visitInstanceConstant(ir.InstanceConstant node) {
+    node.fieldValues.forEach((_, ir.Constant value) {
+      value.accept(this);
+    });
+  }
+
+  @override
+  void visitSetConstant(ir.SetConstant node) {
+    registerConstant(node);
+    for (ir.Constant element in node.entries) {
+      element.accept(this);
+    }
+  }
+
+  @override
+  void visitListConstant(ir.ListConstant node) {
+    registerConstant(node);
+    for (ir.Constant element in node.entries) {
+      element.accept(this);
+    }
+  }
+
+  @override
+  void visitMapConstant(ir.MapConstant node) {
+    registerConstant(node);
+    for (ir.ConstantMapEntry entry in node.entries) {
+      entry.key.accept(this);
+      entry.value.accept(this);
+    }
+  }
+
+  @override
+  void visitSymbolConstant(ir.SymbolConstant node) {}
+
+  @override
+  void visitStringConstant(ir.StringConstant node) {}
+
+  @override
+  void visitDoubleConstant(ir.DoubleConstant node) {}
+
+  @override
+  void visitIntConstant(ir.IntConstant node) {}
+
+  @override
+  void visitBoolConstant(ir.BoolConstant node) {}
+
+  @override
+  void visitNullConstant(ir.NullConstant node) {}
+
+  @override
+  void defaultConstant(ir.Constant node) {
+    throw new UnimplementedError(
+        "Unexpected constant: $node (${node.runtimeType})");
+  }
 }
diff --git a/pkg/compiler/lib/src/serialization/object_sink.dart b/pkg/compiler/lib/src/serialization/object_sink.dart
index 3246b9f..31376e3 100644
--- a/pkg/compiler/lib/src/serialization/object_sink.dart
+++ b/pkg/compiler/lib/src/serialization/object_sink.dart
@@ -14,10 +14,12 @@
   ObjectSink(this._data, {bool useDataKinds})
       : super(useDataKinds: useDataKinds);
 
+  @override
   void _begin(String tag) {
     _data.add(new Tag('begin:$tag'));
   }
 
+  @override
   void _end(String tag) {
     _data.add(new Tag('end:$tag'));
   }
diff --git a/pkg/compiler/lib/src/serialization/object_source.dart b/pkg/compiler/lib/src/serialization/object_source.dart
index 4ce571e..54207a2 100644
--- a/pkg/compiler/lib/src/serialization/object_source.dart
+++ b/pkg/compiler/lib/src/serialization/object_source.dart
@@ -21,6 +21,7 @@
     return value;
   }
 
+  @override
   void _begin(String tag) {
     Tag expectedTag = new Tag('begin:$tag');
     Tag actualTag = _read();
@@ -30,6 +31,7 @@
         "Expected $expectedTag, found $actualTag.$_errorContext");
   }
 
+  @override
   void _end(String tag) {
     Tag expectedTag = new Tag('end:$tag');
     Tag actualTag = _read();
diff --git a/pkg/compiler/lib/src/serialization/serialization.dart b/pkg/compiler/lib/src/serialization/serialization.dart
index c4dab5a..8623f87 100644
--- a/pkg/compiler/lib/src/serialization/serialization.dart
+++ b/pkg/compiler/lib/src/serialization/serialization.dart
@@ -9,11 +9,13 @@
 import 'package:kernel/binary/ast_from_binary.dart' as ir;
 import 'package:kernel/binary/ast_to_binary.dart' as ir;
 import '../closure.dart';
+import '../constants/constant_system.dart' as constant_system;
 import '../constants/values.dart';
 import '../diagnostics/source_span.dart';
 import '../elements/entities.dart';
 import '../elements/indexed.dart';
 import '../elements/types.dart';
+import '../ir/constants.dart';
 import '../ir/static_type_base.dart';
 import '../js_model/closure.dart';
 import '../js_model/locals.dart';
@@ -137,6 +139,15 @@
   /// [DataSource.readMemberNodes].
   void writeMemberNodes(Iterable<ir.Member> values, {bool allowNull: false});
 
+  /// Writes the [map] from references to kernel member nodes to [V] values to
+  /// this data sink, calling [f] to write each value to the data sink. If
+  /// [allowNull] is `true`, [map] is allowed to be `null`.
+  ///
+  /// This is a convenience method to be used together with
+  /// [DataSource.readMemberNodeMap].
+  void writeMemberNodeMap<V>(Map<ir.Member, V> map, void f(V value),
+      {bool allowNull: false});
+
   /// Writes a kernel name node to this data sink.
   void writeName(ir.Name value);
 
@@ -315,6 +326,9 @@
   /// Writes the constant [value] to this data sink.
   void writeConstant(ConstantValue value);
 
+  /// Writes the potentially `null` constant [value] to this data sink.
+  void writeConstantOrNull(ConstantValue value);
+
   /// Writes constant [values] to this data sink. If [allowNull] is `true`,
   /// [values] is allowed to be `null`.
   ///
@@ -475,6 +489,15 @@
   List<ir.Member> readMemberNodes<E extends ir.Member>(
       {bool emptyAsNull: false});
 
+  /// Reads a map from kernel member nodes to [V] values from this data source,
+  /// calling [f] to read each value from the data source. If [emptyAsNull] is
+  /// `true`, `null` is returned instead of an empty map.
+  ///
+  /// This is a convenience method to be used together with
+  /// [DataSink.writeMemberNodeMap].
+  Map<K, V> readMemberNodeMap<K extends ir.Member, V>(V f(),
+      {bool emptyAsNull: false});
+
   /// Reads a kernel name node from this data source.
   ir.Name readName();
 
@@ -626,6 +649,9 @@
   /// Reads a constant value from this data source.
   ConstantValue readConstant();
 
+  /// Reads a potentially `null` constant value from this data source.
+  ConstantValue readConstantOrNull();
+
   /// Reads a double value from this data source.
   double readDoubleValue();
 
diff --git a/pkg/compiler/lib/src/serialization/task.dart b/pkg/compiler/lib/src/serialization/task.dart
index 3aac9f3..56ab4bd 100644
--- a/pkg/compiler/lib/src/serialization/task.dart
+++ b/pkg/compiler/lib/src/serialization/task.dart
@@ -49,6 +49,7 @@
 
   SerializationTask(this.compiler, Measurer measurer) : super(measurer);
 
+  @override
   String get name => 'Serialization';
 
   void serialize(GlobalTypeInferenceResults results) {
diff --git a/pkg/compiler/lib/src/source_file_provider.dart b/pkg/compiler/lib/src/source_file_provider.dart
index f6551af..3a6f81a 100644
--- a/pkg/compiler/lib/src/source_file_provider.dart
+++ b/pkg/compiler/lib/src/source_file_provider.dart
@@ -176,6 +176,7 @@
 class CompilerSourceFileProvider extends SourceFileProvider {
   // TODO(johnniwinther): Remove this when no longer needed for the old compiler
   // API.
+  @override
   Future<List<int>> call(Uri resourceUri) =>
       readFromUri(resourceUri).then((input) => input.data);
 
@@ -372,6 +373,7 @@
     return uri;
   }
 
+  @override
   OutputSink createOutputSink(String name, String extension, OutputType type) {
     Uri uri = createUri(name, extension, type);
     bool isPrimaryOutput = uri == out;
@@ -474,8 +476,10 @@
 
   _OutputSinkWrapper(this.onAdd, this.onClose);
 
+  @override
   void add(String data) => onAdd(data);
 
+  @override
   void close() => onClose();
 }
 
@@ -485,9 +489,11 @@
 
   _BinaryOutputSinkWrapper(this.onWrite, this.onClose);
 
+  @override
   void write(List<int> data, [int start = 0, int end]) =>
       onWrite(data, start, end);
 
+  @override
   void close() => onClose();
 }
 
diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart
index e8d55ba..7070b01 100644
--- a/pkg/compiler/lib/src/ssa/builder_kernel.dart
+++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart
@@ -10,6 +10,7 @@
 import '../common/names.dart';
 import '../common_elements.dart';
 import '../compiler.dart';
+import '../constants/constant_system.dart' as constant_system;
 import '../constants/values.dart'
     show
         ConstantValue,
@@ -27,9 +28,9 @@
 import '../ir/static_type_provider.dart';
 import '../ir/util.dart';
 import '../js/js.dart' as js;
-import '../js_backend/allocator_analysis.dart' show JAllocatorAnalysis;
+import '../js_backend/field_analysis.dart'
+    show FieldAnalysisData, JFieldAnalysis;
 import '../js_backend/backend.dart' show FunctionInlineCache, JavaScriptBackend;
-import '../js_backend/runtime_types.dart' show RuntimeTypesSubstitutions;
 import '../js_emitter/js_emitter.dart' show NativeEmitter;
 import '../js_model/locals.dart' show JumpVisitor;
 import '../js_model/elements.dart' show JGeneratorBody;
@@ -82,14 +83,16 @@
 
 class KernelSsaGraphBuilder extends ir.Visitor
     with GraphBuilder, SsaBuilderFieldMixin {
+  @override
   final MemberEntity targetElement;
   final MemberEntity initialTargetElement;
 
+  @override
   final JClosedWorld closedWorld;
   final CodegenWorldBuilder _worldBuilder;
+  @override
   final CodegenRegistry registry;
   final ClosureData closureDataLookup;
-  JAllocatorAnalysis _allocatorAnalysis;
 
   /// A stack of [InterfaceType]s that have been seen during inlining of
   /// factory constructors.  These types are preserved in [HInvokeStatic]s and
@@ -105,6 +108,7 @@
 
   HInstruction rethrowableException;
 
+  @override
   final Compiler compiler;
 
   @override
@@ -112,8 +116,10 @@
 
   final SourceInformationStrategy _sourceInformationStrategy;
   final JsToElementMap _elementMap;
+  @override
   final GlobalTypeInferenceResults globalInferenceResults;
   LoopHandler loopHandler;
+  @override
   TypeBuilder typeBuilder;
 
   final NativeEmitter nativeEmitter;
@@ -145,7 +151,6 @@
       this.inlineCache)
       : this.targetElement = _effectiveTargetElementFor(initialTargetElement),
         _infoReporter = compiler.dumpInfoTask,
-        _allocatorAnalysis = closedWorld.allocatorAnalysis,
         this.closureDataLookup = closedWorld.closureDataLookup {
     _enterFrame(targetElement, null);
     this.loopHandler = new KernelLoopHandler(this);
@@ -164,6 +169,8 @@
 
   JCommonElements get _commonElements => _elementMap.commonElements;
 
+  JFieldAnalysis get _fieldAnalysis => closedWorld.fieldAnalysis;
+
   KernelToTypeInferenceMap get _typeInferenceMap =>
       _currentFrame.typeInferenceMap;
 
@@ -232,7 +239,20 @@
               // the constant value.
               return null;
             } else if (targetElement.isStatic || targetElement.isTopLevel) {
-              backend.constants.registerLazyStatic(targetElement);
+              if (_fieldAnalysis.getFieldData(targetElement).isLazy) {
+                // TODO(johnniwinther): Lazy fields should be collected like
+                // eager and non-final fields.
+                backend.constants.registerLazyStatic(targetElement);
+              }
+            } else {
+              assert(targetElement.isInstanceMember);
+              if (_fieldAnalysis
+                      .getFieldData(targetElement)
+                      .isEffectivelyFinal ||
+                  !options.parameterCheckPolicy.isEmitted) {
+                // No need for a checked setter.
+                return null;
+              }
             }
             buildField(target);
           } else if (target is ir.FunctionExpression) {
@@ -257,8 +277,8 @@
           buildConstructorBody(constructor);
           break;
         case MemberKind.closureField:
-          failedAt(targetElement, "Unexpected closure field: $targetElement");
-          break;
+          // Closure fields have no setter and therefore never require any code.
+          return null;
         case MemberKind.signature:
           ir.Node target = definition.node;
           ir.FunctionNode originalClosureNode;
@@ -340,12 +360,6 @@
     return function;
   }
 
-  @override
-  ConstantValue getFieldInitialConstantValue(FieldEntity field) {
-    assert(field == targetElement);
-    return _elementMap.getFieldConstantValue(field);
-  }
-
   void buildField(ir.Field node) {
     _inLazyInitializerExpression = node.isStatic;
     FieldEntity field = _elementMap.getMember(node);
@@ -363,7 +377,7 @@
       graph.entry.addBefore(graph.entry.last, parameter);
       HInstruction value = typeBuilder.potentiallyCheckOrTrustTypeOfParameter(
           parameter, _getDartTypeIfValid(node.type));
-      if (!closedWorld.elidedFields.contains(field)) {
+      if (!_fieldAnalysis.getFieldData(field).isElided) {
         add(new HFieldSet(abstractValueDomain, field, thisInstruction, value));
       }
     } else {
@@ -396,9 +410,7 @@
   HInstruction popBoolified() {
     HInstruction value = pop();
     if (typeBuilder.checkOrTrustTypes) {
-      InterfaceType type = commonElements.boolType;
-      return typeBuilder.potentiallyCheckOrTrustTypeOfAssignment(value, type,
-          kind: HTypeConversion.BOOLEAN_CONVERSION_CHECK);
+      return typeBuilder.potentiallyCheckOrTrustTypeOfCondition(value);
     }
     HInstruction result = new HBoolify(value, abstractValueDomain.boolType);
     add(result);
@@ -528,7 +540,7 @@
       HInstruction value = constructorData.fieldValues[member];
       if (value == null) {
         assert(
-            _allocatorAnalysis.isInitializedInAllocator(member) ||
+            _fieldAnalysis.getFieldData(member).isInitializedInAllocator ||
                 isCustomElement ||
                 reporter.hasReportedError,
             'No initializer value for field ${member}');
@@ -554,7 +566,8 @@
       // Null guard ensures an error if we are being called from an explicit
       // 'new' of the constructor instead of via an upgrade. It is optimized out
       // if there are field initializers.
-      add(new HFieldGet(null, newObject, abstractValueDomain.dynamicType,
+      add(new HFieldGet(
+          null, newObject, abstractValueDomain.dynamicType, sourceInformation,
           isAssignable: false));
       for (int i = 0; i < fields.length; i++) {
         add(new HFieldSet(abstractValueDomain, fields[i], newObject,
@@ -756,19 +769,16 @@
         ignoreAllocatorAnalysis = true;
       }
 
-      if (node.initializer == null) {
-        if (ignoreAllocatorAnalysis ||
-            !_allocatorAnalysis.isInitializedInAllocator(field)) {
+      if (ignoreAllocatorAnalysis ||
+          !_fieldAnalysis.getFieldData(field).isInitializedInAllocator) {
+        if (node.initializer == null) {
           constructorData.fieldValues[field] =
               graph.addConstantNull(closedWorld);
-        }
-      } else {
-        // Compile the initializer in the context of the field so we know that
-        // class type parameters are accessed as values.
-        // TODO(sra): It would be sufficient to know the context was a field
-        // initializer.
-        if (ignoreAllocatorAnalysis ||
-            !_allocatorAnalysis.isInitializedInAllocator(field)) {
+        } else {
+          // Compile the initializer in the context of the field so we know that
+          // class type parameters are accessed as values.
+          // TODO(sra): It would be sufficient to know the context was a field
+          // initializer.
           inlinedFrom(field,
               _sourceInformationBuilder.buildAssignment(node.initializer), () {
             node.initializer.accept(this);
@@ -802,10 +812,11 @@
     var foundSuperOrRedirectCall = false;
     for (var initializer in constructor.initializers) {
       if (initializer is ir.FieldInitializer) {
-        // TODO(sra): Skip fields initialized in allocator.
-        initializer.value.accept(this);
-        constructorData.fieldValues[_elementMap.getField(initializer.field)] =
-            pop();
+        FieldEntity field = _elementMap.getField(initializer.field);
+        if (!_fieldAnalysis.getFieldData(field).isInitializedInAllocator) {
+          initializer.value.accept(this);
+          constructorData.fieldValues[field] = pop();
+        }
       } else if (initializer is ir.SuperInitializer) {
         assert(!foundSuperOrRedirectCall);
         foundSuperOrRedirectCall = true;
@@ -1423,28 +1434,8 @@
   }
 
   @override
-  void defaultExpression(ir.Expression expression) {
-    // TODO(het): This is only to get tests working.
-    _trap('Unhandled ir.${expression.runtimeType}  $expression');
-  }
-
-  @override
-  void defaultStatement(ir.Statement statement) {
-    _trap('Unhandled ir.${statement.runtimeType}  $statement');
-    pop();
-  }
-
-  void _trap(String message) {
-    HInstruction nullValue = graph.addConstantNull(closedWorld);
-    HInstruction errorMessage = graph.addConstantString(message, closedWorld);
-    HInstruction trap = new HForeignCode(
-        js.js.parseForeignJS("#.#"),
-        abstractValueDomain.dynamicType,
-        <HInstruction>[nullValue, errorMessage]);
-    trap.sideEffects
-      ..setAllSideEffects()
-      ..setDependsOnSomething();
-    push(trap);
+  void defaultNode(ir.Node node) {
+    throw new UnsupportedError("Unhandled node $node (${node.runtimeType})");
   }
 
   /// Returns the current source element. This is used by the type builder.
@@ -1531,6 +1522,24 @@
     }
   }
 
+  @override
+  void visitConstantExpression(ir.ConstantExpression node) {
+    ConstantValue value = _elementMap.getConstantValue(node);
+    SourceInformation sourceInformation =
+        _sourceInformationBuilder.buildGet(node);
+    if (!closedWorld.outputUnitData
+        .hasOnlyNonDeferredImportPathsToConstant(targetElement, value)) {
+      stack.add(graph.addDeferredConstant(
+          value,
+          closedWorld.outputUnitData.outputUnitForConstant(value),
+          sourceInformation,
+          closedWorld));
+    } else {
+      stack.add(graph.addConstant(value, closedWorld,
+          sourceInformation: sourceInformation));
+    }
+  }
+
   /// Returns true if the [type] is a valid return type for an asynchronous
   /// function.
   ///
@@ -1579,6 +1588,14 @@
       }
     }
     handleInTryStatement();
+    if (_inliningStack.isEmpty && targetElement.isSetter) {
+      if (node.parent is ir.FunctionNode) {
+        // An arrow function definition of a setter has a ReturnStatemnt as a
+        // body, e.g. "set foo(x) => this._x = x;". There is no way to access
+        // the returned value, so don't emit a return.
+        return;
+      }
+    }
     _emitReturn(value, sourceInformation);
   }
 
@@ -1941,6 +1958,7 @@
       ..cleanUp();
   }
 
+  @override
   HInstruction callSetRuntimeTypeInfo(HInstruction typeInfo,
       HInstruction newObject, SourceInformation sourceInformation) {
     // Set the runtime type information on the object.
@@ -2545,7 +2563,7 @@
       List<ConstantValue> getConstants(
           ir.SwitchStatement parentSwitch, ir.SwitchCase switchCase) {
         return <ConstantValue>[
-          constantSystem.createIntFromInt(caseIndex[switchCase])
+          constant_system.createIntFromInt(caseIndex[switchCase])
         ];
       }
 
@@ -2859,6 +2877,85 @@
   }
 
   @override
+  void visitSetLiteral(ir.SetLiteral node) {
+    if (node.isConst) {
+      stack.add(
+          graph.addConstant(_elementMap.getConstantValue(node), closedWorld));
+      return;
+    }
+
+    // The set literal constructors take the elements as a List.
+    List<HInstruction> elements = <HInstruction>[];
+    for (ir.Expression element in node.expressions) {
+      element.accept(this);
+      elements.add(pop());
+    }
+
+    // The constructor is a procedure because it's a factory.
+    FunctionEntity constructor;
+    List<HInstruction> inputs = <HInstruction>[];
+    if (elements.isEmpty) {
+      constructor = _commonElements.setLiteralConstructorEmpty;
+    } else {
+      constructor = _commonElements.setLiteralConstructor;
+      HLiteralList argList = buildLiteralList(elements);
+      add(argList);
+      inputs.add(argList);
+    }
+
+    assert(
+        constructor is ConstructorEntity && constructor.isFactoryConstructor);
+
+    InterfaceType type = localsHandler.substInContext(
+        _commonElements.setType(_elementMap.getDartType(node.typeArgument)));
+    ClassEntity cls = constructor.enclosingClass;
+
+    if (rtiNeed.classNeedsTypeArguments(cls)) {
+      List<HInstruction> typeInputs = <HInstruction>[];
+      type.typeArguments.forEach((DartType argument) {
+        typeInputs
+            .add(typeBuilder.analyzeTypeArgument(argument, sourceElement));
+      });
+
+      // We lift this common call pattern into a helper function to save space
+      // in the output.
+      if (typeInputs.every((HInstruction input) =>
+          input.isNull(abstractValueDomain).isDefinitelyTrue)) {
+        if (elements.isEmpty) {
+          constructor = _commonElements.setLiteralUntypedEmptyMaker;
+        } else {
+          constructor = _commonElements.setLiteralUntypedMaker;
+        }
+      } else {
+        inputs.addAll(typeInputs);
+      }
+    }
+
+    // If runtime type information is needed and the set literal has no type
+    // parameter, 'constructor' is a static function that forwards the call to
+    // the factory constructor without a type parameter.
+    assert(constructor.isFunction ||
+        (constructor is ConstructorEntity && constructor.isFactoryConstructor));
+
+    // The instruction type will always be a subtype of the setLiteralClass, but
+    // type inference might discover a more specific type or find nothing (in
+    // dart2js unit tests).
+
+    AbstractValue setType = abstractValueDomain
+        .createNonNullSubtype(_commonElements.setLiteralClass);
+    AbstractValue returnTypeMask =
+        _typeInferenceMap.getReturnTypeOf(constructor);
+    AbstractValue instructionType =
+        abstractValueDomain.intersection(setType, returnTypeMask);
+
+    addImplicitInstantiation(type);
+    _pushStaticInvocation(
+        constructor, inputs, instructionType, const <DartType>[],
+        sourceInformation: _sourceInformationBuilder.buildNew(node));
+    removeImplicitInstantiation(type);
+  }
+
+  @override
   void visitMapLiteral(ir.MapLiteral node) {
     if (node.isConst) {
       stack.add(
@@ -2995,32 +3092,35 @@
           sourceInformation: sourceInformation);
     } else if (staticTarget is ir.Field) {
       FieldEntity field = _elementMap.getField(staticTarget);
-      ConstantValue value = _elementMap.getFieldConstantValue(field);
-      if (value != null) {
-        if (!field.isAssignable) {
-          var unit = closedWorld.outputUnitData.outputUnitForMember(field);
-          // TODO(sigmund): this is not equivalent to what the old FE does: if
-          // there is no prefix the old FE wouldn't treat this in any special
-          // way. Also, if the prefix points to a constant in the main output
-          // unit, the old FE would still generate a deferred wrapper here.
-          if (!closedWorld.outputUnitData
-              .hasOnlyNonDeferredImportPaths(targetElement, field)) {
-            stack.add(graph.addDeferredConstant(
-                value, unit, sourceInformation, compiler, closedWorld));
-          } else {
-            stack.add(graph.addConstant(value, closedWorld,
-                sourceInformation: sourceInformation));
-          }
+      FieldAnalysisData fieldData = _fieldAnalysis.getFieldData(field);
+      if (fieldData.isEager) {
+        push(new HStatic(field, _typeInferenceMap.getInferredTypeOf(field),
+            sourceInformation));
+      } else if (fieldData.isEffectivelyConstant) {
+        var unit = closedWorld.outputUnitData.outputUnitForMember(field);
+        // TODO(sigmund): this is not equivalent to what the old FE does: if
+        // there is no prefix the old FE wouldn't treat this in any special
+        // way. Also, if the prefix points to a constant in the main output
+        // unit, the old FE would still generate a deferred wrapper here.
+        if (!closedWorld.outputUnitData
+            .hasOnlyNonDeferredImportPaths(targetElement, field)) {
+          stack.add(graph.addDeferredConstant(
+              fieldData.initialValue, unit, sourceInformation, closedWorld));
         } else {
-          push(new HStatic(field, _typeInferenceMap.getInferredTypeOf(field),
-              sourceInformation));
+          stack.add(graph.addConstant(fieldData.initialValue, closedWorld,
+              sourceInformation: sourceInformation));
         }
       } else {
+        assert(
+            fieldData.isLazy, "Unexpected field data for $field: $fieldData");
         push(new HLazyStatic(field, _typeInferenceMap.getInferredTypeOf(field),
             sourceInformation));
       }
     } else {
-      MemberEntity member = _elementMap.getMember(staticTarget);
+      // TODO(johnniwinther): This is a constant tear off, so we should have
+      // created a constant value instead. Remove this case when we use CFE
+      // constants.
+      FunctionEntity member = _elementMap.getMember(staticTarget);
       push(new HStatic(member, _typeInferenceMap.getInferredTypeOf(member),
           sourceInformation));
     }
@@ -3041,7 +3141,7 @@
       pop();
     } else {
       MemberEntity target = _elementMap.getMember(staticTarget);
-      if (!closedWorld.elidedFields.contains(target)) {
+      if (!_fieldAnalysis.getFieldData(target).isElided) {
         add(new HStaticStore(
             abstractValueDomain,
             target,
@@ -3208,6 +3308,12 @@
     node.body.accept(this);
   }
 
+  @override
+  void visitBlockExpression(ir.BlockExpression node) {
+    node.body.accept(this);
+    node.value.accept(this);
+  }
+
   /// Extracts the list of instructions for the positional subset of arguments.
   List<HInstruction> _visitPositionalArguments(ir.Arguments arguments) {
     List<HInstruction> result = <HInstruction>[];
@@ -3724,7 +3830,8 @@
 
     ir.ListLiteral positionalArgumentsLiteral =
         invocation.arguments.positional[2];
-    ir.MapLiteral namedArgumentsLiteral = invocation.arguments.positional[3];
+    ir.Expression namedArgumentsLiteral = invocation.arguments.positional[3];
+    Map<String, ir.Expression> namedArguments = {};
     ir.IntLiteral kindLiteral = invocation.arguments.positional[4];
 
     Name memberName = new Name(name, _currentFrame.member.library);
@@ -3742,12 +3849,28 @@
         } else if (memberName == Names.INDEX_SET_NAME) {
           selector = new Selector.indexSet();
         } else {
+          if (namedArgumentsLiteral is ir.MapLiteral) {
+            namedArgumentsLiteral.entries.forEach((ir.MapEntry entry) {
+              ir.StringLiteral key = entry.key;
+              namedArguments[key.value] = entry.value;
+            });
+          } else if (namedArgumentsLiteral is ir.ConstantExpression &&
+              namedArgumentsLiteral.constant is ir.MapConstant) {
+            ir.MapConstant constant = namedArgumentsLiteral.constant;
+            for (ir.ConstantMapEntry entry in constant.entries) {
+              ir.StringConstant key = entry.key;
+              namedArguments[key.value] =
+                  new ir.ConstantExpression(entry.value);
+            }
+          } else {
+            reporter.internalError(
+                computeSourceSpanFromTreeNode(invocation),
+                "Unexpected named arguments value in createInvocationMirrror: "
+                "${namedArgumentsLiteral}.");
+          }
           CallStructure callStructure = new CallStructure(
               positionalArgumentsLiteral.expressions.length,
-              namedArgumentsLiteral.entries.map<String>((ir.MapEntry entry) {
-                ir.StringLiteral key = entry.key;
-                return key.value;
-              }).toList(),
+              namedArguments.keys.toList(),
               typeArguments.length);
           if (Selector.isOperatorName(name)) {
             selector =
@@ -3760,8 +3883,7 @@
     }
 
     HConstant nameConstant = graph.addConstant(
-        closedWorld.constantSystem
-            .createSymbol(closedWorld.commonElements, name),
+        constant_system.createSymbol(closedWorld.commonElements, name),
         closedWorld);
 
     List<HInstruction> arguments = <HInstruction>[];
@@ -3769,14 +3891,12 @@
       argument.accept(this);
       arguments.add(pop());
     }
-    if (namedArgumentsLiteral.entries.isNotEmpty) {
+    if (namedArguments.isNotEmpty) {
       Map<String, HInstruction> namedValues = <String, HInstruction>{};
-      for (ir.MapEntry entry in namedArgumentsLiteral.entries) {
-        ir.StringLiteral key = entry.key;
-        String name = key.value;
-        entry.value.accept(this);
+      namedArguments.forEach((String name, ir.Expression value) {
+        value.accept(this);
         namedValues[name] = pop();
-      }
+      });
       for (String name in selector.callStructure.getOrderedNamedArguments()) {
         arguments.add(namedValues[name]);
       }
@@ -3793,7 +3913,7 @@
     for (String argumentName
         in selector.callStructure.getOrderedNamedArguments()) {
       ConstantValue argumentNameConstant =
-          constantSystem.createString(argumentName);
+          constant_system.createString(argumentName);
       argumentNames.add(graph.addConstant(argumentNameConstant, closedWorld));
     }
     HInstruction argumentNamesInstruction = buildLiteralList(argumentNames);
@@ -3805,7 +3925,7 @@
     js.Name internalName = namer.invocationName(selector);
 
     ConstantValue kindConstant =
-        constantSystem.createIntFromInt(selector.invocationMirrorKind);
+        constant_system.createIntFromInt(selector.invocationMirrorKind);
 
     _pushStaticInvocation(
         _commonElements.createUnmangledInvocationMirror,
@@ -3915,27 +4035,41 @@
 
     ir.Expression closure = invocation.arguments.positional.single;
     String problem = 'requires a static method or top-level method';
+
+    bool handleTarget(ir.Procedure procedure) {
+      ir.FunctionNode function = procedure.function;
+      if (function != null &&
+          function.requiredParameterCount ==
+              function.positionalParameters.length &&
+          function.namedParameters.isEmpty) {
+        push(new HForeignCode(
+            js.js.expressionTemplateYielding(
+                emitter.staticFunctionAccess(_elementMap.getMethod(procedure))),
+            abstractValueDomain.dynamicType,
+            <HInstruction>[],
+            nativeBehavior: NativeBehavior.PURE,
+            foreignFunction: _elementMap.getMethod(procedure)));
+        return true;
+      }
+      problem = 'does not handle a closure with optional parameters';
+      return false;
+    }
+
     if (closure is ir.StaticGet) {
       ir.Member staticTarget = closure.target;
       if (staticTarget is ir.Procedure) {
         if (staticTarget.kind == ir.ProcedureKind.Method) {
-          ir.FunctionNode function = staticTarget.function;
-          if (function != null &&
-              function.requiredParameterCount ==
-                  function.positionalParameters.length &&
-              function.namedParameters.isEmpty) {
-            push(new HForeignCode(
-                js.js.expressionTemplateYielding(emitter
-                    .staticFunctionAccess(_elementMap.getMethod(staticTarget))),
-                abstractValueDomain.dynamicType,
-                <HInstruction>[],
-                nativeBehavior: NativeBehavior.PURE,
-                foreignFunction: _elementMap.getMethod(staticTarget)));
+          if (handleTarget(staticTarget)) {
             return;
           }
-          problem = 'does not handle a closure with optional parameters';
         }
       }
+    } else if (closure is ir.ConstantExpression &&
+        closure.constant is ir.TearOffConstant) {
+      ir.TearOffConstant tearOff = closure.constant;
+      if (handleTarget(tearOff.procedure)) {
+        return;
+      }
     }
 
     reporter.reportErrorMessage(
@@ -4587,7 +4721,7 @@
     FunctionEntity noSuchMethod =
         _elementMap.getSuperNoSuchMethod(containingClass);
 
-    ConstantValue nameConstant = constantSystem.createString(publicName);
+    ConstantValue nameConstant = constant_system.createString(publicName);
 
     js.Name internalName = namer.invocationName(selector);
 
@@ -4597,14 +4731,14 @@
     var argumentNames = new List<HInstruction>();
     for (String argumentName in selector.namedArguments) {
       ConstantValue argumentNameConstant =
-          constantSystem.createString(argumentName);
+          constant_system.createString(argumentName);
       argumentNames.add(graph.addConstant(argumentNameConstant, closedWorld));
     }
     var argumentNamesInstruction = buildLiteralList(argumentNames);
     add(argumentNamesInstruction);
 
     ConstantValue kindConstant =
-        constantSystem.createIntFromInt(selector.invocationMirrorKind);
+        constant_system.createIntFromInt(selector.invocationMirrorKind);
 
     _pushStaticInvocation(
         _commonElements.createInvocationMirror,
@@ -4674,15 +4808,24 @@
     if (member == null) {
       _generateSuperNoSuchMethod(node, _elementMap.getSelector(node).name,
           const <HInstruction>[], const <DartType>[], sourceInformation);
-    } else {
-      _buildInvokeSuper(
-          _elementMap.getSelector(node),
-          _elementMap.getClass(_containingClass(node)),
-          member,
-          const <HInstruction>[],
-          const <DartType>[],
-          sourceInformation);
+      return;
     }
+    if (member.isField) {
+      FieldAnalysisData fieldData = _fieldAnalysis.getFieldData(member);
+      if (fieldData.isEffectivelyConstant) {
+        ConstantValue value = fieldData.constantValue;
+        stack.add(graph.addConstant(value, closedWorld,
+            sourceInformation: sourceInformation));
+        return;
+      }
+    }
+    _buildInvokeSuper(
+        _elementMap.getSelector(node),
+        _elementMap.getClass(_containingClass(node)),
+        member,
+        const <HInstruction>[],
+        const <DartType>[],
+        sourceInformation);
   }
 
   @override
@@ -4869,12 +5012,11 @@
       return;
     }
 
-    if (RuntimeTypesSubstitutions.hasTypeArguments(typeValue)) {
-      InterfaceType interfaceType = typeValue;
+    if (typeValue is InterfaceType && !_canIgnoreTypeArguments(typeValue)) {
       HInstruction representations = typeBuilder
           .buildTypeArgumentRepresentations(typeValue, sourceElement);
       add(representations);
-      ClassEntity element = interfaceType.element;
+      ClassEntity element = typeValue.element;
       js.Name operator = namer.operatorIs(element);
       HInstruction isFieldName =
           graph.addConstantStringFromName(operator, closedWorld);
@@ -4914,6 +5056,24 @@
     return;
   }
 
+  /// Whether an is-check for [type] can be done ignoring type-arguments.
+  /// This will be true if [type] is raw, or all its type-arguments match the
+  /// type-parameter bounds.
+  bool _canIgnoreTypeArguments(InterfaceType type) {
+    InterfaceType thisType =
+        _elementMap.elementEnvironment.getThisType(type.element);
+    List<DartType> bounds = thisType.typeArguments;
+    for (int i = 0; i < bounds.length; i++) {
+      DartType arg = type.typeArguments[i];
+      if (arg.treatAsDynamic) continue;
+      TypeVariableType typeVariable = bounds[i];
+      DartType bound = _elementMap.elementEnvironment
+          .getTypeVariableBound(typeVariable.element);
+      if (bound != arg) return false;
+    }
+    return true;
+  }
+
   @override
   void visitThrow(ir.Throw node) {
     _visitThrowExpression(node.expression);
@@ -4936,6 +5096,7 @@
     }
   }
 
+  @override
   void visitYieldStatement(ir.YieldStatement node) {
     node.expression.accept(this);
     add(new HYield(abstractValueDomain, pop(), node.isYieldStar,
@@ -5244,10 +5405,9 @@
           function is! ConstructorBodyEntity &&
           (mask == null ||
               abstractValueDomain.isNull(mask).isPotentiallyTrue)) {
-        add(new HFieldGet(
-            null, providedArguments[0], abstractValueDomain.dynamicType,
-            isAssignable: false)
-          ..sourceInformation = sourceInformation);
+        add(new HFieldGet(null, providedArguments[0],
+            abstractValueDomain.dynamicType, sourceInformation,
+            isAssignable: false));
       }
       List<HInstruction> compiledArguments = _completeCallArgumentsList(
           function, selector, providedArguments, currentNode);
@@ -6492,8 +6652,10 @@
   KernelTypeBuilder(KernelSsaGraphBuilder builder, this._elementMap)
       : super(builder);
 
+  @override
   KernelSsaGraphBuilder get builder => super.builder;
 
+  @override
   ClassTypeVariableAccess computeTypeVariableAccess(MemberEntity member) {
     return _elementMap.getClassTypeVariableAccessForMember(member);
   }
@@ -6506,17 +6668,22 @@
   static bool check(ir.Initializer initializer) =>
       initializer.accept(new _ErroneousInitializerVisitor());
 
+  @override
   bool defaultInitializer(ir.Node node) => false;
 
+  @override
   bool visitInvalidInitializer(ir.InvalidInitializer node) => true;
 
+  @override
   bool visitLocalInitializer(ir.LocalInitializer node) {
     return node.variable.initializer?.accept(this) ?? false;
   }
 
   // Expressions: Does the expression always throw?
+  @override
   bool defaultExpression(ir.Expression node) => false;
 
+  @override
   bool visitThrow(ir.Throw node) => true;
 
   // TODO(sra): We might need to match other expressions that always throw but
diff --git a/pkg/compiler/lib/src/ssa/codegen.dart b/pkg/compiler/lib/src/ssa/codegen.dart
index f93696b..6c5852a 100644
--- a/pkg/compiler/lib/src/ssa/codegen.dart
+++ b/pkg/compiler/lib/src/ssa/codegen.dart
@@ -11,7 +11,7 @@
 import '../common/names.dart';
 import '../common/codegen.dart' show CodegenRegistry, CodegenWorkItem;
 import '../common/tasks.dart' show CompilerTask;
-import '../constants/constant_system.dart';
+import '../constants/constant_system.dart' as constant_system;
 import '../constants/values.dart';
 import '../common_elements.dart' show JCommonElements;
 import '../elements/entities.dart';
@@ -31,6 +31,7 @@
 import '../native/behavior.dart';
 import '../native/enqueue.dart';
 import '../options.dart';
+import '../tracer.dart';
 import '../universe/call_structure.dart' show CallStructure;
 import '../universe/selector.dart' show Selector;
 import '../universe/use.dart'
@@ -40,6 +41,11 @@
 import 'nodes.dart';
 import 'variable_allocator.dart';
 
+abstract class CodegenPhase {
+  String get name => '$runtimeType';
+  void visitGraph(HGraph graph);
+}
+
 class SsaCodeGeneratorTask extends CompilerTask {
   final JavaScriptBackend backend;
   final SourceInformationStrategy sourceInformationFactory;
@@ -48,6 +54,7 @@
       : this.backend = backend,
         super(backend.compiler.measurer);
 
+  @override
   String get name => 'SSA code generator';
 
   js.Fun buildJavaScriptFunction(bool needsAsyncRewrite, FunctionEntity element,
@@ -89,6 +96,7 @@
           .createBuilderForContext(work.element)
           .buildDeclaration(work.element);
       SsaCodeGenerator codegen = new SsaCodeGenerator(
+          this,
           backend.compiler.options,
           backend.emitter,
           backend.nativeCodegenEnqueuer,
@@ -98,6 +106,7 @@
           backend.rtiEncoder,
           backend.namer,
           backend.superMemberData,
+          backend.tracer,
           closedWorld,
           work);
       codegen.visitGraph(graph);
@@ -114,6 +123,7 @@
         work.registry.registerAsyncMarker(element.asyncMarker);
       }
       SsaCodeGenerator codegen = new SsaCodeGenerator(
+          this,
           backend.compiler.options,
           backend.emitter,
           backend.nativeCodegenEnqueuer,
@@ -123,6 +133,7 @@
           backend.rtiEncoder,
           backend.namer,
           backend.superMemberData,
+          backend.tracer,
           closedWorld,
           work);
       codegen.visitGraph(graph);
@@ -152,6 +163,7 @@
   /// This includes declarations, which are generated as expressions.
   bool isGeneratingExpression = false;
 
+  final CompilerTask _codegenTask;
   final CompilerOptions _options;
   final CodeEmitterTask _emitter;
   final NativeCodegenEnqueuer _nativeEnqueuer;
@@ -161,6 +173,7 @@
   final RuntimeTypesEncoder _rtiEncoder;
   final Namer _namer;
   final SuperMemberData _superMemberData;
+  final Tracer _tracer;
   final JClosedWorld _closedWorld;
   final CodegenWorkItem _work;
 
@@ -207,6 +220,7 @@
   Queue<HBasicBlock> blockQueue;
 
   SsaCodeGenerator(
+      this._codegenTask,
       this._options,
       this._emitter,
       this._nativeEnqueuer,
@@ -216,6 +230,7 @@
       this._rtiEncoder,
       this._namer,
       this._superMemberData,
+      this._tracer,
       this._closedWorld,
       this._work,
       {SourceInformation sourceInformation})
@@ -235,8 +250,6 @@
 
   JCommonElements get _commonElements => _closedWorld.commonElements;
 
-  ConstantSystem get _constantSystem => _closedWorld.constantSystem;
-
   NativeData get _nativeData => _closedWorld.nativeData;
 
   InterceptorData get _interceptorData => _closedWorld.interceptorData;
@@ -352,78 +365,38 @@
   }
 
   void preGenerateMethod(HGraph graph) {
-    new SsaInstructionSelection(_options, _closedWorld, _interceptorData)
-        .visitGraph(graph);
-    new SsaTypeKnownRemover().visitGraph(graph);
-    new SsaTrustedCheckRemover(_options).visitGraph(graph);
-    new SsaInstructionMerger(
-            _abstractValueDomain, generateAtUseSite, _superMemberData)
-        .visitGraph(graph);
-    new SsaConditionMerger(generateAtUseSite, controlFlowOperators)
-        .visitGraph(graph);
-    new SsaShareRegionConstants(_options).visitGraph(graph);
+    void runPhase(CodegenPhase phase, {bool traceGraph = true}) {
+      _codegenTask.measureSubtask(phase.name, () => phase.visitGraph(graph));
+      if (traceGraph) {
+        _tracer.traceGraph(phase.name, graph);
+      }
+      assert(graph.isValid(), 'Graph not valid after ${phase.name}');
+    }
+
+    runPhase(
+        new SsaInstructionSelection(_options, _closedWorld, _interceptorData));
+    runPhase(new SsaTypeKnownRemover());
+    runPhase(new SsaTrustedCheckRemover(_options));
+    runPhase(new SsaAssignmentChaining(_options, _closedWorld));
+    runPhase(new SsaInstructionMerger(
+        _abstractValueDomain, generateAtUseSite, _superMemberData));
+    runPhase(new SsaConditionMerger(generateAtUseSite, controlFlowOperators));
+    runPhase(new SsaShareRegionConstants(_options));
+
     SsaLiveIntervalBuilder intervalBuilder =
         new SsaLiveIntervalBuilder(generateAtUseSite, controlFlowOperators);
-    intervalBuilder.visitGraph(graph);
+    runPhase(intervalBuilder, traceGraph: false);
     SsaVariableAllocator allocator = new SsaVariableAllocator(
         _namer,
         intervalBuilder.liveInstructions,
         intervalBuilder.liveIntervals,
         generateAtUseSite);
-    allocator.visitGraph(graph);
+    runPhase(allocator, traceGraph: false);
     variableNames = allocator.names;
     shouldGroupVarDeclarations = allocator.names.numberOfVariables > 1;
   }
 
   void handleDelayedVariableDeclarations(SourceInformation sourceInformation) {
-    if (_options.experimentLocalNames) {
-      handleDelayedVariableDeclarations2(sourceInformation);
-      return;
-    }
-
-    // If we have only one variable declaration and the first statement is an
-    // assignment to that variable then we can merge the two.  We count the
-    // number of variables in the variable allocator to try to avoid this issue,
-    // but it sometimes happens that the variable allocator introduces a
-    // temporary variable that it later eliminates.
-    if (!collectedVariableDeclarations.isEmpty) {
-      if (collectedVariableDeclarations.length == 1 &&
-          currentContainer.statements.length >= 1 &&
-          currentContainer.statements[0] is js.ExpressionStatement) {
-        String name = collectedVariableDeclarations.first;
-        js.ExpressionStatement statement = currentContainer.statements[0];
-        if (statement.expression is js.Assignment) {
-          js.Assignment assignment = statement.expression;
-          if (!assignment.isCompound &&
-              assignment.leftHandSide is js.VariableReference) {
-            js.VariableReference variableReference = assignment.leftHandSide;
-            if (variableReference.name == name) {
-              js.VariableDeclaration decl = new js.VariableDeclaration(name);
-              js.VariableInitialization initialization =
-                  new js.VariableInitialization(decl, assignment.value);
-              currentContainer.statements[0] = new js.ExpressionStatement(
-                      new js.VariableDeclarationList([initialization]))
-                  .withSourceInformation(sourceInformation);
-              return;
-            }
-          }
-        }
-      }
-      // If we can't merge the declaration with the first assignment then we
-      // just do it with a new var z,y,x; statement.
-      List<js.VariableInitialization> declarations =
-          <js.VariableInitialization>[];
-      collectedVariableDeclarations.forEach((String name) {
-        declarations.add(new js.VariableInitialization(
-            new js.VariableDeclaration(name), null));
-      });
-      var declarationList = new js.VariableDeclarationList(declarations)
-          .withSourceInformation(sourceInformation);
-      insertStatementAtStart(new js.ExpressionStatement(declarationList));
-    }
-  }
-
-  void handleDelayedVariableDeclarations2(SourceInformation sourceInformation) {
     // Create 'var' list at the start of function.  Move assignment statements
     // from the top of the body into the variable initializers.
     if (collectedVariableDeclarations.isEmpty) return;
@@ -521,11 +494,9 @@
         if (current.isControlFlow()) {
           return TYPE_STATEMENT;
         }
-        // HFieldSet generates code on the form x.y = ..., which isn't
-        // valid in a declaration, but it also always have no uses, so
-        // it's caught by that test too.
-        assert(current is! HFieldSet || current.usedBy.isEmpty);
-        if (current.usedBy.isEmpty) {
+        // HFieldSet generates code on the form "x.y = ...", which isn't valid
+        // in a declaration.
+        if (current.usedBy.isEmpty || current is HFieldSet) {
           result = TYPE_EXPRESSION;
         }
         current = current.next;
@@ -802,8 +773,10 @@
   }
 
   // The regular [visitIf] method implements the needed logic.
+  @override
   bool visitIfInfo(HIfBlockInformation info) => false;
 
+  @override
   bool visitSwitchInfo(HSwitchBlockInformation info) {
     bool isExpression = isJSExpression(info.expression);
     if (!isExpression) {
@@ -875,23 +848,28 @@
     return true;
   }
 
+  @override
   bool visitSequenceInfo(HStatementSequenceInformation info) {
     return false;
   }
 
+  @override
   bool visitSubGraphInfo(HSubGraphBlockInformation info) {
     visitSubGraph(info.subGraph);
     return true;
   }
 
+  @override
   bool visitSubExpressionInfo(HSubExpressionBlockInformation info) {
     return false;
   }
 
+  @override
   bool visitAndOrInfo(HAndOrBlockInformation info) {
     return false;
   }
 
+  @override
   bool visitTryInfo(HTryBlockInformation info) {
     js.Block body = generateStatementsInNewBlock(info.body);
     js.Catch catchPart = null;
@@ -932,6 +910,7 @@
     }
   }
 
+  @override
   bool visitLoopInfo(HLoopBlockInformation info) {
     HExpressionInformation condition = info.condition;
     bool isConditionExpression = isJSCondition(condition);
@@ -1152,6 +1131,7 @@
     return true;
   }
 
+  @override
   bool visitLabeledBlockInfo(HLabeledBlockInformation labeledBlockInfo) {
     Link<Entity> continueOverrides = const Link<Entity>();
 
@@ -1438,6 +1418,7 @@
         .withSourceInformation(sourceInformation));
   }
 
+  @override
   visitLateValue(HLateValue node) {
     use(node.target);
   }
@@ -1506,21 +1487,33 @@
     }
   }
 
+  @override
   visitIdentity(HIdentity node) {
     emitIdentityComparison(node, node.sourceInformation, inverse: false);
   }
 
+  @override
   visitAdd(HAdd node) => visitInvokeBinary(node, '+');
+  @override
   visitDivide(HDivide node) => visitInvokeBinary(node, '/');
+  @override
   visitMultiply(HMultiply node) => visitInvokeBinary(node, '*');
+  @override
   visitSubtract(HSubtract node) => visitInvokeBinary(node, '-');
+  @override
   visitBitAnd(HBitAnd node) => visitBitInvokeBinary(node, '&');
+  @override
   visitBitNot(HBitNot node) => visitBitInvokeUnary(node, '~');
+  @override
   visitBitOr(HBitOr node) => visitBitInvokeBinary(node, '|');
+  @override
   visitBitXor(HBitXor node) => visitBitInvokeBinary(node, '^');
+  @override
   visitShiftLeft(HShiftLeft node) => visitBitInvokeBinary(node, '<<');
+  @override
   visitShiftRight(HShiftRight node) => visitBitInvokeBinary(node, '>>>');
 
+  @override
   visitTruncatingDivide(HTruncatingDivide node) {
     assert(node.isUInt31(_abstractValueDomain).isDefinitelyTrue);
     // TODO(karlklose): Enable this assertion again when type propagation is
@@ -1536,12 +1529,15 @@
         .withSourceInformation(node.sourceInformation));
   }
 
+  @override
   visitRemainder(HRemainder node) {
     return visitInvokeBinary(node, '%');
   }
 
+  @override
   visitNegate(HNegate node) => visitInvokeUnary(node, '-');
 
+  @override
   visitAbs(HAbs node) {
     use(node.operand);
     push(js
@@ -1549,11 +1545,16 @@
         .withSourceInformation(node.sourceInformation));
   }
 
+  @override
   visitLess(HLess node) => visitRelational(node, '<');
+  @override
   visitLessEqual(HLessEqual node) => visitRelational(node, '<=');
+  @override
   visitGreater(HGreater node) => visitRelational(node, '>');
+  @override
   visitGreaterEqual(HGreaterEqual node) => visitRelational(node, '>=');
 
+  @override
   visitBoolify(HBoolify node) {
     assert(node.inputs.length == 1);
     use(node.inputs[0]);
@@ -1562,10 +1563,12 @@
         .withSourceInformation(node.sourceInformation));
   }
 
+  @override
   visitExit(HExit node) {
     // Don't do anything.
   }
 
+  @override
   visitGoto(HGoto node) {
     HBasicBlock block = node.block;
     assert(block.successors.length == 1);
@@ -1586,6 +1589,7 @@
     continueSubGraph(dominated.first);
   }
 
+  @override
   visitLoopBranch(HLoopBranch node) {
     assert(node.block == subGraph.end);
     // We are generating code for a loop condition.
@@ -1598,6 +1602,7 @@
     }
   }
 
+  @override
   visitBreak(HBreak node) {
     assert(node.block.successors.length == 1);
     if (node.label != null) {
@@ -1624,6 +1629,7 @@
     }
   }
 
+  @override
   visitContinue(HContinue node) {
     assert(node.block.successors.length == 1);
     if (node.label != null) {
@@ -1652,6 +1658,7 @@
     }
   }
 
+  @override
   visitExitTry(HExitTry node) {
     // An [HExitTry] is used to represent the control flow graph of a
     // try/catch block, ie the try body is always a predecessor
@@ -1661,6 +1668,7 @@
     continueSubGraph(node.bodyTrySuccessor);
   }
 
+  @override
   visitTry(HTry node) {
     // We should never get here. Try/catch/finally is always handled using block
     // information in [visitTryInfo].
@@ -1759,6 +1767,7 @@
     return js.If(test, thenPart, elsePart);
   }
 
+  @override
   visitIf(HIf node) {
     if (tryControlFlowOperation(node)) return;
 
@@ -1794,6 +1803,7 @@
     }
   }
 
+  @override
   void visitInterceptor(HInterceptor node) {
     if (node.isConditionalConstantInterceptor) {
       assert(node.inputs.length == 2);
@@ -1817,6 +1827,7 @@
     }
   }
 
+  @override
   visitInvokeDynamicMethod(HInvokeDynamicMethod node) {
     use(node.receiver);
     js.Expression object = pop();
@@ -1859,6 +1870,7 @@
         .withSourceInformation(node.sourceInformation));
   }
 
+  @override
   void visitInvokeConstructorBody(HInvokeConstructorBody node) {
     use(node.inputs[0]);
     js.Expression object = pop();
@@ -1871,6 +1883,7 @@
         node.element, new CallStructure.unnamed(arguments.length)));
   }
 
+  @override
   void visitInvokeGeneratorBody(HInvokeGeneratorBody node) {
     JGeneratorBody element = node.element;
     if (element.isInstanceMember) {
@@ -1892,6 +1905,7 @@
         .registerStaticUse(new StaticUse.generatorBodyInvoke(node.element));
   }
 
+  @override
   void visitOneShotInterceptor(HOneShotInterceptor node) {
     List<js.Expression> arguments = visitArguments(node.inputs);
     var isolate = new js.VariableUse(
@@ -2006,6 +2020,7 @@
     }
   }
 
+  @override
   visitInvokeDynamicSetter(HInvokeDynamicSetter node) {
     use(node.receiver);
     js.Name name = _namer.invocationName(node.selector);
@@ -2015,6 +2030,7 @@
     registerSetter(node, needsCheck: node.needsCheck);
   }
 
+  @override
   visitInvokeDynamicGetter(HInvokeDynamicGetter node) {
     use(node.receiver);
     js.Name name = _namer.invocationName(node.selector);
@@ -2024,6 +2040,7 @@
     registerGetter(node);
   }
 
+  @override
   visitInvokeClosure(HInvokeClosure node) {
     Selector call = new Selector.callClosureFrom(node.selector);
     use(node.receiver);
@@ -2038,6 +2055,7 @@
         new ConstrainedDynamicUse(call, null, node.typeArguments));
   }
 
+  @override
   visitInvokeStatic(HInvokeStatic node) {
     MemberEntity element = node.element;
     node.instantiatedTypes?.forEach(_registry.registerInstantiation);
@@ -2086,6 +2104,7 @@
     }
   }
 
+  @override
   visitInvokeSuper(HInvokeSuper node) {
     MemberEntity superElement = node.element;
     ClassEntity superClass = superElement.enclosingClass;
@@ -2146,6 +2165,7 @@
     }
   }
 
+  @override
   visitFieldGet(HFieldGet node) {
     use(node.receiver);
     if (node.isNullCheck) {
@@ -2163,6 +2183,7 @@
     }
   }
 
+  @override
   visitFieldSet(HFieldSet node) {
     FieldEntity element = node.element;
     _registry.registerStaticUse(new StaticUse.fieldSet(element));
@@ -2177,12 +2198,14 @@
         .withSourceInformation(node.sourceInformation));
   }
 
+  @override
   visitGetLength(HGetLength node) {
     use(node.receiver);
     push(new js.PropertyAccess.field(pop(), 'length')
         .withSourceInformation(node.sourceInformation));
   }
 
+  @override
   visitReadModifyWrite(HReadModifyWrite node) {
     FieldEntity element = node.element;
     _registry.registerStaticUse(new StaticUse.fieldGet(element));
@@ -2203,10 +2226,12 @@
     }
   }
 
+  @override
   visitLocalGet(HLocalGet node) {
     use(node.receiver);
   }
 
+  @override
   visitLocalSet(HLocalSet node) {
     use(node.value);
     assignVariable(
@@ -2220,6 +2245,7 @@
         _registry.worldImpact, nativeBehavior, node);
   }
 
+  @override
   visitForeignCode(HForeignCode node) {
     List<HInstruction> inputs = node.inputs;
     if (node.isJsStatement()) {
@@ -2251,6 +2277,7 @@
     }
   }
 
+  @override
   visitCreate(HCreate node) {
     js.Expression jsClassReference = _emitter.constructorAccess(node.element);
     List<js.Expression> arguments = visitArguments(node.inputs, start: 0);
@@ -2272,6 +2299,7 @@
     }
   }
 
+  @override
   visitCreateBox(HCreateBox node) {
     push(new js.ObjectInitializer(<js.Property>[]));
   }
@@ -2297,6 +2325,7 @@
     push(expression);
   }
 
+  @override
   visitConstant(HConstant node) {
     assert(isGenerateAtUseSite(node));
     generateConstant(node.constant, node.sourceInformation);
@@ -2309,6 +2338,7 @@
     }
   }
 
+  @override
   visitNot(HNot node) {
     assert(node.inputs.length == 1);
     generateNot(node.inputs[0], node.sourceInformation);
@@ -2365,7 +2395,7 @@
             .withSourceInformation(sourceInformation));
       } else if (canGenerateOptimizedComparison(input)) {
         HRelational relational = input;
-        BinaryOperation operation = relational.operation(_constantSystem);
+        constant_system.BinaryOperation operation = relational.operation();
         String op = mapRelationalOperator(operation.name, true);
         handleInvokeBinary(input, op, sourceInformation);
       } else {
@@ -2378,6 +2408,7 @@
     }
   }
 
+  @override
   visitParameterValue(HParameterValue node) {
     assert(!isGenerateAtUseSite(node));
     String name = variableNames.getName(node);
@@ -2385,12 +2416,14 @@
     declaredLocals.add(name);
   }
 
+  @override
   visitLocalValue(HLocalValue node) {
     assert(!isGenerateAtUseSite(node));
     String name = variableNames.getName(node);
     collectedVariableDeclarations.add(name);
   }
 
+  @override
   visitPhi(HPhi node) {
     // This method is only called for phis that are generated at use
     // site. A phi can be generated at use site only if it is the
@@ -2422,6 +2455,7 @@
     }
   }
 
+  @override
   visitReturn(HReturn node) {
     assert(node.inputs.length == 1);
     HInstruction input = node.inputs[0];
@@ -2435,10 +2469,12 @@
     }
   }
 
+  @override
   visitThis(HThis node) {
     push(new js.This());
   }
 
+  @override
   visitThrow(HThrow node) {
     if (node.isRethrow) {
       use(node.inputs[0]);
@@ -2451,23 +2487,27 @@
     }
   }
 
+  @override
   visitAwait(HAwait node) {
     use(node.inputs[0]);
     push(new js.Await(pop()).withSourceInformation(node.sourceInformation));
   }
 
+  @override
   visitYield(HYield node) {
     use(node.inputs[0]);
     pushStatement(new js.DartYield(pop(), node.hasStar)
         .withSourceInformation(node.sourceInformation));
   }
 
+  @override
   visitRangeConversion(HRangeConversion node) {
     // Range conversion instructions are removed by the value range
     // analyzer.
     assert(false);
   }
 
+  @override
   visitBoundsCheck(HBoundsCheck node) {
     // TODO(ngeoffray): Separate the two checks of the bounds check, so,
     // e.g., the zero checks can be shared if possible.
@@ -2548,6 +2588,7 @@
     }
   }
 
+  @override
   visitThrowExpression(HThrowExpression node) {
     HInstruction argument = node.inputs[0];
     use(argument);
@@ -2562,10 +2603,12 @@
     push(value);
   }
 
+  @override
   void visitSwitch(HSwitch node) {
     // Switches are handled using [visitSwitchInfo].
   }
 
+  @override
   void visitStatic(HStatic node) {
     MemberEntity element = node.element;
     assert(element.isFunction || element.isField);
@@ -2582,6 +2625,7 @@
     }
   }
 
+  @override
   void visitLazyStatic(HLazyStatic node) {
     FieldEntity element = node.element;
     _registry.registerStaticUse(new StaticUse.staticInit(element));
@@ -2591,6 +2635,7 @@
     push(call);
   }
 
+  @override
   void visitStaticStore(HStaticStore node) {
     _registry.registerStaticUse(new StaticUse.staticSet(node.element));
     js.Node variable = _emitter.staticFieldAccess(node.element);
@@ -2599,6 +2644,7 @@
         .withSourceInformation(node.sourceInformation));
   }
 
+  @override
   void visitStringConcat(HStringConcat node) {
     use(node.left);
     js.Expression jsLeft = pop();
@@ -2607,6 +2653,7 @@
         .withSourceInformation(node.sourceInformation));
   }
 
+  @override
   void visitStringify(HStringify node) {
     HInstruction input = node.inputs.first;
     if (input.isString(_abstractValueDomain).isDefinitelyTrue) {
@@ -2637,6 +2684,7 @@
     }
   }
 
+  @override
   void visitLiteralList(HLiteralList node) {
     _registry
         // ignore:deprecated_member_use_from_same_package
@@ -2653,6 +2701,7 @@
         .withSourceInformation(node.sourceInformation));
   }
 
+  @override
   void visitIndex(HIndex node) {
     use(node.receiver);
     js.Expression receiver = pop();
@@ -2661,6 +2710,7 @@
         .withSourceInformation(node.sourceInformation));
   }
 
+  @override
   void visitIndexAssign(HIndexAssign node) {
     use(node.receiver);
     js.Expression receiver = pop();
@@ -2932,10 +2982,12 @@
         .withSourceInformation(sourceInformation));
   }
 
+  @override
   void visitIs(HIs node) {
     emitIs(node, "===", node.sourceInformation);
   }
 
+  @override
   void visitIsViaInterceptor(HIsViaInterceptor node) {
     emitIsViaInterceptor(node, node.sourceInformation, negative: false);
   }
@@ -3049,6 +3101,7 @@
     throw failedAt(input, 'Unexpected check: $type.');
   }
 
+  @override
   void visitTypeConversion(HTypeConversion node) {
     if (node.isArgumentTypeCheck || node.isReceiverTypeCheck) {
       js.Expression test = generateReceiverOrArgumentTypeTest(node);
@@ -3108,17 +3161,20 @@
             .withSourceInformation(node.sourceInformation));
   }
 
+  @override
   void visitTypeKnown(HTypeKnown node) {
     // [HTypeKnown] instructions are removed before generating code.
     assert(false);
   }
 
+  @override
   void visitTypeInfoReadRaw(HTypeInfoReadRaw node) {
     use(node.inputs[0]);
     js.Expression receiver = pop();
     push(js.js(r'#.#', [receiver, _namer.rtiFieldJsName]));
   }
 
+  @override
   void visitTypeInfoReadVariable(HTypeInfoReadVariable node) {
     TypeVariableEntity element = node.variable.element;
     int index = element.index;
@@ -3173,6 +3229,7 @@
     }
   }
 
+  @override
   void visitTypeInfoExpression(HTypeInfoExpression node) {
     DartType type = node.dartType;
     if (node.isTypeVariableReplacement) {
diff --git a/pkg/compiler/lib/src/ssa/codegen_helpers.dart b/pkg/compiler/lib/src/ssa/codegen_helpers.dart
index 78ddc04..4ad0571 100644
--- a/pkg/compiler/lib/src/ssa/codegen_helpers.dart
+++ b/pkg/compiler/lib/src/ssa/codegen_helpers.dart
@@ -10,11 +10,12 @@
 import '../options.dart';
 import '../universe/selector.dart' show Selector;
 import '../world.dart' show JClosedWorld;
+import 'codegen.dart' show CodegenPhase;
 import 'nodes.dart';
 
 /// Replaces some instructions with specialized versions to make codegen easier.
 /// Caches codegen information on nodes.
-class SsaInstructionSelection extends HBaseVisitor {
+class SsaInstructionSelection extends HBaseVisitor with CodegenPhase {
   final JClosedWorld _closedWorld;
   final InterceptorData _interceptorData;
   final CompilerOptions _options;
@@ -26,11 +27,13 @@
   AbstractValueDomain get _abstractValueDomain =>
       _closedWorld.abstractValueDomain;
 
+  @override
   void visitGraph(HGraph graph) {
     this.graph = graph;
     visitDominatorTree(graph);
   }
 
+  @override
   visitBasicBlock(HBasicBlock block) {
     HInstruction instruction = block.first;
     while (instruction != null) {
@@ -62,10 +65,12 @@
     }
   }
 
+  @override
   HInstruction visitInstruction(HInstruction node) {
     return node;
   }
 
+  @override
   HInstruction visitIs(HIs node) {
     if (node.kind == HIs.RAW_CHECK) {
       HInstruction interceptor = node.interceptor;
@@ -77,6 +82,7 @@
     return node;
   }
 
+  @override
   HInstruction visitIdentity(HIdentity node) {
     node.singleComparisonOp = simpleOp(node.left, node.right);
     return node;
@@ -127,6 +133,7 @@
       .isInterceptor(_abstractValueDomain.excludeNull(type))
       .isPotentiallyTrue;
 
+  @override
   HInstruction visitInvokeDynamic(HInvokeDynamic node) {
     if (node.isInterceptedCall) {
       tryReplaceInterceptorWithDummy(node, node.selector, node.mask);
@@ -134,6 +141,7 @@
     return node;
   }
 
+  @override
   HInstruction visitInvokeSuper(HInvokeSuper node) {
     if (node.isInterceptedCall) {
       AbstractValue mask = node.getDartReceiver(_closedWorld).instructionType;
@@ -142,6 +150,7 @@
     return node;
   }
 
+  @override
   HInstruction visitOneShotInterceptor(HOneShotInterceptor node) {
     // The receiver parameter should never be replaced with a dummy constant.
     return node;
@@ -194,6 +203,7 @@
     return false;
   }
 
+  @override
   HInstruction visitFieldSet(HFieldSet setter) {
     // Pattern match
     //     t1 = x.f; t2 = t1 + 1; x.f = t2; use(t2)   -->  ++x.f
@@ -304,6 +314,7 @@
     return noMatchingRead();
   }
 
+  @override
   visitIf(HIf node) {
     if (!_options.experimentToBoolean) return node;
     HInstruction condition = node.inputs.single;
@@ -341,11 +352,13 @@
 
 /// Remove [HTypeKnown] instructions from the graph, to make codegen
 /// analysis easier.
-class SsaTypeKnownRemover extends HBaseVisitor {
+class SsaTypeKnownRemover extends HBaseVisitor with CodegenPhase {
+  @override
   void visitGraph(HGraph graph) {
     visitDominatorTree(graph);
   }
 
+  @override
   void visitBasicBlock(HBasicBlock block) {
     HInstruction instruction = block.first;
     while (instruction != null) {
@@ -355,6 +368,7 @@
     }
   }
 
+  @override
   void visitTypeKnown(HTypeKnown instruction) {
     for (HInstruction user in instruction.usedBy) {
       if (user is HTypeConversion) {
@@ -368,16 +382,18 @@
 
 /// Remove [HTypeConversion] instructions from the graph in '--trust-primitives'
 /// mode.
-class SsaTrustedCheckRemover extends HBaseVisitor {
+class SsaTrustedCheckRemover extends HBaseVisitor with CodegenPhase {
   final CompilerOptions _options;
 
   SsaTrustedCheckRemover(this._options);
 
+  @override
   void visitGraph(HGraph graph) {
     if (!_options.trustPrimitives) return;
     visitDominatorTree(graph);
   }
 
+  @override
   void visitBasicBlock(HBasicBlock block) {
     HInstruction instruction = block.first;
     while (instruction != null) {
@@ -387,6 +403,7 @@
     }
   }
 
+  @override
   void visitTypeConversion(HTypeConversion instruction) {
     if (instruction.isReceiverTypeCheck || instruction.isArgumentTypeCheck) {
       instruction.block.rewrite(instruction, instruction.checkedInput);
@@ -395,6 +412,174 @@
   }
 }
 
+/// Use the result of static and field assignments where it is profitable to use
+/// the result of the assignment instead of the value.
+///
+///     a.x = v;
+///     b.y = v;
+/// -->
+///     b.y = a.x = v;
+class SsaAssignmentChaining extends HBaseVisitor with CodegenPhase {
+  final JClosedWorld _closedWorld;
+  final CompilerOptions _options;
+  //HGraph graph;
+
+  SsaAssignmentChaining(this._options, this._closedWorld);
+
+  AbstractValueDomain get _abstractValueDomain =>
+      _closedWorld.abstractValueDomain;
+
+  @override
+  void visitGraph(HGraph graph) {
+    //this.graph = graph;
+    visitDominatorTree(graph);
+  }
+
+  @override
+  void visitBasicBlock(HBasicBlock block) {
+    HInstruction instruction = block.first;
+    while (instruction != null) {
+      instruction = instruction.accept(this);
+    }
+  }
+
+  /// Returns the next instruction.
+  @override
+  HInstruction visitInstruction(HInstruction node) {
+    return node.next;
+  }
+
+  @override
+  HInstruction visitFieldSet(HFieldSet setter) {
+    return tryChainAssignment(setter, setter.value);
+  }
+
+  @override
+  HInstruction visitStaticStore(HStaticStore store) {
+    return tryChainAssignment(store, store.inputs.single);
+  }
+
+  HInstruction tryChainAssignment(HInstruction setter, HInstruction value) {
+    // Try to use result of field or static assignment
+    //
+    //     t1 = v;  x.f = t1;  ... t1 ...
+    // -->
+    //     t1 = x.f = v;  ... t1 ...
+    //
+
+    // Single use is this setter so there will be no other uses to chain to.
+    if (value.usedBy.length <= 1) return setter.next;
+
+    // It is always worthwhile chaining into another setter, since it reduces
+    // the number of references to [value].
+    HInstruction chain = setter;
+    setter.instructionType = value.instructionType;
+    for (HInstruction current = setter.next;;) {
+      if (current is HFieldSet) {
+        HFieldSet nextSetter = current;
+        if (nextSetter.value == value && nextSetter.receiver != value) {
+          nextSetter.changeUse(value, chain);
+          nextSetter.instructionType = value.instructionType;
+          chain = nextSetter;
+          current = nextSetter.next;
+          continue;
+        }
+      } else if (current is HStaticStore) {
+        HStaticStore nextStore = current;
+        if (nextStore.value == value) {
+          nextStore.changeUse(value, chain);
+          nextStore.instructionType = value.instructionType;
+          chain = nextStore;
+          current = nextStore.next;
+          continue;
+        }
+      } else if (current is HReturn) {
+        if (current.inputs.single == value) {
+          current.changeUse(value, chain);
+          return current.next;
+        }
+      }
+      break;
+    }
+
+    final HInstruction next = chain.next;
+
+    if (value.usedBy.length <= 1) return next; // setter is only remaining use.
+
+    // Chain to other places.
+    var uses = DominatedUses.of(value, chain, excludeDominator: true);
+
+    if (uses.isEmpty) return next;
+
+    bool simpleSource = value is HConstant || value is HParameterValue;
+
+    if (uses.isSingleton) {
+      var use = uses.single;
+      if (use is HPhi) {
+        // Filter out back-edges - that causes problems for variable
+        // assignment.
+        // TODO(sra): Better analysis to permit phis that are part of a
+        // forwards-only tree.
+        if (use.block.id < chain.block.id) return next;
+        if (use.usedBy.any((node) => node is HPhi)) return next;
+
+        // A forward phi often has a new name. We want to avoid [value] having a
+        // name at the same time, so chain into the phi only if [value] (1) will
+        // never have a name (like a constant) (2) unavoidably has a name
+        // (e.g. a parameter) or (3) chaining will result in a single use that
+        // variable allocator can try to name consistently with the other phi
+        // inputs.
+        if (simpleSource || value.usedBy.length <= 2) {
+          if (value.isPure(_abstractValueDomain) ||
+              setter.previous == value ||
+              // the following tests for immediately previous phi.
+              (setter.previous == null && value.block == setter.block)) {
+            uses.replaceWith(chain);
+          }
+        }
+        return next;
+      }
+      // TODO(sra): Chains with one remaining potential use have the potential
+      // to generate huge expression containing many nested assignments. This
+      // will be smaller but nearly impossible to read. Are there interior
+      // positions that we should chain into because they are not too difficult
+      // to read?
+      return next;
+    }
+
+    if (simpleSource) return next;
+
+    // If there are many remaining uses, but they are all dominated by [chain],
+    // the variable allocator will try to give them all the same name.
+    if (uses.length >= 2 &&
+        value.usedBy.length - uses.length <= 1 &&
+        value == value.nonCheck()) {
+      // If [value] is a phi, it might have a name. Exceptions are phis that can
+      // be compiled into expressions like `a?b:c` and `a&&b`. We can't tell
+      // here if the phi is an expression, which we could chain, or an
+      // if-then-else with assignments to a variable. If we try to chain an
+      // if-then-else phi we will end up generating code like
+      //
+      //     t2 = this.x = t1;  // t1 is the phi, t2 is the chained name
+      //
+      if (value is HPhi) return next;
+
+      // We need [value] to be generate-at-use in the setter to avoid it having
+      // a name. As a quick check for generate-at-use, accept pure and
+      // immediately preceding instructions.
+      if (value.isPure(_abstractValueDomain) || setter.previous == value) {
+        // TODO(sra): We can tolerate a few non-throwing loads between setter
+        // and value.
+        uses.replaceWith(chain);
+        chain.sourceElement ??= value.sourceElement;
+      }
+      return next;
+    }
+
+    return next;
+  }
+}
+
 /// Instead of emitting each SSA instruction with a temporary variable
 /// mark instructions that can be emitted at their use-site.
 /// For example, in:
@@ -403,7 +588,7 @@
 ///   t2 = add(t0, t1);
 /// t0 and t1 would be marked and the resulting code would then be:
 ///   t2 = add(4, 3);
-class SsaInstructionMerger extends HBaseVisitor {
+class SsaInstructionMerger extends HBaseVisitor with CodegenPhase {
   final AbstractValueDomain _abstractValueDomain;
   final SuperMemberData _superMemberData;
 
@@ -425,6 +610,7 @@
   SsaInstructionMerger(
       this._abstractValueDomain, this.generateAtUseSite, this._superMemberData);
 
+  @override
   void visitGraph(HGraph graph) {
     visitDominatorTree(graph);
   }
@@ -487,12 +673,14 @@
         .isNotEmpty;
   }
 
+  @override
   void visitInstruction(HInstruction instruction) {
     // A code motion invariant instruction is dealt before visiting it.
     assert(!instruction.isCodeMotionInvariant());
     analyzeInputs(instruction, 0);
   }
 
+  @override
   void visitInvokeSuper(HInvokeSuper instruction) {
     MemberEntity superMethod = instruction.element;
     Selector selector = instruction.selector;
@@ -513,6 +701,7 @@
     }
   }
 
+  @override
   void visitIs(HIs instruction) {
     // In the general case the input might be used multple multiple times, so it
     // must not be set generate at use site.
@@ -531,6 +720,7 @@
 
   // A bounds check method must not have its first input generated at use site,
   // because it's using it twice.
+  @override
   void visitBoundsCheck(HBoundsCheck instruction) {
     analyzeInputs(instruction, 1);
   }
@@ -538,6 +728,7 @@
   // An identity operation must only have its inputs generated at use site if
   // does not require an expression with multiple uses (because of null /
   // undefined).
+  @override
   void visitIdentity(HIdentity instruction) {
     if (instruction.singleComparisonOp != null) {
       super.visitIdentity(instruction);
@@ -545,6 +736,7 @@
     // Do nothing.
   }
 
+  @override
   void visitTypeConversion(HTypeConversion instruction) {
     if (!instruction.isArgumentTypeCheck && !instruction.isReceiverTypeCheck) {
       assert(instruction.isCheckedModeCheck || instruction.isCastTypeCheck);
@@ -555,6 +747,7 @@
     }
   }
 
+  @override
   void visitTypeKnown(HTypeKnown instruction) {
     // [HTypeKnown] instructions are removed before code generation.
     assert(false);
@@ -570,6 +763,7 @@
         block.successors[0].predecessors.length == 1;
   }
 
+  @override
   void visitBasicBlock(HBasicBlock block) {
     // Compensate from not merging blocks: if the block is the
     // single predecessor of its single successor, let the successor
@@ -703,7 +897,7 @@
 ///  Detect control flow arising from short-circuit logical and
 ///  conditional operators, and prepare the program to be generated
 ///  using these operators instead of nested ifs and boolean variables.
-class SsaConditionMerger extends HGraphVisitor {
+class SsaConditionMerger extends HGraphVisitor with CodegenPhase {
   Set<HInstruction> generateAtUseSite;
   Set<HInstruction> controlFlowOperators;
 
@@ -714,6 +908,7 @@
 
   SsaConditionMerger(this.generateAtUseSite, this.controlFlowOperators);
 
+  @override
   void visitGraph(HGraph graph) {
     visitPostDominatorTree(graph);
   }
@@ -763,6 +958,7 @@
     return user.hasSameLoopHeaderAs(input);
   }
 
+  @override
   void visitBasicBlock(HBasicBlock block) {
     if (block.last is! HIf) return;
     HIf startIf = block.last;
@@ -877,13 +1073,13 @@
 /// Insert 'caches' for whole-function region-constants when the local minified
 /// name would be shorter than repeated references.  These are caches for 'this'
 /// and constant values.
-class SsaShareRegionConstants extends HBaseVisitor {
+class SsaShareRegionConstants extends HBaseVisitor with CodegenPhase {
   final CompilerOptions _options;
 
   SsaShareRegionConstants(this._options);
 
+  @override
   visitGraph(HGraph graph) {
-    if (!_options.experimentLocalNames) return;
     // We need the async rewrite to be smarter about hoisting region constants
     // before it is worth-while.
     if (graph.needsAsyncRewrite) return;
@@ -893,6 +1089,7 @@
     visitBasicBlock(graph.entry);
   }
 
+  @override
   visitBasicBlock(HBasicBlock block) {
     HInstruction instruction = block.first;
     while (instruction != null) {
@@ -926,6 +1123,7 @@
     }
   }
 
+  @override
   void visitThis(HThis node) {
     int size = 4;
     // Compare the size of the unchanged minified with the size of the minified
@@ -947,6 +1145,7 @@
     _cache(node, (_) => true, '_this');
   }
 
+  @override
   void visitConstant(HConstant node) {
     if (node.usedBy.length <= 1) return;
     ConstantValue constant = node.constant;
@@ -1055,6 +1254,7 @@
 /// A simple Entity to give intermediate values nice names when not generating
 /// minified code.
 class _ExpressionName implements Entity {
+  @override
   final String name;
   _ExpressionName(this.name);
 }
diff --git a/pkg/compiler/lib/src/ssa/graph_builder.dart b/pkg/compiler/lib/src/ssa/graph_builder.dart
index cf71ede..4b5d9cf 100644
--- a/pkg/compiler/lib/src/ssa/graph_builder.dart
+++ b/pkg/compiler/lib/src/ssa/graph_builder.dart
@@ -2,7 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import '../constants/constant_system.dart';
 import '../common/codegen.dart' show CodegenRegistry;
 import '../common_elements.dart';
 import '../compiler.dart';
@@ -79,8 +78,6 @@
 
   JavaScriptConstantCompiler get constants => backend.constants;
 
-  ConstantSystem get constantSystem => constants.constantSystem;
-
   RuntimeTypesEncoder get rtiEncoder => backend.rtiEncoder;
 
   InferredData get inferredData => globalInferenceResults.inferredData;
diff --git a/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart b/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart
index 3f5d89b..098809b 100644
--- a/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart
+++ b/pkg/compiler/lib/src/ssa/interceptor_simplifier.dart
@@ -32,6 +32,7 @@
 ///
 class SsaSimplifyInterceptors extends HBaseVisitor
     implements OptimizationPhase {
+  @override
   final String name = "SsaSimplifyInterceptors";
   final JClosedWorld _closedWorld;
   final ClassEntity _enclosingClass;
@@ -46,11 +47,13 @@
   AbstractValueDomain get _abstractValueDomain =>
       _closedWorld.abstractValueDomain;
 
+  @override
   void visitGraph(HGraph graph) {
     this._graph = graph;
     visitDominatorTree(graph);
   }
 
+  @override
   void visitBasicBlock(HBasicBlock node) {
     currentBlock = node;
 
@@ -65,8 +68,10 @@
     }
   }
 
+  @override
   bool visitInstruction(HInstruction instruction) => false;
 
+  @override
   bool visitInvoke(HInvoke invoke) {
     if (!invoke.isInterceptedCall) return false;
     dynamic interceptor = invoke.inputs[0];
@@ -187,6 +192,7 @@
   static int useCount(HInstruction user, HInstruction used) =>
       user.inputs.where((input) => input == used).length;
 
+  @override
   bool visitInterceptor(HInterceptor node) {
     if (node.receiver.nonCheck() == _graph.explicitReceiverParameter) {
       // If `explicitReceiverParameter` is set it means the current method is an
@@ -431,6 +437,7 @@
     }
   }
 
+  @override
   bool visitOneShotInterceptor(HOneShotInterceptor node) {
     // 'Undo' the one-shot transformation if the receiver has a constant
     // interceptor.
diff --git a/pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart b/pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart
index fb3df50..0601adb 100644
--- a/pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart
+++ b/pkg/compiler/lib/src/ssa/invoke_dynamic_specializers.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import '../common_elements.dart' show JCommonElements;
-import '../constants/constant_system.dart';
+import '../constants/constant_system.dart' as constant_system;
 import '../constants/values.dart';
 import '../elements/entities.dart';
 import '../elements/names.dart';
@@ -57,7 +57,7 @@
         new CallStructure(selector.argumentCount));
   }
 
-  Operation operation(ConstantSystem constantSystem) => null;
+  constant_system.Operation operation() => null;
 
   static InvokeDynamicSpecializer lookupSpecializer(Selector selector) {
     if (selector.isIndex) return const IndexSpecializer();
@@ -116,6 +116,7 @@
 class IndexAssignSpecializer extends InvokeDynamicSpecializer {
   const IndexAssignSpecializer();
 
+  @override
   HInstruction tryConvertToBuiltin(
       HInvokeDynamic instruction,
       HGraph graph,
@@ -187,6 +188,7 @@
 class IndexSpecializer extends InvokeDynamicSpecializer {
   const IndexSpecializer();
 
+  @override
   HInstruction tryConvertToBuiltin(
       HInvokeDynamic instruction,
       HGraph graph,
@@ -195,13 +197,14 @@
       JCommonElements commonElements,
       JClosedWorld closedWorld,
       OptimizationTestLog log) {
+    var abstractValueDomain = closedWorld.abstractValueDomain;
     if (instruction.inputs[1]
-        .isIndexablePrimitive(closedWorld.abstractValueDomain)
+        .isIndexablePrimitive(abstractValueDomain)
         .isPotentiallyFalse) {
       return null;
     }
     if (instruction.inputs[2]
-            .isInteger(closedWorld.abstractValueDomain)
+            .isInteger(abstractValueDomain)
             .isPotentiallyFalse &&
         options.parameterCheckPolicy.isEmitted) {
       // We want the right checked mode error.
@@ -209,10 +212,13 @@
     }
     AbstractValue receiverType =
         instruction.getDartReceiver(closedWorld).instructionType;
-    AbstractValue type = AbstractValueFactory.inferredTypeForSelector(
+    AbstractValue elementType = AbstractValueFactory.inferredTypeForSelector(
         instruction.selector, receiverType, results);
+    if (abstractValueDomain.isTypedArray(receiverType).isDefinitelyTrue) {
+      elementType = abstractValueDomain.excludeNull(elementType);
+    }
     HIndex converted = new HIndex(instruction.inputs[1], instruction.inputs[2],
-        instruction.selector, type);
+        instruction.selector, elementType);
     log?.registerIndex(instruction, converted);
     return converted;
   }
@@ -221,10 +227,12 @@
 class BitNotSpecializer extends InvokeDynamicSpecializer {
   const BitNotSpecializer();
 
-  UnaryOperation operation(ConstantSystem constantSystem) {
-    return constantSystem.bitNot;
+  @override
+  constant_system.UnaryOperation operation() {
+    return constant_system.bitNot;
   }
 
+  @override
   AbstractValue computeTypeFromInputTypes(
       HInvokeDynamic instruction,
       GlobalTypeInferenceResults results,
@@ -241,6 +249,7 @@
         .computeTypeFromInputTypes(instruction, results, options, closedWorld);
   }
 
+  @override
   HInstruction tryConvertToBuiltin(
       HInvokeDynamic instruction,
       HGraph graph,
@@ -266,10 +275,12 @@
 class UnaryNegateSpecializer extends InvokeDynamicSpecializer {
   const UnaryNegateSpecializer();
 
-  UnaryOperation operation(ConstantSystem constantSystem) {
-    return constantSystem.negate;
+  @override
+  constant_system.UnaryOperation operation() {
+    return constant_system.negate;
   }
 
+  @override
   AbstractValue computeTypeFromInputTypes(
       HInvokeDynamic instruction,
       GlobalTypeInferenceResults results,
@@ -297,6 +308,7 @@
         .computeTypeFromInputTypes(instruction, results, options, closedWorld);
   }
 
+  @override
   HInstruction tryConvertToBuiltin(
       HInvokeDynamic instruction,
       HGraph graph,
@@ -322,10 +334,12 @@
 class AbsSpecializer extends InvokeDynamicSpecializer {
   const AbsSpecializer();
 
-  UnaryOperation operation(ConstantSystem constantSystem) {
-    return constantSystem.abs;
+  @override
+  constant_system.UnaryOperation operation() {
+    return constant_system.abs;
   }
 
+  @override
   AbstractValue computeTypeFromInputTypes(
       HInvokeDynamic instruction,
       GlobalTypeInferenceResults results,
@@ -341,6 +355,7 @@
         .computeTypeFromInputTypes(instruction, results, options, closedWorld);
   }
 
+  @override
   HInstruction tryConvertToBuiltin(
       HInvokeDynamic instruction,
       HGraph graph,
@@ -369,6 +384,7 @@
 abstract class BinaryArithmeticSpecializer extends InvokeDynamicSpecializer {
   const BinaryArithmeticSpecializer();
 
+  @override
   AbstractValue computeTypeFromInputTypes(
       HInvokeDynamic instruction,
       GlobalTypeInferenceResults results,
@@ -408,6 +424,7 @@
             .isDefinitelyTrue;
   }
 
+  @override
   HInstruction tryConvertToBuiltin(
       HInvokeDynamic instruction,
       HGraph graph,
@@ -465,6 +482,7 @@
 class AddSpecializer extends BinaryArithmeticSpecializer {
   const AddSpecializer();
 
+  @override
   AbstractValue computeTypeFromInputTypes(
       HInvokeDynamic instruction,
       GlobalTypeInferenceResults results,
@@ -480,10 +498,12 @@
         .computeTypeFromInputTypes(instruction, results, options, closedWorld);
   }
 
-  BinaryOperation operation(ConstantSystem constantSystem) {
-    return constantSystem.add;
+  @override
+  constant_system.BinaryOperation operation() {
+    return constant_system.add;
   }
 
+  @override
   HInstruction newBuiltinVariant(
       HInvokeDynamic instruction,
       GlobalTypeInferenceResults results,
@@ -506,10 +526,12 @@
 class DivideSpecializer extends BinaryArithmeticSpecializer {
   const DivideSpecializer();
 
-  BinaryOperation operation(ConstantSystem constantSystem) {
-    return constantSystem.divide;
+  @override
+  constant_system.BinaryOperation operation() {
+    return constant_system.divide;
   }
 
+  @override
   AbstractValue computeTypeFromInputTypes(
       HInstruction instruction,
       GlobalTypeInferenceResults results,
@@ -523,6 +545,7 @@
         .computeTypeFromInputTypes(instruction, results, options, closedWorld);
   }
 
+  @override
   HInstruction newBuiltinVariant(
       HInvokeDynamic instruction,
       GlobalTypeInferenceResults results,
@@ -542,6 +565,7 @@
 class ModuloSpecializer extends BinaryArithmeticSpecializer {
   const ModuloSpecializer();
 
+  @override
   AbstractValue computeTypeFromInputTypes(
       HInvokeDynamic instruction,
       GlobalTypeInferenceResults results,
@@ -554,10 +578,12 @@
         .computeTypeFromInputTypes(instruction, results, options, closedWorld);
   }
 
-  BinaryOperation operation(ConstantSystem constantSystem) {
-    return constantSystem.modulo;
+  @override
+  constant_system.BinaryOperation operation() {
+    return constant_system.modulo;
   }
 
+  @override
   HInstruction newBuiltinVariant(
       HInvokeDynamic instruction,
       GlobalTypeInferenceResults results,
@@ -634,6 +660,7 @@
 class RemainderSpecializer extends BinaryArithmeticSpecializer {
   const RemainderSpecializer();
 
+  @override
   AbstractValue computeTypeFromInputTypes(
       HInvokeDynamic instruction,
       GlobalTypeInferenceResults results,
@@ -646,10 +673,12 @@
         .computeTypeFromInputTypes(instruction, results, options, closedWorld);
   }
 
-  BinaryOperation operation(ConstantSystem constantSystem) {
-    return constantSystem.remainder;
+  @override
+  constant_system.BinaryOperation operation() {
+    return constant_system.remainder;
   }
 
+  @override
   HInstruction newBuiltinVariant(
       HInvokeDynamic instruction,
       GlobalTypeInferenceResults results,
@@ -672,10 +701,12 @@
 class MultiplySpecializer extends BinaryArithmeticSpecializer {
   const MultiplySpecializer();
 
-  BinaryOperation operation(ConstantSystem constantSystem) {
-    return constantSystem.multiply;
+  @override
+  constant_system.BinaryOperation operation() {
+    return constant_system.multiply;
   }
 
+  @override
   AbstractValue computeTypeFromInputTypes(
       HInvokeDynamic instruction,
       GlobalTypeInferenceResults results,
@@ -688,6 +719,7 @@
         .computeTypeFromInputTypes(instruction, results, options, closedWorld);
   }
 
+  @override
   HInstruction newBuiltinVariant(
       HInvokeDynamic instruction,
       GlobalTypeInferenceResults results,
@@ -710,10 +742,12 @@
 class SubtractSpecializer extends BinaryArithmeticSpecializer {
   const SubtractSpecializer();
 
-  BinaryOperation operation(ConstantSystem constantSystem) {
-    return constantSystem.subtract;
+  @override
+  constant_system.BinaryOperation operation() {
+    return constant_system.subtract;
   }
 
+  @override
   HInstruction newBuiltinVariant(
       HInvokeDynamic instruction,
       GlobalTypeInferenceResults results,
@@ -736,10 +770,12 @@
 class TruncatingDivideSpecializer extends BinaryArithmeticSpecializer {
   const TruncatingDivideSpecializer();
 
-  BinaryOperation operation(ConstantSystem constantSystem) {
-    return constantSystem.truncatingDivide;
+  @override
+  constant_system.BinaryOperation operation() {
+    return constant_system.truncatingDivide;
   }
 
+  @override
   AbstractValue computeTypeFromInputTypes(
       HInvokeDynamic instruction,
       GlobalTypeInferenceResults results,
@@ -789,6 +825,7 @@
     return false;
   }
 
+  @override
   HInstruction tryConvertToBuiltin(
       HInvokeDynamic instruction,
       HGraph graph,
@@ -824,6 +861,7 @@
     return null;
   }
 
+  @override
   HInstruction newBuiltinVariant(
       HInvokeDynamic instruction,
       GlobalTypeInferenceResults results,
@@ -846,6 +884,7 @@
 abstract class BinaryBitOpSpecializer extends BinaryArithmeticSpecializer {
   const BinaryBitOpSpecializer();
 
+  @override
   AbstractValue computeTypeFromInputTypes(
       HInvokeDynamic instruction,
       GlobalTypeInferenceResults results,
@@ -895,10 +934,12 @@
 class ShiftLeftSpecializer extends BinaryBitOpSpecializer {
   const ShiftLeftSpecializer();
 
-  BinaryOperation operation(ConstantSystem constantSystem) {
-    return constantSystem.shiftLeft;
+  @override
+  constant_system.BinaryOperation operation() {
+    return constant_system.shiftLeft;
   }
 
+  @override
   HInstruction tryConvertToBuiltin(
       HInvokeDynamic instruction,
       HGraph graph,
@@ -933,6 +974,7 @@
     return null;
   }
 
+  @override
   HInstruction newBuiltinVariant(
       HInvokeDynamic instruction,
       GlobalTypeInferenceResults results,
@@ -955,6 +997,7 @@
 class ShiftRightSpecializer extends BinaryBitOpSpecializer {
   const ShiftRightSpecializer();
 
+  @override
   AbstractValue computeTypeFromInputTypes(
       HInvokeDynamic instruction,
       GlobalTypeInferenceResults results,
@@ -968,6 +1011,7 @@
         .computeTypeFromInputTypes(instruction, results, options, closedWorld);
   }
 
+  @override
   HInstruction tryConvertToBuiltin(
       HInvokeDynamic instruction,
       HGraph graph,
@@ -1015,6 +1059,7 @@
     return null;
   }
 
+  @override
   HInstruction newBuiltinVariant(
       HInvokeDynamic instruction,
       GlobalTypeInferenceResults results,
@@ -1027,8 +1072,9 @@
         computeTypeFromInputTypes(instruction, results, options, closedWorld));
   }
 
-  BinaryOperation operation(ConstantSystem constantSystem) {
-    return constantSystem.shiftRight;
+  @override
+  constant_system.BinaryOperation operation() {
+    return constant_system.shiftRight;
   }
 
   @override
@@ -1041,10 +1087,12 @@
 class BitOrSpecializer extends BinaryBitOpSpecializer {
   const BitOrSpecializer();
 
-  BinaryOperation operation(ConstantSystem constantSystem) {
-    return constantSystem.bitOr;
+  @override
+  constant_system.BinaryOperation operation() {
+    return constant_system.bitOr;
   }
 
+  @override
   AbstractValue computeTypeFromInputTypes(
       HInvokeDynamic instruction,
       GlobalTypeInferenceResults results,
@@ -1060,6 +1108,7 @@
         .computeTypeFromInputTypes(instruction, results, options, closedWorld);
   }
 
+  @override
   HInstruction newBuiltinVariant(
       HInvokeDynamic instruction,
       GlobalTypeInferenceResults results,
@@ -1072,6 +1121,7 @@
         computeTypeFromInputTypes(instruction, results, options, closedWorld));
   }
 
+  @override
   void registerOptimization(
       OptimizationTestLog log, HInstruction original, HInstruction converted) {
     log.registerBitOr(original, converted);
@@ -1081,10 +1131,12 @@
 class BitAndSpecializer extends BinaryBitOpSpecializer {
   const BitAndSpecializer();
 
-  BinaryOperation operation(ConstantSystem constantSystem) {
-    return constantSystem.bitAnd;
+  @override
+  constant_system.BinaryOperation operation() {
+    return constant_system.bitAnd;
   }
 
+  @override
   AbstractValue computeTypeFromInputTypes(
       HInvokeDynamic instruction,
       GlobalTypeInferenceResults results,
@@ -1103,6 +1155,7 @@
         .computeTypeFromInputTypes(instruction, results, options, closedWorld);
   }
 
+  @override
   HInstruction newBuiltinVariant(
       HInvokeDynamic instruction,
       GlobalTypeInferenceResults results,
@@ -1115,6 +1168,7 @@
         computeTypeFromInputTypes(instruction, results, options, closedWorld));
   }
 
+  @override
   void registerOptimization(
       OptimizationTestLog log, HInstruction original, HInstruction converted) {
     log.registerBitAnd(original, converted);
@@ -1124,10 +1178,12 @@
 class BitXorSpecializer extends BinaryBitOpSpecializer {
   const BitXorSpecializer();
 
-  BinaryOperation operation(ConstantSystem constantSystem) {
-    return constantSystem.bitXor;
+  @override
+  constant_system.BinaryOperation operation() {
+    return constant_system.bitXor;
   }
 
+  @override
   AbstractValue computeTypeFromInputTypes(
       HInvokeDynamic instruction,
       GlobalTypeInferenceResults results,
@@ -1143,6 +1199,7 @@
         .computeTypeFromInputTypes(instruction, results, options, closedWorld);
   }
 
+  @override
   HInstruction newBuiltinVariant(
       HInvokeDynamic instruction,
       GlobalTypeInferenceResults results,
@@ -1155,6 +1212,7 @@
         computeTypeFromInputTypes(instruction, results, options, closedWorld));
   }
 
+  @override
   void registerOptimization(
       OptimizationTestLog log, HInstruction original, HInstruction converted) {
     log.registerBitXor(original, converted);
@@ -1164,6 +1222,7 @@
 abstract class RelationalSpecializer extends InvokeDynamicSpecializer {
   const RelationalSpecializer();
 
+  @override
   AbstractValue computeTypeFromInputTypes(
       HInvokeDynamic instruction,
       GlobalTypeInferenceResults results,
@@ -1178,6 +1237,7 @@
         .computeTypeFromInputTypes(instruction, results, options, closedWorld);
   }
 
+  @override
   HInstruction tryConvertToBuiltin(
       HInvokeDynamic instruction,
       HGraph graph,
@@ -1209,6 +1269,7 @@
 class EqualsSpecializer extends RelationalSpecializer {
   const EqualsSpecializer();
 
+  @override
   HInstruction tryConvertToBuiltin(
       HInvokeDynamic instruction,
       HGraph graph,
@@ -1250,10 +1311,12 @@
     return null;
   }
 
-  BinaryOperation operation(ConstantSystem constantSystem) {
-    return constantSystem.equal;
+  @override
+  constant_system.BinaryOperation operation() {
+    return constant_system.equal;
   }
 
+  @override
   HInstruction newBuiltinVariant(
       HInvokeDynamic instruction, JClosedWorld closedWorld) {
     return new HIdentity(instruction.inputs[1], instruction.inputs[2],
@@ -1270,10 +1333,12 @@
 class LessSpecializer extends RelationalSpecializer {
   const LessSpecializer();
 
-  BinaryOperation operation(ConstantSystem constantSystem) {
-    return constantSystem.less;
+  @override
+  constant_system.BinaryOperation operation() {
+    return constant_system.less;
   }
 
+  @override
   HInstruction newBuiltinVariant(
       HInvokeDynamic instruction, JClosedWorld closedWorld) {
     return new HLess(instruction.inputs[1], instruction.inputs[2],
@@ -1290,10 +1355,12 @@
 class GreaterSpecializer extends RelationalSpecializer {
   const GreaterSpecializer();
 
-  BinaryOperation operation(ConstantSystem constantSystem) {
-    return constantSystem.greater;
+  @override
+  constant_system.BinaryOperation operation() {
+    return constant_system.greater;
   }
 
+  @override
   HInstruction newBuiltinVariant(
       HInvokeDynamic instruction, JClosedWorld closedWorld) {
     return new HGreater(instruction.inputs[1], instruction.inputs[2],
@@ -1310,10 +1377,12 @@
 class GreaterEqualSpecializer extends RelationalSpecializer {
   const GreaterEqualSpecializer();
 
-  BinaryOperation operation(ConstantSystem constantSystem) {
-    return constantSystem.greaterEqual;
+  @override
+  constant_system.BinaryOperation operation() {
+    return constant_system.greaterEqual;
   }
 
+  @override
   HInstruction newBuiltinVariant(
       HInvokeDynamic instruction, JClosedWorld closedWorld) {
     return new HGreaterEqual(instruction.inputs[1], instruction.inputs[2],
@@ -1330,10 +1399,12 @@
 class LessEqualSpecializer extends RelationalSpecializer {
   const LessEqualSpecializer();
 
-  BinaryOperation operation(ConstantSystem constantSystem) {
-    return constantSystem.lessEqual;
+  @override
+  constant_system.BinaryOperation operation() {
+    return constant_system.lessEqual;
   }
 
+  @override
   HInstruction newBuiltinVariant(
       HInvokeDynamic instruction, JClosedWorld closedWorld) {
     return new HLessEqual(instruction.inputs[1], instruction.inputs[2],
@@ -1350,10 +1421,12 @@
 class CodeUnitAtSpecializer extends InvokeDynamicSpecializer {
   const CodeUnitAtSpecializer();
 
-  BinaryOperation operation(ConstantSystem constantSystem) {
-    return constantSystem.codeUnitAt;
+  @override
+  constant_system.BinaryOperation operation() {
+    return constant_system.codeUnitAt;
   }
 
+  @override
   HInstruction tryConvertToBuiltin(
       HInvokeDynamic instruction,
       HGraph graph,
@@ -1387,6 +1460,7 @@
 class CompareToSpecializer extends InvokeDynamicSpecializer {
   const CompareToSpecializer();
 
+  @override
   HInstruction tryConvertToBuiltin(
       HInvokeDynamic instruction,
       HGraph graph,
@@ -1436,6 +1510,7 @@
     extends InvokeDynamicSpecializer {
   const IdempotentStringOperationSpecializer();
 
+  @override
   HInstruction tryConvertToBuiltin(
       HInvokeDynamic instruction,
       HGraph graph,
@@ -1482,6 +1557,7 @@
 class PatternMatchSpecializer extends InvokeDynamicSpecializer {
   const PatternMatchSpecializer();
 
+  @override
   HInstruction tryConvertToBuiltin(
       HInvokeDynamic instruction,
       HGraph graph,
@@ -1510,10 +1586,12 @@
 class RoundSpecializer extends InvokeDynamicSpecializer {
   const RoundSpecializer();
 
-  UnaryOperation operation(ConstantSystem constantSystem) {
-    return constantSystem.round;
+  @override
+  constant_system.UnaryOperation operation() {
+    return constant_system.round;
   }
 
+  @override
   HInstruction tryConvertToBuiltin(
       HInvokeDynamic instruction,
       HGraph graph,
diff --git a/pkg/compiler/lib/src/ssa/jump_handler.dart b/pkg/compiler/lib/src/ssa/jump_handler.dart
index 20d604b0..df6a83e 100644
--- a/pkg/compiler/lib/src/ssa/jump_handler.dart
+++ b/pkg/compiler/lib/src/ssa/jump_handler.dart
@@ -45,25 +45,34 @@
 
   NullJumpHandler(this.reporter);
 
+  @override
   void generateBreak(SourceInformation sourceInformation,
       [LabelDefinition label]) {
     reporter.internalError(CURRENT_ELEMENT_SPANNABLE,
         'NullJumpHandler.generateBreak should not be called.');
   }
 
+  @override
   void generateContinue(SourceInformation sourceInformation,
       [LabelDefinition label]) {
     reporter.internalError(CURRENT_ELEMENT_SPANNABLE,
         'NullJumpHandler.generateContinue should not be called.');
   }
 
+  @override
   void forEachBreak(Function ignored) {}
+  @override
   void forEachContinue(Function ignored) {}
+  @override
   void close() {}
+  @override
   bool hasAnyContinue() => false;
+  @override
   bool hasAnyBreak() => false;
 
+  @override
   List<LabelDefinition> get labels => const <LabelDefinition>[];
+  @override
   JumpTarget get target => null;
 }
 
@@ -73,6 +82,7 @@
 /// breaks of the body. Continues in switches is currently not handled.
 class TargetJumpHandler implements JumpHandler {
   final GraphBuilder builder;
+  @override
   final JumpTarget target;
   final List<_JumpHandlerEntry> jumps;
 
@@ -83,6 +93,7 @@
     builder.jumpTargets[target] = this;
   }
 
+  @override
   void generateBreak(SourceInformation sourceInformation,
       [LabelDefinition label]) {
     HInstruction breakInstruction;
@@ -98,6 +109,7 @@
     jumps.add(new _JumpHandlerEntry(breakInstruction, locals));
   }
 
+  @override
   void generateContinue(SourceInformation sourceInformation,
       [LabelDefinition label]) {
     HInstruction continueInstruction;
@@ -116,18 +128,21 @@
     jumps.add(new _JumpHandlerEntry(continueInstruction, locals));
   }
 
+  @override
   void forEachBreak(Function action) {
     for (_JumpHandlerEntry entry in jumps) {
       if (entry.isBreak()) action(entry.jumpInstruction, entry.locals);
     }
   }
 
+  @override
   void forEachContinue(Function action) {
     for (_JumpHandlerEntry entry in jumps) {
       if (entry.isContinue()) action(entry.jumpInstruction, entry.locals);
     }
   }
 
+  @override
   bool hasAnyContinue() {
     for (_JumpHandlerEntry entry in jumps) {
       if (entry.isContinue()) return true;
@@ -135,6 +150,7 @@
     return false;
   }
 
+  @override
   bool hasAnyBreak() {
     for (_JumpHandlerEntry entry in jumps) {
       if (entry.isBreak()) return true;
@@ -142,11 +158,13 @@
     return false;
   }
 
+  @override
   void close() {
     // The mapping from TargetElement to JumpHandler is no longer needed.
     builder.jumpTargets.remove(target);
   }
 
+  @override
   List<LabelDefinition> get labels {
     List<LabelDefinition> result = null;
     for (LabelDefinition element in target.labels) {
@@ -167,6 +185,7 @@
   SwitchCaseJumpHandler(GraphBuilder builder, JumpTarget target)
       : super(builder, target);
 
+  @override
   void generateBreak(SourceInformation sourceInformation,
       [LabelDefinition label]) {
     if (label == null) {
@@ -189,6 +208,7 @@
     return label != null && targetIndexMap.containsKey(label.target);
   }
 
+  @override
   void generateContinue(SourceInformation sourceInformation,
       [LabelDefinition label]) {
     if (isContinueToSwitchCase(label)) {
@@ -212,6 +232,7 @@
     }
   }
 
+  @override
   void close() {
     // The mapping from TargetElement to JumpHandler is no longer needed.
     for (JumpTarget target in targetIndexMap.keys) {
diff --git a/pkg/compiler/lib/src/ssa/locals_handler.dart b/pkg/compiler/lib/src/ssa/locals_handler.dart
index 991cef0..9c08d57 100644
--- a/pkg/compiler/lib/src/ssa/locals_handler.dart
+++ b/pkg/compiler/lib/src/ssa/locals_handler.dart
@@ -346,9 +346,10 @@
       AbstractValue type = local is BoxLocal
           ? _abstractValueDomain.nonNullType
           : getTypeOfCapturedVariable(redirect);
-      HInstruction fieldGet = new HFieldGet(redirect, receiver, type);
+      HInstruction fieldGet =
+          new HFieldGet(redirect, receiver, type, sourceInformation);
       builder.add(fieldGet);
-      return fieldGet..sourceInformation = sourceInformation;
+      return fieldGet;
     } else if (isBoxed(local)) {
       FieldEntity redirect = redirectionMapping[local];
       BoxLocal localBox;
@@ -363,10 +364,10 @@
       assert(localBox != null);
 
       HInstruction box = readLocal(localBox);
-      HInstruction lookup =
-          new HFieldGet(redirect, box, getTypeOfCapturedVariable(redirect));
+      HInstruction lookup = new HFieldGet(redirect, box,
+          getTypeOfCapturedVariable(redirect), sourceInformation);
       builder.add(lookup);
-      return lookup..sourceInformation = sourceInformation;
+      return lookup;
     } else {
       assert(_isUsedInTryOrGenerator(local));
       HLocalValue localValue = getLocal(local);
@@ -691,15 +692,18 @@
 /// For instance used for holding return value of function or the exception of a
 /// try-catch statement.
 class SyntheticLocal extends Local {
+  @override
   final String name;
   final Entity executableContext;
   final MemberEntity memberContext;
 
   // Avoid slow Object.hashCode.
+  @override
   final int hashCode = _nextHashCode = (_nextHashCode + 1).toUnsigned(30);
   static int _nextHashCode = 0;
 
   SyntheticLocal(this.name, this.executableContext, this.memberContext);
 
+  @override
   toString() => 'SyntheticLocal($name)';
 }
diff --git a/pkg/compiler/lib/src/ssa/logging.dart b/pkg/compiler/lib/src/ssa/logging.dart
index 68d648f..0a99d31 100644
--- a/pkg/compiler/lib/src/ssa/logging.dart
+++ b/pkg/compiler/lib/src/ssa/logging.dart
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+import '../elements/entities.dart';
 import '../util/features.dart';
 import 'nodes.dart';
 
@@ -28,8 +29,12 @@
 
   void registerFieldGet(HInvokeDynamicGetter original, HFieldGet converted) {
     Features features = new Features();
-    features['name'] =
-        '${converted.element.enclosingClass.name}.${converted.element.name}';
+    if (converted.element != null) {
+      features['name'] =
+          '${converted.element.enclosingClass.name}.${converted.element.name}';
+    } else {
+      features['name'] = '<null-guard>';
+    }
     entries.add(new OptimizationLogEntry('FieldGet', features));
   }
 
@@ -44,6 +49,33 @@
     entries.add(new OptimizationLogEntry('FieldSet', features));
   }
 
+  void registerFieldCall(HInvokeDynamicMethod original, HFieldGet converted) {
+    Features features = new Features();
+    if (converted.element != null) {
+      features['name'] =
+          '${converted.element.enclosingClass.name}.${converted.element.name}';
+    } else {
+      features['name'] = '<null-guard>';
+    }
+    entries.add(new OptimizationLogEntry('FieldCall', features));
+  }
+
+  void registerConstantFieldGet(
+      HInvokeDynamicGetter original, FieldEntity field, HConstant converted) {
+    Features features = new Features();
+    features['name'] = '${field.enclosingClass.name}.${field.name}';
+    features['value'] = converted.constant.toStructuredText();
+    entries.add(new OptimizationLogEntry('ConstantFieldGet', features));
+  }
+
+  void registerConstantFieldCall(
+      HInvokeDynamicMethod original, FieldEntity field, HConstant converted) {
+    Features features = new Features();
+    features['name'] = '${field.enclosingClass.name}.${field.name}';
+    features['value'] = converted.constant.toStructuredText();
+    entries.add(new OptimizationLogEntry('ConstantFieldCall', features));
+  }
+
   Features _registerSpecializer(
       HInvokeDynamic original, HInstruction converted, String name,
       [String unconvertedName]) {
@@ -212,6 +244,7 @@
     return entries.join(',\n');
   }
 
+  @override
   String toString() => 'OptimizationLog(${getText()})';
 }
 
@@ -225,5 +258,6 @@
 
   OptimizationLogEntry(this.tag, this.features);
 
+  @override
   String toString() => '$tag(${features.getText()})';
 }
diff --git a/pkg/compiler/lib/src/ssa/loop_handler.dart b/pkg/compiler/lib/src/ssa/loop_handler.dart
index be4fb554..f9fda03 100644
--- a/pkg/compiler/lib/src/ssa/loop_handler.dart
+++ b/pkg/compiler/lib/src/ssa/loop_handler.dart
@@ -313,6 +313,7 @@
 // TODO(het): Since kernel simplifies loop breaks and continues, we should
 // rewrite the loop handler from scratch to account for the simplified structure
 class KernelLoopHandler extends LoopHandler {
+  @override
   final KernelSsaGraphBuilder builder;
 
   KernelLoopHandler(KernelSsaGraphBuilder builder)
diff --git a/pkg/compiler/lib/src/ssa/nodes.dart b/pkg/compiler/lib/src/ssa/nodes.dart
index 5b0006f..c6e5a6d 100644
--- a/pkg/compiler/lib/src/ssa/nodes.dart
+++ b/pkg/compiler/lib/src/ssa/nodes.dart
@@ -6,8 +6,7 @@
 
 import '../closure.dart';
 import '../common.dart';
-import '../compiler.dart' show Compiler;
-import '../constants/constant_system.dart';
+import '../constants/constant_system.dart' as constant_system;
 import '../constants/values.dart';
 import '../deferred_load.dart' show OutputUnit;
 import '../elements/entities.dart';
@@ -188,6 +187,7 @@
 
   visitInstruction(HInstruction node);
 
+  @override
   visitBasicBlock(HBasicBlock node) {
     void visitInstructionList(HInstructionList list) {
       HInstruction instruction = list.first;
@@ -285,12 +285,8 @@
     return result;
   }
 
-  HConstant addDeferredConstant(
-      ConstantValue constant,
-      OutputUnit unit,
-      SourceInformation sourceInformation,
-      Compiler compiler,
-      JClosedWorld closedWorld) {
+  HConstant addDeferredConstant(ConstantValue constant, OutputUnit unit,
+      SourceInformation sourceInformation, JClosedWorld closedWorld) {
     ConstantValue wrapper = new DeferredGlobalConstantValue(constant, unit);
     closedWorld.outputUnitData.registerConstantDeferredUse(wrapper, unit);
     return addConstant(wrapper, closedWorld,
@@ -298,23 +294,21 @@
   }
 
   HConstant addConstantInt(int i, JClosedWorld closedWorld) {
-    return addConstant(
-        closedWorld.constantSystem.createIntFromInt(i), closedWorld);
+    return addConstant(constant_system.createIntFromInt(i), closedWorld);
   }
 
   HConstant addConstantIntAsUnsigned(int i, JClosedWorld closedWorld) {
     return addConstant(
-        closedWorld.constantSystem.createInt(new BigInt.from(i).toUnsigned(64)),
+        constant_system.createInt(new BigInt.from(i).toUnsigned(64)),
         closedWorld);
   }
 
   HConstant addConstantDouble(double d, JClosedWorld closedWorld) {
-    return addConstant(closedWorld.constantSystem.createDouble(d), closedWorld);
+    return addConstant(constant_system.createDouble(d), closedWorld);
   }
 
   HConstant addConstantString(String str, JClosedWorld closedWorld) {
-    return addConstant(
-        closedWorld.constantSystem.createString(str), closedWorld);
+    return addConstant(constant_system.createString(str), closedWorld);
   }
 
   HConstant addConstantStringFromName(js.Name name, JClosedWorld closedWorld) {
@@ -325,12 +319,11 @@
   }
 
   HConstant addConstantBool(bool value, JClosedWorld closedWorld) {
-    return addConstant(
-        closedWorld.constantSystem.createBool(value), closedWorld);
+    return addConstant(constant_system.createBool(value), closedWorld);
   }
 
   HConstant addConstantNull(JClosedWorld closedWorld) {
-    return addConstant(closedWorld.constantSystem.createNull(), closedWorld);
+    return addConstant(constant_system.createNull(), closedWorld);
   }
 
   HConstant addConstantUnreachable(JClosedWorld closedWorld) {
@@ -364,6 +357,35 @@
         }
       }
     }
+    assignDominatorRanges();
+  }
+
+  void assignDominatorRanges() {
+    // DFS walk of dominator tree to assign dfs-in and dfs-out numbers to basic
+    // blocks. A dominator has a dfs-in..dfs-out range that includes the range
+    // of the dominated block. See [HGraphVisitor.visitDominatorTree] for
+    // recursion-free schema.
+    _Frame frame = new _Frame(null);
+    frame.block = entry;
+    frame.index = 0;
+
+    int dfsNumber = 0;
+    frame.block.dominatorDfsIn = dfsNumber;
+
+    while (frame != null) {
+      HBasicBlock block = frame.block;
+      int index = frame.index;
+      if (index < block.dominatedBlocks.length) {
+        frame.index = index + 1;
+        frame = frame.next ??= new _Frame(frame);
+        frame.block = block.dominatedBlocks[index];
+        frame.index = 0;
+        frame.block.dominatorDfsIn = ++dfsNumber;
+        continue;
+      }
+      block.dominatorDfsOut = dfsNumber;
+      frame = frame.previous;
+    }
   }
 
   bool isValid() {
@@ -372,12 +394,14 @@
     return validator.isValid;
   }
 
+  @override
   toString() => 'HGraph($element)';
 }
 
 class HBaseVisitor extends HGraphVisitor implements HVisitor {
   HBasicBlock currentBlock;
 
+  @override
   visitBasicBlock(HBasicBlock node) {
     currentBlock = node;
 
@@ -402,93 +426,171 @@
   visitFieldAccess(HFieldAccess node) => visitInstruction(node);
   visitRelational(HRelational node) => visitInvokeBinary(node);
 
+  @override
   visitAbs(HAbs node) => visitInvokeUnary(node);
+  @override
   visitAdd(HAdd node) => visitBinaryArithmetic(node);
+  @override
   visitBitAnd(HBitAnd node) => visitBinaryBitOp(node);
+  @override
   visitBitNot(HBitNot node) => visitInvokeUnary(node);
+  @override
   visitBitOr(HBitOr node) => visitBinaryBitOp(node);
+  @override
   visitBitXor(HBitXor node) => visitBinaryBitOp(node);
+  @override
   visitBoolify(HBoolify node) => visitInstruction(node);
+  @override
   visitBoundsCheck(HBoundsCheck node) => visitCheck(node);
+  @override
   visitBreak(HBreak node) => visitJump(node);
+  @override
   visitContinue(HContinue node) => visitJump(node);
   visitCheck(HCheck node) => visitInstruction(node);
+  @override
   visitConstant(HConstant node) => visitInstruction(node);
+  @override
   visitCreate(HCreate node) => visitInstruction(node);
+  @override
   visitCreateBox(HCreateBox node) => visitInstruction(node);
+  @override
   visitDivide(HDivide node) => visitBinaryArithmetic(node);
+  @override
   visitExit(HExit node) => visitControlFlow(node);
+  @override
   visitExitTry(HExitTry node) => visitControlFlow(node);
+  @override
   visitFieldGet(HFieldGet node) => visitFieldAccess(node);
+  @override
   visitFieldSet(HFieldSet node) => visitFieldAccess(node);
+  @override
   visitForeignCode(HForeignCode node) => visitInstruction(node);
+  @override
   visitGetLength(HGetLength node) => visitInstruction(node);
+  @override
   visitGoto(HGoto node) => visitControlFlow(node);
+  @override
   visitGreater(HGreater node) => visitRelational(node);
+  @override
   visitGreaterEqual(HGreaterEqual node) => visitRelational(node);
+  @override
   visitIdentity(HIdentity node) => visitRelational(node);
+  @override
   visitIf(HIf node) => visitConditionalBranch(node);
+  @override
   visitIndex(HIndex node) => visitInstruction(node);
+  @override
   visitIndexAssign(HIndexAssign node) => visitInstruction(node);
+  @override
   visitInterceptor(HInterceptor node) => visitInstruction(node);
+  @override
   visitInvokeClosure(HInvokeClosure node) => visitInvokeDynamic(node);
+  @override
   visitInvokeConstructorBody(HInvokeConstructorBody node) =>
       visitInvokeStatic(node);
+  @override
   visitInvokeGeneratorBody(HInvokeGeneratorBody node) =>
       visitInvokeStatic(node);
+  @override
   visitInvokeDynamicMethod(HInvokeDynamicMethod node) =>
       visitInvokeDynamic(node);
+  @override
   visitInvokeDynamicGetter(HInvokeDynamicGetter node) =>
       visitInvokeDynamicField(node);
+  @override
   visitInvokeDynamicSetter(HInvokeDynamicSetter node) =>
       visitInvokeDynamicField(node);
+  @override
   visitInvokeStatic(HInvokeStatic node) => visitInvoke(node);
+  @override
   visitInvokeSuper(HInvokeSuper node) => visitInvokeStatic(node);
   visitJump(HJump node) => visitControlFlow(node);
+  @override
   visitLazyStatic(HLazyStatic node) => visitInstruction(node);
+  @override
   visitLess(HLess node) => visitRelational(node);
+  @override
   visitLessEqual(HLessEqual node) => visitRelational(node);
+  @override
   visitLiteralList(HLiteralList node) => visitInstruction(node);
   visitLocalAccess(HLocalAccess node) => visitInstruction(node);
+  @override
   visitLocalGet(HLocalGet node) => visitLocalAccess(node);
+  @override
   visitLocalSet(HLocalSet node) => visitLocalAccess(node);
+  @override
   visitLocalValue(HLocalValue node) => visitInstruction(node);
+  @override
   visitLoopBranch(HLoopBranch node) => visitConditionalBranch(node);
+  @override
   visitNegate(HNegate node) => visitInvokeUnary(node);
+  @override
   visitNot(HNot node) => visitInstruction(node);
+  @override
   visitOneShotInterceptor(HOneShotInterceptor node) => visitInvokeDynamic(node);
+  @override
   visitPhi(HPhi node) => visitInstruction(node);
+  @override
   visitMultiply(HMultiply node) => visitBinaryArithmetic(node);
+  @override
   visitParameterValue(HParameterValue node) => visitLocalValue(node);
+  @override
   visitRangeConversion(HRangeConversion node) => visitCheck(node);
+  @override
   visitReadModifyWrite(HReadModifyWrite node) => visitInstruction(node);
+  @override
   visitRef(HRef node) => node.value.accept(this);
+  @override
   visitRemainder(HRemainder node) => visitBinaryArithmetic(node);
+  @override
   visitReturn(HReturn node) => visitControlFlow(node);
+  @override
   visitShiftLeft(HShiftLeft node) => visitBinaryBitOp(node);
+  @override
   visitShiftRight(HShiftRight node) => visitBinaryBitOp(node);
+  @override
   visitSubtract(HSubtract node) => visitBinaryArithmetic(node);
+  @override
   visitSwitch(HSwitch node) => visitControlFlow(node);
+  @override
   visitStatic(HStatic node) => visitInstruction(node);
+  @override
   visitStaticStore(HStaticStore node) => visitInstruction(node);
+  @override
   visitStringConcat(HStringConcat node) => visitInstruction(node);
+  @override
   visitStringify(HStringify node) => visitInstruction(node);
+  @override
   visitThis(HThis node) => visitParameterValue(node);
+  @override
   visitThrow(HThrow node) => visitControlFlow(node);
+  @override
   visitThrowExpression(HThrowExpression node) => visitInstruction(node);
+  @override
   visitTruncatingDivide(HTruncatingDivide node) => visitBinaryArithmetic(node);
+  @override
   visitTry(HTry node) => visitControlFlow(node);
+  @override
   visitIs(HIs node) => visitInstruction(node);
+  @override
   visitLateValue(HLateValue node) => visitInstruction(node);
+  @override
   visitIsViaInterceptor(HIsViaInterceptor node) => visitInstruction(node);
+  @override
   visitTypeConversion(HTypeConversion node) => visitCheck(node);
+  @override
   visitTypeKnown(HTypeKnown node) => visitCheck(node);
+  @override
   visitAwait(HAwait node) => visitInstruction(node);
+  @override
   visitYield(HYield node) => visitInstruction(node);
 
+  @override
   visitTypeInfoReadRaw(HTypeInfoReadRaw node) => visitInstruction(node);
+  @override
   visitTypeInfoReadVariable(HTypeInfoReadVariable node) =>
       visitInstruction(node);
+  @override
   visitTypeInfoExpression(HTypeInfoExpression node) => visitInstruction(node);
 }
 
@@ -633,6 +735,8 @@
 
   HBasicBlock dominator = null;
   final List<HBasicBlock> dominatedBlocks;
+  int dominatorDfsIn;
+  int dominatorDfsOut;
 
   HBasicBlock() : this.withId(null);
   HBasicBlock.withId(this.id)
@@ -641,6 +745,7 @@
         successors = const <HBasicBlock>[],
         dominatedBlocks = <HBasicBlock>[];
 
+  @override
   int get hashCode => id;
 
   bool isNew() => status == STATUS_NEW;
@@ -734,6 +839,7 @@
     instruction.notifyAddedToBlock(this);
   }
 
+  @override
   void remove(HInstruction instruction) {
     assert(isOpen() || isClosed());
     assert(instruction is! HPhi);
@@ -891,22 +997,12 @@
     return validator.isValid;
   }
 
-  Map<HBasicBlock, bool> dominatesCache;
-
   bool dominates(HBasicBlock other) {
-    if (dominatesCache == null) {
-      dominatesCache = new Map<HBasicBlock, bool>();
-    } else {
-      bool res = dominatesCache[other];
-      if (res != null) return res;
-    }
-    do {
-      if (identical(this, other)) return dominatesCache[other] = true;
-      other = other.dominator;
-    } while (other != null && other.id >= id);
-    return dominatesCache[other] = false;
+    return this.dominatorDfsIn <= other.dominatorDfsIn &&
+        other.dominatorDfsOut <= this.dominatorDfsOut;
   }
 
+  @override
   toString() => 'HBasicBlock($id)';
 }
 
@@ -979,6 +1075,7 @@
     assert(inputs.every((e) => e != null), "inputs: $inputs");
   }
 
+  @override
   int get hashCode => id;
 
   bool useGvn() => _useGvn;
@@ -1327,6 +1424,7 @@
 
   bool get isEmpty => _instructions.isEmpty;
   bool get isNotEmpty => !isEmpty;
+  int get length => _instructions.length;
 
   /// Changes all the uses in the set to [newInstruction].
   void replaceWith(HInstruction newInstruction) {
@@ -1350,6 +1448,8 @@
 
   HInstruction get single => _instructions.single;
 
+  Iterable<HInstruction> get instructions => _instructions;
+
   void _addUse(HInstruction user, int inputIndex) {
     _instructions.add(user);
     _indexes.add(inputIndex);
@@ -1453,6 +1553,7 @@
   @override
   accept(HVisitor visitor) => visitor.visitRef(this);
 
+  @override
   String toString() => 'HRef(${value})';
 }
 
@@ -1470,9 +1571,13 @@
     sourceInformation = value.sourceInformation;
   }
 
+  @override
   accept(HVisitor visitor) => visitor.visitBoolify(this);
+  @override
   int typeCode() => HInstruction.BOOLIFY_TYPECODE;
+  @override
   bool typeEquals(other) => other is HBoolify;
+  @override
   bool dataEquals(HInstruction other) => true;
 }
 
@@ -1486,9 +1591,12 @@
     setUseGvn();
   }
   HInstruction get checkedInput => inputs[0];
+  @override
   bool isJsStatement() => true;
+  @override
   bool canThrow(AbstractValueDomain domain) => true;
 
+  @override
   HInstruction nonCheck() => checkedInput.nonCheck();
 }
 
@@ -1512,11 +1620,16 @@
   // There can be an additional fourth input which is the index to report to
   // [ioore]. This is used by the expansion of [JSArray.removeLast].
   HInstruction get reportedIndex => inputs.length > 3 ? inputs[3] : index;
+  @override
   bool isControlFlow() => true;
 
+  @override
   accept(HVisitor visitor) => visitor.visitBoundsCheck(this);
+  @override
   int typeCode() => HInstruction.BOUNDS_CHECK_TYPECODE;
+  @override
   bool typeEquals(other) => other is HBoundsCheck;
+  @override
   bool dataEquals(HInstruction other) => true;
 }
 
@@ -1534,7 +1647,9 @@
       // have an `instructionType`, or statement-like [HInstruction]s should
       // have a throwing getter.
       : super(inputs, domain.emptyType);
+  @override
   bool isControlFlow() => true;
+  @override
   bool isJsStatement() => true;
 }
 
@@ -1562,6 +1677,7 @@
     this.sourceInformation = sourceInformation;
   }
 
+  @override
   bool isAllocation(AbstractValueDomain domain) => true;
 
   HInstruction get rtiInput {
@@ -1569,8 +1685,10 @@
     return inputs.last;
   }
 
+  @override
   accept(HVisitor visitor) => visitor.visitCreate(this);
 
+  @override
   String toString() => 'HCreate($element, ${instantiatedTypes})';
 }
 
@@ -1578,10 +1696,13 @@
 class HCreateBox extends HInstruction {
   HCreateBox(AbstractValue type) : super(<HInstruction>[], type);
 
+  @override
   bool isAllocation(AbstractValueDomain domain) => true;
 
+  @override
   accept(HVisitor visitor) => visitor.visitCreateBox(this);
 
+  @override
   String toString() => 'HCreateBox()';
 }
 
@@ -1597,7 +1718,9 @@
     sideEffects.setDependsOnSomething();
   }
   static const int ARGUMENTS_OFFSET = 1;
+  @override
   bool canThrow(AbstractValueDomain domain) => true;
+  @override
   bool isAllocation(AbstractValueDomain domain) => _isAllocation;
   void setAllocation(bool value) {
     _isAllocation = value;
@@ -1606,6 +1729,7 @@
 
 abstract class HInvokeDynamic extends HInvoke {
   final InvokeDynamicSpecializer specializer;
+  @override
   Selector selector;
   AbstractValue mask;
   MemberEntity element;
@@ -1620,8 +1744,10 @@
     assert(isIntercepted != null);
     isInterceptedCall = isIntercepted;
   }
+  @override
   toString() => 'invoke dynamic: selector=$selector, mask=$mask';
   HInstruction get receiver => inputs[0];
+  @override
   HInstruction getDartReceiver(JClosedWorld closedWorld) {
     return isCallOnInterceptor(closedWorld) ? inputs[1] : inputs[0];
   }
@@ -1634,8 +1760,11 @@
     return isInterceptedCall && receiver.isInterceptor(closedWorld);
   }
 
+  @override
   int typeCode() => HInstruction.INVOKE_DYNAMIC_TYPECODE;
+  @override
   bool typeEquals(other) => other is HInvokeDynamic;
+  @override
   bool dataEquals(HInvokeDynamic other) {
     // Use the name and the kind instead of [Selector.operator==]
     // because we don't need to check the arity (already checked in
@@ -1646,6 +1775,7 @@
 }
 
 class HInvokeClosure extends HInvokeDynamic {
+  @override
   final List<DartType> typeArguments;
 
   HInvokeClosure(Selector selector, List<HInstruction> inputs,
@@ -1655,10 +1785,12 @@
     assert(selector.callStructure.typeArgumentCount == typeArguments.length);
     assert(!isInterceptedCall);
   }
+  @override
   accept(HVisitor visitor) => visitor.visitInvokeClosure(this);
 }
 
 class HInvokeDynamicMethod extends HInvokeDynamic {
+  @override
   final List<DartType> typeArguments;
 
   HInvokeDynamicMethod(
@@ -1674,7 +1806,9 @@
     assert(selector.callStructure.typeArgumentCount == typeArguments.length);
   }
 
+  @override
   String toString() => 'invoke dynamic method: selector=$selector, mask=$mask';
+  @override
   accept(HVisitor visitor) => visitor.visitInvokeDynamicMethod(this);
 }
 
@@ -1688,6 +1822,7 @@
       AbstractValue type)
       : super(selector, mask, element, inputs, isIntercepted, type);
 
+  @override
   String toString() => 'invoke dynamic field: selector=$selector, mask=$mask';
 }
 
@@ -1704,17 +1839,21 @@
     this.sourceInformation = sourceInformation;
   }
 
+  @override
   accept(HVisitor visitor) => visitor.visitInvokeDynamicGetter(this);
 
   bool get isTearOff => element != null && element.isFunction;
 
+  @override
   List<DartType> get typeArguments => const <DartType>[];
 
   // There might be an interceptor input, so `inputs.last` is the dart receiver.
+  @override
   bool canThrow(AbstractValueDomain domain) => isTearOff
       ? inputs.last.isNull(domain).isPotentiallyTrue
       : super.canThrow(domain);
 
+  @override
   String toString() => 'invoke dynamic getter: selector=$selector, mask=$mask';
 }
 
@@ -1735,10 +1874,13 @@
     this.sourceInformation = sourceInformation;
   }
 
+  @override
   accept(HVisitor visitor) => visitor.visitInvokeDynamicSetter(this);
 
+  @override
   List<DartType> get typeArguments => const <DartType>[];
 
+  @override
   String toString() =>
       'invoke dynamic setter: selector=$selector, mask=$mask, element=$element';
 }
@@ -1751,6 +1893,7 @@
 
   final bool targetCanThrow;
 
+  @override
   bool canThrow(AbstractValueDomain domain) => targetCanThrow;
 
   /// If this instruction is a call to a constructor, [instantiatedTypes]
@@ -1766,10 +1909,13 @@
     isInterceptedCall = isIntercepted;
   }
 
+  @override
   accept(HVisitor visitor) => visitor.visitInvokeStatic(this);
 
+  @override
   int typeCode() => HInstruction.INVOKE_STATIC_TYPECODE;
 
+  @override
   String toString() => 'invoke static: $element';
 }
 
@@ -1777,6 +1923,7 @@
   /// The class where the call to super is being done.
   final ClassEntity caller;
   final bool isSetter;
+  @override
   final Selector selector;
 
   HInvokeSuper(
@@ -1795,6 +1942,7 @@
   }
 
   HInstruction get receiver => inputs[0];
+  @override
   HInstruction getDartReceiver(JClosedWorld closedWorld) {
     return isCallOnInterceptor(closedWorld) ? inputs[1] : inputs[0];
   }
@@ -1804,7 +1952,9 @@
     return isInterceptedCall && receiver.isInterceptor(closedWorld);
   }
 
+  @override
   toString() => 'invoke super: $element';
+  @override
   accept(HVisitor visitor) => visitor.visitInvokeSuper(this);
 
   HInstruction get value {
@@ -1827,7 +1977,9 @@
     this.sourceInformation = sourceInformation;
   }
 
+  @override
   String toString() => 'invoke constructor body: ${element.name}';
+  @override
   accept(HVisitor visitor) => visitor.visitInvokeConstructorBody(this);
 }
 
@@ -1846,7 +1998,9 @@
     this.sourceInformation = sourceInformation;
   }
 
+  @override
   String toString() => 'HInvokeGeneratorBody(${element.name})';
+  @override
   accept(HVisitor visitor) => visitor.visitInvokeGeneratorBody(this);
 }
 
@@ -1863,10 +2017,12 @@
   final bool isAssignable;
 
   HFieldGet(FieldEntity element, HInstruction receiver, AbstractValue type,
+      SourceInformation sourceInformation,
       {bool isAssignable})
       : this.isAssignable =
             (isAssignable != null) ? isAssignable : element.isAssignable,
         super(element, <HInstruction>[receiver], type) {
+    this.sourceInformation = sourceInformation;
     sideEffects.clearAllSideEffects();
     sideEffects.clearAllDependencies();
     setUseGvn();
@@ -1875,6 +2031,7 @@
     }
   }
 
+  @override
   bool isInterceptor(JClosedWorld closedWorld) {
     if (sourceElement == null) return false;
     // In case of a closure inside an interceptor class, [:this:] is
@@ -1888,18 +2045,26 @@
     return false;
   }
 
+  @override
   bool canThrow(AbstractValueDomain domain) =>
       receiver.isNull(domain).isPotentiallyTrue;
 
+  @override
   HInstruction getDartReceiver(JClosedWorld closedWorld) => receiver;
+  @override
   bool onlyThrowsNSM() => true;
   bool get isNullCheck => element == null;
 
+  @override
   accept(HVisitor visitor) => visitor.visitFieldGet(this);
 
+  @override
   int typeCode() => HInstruction.FIELD_GET_TYPECODE;
+  @override
   bool typeEquals(other) => other is HFieldGet;
+  @override
   bool dataEquals(HFieldGet other) => element == other.element;
+  @override
   String toString() => "FieldGet(element=$element,type=$instructionType)";
 }
 
@@ -1912,16 +2077,24 @@
     sideEffects.setChangesInstanceProperty();
   }
 
+  @override
   bool canThrow(AbstractValueDomain domain) =>
       receiver.isNull(domain).isPotentiallyTrue;
 
+  @override
   HInstruction getDartReceiver(JClosedWorld closedWorld) => receiver;
+  @override
   bool onlyThrowsNSM() => true;
 
   HInstruction get value => inputs[1];
+  @override
   accept(HVisitor visitor) => visitor.visitFieldSet(this);
 
-  bool isJsStatement() => true;
+  // HFieldSet is an expression if it has a user.
+  @override
+  bool isJsStatement() => usedBy.isEmpty;
+
+  @override
   String toString() => "FieldSet(element=$element,type=$instructionType)";
 }
 
@@ -1941,17 +2114,25 @@
 
   HInstruction get receiver => inputs.single;
 
+  @override
   bool canThrow(AbstractValueDomain domain) =>
       receiver.isNull(domain).isPotentiallyTrue;
 
+  @override
   HInstruction getDartReceiver(JClosedWorld closedWorld) => receiver;
+  @override
   bool onlyThrowsNSM() => true;
 
+  @override
   accept(HVisitor visitor) => visitor.visitGetLength(this);
 
+  @override
   int typeCode() => HInstruction.GET_LENGTH_TYPECODE;
+  @override
   bool typeEquals(other) => other is HGetLength;
+  @override
   bool dataEquals(HGetLength other) => true;
+  @override
   String toString() => "GetLength()";
 }
 
@@ -1993,16 +2174,22 @@
   bool get isPostOp => opKind == POST_OP;
   bool get isAssignOp => opKind == ASSIGN_OP;
 
+  @override
   bool canThrow(AbstractValueDomain domain) =>
       receiver.isNull(domain).isPotentiallyTrue;
 
+  @override
   HInstruction getDartReceiver(JClosedWorld closedWorld) => receiver;
+  @override
   bool onlyThrowsNSM() => true;
 
   HInstruction get value => inputs[1];
+  @override
   accept(HVisitor visitor) => visitor.visitReadModifyWrite(this);
 
+  @override
   bool isJsStatement() => isAssignOp;
+  @override
   String toString() => "ReadModifyWrite $jsOp $opKind $element";
 }
 
@@ -2024,6 +2211,7 @@
     this.sourceInformation = sourceInformation;
   }
 
+  @override
   accept(HVisitor visitor) => visitor.visitLocalGet(this);
 
   HLocalValue get local => inputs[0];
@@ -2034,10 +2222,12 @@
       HInstruction value)
       : super(variable, <HInstruction>[local, value], domain.emptyType);
 
+  @override
   accept(HVisitor visitor) => visitor.visitLocalSet(this);
 
   HLocalValue get local => inputs[0];
   HInstruction get value => inputs[1];
+  @override
   bool isJsStatement() => true;
 }
 
@@ -2047,6 +2237,7 @@
   bool get isStatement => false;
   NativeBehavior get nativeBehavior => null;
 
+  @override
   bool canThrow(AbstractValueDomain domain) {
     return sideEffects.hasSideEffects() || sideEffects.dependsOnSomething();
   }
@@ -2054,7 +2245,9 @@
 
 class HForeignCode extends HForeign {
   final js.Template codeTemplate;
+  @override
   final bool isStatement;
+  @override
   final NativeBehavior nativeBehavior;
   NativeThrowBehavior throwBehavior;
   final FunctionEntity foreignFunction;
@@ -2092,9 +2285,12 @@
             effects: effects,
             nativeBehavior: nativeBehavior);
 
+  @override
   accept(HVisitor visitor) => visitor.visitForeignCode(this);
 
+  @override
   bool isJsStatement() => isStatement;
+  @override
   bool canThrow(AbstractValueDomain domain) {
     if (inputs.length > 0) {
       return inputs.first.isNull(domain).isPotentiallyTrue
@@ -2104,24 +2300,31 @@
     return throwBehavior.canThrow;
   }
 
+  @override
   bool onlyThrowsNSM() => throwBehavior.isOnlyNullNSMGuard;
 
+  @override
   bool isAllocation(AbstractValueDomain domain) =>
       nativeBehavior != null &&
       nativeBehavior.isAllocation &&
       isNull(domain).isDefinitelyFalse;
 
+  @override
   int typeCode() => HInstruction.FOREIGN_CODE_TYPECODE;
+  @override
   bool typeEquals(other) => other is HForeignCode;
+  @override
   bool dataEquals(HForeignCode other) {
     return codeTemplate.source != null &&
         codeTemplate.source == other.codeTemplate.source;
   }
 
+  @override
   String toString() => 'HForeignCode("${codeTemplate.source}")';
 }
 
 abstract class HInvokeBinary extends HInstruction {
+  @override
   final Selector selector;
   HInvokeBinary(
       HInstruction left, HInstruction right, this.selector, AbstractValue type)
@@ -2134,26 +2337,31 @@
   HInstruction get left => inputs[0];
   HInstruction get right => inputs[1];
 
-  BinaryOperation operation(ConstantSystem constantSystem);
+  constant_system.BinaryOperation operation();
 }
 
 abstract class HBinaryArithmetic extends HInvokeBinary {
   HBinaryArithmetic(HInstruction left, HInstruction right, Selector selector,
       AbstractValue type)
       : super(left, right, selector, type);
-  BinaryOperation operation(ConstantSystem constantSystem);
+  @override
+  constant_system.BinaryOperation operation();
 }
 
 class HAdd extends HBinaryArithmetic {
   HAdd(HInstruction left, HInstruction right, Selector selector,
       AbstractValue type)
       : super(left, right, selector, type);
+  @override
   accept(HVisitor visitor) => visitor.visitAdd(this);
 
-  BinaryOperation operation(ConstantSystem constantSystem) =>
-      constantSystem.add;
+  @override
+  constant_system.BinaryOperation operation() => constant_system.add;
+  @override
   int typeCode() => HInstruction.ADD_TYPECODE;
+  @override
   bool typeEquals(other) => other is HAdd;
+  @override
   bool dataEquals(HInstruction other) => true;
 }
 
@@ -2161,12 +2369,16 @@
   HDivide(HInstruction left, HInstruction right, Selector selector,
       AbstractValue type)
       : super(left, right, selector, type);
+  @override
   accept(HVisitor visitor) => visitor.visitDivide(this);
 
-  BinaryOperation operation(ConstantSystem constantSystem) =>
-      constantSystem.divide;
+  @override
+  constant_system.BinaryOperation operation() => constant_system.divide;
+  @override
   int typeCode() => HInstruction.DIVIDE_TYPECODE;
+  @override
   bool typeEquals(other) => other is HDivide;
+  @override
   bool dataEquals(HInstruction other) => true;
 }
 
@@ -2174,11 +2386,16 @@
   HMultiply(HInstruction left, HInstruction right, Selector selector,
       AbstractValue type)
       : super(left, right, selector, type);
+  @override
   accept(HVisitor visitor) => visitor.visitMultiply(this);
 
-  BinaryOperation operation(ConstantSystem operations) => operations.multiply;
+  @override
+  constant_system.BinaryOperation operation() => constant_system.multiply;
+  @override
   int typeCode() => HInstruction.MULTIPLY_TYPECODE;
+  @override
   bool typeEquals(other) => other is HMultiply;
+  @override
   bool dataEquals(HInstruction other) => true;
 }
 
@@ -2186,12 +2403,16 @@
   HSubtract(HInstruction left, HInstruction right, Selector selector,
       AbstractValue type)
       : super(left, right, selector, type);
+  @override
   accept(HVisitor visitor) => visitor.visitSubtract(this);
 
-  BinaryOperation operation(ConstantSystem constantSystem) =>
-      constantSystem.subtract;
+  @override
+  constant_system.BinaryOperation operation() => constant_system.subtract;
+  @override
   int typeCode() => HInstruction.SUBTRACT_TYPECODE;
+  @override
   bool typeEquals(other) => other is HSubtract;
+  @override
   bool dataEquals(HInstruction other) => true;
 }
 
@@ -2199,12 +2420,17 @@
   HTruncatingDivide(HInstruction left, HInstruction right, Selector selector,
       AbstractValue type)
       : super(left, right, selector, type);
+  @override
   accept(HVisitor visitor) => visitor.visitTruncatingDivide(this);
 
-  BinaryOperation operation(ConstantSystem constantSystem) =>
-      constantSystem.truncatingDivide;
+  @override
+  constant_system.BinaryOperation operation() =>
+      constant_system.truncatingDivide;
+  @override
   int typeCode() => HInstruction.TRUNCATING_DIVIDE_TYPECODE;
+  @override
   bool typeEquals(other) => other is HTruncatingDivide;
+  @override
   bool dataEquals(HInstruction other) => true;
 }
 
@@ -2212,12 +2438,16 @@
   HRemainder(HInstruction left, HInstruction right, Selector selector,
       AbstractValue type)
       : super(left, right, selector, type);
+  @override
   accept(HVisitor visitor) => visitor.visitRemainder(this);
 
-  BinaryOperation operation(ConstantSystem constantSystem) =>
-      constantSystem.remainder;
+  @override
+  constant_system.BinaryOperation operation() => constant_system.remainder;
+  @override
   int typeCode() => HInstruction.REMAINDER_TYPECODE;
+  @override
   bool typeEquals(other) => other is HRemainder;
+  @override
   bool dataEquals(HInstruction other) => true;
 }
 
@@ -2236,8 +2466,10 @@
   /// following join-block.
   HBasicBlock get defaultTarget => block.successors.last;
 
+  @override
   accept(HVisitor visitor) => visitor.visitSwitch(this);
 
+  @override
   String toString() => "HSwitch cases = $inputs";
 }
 
@@ -2251,12 +2483,16 @@
   HShiftLeft(HInstruction left, HInstruction right, Selector selector,
       AbstractValue type)
       : super(left, right, selector, type);
+  @override
   accept(HVisitor visitor) => visitor.visitShiftLeft(this);
 
-  BinaryOperation operation(ConstantSystem constantSystem) =>
-      constantSystem.shiftLeft;
+  @override
+  constant_system.BinaryOperation operation() => constant_system.shiftLeft;
+  @override
   int typeCode() => HInstruction.SHIFT_LEFT_TYPECODE;
+  @override
   bool typeEquals(other) => other is HShiftLeft;
+  @override
   bool dataEquals(HInstruction other) => true;
 }
 
@@ -2264,12 +2500,16 @@
   HShiftRight(HInstruction left, HInstruction right, Selector selector,
       AbstractValue type)
       : super(left, right, selector, type);
+  @override
   accept(HVisitor visitor) => visitor.visitShiftRight(this);
 
-  BinaryOperation operation(ConstantSystem constantSystem) =>
-      constantSystem.shiftRight;
+  @override
+  constant_system.BinaryOperation operation() => constant_system.shiftRight;
+  @override
   int typeCode() => HInstruction.SHIFT_RIGHT_TYPECODE;
+  @override
   bool typeEquals(other) => other is HShiftRight;
+  @override
   bool dataEquals(HInstruction other) => true;
 }
 
@@ -2277,12 +2517,16 @@
   HBitOr(HInstruction left, HInstruction right, Selector selector,
       AbstractValue type)
       : super(left, right, selector, type);
+  @override
   accept(HVisitor visitor) => visitor.visitBitOr(this);
 
-  BinaryOperation operation(ConstantSystem constantSystem) =>
-      constantSystem.bitOr;
+  @override
+  constant_system.BinaryOperation operation() => constant_system.bitOr;
+  @override
   int typeCode() => HInstruction.BIT_OR_TYPECODE;
+  @override
   bool typeEquals(other) => other is HBitOr;
+  @override
   bool dataEquals(HInstruction other) => true;
 }
 
@@ -2290,12 +2534,16 @@
   HBitAnd(HInstruction left, HInstruction right, Selector selector,
       AbstractValue type)
       : super(left, right, selector, type);
+  @override
   accept(HVisitor visitor) => visitor.visitBitAnd(this);
 
-  BinaryOperation operation(ConstantSystem constantSystem) =>
-      constantSystem.bitAnd;
+  @override
+  constant_system.BinaryOperation operation() => constant_system.bitAnd;
+  @override
   int typeCode() => HInstruction.BIT_AND_TYPECODE;
+  @override
   bool typeEquals(other) => other is HBitAnd;
+  @override
   bool dataEquals(HInstruction other) => true;
 }
 
@@ -2303,16 +2551,21 @@
   HBitXor(HInstruction left, HInstruction right, Selector selector,
       AbstractValue type)
       : super(left, right, selector, type);
+  @override
   accept(HVisitor visitor) => visitor.visitBitXor(this);
 
-  BinaryOperation operation(ConstantSystem constantSystem) =>
-      constantSystem.bitXor;
+  @override
+  constant_system.BinaryOperation operation() => constant_system.bitXor;
+  @override
   int typeCode() => HInstruction.BIT_XOR_TYPECODE;
+  @override
   bool typeEquals(other) => other is HBitXor;
+  @override
   bool dataEquals(HInstruction other) => true;
 }
 
 abstract class HInvokeUnary extends HInstruction {
+  @override
   final Selector selector;
   HInvokeUnary(HInstruction input, this.selector, type)
       : super(<HInstruction>[input], type) {
@@ -2323,53 +2576,70 @@
 
   HInstruction get operand => inputs[0];
 
-  UnaryOperation operation(ConstantSystem constantSystem);
+  constant_system.UnaryOperation operation();
 }
 
 class HNegate extends HInvokeUnary {
   HNegate(HInstruction input, Selector selector, AbstractValue type)
       : super(input, selector, type);
+  @override
   accept(HVisitor visitor) => visitor.visitNegate(this);
 
-  UnaryOperation operation(ConstantSystem constantSystem) =>
-      constantSystem.negate;
+  @override
+  constant_system.UnaryOperation operation() => constant_system.negate;
+  @override
   int typeCode() => HInstruction.NEGATE_TYPECODE;
+  @override
   bool typeEquals(other) => other is HNegate;
+  @override
   bool dataEquals(HInstruction other) => true;
 }
 
 class HAbs extends HInvokeUnary {
   HAbs(HInstruction input, Selector selector, AbstractValue type)
       : super(input, selector, type);
+  @override
   accept(HVisitor visitor) => visitor.visitAbs(this);
 
-  UnaryOperation operation(ConstantSystem constantSystem) => constantSystem.abs;
+  @override
+  constant_system.UnaryOperation operation() => constant_system.abs;
+  @override
   int typeCode() => HInstruction.ABS_TYPECODE;
+  @override
   bool typeEquals(other) => other is HAbs;
+  @override
   bool dataEquals(HInstruction other) => true;
 }
 
 class HBitNot extends HInvokeUnary {
   HBitNot(HInstruction input, Selector selector, AbstractValue type)
       : super(input, selector, type);
+  @override
   accept(HVisitor visitor) => visitor.visitBitNot(this);
 
-  UnaryOperation operation(ConstantSystem constantSystem) =>
-      constantSystem.bitNot;
+  @override
+  constant_system.UnaryOperation operation() => constant_system.bitNot;
+  @override
   int typeCode() => HInstruction.BIT_NOT_TYPECODE;
+  @override
   bool typeEquals(other) => other is HBitNot;
+  @override
   bool dataEquals(HInstruction other) => true;
 }
 
 class HExit extends HControlFlow {
   HExit(AbstractValueDomain domain) : super(domain, const <HInstruction>[]);
+  @override
   toString() => 'exit';
+  @override
   accept(HVisitor visitor) => visitor.visitExit(this);
 }
 
 class HGoto extends HControlFlow {
   HGoto(AbstractValueDomain domain) : super(domain, const <HInstruction>[]);
+  @override
   toString() => 'goto';
+  @override
   accept(HVisitor visitor) => visitor.visitGoto(this);
 }
 
@@ -2407,8 +2677,10 @@
       : breakSwitchContinueLoop = false,
         super.toLabel(domain, label, sourceInformation);
 
+  @override
   String toString() => (label != null) ? 'break ${label.labelName}' : 'break';
 
+  @override
   accept(HVisitor visitor) => visitor.visitBreak(this);
 }
 
@@ -2421,9 +2693,11 @@
       SourceInformation sourceInformation)
       : super.toLabel(domain, label, sourceInformation);
 
+  @override
   String toString() =>
       (label != null) ? 'continue ${label.labelName}' : 'continue';
 
+  @override
   accept(HVisitor visitor) => visitor.visitContinue(this);
 }
 
@@ -2432,7 +2706,9 @@
   HBasicBlock catchBlock;
   HBasicBlock finallyBlock;
   HTry(AbstractValueDomain domain) : super(domain, const <HInstruction>[]);
+  @override
   toString() => 'try';
+  @override
   accept(HVisitor visitor) => visitor.visitTry(this);
   HBasicBlock get joinBlock => this.block.successors.last;
 }
@@ -2444,7 +2720,9 @@
 // finally.
 class HExitTry extends HControlFlow {
   HExitTry(AbstractValueDomain domain) : super(domain, const <HInstruction>[]);
+  @override
   toString() => 'exit try';
+  @override
   accept(HVisitor visitor) => visitor.visitExitTry(this);
   HBasicBlock get bodyTrySuccessor => block.successors[0];
 }
@@ -2453,7 +2731,9 @@
   HBlockFlow blockInformation = null;
   HIf(AbstractValueDomain domain, HInstruction condition)
       : super(domain, <HInstruction>[condition]);
+  @override
   toString() => 'if';
+  @override
   accept(HVisitor visitor) => visitor.visitIf(this);
 
   HBasicBlock get thenBlock {
@@ -2477,7 +2757,9 @@
   HLoopBranch(AbstractValueDomain domain, HInstruction condition,
       [this.kind = CONDITION_FIRST_LOOP])
       : super(domain, <HInstruction>[condition]);
+  @override
   toString() => 'loop-branch';
+  @override
   accept(HVisitor visitor) => visitor.visitLoopBranch(this);
 }
 
@@ -2486,25 +2768,40 @@
   HConstant.internal(this.constant, AbstractValue constantType)
       : super(<HInstruction>[], constantType);
 
+  @override
   toString() => 'literal: ${constant.toStructuredText()}';
+  @override
   accept(HVisitor visitor) => visitor.visitConstant(this);
 
+  @override
   bool isConstant() => true;
+  @override
   bool isConstantBoolean() => constant.isBool;
+  @override
   bool isConstantNull() => constant.isNull;
+  @override
   bool isConstantNumber() => constant.isNum;
+  @override
   bool isConstantInteger() => constant.isInt;
+  @override
   bool isConstantString() => constant.isString;
+  @override
   bool isConstantList() => constant.isList;
+  @override
   bool isConstantMap() => constant.isMap;
+  @override
   bool isConstantFalse() => constant.isFalse;
+  @override
   bool isConstantTrue() => constant.isTrue;
 
+  @override
   bool isInterceptor(JClosedWorld closedWorld) => constant.isInterceptor;
 
   // Maybe avoid this if the literal is big?
+  @override
   bool isCodeMotionInvariant() => true;
 
+  @override
   set instructionType(type) {
     // Only lists can be specialized. The SSA builder uses the
     // inferrer for finding the type of a constant list. We should
@@ -2520,9 +2817,13 @@
     setUseGvn();
   }
 
+  @override
   accept(HVisitor visitor) => visitor.visitNot(this);
+  @override
   int typeCode() => HInstruction.NOT_TYPECODE;
+  @override
   bool typeEquals(other) => other is HNot;
+  @override
   bool dataEquals(HInstruction other) => true;
 }
 
@@ -2535,7 +2836,9 @@
     sourceElement = variable;
   }
 
+  @override
   toString() => 'local ${sourceElement.name}';
+  @override
   accept(HVisitor visitor) => visitor.visitLocalValue(this);
 }
 
@@ -2553,27 +2856,35 @@
     return false;
   }
 
+  @override
   toString() => 'parameter ${sourceElement.name}';
+  @override
   accept(HVisitor visitor) => visitor.visitParameterValue(this);
 }
 
 class HThis extends HParameterValue {
   HThis(ThisLocal element, AbstractValue type) : super(element, type);
 
+  @override
   ThisLocal get sourceElement => super.sourceElement;
+  @override
   void set sourceElement(covariant ThisLocal local) {
     super.sourceElement = local;
   }
 
+  @override
   accept(HVisitor visitor) => visitor.visitThis(this);
 
+  @override
   bool isCodeMotionInvariant() => true;
 
+  @override
   bool isInterceptor(JClosedWorld closedWorld) {
     return closedWorld.interceptorData
         .isInterceptedClass(sourceElement.enclosingClass);
   }
 
+  @override
   String toString() => 'this';
 }
 
@@ -2605,7 +2916,9 @@
     input.usedBy.add(this);
   }
 
+  @override
   toString() => 'phi $id';
+  @override
   accept(HVisitor visitor) => visitor.visitPhi(this);
 }
 
@@ -2619,57 +2932,77 @@
   String singleComparisonOp; // null, '===', '=='
 
   HIdentity(left, right, selector, type) : super(left, right, selector, type);
+  @override
   accept(HVisitor visitor) => visitor.visitIdentity(this);
 
-  BinaryOperation operation(ConstantSystem constantSystem) =>
-      constantSystem.identity;
+  @override
+  constant_system.BinaryOperation operation() => constant_system.identity;
+  @override
   int typeCode() => HInstruction.IDENTITY_TYPECODE;
+  @override
   bool typeEquals(other) => other is HIdentity;
+  @override
   bool dataEquals(HInstruction other) => true;
 }
 
 class HGreater extends HRelational {
   HGreater(left, right, selector, type) : super(left, right, selector, type);
+  @override
   accept(HVisitor visitor) => visitor.visitGreater(this);
 
-  BinaryOperation operation(ConstantSystem constantSystem) =>
-      constantSystem.greater;
+  @override
+  constant_system.BinaryOperation operation() => constant_system.greater;
+  @override
   int typeCode() => HInstruction.GREATER_TYPECODE;
+  @override
   bool typeEquals(other) => other is HGreater;
+  @override
   bool dataEquals(HInstruction other) => true;
 }
 
 class HGreaterEqual extends HRelational {
   HGreaterEqual(left, right, selector, type)
       : super(left, right, selector, type);
+  @override
   accept(HVisitor visitor) => visitor.visitGreaterEqual(this);
 
-  BinaryOperation operation(ConstantSystem constantSystem) =>
-      constantSystem.greaterEqual;
+  @override
+  constant_system.BinaryOperation operation() => constant_system.greaterEqual;
+  @override
   int typeCode() => HInstruction.GREATER_EQUAL_TYPECODE;
+  @override
   bool typeEquals(other) => other is HGreaterEqual;
+  @override
   bool dataEquals(HInstruction other) => true;
 }
 
 class HLess extends HRelational {
   HLess(left, right, selector, type) : super(left, right, selector, type);
+  @override
   accept(HVisitor visitor) => visitor.visitLess(this);
 
-  BinaryOperation operation(ConstantSystem constantSystem) =>
-      constantSystem.less;
+  @override
+  constant_system.BinaryOperation operation() => constant_system.less;
+  @override
   int typeCode() => HInstruction.LESS_TYPECODE;
+  @override
   bool typeEquals(other) => other is HLess;
+  @override
   bool dataEquals(HInstruction other) => true;
 }
 
 class HLessEqual extends HRelational {
   HLessEqual(left, right, selector, type) : super(left, right, selector, type);
+  @override
   accept(HVisitor visitor) => visitor.visitLessEqual(this);
 
-  BinaryOperation operation(ConstantSystem constantSystem) =>
-      constantSystem.lessEqual;
+  @override
+  constant_system.BinaryOperation operation() => constant_system.lessEqual;
+  @override
   int typeCode() => HInstruction.LESS_EQUAL_TYPECODE;
+  @override
   bool typeEquals(other) => other is HLessEqual;
+  @override
   bool dataEquals(HInstruction other) => true;
 }
 
@@ -2679,7 +3012,9 @@
       : super(domain, <HInstruction>[value]) {
     this.sourceInformation = sourceInformation;
   }
+  @override
   toString() => 'return';
+  @override
   accept(HVisitor visitor) => visitor.visitReturn(this);
 }
 
@@ -2689,18 +3024,25 @@
       : super(<HInstruction>[value], domain.emptyType) {
     this.sourceInformation = sourceInformation;
   }
+  @override
   toString() => 'throw expression';
+  @override
   accept(HVisitor visitor) => visitor.visitThrowExpression(this);
+  @override
   bool canThrow(AbstractValueDomain domain) => true;
 }
 
 class HAwait extends HInstruction {
   HAwait(HInstruction value, AbstractValue type)
       : super(<HInstruction>[value], type);
+  @override
   toString() => 'await';
+  @override
   accept(HVisitor visitor) => visitor.visitAwait(this);
   // An await will throw if its argument is not a real future.
+  @override
   bool canThrow(AbstractValueDomain domain) => true;
+  @override
   SideEffects sideEffects = new SideEffects();
 }
 
@@ -2711,9 +3053,13 @@
     this.sourceInformation = sourceInformation;
   }
   bool hasStar;
+  @override
   toString() => 'yield';
+  @override
   accept(HVisitor visitor) => visitor.visitYield(this);
+  @override
   bool canThrow(AbstractValueDomain domain) => false;
+  @override
   SideEffects sideEffects = new SideEffects();
 }
 
@@ -2725,12 +3071,18 @@
       : super(domain, <HInstruction>[value]) {
     this.sourceInformation = sourceInformation;
   }
+  @override
   toString() => 'throw';
+  @override
   accept(HVisitor visitor) => visitor.visitThrow(this);
 }
 
+// TODO(johnniwinther): Change this to a "HStaticLoad" of a field when we use
+// CFE constants. It has been used for static tear-offs even though these should
+// have been constants.
 class HStatic extends HInstruction {
   final MemberEntity element;
+
   HStatic(this.element, AbstractValue type, SourceInformation sourceInformation)
       : super(<HInstruction>[], type) {
     assert(element != null);
@@ -2742,13 +3094,20 @@
     setUseGvn();
     this.sourceInformation = sourceInformation;
   }
+  @override
   toString() => 'static ${element.name}';
+  @override
   accept(HVisitor visitor) => visitor.visitStatic(this);
 
+  @override
   int gvnHashCode() => super.gvnHashCode() ^ element.hashCode;
+  @override
   int typeCode() => HInstruction.STATIC_TYPECODE;
+  @override
   bool typeEquals(other) => other is HStatic;
+  @override
   bool dataEquals(HStatic other) => element == other.element;
+  @override
   bool isCodeMotionInvariant() => !element.isAssignable;
 }
 
@@ -2774,7 +3133,9 @@
     setUseGvn();
   }
 
+  @override
   String toString() => 'interceptor on $interceptedClasses';
+  @override
   accept(HVisitor visitor) => visitor.visitInterceptor(this);
   HInstruction get receiver => inputs[0];
 
@@ -2785,10 +3146,14 @@
     inputs.add(constant);
   }
 
+  @override
   bool isInterceptor(JClosedWorld closedWorld) => true;
 
+  @override
   int typeCode() => HInstruction.INTERCEPTOR_TYPECODE;
+  @override
   bool typeEquals(other) => other is HInterceptor;
+  @override
   bool dataEquals(HInterceptor other) {
     return interceptedClasses == other.interceptedClasses ||
         (interceptedClasses.length == other.interceptedClasses.length &&
@@ -2804,6 +3169,7 @@
 /// calls, this class extends [HInvokeDynamic] and also has the null
 /// constant as the first input.
 class HOneShotInterceptor extends HInvokeDynamic {
+  @override
   List<DartType> typeArguments;
   Set<ClassEntity> interceptedClasses;
 
@@ -2820,9 +3186,12 @@
     assert(inputs[0].instructionType == domain.nullType);
     assert(selector.callStructure.typeArgumentCount == typeArguments.length);
   }
+  @override
   bool isCallOnInterceptor(JClosedWorld closedWorld) => true;
 
+  @override
   String toString() => 'one shot interceptor: selector=$selector, mask=$mask';
+  @override
   accept(HVisitor visitor) => visitor.visitOneShotInterceptor(this);
 }
 
@@ -2840,12 +3209,17 @@
     this.sourceInformation = sourceInformation;
   }
 
+  @override
   toString() => 'lazy static ${element.name}';
+  @override
   accept(HVisitor visitor) => visitor.visitLazyStatic(this);
 
+  @override
   int typeCode() => 30;
   // TODO(4931): can we do better here?
+  @override
   bool isCodeMotionInvariant() => false;
+  @override
   bool canThrow(AbstractValueDomain domain) => true;
 }
 
@@ -2857,27 +3231,39 @@
     sideEffects.clearAllDependencies();
     sideEffects.setChangesStaticProperty();
   }
+  @override
   toString() => 'static store ${element.name}';
+  @override
   accept(HVisitor visitor) => visitor.visitStaticStore(this);
 
+  HInstruction get value => inputs.single;
+
+  @override
   int typeCode() => HInstruction.STATIC_STORE_TYPECODE;
+  @override
   bool typeEquals(other) => other is HStaticStore;
+  @override
   bool dataEquals(HStaticStore other) => element == other.element;
-  bool isJsStatement() => true;
+  @override
+  bool isJsStatement() => usedBy.isEmpty;
 }
 
 class HLiteralList extends HInstruction {
   HLiteralList(List<HInstruction> inputs, AbstractValue type)
       : super(inputs, type);
+  @override
   toString() => 'literal list';
+  @override
   accept(HVisitor visitor) => visitor.visitLiteralList(this);
 
+  @override
   bool isAllocation(AbstractValueDomain domain) => true;
 }
 
 /// The primitive array indexing operation. Note that this instruction
 /// does not throw because we generate the checks explicitly.
 class HIndex extends HInstruction {
+  @override
   final Selector selector;
   HIndex(HInstruction receiver, HInstruction index, this.selector,
       AbstractValue type)
@@ -2888,7 +3274,9 @@
     setUseGvn();
   }
 
+  @override
   String toString() => 'index operator';
+  @override
   accept(HVisitor visitor) => visitor.visitIndex(this);
 
   HInstruction get receiver => inputs[0];
@@ -2896,21 +3284,29 @@
 
   // Implicit dependency on HBoundsCheck or constraints on index.
   // TODO(27272): Make HIndex dependent on bounds checking.
+  @override
   bool get isMovable => false;
 
+  @override
   HInstruction getDartReceiver(JClosedWorld closedWorld) => receiver;
+  @override
   bool onlyThrowsNSM() => true;
+  @override
   bool canThrow(AbstractValueDomain domain) =>
       receiver.isNull(domain).isPotentiallyTrue;
 
+  @override
   int typeCode() => HInstruction.INDEX_TYPECODE;
+  @override
   bool typeEquals(HInstruction other) => other is HIndex;
+  @override
   bool dataEquals(HIndex other) => true;
 }
 
 /// The primitive array assignment operation. Note that this instruction
 /// does not throw because we generate the checks explicitly.
 class HIndexAssign extends HInstruction {
+  @override
   final Selector selector;
   HIndexAssign(AbstractValueDomain domain, HInstruction receiver,
       HInstruction index, HInstruction value, this.selector)
@@ -2919,7 +3315,9 @@
     sideEffects.clearAllDependencies();
     sideEffects.setChangesIndex();
   }
+  @override
   String toString() => 'index assign operator';
+  @override
   accept(HVisitor visitor) => visitor.visitIndexAssign(this);
 
   HInstruction get receiver => inputs[0];
@@ -2928,10 +3326,14 @@
 
   // Implicit dependency on HBoundsCheck or constraints on index.
   // TODO(27272): Make HIndex dependent on bounds checking.
+  @override
   bool get isMovable => false;
 
+  @override
   HInstruction getDartReceiver(JClosedWorld closedWorld) => receiver;
+  @override
   bool onlyThrowsNSM() => true;
+  @override
   bool canThrow(AbstractValueDomain domain) =>
       receiver.isNull(domain).isPotentiallyTrue;
 }
@@ -2968,9 +3370,10 @@
       HInterceptor interceptor,
       AbstractValue type,
       SourceInformation sourceInformation) {
-    assert(
-        (typeExpression.isFunctionType || typeExpression.isInterfaceType) &&
-            typeExpression.treatAsRaw,
+    // TODO(sigmund): re-add `&& typeExpression.treatAsRaw` or something
+    // equivalent (which started failing once we allowed typeExpressions that
+    // contain type parameters matching the original bounds of the type).
+    assert((typeExpression.isFunctionType || typeExpression.isInterfaceType),
         "Unexpected raw is-test type: $typeExpression");
     return new HIs.internal(typeExpression, [expression, interceptor],
         RAW_CHECK, type, sourceInformation);
@@ -3019,14 +3422,19 @@
   bool get isVariableCheck => kind == VARIABLE_CHECK;
   bool get isCompoundCheck => kind == COMPOUND_CHECK;
 
+  @override
   accept(HVisitor visitor) => visitor.visitIs(this);
 
+  @override
   toString() => "$expression is $typeExpression";
 
+  @override
   int typeCode() => HInstruction.IS_TYPECODE;
 
+  @override
   bool typeEquals(HInstruction other) => other is HIs;
 
+  @override
   bool dataEquals(HIs other) {
     return typeExpression == other.typeExpression && kind == other.kind;
   }
@@ -3045,10 +3453,15 @@
 
   HInstruction get interceptor => inputs[0];
 
+  @override
   accept(HVisitor visitor) => visitor.visitIsViaInterceptor(this);
+  @override
   toString() => "$interceptor is $typeExpression";
+  @override
   int typeCode() => HInstruction.IS_VIA_INTERCEPTOR_TYPECODE;
+  @override
   bool typeEquals(HInstruction other) => other is HIsViaInterceptor;
+  @override
   bool dataEquals(HIs other) {
     return typeExpression == other.typeExpression;
   }
@@ -3066,7 +3479,9 @@
 
   HInstruction get target => inputs.single;
 
+  @override
   accept(HVisitor visitor) => visitor.visitLateValue(this);
+  @override
   toString() => 'HLateValue($target)';
 }
 
@@ -3132,8 +3547,10 @@
 
   HInstruction get typeRepresentation => inputs[1];
 
+  @override
   HInstruction get checkedInput => super.checkedInput;
 
+  @override
   HInstruction convertType(JClosedWorld closedWorld, DartType type, int kind) {
     if (typeExpression == type) {
       // Don't omit a boolean conversion (which doesn't allow `null`) unless
@@ -3154,15 +3571,22 @@
   bool get isCastTypeCheck => kind == CAST_TYPE_CHECK;
   bool get isBooleanConversionCheck => kind == BOOLEAN_CONVERSION_CHECK;
 
+  @override
   accept(HVisitor visitor) => visitor.visitTypeConversion(this);
 
+  @override
   bool isJsStatement() => isControlFlow();
+  @override
   bool isControlFlow() => isArgumentTypeCheck || isReceiverTypeCheck;
 
+  @override
   int typeCode() => HInstruction.TYPE_CONVERSION_TYPECODE;
+  @override
   bool typeEquals(HInstruction other) => other is HTypeConversion;
+  @override
   bool isCodeMotionInvariant() => false;
 
+  @override
   bool dataEquals(HTypeConversion other) {
     return kind == other.kind &&
         typeExpression == other.typeExpression &&
@@ -3209,6 +3633,7 @@
     return abstractValueDomain.isIn(inputType, checkedType).isDefinitelyTrue;
   }
 
+  @override
   String toString() => 'HTypeConversion(type=$typeExpression, kind=$kind, '
       '${hasTypeRepresentation ? 'representation=$typeRepresentation, ' : ''}'
       'checkedInput=$checkedInput)';
@@ -3230,22 +3655,32 @@
         this._isMovable = true,
         super(<HInstruction>[input, witness], knownType);
 
+  @override
   toString() => 'TypeKnown $knownType';
+  @override
   accept(HVisitor visitor) => visitor.visitTypeKnown(this);
 
+  @override
   bool isJsStatement() => false;
+  @override
   bool isControlFlow() => false;
+  @override
   bool canThrow(AbstractValueDomain domain) => false;
 
   bool get isPinned => inputs.length == 1;
 
   HInstruction get witness => inputs.length == 2 ? inputs[1] : null;
 
+  @override
   int typeCode() => HInstruction.TYPE_KNOWN_TYPECODE;
+  @override
   bool typeEquals(HInstruction other) => other is HTypeKnown;
+  @override
   bool isCodeMotionInvariant() => true;
+  @override
   bool get isMovable => _isMovable && useGvn();
 
+  @override
   bool dataEquals(HTypeKnown other) {
     return knownType == other.knownType &&
         instructionType == other.instructionType;
@@ -3267,8 +3702,10 @@
     sourceElement = input.sourceElement;
   }
 
+  @override
   bool get isMovable => false;
 
+  @override
   accept(HVisitor visitor) => visitor.visitRangeConversion(this);
 }
 
@@ -3284,7 +3721,9 @@
   HInstruction get left => inputs[0];
   HInstruction get right => inputs[1];
 
+  @override
   accept(HVisitor visitor) => visitor.visitStringConcat(this);
+  @override
   toString() => "string concat";
 }
 
@@ -3297,7 +3736,9 @@
     sideEffects.setDependsOnSomething();
   }
 
+  @override
   accept(HVisitor visitor) => visitor.visitStringify(this);
+  @override
   toString() => "stringify";
 }
 
@@ -3361,11 +3802,13 @@
 
 /// Information about a statement-like structure.
 abstract class HStatementInformation extends HBlockInformation {
+  @override
   bool accept(HStatementInformationVisitor visitor);
 }
 
 /// Information about an expression-like structure.
 abstract class HExpressionInformation extends HBlockInformation {
+  @override
   bool accept(HExpressionInformationVisitor visitor);
   HInstruction get conditionExpression;
 }
@@ -3396,9 +3839,12 @@
   final SubGraph subGraph;
   HSubGraphBlockInformation(this.subGraph);
 
+  @override
   HBasicBlock get start => subGraph.start;
+  @override
   HBasicBlock get end => subGraph.end;
 
+  @override
   bool accept(HStatementInformationVisitor visitor) =>
       visitor.visitSubGraphInfo(this);
 }
@@ -3409,11 +3855,15 @@
   final SubExpression subExpression;
   HSubExpressionBlockInformation(this.subExpression);
 
+  @override
   HBasicBlock get start => subExpression.start;
+  @override
   HBasicBlock get end => subExpression.end;
 
+  @override
   HInstruction get conditionExpression => subExpression.conditionExpression;
 
+  @override
   bool accept(HExpressionInformationVisitor visitor) =>
       visitor.visitSubExpressionInfo(this);
 }
@@ -3423,9 +3873,12 @@
   final List<HStatementInformation> statements;
   HStatementSequenceInformation(this.statements);
 
+  @override
   HBasicBlock get start => statements[0].start;
+  @override
   HBasicBlock get end => statements.last.end;
 
+  @override
   bool accept(HStatementInformationVisitor visitor) =>
       visitor.visitSequenceInfo(this);
 }
@@ -3445,9 +3898,12 @@
       {this.isContinue: false})
       : this.labels = const <LabelDefinition>[];
 
+  @override
   HBasicBlock get start => body.start;
+  @override
   HBasicBlock get end => body.end;
 
+  @override
   bool accept(HStatementInformationVisitor visitor) =>
       visitor.visitLabeledBlockInfo(this);
 }
@@ -3475,6 +3931,7 @@
         (kind == DO_WHILE_LOOP ? body.start : condition.start).isLoopHeader());
   }
 
+  @override
   HBasicBlock get start {
     if (initializer != null) return initializer.start;
     if (kind == DO_WHILE_LOOP) {
@@ -3487,6 +3944,7 @@
     return kind == DO_WHILE_LOOP ? body.start : condition.start;
   }
 
+  @override
   HBasicBlock get end {
     if (updates != null) return updates.end;
     if (kind == DO_WHILE_LOOP && condition != null) {
@@ -3495,6 +3953,7 @@
     return body.end;
   }
 
+  @override
   bool accept(HStatementInformationVisitor visitor) =>
       visitor.visitLoopInfo(this);
 }
@@ -3505,9 +3964,12 @@
   final HStatementInformation elseGraph;
   HIfBlockInformation(this.condition, this.thenGraph, this.elseGraph);
 
+  @override
   HBasicBlock get start => condition.start;
+  @override
   HBasicBlock get end => elseGraph == null ? thenGraph.end : elseGraph.end;
 
+  @override
   bool accept(HStatementInformationVisitor visitor) =>
       visitor.visitIfInfo(this);
 }
@@ -3518,14 +3980,18 @@
   final HExpressionInformation right;
   HAndOrBlockInformation(this.isAnd, this.left, this.right);
 
+  @override
   HBasicBlock get start => left.start;
+  @override
   HBasicBlock get end => right.end;
 
   // We don't currently use HAndOrBlockInformation.
+  @override
   HInstruction get conditionExpression {
     return null;
   }
 
+  @override
   bool accept(HExpressionInformationVisitor visitor) =>
       visitor.visitAndOrInfo(this);
 }
@@ -3538,10 +4004,13 @@
   HTryBlockInformation(
       this.body, this.catchVariable, this.catchBlock, this.finallyBlock);
 
+  @override
   HBasicBlock get start => body.start;
+  @override
   HBasicBlock get end =>
       finallyBlock == null ? catchBlock.end : finallyBlock.end;
 
+  @override
   bool accept(HStatementInformationVisitor visitor) =>
       visitor.visitTryInfo(this);
 }
@@ -3556,13 +4025,16 @@
   HSwitchBlockInformation(this.expression, this.statements, this.target,
       this.labels, this.sourceInformation);
 
+  @override
   HBasicBlock get start => expression.start;
+  @override
   HBasicBlock get end {
     // We don't create a switch block if there are no cases.
     assert(!statements.isEmpty);
     return statements.last.end;
   }
 
+  @override
   bool accept(HStatementInformationVisitor visitor) =>
       visitor.visitSwitchInfo(this);
 }
@@ -3574,13 +4046,18 @@
     setUseGvn();
   }
 
+  @override
   accept(HVisitor visitor) => visitor.visitTypeInfoReadRaw(this);
 
+  @override
   bool canThrow(AbstractValueDomain domain) => false;
 
+  @override
   int typeCode() => HInstruction.TYPE_INFO_READ_RAW_TYPECODE;
+  @override
   bool typeEquals(HInstruction other) => other is HTypeInfoReadRaw;
 
+  @override
   bool dataEquals(HTypeInfoReadRaw other) {
     return true;
   }
@@ -3615,17 +4092,23 @@
 
   HInstruction get object => inputs.last;
 
+  @override
   accept(HVisitor visitor) => visitor.visitTypeInfoReadVariable(this);
 
+  @override
   bool canThrow(AbstractValueDomain domain) => false;
 
+  @override
   int typeCode() => HInstruction.TYPE_INFO_READ_VARIABLE_TYPECODE;
+  @override
   bool typeEquals(HInstruction other) => other is HTypeInfoReadVariable;
 
+  @override
   bool dataEquals(HTypeInfoReadVariable other) {
     return variable == other.variable;
   }
 
+  @override
   String toString() => 'HTypeInfoReadVariable($variable)';
 }
 
@@ -3695,17 +4178,23 @@
     setUseGvn();
   }
 
+  @override
   accept(HVisitor visitor) => visitor.visitTypeInfoExpression(this);
 
+  @override
   bool canThrow(AbstractValueDomain domain) => false;
 
+  @override
   int typeCode() => HInstruction.TYPE_INFO_EXPRESSION_TYPECODE;
+  @override
   bool typeEquals(HInstruction other) => other is HTypeInfoExpression;
 
+  @override
   bool dataEquals(HTypeInfoExpression other) {
     return kind == other.kind && dartType == other.dartType;
   }
 
+  @override
   String toString() => 'HTypeInfoExpression($kindAsString, $dartType)';
 
   // ignore: MISSING_RETURN
diff --git a/pkg/compiler/lib/src/ssa/optimize.dart b/pkg/compiler/lib/src/ssa/optimize.dart
index 007950f..e584210 100644
--- a/pkg/compiler/lib/src/ssa/optimize.dart
+++ b/pkg/compiler/lib/src/ssa/optimize.dart
@@ -7,14 +7,15 @@
 import '../common/names.dart' show Selectors;
 import '../common/tasks.dart' show CompilerTask;
 import '../compiler.dart' show Compiler;
-import '../constants/constant_system.dart';
+import '../constants/constant_system.dart' as constant_system;
 import '../constants/values.dart';
 import '../common_elements.dart' show JCommonElements;
 import '../elements/entities.dart';
 import '../elements/types.dart';
 import '../inferrer/abstract_value_domain.dart';
 import '../inferrer/types.dart';
-import '../js_backend/allocator_analysis.dart' show JAllocatorAnalysis;
+import '../js_backend/field_analysis.dart'
+    show FieldAnalysisData, JFieldAnalysis;
 import '../js_backend/backend.dart';
 import '../js_backend/native_data.dart' show NativeData;
 import '../js_backend/runtime_types.dart';
@@ -47,6 +48,7 @@
 
   SsaOptimizerTask(this._backend) : super(_backend.compiler.measurer);
 
+  @override
   String get name => 'SSA optimizer';
 
   Compiler get _compiler => _backend.compiler;
@@ -190,6 +192,7 @@
   // strings.
   static const MAX_SHARED_CONSTANT_FOLDED_STRING_LENGTH = 512;
 
+  @override
   final String name = "SsaInstructionSimplifier";
   final GlobalTypeInferenceResults _globalInferenceResults;
   final CompilerOptions _options;
@@ -204,18 +207,18 @@
 
   JCommonElements get commonElements => _closedWorld.commonElements;
 
-  ConstantSystem get constantSystem => _closedWorld.constantSystem;
-
   AbstractValueDomain get _abstractValueDomain =>
       _closedWorld.abstractValueDomain;
 
   NativeData get _nativeData => _closedWorld.nativeData;
 
+  @override
   void visitGraph(HGraph visitee) {
     _graph = visitee;
     visitDominatorTree(visitee);
   }
 
+  @override
   visitBasicBlock(HBasicBlock block) {
     simplifyPhis(block);
     HInstruction instruction = block.first;
@@ -384,6 +387,7 @@
     return true;
   }
 
+  @override
   HInstruction visitInstruction(HInstruction node) {
     return node;
   }
@@ -412,6 +416,7 @@
     }
   }
 
+  @override
   HInstruction visitParameterValue(HParameterValue node) {
     // [HParameterValue]s are either the value of the parameter (in fully SSA
     // converted code), or the mutable variable containing the value (in
@@ -437,6 +442,7 @@
     return node;
   }
 
+  @override
   HInstruction visitBoolify(HBoolify node) {
     List<HInstruction> inputs = node.inputs;
     assert(inputs.length == 1);
@@ -463,6 +469,7 @@
     return node;
   }
 
+  @override
   HInstruction visitNot(HNot node) {
     List<HInstruction> inputs = node.inputs;
     assert(inputs.length == 1);
@@ -477,13 +484,14 @@
     return node;
   }
 
+  @override
   HInstruction visitInvokeUnary(HInvokeUnary node) {
-    HInstruction folded =
-        foldUnary(node.operation(constantSystem), node.operand);
+    HInstruction folded = foldUnary(node.operation(), node.operand);
     return folded != null ? folded : node;
   }
 
-  HInstruction foldUnary(UnaryOperation operation, HInstruction operand) {
+  HInstruction foldUnary(
+      constant_system.UnaryOperation operation, HInstruction operand) {
     if (operand is HConstant) {
       HConstant receiver = operand;
       ConstantValue folded = operation.fold(receiver.constant);
@@ -533,7 +541,7 @@
 
   HInstruction handleInterceptedCall(HInvokeDynamic node) {
     // Try constant folding the instruction.
-    Operation operation = node.specializer.operation(constantSystem);
+    constant_system.Operation operation = node.specializer.operation();
     if (operation != null) {
       HInstruction instruction = node.inputs.length == 2
           ? foldUnary(operation, node.inputs[1])
@@ -689,6 +697,7 @@
     return tagInstruction;
   }
 
+  @override
   HInstruction visitInvokeDynamicMethod(HInvokeDynamicMethod node) {
     propagateConstantValueToUses(node);
     if (node.isInterceptedCall) {
@@ -696,8 +705,8 @@
       if (folded != node) return folded;
     }
 
-    AbstractValue receiverType =
-        node.getDartReceiver(_closedWorld).instructionType;
+    HInstruction receiver = node.getDartReceiver(_closedWorld);
+    AbstractValue receiverType = receiver.instructionType;
     MemberEntity element =
         _closedWorld.locateSingleMember(node.selector, receiverType);
     // TODO(ngeoffray): Also fold if it's a getter or variable.
@@ -734,20 +743,47 @@
       FieldEntity field = element;
       if (!_nativeData.isNativeMember(field) &&
           !node.isCallOnInterceptor(_closedWorld)) {
-        HInstruction receiver = node.getDartReceiver(_closedWorld);
-        AbstractValue type = AbstractValueFactory.inferredTypeForMember(
-            // ignore: UNNECESSARY_CAST
-            field as Entity,
-            _globalInferenceResults);
-        HInstruction load = new HFieldGet(field, receiver, type);
-        node.block.addBefore(node, load);
+        // Insertion point for the closure call.
+        HInstruction insertionPoint = node;
+        HInstruction load;
+        FieldAnalysisData fieldData =
+            _closedWorld.fieldAnalysis.getFieldData(field);
+        if (fieldData.isEffectivelyConstant) {
+          // The field is elided and replace it with its constant value.
+          if (_abstractValueDomain.isNull(receiverType).isPotentiallyTrue) {
+            // The receiver is potentially `null` so we insert a null receiver
+            // guard to trigger a null pointer exception.
+            //
+            // This could be inserted unconditionally and removed by later
+            // optimizations if unnecessary, but performance we do it
+            // conditionally here.
+            // TODO(35996): Replace with null receiver guard instruction.
+            HInstruction dummyGet = new HFieldGet(null, receiver,
+                _abstractValueDomain.dynamicType, node.sourceInformation,
+                isAssignable: false);
+            _log?.registerFieldCall(node, dummyGet);
+            node.block.addBefore(node, dummyGet);
+            insertionPoint = dummyGet;
+          }
+          ConstantValue value = fieldData.constantValue;
+          load = _graph.addConstant(value, _closedWorld,
+              sourceInformation: node.sourceInformation);
+          _log?.registerConstantFieldCall(node, field, load);
+        } else {
+          AbstractValue type = AbstractValueFactory.inferredTypeForMember(
+              field, _globalInferenceResults);
+          load = new HFieldGet(field, receiver, type, node.sourceInformation);
+          _log?.registerFieldCall(node, load);
+          node.block.addBefore(node, load);
+          insertionPoint = load;
+        }
         Selector callSelector = new Selector.callClosureFrom(node.selector);
         List<HInstruction> inputs = <HInstruction>[load]
           ..addAll(node.inputs.skip(node.isInterceptedCall ? 2 : 1));
         HInstruction closureCall = new HInvokeClosure(
             callSelector, inputs, node.instructionType, node.typeArguments)
           ..sourceInformation = node.sourceInformation;
-        node.block.addAfter(load, closureCall);
+        node.block.addAfter(insertionPoint, closureCall);
         return closureCall;
       }
     }
@@ -823,6 +859,7 @@
     return result;
   }
 
+  @override
   HInstruction visitBoundsCheck(HBoundsCheck node) {
     HInstruction index = node.index;
     if (index.isInteger(_abstractValueDomain).isDefinitelyTrue) {
@@ -831,7 +868,7 @@
     if (index.isConstant()) {
       HConstant constantInstruction = index;
       assert(!constantInstruction.constant.isInt);
-      if (!constantSystem.isInt(constantInstruction.constant)) {
+      if (!constant_system.isInt(constantInstruction.constant)) {
         // -0.0 is a double but will pass the runtime integer check.
         node.staticChecks = HBoundsCheck.ALWAYS_FALSE;
       }
@@ -839,8 +876,8 @@
     return node;
   }
 
-  HInstruction foldBinary(
-      BinaryOperation operation, HInstruction left, HInstruction right) {
+  HInstruction foldBinary(constant_system.BinaryOperation operation,
+      HInstruction left, HInstruction right) {
     if (left is HConstant && right is HConstant) {
       HConstant op1 = left;
       HConstant op2 = right;
@@ -850,6 +887,7 @@
     return null;
   }
 
+  @override
   HInstruction visitAdd(HAdd node) {
     HInstruction left = node.left;
     HInstruction right = node.right;
@@ -863,6 +901,7 @@
     return super.visitAdd(node);
   }
 
+  @override
   HInstruction visitMultiply(HMultiply node) {
     HInstruction left = node.left;
     HInstruction right = node.right;
@@ -874,10 +913,11 @@
     return super.visitMultiply(node);
   }
 
+  @override
   HInstruction visitInvokeBinary(HInvokeBinary node) {
     HInstruction left = node.left;
     HInstruction right = node.right;
-    BinaryOperation operation = node.operation(constantSystem);
+    constant_system.BinaryOperation operation = node.operation();
     HConstant folded = foldBinary(operation, left, right);
     if (folded != null) return folded;
     return node;
@@ -892,6 +932,7 @@
     return true;
   }
 
+  @override
   HInstruction visitRelational(HRelational node) {
     if (allUsersAreBoolifies(node)) {
       // TODO(ngeoffray): Call a boolified selector.
@@ -961,6 +1002,7 @@
     return null;
   }
 
+  @override
   HInstruction visitIdentity(HIdentity node) {
     HInstruction newInstruction = handleIdentityCheck(node);
     return newInstruction == null ? super.visitIdentity(node) : newInstruction;
@@ -993,6 +1035,7 @@
     uses.replaceWith(_graph.addConstantBool(value, _closedWorld));
   }
 
+  @override
   HInstruction visitIf(HIf node) {
     HInstruction condition = node.condition;
     if (condition.isConstant()) return node;
@@ -1018,6 +1061,7 @@
     return node;
   }
 
+  @override
   HInstruction visitIs(HIs node) {
     DartType type = node.typeExpression;
 
@@ -1092,6 +1136,7 @@
     return node;
   }
 
+  @override
   HInstruction visitTypeConversion(HTypeConversion node) {
     if (node.isRedundant(_closedWorld)) return node.checkedInput;
 
@@ -1113,6 +1158,7 @@
     return node;
   }
 
+  @override
   HInstruction visitTypeKnown(HTypeKnown node) {
     return node.isRedundant(_closedWorld) ? node.checkedInput : node;
   }
@@ -1126,6 +1172,7 @@
     return member is FieldEntity ? member : null;
   }
 
+  @override
   HInstruction visitFieldGet(HFieldGet node) {
     if (node.isNullCheck) return node;
     var receiver = node.receiver;
@@ -1147,6 +1194,7 @@
     return node;
   }
 
+  @override
   HInstruction visitGetLength(HGetLength node) {
     HInstruction receiver = node.receiver;
     if (_graph.allocatedFixedLists.contains(receiver)) {
@@ -1193,6 +1241,7 @@
     return node;
   }
 
+  @override
   HInstruction visitIndex(HIndex node) {
     if (node.receiver.isConstantList() && node.index.isConstantInteger()) {
       HConstant instruction = node.receiver;
@@ -1208,6 +1257,7 @@
     return node;
   }
 
+  @override
   HInstruction visitInvokeDynamicGetter(HInvokeDynamicGetter node) {
     propagateConstantValueToUses(node);
     if (node.isInterceptedCall) {
@@ -1215,17 +1265,43 @@
       if (folded != node) return folded;
     }
     HInstruction receiver = node.getDartReceiver(_closedWorld);
+    AbstractValue receiverType = receiver.instructionType;
     FieldEntity field = node.element is FieldEntity
         ? node.element
         : findConcreteFieldForDynamicAccess(node, receiver);
     if (field != null) {
-      HFieldGet result = _directFieldGet(receiver, field, node);
-      _log?.registerFieldGet(node, result);
-      return result;
+      FieldAnalysisData fieldData =
+          _closedWorld.fieldAnalysis.getFieldData(field);
+      if (fieldData.isEffectivelyConstant) {
+        // The field is elided and replace it with its constant value.
+        if (_abstractValueDomain.isNull(receiverType).isPotentiallyTrue) {
+          // The receiver is potentially `null` so we insert a null receiver
+          // guard to trigger a null pointer exception.
+          //
+          // This could be inserted unconditionally and removed by later
+          // optimizations if unnecessary, but performance we do it
+          // conditionally here.
+          // TODO(35996): Replace with null receiver guard instruction.
+          HInstruction dummyGet = new HFieldGet(null, receiver,
+              _abstractValueDomain.dynamicType, node.sourceInformation,
+              isAssignable: false);
+          _log?.registerFieldGet(node, dummyGet);
+          node.block.addBefore(node, dummyGet);
+        }
+        ConstantValue constant = fieldData.constantValue;
+        HConstant result = _graph.addConstant(constant, _closedWorld,
+            sourceInformation: node.sourceInformation);
+        _log?.registerConstantFieldGet(node, field, result);
+        return result;
+      } else {
+        HFieldGet result = _directFieldGet(receiver, field, node);
+        _log?.registerFieldGet(node, result);
+        return result;
+      }
     }
 
-    node.element ??= _closedWorld.locateSingleMember(
-        node.selector, receiver.instructionType);
+    node.element ??=
+        _closedWorld.locateSingleMember(node.selector, receiverType);
     if (node.element != null &&
         node.element.name == node.selector.name &&
         node.element.isFunction) {
@@ -1256,10 +1332,11 @@
           field, _globalInferenceResults);
     }
 
-    return new HFieldGet(field, receiver, type, isAssignable: isAssignable)
-      ..sourceInformation = node.sourceInformation;
+    return new HFieldGet(field, receiver, type, node.sourceInformation,
+        isAssignable: isAssignable);
   }
 
+  @override
   HInstruction visitInvokeDynamicSetter(HInvokeDynamicSetter node) {
     if (node.isInterceptedCall) {
       HInstruction folded = handleInterceptedCall(node);
@@ -1292,7 +1369,7 @@
         value = other;
       }
     }
-    if (_closedWorld.elidedFields.contains(field)) {
+    if (_closedWorld.fieldAnalysis.getFieldData(field).isElided) {
       _log?.registerFieldSet(node);
       return value;
     } else {
@@ -1304,6 +1381,7 @@
     }
   }
 
+  @override
   HInstruction visitInvokeClosure(HInvokeClosure node) {
     HInstruction closure = node.getDartReceiver(_closedWorld);
 
@@ -1326,6 +1404,7 @@
     return node;
   }
 
+  @override
   HInstruction visitInvokeStatic(HInvokeStatic node) {
     propagateConstantValueToUses(node);
     MemberEntity element = node.element;
@@ -1426,6 +1505,7 @@
     return source;
   }
 
+  @override
   HInstruction visitStringConcat(HStringConcat node) {
     // Simplify string concat:
     //
@@ -1466,13 +1546,14 @@
     }
 
     HInstruction folded = _graph.addConstant(
-        constantSystem
+        constant_system
             .createString(leftString.stringValue + rightString.stringValue),
         _closedWorld);
     if (prefix == null) return folded;
     return new HStringConcat(prefix, folded, _abstractValueDomain.stringType);
   }
 
+  @override
   HInstruction visitStringify(HStringify node) {
     HInstruction input = node.inputs[0];
     if (input.isString(_abstractValueDomain).isDefinitelyTrue) {
@@ -1480,7 +1561,7 @@
     }
 
     HInstruction asString(String string) =>
-        _graph.addConstant(constantSystem.createString(string), _closedWorld);
+        _graph.addConstant(constant_system.createString(string), _closedWorld);
 
     HInstruction tryConstant() {
       if (!input.isConstant()) return null;
@@ -1550,6 +1631,7 @@
     return tryConstant() ?? tryToString() ?? node;
   }
 
+  @override
   HInstruction visitOneShotInterceptor(HOneShotInterceptor node) {
     return handleInterceptedCall(node);
   }
@@ -1563,6 +1645,7 @@
     });
   }
 
+  @override
   HInstruction visitTypeInfoExpression(HTypeInfoExpression node) {
     // Identify the case where the type info expression would be of the form:
     //
@@ -1621,6 +1704,7 @@
     return tryCopyInfo() ?? node;
   }
 
+  @override
   HInstruction visitTypeInfoReadVariable(HTypeInfoReadVariable node) {
     TypeVariableType variable = node.variable;
     ClassEntity contextClass = variable.element.typeDeclaration;
@@ -1758,6 +1842,7 @@
   final Set<HInstruction> boundsChecked;
   final bool trustPrimitives;
   final JClosedWorld closedWorld;
+  @override
   final String name = "SsaCheckInserter";
   HGraph graph;
 
@@ -1766,6 +1851,7 @@
   AbstractValueDomain get _abstractValueDomain =>
       closedWorld.abstractValueDomain;
 
+  @override
   void visitGraph(HGraph graph) {
     this.graph = graph;
 
@@ -1777,6 +1863,7 @@
     visitDominatorTree(graph);
   }
 
+  @override
   void visitBasicBlock(HBasicBlock block) {
     HInstruction instruction = block.first;
     while (instruction != null) {
@@ -1814,18 +1901,21 @@
     return check;
   }
 
+  @override
   void visitIndex(HIndex node) {
     if (boundsChecked.contains(node)) return;
     HInstruction index = node.index;
     index = insertBoundsCheck(node, node.receiver, index);
   }
 
+  @override
   void visitIndexAssign(HIndexAssign node) {
     if (boundsChecked.contains(node)) return;
     HInstruction index = node.index;
     index = insertBoundsCheck(node, node.receiver, index);
   }
 
+  @override
   void visitInvokeDynamicMethod(HInvokeDynamicMethod node) {
     MemberEntity element = node.element;
     if (node.isInterceptedCall) return;
@@ -1842,6 +1932,7 @@
 }
 
 class SsaDeadCodeEliminator extends HGraphVisitor implements OptimizationPhase {
+  @override
   final String name = "SsaDeadCodeEliminator";
 
   final JClosedWorld closedWorld;
@@ -1966,6 +2057,7 @@
     return true;
   }
 
+  @override
   void visitGraph(HGraph graph) {
     _graph = graph;
     analyzer = new SsaLiveBlockAnalyzer(graph, closedWorld, optimizer);
@@ -1974,6 +2066,7 @@
     cleanPhis();
   }
 
+  @override
   void visitBasicBlock(HBasicBlock block) {
     bool isDeadBlock = analyzer.isDeadBlock(block);
     block.isLive = !isDeadBlock;
@@ -2195,10 +2288,12 @@
     }
   }
 
+  @override
   void visitControlFlow(HControlFlow instruction) {
     instruction.block.successors.forEach(markBlockLive);
   }
 
+  @override
   void visitIf(HIf instruction) {
     HInstruction condition = instruction.condition;
     if (condition.isConstant()) {
@@ -2212,6 +2307,7 @@
     }
   }
 
+  @override
   void visitSwitch(HSwitch node) {
     if (node.expression.isInteger(_abstractValueDomain).isDefinitelyTrue) {
       Range switchRange = ranges[node.expression];
@@ -2244,8 +2340,10 @@
 }
 
 class SsaDeadPhiEliminator implements OptimizationPhase {
+  @override
   final String name = "SsaDeadPhiEliminator";
 
+  @override
   void visitGraph(HGraph graph) {
     final List<HPhi> worklist = <HPhi>[];
     // A set to keep track of the live phis that we found.
@@ -2301,8 +2399,10 @@
 }
 
 class SsaRedundantPhiEliminator implements OptimizationPhase {
+  @override
   final String name = "SsaRedundantPhiEliminator";
 
+  @override
   void visitGraph(HGraph graph) {
     final List<HPhi> worklist = <HPhi>[];
 
@@ -2360,6 +2460,7 @@
 
 class SsaGlobalValueNumberer implements OptimizationPhase {
   final AbstractValueDomain _abstractValueDomain;
+  @override
   final String name = "SsaGlobalValueNumberer";
   final Set<int> visited;
 
@@ -2368,6 +2469,7 @@
 
   SsaGlobalValueNumberer(this._abstractValueDomain) : visited = new Set<int>();
 
+  @override
   void visitGraph(HGraph graph) {
     computeChangesFlags(graph);
     moveLoopInvariantCode(graph);
@@ -2583,6 +2685,7 @@
 class SsaCodeMotion extends HBaseVisitor implements OptimizationPhase {
   final AbstractValueDomain _abstractValueDomain;
 
+  @override
   final String name = "SsaCodeMotion";
 
   bool movedCode = false;
@@ -2590,6 +2693,7 @@
 
   SsaCodeMotion(this._abstractValueDomain);
 
+  @override
   void visitGraph(HGraph graph) {
     values = new List<ValueSet>(graph.blocks.length);
     for (int i = 0; i < graph.blocks.length; i++) {
@@ -2598,6 +2702,7 @@
     visitPostDominatorTree(graph);
   }
 
+  @override
   void visitBasicBlock(HBasicBlock block) {
     List<HBasicBlock> successors = block.successors;
 
@@ -2687,6 +2792,7 @@
 
 class SsaTypeConversionInserter extends HBaseVisitor
     implements OptimizationPhase {
+  @override
   final String name = "SsaTypeconversionInserter";
   final JClosedWorld closedWorld;
 
@@ -2695,6 +2801,7 @@
   AbstractValueDomain get _abstractValueDomain =>
       closedWorld.abstractValueDomain;
 
+  @override
   void visitGraph(HGraph graph) {
     visitDominatorTree(graph);
   }
@@ -2724,6 +2831,7 @@
     dominatedUses.replaceWith(newInput);
   }
 
+  @override
   void visitIs(HIs instruction) {
     DartType type = instruction.typeExpression;
     if (!instruction.isRawCheck) {
@@ -2754,6 +2862,7 @@
     // false. Avoid strengthening to `null`.
   }
 
+  @override
   void visitIdentity(HIdentity instruction) {
     // At HIf(HIdentity(x, null)) strengthens x to non-null on else branch.
     HInstruction left = instruction.left;
@@ -2832,7 +2941,8 @@
 class SsaLoadElimination extends HBaseVisitor implements OptimizationPhase {
   final Compiler compiler;
   final JClosedWorld closedWorld;
-  final JAllocatorAnalysis _allocatorAnalysis;
+  final JFieldAnalysis _fieldAnalysis;
+  @override
   final String name = "SsaLoadElimination";
   MemorySet memorySet;
   List<MemorySet> memories;
@@ -2840,11 +2950,12 @@
   HGraph _graph;
 
   SsaLoadElimination(this.compiler, this.closedWorld)
-      : _allocatorAnalysis = closedWorld.allocatorAnalysis;
+      : _fieldAnalysis = closedWorld.fieldAnalysis;
 
   AbstractValueDomain get _abstractValueDomain =>
       closedWorld.abstractValueDomain;
 
+  @override
   void visitGraph(HGraph graph) {
     _graph = graph;
     memories = new List<MemorySet>(graph.blocks.length);
@@ -2863,6 +2974,7 @@
     }
   }
 
+  @override
   void visitBasicBlock(HBasicBlock block) {
     if (block.predecessors.length == 0) {
       // Entry block.
@@ -2905,6 +3017,7 @@
     }
   }
 
+  @override
   void visitFieldGet(HFieldGet instruction) {
     if (instruction.isNullCheck) return;
     FieldEntity element = instruction.element;
@@ -2912,6 +3025,7 @@
     _visitFieldGet(element, receiver, instruction);
   }
 
+  @override
   void visitGetLength(HGetLength instruction) {
     HInstruction receiver = instruction.receiver.nonCheck();
     HInstruction existing =
@@ -2937,6 +3051,7 @@
     }
   }
 
+  @override
   void visitFieldSet(HFieldSet instruction) {
     FieldEntity element = instruction.element;
     HInstruction receiver = instruction.getDartReceiver(closedWorld).nonCheck();
@@ -2946,6 +3061,7 @@
     }
   }
 
+  @override
   void visitCreate(HCreate instruction) {
     memorySet.registerAllocation(instruction);
     if (shouldTrackInitialValues(instruction)) {
@@ -2956,9 +3072,10 @@
         if (compiler.elementHasCompileTimeError(
             // ignore: UNNECESSARY_CAST
             member as Entity)) return;
-        if (_allocatorAnalysis.isInitializedInAllocator(member)) {
+        FieldAnalysisData fieldData = _fieldAnalysis.getFieldData(member);
+        if (fieldData.isInitializedInAllocator) {
           // TODO(sra): Can we avoid calling HGraph.addConstant?
-          ConstantValue value = _allocatorAnalysis.initializerValue(member);
+          ConstantValue value = fieldData.initialValue;
           HConstant constant = _graph.addConstant(value, closedWorld);
           memorySet.registerFieldValue(member, instruction, constant);
         } else {
@@ -3010,6 +3127,7 @@
     return interestingUse(instruction, 0);
   }
 
+  @override
   void visitInstruction(HInstruction instruction) {
     if (instruction.isAllocation(_abstractValueDomain)) {
       memorySet.registerAllocation(instruction);
@@ -3017,6 +3135,7 @@
     memorySet.killAffectedBy(instruction);
   }
 
+  @override
   void visitLazyStatic(HLazyStatic instruction) {
     FieldEntity field = instruction.element;
     handleStaticLoad(field, instruction);
@@ -3033,10 +3152,12 @@
     }
   }
 
+  @override
   void visitStatic(HStatic instruction) {
     handleStaticLoad(instruction.element, instruction);
   }
 
+  @override
   void visitStaticStore(HStaticStore instruction) {
     if (memorySet.registerFieldValueUpdate(
         instruction.element, null, instruction.inputs.last)) {
@@ -3044,6 +3165,7 @@
     }
   }
 
+  @override
   void visitLiteralList(HLiteralList instruction) {
     memorySet.registerAllocation(instruction);
     memorySet.killAffectedBy(instruction);
@@ -3051,6 +3173,7 @@
     // TODO(sra): Set initial length.
   }
 
+  @override
   void visitIndex(HIndex instruction) {
     HInstruction receiver = instruction.receiver.nonCheck();
     HInstruction existing =
@@ -3064,6 +3187,7 @@
     }
   }
 
+  @override
   void visitIndexAssign(HIndexAssign instruction) {
     HInstruction receiver = instruction.receiver.nonCheck();
     memorySet.registerKeyedValueUpdate(
@@ -3071,20 +3195,35 @@
   }
 
   // Pure operations that do not escape their inputs.
+  @override
   void visitBinaryArithmetic(HBinaryArithmetic instruction) {}
+  @override
   void visitBoundsCheck(HBoundsCheck instruction) {}
+  @override
   void visitConstant(HConstant instruction) {}
+  @override
   void visitIf(HIf instruction) {}
+  @override
   void visitInterceptor(HInterceptor instruction) {}
+  @override
   void visitIs(HIs instruction) {}
+  @override
   void visitIsViaInterceptor(HIsViaInterceptor instruction) {}
+  @override
   void visitNot(HNot instruction) {}
+  @override
   void visitParameterValue(HParameterValue instruction) {}
+  @override
   void visitRelational(HRelational instruction) {}
+  @override
   void visitStringConcat(HStringConcat instruction) {}
+  @override
   void visitTypeKnown(HTypeKnown instruction) {}
+  @override
   void visitTypeInfoReadRaw(HTypeInfoReadRaw instruction) {}
+  @override
   void visitTypeInfoReadVariable(HTypeInfoReadVariable instruction) {}
+  @override
   void visitTypeInfoExpression(HTypeInfoExpression instruction) {}
 }
 
diff --git a/pkg/compiler/lib/src/ssa/ssa.dart b/pkg/compiler/lib/src/ssa/ssa.dart
index 08cda42..cdcc910 100644
--- a/pkg/compiler/lib/src/ssa/ssa.dart
+++ b/pkg/compiler/lib/src/ssa/ssa.dart
@@ -6,11 +6,11 @@
 
 import '../common/codegen.dart' show CodegenWorkItem, CodegenRegistry;
 import '../common/tasks.dart' show CompilerTask, Measurer;
-import '../constants/values.dart';
-import '../elements/entities.dart' show FieldEntity, MemberEntity;
+import '../elements/entities.dart' show MemberEntity;
 import '../inferrer/types.dart';
 import '../io/source_information.dart';
 import '../js/js.dart' as js;
+import '../js_backend/field_analysis.dart';
 import '../js_backend/backend.dart' show JavaScriptBackend, FunctionCompiler;
 import '../universe/call_structure.dart';
 import '../universe/use.dart';
@@ -33,12 +33,14 @@
         optimizer = new SsaOptimizerTask(backend),
         backend = backend;
 
+  @override
   void onCodegenStart() {
     _builder.onCodegenStart();
   }
 
   /// Generates JavaScript code for `work.element`.
-  /// Using the ssa builder, optimizer and codegenerator.
+  /// Using the ssa builder, optimizer and code generator.
+  @override
   js.Fun compile(CodegenWorkItem work, JClosedWorld closedWorld,
       GlobalTypeInferenceResults globalInferenceResults) {
     HGraph graph = _builder.build(work, closedWorld, globalInferenceResults);
@@ -62,6 +64,7 @@
     return result;
   }
 
+  @override
   Iterable<CompilerTask> get tasks {
     return <CompilerTask>[_builder, optimizer, generator];
   }
@@ -82,6 +85,7 @@
   SsaBuilderTask(this._backend, this._sourceInformationFactory)
       : super(_backend.compiler.measurer);
 
+  @override
   String get name => 'SSA builder';
 
   void onCodegenStart() {
@@ -98,8 +102,6 @@
 }
 
 abstract class SsaBuilderFieldMixin {
-  ConstantValue getFieldInitialConstantValue(covariant FieldEntity field);
-
   /// Handle field initializer of [element]. Returns `true` if no code
   /// is needed for the field.
   ///
@@ -112,10 +114,11 @@
   bool handleConstantField(MemberEntity element, CodegenRegistry registry,
       JClosedWorld closedWorld) {
     if (element.isField) {
-      ConstantValue initialValue = getFieldInitialConstantValue(element);
-      if (initialValue != null) {
+      FieldAnalysisData fieldData =
+          closedWorld.fieldAnalysis.getFieldData(element);
+      if (fieldData.initialValue != null) {
         registry.worldImpact
-            .registerConstantUse(new ConstantUse.init(initialValue));
+            .registerConstantUse(new ConstantUse.init(fieldData.initialValue));
         // We don't need to generate code for static or top-level
         // variables. For instance variables, we may need to generate
         // the checked setter.
@@ -124,11 +127,9 @@
           /// constant value.
           return true;
         }
-      } else {
-        // If the constant-handler was not able to produce a result we have to
-        // go through the builder (below) to generate the lazy initializer for
-        // the static variable.
-        // We also need to register the use of the cyclic-error helper.
+      } else if (fieldData.isLazy) {
+        // The generated initializer needs be wrapped in the cyclic-error
+        // helper.
         registry.worldImpact.registerStaticUse(new StaticUse.staticInvoke(
             closedWorld.commonElements.cyclicThrowHelper,
             CallStructure.ONE_ARG));
diff --git a/pkg/compiler/lib/src/ssa/ssa_tracer.dart b/pkg/compiler/lib/src/ssa/ssa_tracer.dart
index ee7bc98..40770be 100644
--- a/pkg/compiler/lib/src/ssa/ssa_tracer.dart
+++ b/pkg/compiler/lib/src/ssa/ssa_tracer.dart
@@ -18,6 +18,7 @@
 class HTracer extends HGraphVisitor with TracerUtil {
   final JClosedWorld closedWorld;
   final Namer namer;
+  @override
   final OutputSink output;
 
   HTracer(this.output, this.closedWorld, this.namer);
@@ -72,6 +73,7 @@
     }
   }
 
+  @override
   void visitBasicBlock(HBasicBlock block) {
     HInstructionStringifier stringifier =
         new HInstructionStringifier(block, closedWorld, namer);
@@ -168,10 +170,12 @@
     return "$prefix${instruction.id}";
   }
 
+  @override
   String visitLateValue(HLateValue node) {
     return "LateValue: ${temporaryId(node.inputs[0])}";
   }
 
+  @override
   String visitBoolify(HBoolify node) {
     return "Boolify: ${temporaryId(node.inputs[0])}";
   }
@@ -182,30 +186,38 @@
     return '$opcode: $left $right';
   }
 
+  @override
   String visitAbs(HAbs node) {
     String operand = temporaryId(node.operand);
     return "Abs: $operand";
   }
 
+  @override
   String visitAdd(HAdd node) => handleInvokeBinary(node, 'Add');
 
+  @override
   String visitBitAnd(HBitAnd node) => handleInvokeBinary(node, 'BitAnd');
 
+  @override
   String visitBitNot(HBitNot node) {
     String operand = temporaryId(node.operand);
     return "BitNot: $operand";
   }
 
+  @override
   String visitBitOr(HBitOr node) => handleInvokeBinary(node, 'BitOr');
 
+  @override
   String visitBitXor(HBitXor node) => handleInvokeBinary(node, 'BitXor');
 
+  @override
   String visitBoundsCheck(HBoundsCheck node) {
     String lengthId = temporaryId(node.length);
     String indexId = temporaryId(node.index);
     return "BoundsCheck: length = $lengthId, index = $indexId";
   }
 
+  @override
   String visitBreak(HBreak node) {
     HBasicBlock target = currentBlock.successors[0];
     if (node.label != null) {
@@ -214,8 +226,10 @@
     return "Break: (B${target.id})";
   }
 
+  @override
   String visitConstant(HConstant constant) => "Constant: ${constant.constant}";
 
+  @override
   String visitContinue(HContinue node) {
     HBasicBlock target = currentBlock.successors[0];
     if (node.label != null) {
@@ -224,18 +238,23 @@
     return "Continue: (B${target.id})";
   }
 
+  @override
   String visitCreate(HCreate node) {
     return handleGenericInvoke("Create", "${node.element.name}", node.inputs);
   }
 
+  @override
   String visitCreateBox(HCreateBox node) {
     return handleGenericInvoke("CreateBox", "", node.inputs);
   }
 
+  @override
   String visitDivide(HDivide node) => handleInvokeBinary(node, 'Divide');
 
+  @override
   String visitExit(HExit node) => "Exit";
 
+  @override
   String visitFieldGet(HFieldGet node) {
     if (node.isNullCheck) {
       return 'FieldGet: NullCheck ${temporaryId(node.receiver)}';
@@ -244,12 +263,14 @@
     return 'FieldGet: ${temporaryId(node.receiver)}.$fieldName';
   }
 
+  @override
   String visitFieldSet(HFieldSet node) {
     String valueId = temporaryId(node.value);
     String fieldName = node.element.name;
     return 'FieldSet: ${temporaryId(node.receiver)}.$fieldName to $valueId';
   }
 
+  @override
   String visitReadModifyWrite(HReadModifyWrite node) {
     String fieldName = node.element.name;
     String receiverId = temporaryId(node.receiver);
@@ -264,33 +285,41 @@
     }
   }
 
+  @override
   String visitGetLength(HGetLength node) {
     return 'GetLength: ${temporaryId(node.receiver)}';
   }
 
+  @override
   String visitLocalGet(HLocalGet node) {
     String localName = node.variable.name;
     return 'LocalGet: ${temporaryId(node.local)}.$localName';
   }
 
+  @override
   String visitLocalSet(HLocalSet node) {
     String valueId = temporaryId(node.value);
     String localName = node.variable.name;
     return 'LocalSet: ${temporaryId(node.local)}.$localName to $valueId';
   }
 
+  @override
   String visitGoto(HGoto node) {
     HBasicBlock target = currentBlock.successors[0];
     return "Goto: (B${target.id})";
   }
 
+  @override
   String visitGreater(HGreater node) => handleInvokeBinary(node, 'Greater');
+  @override
   String visitGreaterEqual(HGreaterEqual node) {
     return handleInvokeBinary(node, 'GreaterEqual');
   }
 
+  @override
   String visitIdentity(HIdentity node) => handleInvokeBinary(node, 'Identity');
 
+  @override
   String visitIf(HIf node) {
     HBasicBlock thenBlock = currentBlock.successors[0];
     HBasicBlock elseBlock = currentBlock.successors[1];
@@ -308,12 +337,14 @@
     return "$invokeType: $functionName($argumentsString)";
   }
 
+  @override
   String visitIndex(HIndex node) {
     String receiver = temporaryId(node.receiver);
     String index = temporaryId(node.index);
     return "Index: $receiver[$index]";
   }
 
+  @override
   String visitIndexAssign(HIndexAssign node) {
     String receiver = temporaryId(node.receiver);
     String index = temporaryId(node.index);
@@ -321,6 +352,7 @@
     return "IndexAssign: $receiver[$index] = $value";
   }
 
+  @override
   String visitInterceptor(HInterceptor node) {
     String value = temporaryId(node.inputs[0]);
     if (node.interceptedClasses != null) {
@@ -330,6 +362,7 @@
     return "Interceptor: $value";
   }
 
+  @override
   String visitInvokeClosure(HInvokeClosure node) =>
       handleInvokeDynamic(node, "InvokeClosure");
 
@@ -342,33 +375,41 @@
     return handleGenericInvoke(kind, target, arguments) + "(${invoke.mask})";
   }
 
+  @override
   String visitInvokeDynamicMethod(HInvokeDynamicMethod node) =>
       handleInvokeDynamic(node, "InvokeDynamicMethod");
+  @override
   String visitInvokeDynamicGetter(HInvokeDynamicGetter node) =>
       handleInvokeDynamic(node, "InvokeDynamicGetter");
+  @override
   String visitInvokeDynamicSetter(HInvokeDynamicSetter node) =>
       handleInvokeDynamic(node, "InvokeDynamicSetter");
 
+  @override
   String visitInvokeStatic(HInvokeStatic invoke) {
     String target = invoke.element.name;
     return handleGenericInvoke("InvokeStatic", target, invoke.inputs);
   }
 
+  @override
   String visitInvokeSuper(HInvokeSuper invoke) {
     String target = invoke.element.name;
     return handleGenericInvoke("InvokeSuper", target, invoke.inputs);
   }
 
+  @override
   String visitInvokeConstructorBody(HInvokeConstructorBody invoke) {
     String target = invoke.element.name;
     return handleGenericInvoke("InvokeConstructorBody", target, invoke.inputs);
   }
 
+  @override
   String visitInvokeGeneratorBody(HInvokeGeneratorBody invoke) {
     String target = invoke.element.name;
     return handleGenericInvoke("InvokeGeneratorBody", target, invoke.inputs);
   }
 
+  @override
   String visitForeignCode(HForeignCode node) {
     var template = node.codeTemplate;
     String code = '${template.ast}';
@@ -376,10 +417,13 @@
     return "ForeignCode: $code ($inputs)";
   }
 
+  @override
   String visitLess(HLess node) => handleInvokeBinary(node, 'Less');
+  @override
   String visitLessEqual(HLessEqual node) =>
       handleInvokeBinary(node, 'LessEqual');
 
+  @override
   String visitLiteralList(HLiteralList node) {
     StringBuffer elementsString = new StringBuffer();
     for (int i = 0; i < node.inputs.length; i++) {
@@ -389,6 +433,7 @@
     return "LiteralList: [$elementsString]";
   }
 
+  @override
   String visitLoopBranch(HLoopBranch branch) {
     HBasicBlock bodyBlock = currentBlock.successors[0];
     HBasicBlock exitBlock = currentBlock.successors[1];
@@ -396,23 +441,29 @@
     return "LoopBranch ($conditionId): (B${bodyBlock.id}) then (B${exitBlock.id})";
   }
 
+  @override
   String visitMultiply(HMultiply node) => handleInvokeBinary(node, 'Multiply');
 
+  @override
   String visitNegate(HNegate node) {
     String operand = temporaryId(node.operand);
     return "Negate: $operand";
   }
 
+  @override
   String visitNot(HNot node) => "Not: ${temporaryId(node.inputs[0])}";
 
+  @override
   String visitParameterValue(HParameterValue node) {
     return "ParameterValue: ${node.sourceElement.name}";
   }
 
+  @override
   String visitLocalValue(HLocalValue node) {
     return "LocalValue: ${node.sourceElement.name}";
   }
 
+  @override
   String visitPhi(HPhi phi) {
     StringBuffer buffer = new StringBuffer();
     buffer.write("Phi: ");
@@ -423,42 +474,54 @@
     return buffer.toString();
   }
 
+  @override
   String visitRef(HRef node) {
     return 'Ref: ${temporaryId(node.value)}';
   }
 
+  @override
   String visitReturn(HReturn node) => "Return: ${temporaryId(node.inputs[0])}";
 
+  @override
   String visitShiftLeft(HShiftLeft node) =>
       handleInvokeBinary(node, 'ShiftLeft');
+  @override
   String visitShiftRight(HShiftRight node) =>
       handleInvokeBinary(node, 'ShiftRight');
 
+  @override
   String visitStatic(HStatic node) => "Static: ${node.element.name}";
 
+  @override
   String visitLazyStatic(HLazyStatic node) =>
       "LazyStatic: ${node.element.name}";
 
+  @override
   String visitOneShotInterceptor(HOneShotInterceptor node) =>
       handleInvokeDynamic(node, "OneShotInterceptor");
 
+  @override
   String visitStaticStore(HStaticStore node) {
     String lhs = node.element.name;
     return "StaticStore: $lhs = ${temporaryId(node.inputs[0])}";
   }
 
+  @override
   String visitStringConcat(HStringConcat node) {
     var leftId = temporaryId(node.left);
     var rightId = temporaryId(node.right);
     return "StringConcat: $leftId + $rightId";
   }
 
+  @override
   String visitStringify(HStringify node) {
     return "Stringify: ${temporaryId(node.inputs[0])}";
   }
 
+  @override
   String visitSubtract(HSubtract node) => handleInvokeBinary(node, 'Subtract');
 
+  @override
   String visitSwitch(HSwitch node) {
     StringBuffer buf = new StringBuffer();
     buf.write("Switch: (");
@@ -475,26 +538,33 @@
     return buf.toString();
   }
 
+  @override
   String visitThis(HThis node) => "This";
 
+  @override
   String visitThrow(HThrow node) => "Throw: ${temporaryId(node.inputs[0])}";
 
+  @override
   String visitThrowExpression(HThrowExpression node) {
     return "ThrowExpression: ${temporaryId(node.inputs[0])}";
   }
 
+  @override
   String visitTruncatingDivide(HTruncatingDivide node) {
     return handleInvokeBinary(node, 'TruncatingDivide');
   }
 
+  @override
   String visitRemainder(HRemainder node) {
     return handleInvokeBinary(node, 'Remainder');
   }
 
+  @override
   String visitExitTry(HExitTry node) {
     return "ExitTry";
   }
 
+  @override
   String visitTry(HTry node) {
     List<HBasicBlock> successors = currentBlock.successors;
     String tryBlock = 'B${successors[0].id}';
@@ -512,16 +582,19 @@
         "Join: B${successors.last.id}";
   }
 
+  @override
   String visitIs(HIs node) {
     String type = node.typeExpression.toString();
     return "Is: ${temporaryId(node.expression)} is $type";
   }
 
+  @override
   String visitIsViaInterceptor(HIsViaInterceptor node) {
     String type = node.typeExpression.toString();
     return "IsViaInterceptor: ${temporaryId(node.inputs[0])} is $type";
   }
 
+  @override
   String visitTypeConversion(HTypeConversion node) {
     String checkedInput = temporaryId(node.checkedInput);
     String rest;
@@ -551,6 +624,7 @@
     return '?';
   }
 
+  @override
   String visitTypeKnown(HTypeKnown node) {
     assert(node.inputs.length <= 2);
     String result =
@@ -561,30 +635,36 @@
     return result;
   }
 
+  @override
   String visitRangeConversion(HRangeConversion node) {
     return "RangeConversion: ${node.checkedInput}";
   }
 
+  @override
   String visitTypeInfoReadRaw(HTypeInfoReadRaw node) {
     var inputs = node.inputs.map(temporaryId).join(', ');
     return "TypeInfoReadRaw: $inputs";
   }
 
+  @override
   String visitTypeInfoReadVariable(HTypeInfoReadVariable node) {
     var inputs = node.inputs.map(temporaryId).join(', ');
     return "TypeInfoReadVariable: ${node.variable}  $inputs";
   }
 
+  @override
   String visitTypeInfoExpression(HTypeInfoExpression node) {
     var inputs = node.inputs.map(temporaryId).join(', ');
     return "TypeInfoExpression: ${node.kindAsString} ${node.dartType}"
         " ($inputs)";
   }
 
+  @override
   String visitAwait(HAwait node) {
     return "Await: ${temporaryId(node.inputs[0])}";
   }
 
+  @override
   String visitYield(HYield node) {
     return "Yield${node.hasStar ? "*" : ""}: ${temporaryId(node.inputs[0])}";
   }
diff --git a/pkg/compiler/lib/src/ssa/switch_continue_analysis.dart b/pkg/compiler/lib/src/ssa/switch_continue_analysis.dart
index 1efc255..bebc7e6 100644
--- a/pkg/compiler/lib/src/ssa/switch_continue_analysis.dart
+++ b/pkg/compiler/lib/src/ssa/switch_continue_analysis.dart
@@ -10,6 +10,7 @@
     return switchCaseBody.accept(new SwitchContinueAnalysis._());
   }
 
+  @override
   bool visitContinueSwitchStatement(ir.ContinueSwitchStatement continueStmt) {
     // TODO(efortuna): Check what the target of this continue statement actually
     // IS, because depending on where the label points if we have a nested
@@ -18,6 +19,7 @@
     return true;
   }
 
+  @override
   bool visitBlock(ir.Block block) {
     for (ir.Statement statement in block.statements) {
       if (statement.accept(this)) {
@@ -27,22 +29,27 @@
     return false;
   }
 
+  @override
   bool visitLabeledStatement(ir.LabeledStatement statement) {
     return statement.body.accept(this);
   }
 
+  @override
   bool visitDoStatement(ir.DoStatement doStatement) {
     return doStatement.body.accept(this);
   }
 
+  @override
   bool visitForStatement(ir.ForStatement forStatement) {
     return forStatement.body.accept(this);
   }
 
+  @override
   bool visitForInStatement(ir.ForInStatement forInStatement) {
     return forInStatement.body.accept(this);
   }
 
+  @override
   bool visitSwitchStatement(ir.SwitchStatement switchStatement) {
     for (var switchCase in switchStatement.cases) {
       if (switchCase.accept(this)) {
@@ -52,15 +59,18 @@
     return false;
   }
 
+  @override
   bool visitSwitchCase(ir.SwitchCase switchCase) {
     return switchCase.body.accept(this);
   }
 
+  @override
   bool visitIfStatement(ir.IfStatement ifStatement) {
     return ifStatement.then.accept(this) ||
         (ifStatement.otherwise != null && ifStatement.otherwise.accept(this));
   }
 
+  @override
   bool visitTryCatch(ir.TryCatch tryCatch) {
     if (tryCatch.body.accept(this)) {
       for (var catchStatement in tryCatch.catches) {
@@ -72,26 +82,32 @@
     return false;
   }
 
+  @override
   bool visitWhileStatement(ir.WhileStatement statement) {
     return statement.body.accept(this);
   }
 
+  @override
   bool visitCatch(ir.Catch catchStatement) {
     return catchStatement.body.accept(this);
   }
 
+  @override
   bool visitTryFinally(ir.TryFinally tryFinally) {
     return tryFinally.body.accept(this) && tryFinally.finalizer.accept(this);
   }
 
+  @override
   bool visitFunctionDeclaration(ir.FunctionDeclaration declaration) {
     return declaration.function.accept(this);
   }
 
+  @override
   bool visitFunctionNode(ir.FunctionNode node) {
     return node.body.accept(this);
   }
 
+  @override
   bool defaultStatement(ir.Statement node) {
     if (node is ir.ExpressionStatement ||
         node is ir.EmptyStatement ||
@@ -106,5 +122,6 @@
         'SwitchContinueAnalysis';
   }
 
+  @override
   bool defaultNode(ir.Node node) => false;
 }
diff --git a/pkg/compiler/lib/src/ssa/type_builder.dart b/pkg/compiler/lib/src/ssa/type_builder.dart
index 9ba2e51..bb7e4ed 100644
--- a/pkg/compiler/lib/src/ssa/type_builder.dart
+++ b/pkg/compiler/lib/src/ssa/type_builder.dart
@@ -122,6 +122,20 @@
     return checkedOrTrusted;
   }
 
+  HInstruction potentiallyCheckOrTrustTypeOfCondition(HInstruction original) {
+    DartType boolType = builder.commonElements.boolType;
+    HInstruction checkedOrTrusted = original;
+    if (builder.options.conditionCheckPolicy.isTrusted) {
+      checkedOrTrusted = _trustType(original, boolType);
+    } else if (builder.options.conditionCheckPolicy.isEmitted) {
+      checkedOrTrusted = _checkType(
+          original, boolType, HTypeConversion.BOOLEAN_CONVERSION_CHECK);
+    }
+    if (checkedOrTrusted == original) return original;
+    builder.add(checkedOrTrusted);
+    return checkedOrTrusted;
+  }
+
   ClassTypeVariableAccess computeTypeVariableAccess(MemberEntity member);
 
   /// Helper to create an instruction that gets the value of a type variable.
diff --git a/pkg/compiler/lib/src/ssa/types_propagation.dart b/pkg/compiler/lib/src/ssa/types_propagation.dart
index 8199ed4..e716108 100644
--- a/pkg/compiler/lib/src/ssa/types_propagation.dart
+++ b/pkg/compiler/lib/src/ssa/types_propagation.dart
@@ -41,6 +41,7 @@
   final CommonElements commonElements;
   final JClosedWorld closedWorld;
   final OptimizationTestLog _log;
+  @override
   String get name => 'SsaTypePropagator';
 
   SsaTypePropagator(this.results, this.options, this.commonElements,
@@ -66,11 +67,13 @@
     return oldType != newType;
   }
 
+  @override
   void visitGraph(HGraph graph) {
     visitDominatorTree(graph);
     processWorklist();
   }
 
+  @override
   visitBasicBlock(HBasicBlock block) {
     if (block.isLoopHeader()) {
       block.forEachPhi((HPhi phi) {
@@ -129,6 +132,7 @@
     }
   }
 
+  @override
   AbstractValue visitBinaryArithmetic(HBinaryArithmetic instruction) {
     HInstruction left = instruction.left;
     HInstruction right = instruction.right;
@@ -152,29 +156,35 @@
     return visitBinaryArithmetic(instruction);
   }
 
+  @override
   AbstractValue visitMultiply(HMultiply instruction) {
     return checkPositiveInteger(instruction);
   }
 
+  @override
   AbstractValue visitAdd(HAdd instruction) {
     return checkPositiveInteger(instruction);
   }
 
+  @override
   AbstractValue visitDivide(HDivide instruction) {
     // Always double, as initialized.
     return instruction.instructionType;
   }
 
+  @override
   AbstractValue visitTruncatingDivide(HTruncatingDivide instruction) {
     // Always as initialized.
     return instruction.instructionType;
   }
 
+  @override
   AbstractValue visitRemainder(HRemainder instruction) {
     // Always as initialized.
     return instruction.instructionType;
   }
 
+  @override
   AbstractValue visitNegate(HNegate instruction) {
     HInstruction operand = instruction.operand;
     // We have integer subclasses that represent ranges, so widen any int
@@ -185,16 +195,19 @@
     return instruction.operand.instructionType;
   }
 
+  @override
   AbstractValue visitAbs(HAbs instruction) {
     // TODO(sra): Can narrow to non-negative type for integers.
     return instruction.operand.instructionType;
   }
 
+  @override
   AbstractValue visitInstruction(HInstruction instruction) {
     assert(instruction.instructionType != null);
     return instruction.instructionType;
   }
 
+  @override
   AbstractValue visitPhi(HPhi phi) {
     AbstractValue candidateType = abstractValueDomain.emptyType;
     for (int i = 0, length = phi.inputs.length; i < length; i++) {
@@ -204,6 +217,7 @@
     return candidateType;
   }
 
+  @override
   AbstractValue visitTypeConversion(HTypeConversion instruction) {
     HInstruction input = instruction.checkedInput;
     AbstractValue inputType = input.instructionType;
@@ -261,6 +275,7 @@
     return outputType;
   }
 
+  @override
   AbstractValue visitTypeKnown(HTypeKnown instruction) {
     HInstruction input = instruction.checkedInput;
     AbstractValue inputType = input.instructionType;
@@ -392,6 +407,7 @@
     });
   }
 
+  @override
   AbstractValue visitInvokeDynamic(HInvokeDynamic instruction) {
     if (instruction.isInterceptedCall) {
       // We cannot do the following optimization now, because we have to wait
@@ -422,22 +438,10 @@
     AbstractValue receiverType = receiver.instructionType;
     instruction.mask = receiverType;
 
-    // Try to specialize the receiver after this call by inserting a refinement
-    // node (HTypeKnown). There are two potentially expensive tests - are there
-    // any uses of the receiver dominated by and following this call?, and what
-    // is the refined type? The first is expensive if the receiver has many
-    // uses, the second is expensive if many classes implement the selector. So
-    // we try to do the least expensive test first.
-    const int _MAX_QUICK_USERS = 50;
-    if (!instruction.selector.isClosureCall) {
-      AbstractValue newType;
-      AbstractValue computeNewType() {
-        newType = closedWorld.computeReceiverType(
-            instruction.selector, instruction.mask);
-        newType = abstractValueDomain.intersection(newType, receiverType);
-        return newType;
-      }
-
+    // Try to refine that the receiver is not null after this call by inserting
+    // a refinement node (HTypeKnown).
+    var selector = instruction.selector;
+    if (!selector.isClosureCall && !selector.appliesToNullWithoutThrow()) {
       var next = instruction.next;
       if (next is HTypeKnown && next.checkedInput == receiver) {
         // On a previous pass or iteration we already refined [receiver] by
@@ -445,23 +449,18 @@
         // uses with the refinement. We update the type of the [HTypeKnown]
         // instruction because it may have been refined with a correct type at
         // the time, but incorrect now.
-        if (next.instructionType != computeNewType()) {
+        AbstractValue newType = abstractValueDomain.excludeNull(receiverType);
+        if (next.instructionType != newType) {
           next.knownType = next.instructionType = newType;
           addDependentInstructionsToWorkList(next);
         }
-      } else {
-        DominatedUses uses;
-        bool hasCandidates() {
-          uses =
-              DominatedUses.of(receiver, instruction, excludeDominator: true);
-          return uses.isNotEmpty;
-        }
-
-        if ((receiver.usedBy.length <= _MAX_QUICK_USERS)
-            ? (hasCandidates() && computeNewType() != receiverType)
-            : (computeNewType() != receiverType && hasCandidates())) {
+      } else if (abstractValueDomain.isNull(receiverType).isPotentiallyTrue) {
+        DominatedUses uses =
+            DominatedUses.of(receiver, instruction, excludeDominator: true);
+        if (uses.isNotEmpty) {
           // Insert a refinement node after the call and update all users
           // dominated by the call to use that node instead of [receiver].
+          AbstractValue newType = abstractValueDomain.excludeNull(receiverType);
           HTypeKnown converted =
               new HTypeKnown.witnessed(newType, receiver, instruction);
           instruction.block.addBefore(instruction.next, converted);
diff --git a/pkg/compiler/lib/src/ssa/validate.dart b/pkg/compiler/lib/src/ssa/validate.dart
index 1f93b4e..74a852a 100644
--- a/pkg/compiler/lib/src/ssa/validate.dart
+++ b/pkg/compiler/lib/src/ssa/validate.dart
@@ -20,6 +20,7 @@
 
   // Note that during construction of the Ssa graph the basic blocks are
   // not required to be valid yet.
+  @override
   void visitBasicBlock(HBasicBlock block) {
     currentBlock = block;
     if (!isValid) return; // Don't need to continue if we are already invalid.
@@ -164,6 +165,7 @@
     return true;
   }
 
+  @override
   void visitInstruction(HInstruction instruction) {
     // Verifies that we are in the use list of our inputs.
     bool hasCorrectInputs() {
diff --git a/pkg/compiler/lib/src/ssa/value_range_analyzer.dart b/pkg/compiler/lib/src/ssa/value_range_analyzer.dart
index a4bfd96..a0af6be 100644
--- a/pkg/compiler/lib/src/ssa/value_range_analyzer.dart
+++ b/pkg/compiler/lib/src/ssa/value_range_analyzer.dart
@@ -2,20 +2,17 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import '../constant_system_dart.dart';
-import '../constants/constant_system.dart';
+import '../constants/constant_system.dart' as constant_system;
 import '../constants/values.dart';
 import '../world.dart' show JClosedWorld;
 import 'nodes.dart';
 import 'optimize.dart';
 
 class ValueRangeInfo {
-  final ConstantSystem constantSystem;
-
   IntValue intZero;
   IntValue intOne;
 
-  ValueRangeInfo(this.constantSystem) {
+  ValueRangeInfo() {
     intZero = newIntValue(BigInt.zero);
     intOne = newIntValue(BigInt.one);
   }
@@ -105,6 +102,7 @@
 
   const MarkerValue(this.positive, info) : super(info);
 
+  @override
   Value operator +(Value other) {
     if (other.isPositive && positive) return const MaxIntValue();
     if (other.isNegative && !positive) return const MinIntValue();
@@ -112,6 +110,7 @@
     return const UnknownValue();
   }
 
+  @override
   Value operator -(Value other) {
     if (other.isPositive && !positive) return const MinIntValue();
     if (other.isNegative && positive) return const MaxIntValue();
@@ -126,63 +125,74 @@
 
   const IntValue(this.value, info) : super(info);
 
+  @override
   Value operator +(dynamic other) {
     if (other.isZero) return this;
     if (other is! IntValue) return other + this;
-    ConstantSystem constantSystem = info.constantSystem;
-    dynamic constant = constantSystem.add.fold(
-        constantSystem.createInt(value), constantSystem.createInt(other.value));
+    dynamic constant = constant_system.add.fold(
+        constant_system.createInt(value),
+        constant_system.createInt(other.value));
     if (!constant.isInt) return const UnknownValue();
     return info.newIntValue(constant.intValue);
   }
 
+  @override
   Value operator -(dynamic other) {
     if (other.isZero) return this;
     if (other is! IntValue) return -other + this;
-    ConstantSystem constantSystem = info.constantSystem;
-    dynamic constant = constantSystem.subtract.fold(
-        constantSystem.createInt(value), constantSystem.createInt(other.value));
+    dynamic constant = constant_system.subtract.fold(
+        constant_system.createInt(value),
+        constant_system.createInt(other.value));
     if (!constant.isInt) return const UnknownValue();
     return info.newIntValue(constant.intValue);
   }
 
+  @override
   Value operator -() {
     if (isZero) return this;
-    ConstantSystem constantSystem = info.constantSystem;
     dynamic constant =
-        constantSystem.negate.fold(constantSystem.createInt(value));
+        constant_system.negate.fold(constant_system.createInt(value));
     if (!constant.isInt) return const UnknownValue();
     return info.newIntValue(constant.intValue);
   }
 
+  @override
   Value operator &(dynamic other) {
     if (other is! IntValue) return const UnknownValue();
-    ConstantSystem constantSystem = info.constantSystem;
-    dynamic constant = constantSystem.bitAnd.fold(
-        constantSystem.createInt(value), constantSystem.createInt(other.value));
+    dynamic constant = constant_system.bitAnd.fold(
+        constant_system.createInt(value),
+        constant_system.createInt(other.value));
     return info.newIntValue(constant.intValue);
   }
 
+  @override
   Value min(dynamic other) {
     if (other is! IntValue) return other.min(this);
     return this.value < other.value ? this : other;
   }
 
+  @override
   Value max(dynamic other) {
     if (other is! IntValue) return other.max(this);
     return this.value < other.value ? other : this;
   }
 
+  @override
   bool operator ==(other) {
     if (other is! IntValue) return false;
     return this.value == other.value;
   }
 
+  @override
   int get hashCode => throw new UnsupportedError('IntValue.hashCode');
 
+  @override
   String toString() => 'IntValue $value';
+  @override
   bool get isNegative => value < BigInt.zero;
+  @override
   bool get isPositive => value >= BigInt.zero;
+  @override
   bool get isZero => value == BigInt.zero;
 }
 
@@ -190,13 +200,21 @@
 /// which is currently +infinity.
 class MaxIntValue extends Value {
   const MaxIntValue() : super(null);
+  @override
   Value operator +(Value other) => this;
+  @override
   Value operator -(Value other) => this;
+  @override
   Value operator -() => const MinIntValue();
+  @override
   Value min(Value other) => other;
+  @override
   Value max(Value other) => this;
+  @override
   String toString() => 'Max';
+  @override
   bool get isNegative => false;
+  @override
   bool get isPositive => true;
 }
 
@@ -204,13 +222,21 @@
 /// which is currently -infinity.
 class MinIntValue extends Value {
   const MinIntValue() : super(null);
+  @override
   Value operator +(Value other) => this;
+  @override
   Value operator -(Value other) => this;
+  @override
   Value operator -() => const MaxIntValue();
+  @override
   Value min(Value other) => this;
+  @override
   Value max(Value other) => other;
+  @override
   String toString() => 'Min';
+  @override
   bool get isNegative => true;
+  @override
   bool get isPositive => false;
 }
 
@@ -218,13 +244,21 @@
 /// operation that could not be done because of too much complexity.
 class UnknownValue extends Value {
   const UnknownValue() : super(null);
+  @override
   Value operator +(Value other) => const UnknownValue();
+  @override
   Value operator -(Value other) => const UnknownValue();
+  @override
   Value operator -() => const UnknownValue();
+  @override
   Value min(Value other) => const UnknownValue();
+  @override
   Value max(Value other) => const UnknownValue();
+  @override
   bool get isNegative => false;
+  @override
   bool get isPositive => false;
+  @override
   String toString() => 'Unknown';
 }
 
@@ -233,13 +267,16 @@
   final HInstruction instruction;
   InstructionValue(this.instruction, info) : super(info);
 
+  @override
   bool operator ==(other) {
     if (other is! InstructionValue) return false;
     return this.instruction == other.instruction;
   }
 
+  @override
   int get hashCode => throw new UnsupportedError('InstructionValue.hashCode');
 
+  @override
   Value operator +(Value other) {
     if (other.isZero) return this;
     if (other is IntValue) {
@@ -254,6 +291,7 @@
     return other + this;
   }
 
+  @override
   Value operator -(Value other) {
     if (other.isZero) return this;
     if (this == other) return info.intZero;
@@ -269,19 +307,24 @@
     return -other + this;
   }
 
+  @override
   Value operator -() {
     return info.newNegateValue(this);
   }
 
+  @override
   bool get isNegative => false;
+  @override
   bool get isPositive => false;
 
+  @override
   String toString() => 'Instruction: $instruction';
 }
 
 /// Special value for instructions whose type is a positive integer.
 class PositiveValue extends InstructionValue {
   PositiveValue(HInstruction instruction, info) : super(instruction, info);
+  @override
   bool get isPositive => true;
 }
 
@@ -296,16 +339,20 @@
 class AddValue extends BinaryOperationValue {
   AddValue(left, right, info) : super(left, right, info);
 
+  @override
   bool operator ==(other) {
     if (other is! AddValue) return false;
     return (left == other.left && right == other.right) ||
         (left == other.right && right == other.left);
   }
 
+  @override
   int get hashCode => throw new UnsupportedError('AddValue.hashCode');
 
+  @override
   Value operator -() => -left - right;
 
+  @override
   Value operator +(Value other) {
     if (other.isZero) return this;
     Value value = left + other;
@@ -321,6 +368,7 @@
     return const UnknownValue();
   }
 
+  @override
   Value operator -(Value other) {
     if (other.isZero) return this;
     Value value = left - other;
@@ -336,23 +384,30 @@
     return const UnknownValue();
   }
 
+  @override
   bool get isNegative => left.isNegative && right.isNegative;
+  @override
   bool get isPositive => left.isPositive && right.isPositive;
+  @override
   String toString() => '$left + $right';
 }
 
 class SubtractValue extends BinaryOperationValue {
   SubtractValue(left, right, info) : super(left, right, info);
 
+  @override
   bool operator ==(other) {
     if (other is! SubtractValue) return false;
     return left == other.left && right == other.right;
   }
 
+  @override
   int get hashCode => throw new UnsupportedError('SubtractValue.hashCode');
 
+  @override
   Value operator -() => right - left;
 
+  @override
   Value operator +(Value other) {
     if (other.isZero) return this;
     Value value = left + other;
@@ -368,6 +423,7 @@
     return const UnknownValue();
   }
 
+  @override
   Value operator -(Value other) {
     if (other.isZero) return this;
     Value value = left - other;
@@ -383,8 +439,11 @@
     return const UnknownValue();
   }
 
+  @override
   bool get isNegative => left.isNegative && right.isPositive;
+  @override
   bool get isPositive => left.isPositive && right.isNegative;
+  @override
   String toString() => '$left - $right';
 }
 
@@ -392,13 +451,16 @@
   final Value value;
   NegateValue(this.value, info) : super(info);
 
+  @override
   bool operator ==(other) {
     if (other is! NegateValue) return false;
     return value == other.value;
   }
 
+  @override
   int get hashCode => throw new UnsupportedError('Negate.hashCode');
 
+  @override
   Value operator +(other) {
     if (other.isZero) return this;
     if (other == value) return info.intZero;
@@ -415,8 +477,10 @@
     return other - value;
   }
 
+  @override
   Value operator &(Value other) => const UnknownValue();
 
+  @override
   Value operator -(other) {
     if (other.isZero) return this;
     if (other is IntValue) {
@@ -432,10 +496,14 @@
     return -other - value;
   }
 
+  @override
   Value operator -() => value;
 
+  @override
   bool get isNegative => value.isPositive;
+  @override
   bool get isPositive => value.isNegative;
+  @override
   String toString() => '-$value';
 }
 
@@ -527,11 +595,13 @@
     }
   }
 
+  @override
   bool operator ==(other) {
     if (other is! Range) return false;
     return other.lower == lower && other.upper == upper;
   }
 
+  @override
   int get hashCode => throw new UnsupportedError('Range.hashCode');
 
   bool operator <(Range other) {
@@ -554,6 +624,7 @@
   bool get isPositive => lower.isPositive;
   bool get isSingleValue => lower == upper;
 
+  @override
   String toString() => '[$lower, $upper]';
 }
 
@@ -562,6 +633,7 @@
 /// removes unnecessary bounds checks, and comparisons that are proven
 /// to be true or false.
 class SsaValueRangeAnalyzer extends HBaseVisitor implements OptimizationPhase {
+  @override
   String get name => 'SSA value range builder';
 
   /// List of [HRangeConversion] instructions created by the phase. We
@@ -579,11 +651,10 @@
   HGraph graph;
 
   SsaValueRangeAnalyzer(JClosedWorld closedWorld, this.optimizer)
-      : info = new ValueRangeInfo(closedWorld.constantSystem),
+      : info = new ValueRangeInfo(),
         this.closedWorld = closedWorld;
 
-  ConstantSystem get constantSystem => closedWorld.constantSystem;
-
+  @override
   void visitGraph(HGraph graph) {
     this.graph = graph;
     visitDominatorTree(graph);
@@ -602,6 +673,7 @@
     });
   }
 
+  @override
   void visitBasicBlock(HBasicBlock block) {
     void visit(HInstruction instruction) {
       Range range = instruction.accept(this);
@@ -617,6 +689,7 @@
     block.forEachInstruction(visit);
   }
 
+  @override
   Range visitInstruction(HInstruction instruction) {
     if (instruction
         .isPositiveInteger(closedWorld.abstractValueDomain)
@@ -633,6 +706,7 @@
     }
   }
 
+  @override
   Range visitPhi(HPhi phi) {
     if (phi.isInteger(closedWorld.abstractValueDomain).isPotentiallyFalse)
       return info.newUnboundRange();
@@ -658,6 +732,7 @@
     return range;
   }
 
+  @override
   Range visitConstant(HConstant hConstant) {
     if (hConstant
         .isInteger(closedWorld.abstractValueDomain)
@@ -685,10 +760,12 @@
     return info.newNormalizedRange(value, value);
   }
 
+  @override
   Range visitFieldGet(HFieldGet fieldGet) {
     return visitInstruction(fieldGet);
   }
 
+  @override
   Range visitGetLength(HGetLength node) {
     PositiveValue value = info.newPositiveValue(node);
     // We know this range is above zero. To simplify the analysis, we
@@ -698,6 +775,7 @@
     return info.newNormalizedRange(info.intZero, value);
   }
 
+  @override
   Range visitBoundsCheck(HBoundsCheck check) {
     // Save the next instruction, in case the check gets removed.
     HInstruction next = check.next;
@@ -767,6 +845,7 @@
     return newIndexRange;
   }
 
+  @override
   Range visitRelational(HRelational relational) {
     HInstruction right = relational.right;
     HInstruction left = relational.left;
@@ -776,7 +855,7 @@
     if (right.isInteger(closedWorld.abstractValueDomain).isPotentiallyFalse) {
       return info.newUnboundRange();
     }
-    BinaryOperation operation = relational.operation(constantSystem);
+    constant_system.BinaryOperation operation = relational.operation();
     Range rightRange = ranges[relational.right];
     Range leftRange = ranges[relational.left];
 
@@ -834,6 +913,7 @@
     return info.newUnboundRange();
   }
 
+  @override
   Range visitRemainder(HRemainder instruction) {
     HInstruction left = instruction.inputs[0];
     HInstruction right = instruction.inputs[1];
@@ -868,6 +948,7 @@
     return info.newUnboundRange();
   }
 
+  @override
   Range visitInvokeDynamicMethod(HInvokeDynamicMethod invoke) {
     if ((invoke.inputs.length == 3) && (invoke.selector.name == "%"))
       return handleInvokeModulo(invoke);
@@ -881,18 +962,21 @@
       return info.newUnboundRange();
     }
     return instruction
-        .operation(constantSystem)
+        .operation()
         .apply(ranges[instruction.left], ranges[instruction.right]);
   }
 
+  @override
   Range visitAdd(HAdd add) {
     return handleBinaryOperation(add);
   }
 
+  @override
   Range visitSubtract(HSubtract sub) {
     return handleBinaryOperation(sub);
   }
 
+  @override
   Range visitBitAnd(HBitAnd node) {
     if (node.isInteger(closedWorld.abstractValueDomain).isPotentiallyFalse) {
       return info.newUnboundRange();
@@ -924,6 +1008,7 @@
     return info.newUnboundRange();
   }
 
+  @override
   Range visitCheck(HCheck instruction) {
     if (ranges[instruction.checkedInput] == null) {
       return visitInstruction(instruction);
@@ -943,46 +1028,48 @@
     return newInstruction;
   }
 
-  static BinaryOperation negateOperation(BinaryOperation operation) {
-    if (operation == const LessOperation()) {
-      return const GreaterEqualOperation();
-    } else if (operation == const LessEqualOperation()) {
-      return const GreaterOperation();
-    } else if (operation == const GreaterOperation()) {
-      return const LessEqualOperation();
-    } else if (operation == const GreaterEqualOperation()) {
-      return const LessOperation();
+  static constant_system.BinaryOperation negateOperation(
+      constant_system.BinaryOperation operation) {
+    if (operation == const constant_system.LessOperation()) {
+      return const constant_system.GreaterEqualOperation();
+    } else if (operation == const constant_system.LessEqualOperation()) {
+      return const constant_system.GreaterOperation();
+    } else if (operation == const constant_system.GreaterOperation()) {
+      return const constant_system.LessEqualOperation();
+    } else if (operation == const constant_system.GreaterEqualOperation()) {
+      return const constant_system.LessOperation();
     } else {
       return null;
     }
   }
 
-  static BinaryOperation flipOperation(BinaryOperation operation) {
-    if (operation == const LessOperation()) {
-      return const GreaterOperation();
-    } else if (operation == const LessEqualOperation()) {
-      return const GreaterEqualOperation();
-    } else if (operation == const GreaterOperation()) {
-      return const LessOperation();
-    } else if (operation == const GreaterEqualOperation()) {
-      return const LessEqualOperation();
+  static constant_system.BinaryOperation flipOperation(
+      constant_system.BinaryOperation operation) {
+    if (operation == const constant_system.LessOperation()) {
+      return const constant_system.GreaterOperation();
+    } else if (operation == const constant_system.LessEqualOperation()) {
+      return const constant_system.GreaterEqualOperation();
+    } else if (operation == const constant_system.GreaterOperation()) {
+      return const constant_system.LessOperation();
+    } else if (operation == const constant_system.GreaterEqualOperation()) {
+      return const constant_system.LessEqualOperation();
     } else {
       return null;
     }
   }
 
-  Range computeConstrainedRange(
-      BinaryOperation operation, Range leftRange, Range rightRange) {
+  Range computeConstrainedRange(constant_system.BinaryOperation operation,
+      Range leftRange, Range rightRange) {
     Range range;
-    if (operation == const LessOperation()) {
+    if (operation == const constant_system.LessOperation()) {
       range = info.newNormalizedRange(
           const MinIntValue(), rightRange.upper - info.intOne);
-    } else if (operation == const LessEqualOperation()) {
+    } else if (operation == const constant_system.LessEqualOperation()) {
       range = info.newNormalizedRange(const MinIntValue(), rightRange.upper);
-    } else if (operation == const GreaterOperation()) {
+    } else if (operation == const constant_system.GreaterOperation()) {
       range = info.newNormalizedRange(
           rightRange.lower + info.intOne, const MaxIntValue());
-    } else if (operation == const GreaterEqualOperation()) {
+    } else if (operation == const constant_system.GreaterEqualOperation()) {
       range = info.newNormalizedRange(rightRange.lower, const MaxIntValue());
     } else {
       range = info.newUnboundRange();
@@ -990,6 +1077,7 @@
     return range.intersection(leftRange);
   }
 
+  @override
   Range visitConditionalBranch(HConditionalBranch branch) {
     dynamic condition = branch.condition;
     // TODO(ngeoffray): Handle complex conditions.
@@ -1006,8 +1094,8 @@
 
     Range rightRange = ranges[right];
     Range leftRange = ranges[left];
-    Operation operation = condition.operation(constantSystem);
-    Operation mirrorOp = flipOperation(operation);
+    constant_system.Operation operation = condition.operation();
+    constant_system.Operation mirrorOp = flipOperation(operation);
     // Only update the true branch if this block is the only
     // predecessor.
     if (branch.trueBranch.predecessors.length == 1) {
@@ -1033,8 +1121,8 @@
     // predecessor.
     if (branch.falseBranch.predecessors.length == 1) {
       assert(branch.falseBranch.predecessors[0] == branch.block);
-      Operation reverse = negateOperation(operation);
-      Operation reversedMirror = flipOperation(reverse);
+      constant_system.Operation reverse = negateOperation(operation);
+      constant_system.Operation reversedMirror = flipOperation(reverse);
       // Update the false branch to use narrower ranges for [left] and
       // [right].
       Range range = computeConstrainedRange(reverse, leftRange, rightRange);
@@ -1055,6 +1143,7 @@
     return info.newUnboundRange();
   }
 
+  @override
   Range visitRangeConversion(HRangeConversion conversion) {
     return ranges[conversion];
   }
@@ -1099,6 +1188,7 @@
     return instruction.accept(this);
   }
 
+  @override
   Range visitPhi(HPhi phi) {
     // If the update of a loop phi involves another loop phi, we give
     // up.
@@ -1116,14 +1206,17 @@
     return phiRange;
   }
 
+  @override
   Range visitCheck(HCheck instruction) {
     return visit(instruction.checkedInput);
   }
 
+  @override
   Range visitAdd(HAdd operation) {
     return handleBinaryOperation(operation);
   }
 
+  @override
   Range visitSubtract(HSubtract operation) {
     return handleBinaryOperation(operation);
   }
@@ -1132,7 +1225,7 @@
     Range leftRange = visit(instruction.left);
     Range rightRange = visit(instruction.right);
     if (leftRange == null || rightRange == null) return null;
-    BinaryOperation operation = instruction.operation(info.constantSystem);
+    constant_system.BinaryOperation operation = instruction.operation();
     return operation.apply(leftRange, rightRange);
   }
 }
diff --git a/pkg/compiler/lib/src/ssa/value_set.dart b/pkg/compiler/lib/src/ssa/value_set.dart
index 89dbeca..b24a560 100644
--- a/pkg/compiler/lib/src/ssa/value_set.dart
+++ b/pkg/compiler/lib/src/ssa/value_set.dart
@@ -152,6 +152,7 @@
 class ValueSetNode {
   final HInstruction value;
   final int hash;
+  @override
   int get hashCode => hash;
   ValueSetNode next;
   ValueSetNode(this.value, this.hash, this.next);
diff --git a/pkg/compiler/lib/src/ssa/variable_allocator.dart b/pkg/compiler/lib/src/ssa/variable_allocator.dart
index 6837537..a9f6e39 100644
--- a/pkg/compiler/lib/src/ssa/variable_allocator.dart
+++ b/pkg/compiler/lib/src/ssa/variable_allocator.dart
@@ -4,6 +4,7 @@
 
 import '../common.dart';
 import '../js_backend/js_backend.dart';
+import 'codegen.dart' show CodegenPhase;
 import 'nodes.dart';
 
 /// The [LiveRange] class covers a range where an instruction is live.
@@ -15,6 +16,7 @@
     assert(start <= end);
   }
 
+  @override
   String toString() => '[$start $end[';
 }
 
@@ -55,6 +57,7 @@
     return false;
   }
 
+  @override
   String toString() {
     List<String> res = new List<String>();
     for (final interval in ranges) res.add(interval.toString());
@@ -147,13 +150,14 @@
   bool get isEmpty => liveInstructions.isEmpty && loopMarkers.isEmpty;
   bool contains(HInstruction instruction) =>
       liveInstructions.containsKey(instruction);
+  @override
   String toString() => liveInstructions.toString();
 }
 
 /// Builds the live intervals of each instruction. The algorithm visits
 /// the graph post-dominator tree to find the last uses of an
 /// instruction, and computes the liveIns of each basic block.
-class SsaLiveIntervalBuilder extends HBaseVisitor {
+class SsaLiveIntervalBuilder extends HBaseVisitor with CodegenPhase {
   final Set<HInstruction> generateAtUseSite;
   final Set<HInstruction> controlFlowOperators;
 
@@ -173,6 +177,7 @@
       : liveInstructions = new Map<HBasicBlock, LiveEnvironment>(),
         liveIntervals = new Map<HInstruction, LiveInterval>();
 
+  @override
   void visitGraph(HGraph graph) {
     visitPostDominatorTree(graph);
     if (!liveInstructions[graph.entry].isEmpty) {
@@ -250,6 +255,7 @@
     }
   }
 
+  @override
   void visitBasicBlock(HBasicBlock block) {
     LiveEnvironment environment =
         new LiveEnvironment(liveIntervals, instructionId);
@@ -355,6 +361,7 @@
 
   Copy(this.source, this.destination);
 
+  @override
   String toString() => '$destination <- $source';
 }
 
@@ -380,6 +387,7 @@
     assignments.add(new Copy<HInstruction>(source, destination));
   }
 
+  @override
   String toString() => 'Copies: $copies, assignments: $assignments';
 
   bool get isEmpty => copies.isEmpty && assignments.isEmpty;
@@ -561,7 +569,7 @@
 /// instruction, it frees the names of the inputs that die at that
 /// instruction, and allocates a name to the instruction. For each phi,
 /// it adds a copy to the CopyHandler of the corresponding predecessor.
-class SsaVariableAllocator extends HBaseVisitor {
+class SsaVariableAllocator extends HBaseVisitor with CodegenPhase {
   final Namer _namer;
   final Map<HBasicBlock, LiveEnvironment> liveInstructions;
   final Map<HInstruction, LiveInterval> liveIntervals;
@@ -573,10 +581,12 @@
       this.generateAtUseSite)
       : this.names = new VariableNames();
 
+  @override
   void visitGraph(HGraph graph) {
     visitDominatorTree(graph);
   }
 
+  @override
   void visitBasicBlock(HBasicBlock block) {
     VariableNamer variableNamer =
         new VariableNamer(liveInstructions[block], names, _namer);
diff --git a/pkg/compiler/lib/src/tracer.dart b/pkg/compiler/lib/src/tracer.dart
index f4e7870..2c687bf 100644
--- a/pkg/compiler/lib/src/tracer.dart
+++ b/pkg/compiler/lib/src/tracer.dart
@@ -26,6 +26,7 @@
   final JClosedWorld closedWorld;
   final Namer namer;
   bool traceActive = false;
+  @override
   final api.OutputSink output;
   final RegExp traceFilter;
 
diff --git a/pkg/compiler/lib/src/universe/call_structure.dart b/pkg/compiler/lib/src/universe/call_structure.dart
index d40a26e..8c148c8 100644
--- a/pkg/compiler/lib/src/universe/call_structure.dart
+++ b/pkg/compiler/lib/src/universe/call_structure.dart
@@ -109,6 +109,7 @@
     return sb.toString();
   }
 
+  @override
   String toString() => 'CallStructure(${structureToString()})';
 
   Selector get callSelector => new Selector.call(Names.call, this);
@@ -122,6 +123,7 @@
   }
 
   // TODO(johnniwinther): Cache hash code?
+  @override
   int get hashCode {
     return Hashing.listHash(
         namedArguments,
@@ -129,6 +131,7 @@
             Hashing.objectHash(typeArgumentCount, namedArguments.length)));
   }
 
+  @override
   bool operator ==(other) {
     if (other is! CallStructure) return false;
     return match(other);
@@ -184,6 +187,7 @@
 
 ///
 class NamedCallStructure extends CallStructure {
+  @override
   final List<String> namedArguments;
   final List<String> _orderedNamedArguments = <String>[];
 
diff --git a/pkg/compiler/lib/src/universe/class_hierarchy.dart b/pkg/compiler/lib/src/universe/class_hierarchy.dart
index e5707ad..776b4f1 100644
--- a/pkg/compiler/lib/src/universe/class_hierarchy.dart
+++ b/pkg/compiler/lib/src/universe/class_hierarchy.dart
@@ -47,19 +47,19 @@
   /// subclass.
   bool isIndirectlyInstantiated(ClassEntity cls);
 
-  /// Return `true` if [x] is a subclass of [y].
+  /// Return `true` if [x] is a (non-strict) subclass of [y].
   bool isSubclassOf(ClassEntity x, ClassEntity y);
 
   /// Returns `true` if [x] is a subtype of [y], that is, if [x] implements an
   /// instance of [y].
   bool isSubtypeOf(ClassEntity x, ClassEntity y);
 
-  /// Returns an iterable over the live classes that extend [cls] including
-  /// [cls] itself.
+  /// Returns an iterable over the directly instantiated classes that extend
+  /// [cls] possibly including [cls] itself, if it is live.
   Iterable<ClassEntity> subclassesOf(ClassEntity cls);
 
-  /// Returns an iterable over the live classes that extend [cls] _not_
-  /// including [cls] itself.
+  /// Returns an iterable over the directly instantiated classes that extend
+  /// [cls] _not_ including [cls] itself.
   Iterable<ClassEntity> strictSubclassesOf(ClassEntity cls);
 
   /// Returns the number of live classes that extend [cls] _not_
@@ -79,8 +79,8 @@
   /// possibly including [cls] itself, if it is live.
   Iterable<ClassEntity> subtypesOf(ClassEntity cls);
 
-  /// Returns an iterable over the live classes that implement [cls] _not_
-  /// including [cls] if it is live.
+  /// Returns an iterable over the directly instantiated that implement [cls]
+  /// _not_ including [cls].
   Iterable<ClassEntity> strictSubtypesOf(ClassEntity cls);
 
   /// Returns the number of live classes that implement [cls] _not_
@@ -99,13 +99,16 @@
   /// Returns `true` if [a] and [b] have any known common subtypes.
   bool haveAnyCommonSubtypes(ClassEntity a, ClassEntity b);
 
-  /// Returns `true` if any live class other than [cls] extends [cls].
+  /// Returns `true` if any directly instantiated class other than [cls] extends
+  /// [cls].
   bool hasAnyStrictSubclass(ClassEntity cls);
 
-  /// Returns `true` if any live class other than [cls] implements [cls].
+  /// Returns `true` if any directly instantiated class other than [cls]
+  /// implements [cls].
   bool hasAnyStrictSubtype(ClassEntity cls);
 
-  /// Returns `true` if all live classes that implement [cls] extend it.
+  /// Returns `true` if all directly instantiated classes that implement [cls]
+  /// extend it.
   bool hasOnlySubclasses(ClassEntity cls);
 
   /// Returns a [SubclassResult] for the subclasses that are contained in
@@ -184,6 +187,7 @@
         commonElements, classHierarchyNodes, classSets);
   }
 
+  @override
   void writeToDataSink(DataSink sink) {
     sink.begin(tag);
     sink.writeInt(_classSets.length);
@@ -229,8 +233,7 @@
     return node != null && node.isIndirectlyInstantiated;
   }
 
-  /// Returns `true` if [x] is a subtype of [y], that is, if [x] implements an
-  /// instance of [y].
+  @override
   bool isSubtypeOf(ClassEntity x, ClassEntity y) {
     ClassSet classSet = _classSets[y];
     assert(
@@ -245,13 +248,12 @@
     return classSet.hasSubtype(classHierarchyNode);
   }
 
-  /// Return `true` if [x] is a (non-strict) subclass of [y].
+  @override
   bool isSubclassOf(ClassEntity x, ClassEntity y) {
     return _classHierarchyNodes[y].hasSubclass(_classHierarchyNodes[x]);
   }
 
-  /// Returns an iterable over the directly instantiated classes that extend
-  /// [cls] possibly including [cls] itself, if it is live.
+  @override
   Iterable<ClassEntity> subclassesOf(ClassEntity cls) {
     ClassHierarchyNode hierarchy = _classHierarchyNodes[cls];
     if (hierarchy == null) return const <ClassEntity>[];
@@ -259,8 +261,7 @@
         .subclassesByMask(ClassHierarchyNode.EXPLICITLY_INSTANTIATED);
   }
 
-  /// Returns an iterable over the directly instantiated classes that extend
-  /// [cls] _not_ including [cls] itself.
+  @override
   Iterable<ClassEntity> strictSubclassesOf(ClassEntity cls) {
     ClassHierarchyNode subclasses = _classHierarchyNodes[cls];
     if (subclasses == null) return const <ClassEntity>[];
@@ -269,16 +270,14 @@
         strict: true);
   }
 
-  /// Returns the number of live classes that extend [cls] _not_
-  /// including [cls] itself.
+  @override
   int strictSubclassCount(ClassEntity cls) {
     ClassHierarchyNode subclasses = _classHierarchyNodes[cls];
     if (subclasses == null) return 0;
     return subclasses.instantiatedSubclassCount;
   }
 
-  /// Applies [f] to each live class that extend [cls] _not_ including [cls]
-  /// itself.
+  @override
   void forEachStrictSubclassOf(
       ClassEntity cls, IterationStep f(ClassEntity cls)) {
     ClassHierarchyNode subclasses = _classHierarchyNodes[cls];
@@ -287,8 +286,7 @@
         strict: true);
   }
 
-  /// Returns `true` if [predicate] applies to any live class that extend [cls]
-  /// _not_ including [cls] itself.
+  @override
   bool anyStrictSubclassOf(ClassEntity cls, bool predicate(ClassEntity cls)) {
     ClassHierarchyNode subclasses = _classHierarchyNodes[cls];
     if (subclasses == null) return false;
@@ -297,8 +295,7 @@
         strict: true);
   }
 
-  /// Returns an iterable over the directly instantiated that implement [cls]
-  /// possibly including [cls] itself, if it is live.
+  @override
   Iterable<ClassEntity> subtypesOf(ClassEntity cls) {
     ClassSet classSet = _classSets[cls];
     if (classSet == null) {
@@ -309,8 +306,7 @@
     }
   }
 
-  /// Returns an iterable over the directly instantiated that implement [cls]
-  /// _not_ including [cls].
+  @override
   Iterable<ClassEntity> strictSubtypesOf(ClassEntity cls) {
     ClassSet classSet = _classSets[cls];
     if (classSet == null) {
@@ -321,16 +317,14 @@
     }
   }
 
-  /// Returns the number of live classes that implement [cls] _not_
-  /// including [cls] itself.
+  @override
   int strictSubtypeCount(ClassEntity cls) {
     ClassSet classSet = _classSets[cls];
     if (classSet == null) return 0;
     return classSet.instantiatedSubtypeCount;
   }
 
-  /// Applies [f] to each live class that implements [cls] _not_ including [cls]
-  /// itself.
+  @override
   void forEachStrictSubtypeOf(
       ClassEntity cls, IterationStep f(ClassEntity cls)) {
     ClassSet classSet = _classSets[cls];
@@ -339,8 +333,7 @@
         strict: true);
   }
 
-  /// Returns `true` if [predicate] applies to any live class that extend [cls]
-  /// _not_ including [cls] itself.
+  @override
   bool anyStrictSubtypeOf(ClassEntity cls, bool predicate(ClassEntity cls)) {
     ClassSet classSet = _classSets[cls];
     if (classSet == null) return false;
@@ -349,7 +342,7 @@
         strict: true);
   }
 
-  /// Returns `true` if [a] and [b] have any known common subtypes.
+  @override
   bool haveAnyCommonSubtypes(ClassEntity a, ClassEntity b) {
     ClassSet classSetA = _classSets[a];
     ClassSet classSetB = _classSets[b];
@@ -364,22 +357,19 @@
     return false;
   }
 
-  /// Returns `true` if any directly instantiated class other than [cls] extends
-  /// [cls].
+  @override
   bool hasAnyStrictSubclass(ClassEntity cls) {
     ClassHierarchyNode subclasses = _classHierarchyNodes[cls];
     if (subclasses == null) return false;
     return subclasses.isIndirectlyInstantiated;
   }
 
-  /// Returns `true` if any directly instantiated class other than [cls]
-  /// implements [cls].
+  @override
   bool hasAnyStrictSubtype(ClassEntity cls) {
     return strictSubtypeCount(cls) > 0;
   }
 
-  /// Returns `true` if all directly instantiated classes that implement [cls]
-  /// extend it.
+  @override
   bool hasOnlySubclasses(ClassEntity cls) {
     // TODO(johnniwinther): move this to ClassSet?
     if (cls == _commonElements.objectClass) return true;
@@ -391,6 +381,7 @@
     return classSet.hasOnlyInstantiatedSubclasses;
   }
 
+  @override
   SubclassResult commonSubclasses(ClassEntity cls1, ClassQuery query1,
       ClassEntity cls2, ClassQuery query2) {
     if (query1 == ClassQuery.EXACT && query2 == ClassQuery.EXACT) {
@@ -536,20 +527,12 @@
     }
   }
 
-  /// Returns [ClassHierarchyNode] for [cls] used to model the class hierarchies
-  /// of known classes.
-  ///
-  /// This method is only provided for testing. For queries on classes, use the
-  /// methods defined in [JClosedWorld].
+  @override
   ClassHierarchyNode getClassHierarchyNode(ClassEntity cls) {
     return _classHierarchyNodes[cls];
   }
 
-  /// Returns [ClassSet] for [cls] used to model the extends and implements
-  /// relations of known classes.
-  ///
-  /// This method is only provided for testing. For queries on classes, use the
-  /// methods defined in [JClosedWorld].
+  @override
   ClassSet getClassSet(ClassEntity cls) {
     return _classSets[cls];
   }
@@ -1004,5 +987,6 @@
   static const SubclassResult SUBTYPE2 =
       const SubclassResult.internal(SubclassResultKind.SUBTYPE2);
 
+  @override
   String toString() => 'SubclassResult($kind,classes=$classes)';
 }
diff --git a/pkg/compiler/lib/src/universe/class_set.dart b/pkg/compiler/lib/src/universe/class_set.dart
index fa29bf7..a2eaee0 100644
--- a/pkg/compiler/lib/src/universe/class_set.dart
+++ b/pkg/compiler/lib/src/universe/class_set.dart
@@ -448,6 +448,7 @@
     return sb.toString();
   }
 
+  @override
   String toString() => cls.toString();
 }
 
@@ -841,6 +842,7 @@
     return null;
   }
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write('[\n');
@@ -1040,6 +1042,7 @@
 
 /// Singleton map implemented as a field on the key.
 class ClassHierarchyNodesMap extends MapBase<ClassEntity, ClassHierarchyNode> {
+  @override
   ClassHierarchyNode operator [](Object cls) {
     // TODO(sra): Change the key type to `covariant ClassHierarchyNodesMapKey`.
     if (cls is ClassHierarchyNodesMapKey) {
@@ -1048,6 +1051,7 @@
     throw new UnimplementedError('ClassHierarchyNodesMap for $cls');
   }
 
+  @override
   operator []=(Object cls, ClassHierarchyNode node) {
     // TODO(sra): Change the key type to `covariant ClassHierarchyNodesMapKey`.
     if (cls is ClassHierarchyNodesMapKey) {
@@ -1057,19 +1061,23 @@
     throw new UnimplementedError('ClassHierarchyNodesMap for $cls');
   }
 
+  @override
   ClassHierarchyNode putIfAbsent(
       ClassEntity cls, ClassHierarchyNode ifAbsent()) {
     return this[cls] ??= ifAbsent();
   }
 
+  @override
   Iterable<ClassEntity> get keys {
     throw new UnimplementedError('ClassHierarchyNodesMap.keys');
   }
 
+  @override
   ClassHierarchyNode remove(Object key) {
     throw new UnimplementedError('ClassHierarchyNodesMap.remove');
   }
 
+  @override
   void clear() {
     throw new UnimplementedError('ClassHierarchyNodesMap.clear');
   }
diff --git a/pkg/compiler/lib/src/universe/codegen_world_builder.dart b/pkg/compiler/lib/src/universe/codegen_world_builder.dart
index 323bca3..eb54121 100644
--- a/pkg/compiler/lib/src/universe/codegen_world_builder.dart
+++ b/pkg/compiler/lib/src/universe/codegen_world_builder.dart
@@ -18,13 +18,7 @@
 import 'member_usage.dart';
 import 'selector.dart' show Selector;
 import 'use.dart'
-    show
-        ConstantUse,
-        ConstantUseKind,
-        DynamicUse,
-        DynamicUseKind,
-        StaticUse,
-        StaticUseKind;
+    show ConstantUse, DynamicUse, DynamicUseKind, StaticUse, StaticUseKind;
 import 'world_builder.dart';
 
 /// World builder specific to codegen.
@@ -70,12 +64,6 @@
   void forEachInvokedSetter(
       f(String name, Map<Selector, SelectorConstraints> selectors));
 
-  /// Returns `true` if [field] has a constant initializer.
-  bool hasConstantFieldInitializer(covariant FieldEntity field);
-
-  /// Returns the constant initializer for [field].
-  ConstantValue getConstantFieldInitializer(covariant FieldEntity field);
-
   /// Returns `true` if [member] is invoked as a setter.
   bool hasInvokedSetter(MemberEntity member);
 
@@ -95,7 +83,7 @@
   /// Invariant: Elements are declaration elements.
   Iterable<FieldEntity> get allReferencedStaticFields;
 
-  /// Set of methods in instantiated classes that are potentially closurized.
+  @override
   Iterable<FunctionEntity> get closurizedMembers;
 
   /// Register [constant] as needed for emission.
@@ -139,16 +127,13 @@
   /// Classes implemented by directly instantiated classes.
   final Set<ClassEntity> _implementedClasses = new Set<ClassEntity>();
 
-  /// The set of all referenced static fields.
-  ///
-  /// Invariant: Elements are declaration elements.
+  @override
   final Set<FieldEntity> allReferencedStaticFields = new Set<FieldEntity>();
 
-  /// Documentation wanted -- johnniwinther
-  ///
-  /// Invariant: Elements are declaration elements.
+  @override
   final Set<FunctionEntity> staticFunctionsNeedingGetter =
       new Set<FunctionEntity>();
+  @override
   final Set<FunctionEntity> methodsNeedingSuperGetter =
       new Set<FunctionEntity>();
   final Map<String, Map<Selector, SelectorConstraints>> _invokedNames =
@@ -187,6 +172,7 @@
   final Map<String, Set<MemberUsage>> _instanceFunctionsByName =
       <String, Set<MemberUsage>>{};
 
+  @override
   final Set<DartType> isChecks = new Set<DartType>();
 
   final SelectorConstraintsStrategy selectorConstraintsStrategy;
@@ -207,27 +193,21 @@
 
   GlobalLocalsMap get _globalLocalsMap => _world.globalLocalsMap;
 
+  @override
   Iterable<ClassEntity> get instantiatedClasses => _processedClasses.keys
       .where((cls) => _processedClasses[cls].isInstantiated);
 
-  /// All directly instantiated classes, that is, classes with a generative
-  /// constructor that has been called directly and not only through a
-  /// super-call.
   // TODO(johnniwinther): Improve semantic precision.
+  @override
   Iterable<ClassEntity> get directlyInstantiatedClasses {
     return _directlyInstantiatedClasses;
   }
 
-  /// All directly instantiated types, that is, the types of the directly
-  /// instantiated classes.
-  ///
-  /// See [directlyInstantiatedClasses].
   // TODO(johnniwinther): Improve semantic precision.
+  @override
   Iterable<InterfaceType> get instantiatedTypes => _instantiatedTypes;
 
   /// Register [type] as (directly) instantiated.
-  ///
-  /// If [byMirrors] is `true`, the instantiation is through mirrors.
   // TODO(johnniwinther): Fully enforce the separation between exact, through
   // subclass and through subtype instantiated types/classes.
   // TODO(johnniwinther): Support unknown type arguments for generic types.
@@ -276,11 +256,13 @@
     return _hasMatchingSelector(_invokedNames[member.name], member, _world);
   }
 
+  @override
   bool hasInvokedGetter(MemberEntity member) {
     return _hasMatchingSelector(_invokedGetters[member.name], member, _world) ||
         member.isFunction && methodsNeedingSuperGetter.contains(member);
   }
 
+  @override
   bool hasInvokedSetter(MemberEntity member) {
     return _hasMatchingSelector(_invokedSetters[member.name], member, _world);
   }
@@ -353,28 +335,34 @@
     return new UnmodifiableMapView(map);
   }
 
+  @override
   Map<Selector, SelectorConstraints> invocationsByName(String name) {
     return _asUnmodifiable(_invokedNames[name]);
   }
 
+  @override
   Map<Selector, SelectorConstraints> getterInvocationsByName(String name) {
     return _asUnmodifiable(_invokedGetters[name]);
   }
 
+  @override
   Map<Selector, SelectorConstraints> setterInvocationsByName(String name) {
     return _asUnmodifiable(_invokedSetters[name]);
   }
 
+  @override
   void forEachInvokedName(
       f(String name, Map<Selector, SelectorConstraints> selectors)) {
     _invokedNames.forEach(f);
   }
 
+  @override
   void forEachInvokedGetter(
       f(String name, Map<Selector, SelectorConstraints> selectors)) {
     _invokedGetters.forEach(f);
   }
 
+  @override
   void forEachInvokedSetter(
       f(String name, Map<Selector, SelectorConstraints> selectors)) {
     _invokedSetters.forEach(f);
@@ -412,7 +400,8 @@
       case StaticUseKind.INVOKE:
       case StaticUseKind.GET:
       case StaticUseKind.SET:
-      case StaticUseKind.INIT:
+      case StaticUseKind.FIELD_INIT:
+      case StaticUseKind.FIELD_CONSTANT_INIT:
         break;
     }
   }
@@ -453,7 +442,8 @@
       case StaticUseKind.SUPER_TEAR_OFF:
       case StaticUseKind.GET:
       case StaticUseKind.SET:
-      case StaticUseKind.INIT:
+      case StaticUseKind.FIELD_INIT:
+      case StaticUseKind.FIELD_CONSTANT_INIT:
         useSet.addAll(usage.normalUse());
         break;
       case StaticUseKind.CONSTRUCTOR_INVOKE:
@@ -490,29 +480,33 @@
     closurizedMembers.add(element);
   }
 
-  void processClassMembers(ClassEntity cls, MemberUsedCallback memberUsed) {
+  void processClassMembers(ClassEntity cls, MemberUsedCallback memberUsed,
+      {bool dryRun: false}) {
     _elementEnvironment.forEachClassMember(cls,
         (ClassEntity cls, MemberEntity member) {
-      _processInstantiatedClassMember(cls, member, memberUsed);
+      _processInstantiatedClassMember(cls, member, memberUsed, dryRun: dryRun);
     });
   }
 
   void _processInstantiatedClassMember(ClassEntity cls,
-      covariant MemberEntity member, MemberUsedCallback memberUsed) {
+      covariant MemberEntity member, MemberUsedCallback memberUsed,
+      {bool dryRun: false}) {
     if (!member.isInstanceMember) return;
     _getMemberUsage(member, memberUsed);
   }
 
   MemberUsage _getMemberUsage(
-      covariant MemberEntity member, MemberUsedCallback memberUsed) {
+      covariant MemberEntity member, MemberUsedCallback memberUsed,
+      {bool dryRun: false}) {
     // TODO(johnniwinther): Change [TypeMask] to not apply to a superclass
     // member unless the class has been instantiated. Similar to
     // [StrongModeConstraint].
-    return _instanceMemberUsage.putIfAbsent(member, () {
+    MemberUsage usage = _instanceMemberUsage[member];
+    if (usage == null) {
       String memberName = member.name;
       ClassEntity cls = member.enclosingClass;
       bool isNative = _nativeBasicData.isNativeClass(cls);
-      MemberUsage usage = new MemberUsage(member, isNative: isNative);
+      usage = new MemberUsage(member, isNative: isNative);
       EnumSet<MemberUse> useSet = new EnumSet<MemberUse>();
       useSet.addAll(usage.appliedUse);
       if (!usage.hasRead && hasInvokedGetter(member)) {
@@ -527,23 +521,30 @@
         useSet.addAll(usage.invoke(null));
       }
 
-      if (usage.hasPendingClosurizationUse) {
-        // Store the member in [instanceFunctionsByName] to catch
-        // getters on the function.
-        _instanceFunctionsByName
-            .putIfAbsent(usage.entity.name, () => new Set<MemberUsage>())
-            .add(usage);
-      }
-      if (usage.hasPendingNormalUse) {
-        // The element is not yet used. Add it to the list of instance
-        // members to still be processed.
-        _instanceMembersByName
-            .putIfAbsent(memberName, () => new Set<MemberUsage>())
-            .add(usage);
+      if (!dryRun) {
+        if (usage.hasPendingClosurizationUse) {
+          // Store the member in [instanceFunctionsByName] to catch
+          // getters on the function.
+          _instanceFunctionsByName
+              .putIfAbsent(usage.entity.name, () => new Set<MemberUsage>())
+              .add(usage);
+        }
+        if (usage.hasPendingNormalUse) {
+          // The element is not yet used. Add it to the list of instance
+          // members to still be processed.
+          _instanceMembersByName
+              .putIfAbsent(memberName, () => new Set<MemberUsage>())
+              .add(usage);
+        }
+        _instanceMemberUsage[member] = usage;
       }
       memberUsed(member, useSet);
-      return usage;
-    });
+    } else {
+      if (dryRun) {
+        usage = usage.clone();
+      }
+    }
+    return usage;
   }
 
   void _processSet(Map<String, Set<MemberUsage>> map, String memberName,
@@ -619,9 +620,7 @@
   /// Register the constant [use] with this world builder. Returns `true` if
   /// the constant use was new to the world.
   bool registerConstantUse(ConstantUse use) {
-    if (use.kind == ConstantUseKind.DIRECT) {
-      addCompileTimeConstantForEmission(use.value);
-    }
+    addCompileTimeConstantForEmission(use.value);
     return _constantValues.add(use.value);
   }
 
@@ -681,16 +680,6 @@
   }
 
   @override
-  bool hasConstantFieldInitializer(FieldEntity field) {
-    return _elementMap.hasConstantFieldInitializer(field);
-  }
-
-  @override
-  ConstantValue getConstantFieldInitializer(FieldEntity field) {
-    return _elementMap.getConstantFieldInitializer(field);
-  }
-
-  @override
   void forEachParameter(FunctionEntity function,
       void f(DartType type, String name, ConstantValue defaultValue)) {
     _elementMap.forEachParameter(function, f,
@@ -714,7 +703,8 @@
     _elementEnvironment.forEachClassMember(cls,
         (ClassEntity declarer, MemberEntity member) {
       if (member.isField && member.isInstanceMember) {
-        f(declarer, member, isElided: _world.elidedFields.contains(member));
+        f(declarer, member,
+            isElided: _world.fieldAnalysis.getFieldData(member).isElided);
       }
     });
   }
@@ -730,7 +720,7 @@
       if (declarer != cls) return;
       if (!member.isField) return;
       if (!member.isInstanceMember) return;
-      f(member, isElided: _world.elidedFields.contains(member));
+      f(member, isElided: _world.fieldAnalysis.getFieldData(member).isElided);
     });
   }
 
@@ -738,11 +728,13 @@
     _constTypeLiterals.add(type);
   }
 
+  @override
   Iterable<DartType> get constTypeLiterals => _constTypeLiterals;
 
   void registerTypeArgument(DartType type) {
     _liveTypeArguments.add(type);
   }
 
+  @override
   Iterable<DartType> get liveTypeArguments => _liveTypeArguments;
 }
diff --git a/pkg/compiler/lib/src/universe/feature.dart b/pkg/compiler/lib/src/universe/feature.dart
index 1367e6d..484ce10 100644
--- a/pkg/compiler/lib/src/universe/feature.dart
+++ b/pkg/compiler/lib/src/universe/feature.dart
@@ -103,12 +103,14 @@
 
   MapLiteralUse(this.type, {this.isConstant: false, this.isEmpty: false});
 
+  @override
   int get hashCode {
     return type.hashCode * 13 +
         isConstant.hashCode * 17 +
         isEmpty.hashCode * 19;
   }
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! MapLiteralUse) return false;
@@ -117,11 +119,38 @@
         isEmpty == other.isEmpty;
   }
 
+  @override
   String toString() {
     return 'MapLiteralUse($type,isConstant:$isConstant,isEmpty:$isEmpty)';
   }
 }
 
+/// Describes a use of a set literal in the program.
+class SetLiteralUse {
+  final InterfaceType type;
+  final bool isConstant;
+  final bool isEmpty;
+
+  SetLiteralUse(this.type, {this.isConstant: false, this.isEmpty: false});
+
+  @override
+  int get hashCode =>
+      type.hashCode * 13 + isConstant.hashCode * 17 + isEmpty.hashCode * 19;
+
+  @override
+  bool operator ==(other) {
+    if (identical(this, other)) return true;
+    if (other is! SetLiteralUse) return false;
+    return type == other.type &&
+        isConstant == other.isConstant &&
+        isEmpty == other.isEmpty;
+  }
+
+  @override
+  String toString() =>
+      'SetLiteralUse($type,isConstant:$isConstant,isEmpty:$isEmpty)';
+}
+
 /// Describes the use of a list literal in the program.
 class ListLiteralUse {
   final InterfaceType type;
@@ -130,12 +159,14 @@
 
   ListLiteralUse(this.type, {this.isConstant: false, this.isEmpty: false});
 
+  @override
   int get hashCode {
     return type.hashCode * 13 +
         isConstant.hashCode * 17 +
         isEmpty.hashCode * 19;
   }
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! ListLiteralUse) return false;
@@ -144,6 +175,7 @@
         isEmpty == other.isEmpty;
   }
 
+  @override
   String toString() {
     return 'ListLiteralUse($type,isConstant:$isConstant,isEmpty:$isEmpty)';
   }
@@ -162,11 +194,13 @@
 
   RuntimeTypeUse(this.kind, this.receiverType, this.argumentType);
 
+  @override
   int get hashCode =>
       kind.hashCode * 13 +
       receiverType.hashCode * 17 +
       argumentType.hashCode * 19;
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! RuntimeTypeUse) return false;
@@ -197,6 +231,7 @@
     return sb.toString();
   }
 
+  @override
   String toString() => 'RuntimeTypeUse(kind=$kind,receiver=$receiverType'
       ',argument=$argumentType)';
 }
@@ -215,9 +250,11 @@
   /// Short textual representation use for testing.
   String get shortText => '<${typeArguments.join(',')}>';
 
+  @override
   int get hashCode =>
       Hashing.listHash(typeArguments, Hashing.objectHash(functionType));
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! GenericInstantiation) return false;
@@ -225,6 +262,7 @@
         equalElements(typeArguments, other.typeArguments);
   }
 
+  @override
   String toString() {
     return 'GenericInstantiation(functionType:$functionType,'
         'typeArguments:$typeArguments)';
diff --git a/pkg/compiler/lib/src/universe/function_set.dart b/pkg/compiler/lib/src/universe/function_set.dart
index e8edd4b..d12781c 100644
--- a/pkg/compiler/lib/src/universe/function_set.dart
+++ b/pkg/compiler/lib/src/universe/function_set.dart
@@ -96,6 +96,7 @@
 class SelectorMask {
   final Selector selector;
   final AbstractValue receiver;
+  @override
   final int hashCode;
 
   SelectorMask(this.selector, this.receiver)
@@ -119,11 +120,13 @@
         .isPotentiallyTrue;
   }
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     return selector == other.selector && receiver == other.receiver;
   }
 
+  @override
   String toString() => '($selector,$receiver)';
 }
 
@@ -238,6 +241,7 @@
     return result;
   }
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write('FunctionSetNode(');
@@ -273,6 +277,7 @@
   @override
   Iterable<MemberEntity> get functions => const <MemberEntity>[];
 
+  @override
   String toString() => '<empty>';
 }
 
@@ -289,5 +294,6 @@
     return _receiver ??= domain.computeReceiver(functions);
   }
 
+  @override
   String toString() => '$_receiver:$functions';
 }
diff --git a/pkg/compiler/lib/src/universe/member_usage.dart b/pkg/compiler/lib/src/universe/member_usage.dart
index b0898df..e368cbb 100644
--- a/pkg/compiler/lib/src/universe/member_usage.dart
+++ b/pkg/compiler/lib/src/universe/member_usage.dart
@@ -5,15 +5,18 @@
 import 'dart:math' as Math;
 
 import '../common.dart';
+import '../constants/values.dart';
 import '../elements/entities.dart';
 import '../js_model/elements.dart' show JSignatureMethod;
 import '../util/enumset.dart';
 import 'call_structure.dart';
 
 abstract class AbstractUsage<T> {
-  final EnumSet<T> _pendingUse = new EnumSet<T>();
+  final EnumSet<T> _pendingUse;
 
-  AbstractUsage() {
+  AbstractUsage.cloned(this._pendingUse);
+
+  AbstractUsage() : this._pendingUse = new EnumSet<T>() {
     _pendingUse.addAll(_originalUse);
   }
 
@@ -37,7 +40,10 @@
 abstract class MemberUsage extends AbstractUsage<MemberUse> {
   final MemberEntity entity;
 
-  MemberUsage.internal(this.entity);
+  MemberUsage.internal(this.entity) : super();
+
+  MemberUsage.cloned(this.entity, EnumSet<MemberUse> pendingUse)
+      : super.cloned(pendingUse);
 
   factory MemberUsage(MemberEntity member,
       {bool isNative: false, bool trackParameters: false}) {
@@ -70,6 +76,8 @@
   /// `true` if [entity] has been initialized.
   bool get hasInit => true;
 
+  Iterable<ConstantValue> get initialConstants => null;
+
   /// `true` if [entity] has been read as a value. For a field this is a normal
   /// read access, for a function this is a closurization.
   bool get hasRead => false;
@@ -115,6 +123,13 @@
   /// no-op.
   EnumSet<MemberUse> init() => MemberUses.NONE;
 
+  /// Registers the [entity] has been initialized with [constant] and returns
+  /// the new [MemberUse]s that it caused.
+  ///
+  /// For a field this is the initial write access, for a function this is a
+  /// no-op.
+  EnumSet<MemberUse> constantInit(ConstantValue constant) => MemberUses.NONE;
+
   /// Registers a read of the value of [entity] and returns the new [MemberUse]s
   /// that it caused.
   ///
@@ -140,24 +155,55 @@
   @override
   EnumSet<MemberUse> get _originalUse => MemberUses.NORMAL_ONLY;
 
+  @override
   int get hashCode => entity.hashCode;
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! MemberUsage) return false;
     return entity == other.entity;
   }
 
+  MemberUsage clone();
+
+  bool dataEquals(MemberUsage other) {
+    assert(entity == other.entity);
+    return hasInit == other.hasInit &&
+        hasRead == other.hasRead &&
+        hasInvoke == other.hasInvoke &&
+        hasWrite == other.hasWrite &&
+        hasPendingClosurizationUse == other.hasPendingClosurizationUse &&
+        hasPendingNormalUse == other.hasPendingNormalUse &&
+        fullyUsed == other.fullyUsed &&
+        isFullyInvoked == other.isFullyInvoked &&
+        _pendingUse == other._pendingUse &&
+        appliedUse == other.appliedUse;
+  }
+
+  @override
   String toString() => '$entity:${appliedUse.iterable(MemberUse.values)}';
 }
 
 class FieldUsage extends MemberUsage {
-  bool hasInit = false;
-  bool hasRead = false;
-  bool hasWrite = false;
+  @override
+  bool hasInit;
+  @override
+  bool hasRead;
+  @override
+  bool hasWrite;
+
+  List<ConstantValue> _initialConstants;
+
+  FieldUsage.cloned(FieldEntity field, EnumSet<MemberUse> pendingUse,
+      {this.hasInit, this.hasRead, this.hasWrite})
+      : super.cloned(field, pendingUse);
 
   FieldUsage(FieldEntity field, {bool isNative: false})
-      : super.internal(field) {
+      : hasInit = false,
+        hasRead = false,
+        hasWrite = false,
+        super.internal(field) {
     // TODO(johnniwinther): Track native fields through member usage.
     if (!isNative) {
       init();
@@ -165,6 +211,9 @@
   }
 
   @override
+  Iterable<ConstantValue> get initialConstants => _initialConstants ?? const [];
+
+  @override
   bool get hasPendingNormalUse => !fullyUsed;
 
   @override
@@ -184,6 +233,13 @@
   }
 
   @override
+  EnumSet<MemberUse> constantInit(ConstantValue constant) {
+    _initialConstants ??= [];
+    _initialConstants.add(constant);
+    return init();
+  }
+
+  @override
   EnumSet<MemberUse> read() {
     if (hasRead) {
       return MemberUses.NONE;
@@ -221,22 +277,43 @@
     return _pendingUse.removeAll(MemberUses.NORMAL_ONLY);
   }
 
+  @override
+  MemberUsage clone() {
+    return new FieldUsage.cloned(entity, _pendingUse.clone(),
+        hasInit: hasInit, hasRead: hasRead, hasWrite: hasWrite);
+  }
+
+  @override
   String toString() => 'FieldUsage($entity,hasInit=$hasInit,hasRead=$hasRead,'
-      'hasWrite=$hasWrite,pendingUse=${_pendingUse.iterable(MemberUse.values)}';
+      'hasWrite=$hasWrite,pendingUse=${_pendingUse.iterable(MemberUse.values)},'
+      'initialConstants=${initialConstants.map((c) => c.toStructuredText())})';
 }
 
 class FinalFieldUsage extends MemberUsage {
-  bool hasInit = false;
-  bool hasRead = false;
+  @override
+  bool hasInit;
+  @override
+  bool hasRead;
+
+  List<ConstantValue> _initialConstants;
+
+  FinalFieldUsage.cloned(FieldEntity field, EnumSet<MemberUse> pendingUse,
+      {this.hasInit, this.hasRead})
+      : super.cloned(field, pendingUse);
 
   FinalFieldUsage(FieldEntity field, {bool isNative: false})
-      : super.internal(field) {
+      : this.hasInit = false,
+        this.hasRead = false,
+        super.internal(field) {
     if (!isNative) {
       init();
     }
   }
 
   @override
+  Iterable<ConstantValue> get initialConstants => _initialConstants ?? const [];
+
+  @override
   bool get hasPendingNormalUse => !fullyUsed;
 
   @override
@@ -256,6 +333,13 @@
   }
 
   @override
+  EnumSet<MemberUse> constantInit(ConstantValue constant) {
+    _initialConstants ??= [];
+    _initialConstants.add(constant);
+    return init();
+  }
+
+  @override
   EnumSet<MemberUse> read() {
     if (hasRead) {
       return MemberUses.NONE;
@@ -280,15 +364,32 @@
     return _pendingUse.removeAll(MemberUses.NORMAL_ONLY);
   }
 
+  @override
+  MemberUsage clone() {
+    return new FinalFieldUsage.cloned(entity, _pendingUse.clone(),
+        hasInit: hasInit, hasRead: hasRead);
+  }
+
+  @override
   String toString() => 'FinalFieldUsage($entity,hasInit=$hasInit,'
-      'hasRead=$hasRead,pendingUse=${_pendingUse.iterable(MemberUse.values)}';
+      'hasRead=$hasRead,pendingUse=${_pendingUse.iterable(MemberUse.values)},'
+      'initialConstants=${initialConstants.map((c) => c.toStructuredText())})';
 }
 
 class FunctionUsage extends MemberUsage {
-  bool hasInvoke = false;
-  bool hasRead = false;
+  @override
+  bool hasInvoke;
+  @override
+  bool hasRead;
 
-  FunctionUsage(FunctionEntity function) : super.internal(function) {
+  FunctionUsage.cloned(FunctionEntity function, EnumSet<MemberUse> pendingUse,
+      {this.hasInvoke, this.hasRead})
+      : super.cloned(function, pendingUse);
+
+  FunctionUsage(FunctionEntity function)
+      : this.hasInvoke = false,
+        this.hasRead = false,
+        super.internal(function) {
     if (function is JSignatureMethod) {
       // We mark signature methods as "always used" to prevent them from being
       // optimized away.
@@ -297,11 +398,14 @@
     }
   }
 
+  @override
   FunctionEntity get entity => super.entity;
 
+  @override
   EnumSet<MemberUse> get _originalUse =>
       entity.isInstanceMember ? MemberUses.ALL_INSTANCE : MemberUses.ALL_STATIC;
 
+  @override
   bool get hasPendingClosurizationUse => entity.isInstanceMember
       ? _pendingUse.contains(MemberUse.CLOSURIZE_INSTANCE)
       : _pendingUse.contains(MemberUse.CLOSURIZE_STATIC);
@@ -346,15 +450,28 @@
   @override
   ParameterStructure get invokedParameters =>
       hasInvoke ? entity.parameterStructure : null;
+
+  @override
+  MemberUsage clone() {
+    return new FunctionUsage.cloned(entity, _pendingUse.clone(),
+        hasInvoke: hasInvoke, hasRead: hasRead);
+  }
 }
 
 class ParameterTrackingFunctionUsage extends MemberUsage {
-  bool hasRead = false;
+  @override
+  bool hasRead;
 
   final ParameterUsage _parameterUsage;
 
+  ParameterTrackingFunctionUsage.cloned(FunctionEntity function,
+      this._parameterUsage, EnumSet<MemberUse> pendingUse,
+      {this.hasRead})
+      : super.cloned(function, pendingUse);
+
   ParameterTrackingFunctionUsage(FunctionEntity function)
-      : _parameterUsage = new ParameterUsage(function.parameterStructure),
+      : hasRead = false,
+        _parameterUsage = new ParameterUsage(function.parameterStructure),
         super.internal(function) {
     if (function is JSignatureMethod) {
       // We mark signature methods as "always used" to prevent them from being
@@ -364,12 +481,15 @@
     }
   }
 
+  @override
   bool get hasInvoke => _parameterUsage.hasInvoke;
 
+  @override
   bool get hasPendingClosurizationUse => entity.isInstanceMember
       ? _pendingUse.contains(MemberUse.CLOSURIZE_INSTANCE)
       : _pendingUse.contains(MemberUse.CLOSURIZE_STATIC);
 
+  @override
   EnumSet<MemberUse> get _originalUse =>
       entity.isInstanceMember ? MemberUses.ALL_INSTANCE : MemberUses.ALL_STATIC;
 
@@ -420,6 +540,7 @@
   @override
   bool get hasPendingNormalUse => !isFullyInvoked;
 
+  @override
   bool get isFullyInvoked => _parameterUsage.isFullyUsed;
 
   @override
@@ -427,12 +548,26 @@
 
   @override
   ParameterStructure get invokedParameters => _parameterUsage.invokedParameters;
+
+  @override
+  MemberUsage clone() {
+    return new ParameterTrackingFunctionUsage.cloned(
+        entity, _parameterUsage.clone(), _pendingUse.clone(),
+        hasRead: hasRead);
+  }
 }
 
 class GetterUsage extends MemberUsage {
-  bool hasRead = false;
+  @override
+  bool hasRead;
 
-  GetterUsage(FunctionEntity getter) : super.internal(getter);
+  GetterUsage.cloned(FunctionEntity getter, EnumSet<MemberUse> pendingUse,
+      {this.hasRead})
+      : super.cloned(getter, pendingUse);
+
+  GetterUsage(FunctionEntity getter)
+      : hasRead = false,
+        super.internal(getter);
 
   @override
   bool get fullyUsed => hasRead;
@@ -451,12 +586,25 @@
 
   @override
   EnumSet<MemberUse> fullyUse() => read();
+
+  @override
+  MemberUsage clone() {
+    return new GetterUsage.cloned(entity, _pendingUse.clone(),
+        hasRead: hasRead);
+  }
 }
 
 class SetterUsage extends MemberUsage {
-  bool hasWrite = false;
+  @override
+  bool hasWrite;
 
-  SetterUsage(FunctionEntity setter) : super.internal(setter);
+  SetterUsage.cloned(FunctionEntity setter, EnumSet<MemberUse> pendingUse,
+      {this.hasWrite})
+      : super.cloned(setter, pendingUse);
+
+  SetterUsage(FunctionEntity setter)
+      : hasWrite = false,
+        super.internal(setter);
 
   @override
   bool get fullyUsed => hasWrite;
@@ -472,15 +620,31 @@
 
   @override
   EnumSet<MemberUse> fullyUse() => write();
+
+  @override
+  MemberUsage clone() {
+    return new SetterUsage.cloned(entity, _pendingUse.clone(),
+        hasWrite: hasWrite);
+  }
 }
 
 class ConstructorUsage extends MemberUsage {
-  bool hasInvoke = false;
+  @override
+  bool hasInvoke;
 
-  ConstructorUsage(ConstructorEntity constructor) : super.internal(constructor);
+  ConstructorUsage.cloned(
+      ConstructorEntity constructor, EnumSet<MemberUse> pendingUse,
+      {this.hasInvoke})
+      : super.cloned(constructor, pendingUse);
 
+  ConstructorUsage(ConstructorEntity constructor)
+      : hasInvoke = false,
+        super.internal(constructor);
+
+  @override
   ConstructorEntity get entity => super.entity;
 
+  @override
   EnumSet<MemberUse> get _originalUse => MemberUses.NORMAL_ONLY;
 
   @override
@@ -503,17 +667,29 @@
   @override
   ParameterStructure get invokedParameters =>
       hasInvoke ? entity.parameterStructure : null;
+
+  @override
+  MemberUsage clone() {
+    return new ConstructorUsage.cloned(entity, _pendingUse.clone(),
+        hasInvoke: hasInvoke);
+  }
 }
 
 class ParameterTrackingConstructorUsage extends MemberUsage {
   final ParameterUsage _parameterUsage;
 
+  ParameterTrackingConstructorUsage.cloned(ConstructorEntity constructor,
+      this._parameterUsage, EnumSet<MemberUse> pendingUse)
+      : super.cloned(constructor, pendingUse);
+
   ParameterTrackingConstructorUsage(ConstructorEntity constructor)
       : _parameterUsage = new ParameterUsage(constructor.parameterStructure),
         super.internal(constructor);
 
+  @override
   ConstructorEntity get entity => super.entity;
 
+  @override
   EnumSet<MemberUse> get _originalUse => MemberUses.NORMAL_ONLY;
 
   @override
@@ -548,10 +724,17 @@
   @override
   bool get hasPendingNormalUse => !isFullyInvoked;
 
+  @override
   bool get isFullyInvoked => _parameterUsage.isFullyUsed;
 
   @override
   ParameterStructure get invokedParameters => _parameterUsage.invokedParameters;
+
+  @override
+  MemberUsage clone() {
+    return new ParameterTrackingConstructorUsage.cloned(
+        entity, _parameterUsage.clone(), _pendingUse.clone());
+  }
 }
 
 /// Enum class for the possible kind of use of [MemberEntity] objects.
@@ -599,7 +782,7 @@
 
   final ClassEntity cls;
 
-  ClassUsage(this.cls);
+  ClassUsage(this.cls) : super();
 
   EnumSet<ClassUse> instantiate() {
     if (isInstantiated) {
@@ -620,6 +803,7 @@
   @override
   EnumSet<ClassUse> get _originalUse => ClassUses.ALL;
 
+  @override
   String toString() => '$cls:${appliedUse.iterable(ClassUse.values)}';
 }
 
@@ -641,12 +825,19 @@
 // TODO(johnniwinther): Merge this with [MemberUsage].
 abstract class StaticMemberUsage extends AbstractUsage<MemberUse>
     implements MemberUsage {
+  @override
   final MemberEntity entity;
 
-  bool hasNormalUse = false;
+  bool hasNormalUse;
   bool get hasClosurization => false;
 
-  StaticMemberUsage.internal(this.entity);
+  StaticMemberUsage.cloned(this.entity, EnumSet<MemberUse> pendingUse,
+      {this.hasNormalUse: false})
+      : super.cloned(pendingUse);
+
+  StaticMemberUsage.internal(this.entity)
+      : this.hasNormalUse = false,
+        super();
 
   EnumSet<MemberUse> normalUse() {
     if (hasNormalUse) {
@@ -658,17 +849,28 @@
 
   EnumSet<MemberUse> tearOff();
 
+  @override
   EnumSet<MemberUse> init() => normalUse();
 
+  @override
+  EnumSet<MemberUse> constantInit(ConstantValue constant) => normalUse();
+
+  @override
   EnumSet<MemberUse> read() => tearOff();
 
+  @override
   EnumSet<MemberUse> write() => normalUse();
 
+  @override
   EnumSet<MemberUse> invoke(CallStructure callStructure) => normalUse();
 
+  @override
   EnumSet<MemberUse> fullyUse() => normalUse();
 
   @override
+  Iterable<ConstantValue> get initialConstants => null;
+
+  @override
   bool get hasPendingNormalUse => _pendingUse.contains(MemberUse.NORMAL);
 
   @override
@@ -677,12 +879,34 @@
   @override
   EnumSet<MemberUse> get _originalUse => MemberUses.NORMAL_ONLY;
 
+  @override
+  bool dataEquals(MemberUsage other) {
+    assert(entity == other.entity);
+    return hasInit == other.hasInit &&
+        hasRead == other.hasRead &&
+        hasInvoke == other.hasInvoke &&
+        hasWrite == other.hasWrite &&
+        hasPendingClosurizationUse == other.hasPendingClosurizationUse &&
+        hasPendingNormalUse == other.hasPendingNormalUse &&
+        fullyUsed == other.fullyUsed &&
+        isFullyInvoked == other.isFullyInvoked &&
+        _pendingUse == other._pendingUse &&
+        appliedUse == other.appliedUse;
+  }
+
+  @override
   String toString() => '$entity:${appliedUse.iterable(MemberUse.values)}';
 }
 
 class GeneralStaticMemberUsage extends StaticMemberUsage {
   GeneralStaticMemberUsage(MemberEntity entity) : super.internal(entity);
 
+  GeneralStaticMemberUsage.cloned(
+      MemberEntity entity, EnumSet<MemberUse> pendingUse,
+      {bool hasNormalUse})
+      : super.cloned(entity, pendingUse, hasNormalUse: hasNormalUse);
+
+  @override
   EnumSet<MemberUse> tearOff() => normalUse();
 
   @override
@@ -705,18 +929,34 @@
 
   @override
   ParameterStructure get invokedParameters => null;
+
+  @override
+  MemberUsage clone() {
+    return new GeneralStaticMemberUsage.cloned(entity, _pendingUse.clone(),
+        hasNormalUse: hasNormalUse);
+  }
 }
 
 class StaticFunctionUsage extends StaticMemberUsage {
-  bool hasClosurization = false;
+  @override
+  bool hasClosurization;
 
-  StaticFunctionUsage(FunctionEntity entity) : super.internal(entity);
+  StaticFunctionUsage(FunctionEntity entity)
+      : hasClosurization = false,
+        super.internal(entity);
 
+  StaticFunctionUsage.cloned(
+      FunctionEntity entity, EnumSet<MemberUse> pendingUse,
+      {bool hasNormalUse, this.hasClosurization})
+      : super.cloned(entity, pendingUse, hasNormalUse: hasNormalUse);
+
+  @override
   FunctionEntity get entity => super.entity;
 
   @override
   bool get hasInit => true;
 
+  @override
   EnumSet<MemberUse> tearOff() {
     if (hasClosurization) {
       return MemberUses.NONE;
@@ -747,6 +987,12 @@
   @override
   ParameterStructure get invokedParameters =>
       hasInvoke ? entity.parameterStructure : null;
+
+  @override
+  MemberUsage clone() {
+    return new StaticFunctionUsage.cloned(entity, _pendingUse.clone(),
+        hasNormalUse: hasNormalUse, hasClosurization: hasClosurization);
+  }
 }
 
 /// Object used for tracking parameter use in constructor and method
@@ -787,6 +1033,16 @@
     }
   }
 
+  ParameterUsage.cloned(this._parameterStructure,
+      {bool hasInvoke,
+      int providedPositionalParameters,
+      bool areAllTypeParametersProvided,
+      Set<String> unprovidedNamedParameters})
+      : _hasInvoke = hasInvoke,
+        _providedPositionalParameters = providedPositionalParameters,
+        _areAllTypeParametersProvided = areAllTypeParametersProvided,
+        _unprovidedNamedParameters = unprovidedNamedParameters;
+
   bool invoke(CallStructure callStructure) {
     if (isFullyUsed) return false;
     _hasInvoke = true;
@@ -848,4 +1104,12 @@
                 .toList(),
         _areAllTypeParametersProvided ? _parameterStructure.typeParameters : 0);
   }
+
+  ParameterUsage clone() {
+    return new ParameterUsage.cloned(_parameterStructure,
+        hasInvoke: _hasInvoke,
+        providedPositionalParameters: _providedPositionalParameters,
+        areAllTypeParametersProvided: _areAllTypeParametersProvided,
+        unprovidedNamedParameters: _unprovidedNamedParameters?.toSet());
+  }
 }
diff --git a/pkg/compiler/lib/src/universe/resolution_world_builder.dart b/pkg/compiler/lib/src/universe/resolution_world_builder.dart
index da4c609..7415ea2 100644
--- a/pkg/compiler/lib/src/universe/resolution_world_builder.dart
+++ b/pkg/compiler/lib/src/universe/resolution_world_builder.dart
@@ -10,7 +10,7 @@
 import '../elements/types.dart';
 import '../ir/static_type.dart';
 import '../js_backend/annotations.dart';
-import '../js_backend/allocator_analysis.dart' show KAllocatorAnalysis;
+import '../js_backend/field_analysis.dart' show KFieldAnalysis;
 import '../js_backend/backend_usage.dart'
     show BackendUsage, BackendUsageBuilder;
 import '../js_backend/interceptor_data.dart' show InterceptorDataBuilder;
@@ -99,8 +99,6 @@
   void registerClosurizedMember(MemberEntity element);
 
   /// Register [type] as (directly) instantiated.
-  ///
-  /// If [byMirrors] is `true`, the instantiation is through mirrors.
   // TODO(johnniwinther): Fully enforce the separation between exact, through
   // subclass and through subtype instantiated types/classes.
   // TODO(johnniwinther): Support unknown type arguments for generic types.
@@ -110,7 +108,8 @@
 
   /// Computes usage for all members declared by [cls]. Calls [membersUsed] with
   /// the usage changes for each member.
-  void processClassMembers(ClassEntity cls, MemberUsedCallback memberUsed);
+  void processClassMembers(ClassEntity cls, MemberUsedCallback memberUsed,
+      {bool dryRun: false});
 
   /// Applies the [dynamicUse] to applicable instance members. Calls
   /// [membersUsed] with the usage changes for each member.
@@ -144,11 +143,13 @@
 
   Instance(this.type, this.kind, {this.isRedirection: false});
 
+  @override
   int get hashCode {
     return Hashing.objectHash(
         type, Hashing.objectHash(kind, Hashing.objectHash(isRedirection)));
   }
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! Instance) return false;
@@ -157,6 +158,7 @@
         isRedirection == other.isRedirection;
   }
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write(type);
@@ -270,6 +272,7 @@
   /// `true` if the class is abstractly instantiated.
   bool isAbstractlyInstantiated = false;
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write('InstantiationInfo[');
@@ -365,12 +368,14 @@
   final Map<String, Set<MemberUsage>> _instanceFunctionsByName =
       <String, Set<MemberUsage>>{};
 
-  /// Fields set.
+  @override
   final Set<FieldEntity> fieldSetters = new Set<FieldEntity>();
+  @override
   final Set<DartType> isChecks = new Set<DartType>();
 
   /// Set of all closures in the program. Used by the mirror tracking system
   /// to find all live closure instances.
+  @override
   final Set<Local> localFunctions = new Set<Local>();
 
   /// Set of live local functions (closures) whose signatures reference type
@@ -378,12 +383,10 @@
   ///
   /// A local function is considered live if the enclosing member function is
   /// live.
+  @override
   final Set<Local> localFunctionsWithFreeTypeVariables = new Set<Local>();
 
-  /// Set of live closurized members whose signatures reference type variables.
-  ///
-  /// A closurized method is considered live if the enclosing class has been
-  /// instantiated.
+  @override
   final Set<FunctionEntity> closurizedMembersWithFreeTypeVariables =
       new Set<FunctionEntity>();
 
@@ -397,7 +400,7 @@
   final InterceptorDataBuilder _interceptorDataBuilder;
   final BackendUsageBuilder _backendUsageBuilder;
   final RuntimeTypesNeedBuilder _rtiNeedBuilder;
-  final KAllocatorAnalysis _allocatorAnalysis;
+  final KFieldAnalysis _allocatorAnalysis;
   final NativeResolutionEnqueuer _nativeResolutionEnqueuer;
   final NoSuchMethodRegistry _noSuchMethodRegistry;
   final AnnotationsDataBuilder _annotationsDataBuilder;
@@ -415,6 +418,7 @@
 
   final Set<ConstantValue> _constantValues = new Set<ConstantValue>();
 
+  @override
   final Set<Local> genericLocalFunctions = new Set<Local>();
 
   Set<MemberEntity> _processedMembers = new Set<MemberEntity>();
@@ -442,16 +446,20 @@
       this._classHierarchyBuilder,
       this._classQueries);
 
+  @override
   Iterable<ClassEntity> get processedClasses => _processedClasses.keys
       .where((cls) => _processedClasses[cls].isInstantiated);
 
+  @override
   bool isMemberProcessed(MemberEntity member) =>
       _processedMembers.contains(member);
 
+  @override
   void registerProcessedMember(MemberEntity member) {
     _processedMembers.add(member);
   }
 
+  @override
   Iterable<FunctionEntity> get genericInstanceMethods {
     List<FunctionEntity> functions = <FunctionEntity>[];
     for (MemberEntity member in processedMembers) {
@@ -464,6 +472,7 @@
     return functions;
   }
 
+  @override
   Iterable<FunctionEntity> get userNoSuchMethods {
     List<FunctionEntity> functions = <FunctionEntity>[];
     for (MemberEntity member in processedMembers) {
@@ -477,8 +486,10 @@
     return functions;
   }
 
+  @override
   Iterable<MemberEntity> get processedMembers => _processedMembers;
 
+  @override
   KClosedWorld get closedWorldForTesting {
     if (!_closed) {
       failedAt(
@@ -487,10 +498,8 @@
     return _closedWorldCache;
   }
 
-  /// All directly instantiated classes, that is, classes with a generative
-  /// constructor that has been called directly and not only through a
-  /// super-call.
   // TODO(johnniwinther): Improve semantic precision.
+  @override
   Iterable<ClassEntity> get directlyInstantiatedClasses {
     Set<ClassEntity> classes = new Set<ClassEntity>();
     getInstantiationMap().forEach((ClassEntity cls, InstantiationInfo info) {
@@ -501,11 +510,8 @@
     return classes;
   }
 
-  /// All directly instantiated types, that is, the types of the directly
-  /// instantiated classes.
-  ///
-  /// See [directlyInstantiatedClasses].
   // TODO(johnniwinther): Improve semantic precision.
+  @override
   Iterable<InterfaceType> get instantiatedTypes {
     Set<InterfaceType> types = new Set<InterfaceType>();
     getInstantiationMap().forEach((_, InstantiationInfo info) {
@@ -520,10 +526,12 @@
     return types;
   }
 
+  @override
   bool isImplemented(ClassEntity cls) {
     return _implementedClasses.contains(cls);
   }
 
+  @override
   void registerClosurizedMember(MemberEntity element) {
     closurizedMembers.add(element);
     FunctionType type = _elementEnvironment.getFunctionType(element);
@@ -532,12 +540,10 @@
     }
   }
 
-  /// Register [type] as (directly) instantiated.
-  ///
-  /// If [byMirrors] is `true`, the instantiation is through mirrors.
   // TODO(johnniwinther): Fully enforce the separation between exact, through
   // subclass and through subtype instantiated types/classes.
   // TODO(johnniwinther): Support unknown type arguments for generic types.
+  @override
   void registerTypeInstantiation(
       InterfaceType type, ClassUsedCallback classUsed,
       {ConstructorEntity constructor, bool isRedirection: false}) {
@@ -628,10 +634,12 @@
         member.isFunction && methodsNeedingSuperGetter.contains(member);
   }
 
+  @override
   bool hasInvokedSetter(MemberEntity member) {
     return _hasMatchingSelector(_invokedSetters[member.name], member);
   }
 
+  @override
   void registerDynamicUse(
       DynamicUse dynamicUse, MemberUsedCallback memberUsed) {
     Selector selector = dynamicUse.selector;
@@ -696,14 +704,17 @@
     return constraints.addReceiverConstraint(constraint);
   }
 
+  @override
   void registerIsCheck(covariant DartType type) {
     isChecks.add(type);
   }
 
+  @override
   bool registerConstantUse(ConstantUse use) {
     return _constantValues.add(use.value);
   }
 
+  @override
   void registerStaticUse(StaticUse staticUse, MemberUsedCallback memberUsed) {
     if (staticUse.kind == StaticUseKind.CLOSURE) {
       Local localFunction = staticUse.element;
@@ -728,11 +739,7 @@
 
     MemberEntity element = staticUse.element;
     EnumSet<MemberUse> useSet = new EnumSet<MemberUse>();
-    MemberUsage usage = _memberUsage.putIfAbsent(element, () {
-      MemberUsage usage = new MemberUsage(element, trackParameters: true);
-      useSet.addAll(usage.appliedUse);
-      return usage;
-    });
+    MemberUsage usage = _getMemberUsage(element, useSet);
 
     if ((element.isStatic || element.isTopLevel) && element.isField) {
       allReferencedStaticFields.add(staticUse.element);
@@ -769,9 +776,12 @@
       case StaticUseKind.SET:
         useSet.addAll(usage.write());
         break;
-      case StaticUseKind.INIT:
+      case StaticUseKind.FIELD_INIT:
         useSet.addAll(usage.init());
         break;
+      case StaticUseKind.FIELD_CONSTANT_INIT:
+        useSet.addAll(usage.constantInit(staticUse.constant));
+        break;
       case StaticUseKind.INVOKE:
         registerStaticInvocation(staticUse);
         useSet.addAll(usage.invoke(staticUse.callStructure));
@@ -826,12 +836,12 @@
     }
   }
 
-  /// Computes usage for all members declared by [cls]. Calls [membersUsed] with
-  /// the usage changes for each member.
-  void processClassMembers(ClassEntity cls, MemberUsedCallback memberUsed) {
+  @override
+  void processClassMembers(ClassEntity cls, MemberUsedCallback memberUsed,
+      {bool dryRun: false}) {
     _elementEnvironment.forEachClassMember(cls,
         (ClassEntity cls, MemberEntity member) {
-      _processInstantiatedClassMember(cls, member, memberUsed);
+      _processInstantiatedClassMember(cls, member, memberUsed, dryRun: dryRun);
     });
   }
 
@@ -855,102 +865,139 @@
     map[memberName].addAll(remaining);
   }
 
+  MemberUsage _getMemberUsage(MemberEntity member, EnumSet<MemberUse> useSet,
+      {bool dryRun: false}) {
+    MemberUsage usage = _memberUsage[member];
+    if (usage == null) {
+      if (member.isInstanceMember) {
+        String memberName = member.name;
+        ClassEntity cls = member.enclosingClass;
+        // TODO(johnniwinther): Change this to use isNativeMember when we use
+        // CFE constants.
+        // The obvious thing to test here would be "member.isNative",
+        // however, that only works after metadata has been parsed/analyzed,
+        // and that may not have happened yet.
+        // So instead we use the enclosing class, which we know have had
+        // its metadata parsed and analyzed.
+        // Note: this assumes that there are no non-native fields on native
+        // classes, which may not be the case when a native class is subclassed.
+        bool isNative = _nativeBasicData.isNativeClass(cls);
+        usage =
+            new MemberUsage(member, isNative: isNative, trackParameters: true);
+        useSet.addAll(usage.appliedUse);
+        if (!dryRun) {
+          if (member.isField && isNative) {
+            registerUsedElement(member);
+          }
+          if (member.isFunction &&
+              member.name == Identifiers.call &&
+              _elementEnvironment.isGenericClass(cls)) {
+            closurizedMembersWithFreeTypeVariables.add(member);
+          }
+        }
+
+        if (!usage.hasRead && _hasInvokedGetter(member)) {
+          useSet.addAll(usage.read());
+        }
+        if (!usage.isFullyInvoked) {
+          Iterable<CallStructure> callStructures =
+              _getInvocationCallStructures(member);
+          for (CallStructure callStructure in callStructures) {
+            useSet.addAll(usage.invoke(callStructure));
+            if (usage.isFullyInvoked) {
+              break;
+            }
+          }
+        }
+        if (!usage.hasWrite && hasInvokedSetter(member)) {
+          useSet.addAll(usage.write());
+        }
+
+        if (!dryRun) {
+          if (usage.hasPendingNormalUse) {
+            // The element is not yet used. Add it to the list of instance
+            // members to still be processed.
+            _instanceMembersByName
+                .putIfAbsent(memberName, () => new Set<MemberUsage>())
+                .add(usage);
+          }
+          if (usage.hasPendingClosurizationUse) {
+            // Store the member in [instanceFunctionsByName] to catch
+            // getters on the function.
+            _instanceFunctionsByName
+                .putIfAbsent(memberName, () => new Set<MemberUsage>())
+                .add(usage);
+          }
+        }
+      } else {
+        usage = new MemberUsage(member, trackParameters: true);
+        useSet.addAll(usage.appliedUse);
+      }
+    }
+    if (!dryRun) {
+      _memberUsage[member] = usage;
+    }
+    return usage;
+  }
+
   void _processInstantiatedClassMember(ClassEntity cls,
-      covariant MemberEntity member, MemberUsedCallback memberUsed) {
+      covariant MemberEntity member, MemberUsedCallback memberUsed,
+      {bool dryRun: false}) {
     if (!member.isInstanceMember) return;
     String memberName = member.name;
-    // The obvious thing to test here would be "member.isNative",
-    // however, that only works after metadata has been parsed/analyzed,
-    // and that may not have happened yet.
-    // So instead we use the enclosing class, which we know have had
-    // its metadata parsed and analyzed.
-    // Note: this assumes that there are no non-native fields on native
-    // classes, which may not be the case when a native class is subclassed.
-    bool newUsage = false;
-    MemberUsage usage = _memberUsage.putIfAbsent(member, () {
-      newUsage = true;
-      bool isNative = _nativeBasicData.isNativeClass(cls);
-      EnumSet<MemberUse> useSet = new EnumSet<MemberUse>();
-      MemberUsage usage =
-          new MemberUsage(member, isNative: isNative, trackParameters: true);
-      useSet.addAll(usage.appliedUse);
-      if (member.isField && isNative) {
-        registerUsedElement(member);
-      }
-      if (member.isFunction &&
-          member.name == Identifiers.call &&
-          _elementEnvironment.isGenericClass(cls)) {
-        closurizedMembersWithFreeTypeVariables.add(member);
-      }
 
-      if (!usage.hasRead && _hasInvokedGetter(member)) {
-        useSet.addAll(usage.read());
+    MemberUsage usage = _memberUsage[member];
+    if (usage == null) {
+      EnumSet<MemberUse> useSet = new EnumSet<MemberUse>();
+      usage = _getMemberUsage(member, useSet, dryRun: dryRun);
+      memberUsed(usage.entity, useSet);
+    } else {
+      MemberUsage original = usage;
+      if (dryRun) {
+        usage = usage.clone();
       }
-      if (!usage.isFullyInvoked) {
-        Iterable<CallStructure> callStructures =
-            _getInvocationCallStructures(member);
-        for (CallStructure callStructure in callStructures) {
-          useSet.addAll(usage.invoke(callStructure));
-          if (usage.isFullyInvoked) {
-            break;
+      if (!usage.fullyUsed) {
+        EnumSet<MemberUse> useSet = new EnumSet<MemberUse>();
+        if (!usage.hasRead && _hasInvokedGetter(member)) {
+          useSet.addAll(usage.read());
+        }
+        if (!usage.isFullyInvoked) {
+          Iterable<CallStructure> callStructures =
+              _getInvocationCallStructures(member);
+          for (CallStructure callStructure in callStructures) {
+            useSet.addAll(usage.invoke(callStructure));
+            if (usage.isFullyInvoked) {
+              break;
+            }
           }
         }
-      }
-      if (!usage.hasWrite && hasInvokedSetter(member)) {
-        useSet.addAll(usage.write());
-      }
-
-      if (usage.hasPendingNormalUse) {
-        // The element is not yet used. Add it to the list of instance
-        // members to still be processed.
-        _instanceMembersByName
-            .putIfAbsent(memberName, () => new Set<MemberUsage>())
-            .add(usage);
-      }
-      if (usage.hasPendingClosurizationUse) {
-        // Store the member in [instanceFunctionsByName] to catch
-        // getters on the function.
-        _instanceFunctionsByName
-            .putIfAbsent(memberName, () => new Set<MemberUsage>())
-            .add(usage);
-      }
-      memberUsed(usage.entity, useSet);
-      return usage;
-    });
-    if (!usage.fullyUsed && !newUsage) {
-      EnumSet<MemberUse> useSet = new EnumSet<MemberUse>();
-      if (!usage.hasRead && _hasInvokedGetter(member)) {
-        useSet.addAll(usage.read());
-      }
-      if (!usage.isFullyInvoked) {
-        Iterable<CallStructure> callStructures =
-            _getInvocationCallStructures(member);
-        for (CallStructure callStructure in callStructures) {
-          useSet.addAll(usage.invoke(callStructure));
-          if (usage.isFullyInvoked) {
-            break;
+        if (!usage.hasWrite && hasInvokedSetter(member)) {
+          useSet.addAll(usage.write());
+        }
+        if (!dryRun) {
+          if (!usage.hasPendingNormalUse) {
+            _instanceMembersByName[memberName]?.remove(usage);
+          }
+          if (!usage.hasPendingClosurizationUse) {
+            _instanceFunctionsByName[memberName]?.remove(usage);
           }
         }
+        memberUsed(usage.entity, useSet);
       }
-      if (!usage.hasWrite && hasInvokedSetter(member)) {
-        useSet.addAll(usage.write());
+      if (dryRun && !original.dataEquals(usage)) {
+        _elementMap.reporter.internalError(member,
+            'Unenqueued usage of $member: before: $original, after: $usage');
       }
-      if (!usage.hasPendingNormalUse) {
-        _instanceMembersByName[memberName]?.remove(usage);
-      }
-      if (!usage.hasPendingClosurizationUse) {
-        _instanceFunctionsByName[memberName]?.remove(usage);
-      }
-      memberUsed(usage.entity, useSet);
     }
   }
 
-  /// Returns an iterable over all mixin applications that mixin [cls].
+  @override
   Iterable<ClassEntity> allMixinUsesOf(ClassEntity cls) {
     Iterable<ClassEntity> uses = _classHierarchyBuilder.mixinUses[cls];
     return uses != null ? uses : const <ClassEntity>[];
   }
 
+  @override
   void registerUsedElement(MemberEntity element) {
     if (element.isInstanceMember && !element.isAbstract) {
       _liveInstanceMembers.add(element);
@@ -966,8 +1013,8 @@
     Map<ClassEntity, Set<ClassEntity>> typesImplementedBySubclasses =
         new Map<ClassEntity, Set<ClassEntity>>();
 
-    /// Updates the `isDirectlyInstantiated` and `isIndirectlyInstantiated`
-    /// properties of the [ClassHierarchyNode] for [cls].
+    // Updates the `isDirectlyInstantiated` and `isIndirectlyInstantiated`
+    // properties of the [ClassHierarchyNode] for [cls].
 
     void addSubtypes(ClassEntity cls, InstantiationInfo info) {
       if (!info.hasInstantiation) {
@@ -1011,6 +1058,7 @@
     return assignedInstanceMembers;
   }
 
+  @override
   void registerClass(ClassEntity cls) {
     _classHierarchyBuilder.registerClass(cls);
   }
@@ -1095,7 +1143,7 @@
         noSuchMethodData: _noSuchMethodRegistry.close(),
         resolutionWorldBuilder: this,
         rtiNeedBuilder: _rtiNeedBuilder,
-        allocatorAnalysis: _allocatorAnalysis,
+        fieldAnalysis: _allocatorAnalysis,
         implementedClasses: _implementedClasses,
         liveNativeClasses: _nativeResolutionEnqueuer.liveNativeClasses,
         liveInstanceMembers: _liveInstanceMembers,
diff --git a/pkg/compiler/lib/src/universe/selector.dart b/pkg/compiler/lib/src/universe/selector.dart
index 0696300..2f70e16 100644
--- a/pkg/compiler/lib/src/universe/selector.dart
+++ b/pkg/compiler/lib/src/universe/selector.dart
@@ -17,6 +17,7 @@
 
 class SelectorKind {
   final String name;
+  @override
   final int hashCode;
   const SelectorKind(this.name, this.hashCode);
 
@@ -29,6 +30,7 @@
 
   int get index => hashCode;
 
+  @override
   String toString() => name;
 
   static List<SelectorKind> values = const <SelectorKind>[
@@ -50,6 +52,7 @@
   final Name memberName;
   final CallStructure callStructure;
 
+  @override
   final int hashCode;
 
   int get argumentCount => callStructure.argumentCount;
@@ -263,6 +266,27 @@
     return signatureApplies(element);
   }
 
+  /// Whether [this] could be a valid selector on `Null` without throwing.
+  bool appliesToNullWithoutThrow() {
+    var name = this.name;
+    if (isOperator && name == "==") return true;
+    // Known getters and valid tear-offs.
+    if (isGetter &&
+        (name == "hashCode" ||
+            name == "runtimeType" ||
+            name == "toString" ||
+            name == "noSuchMethod")) return true;
+    // Calling toString always succeeds, calls to `noSuchMethod` (even well
+    // formed calls) always throw.
+    if (isCall &&
+        name == "toString" &&
+        positionalArgumentCount == 0 &&
+        namedArgumentCount == 0) {
+      return true;
+    }
+    return false;
+  }
+
   bool signatureApplies(FunctionEntity function) {
     return callStructure.signatureApplies(function.parameterStructure);
   }
@@ -286,6 +310,7 @@
     return Hashing.mixHashCodeBits(hash, callStructure.hashCode);
   }
 
+  @override
   String toString() {
     return 'Selector($kind, $name, ${callStructure.structureToString()})';
   }
diff --git a/pkg/compiler/lib/src/universe/side_effects.dart b/pkg/compiler/lib/src/universe/side_effects.dart
index aac589a..2a63070 100644
--- a/pkg/compiler/lib/src/universe/side_effects.dart
+++ b/pkg/compiler/lib/src/universe/side_effects.dart
@@ -57,8 +57,10 @@
     sink.end(tag);
   }
 
+  @override
   bool operator ==(other) => _flags == other._flags;
 
+  @override
   int get hashCode => throw new UnsupportedError('SideEffects.hashCode');
 
   bool _getFlag(int position) {
@@ -200,6 +202,7 @@
 
   int get flags => _flags;
 
+  @override
   String toString() {
     StringBuffer buffer = new StringBuffer();
     buffer.write('SideEffects(reads');
@@ -307,6 +310,7 @@
 
   MemberEntity get member => _member;
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write('SideEffectsBuilder(member=$member,');
diff --git a/pkg/compiler/lib/src/universe/use.dart b/pkg/compiler/lib/src/universe/use.dart
index ab3ffbb..01b0d07 100644
--- a/pkg/compiler/lib/src/universe/use.dart
+++ b/pkg/compiler/lib/src/universe/use.dart
@@ -85,9 +85,11 @@
 
   List<DartType> get typeArguments => const <DartType>[];
 
+  @override
   int get hashCode => Hashing.listHash(
       typeArguments, Hashing.objectsHash(selector, receiverConstraint));
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! DynamicUse) return false;
@@ -96,6 +98,7 @@
         equalElements(typeArguments, other.typeArguments);
   }
 
+  @override
   String toString() => '$selector,$receiverConstraint';
 }
 
@@ -112,6 +115,7 @@
         "${typeArguments?.length ?? 0} were passed.");
   }
 
+  @override
   List<DartType> get typeArguments => _typeArguments ?? const <DartType>[];
 }
 
@@ -120,6 +124,7 @@
 /// This is used in the codegen phase where receivers are constrained to a
 /// type mask or similar.
 class ConstrainedDynamicUse extends DynamicUse {
+  @override
   final Object receiverConstraint;
   final List<DartType> _typeArguments;
 
@@ -134,6 +139,7 @@
         "${_typeArguments?.length ?? 0} were passed.");
   }
 
+  @override
   List<DartType> get typeArguments => _typeArguments ?? const <DartType>[];
 }
 
@@ -154,7 +160,8 @@
   INVOKE,
   GET,
   SET,
-  INIT,
+  FIELD_INIT,
+  FIELD_CONSTANT_INIT,
 }
 
 /// Statically known use of an [Entity].
@@ -163,16 +170,19 @@
 class StaticUse {
   final Entity element;
   final StaticUseKind kind;
+  @override
   final int hashCode;
   final InterfaceType type;
   final CallStructure callStructure;
   final ImportEntity deferredImport;
+  final ConstantValue constant;
 
   StaticUse.internal(Entity element, this.kind,
       {this.type,
       this.callStructure,
       this.deferredImport,
-      typeArgumentsHash: 0})
+      typeArgumentsHash: 0,
+      this.constant})
       : this.element = element,
         this.hashCode = Hashing.listHash([
           element,
@@ -180,7 +190,8 @@
           type,
           typeArgumentsHash,
           callStructure,
-          deferredImport
+          deferredImport,
+          constant
         ]);
 
   /// Short textual representation use for testing.
@@ -192,7 +203,7 @@
       case StaticUseKind.SET:
         sb.write('set:');
         break;
-      case StaticUseKind.INIT:
+      case StaticUseKind.FIELD_INIT:
         sb.write('init:');
         break;
       case StaticUseKind.CLOSURE:
@@ -226,6 +237,15 @@
       }
       sb.write(')');
     }
+    if (deferredImport != null) {
+      sb.write('{');
+      sb.write(deferredImport.name);
+      sb.write('}');
+    }
+    if (constant != null) {
+      sb.write('=');
+      sb.write(constant.toStructuredText());
+    }
     return sb.toString();
   }
 
@@ -309,7 +329,7 @@
             "or static method."));
     assert(element.isField,
         failedAt(element, "Static init element $element must be a field."));
-    return new StaticUse.internal(element, StaticUseKind.INIT);
+    return new StaticUse.internal(element, StaticUseKind.FIELD_INIT);
   }
 
   /// Invocation of a super method [element] with the given [callStructure].
@@ -529,7 +549,18 @@
         element.isInstanceMember,
         failedAt(
             element, "Field init element $element must be an instance field."));
-    return new StaticUse.internal(element, StaticUseKind.INIT);
+    return new StaticUse.internal(element, StaticUseKind.FIELD_INIT);
+  }
+
+  /// Constant initialization of an instance field [element].
+  factory StaticUse.fieldConstantInit(
+      FieldEntity element, ConstantValue constant) {
+    assert(
+        element.isInstanceMember,
+        failedAt(
+            element, "Field init element $element must be an instance field."));
+    return new StaticUse.internal(element, StaticUseKind.FIELD_CONSTANT_INIT,
+        constant: constant);
   }
 
   /// Read access of an instance field or boxed field [element].
@@ -588,21 +619,26 @@
     return new GenericStaticUse.methodInlining(element, typeArguments);
   }
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
-    if (other is! StaticUse) return false;
-    return element == other.element &&
+    return other is StaticUse &&
+        element == other.element &&
         kind == other.kind &&
         type == other.type &&
         callStructure == other.callStructure &&
-        equalElements(typeArguments, other.typeArguments);
+        equalElements(typeArguments, other.typeArguments) &&
+        deferredImport == other.deferredImport &&
+        constant == other.constant;
   }
 
+  @override
   String toString() =>
       'StaticUse($element,$kind,$type,$typeArguments,$callStructure)';
 }
 
 class GenericStaticUse extends StaticUse {
+  @override
   final List<DartType> typeArguments;
 
   GenericStaticUse(Entity entity, StaticUseKind kind,
@@ -633,6 +669,7 @@
   TYPE_LITERAL,
   INSTANTIATION,
   NATIVE_INSTANTIATION,
+  CONST_INSTANTIATION,
   IMPLICIT_CAST,
   PARAMETER_CHECK,
   RTI_VALUE,
@@ -643,6 +680,7 @@
 class TypeUse {
   final DartType type;
   final TypeUseKind kind;
+  @override
   final int hashCode;
   final ImportEntity deferredImport;
 
@@ -670,6 +708,9 @@
       case TypeUseKind.INSTANTIATION:
         sb.write('inst:');
         break;
+      case TypeUseKind.CONST_INSTANTIATION:
+        sb.write('const:');
+        break;
       case TypeUseKind.NATIVE_INSTANTIATION:
         sb.write('native:');
         break;
@@ -687,6 +728,11 @@
         break;
     }
     sb.write(type);
+    if (deferredImport != null) {
+      sb.write('{');
+      sb.write(deferredImport.name);
+      sb.write('}');
+    }
     return sb.toString();
   }
 
@@ -733,6 +779,13 @@
     return new TypeUse.internal(type, TypeUseKind.INSTANTIATION);
   }
 
+  /// [type] used in a constant instantiation, like `const T();`.
+  factory TypeUse.constInstantiation(
+      InterfaceType type, ImportEntity deferredImport) {
+    return new TypeUse.internal(
+        type, TypeUseKind.CONST_INSTANTIATION, deferredImport);
+  }
+
   /// [type] used in a native instantiation.
   factory TypeUse.nativeInstantiation(InterfaceType type) {
     return new TypeUse.internal(type, TypeUseKind.NATIVE_INSTANTIATION);
@@ -758,30 +811,22 @@
     return new TypeUse.internal(type, TypeUseKind.TYPE_ARGUMENT);
   }
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! TypeUse) return false;
     return type == other.type && kind == other.kind;
   }
 
+  @override
   String toString() => 'TypeUse($type,$kind)';
 }
 
-enum ConstantUseKind {
-  // A constant that is directly accessible in code.
-  DIRECT,
-  // A constant that is only accessible through other constants.
-  INDIRECT,
-}
-
 /// Use of a [ConstantValue].
 class ConstantUse {
   final ConstantValue value;
-  final ConstantUseKind kind;
-  final int hashCode;
 
-  ConstantUse._(this.value, this.kind)
-      : this.hashCode = Hashing.objectHash(value, kind.hashCode);
+  ConstantUse._(this.value);
 
   /// Short textual representation use for testing.
   String get shortText {
@@ -789,31 +834,24 @@
   }
 
   /// Constant used as the initial value of a field.
-  ConstantUse.init(ConstantValue value) : this._(value, ConstantUseKind.DIRECT);
+  ConstantUse.init(ConstantValue value) : this._(value);
 
   /// Type constant used for registration of custom elements.
-  ConstantUse.customElements(TypeConstantValue value)
-      : this._(value, ConstantUseKind.DIRECT);
-
-  /// Constant used through mirrors.
-  // TODO(johnniwinther): Maybe if this is `DIRECT` and we can avoid the
-  // extra calls to `addCompileTimeConstantForEmission`.
-  ConstantUse.mirrors(ConstantValue value)
-      : this._(value, ConstantUseKind.INDIRECT);
-
-  /// Constant used for accessing type variables through mirrors.
-  ConstantUse.typeVariableMirror(ConstantValue value)
-      : this._(value, ConstantUseKind.DIRECT);
+  ConstantUse.customElements(TypeConstantValue value) : this._(value);
 
   /// Constant literal used on code.
-  ConstantUse.literal(ConstantValue value)
-      : this._(value, ConstantUseKind.DIRECT);
+  ConstantUse.literal(ConstantValue value) : this._(value);
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! ConstantUse) return false;
     return value == other.value;
   }
 
-  String toString() => 'ConstantUse(${value.toStructuredText()},$kind)';
+  @override
+  int get hashCode => value.hashCode;
+
+  @override
+  String toString() => 'ConstantUse(${value.toStructuredText()})';
 }
diff --git a/pkg/compiler/lib/src/universe/world_builder.dart b/pkg/compiler/lib/src/universe/world_builder.dart
index e80c180..a26e453 100644
--- a/pkg/compiler/lib/src/universe/world_builder.dart
+++ b/pkg/compiler/lib/src/universe/world_builder.dart
@@ -91,6 +91,7 @@
 class StrongModeWorldStrategy implements SelectorConstraintsStrategy {
   const StrongModeWorldStrategy();
 
+  @override
   StrongModeWorldConstraints createSelectorConstraints(
       Selector selector, Object initialConstraint) {
     return new StrongModeWorldConstraints()
@@ -151,6 +152,7 @@
     return _constraints.add(constraint);
   }
 
+  @override
   String toString() {
     if (isAll) {
       return '<all>';
@@ -190,6 +192,7 @@
 
   bool get isThis => relation == ClassRelation.thisExpression;
 
+  @override
   bool operator ==(Object other) {
     if (identical(this, other)) return true;
     return other is StrongModeConstraint &&
@@ -197,8 +200,10 @@
         relation == other.relation;
   }
 
+  @override
   int get hashCode => cls.hashCode * 13;
 
+  @override
   String toString() => 'StrongModeConstraint($cls,$relation)';
 }
 
@@ -216,8 +221,8 @@
   /// All types that are checked either through is, as or checked mode checks.
   Iterable<DartType> get isChecks;
 
-  /// All directly instantiated types, that is, the types of the directly
-  /// instantiated classes.
+  /// All directly instantiated types, that is, the types of
+  /// [directlyInstantiatedClasses].
   // TODO(johnniwinther): Improve semantic precision.
   Iterable<InterfaceType> get instantiatedTypes;
 
diff --git a/pkg/compiler/lib/src/universe/world_impact.dart b/pkg/compiler/lib/src/universe/world_impact.dart
index af5eaae..cc9a92c 100644
--- a/pkg/compiler/lib/src/universe/world_impact.dart
+++ b/pkg/compiler/lib/src/universe/world_impact.dart
@@ -43,6 +43,7 @@
     constantUses.forEach(visitor.visitConstantUse);
   }
 
+  @override
   String toString() => dump(this);
 
   static String dump(WorldImpact worldImpact) {
@@ -97,42 +98,50 @@
     impact.constantUses.forEach(registerConstantUse);
   }
 
+  @override
   void registerDynamicUse(DynamicUse dynamicUse) {
     assert(dynamicUse != null);
     _dynamicUses ??= new Setlet<DynamicUse>();
     _dynamicUses.add(dynamicUse);
   }
 
+  @override
   Iterable<DynamicUse> get dynamicUses {
     return _dynamicUses != null ? _dynamicUses : const <DynamicUse>[];
   }
 
+  @override
   void registerTypeUse(TypeUse typeUse) {
     assert(typeUse != null);
     _typeUses ??= new Setlet<TypeUse>();
     _typeUses.add(typeUse);
   }
 
+  @override
   Iterable<TypeUse> get typeUses {
     return _typeUses != null ? _typeUses : const <TypeUse>[];
   }
 
+  @override
   void registerStaticUse(StaticUse staticUse) {
     assert(staticUse != null);
     _staticUses ??= new Setlet<StaticUse>();
     _staticUses.add(staticUse);
   }
 
+  @override
   Iterable<StaticUse> get staticUses {
     return _staticUses != null ? _staticUses : const <StaticUse>[];
   }
 
+  @override
   void registerConstantUse(ConstantUse constantUse) {
     assert(constantUse != null);
     _constantUses ??= new Setlet<ConstantUse>();
     _constantUses.add(constantUse);
   }
 
+  @override
   Iterable<ConstantUse> get constantUses {
     return _constantUses != null ? _constantUses : const <ConstantUse>[];
   }
@@ -221,6 +230,7 @@
     return _dynamicUses != null ? _dynamicUses : worldImpact.dynamicUses;
   }
 
+  @override
   void registerDynamicUse(DynamicUse dynamicUse) {
     if (_dynamicUses == null) {
       _dynamicUses = new Setlet<DynamicUse>();
@@ -229,6 +239,7 @@
     _dynamicUses.add(dynamicUse);
   }
 
+  @override
   void registerTypeUse(TypeUse typeUse) {
     if (_typeUses == null) {
       _typeUses = new Setlet<TypeUse>();
@@ -242,6 +253,7 @@
     return _typeUses != null ? _typeUses : worldImpact.typeUses;
   }
 
+  @override
   void registerStaticUse(StaticUse staticUse) {
     if (_staticUses == null) {
       _staticUses = new Setlet<StaticUse>();
@@ -260,6 +272,7 @@
     return _constantUses != null ? _constantUses : worldImpact.constantUses;
   }
 
+  @override
   void registerConstantUse(ConstantUse constantUse) {
     if (_constantUses == null) {
       _constantUses = new Setlet<ConstantUse>();
@@ -268,6 +281,7 @@
     _constantUses.add(constantUse);
   }
 
+  @override
   void apply(WorldImpactVisitor visitor) {
     staticUses.forEach(visitor.visitStaticUse);
     dynamicUses.forEach(visitor.visitDynamicUse);
@@ -275,6 +289,7 @@
     constantUses.forEach(visitor.visitConstantUse);
   }
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write('TransformedWorldImpact($worldImpact)');
@@ -289,6 +304,7 @@
 
   const ImpactUseCase(this.name);
 
+  @override
   String toString() => 'ImpactUseCase($name)';
 }
 
diff --git a/pkg/compiler/lib/src/util/emptyset.dart b/pkg/compiler/lib/src/util/emptyset.dart
index 796498b..6fe644c 100644
--- a/pkg/compiler/lib/src/util/emptyset.dart
+++ b/pkg/compiler/lib/src/util/emptyset.dart
@@ -9,37 +9,59 @@
 class ImmutableEmptySet<E> extends IterableBase<E> implements Set<E> {
   const ImmutableEmptySet();
 
+  @override
   Set<R> cast<R>() => new ImmutableEmptySet<R>();
+  @override
   get iterator => const _EmptySetIterator();
+  @override
   int get length => 0;
+  @override
   bool get isEmpty => true;
 
   get _immutableError => throw new UnsupportedError("EmptySet is immutable");
 
+  @override
   bool add(E element) => _immutableError;
+  @override
   void addAll(Iterable<E> elements) => _immutableError;
 
+  @override
   E lookup(Object element) => null;
+  @override
   bool remove(Object element) => false;
+  @override
   void removeAll(Iterable<Object> elements) {}
+  @override
   void removeWhere(bool test(E element)) {}
+  @override
   void retainAll(Iterable<Object> elements) {}
+  @override
   void retainWhere(bool test(E element)) {}
+  @override
   void forEach(void action(E element)) {}
+  @override
   void clear() {}
 
+  @override
   bool contains(Object element) => false;
+  @override
   bool containsAll(Iterable<Object> other) => other.isEmpty;
 
+  @override
   Set<E> union(Set<E> other) => new Set.from(other);
+  @override
   Set<E> intersection(Set<Object> other) => this;
+  @override
   Set<E> difference(Set<Object> other) => this;
+  @override
   Set<E> toSet() => new Set<E>();
 }
 
 class _EmptySetIterator implements Iterator<Null> {
   const _EmptySetIterator();
 
+  @override
   Null get current => null;
+  @override
   bool moveNext() => false;
 }
diff --git a/pkg/compiler/lib/src/util/enumset.dart b/pkg/compiler/lib/src/util/enumset.dart
index e292aa6..4872be1 100644
--- a/pkg/compiler/lib/src/util/enumset.dart
+++ b/pkg/compiler/lib/src/util/enumset.dart
@@ -98,14 +98,20 @@
   /// Returns `true` if this set is not empty.
   bool get isNotEmpty => value != 0;
 
+  /// Returns a new mutable enum set that contains the values of this set.
+  EnumSet<E> clone() => new EnumSet<E>.fromValue(value);
+
+  @override
   int get hashCode => value.hashCode * 19;
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! EnumSet<E>) return false;
     return value == other.value;
   }
 
+  @override
   String toString() {
     if (value == 0) return '0';
     int index = value.bitLength - 1;
@@ -172,6 +178,7 @@
 
 /// Immutable implementation of [EnumSet].
 class _ConstEnumSet<E> extends EnumSet<E> {
+  @override
   final int value;
 
   const _ConstEnumSet(this.value) : super._();
@@ -188,6 +195,7 @@
     return new _ConstEnumSet(value);
   }
 
+  @override
   void set value(int mask) {
     throw new UnsupportedError('EnumSet.value=');
   }
diff --git a/pkg/compiler/lib/src/util/features.dart b/pkg/compiler/lib/src/util/features.dart
index d0547d3..bf98932 100644
--- a/pkg/compiler/lib/src/util/features.dart
+++ b/pkg/compiler/lib/src/util/features.dart
@@ -62,6 +62,7 @@
     return sb.toString();
   }
 
+  @override
   String toString() => 'Features(${getText()})';
 
   /// Creates a [Features] object by parse the [text] encoding.
diff --git a/pkg/compiler/lib/src/util/maplet.dart b/pkg/compiler/lib/src/util/maplet.dart
index b9dc6744..329853c 100644
--- a/pkg/compiler/lib/src/util/maplet.dart
+++ b/pkg/compiler/lib/src/util/maplet.dart
@@ -34,6 +34,7 @@
     });
   }
 
+  @override
   bool get isEmpty {
     if (_extra == null) {
       return _MARKER == _key;
@@ -44,6 +45,7 @@
     }
   }
 
+  @override
   int get length {
     if (_extra == null) {
       return (_MARKER == _key) ? 0 : 1;
@@ -54,6 +56,7 @@
     }
   }
 
+  @override
   bool containsKey(Object key) {
     if (_extra == null) {
       return _key == key;
@@ -70,6 +73,7 @@
     }
   }
 
+  @override
   V operator [](Object key) {
     if (_extra == null) {
       return (_key == key) ? _value : null;
@@ -86,6 +90,7 @@
     }
   }
 
+  @override
   void operator []=(K key, V value) {
     if (_extra == null) {
       if (_MARKER == _key) {
@@ -166,6 +171,7 @@
     }
   }
 
+  @override
   V remove(Object key) {
     if (_extra == null) {
       if (_key != key) return null;
@@ -193,6 +199,7 @@
     }
   }
 
+  @override
   void forEach(void action(K key, V value)) {
     if (_extra == null) {
       if (_MARKER != _key) action(_key, _value);
@@ -208,11 +215,13 @@
     }
   }
 
+  @override
   void clear() {
     _key = _MARKER;
     _value = _extra = null;
   }
 
+  @override
   Iterable<K> get keys => new _MapletKeyIterable<K>(this);
 }
 
@@ -225,6 +234,7 @@
 
   _MapletKeyIterable(this.maplet);
 
+  @override
   Iterator<K> get iterator {
     if (maplet._extra == null) {
       return new _MapletSingleIterator<K>(maplet._key);
@@ -242,8 +252,10 @@
 
   _MapletSingleIterator(this._element);
 
+  @override
   K get current => _current;
 
+  @override
   bool moveNext() {
     if (Maplet._MARKER == _element) {
       _current = null;
@@ -263,8 +275,10 @@
 
   _MapletListIterator(this._list, this._remaining);
 
+  @override
   K get current => _current;
 
+  @override
   bool moveNext() {
     while (_remaining > 0) {
       var candidate = _list[_index++];
diff --git a/pkg/compiler/lib/src/util/setlet.dart b/pkg/compiler/lib/src/util/setlet.dart
index ab1911b..e35c12b 100644
--- a/pkg/compiler/lib/src/util/setlet.dart
+++ b/pkg/compiler/lib/src/util/setlet.dart
@@ -29,7 +29,9 @@
 
   static Set<R> _newSet<R>() => new Setlet<R>();
 
+  @override
   Set<R> cast<R>() => Set.castFrom<E, R>(this, newSet: _newSet);
+  @override
   Iterator<E> get iterator {
     if (_extra == null) {
       return new _SetletSingleIterator<E>(_contents);
@@ -40,6 +42,7 @@
     }
   }
 
+  @override
   int get length {
     if (_extra == null) {
       return (_MARKER == _contents) ? 0 : 1;
@@ -50,6 +53,7 @@
     }
   }
 
+  @override
   bool get isEmpty {
     if (_extra == null) {
       return _MARKER == _contents;
@@ -60,6 +64,7 @@
     }
   }
 
+  @override
   bool contains(Object element) {
     if (_extra == null) {
       return _contents == element;
@@ -76,6 +81,7 @@
     }
   }
 
+  @override
   bool add(E element) {
     if (_extra == null) {
       if (_MARKER == _contents) {
@@ -142,10 +148,12 @@
     }
   }
 
+  @override
   void addAll(Iterable<E> elements) {
     elements.forEach((each) => add(each));
   }
 
+  @override
   E lookup(Object element) {
     if (_extra == null) {
       return _contents == element ? _contents : null;
@@ -162,6 +170,7 @@
     }
   }
 
+  @override
   bool remove(Object element) {
     if (_extra == null) {
       if (_contents == element) {
@@ -187,10 +196,12 @@
     }
   }
 
+  @override
   void removeAll(Iterable<Object> other) {
     other.forEach(remove);
   }
 
+  @override
   void removeWhere(bool test(E element)) {
     if (_extra == null) {
       if (test(_contents)) {
@@ -211,15 +222,18 @@
     }
   }
 
+  @override
   void retainWhere(bool test(E element)) {
     removeWhere((E element) => !test(element));
   }
 
+  @override
   void retainAll(Iterable<Object> elements) {
     Set set = elements is Set ? elements : elements.toSet();
     removeWhere((E element) => !set.contains(element));
   }
 
+  @override
   void forEach(void action(E element)) {
     if (_extra == null) {
       if (_MARKER != _contents) action(_contents);
@@ -235,6 +249,7 @@
     }
   }
 
+  @override
   bool containsAll(Iterable<Object> other) {
     for (E e in other) {
       if (!this.contains(e)) return false;
@@ -242,19 +257,24 @@
     return true;
   }
 
+  @override
   clear() {
     _contents = _MARKER;
     _extra = null;
   }
 
+  @override
   Set<E> union(Set<E> other) => new Set<E>.from(this)..addAll(other);
 
+  @override
   Setlet<E> intersection(Set<Object> other) =>
       new Setlet<E>.from(this.where((e) => other.contains(e)));
 
+  @override
   Setlet<E> difference(Set<Object> other) =>
       new Setlet<E>.from(this.where((e) => !other.contains(e)));
 
+  @override
   Setlet<E> toSet() {
     Setlet<E> result = new Setlet<E>();
     if (_extra == null) {
@@ -272,6 +292,7 @@
 
 class _SetletMarker {
   const _SetletMarker();
+  @override
   toString() => "-";
 }
 
@@ -280,8 +301,10 @@
   E _current;
   _SetletSingleIterator(this._element);
 
+  @override
   E get current => _current;
 
+  @override
   bool moveNext() {
     if (Setlet._MARKER == _element) {
       _current = null;
@@ -300,8 +323,10 @@
   E _current;
   _SetletListIterator(this._list, this._remaining);
 
+  @override
   E get current => _current;
 
+  @override
   bool moveNext() {
     while (_remaining > 0) {
       var candidate = _list[_index++];
diff --git a/pkg/compiler/lib/src/util/util.dart b/pkg/compiler/lib/src/util/util.dart
index 785253d..92be403 100644
--- a/pkg/compiler/lib/src/util/util.dart
+++ b/pkg/compiler/lib/src/util/util.dart
@@ -114,6 +114,16 @@
   return a.length == b.length && a.containsAll(b) && b.containsAll(a);
 }
 
+bool equalMaps<K, V>(Map<K, V> a, Map<K, V> b) {
+  if (identical(a, b)) return true;
+  if (a == null || b == null) return false;
+  if (a.length != b.length) return false;
+  for (K key in a.keys) {
+    if (a[key] != b[key]) return false;
+  }
+  return true;
+}
+
 /// File name prefix used to shorten the file name in stack traces printed by
 /// [trace].
 String stackTraceFilePrefix = null;
@@ -234,14 +244,17 @@
 
   Pair(this.a, this.b);
 
+  @override
   int get hashCode => 13 * a.hashCode + 17 * b.hashCode;
 
+  @override
   bool operator ==(var other) {
     if (identical(this, other)) return true;
     if (other is! Pair) return false;
     return a == other.a && b == other.b;
   }
 
+  @override
   String toString() => '($a,$b)';
 }
 
diff --git a/pkg/compiler/lib/src/world.dart b/pkg/compiler/lib/src/world.dart
index b674a0b..9b9e9e9 100644
--- a/pkg/compiler/lib/src/world.dart
+++ b/pkg/compiler/lib/src/world.dart
@@ -12,7 +12,6 @@
         JElementEnvironment,
         KCommonElements,
         KElementEnvironment;
-import 'constants/constant_system.dart';
 import 'deferred_load.dart';
 import 'diagnostics/diagnostic_listener.dart';
 import 'elements/entities.dart';
@@ -21,8 +20,7 @@
 import 'inferrer/abstract_value_domain.dart';
 import 'ir/static_type.dart';
 import 'js_backend/annotations.dart';
-import 'js_backend/allocator_analysis.dart'
-    show JAllocatorAnalysis, KAllocatorAnalysis;
+import 'js_backend/field_analysis.dart' show JFieldAnalysis, KFieldAnalysis;
 import 'js_backend/backend_usage.dart' show BackendUsage;
 import 'js_backend/interceptor_data.dart' show InterceptorData;
 import 'js_backend/native_data.dart' show NativeData;
@@ -47,7 +45,7 @@
 /// optimizations and other compiler decisions during code generation.
 // TODO(johnniwinther): Maybe this should just be called the JWorld.
 abstract class JClosedWorld implements World {
-  JAllocatorAnalysis get allocatorAnalysis;
+  JFieldAnalysis get fieldAnalysis;
 
   BackendUsage get backendUsage;
 
@@ -64,8 +62,6 @@
   /// Returns the [AbstractValueDomain] used in the global type inference.
   AbstractValueDomain get abstractValueDomain;
 
-  ConstantSystem get constantSystem;
-
   RuntimeTypesNeed get rtiNeed;
 
   NoSuchMethodData get noSuchMethodData;
@@ -202,8 +198,6 @@
   /// Returns the single [MemberEntity] that matches a call to [selector] on the
   /// [receiver]. If multiple targets exist, `null` is returned.
   MemberEntity locateSingleMember(Selector selector, AbstractValue receiver);
-
-  Iterable<FieldEntity> get elidedFields;
 }
 
 abstract class OpenWorld implements World {
@@ -233,7 +227,7 @@
 
 abstract class KClosedWorld {
   DartTypes get dartTypes;
-  KAllocatorAnalysis get allocatorAnalysis;
+  KFieldAnalysis get fieldAnalysis;
   BackendUsage get backendUsage;
   NativeData get nativeData;
   InterceptorData get interceptorData;
diff --git a/pkg/compiler/pubspec.yaml b/pkg/compiler/pubspec.yaml
index fed2fe2..b34280b 100644
--- a/pkg/compiler/pubspec.yaml
+++ b/pkg/compiler/pubspec.yaml
@@ -3,7 +3,7 @@
 name: compiler
 publish_to: none
 environment:
-  sdk: '>=2.1.0 <3.0.0'
+  sdk: '>=2.2.0 <3.0.0'
 
 # NOTE: `pub get / pub upgrade` are generally not needed when working on this
 # package. The `.packages` file in the repository root will be used by default.
diff --git a/pkg/compiler/testing.json b/pkg/compiler/testing.json
index d5fb717..498a45c 100644
--- a/pkg/compiler/testing.json
+++ b/pkg/compiler/testing.json
@@ -14,7 +14,9 @@
     ],
 
     "exclude": [
-      "^tests/compiler/dart2js/inference/data/super_invoke\\.dart"
+      "^tests/compiler/dart2js/.*/data/.*",
+      "^tests/compiler/dart2js/.*/model_data/.*",
+      "^tests/compiler/dart2js/deferred_loading/libs/.*"
     ]
   }
 }
diff --git a/pkg/compiler/tool/status_files/log_parser.dart b/pkg/compiler/tool/status_files/log_parser.dart
deleted file mode 100644
index 43df6f4..0000000
--- a/pkg/compiler/tool/status_files/log_parser.dart
+++ /dev/null
@@ -1,79 +0,0 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library status_files.log_parser;
-
-import 'record.dart';
-
-final RegExp _stackRE = new RegExp('#[0-9]* ');
-final RegExp _assertionFileRE = new RegExp(r"'file:[^']*/sdk/pkg/");
-final String _assertionFileReplacement = r"'file:*/pkg/";
-
-/// Extracts test records from a test.py [log].
-List<Record> parse(String log) {
-  var records = <Record>[];
-  var suite;
-  var test;
-  var config;
-  var expected;
-  var actual;
-  var reason;
-  var fullReason; // lines before stack, usually multiline reason.
-  var stack = <String>[];
-  var paragraph = []; // collector of lines for fullReason.
-  bool reproIsNext = false;
-  for (var line in log.split('\n')) {
-    if (line.startsWith("FAILED: ")) {
-      int lastSlash = line.lastIndexOf('/');
-      // Some tests (particularly the html tests) have "group names" with spaces
-      // in them. So we find the test name by the space just before the last
-      // slash.
-      int space = line.substring(0, lastSlash).lastIndexOf(' ');
-      test = line.substring(space + 1).trim();
-      suite = '';
-      var slash = test.indexOf('/');
-      if (slash > 0) {
-        suite = test.substring(0, slash).trim();
-        test = test.substring(slash + 1).trim();
-      }
-      config = line
-          .substring("FAILED: ".length, space)
-          .replaceAll('release_ia32', '')
-          .replaceAll('release_x64', '');
-    }
-    if (line.startsWith("Expected: ")) {
-      expected = line.substring("Expected: ".length).trim();
-    }
-    if (line.startsWith("Actual: ")) {
-      actual = line.substring("Actual: ".length).trim();
-    }
-    if (line.startsWith("The compiler crashed:")) {
-      reason = line.substring("The compiler crashed:".length).trim();
-      reason = reason.replaceFirst(_assertionFileRE, _assertionFileReplacement);
-      paragraph.clear();
-    }
-
-    if (line.startsWith(_stackRE)) {
-      stack.add(line);
-      fullReason ??= paragraph.take(5).join('\n');
-      paragraph.clear();
-    } else {
-      paragraph.add(line);
-    }
-
-    if (reproIsNext) {
-      records.add(new Record(suite, test, config, expected, actual, reason,
-          line.trim(), fullReason, stack));
-      suite = test = config = expected = actual = reason = null;
-      stack = [];
-      fullReason = null;
-      paragraph.clear();
-      reproIsNext = false;
-    }
-    if (line.startsWith("--- Re-run this test:")) {
-      reproIsNext = true;
-    }
-  }
-  return records;
-}
diff --git a/pkg/compiler/tool/status_files/rank_stacks.dart b/pkg/compiler/tool/status_files/rank_stacks.dart
deleted file mode 100644
index 27cf37b..0000000
--- a/pkg/compiler/tool/status_files/rank_stacks.dart
+++ /dev/null
@@ -1,161 +0,0 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/*
-Usage:
-
-  $ tools/test.py -m release                         \
-      -c dart2js -r d8 --dart2js-batch --report      \
-      --host-checked                                 \
-      --dart2js_options="--library-root=out/ReleaseX64/dart-sdk/ --use-kernel" \
-      language language_2 corelib corelib_2          \
-      dart2js_native dart2js_extra                   \
-      2>&1 > LOG
-
-  $ sdk/bin/dart pkg/compiler/tool/status_files/rank_stacks.dart LOG > STACKS.txt
-*/
-
-import 'dart:io';
-
-import 'package:args/args.dart';
-
-import 'log_parser.dart';
-import 'record.dart';
-
-int stackPrintLength;
-int howManyStacks;
-
-void die(String why) {
-  print(why);
-  print('Usage:\n'
-      'dart rank_stacks.dart [options] test-logs\n\n'
-      '${argParser.usage}');
-  exit(1);
-}
-
-ArgParser argParser = new ArgParser()
-  ..addOption('stacks',
-      abbr: 's',
-      defaultsTo: '0',
-      help: 'Number of highest ranking stacks to print (0 for all).')
-  ..addOption('length',
-      abbr: 'l', defaultsTo: '12', help: 'Number of stack frames printed.');
-
-int intOption(ArgResults args, String name) {
-  onError(String text) {
-    die("Value '$text' is not an integer. "
-        "Option '$name' requires an integer value.");
-  }
-
-  return int.parse(args[name], onError: onError);
-}
-
-main(args) {
-  List<String> rest;
-  try {
-    var argResults = argParser.parse(args);
-    howManyStacks = intOption(argResults, 'stacks');
-    stackPrintLength = intOption(argResults, 'length');
-    rest = argResults.rest;
-  } catch (e) {
-    die('$e');
-  }
-
-  if (rest.isEmpty) die('No input file.');
-  var records = <Record>[];
-  for (String input in rest) {
-    var uri = Uri.base.resolve(input);
-    var file = new File.fromUri(uri);
-    if (!file.existsSync()) {
-      die("File not found: '$input'.");
-    }
-    String text = file.readAsStringSync();
-    records.addAll(parse(text));
-  }
-
-  var trie = new TrieNode(null, 0);
-  for (var record in records) {
-    enter(record, 0, trie);
-  }
-
-  var leaves = trieLeaves(trie).toList();
-  leaves.sort(compareNodesByCountAndStack);
-  for (var leaf in howManyStacks == 0 ? leaves : leaves.take(howManyStacks)) {
-    print('');
-    var examples = leaf.members.map(fullReasonOf).toSet().toList();
-    examples.sort();
-    print('${leaf.length} of:');
-    for (var example in examples) {
-      var count = leaf.members.where((r) => fullReasonOf(r) == example).length;
-      var countAligned = '$count'.padLeft(6);
-      if (examples.length == 1) countAligned = '     .';
-      var indentedExample = '\t' + example.replaceAll('\n', '\n\t');
-      print('${countAligned}${indentedExample}');
-    }
-
-    for (var line in leaf.members.first.stack.take(stackPrintLength)) {
-      print('  $line');
-    }
-  }
-}
-
-String fullReasonOf(Record r) {
-  // Some records have no matched reason, so default to test status.
-  return r.fullReason ?? r.actual;
-}
-
-int compareNodesByCountAndStack(TrieNode a, TrieNode b) {
-  int r = b.length.compareTo(a.length);
-  if (r != 0) return r;
-  List<String> stackA = a.members.first.stack;
-  List<String> stackB = b.members.first.stack;
-  int lengthA = stackA.length;
-  int lengthB = stackB.length;
-  for (int i = 0; i < lengthA && i < lengthB; i++) {
-    r = stackA[i].compareTo(stackB[i]);
-    if (r != 0) return r;
-  }
-  return lengthA.compareTo(lengthB);
-}
-
-class TrieNode {
-  final int depth;
-  final String key;
-  final Map<String, TrieNode> map = <String, TrieNode>{};
-  final List<Record> members = <Record>[];
-
-  int get length => members.length;
-
-  TrieNode(this.key, this.depth);
-
-  String toString() => 'TrieNode(#$length)';
-}
-
-void enter(Record record, int depth, TrieNode root) {
-  // Cluster on printed stack.
-  if (depth >= stackPrintLength || depth >= record.stack.length) {
-    root.members.add(record);
-    return;
-  }
-  var key = record.stack[depth];
-  var node = root.map[key] ??= new TrieNode(key, depth + 1);
-  enter(record, depth + 1, node);
-}
-
-void printTrie(TrieNode node) {
-  var indent = '  ' * node.depth;
-  print('${indent} ${node.length} ${node.key}');
-  for (var key in node.map.keys) {
-    printTrie(node.map[key]);
-  }
-}
-
-trieLeaves(node) sync* {
-  if (node.members.isNotEmpty) {
-    yield node;
-  }
-  for (var v in node.map.values) {
-    yield* trieLeaves(v);
-  }
-}
diff --git a/pkg/compiler/tool/status_files/record.dart b/pkg/compiler/tool/status_files/record.dart
deleted file mode 100644
index f2a6e97..0000000
--- a/pkg/compiler/tool/status_files/record.dart
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// An entry found in the test.py logs corresponding to a test failure.
-///
-/// It stores what suite, test, and configuration was the failure seen at.
-library status_files.record;
-
-class Record implements Comparable<Record> {
-  final String suite;
-  final String test;
-  final String config;
-  final String expected;
-  final String actual;
-  final String repro;
-  final String reason;
-  final String fullReason;
-  final List<String> stack;
-
-  // TODO(sigmund): extract also a failure reason if any (e.g. a stack trace or
-  // error message for crashes).
-
-  bool get isPassing => actual == 'Pass';
-
-  Record(this.suite, this.test, this.config, this.expected, this.actual,
-      this.reason, this.repro, this.fullReason, this.stack);
-
-  int compareTo(Record other) {
-    if (suite == null && other.suite != null) return -1;
-    if (suite != null && other.suite == null) return 1;
-    if (test == null && other.test != null) return -1;
-    if (test != null && other.test == null) return 1;
-
-    var suiteDiff = suite.compareTo(other.suite);
-    if (suiteDiff != 0) return suiteDiff;
-
-    if (isPassing && !other.isPassing) return -1;
-    if (!isPassing && other.isPassing) return 1;
-
-    var testDiff = test.compareTo(other.test);
-    if (testDiff != 0) return testDiff;
-    return repro.compareTo(other.repro);
-  }
-
-  bool operator ==(covariant Record other) =>
-      suite == other.suite &&
-      test == other.test &&
-      config == other.config &&
-      expected == other.expected &&
-      actual == other.actual &&
-      repro == other.repro;
-}
diff --git a/pkg/compiler/tool/status_files/update_all.dart b/pkg/compiler/tool/status_files/update_all.dart
deleted file mode 100644
index bf09b28..0000000
--- a/pkg/compiler/tool/status_files/update_all.dart
+++ /dev/null
@@ -1,124 +0,0 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Script to update the dart2js status lines for all tests running with the
-// $dart2js_with_kernel test configuration.
-
-import 'dart:io';
-import 'package:args/args.dart';
-import 'update_from_log.dart' as update_script;
-
-const List<String> strongSuites = const <String>[
-  'language_2',
-  'corelib_2',
-];
-
-const List<String> nonStrongSuites = const <String>[
-  'dart2js_native',
-  'dart2js_extra',
-];
-
-main(List<String> args) {
-  ArgParser argParser = new ArgParser(allowTrailingOptions: true)
-    ..addFlag('with-fast-startup')
-    ..addFlag('fast-startup')
-    ..addFlag('strong')
-    ..addFlag('with-checked-mode')
-    ..addFlag('checked-mode')
-    ..addFlag('checked');
-  ArgResults argResults = argParser.parse(args);
-  bool fastStartup =
-      argResults['with-fast-startup'] || argResults['fast-startup'];
-  bool strong = argResults['strong'];
-  bool checkedMode = argResults['with-checked-mode'] ||
-      argResults['checked-mode'] ||
-      argResults['checked'];
-  List<String> suites = argResults.rest;
-  if (suites.isEmpty) {
-    if (strong) {
-      suites = strongSuites;
-    } else {
-      suites = nonStrongSuites;
-    }
-    if (Platform.isWindows) {
-      // TODO(johnniwinther): Running drt seems to be broken on Windows.
-      suites = new List<String>.from(suites)..remove('html');
-    }
-  } else {
-    bool failure = false;
-    for (String suite in suites) {
-      if (strongSuites.contains(suite) && nonStrongSuites.contains(suite)) {
-        print("Unknown suite '$suite'");
-        failure = true;
-      }
-    }
-    if (failure) {
-      exit(1);
-    }
-  }
-
-  Directory tmp = Directory.systemTemp.createTempSync('update_all');
-
-  String python = Platform.isWindows ? 'python.exe' : 'python';
-
-  updateSuiteWithFlags(
-      String name, String suite, String runtime, List<String> args) {
-    if (strong) {
-      name = "$name-strong";
-      args.add('--strong');
-    }
-
-    print("  - $name tests");
-    List<String> testArgs = [
-      './tools/test.py',
-      '-m',
-      'release',
-      '-c',
-      'dart2js',
-      '-r',
-      runtime,
-      '--dart2js-batch',
-      '--dart2js-with-kernel'
-    ];
-    testArgs.addAll(args);
-    testArgs.add(suite);
-    String temp = '${tmp.path}/$suite-$name.txt';
-    ProcessResult result = Process.runSync(python, testArgs);
-    String stdout = result.stdout.toString();
-    new File(temp).writeAsStringSync(stdout);
-    print(temp);
-    update_script.main([name, temp]);
-  }
-
-  updateSuite(String suite) {
-    String runtime = "d8";
-    if (suite == "html") {
-      runtime = "drt";
-    }
-    print("update suite: \u001b[32m$suite\u001b[0m");
-
-    updateSuiteWithFlags(
-        'minified', suite, runtime, ["--minified", "--use-sdk"]);
-    updateSuiteWithFlags('host-checked', suite, runtime, ["--host-checked"]);
-    if (fastStartup) {
-      updateSuiteWithFlags('fast-startup', suite, runtime, ["--fast-startup"]);
-    }
-    if (checkedMode) {
-      updateSuiteWithFlags('checked-mode', suite, runtime, ["--checked"]);
-    }
-  }
-
-  print('build create_sdk');
-  ProcessResult result = Process.runSync(
-      python, ['./tools/build.py', '-m', 'release', 'create_sdk']);
-  if (result.exitCode != 0) {
-    print(result.stdout);
-    print(result.stderr);
-    exit(1);
-  }
-
-  suites.forEach(updateSuite);
-
-  tmp.deleteSync(recursive: true);
-}
diff --git a/pkg/compiler/tool/status_files/update_from_log.dart b/pkg/compiler/tool/status_files/update_from_log.dart
deleted file mode 100644
index 26a6dd0..0000000
--- a/pkg/compiler/tool/status_files/update_from_log.dart
+++ /dev/null
@@ -1,281 +0,0 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Script that updates dart2js status lines automatically for tests under the
-/// '$fasta' configuration.
-///
-/// This script is hardcoded to only support this configuration and relies on
-/// a convention for how the status files are structured, In particular,
-/// every status file for dart2js should have 3 sections:
-///
-///     [ $compiler == dart2js && $fasta && $host_checked ]
-///
-/// and:
-///
-///     [ $compiler == dart2js && $fasta && $minified ]
-///
-/// and:
-///
-///     [ $compiler == dart2js && $fasta && $fast_startup ]
-///
-/// and:
-///
-///     [ $compiler == dart2js && $checked && $fasta ]
-library compiler.status_files.update_from_log;
-
-import 'dart:io';
-
-import 'record.dart';
-import 'log_parser.dart';
-
-final dart2jsConfigurations = {
-  'host-checked': r'[ $compiler == dart2js && $fasta && $host_checked ]',
-  'minified': r'[ $compiler == dart2js && $fasta && $minified ]',
-  'host-checked-strong':
-      r'[ $compiler == dart2js && $fasta && $host_checked && $strong ]',
-  'minified-strong':
-      r'[ $compiler == dart2js && $fasta && $minified && $strong ]',
-  'fast-startup': r'[ $compiler == dart2js && $fast_startup && $fasta ]',
-  'fast-startup-strong':
-      r'[ $compiler == dart2js && $fast_startup && $fasta && $strong ]',
-  'checked-mode': r'[ $compiler == dart2js && $checked && $fasta ]',
-  'checked-mode-strong':
-      r'[ $compiler == dart2js && $checked && $fasta && $strong ]',
-};
-
-final dart2jsStatusFiles = {
-  'language_2': 'tests/language_2/language_2_dart2js.status',
-  // TODO(sigmund,rnystrom): update when corelib_2 gets split into multiple
-  // status files.
-  'corelib_2': 'tests/corelib_2/corelib_2.status',
-  'dart2js_extra': 'tests/compiler/dart2js_extra/dart2js_extra.status',
-  'dart2js_native': 'tests/compiler/dart2js_native/dart2js_native.status',
-};
-
-main(args) {
-  mainInternal(args, dart2jsConfigurations, dart2jsStatusFiles);
-}
-
-/// Note: this is called above and also from
-/// pkg/front_end/tool/status_files/update_from_log.dart
-mainInternal(List<String> args, Map<String, String> configurations,
-    Map<String, String> statusFiles) {
-  if (args.length < 2) {
-    print('usage: update_from_log.dart <mode> log.txt [message-in-quotes]');
-    print('  where mode is one of these values: ${configurations.keys}');
-    exit(1);
-  }
-  var mode = args[0];
-  if (!configurations.containsKey(mode)) {
-    print('invalid mode: $mode, expected one in ${configurations.keys}');
-    exit(1);
-  }
-
-  var uri =
-      Uri.base.resolveUri(new Uri.file(args[1], windows: Platform.isWindows));
-  var file = new File.fromUri(uri);
-  if (!file.existsSync()) {
-    print('file not found: $file');
-    exit(1);
-  }
-
-  var globalReason = args.length > 2 ? args[2] : null;
-  updateLogs(
-      mode, file.readAsStringSync(), configurations, statusFiles, globalReason);
-}
-
-/// Update all status files based on the [log] records when running the compiler
-/// in [mode]. If provided [globalReason] is added as a comment to new test
-/// failures. If not, an automated reason might be extracted from the test
-/// failure message.
-void updateLogs(String mode, String log, Map<String, String> configurations,
-    Map<String, String> statusFiles, String globalReason) {
-  List<Record> records = parse(log);
-  records.sort();
-  var last;
-  ConfigurationInSuiteSection section;
-  for (var record in records) {
-    if (last == record) continue; // ignore duplicates
-    if (section?.suite != record.suite) {
-      section?.update(globalReason);
-      var statusFile = statusFiles[record.suite];
-      if (statusFile == null) {
-        print("No status file for suite '${record.suite}'.");
-        continue;
-      }
-      var condition = configurations[mode];
-      section = ConfigurationInSuiteSection.create(
-          record.suite, mode, statusFile, condition);
-    }
-    section.add(record);
-    last = record;
-  }
-  section?.update(globalReason);
-}
-
-/// Represents an existing entry in the logs.
-class ExistingEntry {
-  final String test;
-  final String status;
-  final bool hasComment;
-
-  ExistingEntry(this.test, this.status, this.hasComment);
-
-  static parse(String line) {
-    var colonIndex = line.indexOf(':');
-    var test = line.substring(0, colonIndex);
-    var status = line.substring(colonIndex + 1).trim();
-    var commentIndex = status.indexOf("#");
-    if (commentIndex != -1) {
-      status = status.substring(0, commentIndex);
-    }
-    return new ExistingEntry(test, status, commentIndex != -1);
-  }
-}
-
-/// Represents a section in a .status file that corresponds to a specific suite
-/// and configuration.
-class ConfigurationInSuiteSection {
-  final String suite;
-  final String _statusFile;
-  final String _contents;
-  final int _begin;
-  final int _end;
-  final List<Record> _records = [];
-
-  ConfigurationInSuiteSection(
-      this.suite, this._statusFile, this._contents, this._begin, this._end);
-
-  /// Add a new test record, indicating that the test status should be updated.
-  void add(Record record) => _records.add(record);
-
-  /// Update the section in the file.
-  ///
-  /// This will reflect the new status lines as recorded in [_records].
-  void update(String providedReason) {
-    int changes = 0;
-    int ignored = 0;
-    var originalEntries = _contents.substring(_begin, _end).split('\n');
-
-    // The algorithm below walks entries in the file and from the log in the
-    // same order: preserving entries that didn't change, and updating entries
-    // where the logs show that the test status changed.
-
-    // Sort the file contents in case the file has been tampered with.
-    originalEntries.sort();
-
-    /// Re-sort records by name (they came sorted by suite and status first, so
-    /// it may be wrong for the merging below).
-    _records.sort((a, b) => a.test.compareTo(b.test));
-
-    var newContents = new StringBuffer();
-    newContents.write(_contents.substring(0, _begin));
-    addFromRecord(Record record) {
-      var reason = providedReason ?? record.reason;
-      var comment = reason != null && reason.isNotEmpty ? ' # ${reason}' : '';
-      newContents.writeln('${record.test}: ${record.actual}$comment');
-    }
-
-    int i = 0, j = 0;
-    while (i < originalEntries.length && j < _records.length) {
-      var existingLine = originalEntries[i];
-      if (existingLine.trim().isEmpty) {
-        i++;
-        continue;
-      }
-      var existing = ExistingEntry.parse(existingLine);
-      var record = _records[j];
-      var compare = existing.test.compareTo(record.test);
-      if (compare < 0) {
-        // Existing test was unaffected, copy the status line.
-        newContents.writeln(existingLine);
-        i++;
-      } else if (compare > 0) {
-        // New entry, if it's a failure, we haven't seen this before and must
-        // add it. If the status says it is passing, we ignore it. We do this
-        // to support making this script idempotent if the patching has already
-        // been done.
-        if (!record.isPassing) {
-          // New failure never seen before
-          addFromRecord(record);
-          changes++;
-        }
-        j++;
-      } else if (existing.status == record.actual) {
-        if (!existing.hasComment && record.reason != null) {
-          addFromRecord(record);
-          changes++;
-        } else {
-          // This also should only happen if the patching has already been done.
-          // We don't complain to make this script idempotent.
-          newContents.writeln(existingLine);
-        }
-        ignored++;
-        i++;
-        j++;
-      } else {
-        changes++;
-        // The status changed, if it is now passing, we omit the entry entirely,
-        // otherwise we use the status from the logs.
-        if (!record.isPassing) {
-          addFromRecord(record);
-        }
-        i++;
-        j++;
-      }
-    }
-
-    for (; i < originalEntries.length; i++) {
-      newContents.writeln(originalEntries[i]);
-    }
-
-    for (; j < _records.length; j++) {
-      changes++;
-      addFromRecord(_records[j]);
-    }
-
-    newContents.write('\n');
-    newContents.write(_contents.substring(_end));
-    new File(_statusFile).writeAsStringSync('$newContents');
-    print("updated '$_statusFile' with $changes changes");
-    if (ignored > 0) {
-      print('  $ignored changes were already applied in the status file.');
-    }
-  }
-
-  static ConfigurationInSuiteSection create(
-      String suite, String mode, String statusFile, String condition) {
-    var contents = new File(statusFile).readAsStringSync();
-    int sectionDeclaration = contents.indexOf(condition);
-    if (sectionDeclaration == -1) {
-      print('error: unable to find condition $condition in $statusFile');
-      exit(1);
-    }
-    int begin = contents.indexOf('\n', sectionDeclaration) + 1;
-    assert(begin != 0);
-    int newlinePos = contents.indexOf('\n', begin + 1);
-    int end = newlinePos;
-    while (true) {
-      if (newlinePos == -1) break;
-      if (newlinePos + 1 < contents.length) {
-        if (contents[newlinePos + 1] == '[') {
-          // We've found the end of the section
-          break;
-        } else if (contents[newlinePos + 1] == '#') {
-          // We've found a commented out line.  This line might belong to the
-          // next section.
-          newlinePos = contents.indexOf('\n', newlinePos + 1);
-          continue;
-        }
-      }
-      // We've found an ordinary line.  It's part of this section, so update
-      // end.
-      newlinePos = contents.indexOf('\n', newlinePos + 1);
-      end = newlinePos;
-    }
-    end = end == -1 ? contents.length : end + 1;
-    return new ConfigurationInSuiteSection(
-        suite, statusFile, contents, begin, end);
-  }
-}
diff --git a/pkg/dart_internal/pubspec.yaml b/pkg/dart_internal/pubspec.yaml
index f44d167..da61ece 100644
--- a/pkg/dart_internal/pubspec.yaml
+++ b/pkg/dart_internal/pubspec.yaml
@@ -1,5 +1,5 @@
 name: dart_internal
-version: 0.1.2
+version: 0.1.3
 author: "Dart Team <misc@dartlang.org>"
 homepage: http://www.dartlang.org
 description: >
@@ -16,4 +16,4 @@
 environment:
   # Restrict the upper bound so that we can remove support for this in a later
   # version of the SDK without it being a breaking change.
-  sdk: ">=2.0.0-dev.12.0 <2.2.0"
+  sdk: ">=2.0.0-dev.12.0 <2.3.0"
diff --git a/pkg/dartfix/lib/src/driver.dart b/pkg/dartfix/lib/src/driver.dart
index ba7cea7..42bec0e 100644
--- a/pkg/dartfix/lib/src/driver.dart
+++ b/pkg/dartfix/lib/src/driver.dart
@@ -179,10 +179,8 @@
     if (shouldApplyChanges(result)) {
       for (SourceFileEdit fileEdit in result.edits) {
         final file = new File(fileEdit.file);
-        String code = await file.readAsString();
-        for (SourceEdit edit in fileEdit.edits) {
-          code = edit.apply(code);
-        }
+        String code = file.existsSync() ? file.readAsStringSync() : '';
+        code = SourceEdit.applySequence(code, fileEdit.edits);
         await file.writeAsString(code);
       }
       logger.stdout(ansi.emphasized('Changes applied.'));
diff --git a/pkg/dartfix/test/src/driver_exclude_test.dart b/pkg/dartfix/test/src/driver_exclude_test.dart
index 7cb2020..b57f4a1 100644
--- a/pkg/dartfix/test/src/driver_exclude_test.dart
+++ b/pkg/dartfix/test/src/driver_exclude_test.dart
@@ -9,7 +9,7 @@
 
 import 'test_context.dart';
 
-const _debug = false;
+const _debug = true;
 
 main() {
   File exampleFile;
@@ -21,16 +21,23 @@
 
     final driver = new Driver();
     final testContext = new TestContext();
-    final testLogger = new TestLogger();
+    final testLogger = new TestLogger(debug: _debug);
     String exampleSource = await exampleFile.readAsString();
 
-    await driver.start(['-xuse-mixin', exampleDir.path],
-        testContext: testContext, testLogger: testLogger);
+    var args = ['-xuse-mixin', exampleDir.path];
     if (_debug) {
-      print(testLogger.stderrBuffer.toString());
-      print(testLogger.stdoutBuffer.toString());
-      print('--- original example');
-      print(exampleSource);
+      args.add('-v');
+    }
+    try {
+      await driver.start(args,
+          testContext: testContext, testLogger: testLogger);
+    } finally {
+      if (_debug) {
+        print(testLogger.stderrBuffer.toString());
+        print(testLogger.stdoutBuffer.toString());
+        print('--- original example');
+        print(exampleSource);
+      }
     }
 
     final suggestions = driver.result.suggestions;
diff --git a/pkg/dartfix/test/src/test_context.dart b/pkg/dartfix/test/src/test_context.dart
index 39ab0b3..11010eb 100644
--- a/pkg/dartfix/test/src/test_context.dart
+++ b/pkg/dartfix/test/src/test_context.dart
@@ -36,17 +36,18 @@
 }
 
 class TestLogger implements Logger {
+  final bool debug;
   final Ansi ansi;
   final stdoutBuffer = new StringBuffer();
   final stderrBuffer = new StringBuffer();
 
-  TestLogger() : this.ansi = new Ansi(false);
+  TestLogger({this.debug = false}) : this.ansi = new Ansi(false);
 
   @override
   void flush() {}
 
   @override
-  bool get isVerbose => false;
+  bool get isVerbose => debug;
 
   @override
   Progress progress(String message) {
@@ -64,7 +65,11 @@
   }
 
   @override
-  void trace(String message) {}
+  void trace(String message) {
+    if (debug) {
+      stdoutBuffer.writeln(message);
+    }
+  }
 }
 
 void expectHasSuggestion(
diff --git a/pkg/dev_compiler/bin/dartdevc.dart b/pkg/dev_compiler/bin/dartdevc.dart
index b366550..1075043 100755
--- a/pkg/dev_compiler/bin/dartdevc.dart
+++ b/pkg/dev_compiler/bin/dartdevc.dart
@@ -42,16 +42,34 @@
   _CompilerWorker(this._startupArgs, AsyncWorkerConnection workerConnection)
       : super(connection: workerConnection);
 
+  /// Keeps track of our last compilation result so it can potentially be
+  /// re-used in a worker.
+  CompilerResult lastResult;
+
   /// Performs each individual work request.
   Future<WorkResponse> performRequest(WorkRequest request) async {
     var args = _startupArgs.merge(request.arguments);
     var output = StringBuffer();
-    var result = await runZoned(() => compile(args), zoneSpecification:
-        ZoneSpecification(print: (self, parent, zone, message) {
+    var context = args.reuseResult ? lastResult : null;
+    lastResult = await runZoned(() => compile(args, previousResult: context),
+        zoneSpecification:
+            ZoneSpecification(print: (self, parent, zone, message) {
       output.writeln(message.toString());
     }));
+
+    if (lastResult.crashed && context != null) {
+      // TODO(vsm): See https://github.com/dart-lang/sdk/issues/36644.
+      // If the CFE is crashing with previous state, then clear compilation
+      // state and try again.
+      output.clear();
+      lastResult = await runZoned(() => compile(args, previousResult: null),
+          zoneSpecification:
+              ZoneSpecification(print: (self, parent, zone, message) {
+        output.writeln(message.toString());
+      }));
+    }
     return WorkResponse()
-      ..exitCode = result.success ? 0 : 1
+      ..exitCode = lastResult.success ? 0 : 1
       ..output = output.toString();
   }
 }
diff --git a/pkg/dev_compiler/lib/src/analyzer/code_generator.dart b/pkg/dev_compiler/lib/src/analyzer/code_generator.dart
index 54e0f0f..39f7c88f 100644
--- a/pkg/dev_compiler/lib/src/analyzer/code_generator.dart
+++ b/pkg/dev_compiler/lib/src/analyzer/code_generator.dart
@@ -14,6 +14,7 @@
 import 'package:analyzer/dart/element/type.dart';
 import 'package:analyzer/error/error.dart';
 import 'package:analyzer/src/dart/ast/token.dart' show StringToken;
+import 'package:analyzer/src/dart/ast/utilities.dart' show UIAsCodeVisitorMixin;
 import 'package:analyzer/src/dart/element/element.dart';
 import 'package:analyzer/src/dart/element/handle.dart';
 import 'package:analyzer/src/dart/element/type.dart';
@@ -43,7 +44,7 @@
 import 'extension_types.dart' show ExtensionTypeSet;
 import 'js_interop.dart';
 import 'js_typerep.dart';
-import 'module_compiler.dart' show CompilerOptions, JSModuleFile;
+import 'module_compiler.dart' show CompilerOptions;
 import 'nullable_type_inference.dart' show NullableTypeInference;
 import 'property_model.dart';
 import 'reify_coercions.dart' show CoercionReifier;
@@ -66,8 +67,13 @@
 // expressions (which result in JS.Expression) and statements
 // (which result in (JS.Statement).
 class CodeGenerator extends Object
-    with NullableTypeInference, SharedCompiler<LibraryElement, ClassElement>
-    implements AstVisitor<JS.Node> {
+    with
+        UIAsCodeVisitorMixin<JS.Node>,
+        NullableTypeInference,
+        SharedCompiler<LibraryElement, ClassElement, InterfaceType,
+            FunctionBody>
+    implements
+        AstVisitor<JS.Node> {
   final SummaryDataStore summaryData;
 
   final CompilerOptions options;
@@ -78,16 +84,6 @@
 
   JSTypeRep jsTypeRep;
 
-  /// The set of libraries we are currently compiling, and the temporaries used
-  /// to refer to them.
-  ///
-  /// We sometimes special case codegen for a single library, as it simplifies
-  /// name scoping requirements.
-  final _libraries = Map<LibraryElement, JS.Identifier>();
-
-  /// Imported libraries, and the temporaries used to refer to them.
-  final _imports = Map<LibraryElement, JS.TemporaryId>();
-
   /// The list of dart:_runtime SDK functions; these are assumed by other code
   /// in the SDK to be generated before anything else.
   final _internalSdkFunctions = <JS.ModuleItem>[];
@@ -112,9 +108,6 @@
 
   final _initializingFormalTemps = HashMap<ParameterElement, JS.TemporaryId>();
 
-  JS.Identifier _extensionSymbolsModule;
-  final _extensionSymbols = Map<String, JS.TemporaryId>();
-
   /// The  type provider from the current Analysis [context].
   final TypeProvider types;
 
@@ -138,6 +131,7 @@
   final ClassElement objectClass;
   final ClassElement stringClass;
   final ClassElement functionClass;
+  final ClassElement internalSymbolClass;
   final ClassElement privateSymbolClass;
   final InterfaceType linkedHashMapImplType;
   final InterfaceType identityHashMapImplType;
@@ -179,8 +173,6 @@
 
   final _superHelpers = Map<String, JS.Method>();
 
-  List<TypeParameterType> _typeParamInConst;
-
   /// Whether we are currently generating code for the body of a `JS()` call.
   bool _isInForeignJS = false;
 
@@ -196,6 +188,11 @@
 
   final DeclaredVariables declaredVariables;
 
+  /// Tracks the temporary variable used to build collections containing
+  /// control flow [IfElement] and [ForElement] nodes. Should be saved when
+  /// visiting a new control flow tree and restored after.
+  JS.Expression _currentCollectionVariable;
+
   CodeGenerator(LinkedAnalysisDriver driver, this.types, this.summaryData,
       this.options, this._extensionTypes, this.errors)
       : rules = Dart2TypeSystem(types),
@@ -217,6 +214,7 @@
         objectClass = driver.getClass('dart:core', 'Object'),
         stringClass = driver.getClass('dart:core', 'String'),
         functionClass = driver.getClass('dart:core', 'Function'),
+        internalSymbolClass = driver.getClass('dart:_internal', 'Symbol'),
         privateSymbolClass =
             driver.getClass('dart:_js_helper', 'PrivateSymbol'),
         linkedHashMapImplType =
@@ -237,8 +235,18 @@
 
   LibraryElement get currentLibrary => _currentElement.library;
 
+  @override
   Uri get currentLibraryUri => _currentElement.librarySource.uri;
 
+  @override
+  FunctionBody get currentFunction => _currentFunction;
+
+  @override
+  InterfaceType get privateSymbolType => privateSymbolClass.type;
+
+  @override
+  InterfaceType get internalSymbolType => internalSymbolClass.type;
+
   CompilationUnitElement get _currentCompilationUnit {
     for (var e = _currentElement;; e = e.enclosingElement) {
       if (e is CompilationUnitElement) return e;
@@ -265,48 +273,17 @@
 
     // Transform the AST to make coercions explicit.
     compilationUnits = CoercionReifier.reify(compilationUnits);
-    var items = <JS.ModuleItem>[];
-    var root = JS.Identifier('_root');
-    items.add(js.statement('const # = Object.create(null)', [root]));
+    var libraries = compilationUnits
+        .where((unit) {
+          var library = unit.declaredElement.library;
+          return unit.declaredElement == library.definingCompilationUnit;
+        })
+        .map((unit) => unit.declaredElement.library)
+        .toList();
 
-    var isBuildingSdk = compilationUnits
-        .any((u) => isSdkInternalRuntime(u.declaredElement.library));
-    if (isBuildingSdk) {
-      // Don't allow these to be renamed when we're building the SDK.
-      // There is JS code in dart:* that depends on their names.
-      runtimeModule = JS.Identifier('dart');
-      _extensionSymbolsModule = JS.Identifier('dartx');
-    } else {
-      // Otherwise allow these to be renamed so users can write them.
-      runtimeModule = JS.TemporaryId('dart');
-      _extensionSymbolsModule = JS.TemporaryId('dartx');
-    }
+    var items = startModule(libraries);
     _typeTable = TypeTable(runtimeModule);
 
-    // Initialize our library variables.
-    var exports = <JS.NameSpecifier>[];
-    void emitLibrary(JS.Identifier id) {
-      items.add(js.statement('const # = Object.create(#)', [id, root]));
-      exports.add(JS.NameSpecifier(id));
-    }
-
-    for (var unit in compilationUnits) {
-      var library = unit.declaredElement.library;
-      if (unit.declaredElement != library.definingCompilationUnit) continue;
-
-      var libraryTemp = isSdkInternalRuntime(library)
-          ? runtimeModule
-          : JS.TemporaryId(jsLibraryName(_libraryRoot, library));
-      _libraries[library] = libraryTemp;
-      emitLibrary(libraryTemp);
-    }
-
-    // dart:_runtime has a magic module that holds extension method symbols.
-    // TODO(jmesserly): find a cleaner design for this.
-    if (isBuildingSdk) emitLibrary(_extensionSymbolsModule);
-
-    items.add(JS.ExportDeclaration(JS.ExportClause(exports)));
-
     // Collect all class/type Element -> Node mappings
     // in case we need to forward declare any classes.
     _declarationNodes = HashMap<TypeDefiningElement, AstNode>();
@@ -336,53 +313,21 @@
     compilationUnits.forEach(visitCompilationUnit);
     assert(_deferredProperties.isEmpty);
 
+    moduleItems.addAll(afterClassDefItems);
+    afterClassDefItems.clear();
+
     // Visit directives (for exports)
     compilationUnits.forEach(_emitExportDirectives);
 
-    // Declare imports
-    _finishImports(items);
-    // Initialize extension symbols
-    _extensionSymbols.forEach((name, id) {
-      JS.Expression value =
-          JS.PropertyAccess(_extensionSymbolsModule, _propertyName(name));
-      if (isBuildingSdk) {
-        value = js.call('# = Symbol(#)', [value, js.string("dartx.$name")]);
-      }
-      items.add(js.statement('const # = #;', [id, value]));
-    });
-
-    _emitDebuggerExtensionInfo(options.moduleName);
+    // Declare imports and extension symbols
+    emitImportsAndExtensionSymbols(items);
 
     // Discharge the type table cache variables and
     // hoisted definitions.
     items.addAll(_typeTable.discharge());
     items.addAll(_internalSdkFunctions);
 
-    // Add the module's code (produced by visiting compilation units, above)
-    _copyAndFlattenBlocks(items, moduleItems);
-
-    // Build the module.
-    return JS.Program(items, name: options.moduleName);
-  }
-
-  void _emitDebuggerExtensionInfo(String name) {
-    var properties = <JS.Property>[];
-    _libraries.forEach((library, value) {
-      // TODO(jacobr): we could specify a short library name instead of the
-      // full library uri if we wanted to save space.
-      properties.add(JS.Property(
-          js.escapedString(jsLibraryDebuggerName(_libraryRoot, library)),
-          value));
-    });
-
-    // Track the module name for each library in the module.
-    // This data is only required for debugging.
-    moduleItems.add(js
-        .statement('#.trackLibraries(#, #, ${JSModuleFile.sourceMapHoleID});', [
-      runtimeModule,
-      js.string(name),
-      JS.ObjectInitializer(properties, multiline: true)
-    ]));
+    return finishModule(items, options.moduleName);
   }
 
   /// If [e] is a property accessor element, this returns the
@@ -441,7 +386,21 @@
     return access;
   }
 
-  JS.Expression _emitJSInteropStaticMemberName(Element e) {
+  /// If the element [e] uses JS interop, this returns the string containing the
+  /// JS member's name, otherwise returns null.
+  ///
+  /// The member name is specified by the parameter to the `@JS()` annotation,
+  /// defaulting to the member's name in Dart, for example:
+  ///
+  ///     @JS('foo')
+  ///     external static bar(); // JS name is "foo"
+  ///
+  ///     @JS()
+  ///     external static bar(); // JS name is "bar"
+  ///
+  ///     static bar() { /* ... */ } // not a JS member; JS name is null
+  ///
+  String _getJSInteropStaticMemberName(Element e) {
     if (!_usesJSInterop(e)) return null;
     var name = getAnnotationName(e, isPublicJSAnnotation);
     if (name != null) {
@@ -453,25 +412,57 @@
     } else {
       name = _getElementName(e);
     }
-    return js.escapedString(name, "'");
+    return name;
   }
 
-  /// Flattens blocks in [items] to a single list.
+  /// Choose a canonical name from the [library] element.
   ///
-  /// This will not flatten blocks that are marked as being scopes.
-  void _copyAndFlattenBlocks(
-      List<JS.ModuleItem> result, Iterable<JS.ModuleItem> items) {
-    for (var item in items) {
-      if (item is JS.Block && !item.isScope) {
-        _copyAndFlattenBlocks(result, item.statements);
-      } else if (item != null) {
-        result.add(item);
-      }
+  /// This never uses the library's name (the identifier in the `library`
+  /// declaration) as it doesn't have any meaningful rules enforced.
+  @override
+  String jsLibraryName(LibraryElement library) {
+    var uri = library.source.uri;
+    if (uri.scheme == 'dart') {
+      return uri.path;
     }
+    // TODO(vsm): This is not necessarily unique if '__' appears in a file name.
+    var encodedSeparator = '__';
+    String qualifiedPath;
+    if (uri.scheme == 'package') {
+      // Strip the package name.
+      // TODO(vsm): This is not unique if an escaped '/'appears in a filename.
+      // E.g., "foo/bar.dart" and "foo$47bar.dart" would collide.
+      qualifiedPath = uri.pathSegments.skip(1).join(encodedSeparator);
+    } else {
+      qualifiedPath = path
+          .relative(uri.toFilePath(), from: _libraryRoot)
+          .replaceAll(path.separator, encodedSeparator)
+          .replaceAll('..', encodedSeparator);
+    }
+    return pathToJSIdentifier(qualifiedPath);
   }
 
-  String _libraryToModule(LibraryElement library) {
-    assert(!_libraries.containsKey(library));
+  /// Debugger friendly name for a Dart Library.
+  @override
+  String jsLibraryDebuggerName(LibraryElement library) {
+    var uri = library.source.uri;
+    // For package: and dart: uris show the entire
+    if (uri.scheme == 'dart' || uri.scheme == 'package') return uri.toString();
+
+    var filePath = uri.toFilePath();
+    // Relative path to the library.
+    return path.relative(filePath, from: _libraryRoot);
+  }
+
+  /// Returns true if the library [l] is dart:_runtime.
+  @override
+  bool isSdkInternalRuntime(LibraryElement l) {
+    var uri = l.source.uri;
+    return uri.scheme == 'dart' && uri.path == '_runtime';
+  }
+
+  @override
+  String libraryToModule(LibraryElement library) {
     var source = library.source;
     // TODO(jmesserly): we need to split out HTML.
     if (source.uri.scheme == 'dart') {
@@ -486,39 +477,6 @@
     return moduleName;
   }
 
-  void _finishImports(List<JS.ModuleItem> items) {
-    var modules = Map<String, List<LibraryElement>>();
-
-    for (var import in _imports.keys) {
-      modules.putIfAbsent(_libraryToModule(import), () => []).add(import);
-    }
-
-    String coreModuleName;
-    if (!_libraries.containsKey(coreLibrary)) {
-      coreModuleName = _libraryToModule(coreLibrary);
-    }
-    modules.forEach((module, libraries) {
-      // Generate import directives.
-      //
-      // Our import variables are temps and can get renamed. Since our renaming
-      // is integrated into js_ast, it is aware of this possibility and will
-      // generate an "as" if needed. For example:
-      //
-      //     import {foo} from 'foo';         // if no rename needed
-      //     import {foo as foo$} from 'foo'; // if rename was needed
-      //
-      var imports =
-          libraries.map((l) => JS.NameSpecifier(_imports[l])).toList();
-      if (module == coreModuleName) {
-        imports.add(JS.NameSpecifier(runtimeModule));
-        imports.add(JS.NameSpecifier(_extensionSymbolsModule));
-      }
-
-      items.add(JS.ImportDeclaration(
-          namedImports: imports, from: js.string(module, "'")));
-    });
-  }
-
   /// Called to emit class declarations.
   ///
   /// During the course of emitting one item, we may emit another. For example
@@ -884,7 +842,7 @@
       classDef = _defineClassTypeArguments(
           classElem, typeFormals, classDef, className, deferredSupertypes);
     } else {
-      body.addAll(deferredSupertypes);
+      afterClassDefItems.addAll(deferredSupertypes);
     }
 
     body = [classDef];
@@ -1468,10 +1426,19 @@
       // Dart does not use ES6 constructors.
       // Add an error to catch any invalid usage.
       jsMethods
-          .add(JS.Method(_propertyName('constructor'), js.fun(r'''function() {
+          .add(JS.Method(propertyName('constructor'), js.fun(r'''function() {
                   throw Error("use `new " + #.typeName(#.getReifiedType(this)) +
                       ".new(...)` to create a Dart object");
               }''', [runtimeModule, runtimeModule])));
+    } else if (classElem == _jsArray) {
+      // Provide access to the Array constructor property, so it works like
+      // other native types (rather than calling the Dart Object "constructor"
+      // above, which throws).
+      //
+      // This will become obsolete when
+      // https://github.com/dart-lang/sdk/issues/31003 is addressed.
+      jsMethods.add(JS.Method(
+          propertyName('constructor'), js.fun(r'function() { return []; }')));
     } else if (classElem.isEnum) {
       // Generate Enum.toString()
       var fields = classElem.fields.where((f) => f.type == type).toList();
@@ -1575,7 +1542,7 @@
           if (param.kind == ParameterKind.NAMED) {
             foundNamedParams = true;
 
-            var name = _propertyName(param.name);
+            var name = propertyName(param.name);
             body.add(js.statement('if (# in #) #;', [
               name,
               namedArgumentTemp,
@@ -1705,7 +1672,7 @@
       // Sort the names to match dart2js order.
       var sortedNames = (namedParameterTypes.keys.toList())..sort();
       var named = sortedNames
-          .map((n) => JS.Property(_propertyName(n), JS.Identifier(n)));
+          .map((n) => JS.Property(propertyName(n), JS.Identifier(n)));
       addProperty('namedArguments', JS.ObjectInitializer(named.toList()));
       positionalArgs.removeLast();
     }
@@ -1851,7 +1818,7 @@
       return _emitInstanceCreationExpression(
           element,
           element.returnType as InterfaceType,
-          () => _emitArgumentList(node.arguments),
+          _emitArgumentList(node.arguments),
           isConst: true);
     } else {
       return _visitExpression(node.name);
@@ -1979,7 +1946,7 @@
       // Emit enum static fields
       var type = classElem.type;
       void addField(FieldElement e, JS.Expression value) {
-        body.add(defineValueOnClass(classElem, _emitStaticClassName(classElem),
+        body.add(defineValueOnClass(classElem, _emitStaticClassName(e),
                 _declareMemberName(e.getter), value)
             .toStatement());
       }
@@ -1990,9 +1957,9 @@
         if (f.type != type) continue;
         // static const E id_i = const E(i);
         values.add(JS.PropertyAccess(
-            _emitStaticClassName(classElem), _declareMemberName(f.getter)));
+            _emitStaticClassName(f), _declareMemberName(f.getter)));
         var enumValue = runtimeCall('const(new (#.#)(#))', [
-          _emitConstructorAccess(type),
+          emitConstructorAccess(type),
           _constructorName(''),
           js.number(index++)
         ]);
@@ -2004,11 +1971,14 @@
     }
 
     var lazyStatics = classElem.fields
-        .where((f) => f.isStatic && !f.isSynthetic)
+        .where((f) => f.isStatic && !f.isSynthetic && !_isExternal(f))
         .map((f) => members[f] as VariableDeclaration)
         .toList();
     if (lazyStatics.isNotEmpty) {
-      body.add(_emitLazyFields(_emitStaticClassName(classElem), lazyStatics,
+      // Because we filtered out external fields, we don't need to use
+      // `_emitStaticClassName` here as we normally would.
+      _declareBeforeUse(classElem);
+      body.add(_emitLazyFields(_emitTopLevelName(classElem), lazyStatics,
           (e) => _emitStaticMemberName(e.name, e)));
     }
   }
@@ -2044,7 +2014,7 @@
       if (extensions.isEmpty) return;
 
       var names = extensions
-          .map((e) => _propertyName(JS.memberNameForDartMember(e)))
+          .map((e) => propertyName(JS.memberNameForDartMember(e)))
           .toList();
       body.add(js.statement('#.#(#, #);', [
         runtimeModule,
@@ -2078,7 +2048,7 @@
         var proto = classElem.type.isObject
             ? js.call('Object.create(null)')
             : runtimeCall('get${name}s(#.__proto__)', [className]);
-        elements.insert(0, JS.Property(_propertyName('__proto__'), proto));
+        elements.insert(0, JS.Property(propertyName('__proto__'), proto));
       }
       body.add(runtimeStatement('set${name}Signature(#, () => #)', [
         className,
@@ -2292,7 +2262,7 @@
   JS.Expression _constructorName(String name) {
     if (name == '') {
       // Default constructors (factory or not) use `new` as their name.
-      return _propertyName('new');
+      return propertyName('new');
     }
     return _emitStaticMemberName(name);
   }
@@ -2488,12 +2458,12 @@
 
       if (param.isOptional) {
         JS.Expression defaultValue;
-        if (paramNode != null) {
+        if (findAnnotation(param, isUndefinedAnnotation) != null) {
+          defaultValue = null;
+        } else if (paramNode != null) {
           var paramDefault = (paramNode as DefaultFormalParameter).defaultValue;
           if (paramDefault == null) {
             defaultValue = JS.LiteralNull();
-          } else if (_isJSUndefined(paramDefault)) {
-            defaultValue = null;
           } else {
             defaultValue = _visitExpression(paramDefault);
           }
@@ -2552,16 +2522,6 @@
         (_classProperties?.covariantParameters?.contains(p) ?? false);
   }
 
-  bool _isJSUndefined(Expression expr) {
-    expr = expr is AsExpression ? expr.expression : expr;
-    if (expr is Identifier) {
-      var element = expr.staticElement;
-      return isSdkInternalRuntime(element.library) &&
-          element.name == 'undefined';
-    }
-    return false;
-  }
-
   JS.Fun _emitNativeFunctionBody(MethodDeclaration node) {
     String name = getAnnotationName(node.declaredElement, isJSAnnotation) ??
         node.name.name;
@@ -2677,7 +2637,7 @@
   JS.Method _emitTopLevelProperty(FunctionDeclaration node) {
     var name = node.name.name;
     return JS.Method(
-        _propertyName(name), _emitFunctionExpression(node.functionExpression),
+        propertyName(name), _emitFunctionExpression(node.functionExpression),
         isGetter: node.isGetter, isSetter: node.isSetter)
       ..sourceInformation = _functionEnd(node);
   }
@@ -2793,17 +2753,18 @@
             body, parameters.parameters.last.declaredElement));
 
     JS.Block code = isSync
-        ? _emitFunctionBody(element, parameters, body)
-        : JS.Block([
-            _emitGeneratorFunction(element, parameters, body).toReturn()
-              ..sourceInformation = _nodeStart(body)
-          ]);
+        ? _emitSyncFunctionBody(element, parameters, body)
+        : _emitGeneratorFunctionBody(element, parameters, body);
 
     code = super.exitFunction(element.name, formals, code);
     return JS.Fun(formals, code);
   }
 
-  JS.Block _emitFunctionBody(ExecutableElement element,
+  /// Emits a `sync` function body (the default in Dart)
+  ///
+  /// To emit an `async`, `sync*`, or `async*` function body, use
+  /// [_emitGeneratorFunctionBody] instead.
+  JS.Block _emitSyncFunctionBody(ExecutableElement element,
       FormalParameterList parameters, FunctionBody body) {
     var savedFunction = _currentFunction;
     _currentFunction = body;
@@ -2824,6 +2785,40 @@
     return block;
   }
 
+  /// Emits an `async`, `sync*`, or `async*` function body.
+  ///
+  /// The body will perform these steps:
+  ///
+  /// - Run the argument initializers. These must be run synchronously
+  ///   (e.g. covariance checks), and this helps performance.
+  /// - Return the generator function, wrapped with the appropriate type
+  ///   (`Future`, `Itearble`, and `Stream` respectively).
+  ///
+  /// To emit a `sync` function body (the default in Dart), use
+  /// [_emitSyncFunctionBody] instead.
+  JS.Block _emitGeneratorFunctionBody(ExecutableElement element,
+      FormalParameterList parameters, FunctionBody body) {
+    var savedFunction = _currentFunction;
+    _currentFunction = body;
+
+    var initArgs = _emitArgumentInitializers(element, parameters);
+    var block = JS.Block([
+      _emitGeneratorFunction(element, parameters, body).toReturn()
+        ..sourceInformation = _nodeStart(body)
+    ]);
+    if (initArgs != null) block = JS.Block([initArgs, block]);
+
+    _currentFunction = savedFunction;
+
+    if (block.isScope) {
+      // TODO(jmesserly: JS AST printer does not understand the need to emit a
+      // nested scoped block in a JS function. So we need to add a non-scoped
+      // wrapper to ensure it gets printed.
+      block = JS.Block([block]);
+    }
+    return block;
+  }
+
   JS.Block _emitFunctionScopedBody(
       FunctionBody body, ExecutableElement element) {
     var block = body.accept(this) as JS.Block;
@@ -2849,7 +2844,7 @@
       t = covariantParams.lookup(t) as TypeParameterElement;
       if (t != null) {
         body.add(runtimeStatement('checkTypeBound(#, #, #)',
-            [_emitType(t.type), _emitType(t.bound), _propertyName(t.name)]));
+            [_emitType(t.type), _emitType(t.bound), propertyName(t.name)]));
       }
     }
   }
@@ -2869,9 +2864,13 @@
 
       // Visit the body with our async* controller set.
       //
-      // TODO(jmesserly): this will emit argument initializers (for default
-      // values) inside the generator function body. Is that the best place?
-      var jsBody = _emitFunctionBody(element, parameters, body);
+      // Note: we intentionally don't emit argument initializers here, because
+      // they were already emitted outside of the generator expression.
+      var savedFunction = _currentFunction;
+      _currentFunction = body;
+      var jsBody = _emitFunctionScopedBody(body, element);
+      _currentFunction = savedFunction;
+
       var genFn = JS.Fun(jsParams, jsBody, isGenerator: true);
 
       // Name the function if possible, to get better stack traces.
@@ -2883,7 +2882,7 @@
             genFn);
       }
       gen.sourceInformation = _functionEnd(body);
-      if (JS.This.foundIn(gen)) gen = js.call('#.bind(this)', gen);
+      if (usesThisOrSuper(gen)) gen = js.call('#.bind(this)', gen);
 
       _superAllowed = savedSuperAllowed;
       _asyncStarController = savedController;
@@ -2961,14 +2960,9 @@
     }
 
     var fn = _emitFunctionExpression(func.functionExpression);
-
     var name = _emitVariableDef(func.name);
     JS.Statement declareFn;
-    if (JS.This.foundIn(fn)) {
-      declareFn = js.statement('const # = #.bind(this);', [name, fn]);
-    } else {
-      declareFn = JS.FunctionDeclaration(name, fn);
-    }
+    declareFn = toBoundFunctionStatement(fn, name);
     var element = func.declaredElement;
     if (_reifyFunctionType(element)) {
       declareFn = JS.Block(
@@ -3085,28 +3079,9 @@
     var member = _emitMemberName(element.name,
         isStatic: isStatic, type: type, element: accessor);
 
-    // A static native element should just forward directly to the
-    // JS type's member.
-    //
-    // TODO(jmesserly): this code path seems broken. It doesn't exist
-    // elsewhere, such as [_emitAccess], so it will only take affect for
-    // unqualified static access inside of the the same class.
-    //
-    // If we want this feature to work, we'll need to implement it in the
-    // standard [_emitStaticClassName] code path, which will need to know the
-    // member we're calling so it can determine whether to use the Dart class
-    // name or the native JS class name.
-    if (isStatic && _isExternal(element)) {
-      var nativeName = _extensionTypes.getNativePeers(classElem);
-      if (nativeName.isNotEmpty) {
-        var memberName = getAnnotationName(element, isJSName) ?? member;
-        return runtimeCall('global.#.#', [nativeName[0], memberName]);
-      }
-    }
-
     // For instance members, we add implicit-this.
     // For method tear-offs, we ensure it's a bound method.
-    var target = isStatic ? _emitStaticClassName(classElem) : JS.This();
+    var target = isStatic ? _emitStaticClassName(element) : JS.This();
     if (element is MethodElement && _reifyTearoff(element, node)) {
       if (isStatic) {
         // TODO(jmesserly): we could tag static/top-level function types once
@@ -3208,7 +3183,7 @@
       {bool cacheType = true}) {
     var properties = <JS.Property>[];
     types.forEach((name, type) {
-      var key = _propertyName(name);
+      var key = propertyName(name);
       var value = _emitType(type, cacheType: cacheType);
       properties.add(JS.Property(key, value));
     });
@@ -3283,14 +3258,29 @@
     return _emitAnnotatedResult(result, metadata);
   }
 
-  /// Emits an expression that lets you access statics on a [type] from code.
-  JS.Expression _emitConstructorAccess(DartType type) {
+  @override
+  JS.Expression emitConstructorAccess(DartType type) {
     return _emitJSInterop(type.element) ?? _emitType(type);
   }
 
-  /// Emits an expression that lets you access statics on an [c] from code.
-  JS.Expression _emitStaticClassName(ClassElement c) {
+  /// Emits an expression referring to the class of static [member].
+  ///
+  /// Typically this is equivalent to [_declareBeforeUse] followed by
+  /// [_emitTopLevelName] on the class, but if the member is external, then the
+  /// native class name will be used, for direct access to the native member.
+  JS.Expression _emitStaticClassName(ClassMemberElement member) {
+    var c = member.enclosingElement;
     _declareBeforeUse(c);
+
+    // A static native element should just forward directly to the JS type's
+    // member, for example `Css.supports(...)` in dart:html should be replaced
+    // by a direct call to the DOM API: `global.CSS.supports`.
+    if (_isExternal(member)) {
+      var nativeName = _extensionTypes.getNativePeers(c);
+      if (nativeName.isNotEmpty) {
+        return runtimeCall('global.#', nativeName[0]);
+      }
+    }
     return _emitTopLevelName(c);
   }
 
@@ -3336,7 +3326,6 @@
 
     var name = type.name;
     if (type is TypeParameterType) {
-      _typeParamInConst?.add(type);
       return JS.Identifier(name);
     }
 
@@ -3359,8 +3348,8 @@
   }
 
   /// Emits the raw type corresponding to the [element].
-  JS.Expression _emitTypeDefiningElement(TypeDefiningElement element) {
-    return _emitType(fillDynamicTypeArgsForElement(element));
+  JS.Expression _emitTypeDefiningElement(TypeDefiningElement e) {
+    return _emitType(instantiateElementTypeToBounds(rules, e));
   }
 
   JS.Expression _emitGenericClassType(
@@ -3385,7 +3374,7 @@
   /// function does not handle JS interop.
   JS.Expression _emitTopLevelMemberName(Element e, {String suffix = ''}) {
     var name = getJSExportName(e) ?? _getElementName(e);
-    return _propertyName(name + suffix);
+    return propertyName(name + suffix);
   }
 
   @override
@@ -3575,7 +3564,7 @@
     var member = _emitMemberName(field.name,
         isStatic: isStatic, type: classElem.type, element: field.setter);
     jsTarget = isStatic
-        ? (JS.PropertyAccess(_emitStaticClassName(classElem), member)
+        ? (JS.PropertyAccess(_emitStaticClassName(field), member)
           ..sourceInformation = _nodeSpan(id))
         : _emitTargetAccess(jsTarget, member, field.setter, id);
     return _visitExpression(right).toAssignExpression(jsTarget);
@@ -3650,7 +3639,7 @@
         }
       }
       if (e.name == 'extensionSymbol' && firstArg is StringLiteral) {
-        return _getExtensionSymbolInternal(firstArg.stringValue);
+        return getExtensionSymbolInternal(firstArg.stringValue);
       }
     }
 
@@ -3671,18 +3660,18 @@
   JS.Expression _emitTarget(Expression target, Element member, bool isStatic) {
     if (isStatic) {
       if (member is ConstructorElement) {
-        return _emitConstructorAccess(member.enclosingElement.type)
+        return emitConstructorAccess(member.enclosingElement.type)
           ..sourceInformation = _nodeSpan(target);
       }
       if (member is PropertyAccessorElement) {
         var field = member.variable;
         if (field is FieldElement) {
-          return _emitStaticClassName(field.enclosingElement)
+          return _emitStaticClassName(field)
             ..sourceInformation = _nodeSpan(target);
         }
       }
       if (member is MethodElement) {
-        return _emitStaticClassName(member.enclosingElement)
+        return _emitStaticClassName(member)
           ..sourceInformation = _nodeSpan(target);
       }
     }
@@ -4089,7 +4078,7 @@
   JS.Property visitNamedExpression(NamedExpression node) {
     assert(node.parent is ArgumentList);
     return JS.Property(
-        _propertyName(node.name.label.name), _visitExpression(node.expression));
+        propertyName(node.name.label.name), _visitExpression(node.expression));
   }
 
   List<JS.Parameter> _emitParametersForElement(ExecutableElement member) {
@@ -4280,10 +4269,6 @@
       List<VariableDeclaration> fields) {
     var lazyFields = <VariableDeclaration>[];
     for (var field in fields) {
-      // Skip our magic undefined constant.
-      var element = field.declaredElement as TopLevelVariableElement;
-      if (element.name == 'undefined') continue;
-
       var init = field.initializer;
       if (init == null ||
           init is Literal ||
@@ -4339,7 +4324,7 @@
 
   JS.Expression _emitConstructorName(DartType type, String name) {
     return _emitJSInterop(type.element) ??
-        JS.PropertyAccess(_emitConstructorAccess(type), _constructorName(name));
+        JS.PropertyAccess(emitConstructorAccess(type), _constructorName(name));
   }
 
   @override
@@ -4347,8 +4332,8 @@
     return _emitConstructorName(node.type.type, node.staticElement.name);
   }
 
-  JS.Expression _emitInstanceCreationExpression(ConstructorElement element,
-      InterfaceType type, List<JS.Expression> Function() emitArguments,
+  JS.Expression _emitInstanceCreationExpression(
+      ConstructorElement element, InterfaceType type, List<JS.Expression> args,
       {bool isConst = false, ConstructorName ctorNode}) {
     if (element == null) {
       return _throwUnsafe('unresolved constructor: ${type?.name ?? '<null>'}'
@@ -4357,13 +4342,11 @@
 
     var classElem = type.element;
     if (_isObjectLiteral(classElem)) {
-      var args = emitArguments();
       return args.isEmpty ? js.call('{}') : args.single as JS.ObjectInitializer;
     }
 
-    var name = element.name;
     JS.Expression emitNew() {
-      var args = emitArguments();
+      var name = element.name;
       if (args.isEmpty && classElem.source.isInSystemLibrary) {
         // Skip the slow SDK factory constructors when possible.
         switch (classElem.name) {
@@ -4402,7 +4385,8 @@
           : JS.New(ctor, args);
     }
 
-    return isConst ? _emitConst(emitNew) : emitNew();
+    var result = emitNew();
+    return isConst ? canonicalizeConstObject(result) : result;
   }
 
   bool _isObjectLiteral(Element classElem) {
@@ -4456,25 +4440,23 @@
       return js.escapedString(stringValue);
     }
     if (type == types.symbolType) {
-      return _emitDartSymbol(value.toSymbolValue());
+      return emitDartSymbol(value.toSymbolValue());
     }
     if (type == types.typeType) {
       return _emitType(value.toTypeValue());
     }
     if (type is InterfaceType) {
       if (type.element == types.listType.element) {
-        return _cacheConst(() => _emitConstList(type.typeArguments[0],
-            value.toListValue().map(_emitDartObject).toList()));
+        return _emitConstList(type.typeArguments[0],
+            value.toListValue().map(_emitDartObject).toList());
       }
       if (type.element == types.mapType.element) {
-        return _cacheConst(() {
-          var entries = <JS.Expression>[];
-          value.toMapValue().forEach((key, value) {
-            entries.add(_emitDartObject(key));
-            entries.add(_emitDartObject(value));
-          });
-          return _emitConstMap(type, entries);
+        var entries = <JS.Expression>[];
+        value.toMapValue().forEach((key, value) {
+          entries.add(_emitDartObject(key));
+          entries.add(_emitDartObject(value));
         });
+        return _emitConstMap(type, entries);
       }
       if (value is DartObjectImpl && value.isUserDefinedObject) {
         var ctor = value.getInvocation();
@@ -4490,15 +4472,14 @@
               classElem.fields.where((f) => f.type == type).elementAt(index);
           return _emitClassMemberElement(field, field.getter, null);
         }
-        return _emitInstanceCreationExpression(ctor.constructor, type, () {
-          var args = ctor.positionalArguments.map(_emitDartObject).toList();
-          var named = <JS.Property>[];
-          ctor.namedArguments.forEach((name, value) {
-            named.add(JS.Property(_propertyName(name), _emitDartObject(value)));
-          });
-          if (named.isNotEmpty) args.add(JS.ObjectInitializer(named));
-          return args;
-        }, isConst: true);
+        var args = ctor.positionalArguments.map(_emitDartObject).toList();
+        var named = <JS.Property>[];
+        ctor.namedArguments.forEach((name, value) {
+          named.add(JS.Property(propertyName(name), _emitDartObject(value)));
+        });
+        if (named.isNotEmpty) args.add(JS.ObjectInitializer(named));
+        return _emitInstanceCreationExpression(ctor.constructor, type, args,
+            isConst: true);
       }
     }
     if (value is DartObjectImpl && type is FunctionType) {
@@ -4545,7 +4526,7 @@
     return _emitInstanceCreationExpression(
         element,
         getType(constructor.type) as InterfaceType,
-        () => _emitArgumentList(node.argumentList),
+        _emitArgumentList(node.argumentList),
         isConst: node.isConst,
         ctorNode: constructor);
   }
@@ -4942,28 +4923,6 @@
     return id;
   }
 
-  JS.Expression _cacheConst(JS.Expression expr()) {
-    var savedTypeParams = _typeParamInConst;
-    _typeParamInConst = [];
-
-    var jsExpr = expr();
-
-    bool usesTypeParams = _typeParamInConst.isNotEmpty;
-    _typeParamInConst = savedTypeParams;
-
-    // TODO(jmesserly): if it uses type params we can still hoist it up as far
-    // as it will go, e.g. at the level the generic class is defined where type
-    // params are available.
-    if (_currentFunction == null || usesTypeParams) return jsExpr;
-
-    var temp = JS.TemporaryId('const');
-    moduleItems.add(js.statement('let #;', [temp]));
-    return js.call('# || (# = #)', [temp, temp, jsExpr]);
-  }
-
-  JS.Expression _emitConst(JS.Expression expr()) =>
-      _cacheConst(() => runtimeCall('const(#)', expr()));
-
   /// Returns a new expression, which can be be used safely *once* on the
   /// left hand side, and *once* on the right side of an assignment.
   /// For example: `expr1[expr2] += y` can be compiled as
@@ -5416,21 +5375,6 @@
   }
 
   @override
-  JS.For visitForStatement(ForStatement node) {
-    var init = _visitExpression(node.initialization) ??
-        visitVariableDeclarationList(node.variables);
-    var updaters = node.updaters;
-    JS.Expression update;
-    if (updaters != null && updaters.isNotEmpty) {
-      update =
-          JS.Expression.binary(updaters.map(_visitExpression).toList(), ',')
-              .toVoidExpression();
-    }
-    var condition = _visitTest(node.condition);
-    return JS.For(init, condition, update, _visitScope(node.body));
-  }
-
-  @override
   JS.While visitWhileStatement(WhileStatement node) {
     return JS.While(_visitTest(node.condition), _visitScope(node.body));
   }
@@ -5440,32 +5384,7 @@
     return JS.Do(_visitScope(node.body), _visitTest(node.condition));
   }
 
-  @override
-  JS.Statement visitForEachStatement(ForEachStatement node) {
-    if (node.awaitKeyword != null) {
-      return _emitAwaitFor(node);
-    }
-
-    var init = _visitExpression(node.identifier);
-    var iterable = _visitExpression(node.iterable);
-
-    var body = _visitScope(node.body);
-    if (init == null) {
-      var id = _emitVariableDef(node.loopVariable.identifier);
-      init = js.call('let #', id);
-      if (_annotatedNullCheck(node.loopVariable.declaredElement)) {
-        body = JS.Block([_nullParameterCheck(JS.Identifier(id.name)), body]);
-      }
-      if (variableIsReferenced(id.name, iterable)) {
-        var temp = JS.TemporaryId('iter');
-        return JS.Block(
-            [iterable.toVariableDeclaration(temp), JS.ForOf(init, temp, body)]);
-      }
-    }
-    return JS.ForOf(init, iterable, body);
-  }
-
-  JS.Statement _emitAwaitFor(ForEachStatement node) {
+  JS.Statement _emitAwaitFor(ForEachParts forParts, JS.Statement jsBody) {
     // Emits `await for (var value in stream) ...`, which desugars as:
     //
     // let iter = new StreamIterator(stream);
@@ -5488,14 +5407,19 @@
     var createStreamIter = _emitInstanceCreationExpression(
         streamIterator.element.unnamedConstructor,
         streamIterator,
-        () => [_visitExpression(node.iterable)]);
+        [_visitExpression(forParts.iterable)]);
     var iter = JS.TemporaryId('iter');
-    var variable = node.identifier ?? node.loopVariable.identifier;
-    var init = _visitExpression(node.identifier);
-    if (init == null) {
+    SimpleIdentifier variable;
+    JS.Expression init;
+    if (forParts is ForEachPartsWithIdentifier) {
+      variable = forParts.identifier;
+      init = js
+          .call('# = #.current', [_visitExpression(forParts.identifier), iter]);
+    } else if (forParts is ForEachPartsWithDeclaration) {
+      variable = forParts.loopVariable.identifier;
       init = js.call('let # = #.current', [_emitVariableDef(variable), iter]);
     } else {
-      init = js.call('# = #.current', [init, iter]);
+      throw new StateError('Unrecognized for loop parts');
     }
     return js.statement(
         '{'
@@ -5510,7 +5434,7 @@
           JS.Yield(js.call('#.moveNext()', iter))
             ..sourceInformation = _nodeStart(variable),
           init,
-          _visitStatement(node.body),
+          jsBody,
           JS.Yield(js.call('#.cancel()', iter))
             ..sourceInformation = _nodeStart(variable)
         ]);
@@ -5525,6 +5449,34 @@
   @override
   visitContinueStatement(ContinueStatement node) {
     var label = node.label;
+    if (node.label != null) {
+      var parent = node.parent;
+      if (parent is SwitchCase) {
+        // If this is the last statement in this case, and we're jumping to the
+        // next statement in the following case, just omit the continue.  JS
+        // will fall through.
+        if (parent.statements.last == node) {
+          var grandparent = parent.parent;
+          if (grandparent is SwitchStatement) {
+            var members = grandparent.members;
+            for (int i = 0; i < members.length; ++i) {
+              if (members[i] == parent) {
+                if (i < members.length - 1) {
+                  var next = members[i + 1];
+                  if (next is SwitchMember &&
+                      next.labels
+                          .map((l) => l.label.name)
+                          .contains(node.label.name)) {
+                    return js.comment('continue to next case');
+                  }
+                }
+                break;
+              }
+            }
+          }
+        }
+      }
+    }
     return JS.Continue(label?.name);
   }
 
@@ -5697,58 +5649,40 @@
 
   @override
   visitSymbolLiteral(SymbolLiteral node) {
-    return _emitConst(() => _emitDartSymbol(node.components.join('.')));
-  }
-
-  JS.Expression _emitDartSymbol(String name) {
-    // TODO(vsm): Handle qualified symbols correctly.
-    var last = name.substring(name.lastIndexOf('.') + 1);
-    var jsName = js.string(name, "'");
-    if (last.startsWith('_')) {
-      var nativeSymbol = emitPrivateNameSymbol(currentLibrary, last);
-      return js.call('new #.new(#, #)', [
-        _emitConstructorAccess(privateSymbolClass.type),
-        jsName,
-        nativeSymbol
-      ]);
-    } else {
-      return js
-          .call('#.new(#)', [_emitConstructorAccess(types.symbolType), jsName]);
-    }
+    return emitDartSymbol(node.components.join('.'));
   }
 
   @override
   JS.Expression visitListLiteral(ListLiteral node) {
     var elementType = (node.staticType as InterfaceType).typeArguments[0];
+    var elements = _visitCollectionElementList(node.elements, elementType);
     if (!node.isConst) {
-      return _emitList(elementType, _visitExpressionList(node.elements));
+      return _emitList(elementType, elements);
     }
-    return _cacheConst(
-        () => _emitConstList(elementType, _visitExpressionList(node.elements)));
+    return _emitConstList(elementType, elements);
   }
 
-  @override
-  JS.Expression visitSetLiteral(SetLiteral node) {
+  JS.Expression _emitSetLiteral(SetOrMapLiteral node) {
     var type = node.staticType as InterfaceType;
+    var elementType = type.typeArguments[0];
+    var jsElements = _visitCollectionElementList(node.elements, elementType);
     if (!node.isConst) {
       var setType = _emitType(type);
       if (node.elements.isEmpty) {
         return js.call('#.new()', [setType]);
       }
-      return js
-          .call('#.from([#])', [setType, _visitExpressionList(node.elements)]);
+      return js.call('#.from([#])', [setType, jsElements]);
     }
-    return _cacheConst(() => runtimeCall('constSet(#, [#])', [
-          _emitType((node.staticType as InterfaceType).typeArguments[0]),
-          _visitExpressionList(node.elements)
-        ]));
+    return cacheConst(
+        runtimeCall('constSet(#, [#])', [_emitType(elementType), jsElements]));
   }
 
   JS.Expression _emitConstList(
       DartType elementType, List<JS.Expression> elements) {
     // dart.constList helper internally depends on _interceptors.JSArray.
     _declareBeforeUse(_jsArray);
-    return runtimeCall('constList([#], #)', [elements, _emitType(elementType)]);
+    return cacheConst(
+        runtimeCall('constList([#], #)', [elements, _emitType(elementType)]));
   }
 
   JS.Expression _emitList(DartType itemType, List<JS.Expression> items) {
@@ -5764,32 +5698,24 @@
     return js.call('#.of(#)', [_emitType(arrayType), list]);
   }
 
-  @override
-  visitMapLiteral(MapLiteral node) {
-    emitEntries() {
-      var entries = <JS.Expression>[];
-      for (var e in node.entries) {
-        entries.add(_visitExpression(e.key));
-        entries.add(_visitExpression(e.value));
-      }
-      return entries;
-    }
-
+  JS.Expression _emitMapLiteral(SetOrMapLiteral node) {
     var type = node.staticType as InterfaceType;
+    var elementType = type.typeArguments[0];
+    var jsElements = _visitCollectionElementList(node.elements, elementType);
     if (!node.isConst) {
       var mapType = _emitMapImplType(type);
-      if (node.entries.isEmpty) {
+      if (node.elements.isEmpty) {
         return js.call('new #.new()', [mapType]);
       }
-      return js.call('new #.from([#])', [mapType, emitEntries()]);
+      return js.call('new #.from([#])', [mapType, jsElements]);
     }
-    return _cacheConst(() => _emitConstMap(type, emitEntries()));
+    return _emitConstMap(type, jsElements);
   }
 
   JS.Expression _emitConstMap(InterfaceType type, List<JS.Expression> entries) {
     var typeArgs = type.typeArguments;
-    return runtimeCall('constMap(#, #, [#])',
-        [_emitType(typeArgs[0]), _emitType(typeArgs[1]), entries]);
+    return cacheConst(runtimeCall('constMap(#, #, [#])',
+        [_emitType(typeArgs[0]), _emitType(typeArgs[1]), entries]));
   }
 
   JS.Expression _emitMapImplType(InterfaceType type, {bool identity}) {
@@ -5855,6 +5781,11 @@
     return e;
   }
 
+  /// Visits [nodes] with [_visitExpression].
+  List<JS.Expression> _visitExpressionList(Iterable<AstNode> nodes) {
+    return nodes?.map(_visitExpression)?.toList();
+  }
+
   /// Visit a Dart [node] that produces a JS statement, and marks its source
   /// location for debugging.
   JS.Statement _visitStatement(AstNode node) {
@@ -5869,11 +5800,98 @@
     return nodes?.map(_visitStatement)?.toList();
   }
 
-  /// Visits [nodes] with [_visitExpression].
-  List<JS.Expression> _visitExpressionList(Iterable<AstNode> nodes) {
-    return nodes?.map(_visitExpression)?.toList();
+  /// Returns a [JS.Expression] for each [CollectionElement] in [nodes].
+  ///
+  /// Visits all [nodes] in order and nested [CollectionElement]s depth first
+  /// to produce [JS.Expresison]s intended to be used when outputing a
+  /// collection literal.
+  ///
+  /// [IfElement]s and [ForElement]s will be transformed into a spread of a
+  /// self invoking function that reutrns a list.
+  ///
+  /// Example Dart:
+  ///     [1, if(true) for (var i=2; i<10; i++) i, 10]
+  ///
+  /// JS:
+  ///     [1, ...(() => {
+  ///       let temp = JSArrayOfint().of([]);
+  ///       if (true) for (let i = 2; i < 10; i++) temp.push(i);
+  ///       return temp;
+  ///     })(), 10]
+  List<JS.Expression> _visitCollectionElementList(
+      Iterable<CollectionElement> nodes, DartType elementType) {
+    /// Returns [body] wrapped in a function and a call.
+    ///
+    /// Alternatively if [body] contains a yield, will wrap body in a gerarator
+    /// fucntion, call it, and yield the result of [yieldType].
+    /// TODO(nshahan) Move to share between compilers. Need to work out a common
+    /// emitLibraryName().
+    JS.Expression detectYieldAndCall(
+        JS.Statement body, InterfaceType yieldType) {
+      var finder = YieldFinder();
+      body.accept(finder);
+      if (finder.hasYield) {
+        var genFn = JS.Fun([], body, isGenerator: true);
+        var asyncLibrary = emitLibraryName(types.futureType.element.library);
+        return JS.Yield(js.call(
+            '#.async(#, #)', [asyncLibrary, _emitType(yieldType), genFn]));
+      }
+      return JS.Call(JS.ArrowFun([], body), []);
+    }
+
+    var expressions = <JS.Expression>[];
+    for (var node in nodes) {
+      if (_isUiAsCodeElement(node)) {
+        // Create a temporary variable to build a new collection from.
+        var previousCollectionVariable = _currentCollectionVariable;
+        var arrayType = _jsArray.type.instantiate([elementType]);
+        var temporaryIdentifier = _createTemporary('items', arrayType);
+        _currentCollectionVariable = _emitSimpleIdentifier(temporaryIdentifier);
+        var items = js.statement('let # = #',
+            [_currentCollectionVariable, _emitList(elementType, [])]);
+
+        // Build up a list for the control-flow-collections element and wrap in
+        // a function call that returns the list.
+        var functionBody = JS.Block([
+          items,
+          node.accept<JS.Node>(this),
+          JS.Return(_currentCollectionVariable)
+        ]);
+        var functionCall = detectYieldAndCall(functionBody, arrayType);
+
+        // Finally, spread the temporary control-flow-collections list.
+        expressions.add(JS.Spread(functionCall));
+        _currentCollectionVariable = previousCollectionVariable;
+      } else if (node is MapLiteralEntry) {
+        expressions.add(_visitExpression(node.key));
+        expressions.add(_visitExpression(node.value));
+      } else {
+        expressions.add(_visitExpression(node));
+      }
+    }
+    return expressions;
   }
 
+  /// Visits [node] with [_visitExpression] and wraps the result in a call to
+  /// append it to the list tracked by [_currentCollectionVariable].
+  JS.Statement _visitNestedCollectionElement(CollectionElement node) {
+    JS.Statement pushToCurrentCollection(Expression value) => js.statement(
+        '#.push(#)', [_currentCollectionVariable, _visitExpression(value)]);
+
+    if (node is MapLiteralEntry) {
+      return JS.Block([
+        pushToCurrentCollection(node.key),
+        pushToCurrentCollection(node.value)
+      ]);
+    }
+
+    return pushToCurrentCollection(node);
+  }
+
+  /// Returns `true` if [node] is a UI-as-Code [CollectionElement].
+  bool _isUiAsCodeElement(node) =>
+      node is IfElement || node is ForElement || node is SpreadElement;
+
   /// Gets the start position of [node] for use in source mapping.
   ///
   /// This is the most common kind of marking, and is used for most expressions
@@ -6060,11 +6078,11 @@
       var runtimeName = getJSExportName(element);
       if (runtimeName != null) {
         var parts = runtimeName.split('.');
-        if (parts.length < 2) return _propertyName(runtimeName);
+        if (parts.length < 2) return propertyName(runtimeName);
 
         JS.Expression result = JS.Identifier(parts[0]);
         for (int i = 1; i < parts.length; i++) {
-          result = JS.PropertyAccess(result, _propertyName(parts[i]));
+          result = JS.PropertyAccess(result, propertyName(parts[i]));
         }
         return result;
       }
@@ -6079,15 +6097,22 @@
     // actually try to access those JS members via interop.
     name = JS.memberNameForDartMember(name, _isExternal(element));
     if (useExtension) {
-      return _getExtensionSymbolInternal(name);
+      return getExtensionSymbolInternal(name);
     }
-    return _propertyName(name);
+    return propertyName(name);
   }
 
+  /// Emits the name of a static member, suitable for use in a JS property
+  /// access when combined with [_emitStaticClassName].
+  ///
+  /// The member [name] should be passed, as well as its [element] when it's
+  /// available. If the element is `external`, the element is used to statically
+  /// resolve the JS interop/dart:html static member. Otherwise it is ignored.
   JS.Expression _emitStaticMemberName(String name, [Element element]) {
-    if (element != null) {
-      var jsName = _emitJSInteropStaticMemberName(element);
-      if (jsName != null) return jsName;
+    if (element != null && _isExternal(element)) {
+      var newName = getAnnotationName(element, isJSName) ??
+          _getJSInteropStaticMemberName(element);
+      if (newName != null) return js.escapedString(newName, "'");
     }
 
     switch (name) {
@@ -6113,20 +6138,7 @@
           name += '_';
         }
     }
-    return _propertyName(name);
-  }
-
-  /// This is an internal method used by [_emitMemberName] and the
-  /// optimized `dart:_runtime extensionSymbol` builtin to get the symbol
-  /// for `dartx.<name>`.
-  ///
-  /// Do not call this directly; you want [_emitMemberName], which knows how to
-  /// handle the many details involved in naming.
-  JS.TemporaryId _getExtensionSymbolInternal(String name) {
-    return _extensionSymbols.putIfAbsent(
-        name,
-        () => JS.TemporaryId(
-            '\$${JS.friendlyNameForDartOperator[name] ?? name}'));
+    return propertyName(name);
   }
 
   var _forwardingCache = HashMap<Element, Map<String, Element>>();
@@ -6193,14 +6205,6 @@
     return false;
   }
 
-  /// Returns the canonical name to refer to the Dart library.
-  JS.Identifier emitLibraryName(LibraryElement library) {
-    // It's either one of the libraries in this module, or it's an import.
-    return _libraries[library] ??
-        _imports.putIfAbsent(library,
-            () => JS.TemporaryId(jsLibraryName(_libraryRoot, library)));
-  }
-
   /// Return true if this is one of the methods/properties on all Dart Objects
   /// (toString, hashCode, noSuchMethod, runtimeType, ==).
   bool isObjectMember(String name) {
@@ -6317,7 +6321,7 @@
   @override
   visitRedirectingConstructorInvocation(node) => _unreachable(node);
 
-  /// Unused. Handled in [visitForEachStatement].
+  /// Unused. Handled in [visitForStatement].
   @override
   visitDeclaredIdentifier(node) => _unreachable(node);
 
@@ -6381,7 +6385,7 @@
   @override
   visitLibraryIdentifier(node) => _unreachable(node);
 
-  /// Unused, see [visitMapLiteral].
+  /// Unused, see [visitSetOrMapLiteral].
   @override
   visitMapLiteralEntry(node) => _unreachable(node);
 
@@ -6421,11 +6425,74 @@
   @override
   visitWithClause(node) => _unreachable(node);
 
-  @override
-  visitForElement(ForElement node) => _unreachable(node);
+  JS.For _emitFor(ForParts forParts, JS.Statement body) {
+    JS.Expression init;
+    if (forParts is ForPartsWithExpression)
+      init = _visitExpression(forParts.initialization);
+    else if (forParts is ForPartsWithDeclarations) {
+      init = visitVariableDeclarationList(forParts.variables);
+    } else {
+      throw new StateError('Unrecognized for loop parts');
+    }
+    JS.Expression update;
+    if (forParts.updaters != null && forParts.updaters.isNotEmpty) {
+      update = JS.Expression.binary(
+              forParts.updaters.map(_visitExpression).toList(), ',')
+          .toVoidExpression();
+    }
+    return JS.For(init, _visitTest(forParts.condition), update, body);
+  }
+
+  JS.Statement _emitForEach(ForEachParts forParts, JS.Statement jsBody) {
+    var jsIterable = _visitExpression(forParts.iterable);
+    JS.Expression jsLeftExpression;
+    if (forParts is ForEachPartsWithIdentifier) {
+      jsLeftExpression = _visitExpression(forParts.identifier);
+    } else if (forParts is ForEachPartsWithDeclaration) {
+      var id = _emitVariableDef(forParts.loopVariable.identifier);
+      jsLeftExpression = js.call('let #', id);
+      if (_annotatedNullCheck(forParts.loopVariable.declaredElement)) {
+        jsBody =
+            JS.Block([_nullParameterCheck(JS.Identifier(id.name)), jsBody]);
+      }
+      if (variableIsReferenced(id.name, jsIterable)) {
+        var temp = JS.TemporaryId('iter');
+        return JS.Block([
+          jsIterable.toVariableDeclaration(temp),
+          JS.ForOf(jsLeftExpression, temp, jsBody)
+        ]);
+      }
+    } else {
+      throw new StateError('Unrecognized for loop parts');
+    }
+    return JS.ForOf(jsLeftExpression, jsIterable, jsBody);
+  }
 
   @override
-  visitIfElement(IfElement node) => _unreachable(node);
+  JS.Statement visitForElement(ForElement node) {
+    var jsBody = _isUiAsCodeElement(node.body)
+        ? node.body.accept(this)
+        : _visitNestedCollectionElement(node.body);
+    return _forAdaptor(node.forLoopParts, node.awaitKeyword, jsBody);
+  }
+
+  @override
+  JS.Statement visitIfElement(IfElement node) {
+    var thenElement = _isUiAsCodeElement(node.thenElement)
+        ? node.thenElement.accept(this)
+        : _visitNestedCollectionElement(node.thenElement);
+
+    JS.Statement elseElement;
+    if (node.elseElement != null) {
+      if (_isUiAsCodeElement(node.elseElement)) {
+        elseElement = node.elseElement.accept<JS.Node>(this);
+      } else {
+        elseElement = _visitNestedCollectionElement(node.elseElement);
+      }
+    }
+
+    return JS.If(_visitTest(node.condition), thenElement, elseElement);
+  }
 
   @override
   visitForEachPartsWithDeclaration(ForEachPartsWithDeclaration node) =>
@@ -6436,19 +6503,150 @@
       _unreachable(node);
 
   @override
-  visitForStatement2(ForStatement2 node) => _unreachable(node);
+  JS.Statement visitForStatement(ForStatement node) =>
+      _forAdaptor(node.forLoopParts, node.awaitKeyword, _visitScope(node.body));
+
+  JS.Statement _forAdaptor(
+      ForLoopParts forParts, Token awaitKeyword, JS.Statement jsBody) {
+    /// Returns a new scoped block starting with [first] followed by [rest].
+    ///
+    /// Performs one level of scope flattening when [rest] is already a scoped
+    /// block.
+    JS.Block insertFirst(JS.Statement first, JS.Statement rest) {
+      var bodyStatements = [first];
+      if (rest is JS.Block) {
+        bodyStatements.addAll(rest.statements);
+      } else {
+        bodyStatements.add(rest);
+      }
+      return JS.Block(bodyStatements);
+    }
+
+    if (forParts is ForParts) {
+      return _emitFor(forParts, jsBody);
+    } else if (forParts is ForEachParts) {
+      // If needed, assert a cast inside the body before the variable is read.
+      SimpleIdentifier variable;
+      if (forParts is ForEachPartsWithIdentifier) {
+        variable = forParts.identifier;
+      } else if (forParts is ForEachPartsWithDeclaration) {
+        variable = forParts.loopVariable.identifier;
+      } else {
+        throw new StateError('Unrecognized for loop parts');
+      }
+      var castType = getImplicitCast(variable);
+      if (castType != null) {
+        var castStatement =
+            _emitCast(castType, _visitExpression(variable)).toStatement();
+        jsBody = insertFirst(castStatement, jsBody);
+      }
+      if (awaitKeyword == null) {
+        return _emitForEach(forParts, jsBody);
+      } else {
+        return _emitAwaitFor(forParts, jsBody);
+      }
+    }
+    return _unreachable(forParts);
+  }
 
   @override
-  visitListLiteral2(ListLiteral2 node) => _unreachable(node);
+  visitSetOrMapLiteral(SetOrMapLiteral node) =>
+      node.isSet ? _emitSetLiteral(node) : _emitMapLiteral(node);
 
   @override
-  visitMapLiteral2(MapLiteral2 node) => _unreachable(node);
+  JS.Statement visitSpreadElement(SpreadElement node) {
+    /// Returns `true` if [node] is or is a child element of a map literal.
+    bool isMap(AstNode node) {
+      if (node is SetOrMapLiteral) return node.isMap;
+      if (node is ListLiteral) return false;
+      return isMap(node.parent);
+    }
 
-  @override
-  visitSetLiteral2(SetLiteral2 node) => _unreachable(node);
+    /// Returns [expression] wrapped in an implict cast to [castType] or
+    /// [expression] as provided if [castType] is `null` signifying that
+    /// no cast is needed.
+    JS.Expression wrapInImplicitCast(JS.Expression expression, castType) =>
+        castType == null ? expression : _emitCast(castType, expression);
 
-  @override
-  visitSpreadElement(SpreadElement node) => _unreachable(node);
+    /// Returns a statement spreading the elements of [expression] into
+    /// [_currentCollectionVariable].
+    ///
+    /// Expects the collection literal containing [expression] to be a list or
+    /// set literal. Inserts implicit casts to [elementCastType] for each
+    /// element if needed.
+    JS.Statement emitListOrSetSpread(
+        JS.Expression expression, DartType elementCastType) {
+      var forEachTemp =
+          _emitSimpleIdentifier(_createTemporary('i', types.dynamicType));
+      return js.statement('#.forEach((#) => #.push(#))', [
+        expression,
+        forEachTemp,
+        _currentCollectionVariable,
+        wrapInImplicitCast(forEachTemp, elementCastType)
+      ]);
+    }
+
+    /// Returns a statement spreading the key/value pairs of [expression]
+    /// into [_currentCollectionVariable].
+    ///
+    /// Expects the collection literal containing [expression] to be a map
+    /// literal. Inserts implicit casts to [keyCastType] for keys and
+    /// [valueCastType] for values if needed.
+    JS.Statement emitMapSpread(JS.Expression expression, DartType keyCastType,
+        DartType valueCastType) {
+      var keyTemp =
+          _emitSimpleIdentifier(_createTemporary('k', types.dynamicType));
+      var valueTemp =
+          _emitSimpleIdentifier(_createTemporary('v', types.dynamicType));
+      return js.statement('#.forEach((#, #) => {#.push(#); #.push(#)})', [
+        expression,
+        keyTemp,
+        valueTemp,
+        _currentCollectionVariable,
+        wrapInImplicitCast(keyTemp, keyCastType),
+        _currentCollectionVariable,
+        wrapInImplicitCast(valueTemp, valueCastType)
+      ]);
+    }
+
+    /// Appends all elements in [expression] to the collection being built.
+    ///
+    /// Uses implict cast information from [node] to insert the correct casts
+    /// for the collection elements when spreading. Inspects parents of [node]
+    /// to determine the type of the enclosing collection literal.
+    JS.Statement emitSpread(JS.Expression expression, Expression node) {
+      expression = wrapInImplicitCast(expression, getImplicitCast(node));
+
+      // Start searching for a map literal at the parent of the SpreadElement.
+      if (isMap(node.parent.parent)) {
+        return emitMapSpread(expression, getImplicitSpreadKeyCast(node),
+            getImplicitSpreadValueCast(node));
+      }
+      return emitListOrSetSpread(expression, getImplicitSpreadCast(node));
+    }
+
+    /// Emits a null check on [expression] then appends all elements to the
+    /// collection being built.
+    ///
+    /// Uses implict cast information from [node] to insert the correct casts
+    /// for the collection elements when spreading. Inspects parents of [node]
+    /// to determine the type of the enclosing collection literal.
+    JS.Statement emitNullSafeSpread(JS.Expression expression, Expression node) {
+      // TODO(nshahan) Could optimize out if we know the value is null.
+      var spreadItems =
+          _emitSimpleIdentifier(_createTemporary('items', getStaticType(node)));
+      return JS.Block([
+        js.statement('let # = #', [spreadItems, expression]),
+        js.statement(
+            'if (# != null) #', [spreadItems, emitSpread(spreadItems, node)])
+      ]);
+    }
+
+    var expression = _visitExpression(node.expression);
+    return node.beginToken.lexeme == '...?'
+        ? emitNullSafeSpread(expression, node.expression)
+        : emitSpread(expression, node.expression);
+  }
 
   @override
   visitForPartsWithDeclarations(ForPartsWithDeclarations node) =>
@@ -6459,49 +6657,6 @@
       _unreachable(node);
 }
 
-/// Choose a canonical name from the [library] element.
-///
-/// This never uses the library's name (the identifier in the `library`
-/// declaration) as it doesn't have any meaningful rules enforced.
-String jsLibraryName(String libraryRoot, LibraryElement library) {
-  var uri = library.source.uri;
-  if (uri.scheme == 'dart') {
-    return uri.path;
-  }
-  // TODO(vsm): This is not necessarily unique if '__' appears in a file name.
-  var encodedSeparator = '__';
-  String qualifiedPath;
-  if (uri.scheme == 'package') {
-    // Strip the package name.
-    // TODO(vsm): This is not unique if an escaped '/'appears in a filename.
-    // E.g., "foo/bar.dart" and "foo$47bar.dart" would collide.
-    qualifiedPath = uri.pathSegments.skip(1).join(encodedSeparator);
-  } else {
-    qualifiedPath = path
-        .relative(uri.toFilePath(), from: libraryRoot)
-        .replaceAll(path.separator, encodedSeparator)
-        .replaceAll('..', encodedSeparator);
-  }
-  return pathToJSIdentifier(qualifiedPath);
-}
-
-/// Debugger friendly name for a Dart Library.
-String jsLibraryDebuggerName(String libraryRoot, LibraryElement library) {
-  var uri = library.source.uri;
-  // For package: and dart: uris show the entire
-  if (uri.scheme == 'dart' || uri.scheme == 'package') return uri.toString();
-
-  var filePath = uri.toFilePath();
-  // Relative path to the library.
-  return path.relative(filePath, from: libraryRoot);
-}
-
-/// Shorthand for identifier-like property names.
-/// For now, we emit them as strings and the printer restores them to
-/// identifiers if it can.
-// TODO(jmesserly): avoid the round tripping through quoted form.
-JS.LiteralString _propertyName(String name) => js.string(name, "'");
-
 // TODO(jacobr): we would like to do something like the following
 // but we don't have summary support yet.
 // bool _supportJsExtensionMethod(AnnotatedNode node) =>
diff --git a/pkg/dev_compiler/lib/src/analyzer/driver.dart b/pkg/dev_compiler/lib/src/analyzer/driver.dart
index cec419b..7c5d95b 100644
--- a/pkg/dev_compiler/lib/src/analyzer/driver.dart
+++ b/pkg/dev_compiler/lib/src/analyzer/driver.dart
@@ -77,8 +77,6 @@
       {SummaryDataStore summaryData,
       List<String> summaryPaths = const [],
       Map<String, bool> experiments = const {}}) {
-    AnalysisEngine.instance.processRequiredPlugins();
-
     var resourceProvider = options.resourceProvider;
     var contextBuilder = options.createContextBuilder();
 
@@ -235,7 +233,8 @@
         libraryUris.toSet(),
         (uri) => summaryData.linkedMap[uri],
         (uri) => summaryData.unlinkedMap[uri] ?? uriToUnit[uri],
-        declaredVariables.get);
+        declaredVariables,
+        analysisOptions);
     linkResult.forEach(assembler.addLinkedLibrary);
 
     var summaryBytes = assembler.assemble().toBuffer();
@@ -244,13 +243,18 @@
     /// Create an analysis context to contain the state for this build unit.
     var context = RestrictedAnalysisContext(
         analysisOptions, declaredVariables, sourceFactory);
-    var resultProvider = InputPackagesResultProvider(
-        context,
-        SummaryDataStore([])
-          ..addStore(summaryData)
-          ..addBundle(null, bundle));
+    var resynthesizer = StoreBasedSummaryResynthesizer(
+      context,
+      null,
+      context.sourceFactory,
+      /*strongMode*/ true,
+      SummaryDataStore([])
+        ..addStore(summaryData)
+        ..addBundle(null, bundle),
+    );
+    resynthesizer.finishCoreAsyncLibraries();
+    context.typeProvider = resynthesizer.typeProvider;
 
-    var resynthesizer = resultProvider.resynthesizer;
     _extensionTypes ??= ExtensionTypeSet(context.typeProvider, resynthesizer);
 
     return LinkedAnalysisDriver(
diff --git a/pkg/dev_compiler/lib/src/analyzer/element_helpers.dart b/pkg/dev_compiler/lib/src/analyzer/element_helpers.dart
index f9d836d..45f443f 100644
--- a/pkg/dev_compiler/lib/src/analyzer/element_helpers.dart
+++ b/pkg/dev_compiler/lib/src/analyzer/element_helpers.dart
@@ -13,6 +13,7 @@
 import 'package:analyzer/src/generated/constant.dart'
     show DartObject, DartObjectImpl;
 import 'package:analyzer/src/generated/constant.dart';
+import 'package:analyzer/src/generated/type_system.dart' show Dart2TypeSystem;
 
 class Tuple2<T0, T1> {
   final T0 e0;
@@ -20,7 +21,12 @@
   Tuple2(this.e0, this.e1);
 }
 
-// TODO(jmesserly): replace this with instantiateToBounds
+/// Instantiates [t] with dynamic bounds.
+///
+/// Note: this should only be used when the resulting type is later replaced,
+/// such as a "deferred supertype" (used to break circularity between the
+/// supertype's type arguments and the class definition). Otherwise
+/// [instantiateElementTypeToBounds] should be used instead.
 InterfaceType fillDynamicTypeArgsForClass(InterfaceType t) {
   if (t.typeArguments.isNotEmpty) {
     var rawT = t.element.type;
@@ -30,24 +36,44 @@
   return t;
 }
 
-// TODO(jmesserly): replace this with instantiateToBounds
-DartType fillDynamicTypeArgsForElement(TypeDefiningElement element) {
+/// Instantiates the [element] type to bounds.
+///
+/// Conceptually this is similar to [Dart2TypeSystem.instantiateToBounds] on
+/// `element.type`, but unfortunately typedef elements do not return a
+/// meaningful type, so we need to work around that.
+DartType instantiateElementTypeToBounds(
+    Dart2TypeSystem rules, TypeDefiningElement element) {
   Element e = element;
   if (e is TypeParameterizedElement) {
-    // TODO(jmesserly): GenericTypeAliasElement.type does not return the correct
-    // type (it is missing the type formals), so we workaround that here.
+    // TODO(jmesserly): we can't use `instantiateToBounds` because typedefs do
+    // not include their type parameters, for example:
+    //
+    //     typedef void void Func<T>(T x);               // Dart 1 syntax.
+    //     typedef void GenericFunc<T> = S Func<S>(T x); // Dart 2 syntax.
+    //
+    // There is no way to get a type that has `<T>` as a type formal from the
+    // element (without constructing it ourselves).
+    //
+    // Futhermore, the second line is represented by a GenericTypeAliasElement,
+    // and its type getter does not even include its own type formals `<S>`.
+    // That has to be worked around using `.function.type`.
     var type = e is GenericTypeAliasElement ? e.function.type : e.type;
+    var bounds = rules.instantiateTypeFormalsToBounds(e.typeParameters);
+    if (bounds == null) return type;
     return type.substitute2(
-        List.filled(e.typeParameters.length, DynamicTypeImpl.instance),
-        TypeParameterTypeImpl.getTypes(e.typeParameters));
+        bounds, TypeParameterTypeImpl.getTypes(e.typeParameters));
   }
   return element.type;
 }
 
-/// Given an annotated [node] and a [test] function, returns the first matching
-/// constant valued annotation.
+/// Given an [element] and a [test] function, returns the first matching
+/// constant valued metadata annotation on the element.
 ///
-/// For example if we had the ClassDeclaration node for `FontElement`:
+/// If the element is a synthetic getter/setter (Analyzer creates these for
+/// fields), then this will use the corresponding real element, which will have
+/// the metadata annotations.
+///
+/// For example if we had the [ClassDeclaration] node for `FontElement`:
 ///
 ///    @js.JS('HTMLFontElement')
 ///    @deprecated
@@ -59,6 +85,11 @@
 ///
 DartObject findAnnotation(Element element, bool test(DartObjectImpl value)) {
   if (element == null) return null;
+  var accessor = element;
+  if (accessor is PropertyAccessorElement && accessor.isSynthetic) {
+    // Look for metadata on the real element, not the synthetic one.
+    element = accessor.variable;
+  }
   for (var metadata in element.metadata) {
     var value = metadata.computeConstantValue();
     if (value is DartObjectImpl && test(value)) return value;
diff --git a/pkg/dev_compiler/lib/src/analyzer/js_interop.dart b/pkg/dev_compiler/lib/src/analyzer/js_interop.dart
index 2247840..b1a29ae 100644
--- a/pkg/dev_compiler/lib/src/analyzer/js_interop.dart
+++ b/pkg/dev_compiler/lib/src/analyzer/js_interop.dart
@@ -54,6 +54,8 @@
 bool isJSExportNameAnnotation(DartObjectImpl value) =>
     isBuiltinAnnotation(value, '_foreign_helper', 'JSExportName');
 
+/// Whether [value] is a `@JSName` (internal annotation used in dart:html for
+/// renaming members).
 bool isJSName(DartObjectImpl value) =>
     isBuiltinAnnotation(value, '_js_helper', 'JSName');
 
@@ -63,6 +65,9 @@
 bool isNullCheckAnnotation(DartObjectImpl value) =>
     isBuiltinAnnotation(value, '_js_helper', '_NullCheck');
 
+bool isUndefinedAnnotation(DartObjectImpl value) =>
+    isBuiltinAnnotation(value, '_js_helper', '_Undefined');
+
 /// Returns the name value of the `JSExportName` annotation (when compiling
 /// the SDK), or `null` if there's none. This is used to control the name
 /// under which functions are compiled and exported.
diff --git a/pkg/dev_compiler/lib/src/analyzer/module_compiler.dart b/pkg/dev_compiler/lib/src/analyzer/module_compiler.dart
index 179dbb1..3997597 100644
--- a/pkg/dev_compiler/lib/src/analyzer/module_compiler.dart
+++ b/pkg/dev_compiler/lib/src/analyzer/module_compiler.dart
@@ -19,6 +19,7 @@
 import '../compiler/module_builder.dart'
     show transformModuleFormat, ModuleFormat;
 import '../compiler/shared_command.dart';
+import '../compiler/shared_compiler.dart';
 import '../js_ast/js_ast.dart' as JS;
 import '../js_ast/js_ast.dart' show js;
 import '../js_ast/source_map_printer.dart' show SourceMapPrintingContext;
@@ -135,9 +136,6 @@
   /// into the output JavaScript module.
   final bool sourceMapComment;
 
-  /// Whether to emit the source mapping file inline as a data url.
-  final bool inlineSourceMap;
-
   /// The file extension for summaries.
   final String summaryExtension;
 
@@ -159,7 +157,6 @@
   CompilerOptions(
       {bool sourceMap = true,
       this.sourceMapComment = true,
-      this.inlineSourceMap = false,
       bool summarizeApi = true,
       this.summaryExtension = 'sum',
       this.unsafeForceCompile = false,
@@ -182,7 +179,6 @@
 
   CompilerOptions.fromArguments(ArgResults args)
       : sourceMapComment = args['source-map-comment'] as bool,
-        inlineSourceMap = args['inline-source-map'] as bool,
         summaryExtension = args['summary-extension'] as String,
         unsafeForceCompile = args['unsafe-force-compile'] as bool,
         summaryOutPath = args['summary-out'] as String,
@@ -203,8 +199,6 @@
               'disable if using X-SourceMap header',
           defaultsTo: true,
           hide: hide)
-      ..addFlag('inline-source-map',
-          help: 'emit source mapping inline', defaultsTo: false, hide: hide)
       ..addFlag('unsafe-force-compile',
           help: 'Compile code even if it has errors. ಠ_ಠ\n'
               'This has undefined behavior!',
@@ -214,9 +208,7 @@
       ..addOption('module-root',
           help: '(deprecated) used to determine the default module name and\n'
               'summary import name if those are not provided.',
-          hide: hide)
-      ..addOption('library-root',
-          help: '(deprecated) used to name libraries inside the module.');
+          hide: hide);
   }
 
   static String _getLibraryRoot(ArgResults args) {
@@ -244,13 +236,6 @@
   /// the libraries in this module.
   final List<int> summaryBytes;
 
-  /// Unique identifier indicating hole to inline the source map.
-  ///
-  /// We cannot generate the source map before the script it is for is
-  /// generated so we have generate the script including this id and then
-  /// replace the ID once the source map is generated.
-  static String sourceMapHoleID = 'SourceMap3G5a8h6JVhHfdGuDxZr1EF9GQC8y0e6u';
-
   JSModuleFile(this.errors, this.options, this.moduleTree, this.summaryBytes);
 
   JSModuleFile.invalid(this.errors, this.options)
@@ -305,7 +290,7 @@
     var rawSourceMap = options.inlineSourceMap
         ? js.escapedString(json.encode(builtMap), "'").value
         : 'null';
-    text = text.replaceFirst(sourceMapHoleID, rawSourceMap);
+    text = text.replaceFirst(SharedCompiler.sourceMapLocationID, rawSourceMap);
 
     return JSModuleCode(text, builtMap);
   }
diff --git a/pkg/dev_compiler/lib/src/analyzer/nullable_type_inference.dart b/pkg/dev_compiler/lib/src/analyzer/nullable_type_inference.dart
index 8359048..ef723c2 100644
--- a/pkg/dev_compiler/lib/src/analyzer/nullable_type_inference.dart
+++ b/pkg/dev_compiler/lib/src/analyzer/nullable_type_inference.dart
@@ -352,21 +352,27 @@
   }
 
   @override
-  visitForEachStatement(ForEachStatement node) {
-    if (node.identifier == null) {
-      var declaration = node.loopVariable;
-      var element = declaration.declaredElement;
-      _locals.add(element);
-      if (!_assertedNotNull(element)) {
-        _nullableLocals.add(element);
-      }
-    } else {
-      var element = node.identifier.staticElement;
-      if (element is LocalVariableElement && !_assertedNotNull(element)) {
-        _nullableLocals.add(element);
+  visitForStatement(ForStatement node) {
+    var forLoopParts = node.forLoopParts;
+    if (forLoopParts is ForEachParts) {
+      if (forLoopParts is ForEachPartsWithIdentifier &&
+          forLoopParts.identifier != null) {
+        var element = forLoopParts.identifier.staticElement;
+        if (element is LocalVariableElement && !_assertedNotNull(element)) {
+          _nullableLocals.add(element);
+        }
+      } else if (forLoopParts is ForEachPartsWithDeclaration) {
+        var declaration = forLoopParts.loopVariable;
+        var element = declaration.declaredElement;
+        _locals.add(element);
+        if (!_assertedNotNull(element)) {
+          _nullableLocals.add(element);
+        }
+      } else {
+        throw new StateError('Unrecognized for loop parts');
       }
     }
-    super.visitForEachStatement(node);
+    super.visitForStatement(node);
   }
 
   @override
diff --git a/pkg/dev_compiler/lib/src/analyzer/reify_coercions.dart b/pkg/dev_compiler/lib/src/analyzer/reify_coercions.dart
index 5c5ff36..a071fcb 100644
--- a/pkg/dev_compiler/lib/src/analyzer/reify_coercions.dart
+++ b/pkg/dev_compiler/lib/src/analyzer/reify_coercions.dart
@@ -9,7 +9,6 @@
 import 'package:analyzer/src/dart/ast/ast.dart' show FunctionBodyImpl;
 import 'package:analyzer/src/dart/ast/utilities.dart'
     show AstCloner, NodeReplacer;
-import 'package:analyzer/src/dart/element/type.dart' show DynamicTypeImpl;
 import 'package:analyzer/src/generated/parser.dart' show ResolutionCopier;
 import 'package:analyzer/src/task/strong/ast_properties.dart' as ast_properties;
 
@@ -67,6 +66,13 @@
   }
 
   @override
+  visitSpreadElement(SpreadElement node) {
+    // Skip visiting the expression so we can handle all casts during code
+    // generation.
+    node.expression.visitChildren(this);
+  }
+
+  @override
   visitMethodInvocation(MethodInvocation node) {
     if (isInlineJS(node.methodName.staticElement)) {
       // Don't cast our inline-JS code in SDK.
@@ -82,29 +88,26 @@
   }
 
   @override
-  visitForEachStatement(ForEachStatement node) {
-    // Visit other children.
-    node.iterable.accept(this);
-    node.body.accept(this);
+  void visitForStatement(ForStatement node) {
+    var forLoopParts = node.forLoopParts;
+    if (forLoopParts is ForEachParts) {
+      // Visit other children.
+      forLoopParts.iterable.accept(this);
+      node.body.accept(this);
+    } else {
+      super.visitForStatement(node);
+    }
+  }
 
-    // If needed, assert a cast inside the body before the variable is read.
-    var variable = node.identifier ?? node.loopVariable.identifier;
-    var castType = ast_properties.getImplicitCast(variable);
-    if (castType != null) {
-      // Build the cast. We will place this cast in the body, so need to clone
-      // the variable's AST node and clear out its static type (otherwise we
-      // will optimize away the cast).
-      var cast = castExpression(
-          _clone(variable)..staticType = DynamicTypeImpl.instance, castType);
-
-      var body = node.body;
-      var blockBody = <Statement>[ast.expressionStatement(cast)];
-      if (body is Block) {
-        blockBody.addAll(body.statements);
-      } else {
-        blockBody.add(body);
-      }
-      _replaceNode(node, body, ast.block(blockBody));
+  @override
+  void visitForElement(ForElement node) {
+    var forLoopParts = node.forLoopParts;
+    if (forLoopParts is ForEachParts) {
+      // Visit other children.
+      forLoopParts.iterable.accept(this);
+      node.body.accept(this);
+    } else {
+      super.visitForElement(node);
     }
   }
 
@@ -131,6 +134,12 @@
           clone, ast_properties.getImplicitCast(node));
       ast_properties.setImplicitOperationCast(
           clone, ast_properties.getImplicitOperationCast(node));
+      ast_properties.setImplicitSpreadCast(
+          clone, ast_properties.getImplicitSpreadCast(node));
+      ast_properties.setImplicitSpreadKeyCast(
+          clone, ast_properties.getImplicitSpreadKeyCast(node));
+      ast_properties.setImplicitSpreadValueCast(
+          clone, ast_properties.getImplicitSpreadValueCast(node));
       ast_properties.setIsDynamicInvoke(
           clone, ast_properties.isDynamicInvoke(node));
     }
diff --git a/pkg/dev_compiler/lib/src/compiler/js_metalet.dart b/pkg/dev_compiler/lib/src/compiler/js_metalet.dart
index 65cfe52..e911dca 100644
--- a/pkg/dev_compiler/lib/src/compiler/js_metalet.dart
+++ b/pkg/dev_compiler/lib/src/compiler/js_metalet.dart
@@ -4,7 +4,7 @@
 
 // TODO(jmesserly): import from its own package
 import '../js_ast/js_ast.dart';
-
+import 'shared_compiler.dart' show YieldFinder;
 import 'js_names.dart' show TemporaryId;
 
 /// A synthetic `let*` node, similar to that found in Scheme.
@@ -181,7 +181,7 @@
   }
 
   Expression _toInvokedFunction(Block block) {
-    var finder = _YieldFinder();
+    var finder = YieldFinder();
     block.accept(finder);
     if (!finder.hasYield) {
       return Call(ArrowFun([], block), []);
@@ -353,34 +353,3 @@
     if (!found) super.visitNode(node);
   }
 }
-
-class _YieldFinder extends BaseVisitor {
-  bool hasYield = false;
-  bool hasThis = false;
-  bool _nestedFunction = false;
-
-  @override
-  visitThis(This node) {
-    hasThis = true;
-  }
-
-  @override
-  visitFunctionExpression(FunctionExpression node) {
-    var savedNested = _nestedFunction;
-    _nestedFunction = true;
-    super.visitFunctionExpression(node);
-    _nestedFunction = savedNested;
-  }
-
-  @override
-  visitYield(Yield node) {
-    if (!_nestedFunction) hasYield = true;
-    super.visitYield(node);
-  }
-
-  @override
-  visitNode(Node node) {
-    if (hasYield && hasThis) return; // found both, nothing more to do.
-    super.visitNode(node);
-  }
-}
diff --git a/pkg/dev_compiler/lib/src/compiler/js_utils.dart b/pkg/dev_compiler/lib/src/compiler/js_utils.dart
index a0275c6..74820eb 100644
--- a/pkg/dev_compiler/lib/src/compiler/js_utils.dart
+++ b/pkg/dev_compiler/lib/src/compiler/js_utils.dart
@@ -25,18 +25,20 @@
   return fn;
 }
 
-Set<Identifier> findMutatedVariables(Node scope) {
+Set<String> findMutatedVariables(Node scope) {
   var v = MutationVisitor();
   scope.accept(v);
   return v.mutated;
 }
 
 class MutationVisitor extends BaseVisitor {
-  final mutated = Set<Identifier>();
+  /// Using Identifier names instead of a more precise key may result in
+  /// mutations being imprecisely reported when variables shadow each other.
+  final mutated = Set<String>();
   @override
   visitAssignment(node) {
     var id = node.leftHandSide;
-    if (id is Identifier) mutated.add(id);
+    if (id is Identifier) mutated.add(id.name);
     super.visitAssignment(node);
   }
 }
diff --git a/pkg/dev_compiler/lib/src/compiler/shared_command.dart b/pkg/dev_compiler/lib/src/compiler/shared_command.dart
index 39c4759..397f0ed 100644
--- a/pkg/dev_compiler/lib/src/compiler/shared_command.dart
+++ b/pkg/dev_compiler/lib/src/compiler/shared_command.dart
@@ -56,6 +56,10 @@
   /// code.
   final bool sourceMap;
 
+  /// Whether to emit the source mapping file in the program text, so the
+  /// runtime can enable synchronous stack trace deobsfuscation.
+  final bool inlineSourceMap;
+
   /// Whether to emit a summary file containing API signatures.
   ///
   /// This is required for a modular build process.
@@ -95,6 +99,7 @@
 
   SharedCompilerOptions(
       {this.sourceMap = true,
+      this.inlineSourceMap = false,
       this.summarizeApi = true,
       this.emitMetadata = false,
       this.enableAsserts = true,
@@ -109,6 +114,7 @@
       [String moduleRoot, String summaryExtension])
       : this(
             sourceMap: args['source-map'] as bool,
+            inlineSourceMap: args['inline-source-map'] as bool,
             summarizeApi: args['summarize'] as bool,
             emitMetadata: args['emit-metadata'] as bool,
             enableAsserts: args['enable-asserts'] as bool,
@@ -119,7 +125,8 @@
             summaryModules: _parseCustomSummaryModules(
                 args['summary'] as List<String>, moduleRoot, summaryExtension),
             moduleFormats: parseModuleFormatOption(args),
-            moduleName: _getModuleName(args, moduleRoot));
+            moduleName: _getModuleName(args, moduleRoot),
+            replCompile: args['repl-compile'] as bool);
 
   static void addArguments(ArgParser parser, {bool hide = true}) {
     addModuleFormatOptions(parser, hide: hide);
@@ -136,6 +143,8 @@
           help: 'emit an API summary file', defaultsTo: true, hide: hide)
       ..addFlag('source-map',
           help: 'emit source mapping', defaultsTo: true, hide: hide)
+      ..addFlag('inline-source-map',
+          help: 'emit source mapping inline', defaultsTo: false, hide: hide)
       ..addFlag('emit-metadata',
           help: 'emit metadata annotations queriable via mirrors', hide: hide)
       ..addFlag('enable-asserts',
@@ -148,6 +157,16 @@
           help: '--bazel-mapping=gen/to/library.dart,to/library.dart\n'
               'adjusts the path in source maps.',
           splitCommas: false,
+          hide: hide)
+      ..addOption('library-root',
+          help: '(deprecated) used to name libraries inside the module, '
+              'ignored with -k.',
+          hide: hide)
+      ..addFlag('repl-compile',
+          help: 'compile in a more permissive REPL mode, allowing access'
+              ' to private members across library boundaries. This should'
+              ' only be used by debugging tools.',
+          defaultsTo: false,
           hide: hide);
   }
 
@@ -380,7 +399,8 @@
   }
   if (args.isKernel) {
     return kernel_compiler.compile(args.rest,
-        compilerState: previousResult?.kernelState);
+        compilerState: previousResult?.kernelState,
+        useIncrementalCompiler: args.useIncrementalCompiler);
   } else {
     var result = analyzer_compiler.compile(args.rest,
         compilerState: previousResult?.analyzerState);
@@ -467,8 +487,23 @@
   /// instead of Analyzer trees for representing the Dart code.
   final bool isKernel;
 
+  /// Whether to re-use the last compiler result when in a worker.
+  ///
+  /// This is useful if we are repeatedly compiling things in the same context,
+  /// e.g. in a debugger REPL.
+  final bool reuseResult;
+
+  /// Whether to use the incremental compiler for compiling.
+  ///
+  /// Note that this only makes sense when also reusing results.
+  final bool useIncrementalCompiler;
+
   ParsedArguments._(this.rest,
-      {this.isBatch = false, this.isWorker = false, this.isKernel = false});
+      {this.isBatch = false,
+      this.isWorker = false,
+      this.isKernel = false,
+      this.reuseResult = false,
+      this.useIncrementalCompiler = false});
 
   /// Preprocess arguments to determine whether DDK is used in batch mode or as a
   /// persistent worker.
@@ -486,6 +521,8 @@
     bool isWorker = false;
     bool isBatch = false;
     bool isKernel = false;
+    bool reuseResult = false;
+    bool useIncrementalCompiler = false;
     var len = args.length;
     for (int i = 0; i < len; i++) {
       var arg = args[i];
@@ -502,12 +539,20 @@
         isBatch = true;
       } else if (arg == '--kernel' || arg == '-k') {
         isKernel = true;
+      } else if (arg == '--reuse-compiler-result') {
+        reuseResult = true;
+      } else if (arg == '--use-incremental-compiler') {
+        useIncrementalCompiler = true;
       } else {
         newArgs.add(arg);
       }
     }
     return ParsedArguments._(newArgs,
-        isWorker: isWorker, isBatch: isBatch, isKernel: isKernel);
+        isWorker: isWorker,
+        isBatch: isBatch,
+        isKernel: isKernel,
+        reuseResult: reuseResult,
+        useIncrementalCompiler: useIncrementalCompiler);
   }
 
   /// Whether the compiler is running in [isBatch] or [isWorker] mode.
@@ -532,7 +577,10 @@
     return ParsedArguments._(rest.toList()..addAll(newArgs.rest),
         isWorker: isWorker,
         isBatch: isBatch,
-        isKernel: isKernel || newArgs.isKernel);
+        isKernel: isKernel || newArgs.isKernel,
+        reuseResult: reuseResult || newArgs.reuseResult,
+        useIncrementalCompiler:
+            useIncrementalCompiler || newArgs.useIncrementalCompiler);
   }
 }
 
diff --git a/pkg/dev_compiler/lib/src/compiler/shared_compiler.dart b/pkg/dev_compiler/lib/src/compiler/shared_compiler.dart
index a39888c..d9270a2 100644
--- a/pkg/dev_compiler/lib/src/compiler/shared_compiler.dart
+++ b/pkg/dev_compiler/lib/src/compiler/shared_compiler.dart
@@ -3,6 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:collection';
+import 'package:meta/meta.dart';
+
 import '../compiler/js_metalet.dart' as JS;
 import '../compiler/js_names.dart' as JS;
 import '../compiler/js_utils.dart' as JS;
@@ -13,21 +15,115 @@
 ///
 /// This class should only implement functionality that depends purely on JS
 /// classes, rather than on Analyzer/Kernel types.
-abstract class SharedCompiler<Library, Class> {
+abstract class SharedCompiler<Library, Class, InterfaceType, FunctionNode> {
   /// When inside a `[]=` operator, this will be a non-null value that should be
   /// returned by any `return;` statement.
   ///
   /// This lets DDC use the setter method's return value directly.
   final List<JS.Identifier> _operatorSetResultStack = [];
 
-  JS.Identifier runtimeModule;
-  final namedArgumentTemp = JS.TemporaryId('opts');
-
+  /// Private member names in this module, organized by their library.
   final _privateNames = HashMap<Library, HashMap<String, JS.TemporaryId>>();
 
+  /// Extension member symbols for adding Dart members to JS types.
+  ///
+  /// These are added to the [extensionSymbolsModule]; see that field for more
+  /// information.
+  final _extensionSymbols = <String, JS.TemporaryId>{};
+
+  /// The set of libraries we are currently compiling, and the temporaries used
+  /// to refer to them.
+  final _libraries = <Library, JS.Identifier>{};
+
+  /// Imported libraries, and the temporaries used to refer to them.
+  final _imports = <Library, JS.TemporaryId>{};
+
+  /// The identifier used to reference DDC's core "dart:_runtime" library from
+  /// generated JS code, typically called "dart" e.g. `dart.dcall`.
+  @protected
+  JS.Identifier runtimeModule;
+
+  /// The identifier used to reference DDC's "extension method" symbols, used to
+  /// safely add Dart-specific member names to JavaScript classes, such as
+  /// primitive types (e.g. String) or DOM types in "dart:html".
+  @protected
+  JS.Identifier extensionSymbolsModule;
+
+  /// Whether we're currently building the SDK, which may require special
+  /// bootstrapping logic.
+  ///
+  /// This is initialized by [startModule], which must be called before
+  /// accessing this field.
+  @protected
+  bool isBuildingSdk;
+
+  /// The temporary variable that stores named arguments (these are passed via a
+  /// JS object literal, to match JS conventions).
+  @protected
+  final namedArgumentTemp = JS.TemporaryId('opts');
+
   /// The list of output module items, in the order they need to be emitted in.
+  @protected
   final moduleItems = <JS.ModuleItem>[];
 
+  /// Like [moduleItems] but for items that should be emitted after classes.
+  ///
+  /// This is used for deferred supertypes of mutually recursive non-generic
+  /// classes.
+  @protected
+  final afterClassDefItems = <JS.ModuleItem>[];
+
+  /// The type used for private Dart [Symbol]s.
+  @protected
+  InterfaceType get privateSymbolType;
+
+  /// The type used for public Dart [Symbol]s.
+  @protected
+  InterfaceType get internalSymbolType;
+
+  /// The current library being compiled.
+  @protected
+  Library get currentLibrary;
+
+  /// The library for dart:core in the SDK.
+  @protected
+  Library get coreLibrary;
+
+  /// The import URI of current library.
+  @protected
+  Uri get currentLibraryUri;
+
+  /// The current function being compiled, if any.
+  @protected
+  FunctionNode get currentFunction;
+
+  /// Choose a canonical name from the [library] element.
+  ///
+  /// This never uses the library's name (the identifier in the `library`
+  /// declaration) as it doesn't have any meaningful rules enforced.
+  @protected
+  String jsLibraryName(Library library);
+
+  /// Debugger friendly name for a Dart [library].
+  @protected
+  String jsLibraryDebuggerName(Library library);
+
+  /// Gets the module import URI that contains [library].
+  @protected
+  String libraryToModule(Library library);
+
+  /// Returns true if the library [l] is "dart:_runtime".
+  @protected
+  bool isSdkInternalRuntime(Library l);
+
+  /// Whether any superclass of [c] defines a static [name].
+  @protected
+  bool superclassHasStatic(Class c, String name);
+
+  /// Emits the expression necessary to access a constructor of [type];
+  @protected
+  JS.Expression emitConstructorAccess(InterfaceType type);
+
   /// When compiling the body of a `operator []=` method, this will be non-null
   /// and will indicate the the value that should be returned from any `return;`
   /// statements.
@@ -36,9 +132,11 @@
     return stack.isEmpty ? null : stack.last;
   }
 
-  /// The import URI of current library.
-  Uri get currentLibraryUri;
-
+  /// Called when starting to emit methods/functions, in particular so we can
+  /// implement special handling of the user-defined `[]=` and `==` methods.
+  ///
+  /// See also [exitFunction] and [emitReturnStatement].
+  @protected
   void enterFunction(String name, List<JS.Parameter> formals,
       bool Function() isLastParamMutated) {
     if (name == '[]=') {
@@ -50,6 +148,9 @@
     }
   }
 
+  /// Called when finished emitting methods/functions, and must correspond to a
+  /// previous [enterFunction] call.
+  @protected
   JS.Block exitFunction(
       String name, List<JS.Parameter> formals, JS.Block code) {
     if (name == "==" &&
@@ -87,6 +188,7 @@
 
   /// Emits a return statement `return <value>;`, handling special rules for
   /// the `operator []=` method.
+  @protected
   JS.Statement emitReturnStatement(JS.Expression value) {
     if (_operatorSetResult != null) {
       var result = JS.Return(_operatorSetResult);
@@ -106,6 +208,7 @@
   ///
   ///     dart.asInt(<expr>)
   ///
+  @protected
   JS.Expression runtimeCall(String code, [args]) {
     if (args != null) {
       var newArgs = <Object>[runtimeModule];
@@ -123,22 +226,42 @@
 
   /// Calls [runtimeCall] and uses `toStatement()` to convert the resulting
   /// expression into a statement.
+  @protected
   JS.Statement runtimeStatement(String code, [args]) {
     return runtimeCall(code, args).toStatement();
   }
 
+  /// Emits a private name JS Symbol for [name] scoped to the Dart [library].
+  ///
+  /// If the same name is used in multiple libraries in the same module,
+  /// distinct symbols will be used, so each library will have distinct private
+  /// member names, that won't collide at runtime, as required by the Dart
+  /// language spec.
+  @protected
   JS.TemporaryId emitPrivateNameSymbol(Library library, String name) {
-    return _privateNames.putIfAbsent(library, () => HashMap()).putIfAbsent(name,
-        () {
-      var idName = name;
-      if (idName.endsWith('=')) {
-        idName = idName.replaceAll('=', '_');
-      }
+    /// Initializes the JS `Symbol` for the private member [name] in [library].
+    ///
+    /// If the library is in the current JS module ([_libraries] contains it),
+    /// the private name will be created and exported. The exported symbol is
+    /// used for a few things:
+    ///
+    /// - private fields of constant objects
+    /// - stateful hot reload (not yet implemented)
+    /// - correct library scope in REPL (not yet implemented)
+    ///
+    /// If the library is imported, then the existing private name will be
+    /// retrieved from it. In both cases, we use the same `dart.privateName`
+    /// runtime call.
+    JS.TemporaryId initPrivateNameSymbol() {
+      var idName = name.endsWith('=') ? name.replaceAll('=', '_') : name;
       var id = JS.TemporaryId(idName);
-      moduleItems.add(
-          js.statement('const # = Symbol(#);', [id, js.string(name, "'")]));
+      moduleItems.add(js.statement('const # = #.privateName(#, #)',
+          [id, runtimeModule, emitLibraryName(library), js.string(name)]));
       return id;
-    });
+    }
+
+    var privateNames = _privateNames.putIfAbsent(library, () => HashMap());
+    return privateNames.putIfAbsent(name, initPrivateNameSymbol);
   }
 
   /// Emits an expression to set the property [nameExpr] on the class [className],
@@ -146,7 +269,8 @@
   ///
   /// This will use `className.name = value` if possible, otherwise it will use
   /// `dart.defineValue(className, name, value)`. This is required when
-  /// `Function.prototype` already defins a getters with the same name.
+  /// `FunctionNode.prototype` already defins a getters with the same name.
+  @protected
   JS.Expression defineValueOnClass(Class c, JS.Expression className,
       JS.Expression nameExpr, JS.Expression value) {
     var args = [className, nameExpr, value];
@@ -159,8 +283,291 @@
     return js.call('#.# = #', args);
   }
 
-  /// Whether any superclass of [c] defines a static [name].
-  bool superclassHasStatic(Class c, String name);
+  /// Caches a constant (list/set/map or class instance) in a variable, so it's
+  /// only canonicalized once at this location in the code, which improves
+  /// performance.
+  ///
+  /// This method ensures the constant is not initialized until use.
+  ///
+  /// The expression [jsExpr] should contain the already-canonicalized constant.
+  /// If the constant is not canonicalized yet, it should be wrapped in the
+  /// appropriate call, such as:
+  ///
+  /// - dart.constList (for Lists),
+  /// - dart.constMap (for Maps),
+  /// - dart.constSet (for Sets),
+  /// - dart.const (for other instances of classes)
+  ///
+  /// [canonicalizeConstObject] can be used for class instances; it will wrap
+  /// the expression in `dart.const` and then call this method.
+  ///
+  /// If the same consant is used elsewhere (in this module, or another module),
+  /// that will require a second canonicalization. In general it is uncommon
+  /// to define the same large constant (such as lists, maps) in different
+  /// locations, because that requires copy+paste, so in practice this
+  /// optimization is rather effective (we should consider caching once
+  /// per-module, though, as that would be relatively easy for the compiler to
+  /// implement once we have a single Kernel backend).
+  @protected
+  JS.Expression cacheConst(JS.Expression jsExpr) {
+    if (currentFunction == null) return jsExpr;
+
+    var temp = JS.TemporaryId('const');
+    moduleItems.add(js.statement('let #;', [temp]));
+    return js.call('# || (# = #)', [temp, temp, jsExpr]);
+  }
+
+  /// Emits a Dart Symbol with the given member [symbolName].
+  ///
+  /// If the symbol refers to a private name, its library will be set to the
+  /// [currentLibrary], so the Symbol is scoped properly.
+  @protected
+  JS.Expression emitDartSymbol(String symbolName) {
+    // TODO(vsm): Handle qualified symbols correctly.
+    var last = symbolName.split('.').last;
+    var name = js.escapedString(symbolName, "'");
+    JS.Expression result;
+    if (last.startsWith('_')) {
+      var nativeSymbol = emitPrivateNameSymbol(currentLibrary, last);
+      result = js.call('new #.new(#, #)',
+          [emitConstructorAccess(privateSymbolType), name, nativeSymbol]);
+    } else {
+      result = js.call(
+          'new #.new(#)', [emitConstructorAccess(internalSymbolType), name]);
+    }
+    return canonicalizeConstObject(result);
+  }
+
+  /// Calls the `dart.const` function in "dart:_runtime" to canonicalize a
+  /// constant instance of a user-defined class stored in [expr].
+  @protected
+  JS.Expression canonicalizeConstObject(JS.Expression expr) =>
+      cacheConst(runtimeCall('const(#)', expr));
+
+  /// Emits preamble for the module containing [libraries], and returns the
+  /// list of module items for further items to be added.
+  ///
+  /// The preamble consists of initializing the identifiers for each library,
+  /// that will be used to store their members. It also generates the
+  /// appropriate ES6 `export` declaration to export them from this module.
+  ///
+  /// After the code for all of the library members is emitted,
+  /// [emitImportsAndExtensionSymbols] should be used to emit imports/extension
+  /// symbols into the list returned by this method. Finally, [finishModule]
+  /// can be called to complete the module and return the resulting JS AST.
+  ///
+  /// This also initializes several fields: [isBuildingSdk], [runtimeModule],
+  /// [extensionSymbolsModule], as well as the [_libraries] map needed by
+  /// [emitLibraryName].
+  @protected
+  List<JS.ModuleItem> startModule(Iterable<Library> libraries) {
+    isBuildingSdk = libraries.any(isSdkInternalRuntime);
+    if (isBuildingSdk) {
+      // Don't allow these to be renamed when we're building the SDK.
+      // There is JS code in dart:* that depends on their names.
+      runtimeModule = JS.Identifier('dart');
+      extensionSymbolsModule = JS.Identifier('dartx');
+    } else {
+      // Otherwise allow these to be renamed so users can write them.
+      runtimeModule = JS.TemporaryId('dart');
+      extensionSymbolsModule = JS.TemporaryId('dartx');
+    }
+
+    // Initialize our library variables.
+    var items = <JS.ModuleItem>[];
+    var exports = <JS.NameSpecifier>[];
+
+    if (isBuildingSdk) {
+      // Bootstrap the ability to create Dart library objects.
+      var libraryProto = JS.TemporaryId('_library');
+      items.add(js.statement('const # = Object.create(null)', libraryProto));
+      items.add(js.statement(
+          'const # = Object.create(#)', [runtimeModule, libraryProto]));
+      items.add(js.statement('#.library = #', [runtimeModule, libraryProto]));
+      exports.add(JS.NameSpecifier(runtimeModule));
+    }
+
+    for (var library in libraries) {
+      if (isBuildingSdk && isSdkInternalRuntime(library)) {
+        _libraries[library] = runtimeModule;
+        continue;
+      }
+      var id = JS.TemporaryId(jsLibraryName(library));
+      _libraries[library] = id;
+
+      items.add(js.statement(
+          'const # = Object.create(#.library)', [id, runtimeModule]));
+      exports.add(JS.NameSpecifier(id));
+    }
+
+    // dart:_runtime has a magic module that holds extension method symbols.
+    // TODO(jmesserly): find a cleaner design for this.
+    if (isBuildingSdk) {
+      var id = extensionSymbolsModule;
+      items.add(js.statement(
+          'const # = Object.create(#.library)', [id, runtimeModule]));
+      exports.add(JS.NameSpecifier(id));
+    }
+
+    items.add(JS.ExportDeclaration(JS.ExportClause(exports)));
+
+    if (isBuildingSdk) {
+      // Initialize the private name function.
+      // To bootstrap the SDK, this needs to be emitted before other code.
+      var symbol = JS.TemporaryId('_privateNames');
+      items.add(js.statement('const # = Symbol("_privateNames")', symbol));
+      items.add(js.statement(r'''
+        #.privateName = function(library, name) {
+          let names = library[#];
+          if (names == null) names = library[#] = new Map();
+          let symbol = names.get(name);
+          if (symbol == null) names.set(name, symbol = Symbol(name));
+          return symbol;
+        }
+      ''', [runtimeModule, symbol, symbol]));
+    }
+
+    return items;
+  }
+
+  /// Returns the canonical name to refer to the Dart library.
+  @protected
+  JS.Identifier emitLibraryName(Library library) {
+    // It's either one of the libraries in this module, or it's an import.
+    return _libraries[library] ??
+        _imports.putIfAbsent(
+            library, () => JS.TemporaryId(jsLibraryName(library)));
+  }
+
+  /// Emits imports and extension methods into [items].
+  @protected
+  void emitImportsAndExtensionSymbols(List<JS.ModuleItem> items) {
+    var modules = Map<String, List<Library>>();
+
+    for (var import in _imports.keys) {
+      modules.putIfAbsent(libraryToModule(import), () => []).add(import);
+    }
+
+    String coreModuleName;
+    if (!_libraries.containsKey(coreLibrary)) {
+      coreModuleName = libraryToModule(coreLibrary);
+    }
+    modules.forEach((module, libraries) {
+      // Generate import directives.
+      //
+      // Our import variables are temps and can get renamed. Since our renaming
+      // is integrated into js_ast, it is aware of this possibility and will
+      // generate an "as" if needed. For example:
+      //
+      //     import {foo} from 'foo';         // if no rename needed
+      //     import {foo as foo$} from 'foo'; // if rename was needed
+      //
+      var imports =
+          libraries.map((l) => JS.NameSpecifier(_imports[l])).toList();
+      if (module == coreModuleName) {
+        imports.add(JS.NameSpecifier(runtimeModule));
+        imports.add(JS.NameSpecifier(extensionSymbolsModule));
+      }
+
+      items.add(JS.ImportDeclaration(
+          namedImports: imports, from: js.string(module, "'")));
+    });
+
+    // Initialize extension symbols
+    _extensionSymbols.forEach((name, id) {
+      JS.Expression value =
+          JS.PropertyAccess(extensionSymbolsModule, propertyName(name));
+      if (isBuildingSdk) {
+        value = js.call('# = Symbol(#)', [value, js.string("dartx.$name")]);
+      }
+      items.add(js.statement('const # = #;', [id, value]));
+    });
+  }
+
+  void _emitDebuggerExtensionInfo(String name) {
+    var properties = <JS.Property>[];
+    _libraries.forEach((library, value) {
+      // TODO(jacobr): we could specify a short library name instead of the
+      // full library uri if we wanted to save space.
+      properties.add(
+          JS.Property(js.escapedString(jsLibraryDebuggerName(library)), value));
+    });
+    var module = JS.ObjectInitializer(properties, multiline: true);
+
+    // Track the module name for each library in the module.
+    // This data is only required for debugging.
+    moduleItems.add(js.statement(
+        '#.trackLibraries(#, #, $sourceMapLocationID);',
+        [runtimeModule, js.string(name), module]));
+  }
+
+  /// Finishes the module created by [startModule], by combining the preable
+  /// [items] with the [moduleItems] that have been emitted.
+  ///
+  /// The [moduleName] should specify the module's name, and the items should
+  /// be the list resulting from startModule, with additional items added,
+  /// but not including the contents of moduleItems (which will be handled by
+  /// this method itself).
+  ///
+  /// Note, this function mutates the items list and returns it as the `body`
+  /// field of the result.
+  @protected
+  JS.Program finishModule(List<JS.ModuleItem> items, String moduleName) {
+    // TODO(jmesserly): there's probably further consolidation we can do
+    // between DDC's two backends, by moving more code into this method, as the
+    // code between `startModule` and `finishModule` is very similar in both.
+    _emitDebuggerExtensionInfo(moduleName);
+
+    // Add the module's code (produced by visiting compilation units, above)
+    _copyAndFlattenBlocks(items, moduleItems);
+    moduleItems.clear();
+
+    // Build the module.
+    return JS.Program(items, name: moduleName);
+  }
+
+  /// Flattens blocks in [items] to a single list.
+  ///
+  /// This will not flatten blocks that are marked as being scopes.
+  void _copyAndFlattenBlocks(
+      List<JS.ModuleItem> result, Iterable<JS.ModuleItem> items) {
+    for (var item in items) {
+      if (item is JS.Block && !item.isScope) {
+        _copyAndFlattenBlocks(result, item.statements);
+      } else if (item != null) {
+        result.add(item);
+      }
+    }
+  }
+
+  /// This is an internal method used by [_emitMemberName] and the
+  /// optimized `dart:_runtime extensionSymbol` builtin to get the symbol
+  /// for `dartx.<name>`.
+  ///
+  /// Do not call this directly; you want [_emitMemberName], which knows how to
+  /// handle the many details involved in naming.
+  @protected
+  JS.TemporaryId getExtensionSymbolInternal(String name) {
+    return _extensionSymbols.putIfAbsent(
+        name,
+        () => JS.TemporaryId(
+            '\$${JS.friendlyNameForDartOperator[name] ?? name}'));
+  }
+
+  /// Shorthand for identifier-like property names.
+  /// For now, we emit them as strings and the printer restores them to
+  /// identifiers if it can.
+  // TODO(jmesserly): avoid the round tripping through quoted form.
+  @protected
+  JS.LiteralString propertyName(String name) => js.string(name, "'");
+
+  /// Unique identifier indicating the location to inline the source map.
+  ///
+  /// We cannot generate the source map before the script it is for is
+  /// generated so we have generate the script including this identifier in the
+  /// JS AST, and then replace it once the source map is generated.
+  static const String sourceMapLocationID =
+      'SourceMap3G5a8h6JVhHfdGuDxZr1EF9GQC8y0e6u';
 }
 
 /// Whether a variable with [name] is referenced in the [node].
@@ -186,3 +593,73 @@
     if (!found) super.visitNode(node);
   }
 }
+
+class YieldFinder extends JS.BaseVisitor {
+  bool hasYield = false;
+  bool hasThis = false;
+  bool _nestedFunction = false;
+
+  @override
+  visitThis(JS.This node) {
+    hasThis = true;
+  }
+
+  @override
+  visitFunctionExpression(JS.FunctionExpression node) {
+    var savedNested = _nestedFunction;
+    _nestedFunction = true;
+    super.visitFunctionExpression(node);
+    _nestedFunction = savedNested;
+  }
+
+  @override
+  visitYield(JS.Yield node) {
+    if (!_nestedFunction) hasYield = true;
+    super.visitYield(node);
+  }
+
+  @override
+  visitNode(JS.Node node) {
+    if (hasYield && hasThis) return; // found both, nothing more to do.
+    super.visitNode(node);
+  }
+}
+
+/// Given the function [fn], returns a function declaration statement, binding
+/// `this` and `super` if necessary (using an arrow function).
+JS.Statement toBoundFunctionStatement(JS.Fun fn, JS.Identifier name) {
+  if (usesThisOrSuper(fn)) {
+    return js.statement('const # = (#) => {#}', [name, fn.params, fn.body]);
+  } else {
+    return JS.FunctionDeclaration(name, fn);
+  }
+}
+
+/// Returns whether [node] uses `this` or `super`.
+bool usesThisOrSuper(JS.Expression node) {
+  var finder = _ThisOrSuperFinder.instance;
+  finder.found = false;
+  node.accept(finder);
+  return finder.found;
+}
+
+class _ThisOrSuperFinder extends JS.BaseVisitor<void> {
+  bool found = false;
+
+  static final instance = _ThisOrSuperFinder();
+
+  @override
+  visitThis(JS.This node) {
+    found = true;
+  }
+
+  @override
+  visitSuper(JS.Super node) {
+    found = true;
+  }
+
+  @override
+  visitNode(JS.Node node) {
+    if (!found) super.visitNode(node);
+  }
+}
diff --git a/pkg/dev_compiler/lib/src/flutter/track_widget_constructor_locations.dart b/pkg/dev_compiler/lib/src/flutter/track_widget_constructor_locations.dart
new file mode 100644
index 0000000..02d12f2
--- /dev/null
+++ b/pkg/dev_compiler/lib/src/flutter/track_widget_constructor_locations.dart
@@ -0,0 +1,582 @@
+// Copyright 2013 The Flutter Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// TODO(jmesserly): this file was copied from:
+// https://github.com/flutter/engine/blob/4b01d795feec3ba8231a397a4ec2759954d8216e/flutter_kernel_transformers/lib/track_widget_constructor_locations.dart
+//
+// Longer term, this transform should be injected by Flutter when they building
+// the Flutter-specific `dartdevc` script.
+//
+// The following modifications were made:
+// - remove "package:vm" dependency (only used for one interface)
+// - pass in the class hierarchy that DDC already has available.
+library track_widget_constructor_locations;
+
+// The kernel/src import below that requires lint `ignore_for_file`
+// is a temporary state of things until kernel team builds better api that would
+// replace api used below. This api was made private in an effort to discourage
+// further use.
+// ignore_for_file: implementation_imports
+import 'package:kernel/ast.dart';
+import 'package:kernel/class_hierarchy.dart';
+import 'package:meta/meta.dart';
+
+// Parameter name used to track were widget constructor calls were made from.
+//
+// The parameter name contains a randomly generate hex string to avoid collision
+// with user generated parameters.
+const String _creationLocationParameterName =
+    r'$creationLocationd_0dea112b090073317d4';
+
+/// Name of private field added to the Widget class and any other classes that
+/// implement Widget.
+///
+/// Regardless of what library a class implementing Widget is defined in, the
+/// private field will always be defined in the context of the widget_inspector
+/// library ensuring no name conflicts with regular fields.
+const String _locationFieldName = r'_location';
+
+bool _hasNamedParameter(FunctionNode function, String name) {
+  return function.namedParameters
+      .any((VariableDeclaration parameter) => parameter.name == name);
+}
+
+bool _hasNamedArgument(Arguments arguments, String argumentName) {
+  return arguments.named
+      .any((NamedExpression argument) => argument.name == argumentName);
+}
+
+VariableDeclaration _getNamedParameter(
+  FunctionNode function,
+  String parameterName,
+) {
+  for (VariableDeclaration parameter in function.namedParameters) {
+    if (parameter.name == parameterName) {
+      return parameter;
+    }
+  }
+  return null;
+}
+
+// TODO(jacobr): find a solution that supports optional positional parameters.
+/// Add the creation location to the arguments list if possible.
+///
+/// Returns whether the creation location argument could be added. We cannot
+/// currently add the named argument for functions with optional positional
+/// parameters as the current scheme requires adding the creation location as a
+/// named parameter. Fortunately that is not a significant issue in practice as
+/// no Widget classes in package:flutter have optional positional parameters.
+/// This code degrades gracefully for constructors with optional positional
+/// parameters by skipping adding the creation location argument rather than
+/// failing.
+void _maybeAddCreationLocationArgument(
+  Arguments arguments,
+  FunctionNode function,
+  Expression creationLocation,
+  Class locationClass,
+) {
+  if (_hasNamedArgument(arguments, _creationLocationParameterName)) {
+    return;
+  }
+  if (!_hasNamedParameter(function, _creationLocationParameterName)) {
+    // TODO(jakemac): We don't apply the transformation to dependencies kernel
+    // outlines, so instead we just assume the named parameter exists.
+    //
+    // The only case in which it shouldn't exist is if the function has optional
+    // positional parameters so it cannot have optional named parameters.
+    if (function.requiredParameterCount !=
+        function.positionalParameters.length) {
+      return;
+    }
+  }
+
+  final NamedExpression namedArgument =
+      new NamedExpression(_creationLocationParameterName, creationLocation);
+  namedArgument.parent = arguments;
+  arguments.named.add(namedArgument);
+}
+
+/// Adds a named parameter to a function if the function does not already have
+/// a named parameter with the name or optional positional parameters.
+bool _maybeAddNamedParameter(
+  FunctionNode function,
+  VariableDeclaration variable,
+) {
+  if (_hasNamedParameter(function, _creationLocationParameterName)) {
+    // Gracefully handle if this method is called on a function that has already
+    // been transformed.
+    return false;
+  }
+  // Function has optional positional parameters so cannot have optional named
+  // parameters.
+  if (function.requiredParameterCount != function.positionalParameters.length) {
+    return false;
+  }
+  variable.parent = function;
+  function.namedParameters.add(variable);
+  return true;
+}
+
+/// Transformer that modifies all calls to Widget constructors to include
+/// a [DebugLocation] parameter specifying the location where the constructor
+/// call was made.
+///
+/// This transformer requires that all Widget constructors have already been
+/// transformed to have a named parameter with the name specified by
+/// `_locationParameterName`.
+class _WidgetCallSiteTransformer extends Transformer {
+  final ClassHierarchy _hierarchy;
+
+  /// The [Widget] class defined in the `package:flutter` library.
+  ///
+  /// Used to perform instanceof checks to determine whether Dart constructor
+  /// calls are creating [Widget] objects.
+  Class _widgetClass;
+
+  /// The [DebugLocation] class defined in the `package:flutter` library.
+  Class _locationClass;
+
+  /// Current factory constructor that node being transformed is inside.
+  ///
+  /// Used to flow the location passed in as an argument to the factory to the
+  /// actual constructor call within the factory.
+  Procedure _currentFactory;
+
+  _WidgetCallSiteTransformer(
+    this._hierarchy, {
+    @required Class widgetClass,
+    @required Class locationClass,
+  })  : _widgetClass = widgetClass,
+        _locationClass = locationClass;
+
+  /// Builds a call to the const constructor of the [DebugLocation]
+  /// object specifying the location where a constructor call was made and
+  /// optionally the locations for all parameters passed in.
+  ///
+  /// Specifying the parameters passed in is an experimental feature. With
+  /// access to the source code of an application you could determine the
+  /// locations of the parameters passed in from the source location of the
+  /// constructor call but it is convenient to bundle the location and names
+  /// of the parameters passed in so that tools can show parameter locations
+  /// without re-parsing the source code.
+  ConstructorInvocation _constructLocation(
+    Location location, {
+    String name,
+    ListLiteral parameterLocations,
+    bool showFile: true,
+  }) {
+    final List<NamedExpression> arguments = <NamedExpression>[
+      new NamedExpression('line', new IntLiteral(location.line)),
+      new NamedExpression('column', new IntLiteral(location.column)),
+    ];
+    if (showFile) {
+      arguments.add(new NamedExpression(
+          'file', new StringLiteral(location.file.toString())));
+    }
+    if (name != null) {
+      arguments.add(new NamedExpression('name', new StringLiteral(name)));
+    }
+    if (parameterLocations != null) {
+      arguments
+          .add(new NamedExpression('parameterLocations', parameterLocations));
+    }
+    return new ConstructorInvocation(
+      _locationClass.constructors.first,
+      new Arguments(<Expression>[], named: arguments),
+      isConst: true,
+    );
+  }
+
+  @override
+  Procedure visitProcedure(Procedure node) {
+    if (node.isFactory) {
+      _currentFactory = node;
+      node.transformChildren(this);
+      _currentFactory = null;
+      return node;
+    }
+    return defaultTreeNode(node);
+  }
+
+  bool _isSubclassOfWidget(Class clazz) {
+    // TODO(jacobr): use hierarchy.isSubclassOf once we are using the
+    // non-deprecated ClassHierarchy constructor.
+    return _hierarchy.isSubclassOf(clazz, _widgetClass);
+  }
+
+  @override
+  StaticInvocation visitStaticInvocation(StaticInvocation node) {
+    node.transformChildren(this);
+    final Procedure target = node.target;
+    if (!target.isFactory) {
+      return node;
+    }
+    final Class constructedClass = target.enclosingClass;
+    if (!_isSubclassOfWidget(constructedClass)) {
+      return node;
+    }
+
+    _addLocationArgument(node, target.function, constructedClass);
+    return node;
+  }
+
+  void _addLocationArgument(InvocationExpression node, FunctionNode function,
+      Class constructedClass) {
+    _maybeAddCreationLocationArgument(
+      node.arguments,
+      function,
+      _computeLocation(node, function, constructedClass),
+      _locationClass,
+    );
+  }
+
+  @override
+  ConstructorInvocation visitConstructorInvocation(ConstructorInvocation node) {
+    node.transformChildren(this);
+
+    final Constructor constructor = node.target;
+    final Class constructedClass = constructor.enclosingClass;
+    if (!_isSubclassOfWidget(constructedClass)) {
+      return node;
+    }
+
+    _addLocationArgument(node, constructor.function, constructedClass);
+    return node;
+  }
+
+  Expression _computeLocation(InvocationExpression node, FunctionNode function,
+      Class constructedClass) {
+    // For factory constructors we need to use the location specified as an
+    // argument to the factory constructor rather than the location
+    // TODO(jacobr): use hierarchy.isSubclassOf once we are using the
+    // non-deprecated ClassHierarchy constructor.
+    if (_currentFactory != null &&
+        _hierarchy.isSubclassOf(
+            constructedClass, _currentFactory.enclosingClass)) {
+      final VariableDeclaration creationLocationParameter = _getNamedParameter(
+        _currentFactory.function,
+        _creationLocationParameterName,
+      );
+      if (creationLocationParameter != null) {
+        return new VariableGet(creationLocationParameter);
+      }
+    }
+
+    final Arguments arguments = node.arguments;
+    final Location location = node.location;
+    final List<ConstructorInvocation> parameterLocations =
+        <ConstructorInvocation>[];
+    final List<VariableDeclaration> parameters = function.positionalParameters;
+    for (int i = 0; i < arguments.positional.length; ++i) {
+      final Expression expression = arguments.positional[i];
+      final VariableDeclaration parameter = parameters[i];
+      parameterLocations.add(_constructLocation(
+        expression.location,
+        name: parameter.name,
+        showFile: false,
+      ));
+    }
+    for (NamedExpression expression in arguments.named) {
+      parameterLocations.add(_constructLocation(
+        expression.location,
+        name: expression.name,
+        showFile: false,
+      ));
+    }
+    return _constructLocation(
+      location,
+      parameterLocations: new ListLiteral(
+        parameterLocations,
+        typeArgument: _locationClass.thisType,
+        isConst: true,
+      ),
+    );
+  }
+}
+
+/// Rewrites all widget constructors and constructor invocations to add a
+/// parameter specifying the location the constructor was called from.
+///
+/// The creation location is stored as a private field named `_location`
+/// on the base widget class and flowed through the constructors using a named
+/// parameter.
+class WidgetCreatorTracker {
+  Class _widgetClass;
+  Class _locationClass;
+
+  /// Marker interface indicating that a private _location field is
+  /// available.
+  Class _hasCreationLocationClass;
+
+  /// The [ClassHierarchy] that should be used after applying this transformer.
+  /// If any class was updated, in general we need to create a new
+  /// [ClassHierarchy] instance, with new dispatch targets; or at least let
+  /// the existing instance know that some of its dispatch tables are not
+  /// valid anymore.
+  final ClassHierarchy hierarchy;
+
+  WidgetCreatorTracker(this.hierarchy);
+
+  void _resolveFlutterClasses(Iterable<Library> libraries) {
+    // If the Widget or Debug location classes have been updated we need to get
+    // the latest version
+    for (Library library in libraries) {
+      final Uri importUri = library.importUri;
+      if (importUri != null && importUri.scheme == 'package') {
+        if (importUri.path == 'flutter/src/widgets/framework.dart' ||
+            importUri.path == 'flutter_web/src/widgets/framework.dart') {
+          for (Class class_ in library.classes) {
+            if (class_.name == 'Widget') {
+              _widgetClass = class_;
+            }
+          }
+        } else {
+          if (importUri.path == 'flutter/src/widgets/widget_inspector.dart' ||
+              importUri.path ==
+                  'flutter_web/src/widgets/widget_inspector.dart') {
+            for (Class class_ in library.classes) {
+              if (class_.name == '_HasCreationLocation') {
+                _hasCreationLocationClass = class_;
+              } else if (class_.name == '_Location') {
+                _locationClass = class_;
+              }
+            }
+          }
+        }
+      }
+    }
+  }
+
+  /// Modify [clazz] to add a field named [_locationFieldName] that is the
+  /// first parameter of all constructors of the class.
+  ///
+  /// This method should only be called for classes that implement but do not
+  /// extend [Widget].
+  void _transformClassImplementingWidget(Class clazz) {
+    if (clazz.fields
+        .any((Field field) => field.name.name == _locationFieldName)) {
+      // This class has already been transformed. Skip
+      return;
+    }
+    clazz.implementedTypes
+        .add(new Supertype(_hasCreationLocationClass, <DartType>[]));
+    // We intentionally use the library context of the _HasCreationLocation
+    // class for the private field even if [clazz] is in a different library
+    // so that all classes implementing Widget behave consistently.
+    final Field locationField = new Field(
+      new Name(
+        _locationFieldName,
+        _hasCreationLocationClass.enclosingLibrary,
+      ),
+      isFinal: true,
+    );
+    clazz.addMember(locationField);
+
+    final Set<Constructor> _handledConstructors =
+        new Set<Constructor>.identity();
+
+    void handleConstructor(Constructor constructor) {
+      if (!_handledConstructors.add(constructor)) {
+        return;
+      }
+      assert(!_hasNamedParameter(
+        constructor.function,
+        _creationLocationParameterName,
+      ));
+      final VariableDeclaration variable = new VariableDeclaration(
+        _creationLocationParameterName,
+        type: _locationClass.thisType,
+      );
+      if (!_maybeAddNamedParameter(constructor.function, variable)) {
+        return;
+      }
+
+      bool hasRedirectingInitializer = false;
+      for (Initializer initializer in constructor.initializers) {
+        if (initializer is RedirectingInitializer) {
+          if (initializer.target.enclosingClass == clazz) {
+            // We need to handle this constructor first or the call to
+            // addDebugLocationArgument bellow will fail due to the named
+            // parameter not yet existing on the constructor.
+            handleConstructor(initializer.target);
+          }
+          _maybeAddCreationLocationArgument(
+            initializer.arguments,
+            initializer.target.function,
+            new VariableGet(variable),
+            _locationClass,
+          );
+          hasRedirectingInitializer = true;
+          break;
+        }
+      }
+      if (!hasRedirectingInitializer) {
+        constructor.initializers.add(new FieldInitializer(
+          locationField,
+          new VariableGet(variable),
+        ));
+        // TODO(jacobr): add an assert verifying the locationField is not
+        // null. Currently, we cannot safely add this assert because we do not
+        // handle Widget classes with optional positional arguments. There are
+        // no Widget classes in the flutter repo with optional positional
+        // arguments but it is possible users could add classes with optional
+        // positional arguments.
+        //
+        // constructor.initializers.add(new AssertInitializer(new AssertStatement(
+        //   new IsExpression(
+        //       new VariableGet(variable), _locationClass.thisType),
+        //   conditionStartOffset: constructor.fileOffset,
+        //   conditionEndOffset: constructor.fileOffset,
+        // )));
+      }
+    }
+
+    // Add named parameters to all constructors.
+    clazz.constructors.forEach(handleConstructor);
+  }
+
+  /// Transform the given [module].
+  void transform(Component module) {
+    final List<Library> libraries = module.libraries;
+
+    if (libraries.isEmpty) {
+      return;
+    }
+
+    _resolveFlutterClasses(libraries);
+
+    if (_widgetClass == null) {
+      // This application doesn't actually use the package:flutter library.
+      return;
+    }
+
+    final Set<Class> transformedClasses = new Set<Class>.identity();
+    final Set<Library> librariesToTransform = new Set<Library>.identity()
+      ..addAll(module.libraries);
+
+    for (Library library in module.libraries) {
+      if (library.isExternal) {
+        continue;
+      }
+      for (Class class_ in library.classes) {
+        _transformWidgetConstructors(
+          librariesToTransform,
+          transformedClasses,
+          class_,
+        );
+      }
+    }
+
+    // Transform call sites to pass the location parameter.
+    final _WidgetCallSiteTransformer callsiteTransformer =
+        new _WidgetCallSiteTransformer(
+      hierarchy,
+      widgetClass: _widgetClass,
+      locationClass: _locationClass,
+    );
+
+    for (Library library in module.libraries) {
+      if (library.isExternal) {
+        continue;
+      }
+      library.transformChildren(callsiteTransformer);
+    }
+  }
+
+  bool _isSubclassOfWidget(Class clazz) {
+    if (clazz == null) {
+      return false;
+    }
+    // TODO(jacobr): use hierarchy.isSubclassOf once we are using the
+    // non-deprecated ClassHierarchy constructor.
+    return hierarchy.isSubclassOf(clazz, _widgetClass);
+  }
+
+  void _transformWidgetConstructors(Set<Library> librariesToBeTransformed,
+      Set<Class> transformedClasses, Class clazz) {
+    if (!_isSubclassOfWidget(clazz) ||
+        !librariesToBeTransformed.contains(clazz.enclosingLibrary) ||
+        !transformedClasses.add(clazz)) {
+      return;
+    }
+
+    // Ensure super classes have been transformed before this class.
+    if (clazz.superclass != null &&
+        !transformedClasses.contains(clazz.superclass)) {
+      _transformWidgetConstructors(
+        librariesToBeTransformed,
+        transformedClasses,
+        clazz.superclass,
+      );
+    }
+
+    for (Procedure procedure in clazz.procedures) {
+      if (procedure.isFactory) {
+        _maybeAddNamedParameter(
+          procedure.function,
+          new VariableDeclaration(
+            _creationLocationParameterName,
+            type: _locationClass.thisType,
+          ),
+        );
+      }
+    }
+
+    // Handle the widget class and classes that implement but do not extend the
+    // widget class.
+    if (!_isSubclassOfWidget(clazz.superclass)) {
+      _transformClassImplementingWidget(clazz);
+      return;
+    }
+
+    final Set<Constructor> _handledConstructors =
+        new Set<Constructor>.identity();
+
+    void handleConstructor(Constructor constructor) {
+      if (!_handledConstructors.add(constructor)) {
+        return;
+      }
+
+      final VariableDeclaration variable = new VariableDeclaration(
+        _creationLocationParameterName,
+        type: _locationClass.thisType,
+      );
+      if (_hasNamedParameter(
+          constructor.function, _creationLocationParameterName)) {
+        // Constructor was already rewritten. TODO(jacobr): is this case actually hit?
+        return;
+      }
+      if (!_maybeAddNamedParameter(constructor.function, variable)) {
+        return;
+      }
+      for (Initializer initializer in constructor.initializers) {
+        if (initializer is RedirectingInitializer) {
+          if (initializer.target.enclosingClass == clazz) {
+            // We need to handle this constructor first or the call to
+            // addDebugLocationArgument could fail due to the named parameter
+            // not existing.
+            handleConstructor(initializer.target);
+          }
+
+          _maybeAddCreationLocationArgument(
+            initializer.arguments,
+            initializer.target.function,
+            new VariableGet(variable),
+            _locationClass,
+          );
+        } else if (initializer is SuperInitializer &&
+            _isSubclassOfWidget(initializer.target.enclosingClass)) {
+          _maybeAddCreationLocationArgument(
+            initializer.arguments,
+            initializer.target.function,
+            new VariableGet(variable),
+            _locationClass,
+          );
+        }
+      }
+    }
+
+    clazz.constructors.forEach(handleConstructor);
+  }
+}
diff --git a/pkg/dev_compiler/lib/src/js_ast/builder.dart b/pkg/dev_compiler/lib/src/js_ast/builder.dart
index d81f7e3..fc44cb9 100644
--- a/pkg/dev_compiler/lib/src/js_ast/builder.dart
+++ b/pkg/dev_compiler/lib/src/js_ast/builder.dart
@@ -293,59 +293,99 @@
     return Template.withStatementResult(ast);
   }
 
-  /// Creates a literal js string from [value].
+  /// Creates a literal js string from [value], escaped for use in a UTF-8
+  /// output.
   LiteralString escapedString(String value, [String quote = '"']) {
-    // Start by escaping the backslashes.
-    String escaped = value.replaceAll('\\', '\\\\');
+    int otherEscapes = 0;
+    int unpairedSurrogates = 0;
 
-    // Replace $ in template strings:
-    // http://www.ecma-international.org/ecma-262/6.0/#sec-template-literal-lexical-components
-    var quoteReplace = quote == '`' ? r'`$' : quote;
+    int quoteRune = quote.codeUnitAt(0);
 
-    // http://www.ecma-international.org/ecma-262/6.0/#sec-literals-string-literals
-    // > All code points may appear literally in a string literal except for the
-    // > closing quote code points, U+005C (REVERSE SOLIDUS),
-    // > U+000D (CARRIAGE RETURN), U+2028 (LINE SEPARATOR),
-    // > U+2029 (PARAGRAPH SEPARATOR), and U+000A (LINE FEED).
-    var re = RegExp('[\n\r$quoteReplace\b\f\t\v\u2028\u2029]');
-    escaped = escaped.replaceAllMapped(re, (m) {
-      switch (m.group(0)) {
-        case "\n":
-          return r"\n";
-        case "\r":
-          return r"\r";
-        case "\u2028":
-          return r"\u2028";
-        case "\u2029":
-          return r"\u2029";
-        // Quotes and $ are only replaced if they conflict with the containing
-        // quote, see regex above.
-        case '"':
-          return r'\"';
-        case "'":
-          return r"\'";
-        case "`":
-          return r"\`";
-        case r"$":
-          return r"\$";
-        // TODO(jmesserly): these don't need to be escaped for correctness,
-        // but they are conventionally escaped.
-        case "\b":
-          return r"\b";
-        case "\t":
-          return r"\t";
-        case "\f":
-          return r"\f";
-        case "\v":
-          return r"\v";
+    for (int rune in value.runes) {
+      if (rune == charCodes.$BACKSLASH) {
+        ++otherEscapes;
+      } else if (rune == charCodes.$LF ||
+          rune == charCodes.$CR ||
+          rune == charCodes.$LS ||
+          rune == charCodes.$PS) {
+        // Line terminators.
+        ++otherEscapes;
+      } else if (rune == charCodes.$BS ||
+          rune == charCodes.$TAB ||
+          rune == charCodes.$VTAB ||
+          rune == charCodes.$FF) {
+        ++otherEscapes;
+      } else if (rune == quoteRune ||
+          rune == charCodes.$$ && quoteRune == charCodes.$BACKPING) {
+        ++otherEscapes;
+      } else if (_isUnpairedSurrogate(rune)) {
+        ++unpairedSurrogates;
       }
-      throw 'unreachable';
-    });
-    LiteralString result = LiteralString('$quote$escaped$quote');
-    // We don't escape quotes of a different style under the assumption that the
-    // string is wrapped into quotes. Verify that assumption.
-    assert(result.value.codeUnitAt(0) == quote.codeUnitAt(0));
-    return result;
+    }
+
+    if (otherEscapes == 0 && unpairedSurrogates == 0) {
+      return string(value, quote);
+    }
+
+    var sb = new StringBuffer();
+
+    for (int rune in value.runes) {
+      String escape = _irregularEscape(rune, quote);
+      if (escape != null) {
+        sb.write(escape);
+        continue;
+      }
+      if (rune == charCodes.$LS ||
+          rune == charCodes.$PS ||
+          _isUnpairedSurrogate(rune)) {
+        if (rune < 0x100) {
+          sb.write(r'\x');
+          sb.write(rune.toRadixString(16).padLeft(2, '0'));
+        } else if (rune < 0x10000) {
+          sb.write(r'\u');
+          sb.write(rune.toRadixString(16).padLeft(4, '0'));
+        } else {
+          sb.write(r'\u{');
+          sb.write(rune.toRadixString(16));
+          sb.write('}');
+        }
+      } else {
+        sb.writeCharCode(rune);
+      }
+    }
+
+    return string(sb.toString(), quote);
+  }
+
+  static bool _isUnpairedSurrogate(int code) => (code & 0xFFFFF800) == 0xD800;
+
+  static String _irregularEscape(int code, String quote) {
+    switch (code) {
+      case charCodes.$SQ:
+        return quote == "'" ? r"\'" : "'";
+      case charCodes.$DQ:
+        return quote == '"' ? r'\"' : '"';
+      case charCodes.$BACKPING:
+        return quote == '`' ? r'\`' : '`';
+      case charCodes.$$:
+        // Escape $ inside of template strings.
+        return quote == '`' ? r'\$' : r'$';
+      case charCodes.$BACKSLASH:
+        return r'\\';
+      case charCodes.$BS:
+        return r'\b';
+      case charCodes.$TAB:
+        return r'\t';
+      case charCodes.$LF:
+        return r'\n';
+      case charCodes.$VTAB:
+        return r'\v';
+      case charCodes.$FF:
+        return r'\f';
+      case charCodes.$CR:
+        return r'\r';
+    }
+    return null;
   }
 
   /// Creates a literal js string from [value].
diff --git a/pkg/dev_compiler/lib/src/js_ast/nodes.dart b/pkg/dev_compiler/lib/src/js_ast/nodes.dart
index 6b78736..9cd3b7b 100644
--- a/pkg/dev_compiler/lib/src/js_ast/nodes.dart
+++ b/pkg/dev_compiler/lib/src/js_ast/nodes.dart
@@ -889,6 +889,8 @@
   @override
   int get precedenceLevel => PRIMARY;
   @override
+  String get parameterName => name.name;
+  @override
   Node _clone() => DestructuredVariable(
       name: name,
       property: property,
@@ -1124,7 +1126,6 @@
 // it is for simplicity's sake.
 class Spread extends Prefix {
   Spread(Expression operand) : super('...', operand);
-  int get precedenceLevel => SPREAD;
 
   T accept<T>(NodeVisitor<T> visitor) => visitor.visitSpread(this);
   Spread _clone() => Spread(argument);
@@ -1147,7 +1148,9 @@
   int get precedenceLevel => UNARY;
 }
 
-abstract class Parameter implements Expression, VariableBinding {}
+abstract class Parameter implements Expression, VariableBinding {
+  String get parameterName;
+}
 
 class Identifier extends Expression implements Parameter {
   final String name;
@@ -1165,6 +1168,7 @@
   Identifier _clone() => Identifier(name, allowRename: allowRename);
   T accept<T>(NodeVisitor<T> visitor) => visitor.visitIdentifier(this);
   int get precedenceLevel => PRIMARY;
+  String get parameterName => name;
   void visitChildren(NodeVisitor visitor) {}
 }
 
@@ -1183,6 +1187,7 @@
   }
 
   int get precedenceLevel => PRIMARY;
+  String get parameterName => parameter.parameterName;
 }
 
 class This extends Expression {
@@ -1190,27 +1195,6 @@
   This _clone() => This();
   int get precedenceLevel => PRIMARY;
   void visitChildren(NodeVisitor visitor) {}
-
-  static bool foundIn(Node node) {
-    var finder = _ThisFinder._instance;
-    finder.found = false;
-    node.accept(finder);
-    return finder.found;
-  }
-}
-
-class _ThisFinder extends BaseVisitor<void> {
-  bool found = false;
-
-  static final _instance = _ThisFinder();
-
-  visitThis(This node) {
-    found = true;
-  }
-
-  visitNode(Node node) {
-    if (!found) super.visitNode(node);
-  }
 }
 
 // `super` is more restricted in the ES6 spec, but for simplicity we accept
@@ -1663,6 +1647,10 @@
     throw "InterpolatedParameter.name must not be invoked";
   }
 
+  String get parameterName {
+    throw "InterpolatedParameter.parameterName must not be invoked";
+  }
+
   bool shadows(Set<String> names) => false;
 
   bool get allowRename => false;
@@ -1740,6 +1728,8 @@
 
   int get precedenceLevel => PRIMARY;
   String get name => throw '$runtimeType does not support this member.';
+  String get parameterName =>
+      throw '$runtimeType does not support this member.';
   bool get allowRename => false;
 }
 
diff --git a/pkg/dev_compiler/lib/src/js_ast/precedence.dart b/pkg/dev_compiler/lib/src/js_ast/precedence.dart
index b10bac6..f149dc2 100644
--- a/pkg/dev_compiler/lib/src/js_ast/precedence.dart
+++ b/pkg/dev_compiler/lib/src/js_ast/precedence.dart
@@ -3,6 +3,8 @@
 // BSD-style license that can be found in the LICENSE file.
 
 const EXPRESSION = 0;
+// TODO(nshahan) No longer used for the spread operator.
+// All precedence levels need to be updated to be more accurate.
 const SPREAD = EXPRESSION + 1;
 const YIELD = SPREAD + 1;
 
diff --git a/pkg/dev_compiler/lib/src/kernel/analyzer_to_kernel.dart b/pkg/dev_compiler/lib/src/kernel/analyzer_to_kernel.dart
index 917daa3..308e199 100644
--- a/pkg/dev_compiler/lib/src/kernel/analyzer_to_kernel.dart
+++ b/pkg/dev_compiler/lib/src/kernel/analyzer_to_kernel.dart
@@ -79,11 +79,9 @@
   final _typeParams = HashMap<a.TypeParameterElement, TypeParameter>();
   final _namespaceBuilder = a.NamespaceBuilder();
 
-  AnalyzerToKernel._(a.AnalysisContextImpl context, this._summaryData)
-      : _resynth = (context.resultProvider as a.InputPackagesResultProvider)
-            .resynthesizer,
-        types = context.typeProvider,
-        rules = context.typeSystem as a.Dart2TypeSystem;
+  AnalyzerToKernel._(this._resynth, this._summaryData)
+      : types = _resynth.typeProvider,
+        rules = _resynth.typeSystem as a.Dart2TypeSystem;
 
   /// Create an Analyzer summary to Kernel tree converter, using the provided
   /// [analyzerSdkSummary] and [summaryPaths].
@@ -98,7 +96,7 @@
         disallowOverlappingSummaries: false);
     var resynthesizer =
         _createSummaryResynthesizer(summaryData, analyzerSdkSummary);
-    return AnalyzerToKernel._(resynthesizer.context, summaryData);
+    return AnalyzerToKernel._(resynthesizer, summaryData);
   }
 
   /// Converts the SDK summary to a Kernel component and returns it.
@@ -150,7 +148,11 @@
     var uriToSource = <Uri, Source>{};
 
     void addCompilationUnit(a.CompilationUnitElement unit) {
-      uriToSource[unit.source.uri] = Source(unit.lineInfo.lineStarts, []);
+      uriToSource[unit.source.uri] = Source(
+          unit.lineInfo.lineStarts,
+          [],
+          unit.uri != null ? Uri.base.resolve(unit.uri) : unit.source.uri,
+          unit.source.uri);
     }
 
     for (var uri in bundle.unlinkedUnitUris) {
@@ -867,8 +869,11 @@
 a.StoreBasedSummaryResynthesizer _createSummaryResynthesizer(
     a.SummaryDataStore summaryData, String dartSdkPath) {
   var context = _createContextForSummaries(summaryData, dartSdkPath);
-  return a.StoreBasedSummaryResynthesizer(
+  var resynthesizer = a.StoreBasedSummaryResynthesizer(
       context, null, context.sourceFactory, /*strongMode*/ true, summaryData);
+  resynthesizer.finishCoreAsyncLibraries();
+  context.typeProvider = resynthesizer.typeProvider;
+  return resynthesizer;
 }
 
 /// Creates a dummy Analyzer context so we can use summary resynthesizer.
@@ -890,6 +895,5 @@
       [a.DartUriResolver(sdk), a.InSummaryUriResolver(null, summaryData)]);
   context.useSdkCachePartition = false;
   // TODO(jmesserly): do we need to set analysisOptions or declaredVariables?
-  context.resultProvider = a.InputPackagesResultProvider(context, summaryData);
   return context;
 }
diff --git a/pkg/dev_compiler/lib/src/kernel/command.dart b/pkg/dev_compiler/lib/src/kernel/command.dart
index 15dd91c..e9f2a3a 100644
--- a/pkg/dev_compiler/lib/src/kernel/command.dart
+++ b/pkg/dev_compiler/lib/src/kernel/command.dart
@@ -19,7 +19,10 @@
 import '../compiler/js_names.dart' as JS;
 import '../compiler/module_builder.dart';
 import '../compiler/shared_command.dart';
+import '../compiler/shared_compiler.dart';
+import '../flutter/track_widget_constructor_locations.dart';
 import '../js_ast/js_ast.dart' as JS;
+import '../js_ast/js_ast.dart' show js;
 import '../js_ast/source_map_printer.dart' show SourceMapPrintingContext;
 
 import 'analyzer_to_kernel.dart';
@@ -32,9 +35,12 @@
 ///
 /// Returns `true` if the program compiled without any fatal errors.
 Future<CompilerResult> compile(List<String> args,
-    {fe.InitializedCompilerState compilerState}) async {
+    {fe.InitializedCompilerState compilerState,
+    bool useIncrementalCompiler: false}) async {
   try {
-    return await _compile(args, compilerState: compilerState);
+    return await _compile(args,
+        compilerState: compilerState,
+        useIncrementalCompiler: useIncrementalCompiler);
   } catch (error, stackTrace) {
     print('''
 We're sorry, you've found a bug in our compiler.
@@ -60,17 +66,21 @@
     '${ddcArgParser.usage}';
 
 Future<CompilerResult> _compile(List<String> args,
-    {fe.InitializedCompilerState compilerState}) async {
+    {fe.InitializedCompilerState compilerState,
+    bool useIncrementalCompiler: false}) async {
   // TODO(jmesserly): refactor options to share code with dartdevc CLI.
   var argParser = ArgParser(allowTrailingOptions: true)
     ..addFlag('help',
         abbr: 'h', help: 'Display this message.', negatable: false)
     ..addOption('out', abbr: 'o', help: 'Output file (required).')
     ..addOption('packages', help: 'The package spec file to use.')
-    // TODO(jmesserly): should default to `false` and be hidden.
-    // For now this is very helpful in debugging the compiler.
+    // TODO(jmesserly): is this still useful for us, or can we remove it now?
     ..addFlag('summarize-text',
-        help: 'emit API summary in a .js.txt file', defaultsTo: true)
+        help: 'emit API summary in a .js.txt file',
+        defaultsTo: false,
+        hide: true)
+    ..addFlag('track-widget-creation',
+        help: 'enable inspecting of Flutter widgets', hide: true)
     // TODO(jmesserly): add verbose help to show hidden options
     ..addOption('dart-sdk-summary',
         help: 'The path to the Dart SDK summary file.', hide: true)
@@ -86,7 +96,23 @@
   SharedCompilerOptions.addArguments(argParser);
 
   var declaredVariables = parseAndRemoveDeclaredVariables(args);
-  var argResults = argParser.parse(filterUnknownArguments(args, argParser));
+  ArgResults argResults;
+  try {
+    argResults = argParser.parse(filterUnknownArguments(args, argParser));
+  } on FormatException catch (error) {
+    print(error);
+    print(_usageMessage(argParser));
+    return CompilerResult(64);
+  }
+
+  var output = argResults['out'] as String;
+  if (output == null) {
+    print('Please specify the output file location. For example:\n'
+        '    -o PATH/TO/OUTPUT_FILE.js'
+        '');
+    print(_usageMessage(argParser));
+    return CompilerResult(64);
+  }
 
   if (argResults['help'] as bool || args.isEmpty) {
     print(_usageMessage(argParser));
@@ -188,17 +214,38 @@
   }
 
   var oldCompilerState = compilerState;
-  compilerState = await fe.initializeCompiler(
-      oldCompilerState,
-      sourcePathToUri(sdkSummaryPath),
-      sourcePathToUri(packageFile),
-      sourcePathToUri(librarySpecPath),
-      summaryModules.keys.toList(),
-      DevCompilerTarget(),
-      fileSystem: fileSystem,
-      experiments: experiments);
+  List<Component> doneInputSummaries;
+  fe.IncrementalCompiler incrementalCompiler;
+  fe.WorkerInputComponent cachedSdkInput;
+  if (useAnalyzer || !useIncrementalCompiler) {
+    compilerState = await fe.initializeCompiler(
+        oldCompilerState,
+        sourcePathToUri(sdkSummaryPath),
+        sourcePathToUri(packageFile),
+        sourcePathToUri(librarySpecPath),
+        summaryModules.keys.toList(),
+        DevCompilerTarget(),
+        fileSystem: fileSystem,
+        experiments: experiments);
+  } else {
+    doneInputSummaries = new List<Component>(summaryModules.length);
+    compilerState = await fe.initializeIncrementalCompiler(
+        oldCompilerState,
+        doneInputSummaries,
+        sourcePathToUri(sdkSummaryPath),
+        sourcePathToUri(packageFile),
+        sourcePathToUri(librarySpecPath),
+        summaryModules.keys.toList(),
+        DevCompilerTarget(),
+        fileSystem: fileSystem,
+        experiments: experiments);
+    incrementalCompiler = compilerState.incrementalCompiler;
+    cachedSdkInput =
+        compilerState.workerInputCache[sourcePathToUri(sdkSummaryPath)];
+  }
 
-  var output = argResults['out'] as String;
+  List<Uri> inputSummaries = compilerState.options.inputSummaries;
+
   // TODO(jmesserly): is there a cleaner way to do this?
   //
   // Ideally we'd manage our own batch compilation caching rather than rely on
@@ -213,8 +260,26 @@
     converter.dispose();
   }
 
-  fe.DdcResult result =
-      await fe.compile(compilerState, inputs, diagnosticMessageHandler);
+  var hierarchy;
+  fe.DdcResult result;
+  if (useAnalyzer || !useIncrementalCompiler) {
+    result = await fe.compile(compilerState, inputs, diagnosticMessageHandler);
+  } else {
+    Component incrementalComponent = await incrementalCompiler.computeDelta(
+        entryPoints: inputs, fullComponent: true);
+    hierarchy = incrementalCompiler.userCode.loader.hierarchy;
+    result = new fe.DdcResult(incrementalComponent, doneInputSummaries);
+
+    // Workaround for DDC relying on isExternal being set to true.
+    for (var lib in cachedSdkInput.component.libraries) {
+      lib.isExternal = true;
+    }
+    for (Component c in doneInputSummaries) {
+      for (Library lib in c.libraries) {
+        lib.isExternal = true;
+      }
+    }
+  }
   if (result == null || !succeeded) {
     return CompilerResult(1, kernelState: compilerState);
   }
@@ -246,16 +311,26 @@
     outFiles.add(sink.flush().then((_) => sink.close()));
   }
   if (argResults['summarize-text'] as bool) {
-    var sink = File(output + '.txt').openWrite();
-    kernel.Printer(sink, showExternal: false).writeComponentFile(component);
-    outFiles.add(sink.flush().then((_) => sink.close()));
+    StringBuffer sb = new StringBuffer();
+    kernel.Printer(sb, showExternal: false).writeComponentFile(component);
+    outFiles.add(File(output + '.txt').writeAsString(sb.toString()));
   }
-  var target = compilerState.options.target as DevCompilerTarget;
-  var compiler =
-      ProgramCompiler(component, target.hierarchy, options, declaredVariables);
+  if (hierarchy == null) {
+    var target = compilerState.options.target as DevCompilerTarget;
+    hierarchy = target.hierarchy;
+  }
 
-  var jsModule = compiler.emitModule(component, result.inputSummaries,
-      compilerState.options.inputSummaries, summaryModules);
+  // TODO(jmesserly): remove this hack once Flutter SDK has a `dartdevc` with
+  // support for the widget inspector.
+  if (argResults['track-widget-creation'] as bool) {
+    WidgetCreatorTracker(hierarchy).transform(component);
+  }
+
+  var compiler =
+      ProgramCompiler(component, hierarchy, options, declaredVariables);
+
+  var jsModule = compiler.emitModule(
+      component, result.inputSummaries, inputSummaries, summaryModules);
 
   // TODO(jmesserly): support for multiple output formats?
   //
@@ -263,7 +338,8 @@
   // --single-out-file is used, but that option does not appear to be used by
   // any of our build systems.
   var jsCode = jsProgramToCode(jsModule, options.moduleFormats.first,
-      buildSourceMap: argResults['source-map'] as bool,
+      buildSourceMap: options.sourceMap,
+      inlineSourceMap: options.inlineSourceMap,
       jsUrl: path.toUri(output).toString(),
       mapUrl: path.toUri(output + '.map').toString(),
       bazelMapping: options.bazelMapping,
@@ -299,6 +375,7 @@
 
 JSCode jsProgramToCode(JS.Program moduleTree, ModuleFormat format,
     {bool buildSourceMap = false,
+    bool inlineSourceMap = false,
     String jsUrl,
     String mapUrl,
     Map<String, String> bazelMapping,
@@ -332,6 +409,10 @@
   }
 
   var text = printer.getText();
+  var rawSourceMap = inlineSourceMap
+      ? js.escapedString(json.encode(builtMap), "'").value
+      : 'null';
+  text = text.replaceFirst(SharedCompiler.sourceMapLocationID, rawSourceMap);
 
   return JSCode(text, builtMap);
 }
diff --git a/pkg/dev_compiler/lib/src/kernel/compiler.dart b/pkg/dev_compiler/lib/src/kernel/compiler.dart
index cd0af30e..b6c1925 100644
--- a/pkg/dev_compiler/lib/src/kernel/compiler.dart
+++ b/pkg/dev_compiler/lib/src/kernel/compiler.dart
@@ -8,7 +8,7 @@
 import 'package:front_end/src/api_unstable/ddc.dart' show TypeSchemaEnvironment;
 import 'package:kernel/class_hierarchy.dart';
 import 'package:kernel/core_types.dart';
-import 'package:kernel/kernel.dart';
+import 'package:kernel/kernel.dart' hide MapEntry;
 import 'package:kernel/library_index.dart';
 import 'package:kernel/type_algebra.dart';
 import 'package:kernel/type_environment.dart';
@@ -32,7 +32,7 @@
 import 'type_table.dart';
 
 class ProgramCompiler extends Object
-    with SharedCompiler<Library, Class>
+    with SharedCompiler<Library, Class, InterfaceType, FunctionNode>
     implements
         StatementVisitor<JS.Statement>,
         ExpressionVisitor<JS.Expression>,
@@ -40,13 +40,6 @@
         ConstantVisitor<JS.Expression> {
   final SharedCompilerOptions options;
 
-  /// The set of libraries we are currently compiling, and the temporaries used
-  /// to refer to them.
-  ///
-  /// We sometimes special case codegen for a single library, as it simplifies
-  /// name scoping requirements.
-  final _libraries = Map<Library, JS.Identifier>.identity();
-
   /// Maps a library URI import, that is not in [_libraries], to the
   /// corresponding Kernel summary module we imported it with.
   final _importToSummary = Map<Library, Component>.identity();
@@ -54,18 +47,12 @@
   /// Maps a summary to the JS import name for the module.
   final _summaryToModule = Map<Component, String>.identity();
 
-  /// Imported libraries, and the temporaries used to refer to them.
-  final _imports = Map<Library, JS.TemporaryId>();
-
   /// The variable for the current catch clause
   VariableDeclaration _rethrowParameter;
 
   /// In an async* function, this represents the stream controller parameter.
   JS.TemporaryId _asyncStarController;
 
-  JS.Identifier _extensionSymbolsModule;
-  final _extensionSymbols = Map<String, JS.TemporaryId>();
-
   Set<Class> _pendingClasses;
 
   /// Temporary variables mapped to their corresponding JavaScript variable.
@@ -100,8 +87,6 @@
 
   FunctionNode _currentFunction;
 
-  List<TypeParameter> _typeParamInConst;
-
   /// Whether we are currently generating code for the body of a `JS()` call.
   bool _isInForeignJS = false;
 
@@ -233,8 +218,24 @@
         syncIterableClass = sdk.getClass('dart:_js_helper', 'SyncIterable'),
         asyncStarImplClass = sdk.getClass('dart:async', '_AsyncStarImpl');
 
+  @override
   Uri get currentLibraryUri => _currentLibrary.importUri;
 
+  @override
+  Library get currentLibrary => _currentLibrary;
+
+  @override
+  Library get coreLibrary => coreTypes.coreLibrary;
+
+  @override
+  FunctionNode get currentFunction => _currentFunction;
+
+  @override
+  InterfaceType get privateSymbolType => privateSymbolClass.rawType;
+
+  @override
+  InterfaceType get internalSymbolType => coreTypes.internalSymbolClass.rawType;
+
   bool get emitMetadata => options.emitMetadata;
 
   JS.Program emitModule(Component component, List<Component> summaries,
@@ -255,47 +256,11 @@
     }
 
     var libraries = component.libraries.where((l) => !l.isExternal);
-    var ddcRuntime =
-        libraries.firstWhere(isSdkInternalRuntime, orElse: () => null);
-    if (ddcRuntime != null) {
-      // Don't allow these to be renamed when we're building the SDK.
-      // There is JS code in dart:* that depends on their names.
-      runtimeModule = JS.Identifier('dart');
-      _extensionSymbolsModule = JS.Identifier('dartx');
-      _nullableInference.allowNotNullDeclarations = true;
-    } else {
-      // Otherwise allow these to be renamed so users can write them.
-      runtimeModule = JS.TemporaryId('dart');
-      _extensionSymbolsModule = JS.TemporaryId('dartx');
-    }
-    _typeTable = TypeTable(runtimeModule);
 
     // Initialize our library variables.
-    var items = <JS.ModuleItem>[];
-    var exports = <JS.NameSpecifier>[];
-    // TODO(jmesserly): this is a performance optimization for V8 to prevent it
-    // from treating our Dart library objects as JS Maps.
-    var root = JS.Identifier('_root');
-    items.add(js.statement('const # = Object.create(null)', [root]));
-
-    void emitLibrary(JS.Identifier id) {
-      items.add(js.statement('const # = Object.create(#)', [id, root]));
-      exports.add(JS.NameSpecifier(id));
-    }
-
-    for (var library in libraries) {
-      var libraryTemp = library == ddcRuntime
-          ? runtimeModule
-          : JS.TemporaryId(jsLibraryName(library));
-      _libraries[library] = libraryTemp;
-      emitLibrary(libraryTemp);
-    }
-
-    // dart:_runtime has a magic module that holds extension method symbols.
-    // TODO(jmesserly): find a cleaner design for this.
-    if (ddcRuntime != null) emitLibrary(_extensionSymbolsModule);
-
-    items.add(JS.ExportDeclaration(JS.ExportClause(exports)));
+    var items = startModule(libraries);
+    _nullableInference.allowNotNullDeclarations = isBuildingSdk;
+    _typeTable = TypeTable(runtimeModule);
 
     // Collect all class/type Element -> Node mappings
     // in case we need to forward declare any classes.
@@ -314,56 +279,60 @@
     // This is done by forward declaring items.
     libraries.forEach(_emitLibrary);
 
+    moduleItems.addAll(afterClassDefItems);
+    afterClassDefItems.clear();
+
     // Visit directives (for exports)
     libraries.forEach(_emitExports);
 
-    // Declare imports
-    _finishImports(items);
-    // Initialize extension symbols
-    _extensionSymbols.forEach((name, id) {
-      JS.Expression value =
-          JS.PropertyAccess(_extensionSymbolsModule, _propertyName(name));
-      if (ddcRuntime != null) {
-        value = js.call('# = Symbol(#)', [value, js.string("dartx.$name")]);
-      }
-      items.add(js.statement('const # = #;', [id, value]));
-    });
+    // Declare imports and extension symbols
+    emitImportsAndExtensionSymbols(items);
 
     // Discharge the type table cache variables and
     // hoisted definitions.
     items.addAll(_typeTable.discharge());
 
-    // Add the module's code (produced by visiting compilation units, above)
-    _copyAndFlattenBlocks(items, moduleItems);
-
-    // Build the module.
-    return JS.Program(items, name: options.moduleName);
+    return finishModule(items, options.moduleName);
   }
 
-  /// Flattens blocks in [items] to a single list.
-  ///
-  /// This will not flatten blocks that are marked as being scopes.
-  void _copyAndFlattenBlocks(
-      List<JS.ModuleItem> result, Iterable<JS.ModuleItem> items) {
-    for (var item in items) {
-      if (item is JS.Block && !item.isScope) {
-        _copyAndFlattenBlocks(result, item.statements);
-      } else if (item != null) {
-        result.add(item);
-      }
+  @override
+  String jsLibraryName(Library library) {
+    var uri = library.importUri;
+    if (uri.scheme == 'dart') return uri.path;
+
+    // TODO(vsm): This is not necessarily unique if '__' appears in a file name.
+    Iterable<String> segments;
+    if (uri.scheme == 'package') {
+      // Strip the package name.
+      // TODO(vsm): This is not unique if an escaped '/'appears in a filename.
+      // E.g., "foo/bar.dart" and "foo__bar.dart" would collide.
+      segments = uri.pathSegments.skip(1);
+    } else {
+      // TODO(jmesserly): this is not unique typically.
+      segments = [uri.pathSegments.last];
     }
+
+    var qualifiedPath = segments.map((p) => p == '..' ? '' : p).join('__');
+    return pathToJSIdentifier(qualifiedPath);
   }
 
-  /// Returns the canonical name to refer to the Dart library.
-  JS.Identifier emitLibraryName(Library library) {
-    // It's either one of the libraries in this module, or it's an import.
-    return _libraries[library] ??
-        _imports.putIfAbsent(
-            library, () => JS.TemporaryId(jsLibraryName(library)));
+  @override
+  String jsLibraryDebuggerName(Library library) {
+    var uri = library.importUri;
+    // For package: and dart: uris show the entire
+    if (uri.scheme == 'dart' || uri.scheme == 'package') return uri.toString();
+    // TODO(jmesserly): this is not unique typically.
+    return uri.pathSegments.last;
   }
 
-  String _libraryToModule(Library library) {
-    assert(!_libraries.containsKey(library));
+  @override
+  bool isSdkInternalRuntime(Library l) {
+    var uri = l.importUri;
+    return uri.scheme == 'dart' && uri.path == '_runtime';
+  }
+
+  @override
+  String libraryToModule(Library library) {
     if (library.importUri.scheme == 'dart') {
       // TODO(jmesserly): we need to split out HTML.
       return JS.dartSdkModule;
@@ -377,39 +346,6 @@
     return moduleName;
   }
 
-  void _finishImports(List<JS.ModuleItem> items) {
-    var modules = Map<String, List<Library>>();
-
-    for (var import in _imports.keys) {
-      modules.putIfAbsent(_libraryToModule(import), () => []).add(import);
-    }
-
-    String coreModuleName;
-    if (!_libraries.containsKey(coreTypes.coreLibrary)) {
-      coreModuleName = _libraryToModule(coreTypes.coreLibrary);
-    }
-    modules.forEach((module, libraries) {
-      // Generate import directives.
-      //
-      // Our import variables are temps and can get renamed. Since our renaming
-      // is integrated into js_ast, it is aware of this possibility and will
-      // generate an "as" if needed. For example:
-      //
-      //     import {foo} from 'foo';         // if no rename needed
-      //     import {foo as foo$} from 'foo'; // if rename was needed
-      //
-      var imports =
-          libraries.map((l) => JS.NameSpecifier(_imports[l])).toList();
-      if (module == coreModuleName) {
-        imports.add(JS.NameSpecifier(runtimeModule));
-        imports.add(JS.NameSpecifier(_extensionSymbolsModule));
-      }
-
-      items.add(JS.ImportDeclaration(
-          namedImports: imports, from: js.string(module, "'")));
-    });
-  }
-
   void _emitLibrary(Library library) {
     // NOTE: this method isn't the right place to initialize per-library state.
     // Classes can be visited out of order, so this is only to catch things that
@@ -569,7 +505,7 @@
       classDef = _defineClassTypeArguments(
           c, typeFormals, classDef, className, deferredSupertypes);
     } else {
-      body.addAll(deferredSupertypes);
+      afterClassDefItems.addAll(deferredSupertypes);
     }
 
     body = [classDef];
@@ -1116,14 +1052,15 @@
     return runtimeStatement('addTypeTests(#, #)', [defaultInst, isClassSymbol]);
   }
 
-  void _emitSymbols(Iterable<JS.TemporaryId> vars, List<JS.ModuleItem> body) {
+  void _emitDartSymbols(
+      Iterable<JS.TemporaryId> vars, List<JS.ModuleItem> body) {
     for (var id in vars) {
       body.add(js.statement('const # = Symbol(#)', [id, js.string(id.name)]));
     }
   }
 
   void _emitSuperHelperSymbols(List<JS.Statement> body) {
-    _emitSymbols(
+    _emitDartSymbols(
         _superHelpers.values.map((m) => m.name as JS.TemporaryId), body);
     _superHelpers.clear();
   }
@@ -1188,7 +1125,7 @@
       if (extensions.isEmpty) return;
 
       var names = extensions
-          .map((e) => _propertyName(JS.memberNameForDartMember(e)))
+          .map((e) => propertyName(JS.memberNameForDartMember(e)))
           .toList();
       body.add(js.statement('#.#(#, #);', [
         runtimeModule,
@@ -1209,11 +1146,13 @@
     var savedClass = _classEmittingSignatures;
     _classEmittingSignatures = c;
 
-    if (c.implementedTypes.isNotEmpty) {
+    var interfaces = List.from(c.implementedTypes)
+      ..addAll(c.superclassConstraints());
+    if (interfaces.isNotEmpty) {
       body.add(js.statement('#[#.implements] = () => [#];', [
         className,
         runtimeModule,
-        c.implementedTypes.map((i) => _emitType(i.asInterfaceType))
+        interfaces.map((i) => _emitType(i.asInterfaceType))
       ]));
     }
 
@@ -1224,7 +1163,7 @@
         var proto = c == coreTypes.objectClass
             ? js.call('Object.create(null)')
             : runtimeCall('get${name}s(#.__proto__)', [className]);
-        elements.insert(0, JS.Property(_propertyName('__proto__'), proto));
+        elements.insert(0, JS.Property(propertyName('__proto__'), proto));
       }
       body.add(runtimeStatement('set${name}Signature(#, () => #)', [
         className,
@@ -1465,7 +1404,7 @@
   JS.Expression _constructorName(String name) {
     if (name == '') {
       // Default constructors (factory or not) use `new` as their name.
-      return _propertyName('new');
+      return propertyName('new');
     }
     return _emitStaticMemberName(name);
   }
@@ -1643,10 +1582,19 @@
       // Dart does not use ES6 constructors.
       // Add an error to catch any invalid usage.
       jsMethods
-          .add(JS.Method(_propertyName('constructor'), js.fun(r'''function() {
+          .add(JS.Method(propertyName('constructor'), js.fun(r'''function() {
                   throw Error("use `new " + #.typeName(#.getReifiedType(this)) +
                       ".new(...)` to create a Dart object");
               }''', [runtimeModule, runtimeModule])));
+    } else if (c == _jsArrayClass) {
+      // Provide access to the Array constructor property, so it works like
+      // other native types (rather than calling the Dart Object "constructor"
+      // above, which throws).
+      //
+      // This will become obsolete when
+      // https://github.com/dart-lang/sdk/issues/31003 is addressed.
+      jsMethods.add(JS.Method(
+          propertyName('constructor'), js.fun(r'function() { return []; }')));
     }
 
     Set<Member> redirectingFactories;
@@ -1849,7 +1797,7 @@
       if (isCovariantParameter(param) &&
           !isCovariantParameter(superMember.function.namedParameters
               .firstWhere((n) => n.name == param.name))) {
-        var name = _propertyName(param.name);
+        var name = propertyName(param.name);
         var paramType = superMethodType.namedParameters
             .firstWhere((n) => n.name == param.name);
         body.add(js.statement('if (# in #) #;', [
@@ -1869,16 +1817,28 @@
 
   /// Emits a Dart factory constructor to a JS static method.
   JS.Method _emitFactoryConstructor(Procedure node) {
-    if (isUnsupportedFactoryConstructor(node)) return null;
+    if (node.isExternal || isUnsupportedFactoryConstructor(node)) return null;
 
     var function = node.function;
+
+    /// Note: factory constructors can't use `sync*`/`async*`/`async` bodies
+    /// because it would return the wrong type, so we can assume `sync` here.
+    ///
+    /// We can also skip the logic in [_emitFunction] related to operator
+    /// methods like ==, as well as generic method parameters.
+    ///
+    /// If a future Dart version allows factory constructors to take their
+    /// own type parameters, this will need to be changed to call
+    /// [_emitFunction] instead.
+    var jsBody = _emitSyncFunctionBody(function);
+
     return JS.Method(_constructorName(node.name.name),
-        JS.Fun(_emitParameters(function), _emitFunctionBody(function)),
+        JS.Fun(_emitParameters(function), jsBody),
         isStatic: true)
       ..sourceInformation = _nodeEnd(node.fileEndOffset);
   }
 
-  /// Emits an expression that lets you access statics on a [type] from code.
+  @override
   JS.Expression emitConstructorAccess(InterfaceType type) {
     return _emitJSInterop(type.classNode) ?? visitInterfaceType(type);
   }
@@ -2032,9 +1992,6 @@
       var lazyFields = <Field>[];
       var savedUri = _currentUri;
       for (var field in fields) {
-        // Skip our magic undefined constant.
-        if (field.name.name == 'undefined') continue;
-
         var init = field.initializer;
         if (init == null ||
             init is BasicLiteral ||
@@ -2190,41 +2147,32 @@
       var runtimeName = getJSExportName(member);
       if (runtimeName != null) {
         var parts = runtimeName.split('.');
-        if (parts.length < 2) return _propertyName(runtimeName);
+        if (parts.length < 2) return propertyName(runtimeName);
 
         JS.Expression result = JS.Identifier(parts[0]);
         for (int i = 1; i < parts.length; i++) {
-          result = JS.PropertyAccess(result, _propertyName(parts[i]));
+          result = JS.PropertyAccess(result, propertyName(parts[i]));
         }
         return result;
       }
     }
 
+    memberClass ??= member?.enclosingClass;
     if (name.startsWith('_')) {
-      return emitPrivateNameSymbol(_currentLibrary, name);
+      // Use the library that this private member's name is scoped to.
+      var memberLibrary = member?.name?.library ??
+          memberClass?.enclosingLibrary ??
+          _currentLibrary;
+      return emitPrivateNameSymbol(memberLibrary, name);
     }
 
-    memberClass ??= member?.enclosingClass;
     useExtension ??= _isSymbolizedMember(memberClass, name);
     name = JS.memberNameForDartMember(
         name, member is Procedure && member.isExternal);
     if (useExtension) {
-      return _getExtensionSymbolInternal(name);
+      return getExtensionSymbolInternal(name);
     }
-    return _propertyName(name);
-  }
-
-  /// This is an internal method used by [_emitMemberName] and the
-  /// optimized `dart:_runtime extensionSymbol` builtin to get the symbol
-  /// for `dartx.<name>`.
-  ///
-  /// Do not call this directly; you want [_emitMemberName], which knows how to
-  /// handle the many details involved in naming.
-  JS.TemporaryId _getExtensionSymbolInternal(String name) {
-    return _extensionSymbols.putIfAbsent(
-        name,
-        () => JS.TemporaryId(
-            '\$${JS.friendlyNameForDartOperator[name] ?? name}'));
+    return propertyName(name);
   }
 
   /// Don't symbolize native members that just forward to the underlying
@@ -2303,7 +2251,7 @@
           name += '_';
         }
     }
-    return _propertyName(name);
+    return propertyName(name);
   }
 
   JS.Expression _emitJSInteropStaticMemberName(NamedNode n) {
@@ -2333,7 +2281,7 @@
   /// function does not handle JS interop.
   JS.Expression _emitTopLevelMemberName(NamedNode n, {String suffix = ''}) {
     var name = getJSExportName(n) ?? getTopLevelName(n);
-    return _propertyName(name + suffix);
+    return propertyName(name + suffix);
   }
 
   String _getJSNameWithoutGlobal(NamedNode n) {
@@ -2386,7 +2334,7 @@
 
     var name = node.name.name;
     var result = JS.Method(
-        _propertyName(name), _emitFunction(node.function, node.name.name),
+        propertyName(name), _emitFunction(node.function, node.name.name),
         isGetter: node.isGetter, isSetter: node.isSetter)
       ..sourceInformation = _nodeEnd(node.fileEndOffset);
 
@@ -2681,7 +2629,7 @@
 
   JS.ObjectInitializer _emitTypeProperties(Iterable<NamedType> types) {
     return JS.ObjectInitializer(types
-        .map((t) => JS.Property(_propertyName(t.name), _emitType(t.type)))
+        .map((t) => JS.Property(propertyName(t.name), _emitType(t.type)))
         .toList());
   }
 
@@ -2702,7 +2650,6 @@
   visitTypeParameterType(type) => _emitTypeParameter(type.parameter);
 
   JS.Identifier _emitTypeParameter(TypeParameter t) {
-    _typeParamInConst?.add(t);
     return JS.Identifier(getTypeParameterName(t));
   }
 
@@ -2724,16 +2671,11 @@
     // potentially mutated in Kernel. For now we assume all parameters are.
     super.enterFunction(name, formals, () => true);
 
-    JS.Block code = isSync
-        ? _emitFunctionBody(f)
-        : JS.Block([
-            _emitGeneratorFunction(f, name).toReturn()
-              ..sourceInformation = _nodeStart(f)
-          ]);
+    JS.Block block =
+        isSync ? _emitSyncFunctionBody(f) : _emitGeneratorFunctionBody(f, name);
 
-    code = super.exitFunction(name, formals, code);
-
-    return JS.Fun(formals, code);
+    block = super.exitFunction(name, formals, block);
+    return JS.Fun(formals, block);
   }
 
   List<JS.Parameter> _emitParameters(FunctionNode f) {
@@ -2763,10 +2705,13 @@
         .toList();
   }
 
-  JS.Expression _emitGeneratorFunction(FunctionNode function, String name) {
-    // Transforms `sync*` `async` and `async*` function bodies
-    // using ES6 generators.
-
+  /// Transforms `sync*` `async` and `async*` function bodies
+  /// using ES6 generators.
+  ///
+  /// This is an internal part of [_emitGeneratorFunctionBody] and should not be
+  /// called directly.
+  JS.Expression _emitGeneratorFunctionExpression(
+      FunctionNode function, String name) {
     emitGeneratorFn(List<JS.Parameter> getParameters(JS.Block jsBody)) {
       var savedController = _asyncStarController;
       _asyncStarController = function.asyncMarker == AsyncMarker.AsyncStar
@@ -2777,9 +2722,10 @@
       _superDisallowed(() {
         // Visit the body with our async* controller set.
         //
-        // TODO(jmesserly): this will emit argument initializers (for default
-        // values) inside the generator function body. Is that the best place?
-        var jsBody = _emitFunctionBody(function);
+        // Note: we intentionally don't emit argument initializers here, because
+        // they were already emitted outside of the generator expression.
+        var jsBody = JS.Block(_withCurrentFunction(
+            function, () => [_emitFunctionScopedBody(function)]));
         var genFn = JS.Fun(getParameters(jsBody), jsBody, isGenerator: true);
 
         // Name the function if possible, to get better stack traces.
@@ -2791,7 +2737,7 @@
         }
 
         gen.sourceInformation = _nodeEnd(function.fileEndOffset);
-        if (JS.This.foundIn(gen)) gen = js.call('#.bind(this)', gen);
+        if (usesThisOrSuper(gen)) gen = js.call('#.bind(this)', gen);
       });
 
       _asyncStarController = savedController;
@@ -2817,9 +2763,16 @@
       // In the future, we might be able to simplify this, see:
       // https://github.com/dart-lang/sdk/issues/28320
       var jsParams = _emitParameters(function);
-      var gen = emitGeneratorFn((fnBody) => jsParams =
-          jsParams.where(JS.findMutatedVariables(fnBody).contains).toList());
-      if (jsParams.isNotEmpty) gen = js.call('() => #(#)', [gen, jsParams]);
+      var mutatedParams = jsParams;
+      var gen = emitGeneratorFn((fnBody) {
+        var mutatedVars = JS.findMutatedVariables(fnBody);
+        mutatedParams = jsParams
+            .where((id) => mutatedVars.contains(id.parameterName))
+            .toList();
+        return mutatedParams;
+      });
+      if (mutatedParams.isNotEmpty)
+        gen = js.call('() => #(#)', [gen, mutatedParams]);
 
       var returnType =
           _getExpectedReturnType(function, coreTypes.iterableClass);
@@ -2872,8 +2825,16 @@
     return const DynamicType();
   }
 
-  JS.Block _emitFunctionBody(FunctionNode f) {
+  /// Emits a `sync` function body (the default in Dart)
+  ///
+  /// To emit an `async`, `sync*`, or `async*` function body, use
+  /// [_emitGeneratorFunctionBody] instead.
+  JS.Block _emitSyncFunctionBody(FunctionNode f) {
+    assert(f.asyncMarker == AsyncMarker.Sync);
+
     var block = _withCurrentFunction(f, () {
+      /// For (normal) `sync` bodies, execute the function body immediately
+      /// after the argument initializers.
       var block = _emitArgumentInitializers(f);
       block.add(_emitFunctionScopedBody(f));
       return block;
@@ -2882,6 +2843,27 @@
     return JS.Block(block);
   }
 
+  /// Emits an `async`, `sync*`, or `async*` function body.
+  ///
+  /// The body will perform these steps:
+  ///
+  /// - Run the argument initializers. These must be run synchronously
+  ///   (e.g. covariance checks), and this helps performance.
+  /// - Return the generator function, wrapped with the appropriate type
+  ///   (`Future`, `Itearble`, and `Stream` respectively).
+  ///
+  /// To emit a `sync` function body (the default in Dart), use
+  /// [_emitSyncFunctionBody] instead.
+  JS.Block _emitGeneratorFunctionBody(FunctionNode f, String name) {
+    assert(f.asyncMarker != AsyncMarker.Sync);
+
+    var statements =
+        _withCurrentFunction(f, () => _emitArgumentInitializers(f));
+    statements.add(_emitGeneratorFunctionExpression(f, name).toReturn()
+      ..sourceInformation = _nodeStart(f));
+    return JS.Block(statements);
+  }
+
   List<JS.Statement> _withCurrentFunction(
       FunctionNode fn, List<JS.Statement> action()) {
     var savedFunction = _currentFunction;
@@ -2978,23 +2960,15 @@
   }
 
   JS.Expression _defaultParamValue(VariableDeclaration p) {
-    if (p.initializer != null) {
-      var value = p.initializer;
-      return _isJSUndefined(value) ? null : _visitExpression(value);
+    if (p.annotations.any(isUndefinedAnnotation)) {
+      return null;
+    } else if (p.initializer != null) {
+      return _visitExpression(p.initializer);
     } else {
       return JS.LiteralNull();
     }
   }
 
-  bool _isJSUndefined(Expression expr) {
-    expr = expr is AsExpression ? expr.operand : expr;
-    if (expr is StaticGet) {
-      var t = expr.target;
-      return isSdkInternalRuntime(getLibrary(t)) && t.name.name == 'undefined';
-    }
-    return false;
-  }
-
   void _emitCovarianceBoundsCheck(
       List<TypeParameter> typeFormals, List<JS.Statement> body) {
     for (var t in typeFormals) {
@@ -3002,7 +2976,7 @@
         body.add(runtimeStatement('checkTypeBound(#, #, #)', [
           _emitType(TypeParameterType(t)),
           _emitType(t.bound),
-          _propertyName(t.name)
+          propertyName(t.name)
         ]));
       }
     }
@@ -3164,7 +3138,7 @@
     //
     // NOTE: we do sometimes need to handle this because Dart and JS rules are
     // slightly different (in Dart, there is a nested scope), but that's handled
-    // by _emitFunctionBody.
+    // by _emitSyncFunctionBody.
     var isScope = !identical(node.parent, _currentFunction);
     return JS.Block(node.statements.map(_visitStatement).toList(),
         isScope: isScope);
@@ -3642,11 +3616,7 @@
 
     var name = _emitVariableDef(node.variable);
     JS.Statement declareFn;
-    if (JS.This.foundIn(fn)) {
-      declareFn = js.statement('const # = #.bind(this);', [name, fn]);
-    } else {
-      declareFn = JS.FunctionDeclaration(name, fn);
-    }
+    declareFn = toBoundFunctionStatement(fn, name);
     if (_reifyFunctionType(func)) {
       declareFn = JS.Block([
         declareFn,
@@ -3814,13 +3784,11 @@
   }
 
   @override
-  visitStaticGet(StaticGet node) {
-    var target = node.target;
-    if (target is Field && target.isConst) {
-      var value = _constants.evaluate(target.initializer, cache: true);
-      if (value is PrimitiveConstant) return value.accept(this);
-    }
+  visitStaticGet(StaticGet node) => _emitStaticGet(node.target);
 
+  JS.Expression _emitStaticGet(Member target) {
+    // TODO(vsm): Re-inline constants.  See:
+    // https://github.com/dart-lang/sdk/issues/36285
     var result = _emitStaticTarget(target);
     if (_reifyTearoff(target)) {
       // TODO(jmesserly): we could tag static/top-level function types once
@@ -4380,7 +4348,7 @@
         return _emitType(firstArg.type);
       }
       if (name == 'extensionSymbol' && firstArg is StringLiteral) {
-        return _getExtensionSymbolInternal(firstArg.value);
+        return getExtensionSymbolInternal(firstArg.value);
       }
     }
     if (target == coreTypes.identicalProcedure) {
@@ -4441,8 +4409,9 @@
   JS.Expression _emitStaticTarget(Member target) {
     var c = target.enclosingClass;
     if (c != null) {
-      // A static native element should just forward directly to the
-      // JS type's member.
+      // A static native element should just forward directly to the JS type's
+      // member, for example `Css.supports(...)` in dart:html should be replaced
+      // by a direct call to the DOM API: `global.CSS.supports`.
       if (target is Procedure && target.isStatic && target.isExternal) {
         var nativeName = _extensionTypes.getNativePeers(c);
         if (nativeName.isNotEmpty) {
@@ -4483,7 +4452,7 @@
   }
 
   JS.Property _emitNamedExpression(NamedExpression arg) {
-    return JS.Property(_propertyName(arg.name), _visitExpression(arg.value));
+    return JS.Property(propertyName(arg.name), _visitExpression(arg.value));
   }
 
   /// Emits code for the `JS(...)` macro.
@@ -4597,12 +4566,10 @@
   visitConstructorInvocation(ConstructorInvocation node) {
     var ctor = node.target;
     var args = node.arguments;
-    JS.Expression emitNew() {
-      return JS.New(_emitConstructorName(node.constructedType, ctor),
-          _emitArgumentList(args, types: false));
-    }
+    var result = JS.New(_emitConstructorName(node.constructedType, ctor),
+        _emitArgumentList(args, types: false));
 
-    return node.isConst ? _emitConst(emitNew) : emitNew();
+    return node.isConst ? canonicalizeConstObject(result) : result;
   }
 
   JS.Expression _emitFactoryInvocation(StaticInvocation node) {
@@ -4655,12 +4622,10 @@
       }
     }
 
-    JS.Expression emitNew() {
-      return JS.Call(_emitConstructorName(type, ctor),
-          _emitArgumentList(args, types: false));
-    }
+    var result = JS.Call(_emitConstructorName(type, ctor),
+        _emitArgumentList(args, types: false));
 
-    return node.isConst ? _emitConst(emitNew) : emitNew();
+    return node.isConst ? canonicalizeConstObject(result) : result;
   }
 
   JS.Expression _emitJSInteropNew(Member ctor, Arguments args) {
@@ -4749,6 +4714,84 @@
   }
 
   @override
+  visitListConcatenation(ListConcatenation node) {
+    // Only occurs inside unevaluated constants.
+    List<JS.Expression> entries = [];
+    _concatenate(Expression node) {
+      if (node is ListConcatenation)
+        node.lists.forEach(_concatenate);
+      else {
+        node.accept(this);
+        if (node is ConstantExpression) {
+          var list = node.constant as ListConstant;
+          entries.addAll(list.entries.map(visitConstant));
+        } else if (node is ListLiteral) {
+          entries.addAll(node.expressions.map(_visitExpression));
+        }
+      }
+    }
+
+    node.lists.forEach(_concatenate);
+    return _emitConstList(node.typeArgument, entries);
+  }
+
+  @override
+  visitSetConcatenation(SetConcatenation node) {
+    // Only occurs inside unevaluated constants.
+    List<JS.Expression> entries = [];
+    _concatenate(Expression node) {
+      if (node is SetConcatenation)
+        node.sets.forEach(_concatenate);
+      else {
+        node.accept(this);
+        if (node is ConstantExpression) {
+          var set = node.constant as SetConstant;
+          entries.addAll(set.entries.map(visitConstant));
+        } else if (node is SetLiteral) {
+          entries.addAll(node.expressions.map(_visitExpression));
+        }
+      }
+    }
+
+    node.sets.forEach(_concatenate);
+    return _emitConstSet(node.typeArgument, entries);
+  }
+
+  @override
+  visitMapConcatenation(MapConcatenation node) {
+    // Only occurs inside unevaluated constants.
+    List<JS.Expression> entries = [];
+    _concatenate(Expression node) {
+      if (node is MapConcatenation)
+        node.maps.forEach(_concatenate);
+      else {
+        node.accept(this);
+        if (node is ConstantExpression) {
+          var map = node.constant as MapConstant;
+          for (var entry in map.entries) {
+            entries.add(visitConstant(entry.key));
+            entries.add(visitConstant(entry.value));
+          }
+        } else if (node is MapLiteral) {
+          for (var entry in node.entries) {
+            entries.add(_visitExpression(entry.key));
+            entries.add(_visitExpression(entry.value));
+          }
+        }
+      }
+    }
+
+    node.maps.forEach(_concatenate);
+    return _emitConstMap(node.keyType, node.valueType, entries);
+  }
+
+  @override
+  visitInstanceCreation(InstanceCreation node) {
+    // Only occurs inside unevaluated constants.
+    throw new UnsupportedError("Instance creation");
+  }
+
+  @override
   visitIsExpression(IsExpression node) {
     return _emitIsExpression(node.operand, node.type);
   }
@@ -4819,54 +4862,13 @@
   }
 
   @override
-  visitSymbolLiteral(SymbolLiteral node) {
-    JS.Expression emitSymbol() {
-      // TODO(vsm): Handle qualified symbols correctly.
-      var last = node.value.split('.').last;
-      var name = js.escapedString(node.value, "'");
-      if (last.startsWith('_')) {
-        var nativeSymbol = emitPrivateNameSymbol(_currentLibrary, last);
-        return js.call('new #.new(#, #)', [
-          _emitConstructorAccess(privateSymbolClass.rawType),
-          name,
-          nativeSymbol
-        ]);
-      } else {
-        return js.call('new #.new(#)', [
-          _emitConstructorAccess(coreTypes.internalSymbolClass.rawType),
-          name
-        ]);
-      }
-    }
-
-    return _emitConst(emitSymbol);
-  }
-
-  JS.Expression _cacheConst(JS.Expression expr()) {
-    var savedTypeParams = _typeParamInConst;
-    _typeParamInConst = [];
-
-    var jsExpr = expr();
-
-    bool usesTypeParams = _typeParamInConst.isNotEmpty;
-    _typeParamInConst = savedTypeParams;
-
-    // TODO(jmesserly): if it uses type params we can still hoist it up as far
-    // as it will go, e.g. at the level the generic class is defined where type
-    // params are available.
-    if (_currentFunction == null || usesTypeParams) return jsExpr;
-
-    var temp = JS.TemporaryId('const');
-    moduleItems.add(js.statement('let #;', [temp]));
-    return js.call('# || (# = #)', [temp, temp, jsExpr]);
-  }
-
-  JS.Expression _emitConst(JS.Expression expr()) =>
-      _cacheConst(() => runtimeCall('const(#)', expr()));
+  visitSymbolLiteral(SymbolLiteral node) => emitDartSymbol(node.value);
 
   @override
-  visitTypeLiteral(TypeLiteral node) {
-    var typeRep = _emitType(node.type);
+  visitTypeLiteral(TypeLiteral node) => _emitTypeLiteral(node.type);
+
+  _emitTypeLiteral(DartType type) {
+    var typeRep = _emitType(type);
     // If the type is a type literal expression in Dart code, wrap the raw
     // runtime type in a "Type" instance.
     return _isInForeignJS ? typeRep : runtimeCall('wrapType(#)', typeRep);
@@ -4887,35 +4889,12 @@
   @override
   visitListLiteral(ListLiteral node) {
     var elementType = node.typeArgument;
+    var elements = _visitExpressionList(node.expressions);
+    // TODO(markzipan): remove const check when we use front-end const eval
     if (!node.isConst) {
-      return _emitList(elementType, _visitExpressionList(node.expressions));
+      return _emitList(elementType, elements);
     }
-    return _cacheConst(() =>
-        _emitConstList(elementType, _visitExpressionList(node.expressions)));
-  }
-
-  @override
-  visitSetLiteral(SetLiteral node) {
-    if (!node.isConst) {
-      var setType = visitInterfaceType(
-          InterfaceType(linkedHashSetClass, [node.typeArgument]));
-      if (node.expressions.isEmpty) {
-        return js.call('#.new()', [setType]);
-      }
-      return js.call(
-          '#.from([#])', [setType, _visitExpressionList(node.expressions)]);
-    }
-    return _cacheConst(() => runtimeCall('constSet(#, [#])', [
-          _emitType(node.typeArgument),
-          _visitExpressionList(node.expressions)
-        ]));
-  }
-
-  JS.Expression _emitConstList(
-      DartType elementType, List<JS.Expression> elements) {
-    // dart.constList helper internally depends on _interceptors.JSArray.
-    _declareBeforeUse(_jsArrayClass);
-    return runtimeCall('constList([#], #)', [elements, _emitType(elementType)]);
+    return _emitConstList(elementType, elements);
   }
 
   JS.Expression _emitList(DartType itemType, List<JS.Expression> items) {
@@ -4931,27 +4910,60 @@
     return js.call('#.of(#)', [_emitType(arrayType), list]);
   }
 
+  JS.Expression _emitConstList(
+      DartType elementType, List<JS.Expression> elements) {
+    // dart.constList helper internally depends on _interceptors.JSArray.
+    _declareBeforeUse(_jsArrayClass);
+    return cacheConst(
+        runtimeCall('constList([#], #)', [elements, _emitType(elementType)]));
+  }
+
+  @override
+  visitSetLiteral(SetLiteral node) {
+    // TODO(markzipan): remove const check when we use front-end const eval
+    if (!node.isConst) {
+      var setType = visitInterfaceType(
+          InterfaceType(linkedHashSetClass, [node.typeArgument]));
+      if (node.expressions.isEmpty) {
+        return js.call('#.new()', [setType]);
+      }
+      return js.call(
+          '#.from([#])', [setType, _visitExpressionList(node.expressions)]);
+    }
+    return _emitConstSet(
+        node.typeArgument, _visitExpressionList(node.expressions));
+  }
+
+  JS.Expression _emitConstSet(
+      DartType elementType, List<JS.Expression> elements) {
+    return cacheConst(
+        runtimeCall('constSet(#, [#])', [_emitType(elementType), elements]));
+  }
+
   @override
   visitMapLiteral(MapLiteral node) {
-    emitEntries() {
-      var entries = <JS.Expression>[];
-      for (var e in node.entries) {
-        entries.add(_visitExpression(e.key));
-        entries.add(_visitExpression(e.value));
-      }
-      return JS.ArrayInitializer(entries);
+    var entries = <JS.Expression>[];
+    for (var e in node.entries) {
+      entries.add(_visitExpression(e.key));
+      entries.add(_visitExpression(e.value));
     }
 
+    // TODO(markzipan): remove const check when we use front-end const eval
     if (!node.isConst) {
       var mapType =
           _emitMapImplType(node.getStaticType(types) as InterfaceType);
       if (node.entries.isEmpty) {
         return js.call('new #.new()', [mapType]);
       }
-      return js.call('new #.from(#)', [mapType, emitEntries()]);
+      return js.call('new #.from([#])', [mapType, entries]);
     }
-    return _cacheConst(() => runtimeCall('constMap(#, #, #)',
-        [_emitType(node.keyType), _emitType(node.valueType), emitEntries()]));
+    return _emitConstMap(node.keyType, node.valueType, entries);
+  }
+
+  JS.Expression _emitConstMap(
+      DartType keyType, DartType valueType, List<JS.Expression> entries) {
+    return cacheConst(runtimeCall('constMap(#, #, [#])',
+        [_emitType(keyType), _emitType(valueType), entries]));
   }
 
   @override
@@ -5025,6 +5037,29 @@
   }
 
   @override
+  visitBlockExpression(BlockExpression node) {
+    var jsExpr = _visitExpression(node.value);
+    List<JS.Statement> jsStmts = node.body.statements
+        .map(_visitStatement)
+        .toList()
+          ..add(JS.Return(jsExpr));
+    var jsBlock = JS.Block(jsStmts);
+    // BlockExpressions with async operations must be constructed
+    // with a generator instead of a lambda.
+    var finder = YieldFinder();
+    jsBlock.accept(finder);
+    if (finder.hasYield) {
+      var genFn = JS.Fun([], jsBlock, isGenerator: true);
+      var asyncLibrary = emitLibraryName(coreTypes.asyncLibrary);
+      var returnType = _emitType(node.getStaticType(types));
+      var asyncCall =
+          js.call('#.async(#, #)', [asyncLibrary, returnType, genFn]);
+      return JS.Yield(asyncCall);
+    }
+    return JS.Call(JS.ArrowFun([], jsBlock), []);
+  }
+
+  @override
   visitInstantiation(Instantiation node) {
     return runtimeCall('gbind(#, #)', [
       _visitExpression(node.expression),
@@ -5051,13 +5086,8 @@
         isBuiltinAnnotation(a, '_js_helper', 'ReifyFunctionTypes');
     while (parent != null) {
       var a = findAnnotation(parent, reifyFunctionTypes);
-      if (a is ConstructorInvocation) {
-        var args = a.arguments.positional;
-        if (args.length == 1) {
-          var arg = args[0];
-          if (arg is BoolLiteral) return arg.value;
-        }
-      }
+      var value = _constants.getFieldValueFromAnnotation(a, 'value');
+      if (value is bool) return value;
       parent = parent.parent;
     }
     return true;
@@ -5087,9 +5117,11 @@
   ///
   /// Calls [findAnnotation] followed by [getNameFromAnnotation].
   String getAnnotationName(NamedNode node, bool test(Expression value)) {
-    return _constants.getNameFromAnnotation(findAnnotation(node, test));
+    return _constants.getFieldValueFromAnnotation(
+        findAnnotation(node, test), 'name');
   }
 
+  JS.Expression visitConstant(Constant node) => node.accept(this);
   @override
   visitNullConstant(NullConstant node) => JS.LiteralNull();
   @override
@@ -5097,7 +5129,23 @@
   @override
   visitIntConstant(IntConstant node) => js.number(node.value);
   @override
-  visitDoubleConstant(DoubleConstant node) => js.number(node.value);
+  visitDoubleConstant(DoubleConstant node) {
+    var value = node.value;
+
+    // Emit the constant as an integer, if possible.
+    if (value.isFinite) {
+      var intValue = value.toInt();
+      const int _MIN_INT32 = -0x80000000;
+      const int _MAX_INT32 = 0x7FFFFFFF;
+      if (intValue.toDouble() == value &&
+          intValue >= _MIN_INT32 &&
+          intValue <= _MAX_INT32) {
+        return js.number(intValue);
+      }
+    }
+    return js.number(value);
+  }
+
   @override
   visitStringConstant(StringConstant node) => js.escapedString(node.value, '"');
 
@@ -5105,56 +5153,67 @@
   // are emitted via their normal expression nodes.
   @override
   defaultConstant(Constant node) => _emitInvalidNode(node);
-  @override
-  visitSymbolConstant(node) => defaultConstant(node);
-  @override
-  visitMapConstant(node) => defaultConstant(node);
-  @override
-  visitListConstant(node) => defaultConstant(node);
-  @override
-  visitInstanceConstant(node) => defaultConstant(node);
-  @override
-  visitTearOffConstant(node) => defaultConstant(node);
-  @override
-  visitTypeLiteralConstant(node) => defaultConstant(node);
-  @override
-  visitPartialInstantiationConstant(node) => defaultConstant(node);
-  @override
-  visitUnevaluatedConstant(node) => defaultConstant(node);
-}
 
-bool isSdkInternalRuntime(Library l) =>
-    l.importUri.toString() == 'dart:_runtime';
+  @override
+  visitSymbolConstant(node) => emitDartSymbol(node.name);
 
-/// Choose a canonical name from the [library] element.
-///
-/// This never uses the library's name (the identifier in the `library`
-/// declaration) as it doesn't have any meaningful rules enforced.
-String jsLibraryName(Library library) {
-  var uri = library.importUri;
-  if (uri.scheme == 'dart') return uri.path;
+  @override
+  visitMapConstant(node) {
+    var entries = <JS.Expression>[];
+    for (var e in node.entries) {
+      entries.add(visitConstant(e.key));
+      entries.add(visitConstant(e.value));
+    }
 
-  // TODO(vsm): This is not necessarily unique if '__' appears in a file name.
-  Iterable<String> segments;
-  if (uri.scheme == 'package') {
-    // Strip the package name.
-    // TODO(vsm): This is not unique if an escaped '/'appears in a filename.
-    // E.g., "foo/bar.dart" and "foo__bar.dart" would collide.
-    segments = uri.pathSegments.skip(1);
-  } else {
-    // TODO(jmesserly): this is not unique typically.
-    segments = [uri.pathSegments.last];
+    return _emitConstMap(node.keyType, node.valueType, entries);
   }
 
-  var qualifiedPath = segments.map((p) => p == '..' ? '' : p).join('__');
-  return pathToJSIdentifier(qualifiedPath);
-}
+  @override
+  visitListConstant(node) => _emitConstList(
+      node.typeArgument, node.entries.map(visitConstant).toList());
 
-/// Shorthand for identifier-like property names.
-/// For now, we emit them as strings and the printer restores them to
-/// identifiers if it can.
-// TODO(jmesserly): avoid the round tripping through quoted form.
-JS.LiteralString _propertyName(String name) => js.string(name, "'");
+  @override
+  visitSetConstant(node) {
+    return _emitConstSet(
+        node.typeArgument, node.entries.map(visitConstant).toList());
+  }
+
+  @override
+  visitInstanceConstant(node) {
+    entryToProperty(MapEntry<Reference, Constant> entry) {
+      var constant = entry.value.accept(this);
+      var member = entry.key.asField;
+      return JS.Property(
+          _emitMemberName(member.name.name, member: member), constant);
+    }
+
+    var type = visitInterfaceType(node.getType(types) as InterfaceType);
+    var prototype = js.call("#.prototype", [type]);
+    var properties = [JS.Property(propertyName("__proto__"), prototype)]
+      ..addAll(node.fieldValues.entries.map(entryToProperty));
+    return canonicalizeConstObject(
+        JS.ObjectInitializer(properties, multiline: true));
+  }
+
+  @override
+  visitTearOffConstant(node) => _emitStaticGet(node.procedure);
+
+  @override
+  visitTypeLiteralConstant(node) => _emitTypeLiteral(node.type);
+
+  @override
+  visitPartialInstantiationConstant(node) {
+    return runtimeCall('gbind(#, #)', [
+      visitConstant(node.tearOffConstant),
+      node.types.map(_emitType).toList()
+    ]);
+  }
+
+  @override
+  visitUnevaluatedConstant(node) {
+    return _visitExpression(node.expression);
+  }
+}
 
 bool _isInlineJSFunction(Statement body) {
   var block = body;
diff --git a/pkg/dev_compiler/lib/src/kernel/constants.dart b/pkg/dev_compiler/lib/src/kernel/constants.dart
index 0e9d692..55885a5 100644
--- a/pkg/dev_compiler/lib/src/kernel/constants.dart
+++ b/pkg/dev_compiler/lib/src/kernel/constants.dart
@@ -2,9 +2,14 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+// TODO(askesc): We should not need to call the constant evaluator
+// explicitly once constant-update-2018 is shipped.
+import 'package:front_end/src/api_prototype/constant_evaluator.dart'
+    show ConstantEvaluator, SimpleErrorReporter;
+
 import 'package:kernel/core_types.dart';
 import 'package:kernel/kernel.dart';
-import 'package:kernel/transformations/constants.dart';
+import 'package:kernel/target/targets.dart';
 import 'package:kernel/type_environment.dart';
 import 'kernel_helpers.dart';
 
@@ -19,7 +24,7 @@
   DevCompilerConstants(
       TypeEnvironment types, Map<String, String> declaredVariables)
       : _visitor = _ConstantVisitor(types.coreTypes),
-        _evaluator = ConstantEvaluator(DevCompilerConstantsBackend(),
+        _evaluator = ConstantEvaluator(const DevCompilerConstantsBackend(),
             declaredVariables, types, false, const _ErrorReporter());
 
   /// Determines if an expression is constant.
@@ -29,33 +34,17 @@
   /// failed, or if the constant was unavailable.
   ///
   /// Returns [NullConstant] to represent the `null` value.
-  ///
-  /// To avoid performance costs associated with try+catch on invalid constant
-  /// evaluation, call this after [isConstant] is known to be true.
-  Constant evaluate(Expression e, {bool cache = false}) {
+  Constant evaluate(Expression e) {
     if (e == null) return null;
 
-    try {
-      var result = cache ? _evaluator.evaluate(e) : e.accept(_evaluator);
-      return result is UnevaluatedConstant ? null : result;
-    } on _AbortCurrentEvaluation {
-      // TODO(jmesserly): the try+catch is necessary because the front end is
-      // not issuing sufficient errors, so the constant evaluation can fail.
-      //
-      // It can also be caused by methods in the evaluator that don't understand
-      // unavailable constants.
-      return null;
-    } on NoSuchMethodError {
-      // TODO(jmesserly): this is probably the same issue as above, but verify
-      // that it's fixed once Kernel does constant evaluation.
-      return null;
-    }
+    Constant result = _evaluator.evaluate(e);
+    return result is UnevaluatedConstant ? null : result;
   }
 
-  /// If [node] is an annotation with a field named `name`, returns that field's
+  /// If [node] is an annotation with a field named [name], returns that field's
   /// value.
   ///
-  /// This assumes the `name` field is populated from a named argument `name:`
+  /// This assumes the field is populated from a named argument with that name,
   /// or from the first positional argument.
   ///
   /// For example:
@@ -70,36 +59,56 @@
   ///     main() { ... }
   ///
   /// Given the node for `@MyAnnotation('FooBar')` this will return `'FooBar'`.
-  String getNameFromAnnotation(ConstructorInvocation node) {
-    if (node == null) return null;
+  Object getFieldValueFromAnnotation(Expression node, String name) {
+    node = unwrapUnevaluatedConstant(node);
+    if (node is ConstantExpression) {
+      var constant = node.constant;
+      if (constant is InstanceConstant) {
+        var value = constant.fieldValues.entries
+            .firstWhere((e) => e.key.asField.name.name == name,
+                orElse: () => null)
+            ?.value;
+        if (value is PrimitiveConstant) return value.value;
+        if (value is UnevaluatedConstant) {
+          return _evaluateAnnotationArgument(value.expression);
+        }
+        return null;
+      }
+    }
 
     // TODO(jmesserly): this does not use the normal evaluation engine, because
     // it won't work if we don't have the const constructor body available.
     //
     // We may need to address this in the kernel outline files.
-    Expression first;
-    var named = node.arguments.named;
-    if (named.isNotEmpty) {
-      first =
-          named.firstWhere((n) => n.name == 'name', orElse: () => null)?.value;
-    }
-    var positional = node.arguments.positional;
-    if (positional.isNotEmpty) first ??= positional[0];
-    if (first != null) {
-      first = _followConstFields(first);
-      if (first is StringLiteral) return first.value;
+    if (node is ConstructorInvocation) {
+      Expression first;
+      var named = node.arguments.named;
+      if (named.isNotEmpty) {
+        first =
+            named.firstWhere((n) => n.name == name, orElse: () => null)?.value;
+      }
+      var positional = node.arguments.positional;
+      if (positional.isNotEmpty) first ??= positional[0];
+      if (first != null) {
+        return _evaluateAnnotationArgument(first);
+      }
     }
     return null;
   }
 
-  Expression _followConstFields(Expression expr) {
-    if (expr is StaticGet) {
-      var target = expr.target;
+  Object _evaluateAnnotationArgument(Expression node) {
+    node = unwrapUnevaluatedConstant(node);
+    if (node is ConstantExpression) {
+      var constant = node.constant;
+      if (constant is PrimitiveConstant) return constant.value;
+    }
+    if (node is StaticGet) {
+      var target = node.target;
       if (target is Field) {
-        return _followConstFields(target.initializer);
+        return _evaluateAnnotationArgument(target.initializer);
       }
     }
-    return expr;
+    return node is BasicLiteral ? node.value : null;
   }
 }
 
@@ -170,35 +179,16 @@
 
 /// Implement the class for compiler specific behavior.
 class DevCompilerConstantsBackend extends ConstantsBackend {
-  DevCompilerConstantsBackend();
+  const DevCompilerConstantsBackend();
 
   @override
-  Constant lowerConstant(Constant constant) {
-    if (constant is DoubleConstant) {
-      // Convert to an integer when possible (matching the runtime behavior
-      // of `is int`).
-      var d = constant.value;
-      if (d.isFinite) {
-        var i = d.toInt();
-        if (d == i.toDouble()) return IntConstant(i);
-      }
-    }
-    return constant;
-  }
-
-  // Use doubles to match JS number semantics.
-  num prepareNumericOperand(num operand) => operand.toDouble();
+  NumberSemantics get numberSemantics => NumberSemantics.js;
 }
 
 class _ErrorReporter extends SimpleErrorReporter {
   const _ErrorReporter();
 
+  // Ignore reported errors.
   @override
-  report(context, message, node) => throw const _AbortCurrentEvaluation();
-}
-
-// TODO(jmesserly): this class is private in Kernel constants library, so
-// we have our own version.
-class _AbortCurrentEvaluation {
-  const _AbortCurrentEvaluation();
+  reportMessage(Uri uri, int offset, String message) {}
 }
diff --git a/pkg/dev_compiler/lib/src/kernel/js_interop.dart b/pkg/dev_compiler/lib/src/kernel/js_interop.dart
index 95145f6..6083925 100644
--- a/pkg/dev_compiler/lib/src/kernel/js_interop.dart
+++ b/pkg/dev_compiler/lib/src/kernel/js_interop.dart
@@ -17,13 +17,7 @@
 }
 
 bool _annotationIsFromJSLibrary(String expectedName, Expression value) {
-  Class c;
-  if (value is ConstructorInvocation) {
-    c = value.target.enclosingClass;
-  } else if (value is StaticGet) {
-    var type = value.target.getterType;
-    if (type is InterfaceType) c = type.classNode;
-  }
+  var c = getAnnotationClass(value);
   return c != null &&
       c.name == expectedName &&
       _isJSLibrary(c.enclosingLibrary);
@@ -48,22 +42,10 @@
 bool _isJSAnonymousAnnotation(Expression value) =>
     _annotationIsFromJSLibrary('_Anonymous', value);
 
-bool _isBuiltinAnnotation(
-    Expression value, String libraryName, String annotationName) {
-  if (value is ConstructorInvocation) {
-    var c = value.target.enclosingClass;
-    if (c.name == annotationName) {
-      var uri = c.enclosingLibrary.importUri;
-      return uri.scheme == 'dart' && uri.pathSegments[0] == libraryName;
-    }
-  }
-  return false;
-}
-
 /// Whether [value] is a `@JSExportName` (internal annotation used in SDK
 /// instead of `@JS` from `package:js`).
 bool isJSExportNameAnnotation(Expression value) =>
-    _isBuiltinAnnotation(value, '_foreign_helper', 'JSExportName');
+    isBuiltinAnnotation(value, '_foreign_helper', 'JSExportName');
 
 /// Whether [i] is a `spread` invocation (to be used on function arguments
 /// to have them compiled as `...` spread args in ES6 outputs).
@@ -71,19 +53,24 @@
     target.name.name == 'spread' && _isJSLibrary(target.enclosingLibrary);
 
 bool isJSName(Expression value) =>
-    _isBuiltinAnnotation(value, '_js_helper', 'JSName');
+    isBuiltinAnnotation(value, '_js_helper', 'JSName');
 
 bool isJsPeerInterface(Expression value) =>
-    _isBuiltinAnnotation(value, '_js_helper', 'JsPeerInterface');
+    isBuiltinAnnotation(value, '_js_helper', 'JsPeerInterface');
 
 bool isNativeAnnotation(Expression value) =>
-    _isBuiltinAnnotation(value, '_js_helper', 'Native');
+    isBuiltinAnnotation(value, '_js_helper', 'Native');
 
 bool isJSAnonymousType(Class namedClass) {
-  return hasJSInteropAnnotation(namedClass) &&
+  var hasJSInterop = hasJSInteropAnnotation(namedClass);
+  var isAnonymous =
       findAnnotation(namedClass, _isJSAnonymousAnnotation) != null;
+  return hasJSInterop && isAnonymous;
 }
 
+bool isUndefinedAnnotation(Expression value) =>
+    isBuiltinAnnotation(value, '_js_helper', '_Undefined');
+
 /// Returns true iff the class has an `@JS(...)` annotation from `package:js`.
 ///
 /// Note: usually [_usesJSInterop] should be used instead of this.
diff --git a/pkg/dev_compiler/lib/src/kernel/kernel_helpers.dart b/pkg/dev_compiler/lib/src/kernel/kernel_helpers.dart
index 498bf51..bca5ea6 100644
--- a/pkg/dev_compiler/lib/src/kernel/kernel_helpers.dart
+++ b/pkg/dev_compiler/lib/src/kernel/kernel_helpers.dart
@@ -79,18 +79,54 @@
   return annotations.firstWhere(test, orElse: () => null);
 }
 
+/// Returns true if [value] represents an annotation for class [className] in
+/// "dart:" library [libraryName].
 bool isBuiltinAnnotation(
-    Expression value, String libraryName, String expectedName) {
-  if (value is ConstructorInvocation) {
-    var c = value.target.enclosingClass;
-    if (c.name == expectedName) {
-      var uri = c.enclosingLibrary.importUri;
-      return uri.scheme == 'dart' && uri.path == libraryName;
-    }
+    Expression value, String libraryName, String className) {
+  var c = getAnnotationClass(value);
+  if (c != null && c.name == className) {
+    var uri = c.enclosingLibrary.importUri;
+    return uri.scheme == 'dart' && uri.path == libraryName;
   }
   return false;
 }
 
+/// Gets the class of the instance referred to by metadata annotation [node].
+///
+/// For example:
+///
+/// - `@JS()` would return the "JS" class in "package:js".
+/// - `@anonymous` would return the "_Anonymous" class in "package:js".
+///
+/// This function works regardless of whether the CFE is evaluating constants,
+/// or whether the constant is a field reference (such as "anonymous" above).
+Class getAnnotationClass(Expression node) {
+  node = unwrapUnevaluatedConstant(node);
+  if (node is ConstantExpression) {
+    var constant = node.constant;
+    if (constant is InstanceConstant) return constant.classNode;
+  } else if (node is ConstructorInvocation) {
+    return node.target.enclosingClass;
+  } else if (node is StaticGet) {
+    var type = node.target.getterType;
+    if (type is InterfaceType) return type.classNode;
+  }
+  return null;
+}
+
+Expression unwrapUnevaluatedConstant(Expression node) {
+  // TODO(jmesserly): see if we can configure CFE to preseve the original
+  // expression, rather than wrapping in an UnevaluatedConstant and then
+  // a ConstantExpression.
+  if (node is ConstantExpression) {
+    var constant = node.constant;
+    if (constant is UnevaluatedConstant) {
+      return constant.expression;
+    }
+  }
+  return node;
+}
+
 /// Returns true if [name] is an operator method that is available on primitive
 /// types (`int`, `double`, `num`, `String`, `bool`).
 ///
@@ -196,12 +232,10 @@
           var expr = statement.expression;
           if (expr is Throw) {
             var error = expr.expression;
-            if (error is ConstructorInvocation &&
-                error.target.enclosingClass.name == 'UnsupportedError') {
-              // HTML adds a lot of private constructors that are unreachable.
-              // Skip these.
-              return true;
-            }
+
+            // HTML adds a lot of private constructors that are unreachable.
+            // Skip these.
+            return isBuiltinAnnotation(error, 'core', 'UnsupportedError');
           }
         }
       }
diff --git a/pkg/dev_compiler/lib/src/kernel/native_types.dart b/pkg/dev_compiler/lib/src/kernel/native_types.dart
index 1daac64..99a2140 100644
--- a/pkg/dev_compiler/lib/src/kernel/native_types.dart
+++ b/pkg/dev_compiler/lib/src/kernel/native_types.dart
@@ -6,6 +6,7 @@
 import 'package:kernel/core_types.dart';
 import 'package:kernel/kernel.dart';
 import 'constants.dart';
+import 'kernel_helpers.dart';
 
 /// Contains information about native JS types (those types provided by the
 /// implementation) that are also provided by the Dart SDK.
@@ -125,25 +126,33 @@
   /// referring to the JavaScript built-in `Array` type.
   List<String> getNativePeers(Class c) {
     if (c == coreTypes.objectClass) return ['Object'];
-    var names = constants.getNameFromAnnotation(_getNativeAnnotation(c));
-    if (names == null) return const [];
 
-    // Omit the special name "!nonleaf" and any future hacks starting with "!"
-    return names.split(',').where((peer) => !peer.startsWith("!")).toList();
+    for (var annotation in c.annotations) {
+      var names = _getNativeAnnotationName(annotation);
+      if (names != null) {
+        // Omit the special name "!nonleaf" and any future dart2js hacks
+        // starting with "!"
+        return names.split(',').where((peer) => !peer.startsWith("!")).toList();
+      }
+    }
+    return const [];
+  }
+
+  /// If this [annotation] is `@Native` or `@JsPeerInterface`, returns the "name"
+  /// field (which is also the constructor parameter).
+  String _getNativeAnnotationName(Expression annotation) {
+    if (!_isNativeAnnotation(annotation)) return null;
+    return constants.getFieldValueFromAnnotation(annotation, 'name');
   }
 }
 
-bool _isNative(Class c) => _getNativeAnnotation(c) != null;
+/// Whether class [c] has any `@Native` or `@JsPeerInterface` annotations.
+bool _isNative(Class c) => c.annotations.any(_isNativeAnnotation);
 
-ConstructorInvocation _getNativeAnnotation(Class c) {
-  for (var annotation in c.annotations) {
-    if (annotation is ConstructorInvocation) {
-      var c = annotation.target.enclosingClass;
-      if ((c.name == 'Native' || c.name == 'JsPeerInterface') &&
-          c.enclosingLibrary.importUri.scheme == 'dart') {
-        return annotation;
-      }
-    }
-  }
-  return null;
+/// Whether this [annotation] is `@Native` or `@JsPeerInterface`.
+bool _isNativeAnnotation(Expression annotation) {
+  var c = getAnnotationClass(annotation);
+  return c != null &&
+      (c.name == 'Native' || c.name == 'JsPeerInterface') &&
+      c.enclosingLibrary.importUri.scheme == 'dart';
 }
diff --git a/pkg/dev_compiler/lib/src/kernel/nullable_inference.dart b/pkg/dev_compiler/lib/src/kernel/nullable_inference.dart
index 76b6570..185d3f0 100644
--- a/pkg/dev_compiler/lib/src/kernel/nullable_inference.dart
+++ b/pkg/dev_compiler/lib/src/kernel/nullable_inference.dart
@@ -230,7 +230,9 @@
   @override
   visitConstantExpression(ConstantExpression node) {
     var c = node.constant;
-    return c is PrimitiveConstant && c.value == null;
+    if (c is UnevaluatedConstant) return c.expression.accept(this);
+    if (c is PrimitiveConstant) return c.value == null;
+    return false;
   }
 
   @override
@@ -240,24 +242,36 @@
   visitInstantiation(Instantiation node) => false;
 
   bool isNotNullAnnotation(Expression value) =>
-      _isInternalAnnotationField(value, 'notNull');
+      _isInternalAnnotationField(value, 'notNull', '_NotNull');
 
   bool isNullCheckAnnotation(Expression value) =>
-      _isInternalAnnotationField(value, 'nullCheck');
+      _isInternalAnnotationField(value, 'nullCheck', '_NullCheck');
 
-  bool _isInternalAnnotationField(Expression value, String name) {
-    if (value is StaticGet) {
-      var t = value.target;
-      if (t is Field && t.name.name == name) {
-        var uri = t.enclosingLibrary.importUri;
-        return uri.scheme == 'dart' && uri.pathSegments[0] == '_js_helper' ||
-            allowPackageMetaAnnotations &&
-                uri.scheme == 'package' &&
-                uri.pathSegments[0] == 'meta';
-      }
+  bool _isInternalAnnotationField(
+      Expression node, String fieldName, String className) {
+    node = unwrapUnevaluatedConstant(node);
+    if (node is ConstantExpression) {
+      var constant = node.constant;
+      return constant is InstanceConstant &&
+          constant.classNode.name == className &&
+          _isInternalSdkAnnotation(constant.classNode.enclosingLibrary);
+    }
+    if (node is StaticGet) {
+      var t = node.target;
+      return t is Field &&
+          t.name.name == fieldName &&
+          _isInternalSdkAnnotation(t.enclosingLibrary);
     }
     return false;
   }
+
+  bool _isInternalSdkAnnotation(Library library) {
+    var uri = library.importUri;
+    return uri.scheme == 'dart' && uri.pathSegments[0] == '_js_helper' ||
+        allowPackageMetaAnnotations &&
+            uri.scheme == 'package' &&
+            uri.pathSegments[0] == 'meta';
+  }
 }
 
 /// A visitor that determines which local variables cannot be null using
diff --git a/pkg/dev_compiler/lib/src/kernel/target.dart b/pkg/dev_compiler/lib/src/kernel/target.dart
index 75aedd1..4b08093 100644
--- a/pkg/dev_compiler/lib/src/kernel/target.dart
+++ b/pkg/dev_compiler/lib/src/kernel/target.dart
@@ -8,7 +8,6 @@
 import 'package:kernel/core_types.dart';
 import 'package:kernel/class_hierarchy.dart';
 import 'package:kernel/target/targets.dart';
-import 'package:kernel/transformations/constants.dart' show ConstantsBackend;
 import 'constants.dart' show DevCompilerConstantsBackend;
 import 'kernel_helpers.dart';
 
@@ -69,6 +68,9 @@
   bool get errorOnUnexactWebIntLiterals => true;
 
   @override
+  bool get supportsSetLiterals => true;
+
+  @override
   bool get enableNoSuchMethodForwarders => true;
 
   @override
@@ -151,7 +153,7 @@
 
   @override
   ConstantsBackend constantsBackend(CoreTypes coreTypes) =>
-      new DevCompilerConstantsBackend();
+      const DevCompilerConstantsBackend();
 }
 
 /// Analyzes a component to determine if any covariance checks in private
diff --git a/pkg/dev_compiler/test/sourcemap/ddc_common.dart b/pkg/dev_compiler/test/sourcemap/ddc_common.dart
index 3d187dd..437b008 100644
--- a/pkg/dev_compiler/test/sourcemap/ddc_common.dart
+++ b/pkg/dev_compiler/test/sourcemap/ddc_common.dart
@@ -134,15 +134,24 @@
     let global = new Function('return this;')();
     $d8Preambles
 
+    // d8 does not seem to print the `.stack` property like
+    // node.js and browsers do, so include that.
+    Error.prototype.toString = function() {
+      // Note: on d8, the stack property includes the error message too.
+      return this.stack;
+    };
+
+    global.scheduleImmediate = function(callback) {
+      // Ensure unhandled promise rejections get printed.
+      Promise.resolve(null).then(callback).catch(e => console.error(e));
+    };
+
     let main = $inputFileNameNoExt.main;
     dart.ignoreWhitelistedErrors(false);
     try {
       dartMainRunner(main, []);
     } catch(e) {
       console.error(e);
-      // d8 does not seem to print the `.stack` property like
-      // node.js and browsers do.
-      console.error(e.stack);
     }
     """;
 }
diff --git a/pkg/dev_compiler/test/worker/worker_test.dart b/pkg/dev_compiler/test/worker/worker_test.dart
index dd4b5cc..07c9dc9 100644
--- a/pkg/dev_compiler/test/worker/worker_test.dart
+++ b/pkg/dev_compiler/test/worker/worker_test.dart
@@ -10,28 +10,41 @@
 // TODO(jakemac): Remove once this is a part of the testing library.
 import 'package:bazel_worker/src/async_message_grouper.dart';
 import 'package:bazel_worker/testing.dart';
-import 'package:path/path.dart' show join, joinAll;
+import 'package:path/path.dart' show dirname, join, joinAll;
 import 'package:test/test.dart';
 
-File file(String path) => File(joinAll(path.split('/'))).absolute;
+Directory tmp = Directory.systemTemp.createTempSync('ddc_worker_test');
+File file(String path) => File(join(tmp.path, joinAll(path.split('/'))));
 
-main() {
-  var dartdevc = join('bin', 'dartdevc.dart');
-  group('Hello World', () {
-    final argsFile = file('test/worker/hello_world.args');
-    final inputDartFile = file('test/worker/hello_world.dart');
-    final outputJsFile = file('test/worker/out/hello_world.js');
-    final dartSdkSummary = file('gen/sdk/ddc_sdk.sum');
-    final executableArgs = [dartdevc];
-    final compilerArgs = [
-      '--no-source-map',
-      '--no-summarize',
-      '--dart-sdk-summary',
-      dartSdkSummary.path,
-      '-o',
-      outputJsFile.path,
-      inputDartFile.path,
-    ];
+void main() {
+  runTests(false);
+  runTests(true);
+}
+
+void runTests(bool isKernel) {
+  String mode = isKernel ? 'DDK' : 'DDC';
+  List<String> baseArgs = isKernel ? ['-k'] : [];
+  String ext = isKernel ? 'dill' : 'sum';
+  final binDir = dirname(Platform.resolvedExecutable);
+  // Note, the bots use the dart binary in the top-level build directory.
+  // On windows, this is a .bat file.
+  final dartdevc = 'dartdevc${Platform.isWindows ? ".bat" : ""}';
+  final executable = binDir.endsWith('bin')
+      ? join(binDir, dartdevc)
+      : join(binDir, 'dart-sdk', 'bin', dartdevc);
+  final executableArgs = <String>[];
+  group('$mode: Hello World', () {
+    final argsFile = file('hello_world.args');
+    final inputDartFile = file('hello_world.dart');
+    final outputJsFile = file('out/hello_world.js');
+    final compilerArgs = baseArgs +
+        [
+          '--no-source-map',
+          '--no-summarize',
+          '-o',
+          outputJsFile.path,
+          inputDartFile.path,
+        ];
 
     setUp(() {
       inputDartFile.createSync();
@@ -48,7 +61,7 @@
 
     test('can compile in worker mode', () async {
       var args = executableArgs.toList()..add('--persistent_worker');
-      var process = await Process.start(Platform.executable, args);
+      var process = await Process.start(executable, args);
       var messageGrouper = AsyncMessageGrouper(process.stdout);
 
       var request = WorkRequest();
@@ -71,6 +84,17 @@
       expect(response.output, isEmpty);
       expect(outputJsFile.readAsStringSync(), contains('goodbye world'));
 
+      // Try to compile an error.
+      inputDartFile.writeAsStringSync('main() { int x = "hello"; }');
+      process.stdin.add(protoToDelimitedBuffer(request));
+
+      response = await _readResponse(messageGrouper);
+      expect(response.exitCode, 1, reason: response.output);
+      expect(
+          response.output,
+          contains(
+              'A value of type \'String\' can\'t be assigned to a variable of type \'int\'.'));
+
       process.kill();
 
       // TODO(jakemac): This shouldn't be necessary, but it is for the process
@@ -80,7 +104,7 @@
 
     test('can compile in basic mode', () {
       var args = executableArgs.toList()..addAll(compilerArgs);
-      var result = Process.runSync(Platform.executable, args);
+      var result = Process.runSync(executable, args);
 
       expect(result.exitCode, EXIT_CODE_OK);
       expect(result.stdout, isEmpty);
@@ -92,7 +116,7 @@
       var args = List<String>.from(executableArgs)
         ..add('--does-not-exist')
         ..addAll(compilerArgs);
-      var result = Process.runSync(Platform.executable, args);
+      var result = Process.runSync(executable, args);
 
       expect(result.exitCode, 64);
       expect(result.stdout,
@@ -106,7 +130,7 @@
         ..add('--does-not-exist')
         ..add('--ignore-unrecognized-flags')
         ..addAll(compilerArgs);
-      var result = Process.runSync(Platform.executable, args);
+      var result = Process.runSync(executable, args);
 
       expect(result.exitCode, EXIT_CODE_OK);
       expect(result.stdout, isEmpty);
@@ -118,7 +142,7 @@
       argsFile.createSync();
       argsFile.writeAsStringSync(compilerArgs.join('\n'));
       var args = executableArgs.toList()..add('@${argsFile.path}');
-      var process = await Process.start(Platform.executable, args);
+      var process = await Process.start(executable, args);
       stderr.addStream(process.stderr);
       var futureProcessOutput = process.stdout.map(utf8.decode).toList();
 
@@ -128,16 +152,16 @@
     });
   });
 
-  group('Hello World with Summaries', () {
-    final greetingDart = file('test/worker/greeting.dart');
-    final helloDart = file('test/worker/hello.dart');
+  group('$mode: Hello World with Summaries', () {
+    final greetingDart = file('greeting.dart');
+    final helloDart = file('hello.dart');
 
-    final greetingJS = file('test/worker/greeting.js');
-    final greetingSummary = file('test/worker/greeting.api.ds');
-    final helloJS = file('test/worker/hello_world.js');
+    final greetingJS = file('greeting.js');
+    final greetingSummary = file('greeting.$ext');
+    final helloJS = file('hello_world.js');
 
-    final greeting2JS = file('test/worker/greeting2.js');
-    final greeting2Summary = file('test/worker/greeting2.api.ds');
+    final greeting2JS = file('greeting2.js');
+    final greeting2Summary = file('greeting2.$ext');
 
     setUp(() {
       greetingDart.writeAsStringSync('String greeting = "hello";');
@@ -156,36 +180,35 @@
     });
 
     test('can compile in basic mode', () {
-      final dartSdkSummary = file('gen/sdk/ddc_sdk.sum');
-      var result = Process.runSync(Platform.executable, [
-        dartdevc,
-        '--summary-extension=api.ds',
-        '--no-source-map',
-        '--dart-sdk-summary',
-        dartSdkSummary.path,
-        '-o',
-        greetingJS.path,
-        greetingDart.path,
-      ]);
-      expect(result.exitCode, EXIT_CODE_OK);
+      var result = Process.runSync(
+          executable,
+          executableArgs +
+              baseArgs +
+              [
+                '--no-source-map',
+                '-o',
+                greetingJS.path,
+                greetingDart.path,
+              ]);
       expect(result.stdout, isEmpty);
       expect(result.stderr, isEmpty);
+      expect(result.exitCode, EXIT_CODE_OK);
       expect(greetingJS.existsSync(), isTrue);
       expect(greetingSummary.existsSync(), isTrue);
 
-      result = Process.runSync(Platform.executable, [
-        dartdevc,
-        '--no-source-map',
-        '--no-summarize',
-        '--dart-sdk-summary',
-        dartSdkSummary.path,
-        '--summary-extension=api.ds',
-        '-s',
-        greetingSummary.path,
-        '-o',
-        helloJS.path,
-        helloDart.path,
-      ]);
+      result = Process.runSync(
+          executable,
+          executableArgs +
+              baseArgs +
+              [
+                '--no-source-map',
+                '--no-summarize',
+                '-s',
+                greetingSummary.path,
+                '-o',
+                helloJS.path,
+                helloDart.path,
+              ]);
       expect(result.exitCode, EXIT_CODE_OK);
       expect(result.stdout, isEmpty);
       expect(result.stderr, isEmpty);
@@ -193,54 +216,53 @@
     });
 
     test('reports error on overlapping summaries', () {
-      final dartSdkSummary = file('gen/sdk/ddc_sdk.sum');
-      var result = Process.runSync(Platform.executable, [
-        dartdevc,
-        '--summary-extension=api.ds',
-        '--no-source-map',
-        '--dart-sdk-summary',
-        dartSdkSummary.path,
-        '-o',
-        greetingJS.path,
-        greetingDart.path,
-      ]);
+      var result = Process.runSync(
+          executable,
+          executableArgs +
+              baseArgs +
+              [
+                '--no-source-map',
+                '-o',
+                greetingJS.path,
+                greetingDart.path,
+              ]);
       expect(result.exitCode, EXIT_CODE_OK);
       expect(result.stdout, isEmpty);
       expect(result.stderr, isEmpty);
       expect(greetingJS.existsSync(), isTrue);
       expect(greetingSummary.existsSync(), isTrue);
 
-      result = Process.runSync(Platform.executable, [
-        dartdevc,
-        '--summary-extension=api.ds',
-        '--no-source-map',
-        '--dart-sdk-summary',
-        dartSdkSummary.path,
-        '-o',
-        greeting2JS.path,
-        greetingDart.path,
-      ]);
+      result = Process.runSync(
+          executable,
+          executableArgs +
+              baseArgs +
+              [
+                '--no-source-map',
+                '-o',
+                greeting2JS.path,
+                greetingDart.path,
+              ]);
       expect(result.exitCode, EXIT_CODE_OK);
       expect(result.stdout, isEmpty);
       expect(result.stderr, isEmpty);
       expect(greeting2JS.existsSync(), isTrue);
       expect(greeting2Summary.existsSync(), isTrue);
 
-      result = Process.runSync(Platform.executable, [
-        dartdevc,
-        '--no-source-map',
-        '--no-summarize',
-        '--dart-sdk-summary',
-        dartSdkSummary.path,
-        '--summary-extension=api.ds',
-        '-s',
-        greetingSummary.path,
-        '-s',
-        greeting2Summary.path,
-        '-o',
-        helloJS.path,
-        helloDart.path,
-      ]);
+      result = Process.runSync(
+          executable,
+          executableArgs +
+              baseArgs +
+              [
+                '--no-source-map',
+                '--no-summarize',
+                '-s',
+                greetingSummary.path,
+                '-s',
+                greeting2Summary.path,
+                '-o',
+                helloJS.path,
+                helloDart.path,
+              ]);
       // TODO(vsm): Re-enable when we turn this check back on.
       expect(result.exitCode, 0);
       // expect(result.exitCode, 65);
@@ -250,10 +272,9 @@
     });
   });
 
-  group('Error handling', () {
-    final dartSdkSummary = file('gen/sdk/ddc_sdk.sum');
-    final badFileDart = file('test/worker/bad.dart');
-    final badFileJs = file('test/worker/bad.js');
+  group('$mode: Error handling', () {
+    final badFileDart = file('bad.dart');
+    final badFileJs = file('bad.js');
 
     tearDown(() {
       if (badFileDart.existsSync()) badFileDart.deleteSync();
@@ -261,40 +282,41 @@
     });
 
     test('incorrect usage', () {
-      var result = Process.runSync(Platform.executable, [
-        dartdevc,
-        '--dart-sdk-summary',
-        dartSdkSummary.path,
-        'oops',
-      ]);
+      var result = Process.runSync(
+          executable,
+          executableArgs +
+              baseArgs +
+              [
+                'oops',
+              ]);
       expect(result.exitCode, 64);
       expect(
-          result.stdout, contains('Please include the output file location.'));
+          result.stdout, contains('Please specify the output file location.'));
       expect(result.stdout, isNot(contains('#0')));
     });
 
     test('compile errors', () {
       badFileDart.writeAsStringSync('main() => "hello world"');
-      var result = Process.runSync(Platform.executable, [
-        dartdevc,
-        '--no-source-map',
-        '--dart-sdk-summary',
-        dartSdkSummary.path,
-        '-o',
-        badFileJs.path,
-        badFileDart.path,
-      ]);
+      var result = Process.runSync(
+          executable,
+          executableArgs +
+              baseArgs +
+              [
+                '--no-source-map',
+                '-o',
+                badFileJs.path,
+                badFileDart.path,
+              ]);
       expect(result.exitCode, 1);
-      expect(result.stdout, contains("[error] Expected to find ';'"));
+      expect(result.stdout, contains(RegExp(r"Expected (to find )?\';\'")));
     });
   });
 
-  group('Parts', () {
-    final dartSdkSummary = file('gen/sdk/ddc_sdk.sum');
-    final partFile = file('test/worker/greeting.dart');
-    final libraryFile = file('test/worker/hello.dart');
+  group('$mode: Parts', () {
+    final partFile = file('greeting.dart');
+    final libraryFile = file('hello.dart');
 
-    final outJS = file('test/worker/output.js');
+    final outJS = file('output.js');
 
     setUp(() {
       partFile.writeAsStringSync('part of hello;\n'
@@ -311,17 +333,18 @@
     });
 
     test('works if part and library supplied', () {
-      var result = Process.runSync(Platform.executable, [
-        dartdevc,
-        '--no-summarize',
-        '--no-source-map',
-        '--dart-sdk-summary',
-        dartSdkSummary.path,
-        '-o',
-        outJS.path,
-        partFile.path,
-        libraryFile.path,
-      ]);
+      var result = Process.runSync(
+          executable,
+          executableArgs +
+              baseArgs +
+              [
+                '--no-summarize',
+                '--no-source-map',
+                '-o',
+                outJS.path,
+                partFile.path,
+                libraryFile.path,
+              ]);
       expect(result.stdout, isEmpty);
       expect(result.stderr, isEmpty);
       expect(result.exitCode, 0);
@@ -329,38 +352,43 @@
     });
 
     test('works if part is not supplied', () {
-      var result = Process.runSync(Platform.executable, [
-        dartdevc,
-        '--no-summarize',
-        '--no-source-map',
-        '--dart-sdk-summary',
-        dartSdkSummary.path,
-        '-o',
-        outJS.path,
-        libraryFile.path,
-      ]);
+      var result = Process.runSync(
+          executable,
+          executableArgs +
+              baseArgs +
+              [
+                '--no-summarize',
+                '--no-source-map',
+                '-o',
+                outJS.path,
+                libraryFile.path,
+              ]);
       expect(result.stdout, isEmpty);
       expect(result.stderr, isEmpty);
       expect(result.exitCode, 0);
       expect(outJS.existsSync(), isTrue);
     });
 
-    test('part without library is silently ignored', () {
-      var result = Process.runSync(Platform.executable, [
-        dartdevc,
-        '--no-summarize',
-        '--no-source-map',
-        '--dart-sdk-summary',
-        dartSdkSummary.path,
-        '-o',
-        outJS.path,
-        partFile.path,
-      ]);
-      expect(result.stdout, isEmpty);
-      expect(result.stderr, isEmpty);
-      expect(result.exitCode, 0);
-      expect(outJS.existsSync(), isTrue);
-    });
+    if (!isKernel) {
+      // TODO(vsm): Consider dropping this test.  Kernel behavior is better.
+      test('part without library is silently ignored', () {
+        var result = Process.runSync(
+            executable,
+            executableArgs +
+                baseArgs +
+                [
+                  '--no-summarize',
+                  '--no-source-map',
+                  '-o',
+                  outJS.path,
+                  partFile.path,
+                ]);
+        expect(result.stdout, isEmpty);
+        expect(result.stderr, isEmpty);
+        expect(result.exitCode, 0);
+        expect(outJS.existsSync(), isTrue);
+      });
+    }
   });
 }
 
diff --git a/pkg/dev_compiler/tool/ddb b/pkg/dev_compiler/tool/ddb
index ea3a7a5..b5cb2fa 100755
--- a/pkg/dev_compiler/tool/ddb
+++ b/pkg/dev_compiler/tool/ddb
@@ -40,6 +40,8 @@
         abbr: 'p',
         help: 'Run with the corresponding chrome/V8 debugging port open.',
         defaultsTo: '9222')
+    ..addOption('enable-experiment',
+        help: 'Run with specified experiments enabled.', defaultsTo: '')
     ..addOption('binary', abbr: 'b', help: 'Runtime binary path.');
 
   var options = parser.parse(args);
@@ -53,6 +55,7 @@
   var debug = options['debug'] as bool;
   var kernel = options['kernel'] as bool;
   var binary = options['binary'] as String;
+  var experiment = options['enable-experiment'] as String;
   var port = int.parse(options['port'] as String);
 
   var dartBinary = Platform.resolvedExecutable;
@@ -121,6 +124,7 @@
       '--kernel',
       '--modules=$mod',
       '--dart-sdk-summary=$ddcSdk',
+      '--enable-experiment=$experiment',
       '-o',
       '$libRoot/$basename.js',
       entry
@@ -130,6 +134,7 @@
       '--modules=$mod',
       '--dart-sdk-summary=$ddcSdk',
       '--library-root=$libRoot',
+      '--enable-experiment=$experiment',
       '-o',
       '$libRoot/$basename.js',
       entry
diff --git a/pkg/dev_compiler/tool/input_sdk/libraries.dart b/pkg/dev_compiler/tool/input_sdk/libraries.dart
index 1a08e42..6009d0c 100644
--- a/pkg/dev_compiler/tool/input_sdk/libraries.dart
+++ b/pkg/dev_compiler/tool/input_sdk/libraries.dart
@@ -61,11 +61,6 @@
       categories: "Client,Server,Embedded",
       maturity: Maturity.UNSTABLE,
       dart2jsPatchPath: "_internal/js_runtime/lib/developer_patch.dart"),
-  "ffi": const LibraryInfo("ffi/ffi.dart",
-      categories: "Server",
-      // TODO(dacoharkes): Update maturity when we release dart:ffi.
-      // https://github.com/dart-lang/sdk/issues/34452
-      maturity: Maturity.EXPERIMENTAL),
   "html": const LibraryInfo("html/dart2js/html_dart2js.dart",
       categories: "Client",
       maturity: Maturity.WEB_STABLE,
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/async_patch.dart b/pkg/dev_compiler/tool/input_sdk/patch/async_patch.dart
index fe36fea..ca4ef7d 100644
--- a/pkg/dev_compiler/tool/input_sdk/patch/async_patch.dart
+++ b/pkg/dev_compiler/tool/input_sdk/patch/async_patch.dart
@@ -9,9 +9,6 @@
 import 'dart:_foreign_helper' show JS, JSExportName;
 import 'dart:_runtime' as dart;
 
-typedef void _Callback();
-typedef void _TakeCallback(_Callback callback);
-
 /// This function adapts ES6 generators to implement Dart's async/await.
 ///
 /// It's designed to interact with Dart's Future and follow Dart async/await
@@ -135,77 +132,39 @@
 @patch
 class _AsyncRun {
   @patch
-  static void _scheduleImmediate(void callback()) {
+  static void _scheduleImmediate(void Function() callback) {
     _scheduleImmediateClosure(callback);
   }
 
   // Lazily initialized.
-  static final _TakeCallback _scheduleImmediateClosure =
-      _initializeScheduleImmediate();
+  static final _scheduleImmediateClosure = _initializeScheduleImmediate();
 
-  static _TakeCallback _initializeScheduleImmediate() {
-    // TODO(rnystrom): Not needed by dev_compiler.
-    // requiresPreamble();
+  static void Function(void Function()) _initializeScheduleImmediate() {
+    // d8 support, see preambles/d8.js for the definiton of `scheduleImmediate`.
+    //
+    // TODO(jmesserly): do we need this? It's only for our d8 stack trace test.
     if (JS('', '#.scheduleImmediate', dart.global_) != null) {
-      return _scheduleImmediateJsOverride;
+      return _scheduleImmediateJSOverride;
     }
-    if (JS('', '#.MutationObserver', dart.global_) != null &&
-        JS('', '#.document', dart.global_) != null) {
-      // Use mutationObservers.
-      var div = JS('', '#.document.createElement("div")', dart.global_);
-      var span = JS('', '#.document.createElement("span")', dart.global_);
-      _Callback storedCallback;
-
-      internalCallback(_) {
-        var f = storedCallback;
-        storedCallback = null;
-        dart.removeAsyncCallback();
-        f();
-      }
-
-      var observer =
-          JS('', 'new #.MutationObserver(#)', dart.global_, internalCallback);
-      JS('', '#.observe(#, { childList: true })', observer, div);
-
-      return (void callback()) {
-        assert(storedCallback == null);
-        dart.addAsyncCallback();
-        storedCallback = callback;
-        // Because of a broken shadow-dom polyfill we have to change the
-        // children instead a cheap property.
-        // See https://github.com/Polymer/ShadowDOM/issues/468
-        JS('', '#.firstChild ? #.removeChild(#): #.appendChild(#)', div, div,
-            span, div, span);
-      };
-    } else if (JS('', '#.setImmediate', dart.global_) != null) {
-      return _scheduleImmediateWithSetImmediate;
-    }
-    // TODO(20055): We should use DOM promises when available.
-    return _scheduleImmediateWithTimer;
+    return _scheduleImmediateWithPromise;
   }
 
-  static void _scheduleImmediateJsOverride(void callback()) {
-    internalCallback() {
+  @ReifyFunctionTypes(false)
+  static void _scheduleImmediateJSOverride(void Function() callback) {
+    dart.addAsyncCallback();
+    JS('void', '#.scheduleImmediate(#)', dart.global_, () {
       dart.removeAsyncCallback();
       callback();
-    }
-
-    dart.addAsyncCallback();
-    JS('void', '#.scheduleImmediate(#)', dart.global_, internalCallback);
+    });
   }
 
-  static void _scheduleImmediateWithSetImmediate(void callback()) {
-    internalCallback() {
+  @ReifyFunctionTypes(false)
+  static Object _scheduleImmediateWithPromise(void Function() callback) {
+    dart.addAsyncCallback();
+    JS('', '#.Promise.resolve(null).then(#)', dart.global_, () {
       dart.removeAsyncCallback();
       callback();
-    }
-
-    dart.addAsyncCallback();
-    JS('void', '#.setImmediate(#)', dart.global_, internalCallback);
-  }
-
-  static void _scheduleImmediateWithTimer(void callback()) {
-    Timer._createTimer(Duration.zero, callback);
+    });
   }
 }
 
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/collection_patch.dart b/pkg/dev_compiler/tool/input_sdk/patch/collection_patch.dart
index 781a0c9..f9dd584 100644
--- a/pkg/dev_compiler/tool/input_sdk/patch/collection_patch.dart
+++ b/pkg/dev_compiler/tool/input_sdk/patch/collection_patch.dart
@@ -465,7 +465,7 @@
         var equals = _equals;
         for (int i = 0, n = JS('!', '#.length', buckets); i < n; i++) {
           E k = JS('', '#[#]', buckets, i);
-          if (equals(k, key)) return JS('', '#', k);
+          if (equals(k, key)) return k;
         }
       }
     }
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/convert_patch.dart b/pkg/dev_compiler/tool/input_sdk/patch/convert_patch.dart
index 787c677..7ff6d09 100644
--- a/pkg/dev_compiler/tool/input_sdk/patch/convert_patch.dart
+++ b/pkg/dev_compiler/tool/input_sdk/patch/convert_patch.dart
@@ -373,7 +373,7 @@
  */
 // TODO(floitsch): don't accumulate everything before starting to decode.
 class _JsonDecoderSink extends _StringSinkConversionSink {
-  final _Reviver _reviver;
+  final Function(Object key, Object value) _reviver;
   final Sink<Object> _sink;
 
   _JsonDecoderSink(this._reviver, this._sink) : super(StringBuffer(''));
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart b/pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart
index 581bc3f..192b5f6 100644
--- a/pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart
+++ b/pkg/dev_compiler/tool/input_sdk/patch/core_patch.dart
@@ -17,7 +17,8 @@
         nullCheck,
         Primitives,
         PrivateSymbol,
-        quoteStringForRegExp;
+        quoteStringForRegExp,
+        undefined;
 import 'dart:_runtime' as dart;
 import 'dart:_foreign_helper' show JS;
 import 'dart:_native_typed_data' show NativeUint8List;
@@ -374,13 +375,29 @@
 
   @patch
   static int _now() => Primitives.timerTicks();
+
+  @patch
+  int get elapsedMicroseconds {
+    int ticks = elapsedTicks;
+    if (_frequency == 1000000) return ticks;
+    assert(_frequency == 1000);
+    return ticks * 1000;
+  }
+
+  @patch
+  int get elapsedMilliseconds {
+    int ticks = elapsedTicks;
+    if (_frequency == 1000) return ticks;
+    assert(_frequency == 1000000);
+    return ticks ~/ 1000;
+  }
 }
 
 // Patch for List implementation.
 @patch
 class List<E> {
   @patch
-  factory List([int _length = dart.undefined]) {
+  factory List([@undefined int _length]) {
     dynamic list;
     if (JS('bool', '# === void 0', _length)) {
       list = JS('', '[]');
@@ -1246,7 +1263,7 @@
   /// Shifts the digits of [xDigits] into the right place in [resultDigits].
   ///
   /// `resultDigits[ds..xUsed+ds] = xDigits[0..xUsed-1] << (n % _DIGIT_BITS)`
-  ///   where `ds = ceil(n / _DIGIT_BITS)`
+  ///   where `ds = n ~/ _DIGIT_BITS`
   ///
   /// Does *not* clear digits below ds.
   static void _lsh(
@@ -2618,7 +2635,9 @@
     var resultBits = Uint8List(8);
 
     var length = _digitBits * (_used - 1) + _digits[_used - 1].bitLength;
-    if (length - 53 > maxDoubleExponent) return double.infinity;
+    if (length > maxDoubleExponent + 53) {
+      return _isNegative ? double.negativeInfinity : double.infinity;
+    }
 
     // The most significant bit is for the sign.
     if (_isNegative) resultBits[7] = 0x80;
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/developer_patch.dart b/pkg/dev_compiler/tool/input_sdk/patch/developer_patch.dart
index 7d28269..7f5e4fe 100644
--- a/pkg/dev_compiler/tool/input_sdk/patch/developer_patch.dart
+++ b/pkg/dev_compiler/tool/input_sdk/patch/developer_patch.dart
@@ -4,9 +4,11 @@
 
 // Patch file for dart:developer library.
 
-import 'dart:_js_helper' show patch, ForceInline;
-import 'dart:_foreign_helper' show JS;
+import 'dart:_js_helper' show patch, ForceInline, ReifyFunctionTypes;
+import 'dart:_foreign_helper' show JS, JSExportName;
+import 'dart:_runtime' as dart;
 import 'dart:async';
+import 'dart:convert' show json;
 import 'dart:isolate';
 
 @patch
@@ -61,6 +63,33 @@
   JS('', 'console.debug("dart.developer.registerExtension", #)', method);
 }
 
+/// Returns a JS `Promise` that resolves with the result of invoking
+/// [methodName] with an [encodedJson] map as its parameters.
+///
+/// This is used by the VM Service Prototcol to invoke extensions registered
+/// with [registerExtension]. For example, in JS:
+///
+///     await sdk.developer.invokeExtension(
+/// .         "ext.flutter.inspector.getRootWidget", '{"objectGroup":""}');
+///
+@JSExportName('invokeExtension')
+@ReifyFunctionTypes(false)
+_invokeExtension(String methodName, String encodedJson) {
+  // TODO(vsm): We should factor this out as future<->promise.
+  return JS('', 'new #.Promise(#)', dart.global_,
+      (Function(Object) resolve, Function(Object) reject) async {
+    try {
+      var method = _lookupExtension(methodName);
+      var parameters = (json.decode(encodedJson) as Map).cast<String, String>();
+      var result = await method(methodName, parameters);
+      resolve(result._toString());
+    } catch (e) {
+      // TODO(vsm): Reject or encode in result?
+      reject('$e');
+    }
+  });
+}
+
 @patch
 void _postEvent(String eventKind, String eventData) {
   JS('', 'console.debug("dart.developer.postEvent", #, #)', eventKind,
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/isolate_patch.dart b/pkg/dev_compiler/tool/input_sdk/patch/isolate_patch.dart
index 999f518..9ccdada 100644
--- a/pkg/dev_compiler/tool/input_sdk/patch/isolate_patch.dart
+++ b/pkg/dev_compiler/tool/input_sdk/patch/isolate_patch.dart
@@ -15,6 +15,9 @@
   static Isolate get current => _unsupported();
 
   @patch
+  String get debugName => _unsupported();
+
+  @patch
   static Future<Uri> get packageRoot => _unsupported();
 
   @patch
diff --git a/pkg/dev_compiler/tool/input_sdk/patch/math_patch.dart b/pkg/dev_compiler/tool/input_sdk/patch/math_patch.dart
index 1e2c7dd..869c705 100644
--- a/pkg/dev_compiler/tool/input_sdk/patch/math_patch.dart
+++ b/pkg/dev_compiler/tool/input_sdk/patch/math_patch.dart
@@ -67,14 +67,14 @@
 
 @patch
 class Random {
-  static final _secureRandom = _JSSecureRandom();
+  static Random _secureRandom;
 
   @patch
   factory Random([int seed]) =>
       (seed == null) ? const _JSRandom() : _Random(seed);
 
   @patch
-  factory Random.secure() => _secureRandom;
+  factory Random.secure() => _secureRandom ??= _JSSecureRandom();
 }
 
 class _JSRandom implements Random {
diff --git a/pkg/dev_compiler/tool/input_sdk/private/annotations.dart b/pkg/dev_compiler/tool/input_sdk/private/annotations.dart
index 1693256..bc437da 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/annotations.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/annotations.dart
@@ -43,6 +43,14 @@
   const _NullCheck();
 }
 
+/// Annotation indicating the parameter should default to the JavaScript
+/// undefined constant.
+const undefined = _Undefined();
+
+class _Undefined {
+  const _Undefined();
+}
+
 /// Tells the development compiler to check a variable for null at its
 /// declaration point, and then to assume that the variable is non-null
 /// from that point forward.
diff --git a/pkg/dev_compiler/tool/input_sdk/private/custom_hash_map.dart b/pkg/dev_compiler/tool/input_sdk/private/custom_hash_map.dart
index e2cde4c..6b90717 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/custom_hash_map.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/custom_hash_map.dart
@@ -101,7 +101,10 @@
         var equals = _equals;
         for (int i = 0, n = JS('int', '#.length', buckets); i < n; i++) {
           K k = JS('', '#[#]', buckets, i);
-          if (equals(k, key)) return JS('', '#.get(#)', _map, k);
+          if (equals(k, key)) {
+            V value = JS('', '#.get(#)', _map, k);
+            return value == null ? null : value; // coerce undefined to null.
+          }
         }
       }
     }
@@ -147,6 +150,7 @@
       JS('', '#.push(#)', buckets, key);
     }
     V value = ifAbsent();
+    if (value == null) value = null; // coerce undefined to null.
     JS('', '#.set(#, #)', _map, key, value);
     _modifications = (_modifications + 1) & 0x3ffffff;
     return value;
@@ -171,7 +175,7 @@
           V value = JS('', '#.get(#)', map, k);
           JS('', '#.delete(#)', map, k);
           _modifications = (_modifications + 1) & 0x3ffffff;
-          return value;
+          return value == null ? null : value; // coerce undefined to null.
         }
       }
     }
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/errors.dart b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/errors.dart
index 70ccace..8c8e929 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/errors.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/errors.dart
@@ -168,6 +168,7 @@
     '''class DartError extends Error {
       constructor(error) {
         super();
+        if (error == null) error = #;
         this[#] = error;
         if (error != null && typeof error == "object" && error[#] == null) {
           error[#] = this;
@@ -177,6 +178,7 @@
         return #(this[#]);
       }
     }''',
+    NullThrownError(),
     _thrownValue,
     _jsError,
     _jsError,
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 b3865c1..7ab4a81 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
@@ -97,7 +97,7 @@
 // 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, [mirrors = undefined]) {
+dload(obj, field, [@undefined mirrors]) {
   if (JS('!', 'typeof # == "function" && # == "call"', obj, field)) {
     return obj;
   }
@@ -136,7 +136,7 @@
 dputRepl(obj, field, value) =>
     dput(obj, replNameLookup(obj, field), value, false);
 
-dput(obj, field, value, [mirrors = undefined]) {
+dput(obj, field, value, [@undefined mirrors]) {
   var f = _canonicalMember(obj, field);
   trackCall(obj);
   if (f != null) {
@@ -254,6 +254,10 @@
     // We're not a function (and hence not a method either)
     // Grab the `call` method if it's not a function.
     if ($f != null) {
+      // Getting the member succeeded, so update the originalTarget.
+      // (we're now trying `call()` on `f`, so we want to call its nSM rather
+      // than the original target's nSM).
+      originalTarget = f;
       $f = ${bindCall(f, _canonicalMember(f, 'call'))};
       $ftype = null;
     }
@@ -304,10 +308,10 @@
   return callNSM();
 })()''');
 
-dcall(f, args, [named = undefined]) =>
+dcall(f, args, [@undefined named]) =>
     _checkAndCall(f, null, JS('', 'void 0'), null, args, named, 'call');
 
-dgcall(f, typeArgs, args, [named = undefined]) =>
+dgcall(f, typeArgs, args, [@undefined named]) =>
     _checkAndCall(f, null, JS('', 'void 0'), typeArgs, args, named, 'call');
 
 /// Helper for REPL dynamic invocation variants that make a best effort to
@@ -373,16 +377,16 @@
   return _checkAndCall(f, ftype, obj, typeArgs, args, named, displayName);
 }
 
-dsend(obj, method, args, [named = undefined]) =>
+dsend(obj, method, args, [@undefined named]) =>
     callMethod(obj, method, null, args, named, method);
 
-dgsend(obj, typeArgs, method, args, [named = undefined]) =>
+dgsend(obj, typeArgs, method, args, [@undefined named]) =>
     callMethod(obj, method, typeArgs, args, named, method);
 
-dsendRepl(obj, method, args, [named = undefined]) =>
+dsendRepl(obj, method, args, [@undefined named]) =>
     callMethod(obj, replNameLookup(obj, method), null, args, named, method);
 
-dgsendRepl(obj, typeArgs, method, args, [named = undefined]) =>
+dgsendRepl(obj, typeArgs, method, args, [@undefined named]) =>
     callMethod(obj, replNameLookup(obj, method), typeArgs, args, named, method);
 
 dindex(obj, index) => callMethod(obj, '_get', null, [index], null, '[]');
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/rtti.dart b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/rtti.dart
index ef023d2..5e784a4 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/rtti.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/rtti.dart
@@ -140,3 +140,21 @@
   JS('', '#.set(#, #)', _loadedSourceMaps, moduleName, sourceMap);
   JS('', '#.set(#, #)', _loadedModules, moduleName, libraries);
 }
+
+List<String> _libraries;
+
+/// Returns a JSArray of library uris (e.g,
+/// ['dart:core', 'dart:_internal', ..., 'package:foo/bar.dart', ... 'main.dart'])
+/// loaded in this application.
+List<String> getLibraries() {
+  if (_libraries == null) {
+    _libraries = [];
+    var modules = getModuleNames();
+    for (var name in modules) {
+      var module = getModuleLibraries(name);
+      List props = getOwnPropertyNames(module);
+      _libraries.addAll(props.whereType());
+    }
+  }
+  return _libraries;
+}
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 5eaff1c..e943f3e 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
@@ -24,7 +24,8 @@
         PrivateSymbol,
         ReifyFunctionTypes,
         NoReifyGeneric,
-        notNull;
+        notNull,
+        undefined;
 
 export 'dart:_debugger' show getDynamicStats, clearDynamicStats, trackCall;
 
@@ -147,6 +148,22 @@
 
 final JsSymbol = JS('', 'Symbol');
 
+/// The prototype used for all Dart libraries.
+///
+/// This makes it easy to identify Dart library objects, and also improves
+/// performance (JS engines such as V8 tend to assume `Object.create(null)` is
+/// used for a Map, so they don't optimize it as they normally would for
+/// class-like objects).
+///
+/// The `dart.library` field is set by the compiler during SDK bootstrapping
+/// (because it is needed for dart:_runtime itself), so we don't need to
+/// initialize it here. The name `dart.library` is used because it reads nicely,
+/// for example:
+///
+///     const my_library = Object.create(dart.library);
+///
+Object libraryPrototype = JS('', 'dart.library');
+
 // TODO(vsm): Remove once this flag we've removed the ability to
 // whitelist / fallback on the old behavior.
 bool startAsyncSynchronously = true;
@@ -165,7 +182,8 @@
 /// A list of functions to reset static fields back to their uninitialized
 /// state.
 ///
-/// This is populated by [defineLazyField].
+/// This is populated by [defineLazyField], and only contains the list of fields
+/// that have actually been initialized.
 @notNull
 final List<void Function()> _resetFields = JS('', '[]');
 
@@ -174,6 +192,7 @@
 /// This should be called when the user requests a hot-restart, when the UI is
 /// handling that user action.
 void hotRestart() {
+  // TODO(jmesserly): we need to prevent all pending callbacks from firing.
   for (var f in _resetFields) f();
   _resetFields.clear();
   for (var m in _cacheMaps) JS('', '#.clear()', m);
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 13d6f88..a5d6dd0 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
@@ -682,7 +682,7 @@
 }
 
 /// Create a function type.
-FunctionType fnType(returnType, List args, [extra = undefined]) =>
+FunctionType fnType(returnType, List args, [@undefined extra]) =>
     FunctionType.create(returnType, args, extra);
 
 /// Creates a generic function type.
diff --git a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/utils.dart b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/utils.dart
index dcaf067..8f9431d 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/utils.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/ddc_runtime/utils.dart
@@ -8,11 +8,6 @@
 /// by the Dart runtime.
 // TODO(ochafik): Rewrite some of these in Dart when possible.
 
-/// The JavaScript undefined constant.
-///
-/// This is initialized by DDC to JS `void 0`.
-const undefined = null;
-
 final Function(Object, Object, Object) defineProperty =
     JS('', 'Object.defineProperty');
 
@@ -76,6 +71,16 @@
     let f = init;
     init = $throwCyclicInitializationError;
     if (f === init) f($name); // throw cycle error
+
+    // On the first (non-cyclic) execution, record the field so we can reset it
+    // later if needed (hot restart).
+    $_resetFields.push(() => {
+      init = initializer;
+      value = null;
+    });
+
+    // Try to evaluate the field, using try+catch to ensure we implement the
+    // correct Dart error semantics.
     try {
       value = f();
       init = null;
@@ -93,10 +98,6 @@
       value = x;
     };
   }
-  $_resetFields.push(() => {
-    init = initializer;
-    value = null;
-  });
   return ${defineProperty(to, name, desc)};
 })()''');
 
diff --git a/pkg/dev_compiler/tool/input_sdk/private/debugger.dart b/pkg/dev_compiler/tool/input_sdk/private/debugger.dart
index 63849d8..3a6f4e9 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/debugger.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/debugger.dart
@@ -659,7 +659,13 @@
   bool hasChildren(object) => true;
 
   String preview(object) {
-    return dart.typeName(dart.getReifiedType(object));
+    // The debugger can createa a preview of a FunctionType while it's being
+    // constructed (before argument types exist), so we need to catch errors.
+    try {
+      return dart.typeName(dart.getReifiedType(object));
+    } catch (e) {
+      return safePreview(object, JsonMLConfig.none);
+    }
   }
 
   List<NameValuePair> children(object) => <NameValuePair>[
diff --git a/pkg/dev_compiler/tool/input_sdk/private/foreign_helper.dart b/pkg/dev_compiler/tool/input_sdk/private/foreign_helper.dart
index 9df99fec1..0c86cc1 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/foreign_helper.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/foreign_helper.dart
@@ -132,6 +132,8 @@
 /// Similar behaviour to `JS` from `package:js/js.dart` (but usable from runtime
 /// files), and not to be confused with `JSName` from `js_helper` (which deals
 /// with names of externs).
+// TODO(jmesserly): remove this in favor of js_helper's `@JSName`
+// (Currently they have slightly different semantics, but they can be unified.)
 class JSExportName {
   final String name;
   const JSExportName(this.name);
diff --git a/pkg/dev_compiler/tool/input_sdk/private/identity_hash_map.dart b/pkg/dev_compiler/tool/input_sdk/private/identity_hash_map.dart
index 22d2125..d75f86932 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/identity_hash_map.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/identity_hash_map.dart
@@ -55,7 +55,8 @@
   }
 
   V operator [](Object key) {
-    return JS('', '#.get(#)', _map, key);
+    V value = JS('', '#.get(#)', _map, key);
+    return value == null ? null : value; // coerce undefined to null.
   }
 
   void operator []=(K key, V value) {
@@ -70,6 +71,7 @@
   V putIfAbsent(K key, V ifAbsent()) {
     if (JS('bool', '#.has(#)', _map, key)) return JS('', '#.get(#)', _map, key);
     V value = ifAbsent();
+    if (value == null) value = null; // coerce undefined to null.
     JS('', '#.set(#, #)', _map, key, value);
     _modifications = (_modifications + 1) & 0x3ffffff;
     return value;
@@ -80,7 +82,7 @@
     if (JS('bool', '#.delete(#)', _map, key)) {
       _modifications = (_modifications + 1) & 0x3ffffff;
     }
-    return value;
+    return value == null ? null : value; // coerce undefined to null.
   }
 
   void clear() {
diff --git a/pkg/dev_compiler/tool/input_sdk/private/js_helper.dart b/pkg/dev_compiler/tool/input_sdk/private/js_helper.dart
index a8672f1..cf6b1e6 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/js_helper.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/js_helper.dart
@@ -10,7 +10,11 @@
 
 import 'dart:_interceptors';
 import 'dart:_internal'
-    show EfficientLengthIterable, MappedIterable, IterableElementError;
+    show
+        EfficientLengthIterable,
+        MappedIterable,
+        IterableElementError,
+        SubListIterable;
 
 import 'dart:_native_typed_data';
 import 'dart:_runtime' as dart;
@@ -197,7 +201,7 @@
   }
 
   static int timerFrequency;
-  static Function timerTicks;
+  static num Function() timerTicks;
 
   static bool get isD8 {
     return JS(
diff --git a/pkg/dev_compiler/tool/input_sdk/private/linked_hash_map.dart b/pkg/dev_compiler/tool/input_sdk/private/linked_hash_map.dart
index f5cde5c..f3bbaad 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/linked_hash_map.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/linked_hash_map.dart
@@ -153,7 +153,8 @@
       }
       return null;
     }
-    return JS('', '#.get(#)', _map, key);
+    V value = JS('', '#.get(#)', _map, key);
+    return value == null ? null : value; // coerce undefined to null.
   }
 
   void operator []=(K key, V value) {
@@ -195,6 +196,7 @@
       return JS('', '#.get(#)', map, key);
     }
     V value = ifAbsent();
+    if (value == null) value = null; // coerce undefined to null.
     JS('', '#.set(#, #)', map, key, value);
     _modifications = (_modifications + 1) & 0x3ffffff;
     return value;
@@ -229,7 +231,7 @@
     if (JS('bool', '#.delete(#)', map, key)) {
       _modifications = (_modifications + 1) & 0x3ffffff;
     }
-    return value;
+    return value == null ? null : value; // coerce undefined to null.
   }
 
   void clear() {
diff --git a/pkg/dev_compiler/tool/input_sdk/private/regexp_helper.dart b/pkg/dev_compiler/tool/input_sdk/private/regexp_helper.dart
index 2d6ff70..9206685 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/regexp_helper.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/regexp_helper.dart
@@ -159,7 +159,7 @@
   bool get isCaseSensitive => _isCaseSensitive;
 }
 
-class _MatchImplementation implements Match {
+class _MatchImplementation implements RegExpMatch {
   final Pattern pattern;
   // Contains a JS RegExp match object.
   // It is an Array of String values with extra "index" and "input" properties.
@@ -185,6 +185,26 @@
     }
     return out;
   }
+
+  String namedGroup(String name) {
+    var groups = JS('Object', '#.groups', _match);
+    if (groups != null) {
+      var result = JS('String|Null', '#[#]', groups, name);
+      if (result != null || JS('bool', '# in #', name, groups)) {
+        return result;
+      }
+    }
+    throw ArgumentError.value(name, "name", "Not a capture group name");
+  }
+
+  Iterable<String> get groupNames {
+    var groups = JS('Object', '#.groups', _match);
+    if (groups != null) {
+      var keys = JSArray<String>.of(JS('', 'Object.keys(#)', groups));
+      return SubListIterable(keys, 0, null);
+    }
+    return Iterable.empty();
+  }
 }
 
 class _AllMatchesIterable extends IterableBase<Match> {
diff --git a/pkg/dev_compiler/tool/input_sdk/private/string_helper.dart b/pkg/dev_compiler/tool/input_sdk/private/string_helper.dart
index 41a51d6..aeb4e2f 100644
--- a/pkg/dev_compiler/tool/input_sdk/private/string_helper.dart
+++ b/pkg/dev_compiler/tool/input_sdk/private/string_helper.dart
@@ -162,9 +162,7 @@
         return result.toString();
       }
     } else {
-      var quoted = quoteStringForRegExp(pattern);
-      var replacer = JS('', "new RegExp(#, 'g')", quoted);
-      return stringReplaceJS(receiver, replacer, replacement);
+      return JS('String', '#.split(#).join(#)', receiver, pattern, replacement);
     }
   } else if (pattern is JSSyntaxRegExp) {
     var re = regExpGetGlobalNative(pattern);
diff --git a/pkg/expect/lib/async_minitest.dart b/pkg/expect/lib/async_minitest.dart
index 6d135bc..40c69da 100644
--- a/pkg/expect/lib/async_minitest.dart
+++ b/pkg/expect/lib/async_minitest.dart
@@ -56,7 +56,7 @@
   _popName(oldName);
 }
 
-void expect(Object value, Object matcher) {
+void expect(Object value, Object matcher, {String reason}) {
   Matcher m;
   if (matcher is _Matcher) {
     m = matcher.call;
@@ -260,6 +260,10 @@
   Expect.type<List>(o);
 }
 
+void isNotNull(Object o) {
+  Expect.isNotNull(o);
+}
+
 abstract class _Matcher {
   void call(Object o);
 }
diff --git a/pkg/expect/lib/expect.dart b/pkg/expect/lib/expect.dart
index 9a59d3d..3b2b2bf 100644
--- a/pkg/expect/lib/expect.dart
+++ b/pkg/expect/lib/expect.dart
@@ -668,20 +668,6 @@
   String toString() => message;
 }
 
-/// Annotation class for testing of dart2js. Use this as metadata on method
-/// declarations to disable inlining of the annotated method.
-class NoInline {
-  const NoInline();
-}
-
-/// Annotation class for testing of dart2js. Use this as metadata on method
-/// declarations to disable closed world assumptions on parameters, effectively
-/// assuming that the runtime arguments could be any value. Note that the
-/// constraints due to [TrustTypeAnnotations] still apply.
-class AssumeDynamic {
-  const AssumeDynamic();
-}
-
 /// Is true iff type assertions are enabled.
 // TODO(rnystrom): Remove this once all tests are no longer using it.
 final bool typeAssertionsEnabled = (() {
diff --git a/pkg/front_end/lib/src/api_prototype/compiler_options.dart b/pkg/front_end/lib/src/api_prototype/compiler_options.dart
index e867b2c..1d75bc5 100644
--- a/pkg/front_end/lib/src/api_prototype/compiler_options.dart
+++ b/pkg/front_end/lib/src/api_prototype/compiler_options.dart
@@ -8,7 +8,8 @@
 
 import 'diagnostic_message.dart' show DiagnosticMessageHandler;
 
-import 'experimental_flags.dart' show ExperimentalFlag, parseExperimentalFlag;
+import 'experimental_flags.dart'
+    show defaultExperimentalFlags, ExperimentalFlag, parseExperimentalFlag;
 
 import 'file_system.dart' show FileSystem;
 
@@ -133,6 +134,11 @@
   /// unevaluated and can be evaluated by a constant evaluator later.
   Map<String, String> environmentDefines = null;
 
+  /// Report an error if a constant could not be evaluated (either because it
+  /// is an environment constant and no environment was specified, or because
+  /// it refers to a constructor or variable initializer that is not available).
+  bool errorOnUnevaluatedConstant = false;
+
   /// The target platform that will consume the compiled code.
   ///
   /// Used to provide platform-specific details to the compiler like:
@@ -147,6 +153,10 @@
   /// If not specified, the default target is the VM.
   Target target;
 
+  /// Whether asserts in initializers in const constructors are checked during
+  /// constant evaluation.
+  bool enableAsserts = false;
+
   /// Whether to show verbose messages (mainly for debugging and performance
   /// tracking).
   ///
@@ -205,28 +215,38 @@
 
 /// Parse experimental flags from a list of strings, each of which is either a
 /// flag name or a flag name prefixed by 'no-'. Return a map of flags to their
-/// values that can be passed to [experimentalFlags].
+/// values that can be passed to [experimentalFlags]. The returned map is
+/// normalized to contain default values for unmentioned flags.
 ///
 /// If an unknown flag is mentioned, or a flag is mentioned more than once,
 /// the supplied error handler is called with an error message.
 Map<ExperimentalFlag, bool> parseExperimentalFlags(
     Iterable<String> experiments, void onError(String message)) {
   Map<ExperimentalFlag, bool> flags = <ExperimentalFlag, bool>{};
-  if (experiments == null) return flags;
-  for (String experiment in experiments) {
-    bool value = true;
-    if (experiment.startsWith("no-")) {
-      value = false;
-      experiment = experiment.substring(3);
+  if (experiments != null) {
+    for (String experiment in experiments) {
+      bool value = true;
+      if (experiment.startsWith("no-")) {
+        value = false;
+        experiment = experiment.substring(3);
+      }
+      ExperimentalFlag flag = parseExperimentalFlag(experiment);
+      if (flag == null) {
+        onError("Unknown experiment: " + experiment);
+      } else if (flags.containsKey(flag)) {
+        if (flags[flag] != value) {
+          onError(
+              "Experiment specified with conflicting values: " + experiment);
+        }
+      } else {
+        flags[flag] = value;
+      }
     }
-    ExperimentalFlag flag = parseExperimentalFlag(experiment);
-    if (flag == null) {
-      onError("Unknown experiment: " + experiment);
-    } else if (flags.containsKey(flag)) {
-      onError("Experiment mentioned more than once: " + experiment);
-    } else {
-      flags[flag] = value;
-    }
+  }
+  for (ExperimentalFlag flag in ExperimentalFlag.values) {
+    assert(defaultExperimentalFlags.containsKey(flag),
+        "No default value for $flag.");
+    flags[flag] ??= defaultExperimentalFlags[flag];
   }
   return flags;
 }
diff --git a/pkg/front_end/lib/src/api_prototype/constant_evaluator.dart b/pkg/front_end/lib/src/api_prototype/constant_evaluator.dart
new file mode 100644
index 0000000..5eeb2a6
--- /dev/null
+++ b/pkg/front_end/lib/src/api_prototype/constant_evaluator.dart
@@ -0,0 +1,15 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library front_end.constant_evaluator;
+
+export '../fasta/kernel/constant_evaluator.dart'
+    show
+        ConstantEvaluator,
+        ConstantsTransformer,
+        ErrorReporter,
+        EvaluationEnvironment,
+        SimpleErrorReporter,
+        transformComponent,
+        transformLibraries;
diff --git a/pkg/front_end/lib/src/api_prototype/experimental_flags.dart b/pkg/front_end/lib/src/api_prototype/experimental_flags.dart
index a9b772d..d0615fd 100644
--- a/pkg/front_end/lib/src/api_prototype/experimental_flags.dart
+++ b/pkg/front_end/lib/src/api_prototype/experimental_flags.dart
@@ -24,3 +24,10 @@
   }
   return null;
 }
+
+const Map<ExperimentalFlag, bool> defaultExperimentalFlags = {
+  ExperimentalFlag.constantUpdate2018: false,
+  ExperimentalFlag.controlFlowCollections: true,
+  ExperimentalFlag.setLiterals: true,
+  ExperimentalFlag.spreadCollections: true,
+};
diff --git a/pkg/front_end/lib/src/api_prototype/incremental_kernel_generator.dart b/pkg/front_end/lib/src/api_prototype/incremental_kernel_generator.dart
index 768d05c..ce04a71 100644
--- a/pkg/front_end/lib/src/api_prototype/incremental_kernel_generator.dart
+++ b/pkg/front_end/lib/src/api_prototype/incremental_kernel_generator.dart
@@ -19,30 +19,57 @@
 
 abstract class IncrementalKernelGenerator {
   factory IncrementalKernelGenerator(CompilerOptions options, Uri entryPoint,
-      [Uri initializeFromDillUri]) {
+      [Uri initializeFromDillUri, bool outlineOnly]) {
     return new IncrementalCompiler(
         new CompilerContext(
             new ProcessedOptions(options: options, inputs: [entryPoint])),
-        initializeFromDillUri);
+        initializeFromDillUri,
+        outlineOnly);
   }
 
+  /// Initialize the incremental compiler from a component.
+  ///
+  /// Notice that the component has to include the platform, and that no other
+  /// platform will be loaded.
   factory IncrementalKernelGenerator.fromComponent(
-      CompilerOptions options, Uri entryPoint, Component component) {
+      CompilerOptions options, Uri entryPoint, Component component,
+      [bool outlineOnly]) {
     return new IncrementalCompiler.fromComponent(
         new CompilerContext(
             new ProcessedOptions(options: options, inputs: [entryPoint])),
-        component);
+        component,
+        outlineOnly);
   }
 
   /// Returns a component whose libraries are the recompiled libraries,
   /// or - in the case of [fullComponent] - a full Component.
-  Future<Component> computeDelta({Uri entryPoint, bool fullComponent});
+  Future<Component> computeDelta({List<Uri> entryPoints, bool fullComponent});
 
   /// Remove the file associated with the given file [uri] from the set of
   /// valid files.  This guarantees that those files will be re-read on the
   /// next call to [computeDelta]).
   void invalidate(Uri uri);
 
+  /// Invalidate all libraries that were build from source.
+  ///
+  /// This is equivalent to a number of calls to [invalidate]: One for each URI
+  /// that happens to have been read from source.
+  /// Said another way, this invalidates everything not loaded from dill
+  /// (at startup) or via [setModulesToLoadOnNextComputeDelta].
+  void invalidateAllSources();
+
+  /// Set the given [components] as components to load on the next iteration
+  /// of [computeDelta].
+  ///
+  /// If specified, all libraries not compiled from source and not included in
+  /// these components will be invalidated and the libraries inside these
+  /// components will be loaded instead.
+  ///
+  /// Useful for, for instance, modular compilation, where modules
+  /// (created externally) via this functionality can be added, changed or
+  /// removed.
+  void setModulesToLoadOnNextComputeDelta(List<Component> components);
+
   /// Compile [expression] as an [Expression]. A function returning that
   /// expression is compiled.
   ///
diff --git a/pkg/front_end/lib/src/api_unstable/bazel_worker.dart b/pkg/front_end/lib/src/api_unstable/bazel_worker.dart
index 6196ba7..6f37ab2 100644
--- a/pkg/front_end/lib/src/api_unstable/bazel_worker.dart
+++ b/pkg/front_end/lib/src/api_unstable/bazel_worker.dart
@@ -7,6 +7,8 @@
 
 import 'dart:async' show Future;
 
+import 'package:kernel/kernel.dart' show Component, CanonicalName;
+
 import 'package:kernel/target/targets.dart' show Target;
 
 import '../api_prototype/compiler_options.dart' show CompilerOptions;
@@ -17,11 +19,16 @@
 
 import '../base/processed_options.dart' show ProcessedOptions;
 
+import '../fasta/compiler_context.dart' show CompilerContext;
+
+import '../fasta/incremental_compiler.dart' show IncrementalCompiler;
+
 import '../fasta/kernel/utils.dart' show serializeComponent;
 
 import '../kernel_generator_impl.dart' show generateKernel;
 
-import 'compiler_state.dart' show InitializedCompilerState;
+import 'compiler_state.dart'
+    show InitializedCompilerState, WorkerInputComponent, digestsEqual;
 
 export '../api_prototype/diagnostic_message.dart' show DiagnosticMessage;
 
@@ -30,13 +37,143 @@
 export '../api_prototype/terminal_color_support.dart'
     show printDiagnosticMessage;
 
+export '../fasta/kernel/utils.dart' show serializeComponent;
+
 export '../fasta/severity.dart' show Severity;
 
 export 'compiler_state.dart' show InitializedCompilerState;
 
+/// Initializes the compiler for a modular build.
+///
+/// Re-uses cached components from [_workerInputCache], and reloads them
+/// as necessary based on [workerInputDigests].
+Future<InitializedCompilerState> initializeIncrementalCompiler(
+    InitializedCompilerState oldState,
+    Uri sdkSummary,
+    Uri packagesFile,
+    Uri librariesSpecificationUri,
+    List<Uri> summaryInputs,
+    Map<Uri, List<int>> workerInputDigests,
+    Target target,
+    FileSystem fileSystem,
+    bool outlineOnly) async {
+  List<int> sdkDigest = workerInputDigests[sdkSummary];
+  IncrementalCompiler incrementalCompiler;
+  CompilerOptions options;
+  ProcessedOptions processedOpts;
+  WorkerInputComponent cachedSdkInput;
+  Map<Uri, WorkerInputComponent> workerInputCache =
+      oldState?.workerInputCache ?? new Map<Uri, WorkerInputComponent>();
+  bool startOver = false;
+
+  if (oldState == null ||
+      oldState.incrementalCompiler == null ||
+      oldState.incrementalCompiler.outlineOnly != outlineOnly) {
+    // No previous state.
+    startOver = true;
+  } else {
+    // We do have a previous state.
+    cachedSdkInput = workerInputCache[sdkSummary];
+    if (cachedSdkInput == null ||
+        !digestsEqual(cachedSdkInput.digest, workerInputDigests[sdkSummary])) {
+      // The sdk is out of date.
+      startOver = true;
+    }
+  }
+
+  if (startOver) {
+    // The sdk was either not cached or it has changed.
+    options = new CompilerOptions()
+      ..sdkSummary = sdkSummary
+      ..packagesFileUri = packagesFile
+      ..librariesSpecificationUri = librariesSpecificationUri
+      ..target = target
+      ..fileSystem = fileSystem
+      ..omitPlatform = true
+      ..environmentDefines = const {};
+
+    processedOpts = new ProcessedOptions(options: options);
+    cachedSdkInput = WorkerInputComponent(
+        sdkDigest, await processedOpts.loadSdkSummary(null));
+    workerInputCache[sdkSummary] = cachedSdkInput;
+
+    incrementalCompiler = new IncrementalCompiler.fromComponent(
+        new CompilerContext(processedOpts),
+        cachedSdkInput.component,
+        outlineOnly);
+  } else {
+    options = oldState.options;
+    processedOpts = oldState.processedOpts;
+
+    var sdkComponent = cachedSdkInput.component;
+    // Reset the state of the component.
+    for (var lib in sdkComponent.libraries) {
+      lib.isExternal = cachedSdkInput.externalLibs.contains(lib.importUri);
+    }
+    sdkComponent.adoptChildren();
+    for (WorkerInputComponent cachedInput in workerInputCache.values) {
+      cachedInput.component.adoptChildren();
+    }
+    sdkComponent.unbindCanonicalNames();
+    sdkComponent.computeCanonicalNames();
+
+    // Reuse the incremental compiler, but reset as needed.
+    incrementalCompiler = oldState.incrementalCompiler;
+    incrementalCompiler.invalidateAllSources();
+    options.packagesFileUri = packagesFile;
+    options.fileSystem = fileSystem;
+  }
+
+  // Then read all the input summary components.
+  // The nameRoot from the sdk was either just created or just unbound.
+  // If just unbound, only the sdk stuff is bound. Either way, don't clear it
+  // again and bind as much as possible before loading new stuff!
+  CanonicalName nameRoot = cachedSdkInput.component.root;
+  final inputSummaries = <Component>[];
+  List<Uri> loadFromDill = new List<Uri>();
+  for (Uri summary in summaryInputs) {
+    var cachedInput = workerInputCache[summary];
+    var summaryDigest = workerInputDigests[summary];
+    if (cachedInput == null ||
+        cachedInput.component.root != nameRoot ||
+        !digestsEqual(cachedInput.digest, summaryDigest)) {
+      loadFromDill.add(summary);
+    } else {
+      // Need to reset cached components so they are usable again.
+      var component = cachedInput.component;
+      for (var lib in component.libraries) {
+        lib.isExternal = cachedInput.externalLibs.contains(lib.importUri);
+      }
+      // We don't unbind as the root was unbound already. We do have to compute
+      // the canonical names though, to rebind everything in the component.
+      component.adoptChildren();
+      component.computeCanonicalNames();
+      inputSummaries.add(component);
+    }
+  }
+
+  for (int i = 0; i < loadFromDill.length; i++) {
+    Uri summary = loadFromDill[i];
+    var summaryDigest = workerInputDigests[summary];
+    WorkerInputComponent cachedInput = WorkerInputComponent(
+        summaryDigest,
+        await processedOpts.loadComponent(
+            await fileSystem.entityForUri(summary).readAsBytes(), nameRoot));
+    workerInputCache[summary] = cachedInput;
+    inputSummaries.add(cachedInput.component);
+  }
+
+  incrementalCompiler.setModulesToLoadOnNextComputeDelta(inputSummaries);
+
+  return new InitializedCompilerState(options, processedOpts,
+      workerInputCache: workerInputCache,
+      incrementalCompiler: incrementalCompiler);
+}
+
 Future<InitializedCompilerState> initializeCompiler(
     InitializedCompilerState oldState,
     Uri sdkSummary,
+    Uri librariesSpecificationUri,
     Uri packagesFile,
     List<Uri> summaryInputs,
     List<Uri> linkedInputs,
@@ -50,10 +187,12 @@
   CompilerOptions options = new CompilerOptions()
     ..sdkSummary = sdkSummary
     ..packagesFileUri = packagesFile
+    ..librariesSpecificationUri = librariesSpecificationUri
     ..inputSummaries = summaryInputs
     ..linkedDependencies = linkedInputs
     ..target = target
-    ..fileSystem = fileSystem;
+    ..fileSystem = fileSystem
+    ..environmentDefines = const {};
 
   ProcessedOptions processedOpts = new ProcessedOptions(options: options);
 
diff --git a/pkg/front_end/lib/src/api_unstable/compiler_state.dart b/pkg/front_end/lib/src/api_unstable/compiler_state.dart
index 13d1327..dc80525 100644
--- a/pkg/front_end/lib/src/api_unstable/compiler_state.dart
+++ b/pkg/front_end/lib/src/api_unstable/compiler_state.dart
@@ -6,9 +6,41 @@
 
 import '../base/processed_options.dart' show ProcessedOptions;
 
+import 'package:front_end/src/fasta/incremental_compiler.dart'
+    show IncrementalCompiler;
+
+import 'package:kernel/kernel.dart' show Component;
+
 class InitializedCompilerState {
   final CompilerOptions options;
   final ProcessedOptions processedOpts;
+  final Map<Uri, WorkerInputComponent> workerInputCache;
+  final IncrementalCompiler incrementalCompiler;
 
-  InitializedCompilerState(this.options, this.processedOpts);
+  InitializedCompilerState(this.options, this.processedOpts,
+      {this.workerInputCache, this.incrementalCompiler});
+}
+
+/// A cached [Component] for a summary input file.
+///
+/// Tracks the originally marked "external" libs so that they can be restored,
+/// since the kernel generator mutates the state.
+class WorkerInputComponent {
+  final List<int> digest;
+  final Component component;
+  final Set<Uri> externalLibs;
+  WorkerInputComponent(this.digest, this.component)
+      : externalLibs = component.libraries
+            .where((lib) => lib.isExternal)
+            .map((lib) => lib.importUri)
+            .toSet();
+}
+
+bool digestsEqual(List<int> a, List<int> b) {
+  if (a == null || b == null) return false;
+  if (a.length != b.length) return false;
+  for (int i = 0; i < a.length; i++) {
+    if (a[i] != b[i]) return false;
+  }
+  return true;
 }
diff --git a/pkg/front_end/lib/src/api_unstable/dart2js.dart b/pkg/front_end/lib/src/api_unstable/dart2js.dart
index d716845..8ec174d 100644
--- a/pkg/front_end/lib/src/api_unstable/dart2js.dart
+++ b/pkg/front_end/lib/src/api_unstable/dart2js.dart
@@ -44,7 +44,8 @@
         getMessageRelatedInformation,
         getMessageUri;
 
-export '../api_prototype/experimental_flags.dart' show ExperimentalFlag;
+export '../api_prototype/experimental_flags.dart'
+    show defaultExperimentalFlags, ExperimentalFlag;
 
 export '../api_prototype/file_system.dart'
     show FileSystem, FileSystemEntity, FileSystemException;
@@ -56,6 +57,8 @@
 export '../compute_platform_binaries_location.dart'
     show computePlatformBinariesLocation;
 
+export '../fasta/fasta_codes.dart' show LocatedMessage;
+
 export '../fasta/kernel/redirecting_factory_body.dart'
     show RedirectingFactoryBody;
 
@@ -107,9 +110,12 @@
     InitializedCompilerState oldState,
     Target target,
     Uri librariesSpecificationUri,
-    Uri sdkPlatformUri,
+    List<Uri> linkedDependencies,
     Uri packagesFileUri,
-    {Map<ExperimentalFlag, bool> experimentalFlags}) {
+    {List<Uri> dependencies,
+    Map<ExperimentalFlag, bool> experimentalFlags,
+    bool verify: false,
+    bool enableAsserts: false}) {
   bool mapEqual(Map<ExperimentalFlag, bool> a, Map<ExperimentalFlag, bool> b) {
     if (a == null || b == null) return a == b;
     if (a.length != b.length) return false;
@@ -119,10 +125,20 @@
     return true;
   }
 
+  bool listEqual(List<Uri> a, List<Uri> b) {
+    if (a.length != b.length) return false;
+    for (int i = 0; i < a.length; ++i) {
+      if (a[i] != b[i]) return false;
+    }
+    return true;
+  }
+
+  linkedDependencies.sort((a, b) => a.toString().compareTo(b.toString()));
+
   if (oldState != null &&
       oldState.options.packagesFileUri == packagesFileUri &&
       oldState.options.librariesSpecificationUri == librariesSpecificationUri &&
-      oldState.options.linkedDependencies[0] == sdkPlatformUri &&
+      listEqual(oldState.options.linkedDependencies, linkedDependencies) &&
       mapEqual(oldState.options.experimentalFlags, experimentalFlags)) {
     return oldState;
   }
@@ -130,10 +146,12 @@
   CompilerOptions options = new CompilerOptions()
     ..target = target
     ..legacyMode = target.legacyMode
-    ..linkedDependencies = [sdkPlatformUri]
+    ..linkedDependencies = linkedDependencies
     ..librariesSpecificationUri = librariesSpecificationUri
     ..packagesFileUri = packagesFileUri
-    ..experimentalFlags = experimentalFlags;
+    ..experimentalFlags = experimentalFlags
+    ..verify = verify
+    ..enableAsserts = enableAsserts;
 
   ProcessedOptions processedOpts = new ProcessedOptions(options: options);
 
diff --git a/pkg/front_end/lib/src/api_unstable/ddc.dart b/pkg/front_end/lib/src/api_unstable/ddc.dart
index 0a129d8..4542aa3 100644
--- a/pkg/front_end/lib/src/api_unstable/ddc.dart
+++ b/pkg/front_end/lib/src/api_unstable/ddc.dart
@@ -4,7 +4,7 @@
 
 import 'dart:async' show Future;
 
-import 'package:kernel/kernel.dart' show Component;
+import 'package:kernel/kernel.dart' show Component, CanonicalName;
 
 import 'package:kernel/target/targets.dart' show Target;
 
@@ -20,9 +20,14 @@
 
 import '../base/processed_options.dart' show ProcessedOptions;
 
+import '../fasta/compiler_context.dart' show CompilerContext;
+
+import '../fasta/incremental_compiler.dart' show IncrementalCompiler;
+
 import '../kernel_generator_impl.dart' show generateKernel;
 
-import 'compiler_state.dart' show InitializedCompilerState;
+import 'compiler_state.dart'
+    show InitializedCompilerState, WorkerInputComponent, digestsEqual;
 
 export '../api_prototype/compiler_options.dart' show CompilerOptions;
 
@@ -40,6 +45,12 @@
 export '../api_prototype/terminal_color_support.dart'
     show printDiagnosticMessage;
 
+export '../base/processed_options.dart' show ProcessedOptions;
+
+export '../fasta/compiler_context.dart' show CompilerContext;
+
+export '../fasta/incremental_compiler.dart' show IncrementalCompiler;
+
 export '../fasta/kernel/redirecting_factory_body.dart'
     show RedirectingFactoryBody;
 
@@ -48,7 +59,8 @@
 export '../fasta/type_inference/type_schema_environment.dart'
     show TypeSchemaEnvironment;
 
-export 'compiler_state.dart' show InitializedCompilerState;
+export 'compiler_state.dart'
+    show InitializedCompilerState, WorkerInputComponent, digestsEqual;
 
 class DdcResult {
   final Component component;
@@ -119,6 +131,119 @@
   return new InitializedCompilerState(options, processedOpts);
 }
 
+Future<InitializedCompilerState> initializeIncrementalCompiler(
+    InitializedCompilerState oldState,
+    List<Component> doneInputSummaries,
+    Uri sdkSummary,
+    Uri packagesFile,
+    Uri librariesSpecificationUri,
+    List<Uri> inputSummaries,
+    Target target,
+    {FileSystem fileSystem,
+    Map<ExperimentalFlag, bool> experiments}) async {
+  inputSummaries.sort((a, b) => a.toString().compareTo(b.toString()));
+
+  IncrementalCompiler incrementalCompiler;
+  WorkerInputComponent cachedSdkInput;
+  CompilerOptions options;
+  ProcessedOptions processedOpts;
+
+  Map<Uri, WorkerInputComponent> workerInputCache =
+      oldState?.workerInputCache ?? new Map<Uri, WorkerInputComponent>();
+  cachedSdkInput = workerInputCache[sdkSummary];
+
+  if (oldState == null ||
+      oldState.incrementalCompiler == null ||
+      cachedSdkInput == null) {
+    // No previous state.
+    options = new CompilerOptions()
+      ..sdkSummary = sdkSummary
+      ..packagesFileUri = packagesFile
+      ..inputSummaries = inputSummaries
+      ..librariesSpecificationUri = librariesSpecificationUri
+      ..target = target
+      ..fileSystem = fileSystem ?? StandardFileSystem.instance;
+    if (experiments != null) options.experimentalFlags = experiments;
+
+    processedOpts = new ProcessedOptions(options: options);
+
+    cachedSdkInput = new WorkerInputComponent(null /* not compared anyway */,
+        await processedOpts.loadSdkSummary(null));
+    workerInputCache[sdkSummary] = cachedSdkInput;
+    incrementalCompiler = new IncrementalCompiler.fromComponent(
+        new CompilerContext(processedOpts), cachedSdkInput.component);
+  } else {
+    options = oldState.options;
+    options.inputSummaries = inputSummaries;
+    processedOpts = oldState.processedOpts;
+
+    for (var lib in cachedSdkInput.component.libraries) {
+      lib.isExternal = false;
+    }
+    for (WorkerInputComponent cachedInput in workerInputCache.values) {
+      cachedInput.component.adoptChildren();
+    }
+    cachedSdkInput.component.unbindCanonicalNames();
+    cachedSdkInput.component.computeCanonicalNames();
+
+    // Reuse the incremental compiler, but reset as needed.
+    incrementalCompiler = oldState.incrementalCompiler;
+    incrementalCompiler.invalidateAllSources();
+    options.packagesFileUri = packagesFile;
+    options.fileSystem = fileSystem;
+  }
+  InitializedCompilerState compilerState = new InitializedCompilerState(
+      options, processedOpts,
+      workerInputCache: workerInputCache,
+      incrementalCompiler: incrementalCompiler);
+
+  CanonicalName nameRoot = cachedSdkInput.component.root;
+  List<int> loadFromDillIndexes = new List<int>();
+
+  // Notice that the ordering of the input summaries matter, so we need to
+  // keep them in order.
+  if (doneInputSummaries.length != inputSummaries.length) {
+    throw new ArgumentError("Invalid length.");
+  }
+  for (int i = 0; i < inputSummaries.length; i++) {
+    Uri inputSummary = inputSummaries[i];
+    WorkerInputComponent cachedInput = workerInputCache[inputSummary];
+    if (cachedInput == null ||
+        cachedInput.component.root != nameRoot ||
+        !digestsEqual(await fileSystem.entityForUri(inputSummary).readAsBytes(),
+            cachedInput.digest)) {
+      loadFromDillIndexes.add(i);
+    } else {
+      // Need to reset cached components so they are usable again.
+      var component = cachedInput.component;
+      for (var lib in component.libraries) {
+        lib.isExternal = cachedInput.externalLibs.contains(lib.importUri);
+      }
+      // We don't unbind as the root was unbound already. We do have to
+      // compute the canonical names though, to rebind everything in the
+      // component.
+      component.computeCanonicalNames();
+      doneInputSummaries[i] = component;
+    }
+  }
+
+  for (int i = 0; i < loadFromDillIndexes.length; i++) {
+    int index = loadFromDillIndexes[i];
+    Uri summary = inputSummaries[index];
+    List<int> data = await fileSystem.entityForUri(summary).readAsBytes();
+    WorkerInputComponent cachedInput = WorkerInputComponent(
+        data, await compilerState.processedOpts.loadComponent(data, nameRoot));
+    workerInputCache[summary] = cachedInput;
+    doneInputSummaries[index] = cachedInput.component;
+  }
+
+  incrementalCompiler.setModulesToLoadOnNextComputeDelta(doneInputSummaries);
+
+  return new InitializedCompilerState(options, processedOpts,
+      workerInputCache: workerInputCache,
+      incrementalCompiler: incrementalCompiler);
+}
+
 Future<DdcResult> compile(InitializedCompilerState compilerState,
     List<Uri> inputs, DiagnosticMessageHandler diagnosticMessageHandler) async {
   CompilerOptions options = compilerState.options;
diff --git a/pkg/front_end/lib/src/api_unstable/vm.dart b/pkg/front_end/lib/src/api_unstable/vm.dart
index e7c5bcd..20ad6ad 100644
--- a/pkg/front_end/lib/src/api_unstable/vm.dart
+++ b/pkg/front_end/lib/src/api_unstable/vm.dart
@@ -34,25 +34,6 @@
 export '../fasta/fasta_codes.dart'
     show
         LocatedMessage,
-        Message,
-        messageConstEvalCircularity,
-        messageConstEvalContext,
-        messageConstEvalFailedAssertion,
-        noLength,
-        templateConstEvalFreeTypeParameter,
-        templateConstEvalDeferredLibrary,
-        templateConstEvalDuplicateKey,
-        templateConstEvalFailedAssertionWithMessage,
-        templateConstEvalInvalidBinaryOperandType,
-        templateConstEvalInvalidMethodInvocation,
-        templateConstEvalInvalidStaticInvocation,
-        templateConstEvalInvalidStringInterpolationOperand,
-        templateConstEvalInvalidSymbolName,
-        templateConstEvalInvalidType,
-        templateConstEvalNegativeShift,
-        templateConstEvalNonConstantLiteral,
-        templateConstEvalNonConstantVariableGet,
-        templateConstEvalZeroDivisor,
         templateFfiFieldAnnotation,
         templateFfiStructAnnotation,
         templateFfiNotStatic,
@@ -65,4 +46,6 @@
 
 export '../fasta/kernel/utils.dart' show serializeComponent, serializeProcedure;
 
+export '../fasta/resolve_input_uri.dart' show resolveInputUri;
+
 export '../fasta/severity.dart' show Severity;
diff --git a/pkg/front_end/lib/src/base/errors.dart b/pkg/front_end/lib/src/base/errors.dart
index 1f01f89..2fbd323 100644
--- a/pkg/front_end/lib/src/base/errors.dart
+++ b/pkg/front_end/lib/src/base/errors.dart
@@ -1,4 +1,4 @@
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
+// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
@@ -26,6 +26,12 @@
   final String correction;
 
   /**
+   * The URL of a page containing documentation for errors with this code, or
+   * `null` if there is no known documentation.
+   */
+  final String url;
+
+  /**
    * Whether this error is caused by an unresolved identifier.
    */
   final bool isUnresolvedIdentifier;
@@ -36,7 +42,7 @@
    * template. The correction associated with the error will be created from the
    * given [correction] template.
    */
-  const ErrorCode(this.name, this.message, [this.correction])
+  const ErrorCode(this.name, this.message, [this.correction, this.url])
       : isUnresolvedIdentifier = false;
 
   /**
@@ -46,7 +52,7 @@
    * given [correction] template.
    */
   const ErrorCode.temporary(this.name, this.message,
-      {this.correction, this.isUnresolvedIdentifier: false});
+      {this.correction, this.isUnresolvedIdentifier: false, this.url});
 
   /**
    * The severity of the error.
diff --git a/pkg/front_end/lib/src/base/instrumentation.dart b/pkg/front_end/lib/src/base/instrumentation.dart
index ab62b21..5c16ee9 100644
--- a/pkg/front_end/lib/src/base/instrumentation.dart
+++ b/pkg/front_end/lib/src/base/instrumentation.dart
@@ -2,9 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:kernel/ast.dart';
-
-import '../fasta/problems.dart';
+import 'package:kernel/ast.dart' show DartType, Member;
 
 /// Convert '→' to '->' because '→' doesn't show up in some terminals.
 /// Remove prefixes that are used very often in tests.
@@ -36,94 +34,6 @@
   bool matches(String description) => description == toString();
 }
 
-/// Instance of [InstrumentationValue] describing a forwarding stub.
-class InstrumentationValueForForwardingStub extends InstrumentationValue {
-  final Procedure procedure;
-
-  InstrumentationValueForForwardingStub(this.procedure);
-
-  @override
-  String toString() {
-    var buffer = new StringBuffer();
-    void writeParameter(VariableDeclaration parameter) {
-      var covariances = <String>[];
-      if (parameter.isGenericCovariantImpl) {
-        covariances.add('genericImpl');
-      }
-      if (parameter.isCovariant) {
-        covariances.add('explicit');
-      }
-      buffer.write('covariance=(${covariances.join(', ')}) ');
-      buffer.write(parameter.type);
-      buffer.write(' ');
-      buffer.write(parameter.name);
-    }
-
-    if (procedure.isAbstract) {
-      buffer.write('abstract ');
-    }
-    var function = procedure.function;
-    buffer.write(function.returnType);
-    buffer.write(' ');
-    switch (procedure.kind) {
-      case ProcedureKind.Operator:
-        buffer.write('operator');
-        break;
-      case ProcedureKind.Method:
-        break;
-      case ProcedureKind.Setter:
-        buffer.write('set ');
-        break;
-      case ProcedureKind.Getter:
-        buffer.write('get ');
-        break;
-      default:
-        unhandled('${procedure.kind}', 'InstrumentationValueForForwardingStub',
-            -1, null);
-        break;
-    }
-    buffer.write(procedure.name.name);
-    if (function.typeParameters.isNotEmpty) {
-      buffer.write('<');
-      for (int i = 0; i < function.typeParameters.length; i++) {
-        if (i != 0) buffer.write(', ');
-        var typeParameter = function.typeParameters[i];
-        var covariances = <String>[];
-        if (typeParameter.isGenericCovariantImpl) {
-          covariances.add('genericImpl');
-        }
-        buffer.write('covariance=(${covariances.join(', ')}) ');
-        buffer.write(typeParameter.name);
-        buffer.write(' extends ');
-        buffer.write(
-            new InstrumentationValueForType(typeParameter.bound).toString());
-      }
-      buffer.write('>');
-    }
-    buffer.write('(');
-    for (int i = 0; i < function.positionalParameters.length; i++) {
-      if (i != 0) buffer.write(', ');
-      if (i == function.requiredParameterCount) buffer.write('[');
-      writeParameter(function.positionalParameters[i]);
-    }
-    if (function.requiredParameterCount <
-        function.positionalParameters.length) {
-      buffer.write(']');
-    }
-    if (function.namedParameters.isNotEmpty) {
-      if (function.positionalParameters.length != 0) buffer.write(', ');
-      buffer.write('{');
-      for (int i = 0; i < function.namedParameters.length; i++) {
-        if (i != 0) buffer.write(', ');
-        writeParameter(function.namedParameters[i]);
-      }
-      buffer.write('}');
-    }
-    buffer.write(')');
-    return _shortenInstrumentationString(buffer.toString());
-  }
-}
-
 /// Instance of [InstrumentationValue] describing a [Member].
 class InstrumentationValueForMember extends InstrumentationValue {
   final Member member;
diff --git a/pkg/front_end/lib/src/base/processed_options.dart b/pkg/front_end/lib/src/base/processed_options.dart
index 82804be..9cfba14 100644
--- a/pkg/front_end/lib/src/base/processed_options.dart
+++ b/pkg/front_end/lib/src/base/processed_options.dart
@@ -24,7 +24,8 @@
 import '../api_prototype/compiler_options.dart'
     show CompilerOptions, DiagnosticMessage;
 
-import '../api_prototype/experimental_flags.dart' show ExperimentalFlag;
+import '../api_prototype/experimental_flags.dart'
+    show defaultExperimentalFlags, ExperimentalFlag;
 
 import '../api_prototype/file_system.dart'
     show FileSystem, FileSystemEntity, FileSystemException;
@@ -155,6 +156,10 @@
 
   Ticker ticker;
 
+  Uri get packagesUriRaw => _raw.packagesFileUri;
+
+  bool get enableAsserts => _raw.enableAsserts;
+
   bool get verbose => _raw.verbose;
 
   bool get verify => _raw.verify;
@@ -179,6 +184,8 @@
 
   final Map<String, String> environmentDefines;
 
+  bool get errorOnUnevaluatedConstant => _raw.errorOnUnevaluatedConstant;
+
   /// Initializes a [ProcessedOptions] object wrapping the given [rawOptions].
   ProcessedOptions({CompilerOptions options, List<Uri> inputs, this.output})
       : this._raw = options ?? new CompilerOptions(),
@@ -306,9 +313,11 @@
       _raw.target ?? new NoneTarget(new TargetFlags(legacyMode: legacyMode));
 
   bool isExperimentEnabled(ExperimentalFlag flag) {
+    assert(defaultExperimentalFlags.containsKey(flag),
+        "No default value for $flag.");
     // TODO(askesc): Determine default flag value from specification file.
     if (flag == ExperimentalFlag.setLiterals) return true;
-    return _raw.experimentalFlags[flag] ?? false;
+    return _raw.experimentalFlags[flag] ?? defaultExperimentalFlags[flag];
   }
 
   /// Get an outline component that summarizes the SDK, if any.
diff --git a/pkg/front_end/lib/src/compute_platform_binaries_location.dart b/pkg/front_end/lib/src/compute_platform_binaries_location.dart
index 9ac1f54..ad98f28 100644
--- a/pkg/front_end/lib/src/compute_platform_binaries_location.dart
+++ b/pkg/front_end/lib/src/compute_platform_binaries_location.dart
@@ -69,8 +69,11 @@
           Map<Uri, Source> uriToSource = CompilerContext.current.uriToSource;
           Source source = uriToSource[uri];
           if (source.source.isEmpty) {
-            uriToSource[uri] = new Source(source.lineStarts,
-                new File.fromUri(candidate).readAsBytesSync());
+            uriToSource[uri] = new Source(
+                source.lineStarts,
+                new File.fromUri(candidate).readAsBytesSync(),
+                source.importUri,
+                source.fileUri);
           }
         }
         return candidate;
diff --git a/pkg/front_end/lib/src/fasta/builder/class_builder.dart b/pkg/front_end/lib/src/fasta/builder/class_builder.dart
index 3c4f54a..05441e7 100644
--- a/pkg/front_end/lib/src/fasta/builder/class_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/class_builder.dart
@@ -24,7 +24,7 @@
 
 abstract class ClassBuilder<T extends TypeBuilder, R>
     extends TypeDeclarationBuilder<T, R> {
-  final List<TypeVariableBuilder> typeVariables;
+  List<TypeVariableBuilder> typeVariables;
 
   T supertype;
 
diff --git a/pkg/front_end/lib/src/fasta/builder/declaration.dart b/pkg/front_end/lib/src/fasta/builder/declaration.dart
index 1584102..4b3d601 100644
--- a/pkg/front_end/lib/src/fasta/builder/declaration.dart
+++ b/pkg/front_end/lib/src/fasta/builder/declaration.dart
@@ -64,6 +64,10 @@
 
   bool get isNamedMixinApplication => false;
 
+  bool get isAnonymousMixinApplication {
+    return isMixinApplication && !isNamedMixinApplication;
+  }
+
   /// Applies [patch] to this declaration.
   void applyPatch(Declaration patch) {
     unsupported("${runtimeType}.applyPatch", charOffset, fileUri);
@@ -79,6 +83,4 @@
   /// Resolve constructors (lookup names in scope) recorded in this builder and
   /// return the number of constructors resolved.
   int resolveConstructors(covariant Declaration parent) => 0;
-
-  void instrumentTopLevelInference(covariant instrumentation) {}
 }
diff --git a/pkg/front_end/lib/src/fasta/builder/modifier_builder.dart b/pkg/front_end/lib/src/fasta/builder/modifier_builder.dart
index 0556c747..8ed8b22 100644
--- a/pkg/front_end/lib/src/fasta/builder/modifier_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/modifier_builder.dart
@@ -11,6 +11,7 @@
         covariantMask,
         externalMask,
         finalMask,
+        hasConstConstructorMask,
         hasInitializerMask,
         initializingFormalMask,
         namedMixinApplicationMask,
@@ -50,6 +51,8 @@
 
   bool get isInitializingFormal => (modifiers & initializingFormalMask) != 0;
 
+  bool get hasConstConstructor => (modifiers & hasConstConstructorMask) != 0;
+
   bool get isClassMember => false;
 
   String get name;
diff --git a/pkg/front_end/lib/src/fasta/builder_graph.dart b/pkg/front_end/lib/src/fasta/builder_graph.dart
index 7f54bc2..9aa4b18 100644
--- a/pkg/front_end/lib/src/fasta/builder_graph.dart
+++ b/pkg/front_end/lib/src/fasta/builder_graph.dart
@@ -32,9 +32,12 @@
     }
     if (library is SourceLibraryBuilder) {
       for (Import import in library.imports) {
-        Uri uri = import.imported.uri;
-        if (builders.containsKey(uri)) {
-          yield uri;
+        // 'imported' can be null for fake imports, such as dart-ext:.
+        if (import.imported != null) {
+          Uri uri = import.imported.uri;
+          if (builders.containsKey(uri)) {
+            yield uri;
+          }
         }
       }
       for (Export export in library.exports) {
diff --git a/pkg/front_end/lib/src/fasta/constant_context.dart b/pkg/front_end/lib/src/fasta/constant_context.dart
index a4d646a..77e4127 100644
--- a/pkg/front_end/lib/src/fasta/constant_context.dart
+++ b/pkg/front_end/lib/src/fasta/constant_context.dart
@@ -23,4 +23,9 @@
   /// This means that `Object()` and `[]` are equivalent to `const Object()` and
   /// `const []` respectively. `new Object()` is a compile-time error.
   inferred,
+
+  /// In a context where constant expressions are required, but `const` is not
+  /// inferred. This includes default values of optional parameters and
+  /// initializing expressions on fields in classes with a `const` constructor.
+  required,
 }
diff --git a/pkg/front_end/lib/src/fasta/dill/dill_class_builder.dart b/pkg/front_end/lib/src/fasta/dill/dill_class_builder.dart
index fd0a4d2..cb12b88 100644
--- a/pkg/front_end/lib/src/fasta/dill/dill_class_builder.dart
+++ b/pkg/front_end/lib/src/fasta/dill/dill_class_builder.dart
@@ -4,7 +4,8 @@
 
 library fasta.dill_class_builder;
 
-import 'package:kernel/ast.dart' show Class, DartType, Member, Supertype;
+import 'package:kernel/ast.dart'
+    show Class, DartType, Member, Supertype, TypeParameter;
 
 import '../problems.dart' show unimplemented;
 
@@ -12,9 +13,11 @@
     show
         KernelClassBuilder,
         KernelTypeBuilder,
+        KernelTypeVariableBuilder,
         LibraryBuilder,
         MemberBuilder,
-        Scope;
+        Scope,
+        TypeVariableBuilder;
 
 import '../modifier.dart' show abstractMask;
 
@@ -41,6 +44,15 @@
             parent,
             cls.fileOffset);
 
+  List<TypeVariableBuilder> get typeVariables {
+    List<TypeVariableBuilder> typeVariables = super.typeVariables;
+    if (typeVariables == null && cls.typeParameters.isNotEmpty) {
+      typeVariables = super.typeVariables =
+          computeTypeVariableBuilders(library, cls.typeParameters);
+    }
+    return typeVariables;
+  }
+
   Uri get fileUri => cls.fileUri;
 
   KernelTypeBuilder get supertype {
@@ -133,3 +145,15 @@
       ? null
       : library.loader.computeTypeBuilder(supertype.asInterfaceType);
 }
+
+List<TypeVariableBuilder> computeTypeVariableBuilders(
+    DillLibraryBuilder library, List<TypeParameter> typeParameters) {
+  if (typeParameters == null || typeParameters.length == 0) return null;
+  List<TypeVariableBuilder> result =
+      new List.filled(typeParameters.length, null);
+  for (int i = 0; i < result.length; i++) {
+    result[i] =
+        new KernelTypeVariableBuilder.fromKernel(typeParameters[i], library);
+  }
+  return result;
+}
diff --git a/pkg/front_end/lib/src/fasta/dill/dill_library_builder.dart b/pkg/front_end/lib/src/fasta/dill/dill_library_builder.dart
index 610dcea..c76a2bc 100644
--- a/pkg/front_end/lib/src/fasta/dill/dill_library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/dill/dill_library_builder.dart
@@ -53,7 +53,7 @@
 class DillLibraryBuilder extends LibraryBuilder<KernelTypeBuilder, Library> {
   final Library library;
 
-  final DillLoader loader;
+  DillLoader loader;
 
   /// Exports that can't be serialized.
   ///
diff --git a/pkg/front_end/lib/src/fasta/dill/dill_target.dart b/pkg/front_end/lib/src/fasta/dill/dill_target.dart
index 4771d2c..59386d9 100644
--- a/pkg/front_end/lib/src/fasta/dill/dill_target.dart
+++ b/pkg/front_end/lib/src/fasta/dill/dill_target.dart
@@ -39,7 +39,7 @@
 
   @override
   void addSourceInformation(
-      Uri uri, List<int> lineStarts, List<int> sourceCode) {
+      Uri importUri, Uri fileUri, List<int> lineStarts, List<int> sourceCode) {
     unsupported("addSourceInformation", -1, null);
   }
 
diff --git a/pkg/front_end/lib/src/fasta/fasta_codes_generated.dart b/pkg/front_end/lib/src/fasta/fasta_codes_generated.dart
index e57910c..668da04 100644
--- a/pkg/front_end/lib/src/fasta/fasta_codes_generated.dart
+++ b/pkg/front_end/lib/src/fasta/fasta_codes_generated.dart
@@ -520,6 +520,28 @@
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeCantDisambiguateAmbiguousInformation =
+    messageCantDisambiguateAmbiguousInformation;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageCantDisambiguateAmbiguousInformation = const MessageCode(
+    "CantDisambiguateAmbiguousInformation",
+    message:
+        r"""Both Iterable and Map spread elements encountered in ambiguous literal.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeCantDisambiguateNotEnoughInformation =
+    messageCantDisambiguateNotEnoughInformation;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageCantDisambiguateNotEnoughInformation = const MessageCode(
+    "CantDisambiguateNotEnoughInformation",
+    message:
+        r"""Not enough type information to disambiguate between literal set and literal map.""",
+    tip:
+        r"""Try providing type arguments for the literal explicitly to disambiguate it.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Code<Null> codeCantInferPackagesFromManyInputs =
     messageCantInferPackagesFromManyInputs;
 
@@ -568,30 +590,31 @@
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Template<Message Function(String string)>
+const Template<Message Function(String name)>
     templateCantInferTypeDueToInconsistentOverrides =
-    const Template<Message Function(String string)>(
+    const Template<Message Function(String name)>(
         messageTemplate:
-            r"""Can't infer the type of '#string': overridden members must all have the same type.""",
-        tipTemplate: r"""Specify the type explicitly.""",
+            r"""Can't infer a type for '#name' as some of the inherited members have different types.""",
+        tipTemplate: r"""Try adding an explicit type.""",
         withArguments: _withArgumentsCantInferTypeDueToInconsistentOverrides);
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Message Function(String string)>
+const Code<Message Function(String name)>
     codeCantInferTypeDueToInconsistentOverrides =
-    const Code<Message Function(String string)>(
+    const Code<Message Function(String name)>(
         "CantInferTypeDueToInconsistentOverrides",
         templateCantInferTypeDueToInconsistentOverrides,
         analyzerCodes: <String>["INVALID_METHOD_OVERRIDE"]);
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-Message _withArgumentsCantInferTypeDueToInconsistentOverrides(String string) {
-  if (string.isEmpty) throw 'No string provided';
+Message _withArgumentsCantInferTypeDueToInconsistentOverrides(String name) {
+  if (name.isEmpty) throw 'No name provided';
+  name = demangleMixinApplicationName(name);
   return new Message(codeCantInferTypeDueToInconsistentOverrides,
       message:
-          """Can't infer the type of '${string}': overridden members must all have the same type.""",
-      tip: """Specify the type explicitly.""",
-      arguments: {'string': string});
+          """Can't infer a type for '${name}' as some of the inherited members have different types.""",
+      tip: """Try adding an explicit type.""",
+      arguments: {'name': name});
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -616,6 +639,30 @@
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<Message Function(Token token)>
+    templateCantUseControlFlowOrSpreadAsConstant =
+    const Template<Message Function(Token token)>(
+        messageTemplate:
+            r"""'#lexeme' is not supported in constant expressions.""",
+        withArguments: _withArgumentsCantUseControlFlowOrSpreadAsConstant);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(Token token)>
+    codeCantUseControlFlowOrSpreadAsConstant =
+    const Code<Message Function(Token token)>(
+        "CantUseControlFlowOrSpreadAsConstant",
+        templateCantUseControlFlowOrSpreadAsConstant,
+        analyzerCodes: <String>["NOT_CONSTANT_EXPRESSION"]);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsCantUseControlFlowOrSpreadAsConstant(Token token) {
+  String lexeme = token.lexeme;
+  return new Message(codeCantUseControlFlowOrSpreadAsConstant,
+      message: """'${lexeme}' is not supported in constant expressions.""",
+      arguments: {'token': token});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Template<
     Message Function(
         Token
@@ -873,17 +920,6 @@
     message: r"""This is the type variable.""");
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Null> codeConstAfterFactory = messageConstAfterFactory;
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const MessageCode messageConstAfterFactory = const MessageCode(
-    "ConstAfterFactory",
-    index: 56,
-    message:
-        r"""The modifier 'const' should be before the modifier 'factory'.""",
-    tip: r"""Try re-ordering the modifiers.""");
-
-// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Code<Null> codeConstAndCovariant = messageConstAndCovariant;
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -1026,6 +1062,34 @@
 const Template<
     Message Function(
         Constant
+            _constant)> templateConstEvalDuplicateElement = const Template<
+        Message Function(Constant _constant)>(
+    messageTemplate:
+        r"""The element '#constant' conflicts with another existing element in the set.""",
+    withArguments: _withArgumentsConstEvalDuplicateElement);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(Constant _constant)> codeConstEvalDuplicateElement =
+    const Code<Message Function(Constant _constant)>(
+        "ConstEvalDuplicateElement", templateConstEvalDuplicateElement,
+        analyzerCodes: <String>["EQUAL_ELEMENTS_IN_CONST_SET"]);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsConstEvalDuplicateElement(Constant _constant) {
+  TypeLabeler labeler = new TypeLabeler();
+  List<Object> constantParts = labeler.labelConstant(_constant);
+  String constant = constantParts.join();
+  return new Message(codeConstEvalDuplicateElement,
+      message:
+          """The element '${constant}' conflicts with another existing element in the set.""" +
+              labeler.originMessages,
+      arguments: {'constant': _constant});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+    Message Function(
+        Constant
             _constant)> templateConstEvalDuplicateKey = const Template<
         Message Function(Constant _constant)>(
     messageTemplate:
@@ -1036,7 +1100,7 @@
 const Code<Message Function(Constant _constant)> codeConstEvalDuplicateKey =
     const Code<Message Function(Constant _constant)>(
         "ConstEvalDuplicateKey", templateConstEvalDuplicateKey,
-        analyzerCodes: <String>["EQUAL_KEYS_IN_MAP"]);
+        analyzerCodes: <String>["EQUAL_KEYS_IN_CONST_MAP"]);
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 Message _withArgumentsConstEvalDuplicateKey(Constant _constant) {
@@ -1051,6 +1115,36 @@
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+    Message Function(
+        Constant
+            _constant)> templateConstEvalElementImplementsEqual = const Template<
+        Message Function(Constant _constant)>(
+    messageTemplate:
+        r"""The element '#constant' does not have a primitive operator '=='.""",
+    withArguments: _withArgumentsConstEvalElementImplementsEqual);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(Constant _constant)>
+    codeConstEvalElementImplementsEqual =
+    const Code<Message Function(Constant _constant)>(
+        "ConstEvalElementImplementsEqual",
+        templateConstEvalElementImplementsEqual,
+        analyzerCodes: <String>["CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS"]);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsConstEvalElementImplementsEqual(Constant _constant) {
+  TypeLabeler labeler = new TypeLabeler();
+  List<Object> constantParts = labeler.labelConstant(_constant);
+  String constant = constantParts.join();
+  return new Message(codeConstEvalElementImplementsEqual,
+      message:
+          """The element '${constant}' does not have a primitive operator '=='.""" +
+              labeler.originMessages,
+      arguments: {'constant': _constant});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Code<Null> codeConstEvalFailedAssertion = messageConstEvalFailedAssertion;
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -1161,6 +1255,40 @@
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Template<
     Message Function(
+        Constant _constant,
+        DartType
+            _type)> templateConstEvalInvalidEqualsOperandType = const Template<
+        Message Function(Constant _constant, DartType _type)>(
+    messageTemplate:
+        r"""Binary operator '==' requires receiver constant '#constant' of type 'Null', 'bool', 'int', 'double', or 'String', but was of type '#type'.""",
+    withArguments: _withArgumentsConstEvalInvalidEqualsOperandType);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(Constant _constant, DartType _type)>
+    codeConstEvalInvalidEqualsOperandType =
+    const Code<Message Function(Constant _constant, DartType _type)>(
+  "ConstEvalInvalidEqualsOperandType",
+  templateConstEvalInvalidEqualsOperandType,
+);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsConstEvalInvalidEqualsOperandType(
+    Constant _constant, DartType _type) {
+  TypeLabeler labeler = new TypeLabeler();
+  List<Object> constantParts = labeler.labelConstant(_constant);
+  List<Object> typeParts = labeler.labelType(_type);
+  String constant = constantParts.join();
+  String type = typeParts.join();
+  return new Message(codeConstEvalInvalidEqualsOperandType,
+      message:
+          """Binary operator '==' requires receiver constant '${constant}' of type 'Null', 'bool', 'int', 'double', or 'String', but was of type '${type}'.""" +
+              labeler.originMessages,
+      arguments: {'constant': _constant, 'type': _type});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+    Message Function(
         String string,
         Constant
             _constant)> templateConstEvalInvalidMethodInvocation = const Template<
@@ -1194,6 +1322,38 @@
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Template<
     Message Function(
+        String string,
+        Constant
+            _constant)> templateConstEvalInvalidPropertyGet = const Template<
+        Message Function(String string, Constant _constant)>(
+    messageTemplate:
+        r"""The property '#string' can't be accessed on '#constant' within a const context.""",
+    withArguments: _withArgumentsConstEvalInvalidPropertyGet);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(String string, Constant _constant)>
+    codeConstEvalInvalidPropertyGet =
+    const Code<Message Function(String string, Constant _constant)>(
+        "ConstEvalInvalidPropertyGet", templateConstEvalInvalidPropertyGet,
+        analyzerCodes: <String>["CONST_EVAL_THROWS_EXCEPTION"]);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsConstEvalInvalidPropertyGet(
+    String string, Constant _constant) {
+  if (string.isEmpty) throw 'No string provided';
+  TypeLabeler labeler = new TypeLabeler();
+  List<Object> constantParts = labeler.labelConstant(_constant);
+  String constant = constantParts.join();
+  return new Message(codeConstEvalInvalidPropertyGet,
+      message:
+          """The property '${string}' can't be accessed on '${constant}' within a const context.""" +
+              labeler.originMessages,
+      arguments: {'string': string, 'constant': _constant});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+    Message Function(
         String
             name)> templateConstEvalInvalidStaticInvocation = const Template<
         Message Function(String name)>(
@@ -1316,6 +1476,65 @@
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeConstEvalIterationInConstList =
+    messageConstEvalIterationInConstList;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageConstEvalIterationInConstList = const MessageCode(
+    "ConstEvalIterationInConstList",
+    analyzerCodes: <String>["NON_CONSTANT_LIST_ELEMENT"],
+    message: r"""Iteration can't be used in a constant list.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeConstEvalIterationInConstMap =
+    messageConstEvalIterationInConstMap;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageConstEvalIterationInConstMap = const MessageCode(
+    "ConstEvalIterationInConstMap",
+    analyzerCodes: <String>["NON_CONSTANT_MAP_ELEMENT"],
+    message: r"""Iteration can't be used in a constant map.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeConstEvalIterationInConstSet =
+    messageConstEvalIterationInConstSet;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageConstEvalIterationInConstSet = const MessageCode(
+    "ConstEvalIterationInConstSet",
+    analyzerCodes: <String>["NON_CONSTANT_SET_ELEMENT"],
+    message: r"""Iteration can't be used in a constant set.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<Message Function(Constant _constant)>
+    templateConstEvalKeyImplementsEqual =
+    const Template<Message Function(Constant _constant)>(
+        messageTemplate:
+            r"""The key '#constant' does not have a primitive operator '=='.""",
+        withArguments: _withArgumentsConstEvalKeyImplementsEqual);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(Constant _constant)>
+    codeConstEvalKeyImplementsEqual =
+    const Code<Message Function(Constant _constant)>(
+        "ConstEvalKeyImplementsEqual", templateConstEvalKeyImplementsEqual,
+        analyzerCodes: <String>[
+      "CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS"
+    ]);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsConstEvalKeyImplementsEqual(Constant _constant) {
+  TypeLabeler labeler = new TypeLabeler();
+  List<Object> constantParts = labeler.labelConstant(_constant);
+  String constant = constantParts.join();
+  return new Message(codeConstEvalKeyImplementsEqual,
+      message:
+          """The key '${constant}' does not have a primitive operator '=='.""" +
+              labeler.originMessages,
+      arguments: {'constant': _constant});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Template<
     Message Function(
         String string,
@@ -1400,6 +1619,43 @@
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeConstEvalNotListOrSetInSpread =
+    messageConstEvalNotListOrSetInSpread;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageConstEvalNotListOrSetInSpread = const MessageCode(
+    "ConstEvalNotListOrSetInSpread",
+    analyzerCodes: <String>["CONST_SPREAD_EXPECTED_LIST_OR_SET"],
+    message:
+        r"""Only lists and sets can be used in spreads in constant lists and sets.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeConstEvalNotMapInSpread = messageConstEvalNotMapInSpread;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageConstEvalNotMapInSpread = const MessageCode(
+    "ConstEvalNotMapInSpread",
+    analyzerCodes: <String>["CONST_SPREAD_EXPECTED_MAP"],
+    message: r"""Only maps can be used in spreads in constant maps.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeConstEvalNullValue = messageConstEvalNullValue;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageConstEvalNullValue = const MessageCode(
+    "ConstEvalNullValue",
+    analyzerCodes: <String>["CONST_EVAL_THROWS_EXCEPTION"],
+    message: r"""Null value during constant evaluation.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeConstEvalUnevaluated = messageConstEvalUnevaluated;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageConstEvalUnevaluated = const MessageCode(
+    "ConstEvalUnevaluated",
+    message: r"""Could not evaluate constant expression.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Template<
     Message Function(
         String string,
@@ -2397,7 +2653,7 @@
 const Template<Message Function(Token token)> templateDuplicatedModifier =
     const Template<Message Function(Token token)>(
         messageTemplate: r"""The modifier '#lexeme' was already specified.""",
-        tipTemplate: r"""Try removing all but one occurance of the modifier.""",
+        tipTemplate: r"""Try removing all but one occurence of the modifier.""",
         withArguments: _withArgumentsDuplicatedModifier);
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -2411,7 +2667,7 @@
   String lexeme = token.lexeme;
   return new Message(codeDuplicatedModifier,
       message: """The modifier '${lexeme}' was already specified.""",
-      tip: """Try removing all but one occurance of the modifier.""",
+      tip: """Try removing all but one occurence of the modifier.""",
       arguments: {'token': token});
 }
 
@@ -2781,6 +3037,15 @@
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeExpectedElseOrComma = messageExpectedElseOrComma;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageExpectedElseOrComma = const MessageCode(
+    "ExpectedElseOrComma",
+    index: 94,
+    message: r"""Expected 'else' or comma.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Template<
     Message Function(Token token)> templateExpectedEnumBody = const Template<
         Message Function(Token token)>(
@@ -2975,12 +3240,40 @@
     const MessageCode("ExpectedUri", message: r"""Expected a URI.""");
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+    Message Function(
+        String
+            string)> templateExperimentNotEnabled = const Template<
+        Message Function(String string)>(
+    messageTemplate:
+        r"""This requires the '#string' experiment to be enabled.""",
+    tipTemplate:
+        r"""Try enabling this experiment by adding it to the command line when compiling and running.""",
+    withArguments: _withArgumentsExperimentNotEnabled);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(String string)> codeExperimentNotEnabled =
+    const Code<Message Function(String string)>(
+        "ExperimentNotEnabled", templateExperimentNotEnabled,
+        index: 93);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsExperimentNotEnabled(String string) {
+  if (string.isEmpty) throw 'No string provided';
+  return new Message(codeExperimentNotEnabled,
+      message: """This requires the '${string}' experiment to be enabled.""",
+      tip:
+          """Try enabling this experiment by adding it to the command line when compiling and running.""",
+      arguments: {'string': string});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Code<Null> codeExportAfterPart = messageExportAfterPart;
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const MessageCode messageExportAfterPart = const MessageCode("ExportAfterPart",
     index: 75,
-    message: r"""Export directives must preceed part directives.""",
+    message: r"""Export directives must precede part directives.""",
     tip: r"""Try moving the export directives before the part directives.""");
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -3269,7 +3562,10 @@
 
   -Dname
   -Dname=value
-    Ignored for now.
+    Define an environment variable in the compile-time environment.
+
+  --no-defines
+    Ignore all -D options and leave environment constants unevaluated.
 
   --
     Stop option parsing, the rest of the command line is assumed to be
@@ -3286,6 +3582,9 @@
   --target=dart2js|dart2js_server|dart_runner|flutter|flutter_runner|none|vm
     Specify the target configuration.
 
+  --enable-asserts
+    Check asserts in initializers during constant evaluation.
+
   --verify
     Check that the generated output is free of various problems. This is mostly
     useful for developers of this compiler or Kernel transformations.
@@ -4230,7 +4529,7 @@
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const MessageCode messageImportAfterPart = const MessageCode("ImportAfterPart",
     index: 10,
-    message: r"""Import directives must preceed part directives.""",
+    message: r"""Import directives must precede part directives.""",
     tip: r"""Try moving the import directives before the part directives.""");
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -6041,6 +6340,17 @@
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeInvalidSuperInInitializer =
+    messageInvalidSuperInInitializer;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageInvalidSuperInInitializer = const MessageCode(
+    "InvalidSuperInInitializer",
+    index: 95,
+    message:
+        r"""Can only use 'super' in an initializer for calling the superclass constructor (e.g. 'super()' or 'super.namedConstructor()')""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Code<Null> codeInvalidSyncModifier = messageInvalidSyncModifier;
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -6051,6 +6361,16 @@
     tip: r"""Try replacing 'sync' with 'sync*'.""");
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeInvalidThisInInitializer = messageInvalidThisInInitializer;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageInvalidThisInInitializer = const MessageCode(
+    "InvalidThisInInitializer",
+    index: 96,
+    message:
+        r"""Can only use 'this' in an initializer for field initialization (e.g. 'this.x = something') and constructor redirection (e.g. 'this()' or 'this.namedConstructor())""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Code<Null> codeInvalidUnicodeEscape = messageInvalidUnicodeEscape;
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -6487,7 +6807,7 @@
     "MissingOperatorKeyword",
     index: 31,
     message:
-        r"""Operator declarations must be preceeded by the keyword 'operator'.""",
+        r"""Operator declarations must be preceded by the keyword 'operator'.""",
     tip: r"""Try adding the keyword 'operator'.""");
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -6605,6 +6925,36 @@
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+    Message Function(
+        String string,
+        String
+            string2)> templateModifierOutOfOrder = const Template<
+        Message Function(String string, String string2)>(
+    messageTemplate:
+        r"""The modifier '#string' should be before the modifier '#string2'.""",
+    tipTemplate: r"""Try re-ordering the modifiers.""",
+    withArguments: _withArgumentsModifierOutOfOrder);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(String string, String string2)>
+    codeModifierOutOfOrder =
+    const Code<Message Function(String string, String string2)>(
+        "ModifierOutOfOrder", templateModifierOutOfOrder,
+        index: 56);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsModifierOutOfOrder(String string, String string2) {
+  if (string.isEmpty) throw 'No string provided';
+  if (string2.isEmpty) throw 'No string provided';
+  return new Message(codeModifierOutOfOrder,
+      message:
+          """The modifier '${string}' should be before the modifier '${string2}'.""",
+      tip: """Try re-ordering the modifiers.""",
+      arguments: {'string': string, 'string2': string2});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Code<Null> codeMoreThanOneSuperOrThisInitializer =
     messageMoreThanOneSuperOrThisInitializer;
 
@@ -6859,6 +7209,14 @@
     message: r"""Can only use type variables in instance methods.""");
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeNonNullAwareSpreadIsNull = messageNonNullAwareSpreadIsNull;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageNonNullAwareSpreadIsNull = const MessageCode(
+    "NonNullAwareSpreadIsNull",
+    message: r"""Can't spread a value with static type Null.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Code<Null> codeNonPartOfDirectiveInPart = messageNonPartOfDirectiveInPart;
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -6994,6 +7352,27 @@
     message: r"""Can't assign to this.""");
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<Message Function(Token token)> templateNotBinaryOperator =
+    const Template<Message Function(Token token)>(
+        messageTemplate: r"""'#lexeme' isn't a binary operator.""",
+        withArguments: _withArgumentsNotBinaryOperator);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(Token token)> codeNotBinaryOperator =
+    const Code<Message Function(Token token)>(
+  "NotBinaryOperator",
+  templateNotBinaryOperator,
+);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsNotBinaryOperator(Token token) {
+  String lexeme = token.lexeme;
+  return new Message(codeNotBinaryOperator,
+      message: """'${lexeme}' isn't a binary operator.""",
+      arguments: {'token': token});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Template<Message Function(String string)> templateNotConstantExpression =
     const Template<Message Function(String string)>(
         messageTemplate: r"""#string is not a constant expression.""",
@@ -7311,29 +7690,35 @@
         String name,
         String name2,
         DartType _type,
-        DartType
-            _type2)> templateOverrideTypeMismatchParameter = const Template<
-        Message Function(String name, String name2, DartType _type,
-            DartType _type2)>(
+        DartType _type2,
+        String
+            name3)> templateOverrideTypeMismatchParameter = const Template<
+        Message Function(
+            String name,
+            String name2,
+            DartType _type,
+            DartType _type2,
+            String
+                name3)>(
     messageTemplate:
-        r"""The parameter '#name' of the method '#name2' has type '#type', which does not match the corresponding type in the overridden method, '#type2'.""",
+        r"""The parameter '#name' of the method '#name2' has type '#type', which does not match the corresponding type, '#type2', in the overridden method, '#name3'.""",
     tipTemplate:
         r"""Change to a supertype of '#type2', or, for a covariant parameter, a subtype.""",
     withArguments: _withArgumentsOverrideTypeMismatchParameter);
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Code<
-        Message Function(
-            String name, String name2, DartType _type, DartType _type2)>
-    codeOverrideTypeMismatchParameter = const Code<
-            Message Function(
-                String name, String name2, DartType _type, DartType _type2)>(
+        Message Function(String name, String name2, DartType _type,
+            DartType _type2, String name3)> codeOverrideTypeMismatchParameter =
+    const Code<
+            Message Function(String name, String name2, DartType _type,
+                DartType _type2, String name3)>(
         "OverrideTypeMismatchParameter", templateOverrideTypeMismatchParameter,
         analyzerCodes: <String>["INVALID_METHOD_OVERRIDE"]);
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 Message _withArgumentsOverrideTypeMismatchParameter(
-    String name, String name2, DartType _type, DartType _type2) {
+    String name, String name2, DartType _type, DartType _type2, String name3) {
   if (name.isEmpty) throw 'No name provided';
   name = demangleMixinApplicationName(name);
   if (name2.isEmpty) throw 'No name provided';
@@ -7341,18 +7726,21 @@
   TypeLabeler labeler = new TypeLabeler();
   List<Object> typeParts = labeler.labelType(_type);
   List<Object> type2Parts = labeler.labelType(_type2);
+  if (name3.isEmpty) throw 'No name provided';
+  name3 = demangleMixinApplicationName(name3);
   String type = typeParts.join();
   String type2 = type2Parts.join();
   return new Message(codeOverrideTypeMismatchParameter,
       message:
-          """The parameter '${name}' of the method '${name2}' has type '${type}', which does not match the corresponding type in the overridden method, '${type2}'.""" +
+          """The parameter '${name}' of the method '${name2}' has type '${type}', which does not match the corresponding type, '${type2}', in the overridden method, '${name3}'.""" +
               labeler.originMessages,
       tip: """Change to a supertype of '${type2}', or, for a covariant parameter, a subtype.""",
       arguments: {
         'name': name,
         'name2': name2,
         'type': _type,
-        'type2': _type2
+        'type2': _type2,
+        'name3': name3
       });
 }
 
@@ -7361,38 +7749,50 @@
     Message Function(
         String name,
         DartType _type,
-        DartType
-            _type2)> templateOverrideTypeMismatchReturnType = const Template<
-        Message Function(String name, DartType _type, DartType _type2)>(
+        DartType _type2,
+        String
+            name2)> templateOverrideTypeMismatchReturnType = const Template<
+        Message Function(
+            String name, DartType _type, DartType _type2, String name2)>(
     messageTemplate:
-        r"""The return type of the method '#name' is '#type', which does not match the return type of the overridden method, '#type2'.""",
+        r"""The return type of the method '#name' is '#type', which does not match the return type, '#type2', of the overridden method, '#name2'.""",
     tipTemplate: r"""Change to a subtype of '#type2'.""",
     withArguments: _withArgumentsOverrideTypeMismatchReturnType);
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
-const Code<Message Function(String name, DartType _type, DartType _type2)>
-    codeOverrideTypeMismatchReturnType =
-    const Code<Message Function(String name, DartType _type, DartType _type2)>(
+const Code<
+        Message Function(
+            String name, DartType _type, DartType _type2, String name2)>
+    codeOverrideTypeMismatchReturnType = const Code<
+            Message Function(
+                String name, DartType _type, DartType _type2, String name2)>(
         "OverrideTypeMismatchReturnType",
         templateOverrideTypeMismatchReturnType,
         analyzerCodes: <String>["INVALID_METHOD_OVERRIDE"]);
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 Message _withArgumentsOverrideTypeMismatchReturnType(
-    String name, DartType _type, DartType _type2) {
+    String name, DartType _type, DartType _type2, String name2) {
   if (name.isEmpty) throw 'No name provided';
   name = demangleMixinApplicationName(name);
   TypeLabeler labeler = new TypeLabeler();
   List<Object> typeParts = labeler.labelType(_type);
   List<Object> type2Parts = labeler.labelType(_type2);
+  if (name2.isEmpty) throw 'No name provided';
+  name2 = demangleMixinApplicationName(name2);
   String type = typeParts.join();
   String type2 = type2Parts.join();
   return new Message(codeOverrideTypeMismatchReturnType,
       message:
-          """The return type of the method '${name}' is '${type}', which does not match the return type of the overridden method, '${type2}'.""" +
+          """The return type of the method '${name}' is '${type}', which does not match the return type, '${type2}', of the overridden method, '${name2}'.""" +
               labeler.originMessages,
       tip: """Change to a subtype of '${type2}'.""",
-      arguments: {'name': name, 'type': _type, 'type2': _type2});
+      arguments: {
+        'name': name,
+        'type': _type,
+        'type2': _type2,
+        'name2': name2
+      });
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -8194,6 +8594,178 @@
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeSpreadElement = messageSpreadElement;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageSpreadElement = const MessageCode("SpreadElement",
+    severity: Severity.context, message: r"""Iterable spread.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+    Message Function(
+        DartType _type,
+        DartType
+            _type2)> templateSpreadElementTypeMismatch = const Template<
+        Message Function(DartType _type, DartType _type2)>(
+    messageTemplate:
+        r"""Can't assign spread elements of type '#type' to collection elements of type '#type2'.""",
+    withArguments: _withArgumentsSpreadElementTypeMismatch);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(DartType _type, DartType _type2)>
+    codeSpreadElementTypeMismatch =
+    const Code<Message Function(DartType _type, DartType _type2)>(
+        "SpreadElementTypeMismatch", templateSpreadElementTypeMismatch,
+        analyzerCodes: <String>["LIST_ELEMENT_TYPE_NOT_ASSIGNABLE"]);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsSpreadElementTypeMismatch(
+    DartType _type, DartType _type2) {
+  TypeLabeler labeler = new TypeLabeler();
+  List<Object> typeParts = labeler.labelType(_type);
+  List<Object> type2Parts = labeler.labelType(_type2);
+  String type = typeParts.join();
+  String type2 = type2Parts.join();
+  return new Message(codeSpreadElementTypeMismatch,
+      message:
+          """Can't assign spread elements of type '${type}' to collection elements of type '${type2}'.""" +
+              labeler.originMessages,
+      arguments: {'type': _type, 'type2': _type2});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeSpreadMapElement = messageSpreadMapElement;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageSpreadMapElement = const MessageCode(
+    "SpreadMapElement",
+    severity: Severity.context,
+    message: r"""Map spread.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+    Message Function(
+        DartType _type,
+        DartType
+            _type2)> templateSpreadMapEntryElementKeyTypeMismatch = const Template<
+        Message Function(DartType _type, DartType _type2)>(
+    messageTemplate:
+        r"""Can't assign spread entry keys of type '#type' to map entry keys of type '#type2'.""",
+    withArguments: _withArgumentsSpreadMapEntryElementKeyTypeMismatch);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(DartType _type, DartType _type2)>
+    codeSpreadMapEntryElementKeyTypeMismatch =
+    const Code<Message Function(DartType _type, DartType _type2)>(
+        "SpreadMapEntryElementKeyTypeMismatch",
+        templateSpreadMapEntryElementKeyTypeMismatch,
+        analyzerCodes: <String>["MAP_KEY_TYPE_NOT_ASSIGNABLE"]);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsSpreadMapEntryElementKeyTypeMismatch(
+    DartType _type, DartType _type2) {
+  TypeLabeler labeler = new TypeLabeler();
+  List<Object> typeParts = labeler.labelType(_type);
+  List<Object> type2Parts = labeler.labelType(_type2);
+  String type = typeParts.join();
+  String type2 = type2Parts.join();
+  return new Message(codeSpreadMapEntryElementKeyTypeMismatch,
+      message:
+          """Can't assign spread entry keys of type '${type}' to map entry keys of type '${type2}'.""" +
+              labeler.originMessages,
+      arguments: {'type': _type, 'type2': _type2});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<Message Function(DartType _type, DartType _type2)>
+    templateSpreadMapEntryElementValueTypeMismatch =
+    const Template<Message Function(DartType _type, DartType _type2)>(
+        messageTemplate:
+            r"""Can't assign spread entry values of type '#type' to map entry values of type '#type2'.""",
+        withArguments: _withArgumentsSpreadMapEntryElementValueTypeMismatch);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(DartType _type, DartType _type2)>
+    codeSpreadMapEntryElementValueTypeMismatch =
+    const Code<Message Function(DartType _type, DartType _type2)>(
+        "SpreadMapEntryElementValueTypeMismatch",
+        templateSpreadMapEntryElementValueTypeMismatch,
+        analyzerCodes: <String>["MAP_VALUE_TYPE_NOT_ASSIGNABLE"]);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsSpreadMapEntryElementValueTypeMismatch(
+    DartType _type, DartType _type2) {
+  TypeLabeler labeler = new TypeLabeler();
+  List<Object> typeParts = labeler.labelType(_type);
+  List<Object> type2Parts = labeler.labelType(_type2);
+  String type = typeParts.join();
+  String type2 = type2Parts.join();
+  return new Message(codeSpreadMapEntryElementValueTypeMismatch,
+      message:
+          """Can't assign spread entry values of type '${type}' to map entry values of type '${type2}'.""" +
+              labeler.originMessages,
+      arguments: {'type': _type, 'type2': _type2});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+    Message Function(
+        DartType
+            _type)> templateSpreadMapEntryTypeMismatch = const Template<
+        Message Function(DartType _type)>(
+    messageTemplate:
+        r"""Unexpected type '#type' of a map spread entry.  Expected 'dynamic' or a Map.""",
+    withArguments: _withArgumentsSpreadMapEntryTypeMismatch);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(DartType _type)> codeSpreadMapEntryTypeMismatch =
+    const Code<Message Function(DartType _type)>(
+  "SpreadMapEntryTypeMismatch",
+  templateSpreadMapEntryTypeMismatch,
+);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsSpreadMapEntryTypeMismatch(DartType _type) {
+  TypeLabeler labeler = new TypeLabeler();
+  List<Object> typeParts = labeler.labelType(_type);
+  String type = typeParts.join();
+  return new Message(codeSpreadMapEntryTypeMismatch,
+      message:
+          """Unexpected type '${type}' of a map spread entry.  Expected 'dynamic' or a Map.""" +
+              labeler.originMessages,
+      arguments: {'type': _type});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Template<
+    Message Function(
+        DartType
+            _type)> templateSpreadTypeMismatch = const Template<
+        Message Function(DartType _type)>(
+    messageTemplate:
+        r"""Unexpected type '#type' of a spread.  Expected 'dynamic' or an Iterable.""",
+    withArguments: _withArgumentsSpreadTypeMismatch);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Message Function(DartType _type)> codeSpreadTypeMismatch =
+    const Code<Message Function(DartType _type)>(
+  "SpreadTypeMismatch",
+  templateSpreadTypeMismatch,
+);
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+Message _withArgumentsSpreadTypeMismatch(DartType _type) {
+  TypeLabeler labeler = new TypeLabeler();
+  List<Object> typeParts = labeler.labelType(_type);
+  String type = typeParts.join();
+  return new Message(codeSpreadTypeMismatch,
+      message:
+          """Unexpected type '${type}' of a spread.  Expected 'dynamic' or an Iterable.""" +
+              labeler.originMessages,
+      arguments: {'type': _type});
+}
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Code<Null> codeStackOverflow = messageStackOverflow;
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
@@ -8604,7 +9176,7 @@
 const Code<Message Function(String name)> codeThisAccessInFieldInitializer =
     const Code<Message Function(String name)>(
         "ThisAccessInFieldInitializer", templateThisAccessInFieldInitializer,
-        analyzerCodes: <String>["THIS_ACCESS_FROM_INITIALIZER"]);
+        analyzerCodes: <String>["THIS_ACCESS_FROM_FIELD_INITIALIZER"]);
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 Message _withArgumentsThisAccessInFieldInitializer(String name) {
@@ -8783,6 +9355,16 @@
 }
 
 // DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const Code<Null> codeTypeBeforeFactory = messageTypeBeforeFactory;
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
+const MessageCode messageTypeBeforeFactory = const MessageCode(
+    "TypeBeforeFactory",
+    index: 97,
+    message: r"""Factory constructors cannot have a return type.""",
+    tip: r"""Try removing the type appearing before 'factory'.""");
+
+// DO NOT EDIT. THIS FILE IS GENERATED. SEE TOP OF FILE.
 const Template<Message Function(String name)> templateTypeNotFound =
     const Template<Message Function(String name)>(
         messageTemplate: r"""Type '#name' not found.""",
diff --git a/pkg/front_end/lib/src/fasta/incremental_compiler.dart b/pkg/front_end/lib/src/fasta/incremental_compiler.dart
index 4155df3..63f805f 100644
--- a/pkg/front_end/lib/src/fasta/incremental_compiler.dart
+++ b/pkg/front_end/lib/src/fasta/incremental_compiler.dart
@@ -85,39 +85,53 @@
 
   final Ticker ticker;
 
+  final bool outlineOnly;
+
   Set<Uri> invalidatedUris = new Set<Uri>();
 
   DillTarget dillLoadedData;
   List<LibraryBuilder> platformBuilders;
   Map<Uri, LibraryBuilder> userBuilders;
   final Uri initializeFromDillUri;
-  Component componentToInitializeFrom;
+  final Component componentToInitializeFrom;
   bool initializedFromDill = false;
+  Uri previousPackagesUri;
   bool hasToCheckPackageUris = false;
   Map<Uri, List<DiagnosticMessageFromJson>> remainingComponentProblems =
       new Map<Uri, List<DiagnosticMessageFromJson>>();
+  List<Component> modulesToLoad;
+
+  static final Uri debugExprUri =
+      new Uri(scheme: "org-dartlang-debug", path: "synthetic_debug_expression");
 
   KernelTarget userCode;
 
   IncrementalCompiler.fromComponent(
-      this.context, Component this.componentToInitializeFrom)
+      this.context, Component this.componentToInitializeFrom,
+      [bool outlineOnly])
       : ticker = context.options.ticker,
-        initializeFromDillUri = null;
+        initializeFromDillUri = null,
+        this.outlineOnly = outlineOnly ?? false;
 
-  IncrementalCompiler(this.context, [this.initializeFromDillUri])
+  IncrementalCompiler(this.context,
+      [this.initializeFromDillUri, bool outlineOnly])
       : ticker = context.options.ticker,
-        componentToInitializeFrom = null;
+        componentToInitializeFrom = null,
+        this.outlineOnly = outlineOnly ?? false;
 
   @override
   Future<Component> computeDelta(
-      {Uri entryPoint, bool fullComponent: false}) async {
+      {List<Uri> entryPoints, bool fullComponent: false}) async {
     ticker.reset();
-    entryPoint ??= context.options.inputs.single;
+    entryPoints ??= context.options.inputs;
     return context.runInContext<Component>((CompilerContext c) async {
       IncrementalCompilerData data = new IncrementalCompilerData();
 
       bool bypassCache = false;
-      if (this.invalidatedUris.contains(c.options.packagesUri)) {
+      if (!identical(previousPackagesUri, c.options.packagesUriRaw)) {
+        previousPackagesUri = c.options.packagesUriRaw;
+        bypassCache = true;
+      } else if (this.invalidatedUris.contains(c.options.packagesUri)) {
         bypassCache = true;
       }
       hasToCheckPackageUris = hasToCheckPackageUris || bypassCache;
@@ -126,56 +140,62 @@
       ticker.logMs("Read packages file");
 
       if (dillLoadedData == null) {
-        List<int> summaryBytes = await c.options.loadSdkSummaryBytes();
-        int bytesLength = prepareSummary(summaryBytes, uriTranslator, c, data);
-        if (initializeFromDillUri != null) {
-          try {
-            bytesLength += await initializeFromDill(uriTranslator, c, data);
-          } catch (e, st) {
-            // We might have loaded x out of y libraries into the component.
-            // To avoid any unforeseen problems start over.
-            bytesLength = prepareSummary(summaryBytes, uriTranslator, c, data);
+        int bytesLength = 0;
+        if (componentToInitializeFrom != null) {
+          // If initializing from a component it has to include the sdk,
+          // so we explicitly don't load it here.
+          initializeFromComponent(uriTranslator, c, data);
+        } else {
+          List<int> summaryBytes = await c.options.loadSdkSummaryBytes();
+          bytesLength = prepareSummary(summaryBytes, uriTranslator, c, data);
+          if (initializeFromDillUri != null) {
+            try {
+              bytesLength += await initializeFromDill(uriTranslator, c, data);
+            } catch (e, st) {
+              // We might have loaded x out of y libraries into the component.
+              // To avoid any unforeseen problems start over.
+              bytesLength =
+                  prepareSummary(summaryBytes, uriTranslator, c, data);
 
-            if (e is InvalidKernelVersionError || e is PackageChangedError) {
-              // Don't report any warning.
-            } else {
-              Uri gzInitializedFrom;
-              if (c.options.writeFileOnCrashReport) {
-                gzInitializedFrom = saveAsGzip(
-                    data.initializationBytes, "initialize_from.dill");
-                recordTemporaryFileForTesting(gzInitializedFrom);
-              }
-              if (e is CanonicalNameError) {
-                Message message = gzInitializedFrom != null
-                    ? templateInitializeFromDillNotSelfContained.withArguments(
-                        initializeFromDillUri.toString(), gzInitializedFrom)
-                    : templateInitializeFromDillNotSelfContainedNoDump
-                        .withArguments(initializeFromDillUri.toString());
-                dillLoadedData.loader
-                    .addProblem(message, TreeNode.noOffset, 1, null);
+              if (e is InvalidKernelVersionError || e is PackageChangedError) {
+                // Don't report any warning.
               } else {
-                // Unknown error: Report problem as such.
-                Message message = gzInitializedFrom != null
-                    ? templateInitializeFromDillUnknownProblem.withArguments(
-                        initializeFromDillUri.toString(),
-                        "$e",
-                        "$st",
-                        gzInitializedFrom)
-                    : templateInitializeFromDillUnknownProblemNoDump
-                        .withArguments(
-                            initializeFromDillUri.toString(), "$e", "$st");
-                dillLoadedData.loader
-                    .addProblem(message, TreeNode.noOffset, 1, null);
+                Uri gzInitializedFrom;
+                if (c.options.writeFileOnCrashReport) {
+                  gzInitializedFrom = saveAsGzip(
+                      data.initializationBytes, "initialize_from.dill");
+                  recordTemporaryFileForTesting(gzInitializedFrom);
+                }
+                if (e is CanonicalNameError) {
+                  Message message = gzInitializedFrom != null
+                      ? templateInitializeFromDillNotSelfContained
+                          .withArguments(initializeFromDillUri.toString(),
+                              gzInitializedFrom)
+                      : templateInitializeFromDillNotSelfContainedNoDump
+                          .withArguments(initializeFromDillUri.toString());
+                  dillLoadedData.loader
+                      .addProblem(message, TreeNode.noOffset, 1, null);
+                } else {
+                  // Unknown error: Report problem as such.
+                  Message message = gzInitializedFrom != null
+                      ? templateInitializeFromDillUnknownProblem.withArguments(
+                          initializeFromDillUri.toString(),
+                          "$e",
+                          "$st",
+                          gzInitializedFrom)
+                      : templateInitializeFromDillUnknownProblemNoDump
+                          .withArguments(
+                              initializeFromDillUri.toString(), "$e", "$st");
+                  dillLoadedData.loader
+                      .addProblem(message, TreeNode.noOffset, 1, null);
+                }
               }
             }
           }
-        } else if (componentToInitializeFrom != null) {
-          initializeFromComponent(uriTranslator, c, data);
         }
         appendLibraries(data, bytesLength);
 
         await dillLoadedData.buildOutlines();
-        summaryBytes = null;
         userBuilders = <Uri, LibraryBuilder>{};
         platformBuilders = <LibraryBuilder>[];
         dillLoadedData.loader.builders.forEach((uri, builder) {
@@ -190,19 +210,8 @@
       data.initializationBytes = null;
 
       Set<Uri> invalidatedUris = this.invalidatedUris.toSet();
-      if ((data.includeUserLoadedLibraries &&
-              componentToInitializeFrom ==
-                  null) // when loading state from component no need to invalidate anything
-          ||
-          fullComponent) {
-        invalidatedUris.add(entryPoint);
-      }
-      if (componentToInitializeFrom != null) {
-        // Once compiler was initialized from component, no need to skip logic
-        // above that adds entryPoint to invalidatedUris for successive
-        // [computeDelta] calls.
-        componentToInitializeFrom = null;
-      }
+
+      invalidateNotKeptUserBuilders(invalidatedUris);
 
       ClassHierarchy hierarchy = userCode?.loader?.hierarchy;
       Set<LibraryBuilder> notReusedLibraries = new Set<LibraryBuilder>();
@@ -213,14 +222,36 @@
           new Set<Uri>.from(reusedLibraries.map((b) => b.uri));
       for (Uri uri in new Set<Uri>.from(dillLoadedData.loader.builders.keys)
         ..removeAll(reusedLibraryUris)) {
-        dillLoadedData.loader.builders.remove(uri);
+        LibraryBuilder builder = dillLoadedData.loader.builders.remove(uri);
         userBuilders?.remove(uri);
+        CompilerContext.current.uriToSource.remove(builder.fileUri);
       }
 
-      // Remove component problems for libraries we don't reuse.
-      if (remainingComponentProblems.isNotEmpty) {
-        for (LibraryBuilder builder in notReusedLibraries) {
-          Library lib = builder.target;
+      if (hasToCheckPackageUris) {
+        // The package file was changed.
+        // Make sure the dill loader is on the same page.
+        DillTarget oldDillLoadedData = dillLoadedData;
+        dillLoadedData =
+            new DillTarget(ticker, uriTranslator, c.options.target);
+        for (DillLibraryBuilder library
+            in oldDillLoadedData.loader.builders.values) {
+          library.loader = dillLoadedData.loader;
+          dillLoadedData.loader.builders[library.uri] = library;
+          if (library.uri.scheme == "dart" && library.uri.path == "core") {
+            dillLoadedData.loader.coreLibrary = library;
+          }
+        }
+        dillLoadedData.loader.first = oldDillLoadedData.loader.first;
+        dillLoadedData.loader.libraries
+            .addAll(oldDillLoadedData.loader.libraries);
+      }
+
+      for (LibraryBuilder builder in notReusedLibraries) {
+        Library lib = builder.target;
+        CompilerContext.current.uriToSource.remove(builder.fileUri);
+
+        // Remove component problems for libraries we don't reuse.
+        if (remainingComponentProblems.isNotEmpty) {
           removeLibraryFromRemainingComponentProblems(lib, uriTranslator);
         }
       }
@@ -240,6 +271,8 @@
             " of ${userCode.loader.builders.length} libraries");
       }
 
+      await loadEnsureLoadedComponents(reusedLibraryUris, reusedLibraries);
+
       KernelTarget userCodeOld = userCode;
       userCode = new KernelTarget(
           new HybridFileSystem(
@@ -253,21 +286,30 @@
 
       for (LibraryBuilder library in reusedLibraries) {
         userCode.loader.builders[library.uri] = library;
-        if (entryPoint == library.uri) {
-          userCode.loader.first = library;
-        }
         if (library.uri.scheme == "dart" && library.uri.path == "core") {
           userCode.loader.coreLibrary = library;
         }
       }
 
-      entryPoint = userCode.setEntryPoints(<Uri>[entryPoint]).single;
-      await userCode.buildOutlines();
+      entryPoints = userCode.setEntryPoints(entryPoints);
+      if (userCode.loader.first == null &&
+          userCode.loader.builders[entryPoints.first] != null) {
+        userCode.loader.first = userCode.loader.builders[entryPoints.first];
+      }
+      Component componentWithDill = await userCode.buildOutlines();
 
-      // This is not the full component. It is the component including all
-      // libraries loaded from .dill files.
-      Component componentWithDill =
-          await userCode.buildComponent(verify: c.options.verify);
+      // This is not the full component. It is the component consisting of all
+      // newly compiled libraries and all libraries loaded from .dill files or
+      // directly from components.
+      // Technically, it's the combination of userCode.loader.libraries and
+      // dillLoadedData.loader.libraries.
+      if (!outlineOnly) {
+        componentWithDill =
+            await userCode.buildComponent(verify: c.options.verify);
+      }
+
+      recordNonFullComponentForTesting(componentWithDill);
+
       if (componentWithDill != null) {
         this.invalidatedUris.clear();
         hasToCheckPackageUris = false;
@@ -284,14 +326,32 @@
 
       List<Library> outputLibraries;
       Set<Library> allLibraries;
-      if (data.includeUserLoadedLibraries || fullComponent) {
-        outputLibraries = computeTransitiveClosure(compiledLibraries,
-            entryPoint, reusedLibraries, hierarchy, uriTranslator);
+      Map<Uri, Source> uriToSource = componentWithDill?.uriToSource;
+      if (data.component != null || fullComponent) {
+        outputLibraries = computeTransitiveClosure(
+            compiledLibraries,
+            entryPoints,
+            reusedLibraries,
+            hierarchy,
+            uriTranslator,
+            uriToSource);
         allLibraries = outputLibraries.toSet();
+        if (!c.options.omitPlatform) {
+          for (int i = 0; i < platformBuilders.length; i++) {
+            Library lib = platformBuilders[i].target;
+            outputLibraries.add(lib);
+          }
+        }
       } else {
         outputLibraries = new List<Library>();
-        allLibraries = computeTransitiveClosure(compiledLibraries, entryPoint,
-                reusedLibraries, hierarchy, uriTranslator, outputLibraries)
+        allLibraries = computeTransitiveClosure(
+                compiledLibraries,
+                entryPoints,
+                reusedLibraries,
+                hierarchy,
+                uriTranslator,
+                uriToSource,
+                outputLibraries)
             .toSet();
       }
 
@@ -304,35 +364,95 @@
       }
 
       // This is the incremental component.
-      return context.options.target.configureComponent(new Component(
-          libraries: outputLibraries,
-          uriToSource: componentWithDill?.uriToSource))
+      return context.options.target.configureComponent(
+          new Component(libraries: outputLibraries, uriToSource: uriToSource))
         ..mainMethod = mainMethod
         ..problemsAsJson = problemsAsJson;
     });
   }
 
+  /// Internal method.
+  void invalidateNotKeptUserBuilders(Set<Uri> invalidatedUris) {
+    if (modulesToLoad != null && userBuilders != null) {
+      Set<Library> loadedNotKept = new Set<Library>();
+      for (LibraryBuilder builder in userBuilders.values) {
+        loadedNotKept.add(builder.target);
+      }
+      for (Component module in modulesToLoad) {
+        loadedNotKept.removeAll(module.libraries);
+      }
+      for (Library lib in loadedNotKept) {
+        invalidatedUris.add(lib.importUri);
+      }
+    }
+  }
+
+  /// Internal method.
+  Future loadEnsureLoadedComponents(
+      Set<Uri> reusedLibraryUris, List<LibraryBuilder> reusedLibraries) async {
+    if (modulesToLoad != null) {
+      bool loadedAnything = false;
+      for (Component module in modulesToLoad) {
+        bool usedComponent = false;
+        for (Library lib in module.libraries) {
+          if (!reusedLibraryUris.contains(lib.importUri)) {
+            dillLoadedData.loader.libraries.add(lib);
+            dillLoadedData.addLibrary(lib);
+            reusedLibraries.add(dillLoadedData.loader.read(lib.importUri, -1));
+            usedComponent = true;
+          }
+        }
+        if (usedComponent) {
+          dillLoadedData.uriToSource.addAll(module.uriToSource);
+          loadedAnything = true;
+        }
+      }
+      if (loadedAnything) {
+        await dillLoadedData.buildOutlines();
+        userBuilders = <Uri, LibraryBuilder>{};
+        platformBuilders = <LibraryBuilder>[];
+        dillLoadedData.loader.builders.forEach((uri, builder) {
+          if (builder.uri.scheme == "dart") {
+            platformBuilders.add(builder);
+          } else {
+            userBuilders[uri] = builder;
+          }
+        });
+        if (userBuilders.isEmpty) {
+          userBuilders = null;
+        }
+      }
+      modulesToLoad = null;
+    }
+  }
+
+  /// Internal method.
   void reissueLibraryProblems(
       Set<Library> allLibraries, List<Library> compiledLibraries) {
     // The newly-compiled libraries have issued problems already. Re-issue
-    // problems for the libraries that weren't re-compiled.
+    // problems for the libraries that weren't re-compiled (ignore compile
+    // expression problems)
     allLibraries.removeAll(compiledLibraries);
     for (Library library in allLibraries) {
       if (library.problemsAsJson?.isNotEmpty == true) {
         for (String jsonString in library.problemsAsJson) {
           DiagnosticMessageFromJson message =
               new DiagnosticMessageFromJson.fromJson(jsonString);
+          if (message.uri == debugExprUri) {
+            continue;
+          }
           context.options.reportDiagnosticMessage(message);
         }
       }
     }
   }
 
+  /// Internal method.
   /// Re-issue problems on the component and return the filtered list.
   List<String> reissueComponentProblems(Component componentWithDill) {
     // These problems have already been reported.
     Set<String> issuedProblems = new Set<String>();
-    if (componentWithDill.problemsAsJson != null) {
+    if (componentWithDill?.problemsAsJson != null) {
       issuedProblems.addAll(componentWithDill.problemsAsJson);
     }
 
@@ -348,7 +468,7 @@
     }
 
     // Save any new component-problems.
-    if (componentWithDill.problemsAsJson != null) {
+    if (componentWithDill?.problemsAsJson != null) {
       for (String jsonString in componentWithDill.problemsAsJson) {
         DiagnosticMessageFromJson message =
             new DiagnosticMessageFromJson.fromJson(jsonString);
@@ -361,6 +481,7 @@
     return new List<String>.from(issuedProblems);
   }
 
+  /// Internal method.
   Uri getPartFileUri(
       Uri parentFileUri, LibraryPart part, UriTranslator uriTranslator) {
     Uri fileUri = parentFileUri.resolve(part.partUri);
@@ -373,16 +494,18 @@
     return fileUri;
   }
 
+  /// Internal method.
   /// Compute the transitive closure.
   ///
   /// As a side-effect, this also cleans-up now-unreferenced builders as well as
   /// any saved component problems for such builders.
   List<Library> computeTransitiveClosure(
       List<Library> inputLibraries,
-      Uri entry,
+      List<Uri> entries,
       List<LibraryBuilder> reusedLibraries,
       ClassHierarchy hierarchy,
       UriTranslator uriTranslator,
+      Map<Uri, Source> uriToSource,
       [List<Library> inputLibrariesFiltered]) {
     List<Library> result = new List<Library>();
     Map<Uri, Library> libraryMap = <Uri, Library>{};
@@ -400,7 +523,7 @@
     }
 
     List<Uri> worklist = new List<Uri>();
-    worklist.add(entry);
+    worklist.addAll(entries);
     for (LibraryBuilder library in reusedLibraries) {
       if (library.uri.scheme == "dart" && !library.isSynthetic) {
         continue;
@@ -436,6 +559,8 @@
         Library lib = builder.target;
         removedLibraries.add(lib);
         dillLoadedData.loader.builders.remove(uri);
+        CompilerContext.current.uriToSource.remove(uri);
+        uriToSource.remove(uri);
         userBuilders?.remove(uri);
         removeLibraryFromRemainingComponentProblems(lib, uriTranslator);
       }
@@ -445,6 +570,7 @@
     return result;
   }
 
+  /// Internal method.
   void removeLibraryFromRemainingComponentProblems(
       Library lib, UriTranslator uriTranslator) {
     remainingComponentProblems.remove(lib.fileUri);
@@ -455,6 +581,7 @@
     }
   }
 
+  /// Internal method.
   int prepareSummary(List<int> summaryBytes, UriTranslator uriTranslator,
       CompilerContext c, IncrementalCompilerData data) {
     dillLoadedData = new DillTarget(ticker, uriTranslator, c.options.target);
@@ -472,6 +599,7 @@
     return bytesLength;
   }
 
+  /// Internal method.
   // This procedure will try to load the dill file and will crash if it cannot.
   Future<int> initializeFromDill(UriTranslator uriTranslator, CompilerContext c,
       IncrementalCompilerData data) async {
@@ -506,13 +634,13 @@
         initializedFromDill = true;
         bytesLength += initializationBytes.length;
         data.userLoadedUriMain = data.component.mainMethod;
-        data.includeUserLoadedLibraries = true;
         saveComponentProblems(data);
       }
     }
     return bytesLength;
   }
 
+  /// Internal method.
   void saveComponentProblems(IncrementalCompilerData data) {
     if (data.component.problemsAsJson != null) {
       for (String jsonString in data.component.problemsAsJson) {
@@ -526,41 +654,39 @@
     }
   }
 
+  /// Internal method.
   // This procedure will set up compiler from [componentToInitializeFrom].
   void initializeFromComponent(UriTranslator uriTranslator, CompilerContext c,
       IncrementalCompilerData data) {
-    ticker.logMs("Read initializeFromComponent");
+    ticker.logMs("About to initializeFromComponent");
 
-    // [libraries] and [uriToSource] from [componentToInitializeFrom] take
-    // precedence over what was already read into [data.component]. Assumption
-    // is that [data.component] is initialized with standard prebuilt various
-    // platform libraries.
-    List<Library> combinedLibs = <Library>[];
-    Set<Uri> readLibs =
-        componentToInitializeFrom.libraries.map((lib) => lib.fileUri).toSet();
-    combinedLibs.addAll(componentToInitializeFrom.libraries);
-    for (Library lib in data.component.libraries) {
-      if (!readLibs.contains(lib.fileUri)) {
-        combinedLibs.add(lib);
-      }
-    }
-    Map<Uri, Source> combinedMaps = new Map<Uri, Source>();
-    combinedMaps.addAll(componentToInitializeFrom.uriToSource);
-    Set<Uri> uris = combinedMaps.keys.toSet();
-    for (MapEntry<Uri, Source> entry in data.component.uriToSource.entries) {
-      if (!uris.contains(entry.key)) {
-        combinedMaps[entry.key] = entry.value;
-      }
-    }
-
-    data.component =
-        new Component(libraries: combinedLibs, uriToSource: combinedMaps)
-          ..mainMethod = componentToInitializeFrom.mainMethod;
-    data.userLoadedUriMain = data.component.mainMethod;
-    data.includeUserLoadedLibraries = true;
+    dillLoadedData = new DillTarget(ticker, uriTranslator, c.options.target);
+    data.component = new Component(
+        libraries: componentToInitializeFrom.libraries,
+        uriToSource: componentToInitializeFrom.uriToSource)
+      ..mainMethod = componentToInitializeFrom.mainMethod;
+    data.userLoadedUriMain = componentToInitializeFrom.mainMethod;
     saveComponentProblems(data);
+
+    bool foundDartCore = false;
+    for (int i = 0; i < data.component.libraries.length; i++) {
+      Library library = data.component.libraries[i];
+      if (library.importUri.scheme == "dart" &&
+          library.importUri.path == "core") {
+        foundDartCore = true;
+        break;
+      }
+    }
+
+    if (!foundDartCore) {
+      throw const InitializeFromComponentError("Did not find dart:core when "
+          "tried to initialize from component.");
+    }
+
+    ticker.logMs("Ran initializeFromComponent");
   }
 
+  /// Internal method.
   void appendLibraries(IncrementalCompilerData data, int bytesLength) {
     if (data.component != null) {
       dillLoadedData.loader
@@ -599,9 +725,6 @@
         if (!isLegalIdentifier(name)) return null;
       }
 
-      Uri debugExprUri = new Uri(
-          scheme: "org-dartlang-debug", path: "synthetic_debug_expression");
-
       KernelLibraryBuilder debugLibrary = new KernelLibraryBuilder(
           libraryUri,
           debugExprUri,
@@ -675,6 +798,7 @@
     });
   }
 
+  /// Internal method.
   List<LibraryBuilder> computeReusedLibraries(
       Set<Uri> invalidatedUris, UriTranslator uriTranslator,
       {Set<LibraryBuilder> notReused}) {
@@ -798,7 +922,27 @@
     invalidatedUris.add(uri);
   }
 
+  @override
+  void invalidateAllSources() {
+    if (userCode != null) {
+      Set<Uri> uris = new Set<Uri>.from(userCode.loader.builders.keys);
+      uris.removeAll(dillLoadedData.loader.builders.keys);
+      invalidatedUris.addAll(uris);
+    }
+  }
+
+  @override
+  void setModulesToLoadOnNextComputeDelta(List<Component> components) {
+    modulesToLoad = components.toList();
+  }
+
+  /// Internal method.
+  void recordNonFullComponentForTesting(Component component) {}
+
+  /// Internal method.
   void recordInvalidatedImportUrisForTesting(List<Uri> uris) {}
+
+  /// Internal method.
   void recordTemporaryFileForTesting(Uri uri) {}
 }
 
@@ -806,8 +950,15 @@
   const PackageChangedError();
 }
 
+class InitializeFromComponentError {
+  final String message;
+
+  const InitializeFromComponentError(this.message);
+
+  String toString() => message;
+}
+
 class IncrementalCompilerData {
-  bool includeUserLoadedLibraries = false;
   Procedure userLoadedUriMain = null;
   Component component = null;
   List<int> initializationBytes = null;
diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
index d526ee2..0430c9d 100644
--- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -45,7 +45,8 @@
 
 import '../scanner.dart' show Token;
 
-import '../scanner/token.dart' show isBinaryOperator, isMinusOperator;
+import '../scanner/token.dart'
+    show isBinaryOperator, isMinusOperator, isUserDefinableOperator;
 
 import '../scope.dart' show ProblemBuilder;
 
@@ -65,6 +66,13 @@
 import '../type_inference/type_promotion.dart'
     show TypePromoter, TypePromotionFact, TypePromotionScope;
 
+import 'collections.dart'
+    show
+        SpreadElement,
+        SpreadMapEntry,
+        convertToMapEntry,
+        isConvertibleToMapEntry;
+
 import 'constness.dart' show Constness;
 
 import 'expression_generator.dart'
@@ -109,8 +117,6 @@
         getRedirectionTarget,
         isRedirectingFactory;
 
-import 'transform_set_literals.dart' show SetLiteralTransformer;
-
 import 'type_algorithms.dart' show calculateBounds;
 
 import 'kernel_api.dart';
@@ -122,6 +128,10 @@
 // TODO(ahe): Remove this and ensure all nodes have a location.
 const noLocation = null;
 
+// TODO(danrubel): Remove this once control flow and spread collection support
+// has been enabled by default.
+const invalidCollectionElement = const Object();
+
 abstract class BodyBuilder extends ScopeListener<JumpTarget>
     implements ExpressionGeneratorHelper {
   // TODO(ahe): Rename [library] to 'part'.
@@ -204,6 +214,10 @@
 
   int functionNestingLevel = 0;
 
+  // Set when a spread element is encountered in a collection so the collection
+  // needs to be desugared after type inference.
+  bool transformCollections = false;
+
   // Set by type inference when a set literal is encountered that needs to be
   // transformed because the backend target does not support set literals.
   bool transformSetLiterals = false;
@@ -447,6 +461,14 @@
     return new JumpTarget(kind, functionNestingLevel, member, charOffset);
   }
 
+  void inferAnnotations(List<Expression> annotations) {
+    if (annotations != null) {
+      _typeInferrer?.inferMetadata(this, annotations);
+      library.loader.transformListPostInference(
+          annotations, transformSetLiterals, transformCollections);
+    }
+  }
+
   @override
   void beginMetadata(Token token) {
     debugEvent("beginMetadata");
@@ -553,12 +575,8 @@
           field.initializer = initializer;
           _typeInferrer?.inferFieldInitializer(
               this, field.builtType, initializer);
-
-          if (transformSetLiterals) {
-            library.loader.setLiteralTransformer ??=
-                new SetLiteralTransformer(library.loader);
-            field.target.accept(library.loader.setLiteralTransformer);
-          }
+          library.loader.transformPostInference(
+              field.target, transformSetLiterals, transformCollections);
         }
       }
     }
@@ -574,7 +592,7 @@
     }
     List<Expression> annotations = pop();
     if (annotations != null) {
-      _typeInferrer?.inferMetadata(this, annotations);
+      inferAnnotations(annotations);
       Field field = fields.first.target;
       // The first (and often only field) will not get a clone.
       for (int i = 0; i < annotations.length; i++) {
@@ -741,17 +759,17 @@
           realParameter.initializer = initializer..parent = realParameter;
           _typeInferrer?.inferParameterInitializer(
               this, initializer, realParameter.type);
+          library.loader.transformPostInference(
+              realParameter, transformSetLiterals, transformCollections);
         }
       }
     }
 
     _typeInferrer?.inferFunctionBody(
         this, _computeReturnTypeContext(member), asyncModifier, body);
-
-    if (transformSetLiterals) {
-      library.loader.setLiteralTransformer ??=
-          new SetLiteralTransformer(library.loader);
-      body.accept(library.loader.setLiteralTransformer);
+    if (body != null) {
+      library.loader.transformPostInference(
+          body, transformSetLiterals, transformCollections);
     }
 
     // For async, async*, and sync* functions with declared return types, we
@@ -873,7 +891,7 @@
       }
     }
     Member target = builder.target;
-    _typeInferrer?.inferMetadata(this, annotations);
+    inferAnnotations(annotations);
     for (Expression annotation in annotations ?? const []) {
       target.addAnnotation(annotation);
     }
@@ -892,10 +910,22 @@
 
   void resolveRedirectingFactoryTargets() {
     for (StaticInvocation invocation in redirectingFactoryInvocations) {
-      // If the invocation was invalid, it has already been desugared into
-      // an exception throwing expression. There is nothing to resolve anymore.
-      if (invocation.parent == null) {
-        continue;
+      // If the invocation was invalid, it or its parent has already been
+      // desugared into an exception throwing expression.  There is nothing to
+      // resolve anymore.  Note that in the case where the invocation's parent
+      // was invalid, type inference won't reach the invocation node and won't
+      // set its inferredType field.  If type inference is disabled, reach to
+      // the outtermost parent to check if the node is a dead code.
+      if (invocation.parent == null) continue;
+      if (_typeInferrer != null) {
+        if (invocation is FactoryConstructorInvocationJudgment &&
+            invocation.inferredType == null) {
+          continue;
+        }
+      } else {
+        TreeNode parent = invocation.parent;
+        while (parent is! Component && parent != null) parent = parent.parent;
+        if (parent == null) continue;
       }
 
       Procedure initialTarget = invocation.target;
@@ -986,15 +1016,14 @@
 
     if (variablesWithMetadata != null) {
       for (int i = 0; i < variablesWithMetadata.length; i++) {
-        _typeInferrer?.inferMetadata(
-            this, variablesWithMetadata[i].annotations);
+        inferAnnotations(variablesWithMetadata[i].annotations);
       }
     }
     if (multiVariablesWithMetadata != null) {
       for (int i = 0; i < multiVariablesWithMetadata.length; i++) {
         List<VariableDeclaration> variables = multiVariablesWithMetadata[i];
         List<Expression> annotations = variables.first.annotations;
-        _typeInferrer?.inferMetadata(this, annotations);
+        inferAnnotations(annotations);
         for (int i = 1; i < variables.length; i++) {
           cloner ??= new CloneVisitor();
           VariableDeclaration variable = variables[i];
@@ -1009,7 +1038,7 @@
   @override
   List<Expression> finishMetadata(TreeNode parent) {
     List<Expression> expressions = pop();
-    _typeInferrer?.inferMetadata(this, expressions);
+    inferAnnotations(expressions);
 
     // The invocation of [resolveRedirectingFactoryTargets] below may change the
     // root nodes of the annotation expressions.  We need to have a parent of
@@ -1158,6 +1187,8 @@
       constructor.initializers.add(initializer);
     }
     setParents(constructor.initializers, constructor);
+    library.loader.transformListPostInference(
+        constructor.initializers, transformSetLiterals, transformCollections);
     if (constructor.function.body == null) {
       /// >If a generative constructor c is not a redirecting constructor
       /// >and no body is provided, then c implicitly has an empty body {}.
@@ -1361,8 +1392,15 @@
       negate = true;
     }
     if (!isBinaryOperator(operator) && !isMinusOperator(operator)) {
-      return buildProblem(fasta.templateInvalidOperator.withArguments(token),
-          token.charOffset, token.length);
+      if (isUserDefinableOperator(operator)) {
+        return buildProblem(
+            fasta.templateNotBinaryOperator.withArguments(token),
+            token.charOffset,
+            token.length);
+      } else {
+        return buildProblem(fasta.templateInvalidOperator.withArguments(token),
+            token.charOffset, token.length);
+      }
     } else {
       Expression result = buildMethodInvocation(a, new Name(operator),
           forest.arguments(<Expression>[b], noLocation), token.charOffset,
@@ -1662,8 +1700,13 @@
     } else if (context.inDeclaration) {
       if (context == IdentifierContext.topLevelVariableDeclaration ||
           context == IdentifierContext.fieldDeclaration) {
-        constantContext =
-            member.isConst ? ConstantContext.inferred : ConstantContext.none;
+        constantContext = member.isConst
+            ? ConstantContext.inferred
+            : !member.isStatic &&
+                    classBuilder != null &&
+                    classBuilder.hasConstConstructor
+                ? ConstantContext.required
+                : ConstantContext.none;
       }
     } else if (constantContext != ConstantContext.none &&
         !context.allowedInConstantExpression) {
@@ -1704,7 +1747,7 @@
         declaration.isInstanceMember &&
         inFieldInitializer &&
         !inInitializer) {
-      return new IncompleteErrorGenerator(this, token, declaration.target,
+      return new IncompleteErrorGenerator(this, token,
           fasta.templateThisAccessInFieldInitializer.withArguments(name));
     }
     if (declaration == null ||
@@ -1730,8 +1773,8 @@
       if (constantContext != ConstantContext.none &&
           !declaration.isConst &&
           !member.isConstructor) {
-        addProblem(
-            fasta.messageNotAConstantExpression, charOffset, token.length);
+        return new IncompleteErrorGenerator(
+            this, token, fasta.messageNotAConstantExpression);
       }
       // An initializing formal parameter might be final without its
       // VariableDeclaration being final. See
@@ -1872,7 +1915,8 @@
       }
       // Contains more than just \' or \".
       if (last.lexeme.length > 1) {
-        String value = unescapeLastStringPart(last.lexeme, quote, last, this);
+        String value = unescapeLastStringPart(
+            last.lexeme, quote, last, last.isSynthetic, this);
         if (value.isNotEmpty) {
           expressions.add(forest.literalString(value, last));
         }
@@ -2062,7 +2106,7 @@
   @override
   void handleNoFieldInitializer(Token token) {
     debugEvent("NoFieldInitializer");
-    if (constantContext != ConstantContext.none) {
+    if (constantContext == ConstantContext.inferred) {
       // Creating a null value to prevent the Dart VM from crashing.
       push(forest.literalNull(token));
     } else {
@@ -2251,25 +2295,55 @@
 
   @override
   void endForControlFlow(Token token) {
-    debugEvent("endForControlFlow");
-    // TODO(danrubel) implement control flow support
+    debugEvent("ForControlFlow");
     var entry = pop();
-
     int updateExpressionCount = pop();
     pop(); // left separator
     pop(); // left parenthesis
     Token forToken = pop();
-
-    popListForEffect(updateExpressionCount); // updates
-    popStatement(); // condition
+    List<Expression> updates = popListForEffect(updateExpressionCount);
+    Statement conditionStatement = popStatement(); // condition
     Object variableOrExpression = pop();
-    buildVariableDeclarations(variableOrExpression); // variables
+    exitLocalScope();
 
-    push(entry); // push the entry back on the stack and drop the rest
-    handleRecoverableError(
-        fasta.templateUnexpectedToken.withArguments(forToken),
-        forToken,
-        forToken);
+    if (!library.loader.target.enableControlFlowCollections) {
+      // TODO(danrubel): Report a more user friendly error message
+      // when an experiment is not enabled
+      handleRecoverableError(
+          fasta.templateUnexpectedToken.withArguments(forToken),
+          forToken,
+          forToken);
+      push(invalidCollectionElement);
+      return;
+    }
+
+    if (constantContext != ConstantContext.none &&
+        !library.loader.target.enableConstantUpdate2018) {
+      handleRecoverableError(
+          fasta.templateCantUseControlFlowOrSpreadAsConstant
+              .withArguments(forToken),
+          forToken,
+          forToken);
+      push(invalidCollectionElement);
+      return;
+    }
+
+    transformCollections = true;
+    List<VariableDeclaration> variables =
+        buildVariableDeclarations(variableOrExpression);
+    Expression condition;
+    if (forest.isExpressionStatement(conditionStatement)) {
+      condition =
+          forest.getExpressionFromExpressionStatement(conditionStatement);
+    } else {
+      assert(forest.isEmptyStatement(conditionStatement));
+    }
+    if (entry is MapEntry) {
+      push(forest.forMapEntry(variables, condition, updates, entry, forToken));
+    } else {
+      push(forest.forElement(
+          variables, condition, updates, toValue(entry), forToken));
+    }
   }
 
   @override
@@ -2339,8 +2413,22 @@
   void handleLiteralList(
       int count, Token leftBracket, Token constKeyword, Token rightBracket) {
     debugEvent("LiteralList");
-    List<Expression> expressions = popListForValue(count);
+
+    // TODO(danrubel): Replace this with popListForValue
+    // when control flow and spread collections have been enabled by default
+    List<Expression> expressions =
+        new List<Expression>.filled(count, null, growable: true);
+    for (int i = count - 1; i >= 0; i--) {
+      var elem = pop();
+      if (elem != invalidCollectionElement) {
+        expressions[i] = toValue(elem);
+      } else {
+        expressions.removeAt(i);
+      }
+    }
+
     List<UnresolvedType<KernelTypeBuilder>> typeArguments = pop();
+
     DartType typeArgument;
     if (typeArguments != null) {
       if (typeArguments.length > 1) {
@@ -2359,6 +2447,7 @@
     } else {
       typeArgument = implicitTypeArgument;
     }
+
     Expression node = forest.literalList(
         constKeyword,
         constKeyword != null || constantContext == ConstantContext.inferred,
@@ -2371,30 +2460,33 @@
     push(node);
   }
 
-  @override
-  void handleLiteralSet(
-      int count, Token leftBrace, Token constKeyword, Token rightBrace) {
-    debugEvent("LiteralSet");
-    List<Expression> expressions = popListForValue(count);
-    List<UnresolvedType<KernelTypeBuilder>> typeArguments = pop();
+  void buildLiteralSet(List<UnresolvedType<KernelTypeBuilder>> typeArguments,
+      Token constKeyword, Token leftBrace, List<dynamic> setOrMapEntries) {
     DartType typeArgument;
     if (typeArguments != null) {
-      if (typeArguments.length > 1) {
-        addProblem(
-            fasta.messageSetLiteralTooManyTypeArguments,
-            offsetForToken(leftBrace),
-            lengthOfSpan(leftBrace, leftBrace.endGroup));
-        typeArgument = const InvalidType();
-      } else {
-        typeArgument = buildDartType(typeArguments.single);
-        if (!library.loader.target.legacyMode) {
-          typeArgument =
-              instantiateToBounds(typeArgument, coreTypes.objectClass);
-        }
+      typeArgument = buildDartType(typeArguments.single);
+      if (!library.loader.target.legacyMode) {
+        typeArgument = instantiateToBounds(typeArgument, coreTypes.objectClass);
       }
     } else {
       typeArgument = implicitTypeArgument;
     }
+
+    var expressions = <Expression>[];
+    if (setOrMapEntries != null) {
+      for (var entry in setOrMapEntries) {
+        if (entry is MapEntry) {
+          // TODO(danrubel): report the error on the colon
+          addProblem(fasta.templateExpectedButGot.withArguments(','),
+              entry.fileOffset, 1);
+        } else {
+          // TODO(danrubel): Revise once control flow and spread
+          //  collection entries are supported.
+          expressions.add(entry as Expression);
+        }
+      }
+    }
+
     Expression node = forest.literalSet(
         constKeyword,
         constKeyword != null || constantContext == ConstantContext.inferred,
@@ -2402,7 +2494,7 @@
         typeArguments,
         leftBrace,
         expressions,
-        rightBrace);
+        leftBrace.endGroup);
     library.checkBoundsInSetLiteral(node, typeEnvironment);
     if (!library.loader.target.enableSetLiterals) {
       internalProblem(
@@ -2414,10 +2506,66 @@
 
   @override
   void handleLiteralSetOrMap(
-      int count, Token leftBrace, Token constKeyword, Token rightBrace) {
+    int count,
+    Token leftBrace,
+    Token constKeyword,
+    Token rightBrace,
+    // TODO(danrubel): hasSetEntry parameter exists for replicating existing
+    // behavior and will be removed once unified collection has been enabled
+    bool hasSetEntry,
+  ) {
     debugEvent("LiteralSetOrMap");
-    // Treat as map literal - type inference will find the right type.
-    handleLiteralMap(count, leftBrace, constKeyword, rightBrace);
+
+    var setOrMapEntries = new List<dynamic>.filled(count, null, growable: true);
+    for (int i = count - 1; i >= 0; i--) {
+      var elem = pop();
+      // TODO(danrubel): Revise this to handle control flow and spread
+      if (elem == invalidCollectionElement) {
+        setOrMapEntries.removeAt(i);
+      } else if (elem is MapEntry) {
+        setOrMapEntries[i] = elem;
+      } else {
+        setOrMapEntries[i] = toValue(elem);
+      }
+    }
+    List<UnresolvedType<KernelTypeBuilder>> typeArguments = pop();
+
+    // Replicate existing behavior that has been removed from the parser.
+    // This will be removed once unified collections is implemented.
+
+    // Determine if this is a set or map based on type args and content
+    // TODO(danrubel): Since type resolution is needed to disambiguate
+    // set or map in some situations, consider always deferring determination
+    // until the type resolution phase.
+    final typeArgCount = typeArguments?.length;
+    bool isSet = typeArgCount == 1 ? true : typeArgCount != null ? false : null;
+
+    for (int i = 0; i < setOrMapEntries.length; ++i) {
+      if (setOrMapEntries[i] is! MapEntry &&
+          !isConvertibleToMapEntry(setOrMapEntries[i])) {
+        hasSetEntry = true;
+      }
+    }
+
+    // TODO(danrubel): If the type arguments are not known (null) then
+    // defer set/map determination until after type resolution as per the
+    // unified collection spec: https://github.com/dart-lang/language/pull/200
+    // rather than trying to guess as done below.
+    isSet ??= hasSetEntry;
+
+    if (isSet) {
+      buildLiteralSet(typeArguments, constKeyword, leftBrace, setOrMapEntries);
+    } else {
+      List<MapEntry> mapEntries = new List<MapEntry>(setOrMapEntries.length);
+      for (int i = 0; i < setOrMapEntries.length; ++i) {
+        if (setOrMapEntries[i] is MapEntry) {
+          mapEntries[i] = setOrMapEntries[i];
+        } else {
+          mapEntries[i] = convertToMapEntry(setOrMapEntries[i], this);
+        }
+      }
+      buildLiteralMap(typeArguments, constKeyword, leftBrace, mapEntries);
+    }
   }
 
   @override
@@ -2440,30 +2588,12 @@
     push(forest.literalNull(token));
   }
 
-  @override
-  void handleLiteralMap(
-      int count, Token leftBrace, Token constKeyword, Token rightBrace) {
-    debugEvent("LiteralMap");
-
-    // TODO(danrubel): Revise once spread collection entries are supported.
-    // For now, drop those on the floor
-    // as error(s) have already been reported in handleSpreadExpression.
-    List<MapEntry> entries = <MapEntry>[];
-    const FixedNullableList<dynamic>().pop(stack, count)?.forEach((entry) {
-      if (entry is MapEntry) {
-        entries.add(entry);
-      }
-    });
-
-    List<UnresolvedType<KernelTypeBuilder>> typeArguments = pop();
+  void buildLiteralMap(List<UnresolvedType<KernelTypeBuilder>> typeArguments,
+      Token constKeyword, Token leftBrace, List<MapEntry> entries) {
     DartType keyType;
     DartType valueType;
     if (typeArguments != null) {
       if (typeArguments.length != 2) {
-        addProblem(
-            fasta.messageMapLiteralTypeArgumentMismatch,
-            offsetForToken(leftBrace),
-            lengthOfSpan(leftBrace, leftBrace.endGroup));
         keyType = const InvalidType();
         valueType = const InvalidType();
       } else {
@@ -2479,6 +2609,7 @@
       keyType = implicitTypeArgument;
       valueType = implicitTypeArgument;
     }
+
     Expression node = forest.literalMap(
         constKeyword,
         constKeyword != null || constantContext == ConstantContext.inferred,
@@ -2487,7 +2618,7 @@
         typeArguments,
         leftBrace,
         entries,
-        rightBrace);
+        leftBrace.endGroup);
     library.checkBoundsInMapLiteral(node, typeEnvironment);
     push(node);
   }
@@ -2539,6 +2670,11 @@
   }
 
   @override
+  void handleNonNullAssertExpression(Token bang) {
+    reportNonNullAssertExpressionNotEnabled(bang);
+  }
+
+  @override
   void handleType(Token beginToken, Token questionMark) {
     // TODO(ahe): The scope is wrong for return types of generic functions.
     debugEvent("Type");
@@ -2648,7 +2784,8 @@
     DartType type = buildDartType(pop());
     library.checkBoundsInType(type, typeEnvironment, operator.charOffset);
     Expression expression = popForValue();
-    if (constantContext != ConstantContext.none) {
+    if (!library.loader.target.enableConstantUpdate2018 &&
+        constantContext != ConstantContext.none) {
       push(desugarSyntheticExpression(buildProblem(
           fasta.templateNotConstantExpression.withArguments('As expression'),
           operator.charOffset,
@@ -2672,7 +2809,8 @@
       typePromoter?.handleIsCheck(isExpression, isInverted, operand.variable,
           type, functionNestingLevel);
     }
-    if (constantContext != ConstantContext.none) {
+    if (!library.loader.target.enableConstantUpdate2018 &&
+        constantContext != ConstantContext.none) {
       push(desugarSyntheticExpression(buildProblem(
           fasta.templateNotConstantExpression.withArguments('Is expression'),
           isOperator.charOffset,
@@ -2796,7 +2934,7 @@
     }
     if (annotations != null) {
       if (functionNestingLevel == 0) {
-        _typeInferrer?.inferMetadata(this, annotations);
+        inferAnnotations(annotations);
       }
       for (Expression annotation in annotations) {
         variable.addAnnotation(annotation);
@@ -2854,7 +2992,7 @@
   @override
   void beginFormalParameterDefaultValueExpression() {
     super.push(constantContext);
-    constantContext = ConstantContext.none;
+    constantContext = ConstantContext.required;
   }
 
   @override
@@ -3554,44 +3692,168 @@
         token.next, token.offset, Constness.explicitConst);
   }
 
+  @override
   void beginIfControlFlow(Token ifToken) {
-    // TODO(danrubel): remove this when control flow support is added
+    // TODO(danrubel): consider removing this when control flow support is added
+    // if the ifToken is not needed for error reporting
     push(ifToken);
   }
 
   @override
+  void beginThenControlFlow(Token token) {
+    Expression condition = popForValue();
+    enterThenForTypePromotion(condition);
+    push(condition);
+    super.beginThenControlFlow(token);
+  }
+
+  @override
+  void handleElseControlFlow(Token elseToken) {
+    typePromoter?.enterElse();
+  }
+
+  @override
   void endIfControlFlow(Token token) {
     debugEvent("endIfControlFlow");
-    // TODO(danrubel) implement control flow support
     var entry = pop();
-    pop(); // parenthesized expression
+    var condition = pop(); // parenthesized expression
     Token ifToken = pop();
-    push(entry); // push the entry back on the stack and drop the rest
-    handleRecoverableError(
-        fasta.templateUnexpectedToken.withArguments(ifToken), ifToken, ifToken);
+    typePromoter?.enterElse();
+    typePromoter?.exitConditional();
+    if (!library.loader.target.enableControlFlowCollections) {
+      // TODO(danrubel): Report a more user friendly error message
+      // when an experiment is not enabled
+      handleRecoverableError(
+          fasta.templateUnexpectedToken.withArguments(ifToken),
+          ifToken,
+          ifToken);
+      push(invalidCollectionElement);
+      return;
+    }
+
+    if (constantContext != ConstantContext.none &&
+        !library.loader.target.enableConstantUpdate2018) {
+      handleRecoverableError(
+          fasta.templateCantUseControlFlowOrSpreadAsConstant
+              .withArguments(ifToken),
+          ifToken,
+          ifToken);
+      push(invalidCollectionElement);
+      return;
+    }
+
+    transformCollections = true;
+    if (entry is MapEntry) {
+      push(forest.ifMapEntry(toValue(condition), entry, null, ifToken));
+    } else {
+      push(forest.ifElement(toValue(condition), toValue(entry), null, ifToken));
+    }
   }
 
   @override
   void endIfElseControlFlow(Token token) {
     debugEvent("endIfElseControlFlow");
-    // TODO(danrubel) implement control flow support
-    pop(); // else entry
-    var entry = pop(); // then entry
-    pop(); // parenthesized expression
+    var elseEntry = pop(); // else entry
+    var thenEntry = pop(); // then entry
+    var condition = pop(); // parenthesized expression
     Token ifToken = pop();
-    push(entry); // push the entry back on the stack and drop the rest
-    handleRecoverableError(
-        fasta.templateUnexpectedToken.withArguments(ifToken), ifToken, ifToken);
+    typePromoter?.exitConditional();
+    if (!library.loader.target.enableControlFlowCollections) {
+      // TODO(danrubel): Report a more user friendly error message
+      // when an experiment is not enabled
+      handleRecoverableError(
+          fasta.templateUnexpectedToken.withArguments(ifToken),
+          ifToken,
+          ifToken);
+      push(invalidCollectionElement);
+      return;
+    }
+
+    if (constantContext != ConstantContext.none &&
+        !library.loader.target.enableConstantUpdate2018) {
+      handleRecoverableError(
+          fasta.templateCantUseControlFlowOrSpreadAsConstant
+              .withArguments(ifToken),
+          ifToken,
+          ifToken);
+      push(invalidCollectionElement);
+      return;
+    }
+
+    transformCollections = true;
+    if (thenEntry is MapEntry) {
+      if (elseEntry is MapEntry) {
+        push(forest.ifMapEntry(
+            toValue(condition), thenEntry, elseEntry, ifToken));
+      } else if (elseEntry is SpreadElement) {
+        push(forest.ifMapEntry(
+            toValue(condition),
+            thenEntry,
+            new SpreadMapEntry(elseEntry.expression, elseEntry.isNullAware),
+            ifToken));
+      } else {
+        int offset = elseEntry is Expression
+            ? elseEntry.fileOffset
+            : offsetForToken(ifToken);
+        push(new MapEntry(
+            desugarSyntheticExpression(buildProblem(
+                fasta.templateExpectedAfterButGot.withArguments(':'),
+                offset,
+                1)),
+            new NullLiteral())
+          ..fileOffset = offsetForToken(ifToken));
+      }
+    } else if (elseEntry is MapEntry) {
+      if (thenEntry is SpreadElement) {
+        push(forest.ifMapEntry(
+            toValue(condition),
+            new SpreadMapEntry(thenEntry.expression, thenEntry.isNullAware),
+            elseEntry,
+            ifToken));
+      } else {
+        int offset = thenEntry is Expression
+            ? thenEntry.fileOffset
+            : offsetForToken(ifToken);
+        push(new MapEntry(
+            desugarSyntheticExpression(buildProblem(
+                fasta.templateExpectedAfterButGot.withArguments(':'),
+                offset,
+                1)),
+            new NullLiteral())
+          ..fileOffset = offsetForToken(ifToken));
+      }
+    } else {
+      push(forest.ifElement(
+          toValue(condition), toValue(thenEntry), toValue(elseEntry), ifToken));
+    }
   }
 
   @override
   void handleSpreadExpression(Token spreadToken) {
     debugEvent("SpreadExpression");
-    // TODO(danrubel) implement spread expression support
-    handleRecoverableError(
-        fasta.templateUnexpectedToken.withArguments(spreadToken),
-        spreadToken,
-        spreadToken);
+    var expression = pop();
+    if (!library.loader.target.enableSpreadCollections) {
+      handleRecoverableError(
+          fasta.templateUnexpectedToken.withArguments(spreadToken),
+          spreadToken,
+          spreadToken);
+      push(invalidCollectionElement);
+      return;
+    }
+
+    if (constantContext != ConstantContext.none &&
+        !library.loader.target.enableConstantUpdate2018) {
+      handleRecoverableError(
+          fasta.templateCantUseControlFlowOrSpreadAsConstant
+              .withArguments(spreadToken),
+          spreadToken,
+          spreadToken);
+      push(invalidCollectionElement);
+      return;
+    }
+
+    transformCollections = true;
+    push(forest.spreadElement(toValue(expression), spreadToken));
   }
 
   @override
@@ -3616,7 +3878,7 @@
           this, token, inInitializer, inFieldInitializer));
     } else {
       push(new IncompleteErrorGenerator(
-          this, token, null, fasta.messageThisAsIdentifier));
+          this, token, fasta.messageThisAsIdentifier));
     }
   }
 
@@ -3631,7 +3893,7 @@
           isSuper: true));
     } else {
       push(new IncompleteErrorGenerator(
-          this, token, null, fasta.messageSuperAsIdentifier));
+          this, token, fasta.messageSuperAsIdentifier));
     }
   }
 
@@ -3882,22 +4144,123 @@
 
   @override
   void endForInControlFlow(Token token) {
-    debugEvent("endForInControlFlow");
-    // TODO(danrubel) implement control flow support
+    debugEvent("ForInControlFlow");
     var entry = pop();
-
-    pop(); // `in` keyword
+    Token inToken = pop();
     Token forToken = pop();
-    pop(NullValue.AwaitToken); // await token
+    Token awaitToken = pop(NullValue.AwaitToken);
+    Expression iterable = popForValue();
+    Object lvalue = pop(); // lvalue
+    exitLocalScope();
 
-    popForValue(); // expression
-    pop(); // lvalue
+    if (!library.loader.target.enableControlFlowCollections) {
+      // TODO(danrubel): Report a more user friendly error message
+      // when an experiment is not enabled
+      handleRecoverableError(
+          fasta.templateUnexpectedToken.withArguments(forToken),
+          forToken,
+          forToken);
+      push(invalidCollectionElement);
+      return;
+    }
 
-    push(entry); // push the entry back on the stack and drop the rest
-    handleRecoverableError(
-        fasta.templateUnexpectedToken.withArguments(forToken),
-        forToken,
-        forToken);
+    if (constantContext != ConstantContext.none &&
+        !library.loader.target.enableConstantUpdate2018) {
+      handleRecoverableError(
+          fasta.templateCantUseControlFlowOrSpreadAsConstant
+              .withArguments(forToken),
+          forToken,
+          forToken);
+      push(invalidCollectionElement);
+      return;
+    }
+
+    transformCollections = true;
+    VariableDeclaration variable = buildForInVariable(lvalue);
+    Expression problem = checkForInVariable(lvalue, variable, forToken);
+    Statement prologue = buildForInBody(lvalue, variable, forToken, inToken);
+    if (entry is MapEntry) {
+      push(forest.forInMapEntry(
+          variable, iterable, prologue, entry, problem, forToken,
+          isAsync: awaitToken != null));
+    } else {
+      push(forest.forInElement(
+          variable, iterable, prologue, toValue(entry), problem, forToken,
+          isAsync: awaitToken != null));
+    }
+  }
+
+  VariableDeclaration buildForInVariable(Object lvalue) {
+    if (lvalue is VariableDeclaration) return lvalue;
+    return new VariableDeclarationJudgment.forValue(null, functionNestingLevel);
+  }
+
+  Expression checkForInVariable(
+      Object lvalue, VariableDeclaration variable, Token forToken) {
+    if (lvalue is VariableDeclaration) {
+      if (variable.isConst) {
+        return buildProblem(fasta.messageForInLoopWithConstVariable,
+            variable.fileOffset, variable.name.length);
+      }
+    } else if (lvalue is! Generator) {
+      Message message = forest.isVariablesDeclaration(lvalue)
+          ? fasta.messageForInLoopExactlyOneVariable
+          : fasta.messageForInLoopNotAssignable;
+      Token token = forToken.next.next;
+      return buildProblem(
+          message, offsetForToken(token), lengthForToken(token));
+    }
+    return null;
+  }
+
+  Statement buildForInBody(Object lvalue, VariableDeclaration variable,
+      Token forToken, Token inKeyword) {
+    if (lvalue is VariableDeclaration) return null;
+    if (lvalue is Generator) {
+      /// We are in this case, where `lvalue` isn't a [VariableDeclaration]:
+      ///
+      ///     for (lvalue in expression) body
+      ///
+      /// This is normalized to:
+      ///
+      ///     for (final #t in expression) {
+      ///       lvalue = #t;
+      ///       body;
+      ///     }
+      TypePromotionFact fact =
+          typePromoter?.getFactForAccess(variable, functionNestingLevel);
+      TypePromotionScope scope = typePromoter?.currentScope;
+      Expression syntheticAssignment = lvalue.buildAssignment(
+          new VariableGetJudgment(variable, fact, scope)
+            ..fileOffset = inKeyword.offset,
+          voidContext: true);
+      if (syntheticAssignment is shadow.SyntheticExpressionJudgment) {
+        syntheticAssignment = wrapSyntheticExpression(
+            desugarSyntheticExpression(syntheticAssignment),
+            offsetForToken(lvalue.token));
+      }
+      return forest.expressionStatement(syntheticAssignment, null);
+    }
+    Message message = forest.isVariablesDeclaration(lvalue)
+        ? fasta.messageForInLoopExactlyOneVariable
+        : fasta.messageForInLoopNotAssignable;
+    Token token = forToken.next.next;
+    Statement body;
+    if (forest.isVariablesDeclaration(lvalue)) {
+      body = forest.block(
+          null,
+          // New list because the declarations are not a growable list.
+          new List<Statement>.from(
+              forest.variablesDeclarationExtractDeclarations(lvalue)),
+          null);
+    } else {
+      body = forest.expressionStatement(lvalue, null);
+    }
+    return combineStatements(
+        forest.expressionStatement(
+            buildProblem(message, offsetForToken(token), lengthForToken(token)),
+            null),
+        body);
   }
 
   @override
@@ -3918,67 +4281,22 @@
       body = forest.syntheticLabeledStatement(body);
       continueTarget.resolveContinues(forest, body);
     }
-    VariableDeclaration variable;
-    Expression problem;
-    if (lvalue is VariableDeclaration) {
-      variable = lvalue;
-      if (variable.isConst) {
-        problem = buildProblem(fasta.messageForInLoopWithConstVariable,
-            variable.fileOffset, variable.name.length);
-      }
-    } else if (lvalue is Generator) {
-      /// We are in this case, where `lvalue` isn't a [VariableDeclaration]:
-      ///
-      ///     for (lvalue in expression) body
-      ///
-      /// This is normalized to:
-      ///
-      ///     for (final #t in expression) {
-      ///       lvalue = #t;
-      ///       body;
-      ///     }
-      variable =
-          new VariableDeclarationJudgment.forValue(null, functionNestingLevel);
-      TypePromotionFact fact =
-          typePromoter?.getFactForAccess(variable, functionNestingLevel);
-      TypePromotionScope scope = typePromoter?.currentScope;
-      Expression syntheticAssignment = lvalue.buildAssignment(
-          new VariableGetJudgment(variable, fact, scope)
-            ..fileOffset = inKeyword.offset,
-          voidContext: true);
-      if (syntheticAssignment is shadow.SyntheticExpressionJudgment) {
-        syntheticAssignment = wrapSyntheticExpression(
-            desugarSyntheticExpression(syntheticAssignment),
-            offsetForToken(lvalue.token));
-      }
-      body = combineStatements(
-          forest.expressionStatement(syntheticAssignment, null), body);
-    } else {
-      Message message = forest.isVariablesDeclaration(lvalue)
-          ? fasta.messageForInLoopExactlyOneVariable
-          : fasta.messageForInLoopNotAssignable;
-      Token token = forToken.next.next;
-      variable =
-          new VariableDeclarationJudgment.forValue(null, functionNestingLevel);
-      problem =
-          buildProblem(message, offsetForToken(token), lengthForToken(token));
-      if (forest.isVariablesDeclaration(lvalue)) {
-        body = forest.block(
-            null,
-            <Statement>[]
-              ..addAll(forest.variablesDeclarationExtractDeclarations(lvalue))
-              ..add(body),
-            null);
+    VariableDeclaration variable = buildForInVariable(lvalue);
+    Expression problem = checkForInVariable(lvalue, variable, forToken);
+    Statement prologue = buildForInBody(lvalue, variable, forToken, inKeyword);
+    if (prologue != null) {
+      if (prologue is Block) {
+        if (body is Block) {
+          for (Statement statement in body.statements) {
+            prologue.addStatement(statement);
+          }
+        } else {
+          prologue.addStatement(body);
+        }
+        body = prologue;
       } else {
-        body =
-            combineStatements(forest.expressionStatement(lvalue, null), body);
+        body = combineStatements(prologue, body);
       }
-      body = combineStatements(
-          forest.expressionStatement(
-              buildProblem(
-                  message, offsetForToken(token), lengthForToken(token)),
-              null),
-          body);
     }
     Statement result = new ForInStatement(variable, expression, body,
         isAsync: awaitToken != null)
@@ -4396,7 +4714,7 @@
     KernelTypeVariableBuilder variable = new KernelTypeVariableBuilder(
         name.name, library, name.charOffset, null);
     if (annotations != null) {
-      _typeInferrer?.inferMetadata(this, annotations);
+      inferAnnotations(annotations);
       for (Expression annotation in annotations) {
         variable.parameter.addAnnotation(annotation);
       }
@@ -4801,7 +5119,7 @@
           addProblem(message.messageObject, message.charOffset, message.length);
           suppressMessage = true;
         }
-      } else if (constantContext != ConstantContext.none) {
+      } else if (constantContext == ConstantContext.inferred) {
         message = fasta.messageTypeVariableInConstantContext.withLocation(
             unresolved.fileUri,
             unresolved.charOffset,
diff --git a/pkg/front_end/lib/src/fasta/kernel/class_hierarchy_builder.dart b/pkg/front_end/lib/src/fasta/kernel/class_hierarchy_builder.dart
index 89f7efa..2593336 100644
--- a/pkg/front_end/lib/src/fasta/kernel/class_hierarchy_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/class_hierarchy_builder.dart
@@ -195,6 +195,43 @@
         .substituteType(supertype.build(null));
   }
 
+  InterfaceType getKernelLegacyLeastUpperBound(
+      InterfaceType type1, InterfaceType type2) {
+    if (type1 == type2) return type1;
+    ClassHierarchyNode node1 = getNodeFromKernelClass(type1.classNode);
+    ClassHierarchyNode node2 = getNodeFromKernelClass(type2.classNode);
+    Set<ClassHierarchyNode> nodes1 = node1.computeAllSuperNodes(this).toSet();
+    List<ClassHierarchyNode> nodes2 = node2.computeAllSuperNodes(this);
+    List<ClassHierarchyNode> common = <ClassHierarchyNode>[];
+
+    for (int i = 0; i < nodes2.length; i++) {
+      ClassHierarchyNode node = nodes2[i];
+      if (node == null) continue;
+      if (nodes1.contains(node)) {
+        DartType candidate1 = getKernelTypeAsInstanceOf(type1, node.cls.target);
+        DartType candidate2 = getKernelTypeAsInstanceOf(type2, node.cls.target);
+        if (candidate1 == candidate2) {
+          common.add(node);
+        }
+      }
+    }
+
+    if (common.length == 1) return objectKernelClass.rawType;
+    common.sort(ClassHierarchyNode.compareMaxInheritancePath);
+
+    for (int i = 0; i < common.length - 1; i++) {
+      ClassHierarchyNode node = common[i];
+      if (node.maxInheritancePath != common[i + 1].maxInheritancePath) {
+        return getKernelTypeAsInstanceOf(type1, node.cls.target);
+      } else {
+        do {
+          i++;
+        } while (node.maxInheritancePath == common[i + 1].maxInheritancePath);
+      }
+    }
+    return objectKernelClass.rawType;
+  }
+
   static ClassHierarchyBuilder build(
       KernelClassBuilder objectClass,
       List<KernelClassBuilder> classes,
@@ -430,13 +467,17 @@
 
     List<KernelTypeBuilder> interfaces;
 
+    int maxInheritancePath;
+
     if (supernode == null) {
       // This should be Object.
       classMembers = localMembers;
       classSetters = localSetters;
       superclasses = new List<KernelTypeBuilder>(0);
       interfaces = new List<KernelTypeBuilder>(0);
+      maxInheritancePath = 0;
     } else {
+      maxInheritancePath = supernode.maxInheritancePath + 1;
       superclasses =
           new List<KernelTypeBuilder>(supernode.superclasses.length + 1);
       superclasses.setRange(0, superclasses.length - 1,
@@ -479,19 +520,23 @@
           }
         }
         for (int i = 0; i < directInterfaces.length; i++) {
-          addInterface(interfaces, superclasses, directInterfaces[i]);
+          KernelTypeBuilder directInterface = directInterfaces[i];
+          addInterface(interfaces, superclasses, directInterface);
           ClassHierarchyNode interfaceNode =
-              hierarchy.getNodeFromType(directInterfaces[i]);
+              hierarchy.getNodeFromType(directInterface);
           if (interfaceNode != null) {
-            List<KernelTypeBuilder> types = substSupertypes(
-                directInterfaces[i], interfaceNode.superclasses);
+            if (maxInheritancePath < interfaceNode.maxInheritancePath + 1) {
+              maxInheritancePath = interfaceNode.maxInheritancePath + 1;
+            }
+            List<KernelTypeBuilder> types =
+                substSupertypes(directInterface, interfaceNode.superclasses);
             for (int i = 0; i < types.length; i++) {
               addInterface(interfaces, superclasses, types[i]);
             }
 
             if (interfaceNode.interfaces != null) {
-              List<KernelTypeBuilder> types = substSupertypes(
-                  directInterfaces[i], interfaceNode.interfaces);
+              List<KernelTypeBuilder> types =
+                  substSupertypes(directInterface, interfaceNode.interfaces);
               for (int i = 0; i < types.length; i++) {
                 addInterface(interfaces, superclasses, types[i]);
               }
@@ -501,7 +546,7 @@
       } else {
         interfaceMembers = supernode.interfaceMembers;
         interfaceSetters = supernode.interfaceSetters;
-        interfaces = supernode.interfaces;
+        interfaces = substSupertypes(cls.supertype, supernode.interfaces);
       }
       if (interfaceMembers != null) {
         interfaceMembers =
@@ -535,6 +580,7 @@
       interfaceSetters,
       superclasses,
       interfaces,
+      maxInheritancePath,
     );
   }
 
@@ -787,7 +833,6 @@
   }
 
   void inferMixinApplication() {
-    if (!hierarchy.loader.target.backendTarget.legacyMode) return;
     Class kernelClass = cls.target;
     Supertype kernelMixedInType = kernelClass.mixedInType;
     if (kernelMixedInType == null) return;
@@ -843,6 +888,9 @@
   /// any classes from [superclasses].
   final List<KernelTypeBuilder> interfaces;
 
+  /// The longest inheritance path from [cls] to `Object`.
+  final int maxInheritancePath;
+
   int get depth => superclasses.length;
 
   ClassHierarchyNode(
@@ -852,14 +900,41 @@
       this.interfaceMembers,
       this.interfaceSetters,
       this.superclasses,
-      this.interfaces);
+      this.interfaces,
+      this.maxInheritancePath);
+
+  /// Returns a list of all supertypes of [cls], including this node.
+  List<ClassHierarchyNode> computeAllSuperNodes(
+      ClassHierarchyBuilder hierarchy) {
+    List<ClassHierarchyNode> result = new List<ClassHierarchyNode>(
+        1 + superclasses.length + interfaces.length);
+    for (int i = 0; i < superclasses.length; i++) {
+      Declaration declaration = superclasses[i].declaration;
+      if (declaration is KernelClassBuilder) {
+        result[i] = hierarchy.getNodeFromClass(declaration);
+      }
+    }
+    for (int i = 0; i < interfaces.length; i++) {
+      Declaration declaration = interfaces[i].declaration;
+      if (declaration is KernelClassBuilder) {
+        result[i + superclasses.length] =
+            hierarchy.getNodeFromClass(declaration);
+      }
+    }
+    return result..last = this;
+  }
 
   String toString([StringBuffer sb]) {
     sb ??= new StringBuffer();
     sb
       ..write(cls.fullNameForErrors)
-      ..writeln(":")
-      ..writeln("  superclasses:");
+      ..writeln(":");
+    if (maxInheritancePath != this.depth) {
+      sb
+        ..write("  Longest path to Object: ")
+        ..writeln(maxInheritancePath);
+    }
+    sb..writeln("  superclasses:");
     int depth = 0;
     for (KernelTypeBuilder superclass in superclasses) {
       sb.write("  " * (depth + 2));
@@ -904,6 +979,11 @@
         ..writeln();
     }
   }
+
+  static int compareMaxInheritancePath(
+      ClassHierarchyNode a, ClassHierarchyNode b) {
+    return b.maxInheritancePath.compareTo(a.maxInheritancePath);
+  }
 }
 
 class MergeResult {
@@ -1040,7 +1120,6 @@
   @override
   InterfaceType getLegacyLeastUpperBound(
       InterfaceType type1, InterfaceType type2) {
-    // TODO(ahe): Compute the actual LUB.
-    return type1;
+    return hierarchy.getKernelLegacyLeastUpperBound(type1, type2);
   }
 }
diff --git a/pkg/front_end/lib/src/fasta/kernel/collections.dart b/pkg/front_end/lib/src/fasta/kernel/collections.dart
new file mode 100644
index 0000000..a943ece
--- /dev/null
+++ b/pkg/front_end/lib/src/fasta/kernel/collections.dart
@@ -0,0 +1,476 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+library fasta.collections;
+
+import 'dart:core' hide MapEntry;
+
+import 'package:kernel/ast.dart'
+    show
+        DartType,
+        Expression,
+        MapEntry,
+        NullLiteral,
+        Statement,
+        TreeNode,
+        VariableDeclaration,
+        setParents,
+        transformList,
+        visitList;
+
+import 'package:kernel/type_environment.dart' show TypeEnvironment;
+
+import 'package:kernel/visitor.dart'
+    show
+        ExpressionVisitor,
+        ExpressionVisitor1,
+        Transformer,
+        TreeVisitor,
+        Visitor;
+
+import '../messages.dart'
+    show templateExpectedAfterButGot, templateExpectedButGot;
+
+import '../problems.dart' show getFileUri, unsupported;
+
+import '../type_inference/inference_helper.dart' show InferenceHelper;
+
+/// Mixin for spread and control-flow elements.
+///
+/// Spread and control-flow elements are not truly expressions and they cannot
+/// appear in arbitrary expression contexts in the Kernel program.  They can
+/// only appear as elements in list or set literals.  They are translated into
+/// a lower-level representation and never serialized to .dill files.
+mixin ControlFlowElement on Expression {
+  /// Spread and contol-flow elements are not expressions and do not have a
+  /// static type.
+  @override
+  DartType getStaticType(TypeEnvironment types) {
+    return unsupported("getStaticType", fileOffset, getFileUri(this));
+  }
+
+  @override
+  accept(ExpressionVisitor<Object> v) => v.defaultExpression(this);
+
+  @override
+  accept1(ExpressionVisitor1<Object, Object> v, arg) =>
+      v.defaultExpression(this, arg);
+}
+
+/// A spread element in a list or set literal.
+class SpreadElement extends Expression with ControlFlowElement {
+  Expression expression;
+  bool isNullAware;
+
+  /// The type of the elements of the collection that [expression] evaluates to.
+  ///
+  /// It is set during type inference and is used to add appropriate type casts
+  /// during the desugaring.
+  DartType elementType;
+
+  SpreadElement(this.expression, this.isNullAware) {
+    expression?.parent = this;
+  }
+
+  @override
+  visitChildren(Visitor<Object> v) {
+    expression?.accept(v);
+  }
+
+  @override
+  transformChildren(Transformer v) {
+    if (expression != null) {
+      expression = expression.accept(v);
+      expression?.parent = this;
+    }
+  }
+}
+
+/// An 'if' element in a list or set literal.
+class IfElement extends Expression with ControlFlowElement {
+  Expression condition;
+  Expression then;
+  Expression otherwise;
+
+  IfElement(this.condition, this.then, this.otherwise) {
+    condition?.parent = this;
+    then?.parent = this;
+    otherwise?.parent = this;
+  }
+
+  @override
+  visitChildren(Visitor<Object> v) {
+    condition?.accept(v);
+    then?.accept(v);
+    otherwise?.accept(v);
+  }
+
+  @override
+  transformChildren(Transformer v) {
+    if (condition != null) {
+      condition = condition.accept(v);
+      condition?.parent = this;
+    }
+    if (then != null) {
+      then = then.accept(v);
+      then?.parent = this;
+    }
+    if (otherwise != null) {
+      otherwise = otherwise.accept(v);
+      otherwise?.parent = this;
+    }
+  }
+}
+
+/// A 'for' element in a list or set literal.
+class ForElement extends Expression with ControlFlowElement {
+  final List<VariableDeclaration> variables; // May be empty, but not null.
+  Expression condition; // May be null.
+  final List<Expression> updates; // May be empty, but not null.
+  Expression body;
+
+  ForElement(this.variables, this.condition, this.updates, this.body) {
+    setParents(variables, this);
+    condition?.parent = this;
+    setParents(updates, this);
+    body?.parent = this;
+  }
+
+  @override
+  visitChildren(Visitor<Object> v) {
+    visitList(variables, v);
+    condition?.accept(v);
+    visitList(updates, v);
+    body?.accept(v);
+  }
+
+  @override
+  transformChildren(Transformer v) {
+    transformList(variables, v, this);
+    if (condition != null) {
+      condition = condition.accept(v);
+      condition?.parent = this;
+    }
+    transformList(updates, v, this);
+    if (body != null) {
+      body = body.accept(v);
+      body?.parent = this;
+    }
+  }
+}
+
+/// A 'for-in' element in a list or set literal.
+class ForInElement extends Expression with ControlFlowElement {
+  VariableDeclaration variable; // Has no initializer.
+  Expression iterable;
+  Statement prologue; // May be null.
+  Expression body;
+  Expression problem; // May be null.
+  bool isAsync; // True if this is an 'await for' loop.
+
+  ForInElement(
+      this.variable, this.iterable, this.prologue, this.body, this.problem,
+      {this.isAsync: false}) {
+    variable?.parent = this;
+    iterable?.parent = this;
+    prologue?.parent = this;
+    body?.parent = this;
+    problem?.parent = this;
+  }
+
+  visitChildren(Visitor<Object> v) {
+    variable?.accept(v);
+    iterable?.accept(v);
+    prologue?.accept(v);
+    body?.accept(v);
+    problem?.accept(v);
+  }
+
+  transformChildren(Transformer v) {
+    if (variable != null) {
+      variable = variable.accept(v);
+      variable?.parent = this;
+    }
+    if (iterable != null) {
+      iterable = iterable.accept(v);
+      iterable?.parent = this;
+    }
+    if (prologue != null) {
+      prologue = prologue.accept(v);
+      prologue?.parent = this;
+    }
+    if (body != null) {
+      body = body.accept(v);
+      body?.parent = this;
+    }
+    if (problem != null) {
+      problem = problem.accept(v);
+      problem?.parent = this;
+    }
+  }
+}
+
+mixin ControlFlowMapEntry implements MapEntry {
+  @override
+  Expression get key {
+    throw UnsupportedError('ControlFlowMapEntry.key getter');
+  }
+
+  @override
+  void set key(Expression expr) {
+    throw UnsupportedError('ControlFlowMapEntry.key setter');
+  }
+
+  @override
+  Expression get value {
+    throw UnsupportedError('ControlFlowMapEntry.value getter');
+  }
+
+  @override
+  void set value(Expression expr) {
+    throw UnsupportedError('ControlFlowMapEntry.value setter');
+  }
+
+  @override
+  accept(TreeVisitor<Object> v) => v.defaultTreeNode(this);
+}
+
+/// A spread element in a map literal.
+class SpreadMapEntry extends TreeNode with ControlFlowMapEntry {
+  Expression expression;
+  bool isNullAware;
+
+  /// The type of the map entries of the map that [expression] evaluates to.
+  ///
+  /// It is set during type inference and is used to add appropriate type casts
+  /// during the desugaring.
+  DartType entryType;
+
+  SpreadMapEntry(this.expression, this.isNullAware) {
+    expression?.parent = this;
+  }
+
+  @override
+  visitChildren(Visitor<Object> v) {
+    expression?.accept(v);
+  }
+
+  @override
+  transformChildren(Transformer v) {
+    if (expression != null) {
+      expression = expression.accept(v);
+      expression?.parent = this;
+    }
+  }
+}
+
+/// An 'if' element in a map literal.
+class IfMapEntry extends TreeNode with ControlFlowMapEntry {
+  Expression condition;
+  MapEntry then;
+  MapEntry otherwise;
+
+  IfMapEntry(this.condition, this.then, this.otherwise) {
+    condition?.parent = this;
+    then?.parent = this;
+    otherwise?.parent = this;
+  }
+
+  @override
+  visitChildren(Visitor<Object> v) {
+    condition?.accept(v);
+    then?.accept(v);
+    otherwise?.accept(v);
+  }
+
+  @override
+  transformChildren(Transformer v) {
+    if (condition != null) {
+      condition = condition.accept(v);
+      condition?.parent = this;
+    }
+    if (then != null) {
+      then = then.accept(v);
+      then?.parent = this;
+    }
+    if (otherwise != null) {
+      otherwise = otherwise.accept(v);
+      otherwise?.parent = this;
+    }
+  }
+}
+
+/// A 'for' element in a map literal.
+class ForMapEntry extends TreeNode with ControlFlowMapEntry {
+  final List<VariableDeclaration> variables; // May be empty, but not null.
+  Expression condition; // May be null.
+  final List<Expression> updates; // May be empty, but not null.
+  MapEntry body;
+
+  ForMapEntry(this.variables, this.condition, this.updates, this.body) {
+    setParents(variables, this);
+    condition?.parent = this;
+    setParents(updates, this);
+    body?.parent = this;
+  }
+
+  @override
+  visitChildren(Visitor<Object> v) {
+    visitList(variables, v);
+    condition?.accept(v);
+    visitList(updates, v);
+    body?.accept(v);
+  }
+
+  @override
+  transformChildren(Transformer v) {
+    transformList(variables, v, this);
+    if (condition != null) {
+      condition = condition.accept(v);
+      condition?.parent = this;
+    }
+    transformList(updates, v, this);
+    if (body != null) {
+      body = body.accept(v);
+      body?.parent = this;
+    }
+  }
+}
+
+/// A 'for-in' element in a map literal.
+class ForInMapEntry extends TreeNode with ControlFlowMapEntry {
+  VariableDeclaration variable; // Has no initializer.
+  Expression iterable;
+  Statement prologue; // May be null.
+  MapEntry body;
+  Expression problem; // May be null.
+  bool isAsync; // True if this is an 'await for' loop.
+
+  ForInMapEntry(
+      this.variable, this.iterable, this.prologue, this.body, this.problem,
+      {this.isAsync: false}) {
+    variable?.parent = this;
+    iterable?.parent = this;
+    prologue?.parent = this;
+    body?.parent = this;
+    problem?.parent = this;
+  }
+
+  visitChildren(Visitor<Object> v) {
+    variable?.accept(v);
+    iterable?.accept(v);
+    prologue?.accept(v);
+    body?.accept(v);
+    problem?.accept(v);
+  }
+
+  transformChildren(Transformer v) {
+    if (variable != null) {
+      variable = variable.accept(v);
+      variable?.parent = this;
+    }
+    if (iterable != null) {
+      iterable = iterable.accept(v);
+      iterable?.parent = this;
+    }
+    if (prologue != null) {
+      prologue = prologue.accept(v);
+      prologue?.parent = this;
+    }
+    if (body != null) {
+      body = body.accept(v);
+      body?.parent = this;
+    }
+    if (problem != null) {
+      problem = problem.accept(v);
+      problem?.parent = this;
+    }
+  }
+}
+
+Expression convertToElement(MapEntry entry, InferenceHelper helper) {
+  if (entry is SpreadMapEntry) {
+    return new SpreadElement(entry.expression, entry.isNullAware)
+      ..fileOffset = entry.expression.fileOffset;
+  }
+  if (entry is IfMapEntry) {
+    return new IfElement(
+        entry.condition,
+        convertToElement(entry.then, helper),
+        entry.otherwise == null
+            ? null
+            : convertToElement(entry.otherwise, helper))
+      ..fileOffset = entry.fileOffset;
+  }
+  if (entry is ForMapEntry) {
+    return new ForElement(entry.variables, entry.condition, entry.updates,
+        convertToElement(entry.body, helper))
+      ..fileOffset = entry.fileOffset;
+  }
+  if (entry is ForInMapEntry) {
+    return new ForInElement(entry.variable, entry.iterable, entry.prologue,
+        convertToElement(entry.body, helper), entry.problem,
+        isAsync: entry.isAsync)
+      ..fileOffset = entry.fileOffset;
+  }
+  return helper.desugarSyntheticExpression(helper.buildProblem(
+    templateExpectedButGot.withArguments(','),
+    entry.fileOffset,
+    1,
+  ));
+}
+
+bool isConvertibleToMapEntry(Expression element) {
+  if (element is SpreadElement) return true;
+  if (element is IfElement) {
+    return isConvertibleToMapEntry(element.then) &&
+        (element.otherwise == null ||
+            isConvertibleToMapEntry(element.otherwise));
+  }
+  if (element is ForElement) {
+    return isConvertibleToMapEntry(element.body);
+  }
+  if (element is ForInElement) {
+    return isConvertibleToMapEntry(element.body);
+  }
+  return false;
+}
+
+MapEntry convertToMapEntry(Expression element, InferenceHelper helper) {
+  if (element is SpreadElement) {
+    return new SpreadMapEntry(element.expression, element.isNullAware)
+      ..fileOffset = element.expression.fileOffset;
+  }
+  if (element is IfElement) {
+    return new IfMapEntry(
+        element.condition,
+        convertToMapEntry(element.then, helper),
+        element.otherwise == null
+            ? null
+            : convertToMapEntry(element.otherwise, helper))
+      ..fileOffset = element.fileOffset;
+  }
+  if (element is ForElement) {
+    return new ForMapEntry(element.variables, element.condition,
+        element.updates, convertToMapEntry(element.body, helper))
+      ..fileOffset = element.fileOffset;
+  }
+  if (element is ForInElement) {
+    return new ForInMapEntry(
+        element.variable,
+        element.iterable,
+        element.prologue,
+        convertToMapEntry(element.body, helper),
+        element.problem,
+        isAsync: element.isAsync)
+      ..fileOffset = element.fileOffset;
+  }
+  return new MapEntry(
+      helper.desugarSyntheticExpression(helper.buildProblem(
+        templateExpectedAfterButGot.withArguments(':'),
+        element.fileOffset,
+        // TODO(danrubel): what is the length of the expression?
+        1,
+      )),
+      new NullLiteral());
+}
diff --git a/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart b/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart
new file mode 100644
index 0000000..b35550c
--- /dev/null
+++ b/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart
@@ -0,0 +1,2609 @@
+// 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.
+
+/// This library implements a kernel2kernel constant evaluation transformation.
+///
+/// Even though it is expected that the frontend does not emit kernel AST which
+/// contains compile-time errors, this transformation still performs some
+/// valiation and throws a [ConstantEvaluationError] if there was a compile-time
+/// errors.
+///
+/// Due to the lack information which is is only available in the front-end,
+/// this validation is incomplete (e.g. whether an integer literal used the
+/// hexadecimal syntax or not).
+///
+/// Furthermore due to the lowering of certain constructs in the front-end
+/// (e.g. '??') we need to support a super-set of the normal constant expression
+/// language.  Issue(http://dartbug.com/31799)
+library fasta.constant_evaluator;
+
+import 'dart:core' hide MapEntry;
+
+import 'dart:io' as io;
+
+import 'package:kernel/ast.dart';
+import 'package:kernel/class_hierarchy.dart';
+import 'package:kernel/clone.dart';
+import 'package:kernel/core_types.dart';
+import 'package:kernel/kernel.dart';
+import 'package:kernel/type_algebra.dart';
+import 'package:kernel/type_environment.dart';
+
+import 'package:kernel/target/targets.dart';
+
+import '../fasta_codes.dart'
+    show
+        LocatedMessage,
+        Message,
+        messageConstEvalCircularity,
+        messageConstEvalContext,
+        messageConstEvalFailedAssertion,
+        messageConstEvalIterationInConstList,
+        messageConstEvalIterationInConstSet,
+        messageConstEvalIterationInConstMap,
+        messageConstEvalNotListOrSetInSpread,
+        messageConstEvalNotMapInSpread,
+        messageConstEvalNullValue,
+        messageConstEvalUnevaluated,
+        noLength,
+        templateConstEvalDeferredLibrary,
+        templateConstEvalDuplicateElement,
+        templateConstEvalDuplicateKey,
+        templateConstEvalElementImplementsEqual,
+        templateConstEvalFailedAssertionWithMessage,
+        templateConstEvalFreeTypeParameter,
+        templateConstEvalInvalidType,
+        templateConstEvalInvalidBinaryOperandType,
+        templateConstEvalInvalidEqualsOperandType,
+        templateConstEvalInvalidMethodInvocation,
+        templateConstEvalInvalidPropertyGet,
+        templateConstEvalInvalidStaticInvocation,
+        templateConstEvalInvalidStringInterpolationOperand,
+        templateConstEvalInvalidSymbolName,
+        templateConstEvalKeyImplementsEqual,
+        templateConstEvalNegativeShift,
+        templateConstEvalNonConstantLiteral,
+        templateConstEvalNonConstantVariableGet,
+        templateConstEvalZeroDivisor;
+
+import 'collections.dart'
+    show
+        ForElement,
+        ForInElement,
+        IfElement,
+        SpreadElement,
+        ForMapEntry,
+        ForInMapEntry,
+        IfMapEntry,
+        SpreadMapEntry;
+
+Component transformComponent(Component component, ConstantsBackend backend,
+    Map<String, String> environmentDefines, ErrorReporter errorReporter,
+    {bool keepFields: true,
+    bool enableAsserts: false,
+    bool evaluateAnnotations: true,
+    bool desugarSets: false,
+    bool errorOnUnevaluatedConstant: false,
+    CoreTypes coreTypes,
+    ClassHierarchy hierarchy}) {
+  coreTypes ??= new CoreTypes(component);
+  hierarchy ??= new ClassHierarchy(component);
+
+  final typeEnvironment = new TypeEnvironment(coreTypes, hierarchy);
+
+  transformLibraries(component.libraries, backend, environmentDefines,
+      typeEnvironment, errorReporter,
+      keepFields: keepFields,
+      enableAsserts: enableAsserts,
+      desugarSets: desugarSets,
+      errorOnUnevaluatedConstant: errorOnUnevaluatedConstant,
+      evaluateAnnotations: evaluateAnnotations);
+  return component;
+}
+
+void transformLibraries(
+    List<Library> libraries,
+    ConstantsBackend backend,
+    Map<String, String> environmentDefines,
+    TypeEnvironment typeEnvironment,
+    ErrorReporter errorReporter,
+    {bool keepFields: true,
+    bool keepVariables: false,
+    bool evaluateAnnotations: true,
+    bool desugarSets: false,
+    bool errorOnUnevaluatedConstant: false,
+    bool enableAsserts: false}) {
+  final ConstantsTransformer constantsTransformer = new ConstantsTransformer(
+      backend,
+      environmentDefines,
+      keepFields,
+      keepVariables,
+      evaluateAnnotations,
+      desugarSets,
+      errorOnUnevaluatedConstant,
+      typeEnvironment,
+      enableAsserts,
+      errorReporter);
+  for (final Library library in libraries) {
+    constantsTransformer.convertLibrary(library);
+  }
+}
+
+class JavaScriptIntConstant extends DoubleConstant {
+  final BigInt bigIntValue;
+  JavaScriptIntConstant(int value) : this.fromBigInt(BigInt.from(value));
+  JavaScriptIntConstant.fromDouble(double value)
+      : bigIntValue = BigInt.from(value),
+        super(value);
+  JavaScriptIntConstant.fromBigInt(this.bigIntValue)
+      : super(bigIntValue.toDouble());
+  JavaScriptIntConstant.fromUInt64(int value)
+      : this.fromBigInt(BigInt.from(value).toUnsigned(64));
+
+  DartType getType(TypeEnvironment types) => types.intType;
+
+  String toString() => '$bigIntValue';
+}
+
+class ConstantsTransformer extends Transformer {
+  final ConstantEvaluator constantEvaluator;
+  final TypeEnvironment typeEnvironment;
+
+  /// Whether to preserve constant [Field]s.  All use-sites will be rewritten.
+  final bool keepFields;
+  final bool keepVariables;
+  final bool evaluateAnnotations;
+  final bool desugarSets;
+  final bool errorOnUnevaluatedConstant;
+
+  ConstantsTransformer(
+      ConstantsBackend backend,
+      Map<String, String> environmentDefines,
+      this.keepFields,
+      this.keepVariables,
+      this.evaluateAnnotations,
+      this.desugarSets,
+      this.errorOnUnevaluatedConstant,
+      this.typeEnvironment,
+      bool enableAsserts,
+      ErrorReporter errorReporter)
+      : constantEvaluator = new ConstantEvaluator(backend, environmentDefines,
+            typeEnvironment, enableAsserts, errorReporter,
+            desugarSets: desugarSets,
+            errorOnUnevaluatedConstant: errorOnUnevaluatedConstant);
+
+  // Transform the library/class members:
+
+  void convertLibrary(Library library) {
+    transformAnnotations(library.annotations, library);
+
+    transformList(library.dependencies, this, library);
+    transformList(library.parts, this, library);
+    transformList(library.typedefs, this, library);
+    transformList(library.classes, this, library);
+    transformList(library.procedures, this, library);
+    transformList(library.fields, this, library);
+
+    if (!keepFields) {
+      // The transformer API does not iterate over `Library.additionalExports`,
+      // so we manually delete the references to shaken nodes.
+      library.additionalExports.removeWhere((Reference reference) {
+        return reference.node is Field && reference.canonicalName == null;
+      });
+    }
+  }
+
+  visitLibraryPart(LibraryPart node) {
+    constantEvaluator.withNewEnvironment(() {
+      transformAnnotations(node.annotations, node);
+    });
+    return node;
+  }
+
+  visitLibraryDependency(LibraryDependency node) {
+    constantEvaluator.withNewEnvironment(() {
+      transformAnnotations(node.annotations, node);
+    });
+    return node;
+  }
+
+  visitClass(Class node) {
+    constantEvaluator.withNewEnvironment(() {
+      transformAnnotations(node.annotations, node);
+      transformList(node.fields, this, node);
+      transformList(node.typeParameters, this, node);
+      transformList(node.constructors, this, node);
+      transformList(node.procedures, this, node);
+      transformList(node.redirectingFactoryConstructors, this, node);
+    });
+    return node;
+  }
+
+  visitProcedure(Procedure node) {
+    constantEvaluator.withNewEnvironment(() {
+      transformAnnotations(node.annotations, node);
+      node.function = node.function.accept(this)..parent = node;
+    });
+    return node;
+  }
+
+  visitConstructor(Constructor node) {
+    constantEvaluator.withNewEnvironment(() {
+      transformAnnotations(node.annotations, node);
+      transformList(node.initializers, this, node);
+      node.function = node.function.accept(this)..parent = node;
+    });
+    return node;
+  }
+
+  visitTypedef(Typedef node) {
+    constantEvaluator.withNewEnvironment(() {
+      transformAnnotations(node.annotations, node);
+      transformList(node.typeParameters, this, node);
+      transformList(node.typeParametersOfFunctionType, this, node);
+      transformList(node.positionalParameters, this, node);
+      transformList(node.namedParameters, this, node);
+    });
+    return node;
+  }
+
+  visitRedirectingFactoryConstructor(RedirectingFactoryConstructor node) {
+    constantEvaluator.withNewEnvironment(() {
+      transformAnnotations(node.annotations, node);
+      transformList(node.typeParameters, this, node);
+      transformList(node.positionalParameters, this, node);
+      transformList(node.namedParameters, this, node);
+    });
+    return node;
+  }
+
+  visitTypeParameter(TypeParameter node) {
+    transformAnnotations(node.annotations, node);
+    return node;
+  }
+
+  void transformAnnotations(List<Expression> nodes, TreeNode parent) {
+    if (evaluateAnnotations && nodes.length > 0) {
+      transformExpressions(nodes, parent);
+    }
+  }
+
+  void transformExpressions(List<Expression> nodes, TreeNode parent) {
+    constantEvaluator.withNewEnvironment(() {
+      for (int i = 0; i < nodes.length; ++i) {
+        nodes[i] = evaluateAndTransformWithContext(parent, nodes[i])
+          ..parent = parent;
+      }
+    });
+  }
+
+  // Handle definition of constants:
+
+  visitFunctionNode(FunctionNode node) {
+    final positionalParameterCount = node.positionalParameters.length;
+    for (int i = 0; i < positionalParameterCount; ++i) {
+      final VariableDeclaration variable = node.positionalParameters[i];
+      transformAnnotations(variable.annotations, variable);
+      if (variable.initializer != null) {
+        variable.initializer =
+            evaluateAndTransformWithContext(variable, variable.initializer)
+              ..parent = variable;
+      }
+    }
+    for (final VariableDeclaration variable in node.namedParameters) {
+      transformAnnotations(variable.annotations, variable);
+      if (variable.initializer != null) {
+        variable.initializer =
+            evaluateAndTransformWithContext(variable, variable.initializer)
+              ..parent = variable;
+      }
+    }
+    if (node.body != null) {
+      node.body = node.body.accept(this)..parent = node;
+    }
+    return node;
+  }
+
+  visitVariableDeclaration(VariableDeclaration node) {
+    transformAnnotations(node.annotations, node);
+
+    if (node.initializer != null) {
+      if (node.isConst) {
+        final Constant constant = evaluateWithContext(node, node.initializer);
+        constantEvaluator.env.addVariableValue(node, constant);
+
+        if (keepVariables) {
+          // So the value of the variable is still available for debugging
+          // purposes we convert the constant variable to be a final variable
+          // initialized to the evaluated constant expression.
+          node.initializer = makeConstantExpression(constant, node.initializer)
+            ..parent = node;
+          node.isFinal = true;
+          node.isConst = false;
+        } else {
+          // Since we convert all use-sites of constants, the constant
+          // [VariableDeclaration] is unused and we'll therefore remove it.
+          return null;
+        }
+      } else {
+        node.initializer = node.initializer.accept(this)..parent = node;
+      }
+    }
+    return node;
+  }
+
+  visitField(Field node) {
+    return constantEvaluator.withNewEnvironment(() {
+      if (node.isConst) {
+        // Since we convert all use-sites of constants, the constant [Field]
+        // cannot be referenced anymore.  We therefore get rid of it if
+        // [keepFields] was not specified.
+        if (!keepFields) {
+          return null;
+        }
+
+        // Otherwise we keep the constant [Field] and convert it's initializer.
+        transformAnnotations(node.annotations, node);
+        if (node.initializer != null) {
+          node.initializer =
+              evaluateAndTransformWithContext(node, node.initializer)
+                ..parent = node;
+        }
+      } else {
+        transformAnnotations(node.annotations, node);
+        if (node.initializer != null) {
+          node.initializer = node.initializer.accept(this)..parent = node;
+        }
+      }
+      return node;
+    });
+  }
+
+  // Handle use-sites of constants (and "inline" constant expressions):
+
+  visitSymbolLiteral(SymbolLiteral node) {
+    return makeConstantExpression(constantEvaluator.evaluate(node), node);
+  }
+
+  visitStaticGet(StaticGet node) {
+    final Member target = node.target;
+    if (target is Field && target.isConst) {
+      return evaluateAndTransformWithContext(node, node);
+    } else if (target is Procedure && target.kind == ProcedureKind.Method) {
+      return evaluateAndTransformWithContext(node, node);
+    }
+    return super.visitStaticGet(node);
+  }
+
+  visitSwitchCase(SwitchCase node) {
+    transformExpressions(node.expressions, node);
+    return super.visitSwitchCase(node);
+  }
+
+  visitVariableGet(VariableGet node) {
+    if (node.variable.isConst) {
+      return evaluateAndTransformWithContext(node, node);
+    }
+    return super.visitVariableGet(node);
+  }
+
+  visitListLiteral(ListLiteral node) {
+    if (node.isConst) {
+      return evaluateAndTransformWithContext(node, node);
+    }
+    return super.visitListLiteral(node);
+  }
+
+  visitSetLiteral(SetLiteral node) {
+    if (node.isConst) {
+      return evaluateAndTransformWithContext(node, node);
+    }
+    return super.visitSetLiteral(node);
+  }
+
+  visitMapLiteral(MapLiteral node) {
+    if (node.isConst) {
+      return evaluateAndTransformWithContext(node, node);
+    }
+    return super.visitMapLiteral(node);
+  }
+
+  visitConstructorInvocation(ConstructorInvocation node) {
+    if (node.isConst) {
+      return evaluateAndTransformWithContext(node, node);
+    }
+    return super.visitConstructorInvocation(node);
+  }
+
+  visitStaticInvocation(StaticInvocation node) {
+    if (node.isConst) {
+      return evaluateAndTransformWithContext(node, node);
+    }
+    return super.visitStaticInvocation(node);
+  }
+
+  visitConstantExpression(ConstantExpression node) {
+    Constant constant = node.constant;
+    if (constant is UnevaluatedConstant) {
+      Expression expression = constant.expression;
+      return evaluateAndTransformWithContext(expression, expression);
+    } else {
+      node.constant = constantEvaluator.canonicalize(constant);
+      return node;
+    }
+  }
+
+  evaluateAndTransformWithContext(TreeNode treeContext, Expression node) {
+    return makeConstantExpression(evaluateWithContext(treeContext, node), node);
+  }
+
+  evaluateWithContext(TreeNode treeContext, Expression node) {
+    if (treeContext == node) {
+      return constantEvaluator.evaluate(node);
+    }
+
+    return constantEvaluator.runInsideContext(treeContext, () {
+      return constantEvaluator.evaluate(node);
+    });
+  }
+
+  Expression makeConstantExpression(Constant constant, Expression node) {
+    if (constant is UnevaluatedConstant &&
+        constant.expression is InvalidExpression) {
+      return constant.expression;
+    }
+    return new ConstantExpression(constant, node.getStaticType(typeEnvironment))
+      ..fileOffset = node.fileOffset;
+  }
+}
+
+class ConstantEvaluator extends RecursiveVisitor<Constant> {
+  final ConstantsBackend backend;
+  final NumberSemantics numberSemantics;
+  Map<String, String> environmentDefines;
+  final bool errorOnUnevaluatedConstant;
+  final CoreTypes coreTypes;
+  final TypeEnvironment typeEnvironment;
+  final bool enableAsserts;
+  final ErrorReporter errorReporter;
+
+  final bool desugarSets;
+  final Field unmodifiableSetMap;
+
+  final isInstantiated = new IsInstantiatedVisitor().isInstantiated;
+
+  final Map<Constant, Constant> canonicalizationCache;
+  final Map<Node, Object> nodeCache;
+  final CloneVisitor cloner = new CloneVisitor();
+
+  Map<Class, bool> primitiveEqualCache;
+
+  final NullConstant nullConstant = new NullConstant();
+  final BoolConstant trueConstant = new BoolConstant(true);
+  final BoolConstant falseConstant = new BoolConstant(false);
+
+  final List<TreeNode> contextChain = [];
+
+  InstanceBuilder instanceBuilder;
+  EvaluationEnvironment env;
+  Set<Expression> replacementNodes = new Set<Expression>.identity();
+  Map<Constant, Constant> lowered = new Map<Constant, Constant>.identity();
+
+  bool seenUnevaluatedChild; // Any children that were left unevaluated?
+  int lazyDepth; // Current nesting depth of lazy regions.
+
+  bool get shouldBeUnevaluated => seenUnevaluatedChild || lazyDepth != 0;
+
+  bool get targetingJavaScript => numberSemantics == NumberSemantics.js;
+
+  ConstantEvaluator(this.backend, this.environmentDefines, this.typeEnvironment,
+      this.enableAsserts, this.errorReporter,
+      {this.desugarSets = false, this.errorOnUnevaluatedConstant = false})
+      : numberSemantics = backend.numberSemantics,
+        coreTypes = typeEnvironment.coreTypes,
+        canonicalizationCache = <Constant, Constant>{},
+        nodeCache = <Node, Constant>{},
+        env = new EvaluationEnvironment(),
+        unmodifiableSetMap = desugarSets
+            ? typeEnvironment.coreTypes.index
+                .getMember('dart:collection', '_UnmodifiableSet', '_map')
+            : null {
+    primitiveEqualCache = <Class, bool>{
+      coreTypes.boolClass: true,
+      coreTypes.doubleClass: false,
+      coreTypes.intClass: true,
+      coreTypes.internalSymbolClass: true,
+      coreTypes.listClass: true,
+      coreTypes.mapClass: true,
+      coreTypes.nullClass: true,
+      coreTypes.objectClass: true,
+      coreTypes.setClass: true,
+      coreTypes.stringClass: true,
+      coreTypes.symbolClass: true,
+      coreTypes.typeClass: true,
+    };
+  }
+
+  Uri getFileUri(TreeNode node) {
+    while (node != null && node is! FileUriNode) {
+      node = node.parent;
+    }
+    return (node as FileUriNode)?.fileUri;
+  }
+
+  int getFileOffset(Uri uri, TreeNode node) {
+    if (uri == null) return TreeNode.noOffset;
+    while (node != null && node.fileOffset == TreeNode.noOffset) {
+      node = node.parent;
+    }
+    return node == null ? TreeNode.noOffset : node.fileOffset;
+  }
+
+  /// Evaluate [node] and possibly cache the evaluation result.
+  /// Returns UnevaluatedConstant if the constant could not be evaluated.
+  /// If the expression in the UnevaluatedConstant is an InvalidExpression,
+  /// an error occurred during constant evaluation.
+  Constant evaluate(Expression node) {
+    seenUnevaluatedChild = false;
+    lazyDepth = 0;
+    try {
+      Constant result = _evaluateSubexpression(node);
+      if (errorOnUnevaluatedConstant && result is UnevaluatedConstant) {
+        return report(node, messageConstEvalUnevaluated);
+      }
+      return result;
+    } on _AbortDueToError catch (e) {
+      final Uri uri = getFileUri(e.node);
+      final int fileOffset = getFileOffset(uri, e.node);
+      final locatedMessage = e.message.withLocation(uri, fileOffset, noLength);
+
+      final contextMessages = <LocatedMessage>[];
+      if (e.context != null) contextMessages.addAll(e.context);
+      for (final TreeNode node in contextChain) {
+        final Uri uri = getFileUri(node);
+        final int fileOffset = getFileOffset(uri, node);
+        contextMessages.add(
+            messageConstEvalContext.withLocation(uri, fileOffset, noLength));
+      }
+      errorReporter.report(locatedMessage, contextMessages);
+      return new UnevaluatedConstant(new InvalidExpression(e.message.message));
+    } on _AbortDueToInvalidExpression catch (e) {
+      // TODO(askesc): Copy position from erroneous node.
+      // Currently not possible, as it might be in a different file.
+      // Can be done if we add an explicit URI to InvalidExpression.
+      InvalidExpression invalid = new InvalidExpression(e.message);
+      if (invalid.fileOffset == TreeNode.noOffset) {
+        invalid.fileOffset = node.fileOffset;
+      }
+      errorReporter.reportInvalidExpression(invalid);
+      return new UnevaluatedConstant(invalid);
+    }
+  }
+
+  /// Report an error that has been detected during constant evaluation.
+  Null report(TreeNode node, Message message, {List<LocatedMessage> context}) {
+    throw new _AbortDueToError(node, message, context: context);
+  }
+
+  /// Report a construct that should not occur inside a potentially constant
+  /// expression. It is assumed that an error has already been reported.
+  Null reportInvalid(TreeNode node, String message) {
+    throw new _AbortDueToInvalidExpression(node, message);
+  }
+
+  /// Produce an unevaluated constant node for an expression.
+  Constant unevaluated(Expression original, Expression replacement) {
+    replacement.fileOffset = original.fileOffset;
+    // TODO(askesc,johnniwinther): Preserve fileUri on [replacement].
+    return new UnevaluatedConstant(replacement);
+  }
+
+  /// Extract an expression from a (possibly unevaluated) constant to become
+  /// part of the expression tree of another unevaluated constant.
+  /// Makes sure a particular expression occurs only once in the tree by
+  /// cloning further instances.
+  Expression extract(Constant constant) {
+    Expression expression = constant.asExpression();
+    if (!replacementNodes.add(expression)) {
+      expression = cloner.clone(expression);
+      replacementNodes.add(expression);
+    }
+    return expression;
+  }
+
+  /// Enter a region of lazy evaluation. All leaf nodes are evaluated normally
+  /// (to ensure inlining of referenced local variables), but composite nodes
+  /// always treat their children as unevaluated, resulting in a partially
+  /// evaluated clone of the original expression tree.
+  /// Lazy evaluation is used for the subtrees of lazy operations with
+  /// unevaluated conditions to ensure no errors are reported for problems
+  /// in the subtree as long as the subtree is potentially constant.
+  void enterLazy() => lazyDepth++;
+
+  /// Leave a (possibly nested) region of lazy evaluation.
+  void leaveLazy() => lazyDepth--;
+
+  Constant lower(Constant original, Constant replacement) {
+    if (!identical(original, replacement)) {
+      original = canonicalize(original);
+      replacement = canonicalize(replacement);
+      lowered[replacement] = original;
+      return replacement;
+    }
+    return canonicalize(replacement);
+  }
+
+  Constant unlower(Constant constant) {
+    return lowered[constant] ?? constant;
+  }
+
+  Constant lowerListConstant(ListConstant constant) {
+    if (shouldBeUnevaluated) return constant;
+    return lower(constant, backend.lowerListConstant(constant));
+  }
+
+  Constant lowerSetConstant(SetConstant constant) {
+    if (shouldBeUnevaluated) return constant;
+    return lower(constant, backend.lowerSetConstant(constant));
+  }
+
+  Constant lowerMapConstant(MapConstant constant) {
+    if (shouldBeUnevaluated) return constant;
+    return lower(constant, backend.lowerMapConstant(constant));
+  }
+
+  /// Evaluate [node] and possibly cache the evaluation result.
+  /// @throws _AbortDueToError or _AbortDueToInvalidExpression if expression
+  /// can't be evaluated.
+  Constant _evaluateSubexpression(Expression node) {
+    if (node == null) return nullConstant;
+    bool wasUnevaluated = seenUnevaluatedChild;
+    seenUnevaluatedChild = false;
+    Constant result;
+    if (env.isEmpty) {
+      // We only try to evaluate the same [node] *once* within an empty
+      // environment.
+      if (nodeCache.containsKey(node)) {
+        result = nodeCache[node] ?? report(node, messageConstEvalCircularity);
+      } else {
+        nodeCache[node] = null;
+        try {
+          result = nodeCache[node] = node.accept(this);
+        } catch (e) {
+          nodeCache.remove(node);
+          rethrow;
+        }
+      }
+    } else {
+      result = node.accept(this);
+    }
+    seenUnevaluatedChild = wasUnevaluated || result is UnevaluatedConstant;
+    return result;
+  }
+
+  Constant runInsideContext(TreeNode node, Constant fun()) {
+    try {
+      pushContext(node);
+      return fun();
+    } finally {
+      popContext(node);
+    }
+  }
+
+  Constant runInsideContextIfNoContext(TreeNode node, Constant fun()) {
+    if (contextChain.isEmpty) {
+      return runInsideContext(node, fun);
+    } else {
+      return fun();
+    }
+  }
+
+  pushContext(TreeNode contextNode) {
+    contextChain.add(contextNode);
+  }
+
+  popContext(TreeNode contextNode) {
+    assert(contextChain.last == contextNode);
+    contextChain.length = contextChain.length - 1;
+  }
+
+  defaultTreeNode(Node node) {
+    // Only a subset of the expression language is valid for constant
+    // evaluation.
+    return reportInvalid(
+        node, 'Constant evaluation has no support for ${node.runtimeType}!');
+  }
+
+  visitNullLiteral(NullLiteral node) => nullConstant;
+
+  visitBoolLiteral(BoolLiteral node) {
+    return makeBoolConstant(node.value);
+  }
+
+  visitIntLiteral(IntLiteral node) {
+    // The frontend ensures that integer literals are valid according to the
+    // target representation.
+    return targetingJavaScript
+        ? canonicalize(new JavaScriptIntConstant.fromUInt64(node.value))
+        : canonicalize(new IntConstant(node.value));
+  }
+
+  visitDoubleLiteral(DoubleLiteral node) {
+    return canonicalize(makeDoubleConstant(node.value));
+  }
+
+  visitStringLiteral(StringLiteral node) {
+    return canonicalize(new StringConstant(node.value));
+  }
+
+  visitTypeLiteral(TypeLiteral node) {
+    final DartType type = evaluateDartType(node, node.type);
+    return canonicalize(new TypeLiteralConstant(type));
+  }
+
+  visitConstantExpression(ConstantExpression node) {
+    Constant constant = node.constant;
+    Constant result = constant;
+    if (constant is UnevaluatedConstant) {
+      result = runInsideContext(constant.expression, () {
+        return _evaluateSubexpression(constant.expression);
+      });
+    } else if (targetingJavaScript) {
+      if (constant is DoubleConstant) {
+        double value = constant.value;
+        // TODO(askesc, fishythefish): Handle infinite integers.
+        if (value.isFinite && value.truncateToDouble() == value) {
+          result = new JavaScriptIntConstant.fromDouble(value);
+        }
+      }
+    }
+    // If there were already constants in the AST then we make sure we
+    // re-canonicalize them.  After running the transformer we will therefore
+    // have a fully-canonicalized constant DAG with roots coming from the
+    // [ConstantExpression] nodes in the AST.
+    return canonicalize(result);
+  }
+
+  /// Add an element (which is possibly a spread or an if element) to a
+  /// constant list or set represented as a list of (possibly unevaluated)
+  /// lists or sets to be concatenated.
+  /// Each element of [parts] is either a `List<Constant>` (containing fully
+  /// evaluated constants) or a `Constant` (potentially unevaluated).
+  /// Pass an identity set as [seen] for sets and omit it for lists.
+  void addToListOrSetConstant(
+      List<Object> parts, Expression element, DartType elementType,
+      [Set<Constant> seen]) {
+    bool isSet = seen != null;
+    if (element is SpreadElement) {
+      Constant spread = unlower(_evaluateSubexpression(element.expression));
+      if (shouldBeUnevaluated) {
+        // Unevaluated spread
+        if (element.isNullAware) {
+          VariableDeclaration temp =
+              new VariableDeclaration(null, initializer: extract(spread));
+          parts.add(unevaluated(
+              element.expression,
+              new Let(
+                  temp,
+                  new ConditionalExpression(
+                      new MethodInvocation(new VariableGet(temp),
+                          new Name('=='), new Arguments([new NullLiteral()])),
+                      new ListLiteral([], isConst: true),
+                      new VariableGet(temp),
+                      const DynamicType()))));
+        } else {
+          parts.add(spread);
+        }
+      } else if (spread == nullConstant) {
+        // Null spread
+        if (!element.isNullAware) {
+          report(element.expression, messageConstEvalNullValue);
+        }
+      } else {
+        // Fully evaluated spread
+        List<Constant> entries;
+        if (spread is ListConstant) {
+          entries = spread.entries;
+        } else if (spread is SetConstant) {
+          entries = spread.entries;
+        } else {
+          // Not list or set in spread
+          return report(
+              element.expression, messageConstEvalNotListOrSetInSpread);
+        }
+        for (Constant entry in entries) {
+          addToListOrSetConstant(
+              parts, new ConstantExpression(entry), elementType, seen);
+        }
+      }
+    } else if (element is IfElement) {
+      Constant condition = _evaluateSubexpression(element.condition);
+      if (shouldBeUnevaluated) {
+        // Unevaluated if
+        enterLazy();
+        Constant then = _evaluateSubexpression(isSet
+            ? new SetLiteral([cloner.clone(element.then)], isConst: true)
+            : new ListLiteral([cloner.clone(element.then)], isConst: true));
+        Constant otherwise;
+        if (element.otherwise != null) {
+          otherwise = _evaluateSubexpression(isSet
+              ? new SetLiteral([cloner.clone(element.otherwise)], isConst: true)
+              : new ListLiteral([cloner.clone(element.otherwise)],
+                  isConst: true));
+        } else {
+          otherwise = isSet
+              ? new SetConstant(const DynamicType(), [])
+              : new ListConstant(const DynamicType(), []);
+        }
+        leaveLazy();
+        parts.add(unevaluated(
+            element.condition,
+            new ConditionalExpression(extract(condition), extract(then),
+                extract(otherwise), const DynamicType())));
+      } else {
+        // Fully evaluated if
+        if (condition == trueConstant) {
+          addToListOrSetConstant(parts, element.then, elementType, seen);
+        } else if (condition == falseConstant) {
+          if (element.otherwise != null) {
+            addToListOrSetConstant(parts, element.otherwise, elementType, seen);
+          }
+        } else if (condition == nullConstant) {
+          report(element.condition, messageConstEvalNullValue);
+        } else {
+          report(
+              element.condition,
+              templateConstEvalInvalidType.withArguments(
+                  condition,
+                  typeEnvironment.boolType,
+                  condition.getType(typeEnvironment)));
+        }
+      }
+    } else if (element is ForElement || element is ForInElement) {
+      // For or for-in
+      report(
+          element,
+          isSet
+              ? messageConstEvalIterationInConstSet
+              : messageConstEvalIterationInConstList);
+    } else {
+      // Ordinary expresion element
+      Constant constant = _evaluateSubexpression(element);
+      if (shouldBeUnevaluated) {
+        parts.add(unevaluated(
+            element,
+            isSet
+                ? new SetLiteral([extract(constant)],
+                    typeArgument: elementType, isConst: true)
+                : new ListLiteral([extract(constant)],
+                    typeArgument: elementType, isConst: true)));
+      } else {
+        List<Constant> listOrSet;
+        if (parts.last is List<Constant>) {
+          listOrSet = parts.last;
+        } else {
+          parts.add(listOrSet = <Constant>[]);
+        }
+        if (isSet) {
+          if (!hasPrimitiveEqual(constant)) {
+            report(
+                element,
+                templateConstEvalElementImplementsEqual
+                    .withArguments(constant));
+          }
+          if (!seen.add(constant)) {
+            report(element,
+                templateConstEvalDuplicateElement.withArguments(constant));
+          }
+        }
+        listOrSet.add(ensureIsSubtype(constant, elementType, element));
+      }
+    }
+  }
+
+  Constant makeListConstantFromParts(
+      List<Object> parts, Expression node, DartType elementType) {
+    if (parts.length == 1) {
+      // Fully evaluated
+      return lowerListConstant(new ListConstant(elementType, parts.single));
+    }
+    List<Expression> lists = <Expression>[];
+    for (Object part in parts) {
+      if (part is List<Constant>) {
+        lists.add(new ConstantExpression(new ListConstant(elementType, part)));
+      } else if (part is Constant) {
+        lists.add(extract(part));
+      } else {
+        throw 'Non-constant in constant list';
+      }
+    }
+    return unevaluated(
+        node, new ListConcatenation(lists, typeArgument: elementType));
+  }
+
+  visitListLiteral(ListLiteral node) {
+    if (!node.isConst) {
+      return report(
+          node, templateConstEvalNonConstantLiteral.withArguments('List'));
+    }
+    final List<Object> parts = <Object>[<Constant>[]];
+    for (Expression element in node.expressions) {
+      addToListOrSetConstant(parts, element, node.typeArgument);
+    }
+    return makeListConstantFromParts(parts, node, node.typeArgument);
+  }
+
+  visitListConcatenation(ListConcatenation node) {
+    final List<Object> parts = <Object>[<Constant>[]];
+    for (Expression list in node.lists) {
+      addToListOrSetConstant(parts,
+          new SpreadElement(cloner.clone(list), false), node.typeArgument);
+    }
+    return makeListConstantFromParts(parts, node, node.typeArgument);
+  }
+
+  Constant makeSetConstantFromParts(
+      List<Object> parts, Expression node, DartType elementType) {
+    if (parts.length == 1) {
+      // Fully evaluated
+      List<Constant> entries = parts.single;
+      SetConstant result = new SetConstant(elementType, entries);
+      if (desugarSets) {
+        final List<ConstantMapEntry> mapEntries =
+            new List<ConstantMapEntry>(entries.length);
+        for (int i = 0; i < entries.length; ++i) {
+          mapEntries[i] = new ConstantMapEntry(entries[i], nullConstant);
+        }
+        Constant map = lowerMapConstant(
+            new MapConstant(elementType, typeEnvironment.nullType, mapEntries));
+        return lower(
+            result,
+            new InstanceConstant(
+                unmodifiableSetMap.enclosingClass.reference,
+                [elementType],
+                <Reference, Constant>{unmodifiableSetMap.reference: map}));
+      } else {
+        return lowerSetConstant(result);
+      }
+    }
+    List<Expression> sets = <Expression>[];
+    for (Object part in parts) {
+      if (part is List<Constant>) {
+        sets.add(new ConstantExpression(new SetConstant(elementType, part)));
+      } else if (part is Constant) {
+        sets.add(extract(part));
+      } else {
+        throw 'Non-constant in constant set';
+      }
+    }
+    return unevaluated(
+        node, new SetConcatenation(sets, typeArgument: elementType));
+  }
+
+  visitSetLiteral(SetLiteral node) {
+    if (!node.isConst) {
+      return report(
+          node, templateConstEvalNonConstantLiteral.withArguments('Set'));
+    }
+    final Set<Constant> seen = new Set<Constant>.identity();
+    final List<Object> parts = <Object>[<Constant>[]];
+    for (Expression element in node.expressions) {
+      addToListOrSetConstant(parts, element, node.typeArgument, seen);
+    }
+    return makeSetConstantFromParts(parts, node, node.typeArgument);
+  }
+
+  visitSetConcatenation(SetConcatenation node) {
+    final Set<Constant> seen = new Set<Constant>.identity();
+    final List<Object> parts = <Object>[<Constant>[]];
+    for (Expression set_ in node.sets) {
+      addToListOrSetConstant(
+          parts,
+          new SpreadElement(cloner.clone(set_), false),
+          node.typeArgument,
+          seen);
+    }
+    return makeSetConstantFromParts(parts, node, node.typeArgument);
+  }
+
+  /// Add a map entry (which is possibly a spread or an if map entry) to a
+  /// constant map represented as a list of (possibly unevaluated)
+  /// maps to be concatenated.
+  /// Each element of [parts] is either a `List<ConstantMapEntry>` (containing
+  /// fully evaluated map entries) or a `Constant` (potentially unevaluated).
+  void addToMapConstant(List<Object> parts, MapEntry element, DartType keyType,
+      DartType valueType, Set<Constant> seenKeys) {
+    if (element is SpreadMapEntry) {
+      Constant spread = unlower(_evaluateSubexpression(element.expression));
+      if (shouldBeUnevaluated) {
+        // Unevaluated spread
+        if (element.isNullAware) {
+          VariableDeclaration temp =
+              new VariableDeclaration(null, initializer: extract(spread));
+          parts.add(unevaluated(
+              element.expression,
+              new Let(
+                  temp,
+                  new ConditionalExpression(
+                      new MethodInvocation(new VariableGet(temp),
+                          new Name('=='), new Arguments([new NullLiteral()])),
+                      new MapLiteral([], isConst: true),
+                      new VariableGet(temp),
+                      const DynamicType()))));
+        } else {
+          parts.add(spread);
+        }
+      } else if (spread == nullConstant) {
+        // Null spread
+        if (!element.isNullAware) {
+          report(element.expression, messageConstEvalNullValue);
+        }
+      } else {
+        // Fully evaluated spread
+        if (spread is MapConstant) {
+          for (ConstantMapEntry entry in spread.entries) {
+            addToMapConstant(
+                parts,
+                new MapEntry(new ConstantExpression(entry.key),
+                    new ConstantExpression(entry.value)),
+                keyType,
+                valueType,
+                seenKeys);
+          }
+        } else {
+          // Not map in spread
+          return report(element.expression, messageConstEvalNotMapInSpread);
+        }
+      }
+    } else if (element is IfMapEntry) {
+      Constant condition = _evaluateSubexpression(element.condition);
+      if (shouldBeUnevaluated) {
+        // Unevaluated if
+        enterLazy();
+        Constant then = _evaluateSubexpression(
+            new MapLiteral([cloner.clone(element.then)], isConst: true));
+        Constant otherwise;
+        if (element.otherwise != null) {
+          otherwise = _evaluateSubexpression(
+              new MapLiteral([cloner.clone(element.otherwise)], isConst: true));
+        } else {
+          otherwise =
+              new MapConstant(const DynamicType(), const DynamicType(), []);
+        }
+        leaveLazy();
+        parts.add(unevaluated(
+            element.condition,
+            new ConditionalExpression(extract(condition), extract(then),
+                extract(otherwise), const DynamicType())));
+      } else {
+        // Fully evaluated if
+        if (condition == trueConstant) {
+          addToMapConstant(parts, element.then, keyType, valueType, seenKeys);
+        } else if (condition == falseConstant) {
+          if (element.otherwise != null) {
+            addToMapConstant(
+                parts, element.otherwise, keyType, valueType, seenKeys);
+          }
+        } else if (condition == nullConstant) {
+          report(element.condition, messageConstEvalNullValue);
+        } else {
+          report(
+              element.condition,
+              templateConstEvalInvalidType.withArguments(
+                  condition,
+                  typeEnvironment.boolType,
+                  condition.getType(typeEnvironment)));
+        }
+      }
+    } else if (element is ForMapEntry || element is ForInMapEntry) {
+      // For or for-in
+      report(element, messageConstEvalIterationInConstMap);
+    } else {
+      // Ordinary map entry
+      Constant key = _evaluateSubexpression(element.key);
+      Constant value = _evaluateSubexpression(element.value);
+      if (shouldBeUnevaluated) {
+        parts.add(unevaluated(
+            element.key,
+            new MapLiteral([new MapEntry(extract(key), extract(value))],
+                isConst: true)));
+      } else {
+        List<ConstantMapEntry> entries;
+        if (parts.last is List<ConstantMapEntry>) {
+          entries = parts.last;
+        } else {
+          parts.add(entries = <ConstantMapEntry>[]);
+        }
+        if (!hasPrimitiveEqual(key)) {
+          report(
+              element, templateConstEvalKeyImplementsEqual.withArguments(key));
+        }
+        if (!seenKeys.add(key)) {
+          report(element.key, templateConstEvalDuplicateKey.withArguments(key));
+        }
+        entries.add(new ConstantMapEntry(
+            ensureIsSubtype(key, keyType, element.key),
+            ensureIsSubtype(value, valueType, element.value)));
+      }
+    }
+  }
+
+  Constant makeMapConstantFromParts(List<Object> parts, Expression node,
+      DartType keyType, DartType valueType) {
+    if (parts.length == 1) {
+      // Fully evaluated
+      return lowerMapConstant(
+          new MapConstant(keyType, valueType, parts.single));
+    }
+    List<Expression> maps = <Expression>[];
+    for (Object part in parts) {
+      if (part is List<ConstantMapEntry>) {
+        maps.add(
+            new ConstantExpression(new MapConstant(keyType, valueType, part)));
+      } else if (part is Constant) {
+        maps.add(extract(part));
+      } else {
+        throw 'Non-constant in constant map';
+      }
+    }
+    return unevaluated(node,
+        new MapConcatenation(maps, keyType: keyType, valueType: valueType));
+  }
+
+  visitMapLiteral(MapLiteral node) {
+    if (!node.isConst) {
+      return report(
+          node, templateConstEvalNonConstantLiteral.withArguments('Map'));
+    }
+    final Set<Constant> seen = new Set<Constant>.identity();
+    final List<Object> parts = <Object>[<ConstantMapEntry>[]];
+    for (MapEntry element in node.entries) {
+      addToMapConstant(parts, element, node.keyType, node.valueType, seen);
+    }
+    return makeMapConstantFromParts(parts, node, node.keyType, node.valueType);
+  }
+
+  visitMapConcatenation(MapConcatenation node) {
+    final Set<Constant> seen = new Set<Constant>.identity();
+    final List<Object> parts = <Object>[<ConstantMapEntry>[]];
+    for (Expression map in node.maps) {
+      addToMapConstant(parts, new SpreadMapEntry(cloner.clone(map), false),
+          node.keyType, node.valueType, seen);
+    }
+    return makeMapConstantFromParts(parts, node, node.keyType, node.valueType);
+  }
+
+  visitFunctionExpression(FunctionExpression node) {
+    return report(
+        node, templateConstEvalNonConstantLiteral.withArguments('Function'));
+  }
+
+  visitConstructorInvocation(ConstructorInvocation node) {
+    final Constructor constructor = node.target;
+    final Class klass = constructor.enclosingClass;
+    bool isSymbol = klass == coreTypes.internalSymbolClass;
+    if (!constructor.isConst) {
+      return reportInvalid(node, 'Non-const constructor invocation.');
+    }
+    if (constructor.function.body != null &&
+        constructor.function.body is! EmptyStatement) {
+      return reportInvalid(
+          node,
+          'Constructor "$node" has non-trivial body '
+          '"${constructor.function.body.runtimeType}".');
+    }
+    if (klass.isAbstract) {
+      return reportInvalid(
+          node, 'Constructor "$node" belongs to abstract class "${klass}".');
+    }
+
+    final positionals = evaluatePositionalArguments(node.arguments);
+    final named = evaluateNamedArguments(node.arguments);
+
+    // Is the constructor unavailable due to separate compilation?
+    bool isUnavailable = constructor.isInExternalLibrary &&
+        constructor.initializers.isEmpty &&
+        constructor.enclosingClass.supertype != null;
+
+    if (isUnavailable || (isSymbol && shouldBeUnevaluated)) {
+      return unevaluated(
+          node,
+          new ConstructorInvocation(constructor,
+              unevaluatedArguments(positionals, named, node.arguments.types),
+              isConst: true));
+    }
+
+    // Special case the dart:core's Symbol class here and convert it to a
+    // [SymbolConstant].  For invalid values we report a compile-time error.
+    if (isSymbol) {
+      final Constant nameValue = positionals.single;
+
+      if (nameValue is StringConstant && isValidSymbolName(nameValue.value)) {
+        return canonicalize(new SymbolConstant(nameValue.value, null));
+      }
+      return report(node.arguments.positional.first,
+          templateConstEvalInvalidSymbolName.withArguments(nameValue));
+    }
+
+    final typeArguments = evaluateTypeArguments(node, node.arguments);
+
+    // Fill in any missing type arguments with "dynamic".
+    for (int i = typeArguments.length; i < klass.typeParameters.length; i++) {
+      typeArguments.add(const DynamicType());
+    }
+
+    // Start building a new instance.
+    return withNewInstanceBuilder(klass, typeArguments, () {
+      return runInsideContextIfNoContext(node, () {
+        // "Run" the constructor (and any super constructor calls), which will
+        // initialize the fields of the new instance.
+        if (shouldBeUnevaluated) {
+          enterLazy();
+          handleConstructorInvocation(
+              constructor, typeArguments, positionals, named);
+          leaveLazy();
+          return unevaluated(node, instanceBuilder.buildUnevaluatedInstance());
+        }
+        handleConstructorInvocation(
+            constructor, typeArguments, positionals, named);
+        if (shouldBeUnevaluated) {
+          return unevaluated(node, instanceBuilder.buildUnevaluatedInstance());
+        }
+        return canonicalize(instanceBuilder.buildInstance());
+      });
+    });
+  }
+
+  visitInstanceCreation(InstanceCreation node) {
+    return withNewInstanceBuilder(node.classNode, node.typeArguments, () {
+      for (AssertStatement statement in node.asserts) {
+        checkAssert(statement);
+      }
+      node.fieldValues.forEach((Reference fieldRef, Expression value) {
+        instanceBuilder.setFieldValue(
+            fieldRef.asField, _evaluateSubexpression(value));
+      });
+      if (shouldBeUnevaluated) {
+        return unevaluated(node, instanceBuilder.buildUnevaluatedInstance());
+      }
+      return canonicalize(instanceBuilder.buildInstance());
+    });
+  }
+
+  bool isValidSymbolName(String name) {
+    // See https://api.dartlang.org/stable/2.0.0/dart-core/Symbol/Symbol.html:
+    //
+    //  A qualified name is a valid name preceded by a public identifier name and
+    //  a '.', e.g., foo.bar.baz= is a qualified version of baz=.
+    //
+    //  That means that the content of the name String must be either
+    //     - a valid public Dart identifier (that is, an identifier not
+    //       starting with "_"),
+    //     - such an identifier followed by "=" (a setter name),
+    //     - the name of a declarable operator,
+    //     - 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).
+
+    const operatorNames = const <String>[
+      '+',
+      '-',
+      '*',
+      '/',
+      '%',
+      '~/',
+      '&',
+      '|',
+      '^',
+      '~',
+      '<<',
+      '>>',
+      '<',
+      '<=',
+      '>',
+      '>=',
+      '==',
+      '[]',
+      '[]=',
+      'unary-'
+    ];
+
+    if (name == null) return false;
+    if (name == '') return true;
+
+    final parts = name.split('.');
+
+    // Each qualifier must be a public identifier.
+    for (int i = 0; i < parts.length - 1; ++i) {
+      if (!isValidPublicIdentifier(parts[i])) return false;
+    }
+
+    String last = parts.last;
+    if (operatorNames.contains(last)) {
+      return true;
+    }
+    if (last.endsWith('=')) {
+      last = last.substring(0, last.length - 1);
+    }
+    if (!isValidPublicIdentifier(last)) return false;
+
+    return true;
+  }
+
+  /// From the Dart Language specification:
+  ///
+  ///   IDENTIFIER:
+  ///     IDENTIFIER_START IDENTIFIER_PART*
+  ///
+  ///   IDENTIFIER_START:
+  ///       IDENTIFIER_START_NO_DOLLAR | ‘$’
+  ///
+  ///   IDENTIFIER_PART:
+  ///       IDENTIFIER_START | DIGIT
+  ///
+  ///   IDENTIFIER_NO_DOLLAR:
+  ///     IDENTIFIER_START_NO_DOLLAR IDENTIFIER_PART_NO_DOLLAR*
+  ///
+  ///   IDENTIFIER_START_NO_DOLLAR:
+  ///       LETTER | '_'
+  ///
+  ///   IDENTIFIER_PART_NO_DOLLAR:
+  ///       IDENTIFIER_START_NO_DOLLAR | DIGIT
+  ///
+  static final publicIdentifierRegExp =
+      new RegExp(r'^[a-zA-Z$][a-zA-Z0-9_$]*$');
+
+  static const nonUsableKeywords = const <String>[
+    'assert',
+    'break',
+    'case',
+    'catch',
+    'class',
+    'const',
+    'continue',
+    'default',
+    'do',
+    'else',
+    'enum',
+    'extends',
+    'false',
+    'final',
+    'finally',
+    'for',
+    'if',
+    'in',
+    'is',
+    'new',
+    'null',
+    'rethrow',
+    'return',
+    'super',
+    'switch',
+    'this',
+    'throw',
+    'true',
+    'try',
+    'var',
+    'while',
+    'with',
+  ];
+
+  bool isValidPublicIdentifier(String name) {
+    return publicIdentifierRegExp.hasMatch(name) &&
+        !nonUsableKeywords.contains(name);
+  }
+
+  handleConstructorInvocation(
+      Constructor constructor,
+      List<DartType> typeArguments,
+      List<Constant> positionalArguments,
+      Map<String, Constant> namedArguments) {
+    return runInsideContext(constructor, () {
+      return withNewEnvironment(() {
+        final Class klass = constructor.enclosingClass;
+        final FunctionNode function = constructor.function;
+
+        // We simulate now the constructor invocation.
+
+        // Step 1) Map type arguments and normal arguments from caller to callee.
+        for (int i = 0; i < klass.typeParameters.length; i++) {
+          env.addTypeParameterValue(klass.typeParameters[i], typeArguments[i]);
+        }
+        for (int i = 0; i < function.positionalParameters.length; i++) {
+          final VariableDeclaration parameter =
+              function.positionalParameters[i];
+          final Constant value = (i < positionalArguments.length)
+              ? positionalArguments[i]
+              : _evaluateSubexpression(parameter.initializer);
+          env.addVariableValue(parameter, value);
+        }
+        for (final VariableDeclaration parameter in function.namedParameters) {
+          final Constant value = namedArguments[parameter.name] ??
+              _evaluateSubexpression(parameter.initializer);
+          env.addVariableValue(parameter, value);
+        }
+
+        // Step 2) Run all initializers (including super calls) with environment setup.
+        for (final Field field in klass.fields) {
+          if (!field.isStatic) {
+            instanceBuilder.setFieldValue(
+                field, _evaluateSubexpression(field.initializer));
+          }
+        }
+        for (final Initializer init in constructor.initializers) {
+          if (init is FieldInitializer) {
+            instanceBuilder.setFieldValue(
+                init.field, _evaluateSubexpression(init.value));
+          } else if (init is LocalInitializer) {
+            final VariableDeclaration variable = init.variable;
+            env.addVariableValue(
+                variable, _evaluateSubexpression(variable.initializer));
+          } else if (init is SuperInitializer) {
+            handleConstructorInvocation(
+                init.target,
+                evaluateSuperTypeArguments(
+                    init, constructor.enclosingClass.supertype),
+                evaluatePositionalArguments(init.arguments),
+                evaluateNamedArguments(init.arguments));
+          } else if (init is RedirectingInitializer) {
+            // Since a redirecting constructor targets a constructor of the same
+            // class, we pass the same [typeArguments].
+            handleConstructorInvocation(
+                init.target,
+                typeArguments,
+                evaluatePositionalArguments(init.arguments),
+                evaluateNamedArguments(init.arguments));
+          } else if (init is AssertInitializer) {
+            checkAssert(init.statement);
+          } else {
+            return reportInvalid(
+                constructor,
+                'No support for handling initializer of type '
+                '"${init.runtimeType}".');
+          }
+        }
+      });
+    });
+  }
+
+  void checkAssert(AssertStatement statement) {
+    if (enableAsserts) {
+      final Constant condition = _evaluateSubexpression(statement.condition);
+
+      if (shouldBeUnevaluated) {
+        Expression message = null;
+        if (statement.message != null) {
+          enterLazy();
+          message = extract(_evaluateSubexpression(statement.message));
+          leaveLazy();
+        }
+        instanceBuilder.asserts.add(new AssertStatement(extract(condition),
+            message: message,
+            conditionStartOffset: statement.conditionStartOffset,
+            conditionEndOffset: statement.conditionEndOffset));
+      } else if (condition is BoolConstant) {
+        if (!condition.value) {
+          if (statement.message == null) {
+            report(statement.condition, messageConstEvalFailedAssertion);
+          }
+          final Constant message = _evaluateSubexpression(statement.message);
+          if (shouldBeUnevaluated) {
+            instanceBuilder.asserts.add(new AssertStatement(extract(condition),
+                message: extract(message),
+                conditionStartOffset: statement.conditionStartOffset,
+                conditionEndOffset: statement.conditionEndOffset));
+          } else if (message is StringConstant) {
+            report(
+                statement.condition,
+                templateConstEvalFailedAssertionWithMessage
+                    .withArguments(message.value));
+          } else {
+            report(
+                statement.message,
+                templateConstEvalInvalidType.withArguments(
+                    message,
+                    typeEnvironment.stringType,
+                    message.getType(typeEnvironment)));
+          }
+        }
+      } else {
+        report(
+            statement.condition,
+            templateConstEvalInvalidType.withArguments(condition,
+                typeEnvironment.boolType, condition.getType(typeEnvironment)));
+      }
+    }
+  }
+
+  visitInvalidExpression(InvalidExpression node) {
+    return reportInvalid(node, node.message);
+  }
+
+  visitMethodInvocation(MethodInvocation node) {
+    // We have no support for generic method invocation atm.
+    assert(node.arguments.named.isEmpty);
+
+    final Constant receiver = _evaluateSubexpression(node.receiver);
+    final List<Constant> arguments =
+        evaluatePositionalArguments(node.arguments);
+
+    if (shouldBeUnevaluated) {
+      return unevaluated(
+          node,
+          new MethodInvocation(extract(receiver), node.name,
+              unevaluatedArguments(arguments, {}, node.arguments.types)));
+    }
+
+    // Handle == and != first (it's common between all types). Since `a != b` is
+    // parsed as `!(a == b)` it is handled implicitly through ==.
+    if (arguments.length == 1 && node.name.name == '==') {
+      final right = arguments[0];
+
+      // [DoubleConstant] uses [identical] to determine equality, so we need two
+      // special cases:
+      // Two NaNs are always unequal even if [identical] returns `true`.
+      if (isNaN(receiver) || isNaN(right)) {
+        return falseConstant;
+      }
+
+      // Two zero values are always equal regardless of sign.
+      if (isZero(receiver)) {
+        return makeBoolConstant(isZero(right));
+      }
+
+      if (receiver is NullConstant ||
+          receiver is BoolConstant ||
+          receiver is IntConstant ||
+          receiver is DoubleConstant ||
+          receiver is StringConstant ||
+          right is NullConstant) {
+        return makeBoolConstant(receiver == right);
+      } else {
+        return report(
+            node,
+            templateConstEvalInvalidEqualsOperandType.withArguments(
+                receiver, receiver.getType(typeEnvironment)));
+      }
+    }
+
+    // This is a white-listed set of methods we need to support on constants.
+    if (receiver is StringConstant) {
+      if (arguments.length == 1) {
+        switch (node.name.name) {
+          case '+':
+            final Constant other = arguments[0];
+            if (other is StringConstant) {
+              return canonicalize(
+                  new StringConstant(receiver.value + other.value));
+            }
+            return report(
+                node,
+                templateConstEvalInvalidBinaryOperandType.withArguments(
+                    '+',
+                    receiver,
+                    typeEnvironment.stringType,
+                    other.getType(typeEnvironment)));
+        }
+      }
+    } else if (receiver is IntConstant || receiver is JavaScriptIntConstant) {
+      if (arguments.length == 0) {
+        switch (node.name.name) {
+          case 'unary-':
+            if (targetingJavaScript) {
+              BigInt value = (receiver as JavaScriptIntConstant).bigIntValue;
+              if (value == BigInt.zero) {
+                return canonicalize(new DoubleConstant(-0.0));
+              }
+              return canonicalize(new JavaScriptIntConstant.fromBigInt(-value));
+            }
+            int value = (receiver as IntConstant).value;
+            return canonicalize(new IntConstant(-value));
+          case '~':
+            if (targetingJavaScript) {
+              BigInt value = (receiver as JavaScriptIntConstant).bigIntValue;
+              return canonicalize(new JavaScriptIntConstant.fromBigInt(
+                  (~value).toUnsigned(32)));
+            }
+            int value = (receiver as IntConstant).value;
+            return canonicalize(new IntConstant(~value));
+        }
+      } else if (arguments.length == 1) {
+        final Constant other = arguments[0];
+        final op = node.name.name;
+        if (other is IntConstant || other is JavaScriptIntConstant) {
+          if ((op == '<<' || op == '>>' || op == '>>>')) {
+            var receiverValue = receiver is IntConstant
+                ? receiver.value
+                : (receiver as JavaScriptIntConstant).bigIntValue;
+            int otherValue = other is IntConstant
+                ? other.value
+                : (other as JavaScriptIntConstant).bigIntValue.toInt();
+            if (otherValue < 0) {
+              return report(
+                  node.arguments.positional.first,
+                  // TODO(askesc): Change argument types in template to constants.
+                  templateConstEvalNegativeShift.withArguments(
+                      op, '${receiverValue}', '${otherValue}'));
+            }
+          }
+
+          if ((op == '%' || op == '~/')) {
+            var receiverValue = receiver is IntConstant
+                ? receiver.value
+                : (receiver as JavaScriptIntConstant).bigIntValue;
+            int otherValue = other is IntConstant
+                ? other.value
+                : (other as JavaScriptIntConstant).bigIntValue.toInt();
+            if (otherValue == 0) {
+              return report(
+                  node.arguments.positional.first,
+                  // TODO(askesc): Change argument type in template to constant.
+                  templateConstEvalZeroDivisor.withArguments(
+                      op, '${receiverValue}'));
+            }
+          }
+
+          switch (op) {
+            case '|':
+            case '&':
+            case '^':
+              int receiverValue = receiver is IntConstant
+                  ? receiver.value
+                  : (receiver as JavaScriptIntConstant)
+                      .bigIntValue
+                      .toUnsigned(32)
+                      .toInt();
+              int otherValue = other is IntConstant
+                  ? other.value
+                  : (other as JavaScriptIntConstant)
+                      .bigIntValue
+                      .toUnsigned(32)
+                      .toInt();
+              return evaluateBinaryBitOperation(
+                  node.name.name, receiverValue, otherValue, node);
+            case '<<':
+            case '>>':
+            case '>>>':
+              bool negative = false;
+              int receiverValue;
+              if (receiver is IntConstant) {
+                receiverValue = receiver.value;
+              } else {
+                BigInt bigIntValue =
+                    (receiver as JavaScriptIntConstant).bigIntValue;
+                receiverValue = bigIntValue.toUnsigned(32).toInt();
+                negative = bigIntValue.isNegative;
+              }
+              int otherValue = other is IntConstant
+                  ? other.value
+                  : (other as JavaScriptIntConstant).bigIntValue.toInt();
+
+              return evaluateBinaryShiftOperation(
+                  node.name.name, receiverValue, otherValue, node,
+                  negativeReceiver: negative);
+            default:
+              num receiverValue = receiver is IntConstant
+                  ? receiver.value
+                  : (receiver as DoubleConstant).value;
+              num otherValue = other is IntConstant
+                  ? other.value
+                  : (other as DoubleConstant).value;
+              return evaluateBinaryNumericOperation(
+                  node.name.name, receiverValue, otherValue, node);
+          }
+        } else if (other is DoubleConstant) {
+          num receiverValue = receiver is IntConstant
+              ? receiver.value
+              : (receiver as DoubleConstant).value;
+          return evaluateBinaryNumericOperation(
+              node.name.name, receiverValue, other.value, node);
+        }
+        return report(
+            node,
+            templateConstEvalInvalidBinaryOperandType.withArguments(
+                node.name.name,
+                receiver,
+                typeEnvironment.numType,
+                other.getType(typeEnvironment)));
+      }
+    } else if (receiver is DoubleConstant) {
+      if (arguments.length == 0) {
+        switch (node.name.name) {
+          case 'unary-':
+            return canonicalize(makeDoubleConstant(-receiver.value));
+        }
+      } else if (arguments.length == 1) {
+        final Constant other = arguments[0];
+
+        if (other is IntConstant || other is DoubleConstant) {
+          final num value = (other is IntConstant)
+              ? other.value
+              : (other as DoubleConstant).value;
+          return evaluateBinaryNumericOperation(
+              node.name.name, receiver.value, value, node);
+        }
+        return report(
+            node,
+            templateConstEvalInvalidBinaryOperandType.withArguments(
+                node.name.name,
+                receiver,
+                typeEnvironment.numType,
+                other.getType(typeEnvironment)));
+      }
+    } else if (receiver is BoolConstant) {
+      if (arguments.length == 1) {
+        final Constant other = arguments[0];
+        if (other is BoolConstant) {
+          switch (node.name.name) {
+            case '|':
+              return canonicalize(
+                  new BoolConstant(receiver.value || other.value));
+            case '&':
+              return canonicalize(
+                  new BoolConstant(receiver.value && other.value));
+            case '^':
+              return canonicalize(
+                  new BoolConstant(receiver.value != other.value));
+          }
+        }
+      }
+    } else if (receiver is NullConstant) {
+      return report(node, messageConstEvalNullValue);
+    }
+
+    return report(
+        node,
+        templateConstEvalInvalidMethodInvocation.withArguments(
+            node.name.name, receiver));
+  }
+
+  visitLogicalExpression(LogicalExpression node) {
+    final Constant left = _evaluateSubexpression(node.left);
+    if (shouldBeUnevaluated) {
+      enterLazy();
+      Constant right = _evaluateSubexpression(node.right);
+      leaveLazy();
+      return unevaluated(node,
+          new LogicalExpression(extract(left), node.operator, extract(right)));
+    }
+    switch (node.operator) {
+      case '||':
+        if (left is BoolConstant) {
+          if (left.value) return trueConstant;
+
+          final Constant right = _evaluateSubexpression(node.right);
+          if (right is BoolConstant || right is UnevaluatedConstant) {
+            return right;
+          }
+
+          return report(
+              node,
+              templateConstEvalInvalidBinaryOperandType.withArguments(
+                  node.operator,
+                  left,
+                  typeEnvironment.boolType,
+                  right.getType(typeEnvironment)));
+        }
+        return report(
+            node,
+            templateConstEvalInvalidMethodInvocation.withArguments(
+                node.operator, left));
+      case '&&':
+        if (left is BoolConstant) {
+          if (!left.value) return falseConstant;
+
+          final Constant right = _evaluateSubexpression(node.right);
+          if (right is BoolConstant || right is UnevaluatedConstant) {
+            return right;
+          }
+
+          return report(
+              node,
+              templateConstEvalInvalidBinaryOperandType.withArguments(
+                  node.operator,
+                  left,
+                  typeEnvironment.boolType,
+                  right.getType(typeEnvironment)));
+        }
+        return report(
+            node,
+            templateConstEvalInvalidMethodInvocation.withArguments(
+                node.operator, left));
+      case '??':
+        return (left is! NullConstant)
+            ? left
+            : _evaluateSubexpression(node.right);
+      default:
+        return report(
+            node,
+            templateConstEvalInvalidMethodInvocation.withArguments(
+                node.operator, left));
+    }
+  }
+
+  visitConditionalExpression(ConditionalExpression node) {
+    final Constant condition = _evaluateSubexpression(node.condition);
+    if (condition == trueConstant) {
+      return _evaluateSubexpression(node.then);
+    } else if (condition == falseConstant) {
+      return _evaluateSubexpression(node.otherwise);
+    } else if (shouldBeUnevaluated) {
+      enterLazy();
+      Constant then = _evaluateSubexpression(node.then);
+      Constant otherwise = _evaluateSubexpression(node.otherwise);
+      leaveLazy();
+      return unevaluated(
+          node,
+          new ConditionalExpression(extract(condition), extract(then),
+              extract(otherwise), node.staticType));
+    } else {
+      return report(
+          node,
+          templateConstEvalInvalidType.withArguments(condition,
+              typeEnvironment.boolType, condition.getType(typeEnvironment)));
+    }
+  }
+
+  visitPropertyGet(PropertyGet node) {
+    if (node.receiver is ThisExpression) {
+      // Access "this" during instance creation.
+      if (instanceBuilder == null) {
+        return reportInvalid(node, 'Instance field access outside constructor');
+      }
+      for (final Field field in instanceBuilder.fields.keys) {
+        if (field.name == node.name) {
+          return instanceBuilder.fields[field];
+        }
+      }
+      return reportInvalid(node,
+          'Could not evaluate field get ${node.name} on incomplete instance');
+    }
+
+    final Constant receiver = _evaluateSubexpression(node.receiver);
+    if (receiver is StringConstant && node.name.name == 'length') {
+      if (targetingJavaScript) {
+        return canonicalize(new JavaScriptIntConstant(receiver.value.length));
+      }
+      return canonicalize(new IntConstant(receiver.value.length));
+    } else if (shouldBeUnevaluated) {
+      return unevaluated(node,
+          new PropertyGet(extract(receiver), node.name, node.interfaceTarget));
+    } else if (receiver is NullConstant) {
+      return report(node, messageConstEvalNullValue);
+    }
+    return report(
+        node,
+        templateConstEvalInvalidPropertyGet.withArguments(
+            node.name.name, receiver));
+  }
+
+  visitLet(Let node) {
+    env.addVariableValue(
+        node.variable, _evaluateSubexpression(node.variable.initializer));
+    return _evaluateSubexpression(node.body);
+  }
+
+  visitVariableGet(VariableGet node) {
+    // Not every variable which a [VariableGet] refers to must be marked as
+    // constant.  For example function parameters as well as constructs
+    // desugared to [Let] expressions are ok.
+    //
+    // TODO(kustermann): The heuristic of allowing all [VariableGet]s on [Let]
+    // variables might allow more than it should.
+    final VariableDeclaration variable = node.variable;
+    if (variable.parent is Let || _isFormalParameter(variable)) {
+      return env.lookupVariable(node.variable) ??
+          report(
+              node,
+              templateConstEvalNonConstantVariableGet
+                  .withArguments(variable.name));
+    }
+    if (variable.isConst) {
+      return _evaluateSubexpression(variable.initializer);
+    }
+    return reportInvalid(node, 'Variable get of a non-const variable.');
+  }
+
+  visitStaticGet(StaticGet node) {
+    return withNewEnvironment(() {
+      final Member target = node.target;
+      if (target is Field) {
+        if (target.isConst) {
+          if (target.isInExternalLibrary && target.initializer == null) {
+            // The variable is unavailable due to separate compilation.
+            return unevaluated(node, new StaticGet(target));
+          }
+          return runInsideContext(target, () {
+            return _evaluateSubexpression(target.initializer);
+          });
+        }
+        return report(
+            node,
+            templateConstEvalInvalidStaticInvocation
+                .withArguments(target.name.name));
+      } else if (target is Procedure) {
+        if (target.kind == ProcedureKind.Method) {
+          return canonicalize(new TearOffConstant(target));
+        }
+        return report(
+            node,
+            templateConstEvalInvalidStaticInvocation
+                .withArguments(target.name.name));
+      } else {
+        reportInvalid(
+            node, 'No support for ${target.runtimeType} in a static-get.');
+      }
+    });
+  }
+
+  visitStringConcatenation(StringConcatenation node) {
+    final List<Object> concatenated = <Object>[new StringBuffer()];
+    for (int i = 0; i < node.expressions.length; i++) {
+      Constant constant = _evaluateSubexpression(node.expressions[i]);
+      if (constant is PrimitiveConstant<Object>) {
+        String value = constant.toString();
+        Object last = concatenated.last;
+        if (last is StringBuffer) {
+          last.write(value);
+        } else {
+          concatenated.add(new StringBuffer(value));
+        }
+      } else if (shouldBeUnevaluated) {
+        // The constant is either unevaluated or a non-primitive in an
+        // unevaluated context. In both cases we defer the evaluation and/or
+        // error reporting till later.
+        concatenated.add(constant);
+      } else {
+        return report(
+            node,
+            templateConstEvalInvalidStringInterpolationOperand
+                .withArguments(constant));
+      }
+    }
+    if (concatenated.length > 1) {
+      final expressions = new List<Expression>(concatenated.length);
+      for (int i = 0; i < concatenated.length; i++) {
+        Object value = concatenated[i];
+        if (value is StringBuffer) {
+          expressions[i] = new ConstantExpression(
+              canonicalize(new StringConstant(value.toString())));
+        } else {
+          // The value is either unevaluated constant or a non-primitive
+          // constant in an unevaluated expression.
+          expressions[i] = extract(value);
+        }
+      }
+      return unevaluated(node, new StringConcatenation(expressions));
+    }
+    return canonicalize(new StringConstant(concatenated.single.toString()));
+  }
+
+  visitStaticInvocation(StaticInvocation node) {
+    final Procedure target = node.target;
+    final Arguments arguments = node.arguments;
+    final positionals = evaluatePositionalArguments(arguments);
+    final named = evaluateNamedArguments(arguments);
+    if (shouldBeUnevaluated) {
+      return unevaluated(
+          node,
+          new StaticInvocation(
+              target, unevaluatedArguments(positionals, named, arguments.types),
+              isConst: true));
+    }
+    if (target.kind == ProcedureKind.Factory) {
+      if (target.isConst &&
+          target.name.name == "fromEnvironment" &&
+          target.enclosingLibrary == coreTypes.coreLibrary &&
+          positionals.length == 1) {
+        if (environmentDefines != null) {
+          // Evaluate environment constant.
+          Constant name = positionals.single;
+          if (name is StringConstant) {
+            String value = environmentDefines[name.value];
+            Constant defaultValue = named["defaultValue"];
+
+            if (target.enclosingClass == coreTypes.boolClass) {
+              Constant boolConstant = value == "true"
+                  ? trueConstant
+                  : value == "false"
+                      ? falseConstant
+                      : defaultValue is BoolConstant
+                          ? makeBoolConstant(defaultValue.value)
+                          : defaultValue is NullConstant
+                              ? nullConstant
+                              : falseConstant;
+              return boolConstant;
+            } else if (target.enclosingClass == coreTypes.intClass) {
+              int intValue = value != null ? int.tryParse(value) : null;
+              intValue ??= defaultValue is IntConstant
+                  ? defaultValue.value
+                  : defaultValue is JavaScriptIntConstant
+                      ? defaultValue.bigIntValue.toInt()
+                      : null;
+              if (intValue == null) return nullConstant;
+              if (targetingJavaScript) {
+                return canonicalize(new JavaScriptIntConstant(intValue));
+              }
+              return canonicalize(new IntConstant(intValue));
+            } else if (target.enclosingClass == coreTypes.stringClass) {
+              value ??=
+                  defaultValue is StringConstant ? defaultValue.value : null;
+              if (value == null) return nullConstant;
+              return canonicalize(new StringConstant(value));
+            }
+          } else if (name is NullConstant) {
+            return report(node, messageConstEvalNullValue);
+          }
+        } else {
+          // Leave environment constant unevaluated.
+          return unevaluated(
+              node,
+              new StaticInvocation(target,
+                  unevaluatedArguments(positionals, named, arguments.types),
+                  isConst: true));
+        }
+      }
+    } else if (target.name.name == 'identical') {
+      // Ensure the "identical()" function comes from dart:core.
+      final parent = target.parent;
+      if (parent is Library && parent == coreTypes.coreLibrary) {
+        final Constant left = positionals[0];
+        final Constant right = positionals[1];
+
+        if (targetingJavaScript) {
+          // In JavaScript, we lower [identical] to `===`, so any comparison
+          // against NaN yields `false`.
+          if (isNaN(left) || isNaN(right)) {
+            return falseConstant;
+          }
+
+          // In JavaScript, `-0.0 === 0.0`.
+          if (isZero(left)) {
+            return makeBoolConstant(isZero(right));
+          }
+        }
+
+        // Since we canonicalize constants during the evaluation, we can use
+        // identical here.
+        return makeBoolConstant(identical(left, right));
+      }
+    }
+
+    // TODO(kmillikin) For an invalid factory invocation we should adopt a
+    // better message.  This will show something like:
+    //
+    // "The invocation of 'List' is not allowed within a const context."
+    //
+    // Which is not quite right when the code was "new List()".
+    String name = target.name.name;
+    if (target is Procedure && target.isFactory) {
+      if (name.isEmpty) {
+        name = target.enclosingClass.name;
+      } else {
+        name = '${target.enclosingClass.name}.${name}';
+      }
+    }
+    return report(
+        node, templateConstEvalInvalidStaticInvocation.withArguments(name));
+  }
+
+  visitAsExpression(AsExpression node) {
+    final Constant constant = _evaluateSubexpression(node.operand);
+    if (shouldBeUnevaluated) {
+      return unevaluated(node, new AsExpression(extract(constant), node.type));
+    }
+    return ensureIsSubtype(constant, evaluateDartType(node, node.type), node);
+  }
+
+  visitIsExpression(IsExpression node) {
+    final Constant constant = node.operand.accept(this);
+    if (shouldBeUnevaluated) {
+      return unevaluated(node, new IsExpression(extract(constant), node.type));
+    }
+    if (constant is NullConstant) {
+      return makeBoolConstant(node.type == typeEnvironment.nullType ||
+          node.type == typeEnvironment.objectType ||
+          node.type is DynamicType);
+    }
+    return makeBoolConstant(
+        isSubtype(constant, evaluateDartType(node, node.type)));
+  }
+
+  visitNot(Not node) {
+    final Constant constant = _evaluateSubexpression(node.operand);
+    if (constant is BoolConstant) {
+      return makeBoolConstant(constant != trueConstant);
+    }
+    if (shouldBeUnevaluated) {
+      return unevaluated(node, new Not(extract(constant)));
+    }
+    return report(
+        node,
+        templateConstEvalInvalidType.withArguments(constant,
+            typeEnvironment.boolType, constant.getType(typeEnvironment)));
+  }
+
+  visitSymbolLiteral(SymbolLiteral node) {
+    final libraryReference =
+        node.value.startsWith('_') ? libraryOf(node).reference : null;
+    return canonicalize(new SymbolConstant(node.value, libraryReference));
+  }
+
+  visitInstantiation(Instantiation node) {
+    final Constant constant = _evaluateSubexpression(node.expression);
+    if (shouldBeUnevaluated) {
+      return unevaluated(
+          node, new Instantiation(extract(constant), node.typeArguments));
+    }
+    if (constant is TearOffConstant) {
+      if (node.typeArguments.length ==
+          constant.procedure.function.typeParameters.length) {
+        final typeArguments = evaluateDartTypes(node, node.typeArguments);
+        return canonicalize(
+            new PartialInstantiationConstant(constant, typeArguments));
+      }
+      return reportInvalid(
+          node,
+          'The number of type arguments supplied in the partial instantiation '
+          'does not match the number of type arguments of the $constant.');
+    }
+    // The inner expression in an instantiation can never be null, since
+    // instantiations are only inferred on direct references to declarations.
+    return reportInvalid(
+        node, 'Only tear-off constants can be partially instantiated.');
+  }
+
+  @override
+  visitCheckLibraryIsLoaded(CheckLibraryIsLoaded node) {
+    return report(
+        node, templateConstEvalDeferredLibrary.withArguments(node.import.name));
+  }
+
+  // Helper methods:
+
+  bool isZero(Constant value) =>
+      (value is IntConstant && value.value == 0) ||
+      (value is JavaScriptIntConstant && value.bigIntValue == BigInt.zero) ||
+      (value is DoubleConstant && value.value == 0);
+
+  bool isNaN(Constant value) => value is DoubleConstant && value.value.isNaN;
+
+  bool hasPrimitiveEqual(Constant constant) {
+    // TODO(askesc, fishythefish): Make sure the correct class is inferred
+    // when we clean up JavaScript int constant handling.
+    DartType type = constant.getType(typeEnvironment);
+    return !(type is InterfaceType && !classHasPrimitiveEqual(type.classNode));
+  }
+
+  bool classHasPrimitiveEqual(Class klass) {
+    bool cached = primitiveEqualCache[klass];
+    if (cached != null) return cached;
+    for (Procedure procedure in klass.procedures) {
+      if (procedure.kind == ProcedureKind.Operator &&
+          procedure.name.name == '==' &&
+          !procedure.isAbstract &&
+          !procedure.isForwardingStub) {
+        return primitiveEqualCache[klass] = false;
+      }
+    }
+    if (klass.supertype == null) return true; // To be on the safe side
+    return primitiveEqualCache[klass] =
+        classHasPrimitiveEqual(klass.supertype.classNode);
+  }
+
+  BoolConstant makeBoolConstant(bool value) =>
+      value ? trueConstant : falseConstant;
+
+  DoubleConstant makeDoubleConstant(double value) {
+    if (targetingJavaScript) {
+      // Convert to an integer when possible (matching the runtime behavior
+      // of `is int`).
+      if (value.isFinite && !identical(value, -0.0)) {
+        var i = value.toInt();
+        if (value == i.toDouble()) return new JavaScriptIntConstant(i);
+      }
+    }
+    return new DoubleConstant(value);
+  }
+
+  bool isSubtype(Constant constant, DartType type) {
+    DartType constantType = constant.getType(typeEnvironment);
+    if (targetingJavaScript) {
+      if (constantType == typeEnvironment.intType &&
+          type == typeEnvironment.doubleType) {
+        // With JS semantics, an integer is also a double.
+        return true;
+      }
+
+      if (constantType == typeEnvironment.doubleType &&
+          type == typeEnvironment.intType) {
+        double value = (constant as DoubleConstant).value;
+        if (value.isFinite && value == value.truncateToDouble()) {
+          return true;
+        }
+      }
+    }
+    return typeEnvironment.isSubtypeOf(constantType, type);
+  }
+
+  Constant ensureIsSubtype(Constant constant, DartType type, TreeNode node) {
+    if (!isSubtype(constant, type)) {
+      return report(
+          node,
+          templateConstEvalInvalidType.withArguments(
+              constant, type, constant.getType(typeEnvironment)));
+    }
+    return constant;
+  }
+
+  List<DartType> evaluateTypeArguments(TreeNode node, Arguments arguments) {
+    return evaluateDartTypes(node, arguments.types);
+  }
+
+  List<DartType> evaluateSuperTypeArguments(TreeNode node, Supertype type) {
+    return evaluateDartTypes(node, type.typeArguments);
+  }
+
+  List<DartType> evaluateDartTypes(TreeNode node, List<DartType> types) {
+    // TODO: Once the frontend gurantees that there are no free type variables
+    // left over after stubstitution, we can enable this shortcut again:
+    // if (env.isEmpty) return types;
+    return types.map((t) => evaluateDartType(node, t)).toList();
+  }
+
+  DartType evaluateDartType(TreeNode node, DartType type) {
+    final result = env.subsituteType(type);
+
+    if (!isInstantiated(result)) {
+      return report(
+          node, templateConstEvalFreeTypeParameter.withArguments(type));
+    }
+
+    return result;
+  }
+
+  List<Constant> evaluatePositionalArguments(Arguments arguments) {
+    return arguments.positional.map((Expression node) {
+      return _evaluateSubexpression(node);
+    }).toList();
+  }
+
+  Map<String, Constant> evaluateNamedArguments(Arguments arguments) {
+    if (arguments.named.isEmpty) return const <String, Constant>{};
+
+    final Map<String, Constant> named = {};
+    arguments.named.forEach((NamedExpression pair) {
+      named[pair.name] = _evaluateSubexpression(pair.value);
+    });
+    return named;
+  }
+
+  Arguments unevaluatedArguments(List<Constant> positionalArgs,
+      Map<String, Constant> namedArgs, List<DartType> types) {
+    final positional = new List<Expression>(positionalArgs.length);
+    final named = new List<NamedExpression>(namedArgs.length);
+    for (int i = 0; i < positionalArgs.length; ++i) {
+      positional[i] = extract(positionalArgs[i]);
+    }
+    int i = 0;
+    namedArgs.forEach((String name, Constant value) {
+      named[i++] = new NamedExpression(name, extract(value));
+    });
+    return new Arguments(positional, named: named, types: types);
+  }
+
+  Constant canonicalize(Constant constant) {
+    return canonicalizationCache.putIfAbsent(constant, () => constant);
+  }
+
+  withNewInstanceBuilder(Class klass, List<DartType> typeArguments, fn()) {
+    InstanceBuilder old = instanceBuilder;
+    try {
+      instanceBuilder = new InstanceBuilder(this, klass, typeArguments);
+      return fn();
+    } finally {
+      instanceBuilder = old;
+    }
+  }
+
+  withNewEnvironment(fn()) {
+    final EvaluationEnvironment oldEnv = env;
+    try {
+      env = new EvaluationEnvironment();
+      return fn();
+    } finally {
+      env = oldEnv;
+    }
+  }
+
+  Constant evaluateBinaryBitOperation(String op, int a, int b, TreeNode node) {
+    int result;
+    switch (op) {
+      case '|':
+        result = a | b;
+        break;
+      case '&':
+        result = a & b;
+        break;
+      case '^':
+        result = a ^ b;
+        break;
+    }
+
+    if (targetingJavaScript) {
+      return canonicalize(new JavaScriptIntConstant(result));
+    }
+    return canonicalize(new IntConstant(result));
+  }
+
+  Constant evaluateBinaryShiftOperation(String op, int a, int b, TreeNode node,
+      {negativeReceiver: false}) {
+    int result;
+    switch (op) {
+      case '<<':
+        result = a << b;
+        break;
+      case '>>':
+        if (targetingJavaScript) {
+          if (negativeReceiver) {
+            const signBit = 0x80000000;
+            a -= (a & signBit) << 1;
+          }
+          result = a >> b;
+        } else {
+          result = a >> b;
+        }
+        break;
+      case '>>>':
+        // TODO(fishythefish): Implement JS semantics for `>>>`.
+        result = b >= 64 ? 0 : (a >> b) & ((1 << (64 - b)) - 1);
+        break;
+    }
+
+    if (targetingJavaScript) {
+      return canonicalize(new JavaScriptIntConstant(result.toUnsigned(32)));
+    }
+    return canonicalize(new IntConstant(result));
+  }
+
+  Constant evaluateBinaryNumericOperation(
+      String op, num a, num b, TreeNode node) {
+    num result;
+    switch (op) {
+      case '+':
+        result = a + b;
+        break;
+      case '-':
+        result = a - b;
+        break;
+      case '*':
+        result = a * b;
+        break;
+      case '/':
+        result = a / b;
+        break;
+      case '~/':
+        result = a ~/ b;
+        break;
+      case '%':
+        result = a % b;
+        break;
+    }
+
+    if (result is int) {
+      if (targetingJavaScript) {
+        return canonicalize(new JavaScriptIntConstant(result));
+      }
+      return canonicalize(new IntConstant(result.toSigned(64)));
+    }
+    if (result is double) {
+      return canonicalize(makeDoubleConstant(result));
+    }
+
+    switch (op) {
+      case '<':
+        return makeBoolConstant(a < b);
+      case '<=':
+        return makeBoolConstant(a <= b);
+      case '>=':
+        return makeBoolConstant(a >= b);
+      case '>':
+        return makeBoolConstant(a > b);
+    }
+
+    return reportInvalid(node, "Unexpected binary numeric operation '$op'.");
+  }
+
+  Library libraryOf(TreeNode node) {
+    // The tree structure of the kernel AST ensures we always have an enclosing
+    // library.
+    while (true) {
+      if (node is Library) return node;
+      node = node.parent;
+    }
+  }
+}
+
+/// Holds the necessary information for a constant object, namely
+///   * the [klass] being instantiated
+///   * the [typeArguments] used for the instantiation
+///   * the [fields] the instance will obtain (all fields from the
+///     instantiated [klass] up to the [Object] klass).
+class InstanceBuilder {
+  ConstantEvaluator evaluator;
+
+  /// The class of the new instance.
+  final Class klass;
+
+  /// The values of the type parameters of the new instance.
+  final List<DartType> typeArguments;
+
+  /// The field values of the new instance.
+  final Map<Field, Constant> fields = <Field, Constant>{};
+
+  final List<AssertStatement> asserts = <AssertStatement>[];
+
+  InstanceBuilder(this.evaluator, this.klass, this.typeArguments);
+
+  void setFieldValue(Field field, Constant constant) {
+    fields[field] = constant;
+  }
+
+  InstanceConstant buildInstance() {
+    assert(asserts.isEmpty);
+    final Map<Reference, Constant> fieldValues = <Reference, Constant>{};
+    fields.forEach((Field field, Constant value) {
+      assert(value is! UnevaluatedConstant);
+      fieldValues[field.reference] = value;
+    });
+    return new InstanceConstant(klass.reference, typeArguments, fieldValues);
+  }
+
+  InstanceCreation buildUnevaluatedInstance() {
+    final Map<Reference, Expression> fieldValues = <Reference, Expression>{};
+    fields.forEach((Field field, Constant value) {
+      fieldValues[field.reference] = evaluator.extract(value);
+    });
+    return new InstanceCreation(
+        klass.reference, typeArguments, fieldValues, asserts);
+  }
+}
+
+/// Holds an environment of type parameters, parameters and variables.
+class EvaluationEnvironment {
+  /// The values of the type parameters in scope.
+  final Map<TypeParameter, DartType> _typeVariables =
+      <TypeParameter, DartType>{};
+
+  /// The values of the parameters/variables in scope.
+  final Map<VariableDeclaration, Constant> _variables =
+      <VariableDeclaration, Constant>{};
+
+  /// Whether the current environment is empty.
+  bool get isEmpty => _typeVariables.isEmpty && _variables.isEmpty;
+
+  void addTypeParameterValue(TypeParameter parameter, DartType value) {
+    assert(!_typeVariables.containsKey(parameter));
+    _typeVariables[parameter] = value;
+  }
+
+  void addVariableValue(VariableDeclaration variable, Constant value) {
+    _variables[variable] = value;
+  }
+
+  DartType lookupParameterValue(TypeParameter parameter) {
+    final DartType value = _typeVariables[parameter];
+    assert(value != null);
+    return value;
+  }
+
+  Constant lookupVariable(VariableDeclaration variable) {
+    return _variables[variable];
+  }
+
+  DartType subsituteType(DartType type) {
+    if (_typeVariables.isEmpty) return type;
+    return substitute(type, _typeVariables);
+  }
+}
+
+// Used as control-flow to abort the current evaluation.
+class _AbortDueToError {
+  final TreeNode node;
+  final Message message;
+  final List<LocatedMessage> context;
+
+  _AbortDueToError(this.node, this.message, {this.context});
+}
+
+class _AbortDueToInvalidExpression {
+  final TreeNode node;
+  final String message;
+
+  _AbortDueToInvalidExpression(this.node, this.message);
+}
+
+abstract class ErrorReporter {
+  const ErrorReporter();
+
+  void report(LocatedMessage message, List<LocatedMessage> context);
+
+  void reportInvalidExpression(InvalidExpression node);
+}
+
+class SimpleErrorReporter implements ErrorReporter {
+  const SimpleErrorReporter();
+
+  @override
+  void report(LocatedMessage message, List<LocatedMessage> context) {
+    _report(message);
+    for (LocatedMessage contextMessage in context) {
+      _report(contextMessage);
+    }
+  }
+
+  @override
+  void reportInvalidExpression(InvalidExpression node) {
+    // Ignored
+  }
+
+  void _report(LocatedMessage message) {
+    reportMessage(message.uri, message.charOffset, message.message);
+  }
+
+  void reportMessage(Uri uri, int offset, String message) {
+    io.exitCode = 42;
+    io.stderr.writeln('$uri:$offset Constant evaluation error: $message');
+  }
+}
+
+class IsInstantiatedVisitor extends DartTypeVisitor<bool> {
+  final _availableVariables = new Set<TypeParameter>();
+
+  bool isInstantiated(DartType type) {
+    return type.accept(this);
+  }
+
+  bool defaultDartType(DartType node) {
+    throw 'A visitor method seems to be unimplemented!';
+  }
+
+  bool visitInvalidType(InvalidType node) => true;
+  bool visitDynamicType(DynamicType node) => true;
+  bool visitVoidType(VoidType node) => true;
+  bool visitBottomType(BottomType node) => true;
+
+  bool visitTypeParameterType(TypeParameterType node) {
+    return _availableVariables.contains(node.parameter);
+  }
+
+  bool visitInterfaceType(InterfaceType node) {
+    return node.typeArguments
+        .every((DartType typeArgument) => typeArgument.accept(this));
+  }
+
+  bool visitFunctionType(FunctionType node) {
+    final parameters = node.typeParameters;
+    _availableVariables.addAll(parameters);
+    final bool result = node.returnType.accept(this) &&
+        node.positionalParameters.every((p) => p.accept(this)) &&
+        node.namedParameters.every((p) => p.type.accept(this));
+    _availableVariables.removeAll(parameters);
+    return result;
+  }
+
+  bool visitTypedefType(TypedefType node) {
+    return node.unalias.accept(this);
+  }
+}
+
+bool _isFormalParameter(VariableDeclaration variable) {
+  final parent = variable.parent;
+  if (parent is FunctionNode) {
+    return parent.positionalParameters.contains(variable) ||
+        parent.namedParameters.contains(variable);
+  }
+  return false;
+}
diff --git a/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart b/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart
index 1434f9f..db33cf1 100644
--- a/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/expression_generator.dart
@@ -40,7 +40,8 @@
         mustacheName,
         percentName,
         plusName,
-        rightShiftName;
+        rightShiftName,
+        tripleShiftName;
 
 import '../parser.dart' show lengthForToken, lengthOfSpan, offsetForToken;
 
@@ -956,6 +957,9 @@
     } else if (identical(">>=", assignmentOperator)) {
       return generator.buildCompoundAssignment(rightShiftName, value,
           offset: offsetForToken(token), voidContext: voidContext);
+    } else if (identical(">>>=", assignmentOperator)) {
+      return generator.buildCompoundAssignment(tripleShiftName, value,
+          offset: offsetForToken(token), voidContext: voidContext);
     } else if (identical("??=", assignmentOperator)) {
       return generator.buildNullAwareAssignment(
           value, const DynamicType(), offsetForToken(token),
diff --git a/pkg/front_end/lib/src/fasta/kernel/fangorn.dart b/pkg/front_end/lib/src/fasta/kernel/fangorn.dart
index 412bc68..1616ce7 100644
--- a/pkg/front_end/lib/src/fasta/kernel/fangorn.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/fangorn.dart
@@ -53,6 +53,16 @@
 
 import 'body_builder.dart' show LabelTarget;
 
+import 'collections.dart'
+    show
+        ForElement,
+        ForInElement,
+        ForInMapEntry,
+        ForMapEntry,
+        IfElement,
+        IfMapEntry,
+        SpreadElement;
+
 import 'kernel_expression_generator.dart'
     show
         KernelDeferredAccessGenerator,
@@ -275,6 +285,66 @@
   }
 
   @override
+  Expression spreadElement(Expression expression, Token token) {
+    return new SpreadElement(expression, token.lexeme == '...?')
+      ..fileOffset = offsetForToken(token);
+  }
+
+  @override
+  Expression ifElement(Expression condition, Expression then,
+      Expression otherwise, Token token) {
+    return new IfElement(condition, then, otherwise)
+      ..fileOffset = offsetForToken(token);
+  }
+
+  @override
+  MapEntry ifMapEntry(
+      Expression condition, MapEntry then, MapEntry otherwise, Token token) {
+    return new IfMapEntry(condition, then, otherwise)
+      ..fileOffset = offsetForToken(token);
+  }
+
+  @override
+  Expression forElement(
+      List<VariableDeclaration> variables,
+      Expression condition,
+      List<Expression> updates,
+      Expression body,
+      Token token) {
+    return new ForElement(variables, condition, updates, body)
+      ..fileOffset = offsetForToken(token);
+  }
+
+  @override
+  MapEntry forMapEntry(
+      List<VariableDeclaration> variables,
+      Expression condition,
+      List<Expression> updates,
+      MapEntry body,
+      Token token) {
+    return new ForMapEntry(variables, condition, updates, body)
+      ..fileOffset = offsetForToken(token);
+  }
+
+  @override
+  Expression forInElement(VariableDeclaration variable, Expression iterable,
+      Statement prologue, Expression body, Expression problem, Token token,
+      {bool isAsync: false}) {
+    return new ForInElement(variable, iterable, prologue, body, problem,
+        isAsync: isAsync)
+      ..fileOffset = offsetForToken(token);
+  }
+
+  @override
+  MapEntry forInMapEntry(VariableDeclaration variable, Expression iterable,
+      Statement prologue, MapEntry body, Expression problem, Token token,
+      {bool isAsync: false}) {
+    return new ForInMapEntry(variable, iterable, prologue, body, problem,
+        isAsync: isAsync)
+      ..fileOffset = offsetForToken(token);
+  }
+
+  @override
   AssertInitializer assertInitializer(
       Token assertKeyword,
       Token leftParenthesis,
diff --git a/pkg/front_end/lib/src/fasta/kernel/forest.dart b/pkg/front_end/lib/src/fasta/kernel/forest.dart
index 2ec0e2c..818a3b1 100644
--- a/pkg/front_end/lib/src/fasta/kernel/forest.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/forest.dart
@@ -188,6 +188,36 @@
 
   Expression asExpression(Expression expression, DartType type, Token location);
 
+  Expression spreadElement(Expression expression, Token token);
+
+  Expression ifElement(
+      Expression condition, Expression then, Expression otherwise, Token token);
+
+  MapEntry ifMapEntry(
+      Expression condition, MapEntry then, MapEntry otherwise, Token token);
+
+  Expression forElement(
+      List<VariableDeclaration> variables,
+      Expression condition,
+      List<Expression> updates,
+      Expression body,
+      Token token);
+
+  MapEntry forMapEntry(
+      List<VariableDeclaration> variables,
+      Expression condition,
+      List<Expression> updates,
+      MapEntry body,
+      Token token);
+
+  Expression forInElement(VariableDeclaration variable, Expression iterable,
+      Statement prologue, Expression body, Expression problem, Token token,
+      {bool isAsync: false});
+
+  MapEntry forInMapEntry(VariableDeclaration variable, Expression iterable,
+      Statement prologue, MapEntry body, Expression problem, Token token,
+      {bool isAsync: false});
+
   /// Return a representation of an assert that appears in a constructor's
   /// initializer list.
   Object assertInitializer(Token assertKeyword, Token leftParenthesis,
diff --git a/pkg/front_end/lib/src/fasta/kernel/implicit_field_type.dart b/pkg/front_end/lib/src/fasta/kernel/implicit_field_type.dart
new file mode 100644
index 0000000..902db15
--- /dev/null
+++ b/pkg/front_end/lib/src/fasta/kernel/implicit_field_type.dart
@@ -0,0 +1,33 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library fasta.implicit_type;
+
+import 'package:kernel/ast.dart'
+    show DartType, DartTypeVisitor, DartTypeVisitor1, Visitor;
+
+import '../../scanner/token.dart' show Token;
+
+import '../problems.dart' show unsupported;
+
+import 'kernel_builder.dart' show MemberBuilder;
+
+class ImplicitFieldType extends DartType {
+  final MemberBuilder member;
+  final Token initializerToken;
+
+  const ImplicitFieldType(this.member, this.initializerToken);
+
+  accept(DartTypeVisitor<Object> v) {
+    unsupported("accept", member.charOffset, member.fileUri);
+  }
+
+  accept1(DartTypeVisitor1<Object, Object> v, arg) {
+    unsupported("accept1", member.charOffset, member.fileUri);
+  }
+
+  visitChildren(Visitor<Object> v) {
+    unsupported("visitChildren", member.charOffset, member.fileUri);
+  }
+}
diff --git a/pkg/front_end/lib/src/fasta/kernel/implicit_type.dart b/pkg/front_end/lib/src/fasta/kernel/implicit_type.dart
deleted file mode 100644
index 218438d..0000000
--- a/pkg/front_end/lib/src/fasta/kernel/implicit_type.dart
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library fasta.implicit_type;
-
-import 'package:kernel/ast.dart'
-    show DartType, DartTypeVisitor, DartTypeVisitor1, Visitor;
-
-import '../../scanner/token.dart' show Token;
-
-import '../problems.dart' show unsupported;
-
-import 'kernel_builder.dart' show MemberBuilder;
-
-class ImplicitType extends DartType {
-  final MemberBuilder member;
-  final Token initializerToken;
-
-  const ImplicitType(this.member, this.initializerToken);
-
-  accept(DartTypeVisitor<Object> v) {
-    unsupported("accept", member.charOffset, member.fileUri);
-  }
-
-  accept1(DartTypeVisitor1<Object, Object> v, arg) {
-    unsupported("accept1", member.charOffset, member.fileUri);
-  }
-
-  visitChildren(Visitor<Object> v) {
-    unsupported("visitChildren", member.charOffset, member.fileUri);
-  }
-}
diff --git a/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart b/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
index 470da0c..830e13a 100644
--- a/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
@@ -7,17 +7,31 @@
 class InferenceVisitor extends BodyVisitor1<void, DartType> {
   final ShadowTypeInferrer inferrer;
 
+  Class mapEntryClass;
+
+  // Stores the offset of the map entry found by inferMapEntry.
+  int mapEntryOffset = null;
+
+  // Stores the offset of the map spread found by inferMapEntry.
+  int mapSpreadOffset = null;
+
+  // Stores the offset of the iterable spread found by inferMapEntry.
+  int iterableSpreadOffset = null;
+
+  // Stores the type of the iterable spread found by inferMapEntry.
+  DartType iterableSpreadType = null;
+
   InferenceVisitor(this.inferrer);
 
   @override
   void defaultExpression(Expression node, DartType typeContext) {
-    unhandled("${node.runtimeType}", "InferenceVistor", node.fileOffset,
+    unhandled("${node.runtimeType}", "InferenceVisitor", node.fileOffset,
         inferrer.helper.uri);
   }
 
   @override
   void defaultStatement(Statement node, _) {
-    unhandled("${node.runtimeType}", "InferenceVistor", node.fileOffset,
+    unhandled("${node.runtimeType}", "InferenceVisitor", node.fileOffset,
         inferrer.helper.uri);
   }
 
@@ -139,10 +153,10 @@
           name.length,
           node.target.fileUri);
       for (var declaration in node.target.function.positionalParameters) {
-        declaration.type ??= const DynamicType();
+        declaration.type ??= const InvalidType();
       }
       for (var declaration in node.target.function.namedParameters) {
-        declaration.type ??= const DynamicType();
+        declaration.type ??= const InvalidType();
       }
     } else if ((library = inferrer.engine.toBeInferred[node.target]) != null) {
       inferrer.engine.toBeInferred.remove(node.target);
@@ -165,11 +179,13 @@
         node.arguments,
         isConst: node.isConst);
     inferrer.storeInferredType(node, inferenceResult.type);
-    KernelLibraryBuilder inferrerLibrary = inferrer.library;
-    if (!hasExplicitTypeArguments && inferrerLibrary is KernelLibraryBuilder) {
-      inferrerLibrary.checkBoundsInConstructorInvocation(
-          node, inferrer.typeSchemaEnvironment,
-          inferred: true);
+    if (!inferrer.isTopLevel) {
+      KernelLibraryBuilder library = inferrer.library;
+      if (!hasExplicitTypeArguments) {
+        library.checkBoundsInConstructorInvocation(
+            node, inferrer.typeSchemaEnvironment,
+            inferred: true);
+      }
     }
   }
 
@@ -224,11 +240,13 @@
         node.argumentJudgments,
         isConst: node.isConst);
     node.inferredType = inferenceResult.type;
-    KernelLibraryBuilder inferrerLibrary = inferrer.library;
-    if (!hadExplicitTypeArguments && inferrerLibrary is KernelLibraryBuilder) {
-      inferrerLibrary.checkBoundsInFactoryInvocation(
-          node, inferrer.typeSchemaEnvironment,
-          inferred: true);
+    if (!inferrer.isTopLevel) {
+      KernelLibraryBuilder library = inferrer.library;
+      if (!hadExplicitTypeArguments) {
+        library.checkBoundsInFactoryInvocation(
+            node, inferrer.typeSchemaEnvironment,
+            inferred: true);
+      }
     }
     return null;
   }
@@ -240,11 +258,12 @@
         node.field.type, initializerType, node.value, node.fileOffset);
   }
 
-  void handleForInStatementDeclaringVariable(ForInStatement node) {
+  void handleForInDeclaringVariable(
+      VariableDeclaration variable, Expression iterable, Statement body,
+      {bool isAsync: false}) {
     DartType elementType;
     bool typeNeeded = false;
     bool typeChecksNeeded = !inferrer.isTopLevel;
-    final VariableDeclaration variable = node.variable;
     if (VariableDeclarationJudgment.isImplicitlyTyped(variable)) {
       typeNeeded = true;
       elementType = const UnknownType();
@@ -252,45 +271,58 @@
       elementType = variable.type;
     }
 
-    DartType inferredType =
-        inferForInIterable(node, elementType, typeNeeded || typeChecksNeeded);
+    DartType inferredType = inferForInIterable(
+        iterable, elementType, typeNeeded || typeChecksNeeded,
+        isAsync: isAsync);
     if (typeNeeded) {
       inferrer.instrumentation?.record(inferrer.uri, variable.fileOffset,
           'type', new InstrumentationValueForType(inferredType));
       variable.type = inferredType;
     }
 
-    inferrer.inferStatement(node.body);
+    if (body != null) inferrer.inferStatement(body);
 
     VariableDeclaration tempVar =
         new VariableDeclaration(null, type: inferredType, isFinal: true);
     VariableGet variableGet = new VariableGet(tempVar)
       ..fileOffset = variable.fileOffset;
+    TreeNode parent = variable.parent;
     Expression implicitDowncast = inferrer.ensureAssignable(
-        variable.type, inferredType, variableGet, node.fileOffset,
+        variable.type, inferredType, variableGet, parent.fileOffset,
         template: templateForInLoopElementTypeNotAssignable);
     if (implicitDowncast != null) {
-      node.variable = tempVar..parent = node;
+      parent.replaceChild(variable, tempVar);
       variable.initializer = implicitDowncast..parent = variable;
-      node.body = combineStatements(variable, node.body)..parent = node;
+      if (body == null) {
+        if (parent is ForInElement) {
+          parent.prologue = variable;
+        } else if (parent is ForInMapEntry) {
+          parent.prologue = variable;
+        } else {
+          unhandled("${parent.runtimeType}", "handleForInDeclaringVariable",
+              variable.fileOffset, variable.location.file);
+        }
+      } else {
+        parent.replaceChild(body, combineStatements(variable, body));
+      }
     }
   }
 
   DartType inferForInIterable(
-      ForInStatement node, DartType elementType, bool typeNeeded) {
-    Class iterableClass = node.isAsync
+      Expression iterable, DartType elementType, bool typeNeeded,
+      {bool isAsync: false}) {
+    Class iterableClass = isAsync
         ? inferrer.coreTypes.streamClass
         : inferrer.coreTypes.iterableClass;
     DartType context = inferrer.wrapType(elementType, iterableClass);
-    Expression iterable = node.iterable;
     inferrer.inferExpression(iterable, context, typeNeeded);
     DartType inferredExpressionType =
         inferrer.resolveTypeParameter(getInferredType(iterable, inferrer));
     inferrer.ensureAssignable(
         inferrer.wrapType(const DynamicType(), iterableClass),
         inferredExpressionType,
-        node.iterable,
-        node.iterable.fileOffset,
+        iterable,
+        iterable.fileOffset,
         template: templateForInLoopTypeNotIterable);
     DartType inferredType;
     if (typeNeeded) {
@@ -306,15 +338,17 @@
     return inferredType;
   }
 
-  void handleForInStatementWithoutVariable(ForInStatement node) {
+  void handleForInWithoutVariable(
+      VariableDeclaration variable, Expression iterable, Statement body,
+      {bool isAsync: false}) {
     DartType elementType;
     bool typeChecksNeeded = !inferrer.isTopLevel;
     DartType syntheticWriteType;
     Expression syntheticAssignment;
-    Block block = node.body;
-    ExpressionStatement statement = block.statements[0];
-    SyntheticExpressionJudgment judgment = statement.expression;
     Expression rhs;
+    ExpressionStatement statement =
+        body is Block ? body.statements.first : body;
+    SyntheticExpressionJudgment judgment = statement.expression;
     syntheticAssignment = judgment.desugared;
     if (syntheticAssignment is VariableSet) {
       syntheticWriteType = elementType = syntheticAssignment.variable.type;
@@ -344,18 +378,19 @@
           inferrer.helper.uri);
     }
 
-    DartType inferredType =
-        inferForInIterable(node, elementType, typeChecksNeeded);
+    DartType inferredType = inferForInIterable(
+        iterable, elementType, typeChecksNeeded,
+        isAsync: isAsync);
     if (typeChecksNeeded) {
-      node.variable.type = inferredType;
+      variable.type = inferredType;
     }
 
-    inferrer.inferStatement(node.body);
+    inferrer.inferStatement(body);
 
     if (syntheticWriteType != null) {
       inferrer.ensureAssignable(
           greatestClosure(inferrer.coreTypes, syntheticWriteType),
-          node.variable.type,
+          variable.type,
           rhs,
           rhs.fileOffset,
           template: templateForInLoopElementTypeNotAssignable,
@@ -366,9 +401,11 @@
   @override
   void visitForInStatement(ForInStatement node, _) {
     if (node.variable.name == null) {
-      handleForInStatementWithoutVariable(node);
+      handleForInWithoutVariable(node.variable, node.iterable, node.body,
+          isAsync: node.isAsync);
     } else {
-      handleForInStatementDeclaringVariable(node);
+      handleForInDeclaringVariable(node.variable, node.iterable, node.body,
+          isAsync: node.isAsync);
     }
   }
 
@@ -638,6 +675,184 @@
     inferrer.inferStatement(node.body);
   }
 
+  DartType getSpreadElementType(DartType spreadType, bool isNullAware) {
+    if (spreadType is InterfaceType) {
+      InterfaceType supertype = inferrer.typeSchemaEnvironment
+          .getTypeAsInstanceOf(spreadType, inferrer.coreTypes.iterableClass);
+      if (supertype != null) return supertype.typeArguments[0];
+      if (spreadType.classNode == inferrer.coreTypes.nullClass && isNullAware) {
+        return spreadType;
+      }
+      return null;
+    }
+    if (spreadType is DynamicType) return const DynamicType();
+    return null;
+  }
+
+  DartType inferElement(
+      Expression element,
+      TreeNode parent,
+      DartType inferredTypeArgument,
+      Map<TreeNode, DartType> inferredSpreadTypes,
+      bool inferenceNeeded,
+      bool typeChecksNeeded) {
+    if (element is SpreadElement) {
+      DartType spreadType = inferrer.inferExpression(
+          element.expression,
+          new InterfaceType(inferrer.coreTypes.iterableClass,
+              <DartType>[inferredTypeArgument]),
+          inferenceNeeded || typeChecksNeeded,
+          isVoidAllowed: true);
+      inferredSpreadTypes[element.expression] = spreadType;
+      if (typeChecksNeeded) {
+        DartType spreadElementType =
+            getSpreadElementType(spreadType, element.isNullAware);
+        if (spreadElementType == null) {
+          if (spreadType is InterfaceType &&
+              spreadType.classNode == inferrer.coreTypes.nullClass &&
+              !element.isNullAware) {
+            parent.replaceChild(
+                element,
+                inferrer.helper.desugarSyntheticExpression(inferrer.helper
+                    .buildProblem(messageNonNullAwareSpreadIsNull,
+                        element.expression.fileOffset, 1)));
+          } else {
+            parent.replaceChild(
+                element,
+                inferrer.helper.desugarSyntheticExpression(inferrer.helper
+                    .buildProblem(
+                        templateSpreadTypeMismatch.withArguments(spreadType),
+                        element.expression.fileOffset,
+                        1)));
+          }
+        } else if (spreadType is InterfaceType) {
+          if (!inferrer.isAssignable(inferredTypeArgument, spreadElementType)) {
+            parent.replaceChild(
+                element,
+                inferrer.helper.desugarSyntheticExpression(inferrer.helper
+                    .buildProblem(
+                        templateSpreadElementTypeMismatch.withArguments(
+                            spreadElementType, inferredTypeArgument),
+                        element.expression.fileOffset,
+                        1)));
+          }
+        }
+      }
+      // Use 'dynamic' for error recovery.
+      return element.elementType =
+          getSpreadElementType(spreadType, element.isNullAware) ??
+              const DynamicType();
+    } else if (element is IfElement) {
+      DartType boolType = inferrer.coreTypes.boolClass.rawType;
+      DartType conditionType = inferrer.inferExpression(
+          element.condition, boolType, typeChecksNeeded,
+          isVoidAllowed: false);
+      inferrer.ensureAssignable(boolType, conditionType, element.condition,
+          element.condition.fileOffset);
+      DartType thenType = inferElement(
+          element.then,
+          element,
+          inferredTypeArgument,
+          inferredSpreadTypes,
+          inferenceNeeded,
+          typeChecksNeeded);
+      DartType otherwiseType;
+      if (element.otherwise != null) {
+        otherwiseType = inferElement(
+            element.otherwise,
+            element,
+            inferredTypeArgument,
+            inferredSpreadTypes,
+            inferenceNeeded,
+            typeChecksNeeded);
+      }
+      return otherwiseType == null
+          ? thenType
+          : inferrer.typeSchemaEnvironment
+              .getStandardUpperBound(thenType, otherwiseType);
+    } else if (element is ForElement) {
+      for (VariableDeclaration declaration in element.variables) {
+        if (declaration.name == null) {
+          if (declaration.initializer != null) {
+            declaration.type = inferrer.inferExpression(declaration.initializer,
+                declaration.type, inferenceNeeded || typeChecksNeeded,
+                isVoidAllowed: true);
+          }
+        } else {
+          inferrer.inferStatement(declaration);
+        }
+      }
+      if (element.condition != null) {
+        inferrer.inferExpression(
+            element.condition,
+            inferrer.coreTypes.boolClass.rawType,
+            inferenceNeeded || typeChecksNeeded,
+            isVoidAllowed: false);
+      }
+      for (Expression expression in element.updates) {
+        inferrer.inferExpression(expression, const UnknownType(),
+            inferenceNeeded || typeChecksNeeded,
+            isVoidAllowed: true);
+      }
+      return inferElement(element.body, element, inferredTypeArgument,
+          inferredSpreadTypes, inferenceNeeded, typeChecksNeeded);
+    } else if (element is ForInElement) {
+      if (element.variable.name == null) {
+        handleForInWithoutVariable(
+            element.variable, element.iterable, element.prologue,
+            isAsync: element.isAsync);
+      } else {
+        handleForInDeclaringVariable(
+            element.variable, element.iterable, element.prologue,
+            isAsync: element.isAsync);
+      }
+      if (element.problem != null) {
+        inferrer.inferExpression(element.problem, const UnknownType(),
+            inferenceNeeded || typeChecksNeeded,
+            isVoidAllowed: true);
+      }
+      return inferElement(element.body, element, inferredTypeArgument,
+          inferredSpreadTypes, inferenceNeeded, typeChecksNeeded);
+    } else {
+      DartType inferredType = inferrer.inferExpression(
+          element, inferredTypeArgument, inferenceNeeded || typeChecksNeeded,
+          isVoidAllowed: true);
+      if (inferredTypeArgument is! UnknownType) {
+        inferrer.ensureAssignable(
+            inferredTypeArgument, inferredType, element, element.fileOffset,
+            isVoidAllowed: inferredTypeArgument is VoidType);
+      }
+      return inferredType;
+    }
+  }
+
+  void checkElement(Expression item, Expression parent, DartType typeArgument,
+      Map<TreeNode, DartType> inferredSpreadTypes) {
+    if (item is SpreadElement) {
+      DartType spreadType = inferredSpreadTypes[item.expression];
+      if (spreadType is DynamicType) {
+        inferrer.ensureAssignable(inferrer.coreTypes.iterableClass.rawType,
+            spreadType, item.expression, item.expression.fileOffset);
+      }
+    } else if (item is IfElement) {
+      checkElement(item.then, item, typeArgument, inferredSpreadTypes);
+      if (item.otherwise != null) {
+        checkElement(item.otherwise, item, typeArgument, inferredSpreadTypes);
+      }
+    } else if (item is ForElement) {
+      if (item.condition != null) {
+        DartType conditionType = getInferredType(item.condition, inferrer);
+        inferrer.ensureAssignable(inferrer.coreTypes.boolClass.rawType,
+            conditionType, item.condition, item.condition.fileOffset);
+      }
+      checkElement(item.body, item, typeArgument, inferredSpreadTypes);
+    } else if (item is ForInElement) {
+      checkElement(item.body, item, typeArgument, inferredSpreadTypes);
+    } else {
+      // Do nothing.  Assignability checks are done during type inference.
+    }
+  }
+
   void visitListLiteralJudgment(
       ListLiteralJudgment node, DartType typeContext) {
     var listClass = inferrer.coreTypes.listClass;
@@ -648,9 +863,11 @@
     List<DartType> actualTypes;
     bool inferenceNeeded = node.typeArgument is ImplicitTypeArgument;
     bool typeChecksNeeded = !inferrer.isTopLevel;
+    Map<TreeNode, DartType> inferredSpreadTypes;
     if (inferenceNeeded || typeChecksNeeded) {
       formalTypes = [];
       actualTypes = [];
+      inferredSpreadTypes = new Map<TreeNode, DartType>.identity();
     }
     if (inferenceNeeded) {
       inferredTypes = [const UnknownType()];
@@ -663,14 +880,17 @@
     }
     if (inferenceNeeded || typeChecksNeeded) {
       for (int i = 0; i < node.expressions.length; ++i) {
-        Expression judgment = node.expressions[i];
-        inferrer.inferExpression(
-            judgment, inferredTypeArgument, inferenceNeeded || typeChecksNeeded,
-            isVoidAllowed: true);
+        DartType type = inferElement(
+            node.expressions[i],
+            node,
+            inferredTypeArgument,
+            inferredSpreadTypes,
+            inferenceNeeded,
+            typeChecksNeeded);
+        actualTypes.add(type);
         if (inferenceNeeded) {
           formalTypes.add(listType.typeArguments[0]);
         }
-        actualTypes.add(getInferredType(judgment, inferrer));
       }
     }
     if (inferenceNeeded) {
@@ -691,18 +911,19 @@
     }
     if (typeChecksNeeded) {
       for (int i = 0; i < node.expressions.length; i++) {
-        inferrer.ensureAssignable(node.typeArgument, actualTypes[i],
-            node.expressions[i], node.expressions[i].fileOffset,
-            isVoidAllowed: node.typeArgument is VoidType);
+        checkElement(
+            node.expressions[i], node, node.typeArgument, inferredSpreadTypes);
       }
     }
     node.inferredType = new InterfaceType(listClass, [inferredTypeArgument]);
-    KernelLibraryBuilder inferrerLibrary = inferrer.library;
-    if (inferenceNeeded && inferrerLibrary is KernelLibraryBuilder) {
-      inferrerLibrary.checkBoundsInListLiteral(
-          node, inferrer.typeSchemaEnvironment,
-          inferred: true);
+    if (!inferrer.isTopLevel) {
+      KernelLibraryBuilder library = inferrer.library;
+      if (inferenceNeeded) {
+        library.checkBoundsInListLiteral(node, inferrer.typeSchemaEnvironment,
+            inferred: true);
+      }
     }
+
     return null;
   }
 
@@ -720,6 +941,330 @@
     return null;
   }
 
+  // Calculates the key and the value type of a spread map entry of type
+  // spreadMapEntryType and stores them in output in positions offset and offset
+  // + 1.  If the types can't be calculated, for example, if spreadMapEntryType
+  // is a function type, the original values in output are preserved.
+  void storeSpreadMapEntryElementTypes(DartType spreadMapEntryType,
+      bool isNullAware, List<DartType> output, int offset) {
+    if (spreadMapEntryType is InterfaceType) {
+      InterfaceType supertype = inferrer.typeSchemaEnvironment
+          .getTypeAsInstanceOf(spreadMapEntryType, inferrer.coreTypes.mapClass);
+      if (supertype != null) {
+        output[offset] = supertype.typeArguments[0];
+        output[offset + 1] = supertype.typeArguments[1];
+      } else if (spreadMapEntryType.classNode == inferrer.coreTypes.nullClass &&
+          isNullAware) {
+        output[offset] = output[offset + 1] = spreadMapEntryType;
+      }
+    }
+    if (spreadMapEntryType is DynamicType) {
+      output[offset] = output[offset + 1] = const DynamicType();
+    }
+  }
+
+  // Note that inferMapEntry adds exactly two elements to actualTypes -- the
+  // actual types of the key and the value.  The same technique is used for
+  // actualTypesForSet, only inferMapEntry adds exactly one element to that
+  // list: the actual type of the iterable spread elements in case the map
+  // literal will be disambiguated as a set literal later.
+  void inferMapEntry(
+      MapEntry entry,
+      TreeNode parent,
+      DartType inferredKeyType,
+      DartType inferredValueType,
+      DartType spreadContext,
+      List<DartType> actualTypes,
+      List<DartType> actualTypesForSet,
+      Map<TreeNode, DartType> inferredSpreadTypes,
+      bool inferenceNeeded,
+      bool typeChecksNeeded) {
+    if (entry is SpreadMapEntry) {
+      DartType spreadType = inferrer.inferExpression(
+          entry.expression, spreadContext, inferenceNeeded || typeChecksNeeded,
+          isVoidAllowed: true);
+      inferredSpreadTypes[entry.expression] = spreadType;
+      int length = actualTypes.length;
+      actualTypes.add(null);
+      actualTypes.add(null);
+      storeSpreadMapEntryElementTypes(
+          spreadType, entry.isNullAware, actualTypes, length);
+      DartType actualKeyType = actualTypes[length];
+      DartType actualValueType = actualTypes[length + 1];
+      DartType actualElementType =
+          getSpreadElementType(spreadType, entry.isNullAware);
+
+      if (typeChecksNeeded) {
+        if (actualKeyType == null) {
+          if (spreadType is InterfaceType &&
+              spreadType.classNode == inferrer.coreTypes.nullClass &&
+              !entry.isNullAware) {
+            parent.replaceChild(
+                entry,
+                new MapEntry(
+                    inferrer.helper.desugarSyntheticExpression(inferrer.helper
+                        .buildProblem(messageNonNullAwareSpreadIsNull,
+                            entry.expression.fileOffset, 1)),
+                    new NullLiteral())
+                  ..fileOffset = entry.fileOffset);
+          } else if (actualElementType != null) {
+            // Don't report the error here, it might be an ambiguous Set.  The
+            // error is reported in checkMapEntry if it's disambiguated as map.
+            iterableSpreadType = spreadType;
+          } else {
+            parent.replaceChild(
+                entry,
+                new MapEntry(
+                    inferrer.helper.desugarSyntheticExpression(inferrer.helper
+                        .buildProblem(
+                            templateSpreadMapEntryTypeMismatch
+                                .withArguments(spreadType),
+                            entry.expression.fileOffset,
+                            1)),
+                    new NullLiteral())
+                  ..fileOffset = entry.fileOffset);
+          }
+        } else if (spreadType is InterfaceType) {
+          Expression keyError;
+          Expression valueError;
+          if (!inferrer.isAssignable(inferredKeyType, actualKeyType)) {
+            keyError = inferrer.helper.desugarSyntheticExpression(
+                inferrer.helper.buildProblem(
+                    templateSpreadMapEntryElementKeyTypeMismatch.withArguments(
+                        actualKeyType, inferredKeyType),
+                    entry.expression.fileOffset,
+                    1));
+          }
+          if (!inferrer.isAssignable(inferredValueType, actualValueType)) {
+            valueError = inferrer.helper.desugarSyntheticExpression(
+                inferrer.helper.buildProblem(
+                    templateSpreadMapEntryElementValueTypeMismatch
+                        .withArguments(actualValueType, inferredValueType),
+                    entry.expression.fileOffset,
+                    1));
+          }
+          if (keyError != null || valueError != null) {
+            keyError ??= new NullLiteral();
+            valueError ??= new NullLiteral();
+            parent.replaceChild(
+                entry,
+                new MapEntry(keyError, valueError)
+                  ..fileOffset = entry.fileOffset);
+          }
+        }
+      }
+
+      // Use 'dynamic' for error recovery.
+      if (actualKeyType == null) {
+        actualKeyType = actualTypes[length] = const DynamicType();
+        actualValueType = actualTypes[length + 1] = const DynamicType();
+      }
+      // Store the type in case of an ambiguous Set.  Use 'dynamic' for error
+      // recovery.
+      actualTypesForSet.add(actualElementType ?? const DynamicType());
+
+      mapEntryClass ??=
+          inferrer.coreTypes.index.getClass('dart:core', 'MapEntry');
+      // TODO(dmitryas):  Handle the case of an ambiguous Set.
+      entry.entryType = new InterfaceType(
+          mapEntryClass, <DartType>[actualKeyType, actualValueType]);
+
+      bool isMap = inferrer.typeSchemaEnvironment
+          .isSubtypeOf(spreadType, inferrer.coreTypes.mapClass.rawType);
+      bool isIterable = inferrer.typeSchemaEnvironment
+          .isSubtypeOf(spreadType, inferrer.coreTypes.iterableClass.rawType);
+      if (isMap && !isIterable) {
+        mapSpreadOffset = entry.fileOffset;
+      }
+      if (!isMap && isIterable) {
+        iterableSpreadOffset = entry.expression.fileOffset;
+      }
+
+      return;
+    } else if (entry is IfMapEntry) {
+      DartType boolType = inferrer.coreTypes.boolClass.rawType;
+      DartType conditionType = inferrer.inferExpression(
+          entry.condition, boolType, typeChecksNeeded,
+          isVoidAllowed: false);
+      inferrer.ensureAssignable(
+          boolType, conditionType, entry.condition, entry.condition.fileOffset);
+      // Note that this recursive invocation of inferMapEntry will add two types
+      // to actualTypes; they are the actual types of the current invocation if
+      // the 'else' branch is empty.
+      inferMapEntry(
+          entry.then,
+          entry,
+          inferredKeyType,
+          inferredValueType,
+          spreadContext,
+          actualTypes,
+          actualTypesForSet,
+          inferredSpreadTypes,
+          inferenceNeeded,
+          typeChecksNeeded);
+      if (entry.otherwise != null) {
+        // We need to modify the actual types added in the recursive call to
+        // inferMapEntry.
+        DartType actualValueType = actualTypes.removeLast();
+        DartType actualKeyType = actualTypes.removeLast();
+        DartType actualTypeForSet = actualTypesForSet.removeLast();
+        inferMapEntry(
+            entry.otherwise,
+            entry,
+            inferredKeyType,
+            inferredValueType,
+            spreadContext,
+            actualTypes,
+            actualTypesForSet,
+            inferredSpreadTypes,
+            inferenceNeeded,
+            typeChecksNeeded);
+        int length = actualTypes.length;
+        actualTypes[length - 2] = inferrer.typeSchemaEnvironment
+            .getStandardUpperBound(actualKeyType, actualTypes[length - 2]);
+        actualTypes[length - 1] = inferrer.typeSchemaEnvironment
+            .getStandardUpperBound(actualValueType, actualTypes[length - 1]);
+        int lengthForSet = actualTypesForSet.length;
+        actualTypesForSet[lengthForSet - 1] = inferrer.typeSchemaEnvironment
+            .getStandardUpperBound(
+                actualTypeForSet, actualTypesForSet[lengthForSet - 1]);
+      }
+      return;
+    } else if (entry is ForMapEntry) {
+      for (VariableDeclaration declaration in entry.variables) {
+        if (declaration.name == null) {
+          if (declaration.initializer != null) {
+            declaration.type = inferrer.inferExpression(declaration.initializer,
+                declaration.type, inferenceNeeded || typeChecksNeeded,
+                isVoidAllowed: true);
+          }
+        } else {
+          inferrer.inferStatement(declaration);
+        }
+      }
+      if (entry.condition != null) {
+        inferrer.inferExpression(
+            entry.condition,
+            inferrer.coreTypes.boolClass.rawType,
+            inferenceNeeded || typeChecksNeeded,
+            isVoidAllowed: false);
+      }
+      for (Expression expression in entry.updates) {
+        inferrer.inferExpression(expression, const UnknownType(),
+            inferenceNeeded || typeChecksNeeded,
+            isVoidAllowed: true);
+      }
+      // Actual types are added by the recursive call.
+      return inferMapEntry(
+          entry.body,
+          entry,
+          inferredKeyType,
+          inferredValueType,
+          spreadContext,
+          actualTypes,
+          actualTypesForSet,
+          inferredSpreadTypes,
+          inferenceNeeded,
+          typeChecksNeeded);
+    } else if (entry is ForInMapEntry) {
+      if (entry.variable.name == null) {
+        handleForInWithoutVariable(
+            entry.variable, entry.iterable, entry.prologue,
+            isAsync: entry.isAsync);
+      } else {
+        handleForInDeclaringVariable(
+            entry.variable, entry.iterable, entry.prologue,
+            isAsync: entry.isAsync);
+      }
+      if (entry.problem != null) {
+        inferrer.inferExpression(entry.problem, const UnknownType(),
+            inferenceNeeded || typeChecksNeeded,
+            isVoidAllowed: true);
+      }
+      // Actual types are added by the recursive call.
+      inferMapEntry(
+          entry.body,
+          entry,
+          inferredKeyType,
+          inferredValueType,
+          spreadContext,
+          actualTypes,
+          actualTypesForSet,
+          inferredSpreadTypes,
+          inferenceNeeded,
+          typeChecksNeeded);
+    } else {
+      DartType keyType = inferrer.inferExpression(
+          entry.key, inferredKeyType, true,
+          isVoidAllowed: true);
+      DartType valueType = inferrer.inferExpression(
+          entry.value, inferredValueType, true,
+          isVoidAllowed: true);
+      inferrer.ensureAssignable(
+          inferredKeyType, keyType, entry.key, entry.key.fileOffset,
+          isVoidAllowed: inferredKeyType is VoidType);
+      inferrer.ensureAssignable(
+          inferredValueType, valueType, entry.value, entry.value.fileOffset,
+          isVoidAllowed: inferredValueType is VoidType);
+      actualTypes.add(keyType);
+      actualTypes.add(valueType);
+      // Use 'dynamic' for error recovery.
+      actualTypesForSet.add(const DynamicType());
+      mapEntryOffset = entry.fileOffset;
+      return;
+    }
+  }
+
+  void checkMapEntry(
+      MapEntry entry,
+      TreeNode parent,
+      Expression cachedKey,
+      Expression cachedValue,
+      DartType keyType,
+      DartType valueType,
+      Map<TreeNode, DartType> inferredSpreadTypes) {
+    // It's disambiguated as a map literal.
+    if (iterableSpreadOffset != null) {
+      parent.replaceChild(
+          entry,
+          new MapEntry(
+              inferrer.helper.desugarSyntheticExpression(inferrer.helper
+                  .buildProblem(
+                      templateSpreadMapEntryTypeMismatch
+                          .withArguments(iterableSpreadType),
+                      iterableSpreadOffset,
+                      1)),
+              new NullLiteral()));
+    }
+    if (entry is SpreadMapEntry) {
+      DartType spreadType = inferredSpreadTypes[entry.expression];
+      if (spreadType is DynamicType) {
+        inferrer.ensureAssignable(inferrer.coreTypes.mapClass.rawType,
+            spreadType, entry.expression, entry.expression.fileOffset);
+      }
+    } else if (entry is IfMapEntry) {
+      checkMapEntry(entry.then, entry, cachedKey, cachedValue, keyType,
+          valueType, inferredSpreadTypes);
+      if (entry.otherwise != null) {
+        checkMapEntry(entry.otherwise, entry, cachedKey, cachedValue, keyType,
+            valueType, inferredSpreadTypes);
+      }
+    } else if (entry is ForMapEntry) {
+      if (entry.condition != null) {
+        DartType conditionType = getInferredType(entry.condition, inferrer);
+        inferrer.ensureAssignable(inferrer.coreTypes.boolClass.rawType,
+            conditionType, entry.condition, entry.condition.fileOffset);
+      }
+      checkMapEntry(entry.body, entry, cachedKey, cachedValue, keyType,
+          valueType, inferredSpreadTypes);
+    } else if (entry is ForInMapEntry) {
+      checkMapEntry(entry.body, entry, cachedKey, cachedValue, keyType,
+          valueType, inferredSpreadTypes);
+    } else {
+      // Do nothing.  Assignability checks are done during type inference.
+    }
+  }
+
   void visitMapLiteralJudgment(MapLiteralJudgment node, DartType typeContext) {
     var mapClass = inferrer.coreTypes.mapClass;
     var mapType = mapClass.thisType;
@@ -728,37 +1273,48 @@
     DartType inferredValueType;
     List<DartType> formalTypes;
     List<DartType> actualTypes;
+    List<DartType> actualTypesForSet;
     assert((node.keyType is ImplicitTypeArgument) ==
         (node.valueType is ImplicitTypeArgument));
     bool inferenceNeeded = node.keyType is ImplicitTypeArgument;
     KernelLibraryBuilder library = inferrer.library;
-    if (library != null &&
-        library.loader.target.enableSetLiterals &&
-        inferenceNeeded &&
-        node.entries.isEmpty) {
-      // Ambiguous set/map literal
-      DartType context =
-          inferrer.typeSchemaEnvironment.unfutureType(typeContext);
-      if (context is InterfaceType) {
-        if (inferrer.classHierarchy.isSubtypeOf(
-                context.classNode, inferrer.coreTypes.iterableClass) &&
-            !inferrer.classHierarchy
-                .isSubtypeOf(context.classNode, inferrer.coreTypes.mapClass)) {
-          // Set literal
-          SetLiteralJudgment setLiteral = new SetLiteralJudgment([],
-              typeArgument: const ImplicitTypeArgument(), isConst: node.isConst)
-            ..fileOffset = node.fileOffset;
-          node.parent.replaceChild(node, setLiteral);
-          visitSetLiteralJudgment(setLiteral, typeContext);
-          node.inferredType = setLiteral.inferredType;
-          return;
+    bool typeContextIsMap = node.keyType is! ImplicitTypeArgument;
+    bool typeContextIsIterable = false;
+    if (!inferrer.isTopLevel) {
+      if (library.loader.target.enableSetLiterals && inferenceNeeded) {
+        // Ambiguous set/map literal
+        DartType context =
+            inferrer.typeSchemaEnvironment.unfutureType(typeContext);
+        if (context is InterfaceType) {
+          typeContextIsMap = typeContextIsMap ||
+              inferrer.classHierarchy
+                  .isSubtypeOf(context.classNode, inferrer.coreTypes.mapClass);
+          typeContextIsIterable = typeContextIsIterable ||
+              inferrer.classHierarchy.isSubtypeOf(
+                  context.classNode, inferrer.coreTypes.iterableClass);
+          if (node.entries.isEmpty &&
+              typeContextIsIterable &&
+              !typeContextIsMap) {
+            // Set literal
+            SetLiteralJudgment setLiteral = new SetLiteralJudgment([],
+                typeArgument: const ImplicitTypeArgument(),
+                isConst: node.isConst)
+              ..fileOffset = node.fileOffset;
+            node.parent.replaceChild(node, setLiteral);
+            visitSetLiteralJudgment(setLiteral, typeContext);
+            node.inferredType = setLiteral.inferredType;
+            return;
+          }
         }
       }
     }
     bool typeChecksNeeded = !inferrer.isTopLevel;
+    Map<TreeNode, DartType> inferredSpreadTypes;
     if (inferenceNeeded || typeChecksNeeded) {
       formalTypes = [];
       actualTypes = [];
+      actualTypesForSet = [];
+      inferredSpreadTypes = new Map<TreeNode, DartType>.identity();
     }
     if (inferenceNeeded) {
       inferredTypes = [const UnknownType(), const UnknownType()];
@@ -774,25 +1330,120 @@
     List<Expression> cachedKeys = new List(node.entries.length);
     List<Expression> cachedValues = new List(node.entries.length);
     for (int i = 0; i < node.entries.length; i++) {
-      cachedKeys[i] = node.entries[i].key;
-      cachedValues[i] = node.entries[i].value;
-    }
-    if (inferenceNeeded || typeChecksNeeded) {
-      for (MapEntry entry in node.entries) {
-        Expression key = entry.key;
-        inferrer.inferExpression(key, inferredKeyType, true,
-            isVoidAllowed: true);
-        actualTypes.add(getInferredType(key, inferrer));
-        Expression value = entry.value;
-        inferrer.inferExpression(value, inferredValueType, true,
-            isVoidAllowed: true);
-        actualTypes.add(getInferredType(value, inferrer));
-        if (inferenceNeeded) {
-          formalTypes.addAll(mapType.typeArguments);
-        }
+      MapEntry entry = node.entries[i];
+      if (entry is! ControlFlowMapEntry) {
+        cachedKeys[i] = node.entries[i].key;
+        cachedValues[i] = node.entries[i].value;
       }
     }
+    bool hasMapEntry = false;
+    bool hasMapSpread = false;
+    bool hasIterableSpread = false;
+    if (inferenceNeeded || typeChecksNeeded) {
+      mapEntryOffset = null;
+      mapSpreadOffset = null;
+      iterableSpreadOffset = null;
+      iterableSpreadType = null;
+      DartType spreadTypeContext = const UnknownType();
+      if (typeContextIsIterable && !typeContextIsMap) {
+        spreadTypeContext = inferrer.typeSchemaEnvironment
+            .getTypeAsInstanceOf(typeContext, inferrer.coreTypes.iterableClass);
+      } else if (!typeContextIsIterable && typeContextIsMap) {
+        spreadTypeContext = new InterfaceType(inferrer.coreTypes.mapClass,
+            <DartType>[inferredKeyType, inferredValueType]);
+      }
+      for (int i = 0; i < node.entries.length; ++i) {
+        MapEntry entry = node.entries[i];
+        inferMapEntry(
+            entry,
+            node,
+            inferredKeyType,
+            inferredValueType,
+            spreadTypeContext,
+            actualTypes,
+            actualTypesForSet,
+            inferredSpreadTypes,
+            inferenceNeeded,
+            typeChecksNeeded);
+        if (inferenceNeeded) {
+          formalTypes.add(mapType.typeArguments[0]);
+          formalTypes.add(mapType.typeArguments[1]);
+        }
+      }
+      hasMapEntry = mapEntryOffset != null;
+      hasMapSpread = mapSpreadOffset != null;
+      hasIterableSpread = iterableSpreadOffset != null;
+    }
     if (inferenceNeeded) {
+      bool canBeSet = !hasMapSpread && !hasMapEntry && !typeContextIsMap;
+      bool canBeMap = !hasIterableSpread && !typeContextIsIterable;
+      if (canBeSet && !canBeMap) {
+        List<Expression> setElements = <Expression>[];
+        List<DartType> formalTypesForSet = <DartType>[];
+        InterfaceType setType = inferrer.coreTypes.setClass.thisType;
+        for (int i = 0; i < node.entries.length; ++i) {
+          setElements.add(convertToElement(node.entries[i], inferrer.helper));
+          formalTypesForSet.add(setType.typeArguments[0]);
+        }
+
+        List<DartType> inferredTypesForSet = <DartType>[const UnknownType()];
+        inferrer.typeSchemaEnvironment.inferGenericFunctionOrType(
+            setType,
+            inferrer.coreTypes.setClass.typeParameters,
+            null,
+            null,
+            typeContext,
+            inferredTypesForSet,
+            isConst: node.isConst);
+        inferrer.typeSchemaEnvironment.inferGenericFunctionOrType(
+            inferrer.coreTypes.setClass.thisType,
+            inferrer.coreTypes.setClass.typeParameters,
+            formalTypesForSet,
+            actualTypesForSet,
+            typeContext,
+            inferredTypesForSet);
+        DartType inferredTypeArgument = inferredTypesForSet[0];
+        inferrer.instrumentation?.record(
+            inferrer.uri,
+            node.fileOffset,
+            'typeArgs',
+            new InstrumentationValueForTypeArgs([inferredTypeArgument]));
+
+        SetLiteralJudgment setLiteral = new SetLiteralJudgment(setElements,
+            typeArgument: inferredTypeArgument, isConst: node.isConst)
+          ..fileOffset = node.fileOffset;
+        node.parent.replaceChild(node, setLiteral);
+        if (typeChecksNeeded) {
+          for (int i = 0; i < setLiteral.expressions.length; i++) {
+            checkElement(setLiteral.expressions[i], setLiteral,
+                setLiteral.typeArgument, inferredSpreadTypes);
+          }
+        }
+
+        node.inferredType = setLiteral.inferredType =
+            new InterfaceType(inferrer.coreTypes.setClass, inferredTypesForSet);
+        return;
+      }
+      if (canBeSet && canBeMap && node.entries.isNotEmpty) {
+        node.parent.replaceChild(
+            node,
+            inferrer.helper.desugarSyntheticExpression(inferrer.helper
+                .buildProblem(messageCantDisambiguateNotEnoughInformation,
+                    node.fileOffset, 1)));
+        node.inferredType = const BottomType();
+        return;
+      }
+      if (!canBeSet && !canBeMap) {
+        if (!inferrer.isTopLevel) {
+          node.parent.replaceChild(
+              node,
+              inferrer.helper.desugarSyntheticExpression(inferrer.helper
+                  .buildProblem(messageCantDisambiguateAmbiguousInformation,
+                      node.fileOffset, 1)));
+        }
+        node.inferredType = const BottomType();
+        return;
+      }
       inferrer.typeSchemaEnvironment.inferGenericFunctionOrType(
           mapType,
           mapClass.typeParameters,
@@ -813,26 +1464,20 @@
     }
     if (typeChecksNeeded) {
       for (int i = 0; i < node.entries.length; ++i) {
-        Expression keyJudgment = cachedKeys[i];
-        inferrer.ensureAssignable(node.keyType, actualTypes[2 * i], keyJudgment,
-            keyJudgment.fileOffset,
-            isVoidAllowed: node.keyType is VoidType);
-
-        Expression valueJudgment = cachedValues[i];
-        inferrer.ensureAssignable(node.valueType, actualTypes[2 * i + 1],
-            valueJudgment, valueJudgment.fileOffset,
-            isVoidAllowed: node.valueType is VoidType);
+        checkMapEntry(node.entries[i], node, cachedKeys[i], cachedValues[i],
+            node.keyType, node.valueType, inferredSpreadTypes);
       }
     }
     node.inferredType =
         new InterfaceType(mapClass, [inferredKeyType, inferredValueType]);
-    KernelLibraryBuilder inferrerLibrary = inferrer.library;
-    // Either both [_declaredKeyType] and [_declaredValueType] are omitted or
-    // none of them, so we may just check one.
-    if (inferenceNeeded && inferrerLibrary is KernelLibraryBuilder) {
-      inferrerLibrary.checkBoundsInMapLiteral(
-          node, inferrer.typeSchemaEnvironment,
-          inferred: true);
+    if (!inferrer.isTopLevel) {
+      KernelLibraryBuilder library = inferrer.library;
+      // Either both [_declaredKeyType] and [_declaredValueType] are omitted or
+      // none of them, so we may just check one.
+      if (inferenceNeeded) {
+        library.checkBoundsInMapLiteral(node, inferrer.typeSchemaEnvironment,
+            inferred: true);
+      }
     }
   }
 
@@ -1059,9 +1704,11 @@
     List<DartType> actualTypes;
     bool inferenceNeeded = node.typeArgument is ImplicitTypeArgument;
     bool typeChecksNeeded = !inferrer.isTopLevel;
+    Map<TreeNode, DartType> inferredSpreadTypes;
     if (inferenceNeeded || typeChecksNeeded) {
       formalTypes = [];
       actualTypes = [];
+      inferredSpreadTypes = new Map<TreeNode, DartType>.identity();
     }
     if (inferenceNeeded) {
       inferredTypes = [const UnknownType()];
@@ -1074,14 +1721,17 @@
     }
     if (inferenceNeeded || typeChecksNeeded) {
       for (int i = 0; i < node.expressions.length; ++i) {
-        Expression judgment = node.expressions[i];
-        inferrer.inferExpression(
-            judgment, inferredTypeArgument, inferenceNeeded || typeChecksNeeded,
-            isVoidAllowed: true);
+        DartType type = inferElement(
+            node.expressions[i],
+            node,
+            inferredTypeArgument,
+            inferredSpreadTypes,
+            inferenceNeeded,
+            typeChecksNeeded);
+        actualTypes.add(type);
         if (inferenceNeeded) {
           formalTypes.add(setType.typeArguments[0]);
         }
-        actualTypes.add(getInferredType(judgment, inferrer));
       }
     }
     if (inferenceNeeded) {
@@ -1102,23 +1752,21 @@
     }
     if (typeChecksNeeded) {
       for (int i = 0; i < node.expressions.length; i++) {
-        inferrer.ensureAssignable(node.typeArgument, actualTypes[i],
-            node.expressions[i], node.expressions[i].fileOffset,
-            isVoidAllowed: node.typeArgument is VoidType);
+        checkElement(
+            node.expressions[i], node, node.typeArgument, inferredSpreadTypes);
       }
     }
     node.inferredType = new InterfaceType(setClass, [inferredTypeArgument]);
-    KernelLibraryBuilder inferrerLibrary = inferrer.library;
-    if (inferenceNeeded && inferrerLibrary is KernelLibraryBuilder) {
-      inferrerLibrary.checkBoundsInSetLiteral(
-          node, inferrer.typeSchemaEnvironment,
-          inferred: true);
-    }
+    if (!inferrer.isTopLevel) {
+      KernelLibraryBuilder library = inferrer.library;
+      if (inferenceNeeded) {
+        library.checkBoundsInSetLiteral(node, inferrer.typeSchemaEnvironment,
+            inferred: true);
+      }
 
-    KernelLibraryBuilder library = inferrer.library;
-    if (library != null &&
-        !library.loader.target.backendTarget.supportsSetLiterals) {
-      inferrer.helper.transformSetLiterals = true;
+      if (!library.loader.target.backendTarget.supportsSetLiterals) {
+        inferrer.helper.transformSetLiterals = true;
+      }
     }
   }
 
@@ -1136,10 +1784,7 @@
     if (write is StaticSet) {
       writeContext = write.target.setterType;
       writeMember = write.target;
-      if (writeMember is ShadowField && writeMember.inferenceNode != null) {
-        writeMember.inferenceNode.resolve();
-        writeMember.inferenceNode = null;
-      }
+      TypeInferenceEngine.resolveInferenceNode(writeMember);
     }
     node._inferRhs(inferrer, readType, writeContext);
     node._replaceWithDesugared();
@@ -1149,10 +1794,7 @@
   @override
   void visitStaticGet(StaticGet node, DartType typeContext) {
     var target = node.target;
-    if (target is ShadowField && target.inferenceNode != null) {
-      target.inferenceNode.resolve();
-      target.inferenceNode = null;
-    }
+    TypeInferenceEngine.resolveInferenceNode(target);
     var type = target.getterType;
     if (target is Procedure && target.kind == ProcedureKind.Method) {
       type = inferrer.instantiateTearOff(type, typeContext, node);
@@ -1379,11 +2021,13 @@
         node.initializer = replacedInitializer;
       }
     }
-    KernelLibraryBuilder inferrerLibrary = inferrer.library;
-    if (node._implicitlyTyped && inferrerLibrary is KernelLibraryBuilder) {
-      inferrerLibrary.checkBoundsInVariableDeclaration(
-          node, inferrer.typeSchemaEnvironment,
-          inferred: true);
+    if (!inferrer.isTopLevel) {
+      KernelLibraryBuilder library = inferrer.library;
+      if (node._implicitlyTyped) {
+        library.checkBoundsInVariableDeclaration(
+            node, inferrer.typeSchemaEnvironment,
+            inferred: true);
+      }
     }
   }
 
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_ast_api.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_ast_api.dart
index cded049..bca9db5 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_ast_api.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_ast_api.dart
@@ -18,6 +18,7 @@
         Catch,
         CheckLibraryIsLoaded,
         Class,
+        Component,
         Constructor,
         ConstructorInvocation,
         ContinueSwitchStatement,
@@ -53,6 +54,7 @@
         NamedExpression,
         NamedType,
         Node,
+        NullLiteral,
         Procedure,
         ProcedureKind,
         PropertyGet,
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_builder.dart
index eb8a506..afd74e5 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_builder.dart
@@ -18,7 +18,7 @@
 
 export 'class_hierarchy_builder.dart' show ClassHierarchyBuilder;
 
-export 'implicit_type.dart' show ImplicitType;
+export 'implicit_field_type.dart' show ImplicitFieldType;
 
 export 'kernel_class_builder.dart' show KernelClassBuilder;
 
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart
index e43378a..151c074 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_class_builder.dart
@@ -6,31 +6,32 @@
 
 import 'package:kernel/ast.dart'
     show
+        Arguments,
+        AsExpression,
         Class,
         Constructor,
-        ThisExpression,
         DartType,
         DynamicType,
         Expression,
         Field,
         FunctionNode,
         InterfaceType,
-        AsExpression,
+        InvalidType,
         ListLiteral,
         Member,
+        MethodInvocation,
         Name,
         Procedure,
+        ProcedureKind,
         RedirectingFactoryConstructor,
         ReturnStatement,
-        VoidType,
-        MethodInvocation,
-        ProcedureKind,
         StaticGet,
         Supertype,
+        ThisExpression,
         TypeParameter,
         TypeParameterType,
-        Arguments,
-        VariableDeclaration;
+        VariableDeclaration,
+        VoidType;
 
 import 'package:kernel/ast.dart' show FunctionType, TypeParameterType;
 
@@ -1021,22 +1022,31 @@
     } else if (isCovariant && typeEnvironment.isSubtypeOf(supertype, subtype)) {
       // No problem--the overriding parameter is marked "covariant" and has
       // a type which is a subtype of the parameter it overrides.
+    } else if (subtype is InvalidType || supertype is InvalidType) {
+      // Don't report a problem as something else is wrong that has already
+      // been reported.
     } else {
       // Report an error.
       String declaredMemberName =
           '${declaredMember.enclosingClass.name}.${declaredMember.name.name}';
+      String interfaceMemberName =
+          '${interfaceMember.enclosingClass.name}.${interfaceMember.name.name}';
       Message message;
       int fileOffset;
       if (declaredParameter == null) {
         message = templateOverrideTypeMismatchReturnType.withArguments(
-            declaredMemberName, declaredType, interfaceType);
+            declaredMemberName,
+            declaredType,
+            interfaceType,
+            interfaceMemberName);
         fileOffset = declaredMember.fileOffset;
       } else {
         message = templateOverrideTypeMismatchParameter.withArguments(
             declaredParameter.name,
             declaredMemberName,
             declaredType,
-            interfaceType);
+            interfaceType,
+            interfaceMemberName);
         fileOffset = declaredParameter.fileOffset;
       }
       library.addProblem(message, fileOffset, noLength, declaredMember.fileUri,
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_constants.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_constants.dart
index 6cb0a71..5f8b4f5 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_constants.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_constants.dart
@@ -4,177 +4,28 @@
 
 library fasta.kernel_constants;
 
-import 'package:kernel/ast.dart'
-    show Constant, DartType, IntConstant, Library, Member, Procedure, TreeNode;
+import 'package:kernel/ast.dart' show InvalidExpression, Library;
 
-import 'package:kernel/type_environment.dart' show TypeEnvironment;
-
-import 'package:kernel/transformations/constants.dart' show ErrorReporter;
-
-import '../fasta_codes.dart'
-    show
-        Message,
-        noLength,
-        messageConstEvalCircularity,
-        messageConstEvalFailedAssertion,
-        templateConstEvalDeferredLibrary,
-        templateConstEvalDuplicateKey,
-        templateConstEvalFailedAssertionWithMessage,
-        templateConstEvalFreeTypeParameter,
-        templateConstEvalInvalidBinaryOperandType,
-        templateConstEvalInvalidMethodInvocation,
-        templateConstEvalInvalidStaticInvocation,
-        templateConstEvalInvalidStringInterpolationOperand,
-        templateConstEvalInvalidSymbolName,
-        templateConstEvalInvalidType,
-        templateConstEvalNegativeShift,
-        templateConstEvalNonConstantLiteral,
-        templateConstEvalNonConstantVariableGet,
-        templateConstEvalZeroDivisor;
+import '../fasta_codes.dart' show LocatedMessage;
 
 import '../loader.dart' show Loader;
 
+import 'constant_evaluator.dart' show ErrorReporter;
+
 class KernelConstantErrorReporter extends ErrorReporter {
   final Loader<Library> loader;
-  final TypeEnvironment typeEnvironment;
 
-  KernelConstantErrorReporter(this.loader, this.typeEnvironment);
+  KernelConstantErrorReporter(this.loader);
 
-  String addProblem(TreeNode node, Message message) {
-    int offset = getFileOffset(node);
-    Uri uri = getFileUri(node);
-    loader.addProblem(message, offset, noLength, uri);
-    return loader.target.context.format(
-        message.withLocation(uri, offset, noLength), message.code.severity);
+  @override
+  void report(LocatedMessage message, List<LocatedMessage> context) {
+    loader.addProblem(
+        message.messageObject, message.charOffset, message.length, message.uri,
+        context: context);
   }
 
   @override
-  String freeTypeParameter(
-      List<TreeNode> context, TreeNode node, DartType type) {
-    return addProblem(
-        node, templateConstEvalFreeTypeParameter.withArguments(type));
-  }
-
-  @override
-  String duplicateKey(List<TreeNode> context, TreeNode node, Constant key) {
-    return addProblem(node, templateConstEvalDuplicateKey.withArguments(key));
-  }
-
-  @override
-  String invalidDartType(List<TreeNode> context, TreeNode node,
-      Constant receiver, DartType expectedType) {
-    return addProblem(
-        node,
-        templateConstEvalInvalidType.withArguments(
-            receiver, expectedType, receiver.getType(typeEnvironment)));
-  }
-
-  @override
-  String invalidBinaryOperandType(
-      List<TreeNode> context,
-      TreeNode node,
-      Constant receiver,
-      String op,
-      DartType expectedType,
-      DartType actualType) {
-    return addProblem(
-        node,
-        templateConstEvalInvalidBinaryOperandType.withArguments(
-            op, receiver, expectedType, actualType));
-  }
-
-  @override
-  String invalidMethodInvocation(
-      List<TreeNode> context, TreeNode node, Constant receiver, String op) {
-    return addProblem(node,
-        templateConstEvalInvalidMethodInvocation.withArguments(op, receiver));
-  }
-
-  @override
-  String invalidStaticInvocation(
-      List<TreeNode> context, TreeNode node, Member target) {
-    // TODO(kmillikin) For an invalid factory invocation we should adopt a
-    // better message.  This will show something like:
-    //
-    // "The invocation of 'List' is not allowed within a const context."
-    //
-    // Which is not quite right when the code was "new List()".
-    String name = target.name.toString();
-    if (target is Procedure && target.isFactory) {
-      if (name.isEmpty) {
-        name = target.enclosingClass.name;
-      } else {
-        name = '${target.enclosingClass.name}.${name}';
-      }
-    }
-    return addProblem(
-        node, templateConstEvalInvalidStaticInvocation.withArguments(name));
-  }
-
-  @override
-  String invalidStringInterpolationOperand(
-      List<TreeNode> context, TreeNode node, Constant constant) {
-    return addProblem(
-        node,
-        templateConstEvalInvalidStringInterpolationOperand
-            .withArguments(constant));
-  }
-
-  @override
-  String invalidSymbolName(
-      List<TreeNode> context, TreeNode node, Constant constant) {
-    return addProblem(
-        node, templateConstEvalInvalidSymbolName.withArguments(constant));
-  }
-
-  @override
-  String zeroDivisor(
-      List<TreeNode> context, TreeNode node, IntConstant receiver, String op) {
-    return addProblem(node,
-        templateConstEvalZeroDivisor.withArguments(op, '${receiver.value}'));
-  }
-
-  @override
-  String negativeShift(List<TreeNode> context, TreeNode node,
-      IntConstant receiver, String op, IntConstant argument) {
-    return addProblem(
-        node,
-        templateConstEvalNegativeShift.withArguments(
-            op, '${receiver.value}', '${argument.value}'));
-  }
-
-  @override
-  String nonConstLiteral(List<TreeNode> context, TreeNode node, String klass) {
-    return addProblem(
-        node, templateConstEvalNonConstantLiteral.withArguments(klass));
-  }
-
-  @override
-  String failedAssertion(List<TreeNode> context, TreeNode node, String string) {
-    return addProblem(
-        node,
-        (string == null)
-            ? messageConstEvalFailedAssertion
-            : templateConstEvalFailedAssertionWithMessage
-                .withArguments(string));
-  }
-
-  @override
-  String nonConstantVariableGet(
-      List<TreeNode> context, TreeNode node, String variableName) {
-    return addProblem(node,
-        templateConstEvalNonConstantVariableGet.withArguments(variableName));
-  }
-
-  @override
-  String deferredLibrary(
-      List<TreeNode> context, TreeNode node, String importName) {
-    return addProblem(
-        node, templateConstEvalDeferredLibrary.withArguments(importName));
-  }
-
-  @override
-  String circularity(List<TreeNode> context, TreeNode node) {
-    return addProblem(node, messageConstEvalCircularity);
+  void reportInvalidExpression(InvalidExpression node) {
+    // Assumed to be already reported.
   }
 }
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_enum_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_enum_builder.dart
index d34ba34..484c95e 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_enum_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_enum_builder.dart
@@ -23,7 +23,6 @@
         StringLiteral,
         SuperInitializer,
         ThisExpression,
-        TreeNode,
         VariableGet;
 
 import 'kernel_shadow_ast.dart' show ShadowClass;
@@ -94,9 +93,10 @@
       this.stringType,
       LibraryBuilder parent,
       int startCharOffset,
-      int charOffset)
+      int charOffset,
+      int charEndOffset)
       : super(metadata, 0, name, null, null, null, scope, constructors, parent,
-            null, startCharOffset, charOffset, TreeNode.noOffset,
+            null, startCharOffset, charOffset, charEndOffset,
             cls: cls);
 
   factory KernelEnumBuilder(
@@ -105,6 +105,7 @@
       String name,
       List<EnumConstantInfo> enumConstantInfos,
       KernelLibraryBuilder parent,
+      int startCharOffset,
       int charOffset,
       int charEndOffset) {
     assert(enumConstantInfos == null || enumConstantInfos.isNotEmpty);
@@ -226,8 +227,8 @@
         members[name] = fieldBuilder..next = existing;
       }
     }
-    final int startCharOffset =
-        metadata == null ? charOffset : metadata.first.charOffset;
+    final int startCharOffsetComputed =
+        metadata == null ? startCharOffset : metadata.first.charOffset;
     KernelEnumBuilder enumBuilder = new KernelEnumBuilder.internal(
         metadata,
         name,
@@ -241,8 +242,9 @@
         objectType,
         stringType,
         parent,
-        startCharOffset,
-        charOffset);
+        startCharOffsetComputed,
+        charOffset,
+        charEndOffset);
     void setParent(String name, MemberBuilder builder) {
       do {
         builder.parent = enumBuilder;
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_expression_generator_impl.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_expression_generator_impl.dart
index 08e5bce..be2ec5c 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_expression_generator_impl.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_expression_generator_impl.dart
@@ -225,11 +225,10 @@
 
 class IncompleteErrorGenerator extends IncompleteSendGenerator
     with ErroneousExpressionGenerator {
-  final Member member;
   final Message message;
 
   IncompleteErrorGenerator(
-      ExpressionGeneratorHelper helper, Token token, this.member, this.message)
+      ExpressionGeneratorHelper helper, Token token, this.message)
       : super(helper, token, null);
 
   String get plainNameForRead => token.lexeme;
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_field_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_field_builder.dart
index adf0f98..904f47d 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_field_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_field_builder.dart
@@ -5,22 +5,23 @@
 library fasta.kernel_field_builder;
 
 import 'package:kernel/ast.dart'
-    show DartType, DynamicType, Expression, Field, Name, NullLiteral;
-
-import '../../base/instrumentation.dart'
-    show Instrumentation, InstrumentationValueForType;
+    show Class, DartType, DynamicType, Expression, Field, Name, NullLiteral;
 
 import '../fasta_codes.dart' show messageInternalProblemAlreadyInitialized;
 
 import '../problems.dart' show internalProblem, unsupported;
 
+import '../type_inference/type_inference_engine.dart'
+    show IncludesTypeParametersCovariantly;
+
 import 'kernel_body_builder.dart' show KernelBodyBuilder;
 
 import 'kernel_builder.dart'
     show
+        ClassBuilder,
         Declaration,
-        ImplicitType,
         FieldBuilder,
+        ImplicitFieldType,
         KernelLibraryBuilder,
         KernelTypeBuilder,
         MetadataBuilder;
@@ -58,6 +59,22 @@
     field.name ??= new Name(name, library.target);
     if (type != null) {
       field.type = type.build(library);
+
+      if (!isFinal && !isConst) {
+        IncludesTypeParametersCovariantly needsCheckVisitor;
+        if (parent is ClassBuilder) {
+          Class enclosingClass = parent.target;
+          if (enclosingClass.typeParameters.isNotEmpty) {
+            needsCheckVisitor = new IncludesTypeParametersCovariantly(
+                enclosingClass.typeParameters);
+          }
+        }
+        if (needsCheckVisitor != null) {
+          if (field.type.accept(needsCheckVisitor)) {
+            field.isGenericCovariantImpl = true;
+          }
+        }
+      }
     }
     bool isInstanceMember = !isStatic && !isTopLevel;
     field
@@ -83,12 +100,12 @@
         .createTopLevelTypeInferrer(
             field.enclosingClass?.thisType, field, null);
     if (hasInitializer) {
-      if (field.type is! ImplicitType) {
+      if (field.type is! ImplicitFieldType) {
         unsupported(
             "$name has unexpected type ${field.type}", charOffset, fileUri);
         return;
       }
-      ImplicitType type = field.type;
+      ImplicitFieldType type = field.type;
       field.type = const DynamicType();
       initializer = new KernelBodyBuilder.forField(this, typeInferrer)
           .parseFieldInitializer(type.initializerToken);
@@ -96,13 +113,5 @@
   }
 
   @override
-  void instrumentTopLevelInference(Instrumentation instrumentation) {
-    if (isEligibleForInference) {
-      instrumentation.record(field.fileUri, field.fileOffset, 'topType',
-          new InstrumentationValueForType(field.type));
-    }
-  }
-
-  @override
   DartType get builtType => field.type;
 }
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart
index 4277b49..eac2a4a 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_library_builder.dart
@@ -32,7 +32,6 @@
         StaticInvocation,
         StringLiteral,
         Supertype,
-        TreeNode,
         Typedef,
         TypeParameter,
         TypeParameterType,
@@ -97,6 +96,7 @@
 import '../modifier.dart'
     show
         abstractMask,
+        hasConstConstructorMask,
         hasInitializerMask,
         initializingFormalMask,
         mixinDeclarationMask,
@@ -124,7 +124,7 @@
         DynamicTypeBuilder,
         EnumConstantInfo,
         FormalParameterBuilder,
-        ImplicitType,
+        ImplicitFieldType,
         InvalidTypeBuilder,
         KernelClassBuilder,
         KernelConstructorBuilder,
@@ -294,12 +294,16 @@
       isMixinDeclaration = true;
       modifiers = (modifiers & ~mixinDeclarationMask) | abstractMask;
     }
+    if (declaration.hasConstConstructor) {
+      modifiers |= hasConstConstructorMask;
+    }
     ClassBuilder cls = new SourceClassBuilder(
         metadata,
         modifiers,
         className,
         typeVariables,
-        applyMixins(supertype, charOffset, className, isMixinDeclaration,
+        applyMixins(supertype, startCharOffset, charOffset, charEndOffset,
+            className, isMixinDeclaration,
             typeVariables: typeVariables),
         interfaces,
         classScope,
@@ -375,8 +379,13 @@
     return typeVariablesByName;
   }
 
-  KernelTypeBuilder applyMixins(KernelTypeBuilder type, int charOffset,
-      String subclassName, bool isMixinDeclaration,
+  KernelTypeBuilder applyMixins(
+      KernelTypeBuilder type,
+      int startCharOffset,
+      int charOffset,
+      int charEndOffset,
+      String subclassName,
+      bool isMixinDeclaration,
       {String documentationComment,
       List<MetadataBuilder> metadata,
       String name,
@@ -549,9 +558,9 @@
             }
           }
         }
-        final int startCharOffset =
+        final int computedStartCharOffset =
             (isNamedMixinApplication ? metadata : null) == null
-                ? charOffset
+                ? startCharOffset
                 : metadata.first.charOffset;
         SourceClassBuilder application = new SourceClassBuilder(
             isNamedMixinApplication ? metadata : null,
@@ -571,9 +580,9 @@
                 isModifiable: false),
             this,
             <ConstructorReferenceBuilder>[],
-            startCharOffset,
+            computedStartCharOffset,
             charOffset,
-            TreeNode.noOffset,
+            charEndOffset,
             mixedInType: isMixinDeclaration ? null : mixin);
         if (isNamedMixinApplication) {
           loader.target.metadataCollector?.setDocumentationComment(
@@ -601,11 +610,13 @@
       int modifiers,
       KernelTypeBuilder mixinApplication,
       List<KernelTypeBuilder> interfaces,
-      int charOffset) {
+      int startCharOffset,
+      int charOffset,
+      int charEndOffset) {
     // Nested declaration began in `OutlineBuilder.beginNamedMixinApplication`.
     endNestedDeclaration(name).resolveTypes(typeVariables, this);
-    KernelNamedTypeBuilder supertype = applyMixins(
-        mixinApplication, charOffset, name, false,
+    KernelNamedTypeBuilder supertype = applyMixins(mixinApplication,
+        startCharOffset, charOffset, charEndOffset, name, false,
         documentationComment: documentationComment,
         metadata: metadata,
         name: name,
@@ -634,7 +645,8 @@
     addBuilder(name, field, charOffset);
     if (initializerTokenForInference != null) {
       assert(type == null);
-      field.target.type = new ImplicitType(field, initializerTokenForInference);
+      field.target.type =
+          new ImplicitFieldType(field, initializerTokenForInference);
     }
     loader.target.metadataCollector
         ?.setDocumentationComment(field.target, documentationComment);
@@ -681,6 +693,7 @@
     if (nativeMethodName != null) {
       addNativeMethod(procedure);
     }
+    if (procedure.isConst) currentDeclaration?.hasConstConstructor = true;
   }
 
   void addProcedure(
@@ -813,11 +826,19 @@
       List<MetadataBuilder> metadata,
       String name,
       List<EnumConstantInfo> enumConstantInfos,
+      int startCharOffset,
       int charOffset,
       int charEndOffset) {
     MetadataCollector metadataCollector = loader.target.metadataCollector;
-    KernelEnumBuilder builder = new KernelEnumBuilder(metadataCollector,
-        metadata, name, enumConstantInfos, this, charOffset, charEndOffset);
+    KernelEnumBuilder builder = new KernelEnumBuilder(
+        metadataCollector,
+        metadata,
+        name,
+        enumConstantInfos,
+        this,
+        startCharOffset,
+        charOffset,
+        charEndOffset);
     addBuilder(name, builder, charOffset);
     metadataCollector?.setDocumentationComment(
         builder.target, documentationComment);
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_procedure_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_procedure_builder.dart
index 9dec3ab..2434d09 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_procedure_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_procedure_builder.dart
@@ -8,6 +8,7 @@
     show
         Arguments,
         AsyncMarker,
+        Class,
         Constructor,
         ConstructorInvocation,
         DartType,
@@ -34,9 +35,6 @@
 
 import 'package:kernel/type_algebra.dart' show containsTypeVariable, substitute;
 
-import '../../base/instrumentation.dart'
-    show Instrumentation, InstrumentationValueForType;
-
 import '../loader.dart' show Loader;
 
 import '../messages.dart'
@@ -56,6 +54,9 @@
 
 import '../source/source_library_builder.dart' show SourceLibraryBuilder;
 
+import '../type_inference/type_inference_engine.dart'
+    show IncludesTypeParametersCovariantly;
+
 import 'kernel_builder.dart'
     show
         ClassBuilder,
@@ -145,15 +146,34 @@
   FunctionNode buildFunction(LibraryBuilder library) {
     assert(function == null);
     FunctionNode result = new FunctionNode(body, asyncMarker: asyncModifier);
+    IncludesTypeParametersCovariantly needsCheckVisitor;
+    if (!isConstructor && !isFactory && parent is ClassBuilder) {
+      Class enclosingClass = parent.target;
+      if (enclosingClass.typeParameters.isNotEmpty) {
+        needsCheckVisitor = new IncludesTypeParametersCovariantly(
+            enclosingClass.typeParameters);
+      }
+    }
     if (typeVariables != null) {
       for (KernelTypeVariableBuilder t in typeVariables) {
-        result.typeParameters.add(t.parameter);
+        TypeParameter parameter = t.parameter;
+        result.typeParameters.add(parameter);
+        if (needsCheckVisitor != null) {
+          if (parameter.bound.accept(needsCheckVisitor)) {
+            parameter.isGenericCovariantImpl = true;
+          }
+        }
       }
       setParents(result.typeParameters, result);
     }
     if (formals != null) {
       for (KernelFormalParameterBuilder formal in formals) {
         VariableDeclaration parameter = formal.build(library, 0);
+        if (needsCheckVisitor != null) {
+          if (parameter.type.accept(needsCheckVisitor)) {
+            parameter.isGenericCovariantImpl = true;
+          }
+        }
         if (formal.isNamed) {
           result.namedParameters.add(parameter);
         } else {
@@ -344,26 +364,6 @@
   Procedure get target => origin.procedure;
 
   @override
-  void instrumentTopLevelInference(Instrumentation instrumentation) {
-    bool isEligibleForTopLevelInference = this.isEligibleForTopLevelInference;
-    if ((isEligibleForTopLevelInference || isSetter) && returnType == null) {
-      instrumentation.record(procedure.fileUri, procedure.fileOffset, 'topType',
-          new InstrumentationValueForType(procedure.function.returnType));
-    }
-    if (isEligibleForTopLevelInference) {
-      if (formals != null) {
-        for (var formal in formals) {
-          if (formal.type == null) {
-            VariableDeclaration formalTarget = formal.target;
-            instrumentation.record(procedure.fileUri, formalTarget.fileOffset,
-                'topType', new InstrumentationValueForType(formalTarget.type));
-          }
-        }
-      }
-    }
-  }
-
-  @override
   int finishPatch() {
     if (!isPatch) return 0;
 
@@ -566,7 +566,7 @@
 
     origin.constructor.isExternal = constructor.isExternal;
     origin.constructor.function = constructor.function;
-    origin.constructor.function.parent = constructor.function;
+    origin.constructor.function.parent = origin.constructor;
     origin.constructor.initializers = constructor.initializers;
     setParents(origin.constructor.initializers, origin.constructor);
     return 1;
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart
index 7f2d72a..e91b0a4 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_shadow_ast.dart
@@ -35,6 +35,9 @@
 
 import '../fasta_codes.dart'
     show
+        messageCantDisambiguateAmbiguousInformation,
+        messageCantDisambiguateNotEnoughInformation,
+        messageNonNullAwareSpreadIsNull,
         messageSwitchExpressionNotAssignableCause,
         messageVoidExpression,
         noLength,
@@ -42,6 +45,11 @@
         templateForInLoopElementTypeNotAssignable,
         templateForInLoopTypeNotIterable,
         templateIntegerLiteralIsOutOfRange,
+        templateSpreadElementTypeMismatch,
+        templateSpreadMapEntryElementKeyTypeMismatch,
+        templateSpreadMapEntryElementValueTypeMismatch,
+        templateSpreadMapEntryTypeMismatch,
+        templateSpreadTypeMismatch,
         templateSwitchExpressionNotAssignable,
         templateWebLiteralCannotBeRepresentedExactly;
 
@@ -71,6 +79,19 @@
 
 import 'body_builder.dart' show combineStatements;
 
+import 'collections.dart'
+    show
+        ControlFlowMapEntry,
+        ForElement,
+        ForInElement,
+        ForInMapEntry,
+        ForMapEntry,
+        IfElement,
+        IfMapEntry,
+        SpreadElement,
+        SpreadMapEntry,
+        convertToElement;
+
 import 'implicit_type_argument.dart' show ImplicitTypeArgument;
 
 import 'kernel_builder.dart' show KernelLibraryBuilder;
@@ -287,7 +308,6 @@
         this, _inferenceInfo.gettersAndMethods, _inferenceInfo.builder.library);
     interfaceResolver.finalizeCovariance(
         this, _inferenceInfo.setters, _inferenceInfo.builder.library);
-    interfaceResolver.recordInstrumentation(this);
   }
 
   /// Creates API members for this class.
@@ -990,15 +1010,6 @@
 
   void setInferredType(
       TypeInferenceEngine engine, Uri uri, DartType inferredType);
-
-  static void resolveInferenceNode(Member member) {
-    if (member is ShadowMember) {
-      if (member.inferenceNode != null) {
-        member.inferenceNode.resolve();
-        member.inferenceNode = null;
-      }
-    }
-  }
 }
 
 /// Shadow object for [MethodInvocation].
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
index 104f403..4533ae4 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_target.dart
@@ -43,9 +43,6 @@
 
 import 'package:kernel/type_environment.dart' show TypeEnvironment;
 
-import 'package:kernel/transformations/constants.dart' as constants
-    show transformLibraries;
-
 import '../../api_prototype/file_system.dart' show FileSystem;
 
 import '../compiler_context.dart' show CompilerContext;
@@ -73,7 +70,7 @@
         templateMissingImplementationCause,
         templateSuperclassHasNoDefaultConstructor;
 
-import '../problems.dart' show unhandled, unimplemented;
+import '../problems.dart' show unhandled;
 
 import '../scope.dart' show AmbiguousBuilder;
 
@@ -85,6 +82,8 @@
 
 import '../uri_translator.dart' show UriTranslator;
 
+import 'constant_evaluator.dart' as constants show transformLibraries;
+
 import 'kernel_builder.dart'
     show
         ClassBuilder,
@@ -134,6 +133,14 @@
 
   final bool excludeSource = !CompilerContext.current.options.embedSourceText;
 
+  final Map<String, String> environmentDefines =
+      CompilerContext.current.options.environmentDefines;
+
+  final bool errorOnUnevaluatedConstant =
+      CompilerContext.current.options.errorOnUnevaluatedConstant;
+
+  final bool enableAsserts = CompilerContext.current.options.enableAsserts;
+
   final List<Object> clonedFormals = <Object>[];
 
   KernelTarget(this.fileSystem, this.includeComments, DillTarget dillTarget,
@@ -151,8 +158,9 @@
       new SourceLoader(fileSystem, includeComments, this);
 
   void addSourceInformation(
-      Uri uri, List<int> lineStarts, List<int> sourceCode) {
-    uriToSource[uri] = new Source(lineStarts, sourceCode);
+      Uri importUri, Uri fileUri, List<int> lineStarts, List<int> sourceCode) {
+    uriToSource[fileUri] =
+        new Source(lineStarts, sourceCode, importUri, fileUri);
   }
 
   /// Return list of same size as input with possibly translated uris.
@@ -324,17 +332,16 @@
 
     Map<Uri, Source> uriToSource = new Map<Uri, Source>();
     void copySource(Uri uri, Source source) {
-      uriToSource[uri] =
-          excludeSource ? new Source(source.lineStarts, const <int>[]) : source;
+      uriToSource[uri] = excludeSource
+          ? new Source(source.lineStarts, const <int>[], source.importUri,
+              source.fileUri)
+          : source;
     }
 
     this.uriToSource.forEach(copySource);
 
-    Component component = CompilerContext.current.options.target
-        .configureComponent(new Component(
-            nameRoot: nameRoot,
-            libraries: libraries,
-            uriToSource: uriToSource));
+    Component component = backendTarget.configureComponent(new Component(
+        nameRoot: nameRoot, libraries: libraries, uriToSource: uriToSource));
     if (loader.first != null) {
       // TODO(sigmund): do only for full program
       Declaration declaration =
@@ -557,8 +564,11 @@
     for (String platformLibrary in const [
       "dart:_internal",
       "dart:async",
+      // TODO(askesc): When all backends support set literals, we no longer
+      // need to index dart:collection, as it is only needed for desugaring of
+      // const sets. We can remove it from this list at that time.
+      "dart:collection",
       "dart:core",
-      "dart:ffi",
       "dart:mirrors"
     ]) {
       Uri uri = Uri.parse(platformLibrary);
@@ -574,16 +584,16 @@
             break;
           }
         }
-        if (!found && uri.path != "mirrors" && uri.path != "ffi") {
-          // dart:mirrors and dart:ffi are optional.
+        if (!found && uri.path != "mirrors") {
+          // dart:mirrors is optional.
           throw "Can't find $uri";
         }
       } else {
         libraries.add(library.target);
       }
     }
-    Component plaformLibraries = CompilerContext.current.options.target
-        .configureComponent(new Component());
+    Component plaformLibraries =
+        backendTarget.configureComponent(new Component());
     // Add libraries directly to prevent that their parents are changed.
     plaformLibraries.libraries.addAll(libraries);
     loader.computeCoreTypes(plaformLibraries);
@@ -708,11 +718,21 @@
         field.initializer = new NullLiteral()..parent = field;
         if (field.isFinal &&
             (cls.constructors.isNotEmpty || cls.isMixinDeclaration)) {
-          builder.library.addProblem(
-              templateFinalFieldNotInitialized.withArguments(field.name.name),
-              field.fileOffset,
-              field.name.name.length,
-              field.fileUri);
+          String uri = '${field.enclosingLibrary.importUri}';
+          String file = field.fileUri.pathSegments.last;
+          if (uri == 'dart:html' ||
+              uri == 'dart:svg' ||
+              uri == 'dart:_native_typed_data' ||
+              uri == 'dart:_interceptors' && file == 'js_string.dart') {
+            // TODO(johnniwinther): Use external getters instead of final
+            // fields. See https://github.com/dart-lang/sdk/issues/33762
+          } else {
+            builder.library.addProblem(
+                templateFinalFieldNotInitialized.withArguments(field.name.name),
+                field.fileOffset,
+                field.name.name.length,
+                field.fileUri);
+          }
         }
       }
     }
@@ -751,15 +771,17 @@
   /// libraries for the first time.
   void runBuildTransformations() {
     if (loader.target.enableConstantUpdate2018) {
-      TypeEnvironment environment = new TypeEnvironment(
-          loader.coreTypes, loader.hierarchy,
-          legacyMode: false);
+      TypeEnvironment environment =
+          new TypeEnvironment(loader.coreTypes, loader.hierarchy);
       constants.transformLibraries(
           loader.libraries,
-          loader.target.backendTarget.constantsBackend(loader.coreTypes),
-          CompilerContext.current.options.environmentDefines,
+          backendTarget.constantsBackend(loader.coreTypes),
+          environmentDefines,
           environment,
-          new KernelConstantErrorReporter(loader, environment));
+          new KernelConstantErrorReporter(loader),
+          enableAsserts: enableAsserts,
+          desugarSets: !backendTarget.supportsSetLiterals,
+          errorOnUnevaluatedConstant: errorOnUnevaluatedConstant);
       ticker.logMs("Evaluated constants");
     }
     backendTarget.performModularTransformationsOnLibraries(
@@ -772,10 +794,6 @@
   }
 
   void runProcedureTransformations(Procedure procedure) {
-    if (loader.target.enableConstantUpdate2018) {
-      unimplemented('constant evaluation during expression evaluation',
-          procedure.fileOffset, procedure.fileUri);
-    }
     backendTarget.performTransformationsOnProcedure(
         loader.coreTypes, loader.hierarchy, procedure,
         logger: (String msg) => ticker.logMs(msg));
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_type_variable_builder.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_type_variable_builder.dart
index c427799..9137222 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_type_variable_builder.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_type_variable_builder.dart
@@ -106,6 +106,14 @@
         name, parent, charOffset, bound.clone(newTypes));
   }
 
+  @override
+  bool operator ==(Object other) {
+    return other is KernelTypeVariableBuilder && target == other.target;
+  }
+
+  @override
+  int get hashCode => target.hashCode;
+
   static List<TypeParameter> kernelTypeParametersFromBuilders(
       List<TypeVariableBuilder> builders) {
     if (builders == null) return null;
diff --git a/pkg/front_end/lib/src/fasta/kernel/transform_collections.dart b/pkg/front_end/lib/src/fasta/kernel/transform_collections.dart
new file mode 100644
index 0000000..bbc7186
--- /dev/null
+++ b/pkg/front_end/lib/src/fasta/kernel/transform_collections.dart
@@ -0,0 +1,482 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library fasta.transform_collections;
+
+import 'dart:core' hide MapEntry;
+
+import 'package:kernel/ast.dart'
+    show
+        Arguments,
+        AsExpression,
+        Block,
+        BlockExpression,
+        Class,
+        DartType,
+        DynamicType,
+        Expression,
+        ExpressionStatement,
+        Field,
+        ForInStatement,
+        ForStatement,
+        IfStatement,
+        InterfaceType,
+        ListLiteral,
+        MapEntry,
+        MapLiteral,
+        MethodInvocation,
+        Name,
+        Not,
+        NullLiteral,
+        Procedure,
+        PropertyGet,
+        SetLiteral,
+        Statement,
+        StaticInvocation,
+        transformList,
+        TreeNode,
+        VariableDeclaration,
+        VariableGet;
+
+import 'package:kernel/core_types.dart' show CoreTypes;
+
+import 'package:kernel/type_environment.dart' show TypeEnvironment;
+
+import 'package:kernel/visitor.dart' show Transformer;
+
+import 'collections.dart'
+    show
+        ControlFlowElement,
+        ControlFlowMapEntry,
+        ForElement,
+        ForInElement,
+        ForInMapEntry,
+        ForMapEntry,
+        IfElement,
+        IfMapEntry,
+        SpreadElement,
+        SpreadMapEntry;
+
+import '../source/source_loader.dart' show SourceLoader;
+
+import 'redirecting_factory_body.dart' show RedirectingFactoryBody;
+
+class CollectionTransformer extends Transformer {
+  final CoreTypes coreTypes;
+  final TypeEnvironment typeEnvironment;
+  final Procedure listAdd;
+  final Procedure setFactory;
+  final Procedure setAdd;
+  final Procedure objectEquals;
+  final Procedure mapEntries;
+  final Procedure mapPut;
+  final Class mapEntryClass;
+  final Field mapEntryKey;
+  final Field mapEntryValue;
+
+  static Procedure _findSetFactory(CoreTypes coreTypes) {
+    Procedure factory = coreTypes.index.getMember('dart:core', 'Set', '');
+    RedirectingFactoryBody body = factory?.function?.body;
+    return body?.target;
+  }
+
+  CollectionTransformer(SourceLoader loader)
+      : coreTypes = loader.coreTypes,
+        typeEnvironment = loader.typeInferenceEngine.typeSchemaEnvironment,
+        listAdd = loader.coreTypes.index.getMember('dart:core', 'List', 'add'),
+        setFactory = _findSetFactory(loader.coreTypes),
+        setAdd = loader.coreTypes.index.getMember('dart:core', 'Set', 'add'),
+        objectEquals =
+            loader.coreTypes.index.getMember('dart:core', 'Object', '=='),
+        mapEntries =
+            loader.coreTypes.index.getMember('dart:core', 'Map', 'get:entries'),
+        mapPut = loader.coreTypes.index.getMember('dart:core', 'Map', '[]='),
+        mapEntryClass =
+            loader.coreTypes.index.getClass('dart:core', 'MapEntry'),
+        mapEntryKey =
+            loader.coreTypes.index.getMember('dart:core', 'MapEntry', 'key'),
+        mapEntryValue =
+            loader.coreTypes.index.getMember('dart:core', 'MapEntry', 'value');
+
+  TreeNode _translateListOrSet(
+      Expression node, DartType elementType, List<Expression> elements,
+      {bool isSet: false}) {
+    // Translate elements in place up to the first non-expression, if any.
+    int i = 0;
+    for (; i < elements.length; ++i) {
+      if (elements[i] is ControlFlowElement) break;
+      elements[i] = elements[i].accept(this)..parent = node;
+    }
+
+    // If there were only expressions, we are done.
+    if (i == elements.length) return node;
+
+    // Build a block expression and create an empty list or set.
+    VariableDeclaration result;
+    if (isSet) {
+      // TODO(kmillikin): When all the back ends handle set literals we can use
+      // one here.
+      result = new VariableDeclaration.forValue(
+          new StaticInvocation(
+              setFactory, new Arguments([], types: [elementType])),
+          type: new InterfaceType(coreTypes.setClass, [elementType]),
+          isFinal: true);
+    } else {
+      result = new VariableDeclaration.forValue(
+          new ListLiteral([], typeArgument: elementType),
+          type: new InterfaceType(coreTypes.listClass, [elementType]),
+          isFinal: true);
+    }
+    List<Statement> body = [result];
+    // Add the elements up to the first non-expression.
+    for (int j = 0; j < i; ++j) {
+      _addExpressionElement(elements[j], isSet, result, body);
+    }
+    // Translate the elements starting with the first non-expression.
+    for (; i < elements.length; ++i) {
+      _translateElement(elements[i], elementType, isSet, result, body);
+    }
+
+    return new BlockExpression(new Block(body), new VariableGet(result));
+  }
+
+  void _translateElement(Expression element, DartType elementType, bool isSet,
+      VariableDeclaration result, List<Statement> body) {
+    if (element is SpreadElement) {
+      _translateSpreadElement(element, elementType, isSet, result, body);
+    } else if (element is IfElement) {
+      _translateIfElement(element, elementType, isSet, result, body);
+    } else if (element is ForElement) {
+      _translateForElement(element, elementType, isSet, result, body);
+    } else if (element is ForInElement) {
+      _translateForInElement(element, elementType, isSet, result, body);
+    } else {
+      _addExpressionElement(element.accept(this), isSet, result, body);
+    }
+  }
+
+  void _addExpressionElement(Expression element, bool isSet,
+      VariableDeclaration result, List<Statement> body) {
+    body.add(new ExpressionStatement(new MethodInvocation(
+        new VariableGet(result),
+        new Name('add'),
+        new Arguments([element]),
+        isSet ? setAdd : listAdd)));
+  }
+
+  void _translateIfElement(IfElement element, DartType elementType, bool isSet,
+      VariableDeclaration result, List<Statement> body) {
+    List<Statement> thenStatements = [];
+    _translateElement(element.then, elementType, isSet, result, thenStatements);
+    List<Statement> elseStatements;
+    if (element.otherwise != null) {
+      _translateElement(element.otherwise, elementType, isSet, result,
+          elseStatements = <Statement>[]);
+    }
+    Statement thenBody = thenStatements.length == 1
+        ? thenStatements.first
+        : new Block(thenStatements);
+    Statement elseBody;
+    if (elseStatements != null && elseStatements.isNotEmpty) {
+      elseBody = elseStatements.length == 1
+          ? elseStatements.first
+          : new Block(elseStatements);
+    }
+    body.add(new IfStatement(element.condition.accept(this), thenBody, elseBody)
+      ..fileOffset = element.fileOffset);
+  }
+
+  void _translateForElement(ForElement element, DartType elementType,
+      bool isSet, VariableDeclaration result, List<Statement> body) {
+    List<Statement> statements = <Statement>[];
+    _translateElement(element.body, elementType, isSet, result, statements);
+    Statement loopBody =
+        statements.length == 1 ? statements.first : new Block(statements);
+    ForStatement loop = new ForStatement(element.variables,
+        element.condition?.accept(this), element.updates, loopBody)
+      ..fileOffset = element.fileOffset;
+    transformList(loop.variables, this, loop);
+    transformList(loop.updates, this, loop);
+    body.add(loop);
+  }
+
+  void _translateForInElement(ForInElement element, DartType elementType,
+      bool isSet, VariableDeclaration result, List<Statement> body) {
+    List<Statement> statements;
+    Statement prologue = element.prologue;
+    if (prologue == null) {
+      statements = <Statement>[];
+    } else {
+      prologue = prologue.accept(this);
+      statements =
+          prologue is Block ? prologue.statements : <Statement>[prologue];
+    }
+    _translateElement(element.body, elementType, isSet, result, statements);
+    Statement loopBody =
+        statements.length == 1 ? statements.first : new Block(statements);
+    if (element.problem != null) {
+      body.add(new ExpressionStatement(element.problem.accept(this)));
+    }
+    body.add(new ForInStatement(
+        element.variable, element.iterable.accept(this), loopBody,
+        isAsync: element.isAsync)
+      ..fileOffset = element.fileOffset);
+  }
+
+  void _translateSpreadElement(SpreadElement element, DartType elementType,
+      bool isSet, VariableDeclaration result, List<Statement> body) {
+    Expression value = element.expression.accept(this);
+    // Null-aware spreads require testing the subexpression's value.
+    VariableDeclaration temp;
+    if (element.isNullAware) {
+      temp = new VariableDeclaration.forValue(value,
+          type: const DynamicType(), isFinal: true);
+      body.add(temp);
+      value = new VariableGet(temp);
+    }
+
+    VariableDeclaration elt;
+    Statement loopBody;
+    if (element.elementType == null ||
+        !typeEnvironment.isSubtypeOf(element.elementType, elementType)) {
+      elt = new VariableDeclaration(null,
+          type: const DynamicType(), isFinal: true);
+      VariableDeclaration castedVar = new VariableDeclaration.forValue(
+          new AsExpression(new VariableGet(elt), elementType)
+            ..isTypeError = true
+            ..fileOffset = element.expression.fileOffset,
+          type: elementType);
+      loopBody = new Block(<Statement>[
+        castedVar,
+        new ExpressionStatement(new MethodInvocation(
+            new VariableGet(result),
+            new Name('add'),
+            new Arguments([new VariableGet(castedVar)]),
+            isSet ? setAdd : listAdd))
+      ]);
+    } else {
+      elt = new VariableDeclaration(null, type: elementType, isFinal: true);
+      loopBody = new ExpressionStatement(new MethodInvocation(
+          new VariableGet(result),
+          new Name('add'),
+          new Arguments([new VariableGet(elt)]),
+          isSet ? setAdd : listAdd));
+    }
+    Statement statement = new ForInStatement(elt, value, loopBody);
+
+    if (element.isNullAware) {
+      statement = new IfStatement(
+          new Not(new MethodInvocation(new VariableGet(temp), new Name('=='),
+              new Arguments([new NullLiteral()]), objectEquals)),
+          statement,
+          null);
+    }
+    body.add(statement);
+  }
+
+  @override
+  TreeNode visitListLiteral(ListLiteral node) {
+    // Const collections are handled by the constant evaluator.
+    if (node.isConst) return node;
+
+    return _translateListOrSet(node, node.typeArgument, node.expressions,
+        isSet: false);
+  }
+
+  @override
+  TreeNode visitSetLiteral(SetLiteral node) {
+    // Const collections are handled by the constant evaluator.
+    if (node.isConst) return node;
+
+    return _translateListOrSet(node, node.typeArgument, node.expressions,
+        isSet: true);
+  }
+
+  @override
+  TreeNode visitMapLiteral(MapLiteral node) {
+    // Const collections are handled by the constant evaluator.
+    if (node.isConst) return node;
+
+    // Translate entries in place up to the first control-flow entry, if any.
+    int i = 0;
+    for (; i < node.entries.length; ++i) {
+      if (node.entries[i] is ControlFlowMapEntry) break;
+      node.entries[i] = node.entries[i].accept(this)..parent = node;
+    }
+
+    // If there were no control-flow entries we are done.
+    if (i == node.entries.length) return node;
+
+    // Build a block expression and create an empty map.
+    VariableDeclaration result = new VariableDeclaration.forValue(
+        new MapLiteral([], keyType: node.keyType, valueType: node.valueType),
+        type: new InterfaceType(
+            coreTypes.mapClass, [node.keyType, node.valueType]),
+        isFinal: true);
+    List<Statement> body = [result];
+    // Add all the entries up to the first control-flow entry.
+    for (int j = 0; j < i; ++j) {
+      _addNormalEntry(node.entries[j], result, body);
+    }
+    for (; i < node.entries.length; ++i) {
+      _translateEntry(
+          node.entries[i], node.keyType, node.valueType, result, body);
+    }
+
+    return new BlockExpression(new Block(body), new VariableGet(result));
+  }
+
+  void _translateEntry(MapEntry entry, DartType keyType, DartType valueType,
+      VariableDeclaration result, List<Statement> body) {
+    if (entry is SpreadMapEntry) {
+      _translateSpreadEntry(entry, keyType, valueType, result, body);
+    } else if (entry is IfMapEntry) {
+      _translateIfEntry(entry, keyType, valueType, result, body);
+    } else if (entry is ForMapEntry) {
+      _translateForEntry(entry, keyType, valueType, result, body);
+    } else if (entry is ForInMapEntry) {
+      _translateForInEntry(entry, keyType, valueType, result, body);
+    } else {
+      _addNormalEntry(entry.accept(this), result, body);
+    }
+  }
+
+  void _addNormalEntry(
+      MapEntry entry, VariableDeclaration result, List<Statement> body) {
+    body.add(new ExpressionStatement(new MethodInvocation(
+        new VariableGet(result),
+        new Name('[]='),
+        new Arguments([entry.key, entry.value]),
+        mapPut)));
+  }
+
+  void _translateIfEntry(IfMapEntry entry, DartType keyType, DartType valueType,
+      VariableDeclaration result, List<Statement> body) {
+    List<Statement> thenBody = [];
+    _translateEntry(entry.then, keyType, valueType, result, thenBody);
+    List<Statement> elseBody;
+    if (entry.otherwise != null) {
+      _translateEntry(entry.otherwise, keyType, valueType, result,
+          elseBody = <Statement>[]);
+    }
+    Statement thenStatement =
+        thenBody.length == 1 ? thenBody.first : new Block(thenBody);
+    Statement elseStatement;
+    if (elseBody != null && elseBody.isNotEmpty) {
+      elseStatement =
+          elseBody.length == 1 ? elseBody.first : new Block(elseBody);
+    }
+    body.add(new IfStatement(
+        entry.condition.accept(this), thenStatement, elseStatement));
+  }
+
+  void _translateForEntry(ForMapEntry entry, DartType keyType,
+      DartType valueType, VariableDeclaration result, List<Statement> body) {
+    List<Statement> statements = <Statement>[];
+    _translateEntry(entry.body, keyType, valueType, result, statements);
+    Statement loopBody =
+        statements.length == 1 ? statements.first : new Block(statements);
+    ForStatement loop = new ForStatement(
+        entry.variables, entry.condition?.accept(this), entry.updates, loopBody)
+      ..fileOffset = entry.fileOffset;
+    transformList(loop.variables, this, loop);
+    transformList(loop.updates, this, loop);
+    body.add(loop);
+  }
+
+  void _translateForInEntry(ForInMapEntry entry, DartType keyType,
+      DartType valueType, VariableDeclaration result, List<Statement> body) {
+    List<Statement> statements;
+    Statement prologue = entry.prologue;
+    if (prologue == null) {
+      statements = <Statement>[];
+    } else {
+      prologue = prologue.accept(this);
+      statements =
+          prologue is Block ? prologue.statements : <Statement>[prologue];
+    }
+    _translateEntry(entry.body, keyType, valueType, result, statements);
+    Statement loopBody =
+        statements.length == 1 ? statements.first : new Block(statements);
+    if (entry.problem != null) {
+      body.add(new ExpressionStatement(entry.problem.accept(this)));
+    }
+    body.add(new ForInStatement(
+        entry.variable, entry.iterable.accept(this), loopBody,
+        isAsync: entry.isAsync)
+      ..fileOffset = entry.fileOffset);
+  }
+
+  void _translateSpreadEntry(SpreadMapEntry entry, DartType keyType,
+      DartType valueType, VariableDeclaration result, List<Statement> body) {
+    Expression value = entry.expression.accept(this);
+    // Null-aware spreads require testing the subexpression's value.
+    VariableDeclaration temp;
+    if (entry.isNullAware) {
+      temp = new VariableDeclaration.forValue(value,
+          type: coreTypes.mapClass.rawType);
+      body.add(temp);
+      value = new VariableGet(temp);
+    }
+
+    DartType entryType =
+        new InterfaceType(mapEntryClass, <DartType>[keyType, valueType]);
+    VariableDeclaration elt;
+    Statement loopBody;
+    if (entry.entryType == null ||
+        !typeEnvironment.isSubtypeOf(entry.entryType, entryType)) {
+      elt = new VariableDeclaration(null,
+          type: new InterfaceType(mapEntryClass,
+              <DartType>[const DynamicType(), const DynamicType()]),
+          isFinal: true);
+      VariableDeclaration keyVar = new VariableDeclaration.forValue(
+          new AsExpression(
+              new PropertyGet(
+                  new VariableGet(elt), new Name('key'), mapEntryKey),
+              keyType)
+            ..isTypeError = true
+            ..fileOffset = entry.expression.fileOffset,
+          type: keyType);
+      VariableDeclaration valueVar = new VariableDeclaration.forValue(
+          new AsExpression(
+              new PropertyGet(
+                  new VariableGet(elt), new Name('value'), mapEntryValue),
+              valueType)
+            ..isTypeError = true
+            ..fileOffset = entry.expression.fileOffset,
+          type: valueType);
+      loopBody = new Block(<Statement>[
+        keyVar,
+        valueVar,
+        new ExpressionStatement(new MethodInvocation(
+            new VariableGet(result),
+            new Name('[]='),
+            new Arguments([new VariableGet(keyVar), new VariableGet(valueVar)]),
+            mapPut))
+      ]);
+    } else {
+      elt = new VariableDeclaration(null, type: entryType, isFinal: true);
+      loopBody = new ExpressionStatement(new MethodInvocation(
+          new VariableGet(result),
+          new Name('[]='),
+          new Arguments([
+            new PropertyGet(new VariableGet(elt), new Name('key'), mapEntryKey),
+            new PropertyGet(
+                new VariableGet(elt), new Name('value'), mapEntryValue)
+          ]),
+          mapPut));
+    }
+    Statement statement = new ForInStatement(
+        elt, new PropertyGet(value, new Name('entries'), mapEntries), loopBody);
+
+    if (entry.isNullAware) {
+      statement = new IfStatement(
+          new Not(new MethodInvocation(new VariableGet(temp), new Name('=='),
+              new Arguments([new NullLiteral()]), objectEquals)),
+          statement,
+          null);
+    }
+    body.add(statement);
+  }
+}
diff --git a/pkg/front_end/lib/src/fasta/kernel/transform_set_literals.dart b/pkg/front_end/lib/src/fasta/kernel/transform_set_literals.dart
index abc2f4d..3480b2b 100644
--- a/pkg/front_end/lib/src/fasta/kernel/transform_set_literals.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/transform_set_literals.dart
@@ -44,6 +44,7 @@
   final Procedure setFactory;
   final Procedure addMethod;
   final Constructor unmodifiableSetConstructor;
+  final bool transformConst;
 
   static Procedure _findSetFactory(CoreTypes coreTypes) {
     Procedure factory = coreTypes.index.getMember('dart:core', 'Set', '');
@@ -76,7 +77,7 @@
     return null;
   }
 
-  SetLiteralTransformer(SourceLoader loader)
+  SetLiteralTransformer(SourceLoader loader, {this.transformConst: true})
       : coreTypes = loader.coreTypes,
         nullType = new InterfaceType(loader.coreTypes.nullClass, []),
         setFactory = _findSetFactory(loader.coreTypes),
@@ -85,6 +86,7 @@
 
   TreeNode visitSetLiteral(SetLiteral node) {
     if (node.isConst) {
+      if (!transformConst) return node;
       List<MapEntry> entries = new List<MapEntry>(node.expressions.length);
       for (int i = 0; i < node.expressions.length; i++) {
         // expression_i: null
diff --git a/pkg/front_end/lib/src/fasta/kernel/type_builder_computer.dart b/pkg/front_end/lib/src/fasta/kernel/type_builder_computer.dart
index 390f4e4..8aad22c 100644
--- a/pkg/front_end/lib/src/fasta/kernel/type_builder_computer.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/type_builder_computer.dart
@@ -15,6 +15,7 @@
         InterfaceType,
         InvalidType,
         Library,
+        NamedType,
         TypeParameter,
         TypeParameterType,
         TypedefType,
@@ -24,6 +25,8 @@
     show
         DynamicTypeBuilder,
         KernelClassBuilder,
+        KernelFormalParameterBuilder,
+        KernelFunctionTypeBuilder,
         KernelNamedTypeBuilder,
         KernelTypeBuilder,
         KernelTypeVariableBuilder,
@@ -32,6 +35,8 @@
 
 import '../loader.dart' show Loader;
 
+import '../parser.dart' show FormalParameterKind;
+
 class TypeBuilderComputer implements DartTypeVisitor<KernelTypeBuilder> {
   final Loader<Library> loader;
 
@@ -75,8 +80,37 @@
     return new KernelNamedTypeBuilder(cls.name, arguments)..bind(cls);
   }
 
+  @override
   KernelTypeBuilder visitFunctionType(FunctionType node) {
-    throw "Not implemented";
+    KernelTypeBuilder returnType = node.returnType.accept(this);
+    // We could compute the type variables here. However, the current
+    // implementation of [visitTypeParameterType] is suffient.
+    List<KernelTypeVariableBuilder> typeVariables = null;
+    List<DartType> positionalParameters = node.positionalParameters;
+    List<NamedType> namedParameters = node.namedParameters;
+    List<KernelFormalParameterBuilder> formals =
+        new List<KernelFormalParameterBuilder>(
+            positionalParameters.length + namedParameters.length);
+    for (int i = 0; i < positionalParameters.length; i++) {
+      KernelTypeBuilder type = positionalParameters[i].accept(this);
+      FormalParameterKind kind = FormalParameterKind.mandatory;
+      if (i >= node.requiredParameterCount) {
+        kind = FormalParameterKind.optionalPositional;
+      }
+      formals[i] =
+          new KernelFormalParameterBuilder(null, 0, type, null, null, -1)
+            ..kind = kind;
+    }
+    for (int i = 0; i < namedParameters.length; i++) {
+      NamedType parameter = namedParameters[i];
+      KernelTypeBuilder type = positionalParameters[i].accept(this);
+      formals[i + positionalParameters.length] =
+          new KernelFormalParameterBuilder(
+              null, 0, type, parameter.name, null, -1)
+            ..kind = FormalParameterKind.optionalNamed;
+    }
+
+    return new KernelFunctionTypeBuilder(returnType, typeVariables, formals);
   }
 
   KernelTypeBuilder visitTypeParameterType(TypeParameterType node) {
diff --git a/pkg/front_end/lib/src/fasta/kernel/type_labeler.dart b/pkg/front_end/lib/src/fasta/kernel/type_labeler.dart
index c0be105..43815bf 100644
--- a/pkg/front_end/lib/src/fasta/kernel/type_labeler.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/type_labeler.dart
@@ -25,6 +25,7 @@
         NullConstant,
         PartialInstantiationConstant,
         Procedure,
+        SetConstant,
         StringConstant,
         SymbolConstant,
         TearOffConstant,
@@ -266,6 +267,19 @@
     result.add("]");
   }
 
+  void visitSetConstant(SetConstant node) {
+    result.add("<");
+    node.typeArgument.accept(this);
+    result.add(">{");
+    bool first = true;
+    for (Constant constant in node.entries) {
+      if (!first) result.add(", ");
+      constant.accept(this);
+      first = false;
+    }
+    result.add("}");
+  }
+
   void visitMapConstant(MapConstant node) {
     result.add("<");
     node.keyType.accept(this);
diff --git a/pkg/front_end/lib/src/fasta/kernel/types.dart b/pkg/front_end/lib/src/fasta/kernel/types.dart
index d7207b5..9f6d5c1 100644
--- a/pkg/front_end/lib/src/fasta/kernel/types.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/types.dart
@@ -272,7 +272,8 @@
 
   @override
   bool isTypedefRelated(TypedefType s, InterfaceType t, Types types) {
-    return false;
+    // Rule 5.
+    return types.isSubtypeOfKernel(s.unalias, t);
   }
 
   @override
@@ -407,7 +408,9 @@
   @override
   bool isTypeParameterRelated(
       TypeParameterType s, TypeParameterType t, Types types) {
-    return s.parameter == t.parameter;
+    return s.parameter == t.parameter ||
+        // Rule 13.
+        types.isSubtypeOfKernel(s.bound, t);
   }
 
   @override
@@ -511,14 +514,63 @@
   @override
   bool isFutureOrRelated(
       InterfaceType sFutureOr, InterfaceType tFutureOr, Types types) {
-    //return types.isSubtypeOfKernel(
-    //    sFutureOr.typeArguments.single, futureOr.typeArguments.single);
-    // TODO(ahe): Not tested yet.
-    return true;
+    // This follows from combining rules 7, 10, and 11.
+    return types.isSubtypeOfKernel(
+        sFutureOr.typeArguments.single, tFutureOr.typeArguments.single);
   }
 
-  // TODO(ahe): Remove this method.
-  noSuchMethod(invocation) => super.noSuchMethod(invocation);
+  @override
+  bool isDynamicRelated(DynamicType s, InterfaceType futureOr, Types types) {
+    // Rule 11.
+    return types.isSubtypeOfKernel(s, futureOr.typeArguments.single);
+  }
+
+  @override
+  bool isVoidRelated(VoidType s, InterfaceType futureOr, Types types) {
+    // Rule 11.
+    return types.isSubtypeOfKernel(s, futureOr.typeArguments.single);
+  }
+
+  @override
+  bool isTypeParameterRelated(
+      TypeParameterType s, InterfaceType futureOr, Types types) {
+    List<DartType> arguments = futureOr.typeArguments;
+    if (types.isSubtypeOfKernel(s, arguments.single)) {
+      // Rule 11.
+      return true;
+    }
+
+    if (types.isSubtypeOfKernel(s.parameter.bound, futureOr)) {
+      // Rule 13.
+      return true;
+    }
+
+    // Rule 10.
+    return types.isSubtypeOfKernel(
+        s, new InterfaceType(types.hierarchy.futureKernelClass, arguments));
+  }
+
+  @override
+  bool isFunctionRelated(FunctionType s, InterfaceType futureOr, Types types) {
+    // Rule 11.
+    return types.isSubtypeOfKernel(s, futureOr.typeArguments.single);
+  }
+
+  @override
+  bool isIntersectionRelated(
+      TypeParameterType intersection, InterfaceType futureOr, Types types) {
+    if (isTypeParameterRelated(intersection, futureOr, types)) {
+      // Rule 8.
+      return true;
+    }
+    // Rule 12.
+    return types.isSubtypeOfKernel(intersection.promotedBound, futureOr);
+  }
+
+  @override
+  bool isTypedefRelated(TypedefType s, InterfaceType futureOr, Types types) {
+    return types.isSubtypeOfKernel(s.unalias, futureOr);
+  }
 }
 
 class IsIntersectionSubtypeOf extends TypeRelation<TypeParameterType> {
@@ -548,6 +600,28 @@
     return s.classNode == types.hierarchy.nullKernelClass; // Rule 4.
   }
 
-  // TODO(ahe): Remove this method.
-  noSuchMethod(invocation) => super.noSuchMethod(invocation);
+  bool isDynamicRelated(
+      DynamicType s, TypeParameterType intersection, Types types) {
+    return false;
+  }
+
+  bool isFunctionRelated(
+      FunctionType s, TypeParameterType intersection, Types types) {
+    return false;
+  }
+
+  bool isFutureOrRelated(
+      InterfaceType futureOr, TypeParameterType intersection, Types types) {
+    return false;
+  }
+
+  bool isTypedefRelated(
+      TypedefType s, TypeParameterType intersection, Types types) {
+    // Rule 5.
+    return types.isSubtypeOfKernel(s.unalias, intersection);
+  }
+
+  bool isVoidRelated(VoidType s, TypeParameterType intersection, Types types) {
+    return false;
+  }
 }
diff --git a/pkg/front_end/lib/src/fasta/kernel/utils.dart b/pkg/front_end/lib/src/fasta/kernel/utils.dart
index 8709bb4..1b96164 100644
--- a/pkg/front_end/lib/src/fasta/kernel/utils.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/utils.dart
@@ -53,7 +53,6 @@
         ? new BinaryPrinter(sink)
         : new LimitedBinaryPrinter(sink, filter ?? (_) => true, false);
     printer.writeComponentFile(component);
-    component.unbindCanonicalNames();
   } finally {
     await sink.close();
   }
@@ -61,12 +60,12 @@
 
 /// Serialize the libraries in [component] that match [filter].
 List<int> serializeComponent(Component component,
-    {bool filter(Library library), bool excludeUriToSource: false}) {
+    {bool filter(Library library), bool includeSources: true}) {
   ByteSink byteSink = new ByteSink();
-  BinaryPrinter printer = filter == null && !excludeUriToSource
-      ? new BinaryPrinter(byteSink)
+  BinaryPrinter printer = filter == null
+      ? new BinaryPrinter(byteSink, includeSources: includeSources)
       : new LimitedBinaryPrinter(
-          byteSink, filter ?? (_) => true, excludeUriToSource);
+          byteSink, filter ?? (_) => true, !includeSources);
   printer.writeComponentFile(component);
   return byteSink.builder.takeBytes();
 }
diff --git a/pkg/front_end/lib/src/fasta/loader.dart b/pkg/front_end/lib/src/fasta/loader.dart
index da5a124..67b5cb2 100644
--- a/pkg/front_end/lib/src/fasta/loader.dart
+++ b/pkg/front_end/lib/src/fasta/loader.dart
@@ -170,6 +170,10 @@
   void ensureCoreLibrary() {
     if (coreLibrary == null) {
       read(Uri.parse("dart:core"), 0, accessor: first);
+      // TODO(askesc): When all backends support set literals, we no longer
+      // need to index dart:collection, as it is only needed for desugaring of
+      // const sets. We can remove it from this list at that time.
+      read(Uri.parse("dart:collection"), 0, accessor: first);
       assert(coreLibrary != null);
     }
   }
@@ -275,8 +279,6 @@
     target.context.report(
         message.withLocation(fileUri, charOffset, length), severity,
         context: context);
-    recordMessage(severity, message, charOffset, length, fileUri,
-        context: context);
     if (severity == Severity.error) {
       (wasHandled ? handledErrors : unhandledErrors)
           .add(message.withLocation(fileUri, charOffset, length));
@@ -301,10 +303,6 @@
 
   Declaration getNativeAnnotation() => target.getNativeAnnotation(this);
 
-  void recordMessage(Severity severity, Message message, int charOffset,
-      int length, Uri fileUri,
-      {List<LocatedMessage> context}) {}
-
   ClassBuilder<TypeBuilder, Object> computeClassBuilderFromTargetClass(
       covariant Object cls);
 
diff --git a/pkg/front_end/lib/src/fasta/modifier.dart b/pkg/front_end/lib/src/fasta/modifier.dart
index 4b7ed12..8c3f40c 100644
--- a/pkg/front_end/lib/src/fasta/modifier.dart
+++ b/pkg/front_end/lib/src/fasta/modifier.dart
@@ -42,6 +42,10 @@
 /// Not a modifier, used by formal parameters to track if they are initializing.
 const int initializingFormalMask = hasInitializerMask << 1;
 
+/// Not a modifier, used by classes to track if the class has a const
+/// constructor.
+const int hasConstConstructorMask = initializingFormalMask << 1;
+
 /// Not a real modifier, and by setting it to zero, it is automatically ignored
 /// by [Modifier.validate] below.
 const int varMask = 0;
diff --git a/pkg/front_end/lib/src/fasta/names.dart b/pkg/front_end/lib/src/fasta/names.dart
index ab5b774..421d4be 100644
--- a/pkg/front_end/lib/src/fasta/names.dart
+++ b/pkg/front_end/lib/src/fasta/names.dart
@@ -60,6 +60,8 @@
 
 final Name rightShiftName = new Name(">>");
 
+final Name tripleShiftName = new Name(">>>");
+
 final Name tildeName = new Name("~");
 
 final Name unaryMinusName = new Name("unary-");
diff --git a/pkg/front_end/lib/src/fasta/operator.dart b/pkg/front_end/lib/src/fasta/operator.dart
index dad4440..1617a5a 100644
--- a/pkg/front_end/lib/src/fasta/operator.dart
+++ b/pkg/front_end/lib/src/fasta/operator.dart
@@ -25,6 +25,7 @@
   modulo,
   multiply,
   rightShift,
+  tripleShift,
   subtract,
   truncatingDivide,
   unaryMinus,
@@ -48,6 +49,7 @@
   if (identical("%", string)) return Operator.modulo;
   if (identical("*", string)) return Operator.multiply;
   if (identical(">>", string)) return Operator.rightShift;
+  if (identical(">>>", string)) return Operator.tripleShift;
   if (identical("-", string)) return Operator.subtract;
   if (identical("~/", string)) return Operator.truncatingDivide;
   if (identical("unary-", string)) return Operator.unaryMinus;
@@ -90,6 +92,8 @@
       return "*";
     case Operator.rightShift:
       return ">>";
+    case Operator.tripleShift:
+      return ">>>";
     case Operator.subtract:
       return "-";
     case Operator.truncatingDivide:
@@ -121,6 +125,7 @@
     case Operator.modulo:
     case Operator.multiply:
     case Operator.rightShift:
+    case Operator.tripleShift:
     case Operator.subtract:
     case Operator.truncatingDivide:
       return 1;
diff --git a/pkg/front_end/lib/src/fasta/parser/forwarding_listener.dart b/pkg/front_end/lib/src/fasta/parser/forwarding_listener.dart
index 585a7b2..b63af14 100644
--- a/pkg/front_end/lib/src/fasta/parser/forwarding_listener.dart
+++ b/pkg/front_end/lib/src/fasta/parser/forwarding_listener.dart
@@ -224,6 +224,11 @@
   }
 
   @override
+  void beginThenControlFlow(Token token) {
+    listener?.beginThenControlFlow(token);
+  }
+
+  @override
   void beginIfStatement(Token token) {
     listener?.beginIfStatement(token);
   }
@@ -703,6 +708,20 @@
   }
 
   @override
+  void handleLiteralSetOrMap(
+    int count,
+    Token leftBrace,
+    Token constKeyword,
+    Token rightBrace,
+    // TODO(danrubel): hasSetEntry parameter exists for replicating existing
+    // behavior and will be removed once unified collection has been enabled
+    bool hasSetEntry,
+  ) {
+    listener?.handleLiteralSetOrMap(
+        count, leftBrace, constKeyword, rightBrace, hasSetEntry);
+  }
+
+  @override
   void endLiteralString(int interpolationCount, Token endToken) {
     listener?.endLiteralString(interpolationCount, endToken);
   }
@@ -1013,9 +1032,8 @@
   }
 
   @override
-  void handleLiteralSetOrMap(
-      int count, Token leftBrace, Token constKeyword, Token rightBrace) {
-    listener?.handleLiteralSetOrMap(count, leftBrace, constKeyword, rightBrace);
+  void handleErrorToken(ErrorToken token) {
+    listener?.handleErrorToken(token);
   }
 
   @override
@@ -1124,6 +1142,11 @@
   }
 
   @override
+  void handleLanguageVersion(Token commentToken, int major, int minor) {
+    listener?.handleLanguageVersion(commentToken, major, minor);
+  }
+
+  @override
   void handleLiteralBool(Token token) {
     listener?.handleLiteralBool(token);
   }
@@ -1145,23 +1168,11 @@
   }
 
   @override
-  void handleLiteralMap(
-      int count, Token beginToken, Token constKeyword, Token endToken) {
-    listener?.handleLiteralMap(count, beginToken, constKeyword, endToken);
-  }
-
-  @override
   void handleLiteralNull(Token token) {
     listener?.handleLiteralNull(token);
   }
 
   @override
-  void handleLiteralSet(
-      int count, Token beginToken, Token constKeyword, Token token) {
-    listener?.handleLiteralSet(count, beginToken, constKeyword, token);
-  }
-
-  @override
   void handleMixinHeader(Token mixinKeyword) {
     listener?.handleMixinHeader(mixinKeyword);
   }
@@ -1266,6 +1277,11 @@
   }
 
   @override
+  void handleNonNullAssertExpression(Token bang) {
+    listener?.handleNonNullAssertExpression(bang);
+  }
+
+  @override
   void handleNoName(Token token) {
     listener?.handleNoName(token);
   }
@@ -1450,6 +1466,11 @@
   }
 
   @override
+  void reportNonNullAssertExpressionNotEnabled(Token bang) {
+    listener?.reportNonNullAssertExpressionNotEnabled(bang);
+  }
+
+  @override
   set suppressParseErrors(bool value) {
     listener?.suppressParseErrors = value;
   }
diff --git a/pkg/front_end/lib/src/fasta/parser/identifier_context_impl.dart b/pkg/front_end/lib/src/fasta/parser/identifier_context_impl.dart
index c59f7ea..0dd6638 100644
--- a/pkg/front_end/lib/src/fasta/parser/identifier_context_impl.dart
+++ b/pkg/front_end/lib/src/fasta/parser/identifier_context_impl.dart
@@ -6,7 +6,7 @@
 
 import '../fasta_codes.dart' as fasta;
 
-import '../scanner/token_constants.dart' show IDENTIFIER_TOKEN;
+import '../scanner/token_constants.dart' show IDENTIFIER_TOKEN, STRING_TOKEN;
 
 import 'identifier_context.dart';
 
@@ -624,7 +624,8 @@
 
     // Recovery
     if (isOneOfOrEof(identifier, const [';', '=', ',', '{', '}']) ||
-        looksLikeStatementStart(identifier)) {
+        looksLikeStatementStart(identifier) ||
+        identifier.kind == STRING_TOKEN) {
       identifier = parser.insertSyntheticIdentifier(token, this,
           message: fasta.templateExpectedIdentifier.withArguments(identifier));
     } else {
diff --git a/pkg/front_end/lib/src/fasta/parser/listener.dart b/pkg/front_end/lib/src/fasta/parser/listener.dart
index 86036d3..9cc581a 100644
--- a/pkg/front_end/lib/src/fasta/parser/listener.dart
+++ b/pkg/front_end/lib/src/fasta/parser/listener.dart
@@ -6,10 +6,12 @@
 
 import '../../scanner/token.dart' show Token;
 
-import '../fasta_codes.dart' show Message, templateUnexpectedToken;
+import '../fasta_codes.dart' show Message, templateExperimentNotEnabled;
 
 import '../quote.dart' show UnescapeErrorListener;
 
+import '../scanner/error_token.dart' show ErrorToken;
+
 import 'assert.dart' show Assert;
 
 import 'formal_parameter_kind.dart' show FormalParameterKind;
@@ -947,18 +949,31 @@
     logEvent("Type");
   }
 
+  /// Called when parser encounters a '!'
+  /// used as a non-null postfix assertion in an expression.
+  void handleNonNullAssertExpression(Token bang) {
+    logEvent("NonNullAssertExpression");
+  }
+
   // TODO(danrubel): Remove this once all listeners have been updated
   // to properly handle nullable types
   void reportErrorIfNullableType(Token questionMark) {
     if (questionMark != null) {
       assert(optional('?', questionMark));
       handleRecoverableError(
-          templateUnexpectedToken.withArguments(questionMark),
+          templateExperimentNotEnabled.withArguments('non-nullable'),
           questionMark,
           questionMark);
     }
   }
 
+  // TODO(danrubel): Remove this once all listeners have been updated
+  // to properly handle non-null assert expressions
+  void reportNonNullAssertExpressionNotEnabled(Token bang) {
+    handleRecoverableError(
+        templateExperimentNotEnabled.withArguments('non-nullable'), bang, bang);
+  }
+
   void handleNoName(Token token) {
     logEvent("NoName");
   }
@@ -1100,9 +1115,15 @@
   /// Called before parsing an `if` control flow list, set, or map entry.
   void beginIfControlFlow(Token ifToken) {}
 
+  /// Called before parsing the `then` portion of an `if` control flow list,
+  /// set, or map entry.
+  void beginThenControlFlow(Token token) {}
+
   /// Called before parsing the `else` portion of an `if` control flow list,
   /// set, or map entry.
-  void handleElseControlFlow(Token elseToken) {}
+  void handleElseControlFlow(Token elseToken) {
+    logEvent("ElseControlFlow");
+  }
 
   /// Called after parsing an `if` control flow list, set, or map entry.
   /// Substructures:
@@ -1200,18 +1221,15 @@
     logEvent("LiteralList");
   }
 
-  void handleLiteralMap(
-      int count, Token leftBrace, Token constKeyword, Token rightBrace) {
-    logEvent("LiteralMap");
-  }
-
-  void handleLiteralSet(
-      int count, Token beginToken, Token constKeyword, Token token) {
-    logEvent("LiteralSet");
-  }
-
   void handleLiteralSetOrMap(
-      int count, Token leftBrace, Token constKeyword, Token rightBrace) {
+    int count,
+    Token leftBrace,
+    Token constKeyword,
+    Token rightBrace,
+    // TODO(danrubel): hasSetEntry parameter exists for replicating existing
+    // behavior and will be removed once unified collection has been enabled
+    bool hasSetEntry,
+  ) {
     logEvent('LiteralSetOrMap');
   }
 
@@ -1361,6 +1379,14 @@
   void handleRecoverableError(
       Message message, Token startToken, Token endToken) {}
 
+  /// The parser encountered an [ErrorToken] representing an error
+  /// from the scanner but recovered from it. By default, the error is reported
+  /// by calling [handleRecoverableError] with the message associated
+  /// with the error [token].
+  void handleErrorToken(ErrorToken token) {
+    handleRecoverableError(token.assertionMessage, token, token);
+  }
+
   @override
   void handleUnescapeError(
       Message message, Token location, int stringOffset, int length) {
@@ -1379,6 +1405,15 @@
     logEvent("Script");
   }
 
+  /// A language version comment was parsed of the form
+  /// // @dart = <major>.<minor>
+  ///
+  /// For more information, see
+  /// https://github.com/dart-lang/language/blob/master/accepted/future-releases/language-versioning/language-versioning.md#individual-library-language-version-override
+  void handleLanguageVersion(Token commentToken, int major, int minor) {
+    // TODO(danrubel): Update listeners to handle this
+  }
+
   /// A type has been just parsed, and the parser noticed that the next token
   /// has a type substitution comment /*=T*. So, the type that has been just
   /// parsed should be discarded, and a new type should be parsed instead.
diff --git a/pkg/front_end/lib/src/fasta/parser/literal_entry_info.dart b/pkg/front_end/lib/src/fasta/parser/literal_entry_info.dart
index 00bf0a1..c29fb9a 100644
--- a/pkg/front_end/lib/src/fasta/parser/literal_entry_info.dart
+++ b/pkg/front_end/lib/src/fasta/parser/literal_entry_info.dart
@@ -8,6 +8,10 @@
 import 'parser.dart';
 import 'util.dart';
 
+/// [simpleEntry] is the first step for parsing a literal entry
+/// without any control flow or spread collection operator.
+const LiteralEntryInfo simpleEntry = const LiteralEntryInfo(true, 0);
+
 /// [LiteralEntryInfo] represents steps for processing an entry
 /// in a literal list, map, or set. These steps will handle parsing
 /// both control flow and spreadable operators, and indicate
@@ -31,7 +35,11 @@
   /// or `false` if this object's [parse] method should be called.
   final bool hasEntry;
 
-  const LiteralEntryInfo(this.hasEntry);
+  /// Used for recovery, this indicates
+  /// +1 for an `if` condition and -1 for `else`.
+  final int ifConditionDelta;
+
+  const LiteralEntryInfo(this.hasEntry, this.ifConditionDelta);
 
   /// Parse the control flow and spread collection aspects of this entry.
   Token parse(Token token, Parser parser) {
diff --git a/pkg/front_end/lib/src/fasta/parser/literal_entry_info_impl.dart b/pkg/front_end/lib/src/fasta/parser/literal_entry_info_impl.dart
index 87bd6ad..f5e4b8b 100644
--- a/pkg/front_end/lib/src/fasta/parser/literal_entry_info_impl.dart
+++ b/pkg/front_end/lib/src/fasta/parser/literal_entry_info_impl.dart
@@ -11,10 +11,6 @@
 /// starting with `if` control flow.
 const LiteralEntryInfo ifCondition = const IfCondition();
 
-/// [simpleEntry] is the first step for parsing a literal entry
-/// without any control flow or spread collection operator.
-const LiteralEntryInfo simpleEntry = const LiteralEntryInfo(true);
-
 /// [spreadOperator] is the first step for parsing a literal entry
 /// preceded by a '...' spread operator.
 const LiteralEntryInfo spreadOperator = const SpreadOperator();
@@ -23,7 +19,7 @@
 class ForCondition extends LiteralEntryInfo {
   bool inStyle;
 
-  ForCondition() : super(false);
+  ForCondition() : super(false, 0);
 
   @override
   Token parse(Token token, Parser parser) {
@@ -100,7 +96,7 @@
 /// A step for parsing a literal list, set, or map entry
 /// as the "for" control flow's expression.
 class ForEntry extends LiteralEntryInfo {
-  const ForEntry() : super(true);
+  const ForEntry() : super(true, 0);
 
   @override
   LiteralEntryInfo computeNext(Token token) {
@@ -111,7 +107,7 @@
 /// A step for parsing a literal list, set, or map entry
 /// as the "for-in" control flow's expression.
 class ForInEntry extends LiteralEntryInfo {
-  const ForInEntry() : super(true);
+  const ForInEntry() : super(true, 0);
 
   @override
   LiteralEntryInfo computeNext(Token token) {
@@ -120,7 +116,7 @@
 }
 
 class ForComplete extends LiteralEntryInfo {
-  const ForComplete() : super(false);
+  const ForComplete() : super(false, 0);
 
   @override
   Token parse(Token token, Parser parser) {
@@ -130,7 +126,7 @@
 }
 
 class ForInComplete extends LiteralEntryInfo {
-  const ForInComplete() : super(false);
+  const ForInComplete() : super(false, 0);
 
   @override
   Token parse(Token token, Parser parser) {
@@ -141,14 +137,16 @@
 
 /// The first step when processing an `if` control flow collection entry.
 class IfCondition extends LiteralEntryInfo {
-  const IfCondition() : super(false);
+  const IfCondition() : super(false, 1);
 
   @override
   Token parse(Token token, Parser parser) {
     final ifToken = token.next;
     assert(optional('if', ifToken));
     parser.listener.beginIfControlFlow(ifToken);
-    return parser.ensureParenthesizedCondition(ifToken);
+    Token result = parser.ensureParenthesizedCondition(ifToken);
+    parser.listener.beginThenControlFlow(result);
+    return result;
   }
 
   @override
@@ -178,14 +176,14 @@
 /// A step for parsing a literal list, set, or map entry
 /// as the `if` control flow's then-expression.
 class IfEntry extends LiteralEntryInfo {
-  const IfEntry() : super(true);
+  const IfEntry() : super(true, 0);
 
   @override
   LiteralEntryInfo computeNext(Token token) => const IfComplete();
 }
 
 class IfComplete extends LiteralEntryInfo {
-  const IfComplete() : super(false);
+  const IfComplete() : super(false, 0);
 
   @override
   Token parse(Token token, Parser parser) {
@@ -203,7 +201,7 @@
 
 /// A step for parsing the `else` portion of an `if` control flow.
 class IfElse extends LiteralEntryInfo {
-  const IfElse() : super(false);
+  const IfElse() : super(false, -1);
 
   @override
   Token parse(Token token, Parser parser) {
@@ -239,7 +237,7 @@
 }
 
 class ElseEntry extends LiteralEntryInfo {
-  const ElseEntry() : super(true);
+  const ElseEntry() : super(true, 0);
 
   @override
   LiteralEntryInfo computeNext(Token token) {
@@ -248,7 +246,7 @@
 }
 
 class IfElseComplete extends LiteralEntryInfo {
-  const IfElseComplete() : super(false);
+  const IfElseComplete() : super(false, 0);
 
   @override
   Token parse(Token token, Parser parser) {
@@ -259,7 +257,7 @@
 
 /// The first step when processing a spread entry.
 class SpreadOperator extends LiteralEntryInfo {
-  const SpreadOperator() : super(false);
+  const SpreadOperator() : super(false, 0);
 
   @override
   Token parse(Token token, Parser parser) {
@@ -275,7 +273,7 @@
   LiteralEntryInfo nestedStep;
   final LiteralEntryInfo lastStep;
 
-  Nested(this.nestedStep, this.lastStep) : super(false);
+  Nested(this.nestedStep, this.lastStep) : super(false, 0);
 
   @override
   bool get hasEntry => nestedStep.hasEntry;
diff --git a/pkg/front_end/lib/src/fasta/parser/modifier_context.dart b/pkg/front_end/lib/src/fasta/parser/modifier_context.dart
index 83d9a8d..3a5c8d1 100644
--- a/pkg/front_end/lib/src/fasta/parser/modifier_context.dart
+++ b/pkg/front_end/lib/src/fasta/parser/modifier_context.dart
@@ -240,7 +240,8 @@
       varFinalOrConst = constToken = next;
 
       if (afterFactory) {
-        parser.reportRecoverableError(next, fasta.messageConstAfterFactory);
+        parser.reportRecoverableError(next,
+            fasta.templateModifierOutOfOrder.withArguments('const', 'factory'));
       }
       return next;
     }
diff --git a/pkg/front_end/lib/src/fasta/parser/parser.dart b/pkg/front_end/lib/src/fasta/parser/parser.dart
index 0baa173..4a616ac 100644
--- a/pkg/front_end/lib/src/fasta/parser/parser.dart
+++ b/pkg/front_end/lib/src/fasta/parser/parser.dart
@@ -10,11 +10,14 @@
 
 import '../scanner.dart' show ErrorToken, Token;
 
+import '../scanner/characters.dart' show $0, $9, $SPACE;
+
 import '../../scanner/token.dart'
     show
         ASSIGNMENT_PRECEDENCE,
         BeginToken,
         CASCADE_PRECEDENCE,
+        CommentToken,
         EQUALITY_PRECEDENCE,
         Keyword,
         POSTFIX_PRECEDENCE,
@@ -69,7 +72,11 @@
 import 'listener.dart' show Listener;
 
 import 'literal_entry_info.dart'
-    show computeLiteralEntry, LiteralEntryInfo, looksLikeLiteralEntry;
+    show
+        LiteralEntryInfo,
+        computeLiteralEntry,
+        looksLikeLiteralEntry,
+        simpleEntry;
 
 import 'loop_state.dart' show LoopState;
 
@@ -253,11 +260,6 @@
 /// doesn't matter how we got there, only that we've identified that it's
 /// easier if the parser reports as many errors it can, but informs the
 /// listener if the error is recoverable or not.
-///
-/// Currently, the parser is particularly lax when it comes to the order of
-/// modifiers such as `abstract`, `final`, `static`, etc. Historically, dart2js
-/// would handle such errors in later phases. We hope that these cases will go
-/// away as Fasta matures.
 class Parser {
   Listener listener;
 
@@ -265,10 +267,6 @@
 
   bool mayParseFunctionExpressions = true;
 
-  /// Experimental flag for enabling set literal support.
-  /// See https://github.com/dart-lang/sdk/issues/35121
-  bool enableSetLiterals = true;
-
   /// Represents parser state: what asynchronous syntax is allowed in the
   /// function being currently parsed. In rare situations, this can be set by
   /// external clients, for example, to parse an expression outside a function.
@@ -343,6 +341,7 @@
       directiveState?.checkScriptTag(this, token.next);
       token = parseScript(token);
     }
+    parseLanguageVersionOpt(token);
     while (!token.next.isEof) {
       final Token start = token.next;
       token = parseTopLevelDeclarationImpl(token, directiveState);
@@ -369,6 +368,74 @@
     return token;
   }
 
+  /// Parse the optional language version comment as specified in
+  /// https://github.com/dart-lang/language/blob/master/accepted/future-releases/language-versioning/language-versioning.md#individual-library-language-version-override
+  void parseLanguageVersionOpt(Token token) {
+    // TODO(danrubel): Handle @dart version multi-line comments and dartdoc
+    // or update the spec to exclude them.
+    token = token.next.precedingComments;
+    while (token is CommentToken) {
+      if (parseLanguageVersionText(token)) {
+        break;
+      }
+      token = token.next;
+    }
+  }
+
+  bool parseLanguageVersionText(CommentToken token) {
+    String text = token.lexeme;
+    if (text == null || !text.startsWith('//')) {
+      return false;
+    }
+    int index = _skipSpaces(text, 2);
+    if (!text.startsWith('@dart', index)) {
+      return false;
+    }
+    index = _skipSpaces(text, index + 5);
+    if (!text.startsWith('=', index)) {
+      return false;
+    }
+    int start = index = _skipSpaces(text, index + 1);
+    index = _skipDigits(text, start);
+    if (start == index) {
+      return false;
+    }
+    int major = int.parse(text.substring(start, index));
+    if (!text.startsWith('.', index)) {
+      return false;
+    }
+    start = index + 1;
+    index = _skipDigits(text, start);
+    if (start == index) {
+      return false;
+    }
+    int minor = int.parse(text.substring(start, index));
+    index = _skipSpaces(text, index);
+    if (index != text.length) {
+      return false;
+    }
+    listener.handleLanguageVersion(token, major, minor);
+    return true;
+  }
+
+  int _skipSpaces(String text, int index) {
+    while (index < text.length && text.codeUnitAt(index) == $SPACE) {
+      ++index;
+    }
+    return index;
+  }
+
+  int _skipDigits(String text, int index) {
+    while (index < text.length) {
+      int code = text.codeUnitAt(index);
+      if (code < $0 || code > $9) {
+        break;
+      }
+      ++index;
+    }
+    return index;
+  }
+
   /// This method exists for analyzer compatibility only
   /// and will be removed once analyzer/fasta integration is complete.
   ///
@@ -2415,10 +2482,50 @@
     int count = 0;
     bool old = mayParseFunctionExpressions;
     mayParseFunctionExpressions = false;
-    do {
-      token = parseInitializer(token.next);
+    Token next = begin;
+    while (true) {
+      token = parseInitializer(next);
       ++count;
-    } while (optional(',', token.next));
+      next = token.next;
+      if (!optional(',', next)) {
+        if (!next.isKeywordOrIdentifier) {
+          break;
+        }
+        // Recovery: Found an identifier which could be
+        // 1) missing preceding `,` thus it's another initializer, or
+        // 2) missing preceding `;` thus it's a class member, or
+        // 3) missing preceding '{' thus it's a statement
+        if (optional('assert', next)) {
+          next = next.next;
+          if (!optional('(', next)) {
+            break;
+          }
+          // Looks like assert expression ... fall through to insert comma
+        } else {
+          if (optional('this', next)) {
+            next = next.next;
+            if (!optional('.', next)) {
+              break;
+            }
+            next = next.next;
+            if (!next.isKeywordOrIdentifier) {
+              break;
+            }
+          }
+          next = next.next;
+          if (!optional('=', next)) {
+            break;
+          }
+          // Looks like field assignment... fall through to insert comma
+        }
+        // TODO(danrubel): Consider enhancing this to indicate that we are
+        // expecting one of `,` or `;` or `{`
+        reportRecoverableError(
+            token, fasta.templateExpectedAfterButGot.withArguments(','));
+        next = rewriter.insertToken(
+            token, new SyntheticToken(TokenType.COMMA, token.next.charOffset));
+      }
+    }
     mayParseFunctionExpressions = old;
     listener.endInitializers(count, begin, token.next);
     return token;
@@ -2842,6 +2949,9 @@
       } else if (identical(value, 'factory')) {
         Token next2 = next.next;
         if (next2.isIdentifier || next2.isModifier) {
+          if (beforeType != token) {
+            reportRecoverableError(token, fasta.messageTypeBeforeFactory);
+          }
           token = parseFactoryMethod(token, beforeStart, externalToken,
               staticToken ?? covariantToken, varFinalOrConst);
           listener.endMember();
@@ -3357,9 +3467,11 @@
     } else if (optional('=>', next)) {
       return parseExpressionFunctionBody(next, ofFunctionExpression);
     } else if (optional('=', next)) {
-      Token begin = next;
       // Recover from a bad factory method.
       reportRecoverableError(next, fasta.messageExpectedBody);
+      next = rewriter.insertToken(
+          next, new SyntheticToken(TokenType.FUNCTION, next.next.charOffset));
+      Token begin = next;
       token = parseExpression(next);
       if (!ofFunctionExpression) {
         token = ensureSemicolon(token);
@@ -3568,7 +3680,16 @@
       throw "Internal error: Unknown asyncState: '$asyncState'.";
     } else if (identical(value, 'const')) {
       return parseExpressionStatementOrConstDeclaration(token);
-    } else if (!inPlainSync && identical(value, 'await')) {
+    } else if (identical(value, 'await')) {
+      if (inPlainSync) {
+        if (!looksLikeAwaitExpression(token)) {
+          return parseExpressionStatementOrDeclaration(token);
+        }
+        // Recovery: looks like an expression preceded by `await`
+        // but not inside an async context.
+        // Fall through to parseExpressionStatement
+        // and parseAwaitExpression will report the error.
+      }
       return parseExpressionStatement(token);
     } else if (identical(value, 'set') && token.next.next.isIdentifier) {
       // Recovery: invalid use of `set`
@@ -3748,7 +3869,7 @@
     }
     Token next = token.next;
     TokenType type = next.type;
-    int tokenLevel = type.precedence;
+    int tokenLevel = _computePrecedence(type);
     for (int level = tokenLevel; level >= precedence; --level) {
       int lastBinaryExpressionLevel = -1;
       while (identical(tokenLevel, level)) {
@@ -3771,6 +3892,9 @@
               (identical(type, TokenType.MINUS_MINUS))) {
             listener.handleUnaryPostfixAssignmentExpression(token.next);
             token = next;
+          } else if (identical(type, TokenType.BANG)) {
+            listener.handleNonNullAssertExpression(token.next);
+            token = next;
           }
         } else if (identical(tokenLevel, SELECTOR_PRECEDENCE)) {
           if (identical(type, TokenType.PERIOD) ||
@@ -3826,12 +3950,22 @@
         }
         next = token.next;
         type = next.type;
-        tokenLevel = type.precedence;
+        tokenLevel = _computePrecedence(type);
       }
     }
     return token;
   }
 
+  int _computePrecedence(TokenType type) {
+    if (identical(type, TokenType.BANG)) {
+      // The '!' has prefix precedence but here it's being used as a
+      // postfix operator to assert the expression has a non-null value.
+      return POSTFIX_PRECEDENCE;
+    } else {
+      return type.precedence;
+    }
+  }
+
   Token parseCascadeExpression(Token token) {
     Token cascadeOperator = token = token.next;
     assert(optional('..', cascadeOperator));
@@ -3877,10 +4011,13 @@
     // Prefix:
     if (identical(value, 'await')) {
       if (inPlainSync) {
-        return parsePrimary(token, IdentifierContext.expression);
-      } else {
-        return parseAwaitExpression(token, allowCascades);
+        if (!looksLikeAwaitExpression(token)) {
+          return parsePrimary(token, IdentifierContext.expression);
+        }
+        // Recovery: Looks like an expression preceded by `await`.
+        // Fall through and let parseAwaitExpression report the error.
       }
+      return parseAwaitExpression(token, allowCascades);
     } else if (identical(value, '+')) {
       // Dart no longer allows prefix-plus.
       rewriteAndRecover(
@@ -4038,7 +4175,7 @@
       listener.handleNoTypeArguments(token.next);
       return parseLiteralSetOrMapSuffix(token, null);
     } else if (kind == LT_TOKEN) {
-      return parseLiteralListOrMapOrFunction(token, null);
+      return parseLiteralListSetMapOrFunction(token, null);
     } else {
       // Fall through to the recovery code.
     }
@@ -4189,7 +4326,17 @@
         token = next;
         break;
       }
-      token = parseListOrSetLiteralEntry(token);
+      int ifCount = 0;
+      LiteralEntryInfo info = computeLiteralEntry(token);
+      while (info != null) {
+        if (info.hasEntry) {
+          token = parseExpression(token);
+        } else {
+          token = info.parse(token, this);
+        }
+        ifCount += info.ifConditionDelta;
+        info = info.computeNext(token);
+      }
       next = token.next;
       ++count;
       if (!optional(',', next)) {
@@ -4214,10 +4361,11 @@
         }
         // This looks like the start of an expression.
         // Report an error, insert the comma, and continue parsing.
-        next = rewriteAndRecover(
-            token,
-            fasta.templateExpectedButGot.withArguments(','),
-            new SyntheticToken(TokenType.COMMA, next.offset));
+        var comma = new SyntheticToken(TokenType.COMMA, next.offset);
+        var message = ifCount > 0
+            ? fasta.messageExpectedElseOrComma
+            : fasta.templateExpectedButGot.withArguments(',');
+        next = rewriteAndRecover(token, message, comma);
       }
       token = next;
     }
@@ -4226,76 +4374,65 @@
     return token;
   }
 
-  Token parseListOrSetLiteralEntry(Token token) {
-    LiteralEntryInfo info = computeLiteralEntry(token);
-    while (info != null) {
-      if (info.hasEntry) {
-        token = parseExpression(token);
-      } else {
-        token = info.parse(token, this);
-      }
-      info = info.computeNext(token);
-    }
-    return token;
-  }
-
   /// This method parses the portion of a set or map literal that starts with
   /// the left curly brace when there are no leading type arguments.
   Token parseLiteralSetOrMapSuffix(Token token, Token constKeyword) {
-    if (!enableSetLiterals) {
-      // TODO(danrubel): remove this once set literals are permanent
-      return parseLiteralMapSuffix(token, constKeyword);
-    }
-
     Token leftBrace = token = token.next;
     assert(optional('{', leftBrace));
     Token next = token.next;
     if (optional('}', next)) {
-      listener.handleLiteralSetOrMap(0, leftBrace, constKeyword, next);
+      listener.handleLiteralSetOrMap(0, leftBrace, constKeyword, next, false);
       return next;
     }
 
     final old = mayParseFunctionExpressions;
     mayParseFunctionExpressions = true;
     int count = 0;
-    bool isMap;
+    // TODO(danrubel): hasSetEntry parameter exists for replicating existing
+    // behavior and will be removed once unified collection has been enabled
+    bool hasSetEntry;
 
-    // Parse entries until we determine it's a map, or set, or no more entries
     while (true) {
+      int ifCount = 0;
       LiteralEntryInfo info = computeLiteralEntry(token);
-      while (info != null) {
-        if (info.hasEntry) {
-          token = parseExpression(token);
-          if (isMap == null) {
-            isMap = optional(':', token.next);
-          }
-          if (isMap) {
-            Token colon = ensureColon(token);
-            token = parseExpression(colon);
-            listener.handleLiteralMapEntry(colon, token.next);
-          }
-        } else {
-          token = info.parse(token, this);
+      if (info == simpleEntry) {
+        // TODO(danrubel): Remove this section and use the while loop below
+        // once hasSetEntry is no longer needed.
+        token = parseExpression(token);
+        var isMapEntry = optional(':', token.next);
+        hasSetEntry ??= !isMapEntry;
+        if (isMapEntry) {
+          Token colon = token.next;
+          token = parseExpression(colon);
+          listener.handleLiteralMapEntry(colon, token.next);
         }
-        info = info.computeNext(token);
+      } else {
+        while (info != null) {
+          if (info.hasEntry) {
+            token = parseExpression(token);
+            if (optional(':', token.next)) {
+              Token colon = token.next;
+              token = parseExpression(colon);
+              listener.handleLiteralMapEntry(colon, token.next);
+            }
+          } else {
+            token = info.parse(token, this);
+          }
+          ifCount += info.ifConditionDelta;
+          info = info.computeNext(token);
+        }
       }
       ++count;
       next = token.next;
 
-      if (isMap != null) {
-        mayParseFunctionExpressions = old;
-        return isMap
-            ? parseLiteralMapRest(token, count, constKeyword, leftBrace)
-            : parseLiteralSetRest(token, count, constKeyword, leftBrace);
-      }
-
       Token comma;
       if (optional(',', next)) {
         comma = token = next;
         next = token.next;
       }
       if (optional('}', next)) {
-        listener.handleLiteralSetOrMap(count, leftBrace, constKeyword, next);
+        listener.handleLiteralSetOrMap(
+            count, leftBrace, constKeyword, next, hasSetEntry ?? false);
         mayParseFunctionExpressions = old;
         return next;
       }
@@ -4305,16 +4442,19 @@
         if (looksLikeLiteralEntry(next)) {
           // If this looks like the start of an expression,
           // then report an error, insert the comma, and continue parsing.
-          token = rewriteAndRecover(
-              token,
-              fasta.templateExpectedButGot.withArguments(','),
-              new SyntheticToken(TokenType.COMMA, next.offset));
+          // TODO(danrubel): Consider better error message
+          var comma = new SyntheticToken(TokenType.COMMA, next.offset);
+          var message = ifCount > 0
+              ? fasta.messageExpectedElseOrComma
+              : fasta.templateExpectedButGot.withArguments(',');
+          token = rewriteAndRecover(token, message, comma);
         } else {
           reportRecoverableError(
               next, fasta.templateExpectedButGot.withArguments('}'));
           // Scanner guarantees a closing curly bracket
           next = leftBrace.endGroup;
-          listener.handleLiteralSetOrMap(count, leftBrace, constKeyword, next);
+          listener.handleLiteralSetOrMap(
+              count, leftBrace, constKeyword, next, hasSetEntry ?? false);
           mayParseFunctionExpressions = old;
           return next;
         }
@@ -4322,153 +4462,6 @@
     }
   }
 
-  /// This method parses the portion of a map literal that starts with the left
-  /// curly brace.
-  ///
-  /// ```
-  /// mapLiteral:
-  ///   'const'? typeArguments? '{' mapLiteralEntry (',' mapLiteralEntry)* ','? '}'
-  /// ;
-  /// ```
-  ///
-  /// Provide a [constKeyword] if the literal is preceded by 'const', or `null`
-  /// if not. This is a suffix parser because it is assumed that type arguments
-  /// have been parsed, or `listener.handleNoTypeArguments` has been executed.
-  Token parseLiteralMapSuffix(Token token, Token constKeyword) {
-    Token beginToken = token = token.next;
-    assert(optional('{', beginToken));
-    if (optional('}', token.next)) {
-      token = token.next;
-      listener.handleLiteralMap(0, beginToken, constKeyword, token);
-      return token;
-    }
-
-    bool old = mayParseFunctionExpressions;
-    mayParseFunctionExpressions = true;
-    token = parseMapLiteralEntry(token);
-    mayParseFunctionExpressions = old;
-
-    return parseLiteralMapRest(token, 1, constKeyword, beginToken);
-  }
-
-  /// Parse a literal map after the first entry.
-  Token parseLiteralMapRest(
-      Token token, int count, Token constKeyword, Token beginToken) {
-    bool old = mayParseFunctionExpressions;
-    mayParseFunctionExpressions = true;
-    while (true) {
-      Token next = token.next;
-      Token comma;
-      if (optional(',', next)) {
-        comma = token = next;
-        next = token.next;
-      }
-      if (optional('}', next)) {
-        token = next;
-        break;
-      }
-      if (comma == null) {
-        // Recovery
-        if (looksLikeLiteralEntry(next)) {
-          // If this looks like the start of an expression,
-          // then report an error, insert the comma, and continue parsing.
-          token = rewriteAndRecover(
-              token,
-              fasta.templateExpectedButGot.withArguments(','),
-              new SyntheticToken(TokenType.COMMA, next.offset));
-        } else {
-          reportRecoverableError(
-              next, fasta.templateExpectedButGot.withArguments('}'));
-          // Scanner guarantees a closing curly bracket
-          token = beginToken.endGroup;
-          break;
-        }
-      }
-      token = parseMapLiteralEntry(token);
-      ++count;
-    }
-    assert(optional('}', token));
-    mayParseFunctionExpressions = old;
-    listener.handleLiteralMap(count, beginToken, constKeyword, token);
-    return token;
-  }
-
-  /// This method parses the portion of a set literal that starts with the left
-  /// curly brace.
-  ///
-  /// ```
-  /// setLiteral:
-  ///   'const'?  typeArguments? '{' expression (',' expression)* ','? '}'
-  /// ;
-  /// ```
-  ///
-  /// Provide a [constKeyword] if the literal is preceded by 'const', or `null`
-  /// if not. This is a suffix parser because it is assumed that type arguments
-  /// have been parsed, or `listener.handleNoTypeArguments` has been executed.
-  Token parseLiteralSetSuffix(Token token, Token constKeyword) {
-    if (!enableSetLiterals) {
-      // TODO(danrubel): remove this once set literals are permanent
-      return parseLiteralMapSuffix(token, constKeyword);
-    }
-
-    Token beginToken = token = token.next;
-    assert(optional('{', beginToken));
-    if (optional('}', token.next)) {
-      token = token.next;
-      listener.handleLiteralSet(0, beginToken, constKeyword, token);
-      return token;
-    }
-
-    bool old = mayParseFunctionExpressions;
-    mayParseFunctionExpressions = true;
-    token = parseListOrSetLiteralEntry(token);
-    mayParseFunctionExpressions = old;
-
-    return parseLiteralSetRest(token, 1, constKeyword, beginToken);
-  }
-
-  /// Parse a literal set after the first expression.
-  Token parseLiteralSetRest(
-      Token token, int count, Token constKeyword, Token beginToken) {
-    bool old = mayParseFunctionExpressions;
-    mayParseFunctionExpressions = true;
-    while (true) {
-      Token next = token.next;
-      Token comma;
-      if (optional(',', next)) {
-        comma = token = next;
-        next = token.next;
-      }
-      if (optional('}', next)) {
-        token = next;
-        break;
-      }
-      if (comma == null) {
-        // Recovery
-        if (looksLikeLiteralEntry(next)) {
-          // If this looks like the start of an expression,
-          // then report an error, insert the comma, and continue parsing.
-          token = rewriteAndRecover(
-              token,
-              fasta.templateExpectedButGot.withArguments(','),
-              new SyntheticToken(TokenType.COMMA, next.offset));
-        } else {
-          reportRecoverableError(
-              next, fasta.templateExpectedButGot.withArguments('}'));
-          // Scanner guarantees a closing curly bracket
-          token = beginToken.endGroup;
-          break;
-        }
-      }
-      token = parseListOrSetLiteralEntry(token);
-      ++count;
-    }
-    assert(optional('}', token));
-    mayParseFunctionExpressions = old;
-    listener.handleLiteralSet(count, beginToken, constKeyword, token);
-    return token;
-  }
-
   /// formalParameterList functionBody.
   ///
   /// This is a suffix parser because it is assumed that type arguments have
@@ -4496,7 +4489,8 @@
   ///   genericFunctionLiteral ::=
   ///       typeParameters formalParameterList functionBody
   /// Provide token for [constKeyword] if preceded by 'const', null if not.
-  Token parseLiteralListOrMapOrFunction(final Token start, Token constKeyword) {
+  Token parseLiteralListSetMapOrFunction(
+      final Token start, Token constKeyword) {
     assert(optional('<', start.next));
     TypeParamOrArgInfo typeParamOrArg = computeTypeParamOrArg(start, true);
     Token token = typeParamOrArg.skip(start);
@@ -4511,16 +4505,14 @@
     }
     token = typeParamOrArg.parseArguments(start, this);
     if (optional('{', next)) {
-      switch (typeParamOrArg.typeArgumentCount) {
-        case 0:
-          return parseLiteralSetOrMapSuffix(token, constKeyword);
-        case 1:
-          return parseLiteralSetSuffix(token, constKeyword);
-        case 2:
-          return parseLiteralMapSuffix(token, constKeyword);
-        default:
-          return parseLiteralSetOrMapSuffix(token, constKeyword);
+      if (typeParamOrArg.typeArgumentCount > 2) {
+        // TODO(danrubel): remove code in listeners which report this error
+        listener.handleRecoverableError(
+            fasta.messageSetOrMapLiteralTooManyTypeArguments,
+            start.next,
+            token);
       }
+      return parseLiteralSetOrMapSuffix(token, constKeyword);
     }
     if (!optional('[', next) && !optional('[]', next)) {
       // TODO(danrubel): Improve this error message.
@@ -4674,7 +4666,7 @@
     }
     if (identical(value, '<')) {
       listener.beginConstLiteral(next);
-      token = parseLiteralListOrMapOrFunction(token, constKeyword);
+      token = parseLiteralListSetMapOrFunction(token, constKeyword);
       listener.endConstLiteral(token.next);
       return token;
     }
@@ -5606,6 +5598,31 @@
     return token;
   }
 
+  /// Determine if the following tokens look like an 'await' expression
+  /// and not a local variable or local function declaration.
+  bool looksLikeAwaitExpression(Token token) {
+    token = token.next;
+    assert(optional('await', token));
+    token = token.next;
+
+    // TODO(danrubel): Consider parsing the potential expression following
+    // the `await` token once doing so does not modify the token stream.
+    // For now, use simple look ahead and ensure no false positives.
+
+    if (token.isIdentifier) {
+      token = token.next;
+      if (optional('(', token)) {
+        token = token.endGroup.next;
+        if (isOneOf(token, [';', '.', '..', '?', '?.'])) {
+          return true;
+        }
+      } else if (isOneOf(token, ['.', ')', ']'])) {
+        return true;
+      }
+    }
+    return false;
+  }
+
   /// ```
   /// awaitExpression:
   ///   'await' unaryExpression
@@ -6240,7 +6257,7 @@
   }
 
   void reportErrorToken(ErrorToken token) {
-    listener.handleRecoverableError(token.assertionMessage, token, token);
+    listener.handleErrorToken(token);
   }
 
   Token parseInvalidTopLevelDeclaration(Token token) {
diff --git a/pkg/front_end/lib/src/fasta/parser/type_info.dart b/pkg/front_end/lib/src/fasta/parser/type_info.dart
index 8214825..cf59846 100644
--- a/pkg/front_end/lib/src/fasta/parser/type_info.dart
+++ b/pkg/front_end/lib/src/fasta/parser/type_info.dart
@@ -34,26 +34,26 @@
   /// This function will call the appropriate event methods on the [Parser]'s
   /// listener to handle the type, inserting a synthetic type reference if
   /// necessary. This may modify the token stream when parsing `>>` or `>>>`
-  /// in valid code or during recovery.
+  /// or `>>>=` in valid code or during recovery.
   Token ensureTypeNotVoid(Token token, Parser parser);
 
   /// Call this function when the token after [token] must be a type or void.
   /// This function will call the appropriate event methods on the [Parser]'s
   /// listener to handle the type, inserting a synthetic type reference if
   /// necessary. This may modify the token stream when parsing `>>` or `>>>`
-  /// in valid code or during recovery.
+  /// or `>>>=` in valid code or during recovery.
   Token ensureTypeOrVoid(Token token, Parser parser);
 
   /// Call this function to parse an optional type (not void) after [token].
   /// This function will call the appropriate event methods on the [Parser]'s
   /// listener to handle the type. This may modify the token stream
-  /// when parsing `>>` or `>>>` in valid code or during recovery.
+  /// when parsing `>>` or `>>>` or `>>>=`  in valid code or during recovery.
   Token parseTypeNotVoid(Token token, Parser parser);
 
   /// Call this function to parse an optional type or void after [token].
   /// This function will call the appropriate event methods on the [Parser]'s
   /// listener to handle the type. This may modify the token stream
-  /// when parsing `>>` or `>>>` in valid code or during recovery.
+  /// when parsing `>>` or `>>>` or `>>>=` in valid code or during recovery.
   Token parseType(Token token, Parser parser);
 
   /// Call this function with the [token] before the type to obtain
@@ -83,14 +83,14 @@
   /// Call this function to parse optional type arguments after [token].
   /// This function will call the appropriate event methods on the [Parser]'s
   /// listener to handle the arguments. This may modify the token stream
-  /// when parsing `>>` or `>>>` in valid code or during recovery.
+  /// when parsing `>>` or `>>>` or `>>>=` in valid code or during recovery.
   Token parseArguments(Token token, Parser parser);
 
   /// Call this function to parse optional type parameters
   /// (also known as type variables) after [token].
   /// This function will call the appropriate event methods on the [Parser]'s
   /// listener to handle the parameters. This may modify the token stream
-  /// when parsing `>>` or `>>>` in valid code or during recovery.
+  /// when parsing `>>` or `>>>` or `>>>=` in valid code or during recovery.
   Token parseVariables(Token token, Parser parser);
 
   /// Call this function with the [token] before the type var to obtain
diff --git a/pkg/front_end/lib/src/fasta/parser/type_info_impl.dart b/pkg/front_end/lib/src/fasta/parser/type_info_impl.dart
index 6d670a1..b6d698e 100644
--- a/pkg/front_end/lib/src/fasta/parser/type_info_impl.dart
+++ b/pkg/front_end/lib/src/fasta/parser/type_info_impl.dart
@@ -31,6 +31,7 @@
         splitGtEq,
         splitGtFromGtGtEq,
         splitGtFromGtGtGt,
+        splitGtFromGtGtGtEq,
         splitGtGt,
         syntheticGt;
 
@@ -1163,17 +1164,18 @@
   }
 }
 
-/// Return `true` if [token] is one of `>`, `>>`, `>=`, `>>>`, or `>>=`.
+/// Return `true` if [token] is one of `>`, `>>`, `>>>`, `>=`, `>>=`, or `>>>=`.
 bool isCloser(Token token) {
   final value = token.stringValue;
   return identical(value, '>') ||
       identical(value, '>>') ||
       identical(value, '>=') ||
       identical(value, '>>>') ||
-      identical(value, '>>=');
+      identical(value, '>>=') ||
+      identical(value, '>>>=');
 }
 
-/// If [beforeCloser].next is one of `>`, `>>`, `>=`, `>>>`, or `>>=`,
+/// If [beforeCloser].next is one of `>`, `>>`, `>>>`, `>=`, `>>=`, or `>>>=`
 /// then update the token stream and return `true`.
 bool parseCloser(Token beforeCloser) {
   Token unsplit = beforeCloser.next;
@@ -1189,8 +1191,8 @@
 }
 
 /// If [closer] is `>` then return it.
-/// If [closer] is one of `>>`, `>=`, `>>>`, or `>>=` then split then token
-/// and return the leading `>` without updating the token stream.
+/// If [closer] is one of `>>`, `>>>`, `>=`, `>>=`,  or `>>>=` then split
+/// the token and return the leading `>` without updating the token stream.
 /// If [closer] is none of the above, then return null;
 Token splitCloser(Token closer) {
   String value = closer.stringValue;
@@ -1204,6 +1206,8 @@
     return splitGtFromGtGtGt(closer);
   } else if (identical(value, '>>=')) {
     return splitGtFromGtGtEq(closer);
+  } else if (identical(value, '>>>=')) {
+    return splitGtFromGtGtGtEq(closer);
   }
   return null;
 }
diff --git a/pkg/front_end/lib/src/fasta/parser/util.dart b/pkg/front_end/lib/src/fasta/parser/util.dart
index e02385f..2e7b441 100644
--- a/pkg/front_end/lib/src/fasta/parser/util.dart
+++ b/pkg/front_end/lib/src/fasta/parser/util.dart
@@ -190,6 +190,18 @@
       ..next = token.next);
 }
 
+/// Split `>>>=` into two separate tokens... `>` followed by `>>=`.
+/// Call [Token.setNext] to add the token to the stream.
+Token splitGtFromGtGtGtEq(Token token) {
+  assert(optional('>>>=', token));
+  return new SimpleToken(
+      TokenType.GT, token.charOffset, token.precedingComments)
+    ..setNext(new SimpleToken(TokenType.GT_GT_EQ, token.charOffset + 1)
+      // Set next rather than calling Token.setNext
+      // so that the previous token is not set.
+      ..next = token.next);
+}
+
 /// Return a synthetic `<` followed by [next].
 /// Call [Token.setNext] to add the token to the stream.
 Token syntheticGt(Token next) {
diff --git a/pkg/front_end/lib/src/fasta/quote.dart b/pkg/front_end/lib/src/fasta/quote.dart
index 682419f..c145b5c 100644
--- a/pkg/front_end/lib/src/fasta/quote.dart
+++ b/pkg/front_end/lib/src/fasta/quote.dart
@@ -127,10 +127,10 @@
       location, listener);
 }
 
-String unescapeLastStringPart(
-    String last, Quote quote, Object location, UnescapeErrorListener listener) {
-  return unescape(last.substring(0, last.length - lastQuoteLength(quote)),
-      quote, location, listener);
+String unescapeLastStringPart(String last, Quote quote, Object location,
+    bool isLastQuoteSynthetic, UnescapeErrorListener listener) {
+  int end = last.length - (isLastQuoteSynthetic ? 0 : lastQuoteLength(quote));
+  return unescape(last.substring(0, end), quote, location, listener);
 }
 
 String unescapeString(
diff --git a/pkg/front_end/tool/_fasta/resolve_input_uri.dart b/pkg/front_end/lib/src/fasta/resolve_input_uri.dart
similarity index 100%
rename from pkg/front_end/tool/_fasta/resolve_input_uri.dart
rename to pkg/front_end/lib/src/fasta/resolve_input_uri.dart
diff --git a/pkg/front_end/lib/src/fasta/rewrite_severity.dart b/pkg/front_end/lib/src/fasta/rewrite_severity.dart
index 5d521bb..40f5b8c 100644
--- a/pkg/front_end/lib/src/fasta/rewrite_severity.dart
+++ b/pkg/front_end/lib/src/fasta/rewrite_severity.dart
@@ -9,20 +9,6 @@
 Severity rewriteSeverity(
     Severity severity, msg.Code<Object> code, Uri fileUri) {
   if (severity != Severity.ignored) {
-    if (code == msg.codeFinalFieldNotInitialized) {
-      // TODO(johnniwinther): Use external getters instead of final fields.
-      // See https://github.com/dart-lang/sdk/issues/33762
-      for (String path in [
-        "/pkg/dev_compiler/tool/input_sdk/private/js_string.dart",
-        "/sdk/lib/html/dart2js/html_dart2js.dart",
-        "/sdk/lib/svg/dart2js/svg_dart2js.dart",
-        "/sdk/lib/_internal/js_runtime/lib/native_typed_data.dart"
-      ]) {
-        if (fileUri.path.endsWith(path)) {
-          return Severity.ignored;
-        }
-      }
-    }
     return severity;
   }
 
diff --git a/pkg/front_end/lib/src/fasta/scanner.dart b/pkg/front_end/lib/src/fasta/scanner.dart
index f276eda..8f8e495 100644
--- a/pkg/front_end/lib/src/fasta/scanner.dart
+++ b/pkg/front_end/lib/src/fasta/scanner.dart
@@ -6,8 +6,6 @@
 
 import 'dart:convert' show unicodeReplacementCharacterRune, utf8;
 
-import 'fasta_codes.dart' show LocatedMessage;
-
 import '../scanner/token.dart' show Token;
 
 import 'scanner/string_scanner.dart' show StringScanner;
@@ -41,14 +39,6 @@
 typedef Token Recover(List<int> bytes, Token tokens, List<int> lineStarts);
 
 abstract class Scanner {
-  /// A list of errors that occured during [tokenize] or `null` if none.
-  List<LocatedMessage> errors;
-
-  /// Set true if errors should be reported via the [errors] list.
-  // TODO(danrubel): Remove this once all scanner clients can process
-  // errors reported via the [errors] list.
-  bool reportErrors;
-
   /// Returns true if an error occured during [tokenize].
   bool get hasErrors;
 
@@ -62,10 +52,7 @@
   final List<int> lineStarts;
   final bool hasErrors;
 
-  /// Returns a list of errors that occured during [tokenize] or `null` if none.
-  final List<LocatedMessage> errors;
-
-  ScannerResult(this.tokens, this.lineStarts, this.hasErrors, this.errors);
+  ScannerResult(this.tokens, this.lineStarts, this.hasErrors);
 }
 
 /// Scan/tokenize the given UTF8 [bytes].
@@ -84,6 +71,7 @@
 /// If [recover] is null, then the [defaultRecoveryStrategy] is used.
 ScannerResult scanString(String source,
     {bool enableGtGtGt: false,
+    bool enableGtGtGtEq: false,
     bool includeComments: false,
     bool scanLazyAssignmentOperators: false,
     Recover recover}) {
@@ -93,6 +81,7 @@
   StringScanner scanner =
       new StringScanner(source, includeComments: includeComments);
   scanner.enableGtGtGt = enableGtGtGt;
+  scanner.enableGtGtGtEq = enableGtGtGtEq;
   return _tokenizeAndRecover(scanner, recover, source: source);
 }
 
@@ -104,6 +93,5 @@
     recover ??= defaultRecoveryStrategy;
     tokens = recover(bytes, tokens, scanner.lineStarts);
   }
-  return new ScannerResult(
-      tokens, scanner.lineStarts, scanner.hasErrors, scanner.errors);
+  return new ScannerResult(tokens, scanner.lineStarts, scanner.hasErrors);
 }
diff --git a/pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart b/pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart
index 3377316..ddbf88a 100644
--- a/pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart
+++ b/pkg/front_end/lib/src/fasta/scanner/abstract_scanner.dart
@@ -16,8 +16,7 @@
         messageExpectedHexDigit,
         messageMissingExponent,
         messageUnexpectedDollarInString,
-        messageUnterminatedComment,
-        templateUnterminatedString;
+        messageUnterminatedComment;
 
 import '../scanner.dart'
     show ErrorToken, Keyword, Scanner, buildUnexpectedCharacterToken;
@@ -44,11 +43,16 @@
 
   final bool includeComments;
 
-  /// Experimental flag for enabling parsing of `>>>`.
+  /// Experimental flag for enabling scanning of `>>>`.
   /// See https://github.com/dart-lang/language/issues/61
   /// and https://github.com/dart-lang/language/issues/60
   bool enableGtGtGt = false;
 
+  /// Experimental flag for enabling scanning of `>>>=`.
+  /// See https://github.com/dart-lang/language/issues/61
+  /// and https://github.com/dart-lang/language/issues/60
+  bool enableGtGtGtEq = false;
+
   /**
    * The string offset for the next token that will be created.
    *
@@ -643,7 +647,7 @@
   }
 
   int tokenizeGreaterThan(int next) {
-    // > >= >> >>= >>>
+    // > >= >> >>= >>> >>>=
     next = advance();
     if (identical($EQ, next)) {
       appendPrecedenceToken(TokenType.GT_EQ);
@@ -654,8 +658,13 @@
         appendPrecedenceToken(TokenType.GT_GT_EQ);
         return advance();
       } else if (enableGtGtGt && identical($GT, next)) {
+        next = advance();
+        if (enableGtGtGtEq && identical($EQ, next)) {
+          appendPrecedenceToken(TokenType.GT_GT_GT_EQ);
+          return advance();
+        }
         appendPrecedenceToken(TokenType.GT_GT_GT);
-        return advance();
+        return next;
       } else {
         appendGtGt(TokenType.GT_GT);
         return next;
@@ -1262,17 +1271,9 @@
     appendSyntheticSubstringToken(TokenType.STRING, start, asciiOnly, suffix);
     // Ensure that the error is reported on a visible token
     int errorStart = tokenStart < stringOffset ? tokenStart : quoteStart;
-    if (reportErrors) {
-      addError(errorStart, stringOffset - errorStart,
-          templateUnterminatedString.withArguments(prefix, suffix));
-    } else {
-      appendErrorToken(
-          new UnterminatedString(prefix, errorStart, stringOffset));
-    }
+    appendErrorToken(new UnterminatedString(prefix, errorStart, stringOffset));
   }
 
-  void addError(int charOffset, int length, Message message);
-
   int advanceAfterError(bool shouldAdvance) {
     if (atEndOfFile()) return $EOF;
     if (shouldAdvance) {
diff --git a/pkg/front_end/lib/src/fasta/scanner/array_based_scanner.dart b/pkg/front_end/lib/src/fasta/scanner/array_based_scanner.dart
index 39fba7f..b6e0f09 100644
--- a/pkg/front_end/lib/src/fasta/scanner/array_based_scanner.dart
+++ b/pkg/front_end/lib/src/fasta/scanner/array_based_scanner.dart
@@ -6,8 +6,6 @@
 
 import 'error_token.dart' show ErrorToken, UnmatchedToken;
 
-import '../fasta_codes.dart' show LocatedMessage, Message;
-
 import '../../scanner/token.dart'
     show BeginToken, Keyword, KeywordToken, SyntheticToken, Token, TokenType;
 
@@ -27,8 +25,6 @@
 import '../util/link.dart' show Link;
 
 abstract class ArrayBasedScanner extends AbstractScanner {
-  List<LocatedMessage> errors;
-  bool reportErrors = false;
   bool hasErrors = false;
 
   ArrayBasedScanner(bool includeComments, {int numberOfBytesHint})
@@ -367,10 +363,4 @@
     begin.endGroup = tail;
     appendErrorToken(new UnmatchedToken(begin));
   }
-
-  void addError(int charOffset, int length, Message message) {
-    hasErrors = true;
-    (errors ??= <LocatedMessage>[])
-        .add(new LocatedMessage(null, charOffset, length, message));
-  }
 }
diff --git a/pkg/front_end/lib/src/fasta/scanner/scanner_main.dart b/pkg/front_end/lib/src/fasta/scanner/scanner_main.dart
index 848b65d..fd3c030 100644
--- a/pkg/front_end/lib/src/fasta/scanner/scanner_main.dart
+++ b/pkg/front_end/lib/src/fasta/scanner/scanner_main.dart
@@ -8,22 +8,18 @@
 
 import '../scanner.dart' show ErrorToken, Token, scan;
 
-scanAll(Map<Uri, List<int>> files) {
+scanAll(Map<Uri, List<int>> files, {bool verbose: false, bool verify: false}) {
   Stopwatch sw = new Stopwatch()..start();
   int byteCount = 0;
   files.forEach((Uri uri, List<int> bytes) {
     var token = scan(bytes).tokens;
-    if (const bool.fromEnvironment("printTokens")) {
-      printTokens(token);
-    }
-    if (const bool.fromEnvironment('verifyErrorTokens')) {
-      verifyErrorTokens(token, uri);
-    }
+    if (verbose) printTokens(token);
+    if (verify) verifyErrorTokens(token, uri);
     byteCount += bytes.length - 1;
   });
   sw.stop();
   print("Scanning files took: ${sw.elapsed}");
-  print("Bytes/ms: ${byteCount/sw.elapsedMilliseconds}");
+  print("Bytes/ms: ${byteCount / sw.elapsedMilliseconds}");
 }
 
 void printTokens(Token token) {
@@ -78,12 +74,25 @@
 mainEntryPoint(List<String> arguments) {
   Map<Uri, List<int>> files = <Uri, List<int>>{};
   Stopwatch sw = new Stopwatch()..start();
-  for (String name in arguments) {
-    Uri uri = Uri.base.resolve(name);
+  bool verbose = const bool.fromEnvironment("printTokens");
+  bool verify = const bool.fromEnvironment('verifyErrorTokens');
+  for (String arg in arguments) {
+    if (arg.startsWith('--')) {
+      if (arg == '--print-tokens') {
+        verbose = true;
+      } else if (arg == '--verify-error-tokens') {
+        verify = true;
+      } else {
+        print('Unrecognized option: $arg');
+      }
+      continue;
+    }
+
+    Uri uri = Uri.base.resolve(arg);
     List<int> bytes = readBytesFromFileSync(uri);
     files[uri] = bytes;
   }
   sw.stop();
   print("Reading files took: ${sw.elapsed}");
-  scanAll(files);
+  scanAll(files, verbose: verbose, verify: verify);
 }
diff --git a/pkg/front_end/lib/src/fasta/scanner/string_scanner.dart b/pkg/front_end/lib/src/fasta/scanner/string_scanner.dart
index b5cb240..952099d 100644
--- a/pkg/front_end/lib/src/fasta/scanner/string_scanner.dart
+++ b/pkg/front_end/lib/src/fasta/scanner/string_scanner.dart
@@ -25,8 +25,7 @@
   /** The current offset in [string]. */
   int scanOffset = -1;
 
-  StringScanner(String string,
-      {bool includeComments: false, bool scanLazyAssignmentOperators: false})
+  StringScanner(String string, {bool includeComments: false})
       : string = ensureZeroTermination(string),
         super(includeComments);
 
diff --git a/pkg/front_end/lib/src/fasta/scanner/token.dart b/pkg/front_end/lib/src/fasta/scanner/token.dart
index f10081d..26ab536 100644
--- a/pkg/front_end/lib/src/fasta/scanner/token.dart
+++ b/pkg/front_end/lib/src/fasta/scanner/token.dart
@@ -299,6 +299,7 @@
       identical(value, "+") ||
       identical(value, "<<") ||
       identical(value, ">>") ||
+      identical(value, ">>>") ||
       identical(value, ">=") ||
       identical(value, ">") ||
       identical(value, "<=") ||
diff --git a/pkg/front_end/lib/src/fasta/scanner/token_constants.dart b/pkg/front_end/lib/src/fasta/scanner/token_constants.dart
index f29765c..fff742e 100644
--- a/pkg/front_end/lib/src/fasta/scanner/token_constants.dart
+++ b/pkg/front_end/lib/src/fasta/scanner/token_constants.dart
@@ -88,3 +88,4 @@
 const int GENERIC_METHOD_TYPE_LIST_TOKEN = GENERIC_METHOD_TYPE_ASSIGN_TOKEN + 1;
 const int GT_GT_GT_TOKEN = GENERIC_METHOD_TYPE_LIST_TOKEN + 1;
 const int PERIOD_PERIOD_PERIOD_QUESTION_TOKEN = GT_GT_GT_TOKEN + 1;
+const int GT_GT_GT_EQ_TOKEN = PERIOD_PERIOD_PERIOD_QUESTION_TOKEN + 1;
diff --git a/pkg/front_end/lib/src/fasta/source/outline_builder.dart b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
index 362b102..0f4d72f 100644
--- a/pkg/front_end/lib/src/fasta/source/outline_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/outline_builder.dart
@@ -944,8 +944,20 @@
       library.endNestedDeclaration("<syntax-error>");
       return;
     }
-    library.addNamedMixinApplication(documentationComment, metadata, name,
-        typeVariables, modifiers, mixinApplication, interfaces, charOffset);
+
+    int startCharOffset = beginToken.charOffset;
+    int charEndOffset = endToken.charOffset;
+    library.addNamedMixinApplication(
+        documentationComment,
+        metadata,
+        name,
+        typeVariables,
+        modifiers,
+        mixinApplication,
+        interfaces,
+        startCharOffset,
+        charOffset,
+        charEndOffset);
   }
 
   @override
@@ -967,6 +979,11 @@
   }
 
   @override
+  void handleNonNullAssertExpression(Token bang) {
+    reportNonNullAssertExpressionNotEnabled(bang);
+  }
+
+  @override
   void handleType(Token beginToken, Token questionMark) {
     debugEvent("Type");
     reportErrorIfNullableType(questionMark);
@@ -1163,13 +1180,14 @@
     String documentationComment = getDocumentationComment(enumKeyword);
     List<EnumConstantInfo> enumConstantInfos =
         const FixedNullableList<EnumConstantInfo>().pop(stack, count);
-    int charOffset = pop();
+    int charOffset = pop(); // identifier char offset.
+    int startCharOffset = enumKeyword.charOffset;
     Object name = pop();
     List<MetadataBuilder<KernelTypeBuilder>> metadata = pop();
     checkEmpty(enumKeyword.charOffset);
     if (name is ParserRecovery) return;
     library.addEnum(documentationComment, metadata, name, enumConstantInfos,
-        charOffset, leftBrace?.endGroup?.charOffset);
+        startCharOffset, charOffset, leftBrace?.endGroup?.charOffset);
   }
 
   @override
diff --git a/pkg/front_end/lib/src/fasta/source/scope_listener.dart b/pkg/front_end/lib/src/fasta/source/scope_listener.dart
index c49ce08..80db65e 100644
--- a/pkg/front_end/lib/src/fasta/source/scope_listener.dart
+++ b/pkg/front_end/lib/src/fasta/source/scope_listener.dart
@@ -94,6 +94,12 @@
   }
 
   @override
+  void beginForControlFlow(Token awaitToken, Token forToken) {
+    debugEvent("beginForControlFlow");
+    enterLocalScope("for in a collection");
+  }
+
+  @override
   void beginBlock(Token token) {
     debugEvent("beginBlock");
     enterLocalScope("block");
@@ -102,7 +108,7 @@
   @override
   void beginSwitchBlock(Token token) {
     debugEvent("beginSwitchBlock");
-    enterLocalScope("swithc block");
+    enterLocalScope("switch block");
     enterBreakTarget(token.charOffset);
   }
 
diff --git a/pkg/front_end/lib/src/fasta/source/source_class_builder.dart b/pkg/front_end/lib/src/fasta/source/source_class_builder.dart
index bfcb069..be97aab 100644
--- a/pkg/front_end/lib/src/fasta/source/source_class_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_class_builder.dart
@@ -7,8 +7,6 @@
 import 'package:kernel/ast.dart'
     show Class, Constructor, Member, Supertype, TreeNode;
 
-import '../../base/instrumentation.dart' show Instrumentation;
-
 import '../dill/dill_member_builder.dart' show DillMemberBuilder;
 
 import '../fasta_codes.dart'
@@ -259,13 +257,6 @@
   }
 
   @override
-  void instrumentTopLevelInference(Instrumentation instrumentation) {
-    scope.forEach((name, declaration) {
-      declaration.instrumentTopLevelInference(instrumentation);
-    });
-  }
-
-  @override
   int finishPatch() {
     if (!isPatch) return 0;
 
diff --git a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
index 1d33fb1..8d2b369 100644
--- a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
@@ -8,8 +8,6 @@
 
 import '../../base/resolve_relative_uri.dart' show resolveRelativeUri;
 
-import '../../base/instrumentation.dart' show Instrumentation;
-
 import '../../scanner/token.dart' show Token;
 
 import '../builder/builder.dart'
@@ -380,7 +378,9 @@
       int modifiers,
       T mixinApplication,
       List<T> interfaces,
-      int charOffset);
+      int startCharOffset,
+      int charOffset,
+      int charEndOffset);
 
   void addField(
       String documentationComment,
@@ -455,6 +455,7 @@
       List<MetadataBuilder> metadata,
       String name,
       List<EnumConstantInfo> enumConstantInfos,
+      int startCharOffset,
       int charOffset,
       int charEndOffset);
 
@@ -881,14 +882,6 @@
   }
 
   @override
-  void instrumentTopLevelInference(Instrumentation instrumentation) {
-    Iterator<Declaration> iterator = this.iterator;
-    while (iterator.moveNext()) {
-      iterator.current.instrumentTopLevelInference(instrumentation);
-    }
-  }
-
-  @override
   void recordAccess(int charOffset, int length, Uri fileUri) {
     accessors.add(fileUri);
     accessors.add(charOffset);
@@ -941,6 +934,8 @@
 
   List<TypeVariableBuilder> typeVariables;
 
+  bool hasConstConstructor = false;
+
   DeclarationBuilder(this.members, this.setters, this.constructors, this.name,
       this.charOffset, this.parent) {
     assert(name != null);
diff --git a/pkg/front_end/lib/src/fasta/source/source_loader.dart b/pkg/front_end/lib/src/fasta/source/source_loader.dart
index 05cc836..4c3b6c9 100644
--- a/pkg/front_end/lib/src/fasta/source/source_loader.dart
+++ b/pkg/front_end/lib/src/fasta/source/source_loader.dart
@@ -23,7 +23,8 @@
         Library,
         LibraryDependency,
         ProcedureKind,
-        Supertype;
+        Supertype,
+        TreeNode;
 
 import 'package:kernel/class_hierarchy.dart'
     show ClassHierarchy, HandleAmbiguousSupertypes;
@@ -32,8 +33,7 @@
 
 import '../../api_prototype/file_system.dart';
 
-import '../../base/instrumentation.dart'
-    show Instrumentation, InstrumentationValueLiteral;
+import '../../base/instrumentation.dart' show Instrumentation;
 
 import '../blacklisted_classes.dart' show blacklistedCoreClasses;
 
@@ -68,8 +68,6 @@
         templateSourceOutlineSummary,
         templateUntranslatableUri;
 
-import '../fasta_codes.dart' as fasta_codes;
-
 import '../kernel/kernel_shadow_ast.dart'
     show ShadowClass, ShadowTypeInferenceEngine;
 
@@ -91,6 +89,8 @@
 
 import '../kernel/body_builder.dart' show BodyBuilder;
 
+import '../kernel/transform_collections.dart' show CollectionTransformer;
+
 import '../kernel/transform_set_literals.dart' show SetLiteralTransformer;
 
 import '../kernel/type_builder_computer.dart' show TypeBuilderComputer;
@@ -101,17 +101,12 @@
 
 import '../parser.dart' show Parser, lengthForToken, offsetForToken;
 
-import '../problems.dart' show internalProblem, unhandled;
+import '../problems.dart' show internalProblem;
 
 import '../scanner.dart' show ErrorToken, ScannerResult, Token, scan;
 
-import '../severity.dart' show Severity;
-
 import '../type_inference/interface_resolver.dart' show InterfaceResolver;
 
-import '../type_inference/type_inferrer.dart'
-    show KernelHierarchyMixinInferrerCallback;
-
 import 'diet_listener.dart' show DietListener;
 
 import 'diet_parser.dart' show DietParser;
@@ -145,6 +140,8 @@
 
   Instrumentation instrumentation;
 
+  CollectionTransformer collectionTransformer;
+
   SetLiteralTransformer setLiteralTransformer;
 
   SourceLoader(this.fileSystem, this.includeComments, KernelTarget target)
@@ -206,7 +203,22 @@
     Token token = result.tokens;
     if (!suppressLexicalErrors) {
       List<int> source = getSource(bytes);
-      target.addSourceInformation(library.fileUri, result.lineStarts, source);
+      Uri importUri = library.uri;
+      if (library.isPatch) {
+        // For patch files we create a "fake" import uri.
+        // We cannot use the import uri from the patched libarary because
+        // several different files would then have the same import uri,
+        // and the VM does not support that. Also, what would, for instance,
+        // setting a breakpoint on line 42 of some import uri mean, if the uri
+        // represented several files?
+        List<String> newPathSegments =
+            new List<String>.from(importUri.pathSegments);
+        newPathSegments.add(library.fileUri.pathSegments.last);
+        newPathSegments[0] = "${newPathSegments[0]}-patch";
+        importUri = importUri.replace(pathSegments: newPathSegments);
+      }
+      target.addSourceInformation(
+          importUri, library.fileUri, result.lineStarts, source);
     }
     while (token is ErrorToken) {
       if (!suppressLexicalErrors) {
@@ -227,6 +239,12 @@
       case "dart:async":
         return utf8.encode(defaultDartAsyncSource);
 
+      case "dart:collection":
+        return utf8.encode(defaultDartCollectionSource);
+
+      case "dart:_internal":
+        return utf8.encode(defaultDartInternalSource);
+
       default:
         return utf8.encode(message == null ? "" : "/* ${message.message} */");
     }
@@ -771,7 +789,9 @@
     List<Library> workList = <Library>[];
     builders.forEach((Uri uri, LibraryBuilder library) {
       if (!library.isPatch &&
-          (library.loader == this || library.uri.scheme == "dart")) {
+          (library.loader == this ||
+              library.uri.scheme == "dart" ||
+              library == this.first)) {
         if (libraries.add(library.target)) {
           workList.add(library.target);
         }
@@ -798,13 +818,9 @@
     };
     if (hierarchy == null) {
       hierarchy = new ClassHierarchy(computeFullComponent(),
-          onAmbiguousSupertypes: onAmbiguousSupertypes,
-          mixinInferrer: new KernelHierarchyMixinInferrerCallback(
-              this, target.legacyMode));
+          onAmbiguousSupertypes: onAmbiguousSupertypes);
     } else {
       hierarchy.onAmbiguousSupertypes = onAmbiguousSupertypes;
-      hierarchy.mixinInferrer =
-          new KernelHierarchyMixinInferrerCallback(this, target.legacyMode);
       Component component = computeFullComponent();
       hierarchy.applyTreeChanges(const [], component.libraries,
           reissueAmbiguousSupertypesFor: component);
@@ -998,13 +1014,6 @@
     }
 
     typeInferenceEngine.finishTopLevelInitializingFormals();
-    if (instrumentation != null) {
-      builders.forEach((Uri uri, LibraryBuilder library) {
-        if (library.loader == this) {
-          library.instrumentTopLevelInference(instrumentation);
-        }
-      });
-    }
     interfaceResolver = null;
     // Since finalization of covariance may have added forwarding stubs, we need
     // to recompute the class hierarchy so that method compilation will properly
@@ -1014,6 +1023,36 @@
     ticker.logMs("Performed top level inference");
   }
 
+  void transformPostInference(
+      TreeNode node, bool transformSetLiterals, bool transformCollections) {
+    if (transformCollections) {
+      node.accept(collectionTransformer ??= new CollectionTransformer(this));
+    }
+    if (transformSetLiterals) {
+      node.accept(setLiteralTransformer ??= new SetLiteralTransformer(this,
+          transformConst: !target.enableConstantUpdate2018));
+    }
+  }
+
+  void transformListPostInference(List<TreeNode> list,
+      bool transformSetLiterals, bool transformCollections) {
+    if (transformSetLiterals) {
+      SetLiteralTransformer transformer = setLiteralTransformer ??=
+          new SetLiteralTransformer(this,
+              transformConst: !target.enableConstantUpdate2018);
+      for (int i = 0; i < list.length; ++i) {
+        list[i] = list[i].accept(transformer);
+      }
+    }
+    if (transformCollections) {
+      CollectionTransformer transformer =
+          collectionTransformer ??= new CollectionTransformer(this);
+      for (int i = 0; i < list.length; ++i) {
+        list[i] = list[i].accept(transformer);
+      }
+    }
+  }
+
   Expression instantiateInvocation(Expression receiver, String name,
       Arguments arguments, int offset, bool isSuper) {
     return target.backendTarget.instantiateInvocation(
@@ -1046,67 +1085,6 @@
         isTopLevel: isTopLevel);
   }
 
-  void recordMessage(Severity severity, Message message, int charOffset,
-      int length, Uri fileUri,
-      {List<LocatedMessage> context}) {
-    if (instrumentation == null) return;
-
-    if (charOffset == -1 &&
-        (message.code == fasta_codes.codeConstConstructorWithBody ||
-            message.code == fasta_codes.codeConstructorNotFound ||
-            message.code == fasta_codes.codeSuperclassHasNoDefaultConstructor ||
-            message.code == fasta_codes.codeTypeArgumentsOnTypeVariable ||
-            message.code == fasta_codes.codeUnspecified)) {
-      // TODO(ahe): All warnings should have a charOffset, but currently, some
-      // warnings lack them.
-      return;
-    }
-
-    String severityString;
-    switch (severity) {
-      case Severity.error:
-        severityString = "error";
-        break;
-
-      case Severity.internalProblem:
-        severityString = "internal problem";
-        break;
-
-      case Severity.warning:
-        severityString = "warning";
-        break;
-
-      case Severity.errorLegacyWarning:
-        // Should have been resolved to either error or warning at this point.
-        // Use a property name expressing that, in case it slips through.
-        severityString = "unresolved severity";
-        break;
-
-      case Severity.context:
-        severityString = "context";
-        break;
-
-      case Severity.ignored:
-        unhandled("IGNORED", "recordMessage", charOffset, fileUri);
-        return;
-    }
-    instrumentation.record(
-        fileUri,
-        charOffset,
-        severityString,
-        // TODO(ahe): Should I add an InstrumentationValue for Message?
-        new InstrumentationValueLiteral(message.code.name));
-    if (context != null) {
-      for (LocatedMessage contextMessage in context) {
-        instrumentation.record(
-            contextMessage.uri,
-            contextMessage.charOffset,
-            "context",
-            new InstrumentationValueLiteral(contextMessage.code.name));
-      }
-    }
-  }
-
   void releaseAncillaryResources() {
     hierarchy = null;
     typeInferenceEngine = null;
@@ -1116,6 +1094,9 @@
   KernelClassBuilder computeClassBuilderFromTargetClass(Class cls) {
     Library kernelLibrary = cls.enclosingLibrary;
     LibraryBuilder library = builders[kernelLibrary.importUri];
+    if (library == null) {
+      return target.dillTarget.loader.computeClassBuilderFromTargetClass(cls);
+    }
     return library[cls.name];
   }
 
@@ -1161,6 +1142,8 @@
 
 class Symbol {}
 
+class Set {}
+
 class Type {}
 
 class _InvocationMirror {
@@ -1246,3 +1229,20 @@
   cancel() {}
 }
 """;
+
+/// A minimal implementation of dart:collection that is sufficient to create an
+/// instance of [CoreTypes] and compile program.
+const String defaultDartCollectionSource = """
+class _UnmodifiableSet {
+  final Map _map;
+  const _UnmodifiableSet(this._map);
+}
+""";
+
+/// A minimal implementation of dart:_internel that is sufficient to create an
+/// instance of [CoreTypes] and compile program.
+const String defaultDartInternalSource = """
+class Symbol {
+  const Symbol(String name);
+}
+""";
diff --git a/pkg/front_end/lib/src/fasta/source/type_promotion_look_ahead_listener.dart b/pkg/front_end/lib/src/fasta/source/type_promotion_look_ahead_listener.dart
index c78a6a1..e6d7ef8 100644
--- a/pkg/front_end/lib/src/fasta/source/type_promotion_look_ahead_listener.dart
+++ b/pkg/front_end/lib/src/fasta/source/type_promotion_look_ahead_listener.dart
@@ -139,6 +139,10 @@
 
   Uri get uri => state.uri;
 
+  void logEvent(String name) {
+    throw new UnimplementedError(name);
+  }
+
   void debugEvent(String name, Token token) {
     // state.trace(name, token);
   }
@@ -389,15 +393,21 @@
   }
 
   @override
+  void handleElseControlFlow(Token token) {}
+
+  @override
   void endIfControlFlow(Token token) {
-    // TODO(danrubel) add support for if control flow collection entries
-    // but for now this is ignored and an error reported in the body builder.
+    state.pop(); // Element.
+    state.pop(); // Condition.
+    state.pushNull("%IfControlFlow%", token);
   }
 
   @override
   void endIfElseControlFlow(Token token) {
-    // TODO(danrubel) add support for if control flow collection entries
-    // but for now this is ignored and an error reported in the body builder.
+    state.pop(); // Else element.
+    state.pop(); // Then element.
+    state.pop(); // Condition.
+    state.pushNull("%IfElseControlFlow%", token);
   }
 
   @override
@@ -871,24 +881,15 @@
   }
 
   @override
-  void handleLiteralSet(
-      int count, Token leftBrace, Token constKeyword, Token rightBrace) {
-    debugEvent("LiteralSet", leftBrace);
-    state.discard(count);
-    state.pushNull("{}", leftBrace);
-  }
-
-  @override
-  void handleLiteralMap(
-      int count, Token leftBrace, Token constKeyword, Token rightBrace) {
-    debugEvent("LiteralMap", leftBrace);
-    state.discard(count);
-    state.pushNull("{}", leftBrace);
-  }
-
-  @override
   void handleLiteralSetOrMap(
-      int count, Token leftBrace, Token constKeyword, Token rightBrace) {
+    int count,
+    Token leftBrace,
+    Token constKeyword,
+    Token rightBrace,
+    // TODO(danrubel): hasSetEntry parameter exists for replicating existing
+    // behavior and will be removed once unified collection has been enabled
+    bool hasSetEntry,
+  ) {
     debugEvent("LiteralSetOrMap", leftBrace);
     state.discard(count);
     state.pushNull("{}", leftBrace);
diff --git a/pkg/front_end/lib/src/fasta/target_implementation.dart b/pkg/front_end/lib/src/fasta/target_implementation.dart
index 037e74e..6e82a7d 100644
--- a/pkg/front_end/lib/src/fasta/target_implementation.dart
+++ b/pkg/front_end/lib/src/fasta/target_implementation.dart
@@ -131,7 +131,7 @@
   }
 
   void addSourceInformation(
-      Uri uri, List<int> lineStarts, List<int> sourceCode);
+      Uri importUri, Uri fileUri, List<int> lineStarts, List<int> sourceCode);
 
   void readPatchFiles(covariant LibraryBuilder library) {}
 
diff --git a/pkg/front_end/lib/src/fasta/testing/validating_instrumentation.dart b/pkg/front_end/lib/src/fasta/testing/validating_instrumentation.dart
index b721d4e..5547c5f 100644
--- a/pkg/front_end/lib/src/fasta/testing/validating_instrumentation.dart
+++ b/pkg/front_end/lib/src/fasta/testing/validating_instrumentation.dart
@@ -30,7 +30,6 @@
   /// Map from feature names to the property names they are short for.
   static const _FEATURES = const {
     'inference': const [
-      'topType',
       'typeArg',
       'typeArgs',
       'promotedType',
@@ -39,10 +38,8 @@
       'target',
     ],
     'checks': const [
-      'covariance',
       'checkGetterReturn',
       'checkReturn',
-      'forwardingStub',
       'genericContravariant',
     ],
   };
diff --git a/pkg/front_end/lib/src/fasta/type_inference/interface_resolver.dart b/pkg/front_end/lib/src/fasta/type_inference/interface_resolver.dart
index 96b90c3..5c8dbfa 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/interface_resolver.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/interface_resolver.dart
@@ -12,6 +12,7 @@
         Field,
         FunctionNode,
         FunctionType,
+        InvalidType,
         Member,
         Name,
         NamedExpression,
@@ -37,22 +38,14 @@
     show HierarchyBasedTypeEnvironment;
 
 import '../../base/instrumentation.dart'
-    show
-        Instrumentation,
-        InstrumentationValueForForwardingStub,
-        InstrumentationValueLiteral;
+    show Instrumentation, InstrumentationValueLiteral;
 
 import '../builder/builder.dart' show LibraryBuilder;
 
 import '../kernel/kernel_library_builder.dart' show KernelLibraryBuilder;
 
 import '../kernel/kernel_shadow_ast.dart'
-    show
-        ShadowClass,
-        ShadowField,
-        ShadowMember,
-        ShadowProcedure,
-        VariableDeclarationJudgment;
+    show ShadowClass, ShadowField, ShadowProcedure, VariableDeclarationJudgment;
 
 import '../messages.dart'
     show
@@ -124,23 +117,26 @@
     var declaredMethod = _declaredMethod;
     var kind = declaredMethod.kind;
     var overriddenTypes = _computeAccessorOverriddenTypes();
+    DartType inferredType;
     if (isCircular) {
+      inferredType = const InvalidType();
       _library.addProblem(
           templateCantInferTypeDueToCircularity.withArguments(_name),
           _offset,
           noLength,
           _fileUri);
     } else {
-      var inferredType = _interfaceResolver.matchTypes(
+      inferredType = _interfaceResolver.matchTypes(
           overriddenTypes, _library, _name, _fileUri, _offset);
-      if (declaredMethod is SyntheticAccessor) {
-        declaredMethod._field.type = inferredType;
+    }
+    if (declaredMethod is SyntheticAccessor) {
+      declaredMethod._field.type = inferredType;
+      declaredMethod._field.initializer = null;
+    } else {
+      if (kind == ProcedureKind.Getter) {
+        declaredMethod.function.returnType = inferredType;
       } else {
-        if (kind == ProcedureKind.Getter) {
-          declaredMethod.function.returnType = inferredType;
-        } else {
-          declaredMethod.function.positionalParameters[0].type = inferredType;
-        }
+        declaredMethod.function.positionalParameters[0].type = inferredType;
       }
     }
   }
@@ -160,7 +156,7 @@
       DartType overriddenType;
       if (resolvedCandidate is SyntheticAccessor) {
         var field = resolvedCandidate._field;
-        ShadowMember.resolveInferenceNode(field);
+        TypeInferenceEngine.resolveInferenceNode(field);
         overriddenType = field.type;
       } else if (resolvedCandidate.function != null) {
         switch (resolvedCandidate.kind) {
@@ -379,8 +375,7 @@
     }
     for (int i = 0; i < interfaceTypeParameters.length; i++) {
       var typeParameter = interfaceTypeParameters[i];
-      var isGenericCovariantImpl = typeParameter.isGenericCovariantImpl ||
-          needsCheck(typeParameter.bound);
+      var isGenericCovariantImpl = typeParameter.isGenericCovariantImpl;
       var superTypeParameter = typeParameter;
       for (int j = _start; j < _end; j++) {
         var otherMember = _finalizedCandidate(j);
@@ -951,11 +946,6 @@
           resolution.isSyntheticForwarder &&
           identical(resolution.enclosingClass, class_)) {
         class_.addMember(resolution);
-        _instrumentation?.record(
-            class_.location.file,
-            class_.fileOffset,
-            'forwardingStub',
-            new InstrumentationValueForForwardingStub(resolution));
       }
     }
   }
@@ -982,14 +972,6 @@
     return candidates;
   }
 
-  /// If instrumentation is enabled, records the covariance bits for the given
-  /// [class_] to [_instrumentation].
-  void recordInstrumentation(Class class_) {
-    if (_instrumentation != null) {
-      _recordInstrumentation(class_);
-    }
-  }
-
   /// Creates the appropriate [InferenceNode] for inferring [procedure] in the
   /// context of [class_].
   ///
@@ -1086,51 +1068,6 @@
     return result;
   }
 
-  /// Records the covariance bits for the given [class_] to [_instrumentation].
-  ///
-  /// Caller is responsible for checking whether [_instrumentation] is `null`.
-  void _recordInstrumentation(Class class_) {
-    var uri = class_.fileUri;
-    void recordCovariance(int fileOffset, bool isExplicitlyCovariant,
-        bool isGenericCovariantImpl) {
-      var covariance = <String>[];
-      if (isExplicitlyCovariant) covariance.add('explicit');
-      if (!isExplicitlyCovariant && isGenericCovariantImpl) {
-        covariance.add('genericImpl');
-      }
-      if (covariance.isNotEmpty) {
-        _instrumentation.record(uri, fileOffset, 'covariance',
-            new InstrumentationValueLiteral(covariance.join(', ')));
-      }
-    }
-
-    for (var procedure in class_.procedures) {
-      if (procedure.isStatic) continue;
-      // Forwarding stubs are annotated separately
-      if (procedure.isSyntheticForwarder) {
-        continue;
-      }
-      void recordFormalAnnotations(VariableDeclaration formal) {
-        recordCovariance(formal.fileOffset, formal.isCovariant,
-            formal.isGenericCovariantImpl);
-      }
-
-      void recordTypeParameterAnnotations(TypeParameter typeParameter) {
-        recordCovariance(typeParameter.fileOffset, false,
-            typeParameter.isGenericCovariantImpl);
-      }
-
-      procedure.function.positionalParameters.forEach(recordFormalAnnotations);
-      procedure.function.namedParameters.forEach(recordFormalAnnotations);
-      procedure.function.typeParameters.forEach(recordTypeParameterAnnotations);
-    }
-    for (var field in class_.fields) {
-      if (field.isStatic) continue;
-      recordCovariance(
-          field.fileOffset, field.isCovariant, field.isGenericCovariantImpl);
-    }
-  }
-
   /// Determines the appropriate substitution to translate type parameters
   /// mentioned in the given [candidate] to type parameters on [class_].
   Substitution _substitutionFor(Procedure candidate, Class class_) {
diff --git a/pkg/front_end/lib/src/fasta/type_inference/standard_bounds.dart b/pkg/front_end/lib/src/fasta/type_inference/standard_bounds.dart
index 2d5cb3a..2a97c19 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/standard_bounds.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/standard_bounds.dart
@@ -12,6 +12,7 @@
         DynamicType,
         FunctionType,
         InterfaceType,
+        InvalidType,
         NamedType,
         TypeParameterType,
         VoidType;
@@ -177,8 +178,12 @@
       return _functionStandardUpperBound(type1, type2);
     }
 
+    if (type1 is InvalidType || type2 is InvalidType) {
+      return const InvalidType();
+    }
+
     // Should never happen. As a defensive measure, return the dynamic type.
-    assert(false);
+    assert(false, "type1 = $type1; type2 = $type2");
     return const DynamicType();
   }
 
diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart b/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart
index 94cff43..bbf090a 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/type_inference_engine.dart
@@ -11,6 +11,8 @@
         Field,
         FunctionType,
         InterfaceType,
+        InvalidType,
+        Member,
         TypeParameter,
         TypeParameterType,
         TypedefType,
@@ -25,7 +27,7 @@
 import '../kernel/kernel_builder.dart'
     show LibraryBuilder, KernelLibraryBuilder;
 
-import '../kernel/kernel_shadow_ast.dart' show ShadowField;
+import '../kernel/kernel_shadow_ast.dart' show ShadowField, ShadowMember;
 
 import '../messages.dart' show noLength, templateCantInferTypeDueToCircularity;
 
@@ -63,7 +65,7 @@
             field.fileOffset,
             noLength,
             field.fileUri);
-        inferredType = const DynamicType();
+        inferredType = const InvalidType();
       }
       field.setInferredType(
           _typeInferenceEngine, typeInferrer.uri, inferredType);
@@ -272,9 +274,7 @@
     if (formal.type == null) {
       for (Field field in parent.enclosingClass.fields) {
         if (field.name.name == formal.name) {
-          if (field is ShadowField && field.inferenceNode != null) {
-            field.inferenceNode.resolve();
-          }
+          TypeInferenceEngine.resolveInferenceNode(field);
           formal.type = field.type;
           return;
         }
@@ -302,4 +302,13 @@
     ShadowField.setInferenceNode(field, node);
     staticInferenceNodes.add(node);
   }
+
+  static void resolveInferenceNode(Member member) {
+    if (member is ShadowMember) {
+      if (member.inferenceNode != null) {
+        member.inferenceNode.resolve();
+        member.inferenceNode = null;
+      }
+    }
+  }
 }
diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
index d719e07..05052a6 100644
--- a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
+++ b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
@@ -22,6 +22,7 @@
         FunctionType,
         Instantiation,
         InterfaceType,
+        InvalidType,
         InvocationExpression,
         Let,
         ListLiteral,
@@ -52,8 +53,6 @@
 
 import 'package:kernel/class_hierarchy.dart' show ClassHierarchy;
 
-import 'package:kernel/class_hierarchy.dart' as kernel show MixinInferrer;
-
 import 'package:kernel/core_types.dart' show CoreTypes;
 
 import 'package:kernel/type_algebra.dart'
@@ -106,7 +105,6 @@
         ExpressionJudgment,
         ShadowClass,
         ShadowField,
-        ShadowMember,
         ShadowTypeInferenceEngine,
         ShadowTypeInferrer,
         VariableDeclarationJudgment,
@@ -119,8 +117,6 @@
 
 import '../problems.dart' show internalProblem, unexpected, unhandled;
 
-import '../source/source_loader.dart' show SourceLoader;
-
 import 'inference_helper.dart' show InferenceHelper;
 
 import 'interface_resolver.dart' show ForwardingNode, SyntheticAccessor;
@@ -549,7 +545,8 @@
 
   TypeInferrerImpl.private(
       this.engine, this.uri, bool topLevel, this.thisType, this.library)
-      : classHierarchy = engine.classHierarchy,
+      : assert((topLevel && library == null) || (!topLevel && library != null)),
+        classHierarchy = engine.classHierarchy,
         instrumentation = topLevel ? null : engine.instrumentation,
         typeSchemaEnvironment = engine.typeSchemaEnvironment,
         isTopLevel = topLevel,
@@ -681,21 +678,22 @@
     if (!typeSchemaEnvironment.isSubtypeOf(expectedType, actualType)) {
       // Error: not assignable.  Perform error recovery.
       var parent = expression.parent;
-      var errorNode = helper.wrapInProblem(
-          new AsExpression(
-              expression,
-              // TODO(ahe): The outline phase doesn't correctly remove invalid
-              // uses of type variables, for example, on static members. Once
-              // that has been fixed, we should always be able to use
-              // [expectedType] directly here.
-              hasAnyTypeVariables(expectedType)
-                  ? const BottomType()
-                  : expectedType)
-            ..isTypeError = true
-            ..fileOffset = expression.fileOffset,
-          (template ?? templateInvalidAssignment)
-              .withArguments(actualType, expectedType),
-          noLength);
+      Expression errorNode = new AsExpression(
+          expression,
+          // TODO(ahe): The outline phase doesn't correctly remove invalid
+          // uses of type variables, for example, on static members. Once
+          // that has been fixed, we should always be able to use
+          // [expectedType] directly here.
+          hasAnyTypeVariables(expectedType) ? const BottomType() : expectedType)
+        ..isTypeError = true
+        ..fileOffset = expression.fileOffset;
+      if (expectedType is! InvalidType && actualType is! InvalidType) {
+        errorNode = helper.wrapInProblem(
+            errorNode,
+            (template ?? templateInvalidAssignment)
+                .withArguments(actualType, expectedType),
+            noLength);
+      }
       parent?.replaceChild(expression, errorNode);
       return errorNode;
     } else {
@@ -763,6 +761,7 @@
     if (!isTopLevel &&
         interfaceMember == null &&
         receiverType is! DynamicType &&
+        receiverType is! InvalidType &&
         !(receiverType == coreTypes.functionClass.rawType &&
             name.name == 'call') &&
         errorTemplate != null) {
@@ -1844,7 +1843,7 @@
         member = member is SyntheticAccessor
             ? SyntheticAccessor.getField(member)
             : member;
-        ShadowMember.resolveInferenceNode(member);
+        TypeInferenceEngine.resolveInferenceNode(member);
         return member;
       }
     }
@@ -1909,29 +1908,6 @@
   }
 }
 
-// TODO(ahe): I'm working on removing this.
-class KernelHierarchyMixinInferrerCallback implements kernel.MixinInferrer {
-  final SourceLoader loader;
-  final bool legacyMode;
-
-  KernelHierarchyMixinInferrerCallback(this.loader, this.legacyMode);
-
-  @override
-  void infer(ClassHierarchy hierarchy, Class classNode) {
-    if (legacyMode) return;
-    Supertype mixedInType = classNode.mixedInType;
-    List<DartType> typeArguments = mixedInType.typeArguments;
-    if (typeArguments.isEmpty || typeArguments.first is! UnknownType) return;
-    new KernelHierarchyMixinInferrer(
-            hierarchy,
-            loader,
-            new TypeConstraintGatherer(
-                new TypeSchemaEnvironment(loader.coreTypes, hierarchy),
-                mixedInType.classNode.typeParameters))
-        .infer(classNode);
-  }
-}
-
 abstract class MixinInferrer {
   final CoreTypes coreTypes;
   final TypeConstraintGatherer gatherer;
@@ -2074,26 +2050,6 @@
   }
 }
 
-// TODO(ahe): I'm working on removing this.
-class KernelHierarchyMixinInferrer extends MixinInferrer {
-  final ClassHierarchy hierarchy;
-  final SourceLoader loader;
-
-  KernelHierarchyMixinInferrer(
-      this.hierarchy, this.loader, TypeConstraintGatherer gatherer)
-      : super(loader.coreTypes, gatherer);
-
-  @override
-  Supertype asInstantiationOf(Supertype type, Class superclass) {
-    return hierarchy.asInstantiationOf(type, superclass);
-  }
-
-  @override
-  void reportProblem(Message message, Class cls) {
-    loader.addProblem(message, cls.fileOffset, noLength, cls.fileUri);
-  }
-}
-
 /// The result of an expression inference.
 class ExpressionInferenceResult {
   final Expression expression;
diff --git a/pkg/front_end/lib/src/kernel_generator_impl.dart b/pkg/front_end/lib/src/kernel_generator_impl.dart
index 61d49fb..0a4fad1 100644
--- a/pkg/front_end/lib/src/kernel_generator_impl.dart
+++ b/pkg/front_end/lib/src/kernel_generator_impl.dart
@@ -117,7 +117,7 @@
             libraryFilter: kernelTarget.isSourceLibrary);
       }
 
-      // Copy the component to exclude the uriToSource map from the summary.
+      // Create the requested component ("truncating" or not).
       //
       // Note: we don't pass the library argument to the constructor to
       // preserve the the libraries parent pointer (it should continue to point
@@ -128,6 +128,7 @@
                 ? kernelTarget.loader.libraries
                 : summaryComponent.libraries);
       trimmedSummaryComponent.metadata.addAll(summaryComponent.metadata);
+      trimmedSummaryComponent.uriToSource.addAll(summaryComponent.uriToSource);
 
       // As documented, we only run outline transformations when we are building
       // summaries without building a full component (at this time, that's
@@ -136,7 +137,9 @@
         options.target.performOutlineTransformations(trimmedSummaryComponent);
         options.ticker.logMs("Transformed outline");
       }
-      summary = serializeComponent(trimmedSummaryComponent);
+      // Don't include source (but do add it above to include importUris).
+      summary =
+          serializeComponent(trimmedSummaryComponent, includeSources: false);
       options.ticker.logMs("Generated outline");
     }
 
diff --git a/pkg/front_end/lib/src/scanner/errors.dart b/pkg/front_end/lib/src/scanner/errors.dart
index 9e54680..4a7bb1d 100644
--- a/pkg/front_end/lib/src/scanner/errors.dart
+++ b/pkg/front_end/lib/src/scanner/errors.dart
@@ -63,7 +63,7 @@
       const ScannerErrorCode(
           'UNTERMINATED_MULTI_LINE_COMMENT', "Unterminated multi-line comment.",
           correction: "Try terminating the comment with '*/', or "
-              "removing any unbalanced occurances of '/*'"
+              "removing any unbalanced occurrences of '/*'"
               " (because comments nest in Dart).");
 
   static const ScannerErrorCode UNTERMINATED_STRING_LITERAL =
@@ -174,22 +174,6 @@
   }
 }
 
-void translateScanError(
-    Code errorCode, int charOffset, int length, ReportError reportError) {
-  switch (errorCode.analyzerCodes?.first) {
-    case "UNTERMINATED_STRING_LITERAL":
-      // TODO(paulberry,ahe): Fasta reports the error location as the entire
-      // string; analyzer expects the end of the string.
-      reportError(ScannerErrorCode.UNTERMINATED_STRING_LITERAL,
-          charOffset + length - 1, null);
-      break;
-
-    default:
-      throw new UnimplementedError(
-          '$errorCode "${errorCode.analyzerCodes?.first}"');
-  }
-}
-
 /**
  * Determines whether the given [charOffset], which came from the non-EOF token
  * [token], represents the end of the input.
diff --git a/pkg/front_end/lib/src/scanner/token.dart b/pkg/front_end/lib/src/scanner/token.dart
index 3b01015..62718b0 100644
--- a/pkg/front_end/lib/src/scanner/token.dart
+++ b/pkg/front_end/lib/src/scanner/token.dart
@@ -1012,97 +1012,97 @@
    * A value used to indicate that the token type is an additive operator.
    */
   static const TokenClass ADDITIVE_OPERATOR =
-      const TokenClass('ADDITIVE_OPERATOR', 13);
+      const TokenClass('ADDITIVE_OPERATOR', ADDITIVE_PRECEDENCE);
 
   /**
    * A value used to indicate that the token type is an assignment operator.
    */
   static const TokenClass ASSIGNMENT_OPERATOR =
-      const TokenClass('ASSIGNMENT_OPERATOR', 1);
+      const TokenClass('ASSIGNMENT_OPERATOR', ASSIGNMENT_PRECEDENCE);
 
   /**
    * A value used to indicate that the token type is a bitwise-and operator.
    */
   static const TokenClass BITWISE_AND_OPERATOR =
-      const TokenClass('BITWISE_AND_OPERATOR', 11);
+      const TokenClass('BITWISE_AND_OPERATOR', BITWISE_AND_PRECEDENCE);
 
   /**
    * A value used to indicate that the token type is a bitwise-or operator.
    */
   static const TokenClass BITWISE_OR_OPERATOR =
-      const TokenClass('BITWISE_OR_OPERATOR', 9);
+      const TokenClass('BITWISE_OR_OPERATOR', BITWISE_OR_PRECEDENCE);
 
   /**
    * A value used to indicate that the token type is a bitwise-xor operator.
    */
   static const TokenClass BITWISE_XOR_OPERATOR =
-      const TokenClass('BITWISE_XOR_OPERATOR', 10);
+      const TokenClass('BITWISE_XOR_OPERATOR', BITWISE_XOR_PRECEDENCE);
 
   /**
    * A value used to indicate that the token type is a cascade operator.
    */
   static const TokenClass CASCADE_OPERATOR =
-      const TokenClass('CASCADE_OPERATOR', 2);
+      const TokenClass('CASCADE_OPERATOR', CASCADE_PRECEDENCE);
 
   /**
    * A value used to indicate that the token type is a conditional operator.
    */
   static const TokenClass CONDITIONAL_OPERATOR =
-      const TokenClass('CONDITIONAL_OPERATOR', 3);
+      const TokenClass('CONDITIONAL_OPERATOR', CONDITIONAL_PRECEDENCE);
 
   /**
    * A value used to indicate that the token type is an equality operator.
    */
   static const TokenClass EQUALITY_OPERATOR =
-      const TokenClass('EQUALITY_OPERATOR', 7);
+      const TokenClass('EQUALITY_OPERATOR', EQUALITY_PRECEDENCE);
 
   /**
    * A value used to indicate that the token type is an if-null operator.
    */
   static const TokenClass IF_NULL_OPERATOR =
-      const TokenClass('IF_NULL_OPERATOR', 4);
+      const TokenClass('IF_NULL_OPERATOR', IF_NULL_PRECEDENCE);
 
   /**
    * A value used to indicate that the token type is a logical-and operator.
    */
   static const TokenClass LOGICAL_AND_OPERATOR =
-      const TokenClass('LOGICAL_AND_OPERATOR', 6);
+      const TokenClass('LOGICAL_AND_OPERATOR', LOGICAL_AND_PRECEDENCE);
 
   /**
    * A value used to indicate that the token type is a logical-or operator.
    */
   static const TokenClass LOGICAL_OR_OPERATOR =
-      const TokenClass('LOGICAL_OR_OPERATOR', 5);
+      const TokenClass('LOGICAL_OR_OPERATOR', LOGICAL_OR_PRECEDENCE);
 
   /**
    * A value used to indicate that the token type is a multiplicative operator.
    */
   static const TokenClass MULTIPLICATIVE_OPERATOR =
-      const TokenClass('MULTIPLICATIVE_OPERATOR', 14);
+      const TokenClass('MULTIPLICATIVE_OPERATOR', MULTIPLICATIVE_PRECEDENCE);
 
   /**
    * A value used to indicate that the token type is a relational operator.
    */
   static const TokenClass RELATIONAL_OPERATOR =
-      const TokenClass('RELATIONAL_OPERATOR', 8);
+      const TokenClass('RELATIONAL_OPERATOR', RELATIONAL_PRECEDENCE);
 
   /**
    * A value used to indicate that the token type is a shift operator.
    */
   static const TokenClass SHIFT_OPERATOR =
-      const TokenClass('SHIFT_OPERATOR', 12);
+      const TokenClass('SHIFT_OPERATOR', SHIFT_PRECEDENCE);
 
   /**
    * A value used to indicate that the token type is a unary operator.
    */
   static const TokenClass UNARY_POSTFIX_OPERATOR =
-      const TokenClass('UNARY_POSTFIX_OPERATOR', 16);
+      const TokenClass('UNARY_POSTFIX_OPERATOR', POSTFIX_PRECEDENCE);
 
   /**
    * A value used to indicate that the token type is a unary operator.
    */
   static const TokenClass UNARY_PREFIX_OPERATOR =
-      const TokenClass('UNARY_PREFIX_OPERATOR', 15);
+      const TokenClass('UNARY_PREFIX_OPERATOR', PREFIX_PRECEDENCE);
 
   /**
    * The name of the token class.
@@ -1119,7 +1119,7 @@
    * Initialize a newly created class of tokens to have the given [name] and
    * [precedence].
    */
-  const TokenClass(this.name, [this.precedence = 0]);
+  const TokenClass(this.name, [this.precedence = NO_PRECEDENCE]);
 
   @override
   String toString() => name;
@@ -1279,6 +1279,10 @@
       '>>>', 'GT_GT_GT', SHIFT_PRECEDENCE, GT_GT_GT_TOKEN,
       isOperator: true, isUserDefinableOperator: true);
 
+  static const TokenType GT_GT_GT_EQ = const TokenType(
+      '>>>=', 'GT_GT_GT_EQ', ASSIGNMENT_PRECEDENCE, GT_GT_GT_EQ_TOKEN,
+      isOperator: true);
+
   static const TokenType HASH =
       const TokenType('#', 'HASH', NO_PRECEDENCE, HASH_TOKEN);
 
diff --git a/pkg/front_end/messages.status b/pkg/front_end/messages.status
index 9303b17..844ba61 100644
--- a/pkg/front_end/messages.status
+++ b/pkg/front_end/messages.status
@@ -30,12 +30,15 @@
 CannotReadSdkSpecification/analyzerCode: Fail
 CannotReadSdkSpecification/example: Fail
 CantDetermineConstness/analyzerCode: Fail
+CantDisambiguateAmbiguousInformation/analyzerCode: Fail # There's no analyzer code for that error yet.
+CantDisambiguateNotEnoughInformation/analyzerCode: Fail # There's no analyzer code for that error yet.
 CantInferPackagesFromManyInputs/analyzerCode: Fail
 CantInferPackagesFromManyInputs/example: Fail
 CantInferPackagesFromPackageUri/analyzerCode: Fail
 CantInferPackagesFromPackageUri/example: Fail
 CantInferTypeDueToCircularity/example: Fail
 CantInferTypeDueToInconsistentOverrides/example: Fail
+CantUseControlFlowOrSpreadAsConstant/example: Fail
 CantUseSuperBoundedTypeForInstanceCreation/analyzerCode: Fail
 CantUseSuperBoundedTypeForInstanceCreation/example: Fail
 ColonInPlaceOfIn/example: Fail
@@ -47,7 +50,6 @@
 ConflictsWithSetter/example: Fail
 ConflictsWithSetterWarning/example: Fail
 ConflictsWithTypeVariable/example: Fail
-ConstAfterFactory/script1: Fail
 ConstAndCovariant/script2: Fail
 ConstAndFinal/declaration3: Fail
 ConstAndFinal/declaration4: Fail
@@ -60,23 +62,37 @@
 ConstEvalContext/analyzerCode: Fail # This is just used for displaying the context.
 ConstEvalContext/example: Fail # This is just used for displaying the context.
 ConstEvalDeferredLibrary/example: Fail
+ConstEvalDuplicateElement/example: Fail
 ConstEvalDuplicateKey/example: Fail
+ConstEvalElementImplementsEqual/example: Fail
 ConstEvalFailedAssertion/example: Fail
 ConstEvalFailedAssertionWithMessage/example: Fail
 ConstEvalFreeTypeParameter/analyzerCode: Fail
 ConstEvalFreeTypeParameter/example: Fail
 ConstEvalInvalidBinaryOperandType/analyzerCode: Fail # CONST_EVAL_TYPE_NUM / CONST_EVAL_TYPE_BOOL
 ConstEvalInvalidBinaryOperandType/example: Fail
+ConstEvalInvalidEqualsOperandType/analyzerCode: Fail
+ConstEvalInvalidEqualsOperandType/example: Fail
 ConstEvalInvalidMethodInvocation/example: Fail
+ConstEvalInvalidPropertyGet/example: Fail
 ConstEvalInvalidStaticInvocation/example: Fail
 ConstEvalInvalidStringInterpolationOperand/example: Fail
 ConstEvalInvalidSymbolName/example: Fail
 ConstEvalInvalidType/analyzerCode: Fail # CONST_CONSTRUCTOR_FIELD_TYPE_MISMATCH / CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH / CONST_CONSTRUCTOR_PARAM_TYPE_MISMATCH / ...
 ConstEvalInvalidType/example: Fail
+ConstEvalIterationInConstList/example: Fail
+ConstEvalIterationInConstMap/example: Fail
+ConstEvalIterationInConstSet/example: Fail
+ConstEvalKeyImplementsEqual/example: Fail
 ConstEvalNegativeShift/analyzerCode: Fail # http://dartbug.com/33481
 ConstEvalNegativeShift/example: Fail
 ConstEvalNonConstantLiteral/example: Fail
 ConstEvalNonConstantVariableGet/example: Fail
+ConstEvalNotListOrSetInSpread/example: Fail
+ConstEvalNotMapInSpread/example: Fail
+ConstEvalNullValue/example: Fail
+ConstEvalUnevaluated/analyzerCode: Fail
+ConstEvalUnevaluated/example: Fail
 ConstEvalZeroDivisor/example: Fail
 ConstFieldWithoutInitializer/example: Fail
 ConstructorNotFound/example: Fail
@@ -128,6 +144,7 @@
 ExpectedClassMember/example: Fail
 ExpectedClassOrMixinBody/example: Fail
 ExpectedDeclaration/example: Fail
+ExpectedElseOrComma/example: Fail
 ExpectedFunctionBody/example: Fail
 ExpectedNamedArgument/example: Fail
 ExpectedOneExpression/analyzerCode: Fail
@@ -140,6 +157,7 @@
 ExpectedType/example: Fail
 ExpectedUri/analyzerCode: Fail
 ExpectedUri/example: Fail
+ExperimentNotEnabled/example: Fail
 ExportAfterPart/script1: Fail
 ExpressionNotMetadata/analyzerCode: Fail
 ExpressionNotMetadata/example: Fail
@@ -233,6 +251,8 @@
 InvalidInitializer/example: Fail
 InvalidPackageUri/analyzerCode: Fail
 InvalidPackageUri/example: Fail
+InvalidSuperInInitializer/example: Fail
+InvalidThisInInitializer/example: Fail
 InvalidUseOfNullAwareAccess/example: Fail
 InvalidVoid/script1: Fail
 InvalidVoid/script2: Fail
@@ -255,6 +275,7 @@
 MissingMain/example: Fail
 MissingPrefixInDeferredImport/example: Fail
 MixinInferenceNoMatchingClass/example: Fail
+ModifierOutOfOrder/script1: Fail
 MultipleExtends/script: Fail
 MultipleImplements/script: Fail
 MultipleLibraryDirectives/example: Fail
@@ -270,10 +291,12 @@
 NonConstConstructor/example: Fail
 NonConstFactory/example: Fail
 NonInstanceTypeVariableUse/example: Fail
+NonNullAwareSpreadIsNull/analyzerCode: Fail # There's no analyzer code for that error yet.
 NonPartOfDirectiveInPart/script1: Fail
 NotAConstantExpression/example: Fail
 NotAType/example: Fail
 NotAnLvalue/example: Fail
+NotBinaryOperator/analyzerCode: Fail
 NotConstantExpression/example: Fail
 OperatorMinusParameterMismatch/example: Fail
 OperatorParameterMismatch0/analyzerCode: Fail
@@ -335,6 +358,8 @@
 SourceBodySummary/example: Fail
 SourceOutlineSummary/analyzerCode: Fail
 SourceOutlineSummary/example: Fail
+SpreadMapEntryTypeMismatch/analyzerCode: Fail # There's no analyzer code for that error yet.
+SpreadTypeMismatch/analyzerCode: Fail # There's no analyzer code for that error yet.
 StackOverflow/example: Fail
 StaticAfterConst/script1: Fail
 SuperAsExpression/example: Fail
diff --git a/pkg/front_end/messages.yaml b/pkg/front_end/messages.yaml
index 023e1d2..bc98cf9 100644
--- a/pkg/front_end/messages.yaml
+++ b/pkg/front_end/messages.yaml
@@ -85,9 +85,21 @@
 ConstEvalContext:
   template: "While analyzing:"
 
+ConstEvalDuplicateElement:
+  template: "The element '#constant' conflicts with another existing element in the set."
+  analyzerCode: EQUAL_ELEMENTS_IN_CONST_SET
+
 ConstEvalDuplicateKey:
   template: "The key '#constant' conflicts with another existing key in the map."
-  analyzerCode: EQUAL_KEYS_IN_MAP
+  analyzerCode: EQUAL_KEYS_IN_CONST_MAP
+
+ConstEvalElementImplementsEqual:
+  template: "The element '#constant' does not have a primitive operator '=='."
+  analyzerCode: CONST_SET_ELEMENT_TYPE_IMPLEMENTS_EQUALS
+
+ConstEvalKeyImplementsEqual:
+  template: "The key '#constant' does not have a primitive operator '=='."
+  analyzerCode: CONST_MAP_KEY_EXPRESSION_TYPE_IMPLEMENTS_EQUALS
 
 ConstEvalNonConstantLiteral:
   template: "Can't have a non-constant #string literal within a const context."
@@ -99,6 +111,9 @@
 ConstEvalInvalidBinaryOperandType:
   template: "Binary operator '#string' on '#constant' requires operand of type '#type', but was of type '#type2'."
 
+ConstEvalInvalidEqualsOperandType:
+  template: "Binary operator '==' requires receiver constant '#constant' of type 'Null', 'bool', 'int', 'double', or 'String', but was of type '#type'."
+
 ConstEvalZeroDivisor:
   template: "Binary operator '#string' on '#string2' requires non-zero divisor, but divisor was '0'."
   analyzerCode: CONST_EVAL_THROWS_IDBZE
@@ -110,6 +125,10 @@
   template: "The method '#string' can't be invoked on '#constant' within a const context."
   analyzerCode: UNDEFINED_OPERATOR
 
+ConstEvalInvalidPropertyGet:
+  template: "The property '#string' can't be accessed on '#constant' within a const context."
+  analyzerCode: CONST_EVAL_THROWS_EXCEPTION
+
 ConstEvalInvalidStringInterpolationOperand:
   template: "The '#constant' can't be used as part of a string interpolation within a const context, only values of type 'null', 'bool', 'int', 'double', or 'String' can be used."
   analyzerCode: CONST_EVAL_TYPE_BOOL_NUM_STRING
@@ -150,6 +169,33 @@
   template: "Constant expression depends on itself."
   analyzerCode: RECURSIVE_COMPILE_TIME_CONSTANT
 
+ConstEvalNullValue:
+  template: "Null value during constant evaluation."
+  analyzerCode: CONST_EVAL_THROWS_EXCEPTION
+
+ConstEvalNotListOrSetInSpread:
+  template: "Only lists and sets can be used in spreads in constant lists and sets."
+  analyzerCode: CONST_SPREAD_EXPECTED_LIST_OR_SET
+
+ConstEvalNotMapInSpread:
+  template: "Only maps can be used in spreads in constant maps."
+  analyzerCode: CONST_SPREAD_EXPECTED_MAP
+
+ConstEvalIterationInConstList:
+  template: "Iteration can't be used in a constant list."
+  analyzerCode: NON_CONSTANT_LIST_ELEMENT
+
+ConstEvalIterationInConstSet:
+  template: "Iteration can't be used in a constant set."
+  analyzerCode: NON_CONSTANT_SET_ELEMENT
+
+ConstEvalIterationInConstMap:
+  template: "Iteration can't be used in a constant map."
+  analyzerCode: NON_CONSTANT_MAP_ELEMENT
+
+ConstEvalUnevaluated:
+  template: "Could not evaluate constant expression."
+
 NotConstantExpression:
   template: "#string is not a constant expression."
   analyzerCode: NOT_CONSTANT_EXPRESSION
@@ -173,6 +219,12 @@
   template: "Unable to decode bytes as UTF-8."
   bytes: [255]
 
+ExperimentNotEnabled:
+  index: 93
+  template: "This requires the '#string' experiment to be enabled."
+  tip: "Try enabling this experiment by adding it to the command line when compiling and running."
+  analyzerCode: ParserErrorCode.EXPERIMENT_NOT_ENABLED
+
 EmptyNamedParameterList:
   template: "Named parameter lists cannot be empty."
   tip: "Try adding a named parameter to the list."
@@ -195,6 +247,11 @@
       foo();
     }
 
+ExpectedElseOrComma:
+  index: 94
+  template: "Expected 'else' or comma."
+  analyzerCode: ParserErrorCode.EXPECTED_ELSE_OR_COMMA
+
 ExpectedBlock:
   template: "Expected a block."
   tip: "Try adding {}."
@@ -575,14 +632,22 @@
   tip: "Try using a constructor or factory that is 'const'."
   analyzerCode: NOT_CONSTANT_EXPRESSION
 
-ConstAfterFactory:
+ModifierOutOfOrder:
   index: 56
-  template: "The modifier 'const' should be before the modifier 'factory'."
+  template: "The modifier '#string' should be before the modifier '#string2'."
   tip: "Try re-ordering the modifiers."
-  analyzerCode: ParserErrorCode.CONST_AFTER_FACTORY
+  analyzerCode: ParserErrorCode.MODIFIER_OUT_OF_ORDER
   script:
     - "class C { factory const C() = prefix.B.foo; }"
 
+TypeBeforeFactory:
+  index: 97
+  template: "Factory constructors cannot have a return type."
+  tip: "Try removing the type appearing before 'factory'."
+  analyzerCode: ParserErrorCode.TYPE_BEFORE_FACTORY
+  script:
+    - "class C { T factory C() { return null; } }"
+
 ConstConstructorWithBody:
   template: "A const constructor can't have a body."
   tip: "Try removing either the 'const' keyword or the body."
@@ -626,7 +691,7 @@
 DuplicatedModifier:
   index: 70
   template: "The modifier '#lexeme' was already specified."
-  tip: "Try removing all but one occurance of the modifier."
+  tip: "Try removing all but one occurence of the modifier."
   analyzerCode: ParserErrorCode.DUPLICATED_MODIFIER
   script:
     - "class C { const const m; }"
@@ -1527,7 +1592,10 @@
 
       -Dname
       -Dname=value
-        Ignored for now.
+        Define an environment variable in the compile-time environment.
+
+      --no-defines
+        Ignore all -D options and leave environment constants unevaluated.
 
       --
         Stop option parsing, the rest of the command line is assumed to be
@@ -1544,6 +1612,9 @@
       --target=dart2js|dart2js_server|dart_runner|flutter|flutter_runner|none|vm
         Specify the target configuration.
 
+      --enable-asserts
+        Check asserts in initializers during constant evaluation.
+
       --verify
         Check that the generated output is free of various problems. This is mostly
         useful for developers of this compiler or Kernel transformations.
@@ -2019,12 +2090,12 @@
   analyzerCode: INVALID_OVERRIDE_REQUIRED
 
 OverrideTypeMismatchParameter:
-  template: "The parameter '#name' of the method '#name2' has type '#type', which does not match the corresponding type in the overridden method, '#type2'."
+  template: "The parameter '#name' of the method '#name2' has type '#type', which does not match the corresponding type, '#type2', in the overridden method, '#name3'."
   tip: "Change to a supertype of '#type2', or, for a covariant parameter, a subtype."
   analyzerCode: INVALID_METHOD_OVERRIDE
 
 OverrideTypeMismatchReturnType:
-  template: "The return type of the method '#name' is '#type', which does not match the return type of the overridden method, '#type2'."
+  template: "The return type of the method '#name' is '#type', which does not match the return type, '#type2', of the overridden method, '#name2'."
   tip: "Change to a subtype of '#type2'."
   analyzerCode: INVALID_METHOD_OVERRIDE
 
@@ -2116,7 +2187,7 @@
 
 ImportAfterPart:
   index: 10
-  template: "Import directives must preceed part directives."
+  template: "Import directives must precede part directives."
   tip: "Try moving the import directives before the part directives."
   analyzerCode: ParserErrorCode.IMPORT_DIRECTIVE_AFTER_PART_DIRECTIVE
   script:
@@ -2124,7 +2195,7 @@
 
 ExportAfterPart:
   index: 75
-  template: "Export directives must preceed part directives."
+  template: "Export directives must precede part directives."
   tip: "Try moving the export directives before the part directives."
   analyzerCode: ParserErrorCode.EXPORT_DIRECTIVE_AFTER_PART_DIRECTIVE
   script:
@@ -2414,7 +2485,7 @@
 
 MissingOperatorKeyword:
   index: 31
-  template: "Operator declarations must be preceeded by the keyword 'operator'."
+  template: "Operator declarations must be preceded by the keyword 'operator'."
   tip: "Try adding the keyword 'operator'."
   analyzerCode: ParserErrorCode.MISSING_KEYWORD_OPERATOR
   script:
@@ -2427,6 +2498,16 @@
   script:
     - "class C { void operator %=(x) {} }"
 
+NotBinaryOperator:
+  template: "'#lexeme' isn't a binary operator."
+  script: >
+    class C { operator~() { return null; } }
+
+    main() {
+      C c = new C();
+      print(c ~ 2);
+    }
+
 OperatorParameterMismatch0:
   template: "Operator '#name' shouldn't have any parameters."
 
@@ -2489,9 +2570,19 @@
   template: "SDK libraries specification not found: #uri."
   tip: "Normally, the specification is a file named 'libraries.json' in the Dart SDK install location."
 
+InvalidSuperInInitializer:
+  index: 95
+  template: "Can only use 'super' in an initializer for calling the superclass constructor (e.g. 'super()' or 'super.namedConstructor()')"
+  analyzerCode: ParserErrorCode.INVALID_SUPER_IN_INITIALIZER
+
+InvalidThisInInitializer:
+  index: 96
+  template: "Can only use 'this' in an initializer for field initialization (e.g. 'this.x = something') and constructor redirection (e.g. 'this()' or 'this.namedConstructor())"
+  analyzerCode: ParserErrorCode.INVALID_THIS_IN_INITIALIZER
+
 ThisAccessInFieldInitializer:
   template: "Can't access 'this' in a field initializer to read '#name'."
-  analyzerCode: THIS_ACCESS_FROM_INITIALIZER
+  analyzerCode: THIS_ACCESS_FROM_FIELD_INITIALIZER
 
 ThisOrSuperAccessInFieldInitializer:
   template: "Can't access '#string' in a field initializer."
@@ -2919,8 +3010,8 @@
     #num3%12.3 ms/libraries.
 
 CantInferTypeDueToInconsistentOverrides:
-  template: "Can't infer the type of '#string': overridden members must all have the same type."
-  tip: "Specify the type explicitly."
+  template: "Can't infer a type for '#name' as some of the inherited members have different types."
+  tip: "Try adding an explicit type."
   analyzerCode: INVALID_METHOD_OVERRIDE
 
 CantInferTypeDueToCircularity:
@@ -3109,6 +3200,10 @@
       prefix?.Object;
     }
 
+CantUseControlFlowOrSpreadAsConstant:
+  template: "'#lexeme' is not supported in constant expressions."
+  analyzerCode: NOT_CONSTANT_EXPRESSION
+
 CantUseDeferredPrefixAsConstant:
   template: >
     '#lexeme' can't be used in a constant expression because it's marked as
@@ -3461,3 +3556,88 @@
   # Used by dart:ffi
   template: "Class '#name' is a dart:ffi Pointer but has no struct annotation. Only struct Pointers can have fields."
   external: test/ffi_test.dart
+
+SpreadTypeMismatch:
+  template: "Unexpected type '#type' of a spread.  Expected 'dynamic' or an Iterable."
+  script:
+    - |
+      main() {
+        int a = 42;
+        var b = [...a];
+      }
+    - |
+      main() {
+        int Function() a = null;
+        var b = [...a];
+      }
+
+SpreadElementTypeMismatch:
+  template: "Can't assign spread elements of type '#type' to collection elements of type '#type2'."
+  analyzerCode: LIST_ELEMENT_TYPE_NOT_ASSIGNABLE
+  script: >
+    main() {
+      List<String> a = <String>["foo"];
+      List<int> b = <int>[...a];
+    }
+
+SpreadMapEntryTypeMismatch:
+  template: "Unexpected type '#type' of a map spread entry.  Expected 'dynamic' or a Map."
+  script:
+    - |
+      main() {
+        int a = 42;
+        var b = <dynamic, dynamic>{...a};
+      }
+    - |
+      main() {
+        int Function() a = null;
+        var b = <dynamic, dynamic>{...a};
+      }
+
+SpreadMapEntryElementKeyTypeMismatch:
+  template: "Can't assign spread entry keys of type '#type' to map entry keys of type '#type2'."
+  analyzerCode: MAP_KEY_TYPE_NOT_ASSIGNABLE
+  script: >
+    main() {
+      Map<String, int> a = <String, int>{"foo": 42};
+      Map<int, int> b = <int, int>{...a};
+    }
+
+SpreadMapEntryElementValueTypeMismatch:
+  template: "Can't assign spread entry values of type '#type' to map entry values of type '#type2'."
+  analyzerCode: MAP_VALUE_TYPE_NOT_ASSIGNABLE
+  script: >
+    main() {
+      Map<String, int> a = <String, int>{"foo": 42};
+      Map<String, String> b = <String, String>{...a};
+    }
+
+CantDisambiguateNotEnoughInformation:
+  template: "Not enough type information to disambiguate between literal set and literal map."
+  tip: "Try providing type arguments for the literal explicitly to disambiguate it."
+  script: >
+    foo(dynamic spread) {
+      var a = {...spread};
+    }
+
+CantDisambiguateAmbiguousInformation:
+  template: "Both Iterable and Map spread elements encountered in ambiguous literal."
+  script: >
+    foo(Iterable<int> iterableSpread, Map<int, int> mapSpread) {
+      var c = {...iterableSpread, ...mapSpread};
+    }
+
+SpreadElement:
+  template: "Iterable spread."
+  severity: CONTEXT
+
+SpreadMapElement:
+  template: "Map spread."
+  severity: CONTEXT
+
+NonNullAwareSpreadIsNull:
+  template: "Can't spread a value with static type Null."
+  script: >
+    main() {
+      <int>[...null];
+    }
diff --git a/pkg/front_end/pubspec.yaml b/pkg/front_end/pubspec.yaml
index 4928c97..1bfa71e 100644
--- a/pkg/front_end/pubspec.yaml
+++ b/pkg/front_end/pubspec.yaml
@@ -1,31 +1,24 @@
 name: front_end
 # Currently, front_end API is not stable and users should not
 # depend on semver semantics when depending on this package.
-version: 0.1.11
+version: 0.1.15
 author: Dart Team <misc@dartlang.org>
 description: Front end for compilation of Dart code.
 homepage: https://github.com/dart-lang/sdk/tree/master/pkg/front_end
 environment:
   sdk: '>=2.1.0-dev.5.0 <3.0.0'
 dependencies:
-  charcode: '^1.1.1'
-  convert: '^2.0.1'
-  crypto: '^2.0.2'
-  kernel: 0.3.11
-  meta: '^1.1.1'
+  kernel: 0.3.15
   package_config: '^1.0.1'
   path: '^1.3.9'
-  source_span: '^1.2.3'
   yaml: '^2.1.12'
 dev_dependencies:
-  analyzer: 0.35.1
+  analyzer: 0.36.0
   args: '>=0.13.0 <2.0.0'
   build_integration:
     path: ../build_integration
   dart_style: '^1.0.7'
   json_rpc_2: ^2.0.9
-  mockito: ^2.0.2
-  stream_channel: ^1.6.1
   test: ^1.3.4
   test_reflective_loader: ^0.1.0
   web_socket_channel: ^1.0.4
diff --git a/pkg/front_end/test/fasta/expression_test.dart b/pkg/front_end/test/fasta/expression_test.dart
index 0a895c8..643d94c 100644
--- a/pkg/front_end/test/fasta/expression_test.dart
+++ b/pkg/front_end/test/fasta/expression_test.dart
@@ -107,6 +107,9 @@
           buffer.write(line);
         }
         buffer.write("\n");
+        // TODO(jensj): Ignore context for now.
+        // Remove once we have positions on type parameters.
+        break;
       }
     }
     buffer.write("}\n");
@@ -125,6 +128,8 @@
 
   final Uri entryPoint;
 
+  final Uri import;
+
   final List<String> definitions;
 
   final List<String> typeDefinitions;
@@ -142,6 +147,7 @@
   TestCase(
       this.description,
       this.entryPoint,
+      this.import,
       this.definitions,
       this.typeDefinitions,
       this.isStaticMethod,
@@ -152,6 +158,7 @@
   String toString() {
     return "TestCase("
         "$entryPoint, "
+        "$import, "
         "$definitions, "
         "$typeDefinitions,"
         "$library, "
@@ -242,6 +249,7 @@
     String contents = await new File.fromUri(uri).readAsString();
 
     Uri entryPoint;
+    Uri import;
     List<String> definitions = <String>[];
     List<String> typeDefinitions = <String>[];
     bool isStaticMethod = false;
@@ -260,6 +268,8 @@
 
         if (key == "entry_point") {
           entryPoint = description.uri.resolveUri(Uri.parse(value as String));
+        } else if (key == "import") {
+          import = description.uri.resolveUri(Uri.parse(value as String));
         } else if (key == "position") {
           Uri uri = description.uri.resolveUri(Uri.parse(value as String));
           library = uri.removeFragment();
@@ -277,7 +287,7 @@
           expression = value;
         }
       }
-      var test = new TestCase(description, entryPoint, definitions,
+      var test = new TestCase(description, entryPoint, import, definitions,
           typeDefinitions, isStaticMethod, library, className, expression);
       var result = test.validate();
       if (result != null) {
@@ -331,9 +341,14 @@
       context.fileSystem.entityForUri(test.entryPoint).writeAsBytesSync(
           await new File.fromUri(test.entryPoint).readAsBytes());
 
+      if (test.import != null) {
+        context.fileSystem.entityForUri(test.import).writeAsBytesSync(
+            await new File.fromUri(test.import).readAsBytes());
+      }
+
       var sourceCompiler = new IncrementalCompiler(context.compilerContext);
       Component component =
-          await sourceCompiler.computeDelta(entryPoint: test.entryPoint);
+          await sourceCompiler.computeDelta(entryPoints: [test.entryPoint]);
       var errors = context.takeErrors();
       if (!errors.isEmpty) {
         return fail(tests, "Couldn't compile entry-point: $errors");
@@ -350,7 +365,8 @@
 
       var dillCompiler =
           new IncrementalCompiler(context.compilerContext, dillFileUri);
-      component = await dillCompiler.computeDelta(entryPoint: test.entryPoint);
+      component =
+          await dillCompiler.computeDelta(entryPoints: [test.entryPoint]);
       component.computeCanonicalNames();
       await dillFile.delete();
 
@@ -390,6 +406,7 @@
   final CompilerOptions optionBuilder = new CompilerOptions()
     ..target = new VmTarget(new TargetFlags())
     ..verbose = true
+    ..omitPlatform = true
     ..fileSystem = fs
     ..sdkSummary = sdkSummary
     ..onDiagnostic = (DiagnosticMessage message) {
diff --git a/pkg/front_end/test/fasta/generator_to_string_test.dart b/pkg/front_end/test/fasta/generator_to_string_test.dart
index 7580c2a..6987266 100644
--- a/pkg/front_end/test/fasta/generator_to_string_test.dart
+++ b/pkg/front_end/test/fasta/generator_to_string_test.dart
@@ -205,7 +205,7 @@
         "ThisAccessGenerator(offset: 4, isInitializer: false, isSuper: false)",
         new ThisAccessGenerator(helper, token, false, false));
     check("IncompleteErrorGenerator(offset: 4, message: Unspecified)",
-        new IncompleteErrorGenerator(helper, token, getter, message));
+        new IncompleteErrorGenerator(helper, token, message));
     check("SendAccessGenerator(offset: 4, name: bar, arguments: (\"arg\"))",
         new SendAccessGenerator(helper, token, name, arguments));
     check("IncompletePropertyAccessGenerator(offset: 4, name: bar)",
diff --git a/pkg/front_end/test/fasta/incremental_hello_test.dart b/pkg/front_end/test/fasta/incremental_hello_test.dart
index 1ac768d..a662c8c 100644
--- a/pkg/front_end/test/fasta/incremental_hello_test.dart
+++ b/pkg/front_end/test/fasta/incremental_hello_test.dart
@@ -37,6 +37,7 @@
     ..packagesFileUri = Uri.base.resolve(".packages")
     ..target = new VmTarget(new TargetFlags(legacyMode: true))
     ..legacyMode = true
+    ..omitPlatform = true
     ..onDiagnostic = diagnosticMessageHandler;
 
   if (sdkFromSource) {
@@ -71,12 +72,12 @@
 
   compiler.invalidate(helloDart);
 
-  component = await compiler.computeDelta(entryPoint: helloDart);
+  component = await compiler.computeDelta(entryPoints: [helloDart]);
   // Expect that the new component contains exactly hello.dart
   Expect.isTrue(
       component.libraries.length == 1, "${component.libraries.length} != 1");
 
-  component = await compiler.computeDelta(entryPoint: helloDart);
+  component = await compiler.computeDelta(entryPoints: [helloDart]);
   Expect.isTrue(component.libraries.isEmpty);
 }
 
diff --git a/pkg/front_end/test/fasta/incremental_test.dart b/pkg/front_end/test/fasta/incremental_test.dart
index 5324602..4208d17 100644
--- a/pkg/front_end/test/fasta/incremental_test.dart
+++ b/pkg/front_end/test/fasta/incremental_test.dart
@@ -153,7 +153,8 @@
         return edits == 0 ? fail(test, "No sources found") : pass(test);
       }
       var compiler = context.compiler;
-      Component component = await compiler.computeDelta(entryPoint: entryPoint);
+      Component component =
+          await compiler.computeDelta(entryPoints: [entryPoint]);
       List<DiagnosticMessage> errors = context.takeErrors();
       if (test.expectations[edits].hasCompileTimeError) {
         if (errors.isEmpty) {
diff --git a/pkg/front_end/test/fasta/object_supertype_test.dart b/pkg/front_end/test/fasta/object_supertype_test.dart
index fd00300..a3bc5bd 100644
--- a/pkg/front_end/test/fasta/object_supertype_test.dart
+++ b/pkg/front_end/test/fasta/object_supertype_test.dart
@@ -62,7 +62,7 @@
         ..fileSystem = fs
         ..compileSdk = true
         ..librariesSpecificationUri = librariesSpecificationUri,
-      inputs: [Uri.parse("dart:core")]));
+      inputs: [Uri.parse("dart:core"), Uri.parse("dart:collection")]));
 
   await context.runInContext<void>((_) async {
     CompileTask task = new CompileTask(context, ticker);
diff --git a/pkg/front_end/test/fasta/parser/literal_entry_info_test.dart b/pkg/front_end/test/fasta/parser/literal_entry_info_test.dart
index 0da8a6c..fcaed11 100644
--- a/pkg/front_end/test/fasta/parser/literal_entry_info_test.dart
+++ b/pkg/front_end/test/fasta/parser/literal_entry_info_test.dart
@@ -21,47 +21,49 @@
 class CollectionElementTest {
   test_closingBrace() {
     parseEntry(
-      'before }',
+      '[ }',
       [
         'handleIdentifier  expression',
         'handleNoTypeArguments }',
         'handleNoArguments }',
         'handleSend  }',
+        'handleLiteralList 1, [, null, ]',
       ],
-      errors: [error(codeExpectedIdentifier, 7, 1)],
+      errors: [error(codeExpectedIdentifier, 2, 1)],
       expectAfter: '}',
     );
   }
 
   test_comma() {
     parseEntry(
-      'before ,',
+      '[ ,',
       [
         'handleIdentifier  expression',
         'handleNoTypeArguments ,',
         'handleNoArguments ,',
         'handleSend  ,',
+        'handleLiteralList 1, [, null, ]',
       ],
-      errors: [error(codeExpectedIdentifier, 7, 1)],
-      expectAfter: ',',
+      errors: [error(codeExpectedIdentifier, 2, 1)],
     );
   }
 
   test_expression() {
     parseEntry(
-      'before x',
+      '[ x',
       [
         'handleIdentifier x expression',
-        'handleNoTypeArguments ',
-        'handleNoArguments ',
-        'handleSend x ',
+        'handleNoTypeArguments ]',
+        'handleNoArguments ]',
+        'handleSend x ]',
+        'handleLiteralList 1, [, null, ]',
       ],
     );
   }
 
   test_for() {
     parseEntry(
-      'before for (var i = 0; i < 10; ++i) 2',
+      '[ for (var i = 0; i < 10; ++i) 2',
       [
         'beginForControlFlow null for',
         'beginMetadataStar var',
@@ -92,13 +94,14 @@
         'handleForInitializerExpressionStatement for ( ; 1',
         'handleLiteralInt 2',
         'endForControlFlow 2',
+        'handleLiteralList 1, [, null, ]',
       ],
     );
   }
 
   test_forForFor() {
     parseEntry(
-      'before for (var i = 0; i < 10; ++i) for (x in y) for (var a in [6]) 2',
+      '[ for (var i = 0; i < 10; ++i) for (x in y) for (var a in [6]) 2',
       [
         // for (var i = 0; i < 10; ++i)
         'beginForControlFlow null for',
@@ -168,13 +171,14 @@
         'endForInControlFlow 2',
         // end for
         'endForControlFlow 2',
+        'handleLiteralList 1, [, null, ]',
       ],
     );
   }
 
   test_forIfForElse() {
     parseEntry(
-      'before await for (var x in y) if (a) for (b in c) 2 else 7',
+      '[ await for (var x in y) if (a) for (b in c) 2 else 7',
       [
         // await for (var x in y)
         'beginForControlFlow await for',
@@ -202,6 +206,7 @@
         'handleNoArguments )',
         'handleSend a )',
         'handleParenthesizedCondition (',
+        'beginThenControlFlow )',
         // nested for (b in c)
         'beginForControlFlow null for',
         'handleIdentifier b expression',
@@ -228,6 +233,7 @@
         'endIfElseControlFlow 7',
         // end for
         'endForInControlFlow 7',
+        'handleLiteralList 1, [, null, ]',
       ],
       inAsync: true,
     );
@@ -235,7 +241,7 @@
 
   test_forIn() {
     parseEntry(
-      'before await for (var x in y) 2',
+      '[ await for (var x in y) 2',
       [
         'beginForControlFlow await for',
         'beginMetadataStar var',
@@ -257,6 +263,7 @@
         'handleForInLoopParts await for ( in',
         'handleLiteralInt 2',
         'endForInControlFlow 2',
+        'handleLiteralList 1, [, null, ]',
       ],
       inAsync: true,
     );
@@ -264,7 +271,7 @@
 
   test_forInSpread() {
     parseEntry(
-      'before for (var x in y) ...[2]',
+      '[ for (var x in y) ...[2]',
       [
         'beginForControlFlow null for',
         'beginMetadataStar var',
@@ -289,13 +296,14 @@
         'handleLiteralList 1, [, null, ]',
         'handleSpreadExpression ...',
         'endForInControlFlow ]',
+        'handleLiteralList 1, [, null, ]',
       ],
     );
   }
 
   test_forSpreadQ() {
     parseEntry(
-      'before for (i = 0; i < 10; ++i) ...[2]',
+      '[ for (i = 0; i < 10; ++i) ...[2]',
       [
         'beginForControlFlow null for',
         'handleIdentifier i expression',
@@ -324,46 +332,52 @@
         'handleLiteralList 1, [, null, ]',
         'handleSpreadExpression ...',
         'endForControlFlow ]',
+        'handleLiteralList 1, [, null, ]',
       ],
     );
   }
 
   test_if() {
     parseEntry(
-      'before if (true) 2',
+      '[ if (true) 2',
       [
         'beginIfControlFlow if',
         'handleLiteralBool true',
         'handleParenthesizedCondition (',
+        'beginThenControlFlow )',
         'handleLiteralInt 2',
         'endIfControlFlow 2',
+        'handleLiteralList 1, [, null, ]',
       ],
     );
   }
 
   test_ifElse() {
     parseEntry(
-      'before if (true) 2 else 5',
+      '[ if (true) 2 else 5',
       [
         'beginIfControlFlow if',
         'handleLiteralBool true',
         'handleParenthesizedCondition (',
+        'beginThenControlFlow )',
         'handleLiteralInt 2',
         'handleElseControlFlow else',
         'handleLiteralInt 5',
         'endIfElseControlFlow 5',
+        'handleLiteralList 1, [, null, ]',
       ],
     );
   }
 
   test_ifFor() {
     parseEntry(
-      'before if (true) for (x in y) 2',
+      '[ if (true) for (x in y) 2',
       [
         // if (true)
         'beginIfControlFlow if',
         'handleLiteralBool true',
         'handleParenthesizedCondition (',
+        'beginThenControlFlow )',
         // nested for (x in y)
         'beginForControlFlow null for',
         'handleIdentifier x expression',
@@ -384,18 +398,20 @@
         'endForInControlFlow 2',
         // end if
         'endIfControlFlow 2',
+        'handleLiteralList 1, [, null, ]',
       ],
     );
   }
 
   test_ifForElseIfFor() {
     parseEntry(
-      'before if (true) for (a in b) 2 else if (c) for (d in e) 5',
+      '[ if (true) for (a in b) 2 else if (c) for (d in e) 5',
       [
         // if (true)
         'beginIfControlFlow if',
         'handleLiteralBool true',
         'handleParenthesizedCondition (',
+        'beginThenControlFlow )',
         // nested for (a in b)
         'beginForControlFlow null for',
         'handleIdentifier a expression',
@@ -423,6 +439,7 @@
         'handleNoArguments )',
         'handleSend c )',
         'handleParenthesizedCondition (',
+        'beginThenControlFlow )',
         // nested for (d in e)
         'beginForControlFlow null for',
         'handleIdentifier d expression',
@@ -445,33 +462,37 @@
         'endIfControlFlow 5',
         // end else
         'endIfElseControlFlow 5',
+        'handleLiteralList 1, [, null, ]',
       ],
     );
   }
 
   test_ifSpreadQ() {
     parseEntry(
-      'before if (true) ...?[2]',
+      '[ if (true) ...?[2]',
       [
         'beginIfControlFlow if',
         'handleLiteralBool true',
         'handleParenthesizedCondition (',
+        'beginThenControlFlow )',
         'handleNoTypeArguments [',
         'handleLiteralInt 2',
         'handleLiteralList 1, [, null, ]',
         'handleSpreadExpression ...?',
         'endIfControlFlow ]',
+        'handleLiteralList 1, [, null, ]',
       ],
     );
   }
 
   test_ifElseSpreadQ() {
     parseEntry(
-      'before if (true) ...?[2] else ... const {5}',
+      '[ if (true) ...?[2] else ... const {5}',
       [
         'beginIfControlFlow if',
         'handleLiteralBool true',
         'handleParenthesizedCondition (',
+        'beginThenControlFlow )',
         'handleNoTypeArguments [',
         'handleLiteralInt 2',
         'handleLiteralList 1, [, null, ]',
@@ -480,35 +501,39 @@
         'beginConstLiteral {',
         'handleNoTypeArguments {',
         'handleLiteralInt 5',
-        'handleLiteralSet 1, {, const, }',
-        'endConstLiteral ',
+        'handleLiteralSetOrMap 1, {, const, }',
+        'endConstLiteral ]',
         'handleSpreadExpression ...',
         'endIfElseControlFlow }',
+        'handleLiteralList 1, [, null, ]',
       ],
     );
   }
 
   test_intLiteral() {
-    parseEntry('before 1', [
+    parseEntry('[ 1', [
       'handleLiteralInt 1',
+      'handleLiteralList 1, [, null, ]',
     ]);
   }
 
   test_spread() {
-    parseEntry('before ...[1]', [
+    parseEntry('[ ...[1]', [
       'handleNoTypeArguments [',
       'handleLiteralInt 1',
       'handleLiteralList 1, [, null, ]',
       'handleSpreadExpression ...',
+      'handleLiteralList 1, [, null, ]',
     ]);
   }
 
   test_spreadQ() {
-    parseEntry('before ...?[1]', [
+    parseEntry('[ ...?[1]', [
       'handleNoTypeArguments [',
       'handleLiteralInt 1',
       'handleLiteralList 1, [, null, ]',
       'handleSpreadExpression ...?',
+      'handleLiteralList 1, [, null, ]',
     ]);
   }
 
@@ -518,7 +543,7 @@
     final listener = new TestInfoListener();
     final parser = new Parser(listener);
     if (inAsync != null) parser.asyncState = AsyncModifier.Async;
-    final lastConsumed = parser.parseListOrSetLiteralEntry(start);
+    final lastConsumed = parser.parseLiteralListSuffix(start, null);
 
     expect(listener.errors, errors);
     try {
@@ -696,7 +721,7 @@
         'handleLiteralInt 2',
         'handleLiteralInt 3',
         'handleLiteralMapEntry :, }',
-        'handleLiteralMap 1, {, null, }',
+        'handleLiteralSetOrMap 1, {, null, }',
         'handleSpreadExpression ...',
         'endForInControlFlow }',
       ],
@@ -733,7 +758,7 @@
         'handleLiteralInt 2',
         'handleLiteralInt 7',
         'handleLiteralMapEntry :, }',
-        'handleLiteralMap 1, {, null, }',
+        'handleLiteralSetOrMap 1, {, null, }',
         'handleSpreadExpression ...?',
         'endForControlFlow }',
       ],
@@ -747,6 +772,7 @@
         'beginIfControlFlow if',
         'handleLiteralBool true',
         'handleParenthesizedCondition (',
+        'beginThenControlFlow )',
         'handleLiteralInt 2',
         'handleLiteralInt 3',
         'handleLiteralMapEntry :, ',
@@ -762,11 +788,12 @@
         'beginIfControlFlow if',
         'handleLiteralBool true',
         'handleParenthesizedCondition (',
+        'beginThenControlFlow )',
         'handleNoTypeArguments {',
         'handleLiteralInt 2',
         'handleLiteralInt 3',
         'handleLiteralMapEntry :, }',
-        'handleLiteralMap 1, {, null, }',
+        'handleLiteralSetOrMap 1, {, null, }',
         'handleSpreadExpression ...',
         'endIfControlFlow }',
       ],
@@ -788,7 +815,7 @@
       'handleLiteralInt 1',
       'handleLiteralInt 2',
       'handleLiteralMapEntry :, }',
-      'handleLiteralMap 1, {, const, }',
+      'handleLiteralSetOrMap 1, {, const, }',
       'endConstLiteral ',
       'handleSpreadExpression ...',
     ]);
@@ -801,7 +828,7 @@
       'handleLiteralInt 1',
       'handleLiteralInt 3',
       'handleLiteralMapEntry :, }',
-      'handleLiteralMap 1, {, const, }',
+      'handleLiteralSetOrMap 1, {, const, }',
       'endConstLiteral ',
       'handleSpreadExpression ...?',
     ]);
@@ -860,6 +887,11 @@
   }
 
   @override
+  void beginThenControlFlow(Token token) {
+    calls.add('beginThenControlFlow $token');
+  }
+
+  @override
   void beginInitializedIdentifier(Token token) {
     calls.add('beginInitializedIdentifier $token');
   }
@@ -996,10 +1028,17 @@
   }
 
   @override
-  void handleLiteralMap(
-      int count, Token leftBrace, Token constKeyword, Token rightBrace) {
-    calls
-        .add('handleLiteralMap $count, $leftBrace, $constKeyword, $rightBrace');
+  void handleLiteralSetOrMap(
+    int count,
+    Token leftBrace,
+    Token constKeyword,
+    Token rightBrace,
+    // TODO(danrubel): hasSetEntry parameter exists for replicating existing
+    // behavior and will be removed once unified collection has been enabled
+    bool hasSetEntry,
+  ) {
+    calls.add(
+        'handleLiteralSetOrMap $count, $leftBrace, $constKeyword, $rightBrace');
   }
 
   @override
@@ -1008,12 +1047,6 @@
   }
 
   @override
-  void handleLiteralSet(
-      int count, Token beginToken, Token constKeyword, Token token) {
-    calls.add('handleLiteralSet $count, $beginToken, $constKeyword, $token');
-  }
-
-  @override
   void handleNoArguments(Token token) {
     calls.add('handleNoArguments $token');
   }
diff --git a/pkg/front_end/test/fasta/parser/type_info_test.dart b/pkg/front_end/test/fasta/parser/type_info_test.dart
index eced64d..5c37a69 100644
--- a/pkg/front_end/test/fasta/parser/type_info_test.dart
+++ b/pkg/front_end/test/fasta/parser/type_info_test.dart
@@ -45,7 +45,8 @@
   assert(source != null, 'source must not be null');
   StringScanner scanner =
       new StringScanner(source, includeComments: includeComments)
-        ..enableGtGtGt = true;
+        ..enableGtGtGt = true
+        ..enableGtGtGtEq = true;
   return _tokenizeAndRecover(scanner, recover, source: source);
 }
 
@@ -58,8 +59,7 @@
     recover ??= defaultRecoveryStrategy;
     tokens = recover(bytes, tokens, scanner.lineStarts);
   }
-  return new ScannerResult(
-      tokens, scanner.lineStarts, scanner.hasErrors, scanner.errors);
+  return new ScannerResult(tokens, scanner.lineStarts, scanner.hasErrors);
 }
 
 @reflectiveTest
@@ -1807,6 +1807,45 @@
       'handleType S null',
       'endTypeArguments 1 < >'
     ]);
+    expectComplexTypeArg('<S<T<U>>>=',
+        typeArgumentCount: 1,
+        expectedAfter: '=',
+        expectedCalls: [
+          'beginTypeArguments <',
+          'handleIdentifier S typeReference',
+          'beginTypeArguments <',
+          'handleIdentifier T typeReference',
+          'beginTypeArguments <',
+          'handleIdentifier U typeReference',
+          'handleNoTypeArguments >>>=',
+          'handleType U null',
+          'endTypeArguments 1 < >',
+          'handleType T null',
+          'endTypeArguments 1 < >',
+          'handleType S null',
+          'endTypeArguments 1 < >'
+        ]);
+    expectComplexTypeArg('<S<T<U,V>>>=',
+        typeArgumentCount: 1,
+        expectedAfter: '=',
+        expectedCalls: [
+          'beginTypeArguments <',
+          'handleIdentifier S typeReference',
+          'beginTypeArguments <',
+          'handleIdentifier T typeReference',
+          'beginTypeArguments <',
+          'handleIdentifier U typeReference',
+          'handleNoTypeArguments ,',
+          'handleType U null',
+          'handleIdentifier V typeReference',
+          'handleNoTypeArguments >>>=',
+          'handleType V null',
+          'endTypeArguments 2 < >',
+          'handleType T null',
+          'endTypeArguments 1 < >',
+          'handleType S null',
+          'endTypeArguments 1 < >'
+        ]);
     expectComplexTypeArg('<S<Function()>>',
         typeArgumentCount: 1,
         expectedCalls: [
@@ -1876,6 +1915,27 @@
           'handleType S null',
           'endTypeArguments 1 < >'
         ]);
+    expectComplexTypeArg('<S<T<void Function()>>>=',
+        typeArgumentCount: 1,
+        expectedAfter: '=',
+        expectedCalls: [
+          'beginTypeArguments <',
+          'handleIdentifier S typeReference',
+          'beginTypeArguments <',
+          'handleIdentifier T typeReference',
+          'beginTypeArguments <',
+          'handleNoTypeVariables (',
+          'beginFunctionType void', // was 'beginFunctionType Function'
+          'handleVoidKeyword void', // was 'handleNoType <'
+          'beginFormalParameters ( MemberKind.GeneralizedFunctionType',
+          'endFormalParameters 0 ( ) MemberKind.GeneralizedFunctionType',
+          'endFunctionType Function null',
+          'endTypeArguments 1 < >',
+          'handleType T null',
+          'endTypeArguments 1 < >',
+          'handleType S null',
+          'endTypeArguments 1 < >'
+        ]);
   }
 
   void test_computeTypeArg_complex_recovery() {
@@ -2363,6 +2423,33 @@
           'endTypeVariable > 0 extends',
           'endTypeVariables < >'
         ]);
+    expectComplexTypeParam('<T extends List<Map<S, T>>>=',
+        typeArgumentCount: 1,
+        expectedAfter: '=',
+        expectedCalls: [
+          'beginTypeVariables <',
+          'beginMetadataStar T',
+          'endMetadataStar 0',
+          'handleIdentifier T typeVariableDeclaration',
+          'beginTypeVariable T',
+          'handleTypeVariablesDefined > 1',
+          'handleIdentifier List typeReference',
+          'beginTypeArguments <',
+          'handleIdentifier Map typeReference',
+          'beginTypeArguments <',
+          'handleIdentifier S typeReference',
+          'handleNoTypeArguments ,',
+          'handleType S null',
+          'handleIdentifier T typeReference',
+          'handleNoTypeArguments >>>=',
+          'handleType T null',
+          'endTypeArguments 2 < >',
+          'handleType Map null',
+          'endTypeArguments 1 < >',
+          'handleType List null',
+          'endTypeVariable >= 0 extends',
+          'endTypeVariables < >'
+        ]);
   }
 
   void test_computeTypeParam_34850() {
diff --git a/pkg/front_end/test/fasta/testing/suite.dart b/pkg/front_end/test/fasta/testing/suite.dart
index 6689d9f..cc77877 100644
--- a/pkg/front_end/test/fasta/testing/suite.dart
+++ b/pkg/front_end/test/fasta/testing/suite.dart
@@ -131,7 +131,9 @@
   final Uri vm;
   final bool legacyMode;
   final bool onlyCrashes;
+  final bool enableControlFlowCollections;
   final bool enableSetLiterals;
+  final bool enableSpreadCollections;
   final bool skipVm;
   final Map<Component, KernelTarget> componentToTarget =
       <Component, KernelTarget>{};
@@ -155,7 +157,9 @@
       this.legacyMode,
       this.platformBinaries,
       this.onlyCrashes,
+      this.enableControlFlowCollections,
       this.enableSetLiterals,
+      this.enableSpreadCollections,
       bool ignoreExpectations,
       this.updateExpectations,
       bool updateComments,
@@ -243,7 +247,12 @@
     Uri sdk = Uri.base.resolve("sdk/");
     Uri vm = Uri.base.resolveUri(new Uri.file(Platform.resolvedExecutable));
     Uri packages = Uri.base.resolve(".packages");
+    bool legacyMode = environment.containsKey(LEGACY_MODE);
+    bool enableControlFlowCollections =
+        environment["enableControlFlowCollections"] != "false" && !legacyMode;
     bool enableSetLiterals = environment["enableSetLiterals"] != "false";
+    bool enableSpreadCollections =
+        environment["enableSpreadCollections"] != "false" && !legacyMode;
     var options = new ProcessedOptions(
         options: new CompilerOptions()
           ..onDiagnostic = (DiagnosticMessage message) {
@@ -252,10 +261,12 @@
           ..sdkRoot = sdk
           ..packagesFileUri = packages
           ..experimentalFlags = <ExperimentalFlag, bool>{
-            ExperimentalFlag.setLiterals: enableSetLiterals
+            ExperimentalFlag.controlFlowCollections:
+                enableControlFlowCollections,
+            ExperimentalFlag.setLiterals: enableSetLiterals,
+            ExperimentalFlag.spreadCollections: enableSpreadCollections,
           });
     UriTranslator uriTranslator = await options.getUriTranslator();
-    bool legacyMode = environment.containsKey(LEGACY_MODE);
     bool onlyCrashes = environment["onlyCrashes"] == "true";
     bool ignoreExpectations = environment["ignoreExpectations"] == "true";
     bool updateExpectations = environment["updateExpectations"] == "true";
@@ -274,7 +285,9 @@
             ? computePlatformBinariesLocation(forceBuildDir: true)
             : Uri.base.resolve(platformBinaries),
         onlyCrashes,
+        enableControlFlowCollections,
         enableSetLiterals,
+        enableSpreadCollections,
         ignoreExpectations,
         updateExpectations,
         updateComments,
@@ -341,7 +354,10 @@
             errors.writeAll(message.plainTextFormatted, "\n");
           }
           ..experimentalFlags = <ExperimentalFlag, bool>{
-            ExperimentalFlag.setLiterals: context.enableSetLiterals
+            ExperimentalFlag.controlFlowCollections:
+                context.enableControlFlowCollections,
+            ExperimentalFlag.setLiterals: context.enableSetLiterals,
+            ExperimentalFlag.spreadCollections: context.enableSpreadCollections,
           },
         inputs: <Uri>[description.uri]);
     return await CompilerContext.runWithOptions(options, (_) async {
diff --git a/pkg/front_end/test/fasta/type_inference/interface_resolver_test.dart b/pkg/front_end/test/fasta/type_inference/interface_resolver_test.dart
index 0b6ee37..b19a80f 100644
--- a/pkg/front_end/test/fasta/type_inference/interface_resolver_test.dart
+++ b/pkg/front_end/test/fasta/type_inference/interface_resolver_test.dart
@@ -595,7 +595,8 @@
 
   void test_direct_isGenericCovariant() {
     var typeParameter = new TypeParameter('T', objectType);
-    var u = new TypeParameter('U', new TypeParameterType(typeParameter));
+    var u = new TypeParameter('U', new TypeParameterType(typeParameter))
+      ..isGenericCovariantImpl = true;
     var x = new VariableDeclarationJudgment('x', 0,
         type: new TypeParameterType(typeParameter));
     var y = new VariableDeclarationJudgment('y', 0,
diff --git a/pkg/front_end/test/fasta/type_promotion_look_ahead_test.dart b/pkg/front_end/test/fasta/type_promotion_look_ahead_test.dart
index d4a75fb..8b4fe9a 100644
--- a/pkg/front_end/test/fasta/type_promotion_look_ahead_test.dart
+++ b/pkg/front_end/test/fasta/type_promotion_look_ahead_test.dart
@@ -91,7 +91,8 @@
     return context.context
         .runInContext<Result<TypePromotionResult>>((CompilerContext c) async {
       Uri uri = file.file.uri;
-      c.uriToSource[uri] = new Source(file.result.lineStarts, file.file.bytes);
+      c.uriToSource[uri] =
+          new Source(file.result.lineStarts, file.file.bytes, uri, uri);
       StringBuffer buffer = new StringBuffer();
       Parser parser = new Parser(new TestListener(uri, buffer));
       try {
diff --git a/pkg/front_end/test/fasta/types/.gitignore b/pkg/front_end/test/fasta/types/.gitignore
new file mode 100644
index 0000000..7d444c6
--- /dev/null
+++ b/pkg/front_end/test/fasta/types/.gitignore
@@ -0,0 +1,2 @@
+benchmark_data.tar.gz
+benchmark_data/
diff --git a/pkg/front_end/test/fasta/types/README.md b/pkg/front_end/test/fasta/types/README.md
new file mode 100644
index 0000000..d459f63
--- /dev/null
+++ b/pkg/front_end/test/fasta/types/README.md
@@ -0,0 +1,28 @@
+<!--
+  -- Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+  -- for details. All rights reserved. Use of this source code is governed by a
+  -- BSD-style license that can be found in the LICENSE file.
+  -->
+
+# Type Relation Test and Benchmarks
+
+This directory contains tests and benchmarks of type relations, for example,
+isSubtypeOf.
+
+## Create or Update Benchmark Data
+
+To collect new data for a benchmark, follow these steps:
+
+1. Identify the program that the benchmark is based on, for example,
+`pkg/compiler/bin/dart2js.dart`.
+
+2. Modify `pkg/kernel/lib/type_environment.dart` as described in the method
+`SubtypeTester._collect_isSubtypeOf`.
+
+3. Compile the program using Fasta, for example:
+
+    ./sdk/bin/dart pkg/front_end/tool/_fasta/compile.dart pkg/compiler/bin/dart2js.dart
+
+4. This produces a file named `type_checks.json` in the current directory.
+
+5. Compress the file using `gzip`.
\ No newline at end of file
diff --git a/pkg/front_end/test/fasta/types/benchmark_data.tar.gz.sha1 b/pkg/front_end/test/fasta/types/benchmark_data.tar.gz.sha1
new file mode 100644
index 0000000..c90e80c
--- /dev/null
+++ b/pkg/front_end/test/fasta/types/benchmark_data.tar.gz.sha1
@@ -0,0 +1 @@
+99b405b34da1ffbac3c55d2aeece5d72bb9434b4
\ No newline at end of file
diff --git a/pkg/front_end/test/fasta/types/dart2js_benchmark.dart b/pkg/front_end/test/fasta/types/dart2js_benchmark.dart
new file mode 100644
index 0000000..414a69a
--- /dev/null
+++ b/pkg/front_end/test/fasta/types/dart2js_benchmark.dart
@@ -0,0 +1,10 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "dart:io" show Platform;
+
+import "subtypes_benchmark.dart" show run;
+
+main() =>
+    run(Platform.script.resolve("benchmark_data/dart2js.json.gz"), "Dart2js");
diff --git a/pkg/front_end/test/fasta/types/dart2js_benchmark_test.dart b/pkg/front_end/test/fasta/types/dart2js_benchmark_test.dart
new file mode 100644
index 0000000..551647d
--- /dev/null
+++ b/pkg/front_end/test/fasta/types/dart2js_benchmark_test.dart
@@ -0,0 +1,7 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "dart2js_benchmark.dart" as bench show main;
+
+main() => bench.main();
diff --git a/pkg/front_end/test/fasta/types/dill_hierachy_test.dart b/pkg/front_end/test/fasta/types/dill_hierachy_test.dart
new file mode 100644
index 0000000..31304d3
--- /dev/null
+++ b/pkg/front_end/test/fasta/types/dill_hierachy_test.dart
@@ -0,0 +1,132 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:async_helper/async_helper.dart" show asyncTest;
+
+import "package:expect/expect.dart" show Expect;
+
+import "package:kernel/ast.dart" show Class, Component, Library;
+
+import "package:kernel/core_types.dart" show CoreTypes;
+
+import "package:kernel/target/targets.dart" show NoneTarget, TargetFlags;
+
+import "package:front_end/src/api_prototype/compiler_options.dart"
+    show CompilerOptions;
+
+import "package:front_end/src/base/processed_options.dart"
+    show ProcessedOptions;
+
+import "package:front_end/src/fasta/compiler_context.dart" show CompilerContext;
+
+import "package:front_end/src/fasta/dill/dill_loader.dart" show DillLoader;
+
+import "package:front_end/src/fasta/dill/dill_target.dart" show DillTarget;
+
+import "package:front_end/src/fasta/kernel/kernel_builder.dart"
+    show ClassHierarchyBuilder, KernelClassBuilder;
+
+import "package:front_end/src/fasta/ticker.dart" show Ticker;
+
+import "kernel_type_parser.dart" show parseComponent;
+
+const String expectedHierachy = """
+Object:
+  superclasses:
+  interfaces:
+  classMembers:
+  classSetters:
+
+A:
+  superclasses:
+    Object
+  interfaces:
+  classMembers:
+  classSetters:
+
+B:
+  Longest path to Object: 2
+  superclasses:
+    Object
+  interfaces: A
+  classMembers:
+  classSetters:
+  interfaceMembers:
+  interfaceSetters:
+
+C:
+  Longest path to Object: 2
+  superclasses:
+    Object
+  interfaces: A
+  classMembers:
+  classSetters:
+  interfaceMembers:
+  interfaceSetters:
+
+D:
+  Longest path to Object: 3
+  superclasses:
+    Object
+  interfaces: B<T>, A, C<U>
+  classMembers:
+  classSetters:
+  interfaceMembers:
+  interfaceSetters:
+
+E:
+  Longest path to Object: 4
+  superclasses:
+    Object
+  interfaces: D<int, double>, B<int>, A, C<double>
+  classMembers:
+  classSetters:
+  interfaceMembers:
+  interfaceSetters:
+
+F:
+  Longest path to Object: 4
+  superclasses:
+    Object
+  interfaces: D<int, bool>, B<int>, A, C<bool>
+  classMembers:
+  classSetters:
+  interfaceMembers:
+  interfaceSetters:
+""";
+
+main() {
+  final Ticker ticker = new Ticker(isVerbose: false);
+  final Component component = parseComponent("""
+class A;
+class B<T> implements A;
+class C<U> implements A;
+class D<T, U> implements B<T>, C<U>;
+class E implements D<int, double>;
+class F implements D<int, bool>;""",
+      Uri.parse("org-dartlang-test:///library.dart"));
+
+  final CompilerContext context = new CompilerContext(new ProcessedOptions(
+      options: new CompilerOptions()
+        ..packagesFileUri = Uri.base.resolve(".packages")));
+
+  asyncTest(() => context.runInContext<void>((_) async {
+        DillTarget target = new DillTarget(
+            ticker,
+            await context.options.getUriTranslator(),
+            new NoneTarget(new TargetFlags()));
+        final DillLoader loader = target.loader;
+        loader.appendLibraries(component);
+        await target.buildOutlines();
+        KernelClassBuilder objectClass = loader.coreLibrary["Object"];
+        ClassHierarchyBuilder hierarchy = new ClassHierarchyBuilder(
+            objectClass, loader, new CoreTypes(component));
+        Library library = component.libraries.last;
+        for (Class cls in library.classes) {
+          hierarchy.getNodeFromKernelClass(cls);
+        }
+        Expect.stringEquals(
+            expectedHierachy, hierarchy.nodes.values.join("\n"));
+      }));
+}
diff --git a/pkg/front_end/test/fasta/types/fasta_legacy_upper_bound_test.dart b/pkg/front_end/test/fasta/types/fasta_legacy_upper_bound_test.dart
new file mode 100644
index 0000000..5e53470
--- /dev/null
+++ b/pkg/front_end/test/fasta/types/fasta_legacy_upper_bound_test.dart
@@ -0,0 +1,67 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:kernel/ast.dart" show DartType;
+
+import "package:kernel/core_types.dart" show CoreTypes;
+
+import "package:kernel/target/targets.dart" show NoneTarget, TargetFlags;
+
+import "package:front_end/src/api_prototype/compiler_options.dart"
+    show CompilerOptions;
+
+import "package:front_end/src/base/processed_options.dart"
+    show ProcessedOptions;
+
+import "package:front_end/src/fasta/compiler_context.dart" show CompilerContext;
+
+import "package:front_end/src/fasta/dill/dill_loader.dart" show DillLoader;
+
+import "package:front_end/src/fasta/dill/dill_target.dart" show DillTarget;
+
+import "package:front_end/src/fasta/kernel/kernel_builder.dart"
+    show ClassHierarchyBuilder, KernelClassBuilder;
+
+import "package:front_end/src/fasta/ticker.dart" show Ticker;
+
+import "legacy_upper_bound_helper.dart" show LegacyUpperBoundTest;
+
+class FastaLegacyUpperBoundTest extends LegacyUpperBoundTest {
+  final Ticker ticker;
+  final CompilerContext context;
+
+  ClassHierarchyBuilder hierarchy;
+
+  FastaLegacyUpperBoundTest(this.ticker, this.context);
+
+  @override
+  Future<void> parseComponent(String source) async {
+    await super.parseComponent(source);
+
+    DillTarget target = new DillTarget(
+        ticker,
+        await context.options.getUriTranslator(),
+        new NoneTarget(new TargetFlags()));
+    final DillLoader loader = target.loader;
+    loader.appendLibraries(component);
+    await target.buildOutlines();
+    KernelClassBuilder objectClass = loader.coreLibrary["Object"];
+    hierarchy = new ClassHierarchyBuilder(
+        objectClass, loader, new CoreTypes(component));
+  }
+
+  @override
+  DartType getLegacyLeastUpperBound(DartType a, DartType b) {
+    return hierarchy.getKernelLegacyLeastUpperBound(a, b);
+  }
+}
+
+main() {
+  final Ticker ticker = new Ticker();
+  final CompilerContext context = new CompilerContext(new ProcessedOptions(
+      options: new CompilerOptions()
+        ..packagesFileUri = Uri.base.resolve(".packages")));
+  context.runInContext<void>(
+      (_) => new FastaLegacyUpperBoundTest(ticker, context).test());
+}
diff --git a/pkg/front_end/test/fasta/types/fasta_types_test.dart b/pkg/front_end/test/fasta/types/fasta_types_test.dart
index 7f50ad6..42ce99d 100644
--- a/pkg/front_end/test/fasta/types/fasta_types_test.dart
+++ b/pkg/front_end/test/fasta/types/fasta_types_test.dart
@@ -36,7 +36,7 @@
 import "type_parser.dart" as type_parser show parse, parseTypeVariables;
 
 main() {
-  final Ticker ticker = Ticker();
+  final Ticker ticker = new Ticker(isVerbose: false);
   final CompilerContext context = new CompilerContext(new ProcessedOptions(
       options: new CompilerOptions()
         ..packagesFileUri = Uri.base.resolve(".packages")));
diff --git a/pkg/front_end/test/fasta/types/kernel_legacy_upper_bound_test.dart b/pkg/front_end/test/fasta/types/kernel_legacy_upper_bound_test.dart
new file mode 100644
index 0000000..9004191
--- /dev/null
+++ b/pkg/front_end/test/fasta/types/kernel_legacy_upper_bound_test.dart
@@ -0,0 +1,29 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "legacy_upper_bound_helper.dart" show LegacyUpperBoundTest;
+
+import "package:kernel/ast.dart" show DartType;
+
+import "package:kernel/class_hierarchy.dart" show ClassHierarchy;
+
+class KernelLegacyUpperBoundTest extends LegacyUpperBoundTest {
+  ClassHierarchy hierarchy;
+
+  @override
+  Future<void> parseComponent(String source) {
+    super.parseComponent(source);
+    hierarchy = new ClassHierarchy(component);
+    return null;
+  }
+
+  @override
+  DartType getLegacyLeastUpperBound(DartType a, DartType b) {
+    return hierarchy.getLegacyLeastUpperBound(a, b);
+  }
+}
+
+main() {
+  new KernelLegacyUpperBoundTest().test();
+}
diff --git a/pkg/front_end/test/fasta/types/kernel_type_parser.dart b/pkg/front_end/test/fasta/types/kernel_type_parser.dart
index 86f8a68..6d92bac 100644
--- a/pkg/front_end/test/fasta/types/kernel_type_parser.dart
+++ b/pkg/front_end/test/fasta/types/kernel_type_parser.dart
@@ -6,6 +6,7 @@
     show
         BottomType,
         Class,
+        Component,
         DartType,
         DynamicType,
         FunctionType,
@@ -24,6 +25,8 @@
 
 import "package:kernel/src/bounds_checks.dart" show calculateBounds;
 
+import "mock_sdk.dart" show mockSdk;
+
 import "type_parser.dart" as type_parser show parse;
 
 import "type_parser.dart"
@@ -38,13 +41,34 @@
         ParsedVoidType,
         Visitor;
 
+Component parseComponent(String source, Uri uri) {
+  Uri coreUri = Uri.parse("dart:core");
+  KernelEnvironment coreEnvironment = new KernelEnvironment(coreUri, coreUri);
+  Library coreLibrary =
+      parseLibrary(coreUri, mockSdk, environment: coreEnvironment);
+  KernelEnvironment libraryEnvironment =
+      new KernelEnvironment(uri, uri).extend(coreEnvironment.declarations);
+  Library library = parseLibrary(uri, source, environment: libraryEnvironment);
+  library.name = "lib";
+  return new Component(libraries: <Library>[coreLibrary, library]);
+}
+
 Library parseLibrary(Uri uri, String text,
     {Uri fileUri, KernelEnvironment environment}) {
   fileUri ??= uri;
   environment ??= new KernelEnvironment(uri, fileUri);
   Library library =
       new Library(uri, fileUri: fileUri, name: uri.path.replaceAll("/", "."));
-  for (ParsedType type in type_parser.parse(text)) {
+  List<ParsedType> types = type_parser.parse(text);
+  for (ParsedType type in types) {
+    if (type is ParsedClass) {
+      String name = type.name;
+      environment[name] = new Class(fileUri: fileUri, name: name)
+        ..typeParameters.addAll(
+            new List<TypeParameter>.filled(type.typeVariables.length, null));
+    }
+  }
+  for (ParsedType type in types) {
     Node node = environment.kernelFromParsedType(type);
     if (node is Class) {
       library.addClass(node);
@@ -64,7 +88,9 @@
 
   final Map<String, TreeNode> declarations = <String, TreeNode>{};
 
-  KernelEnvironment(this.uri, this.fileUri);
+  final KernelEnvironment parent;
+
+  KernelEnvironment(this.uri, this.fileUri, [this.parent]);
 
   Node kernelFromParsedType(ParsedType type) {
     Node node = type.accept(const KernelFromParsedType(), this);
@@ -76,7 +102,12 @@
   Class get objectClass => this["Object"];
 
   TreeNode operator [](String name) {
-    return declarations[name] ?? (throw "Not found: $name");
+    TreeNode result = declarations[name];
+    if (result == null && parent != null) {
+      return parent[name];
+    }
+    if (result == null) throw "Not found: $name";
+    return result;
   }
 
   void operator []=(String name, TreeNode declaration) {
@@ -88,8 +119,7 @@
   }
 
   KernelEnvironment extend(Map<String, TreeNode> declarations) {
-    return new KernelEnvironment(uri, fileUri)
-      ..declarations.addAll(this.declarations)
+    return new KernelEnvironment(uri, fileUri, this)
       ..declarations.addAll(declarations);
   }
 }
@@ -146,13 +176,14 @@
 
   Class visitClass(ParsedClass node, KernelEnvironment environment) {
     String name = node.name;
-    Class cls =
-        environment[name] = new Class(fileUri: environment.fileUri, name: name);
+    Class cls = environment[name];
     ParameterEnvironment parameterEnvironment =
         computeTypeParameterEnvironment(node.typeVariables, environment);
     List<TypeParameter> parameters = parameterEnvironment.parameters;
     setParents(parameters, cls);
-    cls.typeParameters.addAll(parameters);
+    cls.typeParameters
+      ..clear()
+      ..addAll(parameters);
     {
       KernelEnvironment environment = parameterEnvironment.environment;
       InterfaceType type =
@@ -164,6 +195,11 @@
       } else {
         cls.supertype = toSupertype(type);
       }
+      InterfaceType mixedInType =
+          node.mixedInType?.accept<Node, KernelEnvironment>(this, environment);
+      if (mixedInType != null) {
+        cls.mixedInType = toSupertype(mixedInType);
+      }
       List<ParsedType> interfaces = node.interfaces;
       for (int i = 0; i < interfaces.length; i++) {
         cls.implementedTypes.add(toSupertype(
@@ -276,7 +312,7 @@
         typeParameter
           ..bound = type
           // The default type will be overridden below, but we need to set it
-          // so [calculateBounds] can destinquish between explicit and implicit
+          // so [calculateBounds] can distinguish between explicit and implicit
           // bounds.
           ..defaultType = type;
       }
diff --git a/pkg/front_end/test/fasta/types/kernel_type_parser_test.dart b/pkg/front_end/test/fasta/types/kernel_type_parser_test.dart
index ea220ac..3280ce7 100644
--- a/pkg/front_end/test/fasta/types/kernel_type_parser_test.dart
+++ b/pkg/front_end/test/fasta/types/kernel_type_parser_test.dart
@@ -17,28 +17,23 @@
 import "kernel_type_parser.dart"
     show KernelEnvironment, KernelFromParsedType, parseLibrary;
 
+import "mock_sdk.dart" show mockSdk;
+
 import "shared_type_tests.dart" show SubtypeTest;
 
 import "type_parser.dart" as type_parser show parse, parseTypeVariables;
 
 const String testSdk = """
-class Object;
-class Comparable<T>;
-class num implements Comparable<num>;
-class int extends num;
-class double extends num;
-class Iterable<T>;
-class List<T> extends Iterable<T>;
-class Future<T>;
-class FutureOr<T>;
-class Null;
-class Function;
 typedef Typedef<T> <S>(T) -> S;
 typedef VoidFunction () -> void;
 class DefaultTypes<S, T extends Object, U extends List<S>, V extends List<T>, W extends Comparable<W>, X extends (W) -> void, Y extends () -> W>;
 typedef TestDefaultTypes () -> DefaultTypes;
 typedef Id<T> T;
 typedef TestSorting ({int c, int b, int a}) -> void;
+class Super implements Comparable<Sub>;
+class Sub extends Super;
+class FBound<T extends FBound<T>>;
+class MixinApplication extends Object with FBound<MixinApplication>;
 """;
 
 const String expectedSdk = """
@@ -72,12 +67,25 @@
 }
 class Function extends self::Object {
 }
+class String extends self::Object {
+}
+class bool extends self::Object {
+}
 class DefaultTypes<S extends self::Object = dynamic, T extends self::Object = self::Object, U extends self::List<self::DefaultTypes::S> = self::List<dynamic>, V extends self::List<self::DefaultTypes::T> = self::List<self::Object>, W extends self::Comparable<self::DefaultTypes::W> = self::Comparable<dynamic>, X extends (self::DefaultTypes::W) → void = (<BottomType>) → void, Y extends () → self::DefaultTypes::W = () → self::Comparable<dynamic>> extends self::Object {
 }
+class Super extends self::Object implements self::Comparable<self::Sub> {
+}
+class Sub extends self::Super {
+}
+class FBound<T extends self::FBound<self::FBound::T> = self::FBound<dynamic>> extends self::Object {
+}
+class MixinApplication = self::Object with self::FBound<self::MixinApplication> {
+}
 """;
 
 Component parseSdk(Uri uri, KernelEnvironment environment) {
-  Library library = parseLibrary(uri, testSdk, environment: environment);
+  Library library =
+      parseLibrary(uri, mockSdk + testSdk, environment: environment);
   StringBuffer sb = new StringBuffer();
   Printer printer = new Printer(sb);
   printer.writeLibraryFile(library);
@@ -103,6 +111,9 @@
 
   KernelSubtypeTest(this.coreTypes, this.hierarchy, this.environment);
 
+  @override
+  bool get skipFutureOrPromotion => true;
+
   DartType toType(String text, KernelEnvironment environment) {
     return environment.kernelFromParsedType(type_parser.parse(text).single);
   }
diff --git a/pkg/front_end/test/fasta/types/large_app_benchmark.dart b/pkg/front_end/test/fasta/types/large_app_benchmark.dart
new file mode 100644
index 0000000..94a5601
--- /dev/null
+++ b/pkg/front_end/test/fasta/types/large_app_benchmark.dart
@@ -0,0 +1,10 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "dart:io" show Platform;
+
+import "subtypes_benchmark.dart" show run;
+
+main() => run(
+    Platform.script.resolve("benchmark_data/large_app.json.gz"), "LargeApp");
diff --git a/pkg/front_end/test/fasta/types/large_app_benchmark_test.dart b/pkg/front_end/test/fasta/types/large_app_benchmark_test.dart
new file mode 100644
index 0000000..4dca6c8
--- /dev/null
+++ b/pkg/front_end/test/fasta/types/large_app_benchmark_test.dart
@@ -0,0 +1,7 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "large_app_benchmark.dart" as bench show main;
+
+main() => bench.main();
diff --git a/pkg/front_end/test/fasta/types/legacy_upper_bound_helper.dart b/pkg/front_end/test/fasta/types/legacy_upper_bound_helper.dart
new file mode 100644
index 0000000..1a6c955
--- /dev/null
+++ b/pkg/front_end/test/fasta/types/legacy_upper_bound_helper.dart
@@ -0,0 +1,164 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:async_helper/async_helper.dart" show asyncTest;
+
+import "package:expect/expect.dart" show Expect;
+
+import "package:kernel/ast.dart" show Class, Component, DartType, InterfaceType;
+
+import "package:kernel/library_index.dart" show LibraryIndex;
+
+import "kernel_type_parser.dart" as kernel_type_parser show parseComponent;
+
+final Uri libraryUri = Uri.parse("org-dartlang-test:///library.dart");
+
+abstract class LegacyUpperBoundTest {
+  Component component;
+
+  LibraryIndex index;
+
+  DartType get objectType => getCoreClass("Object").rawType;
+
+  DartType get intType => getCoreClass("int").rawType;
+
+  DartType get stringType => getCoreClass("String").rawType;
+
+  DartType get doubleType => getCoreClass("double").rawType;
+
+  DartType get boolType => getCoreClass("bool").rawType;
+
+  void parseComponent(String source) {
+    component = kernel_type_parser.parseComponent(source, libraryUri);
+    index = new LibraryIndex.all(component);
+  }
+
+  Class getClass(String name) {
+    return index.getClass("$libraryUri", name);
+  }
+
+  Class getCoreClass(String name) {
+    return index.getClass("dart:core", name);
+  }
+
+  DartType getLegacyLeastUpperBound(DartType a, DartType b);
+
+  void checkGetLegacyLeastUpperBound(
+      DartType a, DartType b, DartType expected) {
+    DartType actual = getLegacyLeastUpperBound(a, b);
+    Expect.equals(expected, actual);
+  }
+
+  Future<void> test() {
+    return asyncTest(() async {
+      await test_getLegacyLeastUpperBound_expansive();
+      await test_getLegacyLeastUpperBound_generic();
+      await test_getLegacyLeastUpperBound_nonGeneric();
+    });
+  }
+
+  /// Copy of the tests/language/least_upper_bound_expansive_test.dart test.
+  Future<void> test_getLegacyLeastUpperBound_expansive() async {
+    await parseComponent("""
+class N<T>;
+class C1<T> extends N<N<C1<T>>>;
+class C2<T> extends N<N<C2<N<C2<T>>>>>;
+""");
+
+    Class N = getClass("N");
+    Class C1 = getClass("C1");
+    Class C2 = getClass("C2");
+
+    // The least upper bound of C1<int> and N<C1<String>> is Object since the
+    // supertypes are
+    //     {C1<int>, N<N<C1<int>>>, Object} for C1<int> and
+    //     {N<C1<String>>, Object} for N<C1<String>> and
+    // Object is the most specific type in the intersection of the supertypes.
+    checkGetLegacyLeastUpperBound(
+        new InterfaceType(C1, [intType]),
+        new InterfaceType(N, [
+          new InterfaceType(C1, [stringType])
+        ]),
+        objectType);
+
+    // The least upper bound of C2<int> and N<C2<String>> is Object since the
+    // supertypes are
+    //     {C2<int>, N<N<C2<N<C2<int>>>>>, Object} for C2<int> and
+    //     {N<C2<String>>, Object} for N<C2<String>> and
+    // Object is the most specific type in the intersection of the supertypes.
+    checkGetLegacyLeastUpperBound(
+        new InterfaceType(C2, [intType]),
+        new InterfaceType(N, [
+          new InterfaceType(C2, [stringType])
+        ]),
+        objectType);
+  }
+
+  Future<void> test_getLegacyLeastUpperBound_generic() async {
+    await parseComponent("""
+class A;
+class B<T> implements A;
+class C<U> implements A;
+class D<T, U> implements B<T>, C<U>;
+class E implements D<int, double>;
+class F implements D<int, bool>;
+""");
+
+    Class a = getClass("A");
+    Class b = getClass("B");
+    Class c = getClass("C");
+    Class d = getClass("D");
+    Class e = getClass("E");
+    Class f = getClass("F");
+
+    checkGetLegacyLeastUpperBound(
+        new InterfaceType(d, [intType, doubleType]),
+        new InterfaceType(d, [intType, doubleType]),
+        new InterfaceType(d, [intType, doubleType]));
+    checkGetLegacyLeastUpperBound(
+        new InterfaceType(d, [intType, doubleType]),
+        new InterfaceType(d, [intType, boolType]),
+        new InterfaceType(b, [intType]));
+    checkGetLegacyLeastUpperBound(
+        new InterfaceType(d, [intType, doubleType]),
+        new InterfaceType(d, [boolType, doubleType]),
+        new InterfaceType(c, [doubleType]));
+    checkGetLegacyLeastUpperBound(new InterfaceType(d, [intType, doubleType]),
+        new InterfaceType(d, [boolType, intType]), a.rawType);
+    checkGetLegacyLeastUpperBound(
+        e.rawType, f.rawType, new InterfaceType(b, [intType]));
+  }
+
+  Future<void> test_getLegacyLeastUpperBound_nonGeneric() async {
+    await parseComponent("""
+class A;
+class B;
+class C implements A;
+class D implements A;
+class E implements A;
+class F implements C, D;
+class G implements C, D;
+class H implements C, D, E;
+class I implements C, D, E;
+""");
+
+    Class a = getClass("A");
+    Class b = getClass("B");
+    Class c = getClass("C");
+    Class d = getClass("D");
+    Class f = getClass("F");
+    Class g = getClass("G");
+    Class h = getClass("H");
+    Class i = getClass("I");
+
+    checkGetLegacyLeastUpperBound(a.rawType, b.rawType, objectType);
+    checkGetLegacyLeastUpperBound(a.rawType, objectType, objectType);
+    checkGetLegacyLeastUpperBound(objectType, b.rawType, objectType);
+    checkGetLegacyLeastUpperBound(c.rawType, d.rawType, a.rawType);
+    checkGetLegacyLeastUpperBound(c.rawType, a.rawType, a.rawType);
+    checkGetLegacyLeastUpperBound(a.rawType, d.rawType, a.rawType);
+    checkGetLegacyLeastUpperBound(f.rawType, g.rawType, a.rawType);
+    checkGetLegacyLeastUpperBound(h.rawType, i.rawType, a.rawType);
+  }
+}
diff --git a/pkg/front_end/test/fasta/types/legacy_upper_bound_test.dart b/pkg/front_end/test/fasta/types/legacy_upper_bound_test.dart
deleted file mode 100644
index 24b04d2..0000000
--- a/pkg/front_end/test/fasta/types/legacy_upper_bound_test.dart
+++ /dev/null
@@ -1,292 +0,0 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import "package:expect/matchers_lite.dart";
-
-import "package:kernel/ast.dart";
-import "package:kernel/class_hierarchy.dart";
-import "package:kernel/core_types.dart";
-import "package:kernel/testing/mock_sdk_component.dart";
-import "package:kernel/text/ast_to_text.dart";
-import "package:kernel/type_algebra.dart";
-
-main() {
-  new LegacyUpperBoundTest().test_getLegacyLeastUpperBound_expansive();
-
-  new LegacyUpperBoundTest().test_getLegacyLeastUpperBound_generic();
-
-  new LegacyUpperBoundTest().test_getLegacyLeastUpperBound_nonGeneric();
-}
-
-class LegacyUpperBoundTest {
-  final Component component = createMockSdkComponent();
-
-  CoreTypes coreTypes;
-
-  final Library library =
-      new Library(Uri.parse('org-dartlang:///test.dart'), name: 'test');
-
-  ClassHierarchy _hierarchy;
-
-  LegacyUpperBoundTest() {
-    coreTypes = new CoreTypes(component);
-    library.parent = component;
-    component.libraries.add(library);
-  }
-
-  Class get objectClass => coreTypes.objectClass;
-
-  Supertype get objectSuper => coreTypes.objectClass.asThisSupertype;
-
-  ClassHierarchy get hierarchy {
-    return _hierarchy ??= createClassHierarchy(component);
-  }
-
-  Class addClass(Class c) {
-    if (_hierarchy != null) {
-      fail('The classs hierarchy has already been created.');
-    }
-    library.addClass(c);
-    return c;
-  }
-
-  /// Assert that the test [library] has the [expectedText] presentation.
-  /// The presentation is close, but not identical to the normal Kernel one.
-  void _assertTestLibraryText(String expectedText) {
-    _assertLibraryText(library, expectedText);
-  }
-
-  void _assertLibraryText(Library lib, String expectedText) {
-    StringBuffer sb = new StringBuffer();
-    Printer printer = new Printer(sb);
-    printer.writeLibraryFile(lib);
-
-    String actualText = sb.toString();
-
-    // Clean up the text a bit.
-    const oftenUsedPrefix = '''
-library test;
-import self as self;
-import "dart:core" as core;
-
-''';
-    if (actualText.startsWith(oftenUsedPrefix)) {
-      actualText = actualText.substring(oftenUsedPrefix.length);
-    }
-    actualText = actualText.replaceAll('{\n}', '{}');
-    actualText = actualText.replaceAll(' extends core::Object', '');
-
-    if (actualText != expectedText) {
-      print('-------- Actual --------');
-      print(actualText + '------------------------');
-    }
-
-    expect(actualText, expectedText);
-  }
-
-  ClassHierarchy createClassHierarchy(Component component) {
-    return new ClassHierarchy(component);
-  }
-
-  /// Add a new generic class with the given [name] and [typeParameterNames].
-  /// The [TypeParameterType]s corresponding to [typeParameterNames] are
-  /// passed to optional [extends_] and [implements_] callbacks.
-  Class addGenericClass(String name, List<String> typeParameterNames,
-      {Supertype extends_(List<DartType> typeParameterTypes),
-      List<Supertype> implements_(List<DartType> typeParameterTypes)}) {
-    var typeParameters = typeParameterNames
-        .map((name) => new TypeParameter(name, objectClass.rawType))
-        .toList();
-    var typeParameterTypes = typeParameters
-        .map((parameter) => new TypeParameterType(parameter))
-        .toList();
-    var supertype =
-        extends_ != null ? extends_(typeParameterTypes) : objectSuper;
-    var implementedTypes =
-        implements_ != null ? implements_(typeParameterTypes) : <Supertype>[];
-    return addClass(new Class(
-        name: name,
-        typeParameters: typeParameters,
-        supertype: supertype,
-        implementedTypes: implementedTypes));
-  }
-
-  /// Add a new class with the given [name] that extends `Object` and
-  /// [implements_] the given classes.
-  Class addImplementsClass(String name, List<Class> implements_) {
-    return addClass(new Class(
-        name: name,
-        supertype: objectSuper,
-        implementedTypes: implements_.map((c) => c.asThisSupertype).toList()));
-  }
-
-  /// Copy of the tests/language/least_upper_bound_expansive_test.dart test.
-  void test_getLegacyLeastUpperBound_expansive() {
-    var int = coreTypes.intClass.rawType;
-    var string = coreTypes.stringClass.rawType;
-
-    // class N<T> {}
-    var NT = new TypeParameter('T', objectClass.rawType);
-    var N = addClass(
-        new Class(name: 'N', typeParameters: [NT], supertype: objectSuper));
-
-    // class C1<T> extends N<N<C1<T>>> {}
-    Class C1;
-    {
-      var T = new TypeParameter('T', objectClass.rawType);
-      C1 = addClass(
-          new Class(name: 'C1', typeParameters: [T], supertype: objectSuper));
-      DartType C1_T = Substitution.fromMap({T: new TypeParameterType(T)})
-          .substituteType(C1.thisType);
-      DartType N_C1_T =
-          Substitution.fromMap({NT: C1_T}).substituteType(N.thisType);
-      Supertype N_N_C1_T = Substitution.fromMap({NT: N_C1_T})
-          .substituteSupertype(N.asThisSupertype);
-      C1.supertype = N_N_C1_T;
-    }
-
-    // class C2<T> extends N<N<C2<N<C2<T>>>>> {}
-    Class C2;
-    {
-      var T = new TypeParameter('T', objectClass.rawType);
-      C2 = addClass(
-          new Class(name: 'C2', typeParameters: [T], supertype: objectSuper));
-      DartType C2_T = Substitution.fromMap({T: new TypeParameterType(T)})
-          .substituteType(C2.thisType);
-      DartType N_C2_T =
-          Substitution.fromMap({NT: C2_T}).substituteType(N.thisType);
-      DartType C2_N_C2_T =
-          Substitution.fromMap({T: N_C2_T}).substituteType(C2.thisType);
-      DartType N_C2_N_C2_T =
-          Substitution.fromMap({NT: C2_N_C2_T}).substituteType(N.thisType);
-      Supertype N_N_C2_N_C2_T = Substitution.fromMap({NT: N_C2_N_C2_T})
-          .substituteSupertype(N.asThisSupertype);
-      C2.supertype = N_N_C2_N_C2_T;
-    }
-
-    _assertTestLibraryText('''
-class N<T> {}
-class C1<T> extends self::N<self::N<self::C1<self::C1::T>>> {}
-class C2<T> extends self::N<self::N<self::C2<self::N<self::C2<self::C2::T>>>>> {}
-''');
-
-    // The least upper bound of C1<int> and N<C1<String>> is Object since the
-    // supertypes are
-    //     {C1<int>, N<N<C1<int>>>, Object} for C1<int> and
-    //     {N<C1<String>>, Object} for N<C1<String>> and
-    // Object is the most specific type in the intersection of the supertypes.
-    expect(
-        hierarchy.getLegacyLeastUpperBound(
-            new InterfaceType(C1, [int]),
-            new InterfaceType(N, [
-              new InterfaceType(C1, [string])
-            ])),
-        objectClass.thisType);
-
-    // The least upper bound of C2<int> and N<C2<String>> is Object since the
-    // supertypes are
-    //     {C2<int>, N<N<C2<N<C2<int>>>>>, Object} for C2<int> and
-    //     {N<C2<String>>, Object} for N<C2<String>> and
-    // Object is the most specific type in the intersection of the supertypes.
-    expect(
-        hierarchy.getLegacyLeastUpperBound(
-            new InterfaceType(C2, [int]),
-            new InterfaceType(N, [
-              new InterfaceType(C2, [string])
-            ])),
-        objectClass.thisType);
-  }
-
-  void test_getLegacyLeastUpperBound_generic() {
-    var int = coreTypes.intClass.rawType;
-    var double = coreTypes.doubleClass.rawType;
-    var bool = coreTypes.boolClass.rawType;
-
-    var a = addGenericClass('A', []);
-    var b =
-        addGenericClass('B', ['T'], implements_: (_) => [a.asThisSupertype]);
-    var c =
-        addGenericClass('C', ['U'], implements_: (_) => [a.asThisSupertype]);
-    var d = addGenericClass('D', ['T', 'U'], implements_: (typeParameterTypes) {
-      var t = typeParameterTypes[0];
-      var u = typeParameterTypes[1];
-      return [
-        new Supertype(b, [t]),
-        new Supertype(c, [u])
-      ];
-    });
-    var e = addGenericClass('E', [],
-        implements_: (_) => [
-              new Supertype(d, [int, double])
-            ]);
-    var f = addGenericClass('F', [],
-        implements_: (_) => [
-              new Supertype(d, [int, bool])
-            ]);
-
-    _assertTestLibraryText('''
-class A {}
-class B<T> implements self::A {}
-class C<U> implements self::A {}
-class D<T, U> implements self::B<self::D::T>, self::C<self::D::U> {}
-class E implements self::D<core::int, core::double> {}
-class F implements self::D<core::int, core::bool> {}
-''');
-
-    expect(
-        hierarchy.getLegacyLeastUpperBound(new InterfaceType(d, [int, double]),
-            new InterfaceType(d, [int, double])),
-        new InterfaceType(d, [int, double]));
-    expect(
-        hierarchy.getLegacyLeastUpperBound(new InterfaceType(d, [int, double]),
-            new InterfaceType(d, [int, bool])),
-        new InterfaceType(b, [int]));
-    expect(
-        hierarchy.getLegacyLeastUpperBound(new InterfaceType(d, [int, double]),
-            new InterfaceType(d, [bool, double])),
-        new InterfaceType(c, [double]));
-    expect(
-        hierarchy.getLegacyLeastUpperBound(new InterfaceType(d, [int, double]),
-            new InterfaceType(d, [bool, int])),
-        a.rawType);
-    expect(hierarchy.getLegacyLeastUpperBound(e.rawType, f.rawType),
-        new InterfaceType(b, [int]));
-  }
-
-  void test_getLegacyLeastUpperBound_nonGeneric() {
-    var a = addImplementsClass('A', []);
-    var b = addImplementsClass('B', []);
-    var c = addImplementsClass('C', [a]);
-    var d = addImplementsClass('D', [a]);
-    var e = addImplementsClass('E', [a]);
-    var f = addImplementsClass('F', [c, d]);
-    var g = addImplementsClass('G', [c, d]);
-    var h = addImplementsClass('H', [c, d, e]);
-    var i = addImplementsClass('I', [c, d, e]);
-
-    _assertTestLibraryText('''
-class A {}
-class B {}
-class C implements self::A {}
-class D implements self::A {}
-class E implements self::A {}
-class F implements self::C, self::D {}
-class G implements self::C, self::D {}
-class H implements self::C, self::D, self::E {}
-class I implements self::C, self::D, self::E {}
-''');
-
-    expect(hierarchy.getLegacyLeastUpperBound(a.rawType, b.rawType),
-        objectClass.rawType);
-    expect(hierarchy.getLegacyLeastUpperBound(a.rawType, objectClass.rawType),
-        objectClass.rawType);
-    expect(hierarchy.getLegacyLeastUpperBound(objectClass.rawType, b.rawType),
-        objectClass.rawType);
-    expect(hierarchy.getLegacyLeastUpperBound(c.rawType, d.rawType), a.rawType);
-    expect(hierarchy.getLegacyLeastUpperBound(c.rawType, a.rawType), a.rawType);
-    expect(hierarchy.getLegacyLeastUpperBound(a.rawType, d.rawType), a.rawType);
-    expect(hierarchy.getLegacyLeastUpperBound(f.rawType, g.rawType), a.rawType);
-    expect(hierarchy.getLegacyLeastUpperBound(h.rawType, i.rawType), a.rawType);
-  }
-}
diff --git a/pkg/front_end/test/fasta/types/mock_sdk.dart b/pkg/front_end/test/fasta/types/mock_sdk.dart
new file mode 100644
index 0000000..d4a937b
--- /dev/null
+++ b/pkg/front_end/test/fasta/types/mock_sdk.dart
@@ -0,0 +1,19 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+const String mockSdk = """
+class Object;
+class Comparable<T>;
+class num implements Comparable<num>;
+class int extends num;
+class double extends num;
+class Iterable<T>;
+class List<T> extends Iterable<T>;
+class Future<T>;
+class FutureOr<T>;
+class Null;
+class Function;
+class String;
+class bool;
+""";
diff --git a/pkg/front_end/test/fasta/types/shared_type_tests.dart b/pkg/front_end/test/fasta/types/shared_type_tests.dart
index 38093c4..2911257 100644
--- a/pkg/front_end/test/fasta/types/shared_type_tests.dart
+++ b/pkg/front_end/test/fasta/types/shared_type_tests.dart
@@ -23,6 +23,8 @@
         "$subtypeString shouldn't be a subtype of $supertypeString.");
   }
 
+  bool get skipFutureOrPromotion => false;
+
   T toType(String text, E environment);
 
   bool isSubtypeImpl(T subtype, T supertype);
@@ -117,6 +119,42 @@
     isNotSubtype('FutureOr<int>', 'num');
     isSubtype('Null', 'FutureOr<int>');
     isSubtype('Null', 'Future<int>');
+    isSubtype('dynamic', 'FutureOr<dynamic>');
+    isNotSubtype('dynamic', 'FutureOr<String>');
+    isSubtype('void', 'FutureOr<void>');
+    isNotSubtype('void', 'FutureOr<String>');
+    isSubtype('E', 'FutureOr<E>', typeParameters: 'E');
+    isNotSubtype('E', 'FutureOr<String>', typeParameters: 'E');
+    isSubtype('() -> String', 'FutureOr<() -> void>');
+    isNotSubtype('() -> void', 'FutureOr<() -> String>');
+    isSubtype('FutureOr<int>', 'FutureOr<num>');
+    isNotSubtype('FutureOr<num>', 'FutureOr<int>');
+    isSubtype('T & int', 'FutureOr<num>', typeParameters: 'T');
+    isSubtype('T & Future<num>', 'FutureOr<num>', typeParameters: 'T');
+    isSubtype('T & Future<int>', 'FutureOr<num>', typeParameters: 'T');
+    if (!skipFutureOrPromotion) {
+      isSubtype('T & FutureOr<int>', 'FutureOr<num>', typeParameters: 'T');
+      isSubtype('T & FutureOr<num>', 'FutureOr<num>', typeParameters: 'T');
+      isSubtype('T & String', 'FutureOr<num>', typeParameters: 'T extends int');
+      isSubtype('T & Future<String>', 'FutureOr<num>',
+          typeParameters: 'T extends Future<num>');
+      isSubtype('T & FutureOr<String>', 'FutureOr<num>',
+          typeParameters: 'T extends FutureOr<int>');
+      isSubtype('T & FutureOr<String>', 'FutureOr<num>',
+          typeParameters: 'T extends FutureOr<num>');
+    }
+    isNotSubtype('T & num', 'FutureOr<int>', typeParameters: 'T');
+    isNotSubtype('T & Future<num>', 'FutureOr<int>', typeParameters: 'T');
+    isNotSubtype('T & FutureOr<num>', 'FutureOr<int>', typeParameters: 'T');
+    isNotSubtype('T & String', 'FutureOr<int>',
+        typeParameters: 'T extends num');
+    isNotSubtype('T & Future<String>', 'FutureOr<int>',
+        typeParameters: 'T extends Future<num>');
+    isNotSubtype('T & FutureOr<String>', 'FutureOr<int>',
+        typeParameters: 'T extends FutureOr<num>');
+    isSubtype('Id<int>', 'FutureOr<num>');
+    isNotSubtype('Id<num>', 'FutureOr<int>');
+    isSubtype('FutureOr<Object>', 'FutureOr<FutureOr<Object>>');
 
     // T & B <: T & A if B <: A
     isSubtype('T & int', 'T & int', typeParameters: 'T');
@@ -141,6 +179,21 @@
     // T extends A <: T extends A
     isSubtype('T', 'T', typeParameters: 'T extends num');
 
+    isSubtype('T', 'T', typeParameters: 'T');
+    isNotSubtype('S', 'T', typeParameters: 'S, T');
+
+    isSubtype('T', 'T', typeParameters: 'T extends Object');
+    isNotSubtype('S', 'T',
+        typeParameters: 'S extends Object, T extends Object');
+
+    isSubtype('T', 'T', typeParameters: 'T extends dynamic');
+    isNotSubtype('S', 'T',
+        typeParameters: 'S extends dynamic, T extends dynamic');
+
+    // S <: T extends S
+    isNotSubtype('S', 'T', typeParameters: 'S, T extends S');
+    isSubtype('T', 'S', typeParameters: 'S, T extends S');
+
     // S & B <: A if B <: A, A is not S (or a promotion thereof)
     isSubtype('S & int', 'int', typeParameters: 'S');
     isSubtype('S & int', 'num', typeParameters: 'S');
@@ -266,6 +319,18 @@
     isSubtype('T & (void) -> void', 'Id<(int) -> Object>', typeParameters: 'T');
 
     isNotSubtype('T & (void) -> void', 'Id<(int) -> int>', typeParameters: 'T');
+    isNotSubtype('dynamic', 'T & dynamic', typeParameters: 'T extends dynamic');
+    isNotSubtype('() -> T', 'T & () -> T', typeParameters: 'T');
+
+    isNotSubtype('FutureOr<T & String>', 'T & String', typeParameters: 'T');
+
+    isSubtype('Id<T & String>', 'T & String', typeParameters: 'T');
+    isSubtype('Id<T & String>', 'T', typeParameters: 'T');
+    isSubtype('Id<T & String>', 'String', typeParameters: 'T');
+    isNotSubtype('Id<T & String>', 'S & String', typeParameters: 'T, S');
+
+    isNotSubtype('void', 'T & void', typeParameters: 'T');
+    isNotSubtype('void', 'T & void', typeParameters: 'T extends void');
 
     isSubtype('T', 'Id<T>', typeParameters: 'T');
     isSubtype('T', 'Id<Object>', typeParameters: 'T');
diff --git a/pkg/front_end/test/fasta/types/subtypes_benchmark.dart b/pkg/front_end/test/fasta/types/subtypes_benchmark.dart
new file mode 100644
index 0000000..26d25da
--- /dev/null
+++ b/pkg/front_end/test/fasta/types/subtypes_benchmark.dart
@@ -0,0 +1,180 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "dart:convert" show json, utf8;
+
+import "dart:io" show File, gzip;
+
+import "package:kernel/ast.dart" show Component, DartType, Library;
+
+import "package:kernel/class_hierarchy.dart" show ClassHierarchy;
+
+import "package:kernel/core_types.dart" show CoreTypes;
+
+import "package:kernel/target/targets.dart" show NoneTarget, TargetFlags;
+
+import "package:kernel/type_environment.dart" show TypeEnvironment;
+
+import "kernel_type_parser.dart"
+    show KernelEnvironment, KernelFromParsedType, parseLibrary;
+
+import "type_parser.dart" as type_parser show parse, parseTypeVariables;
+
+import "package:front_end/src/api_prototype/compiler_options.dart"
+    show CompilerOptions;
+
+import "package:front_end/src/base/processed_options.dart"
+    show ProcessedOptions;
+
+import "package:front_end/src/fasta/compiler_context.dart" show CompilerContext;
+
+import "package:front_end/src/fasta/dill/dill_loader.dart" show DillLoader;
+
+import "package:front_end/src/fasta/dill/dill_target.dart" show DillTarget;
+
+import "package:front_end/src/fasta/kernel/kernel_builder.dart"
+    show ClassHierarchyBuilder, KernelClassBuilder;
+
+import "package:front_end/src/fasta/ticker.dart" show Ticker;
+
+class SubtypesBenchmark {
+  final Library library;
+  final List<SubtypeCheck> checks;
+
+  SubtypesBenchmark(this.library, this.checks);
+}
+
+class SubtypeCheck {
+  final DartType s;
+  final DartType t;
+  final bool isSubtype;
+
+  SubtypeCheck(this.s, this.t, this.isSubtype);
+
+  String toString() {
+    return (new StringBuffer()
+          ..write(s)
+          ..write(isSubtype ? " <: " : " !<: ")
+          ..write(t))
+        .toString();
+  }
+}
+
+SubtypesBenchmark parseBenchMark(String source) {
+  Map<Object, Object> data = json.decode(source);
+  List<Object> classes = data["classes"];
+  Uri uri = Uri.parse("dart:core");
+  KernelEnvironment environment = new KernelEnvironment(uri, uri);
+  Library library =
+      parseLibrary(uri, classes.join("\n"), environment: environment);
+  List<Object> checks = data["checks"];
+  List<SubtypeCheck> subtypeChecks = <SubtypeCheck>[];
+  for (Map<Object, Object> check in checks) {
+    String kind = check["kind"];
+    List<Object> arguments = check["arguments"];
+    String sSource = arguments[0];
+    String tSource = arguments[1];
+    if (sSource.contains("?")) continue;
+    if (tSource.contains("?")) continue;
+    if (sSource.contains("⊥")) continue;
+    if (tSource.contains("⊥")) continue;
+    KernelEnvironment localEnvironment = environment;
+    if (arguments.length > 2) {
+      List<Object> typeParametersSource = arguments[2];
+      localEnvironment = const KernelFromParsedType()
+          .computeTypeParameterEnvironment(
+              type_parser
+                  .parseTypeVariables("<${typeParametersSource.join(', ')}>"),
+              environment)
+          .environment;
+    }
+    DartType s = localEnvironment
+        .kernelFromParsedType(type_parser.parse(sSource).single);
+    DartType t = localEnvironment
+        .kernelFromParsedType(type_parser.parse(tSource).single);
+    subtypeChecks.add(new SubtypeCheck(s, t, kind == "isSubtype"));
+  }
+  return new SubtypesBenchmark(library, subtypeChecks);
+}
+
+void performChecks(List<SubtypeCheck> checks, TypeEnvironment environment) {
+  for (int i = 0; i < checks.length; i++) {
+    SubtypeCheck check = checks[i];
+    bool isSubtype = environment.isSubtypeOf(check.s, check.t);
+    if (isSubtype != check.isSubtype) {
+      throw "Check failed: $check";
+    }
+  }
+}
+
+void performFastaChecks(
+    List<SubtypeCheck> checks, ClassHierarchyBuilder hierarchy) {
+  for (int i = 0; i < checks.length; i++) {
+    SubtypeCheck check = checks[i];
+    bool isSubtype = hierarchy.types.isSubtypeOfKernel(check.s, check.t);
+    if (isSubtype != check.isSubtype) {
+      throw "Check failed: $check";
+    }
+  }
+}
+
+Future<void> run(Uri benchmarkInput, String name) async {
+  const int runs = 50;
+  final Ticker ticker = new Ticker(isVerbose: false);
+  Stopwatch kernelWatch = new Stopwatch();
+  Stopwatch fastaWatch = new Stopwatch();
+  List<int> bytes = await new File.fromUri(benchmarkInput).readAsBytes();
+  if (bytes.length > 3) {
+    if (bytes[0] == 0x1f && bytes[1] == 0x8b && bytes[2] == 0x08) {
+      bytes = gzip.decode(bytes);
+    }
+  }
+  SubtypesBenchmark bench = parseBenchMark(utf8.decode(bytes));
+  bytes = null;
+  ticker.logMs("Parsed benchmark file");
+  Component c = new Component(libraries: [bench.library]);
+  ClassHierarchy hierarchy = new ClassHierarchy(c);
+  CoreTypes coreTypes = new CoreTypes(c);
+  TypeEnvironment environment = new TypeEnvironment(coreTypes, hierarchy);
+
+  final CompilerContext context = new CompilerContext(new ProcessedOptions(
+      options: new CompilerOptions()
+        ..packagesFileUri = Uri.base.resolve(".packages")));
+  await context.runInContext<void>((_) async {
+    DillTarget target = new DillTarget(
+        ticker,
+        await context.options.getUriTranslator(),
+        new NoneTarget(new TargetFlags()));
+    final DillLoader loader = target.loader;
+    loader.appendLibraries(c);
+    await target.buildOutlines();
+    KernelClassBuilder objectClass = loader.coreLibrary["Object"];
+    ClassHierarchyBuilder hierarchy =
+        new ClassHierarchyBuilder(objectClass, loader, coreTypes);
+
+    for (int i = 0; i < runs; i++) {
+      kernelWatch.start();
+      performChecks(bench.checks, environment);
+      kernelWatch.stop();
+
+      fastaWatch.start();
+      performFastaChecks(bench.checks, hierarchy);
+      fastaWatch.stop();
+
+      if (i == 0) {
+        print("SubtypeKernel${name}First(RuntimeRaw): "
+            "${kernelWatch.elapsedMilliseconds} ms");
+        print("SubtypeFasta${name}First(RuntimeRaw): "
+            "${fastaWatch.elapsedMilliseconds} ms");
+      }
+    }
+  });
+
+  print("SubtypeKernel${name}Avg${runs}(RuntimeRaw): "
+      "${kernelWatch.elapsedMilliseconds / runs} ms");
+  print("SubtypeFasta${name}Avg${runs}(RuntimeRaw): "
+      "${fastaWatch.elapsedMilliseconds / runs} ms");
+}
+
+main() => run(Uri.base.resolve("type_checks.json"), "***");
diff --git a/pkg/front_end/test/fasta/types/type_parser.dart b/pkg/front_end/test/fasta/types/type_parser.dart
index 1e72c17..89a21b7 100644
--- a/pkg/front_end/test/fasta/types/type_parser.dart
+++ b/pkg/front_end/test/fasta/types/type_parser.dart
@@ -43,11 +43,12 @@
 class ParsedClass extends ParsedDeclaration {
   final List<ParsedTypeVariable> typeVariables;
   final ParsedInterfaceType supertype;
+  final ParsedInterfaceType mixedInType;
   final List<ParsedType> interfaces;
   final ParsedFunctionType callableType;
 
-  ParsedClass(String name, this.typeVariables, this.supertype, this.interfaces,
-      this.callableType)
+  ParsedClass(String name, this.typeVariables, this.supertype, this.mixedInType,
+      this.interfaces, this.callableType)
       : super(name);
 
   String toString() {
@@ -372,8 +373,12 @@
     String name = parseName();
     List<ParsedTypeVariable> typeVariables = parseTypeVariablesOpt();
     ParsedType supertype;
+    ParsedType mixedInType;
     if (optionalAdvance("extends")) {
       supertype = parseType();
+      if (optionalAdvance("with")) {
+        mixedInType = parseType();
+      }
     }
     List<ParsedType> interfaces = <ParsedType>[];
     if (optionalAdvance("implements")) {
@@ -389,7 +394,7 @@
       expect(";");
     }
     return new ParsedClass(
-        name, typeVariables, supertype, interfaces, callableType);
+        name, typeVariables, supertype, mixedInType, interfaces, callableType);
   }
 
   /// This parses a general typedef on this form:
diff --git a/pkg/front_end/test/hot_reload_e2e_test.dart b/pkg/front_end/test/hot_reload_e2e_test.dart
index 7b50c3c..b90b143 100644
--- a/pkg/front_end/test/hot_reload_e2e_test.dart
+++ b/pkg/front_end/test/hot_reload_e2e_test.dart
@@ -103,6 +103,7 @@
     var vmArgs = [
       '--enable-vm-service=0', // Note: use 0 to avoid port collisions.
       '--pause_isolates_on_start',
+      '--disable-service-auth-codes',
       outputUri.toFilePath()
     ];
     vmArgs.add('$reloadCount');
diff --git a/pkg/front_end/test/incremental_bulk_compiler_full.dart b/pkg/front_end/test/incremental_bulk_compiler_full.dart
index a52ac90..c39739d 100644
--- a/pkg/front_end/test/incremental_bulk_compiler_full.dart
+++ b/pkg/front_end/test/incremental_bulk_compiler_full.dart
@@ -56,6 +56,7 @@
   var options = new CompilerOptions()
     ..sdkRoot = sdkRoot
     ..librariesSpecificationUri = Uri.base.resolve("sdk/lib/libraries.json")
+    ..omitPlatform = true
     ..onDiagnostic = (DiagnosticMessage message) {
       // Ignored.
     }
@@ -98,7 +99,7 @@
             new IncrementalKernelGenerator(getOptions(true), uri);
       }
       Component bulkCompiledComponent = await context.compiler
-          .computeDelta(entryPoint: uri, fullComponent: true);
+          .computeDelta(entryPoints: [uri], fullComponent: true);
       bulkSerialized = util.postProcess(bulkCompiledComponent);
     } catch (e) {
       bulkFailed = true;
@@ -114,7 +115,7 @@
             new IncrementalKernelGenerator(getOptions(true), uri);
       }
       Component bulkCompiledComponent = await context.compiler
-          .computeDelta(entryPoint: uri, fullComponent: true);
+          .computeDelta(entryPoints: [uri], fullComponent: true);
       bulkSerialized2 = util.postProcess(bulkCompiledComponent);
     } catch (e) {
       bulk2Failed = true;
diff --git a/pkg/front_end/test/incremental_load_from_dill_test.dart b/pkg/front_end/test/incremental_load_from_dill_test.dart
index 682f362..16125c3 100644
--- a/pkg/front_end/test/incremental_load_from_dill_test.dart
+++ b/pkg/front_end/test/incremental_load_from_dill_test.dart
@@ -14,7 +14,10 @@
 import 'package:front_end/src/fasta/compiler_context.dart' show CompilerContext;
 
 import 'package:front_end/src/api_prototype/compiler_options.dart'
-    show CompilerOptions, DiagnosticMessage;
+    show CompilerOptions;
+
+import 'package:front_end/src/api_prototype/diagnostic_message.dart'
+    show DiagnosticMessage, getMessageCodeObject;
 
 import "package:front_end/src/api_prototype/memory_file_system.dart"
     show MemoryFileSystem;
@@ -27,7 +30,10 @@
 
 import 'package:front_end/src/fasta/severity.dart' show Severity;
 
-import 'package:kernel/kernel.dart' show Component, Library;
+import 'package:kernel/binary/ast_from_binary.dart' show BinaryBuilder;
+
+import 'package:kernel/kernel.dart'
+    show Class, Component, EmptyStatement, Field, Library, Procedure;
 
 import 'package:kernel/target/targets.dart' show TargetFlags;
 
@@ -111,6 +117,8 @@
         await newWorldTest(
           map["strong"],
           map["worlds"],
+          map["modules"],
+          map["omitPlatform"],
         );
         break;
       default:
@@ -179,7 +187,74 @@
   checkIsEqual(normalDillData, initializedDillData);
 }
 
-Future<Null> newWorldTest(bool strong, List worlds) async {
+Future<Map<String, List<int>>> createModules(
+    Map module, final List<int> sdkSummaryData, bool strong) async {
+  final Uri base = Uri.parse("org-dartlang-test:///");
+  final Uri sdkSummary = base.resolve("vm_platform.dill");
+
+  MemoryFileSystem fs = new MemoryFileSystem(base);
+  fs.entityForUri(sdkSummary).writeAsBytesSync(sdkSummaryData);
+
+  // Setup all sources
+  for (Map moduleSources in module.values) {
+    for (String filename in moduleSources.keys) {
+      String data = moduleSources[filename];
+      Uri uri = base.resolve(filename);
+      if (await fs.entityForUri(uri).exists())
+        throw "More than one entry for $filename";
+      fs.entityForUri(uri).writeAsStringSync(data);
+    }
+  }
+
+  Map<String, List<int>> moduleResult = new Map<String, List<int>>();
+
+  for (String moduleName in module.keys) {
+    List<Uri> moduleSources = new List<Uri>();
+    Uri packagesUri;
+    for (String filename in module[moduleName].keys) {
+      Uri uri = base.resolve(filename);
+      if (uri.pathSegments.last == ".packages") {
+        packagesUri = uri;
+      } else {
+        moduleSources.add(uri);
+      }
+    }
+    CompilerOptions options = getOptions(strong);
+    options.fileSystem = fs;
+    options.sdkRoot = null;
+    options.sdkSummary = sdkSummary;
+    options.omitPlatform = true;
+    options.onDiagnostic = (DiagnosticMessage message) {
+      if (getMessageCodeObject(message)?.name == "InferredPackageUri") return;
+      throw message.ansiFormatted;
+    };
+    if (packagesUri != null) {
+      options.packagesFileUri = packagesUri;
+    }
+    TestIncrementalCompiler compiler =
+        new TestIncrementalCompiler(options, moduleSources.first, null);
+    Component c = await compiler.computeDelta(entryPoints: moduleSources);
+    c.computeCanonicalNames();
+    List<Library> wantedLibs = new List<Library>();
+    for (Library lib in c.libraries) {
+      if (moduleSources.contains(lib.importUri) ||
+          moduleSources.contains(lib.fileUri)) {
+        wantedLibs.add(lib);
+      }
+    }
+    if (wantedLibs.length != moduleSources.length) {
+      throw "Module probably not setup right.";
+    }
+    Component result = new Component(libraries: wantedLibs);
+    List<int> resultBytes = util.postProcess(result);
+    moduleResult[moduleName] = resultBytes;
+  }
+
+  return moduleResult;
+}
+
+Future<Null> newWorldTest(
+    bool strong, List worlds, Map modules, bool omitPlatform) async {
   final Uri sdkRoot = computePlatformBinariesLocation(forceBuildDir: true);
   final Uri base = Uri.parse("org-dartlang-test:///");
   final Uri sdkSummary = base.resolve("vm_platform.dill");
@@ -199,11 +274,57 @@
   Map<String, String> sourceFiles;
   CompilerOptions options;
   TestIncrementalCompiler compiler;
+
+  Map<String, List<int>> moduleData;
+  Map<String, Component> moduleComponents;
+  Component sdk;
+  if (modules != null) {
+    moduleData = await createModules(modules, sdkSummaryData, strong);
+    sdk = newestWholeComponent = new Component();
+    new BinaryBuilder(sdkSummaryData, filename: null, disableLazyReading: false)
+        .readComponent(newestWholeComponent);
+  }
+
   for (YamlMap world in worlds) {
+    List<Component> modulesToUse;
+    if (world["modules"] != null) {
+      moduleComponents ??= new Map<String, Component>();
+
+      sdk.adoptChildren();
+      for (Component c in moduleComponents.values) {
+        c.adoptChildren();
+      }
+      sdk.unbindCanonicalNames();
+      sdk.computeCanonicalNames();
+
+      modulesToUse = new List<Component>();
+      for (String moduleName in world["modules"]) {
+        Component moduleComponent = moduleComponents[moduleName];
+        if (moduleComponent != null) {
+          moduleComponent.computeCanonicalNames();
+          modulesToUse.add(moduleComponent);
+        }
+      }
+      for (String moduleName in world["modules"]) {
+        Component moduleComponent = moduleComponents[moduleName];
+        if (moduleComponent == null) {
+          moduleComponent = new Component(nameRoot: sdk.root);
+          new BinaryBuilder(moduleData[moduleName],
+                  filename: null, disableLazyReading: false)
+              .readComponent(moduleComponent);
+          moduleComponents[moduleName] = moduleComponent;
+          modulesToUse.add(moduleComponent);
+        }
+      }
+    }
     bool brandNewWorld = true;
     if (world["worldType"] == "updated") {
       brandNewWorld = false;
     }
+    bool noFullComponent = false;
+    if (world["noFullComponent"] == true) {
+      noFullComponent = true;
+    }
 
     if (brandNewWorld) {
       fs = new MemoryFileSystem(base);
@@ -235,15 +356,19 @@
       }
       fs.entityForUri(uri).writeAsStringSync(data);
     }
+    if (world["dotPackagesFile"] != null) {
+      packagesUri = base.resolve(world["dotPackagesFile"]);
+    }
 
     if (brandNewWorld) {
       options = getOptions(strong);
       options.fileSystem = fs;
       options.sdkRoot = null;
       options.sdkSummary = sdkSummary;
-      if (packagesUri != null) {
-        options.packagesFileUri = packagesUri;
-      }
+      options.omitPlatform = omitPlatform != false;
+    }
+    if (packagesUri != null) {
+      options.packagesFileUri = packagesUri;
     }
     bool gotError = false;
     final Set<String> formattedErrors = Set<String>();
@@ -270,13 +395,24 @@
       }
     };
 
-    Uri entry = base.resolve(world["entry"]);
+    List<Uri> entries;
+    if (world["entry"] is String) {
+      entries = [base.resolve(world["entry"])];
+    } else {
+      entries = new List<Uri>();
+      List<dynamic> entryList = world["entry"];
+      for (String entry in entryList) {
+        entries.add(base.resolve(entry));
+      }
+    }
+    bool outlineOnly = world["outlineOnly"] == true;
     if (brandNewWorld) {
       if (world["fromComponent"] == true) {
         compiler = new TestIncrementalCompiler.fromComponent(
-            options, entry, newestWholeComponent);
+            options, entries.first, newestWholeComponent, outlineOnly);
       } else {
-        compiler = new TestIncrementalCompiler(options, entry, initializeFrom);
+        compiler = new TestIncrementalCompiler(
+            options, entries.first, initializeFrom, outlineOnly);
       }
     }
 
@@ -289,22 +425,77 @@
       }
     }
 
+    if (modulesToUse != null) {
+      compiler.setModulesToLoadOnNextComputeDelta(modulesToUse);
+      compiler.invalidateAllSources();
+    }
+
     Stopwatch stopwatch = new Stopwatch()..start();
     Component component = await compiler.computeDelta(
-        fullComponent: brandNewWorld ? false : true);
+        entryPoints: entries,
+        fullComponent:
+            brandNewWorld ? false : (noFullComponent ? false : true));
+    if (outlineOnly) {
+      for (Library lib in component.libraries) {
+        for (Class c in lib.classes) {
+          for (Procedure p in c.procedures) {
+            if (p.function.body != null && p.function.body is! EmptyStatement) {
+              throw "Got body (${p.function.body.runtimeType})";
+            }
+          }
+        }
+        for (Procedure p in lib.procedures) {
+          if (p.function.body != null && p.function.body is! EmptyStatement) {
+            throw "Got body (${p.function.body.runtimeType})";
+          }
+        }
+      }
+    }
     performErrorAndWarningCheck(
         world, gotError, formattedErrors, gotWarning, formattedWarnings);
     util.throwOnEmptyMixinBodies(component);
+    util.throwOnInsufficientUriToSource(component);
     print("Compile took ${stopwatch.elapsedMilliseconds} ms");
+
+    checkExpectedContent(world, component);
+
     newestWholeComponentData = util.postProcess(component);
     newestWholeComponent = component;
-    print("*****\n\ncomponent:\n${componentToString(component)}\n\n\n");
+    print("*****\n\ncomponent:\n"
+        "${componentToStringSdkFiltered(component)}\n\n\n");
+
+    if (world["uriToSourcesDoesntInclude"] != null) {
+      for (String filename in world["uriToSourcesDoesntInclude"]) {
+        Uri uri = base.resolve(filename);
+        if (component.uriToSource[uri] != null) {
+          throw "Expected no uriToSource for $uri but found "
+              "${component.uriToSource[uri]}";
+        }
+      }
+    }
 
     int nonSyntheticLibraries = countNonSyntheticLibraries(component);
+    int nonSyntheticPlatformLibraries =
+        countNonSyntheticPlatformLibraries(component);
     int syntheticLibraries = countSyntheticLibraries(component);
-    if (nonSyntheticLibraries != world["expectedLibraryCount"]) {
-      throw "Expected ${world["expectedLibraryCount"]} non-synthetic "
-          "libraries, got ${nonSyntheticLibraries}";
+    if (world["expectsPlatform"] == true) {
+      if (nonSyntheticPlatformLibraries < 5)
+        throw "Expected to have at least 5 platform libraries "
+            "(actually, the entire sdk), "
+            "but got $nonSyntheticPlatformLibraries.";
+    } else {
+      if (nonSyntheticPlatformLibraries != 0)
+        throw "Expected to have 0 platform libraries "
+            "but got $nonSyntheticPlatformLibraries.";
+    }
+    if (world["expectedLibraryCount"] != null) {
+      if (nonSyntheticLibraries - nonSyntheticPlatformLibraries !=
+          world["expectedLibraryCount"]) {
+        throw "Expected ${world["expectedLibraryCount"]} non-synthetic "
+            "libraries, got "
+            "${nonSyntheticLibraries - nonSyntheticPlatformLibraries} "
+            "(not counting platform libraries)";
+      }
     }
     if (world["expectedSyntheticLibraryCount"] != null) {
       if (syntheticLibraries != world["expectedSyntheticLibraryCount"]) {
@@ -312,12 +503,15 @@
             "libraries, got ${syntheticLibraries}";
       }
     }
-    List<Library> entryLib = component.libraries
-        .where((Library lib) => lib.importUri == entry || lib.fileUri == entry)
-        .toList();
-    if (entryLib.length != 1) {
-      throw "Expected the entry to become a library. Got ${entryLib.length} "
-          "libraries for it.";
+    if (!noFullComponent) {
+      List<Library> entryLib = component.libraries
+          .where((Library lib) =>
+              entries.contains(lib.importUri) || entries.contains(lib.fileUri))
+          .toList();
+      if (entryLib.length != entries.length) {
+        throw "Expected the entries to become libraries. Got ${entryLib.length} "
+            "libraries for the expected ${entries.length} entries.";
+      }
     }
     if (compiler.initializedFromDill != expectInitializeFromDill) {
       throw "Expected that initializedFromDill would be "
@@ -340,18 +534,20 @@
       }
     }
 
-    {
+    if (!noFullComponent) {
       Set<String> prevFormattedErrors = formattedErrors.toSet();
       Set<String> prevFormattedWarnings = formattedWarnings.toSet();
       gotError = false;
       formattedErrors.clear();
       gotWarning = false;
       formattedWarnings.clear();
-      Component component2 = await compiler.computeDelta(fullComponent: true);
+      Component component2 = await compiler.computeDelta(
+          entryPoints: entries, fullComponent: true);
       performErrorAndWarningCheck(
           world, gotError, formattedErrors, gotWarning, formattedWarnings);
       List<int> thisWholeComponent = util.postProcess(component2);
-      print("*****\n\ncomponent2:\n${componentToString(component2)}\n\n\n");
+      print("*****\n\ncomponent2:\n"
+          "${componentToStringSdkFiltered(component2)}\n\n\n");
       checkIsEqual(newestWholeComponentData, thisWholeComponent);
       if (prevFormattedErrors.length != formattedErrors.length) {
         Expect.fail("Previously had ${prevFormattedErrors.length} errors, "
@@ -380,6 +576,70 @@
   }
 }
 
+void checkExpectedContent(YamlMap world, Component component) {
+  if (world["expectedContent"] != null) {
+    Map<String, Set<String>> actualContent = new Map<String, Set<String>>();
+    for (Library lib in component.libraries) {
+      Set<String> libContent =
+          actualContent[lib.importUri.toString()] = new Set<String>();
+      for (Class c in lib.classes) {
+        libContent.add("Class ${c.name}");
+      }
+      for (Procedure p in lib.procedures) {
+        libContent.add("Procedure ${p.name}");
+      }
+      for (Field f in lib.fields) {
+        libContent.add("Field ${f.name}");
+      }
+    }
+
+    Map expectedContent = world["expectedContent"];
+
+    doThrow() {
+      throw "Expected and actual content not the same.\n"
+          "Expected $expectedContent.\n"
+          "Got $actualContent";
+    }
+
+    if (actualContent.length != expectedContent.length) doThrow();
+    Set<String> missingKeys = actualContent.keys.toSet()
+      ..removeAll(expectedContent.keys);
+    if (missingKeys.isNotEmpty) doThrow();
+    for (String key in expectedContent.keys) {
+      Set<String> expected = new Set<String>.from(expectedContent[key]);
+      Set<String> actual = actualContent[key].toSet();
+      if (expected.length != actual.length) doThrow();
+      actual.removeAll(expected);
+      if (actual.isNotEmpty) doThrow();
+    }
+  }
+}
+
+String componentToStringSdkFiltered(Component node) {
+  Component c = new Component();
+  List<Uri> dartUris = new List<Uri>();
+  for (Library lib in node.libraries) {
+    if (lib.importUri.scheme == "dart") {
+      dartUris.add(lib.importUri);
+    } else {
+      c.libraries.add(lib);
+    }
+  }
+
+  StringBuffer s = new StringBuffer();
+  s.write(componentToString(c));
+
+  if (dartUris.isNotEmpty) {
+    s.writeln("");
+    s.writeln("And ${dartUris.length} platform libraries:");
+    for (Uri uri in dartUris) {
+      s.writeln(" - $uri");
+    }
+  }
+
+  return s.toString();
+}
+
 int countNonSyntheticLibraries(Component c) {
   int result = 0;
   for (Library lib in c.libraries) {
@@ -388,6 +648,14 @@
   return result;
 }
 
+int countNonSyntheticPlatformLibraries(Component c) {
+  int result = 0;
+  for (Library lib in c.libraries) {
+    if (!lib.isSynthetic && lib.importUri.scheme == "dart") result++;
+  }
+  return result;
+}
+
 int countSyntheticLibraries(Component c) {
   int result = 0;
   for (Library lib in c.libraries) {
@@ -433,6 +701,7 @@
     ..sdkRoot = sdkRoot
     ..target = new VmTarget(new TargetFlags(legacyMode: !strong))
     ..librariesSpecificationUri = Uri.base.resolve("sdk/lib/libraries.json")
+    ..omitPlatform = true
     ..onDiagnostic = (DiagnosticMessage message) {
       if (message.severity == Severity.error ||
           message.severity == Severity.warning) {
@@ -456,6 +725,7 @@
       new TestIncrementalCompiler(options, input);
   Component component = await compiler.computeDelta();
   util.throwOnEmptyMixinBodies(component);
+  util.throwOnInsufficientUriToSource(component);
   new File.fromUri(output).writeAsBytesSync(util.postProcess(component));
   return compiler.initializedFromDill;
 }
@@ -471,6 +741,7 @@
   }
   Component initializedComponent = await compiler.computeDelta();
   util.throwOnEmptyMixinBodies(initializedComponent);
+  util.throwOnInsufficientUriToSource(initializedComponent);
   bool result = compiler.initializedFromDill;
   new File.fromUri(output)
       .writeAsBytesSync(util.postProcess(initializedComponent));
@@ -486,6 +757,7 @@
   Component initializedFullComponent =
       await compiler.computeDelta(fullComponent: true);
   util.throwOnEmptyMixinBodies(initializedFullComponent);
+  util.throwOnInsufficientUriToSource(initializedFullComponent);
   Expect.equals(initializedComponent.libraries.length,
       initializedFullComponent.libraries.length);
   Expect.equals(initializedComponent.uriToSource.length,
@@ -497,6 +769,7 @@
 
   Component partialComponent = await compiler.computeDelta();
   util.throwOnEmptyMixinBodies(partialComponent);
+  util.throwOnInsufficientUriToSource(partialComponent);
   actuallyInvalidatedCount = (compiler
           .getFilteredInvalidatedImportUrisForTesting(invalidateUris)
           ?.length ??
@@ -508,6 +781,7 @@
 
   Component emptyComponent = await compiler.computeDelta();
   util.throwOnEmptyMixinBodies(emptyComponent);
+  util.throwOnInsufficientUriToSource(emptyComponent);
 
   List<Uri> fullLibUris =
       initializedComponent.libraries.map((lib) => lib.importUri).toList();
@@ -551,18 +825,20 @@
   }
 
   TestIncrementalCompiler(CompilerOptions options, this.entryPoint,
-      [Uri initializeFrom])
+      [Uri initializeFrom, bool outlineOnly])
       : super(
             new CompilerContext(
                 new ProcessedOptions(options: options, inputs: [entryPoint])),
-            initializeFrom);
+            initializeFrom,
+            outlineOnly);
 
   TestIncrementalCompiler.fromComponent(CompilerOptions options,
-      this.entryPoint, Component componentToInitializeFrom)
+      this.entryPoint, Component componentToInitializeFrom, [bool outlineOnly])
       : super.fromComponent(
             new CompilerContext(
                 new ProcessedOptions(options: options, inputs: [entryPoint])),
-            componentToInitializeFrom);
+            componentToInitializeFrom,
+            outlineOnly);
 
   @override
   void recordInvalidatedImportUrisForTesting(List<Uri> uris) {
@@ -570,10 +846,21 @@
   }
 
   @override
+  void recordNonFullComponentForTesting(Component component) {
+    // It should at least contain the sdk. Slight smoke test.
+    if (!component.libraries
+        .map((lib) => lib.importUri.toString())
+        .contains("dart:core")) {
+      throw "Loaders builder should contain the sdk, "
+          "but didn't even contain dart:core.";
+    }
+  }
+
+  @override
   Future<Component> computeDelta(
-      {Uri entryPoint, bool fullComponent = false}) async {
+      {List<Uri> entryPoints, bool fullComponent = false}) async {
     Component result = await super
-        .computeDelta(entryPoint: entryPoint, fullComponent: fullComponent);
+        .computeDelta(entryPoints: entryPoints, fullComponent: fullComponent);
 
     // We should at least have the SDK builders available. Slight smoke test.
     if (!dillLoadedData.loader.builders.keys
diff --git a/pkg/front_end/test/incremental_utils.dart b/pkg/front_end/test/incremental_utils.dart
index ef4626a..f5c07a6 100644
--- a/pkg/front_end/test/incremental_utils.dart
+++ b/pkg/front_end/test/incremental_utils.dart
@@ -5,18 +5,30 @@
 import 'package:front_end/src/fasta/kernel/utils.dart' show serializeComponent;
 
 import 'package:kernel/kernel.dart'
-    show Class, Component, EmptyStatement, Library, Procedure, Reference;
+    show
+        Class,
+        Component,
+        EmptyStatement,
+        FileUriNode,
+        Library,
+        Node,
+        Procedure,
+        RecursiveVisitor,
+        Reference;
 
 List<int> postProcess(Component c) {
   c.libraries.sort((l1, l2) {
     return "${l1.fileUri}".compareTo("${l2.fileUri}");
   });
 
+  c.problemsAsJson?.sort();
+
   c.computeCanonicalNames();
   for (Library library in c.libraries) {
     library.additionalExports.sort((Reference r1, Reference r2) {
       return "${r1.canonicalName}".compareTo("${r2.canonicalName}");
     });
+    library.problemsAsJson?.sort();
   }
 
   return serializeComponent(c);
@@ -44,3 +56,23 @@
   }
   return empty;
 }
+
+void throwOnInsufficientUriToSource(Component component) {
+  UriFinder uriFinder = new UriFinder();
+  component.accept(uriFinder);
+  Set<Uri> uris = uriFinder.seenUris.toSet();
+  uris.removeAll(component.uriToSource.keys);
+  if (uris.length != 0) {
+    throw "Expected 0 uris with no source, but found ${uris.length} ($uris)";
+  }
+}
+
+class UriFinder extends RecursiveVisitor {
+  Set<Uri> seenUris = new Set<Uri>();
+  defaultNode(Node node) {
+    super.defaultNode(node);
+    if (node is FileUriNode) {
+      seenUris.add(node.fileUri);
+    }
+  }
+}
diff --git a/pkg/front_end/test/resolve_input_uri_test.dart b/pkg/front_end/test/resolve_input_uri_test.dart
new file mode 100644
index 0000000..1084424
--- /dev/null
+++ b/pkg/front_end/test/resolve_input_uri_test.dart
@@ -0,0 +1,39 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All 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' show Expect;
+
+import 'package:front_end/src/fasta/resolve_input_uri.dart';
+
+test() {
+  // data URI scheme is supported by default'.
+  Expect.stringEquals('data', resolveInputUri('data:,foo').scheme);
+
+  // Custom Dart schemes are recognized by default.
+  Expect.stringEquals('dart', resolveInputUri('dart:foo').scheme);
+  Expect.stringEquals('package', resolveInputUri('package:foo').scheme);
+
+  // Unknown schemes are recognized by default.
+  Expect.stringEquals(
+      isWindows ? 'file' : 'c', resolveInputUri('c:/foo').scheme);
+  Expect.stringEquals('test', resolveInputUri('test:foo').scheme);
+  Expect.stringEquals(
+      'org-dartlang-foo', resolveInputUri('org-dartlang-foo:bar').scheme);
+  Expect.stringEquals('test', resolveInputUri('test:/foo').scheme);
+  Expect.stringEquals(
+      'org-dartlang-foo', resolveInputUri('org-dartlang-foo:/bar').scheme);
+  Expect.stringEquals(
+      "${Uri.base.resolve('file.txt')}", "${resolveInputUri('file:file.txt')}");
+}
+
+main() {
+  // Test platform default.
+  test();
+  // Test non-Windows behavior.
+  isWindows = false;
+  test();
+  // Test Windows behavior.
+  isWindows = true;
+  test();
+}
diff --git a/pkg/front_end/test/scanner_fasta_test.dart b/pkg/front_end/test/scanner_fasta_test.dart
index 1305b34..4345dd7 100644
--- a/pkg/front_end/test/scanner_fasta_test.dart
+++ b/pkg/front_end/test/scanner_fasta_test.dart
@@ -3,7 +3,6 @@
 // BSD-style license that can be found in the LICENSE file.
 import 'dart:convert';
 
-import 'package:analyzer/src/fasta/token_utils.dart';
 import 'package:front_end/src/fasta/fasta_codes.dart';
 import 'package:front_end/src/fasta/scanner.dart' as usedForFuzzTesting;
 import 'package:front_end/src/fasta/scanner.dart';
@@ -52,13 +51,6 @@
 
 @reflectiveTest
 class ScannerTest_Fasta_UTF8 extends ScannerTest_Fasta {
-  @override
-  createScanner(String source) {
-    List<int> encoded = utf8.encode(source).toList(growable: true);
-    encoded.add(0); // Ensure 0 terminted bytes for UTF8 scanner
-    return new fasta.Utf8BytesScanner(encoded, includeComments: true);
-  }
-
   test_invalid_utf8() {
     printBytes(List<int> bytes) {
       var hex = bytes.map((b) => '0x${b.toRadixString(16).toUpperCase()}');
@@ -92,28 +84,25 @@
 
 @reflectiveTest
 class ScannerTest_Fasta extends ScannerTestBase {
-  ScannerTest_Fasta() {
-    usingFasta = true;
-  }
-
-  createScanner(String source) =>
-      new fasta.StringScanner(source, includeComments: true);
-
   @override
   Token scanWithListener(String source, ErrorListener listener,
       {bool lazyAssignmentOperators: false}) {
-    var scanner = createScanner(source);
-    var token = scanner.tokenize();
-    if (scanner.errors != null) {
-      for (LocatedMessage error in scanner.errors) {
-        translateScanError(error.code, error.charOffset, error.length,
+    var result = scanString(source, includeComments: true);
+    var token = result.tokens;
+
+    // Translate error tokens
+    if (result.hasErrors) {
+      while (token is ErrorToken) {
+        translateErrorToken(token,
             (ScannerErrorCode errorCode, int offset, List<Object> arguments) {
           listener.errors.add(new TestError(offset, errorCode, arguments));
         });
+        token = token.next;
       }
     }
-    return new ToAnalyzerTokenStreamConverter_WithListener(listener)
-        .convertTokens(token);
+
+    new Token.eof(-1)..setNext(token);
+    return token;
   }
 
   void test_comments() {
@@ -135,8 +124,7 @@
     ''';
 
     Token scanSource({bool includeComments}) {
-      return new fasta.StringScanner(source, includeComments: includeComments)
-          .tokenize();
+      return scanString(source, includeComments: includeComments).tokens;
     }
 
     int tokenCount = 0;
@@ -212,7 +200,7 @@
     fasta.CommentToken c3;
 
     void prepareTokens() {
-      token = new fasta.StringScanner(code, includeComments: true).tokenize();
+      token = scanString(code, includeComments: true).tokens;
 
       expect(token.type.kind, fasta.IDENTIFIER_TOKEN);
 
@@ -309,8 +297,7 @@
 
   void test_next_previous() {
     const source = 'int a; /*1*/ /*2*/ /*3*/ B f(){if (a < 2) {}}';
-    Token token =
-        new fasta.StringScanner(source, includeComments: true).tokenize();
+    Token token = scanString(source, includeComments: true).tokens;
     while (!token.isEof) {
       expect(token.next.previous, token);
       fasta.CommentToken commentToken = token.precedingComments;
@@ -347,7 +334,7 @@
     expect(openBracket.endToken, same(closeBracket));
     expect(openParen.endToken, same(closeParen));
     listener.assertErrors([
-      new TestError(2, ScannerErrorCode.EXPECTED_TOKEN, ['}']),
+      new TestError(3, ScannerErrorCode.EXPECTED_TOKEN, ['}']),
       new TestError(3, ScannerErrorCode.EXPECTED_TOKEN, [']']),
       new TestError(3, ScannerErrorCode.EXPECTED_TOKEN, [')']),
     ]);
@@ -356,28 +343,7 @@
 
 /// Base class for scanner tests that examine the token stream in Fasta format.
 abstract class ScannerTest_Fasta_Base {
-  List<LocatedMessage> scanErrors;
-
-  Token scan(String source, {int errorCount});
-
-  expectError(Code code, int charOffset, int length) {
-    if (scanErrors == null) {
-      fail('Expected $code but found no errors');
-    }
-    for (LocatedMessage e in scanErrors) {
-      if (e.code == code && e.charOffset == charOffset && e.length == length) {
-        return;
-      }
-    }
-    final msg = new StringBuffer();
-    msg.writeln('Expected:');
-    msg.writeln('  $code at $charOffset, $length');
-    msg.writeln('but found:');
-    for (LocatedMessage e in scanErrors) {
-      msg.writeln('  ${e.code} at ${e.charOffset}, ${e.length}');
-    }
-    fail(msg.toString());
-  }
+  Token scan(String source);
 
   expectToken(Token token, TokenType type, int offset, int length,
       {bool isSynthetic: false, String lexeme}) {
@@ -393,6 +359,10 @@
 
   void test_string_simple_interpolation_missingIdentifier() {
     Token token = scan("'\$x\$'");
+    expect((token as fasta.ErrorToken).errorCode,
+        same(codeUnexpectedDollarInString));
+
+    token = token.next;
     expectToken(token, TokenType.STRING, 0, 1, lexeme: "'");
 
     token = token.next;
@@ -412,21 +382,25 @@
         lexeme: '', isSynthetic: true);
 
     token = token.next;
-    expect((token as fasta.ErrorToken).errorCode,
-        same(codeUnexpectedDollarInString));
-
-    token = token.next;
     expectToken(token, TokenType.STRING, 4, 1, lexeme: "'");
   }
 
   void test_string_simple_unterminated_interpolation_block() {
-    Token token = scan(r'"foo ${bar', errorCount: 1);
-    expectError(codeUnterminatedString, 0, 10);
+    Token token = scan(r'"foo ${bar');
+    expect((token as fasta.ErrorToken).errorCode, same(codeUnmatchedToken));
+    var interpolationStartErrorToken = token as fasta.UnmatchedToken;
+
+    token = token.next;
+    expect((token as fasta.ErrorToken).errorCode, same(codeUnterminatedString));
+    expect((token as fasta.UnterminatedString).start, '"');
+
+    token = token.next;
     expectToken(token, TokenType.STRING, 0, 5, lexeme: '"foo ');
 
     token = token.next;
     expectToken(token, TokenType.STRING_INTERPOLATION_EXPRESSION, 5, 2);
     BeginToken interpolationStart = token;
+    expect(interpolationStartErrorToken.begin, same(interpolationStart));
 
     token = token.next;
     expectToken(token, TokenType.IDENTIFIER, 7, 3, lexeme: 'bar');
@@ -438,24 +412,33 @@
     expect(interpolationStart.endToken, same(token));
 
     token = token.next;
-    expect((token as fasta.ErrorToken).errorCode, same(codeUnmatchedToken));
-    expect((token as fasta.UnmatchedToken).begin, same(interpolationStart));
-
-    token = token.next;
     expectToken(token, TokenType.STRING, 10, 0, isSynthetic: true, lexeme: '"');
-
-    token = token.next;
-    expect(token.isEof, isTrue);
   }
 
   void test_string_simple_unterminated_interpolation_block2() {
-    Token token = scan(r'"foo ${bar(baz[', errorCount: 1);
-    expectError(codeUnterminatedString, 0, 15);
+    Token token = scan(r'"foo ${bar(baz[');
+    expect((token as fasta.ErrorToken).errorCode, same(codeUnmatchedToken));
+    var openSquareBracketErrorToken = token as fasta.UnmatchedToken;
+
+    token = token.next;
+    expect((token as fasta.ErrorToken).errorCode, same(codeUnmatchedToken));
+    var openParenErrorToken = token as fasta.UnmatchedToken;
+
+    token = token.next;
+    expect((token as fasta.ErrorToken).errorCode, same(codeUnmatchedToken));
+    var interpolationStartErrorToken = token as fasta.UnmatchedToken;
+
+    token = token.next;
+    expect((token as fasta.ErrorToken).errorCode, same(codeUnterminatedString));
+    expect((token as fasta.UnterminatedString).start, '"');
+
+    token = token.next;
     expectToken(token, TokenType.STRING, 0, 5, lexeme: '"foo ');
 
     token = token.next;
     expectToken(token, TokenType.STRING_INTERPOLATION_EXPRESSION, 5, 2);
     BeginToken interpolationStart = token;
+    expect(interpolationStartErrorToken.begin, same(interpolationStart));
 
     token = token.next;
     expectToken(token, TokenType.IDENTIFIER, 7, 3, lexeme: 'bar');
@@ -463,6 +446,7 @@
     token = token.next;
     expectToken(token, TokenType.OPEN_PAREN, 10, 1);
     BeginToken openParen = token;
+    expect(openParenErrorToken.begin, same(openParen));
 
     token = token.next;
     expectToken(token, TokenType.IDENTIFIER, 11, 3, lexeme: 'baz');
@@ -470,6 +454,7 @@
     token = token.next;
     expectToken(token, TokenType.OPEN_SQUARE_BRACKET, 14, 1);
     BeginToken openSquareBracket = token;
+    expect(openSquareBracketErrorToken.begin, same(openSquareBracket));
 
     token = token.next;
     expectToken(token, TokenType.CLOSE_SQUARE_BRACKET, 15, 0,
@@ -477,37 +462,29 @@
     expect(openSquareBracket.endToken, same(token));
 
     token = token.next;
-    expect((token as fasta.ErrorToken).errorCode, same(codeUnmatchedToken));
-    expect((token as fasta.UnmatchedToken).begin, same(openSquareBracket));
-
-    token = token.next;
     expectToken(token, TokenType.CLOSE_PAREN, 15, 0,
         isSynthetic: true, lexeme: ')');
     expect(openParen.endToken, same(token));
 
     token = token.next;
-    expect((token as fasta.ErrorToken).errorCode, same(codeUnmatchedToken));
-    expect((token as fasta.UnmatchedToken).begin, same(openParen));
-
-    token = token.next;
     expectToken(token, TokenType.CLOSE_CURLY_BRACKET, 15, 0,
         isSynthetic: true, lexeme: '}');
     expect(interpolationStart.endToken, same(token));
 
     token = token.next;
-    expect((token as fasta.ErrorToken).errorCode, same(codeUnmatchedToken));
-    expect((token as fasta.UnmatchedToken).begin, same(interpolationStart));
-
-    token = token.next;
     expectToken(token, TokenType.STRING, 15, 0, isSynthetic: true, lexeme: '"');
-
-    token = token.next;
-    expect(token.isEof, isTrue);
   }
 
   void test_string_simple_missing_interpolation_identifier() {
-    Token token = scan(r'"foo $', errorCount: 1);
-    expectError(codeUnterminatedString, 0, 6);
+    Token token = scan(r'"foo $');
+    expect((token as fasta.ErrorToken).errorCode,
+        same(codeUnexpectedDollarInString));
+
+    token = token.next;
+    expect((token as fasta.ErrorToken).errorCode, same(codeUnterminatedString));
+    expect((token as fasta.UnterminatedString).start, '"');
+
+    token = token.next;
     expectToken(token, TokenType.STRING, 0, 5, lexeme: '"foo ');
 
     token = token.next;
@@ -518,75 +495,67 @@
         isSynthetic: true, lexeme: '');
 
     token = token.next;
-    expect((token as fasta.ErrorToken).errorCode,
-        same(codeUnexpectedDollarInString));
-
-    token = token.next;
     expectToken(token, TokenType.STRING, 6, 0, isSynthetic: true, lexeme: '"');
-
-    token = token.next;
-    expect(token.isEof, isTrue);
   }
 
   void test_string_multi_unterminated() {
-    Token token = scan("'''string", errorCount: 1);
-    expectError(codeUnterminatedString, 0, 9);
-    expectToken(token, TokenType.STRING, 0, 9,
-        lexeme: "'''string'''", isSynthetic: true);
+    Token token = scan("'''string");
+    expect((token as fasta.ErrorToken).errorCode, same(codeUnterminatedString));
+    expect((token as fasta.UnterminatedString).start, "'''");
 
     token = token.next;
-    expect(token.isEof, isTrue);
+    expectToken(token, TokenType.STRING, 0, 9,
+        lexeme: "'''string'''", isSynthetic: true);
   }
 
   void test_string_raw_multi_unterminated() {
-    Token token = scan("r'''string", errorCount: 1);
-    expectError(codeUnterminatedString, 0, 10);
-    expectToken(token, TokenType.STRING, 0, 10,
-        lexeme: "r'''string'''", isSynthetic: true);
+    Token token = scan("r'''string");
+    expect((token as fasta.ErrorToken).errorCode, same(codeUnterminatedString));
+    expect((token as fasta.UnterminatedString).start, "r'''");
 
     token = token.next;
-    expect(token.isEof, isTrue);
+    expectToken(token, TokenType.STRING, 0, 10,
+        lexeme: "r'''string'''", isSynthetic: true);
   }
 
   void test_string_raw_simple_unterminated_eof() {
-    Token token = scan("r'string", errorCount: 1);
-    expectError(codeUnterminatedString, 0, 8);
-    expectToken(token, TokenType.STRING, 0, 8,
-        lexeme: "r'string'", isSynthetic: true);
+    Token token = scan("r'string");
+    expect((token as fasta.ErrorToken).errorCode, same(codeUnterminatedString));
+    expect((token as fasta.UnterminatedString).start, "r'");
 
     token = token.next;
-    expect(token.isEof, isTrue);
+    expectToken(token, TokenType.STRING, 0, 8,
+        lexeme: "r'string'", isSynthetic: true);
   }
 
   void test_string_raw_simple_unterminated_eol() {
-    Token token = scan("r'string\n", errorCount: 1);
-    expectError(codeUnterminatedString, 0, 8);
-    expectToken(token, TokenType.STRING, 0, 8,
-        lexeme: "r'string'", isSynthetic: true);
+    Token token = scan("r'string\n");
+    expect((token as fasta.ErrorToken).errorCode, same(codeUnterminatedString));
+    expect((token as fasta.UnterminatedString).start, "r'");
 
     token = token.next;
-    expect(token.isEof, isTrue);
+    expectToken(token, TokenType.STRING, 0, 8,
+        lexeme: "r'string'", isSynthetic: true);
   }
 
   void test_string_simple_unterminated_eof() {
-    Token token = scan("'string", errorCount: 1);
-    expectError(codeUnterminatedString, 0, 7);
-    expectToken(token, TokenType.STRING, 0, 7,
-        lexeme: "'string'", isSynthetic: true);
+    Token token = scan("'string");
+    expect((token as fasta.ErrorToken).errorCode, same(codeUnterminatedString));
+    expect((token as fasta.UnterminatedString).start, "'");
 
     token = token.next;
-    expect(token.isEof, isTrue);
+    expectToken(token, TokenType.STRING, 0, 7,
+        lexeme: "'string'", isSynthetic: true);
   }
 
   void test_string_simple_unterminated_eol() {
-    Token token = scan("'string\n", errorCount: 1);
-    expectError(codeUnterminatedString, 0, 7);
-
-    expectToken(token, TokenType.STRING, 0, 7,
-        lexeme: "'string'", isSynthetic: true);
+    Token token = scan("'string\n");
+    expect((token as fasta.ErrorToken).errorCode, same(codeUnterminatedString));
+    expect((token as fasta.UnterminatedString).start, "'");
 
     token = token.next;
-    expect(token.isEof, isTrue);
+    expectToken(token, TokenType.STRING, 0, 7,
+        lexeme: "'string'", isSynthetic: true);
   }
 
   void test_match_angle_brackets() {
@@ -745,25 +714,23 @@
 /// Scanner tests that exercise the Fasta scanner directly.
 @reflectiveTest
 class ScannerTest_Fasta_Direct_UTF8 extends ScannerTest_Fasta_Direct {
-  createScanner(String source, {bool includeComments}) {
+  ScannerResult scanSource(source, {includeComments: true}) {
     List<int> encoded = utf8.encode(source).toList(growable: true);
     encoded.add(0); // Ensure 0 terminted bytes for UTF8 scanner
-    return new fasta.Utf8BytesScanner(encoded,
-        includeComments: includeComments);
+    return usedForFuzzTesting.scan(encoded, includeComments: includeComments);
   }
 }
 
 /// Scanner tests that exercise the Fasta scanner directly.
 @reflectiveTest
 class ScannerTest_Fasta_Direct extends ScannerTest_Fasta_Base {
-  createScanner(String source, {bool includeComments}) =>
-      new fasta.StringScanner(source, includeComments: includeComments);
+  ScannerResult scanSource(source, {includeComments: true}) =>
+      scanString(source, includeComments: includeComments);
 
   @override
-  Token scan(String source, {int errorCount}) {
-    Scanner scanner = createScanner(source, includeComments: true);
-    scanner.reportErrors = true;
-    final Token first = scanner.tokenize();
+  Token scan(String source) {
+    var result = scanSource(source, includeComments: true);
+    final Token first = result.tokens;
     Token token = first;
     while (!token.isEof) {
       Token next = token.next;
@@ -774,83 +741,54 @@
       }
       token = next;
     }
-    scanErrors = scanner.errors;
-    expect(scanErrors, errorCount == null ? isNull : hasLength(errorCount));
     return first;
   }
 
   void test_linestarts() {
-    var scanner = createScanner("var\r\ni\n=\n1;\n");
-    var token = scanner.tokenize();
+    var result = scanSource("var\r\ni\n=\n1;\n");
+    var token = result.tokens;
     expect(token.lexeme, 'var');
-    var lineStarts = scanner.lineStarts;
+    var lineStarts = result.lineStarts;
     expect(lineStarts, orderedEquals([0, 5, 7, 9, 12, 13]));
   }
 
   void test_linestarts_synthetic_string() {
-    var scanner = createScanner("var\r\ns\n=\n'eh'\n'eh\n;\n");
-    Token firstToken = scanner.tokenize();
-    expect(firstToken.lexeme, 'var');
-    var lineStarts = scanner.lineStarts;
+    var result = scanSource("var\r\ns\n=\n'eh'\n'eh\n;\n");
+    var lineStarts = result.lineStarts;
     expect(lineStarts, orderedEquals([0, 5, 7, 9, 14, 18, 20, 21]));
-    var token = firstToken;
+
+    Token token = result.tokens;
+    expect(token.charOffset, 14, reason: 'error token : $token, ${token.type}');
+    expect(token.charCount, 3, reason: 'error token : $token, ${token.type}');
+
+    token = token.next;
+    expect(token.lexeme, 'var');
     int index = 0;
     while (!token.isEof) {
-      if (token is fasta.ErrorToken) {
-        expect(token.charOffset, 14,
-            reason: 'error token : $token, ${token.type}');
-        expect(token.charCount, 3,
-            reason: 'error token : $token, ${token.type}');
-      } else {
-        expect(token.charOffset, lineStarts[index],
-            reason: 'token # $index : $token, ${token.type}');
-        ++index;
-      }
+      expect(token.charOffset, lineStarts[index],
+          reason: 'token # $index : $token, ${token.type}');
+      ++index;
       token = token.next;
     }
   }
 
   void test_linestarts_synthetic_string_utf8() {
-    var scanner = createScanner("var\r\ns\n=\n'éh'\n'éh\n;\n");
-    Token firstToken = scanner.tokenize();
-    expect(firstToken.lexeme, 'var');
-    var lineStarts = scanner.lineStarts;
+    var result = scanSource("var\r\ns\n=\n'éh'\n'éh\n;\n");
+    var lineStarts = result.lineStarts;
     expect(lineStarts, orderedEquals([0, 5, 7, 9, 14, 18, 20, 21]));
-    var token = firstToken;
+
+    Token token = result.tokens;
+    expect(token, const TypeMatcher<ErrorToken>());
+    expect(token.charOffset, 14, reason: 'token # 0 : $token, ${token.type}');
+
+    token = token.next;
+    expect(token.lexeme, 'var');
     int index = 0;
     while (!token.isEof) {
-      if (token is! fasta.ErrorToken) {
-        expect(token.charOffset, lineStarts[index],
-            reason: 'token # $index : $token, ${token.type}');
-        ++index;
-      }
+      expect(token.charOffset, lineStarts[index],
+          reason: 'token # $index : $token, ${token.type}');
+      ++index;
       token = token.next;
     }
   }
 }
-
-/// Override of [ToAnalyzerTokenStreamConverter] that verifies that there are no
-/// errors.
-class ToAnalyzerTokenStreamConverter_NoErrors
-    extends ToAnalyzerTokenStreamConverter {
-  @override
-  void reportError(
-      ScannerErrorCode errorCode, int offset, List<Object> arguments) {
-    fail('Unexpected error: $errorCode, $offset, $arguments');
-  }
-}
-
-/// Override of [ToAnalyzerTokenStreamConverter] that records errors in an
-/// [ErrorListener].
-class ToAnalyzerTokenStreamConverter_WithListener
-    extends ToAnalyzerTokenStreamConverter {
-  final ErrorListener _listener;
-
-  ToAnalyzerTokenStreamConverter_WithListener(this._listener);
-
-  @override
-  void reportError(
-      ScannerErrorCode errorCode, int offset, List<Object> arguments) {
-    _listener.errors.add(new TestError(offset, errorCode, arguments));
-  }
-}
diff --git a/pkg/front_end/test/scanner_replacement_test.dart b/pkg/front_end/test/scanner_replacement_test.dart
index aa227f1..ea881a8 100644
--- a/pkg/front_end/test/scanner_replacement_test.dart
+++ b/pkg/front_end/test/scanner_replacement_test.dart
@@ -31,10 +31,6 @@
 /// stream conversion.
 @reflectiveTest
 class ScannerTest_Replacement extends ScannerTestBase {
-  ScannerTest_Replacement() {
-    usingFasta = true;
-  }
-
   @override
   analyzer.Token scanWithListener(String source, ErrorListener listener,
       {bool lazyAssignmentOperators: false}) {
diff --git a/pkg/front_end/test/scanner_test.dart b/pkg/front_end/test/scanner_test.dart
index 67a212b..3a0bf75 100644
--- a/pkg/front_end/test/scanner_test.dart
+++ b/pkg/front_end/test/scanner_test.dart
@@ -79,8 +79,6 @@
 }
 
 abstract class ScannerTestBase {
-  bool usingFasta = false;
-
   Token scanWithListener(String source, ErrorListener listener,
       {bool lazyAssignmentOperators: false});
 
@@ -340,20 +338,14 @@
     var expectedErrors = [
       new TestError(9, ScannerErrorCode.UNTERMINATED_STRING_LITERAL, null),
     ];
-    if (usingFasta) {
-      // fasta inserts synthetic closers
-      expectedTokens.addAll([
-        new SyntheticToken(TokenType.CLOSE_CURLY_BRACKET, 10),
-        new SyntheticStringToken(TokenType.STRING, "\"", 10, 0),
-      ]);
-      expectedErrors.addAll([
-        new TestError(10, ScannerErrorCode.EXPECTED_TOKEN, ['}']),
-      ]);
-    } else {
-      expectedTokens.addAll([
-        new StringToken(TokenType.STRING, "", 10),
-      ]);
-    }
+    // fasta inserts synthetic closers
+    expectedTokens.addAll([
+      new SyntheticToken(TokenType.CLOSE_CURLY_BRACKET, 10),
+      new SyntheticStringToken(TokenType.STRING, "\"", 10, 0),
+    ]);
+    expectedErrors.addAll([
+      new TestError(10, ScannerErrorCode.EXPECTED_TOKEN, ['}']),
+    ]);
     ErrorListener listener = new ErrorListener();
     Token token = scanWithListener("\"foo \${bar", listener);
     listener.assertErrors(expectedErrors);
@@ -711,32 +703,23 @@
     ErrorListener listener = new ErrorListener();
     BeginToken openBracket = scanWithListener('[(])', listener);
     BeginToken openParen = openBracket.next;
-    if (usingFasta) {
-      // When openers and closers are mismatched
-      // fasta favors considering the opener to be mismatched,
-      // and inserts synthetic closers as needed.
-      // `[(])` is parsed as `[()])` where the first `)` is synthetic
-      // and the trailing `)` is unmatched.
-      var closeParen = openParen.next;
-      expect(closeParen.isSynthetic, isTrue);
-      var closeBracket = closeParen.next;
-      expect(closeBracket.isSynthetic, isFalse);
-      var closeParen2 = closeBracket.next;
-      expect(closeParen2.isSynthetic, isFalse);
-      expect(closeParen2.next.type, TokenType.EOF);
-      expect(openBracket.endToken, same(closeBracket));
-      expect(openParen.endToken, same(closeParen));
-      listener.assertErrors([
-        new TestError(2, ScannerErrorCode.EXPECTED_TOKEN, [')']),
-      ]);
-    } else {
-      var closeBracket = openParen.next;
-      var closeParen = closeBracket.next;
-      expect(closeParen.next.type, TokenType.EOF);
-      expect(openBracket.endToken, isNull);
-      expect(openParen.endToken, same(closeParen));
-      listener.assertNoErrors();
-    }
+    // When openers and closers are mismatched
+    // fasta favors considering the opener to be mismatched,
+    // and inserts synthetic closers as needed.
+    // `[(])` is parsed as `[()])` where the first `)` is synthetic
+    // and the trailing `)` is unmatched.
+    var closeParen = openParen.next;
+    expect(closeParen.isSynthetic, isTrue);
+    var closeBracket = closeParen.next;
+    expect(closeBracket.isSynthetic, isFalse);
+    var closeParen2 = closeBracket.next;
+    expect(closeParen2.isSynthetic, isFalse);
+    expect(closeParen2.next.type, TokenType.EOF);
+    expect(openBracket.endToken, same(closeBracket));
+    expect(openParen.endToken, same(closeParen));
+    listener.assertErrors([
+      new TestError(2, ScannerErrorCode.EXPECTED_TOKEN, [')']),
+    ]);
   }
 
   void test_mismatched_opener() {
@@ -746,28 +729,20 @@
     ErrorListener listener = new ErrorListener();
     BeginToken openParen = scanWithListener('([)', listener);
     BeginToken openBracket = openParen.next;
-    if (usingFasta) {
-      // When openers and closers are mismatched,
-      // fasta favors considering the opener to be mismatched
-      // and inserts synthetic closers as needed.
-      // `([)` is scanned as `([])` where `]` is synthetic.
-      var closeBracket = openBracket.next;
-      expect(closeBracket.isSynthetic, isTrue);
-      var closeParen = closeBracket.next;
-      expect(closeParen.isSynthetic, isFalse);
-      expect(closeParen.next.type, TokenType.EOF);
-      expect(openBracket.endToken, closeBracket);
-      expect(openParen.endToken, closeParen);
-      listener.assertErrors([
-        new TestError(2, ScannerErrorCode.EXPECTED_TOKEN, [']']),
-      ]);
-    } else {
-      var closeParen = openBracket.next;
-      expect(closeParen.next.type, TokenType.EOF);
-      expect(openParen.endToken, isNull);
-      expect(openBracket.endToken, isNull);
-      listener.assertNoErrors();
-    }
+    // When openers and closers are mismatched,
+    // fasta favors considering the opener to be mismatched
+    // and inserts synthetic closers as needed.
+    // `([)` is scanned as `([])` where `]` is synthetic.
+    var closeBracket = openBracket.next;
+    expect(closeBracket.isSynthetic, isTrue);
+    var closeParen = closeBracket.next;
+    expect(closeParen.isSynthetic, isFalse);
+    expect(closeParen.next.type, TokenType.EOF);
+    expect(openBracket.endToken, closeBracket);
+    expect(openParen.endToken, closeParen);
+    listener.assertErrors([
+      new TestError(2, ScannerErrorCode.EXPECTED_TOKEN, [']']),
+    ]);
   }
 
   void test_mismatched_opener_in_interpolation() {
@@ -958,16 +933,10 @@
 
   void test_string_multi_unterminated() {
     List<Token> expectedTokens = [];
-    if (usingFasta) {
-      // Fasta inserts synthetic closers.
-      expectedTokens.addAll([
-        new SyntheticStringToken(TokenType.STRING, "'''string'''", 0, 9),
-      ]);
-    } else {
-      expectedTokens.addAll([
-        new StringToken(TokenType.STRING, "'''string", 0),
-      ]);
-    }
+    // Fasta inserts synthetic closers.
+    expectedTokens.addAll([
+      new SyntheticStringToken(TokenType.STRING, "'''string'''", 0, 9),
+    ]);
   }
 
   void test_string_multi_unterminated_interpolation_block() {
@@ -979,20 +948,14 @@
     var expectedErrors = [
       new TestError(8, ScannerErrorCode.UNTERMINATED_STRING_LITERAL, null),
     ];
-    if (usingFasta) {
-      // Fasta inserts synthetic closers.
-      expectedTokens.addAll([
-        new SyntheticToken(TokenType.CLOSE_CURLY_BRACKET, 9),
-        new SyntheticStringToken(TokenType.STRING, "'''", 9, 0),
-      ]);
-      expectedErrors.addAll([
-        new TestError(9, ScannerErrorCode.EXPECTED_TOKEN, ['}']),
-      ]);
-    } else {
-      expectedTokens.addAll([
-        new StringToken(TokenType.STRING, "", 9),
-      ]);
-    }
+    // Fasta inserts synthetic closers.
+    expectedTokens.addAll([
+      new SyntheticToken(TokenType.CLOSE_CURLY_BRACKET, 9),
+      new SyntheticStringToken(TokenType.STRING, "'''", 9, 0),
+    ]);
+    expectedErrors.addAll([
+      new TestError(9, ScannerErrorCode.EXPECTED_TOKEN, ['}']),
+    ]);
     ErrorListener listener = new ErrorListener();
     Token token = scanWithListener("'''\${name", listener);
     listener.assertErrors(expectedErrors);
@@ -1005,16 +968,10 @@
       new StringToken(TokenType.STRING_INTERPOLATION_IDENTIFIER, "\$", 3),
       new StringToken(TokenType.IDENTIFIER, "name", 4),
     ];
-    if (usingFasta) {
-      // Fasta inserts synthetic closers.
-      expectedTokens.addAll([
-        new SyntheticStringToken(TokenType.STRING, "'''", 8, 0),
-      ]);
-    } else {
-      expectedTokens.addAll([
-        new StringToken(TokenType.STRING, "", 8),
-      ]);
-    }
+    // Fasta inserts synthetic closers.
+    expectedTokens.addAll([
+      new SyntheticStringToken(TokenType.STRING, "'''", 8, 0),
+    ]);
     _assertErrorAndTokens(ScannerErrorCode.UNTERMINATED_STRING_LITERAL, 7,
         "'''\$name", expectedTokens);
   }
@@ -1030,16 +987,10 @@
   void test_string_raw_multi_unterminated() {
     String source = "r'''string";
     List<Token> expectedTokens = [];
-    if (usingFasta) {
-      // Fasta inserts synthetic closers.
-      expectedTokens.addAll([
-        new SyntheticStringToken(TokenType.STRING, "r'''string'''", 0, 10),
-      ]);
-    } else {
-      expectedTokens.addAll([
-        new StringToken(TokenType.STRING, "r'''string", 0),
-      ]);
-    }
+    // Fasta inserts synthetic closers.
+    expectedTokens.addAll([
+      new SyntheticStringToken(TokenType.STRING, "r'''string'''", 0, 10),
+    ]);
     _assertErrorAndTokens(ScannerErrorCode.UNTERMINATED_STRING_LITERAL, 9,
         source, expectedTokens);
   }
@@ -1055,16 +1006,10 @@
   void test_string_raw_simple_unterminated_eof() {
     String source = "r'string";
     List<Token> expectedTokens = [];
-    if (usingFasta) {
-      // Fasta inserts synthetic closers.
-      expectedTokens.addAll([
-        new SyntheticStringToken(TokenType.STRING, "r'string'", 0, 8),
-      ]);
-    } else {
-      expectedTokens.addAll([
-        new StringToken(TokenType.STRING, "r'string", 0),
-      ]);
-    }
+    // Fasta inserts synthetic closers.
+    expectedTokens.addAll([
+      new SyntheticStringToken(TokenType.STRING, "r'string'", 0, 8),
+    ]);
     _assertErrorAndTokens(ScannerErrorCode.UNTERMINATED_STRING_LITERAL, 7,
         source, expectedTokens);
   }
@@ -1072,18 +1017,12 @@
   void test_string_raw_simple_unterminated_eol() {
     String source = "r'string\n";
     List<Token> expectedTokens = [];
-    if (usingFasta) {
-      // Fasta inserts synthetic closers.
-      expectedTokens.addAll([
-        new SyntheticStringToken(TokenType.STRING, "r'string'", 0, 8),
-      ]);
-    } else {
-      expectedTokens.addAll([
-        new StringToken(TokenType.STRING, "r'string", 0),
-      ]);
-    }
-    _assertErrorAndTokens(ScannerErrorCode.UNTERMINATED_STRING_LITERAL,
-        usingFasta ? 7 : 8, source, expectedTokens);
+    // Fasta inserts synthetic closers.
+    expectedTokens.addAll([
+      new SyntheticStringToken(TokenType.STRING, "r'string'", 0, 8),
+    ]);
+    _assertErrorAndTokens(ScannerErrorCode.UNTERMINATED_STRING_LITERAL, 7,
+        source, expectedTokens);
   }
 
   void test_string_simple_double() {
@@ -1163,20 +1102,14 @@
       new StringToken(TokenType.STRING_INTERPOLATION_IDENTIFIER, "\$", 3),
     ];
     var expectedErrors = <TestError>[];
-    if (usingFasta) {
-      // Fasta scanner inserts a synthetic identifier
-      expectedTokens.addAll([
-        new SyntheticStringToken(TokenType.IDENTIFIER, "", 4, 0),
-        new StringToken(TokenType.STRING, "'", 4),
-      ]);
-      expectedErrors.addAll([
-        new TestError(4, ScannerErrorCode.MISSING_IDENTIFIER, null),
-      ]);
-    } else {
-      expectedTokens.addAll([
-        new StringToken(TokenType.STRING, "'", 4),
-      ]);
-    }
+    // Fasta scanner inserts a synthetic identifier
+    expectedTokens.addAll([
+      new SyntheticStringToken(TokenType.IDENTIFIER, "", 4, 0),
+      new StringToken(TokenType.STRING, "'", 4),
+    ]);
+    expectedErrors.addAll([
+      new TestError(4, ScannerErrorCode.MISSING_IDENTIFIER, null),
+    ]);
     ErrorListener listener = new ErrorListener();
     Token token = scanWithListener("'\$x\$'", listener);
     listener.assertErrors(expectedErrors);
@@ -1189,14 +1122,12 @@
       new StringToken(TokenType.STRING_INTERPOLATION_IDENTIFIER, "\$", 1),
     ];
     var expectedErrors = <TestError>[];
-    if (usingFasta) {
-      expectedTokens.addAll([
-        new SyntheticStringToken(TokenType.IDENTIFIER, "", 2),
-      ]);
-      expectedErrors.addAll([
-        new TestError(2, ScannerErrorCode.MISSING_IDENTIFIER, null),
-      ]);
-    }
+    expectedTokens.addAll([
+      new SyntheticStringToken(TokenType.IDENTIFIER, "", 2),
+    ]);
+    expectedErrors.addAll([
+      new TestError(2, ScannerErrorCode.MISSING_IDENTIFIER, null),
+    ]);
     expectedTokens.addAll([
       new StringToken(TokenType.STRING, "1'", 2),
     ]);
@@ -1213,16 +1144,10 @@
   void test_string_simple_unterminated_eof() {
     String source = "'string";
     List<Token> expectedTokens = [];
-    if (usingFasta) {
-      // Fasta inserts synthetic closers.
-      expectedTokens.addAll([
-        new SyntheticStringToken(TokenType.STRING, "'string'", 0, 7),
-      ]);
-    } else {
-      expectedTokens.addAll([
-        new StringToken(TokenType.STRING, "'string", 0),
-      ]);
-    }
+    // Fasta inserts synthetic closers.
+    expectedTokens.addAll([
+      new SyntheticStringToken(TokenType.STRING, "'string'", 0, 7),
+    ]);
     _assertErrorAndTokens(ScannerErrorCode.UNTERMINATED_STRING_LITERAL, 6,
         source, expectedTokens);
   }
@@ -1230,18 +1155,12 @@
   void test_string_simple_unterminated_eol() {
     String source = "'string\r";
     List<Token> expectedTokens = [];
-    if (usingFasta) {
-      // Fasta inserts synthetic closers.
-      expectedTokens.addAll([
-        new SyntheticStringToken(TokenType.STRING, "'string'", 0, 7),
-      ]);
-    } else {
-      expectedTokens.addAll([
-        new StringToken(TokenType.STRING, "'string", 0),
-      ]);
-    }
-    _assertErrorAndTokens(ScannerErrorCode.UNTERMINATED_STRING_LITERAL,
-        usingFasta ? 6 : 7, source, expectedTokens);
+    // Fasta inserts synthetic closers.
+    expectedTokens.addAll([
+      new SyntheticStringToken(TokenType.STRING, "'string'", 0, 7),
+    ]);
+    _assertErrorAndTokens(ScannerErrorCode.UNTERMINATED_STRING_LITERAL, 6,
+        source, expectedTokens);
   }
 
   void test_string_simple_unterminated_interpolation_block() {
@@ -1253,20 +1172,14 @@
     List<TestError> expectedErrors = [
       new TestError(6, ScannerErrorCode.UNTERMINATED_STRING_LITERAL, null),
     ];
-    if (usingFasta) {
-      // Fasta inserts synthetic closers.
-      expectedTokens.addAll([
-        new SyntheticToken(TokenType.CLOSE_CURLY_BRACKET, 7),
-        new SyntheticStringToken(TokenType.STRING, "'", 7, 0),
-      ]);
-      expectedErrors.addAll([
-        new TestError(7, ScannerErrorCode.EXPECTED_TOKEN, ['}']),
-      ]);
-    } else {
-      expectedTokens.addAll([
-        new StringToken(TokenType.STRING, "", 7),
-      ]);
-    }
+    // Fasta inserts synthetic closers.
+    expectedTokens.addAll([
+      new SyntheticToken(TokenType.CLOSE_CURLY_BRACKET, 7),
+      new SyntheticStringToken(TokenType.STRING, "'", 7, 0),
+    ]);
+    expectedErrors.addAll([
+      new TestError(7, ScannerErrorCode.EXPECTED_TOKEN, ['}']),
+    ]);
     ErrorListener listener = new ErrorListener();
     Token token = scanWithListener("'\${name", listener);
     listener.assertErrors(expectedErrors);
@@ -1279,16 +1192,10 @@
       new StringToken(TokenType.STRING_INTERPOLATION_IDENTIFIER, "\$", 1),
       new StringToken(TokenType.IDENTIFIER, "name", 2),
     ];
-    if (usingFasta) {
-      // Fasta inserts synthetic closers.
-      expectedTokens.addAll([
-        new SyntheticStringToken(TokenType.STRING, "'", 6, 0),
-      ]);
-    } else {
-      expectedTokens.addAll([
-        new StringToken(TokenType.STRING, "", 6),
-      ]);
-    }
+    // Fasta inserts synthetic closers.
+    expectedTokens.addAll([
+      new SyntheticStringToken(TokenType.STRING, "'", 6, 0),
+    ]);
     _assertErrorAndTokens(ScannerErrorCode.UNTERMINATED_STRING_LITERAL, 5,
         "'\$name", expectedTokens);
   }
@@ -1423,8 +1330,7 @@
       {bool lazyAssignmentOperators: false}) {
     // Fasta generates errors for unmatched '{', '[', etc
     Token originalToken = _scan(source,
-        lazyAssignmentOperators: lazyAssignmentOperators,
-        ignoreErrors: usingFasta);
+        lazyAssignmentOperators: lazyAssignmentOperators, ignoreErrors: true);
     expect(originalToken, isNotNull);
     expect(originalToken.type, expectedType);
     expect(originalToken.offset, 0);
@@ -1437,8 +1343,7 @@
     } else if (expectedType == TokenType.SINGLE_LINE_COMMENT) {
       // Adding space to an end-of-line comment changes the comment.
       Token tokenWithSpaces = _scan(" $source",
-          lazyAssignmentOperators: lazyAssignmentOperators,
-          ignoreErrors: usingFasta);
+          lazyAssignmentOperators: lazyAssignmentOperators, ignoreErrors: true);
       expect(tokenWithSpaces, isNotNull);
       expect(tokenWithSpaces.type, expectedType);
       expect(tokenWithSpaces.offset, 1);
@@ -1448,16 +1353,14 @@
     } else if (expectedType == TokenType.INT ||
         expectedType == TokenType.DOUBLE) {
       Token tokenWithLowerD = _scan("${source}d",
-          lazyAssignmentOperators: lazyAssignmentOperators,
-          ignoreErrors: usingFasta);
+          lazyAssignmentOperators: lazyAssignmentOperators, ignoreErrors: true);
       expect(tokenWithLowerD, isNotNull);
       expect(tokenWithLowerD.type, expectedType);
       expect(tokenWithLowerD.offset, 0);
       expect(tokenWithLowerD.length, source.length);
       expect(tokenWithLowerD.lexeme, source);
       Token tokenWithUpperD = _scan("${source}D",
-          lazyAssignmentOperators: lazyAssignmentOperators,
-          ignoreErrors: usingFasta);
+          lazyAssignmentOperators: lazyAssignmentOperators, ignoreErrors: true);
       expect(tokenWithUpperD, isNotNull);
       expect(tokenWithUpperD.type, expectedType);
       expect(tokenWithUpperD.offset, 0);
@@ -1465,8 +1368,7 @@
       expect(tokenWithUpperD.lexeme, source);
     }
     Token tokenWithSpaces = _scan(" $source ",
-        lazyAssignmentOperators: lazyAssignmentOperators,
-        ignoreErrors: usingFasta);
+        lazyAssignmentOperators: lazyAssignmentOperators, ignoreErrors: true);
     expect(tokenWithSpaces, isNotNull);
     expect(tokenWithSpaces.type, expectedType);
     expect(tokenWithSpaces.offset, 1);
diff --git a/pkg/front_end/test/type_labeler_test.dart b/pkg/front_end/test/type_labeler_test.dart
index f24c86d..d303273 100644
--- a/pkg/front_end/test/type_labeler_test.dart
+++ b/pkg/front_end/test/type_labeler_test.dart
@@ -230,6 +230,12 @@
   Constant listBoolConst = new ListConstant(boolType, [falseConst, trueConst]);
   check({listBoolConst: "<bool>[false, true]"}, 0);
 
+  Constant setConst = new SetConstant(dynamicType, [intConst, doubleConst]);
+  check({setConst: "<dynamic>{2, 2.5}"}, 0);
+
+  Constant setBoolConst = new SetConstant(boolType, [falseConst, trueConst]);
+  check({setBoolConst: "<bool>{false, true}"}, 0);
+
   Constant mapConst = new MapConstant(boolType, numType, [
     new ConstantMapEntry(trueConst, intConst),
     new ConstantMapEntry(falseConst, doubleConst)
diff --git a/pkg/front_end/testcases/abstract_members.dart.hierarchy.expect b/pkg/front_end/testcases/abstract_members.dart.hierarchy.expect
index dad4f9b..231e9e1 100644
--- a/pkg/front_end/testcases/abstract_members.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/abstract_members.dart.hierarchy.expect
@@ -75,6 +75,7 @@
   classSetters:
 
 A:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Interface1, Interface2, Interface3
@@ -118,6 +119,7 @@
     A.property2
 
 B:
+  Longest path to Object: 3
   superclasses:
     Object
       -> A
@@ -166,6 +168,7 @@
     A.property2
 
 MyClass:
+  Longest path to Object: 4
   superclasses:
     Object
       -> A
@@ -221,6 +224,7 @@
     MyClass.property2
 
 MyMock1:
+  Longest path to Object: 4
   superclasses:
     Object
       -> A
@@ -270,6 +274,7 @@
     A.property2
 
 MyMock2:
+  Longest path to Object: 5
   superclasses:
     Object
       -> A
@@ -320,6 +325,7 @@
     A.property2
 
 MyMock3:
+  Longest path to Object: 4
   superclasses:
     Object
       -> A
diff --git a/pkg/front_end/testcases/argument_mismatch.dart b/pkg/front_end/testcases/argument_mismatch.dart
index 61a678e..7cce446 100644
--- a/pkg/front_end/testcases/argument_mismatch.dart
+++ b/pkg/front_end/testcases/argument_mismatch.dart
@@ -2,9 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=warning,context*/
-
-/*@context=CandidateFound*/ foo() {}
+foo() {}
 
 test() {
   /*@warning=MethodNotFound*/ foo(null);
diff --git a/pkg/front_end/testcases/argument_mismatch.dart.legacy.expect b/pkg/front_end/testcases/argument_mismatch.dart.legacy.expect
index d836fc0..ac488e4 100644
--- a/pkg/front_end/testcases/argument_mismatch.dart.legacy.expect
+++ b/pkg/front_end/testcases/argument_mismatch.dart.legacy.expect
@@ -2,13 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/argument_mismatch.dart:10:34: Warning: Too many positional arguments: 0 allowed, but 1 found.
+// pkg/front_end/testcases/argument_mismatch.dart:8:34: Warning: Too many positional arguments: 0 allowed, but 1 found.
 // Try removing the extra positional arguments.
 //   /*@warning=MethodNotFound*/ foo(null);
 //                                  ^
-// pkg/front_end/testcases/argument_mismatch.dart:7:29: Context: Found this candidate, but the arguments don't match.
-// /*@context=CandidateFound*/ foo() {}
-//                             ^^^
+// pkg/front_end/testcases/argument_mismatch.dart:5:1: Context: Found this candidate, but the arguments don't match.
+// foo() {}
+// ^^^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/argument_mismatch.dart.legacy.transformed.expect b/pkg/front_end/testcases/argument_mismatch.dart.legacy.transformed.expect
index d836fc0..ac488e4 100644
--- a/pkg/front_end/testcases/argument_mismatch.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/argument_mismatch.dart.legacy.transformed.expect
@@ -2,13 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/argument_mismatch.dart:10:34: Warning: Too many positional arguments: 0 allowed, but 1 found.
+// pkg/front_end/testcases/argument_mismatch.dart:8:34: Warning: Too many positional arguments: 0 allowed, but 1 found.
 // Try removing the extra positional arguments.
 //   /*@warning=MethodNotFound*/ foo(null);
 //                                  ^
-// pkg/front_end/testcases/argument_mismatch.dart:7:29: Context: Found this candidate, but the arguments don't match.
-// /*@context=CandidateFound*/ foo() {}
-//                             ^^^
+// pkg/front_end/testcases/argument_mismatch.dart:5:1: Context: Found this candidate, but the arguments don't match.
+// foo() {}
+// ^^^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/bounds_check_depends_on_inference.dart.legacy.expect b/pkg/front_end/testcases/bounds_check_depends_on_inference.dart.legacy.expect
index 92d0def..abff6cf 100644
--- a/pkg/front_end/testcases/bounds_check_depends_on_inference.dart.legacy.expect
+++ b/pkg/front_end/testcases/bounds_check_depends_on_inference.dart.legacy.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A<self::A::X>
     : super core::Object::•()
     ;
-  method bar<Y extends self::A::X = dynamic>() → dynamic
+  method bar<generic-covariant-impl Y extends self::A::X = dynamic>() → dynamic
     return null;
 }
 class B extends core::Object {
diff --git a/pkg/front_end/testcases/bounds_check_depends_on_inference.dart.legacy.transformed.expect b/pkg/front_end/testcases/bounds_check_depends_on_inference.dart.legacy.transformed.expect
index 92d0def..abff6cf 100644
--- a/pkg/front_end/testcases/bounds_check_depends_on_inference.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/bounds_check_depends_on_inference.dart.legacy.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A<self::A::X>
     : super core::Object::•()
     ;
-  method bar<Y extends self::A::X = dynamic>() → dynamic
+  method bar<generic-covariant-impl Y extends self::A::X = dynamic>() → dynamic
     return null;
 }
 class B extends core::Object {
diff --git a/pkg/front_end/testcases/bounds_check_depends_on_inference.dart.outline.expect b/pkg/front_end/testcases/bounds_check_depends_on_inference.dart.outline.expect
index ec400af..8a919db 100644
--- a/pkg/front_end/testcases/bounds_check_depends_on_inference.dart.outline.expect
+++ b/pkg/front_end/testcases/bounds_check_depends_on_inference.dart.outline.expect
@@ -5,7 +5,7 @@
 class A<X extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::A<self::A::X>
     ;
-  method bar<Y extends self::A::X = dynamic>() → dynamic
+  method bar<generic-covariant-impl Y extends self::A::X = dynamic>() → dynamic
     ;
 }
 class B extends core::Object {
diff --git a/pkg/front_end/testcases/bug21938.dart b/pkg/front_end/testcases/bug21938.dart
index c8555af..b6e851b 100644
--- a/pkg/front_end/testcases/bug21938.dart
+++ b/pkg/front_end/testcases/bug21938.dart
@@ -2,15 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=error*/
-
 test() {
   Object x;
   Function f;
-  x /*@error=UndefinedMethod*/ ();
-  x /*@error=UndefinedMethod*/ (3);
+  x();
+  x(3);
   f(5, 2);
-  x. /*@error=UndefinedMethod*/ call();
+  x.call();
   f.call;
   f.call(5, 2);
 }
diff --git a/pkg/front_end/testcases/bug21938.dart.strong.expect b/pkg/front_end/testcases/bug21938.dart.strong.expect
index 25e833b..aa88e80 100644
--- a/pkg/front_end/testcases/bug21938.dart.strong.expect
+++ b/pkg/front_end/testcases/bug21938.dart.strong.expect
@@ -2,23 +2,23 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/bug21938.dart:10:4: Error: The method 'call' isn't defined for the class 'Object'.
+// pkg/front_end/testcases/bug21938.dart:8:4: Error: The method 'call' isn't defined for the class 'Object'.
 //  - 'Object' is from 'dart:core'.
 // Try correcting the name to the name of an existing method, or defining a method named 'call'.
-//   x /*@error=UndefinedMethod*/ ();
+//   x();
 //    ^
 //
-// pkg/front_end/testcases/bug21938.dart:11:4: Error: The method 'call' isn't defined for the class 'Object'.
+// pkg/front_end/testcases/bug21938.dart:9:4: Error: The method 'call' isn't defined for the class 'Object'.
 //  - 'Object' is from 'dart:core'.
 // Try correcting the name to the name of an existing method, or defining a method named 'call'.
-//   x /*@error=UndefinedMethod*/ (3);
+//   x(3);
 //    ^
 //
-// pkg/front_end/testcases/bug21938.dart:13:33: Error: The method 'call' isn't defined for the class 'Object'.
+// pkg/front_end/testcases/bug21938.dart:11:5: Error: The method 'call' isn't defined for the class 'Object'.
 //  - 'Object' is from 'dart:core'.
 // Try correcting the name to the name of an existing method, or defining a method named 'call'.
-//   x. /*@error=UndefinedMethod*/ call();
-//                                 ^^^^
+//   x.call();
+//     ^^^^
 //
 import self as self;
 import "dart:core" as core;
@@ -26,22 +26,22 @@
 static method test() → dynamic {
   core::Object x;
   core::Function f;
-  invalid-expression "pkg/front_end/testcases/bug21938.dart:10:4: Error: The method 'call' isn't defined for the class 'Object'.
+  invalid-expression "pkg/front_end/testcases/bug21938.dart:8:4: Error: The method 'call' isn't defined for the class 'Object'.
  - 'Object' is from 'dart:core'.
 Try correcting the name to the name of an existing method, or defining a method named 'call'.
-  x /*@error=UndefinedMethod*/ ();
+  x();
    ^";
-  invalid-expression "pkg/front_end/testcases/bug21938.dart:11:4: Error: The method 'call' isn't defined for the class 'Object'.
+  invalid-expression "pkg/front_end/testcases/bug21938.dart:9:4: Error: The method 'call' isn't defined for the class 'Object'.
  - 'Object' is from 'dart:core'.
 Try correcting the name to the name of an existing method, or defining a method named 'call'.
-  x /*@error=UndefinedMethod*/ (3);
+  x(3);
    ^";
   f.call(5, 2);
-  invalid-expression "pkg/front_end/testcases/bug21938.dart:13:33: Error: The method 'call' isn't defined for the class 'Object'.
+  invalid-expression "pkg/front_end/testcases/bug21938.dart:11:5: Error: The method 'call' isn't defined for the class 'Object'.
  - 'Object' is from 'dart:core'.
 Try correcting the name to the name of an existing method, or defining a method named 'call'.
-  x. /*@error=UndefinedMethod*/ call();
-                                ^^^^";
+  x.call();
+    ^^^^";
   f.call;
   f.call(5, 2);
 }
diff --git a/pkg/front_end/testcases/bug32426.dart.hierarchy.expect b/pkg/front_end/testcases/bug32426.dart.hierarchy.expect
index 9e96032..b816c89 100644
--- a/pkg/front_end/testcases/bug32426.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/bug32426.dart.hierarchy.expect
@@ -37,6 +37,7 @@
   classSetters:
 
 C:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: I
diff --git a/pkg/front_end/testcases/bug32629.dart b/pkg/front_end/testcases/bug32629.dart
index 88610e0..fc0492f 100644
--- a/pkg/front_end/testcases/bug32629.dart
+++ b/pkg/front_end/testcases/bug32629.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.
 
-/*@testedFeatures=error*/
-
 class A {
   dynamic call(dynamic a, dynamic b) {
     return a;
diff --git a/pkg/front_end/testcases/bug32866.dart.hierarchy.expect b/pkg/front_end/testcases/bug32866.dart.hierarchy.expect
index 74b5528..ec9f23e 100644
--- a/pkg/front_end/testcases/bug32866.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/bug32866.dart.hierarchy.expect
@@ -37,6 +37,7 @@
   classSetters:
 
 A:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: B
diff --git a/pkg/front_end/testcases/bug33099.dart.hierarchy.expect b/pkg/front_end/testcases/bug33099.dart.hierarchy.expect
index 883d29c..443af04 100644
--- a/pkg/front_end/testcases/bug33099.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/bug33099.dart.hierarchy.expect
@@ -54,6 +54,7 @@
   classSetters:
 
 Object with MyTest:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: MyTest
@@ -85,6 +86,7 @@
   interfaceSetters:
 
 MyTest2:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _MyTest2&Object&MyTest
diff --git a/pkg/front_end/testcases/bug33298.dart.legacy.expect b/pkg/front_end/testcases/bug33298.dart.legacy.expect
index c9a8e28..c12d485 100644
--- a/pkg/front_end/testcases/bug33298.dart.legacy.expect
+++ b/pkg/front_end/testcases/bug33298.dart.legacy.expect
@@ -13,7 +13,7 @@
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
-  method call(self::B::T t) → self::B::T
+  method call(generic-covariant-impl self::B::T t) → self::B::T
     return t;
 }
 class C extends core::Object {
diff --git a/pkg/front_end/testcases/bug33298.dart.legacy.transformed.expect b/pkg/front_end/testcases/bug33298.dart.legacy.transformed.expect
index c9a8e28..c12d485 100644
--- a/pkg/front_end/testcases/bug33298.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/bug33298.dart.legacy.transformed.expect
@@ -13,7 +13,7 @@
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
-  method call(self::B::T t) → self::B::T
+  method call(generic-covariant-impl self::B::T t) → self::B::T
     return t;
 }
 class C extends core::Object {
diff --git a/pkg/front_end/testcases/bug33298.dart.outline.expect b/pkg/front_end/testcases/bug33298.dart.outline.expect
index ed25402..1d7e071 100644
--- a/pkg/front_end/testcases/bug33298.dart.outline.expect
+++ b/pkg/front_end/testcases/bug33298.dart.outline.expect
@@ -11,7 +11,7 @@
 class B<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::B<self::B::T>
     ;
-  method call(self::B::T t) → self::B::T
+  method call(generic-covariant-impl self::B::T t) → self::B::T
     ;
 }
 class C extends core::Object {
diff --git a/pkg/front_end/testcases/bug34511.dart.hierarchy.expect b/pkg/front_end/testcases/bug34511.dart.hierarchy.expect
index 60cd20b..57d451c 100644
--- a/pkg/front_end/testcases/bug34511.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/bug34511.dart.hierarchy.expect
@@ -36,6 +36,7 @@
   classSetters:
 
 Object with A<() -> Z>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: A<() -> Z>
@@ -65,6 +66,7 @@
   interfaceSetters:
 
 B:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _B&Object&A<Z>
diff --git a/pkg/front_end/testcases/bug35470.dart.legacy.expect b/pkg/front_end/testcases/bug35470.dart.legacy.expect
index 7f2ad6a..630df24 100644
--- a/pkg/front_end/testcases/bug35470.dart.legacy.expect
+++ b/pkg/front_end/testcases/bug35470.dart.legacy.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A<self::A::X>
     : super core::Object::•()
     ;
-  method foo<Y extends self::A::X = dynamic>() → dynamic {}
+  method foo<generic-covariant-impl Y extends self::A::X = dynamic>() → dynamic {}
 }
 class B extends self::A<dynamic> {
   synthetic constructor •() → self::B
diff --git a/pkg/front_end/testcases/bug35470.dart.legacy.transformed.expect b/pkg/front_end/testcases/bug35470.dart.legacy.transformed.expect
index 7f2ad6a..630df24 100644
--- a/pkg/front_end/testcases/bug35470.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/bug35470.dart.legacy.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A<self::A::X>
     : super core::Object::•()
     ;
-  method foo<Y extends self::A::X = dynamic>() → dynamic {}
+  method foo<generic-covariant-impl Y extends self::A::X = dynamic>() → dynamic {}
 }
 class B extends self::A<dynamic> {
   synthetic constructor •() → self::B
diff --git a/pkg/front_end/testcases/bug35470.dart.outline.expect b/pkg/front_end/testcases/bug35470.dart.outline.expect
index 26320fb..33d29f3 100644
--- a/pkg/front_end/testcases/bug35470.dart.outline.expect
+++ b/pkg/front_end/testcases/bug35470.dart.outline.expect
@@ -5,7 +5,7 @@
 class A<X extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::A<self::A::X>
     ;
-  method foo<Y extends self::A::X = dynamic>() → dynamic
+  method foo<generic-covariant-impl Y extends self::A::X = dynamic>() → dynamic
     ;
 }
 class B extends self::A<dynamic> {
diff --git a/pkg/front_end/testcases/check_deferred_allocation.dart.legacy.expect b/pkg/front_end/testcases/check_deferred_allocation.dart.legacy.expect
index 5167dc9..c660edf 100644
--- a/pkg/front_end/testcases/check_deferred_allocation.dart.legacy.expect
+++ b/pkg/front_end/testcases/check_deferred_allocation.dart.legacy.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/check_deferred_allocation.dart.legacy.transformed.expect b/pkg/front_end/testcases/check_deferred_allocation.dart.legacy.transformed.expect
index 5167dc9..c660edf 100644
--- a/pkg/front_end/testcases/check_deferred_allocation.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/check_deferred_allocation.dart.legacy.transformed.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/check_deferred_allocation.dart.strong.expect b/pkg/front_end/testcases/check_deferred_allocation.dart.strong.expect
index 799a3cd..0a70d79 100644
--- a/pkg/front_end/testcases/check_deferred_allocation.dart.strong.expect
+++ b/pkg/front_end/testcases/check_deferred_allocation.dart.strong.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/check_deferred_allocation.dart.strong.transformed.expect b/pkg/front_end/testcases/check_deferred_allocation.dart.strong.transformed.expect
index 494d25e..b5040a5 100644
--- a/pkg/front_end/testcases/check_deferred_allocation.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/check_deferred_allocation.dart.strong.transformed.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/check_deferred_before_args.dart.legacy.expect b/pkg/front_end/testcases/check_deferred_before_args.dart.legacy.expect
index 908e7aa..e223280 100644
--- a/pkg/front_end/testcases/check_deferred_before_args.dart.legacy.expect
+++ b/pkg/front_end/testcases/check_deferred_before_args.dart.legacy.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/check_deferred_before_args.dart.legacy.transformed.expect b/pkg/front_end/testcases/check_deferred_before_args.dart.legacy.transformed.expect
index 908e7aa..e223280 100644
--- a/pkg/front_end/testcases/check_deferred_before_args.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/check_deferred_before_args.dart.legacy.transformed.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/check_deferred_before_args.dart.strong.expect b/pkg/front_end/testcases/check_deferred_before_args.dart.strong.expect
index b570941..26b5b7d 100644
--- a/pkg/front_end/testcases/check_deferred_before_args.dart.strong.expect
+++ b/pkg/front_end/testcases/check_deferred_before_args.dart.strong.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 import "dart:core" as core;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
diff --git a/pkg/front_end/testcases/check_deferred_before_args.dart.strong.transformed.expect b/pkg/front_end/testcases/check_deferred_before_args.dart.strong.transformed.expect
index 1ea2a3f..1f4e6c8 100644
--- a/pkg/front_end/testcases/check_deferred_before_args.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/check_deferred_before_args.dart.strong.transformed.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/check_deferred_before_args2.dart.legacy.expect b/pkg/front_end/testcases/check_deferred_before_args2.dart.legacy.expect
index e9712c6..eebc07b 100644
--- a/pkg/front_end/testcases/check_deferred_before_args2.dart.legacy.expect
+++ b/pkg/front_end/testcases/check_deferred_before_args2.dart.legacy.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/check_deferred_before_args2.dart.legacy.transformed.expect b/pkg/front_end/testcases/check_deferred_before_args2.dart.legacy.transformed.expect
index 7f12556..989c4c4 100644
--- a/pkg/front_end/testcases/check_deferred_before_args2.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/check_deferred_before_args2.dart.legacy.transformed.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:async" as asy;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/check_deferred_before_args2.dart.strong.expect b/pkg/front_end/testcases/check_deferred_before_args2.dart.strong.expect
index db0bb07..512b965 100644
--- a/pkg/front_end/testcases/check_deferred_before_args2.dart.strong.expect
+++ b/pkg/front_end/testcases/check_deferred_before_args2.dart.strong.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/check_deferred_before_args2.dart.strong.transformed.expect b/pkg/front_end/testcases/check_deferred_before_args2.dart.strong.transformed.expect
index 5ac3a08..7b3dfb1 100644
--- a/pkg/front_end/testcases/check_deferred_before_args2.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/check_deferred_before_args2.dart.strong.transformed.expect
@@ -2,7 +2,7 @@
 import self as self;
 import "dart:async" as asy;
 import "dart:core" as core;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/check_deferred_before_call.dart.legacy.expect b/pkg/front_end/testcases/check_deferred_before_call.dart.legacy.expect
index 2a8fcd5..3cf5bf4 100644
--- a/pkg/front_end/testcases/check_deferred_before_call.dart.legacy.expect
+++ b/pkg/front_end/testcases/check_deferred_before_call.dart.legacy.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/check_deferred_before_call.dart.legacy.transformed.expect b/pkg/front_end/testcases/check_deferred_before_call.dart.legacy.transformed.expect
index 2a8fcd5..3cf5bf4 100644
--- a/pkg/front_end/testcases/check_deferred_before_call.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/check_deferred_before_call.dart.legacy.transformed.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/check_deferred_before_call.dart.strong.expect b/pkg/front_end/testcases/check_deferred_before_call.dart.strong.expect
index a4a8839..feb2112 100644
--- a/pkg/front_end/testcases/check_deferred_before_call.dart.strong.expect
+++ b/pkg/front_end/testcases/check_deferred_before_call.dart.strong.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/check_deferred_before_call.dart.strong.transformed.expect b/pkg/front_end/testcases/check_deferred_before_call.dart.strong.transformed.expect
index 2b6f45a..b755990 100644
--- a/pkg/front_end/testcases/check_deferred_before_call.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/check_deferred_before_call.dart.strong.transformed.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/check_deferred_before_write.dart.legacy.expect b/pkg/front_end/testcases/check_deferred_before_write.dart.legacy.expect
index d1bc459..169b56c 100644
--- a/pkg/front_end/testcases/check_deferred_before_write.dart.legacy.expect
+++ b/pkg/front_end/testcases/check_deferred_before_write.dart.legacy.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/check_deferred_before_write.dart.legacy.transformed.expect b/pkg/front_end/testcases/check_deferred_before_write.dart.legacy.transformed.expect
index d1bc459..169b56c 100644
--- a/pkg/front_end/testcases/check_deferred_before_write.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/check_deferred_before_write.dart.legacy.transformed.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/check_deferred_before_write.dart.strong.expect b/pkg/front_end/testcases/check_deferred_before_write.dart.strong.expect
index cf5fce5..3fa478a 100644
--- a/pkg/front_end/testcases/check_deferred_before_write.dart.strong.expect
+++ b/pkg/front_end/testcases/check_deferred_before_write.dart.strong.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/check_deferred_before_write.dart.strong.transformed.expect b/pkg/front_end/testcases/check_deferred_before_write.dart.strong.transformed.expect
index a6a7f4a..40b7cc6 100644
--- a/pkg/front_end/testcases/check_deferred_before_write.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/check_deferred_before_write.dart.strong.transformed.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/check_deferred_read.dart.legacy.expect b/pkg/front_end/testcases/check_deferred_read.dart.legacy.expect
index 175fa7c..714d35c 100644
--- a/pkg/front_end/testcases/check_deferred_read.dart.legacy.expect
+++ b/pkg/front_end/testcases/check_deferred_read.dart.legacy.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/check_deferred_read.dart.legacy.transformed.expect b/pkg/front_end/testcases/check_deferred_read.dart.legacy.transformed.expect
index 175fa7c..714d35c 100644
--- a/pkg/front_end/testcases/check_deferred_read.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/check_deferred_read.dart.legacy.transformed.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/check_deferred_read.dart.strong.expect b/pkg/front_end/testcases/check_deferred_read.dart.strong.expect
index 1af399d..500b9e9 100644
--- a/pkg/front_end/testcases/check_deferred_read.dart.strong.expect
+++ b/pkg/front_end/testcases/check_deferred_read.dart.strong.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/check_deferred_read.dart.strong.transformed.expect b/pkg/front_end/testcases/check_deferred_read.dart.strong.transformed.expect
index daa8674..1e9676c 100644
--- a/pkg/front_end/testcases/check_deferred_read.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/check_deferred_read.dart.strong.transformed.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/check_deferred_read_static_field.dart.legacy.expect b/pkg/front_end/testcases/check_deferred_read_static_field.dart.legacy.expect
index 60e13fd..01f9ffd 100644
--- a/pkg/front_end/testcases/check_deferred_read_static_field.dart.legacy.expect
+++ b/pkg/front_end/testcases/check_deferred_read_static_field.dart.legacy.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/check_deferred_read_static_field.dart.legacy.transformed.expect b/pkg/front_end/testcases/check_deferred_read_static_field.dart.legacy.transformed.expect
index 60e13fd..01f9ffd 100644
--- a/pkg/front_end/testcases/check_deferred_read_static_field.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/check_deferred_read_static_field.dart.legacy.transformed.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/check_deferred_read_static_field.dart.strong.expect b/pkg/front_end/testcases/check_deferred_read_static_field.dart.strong.expect
index 90d44a4..a454d85 100644
--- a/pkg/front_end/testcases/check_deferred_read_static_field.dart.strong.expect
+++ b/pkg/front_end/testcases/check_deferred_read_static_field.dart.strong.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/check_deferred_read_static_field.dart.strong.transformed.expect b/pkg/front_end/testcases/check_deferred_read_static_field.dart.strong.transformed.expect
index ed7f244..c8d8259 100644
--- a/pkg/front_end/testcases/check_deferred_read_static_field.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/check_deferred_read_static_field.dart.strong.transformed.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/check_deferred_read_type.dart.legacy.expect b/pkg/front_end/testcases/check_deferred_read_type.dart.legacy.expect
index 3982934..8acc0bb 100644
--- a/pkg/front_end/testcases/check_deferred_read_type.dart.legacy.expect
+++ b/pkg/front_end/testcases/check_deferred_read_type.dart.legacy.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/check_deferred_read_type.dart.legacy.transformed.expect b/pkg/front_end/testcases/check_deferred_read_type.dart.legacy.transformed.expect
index 3982934..8acc0bb 100644
--- a/pkg/front_end/testcases/check_deferred_read_type.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/check_deferred_read_type.dart.legacy.transformed.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/check_deferred_read_type.dart.strong.expect b/pkg/front_end/testcases/check_deferred_read_type.dart.strong.expect
index d62739e..413f2f6 100644
--- a/pkg/front_end/testcases/check_deferred_read_type.dart.strong.expect
+++ b/pkg/front_end/testcases/check_deferred_read_type.dart.strong.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/check_deferred_read_type.dart.strong.transformed.expect b/pkg/front_end/testcases/check_deferred_read_type.dart.strong.transformed.expect
index 747f240..363f918 100644
--- a/pkg/front_end/testcases/check_deferred_read_type.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/check_deferred_read_type.dart.strong.transformed.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/check_deferred_static_method_call.dart.legacy.expect b/pkg/front_end/testcases/check_deferred_static_method_call.dart.legacy.expect
index a054b09..5e32eae 100644
--- a/pkg/front_end/testcases/check_deferred_static_method_call.dart.legacy.expect
+++ b/pkg/front_end/testcases/check_deferred_static_method_call.dart.legacy.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/check_deferred_static_method_call.dart.legacy.transformed.expect b/pkg/front_end/testcases/check_deferred_static_method_call.dart.legacy.transformed.expect
index a054b09..5e32eae 100644
--- a/pkg/front_end/testcases/check_deferred_static_method_call.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/check_deferred_static_method_call.dart.legacy.transformed.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/check_deferred_static_method_call.dart.strong.expect b/pkg/front_end/testcases/check_deferred_static_method_call.dart.strong.expect
index 6ee7c79..cf7b29c 100644
--- a/pkg/front_end/testcases/check_deferred_static_method_call.dart.strong.expect
+++ b/pkg/front_end/testcases/check_deferred_static_method_call.dart.strong.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/check_deferred_static_method_call.dart.strong.transformed.expect b/pkg/front_end/testcases/check_deferred_static_method_call.dart.strong.transformed.expect
index cfe8c33..0e05e8f 100644
--- a/pkg/front_end/testcases/check_deferred_static_method_call.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/check_deferred_static_method_call.dart.strong.transformed.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/clone_function_type.dart.hierarchy.expect b/pkg/front_end/testcases/clone_function_type.dart.hierarchy.expect
index aa9301e..49f41ab 100644
--- a/pkg/front_end/testcases/clone_function_type.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/clone_function_type.dart.hierarchy.expect
@@ -36,6 +36,7 @@
   classSetters:
 
 Object with Am1<(null) -> null, Z>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am1<(null) -> null, Z>
@@ -65,6 +66,7 @@
   interfaceSetters:
 
 Bm1:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _Bm1&Object&Am1<Z>
@@ -95,6 +97,7 @@
   interfaceSetters:
 
 Object with Am1<(x) -> null, Z>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am1<(x) -> null, Z>
@@ -124,6 +127,7 @@
   interfaceSetters:
 
 Cm1:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _Cm1&Object&Am1<Z>
@@ -154,6 +158,7 @@
   interfaceSetters:
 
 Object with Am1<() -> int, Z>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am1<() -> int, Z>
@@ -183,6 +188,7 @@
   interfaceSetters:
 
 Dm1:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _Dm1&Object&Am1<Z>
@@ -213,6 +219,7 @@
   interfaceSetters:
 
 Object with Am1<() -> null, Z>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am1<() -> null, Z>
@@ -242,6 +249,7 @@
   interfaceSetters:
 
 Em1:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _Em1&Object&Am1<Z>
@@ -272,6 +280,7 @@
   interfaceSetters:
 
 Object with Am1<() -> null, Z>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am1<() -> null, Z>
@@ -301,6 +310,7 @@
   interfaceSetters:
 
 Fm1:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _Fm1&Object&Am1<Z>
@@ -331,6 +341,7 @@
   interfaceSetters:
 
 Object with Am1<(x) -> null, Z>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am1<(x) -> null, Z>
@@ -360,6 +371,7 @@
   interfaceSetters:
 
 Gm1:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _Gm1&Object&Am1<Z>
@@ -390,6 +402,7 @@
   interfaceSetters:
 
 Object with Am1<(null) -> null, Z>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am1<(null) -> null, Z>
@@ -419,6 +432,7 @@
   interfaceSetters:
 
 Hm1:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _Hm1&Object&Am1<Z>
@@ -449,6 +463,7 @@
   interfaceSetters:
 
 Object with Am1<(x) -> null, Z>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am1<(x) -> null, Z>
@@ -478,6 +493,7 @@
   interfaceSetters:
 
 Im1:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _Im1&Object&Am1<Z>
@@ -508,6 +524,7 @@
   interfaceSetters:
 
 Object with Am1<Function, Z>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am1<Function, Z>
@@ -537,6 +554,7 @@
   interfaceSetters:
 
 Jm1:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _Jm1&Object&Am1<Z>
@@ -567,6 +585,7 @@
   interfaceSetters:
 
 Object with Am1<(Function) -> null, Z>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am1<(Function) -> null, Z>
@@ -596,6 +615,7 @@
   interfaceSetters:
 
 Km1:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _Km1&Object&Am1<Z>
@@ -626,6 +646,7 @@
   interfaceSetters:
 
 Object with Am1<() -> (Function) -> null, Z>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am1<() -> (Function) -> null, Z>
@@ -655,6 +676,7 @@
   interfaceSetters:
 
 Lm1:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _Lm1&Object&Am1<Z>
@@ -685,6 +707,7 @@
   interfaceSetters:
 
 Mm1:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am1<(null) -> null, Z>
@@ -714,6 +737,7 @@
   interfaceSetters:
 
 Nm1:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am1<(x) -> null, Z>
@@ -743,6 +767,7 @@
   interfaceSetters:
 
 Om1:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am1<() -> int, Z>
@@ -772,6 +797,7 @@
   interfaceSetters:
 
 Pm1:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am1<() -> null, Z>
@@ -801,6 +827,7 @@
   interfaceSetters:
 
 Qm1:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am1<() -> null, Z>
@@ -830,6 +857,7 @@
   interfaceSetters:
 
 Rm1:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am1<(x) -> null, Z>
@@ -859,6 +887,7 @@
   interfaceSetters:
 
 Sm1:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am1<(null) -> null, Z>
@@ -888,6 +917,7 @@
   interfaceSetters:
 
 Tm1:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am1<(x) -> null, Z>
@@ -917,6 +947,7 @@
   interfaceSetters:
 
 Um1:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am1<Function, Z>
@@ -946,6 +977,7 @@
   interfaceSetters:
 
 Vm1:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am1<(Function) -> null, Z>
@@ -975,6 +1007,7 @@
   interfaceSetters:
 
 Wm1:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am1<() -> (Function) -> null, Z>
@@ -1021,6 +1054,7 @@
   classSetters:
 
 Object with Am2<(null) -> null, Z>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am2<(null) -> null, Z>
@@ -1050,6 +1084,7 @@
   interfaceSetters:
 
 Bm2:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _Bm2&Object&Am2<Z>
@@ -1080,6 +1115,7 @@
   interfaceSetters:
 
 Object with Am2<(x) -> null, Z>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am2<(x) -> null, Z>
@@ -1109,6 +1145,7 @@
   interfaceSetters:
 
 Cm2:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _Cm2&Object&Am2<Z>
@@ -1139,6 +1176,7 @@
   interfaceSetters:
 
 Object with Am2<() -> int, Z>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am2<() -> int, Z>
@@ -1168,6 +1206,7 @@
   interfaceSetters:
 
 Dm2:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _Dm2&Object&Am2<Z>
@@ -1198,6 +1237,7 @@
   interfaceSetters:
 
 Object with Am2<() -> null, Z>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am2<() -> null, Z>
@@ -1227,6 +1267,7 @@
   interfaceSetters:
 
 Em2:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _Em2&Object&Am2<Z>
@@ -1257,6 +1298,7 @@
   interfaceSetters:
 
 Object with Am2<() -> null, Z>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am2<() -> null, Z>
@@ -1286,6 +1328,7 @@
   interfaceSetters:
 
 Fm2:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _Fm2&Object&Am2<Z>
@@ -1316,6 +1359,7 @@
   interfaceSetters:
 
 Object with Am2<(x) -> null, Z>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am2<(x) -> null, Z>
@@ -1345,6 +1389,7 @@
   interfaceSetters:
 
 Gm2:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _Gm2&Object&Am2<Z>
@@ -1375,6 +1420,7 @@
   interfaceSetters:
 
 Object with Am2<(null) -> null, Z>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am2<(null) -> null, Z>
@@ -1404,6 +1450,7 @@
   interfaceSetters:
 
 Hm2:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _Hm2&Object&Am2<Z>
@@ -1434,6 +1481,7 @@
   interfaceSetters:
 
 Object with Am2<(x) -> null, Z>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am2<(x) -> null, Z>
@@ -1463,6 +1511,7 @@
   interfaceSetters:
 
 Im2:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _Im2&Object&Am2<Z>
@@ -1493,6 +1542,7 @@
   interfaceSetters:
 
 Object with Am2<Function, Z>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am2<Function, Z>
@@ -1522,6 +1572,7 @@
   interfaceSetters:
 
 Jm2:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _Jm2&Object&Am2<Z>
@@ -1552,6 +1603,7 @@
   interfaceSetters:
 
 Object with Am2<(Function) -> null, Z>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am2<(Function) -> null, Z>
@@ -1581,6 +1633,7 @@
   interfaceSetters:
 
 Km2:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _Km2&Object&Am2<Z>
@@ -1611,6 +1664,7 @@
   interfaceSetters:
 
 Object with Am2<() -> (Function) -> null, Z>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am2<() -> (Function) -> null, Z>
@@ -1640,6 +1694,7 @@
   interfaceSetters:
 
 Lm2:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _Lm2&Object&Am2<Z>
@@ -1670,6 +1725,7 @@
   interfaceSetters:
 
 Mm2:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am2<(null) -> null, Z>
@@ -1699,6 +1755,7 @@
   interfaceSetters:
 
 Nm2:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am2<(x) -> null, Z>
@@ -1728,6 +1785,7 @@
   interfaceSetters:
 
 Om2:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am2<() -> int, Z>
@@ -1757,6 +1815,7 @@
   interfaceSetters:
 
 Pm2:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am2<() -> null, Z>
@@ -1786,6 +1845,7 @@
   interfaceSetters:
 
 Qm2:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am2<() -> null, Z>
@@ -1815,6 +1875,7 @@
   interfaceSetters:
 
 Rm2:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am2<(x) -> null, Z>
@@ -1844,6 +1905,7 @@
   interfaceSetters:
 
 Sm2:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am2<(null) -> null, Z>
@@ -1873,6 +1935,7 @@
   interfaceSetters:
 
 Tm2:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am2<(x) -> null, Z>
@@ -1902,6 +1965,7 @@
   interfaceSetters:
 
 Um2:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am2<Function, Z>
@@ -1931,6 +1995,7 @@
   interfaceSetters:
 
 Vm2:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am2<(Function) -> null, Z>
@@ -1960,6 +2025,7 @@
   interfaceSetters:
 
 Wm2:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am2<() -> (Function) -> null, Z>
@@ -2006,6 +2072,7 @@
   classSetters:
 
 Object with Am3<TdB, Z>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am3<TdB, Z>
@@ -2035,6 +2102,7 @@
   interfaceSetters:
 
 Bm3:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _Bm3&Object&Am3<Z>
@@ -2065,6 +2133,7 @@
   interfaceSetters:
 
 Object with Am3<TdC, Z>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am3<TdC, Z>
@@ -2094,6 +2163,7 @@
   interfaceSetters:
 
 Cm3:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _Cm3&Object&Am3<Z>
@@ -2124,6 +2194,7 @@
   interfaceSetters:
 
 Object with Am3<TdD, Z>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am3<TdD, Z>
@@ -2153,6 +2224,7 @@
   interfaceSetters:
 
 Dm3:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _Dm3&Object&Am3<Z>
@@ -2183,6 +2255,7 @@
   interfaceSetters:
 
 Object with Am3<TdE, Z>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am3<TdE, Z>
@@ -2212,6 +2285,7 @@
   interfaceSetters:
 
 Em3:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _Em3&Object&Am3<Z>
@@ -2242,6 +2316,7 @@
   interfaceSetters:
 
 Object with Am3<TdF, Z>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am3<TdF, Z>
@@ -2271,6 +2346,7 @@
   interfaceSetters:
 
 Fm3:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _Fm3&Object&Am3<Z>
@@ -2301,6 +2377,7 @@
   interfaceSetters:
 
 Object with Am3<TdG, Z>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am3<TdG, Z>
@@ -2330,6 +2407,7 @@
   interfaceSetters:
 
 Gm3:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _Gm3&Object&Am3<Z>
@@ -2360,6 +2438,7 @@
   interfaceSetters:
 
 Object with Am3<TdH, Z>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am3<TdH, Z>
@@ -2389,6 +2468,7 @@
   interfaceSetters:
 
 Hm3:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _Hm3&Object&Am3<Z>
@@ -2419,6 +2499,7 @@
   interfaceSetters:
 
 Object with Am3<TdI, Z>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am3<TdI, Z>
@@ -2448,6 +2529,7 @@
   interfaceSetters:
 
 Im3:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _Im3&Object&Am3<Z>
@@ -2478,6 +2560,7 @@
   interfaceSetters:
 
 Object with Am3<TdJ, Z>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am3<TdJ, Z>
@@ -2507,6 +2590,7 @@
   interfaceSetters:
 
 Jm3:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _Jm3&Object&Am3<Z>
@@ -2537,6 +2621,7 @@
   interfaceSetters:
 
 Object with Am3<TdK, Z>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Am3<TdK, Z>
@@ -2566,6 +2651,7 @@
   interfaceSetters:
 
 Km3:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _Km3&Object&Am3<Z>
diff --git a/pkg/front_end/testcases/complex_class_hierarchy.dart b/pkg/front_end/testcases/complex_class_hierarchy.dart
index 86dba1e..3363794 100644
--- a/pkg/front_end/testcases/complex_class_hierarchy.dart
+++ b/pkg/front_end/testcases/complex_class_hierarchy.dart
@@ -39,3 +39,9 @@
 class GU extends GW {}
 
 class GV extends GU implements GW {}
+
+class ARO<S> {}
+
+class ARQ<T> extends Object implements ARO<T> {}
+
+class ARN extends ARQ<A> {}
diff --git a/pkg/front_end/testcases/complex_class_hierarchy.dart.hierarchy.expect b/pkg/front_end/testcases/complex_class_hierarchy.dart.hierarchy.expect
index b3c7b13..1ad7539 100644
--- a/pkg/front_end/testcases/complex_class_hierarchy.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/complex_class_hierarchy.dart.hierarchy.expect
@@ -164,6 +164,7 @@
   classSetters:
 
 X:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: A
@@ -193,6 +194,7 @@
   interfaceSetters:
 
 Y:
+  Longest path to Object: 3
   superclasses:
     Object
       -> X
@@ -223,6 +225,7 @@
   interfaceSetters:
 
 Z:
+  Longest path to Object: 4
   superclasses:
     Object
   interfaces: Y, X, A
@@ -252,6 +255,7 @@
   interfaceSetters:
 
 W:
+  Longest path to Object: 5
   superclasses:
     Object
   interfaces: Z, Y, X, A
@@ -281,6 +285,7 @@
   interfaceSetters:
 
 GX:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: G<A>
@@ -310,6 +315,7 @@
   interfaceSetters:
 
 GY:
+  Longest path to Object: 3
   superclasses:
     Object
       -> X
@@ -340,6 +346,7 @@
   interfaceSetters:
 
 GZ:
+  Longest path to Object: 4
   superclasses:
     Object
   interfaces: Y, X, A, GC, G<C>
@@ -369,6 +376,7 @@
   interfaceSetters:
 
 GW:
+  Longest path to Object: 5
   superclasses:
     Object
   interfaces: Z, Y, X, A, GD, G<D>
@@ -398,6 +406,7 @@
   interfaceSetters:
 
 GU:
+  Longest path to Object: 6
   superclasses:
     Object
       -> GW
@@ -428,6 +437,7 @@
   interfaceSetters:
 
 GV:
+  Longest path to Object: 7
   superclasses:
     Object
       -> GW
@@ -457,3 +467,81 @@
     Object._simpleInstanceOfTrue
     Object.==
   interfaceSetters:
+
+ARO:
+  superclasses:
+    Object
+  interfaces:
+  classMembers:
+    Object.toString
+    Object.runtimeType
+    Object._simpleInstanceOf
+    Object._instanceOf
+    Object.noSuchMethod
+    Object._identityHashCode
+    Object.hashCode
+    Object._simpleInstanceOfFalse
+    Object._simpleInstanceOfTrue
+    Object.==
+  classSetters:
+
+ARQ:
+  Longest path to Object: 2
+  superclasses:
+    Object
+  interfaces: ARO<T>
+  classMembers:
+    Object.toString
+    Object.runtimeType
+    Object._simpleInstanceOf
+    Object._instanceOf
+    Object.noSuchMethod
+    Object._identityHashCode
+    Object.hashCode
+    Object._simpleInstanceOfFalse
+    Object._simpleInstanceOfTrue
+    Object.==
+  classSetters:
+  interfaceMembers:
+    Object.toString
+    Object.runtimeType
+    Object._simpleInstanceOf
+    Object._instanceOf
+    Object.noSuchMethod
+    Object._identityHashCode
+    Object.hashCode
+    Object._simpleInstanceOfFalse
+    Object._simpleInstanceOfTrue
+    Object.==
+  interfaceSetters:
+
+ARN:
+  Longest path to Object: 3
+  superclasses:
+    Object
+      -> ARQ<A>
+  interfaces: ARO<A>
+  classMembers:
+    Object.toString
+    Object.runtimeType
+    Object._simpleInstanceOf
+    Object._instanceOf
+    Object.noSuchMethod
+    Object._identityHashCode
+    Object.hashCode
+    Object._simpleInstanceOfFalse
+    Object._simpleInstanceOfTrue
+    Object.==
+  classSetters:
+  interfaceMembers:
+    Object.toString
+    Object.runtimeType
+    Object._simpleInstanceOf
+    Object._instanceOf
+    Object.noSuchMethod
+    Object._identityHashCode
+    Object.hashCode
+    Object._simpleInstanceOfFalse
+    Object._simpleInstanceOfTrue
+    Object.==
+  interfaceSetters:
diff --git a/pkg/front_end/testcases/complex_class_hierarchy.dart.legacy.expect b/pkg/front_end/testcases/complex_class_hierarchy.dart.legacy.expect
index faa6b6d..a77011e 100644
--- a/pkg/front_end/testcases/complex_class_hierarchy.dart.legacy.expect
+++ b/pkg/front_end/testcases/complex_class_hierarchy.dart.legacy.expect
@@ -92,4 +92,19 @@
     : super self::GU::•()
     ;
 }
+class ARO<S extends core::Object = dynamic> extends core::Object {
+  synthetic constructor •() → self::ARO<self::ARO::S>
+    : super core::Object::•()
+    ;
+}
+class ARQ<T extends core::Object = dynamic> extends core::Object implements self::ARO<self::ARQ::T> {
+  synthetic constructor •() → self::ARQ<self::ARQ::T>
+    : super core::Object::•()
+    ;
+}
+class ARN extends self::ARQ<self::A> {
+  synthetic constructor •() → self::ARN
+    : super self::ARQ::•()
+    ;
+}
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/complex_class_hierarchy.dart.legacy.transformed.expect b/pkg/front_end/testcases/complex_class_hierarchy.dart.legacy.transformed.expect
index faa6b6d..a77011e 100644
--- a/pkg/front_end/testcases/complex_class_hierarchy.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/complex_class_hierarchy.dart.legacy.transformed.expect
@@ -92,4 +92,19 @@
     : super self::GU::•()
     ;
 }
+class ARO<S extends core::Object = dynamic> extends core::Object {
+  synthetic constructor •() → self::ARO<self::ARO::S>
+    : super core::Object::•()
+    ;
+}
+class ARQ<T extends core::Object = dynamic> extends core::Object implements self::ARO<self::ARQ::T> {
+  synthetic constructor •() → self::ARQ<self::ARQ::T>
+    : super core::Object::•()
+    ;
+}
+class ARN extends self::ARQ<self::A> {
+  synthetic constructor •() → self::ARN
+    : super self::ARQ::•()
+    ;
+}
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/complex_class_hierarchy.dart.outline.expect b/pkg/front_end/testcases/complex_class_hierarchy.dart.outline.expect
index f1265b2..0d412a05 100644
--- a/pkg/front_end/testcases/complex_class_hierarchy.dart.outline.expect
+++ b/pkg/front_end/testcases/complex_class_hierarchy.dart.outline.expect
@@ -74,5 +74,17 @@
   synthetic constructor •() → self::GV
     ;
 }
+class ARO<S extends core::Object = dynamic> extends core::Object {
+  synthetic constructor •() → self::ARO<self::ARO::S>
+    ;
+}
+class ARQ<T extends core::Object = dynamic> extends core::Object implements self::ARO<self::ARQ::T> {
+  synthetic constructor •() → self::ARQ<self::ARQ::T>
+    ;
+}
+class ARN extends self::ARQ<self::A> {
+  synthetic constructor •() → self::ARN
+    ;
+}
 static method main() → dynamic
   ;
diff --git a/pkg/front_end/testcases/complex_class_hierarchy.dart.strong.expect b/pkg/front_end/testcases/complex_class_hierarchy.dart.strong.expect
index 1bca20f..af41678 100644
--- a/pkg/front_end/testcases/complex_class_hierarchy.dart.strong.expect
+++ b/pkg/front_end/testcases/complex_class_hierarchy.dart.strong.expect
@@ -92,4 +92,19 @@
     : super self::GU::•()
     ;
 }
+class ARO<S extends core::Object = dynamic> extends core::Object {
+  synthetic constructor •() → self::ARO<self::ARO::S>
+    : super core::Object::•()
+    ;
+}
+class ARQ<T extends core::Object = dynamic> extends core::Object implements self::ARO<self::ARQ::T> {
+  synthetic constructor •() → self::ARQ<self::ARQ::T>
+    : super core::Object::•()
+    ;
+}
+class ARN extends self::ARQ<self::A> {
+  synthetic constructor •() → self::ARN
+    : super self::ARQ::•()
+    ;
+}
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/complex_class_hierarchy.dart.strong.transformed.expect b/pkg/front_end/testcases/complex_class_hierarchy.dart.strong.transformed.expect
index 1bca20f..af41678 100644
--- a/pkg/front_end/testcases/complex_class_hierarchy.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/complex_class_hierarchy.dart.strong.transformed.expect
@@ -92,4 +92,19 @@
     : super self::GU::•()
     ;
 }
+class ARO<S extends core::Object = dynamic> extends core::Object {
+  synthetic constructor •() → self::ARO<self::ARO::S>
+    : super core::Object::•()
+    ;
+}
+class ARQ<T extends core::Object = dynamic> extends core::Object implements self::ARO<self::ARQ::T> {
+  synthetic constructor •() → self::ARQ<self::ARQ::T>
+    : super core::Object::•()
+    ;
+}
+class ARN extends self::ARQ<self::A> {
+  synthetic constructor •() → self::ARN
+    : super self::ARQ::•()
+    ;
+}
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/constructor_const_inference.dart.legacy.expect b/pkg/front_end/testcases/constructor_const_inference.dart.legacy.expect
index b3c195b..fa5e33f 100644
--- a/pkg/front_end/testcases/constructor_const_inference.dart.legacy.expect
+++ b/pkg/front_end/testcases/constructor_const_inference.dart.legacy.expect
@@ -8,7 +8,7 @@
     ;
 }
 class A<T extends core::Object = dynamic> extends core::Object {
-  field self::_Y<self::A::T> x;
+  generic-covariant-impl field self::_Y<self::A::T> x;
   constructor •(self::_Y<self::A::T> x) → self::A<self::A::T>
     : self::A::x = x, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/constructor_const_inference.dart.legacy.transformed.expect b/pkg/front_end/testcases/constructor_const_inference.dart.legacy.transformed.expect
index b3c195b..fa5e33f 100644
--- a/pkg/front_end/testcases/constructor_const_inference.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/constructor_const_inference.dart.legacy.transformed.expect
@@ -8,7 +8,7 @@
     ;
 }
 class A<T extends core::Object = dynamic> extends core::Object {
-  field self::_Y<self::A::T> x;
+  generic-covariant-impl field self::_Y<self::A::T> x;
   constructor •(self::_Y<self::A::T> x) → self::A<self::A::T>
     : self::A::x = x, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/constructor_const_inference.dart.outline.expect b/pkg/front_end/testcases/constructor_const_inference.dart.outline.expect
index 071faac..2ad0826 100644
--- a/pkg/front_end/testcases/constructor_const_inference.dart.outline.expect
+++ b/pkg/front_end/testcases/constructor_const_inference.dart.outline.expect
@@ -7,7 +7,7 @@
     ;
 }
 class A<T extends core::Object = dynamic> extends core::Object {
-  field self::_Y<self::A::T> x;
+  generic-covariant-impl field self::_Y<self::A::T> x;
   constructor •(self::_Y<self::A::T> x) → self::A<self::A::T>
     ;
 }
diff --git a/pkg/front_end/testcases/control_flow_collection.dart b/pkg/front_end/testcases/control_flow_collection.dart
new file mode 100644
index 0000000..987769f
--- /dev/null
+++ b/pkg/front_end/testcases/control_flow_collection.dart
@@ -0,0 +1,39 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+main() {
+  final aList = <int>[
+      1,
+      if (oracle()) 2,
+      if (oracle()) 3 else -1,
+      if (oracle()) if (oracle()) 4,
+      for (int i in <int>[5, 6, 7]) i,
+      for (int i in <int>[8, 9, 10]) if (oracle()) i,
+      for (int i = 11; i <= 14; ++i) i,
+  ];
+  final aSet = <int>{
+      1,
+      if (oracle()) 2,
+      if (oracle()) 3 else -1,
+      if (oracle()) if (oracle()) 4,
+      for (int i in <int>[5, 6, 7]) i,
+      for (int i in <int>[8, 9, 10]) if (oracle()) i,
+      for (int i = 11; i <= 14; ++i) i,
+  };
+  final aMap = <int, int>{
+      1: 1,
+      if (oracle()) 2: 2,
+      if (oracle()) 3: 3 else -1: -1,
+      if (oracle()) if (oracle()) 4: 4,
+      for (int i in <int>[5, 6, 7]) i: i,
+      for (int i in <int>[8, 9, 10]) if (oracle()) i: i,
+      for (int i = 11; i <= 14; ++i) i: i,
+  };
+
+  print(aList);
+  print(aSet);
+  print(aMap);
+}
+
+oracle() => true;
diff --git a/pkg/front_end/testcases/control_flow_collection.dart.legacy.expect b/pkg/front_end/testcases/control_flow_collection.dart.legacy.expect
new file mode 100644
index 0000000..099350f
--- /dev/null
+++ b/pkg/front_end/testcases/control_flow_collection.dart.legacy.expect
@@ -0,0 +1,113 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/control_flow_collection.dart:8:7: Error: Unexpected token 'if'.
+//       if (oracle()) 2,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:9:7: Error: Unexpected token 'if'.
+//       if (oracle()) 3 else -1,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:10:21: Error: Unexpected token 'if'.
+//       if (oracle()) if (oracle()) 4,
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:10:7: Error: Unexpected token 'if'.
+//       if (oracle()) if (oracle()) 4,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:11:7: Error: Unexpected token 'for'.
+//       for (int i in <int>[5, 6, 7]) i,
+//       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:12:38: Error: Unexpected token 'if'.
+//       for (int i in <int>[8, 9, 10]) if (oracle()) i,
+//                                      ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:12:7: Error: Unexpected token 'for'.
+//       for (int i in <int>[8, 9, 10]) if (oracle()) i,
+//       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:13:7: Error: Unexpected token 'for'.
+//       for (int i = 11; i <= 14; ++i) i,
+//       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:17:7: Error: Unexpected token 'if'.
+//       if (oracle()) 2,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:18:7: Error: Unexpected token 'if'.
+//       if (oracle()) 3 else -1,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:19:21: Error: Unexpected token 'if'.
+//       if (oracle()) if (oracle()) 4,
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:19:7: Error: Unexpected token 'if'.
+//       if (oracle()) if (oracle()) 4,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:20:7: Error: Unexpected token 'for'.
+//       for (int i in <int>[5, 6, 7]) i,
+//       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:21:38: Error: Unexpected token 'if'.
+//       for (int i in <int>[8, 9, 10]) if (oracle()) i,
+//                                      ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:21:7: Error: Unexpected token 'for'.
+//       for (int i in <int>[8, 9, 10]) if (oracle()) i,
+//       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:22:7: Error: Unexpected token 'for'.
+//       for (int i = 11; i <= 14; ++i) i,
+//       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:26:7: Error: Unexpected token 'if'.
+//       if (oracle()) 2: 2,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:27:7: Error: Unexpected token 'if'.
+//       if (oracle()) 3: 3 else -1: -1,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:28:21: Error: Unexpected token 'if'.
+//       if (oracle()) if (oracle()) 4: 4,
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:28:7: Error: Unexpected token 'if'.
+//       if (oracle()) if (oracle()) 4: 4,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:29:7: Error: Unexpected token 'for'.
+//       for (int i in <int>[5, 6, 7]) i: i,
+//       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:30:38: Error: Unexpected token 'if'.
+//       for (int i in <int>[8, 9, 10]) if (oracle()) i: i,
+//                                      ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:30:7: Error: Unexpected token 'for'.
+//       for (int i in <int>[8, 9, 10]) if (oracle()) i: i,
+//       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:31:7: Error: Unexpected token 'for'.
+//       for (int i = 11; i <= 14; ++i) i: i,
+//       ^^^
+//
+import self as self;
+import "dart:core" as core;
+
+static method main() → dynamic {
+  final dynamic aList = <core::int>[1];
+  final dynamic aSet = <core::int>{1};
+  final dynamic aMap = <core::int, core::int>{1: 1};
+  core::print(aList);
+  core::print(aSet);
+  core::print(aMap);
+}
+static method oracle() → dynamic
+  return true;
diff --git a/pkg/front_end/testcases/control_flow_collection.dart.legacy.transformed.expect b/pkg/front_end/testcases/control_flow_collection.dart.legacy.transformed.expect
new file mode 100644
index 0000000..099350f
--- /dev/null
+++ b/pkg/front_end/testcases/control_flow_collection.dart.legacy.transformed.expect
@@ -0,0 +1,113 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/control_flow_collection.dart:8:7: Error: Unexpected token 'if'.
+//       if (oracle()) 2,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:9:7: Error: Unexpected token 'if'.
+//       if (oracle()) 3 else -1,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:10:21: Error: Unexpected token 'if'.
+//       if (oracle()) if (oracle()) 4,
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:10:7: Error: Unexpected token 'if'.
+//       if (oracle()) if (oracle()) 4,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:11:7: Error: Unexpected token 'for'.
+//       for (int i in <int>[5, 6, 7]) i,
+//       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:12:38: Error: Unexpected token 'if'.
+//       for (int i in <int>[8, 9, 10]) if (oracle()) i,
+//                                      ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:12:7: Error: Unexpected token 'for'.
+//       for (int i in <int>[8, 9, 10]) if (oracle()) i,
+//       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:13:7: Error: Unexpected token 'for'.
+//       for (int i = 11; i <= 14; ++i) i,
+//       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:17:7: Error: Unexpected token 'if'.
+//       if (oracle()) 2,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:18:7: Error: Unexpected token 'if'.
+//       if (oracle()) 3 else -1,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:19:21: Error: Unexpected token 'if'.
+//       if (oracle()) if (oracle()) 4,
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:19:7: Error: Unexpected token 'if'.
+//       if (oracle()) if (oracle()) 4,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:20:7: Error: Unexpected token 'for'.
+//       for (int i in <int>[5, 6, 7]) i,
+//       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:21:38: Error: Unexpected token 'if'.
+//       for (int i in <int>[8, 9, 10]) if (oracle()) i,
+//                                      ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:21:7: Error: Unexpected token 'for'.
+//       for (int i in <int>[8, 9, 10]) if (oracle()) i,
+//       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:22:7: Error: Unexpected token 'for'.
+//       for (int i = 11; i <= 14; ++i) i,
+//       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:26:7: Error: Unexpected token 'if'.
+//       if (oracle()) 2: 2,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:27:7: Error: Unexpected token 'if'.
+//       if (oracle()) 3: 3 else -1: -1,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:28:21: Error: Unexpected token 'if'.
+//       if (oracle()) if (oracle()) 4: 4,
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:28:7: Error: Unexpected token 'if'.
+//       if (oracle()) if (oracle()) 4: 4,
+//       ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:29:7: Error: Unexpected token 'for'.
+//       for (int i in <int>[5, 6, 7]) i: i,
+//       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:30:38: Error: Unexpected token 'if'.
+//       for (int i in <int>[8, 9, 10]) if (oracle()) i: i,
+//                                      ^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:30:7: Error: Unexpected token 'for'.
+//       for (int i in <int>[8, 9, 10]) if (oracle()) i: i,
+//       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection.dart:31:7: Error: Unexpected token 'for'.
+//       for (int i = 11; i <= 14; ++i) i: i,
+//       ^^^
+//
+import self as self;
+import "dart:core" as core;
+
+static method main() → dynamic {
+  final dynamic aList = <core::int>[1];
+  final dynamic aSet = <core::int>{1};
+  final dynamic aMap = <core::int, core::int>{1: 1};
+  core::print(aList);
+  core::print(aSet);
+  core::print(aMap);
+}
+static method oracle() → dynamic
+  return true;
diff --git a/pkg/front_end/testcases/control_flow_collection.dart.outline.expect b/pkg/front_end/testcases/control_flow_collection.dart.outline.expect
new file mode 100644
index 0000000..b0c1797
--- /dev/null
+++ b/pkg/front_end/testcases/control_flow_collection.dart.outline.expect
@@ -0,0 +1,7 @@
+library;
+import self as self;
+
+static method main() → dynamic
+  ;
+static method oracle() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/control_flow_collection.dart.strong.expect b/pkg/front_end/testcases/control_flow_collection.dart.strong.expect
new file mode 100644
index 0000000..8c19425
--- /dev/null
+++ b/pkg/front_end/testcases/control_flow_collection.dart.strong.expect
@@ -0,0 +1,72 @@
+library;
+import self as self;
+import "dart:core" as core;
+import "dart:collection" as col;
+
+static method main() → dynamic {
+  final core::List<core::int> aList = block {
+    final core::List<core::int> #t1 = <core::int>[];
+    #t1.{core::List::add}(1);
+    if(self::oracle() as{TypeError} core::bool)
+      #t1.{core::List::add}(2);
+    if(self::oracle() as{TypeError} core::bool)
+      #t1.{core::List::add}(3);
+    else
+      #t1.{core::List::add}(1.{core::int::unary-}());
+    if(self::oracle() as{TypeError} core::bool)
+      if(self::oracle() as{TypeError} core::bool)
+        #t1.{core::List::add}(4);
+    for (core::int i in <core::int>[5, 6, 7])
+      #t1.{core::List::add}(i);
+    for (core::int i in <core::int>[8, 9, 10])
+      if(self::oracle() as{TypeError} core::bool)
+        #t1.{core::List::add}(i);
+    for (core::int i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
+      #t1.{core::List::add}(i);
+  } =>#t1;
+  final core::Set<core::int> aSet = block {
+    final core::Set<core::int> #t2 = col::LinkedHashSet::•<core::int>();
+    #t2.{core::Set::add}(1);
+    if(self::oracle() as{TypeError} core::bool)
+      #t2.{core::Set::add}(2);
+    if(self::oracle() as{TypeError} core::bool)
+      #t2.{core::Set::add}(3);
+    else
+      #t2.{core::Set::add}(1.{core::int::unary-}());
+    if(self::oracle() as{TypeError} core::bool)
+      if(self::oracle() as{TypeError} core::bool)
+        #t2.{core::Set::add}(4);
+    for (core::int i in <core::int>[5, 6, 7])
+      #t2.{core::Set::add}(i);
+    for (core::int i in <core::int>[8, 9, 10])
+      if(self::oracle() as{TypeError} core::bool)
+        #t2.{core::Set::add}(i);
+    for (core::int i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
+      #t2.{core::Set::add}(i);
+  } =>#t2;
+  final core::Map<core::int, core::int> aMap = block {
+    final core::Map<core::int, core::int> #t3 = <core::int, core::int>{};
+    #t3.{core::Map::[]=}(1, 1);
+    if(self::oracle() as{TypeError} core::bool)
+      #t3.{core::Map::[]=}(2, 2);
+    if(self::oracle() as{TypeError} core::bool)
+      #t3.{core::Map::[]=}(3, 3);
+    else
+      #t3.{core::Map::[]=}(1.{core::int::unary-}(), 1.{core::int::unary-}());
+    if(self::oracle() as{TypeError} core::bool)
+      if(self::oracle() as{TypeError} core::bool)
+        #t3.{core::Map::[]=}(4, 4);
+    for (core::int i in <core::int>[5, 6, 7])
+      #t3.{core::Map::[]=}(i, i);
+    for (core::int i in <core::int>[8, 9, 10])
+      if(self::oracle() as{TypeError} core::bool)
+        #t3.{core::Map::[]=}(i, i);
+    for (core::int i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
+      #t3.{core::Map::[]=}(i, i);
+  } =>#t3;
+  core::print(aList);
+  core::print(aSet);
+  core::print(aMap);
+}
+static method oracle() → dynamic
+  return true;
diff --git a/pkg/front_end/testcases/control_flow_collection.dart.strong.transformed.expect b/pkg/front_end/testcases/control_flow_collection.dart.strong.transformed.expect
new file mode 100644
index 0000000..8c19425
--- /dev/null
+++ b/pkg/front_end/testcases/control_flow_collection.dart.strong.transformed.expect
@@ -0,0 +1,72 @@
+library;
+import self as self;
+import "dart:core" as core;
+import "dart:collection" as col;
+
+static method main() → dynamic {
+  final core::List<core::int> aList = block {
+    final core::List<core::int> #t1 = <core::int>[];
+    #t1.{core::List::add}(1);
+    if(self::oracle() as{TypeError} core::bool)
+      #t1.{core::List::add}(2);
+    if(self::oracle() as{TypeError} core::bool)
+      #t1.{core::List::add}(3);
+    else
+      #t1.{core::List::add}(1.{core::int::unary-}());
+    if(self::oracle() as{TypeError} core::bool)
+      if(self::oracle() as{TypeError} core::bool)
+        #t1.{core::List::add}(4);
+    for (core::int i in <core::int>[5, 6, 7])
+      #t1.{core::List::add}(i);
+    for (core::int i in <core::int>[8, 9, 10])
+      if(self::oracle() as{TypeError} core::bool)
+        #t1.{core::List::add}(i);
+    for (core::int i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
+      #t1.{core::List::add}(i);
+  } =>#t1;
+  final core::Set<core::int> aSet = block {
+    final core::Set<core::int> #t2 = col::LinkedHashSet::•<core::int>();
+    #t2.{core::Set::add}(1);
+    if(self::oracle() as{TypeError} core::bool)
+      #t2.{core::Set::add}(2);
+    if(self::oracle() as{TypeError} core::bool)
+      #t2.{core::Set::add}(3);
+    else
+      #t2.{core::Set::add}(1.{core::int::unary-}());
+    if(self::oracle() as{TypeError} core::bool)
+      if(self::oracle() as{TypeError} core::bool)
+        #t2.{core::Set::add}(4);
+    for (core::int i in <core::int>[5, 6, 7])
+      #t2.{core::Set::add}(i);
+    for (core::int i in <core::int>[8, 9, 10])
+      if(self::oracle() as{TypeError} core::bool)
+        #t2.{core::Set::add}(i);
+    for (core::int i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
+      #t2.{core::Set::add}(i);
+  } =>#t2;
+  final core::Map<core::int, core::int> aMap = block {
+    final core::Map<core::int, core::int> #t3 = <core::int, core::int>{};
+    #t3.{core::Map::[]=}(1, 1);
+    if(self::oracle() as{TypeError} core::bool)
+      #t3.{core::Map::[]=}(2, 2);
+    if(self::oracle() as{TypeError} core::bool)
+      #t3.{core::Map::[]=}(3, 3);
+    else
+      #t3.{core::Map::[]=}(1.{core::int::unary-}(), 1.{core::int::unary-}());
+    if(self::oracle() as{TypeError} core::bool)
+      if(self::oracle() as{TypeError} core::bool)
+        #t3.{core::Map::[]=}(4, 4);
+    for (core::int i in <core::int>[5, 6, 7])
+      #t3.{core::Map::[]=}(i, i);
+    for (core::int i in <core::int>[8, 9, 10])
+      if(self::oracle() as{TypeError} core::bool)
+        #t3.{core::Map::[]=}(i, i);
+    for (core::int i = 11; i.{core::num::<=}(14); i = i.{core::num::+}(1))
+      #t3.{core::Map::[]=}(i, i);
+  } =>#t3;
+  core::print(aList);
+  core::print(aSet);
+  core::print(aMap);
+}
+static method oracle() → dynamic
+  return true;
diff --git a/pkg/front_end/testcases/control_flow_collection.dart.type_promotion.expect b/pkg/front_end/testcases/control_flow_collection.dart.type_promotion.expect
new file mode 100644
index 0000000..5476097
--- /dev/null
+++ b/pkg/front_end/testcases/control_flow_collection.dart.type_promotion.expect
@@ -0,0 +1,9 @@
+pkg/front_end/testcases/control_flow_collection.dart:13:33: Context: Write to i@364
+      for (int i = 11; i <= 14; ++i) i,
+                                ^^
+pkg/front_end/testcases/control_flow_collection.dart:22:33: Context: Write to i@364
+      for (int i = 11; i <= 14; ++i) i,
+                                ^^
+pkg/front_end/testcases/control_flow_collection.dart:31:33: Context: Write to i@364
+      for (int i = 11; i <= 14; ++i) i: i,
+                                ^^
diff --git a/pkg/front_end/testcases/control_flow_collection_inference.dart b/pkg/front_end/testcases/control_flow_collection_inference.dart
new file mode 100644
index 0000000..4a64f6a
--- /dev/null
+++ b/pkg/front_end/testcases/control_flow_collection_inference.dart
@@ -0,0 +1,272 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Oracle is generic to test the inference in conditions of if-elements.
+oracle<T>([T t]) => true;
+
+testIfElement(dynamic dynVar, List<int> listInt, List<double> listDouble,
+    Map<String, int> mapToInt, Map<String, double> mapToDouble) {
+  var list10 = [if (oracle("foo")) 42];
+  var set10 = {if (oracle("foo")) 42, null};
+  var map10 = {if (oracle("foo")) "bar": 42, "baz": null};
+  var list11 = [if (oracle("foo")) dynVar];
+  var set11 = {if (oracle("foo")) dynVar, null};
+  var map11 = {if (oracle("foo")) "bar": dynVar, "baz": null};
+  var list12 = [if (oracle("foo")) [42]];
+  var set12 = {if (oracle("foo")) [42], null};
+  var map12 = {if (oracle("foo")) "bar": [42], "baz": null};
+  var list20 = [if (oracle("foo")) ...[42]];
+  var set20 = {if (oracle("foo")) ...[42], null};
+  var map20 = {if (oracle("foo")) ...{"bar": 42}, "baz": null};
+  var list21 = [if (oracle("foo")) ...[dynVar]];
+  var set21 = {if (oracle("foo")) ...[dynVar], null};
+  var map21 = {if (oracle("foo")) ...{"bar": dynVar}, "baz": null};
+  var list22 = [if (oracle("foo")) ...[[42]]];
+  var set22 = {if (oracle("foo")) ...[[42]], null};
+  var map22 = {if (oracle("foo")) ...{"bar": [42]}, "baz": null};
+  var list30 = [if (oracle("foo")) if (oracle()) ...[42]];
+  var set30 = {if (oracle("foo")) if (oracle()) ...[42], null};
+  var map30 = {if (oracle("foo")) if (oracle()) ...{"bar": 42}, "baz": null};
+  var list31 = [if (oracle("foo")) if (oracle()) ...[dynVar]];
+  var set31 = {if (oracle("foo")) if (oracle()) ...[dynVar], null};
+  var map31 = {if (oracle("foo")) if (oracle()) ...{"bar": dynVar}, "baz": null};
+  var list33 = [if (oracle("foo")) if (oracle()) ...[[42]]];
+  var set33 = {if (oracle("foo")) if (oracle()) ...[[42]], null};
+  var map33 = {if (oracle("foo")) if (oracle()) ...{"bar": [42]}, "baz": null};
+  List<List<int>> list40 = [if (oracle("foo")) ...[[]]];
+  Set<List<int>> set40 = {if (oracle("foo")) ...[[]], null};
+  Map<String, List<int>> map40 = {if (oracle("foo")) ...{"bar", []}, "baz": null};
+  List<List<int>> list41 = [if (oracle("foo")) ...{[]}];
+  Set<List<int>> set41 = {if (oracle("foo")) ...{[]}, null};
+  List<List<int>> list42 = [if (oracle("foo")) if (oracle()) ...[[]]];
+  Set<List<int>> set42 = {if (oracle("foo")) if (oracle()) ...[[]], null};
+  Map<String, List<int>> map42 = {if (oracle("foo")) if (oracle()) ...{"bar": []}, "baz": null};
+  List<int> list50 = [if (oracle("foo")) ...[]];
+  Set<int> set50 = {if (oracle("foo")) ...[], null};
+  Map<String, int> map50 = {if (oracle("foo")) ...{}, "baz": null};
+  List<int> list51 = [if (oracle("foo")) ...{}];
+  Set<int> set51 = {if (oracle("foo")) ...{}, null};
+  List<int> list52 = [if (oracle("foo")) if (oracle()) ...[]];
+  Set<int> set52 = {if (oracle("foo")) if (oracle()) ...[], null};
+  Map<String, int> map52 = {if (oracle("foo")) if (oracle()) ...{}, "baz": null};
+  List<List<int>> list60 = [if (oracle("foo")) ...[[]]];
+  Set<List<int>> set60 = {if (oracle("foo")) ...[[]], null};
+  Map<String, List<int>> map60 = {if (oracle("foo")) ...{"bar": []}, "baz": null};
+  List<List<int>> list61 = [if (oracle("foo")) if (oracle()) ...[[]]];
+  Set<List<int>> set61 = {if (oracle("foo")) if (oracle()) ...[[]], null};
+  Map<String, List<int>> map61 = {if (oracle("foo")) if (oracle()) ...{"bar": []}, "baz": null};
+  List<List<int>> list70 = [if (oracle("foo")) []];
+  Set<List<int>> set70 = {if (oracle("foo")) [], null};
+  List<List<int>> list71 = [if (oracle("foo")) if (oracle()) []];
+  Set<List<int>> set71 = {if (oracle("foo")) if (oracle()) [], null};
+  var list80 = [if (oracle("foo")) 42 else 3.14];
+  var set80 = {if (oracle("foo")) 42 else 3.14, null};
+  var map80 = {if (oracle("foo")) "bar": 42 else "bar": 3.14, "baz": null};
+  var list81 = [if (oracle("foo")) ...listInt else ...listDouble];
+  var set81 = {if (oracle("foo")) ...listInt else ...listDouble, null};
+  var map81 = {if (oracle("foo")) ...mapToInt else ...mapToDouble, "baz": null};
+  var list82 = [if (oracle("foo")) ...listInt else ...dynVar];
+  var set82 = {if (oracle("foo")) ...listInt else ...dynVar, null};
+  var map82 = {if (oracle("foo")) ...mapToInt else ...dynVar, null};
+  var list83 = [if (oracle("foo")) 42 else ...listDouble];
+  var set83 = {if (oracle("foo")) ...listInt else 3.14, null};
+  var map83 = {if (oracle("foo")) ...mapToInt else "bar": 3.14, "baz": null};
+  List<int> list90 = [if (oracle("foo")) dynVar];
+  Set<int> set90 = {if (oracle("foo")) dynVar, null};
+  Map<String, int> map90 = {if (oracle("foo")) "bar": dynVar, "baz": null};
+  List<int> list91 = [if (oracle("foo")) ...dynVar];
+  Set<int> set91 = {if (oracle("foo")) ...dynVar, null};
+  Map<String, int> map91 = {if (oracle("foo")) ...dynVar, "baz": null};
+  List<int> list100 = [if (dynVar) 42];
+  Set<int> set100 = {if (dynVar) 42};
+  Map<int, int> map100 = {if (dynVar) 42: 42};
+}
+
+testIfElementErrors(Map<int, int> map) {
+  <int>[if (oracle("foo")) "bar"];
+  <int>{if (oracle("foo")) "bar", null};
+  <String, int>{if (oracle("foo")) "bar": "bar", "baz": null};
+  <int>[if (oracle("foo")) ...["bar"]];
+  <int>{if (oracle("foo")) ...["bar"], null};
+  <String, int>{if (oracle("foo")) ...{"bar": "bar"}, "baz": null};
+  <int>[if (oracle("foo")) ...map];
+  <int>{if (oracle("foo")) ...map, null};
+  <String, int>{if (oracle("foo")) ...["bar"], "baz": null};
+  <String>[if (oracle("foo")) 42 else 3.14];
+  <String>{if (oracle("foo")) 42 else 3.14, null};
+  <String, String>{if (oracle("foo")) "bar": 42 else "baz": 3.14, "baz": null};
+  <int>[if (oracle("foo")) ...map else 42];
+  <int>{if (oracle("foo")) ...map else 42, null};
+  <String, int>{if (oracle("foo")) ...[42] else "bar": 42, "baz": null};
+  <int>[if (oracle("foo")) 42 else ...map];
+  <int>{if (oracle("foo")) ...map else 42, null};
+  <String, int>{if (oracle("foo")) "bar": 42 else ...[42], "baz": null};
+
+  Set<dynamic> set10 = {if (oracle("foo")) 42 else "bar": 3.14};
+  Map<dynamic, dynamic> map10 = {if (oracle("foo")) 42 else "bar": 3.14};
+  Set<dynamic> set11 = {if (oracle("foo")) "bar": 3.14 else 42};
+  Map<dynamic, dynamic> map11 = {if (oracle("foo")) "bar": 3.14 else 42};
+  var map12 = {if (oracle("foo")) 42 else "bar": 3.14};
+  var map13 = {if (oracle("foo")) "bar": 3.14 else 42};
+  List<int> list20 = [if (42) 42];
+  Set<int> set20 = {if (42) 42};
+  Map<int, int> map30 = {if (42) 42: 42};
+  List<String> list40 = <String>[if (oracle("foo")) true else 42];
+  Set<String> set40 = <String>{if (oracle("foo")) true else 42};
+  Map<String, int> map40 = <String, int>{if (oracle("foo")) true: 42 else 42: 42};
+  Map<int, String> map41 = <int, String>{if (oracle("foo")) 42: true else 42: 42};
+}
+
+testForElement(dynamic dynVar, List<int> listInt, List<double> listDouble, int
+    index, Map<String, int> mapStringInt, Map<String, double> mapStringDouble) {
+  var list10 = [for (int i = 0; oracle("foo"); i++) 42];
+  var set10 = {for (int i = 0; oracle("foo"); i++) 42, null};
+  var map10 = {for (int i = 0; oracle("foo"); i++) "bar": 42, "baz": null};
+  var list11 = [for (int i = 0; oracle("foo"); i++) dynVar];
+  var set11 = {for (int i = 0; oracle("foo"); i++) dynVar, null};
+  var map11 = {for (int i = 0; oracle("foo"); i++) "bar": dynVar, "baz": null};
+  var list12 = [for (int i = 0; oracle("foo"); i++) [42]];
+  var set12 = {for (int i = 0; oracle("foo"); i++) [42], null};
+  var map12 = {for (int i = 0; oracle("foo"); i++) "bar": [42], "baz": null};
+  var list20 = [for (int i = 0; oracle("foo"); i++) ...[42]];
+  var set20 = {for (int i = 0; oracle("foo"); i++) ...[42], null};
+  var map20 = {for (int i = 0; oracle("foo"); i++) ...{"bar": 42}, "baz": null};
+  var list21 = [for (int i = 0; oracle("foo"); i++) ...[dynVar]];
+  var set21 = {for (int i = 0; oracle("foo"); i++) ...[dynVar], null};
+  var map21 = {for (int i = 0; oracle("foo"); i++) ...{"bar": dynVar}, "baz": null};
+  var list22 = [for (int i = 0; oracle("foo"); i++) ...[[42]]];
+  var set22 = {for (int i = 0; oracle("foo"); i++) ...[[42]], null};
+  var map22 = {for (int i = 0; oracle("foo"); i++) ...{"bar": [42]}, "baz": null};
+  var list30 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[42]];
+  var set30 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[42], null};
+  var map30 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": 42}, "baz": null};
+  var list31 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[dynVar]];
+  var set31 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[dynVar], null};
+  var map31 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": dynVar}, "baz": null};
+  var list33 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[42]]];
+  var set33 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[42]], null};
+  var map33 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": [42]}, "baz": null};
+  List<List<int>> list40 = [for (int i = 0; oracle("foo"); i++) ...[[]]];
+  Set<List<int>> set40 = {for (int i = 0; oracle("foo"); i++) ...[[]], null};
+  Map<String, List<int>> map40 = {for (int i = 0; oracle("foo"); i++) ...{"bar": []}, "baz": null};
+  List<List<int>> list41 = [for (int i = 0; oracle("foo"); i++) ...{[]}];
+  Set<List<int>> set41 = {for (int i = 0; oracle("foo"); i++) ...{[]}, null};
+  List<List<int>> list42 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]]];
+  Set<List<int>> set42 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]], null};
+  Map<String, List<int>> map42 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": []}, "baz": null};
+  List<int> list50 = [for (int i = 0; oracle("foo"); i++) ...[]];
+  Set<int> set50 = {for (int i = 0; oracle("foo"); i++) ...[], null};
+  Map<String, int> map50 = {for (int i = 0; oracle("foo"); i++) ...{}, "baz": null};
+  List<int> list51 = [for (int i = 0; oracle("foo"); i++) ...{}];
+  Set<int> set51 = {for (int i = 0; oracle("foo"); i++) ...{}, null};
+  List<int> list52 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[]];
+  Set<int> set52 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[], null};
+  List<List<int>> list60 = [for (int i = 0; oracle("foo"); i++) ...[[]]];
+  Set<List<int>> set60 = {for (int i = 0; oracle("foo"); i++) ...[[]], null};
+  Map<String, List<int>> map60 = {for (int i = 0; oracle("foo"); i++) ...{"bar": []}, "baz": null};
+  List<List<int>> list61 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]]];
+  Set<List<int>> set61 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]], null};
+  Map<String, List<int>> map61 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": []}, "baz": null};
+  List<List<int>> list70 = [for (int i = 0; oracle("foo"); i++) []];
+  Set<List<int>> set70 = {for (int i = 0; oracle("foo"); i++) [], null};
+  Map<String, List<int>> map70 = {for (int i = 0; oracle("foo"); i++) "bar": [], "baz": null};
+  List<List<int>> list71 = [for (int i = 0; oracle("foo"); i++) if (oracle()) []];
+  Set<List<int>> set71 = {for (int i = 0; oracle("foo"); i++) if (oracle()) [], null};
+  Map<String, List<int>> map71 = {for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": [], "baz": null};
+  var list80 = [for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14];
+  var set80 = {for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14, null};
+  var map80 = {for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else "bar": 3.14, "baz": null};
+  var list81 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble];
+  var set81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble, null};
+  var map81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...mapStringDouble, "baz": null};
+  var list82 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar];
+  var set82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar, null};
+  var map82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...dynVar, "baz": null};
+  var list83 = [for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...listDouble];
+  var set83 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else 3.14, null};
+  var map83 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else "bar": 3.14, "baz": null};
+  List<int> list90 = [for (int i = 0; oracle("foo"); i++) dynVar];
+  Set<int> set90 = {for (int i = 0; oracle("foo"); i++) dynVar, null};
+  Map<String, int> map90 = {for (int i = 0; oracle("foo"); i++) "bar": dynVar, "baz": null};
+  List<int> list91 = [for (int i = 0; oracle("foo"); i++) ...dynVar];
+  Set<int> set91 = {for (int i = 0; oracle("foo"); i++) ...dynVar, null};
+  Map<String, int> map91 = {for (int i = 0; oracle("foo"); i++) ...dynVar, "baz": null};
+  List<int> list100 = <int>[for (index = 0; oracle("foo"); index++) 42];
+  Set<int> set100 = <int>{for (index = 0; oracle("foo"); index++) 42};
+  Map<String, int> map100 = <String, int>{for (index = 0; oracle("foo"); index++) "bar": 42};
+  var list110 = [for (var i in [1, 2, 3]) i];
+  var set110 = {for (var i in [1, 2, 3]) i, null};
+  var map110 = {for (var i in [1, 2, 3]) "bar": i, "baz": null};
+  List<int> list120 = [for (var i in dynVar) i];
+  Set<int> set120 = {for (var i in dynVar) i, null};
+  Map<String, int> map120 = {for (var i in dynVar) "bar": i, "baz": null};
+  List<int> list130 = [for (var i = 1; i < 2; i++) i];
+  Set<int> set130 = {for (var i = 1; i < 2; i++) i};
+  Map<int, int> map130 = {for (var i = 1; i < 2; i++) i: i};
+}
+
+testForElementErrors(Map<int, int> map, List<int> list) async {
+  <int>[for (int i = 0; oracle("foo"); i++) "bar"];
+  <int>{for (int i = 0; oracle("foo"); i++) "bar", null};
+  <int, int>{for (int i = 0; oracle("foo"); i++) "bar": "bar", "baz": null};
+  <int>[for (int i = 0; oracle("foo"); i++) ...["bar"]];
+  <int>{for (int i = 0; oracle("foo"); i++) ...["bar"], null};
+  <int, int>{for (int i = 0; oracle("foo"); i++) ...{"bar": "bar"}, "baz": null};
+  <int>[for (int i = 0; oracle("foo"); i++) ...map];
+  <int>{for (int i = 0; oracle("foo"); i++) ...map, null};
+  <int, int>{for (int i = 0; oracle("foo"); i++) ...list, 42: null};
+  <String>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14];
+  <String>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14, null};
+  <String, String>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else "bar": 3.14, "baz": null};
+  <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42];
+  <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42, null};
+  <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...list else "bar": 42, "baz": null};
+  <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map];
+  <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map, null};
+  <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else ...list, "baz": null};
+
+  final i = 0;
+  <int>[for (i in <int>[1]) i];
+  <int>{for (i in <int>[1]) i, null};
+	<String, int>{for (i in <int>[1]) "bar": i, "baz": null};
+
+  var list10 = [for (var i in "not iterable") i];
+  var set10 = {for (var i in "not iterable") i, null};
+  var map10 = {for (var i in "not iterable") "bar": i, "baz": null};
+  var list20 = [for (int i in ["not", "int"]) i];
+  var set20 = {for (int i in ["not", "int"]) i, null};
+  var map20 = {for (int i in ["not", "int"]) "bar": i, "baz": null};
+  var list30 = [await for (var i in "not stream") i];
+  var set30 = {await for (var i in "not stream") i, null};
+  var map30 = {await for (var i in "not stream") "bar": i, "baz": null};
+  var list40 = [await for (int i in Stream.fromIterable(["not", "int"])) i];
+  var set40 = {await for (int i in Stream.fromIterable(["not", "int"])) i, null};
+  var map40 = {await for (int i in Stream.fromIterable(["not", "int"])) "bar": i, "baz": null};
+  var list50 = [await for (;;) 42];
+  var set50 = {await for (;;) 42, null};
+  var map50 = {await for (;;) "bar": 42, "baz": null};
+  var list60 = [for (; "not bool";) 42];
+  var set60 = {for (; "not bool";) 42, null};
+  var map60 = {for (; "not bool";) "bar": 42, "baz": null};
+}
+
+testForElementErrorsNotAsync(Stream<int> stream) {
+  <int>[await for (int i in stream) i];
+  <int>{await for (int i in stream) i};
+  <String, int>{await for (int i in stream) "bar": i};
+}
+
+class A {}
+
+class B extends A {
+  int get foo => 42;
+}
+
+testPromotion(A a) {
+  List<int> list10 = [if (a is B) a.foo];
+  Set<int> set10 = {if (a is B) a.foo};
+  Map<int, int> map10 = {if (a is B) a.foo: a.foo};
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/control_flow_collection_inference.dart.hierarchy.expect b/pkg/front_end/testcases/control_flow_collection_inference.dart.hierarchy.expect
new file mode 100644
index 0000000..3a1da21
--- /dev/null
+++ b/pkg/front_end/testcases/control_flow_collection_inference.dart.hierarchy.expect
@@ -0,0 +1,55 @@
+Object:
+  superclasses:
+  interfaces:
+  classMembers:
+    Object._haveSameRuntimeType
+    Object.toString
+    Object.runtimeType
+    Object._toString
+    Object._simpleInstanceOf
+    Object._hashCodeRnd
+    Object._instanceOf
+    Object.noSuchMethod
+    Object._objectHashCode
+    Object._identityHashCode
+    Object.hashCode
+    Object._simpleInstanceOfFalse
+    Object._simpleInstanceOfTrue
+    Object.==
+  classSetters:
+
+A:
+  superclasses:
+    Object
+  interfaces:
+  classMembers:
+    Object.toString
+    Object.runtimeType
+    Object._simpleInstanceOf
+    Object._instanceOf
+    Object.noSuchMethod
+    Object._identityHashCode
+    Object.hashCode
+    Object._simpleInstanceOfFalse
+    Object._simpleInstanceOfTrue
+    Object.==
+  classSetters:
+
+B:
+  superclasses:
+    Object
+      -> A
+  interfaces:
+  classMembers:
+    Object.toString
+    Object.runtimeType
+    Object._simpleInstanceOf
+    Object._instanceOf
+    B.foo
+    Object.noSuchMethod
+    Object._identityHashCode
+    Object.hashCode
+    Object._simpleInstanceOfFalse
+    Object._simpleInstanceOfTrue
+    Object.==
+  classSetters:
diff --git a/pkg/front_end/testcases/control_flow_collection_inference.dart.legacy.expect b/pkg/front_end/testcases/control_flow_collection_inference.dart.legacy.expect
new file mode 100644
index 0000000..ffd86f8
--- /dev/null
+++ b/pkg/front_end/testcases/control_flow_collection_inference.dart.legacy.expect
@@ -0,0 +1,2036 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:10:17: Error: Unexpected token 'if'.
+//   var list10 = [if (oracle("foo")) 42];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:11:16: Error: Unexpected token 'if'.
+//   var set10 = {if (oracle("foo")) 42, null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:12:16: Error: Unexpected token 'if'.
+//   var map10 = {if (oracle("foo")) "bar": 42, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:13:17: Error: Unexpected token 'if'.
+//   var list11 = [if (oracle("foo")) dynVar];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:14:16: Error: Unexpected token 'if'.
+//   var set11 = {if (oracle("foo")) dynVar, null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:15:16: Error: Unexpected token 'if'.
+//   var map11 = {if (oracle("foo")) "bar": dynVar, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:16:17: Error: Unexpected token 'if'.
+//   var list12 = [if (oracle("foo")) [42]];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:17:16: Error: Unexpected token 'if'.
+//   var set12 = {if (oracle("foo")) [42], null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:18:16: Error: Unexpected token 'if'.
+//   var map12 = {if (oracle("foo")) "bar": [42], "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:19:36: Error: Unexpected token '...'.
+//   var list20 = [if (oracle("foo")) ...[42]];
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:19:17: Error: Unexpected token 'if'.
+//   var list20 = [if (oracle("foo")) ...[42]];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:20:35: Error: Unexpected token '...'.
+//   var set20 = {if (oracle("foo")) ...[42], null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:20:16: Error: Unexpected token 'if'.
+//   var set20 = {if (oracle("foo")) ...[42], null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:21:35: Error: Unexpected token '...'.
+//   var map20 = {if (oracle("foo")) ...{"bar": 42}, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:21:16: Error: Unexpected token 'if'.
+//   var map20 = {if (oracle("foo")) ...{"bar": 42}, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:22:36: Error: Unexpected token '...'.
+//   var list21 = [if (oracle("foo")) ...[dynVar]];
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:22:17: Error: Unexpected token 'if'.
+//   var list21 = [if (oracle("foo")) ...[dynVar]];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:23:35: Error: Unexpected token '...'.
+//   var set21 = {if (oracle("foo")) ...[dynVar], null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:23:16: Error: Unexpected token 'if'.
+//   var set21 = {if (oracle("foo")) ...[dynVar], null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:24:35: Error: Unexpected token '...'.
+//   var map21 = {if (oracle("foo")) ...{"bar": dynVar}, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:24:16: Error: Unexpected token 'if'.
+//   var map21 = {if (oracle("foo")) ...{"bar": dynVar}, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:25:36: Error: Unexpected token '...'.
+//   var list22 = [if (oracle("foo")) ...[[42]]];
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:25:17: Error: Unexpected token 'if'.
+//   var list22 = [if (oracle("foo")) ...[[42]]];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:26:35: Error: Unexpected token '...'.
+//   var set22 = {if (oracle("foo")) ...[[42]], null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:26:16: Error: Unexpected token 'if'.
+//   var set22 = {if (oracle("foo")) ...[[42]], null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:27:35: Error: Unexpected token '...'.
+//   var map22 = {if (oracle("foo")) ...{"bar": [42]}, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:27:16: Error: Unexpected token 'if'.
+//   var map22 = {if (oracle("foo")) ...{"bar": [42]}, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:28:50: Error: Unexpected token '...'.
+//   var list30 = [if (oracle("foo")) if (oracle()) ...[42]];
+//                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:28:36: Error: Unexpected token 'if'.
+//   var list30 = [if (oracle("foo")) if (oracle()) ...[42]];
+//                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:28:17: Error: Unexpected token 'if'.
+//   var list30 = [if (oracle("foo")) if (oracle()) ...[42]];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:29:49: Error: Unexpected token '...'.
+//   var set30 = {if (oracle("foo")) if (oracle()) ...[42], null};
+//                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:29:35: Error: Unexpected token 'if'.
+//   var set30 = {if (oracle("foo")) if (oracle()) ...[42], null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:29:16: Error: Unexpected token 'if'.
+//   var set30 = {if (oracle("foo")) if (oracle()) ...[42], null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:30:49: Error: Unexpected token '...'.
+//   var map30 = {if (oracle("foo")) if (oracle()) ...{"bar": 42}, "baz": null};
+//                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:30:35: Error: Unexpected token 'if'.
+//   var map30 = {if (oracle("foo")) if (oracle()) ...{"bar": 42}, "baz": null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:30:16: Error: Unexpected token 'if'.
+//   var map30 = {if (oracle("foo")) if (oracle()) ...{"bar": 42}, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:31:50: Error: Unexpected token '...'.
+//   var list31 = [if (oracle("foo")) if (oracle()) ...[dynVar]];
+//                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:31:36: Error: Unexpected token 'if'.
+//   var list31 = [if (oracle("foo")) if (oracle()) ...[dynVar]];
+//                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:31:17: Error: Unexpected token 'if'.
+//   var list31 = [if (oracle("foo")) if (oracle()) ...[dynVar]];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:32:49: Error: Unexpected token '...'.
+//   var set31 = {if (oracle("foo")) if (oracle()) ...[dynVar], null};
+//                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:32:35: Error: Unexpected token 'if'.
+//   var set31 = {if (oracle("foo")) if (oracle()) ...[dynVar], null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:32:16: Error: Unexpected token 'if'.
+//   var set31 = {if (oracle("foo")) if (oracle()) ...[dynVar], null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:33:49: Error: Unexpected token '...'.
+//   var map31 = {if (oracle("foo")) if (oracle()) ...{"bar": dynVar}, "baz": null};
+//                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:33:35: Error: Unexpected token 'if'.
+//   var map31 = {if (oracle("foo")) if (oracle()) ...{"bar": dynVar}, "baz": null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:33:16: Error: Unexpected token 'if'.
+//   var map31 = {if (oracle("foo")) if (oracle()) ...{"bar": dynVar}, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:34:50: Error: Unexpected token '...'.
+//   var list33 = [if (oracle("foo")) if (oracle()) ...[[42]]];
+//                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:34:36: Error: Unexpected token 'if'.
+//   var list33 = [if (oracle("foo")) if (oracle()) ...[[42]]];
+//                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:34:17: Error: Unexpected token 'if'.
+//   var list33 = [if (oracle("foo")) if (oracle()) ...[[42]]];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:35:49: Error: Unexpected token '...'.
+//   var set33 = {if (oracle("foo")) if (oracle()) ...[[42]], null};
+//                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:35:35: Error: Unexpected token 'if'.
+//   var set33 = {if (oracle("foo")) if (oracle()) ...[[42]], null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:35:16: Error: Unexpected token 'if'.
+//   var set33 = {if (oracle("foo")) if (oracle()) ...[[42]], null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:36:49: Error: Unexpected token '...'.
+//   var map33 = {if (oracle("foo")) if (oracle()) ...{"bar": [42]}, "baz": null};
+//                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:36:35: Error: Unexpected token 'if'.
+//   var map33 = {if (oracle("foo")) if (oracle()) ...{"bar": [42]}, "baz": null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:36:16: Error: Unexpected token 'if'.
+//   var map33 = {if (oracle("foo")) if (oracle()) ...{"bar": [42]}, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:37:48: Error: Unexpected token '...'.
+//   List<List<int>> list40 = [if (oracle("foo")) ...[[]]];
+//                                                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:37:29: Error: Unexpected token 'if'.
+//   List<List<int>> list40 = [if (oracle("foo")) ...[[]]];
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:38:46: Error: Unexpected token '...'.
+//   Set<List<int>> set40 = {if (oracle("foo")) ...[[]], null};
+//                                              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:38:27: Error: Unexpected token 'if'.
+//   Set<List<int>> set40 = {if (oracle("foo")) ...[[]], null};
+//                           ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:39:54: Error: Unexpected token '...'.
+//   Map<String, List<int>> map40 = {if (oracle("foo")) ...{"bar", []}, "baz": null};
+//                                                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:39:35: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map40 = {if (oracle("foo")) ...{"bar", []}, "baz": null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:40:48: Error: Unexpected token '...'.
+//   List<List<int>> list41 = [if (oracle("foo")) ...{[]}];
+//                                                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:40:29: Error: Unexpected token 'if'.
+//   List<List<int>> list41 = [if (oracle("foo")) ...{[]}];
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:41:46: Error: Unexpected token '...'.
+//   Set<List<int>> set41 = {if (oracle("foo")) ...{[]}, null};
+//                                              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:41:27: Error: Unexpected token 'if'.
+//   Set<List<int>> set41 = {if (oracle("foo")) ...{[]}, null};
+//                           ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:42:62: Error: Unexpected token '...'.
+//   List<List<int>> list42 = [if (oracle("foo")) if (oracle()) ...[[]]];
+//                                                              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:42:48: Error: Unexpected token 'if'.
+//   List<List<int>> list42 = [if (oracle("foo")) if (oracle()) ...[[]]];
+//                                                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:42:29: Error: Unexpected token 'if'.
+//   List<List<int>> list42 = [if (oracle("foo")) if (oracle()) ...[[]]];
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:43:60: Error: Unexpected token '...'.
+//   Set<List<int>> set42 = {if (oracle("foo")) if (oracle()) ...[[]], null};
+//                                                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:43:46: Error: Unexpected token 'if'.
+//   Set<List<int>> set42 = {if (oracle("foo")) if (oracle()) ...[[]], null};
+//                                              ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:43:27: Error: Unexpected token 'if'.
+//   Set<List<int>> set42 = {if (oracle("foo")) if (oracle()) ...[[]], null};
+//                           ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:44:68: Error: Unexpected token '...'.
+//   Map<String, List<int>> map42 = {if (oracle("foo")) if (oracle()) ...{"bar": []}, "baz": null};
+//                                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:44:54: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map42 = {if (oracle("foo")) if (oracle()) ...{"bar": []}, "baz": null};
+//                                                      ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:44:35: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map42 = {if (oracle("foo")) if (oracle()) ...{"bar": []}, "baz": null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:45:42: Error: Unexpected token '...'.
+//   List<int> list50 = [if (oracle("foo")) ...[]];
+//                                          ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:45:23: Error: Unexpected token 'if'.
+//   List<int> list50 = [if (oracle("foo")) ...[]];
+//                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:46:40: Error: Unexpected token '...'.
+//   Set<int> set50 = {if (oracle("foo")) ...[], null};
+//                                        ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:46:21: Error: Unexpected token 'if'.
+//   Set<int> set50 = {if (oracle("foo")) ...[], null};
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:47:48: Error: Unexpected token '...'.
+//   Map<String, int> map50 = {if (oracle("foo")) ...{}, "baz": null};
+//                                                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:47:29: Error: Unexpected token 'if'.
+//   Map<String, int> map50 = {if (oracle("foo")) ...{}, "baz": null};
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:48:42: Error: Unexpected token '...'.
+//   List<int> list51 = [if (oracle("foo")) ...{}];
+//                                          ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:48:23: Error: Unexpected token 'if'.
+//   List<int> list51 = [if (oracle("foo")) ...{}];
+//                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:49:40: Error: Unexpected token '...'.
+//   Set<int> set51 = {if (oracle("foo")) ...{}, null};
+//                                        ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:49:21: Error: Unexpected token 'if'.
+//   Set<int> set51 = {if (oracle("foo")) ...{}, null};
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:50:56: Error: Unexpected token '...'.
+//   List<int> list52 = [if (oracle("foo")) if (oracle()) ...[]];
+//                                                        ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:50:42: Error: Unexpected token 'if'.
+//   List<int> list52 = [if (oracle("foo")) if (oracle()) ...[]];
+//                                          ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:50:23: Error: Unexpected token 'if'.
+//   List<int> list52 = [if (oracle("foo")) if (oracle()) ...[]];
+//                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:51:54: Error: Unexpected token '...'.
+//   Set<int> set52 = {if (oracle("foo")) if (oracle()) ...[], null};
+//                                                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:51:40: Error: Unexpected token 'if'.
+//   Set<int> set52 = {if (oracle("foo")) if (oracle()) ...[], null};
+//                                        ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:51:21: Error: Unexpected token 'if'.
+//   Set<int> set52 = {if (oracle("foo")) if (oracle()) ...[], null};
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:52:62: Error: Unexpected token '...'.
+//   Map<String, int> map52 = {if (oracle("foo")) if (oracle()) ...{}, "baz": null};
+//                                                              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:52:48: Error: Unexpected token 'if'.
+//   Map<String, int> map52 = {if (oracle("foo")) if (oracle()) ...{}, "baz": null};
+//                                                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:52:29: Error: Unexpected token 'if'.
+//   Map<String, int> map52 = {if (oracle("foo")) if (oracle()) ...{}, "baz": null};
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:53:48: Error: Unexpected token '...'.
+//   List<List<int>> list60 = [if (oracle("foo")) ...[[]]];
+//                                                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:53:29: Error: Unexpected token 'if'.
+//   List<List<int>> list60 = [if (oracle("foo")) ...[[]]];
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:54:46: Error: Unexpected token '...'.
+//   Set<List<int>> set60 = {if (oracle("foo")) ...[[]], null};
+//                                              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:54:27: Error: Unexpected token 'if'.
+//   Set<List<int>> set60 = {if (oracle("foo")) ...[[]], null};
+//                           ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:55:54: Error: Unexpected token '...'.
+//   Map<String, List<int>> map60 = {if (oracle("foo")) ...{"bar": []}, "baz": null};
+//                                                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:55:35: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map60 = {if (oracle("foo")) ...{"bar": []}, "baz": null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:56:62: Error: Unexpected token '...'.
+//   List<List<int>> list61 = [if (oracle("foo")) if (oracle()) ...[[]]];
+//                                                              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:56:48: Error: Unexpected token 'if'.
+//   List<List<int>> list61 = [if (oracle("foo")) if (oracle()) ...[[]]];
+//                                                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:56:29: Error: Unexpected token 'if'.
+//   List<List<int>> list61 = [if (oracle("foo")) if (oracle()) ...[[]]];
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:57:60: Error: Unexpected token '...'.
+//   Set<List<int>> set61 = {if (oracle("foo")) if (oracle()) ...[[]], null};
+//                                                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:57:46: Error: Unexpected token 'if'.
+//   Set<List<int>> set61 = {if (oracle("foo")) if (oracle()) ...[[]], null};
+//                                              ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:57:27: Error: Unexpected token 'if'.
+//   Set<List<int>> set61 = {if (oracle("foo")) if (oracle()) ...[[]], null};
+//                           ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:58:68: Error: Unexpected token '...'.
+//   Map<String, List<int>> map61 = {if (oracle("foo")) if (oracle()) ...{"bar": []}, "baz": null};
+//                                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:58:54: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map61 = {if (oracle("foo")) if (oracle()) ...{"bar": []}, "baz": null};
+//                                                      ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:58:35: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map61 = {if (oracle("foo")) if (oracle()) ...{"bar": []}, "baz": null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:59:29: Error: Unexpected token 'if'.
+//   List<List<int>> list70 = [if (oracle("foo")) []];
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:60:27: Error: Unexpected token 'if'.
+//   Set<List<int>> set70 = {if (oracle("foo")) [], null};
+//                           ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:61:48: Error: Unexpected token 'if'.
+//   List<List<int>> list71 = [if (oracle("foo")) if (oracle()) []];
+//                                                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:61:29: Error: Unexpected token 'if'.
+//   List<List<int>> list71 = [if (oracle("foo")) if (oracle()) []];
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:62:46: Error: Unexpected token 'if'.
+//   Set<List<int>> set71 = {if (oracle("foo")) if (oracle()) [], null};
+//                                              ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:62:27: Error: Unexpected token 'if'.
+//   Set<List<int>> set71 = {if (oracle("foo")) if (oracle()) [], null};
+//                           ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:63:17: Error: Unexpected token 'if'.
+//   var list80 = [if (oracle("foo")) 42 else 3.14];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:64:16: Error: Unexpected token 'if'.
+//   var set80 = {if (oracle("foo")) 42 else 3.14, null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:65:16: Error: Unexpected token 'if'.
+//   var map80 = {if (oracle("foo")) "bar": 42 else "bar": 3.14, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:66:36: Error: Unexpected token '...'.
+//   var list81 = [if (oracle("foo")) ...listInt else ...listDouble];
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:66:52: Error: Unexpected token '...'.
+//   var list81 = [if (oracle("foo")) ...listInt else ...listDouble];
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:66:17: Error: Unexpected token 'if'.
+//   var list81 = [if (oracle("foo")) ...listInt else ...listDouble];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:67:35: Error: Unexpected token '...'.
+//   var set81 = {if (oracle("foo")) ...listInt else ...listDouble, null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:67:51: Error: Unexpected token '...'.
+//   var set81 = {if (oracle("foo")) ...listInt else ...listDouble, null};
+//                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:67:16: Error: Unexpected token 'if'.
+//   var set81 = {if (oracle("foo")) ...listInt else ...listDouble, null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:68:35: Error: Unexpected token '...'.
+//   var map81 = {if (oracle("foo")) ...mapToInt else ...mapToDouble, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:68:52: Error: Unexpected token '...'.
+//   var map81 = {if (oracle("foo")) ...mapToInt else ...mapToDouble, "baz": null};
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:68:16: Error: Unexpected token 'if'.
+//   var map81 = {if (oracle("foo")) ...mapToInt else ...mapToDouble, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:69:36: Error: Unexpected token '...'.
+//   var list82 = [if (oracle("foo")) ...listInt else ...dynVar];
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:69:52: Error: Unexpected token '...'.
+//   var list82 = [if (oracle("foo")) ...listInt else ...dynVar];
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:69:17: Error: Unexpected token 'if'.
+//   var list82 = [if (oracle("foo")) ...listInt else ...dynVar];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:70:35: Error: Unexpected token '...'.
+//   var set82 = {if (oracle("foo")) ...listInt else ...dynVar, null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:70:51: Error: Unexpected token '...'.
+//   var set82 = {if (oracle("foo")) ...listInt else ...dynVar, null};
+//                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:70:16: Error: Unexpected token 'if'.
+//   var set82 = {if (oracle("foo")) ...listInt else ...dynVar, null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:71:35: Error: Unexpected token '...'.
+//   var map82 = {if (oracle("foo")) ...mapToInt else ...dynVar, null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:71:52: Error: Unexpected token '...'.
+//   var map82 = {if (oracle("foo")) ...mapToInt else ...dynVar, null};
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:71:16: Error: Unexpected token 'if'.
+//   var map82 = {if (oracle("foo")) ...mapToInt else ...dynVar, null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:72:44: Error: Unexpected token '...'.
+//   var list83 = [if (oracle("foo")) 42 else ...listDouble];
+//                                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:72:17: Error: Unexpected token 'if'.
+//   var list83 = [if (oracle("foo")) 42 else ...listDouble];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:73:35: Error: Unexpected token '...'.
+//   var set83 = {if (oracle("foo")) ...listInt else 3.14, null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:73:16: Error: Unexpected token 'if'.
+//   var set83 = {if (oracle("foo")) ...listInt else 3.14, null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:74:35: Error: Unexpected token '...'.
+//   var map83 = {if (oracle("foo")) ...mapToInt else "bar": 3.14, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:74:16: Error: Unexpected token 'if'.
+//   var map83 = {if (oracle("foo")) ...mapToInt else "bar": 3.14, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:75:23: Error: Unexpected token 'if'.
+//   List<int> list90 = [if (oracle("foo")) dynVar];
+//                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:76:21: Error: Unexpected token 'if'.
+//   Set<int> set90 = {if (oracle("foo")) dynVar, null};
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:77:29: Error: Unexpected token 'if'.
+//   Map<String, int> map90 = {if (oracle("foo")) "bar": dynVar, "baz": null};
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:78:42: Error: Unexpected token '...'.
+//   List<int> list91 = [if (oracle("foo")) ...dynVar];
+//                                          ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:78:23: Error: Unexpected token 'if'.
+//   List<int> list91 = [if (oracle("foo")) ...dynVar];
+//                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:79:40: Error: Unexpected token '...'.
+//   Set<int> set91 = {if (oracle("foo")) ...dynVar, null};
+//                                        ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:79:21: Error: Unexpected token 'if'.
+//   Set<int> set91 = {if (oracle("foo")) ...dynVar, null};
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:80:48: Error: Unexpected token '...'.
+//   Map<String, int> map91 = {if (oracle("foo")) ...dynVar, "baz": null};
+//                                                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:80:29: Error: Unexpected token 'if'.
+//   Map<String, int> map91 = {if (oracle("foo")) ...dynVar, "baz": null};
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:81:24: Error: Unexpected token 'if'.
+//   List<int> list100 = [if (dynVar) 42];
+//                        ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:82:22: Error: Unexpected token 'if'.
+//   Set<int> set100 = {if (dynVar) 42};
+//                      ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:83:27: Error: Unexpected token 'if'.
+//   Map<int, int> map100 = {if (dynVar) 42: 42};
+//                           ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:87:9: Error: Unexpected token 'if'.
+//   <int>[if (oracle("foo")) "bar"];
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:88:9: Error: Unexpected token 'if'.
+//   <int>{if (oracle("foo")) "bar", null};
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:89:17: Error: Unexpected token 'if'.
+//   <String, int>{if (oracle("foo")) "bar": "bar", "baz": null};
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:90:28: Error: Unexpected token '...'.
+//   <int>[if (oracle("foo")) ...["bar"]];
+//                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:90:9: Error: Unexpected token 'if'.
+//   <int>[if (oracle("foo")) ...["bar"]];
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:91:28: Error: Unexpected token '...'.
+//   <int>{if (oracle("foo")) ...["bar"], null};
+//                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:91:9: Error: Unexpected token 'if'.
+//   <int>{if (oracle("foo")) ...["bar"], null};
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:92:36: Error: Unexpected token '...'.
+//   <String, int>{if (oracle("foo")) ...{"bar": "bar"}, "baz": null};
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:92:17: Error: Unexpected token 'if'.
+//   <String, int>{if (oracle("foo")) ...{"bar": "bar"}, "baz": null};
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:93:28: Error: Unexpected token '...'.
+//   <int>[if (oracle("foo")) ...map];
+//                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:93:9: Error: Unexpected token 'if'.
+//   <int>[if (oracle("foo")) ...map];
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:94:28: Error: Unexpected token '...'.
+//   <int>{if (oracle("foo")) ...map, null};
+//                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:94:9: Error: Unexpected token 'if'.
+//   <int>{if (oracle("foo")) ...map, null};
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:95:36: Error: Unexpected token '...'.
+//   <String, int>{if (oracle("foo")) ...["bar"], "baz": null};
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:95:17: Error: Unexpected token 'if'.
+//   <String, int>{if (oracle("foo")) ...["bar"], "baz": null};
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:96:12: Error: Unexpected token 'if'.
+//   <String>[if (oracle("foo")) 42 else 3.14];
+//            ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:97:12: Error: Unexpected token 'if'.
+//   <String>{if (oracle("foo")) 42 else 3.14, null};
+//            ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:98:20: Error: Unexpected token 'if'.
+//   <String, String>{if (oracle("foo")) "bar": 42 else "baz": 3.14, "baz": null};
+//                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:99:28: Error: Unexpected token '...'.
+//   <int>[if (oracle("foo")) ...map else 42];
+//                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:99:9: Error: Unexpected token 'if'.
+//   <int>[if (oracle("foo")) ...map else 42];
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:100:28: Error: Unexpected token '...'.
+//   <int>{if (oracle("foo")) ...map else 42, null};
+//                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:100:9: Error: Unexpected token 'if'.
+//   <int>{if (oracle("foo")) ...map else 42, null};
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:101:36: Error: Unexpected token '...'.
+//   <String, int>{if (oracle("foo")) ...[42] else "bar": 42, "baz": null};
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:101:17: Error: Unexpected token 'if'.
+//   <String, int>{if (oracle("foo")) ...[42] else "bar": 42, "baz": null};
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:102:36: Error: Unexpected token '...'.
+//   <int>[if (oracle("foo")) 42 else ...map];
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:102:9: Error: Unexpected token 'if'.
+//   <int>[if (oracle("foo")) 42 else ...map];
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:103:28: Error: Unexpected token '...'.
+//   <int>{if (oracle("foo")) ...map else 42, null};
+//                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:103:9: Error: Unexpected token 'if'.
+//   <int>{if (oracle("foo")) ...map else 42, null};
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:104:51: Error: Unexpected token '...'.
+//   <String, int>{if (oracle("foo")) "bar": 42 else ...[42], "baz": null};
+//                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:104:17: Error: Unexpected token 'if'.
+//   <String, int>{if (oracle("foo")) "bar": 42 else ...[42], "baz": null};
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:106:25: Error: Unexpected token 'if'.
+//   Set<dynamic> set10 = {if (oracle("foo")) 42 else "bar": 3.14};
+//                         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:107:34: Error: Unexpected token 'if'.
+//   Map<dynamic, dynamic> map10 = {if (oracle("foo")) 42 else "bar": 3.14};
+//                                  ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:108:25: Error: Unexpected token 'if'.
+//   Set<dynamic> set11 = {if (oracle("foo")) "bar": 3.14 else 42};
+//                         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:109:34: Error: Unexpected token 'if'.
+//   Map<dynamic, dynamic> map11 = {if (oracle("foo")) "bar": 3.14 else 42};
+//                                  ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:110:16: Error: Unexpected token 'if'.
+//   var map12 = {if (oracle("foo")) 42 else "bar": 3.14};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:111:16: Error: Unexpected token 'if'.
+//   var map13 = {if (oracle("foo")) "bar": 3.14 else 42};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:112:23: Error: Unexpected token 'if'.
+//   List<int> list20 = [if (42) 42];
+//                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:113:21: Error: Unexpected token 'if'.
+//   Set<int> set20 = {if (42) 42};
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:114:26: Error: Unexpected token 'if'.
+//   Map<int, int> map30 = {if (42) 42: 42};
+//                          ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:115:34: Error: Unexpected token 'if'.
+//   List<String> list40 = <String>[if (oracle("foo")) true else 42];
+//                                  ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:116:32: Error: Unexpected token 'if'.
+//   Set<String> set40 = <String>{if (oracle("foo")) true else 42};
+//                                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:117:42: Error: Unexpected token 'if'.
+//   Map<String, int> map40 = <String, int>{if (oracle("foo")) true: 42 else 42: 42};
+//                                          ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:118:42: Error: Unexpected token 'if'.
+//   Map<int, String> map41 = <int, String>{if (oracle("foo")) 42: true else 42: 42};
+//                                          ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:123:17: Error: Unexpected token 'for'.
+//   var list10 = [for (int i = 0; oracle("foo"); i++) 42];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:124:16: Error: Unexpected token 'for'.
+//   var set10 = {for (int i = 0; oracle("foo"); i++) 42, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:125:16: Error: Unexpected token 'for'.
+//   var map10 = {for (int i = 0; oracle("foo"); i++) "bar": 42, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:126:17: Error: Unexpected token 'for'.
+//   var list11 = [for (int i = 0; oracle("foo"); i++) dynVar];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:127:16: Error: Unexpected token 'for'.
+//   var set11 = {for (int i = 0; oracle("foo"); i++) dynVar, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:128:16: Error: Unexpected token 'for'.
+//   var map11 = {for (int i = 0; oracle("foo"); i++) "bar": dynVar, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:129:17: Error: Unexpected token 'for'.
+//   var list12 = [for (int i = 0; oracle("foo"); i++) [42]];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:130:16: Error: Unexpected token 'for'.
+//   var set12 = {for (int i = 0; oracle("foo"); i++) [42], null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:131:16: Error: Unexpected token 'for'.
+//   var map12 = {for (int i = 0; oracle("foo"); i++) "bar": [42], "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:132:53: Error: Unexpected token '...'.
+//   var list20 = [for (int i = 0; oracle("foo"); i++) ...[42]];
+//                                                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:132:17: Error: Unexpected token 'for'.
+//   var list20 = [for (int i = 0; oracle("foo"); i++) ...[42]];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:133:52: Error: Unexpected token '...'.
+//   var set20 = {for (int i = 0; oracle("foo"); i++) ...[42], null};
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:133:16: Error: Unexpected token 'for'.
+//   var set20 = {for (int i = 0; oracle("foo"); i++) ...[42], null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:134:52: Error: Unexpected token '...'.
+//   var map20 = {for (int i = 0; oracle("foo"); i++) ...{"bar": 42}, "baz": null};
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:134:16: Error: Unexpected token 'for'.
+//   var map20 = {for (int i = 0; oracle("foo"); i++) ...{"bar": 42}, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:135:53: Error: Unexpected token '...'.
+//   var list21 = [for (int i = 0; oracle("foo"); i++) ...[dynVar]];
+//                                                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:135:17: Error: Unexpected token 'for'.
+//   var list21 = [for (int i = 0; oracle("foo"); i++) ...[dynVar]];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:136:52: Error: Unexpected token '...'.
+//   var set21 = {for (int i = 0; oracle("foo"); i++) ...[dynVar], null};
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:136:16: Error: Unexpected token 'for'.
+//   var set21 = {for (int i = 0; oracle("foo"); i++) ...[dynVar], null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:137:52: Error: Unexpected token '...'.
+//   var map21 = {for (int i = 0; oracle("foo"); i++) ...{"bar": dynVar}, "baz": null};
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:137:16: Error: Unexpected token 'for'.
+//   var map21 = {for (int i = 0; oracle("foo"); i++) ...{"bar": dynVar}, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:138:53: Error: Unexpected token '...'.
+//   var list22 = [for (int i = 0; oracle("foo"); i++) ...[[42]]];
+//                                                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:138:17: Error: Unexpected token 'for'.
+//   var list22 = [for (int i = 0; oracle("foo"); i++) ...[[42]]];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:139:52: Error: Unexpected token '...'.
+//   var set22 = {for (int i = 0; oracle("foo"); i++) ...[[42]], null};
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:139:16: Error: Unexpected token 'for'.
+//   var set22 = {for (int i = 0; oracle("foo"); i++) ...[[42]], null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:140:52: Error: Unexpected token '...'.
+//   var map22 = {for (int i = 0; oracle("foo"); i++) ...{"bar": [42]}, "baz": null};
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:140:16: Error: Unexpected token 'for'.
+//   var map22 = {for (int i = 0; oracle("foo"); i++) ...{"bar": [42]}, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:141:67: Error: Unexpected token '...'.
+//   var list30 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[42]];
+//                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:141:53: Error: Unexpected token 'if'.
+//   var list30 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[42]];
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:141:17: Error: Unexpected token 'for'.
+//   var list30 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[42]];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:142:66: Error: Unexpected token '...'.
+//   var set30 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[42], null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:142:52: Error: Unexpected token 'if'.
+//   var set30 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[42], null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:142:16: Error: Unexpected token 'for'.
+//   var set30 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[42], null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:143:66: Error: Unexpected token '...'.
+//   var map30 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": 42}, "baz": null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:143:52: Error: Unexpected token 'if'.
+//   var map30 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": 42}, "baz": null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:143:16: Error: Unexpected token 'for'.
+//   var map30 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": 42}, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:144:67: Error: Unexpected token '...'.
+//   var list31 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[dynVar]];
+//                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:144:53: Error: Unexpected token 'if'.
+//   var list31 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[dynVar]];
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:144:17: Error: Unexpected token 'for'.
+//   var list31 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[dynVar]];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:145:66: Error: Unexpected token '...'.
+//   var set31 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[dynVar], null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:145:52: Error: Unexpected token 'if'.
+//   var set31 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[dynVar], null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:145:16: Error: Unexpected token 'for'.
+//   var set31 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[dynVar], null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:146:66: Error: Unexpected token '...'.
+//   var map31 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": dynVar}, "baz": null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:146:52: Error: Unexpected token 'if'.
+//   var map31 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": dynVar}, "baz": null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:146:16: Error: Unexpected token 'for'.
+//   var map31 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": dynVar}, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:147:67: Error: Unexpected token '...'.
+//   var list33 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[42]]];
+//                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:147:53: Error: Unexpected token 'if'.
+//   var list33 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[42]]];
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:147:17: Error: Unexpected token 'for'.
+//   var list33 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[42]]];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:148:66: Error: Unexpected token '...'.
+//   var set33 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[42]], null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:148:52: Error: Unexpected token 'if'.
+//   var set33 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[42]], null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:148:16: Error: Unexpected token 'for'.
+//   var set33 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[42]], null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:149:66: Error: Unexpected token '...'.
+//   var map33 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": [42]}, "baz": null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:149:52: Error: Unexpected token 'if'.
+//   var map33 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": [42]}, "baz": null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:149:16: Error: Unexpected token 'for'.
+//   var map33 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": [42]}, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:150:65: Error: Unexpected token '...'.
+//   List<List<int>> list40 = [for (int i = 0; oracle("foo"); i++) ...[[]]];
+//                                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:150:29: Error: Unexpected token 'for'.
+//   List<List<int>> list40 = [for (int i = 0; oracle("foo"); i++) ...[[]]];
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:151:63: Error: Unexpected token '...'.
+//   Set<List<int>> set40 = {for (int i = 0; oracle("foo"); i++) ...[[]], null};
+//                                                               ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:151:27: Error: Unexpected token 'for'.
+//   Set<List<int>> set40 = {for (int i = 0; oracle("foo"); i++) ...[[]], null};
+//                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:152:71: Error: Unexpected token '...'.
+//   Map<String, List<int>> map40 = {for (int i = 0; oracle("foo"); i++) ...{"bar": []}, "baz": null};
+//                                                                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:152:35: Error: Unexpected token 'for'.
+//   Map<String, List<int>> map40 = {for (int i = 0; oracle("foo"); i++) ...{"bar": []}, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:153:65: Error: Unexpected token '...'.
+//   List<List<int>> list41 = [for (int i = 0; oracle("foo"); i++) ...{[]}];
+//                                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:153:29: Error: Unexpected token 'for'.
+//   List<List<int>> list41 = [for (int i = 0; oracle("foo"); i++) ...{[]}];
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:154:63: Error: Unexpected token '...'.
+//   Set<List<int>> set41 = {for (int i = 0; oracle("foo"); i++) ...{[]}, null};
+//                                                               ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:154:27: Error: Unexpected token 'for'.
+//   Set<List<int>> set41 = {for (int i = 0; oracle("foo"); i++) ...{[]}, null};
+//                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:155:79: Error: Unexpected token '...'.
+//   List<List<int>> list42 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]]];
+//                                                                               ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:155:65: Error: Unexpected token 'if'.
+//   List<List<int>> list42 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]]];
+//                                                                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:155:29: Error: Unexpected token 'for'.
+//   List<List<int>> list42 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]]];
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:156:77: Error: Unexpected token '...'.
+//   Set<List<int>> set42 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]], null};
+//                                                                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:156:63: Error: Unexpected token 'if'.
+//   Set<List<int>> set42 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]], null};
+//                                                               ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:156:27: Error: Unexpected token 'for'.
+//   Set<List<int>> set42 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]], null};
+//                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:157:85: Error: Unexpected token '...'.
+//   Map<String, List<int>> map42 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": []}, "baz": null};
+//                                                                                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:157:71: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map42 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": []}, "baz": null};
+//                                                                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:157:35: Error: Unexpected token 'for'.
+//   Map<String, List<int>> map42 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": []}, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:158:59: Error: Unexpected token '...'.
+//   List<int> list50 = [for (int i = 0; oracle("foo"); i++) ...[]];
+//                                                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:158:23: Error: Unexpected token 'for'.
+//   List<int> list50 = [for (int i = 0; oracle("foo"); i++) ...[]];
+//                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:159:57: Error: Unexpected token '...'.
+//   Set<int> set50 = {for (int i = 0; oracle("foo"); i++) ...[], null};
+//                                                         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:159:21: Error: Unexpected token 'for'.
+//   Set<int> set50 = {for (int i = 0; oracle("foo"); i++) ...[], null};
+//                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:160:65: Error: Unexpected token '...'.
+//   Map<String, int> map50 = {for (int i = 0; oracle("foo"); i++) ...{}, "baz": null};
+//                                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:160:29: Error: Unexpected token 'for'.
+//   Map<String, int> map50 = {for (int i = 0; oracle("foo"); i++) ...{}, "baz": null};
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:161:59: Error: Unexpected token '...'.
+//   List<int> list51 = [for (int i = 0; oracle("foo"); i++) ...{}];
+//                                                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:161:23: Error: Unexpected token 'for'.
+//   List<int> list51 = [for (int i = 0; oracle("foo"); i++) ...{}];
+//                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:162:57: Error: Unexpected token '...'.
+//   Set<int> set51 = {for (int i = 0; oracle("foo"); i++) ...{}, null};
+//                                                         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:162:21: Error: Unexpected token 'for'.
+//   Set<int> set51 = {for (int i = 0; oracle("foo"); i++) ...{}, null};
+//                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:163:73: Error: Unexpected token '...'.
+//   List<int> list52 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[]];
+//                                                                         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:163:59: Error: Unexpected token 'if'.
+//   List<int> list52 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[]];
+//                                                           ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:163:23: Error: Unexpected token 'for'.
+//   List<int> list52 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[]];
+//                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:164:71: Error: Unexpected token '...'.
+//   Set<int> set52 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[], null};
+//                                                                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:164:57: Error: Unexpected token 'if'.
+//   Set<int> set52 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[], null};
+//                                                         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:164:21: Error: Unexpected token 'for'.
+//   Set<int> set52 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[], null};
+//                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:165:65: Error: Unexpected token '...'.
+//   List<List<int>> list60 = [for (int i = 0; oracle("foo"); i++) ...[[]]];
+//                                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:165:29: Error: Unexpected token 'for'.
+//   List<List<int>> list60 = [for (int i = 0; oracle("foo"); i++) ...[[]]];
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:166:63: Error: Unexpected token '...'.
+//   Set<List<int>> set60 = {for (int i = 0; oracle("foo"); i++) ...[[]], null};
+//                                                               ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:166:27: Error: Unexpected token 'for'.
+//   Set<List<int>> set60 = {for (int i = 0; oracle("foo"); i++) ...[[]], null};
+//                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:167:71: Error: Unexpected token '...'.
+//   Map<String, List<int>> map60 = {for (int i = 0; oracle("foo"); i++) ...{"bar": []}, "baz": null};
+//                                                                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:167:35: Error: Unexpected token 'for'.
+//   Map<String, List<int>> map60 = {for (int i = 0; oracle("foo"); i++) ...{"bar": []}, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:168:79: Error: Unexpected token '...'.
+//   List<List<int>> list61 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]]];
+//                                                                               ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:168:65: Error: Unexpected token 'if'.
+//   List<List<int>> list61 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]]];
+//                                                                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:168:29: Error: Unexpected token 'for'.
+//   List<List<int>> list61 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]]];
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:169:77: Error: Unexpected token '...'.
+//   Set<List<int>> set61 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]], null};
+//                                                                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:169:63: Error: Unexpected token 'if'.
+//   Set<List<int>> set61 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]], null};
+//                                                               ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:169:27: Error: Unexpected token 'for'.
+//   Set<List<int>> set61 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]], null};
+//                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:170:85: Error: Unexpected token '...'.
+//   Map<String, List<int>> map61 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": []}, "baz": null};
+//                                                                                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:170:71: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map61 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": []}, "baz": null};
+//                                                                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:170:35: Error: Unexpected token 'for'.
+//   Map<String, List<int>> map61 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": []}, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:171:29: Error: Unexpected token 'for'.
+//   List<List<int>> list70 = [for (int i = 0; oracle("foo"); i++) []];
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:172:27: Error: Unexpected token 'for'.
+//   Set<List<int>> set70 = {for (int i = 0; oracle("foo"); i++) [], null};
+//                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:173:35: Error: Unexpected token 'for'.
+//   Map<String, List<int>> map70 = {for (int i = 0; oracle("foo"); i++) "bar": [], "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:174:65: Error: Unexpected token 'if'.
+//   List<List<int>> list71 = [for (int i = 0; oracle("foo"); i++) if (oracle()) []];
+//                                                                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:174:29: Error: Unexpected token 'for'.
+//   List<List<int>> list71 = [for (int i = 0; oracle("foo"); i++) if (oracle()) []];
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:175:63: Error: Unexpected token 'if'.
+//   Set<List<int>> set71 = {for (int i = 0; oracle("foo"); i++) if (oracle()) [], null};
+//                                                               ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:175:27: Error: Unexpected token 'for'.
+//   Set<List<int>> set71 = {for (int i = 0; oracle("foo"); i++) if (oracle()) [], null};
+//                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:176:71: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map71 = {for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": [], "baz": null};
+//                                                                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:176:35: Error: Unexpected token 'for'.
+//   Map<String, List<int>> map71 = {for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": [], "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:177:53: Error: Unexpected token 'if'.
+//   var list80 = [for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14];
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:177:17: Error: Unexpected token 'for'.
+//   var list80 = [for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:178:52: Error: Unexpected token 'if'.
+//   var set80 = {for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14, null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:178:16: Error: Unexpected token 'for'.
+//   var set80 = {for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:179:52: Error: Unexpected token 'if'.
+//   var map80 = {for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else "bar": 3.14, "baz": null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:179:16: Error: Unexpected token 'for'.
+//   var map80 = {for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else "bar": 3.14, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:180:67: Error: Unexpected token '...'.
+//   var list81 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble];
+//                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:180:83: Error: Unexpected token '...'.
+//   var list81 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble];
+//                                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:180:53: Error: Unexpected token 'if'.
+//   var list81 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble];
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:180:17: Error: Unexpected token 'for'.
+//   var list81 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:181:66: Error: Unexpected token '...'.
+//   var set81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble, null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:181:82: Error: Unexpected token '...'.
+//   var set81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble, null};
+//                                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:181:52: Error: Unexpected token 'if'.
+//   var set81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble, null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:181:16: Error: Unexpected token 'for'.
+//   var set81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:182:66: Error: Unexpected token '...'.
+//   var map81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...mapStringDouble, "baz": null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:182:87: Error: Unexpected token '...'.
+//   var map81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...mapStringDouble, "baz": null};
+//                                                                                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:182:52: Error: Unexpected token 'if'.
+//   var map81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...mapStringDouble, "baz": null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:182:16: Error: Unexpected token 'for'.
+//   var map81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...mapStringDouble, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:183:67: Error: Unexpected token '...'.
+//   var list82 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar];
+//                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:183:83: Error: Unexpected token '...'.
+//   var list82 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar];
+//                                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:183:53: Error: Unexpected token 'if'.
+//   var list82 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar];
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:183:17: Error: Unexpected token 'for'.
+//   var list82 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:184:66: Error: Unexpected token '...'.
+//   var set82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar, null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:184:82: Error: Unexpected token '...'.
+//   var set82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar, null};
+//                                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:184:52: Error: Unexpected token 'if'.
+//   var set82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar, null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:184:16: Error: Unexpected token 'for'.
+//   var set82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:185:66: Error: Unexpected token '...'.
+//   var map82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...dynVar, "baz": null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:185:87: Error: Unexpected token '...'.
+//   var map82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...dynVar, "baz": null};
+//                                                                                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:185:52: Error: Unexpected token 'if'.
+//   var map82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...dynVar, "baz": null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:185:16: Error: Unexpected token 'for'.
+//   var map82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...dynVar, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:186:75: Error: Unexpected token '...'.
+//   var list83 = [for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...listDouble];
+//                                                                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:186:53: Error: Unexpected token 'if'.
+//   var list83 = [for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...listDouble];
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:186:17: Error: Unexpected token 'for'.
+//   var list83 = [for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...listDouble];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:187:66: Error: Unexpected token '...'.
+//   var set83 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else 3.14, null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:187:52: Error: Unexpected token 'if'.
+//   var set83 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else 3.14, null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:187:16: Error: Unexpected token 'for'.
+//   var set83 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else 3.14, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:188:66: Error: Unexpected token '...'.
+//   var map83 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else "bar": 3.14, "baz": null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:188:52: Error: Unexpected token 'if'.
+//   var map83 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else "bar": 3.14, "baz": null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:188:16: Error: Unexpected token 'for'.
+//   var map83 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else "bar": 3.14, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:189:23: Error: Unexpected token 'for'.
+//   List<int> list90 = [for (int i = 0; oracle("foo"); i++) dynVar];
+//                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:190:21: Error: Unexpected token 'for'.
+//   Set<int> set90 = {for (int i = 0; oracle("foo"); i++) dynVar, null};
+//                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:191:29: Error: Unexpected token 'for'.
+//   Map<String, int> map90 = {for (int i = 0; oracle("foo"); i++) "bar": dynVar, "baz": null};
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:192:59: Error: Unexpected token '...'.
+//   List<int> list91 = [for (int i = 0; oracle("foo"); i++) ...dynVar];
+//                                                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:192:23: Error: Unexpected token 'for'.
+//   List<int> list91 = [for (int i = 0; oracle("foo"); i++) ...dynVar];
+//                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:193:57: Error: Unexpected token '...'.
+//   Set<int> set91 = {for (int i = 0; oracle("foo"); i++) ...dynVar, null};
+//                                                         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:193:21: Error: Unexpected token 'for'.
+//   Set<int> set91 = {for (int i = 0; oracle("foo"); i++) ...dynVar, null};
+//                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:194:65: Error: Unexpected token '...'.
+//   Map<String, int> map91 = {for (int i = 0; oracle("foo"); i++) ...dynVar, "baz": null};
+//                                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:194:29: Error: Unexpected token 'for'.
+//   Map<String, int> map91 = {for (int i = 0; oracle("foo"); i++) ...dynVar, "baz": null};
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:195:29: Error: Unexpected token 'for'.
+//   List<int> list100 = <int>[for (index = 0; oracle("foo"); index++) 42];
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:196:27: Error: Unexpected token 'for'.
+//   Set<int> set100 = <int>{for (index = 0; oracle("foo"); index++) 42};
+//                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:197:43: Error: Unexpected token 'for'.
+//   Map<String, int> map100 = <String, int>{for (index = 0; oracle("foo"); index++) "bar": 42};
+//                                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:198:18: Error: Unexpected token 'for'.
+//   var list110 = [for (var i in [1, 2, 3]) i];
+//                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:199:17: Error: Unexpected token 'for'.
+//   var set110 = {for (var i in [1, 2, 3]) i, null};
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:200:17: Error: Unexpected token 'for'.
+//   var map110 = {for (var i in [1, 2, 3]) "bar": i, "baz": null};
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:201:24: Error: Unexpected token 'for'.
+//   List<int> list120 = [for (var i in dynVar) i];
+//                        ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:202:22: Error: Unexpected token 'for'.
+//   Set<int> set120 = {for (var i in dynVar) i, null};
+//                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:203:30: Error: Unexpected token 'for'.
+//   Map<String, int> map120 = {for (var i in dynVar) "bar": i, "baz": null};
+//                              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:204:24: Error: Unexpected token 'for'.
+//   List<int> list130 = [for (var i = 1; i < 2; i++) i];
+//                        ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:205:22: Error: Unexpected token 'for'.
+//   Set<int> set130 = {for (var i = 1; i < 2; i++) i};
+//                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:206:27: Error: Unexpected token 'for'.
+//   Map<int, int> map130 = {for (var i = 1; i < 2; i++) i: i};
+//                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:210:9: Error: Unexpected token 'for'.
+//   <int>[for (int i = 0; oracle("foo"); i++) "bar"];
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:211:9: Error: Unexpected token 'for'.
+//   <int>{for (int i = 0; oracle("foo"); i++) "bar", null};
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:212:14: Error: Unexpected token 'for'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) "bar": "bar", "baz": null};
+//              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:213:45: Error: Unexpected token '...'.
+//   <int>[for (int i = 0; oracle("foo"); i++) ...["bar"]];
+//                                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:213:9: Error: Unexpected token 'for'.
+//   <int>[for (int i = 0; oracle("foo"); i++) ...["bar"]];
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:214:45: Error: Unexpected token '...'.
+//   <int>{for (int i = 0; oracle("foo"); i++) ...["bar"], null};
+//                                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:214:9: Error: Unexpected token 'for'.
+//   <int>{for (int i = 0; oracle("foo"); i++) ...["bar"], null};
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:215:50: Error: Unexpected token '...'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) ...{"bar": "bar"}, "baz": null};
+//                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:215:14: Error: Unexpected token 'for'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) ...{"bar": "bar"}, "baz": null};
+//              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:216:45: Error: Unexpected token '...'.
+//   <int>[for (int i = 0; oracle("foo"); i++) ...map];
+//                                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:216:9: Error: Unexpected token 'for'.
+//   <int>[for (int i = 0; oracle("foo"); i++) ...map];
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:217:45: Error: Unexpected token '...'.
+//   <int>{for (int i = 0; oracle("foo"); i++) ...map, null};
+//                                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:217:9: Error: Unexpected token 'for'.
+//   <int>{for (int i = 0; oracle("foo"); i++) ...map, null};
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:218:50: Error: Unexpected token '...'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) ...list, 42: null};
+//                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:218:14: Error: Unexpected token 'for'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) ...list, 42: null};
+//              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:219:48: Error: Unexpected token 'if'.
+//   <String>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14];
+//                                                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:219:12: Error: Unexpected token 'for'.
+//   <String>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14];
+//            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:220:48: Error: Unexpected token 'if'.
+//   <String>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14, null};
+//                                                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:220:12: Error: Unexpected token 'for'.
+//   <String>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14, null};
+//            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:221:56: Error: Unexpected token 'if'.
+//   <String, String>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else "bar": 3.14, "baz": null};
+//                                                        ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:221:20: Error: Unexpected token 'for'.
+//   <String, String>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else "bar": 3.14, "baz": null};
+//                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:222:59: Error: Unexpected token '...'.
+//   <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42];
+//                                                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:222:45: Error: Unexpected token 'if'.
+//   <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42];
+//                                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:222:9: Error: Unexpected token 'for'.
+//   <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42];
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:223:59: Error: Unexpected token '...'.
+//   <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42, null};
+//                                                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:223:45: Error: Unexpected token 'if'.
+//   <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42, null};
+//                                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:223:9: Error: Unexpected token 'for'.
+//   <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42, null};
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:224:67: Error: Unexpected token '...'.
+//   <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...list else "bar": 42, "baz": null};
+//                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:224:53: Error: Unexpected token 'if'.
+//   <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...list else "bar": 42, "baz": null};
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:224:17: Error: Unexpected token 'for'.
+//   <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...list else "bar": 42, "baz": null};
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:225:67: Error: Unexpected token '...'.
+//   <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map];
+//                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:225:45: Error: Unexpected token 'if'.
+//   <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map];
+//                                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:225:9: Error: Unexpected token 'for'.
+//   <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map];
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:226:67: Error: Unexpected token '...'.
+//   <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map, null};
+//                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:226:45: Error: Unexpected token 'if'.
+//   <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map, null};
+//                                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:226:9: Error: Unexpected token 'for'.
+//   <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map, null};
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:227:82: Error: Unexpected token '...'.
+//   <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else ...list, "baz": null};
+//                                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:227:53: Error: Unexpected token 'if'.
+//   <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else ...list, "baz": null};
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:227:17: Error: Unexpected token 'for'.
+//   <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else ...list, "baz": null};
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:230:9: Error: Unexpected token 'for'.
+//   <int>[for (i in <int>[1]) i];
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:231:9: Error: Unexpected token 'for'.
+//   <int>{for (i in <int>[1]) i, null};
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:232:16: Error: Unexpected token 'for'.
+// 	<String, int>{for (i in <int>[1]) "bar": i, "baz": null};
+// 	              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:234:17: Error: Unexpected token 'for'.
+//   var list10 = [for (var i in "not iterable") i];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:235:16: Error: Unexpected token 'for'.
+//   var set10 = {for (var i in "not iterable") i, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:236:16: Error: Unexpected token 'for'.
+//   var map10 = {for (var i in "not iterable") "bar": i, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:237:17: Error: Unexpected token 'for'.
+//   var list20 = [for (int i in ["not", "int"]) i];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:238:16: Error: Unexpected token 'for'.
+//   var set20 = {for (int i in ["not", "int"]) i, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:239:16: Error: Unexpected token 'for'.
+//   var map20 = {for (int i in ["not", "int"]) "bar": i, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:240:23: Error: Unexpected token 'for'.
+//   var list30 = [await for (var i in "not stream") i];
+//                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:241:22: Error: Unexpected token 'for'.
+//   var set30 = {await for (var i in "not stream") i, null};
+//                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:242:22: Error: Unexpected token 'for'.
+//   var map30 = {await for (var i in "not stream") "bar": i, "baz": null};
+//                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:243:23: Error: Unexpected token 'for'.
+//   var list40 = [await for (int i in Stream.fromIterable(["not", "int"])) i];
+//                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:244:22: Error: Unexpected token 'for'.
+//   var set40 = {await for (int i in Stream.fromIterable(["not", "int"])) i, null};
+//                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:245:22: Error: Unexpected token 'for'.
+//   var map40 = {await for (int i in Stream.fromIterable(["not", "int"])) "bar": i, "baz": null};
+//                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:246:17: Error: The keyword 'await' isn't allowed for a normal 'for' statement.
+// Try removing the keyword, or use a for-each statement.
+//   var list50 = [await for (;;) 42];
+//                 ^^^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:246:23: Error: Unexpected token 'for'.
+//   var list50 = [await for (;;) 42];
+//                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:247:16: Error: The keyword 'await' isn't allowed for a normal 'for' statement.
+// Try removing the keyword, or use a for-each statement.
+//   var set50 = {await for (;;) 42, null};
+//                ^^^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:247:22: Error: Unexpected token 'for'.
+//   var set50 = {await for (;;) 42, null};
+//                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:248:16: Error: The keyword 'await' isn't allowed for a normal 'for' statement.
+// Try removing the keyword, or use a for-each statement.
+//   var map50 = {await for (;;) "bar": 42, "baz": null};
+//                ^^^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:248:22: Error: Unexpected token 'for'.
+//   var map50 = {await for (;;) "bar": 42, "baz": null};
+//                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:249:17: Error: Unexpected token 'for'.
+//   var list60 = [for (; "not bool";) 42];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:250:16: Error: Unexpected token 'for'.
+//   var set60 = {for (; "not bool";) 42, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:251:16: Error: Unexpected token 'for'.
+//   var map60 = {for (; "not bool";) "bar": 42, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:255:26: Error: The asynchronous for-in can only be used in functions marked with 'async' or 'async*'.
+// Try marking the function body with either 'async' or 'async*', or removing the 'await' before the for loop.
+//   <int>[await for (int i in stream) i];
+//                          ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:255:15: Error: Unexpected token 'for'.
+//   <int>[await for (int i in stream) i];
+//               ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:256:26: Error: The asynchronous for-in can only be used in functions marked with 'async' or 'async*'.
+// Try marking the function body with either 'async' or 'async*', or removing the 'await' before the for loop.
+//   <int>{await for (int i in stream) i};
+//                          ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:256:15: Error: Unexpected token 'for'.
+//   <int>{await for (int i in stream) i};
+//               ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:257:34: Error: The asynchronous for-in can only be used in functions marked with 'async' or 'async*'.
+// Try marking the function body with either 'async' or 'async*', or removing the 'await' before the for loop.
+//   <String, int>{await for (int i in stream) "bar": i};
+//                                  ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:257:23: Error: Unexpected token 'for'.
+//   <String, int>{await for (int i in stream) "bar": i};
+//                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:267:23: Error: Unexpected token 'if'.
+//   List<int> list10 = [if (a is B) a.foo];
+//                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:268:21: Error: Unexpected token 'if'.
+//   Set<int> set10 = {if (a is B) a.foo};
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:269:26: Error: Unexpected token 'if'.
+//   Map<int, int> map10 = {if (a is B) a.foo: a.foo};
+//                          ^^
+//
+import self as self;
+import "dart:core" as core;
+import "dart:async" as asy;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+class B extends self::A {
+  synthetic constructor •() → self::B
+    : super self::A::•()
+    ;
+  get foo() → core::int
+    return 42;
+}
+static method oracle<T extends core::Object = dynamic>([self::oracle::T t = null]) → dynamic
+  return true;
+static method testIfElement(dynamic dynVar, core::List<core::int> listInt, core::List<core::double> listDouble, core::Map<core::String, core::int> mapToInt, core::Map<core::String, core::double> mapToDouble) → dynamic {
+  dynamic list10 = <dynamic>[];
+  dynamic set10 = <dynamic>{null};
+  dynamic map10 = <dynamic, dynamic>{"baz": null};
+  dynamic list11 = <dynamic>[];
+  dynamic set11 = <dynamic>{null};
+  dynamic map11 = <dynamic, dynamic>{"baz": null};
+  dynamic list12 = <dynamic>[];
+  dynamic set12 = <dynamic>{null};
+  dynamic map12 = <dynamic, dynamic>{"baz": null};
+  dynamic list20 = <dynamic>[];
+  dynamic set20 = <dynamic>{null};
+  dynamic map20 = <dynamic, dynamic>{"baz": null};
+  dynamic list21 = <dynamic>[];
+  dynamic set21 = <dynamic>{null};
+  dynamic map21 = <dynamic, dynamic>{"baz": null};
+  dynamic list22 = <dynamic>[];
+  dynamic set22 = <dynamic>{null};
+  dynamic map22 = <dynamic, dynamic>{"baz": null};
+  dynamic list30 = <dynamic>[];
+  dynamic set30 = <dynamic>{null};
+  dynamic map30 = <dynamic, dynamic>{"baz": null};
+  dynamic list31 = <dynamic>[];
+  dynamic set31 = <dynamic>{null};
+  dynamic map31 = <dynamic, dynamic>{"baz": null};
+  dynamic list33 = <dynamic>[];
+  dynamic set33 = <dynamic>{null};
+  dynamic map33 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list40 = <dynamic>[];
+  core::Set<core::List<core::int>> set40 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map40 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list41 = <dynamic>[];
+  core::Set<core::List<core::int>> set41 = <dynamic>{null};
+  core::List<core::List<core::int>> list42 = <dynamic>[];
+  core::Set<core::List<core::int>> set42 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map42 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list50 = <dynamic>[];
+  core::Set<core::int> set50 = <dynamic>{null};
+  core::Map<core::String, core::int> map50 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list51 = <dynamic>[];
+  core::Set<core::int> set51 = <dynamic>{null};
+  core::List<core::int> list52 = <dynamic>[];
+  core::Set<core::int> set52 = <dynamic>{null};
+  core::Map<core::String, core::int> map52 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list60 = <dynamic>[];
+  core::Set<core::List<core::int>> set60 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map60 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list61 = <dynamic>[];
+  core::Set<core::List<core::int>> set61 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map61 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list70 = <dynamic>[];
+  core::Set<core::List<core::int>> set70 = <dynamic>{null};
+  core::List<core::List<core::int>> list71 = <dynamic>[];
+  core::Set<core::List<core::int>> set71 = <dynamic>{null};
+  dynamic list80 = <dynamic>[];
+  dynamic set80 = <dynamic>{null};
+  dynamic map80 = <dynamic, dynamic>{"baz": null};
+  dynamic list81 = <dynamic>[];
+  dynamic set81 = <dynamic>{null};
+  dynamic map81 = <dynamic, dynamic>{"baz": null};
+  dynamic list82 = <dynamic>[];
+  dynamic set82 = <dynamic>{null};
+  dynamic map82 = <dynamic>{null};
+  dynamic list83 = <dynamic>[];
+  dynamic set83 = <dynamic>{null};
+  dynamic map83 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list90 = <dynamic>[];
+  core::Set<core::int> set90 = <dynamic>{null};
+  core::Map<core::String, core::int> map90 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list91 = <dynamic>[];
+  core::Set<core::int> set91 = <dynamic>{null};
+  core::Map<core::String, core::int> map91 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list100 = <dynamic>[];
+  core::Set<core::int> set100 = <dynamic, dynamic>{};
+  core::Map<core::int, core::int> map100 = <dynamic, dynamic>{};
+}
+static method testIfElementErrors(core::Map<core::int, core::int> map) → dynamic {
+  <core::int>[];
+  <core::int>{null};
+  <core::String, core::int>{"baz": null};
+  <core::int>[];
+  <core::int>{null};
+  <core::String, core::int>{"baz": null};
+  <core::int>[];
+  <core::int>{null};
+  <core::String, core::int>{"baz": null};
+  <core::String>[];
+  <core::String>{null};
+  <core::String, core::String>{"baz": null};
+  <core::int>[];
+  <core::int>{null};
+  <core::String, core::int>{"baz": null};
+  <core::int>[];
+  <core::int>{null};
+  <core::String, core::int>{"baz": null};
+  core::Set<dynamic> set10 = <dynamic, dynamic>{};
+  core::Map<dynamic, dynamic> map10 = <dynamic, dynamic>{};
+  core::Set<dynamic> set11 = <dynamic, dynamic>{};
+  core::Map<dynamic, dynamic> map11 = <dynamic, dynamic>{};
+  dynamic map12 = <dynamic, dynamic>{};
+  dynamic map13 = <dynamic, dynamic>{};
+  core::List<core::int> list20 = <dynamic>[];
+  core::Set<core::int> set20 = <dynamic, dynamic>{};
+  core::Map<core::int, core::int> map30 = <dynamic, dynamic>{};
+  core::List<core::String> list40 = <core::String>[];
+  core::Set<core::String> set40 = <core::String>{};
+  core::Map<core::String, core::int> map40 = <core::String, core::int>{};
+  core::Map<core::int, core::String> map41 = <core::int, core::String>{};
+}
+static method testForElement(dynamic dynVar, core::List<core::int> listInt, core::List<core::double> listDouble, core::int index, core::Map<core::String, core::int> mapStringInt, core::Map<core::String, core::double> mapStringDouble) → dynamic {
+  dynamic list10 = <dynamic>[];
+  dynamic set10 = <dynamic>{null};
+  dynamic map10 = <dynamic, dynamic>{"baz": null};
+  dynamic list11 = <dynamic>[];
+  dynamic set11 = <dynamic>{null};
+  dynamic map11 = <dynamic, dynamic>{"baz": null};
+  dynamic list12 = <dynamic>[];
+  dynamic set12 = <dynamic>{null};
+  dynamic map12 = <dynamic, dynamic>{"baz": null};
+  dynamic list20 = <dynamic>[];
+  dynamic set20 = <dynamic>{null};
+  dynamic map20 = <dynamic, dynamic>{"baz": null};
+  dynamic list21 = <dynamic>[];
+  dynamic set21 = <dynamic>{null};
+  dynamic map21 = <dynamic, dynamic>{"baz": null};
+  dynamic list22 = <dynamic>[];
+  dynamic set22 = <dynamic>{null};
+  dynamic map22 = <dynamic, dynamic>{"baz": null};
+  dynamic list30 = <dynamic>[];
+  dynamic set30 = <dynamic>{null};
+  dynamic map30 = <dynamic, dynamic>{"baz": null};
+  dynamic list31 = <dynamic>[];
+  dynamic set31 = <dynamic>{null};
+  dynamic map31 = <dynamic, dynamic>{"baz": null};
+  dynamic list33 = <dynamic>[];
+  dynamic set33 = <dynamic>{null};
+  dynamic map33 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list40 = <dynamic>[];
+  core::Set<core::List<core::int>> set40 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map40 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list41 = <dynamic>[];
+  core::Set<core::List<core::int>> set41 = <dynamic>{null};
+  core::List<core::List<core::int>> list42 = <dynamic>[];
+  core::Set<core::List<core::int>> set42 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map42 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list50 = <dynamic>[];
+  core::Set<core::int> set50 = <dynamic>{null};
+  core::Map<core::String, core::int> map50 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list51 = <dynamic>[];
+  core::Set<core::int> set51 = <dynamic>{null};
+  core::List<core::int> list52 = <dynamic>[];
+  core::Set<core::int> set52 = <dynamic>{null};
+  core::List<core::List<core::int>> list60 = <dynamic>[];
+  core::Set<core::List<core::int>> set60 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map60 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list61 = <dynamic>[];
+  core::Set<core::List<core::int>> set61 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map61 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list70 = <dynamic>[];
+  core::Set<core::List<core::int>> set70 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map70 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list71 = <dynamic>[];
+  core::Set<core::List<core::int>> set71 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map71 = <dynamic, dynamic>{"baz": null};
+  dynamic list80 = <dynamic>[];
+  dynamic set80 = <dynamic>{null};
+  dynamic map80 = <dynamic, dynamic>{"baz": null};
+  dynamic list81 = <dynamic>[];
+  dynamic set81 = <dynamic>{null};
+  dynamic map81 = <dynamic, dynamic>{"baz": null};
+  dynamic list82 = <dynamic>[];
+  dynamic set82 = <dynamic>{null};
+  dynamic map82 = <dynamic, dynamic>{"baz": null};
+  dynamic list83 = <dynamic>[];
+  dynamic set83 = <dynamic>{null};
+  dynamic map83 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list90 = <dynamic>[];
+  core::Set<core::int> set90 = <dynamic>{null};
+  core::Map<core::String, core::int> map90 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list91 = <dynamic>[];
+  core::Set<core::int> set91 = <dynamic>{null};
+  core::Map<core::String, core::int> map91 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list100 = <core::int>[];
+  core::Set<core::int> set100 = <core::int>{};
+  core::Map<core::String, core::int> map100 = <core::String, core::int>{};
+  dynamic list110 = <dynamic>[];
+  dynamic set110 = <dynamic>{null};
+  dynamic map110 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list120 = <dynamic>[];
+  core::Set<core::int> set120 = <dynamic>{null};
+  core::Map<core::String, core::int> map120 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list130 = <dynamic>[];
+  core::Set<core::int> set130 = <dynamic, dynamic>{};
+  core::Map<core::int, core::int> map130 = <dynamic, dynamic>{};
+}
+static method testForElementErrors(core::Map<core::int, core::int> map, core::List<core::int> list) → dynamic async {
+  <core::int>[];
+  <core::int>{null};
+  <core::int, core::int>{"baz": null};
+  <core::int>[];
+  <core::int>{null};
+  <core::int, core::int>{"baz": null};
+  <core::int>[];
+  <core::int>{null};
+  <core::int, core::int>{42: null};
+  <core::String>[];
+  <core::String>{null};
+  <core::String, core::String>{"baz": null};
+  <core::int>[];
+  <core::int>{null};
+  <core::String, core::int>{"baz": null};
+  <core::int>[];
+  <core::int>{null};
+  <core::String, core::int>{"baz": null};
+  final dynamic i = 0;
+  <core::int>[];
+  <core::int>{null};
+  <core::String, core::int>{"baz": null};
+  dynamic list10 = <dynamic>[];
+  dynamic set10 = <dynamic>{null};
+  dynamic map10 = <dynamic, dynamic>{"baz": null};
+  dynamic list20 = <dynamic>[];
+  dynamic set20 = <dynamic>{null};
+  dynamic map20 = <dynamic, dynamic>{"baz": null};
+  dynamic list30 = <dynamic>[];
+  dynamic set30 = <dynamic>{null};
+  dynamic map30 = <dynamic, dynamic>{"baz": null};
+  dynamic list40 = <dynamic>[];
+  dynamic set40 = <dynamic>{null};
+  dynamic map40 = <dynamic, dynamic>{"baz": null};
+  dynamic list50 = <dynamic>[];
+  dynamic set50 = <dynamic>{null};
+  dynamic map50 = <dynamic, dynamic>{"baz": null};
+  dynamic list60 = <dynamic>[];
+  dynamic set60 = <dynamic>{null};
+  dynamic map60 = <dynamic, dynamic>{"baz": null};
+}
+static method testForElementErrorsNotAsync(asy::Stream<core::int> stream) → dynamic {
+  <core::int>[];
+  <core::int>{};
+  <core::String, core::int>{};
+}
+static method testPromotion(self::A a) → dynamic {
+  core::List<core::int> list10 = <dynamic>[];
+  core::Set<core::int> set10 = <dynamic, dynamic>{};
+  core::Map<core::int, core::int> map10 = <dynamic, dynamic>{};
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/control_flow_collection_inference.dart.legacy.transformed.expect b/pkg/front_end/testcases/control_flow_collection_inference.dart.legacy.transformed.expect
new file mode 100644
index 0000000..d384c49
--- /dev/null
+++ b/pkg/front_end/testcases/control_flow_collection_inference.dart.legacy.transformed.expect
@@ -0,0 +1,2059 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:10:17: Error: Unexpected token 'if'.
+//   var list10 = [if (oracle("foo")) 42];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:11:16: Error: Unexpected token 'if'.
+//   var set10 = {if (oracle("foo")) 42, null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:12:16: Error: Unexpected token 'if'.
+//   var map10 = {if (oracle("foo")) "bar": 42, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:13:17: Error: Unexpected token 'if'.
+//   var list11 = [if (oracle("foo")) dynVar];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:14:16: Error: Unexpected token 'if'.
+//   var set11 = {if (oracle("foo")) dynVar, null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:15:16: Error: Unexpected token 'if'.
+//   var map11 = {if (oracle("foo")) "bar": dynVar, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:16:17: Error: Unexpected token 'if'.
+//   var list12 = [if (oracle("foo")) [42]];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:17:16: Error: Unexpected token 'if'.
+//   var set12 = {if (oracle("foo")) [42], null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:18:16: Error: Unexpected token 'if'.
+//   var map12 = {if (oracle("foo")) "bar": [42], "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:19:36: Error: Unexpected token '...'.
+//   var list20 = [if (oracle("foo")) ...[42]];
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:19:17: Error: Unexpected token 'if'.
+//   var list20 = [if (oracle("foo")) ...[42]];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:20:35: Error: Unexpected token '...'.
+//   var set20 = {if (oracle("foo")) ...[42], null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:20:16: Error: Unexpected token 'if'.
+//   var set20 = {if (oracle("foo")) ...[42], null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:21:35: Error: Unexpected token '...'.
+//   var map20 = {if (oracle("foo")) ...{"bar": 42}, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:21:16: Error: Unexpected token 'if'.
+//   var map20 = {if (oracle("foo")) ...{"bar": 42}, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:22:36: Error: Unexpected token '...'.
+//   var list21 = [if (oracle("foo")) ...[dynVar]];
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:22:17: Error: Unexpected token 'if'.
+//   var list21 = [if (oracle("foo")) ...[dynVar]];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:23:35: Error: Unexpected token '...'.
+//   var set21 = {if (oracle("foo")) ...[dynVar], null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:23:16: Error: Unexpected token 'if'.
+//   var set21 = {if (oracle("foo")) ...[dynVar], null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:24:35: Error: Unexpected token '...'.
+//   var map21 = {if (oracle("foo")) ...{"bar": dynVar}, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:24:16: Error: Unexpected token 'if'.
+//   var map21 = {if (oracle("foo")) ...{"bar": dynVar}, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:25:36: Error: Unexpected token '...'.
+//   var list22 = [if (oracle("foo")) ...[[42]]];
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:25:17: Error: Unexpected token 'if'.
+//   var list22 = [if (oracle("foo")) ...[[42]]];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:26:35: Error: Unexpected token '...'.
+//   var set22 = {if (oracle("foo")) ...[[42]], null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:26:16: Error: Unexpected token 'if'.
+//   var set22 = {if (oracle("foo")) ...[[42]], null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:27:35: Error: Unexpected token '...'.
+//   var map22 = {if (oracle("foo")) ...{"bar": [42]}, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:27:16: Error: Unexpected token 'if'.
+//   var map22 = {if (oracle("foo")) ...{"bar": [42]}, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:28:50: Error: Unexpected token '...'.
+//   var list30 = [if (oracle("foo")) if (oracle()) ...[42]];
+//                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:28:36: Error: Unexpected token 'if'.
+//   var list30 = [if (oracle("foo")) if (oracle()) ...[42]];
+//                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:28:17: Error: Unexpected token 'if'.
+//   var list30 = [if (oracle("foo")) if (oracle()) ...[42]];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:29:49: Error: Unexpected token '...'.
+//   var set30 = {if (oracle("foo")) if (oracle()) ...[42], null};
+//                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:29:35: Error: Unexpected token 'if'.
+//   var set30 = {if (oracle("foo")) if (oracle()) ...[42], null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:29:16: Error: Unexpected token 'if'.
+//   var set30 = {if (oracle("foo")) if (oracle()) ...[42], null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:30:49: Error: Unexpected token '...'.
+//   var map30 = {if (oracle("foo")) if (oracle()) ...{"bar": 42}, "baz": null};
+//                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:30:35: Error: Unexpected token 'if'.
+//   var map30 = {if (oracle("foo")) if (oracle()) ...{"bar": 42}, "baz": null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:30:16: Error: Unexpected token 'if'.
+//   var map30 = {if (oracle("foo")) if (oracle()) ...{"bar": 42}, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:31:50: Error: Unexpected token '...'.
+//   var list31 = [if (oracle("foo")) if (oracle()) ...[dynVar]];
+//                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:31:36: Error: Unexpected token 'if'.
+//   var list31 = [if (oracle("foo")) if (oracle()) ...[dynVar]];
+//                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:31:17: Error: Unexpected token 'if'.
+//   var list31 = [if (oracle("foo")) if (oracle()) ...[dynVar]];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:32:49: Error: Unexpected token '...'.
+//   var set31 = {if (oracle("foo")) if (oracle()) ...[dynVar], null};
+//                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:32:35: Error: Unexpected token 'if'.
+//   var set31 = {if (oracle("foo")) if (oracle()) ...[dynVar], null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:32:16: Error: Unexpected token 'if'.
+//   var set31 = {if (oracle("foo")) if (oracle()) ...[dynVar], null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:33:49: Error: Unexpected token '...'.
+//   var map31 = {if (oracle("foo")) if (oracle()) ...{"bar": dynVar}, "baz": null};
+//                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:33:35: Error: Unexpected token 'if'.
+//   var map31 = {if (oracle("foo")) if (oracle()) ...{"bar": dynVar}, "baz": null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:33:16: Error: Unexpected token 'if'.
+//   var map31 = {if (oracle("foo")) if (oracle()) ...{"bar": dynVar}, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:34:50: Error: Unexpected token '...'.
+//   var list33 = [if (oracle("foo")) if (oracle()) ...[[42]]];
+//                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:34:36: Error: Unexpected token 'if'.
+//   var list33 = [if (oracle("foo")) if (oracle()) ...[[42]]];
+//                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:34:17: Error: Unexpected token 'if'.
+//   var list33 = [if (oracle("foo")) if (oracle()) ...[[42]]];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:35:49: Error: Unexpected token '...'.
+//   var set33 = {if (oracle("foo")) if (oracle()) ...[[42]], null};
+//                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:35:35: Error: Unexpected token 'if'.
+//   var set33 = {if (oracle("foo")) if (oracle()) ...[[42]], null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:35:16: Error: Unexpected token 'if'.
+//   var set33 = {if (oracle("foo")) if (oracle()) ...[[42]], null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:36:49: Error: Unexpected token '...'.
+//   var map33 = {if (oracle("foo")) if (oracle()) ...{"bar": [42]}, "baz": null};
+//                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:36:35: Error: Unexpected token 'if'.
+//   var map33 = {if (oracle("foo")) if (oracle()) ...{"bar": [42]}, "baz": null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:36:16: Error: Unexpected token 'if'.
+//   var map33 = {if (oracle("foo")) if (oracle()) ...{"bar": [42]}, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:37:48: Error: Unexpected token '...'.
+//   List<List<int>> list40 = [if (oracle("foo")) ...[[]]];
+//                                                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:37:29: Error: Unexpected token 'if'.
+//   List<List<int>> list40 = [if (oracle("foo")) ...[[]]];
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:38:46: Error: Unexpected token '...'.
+//   Set<List<int>> set40 = {if (oracle("foo")) ...[[]], null};
+//                                              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:38:27: Error: Unexpected token 'if'.
+//   Set<List<int>> set40 = {if (oracle("foo")) ...[[]], null};
+//                           ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:39:54: Error: Unexpected token '...'.
+//   Map<String, List<int>> map40 = {if (oracle("foo")) ...{"bar", []}, "baz": null};
+//                                                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:39:35: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map40 = {if (oracle("foo")) ...{"bar", []}, "baz": null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:40:48: Error: Unexpected token '...'.
+//   List<List<int>> list41 = [if (oracle("foo")) ...{[]}];
+//                                                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:40:29: Error: Unexpected token 'if'.
+//   List<List<int>> list41 = [if (oracle("foo")) ...{[]}];
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:41:46: Error: Unexpected token '...'.
+//   Set<List<int>> set41 = {if (oracle("foo")) ...{[]}, null};
+//                                              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:41:27: Error: Unexpected token 'if'.
+//   Set<List<int>> set41 = {if (oracle("foo")) ...{[]}, null};
+//                           ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:42:62: Error: Unexpected token '...'.
+//   List<List<int>> list42 = [if (oracle("foo")) if (oracle()) ...[[]]];
+//                                                              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:42:48: Error: Unexpected token 'if'.
+//   List<List<int>> list42 = [if (oracle("foo")) if (oracle()) ...[[]]];
+//                                                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:42:29: Error: Unexpected token 'if'.
+//   List<List<int>> list42 = [if (oracle("foo")) if (oracle()) ...[[]]];
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:43:60: Error: Unexpected token '...'.
+//   Set<List<int>> set42 = {if (oracle("foo")) if (oracle()) ...[[]], null};
+//                                                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:43:46: Error: Unexpected token 'if'.
+//   Set<List<int>> set42 = {if (oracle("foo")) if (oracle()) ...[[]], null};
+//                                              ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:43:27: Error: Unexpected token 'if'.
+//   Set<List<int>> set42 = {if (oracle("foo")) if (oracle()) ...[[]], null};
+//                           ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:44:68: Error: Unexpected token '...'.
+//   Map<String, List<int>> map42 = {if (oracle("foo")) if (oracle()) ...{"bar": []}, "baz": null};
+//                                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:44:54: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map42 = {if (oracle("foo")) if (oracle()) ...{"bar": []}, "baz": null};
+//                                                      ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:44:35: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map42 = {if (oracle("foo")) if (oracle()) ...{"bar": []}, "baz": null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:45:42: Error: Unexpected token '...'.
+//   List<int> list50 = [if (oracle("foo")) ...[]];
+//                                          ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:45:23: Error: Unexpected token 'if'.
+//   List<int> list50 = [if (oracle("foo")) ...[]];
+//                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:46:40: Error: Unexpected token '...'.
+//   Set<int> set50 = {if (oracle("foo")) ...[], null};
+//                                        ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:46:21: Error: Unexpected token 'if'.
+//   Set<int> set50 = {if (oracle("foo")) ...[], null};
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:47:48: Error: Unexpected token '...'.
+//   Map<String, int> map50 = {if (oracle("foo")) ...{}, "baz": null};
+//                                                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:47:29: Error: Unexpected token 'if'.
+//   Map<String, int> map50 = {if (oracle("foo")) ...{}, "baz": null};
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:48:42: Error: Unexpected token '...'.
+//   List<int> list51 = [if (oracle("foo")) ...{}];
+//                                          ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:48:23: Error: Unexpected token 'if'.
+//   List<int> list51 = [if (oracle("foo")) ...{}];
+//                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:49:40: Error: Unexpected token '...'.
+//   Set<int> set51 = {if (oracle("foo")) ...{}, null};
+//                                        ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:49:21: Error: Unexpected token 'if'.
+//   Set<int> set51 = {if (oracle("foo")) ...{}, null};
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:50:56: Error: Unexpected token '...'.
+//   List<int> list52 = [if (oracle("foo")) if (oracle()) ...[]];
+//                                                        ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:50:42: Error: Unexpected token 'if'.
+//   List<int> list52 = [if (oracle("foo")) if (oracle()) ...[]];
+//                                          ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:50:23: Error: Unexpected token 'if'.
+//   List<int> list52 = [if (oracle("foo")) if (oracle()) ...[]];
+//                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:51:54: Error: Unexpected token '...'.
+//   Set<int> set52 = {if (oracle("foo")) if (oracle()) ...[], null};
+//                                                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:51:40: Error: Unexpected token 'if'.
+//   Set<int> set52 = {if (oracle("foo")) if (oracle()) ...[], null};
+//                                        ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:51:21: Error: Unexpected token 'if'.
+//   Set<int> set52 = {if (oracle("foo")) if (oracle()) ...[], null};
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:52:62: Error: Unexpected token '...'.
+//   Map<String, int> map52 = {if (oracle("foo")) if (oracle()) ...{}, "baz": null};
+//                                                              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:52:48: Error: Unexpected token 'if'.
+//   Map<String, int> map52 = {if (oracle("foo")) if (oracle()) ...{}, "baz": null};
+//                                                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:52:29: Error: Unexpected token 'if'.
+//   Map<String, int> map52 = {if (oracle("foo")) if (oracle()) ...{}, "baz": null};
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:53:48: Error: Unexpected token '...'.
+//   List<List<int>> list60 = [if (oracle("foo")) ...[[]]];
+//                                                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:53:29: Error: Unexpected token 'if'.
+//   List<List<int>> list60 = [if (oracle("foo")) ...[[]]];
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:54:46: Error: Unexpected token '...'.
+//   Set<List<int>> set60 = {if (oracle("foo")) ...[[]], null};
+//                                              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:54:27: Error: Unexpected token 'if'.
+//   Set<List<int>> set60 = {if (oracle("foo")) ...[[]], null};
+//                           ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:55:54: Error: Unexpected token '...'.
+//   Map<String, List<int>> map60 = {if (oracle("foo")) ...{"bar": []}, "baz": null};
+//                                                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:55:35: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map60 = {if (oracle("foo")) ...{"bar": []}, "baz": null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:56:62: Error: Unexpected token '...'.
+//   List<List<int>> list61 = [if (oracle("foo")) if (oracle()) ...[[]]];
+//                                                              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:56:48: Error: Unexpected token 'if'.
+//   List<List<int>> list61 = [if (oracle("foo")) if (oracle()) ...[[]]];
+//                                                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:56:29: Error: Unexpected token 'if'.
+//   List<List<int>> list61 = [if (oracle("foo")) if (oracle()) ...[[]]];
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:57:60: Error: Unexpected token '...'.
+//   Set<List<int>> set61 = {if (oracle("foo")) if (oracle()) ...[[]], null};
+//                                                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:57:46: Error: Unexpected token 'if'.
+//   Set<List<int>> set61 = {if (oracle("foo")) if (oracle()) ...[[]], null};
+//                                              ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:57:27: Error: Unexpected token 'if'.
+//   Set<List<int>> set61 = {if (oracle("foo")) if (oracle()) ...[[]], null};
+//                           ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:58:68: Error: Unexpected token '...'.
+//   Map<String, List<int>> map61 = {if (oracle("foo")) if (oracle()) ...{"bar": []}, "baz": null};
+//                                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:58:54: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map61 = {if (oracle("foo")) if (oracle()) ...{"bar": []}, "baz": null};
+//                                                      ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:58:35: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map61 = {if (oracle("foo")) if (oracle()) ...{"bar": []}, "baz": null};
+//                                   ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:59:29: Error: Unexpected token 'if'.
+//   List<List<int>> list70 = [if (oracle("foo")) []];
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:60:27: Error: Unexpected token 'if'.
+//   Set<List<int>> set70 = {if (oracle("foo")) [], null};
+//                           ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:61:48: Error: Unexpected token 'if'.
+//   List<List<int>> list71 = [if (oracle("foo")) if (oracle()) []];
+//                                                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:61:29: Error: Unexpected token 'if'.
+//   List<List<int>> list71 = [if (oracle("foo")) if (oracle()) []];
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:62:46: Error: Unexpected token 'if'.
+//   Set<List<int>> set71 = {if (oracle("foo")) if (oracle()) [], null};
+//                                              ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:62:27: Error: Unexpected token 'if'.
+//   Set<List<int>> set71 = {if (oracle("foo")) if (oracle()) [], null};
+//                           ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:63:17: Error: Unexpected token 'if'.
+//   var list80 = [if (oracle("foo")) 42 else 3.14];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:64:16: Error: Unexpected token 'if'.
+//   var set80 = {if (oracle("foo")) 42 else 3.14, null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:65:16: Error: Unexpected token 'if'.
+//   var map80 = {if (oracle("foo")) "bar": 42 else "bar": 3.14, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:66:36: Error: Unexpected token '...'.
+//   var list81 = [if (oracle("foo")) ...listInt else ...listDouble];
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:66:52: Error: Unexpected token '...'.
+//   var list81 = [if (oracle("foo")) ...listInt else ...listDouble];
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:66:17: Error: Unexpected token 'if'.
+//   var list81 = [if (oracle("foo")) ...listInt else ...listDouble];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:67:35: Error: Unexpected token '...'.
+//   var set81 = {if (oracle("foo")) ...listInt else ...listDouble, null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:67:51: Error: Unexpected token '...'.
+//   var set81 = {if (oracle("foo")) ...listInt else ...listDouble, null};
+//                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:67:16: Error: Unexpected token 'if'.
+//   var set81 = {if (oracle("foo")) ...listInt else ...listDouble, null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:68:35: Error: Unexpected token '...'.
+//   var map81 = {if (oracle("foo")) ...mapToInt else ...mapToDouble, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:68:52: Error: Unexpected token '...'.
+//   var map81 = {if (oracle("foo")) ...mapToInt else ...mapToDouble, "baz": null};
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:68:16: Error: Unexpected token 'if'.
+//   var map81 = {if (oracle("foo")) ...mapToInt else ...mapToDouble, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:69:36: Error: Unexpected token '...'.
+//   var list82 = [if (oracle("foo")) ...listInt else ...dynVar];
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:69:52: Error: Unexpected token '...'.
+//   var list82 = [if (oracle("foo")) ...listInt else ...dynVar];
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:69:17: Error: Unexpected token 'if'.
+//   var list82 = [if (oracle("foo")) ...listInt else ...dynVar];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:70:35: Error: Unexpected token '...'.
+//   var set82 = {if (oracle("foo")) ...listInt else ...dynVar, null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:70:51: Error: Unexpected token '...'.
+//   var set82 = {if (oracle("foo")) ...listInt else ...dynVar, null};
+//                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:70:16: Error: Unexpected token 'if'.
+//   var set82 = {if (oracle("foo")) ...listInt else ...dynVar, null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:71:35: Error: Unexpected token '...'.
+//   var map82 = {if (oracle("foo")) ...mapToInt else ...dynVar, null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:71:52: Error: Unexpected token '...'.
+//   var map82 = {if (oracle("foo")) ...mapToInt else ...dynVar, null};
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:71:16: Error: Unexpected token 'if'.
+//   var map82 = {if (oracle("foo")) ...mapToInt else ...dynVar, null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:72:44: Error: Unexpected token '...'.
+//   var list83 = [if (oracle("foo")) 42 else ...listDouble];
+//                                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:72:17: Error: Unexpected token 'if'.
+//   var list83 = [if (oracle("foo")) 42 else ...listDouble];
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:73:35: Error: Unexpected token '...'.
+//   var set83 = {if (oracle("foo")) ...listInt else 3.14, null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:73:16: Error: Unexpected token 'if'.
+//   var set83 = {if (oracle("foo")) ...listInt else 3.14, null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:74:35: Error: Unexpected token '...'.
+//   var map83 = {if (oracle("foo")) ...mapToInt else "bar": 3.14, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:74:16: Error: Unexpected token 'if'.
+//   var map83 = {if (oracle("foo")) ...mapToInt else "bar": 3.14, "baz": null};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:75:23: Error: Unexpected token 'if'.
+//   List<int> list90 = [if (oracle("foo")) dynVar];
+//                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:76:21: Error: Unexpected token 'if'.
+//   Set<int> set90 = {if (oracle("foo")) dynVar, null};
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:77:29: Error: Unexpected token 'if'.
+//   Map<String, int> map90 = {if (oracle("foo")) "bar": dynVar, "baz": null};
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:78:42: Error: Unexpected token '...'.
+//   List<int> list91 = [if (oracle("foo")) ...dynVar];
+//                                          ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:78:23: Error: Unexpected token 'if'.
+//   List<int> list91 = [if (oracle("foo")) ...dynVar];
+//                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:79:40: Error: Unexpected token '...'.
+//   Set<int> set91 = {if (oracle("foo")) ...dynVar, null};
+//                                        ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:79:21: Error: Unexpected token 'if'.
+//   Set<int> set91 = {if (oracle("foo")) ...dynVar, null};
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:80:48: Error: Unexpected token '...'.
+//   Map<String, int> map91 = {if (oracle("foo")) ...dynVar, "baz": null};
+//                                                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:80:29: Error: Unexpected token 'if'.
+//   Map<String, int> map91 = {if (oracle("foo")) ...dynVar, "baz": null};
+//                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:81:24: Error: Unexpected token 'if'.
+//   List<int> list100 = [if (dynVar) 42];
+//                        ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:82:22: Error: Unexpected token 'if'.
+//   Set<int> set100 = {if (dynVar) 42};
+//                      ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:83:27: Error: Unexpected token 'if'.
+//   Map<int, int> map100 = {if (dynVar) 42: 42};
+//                           ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:87:9: Error: Unexpected token 'if'.
+//   <int>[if (oracle("foo")) "bar"];
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:88:9: Error: Unexpected token 'if'.
+//   <int>{if (oracle("foo")) "bar", null};
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:89:17: Error: Unexpected token 'if'.
+//   <String, int>{if (oracle("foo")) "bar": "bar", "baz": null};
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:90:28: Error: Unexpected token '...'.
+//   <int>[if (oracle("foo")) ...["bar"]];
+//                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:90:9: Error: Unexpected token 'if'.
+//   <int>[if (oracle("foo")) ...["bar"]];
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:91:28: Error: Unexpected token '...'.
+//   <int>{if (oracle("foo")) ...["bar"], null};
+//                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:91:9: Error: Unexpected token 'if'.
+//   <int>{if (oracle("foo")) ...["bar"], null};
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:92:36: Error: Unexpected token '...'.
+//   <String, int>{if (oracle("foo")) ...{"bar": "bar"}, "baz": null};
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:92:17: Error: Unexpected token 'if'.
+//   <String, int>{if (oracle("foo")) ...{"bar": "bar"}, "baz": null};
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:93:28: Error: Unexpected token '...'.
+//   <int>[if (oracle("foo")) ...map];
+//                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:93:9: Error: Unexpected token 'if'.
+//   <int>[if (oracle("foo")) ...map];
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:94:28: Error: Unexpected token '...'.
+//   <int>{if (oracle("foo")) ...map, null};
+//                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:94:9: Error: Unexpected token 'if'.
+//   <int>{if (oracle("foo")) ...map, null};
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:95:36: Error: Unexpected token '...'.
+//   <String, int>{if (oracle("foo")) ...["bar"], "baz": null};
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:95:17: Error: Unexpected token 'if'.
+//   <String, int>{if (oracle("foo")) ...["bar"], "baz": null};
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:96:12: Error: Unexpected token 'if'.
+//   <String>[if (oracle("foo")) 42 else 3.14];
+//            ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:97:12: Error: Unexpected token 'if'.
+//   <String>{if (oracle("foo")) 42 else 3.14, null};
+//            ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:98:20: Error: Unexpected token 'if'.
+//   <String, String>{if (oracle("foo")) "bar": 42 else "baz": 3.14, "baz": null};
+//                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:99:28: Error: Unexpected token '...'.
+//   <int>[if (oracle("foo")) ...map else 42];
+//                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:99:9: Error: Unexpected token 'if'.
+//   <int>[if (oracle("foo")) ...map else 42];
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:100:28: Error: Unexpected token '...'.
+//   <int>{if (oracle("foo")) ...map else 42, null};
+//                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:100:9: Error: Unexpected token 'if'.
+//   <int>{if (oracle("foo")) ...map else 42, null};
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:101:36: Error: Unexpected token '...'.
+//   <String, int>{if (oracle("foo")) ...[42] else "bar": 42, "baz": null};
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:101:17: Error: Unexpected token 'if'.
+//   <String, int>{if (oracle("foo")) ...[42] else "bar": 42, "baz": null};
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:102:36: Error: Unexpected token '...'.
+//   <int>[if (oracle("foo")) 42 else ...map];
+//                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:102:9: Error: Unexpected token 'if'.
+//   <int>[if (oracle("foo")) 42 else ...map];
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:103:28: Error: Unexpected token '...'.
+//   <int>{if (oracle("foo")) ...map else 42, null};
+//                            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:103:9: Error: Unexpected token 'if'.
+//   <int>{if (oracle("foo")) ...map else 42, null};
+//         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:104:51: Error: Unexpected token '...'.
+//   <String, int>{if (oracle("foo")) "bar": 42 else ...[42], "baz": null};
+//                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:104:17: Error: Unexpected token 'if'.
+//   <String, int>{if (oracle("foo")) "bar": 42 else ...[42], "baz": null};
+//                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:106:25: Error: Unexpected token 'if'.
+//   Set<dynamic> set10 = {if (oracle("foo")) 42 else "bar": 3.14};
+//                         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:107:34: Error: Unexpected token 'if'.
+//   Map<dynamic, dynamic> map10 = {if (oracle("foo")) 42 else "bar": 3.14};
+//                                  ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:108:25: Error: Unexpected token 'if'.
+//   Set<dynamic> set11 = {if (oracle("foo")) "bar": 3.14 else 42};
+//                         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:109:34: Error: Unexpected token 'if'.
+//   Map<dynamic, dynamic> map11 = {if (oracle("foo")) "bar": 3.14 else 42};
+//                                  ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:110:16: Error: Unexpected token 'if'.
+//   var map12 = {if (oracle("foo")) 42 else "bar": 3.14};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:111:16: Error: Unexpected token 'if'.
+//   var map13 = {if (oracle("foo")) "bar": 3.14 else 42};
+//                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:112:23: Error: Unexpected token 'if'.
+//   List<int> list20 = [if (42) 42];
+//                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:113:21: Error: Unexpected token 'if'.
+//   Set<int> set20 = {if (42) 42};
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:114:26: Error: Unexpected token 'if'.
+//   Map<int, int> map30 = {if (42) 42: 42};
+//                          ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:115:34: Error: Unexpected token 'if'.
+//   List<String> list40 = <String>[if (oracle("foo")) true else 42];
+//                                  ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:116:32: Error: Unexpected token 'if'.
+//   Set<String> set40 = <String>{if (oracle("foo")) true else 42};
+//                                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:117:42: Error: Unexpected token 'if'.
+//   Map<String, int> map40 = <String, int>{if (oracle("foo")) true: 42 else 42: 42};
+//                                          ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:118:42: Error: Unexpected token 'if'.
+//   Map<int, String> map41 = <int, String>{if (oracle("foo")) 42: true else 42: 42};
+//                                          ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:123:17: Error: Unexpected token 'for'.
+//   var list10 = [for (int i = 0; oracle("foo"); i++) 42];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:124:16: Error: Unexpected token 'for'.
+//   var set10 = {for (int i = 0; oracle("foo"); i++) 42, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:125:16: Error: Unexpected token 'for'.
+//   var map10 = {for (int i = 0; oracle("foo"); i++) "bar": 42, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:126:17: Error: Unexpected token 'for'.
+//   var list11 = [for (int i = 0; oracle("foo"); i++) dynVar];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:127:16: Error: Unexpected token 'for'.
+//   var set11 = {for (int i = 0; oracle("foo"); i++) dynVar, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:128:16: Error: Unexpected token 'for'.
+//   var map11 = {for (int i = 0; oracle("foo"); i++) "bar": dynVar, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:129:17: Error: Unexpected token 'for'.
+//   var list12 = [for (int i = 0; oracle("foo"); i++) [42]];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:130:16: Error: Unexpected token 'for'.
+//   var set12 = {for (int i = 0; oracle("foo"); i++) [42], null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:131:16: Error: Unexpected token 'for'.
+//   var map12 = {for (int i = 0; oracle("foo"); i++) "bar": [42], "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:132:53: Error: Unexpected token '...'.
+//   var list20 = [for (int i = 0; oracle("foo"); i++) ...[42]];
+//                                                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:132:17: Error: Unexpected token 'for'.
+//   var list20 = [for (int i = 0; oracle("foo"); i++) ...[42]];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:133:52: Error: Unexpected token '...'.
+//   var set20 = {for (int i = 0; oracle("foo"); i++) ...[42], null};
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:133:16: Error: Unexpected token 'for'.
+//   var set20 = {for (int i = 0; oracle("foo"); i++) ...[42], null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:134:52: Error: Unexpected token '...'.
+//   var map20 = {for (int i = 0; oracle("foo"); i++) ...{"bar": 42}, "baz": null};
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:134:16: Error: Unexpected token 'for'.
+//   var map20 = {for (int i = 0; oracle("foo"); i++) ...{"bar": 42}, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:135:53: Error: Unexpected token '...'.
+//   var list21 = [for (int i = 0; oracle("foo"); i++) ...[dynVar]];
+//                                                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:135:17: Error: Unexpected token 'for'.
+//   var list21 = [for (int i = 0; oracle("foo"); i++) ...[dynVar]];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:136:52: Error: Unexpected token '...'.
+//   var set21 = {for (int i = 0; oracle("foo"); i++) ...[dynVar], null};
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:136:16: Error: Unexpected token 'for'.
+//   var set21 = {for (int i = 0; oracle("foo"); i++) ...[dynVar], null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:137:52: Error: Unexpected token '...'.
+//   var map21 = {for (int i = 0; oracle("foo"); i++) ...{"bar": dynVar}, "baz": null};
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:137:16: Error: Unexpected token 'for'.
+//   var map21 = {for (int i = 0; oracle("foo"); i++) ...{"bar": dynVar}, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:138:53: Error: Unexpected token '...'.
+//   var list22 = [for (int i = 0; oracle("foo"); i++) ...[[42]]];
+//                                                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:138:17: Error: Unexpected token 'for'.
+//   var list22 = [for (int i = 0; oracle("foo"); i++) ...[[42]]];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:139:52: Error: Unexpected token '...'.
+//   var set22 = {for (int i = 0; oracle("foo"); i++) ...[[42]], null};
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:139:16: Error: Unexpected token 'for'.
+//   var set22 = {for (int i = 0; oracle("foo"); i++) ...[[42]], null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:140:52: Error: Unexpected token '...'.
+//   var map22 = {for (int i = 0; oracle("foo"); i++) ...{"bar": [42]}, "baz": null};
+//                                                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:140:16: Error: Unexpected token 'for'.
+//   var map22 = {for (int i = 0; oracle("foo"); i++) ...{"bar": [42]}, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:141:67: Error: Unexpected token '...'.
+//   var list30 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[42]];
+//                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:141:53: Error: Unexpected token 'if'.
+//   var list30 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[42]];
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:141:17: Error: Unexpected token 'for'.
+//   var list30 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[42]];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:142:66: Error: Unexpected token '...'.
+//   var set30 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[42], null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:142:52: Error: Unexpected token 'if'.
+//   var set30 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[42], null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:142:16: Error: Unexpected token 'for'.
+//   var set30 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[42], null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:143:66: Error: Unexpected token '...'.
+//   var map30 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": 42}, "baz": null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:143:52: Error: Unexpected token 'if'.
+//   var map30 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": 42}, "baz": null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:143:16: Error: Unexpected token 'for'.
+//   var map30 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": 42}, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:144:67: Error: Unexpected token '...'.
+//   var list31 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[dynVar]];
+//                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:144:53: Error: Unexpected token 'if'.
+//   var list31 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[dynVar]];
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:144:17: Error: Unexpected token 'for'.
+//   var list31 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[dynVar]];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:145:66: Error: Unexpected token '...'.
+//   var set31 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[dynVar], null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:145:52: Error: Unexpected token 'if'.
+//   var set31 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[dynVar], null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:145:16: Error: Unexpected token 'for'.
+//   var set31 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[dynVar], null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:146:66: Error: Unexpected token '...'.
+//   var map31 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": dynVar}, "baz": null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:146:52: Error: Unexpected token 'if'.
+//   var map31 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": dynVar}, "baz": null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:146:16: Error: Unexpected token 'for'.
+//   var map31 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": dynVar}, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:147:67: Error: Unexpected token '...'.
+//   var list33 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[42]]];
+//                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:147:53: Error: Unexpected token 'if'.
+//   var list33 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[42]]];
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:147:17: Error: Unexpected token 'for'.
+//   var list33 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[42]]];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:148:66: Error: Unexpected token '...'.
+//   var set33 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[42]], null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:148:52: Error: Unexpected token 'if'.
+//   var set33 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[42]], null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:148:16: Error: Unexpected token 'for'.
+//   var set33 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[42]], null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:149:66: Error: Unexpected token '...'.
+//   var map33 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": [42]}, "baz": null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:149:52: Error: Unexpected token 'if'.
+//   var map33 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": [42]}, "baz": null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:149:16: Error: Unexpected token 'for'.
+//   var map33 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": [42]}, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:150:65: Error: Unexpected token '...'.
+//   List<List<int>> list40 = [for (int i = 0; oracle("foo"); i++) ...[[]]];
+//                                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:150:29: Error: Unexpected token 'for'.
+//   List<List<int>> list40 = [for (int i = 0; oracle("foo"); i++) ...[[]]];
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:151:63: Error: Unexpected token '...'.
+//   Set<List<int>> set40 = {for (int i = 0; oracle("foo"); i++) ...[[]], null};
+//                                                               ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:151:27: Error: Unexpected token 'for'.
+//   Set<List<int>> set40 = {for (int i = 0; oracle("foo"); i++) ...[[]], null};
+//                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:152:71: Error: Unexpected token '...'.
+//   Map<String, List<int>> map40 = {for (int i = 0; oracle("foo"); i++) ...{"bar": []}, "baz": null};
+//                                                                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:152:35: Error: Unexpected token 'for'.
+//   Map<String, List<int>> map40 = {for (int i = 0; oracle("foo"); i++) ...{"bar": []}, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:153:65: Error: Unexpected token '...'.
+//   List<List<int>> list41 = [for (int i = 0; oracle("foo"); i++) ...{[]}];
+//                                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:153:29: Error: Unexpected token 'for'.
+//   List<List<int>> list41 = [for (int i = 0; oracle("foo"); i++) ...{[]}];
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:154:63: Error: Unexpected token '...'.
+//   Set<List<int>> set41 = {for (int i = 0; oracle("foo"); i++) ...{[]}, null};
+//                                                               ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:154:27: Error: Unexpected token 'for'.
+//   Set<List<int>> set41 = {for (int i = 0; oracle("foo"); i++) ...{[]}, null};
+//                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:155:79: Error: Unexpected token '...'.
+//   List<List<int>> list42 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]]];
+//                                                                               ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:155:65: Error: Unexpected token 'if'.
+//   List<List<int>> list42 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]]];
+//                                                                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:155:29: Error: Unexpected token 'for'.
+//   List<List<int>> list42 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]]];
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:156:77: Error: Unexpected token '...'.
+//   Set<List<int>> set42 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]], null};
+//                                                                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:156:63: Error: Unexpected token 'if'.
+//   Set<List<int>> set42 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]], null};
+//                                                               ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:156:27: Error: Unexpected token 'for'.
+//   Set<List<int>> set42 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]], null};
+//                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:157:85: Error: Unexpected token '...'.
+//   Map<String, List<int>> map42 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": []}, "baz": null};
+//                                                                                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:157:71: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map42 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": []}, "baz": null};
+//                                                                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:157:35: Error: Unexpected token 'for'.
+//   Map<String, List<int>> map42 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": []}, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:158:59: Error: Unexpected token '...'.
+//   List<int> list50 = [for (int i = 0; oracle("foo"); i++) ...[]];
+//                                                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:158:23: Error: Unexpected token 'for'.
+//   List<int> list50 = [for (int i = 0; oracle("foo"); i++) ...[]];
+//                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:159:57: Error: Unexpected token '...'.
+//   Set<int> set50 = {for (int i = 0; oracle("foo"); i++) ...[], null};
+//                                                         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:159:21: Error: Unexpected token 'for'.
+//   Set<int> set50 = {for (int i = 0; oracle("foo"); i++) ...[], null};
+//                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:160:65: Error: Unexpected token '...'.
+//   Map<String, int> map50 = {for (int i = 0; oracle("foo"); i++) ...{}, "baz": null};
+//                                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:160:29: Error: Unexpected token 'for'.
+//   Map<String, int> map50 = {for (int i = 0; oracle("foo"); i++) ...{}, "baz": null};
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:161:59: Error: Unexpected token '...'.
+//   List<int> list51 = [for (int i = 0; oracle("foo"); i++) ...{}];
+//                                                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:161:23: Error: Unexpected token 'for'.
+//   List<int> list51 = [for (int i = 0; oracle("foo"); i++) ...{}];
+//                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:162:57: Error: Unexpected token '...'.
+//   Set<int> set51 = {for (int i = 0; oracle("foo"); i++) ...{}, null};
+//                                                         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:162:21: Error: Unexpected token 'for'.
+//   Set<int> set51 = {for (int i = 0; oracle("foo"); i++) ...{}, null};
+//                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:163:73: Error: Unexpected token '...'.
+//   List<int> list52 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[]];
+//                                                                         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:163:59: Error: Unexpected token 'if'.
+//   List<int> list52 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[]];
+//                                                           ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:163:23: Error: Unexpected token 'for'.
+//   List<int> list52 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[]];
+//                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:164:71: Error: Unexpected token '...'.
+//   Set<int> set52 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[], null};
+//                                                                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:164:57: Error: Unexpected token 'if'.
+//   Set<int> set52 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[], null};
+//                                                         ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:164:21: Error: Unexpected token 'for'.
+//   Set<int> set52 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[], null};
+//                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:165:65: Error: Unexpected token '...'.
+//   List<List<int>> list60 = [for (int i = 0; oracle("foo"); i++) ...[[]]];
+//                                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:165:29: Error: Unexpected token 'for'.
+//   List<List<int>> list60 = [for (int i = 0; oracle("foo"); i++) ...[[]]];
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:166:63: Error: Unexpected token '...'.
+//   Set<List<int>> set60 = {for (int i = 0; oracle("foo"); i++) ...[[]], null};
+//                                                               ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:166:27: Error: Unexpected token 'for'.
+//   Set<List<int>> set60 = {for (int i = 0; oracle("foo"); i++) ...[[]], null};
+//                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:167:71: Error: Unexpected token '...'.
+//   Map<String, List<int>> map60 = {for (int i = 0; oracle("foo"); i++) ...{"bar": []}, "baz": null};
+//                                                                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:167:35: Error: Unexpected token 'for'.
+//   Map<String, List<int>> map60 = {for (int i = 0; oracle("foo"); i++) ...{"bar": []}, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:168:79: Error: Unexpected token '...'.
+//   List<List<int>> list61 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]]];
+//                                                                               ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:168:65: Error: Unexpected token 'if'.
+//   List<List<int>> list61 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]]];
+//                                                                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:168:29: Error: Unexpected token 'for'.
+//   List<List<int>> list61 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]]];
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:169:77: Error: Unexpected token '...'.
+//   Set<List<int>> set61 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]], null};
+//                                                                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:169:63: Error: Unexpected token 'if'.
+//   Set<List<int>> set61 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]], null};
+//                                                               ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:169:27: Error: Unexpected token 'for'.
+//   Set<List<int>> set61 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]], null};
+//                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:170:85: Error: Unexpected token '...'.
+//   Map<String, List<int>> map61 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": []}, "baz": null};
+//                                                                                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:170:71: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map61 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": []}, "baz": null};
+//                                                                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:170:35: Error: Unexpected token 'for'.
+//   Map<String, List<int>> map61 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": []}, "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:171:29: Error: Unexpected token 'for'.
+//   List<List<int>> list70 = [for (int i = 0; oracle("foo"); i++) []];
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:172:27: Error: Unexpected token 'for'.
+//   Set<List<int>> set70 = {for (int i = 0; oracle("foo"); i++) [], null};
+//                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:173:35: Error: Unexpected token 'for'.
+//   Map<String, List<int>> map70 = {for (int i = 0; oracle("foo"); i++) "bar": [], "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:174:65: Error: Unexpected token 'if'.
+//   List<List<int>> list71 = [for (int i = 0; oracle("foo"); i++) if (oracle()) []];
+//                                                                 ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:174:29: Error: Unexpected token 'for'.
+//   List<List<int>> list71 = [for (int i = 0; oracle("foo"); i++) if (oracle()) []];
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:175:63: Error: Unexpected token 'if'.
+//   Set<List<int>> set71 = {for (int i = 0; oracle("foo"); i++) if (oracle()) [], null};
+//                                                               ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:175:27: Error: Unexpected token 'for'.
+//   Set<List<int>> set71 = {for (int i = 0; oracle("foo"); i++) if (oracle()) [], null};
+//                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:176:71: Error: Unexpected token 'if'.
+//   Map<String, List<int>> map71 = {for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": [], "baz": null};
+//                                                                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:176:35: Error: Unexpected token 'for'.
+//   Map<String, List<int>> map71 = {for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": [], "baz": null};
+//                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:177:53: Error: Unexpected token 'if'.
+//   var list80 = [for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14];
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:177:17: Error: Unexpected token 'for'.
+//   var list80 = [for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:178:52: Error: Unexpected token 'if'.
+//   var set80 = {for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14, null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:178:16: Error: Unexpected token 'for'.
+//   var set80 = {for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:179:52: Error: Unexpected token 'if'.
+//   var map80 = {for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else "bar": 3.14, "baz": null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:179:16: Error: Unexpected token 'for'.
+//   var map80 = {for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else "bar": 3.14, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:180:67: Error: Unexpected token '...'.
+//   var list81 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble];
+//                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:180:83: Error: Unexpected token '...'.
+//   var list81 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble];
+//                                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:180:53: Error: Unexpected token 'if'.
+//   var list81 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble];
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:180:17: Error: Unexpected token 'for'.
+//   var list81 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:181:66: Error: Unexpected token '...'.
+//   var set81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble, null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:181:82: Error: Unexpected token '...'.
+//   var set81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble, null};
+//                                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:181:52: Error: Unexpected token 'if'.
+//   var set81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble, null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:181:16: Error: Unexpected token 'for'.
+//   var set81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:182:66: Error: Unexpected token '...'.
+//   var map81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...mapStringDouble, "baz": null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:182:87: Error: Unexpected token '...'.
+//   var map81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...mapStringDouble, "baz": null};
+//                                                                                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:182:52: Error: Unexpected token 'if'.
+//   var map81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...mapStringDouble, "baz": null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:182:16: Error: Unexpected token 'for'.
+//   var map81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...mapStringDouble, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:183:67: Error: Unexpected token '...'.
+//   var list82 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar];
+//                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:183:83: Error: Unexpected token '...'.
+//   var list82 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar];
+//                                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:183:53: Error: Unexpected token 'if'.
+//   var list82 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar];
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:183:17: Error: Unexpected token 'for'.
+//   var list82 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:184:66: Error: Unexpected token '...'.
+//   var set82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar, null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:184:82: Error: Unexpected token '...'.
+//   var set82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar, null};
+//                                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:184:52: Error: Unexpected token 'if'.
+//   var set82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar, null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:184:16: Error: Unexpected token 'for'.
+//   var set82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:185:66: Error: Unexpected token '...'.
+//   var map82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...dynVar, "baz": null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:185:87: Error: Unexpected token '...'.
+//   var map82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...dynVar, "baz": null};
+//                                                                                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:185:52: Error: Unexpected token 'if'.
+//   var map82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...dynVar, "baz": null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:185:16: Error: Unexpected token 'for'.
+//   var map82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...dynVar, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:186:75: Error: Unexpected token '...'.
+//   var list83 = [for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...listDouble];
+//                                                                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:186:53: Error: Unexpected token 'if'.
+//   var list83 = [for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...listDouble];
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:186:17: Error: Unexpected token 'for'.
+//   var list83 = [for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...listDouble];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:187:66: Error: Unexpected token '...'.
+//   var set83 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else 3.14, null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:187:52: Error: Unexpected token 'if'.
+//   var set83 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else 3.14, null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:187:16: Error: Unexpected token 'for'.
+//   var set83 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else 3.14, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:188:66: Error: Unexpected token '...'.
+//   var map83 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else "bar": 3.14, "baz": null};
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:188:52: Error: Unexpected token 'if'.
+//   var map83 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else "bar": 3.14, "baz": null};
+//                                                    ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:188:16: Error: Unexpected token 'for'.
+//   var map83 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else "bar": 3.14, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:189:23: Error: Unexpected token 'for'.
+//   List<int> list90 = [for (int i = 0; oracle("foo"); i++) dynVar];
+//                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:190:21: Error: Unexpected token 'for'.
+//   Set<int> set90 = {for (int i = 0; oracle("foo"); i++) dynVar, null};
+//                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:191:29: Error: Unexpected token 'for'.
+//   Map<String, int> map90 = {for (int i = 0; oracle("foo"); i++) "bar": dynVar, "baz": null};
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:192:59: Error: Unexpected token '...'.
+//   List<int> list91 = [for (int i = 0; oracle("foo"); i++) ...dynVar];
+//                                                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:192:23: Error: Unexpected token 'for'.
+//   List<int> list91 = [for (int i = 0; oracle("foo"); i++) ...dynVar];
+//                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:193:57: Error: Unexpected token '...'.
+//   Set<int> set91 = {for (int i = 0; oracle("foo"); i++) ...dynVar, null};
+//                                                         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:193:21: Error: Unexpected token 'for'.
+//   Set<int> set91 = {for (int i = 0; oracle("foo"); i++) ...dynVar, null};
+//                     ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:194:65: Error: Unexpected token '...'.
+//   Map<String, int> map91 = {for (int i = 0; oracle("foo"); i++) ...dynVar, "baz": null};
+//                                                                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:194:29: Error: Unexpected token 'for'.
+//   Map<String, int> map91 = {for (int i = 0; oracle("foo"); i++) ...dynVar, "baz": null};
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:195:29: Error: Unexpected token 'for'.
+//   List<int> list100 = <int>[for (index = 0; oracle("foo"); index++) 42];
+//                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:196:27: Error: Unexpected token 'for'.
+//   Set<int> set100 = <int>{for (index = 0; oracle("foo"); index++) 42};
+//                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:197:43: Error: Unexpected token 'for'.
+//   Map<String, int> map100 = <String, int>{for (index = 0; oracle("foo"); index++) "bar": 42};
+//                                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:198:18: Error: Unexpected token 'for'.
+//   var list110 = [for (var i in [1, 2, 3]) i];
+//                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:199:17: Error: Unexpected token 'for'.
+//   var set110 = {for (var i in [1, 2, 3]) i, null};
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:200:17: Error: Unexpected token 'for'.
+//   var map110 = {for (var i in [1, 2, 3]) "bar": i, "baz": null};
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:201:24: Error: Unexpected token 'for'.
+//   List<int> list120 = [for (var i in dynVar) i];
+//                        ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:202:22: Error: Unexpected token 'for'.
+//   Set<int> set120 = {for (var i in dynVar) i, null};
+//                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:203:30: Error: Unexpected token 'for'.
+//   Map<String, int> map120 = {for (var i in dynVar) "bar": i, "baz": null};
+//                              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:204:24: Error: Unexpected token 'for'.
+//   List<int> list130 = [for (var i = 1; i < 2; i++) i];
+//                        ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:205:22: Error: Unexpected token 'for'.
+//   Set<int> set130 = {for (var i = 1; i < 2; i++) i};
+//                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:206:27: Error: Unexpected token 'for'.
+//   Map<int, int> map130 = {for (var i = 1; i < 2; i++) i: i};
+//                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:210:9: Error: Unexpected token 'for'.
+//   <int>[for (int i = 0; oracle("foo"); i++) "bar"];
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:211:9: Error: Unexpected token 'for'.
+//   <int>{for (int i = 0; oracle("foo"); i++) "bar", null};
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:212:14: Error: Unexpected token 'for'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) "bar": "bar", "baz": null};
+//              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:213:45: Error: Unexpected token '...'.
+//   <int>[for (int i = 0; oracle("foo"); i++) ...["bar"]];
+//                                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:213:9: Error: Unexpected token 'for'.
+//   <int>[for (int i = 0; oracle("foo"); i++) ...["bar"]];
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:214:45: Error: Unexpected token '...'.
+//   <int>{for (int i = 0; oracle("foo"); i++) ...["bar"], null};
+//                                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:214:9: Error: Unexpected token 'for'.
+//   <int>{for (int i = 0; oracle("foo"); i++) ...["bar"], null};
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:215:50: Error: Unexpected token '...'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) ...{"bar": "bar"}, "baz": null};
+//                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:215:14: Error: Unexpected token 'for'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) ...{"bar": "bar"}, "baz": null};
+//              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:216:45: Error: Unexpected token '...'.
+//   <int>[for (int i = 0; oracle("foo"); i++) ...map];
+//                                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:216:9: Error: Unexpected token 'for'.
+//   <int>[for (int i = 0; oracle("foo"); i++) ...map];
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:217:45: Error: Unexpected token '...'.
+//   <int>{for (int i = 0; oracle("foo"); i++) ...map, null};
+//                                             ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:217:9: Error: Unexpected token 'for'.
+//   <int>{for (int i = 0; oracle("foo"); i++) ...map, null};
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:218:50: Error: Unexpected token '...'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) ...list, 42: null};
+//                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:218:14: Error: Unexpected token 'for'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) ...list, 42: null};
+//              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:219:48: Error: Unexpected token 'if'.
+//   <String>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14];
+//                                                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:219:12: Error: Unexpected token 'for'.
+//   <String>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14];
+//            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:220:48: Error: Unexpected token 'if'.
+//   <String>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14, null};
+//                                                ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:220:12: Error: Unexpected token 'for'.
+//   <String>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14, null};
+//            ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:221:56: Error: Unexpected token 'if'.
+//   <String, String>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else "bar": 3.14, "baz": null};
+//                                                        ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:221:20: Error: Unexpected token 'for'.
+//   <String, String>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else "bar": 3.14, "baz": null};
+//                    ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:222:59: Error: Unexpected token '...'.
+//   <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42];
+//                                                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:222:45: Error: Unexpected token 'if'.
+//   <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42];
+//                                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:222:9: Error: Unexpected token 'for'.
+//   <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42];
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:223:59: Error: Unexpected token '...'.
+//   <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42, null};
+//                                                           ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:223:45: Error: Unexpected token 'if'.
+//   <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42, null};
+//                                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:223:9: Error: Unexpected token 'for'.
+//   <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42, null};
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:224:67: Error: Unexpected token '...'.
+//   <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...list else "bar": 42, "baz": null};
+//                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:224:53: Error: Unexpected token 'if'.
+//   <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...list else "bar": 42, "baz": null};
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:224:17: Error: Unexpected token 'for'.
+//   <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...list else "bar": 42, "baz": null};
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:225:67: Error: Unexpected token '...'.
+//   <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map];
+//                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:225:45: Error: Unexpected token 'if'.
+//   <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map];
+//                                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:225:9: Error: Unexpected token 'for'.
+//   <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map];
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:226:67: Error: Unexpected token '...'.
+//   <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map, null};
+//                                                                   ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:226:45: Error: Unexpected token 'if'.
+//   <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map, null};
+//                                             ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:226:9: Error: Unexpected token 'for'.
+//   <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map, null};
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:227:82: Error: Unexpected token '...'.
+//   <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else ...list, "baz": null};
+//                                                                                  ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:227:53: Error: Unexpected token 'if'.
+//   <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else ...list, "baz": null};
+//                                                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:227:17: Error: Unexpected token 'for'.
+//   <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else ...list, "baz": null};
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:230:9: Error: Unexpected token 'for'.
+//   <int>[for (i in <int>[1]) i];
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:231:9: Error: Unexpected token 'for'.
+//   <int>{for (i in <int>[1]) i, null};
+//         ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:232:16: Error: Unexpected token 'for'.
+// 	<String, int>{for (i in <int>[1]) "bar": i, "baz": null};
+// 	              ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:234:17: Error: Unexpected token 'for'.
+//   var list10 = [for (var i in "not iterable") i];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:235:16: Error: Unexpected token 'for'.
+//   var set10 = {for (var i in "not iterable") i, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:236:16: Error: Unexpected token 'for'.
+//   var map10 = {for (var i in "not iterable") "bar": i, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:237:17: Error: Unexpected token 'for'.
+//   var list20 = [for (int i in ["not", "int"]) i];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:238:16: Error: Unexpected token 'for'.
+//   var set20 = {for (int i in ["not", "int"]) i, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:239:16: Error: Unexpected token 'for'.
+//   var map20 = {for (int i in ["not", "int"]) "bar": i, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:240:23: Error: Unexpected token 'for'.
+//   var list30 = [await for (var i in "not stream") i];
+//                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:241:22: Error: Unexpected token 'for'.
+//   var set30 = {await for (var i in "not stream") i, null};
+//                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:242:22: Error: Unexpected token 'for'.
+//   var map30 = {await for (var i in "not stream") "bar": i, "baz": null};
+//                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:243:23: Error: Unexpected token 'for'.
+//   var list40 = [await for (int i in Stream.fromIterable(["not", "int"])) i];
+//                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:244:22: Error: Unexpected token 'for'.
+//   var set40 = {await for (int i in Stream.fromIterable(["not", "int"])) i, null};
+//                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:245:22: Error: Unexpected token 'for'.
+//   var map40 = {await for (int i in Stream.fromIterable(["not", "int"])) "bar": i, "baz": null};
+//                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:246:17: Error: The keyword 'await' isn't allowed for a normal 'for' statement.
+// Try removing the keyword, or use a for-each statement.
+//   var list50 = [await for (;;) 42];
+//                 ^^^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:246:23: Error: Unexpected token 'for'.
+//   var list50 = [await for (;;) 42];
+//                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:247:16: Error: The keyword 'await' isn't allowed for a normal 'for' statement.
+// Try removing the keyword, or use a for-each statement.
+//   var set50 = {await for (;;) 42, null};
+//                ^^^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:247:22: Error: Unexpected token 'for'.
+//   var set50 = {await for (;;) 42, null};
+//                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:248:16: Error: The keyword 'await' isn't allowed for a normal 'for' statement.
+// Try removing the keyword, or use a for-each statement.
+//   var map50 = {await for (;;) "bar": 42, "baz": null};
+//                ^^^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:248:22: Error: Unexpected token 'for'.
+//   var map50 = {await for (;;) "bar": 42, "baz": null};
+//                      ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:249:17: Error: Unexpected token 'for'.
+//   var list60 = [for (; "not bool";) 42];
+//                 ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:250:16: Error: Unexpected token 'for'.
+//   var set60 = {for (; "not bool";) 42, null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:251:16: Error: Unexpected token 'for'.
+//   var map60 = {for (; "not bool";) "bar": 42, "baz": null};
+//                ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:255:26: Error: The asynchronous for-in can only be used in functions marked with 'async' or 'async*'.
+// Try marking the function body with either 'async' or 'async*', or removing the 'await' before the for loop.
+//   <int>[await for (int i in stream) i];
+//                          ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:255:15: Error: Unexpected token 'for'.
+//   <int>[await for (int i in stream) i];
+//               ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:256:26: Error: The asynchronous for-in can only be used in functions marked with 'async' or 'async*'.
+// Try marking the function body with either 'async' or 'async*', or removing the 'await' before the for loop.
+//   <int>{await for (int i in stream) i};
+//                          ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:256:15: Error: Unexpected token 'for'.
+//   <int>{await for (int i in stream) i};
+//               ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:257:34: Error: The asynchronous for-in can only be used in functions marked with 'async' or 'async*'.
+// Try marking the function body with either 'async' or 'async*', or removing the 'await' before the for loop.
+//   <String, int>{await for (int i in stream) "bar": i};
+//                                  ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:257:23: Error: Unexpected token 'for'.
+//   <String, int>{await for (int i in stream) "bar": i};
+//                       ^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:267:23: Error: Unexpected token 'if'.
+//   List<int> list10 = [if (a is B) a.foo];
+//                       ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:268:21: Error: Unexpected token 'if'.
+//   Set<int> set10 = {if (a is B) a.foo};
+//                     ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:269:26: Error: Unexpected token 'if'.
+//   Map<int, int> map10 = {if (a is B) a.foo: a.foo};
+//                          ^^
+//
+import self as self;
+import "dart:core" as core;
+import "dart:async" as asy;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+class B extends self::A {
+  synthetic constructor •() → self::B
+    : super self::A::•()
+    ;
+  get foo() → core::int
+    return 42;
+}
+static method oracle<T extends core::Object = dynamic>([self::oracle::T t = null]) → dynamic
+  return true;
+static method testIfElement(dynamic dynVar, core::List<core::int> listInt, core::List<core::double> listDouble, core::Map<core::String, core::int> mapToInt, core::Map<core::String, core::double> mapToDouble) → dynamic {
+  dynamic list10 = <dynamic>[];
+  dynamic set10 = <dynamic>{null};
+  dynamic map10 = <dynamic, dynamic>{"baz": null};
+  dynamic list11 = <dynamic>[];
+  dynamic set11 = <dynamic>{null};
+  dynamic map11 = <dynamic, dynamic>{"baz": null};
+  dynamic list12 = <dynamic>[];
+  dynamic set12 = <dynamic>{null};
+  dynamic map12 = <dynamic, dynamic>{"baz": null};
+  dynamic list20 = <dynamic>[];
+  dynamic set20 = <dynamic>{null};
+  dynamic map20 = <dynamic, dynamic>{"baz": null};
+  dynamic list21 = <dynamic>[];
+  dynamic set21 = <dynamic>{null};
+  dynamic map21 = <dynamic, dynamic>{"baz": null};
+  dynamic list22 = <dynamic>[];
+  dynamic set22 = <dynamic>{null};
+  dynamic map22 = <dynamic, dynamic>{"baz": null};
+  dynamic list30 = <dynamic>[];
+  dynamic set30 = <dynamic>{null};
+  dynamic map30 = <dynamic, dynamic>{"baz": null};
+  dynamic list31 = <dynamic>[];
+  dynamic set31 = <dynamic>{null};
+  dynamic map31 = <dynamic, dynamic>{"baz": null};
+  dynamic list33 = <dynamic>[];
+  dynamic set33 = <dynamic>{null};
+  dynamic map33 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list40 = <dynamic>[];
+  core::Set<core::List<core::int>> set40 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map40 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list41 = <dynamic>[];
+  core::Set<core::List<core::int>> set41 = <dynamic>{null};
+  core::List<core::List<core::int>> list42 = <dynamic>[];
+  core::Set<core::List<core::int>> set42 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map42 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list50 = <dynamic>[];
+  core::Set<core::int> set50 = <dynamic>{null};
+  core::Map<core::String, core::int> map50 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list51 = <dynamic>[];
+  core::Set<core::int> set51 = <dynamic>{null};
+  core::List<core::int> list52 = <dynamic>[];
+  core::Set<core::int> set52 = <dynamic>{null};
+  core::Map<core::String, core::int> map52 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list60 = <dynamic>[];
+  core::Set<core::List<core::int>> set60 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map60 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list61 = <dynamic>[];
+  core::Set<core::List<core::int>> set61 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map61 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list70 = <dynamic>[];
+  core::Set<core::List<core::int>> set70 = <dynamic>{null};
+  core::List<core::List<core::int>> list71 = <dynamic>[];
+  core::Set<core::List<core::int>> set71 = <dynamic>{null};
+  dynamic list80 = <dynamic>[];
+  dynamic set80 = <dynamic>{null};
+  dynamic map80 = <dynamic, dynamic>{"baz": null};
+  dynamic list81 = <dynamic>[];
+  dynamic set81 = <dynamic>{null};
+  dynamic map81 = <dynamic, dynamic>{"baz": null};
+  dynamic list82 = <dynamic>[];
+  dynamic set82 = <dynamic>{null};
+  dynamic map82 = <dynamic>{null};
+  dynamic list83 = <dynamic>[];
+  dynamic set83 = <dynamic>{null};
+  dynamic map83 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list90 = <dynamic>[];
+  core::Set<core::int> set90 = <dynamic>{null};
+  core::Map<core::String, core::int> map90 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list91 = <dynamic>[];
+  core::Set<core::int> set91 = <dynamic>{null};
+  core::Map<core::String, core::int> map91 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list100 = <dynamic>[];
+  core::Set<core::int> set100 = <dynamic, dynamic>{};
+  core::Map<core::int, core::int> map100 = <dynamic, dynamic>{};
+}
+static method testIfElementErrors(core::Map<core::int, core::int> map) → dynamic {
+  <core::int>[];
+  <core::int>{null};
+  <core::String, core::int>{"baz": null};
+  <core::int>[];
+  <core::int>{null};
+  <core::String, core::int>{"baz": null};
+  <core::int>[];
+  <core::int>{null};
+  <core::String, core::int>{"baz": null};
+  <core::String>[];
+  <core::String>{null};
+  <core::String, core::String>{"baz": null};
+  <core::int>[];
+  <core::int>{null};
+  <core::String, core::int>{"baz": null};
+  <core::int>[];
+  <core::int>{null};
+  <core::String, core::int>{"baz": null};
+  core::Set<dynamic> set10 = <dynamic, dynamic>{};
+  core::Map<dynamic, dynamic> map10 = <dynamic, dynamic>{};
+  core::Set<dynamic> set11 = <dynamic, dynamic>{};
+  core::Map<dynamic, dynamic> map11 = <dynamic, dynamic>{};
+  dynamic map12 = <dynamic, dynamic>{};
+  dynamic map13 = <dynamic, dynamic>{};
+  core::List<core::int> list20 = <dynamic>[];
+  core::Set<core::int> set20 = <dynamic, dynamic>{};
+  core::Map<core::int, core::int> map30 = <dynamic, dynamic>{};
+  core::List<core::String> list40 = <core::String>[];
+  core::Set<core::String> set40 = <core::String>{};
+  core::Map<core::String, core::int> map40 = <core::String, core::int>{};
+  core::Map<core::int, core::String> map41 = <core::int, core::String>{};
+}
+static method testForElement(dynamic dynVar, core::List<core::int> listInt, core::List<core::double> listDouble, core::int index, core::Map<core::String, core::int> mapStringInt, core::Map<core::String, core::double> mapStringDouble) → dynamic {
+  dynamic list10 = <dynamic>[];
+  dynamic set10 = <dynamic>{null};
+  dynamic map10 = <dynamic, dynamic>{"baz": null};
+  dynamic list11 = <dynamic>[];
+  dynamic set11 = <dynamic>{null};
+  dynamic map11 = <dynamic, dynamic>{"baz": null};
+  dynamic list12 = <dynamic>[];
+  dynamic set12 = <dynamic>{null};
+  dynamic map12 = <dynamic, dynamic>{"baz": null};
+  dynamic list20 = <dynamic>[];
+  dynamic set20 = <dynamic>{null};
+  dynamic map20 = <dynamic, dynamic>{"baz": null};
+  dynamic list21 = <dynamic>[];
+  dynamic set21 = <dynamic>{null};
+  dynamic map21 = <dynamic, dynamic>{"baz": null};
+  dynamic list22 = <dynamic>[];
+  dynamic set22 = <dynamic>{null};
+  dynamic map22 = <dynamic, dynamic>{"baz": null};
+  dynamic list30 = <dynamic>[];
+  dynamic set30 = <dynamic>{null};
+  dynamic map30 = <dynamic, dynamic>{"baz": null};
+  dynamic list31 = <dynamic>[];
+  dynamic set31 = <dynamic>{null};
+  dynamic map31 = <dynamic, dynamic>{"baz": null};
+  dynamic list33 = <dynamic>[];
+  dynamic set33 = <dynamic>{null};
+  dynamic map33 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list40 = <dynamic>[];
+  core::Set<core::List<core::int>> set40 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map40 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list41 = <dynamic>[];
+  core::Set<core::List<core::int>> set41 = <dynamic>{null};
+  core::List<core::List<core::int>> list42 = <dynamic>[];
+  core::Set<core::List<core::int>> set42 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map42 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list50 = <dynamic>[];
+  core::Set<core::int> set50 = <dynamic>{null};
+  core::Map<core::String, core::int> map50 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list51 = <dynamic>[];
+  core::Set<core::int> set51 = <dynamic>{null};
+  core::List<core::int> list52 = <dynamic>[];
+  core::Set<core::int> set52 = <dynamic>{null};
+  core::List<core::List<core::int>> list60 = <dynamic>[];
+  core::Set<core::List<core::int>> set60 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map60 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list61 = <dynamic>[];
+  core::Set<core::List<core::int>> set61 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map61 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list70 = <dynamic>[];
+  core::Set<core::List<core::int>> set70 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map70 = <dynamic, dynamic>{"baz": null};
+  core::List<core::List<core::int>> list71 = <dynamic>[];
+  core::Set<core::List<core::int>> set71 = <dynamic>{null};
+  core::Map<core::String, core::List<core::int>> map71 = <dynamic, dynamic>{"baz": null};
+  dynamic list80 = <dynamic>[];
+  dynamic set80 = <dynamic>{null};
+  dynamic map80 = <dynamic, dynamic>{"baz": null};
+  dynamic list81 = <dynamic>[];
+  dynamic set81 = <dynamic>{null};
+  dynamic map81 = <dynamic, dynamic>{"baz": null};
+  dynamic list82 = <dynamic>[];
+  dynamic set82 = <dynamic>{null};
+  dynamic map82 = <dynamic, dynamic>{"baz": null};
+  dynamic list83 = <dynamic>[];
+  dynamic set83 = <dynamic>{null};
+  dynamic map83 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list90 = <dynamic>[];
+  core::Set<core::int> set90 = <dynamic>{null};
+  core::Map<core::String, core::int> map90 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list91 = <dynamic>[];
+  core::Set<core::int> set91 = <dynamic>{null};
+  core::Map<core::String, core::int> map91 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list100 = <core::int>[];
+  core::Set<core::int> set100 = <core::int>{};
+  core::Map<core::String, core::int> map100 = <core::String, core::int>{};
+  dynamic list110 = <dynamic>[];
+  dynamic set110 = <dynamic>{null};
+  dynamic map110 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list120 = <dynamic>[];
+  core::Set<core::int> set120 = <dynamic>{null};
+  core::Map<core::String, core::int> map120 = <dynamic, dynamic>{"baz": null};
+  core::List<core::int> list130 = <dynamic>[];
+  core::Set<core::int> set130 = <dynamic, dynamic>{};
+  core::Map<core::int, core::int> map130 = <dynamic, dynamic>{};
+}
+static method testForElementErrors(core::Map<core::int, core::int> map, core::List<core::int> list) → dynamic /* originally async */ {
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
+  asy::FutureOr<dynamic> :return_value;
+  dynamic :async_stack_trace;
+  dynamic :async_op_then;
+  dynamic :async_op_error;
+  dynamic :await_jump_var = 0;
+  dynamic :await_ctx_var;
+  function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
+    try {
+      #L1:
+      {
+        <core::int>[];
+        <core::int>{null};
+        <core::int, core::int>{"baz": null};
+        <core::int>[];
+        <core::int>{null};
+        <core::int, core::int>{"baz": null};
+        <core::int>[];
+        <core::int>{null};
+        <core::int, core::int>{42: null};
+        <core::String>[];
+        <core::String>{null};
+        <core::String, core::String>{"baz": null};
+        <core::int>[];
+        <core::int>{null};
+        <core::String, core::int>{"baz": null};
+        <core::int>[];
+        <core::int>{null};
+        <core::String, core::int>{"baz": null};
+        final dynamic i = 0;
+        <core::int>[];
+        <core::int>{null};
+        <core::String, core::int>{"baz": null};
+        dynamic list10 = <dynamic>[];
+        dynamic set10 = <dynamic>{null};
+        dynamic map10 = <dynamic, dynamic>{"baz": null};
+        dynamic list20 = <dynamic>[];
+        dynamic set20 = <dynamic>{null};
+        dynamic map20 = <dynamic, dynamic>{"baz": null};
+        dynamic list30 = <dynamic>[];
+        dynamic set30 = <dynamic>{null};
+        dynamic map30 = <dynamic, dynamic>{"baz": null};
+        dynamic list40 = <dynamic>[];
+        dynamic set40 = <dynamic>{null};
+        dynamic map40 = <dynamic, dynamic>{"baz": null};
+        dynamic list50 = <dynamic>[];
+        dynamic set50 = <dynamic>{null};
+        dynamic map50 = <dynamic, dynamic>{"baz": null};
+        dynamic list60 = <dynamic>[];
+        dynamic set60 = <dynamic>{null};
+        dynamic map60 = <dynamic, dynamic>{"baz": null};
+      }
+      asy::_completeOnAsyncReturn(:async_completer, :return_value);
+      return;
+    }
+    on dynamic catch(dynamic :exception, dynamic :stack_trace) {
+      :async_completer.{asy::Completer::completeError}(:exception, :stack_trace);
+    }
+  :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
+  :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
+  :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
+  :async_completer.start(:async_op);
+  return :async_completer.{asy::Completer::future};
+}
+static method testForElementErrorsNotAsync(asy::Stream<core::int> stream) → dynamic {
+  <core::int>[];
+  <core::int>{};
+  <core::String, core::int>{};
+}
+static method testPromotion(self::A a) → dynamic {
+  core::List<core::int> list10 = <dynamic>[];
+  core::Set<core::int> set10 = <dynamic, dynamic>{};
+  core::Map<core::int, core::int> map10 = <dynamic, dynamic>{};
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/control_flow_collection_inference.dart.outline.expect b/pkg/front_end/testcases/control_flow_collection_inference.dart.outline.expect
new file mode 100644
index 0000000..c40231f
--- /dev/null
+++ b/pkg/front_end/testcases/control_flow_collection_inference.dart.outline.expect
@@ -0,0 +1,31 @@
+library;
+import self as self;
+import "dart:core" as core;
+import "dart:async" as asy;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    ;
+}
+class B extends self::A {
+  synthetic constructor •() → self::B
+    ;
+  get foo() → core::int
+    ;
+}
+static method oracle<T extends core::Object = dynamic>([self::oracle::T t]) → dynamic
+  ;
+static method testIfElement(dynamic dynVar, core::List<core::int> listInt, core::List<core::double> listDouble, core::Map<core::String, core::int> mapToInt, core::Map<core::String, core::double> mapToDouble) → dynamic
+  ;
+static method testIfElementErrors(core::Map<core::int, core::int> map) → dynamic
+  ;
+static method testForElement(dynamic dynVar, core::List<core::int> listInt, core::List<core::double> listDouble, core::int index, core::Map<core::String, core::int> mapStringInt, core::Map<core::String, core::double> mapStringDouble) → dynamic
+  ;
+static method testForElementErrors(core::Map<core::int, core::int> map, core::List<core::int> list) → dynamic
+  ;
+static method testForElementErrorsNotAsync(asy::Stream<core::int> stream) → dynamic
+  ;
+static method testPromotion(self::A a) → dynamic
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/control_flow_collection_inference.dart.strong.expect b/pkg/front_end/testcases/control_flow_collection_inference.dart.strong.expect
new file mode 100644
index 0000000..c3b0f74
--- /dev/null
+++ b/pkg/front_end/testcases/control_flow_collection_inference.dart.strong.expect
@@ -0,0 +1,2313 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:39:34: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
+//   Map<String, List<int>> map40 = {if (oracle("foo")) ...{"bar", []}, "baz": null};
+//                                  ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:71:38: Error: Unexpected type 'Map<String, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   var map82 = {if (oracle("foo")) ...mapToInt else ...dynVar, null};
+//                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:106:44: Error: Expected ':' after this.
+//   Set<dynamic> set10 = {if (oracle("foo")) 42 else "bar": 3.14};
+//                                            ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:107:53: Error: Expected ':' after this.
+//   Map<dynamic, dynamic> map10 = {if (oracle("foo")) 42 else "bar": 3.14};
+//                                                     ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:108:61: Error: Expected ':' after this.
+//   Set<dynamic> set11 = {if (oracle("foo")) "bar": 3.14 else 42};
+//                                                             ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:109:70: Error: Expected ':' after this.
+//   Map<dynamic, dynamic> map11 = {if (oracle("foo")) "bar": 3.14 else 42};
+//                                                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:110:35: Error: Expected ':' after this.
+//   var map12 = {if (oracle("foo")) 42 else "bar": 3.14};
+//                                   ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:111:52: Error: Expected ':' after this.
+//   var map13 = {if (oracle("foo")) "bar": 3.14 else 42};
+//                                                    ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:87:28: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int>[if (oracle("foo")) "bar"];
+//                            ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:88:28: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int>{if (oracle("foo")) "bar", null};
+//                            ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:89:43: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <String, int>{if (oracle("foo")) "bar": "bar", "baz": null};
+//                                           ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:90:32: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int>[if (oracle("foo")) ...["bar"]];
+//                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:91:32: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int>{if (oracle("foo")) ...["bar"], null};
+//                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:92:47: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <String, int>{if (oracle("foo")) ...{"bar": "bar"}, "baz": null};
+//                                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:93:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>[if (oracle("foo")) ...map];
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:94:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>{if (oracle("foo")) ...map, null};
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:95:39: Error: Unexpected type 'List<String>' of a map spread entry.  Expected 'dynamic' or a Map.
+//  - 'List' is from 'dart:core'.
+//   <String, int>{if (oracle("foo")) ...["bar"], "baz": null};
+//                                       ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:96:31: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String>[if (oracle("foo")) 42 else 3.14];
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:96:39: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String>[if (oracle("foo")) 42 else 3.14];
+//                                       ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:97:31: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String>{if (oracle("foo")) 42 else 3.14, null};
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:97:39: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String>{if (oracle("foo")) 42 else 3.14, null};
+//                                       ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:98:46: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String, String>{if (oracle("foo")) "bar": 42 else "baz": 3.14, "baz": null};
+//                                              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:98:61: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String, String>{if (oracle("foo")) "bar": 42 else "baz": 3.14, "baz": null};
+//                                                             ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:99:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>[if (oracle("foo")) ...map else 42];
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:100:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>{if (oracle("foo")) ...map else 42, null};
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:101:39: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+//  - 'List' is from 'dart:core'.
+//   <String, int>{if (oracle("foo")) ...[42] else "bar": 42, "baz": null};
+//                                       ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:102:39: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>[if (oracle("foo")) 42 else ...map];
+//                                       ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:103:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>{if (oracle("foo")) ...map else 42, null};
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:104:54: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+//  - 'List' is from 'dart:core'.
+//   <String, int>{if (oracle("foo")) "bar": 42 else ...[42], "baz": null};
+//                                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:106:24: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
+//   Set<dynamic> set10 = {if (oracle("foo")) 42 else "bar": 3.14};
+//                        ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:108:24: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
+//   Set<dynamic> set11 = {if (oracle("foo")) "bar": 3.14 else 42};
+//                        ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:112:27: Error: A value of type 'int' can't be assigned to a variable of type 'bool'.
+// Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+//   List<int> list20 = [if (42) 42];
+//                           ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:113:25: Error: A value of type 'int' can't be assigned to a variable of type 'bool'.
+// Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+//   Set<int> set20 = {if (42) 42};
+//                         ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:114:30: Error: A value of type 'int' can't be assigned to a variable of type 'bool'.
+// Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+//   Map<int, int> map30 = {if (42) 42: 42};
+//                              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:115:53: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   List<String> list40 = <String>[if (oracle("foo")) true else 42];
+//                                                     ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:115:63: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   List<String> list40 = <String>[if (oracle("foo")) true else 42];
+//                                                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:116:51: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   Set<String> set40 = <String>{if (oracle("foo")) true else 42};
+//                                                   ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:116:61: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   Set<String> set40 = <String>{if (oracle("foo")) true else 42};
+//                                                             ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:117:61: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   Map<String, int> map40 = <String, int>{if (oracle("foo")) true: 42 else 42: 42};
+//                                                             ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:117:75: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   Map<String, int> map40 = <String, int>{if (oracle("foo")) true: 42 else 42: 42};
+//                                                                           ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:118:65: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   Map<int, String> map41 = <int, String>{if (oracle("foo")) 42: true else 42: 42};
+//                                                                 ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:118:79: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   Map<int, String> map41 = <int, String>{if (oracle("foo")) 42: true else 42: 42};
+//                                                                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:230:14: Error: Setter not found: 'i'.
+//   <int>[for (i in <int>[1]) i];
+//              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:231:14: Error: Setter not found: 'i'.
+//   <int>{for (i in <int>[1]) i, null};
+//              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:232:21: Error: Setter not found: 'i'.
+// 	<String, int>{for (i in <int>[1]) "bar": i, "baz": null};
+// 	                   ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:246:17: Error: The keyword 'await' isn't allowed for a normal 'for' statement.
+// Try removing the keyword, or use a for-each statement.
+//   var list50 = [await for (;;) 42];
+//                 ^^^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:247:16: Error: The keyword 'await' isn't allowed for a normal 'for' statement.
+// Try removing the keyword, or use a for-each statement.
+//   var set50 = {await for (;;) 42, null};
+//                ^^^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:248:16: Error: The keyword 'await' isn't allowed for a normal 'for' statement.
+// Try removing the keyword, or use a for-each statement.
+//   var map50 = {await for (;;) "bar": 42, "baz": null};
+//                ^^^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:210:45: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int>[for (int i = 0; oracle("foo"); i++) "bar"];
+//                                             ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:211:45: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int>{for (int i = 0; oracle("foo"); i++) "bar", null};
+//                                             ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:212:50: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) "bar": "bar", "baz": null};
+//                                                  ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:212:57: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) "bar": "bar", "baz": null};
+//                                                         ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:212:64: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) "bar": "bar", "baz": null};
+//                                                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:213:49: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int>[for (int i = 0; oracle("foo"); i++) ...["bar"]];
+//                                                 ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:214:49: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int>{for (int i = 0; oracle("foo"); i++) ...["bar"], null};
+//                                                 ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:215:54: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) ...{"bar": "bar"}, "baz": null};
+//                                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:215:61: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) ...{"bar": "bar"}, "baz": null};
+//                                                             ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:215:69: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) ...{"bar": "bar"}, "baz": null};
+//                                                                     ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:216:48: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>[for (int i = 0; oracle("foo"); i++) ...map];
+//                                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:217:48: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>{for (int i = 0; oracle("foo"); i++) ...map, null};
+//                                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:218:53: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+//  - 'List' is from 'dart:core'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) ...list, 42: null};
+//                                                     ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:219:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14];
+//                                                              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:219:70: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14];
+//                                                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:220:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14, null};
+//                                                              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:220:70: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14, null};
+//                                                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:221:77: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String, String>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else "bar": 3.14, "baz": null};
+//                                                                             ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:221:92: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String, String>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else "bar": 3.14, "baz": null};
+//                                                                                            ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:222:62: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42];
+//                                                              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:223:62: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42, null};
+//                                                              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:224:70: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+//  - 'List' is from 'dart:core'.
+//   <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...list else "bar": 42, "baz": null};
+//                                                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:225:70: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map];
+//                                                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:226:70: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map, null};
+//                                                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:227:85: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+//  - 'List' is from 'dart:core'.
+//   <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else ...list, "baz": null};
+//                                                                                     ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:234:31: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+//  - 'Iterable' is from 'dart:core'.
+//   var list10 = [for (var i in "not iterable") i];
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:235:30: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+//  - 'Iterable' is from 'dart:core'.
+//   var set10 = {for (var i in "not iterable") i, null};
+//                              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:236:30: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+//  - 'Iterable' is from 'dart:core'.
+//   var map10 = {for (var i in "not iterable") "bar": i, "baz": null};
+//                              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:237:32: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var list20 = [for (int i in ["not", "int"]) i];
+//                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:237:39: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var list20 = [for (int i in ["not", "int"]) i];
+//                                       ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:238:31: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var set20 = {for (int i in ["not", "int"]) i, null};
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:238:38: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var set20 = {for (int i in ["not", "int"]) i, null};
+//                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:239:31: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var map20 = {for (int i in ["not", "int"]) "bar": i, "baz": null};
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:239:38: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var map20 = {for (int i in ["not", "int"]) "bar": i, "baz": null};
+//                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:240:37: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+//  - 'Stream' is from 'dart:async'.
+//   var list30 = [await for (var i in "not stream") i];
+//                                     ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:241:36: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+//  - 'Stream' is from 'dart:async'.
+//   var set30 = {await for (var i in "not stream") i, null};
+//                                    ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:242:36: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+//  - 'Stream' is from 'dart:async'.
+//   var map30 = {await for (var i in "not stream") "bar": i, "baz": null};
+//                                    ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:243:58: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var list40 = [await for (int i in Stream.fromIterable(["not", "int"])) i];
+//                                                          ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:243:65: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var list40 = [await for (int i in Stream.fromIterable(["not", "int"])) i];
+//                                                                 ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:244:57: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var set40 = {await for (int i in Stream.fromIterable(["not", "int"])) i, null};
+//                                                         ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:244:64: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var set40 = {await for (int i in Stream.fromIterable(["not", "int"])) i, null};
+//                                                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:245:57: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var map40 = {await for (int i in Stream.fromIterable(["not", "int"])) "bar": i, "baz": null};
+//                                                         ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:245:64: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var map40 = {await for (int i in Stream.fromIterable(["not", "int"])) "bar": i, "baz": null};
+//                                                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:249:24: Error: A value of type 'String' can't be assigned to a variable of type 'bool'.
+// Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+//   var list60 = [for (; "not bool";) 42];
+//                        ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:250:23: Error: A value of type 'String' can't be assigned to a variable of type 'bool'.
+// Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+//   var set60 = {for (; "not bool";) 42, null};
+//                       ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:251:23: Error: A value of type 'String' can't be assigned to a variable of type 'bool'.
+// Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+//   var map60 = {for (; "not bool";) "bar": 42, "baz": null};
+//                       ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:255:26: Error: The asynchronous for-in can only be used in functions marked with 'async' or 'async*'.
+// Try marking the function body with either 'async' or 'async*', or removing the 'await' before the for loop.
+//   <int>[await for (int i in stream) i];
+//                          ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:256:26: Error: The asynchronous for-in can only be used in functions marked with 'async' or 'async*'.
+// Try marking the function body with either 'async' or 'async*', or removing the 'await' before the for loop.
+//   <int>{await for (int i in stream) i};
+//                          ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:257:34: Error: The asynchronous for-in can only be used in functions marked with 'async' or 'async*'.
+// Try marking the function body with either 'async' or 'async*', or removing the 'await' before the for loop.
+//   <String, int>{await for (int i in stream) "bar": i};
+//                                  ^^
+//
+import self as self;
+import "dart:core" as core;
+import "dart:collection" as col;
+import "dart:async" as asy;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+class B extends self::A {
+  synthetic constructor •() → self::B
+    : super self::A::•()
+    ;
+  get foo() → core::int
+    return 42;
+}
+static method oracle<T extends core::Object = dynamic>([self::oracle::T t = null]) → dynamic
+  return true;
+static method testIfElement(dynamic dynVar, core::List<core::int> listInt, core::List<core::double> listDouble, core::Map<core::String, core::int> mapToInt, core::Map<core::String, core::double> mapToDouble) → dynamic {
+  core::List<core::int> list10 = block {
+    final core::List<core::int> #t1 = <core::int>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t1.{core::List::add}(42);
+  } =>#t1;
+  core::Set<core::int> set10 = block {
+    final core::Set<core::int> #t2 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t2.{core::Set::add}(42);
+    #t2.{core::Set::add}(null);
+  } =>#t2;
+  core::Map<core::String, core::int> map10 = block {
+    final core::Map<core::String, core::int> #t3 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t3.{core::Map::[]=}("bar", 42);
+    #t3.{core::Map::[]=}("baz", null);
+  } =>#t3;
+  core::List<dynamic> list11 = block {
+    final core::List<dynamic> #t4 = <dynamic>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t4.{core::List::add}(dynVar);
+  } =>#t4;
+  core::Set<dynamic> set11 = block {
+    final core::Set<dynamic> #t5 = col::LinkedHashSet::•<dynamic>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t5.{core::Set::add}(dynVar);
+    #t5.{core::Set::add}(null);
+  } =>#t5;
+  core::Map<core::String, dynamic> map11 = block {
+    final core::Map<core::String, dynamic> #t6 = <core::String, dynamic>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t6.{core::Map::[]=}("bar", dynVar);
+    #t6.{core::Map::[]=}("baz", null);
+  } =>#t6;
+  core::List<core::List<core::int>> list12 = block {
+    final core::List<core::List<core::int>> #t7 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t7.{core::List::add}(<core::int>[42]);
+  } =>#t7;
+  core::Set<core::List<core::int>> set12 = block {
+    final core::Set<core::List<core::int>> #t8 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t8.{core::Set::add}(<core::int>[42]);
+    #t8.{core::Set::add}(null);
+  } =>#t8;
+  core::Map<core::String, core::List<core::int>> map12 = block {
+    final core::Map<core::String, core::List<core::int>> #t9 = <core::String, core::List<core::int>>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t9.{core::Map::[]=}("bar", <core::int>[42]);
+    #t9.{core::Map::[]=}("baz", null);
+  } =>#t9;
+  core::List<core::int> list20 = block {
+    final core::List<core::int> #t10 = <core::int>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::int #t11 in <core::int>[42])
+        #t10.{core::List::add}(#t11);
+  } =>#t10;
+  core::Set<core::int> set20 = block {
+    final core::Set<core::int> #t12 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::int #t13 in <core::int>[42])
+        #t12.{core::Set::add}(#t13);
+    #t12.{core::Set::add}(null);
+  } =>#t12;
+  core::Map<core::String, core::int> map20 = block {
+    final core::Map<core::String, core::int> #t14 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::MapEntry<core::String, core::int> #t15 in <core::String, core::int>{"bar": 42}.{core::Map::entries})
+        #t14.{core::Map::[]=}(#t15.{core::MapEntry::key}, #t15.{core::MapEntry::value});
+    #t14.{core::Map::[]=}("baz", null);
+  } =>#t14;
+  core::List<dynamic> list21 = block {
+    final core::List<dynamic> #t16 = <dynamic>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final dynamic #t17 in <dynamic>[dynVar])
+        #t16.{core::List::add}(#t17);
+  } =>#t16;
+  core::Set<dynamic> set21 = block {
+    final core::Set<dynamic> #t18 = col::LinkedHashSet::•<dynamic>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final dynamic #t19 in <dynamic>[dynVar])
+        #t18.{core::Set::add}(#t19);
+    #t18.{core::Set::add}(null);
+  } =>#t18;
+  core::Map<core::String, dynamic> map21 = block {
+    final core::Map<core::String, dynamic> #t20 = <core::String, dynamic>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::MapEntry<core::String, dynamic> #t21 in <core::String, dynamic>{"bar": dynVar}.{core::Map::entries})
+        #t20.{core::Map::[]=}(#t21.{core::MapEntry::key}, #t21.{core::MapEntry::value});
+    #t20.{core::Map::[]=}("baz", null);
+  } =>#t20;
+  core::List<core::List<core::int>> list22 = block {
+    final core::List<core::List<core::int>> #t22 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::List<core::int> #t23 in <core::List<core::int>>[<core::int>[42]])
+        #t22.{core::List::add}(#t23);
+  } =>#t22;
+  core::Set<core::List<core::int>> set22 = block {
+    final core::Set<core::List<core::int>> #t24 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::List<core::int> #t25 in <core::List<core::int>>[<core::int>[42]])
+        #t24.{core::Set::add}(#t25);
+    #t24.{core::Set::add}(null);
+  } =>#t24;
+  core::Map<core::String, core::List<core::int>> map22 = block {
+    final core::Map<core::String, core::List<core::int>> #t26 = <core::String, core::List<core::int>>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::MapEntry<core::String, core::List<core::int>> #t27 in <core::String, core::List<core::int>>{"bar": <core::int>[42]}.{core::Map::entries})
+        #t26.{core::Map::[]=}(#t27.{core::MapEntry::key}, #t27.{core::MapEntry::value});
+    #t26.{core::Map::[]=}("baz", null);
+  } =>#t26;
+  core::List<core::int> list30 = block {
+    final core::List<core::int> #t28 = <core::int>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::int #t29 in <core::int>[42])
+          #t28.{core::List::add}(#t29);
+  } =>#t28;
+  core::Set<core::int> set30 = block {
+    final core::Set<core::int> #t30 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::int #t31 in <core::int>[42])
+          #t30.{core::Set::add}(#t31);
+    #t30.{core::Set::add}(null);
+  } =>#t30;
+  core::Map<core::String, core::int> map30 = block {
+    final core::Map<core::String, core::int> #t32 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::MapEntry<core::String, core::int> #t33 in <core::String, core::int>{"bar": 42}.{core::Map::entries})
+          #t32.{core::Map::[]=}(#t33.{core::MapEntry::key}, #t33.{core::MapEntry::value});
+    #t32.{core::Map::[]=}("baz", null);
+  } =>#t32;
+  core::List<dynamic> list31 = block {
+    final core::List<dynamic> #t34 = <dynamic>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final dynamic #t35 in <dynamic>[dynVar])
+          #t34.{core::List::add}(#t35);
+  } =>#t34;
+  core::Set<dynamic> set31 = block {
+    final core::Set<dynamic> #t36 = col::LinkedHashSet::•<dynamic>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final dynamic #t37 in <dynamic>[dynVar])
+          #t36.{core::Set::add}(#t37);
+    #t36.{core::Set::add}(null);
+  } =>#t36;
+  core::Map<core::String, dynamic> map31 = block {
+    final core::Map<core::String, dynamic> #t38 = <core::String, dynamic>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::MapEntry<core::String, dynamic> #t39 in <core::String, dynamic>{"bar": dynVar}.{core::Map::entries})
+          #t38.{core::Map::[]=}(#t39.{core::MapEntry::key}, #t39.{core::MapEntry::value});
+    #t38.{core::Map::[]=}("baz", null);
+  } =>#t38;
+  core::List<core::List<core::int>> list33 = block {
+    final core::List<core::List<core::int>> #t40 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::List<core::int> #t41 in <core::List<core::int>>[<core::int>[42]])
+          #t40.{core::List::add}(#t41);
+  } =>#t40;
+  core::Set<core::List<core::int>> set33 = block {
+    final core::Set<core::List<core::int>> #t42 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::List<core::int> #t43 in <core::List<core::int>>[<core::int>[42]])
+          #t42.{core::Set::add}(#t43);
+    #t42.{core::Set::add}(null);
+  } =>#t42;
+  core::Map<core::String, core::List<core::int>> map33 = block {
+    final core::Map<core::String, core::List<core::int>> #t44 = <core::String, core::List<core::int>>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::MapEntry<core::String, core::List<core::int>> #t45 in <core::String, core::List<core::int>>{"bar": <core::int>[42]}.{core::Map::entries})
+          #t44.{core::Map::[]=}(#t45.{core::MapEntry::key}, #t45.{core::MapEntry::value});
+    #t44.{core::Map::[]=}("baz", null);
+  } =>#t44;
+  core::List<core::List<core::int>> list40 = block {
+    final core::List<core::List<core::int>> #t46 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::List<core::int> #t47 in <core::List<core::int>>[<core::int>[]])
+        #t46.{core::List::add}(#t47);
+  } =>#t46;
+  core::Set<core::List<core::int>> set40 = block {
+    final core::Set<core::List<core::int>> #t48 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::List<core::int> #t49 in <core::List<core::int>>[<core::int>[]])
+        #t48.{core::Set::add}(#t49);
+    #t48.{core::Set::add}(null);
+  } =>#t48;
+  core::Map<core::String, core::List<core::int>> map40 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:39:34: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
+  Map<String, List<int>> map40 = {if (oracle(\"foo\")) ...{\"bar\", []}, \"baz\": null};
+                                 ^";
+  core::List<core::List<core::int>> list41 = block {
+    final core::List<core::List<core::int>> #t50 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::List<core::int> #t51 in let final core::Set<core::List<core::int>> #t52 = col::LinkedHashSet::•<core::List<core::int>>() in let final dynamic #t53 = #t52.{core::Set::add}(<core::int>[]) in #t52)
+        #t50.{core::List::add}(#t51);
+  } =>#t50;
+  core::Set<core::List<core::int>> set41 = block {
+    final core::Set<core::List<core::int>> #t54 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::List<core::int> #t55 in let final core::Set<core::List<core::int>> #t56 = col::LinkedHashSet::•<core::List<core::int>>() in let final dynamic #t57 = #t56.{core::Set::add}(<core::int>[]) in #t56)
+        #t54.{core::Set::add}(#t55);
+    #t54.{core::Set::add}(null);
+  } =>#t54;
+  core::List<core::List<core::int>> list42 = block {
+    final core::List<core::List<core::int>> #t58 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::List<core::int> #t59 in <core::List<core::int>>[<core::int>[]])
+          #t58.{core::List::add}(#t59);
+  } =>#t58;
+  core::Set<core::List<core::int>> set42 = block {
+    final core::Set<core::List<core::int>> #t60 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::List<core::int> #t61 in <core::List<core::int>>[<core::int>[]])
+          #t60.{core::Set::add}(#t61);
+    #t60.{core::Set::add}(null);
+  } =>#t60;
+  core::Map<core::String, core::List<core::int>> map42 = block {
+    final core::Map<core::String, core::List<core::int>> #t62 = <core::String, core::List<core::int>>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::MapEntry<core::String, core::List<core::int>> #t63 in <core::String, core::List<core::int>>{"bar": <core::int>[]}.{core::Map::entries})
+          #t62.{core::Map::[]=}(#t63.{core::MapEntry::key}, #t63.{core::MapEntry::value});
+    #t62.{core::Map::[]=}("baz", null);
+  } =>#t62;
+  core::List<core::int> list50 = block {
+    final core::List<core::int> #t64 = <core::int>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::int #t65 in <core::int>[])
+        #t64.{core::List::add}(#t65);
+  } =>#t64;
+  core::Set<core::int> set50 = block {
+    final core::Set<core::int> #t66 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::int #t67 in <core::int>[])
+        #t66.{core::Set::add}(#t67);
+    #t66.{core::Set::add}(null);
+  } =>#t66;
+  core::Map<core::String, core::int> map50 = block {
+    final core::Map<core::String, core::int> #t68 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::MapEntry<core::String, core::int> #t69 in <core::String, core::int>{}.{core::Map::entries})
+        #t68.{core::Map::[]=}(#t69.{core::MapEntry::key}, #t69.{core::MapEntry::value});
+    #t68.{core::Map::[]=}("baz", null);
+  } =>#t68;
+  core::List<core::int> list51 = block {
+    final core::List<core::int> #t70 = <core::int>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::int #t71 in let final core::Set<core::int> #t72 = col::LinkedHashSet::•<core::int>() in #t72)
+        #t70.{core::List::add}(#t71);
+  } =>#t70;
+  core::Set<core::int> set51 = block {
+    final core::Set<core::int> #t73 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::int #t74 in let final core::Set<core::int> #t75 = col::LinkedHashSet::•<core::int>() in #t75)
+        #t73.{core::Set::add}(#t74);
+    #t73.{core::Set::add}(null);
+  } =>#t73;
+  core::List<core::int> list52 = block {
+    final core::List<core::int> #t76 = <core::int>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::int #t77 in <core::int>[])
+          #t76.{core::List::add}(#t77);
+  } =>#t76;
+  core::Set<core::int> set52 = block {
+    final core::Set<core::int> #t78 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::int #t79 in <core::int>[])
+          #t78.{core::Set::add}(#t79);
+    #t78.{core::Set::add}(null);
+  } =>#t78;
+  core::Map<core::String, core::int> map52 = block {
+    final core::Map<core::String, core::int> #t80 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::MapEntry<core::String, core::int> #t81 in <core::String, core::int>{}.{core::Map::entries})
+          #t80.{core::Map::[]=}(#t81.{core::MapEntry::key}, #t81.{core::MapEntry::value});
+    #t80.{core::Map::[]=}("baz", null);
+  } =>#t80;
+  core::List<core::List<core::int>> list60 = block {
+    final core::List<core::List<core::int>> #t82 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::List<core::int> #t83 in <core::List<core::int>>[<core::int>[]])
+        #t82.{core::List::add}(#t83);
+  } =>#t82;
+  core::Set<core::List<core::int>> set60 = block {
+    final core::Set<core::List<core::int>> #t84 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::List<core::int> #t85 in <core::List<core::int>>[<core::int>[]])
+        #t84.{core::Set::add}(#t85);
+    #t84.{core::Set::add}(null);
+  } =>#t84;
+  core::Map<core::String, core::List<core::int>> map60 = block {
+    final core::Map<core::String, core::List<core::int>> #t86 = <core::String, core::List<core::int>>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::MapEntry<core::String, core::List<core::int>> #t87 in <core::String, core::List<core::int>>{"bar": <core::int>[]}.{core::Map::entries})
+        #t86.{core::Map::[]=}(#t87.{core::MapEntry::key}, #t87.{core::MapEntry::value});
+    #t86.{core::Map::[]=}("baz", null);
+  } =>#t86;
+  core::List<core::List<core::int>> list61 = block {
+    final core::List<core::List<core::int>> #t88 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::List<core::int> #t89 in <core::List<core::int>>[<core::int>[]])
+          #t88.{core::List::add}(#t89);
+  } =>#t88;
+  core::Set<core::List<core::int>> set61 = block {
+    final core::Set<core::List<core::int>> #t90 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::List<core::int> #t91 in <core::List<core::int>>[<core::int>[]])
+          #t90.{core::Set::add}(#t91);
+    #t90.{core::Set::add}(null);
+  } =>#t90;
+  core::Map<core::String, core::List<core::int>> map61 = block {
+    final core::Map<core::String, core::List<core::int>> #t92 = <core::String, core::List<core::int>>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::MapEntry<core::String, core::List<core::int>> #t93 in <core::String, core::List<core::int>>{"bar": <core::int>[]}.{core::Map::entries})
+          #t92.{core::Map::[]=}(#t93.{core::MapEntry::key}, #t93.{core::MapEntry::value});
+    #t92.{core::Map::[]=}("baz", null);
+  } =>#t92;
+  core::List<core::List<core::int>> list70 = block {
+    final core::List<core::List<core::int>> #t94 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t94.{core::List::add}(<core::int>[]);
+  } =>#t94;
+  core::Set<core::List<core::int>> set70 = block {
+    final core::Set<core::List<core::int>> #t95 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t95.{core::Set::add}(<core::int>[]);
+    #t95.{core::Set::add}(null);
+  } =>#t95;
+  core::List<core::List<core::int>> list71 = block {
+    final core::List<core::List<core::int>> #t96 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        #t96.{core::List::add}(<core::int>[]);
+  } =>#t96;
+  core::Set<core::List<core::int>> set71 = block {
+    final core::Set<core::List<core::int>> #t97 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        #t97.{core::Set::add}(<core::int>[]);
+    #t97.{core::Set::add}(null);
+  } =>#t97;
+  core::List<core::num> list80 = block {
+    final core::List<core::num> #t98 = <core::num>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t98.{core::List::add}(42);
+    else
+      #t98.{core::List::add}(3.14);
+  } =>#t98;
+  core::Set<core::num> set80 = block {
+    final core::Set<core::num> #t99 = col::LinkedHashSet::•<core::num>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t99.{core::Set::add}(42);
+    else
+      #t99.{core::Set::add}(3.14);
+    #t99.{core::Set::add}(null);
+  } =>#t99;
+  core::Map<core::String, core::num> map80 = block {
+    final core::Map<core::String, core::num> #t100 = <core::String, core::num>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t100.{core::Map::[]=}("bar", 42);
+    else
+      #t100.{core::Map::[]=}("bar", 3.14);
+    #t100.{core::Map::[]=}("baz", null);
+  } =>#t100;
+  core::List<core::num> list81 = block {
+    final core::List<core::num> #t101 = <core::num>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::num #t102 in listInt)
+        #t101.{core::List::add}(#t102);
+    else
+      for (final core::num #t103 in listDouble)
+        #t101.{core::List::add}(#t103);
+  } =>#t101;
+  core::Set<core::num> set81 = block {
+    final core::Set<core::num> #t104 = col::LinkedHashSet::•<core::num>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::num #t105 in listInt)
+        #t104.{core::Set::add}(#t105);
+    else
+      for (final core::num #t106 in listDouble)
+        #t104.{core::Set::add}(#t106);
+    #t104.{core::Set::add}(null);
+  } =>#t104;
+  core::Map<core::String, core::num> map81 = block {
+    final core::Map<core::String, core::num> #t107 = <core::String, core::num>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::MapEntry<core::String, core::num> #t108 in mapToInt.{core::Map::entries})
+        #t107.{core::Map::[]=}(#t108.{core::MapEntry::key}, #t108.{core::MapEntry::value});
+    else
+      for (final core::MapEntry<core::String, core::num> #t109 in mapToDouble.{core::Map::entries})
+        #t107.{core::Map::[]=}(#t109.{core::MapEntry::key}, #t109.{core::MapEntry::value});
+    #t107.{core::Map::[]=}("baz", null);
+  } =>#t107;
+  core::List<dynamic> list82 = block {
+    final core::List<dynamic> #t110 = <dynamic>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final dynamic #t111 in listInt)
+        #t110.{core::List::add}(#t111);
+    else
+      for (final dynamic #t112 in dynVar as{TypeError} core::Iterable<dynamic>)
+        #t110.{core::List::add}(#t112);
+  } =>#t110;
+  core::Set<dynamic> set82 = block {
+    final core::Set<dynamic> #t113 = col::LinkedHashSet::•<dynamic>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final dynamic #t114 in listInt)
+        #t113.{core::Set::add}(#t114);
+    else
+      for (final dynamic #t115 in dynVar as{TypeError} core::Iterable<dynamic>)
+        #t113.{core::Set::add}(#t115);
+    #t113.{core::Set::add}(null);
+  } =>#t113;
+  core::Set<dynamic> map82 = block {
+    final core::Set<dynamic> #t116 = col::LinkedHashSet::•<dynamic>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t116.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:71:38: Error: Unexpected type 'Map<String, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  var map82 = {if (oracle(\"foo\")) ...mapToInt else ...dynVar, null};
+                                     ^");
+    else
+      for (final dynamic #t117 in dynVar as{TypeError} core::Iterable<dynamic>)
+        #t116.{core::Set::add}(#t117);
+    #t116.{core::Set::add}(null);
+  } =>#t116;
+  core::List<core::num> list83 = block {
+    final core::List<core::num> #t118 = <core::num>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t118.{core::List::add}(42);
+    else
+      for (final core::num #t119 in listDouble)
+        #t118.{core::List::add}(#t119);
+  } =>#t118;
+  core::Set<core::num> set83 = block {
+    final core::Set<core::num> #t120 = col::LinkedHashSet::•<core::num>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::num #t121 in listInt)
+        #t120.{core::Set::add}(#t121);
+    else
+      #t120.{core::Set::add}(3.14);
+    #t120.{core::Set::add}(null);
+  } =>#t120;
+  core::Map<core::String, core::num> map83 = block {
+    final core::Map<core::String, core::num> #t122 = <core::String, core::num>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::MapEntry<core::String, core::num> #t123 in mapToInt.{core::Map::entries})
+        #t122.{core::Map::[]=}(#t123.{core::MapEntry::key}, #t123.{core::MapEntry::value});
+    else
+      #t122.{core::Map::[]=}("bar", 3.14);
+    #t122.{core::Map::[]=}("baz", null);
+  } =>#t122;
+  core::List<core::int> list90 = block {
+    final core::List<core::int> #t124 = <core::int>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t124.{core::List::add}(dynVar as{TypeError} core::int);
+  } =>#t124;
+  core::Set<core::int> set90 = block {
+    final core::Set<core::int> #t125 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t125.{core::Set::add}(dynVar as{TypeError} core::int);
+    #t125.{core::Set::add}(null);
+  } =>#t125;
+  core::Map<core::String, core::int> map90 = block {
+    final core::Map<core::String, core::int> #t126 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t126.{core::Map::[]=}("bar", dynVar as{TypeError} core::int);
+    #t126.{core::Map::[]=}("baz", null);
+  } =>#t126;
+  core::List<core::int> list91 = block {
+    final core::List<core::int> #t127 = <core::int>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final dynamic #t128 in dynVar as{TypeError} core::Iterable<dynamic>) {
+        final core::int #t129 = #t128 as{TypeError} core::int;
+        #t127.{core::List::add}(#t129);
+      }
+  } =>#t127;
+  core::Set<core::int> set91 = block {
+    final core::Set<core::int> #t130 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final dynamic #t131 in dynVar as{TypeError} core::Iterable<dynamic>) {
+        final core::int #t132 = #t131 as{TypeError} core::int;
+        #t130.{core::Set::add}(#t132);
+      }
+    #t130.{core::Set::add}(null);
+  } =>#t130;
+  core::Map<core::String, core::int> map91 = block {
+    final core::Map<core::String, core::int> #t133 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::MapEntry<dynamic, dynamic> #t134 in (dynVar as{TypeError} core::Map<dynamic, dynamic>).{core::Map::entries}) {
+        final core::String #t135 = #t134.{core::MapEntry::key} as{TypeError} core::String;
+        final core::int #t136 = #t134.{core::MapEntry::value} as{TypeError} core::int;
+        #t133.{core::Map::[]=}(#t135, #t136);
+      }
+    #t133.{core::Map::[]=}("baz", null);
+  } =>#t133;
+  core::List<core::int> list100 = block {
+    final core::List<core::int> #t137 = <core::int>[];
+    if(dynVar as{TypeError} core::bool)
+      #t137.{core::List::add}(42);
+  } =>#t137;
+  core::Set<core::int> set100 = block {
+    final core::Set<core::int> #t138 = col::LinkedHashSet::•<core::int>();
+    if(dynVar as{TypeError} core::bool)
+      #t138.{core::Set::add}(42);
+  } =>#t138;
+  core::Map<core::int, core::int> map100 = block {
+    final core::Map<core::int, core::int> #t139 = <core::int, core::int>{};
+    if(dynVar as{TypeError} core::bool)
+      #t139.{core::Map::[]=}(42, 42);
+  } =>#t139;
+}
+static method testIfElementErrors(core::Map<core::int, core::int> map) → dynamic {
+  block {
+    final core::List<core::int> #t140 = <core::int>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t140.{core::List::add}(let final<BottomType> #t141 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:87:28: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int>[if (oracle(\"foo\")) \"bar\"];
+                           ^" in "bar" as{TypeError} core::int);
+  } =>#t140;
+  block {
+    final core::Set<core::int> #t142 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t142.{core::Set::add}(let final<BottomType> #t143 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:88:28: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int>{if (oracle(\"foo\")) \"bar\", null};
+                           ^" in "bar" as{TypeError} core::int);
+    #t142.{core::Set::add}(null);
+  } =>#t142;
+  block {
+    final core::Map<core::String, core::int> #t144 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t144.{core::Map::[]=}("bar", let final<BottomType> #t145 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:89:43: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <String, int>{if (oracle(\"foo\")) \"bar\": \"bar\", \"baz\": null};
+                                          ^" in "bar" as{TypeError} core::int);
+    #t144.{core::Map::[]=}("baz", null);
+  } =>#t144;
+  block {
+    final core::List<core::int> #t146 = <core::int>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::int #t147 in <core::int>[let final<BottomType> #t148 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:90:32: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int>[if (oracle(\"foo\")) ...[\"bar\"]];
+                               ^" in "bar" as{TypeError} core::int])
+        #t146.{core::List::add}(#t147);
+  } =>#t146;
+  block {
+    final core::Set<core::int> #t149 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::int #t150 in <core::int>[let final<BottomType> #t151 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:91:32: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int>{if (oracle(\"foo\")) ...[\"bar\"], null};
+                               ^" in "bar" as{TypeError} core::int])
+        #t149.{core::Set::add}(#t150);
+    #t149.{core::Set::add}(null);
+  } =>#t149;
+  block {
+    final core::Map<core::String, core::int> #t152 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::MapEntry<core::String, core::int> #t153 in <core::String, core::int>{"bar": let final<BottomType> #t154 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:92:47: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <String, int>{if (oracle(\"foo\")) ...{\"bar\": \"bar\"}, \"baz\": null};
+                                              ^" in "bar" as{TypeError} core::int}.{core::Map::entries})
+        #t152.{core::Map::[]=}(#t153.{core::MapEntry::key}, #t153.{core::MapEntry::value});
+    #t152.{core::Map::[]=}("baz", null);
+  } =>#t152;
+  block {
+    final core::List<core::int> #t155 = <core::int>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t155.{core::List::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:93:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>[if (oracle(\"foo\")) ...map];
+                              ^");
+  } =>#t155;
+  block {
+    final core::Set<core::int> #t156 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t156.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:94:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>{if (oracle(\"foo\")) ...map, null};
+                              ^");
+    #t156.{core::Set::add}(null);
+  } =>#t156;
+  <core::String, core::int>{invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:95:39: Error: Unexpected type 'List<String>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{if (oracle(\"foo\")) ...[\"bar\"], \"baz\": null};
+                                      ^": null, invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:95:39: Error: Unexpected type 'List<String>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{if (oracle(\"foo\")) ...[\"bar\"], \"baz\": null};
+                                      ^": null};
+  block {
+    final core::List<core::String> #t157 = <core::String>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t157.{core::List::add}(let final<BottomType> #t158 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:96:31: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String>[if (oracle(\"foo\")) 42 else 3.14];
+                              ^" in 42 as{TypeError} core::String);
+    else
+      #t157.{core::List::add}(let final<BottomType> #t159 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:96:39: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String>[if (oracle(\"foo\")) 42 else 3.14];
+                                      ^" in 3.14 as{TypeError} core::String);
+  } =>#t157;
+  block {
+    final core::Set<core::String> #t160 = col::LinkedHashSet::•<core::String>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t160.{core::Set::add}(let final<BottomType> #t161 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:97:31: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String>{if (oracle(\"foo\")) 42 else 3.14, null};
+                              ^" in 42 as{TypeError} core::String);
+    else
+      #t160.{core::Set::add}(let final<BottomType> #t162 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:97:39: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String>{if (oracle(\"foo\")) 42 else 3.14, null};
+                                      ^" in 3.14 as{TypeError} core::String);
+    #t160.{core::Set::add}(null);
+  } =>#t160;
+  block {
+    final core::Map<core::String, core::String> #t163 = <core::String, core::String>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t163.{core::Map::[]=}("bar", let final<BottomType> #t164 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:98:46: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String, String>{if (oracle(\"foo\")) \"bar\": 42 else \"baz\": 3.14, \"baz\": null};
+                                             ^" in 42 as{TypeError} core::String);
+    else
+      #t163.{core::Map::[]=}("baz", let final<BottomType> #t165 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:98:61: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String, String>{if (oracle(\"foo\")) \"bar\": 42 else \"baz\": 3.14, \"baz\": null};
+                                                            ^" in 3.14 as{TypeError} core::String);
+    #t163.{core::Map::[]=}("baz", null);
+  } =>#t163;
+  block {
+    final core::List<core::int> #t166 = <core::int>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t166.{core::List::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:99:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>[if (oracle(\"foo\")) ...map else 42];
+                              ^");
+    else
+      #t166.{core::List::add}(42);
+  } =>#t166;
+  block {
+    final core::Set<core::int> #t167 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t167.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:100:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>{if (oracle(\"foo\")) ...map else 42, null};
+                              ^");
+    else
+      #t167.{core::Set::add}(42);
+    #t167.{core::Set::add}(null);
+  } =>#t167;
+  <core::String, core::int>{invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:101:39: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{if (oracle(\"foo\")) ...[42] else \"bar\": 42, \"baz\": null};
+                                      ^": null, invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:101:39: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{if (oracle(\"foo\")) ...[42] else \"bar\": 42, \"baz\": null};
+                                      ^": null};
+  block {
+    final core::List<core::int> #t168 = <core::int>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t168.{core::List::add}(42);
+    else
+      #t168.{core::List::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:102:39: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>[if (oracle(\"foo\")) 42 else ...map];
+                                      ^");
+  } =>#t168;
+  block {
+    final core::Set<core::int> #t169 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t169.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:103:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>{if (oracle(\"foo\")) ...map else 42, null};
+                              ^");
+    else
+      #t169.{core::Set::add}(42);
+    #t169.{core::Set::add}(null);
+  } =>#t169;
+  <core::String, core::int>{invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:104:54: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{if (oracle(\"foo\")) \"bar\": 42 else ...[42], \"baz\": null};
+                                                     ^": null, invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:104:54: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{if (oracle(\"foo\")) \"bar\": 42 else ...[42], \"baz\": null};
+                                                     ^": null};
+  core::Set<dynamic> set10 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:106:24: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
+  Set<dynamic> set10 = {if (oracle(\"foo\")) 42 else \"bar\": 3.14};
+                       ^";
+  core::Map<dynamic, dynamic> map10 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:107:53: Error: Expected ':' after this.
+  Map<dynamic, dynamic> map10 = {if (oracle(\"foo\")) 42 else \"bar\": 3.14};
+                                                    ^": null};
+  core::Set<dynamic> set11 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:108:24: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
+  Set<dynamic> set11 = {if (oracle(\"foo\")) \"bar\": 3.14 else 42};
+                       ^";
+  core::Map<dynamic, dynamic> map11 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:109:70: Error: Expected ':' after this.
+  Map<dynamic, dynamic> map11 = {if (oracle(\"foo\")) \"bar\": 3.14 else 42};
+                                                                     ^": null};
+  core::Map<<BottomType>, core::Null> map12 = <<BottomType>, core::Null>{invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:110:35: Error: Expected ':' after this.
+  var map12 = {if (oracle(\"foo\")) 42 else \"bar\": 3.14};
+                                  ^": null};
+  core::Map<<BottomType>, core::Null> map13 = <<BottomType>, core::Null>{invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:111:52: Error: Expected ':' after this.
+  var map13 = {if (oracle(\"foo\")) \"bar\": 3.14 else 42};
+                                                   ^": null};
+  core::List<core::int> list20 = block {
+    final core::List<core::int> #t170 = <core::int>[];
+    if(let final<BottomType> #t171 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:112:27: Error: A value of type 'int' can't be assigned to a variable of type 'bool'.
+Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+  List<int> list20 = [if (42) 42];
+                          ^" in 42 as{TypeError} core::bool)
+      #t170.{core::List::add}(42);
+  } =>#t170;
+  core::Set<core::int> set20 = block {
+    final core::Set<core::int> #t172 = col::LinkedHashSet::•<core::int>();
+    if(let final<BottomType> #t173 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:113:25: Error: A value of type 'int' can't be assigned to a variable of type 'bool'.
+Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+  Set<int> set20 = {if (42) 42};
+                        ^" in 42 as{TypeError} core::bool)
+      #t172.{core::Set::add}(42);
+  } =>#t172;
+  core::Map<core::int, core::int> map30 = block {
+    final core::Map<core::int, core::int> #t174 = <core::int, core::int>{};
+    if(let final<BottomType> #t175 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:114:30: Error: A value of type 'int' can't be assigned to a variable of type 'bool'.
+Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+  Map<int, int> map30 = {if (42) 42: 42};
+                             ^" in 42 as{TypeError} core::bool)
+      #t174.{core::Map::[]=}(42, 42);
+  } =>#t174;
+  core::List<core::String> list40 = block {
+    final core::List<core::String> #t176 = <core::String>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t176.{core::List::add}(let final<BottomType> #t177 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:115:53: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  List<String> list40 = <String>[if (oracle(\"foo\")) true else 42];
+                                                    ^" in true as{TypeError} core::String);
+    else
+      #t176.{core::List::add}(let final<BottomType> #t178 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:115:63: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  List<String> list40 = <String>[if (oracle(\"foo\")) true else 42];
+                                                              ^" in 42 as{TypeError} core::String);
+  } =>#t176;
+  core::Set<core::String> set40 = block {
+    final core::Set<core::String> #t179 = col::LinkedHashSet::•<core::String>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t179.{core::Set::add}(let final<BottomType> #t180 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:116:51: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  Set<String> set40 = <String>{if (oracle(\"foo\")) true else 42};
+                                                  ^" in true as{TypeError} core::String);
+    else
+      #t179.{core::Set::add}(let final<BottomType> #t181 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:116:61: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  Set<String> set40 = <String>{if (oracle(\"foo\")) true else 42};
+                                                            ^" in 42 as{TypeError} core::String);
+  } =>#t179;
+  core::Map<core::String, core::int> map40 = block {
+    final core::Map<core::String, core::int> #t182 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t182.{core::Map::[]=}(let final<BottomType> #t183 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:117:61: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  Map<String, int> map40 = <String, int>{if (oracle(\"foo\")) true: 42 else 42: 42};
+                                                            ^" in true as{TypeError} core::String, 42);
+    else
+      #t182.{core::Map::[]=}(let final<BottomType> #t184 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:117:75: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  Map<String, int> map40 = <String, int>{if (oracle(\"foo\")) true: 42 else 42: 42};
+                                                                          ^" in 42 as{TypeError} core::String, 42);
+  } =>#t182;
+  core::Map<core::int, core::String> map41 = block {
+    final core::Map<core::int, core::String> #t185 = <core::int, core::String>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t185.{core::Map::[]=}(42, let final<BottomType> #t186 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:118:65: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  Map<int, String> map41 = <int, String>{if (oracle(\"foo\")) 42: true else 42: 42};
+                                                                ^" in true as{TypeError} core::String);
+    else
+      #t185.{core::Map::[]=}(42, let final<BottomType> #t187 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:118:79: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  Map<int, String> map41 = <int, String>{if (oracle(\"foo\")) 42: true else 42: 42};
+                                                                              ^" in 42 as{TypeError} core::String);
+  } =>#t185;
+}
+static method testForElement(dynamic dynVar, core::List<core::int> listInt, core::List<core::double> listDouble, core::int index, core::Map<core::String, core::int> mapStringInt, core::Map<core::String, core::double> mapStringDouble) → dynamic {
+  core::List<core::int> list10 = block {
+    final core::List<core::int> #t188 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t188.{core::List::add}(42);
+  } =>#t188;
+  core::Set<core::int> set10 = block {
+    final core::Set<core::int> #t189 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t189.{core::Set::add}(42);
+    #t189.{core::Set::add}(null);
+  } =>#t189;
+  core::Map<core::String, core::int> map10 = block {
+    final core::Map<core::String, core::int> #t190 = <core::String, core::int>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t190.{core::Map::[]=}("bar", 42);
+    #t190.{core::Map::[]=}("baz", null);
+  } =>#t190;
+  core::List<dynamic> list11 = block {
+    final core::List<dynamic> #t191 = <dynamic>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t191.{core::List::add}(dynVar);
+  } =>#t191;
+  core::Set<dynamic> set11 = block {
+    final core::Set<dynamic> #t192 = col::LinkedHashSet::•<dynamic>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t192.{core::Set::add}(dynVar);
+    #t192.{core::Set::add}(null);
+  } =>#t192;
+  core::Map<core::String, dynamic> map11 = block {
+    final core::Map<core::String, dynamic> #t193 = <core::String, dynamic>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t193.{core::Map::[]=}("bar", dynVar);
+    #t193.{core::Map::[]=}("baz", null);
+  } =>#t193;
+  core::List<core::List<core::int>> list12 = block {
+    final core::List<core::List<core::int>> #t194 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t194.{core::List::add}(<core::int>[42]);
+  } =>#t194;
+  core::Set<core::List<core::int>> set12 = block {
+    final core::Set<core::List<core::int>> #t195 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t195.{core::Set::add}(<core::int>[42]);
+    #t195.{core::Set::add}(null);
+  } =>#t195;
+  core::Map<core::String, core::List<core::int>> map12 = block {
+    final core::Map<core::String, core::List<core::int>> #t196 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t196.{core::Map::[]=}("bar", <core::int>[42]);
+    #t196.{core::Map::[]=}("baz", null);
+  } =>#t196;
+  core::List<core::int> list20 = block {
+    final core::List<core::int> #t197 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::int #t198 in <core::int>[42])
+        #t197.{core::List::add}(#t198);
+  } =>#t197;
+  core::Set<core::int> set20 = block {
+    final core::Set<core::int> #t199 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::int #t200 in <core::int>[42])
+        #t199.{core::Set::add}(#t200);
+    #t199.{core::Set::add}(null);
+  } =>#t199;
+  core::Map<core::String, core::int> map20 = block {
+    final core::Map<core::String, core::int> #t201 = <core::String, core::int>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::MapEntry<core::String, core::int> #t202 in <core::String, core::int>{"bar": 42}.{core::Map::entries})
+        #t201.{core::Map::[]=}(#t202.{core::MapEntry::key}, #t202.{core::MapEntry::value});
+    #t201.{core::Map::[]=}("baz", null);
+  } =>#t201;
+  core::List<dynamic> list21 = block {
+    final core::List<dynamic> #t203 = <dynamic>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final dynamic #t204 in <dynamic>[dynVar])
+        #t203.{core::List::add}(#t204);
+  } =>#t203;
+  core::Set<dynamic> set21 = block {
+    final core::Set<dynamic> #t205 = col::LinkedHashSet::•<dynamic>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final dynamic #t206 in <dynamic>[dynVar])
+        #t205.{core::Set::add}(#t206);
+    #t205.{core::Set::add}(null);
+  } =>#t205;
+  core::Map<core::String, dynamic> map21 = block {
+    final core::Map<core::String, dynamic> #t207 = <core::String, dynamic>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::MapEntry<core::String, dynamic> #t208 in <core::String, dynamic>{"bar": dynVar}.{core::Map::entries})
+        #t207.{core::Map::[]=}(#t208.{core::MapEntry::key}, #t208.{core::MapEntry::value});
+    #t207.{core::Map::[]=}("baz", null);
+  } =>#t207;
+  core::List<core::List<core::int>> list22 = block {
+    final core::List<core::List<core::int>> #t209 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::List<core::int> #t210 in <core::List<core::int>>[<core::int>[42]])
+        #t209.{core::List::add}(#t210);
+  } =>#t209;
+  core::Set<core::List<core::int>> set22 = block {
+    final core::Set<core::List<core::int>> #t211 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::List<core::int> #t212 in <core::List<core::int>>[<core::int>[42]])
+        #t211.{core::Set::add}(#t212);
+    #t211.{core::Set::add}(null);
+  } =>#t211;
+  core::Map<core::String, core::List<core::int>> map22 = block {
+    final core::Map<core::String, core::List<core::int>> #t213 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::MapEntry<core::String, core::List<core::int>> #t214 in <core::String, core::List<core::int>>{"bar": <core::int>[42]}.{core::Map::entries})
+        #t213.{core::Map::[]=}(#t214.{core::MapEntry::key}, #t214.{core::MapEntry::value});
+    #t213.{core::Map::[]=}("baz", null);
+  } =>#t213;
+  core::List<core::int> list30 = block {
+    final core::List<core::int> #t215 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::int #t216 in <core::int>[42])
+          #t215.{core::List::add}(#t216);
+  } =>#t215;
+  core::Set<core::int> set30 = block {
+    final core::Set<core::int> #t217 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::int #t218 in <core::int>[42])
+          #t217.{core::Set::add}(#t218);
+    #t217.{core::Set::add}(null);
+  } =>#t217;
+  core::Map<core::String, core::int> map30 = block {
+    final core::Map<core::String, core::int> #t219 = <core::String, core::int>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::MapEntry<core::String, core::int> #t220 in <core::String, core::int>{"bar": 42}.{core::Map::entries})
+          #t219.{core::Map::[]=}(#t220.{core::MapEntry::key}, #t220.{core::MapEntry::value});
+    #t219.{core::Map::[]=}("baz", null);
+  } =>#t219;
+  core::List<dynamic> list31 = block {
+    final core::List<dynamic> #t221 = <dynamic>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final dynamic #t222 in <dynamic>[dynVar])
+          #t221.{core::List::add}(#t222);
+  } =>#t221;
+  core::Set<dynamic> set31 = block {
+    final core::Set<dynamic> #t223 = col::LinkedHashSet::•<dynamic>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final dynamic #t224 in <dynamic>[dynVar])
+          #t223.{core::Set::add}(#t224);
+    #t223.{core::Set::add}(null);
+  } =>#t223;
+  core::Map<core::String, dynamic> map31 = block {
+    final core::Map<core::String, dynamic> #t225 = <core::String, dynamic>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::MapEntry<core::String, dynamic> #t226 in <core::String, dynamic>{"bar": dynVar}.{core::Map::entries})
+          #t225.{core::Map::[]=}(#t226.{core::MapEntry::key}, #t226.{core::MapEntry::value});
+    #t225.{core::Map::[]=}("baz", null);
+  } =>#t225;
+  core::List<core::List<core::int>> list33 = block {
+    final core::List<core::List<core::int>> #t227 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::List<core::int> #t228 in <core::List<core::int>>[<core::int>[42]])
+          #t227.{core::List::add}(#t228);
+  } =>#t227;
+  core::Set<core::List<core::int>> set33 = block {
+    final core::Set<core::List<core::int>> #t229 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::List<core::int> #t230 in <core::List<core::int>>[<core::int>[42]])
+          #t229.{core::Set::add}(#t230);
+    #t229.{core::Set::add}(null);
+  } =>#t229;
+  core::Map<core::String, core::List<core::int>> map33 = block {
+    final core::Map<core::String, core::List<core::int>> #t231 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::MapEntry<core::String, core::List<core::int>> #t232 in <core::String, core::List<core::int>>{"bar": <core::int>[42]}.{core::Map::entries})
+          #t231.{core::Map::[]=}(#t232.{core::MapEntry::key}, #t232.{core::MapEntry::value});
+    #t231.{core::Map::[]=}("baz", null);
+  } =>#t231;
+  core::List<core::List<core::int>> list40 = block {
+    final core::List<core::List<core::int>> #t233 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::List<core::int> #t234 in <core::List<core::int>>[<core::int>[]])
+        #t233.{core::List::add}(#t234);
+  } =>#t233;
+  core::Set<core::List<core::int>> set40 = block {
+    final core::Set<core::List<core::int>> #t235 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::List<core::int> #t236 in <core::List<core::int>>[<core::int>[]])
+        #t235.{core::Set::add}(#t236);
+    #t235.{core::Set::add}(null);
+  } =>#t235;
+  core::Map<core::String, core::List<core::int>> map40 = block {
+    final core::Map<core::String, core::List<core::int>> #t237 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::MapEntry<core::String, core::List<core::int>> #t238 in <core::String, core::List<core::int>>{"bar": <core::int>[]}.{core::Map::entries})
+        #t237.{core::Map::[]=}(#t238.{core::MapEntry::key}, #t238.{core::MapEntry::value});
+    #t237.{core::Map::[]=}("baz", null);
+  } =>#t237;
+  core::List<core::List<core::int>> list41 = block {
+    final core::List<core::List<core::int>> #t239 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::List<core::int> #t240 in let final core::Set<core::List<core::int>> #t241 = col::LinkedHashSet::•<core::List<core::int>>() in let final dynamic #t242 = #t241.{core::Set::add}(<core::int>[]) in #t241)
+        #t239.{core::List::add}(#t240);
+  } =>#t239;
+  core::Set<core::List<core::int>> set41 = block {
+    final core::Set<core::List<core::int>> #t243 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::List<core::int> #t244 in let final core::Set<core::List<core::int>> #t245 = col::LinkedHashSet::•<core::List<core::int>>() in let final dynamic #t246 = #t245.{core::Set::add}(<core::int>[]) in #t245)
+        #t243.{core::Set::add}(#t244);
+    #t243.{core::Set::add}(null);
+  } =>#t243;
+  core::List<core::List<core::int>> list42 = block {
+    final core::List<core::List<core::int>> #t247 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::List<core::int> #t248 in <core::List<core::int>>[<core::int>[]])
+          #t247.{core::List::add}(#t248);
+  } =>#t247;
+  core::Set<core::List<core::int>> set42 = block {
+    final core::Set<core::List<core::int>> #t249 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::List<core::int> #t250 in <core::List<core::int>>[<core::int>[]])
+          #t249.{core::Set::add}(#t250);
+    #t249.{core::Set::add}(null);
+  } =>#t249;
+  core::Map<core::String, core::List<core::int>> map42 = block {
+    final core::Map<core::String, core::List<core::int>> #t251 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::MapEntry<core::String, core::List<core::int>> #t252 in <core::String, core::List<core::int>>{"bar": <core::int>[]}.{core::Map::entries})
+          #t251.{core::Map::[]=}(#t252.{core::MapEntry::key}, #t252.{core::MapEntry::value});
+    #t251.{core::Map::[]=}("baz", null);
+  } =>#t251;
+  core::List<core::int> list50 = block {
+    final core::List<core::int> #t253 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::int #t254 in <core::int>[])
+        #t253.{core::List::add}(#t254);
+  } =>#t253;
+  core::Set<core::int> set50 = block {
+    final core::Set<core::int> #t255 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::int #t256 in <core::int>[])
+        #t255.{core::Set::add}(#t256);
+    #t255.{core::Set::add}(null);
+  } =>#t255;
+  core::Map<core::String, core::int> map50 = block {
+    final core::Map<core::String, core::int> #t257 = <core::String, core::int>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::MapEntry<core::String, core::int> #t258 in <core::String, core::int>{}.{core::Map::entries})
+        #t257.{core::Map::[]=}(#t258.{core::MapEntry::key}, #t258.{core::MapEntry::value});
+    #t257.{core::Map::[]=}("baz", null);
+  } =>#t257;
+  core::List<core::int> list51 = block {
+    final core::List<core::int> #t259 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::int #t260 in let final core::Set<core::int> #t261 = col::LinkedHashSet::•<core::int>() in #t261)
+        #t259.{core::List::add}(#t260);
+  } =>#t259;
+  core::Set<core::int> set51 = block {
+    final core::Set<core::int> #t262 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::int #t263 in let final core::Set<core::int> #t264 = col::LinkedHashSet::•<core::int>() in #t264)
+        #t262.{core::Set::add}(#t263);
+    #t262.{core::Set::add}(null);
+  } =>#t262;
+  core::List<core::int> list52 = block {
+    final core::List<core::int> #t265 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::int #t266 in <core::int>[])
+          #t265.{core::List::add}(#t266);
+  } =>#t265;
+  core::Set<core::int> set52 = block {
+    final core::Set<core::int> #t267 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::int #t268 in <core::int>[])
+          #t267.{core::Set::add}(#t268);
+    #t267.{core::Set::add}(null);
+  } =>#t267;
+  core::List<core::List<core::int>> list60 = block {
+    final core::List<core::List<core::int>> #t269 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::List<core::int> #t270 in <core::List<core::int>>[<core::int>[]])
+        #t269.{core::List::add}(#t270);
+  } =>#t269;
+  core::Set<core::List<core::int>> set60 = block {
+    final core::Set<core::List<core::int>> #t271 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::List<core::int> #t272 in <core::List<core::int>>[<core::int>[]])
+        #t271.{core::Set::add}(#t272);
+    #t271.{core::Set::add}(null);
+  } =>#t271;
+  core::Map<core::String, core::List<core::int>> map60 = block {
+    final core::Map<core::String, core::List<core::int>> #t273 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::MapEntry<core::String, core::List<core::int>> #t274 in <core::String, core::List<core::int>>{"bar": <core::int>[]}.{core::Map::entries})
+        #t273.{core::Map::[]=}(#t274.{core::MapEntry::key}, #t274.{core::MapEntry::value});
+    #t273.{core::Map::[]=}("baz", null);
+  } =>#t273;
+  core::List<core::List<core::int>> list61 = block {
+    final core::List<core::List<core::int>> #t275 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::List<core::int> #t276 in <core::List<core::int>>[<core::int>[]])
+          #t275.{core::List::add}(#t276);
+  } =>#t275;
+  core::Set<core::List<core::int>> set61 = block {
+    final core::Set<core::List<core::int>> #t277 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::List<core::int> #t278 in <core::List<core::int>>[<core::int>[]])
+          #t277.{core::Set::add}(#t278);
+    #t277.{core::Set::add}(null);
+  } =>#t277;
+  core::Map<core::String, core::List<core::int>> map61 = block {
+    final core::Map<core::String, core::List<core::int>> #t279 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::MapEntry<core::String, core::List<core::int>> #t280 in <core::String, core::List<core::int>>{"bar": <core::int>[]}.{core::Map::entries})
+          #t279.{core::Map::[]=}(#t280.{core::MapEntry::key}, #t280.{core::MapEntry::value});
+    #t279.{core::Map::[]=}("baz", null);
+  } =>#t279;
+  core::List<core::List<core::int>> list70 = block {
+    final core::List<core::List<core::int>> #t281 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t281.{core::List::add}(<core::int>[]);
+  } =>#t281;
+  core::Set<core::List<core::int>> set70 = block {
+    final core::Set<core::List<core::int>> #t282 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t282.{core::Set::add}(<core::int>[]);
+    #t282.{core::Set::add}(null);
+  } =>#t282;
+  core::Map<core::String, core::List<core::int>> map70 = block {
+    final core::Map<core::String, core::List<core::int>> #t283 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t283.{core::Map::[]=}("bar", <core::int>[]);
+    #t283.{core::Map::[]=}("baz", null);
+  } =>#t283;
+  core::List<core::List<core::int>> list71 = block {
+    final core::List<core::List<core::int>> #t284 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        #t284.{core::List::add}(<core::int>[]);
+  } =>#t284;
+  core::Set<core::List<core::int>> set71 = block {
+    final core::Set<core::List<core::int>> #t285 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        #t285.{core::Set::add}(<core::int>[]);
+    #t285.{core::Set::add}(null);
+  } =>#t285;
+  core::Map<core::String, core::List<core::int>> map71 = block {
+    final core::Map<core::String, core::List<core::int>> #t286 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        #t286.{core::Map::[]=}("bar", <core::int>[]);
+    #t286.{core::Map::[]=}("baz", null);
+  } =>#t286;
+  core::List<core::num> list80 = block {
+    final core::List<core::num> #t287 = <core::num>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        #t287.{core::List::add}(42);
+      else
+        #t287.{core::List::add}(3.14);
+  } =>#t287;
+  core::Set<core::num> set80 = block {
+    final core::Set<core::num> #t288 = col::LinkedHashSet::•<core::num>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        #t288.{core::Set::add}(42);
+      else
+        #t288.{core::Set::add}(3.14);
+    #t288.{core::Set::add}(null);
+  } =>#t288;
+  core::Map<core::String, core::num> map80 = block {
+    final core::Map<core::String, core::num> #t289 = <core::String, core::num>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        #t289.{core::Map::[]=}("bar", 42);
+      else
+        #t289.{core::Map::[]=}("bar", 3.14);
+    #t289.{core::Map::[]=}("baz", null);
+  } =>#t289;
+  core::List<core::num> list81 = block {
+    final core::List<core::num> #t290 = <core::num>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::num #t291 in listInt)
+          #t290.{core::List::add}(#t291);
+      else
+        for (final core::num #t292 in listDouble)
+          #t290.{core::List::add}(#t292);
+  } =>#t290;
+  core::Set<core::num> set81 = block {
+    final core::Set<core::num> #t293 = col::LinkedHashSet::•<core::num>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::num #t294 in listInt)
+          #t293.{core::Set::add}(#t294);
+      else
+        for (final core::num #t295 in listDouble)
+          #t293.{core::Set::add}(#t295);
+    #t293.{core::Set::add}(null);
+  } =>#t293;
+  core::Map<core::String, core::num> map81 = block {
+    final core::Map<core::String, core::num> #t296 = <core::String, core::num>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::MapEntry<core::String, core::num> #t297 in mapStringInt.{core::Map::entries})
+          #t296.{core::Map::[]=}(#t297.{core::MapEntry::key}, #t297.{core::MapEntry::value});
+      else
+        for (final core::MapEntry<core::String, core::num> #t298 in mapStringDouble.{core::Map::entries})
+          #t296.{core::Map::[]=}(#t298.{core::MapEntry::key}, #t298.{core::MapEntry::value});
+    #t296.{core::Map::[]=}("baz", null);
+  } =>#t296;
+  core::List<dynamic> list82 = block {
+    final core::List<dynamic> #t299 = <dynamic>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final dynamic #t300 in listInt)
+          #t299.{core::List::add}(#t300);
+      else
+        for (final dynamic #t301 in dynVar as{TypeError} core::Iterable<dynamic>)
+          #t299.{core::List::add}(#t301);
+  } =>#t299;
+  core::Set<dynamic> set82 = block {
+    final core::Set<dynamic> #t302 = col::LinkedHashSet::•<dynamic>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final dynamic #t303 in listInt)
+          #t302.{core::Set::add}(#t303);
+      else
+        for (final dynamic #t304 in dynVar as{TypeError} core::Iterable<dynamic>)
+          #t302.{core::Set::add}(#t304);
+    #t302.{core::Set::add}(null);
+  } =>#t302;
+  core::Map<dynamic, dynamic> map82 = block {
+    final core::Map<dynamic, dynamic> #t305 = <dynamic, dynamic>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::MapEntry<dynamic, dynamic> #t306 in mapStringInt.{core::Map::entries})
+          #t305.{core::Map::[]=}(#t306.{core::MapEntry::key}, #t306.{core::MapEntry::value});
+      else
+        for (final core::MapEntry<dynamic, dynamic> #t307 in (dynVar as{TypeError} core::Map<dynamic, dynamic>).{core::Map::entries})
+          #t305.{core::Map::[]=}(#t307.{core::MapEntry::key}, #t307.{core::MapEntry::value});
+    #t305.{core::Map::[]=}("baz", null);
+  } =>#t305;
+  core::List<core::num> list83 = block {
+    final core::List<core::num> #t308 = <core::num>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        #t308.{core::List::add}(42);
+      else
+        for (final core::num #t309 in listDouble)
+          #t308.{core::List::add}(#t309);
+  } =>#t308;
+  core::Set<core::num> set83 = block {
+    final core::Set<core::num> #t310 = col::LinkedHashSet::•<core::num>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::num #t311 in listInt)
+          #t310.{core::Set::add}(#t311);
+      else
+        #t310.{core::Set::add}(3.14);
+    #t310.{core::Set::add}(null);
+  } =>#t310;
+  core::Map<core::String, core::num> map83 = block {
+    final core::Map<core::String, core::num> #t312 = <core::String, core::num>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::MapEntry<core::String, core::num> #t313 in mapStringInt.{core::Map::entries})
+          #t312.{core::Map::[]=}(#t313.{core::MapEntry::key}, #t313.{core::MapEntry::value});
+      else
+        #t312.{core::Map::[]=}("bar", 3.14);
+    #t312.{core::Map::[]=}("baz", null);
+  } =>#t312;
+  core::List<core::int> list90 = block {
+    final core::List<core::int> #t314 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t314.{core::List::add}(dynVar as{TypeError} core::int);
+  } =>#t314;
+  core::Set<core::int> set90 = block {
+    final core::Set<core::int> #t315 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t315.{core::Set::add}(dynVar as{TypeError} core::int);
+    #t315.{core::Set::add}(null);
+  } =>#t315;
+  core::Map<core::String, core::int> map90 = block {
+    final core::Map<core::String, core::int> #t316 = <core::String, core::int>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t316.{core::Map::[]=}("bar", dynVar as{TypeError} core::int);
+    #t316.{core::Map::[]=}("baz", null);
+  } =>#t316;
+  core::List<core::int> list91 = block {
+    final core::List<core::int> #t317 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final dynamic #t318 in dynVar as{TypeError} core::Iterable<dynamic>) {
+        final core::int #t319 = #t318 as{TypeError} core::int;
+        #t317.{core::List::add}(#t319);
+      }
+  } =>#t317;
+  core::Set<core::int> set91 = block {
+    final core::Set<core::int> #t320 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final dynamic #t321 in dynVar as{TypeError} core::Iterable<dynamic>) {
+        final core::int #t322 = #t321 as{TypeError} core::int;
+        #t320.{core::Set::add}(#t322);
+      }
+    #t320.{core::Set::add}(null);
+  } =>#t320;
+  core::Map<core::String, core::int> map91 = block {
+    final core::Map<core::String, core::int> #t323 = <core::String, core::int>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::MapEntry<dynamic, dynamic> #t324 in (dynVar as{TypeError} core::Map<dynamic, dynamic>).{core::Map::entries}) {
+        final core::String #t325 = #t324.{core::MapEntry::key} as{TypeError} core::String;
+        final core::int #t326 = #t324.{core::MapEntry::value} as{TypeError} core::int;
+        #t323.{core::Map::[]=}(#t325, #t326);
+      }
+    #t323.{core::Map::[]=}("baz", null);
+  } =>#t323;
+  core::List<core::int> list100 = block {
+    final core::List<core::int> #t327 = <core::int>[];
+    for (final core::int #t328 = index = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; index = index.{core::num::+}(1))
+      #t327.{core::List::add}(42);
+  } =>#t327;
+  core::Set<core::int> set100 = block {
+    final core::Set<core::int> #t329 = col::LinkedHashSet::•<core::int>();
+    for (final core::int #t330 = index = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; index = index.{core::num::+}(1))
+      #t329.{core::Set::add}(42);
+  } =>#t329;
+  core::Map<core::String, core::int> map100 = block {
+    final core::Map<core::String, core::int> #t331 = <core::String, core::int>{};
+    for (final core::int #t332 = index = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; index = index.{core::num::+}(1))
+      #t331.{core::Map::[]=}("bar", 42);
+  } =>#t331;
+  core::List<core::int> list110 = block {
+    final core::List<core::int> #t333 = <core::int>[];
+    for (core::int i in <core::int>[1, 2, 3])
+      #t333.{core::List::add}(i);
+  } =>#t333;
+  core::Set<core::int> set110 = block {
+    final core::Set<core::int> #t334 = col::LinkedHashSet::•<core::int>();
+    for (core::int i in <core::int>[1, 2, 3])
+      #t334.{core::Set::add}(i);
+    #t334.{core::Set::add}(null);
+  } =>#t334;
+  core::Map<core::String, core::int> map110 = block {
+    final core::Map<core::String, core::int> #t335 = <core::String, core::int>{};
+    for (core::int i in <core::int>[1, 2, 3])
+      #t335.{core::Map::[]=}("bar", i);
+    #t335.{core::Map::[]=}("baz", null);
+  } =>#t335;
+  core::List<core::int> list120 = block {
+    final core::List<core::int> #t336 = <core::int>[];
+    for (dynamic i in dynVar as{TypeError} core::Iterable<dynamic>)
+      #t336.{core::List::add}(i as{TypeError} core::int);
+  } =>#t336;
+  core::Set<core::int> set120 = block {
+    final core::Set<core::int> #t337 = col::LinkedHashSet::•<core::int>();
+    for (dynamic i in dynVar as{TypeError} core::Iterable<dynamic>)
+      #t337.{core::Set::add}(i as{TypeError} core::int);
+    #t337.{core::Set::add}(null);
+  } =>#t337;
+  core::Map<core::String, core::int> map120 = block {
+    final core::Map<core::String, core::int> #t338 = <core::String, core::int>{};
+    for (dynamic i in dynVar as{TypeError} core::Iterable<dynamic>)
+      #t338.{core::Map::[]=}("bar", i as{TypeError} core::int);
+    #t338.{core::Map::[]=}("baz", null);
+  } =>#t338;
+  core::List<core::int> list130 = block {
+    final core::List<core::int> #t339 = <core::int>[];
+    for (core::int i = 1; i.{core::num::<}(2); i = i.{core::num::+}(1))
+      #t339.{core::List::add}(i);
+  } =>#t339;
+  core::Set<core::int> set130 = block {
+    final core::Set<core::int> #t340 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 1; i.{core::num::<}(2); i = i.{core::num::+}(1))
+      #t340.{core::Set::add}(i);
+  } =>#t340;
+  core::Map<core::int, core::int> map130 = block {
+    final core::Map<core::int, core::int> #t341 = <core::int, core::int>{};
+    for (core::int i = 1; i.{core::num::<}(2); i = i.{core::num::+}(1))
+      #t341.{core::Map::[]=}(i, i);
+  } =>#t341;
+}
+static method testForElementErrors(core::Map<core::int, core::int> map, core::List<core::int> list) → dynamic async {
+  block {
+    final core::List<core::int> #t342 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t342.{core::List::add}(let final<BottomType> #t343 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:210:45: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int>[for (int i = 0; oracle(\"foo\"); i++) \"bar\"];
+                                            ^" in "bar" as{TypeError} core::int);
+  } =>#t342;
+  block {
+    final core::Set<core::int> #t344 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t344.{core::Set::add}(let final<BottomType> #t345 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:211:45: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int>{for (int i = 0; oracle(\"foo\"); i++) \"bar\", null};
+                                            ^" in "bar" as{TypeError} core::int);
+    #t344.{core::Set::add}(null);
+  } =>#t344;
+  block {
+    final core::Map<core::int, core::int> #t346 = <core::int, core::int>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t346.{core::Map::[]=}(let final<BottomType> #t347 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:212:50: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int, int>{for (int i = 0; oracle(\"foo\"); i++) \"bar\": \"bar\", \"baz\": null};
+                                                 ^" in "bar" as{TypeError} core::int, let final<BottomType> #t348 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:212:57: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int, int>{for (int i = 0; oracle(\"foo\"); i++) \"bar\": \"bar\", \"baz\": null};
+                                                        ^" in "bar" as{TypeError} core::int);
+    #t346.{core::Map::[]=}(let final<BottomType> #t349 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:212:64: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int, int>{for (int i = 0; oracle(\"foo\"); i++) \"bar\": \"bar\", \"baz\": null};
+                                                               ^" in "baz" as{TypeError} core::int, null);
+  } =>#t346;
+  block {
+    final core::List<core::int> #t350 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::int #t351 in <core::int>[let final<BottomType> #t352 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:213:49: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int>[for (int i = 0; oracle(\"foo\"); i++) ...[\"bar\"]];
+                                                ^" in "bar" as{TypeError} core::int])
+        #t350.{core::List::add}(#t351);
+  } =>#t350;
+  block {
+    final core::Set<core::int> #t353 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::int #t354 in <core::int>[let final<BottomType> #t355 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:214:49: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int>{for (int i = 0; oracle(\"foo\"); i++) ...[\"bar\"], null};
+                                                ^" in "bar" as{TypeError} core::int])
+        #t353.{core::Set::add}(#t354);
+    #t353.{core::Set::add}(null);
+  } =>#t353;
+  block {
+    final core::Map<core::int, core::int> #t356 = <core::int, core::int>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::MapEntry<core::int, core::int> #t357 in <core::int, core::int>{let final<BottomType> #t358 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:215:54: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int, int>{for (int i = 0; oracle(\"foo\"); i++) ...{\"bar\": \"bar\"}, \"baz\": null};
+                                                     ^" in "bar" as{TypeError} core::int: let final<BottomType> #t359 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:215:61: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int, int>{for (int i = 0; oracle(\"foo\"); i++) ...{\"bar\": \"bar\"}, \"baz\": null};
+                                                            ^" in "bar" as{TypeError} core::int}.{core::Map::entries})
+        #t356.{core::Map::[]=}(#t357.{core::MapEntry::key}, #t357.{core::MapEntry::value});
+    #t356.{core::Map::[]=}(let final<BottomType> #t360 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:215:69: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int, int>{for (int i = 0; oracle(\"foo\"); i++) ...{\"bar\": \"bar\"}, \"baz\": null};
+                                                                    ^" in "baz" as{TypeError} core::int, null);
+  } =>#t356;
+  block {
+    final core::List<core::int> #t361 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t361.{core::List::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:216:48: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>[for (int i = 0; oracle(\"foo\"); i++) ...map];
+                                               ^");
+  } =>#t361;
+  block {
+    final core::Set<core::int> #t362 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t362.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:217:48: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>{for (int i = 0; oracle(\"foo\"); i++) ...map, null};
+                                               ^");
+    #t362.{core::Set::add}(null);
+  } =>#t362;
+  <core::int, core::int>{invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:218:53: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <int, int>{for (int i = 0; oracle(\"foo\"); i++) ...list, 42: null};
+                                                    ^": null, invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:218:53: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <int, int>{for (int i = 0; oracle(\"foo\"); i++) ...list, 42: null};
+                                                    ^": null};
+  block {
+    final core::List<core::String> #t363 = <core::String>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        #t363.{core::List::add}(let final<BottomType> #t364 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:219:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String>[for (int i = 0; oracle(\"foo\"); i++) if (oracle()) 42 else 3.14];
+                                                             ^" in 42 as{TypeError} core::String);
+      else
+        #t363.{core::List::add}(let final<BottomType> #t365 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:219:70: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String>[for (int i = 0; oracle(\"foo\"); i++) if (oracle()) 42 else 3.14];
+                                                                     ^" in 3.14 as{TypeError} core::String);
+  } =>#t363;
+  block {
+    final core::Set<core::String> #t366 = col::LinkedHashSet::•<core::String>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        #t366.{core::Set::add}(let final<BottomType> #t367 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:220:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) 42 else 3.14, null};
+                                                             ^" in 42 as{TypeError} core::String);
+      else
+        #t366.{core::Set::add}(let final<BottomType> #t368 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:220:70: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) 42 else 3.14, null};
+                                                                     ^" in 3.14 as{TypeError} core::String);
+    #t366.{core::Set::add}(null);
+  } =>#t366;
+  block {
+    final core::Map<core::String, core::String> #t369 = <core::String, core::String>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        #t369.{core::Map::[]=}("bar", let final<BottomType> #t370 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:221:77: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String, String>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) \"bar\": 42 else \"bar\": 3.14, \"baz\": null};
+                                                                            ^" in 42 as{TypeError} core::String);
+      else
+        #t369.{core::Map::[]=}("bar", let final<BottomType> #t371 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:221:92: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String, String>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) \"bar\": 42 else \"bar\": 3.14, \"baz\": null};
+                                                                                           ^" in 3.14 as{TypeError} core::String);
+    #t369.{core::Map::[]=}("baz", null);
+  } =>#t369;
+  block {
+    final core::List<core::int> #t372 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        #t372.{core::List::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:222:62: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>[for (int i = 0; oracle(\"foo\"); i++) if (oracle()) ...map else 42];
+                                                             ^");
+      else
+        #t372.{core::List::add}(42);
+  } =>#t372;
+  block {
+    final core::Set<core::int> #t373 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        #t373.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:223:62: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) ...map else 42, null};
+                                                             ^");
+      else
+        #t373.{core::Set::add}(42);
+    #t373.{core::Set::add}(null);
+  } =>#t373;
+  <core::String, core::int>{invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:224:70: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) ...list else \"bar\": 42, \"baz\": null};
+                                                                     ^": null, invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:224:70: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) ...list else \"bar\": 42, \"baz\": null};
+                                                                     ^": null};
+  block {
+    final core::List<core::int> #t374 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        #t374.{core::List::add}(42);
+      else
+        #t374.{core::List::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:225:70: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>[for (int i = 0; oracle(\"foo\"); i++) if (oracle()) 42 else ...map];
+                                                                     ^");
+  } =>#t374;
+  block {
+    final core::Set<core::int> #t375 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        #t375.{core::Set::add}(42);
+      else
+        #t375.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:226:70: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) 42 else ...map, null};
+                                                                     ^");
+    #t375.{core::Set::add}(null);
+  } =>#t375;
+  <core::String, core::int>{invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:227:85: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) \"bar\": 42 else ...list, \"baz\": null};
+                                                                                    ^": null, invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:227:85: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) \"bar\": 42 else ...list, \"baz\": null};
+                                                                                    ^": null};
+  final core::int i = 0;
+  block {
+    final core::List<core::int> #t376 = <core::int>[];
+    for (final core::int #t377 in <core::int>[1]) {
+      invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:230:14: Error: Setter not found: 'i'.
+  <int>[for (i in <int>[1]) i];
+             ^";
+      #t376.{core::List::add}(i);
+    }
+  } =>#t376;
+  block {
+    final core::Set<core::int> #t378 = col::LinkedHashSet::•<core::int>();
+    for (final core::int #t379 in <core::int>[1]) {
+      invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:231:14: Error: Setter not found: 'i'.
+  <int>{for (i in <int>[1]) i, null};
+             ^";
+      #t378.{core::Set::add}(i);
+    }
+    #t378.{core::Set::add}(null);
+  } =>#t378;
+  block {
+    final core::Map<core::String, core::int> #t380 = <core::String, core::int>{};
+    for (final core::int #t381 in <core::int>[1]) {
+      invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:232:21: Error: Setter not found: 'i'.
+\t<String, int>{for (i in <int>[1]) \"bar\": i, \"baz\": null};
+\t                   ^";
+      #t380.{core::Map::[]=}("bar", i);
+    }
+    #t380.{core::Map::[]=}("baz", null);
+  } =>#t380;
+  core::List<dynamic> list10 = block {
+    final core::List<dynamic> #t382 = <dynamic>[];
+    for (dynamic i in let final<BottomType> #t383 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:234:31: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+ - 'Iterable' is from 'dart:core'.
+  var list10 = [for (var i in \"not iterable\") i];
+                              ^" in "not iterable" as{TypeError} core::Iterable<dynamic>)
+      #t382.{core::List::add}(i);
+  } =>#t382;
+  core::Set<dynamic> set10 = block {
+    final core::Set<dynamic> #t384 = col::LinkedHashSet::•<dynamic>();
+    for (dynamic i in let final<BottomType> #t385 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:235:30: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+ - 'Iterable' is from 'dart:core'.
+  var set10 = {for (var i in \"not iterable\") i, null};
+                             ^" in "not iterable" as{TypeError} core::Iterable<dynamic>)
+      #t384.{core::Set::add}(i);
+    #t384.{core::Set::add}(null);
+  } =>#t384;
+  core::Map<core::String, dynamic> map10 = block {
+    final core::Map<core::String, dynamic> #t386 = <core::String, dynamic>{};
+    for (dynamic i in let final<BottomType> #t387 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:236:30: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+ - 'Iterable' is from 'dart:core'.
+  var map10 = {for (var i in \"not iterable\") \"bar\": i, \"baz\": null};
+                             ^" in "not iterable" as{TypeError} core::Iterable<dynamic>)
+      #t386.{core::Map::[]=}("bar", i);
+    #t386.{core::Map::[]=}("baz", null);
+  } =>#t386;
+  core::List<core::int> list20 = block {
+    final core::List<core::int> #t388 = <core::int>[];
+    for (core::int i in <core::int>[let final<BottomType> #t389 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:237:32: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var list20 = [for (int i in [\"not\", \"int\"]) i];
+                               ^" in "not" as{TypeError} core::int, let final<BottomType> #t390 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:237:39: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var list20 = [for (int i in [\"not\", \"int\"]) i];
+                                      ^" in "int" as{TypeError} core::int])
+      #t388.{core::List::add}(i);
+  } =>#t388;
+  core::Set<core::int> set20 = block {
+    final core::Set<core::int> #t391 = col::LinkedHashSet::•<core::int>();
+    for (core::int i in <core::int>[let final<BottomType> #t392 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:238:31: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var set20 = {for (int i in [\"not\", \"int\"]) i, null};
+                              ^" in "not" as{TypeError} core::int, let final<BottomType> #t393 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:238:38: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var set20 = {for (int i in [\"not\", \"int\"]) i, null};
+                                     ^" in "int" as{TypeError} core::int])
+      #t391.{core::Set::add}(i);
+    #t391.{core::Set::add}(null);
+  } =>#t391;
+  core::Map<core::String, core::int> map20 = block {
+    final core::Map<core::String, core::int> #t394 = <core::String, core::int>{};
+    for (core::int i in <core::int>[let final<BottomType> #t395 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:239:31: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var map20 = {for (int i in [\"not\", \"int\"]) \"bar\": i, \"baz\": null};
+                              ^" in "not" as{TypeError} core::int, let final<BottomType> #t396 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:239:38: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var map20 = {for (int i in [\"not\", \"int\"]) \"bar\": i, \"baz\": null};
+                                     ^" in "int" as{TypeError} core::int])
+      #t394.{core::Map::[]=}("bar", i);
+    #t394.{core::Map::[]=}("baz", null);
+  } =>#t394;
+  core::List<dynamic> list30 = block {
+    final core::List<dynamic> #t397 = <dynamic>[];
+    await for (dynamic i in let final<BottomType> #t398 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:240:37: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+ - 'Stream' is from 'dart:async'.
+  var list30 = [await for (var i in \"not stream\") i];
+                                    ^" in "not stream" as{TypeError} asy::Stream<dynamic>)
+      #t397.{core::List::add}(i);
+  } =>#t397;
+  core::Set<dynamic> set30 = block {
+    final core::Set<dynamic> #t399 = col::LinkedHashSet::•<dynamic>();
+    await for (dynamic i in let final<BottomType> #t400 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:241:36: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+ - 'Stream' is from 'dart:async'.
+  var set30 = {await for (var i in \"not stream\") i, null};
+                                   ^" in "not stream" as{TypeError} asy::Stream<dynamic>)
+      #t399.{core::Set::add}(i);
+    #t399.{core::Set::add}(null);
+  } =>#t399;
+  core::Map<core::String, dynamic> map30 = block {
+    final core::Map<core::String, dynamic> #t401 = <core::String, dynamic>{};
+    await for (dynamic i in let final<BottomType> #t402 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:242:36: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+ - 'Stream' is from 'dart:async'.
+  var map30 = {await for (var i in \"not stream\") \"bar\": i, \"baz\": null};
+                                   ^" in "not stream" as{TypeError} asy::Stream<dynamic>)
+      #t401.{core::Map::[]=}("bar", i);
+    #t401.{core::Map::[]=}("baz", null);
+  } =>#t401;
+  core::List<core::int> list40 = block {
+    final core::List<core::int> #t403 = <core::int>[];
+    await for (core::int i in asy::Stream::fromIterable<core::int>(<core::int>[let final<BottomType> #t404 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:243:58: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var list40 = [await for (int i in Stream.fromIterable([\"not\", \"int\"])) i];
+                                                         ^" in "not" as{TypeError} core::int, let final<BottomType> #t405 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:243:65: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var list40 = [await for (int i in Stream.fromIterable([\"not\", \"int\"])) i];
+                                                                ^" in "int" as{TypeError} core::int]))
+      #t403.{core::List::add}(i);
+  } =>#t403;
+  core::Set<core::int> set40 = block {
+    final core::Set<core::int> #t406 = col::LinkedHashSet::•<core::int>();
+    await for (core::int i in asy::Stream::fromIterable<core::int>(<core::int>[let final<BottomType> #t407 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:244:57: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var set40 = {await for (int i in Stream.fromIterable([\"not\", \"int\"])) i, null};
+                                                        ^" in "not" as{TypeError} core::int, let final<BottomType> #t408 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:244:64: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var set40 = {await for (int i in Stream.fromIterable([\"not\", \"int\"])) i, null};
+                                                               ^" in "int" as{TypeError} core::int]))
+      #t406.{core::Set::add}(i);
+    #t406.{core::Set::add}(null);
+  } =>#t406;
+  core::Map<core::String, core::int> map40 = block {
+    final core::Map<core::String, core::int> #t409 = <core::String, core::int>{};
+    await for (core::int i in asy::Stream::fromIterable<core::int>(<core::int>[let final<BottomType> #t410 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:245:57: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var map40 = {await for (int i in Stream.fromIterable([\"not\", \"int\"])) \"bar\": i, \"baz\": null};
+                                                        ^" in "not" as{TypeError} core::int, let final<BottomType> #t411 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:245:64: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var map40 = {await for (int i in Stream.fromIterable([\"not\", \"int\"])) \"bar\": i, \"baz\": null};
+                                                               ^" in "int" as{TypeError} core::int]))
+      #t409.{core::Map::[]=}("bar", i);
+    #t409.{core::Map::[]=}("baz", null);
+  } =>#t409;
+  core::List<core::int> list50 = block {
+    final core::List<core::int> #t412 = <core::int>[];
+    for (; ; )
+      #t412.{core::List::add}(42);
+  } =>#t412;
+  core::Set<core::int> set50 = block {
+    final core::Set<core::int> #t413 = col::LinkedHashSet::•<core::int>();
+    for (; ; )
+      #t413.{core::Set::add}(42);
+    #t413.{core::Set::add}(null);
+  } =>#t413;
+  core::Map<core::String, core::int> map50 = block {
+    final core::Map<core::String, core::int> #t414 = <core::String, core::int>{};
+    for (; ; )
+      #t414.{core::Map::[]=}("bar", 42);
+    #t414.{core::Map::[]=}("baz", null);
+  } =>#t414;
+  core::List<core::int> list60 = block {
+    final core::List<core::int> #t415 = <core::int>[];
+    for (; let final<BottomType> #t416 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:249:24: Error: A value of type 'String' can't be assigned to a variable of type 'bool'.
+Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+  var list60 = [for (; \"not bool\";) 42];
+                       ^" in "not bool" as{TypeError} core::bool; )
+      #t415.{core::List::add}(42);
+  } =>#t415;
+  core::Set<core::int> set60 = block {
+    final core::Set<core::int> #t417 = col::LinkedHashSet::•<core::int>();
+    for (; let final<BottomType> #t418 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:250:23: Error: A value of type 'String' can't be assigned to a variable of type 'bool'.
+Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+  var set60 = {for (; \"not bool\";) 42, null};
+                      ^" in "not bool" as{TypeError} core::bool; )
+      #t417.{core::Set::add}(42);
+    #t417.{core::Set::add}(null);
+  } =>#t417;
+  core::Map<core::String, core::int> map60 = block {
+    final core::Map<core::String, core::int> #t419 = <core::String, core::int>{};
+    for (; let final<BottomType> #t420 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:251:23: Error: A value of type 'String' can't be assigned to a variable of type 'bool'.
+Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+  var map60 = {for (; \"not bool\";) \"bar\": 42, \"baz\": null};
+                      ^" in "not bool" as{TypeError} core::bool; )
+      #t419.{core::Map::[]=}("bar", 42);
+    #t419.{core::Map::[]=}("baz", null);
+  } =>#t419;
+}
+static method testForElementErrorsNotAsync(asy::Stream<core::int> stream) → dynamic {
+  block {
+    final core::List<core::int> #t421 = <core::int>[];
+    await for (core::int i in stream)
+      #t421.{core::List::add}(i);
+  } =>#t421;
+  block {
+    final core::Set<core::int> #t422 = col::LinkedHashSet::•<core::int>();
+    await for (core::int i in stream)
+      #t422.{core::Set::add}(i);
+  } =>#t422;
+  block {
+    final core::Map<core::String, core::int> #t423 = <core::String, core::int>{};
+    await for (core::int i in stream)
+      #t423.{core::Map::[]=}("bar", i);
+  } =>#t423;
+}
+static method testPromotion(self::A a) → dynamic {
+  core::List<core::int> list10 = block {
+    final core::List<core::int> #t424 = <core::int>[];
+    if(a is self::B)
+      #t424.{core::List::add}(a{self::B}.{self::B::foo});
+  } =>#t424;
+  core::Set<core::int> set10 = block {
+    final core::Set<core::int> #t425 = col::LinkedHashSet::•<core::int>();
+    if(a is self::B)
+      #t425.{core::Set::add}(a{self::B}.{self::B::foo});
+  } =>#t425;
+  core::Map<core::int, core::int> map10 = block {
+    final core::Map<core::int, core::int> #t426 = <core::int, core::int>{};
+    if(a is self::B)
+      #t426.{core::Map::[]=}(a{self::B}.{self::B::foo}, a{self::B}.{self::B::foo});
+  } =>#t426;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/control_flow_collection_inference.dart.strong.transformed.expect b/pkg/front_end/testcases/control_flow_collection_inference.dart.strong.transformed.expect
new file mode 100644
index 0000000..3c4ea93
--- /dev/null
+++ b/pkg/front_end/testcases/control_flow_collection_inference.dart.strong.transformed.expect
@@ -0,0 +1,2464 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:39:34: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
+//   Map<String, List<int>> map40 = {if (oracle("foo")) ...{"bar", []}, "baz": null};
+//                                  ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:71:38: Error: Unexpected type 'Map<String, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   var map82 = {if (oracle("foo")) ...mapToInt else ...dynVar, null};
+//                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:106:44: Error: Expected ':' after this.
+//   Set<dynamic> set10 = {if (oracle("foo")) 42 else "bar": 3.14};
+//                                            ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:107:53: Error: Expected ':' after this.
+//   Map<dynamic, dynamic> map10 = {if (oracle("foo")) 42 else "bar": 3.14};
+//                                                     ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:108:61: Error: Expected ':' after this.
+//   Set<dynamic> set11 = {if (oracle("foo")) "bar": 3.14 else 42};
+//                                                             ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:109:70: Error: Expected ':' after this.
+//   Map<dynamic, dynamic> map11 = {if (oracle("foo")) "bar": 3.14 else 42};
+//                                                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:110:35: Error: Expected ':' after this.
+//   var map12 = {if (oracle("foo")) 42 else "bar": 3.14};
+//                                   ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:111:52: Error: Expected ':' after this.
+//   var map13 = {if (oracle("foo")) "bar": 3.14 else 42};
+//                                                    ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:87:28: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int>[if (oracle("foo")) "bar"];
+//                            ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:88:28: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int>{if (oracle("foo")) "bar", null};
+//                            ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:89:43: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <String, int>{if (oracle("foo")) "bar": "bar", "baz": null};
+//                                           ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:90:32: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int>[if (oracle("foo")) ...["bar"]];
+//                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:91:32: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int>{if (oracle("foo")) ...["bar"], null};
+//                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:92:47: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <String, int>{if (oracle("foo")) ...{"bar": "bar"}, "baz": null};
+//                                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:93:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>[if (oracle("foo")) ...map];
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:94:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>{if (oracle("foo")) ...map, null};
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:95:39: Error: Unexpected type 'List<String>' of a map spread entry.  Expected 'dynamic' or a Map.
+//  - 'List' is from 'dart:core'.
+//   <String, int>{if (oracle("foo")) ...["bar"], "baz": null};
+//                                       ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:96:31: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String>[if (oracle("foo")) 42 else 3.14];
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:96:39: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String>[if (oracle("foo")) 42 else 3.14];
+//                                       ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:97:31: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String>{if (oracle("foo")) 42 else 3.14, null};
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:97:39: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String>{if (oracle("foo")) 42 else 3.14, null};
+//                                       ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:98:46: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String, String>{if (oracle("foo")) "bar": 42 else "baz": 3.14, "baz": null};
+//                                              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:98:61: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String, String>{if (oracle("foo")) "bar": 42 else "baz": 3.14, "baz": null};
+//                                                             ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:99:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>[if (oracle("foo")) ...map else 42];
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:100:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>{if (oracle("foo")) ...map else 42, null};
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:101:39: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+//  - 'List' is from 'dart:core'.
+//   <String, int>{if (oracle("foo")) ...[42] else "bar": 42, "baz": null};
+//                                       ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:102:39: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>[if (oracle("foo")) 42 else ...map];
+//                                       ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:103:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>{if (oracle("foo")) ...map else 42, null};
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:104:54: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+//  - 'List' is from 'dart:core'.
+//   <String, int>{if (oracle("foo")) "bar": 42 else ...[42], "baz": null};
+//                                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:106:24: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
+//   Set<dynamic> set10 = {if (oracle("foo")) 42 else "bar": 3.14};
+//                        ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:108:24: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
+//   Set<dynamic> set11 = {if (oracle("foo")) "bar": 3.14 else 42};
+//                        ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:112:27: Error: A value of type 'int' can't be assigned to a variable of type 'bool'.
+// Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+//   List<int> list20 = [if (42) 42];
+//                           ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:113:25: Error: A value of type 'int' can't be assigned to a variable of type 'bool'.
+// Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+//   Set<int> set20 = {if (42) 42};
+//                         ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:114:30: Error: A value of type 'int' can't be assigned to a variable of type 'bool'.
+// Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+//   Map<int, int> map30 = {if (42) 42: 42};
+//                              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:115:53: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   List<String> list40 = <String>[if (oracle("foo")) true else 42];
+//                                                     ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:115:63: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   List<String> list40 = <String>[if (oracle("foo")) true else 42];
+//                                                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:116:51: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   Set<String> set40 = <String>{if (oracle("foo")) true else 42};
+//                                                   ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:116:61: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   Set<String> set40 = <String>{if (oracle("foo")) true else 42};
+//                                                             ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:117:61: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   Map<String, int> map40 = <String, int>{if (oracle("foo")) true: 42 else 42: 42};
+//                                                             ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:117:75: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   Map<String, int> map40 = <String, int>{if (oracle("foo")) true: 42 else 42: 42};
+//                                                                           ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:118:65: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   Map<int, String> map41 = <int, String>{if (oracle("foo")) 42: true else 42: 42};
+//                                                                 ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:118:79: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   Map<int, String> map41 = <int, String>{if (oracle("foo")) 42: true else 42: 42};
+//                                                                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:230:14: Error: Setter not found: 'i'.
+//   <int>[for (i in <int>[1]) i];
+//              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:231:14: Error: Setter not found: 'i'.
+//   <int>{for (i in <int>[1]) i, null};
+//              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:232:21: Error: Setter not found: 'i'.
+// 	<String, int>{for (i in <int>[1]) "bar": i, "baz": null};
+// 	                   ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:246:17: Error: The keyword 'await' isn't allowed for a normal 'for' statement.
+// Try removing the keyword, or use a for-each statement.
+//   var list50 = [await for (;;) 42];
+//                 ^^^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:247:16: Error: The keyword 'await' isn't allowed for a normal 'for' statement.
+// Try removing the keyword, or use a for-each statement.
+//   var set50 = {await for (;;) 42, null};
+//                ^^^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:248:16: Error: The keyword 'await' isn't allowed for a normal 'for' statement.
+// Try removing the keyword, or use a for-each statement.
+//   var map50 = {await for (;;) "bar": 42, "baz": null};
+//                ^^^^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:210:45: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int>[for (int i = 0; oracle("foo"); i++) "bar"];
+//                                             ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:211:45: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int>{for (int i = 0; oracle("foo"); i++) "bar", null};
+//                                             ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:212:50: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) "bar": "bar", "baz": null};
+//                                                  ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:212:57: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) "bar": "bar", "baz": null};
+//                                                         ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:212:64: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) "bar": "bar", "baz": null};
+//                                                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:213:49: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int>[for (int i = 0; oracle("foo"); i++) ...["bar"]];
+//                                                 ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:214:49: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int>{for (int i = 0; oracle("foo"); i++) ...["bar"], null};
+//                                                 ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:215:54: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) ...{"bar": "bar"}, "baz": null};
+//                                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:215:61: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) ...{"bar": "bar"}, "baz": null};
+//                                                             ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:215:69: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) ...{"bar": "bar"}, "baz": null};
+//                                                                     ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:216:48: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>[for (int i = 0; oracle("foo"); i++) ...map];
+//                                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:217:48: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>{for (int i = 0; oracle("foo"); i++) ...map, null};
+//                                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:218:53: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+//  - 'List' is from 'dart:core'.
+//   <int, int>{for (int i = 0; oracle("foo"); i++) ...list, 42: null};
+//                                                     ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:219:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14];
+//                                                              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:219:70: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14];
+//                                                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:220:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14, null};
+//                                                              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:220:70: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14, null};
+//                                                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:221:77: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String, String>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else "bar": 3.14, "baz": null};
+//                                                                             ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:221:92: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+// Try changing the type of the left hand side, or casting the right hand side to 'String'.
+//   <String, String>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else "bar": 3.14, "baz": null};
+//                                                                                            ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:222:62: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42];
+//                                                              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:223:62: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42, null};
+//                                                              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:224:70: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+//  - 'List' is from 'dart:core'.
+//   <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...list else "bar": 42, "baz": null};
+//                                                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:225:70: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map];
+//                                                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:226:70: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+//  - 'Map' is from 'dart:core'.
+//   <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map, null};
+//                                                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:227:85: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+//  - 'List' is from 'dart:core'.
+//   <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else ...list, "baz": null};
+//                                                                                     ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:234:31: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+//  - 'Iterable' is from 'dart:core'.
+//   var list10 = [for (var i in "not iterable") i];
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:235:30: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+//  - 'Iterable' is from 'dart:core'.
+//   var set10 = {for (var i in "not iterable") i, null};
+//                              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:236:30: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+//  - 'Iterable' is from 'dart:core'.
+//   var map10 = {for (var i in "not iterable") "bar": i, "baz": null};
+//                              ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:237:32: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var list20 = [for (int i in ["not", "int"]) i];
+//                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:237:39: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var list20 = [for (int i in ["not", "int"]) i];
+//                                       ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:238:31: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var set20 = {for (int i in ["not", "int"]) i, null};
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:238:38: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var set20 = {for (int i in ["not", "int"]) i, null};
+//                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:239:31: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var map20 = {for (int i in ["not", "int"]) "bar": i, "baz": null};
+//                               ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:239:38: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var map20 = {for (int i in ["not", "int"]) "bar": i, "baz": null};
+//                                      ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:240:37: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+//  - 'Stream' is from 'dart:async'.
+//   var list30 = [await for (var i in "not stream") i];
+//                                     ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:241:36: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+//  - 'Stream' is from 'dart:async'.
+//   var set30 = {await for (var i in "not stream") i, null};
+//                                    ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:242:36: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+//  - 'Stream' is from 'dart:async'.
+//   var map30 = {await for (var i in "not stream") "bar": i, "baz": null};
+//                                    ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:243:58: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var list40 = [await for (int i in Stream.fromIterable(["not", "int"])) i];
+//                                                          ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:243:65: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var list40 = [await for (int i in Stream.fromIterable(["not", "int"])) i];
+//                                                                 ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:244:57: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var set40 = {await for (int i in Stream.fromIterable(["not", "int"])) i, null};
+//                                                         ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:244:64: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var set40 = {await for (int i in Stream.fromIterable(["not", "int"])) i, null};
+//                                                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:245:57: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var map40 = {await for (int i in Stream.fromIterable(["not", "int"])) "bar": i, "baz": null};
+//                                                         ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:245:64: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   var map40 = {await for (int i in Stream.fromIterable(["not", "int"])) "bar": i, "baz": null};
+//                                                                ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:249:24: Error: A value of type 'String' can't be assigned to a variable of type 'bool'.
+// Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+//   var list60 = [for (; "not bool";) 42];
+//                        ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:250:23: Error: A value of type 'String' can't be assigned to a variable of type 'bool'.
+// Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+//   var set60 = {for (; "not bool";) 42, null};
+//                       ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:251:23: Error: A value of type 'String' can't be assigned to a variable of type 'bool'.
+// Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+//   var map60 = {for (; "not bool";) "bar": 42, "baz": null};
+//                       ^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:255:26: Error: The asynchronous for-in can only be used in functions marked with 'async' or 'async*'.
+// Try marking the function body with either 'async' or 'async*', or removing the 'await' before the for loop.
+//   <int>[await for (int i in stream) i];
+//                          ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:256:26: Error: The asynchronous for-in can only be used in functions marked with 'async' or 'async*'.
+// Try marking the function body with either 'async' or 'async*', or removing the 'await' before the for loop.
+//   <int>{await for (int i in stream) i};
+//                          ^^
+//
+// pkg/front_end/testcases/control_flow_collection_inference.dart:257:34: Error: The asynchronous for-in can only be used in functions marked with 'async' or 'async*'.
+// Try marking the function body with either 'async' or 'async*', or removing the 'await' before the for loop.
+//   <String, int>{await for (int i in stream) "bar": i};
+//                                  ^^
+//
+import self as self;
+import "dart:core" as core;
+import "dart:collection" as col;
+import "dart:async" as asy;
+
+class A extends core::Object {
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+class B extends self::A {
+  synthetic constructor •() → self::B
+    : super self::A::•()
+    ;
+  get foo() → core::int
+    return 42;
+}
+static method oracle<T extends core::Object = dynamic>([self::oracle::T t = null]) → dynamic
+  return true;
+static method testIfElement(dynamic dynVar, core::List<core::int> listInt, core::List<core::double> listDouble, core::Map<core::String, core::int> mapToInt, core::Map<core::String, core::double> mapToDouble) → dynamic {
+  core::List<core::int> list10 = block {
+    final core::List<core::int> #t1 = <core::int>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t1.{core::List::add}(42);
+  } =>#t1;
+  core::Set<core::int> set10 = block {
+    final core::Set<core::int> #t2 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t2.{core::Set::add}(42);
+    #t2.{core::Set::add}(null);
+  } =>#t2;
+  core::Map<core::String, core::int> map10 = block {
+    final core::Map<core::String, core::int> #t3 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t3.{core::Map::[]=}("bar", 42);
+    #t3.{core::Map::[]=}("baz", null);
+  } =>#t3;
+  core::List<dynamic> list11 = block {
+    final core::List<dynamic> #t4 = <dynamic>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t4.{core::List::add}(dynVar);
+  } =>#t4;
+  core::Set<dynamic> set11 = block {
+    final core::Set<dynamic> #t5 = col::LinkedHashSet::•<dynamic>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t5.{core::Set::add}(dynVar);
+    #t5.{core::Set::add}(null);
+  } =>#t5;
+  core::Map<core::String, dynamic> map11 = block {
+    final core::Map<core::String, dynamic> #t6 = <core::String, dynamic>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t6.{core::Map::[]=}("bar", dynVar);
+    #t6.{core::Map::[]=}("baz", null);
+  } =>#t6;
+  core::List<core::List<core::int>> list12 = block {
+    final core::List<core::List<core::int>> #t7 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t7.{core::List::add}(<core::int>[42]);
+  } =>#t7;
+  core::Set<core::List<core::int>> set12 = block {
+    final core::Set<core::List<core::int>> #t8 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t8.{core::Set::add}(<core::int>[42]);
+    #t8.{core::Set::add}(null);
+  } =>#t8;
+  core::Map<core::String, core::List<core::int>> map12 = block {
+    final core::Map<core::String, core::List<core::int>> #t9 = <core::String, core::List<core::int>>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t9.{core::Map::[]=}("bar", <core::int>[42]);
+    #t9.{core::Map::[]=}("baz", null);
+  } =>#t9;
+  core::List<core::int> list20 = block {
+    final core::List<core::int> #t10 = <core::int>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::int #t11 in <core::int>[42])
+        #t10.{core::List::add}(#t11);
+  } =>#t10;
+  core::Set<core::int> set20 = block {
+    final core::Set<core::int> #t12 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::int #t13 in <core::int>[42])
+        #t12.{core::Set::add}(#t13);
+    #t12.{core::Set::add}(null);
+  } =>#t12;
+  core::Map<core::String, core::int> map20 = block {
+    final core::Map<core::String, core::int> #t14 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::MapEntry<core::String, core::int> #t15 in <core::String, core::int>{"bar": 42}.{core::Map::entries})
+        #t14.{core::Map::[]=}(#t15.{core::MapEntry::key}, #t15.{core::MapEntry::value});
+    #t14.{core::Map::[]=}("baz", null);
+  } =>#t14;
+  core::List<dynamic> list21 = block {
+    final core::List<dynamic> #t16 = <dynamic>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final dynamic #t17 in <dynamic>[dynVar])
+        #t16.{core::List::add}(#t17);
+  } =>#t16;
+  core::Set<dynamic> set21 = block {
+    final core::Set<dynamic> #t18 = col::LinkedHashSet::•<dynamic>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final dynamic #t19 in <dynamic>[dynVar])
+        #t18.{core::Set::add}(#t19);
+    #t18.{core::Set::add}(null);
+  } =>#t18;
+  core::Map<core::String, dynamic> map21 = block {
+    final core::Map<core::String, dynamic> #t20 = <core::String, dynamic>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::MapEntry<core::String, dynamic> #t21 in <core::String, dynamic>{"bar": dynVar}.{core::Map::entries})
+        #t20.{core::Map::[]=}(#t21.{core::MapEntry::key}, #t21.{core::MapEntry::value});
+    #t20.{core::Map::[]=}("baz", null);
+  } =>#t20;
+  core::List<core::List<core::int>> list22 = block {
+    final core::List<core::List<core::int>> #t22 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::List<core::int> #t23 in <core::List<core::int>>[<core::int>[42]])
+        #t22.{core::List::add}(#t23);
+  } =>#t22;
+  core::Set<core::List<core::int>> set22 = block {
+    final core::Set<core::List<core::int>> #t24 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::List<core::int> #t25 in <core::List<core::int>>[<core::int>[42]])
+        #t24.{core::Set::add}(#t25);
+    #t24.{core::Set::add}(null);
+  } =>#t24;
+  core::Map<core::String, core::List<core::int>> map22 = block {
+    final core::Map<core::String, core::List<core::int>> #t26 = <core::String, core::List<core::int>>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::MapEntry<core::String, core::List<core::int>> #t27 in <core::String, core::List<core::int>>{"bar": <core::int>[42]}.{core::Map::entries})
+        #t26.{core::Map::[]=}(#t27.{core::MapEntry::key}, #t27.{core::MapEntry::value});
+    #t26.{core::Map::[]=}("baz", null);
+  } =>#t26;
+  core::List<core::int> list30 = block {
+    final core::List<core::int> #t28 = <core::int>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::int #t29 in <core::int>[42])
+          #t28.{core::List::add}(#t29);
+  } =>#t28;
+  core::Set<core::int> set30 = block {
+    final core::Set<core::int> #t30 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::int #t31 in <core::int>[42])
+          #t30.{core::Set::add}(#t31);
+    #t30.{core::Set::add}(null);
+  } =>#t30;
+  core::Map<core::String, core::int> map30 = block {
+    final core::Map<core::String, core::int> #t32 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::MapEntry<core::String, core::int> #t33 in <core::String, core::int>{"bar": 42}.{core::Map::entries})
+          #t32.{core::Map::[]=}(#t33.{core::MapEntry::key}, #t33.{core::MapEntry::value});
+    #t32.{core::Map::[]=}("baz", null);
+  } =>#t32;
+  core::List<dynamic> list31 = block {
+    final core::List<dynamic> #t34 = <dynamic>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final dynamic #t35 in <dynamic>[dynVar])
+          #t34.{core::List::add}(#t35);
+  } =>#t34;
+  core::Set<dynamic> set31 = block {
+    final core::Set<dynamic> #t36 = col::LinkedHashSet::•<dynamic>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final dynamic #t37 in <dynamic>[dynVar])
+          #t36.{core::Set::add}(#t37);
+    #t36.{core::Set::add}(null);
+  } =>#t36;
+  core::Map<core::String, dynamic> map31 = block {
+    final core::Map<core::String, dynamic> #t38 = <core::String, dynamic>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::MapEntry<core::String, dynamic> #t39 in <core::String, dynamic>{"bar": dynVar}.{core::Map::entries})
+          #t38.{core::Map::[]=}(#t39.{core::MapEntry::key}, #t39.{core::MapEntry::value});
+    #t38.{core::Map::[]=}("baz", null);
+  } =>#t38;
+  core::List<core::List<core::int>> list33 = block {
+    final core::List<core::List<core::int>> #t40 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::List<core::int> #t41 in <core::List<core::int>>[<core::int>[42]])
+          #t40.{core::List::add}(#t41);
+  } =>#t40;
+  core::Set<core::List<core::int>> set33 = block {
+    final core::Set<core::List<core::int>> #t42 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::List<core::int> #t43 in <core::List<core::int>>[<core::int>[42]])
+          #t42.{core::Set::add}(#t43);
+    #t42.{core::Set::add}(null);
+  } =>#t42;
+  core::Map<core::String, core::List<core::int>> map33 = block {
+    final core::Map<core::String, core::List<core::int>> #t44 = <core::String, core::List<core::int>>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::MapEntry<core::String, core::List<core::int>> #t45 in <core::String, core::List<core::int>>{"bar": <core::int>[42]}.{core::Map::entries})
+          #t44.{core::Map::[]=}(#t45.{core::MapEntry::key}, #t45.{core::MapEntry::value});
+    #t44.{core::Map::[]=}("baz", null);
+  } =>#t44;
+  core::List<core::List<core::int>> list40 = block {
+    final core::List<core::List<core::int>> #t46 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::List<core::int> #t47 in <core::List<core::int>>[<core::int>[]])
+        #t46.{core::List::add}(#t47);
+  } =>#t46;
+  core::Set<core::List<core::int>> set40 = block {
+    final core::Set<core::List<core::int>> #t48 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::List<core::int> #t49 in <core::List<core::int>>[<core::int>[]])
+        #t48.{core::Set::add}(#t49);
+    #t48.{core::Set::add}(null);
+  } =>#t48;
+  core::Map<core::String, core::List<core::int>> map40 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:39:34: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
+  Map<String, List<int>> map40 = {if (oracle(\"foo\")) ...{\"bar\", []}, \"baz\": null};
+                                 ^";
+  core::List<core::List<core::int>> list41 = block {
+    final core::List<core::List<core::int>> #t50 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::List<core::int> #t51 in let final core::Set<core::List<core::int>> #t52 = col::LinkedHashSet::•<core::List<core::int>>() in let final core::bool #t53 = #t52.{core::Set::add}(<core::int>[]) in #t52)
+        #t50.{core::List::add}(#t51);
+  } =>#t50;
+  core::Set<core::List<core::int>> set41 = block {
+    final core::Set<core::List<core::int>> #t54 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::List<core::int> #t55 in let final core::Set<core::List<core::int>> #t56 = col::LinkedHashSet::•<core::List<core::int>>() in let final core::bool #t57 = #t56.{core::Set::add}(<core::int>[]) in #t56)
+        #t54.{core::Set::add}(#t55);
+    #t54.{core::Set::add}(null);
+  } =>#t54;
+  core::List<core::List<core::int>> list42 = block {
+    final core::List<core::List<core::int>> #t58 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::List<core::int> #t59 in <core::List<core::int>>[<core::int>[]])
+          #t58.{core::List::add}(#t59);
+  } =>#t58;
+  core::Set<core::List<core::int>> set42 = block {
+    final core::Set<core::List<core::int>> #t60 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::List<core::int> #t61 in <core::List<core::int>>[<core::int>[]])
+          #t60.{core::Set::add}(#t61);
+    #t60.{core::Set::add}(null);
+  } =>#t60;
+  core::Map<core::String, core::List<core::int>> map42 = block {
+    final core::Map<core::String, core::List<core::int>> #t62 = <core::String, core::List<core::int>>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::MapEntry<core::String, core::List<core::int>> #t63 in <core::String, core::List<core::int>>{"bar": <core::int>[]}.{core::Map::entries})
+          #t62.{core::Map::[]=}(#t63.{core::MapEntry::key}, #t63.{core::MapEntry::value});
+    #t62.{core::Map::[]=}("baz", null);
+  } =>#t62;
+  core::List<core::int> list50 = block {
+    final core::List<core::int> #t64 = <core::int>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::int #t65 in <core::int>[])
+        #t64.{core::List::add}(#t65);
+  } =>#t64;
+  core::Set<core::int> set50 = block {
+    final core::Set<core::int> #t66 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::int #t67 in <core::int>[])
+        #t66.{core::Set::add}(#t67);
+    #t66.{core::Set::add}(null);
+  } =>#t66;
+  core::Map<core::String, core::int> map50 = block {
+    final core::Map<core::String, core::int> #t68 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::MapEntry<core::String, core::int> #t69 in <core::String, core::int>{}.{core::Map::entries})
+        #t68.{core::Map::[]=}(#t69.{core::MapEntry::key}, #t69.{core::MapEntry::value});
+    #t68.{core::Map::[]=}("baz", null);
+  } =>#t68;
+  core::List<core::int> list51 = block {
+    final core::List<core::int> #t70 = <core::int>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::int #t71 in let final core::Set<core::int> #t72 = col::LinkedHashSet::•<core::int>() in #t72)
+        #t70.{core::List::add}(#t71);
+  } =>#t70;
+  core::Set<core::int> set51 = block {
+    final core::Set<core::int> #t73 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::int #t74 in let final core::Set<core::int> #t75 = col::LinkedHashSet::•<core::int>() in #t75)
+        #t73.{core::Set::add}(#t74);
+    #t73.{core::Set::add}(null);
+  } =>#t73;
+  core::List<core::int> list52 = block {
+    final core::List<core::int> #t76 = <core::int>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::int #t77 in <core::int>[])
+          #t76.{core::List::add}(#t77);
+  } =>#t76;
+  core::Set<core::int> set52 = block {
+    final core::Set<core::int> #t78 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::int #t79 in <core::int>[])
+          #t78.{core::Set::add}(#t79);
+    #t78.{core::Set::add}(null);
+  } =>#t78;
+  core::Map<core::String, core::int> map52 = block {
+    final core::Map<core::String, core::int> #t80 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::MapEntry<core::String, core::int> #t81 in <core::String, core::int>{}.{core::Map::entries})
+          #t80.{core::Map::[]=}(#t81.{core::MapEntry::key}, #t81.{core::MapEntry::value});
+    #t80.{core::Map::[]=}("baz", null);
+  } =>#t80;
+  core::List<core::List<core::int>> list60 = block {
+    final core::List<core::List<core::int>> #t82 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::List<core::int> #t83 in <core::List<core::int>>[<core::int>[]])
+        #t82.{core::List::add}(#t83);
+  } =>#t82;
+  core::Set<core::List<core::int>> set60 = block {
+    final core::Set<core::List<core::int>> #t84 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::List<core::int> #t85 in <core::List<core::int>>[<core::int>[]])
+        #t84.{core::Set::add}(#t85);
+    #t84.{core::Set::add}(null);
+  } =>#t84;
+  core::Map<core::String, core::List<core::int>> map60 = block {
+    final core::Map<core::String, core::List<core::int>> #t86 = <core::String, core::List<core::int>>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::MapEntry<core::String, core::List<core::int>> #t87 in <core::String, core::List<core::int>>{"bar": <core::int>[]}.{core::Map::entries})
+        #t86.{core::Map::[]=}(#t87.{core::MapEntry::key}, #t87.{core::MapEntry::value});
+    #t86.{core::Map::[]=}("baz", null);
+  } =>#t86;
+  core::List<core::List<core::int>> list61 = block {
+    final core::List<core::List<core::int>> #t88 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::List<core::int> #t89 in <core::List<core::int>>[<core::int>[]])
+          #t88.{core::List::add}(#t89);
+  } =>#t88;
+  core::Set<core::List<core::int>> set61 = block {
+    final core::Set<core::List<core::int>> #t90 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::List<core::int> #t91 in <core::List<core::int>>[<core::int>[]])
+          #t90.{core::Set::add}(#t91);
+    #t90.{core::Set::add}(null);
+  } =>#t90;
+  core::Map<core::String, core::List<core::int>> map61 = block {
+    final core::Map<core::String, core::List<core::int>> #t92 = <core::String, core::List<core::int>>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::MapEntry<core::String, core::List<core::int>> #t93 in <core::String, core::List<core::int>>{"bar": <core::int>[]}.{core::Map::entries})
+          #t92.{core::Map::[]=}(#t93.{core::MapEntry::key}, #t93.{core::MapEntry::value});
+    #t92.{core::Map::[]=}("baz", null);
+  } =>#t92;
+  core::List<core::List<core::int>> list70 = block {
+    final core::List<core::List<core::int>> #t94 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t94.{core::List::add}(<core::int>[]);
+  } =>#t94;
+  core::Set<core::List<core::int>> set70 = block {
+    final core::Set<core::List<core::int>> #t95 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t95.{core::Set::add}(<core::int>[]);
+    #t95.{core::Set::add}(null);
+  } =>#t95;
+  core::List<core::List<core::int>> list71 = block {
+    final core::List<core::List<core::int>> #t96 = <core::List<core::int>>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        #t96.{core::List::add}(<core::int>[]);
+  } =>#t96;
+  core::Set<core::List<core::int>> set71 = block {
+    final core::Set<core::List<core::int>> #t97 = col::LinkedHashSet::•<core::List<core::int>>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        #t97.{core::Set::add}(<core::int>[]);
+    #t97.{core::Set::add}(null);
+  } =>#t97;
+  core::List<core::num> list80 = block {
+    final core::List<core::num> #t98 = <core::num>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t98.{core::List::add}(42);
+    else
+      #t98.{core::List::add}(3.14);
+  } =>#t98;
+  core::Set<core::num> set80 = block {
+    final core::Set<core::num> #t99 = col::LinkedHashSet::•<core::num>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t99.{core::Set::add}(42);
+    else
+      #t99.{core::Set::add}(3.14);
+    #t99.{core::Set::add}(null);
+  } =>#t99;
+  core::Map<core::String, core::num> map80 = block {
+    final core::Map<core::String, core::num> #t100 = <core::String, core::num>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t100.{core::Map::[]=}("bar", 42);
+    else
+      #t100.{core::Map::[]=}("bar", 3.14);
+    #t100.{core::Map::[]=}("baz", null);
+  } =>#t100;
+  core::List<core::num> list81 = block {
+    final core::List<core::num> #t101 = <core::num>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::num #t102 in listInt)
+        #t101.{core::List::add}(#t102);
+    else
+      for (final core::num #t103 in listDouble)
+        #t101.{core::List::add}(#t103);
+  } =>#t101;
+  core::Set<core::num> set81 = block {
+    final core::Set<core::num> #t104 = col::LinkedHashSet::•<core::num>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::num #t105 in listInt)
+        #t104.{core::Set::add}(#t105);
+    else
+      for (final core::num #t106 in listDouble)
+        #t104.{core::Set::add}(#t106);
+    #t104.{core::Set::add}(null);
+  } =>#t104;
+  core::Map<core::String, core::num> map81 = block {
+    final core::Map<core::String, core::num> #t107 = <core::String, core::num>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::MapEntry<core::String, core::num> #t108 in mapToInt.{core::Map::entries})
+        #t107.{core::Map::[]=}(#t108.{core::MapEntry::key}, #t108.{core::MapEntry::value});
+    else
+      for (final core::MapEntry<core::String, core::num> #t109 in mapToDouble.{core::Map::entries})
+        #t107.{core::Map::[]=}(#t109.{core::MapEntry::key}, #t109.{core::MapEntry::value});
+    #t107.{core::Map::[]=}("baz", null);
+  } =>#t107;
+  core::List<dynamic> list82 = block {
+    final core::List<dynamic> #t110 = <dynamic>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final dynamic #t111 in listInt)
+        #t110.{core::List::add}(#t111);
+    else
+      for (final dynamic #t112 in dynVar as{TypeError} core::Iterable<dynamic>)
+        #t110.{core::List::add}(#t112);
+  } =>#t110;
+  core::Set<dynamic> set82 = block {
+    final core::Set<dynamic> #t113 = col::LinkedHashSet::•<dynamic>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final dynamic #t114 in listInt)
+        #t113.{core::Set::add}(#t114);
+    else
+      for (final dynamic #t115 in dynVar as{TypeError} core::Iterable<dynamic>)
+        #t113.{core::Set::add}(#t115);
+    #t113.{core::Set::add}(null);
+  } =>#t113;
+  core::Set<dynamic> map82 = block {
+    final core::Set<dynamic> #t116 = col::LinkedHashSet::•<dynamic>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t116.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:71:38: Error: Unexpected type 'Map<String, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  var map82 = {if (oracle(\"foo\")) ...mapToInt else ...dynVar, null};
+                                     ^");
+    else
+      for (final dynamic #t117 in dynVar as{TypeError} core::Iterable<dynamic>)
+        #t116.{core::Set::add}(#t117);
+    #t116.{core::Set::add}(null);
+  } =>#t116;
+  core::List<core::num> list83 = block {
+    final core::List<core::num> #t118 = <core::num>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t118.{core::List::add}(42);
+    else
+      for (final core::num #t119 in listDouble)
+        #t118.{core::List::add}(#t119);
+  } =>#t118;
+  core::Set<core::num> set83 = block {
+    final core::Set<core::num> #t120 = col::LinkedHashSet::•<core::num>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::num #t121 in listInt)
+        #t120.{core::Set::add}(#t121);
+    else
+      #t120.{core::Set::add}(3.14);
+    #t120.{core::Set::add}(null);
+  } =>#t120;
+  core::Map<core::String, core::num> map83 = block {
+    final core::Map<core::String, core::num> #t122 = <core::String, core::num>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::MapEntry<core::String, core::num> #t123 in mapToInt.{core::Map::entries})
+        #t122.{core::Map::[]=}(#t123.{core::MapEntry::key}, #t123.{core::MapEntry::value});
+    else
+      #t122.{core::Map::[]=}("bar", 3.14);
+    #t122.{core::Map::[]=}("baz", null);
+  } =>#t122;
+  core::List<core::int> list90 = block {
+    final core::List<core::int> #t124 = <core::int>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t124.{core::List::add}(dynVar as{TypeError} core::int);
+  } =>#t124;
+  core::Set<core::int> set90 = block {
+    final core::Set<core::int> #t125 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t125.{core::Set::add}(dynVar as{TypeError} core::int);
+    #t125.{core::Set::add}(null);
+  } =>#t125;
+  core::Map<core::String, core::int> map90 = block {
+    final core::Map<core::String, core::int> #t126 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t126.{core::Map::[]=}("bar", dynVar as{TypeError} core::int);
+    #t126.{core::Map::[]=}("baz", null);
+  } =>#t126;
+  core::List<core::int> list91 = block {
+    final core::List<core::int> #t127 = <core::int>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final dynamic #t128 in dynVar as{TypeError} core::Iterable<dynamic>) {
+        final core::int #t129 = #t128 as{TypeError} core::int;
+        #t127.{core::List::add}(#t129);
+      }
+  } =>#t127;
+  core::Set<core::int> set91 = block {
+    final core::Set<core::int> #t130 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final dynamic #t131 in dynVar as{TypeError} core::Iterable<dynamic>) {
+        final core::int #t132 = #t131 as{TypeError} core::int;
+        #t130.{core::Set::add}(#t132);
+      }
+    #t130.{core::Set::add}(null);
+  } =>#t130;
+  core::Map<core::String, core::int> map91 = block {
+    final core::Map<core::String, core::int> #t133 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::MapEntry<dynamic, dynamic> #t134 in (dynVar as{TypeError} core::Map<dynamic, dynamic>).{core::Map::entries}) {
+        final core::String #t135 = #t134.{core::MapEntry::key} as{TypeError} core::String;
+        final core::int #t136 = #t134.{core::MapEntry::value} as{TypeError} core::int;
+        #t133.{core::Map::[]=}(#t135, #t136);
+      }
+    #t133.{core::Map::[]=}("baz", null);
+  } =>#t133;
+  core::List<core::int> list100 = block {
+    final core::List<core::int> #t137 = <core::int>[];
+    if(dynVar as{TypeError} core::bool)
+      #t137.{core::List::add}(42);
+  } =>#t137;
+  core::Set<core::int> set100 = block {
+    final core::Set<core::int> #t138 = col::LinkedHashSet::•<core::int>();
+    if(dynVar as{TypeError} core::bool)
+      #t138.{core::Set::add}(42);
+  } =>#t138;
+  core::Map<core::int, core::int> map100 = block {
+    final core::Map<core::int, core::int> #t139 = <core::int, core::int>{};
+    if(dynVar as{TypeError} core::bool)
+      #t139.{core::Map::[]=}(42, 42);
+  } =>#t139;
+}
+static method testIfElementErrors(core::Map<core::int, core::int> map) → dynamic {
+  block {
+    final core::List<core::int> #t140 = <core::int>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t140.{core::List::add}(let final<BottomType> #t141 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:87:28: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int>[if (oracle(\"foo\")) \"bar\"];
+                           ^" in "bar" as{TypeError} core::int);
+  } =>#t140;
+  block {
+    final core::Set<core::int> #t142 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t142.{core::Set::add}(let final<BottomType> #t143 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:88:28: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int>{if (oracle(\"foo\")) \"bar\", null};
+                           ^" in "bar" as{TypeError} core::int);
+    #t142.{core::Set::add}(null);
+  } =>#t142;
+  block {
+    final core::Map<core::String, core::int> #t144 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t144.{core::Map::[]=}("bar", let final<BottomType> #t145 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:89:43: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <String, int>{if (oracle(\"foo\")) \"bar\": \"bar\", \"baz\": null};
+                                          ^" in "bar" as{TypeError} core::int);
+    #t144.{core::Map::[]=}("baz", null);
+  } =>#t144;
+  block {
+    final core::List<core::int> #t146 = <core::int>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::int #t147 in <core::int>[let final<BottomType> #t148 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:90:32: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int>[if (oracle(\"foo\")) ...[\"bar\"]];
+                               ^" in "bar" as{TypeError} core::int])
+        #t146.{core::List::add}(#t147);
+  } =>#t146;
+  block {
+    final core::Set<core::int> #t149 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::int #t150 in <core::int>[let final<BottomType> #t151 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:91:32: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int>{if (oracle(\"foo\")) ...[\"bar\"], null};
+                               ^" in "bar" as{TypeError} core::int])
+        #t149.{core::Set::add}(#t150);
+    #t149.{core::Set::add}(null);
+  } =>#t149;
+  block {
+    final core::Map<core::String, core::int> #t152 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      for (final core::MapEntry<core::String, core::int> #t153 in <core::String, core::int>{"bar": let final<BottomType> #t154 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:92:47: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <String, int>{if (oracle(\"foo\")) ...{\"bar\": \"bar\"}, \"baz\": null};
+                                              ^" in "bar" as{TypeError} core::int}.{core::Map::entries})
+        #t152.{core::Map::[]=}(#t153.{core::MapEntry::key}, #t153.{core::MapEntry::value});
+    #t152.{core::Map::[]=}("baz", null);
+  } =>#t152;
+  block {
+    final core::List<core::int> #t155 = <core::int>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t155.{core::List::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:93:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>[if (oracle(\"foo\")) ...map];
+                              ^");
+  } =>#t155;
+  block {
+    final core::Set<core::int> #t156 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t156.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:94:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>{if (oracle(\"foo\")) ...map, null};
+                              ^");
+    #t156.{core::Set::add}(null);
+  } =>#t156;
+  <core::String, core::int>{invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:95:39: Error: Unexpected type 'List<String>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{if (oracle(\"foo\")) ...[\"bar\"], \"baz\": null};
+                                      ^": null, invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:95:39: Error: Unexpected type 'List<String>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{if (oracle(\"foo\")) ...[\"bar\"], \"baz\": null};
+                                      ^": null};
+  block {
+    final core::List<core::String> #t157 = <core::String>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t157.{core::List::add}(let final<BottomType> #t158 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:96:31: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String>[if (oracle(\"foo\")) 42 else 3.14];
+                              ^" in 42 as{TypeError} core::String);
+    else
+      #t157.{core::List::add}(let final<BottomType> #t159 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:96:39: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String>[if (oracle(\"foo\")) 42 else 3.14];
+                                      ^" in 3.14 as{TypeError} core::String);
+  } =>#t157;
+  block {
+    final core::Set<core::String> #t160 = col::LinkedHashSet::•<core::String>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t160.{core::Set::add}(let final<BottomType> #t161 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:97:31: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String>{if (oracle(\"foo\")) 42 else 3.14, null};
+                              ^" in 42 as{TypeError} core::String);
+    else
+      #t160.{core::Set::add}(let final<BottomType> #t162 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:97:39: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String>{if (oracle(\"foo\")) 42 else 3.14, null};
+                                      ^" in 3.14 as{TypeError} core::String);
+    #t160.{core::Set::add}(null);
+  } =>#t160;
+  block {
+    final core::Map<core::String, core::String> #t163 = <core::String, core::String>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t163.{core::Map::[]=}("bar", let final<BottomType> #t164 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:98:46: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String, String>{if (oracle(\"foo\")) \"bar\": 42 else \"baz\": 3.14, \"baz\": null};
+                                             ^" in 42 as{TypeError} core::String);
+    else
+      #t163.{core::Map::[]=}("baz", let final<BottomType> #t165 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:98:61: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String, String>{if (oracle(\"foo\")) \"bar\": 42 else \"baz\": 3.14, \"baz\": null};
+                                                            ^" in 3.14 as{TypeError} core::String);
+    #t163.{core::Map::[]=}("baz", null);
+  } =>#t163;
+  block {
+    final core::List<core::int> #t166 = <core::int>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t166.{core::List::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:99:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>[if (oracle(\"foo\")) ...map else 42];
+                              ^");
+    else
+      #t166.{core::List::add}(42);
+  } =>#t166;
+  block {
+    final core::Set<core::int> #t167 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t167.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:100:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>{if (oracle(\"foo\")) ...map else 42, null};
+                              ^");
+    else
+      #t167.{core::Set::add}(42);
+    #t167.{core::Set::add}(null);
+  } =>#t167;
+  <core::String, core::int>{invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:101:39: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{if (oracle(\"foo\")) ...[42] else \"bar\": 42, \"baz\": null};
+                                      ^": null, invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:101:39: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{if (oracle(\"foo\")) ...[42] else \"bar\": 42, \"baz\": null};
+                                      ^": null};
+  block {
+    final core::List<core::int> #t168 = <core::int>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t168.{core::List::add}(42);
+    else
+      #t168.{core::List::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:102:39: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>[if (oracle(\"foo\")) 42 else ...map];
+                                      ^");
+  } =>#t168;
+  block {
+    final core::Set<core::int> #t169 = col::LinkedHashSet::•<core::int>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t169.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:103:31: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>{if (oracle(\"foo\")) ...map else 42, null};
+                              ^");
+    else
+      #t169.{core::Set::add}(42);
+    #t169.{core::Set::add}(null);
+  } =>#t169;
+  <core::String, core::int>{invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:104:54: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{if (oracle(\"foo\")) \"bar\": 42 else ...[42], \"baz\": null};
+                                                     ^": null, invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:104:54: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{if (oracle(\"foo\")) \"bar\": 42 else ...[42], \"baz\": null};
+                                                     ^": null};
+  core::Set<dynamic> set10 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:106:24: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
+  Set<dynamic> set10 = {if (oracle(\"foo\")) 42 else \"bar\": 3.14};
+                       ^";
+  core::Map<dynamic, dynamic> map10 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:107:53: Error: Expected ':' after this.
+  Map<dynamic, dynamic> map10 = {if (oracle(\"foo\")) 42 else \"bar\": 3.14};
+                                                    ^": null};
+  core::Set<dynamic> set11 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:108:24: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
+  Set<dynamic> set11 = {if (oracle(\"foo\")) \"bar\": 3.14 else 42};
+                       ^";
+  core::Map<dynamic, dynamic> map11 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:109:70: Error: Expected ':' after this.
+  Map<dynamic, dynamic> map11 = {if (oracle(\"foo\")) \"bar\": 3.14 else 42};
+                                                                     ^": null};
+  core::Map<<BottomType>, core::Null> map12 = <<BottomType>, core::Null>{invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:110:35: Error: Expected ':' after this.
+  var map12 = {if (oracle(\"foo\")) 42 else \"bar\": 3.14};
+                                  ^": null};
+  core::Map<<BottomType>, core::Null> map13 = <<BottomType>, core::Null>{invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:111:52: Error: Expected ':' after this.
+  var map13 = {if (oracle(\"foo\")) \"bar\": 3.14 else 42};
+                                                   ^": null};
+  core::List<core::int> list20 = block {
+    final core::List<core::int> #t170 = <core::int>[];
+    if(let final<BottomType> #t171 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:112:27: Error: A value of type 'int' can't be assigned to a variable of type 'bool'.
+Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+  List<int> list20 = [if (42) 42];
+                          ^" in 42 as{TypeError} core::bool)
+      #t170.{core::List::add}(42);
+  } =>#t170;
+  core::Set<core::int> set20 = block {
+    final core::Set<core::int> #t172 = col::LinkedHashSet::•<core::int>();
+    if(let final<BottomType> #t173 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:113:25: Error: A value of type 'int' can't be assigned to a variable of type 'bool'.
+Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+  Set<int> set20 = {if (42) 42};
+                        ^" in 42 as{TypeError} core::bool)
+      #t172.{core::Set::add}(42);
+  } =>#t172;
+  core::Map<core::int, core::int> map30 = block {
+    final core::Map<core::int, core::int> #t174 = <core::int, core::int>{};
+    if(let final<BottomType> #t175 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:114:30: Error: A value of type 'int' can't be assigned to a variable of type 'bool'.
+Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+  Map<int, int> map30 = {if (42) 42: 42};
+                             ^" in 42 as{TypeError} core::bool)
+      #t174.{core::Map::[]=}(42, 42);
+  } =>#t174;
+  core::List<core::String> list40 = block {
+    final core::List<core::String> #t176 = <core::String>[];
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t176.{core::List::add}(let final<BottomType> #t177 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:115:53: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  List<String> list40 = <String>[if (oracle(\"foo\")) true else 42];
+                                                    ^" in true as{TypeError} core::String);
+    else
+      #t176.{core::List::add}(let final<BottomType> #t178 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:115:63: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  List<String> list40 = <String>[if (oracle(\"foo\")) true else 42];
+                                                              ^" in 42 as{TypeError} core::String);
+  } =>#t176;
+  core::Set<core::String> set40 = block {
+    final core::Set<core::String> #t179 = col::LinkedHashSet::•<core::String>();
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t179.{core::Set::add}(let final<BottomType> #t180 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:116:51: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  Set<String> set40 = <String>{if (oracle(\"foo\")) true else 42};
+                                                  ^" in true as{TypeError} core::String);
+    else
+      #t179.{core::Set::add}(let final<BottomType> #t181 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:116:61: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  Set<String> set40 = <String>{if (oracle(\"foo\")) true else 42};
+                                                            ^" in 42 as{TypeError} core::String);
+  } =>#t179;
+  core::Map<core::String, core::int> map40 = block {
+    final core::Map<core::String, core::int> #t182 = <core::String, core::int>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t182.{core::Map::[]=}(let final<BottomType> #t183 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:117:61: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  Map<String, int> map40 = <String, int>{if (oracle(\"foo\")) true: 42 else 42: 42};
+                                                            ^" in true as{TypeError} core::String, 42);
+    else
+      #t182.{core::Map::[]=}(let final<BottomType> #t184 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:117:75: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  Map<String, int> map40 = <String, int>{if (oracle(\"foo\")) true: 42 else 42: 42};
+                                                                          ^" in 42 as{TypeError} core::String, 42);
+  } =>#t182;
+  core::Map<core::int, core::String> map41 = block {
+    final core::Map<core::int, core::String> #t185 = <core::int, core::String>{};
+    if(self::oracle<core::String>("foo") as{TypeError} core::bool)
+      #t185.{core::Map::[]=}(42, let final<BottomType> #t186 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:118:65: Error: A value of type 'bool' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  Map<int, String> map41 = <int, String>{if (oracle(\"foo\")) 42: true else 42: 42};
+                                                                ^" in true as{TypeError} core::String);
+    else
+      #t185.{core::Map::[]=}(42, let final<BottomType> #t187 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:118:79: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  Map<int, String> map41 = <int, String>{if (oracle(\"foo\")) 42: true else 42: 42};
+                                                                              ^" in 42 as{TypeError} core::String);
+  } =>#t185;
+}
+static method testForElement(dynamic dynVar, core::List<core::int> listInt, core::List<core::double> listDouble, core::int index, core::Map<core::String, core::int> mapStringInt, core::Map<core::String, core::double> mapStringDouble) → dynamic {
+  core::List<core::int> list10 = block {
+    final core::List<core::int> #t188 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t188.{core::List::add}(42);
+  } =>#t188;
+  core::Set<core::int> set10 = block {
+    final core::Set<core::int> #t189 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t189.{core::Set::add}(42);
+    #t189.{core::Set::add}(null);
+  } =>#t189;
+  core::Map<core::String, core::int> map10 = block {
+    final core::Map<core::String, core::int> #t190 = <core::String, core::int>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t190.{core::Map::[]=}("bar", 42);
+    #t190.{core::Map::[]=}("baz", null);
+  } =>#t190;
+  core::List<dynamic> list11 = block {
+    final core::List<dynamic> #t191 = <dynamic>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t191.{core::List::add}(dynVar);
+  } =>#t191;
+  core::Set<dynamic> set11 = block {
+    final core::Set<dynamic> #t192 = col::LinkedHashSet::•<dynamic>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t192.{core::Set::add}(dynVar);
+    #t192.{core::Set::add}(null);
+  } =>#t192;
+  core::Map<core::String, dynamic> map11 = block {
+    final core::Map<core::String, dynamic> #t193 = <core::String, dynamic>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t193.{core::Map::[]=}("bar", dynVar);
+    #t193.{core::Map::[]=}("baz", null);
+  } =>#t193;
+  core::List<core::List<core::int>> list12 = block {
+    final core::List<core::List<core::int>> #t194 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t194.{core::List::add}(<core::int>[42]);
+  } =>#t194;
+  core::Set<core::List<core::int>> set12 = block {
+    final core::Set<core::List<core::int>> #t195 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t195.{core::Set::add}(<core::int>[42]);
+    #t195.{core::Set::add}(null);
+  } =>#t195;
+  core::Map<core::String, core::List<core::int>> map12 = block {
+    final core::Map<core::String, core::List<core::int>> #t196 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t196.{core::Map::[]=}("bar", <core::int>[42]);
+    #t196.{core::Map::[]=}("baz", null);
+  } =>#t196;
+  core::List<core::int> list20 = block {
+    final core::List<core::int> #t197 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::int #t198 in <core::int>[42])
+        #t197.{core::List::add}(#t198);
+  } =>#t197;
+  core::Set<core::int> set20 = block {
+    final core::Set<core::int> #t199 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::int #t200 in <core::int>[42])
+        #t199.{core::Set::add}(#t200);
+    #t199.{core::Set::add}(null);
+  } =>#t199;
+  core::Map<core::String, core::int> map20 = block {
+    final core::Map<core::String, core::int> #t201 = <core::String, core::int>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::MapEntry<core::String, core::int> #t202 in <core::String, core::int>{"bar": 42}.{core::Map::entries})
+        #t201.{core::Map::[]=}(#t202.{core::MapEntry::key}, #t202.{core::MapEntry::value});
+    #t201.{core::Map::[]=}("baz", null);
+  } =>#t201;
+  core::List<dynamic> list21 = block {
+    final core::List<dynamic> #t203 = <dynamic>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final dynamic #t204 in <dynamic>[dynVar])
+        #t203.{core::List::add}(#t204);
+  } =>#t203;
+  core::Set<dynamic> set21 = block {
+    final core::Set<dynamic> #t205 = col::LinkedHashSet::•<dynamic>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final dynamic #t206 in <dynamic>[dynVar])
+        #t205.{core::Set::add}(#t206);
+    #t205.{core::Set::add}(null);
+  } =>#t205;
+  core::Map<core::String, dynamic> map21 = block {
+    final core::Map<core::String, dynamic> #t207 = <core::String, dynamic>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::MapEntry<core::String, dynamic> #t208 in <core::String, dynamic>{"bar": dynVar}.{core::Map::entries})
+        #t207.{core::Map::[]=}(#t208.{core::MapEntry::key}, #t208.{core::MapEntry::value});
+    #t207.{core::Map::[]=}("baz", null);
+  } =>#t207;
+  core::List<core::List<core::int>> list22 = block {
+    final core::List<core::List<core::int>> #t209 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::List<core::int> #t210 in <core::List<core::int>>[<core::int>[42]])
+        #t209.{core::List::add}(#t210);
+  } =>#t209;
+  core::Set<core::List<core::int>> set22 = block {
+    final core::Set<core::List<core::int>> #t211 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::List<core::int> #t212 in <core::List<core::int>>[<core::int>[42]])
+        #t211.{core::Set::add}(#t212);
+    #t211.{core::Set::add}(null);
+  } =>#t211;
+  core::Map<core::String, core::List<core::int>> map22 = block {
+    final core::Map<core::String, core::List<core::int>> #t213 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::MapEntry<core::String, core::List<core::int>> #t214 in <core::String, core::List<core::int>>{"bar": <core::int>[42]}.{core::Map::entries})
+        #t213.{core::Map::[]=}(#t214.{core::MapEntry::key}, #t214.{core::MapEntry::value});
+    #t213.{core::Map::[]=}("baz", null);
+  } =>#t213;
+  core::List<core::int> list30 = block {
+    final core::List<core::int> #t215 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::int #t216 in <core::int>[42])
+          #t215.{core::List::add}(#t216);
+  } =>#t215;
+  core::Set<core::int> set30 = block {
+    final core::Set<core::int> #t217 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::int #t218 in <core::int>[42])
+          #t217.{core::Set::add}(#t218);
+    #t217.{core::Set::add}(null);
+  } =>#t217;
+  core::Map<core::String, core::int> map30 = block {
+    final core::Map<core::String, core::int> #t219 = <core::String, core::int>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::MapEntry<core::String, core::int> #t220 in <core::String, core::int>{"bar": 42}.{core::Map::entries})
+          #t219.{core::Map::[]=}(#t220.{core::MapEntry::key}, #t220.{core::MapEntry::value});
+    #t219.{core::Map::[]=}("baz", null);
+  } =>#t219;
+  core::List<dynamic> list31 = block {
+    final core::List<dynamic> #t221 = <dynamic>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final dynamic #t222 in <dynamic>[dynVar])
+          #t221.{core::List::add}(#t222);
+  } =>#t221;
+  core::Set<dynamic> set31 = block {
+    final core::Set<dynamic> #t223 = col::LinkedHashSet::•<dynamic>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final dynamic #t224 in <dynamic>[dynVar])
+          #t223.{core::Set::add}(#t224);
+    #t223.{core::Set::add}(null);
+  } =>#t223;
+  core::Map<core::String, dynamic> map31 = block {
+    final core::Map<core::String, dynamic> #t225 = <core::String, dynamic>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::MapEntry<core::String, dynamic> #t226 in <core::String, dynamic>{"bar": dynVar}.{core::Map::entries})
+          #t225.{core::Map::[]=}(#t226.{core::MapEntry::key}, #t226.{core::MapEntry::value});
+    #t225.{core::Map::[]=}("baz", null);
+  } =>#t225;
+  core::List<core::List<core::int>> list33 = block {
+    final core::List<core::List<core::int>> #t227 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::List<core::int> #t228 in <core::List<core::int>>[<core::int>[42]])
+          #t227.{core::List::add}(#t228);
+  } =>#t227;
+  core::Set<core::List<core::int>> set33 = block {
+    final core::Set<core::List<core::int>> #t229 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::List<core::int> #t230 in <core::List<core::int>>[<core::int>[42]])
+          #t229.{core::Set::add}(#t230);
+    #t229.{core::Set::add}(null);
+  } =>#t229;
+  core::Map<core::String, core::List<core::int>> map33 = block {
+    final core::Map<core::String, core::List<core::int>> #t231 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::MapEntry<core::String, core::List<core::int>> #t232 in <core::String, core::List<core::int>>{"bar": <core::int>[42]}.{core::Map::entries})
+          #t231.{core::Map::[]=}(#t232.{core::MapEntry::key}, #t232.{core::MapEntry::value});
+    #t231.{core::Map::[]=}("baz", null);
+  } =>#t231;
+  core::List<core::List<core::int>> list40 = block {
+    final core::List<core::List<core::int>> #t233 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::List<core::int> #t234 in <core::List<core::int>>[<core::int>[]])
+        #t233.{core::List::add}(#t234);
+  } =>#t233;
+  core::Set<core::List<core::int>> set40 = block {
+    final core::Set<core::List<core::int>> #t235 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::List<core::int> #t236 in <core::List<core::int>>[<core::int>[]])
+        #t235.{core::Set::add}(#t236);
+    #t235.{core::Set::add}(null);
+  } =>#t235;
+  core::Map<core::String, core::List<core::int>> map40 = block {
+    final core::Map<core::String, core::List<core::int>> #t237 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::MapEntry<core::String, core::List<core::int>> #t238 in <core::String, core::List<core::int>>{"bar": <core::int>[]}.{core::Map::entries})
+        #t237.{core::Map::[]=}(#t238.{core::MapEntry::key}, #t238.{core::MapEntry::value});
+    #t237.{core::Map::[]=}("baz", null);
+  } =>#t237;
+  core::List<core::List<core::int>> list41 = block {
+    final core::List<core::List<core::int>> #t239 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::List<core::int> #t240 in let final core::Set<core::List<core::int>> #t241 = col::LinkedHashSet::•<core::List<core::int>>() in let final core::bool #t242 = #t241.{core::Set::add}(<core::int>[]) in #t241)
+        #t239.{core::List::add}(#t240);
+  } =>#t239;
+  core::Set<core::List<core::int>> set41 = block {
+    final core::Set<core::List<core::int>> #t243 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::List<core::int> #t244 in let final core::Set<core::List<core::int>> #t245 = col::LinkedHashSet::•<core::List<core::int>>() in let final core::bool #t246 = #t245.{core::Set::add}(<core::int>[]) in #t245)
+        #t243.{core::Set::add}(#t244);
+    #t243.{core::Set::add}(null);
+  } =>#t243;
+  core::List<core::List<core::int>> list42 = block {
+    final core::List<core::List<core::int>> #t247 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::List<core::int> #t248 in <core::List<core::int>>[<core::int>[]])
+          #t247.{core::List::add}(#t248);
+  } =>#t247;
+  core::Set<core::List<core::int>> set42 = block {
+    final core::Set<core::List<core::int>> #t249 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::List<core::int> #t250 in <core::List<core::int>>[<core::int>[]])
+          #t249.{core::Set::add}(#t250);
+    #t249.{core::Set::add}(null);
+  } =>#t249;
+  core::Map<core::String, core::List<core::int>> map42 = block {
+    final core::Map<core::String, core::List<core::int>> #t251 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::MapEntry<core::String, core::List<core::int>> #t252 in <core::String, core::List<core::int>>{"bar": <core::int>[]}.{core::Map::entries})
+          #t251.{core::Map::[]=}(#t252.{core::MapEntry::key}, #t252.{core::MapEntry::value});
+    #t251.{core::Map::[]=}("baz", null);
+  } =>#t251;
+  core::List<core::int> list50 = block {
+    final core::List<core::int> #t253 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::int #t254 in <core::int>[])
+        #t253.{core::List::add}(#t254);
+  } =>#t253;
+  core::Set<core::int> set50 = block {
+    final core::Set<core::int> #t255 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::int #t256 in <core::int>[])
+        #t255.{core::Set::add}(#t256);
+    #t255.{core::Set::add}(null);
+  } =>#t255;
+  core::Map<core::String, core::int> map50 = block {
+    final core::Map<core::String, core::int> #t257 = <core::String, core::int>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::MapEntry<core::String, core::int> #t258 in <core::String, core::int>{}.{core::Map::entries})
+        #t257.{core::Map::[]=}(#t258.{core::MapEntry::key}, #t258.{core::MapEntry::value});
+    #t257.{core::Map::[]=}("baz", null);
+  } =>#t257;
+  core::List<core::int> list51 = block {
+    final core::List<core::int> #t259 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::int #t260 in let final core::Set<core::int> #t261 = col::LinkedHashSet::•<core::int>() in #t261)
+        #t259.{core::List::add}(#t260);
+  } =>#t259;
+  core::Set<core::int> set51 = block {
+    final core::Set<core::int> #t262 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::int #t263 in let final core::Set<core::int> #t264 = col::LinkedHashSet::•<core::int>() in #t264)
+        #t262.{core::Set::add}(#t263);
+    #t262.{core::Set::add}(null);
+  } =>#t262;
+  core::List<core::int> list52 = block {
+    final core::List<core::int> #t265 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::int #t266 in <core::int>[])
+          #t265.{core::List::add}(#t266);
+  } =>#t265;
+  core::Set<core::int> set52 = block {
+    final core::Set<core::int> #t267 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::int #t268 in <core::int>[])
+          #t267.{core::Set::add}(#t268);
+    #t267.{core::Set::add}(null);
+  } =>#t267;
+  core::List<core::List<core::int>> list60 = block {
+    final core::List<core::List<core::int>> #t269 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::List<core::int> #t270 in <core::List<core::int>>[<core::int>[]])
+        #t269.{core::List::add}(#t270);
+  } =>#t269;
+  core::Set<core::List<core::int>> set60 = block {
+    final core::Set<core::List<core::int>> #t271 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::List<core::int> #t272 in <core::List<core::int>>[<core::int>[]])
+        #t271.{core::Set::add}(#t272);
+    #t271.{core::Set::add}(null);
+  } =>#t271;
+  core::Map<core::String, core::List<core::int>> map60 = block {
+    final core::Map<core::String, core::List<core::int>> #t273 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::MapEntry<core::String, core::List<core::int>> #t274 in <core::String, core::List<core::int>>{"bar": <core::int>[]}.{core::Map::entries})
+        #t273.{core::Map::[]=}(#t274.{core::MapEntry::key}, #t274.{core::MapEntry::value});
+    #t273.{core::Map::[]=}("baz", null);
+  } =>#t273;
+  core::List<core::List<core::int>> list61 = block {
+    final core::List<core::List<core::int>> #t275 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::List<core::int> #t276 in <core::List<core::int>>[<core::int>[]])
+          #t275.{core::List::add}(#t276);
+  } =>#t275;
+  core::Set<core::List<core::int>> set61 = block {
+    final core::Set<core::List<core::int>> #t277 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::List<core::int> #t278 in <core::List<core::int>>[<core::int>[]])
+          #t277.{core::Set::add}(#t278);
+    #t277.{core::Set::add}(null);
+  } =>#t277;
+  core::Map<core::String, core::List<core::int>> map61 = block {
+    final core::Map<core::String, core::List<core::int>> #t279 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::MapEntry<core::String, core::List<core::int>> #t280 in <core::String, core::List<core::int>>{"bar": <core::int>[]}.{core::Map::entries})
+          #t279.{core::Map::[]=}(#t280.{core::MapEntry::key}, #t280.{core::MapEntry::value});
+    #t279.{core::Map::[]=}("baz", null);
+  } =>#t279;
+  core::List<core::List<core::int>> list70 = block {
+    final core::List<core::List<core::int>> #t281 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t281.{core::List::add}(<core::int>[]);
+  } =>#t281;
+  core::Set<core::List<core::int>> set70 = block {
+    final core::Set<core::List<core::int>> #t282 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t282.{core::Set::add}(<core::int>[]);
+    #t282.{core::Set::add}(null);
+  } =>#t282;
+  core::Map<core::String, core::List<core::int>> map70 = block {
+    final core::Map<core::String, core::List<core::int>> #t283 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t283.{core::Map::[]=}("bar", <core::int>[]);
+    #t283.{core::Map::[]=}("baz", null);
+  } =>#t283;
+  core::List<core::List<core::int>> list71 = block {
+    final core::List<core::List<core::int>> #t284 = <core::List<core::int>>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        #t284.{core::List::add}(<core::int>[]);
+  } =>#t284;
+  core::Set<core::List<core::int>> set71 = block {
+    final core::Set<core::List<core::int>> #t285 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        #t285.{core::Set::add}(<core::int>[]);
+    #t285.{core::Set::add}(null);
+  } =>#t285;
+  core::Map<core::String, core::List<core::int>> map71 = block {
+    final core::Map<core::String, core::List<core::int>> #t286 = <core::String, core::List<core::int>>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        #t286.{core::Map::[]=}("bar", <core::int>[]);
+    #t286.{core::Map::[]=}("baz", null);
+  } =>#t286;
+  core::List<core::num> list80 = block {
+    final core::List<core::num> #t287 = <core::num>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        #t287.{core::List::add}(42);
+      else
+        #t287.{core::List::add}(3.14);
+  } =>#t287;
+  core::Set<core::num> set80 = block {
+    final core::Set<core::num> #t288 = col::LinkedHashSet::•<core::num>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        #t288.{core::Set::add}(42);
+      else
+        #t288.{core::Set::add}(3.14);
+    #t288.{core::Set::add}(null);
+  } =>#t288;
+  core::Map<core::String, core::num> map80 = block {
+    final core::Map<core::String, core::num> #t289 = <core::String, core::num>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        #t289.{core::Map::[]=}("bar", 42);
+      else
+        #t289.{core::Map::[]=}("bar", 3.14);
+    #t289.{core::Map::[]=}("baz", null);
+  } =>#t289;
+  core::List<core::num> list81 = block {
+    final core::List<core::num> #t290 = <core::num>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::num #t291 in listInt)
+          #t290.{core::List::add}(#t291);
+      else
+        for (final core::num #t292 in listDouble)
+          #t290.{core::List::add}(#t292);
+  } =>#t290;
+  core::Set<core::num> set81 = block {
+    final core::Set<core::num> #t293 = col::LinkedHashSet::•<core::num>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::num #t294 in listInt)
+          #t293.{core::Set::add}(#t294);
+      else
+        for (final core::num #t295 in listDouble)
+          #t293.{core::Set::add}(#t295);
+    #t293.{core::Set::add}(null);
+  } =>#t293;
+  core::Map<core::String, core::num> map81 = block {
+    final core::Map<core::String, core::num> #t296 = <core::String, core::num>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::MapEntry<core::String, core::num> #t297 in mapStringInt.{core::Map::entries})
+          #t296.{core::Map::[]=}(#t297.{core::MapEntry::key}, #t297.{core::MapEntry::value});
+      else
+        for (final core::MapEntry<core::String, core::num> #t298 in mapStringDouble.{core::Map::entries})
+          #t296.{core::Map::[]=}(#t298.{core::MapEntry::key}, #t298.{core::MapEntry::value});
+    #t296.{core::Map::[]=}("baz", null);
+  } =>#t296;
+  core::List<dynamic> list82 = block {
+    final core::List<dynamic> #t299 = <dynamic>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final dynamic #t300 in listInt)
+          #t299.{core::List::add}(#t300);
+      else
+        for (final dynamic #t301 in dynVar as{TypeError} core::Iterable<dynamic>)
+          #t299.{core::List::add}(#t301);
+  } =>#t299;
+  core::Set<dynamic> set82 = block {
+    final core::Set<dynamic> #t302 = col::LinkedHashSet::•<dynamic>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final dynamic #t303 in listInt)
+          #t302.{core::Set::add}(#t303);
+      else
+        for (final dynamic #t304 in dynVar as{TypeError} core::Iterable<dynamic>)
+          #t302.{core::Set::add}(#t304);
+    #t302.{core::Set::add}(null);
+  } =>#t302;
+  core::Map<dynamic, dynamic> map82 = block {
+    final core::Map<dynamic, dynamic> #t305 = <dynamic, dynamic>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::MapEntry<dynamic, dynamic> #t306 in mapStringInt.{core::Map::entries})
+          #t305.{core::Map::[]=}(#t306.{core::MapEntry::key}, #t306.{core::MapEntry::value});
+      else
+        for (final core::MapEntry<dynamic, dynamic> #t307 in (dynVar as{TypeError} core::Map<dynamic, dynamic>).{core::Map::entries})
+          #t305.{core::Map::[]=}(#t307.{core::MapEntry::key}, #t307.{core::MapEntry::value});
+    #t305.{core::Map::[]=}("baz", null);
+  } =>#t305;
+  core::List<core::num> list83 = block {
+    final core::List<core::num> #t308 = <core::num>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        #t308.{core::List::add}(42);
+      else
+        for (final core::num #t309 in listDouble)
+          #t308.{core::List::add}(#t309);
+  } =>#t308;
+  core::Set<core::num> set83 = block {
+    final core::Set<core::num> #t310 = col::LinkedHashSet::•<core::num>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::num #t311 in listInt)
+          #t310.{core::Set::add}(#t311);
+      else
+        #t310.{core::Set::add}(3.14);
+    #t310.{core::Set::add}(null);
+  } =>#t310;
+  core::Map<core::String, core::num> map83 = block {
+    final core::Map<core::String, core::num> #t312 = <core::String, core::num>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      if(self::oracle<dynamic>() as{TypeError} core::bool)
+        for (final core::MapEntry<core::String, core::num> #t313 in mapStringInt.{core::Map::entries})
+          #t312.{core::Map::[]=}(#t313.{core::MapEntry::key}, #t313.{core::MapEntry::value});
+      else
+        #t312.{core::Map::[]=}("bar", 3.14);
+    #t312.{core::Map::[]=}("baz", null);
+  } =>#t312;
+  core::List<core::int> list90 = block {
+    final core::List<core::int> #t314 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t314.{core::List::add}(dynVar as{TypeError} core::int);
+  } =>#t314;
+  core::Set<core::int> set90 = block {
+    final core::Set<core::int> #t315 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t315.{core::Set::add}(dynVar as{TypeError} core::int);
+    #t315.{core::Set::add}(null);
+  } =>#t315;
+  core::Map<core::String, core::int> map90 = block {
+    final core::Map<core::String, core::int> #t316 = <core::String, core::int>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      #t316.{core::Map::[]=}("bar", dynVar as{TypeError} core::int);
+    #t316.{core::Map::[]=}("baz", null);
+  } =>#t316;
+  core::List<core::int> list91 = block {
+    final core::List<core::int> #t317 = <core::int>[];
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final dynamic #t318 in dynVar as{TypeError} core::Iterable<dynamic>) {
+        final core::int #t319 = #t318 as{TypeError} core::int;
+        #t317.{core::List::add}(#t319);
+      }
+  } =>#t317;
+  core::Set<core::int> set91 = block {
+    final core::Set<core::int> #t320 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final dynamic #t321 in dynVar as{TypeError} core::Iterable<dynamic>) {
+        final core::int #t322 = #t321 as{TypeError} core::int;
+        #t320.{core::Set::add}(#t322);
+      }
+    #t320.{core::Set::add}(null);
+  } =>#t320;
+  core::Map<core::String, core::int> map91 = block {
+    final core::Map<core::String, core::int> #t323 = <core::String, core::int>{};
+    for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+      for (final core::MapEntry<dynamic, dynamic> #t324 in (dynVar as{TypeError} core::Map<dynamic, dynamic>).{core::Map::entries}) {
+        final core::String #t325 = #t324.{core::MapEntry::key} as{TypeError} core::String;
+        final core::int #t326 = #t324.{core::MapEntry::value} as{TypeError} core::int;
+        #t323.{core::Map::[]=}(#t325, #t326);
+      }
+    #t323.{core::Map::[]=}("baz", null);
+  } =>#t323;
+  core::List<core::int> list100 = block {
+    final core::List<core::int> #t327 = <core::int>[];
+    for (final core::int #t328 = index = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; index = index.{core::num::+}(1))
+      #t327.{core::List::add}(42);
+  } =>#t327;
+  core::Set<core::int> set100 = block {
+    final core::Set<core::int> #t329 = col::LinkedHashSet::•<core::int>();
+    for (final core::int #t330 = index = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; index = index.{core::num::+}(1))
+      #t329.{core::Set::add}(42);
+  } =>#t329;
+  core::Map<core::String, core::int> map100 = block {
+    final core::Map<core::String, core::int> #t331 = <core::String, core::int>{};
+    for (final core::int #t332 = index = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; index = index.{core::num::+}(1))
+      #t331.{core::Map::[]=}("bar", 42);
+  } =>#t331;
+  core::List<core::int> list110 = block {
+    final core::List<core::int> #t333 = <core::int>[];
+    for (core::int i in <core::int>[1, 2, 3])
+      #t333.{core::List::add}(i);
+  } =>#t333;
+  core::Set<core::int> set110 = block {
+    final core::Set<core::int> #t334 = col::LinkedHashSet::•<core::int>();
+    for (core::int i in <core::int>[1, 2, 3])
+      #t334.{core::Set::add}(i);
+    #t334.{core::Set::add}(null);
+  } =>#t334;
+  core::Map<core::String, core::int> map110 = block {
+    final core::Map<core::String, core::int> #t335 = <core::String, core::int>{};
+    for (core::int i in <core::int>[1, 2, 3])
+      #t335.{core::Map::[]=}("bar", i);
+    #t335.{core::Map::[]=}("baz", null);
+  } =>#t335;
+  core::List<core::int> list120 = block {
+    final core::List<core::int> #t336 = <core::int>[];
+    for (dynamic i in dynVar as{TypeError} core::Iterable<dynamic>)
+      #t336.{core::List::add}(i as{TypeError} core::int);
+  } =>#t336;
+  core::Set<core::int> set120 = block {
+    final core::Set<core::int> #t337 = col::LinkedHashSet::•<core::int>();
+    for (dynamic i in dynVar as{TypeError} core::Iterable<dynamic>)
+      #t337.{core::Set::add}(i as{TypeError} core::int);
+    #t337.{core::Set::add}(null);
+  } =>#t337;
+  core::Map<core::String, core::int> map120 = block {
+    final core::Map<core::String, core::int> #t338 = <core::String, core::int>{};
+    for (dynamic i in dynVar as{TypeError} core::Iterable<dynamic>)
+      #t338.{core::Map::[]=}("bar", i as{TypeError} core::int);
+    #t338.{core::Map::[]=}("baz", null);
+  } =>#t338;
+  core::List<core::int> list130 = block {
+    final core::List<core::int> #t339 = <core::int>[];
+    for (core::int i = 1; i.{core::num::<}(2); i = i.{core::num::+}(1))
+      #t339.{core::List::add}(i);
+  } =>#t339;
+  core::Set<core::int> set130 = block {
+    final core::Set<core::int> #t340 = col::LinkedHashSet::•<core::int>();
+    for (core::int i = 1; i.{core::num::<}(2); i = i.{core::num::+}(1))
+      #t340.{core::Set::add}(i);
+  } =>#t340;
+  core::Map<core::int, core::int> map130 = block {
+    final core::Map<core::int, core::int> #t341 = <core::int, core::int>{};
+    for (core::int i = 1; i.{core::num::<}(2); i = i.{core::num::+}(1))
+      #t341.{core::Map::[]=}(i, i);
+  } =>#t341;
+}
+static method testForElementErrors(core::Map<core::int, core::int> map, core::List<core::int> list) → dynamic /* originally async */ {
+  final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
+  asy::FutureOr<dynamic> :return_value;
+  dynamic :async_stack_trace;
+  dynamic :async_op_then;
+  dynamic :async_op_error;
+  dynamic :await_jump_var = 0;
+  dynamic :await_ctx_var;
+  dynamic :saved_try_context_var0;
+  dynamic :saved_try_context_var1;
+  dynamic :exception0;
+  dynamic :stack_trace0;
+  function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
+    try {
+      #L1:
+      {
+        block {
+          final core::List<core::int> #t342 = <core::int>[];
+          for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+            #t342.{core::List::add}(let final<BottomType> #t343 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:210:45: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int>[for (int i = 0; oracle(\"foo\"); i++) \"bar\"];
+                                            ^" in "bar" as{TypeError} core::int);
+        } =>#t342;
+        block {
+          final core::Set<core::int> #t344 = col::LinkedHashSet::•<core::int>();
+          for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+            #t344.{core::Set::add}(let final<BottomType> #t345 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:211:45: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int>{for (int i = 0; oracle(\"foo\"); i++) \"bar\", null};
+                                            ^" in "bar" as{TypeError} core::int);
+          #t344.{core::Set::add}(null);
+        } =>#t344;
+        block {
+          final core::Map<core::int, core::int> #t346 = <core::int, core::int>{};
+          for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+            #t346.{core::Map::[]=}(let final<BottomType> #t347 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:212:50: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int, int>{for (int i = 0; oracle(\"foo\"); i++) \"bar\": \"bar\", \"baz\": null};
+                                                 ^" in "bar" as{TypeError} core::int, let final<BottomType> #t348 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:212:57: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int, int>{for (int i = 0; oracle(\"foo\"); i++) \"bar\": \"bar\", \"baz\": null};
+                                                        ^" in "bar" as{TypeError} core::int);
+          #t346.{core::Map::[]=}(let final<BottomType> #t349 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:212:64: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int, int>{for (int i = 0; oracle(\"foo\"); i++) \"bar\": \"bar\", \"baz\": null};
+                                                               ^" in "baz" as{TypeError} core::int, null);
+        } =>#t346;
+        block {
+          final core::List<core::int> #t350 = <core::int>[];
+          for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+            for (final core::int #t351 in <core::int>[let final<BottomType> #t352 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:213:49: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int>[for (int i = 0; oracle(\"foo\"); i++) ...[\"bar\"]];
+                                                ^" in "bar" as{TypeError} core::int])
+              #t350.{core::List::add}(#t351);
+        } =>#t350;
+        block {
+          final core::Set<core::int> #t353 = col::LinkedHashSet::•<core::int>();
+          for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+            for (final core::int #t354 in <core::int>[let final<BottomType> #t355 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:214:49: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int>{for (int i = 0; oracle(\"foo\"); i++) ...[\"bar\"], null};
+                                                ^" in "bar" as{TypeError} core::int])
+              #t353.{core::Set::add}(#t354);
+          #t353.{core::Set::add}(null);
+        } =>#t353;
+        block {
+          final core::Map<core::int, core::int> #t356 = <core::int, core::int>{};
+          for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+            for (final core::MapEntry<core::int, core::int> #t357 in <core::int, core::int>{let final<BottomType> #t358 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:215:54: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int, int>{for (int i = 0; oracle(\"foo\"); i++) ...{\"bar\": \"bar\"}, \"baz\": null};
+                                                     ^" in "bar" as{TypeError} core::int: let final<BottomType> #t359 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:215:61: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int, int>{for (int i = 0; oracle(\"foo\"); i++) ...{\"bar\": \"bar\"}, \"baz\": null};
+                                                            ^" in "bar" as{TypeError} core::int}.{core::Map::entries})
+              #t356.{core::Map::[]=}(#t357.{core::MapEntry::key}, #t357.{core::MapEntry::value});
+          #t356.{core::Map::[]=}(let final<BottomType> #t360 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:215:69: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  <int, int>{for (int i = 0; oracle(\"foo\"); i++) ...{\"bar\": \"bar\"}, \"baz\": null};
+                                                                    ^" in "baz" as{TypeError} core::int, null);
+        } =>#t356;
+        block {
+          final core::List<core::int> #t361 = <core::int>[];
+          for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+            #t361.{core::List::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:216:48: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>[for (int i = 0; oracle(\"foo\"); i++) ...map];
+                                               ^");
+        } =>#t361;
+        block {
+          final core::Set<core::int> #t362 = col::LinkedHashSet::•<core::int>();
+          for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+            #t362.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:217:48: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>{for (int i = 0; oracle(\"foo\"); i++) ...map, null};
+                                               ^");
+          #t362.{core::Set::add}(null);
+        } =>#t362;
+        <core::int, core::int>{invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:218:53: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <int, int>{for (int i = 0; oracle(\"foo\"); i++) ...list, 42: null};
+                                                    ^": null, invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:218:53: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <int, int>{for (int i = 0; oracle(\"foo\"); i++) ...list, 42: null};
+                                                    ^": null};
+        block {
+          final core::List<core::String> #t363 = <core::String>[];
+          for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+            if(self::oracle<dynamic>() as{TypeError} core::bool)
+              #t363.{core::List::add}(let final<BottomType> #t364 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:219:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String>[for (int i = 0; oracle(\"foo\"); i++) if (oracle()) 42 else 3.14];
+                                                             ^" in 42 as{TypeError} core::String);
+            else
+              #t363.{core::List::add}(let final<BottomType> #t365 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:219:70: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String>[for (int i = 0; oracle(\"foo\"); i++) if (oracle()) 42 else 3.14];
+                                                                     ^" in 3.14 as{TypeError} core::String);
+        } =>#t363;
+        block {
+          final core::Set<core::String> #t366 = col::LinkedHashSet::•<core::String>();
+          for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+            if(self::oracle<dynamic>() as{TypeError} core::bool)
+              #t366.{core::Set::add}(let final<BottomType> #t367 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:220:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) 42 else 3.14, null};
+                                                             ^" in 42 as{TypeError} core::String);
+            else
+              #t366.{core::Set::add}(let final<BottomType> #t368 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:220:70: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) 42 else 3.14, null};
+                                                                     ^" in 3.14 as{TypeError} core::String);
+          #t366.{core::Set::add}(null);
+        } =>#t366;
+        block {
+          final core::Map<core::String, core::String> #t369 = <core::String, core::String>{};
+          for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+            if(self::oracle<dynamic>() as{TypeError} core::bool)
+              #t369.{core::Map::[]=}("bar", let final<BottomType> #t370 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:221:77: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String, String>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) \"bar\": 42 else \"bar\": 3.14, \"baz\": null};
+                                                                            ^" in 42 as{TypeError} core::String);
+            else
+              #t369.{core::Map::[]=}("bar", let final<BottomType> #t371 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:221:92: Error: A value of type 'double' can't be assigned to a variable of type 'String'.
+Try changing the type of the left hand side, or casting the right hand side to 'String'.
+  <String, String>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) \"bar\": 42 else \"bar\": 3.14, \"baz\": null};
+                                                                                           ^" in 3.14 as{TypeError} core::String);
+          #t369.{core::Map::[]=}("baz", null);
+        } =>#t369;
+        block {
+          final core::List<core::int> #t372 = <core::int>[];
+          for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+            if(self::oracle<dynamic>() as{TypeError} core::bool)
+              #t372.{core::List::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:222:62: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>[for (int i = 0; oracle(\"foo\"); i++) if (oracle()) ...map else 42];
+                                                             ^");
+            else
+              #t372.{core::List::add}(42);
+        } =>#t372;
+        block {
+          final core::Set<core::int> #t373 = col::LinkedHashSet::•<core::int>();
+          for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+            if(self::oracle<dynamic>() as{TypeError} core::bool)
+              #t373.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:223:62: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) ...map else 42, null};
+                                                             ^");
+            else
+              #t373.{core::Set::add}(42);
+          #t373.{core::Set::add}(null);
+        } =>#t373;
+        <core::String, core::int>{invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:224:70: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) ...list else \"bar\": 42, \"baz\": null};
+                                                                     ^": null, invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:224:70: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) ...list else \"bar\": 42, \"baz\": null};
+                                                                     ^": null};
+        block {
+          final core::List<core::int> #t374 = <core::int>[];
+          for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+            if(self::oracle<dynamic>() as{TypeError} core::bool)
+              #t374.{core::List::add}(42);
+            else
+              #t374.{core::List::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:225:70: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>[for (int i = 0; oracle(\"foo\"); i++) if (oracle()) 42 else ...map];
+                                                                     ^");
+        } =>#t374;
+        block {
+          final core::Set<core::int> #t375 = col::LinkedHashSet::•<core::int>();
+          for (core::int i = 0; self::oracle<core::String>("foo") as{TypeError} core::bool; i = i.{core::num::+}(1))
+            if(self::oracle<dynamic>() as{TypeError} core::bool)
+              #t375.{core::Set::add}(42);
+            else
+              #t375.{core::Set::add}(invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:226:70: Error: Unexpected type 'Map<int, int>' of a spread.  Expected 'dynamic' or an Iterable.
+ - 'Map' is from 'dart:core'.
+  <int>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) 42 else ...map, null};
+                                                                     ^");
+          #t375.{core::Set::add}(null);
+        } =>#t375;
+        <core::String, core::int>{invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:227:85: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) \"bar\": 42 else ...list, \"baz\": null};
+                                                                                    ^": null, invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:227:85: Error: Unexpected type 'List<int>' of a map spread entry.  Expected 'dynamic' or a Map.
+ - 'List' is from 'dart:core'.
+  <String, int>{for (int i = 0; oracle(\"foo\"); i++) if (oracle()) \"bar\": 42 else ...list, \"baz\": null};
+                                                                                    ^": null};
+        final core::int i = 0;
+        block {
+          final core::List<core::int> #t376 = <core::int>[];
+          for (final core::int #t377 in <core::int>[1]) {
+            invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:230:14: Error: Setter not found: 'i'.
+  <int>[for (i in <int>[1]) i];
+             ^";
+            #t376.{core::List::add}(i);
+          }
+        } =>#t376;
+        block {
+          final core::Set<core::int> #t378 = col::LinkedHashSet::•<core::int>();
+          for (final core::int #t379 in <core::int>[1]) {
+            invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:231:14: Error: Setter not found: 'i'.
+  <int>{for (i in <int>[1]) i, null};
+             ^";
+            #t378.{core::Set::add}(i);
+          }
+          #t378.{core::Set::add}(null);
+        } =>#t378;
+        block {
+          final core::Map<core::String, core::int> #t380 = <core::String, core::int>{};
+          for (final core::int #t381 in <core::int>[1]) {
+            invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:232:21: Error: Setter not found: 'i'.
+\t<String, int>{for (i in <int>[1]) \"bar\": i, \"baz\": null};
+\t                   ^";
+            #t380.{core::Map::[]=}("bar", i);
+          }
+          #t380.{core::Map::[]=}("baz", null);
+        } =>#t380;
+        core::List<dynamic> list10 = block {
+          final core::List<dynamic> #t382 = <dynamic>[];
+          for (dynamic i in let final<BottomType> #t383 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:234:31: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+ - 'Iterable' is from 'dart:core'.
+  var list10 = [for (var i in \"not iterable\") i];
+                              ^" in "not iterable" as{TypeError} core::Iterable<dynamic>)
+            #t382.{core::List::add}(i);
+        } =>#t382;
+        core::Set<dynamic> set10 = block {
+          final core::Set<dynamic> #t384 = col::LinkedHashSet::•<dynamic>();
+          for (dynamic i in let final<BottomType> #t385 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:235:30: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+ - 'Iterable' is from 'dart:core'.
+  var set10 = {for (var i in \"not iterable\") i, null};
+                             ^" in "not iterable" as{TypeError} core::Iterable<dynamic>)
+            #t384.{core::Set::add}(i);
+          #t384.{core::Set::add}(null);
+        } =>#t384;
+        core::Map<core::String, dynamic> map10 = block {
+          final core::Map<core::String, dynamic> #t386 = <core::String, dynamic>{};
+          for (dynamic i in let final<BottomType> #t387 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:236:30: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+ - 'Iterable' is from 'dart:core'.
+  var map10 = {for (var i in \"not iterable\") \"bar\": i, \"baz\": null};
+                             ^" in "not iterable" as{TypeError} core::Iterable<dynamic>)
+            #t386.{core::Map::[]=}("bar", i);
+          #t386.{core::Map::[]=}("baz", null);
+        } =>#t386;
+        core::List<core::int> list20 = block {
+          final core::List<core::int> #t388 = <core::int>[];
+          for (core::int i in <core::int>[let final<BottomType> #t389 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:237:32: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var list20 = [for (int i in [\"not\", \"int\"]) i];
+                               ^" in "not" as{TypeError} core::int, let final<BottomType> #t390 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:237:39: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var list20 = [for (int i in [\"not\", \"int\"]) i];
+                                      ^" in "int" as{TypeError} core::int])
+            #t388.{core::List::add}(i);
+        } =>#t388;
+        core::Set<core::int> set20 = block {
+          final core::Set<core::int> #t391 = col::LinkedHashSet::•<core::int>();
+          for (core::int i in <core::int>[let final<BottomType> #t392 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:238:31: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var set20 = {for (int i in [\"not\", \"int\"]) i, null};
+                              ^" in "not" as{TypeError} core::int, let final<BottomType> #t393 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:238:38: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var set20 = {for (int i in [\"not\", \"int\"]) i, null};
+                                     ^" in "int" as{TypeError} core::int])
+            #t391.{core::Set::add}(i);
+          #t391.{core::Set::add}(null);
+        } =>#t391;
+        core::Map<core::String, core::int> map20 = block {
+          final core::Map<core::String, core::int> #t394 = <core::String, core::int>{};
+          for (core::int i in <core::int>[let final<BottomType> #t395 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:239:31: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var map20 = {for (int i in [\"not\", \"int\"]) \"bar\": i, \"baz\": null};
+                              ^" in "not" as{TypeError} core::int, let final<BottomType> #t396 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:239:38: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var map20 = {for (int i in [\"not\", \"int\"]) \"bar\": i, \"baz\": null};
+                                     ^" in "int" as{TypeError} core::int])
+            #t394.{core::Map::[]=}("bar", i);
+          #t394.{core::Map::[]=}("baz", null);
+        } =>#t394;
+        final core::List<dynamic> #t397 = <dynamic>[];
+        {
+          dynamic :stream = let final<BottomType> #t398 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:240:37: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+ - 'Stream' is from 'dart:async'.
+  var list30 = [await for (var i in \"not stream\") i];
+                                    ^" in "not stream" as{TypeError} asy::Stream<dynamic>;
+          asy::_asyncStarListenHelper(:stream, :async_op);
+          asy::_StreamIterator<dynamic> :for-iterator = new asy::_StreamIterator::•<dynamic>(:stream);
+          const core::bool :product-mode = const core::bool::fromEnvironment("dart.vm.product");
+          try
+            #L2:
+            while (true) {
+              dynamic #t399 = :product-mode ?{dynamic} null : asy::_asyncStarMoveNextHelper(:stream);
+              [yield] let dynamic #t400 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::moveNext}(), :async_op_then, :async_op_error, :async_op) in null;
+              if(:result) {
+                dynamic i = :for-iterator.{asy::_StreamIterator::current};
+                #t397.{core::List::add}(i);
+              }
+              else
+                break #L2;
+            }
+          finally
+            if(!:for-iterator.{asy::_StreamIterator::_subscription}.{core::Object::==}(null)) {
+              [yield] let dynamic #t401 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::cancel}(), :async_op_then, :async_op_error, :async_op) in null;
+              :result;
+            }
+        }
+        core::List<dynamic> list30 = block {} =>#t397;
+        final core::Set<dynamic> #t402 = col::LinkedHashSet::•<dynamic>();
+        {
+          dynamic :stream = let final<BottomType> #t403 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:241:36: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+ - 'Stream' is from 'dart:async'.
+  var set30 = {await for (var i in \"not stream\") i, null};
+                                   ^" in "not stream" as{TypeError} asy::Stream<dynamic>;
+          asy::_asyncStarListenHelper(:stream, :async_op);
+          asy::_StreamIterator<dynamic> :for-iterator = new asy::_StreamIterator::•<dynamic>(:stream);
+          const core::bool :product-mode = const core::bool::fromEnvironment("dart.vm.product");
+          try
+            #L3:
+            while (true) {
+              dynamic #t404 = :product-mode ?{dynamic} null : asy::_asyncStarMoveNextHelper(:stream);
+              [yield] let dynamic #t405 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::moveNext}(), :async_op_then, :async_op_error, :async_op) in null;
+              if(:result) {
+                dynamic i = :for-iterator.{asy::_StreamIterator::current};
+                #t402.{core::Set::add}(i);
+              }
+              else
+                break #L3;
+            }
+          finally
+            if(!:for-iterator.{asy::_StreamIterator::_subscription}.{core::Object::==}(null)) {
+              [yield] let dynamic #t406 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::cancel}(), :async_op_then, :async_op_error, :async_op) in null;
+              :result;
+            }
+        }
+        core::Set<dynamic> set30 = block {
+          #t402.{core::Set::add}(null);
+        } =>#t402;
+        final core::Map<core::String, dynamic> #t407 = <core::String, dynamic>{};
+        {
+          dynamic :stream = let final<BottomType> #t408 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:242:36: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+ - 'Stream' is from 'dart:async'.
+  var map30 = {await for (var i in \"not stream\") \"bar\": i, \"baz\": null};
+                                   ^" in "not stream" as{TypeError} asy::Stream<dynamic>;
+          asy::_asyncStarListenHelper(:stream, :async_op);
+          asy::_StreamIterator<dynamic> :for-iterator = new asy::_StreamIterator::•<dynamic>(:stream);
+          const core::bool :product-mode = const core::bool::fromEnvironment("dart.vm.product");
+          try
+            #L4:
+            while (true) {
+              dynamic #t409 = :product-mode ?{dynamic} null : asy::_asyncStarMoveNextHelper(:stream);
+              [yield] let dynamic #t410 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::moveNext}(), :async_op_then, :async_op_error, :async_op) in null;
+              if(:result) {
+                dynamic i = :for-iterator.{asy::_StreamIterator::current};
+                #t407.{core::Map::[]=}("bar", i);
+              }
+              else
+                break #L4;
+            }
+          finally
+            if(!:for-iterator.{asy::_StreamIterator::_subscription}.{core::Object::==}(null)) {
+              [yield] let dynamic #t411 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::cancel}(), :async_op_then, :async_op_error, :async_op) in null;
+              :result;
+            }
+        }
+        core::Map<core::String, dynamic> map30 = block {
+          #t407.{core::Map::[]=}("baz", null);
+        } =>#t407;
+        final core::List<core::int> #t412 = <core::int>[];
+        {
+          dynamic :stream = asy::Stream::fromIterable<core::int>(<core::int>[let final<BottomType> #t413 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:243:58: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var list40 = [await for (int i in Stream.fromIterable([\"not\", \"int\"])) i];
+                                                         ^" in "not" as{TypeError} core::int, let final<BottomType> #t414 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:243:65: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var list40 = [await for (int i in Stream.fromIterable([\"not\", \"int\"])) i];
+                                                                ^" in "int" as{TypeError} core::int]);
+          asy::_asyncStarListenHelper(:stream, :async_op);
+          asy::_StreamIterator<core::int> :for-iterator = new asy::_StreamIterator::•<core::int>(:stream);
+          const core::bool :product-mode = const core::bool::fromEnvironment("dart.vm.product");
+          try
+            #L5:
+            while (true) {
+              dynamic #t415 = :product-mode ?{dynamic} null : asy::_asyncStarMoveNextHelper(:stream);
+              [yield] let dynamic #t416 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::moveNext}(), :async_op_then, :async_op_error, :async_op) in null;
+              if(:result) {
+                core::int i = :for-iterator.{asy::_StreamIterator::current};
+                #t412.{core::List::add}(i);
+              }
+              else
+                break #L5;
+            }
+          finally
+            if(!:for-iterator.{asy::_StreamIterator::_subscription}.{core::Object::==}(null)) {
+              [yield] let dynamic #t417 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::cancel}(), :async_op_then, :async_op_error, :async_op) in null;
+              :result;
+            }
+        }
+        core::List<core::int> list40 = block {} =>#t412;
+        final core::Set<core::int> #t418 = col::LinkedHashSet::•<core::int>();
+        {
+          dynamic :stream = asy::Stream::fromIterable<core::int>(<core::int>[let final<BottomType> #t419 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:244:57: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var set40 = {await for (int i in Stream.fromIterable([\"not\", \"int\"])) i, null};
+                                                        ^" in "not" as{TypeError} core::int, let final<BottomType> #t420 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:244:64: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var set40 = {await for (int i in Stream.fromIterable([\"not\", \"int\"])) i, null};
+                                                               ^" in "int" as{TypeError} core::int]);
+          asy::_asyncStarListenHelper(:stream, :async_op);
+          asy::_StreamIterator<core::int> :for-iterator = new asy::_StreamIterator::•<core::int>(:stream);
+          const core::bool :product-mode = const core::bool::fromEnvironment("dart.vm.product");
+          try
+            #L6:
+            while (true) {
+              dynamic #t421 = :product-mode ?{dynamic} null : asy::_asyncStarMoveNextHelper(:stream);
+              [yield] let dynamic #t422 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::moveNext}(), :async_op_then, :async_op_error, :async_op) in null;
+              if(:result) {
+                core::int i = :for-iterator.{asy::_StreamIterator::current};
+                #t418.{core::Set::add}(i);
+              }
+              else
+                break #L6;
+            }
+          finally
+            if(!:for-iterator.{asy::_StreamIterator::_subscription}.{core::Object::==}(null)) {
+              [yield] let dynamic #t423 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::cancel}(), :async_op_then, :async_op_error, :async_op) in null;
+              :result;
+            }
+        }
+        core::Set<core::int> set40 = block {
+          #t418.{core::Set::add}(null);
+        } =>#t418;
+        final core::Map<core::String, core::int> #t424 = <core::String, core::int>{};
+        {
+          dynamic :stream = asy::Stream::fromIterable<core::int>(<core::int>[let final<BottomType> #t425 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:245:57: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var map40 = {await for (int i in Stream.fromIterable([\"not\", \"int\"])) \"bar\": i, \"baz\": null};
+                                                        ^" in "not" as{TypeError} core::int, let final<BottomType> #t426 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:245:64: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  var map40 = {await for (int i in Stream.fromIterable([\"not\", \"int\"])) \"bar\": i, \"baz\": null};
+                                                               ^" in "int" as{TypeError} core::int]);
+          asy::_asyncStarListenHelper(:stream, :async_op);
+          asy::_StreamIterator<core::int> :for-iterator = new asy::_StreamIterator::•<core::int>(:stream);
+          const core::bool :product-mode = const core::bool::fromEnvironment("dart.vm.product");
+          try
+            #L7:
+            while (true) {
+              dynamic #t427 = :product-mode ?{dynamic} null : asy::_asyncStarMoveNextHelper(:stream);
+              [yield] let dynamic #t428 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::moveNext}(), :async_op_then, :async_op_error, :async_op) in null;
+              if(:result) {
+                core::int i = :for-iterator.{asy::_StreamIterator::current};
+                #t424.{core::Map::[]=}("bar", i);
+              }
+              else
+                break #L7;
+            }
+          finally
+            if(!:for-iterator.{asy::_StreamIterator::_subscription}.{core::Object::==}(null)) {
+              [yield] let dynamic #t429 = asy::_awaitHelper(:for-iterator.{asy::_StreamIterator::cancel}(), :async_op_then, :async_op_error, :async_op) in null;
+              :result;
+            }
+        }
+        core::Map<core::String, core::int> map40 = block {
+          #t424.{core::Map::[]=}("baz", null);
+        } =>#t424;
+        core::List<core::int> list50 = block {
+          final core::List<core::int> #t430 = <core::int>[];
+          for (; ; )
+            #t430.{core::List::add}(42);
+        } =>#t430;
+        core::Set<core::int> set50 = block {
+          final core::Set<core::int> #t431 = col::LinkedHashSet::•<core::int>();
+          for (; ; )
+            #t431.{core::Set::add}(42);
+          #t431.{core::Set::add}(null);
+        } =>#t431;
+        core::Map<core::String, core::int> map50 = block {
+          final core::Map<core::String, core::int> #t432 = <core::String, core::int>{};
+          for (; ; )
+            #t432.{core::Map::[]=}("bar", 42);
+          #t432.{core::Map::[]=}("baz", null);
+        } =>#t432;
+        core::List<core::int> list60 = block {
+          final core::List<core::int> #t433 = <core::int>[];
+          for (; let final<BottomType> #t434 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:249:24: Error: A value of type 'String' can't be assigned to a variable of type 'bool'.
+Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+  var list60 = [for (; \"not bool\";) 42];
+                       ^" in "not bool" as{TypeError} core::bool; )
+            #t433.{core::List::add}(42);
+        } =>#t433;
+        core::Set<core::int> set60 = block {
+          final core::Set<core::int> #t435 = col::LinkedHashSet::•<core::int>();
+          for (; let final<BottomType> #t436 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:250:23: Error: A value of type 'String' can't be assigned to a variable of type 'bool'.
+Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+  var set60 = {for (; \"not bool\";) 42, null};
+                      ^" in "not bool" as{TypeError} core::bool; )
+            #t435.{core::Set::add}(42);
+          #t435.{core::Set::add}(null);
+        } =>#t435;
+        core::Map<core::String, core::int> map60 = block {
+          final core::Map<core::String, core::int> #t437 = <core::String, core::int>{};
+          for (; let final<BottomType> #t438 = invalid-expression "pkg/front_end/testcases/control_flow_collection_inference.dart:251:23: Error: A value of type 'String' can't be assigned to a variable of type 'bool'.
+Try changing the type of the left hand side, or casting the right hand side to 'bool'.
+  var map60 = {for (; \"not bool\";) \"bar\": 42, \"baz\": null};
+                      ^" in "not bool" as{TypeError} core::bool; )
+            #t437.{core::Map::[]=}("bar", 42);
+          #t437.{core::Map::[]=}("baz", null);
+        } =>#t437;
+      }
+      asy::_completeOnAsyncReturn(:async_completer, :return_value);
+      return;
+    }
+    on dynamic catch(dynamic :exception, dynamic :stack_trace) {
+      :async_completer.{asy::Completer::completeError}(:exception, :stack_trace);
+    }
+  :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
+  :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
+  :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
+  :async_completer.start(:async_op);
+  return :async_completer.{asy::Completer::future};
+}
+static method testForElementErrorsNotAsync(asy::Stream<core::int> stream) → dynamic {
+  block {
+    final core::List<core::int> #t439 = <core::int>[];
+    await for (core::int i in stream)
+      #t439.{core::List::add}(i);
+  } =>#t439;
+  block {
+    final core::Set<core::int> #t440 = col::LinkedHashSet::•<core::int>();
+    await for (core::int i in stream)
+      #t440.{core::Set::add}(i);
+  } =>#t440;
+  block {
+    final core::Map<core::String, core::int> #t441 = <core::String, core::int>{};
+    await for (core::int i in stream)
+      #t441.{core::Map::[]=}("bar", i);
+  } =>#t441;
+}
+static method testPromotion(self::A a) → dynamic {
+  core::List<core::int> list10 = block {
+    final core::List<core::int> #t442 = <core::int>[];
+    if(a is self::B)
+      #t442.{core::List::add}(a{self::B}.{self::B::foo});
+  } =>#t442;
+  core::Set<core::int> set10 = block {
+    final core::Set<core::int> #t443 = col::LinkedHashSet::•<core::int>();
+    if(a is self::B)
+      #t443.{core::Set::add}(a{self::B}.{self::B::foo});
+  } =>#t443;
+  core::Map<core::int, core::int> map10 = block {
+    final core::Map<core::int, core::int> #t444 = <core::int, core::int>{};
+    if(a is self::B)
+      #t444.{core::Map::[]=}(a{self::B}.{self::B::foo}, a{self::B}.{self::B::foo});
+  } =>#t444;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/control_flow_collection_inference.dart.type_promotion.expect b/pkg/front_end/testcases/control_flow_collection_inference.dart.type_promotion.expect
new file mode 100644
index 0000000..648acdc
--- /dev/null
+++ b/pkg/front_end/testcases/control_flow_collection_inference.dart.type_promotion.expect
@@ -0,0 +1,306 @@
+pkg/front_end/testcases/control_flow_collection_inference.dart:123:49: Context: Write to i@7018
+  var list10 = [for (int i = 0; oracle("foo"); i++) 42];
+                                                ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:124:48: Context: Write to i@7018
+  var set10 = {for (int i = 0; oracle("foo"); i++) 42, null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:125:48: Context: Write to i@7018
+  var map10 = {for (int i = 0; oracle("foo"); i++) "bar": 42, "baz": null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:126:49: Context: Write to i@7018
+  var list11 = [for (int i = 0; oracle("foo"); i++) dynVar];
+                                                ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:127:48: Context: Write to i@7018
+  var set11 = {for (int i = 0; oracle("foo"); i++) dynVar, null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:128:48: Context: Write to i@7018
+  var map11 = {for (int i = 0; oracle("foo"); i++) "bar": dynVar, "baz": null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:129:49: Context: Write to i@7018
+  var list12 = [for (int i = 0; oracle("foo"); i++) [42]];
+                                                ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:130:48: Context: Write to i@7018
+  var set12 = {for (int i = 0; oracle("foo"); i++) [42], null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:131:48: Context: Write to i@7018
+  var map12 = {for (int i = 0; oracle("foo"); i++) "bar": [42], "baz": null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:132:49: Context: Write to i@7018
+  var list20 = [for (int i = 0; oracle("foo"); i++) ...[42]];
+                                                ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:133:48: Context: Write to i@7018
+  var set20 = {for (int i = 0; oracle("foo"); i++) ...[42], null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:134:48: Context: Write to i@7018
+  var map20 = {for (int i = 0; oracle("foo"); i++) ...{"bar": 42}, "baz": null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:135:49: Context: Write to i@7018
+  var list21 = [for (int i = 0; oracle("foo"); i++) ...[dynVar]];
+                                                ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:136:48: Context: Write to i@7018
+  var set21 = {for (int i = 0; oracle("foo"); i++) ...[dynVar], null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:137:48: Context: Write to i@7018
+  var map21 = {for (int i = 0; oracle("foo"); i++) ...{"bar": dynVar}, "baz": null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:138:49: Context: Write to i@7018
+  var list22 = [for (int i = 0; oracle("foo"); i++) ...[[42]]];
+                                                ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:139:48: Context: Write to i@7018
+  var set22 = {for (int i = 0; oracle("foo"); i++) ...[[42]], null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:140:48: Context: Write to i@7018
+  var map22 = {for (int i = 0; oracle("foo"); i++) ...{"bar": [42]}, "baz": null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:141:49: Context: Write to i@7018
+  var list30 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[42]];
+                                                ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:142:48: Context: Write to i@7018
+  var set30 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[42], null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:143:48: Context: Write to i@7018
+  var map30 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": 42}, "baz": null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:144:49: Context: Write to i@7018
+  var list31 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[dynVar]];
+                                                ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:145:48: Context: Write to i@7018
+  var set31 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[dynVar], null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:146:48: Context: Write to i@7018
+  var map31 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": dynVar}, "baz": null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:147:49: Context: Write to i@7018
+  var list33 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[42]]];
+                                                ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:148:48: Context: Write to i@7018
+  var set33 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[42]], null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:149:48: Context: Write to i@7018
+  var map33 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": [42]}, "baz": null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:150:61: Context: Write to i@7018
+  List<List<int>> list40 = [for (int i = 0; oracle("foo"); i++) ...[[]]];
+                                                            ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:151:59: Context: Write to i@7018
+  Set<List<int>> set40 = {for (int i = 0; oracle("foo"); i++) ...[[]], null};
+                                                          ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:152:67: Context: Write to i@7018
+  Map<String, List<int>> map40 = {for (int i = 0; oracle("foo"); i++) ...{"bar": []}, "baz": null};
+                                                                  ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:153:61: Context: Write to i@7018
+  List<List<int>> list41 = [for (int i = 0; oracle("foo"); i++) ...{[]}];
+                                                            ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:154:59: Context: Write to i@7018
+  Set<List<int>> set41 = {for (int i = 0; oracle("foo"); i++) ...{[]}, null};
+                                                          ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:155:61: Context: Write to i@7018
+  List<List<int>> list42 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]]];
+                                                            ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:156:59: Context: Write to i@7018
+  Set<List<int>> set42 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]], null};
+                                                          ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:157:67: Context: Write to i@7018
+  Map<String, List<int>> map42 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": []}, "baz": null};
+                                                                  ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:158:55: Context: Write to i@7018
+  List<int> list50 = [for (int i = 0; oracle("foo"); i++) ...[]];
+                                                      ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:159:53: Context: Write to i@7018
+  Set<int> set50 = {for (int i = 0; oracle("foo"); i++) ...[], null};
+                                                    ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:160:61: Context: Write to i@7018
+  Map<String, int> map50 = {for (int i = 0; oracle("foo"); i++) ...{}, "baz": null};
+                                                            ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:161:55: Context: Write to i@7018
+  List<int> list51 = [for (int i = 0; oracle("foo"); i++) ...{}];
+                                                      ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:162:53: Context: Write to i@7018
+  Set<int> set51 = {for (int i = 0; oracle("foo"); i++) ...{}, null};
+                                                    ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:163:55: Context: Write to i@7018
+  List<int> list52 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[]];
+                                                      ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:164:53: Context: Write to i@7018
+  Set<int> set52 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[], null};
+                                                    ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:165:61: Context: Write to i@7018
+  List<List<int>> list60 = [for (int i = 0; oracle("foo"); i++) ...[[]]];
+                                                            ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:166:59: Context: Write to i@7018
+  Set<List<int>> set60 = {for (int i = 0; oracle("foo"); i++) ...[[]], null};
+                                                          ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:167:67: Context: Write to i@7018
+  Map<String, List<int>> map60 = {for (int i = 0; oracle("foo"); i++) ...{"bar": []}, "baz": null};
+                                                                  ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:168:61: Context: Write to i@7018
+  List<List<int>> list61 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]]];
+                                                            ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:169:59: Context: Write to i@7018
+  Set<List<int>> set61 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...[[]], null};
+                                                          ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:170:67: Context: Write to i@7018
+  Map<String, List<int>> map61 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...{"bar": []}, "baz": null};
+                                                                  ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:171:61: Context: Write to i@7018
+  List<List<int>> list70 = [for (int i = 0; oracle("foo"); i++) []];
+                                                            ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:172:59: Context: Write to i@7018
+  Set<List<int>> set70 = {for (int i = 0; oracle("foo"); i++) [], null};
+                                                          ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:173:67: Context: Write to i@7018
+  Map<String, List<int>> map70 = {for (int i = 0; oracle("foo"); i++) "bar": [], "baz": null};
+                                                                  ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:174:61: Context: Write to i@7018
+  List<List<int>> list71 = [for (int i = 0; oracle("foo"); i++) if (oracle()) []];
+                                                            ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:175:59: Context: Write to i@7018
+  Set<List<int>> set71 = {for (int i = 0; oracle("foo"); i++) if (oracle()) [], null};
+                                                          ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:176:67: Context: Write to i@7018
+  Map<String, List<int>> map71 = {for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": [], "baz": null};
+                                                                  ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:177:49: Context: Write to i@7018
+  var list80 = [for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14];
+                                                ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:178:48: Context: Write to i@7018
+  var set80 = {for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14, null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:179:48: Context: Write to i@7018
+  var map80 = {for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else "bar": 3.14, "baz": null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:180:49: Context: Write to i@7018
+  var list81 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble];
+                                                ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:181:48: Context: Write to i@7018
+  var set81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...listDouble, null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:182:48: Context: Write to i@7018
+  var map81 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...mapStringDouble, "baz": null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:183:49: Context: Write to i@7018
+  var list82 = [for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar];
+                                                ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:184:48: Context: Write to i@7018
+  var set82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else ...dynVar, null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:185:48: Context: Write to i@7018
+  var map82 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else ...dynVar, "baz": null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:186:49: Context: Write to i@7018
+  var list83 = [for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...listDouble];
+                                                ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:187:48: Context: Write to i@7018
+  var set83 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...listInt else 3.14, null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:188:48: Context: Write to i@7018
+  var map83 = {for (int i = 0; oracle("foo"); i++) if (oracle()) ...mapStringInt else "bar": 3.14, "baz": null};
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:189:55: Context: Write to i@7018
+  List<int> list90 = [for (int i = 0; oracle("foo"); i++) dynVar];
+                                                      ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:190:53: Context: Write to i@7018
+  Set<int> set90 = {for (int i = 0; oracle("foo"); i++) dynVar, null};
+                                                    ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:191:61: Context: Write to i@7018
+  Map<String, int> map90 = {for (int i = 0; oracle("foo"); i++) "bar": dynVar, "baz": null};
+                                                            ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:192:55: Context: Write to i@7018
+  List<int> list91 = [for (int i = 0; oracle("foo"); i++) ...dynVar];
+                                                      ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:193:53: Context: Write to i@7018
+  Set<int> set91 = {for (int i = 0; oracle("foo"); i++) ...dynVar, null};
+                                                    ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:194:61: Context: Write to i@7018
+  Map<String, int> map91 = {for (int i = 0; oracle("foo"); i++) ...dynVar, "baz": null};
+                                                            ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:195:40: Context: Write to index@6916
+  List<int> list100 = <int>[for (index = 0; oracle("foo"); index++) 42];
+                                       ^
+pkg/front_end/testcases/control_flow_collection_inference.dart:195:65: Context: Write to index@6916
+  List<int> list100 = <int>[for (index = 0; oracle("foo"); index++) 42];
+                                                                ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:196:38: Context: Write to index@6916
+  Set<int> set100 = <int>{for (index = 0; oracle("foo"); index++) 42};
+                                     ^
+pkg/front_end/testcases/control_flow_collection_inference.dart:196:63: Context: Write to index@6916
+  Set<int> set100 = <int>{for (index = 0; oracle("foo"); index++) 42};
+                                                              ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:197:54: Context: Write to index@6916
+  Map<String, int> map100 = <String, int>{for (index = 0; oracle("foo"); index++) "bar": 42};
+                                                     ^
+pkg/front_end/testcases/control_flow_collection_inference.dart:197:79: Context: Write to index@6916
+  Map<String, int> map100 = <String, int>{for (index = 0; oracle("foo"); index++) "bar": 42};
+                                                                              ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:204:48: Context: Write to i@7018
+  List<int> list130 = [for (var i = 1; i < 2; i++) i];
+                                               ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:205:46: Context: Write to i@7018
+  Set<int> set130 = {for (var i = 1; i < 2; i++) i};
+                                             ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:206:51: Context: Write to i@7018
+  Map<int, int> map130 = {for (var i = 1; i < 2; i++) i: i};
+                                                  ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:210:41: Context: Write to i@13789
+  <int>[for (int i = 0; oracle("foo"); i++) "bar"];
+                                        ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:211:41: Context: Write to i@13789
+  <int>{for (int i = 0; oracle("foo"); i++) "bar", null};
+                                        ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:212:46: Context: Write to i@13789
+  <int, int>{for (int i = 0; oracle("foo"); i++) "bar": "bar", "baz": null};
+                                             ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:213:41: Context: Write to i@13789
+  <int>[for (int i = 0; oracle("foo"); i++) ...["bar"]];
+                                        ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:214:41: Context: Write to i@13789
+  <int>{for (int i = 0; oracle("foo"); i++) ...["bar"], null};
+                                        ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:215:46: Context: Write to i@13789
+  <int, int>{for (int i = 0; oracle("foo"); i++) ...{"bar": "bar"}, "baz": null};
+                                             ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:216:41: Context: Write to i@13789
+  <int>[for (int i = 0; oracle("foo"); i++) ...map];
+                                        ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:217:41: Context: Write to i@13789
+  <int>{for (int i = 0; oracle("foo"); i++) ...map, null};
+                                        ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:218:46: Context: Write to i@13789
+  <int, int>{for (int i = 0; oracle("foo"); i++) ...list, 42: null};
+                                             ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:219:44: Context: Write to i@13789
+  <String>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14];
+                                           ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:220:44: Context: Write to i@13789
+  <String>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else 3.14, null};
+                                           ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:221:52: Context: Write to i@13789
+  <String, String>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else "bar": 3.14, "baz": null};
+                                                   ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:222:41: Context: Write to i@13789
+  <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42];
+                                        ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:223:41: Context: Write to i@13789
+  <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...map else 42, null};
+                                        ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:224:49: Context: Write to i@13789
+  <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) ...list else "bar": 42, "baz": null};
+                                                ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:225:41: Context: Write to i@13789
+  <int>[for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map];
+                                        ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:226:41: Context: Write to i@13789
+  <int>{for (int i = 0; oracle("foo"); i++) if (oracle()) 42 else ...map, null};
+                                        ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:227:49: Context: Write to i@13789
+  <String, int>{for (int i = 0; oracle("foo"); i++) if (oracle()) "bar": 42 else ...list, "baz": null};
+                                                ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:267:29: Context: Possible promotion of a@16609
+  List<int> list10 = [if (a is B) a.foo];
+                            ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:268:27: Context: Possible promotion of a@16609
+  Set<int> set10 = {if (a is B) a.foo};
+                          ^^
+pkg/front_end/testcases/control_flow_collection_inference.dart:269:32: Context: Possible promotion of a@16609
+  Map<int, int> map10 = {if (a is B) a.foo: a.foo};
+                               ^^
diff --git a/pkg/front_end/testcases/covariant_generic.dart.outline.expect b/pkg/front_end/testcases/covariant_generic.dart.outline.expect
index 0014cd5..4b44219 100644
--- a/pkg/front_end/testcases/covariant_generic.dart.outline.expect
+++ b/pkg/front_end/testcases/covariant_generic.dart.outline.expect
@@ -6,13 +6,13 @@
 class Foo<T extends core::Object = dynamic> extends core::Object {
   final field self::Foo::T finalField;
   final field (self::Foo::T) → void callbackField;
-  field self::Foo::T mutableField;
+  generic-covariant-impl field self::Foo::T mutableField;
   field (self::Foo::T) → void mutableCallbackField;
   constructor •(self::Foo::T finalField, (self::Foo::T) → void callbackField) → self::Foo<self::Foo::T>
     ;
-  method method(self::Foo::T x) → void
+  method method(generic-covariant-impl self::Foo::T x) → void
     ;
-  set setter(self::Foo::T x) → dynamic
+  set setter(generic-covariant-impl self::Foo::T x) → dynamic
     ;
   method withCallback((self::Foo::T) → void callback) → void
     ;
diff --git a/pkg/front_end/testcases/deferred_type_annotation.dart.legacy.expect b/pkg/front_end/testcases/deferred_type_annotation.dart.legacy.expect
index 423412d..982cf85 100644
--- a/pkg/front_end/testcases/deferred_type_annotation.dart.legacy.expect
+++ b/pkg/front_end/testcases/deferred_type_annotation.dart.legacy.expect
@@ -9,7 +9,7 @@
 //     ^^^
 //
 import self as self;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as d;
 
diff --git a/pkg/front_end/testcases/deferred_type_annotation.dart.legacy.transformed.expect b/pkg/front_end/testcases/deferred_type_annotation.dart.legacy.transformed.expect
index 423412d..982cf85 100644
--- a/pkg/front_end/testcases/deferred_type_annotation.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/deferred_type_annotation.dart.legacy.transformed.expect
@@ -9,7 +9,7 @@
 //     ^^^
 //
 import self as self;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as d;
 
diff --git a/pkg/front_end/testcases/deferred_type_annotation.dart.outline.expect b/pkg/front_end/testcases/deferred_type_annotation.dart.outline.expect
index 7693576..592059d 100644
--- a/pkg/front_end/testcases/deferred_type_annotation.dart.outline.expect
+++ b/pkg/front_end/testcases/deferred_type_annotation.dart.outline.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as d;
 
diff --git a/pkg/front_end/testcases/deferred_type_annotation.dart.strong.expect b/pkg/front_end/testcases/deferred_type_annotation.dart.strong.expect
index 6be11a9..29b1b92 100644
--- a/pkg/front_end/testcases/deferred_type_annotation.dart.strong.expect
+++ b/pkg/front_end/testcases/deferred_type_annotation.dart.strong.expect
@@ -9,7 +9,7 @@
 //     ^^^
 //
 import self as self;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as d;
 
diff --git a/pkg/front_end/testcases/deferred_type_annotation.dart.strong.transformed.expect b/pkg/front_end/testcases/deferred_type_annotation.dart.strong.transformed.expect
index 6be11a9..29b1b92 100644
--- a/pkg/front_end/testcases/deferred_type_annotation.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/deferred_type_annotation.dart.strong.transformed.expect
@@ -9,7 +9,7 @@
 //     ^^^
 //
 import self as self;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as d;
 
diff --git a/pkg/front_end/testcases/duplicated_declarations.dart.legacy.expect b/pkg/front_end/testcases/duplicated_declarations.dart.legacy.expect
index f1e837f..86ec30f 100644
--- a/pkg/front_end/testcases/duplicated_declarations.dart.legacy.expect
+++ b/pkg/front_end/testcases/duplicated_declarations.dart.legacy.expect
@@ -2,12 +2,12 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/duplicated_declarations.dart:7:1: Error: Import directives must preceed part directives.
+// pkg/front_end/testcases/duplicated_declarations.dart:7:1: Error: Import directives must precede part directives.
 // Try moving the import directives before the part directives.
 // import 'duplicated_declarations_lib.dart' as Typedef;
 // ^^^^^^
 //
-// pkg/front_end/testcases/duplicated_declarations.dart:9:1: Error: Import directives must preceed part directives.
+// pkg/front_end/testcases/duplicated_declarations.dart:9:1: Error: Import directives must precede part directives.
 // Try moving the import directives before the part directives.
 // import 'duplicated_declarations_lib.dart' as Typedef;
 // ^^^^^^
diff --git a/pkg/front_end/testcases/duplicated_declarations.dart.legacy.transformed.expect b/pkg/front_end/testcases/duplicated_declarations.dart.legacy.transformed.expect
index f1e837f..86ec30f 100644
--- a/pkg/front_end/testcases/duplicated_declarations.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/duplicated_declarations.dart.legacy.transformed.expect
@@ -2,12 +2,12 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/duplicated_declarations.dart:7:1: Error: Import directives must preceed part directives.
+// pkg/front_end/testcases/duplicated_declarations.dart:7:1: Error: Import directives must precede part directives.
 // Try moving the import directives before the part directives.
 // import 'duplicated_declarations_lib.dart' as Typedef;
 // ^^^^^^
 //
-// pkg/front_end/testcases/duplicated_declarations.dart:9:1: Error: Import directives must preceed part directives.
+// pkg/front_end/testcases/duplicated_declarations.dart:9:1: Error: Import directives must precede part directives.
 // Try moving the import directives before the part directives.
 // import 'duplicated_declarations_lib.dart' as Typedef;
 // ^^^^^^
diff --git a/pkg/front_end/testcases/duplicated_declarations.dart.outline.expect b/pkg/front_end/testcases/duplicated_declarations.dart.outline.expect
index 63f345e..1933ac0 100644
--- a/pkg/front_end/testcases/duplicated_declarations.dart.outline.expect
+++ b/pkg/front_end/testcases/duplicated_declarations.dart.outline.expect
@@ -2,12 +2,12 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/duplicated_declarations.dart:7:1: Error: Import directives must preceed part directives.
+// pkg/front_end/testcases/duplicated_declarations.dart:7:1: Error: Import directives must precede part directives.
 // Try moving the import directives before the part directives.
 // import 'duplicated_declarations_lib.dart' as Typedef;
 // ^^^^^^
 //
-// pkg/front_end/testcases/duplicated_declarations.dart:9:1: Error: Import directives must preceed part directives.
+// pkg/front_end/testcases/duplicated_declarations.dart:9:1: Error: Import directives must precede part directives.
 // Try moving the import directives before the part directives.
 // import 'duplicated_declarations_lib.dart' as Typedef;
 // ^^^^^^
diff --git a/pkg/front_end/testcases/duplicated_declarations.dart.strong.expect b/pkg/front_end/testcases/duplicated_declarations.dart.strong.expect
index a51c4ba..6e8d2d8 100644
--- a/pkg/front_end/testcases/duplicated_declarations.dart.strong.expect
+++ b/pkg/front_end/testcases/duplicated_declarations.dart.strong.expect
@@ -2,12 +2,12 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/duplicated_declarations.dart:7:1: Error: Import directives must preceed part directives.
+// pkg/front_end/testcases/duplicated_declarations.dart:7:1: Error: Import directives must precede part directives.
 // Try moving the import directives before the part directives.
 // import 'duplicated_declarations_lib.dart' as Typedef;
 // ^^^^^^
 //
-// pkg/front_end/testcases/duplicated_declarations.dart:9:1: Error: Import directives must preceed part directives.
+// pkg/front_end/testcases/duplicated_declarations.dart:9:1: Error: Import directives must precede part directives.
 // Try moving the import directives before the part directives.
 // import 'duplicated_declarations_lib.dart' as Typedef;
 // ^^^^^^
diff --git a/pkg/front_end/testcases/dynamic_and_void.dart b/pkg/front_end/testcases/dynamic_and_void.dart
index 21800bd..f6b345c 100644
--- a/pkg/front_end/testcases/dynamic_and_void.dart
+++ b/pkg/front_end/testcases/dynamic_and_void.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.
 
-/*@testedFeatures=warning*/
-
 // dynamic is treated as a name exported by dart:core.  void is not treated as a
 // name exported by dart:core.
 
diff --git a/pkg/front_end/testcases/dynamic_and_void.dart.legacy.expect b/pkg/front_end/testcases/dynamic_and_void.dart.legacy.expect
index 3760ddb..5606157 100644
--- a/pkg/front_end/testcases/dynamic_and_void.dart.legacy.expect
+++ b/pkg/front_end/testcases/dynamic_and_void.dart.legacy.expect
@@ -2,7 +2,7 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/dynamic_and_void.dart:12:27: Warning: Type 'dynamic' not found.
+// pkg/front_end/testcases/dynamic_and_void.dart:10:27: Warning: Type 'dynamic' not found.
 // /*@warning=TypeNotFound*/ dynamic testDynamic() => 0;
 //                           ^^^^^^^
 //
diff --git a/pkg/front_end/testcases/dynamic_and_void.dart.legacy.transformed.expect b/pkg/front_end/testcases/dynamic_and_void.dart.legacy.transformed.expect
index 3760ddb..5606157 100644
--- a/pkg/front_end/testcases/dynamic_and_void.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/dynamic_and_void.dart.legacy.transformed.expect
@@ -2,7 +2,7 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/dynamic_and_void.dart:12:27: Warning: Type 'dynamic' not found.
+// pkg/front_end/testcases/dynamic_and_void.dart:10:27: Warning: Type 'dynamic' not found.
 // /*@warning=TypeNotFound*/ dynamic testDynamic() => 0;
 //                           ^^^^^^^
 //
diff --git a/pkg/front_end/testcases/dynamic_and_void.dart.outline.expect b/pkg/front_end/testcases/dynamic_and_void.dart.outline.expect
index f080c68..b659017 100644
--- a/pkg/front_end/testcases/dynamic_and_void.dart.outline.expect
+++ b/pkg/front_end/testcases/dynamic_and_void.dart.outline.expect
@@ -2,7 +2,7 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/dynamic_and_void.dart:12:27: Warning: Type 'dynamic' not found.
+// pkg/front_end/testcases/dynamic_and_void.dart:10:27: Warning: Type 'dynamic' not found.
 // /*@warning=TypeNotFound*/ dynamic testDynamic() => 0;
 //                           ^^^^^^^
 //
diff --git a/pkg/front_end/testcases/escape.dart.hierarchy.expect b/pkg/front_end/testcases/escape.dart.hierarchy.expect
index 07af593..6fbadf9 100644
--- a/pkg/front_end/testcases/escape.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/escape.dart.hierarchy.expect
@@ -74,6 +74,7 @@
   classSetters:
 
 X:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: A, B
diff --git a/pkg/front_end/testcases/export_main.dart.legacy.expect b/pkg/front_end/testcases/export_main.dart.legacy.expect
index 1f4d73b..2ce3772 100644
--- a/pkg/front_end/testcases/export_main.dart.legacy.expect
+++ b/pkg/front_end/testcases/export_main.dart.legacy.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./hello.dart" as hel;
+import "hello.dart" as hel;
 additionalExports = (hel::main)
 
 
diff --git a/pkg/front_end/testcases/export_main.dart.legacy.transformed.expect b/pkg/front_end/testcases/export_main.dart.legacy.transformed.expect
index 1f4d73b..2ce3772 100644
--- a/pkg/front_end/testcases/export_main.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/export_main.dart.legacy.transformed.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./hello.dart" as hel;
+import "hello.dart" as hel;
 additionalExports = (hel::main)
 
 
diff --git a/pkg/front_end/testcases/export_main.dart.outline.expect b/pkg/front_end/testcases/export_main.dart.outline.expect
index 349482d..ce25789 100644
--- a/pkg/front_end/testcases/export_main.dart.outline.expect
+++ b/pkg/front_end/testcases/export_main.dart.outline.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./hello.dart" as hel;
+import "hello.dart" as hel;
 additionalExports = (hel::main)
 
 
diff --git a/pkg/front_end/testcases/export_main.dart.strong.expect b/pkg/front_end/testcases/export_main.dart.strong.expect
index 1f4d73b..2ce3772 100644
--- a/pkg/front_end/testcases/export_main.dart.strong.expect
+++ b/pkg/front_end/testcases/export_main.dart.strong.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./hello.dart" as hel;
+import "hello.dart" as hel;
 additionalExports = (hel::main)
 
 
diff --git a/pkg/front_end/testcases/export_main.dart.strong.transformed.expect b/pkg/front_end/testcases/export_main.dart.strong.transformed.expect
index 1f4d73b..2ce3772 100644
--- a/pkg/front_end/testcases/export_main.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/export_main.dart.strong.transformed.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./hello.dart" as hel;
+import "hello.dart" as hel;
 additionalExports = (hel::main)
 
 
diff --git a/pkg/front_end/testcases/expression/class_type_param_bound_2.expression.yaml b/pkg/front_end/testcases/expression/class_type_param_bound_2.expression.yaml
new file mode 100644
index 0000000..373069e
--- /dev/null
+++ b/pkg/front_end/testcases/expression/class_type_param_bound_2.expression.yaml
@@ -0,0 +1,10 @@
+# Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE file.
+
+entry_point: "main_2.dart"
+import: "main.dart"
+definitions: ["x"]
+position: "main.dart#C"
+expression: |
+  hasBound<T>()
diff --git a/pkg/front_end/testcases/expression/class_type_param_bound_2.expression.yaml.expect b/pkg/front_end/testcases/expression/class_type_param_bound_2.expression.yaml.expect
new file mode 100644
index 0000000..2fef29d
--- /dev/null
+++ b/pkg/front_end/testcases/expression/class_type_param_bound_2.expression.yaml.expect
@@ -0,0 +1,4 @@
+Errors: {
+}
+method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr(dynamic x) → dynamic
+  return main::hasBound<main::C::T>();
diff --git a/pkg/front_end/testcases/expression/class_type_param_bound_illegal.expression.yaml.expect b/pkg/front_end/testcases/expression/class_type_param_bound_illegal.expression.yaml.expect
index b75af9f..2bc51ce 100644
--- a/pkg/front_end/testcases/expression/class_type_param_bound_illegal.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/class_type_param_bound_illegal.expression.yaml.expect
@@ -4,9 +4,6 @@
   Try changing type arguments so that they conform to the bounds.
   hasBound<T>()
   ^
-  pkg/front_end/testcases/expression/main.dart:36:15: Context: This is the type variable whose bound isn't conformed to.
-  void hasBound<T extends Bound>() {}
-                ^
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr(dynamic x) → dynamic
   return main::hasBound<main::A::T>();
diff --git a/pkg/front_end/testcases/expression/class_type_param_bound_illegal_2.expression.yaml b/pkg/front_end/testcases/expression/class_type_param_bound_illegal_2.expression.yaml
new file mode 100644
index 0000000..e6a0f33
--- /dev/null
+++ b/pkg/front_end/testcases/expression/class_type_param_bound_illegal_2.expression.yaml
@@ -0,0 +1,10 @@
+# Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE file.
+
+entry_point: "main_2.dart"
+import: "main.dart"
+definitions: ["x"]
+position: "main.dart#A"
+expression: |
+  hasBound<T>()
diff --git a/pkg/front_end/testcases/expression/class_type_param_bound_illegal_2.expression.yaml.expect b/pkg/front_end/testcases/expression/class_type_param_bound_illegal_2.expression.yaml.expect
new file mode 100644
index 0000000..2bc51ce
--- /dev/null
+++ b/pkg/front_end/testcases/expression/class_type_param_bound_illegal_2.expression.yaml.expect
@@ -0,0 +1,9 @@
+Errors: {
+  org-dartlang-debug:synthetic_debug_expression:1:1: Error: Type argument 'T' doesn't conform to the bound 'Bound' of the type variable 'T' on 'hasBound'.
+   - 'Bound' is from 'pkg/front_end/testcases/expression/main.dart'.
+  Try changing type arguments so that they conform to the bounds.
+  hasBound<T>()
+  ^
+}
+method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr(dynamic x) → dynamic
+  return main::hasBound<main::A::T>();
diff --git a/pkg/front_end/testcases/expression/main_2.dart b/pkg/front_end/testcases/expression/main_2.dart
new file mode 100644
index 0000000..5cebe18
--- /dev/null
+++ b/pkg/front_end/testcases/expression/main_2.dart
@@ -0,0 +1,11 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library main_2;
+
+import 'main.dart' as m;
+
+main() {
+  m.main();
+}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/expression/type_param_bound.expression.yaml.expect b/pkg/front_end/testcases/expression/type_param_bound.expression.yaml.expect
index bb5b00a..4d0bbb7 100644
--- a/pkg/front_end/testcases/expression/type_param_bound.expression.yaml.expect
+++ b/pkg/front_end/testcases/expression/type_param_bound.expression.yaml.expect
@@ -4,9 +4,6 @@
   Try changing type arguments so that they conform to the bounds.
   hasBound<T>()
   ^
-  pkg/front_end/testcases/expression/main.dart:36:15: Context: This is the type variable whose bound isn't conformed to.
-  void hasBound<T extends Bound>() {}
-                ^
 }
 method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr<T extends dynamic>() → dynamic
   return main::hasBound<#lib1::debugExpr::T>();
diff --git a/pkg/front_end/testcases/expression/type_param_bound_2.expression.yaml b/pkg/front_end/testcases/expression/type_param_bound_2.expression.yaml
new file mode 100644
index 0000000..b584ef2
--- /dev/null
+++ b/pkg/front_end/testcases/expression/type_param_bound_2.expression.yaml
@@ -0,0 +1,11 @@
+# Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE file.
+
+entry_point: "main_2.dart"
+import: "main.dart"
+definitions: []
+type_definitions: ["T"]
+position: "main.dart"
+expression: |
+  hasBound<T>()
diff --git a/pkg/front_end/testcases/expression/type_param_bound_2.expression.yaml.expect b/pkg/front_end/testcases/expression/type_param_bound_2.expression.yaml.expect
new file mode 100644
index 0000000..4d0bbb7
--- /dev/null
+++ b/pkg/front_end/testcases/expression/type_param_bound_2.expression.yaml.expect
@@ -0,0 +1,9 @@
+Errors: {
+  org-dartlang-debug:synthetic_debug_expression:1:1: Error: Type argument 'T' doesn't conform to the bound 'Bound' of the type variable 'T' on 'hasBound'.
+   - 'Bound' is from 'pkg/front_end/testcases/expression/main.dart'.
+  Try changing type arguments so that they conform to the bounds.
+  hasBound<T>()
+  ^
+}
+method /* from org-dartlang-debug:synthetic_debug_expression */ debugExpr<T extends dynamic>() → dynamic
+  return main::hasBound<#lib1::debugExpr::T>();
diff --git a/pkg/front_end/testcases/for_in_without_declaration.dart.legacy.expect b/pkg/front_end/testcases/for_in_without_declaration.dart.legacy.expect
index 8e5c9f4..9cc7892 100644
--- a/pkg/front_end/testcases/for_in_without_declaration.dart.legacy.expect
+++ b/pkg/front_end/testcases/for_in_without_declaration.dart.legacy.expect
@@ -142,10 +142,8 @@
          ^^^";
         dynamic x;
         dynamic y;
-        {
-          core::print(x);
-          core::print(y);
-        }
+        core::print(x);
+        core::print(y);
       }
     }
     const core::int constant = 0;
diff --git a/pkg/front_end/testcases/for_in_without_declaration.dart.legacy.transformed.expect b/pkg/front_end/testcases/for_in_without_declaration.dart.legacy.transformed.expect
index 8e5c9f4..9cc7892 100644
--- a/pkg/front_end/testcases/for_in_without_declaration.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/for_in_without_declaration.dart.legacy.transformed.expect
@@ -142,10 +142,8 @@
          ^^^";
         dynamic x;
         dynamic y;
-        {
-          core::print(x);
-          core::print(y);
-        }
+        core::print(x);
+        core::print(y);
       }
     }
     const core::int constant = 0;
diff --git a/pkg/front_end/testcases/for_in_without_declaration.dart.strong.expect b/pkg/front_end/testcases/for_in_without_declaration.dart.strong.expect
index cc7b291..9e758ec 100644
--- a/pkg/front_end/testcases/for_in_without_declaration.dart.strong.expect
+++ b/pkg/front_end/testcases/for_in_without_declaration.dart.strong.expect
@@ -172,10 +172,8 @@
          ^^^";
         dynamic x;
         dynamic y;
-        {
-          core::print(x);
-          core::print(y);
-        }
+        core::print(x);
+        core::print(y);
       }
     }
     const core::int constant = 0;
diff --git a/pkg/front_end/testcases/for_in_without_declaration.dart.strong.transformed.expect b/pkg/front_end/testcases/for_in_without_declaration.dart.strong.transformed.expect
index cc7b291..9e758ec 100644
--- a/pkg/front_end/testcases/for_in_without_declaration.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/for_in_without_declaration.dart.strong.transformed.expect
@@ -172,10 +172,8 @@
          ^^^";
         dynamic x;
         dynamic y;
-        {
-          core::print(x);
-          core::print(y);
-        }
+        core::print(x);
+        core::print(y);
       }
     }
     const core::int constant = 0;
diff --git a/pkg/front_end/testcases/function_type_is_check.dart.hierarchy.expect b/pkg/front_end/testcases/function_type_is_check.dart.hierarchy.expect
index 98d4425..8dc6d36 100644
--- a/pkg/front_end/testcases/function_type_is_check.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/function_type_is_check.dart.hierarchy.expect
@@ -94,6 +94,7 @@
   classSetters:
 
 ExpectException:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Exception
@@ -124,40 +125,6 @@
     Object.==
   interfaceSetters:
 
-NoInline:
-  superclasses:
-    Object
-  interfaces:
-  classMembers:
-    Object.toString
-    Object.runtimeType
-    Object._simpleInstanceOf
-    Object._instanceOf
-    Object.noSuchMethod
-    Object._identityHashCode
-    Object.hashCode
-    Object._simpleInstanceOfFalse
-    Object._simpleInstanceOfTrue
-    Object.==
-  classSetters:
-
-AssumeDynamic:
-  superclasses:
-    Object
-  interfaces:
-  classMembers:
-    Object.toString
-    Object.runtimeType
-    Object._simpleInstanceOf
-    Object._instanceOf
-    Object.noSuchMethod
-    Object._identityHashCode
-    Object.hashCode
-    Object._simpleInstanceOfFalse
-    Object._simpleInstanceOfTrue
-    Object.==
-  classSetters:
-
 Immutable:
   superclasses:
     Object
diff --git a/pkg/front_end/testcases/implicit_scope_test.dart.hierarchy.expect b/pkg/front_end/testcases/implicit_scope_test.dart.hierarchy.expect
index 336c761..15f5bfb 100644
--- a/pkg/front_end/testcases/implicit_scope_test.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/implicit_scope_test.dart.hierarchy.expect
@@ -113,6 +113,7 @@
   classSetters:
 
 ExpectException:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Exception
@@ -143,40 +144,6 @@
     Object.==
   interfaceSetters:
 
-NoInline:
-  superclasses:
-    Object
-  interfaces:
-  classMembers:
-    Object.toString
-    Object.runtimeType
-    Object._simpleInstanceOf
-    Object._instanceOf
-    Object.noSuchMethod
-    Object._identityHashCode
-    Object.hashCode
-    Object._simpleInstanceOfFalse
-    Object._simpleInstanceOfTrue
-    Object.==
-  classSetters:
-
-AssumeDynamic:
-  superclasses:
-    Object
-  interfaces:
-  classMembers:
-    Object.toString
-    Object.runtimeType
-    Object._simpleInstanceOf
-    Object._instanceOf
-    Object.noSuchMethod
-    Object._identityHashCode
-    Object.hashCode
-    Object._simpleInstanceOfFalse
-    Object._simpleInstanceOfTrue
-    Object.==
-  classSetters:
-
 Immutable:
   superclasses:
     Object
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/changing_modules.yaml b/pkg/front_end/testcases/incremental_initialize_from_dill/changing_modules.yaml
new file mode 100644
index 0000000..ba6a85f
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/changing_modules.yaml
@@ -0,0 +1,147 @@
+# Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE.md file.
+
+# Compile an application with a number of modules.
+# Compile again with changing modules.
+
+type: newworld
+strong: true
+modules:
+  example_0.1.0:
+    example_0.1.0/a.dart: |
+      a() {
+        la1();
+      }
+      la1() {
+        print("Hello from v0.1.0");
+      }
+    example_0.1.0/b.dart: |
+      import "a.dart";
+      b() {
+        a();
+      }
+    example_0.1.0/.packages: |
+      example:.
+  example_0.1.1:
+    example_0.1.1/b.dart: |
+      b() {
+        print("Hello from v0.1.1");
+      }
+      bool example011 = true;
+    example_0.1.1/.packages: |
+      example:.
+  foo_1:
+    foo_1/foo.dart: |
+      import "package:example/b.dart";
+      foo() {
+        print("Hello from foo");
+        b();
+      }
+      bool foo1 = true;
+    foo_1/.packages: |
+      foo:.
+      example:../example_0.1.0
+  foo_2:
+    foo_2/foo.dart: |
+      import "package:example/b.dart";
+      import "bar.dart";
+      import "baz.dart";
+      foo() {
+        print("Hello from foo 2");
+        bar();
+        baz();
+        b();
+      }
+      bool foo2 = true;
+    foo_2/bar.dart: |
+      bar() {
+        print("hello from bar");
+      }
+    foo_2/baz.dart: |
+      baz() {
+        print("hello from baz");
+      }
+    foo_2/.packages: |
+      foo:.
+      example:../example_0.1.1
+worlds:
+  - entry: main.dart
+    fromComponent: true
+    sources:
+      main.dart: |
+        import "package:example/b.dart";
+        main() {
+          print("hello");
+          b();
+        }
+      .packages: example:example_0.1.0
+    modules:
+      - example_0.1.0
+    expectedLibraryCount: 3
+    expectedContent:
+      org-dartlang-test:///main.dart:
+        - Procedure main
+      package:example/b.dart:
+        - Procedure b
+      package:example/a.dart:
+        - Procedure a
+        - Procedure la1
+  - entry: main.dart
+    worldType: updated
+    expectInitializeFromDill: false
+    sources:
+      main.dart: |
+        import "package:foo/foo.dart";
+        main() {
+          print("hello");
+          foo();
+        }
+      .packages: |
+        example:example_0.1.0
+        foo:foo_1
+    modules:
+      - example_0.1.0
+      - foo_1
+    expectedLibraryCount: 4
+    expectedContent:
+      org-dartlang-test:///main.dart:
+        - Procedure main
+      package:example/b.dart:
+        - Procedure b
+      package:example/a.dart:
+        - Procedure a
+        - Procedure la1
+      package:foo/foo.dart:
+        - Procedure foo
+        - Field foo1
+  - entry: main.dart
+    worldType: updated
+    expectInitializeFromDill: false
+    sources:
+      main.dart: |
+        import "package:foo/foo.dart";
+        main() {
+          print("hello");
+          foo();
+        }
+      .packages: |
+        example:example_0.1.1
+        foo:foo_2
+    modules:
+      - example_0.1.1
+      - foo_2
+    expectedLibraryCount: 5
+    expectedContent:
+      org-dartlang-test:///main.dart:
+        - Procedure main
+      package:example/b.dart:
+        - Procedure b
+        - Field example011
+      package:foo/foo.dart:
+        - Procedure foo
+        - Field foo2
+      package:foo/bar.dart:
+        - Procedure bar
+      package:foo/baz.dart:
+        - Procedure baz
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/cleans_up_uritosource_non_package_unreferenced_libraries.yaml b/pkg/front_end/testcases/incremental_initialize_from_dill/cleans_up_uritosource_non_package_unreferenced_libraries.yaml
new file mode 100644
index 0000000..08f0a4c
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/cleans_up_uritosource_non_package_unreferenced_libraries.yaml
@@ -0,0 +1,41 @@
+# Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE.md file.
+
+# Compile an application with no packages and two libraries. Update the world
+# to now only include one library. The now no longer referenced library should
+# also have been removed from the uri to sources.
+
+type: newworld
+strong: true
+worlds:
+  - entry: main.dart
+    sources:
+      main.dart: |
+        import "b.dart";
+        main() { b(); }
+      b.dart: |
+        b() {}
+    expectedLibraryCount: 2
+  - entry: main.dart
+    worldType: updated
+    invalidate:
+      - main.dart
+    expectInitializeFromDill: false
+    sources:
+      main.dart: |
+        main() {}
+    expectedLibraryCount: 1
+    uriToSourcesDoesntInclude:
+      - b.dart
+  - entry: main.dart
+    worldType: updated
+    invalidate:
+      - main.dart
+    expectInitializeFromDill: false
+    sources:
+      main.dart: |
+        main() {}
+    expectedLibraryCount: 1
+    uriToSourcesDoesntInclude:
+      - b.dart
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/cleans_up_uritosource_unreferenced_package_library.yaml b/pkg/front_end/testcases/incremental_initialize_from_dill/cleans_up_uritosource_unreferenced_package_library.yaml
new file mode 100644
index 0000000..ef7857f
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/cleans_up_uritosource_unreferenced_package_library.yaml
@@ -0,0 +1,34 @@
+# Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE.md file.
+
+# Compile an application with a package. Update the world so that the .packages
+# no longer reference the package (and the source no longe ruse it) and
+# recompile. The now no longer referenced package library should also have been
+# removed from the uri to sources.
+
+type: newworld
+strong: true
+worlds:
+  - entry: main.dart
+    sources:
+      .packages: example:pkg/example
+      main.dart: |
+        import "package:example/b.dart";
+        main() { b(); }
+      pkg/example/b.dart: |
+        b() {}
+    expectedLibraryCount: 2
+  - entry: main.dart
+    worldType: updated
+    invalidate:
+      - main.dart
+      - .packages
+    expectInitializeFromDill: false
+    sources:
+      .packages: 
+      main.dart: |
+        main() {}
+    expectedLibraryCount: 1
+    uriToSourcesDoesntInclude:
+      - pkg/example/b.dart
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/constant_set_literal.yaml b/pkg/front_end/testcases/incremental_initialize_from_dill/constant_set_literal.yaml
new file mode 100644
index 0000000..4b1c653
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/constant_set_literal.yaml
@@ -0,0 +1,31 @@
+# Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE.md file.
+
+# Test that constant set literals works as expected.
+
+type: newworld
+strong: true
+worlds:
+  - entry: "main.dart"
+    sources:
+      main.dart: |
+        import 'lib.dart';
+
+        const Set<String> foo = {};
+        main() {
+          print(foo);
+          print(bar);
+        }
+      lib.dart: |
+        const Set<String> bar = {"hello", "world"};
+    expectedLibraryCount: 2
+  - entry: "main.dart"
+    worldType: updated
+    expectInitializeFromDill: false
+    invalidate:
+      - lib.dart
+    sources:
+      lib.dart: |
+        const Set<int> bar = {42};
+    expectedLibraryCount: 2
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_mixin_failure_1.yaml b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_mixin_failure_1.yaml
new file mode 100644
index 0000000..1a79746
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/flutter_mixin_failure_1.yaml
@@ -0,0 +1,63 @@
+# Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE.md file.
+
+# Regression test from flutter.
+
+type: newworld
+strong: true
+worlds:
+  - entry: main.dart
+    sources:
+      main.dart: |
+        import 'lib.dart';
+
+        class Test extends Test2 {
+          Quux world() => null;
+        }
+
+        abstract class Test2 {
+          Baz world();
+        }
+      lib.dart: |
+        class FooEntry {}
+
+        class BarEntry extends FooEntry {}
+
+        abstract class FooTarget {
+          void hello(FooEntry entry);
+        }
+
+        abstract class Baz implements FooTarget {
+          void hello(covariant FooEntry entry) {}
+        }
+
+        mixin MyMixin on Baz {}
+
+        abstract class Qux extends Baz {
+          void hello(BarEntry entry) {}
+        }
+
+        class Quux extends Qux with MyMixin {}
+    expectedLibraryCount: 2
+  - entry: main.dart
+    worldType: updated
+    invalidate:
+      - main.dart
+    expectInitializeFromDill: false
+    sources:
+      main.dart: |
+        import 'lib.dart';
+
+        class Test extends Test2 {
+          Quux world() => null;
+        }
+
+        abstract class Test2 {
+          Baz world();
+        }
+
+        main() {
+          print(new Test());
+        }
+    expectedLibraryCount: 2
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/load_from_component_explicitly_import_dart_core.yaml b/pkg/front_end/testcases/incremental_initialize_from_dill/load_from_component_explicitly_import_dart_core.yaml
index 9fbdf62..649545e 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/load_from_component_explicitly_import_dart_core.yaml
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/load_from_component_explicitly_import_dart_core.yaml
@@ -2,14 +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.md file.
 
-# Initialize from component, where the component is linked to one sdk, and where
-# the incremental compiler loads another sdk. Risk when doing this: Having two
-# definitions of the same thing (e.g. the class 'String'), which could lead to
-# errors such as "The argument type 'dart.core::String' can't be assigned to
+# Initialize from component, where the component is linked to a sdk, and where
+# the incremental compiler (could) load another sdk.
+# Risk when doing this: Having two definitions of the same thing
+# (e.g. the class 'String'), which could lead to errors such as
+# "The argument type 'dart.core::String' can't be assigned to
 # the parameter type 'dart.core::String'".
 
 type: newworld
 strong: true
+omitPlatform: false
 worlds:
   - entry: main.dart
     errors: false
@@ -28,9 +30,11 @@
           print("Hello from useString: $s");
         }
     expectedLibraryCount: 2
+    expectsPlatform: true
   - entry: main.dart
     errors: false
     warnings: false
+    expectInitializeFromDill: false
     fromComponent: true
     invalidate:
       - main.dart
@@ -47,4 +51,5 @@
         void useString(String s) {
           print("Hello from useString: $s");
         }
-    expectedLibraryCount: 2
\ No newline at end of file
+    expectedLibraryCount: 2
+    expectsPlatform: true
\ No newline at end of file
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/multiple_entriepoints.yaml b/pkg/front_end/testcases/incremental_initialize_from_dill/multiple_entriepoints.yaml
new file mode 100644
index 0000000..83c53a0
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/multiple_entriepoints.yaml
@@ -0,0 +1,27 @@
+# Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE.md file.
+
+# Check that asking to compile two files that doesn't import each other actually
+# results in getting both libraries (aka that multiple entry points work).
+
+type: newworld
+strong: true
+worlds:
+  - entry:
+      - a.dart
+      - b.dart
+    sources:
+      a.dart: |
+        a() {
+          print("hello a");
+        }
+      b.dart: |
+        b() {
+          print("hello b");
+        }
+      c.dart: |
+        b() {
+          print("hello c (I'm not included!)");
+        }
+    expectedLibraryCount: 2
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/omit_platform_works_1.yaml b/pkg/front_end/testcases/incremental_initialize_from_dill/omit_platform_works_1.yaml
new file mode 100644
index 0000000..e306e5a
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/omit_platform_works_1.yaml
@@ -0,0 +1,27 @@
+# Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE.md file.
+
+# Compile a hello world program, check that omit platform works as expected.
+
+type: newworld
+strong: true
+omitPlatform: true
+worlds:
+  - entry: main.dart
+    sources:
+      main.dart: |
+        main() {
+          print("Hello world");
+        }
+    expectedLibraryCount: 1
+  - entry: main.dart
+    noFullComponent: true
+    invalidate:
+      - main.dart
+    sources:
+      main.dart: |
+        main() {
+          print("Hello world!");
+        }
+    expectedLibraryCount: 1
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/omit_platform_works_2.yaml b/pkg/front_end/testcases/incremental_initialize_from_dill/omit_platform_works_2.yaml
new file mode 100644
index 0000000..e1a42a8a
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/omit_platform_works_2.yaml
@@ -0,0 +1,27 @@
+# Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE.md file.
+
+# Compile a hello world program, check that omit platform works as expected.
+# Omit platform is true by default in tests.
+
+type: newworld
+strong: true
+worlds:
+  - entry: main.dart
+    sources:
+      main.dart: |
+        main() {
+          print("Hello world");
+        }
+    expectedLibraryCount: 1
+  - entry: main.dart
+    noFullComponent: true
+    invalidate:
+      - main.dart
+    sources:
+      main.dart: |
+        main() {
+          print("Hello world!");
+        }
+    expectedLibraryCount: 1
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/omit_platform_works_3.yaml b/pkg/front_end/testcases/incremental_initialize_from_dill/omit_platform_works_3.yaml
new file mode 100644
index 0000000..b649bbd
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/omit_platform_works_3.yaml
@@ -0,0 +1,80 @@
+# Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE.md file.
+
+# Compile a hello world program, check that omit platform works as expected.
+# Check that we can compile again, that changes work, than we can ask for a full
+# component again etc.
+
+type: newworld
+strong: true
+omitPlatform: false
+worlds:
+  - entry: main.dart
+    sources:
+      main.dart: |
+        main() {
+          print("Hello world");
+        }
+    expectedLibraryCount: 1
+    expectsPlatform: true
+    expectInitializeFromDill: false
+  - entry: main.dart
+    noFullComponent: true
+    worldType: updated
+    invalidate:
+      - main.dart
+    sources:
+      main.dart: |
+        import "lib.dart";
+        main() {
+          print(lib());
+        }
+      lib.dart: |
+        lib() {
+          return "hello";
+        }
+    expectedLibraryCount: 2
+    expectsPlatform: false
+    expectInitializeFromDill: false
+  - entry: main.dart
+    noFullComponent: true
+    worldType: updated
+    invalidate:
+      - main.dart
+    sources:
+      main.dart: |
+        import "lib.dart";
+        main() {
+          print(lib() + "!");
+        }
+    expectedLibraryCount: 1
+    expectsPlatform: false
+    expectInitializeFromDill: false
+  - entry: main.dart
+    noFullComponent: false
+    worldType: updated
+    invalidate:
+      - main.dart
+    sources:
+      main.dart: |
+        import "lib.dart";
+        main() {
+          print(lib());
+        }
+    expectedLibraryCount: 2
+    expectsPlatform: true
+    expectInitializeFromDill: false
+  - entry: main.dart
+    noFullComponent: false
+    invalidate:
+      - main.dart
+    sources:
+      main.dart: |
+        import "lib.dart";
+        main() {
+          print(lib() + "!!");
+        }
+    expectedLibraryCount: 2
+    expectsPlatform: true
+    expectInitializeFromDill: true
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/outline_only.yaml b/pkg/front_end/testcases/incremental_initialize_from_dill/outline_only.yaml
new file mode 100644
index 0000000..5bfb458
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/outline_only.yaml
@@ -0,0 +1,17 @@
+# Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE.md file.
+
+# Compile an application with the option of only getting an outline.
+
+type: newworld
+strong: true
+worlds:
+  - entry: main.dart
+    sources:
+      main.dart: |
+        main() {
+          print("hello");
+          b();
+        }
+    outlineOnly: true
\ No newline at end of file
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/outline_only_2.yaml b/pkg/front_end/testcases/incremental_initialize_from_dill/outline_only_2.yaml
new file mode 100644
index 0000000..0105f44
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/outline_only_2.yaml
@@ -0,0 +1,22 @@
+# Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE.md file.
+
+# Compile an application with the option of only getting an outline.
+# This is a reproduction of http://dartbug.com/36498.
+
+type: newworld
+strong: true
+worlds:
+  - entry: main.dart
+    sources:
+      main.dart: |
+        abstract class Foo {
+          int get foo;
+        }
+
+        class Bar implements Foo {
+          static int _foo = 0;
+          final foo = _foo++;
+        }
+    outlineOnly: true
\ No newline at end of file
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/status.status b/pkg/front_end/testcases/incremental_initialize_from_dill/status.status
index 003bd93..f3d01d2 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/status.status
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/status.status
@@ -3,5 +3,3 @@
 # BSD-style license that can be found in the LICENSE.md file.
 
 # Status file for the test suite ../test/incremental_load_from_dill_yaml_test.dart.
-
-load_from_component_explicitly_import_dart_core: Crash
\ No newline at end of file
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/updated_package_uri.yaml b/pkg/front_end/testcases/incremental_initialize_from_dill/updated_package_uri.yaml
new file mode 100644
index 0000000..cf01000
--- /dev/null
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/updated_package_uri.yaml
@@ -0,0 +1,44 @@
+# Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE.md file.
+
+# Compile an application with a .packages file.
+# Then change which file should be the .packages file to use, and everything
+# should now be relative to the new .packages file.
+
+type: newworld
+strong: true
+worlds:
+  - entry: main.dart
+    sources:
+      main.dart: |
+        import "package:example/b.dart";
+        main() {
+          print("hello");
+          b();
+        }
+      package_0.1.0/a.dart: |
+        a() {
+          la1();
+        }
+        la1() {
+          print("v0.1.0");
+        }
+      package_0.1.0/b.dart: |
+        import "a.dart";
+        b() {
+          a();
+        }
+      .packages: example:package_0.1.0
+    expectedLibraryCount: 3
+  - entry: main.dart
+    worldType: updated
+    expectInitializeFromDill: false
+    sources:
+      package_0.1.1/b.dart: |
+        b() {
+          print("hello from v0.1.1");
+        }
+      .packages2: example:package_0.1.1
+    dotPackagesFile: .packages2
+    expectedLibraryCount: 2
diff --git a/pkg/front_end/testcases/inference/async_await.dart.hierarchy.expect b/pkg/front_end/testcases/inference/async_await.dart.hierarchy.expect
index 494e3cb..8a18ee5 100644
--- a/pkg/front_end/testcases/inference/async_await.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/async_await.dart.hierarchy.expect
@@ -48,6 +48,7 @@
   classSetters:
 
 MyFuture:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Future<int>
diff --git a/pkg/front_end/testcases/inference/async_closure_return_type_flatten.dart b/pkg/front_end/testcases/inference/async_closure_return_type_flatten.dart
index deab006..2f2fe1b 100644
--- a/pkg/front_end/testcases/inference/async_closure_return_type_flatten.dart
+++ b/pkg/front_end/testcases/inference/async_closure_return_type_flatten.dart
@@ -8,10 +8,8 @@
 import 'dart:async';
 
 Future<int> futureInt = null;
-var /*@topType=() -> Future<int>*/ f = /*@returnType=Future<int>*/ () =>
-    futureInt;
-var /*@topType=() -> Future<int>*/ g = /*@returnType=Future<int>*/ () async =>
-    futureInt;
+var f = /*@returnType=Future<int>*/ () => futureInt;
+var g = /*@returnType=Future<int>*/ () async => futureInt;
 
 main() {
   f;
diff --git a/pkg/front_end/testcases/inference/async_closure_return_type_future.dart b/pkg/front_end/testcases/inference/async_closure_return_type_future.dart
index 5fbc5aa..0abd1b3 100644
--- a/pkg/front_end/testcases/inference/async_closure_return_type_future.dart
+++ b/pkg/front_end/testcases/inference/async_closure_return_type_future.dart
@@ -5,8 +5,7 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=() -> Future<int>*/ f = /*@returnType=Future<int>*/ () async =>
-    0;
+var f = /*@returnType=Future<int>*/ () async => 0;
 
 main() {
   f;
diff --git a/pkg/front_end/testcases/inference/async_closure_return_type_future_or.dart b/pkg/front_end/testcases/inference/async_closure_return_type_future_or.dart
index 3404437..086bedf 100644
--- a/pkg/front_end/testcases/inference/async_closure_return_type_future_or.dart
+++ b/pkg/front_end/testcases/inference/async_closure_return_type_future_or.dart
@@ -8,10 +8,8 @@
 import 'dart:async';
 
 FutureOr<int> futureOrInt = null;
-var /*@topType=() -> FutureOr<int>*/ f = /*@returnType=FutureOr<int>*/ () =>
-    futureOrInt;
-var /*@topType=() -> Future<int>*/ g = /*@returnType=Future<int>*/ () async =>
-    futureOrInt;
+var f = /*@returnType=FutureOr<int>*/ () => futureOrInt;
+var g = /*@returnType=Future<int>*/ () async => futureOrInt;
 
 main() {
   f;
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_downwards_incompatible_with_upwards_inference_top_level.dart b/pkg/front_end/testcases/inference/block_bodied_lambdas_downwards_incompatible_with_upwards_inference_top_level.dart
index 94e4661..9e190d1 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_downwards_incompatible_with_upwards_inference_top_level.dart
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_downwards_incompatible_with_upwards_inference_top_level.dart
@@ -6,7 +6,7 @@
 library test;
 
 String f() => null;
-var /*@topType=() -> String*/ g = f;
+var g = f;
 
 main() {
   f;
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_sync.dart b/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_sync.dart
index f640d14..3901551 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_sync.dart
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_sync.dart
@@ -5,7 +5,7 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=dynamic*/ h = null;
+var h = null;
 void foo(int f(Object _)) {}
 
 test() {
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_sync.dart.type_promotion.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_sync.dart.type_promotion.expect
index 2c4de0d..14d415b 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_sync.dart.type_promotion.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_sync.dart.type_promotion.expect
@@ -1,3 +1,3 @@
-pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_sync.dart:17:5: Context: Write to f@369
+pkg/front_end/testcases/inference/block_bodied_lambdas_infer_bottom_sync.dart:17:5: Context: Write to f@348
   f = /*error:INVALID_CAST_FUNCTION_EXPR*/ /*@returnType=Null*/ (/*@type=Object*/ x) =>
     ^
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart b/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart
index e385138..852fb3f 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=warning,inference*/
+/*@testedFeatures=inference*/
 library test;
 
 main() {
@@ -32,7 +32,7 @@
   };
   var /*@type=(bool) -> int*/ g = /*@returnType=int*/ (bool b) {
     if (b) {
-      /*@warning=ReturnWithoutExpression*/ return;
+      return;
     } else {
       return 0;
     }
@@ -62,7 +62,7 @@
     if (b) {
       return 0;
     } else {
-      /*@warning=ReturnWithoutExpression*/ return;
+      return;
     }
   };
   var /*@type=(bool) -> int*/ l = /*@returnType=int*/ (bool b) {
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.strong.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.strong.expect
index a4231bb..6d433ff 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.strong.expect
@@ -2,13 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart:35:44: Warning: Must explicitly return a value from a non-void function.
-//       /*@warning=ReturnWithoutExpression*/ return;
-//                                            ^
+// pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart:35:7: Warning: Must explicitly return a value from a non-void function.
+//       return;
+//       ^
 //
-// pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart:65:44: Warning: Must explicitly return a value from a non-void function.
-//       /*@warning=ReturnWithoutExpression*/ return;
-//                                            ^
+// pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart:65:7: Warning: Must explicitly return a value from a non-void function.
+//       return;
+//       ^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.strong.transformed.expect
index a4231bb..6d433ff 100644
--- a/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart.strong.transformed.expect
@@ -2,13 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart:35:44: Warning: Must explicitly return a value from a non-void function.
-//       /*@warning=ReturnWithoutExpression*/ return;
-//                                            ^
+// pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart:35:7: Warning: Must explicitly return a value from a non-void function.
+//       return;
+//       ^
 //
-// pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart:65:44: Warning: Must explicitly return a value from a non-void function.
-//       /*@warning=ReturnWithoutExpression*/ return;
-//                                            ^
+// pkg/front_end/testcases/inference/block_bodied_lambdas_returns.dart:65:7: Warning: Must explicitly return a value from a non-void function.
+//       return;
+//       ^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/inference/bottom.dart b/pkg/front_end/testcases/inference/bottom.dart
index 567246e..99a196f 100644
--- a/pkg/front_end/testcases/inference/bottom.dart
+++ b/pkg/front_end/testcases/inference/bottom.dart
@@ -5,7 +5,7 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=dynamic*/ v = null;
+var v = null;
 
 main() {
   v;
diff --git a/pkg/front_end/testcases/inference/bottom_in_closure.dart b/pkg/front_end/testcases/inference/bottom_in_closure.dart
index a1be850..d375da9 100644
--- a/pkg/front_end/testcases/inference/bottom_in_closure.dart
+++ b/pkg/front_end/testcases/inference/bottom_in_closure.dart
@@ -5,7 +5,7 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=() -> Null*/ v = /*@returnType=Null*/ () => null;
+var v = /*@returnType=Null*/ () => null;
 
 main() {
   v;
diff --git a/pkg/front_end/testcases/inference/bug30251.dart b/pkg/front_end/testcases/inference/bug30251.dart
index 63e0ffa..98c6b1e 100644
--- a/pkg/front_end/testcases/inference/bug30251.dart
+++ b/pkg/front_end/testcases/inference/bug30251.dart
@@ -8,7 +8,7 @@
 T f<T>(T t) => t;
 
 class C {
-  final /*@topType=dynamic*/ x;
+  final x;
   C(int p) : x = /*@typeArgs=int*/ f(1 /*@target=num::+*/ + p);
 }
 
diff --git a/pkg/front_end/testcases/inference/bug31132.dart b/pkg/front_end/testcases/inference/bug31132.dart
index 9e69bff..234be9a 100644
--- a/pkg/front_end/testcases/inference/bug31132.dart
+++ b/pkg/front_end/testcases/inference/bug31132.dart
@@ -8,7 +8,7 @@
 class B {}
 
 class C extends B {
-  var /*@topType=dynamic*/ z;
+  var z;
 }
 
 void test(B x) {
diff --git a/pkg/front_end/testcases/inference/bug31132.dart.type_promotion.expect b/pkg/front_end/testcases/inference/bug31132.dart.type_promotion.expect
index 101f24d..8387b10 100644
--- a/pkg/front_end/testcases/inference/bug31132.dart.type_promotion.expect
+++ b/pkg/front_end/testcases/inference/bug31132.dart.type_promotion.expect
@@ -1,3 +1,3 @@
-pkg/front_end/testcases/inference/bug31132.dart:15:25: Context: Possible promotion of x@339
+pkg/front_end/testcases/inference/bug31132.dart:15:25: Context: Possible promotion of x@318
   var /*@type=C*/ y = x is C ? /*@promotedType=C*/ x : new C();
                         ^^
diff --git a/pkg/front_end/testcases/inference/callable_generic_class.dart.legacy.expect b/pkg/front_end/testcases/inference/callable_generic_class.dart.legacy.expect
index 19abeae..0423f11 100644
--- a/pkg/front_end/testcases/inference/callable_generic_class.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/callable_generic_class.dart.legacy.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::ActionDispatcher<self::ActionDispatcher::P>
     : super core::Object::•()
     ;
-  method call([self::ActionDispatcher::P value = null]) → void {}
+  method call([generic-covariant-impl self::ActionDispatcher::P value = null]) → void {}
 }
 class Bar extends core::Object {
   synthetic constructor •() → self::Bar
diff --git a/pkg/front_end/testcases/inference/callable_generic_class.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/callable_generic_class.dart.legacy.transformed.expect
index 19abeae..0423f11 100644
--- a/pkg/front_end/testcases/inference/callable_generic_class.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/callable_generic_class.dart.legacy.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::ActionDispatcher<self::ActionDispatcher::P>
     : super core::Object::•()
     ;
-  method call([self::ActionDispatcher::P value = null]) → void {}
+  method call([generic-covariant-impl self::ActionDispatcher::P value = null]) → void {}
 }
 class Bar extends core::Object {
   synthetic constructor •() → self::Bar
diff --git a/pkg/front_end/testcases/inference/callable_generic_class.dart.outline.expect b/pkg/front_end/testcases/inference/callable_generic_class.dart.outline.expect
index 186f5b0..013bfca 100644
--- a/pkg/front_end/testcases/inference/callable_generic_class.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/callable_generic_class.dart.outline.expect
@@ -5,7 +5,7 @@
 class ActionDispatcher<P extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::ActionDispatcher<self::ActionDispatcher::P>
     ;
-  method call([self::ActionDispatcher::P value]) → void
+  method call([generic-covariant-impl self::ActionDispatcher::P value]) → void
     ;
 }
 class Bar extends core::Object {
diff --git a/pkg/front_end/testcases/inference/circular_method_inference.dart b/pkg/front_end/testcases/inference/circular_method_inference.dart
index a5492c9..73ac166 100644
--- a/pkg/front_end/testcases/inference/circular_method_inference.dart
+++ b/pkg/front_end/testcases/inference/circular_method_inference.dart
@@ -10,11 +10,11 @@
 // that causes type inference for the method `f` to go into an infinite loop.
 
 abstract class A extends B {
-  /*@topType=dynamic*/ f(/*@topType=dynamic*/ x);
+  f(x);
 }
 
 abstract class B extends A {
-  /*@topType=dynamic*/ f(/*@topType=dynamic*/ x);
+  f(x);
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/circular_reference_via_closures.dart b/pkg/front_end/testcases/inference/circular_reference_via_closures.dart
index 2e499a1..b63fb9a 100644
--- a/pkg/front_end/testcases/inference/circular_reference_via_closures.dart
+++ b/pkg/front_end/testcases/inference/circular_reference_via_closures.dart
@@ -2,12 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
-var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x = /*@returnType=dynamic*/ () =>
-    y;
-var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ y = /*@returnType=dynamic*/ () =>
-    x;
+var x = /*@returnType=invalid-type*/ () => y;
+var y = /*@returnType=invalid-type*/ () => x;
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/circular_reference_via_closures.dart.strong.expect b/pkg/front_end/testcases/inference/circular_reference_via_closures.dart.strong.expect
index 5b3b71c..73adfd1 100644
--- a/pkg/front_end/testcases/inference/circular_reference_via_closures.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/circular_reference_via_closures.dart.strong.expect
@@ -2,18 +2,18 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/circular_reference_via_closures.dart:10:67: Error: Can't infer the type of 'y': circularity found during type inference.
+// pkg/front_end/testcases/inference/circular_reference_via_closures.dart:9:5: Error: Can't infer the type of 'y': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ y = /*@returnType=dynamic*/ () =>
-//                                                                   ^
+// var y = /*@returnType=invalid-type*/ () => x;
+//     ^
 //
-// pkg/front_end/testcases/inference/circular_reference_via_closures.dart:8:67: Error: Can't infer the type of 'x': circularity found during type inference.
+// pkg/front_end/testcases/inference/circular_reference_via_closures.dart:8:5: Error: Can't infer the type of 'x': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x = /*@returnType=dynamic*/ () =>
-//                                                                   ^
+// var x = /*@returnType=invalid-type*/ () => y;
+//     ^
 //
 import self as self;
 
-static field dynamic x = () → dynamic => self::y;
-static field dynamic y = () → dynamic => self::x;
+static field invalid-type x = (() → invalid-type => self::y) as{TypeError} invalid-type;
+static field invalid-type y = (() → invalid-type => self::x) as{TypeError} invalid-type;
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/circular_reference_via_closures.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/circular_reference_via_closures.dart.strong.transformed.expect
index 5b3b71c..73adfd1 100644
--- a/pkg/front_end/testcases/inference/circular_reference_via_closures.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/circular_reference_via_closures.dart.strong.transformed.expect
@@ -2,18 +2,18 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/circular_reference_via_closures.dart:10:67: Error: Can't infer the type of 'y': circularity found during type inference.
+// pkg/front_end/testcases/inference/circular_reference_via_closures.dart:9:5: Error: Can't infer the type of 'y': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ y = /*@returnType=dynamic*/ () =>
-//                                                                   ^
+// var y = /*@returnType=invalid-type*/ () => x;
+//     ^
 //
-// pkg/front_end/testcases/inference/circular_reference_via_closures.dart:8:67: Error: Can't infer the type of 'x': circularity found during type inference.
+// pkg/front_end/testcases/inference/circular_reference_via_closures.dart:8:5: Error: Can't infer the type of 'x': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x = /*@returnType=dynamic*/ () =>
-//                                                                   ^
+// var x = /*@returnType=invalid-type*/ () => y;
+//     ^
 //
 import self as self;
 
-static field dynamic x = () → dynamic => self::y;
-static field dynamic y = () → dynamic => self::x;
+static field invalid-type x = (() → invalid-type => self::y) as{TypeError} invalid-type;
+static field invalid-type y = (() → invalid-type => self::x) as{TypeError} invalid-type;
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart b/pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart
index 2e499a1..b63fb9a 100644
--- a/pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart
+++ b/pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart
@@ -2,12 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
-var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x = /*@returnType=dynamic*/ () =>
-    y;
-var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ y = /*@returnType=dynamic*/ () =>
-    x;
+var x = /*@returnType=invalid-type*/ () => y;
+var y = /*@returnType=invalid-type*/ () => x;
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart.strong.expect b/pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart.strong.expect
index a4e4a26..4f81f83 100644
--- a/pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart.strong.expect
@@ -2,18 +2,18 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart:10:67: Error: Can't infer the type of 'y': circularity found during type inference.
+// pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart:9:5: Error: Can't infer the type of 'y': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ y = /*@returnType=dynamic*/ () =>
-//                                                                   ^
+// var y = /*@returnType=invalid-type*/ () => x;
+//     ^
 //
-// pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart:8:67: Error: Can't infer the type of 'x': circularity found during type inference.
+// pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart:8:5: Error: Can't infer the type of 'x': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x = /*@returnType=dynamic*/ () =>
-//                                                                   ^
+// var x = /*@returnType=invalid-type*/ () => y;
+//     ^
 //
 import self as self;
 
-static field dynamic x = () → dynamic => self::y;
-static field dynamic y = () → dynamic => self::x;
+static field invalid-type x = (() → invalid-type => self::y) as{TypeError} invalid-type;
+static field invalid-type y = (() → invalid-type => self::x) as{TypeError} invalid-type;
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart.strong.transformed.expect
index a4e4a26..4f81f83 100644
--- a/pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart.strong.transformed.expect
@@ -2,18 +2,18 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart:10:67: Error: Can't infer the type of 'y': circularity found during type inference.
+// pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart:9:5: Error: Can't infer the type of 'y': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ y = /*@returnType=dynamic*/ () =>
-//                                                                   ^
+// var y = /*@returnType=invalid-type*/ () => x;
+//     ^
 //
-// pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart:8:67: Error: Can't infer the type of 'x': circularity found during type inference.
+// pkg/front_end/testcases/inference/circular_reference_via_closures_initializer_types.dart:8:5: Error: Can't infer the type of 'x': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x = /*@returnType=dynamic*/ () =>
-//                                                                   ^
+// var x = /*@returnType=invalid-type*/ () => y;
+//     ^
 //
 import self as self;
 
-static field dynamic x = () → dynamic => self::y;
-static field dynamic y = () → dynamic => self::x;
+static field invalid-type x = (() → invalid-type => self::y) as{TypeError} invalid-type;
+static field invalid-type y = (() → invalid-type => self::x) as{TypeError} invalid-type;
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/conditional_lub.dart b/pkg/front_end/testcases/inference/conditional_lub.dart
index cab1316..a6b43a6 100644
--- a/pkg/front_end/testcases/inference/conditional_lub.dart
+++ b/pkg/front_end/testcases/inference/conditional_lub.dart
@@ -8,7 +8,7 @@
 bool b = true;
 int x = 0;
 double y = 0.0;
-var /*@topType=num*/ z = b ? x : y;
+var z = b ? x : y;
 
 main() {
   var /*@type=num*/ z = b ? x : y;
diff --git a/pkg/front_end/testcases/inference/conflicting_fields.dart b/pkg/front_end/testcases/inference/conflicting_fields.dart
new file mode 100644
index 0000000..72edc67
--- /dev/null
+++ b/pkg/front_end/testcases/inference/conflicting_fields.dart
@@ -0,0 +1,22 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/*@testedFeatures=inference*/
+
+class A {
+  dynamic field1;
+  int field2;
+}
+
+class I {
+  int field1;
+  dynamic field2;
+}
+
+class B extends A implements I {
+  get field1 => null;
+  get field2 => null;
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/inference/conflicting_fields.dart.hierarchy.expect b/pkg/front_end/testcases/inference/conflicting_fields.dart.hierarchy.expect
new file mode 100644
index 0000000..058c190
--- /dev/null
+++ b/pkg/front_end/testcases/inference/conflicting_fields.dart.hierarchy.expect
@@ -0,0 +1,99 @@
+Object:
+  superclasses:
+  interfaces:
+  classMembers:
+    Object._haveSameRuntimeType
+    Object.toString
+    Object.runtimeType
+    Object._toString
+    Object._simpleInstanceOf
+    Object._hashCodeRnd
+    Object._instanceOf
+    Object.noSuchMethod
+    Object._objectHashCode
+    Object._identityHashCode
+    Object.hashCode
+    Object._simpleInstanceOfFalse
+    Object._simpleInstanceOfTrue
+    Object.==
+  classSetters:
+
+A:
+  superclasses:
+    Object
+  interfaces:
+  classMembers:
+    A.field1
+    Object.toString
+    A.field2
+    Object.runtimeType
+    Object._simpleInstanceOf
+    Object._instanceOf
+    Object.noSuchMethod
+    Object._identityHashCode
+    Object.hashCode
+    Object._simpleInstanceOfFalse
+    Object._simpleInstanceOfTrue
+    Object.==
+  classSetters:
+    A.field1
+    A.field2
+
+I:
+  superclasses:
+    Object
+  interfaces:
+  classMembers:
+    I.field1
+    Object.toString
+    I.field2
+    Object.runtimeType
+    Object._simpleInstanceOf
+    Object._instanceOf
+    Object.noSuchMethod
+    Object._identityHashCode
+    Object.hashCode
+    Object._simpleInstanceOfFalse
+    Object._simpleInstanceOfTrue
+    Object.==
+  classSetters:
+    I.field1
+    I.field2
+
+B:
+  superclasses:
+    Object
+      -> A
+  interfaces: I
+  classMembers:
+    B.field1
+    Object.toString
+    B.field2
+    Object.runtimeType
+    Object._simpleInstanceOf
+    Object._instanceOf
+    Object.noSuchMethod
+    Object._identityHashCode
+    Object.hashCode
+    Object._simpleInstanceOfFalse
+    Object._simpleInstanceOfTrue
+    Object.==
+  classSetters:
+    A.field1
+    A.field2
+  interfaceMembers:
+    B.field1
+    Object.toString
+    B.field2
+    Object.runtimeType
+    Object._simpleInstanceOf
+    Object._instanceOf
+    Object.noSuchMethod
+    Object._identityHashCode
+    Object.hashCode
+    Object._simpleInstanceOfFalse
+    Object._simpleInstanceOfTrue
+    Object.==
+  interfaceSetters:
+    A.field1
+    A.field2
diff --git a/pkg/front_end/testcases/inference/conflicting_fields.dart.legacy.expect b/pkg/front_end/testcases/inference/conflicting_fields.dart.legacy.expect
new file mode 100644
index 0000000..67e1ae7
--- /dev/null
+++ b/pkg/front_end/testcases/inference/conflicting_fields.dart.legacy.expect
@@ -0,0 +1,28 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  field dynamic field1 = null;
+  field core::int field2 = null;
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+class I extends core::Object {
+  field core::int field1 = null;
+  field dynamic field2 = null;
+  synthetic constructor •() → self::I
+    : super core::Object::•()
+    ;
+}
+class B extends self::A implements self::I {
+  synthetic constructor •() → self::B
+    : super self::A::•()
+    ;
+  get field1() → dynamic
+    return null;
+  get field2() → dynamic
+    return null;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/conflicting_fields.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/conflicting_fields.dart.legacy.transformed.expect
new file mode 100644
index 0000000..67e1ae7
--- /dev/null
+++ b/pkg/front_end/testcases/inference/conflicting_fields.dart.legacy.transformed.expect
@@ -0,0 +1,28 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  field dynamic field1 = null;
+  field core::int field2 = null;
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+class I extends core::Object {
+  field core::int field1 = null;
+  field dynamic field2 = null;
+  synthetic constructor •() → self::I
+    : super core::Object::•()
+    ;
+}
+class B extends self::A implements self::I {
+  synthetic constructor •() → self::B
+    : super self::A::•()
+    ;
+  get field1() → dynamic
+    return null;
+  get field2() → dynamic
+    return null;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/conflicting_fields.dart.outline.expect b/pkg/front_end/testcases/inference/conflicting_fields.dart.outline.expect
new file mode 100644
index 0000000..6963ff2
--- /dev/null
+++ b/pkg/front_end/testcases/inference/conflicting_fields.dart.outline.expect
@@ -0,0 +1,26 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  field dynamic field1;
+  field core::int field2;
+  synthetic constructor •() → self::A
+    ;
+}
+class I extends core::Object {
+  field core::int field1;
+  field dynamic field2;
+  synthetic constructor •() → self::I
+    ;
+}
+class B extends self::A implements self::I {
+  synthetic constructor •() → self::B
+    ;
+  get field1() → dynamic
+    ;
+  get field2() → dynamic
+    ;
+}
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/inference/conflicting_fields.dart.strong.expect b/pkg/front_end/testcases/inference/conflicting_fields.dart.strong.expect
new file mode 100644
index 0000000..3f45ef6
--- /dev/null
+++ b/pkg/front_end/testcases/inference/conflicting_fields.dart.strong.expect
@@ -0,0 +1,69 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/inference/conflicting_fields.dart:18:7: Error: Can't infer a type for 'field1' as some of the inherited members have different types.
+// Try adding an explicit type.
+//   get field1 => null;
+//       ^
+//
+// pkg/front_end/testcases/inference/conflicting_fields.dart:19:7: Error: Can't infer a type for 'field2' as some of the inherited members have different types.
+// Try adding an explicit type.
+//   get field2 => null;
+//       ^
+//
+// pkg/front_end/testcases/inference/conflicting_fields.dart:19:7: Error: The return type of the method 'B.field2' is 'dynamic', which does not match the return type, 'int', of the overridden method, 'A.field2'.
+// Change to a subtype of 'int'.
+//   get field2 => null;
+//       ^
+// pkg/front_end/testcases/inference/conflicting_fields.dart:9:7: Context: This is the overridden method ('field2').
+//   int field2;
+//       ^
+//
+// pkg/front_end/testcases/inference/conflicting_fields.dart:18:7: Error: The return type of the method 'B.field1' is 'dynamic', which does not match the return type, 'int', of the overridden method, 'I.field1'.
+// Change to a subtype of 'int'.
+//   get field1 => null;
+//       ^
+// pkg/front_end/testcases/inference/conflicting_fields.dart:13:7: Context: This is the overridden method ('field1').
+//   int field1;
+//       ^
+//
+// pkg/front_end/testcases/inference/conflicting_fields.dart:8:11: Error: The return type of the method 'A.field1' is 'dynamic', which does not match the return type, 'int', of the overridden method, 'I.field1'.
+// Change to a subtype of 'int'.
+//   dynamic field1;
+//           ^
+// pkg/front_end/testcases/inference/conflicting_fields.dart:13:7: Context: This is the overridden method ('field1').
+//   int field1;
+//       ^
+// pkg/front_end/testcases/inference/conflicting_fields.dart:17:7: Context: Both members are inherited by the non-abstract class 'B'.
+// class B extends A implements I {
+//       ^
+//
+import self as self;
+import "dart:core" as core;
+
+class A extends core::Object {
+  field dynamic field1 = null;
+  field core::int field2 = null;
+  synthetic constructor •() → self::A
+    : super core::Object::•()
+    ;
+}
+class I extends core::Object {
+  field core::int field1 = null;
+  field dynamic field2 = null;
+  synthetic constructor •() → self::I
+    : super core::Object::•()
+    ;
+}
+class B extends self::A implements self::I {
+  synthetic constructor •() → self::B
+    : super self::A::•()
+    ;
+  get field1() → dynamic
+    return null;
+  get field2() → dynamic
+    return null;
+  abstract forwarding-stub set field2(dynamic _) → void;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/conflicts_can_happen.dart b/pkg/front_end/testcases/inference/conflicts_can_happen.dart
index ce73f69..6679d6e 100644
--- a/pkg/front_end/testcases/inference/conflicts_can_happen.dart
+++ b/pkg/front_end/testcases/inference/conflicts_can_happen.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 class I1 {
@@ -22,14 +22,12 @@
 }
 
 class C1 implements A, B {
-  get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a =>
-      null;
+  get a => null;
 }
 
 // Still ambiguous
 class C2 implements B, A {
-  get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a =>
-      null;
+  get a => null;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/conflicts_can_happen.dart.strong.expect b/pkg/front_end/testcases/inference/conflicts_can_happen.dart.strong.expect
index 1812788..6e8c47d 100644
--- a/pkg/front_end/testcases/inference/conflicts_can_happen.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/conflicts_can_happen.dart.strong.expect
@@ -2,48 +2,48 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/conflicts_can_happen.dart:25:163: Error: Can't infer the type of 'a': overridden members must all have the same type.
-// Specify the type explicitly.
-//   get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a =>
-//                                                                                                                                                                   ^
+// pkg/front_end/testcases/inference/conflicts_can_happen.dart:25:7: Error: Can't infer a type for 'a' as some of the inherited members have different types.
+// Try adding an explicit type.
+//   get a => null;
+//       ^
 //
-// pkg/front_end/testcases/inference/conflicts_can_happen.dart:31:163: Error: Can't infer the type of 'a': overridden members must all have the same type.
-// Specify the type explicitly.
-//   get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a =>
-//                                                                                                                                                                   ^
+// pkg/front_end/testcases/inference/conflicts_can_happen.dart:30:7: Error: Can't infer a type for 'a' as some of the inherited members have different types.
+// Try adding an explicit type.
+//   get a => null;
+//       ^
 //
-// pkg/front_end/testcases/inference/conflicts_can_happen.dart:25:163: Error: The return type of the method 'C1.a' is 'dynamic', which does not match the return type of the overridden method, 'I1'.
+// pkg/front_end/testcases/inference/conflicts_can_happen.dart:25:7: Error: The return type of the method 'C1.a' is 'dynamic', which does not match the return type, 'I1', of the overridden method, 'A.a'.
 //  - 'I1' is from 'pkg/front_end/testcases/inference/conflicts_can_happen.dart'.
 // Change to a subtype of 'I1'.
-//   get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a =>
-//                                                                                                                                                                   ^
+//   get a => null;
+//       ^
 // pkg/front_end/testcases/inference/conflicts_can_happen.dart:17:12: Context: This is the overridden method ('a').
 //   final I1 a = null;
 //            ^
 //
-// pkg/front_end/testcases/inference/conflicts_can_happen.dart:25:163: Error: The return type of the method 'C1.a' is 'dynamic', which does not match the return type of the overridden method, 'I2'.
+// pkg/front_end/testcases/inference/conflicts_can_happen.dart:25:7: Error: The return type of the method 'C1.a' is 'dynamic', which does not match the return type, 'I2', of the overridden method, 'B.a'.
 //  - 'I2' is from 'pkg/front_end/testcases/inference/conflicts_can_happen.dart'.
 // Change to a subtype of 'I2'.
-//   get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a =>
-//                                                                                                                                                                   ^
+//   get a => null;
+//       ^
 // pkg/front_end/testcases/inference/conflicts_can_happen.dart:21:12: Context: This is the overridden method ('a').
 //   final I2 a = null;
 //            ^
 //
-// pkg/front_end/testcases/inference/conflicts_can_happen.dart:31:163: Error: The return type of the method 'C2.a' is 'dynamic', which does not match the return type of the overridden method, 'I2'.
+// pkg/front_end/testcases/inference/conflicts_can_happen.dart:30:7: Error: The return type of the method 'C2.a' is 'dynamic', which does not match the return type, 'I2', of the overridden method, 'B.a'.
 //  - 'I2' is from 'pkg/front_end/testcases/inference/conflicts_can_happen.dart'.
 // Change to a subtype of 'I2'.
-//   get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a =>
-//                                                                                                                                                                   ^
+//   get a => null;
+//       ^
 // pkg/front_end/testcases/inference/conflicts_can_happen.dart:21:12: Context: This is the overridden method ('a').
 //   final I2 a = null;
 //            ^
 //
-// pkg/front_end/testcases/inference/conflicts_can_happen.dart:31:163: Error: The return type of the method 'C2.a' is 'dynamic', which does not match the return type of the overridden method, 'I1'.
+// pkg/front_end/testcases/inference/conflicts_can_happen.dart:30:7: Error: The return type of the method 'C2.a' is 'dynamic', which does not match the return type, 'I1', of the overridden method, 'A.a'.
 //  - 'I1' is from 'pkg/front_end/testcases/inference/conflicts_can_happen.dart'.
 // Change to a subtype of 'I1'.
-//   get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a =>
-//                                                                                                                                                                   ^
+//   get a => null;
+//       ^
 // pkg/front_end/testcases/inference/conflicts_can_happen.dart:17:12: Context: This is the overridden method ('a').
 //   final I1 a = null;
 //            ^
diff --git a/pkg/front_end/testcases/inference/conflicts_can_happen2.dart b/pkg/front_end/testcases/inference/conflicts_can_happen2.dart
index 150baa5..65a929e 100644
--- a/pkg/front_end/testcases/inference/conflicts_can_happen2.dart
+++ b/pkg/front_end/testcases/inference/conflicts_can_happen2.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 class I1 {
@@ -31,8 +31,7 @@
 }
 
 class C2 implements A, B {
-  get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a =>
-      null;
+  get a => null;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/conflicts_can_happen2.dart.strong.expect b/pkg/front_end/testcases/inference/conflicts_can_happen2.dart.strong.expect
index 9b5a480..411506a 100644
--- a/pkg/front_end/testcases/inference/conflicts_can_happen2.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/conflicts_can_happen2.dart.strong.expect
@@ -2,25 +2,25 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/conflicts_can_happen2.dart:34:163: Error: Can't infer the type of 'a': overridden members must all have the same type.
-// Specify the type explicitly.
-//   get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a =>
-//                                                                                                                                                                   ^
+// pkg/front_end/testcases/inference/conflicts_can_happen2.dart:34:7: Error: Can't infer a type for 'a' as some of the inherited members have different types.
+// Try adding an explicit type.
+//   get a => null;
+//       ^
 //
-// pkg/front_end/testcases/inference/conflicts_can_happen2.dart:34:163: Error: The return type of the method 'C2.a' is 'dynamic', which does not match the return type of the overridden method, 'I1'.
+// pkg/front_end/testcases/inference/conflicts_can_happen2.dart:34:7: Error: The return type of the method 'C2.a' is 'dynamic', which does not match the return type, 'I1', of the overridden method, 'A.a'.
 //  - 'I1' is from 'pkg/front_end/testcases/inference/conflicts_can_happen2.dart'.
 // Change to a subtype of 'I1'.
-//   get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a =>
-//                                                                                                                                                                   ^
+//   get a => null;
+//       ^
 // pkg/front_end/testcases/inference/conflicts_can_happen2.dart:22:12: Context: This is the overridden method ('a').
 //   final I1 a = null;
 //            ^
 //
-// pkg/front_end/testcases/inference/conflicts_can_happen2.dart:34:163: Error: The return type of the method 'C2.a' is 'dynamic', which does not match the return type of the overridden method, 'I2'.
+// pkg/front_end/testcases/inference/conflicts_can_happen2.dart:34:7: Error: The return type of the method 'C2.a' is 'dynamic', which does not match the return type, 'I2', of the overridden method, 'B.a'.
 //  - 'I2' is from 'pkg/front_end/testcases/inference/conflicts_can_happen2.dart'.
 // Change to a subtype of 'I2'.
-//   get /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ a =>
-//                                                                                                                                                                   ^
+//   get a => null;
+//       ^
 // pkg/front_end/testcases/inference/conflicts_can_happen2.dart:26:12: Context: This is the overridden method ('a').
 //   final I2 a = null;
 //            ^
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments.dart.legacy.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments.dart.legacy.expect
index 67e376b..afd777c 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments.dart.legacy.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T t;
+  generic-covariant-impl field self::C::T t;
   constructor •(self::C::T t) → self::C<self::C::T>
     : self::C::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments.dart.legacy.transformed.expect
index 67e376b..afd777c 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments.dart.legacy.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T t;
+  generic-covariant-impl field self::C::T t;
   constructor •(self::C::T t) → self::C<self::C::T>
     : self::C::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory.dart.legacy.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory.dart.legacy.expect
index e84c59d..3a5a56b 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory.dart.legacy.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T t = null;
+  generic-covariant-impl field self::C::T t = null;
   constructor _() → self::C<self::C::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory.dart.legacy.transformed.expect
index e84c59d..3a5a56b 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory.dart.legacy.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T t = null;
+  generic-covariant-impl field self::C::T t = null;
   constructor _() → self::C<self::C::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory_calls_constructor.dart.legacy.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory_calls_constructor.dart.legacy.expect
index 0e2824f0..523f87e 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory_calls_constructor.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory_calls_constructor.dart.legacy.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class A<T extends core::Object = dynamic> extends core::Object {
-  field self::A<self::A::T> f = new self::A::•<dynamic>();
+  generic-covariant-impl field self::A<self::A::T> f = new self::A::•<dynamic>();
   constructor •() → self::A<self::A::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory_calls_constructor.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory_calls_constructor.dart.legacy.transformed.expect
index 0e2824f0..523f87e 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory_calls_constructor.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_factory_calls_constructor.dart.legacy.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class A<T extends core::Object = dynamic> extends core::Object {
-  field self::A<self::A::T> f = new self::A::•<dynamic>();
+  generic-covariant-impl field self::A<self::A::T> f = new self::A::•<dynamic>();
   constructor •() → self::A<self::A::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named.dart.legacy.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named.dart.legacy.expect
index 3aaa8b1..12938f7 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named.dart.legacy.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T t = null;
+  generic-covariant-impl field self::C::T t = null;
   constructor named(core::List<self::C::T> t) → self::C<self::C::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named.dart.legacy.transformed.expect
index 3aaa8b1..12938f7 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named.dart.legacy.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T t = null;
+  generic-covariant-impl field self::C::T t = null;
   constructor named(core::List<self::C::T> t) → self::C<self::C::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named_factory.dart.legacy.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named_factory.dart.legacy.expect
index 4761f0f..d35dcf3 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named_factory.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named_factory.dart.legacy.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T t = null;
+  generic-covariant-impl field self::C::T t = null;
   constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named_factory.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named_factory.dart.legacy.transformed.expect
index 4761f0f..d35dcf3 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named_factory.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_named_factory.dart.legacy.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T t = null;
+  generic-covariant-impl field self::C::T t = null;
   constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting.dart.legacy.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting.dart.legacy.expect
index 0dd3c05..6ad8fb3 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting.dart.legacy.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T t;
+  generic-covariant-impl field self::C::T t;
   constructor •(self::C::T t) → self::C<self::C::T>
     : self::C::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting.dart.legacy.transformed.expect
index 0dd3c05..6ad8fb3 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting.dart.legacy.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T t;
+  generic-covariant-impl field self::C::T t;
   constructor •(self::C::T t) → self::C<self::C::T>
     : self::C::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory.dart.legacy.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory.dart.legacy.expect
index 8b7170d..a9f6850 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory.dart.legacy.expect
@@ -5,12 +5,12 @@
 abstract class C<T extends core::Object = dynamic> extends core::Object {
   static field dynamic _redirecting# = <dynamic>[self::C::•];
   abstract get t() → self::C::T;
-  abstract set t(self::C::T x) → void;
+  abstract set t(generic-covariant-impl self::C::T x) → void;
   static factory •<T extends core::Object = dynamic>(self::C::•::T t) → self::C<self::C::•::T>
     let dynamic #redirecting_factory = self::CImpl::• in let self::C::•::T #typeArg0 = null in invalid-expression;
 }
 class CImpl<T extends core::Object = dynamic> extends core::Object implements self::C<self::CImpl::T> {
-  field self::CImpl::T t;
+  generic-covariant-impl field self::CImpl::T t;
   constructor •(self::CImpl::T t) → self::CImpl<self::CImpl::T>
     : self::CImpl::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory.dart.legacy.transformed.expect
index 8b7170d..a9f6850 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory.dart.legacy.transformed.expect
@@ -5,12 +5,12 @@
 abstract class C<T extends core::Object = dynamic> extends core::Object {
   static field dynamic _redirecting# = <dynamic>[self::C::•];
   abstract get t() → self::C::T;
-  abstract set t(self::C::T x) → void;
+  abstract set t(generic-covariant-impl self::C::T x) → void;
   static factory •<T extends core::Object = dynamic>(self::C::•::T t) → self::C<self::C::•::T>
     let dynamic #redirecting_factory = self::CImpl::• in let self::C::•::T #typeArg0 = null in invalid-expression;
 }
 class CImpl<T extends core::Object = dynamic> extends core::Object implements self::C<self::CImpl::T> {
-  field self::CImpl::T t;
+  generic-covariant-impl field self::CImpl::T t;
   constructor •(self::CImpl::T t) → self::CImpl<self::CImpl::T>
     : self::CImpl::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.hierarchy.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.hierarchy.expect
index 0590bd0..10cabb6 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.hierarchy.expect
@@ -40,6 +40,7 @@
     C._redirecting#
 
 CImpl:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: C<T>
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.legacy.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.legacy.expect
index 2efa6f7..c8c111e 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.legacy.expect
@@ -5,12 +5,12 @@
 abstract class C<T extends core::Object = dynamic> extends core::Object {
   static field dynamic _redirecting# = <dynamic>[self::C::•];
   abstract get t() → self::C::T;
-  abstract set t(self::C::T x) → void;
+  abstract set t(generic-covariant-impl self::C::T x) → void;
   static factory •<T extends core::Object = dynamic>(self::C::•::T t) → self::C<self::C::•::T>
     let dynamic #redirecting_factory = self::CImpl::• in let self::C::•::T #typeArg0 = null in invalid-expression;
 }
 class CImpl<T extends core::Object = dynamic> extends core::Object implements self::C<self::CImpl::T> {
-  field self::CImpl::T t;
+  generic-covariant-impl field self::CImpl::T t;
   constructor _(self::CImpl::T t) → self::CImpl<self::CImpl::T>
     : self::CImpl::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.legacy.transformed.expect
index 2efa6f7..c8c111e 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.legacy.transformed.expect
@@ -5,12 +5,12 @@
 abstract class C<T extends core::Object = dynamic> extends core::Object {
   static field dynamic _redirecting# = <dynamic>[self::C::•];
   abstract get t() → self::C::T;
-  abstract set t(self::C::T x) → void;
+  abstract set t(generic-covariant-impl self::C::T x) → void;
   static factory •<T extends core::Object = dynamic>(self::C::•::T t) → self::C<self::C::•::T>
     let dynamic #redirecting_factory = self::CImpl::• in let self::C::•::T #typeArg0 = null in invalid-expression;
 }
 class CImpl<T extends core::Object = dynamic> extends core::Object implements self::C<self::CImpl::T> {
-  field self::CImpl::T t;
+  generic-covariant-impl field self::CImpl::T t;
   constructor _(self::CImpl::T t) → self::CImpl<self::CImpl::T>
     : self::CImpl::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.outline.expect b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.outline.expect
index 579d4cf..2385460 100644
--- a/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/constructors_infer_from_arguments_redirecting_factory_to_factory.dart.outline.expect
@@ -5,12 +5,12 @@
 abstract class C<T extends core::Object = dynamic> extends core::Object {
   static field dynamic _redirecting# = <dynamic>[self::C::•];
   abstract get t() → self::C::T;
-  abstract set t(self::C::T x) → void;
+  abstract set t(generic-covariant-impl self::C::T x) → void;
   static factory •<T extends core::Object = dynamic>(self::C::•::T t) → self::C<self::C::•::T>
     let dynamic #redirecting_factory = self::CImpl::• in let self::C::•::T #typeArg0 = null in invalid-expression;
 }
 class CImpl<T extends core::Object = dynamic> extends core::Object implements self::C<self::CImpl::T> {
-  field self::CImpl::T t;
+  generic-covariant-impl field self::CImpl::T t;
   constructor _(self::CImpl::T t) → self::CImpl<self::CImpl::T>
     ;
   static factory •<T extends core::Object = dynamic>(self::CImpl::•::T t) → self::CImpl<self::CImpl::•::T>
diff --git a/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.legacy.expect b/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.legacy.expect
index c5caad7..e3c5f4a 100644
--- a/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.legacy.expect
@@ -8,8 +8,8 @@
     ;
 }
 class Pair<T extends self::Clonable<self::Pair::T> = dynamic, U extends self::Clonable<self::Pair::U> = dynamic> extends core::Object {
-  field self::Pair::T t;
-  field self::Pair::U u;
+  generic-covariant-impl field self::Pair::T t;
+  generic-covariant-impl field self::Pair::U u;
   constructor •(self::Pair::T t, self::Pair::U u) → self::Pair<self::Pair::T, self::Pair::U>
     : self::Pair::t = t, self::Pair::u = u, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.legacy.transformed.expect
index c5caad7..e3c5f4a 100644
--- a/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.legacy.transformed.expect
@@ -8,8 +8,8 @@
     ;
 }
 class Pair<T extends self::Clonable<self::Pair::T> = dynamic, U extends self::Clonable<self::Pair::U> = dynamic> extends core::Object {
-  field self::Pair::T t;
-  field self::Pair::U u;
+  generic-covariant-impl field self::Pair::T t;
+  generic-covariant-impl field self::Pair::U u;
   constructor •(self::Pair::T t, self::Pair::U u) → self::Pair<self::Pair::T, self::Pair::U>
     : self::Pair::t = t, self::Pair::u = u, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.outline.expect b/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.outline.expect
index 006b8a2..8337c9e 100644
--- a/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/constructors_inference_f_bounded.dart.outline.expect
@@ -7,8 +7,8 @@
     ;
 }
 class Pair<T extends self::Clonable<self::Pair::T> = dynamic, U extends self::Clonable<self::Pair::U> = dynamic> extends core::Object {
-  field self::Pair::T t;
-  field self::Pair::U u;
+  generic-covariant-impl field self::Pair::T t;
+  generic-covariant-impl field self::Pair::U u;
   constructor •(self::Pair::T t, self::Pair::U u) → self::Pair<self::Pair::T, self::Pair::U>
     ;
   constructor _() → self::Pair<self::Pair::T, self::Pair::U>
diff --git a/pkg/front_end/testcases/inference/constructors_reverse_type_parameters.dart.legacy.expect b/pkg/front_end/testcases/inference/constructors_reverse_type_parameters.dart.legacy.expect
index 65cb4b4..0a86feb 100644
--- a/pkg/front_end/testcases/inference/constructors_reverse_type_parameters.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/constructors_reverse_type_parameters.dart.legacy.expect
@@ -3,8 +3,8 @@
 import "dart:core" as core;
 
 class Pair<T extends core::Object = dynamic, U extends core::Object = dynamic> extends core::Object {
-  field self::Pair::T t;
-  field self::Pair::U u;
+  generic-covariant-impl field self::Pair::T t;
+  generic-covariant-impl field self::Pair::U u;
   constructor •(self::Pair::T t, self::Pair::U u) → self::Pair<self::Pair::T, self::Pair::U>
     : self::Pair::t = t, self::Pair::u = u, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/constructors_reverse_type_parameters.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/constructors_reverse_type_parameters.dart.legacy.transformed.expect
index 65cb4b4..0a86feb 100644
--- a/pkg/front_end/testcases/inference/constructors_reverse_type_parameters.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/constructors_reverse_type_parameters.dart.legacy.transformed.expect
@@ -3,8 +3,8 @@
 import "dart:core" as core;
 
 class Pair<T extends core::Object = dynamic, U extends core::Object = dynamic> extends core::Object {
-  field self::Pair::T t;
-  field self::Pair::U u;
+  generic-covariant-impl field self::Pair::T t;
+  generic-covariant-impl field self::Pair::U u;
   constructor •(self::Pair::T t, self::Pair::U u) → self::Pair<self::Pair::T, self::Pair::U>
     : self::Pair::t = t, self::Pair::u = u, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/do_not_infer_overridden_fields_that_explicitly_say_dynamic_infer.dart.strong.expect b/pkg/front_end/testcases/inference/do_not_infer_overridden_fields_that_explicitly_say_dynamic_infer.dart.strong.expect
index a20bdce..278c138 100644
--- a/pkg/front_end/testcases/inference/do_not_infer_overridden_fields_that_explicitly_say_dynamic_infer.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/do_not_infer_overridden_fields_that_explicitly_say_dynamic_infer.dart.strong.expect
@@ -2,7 +2,7 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/do_not_infer_overridden_fields_that_explicitly_say_dynamic_infer.dart:13:49: Error: The return type of the method 'B.x' is 'dynamic', which does not match the return type of the overridden method, 'int'.
+// pkg/front_end/testcases/inference/do_not_infer_overridden_fields_that_explicitly_say_dynamic_infer.dart:13:49: Error: The return type of the method 'B.x' is 'dynamic', which does not match the return type, 'int', of the overridden method, 'A.x'.
 // Change to a subtype of 'int'.
 //   /*error:INVALID_METHOD_OVERRIDE*/ dynamic get x => 3;
 //                                                 ^
diff --git a/pkg/front_end/testcases/inference/dont_infer_field_type_when_initializer_is_null.dart b/pkg/front_end/testcases/inference/dont_infer_field_type_when_initializer_is_null.dart
index ee8b2d1..3eacb18 100644
--- a/pkg/front_end/testcases/inference/dont_infer_field_type_when_initializer_is_null.dart
+++ b/pkg/front_end/testcases/inference/dont_infer_field_type_when_initializer_is_null.dart
@@ -5,15 +5,15 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=dynamic*/ x = null;
-var /*@topType=int*/ y = 3;
+var x = null;
+var y = 3;
 
 class A {
-  static var /*@topType=dynamic*/ x = null;
-  static var /*@topType=int*/ y = 3;
+  static var x = null;
+  static var y = 3;
 
-  var /*@topType=dynamic*/ x2 = null;
-  var /*@topType=int*/ y2 = 3;
+  var x2 = null;
+  var y2 = 3;
 }
 
 main() {
diff --git a/pkg/front_end/testcases/inference/downwards_context_from_inferred_field_type.dart b/pkg/front_end/testcases/inference/downwards_context_from_inferred_field_type.dart
index 3d735e5..a2a520c 100644
--- a/pkg/front_end/testcases/inference/downwards_context_from_inferred_field_type.dart
+++ b/pkg/front_end/testcases/inference/downwards_context_from_inferred_field_type.dart
@@ -10,7 +10,7 @@
 }
 
 class B implements A {
-  final /*@topType=Iterable<String>*/ foo = /*@typeArgs=String*/ const [];
+  final foo = /*@typeArgs=String*/ const [];
 }
 
 void main() {}
diff --git a/pkg/front_end/testcases/inference/downwards_context_from_inferred_field_type.dart.hierarchy.expect b/pkg/front_end/testcases/inference/downwards_context_from_inferred_field_type.dart.hierarchy.expect
index 824f22f..2549864 100644
--- a/pkg/front_end/testcases/inference/downwards_context_from_inferred_field_type.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/downwards_context_from_inferred_field_type.dart.hierarchy.expect
@@ -37,6 +37,7 @@
   classSetters:
 
 B:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: A
diff --git a/pkg/front_end/testcases/inference/downwards_inference_annotations_class_members.dart b/pkg/front_end/testcases/inference/downwards_inference_annotations_class_members.dart
index 37db38e..239edeb 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_annotations_class_members.dart
+++ b/pkg/front_end/testcases/inference/downwards_inference_annotations_class_members.dart
@@ -14,7 +14,7 @@
   Bar();
 
   @Foo(/*@typeArgs=String*/ const [])
-  var /*@topType=dynamic*/ x;
+  var x;
 
   @Foo(/*@typeArgs=String*/ const [])
   void f();
diff --git a/pkg/front_end/testcases/inference/downwards_inference_annotations_parameter.dart b/pkg/front_end/testcases/inference/downwards_inference_annotations_parameter.dart
index e4a9dea..7b0ab28 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_annotations_parameter.dart
+++ b/pkg/front_end/testcases/inference/downwards_inference_annotations_parameter.dart
@@ -12,7 +12,7 @@
 void f(@Foo(/*@typeArgs=String*/ const []) x) {}
 
 class C {
-  void m(@Foo(/*@typeArgs=String*/ const []) /*@topType=dynamic*/ x) {}
+  void m(@Foo(/*@typeArgs=String*/ const []) x) {}
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/downwards_inference_inside_top_level.dart b/pkg/front_end/testcases/inference/downwards_inference_inside_top_level.dart
index a3abe27..c50d687 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_inside_top_level.dart
+++ b/pkg/front_end/testcases/inference/downwards_inference_inside_top_level.dart
@@ -13,8 +13,7 @@
   B(T x);
 }
 
-var /*@topType=A*/ t1 = new A()
-  .. /*@target=A::b*/ b = new /*@typeArgs=int*/ B(1);
-var /*@topType=List<B<int>>*/ t2 = <B<int>>[new /*@typeArgs=int*/ B(2)];
+var t1 = new A().. /*@target=A::b*/ b = new /*@typeArgs=int*/ B(1);
+var t2 = <B<int>>[new /*@typeArgs=int*/ B(2)];
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/downwards_inference_inside_top_level_2.dart b/pkg/front_end/testcases/inference/downwards_inference_inside_top_level_2.dart
index 6d4662c..aec027f 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_inside_top_level_2.dart
+++ b/pkg/front_end/testcases/inference/downwards_inference_inside_top_level_2.dart
@@ -9,6 +9,6 @@
   A(T x);
 }
 
-var /*@topType=List<A<int>>*/ t1 = <A<int>>[new /*@typeArgs=int*/ A(1)];
+var t1 = <A<int>>[new /*@typeArgs=int*/ A(1)];
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/downwards_inference_on_instance_creations_infer_downwards.dart.legacy.expect b/pkg/front_end/testcases/inference/downwards_inference_on_instance_creations_infer_downwards.dart.legacy.expect
index c462d74..c641be2 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_on_instance_creations_infer_downwards.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/downwards_inference_on_instance_creations_infer_downwards.dart.legacy.expect
@@ -3,8 +3,8 @@
 import "dart:core" as core;
 
 class A<S extends core::Object = dynamic, T extends core::Object = dynamic> extends core::Object {
-  field self::A::S x;
-  field self::A::T y;
+  generic-covariant-impl field self::A::S x;
+  generic-covariant-impl field self::A::T y;
   constructor •(self::A::S x, self::A::T y) → self::A<self::A::S, self::A::T>
     : self::A::x = x, self::A::y = y, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/downwards_inference_on_instance_creations_infer_downwards.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/downwards_inference_on_instance_creations_infer_downwards.dart.legacy.transformed.expect
index c462d74..c641be2 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_on_instance_creations_infer_downwards.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/downwards_inference_on_instance_creations_infer_downwards.dart.legacy.transformed.expect
@@ -3,8 +3,8 @@
 import "dart:core" as core;
 
 class A<S extends core::Object = dynamic, T extends core::Object = dynamic> extends core::Object {
-  field self::A::S x;
-  field self::A::T y;
+  generic-covariant-impl field self::A::S x;
+  generic-covariant-impl field self::A::T y;
   constructor •(self::A::S x, self::A::T y) → self::A<self::A::S, self::A::T>
     : self::A::x = x, self::A::y = y, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/downwards_inference_on_list_literals_infer_if_value_types_match_context.dart b/pkg/front_end/testcases/inference/downwards_inference_on_list_literals_infer_if_value_types_match_context.dart
index ba11a16..3e0ba76 100644
--- a/pkg/front_end/testcases/inference/downwards_inference_on_list_literals_infer_if_value_types_match_context.dart
+++ b/pkg/front_end/testcases/inference/downwards_inference_on_list_literals_infer_if_value_types_match_context.dart
@@ -21,8 +21,7 @@
   AsserterBuilder<List<Asserter<DartType>>, DartType> assertAOf;
   AsserterBuilder<List<Asserter<DartType>>, DartType> get assertDOf;
 
-  /*@topType=dynamic*/ method(
-      AsserterBuilder<List<Asserter<DartType>>, DartType> assertEOf) {
+  method(AsserterBuilder<List<Asserter<DartType>>, DartType> assertEOf) {
     /*@target=C::assertAOf*/ assertAOf(
         /*@typeArgs=(DartType) -> void*/ [_isInt, _isString]);
     assertBOf(
@@ -40,8 +39,7 @@
   AsserterBuilder<List<Asserter<DartType>>, DartType> assertAOf;
   AsserterBuilder<List<Asserter<DartType>>, DartType> get assertDOf;
 
-  /*@topType=dynamic*/ method(
-      AsserterBuilder<List<Asserter<DartType>>, DartType> assertEOf) {
+  method(AsserterBuilder<List<Asserter<DartType>>, DartType> assertEOf) {
     /*@target=G::assertAOf*/ assertAOf(
         /*@typeArgs=(DartType) -> void*/ [_isInt, _isString]);
     this. /*@target=G::assertAOf*/ assertAOf(
diff --git a/pkg/front_end/testcases/inference/field_initializer_context_implicit.dart b/pkg/front_end/testcases/inference/field_initializer_context_implicit.dart
index e2e94bf..328482d 100644
--- a/pkg/front_end/testcases/inference/field_initializer_context_implicit.dart
+++ b/pkg/front_end/testcases/inference/field_initializer_context_implicit.dart
@@ -8,7 +8,7 @@
 T f<T>() => null;
 
 class C implements B {
-  final /*@topType=int*/ x;
+  final x;
   C() : x = /*@typeArgs=int*/ f();
 }
 
diff --git a/pkg/front_end/testcases/inference/field_initializer_context_implicit.dart.hierarchy.expect b/pkg/front_end/testcases/inference/field_initializer_context_implicit.dart.hierarchy.expect
index 00b2c95..dc148c5 100644
--- a/pkg/front_end/testcases/inference/field_initializer_context_implicit.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/field_initializer_context_implicit.dart.hierarchy.expect
@@ -37,6 +37,7 @@
   classSetters:
 
 C:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: B
diff --git a/pkg/front_end/testcases/inference/field_initializer_parameter.dart b/pkg/front_end/testcases/inference/field_initializer_parameter.dart
index fc2a1fa..f8779f9 100644
--- a/pkg/front_end/testcases/inference/field_initializer_parameter.dart
+++ b/pkg/front_end/testcases/inference/field_initializer_parameter.dart
@@ -8,7 +8,7 @@
 T f<T>(T t) => t;
 
 class C {
-  final /*@topType=dynamic*/ x;
+  final x;
   C(int p) : x = /*@typeArgs=int*/ f(p);
 }
 
diff --git a/pkg/front_end/testcases/inference/field_refers_to_static_getter.dart b/pkg/front_end/testcases/inference/field_refers_to_static_getter.dart
index de4f471..9fa9e35 100644
--- a/pkg/front_end/testcases/inference/field_refers_to_static_getter.dart
+++ b/pkg/front_end/testcases/inference/field_refers_to_static_getter.dart
@@ -6,7 +6,7 @@
 library test;
 
 class C {
-  final /*@topType=int*/ x = _x;
+  final x = _x;
   static int get _x => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/field_refers_to_top_level_getter.dart b/pkg/front_end/testcases/inference/field_refers_to_top_level_getter.dart
index 5bcd783..1a2e6a6 100644
--- a/pkg/front_end/testcases/inference/field_refers_to_top_level_getter.dart
+++ b/pkg/front_end/testcases/inference/field_refers_to_top_level_getter.dart
@@ -6,7 +6,7 @@
 library test;
 
 class C {
-  final /*@topType=int*/ x = y;
+  final x = y;
 }
 
 int get y => null;
diff --git a/pkg/front_end/testcases/inference/future_then.dart b/pkg/front_end/testcases/inference/future_then.dart
index 75782a4..ec52859 100644
--- a/pkg/front_end/testcases/inference/future_then.dart
+++ b/pkg/front_end/testcases/inference/future_then.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(T x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_then.dart.hierarchy.expect b/pkg/front_end/testcases/inference/future_then.dart.hierarchy.expect
index 06d97d1..89a66e0 100644
--- a/pkg/front_end/testcases/inference/future_then.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/future_then.dart.hierarchy.expect
@@ -48,6 +48,7 @@
   classSetters:
 
 MyFuture:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Future<T>
diff --git a/pkg/front_end/testcases/inference/future_then.dart.legacy.expect b/pkg/front_end/testcases/inference/future_then.dart.legacy.expect
index 1d88ee8..88b6639 100644
--- a/pkg/front_end/testcases/inference/future_then.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_then.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then.dart.legacy.transformed.expect
index 4f27ec5..4f440e2 100644
--- a/pkg/front_end/testcases/inference/future_then.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then.dart.outline.expect b/pkg/front_end/testcases/inference/future_then.dart.outline.expect
index 5e26f10..18f6651 100644
--- a/pkg/front_end/testcases/inference/future_then.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_2.dart b/pkg/front_end/testcases/inference/future_then_2.dart
index f5f9def..7dd9d8f 100644
--- a/pkg/front_end/testcases/inference/future_then_2.dart
+++ b/pkg/front_end/testcases/inference/future_then_2.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(T x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_then_2.dart.hierarchy.expect b/pkg/front_end/testcases/inference/future_then_2.dart.hierarchy.expect
index 06d97d1..89a66e0 100644
--- a/pkg/front_end/testcases/inference/future_then_2.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/future_then_2.dart.hierarchy.expect
@@ -48,6 +48,7 @@
   classSetters:
 
 MyFuture:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Future<T>
diff --git a/pkg/front_end/testcases/inference/future_then_2.dart.legacy.expect b/pkg/front_end/testcases/inference/future_then_2.dart.legacy.expect
index 67aa4fb..a91d75e 100644
--- a/pkg/front_end/testcases/inference/future_then_2.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_then_2.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_2.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_2.dart.legacy.transformed.expect
index a9f33b6..6538f9e 100644
--- a/pkg/front_end/testcases/inference/future_then_2.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_2.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_2.dart.outline.expect b/pkg/front_end/testcases/inference/future_then_2.dart.outline.expect
index 5e26f10..18f6651 100644
--- a/pkg/front_end/testcases/inference/future_then_2.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_2.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_3.dart b/pkg/front_end/testcases/inference/future_then_3.dart
index 1b4bfac..59ef995 100644
--- a/pkg/front_end/testcases/inference/future_then_3.dart
+++ b/pkg/front_end/testcases/inference/future_then_3.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(T x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_then_3.dart.hierarchy.expect b/pkg/front_end/testcases/inference/future_then_3.dart.hierarchy.expect
index 06d97d1..89a66e0 100644
--- a/pkg/front_end/testcases/inference/future_then_3.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/future_then_3.dart.hierarchy.expect
@@ -48,6 +48,7 @@
   classSetters:
 
 MyFuture:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Future<T>
diff --git a/pkg/front_end/testcases/inference/future_then_3.dart.legacy.expect b/pkg/front_end/testcases/inference/future_then_3.dart.legacy.expect
index 0f44112..2a3484c 100644
--- a/pkg/front_end/testcases/inference/future_then_3.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_then_3.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_3.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_3.dart.legacy.transformed.expect
index 8bca318..346e77b8 100644
--- a/pkg/front_end/testcases/inference/future_then_3.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_3.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_3.dart.outline.expect b/pkg/front_end/testcases/inference/future_then_3.dart.outline.expect
index 5e26f10..18f6651 100644
--- a/pkg/front_end/testcases/inference/future_then_3.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_3.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_4.dart b/pkg/front_end/testcases/inference/future_then_4.dart
index afc672d..81923b7 100644
--- a/pkg/front_end/testcases/inference/future_then_4.dart
+++ b/pkg/front_end/testcases/inference/future_then_4.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(T x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_then_4.dart.hierarchy.expect b/pkg/front_end/testcases/inference/future_then_4.dart.hierarchy.expect
index 06d97d1..89a66e0 100644
--- a/pkg/front_end/testcases/inference/future_then_4.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/future_then_4.dart.hierarchy.expect
@@ -48,6 +48,7 @@
   classSetters:
 
 MyFuture:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Future<T>
diff --git a/pkg/front_end/testcases/inference/future_then_4.dart.legacy.expect b/pkg/front_end/testcases/inference/future_then_4.dart.legacy.expect
index f659f1f..c7d577e 100644
--- a/pkg/front_end/testcases/inference/future_then_4.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_then_4.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_4.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_4.dart.legacy.transformed.expect
index 56334ca..c90b143 100644
--- a/pkg/front_end/testcases/inference/future_then_4.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_4.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_4.dart.outline.expect b/pkg/front_end/testcases/inference/future_then_4.dart.outline.expect
index 5e26f10..18f6651 100644
--- a/pkg/front_end/testcases/inference/future_then_4.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_4.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_5.dart b/pkg/front_end/testcases/inference/future_then_5.dart
index 2fa4ef8..fbbcd00 100644
--- a/pkg/front_end/testcases/inference/future_then_5.dart
+++ b/pkg/front_end/testcases/inference/future_then_5.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(T x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_then_5.dart.hierarchy.expect b/pkg/front_end/testcases/inference/future_then_5.dart.hierarchy.expect
index 06d97d1..89a66e0 100644
--- a/pkg/front_end/testcases/inference/future_then_5.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/future_then_5.dart.hierarchy.expect
@@ -48,6 +48,7 @@
   classSetters:
 
 MyFuture:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Future<T>
diff --git a/pkg/front_end/testcases/inference/future_then_5.dart.legacy.expect b/pkg/front_end/testcases/inference/future_then_5.dart.legacy.expect
index e9987cb..141e3e7 100644
--- a/pkg/front_end/testcases/inference/future_then_5.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_then_5.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_5.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_5.dart.legacy.transformed.expect
index 25dacbf..33b2911 100644
--- a/pkg/front_end/testcases/inference/future_then_5.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_5.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_5.dart.outline.expect b/pkg/front_end/testcases/inference/future_then_5.dart.outline.expect
index 5e26f10..18f6651 100644
--- a/pkg/front_end/testcases/inference/future_then_5.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_5.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_6.dart b/pkg/front_end/testcases/inference/future_then_6.dart
index 25cb27f..6731ae3 100644
--- a/pkg/front_end/testcases/inference/future_then_6.dart
+++ b/pkg/front_end/testcases/inference/future_then_6.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(T x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_then_6.dart.hierarchy.expect b/pkg/front_end/testcases/inference/future_then_6.dart.hierarchy.expect
index 06d97d1..89a66e0 100644
--- a/pkg/front_end/testcases/inference/future_then_6.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/future_then_6.dart.hierarchy.expect
@@ -48,6 +48,7 @@
   classSetters:
 
 MyFuture:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Future<T>
diff --git a/pkg/front_end/testcases/inference/future_then_6.dart.legacy.expect b/pkg/front_end/testcases/inference/future_then_6.dart.legacy.expect
index 44e0272..cc6a439 100644
--- a/pkg/front_end/testcases/inference/future_then_6.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_then_6.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_6.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_6.dart.legacy.transformed.expect
index bde8fe5..9ad93e8 100644
--- a/pkg/front_end/testcases/inference/future_then_6.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_6.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_6.dart.outline.expect b/pkg/front_end/testcases/inference/future_then_6.dart.outline.expect
index 5e26f10..18f6651 100644
--- a/pkg/front_end/testcases/inference/future_then_6.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_6.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional.dart b/pkg/front_end/testcases/inference/future_then_conditional.dart
index 32f7cf2..2554216 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional.dart
+++ b/pkg/front_end/testcases/inference/future_then_conditional.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(T x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_then_conditional.dart.hierarchy.expect b/pkg/front_end/testcases/inference/future_then_conditional.dart.hierarchy.expect
index 06d97d1..89a66e0 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional.dart.hierarchy.expect
@@ -48,6 +48,7 @@
   classSetters:
 
 MyFuture:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Future<T>
diff --git a/pkg/front_end/testcases/inference/future_then_conditional.dart.legacy.expect b/pkg/front_end/testcases/inference/future_then_conditional.dart.legacy.expect
index 4ddf6a7..579d81d 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_conditional.dart.legacy.transformed.expect
index 0fc63fc..1ae82f7 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional.dart.outline.expect b/pkg/front_end/testcases/inference/future_then_conditional.dart.outline.expect
index 5e26f10..18f6651 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_2.dart b/pkg/front_end/testcases/inference/future_then_conditional_2.dart
index 9fb812d..ea5c226 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_2.dart
+++ b/pkg/front_end/testcases/inference/future_then_conditional_2.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(T x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_2.dart.hierarchy.expect b/pkg/front_end/testcases/inference/future_then_conditional_2.dart.hierarchy.expect
index 06d97d1..89a66e0 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_2.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_2.dart.hierarchy.expect
@@ -48,6 +48,7 @@
   classSetters:
 
 MyFuture:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Future<T>
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_2.dart.legacy.expect b/pkg/front_end/testcases/inference/future_then_conditional_2.dart.legacy.expect
index df550a5..3fbb4f7 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_2.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_2.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_2.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_conditional_2.dart.legacy.transformed.expect
index 6885ac4..9b1db02 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_2.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_2.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_2.dart.outline.expect b/pkg/front_end/testcases/inference/future_then_conditional_2.dart.outline.expect
index 5e26f10..18f6651 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_2.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_2.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_3.dart b/pkg/front_end/testcases/inference/future_then_conditional_3.dart
index 6a68194..3505a6d 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_3.dart
+++ b/pkg/front_end/testcases/inference/future_then_conditional_3.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(T x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_3.dart.hierarchy.expect b/pkg/front_end/testcases/inference/future_then_conditional_3.dart.hierarchy.expect
index 06d97d1..89a66e0 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_3.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_3.dart.hierarchy.expect
@@ -48,6 +48,7 @@
   classSetters:
 
 MyFuture:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Future<T>
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_3.dart.legacy.expect b/pkg/front_end/testcases/inference/future_then_conditional_3.dart.legacy.expect
index 9932aa3..a38c5ae 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_3.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_3.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_3.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_conditional_3.dart.legacy.transformed.expect
index c7618fd..364a78a 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_3.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_3.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_3.dart.outline.expect b/pkg/front_end/testcases/inference/future_then_conditional_3.dart.outline.expect
index 5e26f10..18f6651 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_3.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_3.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_4.dart b/pkg/front_end/testcases/inference/future_then_conditional_4.dart
index f99855b..36ffafd 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_4.dart
+++ b/pkg/front_end/testcases/inference/future_then_conditional_4.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(T x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_4.dart.hierarchy.expect b/pkg/front_end/testcases/inference/future_then_conditional_4.dart.hierarchy.expect
index 06d97d1..89a66e0 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_4.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_4.dart.hierarchy.expect
@@ -48,6 +48,7 @@
   classSetters:
 
 MyFuture:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Future<T>
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_4.dart.legacy.expect b/pkg/front_end/testcases/inference/future_then_conditional_4.dart.legacy.expect
index 7658f20..189b93e 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_4.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_4.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_4.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_conditional_4.dart.legacy.transformed.expect
index 9abcfd0..4a5e294 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_4.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_4.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_4.dart.outline.expect b/pkg/front_end/testcases/inference/future_then_conditional_4.dart.outline.expect
index 5e26f10..18f6651 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_4.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_4.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_5.dart b/pkg/front_end/testcases/inference/future_then_conditional_5.dart
index 7520121..52dc987 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_5.dart
+++ b/pkg/front_end/testcases/inference/future_then_conditional_5.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(T x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_5.dart.hierarchy.expect b/pkg/front_end/testcases/inference/future_then_conditional_5.dart.hierarchy.expect
index 06d97d1..89a66e0 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_5.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_5.dart.hierarchy.expect
@@ -48,6 +48,7 @@
   classSetters:
 
 MyFuture:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Future<T>
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_5.dart.legacy.expect b/pkg/front_end/testcases/inference/future_then_conditional_5.dart.legacy.expect
index 09a4b7b..8b21e2e 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_5.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_5.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_5.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_conditional_5.dart.legacy.transformed.expect
index 2f416f7..e5e7c73 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_5.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_5.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_5.dart.outline.expect b/pkg/front_end/testcases/inference/future_then_conditional_5.dart.outline.expect
index 5e26f10..18f6651 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_5.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_5.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_6.dart b/pkg/front_end/testcases/inference/future_then_conditional_6.dart
index b5d6508..b89a28b 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_6.dart
+++ b/pkg/front_end/testcases/inference/future_then_conditional_6.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(T x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_6.dart.hierarchy.expect b/pkg/front_end/testcases/inference/future_then_conditional_6.dart.hierarchy.expect
index 06d97d1..89a66e0 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_6.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_6.dart.hierarchy.expect
@@ -48,6 +48,7 @@
   classSetters:
 
 MyFuture:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Future<T>
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_6.dart.legacy.expect b/pkg/front_end/testcases/inference/future_then_conditional_6.dart.legacy.expect
index 24ff832..d4392fe 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_6.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_6.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_6.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_conditional_6.dart.legacy.transformed.expect
index 65684a7..fecb72e 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_6.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_6.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_6.dart.outline.expect b/pkg/front_end/testcases/inference/future_then_conditional_6.dart.outline.expect
index 5e26f10..18f6651 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_6.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_6.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_ifNull.dart b/pkg/front_end/testcases/inference/future_then_ifNull.dart
index 96695d4..c399f90 100644
--- a/pkg/front_end/testcases/inference/future_then_ifNull.dart
+++ b/pkg/front_end/testcases/inference/future_then_ifNull.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(T x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_then_ifNull.dart.hierarchy.expect b/pkg/front_end/testcases/inference/future_then_ifNull.dart.hierarchy.expect
index 06d97d1..89a66e0 100644
--- a/pkg/front_end/testcases/inference/future_then_ifNull.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/future_then_ifNull.dart.hierarchy.expect
@@ -48,6 +48,7 @@
   classSetters:
 
 MyFuture:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Future<T>
diff --git a/pkg/front_end/testcases/inference/future_then_ifNull.dart.legacy.expect b/pkg/front_end/testcases/inference/future_then_ifNull.dart.legacy.expect
index 57222ab..985e5ba 100644
--- a/pkg/front_end/testcases/inference/future_then_ifNull.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_then_ifNull.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_ifNull.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_ifNull.dart.legacy.transformed.expect
index 557fab9..f3c12bb 100644
--- a/pkg/front_end/testcases/inference/future_then_ifNull.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_ifNull.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_ifNull.dart.outline.expect b/pkg/front_end/testcases/inference/future_then_ifNull.dart.outline.expect
index 5e26f10..18f6651 100644
--- a/pkg/front_end/testcases/inference/future_then_ifNull.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_ifNull.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_upwards.dart b/pkg/front_end/testcases/inference/future_then_upwards.dart
index 1a770e9..9c33569 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards.dart
+++ b/pkg/front_end/testcases/inference/future_then_upwards.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(T x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_then_upwards.dart.hierarchy.expect b/pkg/front_end/testcases/inference/future_then_upwards.dart.hierarchy.expect
index 06d97d1..89a66e0 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/future_then_upwards.dart.hierarchy.expect
@@ -48,6 +48,7 @@
   classSetters:
 
 MyFuture:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Future<T>
diff --git a/pkg/front_end/testcases/inference/future_then_upwards.dart.legacy.expect b/pkg/front_end/testcases/inference/future_then_upwards.dart.legacy.expect
index 3b3f456..c454264 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_then_upwards.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_upwards.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_upwards.dart.legacy.transformed.expect
index 3b3f456..c454264 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_upwards.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_upwards.dart.outline.expect b/pkg/front_end/testcases/inference/future_then_upwards.dart.outline.expect
index e9cb911..e5a534c 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_upwards.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_upwards_2.dart b/pkg/front_end/testcases/inference/future_then_upwards_2.dart
index b9d340e..ffc3c35b 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards_2.dart
+++ b/pkg/front_end/testcases/inference/future_then_upwards_2.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(T x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_then_upwards_2.dart.hierarchy.expect b/pkg/front_end/testcases/inference/future_then_upwards_2.dart.hierarchy.expect
index 06d97d1..89a66e0 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards_2.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/future_then_upwards_2.dart.hierarchy.expect
@@ -48,6 +48,7 @@
   classSetters:
 
 MyFuture:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Future<T>
diff --git a/pkg/front_end/testcases/inference/future_then_upwards_2.dart.legacy.expect b/pkg/front_end/testcases/inference/future_then_upwards_2.dart.legacy.expect
index f0dc55f..4c532cc 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards_2.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_then_upwards_2.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_upwards_2.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_upwards_2.dart.legacy.transformed.expect
index f0dc55f..4c532cc 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards_2.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_upwards_2.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_upwards_2.dart.outline.expect b/pkg/front_end/testcases/inference/future_then_upwards_2.dart.outline.expect
index e9cb911..e5a534c 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards_2.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_upwards_2.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_upwards_3.dart b/pkg/front_end/testcases/inference/future_then_upwards_3.dart
index f57ee71..8351c02 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards_3.dart
+++ b/pkg/front_end/testcases/inference/future_then_upwards_3.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(T x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_then_upwards_3.dart.hierarchy.expect b/pkg/front_end/testcases/inference/future_then_upwards_3.dart.hierarchy.expect
index 06d97d1..89a66e0 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards_3.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/future_then_upwards_3.dart.hierarchy.expect
@@ -48,6 +48,7 @@
   classSetters:
 
 MyFuture:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Future<T>
diff --git a/pkg/front_end/testcases/inference/future_then_upwards_3.dart.legacy.expect b/pkg/front_end/testcases/inference/future_then_upwards_3.dart.legacy.expect
index e868c2d..86abe95 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards_3.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_then_upwards_3.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_upwards_3.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_then_upwards_3.dart.legacy.transformed.expect
index e868c2d..86abe95 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards_3.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_then_upwards_3.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_then_upwards_3.dart.outline.expect b/pkg/front_end/testcases/inference/future_then_upwards_3.dart.outline.expect
index cdfda19..9162c9b 100644
--- a/pkg/front_end/testcases/inference/future_then_upwards_3.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_then_upwards_3.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_async_conditional.dart b/pkg/front_end/testcases/inference/future_union_async_conditional.dart
index e1f0f8c..455dab2 100644
--- a/pkg/front_end/testcases/inference/future_union_async_conditional.dart
+++ b/pkg/front_end/testcases/inference/future_union_async_conditional.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_union_async_conditional.dart.hierarchy.expect b/pkg/front_end/testcases/inference/future_union_async_conditional.dart.hierarchy.expect
index 06d97d1..89a66e0 100644
--- a/pkg/front_end/testcases/inference/future_union_async_conditional.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/future_union_async_conditional.dart.hierarchy.expect
@@ -48,6 +48,7 @@
   classSetters:
 
 MyFuture:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Future<T>
diff --git a/pkg/front_end/testcases/inference/future_union_async_conditional.dart.legacy.expect b/pkg/front_end/testcases/inference/future_union_async_conditional.dart.legacy.expect
index 42ac544..aed7501 100644
--- a/pkg/front_end/testcases/inference/future_union_async_conditional.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_union_async_conditional.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_async_conditional.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_union_async_conditional.dart.legacy.transformed.expect
index 7cb03fb..7697712 100644
--- a/pkg/front_end/testcases/inference/future_union_async_conditional.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_async_conditional.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_async_conditional.dart.outline.expect b/pkg/front_end/testcases/inference/future_union_async_conditional.dart.outline.expect
index 0e45bdd..e80eb43 100644
--- a/pkg/front_end/testcases/inference/future_union_async_conditional.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_union_async_conditional.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart b/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart
index 41e7cb0..5188287 100644
--- a/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart
+++ b/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value(x) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.hierarchy.expect b/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.hierarchy.expect
index 06d97d1..89a66e0 100644
--- a/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.hierarchy.expect
@@ -48,6 +48,7 @@
   classSetters:
 
 MyFuture:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Future<T>
diff --git a/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.legacy.expect b/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.legacy.expect
index 0985390..b3989b2 100644
--- a/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.legacy.transformed.expect
index 6eb70db..8c463d9 100644
--- a/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.outline.expect b/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.outline.expect
index 0e45bdd..e80eb43 100644
--- a/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_downwards.dart b/pkg/front_end/testcases/inference/future_union_downwards.dart
index 5622782..2882aa8 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards.dart
+++ b/pkg/front_end/testcases/inference/future_union_downwards.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value([x]) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_union_downwards.dart.hierarchy.expect b/pkg/front_end/testcases/inference/future_union_downwards.dart.hierarchy.expect
index 06d97d1..89a66e0 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards.dart.hierarchy.expect
@@ -48,6 +48,7 @@
   classSetters:
 
 MyFuture:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Future<T>
diff --git a/pkg/front_end/testcases/inference/future_union_downwards.dart.legacy.expect b/pkg/front_end/testcases/inference/future_union_downwards.dart.legacy.expect
index 5ca32db..c309ae6 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_downwards.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_union_downwards.dart.legacy.transformed.expect
index 9c918a1..5fb66a8 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_downwards.dart.outline.expect b/pkg/front_end/testcases/inference/future_union_downwards.dart.outline.expect
index 10cd1f0..263a94f 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_2.dart b/pkg/front_end/testcases/inference/future_union_downwards_2.dart
index 7ff20a9..9c32e85 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_2.dart
+++ b/pkg/front_end/testcases/inference/future_union_downwards_2.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value([x]) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_2.dart.hierarchy.expect b/pkg/front_end/testcases/inference/future_union_downwards_2.dart.hierarchy.expect
index 06d97d1..89a66e0 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_2.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_2.dart.hierarchy.expect
@@ -48,6 +48,7 @@
   classSetters:
 
 MyFuture:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Future<T>
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_2.dart.legacy.expect b/pkg/front_end/testcases/inference/future_union_downwards_2.dart.legacy.expect
index 8471190..a89b874 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_2.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_2.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_2.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_union_downwards_2.dart.legacy.transformed.expect
index a165015..ec5724d 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_2.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_2.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_2.dart.outline.expect b/pkg/front_end/testcases/inference/future_union_downwards_2.dart.outline.expect
index 10cd1f0..263a94f 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_2.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_2.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_3.dart b/pkg/front_end/testcases/inference/future_union_downwards_3.dart
index 3cd6687..6d421db 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_3.dart
+++ b/pkg/front_end/testcases/inference/future_union_downwards_3.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value([x]) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_3.dart.hierarchy.expect b/pkg/front_end/testcases/inference/future_union_downwards_3.dart.hierarchy.expect
index 06d97d1..89a66e0 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_3.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_3.dart.hierarchy.expect
@@ -48,6 +48,7 @@
   classSetters:
 
 MyFuture:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Future<T>
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_3.dart.legacy.expect b/pkg/front_end/testcases/inference/future_union_downwards_3.dart.legacy.expect
index a2acf08..9b07131 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_3.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_3.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_3.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_union_downwards_3.dart.legacy.transformed.expect
index f4d6505..a3884a8 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_3.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_3.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_3.dart.outline.expect b/pkg/front_end/testcases/inference/future_union_downwards_3.dart.outline.expect
index 58b3b85..da18d4d 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_3.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_3.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_4.dart b/pkg/front_end/testcases/inference/future_union_downwards_4.dart
index 0bf7b5c..e9a48fc 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_4.dart
+++ b/pkg/front_end/testcases/inference/future_union_downwards_4.dart
@@ -10,7 +10,7 @@
 class MyFuture<T> implements Future<T> {
   MyFuture() {}
   MyFuture.value([x]) {}
-  dynamic noSuchMethod(/*@topType=Invocation*/ invocation) => null;
+  dynamic noSuchMethod(invocation) => null;
   MyFuture<S> then<S>(FutureOr<S> f(T x), {Function onError}) => null;
 }
 
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_4.dart.hierarchy.expect b/pkg/front_end/testcases/inference/future_union_downwards_4.dart.hierarchy.expect
index 06d97d1..89a66e0 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_4.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_4.dart.hierarchy.expect
@@ -48,6 +48,7 @@
   classSetters:
 
 MyFuture:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Future<T>
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_4.dart.legacy.expect b/pkg/front_end/testcases/inference/future_union_downwards_4.dart.legacy.expect
index 4efea1b..b27e6d9 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_4.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_4.dart.legacy.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_4.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/future_union_downwards_4.dart.legacy.transformed.expect
index b6eba1b..ca29563 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_4.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_4.dart.legacy.transformed.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/future_union_downwards_4.dart.outline.expect b/pkg/front_end/testcases/inference/future_union_downwards_4.dart.outline.expect
index 58b3b85..da18d4d 100644
--- a/pkg/front_end/testcases/inference/future_union_downwards_4.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/future_union_downwards_4.dart.outline.expect
@@ -18,7 +18,7 @@
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#catchError, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[onError]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#test: test}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ whenComplete(() → asy::FutureOr<dynamic> action) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#whenComplete, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[action]), core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Future<self::MyFuture::T>;
-  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {() → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
+  no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ timeout(core::Duration timeLimit, {generic-covariant-impl () → asy::FutureOr<self::MyFuture::T> onTimeout = null}) → asy::Future<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#timeout, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[timeLimit]), core::Map::unmodifiable<core::Symbol, dynamic>(<core::Symbol, dynamic>{#onTimeout: onTimeout}))) as{TypeError} asy::Future<self::MyFuture::T>;
   no-such-method-forwarder method /* from org-dartlang-sdk:///sdk/lib/async/future.dart */ asStream() → asy::Stream<self::MyFuture::T>
     return this.{self::MyFuture::noSuchMethod}(new core::_InvocationMirror::_withType(#asStream, 0, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))) as{TypeError} asy::Stream<self::MyFuture::T>;
diff --git a/pkg/front_end/testcases/inference/generic_methods_correctly_recognize_generic_upper_bound.dart.outline.expect b/pkg/front_end/testcases/inference/generic_methods_correctly_recognize_generic_upper_bound.dart.outline.expect
index 93dfbdf..39a3325 100644
--- a/pkg/front_end/testcases/inference/generic_methods_correctly_recognize_generic_upper_bound.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_correctly_recognize_generic_upper_bound.dart.outline.expect
@@ -5,7 +5,7 @@
 class Foo<T extends core::Pattern = dynamic> extends core::Object {
   synthetic constructor •() → self::Foo<self::Foo::T>
     ;
-  method method<U extends self::Foo::T = dynamic>(self::Foo::method::U u) → self::Foo::method::U
+  method method<generic-covariant-impl U extends self::Foo::T = dynamic>(self::Foo::method::U u) → self::Foo::method::U
     ;
 }
 static method main() → dynamic
diff --git a/pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart b/pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart
index 5ce58e8..c5494ef 100644
--- a/pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart
+++ b/pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 import 'dart:math';
@@ -25,18 +25,16 @@
   printInt(myMax(1, 2) as int);
 
   printInt(
-      /*@typeArgs=int*/ max(1, /*@error=ArgumentTypeNotAssignable*/ 2.0));
+      /*@typeArgs=int*/ max(1, 2.0));
   printInt(
-      /*@typeArgs=int*/ min(1, /*@error=ArgumentTypeNotAssignable*/ 2.0));
+      /*@typeArgs=int*/ min(1, 2.0));
   printDouble(
       /*@typeArgs=double*/ max(1, 2.0));
   printDouble(
       /*@typeArgs=double*/ min(1, 2.0));
 
   // Types other than int and double are not accepted.
-  printInt(/*@typeArgs=int*/ min(
-      /*@error=ArgumentTypeNotAssignable*/ "hi",
-      /*@error=ArgumentTypeNotAssignable*/ "there"));
+  printInt(/*@typeArgs=int*/ min("hi", "there"));
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart.strong.expect b/pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart.strong.expect
index 13f3e92..14e6aae 100644
--- a/pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart.strong.expect
@@ -2,25 +2,25 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:28:69: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
+// pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:28:32: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
 // Try changing the type of the parameter, or casting the argument to 'int'.
-//       /*@typeArgs=int*/ max(1, /*@error=ArgumentTypeNotAssignable*/ 2.0));
-//                                                                     ^
+//       /*@typeArgs=int*/ max(1, 2.0));
+//                                ^
 //
-// pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:30:69: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
+// pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:30:32: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
 // Try changing the type of the parameter, or casting the argument to 'int'.
-//       /*@typeArgs=int*/ min(1, /*@error=ArgumentTypeNotAssignable*/ 2.0));
-//                                                                     ^
+//       /*@typeArgs=int*/ min(1, 2.0));
+//                                ^
 //
-// pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:38:44: Error: The argument type 'String' can't be assigned to the parameter type 'int'.
+// pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:37:34: Error: The argument type 'String' can't be assigned to the parameter type 'int'.
 // Try changing the type of the parameter, or casting the argument to 'int'.
-//       /*@error=ArgumentTypeNotAssignable*/ "hi",
-//                                            ^
+//   printInt(/*@typeArgs=int*/ min("hi", "there"));
+//                                  ^
 //
-// pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:39:44: Error: The argument type 'String' can't be assigned to the parameter type 'int'.
+// pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:37:40: Error: The argument type 'String' can't be assigned to the parameter type 'int'.
 // Try changing the type of the parameter, or casting the argument to 'int'.
-//       /*@error=ArgumentTypeNotAssignable*/ "there"));
-//                                            ^
+//   printInt(/*@typeArgs=int*/ min("hi", "there"));
+//                                        ^
 //
 import self as self;
 import "dart:core" as core;
@@ -41,22 +41,22 @@
   self::printDouble(math::min<core::double>(1.0, 2.0));
   self::printInt(self::myMax(1, 2) as{TypeError} core::int);
   self::printInt(self::myMax(1, 2) as core::int);
-  self::printInt(math::max<core::int>(1, let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:28:69: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
+  self::printInt(math::max<core::int>(1, let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:28:32: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
 Try changing the type of the parameter, or casting the argument to 'int'.
-      /*@typeArgs=int*/ max(1, /*@error=ArgumentTypeNotAssignable*/ 2.0));
-                                                                    ^" in 2.0 as{TypeError} core::int));
-  self::printInt(math::min<core::int>(1, let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:30:69: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
+      /*@typeArgs=int*/ max(1, 2.0));
+                               ^" in 2.0 as{TypeError} core::int));
+  self::printInt(math::min<core::int>(1, let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:30:32: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
 Try changing the type of the parameter, or casting the argument to 'int'.
-      /*@typeArgs=int*/ min(1, /*@error=ArgumentTypeNotAssignable*/ 2.0));
-                                                                    ^" in 2.0 as{TypeError} core::int));
+      /*@typeArgs=int*/ min(1, 2.0));
+                               ^" in 2.0 as{TypeError} core::int));
   self::printDouble(math::max<core::double>(1.0, 2.0));
   self::printDouble(math::min<core::double>(1.0, 2.0));
-  self::printInt(math::min<core::int>(let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:38:44: Error: The argument type 'String' can't be assigned to the parameter type 'int'.
+  self::printInt(math::min<core::int>(let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:37:34: Error: The argument type 'String' can't be assigned to the parameter type 'int'.
 Try changing the type of the parameter, or casting the argument to 'int'.
-      /*@error=ArgumentTypeNotAssignable*/ \"hi\",
-                                           ^" in "hi" as{TypeError} core::int, let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:39:44: Error: The argument type 'String' can't be assigned to the parameter type 'int'.
+  printInt(/*@typeArgs=int*/ min(\"hi\", \"there\"));
+                                 ^" in "hi" as{TypeError} core::int, let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:37:40: Error: The argument type 'String' can't be assigned to the parameter type 'int'.
 Try changing the type of the parameter, or casting the argument to 'int'.
-      /*@error=ArgumentTypeNotAssignable*/ \"there\"));
-                                           ^" in "there" as{TypeError} core::int));
+  printInt(/*@typeArgs=int*/ min(\"hi\", \"there\"));
+                                       ^" in "there" as{TypeError} core::int));
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart.strong.transformed.expect
index 13f3e92..14e6aae 100644
--- a/pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart.strong.transformed.expect
@@ -2,25 +2,25 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:28:69: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
+// pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:28:32: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
 // Try changing the type of the parameter, or casting the argument to 'int'.
-//       /*@typeArgs=int*/ max(1, /*@error=ArgumentTypeNotAssignable*/ 2.0));
-//                                                                     ^
+//       /*@typeArgs=int*/ max(1, 2.0));
+//                                ^
 //
-// pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:30:69: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
+// pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:30:32: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
 // Try changing the type of the parameter, or casting the argument to 'int'.
-//       /*@typeArgs=int*/ min(1, /*@error=ArgumentTypeNotAssignable*/ 2.0));
-//                                                                     ^
+//       /*@typeArgs=int*/ min(1, 2.0));
+//                                ^
 //
-// pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:38:44: Error: The argument type 'String' can't be assigned to the parameter type 'int'.
+// pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:37:34: Error: The argument type 'String' can't be assigned to the parameter type 'int'.
 // Try changing the type of the parameter, or casting the argument to 'int'.
-//       /*@error=ArgumentTypeNotAssignable*/ "hi",
-//                                            ^
+//   printInt(/*@typeArgs=int*/ min("hi", "there"));
+//                                  ^
 //
-// pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:39:44: Error: The argument type 'String' can't be assigned to the parameter type 'int'.
+// pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:37:40: Error: The argument type 'String' can't be assigned to the parameter type 'int'.
 // Try changing the type of the parameter, or casting the argument to 'int'.
-//       /*@error=ArgumentTypeNotAssignable*/ "there"));
-//                                            ^
+//   printInt(/*@typeArgs=int*/ min("hi", "there"));
+//                                        ^
 //
 import self as self;
 import "dart:core" as core;
@@ -41,22 +41,22 @@
   self::printDouble(math::min<core::double>(1.0, 2.0));
   self::printInt(self::myMax(1, 2) as{TypeError} core::int);
   self::printInt(self::myMax(1, 2) as core::int);
-  self::printInt(math::max<core::int>(1, let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:28:69: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
+  self::printInt(math::max<core::int>(1, let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:28:32: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
 Try changing the type of the parameter, or casting the argument to 'int'.
-      /*@typeArgs=int*/ max(1, /*@error=ArgumentTypeNotAssignable*/ 2.0));
-                                                                    ^" in 2.0 as{TypeError} core::int));
-  self::printInt(math::min<core::int>(1, let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:30:69: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
+      /*@typeArgs=int*/ max(1, 2.0));
+                               ^" in 2.0 as{TypeError} core::int));
+  self::printInt(math::min<core::int>(1, let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:30:32: Error: The argument type 'double' can't be assigned to the parameter type 'int'.
 Try changing the type of the parameter, or casting the argument to 'int'.
-      /*@typeArgs=int*/ min(1, /*@error=ArgumentTypeNotAssignable*/ 2.0));
-                                                                    ^" in 2.0 as{TypeError} core::int));
+      /*@typeArgs=int*/ min(1, 2.0));
+                               ^" in 2.0 as{TypeError} core::int));
   self::printDouble(math::max<core::double>(1.0, 2.0));
   self::printDouble(math::min<core::double>(1.0, 2.0));
-  self::printInt(math::min<core::int>(let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:38:44: Error: The argument type 'String' can't be assigned to the parameter type 'int'.
+  self::printInt(math::min<core::int>(let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:37:34: Error: The argument type 'String' can't be assigned to the parameter type 'int'.
 Try changing the type of the parameter, or casting the argument to 'int'.
-      /*@error=ArgumentTypeNotAssignable*/ \"hi\",
-                                           ^" in "hi" as{TypeError} core::int, let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:39:44: Error: The argument type 'String' can't be assigned to the parameter type 'int'.
+  printInt(/*@typeArgs=int*/ min(\"hi\", \"there\"));
+                                 ^" in "hi" as{TypeError} core::int, let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/inference/generic_methods_dart_math_min_max.dart:37:40: Error: The argument type 'String' can't be assigned to the parameter type 'int'.
 Try changing the type of the parameter, or casting the argument to 'int'.
-      /*@error=ArgumentTypeNotAssignable*/ \"there\"));
-                                           ^" in "there" as{TypeError} core::int));
+  printInt(/*@typeArgs=int*/ min(\"hi\", \"there\"));
+                                       ^" in "there" as{TypeError} core::int));
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart b/pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart
index c72713a..fc87629 100644
--- a/pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart
+++ b/pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 class C {
@@ -10,15 +10,12 @@
 }
 
 class D extends C {
-/*@error=OverrideTypeVariablesMismatch*/
-/*@error=OverrideTypeMismatchReturnType*/ /*@topType=dynamic*/ m(
-          /*@topType=dynamic*/ x) =>
-      x;
+  m(x) => x;
 }
 
 main() {
   int y = /*info:DYNAMIC_CAST*/ new D()
-      . /*error:WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD*/ /*@target=D::m*/ /*@error=TypeArgumentMismatch*/ m<
-          int>(42);
+      . /*error:WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD*/ /*@target=D::m*/ m<int>(
+          42);
   print(y);
 }
diff --git a/pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart.strong.expect b/pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart.strong.expect
index 9b3d956..d79aa89 100644
--- a/pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart.strong.expect
@@ -2,24 +2,24 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart:14:64: Error: Declared type variables of 'D.m' doesn't match those on overridden method 'C.m'.
-// /*@error=OverrideTypeMismatchReturnType*/ /*@topType=dynamic*/ m(
-//                                                                ^
+// pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart:13:3: Error: Declared type variables of 'D.m' doesn't match those on overridden method 'C.m'.
+//   m(x) => x;
+//   ^
 // pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart:9:5: Context: This is the overridden method ('m').
 //   T m<T>(T x) => x;
 //     ^
 //
-// pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart:14:64: Error: The return type of the method 'D.m' is 'dynamic', which does not match the return type of the overridden method, 'T'.
+// pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart:13:3: Error: The return type of the method 'D.m' is 'dynamic', which does not match the return type, 'T', of the overridden method, 'C.m'.
 // Change to a subtype of 'T'.
-// /*@error=OverrideTypeMismatchReturnType*/ /*@topType=dynamic*/ m(
-//                                                                ^
+//   m(x) => x;
+//   ^
 // pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart:9:5: Context: This is the overridden method ('m').
 //   T m<T>(T x) => x;
 //     ^
 //
-// pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart:21:106: Error: Expected 0 type arguments.
-//       . /*error:WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD*/ /*@target=D::m*/ /*@error=TypeArgumentMismatch*/ m<
-//                                                                                                          ^
+// pkg/front_end/testcases/inference/generic_methods_do_not_infer_invalid_override_of_generic_method.dart:18:74: Error: Expected 0 type arguments.
+//       . /*error:WRONG_NUMBER_OF_TYPE_ARGUMENTS_METHOD*/ /*@target=D::m*/ m<int>(
+//                                                                          ^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart b/pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart
index b1f78be..5d9fa15 100644
--- a/pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart
+++ b/pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart
@@ -2,21 +2,17 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 class C {
-  /*@topType=dynamic*/ m(/*@topType=dynamic*/ x) => x;
+  m(x) => x;
   dynamic g(int x) => x;
 }
 
 class D extends C {
-  T /*@error=OverrideTypeVariablesMismatch*/ m<T>(
-          T /*@error=OverrideTypeMismatchParameter*/ x) =>
-      x;
-  T /*@error=OverrideTypeVariablesMismatch*/ g<T>(
-          T /*@error=OverrideTypeMismatchParameter*/ x) =>
-      x;
+  T m<T>(T x) => x;
+  T g<T>(T x) => x;
 }
 
 main() {
diff --git a/pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart.legacy.expect b/pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart.legacy.expect
index 2b9e694..ecbdb07 100644
--- a/pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart.legacy.expect
@@ -2,16 +2,16 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:14:46: Warning: Declared type variables of 'D.m' doesn't match those on overridden method 'C.m'.
-//   T /*@error=OverrideTypeVariablesMismatch*/ m<T>(
-//                                              ^
-// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:9:24: Context: This is the overridden method ('m').
-//   /*@topType=dynamic*/ m(/*@topType=dynamic*/ x) => x;
-//                        ^
+// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:14:5: Warning: Declared type variables of 'D.m' doesn't match those on overridden method 'C.m'.
+//   T m<T>(T x) => x;
+//     ^
+// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:9:3: Context: This is the overridden method ('m').
+//   m(x) => x;
+//   ^
 //
-// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:17:46: Warning: Declared type variables of 'D.g' doesn't match those on overridden method 'C.g'.
-//   T /*@error=OverrideTypeVariablesMismatch*/ g<T>(
-//                                              ^
+// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:15:5: Warning: Declared type variables of 'D.g' doesn't match those on overridden method 'C.g'.
+//   T g<T>(T x) => x;
+//     ^
 // pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:10:11: Context: This is the overridden method ('g').
 //   dynamic g(int x) => x;
 //           ^
diff --git a/pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart.legacy.transformed.expect
index 2b9e694..ecbdb07 100644
--- a/pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart.legacy.transformed.expect
@@ -2,16 +2,16 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:14:46: Warning: Declared type variables of 'D.m' doesn't match those on overridden method 'C.m'.
-//   T /*@error=OverrideTypeVariablesMismatch*/ m<T>(
-//                                              ^
-// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:9:24: Context: This is the overridden method ('m').
-//   /*@topType=dynamic*/ m(/*@topType=dynamic*/ x) => x;
-//                        ^
+// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:14:5: Warning: Declared type variables of 'D.m' doesn't match those on overridden method 'C.m'.
+//   T m<T>(T x) => x;
+//     ^
+// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:9:3: Context: This is the overridden method ('m').
+//   m(x) => x;
+//   ^
 //
-// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:17:46: Warning: Declared type variables of 'D.g' doesn't match those on overridden method 'C.g'.
-//   T /*@error=OverrideTypeVariablesMismatch*/ g<T>(
-//                                              ^
+// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:15:5: Warning: Declared type variables of 'D.g' doesn't match those on overridden method 'C.g'.
+//   T g<T>(T x) => x;
+//     ^
 // pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:10:11: Context: This is the overridden method ('g').
 //   dynamic g(int x) => x;
 //           ^
diff --git a/pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart.strong.expect b/pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart.strong.expect
index 5d175fa..9d1f921 100644
--- a/pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart.strong.expect
@@ -2,32 +2,32 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:14:46: Error: Declared type variables of 'D.m' doesn't match those on overridden method 'C.m'.
-//   T /*@error=OverrideTypeVariablesMismatch*/ m<T>(
-//                                              ^
-// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:9:24: Context: This is the overridden method ('m').
-//   /*@topType=dynamic*/ m(/*@topType=dynamic*/ x) => x;
-//                        ^
+// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:14:5: Error: Declared type variables of 'D.m' doesn't match those on overridden method 'C.m'.
+//   T m<T>(T x) => x;
+//     ^
+// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:9:3: Context: This is the overridden method ('m').
+//   m(x) => x;
+//   ^
 //
-// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:15:54: Error: The parameter 'x' of the method 'D.m' has type 'T', which does not match the corresponding type in the overridden method, 'dynamic'.
+// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:14:12: Error: The parameter 'x' of the method 'D.m' has type 'T', which does not match the corresponding type, 'dynamic', in the overridden method, 'C.m'.
 // Change to a supertype of 'dynamic', or, for a covariant parameter, a subtype.
-//           T /*@error=OverrideTypeMismatchParameter*/ x) =>
-//                                                      ^
-// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:9:24: Context: This is the overridden method ('m').
-//   /*@topType=dynamic*/ m(/*@topType=dynamic*/ x) => x;
-//                        ^
+//   T m<T>(T x) => x;
+//            ^
+// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:9:3: Context: This is the overridden method ('m').
+//   m(x) => x;
+//   ^
 //
-// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:17:46: Error: Declared type variables of 'D.g' doesn't match those on overridden method 'C.g'.
-//   T /*@error=OverrideTypeVariablesMismatch*/ g<T>(
-//                                              ^
+// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:15:5: Error: Declared type variables of 'D.g' doesn't match those on overridden method 'C.g'.
+//   T g<T>(T x) => x;
+//     ^
 // pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:10:11: Context: This is the overridden method ('g').
 //   dynamic g(int x) => x;
 //           ^
 //
-// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:18:54: Error: The parameter 'x' of the method 'D.g' has type 'T', which does not match the corresponding type in the overridden method, 'int'.
+// pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:15:12: Error: The parameter 'x' of the method 'D.g' has type 'T', which does not match the corresponding type, 'int', in the overridden method, 'C.g'.
 // Change to a supertype of 'int', or, for a covariant parameter, a subtype.
-//           T /*@error=OverrideTypeMismatchParameter*/ x) =>
-//                                                      ^
+//   T g<T>(T x) => x;
+//            ^
 // pkg/front_end/testcases/inference/generic_methods_handle_override_of_non_generic_with_generic.dart:10:11: Context: This is the overridden method ('g').
 //   dynamic g(int x) => x;
 //           ^
diff --git a/pkg/front_end/testcases/inference/generic_methods_infer_generic_function_parameter_type.dart b/pkg/front_end/testcases/inference/generic_methods_infer_generic_function_parameter_type.dart
index 8fc6aa4..c980fb7 100644
--- a/pkg/front_end/testcases/inference/generic_methods_infer_generic_function_parameter_type.dart
+++ b/pkg/front_end/testcases/inference/generic_methods_infer_generic_function_parameter_type.dart
@@ -6,7 +6,7 @@
 library test;
 
 class C<T> extends D<T> {
-  /*@topType=(C::f::U) -> void*/ f<U>(/*@topType=C::f::U*/ x) {}
+  f<U>(x) {}
 }
 
 class D<T> {
diff --git a/pkg/front_end/testcases/inference/generic_methods_infer_generic_function_parameter_type2.dart b/pkg/front_end/testcases/inference/generic_methods_infer_generic_function_parameter_type2.dart
index ca323a2..8ca88c6 100644
--- a/pkg/front_end/testcases/inference/generic_methods_infer_generic_function_parameter_type2.dart
+++ b/pkg/front_end/testcases/inference/generic_methods_infer_generic_function_parameter_type2.dart
@@ -6,7 +6,7 @@
 library test;
 
 class C<T> extends D<T> {
-  /*@topType=void*/ f<U>(/*@topType=() -> List<C::f::U>*/ g) => null;
+  f<U>(g) => null;
 }
 
 abstract class D<T> {
diff --git a/pkg/front_end/testcases/inference/generic_methods_infer_generic_function_return_type.dart b/pkg/front_end/testcases/inference/generic_methods_infer_generic_function_return_type.dart
index 16f1fcf..e46904d 100644
--- a/pkg/front_end/testcases/inference/generic_methods_infer_generic_function_return_type.dart
+++ b/pkg/front_end/testcases/inference/generic_methods_infer_generic_function_return_type.dart
@@ -6,7 +6,7 @@
 library test;
 
 class C<T> extends D<T> {
-  /*@topType=() -> C::f::U*/ f<U>(/*@topType=C::f::U*/ x) {}
+  f<U>(x) {}
 }
 
 class D<T> {
diff --git a/pkg/front_end/testcases/inference/generic_methods_infer_generic_method_type.dart b/pkg/front_end/testcases/inference/generic_methods_infer_generic_method_type.dart
index db7ae17..db2f883 100644
--- a/pkg/front_end/testcases/inference/generic_methods_infer_generic_method_type.dart
+++ b/pkg/front_end/testcases/inference/generic_methods_infer_generic_method_type.dart
@@ -10,7 +10,7 @@
 }
 
 class D extends C {
-  /*@topType=D::m::S*/ m<S>(/*@topType=D::m::S*/ x) => x;
+  m<S>(x) => x;
 }
 
 main() {
diff --git a/pkg/front_end/testcases/inference/index_assign_operator_return_type.dart b/pkg/front_end/testcases/inference/index_assign_operator_return_type.dart
index 6f16f85..47099c8 100644
--- a/pkg/front_end/testcases/inference/index_assign_operator_return_type.dart
+++ b/pkg/front_end/testcases/inference/index_assign_operator_return_type.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 class C {
@@ -14,7 +14,7 @@
 }
 
 class D extends C implements I {
-  operator /*@topType=void*/ []=(dynamic index, dynamic value) {}
+  operator []=(dynamic index, dynamic value) {}
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/index_assign_operator_return_type_2.dart b/pkg/front_end/testcases/inference/index_assign_operator_return_type_2.dart
index b7ddcd0..84362ad 100644
--- a/pkg/front_end/testcases/inference/index_assign_operator_return_type_2.dart
+++ b/pkg/front_end/testcases/inference/index_assign_operator_return_type_2.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 class C {
@@ -14,7 +14,7 @@
 }
 
 class D extends C implements I {
-  operator /*@topType=void*/ []=(int index, /*@topType=dynamic*/ value) {}
+  operator []=(int index, value) {}
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_accessor_from_later_inferred_field.dart b/pkg/front_end/testcases/inference/infer_accessor_from_later_inferred_field.dart
index 0d751d9..bd7233a 100644
--- a/pkg/front_end/testcases/inference/infer_accessor_from_later_inferred_field.dart
+++ b/pkg/front_end/testcases/inference/infer_accessor_from_later_inferred_field.dart
@@ -6,12 +6,12 @@
 library test;
 
 class A implements B {
-  get /*@topType=int*/ x => f();
-  void set x(/*@topType=int*/ value) {}
+  get x => f();
+  void set x(value) {}
 }
 
 class B {
-  var /*@topType=int*/ x = 0;
+  var x = 0;
 }
 
 dynamic f() => null;
diff --git a/pkg/front_end/testcases/inference/infer_accessor_from_later_inferred_field.dart.hierarchy.expect b/pkg/front_end/testcases/inference/infer_accessor_from_later_inferred_field.dart.hierarchy.expect
index 0d0e29f..1e44eee 100644
--- a/pkg/front_end/testcases/inference/infer_accessor_from_later_inferred_field.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/infer_accessor_from_later_inferred_field.dart.hierarchy.expect
@@ -38,6 +38,7 @@
     B.x
 
 A:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: B
diff --git a/pkg/front_end/testcases/inference/infer_assign_to_ref.dart b/pkg/front_end/testcases/inference/infer_assign_to_ref.dart
index ac6e633..c4b8bcc 100644
--- a/pkg/front_end/testcases/inference/infer_assign_to_ref.dart
+++ b/pkg/front_end/testcases/inference/infer_assign_to_ref.dart
@@ -10,7 +10,7 @@
 }
 
 A a = new A();
-var /*@topType=int*/ c = 0;
+var c = 0;
 
 main() {
   a;
diff --git a/pkg/front_end/testcases/inference/infer_binary_custom.dart b/pkg/front_end/testcases/inference/infer_binary_custom.dart
index ceb40bb..d25eef7 100644
--- a/pkg/front_end/testcases/inference/infer_binary_custom.dart
+++ b/pkg/front_end/testcases/inference/infer_binary_custom.dart
@@ -6,12 +6,12 @@
 library test;
 
 class A {
-  int operator +(/*@topType=dynamic*/ other) => 1;
-  double operator -(/*@topType=dynamic*/ other) => 2.0;
+  int operator +(other) => 1;
+  double operator -(other) => 2.0;
 }
 
-var /*@topType=int*/ v_add = new A() /*@target=A::+*/ + 'foo';
-var /*@topType=double*/ v_minus = new A() /*@target=A::-*/ - 'bar';
+var v_add = new A() /*@target=A::+*/ + 'foo';
+var v_minus = new A() /*@target=A::-*/ - 'bar';
 
 main() {
   v_add;
diff --git a/pkg/front_end/testcases/inference/infer_binary_double_double.dart b/pkg/front_end/testcases/inference/infer_binary_double_double.dart
index 4a70a38..ad180e6 100644
--- a/pkg/front_end/testcases/inference/infer_binary_double_double.dart
+++ b/pkg/front_end/testcases/inference/infer_binary_double_double.dart
@@ -5,18 +5,18 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=bool*/ a_equal = 1.0 /*@target=num::==*/ == 2.0;
-var /*@topType=bool*/ a_notEqual = 1.0 /*@target=num::==*/ != 2.0;
-var /*@topType=double*/ a_add = 1.0 /*@target=double::+*/ + 2.0;
-var /*@topType=double*/ a_subtract = 1.0 /*@target=double::-*/ - 2.0;
-var /*@topType=double*/ a_multiply = 1.0 /*@target=double::**/ * 2.0;
-var /*@topType=double*/ a_divide = 1.0 /*@target=double::/ */ / 2.0;
-var /*@topType=int*/ a_floorDivide = 1.0 /*@target=double::~/ */ ~/ 2.0;
-var /*@topType=bool*/ a_greater = 1.0 /*@target=num::>*/ > 2.0;
-var /*@topType=bool*/ a_less = 1.0 /*@target=num::<*/ < 2.0;
-var /*@topType=bool*/ a_greaterEqual = 1.0 /*@target=num::>=*/ >= 2.0;
-var /*@topType=bool*/ a_lessEqual = 1.0 /*@target=num::<=*/ <= 2.0;
-var /*@topType=double*/ a_modulo = 1.0 /*@target=double::%*/ % 2.0;
+var a_equal = 1.0 /*@target=num::==*/ == 2.0;
+var a_notEqual = 1.0 /*@target=num::==*/ != 2.0;
+var a_add = 1.0 /*@target=double::+*/ + 2.0;
+var a_subtract = 1.0 /*@target=double::-*/ - 2.0;
+var a_multiply = 1.0 /*@target=double::**/ * 2.0;
+var a_divide = 1.0 /*@target=double::/ */ / 2.0;
+var a_floorDivide = 1.0 /*@target=double::~/ */ ~/ 2.0;
+var a_greater = 1.0 /*@target=num::>*/ > 2.0;
+var a_less = 1.0 /*@target=num::<*/ < 2.0;
+var a_greaterEqual = 1.0 /*@target=num::>=*/ >= 2.0;
+var a_lessEqual = 1.0 /*@target=num::<=*/ <= 2.0;
+var a_modulo = 1.0 /*@target=double::%*/ % 2.0;
 
 main() {
   a_equal;
diff --git a/pkg/front_end/testcases/inference/infer_binary_double_int.dart b/pkg/front_end/testcases/inference/infer_binary_double_int.dart
index 00d3420..7794c6d 100644
--- a/pkg/front_end/testcases/inference/infer_binary_double_int.dart
+++ b/pkg/front_end/testcases/inference/infer_binary_double_int.dart
@@ -5,18 +5,18 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=bool*/ a_equal = 1.0 /*@target=num::==*/ == 2;
-var /*@topType=bool*/ a_notEqual = 1.0 /*@target=num::==*/ != 2;
-var /*@topType=double*/ a_add = 1.0 /*@target=double::+*/ + 2;
-var /*@topType=double*/ a_subtract = 1.0 /*@target=double::-*/ - 2;
-var /*@topType=double*/ a_multiply = 1.0 /*@target=double::**/ * 2;
-var /*@topType=double*/ a_divide = 1.0 /*@target=double::/ */ / 2;
-var /*@topType=int*/ a_floorDivide = 1.0 /*@target=double::~/ */ ~/ 2;
-var /*@topType=bool*/ a_greater = 1.0 /*@target=num::>*/ > 2;
-var /*@topType=bool*/ a_less = 1.0 /*@target=num::<*/ < 2;
-var /*@topType=bool*/ a_greaterEqual = 1.0 /*@target=num::>=*/ >= 2;
-var /*@topType=bool*/ a_lessEqual = 1.0 /*@target=num::<=*/ <= 2;
-var /*@topType=double*/ a_modulo = 1.0 /*@target=double::%*/ % 2;
+var a_equal = 1.0 /*@target=num::==*/ == 2;
+var a_notEqual = 1.0 /*@target=num::==*/ != 2;
+var a_add = 1.0 /*@target=double::+*/ + 2;
+var a_subtract = 1.0 /*@target=double::-*/ - 2;
+var a_multiply = 1.0 /*@target=double::**/ * 2;
+var a_divide = 1.0 /*@target=double::/ */ / 2;
+var a_floorDivide = 1.0 /*@target=double::~/ */ ~/ 2;
+var a_greater = 1.0 /*@target=num::>*/ > 2;
+var a_less = 1.0 /*@target=num::<*/ < 2;
+var a_greaterEqual = 1.0 /*@target=num::>=*/ >= 2;
+var a_lessEqual = 1.0 /*@target=num::<=*/ <= 2;
+var a_modulo = 1.0 /*@target=double::%*/ % 2;
 
 main() {
   a_equal;
diff --git a/pkg/front_end/testcases/inference/infer_binary_int_double.dart b/pkg/front_end/testcases/inference/infer_binary_int_double.dart
index 7d85e62..64d270f 100644
--- a/pkg/front_end/testcases/inference/infer_binary_int_double.dart
+++ b/pkg/front_end/testcases/inference/infer_binary_int_double.dart
@@ -5,18 +5,18 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=bool*/ a_equal = 1 /*@target=num::==*/ == 2.0;
-var /*@topType=bool*/ a_notEqual = 1 /*@target=num::==*/ != 2.0;
-var /*@topType=double*/ a_add = 1 /*@target=num::+*/ + 2.0;
-var /*@topType=double*/ a_subtract = 1 /*@target=num::-*/ - 2.0;
-var /*@topType=double*/ a_multiply = 1 /*@target=num::**/ * 2.0;
-var /*@topType=double*/ a_divide = 1 /*@target=num::/ */ / 2.0;
-var /*@topType=int*/ a_floorDivide = 1 /*@target=num::~/ */ ~/ 2.0;
-var /*@topType=bool*/ a_greater = 1 /*@target=num::>*/ > 2.0;
-var /*@topType=bool*/ a_less = 1 /*@target=num::<*/ < 2.0;
-var /*@topType=bool*/ a_greaterEqual = 1 /*@target=num::>=*/ >= 2.0;
-var /*@topType=bool*/ a_lessEqual = 1 /*@target=num::<=*/ <= 2.0;
-var /*@topType=double*/ a_modulo = 1 /*@target=num::%*/ % 2.0;
+var a_equal = 1 /*@target=num::==*/ == 2.0;
+var a_notEqual = 1 /*@target=num::==*/ != 2.0;
+var a_add = 1 /*@target=num::+*/ + 2.0;
+var a_subtract = 1 /*@target=num::-*/ - 2.0;
+var a_multiply = 1 /*@target=num::**/ * 2.0;
+var a_divide = 1 /*@target=num::/ */ / 2.0;
+var a_floorDivide = 1 /*@target=num::~/ */ ~/ 2.0;
+var a_greater = 1 /*@target=num::>*/ > 2.0;
+var a_less = 1 /*@target=num::<*/ < 2.0;
+var a_greaterEqual = 1 /*@target=num::>=*/ >= 2.0;
+var a_lessEqual = 1 /*@target=num::<=*/ <= 2.0;
+var a_modulo = 1 /*@target=num::%*/ % 2.0;
 
 main() {
   a_equal;
diff --git a/pkg/front_end/testcases/inference/infer_binary_int_int.dart b/pkg/front_end/testcases/inference/infer_binary_int_int.dart
index 1f22bd7..7283155 100644
--- a/pkg/front_end/testcases/inference/infer_binary_int_int.dart
+++ b/pkg/front_end/testcases/inference/infer_binary_int_int.dart
@@ -5,23 +5,23 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=bool*/ a_equal = 1 /*@target=num::==*/ == 2;
-var /*@topType=bool*/ a_notEqual = 1 /*@target=num::==*/ != 2;
-var /*@topType=int*/ a_bitXor = 1 /*@target=int::^*/ ^ 2;
-var /*@topType=int*/ a_bitAnd = 1 /*@target=int::&*/ & 2;
-var /*@topType=int*/ a_bitOr = 1 /*@target=int::|*/ | 2;
-var /*@topType=int*/ a_bitShiftRight = 1 /*@target=int::>>*/ >> 2;
-var /*@topType=int*/ a_bitShiftLeft = 1 /*@target=int::<<*/ << 2;
-var /*@topType=int*/ a_add = 1 /*@target=num::+*/ + 2;
-var /*@topType=int*/ a_subtract = 1 /*@target=num::-*/ - 2;
-var /*@topType=int*/ a_multiply = 1 /*@target=num::**/ * 2;
-var /*@topType=double*/ a_divide = 1 /*@target=num::/ */ / 2;
-var /*@topType=int*/ a_floorDivide = 1 /*@target=num::~/ */ ~/ 2;
-var /*@topType=bool*/ a_greater = 1 /*@target=num::>*/ > 2;
-var /*@topType=bool*/ a_less = 1 /*@target=num::<*/ < 2;
-var /*@topType=bool*/ a_greaterEqual = 1 /*@target=num::>=*/ >= 2;
-var /*@topType=bool*/ a_lessEqual = 1 /*@target=num::<=*/ <= 2;
-var /*@topType=int*/ a_modulo = 1 /*@target=num::%*/ % 2;
+var a_equal = 1 /*@target=num::==*/ == 2;
+var a_notEqual = 1 /*@target=num::==*/ != 2;
+var a_bitXor = 1 /*@target=int::^*/ ^ 2;
+var a_bitAnd = 1 /*@target=int::&*/ & 2;
+var a_bitOr = 1 /*@target=int::|*/ | 2;
+var a_bitShiftRight = 1 /*@target=int::>>*/ >> 2;
+var a_bitShiftLeft = 1 /*@target=int::<<*/ << 2;
+var a_add = 1 /*@target=num::+*/ + 2;
+var a_subtract = 1 /*@target=num::-*/ - 2;
+var a_multiply = 1 /*@target=num::**/ * 2;
+var a_divide = 1 /*@target=num::/ */ / 2;
+var a_floorDivide = 1 /*@target=num::~/ */ ~/ 2;
+var a_greater = 1 /*@target=num::>*/ > 2;
+var a_less = 1 /*@target=num::<*/ < 2;
+var a_greaterEqual = 1 /*@target=num::>=*/ >= 2;
+var a_lessEqual = 1 /*@target=num::<=*/ <= 2;
+var a_modulo = 1 /*@target=num::%*/ % 2;
 
 main() {
   a_equal;
diff --git a/pkg/front_end/testcases/inference/infer_conditional.dart b/pkg/front_end/testcases/inference/infer_conditional.dart
index 042a3a1..26bc6ea 100644
--- a/pkg/front_end/testcases/inference/infer_conditional.dart
+++ b/pkg/front_end/testcases/inference/infer_conditional.dart
@@ -5,8 +5,8 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=num*/ a = 1 /*@target=num::==*/ == 2 ? 1 : 2.0;
-var /*@topType=num*/ b = 1 /*@target=num::==*/ == 2 ? 1.0 : 2;
+var a = 1 /*@target=num::==*/ == 2 ? 1 : 2.0;
+var b = 1 /*@target=num::==*/ == 2 ? 1.0 : 2;
 
 main() {
   a;
diff --git a/pkg/front_end/testcases/inference/infer_consts_transitively_2.dart b/pkg/front_end/testcases/inference/infer_consts_transitively_2.dart
index 1159b22..a86c249 100644
--- a/pkg/front_end/testcases/inference/infer_consts_transitively_2.dart
+++ b/pkg/front_end/testcases/inference/infer_consts_transitively_2.dart
@@ -7,8 +7,8 @@
 
 import 'infer_consts_transitively_2_a.dart';
 
-const /*@topType=int*/ m1 = a1;
-const /*@topType=int*/ m2 = a2;
+const m1 = a1;
+const m2 = a2;
 
 foo() {
   int i;
diff --git a/pkg/front_end/testcases/inference/infer_consts_transitively_2.dart.legacy.expect b/pkg/front_end/testcases/inference/infer_consts_transitively_2.dart.legacy.expect
index 0998224..80d04c7 100644
--- a/pkg/front_end/testcases/inference/infer_consts_transitively_2.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/infer_consts_transitively_2.dart.legacy.expect
@@ -1,7 +1,7 @@
 library test;
 import self as self;
 import "dart:core" as core;
-import "./infer_consts_transitively_2_a.dart" as inf;
+import "infer_consts_transitively_2_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_consts_transitively_2_a.dart";
 
@@ -15,8 +15,8 @@
 
 library;
 import self as inf;
-import "./infer_consts_transitively_2.dart" as self;
-import "./infer_consts_transitively_2_b.dart" as inf2;
+import "infer_consts_transitively_2.dart" as self;
+import "infer_consts_transitively_2_b.dart" as inf2;
 
 import "org-dartlang-testcase:///infer_consts_transitively_2.dart";
 import "org-dartlang-testcase:///infer_consts_transitively_2_b.dart";
diff --git a/pkg/front_end/testcases/inference/infer_consts_transitively_2.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_consts_transitively_2.dart.legacy.transformed.expect
index 0998224..80d04c7 100644
--- a/pkg/front_end/testcases/inference/infer_consts_transitively_2.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_consts_transitively_2.dart.legacy.transformed.expect
@@ -1,7 +1,7 @@
 library test;
 import self as self;
 import "dart:core" as core;
-import "./infer_consts_transitively_2_a.dart" as inf;
+import "infer_consts_transitively_2_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_consts_transitively_2_a.dart";
 
@@ -15,8 +15,8 @@
 
 library;
 import self as inf;
-import "./infer_consts_transitively_2.dart" as self;
-import "./infer_consts_transitively_2_b.dart" as inf2;
+import "infer_consts_transitively_2.dart" as self;
+import "infer_consts_transitively_2_b.dart" as inf2;
 
 import "org-dartlang-testcase:///infer_consts_transitively_2.dart";
 import "org-dartlang-testcase:///infer_consts_transitively_2_b.dart";
diff --git a/pkg/front_end/testcases/inference/infer_consts_transitively_2.dart.strong.expect b/pkg/front_end/testcases/inference/infer_consts_transitively_2.dart.strong.expect
index 3530a86..d434a70 100644
--- a/pkg/front_end/testcases/inference/infer_consts_transitively_2.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/infer_consts_transitively_2.dart.strong.expect
@@ -1,7 +1,7 @@
 library test;
 import self as self;
 import "dart:core" as core;
-import "./infer_consts_transitively_2_a.dart" as inf;
+import "infer_consts_transitively_2_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_consts_transitively_2_a.dart";
 
@@ -16,8 +16,8 @@
 library;
 import self as inf;
 import "dart:core" as core;
-import "./infer_consts_transitively_2.dart" as self;
-import "./infer_consts_transitively_2_b.dart" as inf2;
+import "infer_consts_transitively_2.dart" as self;
+import "infer_consts_transitively_2_b.dart" as inf2;
 
 import "org-dartlang-testcase:///infer_consts_transitively_2.dart";
 import "org-dartlang-testcase:///infer_consts_transitively_2_b.dart";
diff --git a/pkg/front_end/testcases/inference/infer_consts_transitively_2.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/infer_consts_transitively_2.dart.strong.transformed.expect
index 3530a86..d434a70 100644
--- a/pkg/front_end/testcases/inference/infer_consts_transitively_2.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_consts_transitively_2.dart.strong.transformed.expect
@@ -1,7 +1,7 @@
 library test;
 import self as self;
 import "dart:core" as core;
-import "./infer_consts_transitively_2_a.dart" as inf;
+import "infer_consts_transitively_2_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_consts_transitively_2_a.dart";
 
@@ -16,8 +16,8 @@
 library;
 import self as inf;
 import "dart:core" as core;
-import "./infer_consts_transitively_2.dart" as self;
-import "./infer_consts_transitively_2_b.dart" as inf2;
+import "infer_consts_transitively_2.dart" as self;
+import "infer_consts_transitively_2_b.dart" as inf2;
 
 import "org-dartlang-testcase:///infer_consts_transitively_2.dart";
 import "org-dartlang-testcase:///infer_consts_transitively_2_b.dart";
diff --git a/pkg/front_end/testcases/inference/infer_consts_transitively_2.dart.type_promotion.expect b/pkg/front_end/testcases/inference/infer_consts_transitively_2.dart.type_promotion.expect
index 3628855..d118f42 100644
--- a/pkg/front_end/testcases/inference/infer_consts_transitively_2.dart.type_promotion.expect
+++ b/pkg/front_end/testcases/inference/infer_consts_transitively_2.dart.type_promotion.expect
@@ -1,3 +1,3 @@
-pkg/front_end/testcases/inference/infer_consts_transitively_2.dart:15:5: Context: Write to i@387
+pkg/front_end/testcases/inference/infer_consts_transitively_2.dart:15:5: Context: Write to i@353
   i = m1;
     ^
diff --git a/pkg/front_end/testcases/inference/infer_consts_transitively_2_a.dart b/pkg/front_end/testcases/inference/infer_consts_transitively_2_a.dart
index 05643fe..25fcf76 100644
--- a/pkg/front_end/testcases/inference/infer_consts_transitively_2_a.dart
+++ b/pkg/front_end/testcases/inference/infer_consts_transitively_2_a.dart
@@ -7,7 +7,7 @@
 import 'infer_consts_transitively_2.dart';
 import 'infer_consts_transitively_2_b.dart';
 
-const /*@topType=int*/ a1 = m2;
-const /*@topType=int*/ a2 = b1;
+const a1 = m2;
+const a2 = b1;
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_consts_transitively_2_a.dart.legacy.expect b/pkg/front_end/testcases/inference/infer_consts_transitively_2_a.dart.legacy.expect
index c06662b..6fa0ac1 100644
--- a/pkg/front_end/testcases/inference/infer_consts_transitively_2_a.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/infer_consts_transitively_2_a.dart.legacy.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
-import "./infer_consts_transitively_2.dart" as test;
-import "./infer_consts_transitively_2_b.dart" as inf;
+import "infer_consts_transitively_2.dart" as test;
+import "infer_consts_transitively_2_b.dart" as inf;
 
 import "org-dartlang-testcase:///infer_consts_transitively_2.dart";
 import "org-dartlang-testcase:///infer_consts_transitively_2_b.dart";
@@ -13,7 +13,7 @@
 library test;
 import self as test;
 import "dart:core" as core;
-import "./infer_consts_transitively_2_a.dart" as self;
+import "infer_consts_transitively_2_a.dart" as self;
 
 import "org-dartlang-testcase:///infer_consts_transitively_2_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_consts_transitively_2_a.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_consts_transitively_2_a.dart.legacy.transformed.expect
index c06662b..6fa0ac1 100644
--- a/pkg/front_end/testcases/inference/infer_consts_transitively_2_a.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_consts_transitively_2_a.dart.legacy.transformed.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
-import "./infer_consts_transitively_2.dart" as test;
-import "./infer_consts_transitively_2_b.dart" as inf;
+import "infer_consts_transitively_2.dart" as test;
+import "infer_consts_transitively_2_b.dart" as inf;
 
 import "org-dartlang-testcase:///infer_consts_transitively_2.dart";
 import "org-dartlang-testcase:///infer_consts_transitively_2_b.dart";
@@ -13,7 +13,7 @@
 library test;
 import self as test;
 import "dart:core" as core;
-import "./infer_consts_transitively_2_a.dart" as self;
+import "infer_consts_transitively_2_a.dart" as self;
 
 import "org-dartlang-testcase:///infer_consts_transitively_2_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_consts_transitively_2_a.dart.strong.expect b/pkg/front_end/testcases/inference/infer_consts_transitively_2_a.dart.strong.expect
index cbafa8c..f548afe 100644
--- a/pkg/front_end/testcases/inference/infer_consts_transitively_2_a.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/infer_consts_transitively_2_a.dart.strong.expect
@@ -1,8 +1,8 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./infer_consts_transitively_2.dart" as test;
-import "./infer_consts_transitively_2_b.dart" as inf;
+import "infer_consts_transitively_2.dart" as test;
+import "infer_consts_transitively_2_b.dart" as inf;
 
 import "org-dartlang-testcase:///infer_consts_transitively_2.dart";
 import "org-dartlang-testcase:///infer_consts_transitively_2_b.dart";
@@ -14,7 +14,7 @@
 library test;
 import self as test;
 import "dart:core" as core;
-import "./infer_consts_transitively_2_a.dart" as self;
+import "infer_consts_transitively_2_a.dart" as self;
 
 import "org-dartlang-testcase:///infer_consts_transitively_2_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_consts_transitively_2_a.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/infer_consts_transitively_2_a.dart.strong.transformed.expect
index cbafa8c..f548afe 100644
--- a/pkg/front_end/testcases/inference/infer_consts_transitively_2_a.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_consts_transitively_2_a.dart.strong.transformed.expect
@@ -1,8 +1,8 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./infer_consts_transitively_2.dart" as test;
-import "./infer_consts_transitively_2_b.dart" as inf;
+import "infer_consts_transitively_2.dart" as test;
+import "infer_consts_transitively_2_b.dart" as inf;
 
 import "org-dartlang-testcase:///infer_consts_transitively_2.dart";
 import "org-dartlang-testcase:///infer_consts_transitively_2_b.dart";
@@ -14,7 +14,7 @@
 library test;
 import self as test;
 import "dart:core" as core;
-import "./infer_consts_transitively_2_a.dart" as self;
+import "infer_consts_transitively_2_a.dart" as self;
 
 import "org-dartlang-testcase:///infer_consts_transitively_2_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_consts_transitively_2_b.dart b/pkg/front_end/testcases/inference/infer_consts_transitively_2_b.dart
index 6210f30..99d0034 100644
--- a/pkg/front_end/testcases/inference/infer_consts_transitively_2_b.dart
+++ b/pkg/front_end/testcases/inference/infer_consts_transitively_2_b.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*@testedFeatures=inference*/
-const /*@topType=int*/ b1 = 2;
+const b1 = 2;
 
 main() {
   b1;
diff --git a/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart b/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart
index 690be00..4acae34 100644
--- a/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart
+++ b/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart
@@ -6,16 +6,11 @@
 library test;
 
 class A {
-  var /*@topType=dynamic*/ x,
-      /*@topType=int*/ y = 2,
-      /*@topType=String*/ z = "hi";
+  var x, y = 2, z = "hi";
 }
 
 class B implements A {
-  var /*@topType=dynamic*/ x = 2,
-      /*@topType=int*/ y = 3,
-      /*@topType=String*/ z,
-      /*@topType=int*/ w = 2;
+  var x = 2, y = 3, z, w = 2;
 }
 
 foo() {
diff --git a/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.strong.expect b/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.strong.expect
index 5c42083..06929ac 100644
--- a/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.strong.expect
@@ -2,17 +2,17 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:26:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:21:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
 // Try changing the type of the left hand side, or casting the right hand side to 'String'.
 //   s = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B::y*/ y;
 //                                                              ^
 //
-// pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:28:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:23:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
 // Try changing the type of the left hand side, or casting the right hand side to 'String'.
 //   s = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B::w*/ w;
 //                                                              ^
 //
-// pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:32:62: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:27:62: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
 //   i = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B::z*/ z;
 //                                                              ^
@@ -41,18 +41,18 @@
   core::String s;
   core::int i;
   s = new self::B::•().{self::B::x} as{TypeError} core::String;
-  s = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:26:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+  s = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:21:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
 Try changing the type of the left hand side, or casting the right hand side to 'String'.
   s = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B::y*/ y;
                                                              ^" in new self::B::•().{self::B::y} as{TypeError} core::String;
   s = new self::B::•().{self::B::z};
-  s = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:28:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+  s = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:23:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
 Try changing the type of the left hand side, or casting the right hand side to 'String'.
   s = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B::w*/ w;
                                                              ^" in new self::B::•().{self::B::w} as{TypeError} core::String;
   i = new self::B::•().{self::B::x} as{TypeError} core::int;
   i = new self::B::•().{self::B::y};
-  i = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:32:62: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+  i = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:27:62: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
   i = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B::z*/ z;
                                                              ^" in new self::B::•().{self::B::z} as{TypeError} core::int;
diff --git a/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.strong.transformed.expect
index 5c42083..06929ac 100644
--- a/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.strong.transformed.expect
@@ -2,17 +2,17 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:26:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:21:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
 // Try changing the type of the left hand side, or casting the right hand side to 'String'.
 //   s = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B::y*/ y;
 //                                                              ^
 //
-// pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:28:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:23:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
 // Try changing the type of the left hand side, or casting the right hand side to 'String'.
 //   s = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B::w*/ w;
 //                                                              ^
 //
-// pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:32:62: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:27:62: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
 //   i = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B::z*/ z;
 //                                                              ^
@@ -41,18 +41,18 @@
   core::String s;
   core::int i;
   s = new self::B::•().{self::B::x} as{TypeError} core::String;
-  s = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:26:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+  s = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:21:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
 Try changing the type of the left hand side, or casting the right hand side to 'String'.
   s = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B::y*/ y;
                                                              ^" in new self::B::•().{self::B::y} as{TypeError} core::String;
   s = new self::B::•().{self::B::z};
-  s = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:28:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+  s = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:23:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
 Try changing the type of the left hand side, or casting the right hand side to 'String'.
   s = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B::w*/ w;
                                                              ^" in new self::B::•().{self::B::w} as{TypeError} core::String;
   i = new self::B::•().{self::B::x} as{TypeError} core::int;
   i = new self::B::•().{self::B::y};
-  i = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:32:62: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+  i = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:27:62: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
   i = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B::z*/ z;
                                                              ^" in new self::B::•().{self::B::z} as{TypeError} core::int;
diff --git a/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.type_promotion.expect b/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.type_promotion.expect
index 7c9fd70..eeb9f3c 100644
--- a/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.type_promotion.expect
+++ b/pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart.type_promotion.expect
@@ -1,24 +1,24 @@
-pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:25:5: Context: Write to s@537
+pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:20:5: Context: Write to s@374
   s = /*info:DYNAMIC_CAST*/ new B(). /*@target=B::x*/ x;
     ^
-pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:26:5: Context: Write to s@537
+pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:21:5: Context: Write to s@374
   s = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B::y*/ y;
     ^
-pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:27:5: Context: Write to s@537
+pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:22:5: Context: Write to s@374
   s = new B(). /*@target=B::z*/ z;
     ^
-pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:28:5: Context: Write to s@537
+pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:23:5: Context: Write to s@374
   s = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B::w*/ w;
     ^
-pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:30:5: Context: Write to i@546
+pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:25:5: Context: Write to i@383
   i = /*info:DYNAMIC_CAST*/ new B(). /*@target=B::x*/ x;
     ^
-pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:31:5: Context: Write to i@546
+pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:26:5: Context: Write to i@383
   i = new B(). /*@target=B::y*/ y;
     ^
-pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:32:5: Context: Write to i@546
+pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:27:5: Context: Write to i@383
   i = /*error:INVALID_ASSIGNMENT*/ new B(). /*@target=B::z*/ z;
     ^
-pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:33:5: Context: Write to i@546
+pkg/front_end/testcases/inference/infer_correctly_on_multiple_variables_declared_together.dart:28:5: Context: Write to i@383
   i = new B(). /*@target=B::w*/ w;
     ^
diff --git a/pkg/front_end/testcases/inference/infer_field_from_later_inferred_field.dart b/pkg/front_end/testcases/inference/infer_field_from_later_inferred_field.dart
index b2c29f6..ed04bda 100644
--- a/pkg/front_end/testcases/inference/infer_field_from_later_inferred_field.dart
+++ b/pkg/front_end/testcases/inference/infer_field_from_later_inferred_field.dart
@@ -6,11 +6,11 @@
 library test;
 
 class A implements B {
-  var /*@topType=int*/ x;
+  var x;
 }
 
 class B {
-  var /*@topType=int*/ x = 0;
+  var x = 0;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_field_from_later_inferred_field.dart.hierarchy.expect b/pkg/front_end/testcases/inference/infer_field_from_later_inferred_field.dart.hierarchy.expect
index 0d0e29f..1e44eee 100644
--- a/pkg/front_end/testcases/inference/infer_field_from_later_inferred_field.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/infer_field_from_later_inferred_field.dart.hierarchy.expect
@@ -38,6 +38,7 @@
     B.x
 
 A:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: B
diff --git a/pkg/front_end/testcases/inference/infer_field_from_later_inferred_getter.dart b/pkg/front_end/testcases/inference/infer_field_from_later_inferred_getter.dart
index 680a38b..bed6351 100644
--- a/pkg/front_end/testcases/inference/infer_field_from_later_inferred_getter.dart
+++ b/pkg/front_end/testcases/inference/infer_field_from_later_inferred_getter.dart
@@ -6,11 +6,11 @@
 library test;
 
 class A implements B {
-  var /*@topType=int*/ x;
+  var x;
 }
 
 abstract class B implements C {
-  get /*@topType=int*/ x;
+  get x;
 }
 
 abstract class C {
diff --git a/pkg/front_end/testcases/inference/infer_field_from_later_inferred_getter.dart.hierarchy.expect b/pkg/front_end/testcases/inference/infer_field_from_later_inferred_getter.dart.hierarchy.expect
index fab6c77..245115c 100644
--- a/pkg/front_end/testcases/inference/infer_field_from_later_inferred_getter.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/infer_field_from_later_inferred_getter.dart.hierarchy.expect
@@ -37,6 +37,7 @@
   classSetters:
 
 B:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: C
@@ -68,6 +69,7 @@
   interfaceSetters:
 
 A:
+  Longest path to Object: 3
   superclasses:
     Object
   interfaces: B, C
diff --git a/pkg/front_end/testcases/inference/infer_field_from_later_inferred_setter.dart b/pkg/front_end/testcases/inference/infer_field_from_later_inferred_setter.dart
index 25960b5..5d758a8 100644
--- a/pkg/front_end/testcases/inference/infer_field_from_later_inferred_setter.dart
+++ b/pkg/front_end/testcases/inference/infer_field_from_later_inferred_setter.dart
@@ -6,11 +6,11 @@
 library test;
 
 class A implements B {
-  var /*@topType=int*/ x;
+  var x;
 }
 
 abstract class B implements C {
-  void set x(/*@topType=int*/ value);
+  void set x(value);
 }
 
 abstract class C {
diff --git a/pkg/front_end/testcases/inference/infer_field_from_later_inferred_setter.dart.hierarchy.expect b/pkg/front_end/testcases/inference/infer_field_from_later_inferred_setter.dart.hierarchy.expect
index 06440ff..167ba88 100644
--- a/pkg/front_end/testcases/inference/infer_field_from_later_inferred_setter.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/infer_field_from_later_inferred_setter.dart.hierarchy.expect
@@ -37,6 +37,7 @@
     C.x
 
 B:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: C
@@ -68,6 +69,7 @@
     B.x
 
 A:
+  Longest path to Object: 3
   superclasses:
     Object
   interfaces: B, C
diff --git a/pkg/front_end/testcases/inference/infer_field_override_multiple.dart b/pkg/front_end/testcases/inference/infer_field_override_multiple.dart
index 8b6336a..7ba15bc 100644
--- a/pkg/front_end/testcases/inference/infer_field_override_multiple.dart
+++ b/pkg/front_end/testcases/inference/infer_field_override_multiple.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 abstract class A {
@@ -23,21 +23,21 @@
 
 // Superclasses have a consistent type for `x` so inferrence succeeds.
 class E extends A implements B {
-  var /*@topType=int*/ x;
+  var x;
 }
 
 // Superclasses don't have a consistent type for `x` so inference fails, even if
 // the types are related.
 class F extends A implements C {
-  var /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ x;
+  var x;
 }
 
 class G extends A implements D {
-  var /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ x;
+  var x;
 }
 
 class H extends C implements D {
-  var /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ x;
+  var x;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_field_override_multiple.dart.strong.expect b/pkg/front_end/testcases/inference/infer_field_override_multiple.dart.strong.expect
index a48dc1a..c24c0bb 100644
--- a/pkg/front_end/testcases/inference/infer_field_override_multiple.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/infer_field_override_multiple.dart.strong.expect
@@ -2,65 +2,65 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:32:163: Error: Can't infer the type of 'x': overridden members must all have the same type.
-// Specify the type explicitly.
-//   var /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ x;
-//                                                                                                                                                                   ^
+// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:32:7: Error: Can't infer a type for 'x' as some of the inherited members have different types.
+// Try adding an explicit type.
+//   var x;
+//       ^
 //
-// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:36:163: Error: Can't infer the type of 'x': overridden members must all have the same type.
-// Specify the type explicitly.
-//   var /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ x;
-//                                                                                                                                                                   ^
+// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:36:7: Error: Can't infer a type for 'x' as some of the inherited members have different types.
+// Try adding an explicit type.
+//   var x;
+//       ^
 //
-// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:40:163: Error: Can't infer the type of 'x': overridden members must all have the same type.
-// Specify the type explicitly.
-//   var /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ x;
-//                                                                                                                                                                   ^
+// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:40:7: Error: Can't infer a type for 'x' as some of the inherited members have different types.
+// Try adding an explicit type.
+//   var x;
+//       ^
 //
-// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:32:163: Error: The return type of the method 'F.x' is 'dynamic', which does not match the return type of the overridden method, 'int'.
+// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:32:7: Error: The return type of the method 'F.x' is 'dynamic', which does not match the return type, 'int', of the overridden method, 'A.x'.
 // Change to a subtype of 'int'.
-//   var /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ x;
-//                                                                                                                                                                   ^
+//   var x;
+//       ^
 // pkg/front_end/testcases/inference/infer_field_override_multiple.dart:9:11: Context: This is the overridden method ('x').
 //   int get x;
 //           ^
 //
-// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:32:163: Error: The return type of the method 'F.x' is 'dynamic', which does not match the return type of the overridden method, 'num'.
+// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:32:7: Error: The return type of the method 'F.x' is 'dynamic', which does not match the return type, 'num', of the overridden method, 'C.x'.
 // Change to a subtype of 'num'.
-//   var /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ x;
-//                                                                                                                                                                   ^
+//   var x;
+//       ^
 // pkg/front_end/testcases/inference/infer_field_override_multiple.dart:17:11: Context: This is the overridden method ('x').
 //   num get x;
 //           ^
 //
-// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:36:163: Error: The return type of the method 'G.x' is 'dynamic', which does not match the return type of the overridden method, 'int'.
+// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:36:7: Error: The return type of the method 'G.x' is 'dynamic', which does not match the return type, 'int', of the overridden method, 'A.x'.
 // Change to a subtype of 'int'.
-//   var /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ x;
-//                                                                                                                                                                   ^
+//   var x;
+//       ^
 // pkg/front_end/testcases/inference/infer_field_override_multiple.dart:9:11: Context: This is the overridden method ('x').
 //   int get x;
 //           ^
 //
-// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:36:163: Error: The return type of the method 'G.x' is 'dynamic', which does not match the return type of the overridden method, 'double'.
+// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:36:7: Error: The return type of the method 'G.x' is 'dynamic', which does not match the return type, 'double', of the overridden method, 'D.x'.
 // Change to a subtype of 'double'.
-//   var /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ x;
-//                                                                                                                                                                   ^
+//   var x;
+//       ^
 // pkg/front_end/testcases/inference/infer_field_override_multiple.dart:21:14: Context: This is the overridden method ('x').
 //   double get x;
 //              ^
 //
-// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:40:163: Error: The return type of the method 'H.x' is 'dynamic', which does not match the return type of the overridden method, 'num'.
+// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:40:7: Error: The return type of the method 'H.x' is 'dynamic', which does not match the return type, 'num', of the overridden method, 'C.x'.
 // Change to a subtype of 'num'.
-//   var /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ x;
-//                                                                                                                                                                   ^
+//   var x;
+//       ^
 // pkg/front_end/testcases/inference/infer_field_override_multiple.dart:17:11: Context: This is the overridden method ('x').
 //   num get x;
 //           ^
 //
-// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:40:163: Error: The return type of the method 'H.x' is 'dynamic', which does not match the return type of the overridden method, 'double'.
+// pkg/front_end/testcases/inference/infer_field_override_multiple.dart:40:7: Error: The return type of the method 'H.x' is 'dynamic', which does not match the return type, 'double', of the overridden method, 'D.x'.
 // Change to a subtype of 'double'.
-//   var /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ /*@error=OverrideTypeMismatchReturnType*/ /*@error=OverrideTypeMismatchReturnType*/ x;
-//                                                                                                                                                                   ^
+//   var x;
+//       ^
 // pkg/front_end/testcases/inference/infer_field_override_multiple.dart:21:14: Context: This is the overridden method ('x').
 //   double get x;
 //              ^
diff --git a/pkg/front_end/testcases/inference/infer_field_override_of_override.dart b/pkg/front_end/testcases/inference/infer_field_override_of_override.dart
index c1438e7..fe84499 100644
--- a/pkg/front_end/testcases/inference/infer_field_override_of_override.dart
+++ b/pkg/front_end/testcases/inference/infer_field_override_of_override.dart
@@ -14,7 +14,7 @@
 }
 
 class C extends B {
-  var /*@topType=int*/ x;
+  var x;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart b/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart
index 966ead8..eaa800f 100644
--- a/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart
+++ b/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart
@@ -12,9 +12,9 @@
 }
 
 class B extends A<int> {
-  var /*@topType=List<int>*/ x;
-  var /*@topType=List<int>*/ y;
-  var /*@topType=List<int>*/ z;
+  var x;
+  var y;
+  var z;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.legacy.expect b/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.legacy.expect
index 0ca493c..6e31b6d 100644
--- a/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.legacy.expect
@@ -3,12 +3,12 @@
 import "dart:core" as core;
 
 abstract class A<T extends core::Object = dynamic> extends core::Object {
-  field core::List<self::A::T> z = null;
+  generic-covariant-impl field core::List<self::A::T> z = null;
   synthetic constructor •() → self::A<self::A::T>
     : super core::Object::•()
     ;
   abstract get x() → core::List<self::A::T>;
-  abstract set y(core::List<self::A::T> value) → void;
+  abstract set y(generic-covariant-impl core::List<self::A::T> value) → void;
 }
 class B extends self::A<core::int> {
   field dynamic x = null;
diff --git a/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.legacy.transformed.expect
index 0ca493c..6e31b6d 100644
--- a/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.legacy.transformed.expect
@@ -3,12 +3,12 @@
 import "dart:core" as core;
 
 abstract class A<T extends core::Object = dynamic> extends core::Object {
-  field core::List<self::A::T> z = null;
+  generic-covariant-impl field core::List<self::A::T> z = null;
   synthetic constructor •() → self::A<self::A::T>
     : super core::Object::•()
     ;
   abstract get x() → core::List<self::A::T>;
-  abstract set y(core::List<self::A::T> value) → void;
+  abstract set y(generic-covariant-impl core::List<self::A::T> value) → void;
 }
 class B extends self::A<core::int> {
   field dynamic x = null;
diff --git a/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.outline.expect b/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.outline.expect
index 71b6a0a..2fc6225 100644
--- a/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/infer_field_override_with_substitution.dart.outline.expect
@@ -3,11 +3,11 @@
 import "dart:core" as core;
 
 abstract class A<T extends core::Object = dynamic> extends core::Object {
-  field core::List<self::A::T> z;
+  generic-covariant-impl field core::List<self::A::T> z;
   synthetic constructor •() → self::A<self::A::T>
     ;
   abstract get x() → core::List<self::A::T>;
-  abstract set y(core::List<self::A::T> value) → void;
+  abstract set y(generic-covariant-impl core::List<self::A::T> value) → void;
 }
 class B extends self::A<core::int> {
   field dynamic x;
diff --git a/pkg/front_end/testcases/inference/infer_field_overrides_getter.dart b/pkg/front_end/testcases/inference/infer_field_overrides_getter.dart
index 753c60d..04bc378 100644
--- a/pkg/front_end/testcases/inference/infer_field_overrides_getter.dart
+++ b/pkg/front_end/testcases/inference/infer_field_overrides_getter.dart
@@ -14,23 +14,23 @@
 }
 
 class C extends A {
-  var /*@topType=int*/ x;
+  var x;
 }
 
 class D extends B {
-  var /*@topType=int*/ x;
+  var x;
 }
 
 class E implements A {
-  var /*@topType=int*/ x;
+  var x;
 }
 
 class F implements B {
-  var /*@topType=int*/ x;
+  var x;
 }
 
 class G extends Object with B {
-  var /*@topType=int*/ x;
+  var x;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_field_overrides_getter.dart.hierarchy.expect b/pkg/front_end/testcases/inference/infer_field_overrides_getter.dart.hierarchy.expect
index d7a8370..26fee5a 100644
--- a/pkg/front_end/testcases/inference/infer_field_overrides_getter.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/infer_field_overrides_getter.dart.hierarchy.expect
@@ -95,6 +95,7 @@
     D.x
 
 E:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: A
@@ -128,6 +129,7 @@
     E.x
 
 F:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: B
@@ -161,6 +163,7 @@
     F.x
 
 Object with B:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: B
@@ -192,6 +195,7 @@
   interfaceSetters:
 
 G:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _G&Object&B
diff --git a/pkg/front_end/testcases/inference/infer_field_overrides_setter.dart b/pkg/front_end/testcases/inference/infer_field_overrides_setter.dart
index 6b58152..2bbf71a 100644
--- a/pkg/front_end/testcases/inference/infer_field_overrides_setter.dart
+++ b/pkg/front_end/testcases/inference/infer_field_overrides_setter.dart
@@ -14,23 +14,23 @@
 }
 
 class C extends A {
-  var /*@topType=int*/ x;
+  var x;
 }
 
 class D extends B {
-  var /*@topType=int*/ x;
+  var x;
 }
 
 class E implements A {
-  var /*@topType=int*/ x;
+  var x;
 }
 
 class F implements B {
-  var /*@topType=int*/ x;
+  var x;
 }
 
 class G extends Object with B {
-  var /*@topType=int*/ x;
+  var x;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_field_overrides_setter.dart.hierarchy.expect b/pkg/front_end/testcases/inference/infer_field_overrides_setter.dart.hierarchy.expect
index 20d7855..66315ee 100644
--- a/pkg/front_end/testcases/inference/infer_field_overrides_setter.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/infer_field_overrides_setter.dart.hierarchy.expect
@@ -95,6 +95,7 @@
     D.x
 
 E:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: A
@@ -128,6 +129,7 @@
     E.x
 
 F:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: B
@@ -161,6 +163,7 @@
     F.x
 
 Object with B:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: B
@@ -192,6 +195,7 @@
     B.x
 
 G:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _G&Object&B
diff --git a/pkg/front_end/testcases/inference/infer_field_static.dart b/pkg/front_end/testcases/inference/infer_field_static.dart
index d5ddfbc..619762f 100644
--- a/pkg/front_end/testcases/inference/infer_field_static.dart
+++ b/pkg/front_end/testcases/inference/infer_field_static.dart
@@ -15,7 +15,7 @@
 // So B.x doesn't inherit A.x's type.
 
 class B extends A {
-  static var /*@topType=dynamic*/ x = f();
+  static var x = f();
 }
 
 // Similar with C.x.  It is not even eligible for inference since it's static
diff --git a/pkg/front_end/testcases/inference/infer_final_field_getter_and_setter.dart b/pkg/front_end/testcases/inference/infer_final_field_getter_and_setter.dart
index 185cb96..64260b8 100644
--- a/pkg/front_end/testcases/inference/infer_final_field_getter_and_setter.dart
+++ b/pkg/front_end/testcases/inference/infer_final_field_getter_and_setter.dart
@@ -11,7 +11,7 @@
 }
 
 class B extends A {
-  final /*@topType=int*/ x;
+  final x;
 
   B(this.x);
 }
diff --git a/pkg/front_end/testcases/inference/infer_final_field_getter_only.dart b/pkg/front_end/testcases/inference/infer_final_field_getter_only.dart
index fc4531b3..7f0c3b0 100644
--- a/pkg/front_end/testcases/inference/infer_final_field_getter_only.dart
+++ b/pkg/front_end/testcases/inference/infer_final_field_getter_only.dart
@@ -10,7 +10,7 @@
 }
 
 class B extends A {
-  final /*@topType=int*/ x;
+  final x;
 
   B(this.x);
 }
diff --git a/pkg/front_end/testcases/inference/infer_final_field_setter_only.dart b/pkg/front_end/testcases/inference/infer_final_field_setter_only.dart
index 39ed20b..15aaf46 100644
--- a/pkg/front_end/testcases/inference/infer_final_field_setter_only.dart
+++ b/pkg/front_end/testcases/inference/infer_final_field_setter_only.dart
@@ -10,7 +10,7 @@
 }
 
 class B extends A {
-  final /*@topType=double*/ x;
+  final x;
 
   B(this.x);
 }
diff --git a/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart b/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart
index 3b9b207..ec28367 100644
--- a/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart
+++ b/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart
@@ -7,32 +7,30 @@
 
 class A {
   int x;
-  B operator +(/*@topType=dynamic*/ other) => null;
+  B operator +(other) => null;
 }
 
 class B extends A {
   B(ignore);
 }
 
-var /*@topType=A*/ a = new A();
+var a = new A();
 // Note: it doesn't matter that some of these refer to 'x'.
-var /*@topType=B*/ b = new B(/*error:UNDEFINED_IDENTIFIER*/ x); // allocations
-var /*@topType=List<dynamic>*/ c1 = /*@typeArgs=dynamic*/ [
+var b = new B(/*error:UNDEFINED_IDENTIFIER*/ x); // allocations
+var c1 = /*@typeArgs=dynamic*/ [
   /*error:UNDEFINED_IDENTIFIER*/ x
 ]; // list literals
-var /*@topType=List<dynamic>*/ c2 = /*@typeArgs=dynamic*/ const [];
-var /*@topType=Map<dynamic, dynamic>*/ d = <dynamic, dynamic>{
-  'a': 'b'
-}; // map literals
-var /*@topType=A*/ e = new A().. /*@target=A::x*/ x = 3; // cascades
-var /*@topType=int*/ f =
+var c2 = /*@typeArgs=dynamic*/ const [];
+var d = <dynamic, dynamic>{'a': 'b'}; // map literals
+var e = new A().. /*@target=A::x*/ x = 3; // cascades
+var f =
     2 /*@target=num::+*/ + 3; // binary expressions are OK if the left operand
 // is from a library in a different strongest
 // conected component.
-var /*@topType=int*/ g = /*@target=int::unary-*/ -3;
-var /*@topType=B*/ h = new A() /*@target=A::+*/ + 3;
-var /*@topType=dynamic*/ i = /*error:UNDEFINED_OPERATOR,info:DYNAMIC_INVOKE*/ -new A();
-var /*@topType=B*/ j = /*info:UNNECESSARY_CAST*/ null as B;
+var g = /*@target=int::unary-*/ -3;
+var h = new A() /*@target=A::+*/ + 3;
+var i = /*error:UNDEFINED_OPERATOR,info:DYNAMIC_INVOKE*/ -new A();
+var j = /*info:UNNECESSARY_CAST*/ null as B;
 
 test1() {
   a = /*error:INVALID_ASSIGNMENT*/ "hi";
diff --git a/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.legacy.expect b/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.legacy.expect
index 7ccc813..7004d74 100644
--- a/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.legacy.expect
@@ -2,9 +2,9 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:19:61: Warning: Getter not found: 'x'.
-// var /*@topType=B*/ b = new B(/*error:UNDEFINED_IDENTIFIER*/ x); // allocations
-//                                                             ^
+// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:19:46: Warning: Getter not found: 'x'.
+// var b = new B(/*error:UNDEFINED_IDENTIFIER*/ x); // allocations
+//                                              ^
 //
 // pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:21:34: Warning: Getter not found: 'x'.
 //   /*error:UNDEFINED_IDENTIFIER*/ x
diff --git a/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.legacy.transformed.expect
index 7ccc813..7004d74 100644
--- a/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.legacy.transformed.expect
@@ -2,9 +2,9 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:19:61: Warning: Getter not found: 'x'.
-// var /*@topType=B*/ b = new B(/*error:UNDEFINED_IDENTIFIER*/ x); // allocations
-//                                                             ^
+// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:19:46: Warning: Getter not found: 'x'.
+// var b = new B(/*error:UNDEFINED_IDENTIFIER*/ x); // allocations
+//                                              ^
 //
 // pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:21:34: Warning: Getter not found: 'x'.
 //   /*error:UNDEFINED_IDENTIFIER*/ x
diff --git a/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.strong.expect b/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.strong.expect
index 0b2998b..4002d85 100644
--- a/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.strong.expect
@@ -2,82 +2,82 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:19:61: Error: Getter not found: 'x'.
-// var /*@topType=B*/ b = new B(/*error:UNDEFINED_IDENTIFIER*/ x); // allocations
-//                                                             ^
+// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:19:46: Error: Getter not found: 'x'.
+// var b = new B(/*error:UNDEFINED_IDENTIFIER*/ x); // allocations
+//                                              ^
 //
 // pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:21:34: Error: Getter not found: 'x'.
 //   /*error:UNDEFINED_IDENTIFIER*/ x
 //                                  ^
 //
-// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:34:79: Error: The method 'unary-' isn't defined for the class 'A'.
+// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:32:58: Error: The method 'unary-' isn't defined for the class 'A'.
 //  - 'A' is from 'pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart'.
 // Try correcting the name to the name of an existing method, or defining a method named 'unary-'.
-// var /*@topType=dynamic*/ i = /*error:UNDEFINED_OPERATOR,info:DYNAMIC_INVOKE*/ -new A();
-//                                                                               ^
+// var i = /*error:UNDEFINED_OPERATOR,info:DYNAMIC_INVOKE*/ -new A();
+//                                                          ^
 //
-// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:38:36: Error: A value of type 'String' can't be assigned to a variable of type 'A'.
+// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:36:36: Error: A value of type 'String' can't be assigned to a variable of type 'A'.
 //  - 'A' is from 'pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart'.
 // Try changing the type of the left hand side, or casting the right hand side to 'A'.
 //   a = /*error:INVALID_ASSIGNMENT*/ "hi";
 //                                    ^
 //
-// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:40:36: Error: A value of type 'String' can't be assigned to a variable of type 'B'.
+// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:38:36: Error: A value of type 'String' can't be assigned to a variable of type 'B'.
 //  - 'B' is from 'pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart'.
 // Try changing the type of the left hand side, or casting the right hand side to 'B'.
 //   b = /*error:INVALID_ASSIGNMENT*/ "hi";
 //                                    ^
 //
-// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:43:59: Error: A value of type 'Set<dynamic>' can't be assigned to a variable of type 'List<dynamic>'.
+// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:41:59: Error: A value of type 'Set<dynamic>' can't be assigned to a variable of type 'List<dynamic>'.
 //  - 'Set' is from 'dart:core'.
 //  - 'List' is from 'dart:core'.
 // Try changing the type of the left hand side, or casting the right hand side to 'List<dynamic>'.
 //   c1 = /*error:INVALID_ASSIGNMENT*/ /*@typeArgs=dynamic*/ {};
 //                                                           ^
 //
-// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:45:59: Error: A value of type 'Set<dynamic>' can't be assigned to a variable of type 'List<dynamic>'.
+// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:43:59: Error: A value of type 'Set<dynamic>' can't be assigned to a variable of type 'List<dynamic>'.
 //  - 'Set' is from 'dart:core'.
 //  - 'List' is from 'dart:core'.
 // Try changing the type of the left hand side, or casting the right hand side to 'List<dynamic>'.
 //   c2 = /*error:INVALID_ASSIGNMENT*/ /*@typeArgs=dynamic*/ {};
 //                                                           ^
 //
-// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:47:36: Error: A value of type 'int' can't be assigned to a variable of type 'Map<dynamic, dynamic>'.
+// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:45:36: Error: A value of type 'int' can't be assigned to a variable of type 'Map<dynamic, dynamic>'.
 //  - 'Map' is from 'dart:core'.
 // Try changing the type of the left hand side, or casting the right hand side to 'Map<dynamic, dynamic>'.
 //   d = /*error:INVALID_ASSIGNMENT*/ 3;
 //                                    ^
 //
-// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:49:67: Error: A value of type 'Map<dynamic, dynamic>' can't be assigned to a variable of type 'A'.
+// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:47:67: Error: A value of type 'Map<dynamic, dynamic>' can't be assigned to a variable of type 'A'.
 //  - 'Map' is from 'dart:core'.
 //  - 'A' is from 'pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart'.
 // Try changing the type of the left hand side, or casting the right hand side to 'A'.
 //   e = /*error:INVALID_ASSIGNMENT*/ /*@typeArgs=dynamic, dynamic*/ {};
 //                                                                   ^
 //
-// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:51:36: Error: A value of type 'bool' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:49:36: Error: A value of type 'bool' can't be assigned to a variable of type 'int'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
 //   f = /*error:INVALID_ASSIGNMENT*/ false;
 //                                    ^
 //
-// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:53:36: Error: A value of type 'bool' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:51:36: Error: A value of type 'bool' can't be assigned to a variable of type 'int'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
 //   g = /*error:INVALID_ASSIGNMENT*/ false;
 //                                    ^
 //
-// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:54:36: Error: A value of type 'bool' can't be assigned to a variable of type 'B'.
+// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:52:36: Error: A value of type 'bool' can't be assigned to a variable of type 'B'.
 //  - 'B' is from 'pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart'.
 // Try changing the type of the left hand side, or casting the right hand side to 'B'.
 //   h = /*error:INVALID_ASSIGNMENT*/ false;
 //                                    ^
 //
-// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:58:36: Error: A value of type 'bool' can't be assigned to a variable of type 'B'.
+// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:56:36: Error: A value of type 'bool' can't be assigned to a variable of type 'B'.
 //  - 'B' is from 'pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart'.
 // Try changing the type of the left hand side, or casting the right hand side to 'B'.
 //   j = /*error:INVALID_ASSIGNMENT*/ false;
 //                                    ^
 //
-// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:59:58: Error: A value of type 'List<dynamic>' can't be assigned to a variable of type 'B'.
+// pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:57:58: Error: A value of type 'List<dynamic>' can't be assigned to a variable of type 'B'.
 //  - 'List' is from 'dart:core'.
 //  - 'B' is from 'pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart'.
 // Try changing the type of the left hand side, or casting the right hand side to 'B'.
@@ -102,9 +102,9 @@
     ;
 }
 static field self::A a = new self::A::•();
-static field self::B b = new self::B::•(invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:19:61: Error: Getter not found: 'x'.
-var /*@topType=B*/ b = new B(/*error:UNDEFINED_IDENTIFIER*/ x); // allocations
-                                                            ^");
+static field self::B b = new self::B::•(invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:19:46: Error: Getter not found: 'x'.
+var b = new B(/*error:UNDEFINED_IDENTIFIER*/ x); // allocations
+                                             ^");
 static field core::List<dynamic> c1 = <dynamic>[invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:21:34: Error: Getter not found: 'x'.
   /*error:UNDEFINED_IDENTIFIER*/ x
                                  ^"];
@@ -114,20 +114,20 @@
 static field core::int f = 2.{core::num::+}(3);
 static field core::int g = 3.{core::int::unary-}();
 static field self::B h = new self::A::•().{self::A::+}(3);
-static field dynamic i = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:34:79: Error: The method 'unary-' isn't defined for the class 'A'.
+static field dynamic i = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:32:58: Error: The method 'unary-' isn't defined for the class 'A'.
  - 'A' is from 'pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart'.
 Try correcting the name to the name of an existing method, or defining a method named 'unary-'.
-var /*@topType=dynamic*/ i = /*error:UNDEFINED_OPERATOR,info:DYNAMIC_INVOKE*/ -new A();
-                                                                              ^";
+var i = /*error:UNDEFINED_OPERATOR,info:DYNAMIC_INVOKE*/ -new A();
+                                                         ^";
 static field self::B j = null as self::B;
 static method test1() → dynamic {
-  self::a = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:38:36: Error: A value of type 'String' can't be assigned to a variable of type 'A'.
+  self::a = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:36:36: Error: A value of type 'String' can't be assigned to a variable of type 'A'.
  - 'A' is from 'pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart'.
 Try changing the type of the left hand side, or casting the right hand side to 'A'.
   a = /*error:INVALID_ASSIGNMENT*/ \"hi\";
                                    ^" in "hi" as{TypeError} self::A;
   self::a = new self::B::•(3);
-  self::b = let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:40:36: Error: A value of type 'String' can't be assigned to a variable of type 'B'.
+  self::b = let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:38:36: Error: A value of type 'String' can't be assigned to a variable of type 'B'.
  - 'B' is from 'pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart'.
 Try changing the type of the left hand side, or casting the right hand side to 'B'.
   b = /*error:INVALID_ASSIGNMENT*/ \"hi\";
@@ -138,29 +138,29 @@
   self::c2 = <dynamic>[];
   self::c2 = let final core::Set<dynamic> #t6 = col::LinkedHashSet::•<dynamic>() in #t6;
   self::d = <dynamic, dynamic>{};
-  self::d = let final<BottomType> #t7 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:47:36: Error: A value of type 'int' can't be assigned to a variable of type 'Map<dynamic, dynamic>'.
+  self::d = let final<BottomType> #t7 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:45:36: Error: A value of type 'int' can't be assigned to a variable of type 'Map<dynamic, dynamic>'.
  - 'Map' is from 'dart:core'.
 Try changing the type of the left hand side, or casting the right hand side to 'Map<dynamic, dynamic>'.
   d = /*error:INVALID_ASSIGNMENT*/ 3;
                                    ^" in 3 as{TypeError} core::Map<dynamic, dynamic>;
   self::e = new self::A::•();
-  self::e = let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:49:67: Error: A value of type 'Map<dynamic, dynamic>' can't be assigned to a variable of type 'A'.
+  self::e = let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:47:67: Error: A value of type 'Map<dynamic, dynamic>' can't be assigned to a variable of type 'A'.
  - 'Map' is from 'dart:core'.
  - 'A' is from 'pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart'.
 Try changing the type of the left hand side, or casting the right hand side to 'A'.
   e = /*error:INVALID_ASSIGNMENT*/ /*@typeArgs=dynamic, dynamic*/ {};
                                                                   ^" in <dynamic, dynamic>{} as{TypeError} self::A;
   self::f = 3;
-  self::f = let final<BottomType> #t9 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:51:36: Error: A value of type 'bool' can't be assigned to a variable of type 'int'.
+  self::f = let final<BottomType> #t9 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:49:36: Error: A value of type 'bool' can't be assigned to a variable of type 'int'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
   f = /*error:INVALID_ASSIGNMENT*/ false;
                                    ^" in false as{TypeError} core::int;
   self::g = 1;
-  self::g = let final<BottomType> #t10 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:53:36: Error: A value of type 'bool' can't be assigned to a variable of type 'int'.
+  self::g = let final<BottomType> #t10 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:51:36: Error: A value of type 'bool' can't be assigned to a variable of type 'int'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
   g = /*error:INVALID_ASSIGNMENT*/ false;
                                    ^" in false as{TypeError} core::int;
-  self::h = let final<BottomType> #t11 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:54:36: Error: A value of type 'bool' can't be assigned to a variable of type 'B'.
+  self::h = let final<BottomType> #t11 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:52:36: Error: A value of type 'bool' can't be assigned to a variable of type 'B'.
  - 'B' is from 'pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart'.
 Try changing the type of the left hand side, or casting the right hand side to 'B'.
   h = /*error:INVALID_ASSIGNMENT*/ false;
@@ -168,12 +168,12 @@
   self::h = new self::B::•("b");
   self::i = false;
   self::j = new self::B::•("b");
-  self::j = let final<BottomType> #t12 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:58:36: Error: A value of type 'bool' can't be assigned to a variable of type 'B'.
+  self::j = let final<BottomType> #t12 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:56:36: Error: A value of type 'bool' can't be assigned to a variable of type 'B'.
  - 'B' is from 'pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart'.
 Try changing the type of the left hand side, or casting the right hand side to 'B'.
   j = /*error:INVALID_ASSIGNMENT*/ false;
                                    ^" in false as{TypeError} self::B;
-  self::j = let final<BottomType> #t13 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:59:58: Error: A value of type 'List<dynamic>' can't be assigned to a variable of type 'B'.
+  self::j = let final<BottomType> #t13 = invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:57:58: Error: A value of type 'List<dynamic>' can't be assigned to a variable of type 'B'.
  - 'List' is from 'dart:core'.
  - 'B' is from 'pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart'.
 Try changing the type of the left hand side, or casting the right hand side to 'B'.
diff --git a/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.strong.transformed.expect
index f0a746a..93049fd1 100644
--- a/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart.strong.transformed.expect
@@ -17,7 +17,7 @@
 }
 static field self::A a = new self::A::•();
 static field self::B b = new self::B::•(invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:19:61: Error: Getter not found: 'x'.
-var /*@topType=B*/ b = new B(/*error:UNDEFINED_IDENTIFIER*/ x); // allocations
+var  b = new B(/*error:UNDEFINED_IDENTIFIER*/ x); // allocations
                                                             ^");
 static field core::List<dynamic> c1 = <dynamic>[invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:21:34: Error: Getter not found: 'x'.
   /*error:UNDEFINED_IDENTIFIER*/ x
@@ -31,7 +31,7 @@
 static field dynamic i = let final self::A #t3 = new self::A::•() in invalid-expression "pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart:34:79: Error: The method 'unary-' isn't defined for the class 'A'.
  - 'A' is from 'pkg/front_end/testcases/inference/infer_from_complex_expressions_if_outer_most_value_is_precise.dart'.
 Try correcting the name to the name of an existing method, or defining a method named 'unary-'.
-var /*@topType=dynamic*/ i = /*error:UNDEFINED_OPERATOR,info:DYNAMIC_INVOKE*/ -new A();
+var  i = /*error:UNDEFINED_OPERATOR,info:DYNAMIC_INVOKE*/ -new A();
                                                                               ^";
 static field self::B j = null as self::B;
 static method test1() → dynamic {
diff --git a/pkg/front_end/testcases/inference/infer_from_rhs_only_if_it_wont_conflict_with_overridden_fields.dart b/pkg/front_end/testcases/inference/infer_from_rhs_only_if_it_wont_conflict_with_overridden_fields.dart
index 3c9c3ef..6226e35 100644
--- a/pkg/front_end/testcases/inference/infer_from_rhs_only_if_it_wont_conflict_with_overridden_fields.dart
+++ b/pkg/front_end/testcases/inference/infer_from_rhs_only_if_it_wont_conflict_with_overridden_fields.dart
@@ -6,11 +6,11 @@
 library test;
 
 class A {
-  var /*@topType=dynamic*/ x;
+  var x;
 }
 
 class B implements A {
-  var /*@topType=dynamic*/ x = 2;
+  var x = 2;
 }
 
 foo() {
diff --git a/pkg/front_end/testcases/inference/infer_from_rhs_only_if_it_wont_conflict_with_overridden_fields2.dart b/pkg/front_end/testcases/inference/infer_from_rhs_only_if_it_wont_conflict_with_overridden_fields2.dart
index fd0a94b..178c14a 100644
--- a/pkg/front_end/testcases/inference/infer_from_rhs_only_if_it_wont_conflict_with_overridden_fields2.dart
+++ b/pkg/front_end/testcases/inference/infer_from_rhs_only_if_it_wont_conflict_with_overridden_fields2.dart
@@ -6,11 +6,11 @@
 library test;
 
 class A {
-  final /*@topType=dynamic*/ x = null;
+  final x = null;
 }
 
 class B implements A {
-  final /*@topType=dynamic*/ x = 2;
+  final x = 2;
 }
 
 foo() {
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart
index f2357b3..9943823 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart
@@ -7,7 +7,7 @@
 
 import 'infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart';
 
-var /*@topType=int*/ y = x; // now ok :)
+var y = x; // now ok :)
 
 test1() {
   int t = 3;
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart.legacy.expect b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart.legacy.expect
index 4ea1232..9c32726 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart.legacy.expect
@@ -1,7 +1,7 @@
 library test;
 import self as self;
 import "dart:core" as core;
-import "./infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart" as inf;
+import "infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart";
 
@@ -24,7 +24,7 @@
 library test;
 import self as self2;
 import "dart:core" as core;
-import "./infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart" as inf2;
+import "infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart" as inf2;
 
 import "org-dartlang-testcase:///infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart.legacy.transformed.expect
index 4ea1232..9c32726 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart.legacy.transformed.expect
@@ -1,7 +1,7 @@
 library test;
 import self as self;
 import "dart:core" as core;
-import "./infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart" as inf;
+import "infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart";
 
@@ -24,7 +24,7 @@
 library test;
 import self as self2;
 import "dart:core" as core;
-import "./infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart" as inf2;
+import "infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart" as inf2;
 
 import "org-dartlang-testcase:///infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart.strong.expect b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart.strong.expect
index c251bf8..3e157ba 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart.strong.expect
@@ -1,7 +1,7 @@
 library test;
 import self as self;
 import "dart:core" as core;
-import "./infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart" as inf;
+import "infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart";
 
@@ -25,7 +25,7 @@
 library test;
 import self as self2;
 import "dart:core" as core;
-import "./infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart" as inf2;
+import "infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart" as inf2;
 
 import "org-dartlang-testcase:///infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart.strong.transformed.expect
index c251bf8..3e157ba 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart.strong.transformed.expect
@@ -1,7 +1,7 @@
 library test;
 import self as self;
 import "dart:core" as core;
-import "./infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart" as inf;
+import "infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart";
 
@@ -25,7 +25,7 @@
 library test;
 import self as self2;
 import "dart:core" as core;
-import "./infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart" as inf2;
+import "infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart" as inf2;
 
 import "org-dartlang-testcase:///infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart.type_promotion.expect b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart.type_promotion.expect
index f71d77a..ca48ff3 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart.type_promotion.expect
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart.type_promotion.expect
@@ -1,6 +1,6 @@
-pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart:14:5: Context: Write to t@389
+pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart:14:5: Context: Write to t@372
   t = x;
     ^
-pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart:15:5: Context: Write to t@389
+pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on.dart:15:5: Context: Write to t@372
   t = y;
     ^
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart
index 6b746f5..59b8aa8 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart
@@ -8,7 +8,7 @@
 import 'infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart';
 
 class B {
-  static var /*@topType=int*/ y = A.x;
+  static var y = A.x;
 }
 
 test1() {
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart.legacy.expect b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart.legacy.expect
index 878a97d..11440fd 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart.legacy.expect
@@ -1,7 +1,7 @@
 library test;
 import self as self;
 import "dart:core" as core;
-import "./infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart" as inf;
+import "infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart.legacy.transformed.expect
index 878a97d..11440fd 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart.legacy.transformed.expect
@@ -1,7 +1,7 @@
 library test;
 import self as self;
 import "dart:core" as core;
-import "./infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart" as inf;
+import "infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart.strong.expect b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart.strong.expect
index 28ec8b4..d23de18 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart.strong.expect
@@ -1,7 +1,7 @@
 library test;
 import self as self;
 import "dart:core" as core;
-import "./infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart" as inf;
+import "infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart.strong.transformed.expect
index 28ec8b4..d23de18 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart.strong.transformed.expect
@@ -1,7 +1,7 @@
 library test;
 import self as self;
 import "dart:core" as core;
-import "./infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart" as inf;
+import "infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart.type_promotion.expect b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart.type_promotion.expect
index 5b8cb3d..298131f 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart.type_promotion.expect
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart.type_promotion.expect
@@ -1,6 +1,6 @@
-pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart:16:5: Context: Write to t@400
+pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart:16:5: Context: Write to t@383
   t = A.x;
     ^
-pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart:17:5: Context: Write to t@400
+pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2.dart:17:5: Context: Write to t@383
   t = B.y;
     ^
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart
index dd2ad8c..cc5d086 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart
@@ -6,7 +6,7 @@
 import 'infer_from_variables_in_cycle_libs_when_flag_is_on2.dart';
 
 class A {
-  static var /*@topType=int*/ x = 2;
+  static var x = 2;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart.legacy.expect b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart.legacy.expect
index 9af84b2..3f3d4f9 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart.legacy.expect
@@ -15,7 +15,7 @@
 library test;
 import self as self2;
 import "dart:core" as core;
-import "./infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart" as self;
+import "infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart" as self;
 
 import "org-dartlang-testcase:///infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart.legacy.transformed.expect
index 9af84b2..3f3d4f9 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart.legacy.transformed.expect
@@ -15,7 +15,7 @@
 library test;
 import self as self2;
 import "dart:core" as core;
-import "./infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart" as self;
+import "infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart" as self;
 
 import "org-dartlang-testcase:///infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart.strong.expect b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart.strong.expect
index 5112e7e..1ace456 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart.strong.expect
@@ -15,7 +15,7 @@
 library test;
 import self as self2;
 import "dart:core" as core;
-import "./infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart" as self;
+import "infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart" as self;
 
 import "org-dartlang-testcase:///infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart.strong.transformed.expect
index 5112e7e..1ace456 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart.strong.transformed.expect
@@ -15,7 +15,7 @@
 library test;
 import self as self2;
 import "dart:core" as core;
-import "./infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart" as self;
+import "infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart" as self;
 
 import "org-dartlang-testcase:///infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart
index ccc5157..e0f359b 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart
@@ -5,6 +5,6 @@
 /*@testedFeatures=inference*/
 import 'infer_from_variables_in_cycle_libs_when_flag_is_on2.dart';
 
-var /*@topType=int*/ x = 2; // ok to infer
+var x = 2; // ok to infer
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart.legacy.expect b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart.legacy.expect
index ad43ba3..12230fd 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart.legacy.expect
@@ -9,7 +9,7 @@
 library test;
 import self as self2;
 import "dart:core" as core;
-import "./infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart" as inf;
+import "infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart.legacy.transformed.expect
index ad43ba3..12230fd 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart.legacy.transformed.expect
@@ -9,7 +9,7 @@
 library test;
 import self as self2;
 import "dart:core" as core;
-import "./infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart" as inf;
+import "infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart.strong.expect b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart.strong.expect
index f5cd011..f6fbc3e 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart.strong.expect
@@ -10,7 +10,7 @@
 library test;
 import self as self2;
 import "dart:core" as core;
-import "./infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart" as inf;
+import "infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart.strong.transformed.expect
index f5cd011..f6fbc3e 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_cycle_libs_when_flag_is_on_a.dart.strong.transformed.expect
@@ -10,7 +10,7 @@
 library test;
 import self as self2;
 import "dart:core" as core;
-import "./infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart" as inf;
+import "infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_from_variables_in_cycle_libs_when_flag_is_on2_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag.dart b/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag.dart
index a270099..4b54811 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag.dart
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag.dart
@@ -7,7 +7,7 @@
 
 import 'infer_from_variables_in_non_cycle_imports_with_flag_a.dart';
 
-var /*@topType=int*/ y = x;
+var y = x;
 
 test1() {
   x = /*error:INVALID_ASSIGNMENT*/ "hi";
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag.dart.legacy.expect b/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag.dart.legacy.expect
index d442d47..6e1db6f 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag.dart.legacy.expect
@@ -1,6 +1,6 @@
 library test;
 import self as self;
-import "./infer_from_variables_in_non_cycle_imports_with_flag_a.dart" as inf;
+import "infer_from_variables_in_non_cycle_imports_with_flag_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_from_variables_in_non_cycle_imports_with_flag_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag.dart.legacy.transformed.expect
index d442d47..6e1db6f 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag.dart.legacy.transformed.expect
@@ -1,6 +1,6 @@
 library test;
 import self as self;
-import "./infer_from_variables_in_non_cycle_imports_with_flag_a.dart" as inf;
+import "infer_from_variables_in_non_cycle_imports_with_flag_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_from_variables_in_non_cycle_imports_with_flag_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag.dart.strong.expect b/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag.dart.strong.expect
index ebfe694..1499bf7 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag.dart.strong.expect
@@ -13,7 +13,7 @@
 //                                    ^
 //
 import self as self;
-import "./infer_from_variables_in_non_cycle_imports_with_flag_a.dart" as inf;
+import "infer_from_variables_in_non_cycle_imports_with_flag_a.dart" as inf;
 import "dart:core" as core;
 
 import "org-dartlang-testcase:///infer_from_variables_in_non_cycle_imports_with_flag_a.dart";
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag.dart.strong.transformed.expect
index ebfe694..1499bf7 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag.dart.strong.transformed.expect
@@ -13,7 +13,7 @@
 //                                    ^
 //
 import self as self;
-import "./infer_from_variables_in_non_cycle_imports_with_flag_a.dart" as inf;
+import "infer_from_variables_in_non_cycle_imports_with_flag_a.dart" as inf;
 import "dart:core" as core;
 
 import "org-dartlang-testcase:///infer_from_variables_in_non_cycle_imports_with_flag_a.dart";
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag2.dart b/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag2.dart
index bdf047f..f7bb1b1 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag2.dart
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag2.dart
@@ -8,7 +8,7 @@
 import 'infer_from_variables_in_non_cycle_imports_with_flag2_a.dart';
 
 class B {
-  static var /*@topType=int*/ y = A.x;
+  static var y = A.x;
 }
 
 test1() {
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag2.dart.legacy.expect b/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag2.dart.legacy.expect
index db58bcd..426906e 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag2.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag2.dart.legacy.expect
@@ -1,7 +1,7 @@
 library test;
 import self as self;
 import "dart:core" as core;
-import "./infer_from_variables_in_non_cycle_imports_with_flag2_a.dart" as inf;
+import "infer_from_variables_in_non_cycle_imports_with_flag2_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_from_variables_in_non_cycle_imports_with_flag2_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag2.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag2.dart.legacy.transformed.expect
index db58bcd..426906e 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag2.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag2.dart.legacy.transformed.expect
@@ -1,7 +1,7 @@
 library test;
 import self as self;
 import "dart:core" as core;
-import "./infer_from_variables_in_non_cycle_imports_with_flag2_a.dart" as inf;
+import "infer_from_variables_in_non_cycle_imports_with_flag2_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_from_variables_in_non_cycle_imports_with_flag2_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag2.dart.strong.expect b/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag2.dart.strong.expect
index 2af44de..4d2b4b8 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag2.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag2.dart.strong.expect
@@ -14,7 +14,7 @@
 //
 import self as self;
 import "dart:core" as core;
-import "./infer_from_variables_in_non_cycle_imports_with_flag2_a.dart" as inf;
+import "infer_from_variables_in_non_cycle_imports_with_flag2_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_from_variables_in_non_cycle_imports_with_flag2_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag2.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag2.dart.strong.transformed.expect
index 2af44de..4d2b4b8 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag2.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag2.dart.strong.transformed.expect
@@ -14,7 +14,7 @@
 //
 import self as self;
 import "dart:core" as core;
-import "./infer_from_variables_in_non_cycle_imports_with_flag2_a.dart" as inf;
+import "infer_from_variables_in_non_cycle_imports_with_flag2_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_from_variables_in_non_cycle_imports_with_flag2_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag2_a.dart b/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag2_a.dart
index 7ab5fda..906f8d8 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag2_a.dart
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag2_a.dart
@@ -4,7 +4,7 @@
 
 /*@testedFeatures=inference*/
 class A {
-  static var /*@topType=int*/ x = 2;
+  static var x = 2;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag_a.dart b/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag_a.dart
index 3195c4c..1aa8c0a 100644
--- a/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag_a.dart
+++ b/pkg/front_end/testcases/inference/infer_from_variables_in_non_cycle_imports_with_flag_a.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 /*@testedFeatures=inference*/
-var /*@topType=int*/ x = 2;
+var x = 2;
 
 main() {
   x;
diff --git a/pkg/front_end/testcases/inference/infer_getter_cross_to_setter.dart b/pkg/front_end/testcases/inference/infer_getter_cross_to_setter.dart
index 91cd19f..203adfa 100644
--- a/pkg/front_end/testcases/inference/infer_getter_cross_to_setter.dart
+++ b/pkg/front_end/testcases/inference/infer_getter_cross_to_setter.dart
@@ -10,7 +10,7 @@
 }
 
 abstract class B extends A {
-  get /*@topType=double*/ x;
+  get x;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_getter_from_later_inferred_getter.dart b/pkg/front_end/testcases/inference/infer_getter_from_later_inferred_getter.dart
index ff91432..7469d08 100644
--- a/pkg/front_end/testcases/inference/infer_getter_from_later_inferred_getter.dart
+++ b/pkg/front_end/testcases/inference/infer_getter_from_later_inferred_getter.dart
@@ -6,11 +6,11 @@
 library test;
 
 class A implements B {
-  get /*@topType=int*/ x => f();
+  get x => f();
 }
 
 abstract class B implements C {
-  get /*@topType=int*/ x;
+  get x;
 }
 
 abstract class C {
diff --git a/pkg/front_end/testcases/inference/infer_getter_from_later_inferred_getter.dart.hierarchy.expect b/pkg/front_end/testcases/inference/infer_getter_from_later_inferred_getter.dart.hierarchy.expect
index 31b4162..559c5bd 100644
--- a/pkg/front_end/testcases/inference/infer_getter_from_later_inferred_getter.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/infer_getter_from_later_inferred_getter.dart.hierarchy.expect
@@ -37,6 +37,7 @@
   classSetters:
 
 B:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: C
@@ -68,6 +69,7 @@
   interfaceSetters:
 
 A:
+  Longest path to Object: 3
   superclasses:
     Object
   interfaces: B, C
diff --git a/pkg/front_end/testcases/inference/infer_method_missing_params.dart b/pkg/front_end/testcases/inference/infer_method_missing_params.dart
index 18bc5e3..a9f6d88 100644
--- a/pkg/front_end/testcases/inference/infer_method_missing_params.dart
+++ b/pkg/front_end/testcases/inference/infer_method_missing_params.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 // All of these cases are error conditions; this test checks how we recover.
@@ -20,13 +20,9 @@
 }
 
 abstract class C implements A, B {
-  /*@topType=int*/ /*@error=OverrideMoreRequiredArguments*/ f(
-      /*@topType=int*/ x,
-      /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ y);
-  /*@topType=int*/ g(/*@topType=int*/ x,
-      [/*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ y]);
-  /*@topType=int*/ h(/*@topType=int*/ x,
-      {/*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ y});
+  f(x, y);
+  g(x, [y]);
+  h(x, {y});
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_method_missing_params.dart.hierarchy.expect b/pkg/front_end/testcases/inference/infer_method_missing_params.dart.hierarchy.expect
index 69c8242..ecf08eb 100644
--- a/pkg/front_end/testcases/inference/infer_method_missing_params.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/infer_method_missing_params.dart.hierarchy.expect
@@ -59,6 +59,7 @@
   classSetters:
 
 C:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: A, B
diff --git a/pkg/front_end/testcases/inference/infer_method_missing_params.dart.legacy.expect b/pkg/front_end/testcases/inference/infer_method_missing_params.dart.legacy.expect
index 1738d37..5337a40 100644
--- a/pkg/front_end/testcases/inference/infer_method_missing_params.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/infer_method_missing_params.dart.legacy.expect
@@ -2,9 +2,9 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/infer_method_missing_params.dart:23:61: Warning: The method 'C.f' has more required arguments than those of overridden method 'B.f'.
-//   /*@topType=int*/ /*@error=OverrideMoreRequiredArguments*/ f(
-//                                                             ^
+// pkg/front_end/testcases/inference/infer_method_missing_params.dart:23:3: Warning: The method 'C.f' has more required arguments than those of overridden method 'B.f'.
+//   f(x, y);
+//   ^
 // pkg/front_end/testcases/inference/infer_method_missing_params.dart:17:7: Context: This is the overridden method ('f').
 //   int f(int x);
 //       ^
diff --git a/pkg/front_end/testcases/inference/infer_method_missing_params.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_method_missing_params.dart.legacy.transformed.expect
index 1738d37..5337a40 100644
--- a/pkg/front_end/testcases/inference/infer_method_missing_params.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_method_missing_params.dart.legacy.transformed.expect
@@ -2,9 +2,9 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/infer_method_missing_params.dart:23:61: Warning: The method 'C.f' has more required arguments than those of overridden method 'B.f'.
-//   /*@topType=int*/ /*@error=OverrideMoreRequiredArguments*/ f(
-//                                                             ^
+// pkg/front_end/testcases/inference/infer_method_missing_params.dart:23:3: Warning: The method 'C.f' has more required arguments than those of overridden method 'B.f'.
+//   f(x, y);
+//   ^
 // pkg/front_end/testcases/inference/infer_method_missing_params.dart:17:7: Context: This is the overridden method ('f').
 //   int f(int x);
 //       ^
diff --git a/pkg/front_end/testcases/inference/infer_method_missing_params.dart.outline.expect b/pkg/front_end/testcases/inference/infer_method_missing_params.dart.outline.expect
index 5e0625d..0ae3513 100644
--- a/pkg/front_end/testcases/inference/infer_method_missing_params.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/infer_method_missing_params.dart.outline.expect
@@ -2,9 +2,9 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/infer_method_missing_params.dart:23:61: Warning: The method 'C.f' has more required arguments than those of overridden method 'B.f'.
-//   /*@topType=int*/ /*@error=OverrideMoreRequiredArguments*/ f(
-//                                                             ^
+// pkg/front_end/testcases/inference/infer_method_missing_params.dart:23:3: Warning: The method 'C.f' has more required arguments than those of overridden method 'B.f'.
+//   f(x, y);
+//   ^
 // pkg/front_end/testcases/inference/infer_method_missing_params.dart:17:7: Context: This is the overridden method ('f').
 //   int f(int x);
 //       ^
diff --git a/pkg/front_end/testcases/inference/infer_method_missing_params.dart.strong.expect b/pkg/front_end/testcases/inference/infer_method_missing_params.dart.strong.expect
index c73b3ed..f4717a8 100644
--- a/pkg/front_end/testcases/inference/infer_method_missing_params.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/infer_method_missing_params.dart.strong.expect
@@ -2,24 +2,24 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/infer_method_missing_params.dart:25:79: Error: Can't infer the type of 'y': overridden members must all have the same type.
-// Specify the type explicitly.
-//       /*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ y);
-//                                                                               ^
+// pkg/front_end/testcases/inference/infer_method_missing_params.dart:23:8: Error: Can't infer a type for 'y' as some of the inherited members have different types.
+// Try adding an explicit type.
+//   f(x, y);
+//        ^
 //
-// pkg/front_end/testcases/inference/infer_method_missing_params.dart:29:80: Error: Can't infer the type of 'y': overridden members must all have the same type.
-// Specify the type explicitly.
-//       {/*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ y});
-//                                                                                ^
+// pkg/front_end/testcases/inference/infer_method_missing_params.dart:25:9: Error: Can't infer a type for 'y' as some of the inherited members have different types.
+// Try adding an explicit type.
+//   h(x, {y});
+//         ^
 //
-// pkg/front_end/testcases/inference/infer_method_missing_params.dart:27:80: Error: Can't infer the type of 'y': overridden members must all have the same type.
-// Specify the type explicitly.
-//       [/*@topType=dynamic*/ /*@error=CantInferTypeDueToInconsistentOverrides*/ y]);
-//                                                                                ^
+// pkg/front_end/testcases/inference/infer_method_missing_params.dart:24:9: Error: Can't infer a type for 'y' as some of the inherited members have different types.
+// Try adding an explicit type.
+//   g(x, [y]);
+//         ^
 //
-// pkg/front_end/testcases/inference/infer_method_missing_params.dart:23:61: Error: The method 'C.f' has more required arguments than those of overridden method 'B.f'.
-//   /*@topType=int*/ /*@error=OverrideMoreRequiredArguments*/ f(
-//                                                             ^
+// pkg/front_end/testcases/inference/infer_method_missing_params.dart:23:3: Error: The method 'C.f' has more required arguments than those of overridden method 'B.f'.
+//   f(x, y);
+//   ^
 // pkg/front_end/testcases/inference/infer_method_missing_params.dart:17:7: Context: This is the overridden method ('f').
 //   int f(int x);
 //       ^
diff --git a/pkg/front_end/testcases/inference/infer_parameter_type_setter_from_field.dart b/pkg/front_end/testcases/inference/infer_parameter_type_setter_from_field.dart
index d7e8119..2374e76 100644
--- a/pkg/front_end/testcases/inference/infer_parameter_type_setter_from_field.dart
+++ b/pkg/front_end/testcases/inference/infer_parameter_type_setter_from_field.dart
@@ -6,7 +6,7 @@
 library test;
 
 class C extends D {
-  set /*@topType=void*/ foo(/*@topType=int*/ x) {}
+  set foo(x) {}
 }
 
 class D {
diff --git a/pkg/front_end/testcases/inference/infer_parameter_type_setter_from_setter.dart b/pkg/front_end/testcases/inference/infer_parameter_type_setter_from_setter.dart
index 9e5cad7..bee5d20 100644
--- a/pkg/front_end/testcases/inference/infer_parameter_type_setter_from_setter.dart
+++ b/pkg/front_end/testcases/inference/infer_parameter_type_setter_from_setter.dart
@@ -6,11 +6,11 @@
 library test;
 
 class C extends D {
-  set /*@topType=void*/ foo(/*@topType=int*/ x) {}
+  set foo(x) {}
 }
 
 class D {
-  set /*@topType=void*/ foo(int x) {}
+  set foo(int x) {}
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_prefix_expression.dart b/pkg/front_end/testcases/inference/infer_prefix_expression.dart
index ea88fe0..0561e23 100644
--- a/pkg/front_end/testcases/inference/infer_prefix_expression.dart
+++ b/pkg/front_end/testcases/inference/infer_prefix_expression.dart
@@ -5,9 +5,9 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=bool*/ a_not = !true;
-var /*@topType=int*/ a_complement = /*@target=int::~*/ ~1;
-var /*@topType=int*/ a_negate = /*@target=int::unary-*/ -1;
+var a_not = !true;
+var a_complement = /*@target=int::~*/ ~1;
+var a_negate = /*@target=int::unary-*/ -1;
 
 main() {
   a_not;
diff --git a/pkg/front_end/testcases/inference/infer_prefix_expression_custom.dart b/pkg/front_end/testcases/inference/infer_prefix_expression_custom.dart
index 46cfedc..fe447a9 100644
--- a/pkg/front_end/testcases/inference/infer_prefix_expression_custom.dart
+++ b/pkg/front_end/testcases/inference/infer_prefix_expression_custom.dart
@@ -11,9 +11,9 @@
   double operator -() => 2.0;
 }
 
-var /*@topType=A*/ a = new A();
-var /*@topType=int*/ v_complement = /*@target=A::~*/ ~a;
-var /*@topType=double*/ v_negate = /*@target=A::unary-*/ -a;
+var a = new A();
+var v_complement = /*@target=A::~*/ ~a;
+var v_negate = /*@target=A::unary-*/ -a;
 
 main() {
   a;
diff --git a/pkg/front_end/testcases/inference/infer_return_type_for_static_setter.dart b/pkg/front_end/testcases/inference/infer_return_type_for_static_setter.dart
index e3bf142..972b299 100644
--- a/pkg/front_end/testcases/inference/infer_return_type_for_static_setter.dart
+++ b/pkg/front_end/testcases/inference/infer_return_type_for_static_setter.dart
@@ -6,9 +6,9 @@
 library test;
 
 class C {
-  static set /*@topType=void*/ foo(int x) {}
+  static set foo(int x) {}
 }
 
-set /*@topType=void*/ bar(int x) {}
+set bar(int x) {}
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_setter_cross_to_getter.dart b/pkg/front_end/testcases/inference/infer_setter_cross_to_getter.dart
index 47f35d5..219dca0 100644
--- a/pkg/front_end/testcases/inference/infer_setter_cross_to_getter.dart
+++ b/pkg/front_end/testcases/inference/infer_setter_cross_to_getter.dart
@@ -10,7 +10,7 @@
 }
 
 abstract class B extends A {
-  void set x(/*@topType=double*/ value);
+  void set x(value);
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_setter_from_later_inferred_setter.dart b/pkg/front_end/testcases/inference/infer_setter_from_later_inferred_setter.dart
index 2a4141b..c0ae645 100644
--- a/pkg/front_end/testcases/inference/infer_setter_from_later_inferred_setter.dart
+++ b/pkg/front_end/testcases/inference/infer_setter_from_later_inferred_setter.dart
@@ -6,11 +6,11 @@
 library test;
 
 class A implements B {
-  void set x(/*@topType=int*/ value) {}
+  void set x(value) {}
 }
 
 abstract class B implements C {
-  void set x(/*@topType=int*/ value);
+  void set x(value);
 }
 
 abstract class C {
diff --git a/pkg/front_end/testcases/inference/infer_setter_from_later_inferred_setter.dart.hierarchy.expect b/pkg/front_end/testcases/inference/infer_setter_from_later_inferred_setter.dart.hierarchy.expect
index 368c13e..2543994 100644
--- a/pkg/front_end/testcases/inference/infer_setter_from_later_inferred_setter.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/infer_setter_from_later_inferred_setter.dart.hierarchy.expect
@@ -37,6 +37,7 @@
     C.x
 
 B:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: C
@@ -68,6 +69,7 @@
     B.x
 
 A:
+  Longest path to Object: 3
   superclasses:
     Object
   interfaces: B, C
diff --git a/pkg/front_end/testcases/inference/infer_setter_return_type_only.dart b/pkg/front_end/testcases/inference/infer_setter_return_type_only.dart
index 57583aa..8e536dc 100644
--- a/pkg/front_end/testcases/inference/infer_setter_return_type_only.dart
+++ b/pkg/front_end/testcases/inference/infer_setter_return_type_only.dart
@@ -12,7 +12,7 @@
 class B extends A {
   // The setter return type should be inferred, but the setter parameter type
   // should not.
-  set /*@topType=void*/ x(Object o) {}
+  set x(Object o) {}
 }
 
 main() {
diff --git a/pkg/front_end/testcases/inference/infer_statics_transitively.dart b/pkg/front_end/testcases/inference/infer_statics_transitively.dart
index aa06cbb..8c3c5d0 100644
--- a/pkg/front_end/testcases/inference/infer_statics_transitively.dart
+++ b/pkg/front_end/testcases/inference/infer_statics_transitively.dart
@@ -7,8 +7,8 @@
 
 import 'infer_statics_transitively_a.dart';
 
-final /*@topType=int*/ m1 = a1;
-final /*@topType=int*/ m2 = A.a2;
+final m1 = a1;
+final m2 = A.a2;
 
 foo() {
   int i;
diff --git a/pkg/front_end/testcases/inference/infer_statics_transitively.dart.legacy.expect b/pkg/front_end/testcases/inference/infer_statics_transitively.dart.legacy.expect
index 094adfb..7e55b99 100644
--- a/pkg/front_end/testcases/inference/infer_statics_transitively.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/infer_statics_transitively.dart.legacy.expect
@@ -1,7 +1,7 @@
 library test;
 import self as self;
 import "dart:core" as core;
-import "./infer_statics_transitively_a.dart" as inf;
+import "infer_statics_transitively_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_statics_transitively_a.dart";
 
@@ -16,8 +16,8 @@
 library;
 import self as inf;
 import "dart:core" as core;
-import "./infer_statics_transitively_b.dart" as inf2;
-import "./infer_statics_transitively.dart" as self;
+import "infer_statics_transitively_b.dart" as inf2;
+import "infer_statics_transitively.dart" as self;
 
 import "org-dartlang-testcase:///infer_statics_transitively.dart";
 import "org-dartlang-testcase:///infer_statics_transitively_b.dart";
diff --git a/pkg/front_end/testcases/inference/infer_statics_transitively.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_statics_transitively.dart.legacy.transformed.expect
index 094adfb..7e55b99 100644
--- a/pkg/front_end/testcases/inference/infer_statics_transitively.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_statics_transitively.dart.legacy.transformed.expect
@@ -1,7 +1,7 @@
 library test;
 import self as self;
 import "dart:core" as core;
-import "./infer_statics_transitively_a.dart" as inf;
+import "infer_statics_transitively_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_statics_transitively_a.dart";
 
@@ -16,8 +16,8 @@
 library;
 import self as inf;
 import "dart:core" as core;
-import "./infer_statics_transitively_b.dart" as inf2;
-import "./infer_statics_transitively.dart" as self;
+import "infer_statics_transitively_b.dart" as inf2;
+import "infer_statics_transitively.dart" as self;
 
 import "org-dartlang-testcase:///infer_statics_transitively.dart";
 import "org-dartlang-testcase:///infer_statics_transitively_b.dart";
diff --git a/pkg/front_end/testcases/inference/infer_statics_transitively.dart.strong.expect b/pkg/front_end/testcases/inference/infer_statics_transitively.dart.strong.expect
index 7d3fd79..99c4846 100644
--- a/pkg/front_end/testcases/inference/infer_statics_transitively.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/infer_statics_transitively.dart.strong.expect
@@ -1,7 +1,7 @@
 library test;
 import self as self;
 import "dart:core" as core;
-import "./infer_statics_transitively_a.dart" as inf;
+import "infer_statics_transitively_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_statics_transitively_a.dart";
 
@@ -16,8 +16,8 @@
 library;
 import self as inf;
 import "dart:core" as core;
-import "./infer_statics_transitively_b.dart" as inf2;
-import "./infer_statics_transitively.dart" as self;
+import "infer_statics_transitively_b.dart" as inf2;
+import "infer_statics_transitively.dart" as self;
 
 import "org-dartlang-testcase:///infer_statics_transitively.dart";
 import "org-dartlang-testcase:///infer_statics_transitively_b.dart";
diff --git a/pkg/front_end/testcases/inference/infer_statics_transitively.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/infer_statics_transitively.dart.strong.transformed.expect
index 7d3fd79..99c4846 100644
--- a/pkg/front_end/testcases/inference/infer_statics_transitively.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_statics_transitively.dart.strong.transformed.expect
@@ -1,7 +1,7 @@
 library test;
 import self as self;
 import "dart:core" as core;
-import "./infer_statics_transitively_a.dart" as inf;
+import "infer_statics_transitively_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_statics_transitively_a.dart";
 
@@ -16,8 +16,8 @@
 library;
 import self as inf;
 import "dart:core" as core;
-import "./infer_statics_transitively_b.dart" as inf2;
-import "./infer_statics_transitively.dart" as self;
+import "infer_statics_transitively_b.dart" as inf2;
+import "infer_statics_transitively.dart" as self;
 
 import "org-dartlang-testcase:///infer_statics_transitively.dart";
 import "org-dartlang-testcase:///infer_statics_transitively_b.dart";
diff --git a/pkg/front_end/testcases/inference/infer_statics_transitively.dart.type_promotion.expect b/pkg/front_end/testcases/inference/infer_statics_transitively.dart.type_promotion.expect
index 2bf9cee..f5e0605 100644
--- a/pkg/front_end/testcases/inference/infer_statics_transitively.dart.type_promotion.expect
+++ b/pkg/front_end/testcases/inference/infer_statics_transitively.dart.type_promotion.expect
@@ -1,3 +1,3 @@
-pkg/front_end/testcases/inference/infer_statics_transitively.dart:15:5: Context: Write to i@388
+pkg/front_end/testcases/inference/infer_statics_transitively.dart:15:5: Context: Write to i@354
   i = m1;
     ^
diff --git a/pkg/front_end/testcases/inference/infer_statics_transitively2.dart b/pkg/front_end/testcases/inference/infer_statics_transitively2.dart
index 148c6f1..40dbc28 100644
--- a/pkg/front_end/testcases/inference/infer_statics_transitively2.dart
+++ b/pkg/front_end/testcases/inference/infer_statics_transitively2.dart
@@ -5,10 +5,10 @@
 /*@testedFeatures=inference*/
 library test;
 
-const /*@topType=int*/ x1 = 1;
-final /*@topType=int*/ x2 = 1;
-final /*@topType=int*/ y1 = x1;
-final /*@topType=int*/ y2 = x2;
+const x1 = 1;
+final x2 = 1;
+final y1 = x1;
+final y2 = x2;
 
 foo() {
   int i;
diff --git a/pkg/front_end/testcases/inference/infer_statics_transitively2.dart.type_promotion.expect b/pkg/front_end/testcases/inference/infer_statics_transitively2.dart.type_promotion.expect
index bd3b23fe..bd4a813 100644
--- a/pkg/front_end/testcases/inference/infer_statics_transitively2.dart.type_promotion.expect
+++ b/pkg/front_end/testcases/inference/infer_statics_transitively2.dart.type_promotion.expect
@@ -1,6 +1,6 @@
-pkg/front_end/testcases/inference/infer_statics_transitively2.dart:15:5: Context: Write to i@403
+pkg/front_end/testcases/inference/infer_statics_transitively2.dart:15:5: Context: Write to i@335
   i = y1;
     ^
-pkg/front_end/testcases/inference/infer_statics_transitively2.dart:16:5: Context: Write to i@403
+pkg/front_end/testcases/inference/infer_statics_transitively2.dart:16:5: Context: Write to i@335
   i = y2;
     ^
diff --git a/pkg/front_end/testcases/inference/infer_statics_transitively3.dart b/pkg/front_end/testcases/inference/infer_statics_transitively3.dart
index 6bd303b..16e92d1 100644
--- a/pkg/front_end/testcases/inference/infer_statics_transitively3.dart
+++ b/pkg/front_end/testcases/inference/infer_statics_transitively3.dart
@@ -8,12 +8,12 @@
 import 'infer_statics_transitively3_a.dart' show a1, A;
 import 'infer_statics_transitively3_a.dart' as p show a2, A;
 
-const /*@topType=int*/ t1 = 1;
-const /*@topType=int*/ t2 = t1;
-const /*@topType=int*/ t3 = a1;
-const /*@topType=int*/ t4 = p.a2;
-const /*@topType=dynamic*/ t5 = A.a3;
-const /*@topType=dynamic*/ t6 = p.A.a3;
+const t1 = 1;
+const t2 = t1;
+const t3 = a1;
+const t4 = p.a2;
+const t5 = A.a3;
+const t6 = p.A.a3;
 
 foo() {
   int i;
diff --git a/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.legacy.expect b/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.legacy.expect
index c14e037..b5b71b0 100644
--- a/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.legacy.expect
@@ -1,7 +1,7 @@
 library test;
 import self as self;
 import "dart:core" as core;
-import "./infer_statics_transitively3_a.dart" as inf;
+import "infer_statics_transitively3_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_statics_transitively3_a.dart";
 import "org-dartlang-testcase:///infer_statics_transitively3_a.dart" as p;
diff --git a/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.legacy.transformed.expect
index c14e037..b5b71b0 100644
--- a/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.legacy.transformed.expect
@@ -1,7 +1,7 @@
 library test;
 import self as self;
 import "dart:core" as core;
-import "./infer_statics_transitively3_a.dart" as inf;
+import "infer_statics_transitively3_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_statics_transitively3_a.dart";
 import "org-dartlang-testcase:///infer_statics_transitively3_a.dart" as p;
diff --git a/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.strong.expect b/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.strong.expect
index 8554b53..d80f5c4 100644
--- a/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.strong.expect
@@ -1,7 +1,7 @@
 library test;
 import self as self;
 import "dart:core" as core;
-import "./infer_statics_transitively3_a.dart" as inf;
+import "infer_statics_transitively3_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_statics_transitively3_a.dart";
 import "org-dartlang-testcase:///infer_statics_transitively3_a.dart" as p;
diff --git a/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.strong.transformed.expect
index 8554b53..d80f5c4 100644
--- a/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.strong.transformed.expect
@@ -1,7 +1,7 @@
 library test;
 import self as self;
 import "dart:core" as core;
-import "./infer_statics_transitively3_a.dart" as inf;
+import "infer_statics_transitively3_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_statics_transitively3_a.dart";
 import "org-dartlang-testcase:///infer_statics_transitively3_a.dart" as p;
diff --git a/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.type_promotion.expect b/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.type_promotion.expect
index 2d28253..3a64db3 100644
--- a/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.type_promotion.expect
+++ b/pkg/front_end/testcases/inference/infer_statics_transitively3.dart.type_promotion.expect
@@ -1,12 +1,12 @@
-pkg/front_end/testcases/inference/infer_statics_transitively3.dart:20:5: Context: Write to i@602
+pkg/front_end/testcases/inference/infer_statics_transitively3.dart:20:5: Context: Write to i@492
   i = t1;
     ^
-pkg/front_end/testcases/inference/infer_statics_transitively3.dart:21:5: Context: Write to i@602
+pkg/front_end/testcases/inference/infer_statics_transitively3.dart:21:5: Context: Write to i@492
   i = t2;
     ^
-pkg/front_end/testcases/inference/infer_statics_transitively3.dart:22:5: Context: Write to i@602
+pkg/front_end/testcases/inference/infer_statics_transitively3.dart:22:5: Context: Write to i@492
   i = t3;
     ^
-pkg/front_end/testcases/inference/infer_statics_transitively3.dart:23:5: Context: Write to i@602
+pkg/front_end/testcases/inference/infer_statics_transitively3.dart:23:5: Context: Write to i@492
   i = t4;
     ^
diff --git a/pkg/front_end/testcases/inference/infer_statics_transitively_2_a.dart.legacy.expect b/pkg/front_end/testcases/inference/infer_statics_transitively_2_a.dart.legacy.expect
index 041ca29..4e48a93 100644
--- a/pkg/front_end/testcases/inference/infer_statics_transitively_2_a.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/infer_statics_transitively_2_a.dart.legacy.expect
@@ -1,8 +1,8 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./infer_statics_transitively_b.dart" as inf;
-import "./infer_statics_transitively.dart" as test;
+import "infer_statics_transitively_b.dart" as inf;
+import "infer_statics_transitively.dart" as test;
 
 import "org-dartlang-testcase:///infer_statics_transitively.dart";
 import "org-dartlang-testcase:///infer_statics_transitively_b.dart";
@@ -21,7 +21,7 @@
 library test;
 import self as test;
 import "dart:core" as core;
-import "./infer_statics_transitively_a.dart" as inf2;
+import "infer_statics_transitively_a.dart" as inf2;
 
 import "org-dartlang-testcase:///infer_statics_transitively_a.dart";
 
@@ -44,8 +44,8 @@
 library;
 import self as inf2;
 import "dart:core" as core;
-import "./infer_statics_transitively_b.dart" as inf;
-import "./infer_statics_transitively.dart" as test;
+import "infer_statics_transitively_b.dart" as inf;
+import "infer_statics_transitively.dart" as test;
 
 import "org-dartlang-testcase:///infer_statics_transitively.dart";
 import "org-dartlang-testcase:///infer_statics_transitively_b.dart";
diff --git a/pkg/front_end/testcases/inference/infer_statics_transitively_2_a.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_statics_transitively_2_a.dart.legacy.transformed.expect
index 041ca29..4e48a93 100644
--- a/pkg/front_end/testcases/inference/infer_statics_transitively_2_a.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_statics_transitively_2_a.dart.legacy.transformed.expect
@@ -1,8 +1,8 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./infer_statics_transitively_b.dart" as inf;
-import "./infer_statics_transitively.dart" as test;
+import "infer_statics_transitively_b.dart" as inf;
+import "infer_statics_transitively.dart" as test;
 
 import "org-dartlang-testcase:///infer_statics_transitively.dart";
 import "org-dartlang-testcase:///infer_statics_transitively_b.dart";
@@ -21,7 +21,7 @@
 library test;
 import self as test;
 import "dart:core" as core;
-import "./infer_statics_transitively_a.dart" as inf2;
+import "infer_statics_transitively_a.dart" as inf2;
 
 import "org-dartlang-testcase:///infer_statics_transitively_a.dart";
 
@@ -44,8 +44,8 @@
 library;
 import self as inf2;
 import "dart:core" as core;
-import "./infer_statics_transitively_b.dart" as inf;
-import "./infer_statics_transitively.dart" as test;
+import "infer_statics_transitively_b.dart" as inf;
+import "infer_statics_transitively.dart" as test;
 
 import "org-dartlang-testcase:///infer_statics_transitively.dart";
 import "org-dartlang-testcase:///infer_statics_transitively_b.dart";
diff --git a/pkg/front_end/testcases/inference/infer_statics_transitively_2_a.dart.strong.expect b/pkg/front_end/testcases/inference/infer_statics_transitively_2_a.dart.strong.expect
index 295510c..9891055 100644
--- a/pkg/front_end/testcases/inference/infer_statics_transitively_2_a.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/infer_statics_transitively_2_a.dart.strong.expect
@@ -1,8 +1,8 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./infer_statics_transitively_b.dart" as inf;
-import "./infer_statics_transitively.dart" as test;
+import "infer_statics_transitively_b.dart" as inf;
+import "infer_statics_transitively.dart" as test;
 
 import "org-dartlang-testcase:///infer_statics_transitively.dart";
 import "org-dartlang-testcase:///infer_statics_transitively_b.dart";
@@ -21,7 +21,7 @@
 library test;
 import self as test;
 import "dart:core" as core;
-import "./infer_statics_transitively_a.dart" as inf2;
+import "infer_statics_transitively_a.dart" as inf2;
 
 import "org-dartlang-testcase:///infer_statics_transitively_a.dart";
 
@@ -45,8 +45,8 @@
 library;
 import self as inf2;
 import "dart:core" as core;
-import "./infer_statics_transitively_b.dart" as inf;
-import "./infer_statics_transitively.dart" as test;
+import "infer_statics_transitively_b.dart" as inf;
+import "infer_statics_transitively.dart" as test;
 
 import "org-dartlang-testcase:///infer_statics_transitively.dart";
 import "org-dartlang-testcase:///infer_statics_transitively_b.dart";
diff --git a/pkg/front_end/testcases/inference/infer_statics_transitively_2_a.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/infer_statics_transitively_2_a.dart.strong.transformed.expect
index 295510c..9891055 100644
--- a/pkg/front_end/testcases/inference/infer_statics_transitively_2_a.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_statics_transitively_2_a.dart.strong.transformed.expect
@@ -1,8 +1,8 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./infer_statics_transitively_b.dart" as inf;
-import "./infer_statics_transitively.dart" as test;
+import "infer_statics_transitively_b.dart" as inf;
+import "infer_statics_transitively.dart" as test;
 
 import "org-dartlang-testcase:///infer_statics_transitively.dart";
 import "org-dartlang-testcase:///infer_statics_transitively_b.dart";
@@ -21,7 +21,7 @@
 library test;
 import self as test;
 import "dart:core" as core;
-import "./infer_statics_transitively_a.dart" as inf2;
+import "infer_statics_transitively_a.dart" as inf2;
 
 import "org-dartlang-testcase:///infer_statics_transitively_a.dart";
 
@@ -45,8 +45,8 @@
 library;
 import self as inf2;
 import "dart:core" as core;
-import "./infer_statics_transitively_b.dart" as inf;
-import "./infer_statics_transitively.dart" as test;
+import "infer_statics_transitively_b.dart" as inf;
+import "infer_statics_transitively.dart" as test;
 
 import "org-dartlang-testcase:///infer_statics_transitively.dart";
 import "org-dartlang-testcase:///infer_statics_transitively_b.dart";
diff --git a/pkg/front_end/testcases/inference/infer_statics_transitively_a.dart b/pkg/front_end/testcases/inference/infer_statics_transitively_a.dart
index 3d09a81..a7b6d9e 100644
--- a/pkg/front_end/testcases/inference/infer_statics_transitively_a.dart
+++ b/pkg/front_end/testcases/inference/infer_statics_transitively_a.dart
@@ -7,10 +7,10 @@
 import 'infer_statics_transitively.dart';
 import 'infer_statics_transitively_b.dart';
 
-final /*@topType=int*/ a1 = m2;
+final a1 = m2;
 
 class A {
-  static final /*@topType=int*/ a2 = b1;
+  static final a2 = b1;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_statics_transitively_a.dart.legacy.expect b/pkg/front_end/testcases/inference/infer_statics_transitively_a.dart.legacy.expect
index e1f6bf9..7c8af8a 100644
--- a/pkg/front_end/testcases/inference/infer_statics_transitively_a.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/infer_statics_transitively_a.dart.legacy.expect
@@ -1,8 +1,8 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./infer_statics_transitively_b.dart" as inf;
-import "./infer_statics_transitively.dart" as test;
+import "infer_statics_transitively_b.dart" as inf;
+import "infer_statics_transitively.dart" as test;
 
 import "org-dartlang-testcase:///infer_statics_transitively.dart";
 import "org-dartlang-testcase:///infer_statics_transitively_b.dart";
@@ -19,7 +19,7 @@
 library test;
 import self as test;
 import "dart:core" as core;
-import "./infer_statics_transitively_a.dart" as self;
+import "infer_statics_transitively_a.dart" as self;
 
 import "org-dartlang-testcase:///infer_statics_transitively_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_statics_transitively_a.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_statics_transitively_a.dart.legacy.transformed.expect
index e1f6bf9..7c8af8a 100644
--- a/pkg/front_end/testcases/inference/infer_statics_transitively_a.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_statics_transitively_a.dart.legacy.transformed.expect
@@ -1,8 +1,8 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./infer_statics_transitively_b.dart" as inf;
-import "./infer_statics_transitively.dart" as test;
+import "infer_statics_transitively_b.dart" as inf;
+import "infer_statics_transitively.dart" as test;
 
 import "org-dartlang-testcase:///infer_statics_transitively.dart";
 import "org-dartlang-testcase:///infer_statics_transitively_b.dart";
@@ -19,7 +19,7 @@
 library test;
 import self as test;
 import "dart:core" as core;
-import "./infer_statics_transitively_a.dart" as self;
+import "infer_statics_transitively_a.dart" as self;
 
 import "org-dartlang-testcase:///infer_statics_transitively_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_statics_transitively_a.dart.strong.expect b/pkg/front_end/testcases/inference/infer_statics_transitively_a.dart.strong.expect
index e5c5eb0..aa6b4be 100644
--- a/pkg/front_end/testcases/inference/infer_statics_transitively_a.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/infer_statics_transitively_a.dart.strong.expect
@@ -1,8 +1,8 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./infer_statics_transitively_b.dart" as inf;
-import "./infer_statics_transitively.dart" as test;
+import "infer_statics_transitively_b.dart" as inf;
+import "infer_statics_transitively.dart" as test;
 
 import "org-dartlang-testcase:///infer_statics_transitively.dart";
 import "org-dartlang-testcase:///infer_statics_transitively_b.dart";
@@ -19,7 +19,7 @@
 library test;
 import self as test;
 import "dart:core" as core;
-import "./infer_statics_transitively_a.dart" as self;
+import "infer_statics_transitively_a.dart" as self;
 
 import "org-dartlang-testcase:///infer_statics_transitively_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_statics_transitively_a.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/infer_statics_transitively_a.dart.strong.transformed.expect
index e5c5eb0..aa6b4be 100644
--- a/pkg/front_end/testcases/inference/infer_statics_transitively_a.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_statics_transitively_a.dart.strong.transformed.expect
@@ -1,8 +1,8 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./infer_statics_transitively_b.dart" as inf;
-import "./infer_statics_transitively.dart" as test;
+import "infer_statics_transitively_b.dart" as inf;
+import "infer_statics_transitively.dart" as test;
 
 import "org-dartlang-testcase:///infer_statics_transitively.dart";
 import "org-dartlang-testcase:///infer_statics_transitively_b.dart";
@@ -19,7 +19,7 @@
 library test;
 import self as test;
 import "dart:core" as core;
-import "./infer_statics_transitively_a.dart" as self;
+import "infer_statics_transitively_a.dart" as self;
 
 import "org-dartlang-testcase:///infer_statics_transitively_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_statics_with_method_invocations.dart.legacy.expect b/pkg/front_end/testcases/inference/infer_statics_with_method_invocations.dart.legacy.expect
index cdad9fa..1303bcc 100644
--- a/pkg/front_end/testcases/inference/infer_statics_with_method_invocations.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/infer_statics_with_method_invocations.dart.legacy.expect
@@ -1,7 +1,7 @@
 library test;
 import self as self;
 import "dart:core" as core;
-import "./infer_statics_with_method_invocations_a.dart" as inf;
+import "infer_statics_with_method_invocations_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_statics_with_method_invocations_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_statics_with_method_invocations.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_statics_with_method_invocations.dart.legacy.transformed.expect
index cdad9fa..1303bcc 100644
--- a/pkg/front_end/testcases/inference/infer_statics_with_method_invocations.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_statics_with_method_invocations.dart.legacy.transformed.expect
@@ -1,7 +1,7 @@
 library test;
 import self as self;
 import "dart:core" as core;
-import "./infer_statics_with_method_invocations_a.dart" as inf;
+import "infer_statics_with_method_invocations_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_statics_with_method_invocations_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_statics_with_method_invocations.dart.strong.expect b/pkg/front_end/testcases/inference/infer_statics_with_method_invocations.dart.strong.expect
index cdad9fa..1303bcc 100644
--- a/pkg/front_end/testcases/inference/infer_statics_with_method_invocations.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/infer_statics_with_method_invocations.dart.strong.expect
@@ -1,7 +1,7 @@
 library test;
 import self as self;
 import "dart:core" as core;
-import "./infer_statics_with_method_invocations_a.dart" as inf;
+import "infer_statics_with_method_invocations_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_statics_with_method_invocations_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_statics_with_method_invocations.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/infer_statics_with_method_invocations.dart.strong.transformed.expect
index cdad9fa..1303bcc 100644
--- a/pkg/front_end/testcases/inference/infer_statics_with_method_invocations.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_statics_with_method_invocations.dart.strong.transformed.expect
@@ -1,7 +1,7 @@
 library test;
 import self as self;
 import "dart:core" as core;
-import "./infer_statics_with_method_invocations_a.dart" as inf;
+import "infer_statics_with_method_invocations_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_statics_with_method_invocations_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_throw.dart b/pkg/front_end/testcases/inference/infer_throw.dart
index 0bd74f4..53940dc 100644
--- a/pkg/front_end/testcases/inference/infer_throw.dart
+++ b/pkg/front_end/testcases/inference/infer_throw.dart
@@ -5,10 +5,10 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=bool*/ t = true;
-var /*@topType=dynamic*/ a = (throw 0);
-var /*@topType=int*/ b = (throw 0) ? 1 : 2;
-var /*@topType=int*/ c = t ? (throw 1) : 2;
-var /*@topType=int*/ d = t ? 1 : (throw 2);
+var t = true;
+var a = (throw 0);
+var b = (throw 0) ? 1 : 2;
+var c = t ? (throw 1) : 2;
+var d = t ? 1 : (throw 2);
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_throw_downwards.dart b/pkg/front_end/testcases/inference/infer_throw_downwards.dart
index c733531..d542a11 100644
--- a/pkg/front_end/testcases/inference/infer_throw_downwards.dart
+++ b/pkg/front_end/testcases/inference/infer_throw_downwards.dart
@@ -7,7 +7,7 @@
 
 T f<T>() => null;
 
-var /*@topType=dynamic*/ x = throw /*@typeArgs=dynamic*/ f();
+var x = throw /*@typeArgs=dynamic*/ f();
 
 void g() {
   var /*@type=dynamic*/ x = throw /*@typeArgs=dynamic*/ f();
diff --git a/pkg/front_end/testcases/inference/infer_type_on_overridden_fields2.dart b/pkg/front_end/testcases/inference/infer_type_on_overridden_fields2.dart
index 356477b..e203004 100644
--- a/pkg/front_end/testcases/inference/infer_type_on_overridden_fields2.dart
+++ b/pkg/front_end/testcases/inference/infer_type_on_overridden_fields2.dart
@@ -10,7 +10,7 @@
 }
 
 class B extends A {
-  get /*@topType=int*/ x => 3;
+  get x => 3;
 }
 
 foo() {
diff --git a/pkg/front_end/testcases/inference/infer_type_on_overridden_fields4.dart b/pkg/front_end/testcases/inference/infer_type_on_overridden_fields4.dart
index 130f045..5dd2297 100644
--- a/pkg/front_end/testcases/inference/infer_type_on_overridden_fields4.dart
+++ b/pkg/front_end/testcases/inference/infer_type_on_overridden_fields4.dart
@@ -10,7 +10,7 @@
 }
 
 class B implements A {
-  get /*@topType=int*/ x => 3;
+  get x => 3;
 }
 
 foo() {
diff --git a/pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart b/pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart
index 8c53b40..8301e0d 100644
--- a/pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart
+++ b/pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart
@@ -8,7 +8,7 @@
 class A {
   int x = 0;
 
-  /*@topType=dynamic*/ test1() {
+  test1() {
     var /*@type=int*/ a = /*@target=A::x*/ x;
     a = /*error:INVALID_ASSIGNMENT*/ "hi";
     a = 3;
@@ -21,7 +21,7 @@
   }
 
   int y; // field def after use
-  final /*@topType=int*/ z = 42; // should infer `int`
+  final z = 42; // should infer `int`
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart.type_promotion.expect b/pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart.type_promotion.expect
index e745ffe..426e83a 100644
--- a/pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart.type_promotion.expect
+++ b/pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart.type_promotion.expect
@@ -1,18 +1,18 @@
-pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart:13:7: Context: Write to a@341
+pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart:13:7: Context: Write to a@320
     a = /*error:INVALID_ASSIGNMENT*/ "hi";
       ^
-pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart:14:7: Context: Write to a@341
+pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart:14:7: Context: Write to a@320
     a = 3;
       ^
-pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart:16:7: Context: Write to b@441
+pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart:16:7: Context: Write to b@420
     b = /*error:INVALID_ASSIGNMENT*/ "hi";
       ^
-pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart:17:7: Context: Write to b@441
+pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart:17:7: Context: Write to b@420
     b = 4;
       ^
-pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart:19:7: Context: Write to c@541
+pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart:19:7: Context: Write to c@520
     c = /*error:INVALID_ASSIGNMENT*/ "hi";
       ^
-pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart:20:7: Context: Write to c@541
+pkg/front_end/testcases/inference/infer_type_on_var_from_field.dart:20:7: Context: Write to c@520
     c = 4;
       ^
diff --git a/pkg/front_end/testcases/inference/infer_type_on_var_from_top_level.dart b/pkg/front_end/testcases/inference/infer_type_on_var_from_top_level.dart
index 402a884..6b971b5 100644
--- a/pkg/front_end/testcases/inference/infer_type_on_var_from_top_level.dart
+++ b/pkg/front_end/testcases/inference/infer_type_on_var_from_top_level.dart
@@ -20,6 +20,6 @@
 }
 
 int y = 0; // field def after use
-final /*@topType=int*/ z = 42; // should infer `int`
+final z = 42; // should infer `int`
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles.dart b/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles.dart
index 8f61c86..6a235ad 100644
--- a/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles.dart
+++ b/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles.dart
@@ -8,7 +8,7 @@
 import 'infer_type_regardless_of_declaration_order_or_cycles_b.dart';
 
 class C extends B {
-  get /*@topType=int*/ x => null;
+  get x => null;
 }
 
 class A {
diff --git a/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles.dart.legacy.expect b/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles.dart.legacy.expect
index 4302f4f..707d09d 100644
--- a/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles.dart.legacy.expect
@@ -1,6 +1,6 @@
 library test;
 import self as self;
-import "./infer_type_regardless_of_declaration_order_or_cycles_b.dart" as inf;
+import "infer_type_regardless_of_declaration_order_or_cycles_b.dart" as inf;
 import "dart:core" as core;
 
 import "org-dartlang-testcase:///infer_type_regardless_of_declaration_order_or_cycles_b.dart";
@@ -29,7 +29,7 @@
 
 library;
 import self as inf;
-import "./infer_type_regardless_of_declaration_order_or_cycles.dart" as self;
+import "infer_type_regardless_of_declaration_order_or_cycles.dart" as self;
 
 import "org-dartlang-testcase:///infer_type_regardless_of_declaration_order_or_cycles.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles.dart.legacy.transformed.expect
index 4302f4f..707d09d 100644
--- a/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles.dart.legacy.transformed.expect
@@ -1,6 +1,6 @@
 library test;
 import self as self;
-import "./infer_type_regardless_of_declaration_order_or_cycles_b.dart" as inf;
+import "infer_type_regardless_of_declaration_order_or_cycles_b.dart" as inf;
 import "dart:core" as core;
 
 import "org-dartlang-testcase:///infer_type_regardless_of_declaration_order_or_cycles_b.dart";
@@ -29,7 +29,7 @@
 
 library;
 import self as inf;
-import "./infer_type_regardless_of_declaration_order_or_cycles.dart" as self;
+import "infer_type_regardless_of_declaration_order_or_cycles.dart" as self;
 
 import "org-dartlang-testcase:///infer_type_regardless_of_declaration_order_or_cycles.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles.dart.strong.expect b/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles.dart.strong.expect
index 1f0fd34..ff10b61 100644
--- a/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles.dart.strong.expect
@@ -8,7 +8,7 @@
 //                                                                     ^
 //
 import self as self;
-import "./infer_type_regardless_of_declaration_order_or_cycles_b.dart" as inf;
+import "infer_type_regardless_of_declaration_order_or_cycles_b.dart" as inf;
 import "dart:core" as core;
 
 import "org-dartlang-testcase:///infer_type_regardless_of_declaration_order_or_cycles_b.dart";
@@ -40,7 +40,7 @@
 
 library;
 import self as inf;
-import "./infer_type_regardless_of_declaration_order_or_cycles.dart" as self;
+import "infer_type_regardless_of_declaration_order_or_cycles.dart" as self;
 
 import "org-dartlang-testcase:///infer_type_regardless_of_declaration_order_or_cycles.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles.dart.strong.transformed.expect
index 1f0fd34..ff10b61 100644
--- a/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles.dart.strong.transformed.expect
@@ -8,7 +8,7 @@
 //                                                                     ^
 //
 import self as self;
-import "./infer_type_regardless_of_declaration_order_or_cycles_b.dart" as inf;
+import "infer_type_regardless_of_declaration_order_or_cycles_b.dart" as inf;
 import "dart:core" as core;
 
 import "org-dartlang-testcase:///infer_type_regardless_of_declaration_order_or_cycles_b.dart";
@@ -40,7 +40,7 @@
 
 library;
 import self as inf;
-import "./infer_type_regardless_of_declaration_order_or_cycles.dart" as self;
+import "infer_type_regardless_of_declaration_order_or_cycles.dart" as self;
 
 import "org-dartlang-testcase:///infer_type_regardless_of_declaration_order_or_cycles.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles_b.dart.legacy.expect b/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles_b.dart.legacy.expect
index 2e91f62..f32c8d5 100644
--- a/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles_b.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles_b.dart.legacy.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./infer_type_regardless_of_declaration_order_or_cycles.dart" as test;
+import "infer_type_regardless_of_declaration_order_or_cycles.dart" as test;
 
 import "org-dartlang-testcase:///infer_type_regardless_of_declaration_order_or_cycles.dart";
 
@@ -13,7 +13,7 @@
 
 library test;
 import self as test;
-import "./infer_type_regardless_of_declaration_order_or_cycles_b.dart" as self;
+import "infer_type_regardless_of_declaration_order_or_cycles_b.dart" as self;
 import "dart:core" as core;
 
 import "org-dartlang-testcase:///infer_type_regardless_of_declaration_order_or_cycles_b.dart";
diff --git a/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles_b.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles_b.dart.legacy.transformed.expect
index 2e91f62..f32c8d5 100644
--- a/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles_b.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles_b.dart.legacy.transformed.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./infer_type_regardless_of_declaration_order_or_cycles.dart" as test;
+import "infer_type_regardless_of_declaration_order_or_cycles.dart" as test;
 
 import "org-dartlang-testcase:///infer_type_regardless_of_declaration_order_or_cycles.dart";
 
@@ -13,7 +13,7 @@
 
 library test;
 import self as test;
-import "./infer_type_regardless_of_declaration_order_or_cycles_b.dart" as self;
+import "infer_type_regardless_of_declaration_order_or_cycles_b.dart" as self;
 import "dart:core" as core;
 
 import "org-dartlang-testcase:///infer_type_regardless_of_declaration_order_or_cycles_b.dart";
diff --git a/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles_b.dart.strong.expect b/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles_b.dart.strong.expect
index fe03c30..9b49051 100644
--- a/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles_b.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles_b.dart.strong.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./infer_type_regardless_of_declaration_order_or_cycles.dart" as test;
+import "infer_type_regardless_of_declaration_order_or_cycles.dart" as test;
 
 import "org-dartlang-testcase:///infer_type_regardless_of_declaration_order_or_cycles.dart";
 
@@ -21,7 +21,7 @@
 //                                                                     ^
 //
 import self as test;
-import "./infer_type_regardless_of_declaration_order_or_cycles_b.dart" as self;
+import "infer_type_regardless_of_declaration_order_or_cycles_b.dart" as self;
 import "dart:core" as core;
 
 import "org-dartlang-testcase:///infer_type_regardless_of_declaration_order_or_cycles_b.dart";
diff --git a/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles_b.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles_b.dart.strong.transformed.expect
index fe03c30..9b49051 100644
--- a/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles_b.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_type_regardless_of_declaration_order_or_cycles_b.dart.strong.transformed.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./infer_type_regardless_of_declaration_order_or_cycles.dart" as test;
+import "infer_type_regardless_of_declaration_order_or_cycles.dart" as test;
 
 import "org-dartlang-testcase:///infer_type_regardless_of_declaration_order_or_cycles.dart";
 
@@ -21,7 +21,7 @@
 //                                                                     ^
 //
 import self as test;
-import "./infer_type_regardless_of_declaration_order_or_cycles_b.dart" as self;
+import "infer_type_regardless_of_declaration_order_or_cycles_b.dart" as self;
 import "dart:core" as core;
 
 import "org-dartlang-testcase:///infer_type_regardless_of_declaration_order_or_cycles_b.dart";
diff --git a/pkg/front_end/testcases/inference/infer_typed_map_literal.dart b/pkg/front_end/testcases/inference/infer_typed_map_literal.dart
index 0b78431..03bad8b 100644
--- a/pkg/front_end/testcases/inference/infer_typed_map_literal.dart
+++ b/pkg/front_end/testcases/inference/infer_typed_map_literal.dart
@@ -5,13 +5,12 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=Map<int, String>*/ a = <int, String>{0: 'aaa', 1: 'bbb'};
-var /*@topType=Map<double, int>*/ b = <double, int>{1.1: 1, 2.2: 2};
-var /*@topType=Map<List<int>, Map<String, double>>*/ c =
-    <List<int>, Map<String, double>>{};
-var /*@topType=Map<int, dynamic>*/ d = <int, dynamic>{};
-var /*@topType=Map<dynamic, int>*/ e = <dynamic, int>{};
-var /*@topType=Map<dynamic, dynamic>*/ f = <dynamic, dynamic>{};
+var a = <int, String>{0: 'aaa', 1: 'bbb'};
+var b = <double, int>{1.1: 1, 2.2: 2};
+var c = <List<int>, Map<String, double>>{};
+var d = <int, dynamic>{};
+var e = <dynamic, int>{};
+var f = <dynamic, dynamic>{};
 
 main() {
   a;
diff --git a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart
index b86463c..c1be80c 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart
+++ b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart
@@ -11,8 +11,8 @@
 }
 
 class B implements A<int> {
-  get /*@topType=int*/ x => 3;
-  get /*@topType=int*/ w => /*error:RETURN_OF_INVALID_TYPE*/ "hello";
+  get x => 3;
+  get w => /*error:RETURN_OF_INVALID_TYPE*/ "hello";
 }
 
 foo() {
diff --git a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart.strong.expect b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart.strong.expect
index 2ac925a..e8cded4 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart.strong.expect
@@ -2,10 +2,10 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart:15:62: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart:15:45: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
-//   get /*@topType=int*/ w => /*error:RETURN_OF_INVALID_TYPE*/ "hello";
-//                                                              ^
+//   get w => /*error:RETURN_OF_INVALID_TYPE*/ "hello";
+//                                             ^
 //
 // pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart:19:69: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
 // Try changing the type of the left hand side, or casting the right hand side to 'String'.
@@ -29,10 +29,10 @@
   get x() → core::int
     return 3;
   get w() → core::int
-    return let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart:15:62: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+    return let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart:15:45: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
-  get /*@topType=int*/ w => /*error:RETURN_OF_INVALID_TYPE*/ \"hello\";
-                                                             ^" in "hello" as{TypeError} core::int;
+  get w => /*error:RETURN_OF_INVALID_TYPE*/ \"hello\";
+                                            ^" in "hello" as{TypeError} core::int;
 }
 static method foo() → dynamic {
   core::String y = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart:19:69: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
diff --git a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart.strong.transformed.expect
index 2ac925a..e8cded4 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart.strong.transformed.expect
@@ -2,10 +2,10 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart:15:62: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart:15:45: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
-//   get /*@topType=int*/ w => /*error:RETURN_OF_INVALID_TYPE*/ "hello";
-//                                                              ^
+//   get w => /*error:RETURN_OF_INVALID_TYPE*/ "hello";
+//                                             ^
 //
 // pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart:19:69: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
 // Try changing the type of the left hand side, or casting the right hand side to 'String'.
@@ -29,10 +29,10 @@
   get x() → core::int
     return 3;
   get w() → core::int
-    return let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart:15:62: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+    return let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart:15:45: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
-  get /*@topType=int*/ w => /*error:RETURN_OF_INVALID_TYPE*/ \"hello\";
-                                                             ^" in "hello" as{TypeError} core::int;
+  get w => /*error:RETURN_OF_INVALID_TYPE*/ \"hello\";
+                                            ^" in "hello" as{TypeError} core::int;
 }
 static method foo() → dynamic {
   core::String y = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_3.dart:19:69: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
diff --git a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart
index d3bf9ef..957177a 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart
+++ b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart
@@ -11,7 +11,7 @@
 
 class B<E> extends A<E> {
   E y;
-  get /*@topType=B::E*/ x => /*@target=B::y*/ y;
+  get x => /*@target=B::y*/ y;
 }
 
 foo() {
diff --git a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart.legacy.expect b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart.legacy.expect
index ef150d9..3c624e6 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart.legacy.expect
@@ -3,13 +3,13 @@
 import "dart:core" as core;
 
 class A<T extends core::Object = dynamic> extends core::Object {
-  field self::A::T x = null;
+  generic-covariant-impl field self::A::T x = null;
   synthetic constructor •() → self::A<self::A::T>
     : super core::Object::•()
     ;
 }
 class B<E extends core::Object = dynamic> extends self::A<self::B::E> {
-  field self::B::E y = null;
+  generic-covariant-impl field self::B::E y = null;
   synthetic constructor •() → self::B<self::B::E>
     : super self::A::•()
     ;
diff --git a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart.legacy.transformed.expect
index ef150d9..3c624e6 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_4.dart.legacy.transformed.expect
@@ -3,13 +3,13 @@
 import "dart:core" as core;
 
 class A<T extends core::Object = dynamic> extends core::Object {
-  field self::A::T x = null;
+  generic-covariant-impl field self::A::T x = null;
   synthetic constructor •() → self::A<self::A::T>
     : super core::Object::•()
     ;
 }
 class B<E extends core::Object = dynamic> extends self::A<self::B::E> {
-  field self::B::E y = null;
+  generic-covariant-impl field self::B::E y = null;
   synthetic constructor •() → self::B<self::B::E>
     : super self::A::•()
     ;
diff --git a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_5.dart b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_5.dart
index 473e129..5025679 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_5.dart
+++ b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_5.dart
@@ -6,12 +6,12 @@
 library test;
 
 abstract class I<E> {
-  String m(/*@topType=dynamic*/ a, String f(v, E e));
+  String m(a, String f(v, E e));
 }
 
 abstract class A<E> implements I<E> {
   const A();
-  String m(/*@topType=dynamic*/ a, String f(v, E e));
+  String m(a, String f(v, E e));
 }
 
 abstract class M {
@@ -22,7 +22,7 @@
   const B();
   int get y => 0;
 
-  /*@topType=String*/ m(/*@topType=dynamic*/ a, f(v, E e)) {}
+  m(a, f(v, E e)) {}
 }
 
 foo() {
diff --git a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle.dart b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle.dart
index c3b7d7d..49235aa 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle.dart
+++ b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle.dart
@@ -21,7 +21,7 @@
   const B();
   int get y => 0;
 
-  /*@topType=A<B::E>*/ m(/*@topType=dynamic*/ a, f(v, int e)) {}
+  m(a, f(v, int e)) {}
 }
 
 foo() {
diff --git a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle.dart.legacy.expect b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle.dart.legacy.expect
index 2f73c7b..ecee2c6 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle.dart.legacy.expect
@@ -1,7 +1,7 @@
 library test;
 import self as self;
 import "dart:core" as core;
-import "./infer_types_on_generic_instantiations_in_library_cycle_a.dart" as inf;
+import "infer_types_on_generic_instantiations_in_library_cycle_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_types_on_generic_instantiations_in_library_cycle_a.dart";
 
@@ -34,7 +34,7 @@
 library;
 import self as inf;
 import "dart:core" as core;
-import "./infer_types_on_generic_instantiations_in_library_cycle.dart" as self;
+import "infer_types_on_generic_instantiations_in_library_cycle.dart" as self;
 
 import "org-dartlang-testcase:///infer_types_on_generic_instantiations_in_library_cycle.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle.dart.legacy.transformed.expect
index 2f73c7b..ecee2c6 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle.dart.legacy.transformed.expect
@@ -1,7 +1,7 @@
 library test;
 import self as self;
 import "dart:core" as core;
-import "./infer_types_on_generic_instantiations_in_library_cycle_a.dart" as inf;
+import "infer_types_on_generic_instantiations_in_library_cycle_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_types_on_generic_instantiations_in_library_cycle_a.dart";
 
@@ -34,7 +34,7 @@
 library;
 import self as inf;
 import "dart:core" as core;
-import "./infer_types_on_generic_instantiations_in_library_cycle.dart" as self;
+import "infer_types_on_generic_instantiations_in_library_cycle.dart" as self;
 
 import "org-dartlang-testcase:///infer_types_on_generic_instantiations_in_library_cycle.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle.dart.strong.expect b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle.dart.strong.expect
index af26f52..1f20b42 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle.dart.strong.expect
@@ -9,7 +9,7 @@
 //
 import self as self;
 import "dart:core" as core;
-import "./infer_types_on_generic_instantiations_in_library_cycle_a.dart" as inf;
+import "infer_types_on_generic_instantiations_in_library_cycle_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_types_on_generic_instantiations_in_library_cycle_a.dart";
 
@@ -45,7 +45,7 @@
 library;
 import self as inf;
 import "dart:core" as core;
-import "./infer_types_on_generic_instantiations_in_library_cycle.dart" as self;
+import "infer_types_on_generic_instantiations_in_library_cycle.dart" as self;
 
 import "org-dartlang-testcase:///infer_types_on_generic_instantiations_in_library_cycle.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle.dart.strong.transformed.expect
index af26f52..1f20b42 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle.dart.strong.transformed.expect
@@ -9,7 +9,7 @@
 //
 import self as self;
 import "dart:core" as core;
-import "./infer_types_on_generic_instantiations_in_library_cycle_a.dart" as inf;
+import "infer_types_on_generic_instantiations_in_library_cycle_a.dart" as inf;
 
 import "org-dartlang-testcase:///infer_types_on_generic_instantiations_in_library_cycle_a.dart";
 
@@ -45,7 +45,7 @@
 library;
 import self as inf;
 import "dart:core" as core;
-import "./infer_types_on_generic_instantiations_in_library_cycle.dart" as self;
+import "infer_types_on_generic_instantiations_in_library_cycle.dart" as self;
 
 import "org-dartlang-testcase:///infer_types_on_generic_instantiations_in_library_cycle.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle_a.dart b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle_a.dart
index aac0b74..0d4db22 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle_a.dart
+++ b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle_a.dart
@@ -6,7 +6,7 @@
 import 'infer_types_on_generic_instantiations_in_library_cycle.dart';
 
 abstract class I<E> {
-  A<E> m(/*@topType=dynamic*/ a, String f(v, int e));
+  A<E> m(a, String f(v, int e));
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle_a.dart.legacy.expect b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle_a.dart.legacy.expect
index c8150f5..54ed9fa 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle_a.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle_a.dart.legacy.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./infer_types_on_generic_instantiations_in_library_cycle.dart" as test;
+import "infer_types_on_generic_instantiations_in_library_cycle.dart" as test;
 
 import "org-dartlang-testcase:///infer_types_on_generic_instantiations_in_library_cycle.dart";
 
@@ -16,7 +16,7 @@
 library test;
 import self as test;
 import "dart:core" as core;
-import "./infer_types_on_generic_instantiations_in_library_cycle_a.dart" as self;
+import "infer_types_on_generic_instantiations_in_library_cycle_a.dart" as self;
 
 import "org-dartlang-testcase:///infer_types_on_generic_instantiations_in_library_cycle_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle_a.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle_a.dart.legacy.transformed.expect
index c8150f5..54ed9fa 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle_a.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle_a.dart.legacy.transformed.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./infer_types_on_generic_instantiations_in_library_cycle.dart" as test;
+import "infer_types_on_generic_instantiations_in_library_cycle.dart" as test;
 
 import "org-dartlang-testcase:///infer_types_on_generic_instantiations_in_library_cycle.dart";
 
@@ -16,7 +16,7 @@
 library test;
 import self as test;
 import "dart:core" as core;
-import "./infer_types_on_generic_instantiations_in_library_cycle_a.dart" as self;
+import "infer_types_on_generic_instantiations_in_library_cycle_a.dart" as self;
 
 import "org-dartlang-testcase:///infer_types_on_generic_instantiations_in_library_cycle_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle_a.dart.strong.expect b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle_a.dart.strong.expect
index 09436d7..a10bf88 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle_a.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle_a.dart.strong.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./infer_types_on_generic_instantiations_in_library_cycle.dart" as test;
+import "infer_types_on_generic_instantiations_in_library_cycle.dart" as test;
 
 import "org-dartlang-testcase:///infer_types_on_generic_instantiations_in_library_cycle.dart";
 
@@ -24,7 +24,7 @@
 //
 import self as test;
 import "dart:core" as core;
-import "./infer_types_on_generic_instantiations_in_library_cycle_a.dart" as self;
+import "infer_types_on_generic_instantiations_in_library_cycle_a.dart" as self;
 
 import "org-dartlang-testcase:///infer_types_on_generic_instantiations_in_library_cycle_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle_a.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle_a.dart.strong.transformed.expect
index 09436d7..a10bf88 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle_a.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_in_library_cycle_a.dart.strong.transformed.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./infer_types_on_generic_instantiations_in_library_cycle.dart" as test;
+import "infer_types_on_generic_instantiations_in_library_cycle.dart" as test;
 
 import "org-dartlang-testcase:///infer_types_on_generic_instantiations_in_library_cycle.dart";
 
@@ -24,7 +24,7 @@
 //
 import self as test;
 import "dart:core" as core;
-import "./infer_types_on_generic_instantiations_in_library_cycle_a.dart" as self;
+import "infer_types_on_generic_instantiations_in_library_cycle_a.dart" as self;
 
 import "org-dartlang-testcase:///infer_types_on_generic_instantiations_in_library_cycle_a.dart";
 
diff --git a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_infer.dart.strong.expect b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_infer.dart.strong.expect
index a901909..e21b9d9 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_infer.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_infer.dart.strong.expect
@@ -2,7 +2,7 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_infer.dart:13:49: Error: The return type of the method 'B.x' is 'dynamic', which does not match the return type of the overridden method, 'int'.
+// pkg/front_end/testcases/inference/infer_types_on_generic_instantiations_infer.dart:13:49: Error: The return type of the method 'B.x' is 'dynamic', which does not match the return type, 'int', of the overridden method, 'A.x'.
 // Change to a subtype of 'int'.
 //   /*error:INVALID_METHOD_OVERRIDE*/ dynamic get x => 3;
 //                                                 ^
diff --git a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop.dart.legacy.expect b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop.dart.legacy.expect
index 4cb8f64..5afe30e 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop.dart.legacy.expect
@@ -12,7 +12,7 @@
   synthetic constructor •() → self::Bar<self::Bar::T>
     : super core::Object::•()
     ;
-  method foo(self::Bar::T t) → void {
+  method foo(generic-covariant-impl self::Bar::T t) → void {
     for (dynamic i in t) {
       core::int x = i;
     }
@@ -22,7 +22,7 @@
   synthetic constructor •() → self::Baz<self::Baz::T, self::Baz::E, self::Baz::S>
     : super core::Object::•()
     ;
-  method foo(self::Baz::S t) → void {
+  method foo(generic-covariant-impl self::Baz::S t) → void {
     for (dynamic i in t) {
       core::int x = i;
       self::Baz::T y = i;
diff --git a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop.dart.legacy.transformed.expect
index 4cb8f64..5afe30e 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop.dart.legacy.transformed.expect
@@ -12,7 +12,7 @@
   synthetic constructor •() → self::Bar<self::Bar::T>
     : super core::Object::•()
     ;
-  method foo(self::Bar::T t) → void {
+  method foo(generic-covariant-impl self::Bar::T t) → void {
     for (dynamic i in t) {
       core::int x = i;
     }
@@ -22,7 +22,7 @@
   synthetic constructor •() → self::Baz<self::Baz::T, self::Baz::E, self::Baz::S>
     : super core::Object::•()
     ;
-  method foo(self::Baz::S t) → void {
+  method foo(generic-covariant-impl self::Baz::S t) → void {
     for (dynamic i in t) {
       core::int x = i;
       self::Baz::T y = i;
diff --git a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart
index f2fc604..9b410ed 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart
+++ b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart
@@ -12,7 +12,7 @@
 }
 
 class Bar<T extends Stream<String>> {
-  /*@topType=dynamic*/ foo(T t) async {
+  foo(T t) async {
     await for (var /*@type=String*/ i in t) {
       int x = /*error:INVALID_ASSIGNMENT*/ i;
     }
@@ -20,7 +20,7 @@
 }
 
 class Baz<T, E extends Stream<T>, S extends E> {
-  /*@topType=dynamic*/ foo(S t) async {
+  foo(S t) async {
     await for (var /*@type=Baz::T*/ i in t) {
       int x = /*error:INVALID_ASSIGNMENT*/ i;
       T y = i;
diff --git a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.legacy.expect b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.legacy.expect
index 0d7e2c9..e4a880ef 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.legacy.expect
@@ -15,7 +15,7 @@
   synthetic constructor •() → self::Bar<self::Bar::T>
     : super core::Object::•()
     ;
-  method foo(self::Bar::T t) → dynamic async {
+  method foo(generic-covariant-impl self::Bar::T t) → dynamic async {
     await for (dynamic i in t) {
       core::int x = i;
     }
@@ -25,7 +25,7 @@
   synthetic constructor •() → self::Baz<self::Baz::T, self::Baz::E, self::Baz::S>
     : super core::Object::•()
     ;
-  method foo(self::Baz::S t) → dynamic async {
+  method foo(generic-covariant-impl self::Baz::S t) → dynamic async {
     await for (dynamic i in t) {
       core::int x = i;
       self::Baz::T y = i;
diff --git a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.legacy.transformed.expect
index 2cc1d41..a26de4c 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.legacy.transformed.expect
@@ -15,7 +15,7 @@
   synthetic constructor •() → self::Bar<self::Bar::T>
     : super core::Object::•()
     ;
-  method foo(self::Bar::T t) → dynamic /* originally async */ {
+  method foo(generic-covariant-impl self::Bar::T t) → dynamic /* originally async */ {
     final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
@@ -74,7 +74,7 @@
   synthetic constructor •() → self::Baz<self::Baz::T, self::Baz::E, self::Baz::S>
     : super core::Object::•()
     ;
-  method foo(self::Baz::S t) → dynamic /* originally async */ {
+  method foo(generic-covariant-impl self::Baz::S t) → dynamic /* originally async */ {
     final asy::_AsyncAwaitCompleter<dynamic> :async_completer = new asy::_AsyncAwaitCompleter::•<dynamic>();
     asy::FutureOr<dynamic> :return_value;
     dynamic :async_stack_trace;
diff --git a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.outline.expect b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.outline.expect
index 70778c8..c157ca9 100644
--- a/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/infer_types_on_loop_indices_for_each_loop_async.dart.outline.expect
@@ -13,13 +13,13 @@
 class Bar<T extends asy::Stream<core::String> = dynamic> extends core::Object {
   synthetic constructor •() → self::Bar<self::Bar::T>
     ;
-  method foo(self::Bar::T t) → dynamic
+  method foo(generic-covariant-impl self::Bar::T t) → dynamic
     ;
 }
 class Baz<T extends core::Object = dynamic, E extends asy::Stream<self::Baz::T> = dynamic, S extends self::Baz::E = dynamic> extends core::Object {
   synthetic constructor •() → self::Baz<self::Baz::T, self::Baz::E, self::Baz::S>
     ;
-  method foo(self::Baz::S t) → dynamic
+  method foo(generic-covariant-impl self::Baz::S t) → dynamic
     ;
 }
 abstract class MyStream<T extends core::Object = dynamic> extends asy::Stream<self::MyStream::T> {
diff --git a/pkg/front_end/testcases/inference/infer_variable_void.dart b/pkg/front_end/testcases/inference/infer_variable_void.dart
index 3e54630..65fdfb3 100644
--- a/pkg/front_end/testcases/inference/infer_variable_void.dart
+++ b/pkg/front_end/testcases/inference/infer_variable_void.dart
@@ -6,7 +6,7 @@
 library test;
 
 void f() {}
-var /*@topType=void*/ x = /*info:USE_OF_VOID_RESULT*/ f();
+var x = /*info:USE_OF_VOID_RESULT*/ f();
 
 main() {
   x;
diff --git a/pkg/front_end/testcases/inference/inferred_initializing_formal_checks_default_value.dart b/pkg/front_end/testcases/inference/inferred_initializing_formal_checks_default_value.dart
index d383d76..5ecd7db 100644
--- a/pkg/front_end/testcases/inference/inferred_initializing_formal_checks_default_value.dart
+++ b/pkg/front_end/testcases/inference/inferred_initializing_formal_checks_default_value.dart
@@ -6,7 +6,7 @@
 library test;
 
 class Foo {
-  var /*@topType=int*/ x = 1;
+  var x = 1;
   Foo([this.x = /*error:INVALID_ASSIGNMENT*/ "1"]);
 }
 
diff --git a/pkg/front_end/testcases/inference/inferred_nonstatic_field_depends_on_static_field_complex.dart b/pkg/front_end/testcases/inference/inferred_nonstatic_field_depends_on_static_field_complex.dart
index 281d549..760375f 100644
--- a/pkg/front_end/testcases/inference/inferred_nonstatic_field_depends_on_static_field_complex.dart
+++ b/pkg/front_end/testcases/inference/inferred_nonstatic_field_depends_on_static_field_complex.dart
@@ -6,8 +6,8 @@
 library test;
 
 class C {
-  static var /*@topType=String*/ x = 'x';
-  var /*@topType=Map<String, Map<String, String>>*/ y = /*@typeArgs=String, Map<String, String>*/ {
+  static var x = 'x';
+  var y = /*@typeArgs=String, Map<String, String>*/ {
     'a': /*@typeArgs=String, String*/ {'b': 'c'},
     'd': /*@typeArgs=String, String*/ {'e': x}
   };
diff --git a/pkg/front_end/testcases/inference/inferred_nonstatic_field_depends_on_top_level_var_simple.dart b/pkg/front_end/testcases/inference/inferred_nonstatic_field_depends_on_top_level_var_simple.dart
index 39d8091..8e9c16b 100644
--- a/pkg/front_end/testcases/inference/inferred_nonstatic_field_depends_on_top_level_var_simple.dart
+++ b/pkg/front_end/testcases/inference/inferred_nonstatic_field_depends_on_top_level_var_simple.dart
@@ -5,10 +5,10 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=String*/ x = 'x';
+var x = 'x';
 
 class C {
-  var /*@topType=String*/ y = x;
+  var y = x;
 }
 
 main() {
diff --git a/pkg/front_end/testcases/inference/inferred_type_cascade.dart b/pkg/front_end/testcases/inference/inferred_type_cascade.dart
index a6308da..c7f21af 100644
--- a/pkg/front_end/testcases/inference/inferred_type_cascade.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_cascade.dart
@@ -11,7 +11,7 @@
   void m() {}
 }
 
-var /*@topType=A*/ v = new A()
+var v = new A()
   .. /*@target=A::a*/ a = 1
   .. /*@target=A::b*/ b. /*@target=List::add*/ add(2)
   .. /*@target=A::m*/ m();
diff --git a/pkg/front_end/testcases/inference/inferred_type_custom_binary_op.dart b/pkg/front_end/testcases/inference/inferred_type_custom_binary_op.dart
index bc3ee5c..776efe5 100644
--- a/pkg/front_end/testcases/inference/inferred_type_custom_binary_op.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_custom_binary_op.dart
@@ -10,7 +10,7 @@
 }
 
 C c = new C();
-var /*@topType=bool*/ x = c /*@target=C::**/ * c;
+var x = c /*@target=C::**/ * c;
 
 main() {
   c;
diff --git a/pkg/front_end/testcases/inference/inferred_type_custom_binary_op_via_interface.dart b/pkg/front_end/testcases/inference/inferred_type_custom_binary_op_via_interface.dart
index 02e1dfb..72a8365 100644
--- a/pkg/front_end/testcases/inference/inferred_type_custom_binary_op_via_interface.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_custom_binary_op_via_interface.dart
@@ -12,7 +12,7 @@
 abstract class C implements I {}
 
 C c;
-var /*@topType=bool*/ x = c /*@target=I::**/ * c;
+var x = c /*@target=I::**/ * c;
 
 main() {
   c;
diff --git a/pkg/front_end/testcases/inference/inferred_type_custom_unary_op.dart b/pkg/front_end/testcases/inference/inferred_type_custom_unary_op.dart
index d54e302..26e560c 100644
--- a/pkg/front_end/testcases/inference/inferred_type_custom_unary_op.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_custom_unary_op.dart
@@ -10,7 +10,7 @@
 }
 
 C c = new C();
-var /*@topType=bool*/ x = /*@target=C::unary-*/ -c;
+var x = /*@target=C::unary-*/ -c;
 
 main() {
   c;
diff --git a/pkg/front_end/testcases/inference/inferred_type_custom_unary_op_via_interface.dart b/pkg/front_end/testcases/inference/inferred_type_custom_unary_op_via_interface.dart
index 1289475..db149d1 100644
--- a/pkg/front_end/testcases/inference/inferred_type_custom_unary_op_via_interface.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_custom_unary_op_via_interface.dart
@@ -12,7 +12,7 @@
 abstract class C implements I {}
 
 C c;
-var /*@topType=bool*/ x = /*@target=I::unary-*/ -c;
+var x = /*@target=I::unary-*/ -c;
 
 main() {
   c;
diff --git a/pkg/front_end/testcases/inference/inferred_type_extract_method_tear_off.dart b/pkg/front_end/testcases/inference/inferred_type_extract_method_tear_off.dart
index e9e21a5..813e3cd 100644
--- a/pkg/front_end/testcases/inference/inferred_type_extract_method_tear_off.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_extract_method_tear_off.dart
@@ -10,6 +10,6 @@
 }
 
 C f() => null;
-var /*@topType=() -> bool*/ x = f(). /*@target=C::g*/ g;
+var x = f(). /*@target=C::g*/ g;
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/inferred_type_extract_method_tear_off_via_interface.dart b/pkg/front_end/testcases/inference/inferred_type_extract_method_tear_off_via_interface.dart
index 28313ff..b4874c6 100644
--- a/pkg/front_end/testcases/inference/inferred_type_extract_method_tear_off_via_interface.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_extract_method_tear_off_via_interface.dart
@@ -12,6 +12,6 @@
 abstract class C implements I {}
 
 C f() => null;
-var /*@topType=() -> bool*/ x = f(). /*@target=I::g*/ g;
+var x = f(). /*@target=I::g*/ g;
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/inferred_type_from_top_level_executable_tear_off.dart b/pkg/front_end/testcases/inference/inferred_type_from_top_level_executable_tear_off.dart
index 4ccdbce..38ccc97 100644
--- a/pkg/front_end/testcases/inference/inferred_type_from_top_level_executable_tear_off.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_from_top_level_executable_tear_off.dart
@@ -5,7 +5,7 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=(Object) -> void*/ v = print;
+var v = print;
 
 main() {
   v;
diff --git a/pkg/front_end/testcases/inference/inferred_type_invoke_method.dart b/pkg/front_end/testcases/inference/inferred_type_invoke_method.dart
index ec5825a..387aeff 100644
--- a/pkg/front_end/testcases/inference/inferred_type_invoke_method.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_invoke_method.dart
@@ -10,6 +10,6 @@
 }
 
 C f() => null;
-var /*@topType=bool*/ x = f(). /*@target=C::g*/ g();
+var x = f(). /*@target=C::g*/ g();
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/inferred_type_invoke_method_via_interface.dart b/pkg/front_end/testcases/inference/inferred_type_invoke_method_via_interface.dart
index f28fb58..e31a0d3 100644
--- a/pkg/front_end/testcases/inference/inferred_type_invoke_method_via_interface.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_invoke_method_via_interface.dart
@@ -12,6 +12,6 @@
 abstract class C implements I {}
 
 C f() => null;
-var /*@topType=bool*/ x = f(). /*@target=I::g*/ g();
+var x = f(). /*@target=I::g*/ g();
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/inferred_type_is_enum.dart b/pkg/front_end/testcases/inference/inferred_type_is_enum.dart
index 46c1099..1262709 100644
--- a/pkg/front_end/testcases/inference/inferred_type_is_enum.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_is_enum.dart
@@ -6,7 +6,7 @@
 library test;
 
 enum E { v1 }
-final /*@topType=E*/ x = E.v1;
+final x = E.v1;
 
 main() {
   x;
diff --git a/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart b/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart
index abc84d5..2463b13 100644
--- a/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_is_enum_values.dart
@@ -6,7 +6,7 @@
 library test;
 
 enum E { v1 }
-final /*@topType=List<E>*/ x = E.values;
+final x = E.values;
 
 main() {
   x;
diff --git a/pkg/front_end/testcases/inference/inferred_type_is_typedef.dart b/pkg/front_end/testcases/inference/inferred_type_is_typedef.dart
index fa8c890..faf400f 100644
--- a/pkg/front_end/testcases/inference/inferred_type_is_typedef.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_is_typedef.dart
@@ -6,7 +6,7 @@
 library test;
 
 typedef void F();
-final /*@topType=Map<String, () -> void>*/ x = <String, F>{};
+final x = <String, F>{};
 
 main() {
   x;
diff --git a/pkg/front_end/testcases/inference/inferred_type_is_typedef_parameterized.dart b/pkg/front_end/testcases/inference/inferred_type_is_typedef_parameterized.dart
index 26b4cc8..09ae0af 100644
--- a/pkg/front_end/testcases/inference/inferred_type_is_typedef_parameterized.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_is_typedef_parameterized.dart
@@ -6,6 +6,6 @@
 library test;
 
 typedef T F<T>();
-final /*@topType=Map<String, () -> int>*/ x = <String, F<int>>{};
+final x = <String, F<int>>{};
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type.dart b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type.dart
index 9ea230b..2cc5ff7 100644
--- a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type.dart
@@ -7,7 +7,7 @@
 
 int f() => null;
 String g() => null;
-var /*@topType=List<() -> Object>*/ v = /*@typeArgs=() -> Object*/ [f, g];
+var v = /*@typeArgs=() -> Object*/ [f, g];
 
 main() {
   v;
diff --git a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_function_typed_param.dart b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_function_typed_param.dart
index 17056f9..dadf60b 100644
--- a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_function_typed_param.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_function_typed_param.dart
@@ -7,10 +7,7 @@
 
 int f(int x(String y)) => null;
 String g(int x(String y)) => null;
-var /*@topType=List<((String) -> int) -> Object>*/ v = /*@typeArgs=((String) -> int) -> Object*/ [
-  f,
-  g
-];
+var v = /*@typeArgs=((String) -> int) -> Object*/ [f, g];
 
 main() {
   v;
diff --git a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_named_param.dart b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_named_param.dart
index 4a1212c..d922665 100644
--- a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_named_param.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_named_param.dart
@@ -7,10 +7,7 @@
 
 int f({int x}) => null;
 String g({int x}) => null;
-var /*@topType=List<({x: int}) -> Object>*/ v = /*@typeArgs=({x: int}) -> Object*/ [
-  f,
-  g
-];
+var v = /*@typeArgs=({x: int}) -> Object*/ [f, g];
 
 main() {
   v;
diff --git a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_positional_param.dart b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_positional_param.dart
index 192c43f..1307233 100644
--- a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_positional_param.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_positional_param.dart
@@ -7,10 +7,7 @@
 
 int f([int x]) => null;
 String g([int x]) => null;
-var /*@topType=List<([int]) -> Object>*/ v = /*@typeArgs=([int]) -> Object*/ [
-  f,
-  g
-];
+var v = /*@typeArgs=([int]) -> Object*/ [f, g];
 
 main() {
   v;
diff --git a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_required_param.dart b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_required_param.dart
index 4d1cef2..926a0d3 100644
--- a/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_required_param.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_uses_synthetic_function_type_required_param.dart
@@ -7,7 +7,7 @@
 
 int f(int x) => null;
 String g(int x) => null;
-var /*@topType=List<(int) -> Object>*/ v = /*@typeArgs=(int) -> Object*/ [f, g];
+var v = /*@typeArgs=(int) -> Object*/ [f, g];
 
 main() {
   v;
diff --git a/pkg/front_end/testcases/inference/inferred_type_via_closure_multiple_levels_of_nesting.dart b/pkg/front_end/testcases/inference/inferred_type_via_closure_multiple_levels_of_nesting.dart
index 1408cdd..11972a9 100644
--- a/pkg/front_end/testcases/inference/inferred_type_via_closure_multiple_levels_of_nesting.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_via_closure_multiple_levels_of_nesting.dart
@@ -6,7 +6,7 @@
 library test;
 
 class C {
-  static final /*@topType=(bool) -> (int) -> Map<int, bool>*/ f = /*@returnType=(int) -> Map<int, bool>*/ (bool
+  static final f = /*@returnType=(int) -> Map<int, bool>*/ (bool
       b) => /*@returnType=Map<int, bool>*/ (int i) => /*@typeArgs=int, bool*/ {i: b};
 }
 
diff --git a/pkg/front_end/testcases/inference/inferred_type_via_closure_type_depends_on_args.dart b/pkg/front_end/testcases/inference/inferred_type_via_closure_type_depends_on_args.dart
index 3de4209..76efa44 100644
--- a/pkg/front_end/testcases/inference/inferred_type_via_closure_type_depends_on_args.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_via_closure_type_depends_on_args.dart
@@ -6,8 +6,7 @@
 library test;
 
 class C {
-  static final /*@topType=(bool) -> bool*/ f = /*@returnType=bool*/ (bool b) =>
-      b;
+  static final f = /*@returnType=bool*/ (bool b) => b;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/inferred_type_via_closure_type_independent_of_args_field.dart b/pkg/front_end/testcases/inference/inferred_type_via_closure_type_independent_of_args_field.dart
index 8d3291f..08e3315 100644
--- a/pkg/front_end/testcases/inference/inferred_type_via_closure_type_independent_of_args_field.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_via_closure_type_independent_of_args_field.dart
@@ -6,7 +6,7 @@
 library test;
 
 class C {
-  static final /*@topType=(bool) -> int*/ f = /*@returnType=int*/ (bool b) => 1;
+  static final f = /*@returnType=int*/ (bool b) => 1;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/inferred_type_via_closure_type_independent_of_args_top_level.dart b/pkg/front_end/testcases/inference/inferred_type_via_closure_type_independent_of_args_top_level.dart
index 5a23706..1030f5b 100644
--- a/pkg/front_end/testcases/inference/inferred_type_via_closure_type_independent_of_args_top_level.dart
+++ b/pkg/front_end/testcases/inference/inferred_type_via_closure_type_independent_of_args_top_level.dart
@@ -5,7 +5,7 @@
 /*@testedFeatures=inference*/
 library test;
 
-final /*@topType=(bool) -> int*/ f = /*@returnType=int*/ (bool b) => 1;
+final f = /*@returnType=int*/ (bool b) => 1;
 
 main() {
   f;
diff --git a/pkg/front_end/testcases/inference/inheritance_does_not_imply_circularity.dart b/pkg/front_end/testcases/inference/inheritance_does_not_imply_circularity.dart
index fb72d4d..4c3240d 100644
--- a/pkg/front_end/testcases/inference/inheritance_does_not_imply_circularity.dart
+++ b/pkg/front_end/testcases/inference/inheritance_does_not_imply_circularity.dart
@@ -10,7 +10,7 @@
 // circularity.
 
 class I1 {
-  final /*@topType=int*/ x = y;
+  final x = y;
 }
 
 abstract class I2 {
@@ -21,6 +21,6 @@
   int get x => 0;
 }
 
-var /*@topType=int*/ y = new C(). /*@target=C::x*/ x;
+var y = new C(). /*@target=C::x*/ x;
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/inheritance_does_not_imply_circularity.dart.hierarchy.expect b/pkg/front_end/testcases/inference/inheritance_does_not_imply_circularity.dart.hierarchy.expect
index f852cff..9ae2e27 100644
--- a/pkg/front_end/testcases/inference/inheritance_does_not_imply_circularity.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/inheritance_does_not_imply_circularity.dart.hierarchy.expect
@@ -55,6 +55,7 @@
   classSetters:
 
 C:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: I1, I2
diff --git a/pkg/front_end/testcases/inference/instantiate_to_bounds_invoke_constructor_type_args_exact.dart b/pkg/front_end/testcases/inference/instantiate_to_bounds_invoke_constructor_type_args_exact.dart
index cca99f8..a1c62d3 100644
--- a/pkg/front_end/testcases/inference/instantiate_to_bounds_invoke_constructor_type_args_exact.dart
+++ b/pkg/front_end/testcases/inference/instantiate_to_bounds_invoke_constructor_type_args_exact.dart
@@ -7,7 +7,7 @@
 
 class C<T extends num> {}
 
-var /*@topType=C<int>*/ x = new C<int>();
+var x = new C<int>();
 
 main() {
   x;
diff --git a/pkg/front_end/testcases/inference/list_literal_typed.dart b/pkg/front_end/testcases/inference/list_literal_typed.dart
index d923333..5182f1a 100644
--- a/pkg/front_end/testcases/inference/list_literal_typed.dart
+++ b/pkg/front_end/testcases/inference/list_literal_typed.dart
@@ -5,10 +5,10 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=List<int>*/ a = <int>[];
-var /*@topType=List<double>*/ b = <double>[1.0, 2.0, 3.0];
-var /*@topType=List<List<int>>*/ c = <List<int>>[];
-var /*@topType=List<dynamic>*/ d = <dynamic>[1, 2.0, false];
+var a = <int>[];
+var b = <double>[1.0, 2.0, 3.0];
+var c = <List<int>>[];
+var d = <dynamic>[1, 2.0, false];
 
 main() {
   var /*@type=List<int>*/ a = <int>[];
diff --git a/pkg/front_end/testcases/inference/list_literals_top_level.dart b/pkg/front_end/testcases/inference/list_literals_top_level.dart
index 1f6736b..84b51a0 100644
--- a/pkg/front_end/testcases/inference/list_literals_top_level.dart
+++ b/pkg/front_end/testcases/inference/list_literals_top_level.dart
@@ -5,7 +5,7 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=List<int>*/ x1 = /*@typeArgs=int*/ [1, 2, 3];
+var x1 = /*@typeArgs=int*/ [1, 2, 3];
 test1() {
   x1. /*@target=List::add*/ add(/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 'hi');
   x1. /*@target=List::add*/ add(/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 4.0);
@@ -13,7 +13,7 @@
   List<num> y = x1;
 }
 
-var /*@topType=List<num>*/ x2 = /*@typeArgs=num*/ [1, 2.0, 3];
+var x2 = /*@typeArgs=num*/ [1, 2.0, 3];
 test2() {
   x2. /*@target=List::add*/ add(/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 'hi');
   x2. /*@target=List::add*/ add(4.0);
diff --git a/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.legacy.expect b/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.legacy.expect
index e89d29c..f31c88e 100644
--- a/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.legacy.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T t;
+  generic-covariant-impl field self::C::T t;
   constructor •(self::C::T t) → self::C<self::C::T>
     : self::C::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.legacy.transformed.expect
index e89d29c..f31c88e 100644
--- a/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.legacy.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T t;
+  generic-covariant-impl field self::C::T t;
   constructor •(self::C::T t) → self::C<self::C::T>
     : self::C::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.outline.expect b/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.outline.expect
index 9c807e8..cdfac01 100644
--- a/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/local_constructor_from_arguments.dart.outline.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T t;
+  generic-covariant-impl field self::C::T t;
   constructor •(self::C::T t) → self::C<self::C::T>
     ;
 }
diff --git a/pkg/front_end/testcases/inference/map_literals_top_level.dart b/pkg/front_end/testcases/inference/map_literals_top_level.dart
index 7ce98e6..362aef1 100644
--- a/pkg/front_end/testcases/inference/map_literals_top_level.dart
+++ b/pkg/front_end/testcases/inference/map_literals_top_level.dart
@@ -5,10 +5,7 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=Map<int, String>*/ x1 = /*@typeArgs=int, String*/ {
-  1: 'x',
-  2: 'y'
-};
+var x1 = /*@typeArgs=int, String*/ {1: 'x', 2: 'y'};
 test1() {
   x1 /*@target=Map::[]=*/ [3] = 'z';
   x1 /*@target=Map::[]=*/ [/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 'hi'] = 'w';
@@ -17,11 +14,7 @@
   Map<num, String> y = x1;
 }
 
-var /*@topType=Map<num, Pattern>*/ x2 = /*@typeArgs=num, Pattern*/ {
-  1: 'x',
-  2: 'y',
-  3.0: new RegExp('.')
-};
+var x2 = /*@typeArgs=num, Pattern*/ {1: 'x', 2: 'y', 3.0: new RegExp('.')};
 test2() {
   x2 /*@target=Map::[]=*/ [3] = 'z';
   x2 /*@target=Map::[]=*/ [/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 'hi'] = 'w';
diff --git a/pkg/front_end/testcases/inference/map_literals_top_level.dart.strong.expect b/pkg/front_end/testcases/inference/map_literals_top_level.dart.strong.expect
index 29bcc2c..9049589 100644
--- a/pkg/front_end/testcases/inference/map_literals_top_level.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/map_literals_top_level.dart.strong.expect
@@ -2,27 +2,27 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/map_literals_top_level.dart:14:67: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/inference/map_literals_top_level.dart:11:67: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
 //   x1 /*@target=Map::[]=*/ [/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 'hi'] = 'w';
 //                                                                   ^
 //
-// pkg/front_end/testcases/inference/map_literals_top_level.dart:15:67: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/inference/map_literals_top_level.dart:12:67: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
 //   x1 /*@target=Map::[]=*/ [/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 4.0] = 'u';
 //                                                                   ^
 //
-// pkg/front_end/testcases/inference/map_literals_top_level.dart:16:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// pkg/front_end/testcases/inference/map_literals_top_level.dart:13:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
 // Try changing the type of the left hand side, or casting the right hand side to 'String'.
 //   x1 /*@target=Map::[]=*/ [3] = /*error:INVALID_ASSIGNMENT*/ 42;
 //                                                              ^
 //
-// pkg/front_end/testcases/inference/map_literals_top_level.dart:27:67: Error: A value of type 'String' can't be assigned to a variable of type 'num'.
+// pkg/front_end/testcases/inference/map_literals_top_level.dart:20:67: Error: A value of type 'String' can't be assigned to a variable of type 'num'.
 // Try changing the type of the left hand side, or casting the right hand side to 'num'.
 //   x2 /*@target=Map::[]=*/ [/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 'hi'] = 'w';
 //                                                                   ^
 //
-// pkg/front_end/testcases/inference/map_literals_top_level.dart:29:62: Error: A value of type 'int' can't be assigned to a variable of type 'Pattern'.
+// pkg/front_end/testcases/inference/map_literals_top_level.dart:22:62: Error: A value of type 'int' can't be assigned to a variable of type 'Pattern'.
 //  - 'Pattern' is from 'dart:core'.
 // Try changing the type of the left hand side, or casting the right hand side to 'Pattern'.
 //   x2 /*@target=Map::[]=*/ [3] = /*error:INVALID_ASSIGNMENT*/ 42;
@@ -35,15 +35,15 @@
 static field core::Map<core::num, core::Pattern> x2 = <core::num, core::Pattern>{1: "x", 2: "y", 3.0: core::RegExp::•(".")};
 static method test1() → dynamic {
   self::x1.{core::Map::[]=}(3, "z");
-  self::x1.{core::Map::[]=}(let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:14:67: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+  self::x1.{core::Map::[]=}(let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:11:67: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
   x1 /*@target=Map::[]=*/ [/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 'hi'] = 'w';
                                                                   ^" in "hi" as{TypeError} core::int, "w");
-  self::x1.{core::Map::[]=}(let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:15:67: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  self::x1.{core::Map::[]=}(let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:12:67: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
   x1 /*@target=Map::[]=*/ [/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 4.0] = 'u';
                                                                   ^" in 4.0 as{TypeError} core::int, "u");
-  self::x1.{core::Map::[]=}(3, let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:16:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+  self::x1.{core::Map::[]=}(3, let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:13:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
 Try changing the type of the left hand side, or casting the right hand side to 'String'.
   x1 /*@target=Map::[]=*/ [3] = /*error:INVALID_ASSIGNMENT*/ 42;
                                                              ^" in 42 as{TypeError} core::String);
@@ -51,12 +51,12 @@
 }
 static method test2() → dynamic {
   self::x2.{core::Map::[]=}(3, "z");
-  self::x2.{core::Map::[]=}(let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:27:67: Error: A value of type 'String' can't be assigned to a variable of type 'num'.
+  self::x2.{core::Map::[]=}(let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:20:67: Error: A value of type 'String' can't be assigned to a variable of type 'num'.
 Try changing the type of the left hand side, or casting the right hand side to 'num'.
   x2 /*@target=Map::[]=*/ [/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 'hi'] = 'w';
                                                                   ^" in "hi" as{TypeError} core::num, "w");
   self::x2.{core::Map::[]=}(4.0, "u");
-  self::x2.{core::Map::[]=}(3, let final<BottomType> #t5 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:29:62: Error: A value of type 'int' can't be assigned to a variable of type 'Pattern'.
+  self::x2.{core::Map::[]=}(3, let final<BottomType> #t5 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:22:62: Error: A value of type 'int' can't be assigned to a variable of type 'Pattern'.
  - 'Pattern' is from 'dart:core'.
 Try changing the type of the left hand side, or casting the right hand side to 'Pattern'.
   x2 /*@target=Map::[]=*/ [3] = /*error:INVALID_ASSIGNMENT*/ 42;
diff --git a/pkg/front_end/testcases/inference/map_literals_top_level.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/map_literals_top_level.dart.strong.transformed.expect
index 29bcc2c..9049589 100644
--- a/pkg/front_end/testcases/inference/map_literals_top_level.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference/map_literals_top_level.dart.strong.transformed.expect
@@ -2,27 +2,27 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/map_literals_top_level.dart:14:67: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/inference/map_literals_top_level.dart:11:67: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
 //   x1 /*@target=Map::[]=*/ [/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 'hi'] = 'w';
 //                                                                   ^
 //
-// pkg/front_end/testcases/inference/map_literals_top_level.dart:15:67: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/inference/map_literals_top_level.dart:12:67: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
 //   x1 /*@target=Map::[]=*/ [/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 4.0] = 'u';
 //                                                                   ^
 //
-// pkg/front_end/testcases/inference/map_literals_top_level.dart:16:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+// pkg/front_end/testcases/inference/map_literals_top_level.dart:13:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
 // Try changing the type of the left hand side, or casting the right hand side to 'String'.
 //   x1 /*@target=Map::[]=*/ [3] = /*error:INVALID_ASSIGNMENT*/ 42;
 //                                                              ^
 //
-// pkg/front_end/testcases/inference/map_literals_top_level.dart:27:67: Error: A value of type 'String' can't be assigned to a variable of type 'num'.
+// pkg/front_end/testcases/inference/map_literals_top_level.dart:20:67: Error: A value of type 'String' can't be assigned to a variable of type 'num'.
 // Try changing the type of the left hand side, or casting the right hand side to 'num'.
 //   x2 /*@target=Map::[]=*/ [/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 'hi'] = 'w';
 //                                                                   ^
 //
-// pkg/front_end/testcases/inference/map_literals_top_level.dart:29:62: Error: A value of type 'int' can't be assigned to a variable of type 'Pattern'.
+// pkg/front_end/testcases/inference/map_literals_top_level.dart:22:62: Error: A value of type 'int' can't be assigned to a variable of type 'Pattern'.
 //  - 'Pattern' is from 'dart:core'.
 // Try changing the type of the left hand side, or casting the right hand side to 'Pattern'.
 //   x2 /*@target=Map::[]=*/ [3] = /*error:INVALID_ASSIGNMENT*/ 42;
@@ -35,15 +35,15 @@
 static field core::Map<core::num, core::Pattern> x2 = <core::num, core::Pattern>{1: "x", 2: "y", 3.0: core::RegExp::•(".")};
 static method test1() → dynamic {
   self::x1.{core::Map::[]=}(3, "z");
-  self::x1.{core::Map::[]=}(let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:14:67: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+  self::x1.{core::Map::[]=}(let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:11:67: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
   x1 /*@target=Map::[]=*/ [/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 'hi'] = 'w';
                                                                   ^" in "hi" as{TypeError} core::int, "w");
-  self::x1.{core::Map::[]=}(let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:15:67: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+  self::x1.{core::Map::[]=}(let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:12:67: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
   x1 /*@target=Map::[]=*/ [/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 4.0] = 'u';
                                                                   ^" in 4.0 as{TypeError} core::int, "u");
-  self::x1.{core::Map::[]=}(3, let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:16:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
+  self::x1.{core::Map::[]=}(3, let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:13:62: Error: A value of type 'int' can't be assigned to a variable of type 'String'.
 Try changing the type of the left hand side, or casting the right hand side to 'String'.
   x1 /*@target=Map::[]=*/ [3] = /*error:INVALID_ASSIGNMENT*/ 42;
                                                              ^" in 42 as{TypeError} core::String);
@@ -51,12 +51,12 @@
 }
 static method test2() → dynamic {
   self::x2.{core::Map::[]=}(3, "z");
-  self::x2.{core::Map::[]=}(let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:27:67: Error: A value of type 'String' can't be assigned to a variable of type 'num'.
+  self::x2.{core::Map::[]=}(let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:20:67: Error: A value of type 'String' can't be assigned to a variable of type 'num'.
 Try changing the type of the left hand side, or casting the right hand side to 'num'.
   x2 /*@target=Map::[]=*/ [/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/ 'hi'] = 'w';
                                                                   ^" in "hi" as{TypeError} core::num, "w");
   self::x2.{core::Map::[]=}(4.0, "u");
-  self::x2.{core::Map::[]=}(3, let final<BottomType> #t5 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:29:62: Error: A value of type 'int' can't be assigned to a variable of type 'Pattern'.
+  self::x2.{core::Map::[]=}(3, let final<BottomType> #t5 = invalid-expression "pkg/front_end/testcases/inference/map_literals_top_level.dart:22:62: Error: A value of type 'int' can't be assigned to a variable of type 'Pattern'.
  - 'Pattern' is from 'dart:core'.
 Try changing the type of the left hand side, or casting the right hand side to 'Pattern'.
   x2 /*@target=Map::[]=*/ [3] = /*error:INVALID_ASSIGNMENT*/ 42;
diff --git a/pkg/front_end/testcases/inference/method_call_with_type_arguments_instance_method.dart b/pkg/front_end/testcases/inference/method_call_with_type_arguments_instance_method.dart
index 3198118..a1490d6 100644
--- a/pkg/front_end/testcases/inference/method_call_with_type_arguments_instance_method.dart
+++ b/pkg/front_end/testcases/inference/method_call_with_type_arguments_instance_method.dart
@@ -11,6 +11,6 @@
 
 class D<T> {}
 
-var /*@topType=D<int>*/ f = new C(). /*@target=C::f*/ f<int>();
+var f = new C(). /*@target=C::f*/ f<int>();
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/method_call_with_type_arguments_instance_method_identifier_sequence.dart b/pkg/front_end/testcases/inference/method_call_with_type_arguments_instance_method_identifier_sequence.dart
index e7fe40a..3b57d56 100644
--- a/pkg/front_end/testcases/inference/method_call_with_type_arguments_instance_method_identifier_sequence.dart
+++ b/pkg/front_end/testcases/inference/method_call_with_type_arguments_instance_method_identifier_sequence.dart
@@ -12,6 +12,6 @@
 class D<T> {}
 
 C c;
-var /*@topType=D<int>*/ f = c. /*@target=C::f*/ f<int>();
+var f = c. /*@target=C::f*/ f<int>();
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/method_call_with_type_arguments_static_method.dart b/pkg/front_end/testcases/inference/method_call_with_type_arguments_static_method.dart
index 1ba94e3..5ca8020 100644
--- a/pkg/front_end/testcases/inference/method_call_with_type_arguments_static_method.dart
+++ b/pkg/front_end/testcases/inference/method_call_with_type_arguments_static_method.dart
@@ -11,6 +11,6 @@
 
 class D<T> {}
 
-var /*@topType=D<int>*/ f = C.f<int>();
+var f = C.f<int>();
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/method_call_with_type_arguments_top_level_function.dart b/pkg/front_end/testcases/inference/method_call_with_type_arguments_top_level_function.dart
index afc9811..4574e77 100644
--- a/pkg/front_end/testcases/inference/method_call_with_type_arguments_top_level_function.dart
+++ b/pkg/front_end/testcases/inference/method_call_with_type_arguments_top_level_function.dart
@@ -9,7 +9,7 @@
 
 class D<T> {}
 
-var /*@topType=D<int>*/ g = f<int>();
+var g = f<int>();
 
 main() {
   g;
diff --git a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_1.dart.hierarchy.expect b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_1.dart.hierarchy.expect
index 06b9b49..b21414f 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_1.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_1.dart.hierarchy.expect
@@ -54,6 +54,7 @@
   classSetters:
 
 M1:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: I<int>
@@ -83,6 +84,7 @@
   interfaceSetters:
 
 M1 with M0<int, String>:
+  Longest path to Object: 3
   superclasses:
     Object
       -> M1
@@ -113,6 +115,7 @@
   interfaceSetters:
 
 A:
+  Longest path to Object: 4
   superclasses:
     Object
       -> M1
diff --git a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_2.dart.hierarchy.expect b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_2.dart.hierarchy.expect
index 3f48b79..6d65499 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_2.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_2.dart.hierarchy.expect
@@ -54,6 +54,7 @@
   classSetters:
 
 M1:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: I<int>
@@ -83,6 +84,7 @@
   interfaceSetters:
 
 M1 with M0<int, int>:
+  Longest path to Object: 3
   superclasses:
     Object
       -> M1
@@ -113,6 +115,7 @@
   interfaceSetters:
 
 A:
+  Longest path to Object: 4
   superclasses:
     Object
       -> M1
diff --git a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.hierarchy.expect b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.hierarchy.expect
index 7daaa837..88712a2 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_instantiate_to_bounds_3.dart.hierarchy.expect
@@ -54,6 +54,7 @@
   classSetters:
 
 M1:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: I<int>
@@ -83,6 +84,7 @@
   interfaceSetters:
 
 M1 with M0<int, Comparable<dynamic>>:
+  Longest path to Object: 3
   superclasses:
     Object
       -> M1
@@ -113,6 +115,7 @@
   interfaceSetters:
 
 A:
+  Longest path to Object: 4
   superclasses:
     Object
       -> M1
diff --git a/pkg/front_end/testcases/inference/mixin_inference_multiple_constraints.dart.hierarchy.expect b/pkg/front_end/testcases/inference/mixin_inference_multiple_constraints.dart.hierarchy.expect
index eebc3a2..3e686b6 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_multiple_constraints.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_multiple_constraints.dart.hierarchy.expect
@@ -114,6 +114,7 @@
   interfaceSetters:
 
 M1:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: I<int>
@@ -143,6 +144,7 @@
   interfaceSetters:
 
 M2:
+  Longest path to Object: 3
   superclasses:
     Object
       -> M1
@@ -173,6 +175,7 @@
   interfaceSetters:
 
 M2 with M0<int, double>:
+  Longest path to Object: 4
   superclasses:
     Object
       -> M1
@@ -204,6 +207,7 @@
   interfaceSetters:
 
 A:
+  Longest path to Object: 5
   superclasses:
     Object
       -> M1
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart b/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart
index 001083d..1d03f48 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_3.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.
 
-/*@testedFeatures=error*/
-
 class I<X> {}
 
 class M0<T> extends Object implements I<T> {}
@@ -12,7 +10,6 @@
 
 // M0 is inferred as M0<dynamic>
 // Error since class hierarchy is inconsistent
-class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-    extends Object with M0, M1<int> {}
+class A extends Object with M0, M1<int> {}
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.hierarchy.expect b/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.hierarchy.expect
index 45aa225..74bb85d 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.hierarchy.expect
@@ -36,6 +36,7 @@
   classSetters:
 
 M0:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: I<T>
@@ -83,6 +84,7 @@
   classSetters:
 
 Object with M0<dynamic>:
+  Longest path to Object: 3
   superclasses:
     Object
   interfaces: M0<dynamic>, I<dynamic>
@@ -112,6 +114,7 @@
   interfaceSetters:
 
 _A&Object&M0 with M1<int>:
+  Longest path to Object: 4
   superclasses:
     Object
       -> _A&Object&M0
@@ -142,6 +145,7 @@
   interfaceSetters:
 
 A:
+  Longest path to Object: 5
   superclasses:
     Object
       -> _A&Object&M0
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.legacy.expect b/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.legacy.expect
index 890adf5..0c7e099 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.legacy.expect
@@ -1,15 +1,15 @@
 //
 // Problems in component:
 //
-// pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart:15:69: Error: 'Object with M0, M1' can't implement both 'I<dynamic>' and 'I<int>'
+// pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart:13:7: Error: 'Object with M0, M1' can't implement both 'I<dynamic>' and 'I<int>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1<int> {}
+//       ^
 //
-// pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart:15:69: Error: 'A' can't implement both 'I<dynamic>' and 'I<int>'
+// pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart:13:7: Error: 'A' can't implement both 'I<dynamic>' and 'I<int>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1<int> {}
+//       ^
 //
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.legacy.transformed.expect
index 2b7b8f2..4a8d005 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.legacy.transformed.expect
@@ -1,15 +1,15 @@
 //
 // Problems in component:
 //
-// pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart:15:69: Error: 'Object with M0, M1' can't implement both 'I<dynamic>' and 'I<int>'
+// pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart:13:7: Error: 'Object with M0, M1' can't implement both 'I<dynamic>' and 'I<int>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1<int> {}
+//       ^
 //
-// pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart:15:69: Error: 'A' can't implement both 'I<dynamic>' and 'I<int>'
+// pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart:13:7: Error: 'A' can't implement both 'I<dynamic>' and 'I<int>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1<int> {}
+//       ^
 //
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.outline.expect b/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.outline.expect
index 6452cea..f4273b4 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.outline.expect
@@ -1,15 +1,15 @@
 //
 // Problems in component:
 //
-// pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart:15:69: Error: 'Object with M0, M1' can't implement both 'I<dynamic>' and 'I<int>'
+// pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart:13:7: Error: 'Object with M0, M1' can't implement both 'I<dynamic>' and 'I<int>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1<int> {}
+//       ^
 //
-// pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart:15:69: Error: 'A' can't implement both 'I<dynamic>' and 'I<int>'
+// pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart:13:7: Error: 'A' can't implement both 'I<dynamic>' and 'I<int>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1<int> {}
+//       ^
 //
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.strong.expect b/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.strong.expect
index 890adf5..0c7e099 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart.strong.expect
@@ -1,15 +1,15 @@
 //
 // Problems in component:
 //
-// pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart:15:69: Error: 'Object with M0, M1' can't implement both 'I<dynamic>' and 'I<int>'
+// pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart:13:7: Error: 'Object with M0, M1' can't implement both 'I<dynamic>' and 'I<int>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1<int> {}
+//       ^
 //
-// pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart:15:69: Error: 'A' can't implement both 'I<dynamic>' and 'I<int>'
+// pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart:13:7: Error: 'A' can't implement both 'I<dynamic>' and 'I<int>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_outwards_3.dart'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1<int> {}
+//       ^
 //
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart b/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart
index 73f13f6..4f88178 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_4.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.
 
-/*@testedFeatures=error*/
-
 class I<X> {}
 
 class M0<T> extends Object implements I<T> {}
@@ -13,8 +11,6 @@
 // M0 is inferred as M0<dynamic> (unconstrained)
 // M1 is inferred as M1<dynamic> (constrained by inferred argument to M0)
 // Error since class hierarchy is inconsistent
-class /*@error=AmbiguousSupertypes*/ A extends Object
-    with M0, M1
-    implements I<int> {}
+class A extends Object with M0, M1 implements I<int> {}
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.hierarchy.expect b/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.hierarchy.expect
index 1d1e2f0..d2343d3 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.hierarchy.expect
@@ -36,6 +36,7 @@
   classSetters:
 
 M0:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: I<T>
@@ -83,6 +84,7 @@
   classSetters:
 
 Object with M0<dynamic>:
+  Longest path to Object: 3
   superclasses:
     Object
   interfaces: M0<dynamic>, I<dynamic>
@@ -112,6 +114,7 @@
   interfaceSetters:
 
 _A&Object&M0 with M1<dynamic>:
+  Longest path to Object: 4
   superclasses:
     Object
       -> _A&Object&M0
@@ -142,6 +145,7 @@
   interfaceSetters:
 
 A:
+  Longest path to Object: 5
   superclasses:
     Object
       -> _A&Object&M0
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.legacy.expect b/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.legacy.expect
index fb172cf..969931b 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.legacy.expect
@@ -1,10 +1,10 @@
 //
 // Problems in component:
 //
-// pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart:16:38: Error: 'A' can't implement both 'I<dynamic>' and 'I<int>'
+// pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart:14:7: Error: 'A' can't implement both 'I<dynamic>' and 'I<int>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart'.
-// class /*@error=AmbiguousSupertypes*/ A extends Object
-//                                      ^
+// class A extends Object with M0, M1 implements I<int> {}
+//       ^
 //
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.legacy.transformed.expect
index 17ece57..b25c51d 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.legacy.transformed.expect
@@ -1,10 +1,10 @@
 //
 // Problems in component:
 //
-// pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart:16:38: Error: 'A' can't implement both 'I<dynamic>' and 'I<int>'
+// pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart:14:7: Error: 'A' can't implement both 'I<dynamic>' and 'I<int>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart'.
-// class /*@error=AmbiguousSupertypes*/ A extends Object
-//                                      ^
+// class A extends Object with M0, M1 implements I<int> {}
+//       ^
 //
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.outline.expect b/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.outline.expect
index bae1a11..96a22ac 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.outline.expect
@@ -1,10 +1,10 @@
 //
 // Problems in component:
 //
-// pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart:16:38: Error: 'A' can't implement both 'I<dynamic>' and 'I<int>'
+// pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart:14:7: Error: 'A' can't implement both 'I<dynamic>' and 'I<int>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart'.
-// class /*@error=AmbiguousSupertypes*/ A extends Object
-//                                      ^
+// class A extends Object with M0, M1 implements I<int> {}
+//       ^
 //
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.strong.expect b/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.strong.expect
index fb172cf..969931b 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart.strong.expect
@@ -1,10 +1,10 @@
 //
 // Problems in component:
 //
-// pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart:16:38: Error: 'A' can't implement both 'I<dynamic>' and 'I<int>'
+// pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart:14:7: Error: 'A' can't implement both 'I<dynamic>' and 'I<int>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_outwards_4.dart'.
-// class /*@error=AmbiguousSupertypes*/ A extends Object
-//                                      ^
+// class A extends Object with M0, M1 implements I<int> {}
+//       ^
 //
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart b/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart
index 002c659..ed6e1be 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart
+++ b/pkg/front_end/testcases/inference/mixin_inference_unification_1.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.
 
-/*@testedFeatures=error*/
-
 class I<X, Y> {}
 
 class M0<T> implements I<T, int> {}
@@ -12,7 +10,6 @@
 
 // M0 inferred as M0<String>
 // M1 inferred as M1<int>
-class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-    extends Object with M0, M1 {}
+class A extends Object with M0, M1 {}
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.hierarchy.expect b/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.hierarchy.expect
index 9e4e1b8..fb14a36 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.hierarchy.expect
@@ -36,6 +36,7 @@
   classSetters:
 
 M0:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: I<T, int>
@@ -65,6 +66,7 @@
   interfaceSetters:
 
 M1:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: I<String, T>
@@ -94,6 +96,7 @@
   interfaceSetters:
 
 Object with M0<dynamic>:
+  Longest path to Object: 3
   superclasses:
     Object
   interfaces: M0<dynamic>, I<dynamic, int>
@@ -123,6 +126,7 @@
   interfaceSetters:
 
 _A&Object&M0 with M1<dynamic>:
+  Longest path to Object: 4
   superclasses:
     Object
       -> _A&Object&M0
@@ -153,6 +157,7 @@
   interfaceSetters:
 
 A:
+  Longest path to Object: 5
   superclasses:
     Object
       -> _A&Object&M0
diff --git a/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.legacy.expect b/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.legacy.expect
index a776b09..59abdc5 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.legacy.expect
@@ -1,15 +1,15 @@
 //
 // Problems in component:
 //
-// pkg/front_end/testcases/inference/mixin_inference_unification_1.dart:15:69: Error: 'Object with M0, M1' can't implement both 'I<dynamic, int>' and 'I<String, dynamic>'
+// pkg/front_end/testcases/inference/mixin_inference_unification_1.dart:13:7: Error: 'Object with M0, M1' can't implement both 'I<dynamic, int>' and 'I<String, dynamic>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_unification_1.dart'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1 {}
+//       ^
 //
-// pkg/front_end/testcases/inference/mixin_inference_unification_1.dart:15:69: Error: 'A' can't implement both 'I<dynamic, int>' and 'I<String, dynamic>'
+// pkg/front_end/testcases/inference/mixin_inference_unification_1.dart:13:7: Error: 'A' can't implement both 'I<dynamic, int>' and 'I<String, dynamic>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_unification_1.dart'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1 {}
+//       ^
 //
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.legacy.transformed.expect
index 06aab2c..6a20389 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.legacy.transformed.expect
@@ -1,15 +1,15 @@
 //
 // Problems in component:
 //
-// pkg/front_end/testcases/inference/mixin_inference_unification_1.dart:15:69: Error: 'Object with M0, M1' can't implement both 'I<dynamic, int>' and 'I<String, dynamic>'
+// pkg/front_end/testcases/inference/mixin_inference_unification_1.dart:13:7: Error: 'Object with M0, M1' can't implement both 'I<dynamic, int>' and 'I<String, dynamic>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_unification_1.dart'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1 {}
+//       ^
 //
-// pkg/front_end/testcases/inference/mixin_inference_unification_1.dart:15:69: Error: 'A' can't implement both 'I<dynamic, int>' and 'I<String, dynamic>'
+// pkg/front_end/testcases/inference/mixin_inference_unification_1.dart:13:7: Error: 'A' can't implement both 'I<dynamic, int>' and 'I<String, dynamic>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_unification_1.dart'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1 {}
+//       ^
 //
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.outline.expect b/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.outline.expect
index ab6dd91..1858f05 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.outline.expect
@@ -1,15 +1,15 @@
 //
 // Problems in component:
 //
-// pkg/front_end/testcases/inference/mixin_inference_unification_1.dart:15:69: Error: 'Object with M0, M1' can't implement both 'I<dynamic, int>' and 'I<String, dynamic>'
+// pkg/front_end/testcases/inference/mixin_inference_unification_1.dart:13:7: Error: 'Object with M0, M1' can't implement both 'I<dynamic, int>' and 'I<String, dynamic>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_unification_1.dart'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1 {}
+//       ^
 //
-// pkg/front_end/testcases/inference/mixin_inference_unification_1.dart:15:69: Error: 'A' can't implement both 'I<dynamic, int>' and 'I<String, dynamic>'
+// pkg/front_end/testcases/inference/mixin_inference_unification_1.dart:13:7: Error: 'A' can't implement both 'I<dynamic, int>' and 'I<String, dynamic>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_unification_1.dart'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1 {}
+//       ^
 //
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.strong.expect b/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.strong.expect
index a776b09..59abdc5 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_unification_1.dart.strong.expect
@@ -1,15 +1,15 @@
 //
 // Problems in component:
 //
-// pkg/front_end/testcases/inference/mixin_inference_unification_1.dart:15:69: Error: 'Object with M0, M1' can't implement both 'I<dynamic, int>' and 'I<String, dynamic>'
+// pkg/front_end/testcases/inference/mixin_inference_unification_1.dart:13:7: Error: 'Object with M0, M1' can't implement both 'I<dynamic, int>' and 'I<String, dynamic>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_unification_1.dart'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1 {}
+//       ^
 //
-// pkg/front_end/testcases/inference/mixin_inference_unification_1.dart:15:69: Error: 'A' can't implement both 'I<dynamic, int>' and 'I<String, dynamic>'
+// pkg/front_end/testcases/inference/mixin_inference_unification_1.dart:13:7: Error: 'A' can't implement both 'I<dynamic, int>' and 'I<String, dynamic>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_unification_1.dart'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1 {}
+//       ^
 //
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart b/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart
index ecff4ec..64d4550 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart
+++ b/pkg/front_end/testcases/inference/mixin_inference_unification_2.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.
 
-/*@testedFeatures=error*/
-
 class I<X, Y> {}
 
 class M0<T> implements I<T, List<T>> {}
@@ -16,7 +14,6 @@
 // U0 = List<U1>
 // U1 = List<U0>
 // which has no finite solution
-class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-    extends Object with M0, M1 {}
+class A extends Object with M0, M1 {}
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.hierarchy.expect b/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.hierarchy.expect
index e8cc39f..f1f8e8d 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.hierarchy.expect
@@ -36,6 +36,7 @@
   classSetters:
 
 M0:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: I<T, List<T>>
@@ -65,6 +66,7 @@
   interfaceSetters:
 
 M1:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: I<List<T>, T>
@@ -94,6 +96,7 @@
   interfaceSetters:
 
 Object with M0<dynamic>:
+  Longest path to Object: 3
   superclasses:
     Object
   interfaces: M0<dynamic>, I<dynamic, List<dynamic>>
@@ -123,6 +126,7 @@
   interfaceSetters:
 
 _A&Object&M0 with M1<dynamic>:
+  Longest path to Object: 4
   superclasses:
     Object
       -> _A&Object&M0
@@ -153,6 +157,7 @@
   interfaceSetters:
 
 A:
+  Longest path to Object: 5
   superclasses:
     Object
       -> _A&Object&M0
diff --git a/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.legacy.expect b/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.legacy.expect
index 6e2e1ab7..1ed537d 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.legacy.expect
@@ -1,17 +1,17 @@
 //
 // Problems in component:
 //
-// pkg/front_end/testcases/inference/mixin_inference_unification_2.dart:19:69: Error: 'Object with M0, M1' can't implement both 'I<dynamic, List<dynamic>>' and 'I<List<dynamic>, dynamic>'
+// pkg/front_end/testcases/inference/mixin_inference_unification_2.dart:17:7: Error: 'Object with M0, M1' can't implement both 'I<dynamic, List<dynamic>>' and 'I<List<dynamic>, dynamic>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_unification_2.dart'.
 //  - 'List' is from 'dart:core'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1 {}
+//       ^
 //
-// pkg/front_end/testcases/inference/mixin_inference_unification_2.dart:19:69: Error: 'A' can't implement both 'I<dynamic, List<dynamic>>' and 'I<List<dynamic>, dynamic>'
+// pkg/front_end/testcases/inference/mixin_inference_unification_2.dart:17:7: Error: 'A' can't implement both 'I<dynamic, List<dynamic>>' and 'I<List<dynamic>, dynamic>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_unification_2.dart'.
 //  - 'List' is from 'dart:core'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1 {}
+//       ^
 //
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.legacy.transformed.expect
index da13f1a..8b678a5 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.legacy.transformed.expect
@@ -1,17 +1,17 @@
 //
 // Problems in component:
 //
-// pkg/front_end/testcases/inference/mixin_inference_unification_2.dart:19:69: Error: 'Object with M0, M1' can't implement both 'I<dynamic, List<dynamic>>' and 'I<List<dynamic>, dynamic>'
+// pkg/front_end/testcases/inference/mixin_inference_unification_2.dart:17:7: Error: 'Object with M0, M1' can't implement both 'I<dynamic, List<dynamic>>' and 'I<List<dynamic>, dynamic>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_unification_2.dart'.
 //  - 'List' is from 'dart:core'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1 {}
+//       ^
 //
-// pkg/front_end/testcases/inference/mixin_inference_unification_2.dart:19:69: Error: 'A' can't implement both 'I<dynamic, List<dynamic>>' and 'I<List<dynamic>, dynamic>'
+// pkg/front_end/testcases/inference/mixin_inference_unification_2.dart:17:7: Error: 'A' can't implement both 'I<dynamic, List<dynamic>>' and 'I<List<dynamic>, dynamic>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_unification_2.dart'.
 //  - 'List' is from 'dart:core'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1 {}
+//       ^
 //
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.outline.expect b/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.outline.expect
index 1e1142a..aa39cba 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.outline.expect
@@ -1,17 +1,17 @@
 //
 // Problems in component:
 //
-// pkg/front_end/testcases/inference/mixin_inference_unification_2.dart:19:69: Error: 'Object with M0, M1' can't implement both 'I<dynamic, List<dynamic>>' and 'I<List<dynamic>, dynamic>'
+// pkg/front_end/testcases/inference/mixin_inference_unification_2.dart:17:7: Error: 'Object with M0, M1' can't implement both 'I<dynamic, List<dynamic>>' and 'I<List<dynamic>, dynamic>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_unification_2.dart'.
 //  - 'List' is from 'dart:core'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1 {}
+//       ^
 //
-// pkg/front_end/testcases/inference/mixin_inference_unification_2.dart:19:69: Error: 'A' can't implement both 'I<dynamic, List<dynamic>>' and 'I<List<dynamic>, dynamic>'
+// pkg/front_end/testcases/inference/mixin_inference_unification_2.dart:17:7: Error: 'A' can't implement both 'I<dynamic, List<dynamic>>' and 'I<List<dynamic>, dynamic>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_unification_2.dart'.
 //  - 'List' is from 'dart:core'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1 {}
+//       ^
 //
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.strong.expect b/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.strong.expect
index 6e2e1ab7..1ed537d 100644
--- a/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/mixin_inference_unification_2.dart.strong.expect
@@ -1,17 +1,17 @@
 //
 // Problems in component:
 //
-// pkg/front_end/testcases/inference/mixin_inference_unification_2.dart:19:69: Error: 'Object with M0, M1' can't implement both 'I<dynamic, List<dynamic>>' and 'I<List<dynamic>, dynamic>'
+// pkg/front_end/testcases/inference/mixin_inference_unification_2.dart:17:7: Error: 'Object with M0, M1' can't implement both 'I<dynamic, List<dynamic>>' and 'I<List<dynamic>, dynamic>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_unification_2.dart'.
 //  - 'List' is from 'dart:core'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1 {}
+//       ^
 //
-// pkg/front_end/testcases/inference/mixin_inference_unification_2.dart:19:69: Error: 'A' can't implement both 'I<dynamic, List<dynamic>>' and 'I<List<dynamic>, dynamic>'
+// pkg/front_end/testcases/inference/mixin_inference_unification_2.dart:17:7: Error: 'A' can't implement both 'I<dynamic, List<dynamic>>' and 'I<List<dynamic>, dynamic>'
 //  - 'I' is from 'pkg/front_end/testcases/inference/mixin_inference_unification_2.dart'.
 //  - 'List' is from 'dart:core'.
-// class /*@error=AmbiguousSupertypes*/ /*@error=AmbiguousSupertypes*/ A
-//                                                                     ^
+// class A extends Object with M0, M1 {}
+//       ^
 //
 library;
 import self as self;
diff --git a/pkg/front_end/testcases/inference/non_inferrable_getter_setter.dart b/pkg/front_end/testcases/inference/non_inferrable_getter_setter.dart
index 919883c..f8ac0dc 100644
--- a/pkg/front_end/testcases/inference/non_inferrable_getter_setter.dart
+++ b/pkg/front_end/testcases/inference/non_inferrable_getter_setter.dart
@@ -6,8 +6,8 @@
 library test;
 
 class C {
-  get /*@topType=dynamic*/ x => null;
-  void set x(/*@topType=dynamic*/ value) {}
+  get x => null;
+  void set x(value) {}
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/null_literal_should_not_infer_as_bottom.dart b/pkg/front_end/testcases/inference/null_literal_should_not_infer_as_bottom.dart
index 65e1bda..2eb6926 100644
--- a/pkg/front_end/testcases/inference/null_literal_should_not_infer_as_bottom.dart
+++ b/pkg/front_end/testcases/inference/null_literal_should_not_infer_as_bottom.dart
@@ -5,7 +5,7 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=dynamic*/ h = null;
+var h = null;
 void foo(int f(Object _)) {}
 
 test() {
diff --git a/pkg/front_end/testcases/inference/null_literal_should_not_infer_as_bottom.dart.type_promotion.expect b/pkg/front_end/testcases/inference/null_literal_should_not_infer_as_bottom.dart.type_promotion.expect
index 1eed720..8eb4001 100644
--- a/pkg/front_end/testcases/inference/null_literal_should_not_infer_as_bottom.dart.type_promotion.expect
+++ b/pkg/front_end/testcases/inference/null_literal_should_not_infer_as_bottom.dart.type_promotion.expect
@@ -1,6 +1,6 @@
-pkg/front_end/testcases/inference/null_literal_should_not_infer_as_bottom.dart:15:5: Context: Write to f@369
+pkg/front_end/testcases/inference/null_literal_should_not_infer_as_bottom.dart:15:5: Context: Write to f@348
   f = /*@returnType=Null*/ (/*@type=Object*/ x) => 'hello';
     ^
-pkg/front_end/testcases/inference/null_literal_should_not_infer_as_bottom.dart:18:5: Context: Write to g@542
+pkg/front_end/testcases/inference/null_literal_should_not_infer_as_bottom.dart:18:5: Context: Write to g@521
   g = 'hello';
     ^
diff --git a/pkg/front_end/testcases/inference/property_get_toplevel.dart b/pkg/front_end/testcases/inference/property_get_toplevel.dart
index 745394e..15b76a6 100644
--- a/pkg/front_end/testcases/inference/property_get_toplevel.dart
+++ b/pkg/front_end/testcases/inference/property_get_toplevel.dart
@@ -12,8 +12,8 @@
 }
 
 C c = new C();
-var /*@topType=() -> int*/ function_ref = c. /*@target=C::function*/ function;
-var /*@topType=List<() -> int>*/ function_ref_list = /*@typeArgs=() -> int*/ [
+var function_ref = c. /*@target=C::function*/ function;
+var function_ref_list = /*@typeArgs=() -> int*/ [
   c. /*@target=C::function*/ function
 ];
 
diff --git a/pkg/front_end/testcases/inference/property_set.dart.legacy.expect b/pkg/front_end/testcases/inference/property_set.dart.legacy.expect
index 27f48700..dc17adc 100644
--- a/pkg/front_end/testcases/inference/property_set.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/property_set.dart.legacy.expect
@@ -3,11 +3,11 @@
 import "dart:core" as core;
 
 class A<T extends core::Object = dynamic> extends core::Object {
-  field core::List<self::A::T> x = null;
+  generic-covariant-impl field core::List<self::A::T> x = null;
   synthetic constructor •() → self::A<self::A::T>
     : super core::Object::•()
     ;
-  set y(core::List<self::A::T> value) → void {}
+  set y(generic-covariant-impl core::List<self::A::T> value) → void {}
 }
 static method test() → dynamic {
   self::A<core::int> a_int = new self::A::•<core::int>();
diff --git a/pkg/front_end/testcases/inference/property_set.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/property_set.dart.legacy.transformed.expect
index 27f48700..dc17adc 100644
--- a/pkg/front_end/testcases/inference/property_set.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/property_set.dart.legacy.transformed.expect
@@ -3,11 +3,11 @@
 import "dart:core" as core;
 
 class A<T extends core::Object = dynamic> extends core::Object {
-  field core::List<self::A::T> x = null;
+  generic-covariant-impl field core::List<self::A::T> x = null;
   synthetic constructor •() → self::A<self::A::T>
     : super core::Object::•()
     ;
-  set y(core::List<self::A::T> value) → void {}
+  set y(generic-covariant-impl core::List<self::A::T> value) → void {}
 }
 static method test() → dynamic {
   self::A<core::int> a_int = new self::A::•<core::int>();
diff --git a/pkg/front_end/testcases/inference/property_set.dart.outline.expect b/pkg/front_end/testcases/inference/property_set.dart.outline.expect
index f8ea57e..e1a87aa 100644
--- a/pkg/front_end/testcases/inference/property_set.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/property_set.dart.outline.expect
@@ -3,10 +3,10 @@
 import "dart:core" as core;
 
 class A<T extends core::Object = dynamic> extends core::Object {
-  field core::List<self::A::T> x;
+  generic-covariant-impl field core::List<self::A::T> x;
   synthetic constructor •() → self::A<self::A::T>
     ;
-  set y(core::List<self::A::T> value) → void
+  set y(generic-covariant-impl core::List<self::A::T> value) → void
     ;
 }
 static method test() → dynamic
diff --git a/pkg/front_end/testcases/inference/reference_to_typedef.dart b/pkg/front_end/testcases/inference/reference_to_typedef.dart
index 20bd461..59ec3b8 100644
--- a/pkg/front_end/testcases/inference/reference_to_typedef.dart
+++ b/pkg/front_end/testcases/inference/reference_to_typedef.dart
@@ -6,6 +6,6 @@
 library test;
 
 typedef void F();
-final /*@topType=Type*/ x = F;
+final x = F;
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_double.dart.legacy.expect b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_double.dart.legacy.expect
index 1a2885a..19bc37f 100644
--- a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_double.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_double.dart.legacy.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::num = dynamic> extends core::Object {
-  field self::C::T a = null;
+  generic-covariant-impl field self::C::T a = null;
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_double.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_double.dart.legacy.transformed.expect
index 1a2885a..19bc37f 100644
--- a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_double.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_double.dart.legacy.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::num = dynamic> extends core::Object {
-  field self::C::T a = null;
+  generic-covariant-impl field self::C::T a = null;
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_int.dart.legacy.expect b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_int.dart.legacy.expect
index 2582978..9c77221 100644
--- a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_int.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_int.dart.legacy.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::num = dynamic> extends core::Object {
-  field self::C::T a = null;
+  generic-covariant-impl field self::C::T a = null;
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_int.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_int.dart.legacy.transformed.expect
index 2582978..9c77221 100644
--- a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_int.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_int.dart.legacy.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class C<T extends core::num = dynamic> extends core::Object {
-  field self::C::T a = null;
+  generic-covariant-impl field self::C::T a = null;
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_t.dart.legacy.expect b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_t.dart.legacy.expect
index 41053f4..b4e4156 100644
--- a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_t.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_t.dart.legacy.expect
@@ -3,16 +3,16 @@
 import "dart:core" as core;
 
 class C<T extends core::num = dynamic> extends core::Object {
-  field self::C::T a = null;
+  generic-covariant-impl field self::C::T a = null;
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method op(self::C::T b) → void {
+  method op(generic-covariant-impl self::C::T b) → void {
     self::C::T r1 = this.{self::C::a}.+(b);
     self::C::T r2 = this.{self::C::a}.-(b);
     self::C::T r3 = this.{self::C::a}.*(b);
   }
-  method opEq(self::C::T b) → void {
+  method opEq(generic-covariant-impl self::C::T b) → void {
     this.{self::C::a} = this.{self::C::a}.+(b);
     this.{self::C::a} = this.{self::C::a}.-(b);
     this.{self::C::a} = this.{self::C::a}.*(b);
diff --git a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_t.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_t.dart.legacy.transformed.expect
index 41053f4..b4e4156 100644
--- a/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_t.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/refine_binary_expression_type_type_parameter_t_t.dart.legacy.transformed.expect
@@ -3,16 +3,16 @@
 import "dart:core" as core;
 
 class C<T extends core::num = dynamic> extends core::Object {
-  field self::C::T a = null;
+  generic-covariant-impl field self::C::T a = null;
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method op(self::C::T b) → void {
+  method op(generic-covariant-impl self::C::T b) → void {
     self::C::T r1 = this.{self::C::a}.+(b);
     self::C::T r2 = this.{self::C::a}.-(b);
     self::C::T r3 = this.{self::C::a}.*(b);
   }
-  method opEq(self::C::T b) → void {
+  method opEq(generic-covariant-impl self::C::T b) → void {
     this.{self::C::a} = this.{self::C::a}.+(b);
     this.{self::C::a} = this.{self::C::a}.-(b);
     this.{self::C::a} = this.{self::C::a}.*(b);
diff --git a/pkg/front_end/testcases/inference/setter_return_type.dart b/pkg/front_end/testcases/inference/setter_return_type.dart
index 864265c..7ea8bea 100644
--- a/pkg/front_end/testcases/inference/setter_return_type.dart
+++ b/pkg/front_end/testcases/inference/setter_return_type.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 class C {
@@ -14,7 +14,7 @@
 }
 
 class D extends C implements I {
-  set /*@topType=void*/ x(/*@topType=int*/ value) {}
+  set x(value) {}
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/simple_literal_bool.dart b/pkg/front_end/testcases/inference/simple_literal_bool.dart
index 265b08b..d1f1a07 100644
--- a/pkg/front_end/testcases/inference/simple_literal_bool.dart
+++ b/pkg/front_end/testcases/inference/simple_literal_bool.dart
@@ -5,7 +5,7 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=bool*/ a = true;
+var a = true;
 
 main() {
   var /*@type=bool*/ b = false;
diff --git a/pkg/front_end/testcases/inference/simple_literal_double.dart b/pkg/front_end/testcases/inference/simple_literal_double.dart
index ca78922..c595708 100644
--- a/pkg/front_end/testcases/inference/simple_literal_double.dart
+++ b/pkg/front_end/testcases/inference/simple_literal_double.dart
@@ -5,7 +5,7 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=double*/ a = 1.2;
+var a = 1.2;
 
 main() {
   var /*@type=double*/ b = 3.4;
diff --git a/pkg/front_end/testcases/inference/simple_literal_int.dart b/pkg/front_end/testcases/inference/simple_literal_int.dart
index c3ae42f..c01ba89 100644
--- a/pkg/front_end/testcases/inference/simple_literal_int.dart
+++ b/pkg/front_end/testcases/inference/simple_literal_int.dart
@@ -5,7 +5,7 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=int*/ a = 1;
+var a = 1;
 
 main() {
   var /*@type=int*/ b = 2;
diff --git a/pkg/front_end/testcases/inference/simple_literal_null.dart b/pkg/front_end/testcases/inference/simple_literal_null.dart
index d1652f5..6ca0f65 100644
--- a/pkg/front_end/testcases/inference/simple_literal_null.dart
+++ b/pkg/front_end/testcases/inference/simple_literal_null.dart
@@ -5,7 +5,7 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=dynamic*/ a = null;
+var a = null;
 
 main() {
   var /*@type=dynamic*/ b = null;
diff --git a/pkg/front_end/testcases/inference/static_method_tear_off.dart b/pkg/front_end/testcases/inference/static_method_tear_off.dart
index 7a8dfd9..ecd7504 100644
--- a/pkg/front_end/testcases/inference/static_method_tear_off.dart
+++ b/pkg/front_end/testcases/inference/static_method_tear_off.dart
@@ -5,7 +5,7 @@
 /*@testedFeatures=inference*/
 library test;
 
-const /*@topType=(String) -> int*/ v = C.f;
+const v = C.f;
 
 class C {
   static int f(String s) => null;
diff --git a/pkg/front_end/testcases/inference/string_literal.dart b/pkg/front_end/testcases/inference/string_literal.dart
index 8261e2b..6eb5292 100644
--- a/pkg/front_end/testcases/inference/string_literal.dart
+++ b/pkg/front_end/testcases/inference/string_literal.dart
@@ -5,10 +5,10 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=int*/ x = 1;
-var /*@topType=String*/ a = 'aaa';
-var /*@topType=String*/ b = 'b ${x} bb';
-var /*@topType=String*/ c = 'c ${x} cc' 'ccc';
+var x = 1;
+var a = 'aaa';
+var b = 'b ${x} bb';
+var c = 'c ${x} cc' 'ccc';
 
 main() {
   var /*@type=int*/ x = 1;
diff --git a/pkg/front_end/testcases/inference/super_index_set_substitution.dart.legacy.expect b/pkg/front_end/testcases/inference/super_index_set_substitution.dart.legacy.expect
index 5bbe4de..b1c6c5f 100644
--- a/pkg/front_end/testcases/inference/super_index_set_substitution.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/super_index_set_substitution.dart.legacy.expect
@@ -9,7 +9,7 @@
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
-  operator []=(core::Map<core::int, self::B::T> x, core::List<self::B::T> y) → void {}
+  operator []=(generic-covariant-impl core::Map<core::int, self::B::T> x, generic-covariant-impl core::List<self::B::T> y) → void {}
 }
 class C<U extends core::Object = dynamic> extends self::B<asy::Future<self::C::U>> {
   synthetic constructor •() → self::C<self::C::U>
diff --git a/pkg/front_end/testcases/inference/super_index_set_substitution.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/super_index_set_substitution.dart.legacy.transformed.expect
index 5bbe4de..b1c6c5f 100644
--- a/pkg/front_end/testcases/inference/super_index_set_substitution.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/super_index_set_substitution.dart.legacy.transformed.expect
@@ -9,7 +9,7 @@
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
-  operator []=(core::Map<core::int, self::B::T> x, core::List<self::B::T> y) → void {}
+  operator []=(generic-covariant-impl core::Map<core::int, self::B::T> x, generic-covariant-impl core::List<self::B::T> y) → void {}
 }
 class C<U extends core::Object = dynamic> extends self::B<asy::Future<self::C::U>> {
   synthetic constructor •() → self::C<self::C::U>
diff --git a/pkg/front_end/testcases/inference/super_index_set_substitution.dart.outline.expect b/pkg/front_end/testcases/inference/super_index_set_substitution.dart.outline.expect
index a7cf483..80fd653 100644
--- a/pkg/front_end/testcases/inference/super_index_set_substitution.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/super_index_set_substitution.dart.outline.expect
@@ -8,7 +8,7 @@
 class B<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::B<self::B::T>
     ;
-  operator []=(core::Map<core::int, self::B::T> x, core::List<self::B::T> y) → void
+  operator []=(generic-covariant-impl core::Map<core::int, self::B::T> x, generic-covariant-impl core::List<self::B::T> y) → void
     ;
 }
 class C<U extends core::Object = dynamic> extends self::B<asy::Future<self::C::U>> {
diff --git a/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.legacy.expect b/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.legacy.expect
index b0a8223..20df3bc 100644
--- a/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.legacy.expect
@@ -19,7 +19,7 @@
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
-  method g(self::E<self::B::T> x) → self::D<self::B::T>
+  method g(generic-covariant-impl self::E<self::B::T> x) → self::D<self::B::T>
     return null;
 }
 class C<U extends core::Object = dynamic> extends self::B<asy::Future<self::C::U>> {
diff --git a/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.legacy.transformed.expect
index b0a8223..20df3bc 100644
--- a/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.legacy.transformed.expect
@@ -19,7 +19,7 @@
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
-  method g(self::E<self::B::T> x) → self::D<self::B::T>
+  method g(generic-covariant-impl self::E<self::B::T> x) → self::D<self::B::T>
     return null;
 }
 class C<U extends core::Object = dynamic> extends self::B<asy::Future<self::C::U>> {
diff --git a/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.outline.expect b/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.outline.expect
index 27eacb9..f2b99a5 100644
--- a/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/super_method_invocation_substitution.dart.outline.expect
@@ -16,7 +16,7 @@
 class B<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::B<self::B::T>
     ;
-  method g(self::E<self::B::T> x) → self::D<self::B::T>
+  method g(generic-covariant-impl self::E<self::B::T> x) → self::D<self::B::T>
     ;
 }
 class C<U extends core::Object = dynamic> extends self::B<asy::Future<self::C::U>> {
diff --git a/pkg/front_end/testcases/inference/super_property_get.dart b/pkg/front_end/testcases/inference/super_property_get.dart
index 75b3499..d778047 100644
--- a/pkg/front_end/testcases/inference/super_property_get.dart
+++ b/pkg/front_end/testcases/inference/super_property_get.dart
@@ -6,7 +6,7 @@
 library test;
 
 class C {
-  var /*@topType=int*/ x = 0;
+  var x = 0;
 }
 
 class D extends C {
diff --git a/pkg/front_end/testcases/inference/super_property_get_invoke_function_typed.dart b/pkg/front_end/testcases/inference/super_property_get_invoke_function_typed.dart
index 1a9fb6d..75a68da 100644
--- a/pkg/front_end/testcases/inference/super_property_get_invoke_function_typed.dart
+++ b/pkg/front_end/testcases/inference/super_property_get_invoke_function_typed.dart
@@ -6,7 +6,7 @@
 library test;
 
 class C {
-  var /*@topType=() -> int*/ f = /*@returnType=int*/ () => 0;
+  var f = /*@returnType=int*/ () => 0;
 }
 
 class D extends C {
diff --git a/pkg/front_end/testcases/inference/super_property_get_invoke_implicit_call.dart b/pkg/front_end/testcases/inference/super_property_get_invoke_implicit_call.dart
index 3de2bf8..e7d11f2 100644
--- a/pkg/front_end/testcases/inference/super_property_get_invoke_implicit_call.dart
+++ b/pkg/front_end/testcases/inference/super_property_get_invoke_implicit_call.dart
@@ -10,7 +10,7 @@
 }
 
 class C {
-  var /*@topType=CallableClass*/ f = new CallableClass();
+  var f = new CallableClass();
 }
 
 class D extends C {
diff --git a/pkg/front_end/testcases/inference/super_property_get_substitution.dart.legacy.expect b/pkg/front_end/testcases/inference/super_property_get_substitution.dart.legacy.expect
index 23680d0..fd035f1 100644
--- a/pkg/front_end/testcases/inference/super_property_get_substitution.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/super_property_get_substitution.dart.legacy.expect
@@ -16,7 +16,7 @@
     ;
 }
 class B<T extends core::Object = dynamic> extends core::Object {
-  field self::D<self::B::T> x = null;
+  generic-covariant-impl field self::D<self::B::T> x = null;
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/super_property_get_substitution.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/super_property_get_substitution.dart.legacy.transformed.expect
index 23680d0..fd035f1 100644
--- a/pkg/front_end/testcases/inference/super_property_get_substitution.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/super_property_get_substitution.dart.legacy.transformed.expect
@@ -16,7 +16,7 @@
     ;
 }
 class B<T extends core::Object = dynamic> extends core::Object {
-  field self::D<self::B::T> x = null;
+  generic-covariant-impl field self::D<self::B::T> x = null;
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/super_property_get_substitution.dart.outline.expect b/pkg/front_end/testcases/inference/super_property_get_substitution.dart.outline.expect
index bc7d92d..caa88dc 100644
--- a/pkg/front_end/testcases/inference/super_property_get_substitution.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/super_property_get_substitution.dart.outline.expect
@@ -14,7 +14,7 @@
     ;
 }
 class B<T extends core::Object = dynamic> extends core::Object {
-  field self::D<self::B::T> x;
+  generic-covariant-impl field self::D<self::B::T> x;
   synthetic constructor •() → self::B<self::B::T>
     ;
 }
diff --git a/pkg/front_end/testcases/inference/super_property_set_substitution.dart.legacy.expect b/pkg/front_end/testcases/inference/super_property_set_substitution.dart.legacy.expect
index 696b98f..ae129dc 100644
--- a/pkg/front_end/testcases/inference/super_property_set_substitution.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/super_property_set_substitution.dart.legacy.expect
@@ -16,7 +16,7 @@
     ;
 }
 class B<T extends core::Object = dynamic> extends core::Object {
-  field self::D<self::B::T> x = null;
+  generic-covariant-impl field self::D<self::B::T> x = null;
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/super_property_set_substitution.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/super_property_set_substitution.dart.legacy.transformed.expect
index 696b98f..ae129dc 100644
--- a/pkg/front_end/testcases/inference/super_property_set_substitution.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/super_property_set_substitution.dart.legacy.transformed.expect
@@ -16,7 +16,7 @@
     ;
 }
 class B<T extends core::Object = dynamic> extends core::Object {
-  field self::D<self::B::T> x = null;
+  generic-covariant-impl field self::D<self::B::T> x = null;
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/inference/super_property_set_substitution.dart.outline.expect b/pkg/front_end/testcases/inference/super_property_set_substitution.dart.outline.expect
index 886a4fd..1fa178c 100644
--- a/pkg/front_end/testcases/inference/super_property_set_substitution.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/super_property_set_substitution.dart.outline.expect
@@ -14,7 +14,7 @@
     ;
 }
 class B<T extends core::Object = dynamic> extends core::Object {
-  field self::D<self::B::T> x;
+  generic-covariant-impl field self::D<self::B::T> x;
   synthetic constructor •() → self::B<self::B::T>
     ;
 }
diff --git a/pkg/front_end/testcases/inference/toplevel_inference_toplevel_var.dart b/pkg/front_end/testcases/inference/toplevel_inference_toplevel_var.dart
index 86a6ea3..80477d3 100644
--- a/pkg/front_end/testcases/inference/toplevel_inference_toplevel_var.dart
+++ b/pkg/front_end/testcases/inference/toplevel_inference_toplevel_var.dart
@@ -5,7 +5,7 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=int*/ i = 0;
+var i = 0;
 
 main() {
   var /*@type=int*/ j = i;
diff --git a/pkg/front_end/testcases/inference/type_cast.dart b/pkg/front_end/testcases/inference/type_cast.dart
index 2dd2b01..d55a1cc 100644
--- a/pkg/front_end/testcases/inference/type_cast.dart
+++ b/pkg/front_end/testcases/inference/type_cast.dart
@@ -8,11 +8,11 @@
 class A<T> {}
 
 class B<T> extends A<T> {
-  /*@topType=dynamic*/ foo() {}
+  foo() {}
 }
 
 A<num> a = new B<int>();
-var /*@topType=B<int>*/ b = (a as B<int>);
+var b = (a as B<int>);
 
 main() {
   A<num> a = new B<int>();
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_constructor_call_explicit_dynamic_param.dart b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_constructor_call_explicit_dynamic_param.dart
index b8ba0e2..208b13d 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_constructor_call_explicit_dynamic_param.dart
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_constructor_call_explicit_dynamic_param.dart
@@ -9,7 +9,7 @@
   C(T x());
 }
 
-var /*@topType=C<dynamic>*/ v = new C<dynamic>(/*@returnType=int*/ () {
+var v = new C<dynamic>(/*@returnType=int*/ () {
   return 1;
 });
 
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_constructor_call_explicit_type_param.dart b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_constructor_call_explicit_type_param.dart
index 6313ca1..e59070e 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_constructor_call_explicit_type_param.dart
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_constructor_call_explicit_type_param.dart
@@ -9,7 +9,7 @@
   C(T x());
 }
 
-var /*@topType=C<int>*/ v = new C<int>(/*@returnType=int*/ () {
+var v = new C<int>(/*@returnType=int*/ () {
   return 1;
 });
 
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_constructor_call_no_type_param.dart b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_constructor_call_no_type_param.dart
index 6ed1ab4..0c85e2f 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_constructor_call_no_type_param.dart
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_constructor_call_no_type_param.dart
@@ -9,7 +9,7 @@
   C(x());
 }
 
-var /*@topType=C*/ v = new C(/*@returnType=int*/ () {
+var v = new C(/*@returnType=int*/ () {
   return 1;
 });
 
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param.dart b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param.dart
index 27638af..72be85e 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param.dart
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param.dart
@@ -6,7 +6,7 @@
 library test;
 
 List<T> f<T>(T g()) => <T>[g()];
-var /*@topType=List<dynamic>*/ v = f<dynamic>(
+var v = f<dynamic>(
     /*@returnType=int*/ () {
   return 1;
 });
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart
index fcb3945..59c1da41 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart
@@ -6,6 +6,8 @@
 library test;
 
 List<T> f<T>(T g()) => <T>[g()];
-var /*@topType=dynamic*/v = (f<dynamic>)(() { return 1; });
+var v = (f<dynamic>)(() {
+  return 1;
+});
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.legacy.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.legacy.expect
index 361c9d3..ba6541a 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.legacy.expect
@@ -2,21 +2,21 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:39: Error: An equality expression can't be an operand of another equality expression.
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:19: Error: An equality expression can't be an operand of another equality expression.
 // Try re-writing the expression.
-// var /*@topType=dynamic*/v = (f<dynamic>)(() { return 1; });
-//                                       ^
+// var v = (f<dynamic>)(() {
+//                   ^
 //
-// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:40: Error: Expected an identifier, but got ')'.
-// var /*@topType=dynamic*/v = (f<dynamic>)(() { return 1; });
-//                                        ^
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:20: Error: Expected an identifier, but got ')'.
+// var v = (f<dynamic>)(() {
+//                    ^
 //
 import self as self;
 import "dart:core" as core;
 
-static field dynamic v = self::f.<(dynamic).>(invalid-expression "pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:40: Error: This couldn't be parsed.
-var /*@topType=dynamic*/v = (f<dynamic>)(() { return 1; });
-                                       ^").call(() → dynamic {
+static field dynamic v = self::f.<(dynamic).>(invalid-expression "pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:20: Error: This couldn't be parsed.
+var v = (f<dynamic>)(() {
+                   ^").call(() → dynamic {
   return 1;
 });
 static method f<T extends core::Object = dynamic>(() → self::f::T g) → core::List<self::f::T>
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.legacy.transformed.expect
index 361c9d3..ba6541a 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.legacy.transformed.expect
@@ -2,21 +2,21 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:39: Error: An equality expression can't be an operand of another equality expression.
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:19: Error: An equality expression can't be an operand of another equality expression.
 // Try re-writing the expression.
-// var /*@topType=dynamic*/v = (f<dynamic>)(() { return 1; });
-//                                       ^
+// var v = (f<dynamic>)(() {
+//                   ^
 //
-// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:40: Error: Expected an identifier, but got ')'.
-// var /*@topType=dynamic*/v = (f<dynamic>)(() { return 1; });
-//                                        ^
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:20: Error: Expected an identifier, but got ')'.
+// var v = (f<dynamic>)(() {
+//                    ^
 //
 import self as self;
 import "dart:core" as core;
 
-static field dynamic v = self::f.<(dynamic).>(invalid-expression "pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:40: Error: This couldn't be parsed.
-var /*@topType=dynamic*/v = (f<dynamic>)(() { return 1; });
-                                       ^").call(() → dynamic {
+static field dynamic v = self::f.<(dynamic).>(invalid-expression "pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:20: Error: This couldn't be parsed.
+var v = (f<dynamic>)(() {
+                   ^").call(() → dynamic {
   return 1;
 });
 static method f<T extends core::Object = dynamic>(() → self::f::T g) → core::List<self::f::T>
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.outline.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.outline.expect
index 58e5d4b..48a0717 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart.outline.expect
@@ -2,14 +2,14 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:39: Error: An equality expression can't be an operand of another equality expression.
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:19: Error: An equality expression can't be an operand of another equality expression.
 // Try re-writing the expression.
-// var /*@topType=dynamic*/v = (f<dynamic>)(() { return 1; });
-//                                       ^
+// var v = (f<dynamic>)(() {
+//                   ^
 //
-// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:40: Error: Expected an identifier, but got ')'.
-// var /*@topType=dynamic*/v = (f<dynamic>)(() { return 1; });
-//                                        ^
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1.dart:9:20: Error: Expected an identifier, but got ')'.
+// var v = (f<dynamic>)(() {
+//                    ^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart
index 90d0037..0a3a0e2 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart
@@ -6,8 +6,7 @@
 library test;
 
 List<T> f<T>(T g()) => <T>[g()];
-var /*@topType=dynamic*/ v =
-    (f)<dynamic>(/*info:INFERRED_TYPE_CLOSURE*/ /*@returnType=int*/ () {
+var v = (f)<dynamic>(/*info:INFERRED_TYPE_CLOSURE*/ /*@returnType=int*/ () {
   return 1;
 });
 
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.strong.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.strong.expect
new file mode 100644
index 0000000..a43bff6
--- /dev/null
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.strong.expect
@@ -0,0 +1,12 @@
+library test;
+import self as self;
+import "dart:core" as core;
+
+static field core::List<dynamic> v = self::f.call<dynamic>(() → core::int {
+  return 1;
+});
+static method f<T extends core::Object = dynamic>(() → self::f::T g) → core::List<self::f::T>
+  return <self::f::T>[g.call()];
+static method main() → dynamic {
+  self::v;
+}
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.strong.transformed.expect
new file mode 100644
index 0000000..a43bff6
--- /dev/null
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart.strong.transformed.expect
@@ -0,0 +1,12 @@
+library test;
+import self as self;
+import "dart:core" as core;
+
+static field core::List<dynamic> v = self::f.call<dynamic>(() → core::int {
+  return 1;
+});
+static method f<T extends core::Object = dynamic>(() → self::f::T g) → core::List<self::f::T>
+  return <self::f::T>[g.call()];
+static method main() → dynamic {
+  self::v;
+}
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param.dart b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param.dart
index cd0d3ba..d332d12 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param.dart
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param.dart
@@ -6,7 +6,7 @@
 library test;
 
 List<T> f<T>(T g()) => <T>[g()];
-var /*@topType=List<int>*/ v = f<int>(/*@returnType=int*/ () {
+var v = f<int>(/*@returnType=int*/ () {
   return 1;
 });
 
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart
index 761fe2a..b24960b 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart
@@ -6,6 +6,8 @@
 library test;
 
 List<T> f<T>(T g()) => <T>[g()];
-var /*@topType=dynamic*/v = (f<int>)(() { return 1; });
+var v = (f<int>)(() {
+  return 1;
+});
 
 main() {}
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.legacy.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.legacy.expect
index 4492f7c..27f915d 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.legacy.expect
@@ -2,21 +2,21 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:35: Error: An equality expression can't be an operand of another equality expression.
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:15: Error: An equality expression can't be an operand of another equality expression.
 // Try re-writing the expression.
-// var /*@topType=dynamic*/v = (f<int>)(() { return 1; });
-//                                   ^
+// var v = (f<int>)(() {
+//               ^
 //
-// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:36: Error: Expected an identifier, but got ')'.
-// var /*@topType=dynamic*/v = (f<int>)(() { return 1; });
-//                                    ^
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:16: Error: Expected an identifier, but got ')'.
+// var v = (f<int>)(() {
+//                ^
 //
 import self as self;
 import "dart:core" as core;
 
-static field dynamic v = self::f.<(core::int).>(invalid-expression "pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:36: Error: This couldn't be parsed.
-var /*@topType=dynamic*/v = (f<int>)(() { return 1; });
-                                   ^").call(() → dynamic {
+static field dynamic v = self::f.<(core::int).>(invalid-expression "pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:16: Error: This couldn't be parsed.
+var v = (f<int>)(() {
+               ^").call(() → dynamic {
   return 1;
 });
 static method f<T extends core::Object = dynamic>(() → self::f::T g) → core::List<self::f::T>
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.legacy.transformed.expect
index 4492f7c..27f915d 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.legacy.transformed.expect
@@ -2,21 +2,21 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:35: Error: An equality expression can't be an operand of another equality expression.
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:15: Error: An equality expression can't be an operand of another equality expression.
 // Try re-writing the expression.
-// var /*@topType=dynamic*/v = (f<int>)(() { return 1; });
-//                                   ^
+// var v = (f<int>)(() {
+//               ^
 //
-// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:36: Error: Expected an identifier, but got ')'.
-// var /*@topType=dynamic*/v = (f<int>)(() { return 1; });
-//                                    ^
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:16: Error: Expected an identifier, but got ')'.
+// var v = (f<int>)(() {
+//                ^
 //
 import self as self;
 import "dart:core" as core;
 
-static field dynamic v = self::f.<(core::int).>(invalid-expression "pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:36: Error: This couldn't be parsed.
-var /*@topType=dynamic*/v = (f<int>)(() { return 1; });
-                                   ^").call(() → dynamic {
+static field dynamic v = self::f.<(core::int).>(invalid-expression "pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:16: Error: This couldn't be parsed.
+var v = (f<int>)(() {
+               ^").call(() → dynamic {
   return 1;
 });
 static method f<T extends core::Object = dynamic>(() → self::f::T g) → core::List<self::f::T>
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.outline.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.outline.expect
index 6f5ce50..babb86c 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.outline.expect
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart.outline.expect
@@ -2,14 +2,14 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:35: Error: An equality expression can't be an operand of another equality expression.
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:15: Error: An equality expression can't be an operand of another equality expression.
 // Try re-writing the expression.
-// var /*@topType=dynamic*/v = (f<int>)(() { return 1; });
-//                                   ^
+// var v = (f<int>)(() {
+//               ^
 //
-// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:36: Error: Expected an identifier, but got ')'.
-// var /*@topType=dynamic*/v = (f<int>)(() { return 1; });
-//                                    ^
+// pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1.dart:9:16: Error: Expected an identifier, but got ')'.
+// var v = (f<int>)(() {
+//                ^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart
index d9bf6c6..f8ab111 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart
@@ -6,8 +6,7 @@
 library test;
 
 List<T> f<T>(T g()) => <T>[g()];
-var /*@topType=dynamic*/ v =
-    (f)<int>(/*info:INFERRED_TYPE_CLOSURE*/ /*@returnType=int*/ () {
+var v = (f)<int>(/*info:INFERRED_TYPE_CLOSURE*/ /*@returnType=int*/ () {
   return 1;
 });
 
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.strong.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.strong.expect
new file mode 100644
index 0000000..cd480b4
--- /dev/null
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.strong.expect
@@ -0,0 +1,12 @@
+library test;
+import self as self;
+import "dart:core" as core;
+
+static field core::List<core::int> v = self::f.call<core::int>(() → core::int {
+  return 1;
+});
+static method f<T extends core::Object = dynamic>(() → self::f::T g) → core::List<self::f::T>
+  return <self::f::T>[g.call()];
+static method main() → dynamic {
+  self::v;
+}
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.strong.transformed.expect b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.strong.transformed.expect
new file mode 100644
index 0000000..cd480b4
--- /dev/null
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart.strong.transformed.expect
@@ -0,0 +1,12 @@
+library test;
+import self as self;
+import "dart:core" as core;
+
+static field core::List<core::int> v = self::f.call<core::int>(() → core::int {
+  return 1;
+});
+static method f<T extends core::Object = dynamic>(() → self::f::T g) → core::List<self::f::T>
+  return <self::f::T>[g.call()];
+static method main() → dynamic {
+  self::v;
+}
diff --git a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_method_call_no_type_param.dart b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_method_call_no_type_param.dart
index 366bc8c..45e2995 100644
--- a/pkg/front_end/testcases/inference/unsafe_block_closure_inference_method_call_no_type_param.dart
+++ b/pkg/front_end/testcases/inference/unsafe_block_closure_inference_method_call_no_type_param.dart
@@ -6,10 +6,10 @@
 library test;
 
 class C {
-  double f(/*@topType=dynamic*/ x) => 1.0;
+  double f(x) => 1.0;
 }
 
-var /*@topType=double*/ v = new C(). /*@target=C::f*/ f(/*@returnType=int*/ () {
+var v = new C(). /*@target=C::f*/ f(/*@returnType=int*/ () {
   return 1;
 });
 
diff --git a/pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart b/pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart
index bc4dbaf..6e49f44 100644
--- a/pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart
+++ b/pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart
@@ -16,7 +16,7 @@
   print("running");
 }
 
-var /*@topType=dynamic*/ x = run<dynamic>(printRunning);
+var x = run<dynamic>(printRunning);
 
 main() {
   void printRunning() {
diff --git a/pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart.type_promotion.expect b/pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart.type_promotion.expect
index 96232fc..0c4ff5c 100644
--- a/pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart.type_promotion.expect
+++ b/pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart.type_promotion.expect
@@ -1,12 +1,12 @@
-pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart:29:5: Context: Write to x@559
+pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart:29:5: Context: Write to x@538
   x = 123;
     ^
-pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart:30:5: Context: Write to x@559
+pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart:30:5: Context: Write to x@538
   x = 'hi';
     ^
-pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart:31:5: Context: Write to y@612
+pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart:31:5: Context: Write to y@591
   y = /*error:INVALID_ASSIGNMENT*/ 123;
     ^
-pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart:32:5: Context: Write to y@612
+pkg/front_end/testcases/inference/void_return_type_subtypes_dynamic.dart:32:5: Context: Write to y@591
   y = /*error:INVALID_ASSIGNMENT*/ 'hi';
     ^
diff --git a/pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart b/pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart
index 68d91d1..5d9af14 100644
--- a/pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart
+++ b/pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 class A {
@@ -10,22 +10,21 @@
   int g(dynamic i) => 0;
 }
 
-var /*@topType=A*/ a = new A();
+var a = new A();
 
 // There's a circularity between b and c because a.f is generic, so the type of
 // c is required to infer b, and vice versa.
 
-var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ b = /*@returnType=dynamic*/ () =>
-    a. /*@typeArgs=dynamic*/ /*@target=A::f*/ f(c);
-var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ c = /*@returnType=dynamic*/ () =>
-    a. /*@typeArgs=dynamic*/ /*@target=A::f*/ f(b);
+var b = /*@returnType=invalid-type*/ () =>
+    a. /*@typeArgs=invalid-type*/ /*@target=A::f*/ f(c);
+var c = /*@returnType=invalid-type*/ () =>
+    a. /*@typeArgs=invalid-type*/ /*@target=A::f*/ f(b);
 
 // e's use of a.g breaks the circularity, because a.g is not generic, therefore
 // the type of e does not depend on the type of d.
 
-var /*@topType=() -> () -> int*/ d = /*@returnType=() -> int*/ () =>
+var d = /*@returnType=() -> int*/ () =>
     a. /*@typeArgs=() -> int*/ /*@target=A::f*/ f(e);
-var /*@topType=() -> int*/ e = /*@returnType=int*/ () =>
-    a. /*@target=A::g*/ g(d);
+var e = /*@returnType=int*/ () => a. /*@target=A::g*/ g(d);
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart.strong.expect b/pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart.strong.expect
index 637a638..1681eb9 100644
--- a/pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart.strong.expect
+++ b/pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart.strong.expect
@@ -2,15 +2,15 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart:20:67: Error: Can't infer the type of 'c': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart:20:5: Error: Can't infer the type of 'c': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ c = /*@returnType=dynamic*/ () =>
-//                                                                   ^
+// var c = /*@returnType=invalid-type*/ () =>
+//     ^
 //
-// pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart:18:67: Error: Can't infer the type of 'b': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart:18:5: Error: Can't infer the type of 'b': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ b = /*@returnType=dynamic*/ () =>
-//                                                                   ^
+// var b = /*@returnType=invalid-type*/ () =>
+//     ^
 //
 import self as self;
 import "dart:core" as core;
@@ -25,8 +25,8 @@
     return 0;
 }
 static field self::A a = new self::A::•();
-static field dynamic b = () → dynamic => self::a.{self::A::f}<dynamic>(self::c);
-static field dynamic c = () → dynamic => self::a.{self::A::f}<dynamic>(self::b);
+static field invalid-type b = (() → invalid-type => self::a.{self::A::f}<invalid-type>(self::c)) as{TypeError} invalid-type;
+static field invalid-type c = (() → invalid-type => self::a.{self::A::f}<invalid-type>(self::b)) as{TypeError} invalid-type;
 static field () → () → core::int d = () → () → core::int => self::a.{self::A::f}<() → core::int>(self::e);
 static field () → core::int e = () → core::int => self::a.{self::A::g}(self::d);
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart.strong.transformed.expect b/pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart.strong.transformed.expect
index 637a638..1681eb9 100644
--- a/pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart.strong.transformed.expect
@@ -2,15 +2,15 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart:20:67: Error: Can't infer the type of 'c': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart:20:5: Error: Can't infer the type of 'c': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ c = /*@returnType=dynamic*/ () =>
-//                                                                   ^
+// var c = /*@returnType=invalid-type*/ () =>
+//     ^
 //
-// pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart:18:67: Error: Can't infer the type of 'b': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/dependency_only_if_generic_method.dart:18:5: Error: Can't infer the type of 'b': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ b = /*@returnType=dynamic*/ () =>
-//                                                                   ^
+// var b = /*@returnType=invalid-type*/ () =>
+//     ^
 //
 import self as self;
 import "dart:core" as core;
@@ -25,8 +25,8 @@
     return 0;
 }
 static field self::A a = new self::A::•();
-static field dynamic b = () → dynamic => self::a.{self::A::f}<dynamic>(self::c);
-static field dynamic c = () → dynamic => self::a.{self::A::f}<dynamic>(self::b);
+static field invalid-type b = (() → invalid-type => self::a.{self::A::f}<invalid-type>(self::c)) as{TypeError} invalid-type;
+static field invalid-type c = (() → invalid-type => self::a.{self::A::f}<invalid-type>(self::b)) as{TypeError} invalid-type;
 static field () → () → core::int d = () → () → core::int => self::a.{self::A::f}<() → core::int>(self::e);
 static field () → core::int e = () → core::int => self::a.{self::A::g}(self::d);
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart b/pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart
index 0c3cd9b..1880cfe 100644
--- a/pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart
+++ b/pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 int intValue = 0;
@@ -12,21 +12,18 @@
 // There's a circularity between a and b because the type of `int + x` depends
 // on the type of x.
 
-var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ a = /*@returnType=num*/ () =>
-    intValue /*@target=num::+*/ + b;
-var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ b = a();
+var a = /*@returnType=num*/ () => intValue /*@target=num::+*/ + b;
+var b = a();
 
 // But there's no circularity between c and d because the type of `num + x` is
 // always num.
 
-var /*@topType=() -> num*/ c = /*@returnType=num*/ () =>
-    numValue /*@target=num::+*/ + d;
-var /*@topType=num*/ d = c();
+var c = /*@returnType=num*/ () => numValue /*@target=num::+*/ + d;
+var d = c();
 
 // Similar for double.
 
-var /*@topType=() -> double*/ e = /*@returnType=double*/ () =>
-    doubleValue /*@target=double::+*/ + f;
-var /*@topType=double*/ f = e();
+var e = /*@returnType=double*/ () => doubleValue /*@target=double::+*/ + f;
+var f = e();
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart.strong.expect b/pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart.strong.expect
index d2d6d0d..f2657ee 100644
--- a/pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart.strong.expect
+++ b/pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart.strong.expect
@@ -2,15 +2,15 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart:17:67: Error: Can't infer the type of 'b': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart:16:5: Error: Can't infer the type of 'b': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ b = a();
-//                                                                   ^
+// var b = a();
+//     ^
 //
-// pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart:15:67: Error: Can't infer the type of 'a': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart:15:5: Error: Can't infer the type of 'a': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ a = /*@returnType=num*/ () =>
-//                                                                   ^
+// var a = /*@returnType=num*/ () => intValue /*@target=num::+*/ + b;
+//     ^
 //
 import self as self;
 import "dart:core" as core;
@@ -18,8 +18,8 @@
 static field core::int intValue = 0;
 static field core::num numValue = 0;
 static field core::double doubleValue = 0.0;
-static field dynamic a = () → core::num => self::intValue.{core::num::+}(self::b as{TypeError} core::num);
-static field dynamic b = self::a.call();
+static field invalid-type a = (() → core::num => self::intValue.{core::num::+}(self::b as{TypeError} core::num)) as{TypeError} invalid-type;
+static field invalid-type b = self::a.call() as{TypeError} invalid-type;
 static field () → core::num c = () → core::num => self::numValue.{core::num::+}(self::d);
 static field core::num d = self::c.call();
 static field () → core::double e = () → core::double => self::doubleValue.{core::double::+}(self::f);
diff --git a/pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart.strong.transformed.expect b/pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart.strong.transformed.expect
index d2d6d0d..6d183c0c 100644
--- a/pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart.strong.transformed.expect
@@ -2,15 +2,20 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart:17:67: Error: Can't infer the type of 'b': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart:17:72: Error: Can't infer the type of 'b': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ b = a();
-//                                                                   ^
+// var  /*@error=CantInferTypeDueToCircularity*/ b = a/*@error=UndefinedMethod*/();
+//                                                                        ^
 //
-// pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart:15:67: Error: Can't infer the type of 'a': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart:15:72: Error: Can't infer the type of 'a': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ a = /*@returnType=num*/ () =>
-//                                                                   ^
+// var  /*@error=CantInferTypeDueToCircularity*/ a = /*@returnType=num*/ () =>
+//                                                                        ^
+//
+// pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart:17:77: Error: The method 'call' isn't defined for the class 'invalid-type'.
+// Try correcting the name to the name of an existing method, or defining a method named 'call'.
+// var  /*@error=CantInferTypeDueToCircularity*/ b = a/*@error=UndefinedMethod*/();
+//                                                                             ^
 //
 import self as self;
 import "dart:core" as core;
@@ -18,8 +23,11 @@
 static field core::int intValue = 0;
 static field core::num numValue = 0;
 static field core::double doubleValue = 0.0;
-static field dynamic a = () → core::num => self::intValue.{core::num::+}(self::b as{TypeError} core::num);
-static field dynamic b = self::a.call();
+static field invalid-type a = (() → core::num => self::intValue.{core::num::+}(self::b as{TypeError} core::num)) as{TypeError} invalid-type;
+static field invalid-type b = invalid-expression "pkg/front_end/testcases/inference_new/dependency_only_if_overloaded.dart:17:77: Error: The method 'call' isn't defined for the class 'invalid-type'.
+Try correcting the name to the name of an existing method, or defining a method named 'call'.
+var  /*@error=CantInferTypeDueToCircularity*/ b = a/*@error=UndefinedMethod*/();
+                                                                            ^";
 static field () → core::num c = () → core::num => self::numValue.{core::num::+}(self::d);
 static field core::num d = self::c.call();
 static field () → core::double e = () → core::double => self::doubleValue.{core::double::+}(self::f);
diff --git a/pkg/front_end/testcases/inference_new/downwards_inference_inside_top_level.dart b/pkg/front_end/testcases/inference_new/downwards_inference_inside_top_level.dart
index 3a5760c..e296a6a 100644
--- a/pkg/front_end/testcases/inference_new/downwards_inference_inside_top_level.dart
+++ b/pkg/front_end/testcases/inference_new/downwards_inference_inside_top_level.dart
@@ -13,8 +13,6 @@
   B(T x);
 }
 
-var /*@topType=List<B<int>>*/ t3 = /*@typeArgs=B<int>*/ [
-  new /*@typeArgs=int*/ B(3)
-];
+var t3 = /*@typeArgs=B<int>*/ [new /*@typeArgs=int*/ B(3)];
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/downwards_inference_inside_top_level_2.dart b/pkg/front_end/testcases/inference_new/downwards_inference_inside_top_level_2.dart
index 4c8edf2..5f75350 100644
--- a/pkg/front_end/testcases/inference_new/downwards_inference_inside_top_level_2.dart
+++ b/pkg/front_end/testcases/inference_new/downwards_inference_inside_top_level_2.dart
@@ -9,8 +9,6 @@
   A(T x);
 }
 
-var /*@topType=List<A<int>>*/ t2 = /*@typeArgs=A<int>*/ [
-  new /*@typeArgs=int*/ A(2)
-];
+var t2 = /*@typeArgs=A<int>*/ [new /*@typeArgs=int*/ A(2)];
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/field_inference_circularity.dart b/pkg/front_end/testcases/inference_new/field_inference_circularity.dart
index d8b81a7..a609915 100644
--- a/pkg/front_end/testcases/inference_new/field_inference_circularity.dart
+++ b/pkg/front_end/testcases/inference_new/field_inference_circularity.dart
@@ -2,22 +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.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 // A.x depends on B.x which depends on A.x, so no type is inferred.  But types
 // can be inferred for A.y and B.y.
 
 class A {
-  var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x = /*@returnType=dynamic*/ () =>
-      new B(). /*@target=B::x*/ x;
-  var /*@topType=() -> dynamic*/ y = /*@returnType=dynamic*/ () =>
-      new B(). /*@target=B::x*/ x;
+  var x = /*@returnType=invalid-type*/ () => new B(). /*@target=B::x*/ x;
+  var y = /*@returnType=invalid-type*/ () => new B(). /*@target=B::x*/ x;
 }
 
 class B extends A {
-  var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x;
-  var /*@topType=() -> dynamic*/ y;
+  var x;
+  var y;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/field_inference_circularity.dart.strong.expect b/pkg/front_end/testcases/inference_new/field_inference_circularity.dart.strong.expect
index 0d47f0c..e436c4f 100644
--- a/pkg/front_end/testcases/inference_new/field_inference_circularity.dart.strong.expect
+++ b/pkg/front_end/testcases/inference_new/field_inference_circularity.dart.strong.expect
@@ -2,29 +2,29 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference_new/field_inference_circularity.dart:12:69: Error: Can't infer the type of 'x': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/field_inference_circularity.dart:12:7: Error: Can't infer the type of 'x': circularity found during type inference.
 // Specify the type explicitly.
-//   var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x = /*@returnType=dynamic*/ () =>
-//                                                                     ^
+//   var x = /*@returnType=invalid-type*/ () => new B(). /*@target=B::x*/ x;
+//       ^
 //
-// pkg/front_end/testcases/inference_new/field_inference_circularity.dart:19:69: Error: Can't infer the type of 'x': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/field_inference_circularity.dart:17:7: Error: Can't infer the type of 'x': circularity found during type inference.
 // Specify the type explicitly.
-//   var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x;
-//                                                                     ^
+//   var x;
+//       ^
 //
 import self as self;
 import "dart:core" as core;
 
 class A extends core::Object {
-  field dynamic x = () → dynamic => new self::B::•().{self::B::x};
-  field () → dynamic y = () → dynamic => new self::B::•().{self::B::x};
+  field invalid-type x = (() → invalid-type => new self::B::•().{self::B::x}) as{TypeError} invalid-type;
+  field () → invalid-type y = () → invalid-type => new self::B::•().{self::B::x};
   synthetic constructor •() → self::A
     : super core::Object::•()
     ;
 }
 class B extends self::A {
-  field dynamic x = null;
-  field () → dynamic y = null;
+  field invalid-type x = null;
+  field () → invalid-type y = null;
   synthetic constructor •() → self::B
     : super self::A::•()
     ;
diff --git a/pkg/front_end/testcases/inference_new/field_inference_circularity.dart.strong.transformed.expect b/pkg/front_end/testcases/inference_new/field_inference_circularity.dart.strong.transformed.expect
index 0d47f0c..e436c4f 100644
--- a/pkg/front_end/testcases/inference_new/field_inference_circularity.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/field_inference_circularity.dart.strong.transformed.expect
@@ -2,29 +2,29 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference_new/field_inference_circularity.dart:12:69: Error: Can't infer the type of 'x': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/field_inference_circularity.dart:12:7: Error: Can't infer the type of 'x': circularity found during type inference.
 // Specify the type explicitly.
-//   var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x = /*@returnType=dynamic*/ () =>
-//                                                                     ^
+//   var x = /*@returnType=invalid-type*/ () => new B(). /*@target=B::x*/ x;
+//       ^
 //
-// pkg/front_end/testcases/inference_new/field_inference_circularity.dart:19:69: Error: Can't infer the type of 'x': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/field_inference_circularity.dart:17:7: Error: Can't infer the type of 'x': circularity found during type inference.
 // Specify the type explicitly.
-//   var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x;
-//                                                                     ^
+//   var x;
+//       ^
 //
 import self as self;
 import "dart:core" as core;
 
 class A extends core::Object {
-  field dynamic x = () → dynamic => new self::B::•().{self::B::x};
-  field () → dynamic y = () → dynamic => new self::B::•().{self::B::x};
+  field invalid-type x = (() → invalid-type => new self::B::•().{self::B::x}) as{TypeError} invalid-type;
+  field () → invalid-type y = () → invalid-type => new self::B::•().{self::B::x};
   synthetic constructor •() → self::A
     : super core::Object::•()
     ;
 }
 class B extends self::A {
-  field dynamic x = null;
-  field () → dynamic y = null;
+  field invalid-type x = null;
+  field () → invalid-type y = null;
   synthetic constructor •() → self::B
     : super self::A::•()
     ;
diff --git a/pkg/front_end/testcases/inference_new/for_each_identifier_downwards.dart b/pkg/front_end/testcases/inference_new/for_each_identifier_downwards.dart
index 4e96e3e..0977a74 100644
--- a/pkg/front_end/testcases/inference_new/for_each_identifier_downwards.dart
+++ b/pkg/front_end/testcases/inference_new/for_each_identifier_downwards.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 T f<T>() => null;
diff --git a/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart b/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart
index da9ed77..29a09fd 100644
--- a/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart
+++ b/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart
@@ -2,16 +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.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 test() async {
   String s;
-  for (int x in /*@error=ForInLoopTypeNotIterable*/ s) {}
-  await for (int x in /*@error=ForInLoopTypeNotIterable*/ s) {}
+  for (int x in s) {}
+  await for (int x in s) {}
   int y;
-  for (y in /*@error=ForInLoopTypeNotIterable*/ s) {}
-  await for (y in /*@error=ForInLoopTypeNotIterable*/ s) {}
+  for (y in s) {}
+  await for (y in s) {}
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart.strong.expect b/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart.strong.expect
index a921371..d0463b8 100644
--- a/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart.strong.expect
+++ b/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart.strong.expect
@@ -2,25 +2,25 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:10:53: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+// pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:10:17: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
 //  - 'Iterable' is from 'dart:core'.
-//   for (int x in /*@error=ForInLoopTypeNotIterable*/ s) {}
-//                                                     ^
+//   for (int x in s) {}
+//                 ^
 //
-// pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:11:59: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+// pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:11:23: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
 //  - 'Stream' is from 'dart:async'.
-//   await for (int x in /*@error=ForInLoopTypeNotIterable*/ s) {}
-//                                                           ^
+//   await for (int x in s) {}
+//                       ^
 //
-// pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:13:49: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+// pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:13:13: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
 //  - 'Iterable' is from 'dart:core'.
-//   for (y in /*@error=ForInLoopTypeNotIterable*/ s) {}
-//                                                 ^
+//   for (y in s) {}
+//             ^
 //
-// pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:14:55: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+// pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:14:19: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
 //  - 'Stream' is from 'dart:async'.
-//   await for (y in /*@error=ForInLoopTypeNotIterable*/ s) {}
-//                                                       ^
+//   await for (y in s) {}
+//                   ^
 //
 import self as self;
 import "dart:core" as core;
@@ -28,29 +28,29 @@
 
 static method test() → dynamic async {
   core::String s;
-  for (final dynamic #t1 in let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:10:53: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+  for (final dynamic #t1 in let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:10:17: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
  - 'Iterable' is from 'dart:core'.
-  for (int x in /*@error=ForInLoopTypeNotIterable*/ s) {}
-                                                    ^" in s as{TypeError} core::Iterable<dynamic>) {
+  for (int x in s) {}
+                ^" in s as{TypeError} core::Iterable<dynamic>) {
     core::int x = #t1 as{TypeError} core::int;
   }
-  await for (final dynamic #t3 in let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:11:59: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+  await for (final dynamic #t3 in let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:11:23: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
  - 'Stream' is from 'dart:async'.
-  await for (int x in /*@error=ForInLoopTypeNotIterable*/ s) {}
-                                                          ^" in s as{TypeError} asy::Stream<dynamic>) {
+  await for (int x in s) {}
+                      ^" in s as{TypeError} asy::Stream<dynamic>) {
     core::int x = #t3 as{TypeError} core::int;
   }
   core::int y;
-  for (final dynamic #t5 in let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:13:49: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+  for (final dynamic #t5 in let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:13:13: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
  - 'Iterable' is from 'dart:core'.
-  for (y in /*@error=ForInLoopTypeNotIterable*/ s) {}
-                                                ^" in s as{TypeError} core::Iterable<dynamic>) {
+  for (y in s) {}
+            ^" in s as{TypeError} core::Iterable<dynamic>) {
     y = #t5 as{TypeError} core::int;
   }
-  await for (final dynamic #t7 in let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:14:55: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+  await for (final dynamic #t7 in let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:14:19: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
  - 'Stream' is from 'dart:async'.
-  await for (y in /*@error=ForInLoopTypeNotIterable*/ s) {}
-                                                      ^" in s as{TypeError} asy::Stream<dynamic>) {
+  await for (y in s) {}
+                  ^" in s as{TypeError} asy::Stream<dynamic>) {
     y = #t7 as{TypeError} core::int;
   }
 }
diff --git a/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart.strong.transformed.expect b/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart.strong.transformed.expect
index e1b9af6..7376685 100644
--- a/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart.strong.transformed.expect
@@ -2,25 +2,25 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:10:53: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+// pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:10:17: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
 //  - 'Iterable' is from 'dart:core'.
-//   for (int x in /*@error=ForInLoopTypeNotIterable*/ s) {}
-//                                                     ^
+//   for (int x in s) {}
+//                 ^
 //
-// pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:11:59: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+// pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:11:23: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
 //  - 'Stream' is from 'dart:async'.
-//   await for (int x in /*@error=ForInLoopTypeNotIterable*/ s) {}
-//                                                           ^
+//   await for (int x in s) {}
+//                       ^
 //
-// pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:13:49: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+// pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:13:13: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
 //  - 'Iterable' is from 'dart:core'.
-//   for (y in /*@error=ForInLoopTypeNotIterable*/ s) {}
-//                                                 ^
+//   for (y in s) {}
+//             ^
 //
-// pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:14:55: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+// pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:14:19: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
 //  - 'Stream' is from 'dart:async'.
-//   await for (y in /*@error=ForInLoopTypeNotIterable*/ s) {}
-//                                                       ^
+//   await for (y in s) {}
+//                   ^
 //
 import self as self;
 import "dart:async" as asy;
@@ -43,17 +43,17 @@
       #L1:
       {
         core::String s;
-        for (final dynamic #t1 in let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:10:53: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+        for (final dynamic #t1 in let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:10:17: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
  - 'Iterable' is from 'dart:core'.
-  for (int x in /*@error=ForInLoopTypeNotIterable*/ s) {}
-                                                    ^" in s as{TypeError} core::Iterable<dynamic>) {
+  for (int x in s) {}
+                ^" in s as{TypeError} core::Iterable<dynamic>) {
           core::int x = #t1 as{TypeError} core::int;
         }
         {
-          dynamic :stream = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:11:59: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+          dynamic :stream = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:11:23: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
  - 'Stream' is from 'dart:async'.
-  await for (int x in /*@error=ForInLoopTypeNotIterable*/ s) {}
-                                                          ^" in s as{TypeError} asy::Stream<dynamic>;
+  await for (int x in s) {}
+                      ^" in s as{TypeError} asy::Stream<dynamic>;
           asy::_asyncStarListenHelper(:stream, :async_op);
           asy::_StreamIterator<dynamic> :for-iterator = new asy::_StreamIterator::•<dynamic>(:stream);
           const core::bool :product-mode = const core::bool::fromEnvironment("dart.vm.product");
@@ -78,17 +78,17 @@
             }
         }
         core::int y;
-        for (final dynamic #t8 in let final<BottomType> #t9 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:13:49: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
+        for (final dynamic #t8 in let final<BottomType> #t9 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:13:13: Error: The type 'String' used in the 'for' loop must implement 'Iterable<dynamic>'.
  - 'Iterable' is from 'dart:core'.
-  for (y in /*@error=ForInLoopTypeNotIterable*/ s) {}
-                                                ^" in s as{TypeError} core::Iterable<dynamic>) {
+  for (y in s) {}
+            ^" in s as{TypeError} core::Iterable<dynamic>) {
           y = #t8 as{TypeError} core::int;
         }
         {
-          dynamic :stream = let final<BottomType> #t10 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:14:55: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
+          dynamic :stream = let final<BottomType> #t10 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_invalid_iterable.dart:14:19: Error: The type 'String' used in the 'for' loop must implement 'Stream<dynamic>'.
  - 'Stream' is from 'dart:async'.
-  await for (y in /*@error=ForInLoopTypeNotIterable*/ s) {}
-                                                      ^" in s as{TypeError} asy::Stream<dynamic>;
+  await for (y in s) {}
+                  ^" in s as{TypeError} asy::Stream<dynamic>;
           asy::_asyncStarListenHelper(:stream, :async_op);
           asy::_StreamIterator<dynamic> :for-iterator = new asy::_StreamIterator::•<dynamic>(:stream);
           const core::bool :product-mode = const core::bool::fromEnvironment("dart.vm.product");
diff --git a/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart b/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart
index 9ffdfe8..e98bf31 100644
--- a/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart
+++ b/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 import 'dart:async';
@@ -23,8 +23,8 @@
   await for (a in stream) {}
   for (b in iterable) {}
   await for (b in stream) {}
-  for (i /*@error=ForInLoopElementTypeNotAssignable*/ in iterable) {}
-  await for (i /*@error=ForInLoopElementTypeNotAssignable*/ in stream) {}
+  for (i in iterable) {}
+  await for (i in stream) {}
   for (a in /*@typeArgs=Iterable<A>*/ f()) {}
   await for (a in /*@typeArgs=Stream<A>*/ f()) {}
 }
diff --git a/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart.strong.expect b/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart.strong.expect
index eed185f..01186e9 100644
--- a/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart.strong.expect
+++ b/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart.strong.expect
@@ -2,17 +2,17 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart:26:55: Error: A value of type 'A' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart:26:10: Error: A value of type 'A' can't be assigned to a variable of type 'int'.
 //  - 'A' is from 'pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart'.
 // Try changing the type of the variable.
-//   for (i /*@error=ForInLoopElementTypeNotAssignable*/ in iterable) {}
-//                                                       ^
+//   for (i in iterable) {}
+//          ^
 //
-// pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart:27:61: Error: A value of type 'A' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart:27:16: Error: A value of type 'A' can't be assigned to a variable of type 'int'.
 //  - 'A' is from 'pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart'.
 // Try changing the type of the variable.
-//   await for (i /*@error=ForInLoopElementTypeNotAssignable*/ in stream) {}
-//                                                             ^
+//   await for (i in stream) {}
+//                ^
 //
 import self as self;
 import "dart:core" as core;
@@ -51,18 +51,18 @@
     b = #t4 as{TypeError} self::B;
   }
   for (final self::A #t5 in iterable) {
-    i = let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart:26:55: Error: A value of type 'A' can't be assigned to a variable of type 'int'.
+    i = let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart:26:10: Error: A value of type 'A' can't be assigned to a variable of type 'int'.
  - 'A' is from 'pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart'.
 Try changing the type of the variable.
-  for (i /*@error=ForInLoopElementTypeNotAssignable*/ in iterable) {}
-                                                      ^" in #t5 as{TypeError} core::int;
+  for (i in iterable) {}
+         ^" in #t5 as{TypeError} core::int;
   }
   await for (final self::A #t7 in stream) {
-    i = let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart:27:61: Error: A value of type 'A' can't be assigned to a variable of type 'int'.
+    i = let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart:27:16: Error: A value of type 'A' can't be assigned to a variable of type 'int'.
  - 'A' is from 'pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart'.
 Try changing the type of the variable.
-  await for (i /*@error=ForInLoopElementTypeNotAssignable*/ in stream) {}
-                                                            ^" in #t7 as{TypeError} core::int;
+  await for (i in stream) {}
+               ^" in #t7 as{TypeError} core::int;
   }
   for (final self::A #t9 in self::f<core::Iterable<self::A>>()) {
     a = #t9;
diff --git a/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart.strong.transformed.expect b/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart.strong.transformed.expect
index d924c02..4a60fd2 100644
--- a/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart.strong.transformed.expect
@@ -2,17 +2,17 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart:26:55: Error: A value of type 'A' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart:26:10: Error: A value of type 'A' can't be assigned to a variable of type 'int'.
 //  - 'A' is from 'pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart'.
 // Try changing the type of the variable.
-//   for (i /*@error=ForInLoopElementTypeNotAssignable*/ in iterable) {}
-//                                                       ^
+//   for (i in iterable) {}
+//          ^
 //
-// pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart:27:61: Error: A value of type 'A' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart:27:16: Error: A value of type 'A' can't be assigned to a variable of type 'int'.
 //  - 'A' is from 'pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart'.
 // Try changing the type of the variable.
-//   await for (i /*@error=ForInLoopElementTypeNotAssignable*/ in stream) {}
-//                                                             ^
+//   await for (i in stream) {}
+//                ^
 //
 import self as self;
 import "dart:core" as core;
@@ -110,11 +110,11 @@
             }
         }
         for (final self::A #t11 in iterable) {
-          i = let final<BottomType> #t12 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart:26:55: Error: A value of type 'A' can't be assigned to a variable of type 'int'.
+          i = let final<BottomType> #t12 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart:26:10: Error: A value of type 'A' can't be assigned to a variable of type 'int'.
  - 'A' is from 'pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart'.
 Try changing the type of the variable.
-  for (i /*@error=ForInLoopElementTypeNotAssignable*/ in iterable) {}
-                                                      ^" in #t11 as{TypeError} core::int;
+  for (i in iterable) {}
+         ^" in #t11 as{TypeError} core::int;
         }
         {
           dynamic :stream = stream;
@@ -129,11 +129,11 @@
               if(:result) {
                 final self::A #t15 = :for-iterator.{asy::_StreamIterator::current};
                 {
-                  i = let final<BottomType> #t16 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart:27:61: Error: A value of type 'A' can't be assigned to a variable of type 'int'.
+                  i = let final<BottomType> #t16 = invalid-expression "pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart:27:16: Error: A value of type 'A' can't be assigned to a variable of type 'int'.
  - 'A' is from 'pkg/front_end/testcases/inference_new/for_each_outer_var_type.dart'.
 Try changing the type of the variable.
-  await for (i /*@error=ForInLoopElementTypeNotAssignable*/ in stream) {}
-                                                            ^" in #t15 as{TypeError} core::int;
+  await for (i in stream) {}
+               ^" in #t15 as{TypeError} core::int;
                 }
               }
               else
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_index.dart b/pkg/front_end/testcases/inference_new/infer_assign_to_index.dart
index f08da41..8eb3740 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_index.dart
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_index.dart
@@ -6,6 +6,6 @@
 library test;
 
 List<double> a = <double>[];
-var /*@topType=double*/ b = (a /*@target=List::[]=*/ [0] = 1.0);
+var b = (a /*@target=List::[]=*/ [0] = 1.0);
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.legacy.expect b/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.legacy.expect
index c6fb73b..9619672 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.legacy.expect
@@ -8,10 +8,10 @@
     ;
   operator [](core::String s) → self::Base::T
     return this.{self::Base::getValue}(s);
-  operator []=(core::String s, self::Base::U v) → void
+  operator []=(core::String s, generic-covariant-impl self::Base::U v) → void
     return this.{self::Base::setValue}(s, v);
   abstract method getValue(core::String s) → self::Base::T;
-  abstract method setValue(core::String s, self::Base::U v) → void;
+  abstract method setValue(core::String s, generic-covariant-impl self::Base::U v) → void;
 }
 abstract class Test1 extends self::Base<core::int, core::int> {
   synthetic constructor •() → self::Test1
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.legacy.transformed.expect
index c6fb73b..9619672 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.legacy.transformed.expect
@@ -8,10 +8,10 @@
     ;
   operator [](core::String s) → self::Base::T
     return this.{self::Base::getValue}(s);
-  operator []=(core::String s, self::Base::U v) → void
+  operator []=(core::String s, generic-covariant-impl self::Base::U v) → void
     return this.{self::Base::setValue}(s, v);
   abstract method getValue(core::String s) → self::Base::T;
-  abstract method setValue(core::String s, self::Base::U v) → void;
+  abstract method setValue(core::String s, generic-covariant-impl self::Base::U v) → void;
 }
 abstract class Test1 extends self::Base<core::int, core::int> {
   synthetic constructor •() → self::Test1
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.outline.expect b/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.outline.expect
index 43e0d64..98949ae 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.outline.expect
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_index_super_upwards.dart.outline.expect
@@ -7,10 +7,10 @@
     ;
   operator [](core::String s) → self::Base::T
     ;
-  operator []=(core::String s, self::Base::U v) → void
+  operator []=(core::String s, generic-covariant-impl self::Base::U v) → void
     ;
   abstract method getValue(core::String s) → self::Base::T;
-  abstract method setValue(core::String s, self::Base::U v) → void;
+  abstract method setValue(core::String s, generic-covariant-impl self::Base::U v) → void;
 }
 abstract class Test1 extends self::Base<core::int, core::int> {
   synthetic constructor •() → self::Test1
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.legacy.expect b/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.legacy.expect
index 8d92bc9..bab4ea5 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.legacy.expect
@@ -7,7 +7,7 @@
     : super core::Object::•()
     ;
   abstract operator [](core::String s) → self::Test::T;
-  abstract operator []=(core::String s, self::Test::U v) → void;
+  abstract operator []=(core::String s, generic-covariant-impl self::Test::U v) → void;
 }
 static method getInt() → core::int
   return 0;
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.legacy.transformed.expect
index 8d92bc9..bab4ea5 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.legacy.transformed.expect
@@ -7,7 +7,7 @@
     : super core::Object::•()
     ;
   abstract operator [](core::String s) → self::Test::T;
-  abstract operator []=(core::String s, self::Test::U v) → void;
+  abstract operator []=(core::String s, generic-covariant-impl self::Test::U v) → void;
 }
 static method getInt() → core::int
   return 0;
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.outline.expect b/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.outline.expect
index f14f72a..2be1f6f 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.outline.expect
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_index_upwards.dart.outline.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::Test<self::Test::T, self::Test::U>
     ;
   abstract operator [](core::String s) → self::Test::T;
-  abstract operator []=(core::String s, self::Test::U v) → void;
+  abstract operator []=(core::String s, generic-covariant-impl self::Test::U v) → void;
 }
 static method getInt() → core::int
   ;
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_property.dart b/pkg/front_end/testcases/inference_new/infer_assign_to_property.dart
index eb39317..7b7d80f 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_property.dart
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_property.dart
@@ -9,13 +9,13 @@
   int f;
 }
 
-var /*@topType=int*/ v_assign = (new A(). /*@target=A::f*/ f = 1);
-var /*@topType=int*/ v_plus = (new A(). /*@target=A::f*/ f += 1);
-var /*@topType=int*/ v_minus = (new A(). /*@target=A::f*/ f -= 1);
-var /*@topType=int*/ v_multiply = (new A(). /*@target=A::f*/ f *= 1);
-var /*@topType=int*/ v_prefix_pp = (++new A(). /*@target=A::f*/ f);
-var /*@topType=int*/ v_prefix_mm = (--new A(). /*@target=A::f*/ f);
-var /*@topType=int*/ v_postfix_pp = (new A(). /*@target=A::f*/ f++);
-var /*@topType=int*/ v_postfix_mm = (new A(). /*@target=A::f*/ f--);
+var v_assign = (new A(). /*@target=A::f*/ f = 1);
+var v_plus = (new A(). /*@target=A::f*/ f += 1);
+var v_minus = (new A(). /*@target=A::f*/ f -= 1);
+var v_multiply = (new A(). /*@target=A::f*/ f *= 1);
+var v_prefix_pp = (++new A(). /*@target=A::f*/ f);
+var v_prefix_mm = (--new A(). /*@target=A::f*/ f);
+var v_postfix_pp = (new A(). /*@target=A::f*/ f++);
+var v_postfix_mm = (new A(). /*@target=A::f*/ f--);
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart b/pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart
index af534a0..0a7493d 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart
@@ -6,17 +6,17 @@
 library test;
 
 class A {
-  int operator +(/*@topType=dynamic*/ other) => 1;
-  double operator -(/*@topType=dynamic*/ other) => 2.0;
+  int operator +(other) => 1;
+  double operator -(other) => 2.0;
 }
 
 class B {
   A a;
 }
 
-var /*@topType=int*/ v_prefix_pp = (++new B(). /*@target=B::a*/ a);
-var /*@topType=double*/ v_prefix_mm = (--new B(). /*@target=B::a*/ a);
-var /*@topType=A*/ v_postfix_pp = (new B(). /*@target=B::a*/ a++);
-var /*@topType=A*/ v_postfix_mm = (new B(). /*@target=B::a*/ a--);
+var v_prefix_pp = (++new B(). /*@target=B::a*/ a);
+var v_prefix_mm = (--new B(). /*@target=B::a*/ a);
+var v_postfix_pp = (new B(). /*@target=B::a*/ a++);
+var v_postfix_mm = (new B(). /*@target=B::a*/ a--);
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart.strong.expect b/pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart.strong.expect
index 0299145..a3ccc64 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart.strong.expect
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart.strong.expect
@@ -2,29 +2,29 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:17:37: Error: A value of type 'int' can't be assigned to a variable of type 'A'.
+// pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:17:20: Error: A value of type 'int' can't be assigned to a variable of type 'A'.
 //  - 'A' is from 'pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart'.
 // Try changing the type of the left hand side, or casting the right hand side to 'A'.
-// var /*@topType=int*/ v_prefix_pp = (++new B(). /*@target=B::a*/ a);
-//                                     ^
+// var v_prefix_pp = (++new B(). /*@target=B::a*/ a);
+//                    ^
 //
-// pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:18:40: Error: A value of type 'double' can't be assigned to a variable of type 'A'.
+// pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:18:20: Error: A value of type 'double' can't be assigned to a variable of type 'A'.
 //  - 'A' is from 'pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart'.
 // Try changing the type of the left hand side, or casting the right hand side to 'A'.
-// var /*@topType=double*/ v_prefix_mm = (--new B(). /*@target=B::a*/ a);
-//                                        ^
+// var v_prefix_mm = (--new B(). /*@target=B::a*/ a);
+//                    ^
 //
-// pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:19:63: Error: A value of type 'int' can't be assigned to a variable of type 'A'.
+// pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:19:48: Error: A value of type 'int' can't be assigned to a variable of type 'A'.
 //  - 'A' is from 'pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart'.
 // Try changing the type of the left hand side, or casting the right hand side to 'A'.
-// var /*@topType=A*/ v_postfix_pp = (new B(). /*@target=B::a*/ a++);
-//                                                               ^
+// var v_postfix_pp = (new B(). /*@target=B::a*/ a++);
+//                                                ^
 //
-// pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:20:63: Error: A value of type 'double' can't be assigned to a variable of type 'A'.
+// pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:20:48: Error: A value of type 'double' can't be assigned to a variable of type 'A'.
 //  - 'A' is from 'pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart'.
 // Try changing the type of the left hand side, or casting the right hand side to 'A'.
-// var /*@topType=A*/ v_postfix_mm = (new B(). /*@target=B::a*/ a--);
-//                                                               ^
+// var v_postfix_mm = (new B(). /*@target=B::a*/ a--);
+//                                                ^
 //
 import self as self;
 import "dart:core" as core;
@@ -44,24 +44,24 @@
     : super core::Object::•()
     ;
 }
-static field core::int v_prefix_pp = let final self::B #t1 = new self::B::•() in #t1.{self::B::a} = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:17:37: Error: A value of type 'int' can't be assigned to a variable of type 'A'.
+static field core::int v_prefix_pp = let final self::B #t1 = new self::B::•() in #t1.{self::B::a} = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:17:20: Error: A value of type 'int' can't be assigned to a variable of type 'A'.
  - 'A' is from 'pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart'.
 Try changing the type of the left hand side, or casting the right hand side to 'A'.
-var /*@topType=int*/ v_prefix_pp = (++new B(). /*@target=B::a*/ a);
-                                    ^" in #t1.{self::B::a}.{self::A::+}(1) as{TypeError} self::A;
-static field core::double v_prefix_mm = let final self::B #t3 = new self::B::•() in #t3.{self::B::a} = let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:18:40: Error: A value of type 'double' can't be assigned to a variable of type 'A'.
+var v_prefix_pp = (++new B(). /*@target=B::a*/ a);
+                   ^" in #t1.{self::B::a}.{self::A::+}(1) as{TypeError} self::A;
+static field core::double v_prefix_mm = let final self::B #t3 = new self::B::•() in #t3.{self::B::a} = let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:18:20: Error: A value of type 'double' can't be assigned to a variable of type 'A'.
  - 'A' is from 'pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart'.
 Try changing the type of the left hand side, or casting the right hand side to 'A'.
-var /*@topType=double*/ v_prefix_mm = (--new B(). /*@target=B::a*/ a);
-                                       ^" in #t3.{self::B::a}.{self::A::-}(1) as{TypeError} self::A;
-static field self::A v_postfix_pp = let final self::B #t5 = new self::B::•() in let final self::A #t6 = #t5.{self::B::a} in let final core::int #t7 = #t5.{self::B::a} = let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:19:63: Error: A value of type 'int' can't be assigned to a variable of type 'A'.
+var v_prefix_mm = (--new B(). /*@target=B::a*/ a);
+                   ^" in #t3.{self::B::a}.{self::A::-}(1) as{TypeError} self::A;
+static field self::A v_postfix_pp = let final self::B #t5 = new self::B::•() in let final self::A #t6 = #t5.{self::B::a} in let final core::int #t7 = #t5.{self::B::a} = let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:19:48: Error: A value of type 'int' can't be assigned to a variable of type 'A'.
  - 'A' is from 'pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart'.
 Try changing the type of the left hand side, or casting the right hand side to 'A'.
-var /*@topType=A*/ v_postfix_pp = (new B(). /*@target=B::a*/ a++);
-                                                              ^" in #t6.{self::A::+}(1) as{TypeError} self::A in #t6;
-static field self::A v_postfix_mm = let final self::B #t9 = new self::B::•() in let final self::A #t10 = #t9.{self::B::a} in let final core::double #t11 = #t9.{self::B::a} = let final<BottomType> #t12 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:20:63: Error: A value of type 'double' can't be assigned to a variable of type 'A'.
+var v_postfix_pp = (new B(). /*@target=B::a*/ a++);
+                                               ^" in #t6.{self::A::+}(1) as{TypeError} self::A in #t6;
+static field self::A v_postfix_mm = let final self::B #t9 = new self::B::•() in let final self::A #t10 = #t9.{self::B::a} in let final core::double #t11 = #t9.{self::B::a} = let final<BottomType> #t12 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:20:48: Error: A value of type 'double' can't be assigned to a variable of type 'A'.
  - 'A' is from 'pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart'.
 Try changing the type of the left hand side, or casting the right hand side to 'A'.
-var /*@topType=A*/ v_postfix_mm = (new B(). /*@target=B::a*/ a--);
-                                                              ^" in #t10.{self::A::-}(1) as{TypeError} self::A in #t10;
+var v_postfix_mm = (new B(). /*@target=B::a*/ a--);
+                                               ^" in #t10.{self::A::-}(1) as{TypeError} self::A in #t10;
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart.strong.transformed.expect b/pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart.strong.transformed.expect
index 7a44f95..2d70eeb 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart.strong.transformed.expect
@@ -19,18 +19,18 @@
 }
 static field core::int v_prefix_pp = let final self::B #t1 = new self::B::•() in #t1.{self::B::a} = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:17:37: Error: A value of type 'dart.core::int' can't be assigned to a variable of type 'test::A'.
 Try changing the type of the left hand side, or casting the right hand side to 'test::A'.
-var /*@topType=int*/ v_prefix_pp = (++new B(). /*@target=B::a*/ a);
+var  v_prefix_pp = (++new B(). /*@target=B::a*/ a);
                                     ^" in #t1.{self::B::a}.{self::A::+}(1) as{TypeError} <BottomType>;
 static field core::double v_prefix_mm = let final self::B #t3 = new self::B::•() in #t3.{self::B::a} = let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:18:40: Error: A value of type 'dart.core::double' can't be assigned to a variable of type 'test::A'.
 Try changing the type of the left hand side, or casting the right hand side to 'test::A'.
-var /*@topType=double*/ v_prefix_mm = (--new B(). /*@target=B::a*/ a);
+var  v_prefix_mm = (--new B(). /*@target=B::a*/ a);
                                        ^" in #t3.{self::B::a}.{self::A::-}(1) as{TypeError} <BottomType>;
 static field self::A v_postfix_pp = let final self::B #t5 = new self::B::•() in let final self::A #t6 = #t5.{self::B::a} in let final core::int #t7 = #t5.{self::B::a} = let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:19:63: Error: A value of type 'dart.core::int' can't be assigned to a variable of type 'test::A'.
 Try changing the type of the left hand side, or casting the right hand side to 'test::A'.
-var /*@topType=A*/ v_postfix_pp = (new B(). /*@target=B::a*/ a++);
+var  v_postfix_pp = (new B(). /*@target=B::a*/ a++);
                                                               ^" in #t6.{self::A::+}(1) as{TypeError} <BottomType>in #t6;
 static field self::A v_postfix_mm = let final self::B #t9 = new self::B::•() in let final self::A #t10 = #t9.{self::B::a} in let final core::double #t11 = #t9.{self::B::a} = let final<BottomType> #t12 = invalid-expression "pkg/front_end/testcases/inference_new/infer_assign_to_property_custom.dart:20:63: Error: A value of type 'dart.core::double' can't be assigned to a variable of type 'test::A'.
 Try changing the type of the left hand side, or casting the right hand side to 'test::A'.
-var /*@topType=A*/ v_postfix_mm = (new B(). /*@target=B::a*/ a--);
+var  v_postfix_mm = (new B(). /*@target=B::a*/ a--);
                                                               ^" in #t10.{self::A::-}(1) as{TypeError} <BottomType>in #t10;
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference_new/infer_assign_to_ref.dart b/pkg/front_end/testcases/inference_new/infer_assign_to_ref.dart
index 4ddb4ed..3416a62 100644
--- a/pkg/front_end/testcases/inference_new/infer_assign_to_ref.dart
+++ b/pkg/front_end/testcases/inference_new/infer_assign_to_ref.dart
@@ -10,9 +10,9 @@
 }
 
 A a = new A();
-var /*@topType=int*/ b = (a. /*@target=A::f*/ f = 1);
-var /*@topType=int*/ c = 0;
-var /*@topType=int*/ d = (c = 1);
+var b = (a. /*@target=A::f*/ f = 1);
+var c = 0;
+var d = (c = 1);
 
 main() {
   a;
diff --git a/pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart b/pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart
index bec35e1..33c324d 100644
--- a/pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart
+++ b/pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart
@@ -13,7 +13,7 @@
 // Type inference should fail here since the getter and setter for x don't
 // match.
 class B extends A {
-  var /*@topType=int*/ x;
+  var x;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart.strong.expect b/pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart.strong.expect
index fe82b93..9a78098 100644
--- a/pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart.strong.expect
+++ b/pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart.strong.expect
@@ -2,10 +2,10 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart:16:24: Error: The return type of the method 'B.x' is 'int', which does not match the return type of the overridden method, 'double'.
+// pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart:16:7: Error: The return type of the method 'B.x' is 'int', which does not match the return type, 'double', of the overridden method, 'A.x'.
 // Change to a subtype of 'double'.
-//   var /*@topType=int*/ x;
-//                        ^
+//   var x;
+//       ^
 // pkg/front_end/testcases/inference_new/infer_field_getter_setter_mismatch.dart:10:12: Context: This is the overridden method ('x').
 //   void set x(double value);
 //            ^
diff --git a/pkg/front_end/testcases/inference_new/infer_field_override_getter_overrides_setter.dart b/pkg/front_end/testcases/inference_new/infer_field_override_getter_overrides_setter.dart
index 4b47931..7ebfa01 100644
--- a/pkg/front_end/testcases/inference_new/infer_field_override_getter_overrides_setter.dart
+++ b/pkg/front_end/testcases/inference_new/infer_field_override_getter_overrides_setter.dart
@@ -16,7 +16,7 @@
 // The getter in B doesn't screen the setter in A, so inference sees two
 // different types and gives an error.
 class C extends B {
-  var /*@topType=int*/ x;
+  var x;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/infer_field_override_getter_overrides_setter.dart.strong.expect b/pkg/front_end/testcases/inference_new/infer_field_override_getter_overrides_setter.dart.strong.expect
index 57b6ceb..83026ec 100644
--- a/pkg/front_end/testcases/inference_new/infer_field_override_getter_overrides_setter.dart.strong.expect
+++ b/pkg/front_end/testcases/inference_new/infer_field_override_getter_overrides_setter.dart.strong.expect
@@ -2,10 +2,10 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference_new/infer_field_override_getter_overrides_setter.dart:19:24: Error: The return type of the method 'C.x' is 'int', which does not match the return type of the overridden method, 'num'.
+// pkg/front_end/testcases/inference_new/infer_field_override_getter_overrides_setter.dart:19:7: Error: The return type of the method 'C.x' is 'int', which does not match the return type, 'num', of the overridden method, 'A.x'.
 // Change to a subtype of 'num'.
-//   var /*@topType=int*/ x;
-//                        ^
+//   var x;
+//       ^
 // pkg/front_end/testcases/inference_new/infer_field_override_getter_overrides_setter.dart:9:12: Context: This is the overridden method ('x').
 //   void set x(num value);
 //            ^
diff --git a/pkg/front_end/testcases/inference_new/infer_field_override_setter_overrides_getter.dart b/pkg/front_end/testcases/inference_new/infer_field_override_setter_overrides_getter.dart
index 182b452..8e774ec 100644
--- a/pkg/front_end/testcases/inference_new/infer_field_override_setter_overrides_getter.dart
+++ b/pkg/front_end/testcases/inference_new/infer_field_override_setter_overrides_getter.dart
@@ -16,7 +16,7 @@
 // The getter in B doesn't screen the setter in A, so inference sees two
 // different types and gives an error.
 class C extends B {
-  var /*@topType=num*/ x;
+  var x;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/infer_instance_accessor_ref.dart b/pkg/front_end/testcases/inference_new/infer_instance_accessor_ref.dart
index 9abb415..fd98fc2 100644
--- a/pkg/front_end/testcases/inference_new/infer_instance_accessor_ref.dart
+++ b/pkg/front_end/testcases/inference_new/infer_instance_accessor_ref.dart
@@ -18,8 +18,8 @@
 
 class D extends C {}
 
-var /*@topType=A*/ a = new A();
-var /*@topType=C*/ x = a. /*@target=A::b*/ b. /*@target=B::c*/ c;
-var /*@topType=C*/ y = a. /*@target=A::b*/ b. /*@target=B::c*/ c ??= new D();
+var a = new A();
+var x = a. /*@target=A::b*/ b. /*@target=B::c*/ c;
+var y = a. /*@target=A::b*/ b. /*@target=B::c*/ c ??= new D();
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/infer_instance_field_ref.dart b/pkg/front_end/testcases/inference_new/infer_instance_field_ref.dart
index 192a93b..e649aab 100644
--- a/pkg/front_end/testcases/inference_new/infer_instance_field_ref.dart
+++ b/pkg/front_end/testcases/inference_new/infer_instance_field_ref.dart
@@ -17,8 +17,8 @@
 
 class D extends C {}
 
-var /*@topType=A*/ a = new A();
-var /*@topType=C*/ x = a. /*@target=A::b*/ b. /*@target=B::c*/ c;
-var /*@topType=C*/ y = a. /*@target=A::b*/ b. /*@target=B::c*/ c ??= new D();
+var a = new A();
+var x = a. /*@target=A::b*/ b. /*@target=B::c*/ c;
+var y = a. /*@target=A::b*/ b. /*@target=B::c*/ c ??= new D();
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart b/pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart
index 888321e..9ffd8ea 100644
--- a/pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart
+++ b/pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart
@@ -2,21 +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.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 // In the code below, there is a circularity between A.b and x.
 
 class A {
-  var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ b = /*@returnType=dynamic*/ () =>
-      x;
-  var /*@topType=() -> dynamic*/ c = /*@returnType=dynamic*/ () => x;
+  var b = /*@returnType=invalid-type*/ () => x;
+  var c = /*@returnType=invalid-type*/ () => x;
 }
 
-var /*@topType=A*/ a = new A();
-var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x = /*@returnType=dynamic*/ () =>
-    a. /*@target=A::b*/ b;
-var /*@topType=() -> () -> dynamic*/ y = /*@returnType=() -> dynamic*/ () =>
-    a. /*@target=A::c*/ c;
+var a = new A();
+var x = /*@returnType=invalid-type*/ () => a. /*@target=A::b*/ b;
+var y = /*@returnType=() -> invalid-type*/ () => a. /*@target=A::c*/ c;
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart.strong.expect b/pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart.strong.expect
index c125a14..46baf2b 100644
--- a/pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart.strong.expect
+++ b/pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart.strong.expect
@@ -2,27 +2,27 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart:11:69: Error: Can't infer the type of 'b': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart:11:7: Error: Can't infer the type of 'b': circularity found during type inference.
 // Specify the type explicitly.
-//   var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ b = /*@returnType=dynamic*/ () =>
-//                                                                     ^
+//   var b = /*@returnType=invalid-type*/ () => x;
+//       ^
 //
-// pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart:17:67: Error: Can't infer the type of 'x': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart:16:5: Error: Can't infer the type of 'x': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x = /*@returnType=dynamic*/ () =>
-//                                                                   ^
+// var x = /*@returnType=invalid-type*/ () => a. /*@target=A::b*/ b;
+//     ^
 //
 import self as self;
 import "dart:core" as core;
 
 class A extends core::Object {
-  field dynamic b = () → dynamic => self::x;
-  field () → dynamic c = () → dynamic => self::x;
+  field invalid-type b = (() → invalid-type => self::x) as{TypeError} invalid-type;
+  field () → invalid-type c = () → invalid-type => self::x;
   synthetic constructor •() → self::A
     : super core::Object::•()
     ;
 }
 static field self::A a = new self::A::•();
-static field dynamic x = () → dynamic => self::a.{self::A::b};
-static field () → () → dynamic y = () → () → dynamic => self::a.{self::A::c};
+static field invalid-type x = (() → invalid-type => self::a.{self::A::b}) as{TypeError} invalid-type;
+static field () → () → invalid-type y = () → () → invalid-type => self::a.{self::A::c};
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart.strong.transformed.expect b/pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart.strong.transformed.expect
index c125a14..46baf2b 100644
--- a/pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart.strong.transformed.expect
@@ -2,27 +2,27 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart:11:69: Error: Can't infer the type of 'b': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart:11:7: Error: Can't infer the type of 'b': circularity found during type inference.
 // Specify the type explicitly.
-//   var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ b = /*@returnType=dynamic*/ () =>
-//                                                                     ^
+//   var b = /*@returnType=invalid-type*/ () => x;
+//       ^
 //
-// pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart:17:67: Error: Can't infer the type of 'x': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/infer_instance_field_ref_circular.dart:16:5: Error: Can't infer the type of 'x': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x = /*@returnType=dynamic*/ () =>
-//                                                                   ^
+// var x = /*@returnType=invalid-type*/ () => a. /*@target=A::b*/ b;
+//     ^
 //
 import self as self;
 import "dart:core" as core;
 
 class A extends core::Object {
-  field dynamic b = () → dynamic => self::x;
-  field () → dynamic c = () → dynamic => self::x;
+  field invalid-type b = (() → invalid-type => self::x) as{TypeError} invalid-type;
+  field () → invalid-type c = () → invalid-type => self::x;
   synthetic constructor •() → self::A
     : super core::Object::•()
     ;
 }
 static field self::A a = new self::A::•();
-static field dynamic x = () → dynamic => self::a.{self::A::b};
-static field () → () → dynamic y = () → () → dynamic => self::a.{self::A::c};
+static field invalid-type x = (() → invalid-type => self::a.{self::A::b}) as{TypeError} invalid-type;
+static field () → () → invalid-type y = () → () → invalid-type => self::a.{self::A::c};
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference_new/infer_logical.dart b/pkg/front_end/testcases/inference_new/infer_logical.dart
index 4989c2a..5cf7f8a 100644
--- a/pkg/front_end/testcases/inference_new/infer_logical.dart
+++ b/pkg/front_end/testcases/inference_new/infer_logical.dart
@@ -7,8 +7,8 @@
 
 T f<T>() => null;
 
-var /*@topType=bool*/ x = /*@typeArgs=bool*/ f() || /*@typeArgs=bool*/ f();
-var /*@topType=bool*/ y = /*@typeArgs=bool*/ f() && /*@typeArgs=bool*/ f();
+var x = /*@typeArgs=bool*/ f() || /*@typeArgs=bool*/ f();
+var y = /*@typeArgs=bool*/ f() && /*@typeArgs=bool*/ f();
 
 void test() {
   var /*@type=bool*/ x = /*@typeArgs=bool*/ f() || /*@typeArgs=bool*/ f();
diff --git a/pkg/front_end/testcases/inference_new/infer_use_of_void.dart b/pkg/front_end/testcases/inference_new/infer_use_of_void.dart
index a713ece..a90fa93 100644
--- a/pkg/front_end/testcases/inference_new/infer_use_of_void.dart
+++ b/pkg/front_end/testcases/inference_new/infer_use_of_void.dart
@@ -10,11 +10,10 @@
 }
 
 class C extends B {
-  /*@topType=void*/ f() {}
+  f() {}
 }
 
-var /*@topType=void*/ x =
-    new C(). /*info:USE_OF_VOID_RESULT*/ /*@target=C::f*/ f();
+var x = new C(). /*info:USE_OF_VOID_RESULT*/ /*@target=C::f*/ f();
 
 main() {
   x;
diff --git a/pkg/front_end/testcases/inference_new/invalid_assignment_during_toplevel_inference.dart b/pkg/front_end/testcases/inference_new/invalid_assignment_during_toplevel_inference.dart
index 07bb7f4..6b14c21 100644
--- a/pkg/front_end/testcases/inference_new/invalid_assignment_during_toplevel_inference.dart
+++ b/pkg/front_end/testcases/inference_new/invalid_assignment_during_toplevel_inference.dart
@@ -2,10 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=error,inference*/
+/*@testedFeatures=inference*/
 
 int i;
 String s;
-var /*@topType=String*/ x = i = /*@error=InvalidAssignment*/ s;
+var x = i = s;
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/invalid_assignment_during_toplevel_inference.dart.strong.expect b/pkg/front_end/testcases/inference_new/invalid_assignment_during_toplevel_inference.dart.strong.expect
index 28a9284..5768908 100644
--- a/pkg/front_end/testcases/inference_new/invalid_assignment_during_toplevel_inference.dart.strong.expect
+++ b/pkg/front_end/testcases/inference_new/invalid_assignment_during_toplevel_inference.dart.strong.expect
@@ -2,18 +2,18 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference_new/invalid_assignment_during_toplevel_inference.dart:9:62: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/inference_new/invalid_assignment_during_toplevel_inference.dart:9:13: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
-// var /*@topType=String*/ x = i = /*@error=InvalidAssignment*/ s;
-//                                                              ^
+// var x = i = s;
+//             ^
 //
 import self as self;
 import "dart:core" as core;
 
 static field core::int i;
 static field core::String s;
-static field core::String x = self::i = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference_new/invalid_assignment_during_toplevel_inference.dart:9:62: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+static field core::String x = self::i = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference_new/invalid_assignment_during_toplevel_inference.dart:9:13: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
-var /*@topType=String*/ x = i = /*@error=InvalidAssignment*/ s;
-                                                             ^" in self::s as{TypeError} core::int;
+var x = i = s;
+            ^" in self::s as{TypeError} core::int;
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference_new/invalid_assignment_during_toplevel_inference.dart.strong.transformed.expect b/pkg/front_end/testcases/inference_new/invalid_assignment_during_toplevel_inference.dart.strong.transformed.expect
index 90592a6..4b4d6da 100644
--- a/pkg/front_end/testcases/inference_new/invalid_assignment_during_toplevel_inference.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/invalid_assignment_during_toplevel_inference.dart.strong.transformed.expect
@@ -6,6 +6,6 @@
 static field core::String s;
 static field core::String x = self::i = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/inference_new/invalid_assignment_during_toplevel_inference.dart:9:62: Error: A value of type 'dart.core::String' can't be assigned to a variable of type 'dart.core::int'.
 Try changing the type of the left hand side, or casting the right hand side to 'dart.core::int'.
-var /*@topType=String*/ x = i = /*@error=InvalidAssignment*/ s;
+var  x = i = /*@error=InvalidAssignment*/ s;
                                                              ^" in self::s as{TypeError} <BottomType>;
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference_new/list_literals_can_infer_null_top_level.dart b/pkg/front_end/testcases/inference_new/list_literals_can_infer_null_top_level.dart
index 3a9a4bb..1045584 100644
--- a/pkg/front_end/testcases/inference_new/list_literals_can_infer_null_top_level.dart
+++ b/pkg/front_end/testcases/inference_new/list_literals_can_infer_null_top_level.dart
@@ -5,7 +5,7 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=List<Null>*/ x = /*@typeArgs=Null*/ [null];
+var x = /*@typeArgs=Null*/ [null];
 
 main() {
   x;
diff --git a/pkg/front_end/testcases/inference_new/map_literals_can_infer_null_top_level.dart b/pkg/front_end/testcases/inference_new/map_literals_can_infer_null_top_level.dart
index 6b5dccd..04c633b 100644
--- a/pkg/front_end/testcases/inference_new/map_literals_can_infer_null_top_level.dart
+++ b/pkg/front_end/testcases/inference_new/map_literals_can_infer_null_top_level.dart
@@ -5,7 +5,7 @@
 /*@testedFeatures=inference*/
 library test;
 
-var /*@topType=Map<Null, Null>*/ x = /*@typeArgs=Null, Null*/ {null: null};
+var x = /*@typeArgs=Null, Null*/ {null: null};
 
 main() {
   x;
diff --git a/pkg/front_end/testcases/inference_new/multiple_interface_inheritance.dart.hierarchy.expect b/pkg/front_end/testcases/inference_new/multiple_interface_inheritance.dart.hierarchy.expect
index 4e3fcb5..f92d773 100644
--- a/pkg/front_end/testcases/inference_new/multiple_interface_inheritance.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference_new/multiple_interface_inheritance.dart.hierarchy.expect
@@ -55,6 +55,7 @@
   classSetters:
 
 C:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: I1, I2
@@ -85,6 +86,7 @@
   interfaceSetters:
 
 D:
+  Longest path to Object: 3
   superclasses:
     Object
       -> C
@@ -117,6 +119,7 @@
   interfaceSetters:
 
 E:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: I2, I1
@@ -147,6 +150,7 @@
   interfaceSetters:
 
 F:
+  Longest path to Object: 3
   superclasses:
     Object
       -> E
diff --git a/pkg/front_end/testcases/inference_new/property_get_toplevel.dart b/pkg/front_end/testcases/inference_new/property_get_toplevel.dart
index 449ec76..e0201da 100644
--- a/pkg/front_end/testcases/inference_new/property_get_toplevel.dart
+++ b/pkg/front_end/testcases/inference_new/property_get_toplevel.dart
@@ -12,16 +12,12 @@
 }
 
 C c = new C();
-var /*@topType=int*/ field_ref = c. /*@target=C::field*/ field;
-var /*@topType=int*/ getter_ref = c. /*@target=C::getter*/ getter;
-var /*@topType=() -> int*/ function_ref = c. /*@target=C::function*/ function;
-var /*@topType=List<int>*/ field_ref_list = /*@typeArgs=int*/ [
-  c. /*@target=C::field*/ field
-];
-var /*@topType=List<int>*/ getter_ref_list = /*@typeArgs=int*/ [
-  c. /*@target=C::getter*/ getter
-];
-var /*@topType=List<() -> int>*/ function_ref_list = /*@typeArgs=() -> int*/ [
+var field_ref = c. /*@target=C::field*/ field;
+var getter_ref = c. /*@target=C::getter*/ getter;
+var function_ref = c. /*@target=C::function*/ function;
+var field_ref_list = /*@typeArgs=int*/ [c. /*@target=C::field*/ field];
+var getter_ref_list = /*@typeArgs=int*/ [c. /*@target=C::getter*/ getter];
+var function_ref_list = /*@typeArgs=() -> int*/ [
   c. /*@target=C::function*/ function
 ];
 
diff --git a/pkg/front_end/testcases/inference_new/strongly_connected_component.dart b/pkg/front_end/testcases/inference_new/strongly_connected_component.dart
index 0589e0a..788e92f 100644
--- a/pkg/front_end/testcases/inference_new/strongly_connected_component.dart
+++ b/pkg/front_end/testcases/inference_new/strongly_connected_component.dart
@@ -2,7 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=inference,error*/
+/*@testedFeatures=inference*/
 library test;
 
 bool f() => null;
@@ -14,10 +14,8 @@
 // circularity, and for error recovery their type is set to `dynamic`.
 // Thereafter, z infers without problems.
 
-var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x = /*@returnType=dynamic*/ () =>
-    f() ? y : z;
-var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ y = /*@returnType=dynamic*/ () =>
-    x;
-var /*@topType=() -> dynamic*/ z = /*@returnType=dynamic*/ () => x;
+var x = /*@returnType=invalid-type*/ () => f() ? y : z;
+var y = /*@returnType=invalid-type*/ () => x;
+var z = /*@returnType=invalid-type*/ () => x;
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/strongly_connected_component.dart.strong.expect b/pkg/front_end/testcases/inference_new/strongly_connected_component.dart.strong.expect
index 6f86a2f..88bfdb0 100644
--- a/pkg/front_end/testcases/inference_new/strongly_connected_component.dart.strong.expect
+++ b/pkg/front_end/testcases/inference_new/strongly_connected_component.dart.strong.expect
@@ -2,22 +2,22 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/inference_new/strongly_connected_component.dart:19:67: Error: Can't infer the type of 'y': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/strongly_connected_component.dart:18:5: Error: Can't infer the type of 'y': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ y = /*@returnType=dynamic*/ () =>
-//                                                                   ^
+// var y = /*@returnType=invalid-type*/ () => x;
+//     ^
 //
-// pkg/front_end/testcases/inference_new/strongly_connected_component.dart:17:67: Error: Can't infer the type of 'x': circularity found during type inference.
+// pkg/front_end/testcases/inference_new/strongly_connected_component.dart:17:5: Error: Can't infer the type of 'x': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x = /*@returnType=dynamic*/ () =>
-//                                                                   ^
+// var x = /*@returnType=invalid-type*/ () => f() ? y : z;
+//     ^
 //
 import self as self;
 import "dart:core" as core;
 
-static field dynamic x = () → dynamic => self::f() ?{dynamic} self::y : self::z;
-static field dynamic y = () → dynamic => self::x;
-static field () → dynamic z = () → dynamic => self::x;
+static field invalid-type x = (() → invalid-type => self::f() ?{invalid-type} self::y : self::z) as{TypeError} invalid-type;
+static field invalid-type y = (() → invalid-type => self::x) as{TypeError} invalid-type;
+static field () → dynamic z = () → invalid-type => self::x;
 static method f() → core::bool
   return null;
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/inference_new/strongly_connected_component.dart.strong.transformed.expect b/pkg/front_end/testcases/inference_new/strongly_connected_component.dart.strong.transformed.expect
index 6f86a2f..9a54331 100644
--- a/pkg/front_end/testcases/inference_new/strongly_connected_component.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/strongly_connected_component.dart.strong.transformed.expect
@@ -4,12 +4,12 @@
 //
 // pkg/front_end/testcases/inference_new/strongly_connected_component.dart:19:67: Error: Can't infer the type of 'y': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ y = /*@returnType=dynamic*/ () =>
+// var  /*@error=CantInferTypeDueToCircularity*/ y = /*@returnType=dynamic*/ () =>
 //                                                                   ^
 //
 // pkg/front_end/testcases/inference_new/strongly_connected_component.dart:17:67: Error: Can't infer the type of 'x': circularity found during type inference.
 // Specify the type explicitly.
-// var /*@topType=dynamic*/ /*@error=CantInferTypeDueToCircularity*/ x = /*@returnType=dynamic*/ () =>
+// var  /*@error=CantInferTypeDueToCircularity*/ x = /*@returnType=dynamic*/ () =>
 //                                                                   ^
 //
 import self as self;
diff --git a/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.legacy.expect b/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.legacy.expect
index b5345da..0f54c8d 100644
--- a/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.legacy.expect
+++ b/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.legacy.expect
@@ -19,7 +19,7 @@
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
-  operator [](self::E<self::B::T> x) → self::D<self::B::T>
+  operator [](generic-covariant-impl self::E<self::B::T> x) → self::D<self::B::T>
     return null;
 }
 class C<U extends core::Object = dynamic> extends self::B<asy::Future<self::C::U>> {
diff --git a/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.legacy.transformed.expect b/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.legacy.transformed.expect
index b5345da..0f54c8d 100644
--- a/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.legacy.transformed.expect
@@ -19,7 +19,7 @@
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
-  operator [](self::E<self::B::T> x) → self::D<self::B::T>
+  operator [](generic-covariant-impl self::E<self::B::T> x) → self::D<self::B::T>
     return null;
 }
 class C<U extends core::Object = dynamic> extends self::B<asy::Future<self::C::U>> {
diff --git a/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.outline.expect b/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.outline.expect
index 44d6487..12ca495 100644
--- a/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.outline.expect
+++ b/pkg/front_end/testcases/inference_new/super_index_get_substitution.dart.outline.expect
@@ -16,7 +16,7 @@
 class B<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::B<self::B::T>
     ;
-  operator [](self::E<self::B::T> x) → self::D<self::B::T>
+  operator [](generic-covariant-impl self::E<self::B::T> x) → self::D<self::B::T>
     ;
 }
 class C<U extends core::Object = dynamic> extends self::B<asy::Future<self::C::U>> {
diff --git a/pkg/front_end/testcases/inference_new/top_level_field_depends_on_multiple_inheritance.dart b/pkg/front_end/testcases/inference_new/top_level_field_depends_on_multiple_inheritance.dart
index b0382f2..d687e58 100644
--- a/pkg/front_end/testcases/inference_new/top_level_field_depends_on_multiple_inheritance.dart
+++ b/pkg/front_end/testcases/inference_new/top_level_field_depends_on_multiple_inheritance.dart
@@ -37,6 +37,6 @@
 // bar().foo resolves to G::foo, which is inherited from E::foo, so its return
 // type is B.  Note that the target is annotated as G::foo, since that is the
 // forwarding stub.
-var /*@topType=B*/ x = bar(). /*@target=G::foo*/ foo();
+var x = bar(). /*@target=G::foo*/ foo();
 
 main() {}
diff --git a/pkg/front_end/testcases/inference_new/top_level_field_depends_on_multiple_inheritance.dart.hierarchy.expect b/pkg/front_end/testcases/inference_new/top_level_field_depends_on_multiple_inheritance.dart.hierarchy.expect
index a0eaeca..00d3da3 100644
--- a/pkg/front_end/testcases/inference_new/top_level_field_depends_on_multiple_inheritance.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/inference_new/top_level_field_depends_on_multiple_inheritance.dart.hierarchy.expect
@@ -127,6 +127,7 @@
   classSetters:
 
 G:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: D, E, F
@@ -157,6 +158,7 @@
   interfaceSetters:
 
 H:
+  Longest path to Object: 3
   superclasses:
     Object
       -> G
diff --git a/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart b/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart
index 54b5f61..937495a5 100644
--- a/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart
+++ b/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2.dart
@@ -6,7 +6,7 @@
 library test;
 
 List<T> f<T>(T g()) => <T>[g()];
-var /*@topType=List<int>*/ v = (f) /*@typeArgs=int*/ (/*@returnType=int*/ () {
+var v = (f) /*@typeArgs=int*/ (/*@returnType=int*/ () {
   return 1;
 });
 
diff --git a/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart b/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart
index 54b5f61..937495a5 100644
--- a/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart
+++ b/pkg/front_end/testcases/inference_new/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2.dart
@@ -6,7 +6,7 @@
 library test;
 
 List<T> f<T>(T g()) => <T>[g()];
-var /*@topType=List<int>*/ v = (f) /*@typeArgs=int*/ (/*@returnType=int*/ () {
+var v = (f) /*@typeArgs=int*/ (/*@returnType=int*/ () {
   return 1;
 });
 
diff --git a/pkg/front_end/testcases/inference_new/void_return_type_subtypes_dynamic.dart b/pkg/front_end/testcases/inference_new/void_return_type_subtypes_dynamic.dart
index 0567c06..69ae7ee 100644
--- a/pkg/front_end/testcases/inference_new/void_return_type_subtypes_dynamic.dart
+++ b/pkg/front_end/testcases/inference_new/void_return_type_subtypes_dynamic.dart
@@ -16,7 +16,6 @@
   print("running");
 }
 
-var /*@topType=void*/ y = /*info:USE_OF_VOID_RESULT*/ /*@typeArgs=void*/ run(
-    printRunning);
+var y = /*info:USE_OF_VOID_RESULT*/ /*@typeArgs=void*/ run(printRunning);
 
 main() {}
diff --git a/pkg/front_end/testcases/instantiate_to_bound/non_simple_many_libs_same_name_cycle.dart.legacy.expect b/pkg/front_end/testcases/instantiate_to_bound/non_simple_many_libs_same_name_cycle.dart.legacy.expect
index 34e8860..aa682e0 100644
--- a/pkg/front_end/testcases/instantiate_to_bound/non_simple_many_libs_same_name_cycle.dart.legacy.expect
+++ b/pkg/front_end/testcases/instantiate_to_bound/non_simple_many_libs_same_name_cycle.dart.legacy.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./non_simple_many_libs_same_name_cycle_lib.dart" as non;
+import "non_simple_many_libs_same_name_cycle_lib.dart" as non;
 import "dart:core" as core;
 
 import "org-dartlang-testcase:///non_simple_many_libs_same_name_cycle_lib.dart" as lib;
@@ -14,7 +14,7 @@
 
 library non_simple_many_libs_same_name_cycle_lib;
 import self as non;
-import "./non_simple_many_libs_same_name_cycle.dart" as self;
+import "non_simple_many_libs_same_name_cycle.dart" as self;
 import "dart:core" as core;
 
 import "org-dartlang-testcase:///non_simple_many_libs_same_name_cycle.dart" as lib;
diff --git a/pkg/front_end/testcases/instantiate_to_bound/non_simple_many_libs_same_name_cycle.dart.legacy.transformed.expect b/pkg/front_end/testcases/instantiate_to_bound/non_simple_many_libs_same_name_cycle.dart.legacy.transformed.expect
index 34e8860..aa682e0 100644
--- a/pkg/front_end/testcases/instantiate_to_bound/non_simple_many_libs_same_name_cycle.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/instantiate_to_bound/non_simple_many_libs_same_name_cycle.dart.legacy.transformed.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./non_simple_many_libs_same_name_cycle_lib.dart" as non;
+import "non_simple_many_libs_same_name_cycle_lib.dart" as non;
 import "dart:core" as core;
 
 import "org-dartlang-testcase:///non_simple_many_libs_same_name_cycle_lib.dart" as lib;
@@ -14,7 +14,7 @@
 
 library non_simple_many_libs_same_name_cycle_lib;
 import self as non;
-import "./non_simple_many_libs_same_name_cycle.dart" as self;
+import "non_simple_many_libs_same_name_cycle.dart" as self;
 import "dart:core" as core;
 
 import "org-dartlang-testcase:///non_simple_many_libs_same_name_cycle.dart" as lib;
diff --git a/pkg/front_end/testcases/instantiate_to_bound/non_simple_many_libs_same_name_cycle.dart.outline.expect b/pkg/front_end/testcases/instantiate_to_bound/non_simple_many_libs_same_name_cycle.dart.outline.expect
index 63b417d..8b8c4bb 100644
--- a/pkg/front_end/testcases/instantiate_to_bound/non_simple_many_libs_same_name_cycle.dart.outline.expect
+++ b/pkg/front_end/testcases/instantiate_to_bound/non_simple_many_libs_same_name_cycle.dart.outline.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./non_simple_many_libs_same_name_cycle_lib.dart" as non;
+import "non_simple_many_libs_same_name_cycle_lib.dart" as non;
 import "dart:core" as core;
 
 import "org-dartlang-testcase:///non_simple_many_libs_same_name_cycle_lib.dart" as lib;
@@ -14,7 +14,7 @@
 
 library non_simple_many_libs_same_name_cycle_lib;
 import self as non;
-import "./non_simple_many_libs_same_name_cycle.dart" as self;
+import "non_simple_many_libs_same_name_cycle.dart" as self;
 import "dart:core" as core;
 
 import "org-dartlang-testcase:///non_simple_many_libs_same_name_cycle.dart" as lib;
diff --git a/pkg/front_end/testcases/instantiate_to_bound/non_simple_many_libs_same_name_cycle.dart.strong.expect b/pkg/front_end/testcases/instantiate_to_bound/non_simple_many_libs_same_name_cycle.dart.strong.expect
index aa390f4..5ed003d 100644
--- a/pkg/front_end/testcases/instantiate_to_bound/non_simple_many_libs_same_name_cycle.dart.strong.expect
+++ b/pkg/front_end/testcases/instantiate_to_bound/non_simple_many_libs_same_name_cycle.dart.strong.expect
@@ -27,7 +27,7 @@
 
 library non_simple_many_libs_same_name_cycle_lib;
 import self as self2;
-import "./non_simple_many_libs_same_name_cycle.dart" as self;
+import "non_simple_many_libs_same_name_cycle.dart" as self;
 import "dart:core" as core;
 
 import "org-dartlang-testcase:///non_simple_many_libs_same_name_cycle.dart" as lib;
diff --git a/pkg/front_end/testcases/instantiate_to_bound/non_simple_many_libs_same_name_cycle.dart.strong.transformed.expect b/pkg/front_end/testcases/instantiate_to_bound/non_simple_many_libs_same_name_cycle.dart.strong.transformed.expect
index aa390f4..5ed003d 100644
--- a/pkg/front_end/testcases/instantiate_to_bound/non_simple_many_libs_same_name_cycle.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/instantiate_to_bound/non_simple_many_libs_same_name_cycle.dart.strong.transformed.expect
@@ -27,7 +27,7 @@
 
 library non_simple_many_libs_same_name_cycle_lib;
 import self as self2;
-import "./non_simple_many_libs_same_name_cycle.dart" as self;
+import "non_simple_many_libs_same_name_cycle.dart" as self;
 import "dart:core" as core;
 
 import "org-dartlang-testcase:///non_simple_many_libs_same_name_cycle.dart" as lib;
diff --git a/pkg/front_end/testcases/instantiate_to_bound/supertypes.dart.hierarchy.expect b/pkg/front_end/testcases/instantiate_to_bound/supertypes.dart.hierarchy.expect
index 1931b4d..f3dfb42 100644
--- a/pkg/front_end/testcases/instantiate_to_bound/supertypes.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/instantiate_to_bound/supertypes.dart.hierarchy.expect
@@ -146,6 +146,7 @@
   classSetters:
 
 ExpectException:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Exception
@@ -176,40 +177,6 @@
     Object.==
   interfaceSetters:
 
-NoInline:
-  superclasses:
-    Object
-  interfaces:
-  classMembers:
-    Object.toString
-    Object.runtimeType
-    Object._simpleInstanceOf
-    Object._instanceOf
-    Object.noSuchMethod
-    Object._identityHashCode
-    Object.hashCode
-    Object._simpleInstanceOfFalse
-    Object._simpleInstanceOfTrue
-    Object.==
-  classSetters:
-
-AssumeDynamic:
-  superclasses:
-    Object
-  interfaces:
-  classMembers:
-    Object.toString
-    Object.runtimeType
-    Object._simpleInstanceOf
-    Object._instanceOf
-    Object.noSuchMethod
-    Object._identityHashCode
-    Object.hashCode
-    Object._simpleInstanceOfFalse
-    Object._simpleInstanceOfTrue
-    Object.==
-  classSetters:
-
 Immutable:
   superclasses:
     Object
diff --git a/pkg/front_end/testcases/invalid_assignment.dart b/pkg/front_end/testcases/invalid_assignment.dart
index 346a87a..0c76ccc 100644
--- a/pkg/front_end/testcases/invalid_assignment.dart
+++ b/pkg/front_end/testcases/invalid_assignment.dart
@@ -2,19 +2,17 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=error*/
-
 class A {
   String operator +(int i) => '';
 }
 
 test(int i, String s, A a) {
   i = 1;
-  i = /*@error=InvalidAssignment*/ s;
+  i = s;
   i ??= 1;
-  i ??= /*@error=InvalidAssignment*/ s;
+  i ??= s;
   a = new A();
-  a /*@error=InvalidAssignment*/ += 1;
+  a += 1;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/invalid_assignment.dart.strong.expect b/pkg/front_end/testcases/invalid_assignment.dart.strong.expect
index c15f6aa..32d40adc 100644
--- a/pkg/front_end/testcases/invalid_assignment.dart.strong.expect
+++ b/pkg/front_end/testcases/invalid_assignment.dart.strong.expect
@@ -2,21 +2,21 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/invalid_assignment.dart:13:36: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/invalid_assignment.dart:11:7: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
-//   i = /*@error=InvalidAssignment*/ s;
-//                                    ^
+//   i = s;
+//       ^
 //
-// pkg/front_end/testcases/invalid_assignment.dart:15:38: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/invalid_assignment.dart:13:9: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
-//   i ??= /*@error=InvalidAssignment*/ s;
-//                                      ^
+//   i ??= s;
+//         ^
 //
-// pkg/front_end/testcases/invalid_assignment.dart:17:34: Error: A value of type 'String' can't be assigned to a variable of type 'A'.
+// pkg/front_end/testcases/invalid_assignment.dart:15:5: Error: A value of type 'String' can't be assigned to a variable of type 'A'.
 //  - 'A' is from 'pkg/front_end/testcases/invalid_assignment.dart'.
 // Try changing the type of the left hand side, or casting the right hand side to 'A'.
-//   a /*@error=InvalidAssignment*/ += 1;
-//                                  ^
+//   a += 1;
+//     ^
 //
 import self as self;
 import "dart:core" as core;
@@ -30,20 +30,20 @@
 }
 static method test(core::int i, core::String s, self::A a) → dynamic {
   i = 1;
-  i = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/invalid_assignment.dart:13:36: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+  i = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/invalid_assignment.dart:11:7: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
-  i = /*@error=InvalidAssignment*/ s;
-                                   ^" in s as{TypeError} core::int;
+  i = s;
+      ^" in s as{TypeError} core::int;
   i.{core::num::==}(null) ?{core::int} i = 1 : null;
-  i.{core::num::==}(null) ?{core::Object} i = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/invalid_assignment.dart:15:38: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+  i.{core::num::==}(null) ?{core::Object} i = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/invalid_assignment.dart:13:9: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
-  i ??= /*@error=InvalidAssignment*/ s;
-                                     ^" in s as{TypeError} core::int : null;
+  i ??= s;
+        ^" in s as{TypeError} core::int : null;
   a = new self::A::•();
-  a = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/invalid_assignment.dart:17:34: Error: A value of type 'String' can't be assigned to a variable of type 'A'.
+  a = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/invalid_assignment.dart:15:5: Error: A value of type 'String' can't be assigned to a variable of type 'A'.
  - 'A' is from 'pkg/front_end/testcases/invalid_assignment.dart'.
 Try changing the type of the left hand side, or casting the right hand side to 'A'.
-  a /*@error=InvalidAssignment*/ += 1;
-                                 ^" in a.{self::A::+}(1) as{TypeError} self::A;
+  a += 1;
+    ^" in a.{self::A::+}(1) as{TypeError} self::A;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/invalid_assignment.dart.strong.transformed.expect b/pkg/front_end/testcases/invalid_assignment.dart.strong.transformed.expect
index c15f6aa..32d40adc 100644
--- a/pkg/front_end/testcases/invalid_assignment.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/invalid_assignment.dart.strong.transformed.expect
@@ -2,21 +2,21 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/invalid_assignment.dart:13:36: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/invalid_assignment.dart:11:7: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
-//   i = /*@error=InvalidAssignment*/ s;
-//                                    ^
+//   i = s;
+//       ^
 //
-// pkg/front_end/testcases/invalid_assignment.dart:15:38: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+// pkg/front_end/testcases/invalid_assignment.dart:13:9: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 // Try changing the type of the left hand side, or casting the right hand side to 'int'.
-//   i ??= /*@error=InvalidAssignment*/ s;
-//                                      ^
+//   i ??= s;
+//         ^
 //
-// pkg/front_end/testcases/invalid_assignment.dart:17:34: Error: A value of type 'String' can't be assigned to a variable of type 'A'.
+// pkg/front_end/testcases/invalid_assignment.dart:15:5: Error: A value of type 'String' can't be assigned to a variable of type 'A'.
 //  - 'A' is from 'pkg/front_end/testcases/invalid_assignment.dart'.
 // Try changing the type of the left hand side, or casting the right hand side to 'A'.
-//   a /*@error=InvalidAssignment*/ += 1;
-//                                  ^
+//   a += 1;
+//     ^
 //
 import self as self;
 import "dart:core" as core;
@@ -30,20 +30,20 @@
 }
 static method test(core::int i, core::String s, self::A a) → dynamic {
   i = 1;
-  i = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/invalid_assignment.dart:13:36: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+  i = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/invalid_assignment.dart:11:7: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
-  i = /*@error=InvalidAssignment*/ s;
-                                   ^" in s as{TypeError} core::int;
+  i = s;
+      ^" in s as{TypeError} core::int;
   i.{core::num::==}(null) ?{core::int} i = 1 : null;
-  i.{core::num::==}(null) ?{core::Object} i = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/invalid_assignment.dart:15:38: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
+  i.{core::num::==}(null) ?{core::Object} i = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/invalid_assignment.dart:13:9: Error: A value of type 'String' can't be assigned to a variable of type 'int'.
 Try changing the type of the left hand side, or casting the right hand side to 'int'.
-  i ??= /*@error=InvalidAssignment*/ s;
-                                     ^" in s as{TypeError} core::int : null;
+  i ??= s;
+        ^" in s as{TypeError} core::int : null;
   a = new self::A::•();
-  a = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/invalid_assignment.dart:17:34: Error: A value of type 'String' can't be assigned to a variable of type 'A'.
+  a = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/invalid_assignment.dart:15:5: Error: A value of type 'String' can't be assigned to a variable of type 'A'.
  - 'A' is from 'pkg/front_end/testcases/invalid_assignment.dart'.
 Try changing the type of the left hand side, or casting the right hand side to 'A'.
-  a /*@error=InvalidAssignment*/ += 1;
-                                 ^" in a.{self::A::+}(1) as{TypeError} self::A;
+  a += 1;
+    ^" in a.{self::A::+}(1) as{TypeError} self::A;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/invalid_assignment.dart.type_promotion.expect b/pkg/front_end/testcases/invalid_assignment.dart.type_promotion.expect
index abff5c0e..a7b9f5a 100644
--- a/pkg/front_end/testcases/invalid_assignment.dart.type_promotion.expect
+++ b/pkg/front_end/testcases/invalid_assignment.dart.type_promotion.expect
@@ -1,18 +1,18 @@
-pkg/front_end/testcases/invalid_assignment.dart:12:5: Context: Write to i@300
+pkg/front_end/testcases/invalid_assignment.dart:10:5: Context: Write to i@273
   i = 1;
     ^
-pkg/front_end/testcases/invalid_assignment.dart:13:5: Context: Write to i@300
-  i = /*@error=InvalidAssignment*/ s;
+pkg/front_end/testcases/invalid_assignment.dart:11:5: Context: Write to i@273
+  i = s;
     ^
-pkg/front_end/testcases/invalid_assignment.dart:14:5: Context: Write to i@300
+pkg/front_end/testcases/invalid_assignment.dart:12:5: Context: Write to i@273
   i ??= 1;
     ^^^
-pkg/front_end/testcases/invalid_assignment.dart:15:5: Context: Write to i@300
-  i ??= /*@error=InvalidAssignment*/ s;
+pkg/front_end/testcases/invalid_assignment.dart:13:5: Context: Write to i@273
+  i ??= s;
     ^^^
-pkg/front_end/testcases/invalid_assignment.dart:16:5: Context: Write to a@315
+pkg/front_end/testcases/invalid_assignment.dart:14:5: Context: Write to a@288
   a = new A();
     ^
-pkg/front_end/testcases/invalid_assignment.dart:17:34: Context: Write to a@315
-  a /*@error=InvalidAssignment*/ += 1;
-                                 ^^
+pkg/front_end/testcases/invalid_assignment.dart:15:5: Context: Write to a@288
+  a += 1;
+    ^^
diff --git a/pkg/front_end/testcases/invalid_cast.dart b/pkg/front_end/testcases/invalid_cast.dart
index 9baaf86..105b26b 100644
--- a/pkg/front_end/testcases/invalid_cast.dart
+++ b/pkg/front_end/testcases/invalid_cast.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.
 
-/*@testedFeatures=error*/
-
 class C {
   C();
   factory C.fact() => null;
@@ -19,19 +17,17 @@
 
 bad() {
   void localFunction(int i) {}
-  List<int> a = <Object> /*@error=InvalidCastLiteralList*/ [];
-  Map<int, String> b = <Object, String> /*@error=InvalidCastLiteralMap*/ {};
-  Map<int, String> c = <int, Object> /*@error=InvalidCastLiteralMap*/ {};
-  int Function(Object) d = /*@error=InvalidCastFunctionExpr*/ (int i) => i;
+  List<int> a = <Object>[];
+  Map<int, String> b = <Object, String>{};
+  Map<int, String> c = <int, Object>{};
+  int Function(Object) d = (int i) => i;
   D e = new C.fact();
   D f = new C.fact2();
-  D g = new /*@error=InvalidCastNewExpr*/ C.nonFact();
-  D h = new /*@error=InvalidCastNewExpr*/ C.nonFact2();
-  void Function(Object) i =
-      C. /*@error=InvalidCastStaticMethod*/ staticFunction;
-  void Function(Object)
-      j = /*@error=InvalidCastTopLevelFunction*/ topLevelFunction;
-  void Function(Object) k = /*@error=InvalidCastLocalFunction*/ localFunction;
+  D g = new C.nonFact();
+  D h = new C.nonFact2();
+  void Function(Object) i = C.staticFunction;
+  void Function(Object) j = topLevelFunction;
+  void Function(Object) k = localFunction;
 }
 
 ok() {
diff --git a/pkg/front_end/testcases/invalid_cast.dart.strong.expect b/pkg/front_end/testcases/invalid_cast.dart.strong.expect
index 254485f..f9329e5 100644
--- a/pkg/front_end/testcases/invalid_cast.dart.strong.expect
+++ b/pkg/front_end/testcases/invalid_cast.dart.strong.expect
@@ -2,64 +2,64 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/invalid_cast.dart:22:60: Error: The list literal type 'List<Object>' isn't of expected type 'List<int>'.
+// pkg/front_end/testcases/invalid_cast.dart:20:25: Error: The list literal type 'List<Object>' isn't of expected type 'List<int>'.
 //  - 'List' is from 'dart:core'.
 //  - 'Object' is from 'dart:core'.
 // Change the type of the list literal or the context in which it is used.
-//   List<int> a = <Object> /*@error=InvalidCastLiteralList*/ [];
-//                                                            ^
+//   List<int> a = <Object>[];
+//                         ^
 //
-// pkg/front_end/testcases/invalid_cast.dart:23:74: Error: The map literal type 'Map<Object, String>' isn't of expected type 'Map<int, String>'.
+// pkg/front_end/testcases/invalid_cast.dart:21:40: Error: The map literal type 'Map<Object, String>' isn't of expected type 'Map<int, String>'.
 //  - 'Map' is from 'dart:core'.
 //  - 'Object' is from 'dart:core'.
 // Change the type of the map literal or the context in which it is used.
-//   Map<int, String> b = <Object, String> /*@error=InvalidCastLiteralMap*/ {};
-//                                                                          ^
+//   Map<int, String> b = <Object, String>{};
+//                                        ^
 //
-// pkg/front_end/testcases/invalid_cast.dart:24:71: Error: The map literal type 'Map<int, Object>' isn't of expected type 'Map<int, String>'.
+// pkg/front_end/testcases/invalid_cast.dart:22:37: Error: The map literal type 'Map<int, Object>' isn't of expected type 'Map<int, String>'.
 //  - 'Map' is from 'dart:core'.
 //  - 'Object' is from 'dart:core'.
 // Change the type of the map literal or the context in which it is used.
-//   Map<int, String> c = <int, Object> /*@error=InvalidCastLiteralMap*/ {};
-//                                                                       ^
+//   Map<int, String> c = <int, Object>{};
+//                                     ^
 //
-// pkg/front_end/testcases/invalid_cast.dart:25:63: Error: The function expression type 'int Function(int)' isn't of expected type 'int Function(Object)'.
+// pkg/front_end/testcases/invalid_cast.dart:23:28: Error: The function expression type 'int Function(int)' isn't of expected type 'int Function(Object)'.
 //  - 'Object' is from 'dart:core'.
 // Change the type of the function expression or the context in which it is used.
-//   int Function(Object) d = /*@error=InvalidCastFunctionExpr*/ (int i) => i;
-//                                                               ^
+//   int Function(Object) d = (int i) => i;
+//                            ^
 //
-// pkg/front_end/testcases/invalid_cast.dart:28:43: Error: The constructor returns type 'C' that isn't of expected type 'D'.
+// pkg/front_end/testcases/invalid_cast.dart:26:13: Error: The constructor returns type 'C' that isn't of expected type 'D'.
 //  - 'C' is from 'pkg/front_end/testcases/invalid_cast.dart'.
 //  - 'D' is from 'pkg/front_end/testcases/invalid_cast.dart'.
 // Change the type of the object being constructed or the context in which it is used.
-//   D g = new /*@error=InvalidCastNewExpr*/ C.nonFact();
-//                                           ^
+//   D g = new C.nonFact();
+//             ^
 //
-// pkg/front_end/testcases/invalid_cast.dart:29:43: Error: The constructor returns type 'C' that isn't of expected type 'D'.
+// pkg/front_end/testcases/invalid_cast.dart:27:13: Error: The constructor returns type 'C' that isn't of expected type 'D'.
 //  - 'C' is from 'pkg/front_end/testcases/invalid_cast.dart'.
 //  - 'D' is from 'pkg/front_end/testcases/invalid_cast.dart'.
 // Change the type of the object being constructed or the context in which it is used.
-//   D h = new /*@error=InvalidCastNewExpr*/ C.nonFact2();
-//                                           ^
+//   D h = new C.nonFact2();
+//             ^
 //
-// pkg/front_end/testcases/invalid_cast.dart:31:45: Error: The static method has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
+// pkg/front_end/testcases/invalid_cast.dart:28:31: Error: The static method has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
 //  - 'Object' is from 'dart:core'.
 // Change the type of the method or the context in which it is used.
-//       C. /*@error=InvalidCastStaticMethod*/ staticFunction;
-//                                             ^
+//   void Function(Object) i = C.staticFunction;
+//                               ^
 //
-// pkg/front_end/testcases/invalid_cast.dart:33:50: Error: The top level function has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
+// pkg/front_end/testcases/invalid_cast.dart:29:29: Error: The top level function has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
 //  - 'Object' is from 'dart:core'.
 // Change the type of the function or the context in which it is used.
-//       j = /*@error=InvalidCastTopLevelFunction*/ topLevelFunction;
-//                                                  ^
+//   void Function(Object) j = topLevelFunction;
+//                             ^
 //
-// pkg/front_end/testcases/invalid_cast.dart:34:65: Error: The local function has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
+// pkg/front_end/testcases/invalid_cast.dart:30:29: Error: The local function has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
 //  - 'Object' is from 'dart:core'.
 // Change the type of the function or the context in which it is used.
-//   void Function(Object) k = /*@error=InvalidCastLocalFunction*/ localFunction;
-//                                                                 ^
+//   void Function(Object) k = localFunction;
+//                             ^
 //
 import self as self;
 import "dart:core" as core;
@@ -89,58 +89,58 @@
 static method topLevelFunction(core::int i) → void {}
 static method bad() → dynamic {
   function localFunction(core::int i) → void {}
-  core::List<core::int> a = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:22:60: Error: The list literal type 'List<Object>' isn't of expected type 'List<int>'.
+  core::List<core::int> a = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:20:25: Error: The list literal type 'List<Object>' isn't of expected type 'List<int>'.
  - 'List' is from 'dart:core'.
  - 'Object' is from 'dart:core'.
 Change the type of the list literal or the context in which it is used.
-  List<int> a = <Object> /*@error=InvalidCastLiteralList*/ [];
-                                                           ^" in <core::Object>[];
-  core::Map<core::int, core::String> b = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:23:74: Error: The map literal type 'Map<Object, String>' isn't of expected type 'Map<int, String>'.
+  List<int> a = <Object>[];
+                        ^" in <core::Object>[];
+  core::Map<core::int, core::String> b = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:21:40: Error: The map literal type 'Map<Object, String>' isn't of expected type 'Map<int, String>'.
  - 'Map' is from 'dart:core'.
  - 'Object' is from 'dart:core'.
 Change the type of the map literal or the context in which it is used.
-  Map<int, String> b = <Object, String> /*@error=InvalidCastLiteralMap*/ {};
-                                                                         ^" in <core::Object, core::String>{};
-  core::Map<core::int, core::String> c = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:24:71: Error: The map literal type 'Map<int, Object>' isn't of expected type 'Map<int, String>'.
+  Map<int, String> b = <Object, String>{};
+                                       ^" in <core::Object, core::String>{};
+  core::Map<core::int, core::String> c = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:22:37: Error: The map literal type 'Map<int, Object>' isn't of expected type 'Map<int, String>'.
  - 'Map' is from 'dart:core'.
  - 'Object' is from 'dart:core'.
 Change the type of the map literal or the context in which it is used.
-  Map<int, String> c = <int, Object> /*@error=InvalidCastLiteralMap*/ {};
-                                                                      ^" in <core::int, core::Object>{};
-  (core::Object) → core::int d = let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:25:63: Error: The function expression type 'int Function(int)' isn't of expected type 'int Function(Object)'.
+  Map<int, String> c = <int, Object>{};
+                                    ^" in <core::int, core::Object>{};
+  (core::Object) → core::int d = let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:23:28: Error: The function expression type 'int Function(int)' isn't of expected type 'int Function(Object)'.
  - 'Object' is from 'dart:core'.
 Change the type of the function expression or the context in which it is used.
-  int Function(Object) d = /*@error=InvalidCastFunctionExpr*/ (int i) => i;
-                                                              ^" in (core::int i) → core::int => i;
+  int Function(Object) d = (int i) => i;
+                           ^" in (core::int i) → core::int => i;
   self::D e = self::C::fact() as{TypeError} self::D;
   self::D f = new self::D::•() as{TypeError} self::D;
-  self::D g = let final<BottomType> #t5 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:28:43: Error: The constructor returns type 'C' that isn't of expected type 'D'.
+  self::D g = let final<BottomType> #t5 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:26:13: Error: The constructor returns type 'C' that isn't of expected type 'D'.
  - 'C' is from 'pkg/front_end/testcases/invalid_cast.dart'.
  - 'D' is from 'pkg/front_end/testcases/invalid_cast.dart'.
 Change the type of the object being constructed or the context in which it is used.
-  D g = new /*@error=InvalidCastNewExpr*/ C.nonFact();
-                                          ^" in new self::C::nonFact();
-  self::D h = let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:29:43: Error: The constructor returns type 'C' that isn't of expected type 'D'.
+  D g = new C.nonFact();
+            ^" in new self::C::nonFact();
+  self::D h = let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:27:13: Error: The constructor returns type 'C' that isn't of expected type 'D'.
  - 'C' is from 'pkg/front_end/testcases/invalid_cast.dart'.
  - 'D' is from 'pkg/front_end/testcases/invalid_cast.dart'.
 Change the type of the object being constructed or the context in which it is used.
-  D h = new /*@error=InvalidCastNewExpr*/ C.nonFact2();
-                                          ^" in new self::C::nonFact2();
-  (core::Object) → void i = let final<BottomType> #t7 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:31:45: Error: The static method has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
+  D h = new C.nonFact2();
+            ^" in new self::C::nonFact2();
+  (core::Object) → void i = let final<BottomType> #t7 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:28:31: Error: The static method has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
  - 'Object' is from 'dart:core'.
 Change the type of the method or the context in which it is used.
-      C. /*@error=InvalidCastStaticMethod*/ staticFunction;
-                                            ^" in self::C::staticFunction;
-  (core::Object) → void j = let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:33:50: Error: The top level function has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
+  void Function(Object) i = C.staticFunction;
+                              ^" in self::C::staticFunction;
+  (core::Object) → void j = let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:29:29: Error: The top level function has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
  - 'Object' is from 'dart:core'.
 Change the type of the function or the context in which it is used.
-      j = /*@error=InvalidCastTopLevelFunction*/ topLevelFunction;
-                                                 ^" in self::topLevelFunction;
-  (core::Object) → void k = let final<BottomType> #t9 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:34:65: Error: The local function has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
+  void Function(Object) j = topLevelFunction;
+                            ^" in self::topLevelFunction;
+  (core::Object) → void k = let final<BottomType> #t9 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:30:29: Error: The local function has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
  - 'Object' is from 'dart:core'.
 Change the type of the function or the context in which it is used.
-  void Function(Object) k = /*@error=InvalidCastLocalFunction*/ localFunction;
-                                                                ^" in localFunction;
+  void Function(Object) k = localFunction;
+                            ^" in localFunction;
 }
 static method ok() → dynamic {
   function localFunction(core::int i) → void {}
diff --git a/pkg/front_end/testcases/invalid_cast.dart.strong.transformed.expect b/pkg/front_end/testcases/invalid_cast.dart.strong.transformed.expect
index a04133c..6e9e1eb 100644
--- a/pkg/front_end/testcases/invalid_cast.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/invalid_cast.dart.strong.transformed.expect
@@ -2,64 +2,64 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/invalid_cast.dart:22:60: Error: The list literal type 'List<Object>' isn't of expected type 'List<int>'.
+// pkg/front_end/testcases/invalid_cast.dart:20:25: Error: The list literal type 'List<Object>' isn't of expected type 'List<int>'.
 //  - 'List' is from 'dart:core'.
 //  - 'Object' is from 'dart:core'.
 // Change the type of the list literal or the context in which it is used.
-//   List<int> a = <Object> /*@error=InvalidCastLiteralList*/ [];
-//                                                            ^
+//   List<int> a = <Object>[];
+//                         ^
 //
-// pkg/front_end/testcases/invalid_cast.dart:23:74: Error: The map literal type 'Map<Object, String>' isn't of expected type 'Map<int, String>'.
+// pkg/front_end/testcases/invalid_cast.dart:21:40: Error: The map literal type 'Map<Object, String>' isn't of expected type 'Map<int, String>'.
 //  - 'Map' is from 'dart:core'.
 //  - 'Object' is from 'dart:core'.
 // Change the type of the map literal or the context in which it is used.
-//   Map<int, String> b = <Object, String> /*@error=InvalidCastLiteralMap*/ {};
-//                                                                          ^
+//   Map<int, String> b = <Object, String>{};
+//                                        ^
 //
-// pkg/front_end/testcases/invalid_cast.dart:24:71: Error: The map literal type 'Map<int, Object>' isn't of expected type 'Map<int, String>'.
+// pkg/front_end/testcases/invalid_cast.dart:22:37: Error: The map literal type 'Map<int, Object>' isn't of expected type 'Map<int, String>'.
 //  - 'Map' is from 'dart:core'.
 //  - 'Object' is from 'dart:core'.
 // Change the type of the map literal or the context in which it is used.
-//   Map<int, String> c = <int, Object> /*@error=InvalidCastLiteralMap*/ {};
-//                                                                       ^
+//   Map<int, String> c = <int, Object>{};
+//                                     ^
 //
-// pkg/front_end/testcases/invalid_cast.dart:25:63: Error: The function expression type 'int Function(int)' isn't of expected type 'int Function(Object)'.
+// pkg/front_end/testcases/invalid_cast.dart:23:28: Error: The function expression type 'int Function(int)' isn't of expected type 'int Function(Object)'.
 //  - 'Object' is from 'dart:core'.
 // Change the type of the function expression or the context in which it is used.
-//   int Function(Object) d = /*@error=InvalidCastFunctionExpr*/ (int i) => i;
-//                                                               ^
+//   int Function(Object) d = (int i) => i;
+//                            ^
 //
-// pkg/front_end/testcases/invalid_cast.dart:28:43: Error: The constructor returns type 'C' that isn't of expected type 'D'.
+// pkg/front_end/testcases/invalid_cast.dart:26:13: Error: The constructor returns type 'C' that isn't of expected type 'D'.
 //  - 'C' is from 'pkg/front_end/testcases/invalid_cast.dart'.
 //  - 'D' is from 'pkg/front_end/testcases/invalid_cast.dart'.
 // Change the type of the object being constructed or the context in which it is used.
-//   D g = new /*@error=InvalidCastNewExpr*/ C.nonFact();
-//                                           ^
+//   D g = new C.nonFact();
+//             ^
 //
-// pkg/front_end/testcases/invalid_cast.dart:29:43: Error: The constructor returns type 'C' that isn't of expected type 'D'.
+// pkg/front_end/testcases/invalid_cast.dart:27:13: Error: The constructor returns type 'C' that isn't of expected type 'D'.
 //  - 'C' is from 'pkg/front_end/testcases/invalid_cast.dart'.
 //  - 'D' is from 'pkg/front_end/testcases/invalid_cast.dart'.
 // Change the type of the object being constructed or the context in which it is used.
-//   D h = new /*@error=InvalidCastNewExpr*/ C.nonFact2();
-//                                           ^
+//   D h = new C.nonFact2();
+//             ^
 //
-// pkg/front_end/testcases/invalid_cast.dart:31:45: Error: The static method has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
+// pkg/front_end/testcases/invalid_cast.dart:28:31: Error: The static method has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
 //  - 'Object' is from 'dart:core'.
 // Change the type of the method or the context in which it is used.
-//       C. /*@error=InvalidCastStaticMethod*/ staticFunction;
-//                                             ^
+//   void Function(Object) i = C.staticFunction;
+//                               ^
 //
-// pkg/front_end/testcases/invalid_cast.dart:33:50: Error: The top level function has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
+// pkg/front_end/testcases/invalid_cast.dart:29:29: Error: The top level function has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
 //  - 'Object' is from 'dart:core'.
 // Change the type of the function or the context in which it is used.
-//       j = /*@error=InvalidCastTopLevelFunction*/ topLevelFunction;
-//                                                  ^
+//   void Function(Object) j = topLevelFunction;
+//                             ^
 //
-// pkg/front_end/testcases/invalid_cast.dart:34:65: Error: The local function has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
+// pkg/front_end/testcases/invalid_cast.dart:30:29: Error: The local function has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
 //  - 'Object' is from 'dart:core'.
 // Change the type of the function or the context in which it is used.
-//   void Function(Object) k = /*@error=InvalidCastLocalFunction*/ localFunction;
-//                                                                 ^
+//   void Function(Object) k = localFunction;
+//                             ^
 //
 import self as self;
 import "dart:core" as core;
@@ -89,58 +89,58 @@
 static method topLevelFunction(core::int i) → void {}
 static method bad() → dynamic {
   function localFunction(core::int i) → void {}
-  core::List<core::int> a = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:22:60: Error: The list literal type 'List<Object>' isn't of expected type 'List<int>'.
+  core::List<core::int> a = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:20:25: Error: The list literal type 'List<Object>' isn't of expected type 'List<int>'.
  - 'List' is from 'dart:core'.
  - 'Object' is from 'dart:core'.
 Change the type of the list literal or the context in which it is used.
-  List<int> a = <Object> /*@error=InvalidCastLiteralList*/ [];
-                                                           ^" in <core::Object>[];
-  core::Map<core::int, core::String> b = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:23:74: Error: The map literal type 'Map<Object, String>' isn't of expected type 'Map<int, String>'.
+  List<int> a = <Object>[];
+                        ^" in <core::Object>[];
+  core::Map<core::int, core::String> b = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:21:40: Error: The map literal type 'Map<Object, String>' isn't of expected type 'Map<int, String>'.
  - 'Map' is from 'dart:core'.
  - 'Object' is from 'dart:core'.
 Change the type of the map literal or the context in which it is used.
-  Map<int, String> b = <Object, String> /*@error=InvalidCastLiteralMap*/ {};
-                                                                         ^" in <core::Object, core::String>{};
-  core::Map<core::int, core::String> c = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:24:71: Error: The map literal type 'Map<int, Object>' isn't of expected type 'Map<int, String>'.
+  Map<int, String> b = <Object, String>{};
+                                       ^" in <core::Object, core::String>{};
+  core::Map<core::int, core::String> c = let final<BottomType> #t3 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:22:37: Error: The map literal type 'Map<int, Object>' isn't of expected type 'Map<int, String>'.
  - 'Map' is from 'dart:core'.
  - 'Object' is from 'dart:core'.
 Change the type of the map literal or the context in which it is used.
-  Map<int, String> c = <int, Object> /*@error=InvalidCastLiteralMap*/ {};
-                                                                      ^" in <core::int, core::Object>{};
-  (core::Object) → core::int d = let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:25:63: Error: The function expression type 'int Function(int)' isn't of expected type 'int Function(Object)'.
+  Map<int, String> c = <int, Object>{};
+                                    ^" in <core::int, core::Object>{};
+  (core::Object) → core::int d = let final<BottomType> #t4 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:23:28: Error: The function expression type 'int Function(int)' isn't of expected type 'int Function(Object)'.
  - 'Object' is from 'dart:core'.
 Change the type of the function expression or the context in which it is used.
-  int Function(Object) d = /*@error=InvalidCastFunctionExpr*/ (int i) => i;
-                                                              ^" in (core::int i) → core::int => i;
+  int Function(Object) d = (int i) => i;
+                           ^" in (core::int i) → core::int => i;
   self::D e = self::C::fact() as{TypeError} self::D;
   self::D f = new self::D::•() as{TypeError} self::D;
-  self::D g = let final<BottomType> #t5 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:28:43: Error: The constructor returns type 'C' that isn't of expected type 'D'.
+  self::D g = let final<BottomType> #t5 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:26:13: Error: The constructor returns type 'C' that isn't of expected type 'D'.
  - 'C' is from 'pkg/front_end/testcases/invalid_cast.dart'.
  - 'D' is from 'pkg/front_end/testcases/invalid_cast.dart'.
 Change the type of the object being constructed or the context in which it is used.
-  D g = new /*@error=InvalidCastNewExpr*/ C.nonFact();
-                                          ^" in new self::C::nonFact();
-  self::D h = let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:29:43: Error: The constructor returns type 'C' that isn't of expected type 'D'.
+  D g = new C.nonFact();
+            ^" in new self::C::nonFact();
+  self::D h = let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:27:13: Error: The constructor returns type 'C' that isn't of expected type 'D'.
  - 'C' is from 'pkg/front_end/testcases/invalid_cast.dart'.
  - 'D' is from 'pkg/front_end/testcases/invalid_cast.dart'.
 Change the type of the object being constructed or the context in which it is used.
-  D h = new /*@error=InvalidCastNewExpr*/ C.nonFact2();
-                                          ^" in new self::C::nonFact2();
-  (core::Object) → void i = let final<BottomType> #t7 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:31:45: Error: The static method has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
+  D h = new C.nonFact2();
+            ^" in new self::C::nonFact2();
+  (core::Object) → void i = let final<BottomType> #t7 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:28:31: Error: The static method has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
  - 'Object' is from 'dart:core'.
 Change the type of the method or the context in which it is used.
-      C. /*@error=InvalidCastStaticMethod*/ staticFunction;
-                                            ^" in self::C::staticFunction;
-  (core::Object) → void j = let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:33:50: Error: The top level function has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
+  void Function(Object) i = C.staticFunction;
+                              ^" in self::C::staticFunction;
+  (core::Object) → void j = let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:29:29: Error: The top level function has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
  - 'Object' is from 'dart:core'.
 Change the type of the function or the context in which it is used.
-      j = /*@error=InvalidCastTopLevelFunction*/ topLevelFunction;
-                                                 ^" in self::topLevelFunction;
-  (core::Object) → void k = let final<BottomType> #t9 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:34:65: Error: The local function has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
+  void Function(Object) j = topLevelFunction;
+                            ^" in self::topLevelFunction;
+  (core::Object) → void k = let final<BottomType> #t9 = invalid-expression "pkg/front_end/testcases/invalid_cast.dart:30:29: Error: The local function has type 'void Function(int)' that isn't of expected type 'void Function(Object)'.
  - 'Object' is from 'dart:core'.
 Change the type of the function or the context in which it is used.
-  void Function(Object) k = /*@error=InvalidCastLocalFunction*/ localFunction;
-                                                                ^" in localFunction;
+  void Function(Object) k = localFunction;
+                            ^" in localFunction;
 }
 static method ok() → dynamic {
   function localFunction(core::int i) → void {}
diff --git a/pkg/front_end/testcases/issue34899.dart.legacy.expect b/pkg/front_end/testcases/issue34899.dart.legacy.expect
index 41128df..e7b5b76 100644
--- a/pkg/front_end/testcases/issue34899.dart.legacy.expect
+++ b/pkg/front_end/testcases/issue34899.dart.legacy.expect
@@ -5,7 +5,7 @@
 
 class Foo<T extends core::Object = dynamic> extends core::Object {
   final field () → asy::Future<dynamic> quux;
-  field self::Foo::T t;
+  generic-covariant-impl field self::Foo::T t;
   constructor •(() → asy::Future<dynamic> quux, self::Foo::T t) → self::Foo<self::Foo::T>
     : self::Foo::quux = quux, self::Foo::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/issue34899.dart.legacy.transformed.expect b/pkg/front_end/testcases/issue34899.dart.legacy.transformed.expect
index 41128df..e7b5b76 100644
--- a/pkg/front_end/testcases/issue34899.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/issue34899.dart.legacy.transformed.expect
@@ -5,7 +5,7 @@
 
 class Foo<T extends core::Object = dynamic> extends core::Object {
   final field () → asy::Future<dynamic> quux;
-  field self::Foo::T t;
+  generic-covariant-impl field self::Foo::T t;
   constructor •(() → asy::Future<dynamic> quux, self::Foo::T t) → self::Foo<self::Foo::T>
     : self::Foo::quux = quux, self::Foo::t = t, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/issue34899.dart.outline.expect b/pkg/front_end/testcases/issue34899.dart.outline.expect
index 1d77be0..48da0fa 100644
--- a/pkg/front_end/testcases/issue34899.dart.outline.expect
+++ b/pkg/front_end/testcases/issue34899.dart.outline.expect
@@ -5,7 +5,7 @@
 
 class Foo<T extends core::Object = dynamic> extends core::Object {
   final field () → asy::Future<dynamic> quux;
-  field self::Foo::T t;
+  generic-covariant-impl field self::Foo::T t;
   constructor •(() → asy::Future<dynamic> quux, self::Foo::T t) → self::Foo<self::Foo::T>
     ;
   method call() → asy::Future<self::Foo::T>
diff --git a/pkg/front_end/testcases/legacy.status b/pkg/front_end/testcases/legacy.status
index 686bf31..7fadc91 100644
--- a/pkg/front_end/testcases/legacy.status
+++ b/pkg/front_end/testcases/legacy.status
@@ -11,6 +11,7 @@
 call: Fail # Test can't run.
 constructor_const_inference: RuntimeError # Test exercises strong mode semantics.  See also Issue #33813.
 constructor_initializer_invalid: RuntimeError # Fails execution after recovery
+control_flow_collection: RuntimeError
 duplicated_field_initializer: RuntimeError
 external_import: RuntimeError # Expected -- test uses import which doesn't exist.
 fallthrough: Fail # Missing FallThroughError.
@@ -35,6 +36,7 @@
 micro: Fail # External method marked abstract.
 minimum_int: Crash # Min int literal not supported in non-strong mode.
 named_parameters: Fail # Missing types and unnecessary default values.
+operator_method_not_found: RuntimeError # Expected
 optional: Fail # Unnecessary default values.
 rasta/abstract_constructor: Fail
 rasta/bad_constructor_redirection: Fail
@@ -42,7 +44,7 @@
 rasta/bad_default_constructor: Fail # Compile-time error destroys program.
 rasta/bad_explicit_super_constructor: RuntimeError
 rasta/bad_implicit_super_constructor: RuntimeError
-rasta/bad_interpolation: Fail
+rasta/bad_interpolation: RuntimeError
 rasta/bad_redirection: Fail
 rasta/bad_setter_initializer: RuntimeError
 rasta/bad_unicode: Fail
@@ -68,7 +70,6 @@
 rasta/issue_000042: Fail
 rasta/issue_000043: Fail
 rasta/issue_000044: Fail
-rasta/issue_000045: Fail
 rasta/issue_000046: RuntimeError
 rasta/issue_000047: Fail
 rasta/issue_000081: Fail
@@ -112,6 +113,7 @@
 regress/issue_35259: RuntimeError # Expected
 regress/issue_35260: RuntimeError # Expected
 regress/issue_35266: RuntimeError # Expected
+regress/issue_36400: RuntimeError
 reject_generic_function_types_in_bounds: RuntimeError # Expected
 runtime_checks/implicit_downcast_constructor_initializer: RuntimeError # Test exercises strong mode semantics
 runtime_checks/implicit_downcast_do: RuntimeError # Test exercises strong mode semantics
diff --git a/pkg/front_end/testcases/magic_const.dart.legacy.expect b/pkg/front_end/testcases/magic_const.dart.legacy.expect
index 78ce95a..3b3544f 100644
--- a/pkg/front_end/testcases/magic_const.dart.legacy.expect
+++ b/pkg/front_end/testcases/magic_const.dart.legacy.expect
@@ -20,7 +20,7 @@
     : super core::Object::•()
     ;
 }
-static method foo({dynamic a = new self::Constant::•(), dynamic b = new self::Constant::•(), dynamic c = <dynamic>[]}) → dynamic {}
+static method foo({dynamic a = const self::Constant::•(), dynamic b = const self::Constant::•(), dynamic c = <dynamic>[]}) → dynamic {}
 static method test() → dynamic {
   invalid-expression "pkg/front_end/testcases/magic_const.dart:18:9: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
 Try using a constructor or factory that is 'const'.
diff --git a/pkg/front_end/testcases/magic_const.dart.legacy.transformed.expect b/pkg/front_end/testcases/magic_const.dart.legacy.transformed.expect
index 78ce95a..3b3544f 100644
--- a/pkg/front_end/testcases/magic_const.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/magic_const.dart.legacy.transformed.expect
@@ -20,7 +20,7 @@
     : super core::Object::•()
     ;
 }
-static method foo({dynamic a = new self::Constant::•(), dynamic b = new self::Constant::•(), dynamic c = <dynamic>[]}) → dynamic {}
+static method foo({dynamic a = const self::Constant::•(), dynamic b = const self::Constant::•(), dynamic c = <dynamic>[]}) → dynamic {}
 static method test() → dynamic {
   invalid-expression "pkg/front_end/testcases/magic_const.dart:18:9: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
 Try using a constructor or factory that is 'const'.
diff --git a/pkg/front_end/testcases/magic_const.dart.strong.expect b/pkg/front_end/testcases/magic_const.dart.strong.expect
index e5aa39c..8bd3e19 100644
--- a/pkg/front_end/testcases/magic_const.dart.strong.expect
+++ b/pkg/front_end/testcases/magic_const.dart.strong.expect
@@ -20,7 +20,7 @@
     : super core::Object::•()
     ;
 }
-static method foo({dynamic a = new self::Constant::•(), dynamic b = new self::Constant::•(), dynamic c = <dynamic>[]}) → dynamic {}
+static method foo({dynamic a = const self::Constant::•(), dynamic b = const self::Constant::•(), dynamic c = <dynamic>[]}) → dynamic {}
 static method test() → dynamic {
   invalid-expression "pkg/front_end/testcases/magic_const.dart:18:9: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
 Try using a constructor or factory that is 'const'.
diff --git a/pkg/front_end/testcases/magic_const.dart.strong.transformed.expect b/pkg/front_end/testcases/magic_const.dart.strong.transformed.expect
index e5aa39c..8bd3e19 100644
--- a/pkg/front_end/testcases/magic_const.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/magic_const.dart.strong.transformed.expect
@@ -20,7 +20,7 @@
     : super core::Object::•()
     ;
 }
-static method foo({dynamic a = new self::Constant::•(), dynamic b = new self::Constant::•(), dynamic c = <dynamic>[]}) → dynamic {}
+static method foo({dynamic a = const self::Constant::•(), dynamic b = const self::Constant::•(), dynamic c = <dynamic>[]}) → dynamic {}
 static method test() → dynamic {
   invalid-expression "pkg/front_end/testcases/magic_const.dart:18:9: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
 Try using a constructor or factory that is 'const'.
diff --git a/pkg/front_end/testcases/mixin.dart.hierarchy.expect b/pkg/front_end/testcases/mixin.dart.hierarchy.expect
index a86326c..7b25a03 100644
--- a/pkg/front_end/testcases/mixin.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/mixin.dart.hierarchy.expect
@@ -55,6 +55,7 @@
   classSetters:
 
 Object with M1:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: M1
@@ -86,6 +87,7 @@
   interfaceSetters:
 
 _C&Object&M1 with M2:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _C&Object&M1
@@ -118,6 +120,7 @@
   interfaceSetters:
 
 C:
+  Longest path to Object: 4
   superclasses:
     Object
       -> _C&Object&M1
@@ -169,6 +172,7 @@
   classSetters:
 
 Object with G1<S>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: G1<S>
@@ -200,6 +204,7 @@
   interfaceSetters:
 
 D:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _D&Object&G1<S>
@@ -232,6 +237,7 @@
   interfaceSetters:
 
 Object with M1:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: M1
@@ -263,6 +269,7 @@
   interfaceSetters:
 
 _B&Object&M1 with M2:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _B&Object&M1
@@ -295,6 +302,7 @@
   interfaceSetters:
 
 B:
+  Longest path to Object: 4
   superclasses:
     Object
       -> _B&Object&M1
diff --git a/pkg/front_end/testcases/mixin_conflicts.dart.hierarchy.expect b/pkg/front_end/testcases/mixin_conflicts.dart.hierarchy.expect
index d311de4..8999f35 100644
--- a/pkg/front_end/testcases/mixin_conflicts.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/mixin_conflicts.dart.hierarchy.expect
@@ -37,6 +37,7 @@
   classSetters:
 
 N:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: M
@@ -68,6 +69,7 @@
   interfaceSetters:
 
 Object with N:
+  Longest path to Object: 3
   superclasses:
     Object
   interfaces: N, M
@@ -99,6 +101,7 @@
   interfaceSetters:
 
 C:
+  Longest path to Object: 4
   superclasses:
     Object
       -> _C&Object&N
@@ -131,6 +134,7 @@
   interfaceSetters:
 
 M2:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: M
@@ -163,6 +167,7 @@
   interfaceSetters:
 
 N2:
+  Longest path to Object: 3
   superclasses:
     Object
   interfaces: M2, M
@@ -195,6 +200,7 @@
   interfaceSetters:
 
 N3:
+  Longest path to Object: 3
   superclasses:
     Object
   interfaces: M2, M
@@ -227,6 +233,7 @@
   interfaceSetters:
 
 Object with M2:
+  Longest path to Object: 3
   superclasses:
     Object
   interfaces: M2, M
@@ -259,6 +266,7 @@
   interfaceSetters:
 
 C2:
+  Longest path to Object: 4
   superclasses:
     Object
       -> _C2&Object&M2
@@ -292,6 +300,7 @@
   interfaceSetters:
 
 Object with M2:
+  Longest path to Object: 3
   superclasses:
     Object
   interfaces: M2, M
@@ -324,6 +333,7 @@
   interfaceSetters:
 
 C3:
+  Longest path to Object: 4
   superclasses:
     Object
       -> _C3&Object&M2
diff --git a/pkg/front_end/testcases/mixin_constructors_with_default_values.dart.hierarchy.expect b/pkg/front_end/testcases/mixin_constructors_with_default_values.dart.hierarchy.expect
index 78bd7cb..c71f63f 100644
--- a/pkg/front_end/testcases/mixin_constructors_with_default_values.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/mixin_constructors_with_default_values.dart.hierarchy.expect
@@ -268,6 +268,7 @@
   classSetters:
 
 ExpectException:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Exception
@@ -298,40 +299,6 @@
     Object.==
   interfaceSetters:
 
-NoInline:
-  superclasses:
-    Object
-  interfaces:
-  classMembers:
-    Object.toString
-    Object.runtimeType
-    Object._simpleInstanceOf
-    Object._instanceOf
-    Object.noSuchMethod
-    Object._identityHashCode
-    Object.hashCode
-    Object._simpleInstanceOfFalse
-    Object._simpleInstanceOfTrue
-    Object.==
-  classSetters:
-
-AssumeDynamic:
-  superclasses:
-    Object
-  interfaces:
-  classMembers:
-    Object.toString
-    Object.runtimeType
-    Object._simpleInstanceOf
-    Object._instanceOf
-    Object.noSuchMethod
-    Object._identityHashCode
-    Object.hashCode
-    Object._simpleInstanceOfFalse
-    Object._simpleInstanceOfTrue
-    Object.==
-  classSetters:
-
 Immutable:
   superclasses:
     Object
diff --git a/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.hierarchy.expect b/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.hierarchy.expect
index 56969f8..85f7304 100644
--- a/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.hierarchy.expect
@@ -77,6 +77,7 @@
     C._field
 
 Object with C<B>:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: C<B>
@@ -112,6 +113,7 @@
     C._field
 
 Foo:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _Foo&Object&C
diff --git a/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.legacy.expect b/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.legacy.expect
index fb518e4..c22e364 100644
--- a/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.legacy.expect
+++ b/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.legacy.expect
@@ -8,11 +8,11 @@
     ;
 }
 class C<T extends self::A = dynamic> extends core::Object {
-  field self::C::T _field = null;
+  generic-covariant-impl field self::C::T _field = null;
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method foo(self::C::T x) → dynamic {
+  method foo(generic-covariant-impl self::C::T x) → dynamic {
     this.{self::C::_field} = x;
   }
 }
diff --git a/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.legacy.transformed.expect b/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.legacy.transformed.expect
index 9db2af2..b5de22c 100644
--- a/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.legacy.transformed.expect
@@ -8,11 +8,11 @@
     ;
 }
 class C<T extends self::A = dynamic> extends core::Object {
-  field self::C::T _field = null;
+  generic-covariant-impl field self::C::T _field = null;
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method foo(self::C::T x) → dynamic {
+  method foo(generic-covariant-impl self::C::T x) → dynamic {
     this.{self::C::_field} = x;
   }
 }
@@ -22,11 +22,11 @@
     ;
 }
 abstract class _Foo&Object&C extends core::Object implements self::C<self::B> {
-  field self::B _field = null;
+  generic-covariant-impl field self::B _field = null;
   synthetic constructor •() → self::_Foo&Object&C
     : super core::Object::•()
     ;
-  method foo(self::B x) → dynamic {
+  method foo(generic-covariant-impl self::B x) → dynamic {
     this.{self::C::_field} = x;
   }
 }
diff --git a/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.outline.expect b/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.outline.expect
index 1d0284c..340756e 100644
--- a/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.outline.expect
+++ b/pkg/front_end/testcases/mixin_inherited_setter_for_mixed_in_field.dart.outline.expect
@@ -7,10 +7,10 @@
     ;
 }
 class C<T extends self::A = dynamic> extends core::Object {
-  field self::C::T _field;
+  generic-covariant-impl field self::C::T _field;
   synthetic constructor •() → self::C<self::C::T>
     ;
-  method foo(self::C::T x) → dynamic
+  method foo(generic-covariant-impl self::C::T x) → dynamic
     ;
 }
 class D extends self::C<self::B> {
diff --git a/pkg/front_end/testcases/named_function_scope.dart b/pkg/front_end/testcases/named_function_scope.dart
index 97888e3..25c77b1 100644
--- a/pkg/front_end/testcases/named_function_scope.dart
+++ b/pkg/front_end/testcases/named_function_scope.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.
 
-/*@testedFeatures=error,warning,context*/
-
 class T {}
 
 class V {}
@@ -25,64 +23,51 @@
     T t;
     // This doesn't cause a scope error as the named function expression has
     // its own scope.
-    var x = /*@error=NamedFunctionExpression*/ T() {};
+    var x = T() {};
   }
   {
-    /*@context=DuplicatedNamePreviouslyUsedCause*/ V  v;
+    V v;
     // This causes an error, V is already used in this scope.
-    var /*@error=DuplicatedNamePreviouslyUsed*/ V;
+    var V;
   }
   {
-    /*@context=DuplicatedNamePreviouslyUsedCause*/ V  v;
+    V v;
     // This causes an error, V is already used in this scope.
-    var /*@error=DuplicatedNamePreviouslyUsed*/ V = null;
+    var V = null;
   }
   {
     // This causes a scope error as T is already used in the function-type
     // scope (the return type).
-    var x =
-        /*@context=DuplicatedNamePreviouslyUsedCause*/
-        T
-        /*@error=NamedFunctionExpression*/
-        /*@error=DuplicatedNamePreviouslyUsed*/
-        T() {};
+    var x = T T() {};
   }
   {
     // This causes a scope error: using the outer definition of `V` as a type
     // when defining `V`.
-    /*@context=DuplicatedNamePreviouslyUsedCause*/
-    V /*@error=DuplicatedNamePreviouslyUsed*/ V;
+
+    V V;
   }
   {
     // This causes a scope error as T is already defined as a type variable in
     // the function-type scope.
-    var x =
-        /*@error=NamedFunctionExpression*/
-        /*@error=DuplicatedDeclaration*/
-        T< /*@context=DuplicatedDeclarationCause*/ T>() {};
+    var x = T<T>() {};
   }
   {
-    /*@context=DuplicatedNamePreviouslyUsedCause*/
     T t;
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
+    T T() {}
   }
   {
-    /*@context=DuplicatedNamePreviouslyUsedCause*/
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
+    T T() {}
   }
   {
-    /*@context=DuplicatedNamePreviouslyUsedCause*/
     T t;
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
+    T T(T t) {}
   }
   {
-    /*@context=DuplicatedNamePreviouslyUsedCause*/
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
+    T T(T t) {}
   }
   {
-    void T(/*@error=NotAType*/ T t) {}
+    void T(T t) {}
   }
 }
 
-void main() {
-}
+void main() {}
diff --git a/pkg/front_end/testcases/named_function_scope.dart.legacy.expect b/pkg/front_end/testcases/named_function_scope.dart.legacy.expect
index 5bc6572..69b1086 100644
--- a/pkg/front_end/testcases/named_function_scope.dart.legacy.expect
+++ b/pkg/front_end/testcases/named_function_scope.dart.legacy.expect
@@ -2,84 +2,84 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/named_function_scope.dart:28:48: Error: A function expression can't have a name.
-//     var x = /*@error=NamedFunctionExpression*/ T() {};
-//                                                ^
+// pkg/front_end/testcases/named_function_scope.dart:26:13: Error: A function expression can't have a name.
+//     var x = T() {};
+//             ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:33:49: Error: Can't declare 'V' because it was already used in this scope.
-//     var /*@error=DuplicatedNamePreviouslyUsed*/ V;
-//                                                 ^
-// pkg/front_end/testcases/named_function_scope.dart:31:52: Context: Previous use of 'V'.
-//     /*@context=DuplicatedNamePreviouslyUsedCause*/ V  v;
-//                                                    ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:38:49: Error: Can't declare 'V' because it was already used in this scope.
-//     var /*@error=DuplicatedNamePreviouslyUsed*/ V = null;
-//                                                 ^
-// pkg/front_end/testcases/named_function_scope.dart:36:52: Context: Previous use of 'V'.
-//     /*@context=DuplicatedNamePreviouslyUsedCause*/ V  v;
-//                                                    ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:48:9: Error: A function expression can't have a name.
-//         T() {};
+// pkg/front_end/testcases/named_function_scope.dart:31:9: Error: Can't declare 'V' because it was already used in this scope.
+//     var V;
 //         ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:48:9: Error: Can't declare 'T' because it was already used in this scope.
-//         T() {};
-//         ^
-// pkg/front_end/testcases/named_function_scope.dart:45:9: Context: Previous use of 'T'.
-//         T
-//         ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:54:47: Error: Can't declare 'V' because it was already used in this scope.
-//     V /*@error=DuplicatedNamePreviouslyUsed*/ V;
-//                                               ^
-// pkg/front_end/testcases/named_function_scope.dart:54:5: Context: Previous use of 'V'.
-//     V /*@error=DuplicatedNamePreviouslyUsed*/ V;
+// pkg/front_end/testcases/named_function_scope.dart:29:5: Context: Previous use of 'V'.
+//     V v;
 //     ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:62:9: Error: A function expression can't have a name.
-//         T< /*@context=DuplicatedDeclarationCause*/ T>() {};
+// pkg/front_end/testcases/named_function_scope.dart:36:9: Error: Can't declare 'V' because it was already used in this scope.
+//     var V = null;
 //         ^
+// pkg/front_end/testcases/named_function_scope.dart:34:5: Context: Previous use of 'V'.
+//     V v;
+//     ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:62:9: Error: 'T' is already declared in this scope.
-//         T< /*@context=DuplicatedDeclarationCause*/ T>() {};
-//         ^
-// pkg/front_end/testcases/named_function_scope.dart:62:52: Context: Previous declaration of 'T'.
-//         T< /*@context=DuplicatedDeclarationCause*/ T>() {};
-//                                                    ^
+// pkg/front_end/testcases/named_function_scope.dart:41:15: Error: A function expression can't have a name.
+//     var x = T T() {};
+//               ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:67:47: Error: Can't declare 'T' because it was already used in this scope.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-//                                               ^
+// pkg/front_end/testcases/named_function_scope.dart:41:15: Error: Can't declare 'T' because it was already used in this scope.
+//     var x = T T() {};
+//               ^
+// pkg/front_end/testcases/named_function_scope.dart:41:13: Context: Previous use of 'T'.
+//     var x = T T() {};
+//             ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:47:7: Error: Can't declare 'V' because it was already used in this scope.
+//     V V;
+//       ^
+// pkg/front_end/testcases/named_function_scope.dart:47:5: Context: Previous use of 'V'.
+//     V V;
+//     ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:52:13: Error: A function expression can't have a name.
+//     var x = T<T>() {};
+//             ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:52:13: Error: 'T' is already declared in this scope.
+//     var x = T<T>() {};
+//             ^
+// pkg/front_end/testcases/named_function_scope.dart:52:15: Context: Previous declaration of 'T'.
+//     var x = T<T>() {};
+//               ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:56:7: Error: Can't declare 'T' because it was already used in this scope.
+//     T T() {}
+//       ^
+// pkg/front_end/testcases/named_function_scope.dart:55:5: Context: Previous use of 'T'.
+//     T t;
+//     ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:59:7: Error: Can't declare 'T' because it was already used in this scope.
+//     T T() {}
+//       ^
+// pkg/front_end/testcases/named_function_scope.dart:59:5: Context: Previous use of 'T'.
+//     T T() {}
+//     ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:63:7: Error: Can't declare 'T' because it was already used in this scope.
+//     T T(T t) {}
+//       ^
+// pkg/front_end/testcases/named_function_scope.dart:62:5: Context: Previous use of 'T'.
+//     T t;
+//     ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:66:7: Error: Can't declare 'T' because it was already used in this scope.
+//     T T(T t) {}
+//       ^
 // pkg/front_end/testcases/named_function_scope.dart:66:5: Context: Previous use of 'T'.
-//     T t;
+//     T T(T t) {}
 //     ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:71:47: Error: Can't declare 'T' because it was already used in this scope.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-//                                               ^
-// pkg/front_end/testcases/named_function_scope.dart:71:5: Context: Previous use of 'T'.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-//     ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:76:47: Error: Can't declare 'T' because it was already used in this scope.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-//                                               ^
-// pkg/front_end/testcases/named_function_scope.dart:75:5: Context: Previous use of 'T'.
-//     T t;
-//     ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:80:47: Error: Can't declare 'T' because it was already used in this scope.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-//                                               ^
-// pkg/front_end/testcases/named_function_scope.dart:80:5: Context: Previous use of 'T'.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-//     ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:83:32: Warning: 'T' isn't a type.
-//     void T(/*@error=NotAType*/ T t) {}
-//                                ^
+// pkg/front_end/testcases/named_function_scope.dart:69:12: Warning: 'T' isn't a type.
+//     void T(T t) {}
+//            ^
 //
 import self as self;
 import "dart:core" as core;
@@ -109,62 +109,62 @@
   }
   {
     self::V v;
-    dynamic V = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:33:49: Error: Can't declare 'V' because it was already used in this scope.
-    var /*@error=DuplicatedNamePreviouslyUsed*/ V;
-                                                ^";
+    dynamic V = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:31:9: Error: Can't declare 'V' because it was already used in this scope.
+    var V;
+        ^";
   }
   {
     self::V v;
-    dynamic V = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:38:49: Error: Can't declare 'V' because it was already used in this scope.
-    var /*@error=DuplicatedNamePreviouslyUsed*/ V = null;
-                                                ^" in null;
+    dynamic V = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:36:9: Error: Can't declare 'V' because it was already used in this scope.
+    var V = null;
+        ^" in null;
   }
   {
-    dynamic x = let final dynamic #t2 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:48:9: Error: Can't declare 'T' because it was already used in this scope.
-        T() {};
-        ^" in let final () → self::T T = () → self::T {} in T;
+    dynamic x = let final dynamic #t2 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:41:15: Error: Can't declare 'T' because it was already used in this scope.
+    var x = T T() {};
+              ^" in let final () → self::T T = () → self::T {} in T;
   }
   {
-    self::V V = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:54:47: Error: Can't declare 'V' because it was already used in this scope.
-    V /*@error=DuplicatedNamePreviouslyUsed*/ V;
-                                              ^";
+    self::V V = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:47:7: Error: Can't declare 'V' because it was already used in this scope.
+    V V;
+      ^";
   }
   {
-    dynamic x = let final dynamic #t3 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:62:9: Error: 'T' is already declared in this scope.
-        T< /*@context=DuplicatedDeclarationCause*/ T>() {};
-        ^" in let final <T extends core::Object = dynamic>() → dynamic T = <T extends core::Object = dynamic>() → dynamic {} in T;
+    dynamic x = let final dynamic #t3 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:52:13: Error: 'T' is already declared in this scope.
+    var x = T<T>() {};
+            ^" in let final <T extends core::Object = dynamic>() → dynamic T = <T extends core::Object = dynamic>() → dynamic {} in T;
   }
   {
     self::T t;
     {
-      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:67:47: Error: Can't declare 'T' because it was already used in this scope.
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-                                              ^";
+      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:56:7: Error: Can't declare 'T' because it was already used in this scope.
+    T T() {}
+      ^";
       function T() → self::T {}
     }
   }
   {
     {
-      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:71:47: Error: Can't declare 'T' because it was already used in this scope.
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-                                              ^";
+      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:59:7: Error: Can't declare 'T' because it was already used in this scope.
+    T T() {}
+      ^";
       function T() → self::T {}
     }
   }
   {
     self::T t;
     {
-      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:76:47: Error: Can't declare 'T' because it was already used in this scope.
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-                                              ^";
+      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:63:7: Error: Can't declare 'T' because it was already used in this scope.
+    T T(T t) {}
+      ^";
       function T(self::T t) → self::T {}
     }
   }
   {
     {
-      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:80:47: Error: Can't declare 'T' because it was already used in this scope.
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-                                              ^";
+      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:66:7: Error: Can't declare 'T' because it was already used in this scope.
+    T T(T t) {}
+      ^";
       function T(self::T t) → self::T {}
     }
   }
diff --git a/pkg/front_end/testcases/named_function_scope.dart.legacy.transformed.expect b/pkg/front_end/testcases/named_function_scope.dart.legacy.transformed.expect
index 5bc6572..69b1086 100644
--- a/pkg/front_end/testcases/named_function_scope.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/named_function_scope.dart.legacy.transformed.expect
@@ -2,84 +2,84 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/named_function_scope.dart:28:48: Error: A function expression can't have a name.
-//     var x = /*@error=NamedFunctionExpression*/ T() {};
-//                                                ^
+// pkg/front_end/testcases/named_function_scope.dart:26:13: Error: A function expression can't have a name.
+//     var x = T() {};
+//             ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:33:49: Error: Can't declare 'V' because it was already used in this scope.
-//     var /*@error=DuplicatedNamePreviouslyUsed*/ V;
-//                                                 ^
-// pkg/front_end/testcases/named_function_scope.dart:31:52: Context: Previous use of 'V'.
-//     /*@context=DuplicatedNamePreviouslyUsedCause*/ V  v;
-//                                                    ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:38:49: Error: Can't declare 'V' because it was already used in this scope.
-//     var /*@error=DuplicatedNamePreviouslyUsed*/ V = null;
-//                                                 ^
-// pkg/front_end/testcases/named_function_scope.dart:36:52: Context: Previous use of 'V'.
-//     /*@context=DuplicatedNamePreviouslyUsedCause*/ V  v;
-//                                                    ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:48:9: Error: A function expression can't have a name.
-//         T() {};
+// pkg/front_end/testcases/named_function_scope.dart:31:9: Error: Can't declare 'V' because it was already used in this scope.
+//     var V;
 //         ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:48:9: Error: Can't declare 'T' because it was already used in this scope.
-//         T() {};
-//         ^
-// pkg/front_end/testcases/named_function_scope.dart:45:9: Context: Previous use of 'T'.
-//         T
-//         ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:54:47: Error: Can't declare 'V' because it was already used in this scope.
-//     V /*@error=DuplicatedNamePreviouslyUsed*/ V;
-//                                               ^
-// pkg/front_end/testcases/named_function_scope.dart:54:5: Context: Previous use of 'V'.
-//     V /*@error=DuplicatedNamePreviouslyUsed*/ V;
+// pkg/front_end/testcases/named_function_scope.dart:29:5: Context: Previous use of 'V'.
+//     V v;
 //     ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:62:9: Error: A function expression can't have a name.
-//         T< /*@context=DuplicatedDeclarationCause*/ T>() {};
+// pkg/front_end/testcases/named_function_scope.dart:36:9: Error: Can't declare 'V' because it was already used in this scope.
+//     var V = null;
 //         ^
+// pkg/front_end/testcases/named_function_scope.dart:34:5: Context: Previous use of 'V'.
+//     V v;
+//     ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:62:9: Error: 'T' is already declared in this scope.
-//         T< /*@context=DuplicatedDeclarationCause*/ T>() {};
-//         ^
-// pkg/front_end/testcases/named_function_scope.dart:62:52: Context: Previous declaration of 'T'.
-//         T< /*@context=DuplicatedDeclarationCause*/ T>() {};
-//                                                    ^
+// pkg/front_end/testcases/named_function_scope.dart:41:15: Error: A function expression can't have a name.
+//     var x = T T() {};
+//               ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:67:47: Error: Can't declare 'T' because it was already used in this scope.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-//                                               ^
+// pkg/front_end/testcases/named_function_scope.dart:41:15: Error: Can't declare 'T' because it was already used in this scope.
+//     var x = T T() {};
+//               ^
+// pkg/front_end/testcases/named_function_scope.dart:41:13: Context: Previous use of 'T'.
+//     var x = T T() {};
+//             ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:47:7: Error: Can't declare 'V' because it was already used in this scope.
+//     V V;
+//       ^
+// pkg/front_end/testcases/named_function_scope.dart:47:5: Context: Previous use of 'V'.
+//     V V;
+//     ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:52:13: Error: A function expression can't have a name.
+//     var x = T<T>() {};
+//             ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:52:13: Error: 'T' is already declared in this scope.
+//     var x = T<T>() {};
+//             ^
+// pkg/front_end/testcases/named_function_scope.dart:52:15: Context: Previous declaration of 'T'.
+//     var x = T<T>() {};
+//               ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:56:7: Error: Can't declare 'T' because it was already used in this scope.
+//     T T() {}
+//       ^
+// pkg/front_end/testcases/named_function_scope.dart:55:5: Context: Previous use of 'T'.
+//     T t;
+//     ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:59:7: Error: Can't declare 'T' because it was already used in this scope.
+//     T T() {}
+//       ^
+// pkg/front_end/testcases/named_function_scope.dart:59:5: Context: Previous use of 'T'.
+//     T T() {}
+//     ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:63:7: Error: Can't declare 'T' because it was already used in this scope.
+//     T T(T t) {}
+//       ^
+// pkg/front_end/testcases/named_function_scope.dart:62:5: Context: Previous use of 'T'.
+//     T t;
+//     ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:66:7: Error: Can't declare 'T' because it was already used in this scope.
+//     T T(T t) {}
+//       ^
 // pkg/front_end/testcases/named_function_scope.dart:66:5: Context: Previous use of 'T'.
-//     T t;
+//     T T(T t) {}
 //     ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:71:47: Error: Can't declare 'T' because it was already used in this scope.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-//                                               ^
-// pkg/front_end/testcases/named_function_scope.dart:71:5: Context: Previous use of 'T'.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-//     ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:76:47: Error: Can't declare 'T' because it was already used in this scope.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-//                                               ^
-// pkg/front_end/testcases/named_function_scope.dart:75:5: Context: Previous use of 'T'.
-//     T t;
-//     ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:80:47: Error: Can't declare 'T' because it was already used in this scope.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-//                                               ^
-// pkg/front_end/testcases/named_function_scope.dart:80:5: Context: Previous use of 'T'.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-//     ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:83:32: Warning: 'T' isn't a type.
-//     void T(/*@error=NotAType*/ T t) {}
-//                                ^
+// pkg/front_end/testcases/named_function_scope.dart:69:12: Warning: 'T' isn't a type.
+//     void T(T t) {}
+//            ^
 //
 import self as self;
 import "dart:core" as core;
@@ -109,62 +109,62 @@
   }
   {
     self::V v;
-    dynamic V = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:33:49: Error: Can't declare 'V' because it was already used in this scope.
-    var /*@error=DuplicatedNamePreviouslyUsed*/ V;
-                                                ^";
+    dynamic V = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:31:9: Error: Can't declare 'V' because it was already used in this scope.
+    var V;
+        ^";
   }
   {
     self::V v;
-    dynamic V = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:38:49: Error: Can't declare 'V' because it was already used in this scope.
-    var /*@error=DuplicatedNamePreviouslyUsed*/ V = null;
-                                                ^" in null;
+    dynamic V = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:36:9: Error: Can't declare 'V' because it was already used in this scope.
+    var V = null;
+        ^" in null;
   }
   {
-    dynamic x = let final dynamic #t2 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:48:9: Error: Can't declare 'T' because it was already used in this scope.
-        T() {};
-        ^" in let final () → self::T T = () → self::T {} in T;
+    dynamic x = let final dynamic #t2 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:41:15: Error: Can't declare 'T' because it was already used in this scope.
+    var x = T T() {};
+              ^" in let final () → self::T T = () → self::T {} in T;
   }
   {
-    self::V V = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:54:47: Error: Can't declare 'V' because it was already used in this scope.
-    V /*@error=DuplicatedNamePreviouslyUsed*/ V;
-                                              ^";
+    self::V V = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:47:7: Error: Can't declare 'V' because it was already used in this scope.
+    V V;
+      ^";
   }
   {
-    dynamic x = let final dynamic #t3 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:62:9: Error: 'T' is already declared in this scope.
-        T< /*@context=DuplicatedDeclarationCause*/ T>() {};
-        ^" in let final <T extends core::Object = dynamic>() → dynamic T = <T extends core::Object = dynamic>() → dynamic {} in T;
+    dynamic x = let final dynamic #t3 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:52:13: Error: 'T' is already declared in this scope.
+    var x = T<T>() {};
+            ^" in let final <T extends core::Object = dynamic>() → dynamic T = <T extends core::Object = dynamic>() → dynamic {} in T;
   }
   {
     self::T t;
     {
-      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:67:47: Error: Can't declare 'T' because it was already used in this scope.
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-                                              ^";
+      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:56:7: Error: Can't declare 'T' because it was already used in this scope.
+    T T() {}
+      ^";
       function T() → self::T {}
     }
   }
   {
     {
-      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:71:47: Error: Can't declare 'T' because it was already used in this scope.
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-                                              ^";
+      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:59:7: Error: Can't declare 'T' because it was already used in this scope.
+    T T() {}
+      ^";
       function T() → self::T {}
     }
   }
   {
     self::T t;
     {
-      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:76:47: Error: Can't declare 'T' because it was already used in this scope.
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-                                              ^";
+      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:63:7: Error: Can't declare 'T' because it was already used in this scope.
+    T T(T t) {}
+      ^";
       function T(self::T t) → self::T {}
     }
   }
   {
     {
-      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:80:47: Error: Can't declare 'T' because it was already used in this scope.
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-                                              ^";
+      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:66:7: Error: Can't declare 'T' because it was already used in this scope.
+    T T(T t) {}
+      ^";
       function T(self::T t) → self::T {}
     }
   }
diff --git a/pkg/front_end/testcases/named_function_scope.dart.strong.expect b/pkg/front_end/testcases/named_function_scope.dart.strong.expect
index d898d98..ec10637 100644
--- a/pkg/front_end/testcases/named_function_scope.dart.strong.expect
+++ b/pkg/front_end/testcases/named_function_scope.dart.strong.expect
@@ -2,84 +2,84 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/named_function_scope.dart:28:48: Error: A function expression can't have a name.
-//     var x = /*@error=NamedFunctionExpression*/ T() {};
-//                                                ^
+// pkg/front_end/testcases/named_function_scope.dart:26:13: Error: A function expression can't have a name.
+//     var x = T() {};
+//             ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:33:49: Error: Can't declare 'V' because it was already used in this scope.
-//     var /*@error=DuplicatedNamePreviouslyUsed*/ V;
-//                                                 ^
-// pkg/front_end/testcases/named_function_scope.dart:31:52: Context: Previous use of 'V'.
-//     /*@context=DuplicatedNamePreviouslyUsedCause*/ V  v;
-//                                                    ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:38:49: Error: Can't declare 'V' because it was already used in this scope.
-//     var /*@error=DuplicatedNamePreviouslyUsed*/ V = null;
-//                                                 ^
-// pkg/front_end/testcases/named_function_scope.dart:36:52: Context: Previous use of 'V'.
-//     /*@context=DuplicatedNamePreviouslyUsedCause*/ V  v;
-//                                                    ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:48:9: Error: A function expression can't have a name.
-//         T() {};
+// pkg/front_end/testcases/named_function_scope.dart:31:9: Error: Can't declare 'V' because it was already used in this scope.
+//     var V;
 //         ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:48:9: Error: Can't declare 'T' because it was already used in this scope.
-//         T() {};
-//         ^
-// pkg/front_end/testcases/named_function_scope.dart:45:9: Context: Previous use of 'T'.
-//         T
-//         ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:54:47: Error: Can't declare 'V' because it was already used in this scope.
-//     V /*@error=DuplicatedNamePreviouslyUsed*/ V;
-//                                               ^
-// pkg/front_end/testcases/named_function_scope.dart:54:5: Context: Previous use of 'V'.
-//     V /*@error=DuplicatedNamePreviouslyUsed*/ V;
+// pkg/front_end/testcases/named_function_scope.dart:29:5: Context: Previous use of 'V'.
+//     V v;
 //     ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:62:9: Error: A function expression can't have a name.
-//         T< /*@context=DuplicatedDeclarationCause*/ T>() {};
+// pkg/front_end/testcases/named_function_scope.dart:36:9: Error: Can't declare 'V' because it was already used in this scope.
+//     var V = null;
 //         ^
+// pkg/front_end/testcases/named_function_scope.dart:34:5: Context: Previous use of 'V'.
+//     V v;
+//     ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:62:9: Error: 'T' is already declared in this scope.
-//         T< /*@context=DuplicatedDeclarationCause*/ T>() {};
-//         ^
-// pkg/front_end/testcases/named_function_scope.dart:62:52: Context: Previous declaration of 'T'.
-//         T< /*@context=DuplicatedDeclarationCause*/ T>() {};
-//                                                    ^
+// pkg/front_end/testcases/named_function_scope.dart:41:15: Error: A function expression can't have a name.
+//     var x = T T() {};
+//               ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:67:47: Error: Can't declare 'T' because it was already used in this scope.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-//                                               ^
+// pkg/front_end/testcases/named_function_scope.dart:41:15: Error: Can't declare 'T' because it was already used in this scope.
+//     var x = T T() {};
+//               ^
+// pkg/front_end/testcases/named_function_scope.dart:41:13: Context: Previous use of 'T'.
+//     var x = T T() {};
+//             ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:47:7: Error: Can't declare 'V' because it was already used in this scope.
+//     V V;
+//       ^
+// pkg/front_end/testcases/named_function_scope.dart:47:5: Context: Previous use of 'V'.
+//     V V;
+//     ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:52:13: Error: A function expression can't have a name.
+//     var x = T<T>() {};
+//             ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:52:13: Error: 'T' is already declared in this scope.
+//     var x = T<T>() {};
+//             ^
+// pkg/front_end/testcases/named_function_scope.dart:52:15: Context: Previous declaration of 'T'.
+//     var x = T<T>() {};
+//               ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:56:7: Error: Can't declare 'T' because it was already used in this scope.
+//     T T() {}
+//       ^
+// pkg/front_end/testcases/named_function_scope.dart:55:5: Context: Previous use of 'T'.
+//     T t;
+//     ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:59:7: Error: Can't declare 'T' because it was already used in this scope.
+//     T T() {}
+//       ^
+// pkg/front_end/testcases/named_function_scope.dart:59:5: Context: Previous use of 'T'.
+//     T T() {}
+//     ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:63:7: Error: Can't declare 'T' because it was already used in this scope.
+//     T T(T t) {}
+//       ^
+// pkg/front_end/testcases/named_function_scope.dart:62:5: Context: Previous use of 'T'.
+//     T t;
+//     ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:66:7: Error: Can't declare 'T' because it was already used in this scope.
+//     T T(T t) {}
+//       ^
 // pkg/front_end/testcases/named_function_scope.dart:66:5: Context: Previous use of 'T'.
-//     T t;
+//     T T(T t) {}
 //     ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:71:47: Error: Can't declare 'T' because it was already used in this scope.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-//                                               ^
-// pkg/front_end/testcases/named_function_scope.dart:71:5: Context: Previous use of 'T'.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-//     ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:76:47: Error: Can't declare 'T' because it was already used in this scope.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-//                                               ^
-// pkg/front_end/testcases/named_function_scope.dart:75:5: Context: Previous use of 'T'.
-//     T t;
-//     ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:80:47: Error: Can't declare 'T' because it was already used in this scope.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-//                                               ^
-// pkg/front_end/testcases/named_function_scope.dart:80:5: Context: Previous use of 'T'.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-//     ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:83:32: Error: 'T' isn't a type.
-//     void T(/*@error=NotAType*/ T t) {}
-//                                ^
+// pkg/front_end/testcases/named_function_scope.dart:69:12: Error: 'T' isn't a type.
+//     void T(T t) {}
+//            ^
 //
 import self as self;
 import "dart:core" as core;
@@ -109,62 +109,62 @@
   }
   {
     self::V v;
-    dynamic V = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:33:49: Error: Can't declare 'V' because it was already used in this scope.
-    var /*@error=DuplicatedNamePreviouslyUsed*/ V;
-                                                ^";
+    dynamic V = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:31:9: Error: Can't declare 'V' because it was already used in this scope.
+    var V;
+        ^";
   }
   {
     self::V v;
-    dynamic V = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:38:49: Error: Can't declare 'V' because it was already used in this scope.
-    var /*@error=DuplicatedNamePreviouslyUsed*/ V = null;
-                                                ^" in null;
+    dynamic V = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:36:9: Error: Can't declare 'V' because it was already used in this scope.
+    var V = null;
+        ^" in null;
   }
   {
-    dynamic x = let final dynamic #t2 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:48:9: Error: Can't declare 'T' because it was already used in this scope.
-        T() {};
-        ^" in let final () → self::T T = () → self::T {} in T;
+    dynamic x = let final dynamic #t2 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:41:15: Error: Can't declare 'T' because it was already used in this scope.
+    var x = T T() {};
+              ^" in let final () → self::T T = () → self::T {} in T;
   }
   {
-    self::V V = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:54:47: Error: Can't declare 'V' because it was already used in this scope.
-    V /*@error=DuplicatedNamePreviouslyUsed*/ V;
-                                              ^" as{TypeError} self::V;
+    self::V V = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:47:7: Error: Can't declare 'V' because it was already used in this scope.
+    V V;
+      ^" as{TypeError} self::V;
   }
   {
-    dynamic x = let final dynamic #t3 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:62:9: Error: 'T' is already declared in this scope.
-        T< /*@context=DuplicatedDeclarationCause*/ T>() {};
-        ^" in let final <T extends core::Object = dynamic>() → dynamic T = <T extends core::Object = dynamic>() → dynamic {} in T;
+    dynamic x = let final dynamic #t3 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:52:13: Error: 'T' is already declared in this scope.
+    var x = T<T>() {};
+            ^" in let final <T extends core::Object = dynamic>() → dynamic T = <T extends core::Object = dynamic>() → dynamic {} in T;
   }
   {
     self::T t;
     {
-      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:67:47: Error: Can't declare 'T' because it was already used in this scope.
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-                                              ^";
+      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:56:7: Error: Can't declare 'T' because it was already used in this scope.
+    T T() {}
+      ^";
       function T() → self::T {}
     }
   }
   {
     {
-      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:71:47: Error: Can't declare 'T' because it was already used in this scope.
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-                                              ^";
+      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:59:7: Error: Can't declare 'T' because it was already used in this scope.
+    T T() {}
+      ^";
       function T() → self::T {}
     }
   }
   {
     self::T t;
     {
-      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:76:47: Error: Can't declare 'T' because it was already used in this scope.
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-                                              ^";
+      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:63:7: Error: Can't declare 'T' because it was already used in this scope.
+    T T(T t) {}
+      ^";
       function T(self::T t) → self::T {}
     }
   }
   {
     {
-      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:80:47: Error: Can't declare 'T' because it was already used in this scope.
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-                                              ^";
+      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:66:7: Error: Can't declare 'T' because it was already used in this scope.
+    T T(T t) {}
+      ^";
       function T(self::T t) → self::T {}
     }
   }
diff --git a/pkg/front_end/testcases/named_function_scope.dart.strong.transformed.expect b/pkg/front_end/testcases/named_function_scope.dart.strong.transformed.expect
index d898d98..ec10637 100644
--- a/pkg/front_end/testcases/named_function_scope.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/named_function_scope.dart.strong.transformed.expect
@@ -2,84 +2,84 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/named_function_scope.dart:28:48: Error: A function expression can't have a name.
-//     var x = /*@error=NamedFunctionExpression*/ T() {};
-//                                                ^
+// pkg/front_end/testcases/named_function_scope.dart:26:13: Error: A function expression can't have a name.
+//     var x = T() {};
+//             ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:33:49: Error: Can't declare 'V' because it was already used in this scope.
-//     var /*@error=DuplicatedNamePreviouslyUsed*/ V;
-//                                                 ^
-// pkg/front_end/testcases/named_function_scope.dart:31:52: Context: Previous use of 'V'.
-//     /*@context=DuplicatedNamePreviouslyUsedCause*/ V  v;
-//                                                    ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:38:49: Error: Can't declare 'V' because it was already used in this scope.
-//     var /*@error=DuplicatedNamePreviouslyUsed*/ V = null;
-//                                                 ^
-// pkg/front_end/testcases/named_function_scope.dart:36:52: Context: Previous use of 'V'.
-//     /*@context=DuplicatedNamePreviouslyUsedCause*/ V  v;
-//                                                    ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:48:9: Error: A function expression can't have a name.
-//         T() {};
+// pkg/front_end/testcases/named_function_scope.dart:31:9: Error: Can't declare 'V' because it was already used in this scope.
+//     var V;
 //         ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:48:9: Error: Can't declare 'T' because it was already used in this scope.
-//         T() {};
-//         ^
-// pkg/front_end/testcases/named_function_scope.dart:45:9: Context: Previous use of 'T'.
-//         T
-//         ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:54:47: Error: Can't declare 'V' because it was already used in this scope.
-//     V /*@error=DuplicatedNamePreviouslyUsed*/ V;
-//                                               ^
-// pkg/front_end/testcases/named_function_scope.dart:54:5: Context: Previous use of 'V'.
-//     V /*@error=DuplicatedNamePreviouslyUsed*/ V;
+// pkg/front_end/testcases/named_function_scope.dart:29:5: Context: Previous use of 'V'.
+//     V v;
 //     ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:62:9: Error: A function expression can't have a name.
-//         T< /*@context=DuplicatedDeclarationCause*/ T>() {};
+// pkg/front_end/testcases/named_function_scope.dart:36:9: Error: Can't declare 'V' because it was already used in this scope.
+//     var V = null;
 //         ^
+// pkg/front_end/testcases/named_function_scope.dart:34:5: Context: Previous use of 'V'.
+//     V v;
+//     ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:62:9: Error: 'T' is already declared in this scope.
-//         T< /*@context=DuplicatedDeclarationCause*/ T>() {};
-//         ^
-// pkg/front_end/testcases/named_function_scope.dart:62:52: Context: Previous declaration of 'T'.
-//         T< /*@context=DuplicatedDeclarationCause*/ T>() {};
-//                                                    ^
+// pkg/front_end/testcases/named_function_scope.dart:41:15: Error: A function expression can't have a name.
+//     var x = T T() {};
+//               ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:67:47: Error: Can't declare 'T' because it was already used in this scope.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-//                                               ^
+// pkg/front_end/testcases/named_function_scope.dart:41:15: Error: Can't declare 'T' because it was already used in this scope.
+//     var x = T T() {};
+//               ^
+// pkg/front_end/testcases/named_function_scope.dart:41:13: Context: Previous use of 'T'.
+//     var x = T T() {};
+//             ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:47:7: Error: Can't declare 'V' because it was already used in this scope.
+//     V V;
+//       ^
+// pkg/front_end/testcases/named_function_scope.dart:47:5: Context: Previous use of 'V'.
+//     V V;
+//     ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:52:13: Error: A function expression can't have a name.
+//     var x = T<T>() {};
+//             ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:52:13: Error: 'T' is already declared in this scope.
+//     var x = T<T>() {};
+//             ^
+// pkg/front_end/testcases/named_function_scope.dart:52:15: Context: Previous declaration of 'T'.
+//     var x = T<T>() {};
+//               ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:56:7: Error: Can't declare 'T' because it was already used in this scope.
+//     T T() {}
+//       ^
+// pkg/front_end/testcases/named_function_scope.dart:55:5: Context: Previous use of 'T'.
+//     T t;
+//     ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:59:7: Error: Can't declare 'T' because it was already used in this scope.
+//     T T() {}
+//       ^
+// pkg/front_end/testcases/named_function_scope.dart:59:5: Context: Previous use of 'T'.
+//     T T() {}
+//     ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:63:7: Error: Can't declare 'T' because it was already used in this scope.
+//     T T(T t) {}
+//       ^
+// pkg/front_end/testcases/named_function_scope.dart:62:5: Context: Previous use of 'T'.
+//     T t;
+//     ^
+//
+// pkg/front_end/testcases/named_function_scope.dart:66:7: Error: Can't declare 'T' because it was already used in this scope.
+//     T T(T t) {}
+//       ^
 // pkg/front_end/testcases/named_function_scope.dart:66:5: Context: Previous use of 'T'.
-//     T t;
+//     T T(T t) {}
 //     ^
 //
-// pkg/front_end/testcases/named_function_scope.dart:71:47: Error: Can't declare 'T' because it was already used in this scope.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-//                                               ^
-// pkg/front_end/testcases/named_function_scope.dart:71:5: Context: Previous use of 'T'.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-//     ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:76:47: Error: Can't declare 'T' because it was already used in this scope.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-//                                               ^
-// pkg/front_end/testcases/named_function_scope.dart:75:5: Context: Previous use of 'T'.
-//     T t;
-//     ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:80:47: Error: Can't declare 'T' because it was already used in this scope.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-//                                               ^
-// pkg/front_end/testcases/named_function_scope.dart:80:5: Context: Previous use of 'T'.
-//     T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-//     ^
-//
-// pkg/front_end/testcases/named_function_scope.dart:83:32: Error: 'T' isn't a type.
-//     void T(/*@error=NotAType*/ T t) {}
-//                                ^
+// pkg/front_end/testcases/named_function_scope.dart:69:12: Error: 'T' isn't a type.
+//     void T(T t) {}
+//            ^
 //
 import self as self;
 import "dart:core" as core;
@@ -109,62 +109,62 @@
   }
   {
     self::V v;
-    dynamic V = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:33:49: Error: Can't declare 'V' because it was already used in this scope.
-    var /*@error=DuplicatedNamePreviouslyUsed*/ V;
-                                                ^";
+    dynamic V = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:31:9: Error: Can't declare 'V' because it was already used in this scope.
+    var V;
+        ^";
   }
   {
     self::V v;
-    dynamic V = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:38:49: Error: Can't declare 'V' because it was already used in this scope.
-    var /*@error=DuplicatedNamePreviouslyUsed*/ V = null;
-                                                ^" in null;
+    dynamic V = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:36:9: Error: Can't declare 'V' because it was already used in this scope.
+    var V = null;
+        ^" in null;
   }
   {
-    dynamic x = let final dynamic #t2 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:48:9: Error: Can't declare 'T' because it was already used in this scope.
-        T() {};
-        ^" in let final () → self::T T = () → self::T {} in T;
+    dynamic x = let final dynamic #t2 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:41:15: Error: Can't declare 'T' because it was already used in this scope.
+    var x = T T() {};
+              ^" in let final () → self::T T = () → self::T {} in T;
   }
   {
-    self::V V = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:54:47: Error: Can't declare 'V' because it was already used in this scope.
-    V /*@error=DuplicatedNamePreviouslyUsed*/ V;
-                                              ^" as{TypeError} self::V;
+    self::V V = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:47:7: Error: Can't declare 'V' because it was already used in this scope.
+    V V;
+      ^" as{TypeError} self::V;
   }
   {
-    dynamic x = let final dynamic #t3 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:62:9: Error: 'T' is already declared in this scope.
-        T< /*@context=DuplicatedDeclarationCause*/ T>() {};
-        ^" in let final <T extends core::Object = dynamic>() → dynamic T = <T extends core::Object = dynamic>() → dynamic {} in T;
+    dynamic x = let final dynamic #t3 = invalid-expression "pkg/front_end/testcases/named_function_scope.dart:52:13: Error: 'T' is already declared in this scope.
+    var x = T<T>() {};
+            ^" in let final <T extends core::Object = dynamic>() → dynamic T = <T extends core::Object = dynamic>() → dynamic {} in T;
   }
   {
     self::T t;
     {
-      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:67:47: Error: Can't declare 'T' because it was already used in this scope.
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-                                              ^";
+      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:56:7: Error: Can't declare 'T' because it was already used in this scope.
+    T T() {}
+      ^";
       function T() → self::T {}
     }
   }
   {
     {
-      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:71:47: Error: Can't declare 'T' because it was already used in this scope.
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T() {}
-                                              ^";
+      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:59:7: Error: Can't declare 'T' because it was already used in this scope.
+    T T() {}
+      ^";
       function T() → self::T {}
     }
   }
   {
     self::T t;
     {
-      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:76:47: Error: Can't declare 'T' because it was already used in this scope.
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-                                              ^";
+      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:63:7: Error: Can't declare 'T' because it was already used in this scope.
+    T T(T t) {}
+      ^";
       function T(self::T t) → self::T {}
     }
   }
   {
     {
-      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:80:47: Error: Can't declare 'T' because it was already used in this scope.
-    T /*@error=DuplicatedNamePreviouslyUsed*/ T(T t) {}
-                                              ^";
+      invalid-expression "pkg/front_end/testcases/named_function_scope.dart:66:7: Error: Can't declare 'T' because it was already used in this scope.
+    T T(T t) {}
+      ^";
       function T(self::T t) → self::T {}
     }
   }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field.dart.hierarchy.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field.dart.hierarchy.expect
index 0482f3b..7f7d266 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field.dart.hierarchy.expect
@@ -38,6 +38,7 @@
     I.foo
 
 A:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: I
@@ -69,6 +70,7 @@
     I.foo
 
 B:
+  Longest path to Object: 3
   superclasses:
     Object
       -> A
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.hierarchy.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.hierarchy.expect
index 785f78b..018c929 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in.dart.hierarchy.expect
@@ -38,6 +38,7 @@
     A.foo
 
 B:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: A
@@ -69,6 +70,7 @@
     A.foo
 
 Object with B:
+  Longest path to Object: 3
   superclasses:
     Object
   interfaces: B, A
@@ -100,6 +102,7 @@
     A.foo
 
 C:
+  Longest path to Object: 4
   superclasses:
     Object
       -> _C&Object&B
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_one_defined.dart.hierarchy.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_one_defined.dart.hierarchy.expect
index 20bc332..f9e9b82 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_one_defined.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_one_defined.dart.hierarchy.expect
@@ -38,6 +38,7 @@
     A.foo
 
 B:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: A
@@ -70,6 +71,7 @@
     A.foo
 
 C:
+  Longest path to Object: 3
   superclasses:
     Object
       -> B
@@ -103,6 +105,7 @@
     A.foo
 
 D:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: A
@@ -135,6 +138,7 @@
     D.foo
 
 E:
+  Longest path to Object: 3
   superclasses:
     Object
       -> D
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.hierarchy.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.hierarchy.expect
index 71bf144..22986a4 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.hierarchy.expect
@@ -38,6 +38,7 @@
     A.foo
 
 B:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: A<int>
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.legacy.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.legacy.expect
index 828a1c2..ed949f6 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.legacy.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.legacy.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 abstract class A<X extends core::Object = dynamic> extends core::Object {
-  field core::List<self::A::X> foo = null;
+  generic-covariant-impl field core::List<self::A::X> foo = null;
   synthetic constructor •() → self::A<self::A::X>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.legacy.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.legacy.transformed.expect
index 828a1c2..ed949f6 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.legacy.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 abstract class A<X extends core::Object = dynamic> extends core::Object {
-  field core::List<self::A::X> foo = null;
+  generic-covariant-impl field core::List<self::A::X> foo = null;
   synthetic constructor •() → self::A<self::A::X>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.outline.expect
index c6492de..9679fbf 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/abstract_accessors_from_field_with_substitution.dart.outline.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 abstract class A<X extends core::Object = dynamic> extends core::Object {
-  field core::List<self::A::X> foo;
+  generic-covariant-impl field core::List<self::A::X> foo;
   synthetic constructor •() → self::A<self::A::X>
     ;
 }
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/concrete_method_over_forwarder_in_mixin_application.dart.hierarchy.expect b/pkg/front_end/testcases/no_such_method_forwarders/concrete_method_over_forwarder_in_mixin_application.dart.hierarchy.expect
index 5b5669e..a38db13 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/concrete_method_over_forwarder_in_mixin_application.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/concrete_method_over_forwarder_in_mixin_application.dart.hierarchy.expect
@@ -55,6 +55,7 @@
   classSetters:
 
 B:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: I
@@ -85,6 +86,7 @@
   interfaceSetters:
 
 A with B:
+  Longest path to Object: 3
   superclasses:
     Object
       -> A
@@ -117,6 +119,7 @@
   interfaceSetters:
 
 C:
+  Longest path to Object: 4
   superclasses:
     Object
       -> A
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/duplicated_abstract_method.dart.hierarchy.expect b/pkg/front_end/testcases/no_such_method_forwarders/duplicated_abstract_method.dart.hierarchy.expect
index c3d12b3..6f90578 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/duplicated_abstract_method.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/duplicated_abstract_method.dart.hierarchy.expect
@@ -55,6 +55,7 @@
   classSetters:
 
 M:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: I1, I2
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.hierarchy.expect b/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.hierarchy.expect
index 2cea300..38e9a5f 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/forwarders_not_assumed_from_mixin.dart.hierarchy.expect
@@ -37,6 +37,7 @@
   classSetters:
 
 A:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: I
@@ -67,6 +68,7 @@
   interfaceSetters:
 
 Object with A:
+  Longest path to Object: 3
   superclasses:
     Object
   interfaces: A, I
@@ -97,6 +99,7 @@
   interfaceSetters:
 
 B:
+  Longest path to Object: 4
   superclasses:
     Object
       -> _B&Object&A
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.hierarchy.expect b/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.hierarchy.expect
index 8b453b8..84d907a 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/interface_with_nsm.dart.hierarchy.expect
@@ -54,6 +54,7 @@
   classSetters:
 
 Object with M:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: M
@@ -83,6 +84,7 @@
   interfaceSetters:
 
 A:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _A&Object&M
@@ -114,6 +116,7 @@
   interfaceSetters:
 
 Object with M:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: M
@@ -143,6 +146,7 @@
   interfaceSetters:
 
 B:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _B&Object&M
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.hierarchy.expect b/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.hierarchy.expect
index 254f85b..e270c79 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/nsm_mixed_in.dart.hierarchy.expect
@@ -36,6 +36,7 @@
   classSetters:
 
 Object with A:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: A
@@ -65,6 +66,7 @@
   interfaceSetters:
 
 B:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _B&Object&A
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/private.dart.legacy.expect b/pkg/front_end/testcases/no_such_method_forwarders/private.dart.legacy.expect
index 214711b..3afff4b 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/private.dart.legacy.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/private.dart.legacy.expect
@@ -1,7 +1,7 @@
 library private;
 import self as self;
 import "dart:core" as core;
-import "./private_module.dart" as pri;
+import "private_module.dart" as pri;
 
 import "org-dartlang-testcase:///private_module.dart";
 
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/private.dart.legacy.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/private.dart.legacy.transformed.expect
index 214711b..3afff4b 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/private.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/private.dart.legacy.transformed.expect
@@ -1,7 +1,7 @@
 library private;
 import self as self;
 import "dart:core" as core;
-import "./private_module.dart" as pri;
+import "private_module.dart" as pri;
 
 import "org-dartlang-testcase:///private_module.dart";
 
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/private.dart.outline.expect b/pkg/front_end/testcases/no_such_method_forwarders/private.dart.outline.expect
index 6270b7f..518a7f4 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/private.dart.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/private.dart.outline.expect
@@ -1,7 +1,7 @@
 library private;
 import self as self;
 import "dart:core" as core;
-import "./private_module.dart" as pri;
+import "private_module.dart" as pri;
 
 import "org-dartlang-testcase:///private_module.dart";
 
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/private.dart.strong.expect b/pkg/front_end/testcases/no_such_method_forwarders/private.dart.strong.expect
index 214711b..3afff4b 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/private.dart.strong.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/private.dart.strong.expect
@@ -1,7 +1,7 @@
 library private;
 import self as self;
 import "dart:core" as core;
-import "./private_module.dart" as pri;
+import "private_module.dart" as pri;
 
 import "org-dartlang-testcase:///private_module.dart";
 
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/private.dart.strong.transformed.expect b/pkg/front_end/testcases/no_such_method_forwarders/private.dart.strong.transformed.expect
index 214711b..3afff4b 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/private.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/private.dart.strong.transformed.expect
@@ -1,7 +1,7 @@
 library private;
 import self as self;
 import "dart:core" as core;
-import "./private_module.dart" as pri;
+import "private_module.dart" as pri;
 
 import "org-dartlang-testcase:///private_module.dart";
 
diff --git a/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.hierarchy.expect b/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.hierarchy.expect
index 3227a6f..29f5d07 100644
--- a/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/no_such_method_forwarders/subst_on_forwarder.dart.hierarchy.expect
@@ -54,6 +54,7 @@
   classSetters:
 
 Object with M:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: M
@@ -83,6 +84,7 @@
   interfaceSetters:
 
 A:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _A&Object&M
diff --git a/pkg/front_end/testcases/no_such_method_private_setter.dart.hierarchy.expect b/pkg/front_end/testcases/no_such_method_private_setter.dart.hierarchy.expect
index dba9cc0..95cc6fb 100644
--- a/pkg/front_end/testcases/no_such_method_private_setter.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/no_such_method_private_setter.dart.hierarchy.expect
@@ -38,6 +38,7 @@
     Bar._x
 
 Foo:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Bar
diff --git a/pkg/front_end/testcases/no_such_method_private_setter.dart.legacy.expect b/pkg/front_end/testcases/no_such_method_private_setter.dart.legacy.expect
index 52f88c4..a545e64 100644
--- a/pkg/front_end/testcases/no_such_method_private_setter.dart.legacy.expect
+++ b/pkg/front_end/testcases/no_such_method_private_setter.dart.legacy.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./no_such_method_private_setter_lib.dart" as no_;
+import "no_such_method_private_setter_lib.dart" as no_;
 
 import "org-dartlang-testcase:///no_such_method_private_setter_lib.dart";
 
diff --git a/pkg/front_end/testcases/no_such_method_private_setter.dart.legacy.transformed.expect b/pkg/front_end/testcases/no_such_method_private_setter.dart.legacy.transformed.expect
index 52f88c4..a545e64 100644
--- a/pkg/front_end/testcases/no_such_method_private_setter.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_private_setter.dart.legacy.transformed.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./no_such_method_private_setter_lib.dart" as no_;
+import "no_such_method_private_setter_lib.dart" as no_;
 
 import "org-dartlang-testcase:///no_such_method_private_setter_lib.dart";
 
diff --git a/pkg/front_end/testcases/no_such_method_private_setter.dart.outline.expect b/pkg/front_end/testcases/no_such_method_private_setter.dart.outline.expect
index 78df3aa..099c2ab 100644
--- a/pkg/front_end/testcases/no_such_method_private_setter.dart.outline.expect
+++ b/pkg/front_end/testcases/no_such_method_private_setter.dart.outline.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./no_such_method_private_setter_lib.dart" as no_;
+import "no_such_method_private_setter_lib.dart" as no_;
 
 import "org-dartlang-testcase:///no_such_method_private_setter_lib.dart";
 
diff --git a/pkg/front_end/testcases/no_such_method_private_setter.dart.strong.expect b/pkg/front_end/testcases/no_such_method_private_setter.dart.strong.expect
index 52f88c4..a545e64 100644
--- a/pkg/front_end/testcases/no_such_method_private_setter.dart.strong.expect
+++ b/pkg/front_end/testcases/no_such_method_private_setter.dart.strong.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./no_such_method_private_setter_lib.dart" as no_;
+import "no_such_method_private_setter_lib.dart" as no_;
 
 import "org-dartlang-testcase:///no_such_method_private_setter_lib.dart";
 
diff --git a/pkg/front_end/testcases/no_such_method_private_setter.dart.strong.transformed.expect b/pkg/front_end/testcases/no_such_method_private_setter.dart.strong.transformed.expect
index 52f88c4..a545e64 100644
--- a/pkg/front_end/testcases/no_such_method_private_setter.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/no_such_method_private_setter.dart.strong.transformed.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./no_such_method_private_setter_lib.dart" as no_;
+import "no_such_method_private_setter_lib.dart" as no_;
 
 import "org-dartlang-testcase:///no_such_method_private_setter_lib.dart";
 
diff --git a/pkg/front_end/testcases/operator_method_not_found.dart b/pkg/front_end/testcases/operator_method_not_found.dart
new file mode 100644
index 0000000..c54c358
--- /dev/null
+++ b/pkg/front_end/testcases/operator_method_not_found.dart
@@ -0,0 +1,55 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class Foo {
+}
+
+main() {
+  Foo foo = new Foo();
+
+  // Not defined, but given right arity.
+  print(foo < 2);
+  print(foo > 2);
+  print(foo <= 2);
+  print(foo >= 2);
+  print(foo == 2);
+  print(foo - 2);
+  print(foo + 2);
+  print(foo / 2);
+  print(foo ~/ 2);
+  print(foo * 2);
+  print(foo % 2);
+  print(foo | 2);
+  print(foo ^ 2);
+  print(foo & 2);
+  print(foo << 2);
+  print(foo >> 2);
+  // print(foo >>> 2); // triple shift not enabled by default at the moment.
+  print(foo[2] = 2);
+  print(foo[2]);
+  print(~foo);
+  print(-foo);
+
+  // Not defined, and given wrong arity.
+  // Should be binary.
+  print(<foo);
+  print(>foo);
+  print(<=foo);
+  print(>=foo);
+  print(==foo);
+  print(+foo);
+  print(/foo);
+  print(~/foo);
+  print(*foo);
+  print(%foo);
+  print(|foo);
+  print(^foo);
+  print(&foo);
+  print(<<foo);
+  print(>>foo);
+  // print(>>>foo); // triple shift not enabled by default at the moment.
+
+  // Should be unary.
+  print(foo ~ 2);
+}
\ No newline at end of file
diff --git a/pkg/front_end/testcases/operator_method_not_found.dart.hierarchy.expect b/pkg/front_end/testcases/operator_method_not_found.dart.hierarchy.expect
new file mode 100644
index 0000000..6dc6110
--- /dev/null
+++ b/pkg/front_end/testcases/operator_method_not_found.dart.hierarchy.expect
@@ -0,0 +1,36 @@
+Object:
+  superclasses:
+  interfaces:
+  classMembers:
+    Object._haveSameRuntimeType
+    Object.toString
+    Object.runtimeType
+    Object._toString
+    Object._simpleInstanceOf
+    Object._hashCodeRnd
+    Object._instanceOf
+    Object.noSuchMethod
+    Object._objectHashCode
+    Object._identityHashCode
+    Object.hashCode
+    Object._simpleInstanceOfFalse
+    Object._simpleInstanceOfTrue
+    Object.==
+  classSetters:
+
+Foo:
+  superclasses:
+    Object
+  interfaces:
+  classMembers:
+    Object.toString
+    Object.runtimeType
+    Object._simpleInstanceOf
+    Object._instanceOf
+    Object.noSuchMethod
+    Object._identityHashCode
+    Object.hashCode
+    Object._simpleInstanceOfFalse
+    Object._simpleInstanceOfTrue
+    Object.==
+  classSetters:
diff --git a/pkg/front_end/testcases/operator_method_not_found.dart.legacy.expect b/pkg/front_end/testcases/operator_method_not_found.dart.legacy.expect
new file mode 100644
index 0000000..0abf9ef
--- /dev/null
+++ b/pkg/front_end/testcases/operator_method_not_found.dart.legacy.expect
@@ -0,0 +1,154 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:36:10: Error: Expected '>' after this.
+//   print(<foo);
+//          ^^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:36:13: Error: Expected '[' before this.
+//   print(<foo);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:36:10: Warning: 'foo' isn't a type.
+//   print(<foo);
+//          ^^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:37:9: Error: Expected an identifier, but got '>'.
+//   print(>foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:38:9: Error: Expected an identifier, but got '<='.
+//   print(<=foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:39:9: Error: Expected an identifier, but got '>='.
+//   print(>=foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:40:9: Error: Expected an identifier, but got '=='.
+//   print(==foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:41:9: Error: '+' is not a prefix operator.
+// Try removing '+'.
+//   print(+foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:42:9: Error: Expected an identifier, but got '/'.
+//   print(/foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:43:9: Error: Expected an identifier, but got '~/'.
+//   print(~/foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:44:9: Error: Expected an identifier, but got '*'.
+//   print(*foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:45:9: Error: Expected an identifier, but got '%'.
+//   print(%foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:46:9: Error: Expected an identifier, but got '|'.
+//   print(|foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:47:9: Error: Expected an identifier, but got '^'.
+//   print(^foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:48:9: Error: Expected an identifier, but got '&'.
+//   print(&foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:49:9: Error: Expected an identifier, but got '<<'.
+//   print(<<foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:50:9: Error: Expected an identifier, but got '>>'.
+//   print(>>foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:54:13: Error: '~' isn't a binary operator.
+//   print(foo ~ 2);
+//             ^
+//
+import self as self;
+import "dart:core" as core;
+
+class Foo extends core::Object {
+  synthetic constructor •() → self::Foo
+    : super core::Object::•()
+    ;
+}
+static method main() → dynamic {
+  self::Foo foo = new self::Foo::•();
+  core::print(foo.<(2));
+  core::print(foo.>(2));
+  core::print(foo.<=(2));
+  core::print(foo.>=(2));
+  core::print(foo.==(2));
+  core::print(foo.-(2));
+  core::print(foo.+(2));
+  core::print(foo./(2));
+  core::print(foo.~/(2));
+  core::print(foo.*(2));
+  core::print(foo.%(2));
+  core::print(foo.|(2));
+  core::print(foo.^(2));
+  core::print(foo.&(2));
+  core::print(foo.<<(2));
+  core::print(foo.>>(2));
+  core::print(let final dynamic #t1 = foo in let final dynamic #t2 = 2 in let final dynamic #t3 = 2 in let final dynamic #t4 = #t1.[]=(#t2, #t3) in #t3);
+  core::print(foo.[](2));
+  core::print(foo.~());
+  core::print(foo.unary-());
+  core::print(<invalid-type>[]);
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:37:9: Error: This couldn't be parsed.
+  print(>foo);
+        ^".>(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:38:9: Error: This couldn't be parsed.
+  print(<=foo);
+        ^".<=(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:39:9: Error: This couldn't be parsed.
+  print(>=foo);
+        ^".>=(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:40:9: Error: This couldn't be parsed.
+  print(==foo);
+        ^".==(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:41:9: Error: This couldn't be parsed.
+  print(+foo);
+        ^".+(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:42:9: Error: This couldn't be parsed.
+  print(/foo);
+        ^"./(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:43:9: Error: This couldn't be parsed.
+  print(~/foo);
+        ^".~/(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:44:9: Error: This couldn't be parsed.
+  print(*foo);
+        ^".*(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:45:9: Error: This couldn't be parsed.
+  print(%foo);
+        ^".%(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:46:9: Error: This couldn't be parsed.
+  print(|foo);
+        ^".|(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:47:9: Error: This couldn't be parsed.
+  print(^foo);
+        ^".^(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:48:9: Error: This couldn't be parsed.
+  print(&foo);
+        ^".&(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:49:9: Error: This couldn't be parsed.
+  print(<<foo);
+        ^".<<(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:50:9: Error: This couldn't be parsed.
+  print(>>foo);
+        ^".>>(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:54:13: Error: '~' isn't a binary operator.
+  print(foo ~ 2);
+            ^");
+}
diff --git a/pkg/front_end/testcases/operator_method_not_found.dart.legacy.transformed.expect b/pkg/front_end/testcases/operator_method_not_found.dart.legacy.transformed.expect
new file mode 100644
index 0000000..0abf9ef
--- /dev/null
+++ b/pkg/front_end/testcases/operator_method_not_found.dart.legacy.transformed.expect
@@ -0,0 +1,154 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:36:10: Error: Expected '>' after this.
+//   print(<foo);
+//          ^^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:36:13: Error: Expected '[' before this.
+//   print(<foo);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:36:10: Warning: 'foo' isn't a type.
+//   print(<foo);
+//          ^^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:37:9: Error: Expected an identifier, but got '>'.
+//   print(>foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:38:9: Error: Expected an identifier, but got '<='.
+//   print(<=foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:39:9: Error: Expected an identifier, but got '>='.
+//   print(>=foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:40:9: Error: Expected an identifier, but got '=='.
+//   print(==foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:41:9: Error: '+' is not a prefix operator.
+// Try removing '+'.
+//   print(+foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:42:9: Error: Expected an identifier, but got '/'.
+//   print(/foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:43:9: Error: Expected an identifier, but got '~/'.
+//   print(~/foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:44:9: Error: Expected an identifier, but got '*'.
+//   print(*foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:45:9: Error: Expected an identifier, but got '%'.
+//   print(%foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:46:9: Error: Expected an identifier, but got '|'.
+//   print(|foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:47:9: Error: Expected an identifier, but got '^'.
+//   print(^foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:48:9: Error: Expected an identifier, but got '&'.
+//   print(&foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:49:9: Error: Expected an identifier, but got '<<'.
+//   print(<<foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:50:9: Error: Expected an identifier, but got '>>'.
+//   print(>>foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:54:13: Error: '~' isn't a binary operator.
+//   print(foo ~ 2);
+//             ^
+//
+import self as self;
+import "dart:core" as core;
+
+class Foo extends core::Object {
+  synthetic constructor •() → self::Foo
+    : super core::Object::•()
+    ;
+}
+static method main() → dynamic {
+  self::Foo foo = new self::Foo::•();
+  core::print(foo.<(2));
+  core::print(foo.>(2));
+  core::print(foo.<=(2));
+  core::print(foo.>=(2));
+  core::print(foo.==(2));
+  core::print(foo.-(2));
+  core::print(foo.+(2));
+  core::print(foo./(2));
+  core::print(foo.~/(2));
+  core::print(foo.*(2));
+  core::print(foo.%(2));
+  core::print(foo.|(2));
+  core::print(foo.^(2));
+  core::print(foo.&(2));
+  core::print(foo.<<(2));
+  core::print(foo.>>(2));
+  core::print(let final dynamic #t1 = foo in let final dynamic #t2 = 2 in let final dynamic #t3 = 2 in let final dynamic #t4 = #t1.[]=(#t2, #t3) in #t3);
+  core::print(foo.[](2));
+  core::print(foo.~());
+  core::print(foo.unary-());
+  core::print(<invalid-type>[]);
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:37:9: Error: This couldn't be parsed.
+  print(>foo);
+        ^".>(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:38:9: Error: This couldn't be parsed.
+  print(<=foo);
+        ^".<=(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:39:9: Error: This couldn't be parsed.
+  print(>=foo);
+        ^".>=(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:40:9: Error: This couldn't be parsed.
+  print(==foo);
+        ^".==(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:41:9: Error: This couldn't be parsed.
+  print(+foo);
+        ^".+(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:42:9: Error: This couldn't be parsed.
+  print(/foo);
+        ^"./(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:43:9: Error: This couldn't be parsed.
+  print(~/foo);
+        ^".~/(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:44:9: Error: This couldn't be parsed.
+  print(*foo);
+        ^".*(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:45:9: Error: This couldn't be parsed.
+  print(%foo);
+        ^".%(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:46:9: Error: This couldn't be parsed.
+  print(|foo);
+        ^".|(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:47:9: Error: This couldn't be parsed.
+  print(^foo);
+        ^".^(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:48:9: Error: This couldn't be parsed.
+  print(&foo);
+        ^".&(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:49:9: Error: This couldn't be parsed.
+  print(<<foo);
+        ^".<<(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:50:9: Error: This couldn't be parsed.
+  print(>>foo);
+        ^".>>(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:54:13: Error: '~' isn't a binary operator.
+  print(foo ~ 2);
+            ^");
+}
diff --git a/pkg/front_end/testcases/operator_method_not_found.dart.outline.expect b/pkg/front_end/testcases/operator_method_not_found.dart.outline.expect
new file mode 100644
index 0000000..7835c54
--- /dev/null
+++ b/pkg/front_end/testcases/operator_method_not_found.dart.outline.expect
@@ -0,0 +1,10 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+class Foo extends core::Object {
+  synthetic constructor •() → self::Foo
+    ;
+}
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/operator_method_not_found.dart.strong.expect b/pkg/front_end/testcases/operator_method_not_found.dart.strong.expect
new file mode 100644
index 0000000..ec89d36
--- /dev/null
+++ b/pkg/front_end/testcases/operator_method_not_found.dart.strong.expect
@@ -0,0 +1,344 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:36:10: Error: Expected '>' after this.
+//   print(<foo);
+//          ^^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:36:13: Error: Expected '[' before this.
+//   print(<foo);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:36:10: Error: 'foo' isn't a type.
+//   print(<foo);
+//          ^^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:37:9: Error: Expected an identifier, but got '>'.
+//   print(>foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:38:9: Error: Expected an identifier, but got '<='.
+//   print(<=foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:39:9: Error: Expected an identifier, but got '>='.
+//   print(>=foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:40:9: Error: Expected an identifier, but got '=='.
+//   print(==foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:41:9: Error: '+' is not a prefix operator.
+// Try removing '+'.
+//   print(+foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:42:9: Error: Expected an identifier, but got '/'.
+//   print(/foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:43:9: Error: Expected an identifier, but got '~/'.
+//   print(~/foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:44:9: Error: Expected an identifier, but got '*'.
+//   print(*foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:45:9: Error: Expected an identifier, but got '%'.
+//   print(%foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:46:9: Error: Expected an identifier, but got '|'.
+//   print(|foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:47:9: Error: Expected an identifier, but got '^'.
+//   print(^foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:48:9: Error: Expected an identifier, but got '&'.
+//   print(&foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:49:9: Error: Expected an identifier, but got '<<'.
+//   print(<<foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:50:9: Error: Expected an identifier, but got '>>'.
+//   print(>>foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:54:13: Error: '~' isn't a binary operator.
+//   print(foo ~ 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:12:13: Error: The method '<' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '<'.
+//   print(foo < 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:13:13: Error: The method '>' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '>'.
+//   print(foo > 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:14:13: Error: The method '<=' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '<='.
+//   print(foo <= 2);
+//             ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:15:13: Error: The method '>=' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '>='.
+//   print(foo >= 2);
+//             ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:17:13: Error: The method '-' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '-'.
+//   print(foo - 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:18:13: Error: The method '+' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '+'.
+//   print(foo + 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:19:13: Error: The method '/' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '/'.
+//   print(foo / 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:20:13: Error: The method '~/' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '~/'.
+//   print(foo ~/ 2);
+//             ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:21:13: Error: The method '*' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '*'.
+//   print(foo * 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:22:13: Error: The method '%' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '%'.
+//   print(foo % 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:23:13: Error: The method '|' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '|'.
+//   print(foo | 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:24:13: Error: The method '^' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '^'.
+//   print(foo ^ 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:25:13: Error: The method '&' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '&'.
+//   print(foo & 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:26:13: Error: The method '<<' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '<<'.
+//   print(foo << 2);
+//             ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:27:13: Error: The method '>>' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '>>'.
+//   print(foo >> 2);
+//             ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:29:12: Error: The method '[]=' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '[]='.
+//   print(foo[2] = 2);
+//            ^^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:30:12: Error: The method '[]' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '[]'.
+//   print(foo[2]);
+//            ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:31:9: Error: The method '~' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '~'.
+//   print(~foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:32:9: Error: The method 'unary-' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named 'unary-'.
+//   print(-foo);
+//         ^
+//
+import self as self;
+import "dart:core" as core;
+
+class Foo extends core::Object {
+  synthetic constructor •() → self::Foo
+    : super core::Object::•()
+    ;
+}
+static method main() → dynamic {
+  self::Foo foo = new self::Foo::•();
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:12:13: Error: The method '<' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '<'.
+  print(foo < 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:13:13: Error: The method '>' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '>'.
+  print(foo > 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:14:13: Error: The method '<=' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '<='.
+  print(foo <= 2);
+            ^^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:15:13: Error: The method '>=' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '>='.
+  print(foo >= 2);
+            ^^");
+  core::print(foo.{core::Object::==}(2));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:17:13: Error: The method '-' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '-'.
+  print(foo - 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:18:13: Error: The method '+' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '+'.
+  print(foo + 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:19:13: Error: The method '/' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '/'.
+  print(foo / 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:20:13: Error: The method '~/' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '~/'.
+  print(foo ~/ 2);
+            ^^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:21:13: Error: The method '*' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '*'.
+  print(foo * 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:22:13: Error: The method '%' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '%'.
+  print(foo % 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:23:13: Error: The method '|' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '|'.
+  print(foo | 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:24:13: Error: The method '^' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '^'.
+  print(foo ^ 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:25:13: Error: The method '&' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '&'.
+  print(foo & 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:26:13: Error: The method '<<' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '<<'.
+  print(foo << 2);
+            ^^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:27:13: Error: The method '>>' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '>>'.
+  print(foo >> 2);
+            ^^");
+  core::print(let final self::Foo #t1 = foo in let final core::int #t2 = 2 in let final core::int #t3 = 2 in let final dynamic #t4 = invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:29:12: Error: The method '[]=' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '[]='.
+  print(foo[2] = 2);
+           ^^^" in #t3);
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:30:12: Error: The method '[]' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '[]'.
+  print(foo[2]);
+           ^^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:31:9: Error: The method '~' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '~'.
+  print(~foo);
+        ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:32:9: Error: The method 'unary-' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named 'unary-'.
+  print(-foo);
+        ^");
+  core::print(<invalid-type>[]);
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:37:9: Error: This couldn't be parsed.
+  print(>foo);
+        ^".>(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:38:9: Error: This couldn't be parsed.
+  print(<=foo);
+        ^".<=(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:39:9: Error: This couldn't be parsed.
+  print(>=foo);
+        ^".>=(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:40:9: Error: This couldn't be parsed.
+  print(==foo);
+        ^".{core::Object::==}(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:41:9: Error: This couldn't be parsed.
+  print(+foo);
+        ^".+(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:42:9: Error: This couldn't be parsed.
+  print(/foo);
+        ^"./(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:43:9: Error: This couldn't be parsed.
+  print(~/foo);
+        ^".~/(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:44:9: Error: This couldn't be parsed.
+  print(*foo);
+        ^".*(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:45:9: Error: This couldn't be parsed.
+  print(%foo);
+        ^".%(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:46:9: Error: This couldn't be parsed.
+  print(|foo);
+        ^".|(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:47:9: Error: This couldn't be parsed.
+  print(^foo);
+        ^".^(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:48:9: Error: This couldn't be parsed.
+  print(&foo);
+        ^".&(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:49:9: Error: This couldn't be parsed.
+  print(<<foo);
+        ^".<<(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:50:9: Error: This couldn't be parsed.
+  print(>>foo);
+        ^".>>(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:54:13: Error: '~' isn't a binary operator.
+  print(foo ~ 2);
+            ^");
+}
diff --git a/pkg/front_end/testcases/operator_method_not_found.dart.strong.transformed.expect b/pkg/front_end/testcases/operator_method_not_found.dart.strong.transformed.expect
new file mode 100644
index 0000000..ec89d36
--- /dev/null
+++ b/pkg/front_end/testcases/operator_method_not_found.dart.strong.transformed.expect
@@ -0,0 +1,344 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:36:10: Error: Expected '>' after this.
+//   print(<foo);
+//          ^^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:36:13: Error: Expected '[' before this.
+//   print(<foo);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:36:10: Error: 'foo' isn't a type.
+//   print(<foo);
+//          ^^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:37:9: Error: Expected an identifier, but got '>'.
+//   print(>foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:38:9: Error: Expected an identifier, but got '<='.
+//   print(<=foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:39:9: Error: Expected an identifier, but got '>='.
+//   print(>=foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:40:9: Error: Expected an identifier, but got '=='.
+//   print(==foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:41:9: Error: '+' is not a prefix operator.
+// Try removing '+'.
+//   print(+foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:42:9: Error: Expected an identifier, but got '/'.
+//   print(/foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:43:9: Error: Expected an identifier, but got '~/'.
+//   print(~/foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:44:9: Error: Expected an identifier, but got '*'.
+//   print(*foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:45:9: Error: Expected an identifier, but got '%'.
+//   print(%foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:46:9: Error: Expected an identifier, but got '|'.
+//   print(|foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:47:9: Error: Expected an identifier, but got '^'.
+//   print(^foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:48:9: Error: Expected an identifier, but got '&'.
+//   print(&foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:49:9: Error: Expected an identifier, but got '<<'.
+//   print(<<foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:50:9: Error: Expected an identifier, but got '>>'.
+//   print(>>foo);
+//         ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:54:13: Error: '~' isn't a binary operator.
+//   print(foo ~ 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:12:13: Error: The method '<' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '<'.
+//   print(foo < 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:13:13: Error: The method '>' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '>'.
+//   print(foo > 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:14:13: Error: The method '<=' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '<='.
+//   print(foo <= 2);
+//             ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:15:13: Error: The method '>=' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '>='.
+//   print(foo >= 2);
+//             ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:17:13: Error: The method '-' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '-'.
+//   print(foo - 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:18:13: Error: The method '+' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '+'.
+//   print(foo + 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:19:13: Error: The method '/' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '/'.
+//   print(foo / 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:20:13: Error: The method '~/' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '~/'.
+//   print(foo ~/ 2);
+//             ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:21:13: Error: The method '*' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '*'.
+//   print(foo * 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:22:13: Error: The method '%' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '%'.
+//   print(foo % 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:23:13: Error: The method '|' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '|'.
+//   print(foo | 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:24:13: Error: The method '^' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '^'.
+//   print(foo ^ 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:25:13: Error: The method '&' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '&'.
+//   print(foo & 2);
+//             ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:26:13: Error: The method '<<' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '<<'.
+//   print(foo << 2);
+//             ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:27:13: Error: The method '>>' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '>>'.
+//   print(foo >> 2);
+//             ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:29:12: Error: The method '[]=' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '[]='.
+//   print(foo[2] = 2);
+//            ^^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:30:12: Error: The method '[]' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '[]'.
+//   print(foo[2]);
+//            ^^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:31:9: Error: The method '~' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named '~'.
+//   print(~foo);
+//         ^
+//
+// pkg/front_end/testcases/operator_method_not_found.dart:32:9: Error: The method 'unary-' isn't defined for the class 'Foo'.
+//  - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+// Try correcting the name to the name of an existing method, or defining a method named 'unary-'.
+//   print(-foo);
+//         ^
+//
+import self as self;
+import "dart:core" as core;
+
+class Foo extends core::Object {
+  synthetic constructor •() → self::Foo
+    : super core::Object::•()
+    ;
+}
+static method main() → dynamic {
+  self::Foo foo = new self::Foo::•();
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:12:13: Error: The method '<' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '<'.
+  print(foo < 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:13:13: Error: The method '>' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '>'.
+  print(foo > 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:14:13: Error: The method '<=' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '<='.
+  print(foo <= 2);
+            ^^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:15:13: Error: The method '>=' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '>='.
+  print(foo >= 2);
+            ^^");
+  core::print(foo.{core::Object::==}(2));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:17:13: Error: The method '-' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '-'.
+  print(foo - 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:18:13: Error: The method '+' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '+'.
+  print(foo + 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:19:13: Error: The method '/' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '/'.
+  print(foo / 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:20:13: Error: The method '~/' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '~/'.
+  print(foo ~/ 2);
+            ^^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:21:13: Error: The method '*' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '*'.
+  print(foo * 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:22:13: Error: The method '%' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '%'.
+  print(foo % 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:23:13: Error: The method '|' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '|'.
+  print(foo | 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:24:13: Error: The method '^' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '^'.
+  print(foo ^ 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:25:13: Error: The method '&' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '&'.
+  print(foo & 2);
+            ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:26:13: Error: The method '<<' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '<<'.
+  print(foo << 2);
+            ^^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:27:13: Error: The method '>>' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '>>'.
+  print(foo >> 2);
+            ^^");
+  core::print(let final self::Foo #t1 = foo in let final core::int #t2 = 2 in let final core::int #t3 = 2 in let final dynamic #t4 = invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:29:12: Error: The method '[]=' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '[]='.
+  print(foo[2] = 2);
+           ^^^" in #t3);
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:30:12: Error: The method '[]' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '[]'.
+  print(foo[2]);
+           ^^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:31:9: Error: The method '~' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named '~'.
+  print(~foo);
+        ^");
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:32:9: Error: The method 'unary-' isn't defined for the class 'Foo'.
+ - 'Foo' is from 'pkg/front_end/testcases/operator_method_not_found.dart'.
+Try correcting the name to the name of an existing method, or defining a method named 'unary-'.
+  print(-foo);
+        ^");
+  core::print(<invalid-type>[]);
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:37:9: Error: This couldn't be parsed.
+  print(>foo);
+        ^".>(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:38:9: Error: This couldn't be parsed.
+  print(<=foo);
+        ^".<=(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:39:9: Error: This couldn't be parsed.
+  print(>=foo);
+        ^".>=(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:40:9: Error: This couldn't be parsed.
+  print(==foo);
+        ^".{core::Object::==}(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:41:9: Error: This couldn't be parsed.
+  print(+foo);
+        ^".+(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:42:9: Error: This couldn't be parsed.
+  print(/foo);
+        ^"./(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:43:9: Error: This couldn't be parsed.
+  print(~/foo);
+        ^".~/(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:44:9: Error: This couldn't be parsed.
+  print(*foo);
+        ^".*(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:45:9: Error: This couldn't be parsed.
+  print(%foo);
+        ^".%(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:46:9: Error: This couldn't be parsed.
+  print(|foo);
+        ^".|(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:47:9: Error: This couldn't be parsed.
+  print(^foo);
+        ^".^(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:48:9: Error: This couldn't be parsed.
+  print(&foo);
+        ^".&(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:49:9: Error: This couldn't be parsed.
+  print(<<foo);
+        ^".<<(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:50:9: Error: This couldn't be parsed.
+  print(>>foo);
+        ^".>>(foo));
+  core::print(invalid-expression "pkg/front_end/testcases/operator_method_not_found.dart:54:13: Error: '~' isn't a binary operator.
+  print(foo ~ 2);
+            ^");
+}
diff --git a/pkg/front_end/testcases/outline.status b/pkg/front_end/testcases/outline.status
index da7ac91..59f7d53 100644
--- a/pkg/front_end/testcases/outline.status
+++ b/pkg/front_end/testcases/outline.status
@@ -240,7 +240,6 @@
 inference/unsafe_block_closure_inference_method_call_no_type_param: Fail
 inference/void_return_type_subtypes_dynamic: Fail
 
-rasta/issue_000045: Fail
 rasta/issue_000047: Fail
 rasta/native_is_illegal: Pass # Issue 29763
 rasta/type_with_parse_error: Fail
diff --git a/pkg/front_end/testcases/override_check_accessor_after_inference.dart b/pkg/front_end/testcases/override_check_accessor_after_inference.dart
index 94bf861..7d43fe9 100644
--- a/pkg/front_end/testcases/override_check_accessor_after_inference.dart
+++ b/pkg/front_end/testcases/override_check_accessor_after_inference.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.
 
-/*@testedFeatures=error*/
-
 class A {}
 
 class B extends A {}
@@ -24,8 +22,8 @@
 }
 
 class F extends D {
-  void set x(B /*@error=OverrideTypeMismatchParameter*/ value) {}
-  A get /*@error=OverrideTypeMismatchReturnType*/ y => null;
+  void set x(B value) {}
+  A get y => null;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/override_check_accessor_after_inference.dart.strong.expect b/pkg/front_end/testcases/override_check_accessor_after_inference.dart.strong.expect
index e11b390..b932a13 100644
--- a/pkg/front_end/testcases/override_check_accessor_after_inference.dart.strong.expect
+++ b/pkg/front_end/testcases/override_check_accessor_after_inference.dart.strong.expect
@@ -2,23 +2,23 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/override_check_accessor_after_inference.dart:28:51: Error: The return type of the method 'F.y' is 'A', which does not match the return type of the overridden method, 'B'.
+// pkg/front_end/testcases/override_check_accessor_after_inference.dart:26:9: Error: The return type of the method 'F.y' is 'A', which does not match the return type, 'B', of the overridden method, 'D.y'.
 //  - 'A' is from 'pkg/front_end/testcases/override_check_accessor_after_inference.dart'.
 //  - 'B' is from 'pkg/front_end/testcases/override_check_accessor_after_inference.dart'.
 // Change to a subtype of 'B'.
-//   A get /*@error=OverrideTypeMismatchReturnType*/ y => null;
-//                                                   ^
-// pkg/front_end/testcases/override_check_accessor_after_inference.dart:18:7: Context: This is the overridden method ('y').
+//   A get y => null;
+//         ^
+// pkg/front_end/testcases/override_check_accessor_after_inference.dart:16:7: Context: This is the overridden method ('y').
 //   get y => null; // Inferred type: B
 //       ^
 //
-// pkg/front_end/testcases/override_check_accessor_after_inference.dart:27:57: Error: The parameter 'value' of the method 'F.x' has type 'B', which does not match the corresponding type in the overridden method, 'A'.
+// pkg/front_end/testcases/override_check_accessor_after_inference.dart:25:16: Error: The parameter 'value' of the method 'F.x' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'D.x'.
 //  - 'B' is from 'pkg/front_end/testcases/override_check_accessor_after_inference.dart'.
 //  - 'A' is from 'pkg/front_end/testcases/override_check_accessor_after_inference.dart'.
 // Change to a supertype of 'A', or, for a covariant parameter, a subtype.
-//   void set x(B /*@error=OverrideTypeMismatchParameter*/ value) {}
-//                                                         ^
-// pkg/front_end/testcases/override_check_accessor_after_inference.dart:17:12: Context: This is the overridden method ('x').
+//   void set x(B value) {}
+//                ^
+// pkg/front_end/testcases/override_check_accessor_after_inference.dart:15:12: Context: This is the overridden method ('x').
 //   void set x(value) {} // Inferred type: A
 //            ^
 //
diff --git a/pkg/front_end/testcases/override_check_accessor_basic.dart b/pkg/front_end/testcases/override_check_accessor_basic.dart
index a5391b2..a61e5c5 100644
--- a/pkg/front_end/testcases/override_check_accessor_basic.dart
+++ b/pkg/front_end/testcases/override_check_accessor_basic.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.
 
-/*@testedFeatures=error*/
-
 class A {}
 
 class B extends A {}
@@ -19,8 +17,8 @@
 }
 
 class E extends C {
-  void set x(B /*@error=OverrideTypeMismatchParameter*/ value) {}
-  Object get /*@error=OverrideTypeMismatchReturnType*/ y => null;
+  void set x(B value) {}
+  Object get y => null;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/override_check_accessor_basic.dart.strong.expect b/pkg/front_end/testcases/override_check_accessor_basic.dart.strong.expect
index 055f4f6..5fc117f 100644
--- a/pkg/front_end/testcases/override_check_accessor_basic.dart.strong.expect
+++ b/pkg/front_end/testcases/override_check_accessor_basic.dart.strong.expect
@@ -2,23 +2,23 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/override_check_accessor_basic.dart:23:56: Error: The return type of the method 'E.y' is 'Object', which does not match the return type of the overridden method, 'A'.
+// pkg/front_end/testcases/override_check_accessor_basic.dart:21:14: Error: The return type of the method 'E.y' is 'Object', which does not match the return type, 'A', of the overridden method, 'C.y'.
 //  - 'Object' is from 'dart:core'.
 //  - 'A' is from 'pkg/front_end/testcases/override_check_accessor_basic.dart'.
 // Change to a subtype of 'A'.
-//   Object get /*@error=OverrideTypeMismatchReturnType*/ y => null;
-//                                                        ^
-// pkg/front_end/testcases/override_check_accessor_basic.dart:13:9: Context: This is the overridden method ('y').
+//   Object get y => null;
+//              ^
+// pkg/front_end/testcases/override_check_accessor_basic.dart:11:9: Context: This is the overridden method ('y').
 //   A get y => null;
 //         ^
 //
-// pkg/front_end/testcases/override_check_accessor_basic.dart:22:57: Error: The parameter 'value' of the method 'E.x' has type 'B', which does not match the corresponding type in the overridden method, 'A'.
+// pkg/front_end/testcases/override_check_accessor_basic.dart:20:16: Error: The parameter 'value' of the method 'E.x' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'C.x'.
 //  - 'B' is from 'pkg/front_end/testcases/override_check_accessor_basic.dart'.
 //  - 'A' is from 'pkg/front_end/testcases/override_check_accessor_basic.dart'.
 // Change to a supertype of 'A', or, for a covariant parameter, a subtype.
-//   void set x(B /*@error=OverrideTypeMismatchParameter*/ value) {}
-//                                                         ^
-// pkg/front_end/testcases/override_check_accessor_basic.dart:12:12: Context: This is the overridden method ('x').
+//   void set x(B value) {}
+//                ^
+// pkg/front_end/testcases/override_check_accessor_basic.dart:10:12: Context: This is the overridden method ('x').
 //   void set x(A value) {}
 //            ^
 //
diff --git a/pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart b/pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart
index a679cb1..69ca3c0 100644
--- a/pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart
+++ b/pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.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.
 
-/*@testedFeatures=error*/
-
 class A {}
 
 class B extends A {}
@@ -21,10 +19,8 @@
   void set x1(B value) {} // Ok because covariant is inherited
   void set x2(covariant B value) {} // Ok because covariant
   void set x3(covariant B value) {} // Ok because covariant
-  void set x4(
-      B /*@error=OverrideTypeMismatchParameter*/ value) {} // Not covariant
-  void set x5(
-      covariant String /*@error=OverrideTypeMismatchParameter*/ value) {}
+  void set x4(B value) {} // Not covariant
+  void set x5(covariant String value) {}
   void set x6(covariant A value) {} // Always ok
 }
 
diff --git a/pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart.strong.expect b/pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart.strong.expect
index 5fa7ead..765bd58 100644
--- a/pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart.strong.expect
+++ b/pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart.strong.expect
@@ -2,22 +2,22 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart:25:50: Error: The parameter 'value' of the method 'D.x4' has type 'B', which does not match the corresponding type in the overridden method, 'A'.
+// pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart:22:17: Error: The parameter 'value' of the method 'D.x4' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'C.x4'.
 //  - 'B' is from 'pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart'.
 //  - 'A' is from 'pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart'.
 // Change to a supertype of 'A', or, for a covariant parameter, a subtype.
-//       B /*@error=OverrideTypeMismatchParameter*/ value) {} // Not covariant
-//                                                  ^
-// pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart:15:12: Context: This is the overridden method ('x4').
+//   void set x4(B value) {} // Not covariant
+//                 ^
+// pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart:13:12: Context: This is the overridden method ('x4').
 //   void set x4(A value) {}
 //            ^
 //
-// pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart:27:65: Error: The parameter 'value' of the method 'D.x5' has type 'String', which does not match the corresponding type in the overridden method, 'A'.
+// pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart:23:32: Error: The parameter 'value' of the method 'D.x5' has type 'String', which does not match the corresponding type, 'A', in the overridden method, 'C.x5'.
 //  - 'A' is from 'pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart'.
 // Change to a supertype of 'A', or, for a covariant parameter, a subtype.
-//       covariant String /*@error=OverrideTypeMismatchParameter*/ value) {}
-//                                                                 ^
-// pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart:16:12: Context: This is the overridden method ('x5').
+//   void set x5(covariant String value) {}
+//                                ^
+// pkg/front_end/testcases/override_check_accessor_with_covariant_modifier.dart:14:12: Context: This is the overridden method ('x5').
 //   void set x5(covariant A value) {}
 //            ^
 //
diff --git a/pkg/front_end/testcases/override_check_after_inference.dart b/pkg/front_end/testcases/override_check_after_inference.dart
index 9777a7e..e818940 100644
--- a/pkg/front_end/testcases/override_check_after_inference.dart
+++ b/pkg/front_end/testcases/override_check_after_inference.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.
 
-/*@testedFeatures=error*/
-
 class A {}
 
 class B extends A {}
@@ -21,7 +19,7 @@
 }
 
 class F extends D {
-  void f(B /*@error=OverrideTypeMismatchParameter*/ x) {}
+  void f(B x) {}
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/override_check_after_inference.dart.strong.expect b/pkg/front_end/testcases/override_check_after_inference.dart.strong.expect
index 5e5e5ac..c6fbf23 100644
--- a/pkg/front_end/testcases/override_check_after_inference.dart.strong.expect
+++ b/pkg/front_end/testcases/override_check_after_inference.dart.strong.expect
@@ -2,13 +2,13 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/override_check_after_inference.dart:24:53: Error: The parameter 'x' of the method 'F.f' has type 'B', which does not match the corresponding type in the overridden method, 'A'.
+// pkg/front_end/testcases/override_check_after_inference.dart:22:12: Error: The parameter 'x' of the method 'F.f' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'D.f'.
 //  - 'B' is from 'pkg/front_end/testcases/override_check_after_inference.dart'.
 //  - 'A' is from 'pkg/front_end/testcases/override_check_after_inference.dart'.
 // Change to a supertype of 'A', or, for a covariant parameter, a subtype.
-//   void f(B /*@error=OverrideTypeMismatchParameter*/ x) {}
-//                                                     ^
-// pkg/front_end/testcases/override_check_after_inference.dart:16:8: Context: This is the overridden method ('f').
+//   void f(B x) {}
+//            ^
+// pkg/front_end/testcases/override_check_after_inference.dart:14:8: Context: This is the overridden method ('f').
 //   void f(x) {} // Inferred type: (A) -> void
 //        ^
 //
diff --git a/pkg/front_end/testcases/override_check_basic.dart b/pkg/front_end/testcases/override_check_basic.dart
index 70134a6..69c1593 100644
--- a/pkg/front_end/testcases/override_check_basic.dart
+++ b/pkg/front_end/testcases/override_check_basic.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.
 
-/*@testedFeatures=error*/
-
 class A {}
 
 class B extends A {}
@@ -23,10 +21,10 @@
 }
 
 class E extends C {
-  void f1(B /*@error=OverrideTypeMismatchParameter*/ x) {}
-  void f2([B /*@error=OverrideTypeMismatchParameter*/ x]) {}
-  void f3({B /*@error=OverrideTypeMismatchParameter*/ x}) {}
-  Object /*@error=OverrideTypeMismatchReturnType*/ f4() {}
+  void f1(B x) {}
+  void f2([B x]) {}
+  void f3({B x}) {}
+  Object f4() {}
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/override_check_basic.dart.strong.expect b/pkg/front_end/testcases/override_check_basic.dart.strong.expect
index 7810d9b..e767515 100644
--- a/pkg/front_end/testcases/override_check_basic.dart.strong.expect
+++ b/pkg/front_end/testcases/override_check_basic.dart.strong.expect
@@ -2,43 +2,43 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/override_check_basic.dart:29:52: Error: The return type of the method 'E.f4' is 'Object', which does not match the return type of the overridden method, 'A'.
+// pkg/front_end/testcases/override_check_basic.dart:27:10: Error: The return type of the method 'E.f4' is 'Object', which does not match the return type, 'A', of the overridden method, 'C.f4'.
 //  - 'Object' is from 'dart:core'.
 //  - 'A' is from 'pkg/front_end/testcases/override_check_basic.dart'.
 // Change to a subtype of 'A'.
-//   Object /*@error=OverrideTypeMismatchReturnType*/ f4() {}
-//                                                    ^
-// pkg/front_end/testcases/override_check_basic.dart:15:5: Context: This is the overridden method ('f4').
+//   Object f4() {}
+//          ^
+// pkg/front_end/testcases/override_check_basic.dart:13:5: Context: This is the overridden method ('f4').
 //   A f4() {}
 //     ^
 //
-// pkg/front_end/testcases/override_check_basic.dart:28:55: Error: The parameter 'x' of the method 'E.f3' has type 'B', which does not match the corresponding type in the overridden method, 'A'.
+// pkg/front_end/testcases/override_check_basic.dart:26:14: Error: The parameter 'x' of the method 'E.f3' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'C.f3'.
 //  - 'B' is from 'pkg/front_end/testcases/override_check_basic.dart'.
 //  - 'A' is from 'pkg/front_end/testcases/override_check_basic.dart'.
 // Change to a supertype of 'A', or, for a covariant parameter, a subtype.
-//   void f3({B /*@error=OverrideTypeMismatchParameter*/ x}) {}
-//                                                       ^
-// pkg/front_end/testcases/override_check_basic.dart:14:8: Context: This is the overridden method ('f3').
+//   void f3({B x}) {}
+//              ^
+// pkg/front_end/testcases/override_check_basic.dart:12:8: Context: This is the overridden method ('f3').
 //   void f3({A x}) {}
 //        ^
 //
-// pkg/front_end/testcases/override_check_basic.dart:26:54: Error: The parameter 'x' of the method 'E.f1' has type 'B', which does not match the corresponding type in the overridden method, 'A'.
+// pkg/front_end/testcases/override_check_basic.dart:24:13: Error: The parameter 'x' of the method 'E.f1' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'C.f1'.
 //  - 'B' is from 'pkg/front_end/testcases/override_check_basic.dart'.
 //  - 'A' is from 'pkg/front_end/testcases/override_check_basic.dart'.
 // Change to a supertype of 'A', or, for a covariant parameter, a subtype.
-//   void f1(B /*@error=OverrideTypeMismatchParameter*/ x) {}
-//                                                      ^
-// pkg/front_end/testcases/override_check_basic.dart:12:8: Context: This is the overridden method ('f1').
+//   void f1(B x) {}
+//             ^
+// pkg/front_end/testcases/override_check_basic.dart:10:8: Context: This is the overridden method ('f1').
 //   void f1(A x) {}
 //        ^
 //
-// pkg/front_end/testcases/override_check_basic.dart:27:55: Error: The parameter 'x' of the method 'E.f2' has type 'B', which does not match the corresponding type in the overridden method, 'A'.
+// pkg/front_end/testcases/override_check_basic.dart:25:14: Error: The parameter 'x' of the method 'E.f2' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'C.f2'.
 //  - 'B' is from 'pkg/front_end/testcases/override_check_basic.dart'.
 //  - 'A' is from 'pkg/front_end/testcases/override_check_basic.dart'.
 // Change to a supertype of 'A', or, for a covariant parameter, a subtype.
-//   void f2([B /*@error=OverrideTypeMismatchParameter*/ x]) {}
-//                                                       ^
-// pkg/front_end/testcases/override_check_basic.dart:13:8: Context: This is the overridden method ('f2').
+//   void f2([B x]) {}
+//              ^
+// pkg/front_end/testcases/override_check_basic.dart:11:8: Context: This is the overridden method ('f2').
 //   void f2([A x]) {}
 //        ^
 //
diff --git a/pkg/front_end/testcases/override_check_generic_method_f_bounded.dart.hierarchy.expect b/pkg/front_end/testcases/override_check_generic_method_f_bounded.dart.hierarchy.expect
index 98db882..d53d249 100644
--- a/pkg/front_end/testcases/override_check_generic_method_f_bounded.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/override_check_generic_method_f_bounded.dart.hierarchy.expect
@@ -54,6 +54,7 @@
   classSetters:
 
 Hest:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Bar
diff --git a/pkg/front_end/testcases/override_check_two_substitutions.dart b/pkg/front_end/testcases/override_check_two_substitutions.dart
index 98ab523..5f5ea0f 100644
--- a/pkg/front_end/testcases/override_check_two_substitutions.dart
+++ b/pkg/front_end/testcases/override_check_two_substitutions.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.
 
-/*@testedFeatures=error*/
-
 class A<T> {
   void f<U>(Map<T, U> m) {}
 }
diff --git a/pkg/front_end/testcases/override_check_two_substitutions.dart.legacy.expect b/pkg/front_end/testcases/override_check_two_substitutions.dart.legacy.expect
index dfd8d78..dd0c4d5 100644
--- a/pkg/front_end/testcases/override_check_two_substitutions.dart.legacy.expect
+++ b/pkg/front_end/testcases/override_check_two_substitutions.dart.legacy.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A<self::A::T>
     : super core::Object::•()
     ;
-  method f<U extends core::Object = dynamic>(core::Map<self::A::T, self::A::f::U> m) → void {}
+  method f<U extends core::Object = dynamic>(generic-covariant-impl core::Map<self::A::T, self::A::f::U> m) → void {}
 }
 class B extends self::A<core::String> {
   synthetic constructor •() → self::B
diff --git a/pkg/front_end/testcases/override_check_two_substitutions.dart.legacy.transformed.expect b/pkg/front_end/testcases/override_check_two_substitutions.dart.legacy.transformed.expect
index dfd8d78..dd0c4d5 100644
--- a/pkg/front_end/testcases/override_check_two_substitutions.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/override_check_two_substitutions.dart.legacy.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::A<self::A::T>
     : super core::Object::•()
     ;
-  method f<U extends core::Object = dynamic>(core::Map<self::A::T, self::A::f::U> m) → void {}
+  method f<U extends core::Object = dynamic>(generic-covariant-impl core::Map<self::A::T, self::A::f::U> m) → void {}
 }
 class B extends self::A<core::String> {
   synthetic constructor •() → self::B
diff --git a/pkg/front_end/testcases/override_check_two_substitutions.dart.outline.expect b/pkg/front_end/testcases/override_check_two_substitutions.dart.outline.expect
index 2f0107f..e836ac4 100644
--- a/pkg/front_end/testcases/override_check_two_substitutions.dart.outline.expect
+++ b/pkg/front_end/testcases/override_check_two_substitutions.dart.outline.expect
@@ -5,7 +5,7 @@
 class A<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::A<self::A::T>
     ;
-  method f<U extends core::Object = dynamic>(core::Map<self::A::T, self::A::f::U> m) → void
+  method f<U extends core::Object = dynamic>(generic-covariant-impl core::Map<self::A::T, self::A::f::U> m) → void
     ;
 }
 class B extends self::A<core::String> {
diff --git a/pkg/front_end/testcases/override_check_with_covariant_modifier.dart b/pkg/front_end/testcases/override_check_with_covariant_modifier.dart
index 715a685..09df2e39 100644
--- a/pkg/front_end/testcases/override_check_with_covariant_modifier.dart
+++ b/pkg/front_end/testcases/override_check_with_covariant_modifier.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.
 
-/*@testedFeatures=error*/
-
 class A {}
 
 class B extends A {}
@@ -21,8 +19,8 @@
   void f1(B x) {} // Ok because covariant is inherited
   void f2(covariant B x) {} // Ok because covariant
   void f3(covariant B x) {} // Ok because covariant
-  void f4(B /*@error=OverrideTypeMismatchParameter*/ x) {} // Not covariant
-  void f5(covariant String /*@error=OverrideTypeMismatchParameter*/ x) {}
+  void f4(B x) {} // Not covariant
+  void f5(covariant String x) {}
   void f6(covariant A x) {} // Always ok
 }
 
diff --git a/pkg/front_end/testcases/override_check_with_covariant_modifier.dart.strong.expect b/pkg/front_end/testcases/override_check_with_covariant_modifier.dart.strong.expect
index 96fcfd3..25f16c4 100644
--- a/pkg/front_end/testcases/override_check_with_covariant_modifier.dart.strong.expect
+++ b/pkg/front_end/testcases/override_check_with_covariant_modifier.dart.strong.expect
@@ -2,22 +2,22 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/override_check_with_covariant_modifier.dart:25:69: Error: The parameter 'x' of the method 'D.f5' has type 'String', which does not match the corresponding type in the overridden method, 'A'.
+// pkg/front_end/testcases/override_check_with_covariant_modifier.dart:23:28: Error: The parameter 'x' of the method 'D.f5' has type 'String', which does not match the corresponding type, 'A', in the overridden method, 'C.f5'.
 //  - 'A' is from 'pkg/front_end/testcases/override_check_with_covariant_modifier.dart'.
 // Change to a supertype of 'A', or, for a covariant parameter, a subtype.
-//   void f5(covariant String /*@error=OverrideTypeMismatchParameter*/ x) {}
-//                                                                     ^
-// pkg/front_end/testcases/override_check_with_covariant_modifier.dart:16:8: Context: This is the overridden method ('f5').
+//   void f5(covariant String x) {}
+//                            ^
+// pkg/front_end/testcases/override_check_with_covariant_modifier.dart:14:8: Context: This is the overridden method ('f5').
 //   void f5(covariant A x) {}
 //        ^
 //
-// pkg/front_end/testcases/override_check_with_covariant_modifier.dart:24:54: Error: The parameter 'x' of the method 'D.f4' has type 'B', which does not match the corresponding type in the overridden method, 'A'.
+// pkg/front_end/testcases/override_check_with_covariant_modifier.dart:22:13: Error: The parameter 'x' of the method 'D.f4' has type 'B', which does not match the corresponding type, 'A', in the overridden method, 'C.f4'.
 //  - 'B' is from 'pkg/front_end/testcases/override_check_with_covariant_modifier.dart'.
 //  - 'A' is from 'pkg/front_end/testcases/override_check_with_covariant_modifier.dart'.
 // Change to a supertype of 'A', or, for a covariant parameter, a subtype.
-//   void f4(B /*@error=OverrideTypeMismatchParameter*/ x) {} // Not covariant
-//                                                      ^
-// pkg/front_end/testcases/override_check_with_covariant_modifier.dart:15:8: Context: This is the overridden method ('f4').
+//   void f4(B x) {} // Not covariant
+//             ^
+// pkg/front_end/testcases/override_check_with_covariant_modifier.dart:13:8: Context: This is the overridden method ('f4').
 //   void f4(A x) {}
 //        ^
 //
diff --git a/pkg/front_end/testcases/part_not_part_of.dart.legacy.expect b/pkg/front_end/testcases/part_not_part_of.dart.legacy.expect
index a057f8b..b9dac32 100644
--- a/pkg/front_end/testcases/part_not_part_of.dart.legacy.expect
+++ b/pkg/front_end/testcases/part_not_part_of.dart.legacy.expect
@@ -17,7 +17,7 @@
 
 library;
 import self as self2;
-import "./part_not_part_of_lib1.dart" as par;
+import "part_not_part_of_lib1.dart" as par;
 
 import "org-dartlang-testcase:///part_not_part_of_lib1.dart";
 
diff --git a/pkg/front_end/testcases/part_not_part_of.dart.legacy.transformed.expect b/pkg/front_end/testcases/part_not_part_of.dart.legacy.transformed.expect
index a057f8b..b9dac32 100644
--- a/pkg/front_end/testcases/part_not_part_of.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/part_not_part_of.dart.legacy.transformed.expect
@@ -17,7 +17,7 @@
 
 library;
 import self as self2;
-import "./part_not_part_of_lib1.dart" as par;
+import "part_not_part_of_lib1.dart" as par;
 
 import "org-dartlang-testcase:///part_not_part_of_lib1.dart";
 
diff --git a/pkg/front_end/testcases/part_not_part_of.dart.strong.expect b/pkg/front_end/testcases/part_not_part_of.dart.strong.expect
index a057f8b..b9dac32 100644
--- a/pkg/front_end/testcases/part_not_part_of.dart.strong.expect
+++ b/pkg/front_end/testcases/part_not_part_of.dart.strong.expect
@@ -17,7 +17,7 @@
 
 library;
 import self as self2;
-import "./part_not_part_of_lib1.dart" as par;
+import "part_not_part_of_lib1.dart" as par;
 
 import "org-dartlang-testcase:///part_not_part_of_lib1.dart";
 
diff --git a/pkg/front_end/testcases/part_not_part_of.dart.strong.transformed.expect b/pkg/front_end/testcases/part_not_part_of.dart.strong.transformed.expect
index a057f8b..b9dac32 100644
--- a/pkg/front_end/testcases/part_not_part_of.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/part_not_part_of.dart.strong.transformed.expect
@@ -17,7 +17,7 @@
 
 library;
 import self as self2;
-import "./part_not_part_of_lib1.dart" as par;
+import "part_not_part_of_lib1.dart" as par;
 
 import "org-dartlang-testcase:///part_not_part_of_lib1.dart";
 
diff --git a/pkg/front_end/testcases/private_method_tearoff.dart.hierarchy.expect b/pkg/front_end/testcases/private_method_tearoff.dart.hierarchy.expect
index 6906912..c696ebc 100644
--- a/pkg/front_end/testcases/private_method_tearoff.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/private_method_tearoff.dart.hierarchy.expect
@@ -37,6 +37,7 @@
   classSetters:
 
 Foo:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Bar
@@ -67,6 +68,7 @@
   interfaceSetters:
 
 Baz:
+  Longest path to Object: 3
   superclasses:
     Object
       -> Foo
diff --git a/pkg/front_end/testcases/private_method_tearoff.dart.legacy.expect b/pkg/front_end/testcases/private_method_tearoff.dart.legacy.expect
index 2355e10..3e521af 100644
--- a/pkg/front_end/testcases/private_method_tearoff.dart.legacy.expect
+++ b/pkg/front_end/testcases/private_method_tearoff.dart.legacy.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./private_method_tearoff_lib.dart" as pri;
+import "private_method_tearoff_lib.dart" as pri;
 
 import "org-dartlang-testcase:///private_method_tearoff_lib.dart";
 
diff --git a/pkg/front_end/testcases/private_method_tearoff.dart.legacy.transformed.expect b/pkg/front_end/testcases/private_method_tearoff.dart.legacy.transformed.expect
index 2355e10..3e521af 100644
--- a/pkg/front_end/testcases/private_method_tearoff.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/private_method_tearoff.dart.legacy.transformed.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./private_method_tearoff_lib.dart" as pri;
+import "private_method_tearoff_lib.dart" as pri;
 
 import "org-dartlang-testcase:///private_method_tearoff_lib.dart";
 
diff --git a/pkg/front_end/testcases/private_method_tearoff.dart.outline.expect b/pkg/front_end/testcases/private_method_tearoff.dart.outline.expect
index d1c7b20..dc1a5ae 100644
--- a/pkg/front_end/testcases/private_method_tearoff.dart.outline.expect
+++ b/pkg/front_end/testcases/private_method_tearoff.dart.outline.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./private_method_tearoff_lib.dart" as pri;
+import "private_method_tearoff_lib.dart" as pri;
 
 import "org-dartlang-testcase:///private_method_tearoff_lib.dart";
 
diff --git a/pkg/front_end/testcases/private_method_tearoff.dart.strong.expect b/pkg/front_end/testcases/private_method_tearoff.dart.strong.expect
index cb76ba8..1422ece 100644
--- a/pkg/front_end/testcases/private_method_tearoff.dart.strong.expect
+++ b/pkg/front_end/testcases/private_method_tearoff.dart.strong.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./private_method_tearoff_lib.dart" as pri;
+import "private_method_tearoff_lib.dart" as pri;
 
 import "org-dartlang-testcase:///private_method_tearoff_lib.dart";
 
diff --git a/pkg/front_end/testcases/private_method_tearoff.dart.strong.transformed.expect b/pkg/front_end/testcases/private_method_tearoff.dart.strong.transformed.expect
index cb76ba8..1422ece 100644
--- a/pkg/front_end/testcases/private_method_tearoff.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/private_method_tearoff.dart.strong.transformed.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./private_method_tearoff_lib.dart" as pri;
+import "private_method_tearoff_lib.dart" as pri;
 
 import "org-dartlang-testcase:///private_method_tearoff_lib.dart";
 
diff --git a/pkg/front_end/testcases/public_method_tearoff.dart.legacy.expect b/pkg/front_end/testcases/public_method_tearoff.dart.legacy.expect
index f4aa6fe..4e942b2 100644
--- a/pkg/front_end/testcases/public_method_tearoff.dart.legacy.expect
+++ b/pkg/front_end/testcases/public_method_tearoff.dart.legacy.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./public_method_tearoff_lib.dart" as pub;
+import "public_method_tearoff_lib.dart" as pub;
 
 import "org-dartlang-testcase:///public_method_tearoff_lib.dart";
 
diff --git a/pkg/front_end/testcases/public_method_tearoff.dart.legacy.transformed.expect b/pkg/front_end/testcases/public_method_tearoff.dart.legacy.transformed.expect
index f4aa6fe..4e942b2 100644
--- a/pkg/front_end/testcases/public_method_tearoff.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/public_method_tearoff.dart.legacy.transformed.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./public_method_tearoff_lib.dart" as pub;
+import "public_method_tearoff_lib.dart" as pub;
 
 import "org-dartlang-testcase:///public_method_tearoff_lib.dart";
 
diff --git a/pkg/front_end/testcases/public_method_tearoff.dart.outline.expect b/pkg/front_end/testcases/public_method_tearoff.dart.outline.expect
index 2df3cac..7648db6 100644
--- a/pkg/front_end/testcases/public_method_tearoff.dart.outline.expect
+++ b/pkg/front_end/testcases/public_method_tearoff.dart.outline.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./public_method_tearoff_lib.dart" as pub;
+import "public_method_tearoff_lib.dart" as pub;
 
 import "org-dartlang-testcase:///public_method_tearoff_lib.dart";
 
diff --git a/pkg/front_end/testcases/public_method_tearoff.dart.strong.expect b/pkg/front_end/testcases/public_method_tearoff.dart.strong.expect
index a7c45ab..32ce75e 100644
--- a/pkg/front_end/testcases/public_method_tearoff.dart.strong.expect
+++ b/pkg/front_end/testcases/public_method_tearoff.dart.strong.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./public_method_tearoff_lib.dart" as pub;
+import "public_method_tearoff_lib.dart" as pub;
 
 import "org-dartlang-testcase:///public_method_tearoff_lib.dart";
 
diff --git a/pkg/front_end/testcases/public_method_tearoff.dart.strong.transformed.expect b/pkg/front_end/testcases/public_method_tearoff.dart.strong.transformed.expect
index a7c45ab..32ce75e 100644
--- a/pkg/front_end/testcases/public_method_tearoff.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/public_method_tearoff.dart.strong.transformed.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./public_method_tearoff_lib.dart" as pub;
+import "public_method_tearoff_lib.dart" as pub;
 
 import "org-dartlang-testcase:///public_method_tearoff_lib.dart";
 
diff --git a/pkg/front_end/testcases/qualified.dart.legacy.expect b/pkg/front_end/testcases/qualified.dart.legacy.expect
index 9abbf6a..bd70509 100644
--- a/pkg/front_end/testcases/qualified.dart.legacy.expect
+++ b/pkg/front_end/testcases/qualified.dart.legacy.expect
@@ -23,7 +23,7 @@
 //
 import self as self;
 import "dart:core" as core;
-import "./qualified_lib.dart" as lib;
+import "qualified_lib.dart" as lib;
 
 import "org-dartlang-testcase:///qualified_lib.dart" as lib;
 
@@ -73,7 +73,7 @@
 library test.qualified.lib;
 import self as lib;
 import "dart:core" as core;
-import "./qualified.dart" as self;
+import "qualified.dart" as self;
 
 import "org-dartlang-testcase:///qualified.dart" as main;
 
diff --git a/pkg/front_end/testcases/qualified.dart.legacy.transformed.expect b/pkg/front_end/testcases/qualified.dart.legacy.transformed.expect
index 6f18b56..df06d18 100644
--- a/pkg/front_end/testcases/qualified.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/qualified.dart.legacy.transformed.expect
@@ -23,7 +23,7 @@
 //
 import self as self;
 import "dart:core" as core;
-import "./qualified_lib.dart" as lib;
+import "qualified_lib.dart" as lib;
 
 import "org-dartlang-testcase:///qualified_lib.dart" as lib;
 
@@ -76,7 +76,7 @@
 library test.qualified.lib;
 import self as lib;
 import "dart:core" as core;
-import "./qualified.dart" as self;
+import "qualified.dart" as self;
 
 import "org-dartlang-testcase:///qualified.dart" as main;
 
diff --git a/pkg/front_end/testcases/qualified.dart.outline.expect b/pkg/front_end/testcases/qualified.dart.outline.expect
index a8b09cd..0fca5f9 100644
--- a/pkg/front_end/testcases/qualified.dart.outline.expect
+++ b/pkg/front_end/testcases/qualified.dart.outline.expect
@@ -23,7 +23,7 @@
 //
 import self as self;
 import "dart:core" as core;
-import "./qualified_lib.dart" as lib;
+import "qualified_lib.dart" as lib;
 
 import "org-dartlang-testcase:///qualified_lib.dart" as lib;
 
@@ -62,7 +62,7 @@
 library test.qualified.lib;
 import self as lib;
 import "dart:core" as core;
-import "./qualified.dart" as self;
+import "qualified.dart" as self;
 
 import "org-dartlang-testcase:///qualified.dart" as main;
 
diff --git a/pkg/front_end/testcases/qualified.dart.strong.expect b/pkg/front_end/testcases/qualified.dart.strong.expect
index 2844fc6..9bc943f 100644
--- a/pkg/front_end/testcases/qualified.dart.strong.expect
+++ b/pkg/front_end/testcases/qualified.dart.strong.expect
@@ -23,7 +23,7 @@
 //
 import self as self;
 import "dart:core" as core;
-import "./qualified_lib.dart" as lib;
+import "qualified_lib.dart" as lib;
 
 import "org-dartlang-testcase:///qualified_lib.dart" as lib;
 
@@ -73,7 +73,7 @@
 library test.qualified.lib;
 import self as lib;
 import "dart:core" as core;
-import "./qualified.dart" as self;
+import "qualified.dart" as self;
 
 import "org-dartlang-testcase:///qualified.dart" as main;
 
diff --git a/pkg/front_end/testcases/qualified.dart.strong.transformed.expect b/pkg/front_end/testcases/qualified.dart.strong.transformed.expect
index 807fc74..197c0d8 100644
--- a/pkg/front_end/testcases/qualified.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/qualified.dart.strong.transformed.expect
@@ -23,7 +23,7 @@
 //
 import self as self;
 import "dart:core" as core;
-import "./qualified_lib.dart" as lib;
+import "qualified_lib.dart" as lib;
 
 import "org-dartlang-testcase:///qualified_lib.dart" as lib;
 
@@ -76,7 +76,7 @@
 library test.qualified.lib;
 import self as lib;
 import "dart:core" as core;
-import "./qualified.dart" as self;
+import "qualified.dart" as self;
 
 import "org-dartlang-testcase:///qualified.dart" as main;
 
diff --git a/pkg/front_end/testcases/rasta/bad_interpolation.dart.legacy.expect b/pkg/front_end/testcases/rasta/bad_interpolation.dart.legacy.expect
new file mode 100644
index 0000000..fba617b
--- /dev/null
+++ b/pkg/front_end/testcases/rasta/bad_interpolation.dart.legacy.expect
@@ -0,0 +1,26 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/rasta/bad_interpolation.dart:6:13: Error: String starting with " must end with ".
+//   print(" $x.);
+//             ^^^
+//
+// pkg/front_end/testcases/rasta/bad_interpolation.dart:6:8: Error: Can't find ')' to match '('.
+//   print(" $x.);
+//        ^
+//
+// pkg/front_end/testcases/rasta/bad_interpolation.dart:6:12: Warning: Getter not found: 'x'.
+//   print(" $x.);
+//            ^
+//
+// pkg/front_end/testcases/rasta/bad_interpolation.dart:6:13: Error: Expected ';' after this.
+//   print(" $x.);
+//             ^^^
+//
+import self as self;
+import "dart:core" as core;
+
+static method main() → dynamic {
+  core::print(" ${throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#x, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))}.);\"");
+}
diff --git a/pkg/front_end/testcases/rasta/bad_interpolation.dart.legacy.transformed.expect b/pkg/front_end/testcases/rasta/bad_interpolation.dart.legacy.transformed.expect
new file mode 100644
index 0000000..fba617b
--- /dev/null
+++ b/pkg/front_end/testcases/rasta/bad_interpolation.dart.legacy.transformed.expect
@@ -0,0 +1,26 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/rasta/bad_interpolation.dart:6:13: Error: String starting with " must end with ".
+//   print(" $x.);
+//             ^^^
+//
+// pkg/front_end/testcases/rasta/bad_interpolation.dart:6:8: Error: Can't find ')' to match '('.
+//   print(" $x.);
+//        ^
+//
+// pkg/front_end/testcases/rasta/bad_interpolation.dart:6:12: Warning: Getter not found: 'x'.
+//   print(" $x.);
+//            ^
+//
+// pkg/front_end/testcases/rasta/bad_interpolation.dart:6:13: Error: Expected ';' after this.
+//   print(" $x.);
+//             ^^^
+//
+import self as self;
+import "dart:core" as core;
+
+static method main() → dynamic {
+  core::print(" ${throw new core::NoSuchMethodError::withInvocation(null, new core::_InvocationMirror::_withType(#x, 33, const <core::Type>[], const <dynamic>[], core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{})))}.);\"");
+}
diff --git a/pkg/front_end/testcases/rasta/bad_interpolation.dart.strong.expect b/pkg/front_end/testcases/rasta/bad_interpolation.dart.strong.expect
index 36fe259..9e8cbc2 100644
--- a/pkg/front_end/testcases/rasta/bad_interpolation.dart.strong.expect
+++ b/pkg/front_end/testcases/rasta/bad_interpolation.dart.strong.expect
@@ -24,5 +24,5 @@
 static method main() → dynamic {
   core::print(" ${invalid-expression "pkg/front_end/testcases/rasta/bad_interpolation.dart:6:12: Error: Getter not found: 'x'.
   print(\" \$x.);
-           ^"}.);");
+           ^"}.);\"");
 }
diff --git a/pkg/front_end/testcases/rasta/bad_interpolation.dart.strong.transformed.expect b/pkg/front_end/testcases/rasta/bad_interpolation.dart.strong.transformed.expect
index 36fe259..9e8cbc2 100644
--- a/pkg/front_end/testcases/rasta/bad_interpolation.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/rasta/bad_interpolation.dart.strong.transformed.expect
@@ -24,5 +24,5 @@
 static method main() → dynamic {
   core::print(" ${invalid-expression "pkg/front_end/testcases/rasta/bad_interpolation.dart:6:12: Error: Getter not found: 'x'.
   print(\" \$x.);
-           ^"}.);");
+           ^"}.);\"");
 }
diff --git a/pkg/front_end/testcases/rasta/duplicated_mixin.dart.hierarchy.expect b/pkg/front_end/testcases/rasta/duplicated_mixin.dart.hierarchy.expect
index ee525c0..8d71816 100644
--- a/pkg/front_end/testcases/rasta/duplicated_mixin.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/rasta/duplicated_mixin.dart.hierarchy.expect
@@ -38,6 +38,7 @@
     Mixin.field
 
 Object with Mixin:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Mixin
@@ -71,6 +72,7 @@
     Mixin.field
 
 _A&Object&Mixin with Mixin:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _A&Object&Mixin
@@ -105,6 +107,7 @@
     Mixin.field
 
 A:
+  Longest path to Object: 4
   superclasses:
     Object
       -> _A&Object&Mixin
diff --git a/pkg/front_end/testcases/rasta/export.dart.legacy.expect b/pkg/front_end/testcases/rasta/export.dart.legacy.expect
index 467d2a4..b0410f4 100644
--- a/pkg/front_end/testcases/rasta/export.dart.legacy.expect
+++ b/pkg/front_end/testcases/rasta/export.dart.legacy.expect
@@ -1,6 +1,6 @@
 library export;
 import self as self;
-import "./foo.dart" as foo;
+import "foo.dart" as foo;
 additionalExports = (foo::foo)
 
 
diff --git a/pkg/front_end/testcases/rasta/export.dart.legacy.transformed.expect b/pkg/front_end/testcases/rasta/export.dart.legacy.transformed.expect
index 467d2a4..b0410f4 100644
--- a/pkg/front_end/testcases/rasta/export.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/rasta/export.dart.legacy.transformed.expect
@@ -1,6 +1,6 @@
 library export;
 import self as self;
-import "./foo.dart" as foo;
+import "foo.dart" as foo;
 additionalExports = (foo::foo)
 
 
diff --git a/pkg/front_end/testcases/rasta/export.dart.outline.expect b/pkg/front_end/testcases/rasta/export.dart.outline.expect
index 7c8cd4d..2314e9e 100644
--- a/pkg/front_end/testcases/rasta/export.dart.outline.expect
+++ b/pkg/front_end/testcases/rasta/export.dart.outline.expect
@@ -1,6 +1,6 @@
 library export;
 import self as self;
-import "./foo.dart" as foo;
+import "foo.dart" as foo;
 additionalExports = (foo::foo)
 
 
diff --git a/pkg/front_end/testcases/rasta/export.dart.strong.expect b/pkg/front_end/testcases/rasta/export.dart.strong.expect
index 467d2a4..b0410f4 100644
--- a/pkg/front_end/testcases/rasta/export.dart.strong.expect
+++ b/pkg/front_end/testcases/rasta/export.dart.strong.expect
@@ -1,6 +1,6 @@
 library export;
 import self as self;
-import "./foo.dart" as foo;
+import "foo.dart" as foo;
 additionalExports = (foo::foo)
 
 
diff --git a/pkg/front_end/testcases/rasta/export.dart.strong.transformed.expect b/pkg/front_end/testcases/rasta/export.dart.strong.transformed.expect
index 467d2a4..b0410f4 100644
--- a/pkg/front_end/testcases/rasta/export.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/rasta/export.dart.strong.transformed.expect
@@ -1,6 +1,6 @@
 library export;
 import self as self;
-import "./foo.dart" as foo;
+import "foo.dart" as foo;
 additionalExports = (foo::foo)
 
 
diff --git a/pkg/front_end/testcases/rasta/import_export.dart.legacy.expect b/pkg/front_end/testcases/rasta/import_export.dart.legacy.expect
index 33c77ad..e4794e6 100644
--- a/pkg/front_end/testcases/rasta/import_export.dart.legacy.expect
+++ b/pkg/front_end/testcases/rasta/import_export.dart.legacy.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./foo.dart" as foo;
+import "foo.dart" as foo;
 
 import "org-dartlang-testcase:///export.dart";
 
@@ -10,7 +10,7 @@
 
 library export;
 import self as self2;
-import "./foo.dart" as foo;
+import "foo.dart" as foo;
 additionalExports = (foo::foo)
 
 
diff --git a/pkg/front_end/testcases/rasta/import_export.dart.legacy.transformed.expect b/pkg/front_end/testcases/rasta/import_export.dart.legacy.transformed.expect
index 33c77ad..e4794e6 100644
--- a/pkg/front_end/testcases/rasta/import_export.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/rasta/import_export.dart.legacy.transformed.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./foo.dart" as foo;
+import "foo.dart" as foo;
 
 import "org-dartlang-testcase:///export.dart";
 
@@ -10,7 +10,7 @@
 
 library export;
 import self as self2;
-import "./foo.dart" as foo;
+import "foo.dart" as foo;
 additionalExports = (foo::foo)
 
 
diff --git a/pkg/front_end/testcases/rasta/import_export.dart.outline.expect b/pkg/front_end/testcases/rasta/import_export.dart.outline.expect
index d1a411b..42bbbc3 100644
--- a/pkg/front_end/testcases/rasta/import_export.dart.outline.expect
+++ b/pkg/front_end/testcases/rasta/import_export.dart.outline.expect
@@ -8,7 +8,7 @@
 
 library export;
 import self as self2;
-import "./foo.dart" as foo;
+import "foo.dart" as foo;
 additionalExports = (foo::foo)
 
 
diff --git a/pkg/front_end/testcases/rasta/import_export.dart.strong.expect b/pkg/front_end/testcases/rasta/import_export.dart.strong.expect
index 33c77ad..e4794e6 100644
--- a/pkg/front_end/testcases/rasta/import_export.dart.strong.expect
+++ b/pkg/front_end/testcases/rasta/import_export.dart.strong.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./foo.dart" as foo;
+import "foo.dart" as foo;
 
 import "org-dartlang-testcase:///export.dart";
 
@@ -10,7 +10,7 @@
 
 library export;
 import self as self2;
-import "./foo.dart" as foo;
+import "foo.dart" as foo;
 additionalExports = (foo::foo)
 
 
diff --git a/pkg/front_end/testcases/rasta/import_export.dart.strong.transformed.expect b/pkg/front_end/testcases/rasta/import_export.dart.strong.transformed.expect
index 33c77ad..e4794e6 100644
--- a/pkg/front_end/testcases/rasta/import_export.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/rasta/import_export.dart.strong.transformed.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./foo.dart" as foo;
+import "foo.dart" as foo;
 
 import "org-dartlang-testcase:///export.dart";
 
@@ -10,7 +10,7 @@
 
 library export;
 import self as self2;
-import "./foo.dart" as foo;
+import "foo.dart" as foo;
 additionalExports = (foo::foo)
 
 
diff --git a/pkg/front_end/testcases/rasta/issue_000002.dart.hierarchy.expect b/pkg/front_end/testcases/rasta/issue_000002.dart.hierarchy.expect
index 87c1e96..8f4a8e0 100644
--- a/pkg/front_end/testcases/rasta/issue_000002.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/rasta/issue_000002.dart.hierarchy.expect
@@ -112,6 +112,7 @@
   classSetters:
 
 ExpectException:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Exception
@@ -142,40 +143,6 @@
     Object.==
   interfaceSetters:
 
-NoInline:
-  superclasses:
-    Object
-  interfaces:
-  classMembers:
-    Object.toString
-    Object.runtimeType
-    Object._simpleInstanceOf
-    Object._instanceOf
-    Object.noSuchMethod
-    Object._identityHashCode
-    Object.hashCode
-    Object._simpleInstanceOfFalse
-    Object._simpleInstanceOfTrue
-    Object.==
-  classSetters:
-
-AssumeDynamic:
-  superclasses:
-    Object
-  interfaces:
-  classMembers:
-    Object.toString
-    Object.runtimeType
-    Object._simpleInstanceOf
-    Object._instanceOf
-    Object.noSuchMethod
-    Object._identityHashCode
-    Object.hashCode
-    Object._simpleInstanceOfFalse
-    Object._simpleInstanceOfTrue
-    Object.==
-  classSetters:
-
 Immutable:
   superclasses:
     Object
diff --git a/pkg/front_end/testcases/rasta/issue_000004.dart.hierarchy.expect b/pkg/front_end/testcases/rasta/issue_000004.dart.hierarchy.expect
index 98d4425..8dc6d36 100644
--- a/pkg/front_end/testcases/rasta/issue_000004.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/rasta/issue_000004.dart.hierarchy.expect
@@ -94,6 +94,7 @@
   classSetters:
 
 ExpectException:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Exception
@@ -124,40 +125,6 @@
     Object.==
   interfaceSetters:
 
-NoInline:
-  superclasses:
-    Object
-  interfaces:
-  classMembers:
-    Object.toString
-    Object.runtimeType
-    Object._simpleInstanceOf
-    Object._instanceOf
-    Object.noSuchMethod
-    Object._identityHashCode
-    Object.hashCode
-    Object._simpleInstanceOfFalse
-    Object._simpleInstanceOfTrue
-    Object.==
-  classSetters:
-
-AssumeDynamic:
-  superclasses:
-    Object
-  interfaces:
-  classMembers:
-    Object.toString
-    Object.runtimeType
-    Object._simpleInstanceOf
-    Object._instanceOf
-    Object.noSuchMethod
-    Object._identityHashCode
-    Object.hashCode
-    Object._simpleInstanceOfFalse
-    Object._simpleInstanceOfTrue
-    Object.==
-  classSetters:
-
 Immutable:
   superclasses:
     Object
diff --git a/pkg/front_end/testcases/rasta/issue_000042.dart.strong.expect b/pkg/front_end/testcases/rasta/issue_000042.dart.strong.expect
index 356e6a0..da8f0c6 100644
--- a/pkg/front_end/testcases/rasta/issue_000042.dart.strong.expect
+++ b/pkg/front_end/testcases/rasta/issue_000042.dart.strong.expect
@@ -34,7 +34,6 @@
        ^^^";
       dynamic x;
       dynamic y;
-      {}
     }
   }
   #L1:
diff --git a/pkg/front_end/testcases/rasta/issue_000042.dart.strong.transformed.expect b/pkg/front_end/testcases/rasta/issue_000042.dart.strong.transformed.expect
index 356e6a0..da8f0c6 100644
--- a/pkg/front_end/testcases/rasta/issue_000042.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/rasta/issue_000042.dart.strong.transformed.expect
@@ -34,7 +34,6 @@
        ^^^";
       dynamic x;
       dynamic y;
-      {}
     }
   }
   #L1:
diff --git a/pkg/front_end/testcases/rasta/issue_000045.dart.legacy.expect b/pkg/front_end/testcases/rasta/issue_000045.dart.legacy.expect
index 1cafd63..2622c42 100644
--- a/pkg/front_end/testcases/rasta/issue_000045.dart.legacy.expect
+++ b/pkg/front_end/testcases/rasta/issue_000045.dart.legacy.expect
@@ -1,5 +1,19 @@
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/rasta/issue_000045.dart:5:18: Error: String starting with """ must end with """.
+// main() => """${1}
+//                  ^...
+//
+// pkg/front_end/testcases/rasta/issue_000045.dart:5:18: Error: Expected ';' after this.
+// main() => """${1}
+//                  ^...
+//
+// pkg/front_end/testcases/rasta/issue_000045.dart:6:1: Error: Unexpected token ''.
+//
 import self as self;
 
 static method main() → dynamic
-  invalid-statement;
+  return "${1}
+\"\"\"";
diff --git a/pkg/front_end/testcases/rasta/issue_000045.dart.legacy.transformed.expect b/pkg/front_end/testcases/rasta/issue_000045.dart.legacy.transformed.expect
new file mode 100644
index 0000000..2622c42
--- /dev/null
+++ b/pkg/front_end/testcases/rasta/issue_000045.dart.legacy.transformed.expect
@@ -0,0 +1,19 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/rasta/issue_000045.dart:5:18: Error: String starting with """ must end with """.
+// main() => """${1}
+//                  ^...
+//
+// pkg/front_end/testcases/rasta/issue_000045.dart:5:18: Error: Expected ';' after this.
+// main() => """${1}
+//                  ^...
+//
+// pkg/front_end/testcases/rasta/issue_000045.dart:6:1: Error: Unexpected token ''.
+//
+import self as self;
+
+static method main() → dynamic
+  return "${1}
+\"\"\"";
diff --git a/pkg/front_end/testcases/rasta/issue_000045.dart.outline.expect b/pkg/front_end/testcases/rasta/issue_000045.dart.outline.expect
index 1cafd63..562267f 100644
--- a/pkg/front_end/testcases/rasta/issue_000045.dart.outline.expect
+++ b/pkg/front_end/testcases/rasta/issue_000045.dart.outline.expect
@@ -1,5 +1,12 @@
 library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/rasta/issue_000045.dart:5:18: Error: String starting with """ must end with """.
+// main() => """${1}
+//                  ^...
+//
 import self as self;
 
 static method main() → dynamic
-  invalid-statement;
+  ;
diff --git a/pkg/front_end/testcases/rasta/issue_000045.dart.strong.expect b/pkg/front_end/testcases/rasta/issue_000045.dart.strong.expect
index 389cb09..2622c42 100644
--- a/pkg/front_end/testcases/rasta/issue_000045.dart.strong.expect
+++ b/pkg/front_end/testcases/rasta/issue_000045.dart.strong.expect
@@ -16,4 +16,4 @@
 
 static method main() → dynamic
   return "${1}
-";
+\"\"\"";
diff --git a/pkg/front_end/testcases/rasta/issue_000045.dart.strong.transformed.expect b/pkg/front_end/testcases/rasta/issue_000045.dart.strong.transformed.expect
index 389cb09..2622c42 100644
--- a/pkg/front_end/testcases/rasta/issue_000045.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/rasta/issue_000045.dart.strong.transformed.expect
@@ -16,4 +16,4 @@
 
 static method main() → dynamic
   return "${1}
-";
+\"\"\"";
diff --git a/pkg/front_end/testcases/rasta/issue_000067.dart.hierarchy.expect b/pkg/front_end/testcases/rasta/issue_000067.dart.hierarchy.expect
index 705a7e3..e760d0a 100644
--- a/pkg/front_end/testcases/rasta/issue_000067.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/rasta/issue_000067.dart.hierarchy.expect
@@ -155,6 +155,7 @@
   classSetters:
 
 ExpectException:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Exception
@@ -185,40 +186,6 @@
     Object.==
   interfaceSetters:
 
-NoInline:
-  superclasses:
-    Object
-  interfaces:
-  classMembers:
-    Object.toString
-    Object.runtimeType
-    Object._simpleInstanceOf
-    Object._instanceOf
-    Object.noSuchMethod
-    Object._identityHashCode
-    Object.hashCode
-    Object._simpleInstanceOfFalse
-    Object._simpleInstanceOfTrue
-    Object.==
-  classSetters:
-
-AssumeDynamic:
-  superclasses:
-    Object
-  interfaces:
-  classMembers:
-    Object.toString
-    Object.runtimeType
-    Object._simpleInstanceOf
-    Object._instanceOf
-    Object.noSuchMethod
-    Object._identityHashCode
-    Object.hashCode
-    Object._simpleInstanceOfFalse
-    Object._simpleInstanceOfTrue
-    Object.==
-  classSetters:
-
 Immutable:
   superclasses:
     Object
diff --git a/pkg/front_end/testcases/rasta/issue_000068.dart.hierarchy.expect b/pkg/front_end/testcases/rasta/issue_000068.dart.hierarchy.expect
index 9a18fb1..cfd122c 100644
--- a/pkg/front_end/testcases/rasta/issue_000068.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/rasta/issue_000068.dart.hierarchy.expect
@@ -165,6 +165,7 @@
   classSetters:
 
 ExpectException:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Exception
@@ -195,40 +196,6 @@
     Object.==
   interfaceSetters:
 
-NoInline:
-  superclasses:
-    Object
-  interfaces:
-  classMembers:
-    Object.toString
-    Object.runtimeType
-    Object._simpleInstanceOf
-    Object._instanceOf
-    Object.noSuchMethod
-    Object._identityHashCode
-    Object.hashCode
-    Object._simpleInstanceOfFalse
-    Object._simpleInstanceOfTrue
-    Object.==
-  classSetters:
-
-AssumeDynamic:
-  superclasses:
-    Object
-  interfaces:
-  classMembers:
-    Object.toString
-    Object.runtimeType
-    Object._simpleInstanceOf
-    Object._instanceOf
-    Object.noSuchMethod
-    Object._identityHashCode
-    Object.hashCode
-    Object._simpleInstanceOfFalse
-    Object._simpleInstanceOfTrue
-    Object.==
-  classSetters:
-
 Immutable:
   superclasses:
     Object
diff --git a/pkg/front_end/testcases/rasta/issue_000070.dart.hierarchy.expect b/pkg/front_end/testcases/rasta/issue_000070.dart.hierarchy.expect
index c2b7ee7..dbe120e 100644
--- a/pkg/front_end/testcases/rasta/issue_000070.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/rasta/issue_000070.dart.hierarchy.expect
@@ -149,6 +149,7 @@
   classSetters:
 
 ExpectException:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Exception
@@ -179,40 +180,6 @@
     Object.==
   interfaceSetters:
 
-NoInline:
-  superclasses:
-    Object
-  interfaces:
-  classMembers:
-    Object.toString
-    Object.runtimeType
-    Object._simpleInstanceOf
-    Object._instanceOf
-    Object.noSuchMethod
-    Object._identityHashCode
-    Object.hashCode
-    Object._simpleInstanceOfFalse
-    Object._simpleInstanceOfTrue
-    Object.==
-  classSetters:
-
-AssumeDynamic:
-  superclasses:
-    Object
-  interfaces:
-  classMembers:
-    Object.toString
-    Object.runtimeType
-    Object._simpleInstanceOf
-    Object._instanceOf
-    Object.noSuchMethod
-    Object._identityHashCode
-    Object.hashCode
-    Object._simpleInstanceOfFalse
-    Object._simpleInstanceOfTrue
-    Object.==
-  classSetters:
-
 Immutable:
   superclasses:
     Object
diff --git a/pkg/front_end/testcases/rasta/issue_000070.dart.legacy.expect b/pkg/front_end/testcases/rasta/issue_000070.dart.legacy.expect
index cb5054f..1deecbc 100644
--- a/pkg/front_end/testcases/rasta/issue_000070.dart.legacy.expect
+++ b/pkg/front_end/testcases/rasta/issue_000070.dart.legacy.expect
@@ -24,7 +24,7 @@
   get getter() → core::List<self::A::U> {
     return this.{self::A::field};
   }
-  set setter(self::A::S s) → void {}
+  set setter(generic-covariant-impl self::A::S s) → void {}
 }
 abstract class J<Aa extends core::Object = dynamic, B extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::J<self::J::Aa, self::J::B>
diff --git a/pkg/front_end/testcases/rasta/issue_000070.dart.legacy.transformed.expect b/pkg/front_end/testcases/rasta/issue_000070.dart.legacy.transformed.expect
index 24788b5..6f8f772 100644
--- a/pkg/front_end/testcases/rasta/issue_000070.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/rasta/issue_000070.dart.legacy.transformed.expect
@@ -24,7 +24,7 @@
   get getter() → core::List<self::A::U> {
     return this.{self::A::field};
   }
-  set setter(self::A::S s) → void {}
+  set setter(generic-covariant-impl self::A::S s) → void {}
 }
 abstract class J<Aa extends core::Object = dynamic, B extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::J<self::J::Aa, self::J::B>
diff --git a/pkg/front_end/testcases/rasta/issue_000070.dart.outline.expect b/pkg/front_end/testcases/rasta/issue_000070.dart.outline.expect
index 3f08fac..89051be 100644
--- a/pkg/front_end/testcases/rasta/issue_000070.dart.outline.expect
+++ b/pkg/front_end/testcases/rasta/issue_000070.dart.outline.expect
@@ -16,7 +16,7 @@
     ;
   get getter() → core::List<self::A::U>
     ;
-  set setter(self::A::S s) → void
+  set setter(generic-covariant-impl self::A::S s) → void
     ;
 }
 abstract class J<Aa extends core::Object = dynamic, B extends core::Object = dynamic> extends core::Object {
diff --git a/pkg/front_end/testcases/rasta/issue_000080.dart.hierarchy.expect b/pkg/front_end/testcases/rasta/issue_000080.dart.hierarchy.expect
index 76d68ab..2d401aa0a 100644
--- a/pkg/front_end/testcases/rasta/issue_000080.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/rasta/issue_000080.dart.hierarchy.expect
@@ -39,6 +39,7 @@
     Mixin.field
 
 Object with Mixin:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Mixin
@@ -74,6 +75,7 @@
     Mixin.field
 
 Foo:
+  Longest path to Object: 3
   superclasses:
     Object
       -> _Foo&Object&Mixin
diff --git a/pkg/front_end/testcases/rasta/mixin_library.dart.outline.expect b/pkg/front_end/testcases/rasta/mixin_library.dart.outline.expect
index 62d6389..47e7cdf 100644
--- a/pkg/front_end/testcases/rasta/mixin_library.dart.outline.expect
+++ b/pkg/front_end/testcases/rasta/mixin_library.dart.outline.expect
@@ -6,12 +6,12 @@
   field dynamic x;
   field dynamic y;
   field dynamic z;
-  field self::Mixin::T t;
+  generic-covariant-impl field self::Mixin::T t;
   synthetic constructor •() → self::Mixin<self::Mixin::T>
     ;
   method foo() → dynamic
     ;
-  method g(self::Mixin::T a) → self::Mixin::T
+  method g(generic-covariant-impl self::Mixin::T a) → self::Mixin::T
     ;
   method h() → dynamic
     ;
diff --git a/pkg/front_end/testcases/rasta/parser_error.dart.hierarchy.expect b/pkg/front_end/testcases/rasta/parser_error.dart.hierarchy.expect
index 98d4425..8dc6d36 100644
--- a/pkg/front_end/testcases/rasta/parser_error.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/rasta/parser_error.dart.hierarchy.expect
@@ -94,6 +94,7 @@
   classSetters:
 
 ExpectException:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Exception
@@ -124,40 +125,6 @@
     Object.==
   interfaceSetters:
 
-NoInline:
-  superclasses:
-    Object
-  interfaces:
-  classMembers:
-    Object.toString
-    Object.runtimeType
-    Object._simpleInstanceOf
-    Object._instanceOf
-    Object.noSuchMethod
-    Object._identityHashCode
-    Object.hashCode
-    Object._simpleInstanceOfFalse
-    Object._simpleInstanceOfTrue
-    Object.==
-  classSetters:
-
-AssumeDynamic:
-  superclasses:
-    Object
-  interfaces:
-  classMembers:
-    Object.toString
-    Object.runtimeType
-    Object._simpleInstanceOf
-    Object._instanceOf
-    Object.noSuchMethod
-    Object._identityHashCode
-    Object.hashCode
-    Object._simpleInstanceOfFalse
-    Object._simpleInstanceOfTrue
-    Object.==
-  classSetters:
-
 Immutable:
   superclasses:
     Object
diff --git a/pkg/front_end/testcases/rasta/previsit_deferred.dart.legacy.expect b/pkg/front_end/testcases/rasta/previsit_deferred.dart.legacy.expect
index a4ac799..0a16b0d 100644
--- a/pkg/front_end/testcases/rasta/previsit_deferred.dart.legacy.expect
+++ b/pkg/front_end/testcases/rasta/previsit_deferred.dart.legacy.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/rasta/previsit_deferred.dart.legacy.transformed.expect b/pkg/front_end/testcases/rasta/previsit_deferred.dart.legacy.transformed.expect
index a4ac799..0a16b0d 100644
--- a/pkg/front_end/testcases/rasta/previsit_deferred.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/rasta/previsit_deferred.dart.legacy.transformed.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/rasta/previsit_deferred.dart.strong.expect b/pkg/front_end/testcases/rasta/previsit_deferred.dart.strong.expect
index a4ac799..0a16b0d 100644
--- a/pkg/front_end/testcases/rasta/previsit_deferred.dart.strong.expect
+++ b/pkg/front_end/testcases/rasta/previsit_deferred.dart.strong.expect
@@ -1,6 +1,6 @@
 library;
 import self as self;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/rasta/previsit_deferred.dart.strong.transformed.expect b/pkg/front_end/testcases/rasta/previsit_deferred.dart.strong.transformed.expect
index 52df70f..601cdae 100644
--- a/pkg/front_end/testcases/rasta/previsit_deferred.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/rasta/previsit_deferred.dart.strong.transformed.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./deferred_lib.dart" as def;
+import "deferred_lib.dart" as def;
 
 import "org-dartlang-testcase:///deferred_lib.dart" deferred as lib;
 
diff --git a/pkg/front_end/testcases/rasta/super_mixin.dart.legacy.expect b/pkg/front_end/testcases/rasta/super_mixin.dart.legacy.expect
index bf05d13..bbd2127 100644
--- a/pkg/front_end/testcases/rasta/super_mixin.dart.legacy.expect
+++ b/pkg/front_end/testcases/rasta/super_mixin.dart.legacy.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./mixin_library.dart" as mix;
+import "mixin_library.dart" as mix;
 
 import "org-dartlang-testcase:///mixin_library.dart";
 
@@ -64,13 +64,13 @@
   field dynamic x = mix::f();
   field dynamic y = null;
   field dynamic z = null;
-  field mix::Mixin::T t = null;
+  generic-covariant-impl field mix::Mixin::T t = null;
   synthetic constructor •() → mix::Mixin<mix::Mixin::T>
     : super core::Object::•()
     ;
   method foo() → dynamic
     return super.foo().+(mix::f());
-  method g(mix::Mixin::T a) → mix::Mixin::T
+  method g(generic-covariant-impl mix::Mixin::T a) → mix::Mixin::T
     return null;
   method h() → dynamic
     return mix::V();
diff --git a/pkg/front_end/testcases/rasta/super_mixin.dart.legacy.transformed.expect b/pkg/front_end/testcases/rasta/super_mixin.dart.legacy.transformed.expect
index f68ab12..90e3685 100644
--- a/pkg/front_end/testcases/rasta/super_mixin.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/rasta/super_mixin.dart.legacy.transformed.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./mixin_library.dart" as mix;
+import "mixin_library.dart" as mix;
 
 import "org-dartlang-testcase:///mixin_library.dart";
 
@@ -18,13 +18,13 @@
   field dynamic x = mix::f()/* from org-dartlang-testcase:///mixin_library.dart */;
   field dynamic y = null /* from org-dartlang-testcase:///mixin_library.dart */;
   field dynamic z = null /* from org-dartlang-testcase:///mixin_library.dart */;
-  field self::_C&Super&Mixin::V t = null /* from org-dartlang-testcase:///mixin_library.dart */;
+  generic-covariant-impl field self::_C&Super&Mixin::V t = null /* from org-dartlang-testcase:///mixin_library.dart */;
   synthetic constructor •() → self::_C&Super&Mixin<self::_C&Super&Mixin::V>
     : super self::Super::•()
     ;
   method /* from org-dartlang-testcase:///mixin_library.dart */ foo() → dynamic
     return super.foo().+(mix::f());
-  method /* from org-dartlang-testcase:///mixin_library.dart */ g(self::_C&Super&Mixin::V a) → self::_C&Super&Mixin::V
+  method /* from org-dartlang-testcase:///mixin_library.dart */ g(generic-covariant-impl self::_C&Super&Mixin::V a) → self::_C&Super&Mixin::V
     return null;
   method /* from org-dartlang-testcase:///mixin_library.dart */ h() → dynamic
     return mix::V();
@@ -44,13 +44,13 @@
   field dynamic x = mix::f()/* from org-dartlang-testcase:///mixin_library.dart */;
   field dynamic y = null /* from org-dartlang-testcase:///mixin_library.dart */;
   field dynamic z = null /* from org-dartlang-testcase:///mixin_library.dart */;
-  field dynamic t = null /* from org-dartlang-testcase:///mixin_library.dart */;
+  generic-covariant-impl field dynamic t = null /* from org-dartlang-testcase:///mixin_library.dart */;
   synthetic constructor •() → self::_D&Super&Mixin
     : super self::Super::•()
     ;
   method /* from org-dartlang-testcase:///mixin_library.dart */ foo() → dynamic
     return super.foo().+(mix::f());
-  method /* from org-dartlang-testcase:///mixin_library.dart */ g(dynamic a) → dynamic
+  method /* from org-dartlang-testcase:///mixin_library.dart */ g(generic-covariant-impl dynamic a) → dynamic
     return null;
   method /* from org-dartlang-testcase:///mixin_library.dart */ h() → dynamic
     return mix::V();
@@ -70,13 +70,13 @@
   field dynamic x = mix::f()/* from org-dartlang-testcase:///mixin_library.dart */;
   field dynamic y = null /* from org-dartlang-testcase:///mixin_library.dart */;
   field dynamic z = null /* from org-dartlang-testcase:///mixin_library.dart */;
-  field self::C2::V t = null /* from org-dartlang-testcase:///mixin_library.dart */;
+  generic-covariant-impl field self::C2::V t = null /* from org-dartlang-testcase:///mixin_library.dart */;
   synthetic constructor •() → self::C2<self::C2::V>
     : super self::Super::•()
     ;
   method /* from org-dartlang-testcase:///mixin_library.dart */ foo() → dynamic
     return super.foo().+(mix::f());
-  method /* from org-dartlang-testcase:///mixin_library.dart */ g(self::C2::V a) → self::C2::V
+  method /* from org-dartlang-testcase:///mixin_library.dart */ g(generic-covariant-impl self::C2::V a) → self::C2::V
     return null;
   method /* from org-dartlang-testcase:///mixin_library.dart */ h() → dynamic
     return mix::V();
@@ -91,13 +91,13 @@
   field dynamic x = mix::f()/* from org-dartlang-testcase:///mixin_library.dart */;
   field dynamic y = null /* from org-dartlang-testcase:///mixin_library.dart */;
   field dynamic z = null /* from org-dartlang-testcase:///mixin_library.dart */;
-  field dynamic t = null /* from org-dartlang-testcase:///mixin_library.dart */;
+  generic-covariant-impl field dynamic t = null /* from org-dartlang-testcase:///mixin_library.dart */;
   synthetic constructor •() → self::D2
     : super self::Super::•()
     ;
   method /* from org-dartlang-testcase:///mixin_library.dart */ foo() → dynamic
     return super.foo().+(mix::f());
-  method /* from org-dartlang-testcase:///mixin_library.dart */ g(dynamic a) → dynamic
+  method /* from org-dartlang-testcase:///mixin_library.dart */ g(generic-covariant-impl dynamic a) → dynamic
     return null;
   method /* from org-dartlang-testcase:///mixin_library.dart */ h() → dynamic
     return mix::V();
@@ -128,13 +128,13 @@
   field dynamic x = mix::f();
   field dynamic y = null;
   field dynamic z = null;
-  field mix::Mixin::T t = null;
+  generic-covariant-impl field mix::Mixin::T t = null;
   synthetic constructor •() → mix::Mixin<mix::Mixin::T>
     : super core::Object::•()
     ;
   method foo() → dynamic
     return super.foo().+(mix::f());
-  method g(mix::Mixin::T a) → mix::Mixin::T
+  method g(generic-covariant-impl mix::Mixin::T a) → mix::Mixin::T
     return null;
   method h() → dynamic
     return mix::V();
diff --git a/pkg/front_end/testcases/rasta/super_mixin.dart.outline.expect b/pkg/front_end/testcases/rasta/super_mixin.dart.outline.expect
index 3463b57..f8efb4c 100644
--- a/pkg/front_end/testcases/rasta/super_mixin.dart.outline.expect
+++ b/pkg/front_end/testcases/rasta/super_mixin.dart.outline.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./mixin_library.dart" as mix;
+import "mixin_library.dart" as mix;
 
 import "org-dartlang-testcase:///mixin_library.dart";
 
@@ -52,12 +52,12 @@
   field dynamic x;
   field dynamic y;
   field dynamic z;
-  field mix::Mixin::T t;
+  generic-covariant-impl field mix::Mixin::T t;
   synthetic constructor •() → mix::Mixin<mix::Mixin::T>
     ;
   method foo() → dynamic
     ;
-  method g(mix::Mixin::T a) → mix::Mixin::T
+  method g(generic-covariant-impl mix::Mixin::T a) → mix::Mixin::T
     ;
   method h() → dynamic
     ;
diff --git a/pkg/front_end/testcases/rasta/super_mixin.dart.strong.expect b/pkg/front_end/testcases/rasta/super_mixin.dart.strong.expect
index 5ecf3b5..aba8974 100644
--- a/pkg/front_end/testcases/rasta/super_mixin.dart.strong.expect
+++ b/pkg/front_end/testcases/rasta/super_mixin.dart.strong.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./mixin_library.dart" as mix;
+import "mixin_library.dart" as mix;
 
 import "org-dartlang-testcase:///mixin_library.dart";
 
diff --git a/pkg/front_end/testcases/redirecting_factory.dart.hierarchy.expect b/pkg/front_end/testcases/redirecting_factory.dart.hierarchy.expect
index a3bb376..e601475 100644
--- a/pkg/front_end/testcases/redirecting_factory.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/redirecting_factory.dart.hierarchy.expect
@@ -39,6 +39,7 @@
     FooBase._redirecting#
 
 Foo:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: FooBase
@@ -73,6 +74,7 @@
     Foo._redirecting#
 
 Bar:
+  Longest path to Object: 3
   superclasses:
     Object
   interfaces: Foo<Tb>, FooBase
@@ -143,6 +145,7 @@
     SimpleCase._redirecting#
 
 SimpleCaseImpl:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: SimpleCase<Ai, Bi>
@@ -176,6 +179,7 @@
     SimpleCaseImpl._redirecting#
 
 SimpleCaseImpl2:
+  Longest path to Object: 3
   superclasses:
     Object
   interfaces: SimpleCaseImpl<Ai2, Bi2>, SimpleCase<Ai2, Bi2>
diff --git a/pkg/front_end/testcases/redirecting_factory_const_inference.dart.hierarchy.expect b/pkg/front_end/testcases/redirecting_factory_const_inference.dart.hierarchy.expect
index 8645346..4985228 100644
--- a/pkg/front_end/testcases/redirecting_factory_const_inference.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/redirecting_factory_const_inference.dart.hierarchy.expect
@@ -38,6 +38,7 @@
     _X._redirecting#
 
 _Y:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: _X<T>
diff --git a/pkg/front_end/testcases/redirecting_factory_const_inference.dart.legacy.expect b/pkg/front_end/testcases/redirecting_factory_const_inference.dart.legacy.expect
index afbcf0c..97f89e1 100644
--- a/pkg/front_end/testcases/redirecting_factory_const_inference.dart.legacy.expect
+++ b/pkg/front_end/testcases/redirecting_factory_const_inference.dart.legacy.expect
@@ -13,7 +13,7 @@
     ;
 }
 class A<T extends core::Object = dynamic> extends core::Object {
-  field self::_X<self::A::T> x;
+  generic-covariant-impl field self::_X<self::A::T> x;
   constructor •(self::_X<self::A::T> x) → self::A<self::A::T>
     : self::A::x = x, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/redirecting_factory_const_inference.dart.legacy.transformed.expect b/pkg/front_end/testcases/redirecting_factory_const_inference.dart.legacy.transformed.expect
index afbcf0c..97f89e1 100644
--- a/pkg/front_end/testcases/redirecting_factory_const_inference.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/redirecting_factory_const_inference.dart.legacy.transformed.expect
@@ -13,7 +13,7 @@
     ;
 }
 class A<T extends core::Object = dynamic> extends core::Object {
-  field self::_X<self::A::T> x;
+  generic-covariant-impl field self::_X<self::A::T> x;
   constructor •(self::_X<self::A::T> x) → self::A<self::A::T>
     : self::A::x = x, super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/redirecting_factory_const_inference.dart.outline.expect b/pkg/front_end/testcases/redirecting_factory_const_inference.dart.outline.expect
index a111baf..25ec287 100644
--- a/pkg/front_end/testcases/redirecting_factory_const_inference.dart.outline.expect
+++ b/pkg/front_end/testcases/redirecting_factory_const_inference.dart.outline.expect
@@ -12,7 +12,7 @@
     ;
 }
 class A<T extends core::Object = dynamic> extends core::Object {
-  field self::_X<self::A::T> x;
+  generic-covariant-impl field self::_X<self::A::T> x;
   constructor •(self::_X<self::A::T> x) → self::A<self::A::T>
     ;
 }
diff --git a/pkg/front_end/testcases/redirecting_initializer_arguments_assignable_test.dart.legacy.expect b/pkg/front_end/testcases/redirecting_initializer_arguments_assignable_test.dart.legacy.expect
index dd1e103..f3bfb14 100644
--- a/pkg/front_end/testcases/redirecting_initializer_arguments_assignable_test.dart.legacy.expect
+++ b/pkg/front_end/testcases/redirecting_initializer_arguments_assignable_test.dart.legacy.expect
@@ -8,7 +8,7 @@
     ;
 }
 class Foo<T extends self::X = dynamic> extends core::Object {
-  field self::Foo::T x;
+  generic-covariant-impl field self::Foo::T x;
   constructor fromX(self::X _init) → self::Foo<self::Foo::T>
     : this self::Foo::_internal(x: _init)
     ;
diff --git a/pkg/front_end/testcases/redirecting_initializer_arguments_assignable_test.dart.legacy.transformed.expect b/pkg/front_end/testcases/redirecting_initializer_arguments_assignable_test.dart.legacy.transformed.expect
index dd1e103..f3bfb14 100644
--- a/pkg/front_end/testcases/redirecting_initializer_arguments_assignable_test.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/redirecting_initializer_arguments_assignable_test.dart.legacy.transformed.expect
@@ -8,7 +8,7 @@
     ;
 }
 class Foo<T extends self::X = dynamic> extends core::Object {
-  field self::Foo::T x;
+  generic-covariant-impl field self::Foo::T x;
   constructor fromX(self::X _init) → self::Foo<self::Foo::T>
     : this self::Foo::_internal(x: _init)
     ;
diff --git a/pkg/front_end/testcases/redirecting_initializer_arguments_assignable_test.dart.outline.expect b/pkg/front_end/testcases/redirecting_initializer_arguments_assignable_test.dart.outline.expect
index fdfee1c..ba06dee 100644
--- a/pkg/front_end/testcases/redirecting_initializer_arguments_assignable_test.dart.outline.expect
+++ b/pkg/front_end/testcases/redirecting_initializer_arguments_assignable_test.dart.outline.expect
@@ -7,7 +7,7 @@
     ;
 }
 class Foo<T extends self::X = dynamic> extends core::Object {
-  field self::Foo::T x;
+  generic-covariant-impl field self::Foo::T x;
   constructor fromX(self::X _init) → self::Foo<self::Foo::T>
     ;
   constructor fromT(self::Foo::T _init) → self::Foo<self::Foo::T>
diff --git a/pkg/front_end/testcases/redirecting_initializer_arguments_test.dart.legacy.expect b/pkg/front_end/testcases/redirecting_initializer_arguments_test.dart.legacy.expect
index c18e8e1..b36d718 100644
--- a/pkg/front_end/testcases/redirecting_initializer_arguments_test.dart.legacy.expect
+++ b/pkg/front_end/testcases/redirecting_initializer_arguments_test.dart.legacy.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class Foo<T extends core::Object = dynamic> extends core::Object {
-  field self::Foo::T x;
+  generic-covariant-impl field self::Foo::T x;
   constructor from(core::String _init) → self::Foo<self::Foo::T>
     : this self::Foo::_internal(x: _init)
     ;
diff --git a/pkg/front_end/testcases/redirecting_initializer_arguments_test.dart.legacy.transformed.expect b/pkg/front_end/testcases/redirecting_initializer_arguments_test.dart.legacy.transformed.expect
index c18e8e1..b36d718 100644
--- a/pkg/front_end/testcases/redirecting_initializer_arguments_test.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/redirecting_initializer_arguments_test.dart.legacy.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class Foo<T extends core::Object = dynamic> extends core::Object {
-  field self::Foo::T x;
+  generic-covariant-impl field self::Foo::T x;
   constructor from(core::String _init) → self::Foo<self::Foo::T>
     : this self::Foo::_internal(x: _init)
     ;
diff --git a/pkg/front_end/testcases/redirecting_initializer_arguments_test.dart.outline.expect b/pkg/front_end/testcases/redirecting_initializer_arguments_test.dart.outline.expect
index 1655fc6..36894d5 100644
--- a/pkg/front_end/testcases/redirecting_initializer_arguments_test.dart.outline.expect
+++ b/pkg/front_end/testcases/redirecting_initializer_arguments_test.dart.outline.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class Foo<T extends core::Object = dynamic> extends core::Object {
-  field self::Foo::T x;
+  generic-covariant-impl field self::Foo::T x;
   constructor from(core::String _init) → self::Foo<self::Foo::T>
     ;
   constructor _internal({self::Foo::T x}) → self::Foo<self::Foo::T>
diff --git a/pkg/front_end/testcases/redirection_chain_type_arguments.dart.hierarchy.expect b/pkg/front_end/testcases/redirection_chain_type_arguments.dart.hierarchy.expect
index 6e0f389..137a8fe 100644
--- a/pkg/front_end/testcases/redirection_chain_type_arguments.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/redirection_chain_type_arguments.dart.hierarchy.expect
@@ -152,6 +152,7 @@
   classSetters:
 
 ExpectException:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Exception
@@ -182,40 +183,6 @@
     Object.==
   interfaceSetters:
 
-NoInline:
-  superclasses:
-    Object
-  interfaces:
-  classMembers:
-    Object.toString
-    Object.runtimeType
-    Object._simpleInstanceOf
-    Object._instanceOf
-    Object.noSuchMethod
-    Object._identityHashCode
-    Object.hashCode
-    Object._simpleInstanceOfFalse
-    Object._simpleInstanceOfTrue
-    Object.==
-  classSetters:
-
-AssumeDynamic:
-  superclasses:
-    Object
-  interfaces:
-  classMembers:
-    Object.toString
-    Object.runtimeType
-    Object._simpleInstanceOf
-    Object._instanceOf
-    Object.noSuchMethod
-    Object._identityHashCode
-    Object.hashCode
-    Object._simpleInstanceOfFalse
-    Object._simpleInstanceOfTrue
-    Object.==
-  classSetters:
-
 Immutable:
   superclasses:
     Object
diff --git a/pkg/front_end/testcases/redirection_chain_type_arguments_subst.dart.hierarchy.expect b/pkg/front_end/testcases/redirection_chain_type_arguments_subst.dart.hierarchy.expect
index 6e0f389..137a8fe 100644
--- a/pkg/front_end/testcases/redirection_chain_type_arguments_subst.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/redirection_chain_type_arguments_subst.dart.hierarchy.expect
@@ -152,6 +152,7 @@
   classSetters:
 
 ExpectException:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Exception
@@ -182,40 +183,6 @@
     Object.==
   interfaceSetters:
 
-NoInline:
-  superclasses:
-    Object
-  interfaces:
-  classMembers:
-    Object.toString
-    Object.runtimeType
-    Object._simpleInstanceOf
-    Object._instanceOf
-    Object.noSuchMethod
-    Object._identityHashCode
-    Object.hashCode
-    Object._simpleInstanceOfFalse
-    Object._simpleInstanceOfTrue
-    Object.==
-  classSetters:
-
-AssumeDynamic:
-  superclasses:
-    Object
-  interfaces:
-  classMembers:
-    Object.toString
-    Object.runtimeType
-    Object._simpleInstanceOf
-    Object._instanceOf
-    Object.noSuchMethod
-    Object._identityHashCode
-    Object.hashCode
-    Object._simpleInstanceOfFalse
-    Object._simpleInstanceOfTrue
-    Object.==
-  classSetters:
-
 Immutable:
   superclasses:
     Object
diff --git a/pkg/front_end/testcases/redirection_type_arguments.dart.hierarchy.expect b/pkg/front_end/testcases/redirection_type_arguments.dart.hierarchy.expect
index 80cea1b..d2d552d 100644
--- a/pkg/front_end/testcases/redirection_type_arguments.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/redirection_type_arguments.dart.hierarchy.expect
@@ -131,6 +131,7 @@
   classSetters:
 
 ExpectException:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Exception
@@ -161,40 +162,6 @@
     Object.==
   interfaceSetters:
 
-NoInline:
-  superclasses:
-    Object
-  interfaces:
-  classMembers:
-    Object.toString
-    Object.runtimeType
-    Object._simpleInstanceOf
-    Object._instanceOf
-    Object.noSuchMethod
-    Object._identityHashCode
-    Object.hashCode
-    Object._simpleInstanceOfFalse
-    Object._simpleInstanceOfTrue
-    Object.==
-  classSetters:
-
-AssumeDynamic:
-  superclasses:
-    Object
-  interfaces:
-  classMembers:
-    Object.toString
-    Object.runtimeType
-    Object._simpleInstanceOf
-    Object._instanceOf
-    Object.noSuchMethod
-    Object._identityHashCode
-    Object.hashCode
-    Object._simpleInstanceOfFalse
-    Object._simpleInstanceOfTrue
-    Object.==
-  classSetters:
-
 Immutable:
   superclasses:
     Object
diff --git a/pkg/front_end/testcases/regress/issue_31155.dart.legacy.expect b/pkg/front_end/testcases/regress/issue_31155.dart.legacy.expect
index 8130bfc..35b1ddf 100644
--- a/pkg/front_end/testcases/regress/issue_31155.dart.legacy.expect
+++ b/pkg/front_end/testcases/regress/issue_31155.dart.legacy.expect
@@ -6,7 +6,7 @@
 //   var f = Map<A, B> {};
 //                  ^
 //
-// pkg/front_end/testcases/regress/issue_31155.dart:11:19: Error: Operator declarations must be preceeded by the keyword 'operator'.
+// pkg/front_end/testcases/regress/issue_31155.dart:11:19: Error: Operator declarations must be preceded by the keyword 'operator'.
 // Try adding the keyword 'operator'.
 //   var f = Map<A, B> {};
 //                   ^
diff --git a/pkg/front_end/testcases/regress/issue_31155.dart.legacy.transformed.expect b/pkg/front_end/testcases/regress/issue_31155.dart.legacy.transformed.expect
index 8130bfc..35b1ddf 100644
--- a/pkg/front_end/testcases/regress/issue_31155.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_31155.dart.legacy.transformed.expect
@@ -6,7 +6,7 @@
 //   var f = Map<A, B> {};
 //                  ^
 //
-// pkg/front_end/testcases/regress/issue_31155.dart:11:19: Error: Operator declarations must be preceeded by the keyword 'operator'.
+// pkg/front_end/testcases/regress/issue_31155.dart:11:19: Error: Operator declarations must be preceded by the keyword 'operator'.
 // Try adding the keyword 'operator'.
 //   var f = Map<A, B> {};
 //                   ^
diff --git a/pkg/front_end/testcases/regress/issue_31155.dart.outline.expect b/pkg/front_end/testcases/regress/issue_31155.dart.outline.expect
index 31866e5..368d30d 100644
--- a/pkg/front_end/testcases/regress/issue_31155.dart.outline.expect
+++ b/pkg/front_end/testcases/regress/issue_31155.dart.outline.expect
@@ -6,7 +6,7 @@
 //   var f = Map<A, B> {};
 //                  ^
 //
-// pkg/front_end/testcases/regress/issue_31155.dart:11:19: Error: Operator declarations must be preceeded by the keyword 'operator'.
+// pkg/front_end/testcases/regress/issue_31155.dart:11:19: Error: Operator declarations must be preceded by the keyword 'operator'.
 // Try adding the keyword 'operator'.
 //   var f = Map<A, B> {};
 //                   ^
diff --git a/pkg/front_end/testcases/regress/issue_31155.dart.strong.expect b/pkg/front_end/testcases/regress/issue_31155.dart.strong.expect
index f9e661a..e6f0d60 100644
--- a/pkg/front_end/testcases/regress/issue_31155.dart.strong.expect
+++ b/pkg/front_end/testcases/regress/issue_31155.dart.strong.expect
@@ -6,7 +6,7 @@
 //   var f = Map<A, B> {};
 //                  ^
 //
-// pkg/front_end/testcases/regress/issue_31155.dart:11:19: Error: Operator declarations must be preceeded by the keyword 'operator'.
+// pkg/front_end/testcases/regress/issue_31155.dart:11:19: Error: Operator declarations must be preceded by the keyword 'operator'.
 // Try adding the keyword 'operator'.
 //   var f = Map<A, B> {};
 //                   ^
diff --git a/pkg/front_end/testcases/regress/issue_31155.dart.strong.transformed.expect b/pkg/front_end/testcases/regress/issue_31155.dart.strong.transformed.expect
index f9e661a..e6f0d60 100644
--- a/pkg/front_end/testcases/regress/issue_31155.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_31155.dart.strong.transformed.expect
@@ -6,7 +6,7 @@
 //   var f = Map<A, B> {};
 //                  ^
 //
-// pkg/front_end/testcases/regress/issue_31155.dart:11:19: Error: Operator declarations must be preceeded by the keyword 'operator'.
+// pkg/front_end/testcases/regress/issue_31155.dart:11:19: Error: Operator declarations must be preceded by the keyword 'operator'.
 // Try adding the keyword 'operator'.
 //   var f = Map<A, B> {};
 //                   ^
diff --git a/pkg/front_end/testcases/regress/issue_31996.dart.hierarchy.expect b/pkg/front_end/testcases/regress/issue_31996.dart.hierarchy.expect
index 8e9e795..627064d 100644
--- a/pkg/front_end/testcases/regress/issue_31996.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/regress/issue_31996.dart.hierarchy.expect
@@ -53,6 +53,7 @@
   classSetters:
 
 Base:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: B
@@ -82,6 +83,7 @@
   interfaceSetters:
 
 Child1:
+  Longest path to Object: 3
   superclasses:
     Object
       -> Base
@@ -112,6 +114,7 @@
   interfaceSetters:
 
 Child2:
+  Longest path to Object: 3
   superclasses:
     Object
       -> Base
diff --git a/pkg/front_end/testcases/regress/issue_32200.dart.strong.expect b/pkg/front_end/testcases/regress/issue_32200.dart.strong.expect
index 3316d53..667cb8d 100644
--- a/pkg/front_end/testcases/regress/issue_32200.dart.strong.expect
+++ b/pkg/front_end/testcases/regress/issue_32200.dart.strong.expect
@@ -6,12 +6,6 @@
 //   self.Foo self;
 //   ^^^^^^^^
 //
-// pkg/front_end/testcases/regress/issue_32200.dart:13:19: Error: A value of type 'Foo' can't be assigned to a variable of type 'invalid-type'.
-//  - 'Foo' is from 'pkg/front_end/testcases/regress/issue_32200.dart'.
-// Try changing the type of the left hand side, or casting the right hand side to 'invalid-type'.
-//   instance.self = instance;
-//                   ^
-//
 import self as self;
 import "dart:core" as core;
 
@@ -25,9 +19,5 @@
 }
 static method main() → dynamic {
   self::Foo instance = new self::Foo::•();
-  instance.{self::Foo::self} = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/regress/issue_32200.dart:13:19: Error: A value of type 'Foo' can't be assigned to a variable of type 'invalid-type'.
- - 'Foo' is from 'pkg/front_end/testcases/regress/issue_32200.dart'.
-Try changing the type of the left hand side, or casting the right hand side to 'invalid-type'.
-  instance.self = instance;
-                  ^" in instance as{TypeError} invalid-type;
+  instance.{self::Foo::self} = instance as{TypeError} invalid-type;
 }
diff --git a/pkg/front_end/testcases/regress/issue_32200.dart.strong.transformed.expect b/pkg/front_end/testcases/regress/issue_32200.dart.strong.transformed.expect
index 3316d53..667cb8d 100644
--- a/pkg/front_end/testcases/regress/issue_32200.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_32200.dart.strong.transformed.expect
@@ -6,12 +6,6 @@
 //   self.Foo self;
 //   ^^^^^^^^
 //
-// pkg/front_end/testcases/regress/issue_32200.dart:13:19: Error: A value of type 'Foo' can't be assigned to a variable of type 'invalid-type'.
-//  - 'Foo' is from 'pkg/front_end/testcases/regress/issue_32200.dart'.
-// Try changing the type of the left hand side, or casting the right hand side to 'invalid-type'.
-//   instance.self = instance;
-//                   ^
-//
 import self as self;
 import "dart:core" as core;
 
@@ -25,9 +19,5 @@
 }
 static method main() → dynamic {
   self::Foo instance = new self::Foo::•();
-  instance.{self::Foo::self} = let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/regress/issue_32200.dart:13:19: Error: A value of type 'Foo' can't be assigned to a variable of type 'invalid-type'.
- - 'Foo' is from 'pkg/front_end/testcases/regress/issue_32200.dart'.
-Try changing the type of the left hand side, or casting the right hand side to 'invalid-type'.
-  instance.self = instance;
-                  ^" in instance as{TypeError} invalid-type;
+  instance.{self::Foo::self} = instance as{TypeError} invalid-type;
 }
diff --git a/pkg/front_end/testcases/regress/issue_34291.dart.legacy.expect b/pkg/front_end/testcases/regress/issue_34291.dart.legacy.expect
index b75366e..16fd29e 100644
--- a/pkg/front_end/testcases/regress/issue_34291.dart.legacy.expect
+++ b/pkg/front_end/testcases/regress/issue_34291.dart.legacy.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./issue_34291_lib.dart" as iss;
+import "issue_34291_lib.dart" as iss;
 
 import "org-dartlang-testcase:///issue_34291_lib.dart" as lib;
 
diff --git a/pkg/front_end/testcases/regress/issue_34291.dart.legacy.transformed.expect b/pkg/front_end/testcases/regress/issue_34291.dart.legacy.transformed.expect
index b75366e..16fd29e 100644
--- a/pkg/front_end/testcases/regress/issue_34291.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_34291.dart.legacy.transformed.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./issue_34291_lib.dart" as iss;
+import "issue_34291_lib.dart" as iss;
 
 import "org-dartlang-testcase:///issue_34291_lib.dart" as lib;
 
diff --git a/pkg/front_end/testcases/regress/issue_34291.dart.outline.expect b/pkg/front_end/testcases/regress/issue_34291.dart.outline.expect
index a72a23c..7e0d3a3 100644
--- a/pkg/front_end/testcases/regress/issue_34291.dart.outline.expect
+++ b/pkg/front_end/testcases/regress/issue_34291.dart.outline.expect
@@ -1,7 +1,7 @@
 library;
 import self as self;
 import "dart:core" as core;
-import "./issue_34291_lib.dart" as iss;
+import "issue_34291_lib.dart" as iss;
 
 import "org-dartlang-testcase:///issue_34291_lib.dart" as lib;
 
diff --git a/pkg/front_end/testcases/regress/issue_34403.dart.legacy.expect b/pkg/front_end/testcases/regress/issue_34403.dart.legacy.expect
index 4bc0e99..6411f4c 100644
--- a/pkg/front_end/testcases/regress/issue_34403.dart.legacy.expect
+++ b/pkg/front_end/testcases/regress/issue_34403.dart.legacy.expect
@@ -84,7 +84,7 @@
 //
 import self as self;
 import "dart:core" as core;
-import "./issue_34403_lib.dart" as iss;
+import "issue_34403_lib.dart" as iss;
 
 import "org-dartlang-testcase:///issue_34403_lib.dart" as p;
 
diff --git a/pkg/front_end/testcases/regress/issue_34403.dart.legacy.transformed.expect b/pkg/front_end/testcases/regress/issue_34403.dart.legacy.transformed.expect
index 4bc0e99..6411f4c 100644
--- a/pkg/front_end/testcases/regress/issue_34403.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_34403.dart.legacy.transformed.expect
@@ -84,7 +84,7 @@
 //
 import self as self;
 import "dart:core" as core;
-import "./issue_34403_lib.dart" as iss;
+import "issue_34403_lib.dart" as iss;
 
 import "org-dartlang-testcase:///issue_34403_lib.dart" as p;
 
diff --git a/pkg/front_end/testcases/regress/issue_34403.dart.strong.expect b/pkg/front_end/testcases/regress/issue_34403.dart.strong.expect
index 67776e6..ae029a9 100644
--- a/pkg/front_end/testcases/regress/issue_34403.dart.strong.expect
+++ b/pkg/front_end/testcases/regress/issue_34403.dart.strong.expect
@@ -84,7 +84,7 @@
 //
 import self as self;
 import "dart:core" as core;
-import "./issue_34403_lib.dart" as iss;
+import "issue_34403_lib.dart" as iss;
 
 import "org-dartlang-testcase:///issue_34403_lib.dart" as p;
 
diff --git a/pkg/front_end/testcases/regress/issue_34403.dart.strong.transformed.expect b/pkg/front_end/testcases/regress/issue_34403.dart.strong.transformed.expect
index 67776e6..ae029a9 100644
--- a/pkg/front_end/testcases/regress/issue_34403.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/regress/issue_34403.dart.strong.transformed.expect
@@ -84,7 +84,7 @@
 //
 import self as self;
 import "dart:core" as core;
-import "./issue_34403_lib.dart" as iss;
+import "issue_34403_lib.dart" as iss;
 
 import "org-dartlang-testcase:///issue_34403_lib.dart" as p;
 
diff --git a/pkg/front_end/testcases/regress/issue_35260.dart.hierarchy.expect b/pkg/front_end/testcases/regress/issue_35260.dart.hierarchy.expect
index 4158779..2c646a0 100644
--- a/pkg/front_end/testcases/regress/issue_35260.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/regress/issue_35260.dart.hierarchy.expect
@@ -38,6 +38,7 @@
     Supertype._redirecting#
 
 X:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: Supertype
diff --git a/pkg/front_end/testcases/regress/issue_35900.dart b/pkg/front_end/testcases/regress/issue_35900.dart
new file mode 100644
index 0000000..7d0849d
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_35900.dart
@@ -0,0 +1,5 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+main () { int x; print('${x' '); }
diff --git a/pkg/front_end/testcases/regress/issue_35900.dart.legacy.expect b/pkg/front_end/testcases/regress/issue_35900.dart.legacy.expect
new file mode 100644
index 0000000..34c8236
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_35900.dart.legacy.expect
@@ -0,0 +1,29 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_35900.dart:5:25: Error: Can't find '}' to match '${'.
+// main () { int x; print('${x' '); }
+//                         ^
+//
+// pkg/front_end/testcases/regress/issue_35900.dart:5:24: Error: String starting with ' must end with '.
+// main () { int x; print('${x' '); }
+//                        ^^^^^^^^^^^^...
+//
+// pkg/front_end/testcases/regress/issue_35900.dart:6:1: Error: Expected a declaration, but got ''.
+//
+// pkg/front_end/testcases/regress/issue_35900.dart:5:28: Error: Expected '}' before this.
+// main () { int x; print('${x' '); }
+//                            ^^^
+//
+// pkg/front_end/testcases/regress/issue_35900.dart:5:31: Error: Expected a String, but got ')'.
+// main () { int x; print('${x' '); }
+//                               ^
+//
+import self as self;
+import "dart:core" as core;
+
+static method main() → dynamic {
+  core::int x;
+  core::print("${x}");
+}
diff --git a/pkg/front_end/testcases/regress/issue_35900.dart.legacy.transformed.expect b/pkg/front_end/testcases/regress/issue_35900.dart.legacy.transformed.expect
new file mode 100644
index 0000000..34c8236
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_35900.dart.legacy.transformed.expect
@@ -0,0 +1,29 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_35900.dart:5:25: Error: Can't find '}' to match '${'.
+// main () { int x; print('${x' '); }
+//                         ^
+//
+// pkg/front_end/testcases/regress/issue_35900.dart:5:24: Error: String starting with ' must end with '.
+// main () { int x; print('${x' '); }
+//                        ^^^^^^^^^^^^...
+//
+// pkg/front_end/testcases/regress/issue_35900.dart:6:1: Error: Expected a declaration, but got ''.
+//
+// pkg/front_end/testcases/regress/issue_35900.dart:5:28: Error: Expected '}' before this.
+// main () { int x; print('${x' '); }
+//                            ^^^
+//
+// pkg/front_end/testcases/regress/issue_35900.dart:5:31: Error: Expected a String, but got ')'.
+// main () { int x; print('${x' '); }
+//                               ^
+//
+import self as self;
+import "dart:core" as core;
+
+static method main() → dynamic {
+  core::int x;
+  core::print("${x}");
+}
diff --git a/pkg/front_end/testcases/regress/issue_35900.dart.outline.expect b/pkg/front_end/testcases/regress/issue_35900.dart.outline.expect
new file mode 100644
index 0000000..da0b63f
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_35900.dart.outline.expect
@@ -0,0 +1,18 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_35900.dart:5:25: Error: Can't find '}' to match '${'.
+// main () { int x; print('${x' '); }
+//                         ^
+//
+// pkg/front_end/testcases/regress/issue_35900.dart:5:24: Error: String starting with ' must end with '.
+// main () { int x; print('${x' '); }
+//                        ^^^^^^^^^^^^...
+//
+// pkg/front_end/testcases/regress/issue_35900.dart:6:1: Error: Expected a declaration, but got ''.
+//
+import self as self;
+
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/regress/issue_35900.dart.strong.expect b/pkg/front_end/testcases/regress/issue_35900.dart.strong.expect
new file mode 100644
index 0000000..34c8236
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_35900.dart.strong.expect
@@ -0,0 +1,29 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_35900.dart:5:25: Error: Can't find '}' to match '${'.
+// main () { int x; print('${x' '); }
+//                         ^
+//
+// pkg/front_end/testcases/regress/issue_35900.dart:5:24: Error: String starting with ' must end with '.
+// main () { int x; print('${x' '); }
+//                        ^^^^^^^^^^^^...
+//
+// pkg/front_end/testcases/regress/issue_35900.dart:6:1: Error: Expected a declaration, but got ''.
+//
+// pkg/front_end/testcases/regress/issue_35900.dart:5:28: Error: Expected '}' before this.
+// main () { int x; print('${x' '); }
+//                            ^^^
+//
+// pkg/front_end/testcases/regress/issue_35900.dart:5:31: Error: Expected a String, but got ')'.
+// main () { int x; print('${x' '); }
+//                               ^
+//
+import self as self;
+import "dart:core" as core;
+
+static method main() → dynamic {
+  core::int x;
+  core::print("${x}");
+}
diff --git a/pkg/front_end/testcases/regress/issue_35900.dart.strong.transformed.expect b/pkg/front_end/testcases/regress/issue_35900.dart.strong.transformed.expect
new file mode 100644
index 0000000..34c8236
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_35900.dart.strong.transformed.expect
@@ -0,0 +1,29 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_35900.dart:5:25: Error: Can't find '}' to match '${'.
+// main () { int x; print('${x' '); }
+//                         ^
+//
+// pkg/front_end/testcases/regress/issue_35900.dart:5:24: Error: String starting with ' must end with '.
+// main () { int x; print('${x' '); }
+//                        ^^^^^^^^^^^^...
+//
+// pkg/front_end/testcases/regress/issue_35900.dart:6:1: Error: Expected a declaration, but got ''.
+//
+// pkg/front_end/testcases/regress/issue_35900.dart:5:28: Error: Expected '}' before this.
+// main () { int x; print('${x' '); }
+//                            ^^^
+//
+// pkg/front_end/testcases/regress/issue_35900.dart:5:31: Error: Expected a String, but got ')'.
+// main () { int x; print('${x' '); }
+//                               ^
+//
+import self as self;
+import "dart:core" as core;
+
+static method main() → dynamic {
+  core::int x;
+  core::print("${x}");
+}
diff --git a/pkg/front_end/testcases/regress/issue_36400.dart b/pkg/front_end/testcases/regress/issue_36400.dart
new file mode 100644
index 0000000..33c29d6
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_36400.dart
@@ -0,0 +1,10 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class Test {
+  Test factory Test() {
+    return null;
+  }
+}
+
diff --git a/pkg/front_end/testcases/regress/issue_36400.dart.hierarchy.expect b/pkg/front_end/testcases/regress/issue_36400.dart.hierarchy.expect
new file mode 100644
index 0000000..6dc337c
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_36400.dart.hierarchy.expect
@@ -0,0 +1,36 @@
+Object:
+  superclasses:
+  interfaces:
+  classMembers:
+    Object._haveSameRuntimeType
+    Object.toString
+    Object.runtimeType
+    Object._toString
+    Object._simpleInstanceOf
+    Object._hashCodeRnd
+    Object._instanceOf
+    Object.noSuchMethod
+    Object._objectHashCode
+    Object._identityHashCode
+    Object.hashCode
+    Object._simpleInstanceOfFalse
+    Object._simpleInstanceOfTrue
+    Object.==
+  classSetters:
+
+Test:
+  superclasses:
+    Object
+  interfaces:
+  classMembers:
+    Object.toString
+    Object.runtimeType
+    Object._simpleInstanceOf
+    Object._instanceOf
+    Object.noSuchMethod
+    Object._identityHashCode
+    Object.hashCode
+    Object._simpleInstanceOfFalse
+    Object._simpleInstanceOfTrue
+    Object.==
+  classSetters:
diff --git a/pkg/front_end/testcases/regress/issue_36400.dart.legacy.expect b/pkg/front_end/testcases/regress/issue_36400.dart.legacy.expect
new file mode 100644
index 0000000..e63b720
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_36400.dart.legacy.expect
@@ -0,0 +1,17 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_36400.dart:6:3: Error: Factory constructors cannot have a return type.
+// Try removing the type appearing before 'factory'.
+//   Test factory Test() {
+//   ^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+class Test extends core::Object {
+  static factory •() → self::Test {
+    return null;
+  }
+}
diff --git a/pkg/front_end/testcases/regress/issue_36400.dart.legacy.transformed.expect b/pkg/front_end/testcases/regress/issue_36400.dart.legacy.transformed.expect
new file mode 100644
index 0000000..e63b720
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_36400.dart.legacy.transformed.expect
@@ -0,0 +1,17 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_36400.dart:6:3: Error: Factory constructors cannot have a return type.
+// Try removing the type appearing before 'factory'.
+//   Test factory Test() {
+//   ^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+class Test extends core::Object {
+  static factory •() → self::Test {
+    return null;
+  }
+}
diff --git a/pkg/front_end/testcases/regress/issue_36400.dart.outline.expect b/pkg/front_end/testcases/regress/issue_36400.dart.outline.expect
new file mode 100644
index 0000000..2f39e53
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_36400.dart.outline.expect
@@ -0,0 +1,16 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_36400.dart:6:3: Error: Factory constructors cannot have a return type.
+// Try removing the type appearing before 'factory'.
+//   Test factory Test() {
+//   ^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+class Test extends core::Object {
+  static factory •() → self::Test
+    ;
+}
diff --git a/pkg/front_end/testcases/regress/issue_36400.dart.strong.expect b/pkg/front_end/testcases/regress/issue_36400.dart.strong.expect
new file mode 100644
index 0000000..e63b720
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_36400.dart.strong.expect
@@ -0,0 +1,17 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_36400.dart:6:3: Error: Factory constructors cannot have a return type.
+// Try removing the type appearing before 'factory'.
+//   Test factory Test() {
+//   ^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+class Test extends core::Object {
+  static factory •() → self::Test {
+    return null;
+  }
+}
diff --git a/pkg/front_end/testcases/regress/issue_36400.dart.strong.transformed.expect b/pkg/front_end/testcases/regress/issue_36400.dart.strong.transformed.expect
new file mode 100644
index 0000000..e63b720
--- /dev/null
+++ b/pkg/front_end/testcases/regress/issue_36400.dart.strong.transformed.expect
@@ -0,0 +1,17 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/regress/issue_36400.dart:6:3: Error: Factory constructors cannot have a return type.
+// Try removing the type appearing before 'factory'.
+//   Test factory Test() {
+//   ^^^^
+//
+import self as self;
+import "dart:core" as core;
+
+class Test extends core::Object {
+  static factory •() → self::Test {
+    return null;
+  }
+}
diff --git a/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart b/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart
index 4cb62d5..b8ff15c 100644
--- a/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart
+++ b/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart
@@ -9,7 +9,7 @@
 
 class C<T> {
   F<T> y;
-  void f(T /*@covariance=genericImpl*/ value) {
+  void f(T value) {
     this.y(value);
   }
 }
diff --git a/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.legacy.expect
index d75022d..79b167b 100644
--- a/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.legacy.expect
@@ -8,7 +8,7 @@
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f(self::C::T value) → void {
+  method f(generic-covariant-impl self::C::T value) → void {
     this.{self::C::y}(value);
   }
 }
diff --git a/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.legacy.transformed.expect
index d75022d..79b167b 100644
--- a/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.legacy.transformed.expect
@@ -8,7 +8,7 @@
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f(self::C::T value) → void {
+  method f(generic-covariant-impl self::C::T value) → void {
     this.{self::C::y}(value);
   }
 }
diff --git a/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.outline.expect b/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.outline.expect
index 5cb4a3a..7657ab7 100644
--- a/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/contravariant_getter.dart.outline.expect
@@ -7,7 +7,7 @@
   field (self::C::T) → void y;
   synthetic constructor •() → self::C<self::C::T>
     ;
-  method f(self::C::T value) → void
+  method f(generic-covariant-impl self::C::T value) → void
     ;
 }
 static method g(self::C<core::num> c) → void
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart b/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart
index bbe2c24..ec30f9e 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart
@@ -6,8 +6,8 @@
 library test;
 
 class C<T> {
-  void f< /*@covariance=genericImpl*/ U extends T>(U x) {}
-  void g1< /*@covariance=genericImpl*/ U extends T>() {
+  void f<U extends T>(U x) {}
+  void g1<U extends T>() {
     this.f<U>(1.5);
   }
 }
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.legacy.expect
index b8aa4df..f6a34fb 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.legacy.expect
@@ -6,8 +6,8 @@
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f<U extends self::C::T = dynamic>(self::C::f::U x) → void {}
-  method g1<U extends self::C::T = dynamic>() → void {
+  method f<generic-covariant-impl U extends self::C::T = dynamic>(self::C::f::U x) → void {}
+  method g1<generic-covariant-impl U extends self::C::T = dynamic>() → void {
     this.{self::C::f}<self::C::g1::U>(1.5);
   }
 }
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.legacy.transformed.expect
index b8aa4df..f6a34fb 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.legacy.transformed.expect
@@ -6,8 +6,8 @@
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f<U extends self::C::T = dynamic>(self::C::f::U x) → void {}
-  method g1<U extends self::C::T = dynamic>() → void {
+  method f<generic-covariant-impl U extends self::C::T = dynamic>(self::C::f::U x) → void {}
+  method g1<generic-covariant-impl U extends self::C::T = dynamic>() → void {
     this.{self::C::f}<self::C::g1::U>(1.5);
   }
 }
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.outline.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.outline.expect
index 6a94b0f..9f98ab1 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_method_type_parameter.dart.outline.expect
@@ -5,9 +5,9 @@
 class C<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T>
     ;
-  method f<U extends self::C::T = dynamic>(self::C::f::U x) → void
+  method f<generic-covariant-impl U extends self::C::T = dynamic>(self::C::f::U x) → void
     ;
-  method g1<U extends self::C::T = dynamic>() → void
+  method g1<generic-covariant-impl U extends self::C::T = dynamic>() → void
     ;
 }
 static method g2(self::C<core::Object> c) → void
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart
index f263624..d5cfa14 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart
@@ -6,7 +6,7 @@
 library test;
 
 class C<T> {
-  void f(T /*@covariance=genericImpl*/ x) {}
+  void f(T x) {}
 }
 
 void g1(C<num> c) {
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.legacy.expect
index 11fed34..35df363 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.legacy.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f(self::C::T x) → void {}
+  method f(generic-covariant-impl self::C::T x) → void {}
 }
 static method g1(self::C<core::num> c) → void {
   c.f(1.5);
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.legacy.transformed.expect
index 11fed34..35df363 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.legacy.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f(self::C::T x) → void {}
+  method f(generic-covariant-impl self::C::T x) → void {}
 }
 static method g1(self::C<core::num> c) → void {
   c.f(1.5);
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.outline.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.outline.expect
index af07f90..755eea6 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter.dart.outline.expect
@@ -5,7 +5,7 @@
 class C<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T>
     ;
-  method f(self::C::T x) → void
+  method f(generic-covariant-impl self::C::T x) → void
     ;
 }
 static method g1(self::C<core::num> c) → void
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart
index f8341a0..6cb0061 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart
@@ -7,13 +7,13 @@
 
 class C<T> {
   // List<T> is covariant in T so it needs checking
-  void f1(List<T> /*@covariance=genericImpl*/ x) {}
+  void f1(List<T> x) {}
 
   // () -> T is covariant in T so it needs checking
-  void f2(T /*@covariance=genericImpl*/ callback()) {}
+  void f2(T callback()) {}
 
   // (T) -> T is partially covariant in T so it needs checking
-  void f3(T /*@covariance=genericImpl*/ callback(T x)) {}
+  void f3(T callback(T x)) {}
 
   // (T) -> void is contravariant in T so it doesn't need checking
   void f4(void callback(T x)) {}
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.legacy.expect
index 072d922..d0cf71d 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.legacy.expect
@@ -6,9 +6,9 @@
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f1(core::List<self::C::T> x) → void {}
-  method f2(() → self::C::T callback) → void {}
-  method f3((self::C::T) → self::C::T callback) → void {}
+  method f1(generic-covariant-impl core::List<self::C::T> x) → void {}
+  method f2(generic-covariant-impl () → self::C::T callback) → void {}
+  method f3(generic-covariant-impl (self::C::T) → self::C::T callback) → void {}
   method f4((self::C::T) → void callback) → void {}
 }
 static method g1(self::C<core::num> c, core::List<core::num> l) → void {
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.legacy.transformed.expect
index 072d922..d0cf71d 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.legacy.transformed.expect
@@ -6,9 +6,9 @@
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f1(core::List<self::C::T> x) → void {}
-  method f2(() → self::C::T callback) → void {}
-  method f3((self::C::T) → self::C::T callback) → void {}
+  method f1(generic-covariant-impl core::List<self::C::T> x) → void {}
+  method f2(generic-covariant-impl () → self::C::T callback) → void {}
+  method f3(generic-covariant-impl (self::C::T) → self::C::T callback) → void {}
   method f4((self::C::T) → void callback) → void {}
 }
 static method g1(self::C<core::num> c, core::List<core::num> l) → void {
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.outline.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.outline.expect
index 831387d..49d3ebd 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_complex.dart.outline.expect
@@ -5,11 +5,11 @@
 class C<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T>
     ;
-  method f1(core::List<self::C::T> x) → void
+  method f1(generic-covariant-impl core::List<self::C::T> x) → void
     ;
-  method f2(() → self::C::T callback) → void
+  method f2(generic-covariant-impl () → self::C::T callback) → void
     ;
-  method f3((self::C::T) → self::C::T callback) → void
+  method f3(generic-covariant-impl (self::C::T) → self::C::T callback) → void
     ;
   method f4((self::C::T) → void callback) → void
     ;
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart
index 67ebc4d..3ec2d07 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart
@@ -6,20 +6,18 @@
 library test;
 
 abstract class I<T> {
-  void f1(T /*@covariance=genericImpl*/ x);
-  void f2(T /*@covariance=genericImpl*/ x);
+  void f1(T x);
+  void f2(T x);
 }
 
 class C<U> implements I<int> {
-  void f1(int /*@covariance=genericImpl*/ x) {}
-  void f2(int /*@covariance=genericImpl*/ x,
-      [U /*@covariance=genericImpl*/ y]) {}
+  void f1(int x) {}
+  void f2(int x, [U y]) {}
 }
 
 class D<U> extends C<U> {
-  void f1(int /*@covariance=genericImpl*/ x) {}
-  void f2(int /*@covariance=genericImpl*/ x,
-      [U /*@covariance=genericImpl*/ y]) {}
+  void f1(int x) {}
+  void f2(int x, [U y]) {}
 }
 
 void g1(C<num> c) {
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.hierarchy.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.hierarchy.expect
index 570f5d0..5eaaea6 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.hierarchy.expect
@@ -38,6 +38,7 @@
   classSetters:
 
 C:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: I<int>
@@ -71,6 +72,7 @@
   interfaceSetters:
 
 D:
+  Longest path to Object: 3
   superclasses:
     Object
       -> C<U>
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.legacy.expect
index fc22b45..96700b1 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.legacy.expect
@@ -6,22 +6,22 @@
   synthetic constructor •() → self::I<self::I::T>
     : super core::Object::•()
     ;
-  abstract method f1(self::I::T x) → void;
-  abstract method f2(self::I::T x) → void;
+  abstract method f1(generic-covariant-impl self::I::T x) → void;
+  abstract method f2(generic-covariant-impl self::I::T x) → void;
 }
 class C<U extends core::Object = dynamic> extends core::Object implements self::I<core::int> {
   synthetic constructor •() → self::C<self::C::U>
     : super core::Object::•()
     ;
   method f1(core::int x) → void {}
-  method f2(core::int x, [self::C::U y = null]) → void {}
+  method f2(core::int x, [generic-covariant-impl self::C::U y = null]) → void {}
 }
 class D<U extends core::Object = dynamic> extends self::C<self::D::U> {
   synthetic constructor •() → self::D<self::D::U>
     : super self::C::•()
     ;
   method f1(core::int x) → void {}
-  method f2(core::int x, [self::D::U y = null]) → void {}
+  method f2(core::int x, [generic-covariant-impl self::D::U y = null]) → void {}
 }
 static method g1(self::C<core::num> c) → void {
   c.f1(1);
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.legacy.transformed.expect
index fc22b45..96700b1 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.legacy.transformed.expect
@@ -6,22 +6,22 @@
   synthetic constructor •() → self::I<self::I::T>
     : super core::Object::•()
     ;
-  abstract method f1(self::I::T x) → void;
-  abstract method f2(self::I::T x) → void;
+  abstract method f1(generic-covariant-impl self::I::T x) → void;
+  abstract method f2(generic-covariant-impl self::I::T x) → void;
 }
 class C<U extends core::Object = dynamic> extends core::Object implements self::I<core::int> {
   synthetic constructor •() → self::C<self::C::U>
     : super core::Object::•()
     ;
   method f1(core::int x) → void {}
-  method f2(core::int x, [self::C::U y = null]) → void {}
+  method f2(core::int x, [generic-covariant-impl self::C::U y = null]) → void {}
 }
 class D<U extends core::Object = dynamic> extends self::C<self::D::U> {
   synthetic constructor •() → self::D<self::D::U>
     : super self::C::•()
     ;
   method f1(core::int x) → void {}
-  method f2(core::int x, [self::D::U y = null]) → void {}
+  method f2(core::int x, [generic-covariant-impl self::D::U y = null]) → void {}
 }
 static method g1(self::C<core::num> c) → void {
   c.f1(1);
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.outline.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.outline.expect
index a268782..fe2f698 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface.dart.outline.expect
@@ -5,15 +5,15 @@
 abstract class I<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::I<self::I::T>
     ;
-  abstract method f1(self::I::T x) → void;
-  abstract method f2(self::I::T x) → void;
+  abstract method f1(generic-covariant-impl self::I::T x) → void;
+  abstract method f2(generic-covariant-impl self::I::T x) → void;
 }
 class C<U extends core::Object = dynamic> extends core::Object implements self::I<core::int> {
   synthetic constructor •() → self::C<self::C::U>
     ;
   method f1(core::int x) → void
     ;
-  method f2(core::int x, [self::C::U y]) → void
+  method f2(core::int x, [generic-covariant-impl self::C::U y]) → void
     ;
 }
 class D<U extends core::Object = dynamic> extends self::C<self::D::U> {
@@ -21,7 +21,7 @@
     ;
   method f1(core::int x) → void
     ;
-  method f2(core::int x, [self::D::U y]) → void
+  method f2(core::int x, [generic-covariant-impl self::D::U y]) → void
     ;
 }
 static method g1(self::C<core::num> c) → void
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart
index 064a9d2..4da2532 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart
@@ -10,16 +10,14 @@
 }
 
 abstract class I<T> {
-  void f(T /*@covariance=genericImpl*/ x);
+  void f(T x);
 }
 
 class M {
   void f(int x) {}
 }
 
-class /*@forwardingStub=void f(covariance=(genericImpl) int x)*/ C = B
-    with M
-    implements I<int>;
+class C = B with M implements I<int>;
 void g1(C c) {
   c.f(1);
 }
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.legacy.expect
index 51518db..144807a 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.legacy.expect
@@ -12,7 +12,7 @@
   synthetic constructor •() → self::I<self::I::T>
     : super core::Object::•()
     ;
-  abstract method f(self::I::T x) → void;
+  abstract method f(generic-covariant-impl self::I::T x) → void;
 }
 class M extends core::Object {
   synthetic constructor •() → self::M
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.legacy.transformed.expect
index 8fe549e..20d3a2e 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.legacy.transformed.expect
@@ -12,7 +12,7 @@
   synthetic constructor •() → self::I<self::I::T>
     : super core::Object::•()
     ;
-  abstract method f(self::I::T x) → void;
+  abstract method f(generic-covariant-impl self::I::T x) → void;
 }
 class M extends core::Object {
   synthetic constructor •() → self::M
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.outline.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.outline.expect
index c96cbc1..10f6ea9 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_mixin.dart.outline.expect
@@ -11,7 +11,7 @@
 abstract class I<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::I<self::I::T>
     ;
-  abstract method f(self::I::T x) → void;
+  abstract method f(generic-covariant-impl self::I::T x) → void;
 }
 class M extends core::Object {
   synthetic constructor •() → self::M
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart
index 84127a1..a869fd9 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart
@@ -10,11 +10,10 @@
 }
 
 abstract class I<T> {
-  void f(T /*@covariance=genericImpl*/ x);
+  void f(T x);
 }
 
-class /*@forwardingStub=void f(covariance=(genericImpl) int x)*/ C extends B
-    implements I<int> {}
+class C extends B implements I<int> {}
 
 void g1(C c) {
   c.f(1);
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.legacy.expect
index 67ecc72..ca44867 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.legacy.expect
@@ -12,7 +12,7 @@
   synthetic constructor •() → self::I<self::I::T>
     : super core::Object::•()
     ;
-  abstract method f(self::I::T x) → void;
+  abstract method f(generic-covariant-impl self::I::T x) → void;
 }
 class C extends self::B implements self::I<core::int> {
   synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.legacy.transformed.expect
index 67ecc72..ca44867 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.legacy.transformed.expect
@@ -12,7 +12,7 @@
   synthetic constructor •() → self::I<self::I::T>
     : super core::Object::•()
     ;
-  abstract method f(self::I::T x) → void;
+  abstract method f(generic-covariant-impl self::I::T x) → void;
 }
 class C extends self::B implements self::I<core::int> {
   synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.outline.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.outline.expect
index 2c50229..ee14e2c 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super.dart.outline.expect
@@ -11,7 +11,7 @@
 abstract class I<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::I<self::I::T>
     ;
-  abstract method f(self::I::T x) → void;
+  abstract method f(generic-covariant-impl self::I::T x) → void;
 }
 class C extends self::B implements self::I<core::int> {
   synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart
index ea42a43..8208926 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart
@@ -10,14 +10,12 @@
 }
 
 abstract class I<T> {
-  void f(T /*@covariance=genericImpl*/ x);
+  void f(T x);
 }
 
 class M {}
 
-class /*@forwardingStub=void f(covariance=(genericImpl) int x)*/ C = B
-    with M
-    implements I<int>;
+class C = B with M implements I<int>;
 void g1(C c) {
   c.f(1);
 }
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.legacy.expect
index fff4959..45abbbf 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.legacy.expect
@@ -12,7 +12,7 @@
   synthetic constructor •() → self::I<self::I::T>
     : super core::Object::•()
     ;
-  abstract method f(self::I::T x) → void;
+  abstract method f(generic-covariant-impl self::I::T x) → void;
 }
 class M extends core::Object {
   synthetic constructor •() → self::M
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.legacy.transformed.expect
index aca4225..0e61a92 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.legacy.transformed.expect
@@ -12,7 +12,7 @@
   synthetic constructor •() → self::I<self::I::T>
     : super core::Object::•()
     ;
-  abstract method f(self::I::T x) → void;
+  abstract method f(generic-covariant-impl self::I::T x) → void;
 }
 class M extends core::Object {
   synthetic constructor •() → self::M
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.outline.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.outline.expect
index 171a55f..926b281 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_in_interface_super_mixin.dart.outline.expect
@@ -11,7 +11,7 @@
 abstract class I<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::I<self::I::T>
     ;
-  abstract method f(self::I::T x) → void;
+  abstract method f(generic-covariant-impl self::I::T x) → void;
 }
 class M extends core::Object {
   synthetic constructor •() → self::M
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart
index 260dabe..8261613 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart
@@ -10,8 +10,8 @@
 typedef U G<T, U>(T x);
 
 class C<T> {
-  void f1(T /*@covariance=genericImpl*/ x) {}
-  T f2(List<T> /*@covariance=genericImpl*/ x) => x.first;
+  void f1(T x) {}
+  T f2(List<T> x) => x.first;
 }
 
 F<num> g1(C<num> c) {
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.legacy.expect
index cb4340c..173ea04 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.legacy.expect
@@ -8,8 +8,8 @@
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f1(self::C::T x) → void {}
-  method f2(core::List<self::C::T> x) → self::C::T
+  method f1(generic-covariant-impl self::C::T x) → void {}
+  method f2(generic-covariant-impl core::List<self::C::T> x) → self::C::T
     return x.first;
 }
 static method g1(self::C<core::num> c) → (core::num) → void {
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.legacy.transformed.expect
index cb4340c..173ea04 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.legacy.transformed.expect
@@ -8,8 +8,8 @@
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f1(self::C::T x) → void {}
-  method f2(core::List<self::C::T> x) → self::C::T
+  method f1(generic-covariant-impl self::C::T x) → void {}
+  method f2(generic-covariant-impl core::List<self::C::T> x) → self::C::T
     return x.first;
 }
 static method g1(self::C<core::num> c) → (core::num) → void {
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.outline.expect b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.outline.expect
index d426ddb..3983048 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_generic_parameter_tear_off.dart.outline.expect
@@ -7,9 +7,9 @@
 class C<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T>
     ;
-  method f1(self::C::T x) → void
+  method f1(generic-covariant-impl self::C::T x) → void
     ;
-  method f2(core::List<self::C::T> x) → self::C::T
+  method f2(generic-covariant-impl core::List<self::C::T> x) → self::C::T
     ;
 }
 static method g1(self::C<core::num> c) → (core::num) → void
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_keyword.dart b/pkg/front_end/testcases/runtime_checks/covariant_keyword.dart
index 1c44f18..02bfdcf 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_keyword.dart
+++ b/pkg/front_end/testcases/runtime_checks/covariant_keyword.dart
@@ -12,11 +12,11 @@
 }
 
 class D extends C {
-  void f(covariant int /*@covariance=explicit*/ x) {}
+  void f(covariant int x) {}
 }
 
 class E extends D {
-  void f(int /*@covariance=explicit*/ x) {}
+  void f(int x) {}
 }
 
 void g1(C c) {
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_keyword_field.dart b/pkg/front_end/testcases/runtime_checks/covariant_keyword_field.dart
index 5756611..7c7f663 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_keyword_field.dart
+++ b/pkg/front_end/testcases/runtime_checks/covariant_keyword_field.dart
@@ -10,11 +10,11 @@
 }
 
 class D implements C {
-  covariant int /*@covariance=explicit*/ x;
+  covariant int x;
 }
 
 class E implements D {
-  int /*@covariance=explicit*/ x;
+  int x;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_keyword_field.dart.hierarchy.expect b/pkg/front_end/testcases/runtime_checks/covariant_keyword_field.dart.hierarchy.expect
index a0755f9..3142f9e 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_keyword_field.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_keyword_field.dart.hierarchy.expect
@@ -38,6 +38,7 @@
     C.x
 
 D:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: C
@@ -71,6 +72,7 @@
     D.x
 
 E:
+  Longest path to Object: 3
   superclasses:
     Object
   interfaces: D, C
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_keyword_field_inherited_by_setter.dart b/pkg/front_end/testcases/runtime_checks/covariant_keyword_field_inherited_by_setter.dart
index 9ad2404..d8f1ceb 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_keyword_field_inherited_by_setter.dart
+++ b/pkg/front_end/testcases/runtime_checks/covariant_keyword_field_inherited_by_setter.dart
@@ -10,12 +10,12 @@
 }
 
 class D implements C {
-  covariant int /*@covariance=explicit*/ x;
+  covariant int x;
 }
 
 class E implements D {
   int get x => 0;
-  void set x(int /*@covariance=explicit*/ value) {}
+  void set x(int value) {}
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_keyword_field_inherited_by_setter.dart.hierarchy.expect b/pkg/front_end/testcases/runtime_checks/covariant_keyword_field_inherited_by_setter.dart.hierarchy.expect
index a0755f9..3142f9e 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_keyword_field_inherited_by_setter.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_keyword_field_inherited_by_setter.dart.hierarchy.expect
@@ -38,6 +38,7 @@
     C.x
 
 D:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: C
@@ -71,6 +72,7 @@
     D.x
 
 E:
+  Longest path to Object: 3
   superclasses:
     Object
   interfaces: D, C
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter.dart b/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter.dart
index 0233e91..d9b8a30e 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter.dart
+++ b/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter.dart
@@ -10,11 +10,11 @@
 }
 
 class D extends C {
-  void set x(covariant int /*@covariance=explicit*/ value) {}
+  void set x(covariant int value) {}
 }
 
 class E extends D {
-  void set x(int /*@covariance=explicit*/ value) {}
+  void set x(int value) {}
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter_inherited_by_field.dart b/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter_inherited_by_field.dart
index 3594b79..21bd63d 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter_inherited_by_field.dart
+++ b/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter_inherited_by_field.dart
@@ -10,11 +10,11 @@
 }
 
 class D extends C {
-  void set x(covariant int /*@covariance=explicit*/ value) {}
+  void set x(covariant int value) {}
 }
 
 class E implements D {
-  int /*@covariance=explicit*/ x;
+  int x;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter_inherited_by_field.dart.hierarchy.expect b/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter_inherited_by_field.dart.hierarchy.expect
index 7a4dfeb..7242fb4 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter_inherited_by_field.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_keyword_setter_inherited_by_field.dart.hierarchy.expect
@@ -56,6 +56,7 @@
     D.x
 
 E:
+  Longest path to Object: 3
   superclasses:
     Object
   interfaces: D, C
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_setter.dart b/pkg/front_end/testcases/runtime_checks/covariant_setter.dart
index fc2b4f1..029caad 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_setter.dart
+++ b/pkg/front_end/testcases/runtime_checks/covariant_setter.dart
@@ -8,9 +8,9 @@
 typedef void F<T>(T x);
 
 class C<T> {
-  T /*@covariance=genericImpl*/ x;
-  void set y(T /*@covariance=genericImpl*/ value) {}
-  void f(T /*@covariance=genericImpl*/ value) {
+  T x;
+  void set y(T value) {}
+  void f(T value) {
     this.x = value;
     this.y = value;
   }
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.legacy.expect
index fa9d6c9..3fb057f 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.legacy.expect
@@ -4,12 +4,12 @@
 
 typedef F<T extends core::Object = dynamic> = (T) → void;
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T x = null;
+  generic-covariant-impl field self::C::T x = null;
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  set y(self::C::T value) → void {}
-  method f(self::C::T value) → void {
+  set y(generic-covariant-impl self::C::T value) → void {}
+  method f(generic-covariant-impl self::C::T value) → void {
     this.{self::C::x} = value;
     this.{self::C::y} = value;
   }
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.legacy.transformed.expect
index fa9d6c9..3fb057f 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.legacy.transformed.expect
@@ -4,12 +4,12 @@
 
 typedef F<T extends core::Object = dynamic> = (T) → void;
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T x = null;
+  generic-covariant-impl field self::C::T x = null;
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  set y(self::C::T value) → void {}
-  method f(self::C::T value) → void {
+  set y(generic-covariant-impl self::C::T value) → void {}
+  method f(generic-covariant-impl self::C::T value) → void {
     this.{self::C::x} = value;
     this.{self::C::y} = value;
   }
diff --git a/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.outline.expect b/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.outline.expect
index edbba3a..034ccc0 100644
--- a/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/covariant_setter.dart.outline.expect
@@ -4,12 +4,12 @@
 
 typedef F<T extends core::Object = dynamic> = (T) → void;
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T x;
+  generic-covariant-impl field self::C::T x;
   synthetic constructor •() → self::C<self::C::T>
     ;
-  set y(self::C::T value) → void
+  set y(generic-covariant-impl self::C::T value) → void
     ;
-  method f(self::C::T value) → void
+  method f(generic-covariant-impl self::C::T value) → void
     ;
 }
 static method g(self::C<core::num> c) → void
diff --git a/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart b/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart
index 279e3ba..790dff4 100644
--- a/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart
+++ b/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart
@@ -6,12 +6,12 @@
 library test;
 
 class C<T> {
-  void f1(T /*@covariance=genericImpl*/ x) {}
+  void f1(T x) {}
   void f2(int x) {}
 }
 
 class D extends C<num> {
-  void f1(covariant int /*@covariance=explicit*/ x) {}
+  void f1(covariant int x) {}
 }
 
 void g1(dynamic d) {
diff --git a/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.legacy.expect
index 92254e8..2efc919 100644
--- a/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.legacy.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f1(self::C::T x) → void {}
+  method f1(generic-covariant-impl self::C::T x) → void {}
   method f2(core::int x) → void {}
 }
 class D extends self::C<core::num> {
diff --git a/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.legacy.transformed.expect
index 92254e8..2efc919 100644
--- a/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.legacy.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f1(self::C::T x) → void {}
+  method f1(generic-covariant-impl self::C::T x) → void {}
   method f2(core::int x) → void {}
 }
 class D extends self::C<core::num> {
diff --git a/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.outline.expect b/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.outline.expect
index e6d2c0e..87b6f89 100644
--- a/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/dynamic_invocation.dart.outline.expect
@@ -5,7 +5,7 @@
 class C<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T>
     ;
-  method f1(self::C::T x) → void
+  method f1(generic-covariant-impl self::C::T x) → void
     ;
   method f2(core::int x) → void
     ;
diff --git a/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart b/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart
index 8f1f075..6206b0e 100644
--- a/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart
+++ b/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart
@@ -6,7 +6,7 @@
 library test;
 
 class C<T> {
-  void f< /*@covariance=genericImpl*/ U extends T>(U x) {}
+  void f<U extends T>(U x) {}
 }
 
 void g1(dynamic d) {
diff --git a/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.legacy.expect
index 8fc21ae..205ca75 100644
--- a/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.legacy.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f<U extends self::C::T = dynamic>(self::C::f::U x) → void {}
+  method f<generic-covariant-impl U extends self::C::T = dynamic>(self::C::f::U x) → void {}
 }
 static method g1(dynamic d) → void {
   d.f<core::num>(1.5);
diff --git a/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.legacy.transformed.expect
index 8fc21ae..205ca75 100644
--- a/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.legacy.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f<U extends self::C::T = dynamic>(self::C::f::U x) → void {}
+  method f<generic-covariant-impl U extends self::C::T = dynamic>(self::C::f::U x) → void {}
 }
 static method g1(dynamic d) → void {
   d.f<core::num>(1.5);
diff --git a/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.outline.expect b/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.outline.expect
index 195a9e4..65c7be8 100644
--- a/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/dynamic_invocation_generic.dart.outline.expect
@@ -5,7 +5,7 @@
 class C<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T>
     ;
-  method f<U extends self::C::T = dynamic>(self::C::f::U x) → void
+  method f<generic-covariant-impl U extends self::C::T = dynamic>(self::C::f::U x) → void
     ;
 }
 static method g1(dynamic d) → void
diff --git a/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart b/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart
index 554eeae..065bd4e 100644
--- a/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart
+++ b/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart
@@ -6,14 +6,13 @@
 library test;
 
 class B<T> {
-  T /*@covariance=genericImpl*/ x;
+  T x;
 }
 
 class C {
   num x;
 }
 
-class /*@forwardingStub=void set x(covariance=(genericImpl) num _)*/ D extends C
-    implements B<num> {}
+class D extends C implements B<num> {}
 
 void main() {}
diff --git a/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.legacy.expect
index 7f689fb..084024b 100644
--- a/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.legacy.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class B<T extends core::Object = dynamic> extends core::Object {
-  field self::B::T x = null;
+  generic-covariant-impl field self::B::T x = null;
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.legacy.transformed.expect
index 7f689fb..084024b 100644
--- a/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.legacy.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class B<T extends core::Object = dynamic> extends core::Object {
-  field self::B::T x = null;
+  generic-covariant-impl field self::B::T x = null;
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.outline.expect b/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.outline.expect
index e67be67..d696974 100644
--- a/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/field_forwarding_stub_generic_covariant.dart.outline.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class B<T extends core::Object = dynamic> extends core::Object {
-  field self::B::T x;
+  generic-covariant-impl field self::B::T x;
   synthetic constructor •() → self::B<self::B::T>
     ;
 }
diff --git a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart
index b8607ea..816a396 100644
--- a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart
+++ b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart
@@ -23,14 +23,11 @@
 }
 
 abstract class I<T> {
-  void f([T /*@covariance=genericImpl*/ x]);
-  void g({T /*@covariance=genericImpl*/ x});
+  void f([T x]);
+  void g({T x});
 }
 
-class
-/*@forwardingStub=void f([covariance=(genericImpl) num x])*/
-/*@forwardingStub=void g({covariance=(genericImpl) num x})*/
-    C extends B implements I<num> {}
+class C extends B implements I<num> {}
 
 main() {
   C c = new C();
diff --git a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.legacy.expect
index 01f712b..82a32ab 100644
--- a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.legacy.expect
@@ -23,8 +23,8 @@
   synthetic constructor •() → self::I<self::I::T>
     : super core::Object::•()
     ;
-  abstract method f([self::I::T x = null]) → void;
-  abstract method g({self::I::T x = null}) → void;
+  abstract method f([generic-covariant-impl self::I::T x = null]) → void;
+  abstract method g({generic-covariant-impl self::I::T x = null}) → void;
 }
 class C extends self::B implements self::I<core::num> {
   synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.legacy.transformed.expect
index 01f712b..82a32ab 100644
--- a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.legacy.transformed.expect
@@ -23,8 +23,8 @@
   synthetic constructor •() → self::I<self::I::T>
     : super core::Object::•()
     ;
-  abstract method f([self::I::T x = null]) → void;
-  abstract method g({self::I::T x = null}) → void;
+  abstract method f([generic-covariant-impl self::I::T x = null]) → void;
+  abstract method g({generic-covariant-impl self::I::T x = null}) → void;
 }
 class C extends self::B implements self::I<core::num> {
   synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.outline.expect b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.outline.expect
index 596728c..5998e7f 100644
--- a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_default_values.dart.outline.expect
@@ -16,8 +16,8 @@
 abstract class I<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::I<self::I::T>
     ;
-  abstract method f([self::I::T x]) → void;
-  abstract method g({self::I::T x}) → void;
+  abstract method f([generic-covariant-impl self::I::T x]) → void;
+  abstract method g({generic-covariant-impl self::I::T x}) → void;
 }
 class C extends self::B implements self::I<core::num> {
   synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart
index 2b22cac..2cd0b19 100644
--- a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart
+++ b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart
@@ -10,10 +10,9 @@
 }
 
 abstract class I<T> {
-  void f(T /*@covariance=genericImpl*/ x, int y);
+  void f(T x, int y);
 }
 
-class /*@forwardingStub=void f(covariance=(genericImpl) int x, covariance=() int y)*/ C
-    extends B implements I<int> {}
+class C extends B implements I<int> {}
 
 void main() {}
diff --git a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.legacy.expect
index 049bff0..5486a15 100644
--- a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.legacy.expect
@@ -12,7 +12,7 @@
   synthetic constructor •() → self::I<self::I::T>
     : super core::Object::•()
     ;
-  abstract method f(self::I::T x, core::int y) → void;
+  abstract method f(generic-covariant-impl self::I::T x, core::int y) → void;
 }
 class C extends self::B implements self::I<core::int> {
   synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.legacy.transformed.expect
index 049bff0..5486a15 100644
--- a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.legacy.transformed.expect
@@ -12,7 +12,7 @@
   synthetic constructor •() → self::I<self::I::T>
     : super core::Object::•()
     ;
-  abstract method f(self::I::T x, core::int y) → void;
+  abstract method f(generic-covariant-impl self::I::T x, core::int y) → void;
 }
 class C extends self::B implements self::I<core::int> {
   synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.outline.expect b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.outline.expect
index e33d959..a0b2b04 100644
--- a/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/forwarding_stub_with_non_covariant_param.dart.outline.expect
@@ -11,7 +11,7 @@
 abstract class I<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::I<self::I::T>
     ;
-  abstract method f(self::I::T x, core::int y) → void;
+  abstract method f(generic-covariant-impl self::I::T x, core::int y) → void;
 }
 class C extends self::B implements self::I<core::int> {
   synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart b/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart
index b144c81..d9f6ffd 100644
--- a/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart
+++ b/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart
@@ -6,19 +6,19 @@
 library test;
 
 class C<T> {
-  void set x(T /*@covariance=genericImpl*/ t) {}
-  T /*@covariance=genericImpl*/ y;
+  void set x(T t) {}
+  T y;
 }
 
 class D implements C<num> {
-  num /*@covariance=genericImpl*/ x;
-  num /*@covariance=genericImpl*/ y;
+  num x;
+  num y;
 }
 
 class E implements C<num> {
-  void set x(num /*@covariance=genericImpl*/ t) {}
+  void set x(num t) {}
   num get y => null;
-  void set y(num /*@covariance=genericImpl*/ t) {}
+  void set y(num t) {}
 }
 
 void main() {}
diff --git a/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.hierarchy.expect b/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.hierarchy.expect
index be3c79b..c37a550 100644
--- a/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.hierarchy.expect
@@ -39,6 +39,7 @@
     C.x
 
 D:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: C<num>
@@ -76,6 +77,7 @@
     D.x
 
 E:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: C<num>
diff --git a/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.legacy.expect
index 8874ff3..121a90b 100644
--- a/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.legacy.expect
@@ -3,11 +3,11 @@
 import "dart:core" as core;
 
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T y = null;
+  generic-covariant-impl field self::C::T y = null;
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  set x(self::C::T t) → void {}
+  set x(generic-covariant-impl self::C::T t) → void {}
 }
 class D extends core::Object implements self::C<core::num> {
   field core::num x = null;
diff --git a/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.legacy.transformed.expect
index 8874ff3..121a90b 100644
--- a/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.legacy.transformed.expect
@@ -3,11 +3,11 @@
 import "dart:core" as core;
 
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T y = null;
+  generic-covariant-impl field self::C::T y = null;
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  set x(self::C::T t) → void {}
+  set x(generic-covariant-impl self::C::T t) → void {}
 }
 class D extends core::Object implements self::C<core::num> {
   field core::num x = null;
diff --git a/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.outline.expect b/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.outline.expect
index f6ab6e3..bf98c8f 100644
--- a/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/generic_covariance_inheritance_setter_field.dart.outline.expect
@@ -3,10 +3,10 @@
 import "dart:core" as core;
 
 class C<T extends core::Object = dynamic> extends core::Object {
-  field self::C::T y;
+  generic-covariant-impl field self::C::T y;
   synthetic constructor •() → self::C<self::C::T>
     ;
-  set x(self::C::T t) → void
+  set x(generic-covariant-impl self::C::T t) → void
     ;
 }
 class D extends core::Object implements self::C<core::num> {
diff --git a/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart b/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart
index 6558f2d..54358a5 100644
--- a/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart
+++ b/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart
@@ -6,17 +6,17 @@
 library test;
 
 abstract class A {
-  void set x(covariant Object /*@covariance=explicit*/ value);
+  void set x(covariant Object value);
 }
 
 class B implements A {
-  void f(covariant Object /*@covariance=explicit*/ x) {}
-  Object /*@covariance=explicit*/ x; // covariant
+  void f(covariant Object x) {}
+  Object x; // covariant
 }
 
 class C<T> implements B {
-  void f(T /*@covariance=explicit*/ x) {}
-  T /*@covariance=explicit*/ x;
+  void f(T x) {}
+  T x;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.hierarchy.expect b/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.hierarchy.expect
index 11d6411..7c05629 100644
--- a/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.hierarchy.expect
@@ -37,6 +37,7 @@
     A.x
 
 B:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: A
@@ -72,6 +73,7 @@
     B.x
 
 C:
+  Longest path to Object: 3
   superclasses:
     Object
   interfaces: B, A
diff --git a/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.legacy.expect
index 943bf76..fc559f4 100644
--- a/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.legacy.expect
@@ -16,10 +16,10 @@
   method f(covariant core::Object x) → void {}
 }
 class C<T extends core::Object = dynamic> extends core::Object implements self::B {
-  field self::C::T x = null;
+  generic-covariant-impl field self::C::T x = null;
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f(self::C::T x) → void {}
+  method f(generic-covariant-impl self::C::T x) → void {}
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.legacy.transformed.expect
index 943bf76..fc559f4 100644
--- a/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.legacy.transformed.expect
@@ -16,10 +16,10 @@
   method f(covariant core::Object x) → void {}
 }
 class C<T extends core::Object = dynamic> extends core::Object implements self::B {
-  field self::C::T x = null;
+  generic-covariant-impl field self::C::T x = null;
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f(self::C::T x) → void {}
+  method f(generic-covariant-impl self::C::T x) → void {}
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.outline.expect b/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.outline.expect
index 89789e5..4ed0cca 100644
--- a/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks/generic_vs_explicit_covariance.dart.outline.expect
@@ -15,10 +15,10 @@
     ;
 }
 class C<T extends core::Object = dynamic> extends core::Object implements self::B {
-  field self::C::T x;
+  generic-covariant-impl field self::C::T x;
   synthetic constructor •() → self::C<self::C::T>
     ;
-  method f(self::C::T x) → void
+  method f(generic-covariant-impl self::C::T x) → void
     ;
 }
 static method main() → dynamic
diff --git a/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart b/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart
index ce4aebd..4b4ea07 100644
--- a/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart
@@ -10,11 +10,11 @@
 }
 
 abstract class I<T> {
-  void f(T /*@covariance=genericImpl*/ x);
+  void f(T x);
 }
 
 class C extends B implements I<num> {
-  void /*@forwardingStub=semi-stub*/ f(num /*@covariance=genericImpl*/ x);
+  void /*@forwardingStub=semi-stub*/ f(num x);
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.legacy.expect
index aea0463..95fdf8b 100644
--- a/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.legacy.expect
@@ -12,7 +12,7 @@
   synthetic constructor •() → self::I<self::I::T>
     : super core::Object::•()
     ;
-  abstract method f(self::I::T x) → void;
+  abstract method f(generic-covariant-impl self::I::T x) → void;
 }
 class C extends self::B implements self::I<core::num> {
   synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.legacy.transformed.expect
index aea0463..95fdf8b 100644
--- a/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.legacy.transformed.expect
@@ -12,7 +12,7 @@
   synthetic constructor •() → self::I<self::I::T>
     : super core::Object::•()
     ;
-  abstract method f(self::I::T x) → void;
+  abstract method f(generic-covariant-impl self::I::T x) → void;
 }
 class C extends self::B implements self::I<core::num> {
   synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.outline.expect b/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.outline.expect
index 8a400cf..8b7ff11 100644
--- a/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/abstract_override_becomes_forwarding_stub.dart.outline.expect
@@ -11,7 +11,7 @@
 abstract class I<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::I<self::I::T>
     ;
-  abstract method f(self::I::T x) → void;
+  abstract method f(generic-covariant-impl self::I::T x) → void;
 }
 class C extends self::B implements self::I<core::num> {
   synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart b/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart
index 9cc0c47..fa5945b 100644
--- a/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart
@@ -8,16 +8,16 @@
 typedef F<T>(T x);
 
 class C<T> {
-  void f(T /*@covariance=genericImpl*/ x) {}
-  void g1(T /*@covariance=genericImpl*/ x) {
+  void f(T x) {}
+  void g1(T x) {
     this.f(x);
   }
 
-  void g2(T /*@covariance=genericImpl*/ x) {
+  void g2(T x) {
     f(x);
   }
 
-  void g3(C<T> /*@covariance=genericImpl*/ c, T /*@covariance=genericImpl*/ x) {
+  void g3(C<T> c, T x) {
     c.f(x);
   }
 
@@ -27,7 +27,7 @@
 class D extends C<int> {}
 
 class E extends C<num> {
-  void f(covariant int /*@covariance=explicit*/ x) {}
+  void f(covariant int x) {}
 }
 
 test() {
diff --git a/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.legacy.expect
index f02f1bc..f9eaac1 100644
--- a/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.legacy.expect
@@ -7,14 +7,14 @@
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f(self::C::T x) → void {}
-  method g1(self::C::T x) → void {
+  method f(generic-covariant-impl self::C::T x) → void {}
+  method g1(generic-covariant-impl self::C::T x) → void {
     this.{self::C::f}(x);
   }
-  method g2(self::C::T x) → void {
+  method g2(generic-covariant-impl self::C::T x) → void {
     this.{self::C::f}(x);
   }
-  method g3(self::C<self::C::T> c, self::C::T x) → void {
+  method g3(generic-covariant-impl self::C<self::C::T> c, generic-covariant-impl self::C::T x) → void {
     c.f(x);
   }
   method g4() → (self::C::T) → dynamic
diff --git a/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.legacy.transformed.expect
index f02f1bc..f9eaac1 100644
--- a/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.legacy.transformed.expect
@@ -7,14 +7,14 @@
   synthetic constructor •() → self::C<self::C::T>
     : super core::Object::•()
     ;
-  method f(self::C::T x) → void {}
-  method g1(self::C::T x) → void {
+  method f(generic-covariant-impl self::C::T x) → void {}
+  method g1(generic-covariant-impl self::C::T x) → void {
     this.{self::C::f}(x);
   }
-  method g2(self::C::T x) → void {
+  method g2(generic-covariant-impl self::C::T x) → void {
     this.{self::C::f}(x);
   }
-  method g3(self::C<self::C::T> c, self::C::T x) → void {
+  method g3(generic-covariant-impl self::C<self::C::T> c, generic-covariant-impl self::C::T x) → void {
     c.f(x);
   }
   method g4() → (self::C::T) → dynamic
diff --git a/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.outline.expect b/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.outline.expect
index 5b69334..0c9d1ca 100644
--- a/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/call_through_this.dart.outline.expect
@@ -6,13 +6,13 @@
 class C<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::C<self::C::T>
     ;
-  method f(self::C::T x) → void
+  method f(generic-covariant-impl self::C::T x) → void
     ;
-  method g1(self::C::T x) → void
+  method g1(generic-covariant-impl self::C::T x) → void
     ;
-  method g2(self::C::T x) → void
+  method g2(generic-covariant-impl self::C::T x) → void
     ;
-  method g3(self::C<self::C::T> c, self::C::T x) → void
+  method g3(generic-covariant-impl self::C<self::C::T> c, generic-covariant-impl self::C::T x) → void
     ;
   method g4() → (self::C::T) → dynamic
     ;
diff --git a/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart b/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart
index c88d47ada..0aeccbf 100644
--- a/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart
@@ -8,7 +8,7 @@
 typedef void F<T>(T x);
 
 class B<T> {
-  B<T> operator +(B<T> /*@covariance=genericImpl*/ other) => null;
+  B<T> operator +(B<T> other) => null;
 }
 
 class C<T> {
diff --git a/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.legacy.expect
index 89d07f9..5b0622b 100644
--- a/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.legacy.expect
@@ -7,7 +7,7 @@
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
-  operator +(self::B<self::B::T> other) → self::B<self::B::T>
+  operator +(generic-covariant-impl self::B<self::B::T> other) → self::B<self::B::T>
     return null;
 }
 class C<T extends core::Object = dynamic> extends core::Object {
diff --git a/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.legacy.transformed.expect
index 89d07f9..5b0622b 100644
--- a/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.legacy.transformed.expect
@@ -7,7 +7,7 @@
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
-  operator +(self::B<self::B::T> other) → self::B<self::B::T>
+  operator +(generic-covariant-impl self::B<self::B::T> other) → self::B<self::B::T>
     return null;
 }
 class C<T extends core::Object = dynamic> extends core::Object {
diff --git a/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.outline.expect b/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.outline.expect
index c30ef22..2df9ad8f 100644
--- a/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/contravariant_getter_return_compound_assign.dart.outline.expect
@@ -6,7 +6,7 @@
 class B<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::B<self::B::T>
     ;
-  operator +(self::B<self::B::T> other) → self::B<self::B::T>
+  operator +(generic-covariant-impl self::B<self::B::T> other) → self::B<self::B::T>
     ;
 }
 class C<T extends core::Object = dynamic> extends core::Object {
diff --git a/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart b/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart
index 47d0002..ea53d03 100644
--- a/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart
@@ -8,7 +8,7 @@
 typedef void F<T>(T x);
 
 class B<T> {
-  B<T> operator +(B<T> /*@covariance=genericImpl*/ other) => null;
+  B<T> operator +(B<T> other) => null;
 }
 
 class C<T> {
diff --git a/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.legacy.expect
index e7781b1..3345c98 100644
--- a/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.legacy.expect
@@ -7,7 +7,7 @@
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
-  operator +(self::B<self::B::T> other) → self::B<self::B::T>
+  operator +(generic-covariant-impl self::B<self::B::T> other) → self::B<self::B::T>
     return null;
 }
 class C<T extends core::Object = dynamic> extends core::Object {
diff --git a/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.legacy.transformed.expect
index e7781b1..3345c98 100644
--- a/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.legacy.transformed.expect
@@ -7,7 +7,7 @@
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
-  operator +(self::B<self::B::T> other) → self::B<self::B::T>
+  operator +(generic-covariant-impl self::B<self::B::T> other) → self::B<self::B::T>
     return null;
 }
 class C<T extends core::Object = dynamic> extends core::Object {
diff --git a/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.outline.expect b/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.outline.expect
index 5e2e915..bb5426d 100644
--- a/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/contravariant_index_assign.dart.outline.expect
@@ -6,7 +6,7 @@
 class B<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::B<self::B::T>
     ;
-  operator +(self::B<self::B::T> other) → self::B<self::B::T>
+  operator +(generic-covariant-impl self::B<self::B::T> other) → self::B<self::B::T>
     ;
 }
 class C<T extends core::Object = dynamic> extends core::Object {
diff --git a/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart b/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart
index 0c73221..5d2400e 100644
--- a/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart
@@ -6,9 +6,9 @@
 library test;
 
 class B<T> {
-  void f(T /*@covariance=genericImpl*/ x) {}
-  void g({T /*@covariance=genericImpl*/ x}) {}
-  void h< /*@covariance=genericImpl*/ U extends T>() {}
+  void f(T x) {}
+  void g({T x}) {}
+  void h<U extends T>() {}
 }
 
 class C extends B<int> {}
diff --git a/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.legacy.expect
index 1fe58ed..9addeea 100644
--- a/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.legacy.expect
@@ -6,9 +6,9 @@
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
-  method f(self::B::T x) → void {}
-  method g({self::B::T x = null}) → void {}
-  method h<U extends self::B::T = dynamic>() → void {}
+  method f(generic-covariant-impl self::B::T x) → void {}
+  method g({generic-covariant-impl self::B::T x = null}) → void {}
+  method h<generic-covariant-impl U extends self::B::T = dynamic>() → void {}
 }
 class C extends self::B<core::int> {
   synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.legacy.transformed.expect
index 1fe58ed..9addeea 100644
--- a/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.legacy.transformed.expect
@@ -6,9 +6,9 @@
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
-  method f(self::B::T x) → void {}
-  method g({self::B::T x = null}) → void {}
-  method h<U extends self::B::T = dynamic>() → void {}
+  method f(generic-covariant-impl self::B::T x) → void {}
+  method g({generic-covariant-impl self::B::T x = null}) → void {}
+  method h<generic-covariant-impl U extends self::B::T = dynamic>() → void {}
 }
 class C extends self::B<core::int> {
   synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.outline.expect b/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.outline.expect
index b4ae0e0..88a2113 100644
--- a/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/derived_class_typed.dart.outline.expect
@@ -5,11 +5,11 @@
 class B<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::B<self::B::T>
     ;
-  method f(self::B::T x) → void
+  method f(generic-covariant-impl self::B::T x) → void
     ;
-  method g({self::B::T x}) → void
+  method g({generic-covariant-impl self::B::T x}) → void
     ;
-  method h<U extends self::B::T = dynamic>() → void
+  method h<generic-covariant-impl U extends self::B::T = dynamic>() → void
     ;
 }
 class C extends self::B<core::int> {
diff --git a/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart b/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart
index 7b9e86e..e454c40 100644
--- a/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart
@@ -6,7 +6,7 @@
 library test;
 
 class B<T> {
-  T /*@covariance=genericImpl*/ x;
+  T x;
 }
 
 class C extends B<num> {}
diff --git a/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.legacy.expect
index 052b5bf..ff86372 100644
--- a/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.legacy.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class B<T extends core::Object = dynamic> extends core::Object {
-  field self::B::T x = null;
+  generic-covariant-impl field self::B::T x = null;
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.legacy.transformed.expect
index 052b5bf..ff86372 100644
--- a/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.legacy.transformed.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class B<T extends core::Object = dynamic> extends core::Object {
-  field self::B::T x = null;
+  generic-covariant-impl field self::B::T x = null;
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.outline.expect b/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.outline.expect
index 9318356..8403e2a 100644
--- a/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_abstract_generic_covariant.dart.outline.expect
@@ -3,7 +3,7 @@
 import "dart:core" as core;
 
 class B<T extends core::Object = dynamic> extends core::Object {
-  field self::B::T x;
+  generic-covariant-impl field self::B::T x;
   synthetic constructor •() → self::B<self::B::T>
     ;
 }
diff --git a/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_explicit_covariant.dart b/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_explicit_covariant.dart
index 5f52760..aa86636 100644
--- a/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_explicit_covariant.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/field_forwarding_stub_explicit_covariant.dart
@@ -6,14 +6,13 @@
 library test;
 
 class B {
-  covariant num /*@covariance=explicit*/ x;
+  covariant num x;
 }
 
 class C {
   int x;
 }
 
-class /*@forwardingStub=void set x(covariance=(explicit) num _)*/ D extends C
-    implements B {}
+class D extends C implements B {}
 
 void main() {}
diff --git a/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart b/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart
index 1df42eb..72eae8b 100644
--- a/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart
@@ -6,25 +6,25 @@
 library test;
 
 class B<T> {
-  T /*@covariance=genericImpl*/ x;
-  T /*@covariance=genericImpl*/ y;
+  T x;
+  T y;
 }
 
 // This class inherits genericImpl annotations from its superclass, but doesn't
 // have any members marked genericInterface because the inferred types of x and
 // y do not depend on the type parameter T.
 abstract class C<T> implements B<num> {
-  var /*@covariance=genericImpl*/ x;
+  var x;
   get y;
-  set y(/*@covariance=genericImpl*/ value);
+  set y(value);
 }
 
 // This class also has members marked genericInterface, since the inferred types
 // of x and y *do* depend on the type parameter T.
 abstract class D<T> implements B<T> {
-  var /*@covariance=genericImpl*/ x;
+  var x;
   get y;
-  set y(/*@covariance=genericImpl*/ value);
+  set y(value);
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.hierarchy.expect b/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.hierarchy.expect
index 7b54720..eb5ae02 100644
--- a/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.hierarchy.expect
@@ -40,6 +40,7 @@
     B.x
 
 C:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: B<num>
@@ -77,6 +78,7 @@
     C.x
 
 D:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: B<T>
diff --git a/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.legacy.expect
index 29d74ce..a959413 100644
--- a/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.legacy.expect
@@ -3,8 +3,8 @@
 import "dart:core" as core;
 
 class B<T extends core::Object = dynamic> extends core::Object {
-  field self::B::T x = null;
-  field self::B::T y = null;
+  generic-covariant-impl field self::B::T x = null;
+  generic-covariant-impl field self::B::T y = null;
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.legacy.transformed.expect
index 29d74ce..a959413 100644
--- a/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.legacy.transformed.expect
@@ -3,8 +3,8 @@
 import "dart:core" as core;
 
 class B<T extends core::Object = dynamic> extends core::Object {
-  field self::B::T x = null;
-  field self::B::T y = null;
+  generic-covariant-impl field self::B::T x = null;
+  generic-covariant-impl field self::B::T y = null;
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
diff --git a/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.outline.expect b/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.outline.expect
index e9bcb8a..60525b9 100644
--- a/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/generic_covariance_based_on_inference.dart.outline.expect
@@ -3,8 +3,8 @@
 import "dart:core" as core;
 
 class B<T extends core::Object = dynamic> extends core::Object {
-  field self::B::T x;
-  field self::B::T y;
+  generic-covariant-impl field self::B::T x;
+  generic-covariant-impl field self::B::T y;
   synthetic constructor •() → self::B<self::B::T>
     ;
 }
diff --git a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart
index f38c741..261d869 100644
--- a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart
@@ -38,9 +38,9 @@
 
 abstract class I<T> {
   T get x;
-  void set x(T /*@covariance=genericImpl*/ value);
+  void set x(T value);
   Object get y;
-  void set y(covariant Object /*@covariance=explicit*/ value);
+  void set y(covariant Object value);
 }
 
 class M {
@@ -48,10 +48,7 @@
   int y;
 }
 
-class
-/*@forwardingStub=void set y(covariance=(explicit) Object value)*/
-/*@forwardingStub=void set x(covariance=(genericImpl) int _)*/
-    C = B with M implements I<int>;
+class C = B with M implements I<int>;
 
 void test(I<Object> i) {
   expectTypeError(() {
diff --git a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart.outline.expect b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart.outline.expect
index 2c1118b..4978034 100644
--- a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart.outline.expect
@@ -18,7 +18,7 @@
   synthetic constructor •() → self::I<self::I::T>
     ;
   abstract get x() → self::I::T;
-  abstract set x(self::I::T value) → void;
+  abstract set x(generic-covariant-impl self::I::T value) → void;
   abstract get y() → core::Object;
   abstract set y(covariant core::Object value) → void;
 }
diff --git a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart.strong.expect b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart.strong.expect
index 61b9f49..79e85ab 100644
--- a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart.strong.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart.strong.expect
@@ -2,17 +2,17 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart:48:7: Error: The return type of the method 'M.y' is 'int', which does not match the return type of the overridden method, 'Object'.
+// pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart:48:7: Error: The return type of the method 'M.y' is 'int', which does not match the return type, 'Object', of the overridden method, 'I.y'.
 //  - 'Object' is from 'dart:core'.
 // Change to a subtype of 'Object'.
 //   int y;
 //       ^
 // pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart:43:12: Context: This is the overridden method ('y').
-//   void set y(covariant Object /*@covariance=explicit*/ value);
+//   void set y(covariant Object value);
 //            ^
-// pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart:54:5: Context: Override was introduced in the mixin application class 'C'.
-//     C = B with M implements I<int>;
-//     ^
+// pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_field.dart:51:7: Context: Override was introduced in the mixin application class 'C'.
+// class C = B with M implements I<int>;
+//       ^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_getter.dart.hierarchy.expect b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_getter.dart.hierarchy.expect
index e32d429..dc66ff9 100644
--- a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_getter.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_getter.dart.hierarchy.expect
@@ -117,7 +117,7 @@
     Object
       -> B
         -> C<int>
-  interfaces: M<F<T>>, I<T>
+  interfaces: M<F<int>>, I<int>
   classMembers:
     D.f
     Object.toString
diff --git a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_getter.dart.strong.expect b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_getter.dart.strong.expect
index b92f411..450603a 100644
--- a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_getter.dart.strong.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_getter.dart.strong.expect
@@ -2,7 +2,7 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_getter.dart:39:9: Error: The return type of the method 'M.x' is 'void Function(T)', which does not match the return type of the overridden method, 'void Function(int)'.
+// pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_getter.dart:39:9: Error: The return type of the method 'M.x' is 'void Function(T)', which does not match the return type, 'void Function(int)', of the overridden method, 'B.x'.
 // Change to a subtype of 'void Function(int)'.
 //   T get x => f();
 //         ^
diff --git a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart
index 8eeb4d8..574153f 100644
--- a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart
@@ -38,9 +38,9 @@
 
 abstract class I<T> {
   T get x;
-  void set x(T /*@covariance=genericImpl*/ value);
+  void set x(T value);
   Object get y;
-  void set y(covariant Object /*@covariance=explicit*/ value);
+  void set y(covariant Object value);
 }
 
 class M {
@@ -55,10 +55,7 @@
   }
 }
 
-class
-/*@forwardingStub=void set y(covariance=(explicit) Object value)*/
-/*@forwardingStub=void set x(covariance=(genericImpl) int value)*/
-    C = B with M implements I<int>;
+class C = B with M implements I<int>;
 
 void test(I<Object> i) {
   expectTypeError(() {
diff --git a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart.outline.expect b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart.outline.expect
index 4195710..4b6371a 100644
--- a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart.outline.expect
@@ -18,7 +18,7 @@
   synthetic constructor •() → self::I<self::I::T>
     ;
   abstract get x() → self::I::T;
-  abstract set x(self::I::T value) → void;
+  abstract set x(generic-covariant-impl self::I::T value) → void;
   abstract get y() → core::Object;
   abstract set y(covariant core::Object value) → void;
 }
diff --git a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart.strong.expect b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart.strong.expect
index 47119ca..693230f 100644
--- a/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart.strong.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart.strong.expect
@@ -2,17 +2,17 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart:53:18: Error: The parameter 'value' of the method 'M.y' has type 'int', which does not match the corresponding type in the overridden method, 'Object'.
+// pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart:53:18: Error: The parameter 'value' of the method 'M.y' has type 'int', which does not match the corresponding type, 'Object', in the overridden method, 'I.y'.
 //  - 'Object' is from 'dart:core'.
 // Change to a supertype of 'Object', or, for a covariant parameter, a subtype.
 //   void set y(int value) {
 //                  ^
 // pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart:43:12: Context: This is the overridden method ('y').
-//   void set y(covariant Object /*@covariance=explicit*/ value);
+//   void set y(covariant Object value);
 //            ^
-// pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart:61:5: Context: Override was introduced in the mixin application class 'C'.
-//     C = B with M implements I<int>;
-//     ^
+// pkg/front_end/testcases/runtime_checks_new/mixin_forwarding_stub_setter.dart:58:7: Context: Override was introduced in the mixin application class 'C'.
+// class C = B with M implements I<int>;
+//       ^
 //
 import self as self;
 import "dart:core" as core;
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_checked_via_target.dart b/pkg/front_end/testcases/runtime_checks_new/stub_checked_via_target.dart
index 0a8e34b..a4fc889 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_checked_via_target.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_checked_via_target.dart
@@ -26,7 +26,7 @@
 }
 
 abstract class I {
-  int f(covariant Object /*@covariance=explicit*/ x);
+  int f(covariant Object x);
 }
 
 // Not a compile time error, because B.f satisfies the interface contract of I.f
@@ -35,8 +35,7 @@
 // Note that even though the forwarding stub's type is `(Object) -> int`, it
 // must check that `x` is an `int`, since it forwards to a method whose type is
 // `(int) -> int`.
-class /*@forwardingStub=int f(covariance=(explicit) Object x)*/ C extends B
-    implements I {}
+class C extends B implements I {}
 
 void g(C c) {
   // Not a compile time error, because C's interface inherits I.f (since it has
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_contravariant_from_class.dart b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_contravariant_from_class.dart
index 4c3139d..fc4ec48 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_contravariant_from_class.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_contravariant_from_class.dart
@@ -15,8 +15,6 @@
   T f(Object x);
 }
 
-abstract class
-/*@forwardingStub=abstract (C::T) -> void f(covariance=() Object x)*/
-    C<T> extends B<F<T>> implements I<F<T>> {}
+abstract class C<T> extends B<F<T>> implements I<F<T>> {}
 
 void main() {}
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_class.dart b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_class.dart
index ff360dc..bf9a66b 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_class.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_class.dart
@@ -15,8 +15,6 @@
   void f(F<T> x, Object y);
 }
 
-abstract class
-/*@forwardingStub=void f(covariance=(genericImpl) ((C::T) -> void) -> void x, covariance=() Object y)*/
-    C<T> extends B<F<T>> implements I<F<T>> {}
+abstract class C<T> extends B<F<T>> implements I<F<T>> {}
 
 void main() {}
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart
index dc1766a..ef67155 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart
@@ -10,11 +10,9 @@
 }
 
 abstract class I<T> {
-  void f(T /*@covariance=genericImpl*/ x, Object y);
+  void f(T x, Object y);
 }
 
-abstract class
-/*@forwardingStub=void f(covariance=(genericImpl) int x, covariance=() Object y)*/
-    C extends B implements I<int> {}
+abstract class C extends B implements I<int> {}
 
 void main() {}
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.legacy.expect
index 083d277..3334045 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.legacy.expect
@@ -12,7 +12,7 @@
   synthetic constructor •() → self::I<self::I::T>
     : super core::Object::•()
     ;
-  abstract method f(self::I::T x, core::Object y) → void;
+  abstract method f(generic-covariant-impl self::I::T x, core::Object y) → void;
 }
 abstract class C extends self::B implements self::I<core::int> {
   synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.legacy.transformed.expect
index 083d277..3334045 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.legacy.transformed.expect
@@ -12,7 +12,7 @@
   synthetic constructor •() → self::I<self::I::T>
     : super core::Object::•()
     ;
-  abstract method f(self::I::T x, core::Object y) → void;
+  abstract method f(generic-covariant-impl self::I::T x, core::Object y) → void;
 }
 abstract class C extends self::B implements self::I<core::int> {
   synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.outline.expect b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.outline.expect
index 2fd12fe..205776d 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_interface.dart.outline.expect
@@ -11,7 +11,7 @@
 abstract class I<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::I<self::I::T>
     ;
-  abstract method f(self::I::T x, core::Object y) → void;
+  abstract method f(generic-covariant-impl self::I::T x, core::Object y) → void;
 }
 abstract class C extends self::B implements self::I<core::int> {
   synthetic constructor •() → self::C
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart
index 6c7a38e..4d1e82d 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart
@@ -6,15 +6,13 @@
 library test;
 
 class B<T> {
-  void f(T /*@covariance=genericImpl*/ x, int y) {}
+  void f(T x, int y) {}
 }
 
 abstract class I {
   void f(int x, Object y);
 }
 
-abstract class
-/*@forwardingStub=abstract void f(covariance=(genericImpl) int x, covariance=() Object y)*/
-    C extends B<int> implements I {}
+abstract class C extends B<int> implements I {}
 
 void main() {}
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.legacy.expect
index c6e865f..3038f0e 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.legacy.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
-  method f(self::B::T x, core::int y) → void {}
+  method f(generic-covariant-impl self::B::T x, core::int y) → void {}
 }
 abstract class I extends core::Object {
   synthetic constructor •() → self::I
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.legacy.transformed.expect
index c6e865f..3038f0e 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.legacy.transformed.expect
@@ -6,7 +6,7 @@
   synthetic constructor •() → self::B<self::B::T>
     : super core::Object::•()
     ;
-  method f(self::B::T x, core::int y) → void {}
+  method f(generic-covariant-impl self::B::T x, core::int y) → void {}
 }
 abstract class I extends core::Object {
   synthetic constructor •() → self::I
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.outline.expect b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.outline.expect
index a447e02..9e7de41 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantImpl_from_super.dart.outline.expect
@@ -5,7 +5,7 @@
 class B<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::B<self::B::T>
     ;
-  method f(self::B::T x, core::int y) → void
+  method f(generic-covariant-impl self::B::T x, core::int y) → void
     ;
 }
 abstract class I extends core::Object {
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart
index 4b5e2b0..3b2bac1 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart
@@ -8,19 +8,17 @@
 typedef void F<T>(T t);
 
 abstract class A<T> {
-  void f(T /*@covariance=genericImpl*/ x, int y);
+  void f(T x, int y);
 }
 
 class B<T> implements A<F<T>> {
-  void f(F<T> /*@covariance=genericImpl*/ x, int y) {}
+  void f(F<T> x, int y) {}
 }
 
 abstract class I<T> implements A<F<T>> {
-  void f(F<T> /*@covariance=genericImpl*/ x, Object y);
+  void f(F<T> x, Object y);
 }
 
-abstract class
-/*@forwardingStub=abstract void f(covariance=(genericImpl) ((C::T) -> void) -> void x, covariance=() Object y)*/
-    C<T> extends B<F<T>> implements I<F<T>> {}
+abstract class C<T> extends B<F<T>> implements I<F<T>> {}
 
 void main() {}
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart.hierarchy.expect b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart.hierarchy.expect
index 86cc21b..dfb9fc6 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart.hierarchy.expect
@@ -37,6 +37,7 @@
   classSetters:
 
 B:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: A<F<T>>
@@ -68,6 +69,7 @@
   interfaceSetters:
 
 I:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: A<F<T>>
@@ -99,6 +101,7 @@
   interfaceSetters:
 
 C:
+  Longest path to Object: 3
   superclasses:
     Object
       -> B<F<T>>
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart.legacy.expect b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart.legacy.expect
index 8455164..df1249c 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart.legacy.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart.legacy.expect
@@ -7,7 +7,7 @@
   synthetic constructor •() → self::A<self::A::T>
     : super core::Object::•()
     ;
-  abstract method f(self::A::T x, core::int y) → void;
+  abstract method f(generic-covariant-impl self::A::T x, core::int y) → void;
 }
 class B<T extends core::Object = dynamic> extends core::Object implements self::A<(self::B::T) → void> {
   synthetic constructor •() → self::B<self::B::T>
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart.legacy.transformed.expect b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart.legacy.transformed.expect
index 8455164..df1249c 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart.legacy.transformed.expect
@@ -7,7 +7,7 @@
   synthetic constructor •() → self::A<self::A::T>
     : super core::Object::•()
     ;
-  abstract method f(self::A::T x, core::int y) → void;
+  abstract method f(generic-covariant-impl self::A::T x, core::int y) → void;
 }
 class B<T extends core::Object = dynamic> extends core::Object implements self::A<(self::B::T) → void> {
   synthetic constructor •() → self::B<self::B::T>
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart.outline.expect b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart.outline.expect
index 5313aae..c638537 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart.outline.expect
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariantInterface_from_class.dart.outline.expect
@@ -6,7 +6,7 @@
 abstract class A<T extends core::Object = dynamic> extends core::Object {
   synthetic constructor •() → self::A<self::A::T>
     ;
-  abstract method f(self::A::T x, core::int y) → void;
+  abstract method f(generic-covariant-impl self::A::T x, core::int y) → void;
 }
 class B<T extends core::Object = dynamic> extends core::Object implements self::A<(self::B::T) → void> {
   synthetic constructor •() → self::B<self::B::T>
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_interface.dart b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_interface.dart
index 2de34db..57a9f99 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_interface.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_interface.dart
@@ -10,11 +10,9 @@
 }
 
 abstract class I {
-  void f(covariant int /*@covariance=explicit*/ x, Object y);
+  void f(covariant int x, Object y);
 }
 
-abstract class
-/*@forwardingStub=void f(covariance=(explicit) int x, covariance=() Object y)*/
-    C extends B implements I {}
+abstract class C extends B implements I {}
 
 void main() {}
diff --git a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_super.dart b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_super.dart
index f6e26ca..3daf251 100644
--- a/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_super.dart
+++ b/pkg/front_end/testcases/runtime_checks_new/stub_from_interface_covariant_from_super.dart
@@ -6,15 +6,13 @@
 library test;
 
 class B {
-  void f(covariant int /*@covariance=explicit*/ x, int y) {}
+  void f(covariant int x, int y) {}
 }
 
 abstract class I {
   void f(int x, Object y);
 }
 
-abstract class
-/*@forwardingStub=abstract void f(covariance=(explicit) int x, covariance=() Object y)*/
-    C extends B implements I {}
+abstract class C extends B implements I {}
 
 void main() {}
diff --git a/pkg/front_end/testcases/spread_collection.dart.legacy.expect b/pkg/front_end/testcases/spread_collection.dart.legacy.expect
index e6445d9..ce54701 100644
--- a/pkg/front_end/testcases/spread_collection.dart.legacy.expect
+++ b/pkg/front_end/testcases/spread_collection.dart.legacy.expect
@@ -34,9 +34,9 @@
 import "dart:core" as core;
 
 static method main() → dynamic {
-  final dynamic aList = <core::int>[1, <dynamic>[2], <dynamic>[3]];
+  final dynamic aList = <core::int>[1];
   final dynamic aMap = <core::int, core::int>{1: 1};
-  final dynamic aSet = <core::int>{1, <dynamic>[2], <dynamic>[3]};
+  final dynamic aSet = <core::int>{1};
   final dynamic aSetOrMap = <dynamic, dynamic>{};
   core::print(aList);
   core::print(aSet);
diff --git a/pkg/front_end/testcases/spread_collection.dart.legacy.transformed.expect b/pkg/front_end/testcases/spread_collection.dart.legacy.transformed.expect
index e6445d9..ce54701 100644
--- a/pkg/front_end/testcases/spread_collection.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/spread_collection.dart.legacy.transformed.expect
@@ -34,9 +34,9 @@
 import "dart:core" as core;
 
 static method main() → dynamic {
-  final dynamic aList = <core::int>[1, <dynamic>[2], <dynamic>[3]];
+  final dynamic aList = <core::int>[1];
   final dynamic aMap = <core::int, core::int>{1: 1};
-  final dynamic aSet = <core::int>{1, <dynamic>[2], <dynamic>[3]};
+  final dynamic aSet = <core::int>{1};
   final dynamic aSetOrMap = <dynamic, dynamic>{};
   core::print(aList);
   core::print(aSet);
diff --git a/pkg/front_end/testcases/spread_collection.dart.strong.expect b/pkg/front_end/testcases/spread_collection.dart.strong.expect
index 8721adb..dbfd7b4 100644
--- a/pkg/front_end/testcases/spread_collection.dart.strong.expect
+++ b/pkg/front_end/testcases/spread_collection.dart.strong.expect
@@ -2,83 +2,50 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/spread_collection.dart:6:26: Error: Unexpected token '...'.
-//   final aList = <int>[1, ...[2], ...?[3]];
-//                          ^^^
-//
-// pkg/front_end/testcases/spread_collection.dart:6:34: Error: Unexpected token '...?'.
-//   final aList = <int>[1, ...[2], ...?[3]];
-//                                  ^^^^
-//
-// pkg/front_end/testcases/spread_collection.dart:7:33: Error: Unexpected token '...'.
-//   final aMap = <int, int>{1: 1, ...{2: 2}, ...?{3: 3}};
-//                                 ^^^
-//
-// pkg/front_end/testcases/spread_collection.dart:7:44: Error: Unexpected token '...?'.
-//   final aMap = <int, int>{1: 1, ...{2: 2}, ...?{3: 3}};
-//                                            ^^^^
-//
-// pkg/front_end/testcases/spread_collection.dart:8:25: Error: Unexpected token '...'.
-//   final aSet = <int>{1, ...[2], ...?[3]};
-//                         ^^^
-//
-// pkg/front_end/testcases/spread_collection.dart:8:33: Error: Unexpected token '...?'.
-//   final aSet = <int>{1, ...[2], ...?[3]};
-//                                 ^^^^
-//
-// pkg/front_end/testcases/spread_collection.dart:9:22: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection.dart:9:21: Error: Not enough type information to disambiguate between literal set and literal map.
+// Try providing type arguments for the literal explicitly to disambiguate it.
 //   final aSetOrMap = {...foo()};
-//                      ^^^
-//
-// pkg/front_end/testcases/spread_collection.dart:6:29: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
-//  - 'List' is from 'dart:core'.
-// Try changing the type of the left hand side, or casting the right hand side to 'int'.
-//   final aList = <int>[1, ...[2], ...?[3]];
-//                             ^
-//
-// pkg/front_end/testcases/spread_collection.dart:6:38: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
-//  - 'List' is from 'dart:core'.
-// Try changing the type of the left hand side, or casting the right hand side to 'int'.
-//   final aList = <int>[1, ...[2], ...?[3]];
-//                                      ^
-//
-// pkg/front_end/testcases/spread_collection.dart:8:28: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
-//  - 'List' is from 'dart:core'.
-// Try changing the type of the left hand side, or casting the right hand side to 'int'.
-//   final aSet = <int>{1, ...[2], ...?[3]};
-//                            ^
-//
-// pkg/front_end/testcases/spread_collection.dart:8:37: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
-//  - 'List' is from 'dart:core'.
-// Try changing the type of the left hand side, or casting the right hand side to 'int'.
-//   final aSet = <int>{1, ...[2], ...?[3]};
-//                                     ^
+//                     ^
 //
 import self as self;
 import "dart:core" as core;
 import "dart:collection" as col;
 
 static method main() → dynamic {
-  final core::List<core::int> aList = <core::int>[1, let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/spread_collection.dart:6:29: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
- - 'List' is from 'dart:core'.
-Try changing the type of the left hand side, or casting the right hand side to 'int'.
-  final aList = <int>[1, ...[2], ...?[3]];
-                            ^" in <core::int>[2] as{TypeError} core::int, let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/spread_collection.dart:6:38: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
- - 'List' is from 'dart:core'.
-Try changing the type of the left hand side, or casting the right hand side to 'int'.
-  final aList = <int>[1, ...[2], ...?[3]];
-                                     ^" in <core::int>[3] as{TypeError} core::int];
-  final core::Map<core::int, core::int> aMap = <core::int, core::int>{1: 1};
-  final core::Set<core::int> aSet = let final core::Set<core::int> #t3 = col::LinkedHashSet::•<core::int>() in let final dynamic #t4 = #t3.{core::Set::add}(1) in let final dynamic #t5 = #t3.{core::Set::add}(let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/spread_collection.dart:8:28: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
- - 'List' is from 'dart:core'.
-Try changing the type of the left hand side, or casting the right hand side to 'int'.
-  final aSet = <int>{1, ...[2], ...?[3]};
-                           ^" in <core::int>[2] as{TypeError} core::int) in let final dynamic #t7 = #t3.{core::Set::add}(let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/spread_collection.dart:8:37: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
- - 'List' is from 'dart:core'.
-Try changing the type of the left hand side, or casting the right hand side to 'int'.
-  final aSet = <int>{1, ...[2], ...?[3]};
-                                    ^" in <core::int>[3] as{TypeError} core::int) in #t3;
-  final core::Map<dynamic, dynamic> aSetOrMap = <dynamic, dynamic>{};
+  final core::List<core::int> aList = block {
+    final core::List<core::int> #t1 = <core::int>[];
+    #t1.{core::List::add}(1);
+    for (final core::int #t2 in <core::int>[2])
+      #t1.{core::List::add}(#t2);
+    final dynamic #t3 = <core::int>[3];
+    if(!#t3.{core::Object::==}(null))
+      for (final core::int #t4 in #t3)
+        #t1.{core::List::add}(#t4);
+  } =>#t1;
+  final core::Map<core::int, core::int> aMap = block {
+    final core::Map<core::int, core::int> #t5 = <core::int, core::int>{};
+    #t5.{core::Map::[]=}(1, 1);
+    for (final core::MapEntry<core::int, core::int> #t6 in <core::int, core::int>{2: 2}.{core::Map::entries})
+      #t5.{core::Map::[]=}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
+    final core::Map<dynamic, dynamic> #t7 = <core::int, core::int>{3: 3};
+    if(!#t7.{core::Object::==}(null))
+      for (final core::MapEntry<core::int, core::int> #t8 in #t7.{core::Map::entries})
+        #t5.{core::Map::[]=}(#t8.{core::MapEntry::key}, #t8.{core::MapEntry::value});
+  } =>#t5;
+  final core::Set<core::int> aSet = block {
+    final core::Set<core::int> #t9 = col::LinkedHashSet::•<core::int>();
+    #t9.{core::Set::add}(1);
+    for (final core::int #t10 in <core::int>[2])
+      #t9.{core::Set::add}(#t10);
+    final dynamic #t11 = <core::int>[3];
+    if(!#t11.{core::Object::==}(null))
+      for (final core::int #t12 in #t11)
+        #t9.{core::Set::add}(#t12);
+  } =>#t9;
+  final dynamic aSetOrMap = invalid-expression "pkg/front_end/testcases/spread_collection.dart:9:21: Error: Not enough type information to disambiguate between literal set and literal map.
+Try providing type arguments for the literal explicitly to disambiguate it.
+  final aSetOrMap = {...foo()};
+                    ^";
   core::print(aList);
   core::print(aSet);
   core::print(aMap);
diff --git a/pkg/front_end/testcases/spread_collection.dart.strong.transformed.expect b/pkg/front_end/testcases/spread_collection.dart.strong.transformed.expect
index 6ee5ecf..dbfd7b4 100644
--- a/pkg/front_end/testcases/spread_collection.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/spread_collection.dart.strong.transformed.expect
@@ -2,83 +2,50 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/spread_collection.dart:6:26: Error: Unexpected token '...'.
-//   final aList = <int>[1, ...[2], ...?[3]];
-//                          ^^^
-//
-// pkg/front_end/testcases/spread_collection.dart:6:34: Error: Unexpected token '...?'.
-//   final aList = <int>[1, ...[2], ...?[3]];
-//                                  ^^^^
-//
-// pkg/front_end/testcases/spread_collection.dart:7:33: Error: Unexpected token '...'.
-//   final aMap = <int, int>{1: 1, ...{2: 2}, ...?{3: 3}};
-//                                 ^^^
-//
-// pkg/front_end/testcases/spread_collection.dart:7:44: Error: Unexpected token '...?'.
-//   final aMap = <int, int>{1: 1, ...{2: 2}, ...?{3: 3}};
-//                                            ^^^^
-//
-// pkg/front_end/testcases/spread_collection.dart:8:25: Error: Unexpected token '...'.
-//   final aSet = <int>{1, ...[2], ...?[3]};
-//                         ^^^
-//
-// pkg/front_end/testcases/spread_collection.dart:8:33: Error: Unexpected token '...?'.
-//   final aSet = <int>{1, ...[2], ...?[3]};
-//                                 ^^^^
-//
-// pkg/front_end/testcases/spread_collection.dart:9:22: Error: Unexpected token '...'.
+// pkg/front_end/testcases/spread_collection.dart:9:21: Error: Not enough type information to disambiguate between literal set and literal map.
+// Try providing type arguments for the literal explicitly to disambiguate it.
 //   final aSetOrMap = {...foo()};
-//                      ^^^
-//
-// pkg/front_end/testcases/spread_collection.dart:6:29: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
-//  - 'List' is from 'dart:core'.
-// Try changing the type of the left hand side, or casting the right hand side to 'int'.
-//   final aList = <int>[1, ...[2], ...?[3]];
-//                             ^
-//
-// pkg/front_end/testcases/spread_collection.dart:6:38: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
-//  - 'List' is from 'dart:core'.
-// Try changing the type of the left hand side, or casting the right hand side to 'int'.
-//   final aList = <int>[1, ...[2], ...?[3]];
-//                                      ^
-//
-// pkg/front_end/testcases/spread_collection.dart:8:28: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
-//  - 'List' is from 'dart:core'.
-// Try changing the type of the left hand side, or casting the right hand side to 'int'.
-//   final aSet = <int>{1, ...[2], ...?[3]};
-//                            ^
-//
-// pkg/front_end/testcases/spread_collection.dart:8:37: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
-//  - 'List' is from 'dart:core'.
-// Try changing the type of the left hand side, or casting the right hand side to 'int'.
-//   final aSet = <int>{1, ...[2], ...?[3]};
-//                                     ^
+//                     ^
 //
 import self as self;
 import "dart:core" as core;
 import "dart:collection" as col;
 
 static method main() → dynamic {
-  final core::List<core::int> aList = <core::int>[1, let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/spread_collection.dart:6:29: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
- - 'List' is from 'dart:core'.
-Try changing the type of the left hand side, or casting the right hand side to 'int'.
-  final aList = <int>[1, ...[2], ...?[3]];
-                            ^" in <core::int>[2] as{TypeError} core::int, let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/spread_collection.dart:6:38: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
- - 'List' is from 'dart:core'.
-Try changing the type of the left hand side, or casting the right hand side to 'int'.
-  final aList = <int>[1, ...[2], ...?[3]];
-                                     ^" in <core::int>[3] as{TypeError} core::int];
-  final core::Map<core::int, core::int> aMap = <core::int, core::int>{1: 1};
-  final core::Set<core::int> aSet = let final core::Set<core::int> #t3 = col::LinkedHashSet::•<core::int>() in let final core::bool #t4 = #t3.{core::Set::add}(1) in let final core::bool #t5 = #t3.{core::Set::add}(let final<BottomType> #t6 = invalid-expression "pkg/front_end/testcases/spread_collection.dart:8:28: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
- - 'List' is from 'dart:core'.
-Try changing the type of the left hand side, or casting the right hand side to 'int'.
-  final aSet = <int>{1, ...[2], ...?[3]};
-                           ^" in <core::int>[2] as{TypeError} core::int) in let final core::bool #t7 = #t3.{core::Set::add}(let final<BottomType> #t8 = invalid-expression "pkg/front_end/testcases/spread_collection.dart:8:37: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
- - 'List' is from 'dart:core'.
-Try changing the type of the left hand side, or casting the right hand side to 'int'.
-  final aSet = <int>{1, ...[2], ...?[3]};
-                                    ^" in <core::int>[3] as{TypeError} core::int) in #t3;
-  final core::Map<dynamic, dynamic> aSetOrMap = <dynamic, dynamic>{};
+  final core::List<core::int> aList = block {
+    final core::List<core::int> #t1 = <core::int>[];
+    #t1.{core::List::add}(1);
+    for (final core::int #t2 in <core::int>[2])
+      #t1.{core::List::add}(#t2);
+    final dynamic #t3 = <core::int>[3];
+    if(!#t3.{core::Object::==}(null))
+      for (final core::int #t4 in #t3)
+        #t1.{core::List::add}(#t4);
+  } =>#t1;
+  final core::Map<core::int, core::int> aMap = block {
+    final core::Map<core::int, core::int> #t5 = <core::int, core::int>{};
+    #t5.{core::Map::[]=}(1, 1);
+    for (final core::MapEntry<core::int, core::int> #t6 in <core::int, core::int>{2: 2}.{core::Map::entries})
+      #t5.{core::Map::[]=}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
+    final core::Map<dynamic, dynamic> #t7 = <core::int, core::int>{3: 3};
+    if(!#t7.{core::Object::==}(null))
+      for (final core::MapEntry<core::int, core::int> #t8 in #t7.{core::Map::entries})
+        #t5.{core::Map::[]=}(#t8.{core::MapEntry::key}, #t8.{core::MapEntry::value});
+  } =>#t5;
+  final core::Set<core::int> aSet = block {
+    final core::Set<core::int> #t9 = col::LinkedHashSet::•<core::int>();
+    #t9.{core::Set::add}(1);
+    for (final core::int #t10 in <core::int>[2])
+      #t9.{core::Set::add}(#t10);
+    final dynamic #t11 = <core::int>[3];
+    if(!#t11.{core::Object::==}(null))
+      for (final core::int #t12 in #t11)
+        #t9.{core::Set::add}(#t12);
+  } =>#t9;
+  final dynamic aSetOrMap = invalid-expression "pkg/front_end/testcases/spread_collection.dart:9:21: Error: Not enough type information to disambiguate between literal set and literal map.
+Try providing type arguments for the literal explicitly to disambiguate it.
+  final aSetOrMap = {...foo()};
+                    ^";
   core::print(aList);
   core::print(aSet);
   core::print(aMap);
diff --git a/pkg/front_end/testcases/spread_collection_inference.dart b/pkg/front_end/testcases/spread_collection_inference.dart
new file mode 100644
index 0000000..60c1032
--- /dev/null
+++ b/pkg/front_end/testcases/spread_collection_inference.dart
@@ -0,0 +1,153 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// This test case checks that inference works for spread collections, and that
+// the errors are reported when necessary.
+
+/*@testedFeatures=inference*/
+
+Map<K, V> bar<K, V>() => null;
+
+foo(dynamic dynVar) {
+  List<int> spread = <int>[1, 2, 3];
+  Map<String, int> mapSpread = <String, int>{"foo": 4, "bar": 2};
+  int notSpreadInt = 42;
+  int Function() notSpreadFunction = null;
+  // Note that all values are actually ints.
+  Map<int, num> mapIntNum = <int, num>{42: 42};
+  List<num> listNum = <num>[42];
+
+  var /*@type=List<dynamic>*/ lhs10 = /*@typeArgs=dynamic*/ [...
+    /*@typeArgs=dynamic*/ []];
+
+  var /*@type=Set<dynamic>*/ set10 = <dynamic>{... /*@typeArgs=dynamic*/ []};
+
+  var /*@type=Map<dynamic, dynamic>*/ map10 = <dynamic, dynamic>{...
+    /*@typeArgs=dynamic, dynamic*/ {}};
+
+  var /*@type=Map<dynamic, dynamic>*/ map10ambiguous =
+    /*@typeArgs=dynamic, dynamic*/ {...  /*@typeArgs=dynamic, dynamic*/ {}};
+
+  var /*@type=List<int>*/ lhs20 = /*@typeArgs=int*/ [...spread];
+
+  var /*@type=Set<int>*/ set20 = /*@typeArgs=int*/ {...spread, 42};
+
+  var /*@type=Set<int>*/ set20ambiguous = /*@typeArgs=int*/ {...spread};
+
+  var /*@type=Map<String, int>*/ map20 = /*@typeArgs=String, int*/
+    {...mapSpread, "baz": 42};
+
+  var /*@type=Map<String, int>*/ map20ambiguous = /*@typeArgs=String, int*/
+    {...mapSpread};
+
+  var /*@type=List<dynamic>*/ lhs21 = /*@typeArgs=dynamic*/ [...(spread as
+      dynamic)];
+
+  var /*@type=Set<dynamic>*/ set21 = /*@typeArgs=dynamic*/ {...(spread as
+      dynamic), 42};
+
+  var /*@type=Map<dynamic, dynamic>*/ map21 = /*@typeArgs=dynamic, dynamic*/
+    {...(mapSpread as dynamic), "baz": 42};
+
+  dynamic map21ambiguous = {...
+    (mapSpread as dynamic)};
+
+  List<int> lhs22 = /*@typeArgs=int*/ [... /*@typeArgs=int*/ []];
+
+  Set<int> set22 = /*@typeArgs=int*/ {... /*@typeArgs=int*/ [], 42};
+
+  Set<int> set22ambiguous = /*@typeArgs=int*/ {... /*@typeArgs=int*/ []};
+
+  Map<String, int> map22 = /*@typeArgs=String, int*/
+    {... /*@typeArgs=String, int*/ {}};
+
+  List<List<int>> lhs23 = /*@typeArgs=List<int>*/ [... /*@typeArgs=List<int>*/
+    [/*@typeArgs=int*/ []]];
+
+  Set<List<int>> set23 = /*@typeArgs=List<int>*/ {... /*@typeArgs=List<int>*/
+    [/*@typeArgs=int*/ []], <int>[42]};
+
+  Set<List<int>> set23ambiguous = /*@typeArgs=List<int>*/
+    {... /*@typeArgs=List<int>*/ [/*@typeArgs=int*/ []]};
+
+  Map<String, List<int>> map23 = /*@typeArgs=String, List<int>*/
+    {... /*@typeArgs=String, List<int>*/ {"baz": /*@typeArgs=int*/ []}};
+
+  dynamic map24ambiguous = {...
+    spread, ...mapSpread};
+
+  int lhs30 = /*@typeArgs=int*/ [...spread];
+
+  int set30 = /*@typeArgs=int*/ {...spread, 42};
+
+  int set30ambiguous = /*@typeArgs=int*/
+    {...spread};
+
+  int map30 = /*@typeArgs=String, int*/
+    {...mapSpread, "baz": 42};
+
+  int map30ambiguous = /*@typeArgs=String, int*/
+    {...mapSpread};
+
+  List<dynamic> lhs40 = <dynamic>[...
+    notSpreadInt];
+
+  Set<dynamic> set40 = <dynamic>{...
+    notSpreadInt};
+
+  Map<dynamic, dynamic> map40 = <dynamic, dynamic>{...
+ notSpreadInt};
+
+  List<dynamic> lhs50 = <dynamic> [...
+    notSpreadFunction];
+
+  Set<dynamic> set50 = <dynamic> {...
+    notSpreadFunction};
+
+  Map<dynamic, dynamic> map50 = <dynamic, dynamic>{...
+ notSpreadFunction};
+
+  List<String> lhs60 = <String>[...
+    spread];
+
+  Set<String> set60 = <String>{... spread};
+
+  Map<int, int> map60 = <int, int>{...
+ mapSpread};
+
+  Map<String, String> map61 = <String, String>{...
+ mapSpread};
+
+  List<int> lhs70 = <int>[... null];
+
+  Set<int> set70 = <int>{... null};
+
+  var /*@type=Set<dynamic>*/ set71ambiguous = /*@typeArgs=dynamic*/
+    {... null, ... /*@typeArgs=dynamic*/
+      []};
+
+  Map<String, int> map70 = <String, int>{...
+    null};
+
+  List<int> lhs80 = <int>[...?null];
+
+  Set<int> set80 = <int>{...?null};
+
+  var /*@type=Set<dynamic>*/ set81ambiguous = /*@typeArgs=dynamic*/
+    {...?null, ... /*@typeArgs=dynamic*/ []};
+
+  Map<String, int> map80 = <String, int>{...?null};
+
+  var /*@type=Map<String, int>*/ map90 = <String, int>{... /*@typeArgs=String, int*/ bar()};
+
+  List<int> list100 = <int>[...listNum];
+
+  Map<num, int> map100 = <num, int>{...mapIntNum};
+
+  List<int> list110 = <int>[...dynVar];
+
+  Map<num, int> map110 = <num, int>{...dynVar};
+}
+
+main() {}
diff --git a/pkg/front_end/testcases/spread_collection_inference.dart.legacy.expect b/pkg/front_end/testcases/spread_collection_inference.dart.legacy.expect
new file mode 100644
index 0000000..4eac9e2
--- /dev/null
+++ b/pkg/front_end/testcases/spread_collection_inference.dart.legacy.expect
@@ -0,0 +1,280 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:21:62: Error: Unexpected token '...'.
+//   var /*@type=List<dynamic>*/ lhs10 = /*@typeArgs=dynamic*/ [...
+//                                                              ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:24:48: Error: Unexpected token '...'.
+//   var /*@type=Set<dynamic>*/ set10 = <dynamic>{... /*@typeArgs=dynamic*/ []};
+//                                                ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:26:66: Error: Unexpected token '...'.
+//   var /*@type=Map<dynamic, dynamic>*/ map10 = <dynamic, dynamic>{...
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:30:37: Error: Unexpected token '...'.
+//     /*@typeArgs=dynamic, dynamic*/ {...  /*@typeArgs=dynamic, dynamic*/ {}};
+//                                     ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:32:54: Error: Unexpected token '...'.
+//   var /*@type=List<int>*/ lhs20 = /*@typeArgs=int*/ [...spread];
+//                                                      ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:34:53: Error: Unexpected token '...'.
+//   var /*@type=Set<int>*/ set20 = /*@typeArgs=int*/ {...spread, 42};
+//                                                     ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:36:62: Error: Unexpected token '...'.
+//   var /*@type=Set<int>*/ set20ambiguous = /*@typeArgs=int*/ {...spread};
+//                                                              ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:39:6: Error: Unexpected token '...'.
+//     {...mapSpread, "baz": 42};
+//      ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:42:6: Error: Unexpected token '...'.
+//     {...mapSpread};
+//      ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:44:62: Error: Unexpected token '...'.
+//   var /*@type=List<dynamic>*/ lhs21 = /*@typeArgs=dynamic*/ [...(spread as
+//                                                              ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:47:61: Error: Unexpected token '...'.
+//   var /*@type=Set<dynamic>*/ set21 = /*@typeArgs=dynamic*/ {...(spread as
+//                                                             ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:51:6: Error: Unexpected token '...'.
+//     {...(mapSpread as dynamic), "baz": 42};
+//      ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:53:29: Error: Unexpected token '...'.
+//   dynamic map21ambiguous = {...
+//                             ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:56:40: Error: Unexpected token '...'.
+//   List<int> lhs22 = /*@typeArgs=int*/ [... /*@typeArgs=int*/ []];
+//                                        ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:58:39: Error: Unexpected token '...'.
+//   Set<int> set22 = /*@typeArgs=int*/ {... /*@typeArgs=int*/ [], 42};
+//                                       ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:60:48: Error: Unexpected token '...'.
+//   Set<int> set22ambiguous = /*@typeArgs=int*/ {... /*@typeArgs=int*/ []};
+//                                                ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:63:6: Error: Unexpected token '...'.
+//     {... /*@typeArgs=String, int*/ {}};
+//      ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:65:52: Error: Unexpected token '...'.
+//   List<List<int>> lhs23 = /*@typeArgs=List<int>*/ [... /*@typeArgs=List<int>*/
+//                                                    ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:68:51: Error: Unexpected token '...'.
+//   Set<List<int>> set23 = /*@typeArgs=List<int>*/ {... /*@typeArgs=List<int>*/
+//                                                   ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:72:6: Error: Unexpected token '...'.
+//     {... /*@typeArgs=List<int>*/ [/*@typeArgs=int*/ []]};
+//      ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:75:6: Error: Unexpected token '...'.
+//     {... /*@typeArgs=String, List<int>*/ {"baz": /*@typeArgs=int*/ []}};
+//      ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:77:29: Error: Unexpected token '...'.
+//   dynamic map24ambiguous = {...
+//                             ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:78:13: Error: Unexpected token '...'.
+//     spread, ...mapSpread};
+//             ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:80:34: Error: Unexpected token '...'.
+//   int lhs30 = /*@typeArgs=int*/ [...spread];
+//                                  ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:82:34: Error: Unexpected token '...'.
+//   int set30 = /*@typeArgs=int*/ {...spread, 42};
+//                                  ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:85:6: Error: Unexpected token '...'.
+//     {...spread};
+//      ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:88:6: Error: Unexpected token '...'.
+//     {...mapSpread, "baz": 42};
+//      ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:91:6: Error: Unexpected token '...'.
+//     {...mapSpread};
+//      ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:93:35: Error: Unexpected token '...'.
+//   List<dynamic> lhs40 = <dynamic>[...
+//                                   ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:96:34: Error: Unexpected token '...'.
+//   Set<dynamic> set40 = <dynamic>{...
+//                                  ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:99:52: Error: Unexpected token '...'.
+//   Map<dynamic, dynamic> map40 = <dynamic, dynamic>{...
+//                                                    ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:102:36: Error: Unexpected token '...'.
+//   List<dynamic> lhs50 = <dynamic> [...
+//                                    ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:105:35: Error: Unexpected token '...'.
+//   Set<dynamic> set50 = <dynamic> {...
+//                                   ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:108:52: Error: Unexpected token '...'.
+//   Map<dynamic, dynamic> map50 = <dynamic, dynamic>{...
+//                                                    ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:111:33: Error: Unexpected token '...'.
+//   List<String> lhs60 = <String>[...
+//                                 ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:114:32: Error: Unexpected token '...'.
+//   Set<String> set60 = <String>{... spread};
+//                                ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:116:36: Error: Unexpected token '...'.
+//   Map<int, int> map60 = <int, int>{...
+//                                    ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:119:48: Error: Unexpected token '...'.
+//   Map<String, String> map61 = <String, String>{...
+//                                                ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:122:27: Error: Unexpected token '...'.
+//   List<int> lhs70 = <int>[... null];
+//                           ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:124:26: Error: Unexpected token '...'.
+//   Set<int> set70 = <int>{... null};
+//                          ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:127:6: Error: Unexpected token '...'.
+//     {... null, ... /*@typeArgs=dynamic*/
+//      ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:127:16: Error: Unexpected token '...'.
+//     {... null, ... /*@typeArgs=dynamic*/
+//                ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:130:42: Error: Unexpected token '...'.
+//   Map<String, int> map70 = <String, int>{...
+//                                          ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:133:27: Error: Unexpected token '...?'.
+//   List<int> lhs80 = <int>[...?null];
+//                           ^^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:135:26: Error: Unexpected token '...?'.
+//   Set<int> set80 = <int>{...?null};
+//                          ^^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:138:6: Error: Unexpected token '...?'.
+//     {...?null, ... /*@typeArgs=dynamic*/ []};
+//      ^^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:138:16: Error: Unexpected token '...'.
+//     {...?null, ... /*@typeArgs=dynamic*/ []};
+//                ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:140:42: Error: Unexpected token '...?'.
+//   Map<String, int> map80 = <String, int>{...?null};
+//                                          ^^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:142:56: Error: Unexpected token '...'.
+//   var /*@type=Map<String, int>*/ map90 = <String, int>{... /*@typeArgs=String, int*/ bar()};
+//                                                        ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:144:29: Error: Unexpected token '...'.
+//   List<int> list100 = <int>[...listNum];
+//                             ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:146:37: Error: Unexpected token '...'.
+//   Map<num, int> map100 = <num, int>{...mapIntNum};
+//                                     ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:148:29: Error: Unexpected token '...'.
+//   List<int> list110 = <int>[...dynVar];
+//                             ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:150:37: Error: Unexpected token '...'.
+//   Map<num, int> map110 = <num, int>{...dynVar};
+//                                     ^^^
+//
+import self as self;
+import "dart:core" as core;
+
+static method bar<K extends core::Object = dynamic, V extends core::Object = dynamic>() → core::Map<self::bar::K, self::bar::V>
+  return null;
+static method foo(dynamic dynVar) → dynamic {
+  core::List<core::int> spread = <core::int>[1, 2, 3];
+  core::Map<core::String, core::int> mapSpread = <core::String, core::int>{"foo": 4, "bar": 2};
+  core::int notSpreadInt = 42;
+  () → core::int notSpreadFunction = null;
+  core::Map<core::int, core::num> mapIntNum = <core::int, core::num>{42: 42};
+  core::List<core::num> listNum = <core::num>[42];
+  dynamic lhs10 = <dynamic>[];
+  dynamic set10 = <dynamic>{};
+  dynamic map10 = <dynamic, dynamic>{};
+  dynamic map10ambiguous = <dynamic, dynamic>{};
+  dynamic lhs20 = <dynamic>[];
+  dynamic set20 = <dynamic>{42};
+  dynamic set20ambiguous = <dynamic, dynamic>{};
+  dynamic map20 = <dynamic, dynamic>{"baz": 42};
+  dynamic map20ambiguous = <dynamic, dynamic>{};
+  dynamic lhs21 = <dynamic>[];
+  dynamic set21 = <dynamic>{42};
+  dynamic map21 = <dynamic, dynamic>{"baz": 42};
+  dynamic map21ambiguous = <dynamic, dynamic>{};
+  core::List<core::int> lhs22 = <dynamic>[];
+  core::Set<core::int> set22 = <dynamic>{42};
+  core::Set<core::int> set22ambiguous = <dynamic, dynamic>{};
+  core::Map<core::String, core::int> map22 = <dynamic, dynamic>{};
+  core::List<core::List<core::int>> lhs23 = <dynamic>[];
+  core::Set<core::List<core::int>> set23 = <dynamic>{<core::int>[42]};
+  core::Set<core::List<core::int>> set23ambiguous = <dynamic, dynamic>{};
+  core::Map<core::String, core::List<core::int>> map23 = <dynamic, dynamic>{};
+  dynamic map24ambiguous = <dynamic, dynamic>{};
+  core::int lhs30 = <dynamic>[];
+  core::int set30 = <dynamic>{42};
+  core::int set30ambiguous = <dynamic, dynamic>{};
+  core::int map30 = <dynamic, dynamic>{"baz": 42};
+  core::int map30ambiguous = <dynamic, dynamic>{};
+  core::List<dynamic> lhs40 = <dynamic>[];
+  core::Set<dynamic> set40 = <dynamic>{};
+  core::Map<dynamic, dynamic> map40 = <dynamic, dynamic>{};
+  core::List<dynamic> lhs50 = <dynamic>[];
+  core::Set<dynamic> set50 = <dynamic>{};
+  core::Map<dynamic, dynamic> map50 = <dynamic, dynamic>{};
+  core::List<core::String> lhs60 = <core::String>[];
+  core::Set<core::String> set60 = <core::String>{};
+  core::Map<core::int, core::int> map60 = <core::int, core::int>{};
+  core::Map<core::String, core::String> map61 = <core::String, core::String>{};
+  core::List<core::int> lhs70 = <core::int>[];
+  core::Set<core::int> set70 = <core::int>{};
+  dynamic set71ambiguous = <dynamic, dynamic>{};
+  core::Map<core::String, core::int> map70 = <core::String, core::int>{};
+  core::List<core::int> lhs80 = <core::int>[];
+  core::Set<core::int> set80 = <core::int>{};
+  dynamic set81ambiguous = <dynamic, dynamic>{};
+  core::Map<core::String, core::int> map80 = <core::String, core::int>{};
+  dynamic map90 = <core::String, core::int>{};
+  core::List<core::int> list100 = <core::int>[];
+  core::Map<core::num, core::int> map100 = <core::num, core::int>{};
+  core::List<core::int> list110 = <core::int>[];
+  core::Map<core::num, core::int> map110 = <core::num, core::int>{};
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/spread_collection_inference.dart.legacy.transformed.expect b/pkg/front_end/testcases/spread_collection_inference.dart.legacy.transformed.expect
new file mode 100644
index 0000000..4eac9e2
--- /dev/null
+++ b/pkg/front_end/testcases/spread_collection_inference.dart.legacy.transformed.expect
@@ -0,0 +1,280 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:21:62: Error: Unexpected token '...'.
+//   var /*@type=List<dynamic>*/ lhs10 = /*@typeArgs=dynamic*/ [...
+//                                                              ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:24:48: Error: Unexpected token '...'.
+//   var /*@type=Set<dynamic>*/ set10 = <dynamic>{... /*@typeArgs=dynamic*/ []};
+//                                                ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:26:66: Error: Unexpected token '...'.
+//   var /*@type=Map<dynamic, dynamic>*/ map10 = <dynamic, dynamic>{...
+//                                                                  ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:30:37: Error: Unexpected token '...'.
+//     /*@typeArgs=dynamic, dynamic*/ {...  /*@typeArgs=dynamic, dynamic*/ {}};
+//                                     ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:32:54: Error: Unexpected token '...'.
+//   var /*@type=List<int>*/ lhs20 = /*@typeArgs=int*/ [...spread];
+//                                                      ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:34:53: Error: Unexpected token '...'.
+//   var /*@type=Set<int>*/ set20 = /*@typeArgs=int*/ {...spread, 42};
+//                                                     ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:36:62: Error: Unexpected token '...'.
+//   var /*@type=Set<int>*/ set20ambiguous = /*@typeArgs=int*/ {...spread};
+//                                                              ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:39:6: Error: Unexpected token '...'.
+//     {...mapSpread, "baz": 42};
+//      ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:42:6: Error: Unexpected token '...'.
+//     {...mapSpread};
+//      ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:44:62: Error: Unexpected token '...'.
+//   var /*@type=List<dynamic>*/ lhs21 = /*@typeArgs=dynamic*/ [...(spread as
+//                                                              ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:47:61: Error: Unexpected token '...'.
+//   var /*@type=Set<dynamic>*/ set21 = /*@typeArgs=dynamic*/ {...(spread as
+//                                                             ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:51:6: Error: Unexpected token '...'.
+//     {...(mapSpread as dynamic), "baz": 42};
+//      ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:53:29: Error: Unexpected token '...'.
+//   dynamic map21ambiguous = {...
+//                             ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:56:40: Error: Unexpected token '...'.
+//   List<int> lhs22 = /*@typeArgs=int*/ [... /*@typeArgs=int*/ []];
+//                                        ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:58:39: Error: Unexpected token '...'.
+//   Set<int> set22 = /*@typeArgs=int*/ {... /*@typeArgs=int*/ [], 42};
+//                                       ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:60:48: Error: Unexpected token '...'.
+//   Set<int> set22ambiguous = /*@typeArgs=int*/ {... /*@typeArgs=int*/ []};
+//                                                ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:63:6: Error: Unexpected token '...'.
+//     {... /*@typeArgs=String, int*/ {}};
+//      ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:65:52: Error: Unexpected token '...'.
+//   List<List<int>> lhs23 = /*@typeArgs=List<int>*/ [... /*@typeArgs=List<int>*/
+//                                                    ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:68:51: Error: Unexpected token '...'.
+//   Set<List<int>> set23 = /*@typeArgs=List<int>*/ {... /*@typeArgs=List<int>*/
+//                                                   ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:72:6: Error: Unexpected token '...'.
+//     {... /*@typeArgs=List<int>*/ [/*@typeArgs=int*/ []]};
+//      ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:75:6: Error: Unexpected token '...'.
+//     {... /*@typeArgs=String, List<int>*/ {"baz": /*@typeArgs=int*/ []}};
+//      ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:77:29: Error: Unexpected token '...'.
+//   dynamic map24ambiguous = {...
+//                             ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:78:13: Error: Unexpected token '...'.
+//     spread, ...mapSpread};
+//             ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:80:34: Error: Unexpected token '...'.
+//   int lhs30 = /*@typeArgs=int*/ [...spread];
+//                                  ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:82:34: Error: Unexpected token '...'.
+//   int set30 = /*@typeArgs=int*/ {...spread, 42};
+//                                  ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:85:6: Error: Unexpected token '...'.
+//     {...spread};
+//      ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:88:6: Error: Unexpected token '...'.
+//     {...mapSpread, "baz": 42};
+//      ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:91:6: Error: Unexpected token '...'.
+//     {...mapSpread};
+//      ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:93:35: Error: Unexpected token '...'.
+//   List<dynamic> lhs40 = <dynamic>[...
+//                                   ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:96:34: Error: Unexpected token '...'.
+//   Set<dynamic> set40 = <dynamic>{...
+//                                  ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:99:52: Error: Unexpected token '...'.
+//   Map<dynamic, dynamic> map40 = <dynamic, dynamic>{...
+//                                                    ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:102:36: Error: Unexpected token '...'.
+//   List<dynamic> lhs50 = <dynamic> [...
+//                                    ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:105:35: Error: Unexpected token '...'.
+//   Set<dynamic> set50 = <dynamic> {...
+//                                   ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:108:52: Error: Unexpected token '...'.
+//   Map<dynamic, dynamic> map50 = <dynamic, dynamic>{...
+//                                                    ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:111:33: Error: Unexpected token '...'.
+//   List<String> lhs60 = <String>[...
+//                                 ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:114:32: Error: Unexpected token '...'.
+//   Set<String> set60 = <String>{... spread};
+//                                ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:116:36: Error: Unexpected token '...'.
+//   Map<int, int> map60 = <int, int>{...
+//                                    ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:119:48: Error: Unexpected token '...'.
+//   Map<String, String> map61 = <String, String>{...
+//                                                ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:122:27: Error: Unexpected token '...'.
+//   List<int> lhs70 = <int>[... null];
+//                           ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:124:26: Error: Unexpected token '...'.
+//   Set<int> set70 = <int>{... null};
+//                          ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:127:6: Error: Unexpected token '...'.
+//     {... null, ... /*@typeArgs=dynamic*/
+//      ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:127:16: Error: Unexpected token '...'.
+//     {... null, ... /*@typeArgs=dynamic*/
+//                ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:130:42: Error: Unexpected token '...'.
+//   Map<String, int> map70 = <String, int>{...
+//                                          ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:133:27: Error: Unexpected token '...?'.
+//   List<int> lhs80 = <int>[...?null];
+//                           ^^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:135:26: Error: Unexpected token '...?'.
+//   Set<int> set80 = <int>{...?null};
+//                          ^^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:138:6: Error: Unexpected token '...?'.
+//     {...?null, ... /*@typeArgs=dynamic*/ []};
+//      ^^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:138:16: Error: Unexpected token '...'.
+//     {...?null, ... /*@typeArgs=dynamic*/ []};
+//                ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:140:42: Error: Unexpected token '...?'.
+//   Map<String, int> map80 = <String, int>{...?null};
+//                                          ^^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:142:56: Error: Unexpected token '...'.
+//   var /*@type=Map<String, int>*/ map90 = <String, int>{... /*@typeArgs=String, int*/ bar()};
+//                                                        ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:144:29: Error: Unexpected token '...'.
+//   List<int> list100 = <int>[...listNum];
+//                             ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:146:37: Error: Unexpected token '...'.
+//   Map<num, int> map100 = <num, int>{...mapIntNum};
+//                                     ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:148:29: Error: Unexpected token '...'.
+//   List<int> list110 = <int>[...dynVar];
+//                             ^^^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:150:37: Error: Unexpected token '...'.
+//   Map<num, int> map110 = <num, int>{...dynVar};
+//                                     ^^^
+//
+import self as self;
+import "dart:core" as core;
+
+static method bar<K extends core::Object = dynamic, V extends core::Object = dynamic>() → core::Map<self::bar::K, self::bar::V>
+  return null;
+static method foo(dynamic dynVar) → dynamic {
+  core::List<core::int> spread = <core::int>[1, 2, 3];
+  core::Map<core::String, core::int> mapSpread = <core::String, core::int>{"foo": 4, "bar": 2};
+  core::int notSpreadInt = 42;
+  () → core::int notSpreadFunction = null;
+  core::Map<core::int, core::num> mapIntNum = <core::int, core::num>{42: 42};
+  core::List<core::num> listNum = <core::num>[42];
+  dynamic lhs10 = <dynamic>[];
+  dynamic set10 = <dynamic>{};
+  dynamic map10 = <dynamic, dynamic>{};
+  dynamic map10ambiguous = <dynamic, dynamic>{};
+  dynamic lhs20 = <dynamic>[];
+  dynamic set20 = <dynamic>{42};
+  dynamic set20ambiguous = <dynamic, dynamic>{};
+  dynamic map20 = <dynamic, dynamic>{"baz": 42};
+  dynamic map20ambiguous = <dynamic, dynamic>{};
+  dynamic lhs21 = <dynamic>[];
+  dynamic set21 = <dynamic>{42};
+  dynamic map21 = <dynamic, dynamic>{"baz": 42};
+  dynamic map21ambiguous = <dynamic, dynamic>{};
+  core::List<core::int> lhs22 = <dynamic>[];
+  core::Set<core::int> set22 = <dynamic>{42};
+  core::Set<core::int> set22ambiguous = <dynamic, dynamic>{};
+  core::Map<core::String, core::int> map22 = <dynamic, dynamic>{};
+  core::List<core::List<core::int>> lhs23 = <dynamic>[];
+  core::Set<core::List<core::int>> set23 = <dynamic>{<core::int>[42]};
+  core::Set<core::List<core::int>> set23ambiguous = <dynamic, dynamic>{};
+  core::Map<core::String, core::List<core::int>> map23 = <dynamic, dynamic>{};
+  dynamic map24ambiguous = <dynamic, dynamic>{};
+  core::int lhs30 = <dynamic>[];
+  core::int set30 = <dynamic>{42};
+  core::int set30ambiguous = <dynamic, dynamic>{};
+  core::int map30 = <dynamic, dynamic>{"baz": 42};
+  core::int map30ambiguous = <dynamic, dynamic>{};
+  core::List<dynamic> lhs40 = <dynamic>[];
+  core::Set<dynamic> set40 = <dynamic>{};
+  core::Map<dynamic, dynamic> map40 = <dynamic, dynamic>{};
+  core::List<dynamic> lhs50 = <dynamic>[];
+  core::Set<dynamic> set50 = <dynamic>{};
+  core::Map<dynamic, dynamic> map50 = <dynamic, dynamic>{};
+  core::List<core::String> lhs60 = <core::String>[];
+  core::Set<core::String> set60 = <core::String>{};
+  core::Map<core::int, core::int> map60 = <core::int, core::int>{};
+  core::Map<core::String, core::String> map61 = <core::String, core::String>{};
+  core::List<core::int> lhs70 = <core::int>[];
+  core::Set<core::int> set70 = <core::int>{};
+  dynamic set71ambiguous = <dynamic, dynamic>{};
+  core::Map<core::String, core::int> map70 = <core::String, core::int>{};
+  core::List<core::int> lhs80 = <core::int>[];
+  core::Set<core::int> set80 = <core::int>{};
+  dynamic set81ambiguous = <dynamic, dynamic>{};
+  core::Map<core::String, core::int> map80 = <core::String, core::int>{};
+  dynamic map90 = <core::String, core::int>{};
+  core::List<core::int> list100 = <core::int>[];
+  core::Map<core::num, core::int> map100 = <core::num, core::int>{};
+  core::List<core::int> list110 = <core::int>[];
+  core::Map<core::num, core::int> map110 = <core::num, core::int>{};
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/spread_collection_inference.dart.outline.expect b/pkg/front_end/testcases/spread_collection_inference.dart.outline.expect
new file mode 100644
index 0000000..e8acddb
--- /dev/null
+++ b/pkg/front_end/testcases/spread_collection_inference.dart.outline.expect
@@ -0,0 +1,10 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+static method bar<K extends core::Object = dynamic, V extends core::Object = dynamic>() → core::Map<self::bar::K, self::bar::V>
+  ;
+static method foo(dynamic dynVar) → dynamic
+  ;
+static method main() → dynamic
+  ;
diff --git a/pkg/front_end/testcases/spread_collection_inference.dart.strong.expect b/pkg/front_end/testcases/spread_collection_inference.dart.strong.expect
new file mode 100644
index 0000000..27a3664
--- /dev/null
+++ b/pkg/front_end/testcases/spread_collection_inference.dart.strong.expect
@@ -0,0 +1,404 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:53:28: Error: Not enough type information to disambiguate between literal set and literal map.
+// Try providing type arguments for the literal explicitly to disambiguate it.
+//   dynamic map21ambiguous = {...
+//                            ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:77:28: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
+//   dynamic map24ambiguous = {...
+//                            ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:80:33: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
+//  - 'List' is from 'dart:core'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   int lhs30 = /*@typeArgs=int*/ [...spread];
+//                                 ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:82:33: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
+//  - 'Set' is from 'dart:core'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   int set30 = /*@typeArgs=int*/ {...spread, 42};
+//                                 ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:85:5: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
+//  - 'Set' is from 'dart:core'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//     {...spread};
+//     ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:88:5: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
+//  - 'Map' is from 'dart:core'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//     {...mapSpread, "baz": 42};
+//     ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:91:5: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
+//  - 'Map' is from 'dart:core'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//     {...mapSpread};
+//     ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:94:5: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
+//     notSpreadInt];
+//     ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:97:5: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
+//     notSpreadInt};
+//     ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:100:2: Error: Unexpected type 'int' of a map spread entry.  Expected 'dynamic' or a Map.
+//  notSpreadInt};
+//  ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:103:5: Error: Unexpected type 'int Function()' of a spread.  Expected 'dynamic' or an Iterable.
+//     notSpreadFunction];
+//     ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:106:5: Error: Unexpected type 'int Function()' of a spread.  Expected 'dynamic' or an Iterable.
+//     notSpreadFunction};
+//     ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:109:2: Error: Unexpected type 'int Function()' of a map spread entry.  Expected 'dynamic' or a Map.
+//  notSpreadFunction};
+//  ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:112:5: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
+//     spread];
+//     ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:114:36: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
+//   Set<String> set60 = <String>{... spread};
+//                                    ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:117:2: Error: Can't assign spread entry keys of type 'String' to map entry keys of type 'int'.
+//  mapSpread};
+//  ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:120:2: Error: Can't assign spread entry values of type 'int' to map entry values of type 'String'.
+//  mapSpread};
+//  ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:122:31: Error: Can't spread a value with static type Null.
+//   List<int> lhs70 = <int>[... null];
+//                               ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:124:30: Error: Can't spread a value with static type Null.
+//   Set<int> set70 = <int>{... null};
+//                              ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:127:10: Error: Can't spread a value with static type Null.
+//     {... null, ... /*@typeArgs=dynamic*/
+//          ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:127:10: Error: Expected ',' before this.
+//     {... null, ... /*@typeArgs=dynamic*/
+//          ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:131:5: Error: Can't spread a value with static type Null.
+//     null};
+//     ^
+//
+import self as self;
+import "dart:core" as core;
+import "dart:collection" as col;
+
+static method bar<K extends core::Object = dynamic, V extends core::Object = dynamic>() → core::Map<self::bar::K, self::bar::V>
+  return null;
+static method foo(dynamic dynVar) → dynamic {
+  core::List<core::int> spread = <core::int>[1, 2, 3];
+  core::Map<core::String, core::int> mapSpread = <core::String, core::int>{"foo": 4, "bar": 2};
+  core::int notSpreadInt = 42;
+  () → core::int notSpreadFunction = null;
+  core::Map<core::int, core::num> mapIntNum = <core::int, core::num>{42: 42};
+  core::List<core::num> listNum = <core::num>[42];
+  core::List<dynamic> lhs10 = block {
+    final core::List<dynamic> #t1 = <dynamic>[];
+    for (final dynamic #t2 in <dynamic>[])
+      #t1.{core::List::add}(#t2);
+  } =>#t1;
+  core::Set<dynamic> set10 = block {
+    final core::Set<dynamic> #t3 = col::LinkedHashSet::•<dynamic>();
+    for (final dynamic #t4 in <dynamic>[])
+      #t3.{core::Set::add}(#t4);
+  } =>#t3;
+  core::Map<dynamic, dynamic> map10 = block {
+    final core::Map<dynamic, dynamic> #t5 = <dynamic, dynamic>{};
+    for (final core::MapEntry<dynamic, dynamic> #t6 in <dynamic, dynamic>{}.{core::Map::entries})
+      #t5.{core::Map::[]=}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
+  } =>#t5;
+  core::Map<dynamic, dynamic> map10ambiguous = block {
+    final core::Map<dynamic, dynamic> #t7 = <dynamic, dynamic>{};
+    for (final core::MapEntry<dynamic, dynamic> #t8 in <dynamic, dynamic>{}.{core::Map::entries})
+      #t7.{core::Map::[]=}(#t8.{core::MapEntry::key}, #t8.{core::MapEntry::value});
+  } =>#t7;
+  core::List<core::int> lhs20 = block {
+    final core::List<core::int> #t9 = <core::int>[];
+    for (final core::int #t10 in spread)
+      #t9.{core::List::add}(#t10);
+  } =>#t9;
+  core::Set<core::int> set20 = block {
+    final core::Set<core::int> #t11 = col::LinkedHashSet::•<core::int>();
+    for (final core::int #t12 in spread)
+      #t11.{core::Set::add}(#t12);
+    #t11.{core::Set::add}(42);
+  } =>#t11;
+  core::Set<core::int> set20ambiguous = block {
+    final core::Set<core::int> #t13 = col::LinkedHashSet::•<core::int>();
+    for (final dynamic #t14 in spread) {
+      final core::int #t15 = #t14 as{TypeError} core::int;
+      #t13.{core::Set::add}(#t15);
+    }
+  } =>#t13;
+  core::Map<core::String, core::int> map20 = block {
+    final core::Map<core::String, core::int> #t16 = <core::String, core::int>{};
+    for (final core::MapEntry<core::String, core::int> #t17 in mapSpread.{core::Map::entries})
+      #t16.{core::Map::[]=}(#t17.{core::MapEntry::key}, #t17.{core::MapEntry::value});
+    #t16.{core::Map::[]=}("baz", 42);
+  } =>#t16;
+  core::Map<core::String, core::int> map20ambiguous = block {
+    final core::Map<core::String, core::int> #t18 = <core::String, core::int>{};
+    for (final core::MapEntry<core::String, core::int> #t19 in mapSpread.{core::Map::entries})
+      #t18.{core::Map::[]=}(#t19.{core::MapEntry::key}, #t19.{core::MapEntry::value});
+  } =>#t18;
+  core::List<dynamic> lhs21 = block {
+    final core::List<dynamic> #t20 = <dynamic>[];
+    for (final dynamic #t21 in (spread as dynamic) as{TypeError} core::Iterable<dynamic>)
+      #t20.{core::List::add}(#t21);
+  } =>#t20;
+  core::Set<dynamic> set21 = block {
+    final core::Set<dynamic> #t22 = col::LinkedHashSet::•<dynamic>();
+    for (final dynamic #t23 in (spread as dynamic) as{TypeError} core::Iterable<dynamic>)
+      #t22.{core::Set::add}(#t23);
+    #t22.{core::Set::add}(42);
+  } =>#t22;
+  core::Map<dynamic, dynamic> map21 = block {
+    final core::Map<dynamic, dynamic> #t24 = <dynamic, dynamic>{};
+    for (final core::MapEntry<dynamic, dynamic> #t25 in ((mapSpread as dynamic) as{TypeError} core::Map<dynamic, dynamic>).{core::Map::entries})
+      #t24.{core::Map::[]=}(#t25.{core::MapEntry::key}, #t25.{core::MapEntry::value});
+    #t24.{core::Map::[]=}("baz", 42);
+  } =>#t24;
+  dynamic map21ambiguous = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:53:28: Error: Not enough type information to disambiguate between literal set and literal map.
+Try providing type arguments for the literal explicitly to disambiguate it.
+  dynamic map21ambiguous = {...
+                           ^";
+  core::List<core::int> lhs22 = block {
+    final core::List<core::int> #t26 = <core::int>[];
+    for (final core::int #t27 in <core::int>[])
+      #t26.{core::List::add}(#t27);
+  } =>#t26;
+  core::Set<core::int> set22 = block {
+    final core::Set<core::int> #t28 = col::LinkedHashSet::•<core::int>();
+    for (final core::int #t29 in <core::int>[])
+      #t28.{core::Set::add}(#t29);
+    #t28.{core::Set::add}(42);
+  } =>#t28;
+  core::Set<core::int> set22ambiguous = block {
+    final core::Set<core::int> #t30 = col::LinkedHashSet::•<core::int>();
+    for (final dynamic #t31 in <core::int>[]) {
+      final core::int #t32 = #t31 as{TypeError} core::int;
+      #t30.{core::Set::add}(#t32);
+    }
+  } =>#t30;
+  core::Map<core::String, core::int> map22 = block {
+    final core::Map<core::String, core::int> #t33 = <core::String, core::int>{};
+    for (final core::MapEntry<core::String, core::int> #t34 in <core::String, core::int>{}.{core::Map::entries})
+      #t33.{core::Map::[]=}(#t34.{core::MapEntry::key}, #t34.{core::MapEntry::value});
+  } =>#t33;
+  core::List<core::List<core::int>> lhs23 = block {
+    final core::List<core::List<core::int>> #t35 = <core::List<core::int>>[];
+    for (final core::List<core::int> #t36 in <core::List<core::int>>[<core::int>[]])
+      #t35.{core::List::add}(#t36);
+  } =>#t35;
+  core::Set<core::List<core::int>> set23 = block {
+    final core::Set<core::List<core::int>> #t37 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (final core::List<core::int> #t38 in <core::List<core::int>>[<core::int>[]])
+      #t37.{core::Set::add}(#t38);
+    #t37.{core::Set::add}(<core::int>[42]);
+  } =>#t37;
+  core::Set<core::List<core::int>> set23ambiguous = block {
+    final core::Set<core::List<core::int>> #t39 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (final dynamic #t40 in <core::List<core::int>>[<core::int>[]]) {
+      final core::List<core::int> #t41 = #t40 as{TypeError} core::List<core::int>;
+      #t39.{core::Set::add}(#t41);
+    }
+  } =>#t39;
+  core::Map<core::String, core::List<core::int>> map23 = block {
+    final core::Map<core::String, core::List<core::int>> #t42 = <core::String, core::List<core::int>>{};
+    for (final core::MapEntry<core::String, core::List<core::int>> #t43 in <core::String, core::List<core::int>>{"baz": <core::int>[]}.{core::Map::entries})
+      #t42.{core::Map::[]=}(#t43.{core::MapEntry::key}, #t43.{core::MapEntry::value});
+  } =>#t42;
+  dynamic map24ambiguous = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:77:28: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
+  dynamic map24ambiguous = {...
+                           ^";
+  core::int lhs30 = let final<BottomType> #t44 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:80:33: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
+ - 'List' is from 'dart:core'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  int lhs30 = /*@typeArgs=int*/ [...spread];
+                                ^" in ( block {
+    final core::List<core::int> #t45 = <core::int>[];
+    for (final core::int #t46 in spread)
+      #t45.{core::List::add}(#t46);
+  } =>#t45) as{TypeError} core::int;
+  core::int set30 = let final<BottomType> #t47 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:82:33: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
+ - 'Set' is from 'dart:core'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  int set30 = /*@typeArgs=int*/ {...spread, 42};
+                                ^" in ( block {
+    final core::Set<core::int> #t48 = col::LinkedHashSet::•<core::int>();
+    for (final core::int #t49 in spread)
+      #t48.{core::Set::add}(#t49);
+    #t48.{core::Set::add}(42);
+  } =>#t48) as{TypeError} core::int;
+  core::int set30ambiguous = let final<BottomType> #t50 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:85:5: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
+ - 'Set' is from 'dart:core'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+    {...spread};
+    ^" in ( block {
+    final core::Set<core::int> #t51 = col::LinkedHashSet::•<core::int>();
+    for (final dynamic #t52 in spread) {
+      final core::int #t53 = #t52 as{TypeError} core::int;
+      #t51.{core::Set::add}(#t53);
+    }
+  } =>#t51) as{TypeError} core::int;
+  core::int map30 = let final<BottomType> #t54 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:88:5: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
+ - 'Map' is from 'dart:core'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+    {...mapSpread, \"baz\": 42};
+    ^" in ( block {
+    final core::Map<core::String, core::int> #t55 = <core::String, core::int>{};
+    for (final core::MapEntry<core::String, core::int> #t56 in mapSpread.{core::Map::entries})
+      #t55.{core::Map::[]=}(#t56.{core::MapEntry::key}, #t56.{core::MapEntry::value});
+    #t55.{core::Map::[]=}("baz", 42);
+  } =>#t55) as{TypeError} core::int;
+  core::int map30ambiguous = let final<BottomType> #t57 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:91:5: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
+ - 'Map' is from 'dart:core'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+    {...mapSpread};
+    ^" in ( block {
+    final core::Map<core::String, core::int> #t58 = <core::String, core::int>{};
+    for (final core::MapEntry<core::String, core::int> #t59 in mapSpread.{core::Map::entries})
+      #t58.{core::Map::[]=}(#t59.{core::MapEntry::key}, #t59.{core::MapEntry::value});
+  } =>#t58) as{TypeError} core::int;
+  core::List<dynamic> lhs40 = <dynamic>[invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:94:5: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
+    notSpreadInt];
+    ^"];
+  core::Set<dynamic> set40 = let final core::Set<dynamic> #t60 = col::LinkedHashSet::•<dynamic>() in let final dynamic #t61 = #t60.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:97:5: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
+    notSpreadInt};
+    ^") in #t60;
+  core::Map<dynamic, dynamic> map40 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:100:2: Error: Unexpected type 'int' of a map spread entry.  Expected 'dynamic' or a Map.
+ notSpreadInt};
+ ^": null};
+  core::List<dynamic> lhs50 = <dynamic>[invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:103:5: Error: Unexpected type 'int Function()' of a spread.  Expected 'dynamic' or an Iterable.
+    notSpreadFunction];
+    ^"];
+  core::Set<dynamic> set50 = let final core::Set<dynamic> #t62 = col::LinkedHashSet::•<dynamic>() in let final dynamic #t63 = #t62.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:106:5: Error: Unexpected type 'int Function()' of a spread.  Expected 'dynamic' or an Iterable.
+    notSpreadFunction};
+    ^") in #t62;
+  core::Map<dynamic, dynamic> map50 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:109:2: Error: Unexpected type 'int Function()' of a map spread entry.  Expected 'dynamic' or a Map.
+ notSpreadFunction};
+ ^": null};
+  core::List<core::String> lhs60 = <core::String>[invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:112:5: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
+    spread];
+    ^"];
+  core::Set<core::String> set60 = let final core::Set<core::String> #t64 = col::LinkedHashSet::•<core::String>() in let final dynamic #t65 = #t64.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:114:36: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
+  Set<String> set60 = <String>{... spread};
+                                   ^") in #t64;
+  core::Map<core::int, core::int> map60 = <core::int, core::int>{invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:117:2: Error: Can't assign spread entry keys of type 'String' to map entry keys of type 'int'.
+ mapSpread};
+ ^": null};
+  core::Map<core::String, core::String> map61 = <core::String, core::String>{null: invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:120:2: Error: Can't assign spread entry values of type 'int' to map entry values of type 'String'.
+ mapSpread};
+ ^"};
+  core::List<core::int> lhs70 = <core::int>[invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:122:31: Error: Can't spread a value with static type Null.
+  List<int> lhs70 = <int>[... null];
+                              ^"];
+  core::Set<core::int> set70 = let final core::Set<core::int> #t66 = col::LinkedHashSet::•<core::int>() in let final dynamic #t67 = #t66.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:124:30: Error: Can't spread a value with static type Null.
+  Set<int> set70 = <int>{... null};
+                             ^") in #t66;
+  core::Set<dynamic> set71ambiguous = block {
+    final core::Set<dynamic> #t68 = col::LinkedHashSet::•<dynamic>();
+    #t68.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:127:10: Error: Expected ',' before this.
+    {... null, ... /*@typeArgs=dynamic*/
+         ^");
+    for (final dynamic #t69 in <dynamic>[]) {
+      final dynamic #t70 = #t69 as{TypeError} dynamic;
+      #t68.{core::Set::add}(#t70);
+    }
+  } =>#t68;
+  core::Map<core::String, core::int> map70 = <core::String, core::int>{invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:131:5: Error: Can't spread a value with static type Null.
+    null};
+    ^": null};
+  core::List<core::int> lhs80 = block {
+    final core::List<core::int> #t71 = <core::int>[];
+    final dynamic #t72 = null;
+    if(!#t72.{core::Object::==}(null))
+      for (final core::int #t73 in #t72)
+        #t71.{core::List::add}(#t73);
+  } =>#t71;
+  core::Set<core::int> set80 = block {
+    final core::Set<core::int> #t74 = col::LinkedHashSet::•<core::int>();
+    final dynamic #t75 = null;
+    if(!#t75.{core::Object::==}(null))
+      for (final core::int #t76 in #t75)
+        #t74.{core::Set::add}(#t76);
+  } =>#t74;
+  core::Set<dynamic> set81ambiguous = block {
+    final core::Set<dynamic> #t77 = col::LinkedHashSet::•<dynamic>();
+    final dynamic #t78 = null;
+    if(!#t78.{core::Object::==}(null))
+      for (final dynamic #t79 in #t78) {
+        final dynamic #t80 = #t79 as{TypeError} dynamic;
+        #t77.{core::Set::add}(#t80);
+      }
+    for (final dynamic #t81 in <dynamic>[]) {
+      final dynamic #t82 = #t81 as{TypeError} dynamic;
+      #t77.{core::Set::add}(#t82);
+    }
+  } =>#t77;
+  core::Map<core::String, core::int> map80 = block {
+    final core::Map<core::String, core::int> #t83 = <core::String, core::int>{};
+    final core::Map<dynamic, dynamic> #t84 = null;
+    if(!#t84.{core::Object::==}(null))
+      for (final core::MapEntry<core::String, core::int> #t85 in #t84.{core::Map::entries})
+        #t83.{core::Map::[]=}(#t85.{core::MapEntry::key}, #t85.{core::MapEntry::value});
+  } =>#t83;
+  core::Map<core::String, core::int> map90 = block {
+    final core::Map<core::String, core::int> #t86 = <core::String, core::int>{};
+    for (final core::MapEntry<core::String, core::int> #t87 in self::bar<core::String, core::int>().{core::Map::entries})
+      #t86.{core::Map::[]=}(#t87.{core::MapEntry::key}, #t87.{core::MapEntry::value});
+  } =>#t86;
+  core::List<core::int> list100 = block {
+    final core::List<core::int> #t88 = <core::int>[];
+    for (final dynamic #t89 in listNum) {
+      final core::int #t90 = #t89 as{TypeError} core::int;
+      #t88.{core::List::add}(#t90);
+    }
+  } =>#t88;
+  core::Map<core::num, core::int> map100 = block {
+    final core::Map<core::num, core::int> #t91 = <core::num, core::int>{};
+    for (final core::MapEntry<dynamic, dynamic> #t92 in mapIntNum.{core::Map::entries}) {
+      final core::num #t93 = #t92.{core::MapEntry::key} as{TypeError} core::num;
+      final core::int #t94 = #t92.{core::MapEntry::value} as{TypeError} core::int;
+      #t91.{core::Map::[]=}(#t93, #t94);
+    }
+  } =>#t91;
+  core::List<core::int> list110 = block {
+    final core::List<core::int> #t95 = <core::int>[];
+    for (final dynamic #t96 in dynVar as{TypeError} core::Iterable<dynamic>) {
+      final core::int #t97 = #t96 as{TypeError} core::int;
+      #t95.{core::List::add}(#t97);
+    }
+  } =>#t95;
+  core::Map<core::num, core::int> map110 = block {
+    final core::Map<core::num, core::int> #t98 = <core::num, core::int>{};
+    for (final core::MapEntry<dynamic, dynamic> #t99 in (dynVar as{TypeError} core::Map<dynamic, dynamic>).{core::Map::entries}) {
+      final core::num #t100 = #t99.{core::MapEntry::key} as{TypeError} core::num;
+      final core::int #t101 = #t99.{core::MapEntry::value} as{TypeError} core::int;
+      #t98.{core::Map::[]=}(#t100, #t101);
+    }
+  } =>#t98;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/spread_collection_inference.dart.strong.transformed.expect b/pkg/front_end/testcases/spread_collection_inference.dart.strong.transformed.expect
new file mode 100644
index 0000000..838f328
--- /dev/null
+++ b/pkg/front_end/testcases/spread_collection_inference.dart.strong.transformed.expect
@@ -0,0 +1,404 @@
+library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:53:28: Error: Not enough type information to disambiguate between literal set and literal map.
+// Try providing type arguments for the literal explicitly to disambiguate it.
+//   dynamic map21ambiguous = {...
+//                            ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:77:28: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
+//   dynamic map24ambiguous = {...
+//                            ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:80:33: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
+//  - 'List' is from 'dart:core'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   int lhs30 = /*@typeArgs=int*/ [...spread];
+//                                 ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:82:33: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
+//  - 'Set' is from 'dart:core'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//   int set30 = /*@typeArgs=int*/ {...spread, 42};
+//                                 ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:85:5: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
+//  - 'Set' is from 'dart:core'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//     {...spread};
+//     ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:88:5: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
+//  - 'Map' is from 'dart:core'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//     {...mapSpread, "baz": 42};
+//     ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:91:5: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
+//  - 'Map' is from 'dart:core'.
+// Try changing the type of the left hand side, or casting the right hand side to 'int'.
+//     {...mapSpread};
+//     ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:94:5: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
+//     notSpreadInt];
+//     ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:97:5: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
+//     notSpreadInt};
+//     ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:100:2: Error: Unexpected type 'int' of a map spread entry.  Expected 'dynamic' or a Map.
+//  notSpreadInt};
+//  ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:103:5: Error: Unexpected type 'int Function()' of a spread.  Expected 'dynamic' or an Iterable.
+//     notSpreadFunction];
+//     ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:106:5: Error: Unexpected type 'int Function()' of a spread.  Expected 'dynamic' or an Iterable.
+//     notSpreadFunction};
+//     ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:109:2: Error: Unexpected type 'int Function()' of a map spread entry.  Expected 'dynamic' or a Map.
+//  notSpreadFunction};
+//  ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:112:5: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
+//     spread];
+//     ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:114:36: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
+//   Set<String> set60 = <String>{... spread};
+//                                    ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:117:2: Error: Can't assign spread entry keys of type 'String' to map entry keys of type 'int'.
+//  mapSpread};
+//  ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:120:2: Error: Can't assign spread entry values of type 'int' to map entry values of type 'String'.
+//  mapSpread};
+//  ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:122:31: Error: Can't spread a value with static type Null.
+//   List<int> lhs70 = <int>[... null];
+//                               ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:124:30: Error: Can't spread a value with static type Null.
+//   Set<int> set70 = <int>{... null};
+//                              ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:127:10: Error: Can't spread a value with static type Null.
+//     {... null, ... /*@typeArgs=dynamic*/
+//          ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:127:10: Error: Expected ',' before this.
+//     {... null, ... /*@typeArgs=dynamic*/
+//          ^
+//
+// pkg/front_end/testcases/spread_collection_inference.dart:131:5: Error: Can't spread a value with static type Null.
+//     null};
+//     ^
+//
+import self as self;
+import "dart:core" as core;
+import "dart:collection" as col;
+
+static method bar<K extends core::Object = dynamic, V extends core::Object = dynamic>() → core::Map<self::bar::K, self::bar::V>
+  return null;
+static method foo(dynamic dynVar) → dynamic {
+  core::List<core::int> spread = <core::int>[1, 2, 3];
+  core::Map<core::String, core::int> mapSpread = <core::String, core::int>{"foo": 4, "bar": 2};
+  core::int notSpreadInt = 42;
+  () → core::int notSpreadFunction = null;
+  core::Map<core::int, core::num> mapIntNum = <core::int, core::num>{42: 42};
+  core::List<core::num> listNum = <core::num>[42];
+  core::List<dynamic> lhs10 = block {
+    final core::List<dynamic> #t1 = <dynamic>[];
+    for (final dynamic #t2 in <dynamic>[])
+      #t1.{core::List::add}(#t2);
+  } =>#t1;
+  core::Set<dynamic> set10 = block {
+    final core::Set<dynamic> #t3 = col::LinkedHashSet::•<dynamic>();
+    for (final dynamic #t4 in <dynamic>[])
+      #t3.{core::Set::add}(#t4);
+  } =>#t3;
+  core::Map<dynamic, dynamic> map10 = block {
+    final core::Map<dynamic, dynamic> #t5 = <dynamic, dynamic>{};
+    for (final core::MapEntry<dynamic, dynamic> #t6 in <dynamic, dynamic>{}.{core::Map::entries})
+      #t5.{core::Map::[]=}(#t6.{core::MapEntry::key}, #t6.{core::MapEntry::value});
+  } =>#t5;
+  core::Map<dynamic, dynamic> map10ambiguous = block {
+    final core::Map<dynamic, dynamic> #t7 = <dynamic, dynamic>{};
+    for (final core::MapEntry<dynamic, dynamic> #t8 in <dynamic, dynamic>{}.{core::Map::entries})
+      #t7.{core::Map::[]=}(#t8.{core::MapEntry::key}, #t8.{core::MapEntry::value});
+  } =>#t7;
+  core::List<core::int> lhs20 = block {
+    final core::List<core::int> #t9 = <core::int>[];
+    for (final core::int #t10 in spread)
+      #t9.{core::List::add}(#t10);
+  } =>#t9;
+  core::Set<core::int> set20 = block {
+    final core::Set<core::int> #t11 = col::LinkedHashSet::•<core::int>();
+    for (final core::int #t12 in spread)
+      #t11.{core::Set::add}(#t12);
+    #t11.{core::Set::add}(42);
+  } =>#t11;
+  core::Set<core::int> set20ambiguous = block {
+    final core::Set<core::int> #t13 = col::LinkedHashSet::•<core::int>();
+    for (final dynamic #t14 in spread) {
+      final core::int #t15 = #t14 as{TypeError} core::int;
+      #t13.{core::Set::add}(#t15);
+    }
+  } =>#t13;
+  core::Map<core::String, core::int> map20 = block {
+    final core::Map<core::String, core::int> #t16 = <core::String, core::int>{};
+    for (final core::MapEntry<core::String, core::int> #t17 in mapSpread.{core::Map::entries})
+      #t16.{core::Map::[]=}(#t17.{core::MapEntry::key}, #t17.{core::MapEntry::value});
+    #t16.{core::Map::[]=}("baz", 42);
+  } =>#t16;
+  core::Map<core::String, core::int> map20ambiguous = block {
+    final core::Map<core::String, core::int> #t18 = <core::String, core::int>{};
+    for (final core::MapEntry<core::String, core::int> #t19 in mapSpread.{core::Map::entries})
+      #t18.{core::Map::[]=}(#t19.{core::MapEntry::key}, #t19.{core::MapEntry::value});
+  } =>#t18;
+  core::List<dynamic> lhs21 = block {
+    final core::List<dynamic> #t20 = <dynamic>[];
+    for (final dynamic #t21 in (spread as dynamic) as{TypeError} core::Iterable<dynamic>)
+      #t20.{core::List::add}(#t21);
+  } =>#t20;
+  core::Set<dynamic> set21 = block {
+    final core::Set<dynamic> #t22 = col::LinkedHashSet::•<dynamic>();
+    for (final dynamic #t23 in (spread as dynamic) as{TypeError} core::Iterable<dynamic>)
+      #t22.{core::Set::add}(#t23);
+    #t22.{core::Set::add}(42);
+  } =>#t22;
+  core::Map<dynamic, dynamic> map21 = block {
+    final core::Map<dynamic, dynamic> #t24 = <dynamic, dynamic>{};
+    for (final core::MapEntry<dynamic, dynamic> #t25 in ((mapSpread as dynamic) as{TypeError} core::Map<dynamic, dynamic>).{core::Map::entries})
+      #t24.{core::Map::[]=}(#t25.{core::MapEntry::key}, #t25.{core::MapEntry::value});
+    #t24.{core::Map::[]=}("baz", 42);
+  } =>#t24;
+  dynamic map21ambiguous = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:53:28: Error: Not enough type information to disambiguate between literal set and literal map.
+Try providing type arguments for the literal explicitly to disambiguate it.
+  dynamic map21ambiguous = {...
+                           ^";
+  core::List<core::int> lhs22 = block {
+    final core::List<core::int> #t26 = <core::int>[];
+    for (final core::int #t27 in <core::int>[])
+      #t26.{core::List::add}(#t27);
+  } =>#t26;
+  core::Set<core::int> set22 = block {
+    final core::Set<core::int> #t28 = col::LinkedHashSet::•<core::int>();
+    for (final core::int #t29 in <core::int>[])
+      #t28.{core::Set::add}(#t29);
+    #t28.{core::Set::add}(42);
+  } =>#t28;
+  core::Set<core::int> set22ambiguous = block {
+    final core::Set<core::int> #t30 = col::LinkedHashSet::•<core::int>();
+    for (final dynamic #t31 in <core::int>[]) {
+      final core::int #t32 = #t31 as{TypeError} core::int;
+      #t30.{core::Set::add}(#t32);
+    }
+  } =>#t30;
+  core::Map<core::String, core::int> map22 = block {
+    final core::Map<core::String, core::int> #t33 = <core::String, core::int>{};
+    for (final core::MapEntry<core::String, core::int> #t34 in <core::String, core::int>{}.{core::Map::entries})
+      #t33.{core::Map::[]=}(#t34.{core::MapEntry::key}, #t34.{core::MapEntry::value});
+  } =>#t33;
+  core::List<core::List<core::int>> lhs23 = block {
+    final core::List<core::List<core::int>> #t35 = <core::List<core::int>>[];
+    for (final core::List<core::int> #t36 in <core::List<core::int>>[<core::int>[]])
+      #t35.{core::List::add}(#t36);
+  } =>#t35;
+  core::Set<core::List<core::int>> set23 = block {
+    final core::Set<core::List<core::int>> #t37 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (final core::List<core::int> #t38 in <core::List<core::int>>[<core::int>[]])
+      #t37.{core::Set::add}(#t38);
+    #t37.{core::Set::add}(<core::int>[42]);
+  } =>#t37;
+  core::Set<core::List<core::int>> set23ambiguous = block {
+    final core::Set<core::List<core::int>> #t39 = col::LinkedHashSet::•<core::List<core::int>>();
+    for (final dynamic #t40 in <core::List<core::int>>[<core::int>[]]) {
+      final core::List<core::int> #t41 = #t40 as{TypeError} core::List<core::int>;
+      #t39.{core::Set::add}(#t41);
+    }
+  } =>#t39;
+  core::Map<core::String, core::List<core::int>> map23 = block {
+    final core::Map<core::String, core::List<core::int>> #t42 = <core::String, core::List<core::int>>{};
+    for (final core::MapEntry<core::String, core::List<core::int>> #t43 in <core::String, core::List<core::int>>{"baz": <core::int>[]}.{core::Map::entries})
+      #t42.{core::Map::[]=}(#t43.{core::MapEntry::key}, #t43.{core::MapEntry::value});
+  } =>#t42;
+  dynamic map24ambiguous = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:77:28: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
+  dynamic map24ambiguous = {...
+                           ^";
+  core::int lhs30 = let final<BottomType> #t44 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:80:33: Error: A value of type 'List<int>' can't be assigned to a variable of type 'int'.
+ - 'List' is from 'dart:core'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  int lhs30 = /*@typeArgs=int*/ [...spread];
+                                ^" in ( block {
+    final core::List<core::int> #t45 = <core::int>[];
+    for (final core::int #t46 in spread)
+      #t45.{core::List::add}(#t46);
+  } =>#t45) as{TypeError} core::int;
+  core::int set30 = let final<BottomType> #t47 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:82:33: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
+ - 'Set' is from 'dart:core'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+  int set30 = /*@typeArgs=int*/ {...spread, 42};
+                                ^" in ( block {
+    final core::Set<core::int> #t48 = col::LinkedHashSet::•<core::int>();
+    for (final core::int #t49 in spread)
+      #t48.{core::Set::add}(#t49);
+    #t48.{core::Set::add}(42);
+  } =>#t48) as{TypeError} core::int;
+  core::int set30ambiguous = let final<BottomType> #t50 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:85:5: Error: A value of type 'Set<int>' can't be assigned to a variable of type 'int'.
+ - 'Set' is from 'dart:core'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+    {...spread};
+    ^" in ( block {
+    final core::Set<core::int> #t51 = col::LinkedHashSet::•<core::int>();
+    for (final dynamic #t52 in spread) {
+      final core::int #t53 = #t52 as{TypeError} core::int;
+      #t51.{core::Set::add}(#t53);
+    }
+  } =>#t51) as{TypeError} core::int;
+  core::int map30 = let final<BottomType> #t54 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:88:5: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
+ - 'Map' is from 'dart:core'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+    {...mapSpread, \"baz\": 42};
+    ^" in ( block {
+    final core::Map<core::String, core::int> #t55 = <core::String, core::int>{};
+    for (final core::MapEntry<core::String, core::int> #t56 in mapSpread.{core::Map::entries})
+      #t55.{core::Map::[]=}(#t56.{core::MapEntry::key}, #t56.{core::MapEntry::value});
+    #t55.{core::Map::[]=}("baz", 42);
+  } =>#t55) as{TypeError} core::int;
+  core::int map30ambiguous = let final<BottomType> #t57 = invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:91:5: Error: A value of type 'Map<String, int>' can't be assigned to a variable of type 'int'.
+ - 'Map' is from 'dart:core'.
+Try changing the type of the left hand side, or casting the right hand side to 'int'.
+    {...mapSpread};
+    ^" in ( block {
+    final core::Map<core::String, core::int> #t58 = <core::String, core::int>{};
+    for (final core::MapEntry<core::String, core::int> #t59 in mapSpread.{core::Map::entries})
+      #t58.{core::Map::[]=}(#t59.{core::MapEntry::key}, #t59.{core::MapEntry::value});
+  } =>#t58) as{TypeError} core::int;
+  core::List<dynamic> lhs40 = <dynamic>[invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:94:5: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
+    notSpreadInt];
+    ^"];
+  core::Set<dynamic> set40 = let final core::Set<dynamic> #t60 = col::LinkedHashSet::•<dynamic>() in let final core::bool #t61 = #t60.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:97:5: Error: Unexpected type 'int' of a spread.  Expected 'dynamic' or an Iterable.
+    notSpreadInt};
+    ^") in #t60;
+  core::Map<dynamic, dynamic> map40 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:100:2: Error: Unexpected type 'int' of a map spread entry.  Expected 'dynamic' or a Map.
+ notSpreadInt};
+ ^": null};
+  core::List<dynamic> lhs50 = <dynamic>[invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:103:5: Error: Unexpected type 'int Function()' of a spread.  Expected 'dynamic' or an Iterable.
+    notSpreadFunction];
+    ^"];
+  core::Set<dynamic> set50 = let final core::Set<dynamic> #t62 = col::LinkedHashSet::•<dynamic>() in let final core::bool #t63 = #t62.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:106:5: Error: Unexpected type 'int Function()' of a spread.  Expected 'dynamic' or an Iterable.
+    notSpreadFunction};
+    ^") in #t62;
+  core::Map<dynamic, dynamic> map50 = <dynamic, dynamic>{invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:109:2: Error: Unexpected type 'int Function()' of a map spread entry.  Expected 'dynamic' or a Map.
+ notSpreadFunction};
+ ^": null};
+  core::List<core::String> lhs60 = <core::String>[invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:112:5: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
+    spread];
+    ^"];
+  core::Set<core::String> set60 = let final core::Set<core::String> #t64 = col::LinkedHashSet::•<core::String>() in let final core::bool #t65 = #t64.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:114:36: Error: Can't assign spread elements of type 'int' to collection elements of type 'String'.
+  Set<String> set60 = <String>{... spread};
+                                   ^") in #t64;
+  core::Map<core::int, core::int> map60 = <core::int, core::int>{invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:117:2: Error: Can't assign spread entry keys of type 'String' to map entry keys of type 'int'.
+ mapSpread};
+ ^": null};
+  core::Map<core::String, core::String> map61 = <core::String, core::String>{null: invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:120:2: Error: Can't assign spread entry values of type 'int' to map entry values of type 'String'.
+ mapSpread};
+ ^"};
+  core::List<core::int> lhs70 = <core::int>[invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:122:31: Error: Can't spread a value with static type Null.
+  List<int> lhs70 = <int>[... null];
+                              ^"];
+  core::Set<core::int> set70 = let final core::Set<core::int> #t66 = col::LinkedHashSet::•<core::int>() in let final core::bool #t67 = #t66.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:124:30: Error: Can't spread a value with static type Null.
+  Set<int> set70 = <int>{... null};
+                             ^") in #t66;
+  core::Set<dynamic> set71ambiguous = block {
+    final core::Set<dynamic> #t68 = col::LinkedHashSet::•<dynamic>();
+    #t68.{core::Set::add}(invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:127:10: Error: Expected ',' before this.
+    {... null, ... /*@typeArgs=dynamic*/
+         ^");
+    for (final dynamic #t69 in <dynamic>[]) {
+      final dynamic #t70 = #t69 as{TypeError} dynamic;
+      #t68.{core::Set::add}(#t70);
+    }
+  } =>#t68;
+  core::Map<core::String, core::int> map70 = <core::String, core::int>{invalid-expression "pkg/front_end/testcases/spread_collection_inference.dart:131:5: Error: Can't spread a value with static type Null.
+    null};
+    ^": null};
+  core::List<core::int> lhs80 = block {
+    final core::List<core::int> #t71 = <core::int>[];
+    final dynamic #t72 = null;
+    if(!#t72.{core::Object::==}(null))
+      for (final core::int #t73 in #t72)
+        #t71.{core::List::add}(#t73);
+  } =>#t71;
+  core::Set<core::int> set80 = block {
+    final core::Set<core::int> #t74 = col::LinkedHashSet::•<core::int>();
+    final dynamic #t75 = null;
+    if(!#t75.{core::Object::==}(null))
+      for (final core::int #t76 in #t75)
+        #t74.{core::Set::add}(#t76);
+  } =>#t74;
+  core::Set<dynamic> set81ambiguous = block {
+    final core::Set<dynamic> #t77 = col::LinkedHashSet::•<dynamic>();
+    final dynamic #t78 = null;
+    if(!#t78.{core::Object::==}(null))
+      for (final dynamic #t79 in #t78) {
+        final dynamic #t80 = #t79 as{TypeError} dynamic;
+        #t77.{core::Set::add}(#t80);
+      }
+    for (final dynamic #t81 in <dynamic>[]) {
+      final dynamic #t82 = #t81 as{TypeError} dynamic;
+      #t77.{core::Set::add}(#t82);
+    }
+  } =>#t77;
+  core::Map<core::String, core::int> map80 = block {
+    final core::Map<core::String, core::int> #t83 = <core::String, core::int>{};
+    final core::Map<dynamic, dynamic> #t84 = null;
+    if(!#t84.{core::Object::==}(null))
+      for (final core::MapEntry<core::String, core::int> #t85 in #t84.{core::Map::entries})
+        #t83.{core::Map::[]=}(#t85.{core::MapEntry::key}, #t85.{core::MapEntry::value});
+  } =>#t83;
+  core::Map<core::String, core::int> map90 = block {
+    final core::Map<core::String, core::int> #t86 = <core::String, core::int>{};
+    for (final core::MapEntry<core::String, core::int> #t87 in self::bar<core::String, core::int>().{core::Map::entries})
+      #t86.{core::Map::[]=}(#t87.{core::MapEntry::key}, #t87.{core::MapEntry::value});
+  } =>#t86;
+  core::List<core::int> list100 = block {
+    final core::List<core::int> #t88 = <core::int>[];
+    for (final dynamic #t89 in listNum) {
+      final core::int #t90 = #t89 as{TypeError} core::int;
+      #t88.{core::List::add}(#t90);
+    }
+  } =>#t88;
+  core::Map<core::num, core::int> map100 = block {
+    final core::Map<core::num, core::int> #t91 = <core::num, core::int>{};
+    for (final core::MapEntry<dynamic, dynamic> #t92 in mapIntNum.{core::Map::entries}) {
+      final core::num #t93 = #t92.{core::MapEntry::key} as{TypeError} core::num;
+      final core::int #t94 = #t92.{core::MapEntry::value} as{TypeError} core::int;
+      #t91.{core::Map::[]=}(#t93, #t94);
+    }
+  } =>#t91;
+  core::List<core::int> list110 = block {
+    final core::List<core::int> #t95 = <core::int>[];
+    for (final dynamic #t96 in dynVar as{TypeError} core::Iterable<dynamic>) {
+      final core::int #t97 = #t96 as{TypeError} core::int;
+      #t95.{core::List::add}(#t97);
+    }
+  } =>#t95;
+  core::Map<core::num, core::int> map110 = block {
+    final core::Map<core::num, core::int> #t98 = <core::num, core::int>{};
+    for (final core::MapEntry<dynamic, dynamic> #t99 in (dynVar as{TypeError} core::Map<dynamic, dynamic>).{core::Map::entries}) {
+      final core::num #t100 = #t99.{core::MapEntry::key} as{TypeError} core::num;
+      final core::int #t101 = #t99.{core::MapEntry::value} as{TypeError} core::int;
+      #t98.{core::Map::[]=}(#t100, #t101);
+    }
+  } =>#t98;
+}
+static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/strong.status b/pkg/front_end/testcases/strong.status
index 1fde8dc..7b802de 100644
--- a/pkg/front_end/testcases/strong.status
+++ b/pkg/front_end/testcases/strong.status
@@ -26,6 +26,7 @@
 fallthrough: ExpectationFileMismatch
 incomplete_field_formal_parameter: RuntimeError
 inference/abstract_class_instantiation: InstrumentationMismatch # Issue #30040
+inference/conflicting_fields: TypeCheckError
 inference/conflicts_can_happen: TypeCheckError
 inference/conflicts_can_happen2: TypeCheckError
 inference/constructors_infer_from_arguments_argument_not_assignable: TypeCheckError
@@ -57,9 +58,8 @@
 inference/override_equals: RuntimeError
 inference/unresolved_super: TypeCheckError
 inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1: InstrumentationMismatch # Issue #25824
-inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2: InstrumentationMismatch # Issue #25824
 inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1: InstrumentationMismatch # Issue #25824
-inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2: InstrumentationMismatch # Issue #25824
+inference_new/dependency_only_if_overloaded: TypeCheckError
 inference_new/infer_assign_to_index_super_upwards: TypeCheckError
 inference_new/infer_assign_to_index_this_upwards: TypeCheckError
 inference_new/infer_assign_to_index_upwards: TypeCheckError
@@ -67,13 +67,15 @@
 inference_new/infer_field_getter_setter_mismatch: TypeCheckError
 inference_new/infer_field_override_getter_overrides_setter: TypeCheckError
 inference_new/invalid_assignment_during_toplevel_inference: TypeCheckError
-instantiate_to_bound/non_simple_generic_function_in_bound_regress: RuntimeError # Expected
+inference_new/strongly_connected_component: TypeCheckError
 instantiate_to_bound/non_simple_class_parametrized_typedef_cycle: RuntimeError # Expected
+instantiate_to_bound/non_simple_generic_function_in_bound_regress: RuntimeError # Expected
 invalid_type: TypeCheckError
 invocations: RuntimeError
 issue34899: TypeCheckError
 micro: RuntimeError
 mixin_application_override: TypeCheckError
+operator_method_not_found: RuntimeError # Expected
 optional: TypeCheckError
 override_check_accessor_after_inference: TypeCheckError # Issue #31620
 override_check_accessor_basic: TypeCheckError # Issue #31620
@@ -130,7 +132,6 @@
 regress/issue_29982: RuntimeError # Tests runtime behavior of error recovery.
 regress/issue_30836: RuntimeError # Issue 30836.
 regress/issue_31299: TypeCheckError
-regress/issue_32200: RuntimeError # Invalid type.
 regress/issue_32972: TypeCheckError
 regress/issue_33452: RuntimeError # Test has an intentional error
 regress/issue_34225: RuntimeError
@@ -140,16 +141,16 @@
 regress/issue_35259: RuntimeError # Expected
 regress/issue_35260: RuntimeError # Expected
 regress/issue_35266: RuntimeError # Expected
+regress/issue_36400: RuntimeError
 reject_generic_function_types_in_bounds: RuntimeError # Expected
 runtime_checks_new/contravariant_generic_return_with_compound_assign_implicit_downcast: RuntimeError
 runtime_checks_new/mixin_forwarding_stub_field: TypeCheckError
 runtime_checks_new/mixin_forwarding_stub_getter: TypeCheckError
 runtime_checks_new/mixin_forwarding_stub_setter: TypeCheckError
 set_literals/disambiguation_rule: RuntimeError
+spread_collection: RuntimeError
 statements: Crash
-spread_collection: RuntimeError # Should be fixed as part of implementing spread collection support
 type_variable_as_super: RuntimeError
-type_variable_prefix: RuntimeError
 unsound_promotion: RuntimeError
 void_methods: ExpectationFileMismatch
 warn_unresolved_sends: InstrumentationMismatch # Test assumes Dart 1.0 semantics
diff --git a/pkg/front_end/testcases/super_nsm.dart.hierarchy.expect b/pkg/front_end/testcases/super_nsm.dart.hierarchy.expect
index bfe9aef..368b420 100644
--- a/pkg/front_end/testcases/super_nsm.dart.hierarchy.expect
+++ b/pkg/front_end/testcases/super_nsm.dart.hierarchy.expect
@@ -37,6 +37,7 @@
   classSetters:
 
 C:
+  Longest path to Object: 2
   superclasses:
     Object
   interfaces: I
@@ -67,6 +68,7 @@
   interfaceSetters:
 
 D:
+  Longest path to Object: 3
   superclasses:
     Object
       -> C
diff --git a/pkg/front_end/testcases/text_serialization.status b/pkg/front_end/testcases/text_serialization.status
index 0027189..9da7144 100644
--- a/pkg/front_end/testcases/text_serialization.status
+++ b/pkg/front_end/testcases/text_serialization.status
@@ -6,17 +6,18 @@
 # the round trip for Kernel textual serialization where the initial binary
 # Kernel files are produced by compiling Dart code via Fasta.
 
+DeltaBlue: TextSerializationFailure # Was: Pass
 abstract_members: TypeCheckError
 accessors: TextSerializationFailure # Was: RuntimeError
-ambiguous_exports: RuntimeError # Expected, this file exports two main methods.
+ambiguous_exports: TextSerializationFailure # Was: RuntimeError # Expected, this file exports two main methods.
 annotation_eof: TextSerializationFailure # Was: Pass
 annotation_on_enum_values: TextSerializationFailure # Was: Pass
 annotation_top: TextSerializationFailure # Was: Pass
-annotation_typedef_formals_resolution: TextSerializationFailure # Was: Pass
 annotation_typedef_formals: TextSerializationFailure # Was: Pass
+annotation_typedef_formals_resolution: TextSerializationFailure # Was: Pass
 annotation_variable_declaration: TextSerializationFailure # Was: Pass
-argument_mismatch: InstrumentationMismatch # Test assumes Dart 1.0 semantics
 argument: TextSerializationFailure # Was: Pass
+argument_mismatch: InstrumentationMismatch # Test assumes Dart 1.0 semantics
 arithmetic: TextSerializationFailure # Was: Pass
 arrow_function: TextSerializationFailure # Was: Pass
 async_function: TextSerializationFailure # Was: Pass
@@ -49,8 +50,8 @@
 check_deferred_before_call: TextSerializationFailure # Was: Pass
 check_deferred_before_write: TextSerializationFailure # Was: Pass
 check_deferred_is_check: TextSerializationFailure # Was: Pass
-check_deferred_read_static_field: TextSerializationFailure # Was: Pass
 check_deferred_read: TextSerializationFailure # Was: Pass
+check_deferred_read_static_field: TextSerializationFailure # Was: Pass
 check_deferred_read_type: TextSerializationFailure # Was: Pass
 check_deferred_static_method_call: TextSerializationFailure # Was: Pass
 check_deferred_type_declaration: TextSerializationFailure # Was: Pass
@@ -64,20 +65,21 @@
 constructor_cycle: TextSerializationFailure # Was: Pass
 constructor_function_types: TextSerializationFailure # Was: Pass
 constructor_initializer_invalid: TextSerializationFailure # Was: RuntimeError # Fails execution after recovery
-continue_inference_after_error_lib: TextSerializationFailure # Was: Pass
 continue_inference_after_error: TextSerializationFailure # Was: Pass
+continue_inference_after_error_lib: TextSerializationFailure # Was: Pass
+control_flow_collection: TextSerializationFailure
+control_flow_collection_inference: TextSerializationFailure
 covariant_generic: TextSerializationFailure # Was: RuntimeError
 cycles: TextSerializationFailure # Was: Pass
 default_values: TextSerializationFailure # Was: Pass
 deferred_lib: TextSerializationFailure # Was: Pass
 deferred_type_annotation: TextSerializationFailure # Was: Pass
-DeltaBlue: TextSerializationFailure # Was: Pass
+duplicated_bad_prefix: TextSerializationFailure # Was: Pass
 duplicated_bad_prefix_lib1: TextSerializationFailure # Was: Pass
 duplicated_bad_prefix_lib2: TextSerializationFailure # Was: Pass
-duplicated_bad_prefix: TextSerializationFailure # Was: Pass
+duplicated_declarations: TypeCheckError
 duplicated_declarations_lib: TextSerializationFailure # Was: Pass
 duplicated_declarations_part: TextSerializationFailure # Was: Pass
-duplicated_declarations: TypeCheckError
 duplicated_field_initializer: TextSerializationFailure # Was: RuntimeError
 duplicated_named_args_3: TextSerializationFailure # Was: Pass
 dynamic_and_void: InstrumentationMismatch # Test assumes Dart 1.0 semantics
@@ -87,34 +89,35 @@
 expression/eval: TextSerializationFailure # Was: Pass
 expression/main: TextSerializationFailure # Was: Pass
 expressions: TextSerializationFailure # Was: RuntimeError
-external_import: TextSerializationFailure # Was: RuntimeError # The native extension to import doesn't exist. This is ok.
 external: TextSerializationFailure # Was: Pass
+external_import: TextSerializationFailure # Was: RuntimeError # The native extension to import doesn't exist. This is ok.
 fallthrough: ExpectationFileMismatch
 fibonacci: TextSerializationFailure # Was: Pass
 for_in_scope: TextSerializationFailure # Was: Pass
 for_in_without_declaration: TextSerializationFailure
 function_in_field: TextSerializationFailure # Was: Pass
-functions: TextSerializationFailure # Was: Pass
 function_type_assignments: TextSerializationFailure # Was: Pass
+function_type_default_value: TextSerializationFailure
 function_type_is_check: TextSerializationFailure # Was: Pass
 function_type_recovery: TextSerializationFailure # Was: Pass
+functions: TextSerializationFailure # Was: Pass
 future_or_test: TextSerializationFailure # Was: Pass
 hello: TextSerializationFailure # Was: Pass
-illegal_named_function_expression_scope: TextSerializationFailure # Was: Pass
 illegal_named_function_expression: TextSerializationFailure # Was: Pass
+illegal_named_function_expression_scope: TextSerializationFailure # Was: Pass
 implicit_const_with_static_fields: TextSerializationFailure # Was: Pass
 implicit_new: TextSerializationFailure # Was: Pass
 implicit_scope_test: TextSerializationFailure # Was: Pass
 implicit_this: TextSerializationFailure # Was: Pass
 incomplete_field_formal_parameter: TextSerializationFailure # Was: RuntimeError
 inference/abstract_class_instantiation: InstrumentationMismatch # Issue #30040
-inference/assert_initializer: TextSerializationFailure # Was: Pass
 inference/assert: TextSerializationFailure # Was: Pass
+inference/assert_initializer: TextSerializationFailure # Was: Pass
 inference/assign_local: TextSerializationFailure # Was: Pass
 inference/async_await: TextSerializationFailure # Was: Pass
 inference/async_closure_return_type_flatten: TextSerializationFailure # Was: Pass
-inference/async_closure_return_type_future_or: TextSerializationFailure # Was: Pass
 inference/async_closure_return_type_future: TextSerializationFailure # Was: Pass
+inference/async_closure_return_type_future_or: TextSerializationFailure # Was: Pass
 inference/block_bodied_lambdas_async_all_returns_are_futures: TextSerializationFailure # Was: Pass
 inference/block_bodied_lambdas_async_all_returns_are_values: TextSerializationFailure # Was: Pass
 inference/block_bodied_lambdas_async_mix_of_values_and_futures: TextSerializationFailure # Was: Pass
@@ -123,55 +126,56 @@
 inference/block_bodied_lambdas_basic_void: TextSerializationFailure # Was: Pass
 inference/block_bodied_lambdas_downwards_incompatible_with_upwards_inference: TextSerializationFailure # Was: Pass
 inference/block_bodied_lambdas_downwards_incompatible_with_upwards_inference_top_level: TextSerializationFailure # Was: Pass
-inference/block_bodied_lambdas_infer_bottom_async_star: TextSerializationFailure # Was: Pass
 inference/block_bodied_lambdas_infer_bottom_async: TextSerializationFailure # Was: Pass
-inference/block_bodied_lambdas_infer_bottom_sync_star: TextSerializationFailure # Was: Pass
+inference/block_bodied_lambdas_infer_bottom_async_star: TextSerializationFailure # Was: Pass
 inference/block_bodied_lambdas_infer_bottom_sync: TextSerializationFailure # Was: Pass
+inference/block_bodied_lambdas_infer_bottom_sync_star: TextSerializationFailure # Was: Pass
 inference/block_bodied_lambdas_lub: TextSerializationFailure # Was: Pass
 inference/block_bodied_lambdas_nested_lambdas: TextSerializationFailure # Was: Pass
 inference/block_bodied_lambdas_no_return: TextSerializationFailure # Was: Pass
 inference/block_bodied_lambdas_returns: TextSerializationFailure # Was: Pass
 inference/block_bodied_lambdas_sync_star: TextSerializationFailure # Was: Pass
 inference/block_bodied_lambdas_void_context: TextSerializationFailure # Was: Pass
-inference/bottom_in_closure: TextSerializationFailure # Was: Pass
 inference/bottom: TextSerializationFailure # Was: Pass
+inference/bottom_in_closure: TextSerializationFailure # Was: Pass
 inference/bug30251: TextSerializationFailure # Was: Pass
+inference/bug30620: TextSerializationFailure # Was: Pass
 inference/bug30620_b: TextSerializationFailure # Was: Pass
 inference/bug30620_c: TextSerializationFailure # Was: Pass
 inference/bug30620_d: TextSerializationFailure # Was: Pass
-inference/bug30620: TextSerializationFailure # Was: Pass
 inference/bug30624: TextSerializationFailure # Was: Pass
 inference/bug31132: TextSerializationFailure # Was: Pass
 inference/bug31133: TextSerializationFailure # Was: Pass
 inference/bug31436: TextSerializationFailure # Was: Pass
 inference/bug32291: TextSerializationFailure # Was: Pass
 inference/bug33324: TextSerializationFailure # Was: Pass
-inference/callable_generic_class: TextSerializationFailure # Was: Pass
 inference/call_corner_cases: TextSerializationFailure # Was: Pass
+inference/callable_generic_class: TextSerializationFailure # Was: Pass
 inference/circular_method_inference: TextSerializationFailure # Was: Pass
-inference/circular_reference_via_closures_initializer_types: TextSerializationFailure # Was: Pass
 inference/circular_reference_via_closures: TextSerializationFailure # Was: Pass
+inference/circular_reference_via_closures_initializer_types: TextSerializationFailure # Was: Pass
 inference/closure_param_null_to_object: TextSerializationFailure # Was: Pass
 inference/coerce_bottom_and_null_types: TextSerializationFailure # Was: Pass
 inference/complex_predecrement: TextSerializationFailure # Was: Pass
 inference/conditional_lub: TextSerializationFailure # Was: Pass
 inference/conditional_upwards_inference: TextSerializationFailure # Was: Pass
+inference/conflicting_fields: TypeCheckError
 inference/conflicts_can_happen2: TypeCheckError
 inference/conflicts_can_happen: TypeCheckError
 inference/constructors_downwards_with_constraint: TextSerializationFailure # Was: Pass
-inference/constructors_inference_f_bounded: TextSerializationFailure # Was: Pass
+inference/constructors_infer_from_arguments: TextSerializationFailure # Was: Pass
 inference/constructors_infer_from_arguments_argument_not_assignable: TypeCheckError
 inference/constructors_infer_from_arguments_const: TextSerializationFailure # Was: Pass
 inference/constructors_infer_from_arguments_const_with_upper_bound: TextSerializationFailure # Was: Pass
 inference/constructors_infer_from_arguments_downwards_from_constructor: TextSerializationFailure # Was: Pass
-inference/constructors_infer_from_arguments_factory_calls_constructor: TextSerializationFailure # Was: Pass
 inference/constructors_infer_from_arguments_factory: TextSerializationFailure # Was: Pass
-inference/constructors_infer_from_arguments_named_factory: TextSerializationFailure # Was: Pass
+inference/constructors_infer_from_arguments_factory_calls_constructor: TextSerializationFailure # Was: Pass
 inference/constructors_infer_from_arguments_named: TextSerializationFailure # Was: Pass
+inference/constructors_infer_from_arguments_named_factory: TextSerializationFailure # Was: Pass
+inference/constructors_infer_from_arguments_redirecting: TextSerializationFailure # Was: Pass
 inference/constructors_infer_from_arguments_redirecting_factory: TextSerializationFailure # Was: Pass
 inference/constructors_infer_from_arguments_redirecting_factory_to_factory: TextSerializationFailure # Was: Pass
-inference/constructors_infer_from_arguments_redirecting: TextSerializationFailure # Was: Pass
-inference/constructors_infer_from_arguments: TextSerializationFailure # Was: Pass
+inference/constructors_inference_f_bounded: TextSerializationFailure # Was: Pass
 inference/constructors_reverse_type_parameters: TextSerializationFailure # Was: Pass
 inference/constructors_too_many_positional_arguments: InstrumentationMismatch # Issue #30040
 inference/do_not_infer_overridden_fields_that_explicitly_say_dynamic_infer: TypeCheckError
@@ -181,22 +185,22 @@
 inference/downward_inference_fixes_no_upwards_errors: TextSerializationFailure # Was: Pass
 inference/downward_inference_miscellaneous: TextSerializationFailure # Was: Pass
 inference/downwards_context_from_inferred_field_type: TextSerializationFailure # Was: Pass
+inference/downwards_inference_annotations: TextSerializationFailure # Was: Pass
 inference/downwards_inference_annotations_class_members: TextSerializationFailure # Was: Pass
 inference/downwards_inference_annotations_for_loop_variable: TextSerializationFailure # Was: Pass
-inference/downwards_inference_annotations_locals_referring_to_locals: TextSerializationFailure # Was: Pass
 inference/downwards_inference_annotations_locals: TextSerializationFailure # Was: Pass
-inference/downwards_inference_annotations_parameter_local: TextSerializationFailure # Was: Pass
+inference/downwards_inference_annotations_locals_referring_to_locals: TextSerializationFailure # Was: Pass
 inference/downwards_inference_annotations_parameter: TextSerializationFailure # Was: Pass
-inference/downwards_inference_annotations: TextSerializationFailure # Was: Pass
-inference/downwards_inference_annotations_typedef: TextSerializationFailure # Was: Pass
+inference/downwards_inference_annotations_parameter_local: TextSerializationFailure # Was: Pass
 inference/downwards_inference_annotations_type_variable: InstrumentationMismatch # Issue 28981
 inference/downwards_inference_annotations_type_variable_local: TextSerializationFailure # Was: Pass
+inference/downwards_inference_annotations_typedef: TextSerializationFailure # Was: Pass
 inference/downwards_inference_assignment_statements: TextSerializationFailure # Was: Pass
 inference/downwards_inference_async_await: TextSerializationFailure # Was: Pass
 inference/downwards_inference_for_each: TextSerializationFailure # Was: Pass
 inference/downwards_inference_initializing_formal_default_formal: TextSerializationFailure # Was: Pass
-inference/downwards_inference_inside_top_level_2: TextSerializationFailure # Was: Pass
 inference/downwards_inference_inside_top_level: TextSerializationFailure # Was: Pass
+inference/downwards_inference_inside_top_level_2: TextSerializationFailure # Was: Pass
 inference/downwards_inference_on_constructor_arguments_infer_downwards: TextSerializationFailure # Was: Pass
 inference/downwards_inference_on_function_arguments_infer_downwards: TextSerializationFailure # Was: Pass
 inference/downwards_inference_on_function_expressions: TextSerializationFailure # Was: Pass
@@ -222,33 +226,33 @@
 inference/for_loop_initializer_expression: TextSerializationFailure # Was: Pass
 inference/for_loop_promotion: TextSerializationFailure # Was: Pass
 inference/future_or_subtyping: TextSerializationFailure # Was: Pass
+inference/future_then: TextSerializationFailure # Was: Pass
 inference/future_then_2: TextSerializationFailure # Was: Pass
 inference/future_then_3: TextSerializationFailure # Was: Pass
 inference/future_then_4: TextSerializationFailure # Was: Pass
 inference/future_then_5: TextSerializationFailure # Was: Pass
 inference/future_then_6: TextSerializationFailure # Was: Pass
+inference/future_then_conditional: TextSerializationFailure # Was: Pass
 inference/future_then_conditional_2: TextSerializationFailure # Was: Pass
 inference/future_then_conditional_3: TextSerializationFailure # Was: Pass
 inference/future_then_conditional_4: TextSerializationFailure # Was: Pass
 inference/future_then_conditional_5: TextSerializationFailure # Was: Pass
 inference/future_then_conditional_6: TextSerializationFailure # Was: Pass
-inference/future_then_conditional: TextSerializationFailure # Was: Pass
 inference/future_then_downwards_method_target: TextSerializationFailure # Was: Pass
 inference/future_then_explicit_future: InstrumentationMismatch # Issue #30040
 inference/future_then_ifNull: TextSerializationFailure # Was: Pass
-inference/future_then: TextSerializationFailure # Was: Pass
+inference/future_then_upwards: TextSerializationFailure # Was: RuntimeError
 inference/future_then_upwards_2: TextSerializationFailure # Was: RuntimeError
 inference/future_then_upwards_3: TextSerializationFailure # Was: Pass
 inference/future_then_upwards_from_block: TextSerializationFailure # Was: Pass
-inference/future_then_upwards: TextSerializationFailure # Was: RuntimeError
-inference/future_union_async_conditional_2: TextSerializationFailure # Was: Pass
 inference/future_union_async_conditional: TextSerializationFailure # Was: Pass
+inference/future_union_async_conditional_2: TextSerializationFailure # Was: Pass
+inference/future_union_downwards: TextSerializationFailure # Was: Pass
 inference/future_union_downwards_2: TextSerializationFailure # Was: Pass
 inference/future_union_downwards_3: TextSerializationFailure # Was: Pass
 inference/future_union_downwards_4: TextSerializationFailure # Was: Pass
 inference/future_union_downwards_generic_method_with_future_return: TextSerializationFailure # Was: Pass
 inference/future_union_downwards_generic_method_with_generic_return: TextSerializationFailure # Was: Pass
-inference/future_union_downwards: TextSerializationFailure # Was: Pass
 inference/future_union_upwards_generic_methods: TextSerializationFailure # Was: Pass
 inference/generator_closure: TextSerializationFailure # Was: Pass
 inference/generic_functions_return_typedef: InstrumentationMismatch # Issue #29798
@@ -259,19 +263,19 @@
 inference/generic_methods_downwards_inference_affects_arguments: TextSerializationFailure # Was: Pass
 inference/generic_methods_downwards_inference_fold: TextSerializationFailure # Was: Pass
 inference/generic_methods_handle_override_of_non_generic_with_generic: TypeCheckError
-inference/generic_methods_inference_error: TextSerializationFailure # Was: Pass
 inference/generic_methods_infer_generic_function_parameter_type2: TextSerializationFailure # Was: Pass
 inference/generic_methods_infer_generic_function_parameter_type: TextSerializationFailure # Was: Pass
 inference/generic_methods_infer_generic_function_return_type: TextSerializationFailure # Was: Pass
 inference/generic_methods_infer_generic_instantiation: TextSerializationFailure # Was: Pass
 inference/generic_methods_infer_generic_method_type: TextSerializationFailure # Was: Pass
 inference/generic_methods_infer_js_builtin: InstrumentationMismatch # Issue #30029
+inference/generic_methods_inference_error: TextSerializationFailure # Was: Pass
 inference/generic_methods_iterable_and_future: TextSerializationFailure # Was: Pass
 inference/generic_methods_nested_generic_instantiation: TextSerializationFailure # Was: Pass
 inference/generic_methods_uses_greatest_lower_bound: TextSerializationFailure # Was: Pass
 inference/greatest_closure_multiple_params: TextSerializationFailure # Was: Pass
-inference/index_assign_operator_return_type_2: TextSerializationFailure # Was: Pass
 inference/index_assign_operator_return_type: TextSerializationFailure # Was: Pass
+inference/index_assign_operator_return_type_2: TextSerializationFailure # Was: Pass
 inference/infer_accessor_from_later_inferred_field: TextSerializationFailure # Was: Pass
 inference/infer_assign_to_implicit_this: TextSerializationFailure # Was: Pass
 inference/infer_assign_to_implicit_this_upwards: TextSerializationFailure # Was: Pass
@@ -295,9 +299,9 @@
 inference/infer_binary_int_double: TextSerializationFailure # Was: Pass
 inference/infer_binary_int_int: TextSerializationFailure # Was: Pass
 inference/infer_conditional: TextSerializationFailure # Was: Pass
+inference/infer_consts_transitively_2: TextSerializationFailure # Was: Pass
 inference/infer_consts_transitively_2_a: TextSerializationFailure # Was: Pass
 inference/infer_consts_transitively_2_b: TextSerializationFailure # Was: Pass
-inference/infer_consts_transitively_2: TextSerializationFailure # Was: Pass
 inference/infer_consts_transitively_b: TextSerializationFailure # Was: Pass
 inference/infer_correctly_on_multiple_variables_declared_together: TextSerializationFailure # Was: Pass
 inference/infer_field_from_later_inferred_field: TextSerializationFailure # Was: Pass
@@ -305,9 +309,9 @@
 inference/infer_field_from_later_inferred_setter: TextSerializationFailure # Was: Pass
 inference/infer_field_override_multiple: TypeCheckError
 inference/infer_field_override_of_override: TextSerializationFailure # Was: Pass
+inference/infer_field_override_with_substitution: TextSerializationFailure # Was: Pass
 inference/infer_field_overrides_getter: TextSerializationFailure # Was: Pass
 inference/infer_field_overrides_setter: TextSerializationFailure # Was: Pass
-inference/infer_field_override_with_substitution: TextSerializationFailure # Was: Pass
 inference/infer_field_static: TextSerializationFailure # Was: Pass
 inference/infer_final_field_getter_and_setter: TextSerializationFailure # Was: Pass
 inference/infer_final_field_getter_only: TextSerializationFailure # Was: Pass
@@ -315,14 +319,14 @@
 inference/infer_from_complex_expressions_if_outer_most_value_is_precise: TypeCheckError # Issue #35630
 inference/infer_from_rhs_only_if_it_wont_conflict_with_overridden_fields2: TextSerializationFailure # Was: Pass
 inference/infer_from_rhs_only_if_it_wont_conflict_with_overridden_fields: TextSerializationFailure # Was: Pass
-inference/infer_from_variables_in_cycle_libs_when_flag_is_on2_a: TextSerializationFailure # Was: Pass
 inference/infer_from_variables_in_cycle_libs_when_flag_is_on2: TextSerializationFailure # Was: Pass
-inference/infer_from_variables_in_cycle_libs_when_flag_is_on_a: TextSerializationFailure # Was: Pass
+inference/infer_from_variables_in_cycle_libs_when_flag_is_on2_a: TextSerializationFailure # Was: Pass
 inference/infer_from_variables_in_cycle_libs_when_flag_is_on: TextSerializationFailure # Was: Pass
-inference/infer_from_variables_in_non_cycle_imports_with_flag2_a: TextSerializationFailure # Was: Pass
+inference/infer_from_variables_in_cycle_libs_when_flag_is_on_a: TextSerializationFailure # Was: Pass
 inference/infer_from_variables_in_non_cycle_imports_with_flag2: TextSerializationFailure # Was: Pass
-inference/infer_from_variables_in_non_cycle_imports_with_flag_a: TextSerializationFailure # Was: Pass
+inference/infer_from_variables_in_non_cycle_imports_with_flag2_a: TextSerializationFailure # Was: Pass
 inference/infer_from_variables_in_non_cycle_imports_with_flag: TextSerializationFailure # Was: Pass
+inference/infer_from_variables_in_non_cycle_imports_with_flag_a: TextSerializationFailure # Was: Pass
 inference/infer_generic_method_type_named: TextSerializationFailure # Was: Pass
 inference/infer_generic_method_type_positional2: TextSerializationFailure # Was: Pass
 inference/infer_generic_method_type_positional: TextSerializationFailure # Was: Pass
@@ -336,8 +340,46 @@
 inference/infer_method_missing_params: TypeCheckError
 inference/infer_parameter_type_setter_from_field: TextSerializationFailure # Was: Pass
 inference/infer_parameter_type_setter_from_setter: TextSerializationFailure # Was: Pass
-inference/infer_prefix_expression_custom: TextSerializationFailure # Was: Pass
 inference/infer_prefix_expression: TextSerializationFailure # Was: Pass
+inference/infer_prefix_expression_custom: TextSerializationFailure # Was: Pass
+inference/infer_rethrow: TextSerializationFailure # Was: Pass
+inference/infer_return_of_statement_lambda: TextSerializationFailure # Was: Pass
+inference/infer_return_type_for_static_setter: TextSerializationFailure # Was: Pass
+inference/infer_setter_cross_to_getter: TextSerializationFailure # Was: Pass
+inference/infer_setter_from_later_inferred_setter: TextSerializationFailure # Was: Pass
+inference/infer_setter_function_typed: TextSerializationFailure # Was: Pass
+inference/infer_setter_return_type_only: TextSerializationFailure # Was: Pass
+inference/infer_statics_transitively2: TextSerializationFailure # Was: Pass
+inference/infer_statics_transitively3: TextSerializationFailure # Was: Pass
+inference/infer_statics_transitively3_a: TextSerializationFailure # Was: Pass
+inference/infer_statics_transitively: TextSerializationFailure # Was: Pass
+inference/infer_statics_transitively_2_a: TextSerializationFailure # Was: Pass
+inference/infer_statics_transitively_a: TextSerializationFailure # Was: Pass
+inference/infer_statics_transitively_b: TextSerializationFailure # Was: Pass
+inference/infer_statics_with_method_invocations: TextSerializationFailure # Was: Pass
+inference/infer_statics_with_method_invocations_a: TextSerializationFailure # Was: Pass
+inference/infer_throw: TextSerializationFailure # Was: Pass
+inference/infer_throw_downwards: TextSerializationFailure # Was: Pass
+inference/infer_type_on_overridden_fields2: TextSerializationFailure # Was: Pass
+inference/infer_type_on_overridden_fields4: TextSerializationFailure # Was: Pass
+inference/infer_type_on_var2: TextSerializationFailure # Was: Pass
+inference/infer_type_on_var: TextSerializationFailure # Was: Pass
+inference/infer_type_on_var_from_field: TextSerializationFailure # Was: Pass
+inference/infer_type_on_var_from_top_level: TextSerializationFailure # Was: Pass
+inference/infer_type_regardless_of_declaration_order_or_cycles: TextSerializationFailure # Was: RuntimeError
+inference/infer_type_regardless_of_declaration_order_or_cycles_b: TextSerializationFailure # Was: Pass
+inference/infer_typed_map_literal: TextSerializationFailure # Was: Pass
+inference/infer_types_on_generic_instantiations_3: TextSerializationFailure # Was: Pass
+inference/infer_types_on_generic_instantiations_4: TextSerializationFailure # Was: RuntimeError
+inference/infer_types_on_generic_instantiations_5: TextSerializationFailure # Was: Pass
+inference/infer_types_on_generic_instantiations_in_library_cycle: TextSerializationFailure # Was: Pass
+inference/infer_types_on_generic_instantiations_in_library_cycle_a: TextSerializationFailure # Was: Pass
+inference/infer_types_on_generic_instantiations_infer: TypeCheckError
+inference/infer_types_on_loop_indices_for_each_loop: TextSerializationFailure # Was: Pass
+inference/infer_types_on_loop_indices_for_each_loop_async: TextSerializationFailure # Was: Pass
+inference/infer_types_on_loop_indices_for_loop_with_inference: TextSerializationFailure # Was: Pass
+inference/infer_use_of_void_local: TextSerializationFailure # Was: Pass
+inference/infer_variable_void: TextSerializationFailure # Was: Pass
 inference/inferred_initializing_formal_checks_default_value: TextSerializationFailure # Was: Pass
 inference/inferred_nonstatic_field_depends_on_static_field_complex: TextSerializationFailure # Was: Pass
 inference/inferred_nonstatic_field_depends_on_top_level_var_simple: TextSerializationFailure # Was: Pass
@@ -357,65 +399,27 @@
 inference/inferred_type_invoke_method_via_interface: TextSerializationFailure # Was: Pass
 inference/inferred_type_is_enum: TextSerializationFailure # Was: Pass
 inference/inferred_type_is_enum_values: TextSerializationFailure # Was: Pass
-inference/inferred_type_is_typedef_parameterized: TextSerializationFailure # Was: Pass
 inference/inferred_type_is_typedef: TextSerializationFailure # Was: Pass
+inference/inferred_type_is_typedef_parameterized: TextSerializationFailure # Was: Pass
+inference/inferred_type_uses_synthetic_function_type: TextSerializationFailure # Was: Pass
 inference/inferred_type_uses_synthetic_function_type_function_typed_param: TextSerializationFailure # Was: Pass
 inference/inferred_type_uses_synthetic_function_type_named_param: TextSerializationFailure # Was: Pass
 inference/inferred_type_uses_synthetic_function_type_positional_param: TextSerializationFailure # Was: Pass
 inference/inferred_type_uses_synthetic_function_type_required_param: TextSerializationFailure # Was: Pass
-inference/inferred_type_uses_synthetic_function_type: TextSerializationFailure # Was: Pass
 inference/inferred_type_via_closure_multiple_levels_of_nesting: TextSerializationFailure # Was: Pass
 inference/inferred_type_via_closure_type_depends_on_args: TextSerializationFailure # Was: Pass
 inference/inferred_type_via_closure_type_independent_of_args_field: TextSerializationFailure # Was: Pass
 inference/inferred_type_via_closure_type_independent_of_args_top_level: TextSerializationFailure # Was: Pass
-inference/infer_rethrow: TextSerializationFailure # Was: Pass
-inference/infer_return_of_statement_lambda: TextSerializationFailure # Was: Pass
-inference/infer_return_type_for_static_setter: TextSerializationFailure # Was: Pass
-inference/infer_setter_cross_to_getter: TextSerializationFailure # Was: Pass
-inference/infer_setter_from_later_inferred_setter: TextSerializationFailure # Was: Pass
-inference/infer_setter_function_typed: TextSerializationFailure # Was: Pass
-inference/infer_setter_return_type_only: TextSerializationFailure # Was: Pass
-inference/infer_statics_transitively_2_a: TextSerializationFailure # Was: Pass
-inference/infer_statics_transitively2: TextSerializationFailure # Was: Pass
-inference/infer_statics_transitively3_a: TextSerializationFailure # Was: Pass
-inference/infer_statics_transitively3: TextSerializationFailure # Was: Pass
-inference/infer_statics_transitively_a: TextSerializationFailure # Was: Pass
-inference/infer_statics_transitively_b: TextSerializationFailure # Was: Pass
-inference/infer_statics_transitively: TextSerializationFailure # Was: Pass
-inference/infer_statics_with_method_invocations_a: TextSerializationFailure # Was: Pass
-inference/infer_statics_with_method_invocations: TextSerializationFailure # Was: Pass
-inference/infer_throw_downwards: TextSerializationFailure # Was: Pass
-inference/infer_throw: TextSerializationFailure # Was: Pass
-inference/infer_typed_map_literal: TextSerializationFailure # Was: Pass
-inference/infer_type_on_overridden_fields2: TextSerializationFailure # Was: Pass
-inference/infer_type_on_overridden_fields4: TextSerializationFailure # Was: Pass
-inference/infer_type_on_var2: TextSerializationFailure # Was: Pass
-inference/infer_type_on_var_from_field: TextSerializationFailure # Was: Pass
-inference/infer_type_on_var_from_top_level: TextSerializationFailure # Was: Pass
-inference/infer_type_on_var: TextSerializationFailure # Was: Pass
-inference/infer_type_regardless_of_declaration_order_or_cycles_b: TextSerializationFailure # Was: Pass
-inference/infer_type_regardless_of_declaration_order_or_cycles: TextSerializationFailure # Was: RuntimeError
-inference/infer_types_on_generic_instantiations_3: TextSerializationFailure # Was: Pass
-inference/infer_types_on_generic_instantiations_4: TextSerializationFailure # Was: RuntimeError
-inference/infer_types_on_generic_instantiations_5: TextSerializationFailure # Was: Pass
-inference/infer_types_on_generic_instantiations_infer: TypeCheckError
-inference/infer_types_on_generic_instantiations_in_library_cycle_a: TextSerializationFailure # Was: Pass
-inference/infer_types_on_generic_instantiations_in_library_cycle: TextSerializationFailure # Was: Pass
-inference/infer_types_on_loop_indices_for_each_loop_async: TextSerializationFailure # Was: Pass
-inference/infer_types_on_loop_indices_for_each_loop: TextSerializationFailure # Was: Pass
-inference/infer_types_on_loop_indices_for_loop_with_inference: TextSerializationFailure # Was: Pass
-inference/infer_use_of_void_local: TextSerializationFailure # Was: Pass
-inference/infer_variable_void: TextSerializationFailure # Was: Pass
 inference/inheritance_does_not_imply_circularity: TextSerializationFailure # Was: Pass
 inference/instance_creation_downwards: TextSerializationFailure # Was: Pass
+inference/instantiate_tearoff: TextSerializationFailure # Was: Pass
 inference/instantiate_tearoff_after_contravariance_check: TextSerializationFailure # Was: Pass
 inference/instantiate_tearoff_of_call: TypeCheckError # Issue #31746
-inference/instantiate_tearoff: TextSerializationFailure # Was: Pass
 inference/instantiate_to_bounds_generic2_has_bound_defined_after: TextSerializationFailure # Was: Pass
 inference/instantiate_to_bounds_generic2_has_bound_defined_before: TextSerializationFailure # Was: Pass
 inference/instantiate_to_bounds_generic2_no_bound: TextSerializationFailure # Was: Pass
-inference/instantiate_to_bounds_generic_has_bound_defined_after: TextSerializationFailure # Was: Pass
 inference/instantiate_to_bounds_generic_has_bound_defined_after transform: RuntimeError
+inference/instantiate_to_bounds_generic_has_bound_defined_after: TextSerializationFailure # Was: Pass
 inference/instantiate_to_bounds_generic_has_bound_defined_before: TextSerializationFailure # Was: Pass
 inference/instantiate_to_bounds_invoke_constructor_no_bound: TextSerializationFailure # Was: Pass
 inference/instantiate_to_bounds_invoke_constructor_type_args_exact: TextSerializationFailure # Was: Pass
@@ -424,19 +428,19 @@
 inference/lambda_does_not_have_propagated_type_hint: TextSerializationFailure # Was: Pass
 inference/lambda_return_type: TextSerializationFailure # Was: Pass
 inference/lambda_void_context: TextSerializationFailure # Was: Pass
-inference/list_literals_can_infer_null_bottom: TextSerializationFailure # Was: Pass
-inference/list_literals: TextSerializationFailure # Was: Pass
-inference/list_literals_top_level: TextSerializationFailure # Was: Pass
 inference/list_literal_typed: TextSerializationFailure # Was: Pass
+inference/list_literals: TextSerializationFailure # Was: Pass
+inference/list_literals_can_infer_null_bottom: TextSerializationFailure # Was: Pass
+inference/list_literals_top_level: TextSerializationFailure # Was: Pass
 inference/local_constructor_from_arguments: TextSerializationFailure # Was: Pass
 inference/local_reference_upwards_local: TextSerializationFailure # Was: Pass
 inference/local_return_and_yield: TextSerializationFailure # Was: Pass
 inference/logical_or_promotion: TextSerializationFailure # Was: Pass
-inference/map_literals_can_infer_null: TextSerializationFailure # Was: Pass
 inference/map_literals: TextSerializationFailure # Was: Pass
+inference/map_literals_can_infer_null: TextSerializationFailure # Was: Pass
 inference/map_literals_top_level: TextSerializationFailure # Was: Pass
-inference/method_call_with_type_arguments_instance_method_identifier_sequence: TextSerializationFailure # Was: Pass
 inference/method_call_with_type_arguments_instance_method: TextSerializationFailure # Was: Pass
+inference/method_call_with_type_arguments_instance_method_identifier_sequence: TextSerializationFailure # Was: Pass
 inference/method_call_with_type_arguments_static_method: TextSerializationFailure # Was: Pass
 inference/method_call_with_type_arguments_top_level_function: TextSerializationFailure # Was: Pass
 inference/mixin_inference_instantiate_to_bounds_1: TextSerializationFailure # Was: Pass
@@ -450,71 +454,13 @@
 inference/mixin_inference_outwards_4: TypeCheckError
 inference/mixin_inference_unification_1: TypeCheckError
 inference/mixin_inference_unification_2: TypeCheckError
-inference_new/const_invocation: TextSerializationFailure # Was: Pass
-inference_new/dependency_only_if_generic_method: TextSerializationFailure # Was: Pass
-inference_new/dependency_only_if_overloaded: TextSerializationFailure # Was: Pass
-inference_new/do_loop: TextSerializationFailure # Was: Pass
-inference_new/downwards_inference_inside_top_level_2: TextSerializationFailure # Was: Pass
-inference_new/downwards_inference_inside_top_level: TextSerializationFailure # Was: Pass
-inference_new/field_inference_circularity: TextSerializationFailure # Was: Pass
-inference_new/for_each_identifier_downwards: TextSerializationFailure # Was: Pass
-inference_new/for_each_invalid_iterable: TextSerializationFailure # Was: Pass
-inference_new/for_each_outer_var_type: TextSerializationFailure # Was: Pass
-inference_new/indexed_assign_combiner: TextSerializationFailure # Was: Pass
-inference_new/infer_assign_to_implicit_this: TextSerializationFailure # Was: Pass
-inference_new/infer_assign_to_implicit_this_upwards: TextSerializationFailure # Was: Pass
-inference_new/infer_assign_to_index_full: TextSerializationFailure # Was: Pass
-inference_new/infer_assign_to_index_set_vs_get: TextSerializationFailure # Was: Pass
-inference_new/infer_assign_to_index_super: TextSerializationFailure # Was: Pass
-inference_new/infer_assign_to_index_super_upwards: TypeCheckError
-inference_new/infer_assign_to_index: TextSerializationFailure # Was: Pass
-inference_new/infer_assign_to_index_this: TextSerializationFailure # Was: Pass
-inference_new/infer_assign_to_index_this_upwards: TypeCheckError
-inference_new/infer_assign_to_index_upwards: TypeCheckError
-inference_new/infer_assign_to_local: TextSerializationFailure # Was: Pass
-inference_new/infer_assign_to_local_upwards: TextSerializationFailure # Was: Pass
-inference_new/infer_assign_to_property_custom: TypeCheckError
-inference_new/infer_assign_to_property_full: TextSerializationFailure # Was: Pass
-inference_new/infer_assign_to_property_null_aware: TextSerializationFailure # Was: Pass
-inference_new/infer_assign_to_property_null_aware_upwards: TextSerializationFailure # Was: Pass
-inference_new/infer_assign_to_property_super: TextSerializationFailure # Was: Pass
-inference_new/infer_assign_to_property_super_upwards: TextSerializationFailure # Was: Pass
-inference_new/infer_assign_to_property: TextSerializationFailure # Was: Pass
-inference_new/infer_assign_to_property_upwards: TextSerializationFailure # Was: Pass
-inference_new/infer_assign_to_ref: TextSerializationFailure # Was: Pass
-inference_new/infer_assign_to_static: TextSerializationFailure # Was: Pass
-inference_new/infer_assign_to_static_upwards: TextSerializationFailure # Was: Pass
-inference_new/infer_field_getter_setter_mismatch: TypeCheckError
-inference_new/infer_field_override_getter_overrides_setter: TypeCheckError
-inference_new/infer_field_override_setter_overrides_getter: TextSerializationFailure # Was: Pass
-inference_new/infer_instance_accessor_ref: TextSerializationFailure # Was: Pass
-inference_new/infer_instance_field_ref_circular: TextSerializationFailure # Was: Pass
-inference_new/infer_instance_field_ref: TextSerializationFailure # Was: Pass
-inference_new/infer_logical: TextSerializationFailure # Was: Pass
-inference_new/infer_use_of_void: TextSerializationFailure # Was: Pass
-inference_new/invalid_assignment_during_toplevel_inference: TypeCheckError
-inference_new/list_literals_can_infer_null_top_level: TextSerializationFailure # Was: Pass
-inference_new/map_literals_can_infer_null_top_level: TextSerializationFailure # Was: Pass
-inference_new/multiple_interface_inheritance: TextSerializationFailure # Was: Pass
-inference_new/property_assign_combiner: TextSerializationFailure # Was: Pass
-inference_new/property_get_toplevel: TextSerializationFailure # Was: Pass
-inference_new/static_assign_combiner: TextSerializationFailure # Was: Pass
-inference_new/strongly_connected_component: TextSerializationFailure # Was: Pass
-inference_new/super_index_get_substitution: TextSerializationFailure # Was: Pass
-inference_new/super_index_get: TextSerializationFailure # Was: Pass
-inference_new/switch: TextSerializationFailure # Was: Pass
-inference_new/top_level_field_depends_on_multiple_inheritance: TextSerializationFailure # Was: Pass
-inference_new/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2: TextSerializationFailure # Was: Pass
-inference_new/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2: TextSerializationFailure # Was: Pass
-inference_new/void_return_type_subtypes_dynamic: TextSerializationFailure # Was: Pass
-inference_new/while_loop: TextSerializationFailure # Was: Pass
 inference/no_error_when_declared_type_is_num_and_assigned_null: TextSerializationFailure # Was: Pass
 inference/non_const_invocation: TextSerializationFailure # Was: Pass
 inference/non_inferrable_getter_setter: TextSerializationFailure # Was: Pass
 inference/null_aware_method_invocation: TextSerializationFailure # Was: Pass
 inference/null_aware_property_get: TextSerializationFailure # Was: Pass
-inference/null_coalescing_operator_2: TextSerializationFailure # Was: Pass
 inference/null_coalescing_operator: TextSerializationFailure # Was: Pass
+inference/null_coalescing_operator_2: TextSerializationFailure # Was: Pass
 inference/null_literal_should_not_infer_as_bottom: TextSerializationFailure # Was: Pass
 inference/overloaded_int_operators: TextSerializationFailure # Was: Pass
 inference/override_equals: TextSerializationFailure # Was: RuntimeError
@@ -523,14 +469,14 @@
 inference/promote_bounds: TextSerializationFailure # Was: Pass
 inference/promote_from_logical_rhs: TextSerializationFailure # Was: Pass
 inference/promotion_subtype_check: TextSerializationFailure # Was: Pass
-inference/propagate_inference_to_field_in_class_dynamic_warnings: TextSerializationFailure # Was: Pass
 inference/propagate_inference_to_field_in_class: TextSerializationFailure # Was: Pass
+inference/propagate_inference_to_field_in_class_dynamic_warnings: TextSerializationFailure # Was: Pass
 inference/propagate_inference_transitively2: TextSerializationFailure # Was: Pass
 inference/propagate_inference_transitively: TextSerializationFailure # Was: Pass
 inference/propagate_variable_get: TextSerializationFailure # Was: Pass
 inference/property_get_toplevel: TextSerializationFailure # Was: Pass
-inference/property_set_bad_setter: TextSerializationFailure # Was: Pass
 inference/property_set: TextSerializationFailure # Was: Pass
+inference/property_set_bad_setter: TextSerializationFailure # Was: Pass
 inference/recursive_generic_function: TextSerializationFailure # Was: Pass
 inference/reference_to_typedef: TextSerializationFailure # Was: Pass
 inference/refine_binary_expression_type_type_parameter_t_double: TextSerializationFailure # Was: Pass
@@ -540,29 +486,30 @@
 inference/simple_literal_bool: TextSerializationFailure # Was: Pass
 inference/simple_literal_double: TextSerializationFailure # Was: Pass
 inference/simple_literal_int: TextSerializationFailure # Was: Pass
+inference/simple_literal_null: TextSerializationFailure
 inference/static_method_tear_off: TextSerializationFailure # Was: Pass
 inference/string_literal: TextSerializationFailure # Was: Pass
 inference/subexpressions_of_explicitly_typed_fields: TextSerializationFailure # Was: Pass
-inference/super_index_set_substitution: TextSerializationFailure # Was: Pass
 inference/super_index_set: TextSerializationFailure # Was: Pass
-inference/super_initializer_substitution: TextSerializationFailure # Was: Pass
+inference/super_index_set_substitution: TextSerializationFailure # Was: Pass
 inference/super_initializer: TextSerializationFailure # Was: Pass
-inference/super_method_invocation_substitution: TextSerializationFailure # Was: Pass
+inference/super_initializer_substitution: TextSerializationFailure # Was: Pass
 inference/super_method_invocation: TextSerializationFailure # Was: Pass
+inference/super_method_invocation_substitution: TextSerializationFailure # Was: Pass
+inference/super_property_get: TextSerializationFailure # Was: Pass
 inference/super_property_get_invoke_function_typed: TextSerializationFailure # Was: Pass
 inference/super_property_get_invoke_implicit_call: TextSerializationFailure # Was: Pass
 inference/super_property_get_substitution: TextSerializationFailure # Was: Pass
 inference/super_property_get_tearoff: TextSerializationFailure # Was: Pass
-inference/super_property_get: TextSerializationFailure # Was: Pass
 inference/super_property_set_substitution: TextSerializationFailure # Was: Pass
 inference/switch_continue: TextSerializationFailure # Was: Pass
 inference/symbol_literal: TextSerializationFailure # Was: Pass
 inference/this_reference: TextSerializationFailure # Was: Pass
-inference/toplevel_inference_toplevel_var: TextSerializationFailure # Was: Pass
 inference/top_level_return_and_yield: TextSerializationFailure # Was: Pass
+inference/toplevel_inference_toplevel_var: TextSerializationFailure # Was: Pass
+inference/try_catch: TextSerializationFailure # Was: Pass
 inference/try_catch_finally: TextSerializationFailure # Was: Pass
 inference/try_catch_promotion: TextSerializationFailure # Was: Pass
-inference/try_catch: TextSerializationFailure # Was: Pass
 inference/try_finally: TextSerializationFailure # Was: Pass
 inference/type_cast: TextSerializationFailure # Was: Pass
 inference/type_promotion_ignores_local_functions: TextSerializationFailure # Was: Pass
@@ -580,9 +527,11 @@
 inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param: TextSerializationFailure # Was: Pass
 inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr1: InstrumentationMismatch # Issue #25824
 inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2: InstrumentationMismatch # Issue #25824
+inference/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2: TextSerializationFailure
 inference/unsafe_block_closure_inference_function_call_explicit_type_param: TextSerializationFailure # Was: Pass
 inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr1: InstrumentationMismatch # Issue #25824
 inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2: InstrumentationMismatch # Issue #25824
+inference/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2: TextSerializationFailure
 inference/unsafe_block_closure_inference_function_call_implicit_type_param: TextSerializationFailure # Was: Pass
 inference/unsafe_block_closure_inference_function_call_implicit_type_param_via_expr: TextSerializationFailure # Was: Pass
 inference/unsafe_block_closure_inference_function_call_no_type_param: TextSerializationFailure # Was: Pass
@@ -598,6 +547,66 @@
 inference/unsafe_block_closure_inference_method_call_implicit_type_param: TextSerializationFailure # Was: Pass
 inference/unsafe_block_closure_inference_method_call_no_type_param: TextSerializationFailure # Was: Pass
 inference/void_return_type_subtypes_dynamic: TextSerializationFailure # Was: Pass
+inference_new/const_invocation: TextSerializationFailure # Was: Pass
+inference_new/dependency_only_if_generic_method: TextSerializationFailure # Was: Pass
+inference_new/dependency_only_if_overloaded: TextSerializationFailure # Was: Pass
+inference_new/dependency_only_if_overloaded: TypeCheckError
+inference_new/do_loop: TextSerializationFailure # Was: Pass
+inference_new/downwards_inference_inside_top_level: TextSerializationFailure # Was: Pass
+inference_new/downwards_inference_inside_top_level_2: TextSerializationFailure # Was: Pass
+inference_new/field_inference_circularity: TextSerializationFailure # Was: Pass
+inference_new/for_each_identifier_downwards: TextSerializationFailure # Was: Pass
+inference_new/for_each_invalid_iterable: TextSerializationFailure # Was: Pass
+inference_new/for_each_outer_var_type: TextSerializationFailure # Was: Pass
+inference_new/indexed_assign_combiner: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_implicit_this: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_implicit_this_upwards: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_index: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_index_full: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_index_set_vs_get: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_index_super: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_index_super_upwards: TypeCheckError
+inference_new/infer_assign_to_index_this: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_index_this_upwards: TypeCheckError
+inference_new/infer_assign_to_index_upwards: TypeCheckError
+inference_new/infer_assign_to_local: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_local_upwards: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_property: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_property_custom: TypeCheckError
+inference_new/infer_assign_to_property_full: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_property_null_aware: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_property_null_aware_upwards: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_property_super: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_property_super_upwards: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_property_upwards: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_ref: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_static: TextSerializationFailure # Was: Pass
+inference_new/infer_assign_to_static_upwards: TextSerializationFailure # Was: Pass
+inference_new/infer_field_getter_setter_mismatch: TypeCheckError
+inference_new/infer_field_override_getter_overrides_setter: TypeCheckError
+inference_new/infer_field_override_setter_overrides_getter: TextSerializationFailure # Was: Pass
+inference_new/infer_instance_accessor_ref: TextSerializationFailure # Was: Pass
+inference_new/infer_instance_field_ref: TextSerializationFailure # Was: Pass
+inference_new/infer_instance_field_ref_circular: TextSerializationFailure # Was: Pass
+inference_new/infer_logical: TextSerializationFailure # Was: Pass
+inference_new/infer_use_of_void: TextSerializationFailure # Was: Pass
+inference_new/invalid_assignment_during_toplevel_inference: TypeCheckError
+inference_new/list_literals_can_infer_null_top_level: TextSerializationFailure # Was: Pass
+inference_new/map_literals_can_infer_null_top_level: TextSerializationFailure # Was: Pass
+inference_new/multiple_interface_inheritance: TextSerializationFailure # Was: Pass
+inference_new/property_assign_combiner: TextSerializationFailure # Was: Pass
+inference_new/property_get_toplevel: TextSerializationFailure # Was: Pass
+inference_new/static_assign_combiner: TextSerializationFailure # Was: Pass
+inference_new/strongly_connected_component: TextSerializationFailure # Was: Pass
+inference_new/strongly_connected_component: TypeCheckError
+inference_new/super_index_get: TextSerializationFailure # Was: Pass
+inference_new/super_index_get_substitution: TextSerializationFailure # Was: Pass
+inference_new/switch: TextSerializationFailure # Was: Pass
+inference_new/top_level_field_depends_on_multiple_inheritance: TextSerializationFailure # Was: Pass
+inference_new/unsafe_block_closure_inference_function_call_explicit_dynamic_param_via_expr2: TextSerializationFailure # Was: Pass
+inference_new/unsafe_block_closure_inference_function_call_explicit_type_param_via_expr2: TextSerializationFailure # Was: Pass
+inference_new/void_return_type_subtypes_dynamic: TextSerializationFailure # Was: Pass
+inference_new/while_loop: TextSerializationFailure # Was: Pass
 instantiate_to_bound/all_steps: TextSerializationFailure # Was: Pass
 instantiate_to_bound/body_generic_classes_from_dill: TextSerializationFailure # Was: Pass
 instantiate_to_bound/body_literal_list: TextSerializationFailure # Was: Pass
@@ -610,16 +619,16 @@
 instantiate_to_bound/body_typedef_literal_map: TextSerializationFailure # Was: Pass
 instantiate_to_bound/body_typedef_omitted_bound: TextSerializationFailure # Was: Pass
 instantiate_to_bound/body_typedef_super_bounded_type: TextSerializationFailure # Was: Pass
-instantiate_to_bound/contravariant_dependence_in_literals: TextSerializationFailure # Was: Pass
 instantiate_to_bound/contravariant_dependence: TextSerializationFailure # Was: Pass
-instantiate_to_bound/contravariant_mutual_dependence_in_literals: TextSerializationFailure # Was: Pass
+instantiate_to_bound/contravariant_dependence_in_literals: TextSerializationFailure # Was: Pass
 instantiate_to_bound/contravariant_mutual_dependence: TextSerializationFailure # Was: Pass
-instantiate_to_bound/covariant_dependence_in_literals: TextSerializationFailure # Was: Pass
+instantiate_to_bound/contravariant_mutual_dependence_in_literals: TextSerializationFailure # Was: Pass
 instantiate_to_bound/covariant_dependence: TextSerializationFailure # Was: Pass
-instantiate_to_bound/covariant_mutual_dependence_in_literals: TextSerializationFailure # Was: Pass
+instantiate_to_bound/covariant_dependence_in_literals: TextSerializationFailure # Was: Pass
 instantiate_to_bound/covariant_mutual_dependence: TextSerializationFailure # Was: Pass
-instantiate_to_bound/dependence_in_literals: TextSerializationFailure # Was: Pass
+instantiate_to_bound/covariant_mutual_dependence_in_literals: TextSerializationFailure # Was: Pass
 instantiate_to_bound/dependence: TextSerializationFailure # Was: Pass
+instantiate_to_bound/dependence_in_literals: TextSerializationFailure # Was: Pass
 instantiate_to_bound/generic_classes_from_dill: TextSerializationFailure # Was: Pass
 instantiate_to_bound/inference_constrained_by_bound: TextSerializationFailure # Was: Pass
 instantiate_to_bound/inference_defaults_to_bound: TextSerializationFailure # Was: Pass
@@ -630,22 +639,22 @@
 instantiate_to_bound/literal_list_with_generic_argument: TextSerializationFailure # Was: Pass
 instantiate_to_bound/literal_map: TextSerializationFailure # Was: Pass
 instantiate_to_bound/multiple_strongly_connected: TextSerializationFailure # Was: Pass
-instantiate_to_bound/mutual_dependence_in_literals: TextSerializationFailure # Was: Pass
 instantiate_to_bound/mutual_dependence: TextSerializationFailure # Was: Pass
+instantiate_to_bound/mutual_dependence_in_literals: TextSerializationFailure # Was: Pass
 instantiate_to_bound/non_simple_bound_due_to_non_simple: TextSerializationFailure # Was: Pass
 instantiate_to_bound/non_simple_bound_due_to_variables: TextSerializationFailure # Was: Pass
 instantiate_to_bound/non_simple_class_parametrized_typedef_cycle: TextSerializationFailure # Was: RuntimeError # Expected
 instantiate_to_bound/non_simple_class_typedef_cycle: TextSerializationFailure # Was: Pass
+instantiate_to_bound/non_simple_co_inductive: TextSerializationFailure # Was: Pass
 instantiate_to_bound/non_simple_co_inductive_for_each: TextSerializationFailure # Was: Pass
 instantiate_to_bound/non_simple_co_inductive_no_dup: TextSerializationFailure # Was: Pass
-instantiate_to_bound/non_simple_co_inductive: TextSerializationFailure # Was: Pass
 instantiate_to_bound/non_simple_folded_regress: TextSerializationFailure # Was: Pass
 instantiate_to_bound/non_simple_for_each: TextSerializationFailure # Was: Pass
 instantiate_to_bound/non_simple_from_compiled: TextSerializationFailure # Was: Pass
 instantiate_to_bound/non_simple_generic_function_in_bound_regress: TextSerializationFailure # Was: RuntimeError # Expected
-instantiate_to_bound/non_simple_many_libs_same_name_cycle_lib: TextSerializationFailure # Was: Pass
-instantiate_to_bound/non_simple_many_libs_same_name_cycle: TextSerializationFailure # Was: Pass
 instantiate_to_bound/non_simple_many: TextSerializationFailure # Was: Pass
+instantiate_to_bound/non_simple_many_libs_same_name_cycle: TextSerializationFailure # Was: Pass
+instantiate_to_bound/non_simple_many_libs_same_name_cycle_lib: TextSerializationFailure # Was: Pass
 instantiate_to_bound/non_simple_no_dup: TextSerializationFailure # Was: Pass
 instantiate_to_bound/non_simple_suppress_consequence: TextSerializationFailure # Was: Pass
 instantiate_to_bound/non_simple_variables_from_same: TextSerializationFailure # Was: Pass
@@ -677,21 +686,21 @@
 micro: TextSerializationFailure # Was: RuntimeError
 minimum_int: TextSerializationFailure # Was: Pass
 missing_constructor: TextSerializationFailure # Was: Pass
+mixin: TextSerializationFailure # Was: Pass
 mixin_application_override: TypeCheckError
 mixin_conflicts: TextSerializationFailure
 mixin_constructors_with_default_values: TextSerializationFailure # Was: Pass
 mixin_inherited_setter_for_mixed_in_field: TextSerializationFailure # Was: Pass
 mixin_super_repeated: TextSerializationFailure # Was: Pass
 mixin_with_static_member: TextSerializationFailure
-mixin: TextSerializationFailure # Was: Pass
 named_function_scope: TextSerializationFailure # Was: Pass
 named_parameters: TextSerializationFailure # Was: Pass
 native_as_name: TextSerializationFailure # Was: Pass
 nested_implicit_const_with_env_var: TextSerializationFailure # Was: Pass
 new_const_insertion/simple: TextSerializationFailure # Was: Pass
+no_such_method_forwarders/abstract_accessors_from_field: TextSerializationFailure # Was: Pass
 no_such_method_forwarders/abstract_accessors_from_field_arent_mixed_in: TextSerializationFailure # Was: Pass
 no_such_method_forwarders/abstract_accessors_from_field_one_defined: TextSerializationFailure # Was: Pass
-no_such_method_forwarders/abstract_accessors_from_field: TextSerializationFailure # Was: Pass
 no_such_method_forwarders/abstract_accessors_from_field_with_substitution: TextSerializationFailure # Was: Pass
 no_such_method_forwarders/abstract_interface_nsm_inherited: TextSerializationFailure # Was: Pass
 no_such_method_forwarders/concrete_method_over_forwarder_in_mixin_application: TextSerializationFailure # Was: Pass
@@ -700,21 +709,23 @@
 no_such_method_forwarders/forwarders_not_assumed_from_mixin: TextSerializationFailure # Was: Pass
 no_such_method_forwarders/interface_with_concrete: TextSerializationFailure # Was: Pass
 no_such_method_forwarders/interface_with_nsm: TextSerializationFailure # Was: Pass
-no_such_method_forwarders/no_forwarders_for_abstract_classes_chain: TextSerializationFailure # Was: Pass
 no_such_method_forwarders/no_forwarders_for_abstract_classes: TextSerializationFailure # Was: Pass
+no_such_method_forwarders/no_forwarders_for_abstract_classes_chain: TextSerializationFailure # Was: Pass
 no_such_method_forwarders/nsm_inherited: TextSerializationFailure # Was: Pass
 no_such_method_forwarders/nsm_mixed_in: TextSerializationFailure # Was: Pass
+no_such_method_forwarders/private: TextSerializationFailure # Was: Pass
 no_such_method_forwarders/private_module: TextSerializationFailure # Was: Pass
 no_such_method_forwarders/private_same: TextSerializationFailure # Was: Pass
-no_such_method_forwarders/private: TextSerializationFailure # Was: Pass
 no_such_method_forwarders/same: TextSerializationFailure # Was: Pass
 no_such_method_forwarders/setter_not_shadowed_by_method: TextSerializationFailure # Was: Pass
 no_such_method_forwarders/subst_on_forwarder: TextSerializationFailure # Was: Pass
-no_such_method_private_setter_lib: TextSerializationFailure # Was: Pass
 no_such_method_private_setter: TextSerializationFailure # Was: Pass
+no_such_method_private_setter_lib: TextSerializationFailure # Was: Pass
 null_aware: TextSerializationFailure # Was: Pass
+operator_method_not_found: TextSerializationFailure
 operators: TextSerializationFailure # Was: Pass
 optional: TypeCheckError
+override: TextSerializationFailure # Was: Pass
 override_check_accessor_after_inference: TypeCheckError # Issue #31620
 override_check_accessor_basic: TypeCheckError # Issue #31620
 override_check_accessor_with_covariant_modifier: TypeCheckError # Issue #31620
@@ -723,24 +734,24 @@
 override_check_generic_method_f_bounded: TextSerializationFailure # Was: Pass
 override_check_two_substitutions: TextSerializationFailure # Was: Pass
 override_check_with_covariant_modifier: TypeCheckError # Issue #31620
-override: TextSerializationFailure # Was: Pass
-part_as_entry_point_lib: TextSerializationFailure # Was: Pass
 part_as_entry_point: TextSerializationFailure # Was: Pass
+part_as_entry_point_lib: TextSerializationFailure # Was: Pass
 part_not_part_of: TextSerializationFailure
 part_not_part_of_same_named_library: TextSerializationFailure
 part_part_of_different_unnamed_library: TextSerializationFailure
 part_part_of_differently_named_library: TextSerializationFailure
+platform: TextSerializationFailure
 prefer_baseclass: TextSerializationFailure # Was: Pass
-private_method_tearoff_lib: TextSerializationFailure # Was: Pass
 private_method_tearoff: TextSerializationFailure # Was: Pass
-public_method_tearoff_lib: TextSerializationFailure # Was: Pass
+private_method_tearoff_lib: TextSerializationFailure # Was: Pass
 public_method_tearoff: TextSerializationFailure # Was: Pass
+public_method_tearoff_lib: TextSerializationFailure # Was: Pass
+qualified: TextSerializationFailure # Was: Pass
 qualified_lib: TextSerializationFailure # Was: Pass
 qualified_part: TextSerializationFailure # Was: Pass
-qualified: TextSerializationFailure # Was: Pass
 rasta/abstract_constructor: TextSerializationFailure # Was: RuntimeError
 rasta/bad_constructor_redirection: TextSerializationFailure # Was: RuntimeError
-rasta/bad_continue: RuntimeError
+rasta/bad_continue: TextSerializationFailure # Was: RuntimeError
 rasta/bad_default_constructor: VerificationError
 rasta/bad_explicit_super_constructor: TextSerializationFailure # Was: RuntimeError
 rasta/bad_implicit_super_constructor: TextSerializationFailure # Was: RuntimeError
@@ -748,7 +759,7 @@
 rasta/bad_redirection: TextSerializationFailure # Was: RuntimeError
 rasta/bad_setter_initializer: TextSerializationFailure # Was: RuntimeError
 rasta/bad_unicode: TextSerializationFailure # Was: Pass
-rasta/breaking_bad: RuntimeError
+rasta/breaking_bad: TextSerializationFailure # Was: RuntimeError
 rasta/cascades: TextSerializationFailure # Was: Pass
 rasta/class_hierarchy: TextSerializationFailure # Was: RuntimeError
 rasta/class_member: TextSerializationFailure # Was: RuntimeError
@@ -776,16 +787,19 @@
 rasta/issue_000026: TextSerializationFailure # Was: Pass
 rasta/issue_000031: TextSerializationFailure # Was: RuntimeError
 rasta/issue_000032: TextSerializationFailure # Was: RuntimeError
+rasta/issue_000033: TextSerializationFailure
 rasta/issue_000034: TextSerializationFailure # Was: RuntimeError
-rasta/issue_000035a: TextSerializationFailure # Was: Pass
 rasta/issue_000035: TextSerializationFailure # Was: Pass
-rasta/issue_000036: RuntimeError
+rasta/issue_000035a: TextSerializationFailure # Was: Pass
+rasta/issue_000036: TextSerializationFailure # Was: RuntimeError
 rasta/issue_000039: VerificationError
 rasta/issue_000041: TextSerializationFailure # Was: RuntimeError
 rasta/issue_000042: TextSerializationFailure # Was: RuntimeError
 rasta/issue_000043: TextSerializationFailure # Was: RuntimeError
 rasta/issue_000044: TextSerializationFailure # Was: RuntimeError
+rasta/issue_000045: TextSerializationFailure
 rasta/issue_000046: TextSerializationFailure # Was: RuntimeError
+rasta/issue_000047: TextSerializationFailure
 rasta/issue_000048: TextSerializationFailure # Was: Pass
 rasta/issue_000052: TextSerializationFailure # Was: Pass
 rasta/issue_000053: TextSerializationFailure # Was: Pass
@@ -796,64 +810,81 @@
 rasta/issue_000080: TextSerializationFailure # Was: Pass
 rasta/issue_000081: TextSerializationFailure # Was: RuntimeError
 rasta/malformed_const_constructor: TextSerializationFailure # Was: RuntimeError
-rasta/malformed_function: RuntimeError
+rasta/malformed_function: TextSerializationFailure # Was: RuntimeError
 rasta/malformed_function_type: TextSerializationFailure # Was: Pass
+rasta/mandatory_parameter_initializer: TextSerializationFailure
 rasta/mixin_library: TypeCheckError
 rasta/native_is_illegal: TextSerializationFailure # Was: RuntimeError
 rasta/parser_error: TextSerializationFailure # Was: RuntimeError
 rasta/previsit_deferred: TextSerializationFailure # Was: Pass
 rasta/static: TextSerializationFailure # Was: RuntimeError
+rasta/super: TypeCheckError
 rasta/super_initializer: TextSerializationFailure # Was: RuntimeError
 rasta/super_mixin: TypeCheckError
 rasta/super_operator: TypeCheckError
-rasta/super: TypeCheckError
 rasta/supports_reflection: TextSerializationFailure # Was: Pass
 rasta/switch_execution_case_t02: TextSerializationFailure # Was: Pass
 rasta/switch_fall_through: TextSerializationFailure # Was: Pass
 rasta/this_invoke: TextSerializationFailure # Was: Pass
-rasta/typedef: Crash
+rasta/try_label: TextSerializationFailure
 rasta/type_literals: Crash
 rasta/type_with_parse_error: TextSerializationFailure # Was: Pass
+rasta/typedef: Crash
+rasta/unresolved: TextSerializationFailure # Was: RuntimeError
 rasta/unresolved_constructor: TextSerializationFailure # Was: RuntimeError
 rasta/unresolved_for_in: TextSerializationFailure # Was: RuntimeError
 rasta/unresolved_recovery: TypeCheckError
-rasta/unresolved: RuntimeError
+rasta/unsupported_platform_library: TextSerializationFailure
 redirecting_constructor: TextSerializationFailure # Was: Pass
+redirecting_factory: TextSerializationFailure # Was: Pass
 redirecting_factory_chain_test: TextSerializationFailure # Was: Pass
 redirecting_factory_const_inference: TextSerializationFailure # Was: Pass
 redirecting_factory_metadata: TextSerializationFailure # Was: Pass
 redirecting_factory_simple_test: TextSerializationFailure # Was: Pass
-redirecting_factory: TextSerializationFailure # Was: Pass
 redirecting_factory_typeargs_test: TextSerializationFailure # Was: Pass
-redirecting_factory_typeparambounds_test: TextSerializationFailure # Was: Pass
 redirecting_factory_typeparam_test: TextSerializationFailure # Was: Pass
+redirecting_factory_typeparambounds_test: TextSerializationFailure # Was: Pass
 redirecting_initializer_arguments_assignable_test: TextSerializationFailure # Was: Pass
 redirecting_initializer_arguments_test: TextSerializationFailure # Was: Pass
-redirection_chain_type_arguments_subst: TextSerializationFailure # Was: Pass
 redirection_chain_type_arguments: TextSerializationFailure # Was: Pass
+redirection_chain_type_arguments_subst: TextSerializationFailure # Was: Pass
 redirection_type_arguments: TextSerializationFailure # Was: Pass
 regress/issue_29937: TextSerializationFailure # Was: Pass
 regress/issue_29940: TextSerializationFailure # Was: Pass
 regress/issue_29941: TextSerializationFailure # Was: Pass
 regress/issue_29942: TextSerializationFailure # Was: Pass
+regress/issue_29943: TextSerializationFailure
 regress/issue_29944: TextSerializationFailure # Was: Pass
-regress/issue_29976: RuntimeError # Tests runtime behavior of error recovery.
+regress/issue_29945: TextSerializationFailure
+regress/issue_29975: TextSerializationFailure
+regress/issue_29976: TextSerializationFailure # Was:  RuntimeError # Tests runtime behavior of error recovery.
+regress/issue_29977: TextSerializationFailure
 regress/issue_29978: TextSerializationFailure # Was: Pass
 regress/issue_29979: TextSerializationFailure # Was: Pass
+regress/issue_29980: TextSerializationFailure
 regress/issue_29981: TextSerializationFailure # Was: Pass
 regress/issue_29982: TextSerializationFailure # Was: RuntimeError # Tests runtime behavior of error recovery.
 regress/issue_29983: TextSerializationFailure # Was: Pass
 regress/issue_29984: TextSerializationFailure # Was: Pass
+regress/issue_29985: TextSerializationFailure
+regress/issue_29986: TextSerializationFailure
+regress/issue_29987: TextSerializationFailure
 regress/issue_30834: TextSerializationFailure # Was: Pass
 regress/issue_30836: TextSerializationFailure # Was: RuntimeError # Issue 30836.
 regress/issue_30838: TextSerializationFailure # Was: Pass
 regress/issue_30981: TextSerializationFailure # Was: Pass
+regress/issue_30994: TextSerializationFailure
 regress/issue_31155: TextSerializationFailure # Was: Pass
+regress/issue_31157: TextSerializationFailure
 regress/issue_31171: TextSerializationFailure # Was: Pass
+regress/issue_31180: TextSerializationFailure
 regress/issue_31181: TextSerializationFailure # Was: Pass
 regress/issue_31183: TextSerializationFailure # Was: Pass
 regress/issue_31184: TextSerializationFailure # Was: Pass
 regress/issue_31185: TextSerializationFailure # Was: Pass
+regress/issue_31186: TextSerializationFailure
+regress/issue_31187: TextSerializationFailure
+regress/issue_31188: TextSerializationFailure
 regress/issue_31190: TextSerializationFailure # Was: Pass
 regress/issue_31192: TextSerializationFailure # Was: Pass
 regress/issue_31198: TextSerializationFailure # Was: Pass
@@ -870,12 +901,12 @@
 regress/issue_33452: TextSerializationFailure # Was: RuntimeError # Test has an intentional error
 regress/issue_33672: TextSerializationFailure # Was: Pass
 regress/issue_34225: TextSerializationFailure # Was: RuntimeError
-regress/issue_34291_lib: TextSerializationFailure # Was: Pass
 regress/issue_34291: TextSerializationFailure # Was: Pass
-regress/issue_34403_lib: TextSerializationFailure # Was: Pass
+regress/issue_34291_lib: TextSerializationFailure # Was: Pass
 regress/issue_34403: TextSerializationFailure # Was: Pass
-regress/issue_34498_lib: TextSerializationFailure # Was: Pass
+regress/issue_34403_lib: TextSerializationFailure # Was: Pass
 regress/issue_34498: TextSerializationFailure # Was: Pass
+regress/issue_34498_lib: TextSerializationFailure # Was: Pass
 regress/issue_34563: TextSerializationFailure # Was: RuntimeError # Test execution after recovery
 regress/issue_34610: TextSerializationFailure # Was: Pass
 regress/issue_34614: TextSerializationFailure # Was: Pass
@@ -887,38 +918,40 @@
 regress/issue_35259: TextSerializationFailure # Was: RuntimeError # Expected
 regress/issue_35260: TextSerializationFailure # Was: RuntimeError # Expected
 regress/issue_35266: TextSerializationFailure # Was: RuntimeError # Expected
+regress/issue_35900: TextSerializationFailure
+regress/issue_36400: TextSerializationFailure
 reject_generic_function_types_in_bounds: TextSerializationFailure # Was: RuntimeError # Expected
 return_with_unknown_type_in_context: TextSerializationFailure # Was: Pass
+runtime_checks/call_kinds: TextSerializationFailure # Was: Pass
 runtime_checks/call_kinds_get: TextSerializationFailure # Was: Pass
 runtime_checks/call_kinds_set: TextSerializationFailure # Was: Pass
-runtime_checks/call_kinds: TextSerializationFailure # Was: Pass
-runtime_checks/call_method_implicit_tear_off_future_or: TextSerializationFailure # Was: Pass
 runtime_checks/call_method_implicit_tear_off: TextSerializationFailure # Was: Pass
+runtime_checks/call_method_implicit_tear_off_future_or: TextSerializationFailure # Was: Pass
 runtime_checks/contravariant_field: TextSerializationFailure # Was: Pass
 runtime_checks/contravariant_generic_method_type_parameter: TextSerializationFailure # Was: Pass
+runtime_checks/contravariant_generic_return: TextSerializationFailure # Was: Pass
 runtime_checks/contravariant_generic_return_null_aware: TextSerializationFailure # Was: Pass
 runtime_checks/contravariant_generic_return_tear_off: TextSerializationFailure # Was: Pass
-runtime_checks/contravariant_generic_return: TextSerializationFailure # Was: Pass
-runtime_checks/contravariant_getter_return_null_aware: TextSerializationFailure # Was: Pass
-runtime_checks/contravariant_getter_return: TextSerializationFailure # Was: Pass
 runtime_checks/contravariant_getter: TextSerializationFailure # Was: Pass
+runtime_checks/contravariant_getter_return: TextSerializationFailure # Was: Pass
+runtime_checks/contravariant_getter_return_null_aware: TextSerializationFailure # Was: Pass
 runtime_checks/covariant_generic_method_type_parameter: TextSerializationFailure # Was: Pass
-runtime_checks/covariant_generic_parameter_complex: TextSerializationFailure # Was: Pass
-runtime_checks/covariant_generic_parameter_in_interface_mixin: TextSerializationFailure # Was: Pass
-runtime_checks/covariant_generic_parameter_in_interface_super_mixin: TextSerializationFailure # Was: Pass
-runtime_checks/covariant_generic_parameter_in_interface_super: TextSerializationFailure # Was: Pass
-runtime_checks/covariant_generic_parameter_in_interface: TextSerializationFailure # Was: Pass
-runtime_checks/covariant_generic_parameter_tear_off: TextSerializationFailure # Was: Pass
 runtime_checks/covariant_generic_parameter: TextSerializationFailure # Was: Pass
-runtime_checks/covariant_keyword_field_inherited_by_setter: TextSerializationFailure # Was: Pass
-runtime_checks/covariant_keyword_field: TextSerializationFailure # Was: Pass
-runtime_checks/covariant_keyword_setter_inherited_by_field: TextSerializationFailure # Was: Pass
-runtime_checks/covariant_keyword_setter: TextSerializationFailure # Was: Pass
+runtime_checks/covariant_generic_parameter_complex: TextSerializationFailure # Was: Pass
+runtime_checks/covariant_generic_parameter_in_interface: TextSerializationFailure # Was: Pass
+runtime_checks/covariant_generic_parameter_in_interface_mixin: TextSerializationFailure # Was: Pass
+runtime_checks/covariant_generic_parameter_in_interface_super: TextSerializationFailure # Was: Pass
+runtime_checks/covariant_generic_parameter_in_interface_super_mixin: TextSerializationFailure # Was: Pass
+runtime_checks/covariant_generic_parameter_tear_off: TextSerializationFailure # Was: Pass
 runtime_checks/covariant_keyword: TextSerializationFailure # Was: Pass
+runtime_checks/covariant_keyword_field: TextSerializationFailure # Was: Pass
+runtime_checks/covariant_keyword_field_inherited_by_setter: TextSerializationFailure # Was: Pass
+runtime_checks/covariant_keyword_setter: TextSerializationFailure # Was: Pass
+runtime_checks/covariant_keyword_setter_inherited_by_field: TextSerializationFailure # Was: Pass
 runtime_checks/covariant_setter: TextSerializationFailure # Was: Pass
+runtime_checks/dynamic_invocation: TextSerializationFailure # Was: Pass
 runtime_checks/dynamic_invocation_generic: TextSerializationFailure # Was: Pass
 runtime_checks/dynamic_invocation_of_getter: TextSerializationFailure # Was: Pass
-runtime_checks/dynamic_invocation: TextSerializationFailure # Was: Pass
 runtime_checks/field_forwarding_stub_generic_covariant: TextSerializationFailure # Was: Pass
 runtime_checks/forwarding_stub_with_default_values: TextSerializationFailure # Was: Pass
 runtime_checks/forwarding_stub_with_non_covariant_param: TextSerializationFailure # Was: Pass
@@ -950,15 +983,16 @@
 runtime_checks_new/mixin_forwarding_stub_setter: TypeCheckError
 runtime_checks_new/stub_checked_via_target: TextSerializationFailure # Was: Pass
 runtime_checks_new/stub_from_interface_contravariant_from_class: TextSerializationFailure # Was: Pass
-runtime_checks_new/stub_from_interface_covariant_from_interface: TextSerializationFailure # Was: Pass
-runtime_checks_new/stub_from_interface_covariant_from_super: TextSerializationFailure # Was: Pass
 runtime_checks_new/stub_from_interface_covariantImpl_from_class: TextSerializationFailure # Was: Pass
 runtime_checks_new/stub_from_interface_covariantImpl_from_interface: TextSerializationFailure # Was: Pass
 runtime_checks_new/stub_from_interface_covariantImpl_from_super: TextSerializationFailure # Was: Pass
 runtime_checks_new/stub_from_interface_covariantInterface_from_class: TextSerializationFailure # Was: Pass
+runtime_checks_new/stub_from_interface_covariant_from_interface: TextSerializationFailure # Was: Pass
+runtime_checks_new/stub_from_interface_covariant_from_super: TextSerializationFailure # Was: Pass
 sdk_diagnostic: TextSerializationFailure
 set_literals/disambiguation_rule: TextSerializationFailure # Was: RuntimeError
 spread_collection: TextSerializationFailure # Should be fixed as part of implementing spread collection support
+spread_collection_inference: TextSerializationFailure # Should be fixed as part of implementing spread collection support
 statements: Crash
 static_setter: TextSerializationFailure # Was: Pass
 store_load: TextSerializationFailure # Was: Pass
@@ -966,16 +1000,16 @@
 super_call: TextSerializationFailure # Was: Pass
 super_nsm: TextSerializationFailure # Was: Pass
 tabs: TextSerializationFailure # Was: Pass
-top_level_accessors_part: TextSerializationFailure # Was: Pass
 top_level_accessors: TextSerializationFailure # Was: Pass
+top_level_accessors_part: TextSerializationFailure # Was: Pass
 top_level_library_method: TextSerializationFailure # Was: Pass
-typedef: TextSerializationFailure # Was: Pass
 type_of_null: TextSerializationFailure
 type_variable_as_super: TextSerializationFailure # Was: RuntimeError
 type_variable_prefix: TextSerializationFailure # Was: RuntimeError
 type_variable_uses: TextSerializationFailure # Was: Pass
-undefined_getter_in_compound_assignment: TextSerializationFailure # Was: Pass
+typedef: TextSerializationFailure # Was: Pass
 undefined: TextSerializationFailure # Was: Pass
+undefined_getter_in_compound_assignment: TextSerializationFailure # Was: Pass
 uninitialized_fields: TextSerializationFailure # Was: Pass
 unsound_promotion: TextSerializationFailure
 unused_methods: TextSerializationFailure # Was: Pass
diff --git a/pkg/front_end/testcases/type_variable_prefix.dart.strong.expect b/pkg/front_end/testcases/type_variable_prefix.dart.strong.expect
index 1ca7685..019571a 100644
--- a/pkg/front_end/testcases/type_variable_prefix.dart.strong.expect
+++ b/pkg/front_end/testcases/type_variable_prefix.dart.strong.expect
@@ -6,16 +6,6 @@
 //   T.String method() => "Hello, World!";
 //   ^^^^^^^^
 //
-// pkg/front_end/testcases/type_variable_prefix.dart:8:24: Error: A value of type 'String' can't be assigned to a variable of type 'invalid-type'.
-// Try changing the type of the left hand side, or casting the right hand side to 'invalid-type'.
-//   T.String method() => "Hello, World!";
-//                        ^
-//
-// pkg/front_end/testcases/type_variable_prefix.dart:12:24: Error: A value of type 'invalid-type' can't be assigned to a variable of type 'String'.
-// Try changing the type of the left hand side, or casting the right hand side to 'String'.
-//   T.String s = new C().method();
-//                        ^
-//
 import self as self;
 import "dart:core" as core;
 
@@ -26,15 +16,9 @@
     : super core::Object::•()
     ;
   method method() → invalid-type
-    return let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/type_variable_prefix.dart:8:24: Error: A value of type 'String' can't be assigned to a variable of type 'invalid-type'.
-Try changing the type of the left hand side, or casting the right hand side to 'invalid-type'.
-  T.String method() => \"Hello, World!\";
-                       ^" in "Hello, World!" as{TypeError} invalid-type;
+    return "Hello, World!" as{TypeError} invalid-type;
 }
 static method main() → dynamic {
-  core::String s = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/type_variable_prefix.dart:12:24: Error: A value of type 'invalid-type' can't be assigned to a variable of type 'String'.
-Try changing the type of the left hand side, or casting the right hand side to 'String'.
-  T.String s = new C().method();
-                       ^" in new self::C::•<dynamic>().{self::C::method}() as{TypeError} core::String;
+  core::String s = new self::C::•<dynamic>().{self::C::method}() as{TypeError} core::String;
   core::print(s);
 }
diff --git a/pkg/front_end/testcases/type_variable_prefix.dart.strong.transformed.expect b/pkg/front_end/testcases/type_variable_prefix.dart.strong.transformed.expect
index 1ca7685..019571a 100644
--- a/pkg/front_end/testcases/type_variable_prefix.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/type_variable_prefix.dart.strong.transformed.expect
@@ -6,16 +6,6 @@
 //   T.String method() => "Hello, World!";
 //   ^^^^^^^^
 //
-// pkg/front_end/testcases/type_variable_prefix.dart:8:24: Error: A value of type 'String' can't be assigned to a variable of type 'invalid-type'.
-// Try changing the type of the left hand side, or casting the right hand side to 'invalid-type'.
-//   T.String method() => "Hello, World!";
-//                        ^
-//
-// pkg/front_end/testcases/type_variable_prefix.dart:12:24: Error: A value of type 'invalid-type' can't be assigned to a variable of type 'String'.
-// Try changing the type of the left hand side, or casting the right hand side to 'String'.
-//   T.String s = new C().method();
-//                        ^
-//
 import self as self;
 import "dart:core" as core;
 
@@ -26,15 +16,9 @@
     : super core::Object::•()
     ;
   method method() → invalid-type
-    return let final<BottomType> #t1 = invalid-expression "pkg/front_end/testcases/type_variable_prefix.dart:8:24: Error: A value of type 'String' can't be assigned to a variable of type 'invalid-type'.
-Try changing the type of the left hand side, or casting the right hand side to 'invalid-type'.
-  T.String method() => \"Hello, World!\";
-                       ^" in "Hello, World!" as{TypeError} invalid-type;
+    return "Hello, World!" as{TypeError} invalid-type;
 }
 static method main() → dynamic {
-  core::String s = let final<BottomType> #t2 = invalid-expression "pkg/front_end/testcases/type_variable_prefix.dart:12:24: Error: A value of type 'invalid-type' can't be assigned to a variable of type 'String'.
-Try changing the type of the left hand side, or casting the right hand side to 'String'.
-  T.String s = new C().method();
-                       ^" in new self::C::•<dynamic>().{self::C::method}() as{TypeError} core::String;
+  core::String s = new self::C::•<dynamic>().{self::C::method}() as{TypeError} core::String;
   core::print(s);
 }
diff --git a/pkg/front_end/testcases/undefined.dart b/pkg/front_end/testcases/undefined.dart
index d94de88..6e2fc23 100644
--- a/pkg/front_end/testcases/undefined.dart
+++ b/pkg/front_end/testcases/undefined.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.
 
-/*@testedFeatures=error*/
-
 class C {
   var x;
   void f() {}
@@ -11,11 +9,11 @@
 
 void test(C c) {
   c.x;
-  c. /*@error=UndefinedGetter*/ y;
+  c.y;
   c.f();
-  c. /*@error=UndefinedMethod*/ g();
+  c.g();
   c.x = null;
-  c. /*@error=UndefinedSetter*/ y = null;
+  c.y = null;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/undefined.dart.strong.expect b/pkg/front_end/testcases/undefined.dart.strong.expect
index acd6f2d..cf77098 100644
--- a/pkg/front_end/testcases/undefined.dart.strong.expect
+++ b/pkg/front_end/testcases/undefined.dart.strong.expect
@@ -2,23 +2,23 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/undefined.dart:14:33: Error: The getter 'y' isn't defined for the class 'C'.
+// pkg/front_end/testcases/undefined.dart:12:5: Error: The getter 'y' isn't defined for the class 'C'.
 //  - 'C' is from 'pkg/front_end/testcases/undefined.dart'.
 // Try correcting the name to the name of an existing getter, or defining a getter or field named 'y'.
-//   c. /*@error=UndefinedGetter*/ y;
-//                                 ^
+//   c.y;
+//     ^
 //
-// pkg/front_end/testcases/undefined.dart:16:33: Error: The method 'g' isn't defined for the class 'C'.
+// pkg/front_end/testcases/undefined.dart:14:5: Error: The method 'g' isn't defined for the class 'C'.
 //  - 'C' is from 'pkg/front_end/testcases/undefined.dart'.
 // Try correcting the name to the name of an existing method, or defining a method named 'g'.
-//   c. /*@error=UndefinedMethod*/ g();
-//                                 ^
+//   c.g();
+//     ^
 //
-// pkg/front_end/testcases/undefined.dart:18:33: Error: The setter 'y' isn't defined for the class 'C'.
+// pkg/front_end/testcases/undefined.dart:16:5: Error: The setter 'y' isn't defined for the class 'C'.
 //  - 'C' is from 'pkg/front_end/testcases/undefined.dart'.
 // Try correcting the name to the name of an existing setter, or defining a setter or field named 'y'.
-//   c. /*@error=UndefinedSetter*/ y = null;
-//                                 ^
+//   c.y = null;
+//     ^
 //
 import self as self;
 import "dart:core" as core;
@@ -32,22 +32,22 @@
 }
 static method test(self::C c) → void {
   c.{self::C::x};
-  invalid-expression "pkg/front_end/testcases/undefined.dart:14:33: Error: The getter 'y' isn't defined for the class 'C'.
+  invalid-expression "pkg/front_end/testcases/undefined.dart:12:5: Error: The getter 'y' isn't defined for the class 'C'.
  - 'C' is from 'pkg/front_end/testcases/undefined.dart'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'y'.
-  c. /*@error=UndefinedGetter*/ y;
-                                ^";
+  c.y;
+    ^";
   c.{self::C::f}();
-  invalid-expression "pkg/front_end/testcases/undefined.dart:16:33: Error: The method 'g' isn't defined for the class 'C'.
+  invalid-expression "pkg/front_end/testcases/undefined.dart:14:5: Error: The method 'g' isn't defined for the class 'C'.
  - 'C' is from 'pkg/front_end/testcases/undefined.dart'.
 Try correcting the name to the name of an existing method, or defining a method named 'g'.
-  c. /*@error=UndefinedMethod*/ g();
-                                ^";
+  c.g();
+    ^";
   c.{self::C::x} = null;
-  invalid-expression "pkg/front_end/testcases/undefined.dart:18:33: Error: The setter 'y' isn't defined for the class 'C'.
+  invalid-expression "pkg/front_end/testcases/undefined.dart:16:5: Error: The setter 'y' isn't defined for the class 'C'.
  - 'C' is from 'pkg/front_end/testcases/undefined.dart'.
 Try correcting the name to the name of an existing setter, or defining a setter or field named 'y'.
-  c. /*@error=UndefinedSetter*/ y = null;
-                                ^";
+  c.y = null;
+    ^";
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/undefined.dart.strong.transformed.expect b/pkg/front_end/testcases/undefined.dart.strong.transformed.expect
index acd6f2d..cf77098 100644
--- a/pkg/front_end/testcases/undefined.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/undefined.dart.strong.transformed.expect
@@ -2,23 +2,23 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/undefined.dart:14:33: Error: The getter 'y' isn't defined for the class 'C'.
+// pkg/front_end/testcases/undefined.dart:12:5: Error: The getter 'y' isn't defined for the class 'C'.
 //  - 'C' is from 'pkg/front_end/testcases/undefined.dart'.
 // Try correcting the name to the name of an existing getter, or defining a getter or field named 'y'.
-//   c. /*@error=UndefinedGetter*/ y;
-//                                 ^
+//   c.y;
+//     ^
 //
-// pkg/front_end/testcases/undefined.dart:16:33: Error: The method 'g' isn't defined for the class 'C'.
+// pkg/front_end/testcases/undefined.dart:14:5: Error: The method 'g' isn't defined for the class 'C'.
 //  - 'C' is from 'pkg/front_end/testcases/undefined.dart'.
 // Try correcting the name to the name of an existing method, or defining a method named 'g'.
-//   c. /*@error=UndefinedMethod*/ g();
-//                                 ^
+//   c.g();
+//     ^
 //
-// pkg/front_end/testcases/undefined.dart:18:33: Error: The setter 'y' isn't defined for the class 'C'.
+// pkg/front_end/testcases/undefined.dart:16:5: Error: The setter 'y' isn't defined for the class 'C'.
 //  - 'C' is from 'pkg/front_end/testcases/undefined.dart'.
 // Try correcting the name to the name of an existing setter, or defining a setter or field named 'y'.
-//   c. /*@error=UndefinedSetter*/ y = null;
-//                                 ^
+//   c.y = null;
+//     ^
 //
 import self as self;
 import "dart:core" as core;
@@ -32,22 +32,22 @@
 }
 static method test(self::C c) → void {
   c.{self::C::x};
-  invalid-expression "pkg/front_end/testcases/undefined.dart:14:33: Error: The getter 'y' isn't defined for the class 'C'.
+  invalid-expression "pkg/front_end/testcases/undefined.dart:12:5: Error: The getter 'y' isn't defined for the class 'C'.
  - 'C' is from 'pkg/front_end/testcases/undefined.dart'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'y'.
-  c. /*@error=UndefinedGetter*/ y;
-                                ^";
+  c.y;
+    ^";
   c.{self::C::f}();
-  invalid-expression "pkg/front_end/testcases/undefined.dart:16:33: Error: The method 'g' isn't defined for the class 'C'.
+  invalid-expression "pkg/front_end/testcases/undefined.dart:14:5: Error: The method 'g' isn't defined for the class 'C'.
  - 'C' is from 'pkg/front_end/testcases/undefined.dart'.
 Try correcting the name to the name of an existing method, or defining a method named 'g'.
-  c. /*@error=UndefinedMethod*/ g();
-                                ^";
+  c.g();
+    ^";
   c.{self::C::x} = null;
-  invalid-expression "pkg/front_end/testcases/undefined.dart:18:33: Error: The setter 'y' isn't defined for the class 'C'.
+  invalid-expression "pkg/front_end/testcases/undefined.dart:16:5: Error: The setter 'y' isn't defined for the class 'C'.
  - 'C' is from 'pkg/front_end/testcases/undefined.dart'.
 Try correcting the name to the name of an existing setter, or defining a setter or field named 'y'.
-  c. /*@error=UndefinedSetter*/ y = null;
-                                ^";
+  c.y = null;
+    ^";
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart b/pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart
index 1da15ad..c6b5b4d 100644
--- a/pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart
+++ b/pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart
@@ -2,16 +2,14 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=error*/
-
 class C {
   void set x(value) {}
 }
 
 void test(C c) {
   c.x = 1; // Ok
-  c. /*@error=UndefinedGetter*/ x += 1;
-  c. /*@error=UndefinedGetter*/ x ??= 1;
+  c.x += 1;
+  c.x ??= 1;
 }
 
 main() {}
diff --git a/pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart.strong.expect b/pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart.strong.expect
index a86da13..35fb71c 100644
--- a/pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart.strong.expect
+++ b/pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart.strong.expect
@@ -2,17 +2,17 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart:13:33: Error: The getter 'x' isn't defined for the class 'C'.
+// pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart:11:5: Error: The getter 'x' isn't defined for the class 'C'.
 //  - 'C' is from 'pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart'.
 // Try correcting the name to the name of an existing getter, or defining a getter or field named 'x'.
-//   c. /*@error=UndefinedGetter*/ x += 1;
-//                                 ^
+//   c.x += 1;
+//     ^
 //
-// pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart:14:33: Error: The getter 'x' isn't defined for the class 'C'.
+// pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart:12:5: Error: The getter 'x' isn't defined for the class 'C'.
 //  - 'C' is from 'pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart'.
 // Try correcting the name to the name of an existing getter, or defining a getter or field named 'x'.
-//   c. /*@error=UndefinedGetter*/ x ??= 1;
-//                                 ^
+//   c.x ??= 1;
+//     ^
 //
 import self as self;
 import "dart:core" as core;
@@ -25,15 +25,15 @@
 }
 static method test(self::C c) → void {
   c.{self::C::x} = 1;
-  let final self::C #t1 = c in #t1.{self::C::x} = invalid-expression "pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart:13:33: Error: The getter 'x' isn't defined for the class 'C'.
+  let final self::C #t1 = c in #t1.{self::C::x} = invalid-expression "pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart:11:5: Error: The getter 'x' isn't defined for the class 'C'.
  - 'C' is from 'pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'x'.
-  c. /*@error=UndefinedGetter*/ x += 1;
-                                ^".+(1);
-  let final self::C #t2 = c in invalid-expression "pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart:14:33: Error: The getter 'x' isn't defined for the class 'C'.
+  c.x += 1;
+    ^".+(1);
+  let final self::C #t2 = c in invalid-expression "pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart:12:5: Error: The getter 'x' isn't defined for the class 'C'.
  - 'C' is from 'pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'x'.
-  c. /*@error=UndefinedGetter*/ x ??= 1;
-                                ^".{core::Object::==}(null) ?{dynamic} #t2.{self::C::x} = 1 : null;
+  c.x ??= 1;
+    ^".{core::Object::==}(null) ?{dynamic} #t2.{self::C::x} = 1 : null;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart.strong.transformed.expect b/pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart.strong.transformed.expect
index a86da13..35fb71c 100644
--- a/pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart.strong.transformed.expect
@@ -2,17 +2,17 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart:13:33: Error: The getter 'x' isn't defined for the class 'C'.
+// pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart:11:5: Error: The getter 'x' isn't defined for the class 'C'.
 //  - 'C' is from 'pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart'.
 // Try correcting the name to the name of an existing getter, or defining a getter or field named 'x'.
-//   c. /*@error=UndefinedGetter*/ x += 1;
-//                                 ^
+//   c.x += 1;
+//     ^
 //
-// pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart:14:33: Error: The getter 'x' isn't defined for the class 'C'.
+// pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart:12:5: Error: The getter 'x' isn't defined for the class 'C'.
 //  - 'C' is from 'pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart'.
 // Try correcting the name to the name of an existing getter, or defining a getter or field named 'x'.
-//   c. /*@error=UndefinedGetter*/ x ??= 1;
-//                                 ^
+//   c.x ??= 1;
+//     ^
 //
 import self as self;
 import "dart:core" as core;
@@ -25,15 +25,15 @@
 }
 static method test(self::C c) → void {
   c.{self::C::x} = 1;
-  let final self::C #t1 = c in #t1.{self::C::x} = invalid-expression "pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart:13:33: Error: The getter 'x' isn't defined for the class 'C'.
+  let final self::C #t1 = c in #t1.{self::C::x} = invalid-expression "pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart:11:5: Error: The getter 'x' isn't defined for the class 'C'.
  - 'C' is from 'pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'x'.
-  c. /*@error=UndefinedGetter*/ x += 1;
-                                ^".+(1);
-  let final self::C #t2 = c in invalid-expression "pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart:14:33: Error: The getter 'x' isn't defined for the class 'C'.
+  c.x += 1;
+    ^".+(1);
+  let final self::C #t2 = c in invalid-expression "pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart:12:5: Error: The getter 'x' isn't defined for the class 'C'.
  - 'C' is from 'pkg/front_end/testcases/undefined_getter_in_compound_assignment.dart'.
 Try correcting the name to the name of an existing getter, or defining a getter or field named 'x'.
-  c. /*@error=UndefinedGetter*/ x ??= 1;
-                                ^".{core::Object::==}(null) ?{dynamic} #t2.{self::C::x} = 1 : null;
+  c.x ??= 1;
+    ^".{core::Object::==}(null) ?{dynamic} #t2.{self::C::x} = 1 : null;
 }
 static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/warn_unresolved_sends.dart b/pkg/front_end/testcases/warn_unresolved_sends.dart
index a5be7f4..9591e28 100644
--- a/pkg/front_end/testcases/warn_unresolved_sends.dart
+++ b/pkg/front_end/testcases/warn_unresolved_sends.dart
@@ -2,7 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*@testedFeatures=warning*/
 class C {
   var superField;
   superMethod() {}
diff --git a/pkg/front_end/testcases/warn_unresolved_sends.dart.legacy.expect b/pkg/front_end/testcases/warn_unresolved_sends.dart.legacy.expect
index 6a98a24..a170b83 100644
--- a/pkg/front_end/testcases/warn_unresolved_sends.dart.legacy.expect
+++ b/pkg/front_end/testcases/warn_unresolved_sends.dart.legacy.expect
@@ -2,27 +2,27 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/warn_unresolved_sends.dart:49:39: Warning: Getter not found: 'missingField'.
+// pkg/front_end/testcases/warn_unresolved_sends.dart:48:39: Warning: Getter not found: 'missingField'.
 //     this. /*@warning=GetterNotFound*/ missingField;
 //                                       ^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/warn_unresolved_sends.dart:50:39: Warning: Setter not found: 'missingField'.
+// pkg/front_end/testcases/warn_unresolved_sends.dart:49:39: Warning: Setter not found: 'missingField'.
 //     this. /*@warning=SetterNotFound*/ missingField = 0;
 //                                       ^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/warn_unresolved_sends.dart:51:39: Warning: Method not found: 'missingMethod'.
+// pkg/front_end/testcases/warn_unresolved_sends.dart:50:39: Warning: Method not found: 'missingMethod'.
 //     this. /*@warning=MethodNotFound*/ missingMethod();
 //                                       ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/warn_unresolved_sends.dart:53:33: Warning: Getter not found: 'missingField'.
+// pkg/front_end/testcases/warn_unresolved_sends.dart:52:33: Warning: Getter not found: 'missingField'.
 //     /*@warning=GetterNotFound*/ missingField;
 //                                 ^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/warn_unresolved_sends.dart:54:33: Warning: Setter not found: 'missingField'.
+// pkg/front_end/testcases/warn_unresolved_sends.dart:53:33: Warning: Setter not found: 'missingField'.
 //     /*@warning=SetterNotFound*/ missingField = 0;
 //                                 ^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/warn_unresolved_sends.dart:55:33: Warning: Method not found: 'missingMethod'.
+// pkg/front_end/testcases/warn_unresolved_sends.dart:54:33: Warning: Method not found: 'missingMethod'.
 //     /*@warning=MethodNotFound*/ missingMethod();
 //                                 ^^^^^^^^^^^^^
 //
diff --git a/pkg/front_end/testcases/warn_unresolved_sends.dart.legacy.transformed.expect b/pkg/front_end/testcases/warn_unresolved_sends.dart.legacy.transformed.expect
index 6a98a24..a170b83 100644
--- a/pkg/front_end/testcases/warn_unresolved_sends.dart.legacy.transformed.expect
+++ b/pkg/front_end/testcases/warn_unresolved_sends.dart.legacy.transformed.expect
@@ -2,27 +2,27 @@
 //
 // Problems in library:
 //
-// pkg/front_end/testcases/warn_unresolved_sends.dart:49:39: Warning: Getter not found: 'missingField'.
+// pkg/front_end/testcases/warn_unresolved_sends.dart:48:39: Warning: Getter not found: 'missingField'.
 //     this. /*@warning=GetterNotFound*/ missingField;
 //                                       ^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/warn_unresolved_sends.dart:50:39: Warning: Setter not found: 'missingField'.
+// pkg/front_end/testcases/warn_unresolved_sends.dart:49:39: Warning: Setter not found: 'missingField'.
 //     this. /*@warning=SetterNotFound*/ missingField = 0;
 //                                       ^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/warn_unresolved_sends.dart:51:39: Warning: Method not found: 'missingMethod'.
+// pkg/front_end/testcases/warn_unresolved_sends.dart:50:39: Warning: Method not found: 'missingMethod'.
 //     this. /*@warning=MethodNotFound*/ missingMethod();
 //                                       ^^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/warn_unresolved_sends.dart:53:33: Warning: Getter not found: 'missingField'.
+// pkg/front_end/testcases/warn_unresolved_sends.dart:52:33: Warning: Getter not found: 'missingField'.
 //     /*@warning=GetterNotFound*/ missingField;
 //                                 ^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/warn_unresolved_sends.dart:54:33: Warning: Setter not found: 'missingField'.
+// pkg/front_end/testcases/warn_unresolved_sends.dart:53:33: Warning: Setter not found: 'missingField'.
 //     /*@warning=SetterNotFound*/ missingField = 0;
 //                                 ^^^^^^^^^^^^
 //
-// pkg/front_end/testcases/warn_unresolved_sends.dart:55:33: Warning: Method not found: 'missingMethod'.
+// pkg/front_end/testcases/warn_unresolved_sends.dart:54:33: Warning: Method not found: 'missingMethod'.
 //     /*@warning=MethodNotFound*/ missingMethod();
 //                                 ^^^^^^^^^^^^^
 //
diff --git a/pkg/front_end/testing.json b/pkg/front_end/testing.json
index 6dd8999..a1457fc 100644
--- a/pkg/front_end/testing.json
+++ b/pkg/front_end/testing.json
@@ -299,7 +299,7 @@
       "mode": "release",
       "common": "--dart2js-batch --time -pcolor --report -ax64 -mrelease --write-result-log",
       "command-lines": [
-        "-cdart2js -rd8 --use-sdk --minified --dart2js-with-kernel language language_2 dart2js_extra dart2js_native corelib corelib_2"
+        "-cdart2js -rd8 --use-sdk --minified language language_2 dart2js_extra dart2js_native corelib corelib_2"
       ]
     },
 
diff --git a/pkg/front_end/tool/_fasta/bench_maker.dart b/pkg/front_end/tool/_fasta/bench_maker.dart
new file mode 100644
index 0000000..a8683a9
--- /dev/null
+++ b/pkg/front_end/tool/_fasta/bench_maker.dart
@@ -0,0 +1,314 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library fasta.tool.entry_points;
+
+import "dart:convert" show JsonEncoder;
+
+import "dart:io" show File;
+
+import "package:kernel/ast.dart" hide MapEntry;
+
+import "package:front_end/src/fasta/type_inference/type_schema.dart"
+    show UnknownType;
+
+String jsonEncode(Object object) {
+  return const JsonEncoder.withIndent("  ").convert(object);
+}
+
+Iterable<String> nameGenerator() sync* {
+  int i = 0;
+  while (true) {
+    List<int> characters = <int>[];
+    int j = i;
+    while (j > 25) {
+      int c = j % 26;
+      j = (j ~/ 26) - 1;
+      characters.add(c + 65);
+    }
+    characters.add(j + 65);
+    yield new String.fromCharCodes(characters.reversed);
+    i++;
+  }
+}
+
+class BenchMaker implements DartTypeVisitor1<void, StringBuffer> {
+  final List<Object> checks = <Object>[];
+
+  final Map<TreeNode, String> nodeNames = <TreeNode, String>{};
+
+  final Set<String> usedNames = new Set<String>();
+
+  final Iterator<String> names = nameGenerator().iterator..moveNext();
+
+  final List<String> classes = <String>[];
+
+  final List<TypeParameter> usedTypeParameters = <TypeParameter>[];
+
+  String serializeTypeChecks(List<Object> typeChecks) {
+    for (List<Object> list in typeChecks) {
+      writeTypeCheck(list[0], list[1], list[2]);
+    }
+    writeClasses();
+    return jsonEncode(this);
+  }
+
+  void writeTypeCheck(DartType s, DartType t, bool expected) {
+    assert(usedTypeParameters.isEmpty);
+    usedTypeParameters.clear();
+    StringBuffer sb = new StringBuffer();
+    s.accept1(this, sb);
+    String sString = "$sb";
+    sb.clear();
+    t.accept1(this, sb);
+    String tString = "$sb";
+    List<Object> arguments = <Object>[sString, tString];
+    Set<TypeParameter> seenTypeParameters = new Set<TypeParameter>();
+    List<String> parameterStrings = <String>[];
+    while (usedTypeParameters.isNotEmpty) {
+      List<TypeParameter> typeParameters = usedTypeParameters.toList();
+      usedTypeParameters.clear();
+      for (TypeParameter parameter in typeParameters) {
+        if (seenTypeParameters.add(parameter)) {
+          sb.clear();
+          writeTypeParameter(parameter, sb);
+          parameterStrings.add("$sb");
+        }
+      }
+    }
+    if (parameterStrings.isNotEmpty) {
+      arguments.add(parameterStrings);
+    }
+    checks.add(<String, dynamic>{
+      "kind": expected ? "isSubtype" : "isNotSubtype",
+      "arguments": arguments,
+    });
+  }
+
+  void writeTypeParameter(TypeParameter parameter, StringBuffer sb) {
+    sb.write(computeName(parameter));
+    DartType bound = parameter.bound;
+    DartType defaultType = parameter.defaultType;
+    bool hasExplicitBound = true;
+    if (bound is InterfaceType && defaultType is DynamicType) {
+      if (bound.classNode.supertype == null) {
+        hasExplicitBound = false;
+      }
+    }
+    if (hasExplicitBound) {
+      sb.write(" extends ");
+      bound.accept1(this, sb);
+    }
+  }
+
+  void writeTypeParameters(
+      List<TypeParameter> typeParameters, StringBuffer sb) {
+    if (typeParameters.isNotEmpty) {
+      sb.write("<");
+      bool first = true;
+      for (TypeParameter p in typeParameters) {
+        if (!first) sb.write(", ");
+        writeTypeParameter(p, sb);
+        first = false;
+      }
+      sb.write(">");
+    }
+  }
+
+  void writeClasses() {
+    Set<Class> writtenClasses = new Set<Class>();
+    int index = 0;
+    List<TreeNode> nodes = nodeNames.keys.toList();
+    while (index < nodes.length) {
+      for (; index < nodes.length; index++) {
+        TreeNode node = nodes[index];
+        if (node is Class) {
+          writeClass(node, writtenClasses);
+        }
+      }
+      nodes = nodeNames.keys.toList();
+    }
+  }
+
+  void writeClass(Class cls, Set<Class> writtenClasses) {
+    if (cls == null || !writtenClasses.add(cls)) return;
+    Supertype supertype = cls.supertype;
+    writeClass(supertype?.classNode, writtenClasses);
+    Supertype mixedInType = cls.mixedInType;
+    writeClass(mixedInType?.classNode, writtenClasses);
+    for (Supertype implementedType in cls.implementedTypes) {
+      writeClass(implementedType.classNode, writtenClasses);
+    }
+    StringBuffer sb = new StringBuffer();
+    sb.write("class ");
+    sb.write(computeName(cls));
+    writeTypeParameters(cls.typeParameters, sb);
+    if (supertype != null) {
+      sb.write(" extends ");
+      supertype.asInterfaceType.accept1(this, sb);
+    }
+    if (mixedInType != null) {
+      sb.write(" with ");
+      mixedInType.asInterfaceType.accept1(this, sb);
+    }
+    bool first = true;
+    for (Supertype implementedType in cls.implementedTypes) {
+      if (first) {
+        sb.write(" implements ");
+      } else {
+        sb.write(", ");
+      }
+      implementedType.asInterfaceType.accept1(this, sb);
+      first = false;
+    }
+    Procedure callOperator;
+    for (Procedure procedure in cls.procedures) {
+      if (procedure.name.name == "call") {
+        callOperator = procedure;
+      }
+    }
+    if (callOperator != null) {
+      sb.write("{ ");
+      callOperator.function.functionType.accept1(this, sb);
+      sb.write(" }");
+    } else {
+      sb.write(";");
+    }
+    classes.add("$sb");
+  }
+
+  String computeName(TreeNode node) {
+    String name = nodeNames[node];
+    if (name != null) return name;
+    if (node is Class) {
+      Library library = node.enclosingLibrary;
+      String uriString = "${library?.importUri}";
+      if (uriString == "dart:core" || uriString == "dart:async") {
+        if (!usedNames.add(node.name)) {
+          throw "Class name conflict for $node";
+        }
+        return nodeNames[node] = node.name;
+      }
+    }
+    while (!usedNames.add(name = names.current)) {
+      names.moveNext();
+    }
+    names.moveNext();
+    return nodeNames[node] = name;
+  }
+
+  @override
+  void defaultDartType(DartType node, StringBuffer sb) {
+    if (node is UnknownType) {
+      sb.write("?");
+    } else {
+      throw "Unsupported: ${node.runtimeType}";
+    }
+  }
+
+  @override
+  void visitInvalidType(InvalidType node, StringBuffer sb) {
+    throw "not implemented";
+  }
+
+  @override
+  void visitDynamicType(DynamicType node, StringBuffer sb) {
+    sb.write("dynamic");
+  }
+
+  @override
+  void visitVoidType(VoidType node, StringBuffer sb) {
+    sb.write("void");
+  }
+
+  @override
+  void visitBottomType(BottomType node, StringBuffer sb) {
+    sb.write("⊥");
+  }
+
+  @override
+  void visitInterfaceType(InterfaceType node, StringBuffer sb) {
+    sb.write(computeName(node.classNode));
+    if (node.typeArguments.isNotEmpty) {
+      sb.write("<");
+      bool first = true;
+      for (DartType type in node.typeArguments) {
+        if (!first) sb.write(", ");
+        type.accept1(this, sb);
+        first = false;
+      }
+      sb.write(">");
+    }
+  }
+
+  @override
+  void visitFunctionType(FunctionType node, StringBuffer sb) {
+    writeTypeParameters(node.typeParameters, sb);
+    sb.write("(");
+    bool first = true;
+    for (int i = 0; i < node.requiredParameterCount; i++) {
+      if (!first) sb.write(", ");
+      node.positionalParameters[i].accept1(this, sb);
+      first = false;
+    }
+    if (node.requiredParameterCount != node.positionalParameters.length) {
+      if (!first) sb.write(", ");
+      sb.write("[");
+      first = true;
+      for (int i = node.requiredParameterCount;
+          i < node.positionalParameters.length;
+          i++) {
+        if (!first) sb.write(", ");
+        node.positionalParameters[i].accept1(this, sb);
+        first = false;
+      }
+      sb.write("]");
+      first = false;
+    }
+    if (node.namedParameters.isNotEmpty) {
+      if (!first) sb.write(", ");
+      sb.write("{");
+      first = true;
+      for (NamedType named in node.namedParameters) {
+        if (!first) sb.write(", ");
+        named.type.accept1(this, sb);
+        sb.write(" ");
+        sb.write(named.name);
+        first = false;
+      }
+      sb.write("}");
+      first = false;
+    }
+    sb.write(") -> ");
+    node.returnType.accept1(this, sb);
+  }
+
+  @override
+  void visitTypeParameterType(TypeParameterType node, StringBuffer sb) {
+    String name = computeName(node.parameter);
+    usedTypeParameters.add(node.parameter);
+    sb.write(name);
+    if (node.promotedBound != null) {
+      sb.write(" & ");
+      node.promotedBound.accept1(this, sb);
+    }
+  }
+
+  @override
+  void visitTypedefType(TypedefType node, StringBuffer sb) {
+    throw "not implemented";
+  }
+
+  Map<String, dynamic> toJson() {
+    return <String, dynamic>{
+      "classes": classes,
+      "checks": checks,
+    };
+  }
+
+  static void writeTypeChecks(String filename, List<Object> typeChecks) {
+    new File(filename)
+        .writeAsString(new BenchMaker().serializeTypeChecks(typeChecks));
+  }
+}
diff --git a/pkg/front_end/tool/_fasta/command_line.dart b/pkg/front_end/tool/_fasta/command_line.dart
index 77987c1..ae7650d 100644
--- a/pkg/front_end/tool/_fasta/command_line.dart
+++ b/pkg/front_end/tool/_fasta/command_line.dart
@@ -40,6 +40,9 @@
 
 import 'package:front_end/src/fasta/problems.dart' show DebugAbort, unhandled;
 
+import 'package:front_end/src/fasta/resolve_input_uri.dart'
+    show resolveInputUri;
+
 import 'package:front_end/src/fasta/severity.dart' show Severity;
 
 import 'package:front_end/src/scheme_based_file_system.dart'
@@ -48,8 +51,6 @@
 import 'package:kernel/target/targets.dart'
     show Target, getTarget, TargetFlags, targets;
 
-import 'resolve_input_uri.dart' show resolveInputUri;
-
 class CommandLineProblem {
   final Message message;
 
@@ -250,6 +251,7 @@
   "--legacy": "--legacy-mode",
   "--legacy-mode": false,
   "--libraries-json": Uri,
+  "--no-defines": false,
   "--output": Uri,
   "--packages": Uri,
   "--platform": Uri,
@@ -258,6 +260,7 @@
   "--single-root-scheme": String,
   "--supermixin": true,
   "--target": String,
+  "--enable-asserts": false,
   "--verbose": false,
   "--verify": false,
   "-D": "<define>",
@@ -308,6 +311,10 @@
         "Valid targets are:\n  ${targets.keys.join("\n  ")}");
   }
 
+  final bool noDefines = options["--no-defines"];
+
+  final bool enableAsserts = options["--enable-asserts"];
+
   final bool verify = options["--verify"];
 
   final bool dumpIr = options["--dump-ir"];
@@ -371,6 +378,7 @@
           ..packagesFileUri = packages
           ..legacyMode = legacyMode
           ..target = target
+          ..enableAsserts = enableAsserts
           ..throwOnErrorsForDebugging = errorsAreFatal
           ..throwOnWarningsForDebugging = warningsAreFatal
           ..embedSourceText = !excludeSource
@@ -380,7 +388,7 @@
           ..verify = verify
           ..bytecode = bytecode
           ..experimentalFlags = experimentalFlags
-          ..environmentDefines = parsedArguments.defines,
+          ..environmentDefines = noDefines ? null : parsedArguments.defines,
         inputs: <Uri>[Uri.parse(arguments[0])],
         output: resolveInputUri(arguments[3]));
   } else if (arguments.isEmpty) {
@@ -407,6 +415,7 @@
     ..packagesFileUri = packages
     ..legacyMode = legacyMode
     ..target = target
+    ..enableAsserts = enableAsserts
     ..throwOnErrorsForDebugging = errorsAreFatal
     ..throwOnWarningsForDebugging = warningsAreFatal
     ..embedSourceText = !excludeSource
@@ -415,7 +424,7 @@
     ..verbose = verbose
     ..verify = verify
     ..experimentalFlags = experimentalFlags
-    ..environmentDefines = parsedArguments.defines;
+    ..environmentDefines = noDefines ? null : parsedArguments.defines;
 
   // TODO(ahe): What about chase dependencies?
 
diff --git a/pkg/front_end/tool/_fasta/entry_points.dart b/pkg/front_end/tool/_fasta/entry_points.dart
index c5dea7c..a3cd069 100644
--- a/pkg/front_end/tool/_fasta/entry_points.dart
+++ b/pkg/front_end/tool/_fasta/entry_points.dart
@@ -4,9 +4,9 @@
 
 library fasta.tool.entry_points;
 
-import 'dart:async' show Future, Stream;
+import 'dart:async' show Stream;
 
-import 'dart:convert' show jsonDecode, jsonEncode, LineSplitter, utf8;
+import 'dart:convert' show LineSplitter, jsonDecode, jsonEncode, utf8;
 
 import 'dart:io' show File, Platform, exitCode, stderr, stdin, stdout;
 
@@ -15,6 +15,8 @@
 
 import 'package:kernel/target/targets.dart' show Target, TargetFlags, getTarget;
 
+import 'package:kernel/type_environment.dart' show SubtypeTester;
+
 import 'package:vm/bytecode/gen_bytecode.dart' show generateBytecode;
 
 import 'package:front_end/src/api_prototype/compiler_options.dart'
@@ -49,6 +51,8 @@
 
 import 'additional_targets.dart' show installAdditionalTargets;
 
+import 'bench_maker.dart' show BenchMaker;
+
 import 'command_line.dart' show runProtectedFromAbort, withGlobalOptions;
 
 const bool summary = const bool.fromEnvironment("summary", defaultValue: false);
@@ -70,6 +74,10 @@
     stopwatch.stop();
 
     elapsedTimes.add(stopwatch.elapsedMilliseconds.toDouble());
+    List<Object> typeChecks = SubtypeTester.typeChecks;
+    if (typeChecks?.isNotEmpty ?? false) {
+      BenchMaker.writeTypeChecks("type_checks.json", typeChecks);
+    }
   }
 
   if (summary) {
diff --git a/pkg/front_end/tool/_fasta/resolve_input_uri_test.dart b/pkg/front_end/tool/_fasta/resolve_input_uri_test.dart
deleted file mode 100644
index e520fec..0000000
--- a/pkg/front_end/tool/_fasta/resolve_input_uri_test.dart
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:expect/expect.dart' show Expect;
-
-import 'resolve_input_uri.dart';
-
-test() {
-  // data URI scheme is supported by default'.
-  Expect.stringEquals('data', resolveInputUri('data:,foo').scheme);
-
-  // Custom Dart schemes are recognized by default.
-  Expect.stringEquals('dart', resolveInputUri('dart:foo').scheme);
-  Expect.stringEquals('package', resolveInputUri('package:foo').scheme);
-
-  // Unknown schemes are recognized by default.
-  Expect.stringEquals(
-      isWindows ? 'file' : 'c', resolveInputUri('c:/foo').scheme);
-  Expect.stringEquals('test', resolveInputUri('test:foo').scheme);
-  Expect.stringEquals(
-      'org-dartlang-foo', resolveInputUri('org-dartlang-foo:bar').scheme);
-  Expect.stringEquals('test', resolveInputUri('test:/foo').scheme);
-  Expect.stringEquals(
-      'org-dartlang-foo', resolveInputUri('org-dartlang-foo:/bar').scheme);
-  Expect.stringEquals(
-      "${Uri.base.resolve('file.txt')}", "${resolveInputUri('file:file.txt')}");
-}
-
-main() {
-  // Test platform default.
-  test();
-  // Test non-Windows behavior.
-  isWindows = false;
-  test();
-  // Test Windows behavior.
-  isWindows = true;
-  test();
-}
diff --git a/pkg/front_end/tool/fasta b/pkg/front_end/tool/fasta
index 2567a4e..65b9ec4 100755
--- a/pkg/front_end/tool/fasta
+++ b/pkg/front_end/tool/fasta
@@ -23,6 +23,13 @@
 
 export DART_CONFIGURATION=${DART_CONFIGURATION:-ReleaseX64}
 
+EXTRA_VM_ARGS=()
+
+while [[ "$1" == -* ]]; do
+  EXTRA_VM_ARGS+=("$1")
+  shift
+done
+
 case "${1//_/-}" in
   abcompile) SCRIPT="${TOOL_DIR}/abcompile.dart";;
   compile) SCRIPT="${TOOL_DIR}/compile.dart";;
@@ -55,4 +62,4 @@
 
 shift
 
-exec "${DART_VM}" -c "${SCRIPT}" "$@"
+exec "${DART_VM}" "${EXTRA_VM_ARGS[@]}" --enable-asserts "${SCRIPT}" "$@"
diff --git a/pkg/front_end/tool/status_files/update_from_log.dart b/pkg/front_end/tool/status_files/update_from_log.dart
deleted file mode 100644
index 2fa2b11..0000000
--- a/pkg/front_end/tool/status_files/update_from_log.dart
+++ /dev/null
@@ -1,54 +0,0 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// Script that updates kernel status lines automatically for tests under the
-/// '$strong' configuration.
-///
-/// This script is hardcoded to only support this configuration and relies on
-/// a convention for how the status files are structured, In particular,
-/// every status file is expected to have these sections:
-///
-///     [ $compiler == dartk && $runtime == vm && $strong ]
-///     [ $compiler == dartk && $runtime == vm && $strong && $mode == debug ]
-///     [ $compiler == dartkp && $runtime == dart_precompiled && $strong ]
-///     [ $compiler == dartkp && $runtime == dart_precompiled && $strong && $mode == debug]
-///
-/// we allow other sections specifying $checked mode, but the script currently
-/// has not been configured to update them.
-///
-///     [ $compiler == dartk && $runtime == vm && $strong && $checked ]
-///     [ $compiler == dartk && $runtime == vm && $strong && !$checked ]
-///     [ $compiler == dartkp && $runtime == dart_precompiled && $strong && $checked]
-///     [ $compiler == dartkp && $runtime == dart_precompiled && $strong && !$checked]
-///
-/// Note that this script is brittle and will not work properly if there are
-/// other overlapping sections. If you see the script adding entries like "Pass"
-/// it is a sign that a test was broadly marked as failing in a more general
-/// section (e.g. $runtime == vm, but no compiler was specified).
-
-library front_end.status_files.update_from_log;
-
-import '../../../compiler/tool/status_files/update_from_log.dart'
-    show mainInternal;
-
-final kernelStrongConfigurations = {
-  'dartk': r'[ $compiler == dartk && $runtime == vm && $strong ]',
-  'dartk-debug':
-      r'[ $compiler == dartk && $runtime == vm && $strong && $mode == debug]',
-  'dartkp':
-      r'[ $compiler == dartkp && $runtime == dart_precompiled && $strong ]',
-  'dartkp-debug':
-      r'[ $compiler == dartkp && $runtime == dart_precompiled && $strong && $mode == debug]',
-};
-
-final kernelStrongStatusFiles = {
-  'corelib_2': 'tests/corelib_2/corelib_2.status',
-  'language_2': 'tests/language_2/language_2_kernel.status',
-  'lib_2': 'tests/lib_2/lib_2_kernel.status',
-  'standalone_2': 'tests/standalone_2/standalone_2_kernel.status',
-};
-
-main(args) {
-  mainInternal(args, kernelStrongConfigurations, kernelStrongStatusFiles);
-}
diff --git a/pkg/kernel/bin/transform.dart b/pkg/kernel/bin/transform.dart
index 3fe69da..f384400 100755
--- a/pkg/kernel/bin/transform.dart
+++ b/pkg/kernel/bin/transform.dart
@@ -6,6 +6,9 @@
 import 'dart:async';
 import 'dart:io';
 
+import 'package:front_end/src/api_prototype/constant_evaluator.dart'
+    as constants show SimpleErrorReporter, transformComponent;
+
 import 'package:args/args.dart';
 import 'package:kernel/class_hierarchy.dart';
 import 'package:kernel/core_types.dart';
@@ -13,17 +16,12 @@
 import 'package:kernel/src/tool/batch_util.dart';
 import 'package:kernel/target/targets.dart';
 
-import 'package:kernel/transformations/constants.dart' as constants
-    show SimpleErrorReporter, transformComponent;
-
 import 'package:kernel/transformations/continuation.dart' as cont;
 import 'package:kernel/transformations/empty.dart' as empty;
 import 'package:kernel/transformations/method_call.dart' as method_call;
 import 'package:kernel/transformations/mixin_full_resolution.dart' as mix;
-import 'package:kernel/transformations/treeshaker.dart' as treeshaker;
 import 'package:kernel/transformations/coq.dart' as coq;
 import 'package:kernel/vm/constants_native_effects.dart';
-import 'package:kernel/src/tool/command_line_util.dart';
 
 ArgParser parser = new ArgParser()
   ..addOption('format',
@@ -38,9 +36,6 @@
       help: 'Be verbose (e.g. prints transformed main library).',
       defaultsTo: false)
   ..addMultiOption('define', abbr: 'D', splitCommas: false)
-  ..addMultiOption('embedder-entry-points-manifest',
-      help: 'A path to a file describing entrypoints '
-          '(lines of the form `<library>,<class>,<member>`).')
   ..addOption('transformation',
       abbr: 't',
       help: 'The transformation to apply.',
@@ -89,11 +84,6 @@
     output = '${input.substring(0, input.lastIndexOf('.'))}.transformed.dill';
   }
 
-  List<String> embedderEntryPointManifests =
-      options['embedder-entry-points-manifest'] as List<String>;
-  List<treeshaker.ProgramRoot> programRoots =
-      parseProgramRoots(embedderEntryPointManifests);
-
   var component = loadComponentFromBinary(input);
 
   final coreTypes = new CoreTypes(component);
@@ -112,11 +102,8 @@
     case 'constants':
       final VmConstantsBackend backend = new VmConstantsBackend(coreTypes);
       component = constants.transformComponent(
-          component, backend, defines, const constants.SimpleErrorReporter());
-      break;
-    case 'treeshake':
-      component = treeshaker.transformComponent(coreTypes, hierarchy, component,
-          programRoots: programRoots, legacyMode: true);
+          component, backend, defines, const constants.SimpleErrorReporter(),
+          enableAsserts: true);
       break;
     case 'methodcall':
       component =
diff --git a/pkg/kernel/binary.md b/pkg/kernel/binary.md
index 8ea99dc..d64034e 100644
--- a/pkg/kernel/binary.md
+++ b/pkg/kernel/binary.md
@@ -97,6 +97,8 @@
   // Line starts are delta-encoded (they are encoded as line lengths).  The list
   // [0, 10, 25, 32, 42] is encoded as [0, 10, 15, 7, 10].
   List<UInt> lineStarts;
+
+  List<Byte> importUriUtf8Bytes;
 }
 
 type UriSource {
@@ -137,7 +139,7 @@
 
 type ComponentFile {
   UInt32 magic = 0x90ABCDEF;
-  UInt32 formatVersion = 18;
+  UInt32 formatVersion = 25;
   List<String> problemsAsJson; // Described in problems.md.
   Library[] libraries;
   UriSource sourceMap;
@@ -236,8 +238,11 @@
   List<Field> fields;
   List<Procedure> procedures;
 
+  List<UInt> sourceReferences; // list of sources owned by library, indexes into UriSource on Component.
+
   // Library index. Offsets are used to get start (inclusive) and end (exclusive) byte positions for
   // a specific class or procedure. Note the "+1" to account for needing the end of the last entry.
+  UInt32 sourceReferencesOffset;
   UInt32[classes.length + 1] classOffsets;
   UInt32 classCount = classes.length;
   UInt32[procedures.length + 1] procedureOffsets;
@@ -696,6 +701,37 @@
   List<Expression> expressions;
 }
 
+type ListConcatenation extends Expression {
+  Byte tag = 111;
+  FileOffset fileOffset;
+  DartType typeArgument;
+  List<Expression> lists;
+}
+
+type SetConcatenation extends Expression {
+  Byte tag = 112;
+  FileOffset fileOffset;
+  DartType typeArgument;
+  List<Expression> sets;
+}
+
+type MapConcatenation extends Expression {
+  Byte tag = 113;
+  FileOffset fileOffset;
+  DartType keyType;
+  DartType valueType;
+  List<Expression> maps;
+}
+
+type InstanceCreation extends Expression {
+  Byte tag = 114;
+  FileOffset fileOffset;
+  CanonicalNameReference class;
+  List<DartType> typeArguments;
+  List<[FieldReference, Expression]> fieldValues;
+  List<AssertStatement> asserts;
+}
+
 type IsExpression extends Expression {
   Byte tag = 37;
   FileOffset fileOffset;
@@ -845,6 +881,12 @@
   Expression body;
 }
 
+type BlockExpression extends Expression {
+  Byte tag = 82;
+  List<Statement> body;
+  Expression value;
+}
+
 type Instantiation extends Expression {
   Byte tag = 54;
   Expression expression;
@@ -862,6 +904,13 @@
 }
 
 type ConstantExpression extends Expression {
+  Byte tag = 106;
+  FileOffset fileOffset;
+  DartType type;
+  ConstantReference constantReference;
+}
+
+type Deprecated_ConstantExpression extends Expression {
   Byte tag = 107;
   ConstantReference constantReference;
 }
@@ -911,6 +960,12 @@
   List<ConstantReference> values;
 }
 
+type SetConstant extends Constant {
+  Byte tag = 13; // Note: tag is out of order.
+  DartType type;
+  List<ConstantReference> values;
+}
+
 type InstanceConstant extends Constant {
   Byte tag = 8;
   CanonicalNameReference class;
diff --git a/pkg/kernel/lib/ast.dart b/pkg/kernel/lib/ast.dart
index d738ec5..f8709b7 100644
--- a/pkg/kernel/lib/ast.dart
+++ b/pkg/kernel/lib/ast.dart
@@ -155,8 +155,6 @@
 
   Component get enclosingComponent => parent?.enclosingComponent;
 
-  Library get enclosingLibrary => parent?.enclosingLibrary;
-
   /// Returns the best known source location of the given AST node, or `null` if
   /// the node is orphaned.
   ///
@@ -468,8 +466,6 @@
   Location _getLocationInEnclosingFile(int offset) {
     return _getLocationInComponent(enclosingComponent, fileUri, offset);
   }
-
-  Library get enclosingLibraray => this;
 }
 
 /// An import or export declaration in a library.
@@ -665,6 +661,10 @@
     annotations.add(node);
     node.parent = this;
   }
+
+  Location _getLocationInEnclosingFile(int offset) {
+    return _getLocationInComponent(enclosingComponent, fileUri, offset);
+  }
 }
 
 /// The degree to which the contents of a class have been loaded into memory.
@@ -2215,6 +2215,9 @@
     while (type is TypeParameterType) {
       type = (type as TypeParameterType).parameter.bound;
     }
+    if (type == types.nullType) {
+      return superclass.bottomType;
+    }
     if (type is InterfaceType) {
       var upcastType = types.getTypeAsInstanceOf(type, superclass);
       if (upcastType != null) return upcastType;
@@ -3208,6 +3211,166 @@
   }
 }
 
+/// Concatenate lists into a single list.
+///
+/// If [lists] is empty then an empty list is returned.
+///
+/// These arise from spread and control-flow elements in const list literals
+/// containing unevaluated subexpressions. They only ever occur within
+/// unevaluated constants in constant expressions.
+class ListConcatenation extends Expression {
+  DartType typeArgument;
+  final List<Expression> lists;
+
+  ListConcatenation(this.lists, {this.typeArgument: const DynamicType()}) {
+    setParents(lists, this);
+  }
+
+  DartType getStaticType(TypeEnvironment types) {
+    return types.literalListType(typeArgument);
+  }
+
+  accept(ExpressionVisitor v) => v.visitListConcatenation(this);
+  accept1(ExpressionVisitor1 v, arg) => v.visitListConcatenation(this, arg);
+
+  visitChildren(Visitor v) {
+    typeArgument?.accept(v);
+    visitList(lists, v);
+  }
+
+  transformChildren(Transformer v) {
+    typeArgument = v.visitDartType(typeArgument);
+    transformList(lists, v, this);
+  }
+}
+
+/// Concatenate sets into a single set.
+///
+/// If [sets] is empty then an empty set is returned.
+///
+/// These arise from spread and control-flow elements in const set literals
+/// containing unevaluated subexpressions. They only ever occur within
+/// unevaluated constants in constant expressions.
+///
+/// Duplicated values in or across the sets will result in a compile-time error
+/// during constant evaluation.
+class SetConcatenation extends Expression {
+  DartType typeArgument;
+  final List<Expression> sets;
+
+  SetConcatenation(this.sets, {this.typeArgument: const DynamicType()}) {
+    setParents(sets, this);
+  }
+
+  DartType getStaticType(TypeEnvironment types) {
+    return types.literalSetType(typeArgument);
+  }
+
+  accept(ExpressionVisitor v) => v.visitSetConcatenation(this);
+  accept1(ExpressionVisitor1 v, arg) => v.visitSetConcatenation(this, arg);
+
+  visitChildren(Visitor v) {
+    typeArgument?.accept(v);
+    visitList(sets, v);
+  }
+
+  transformChildren(Transformer v) {
+    typeArgument = v.visitDartType(typeArgument);
+    transformList(sets, v, this);
+  }
+}
+
+/// Concatenate maps into a single map.
+///
+/// If [maps] is empty then an empty map is returned.
+///
+/// These arise from spread and control-flow elements in const map literals
+/// containing unevaluated subexpressions. They only ever occur within
+/// unevaluated constants in constant expressions.
+///
+/// Duplicated keys in or across the maps will result in a compile-time error
+/// during constant evaluation.
+class MapConcatenation extends Expression {
+  DartType keyType;
+  DartType valueType;
+  final List<Expression> maps;
+
+  MapConcatenation(this.maps,
+      {this.keyType: const DynamicType(),
+      this.valueType: const DynamicType()}) {
+    setParents(maps, this);
+  }
+
+  DartType getStaticType(TypeEnvironment types) {
+    return types.literalMapType(keyType, valueType);
+  }
+
+  accept(ExpressionVisitor v) => v.visitMapConcatenation(this);
+  accept1(ExpressionVisitor1 v, arg) => v.visitMapConcatenation(this, arg);
+
+  visitChildren(Visitor v) {
+    keyType?.accept(v);
+    valueType?.accept(v);
+    visitList(maps, v);
+  }
+
+  transformChildren(Transformer v) {
+    keyType = v.visitDartType(keyType);
+    valueType = v.visitDartType(valueType);
+    transformList(maps, v, this);
+  }
+}
+
+/// Create an instance directly from the field values.
+///
+/// This expression arises from const constructor calls when one or more field
+/// initializing expressions, field initializers or assert initializers contain
+/// unevaluated expressions. They only ever occur within unevaluated constants
+/// in constant expressions.
+class InstanceCreation extends Expression {
+  final Reference classReference;
+  final List<DartType> typeArguments;
+  final Map<Reference, Expression> fieldValues;
+  final List<AssertStatement> asserts;
+
+  InstanceCreation(
+      this.classReference, this.typeArguments, this.fieldValues, this.asserts);
+
+  Class get classNode => classReference.asClass;
+
+  DartType getStaticType(TypeEnvironment types) {
+    return typeArguments.isEmpty
+        ? classNode.rawType
+        : new InterfaceType(classNode, typeArguments);
+  }
+
+  accept(ExpressionVisitor v) => v.visitInstanceCreation(this);
+  accept1(ExpressionVisitor1 v, arg) => v.visitInstanceCreation(this, arg);
+
+  visitChildren(Visitor v) {
+    classReference.asClass.acceptReference(v);
+    visitList(typeArguments, v);
+    for (final Reference reference in fieldValues.keys) {
+      reference.asField.acceptReference(v);
+    }
+    for (final Expression value in fieldValues.values) {
+      value.accept(v);
+    }
+    visitList(asserts, v);
+  }
+
+  transformChildren(Transformer v) {
+    fieldValues.forEach((Reference fieldRef, Expression value) {
+      Expression transformed = value.accept(v);
+      if (transformed != null && !identical(value, transformed)) {
+        fieldValues[fieldRef] = transformed;
+        transformed.parent = this;
+      }
+    });
+    transformList(asserts, v, this);
+  }
+}
+
 /// Expression of form `x is T`.
 class IsExpression extends Expression {
   Expression operand;
@@ -3337,7 +3500,7 @@
 class NullLiteral extends BasicLiteral {
   Object get value => null;
 
-  DartType getStaticType(TypeEnvironment types) => const BottomType();
+  DartType getStaticType(TypeEnvironment types) => types.nullType;
 
   accept(ExpressionVisitor v) => v.visitNullLiteral(this);
   accept1(ExpressionVisitor1 v, arg) => v.visitNullLiteral(this, arg);
@@ -3597,22 +3760,25 @@
 
 class ConstantExpression extends Expression {
   Constant constant;
+  DartType type;
 
-  ConstantExpression(this.constant) {
+  ConstantExpression(this.constant, [this.type = const DynamicType()]) {
     assert(constant != null);
   }
 
-  DartType getStaticType(TypeEnvironment types) => constant.getType(types);
+  DartType getStaticType(TypeEnvironment types) => type;
 
   accept(ExpressionVisitor v) => v.visitConstantExpression(this);
   accept1(ExpressionVisitor1 v, arg) => v.visitConstantExpression(this, arg);
 
   visitChildren(Visitor v) {
     constant?.acceptReference(v);
+    type?.accept(v);
   }
 
   transformChildren(Transformer v) {
     constant = v.visitConstant(constant);
+    type = v.visitDartType(type);
   }
 }
 
@@ -3648,6 +3814,37 @@
   }
 }
 
+class BlockExpression extends Expression {
+  Block body;
+  Expression value;
+
+  BlockExpression(this.body, this.value) {
+    body?.parent = this;
+    value?.parent = this;
+  }
+
+  DartType getStaticType(TypeEnvironment types) => value.getStaticType(types);
+
+  accept(ExpressionVisitor v) => v.visitBlockExpression(this);
+  accept1(ExpressionVisitor1 v, arg) => v.visitBlockExpression(this, arg);
+
+  visitChildren(Visitor v) {
+    body?.accept(v);
+    value?.accept(v);
+  }
+
+  transformChildren(Transformer v) {
+    if (body != null) {
+      body = body.accept(v);
+      body?.parent = this;
+    }
+    if (value != null) {
+      value = value.accept(v);
+      value?.parent = this;
+    }
+  }
+}
+
 /// Attempt to load the library referred to by a deferred import.
 ///
 /// This instruction is concerned with:
@@ -5319,6 +5516,38 @@
       types.literalListType(typeArgument);
 }
 
+class SetConstant extends Constant {
+  final DartType typeArgument;
+  final List<Constant> entries;
+
+  SetConstant(this.typeArgument, this.entries);
+
+  visitChildren(Visitor v) {
+    typeArgument.accept(v);
+    for (final Constant constant in entries) {
+      constant.acceptReference(v);
+    }
+  }
+
+  accept(ConstantVisitor v) => v.visitSetConstant(this);
+  acceptReference(Visitor v) => v.visitSetConstantReference(this);
+
+  String toString() => '${this.runtimeType}<$typeArgument>($entries)';
+
+  int _cachedHashCode;
+  int get hashCode {
+    return _cachedHashCode ??= typeArgument.hashCode ^ listHashCode(entries);
+  }
+
+  bool operator ==(Object other) =>
+      identical(this, other) ||
+      (other is SetConstant &&
+          other.typeArgument == typeArgument &&
+          listEquals(other.entries, entries));
+
+  DartType getType(TypeEnvironment types) => types.literalSetType(typeArgument);
+}
+
 class InstanceConstant extends Constant {
   final Reference classReference;
   final List<DartType> typeArguments;
@@ -5526,6 +5755,10 @@
       : root = nameRoot ?? new CanonicalName.root(),
         libraries = libraries ?? <Library>[],
         uriToSource = uriToSource ?? <Uri, Source>{} {
+    adoptChildren();
+  }
+
+  void adoptChildren() {
     if (libraries != null) {
       for (int i = 0; i < libraries.length; ++i) {
         // The libraries are owned by this component, and so are their canonical
@@ -5778,9 +6011,13 @@
 
   final List<int> source;
 
+  final Uri importUri;
+
+  final Uri fileUri;
+
   String cachedText;
 
-  Source(this.lineStarts, this.source);
+  Source(this.lineStarts, this.source, this.importUri, this.fileUri);
 
   /// Return the text corresponding to [line] which is a 1-based line
   /// number. The returned line contains no line separators.
@@ -5939,7 +6176,7 @@
 /// This function will return "S with M1" and "S with M1, M2", respectively.
 String demangleMixinApplicationName(String name) {
   List<String> nameParts = name.split('&');
-  if (nameParts.length < 2) return name;
+  if (nameParts.length < 2 || name == "&") return name;
   String demangledName = nameParts[1];
   for (int i = 2; i < nameParts.length; i++) {
     demangledName += (i == 2 ? " with " : ", ") + nameParts[i];
diff --git a/pkg/kernel/lib/binary/ast_from_binary.dart b/pkg/kernel/lib/binary/ast_from_binary.dart
index cc11d87..6526e31 100644
--- a/pkg/kernel/lib/binary/ast_from_binary.dart
+++ b/pkg/kernel/lib/binary/ast_from_binary.dart
@@ -239,6 +239,15 @@
           entries[i] = readConstantReference();
         }
         return new ListConstant(typeArgument, entries);
+      case ConstantTag.SetConstant:
+        final DartType typeArgument = readDartType();
+        final int length = readUInt();
+        final List<Constant> entries =
+            new List<Constant>.filled(length, null, growable: true);
+        for (int i = 0; i < length; i++) {
+          entries[i] = readConstantReference();
+        }
+        return new SetConstant(typeArgument, entries);
       case ConstantTag.InstanceConstant:
         final Reference classReference = readClassReference();
         final int typeArgumentCount = readUInt();
@@ -687,7 +696,11 @@
         lineStarts[j] = lineStart;
         previousLineStart = lineStart;
       }
-      uriToSource[uri] = new Source(lineStarts, sourceCode);
+      List<int> importUriBytes = readByteList();
+      Uri importUri = importUriBytes.isEmpty
+          ? null
+          : Uri.parse(const Utf8Decoder().convert(importUriBytes));
+      uriToSource[uri] = new Source(lineStarts, sourceCode, importUri, uri);
     }
 
     // Read index.
@@ -1502,6 +1515,45 @@
         int offset = readOffset();
         return new StringConcatenation(readExpressionList())
           ..fileOffset = offset;
+      case Tag.ListConcatenation:
+        int offset = readOffset();
+        var typeArgument = readDartType();
+        return new ListConcatenation(readExpressionList(),
+            typeArgument: typeArgument)
+          ..fileOffset = offset;
+      case Tag.SetConcatenation:
+        int offset = readOffset();
+        var typeArgument = readDartType();
+        return new SetConcatenation(readExpressionList(),
+            typeArgument: typeArgument)
+          ..fileOffset = offset;
+      case Tag.MapConcatenation:
+        int offset = readOffset();
+        var keyType = readDartType();
+        var valueType = readDartType();
+        return new MapConcatenation(readExpressionList(),
+            keyType: keyType, valueType: valueType)
+          ..fileOffset = offset;
+      case Tag.InstanceCreation:
+        int offset = readOffset();
+        Reference classReference = readClassReference();
+        List<DartType> typeArguments = readDartTypeList();
+        int fieldValueCount = readUInt();
+        Map<Reference, Expression> fieldValues = <Reference, Expression>{};
+        for (int i = 0; i < fieldValueCount; i++) {
+          final Reference fieldRef =
+              readCanonicalNameReference().getReference();
+          final Expression value = readExpression();
+          fieldValues[fieldRef] = value;
+        }
+        int assertCount = readUInt();
+        List<AssertStatement> asserts = new List<AssertStatement>(assertCount);
+        for (int i = 0; i < assertCount; i++) {
+          asserts[i] = readStatement();
+        }
+        return new InstanceCreation(
+            classReference, typeArguments, fieldValues, asserts)
+          ..fileOffset = offset;
       case Tag.IsExpression:
         int offset = readOffset();
         return new IsExpression(readExpression(), readDartType())
@@ -1593,12 +1645,21 @@
         var body = readExpression();
         variableStack.length = stackHeight;
         return new Let(variable, body);
+      case Tag.BlockExpression:
+        int stackHeight = variableStack.length;
+        var statements = readStatementList();
+        var value = readExpression();
+        variableStack.length = stackHeight;
+        return new BlockExpression(new Block(statements), value);
       case Tag.Instantiation:
         var expression = readExpression();
         var typeArguments = readDartTypeList();
         return new Instantiation(expression, typeArguments);
       case Tag.ConstantExpression:
-        return new ConstantExpression(readConstantReference());
+        int offset = readOffset();
+        DartType type = readDartType();
+        Constant constant = readConstantReference();
+        return new ConstantExpression(constant, type)..fileOffset = offset;
       default:
         throw fail('unexpected expression tag: $tag');
     }
diff --git a/pkg/kernel/lib/binary/ast_to_binary.dart b/pkg/kernel/lib/binary/ast_to_binary.dart
index 1b945ba..4b3434c 100644
--- a/pkg/kernel/lib/binary/ast_to_binary.dart
+++ b/pkg/kernel/lib/binary/ast_to_binary.dart
@@ -25,6 +25,7 @@
   final UriIndexer _sourceUriIndexer = new UriIndexer();
   bool _currentlyInNonimplementation = false;
   final List<bool> _sourcesFromRealImplementation = new List<bool>();
+  final List<bool> _sourcesFromRealImplementationInLibrary = new List<bool>();
   Map<LibraryDependency, int> _libraryDependencyIndex =
       <LibraryDependency, int>{};
 
@@ -219,6 +220,11 @@
       writeDartType(constant.typeArgument);
       writeUInt30(constant.entries.length);
       constant.entries.forEach(writeConstantReference);
+    } else if (constant is SetConstant) {
+      writeByte(ConstantTag.SetConstant);
+      writeDartType(constant.typeArgument);
+      writeUInt30(constant.entries.length);
+      constant.entries.forEach(writeConstantReference);
     } else if (constant is InstanceConstant) {
       writeByte(ConstantTag.InstanceConstant);
       writeClassReference(constant.classNode);
@@ -258,16 +264,19 @@
   }
 
   // Returns the new active file uri.
-  Uri writeUriReference(Uri uri) {
+  void writeUriReference(Uri uri) {
     final int index = _sourceUriIndexer.put(uri);
     writeUInt30(index);
     if (!_currentlyInNonimplementation) {
+      if (_sourcesFromRealImplementationInLibrary.length <= index) {
+        _sourcesFromRealImplementationInLibrary.length = index + 1;
+      }
+      _sourcesFromRealImplementationInLibrary[index] = true;
       if (_sourcesFromRealImplementation.length <= index) {
         _sourcesFromRealImplementation.length = index + 1;
       }
       _sourcesFromRealImplementation[index] = true;
     }
-    return uri;
   }
 
   void writeList<T>(List<T> items, void writeItem(T x)) {
@@ -735,31 +744,20 @@
     Uint8List buffer = new Uint8List(1 << 16);
     for (Uri uri in _sourceUriIndexer.index.keys) {
       index[i] = getBufferOffset();
-      Source source = ((includeSources &&
-                  _sourcesFromRealImplementation.length > i &&
-                  _sourcesFromRealImplementation[i] == true)
-              ? uriToSource[uri]
-              : null) ??
-          new Source(<int>[], const <int>[]);
-
-      String uriAsString = uri == null ? "" : "$uri";
-      if (uriAsString.length * 3 < buffer.length) {
-        int length = NotQuiteString.writeUtf8(buffer, 0, uriAsString);
-        if (length < 0) {
-          // Utf8 encoding failed.
-          writeByteList(utf8.encoder.convert(uriAsString));
-        } else {
-          writeUInt30(length);
-          for (int j = 0; j < length; j++) {
-            writeByte(buffer[j]);
-          }
-        }
-      } else {
-        // Uncommon case with very long url.
-        writeByteList(utf8.encoder.convert(uriAsString));
+      Source source = uriToSource[uri];
+      if (source == null ||
+          !(includeSources &&
+              _sourcesFromRealImplementation.length > i &&
+              _sourcesFromRealImplementation[i] == true)) {
+        source = new Source(
+            <int>[], const <int>[], source?.importUri, source?.fileUri);
       }
 
+      String uriAsString = uri == null ? "" : "$uri";
+      outputStringViaBuffer(uriAsString, buffer);
+
       writeByteList(source.source);
+
       List<int> lineStarts = source.lineStarts;
       writeUInt30(lineStarts.length);
       int previousLineStart = 0;
@@ -768,6 +766,11 @@
         writeUInt30(lineStart - previousLineStart);
         previousLineStart = lineStart;
       }
+
+      String importUriAsString =
+          source.importUri == null ? "" : "${source.importUri}";
+      outputStringViaBuffer(importUriAsString, buffer);
+
       i++;
     }
 
@@ -777,6 +780,24 @@
     }
   }
 
+  void outputStringViaBuffer(String uriAsString, Uint8List buffer) {
+    if (uriAsString.length * 3 < buffer.length) {
+      int length = NotQuiteString.writeUtf8(buffer, 0, uriAsString);
+      if (length < 0) {
+        // Utf8 encoding failed.
+        writeByteList(utf8.encoder.convert(uriAsString));
+      } else {
+        writeUInt30(length);
+        for (int j = 0; j < length; j++) {
+          writeByte(buffer[j]);
+        }
+      }
+    } else {
+      // Uncommon case with very long url.
+      writeByteList(utf8.encoder.convert(uriAsString));
+    }
+  }
+
   void writeLibraryDependencyReference(LibraryDependency node) {
     int index = _libraryDependencyIndex[node];
     if (index == null) {
@@ -904,7 +925,26 @@
     writeProcedureNodeList(node.procedures);
     procedureOffsets.add(getBufferOffset());
 
+    // Dump all source-references used in this library; used by the VM.
+    int sourceReferencesOffset = getBufferOffset();
+    int sourceReferencesCount = 0;
+    // Note: We start at 1 because 0 is the null-entry and we don't want to
+    // include that.
+    for (int i = 1; i < _sourcesFromRealImplementationInLibrary.length; i++) {
+      if (_sourcesFromRealImplementationInLibrary[i] == true) {
+        sourceReferencesCount++;
+      }
+    }
+    writeUInt30(sourceReferencesCount);
+    for (int i = 1; i < _sourcesFromRealImplementationInLibrary.length; i++) {
+      if (_sourcesFromRealImplementationInLibrary[i] == true) {
+        writeUInt30(i);
+        _sourcesFromRealImplementationInLibrary[i] = false;
+      }
+    }
+
     // Fixed-size ints at the end used as an index.
+    writeUInt32(sourceReferencesOffset);
     assert(classOffsets.length > 0);
     for (int i = 0; i < classOffsets.length; ++i) {
       int offset = classOffsets[i];
@@ -1461,6 +1501,45 @@
   }
 
   @override
+  void visitListConcatenation(ListConcatenation node) {
+    writeByte(Tag.ListConcatenation);
+    writeOffset(node.fileOffset);
+    writeNode(node.typeArgument);
+    writeNodeList(node.lists);
+  }
+
+  @override
+  void visitSetConcatenation(SetConcatenation node) {
+    writeByte(Tag.SetConcatenation);
+    writeOffset(node.fileOffset);
+    writeNode(node.typeArgument);
+    writeNodeList(node.sets);
+  }
+
+  @override
+  void visitMapConcatenation(MapConcatenation node) {
+    writeByte(Tag.MapConcatenation);
+    writeOffset(node.fileOffset);
+    writeNode(node.keyType);
+    writeNode(node.valueType);
+    writeNodeList(node.maps);
+  }
+
+  @override
+  void visitInstanceCreation(InstanceCreation node) {
+    writeByte(Tag.InstanceCreation);
+    writeOffset(node.fileOffset);
+    writeNonNullReference(node.classReference);
+    writeNodeList(node.typeArguments);
+    writeUInt30(node.fieldValues.length);
+    node.fieldValues.forEach((Reference fieldRef, Expression value) {
+      writeNonNullReference(fieldRef);
+      writeNode(value);
+    });
+    writeNodeList(node.asserts);
+  }
+
+  @override
   void visitIsExpression(IsExpression node) {
     writeByte(Tag.IsExpression);
     writeOffset(node.fileOffset);
@@ -1614,6 +1693,16 @@
   }
 
   @override
+  void visitBlockExpression(BlockExpression node) {
+    writeByte(Tag.BlockExpression);
+    _variableIndexer ??= new VariableIndexer();
+    _variableIndexer.pushScope();
+    writeNodeList(node.body.statements);
+    writeNode(node.value);
+    _variableIndexer.popScope();
+  }
+
+  @override
   void visitInstantiation(Instantiation node) {
     writeByte(Tag.Instantiation);
     writeNode(node.expression);
@@ -1692,6 +1781,8 @@
   @override
   void visitConstantExpression(ConstantExpression node) {
     writeByte(Tag.ConstantExpression);
+    writeOffset(node.fileOffset);
+    writeDartType(node.type);
     writeConstantReference(node.constant);
   }
 
@@ -2110,6 +2201,16 @@
   }
 
   @override
+  void visitSetConstant(SetConstant node) {
+    throw new UnsupportedError('serialization of SetConstants');
+  }
+
+  @override
+  void visitSetConstantReference(SetConstant node) {
+    throw new UnsupportedError('serialization of SetConstant references');
+  }
+
+  @override
   void visitMapConstant(MapConstant node) {
     throw new UnsupportedError('serialization of MapConstants');
   }
diff --git a/pkg/kernel/lib/binary/tag.dart b/pkg/kernel/lib/binary/tag.dart
index 280454f..8e52b70 100644
--- a/pkg/kernel/lib/binary/tag.dart
+++ b/pkg/kernel/lib/binary/tag.dart
@@ -50,6 +50,10 @@
   static const int LogicalExpression = 34;
   static const int ConditionalExpression = 35;
   static const int StringConcatenation = 36;
+  static const int ListConcatenation = 111;
+  static const int SetConcatenation = 112;
+  static const int MapConcatenation = 113;
+  static const int InstanceCreation = 114;
   static const int IsExpression = 37;
   static const int AsExpression = 38;
   static const int StringLiteral = 39;
@@ -67,6 +71,7 @@
   static const int AwaitExpression = 51;
   static const int FunctionExpression = 52;
   static const int Let = 53;
+  static const int BlockExpression = 82;
   static const int Instantiation = 54;
   static const int PositiveIntLiteral = 55;
   static const int NegativeIntLiteral = 56;
@@ -98,6 +103,7 @@
   static const int FunctionDeclaration = 79;
   static const int AsyncForInStatement = 80;
   static const int AssertBlock = 81;
+  // 82 is occupied by [BlockExpression] (expression).
 
   // Types
   static const int TypedefType = 87;
@@ -116,11 +122,18 @@
   static const int ClassReference = 100;
   static const int MemberReference = 101;
 
-  static const int ConstantExpression = 107;
+  static const int ConstantExpression = 106;
+
+  // Tag is deprecated since version 24.
+  static const int Deprecated_ConstantExpression = 107;
 
   /// 108 is occupied by [RedirectingFactoryConstructor] (member).
   /// 109 is occupied by [SetLiteral] (expression).
   /// 110 is occupied by [ConstSetLiteral] (expression).
+  /// 111 is occupied by [ListConcatenation] (expression).
+  /// 112 is occupied by [SetConcatenation] (expression).
+  /// 113 is occupied by [MapConcatenation] (expression).
+  /// 114 is occupied by [InstanceCreation] (expression).
 
   static const int SpecializedTagHighBit = 0x80; // 10000000
   static const int SpecializedTagMask = 0xF8; // 11111000
@@ -137,7 +150,7 @@
   /// Internal version of kernel binary format.
   /// Bump it when making incompatible changes in kernel binaries.
   /// Keep in sync with runtime/vm/kernel_binary.h, pkg/kernel/binary.md.
-  static const int BinaryFormatVersion = 18;
+  static const int BinaryFormatVersion = 25;
 }
 
 abstract class ConstantTag {
@@ -149,9 +162,11 @@
   static const int SymbolConstant = 5;
   static const int MapConstant = 6;
   static const int ListConstant = 7;
+  static const int SetConstant = 13;
   static const int InstanceConstant = 8;
   static const int PartialInstantiationConstant = 9;
   static const int TearOffConstant = 10;
   static const int TypeLiteralConstant = 11;
   static const int UnevaluatedConstant = 12;
+  // 13 is occupied by [SetConstant]
 }
diff --git a/pkg/kernel/lib/clone.dart b/pkg/kernel/lib/clone.dart
index 17ade68..d5f1940 100644
--- a/pkg/kernel/lib/clone.dart
+++ b/pkg/kernel/lib/clone.dart
@@ -190,6 +190,33 @@
     return new StringConcatenation(node.expressions.map(clone).toList());
   }
 
+  visitListConcatenation(ListConcatenation node) {
+    return new ListConcatenation(node.lists.map(clone).toList(),
+        typeArgument: visitType(node.typeArgument));
+  }
+
+  visitSetConcatenation(SetConcatenation node) {
+    return new SetConcatenation(node.sets.map(clone).toList(),
+        typeArgument: visitType(node.typeArgument));
+  }
+
+  visitMapConcatenation(MapConcatenation node) {
+    return new MapConcatenation(node.maps.map(clone).toList(),
+        keyType: visitType(node.keyType), valueType: visitType(node.valueType));
+  }
+
+  visitInstanceCreation(InstanceCreation node) {
+    final Map<Reference, Expression> fieldValues = <Reference, Expression>{};
+    node.fieldValues.forEach((Reference fieldRef, Expression value) {
+      fieldValues[fieldRef] = clone(value);
+    });
+    return new InstanceCreation(
+        node.classReference,
+        node.typeArguments.map(visitType).toList(),
+        fieldValues,
+        node.asserts.map(clone).toList());
+  }
+
   visitIsExpression(IsExpression node) {
     return new IsExpression(clone(node.operand), visitType(node.type));
   }
@@ -249,7 +276,8 @@
   }
 
   visitConstantExpression(ConstantExpression node) {
-    return new ConstantExpression(visitConstant(node.constant));
+    return new ConstantExpression(
+        visitConstant(node.constant), visitType(node.type));
   }
 
   visitStringLiteral(StringLiteral node) {
@@ -277,6 +305,10 @@
     return new Let(newVariable, clone(node.body));
   }
 
+  visitBlockExpression(BlockExpression node) {
+    return new BlockExpression(clone(node.body), clone(node.value));
+  }
+
   visitExpressionStatement(ExpressionStatement node) {
     return new ExpressionStatement(clone(node.expression));
   }
diff --git a/pkg/kernel/lib/core_types.dart b/pkg/kernel/lib/core_types.dart
index ddc4aac..aa8d0f7 100644
--- a/pkg/kernel/lib/core_types.dart
+++ b/pkg/kernel/lib/core_types.dart
@@ -33,11 +33,6 @@
     'dart:async': [
       'Future',
       'Stream',
-    ],
-    'dart:ffi': [
-      'DynamicLibrary',
-      'Pointer',
-      'Struct',
     ]
   };
 
@@ -100,95 +95,9 @@
   Field _pragmaOptions;
   Constructor _pragmaConstructor;
 
-  Library _ffiLibrary;
-  Class _ffiPointerClass;
-  Procedure _ffiPointerLoadProcedure;
-  Procedure _ffiPointerStoreProcedure;
-  Procedure _ffiPointerCastProcedure;
-  Procedure _ffiPointerOffsetByProcedure;
-  Procedure _ffiPointerAsFunctionProcedure;
-  Field _ffiStructField;
-  Class _ffiDynamicLibraryClass;
-  Procedure _ffiDynamicLibraryLookupFunctionProcedure;
-  Procedure _ffiAllocateProcedure;
-  Procedure _ffiSizeOfProcedure;
-  Procedure _ffiFromFunctionProcedure;
-  Class _ffiNativeFunctionClass;
-
   CoreTypes(Component component)
       : index = new LibraryIndex.coreLibraries(component);
 
-  Library get ffiLibrary {
-    return _ffiLibrary ??= index.getLibrary('dart:ffi');
-  }
-
-  Class get ffiPointerClass {
-    return _ffiPointerClass ??= index.getClass('dart:ffi', 'Pointer');
-  }
-
-  Procedure get ffiPointerLoadProcedure {
-    return _ffiPointerLoadProcedure ??=
-        index.getMember('dart:ffi', 'Pointer', 'load');
-  }
-
-  Procedure get ffiPointerStoreProcedure {
-    return _ffiPointerStoreProcedure ??=
-        index.getMember('dart:ffi', 'Pointer', 'store');
-  }
-
-  Procedure get ffiPointerCastProcedure {
-    return _ffiPointerCastProcedure ??=
-        index.getMember('dart:ffi', 'Pointer', 'cast');
-  }
-
-  Procedure get ffiPointerOffsetByProcedure {
-    return _ffiPointerOffsetByProcedure ??=
-        index.getMember('dart:ffi', 'Pointer', 'offsetBy');
-  }
-
-  Procedure get ffiPointerAsFunctionProcedure {
-    return _ffiPointerAsFunctionProcedure ??=
-        index.getMember('dart:ffi', 'Pointer', 'asFunction');
-  }
-
-  Field get ffiStructField {
-    return _ffiStructField ??= index.getTopLevelMember('dart:ffi', 'struct');
-  }
-
-  Class get ffiDynamicLibraryClass {
-    return _ffiDynamicLibraryClass ??=
-        index.getClass('dart:ffi', 'DynamicLibrary');
-  }
-
-  Procedure get ffiDynamicLibraryLookupFunctionProcedure {
-    return _ffiDynamicLibraryLookupFunctionProcedure ??=
-        index.getMember('dart:ffi', 'DynamicLibrary', 'lookupFunction');
-  }
-
-  Procedure get ffiAllocateProcedure {
-    return _ffiAllocateProcedure ??=
-        index.getTopLevelMember('dart:ffi', 'allocate');
-  }
-
-  Procedure get ffiSizeOfProcedure {
-    return _ffiSizeOfProcedure ??=
-        index.getTopLevelMember('dart:ffi', 'sizeOf');
-  }
-
-  Procedure get ffiFromFunctionProcedure {
-    return _ffiFromFunctionProcedure ??=
-        index.getTopLevelMember('dart:ffi', 'fromFunction');
-  }
-
-  Class get ffiNativeFunctionClass {
-    return _ffiNativeFunctionClass ??=
-        index.getClass('dart:ffi', 'NativeFunction');
-  }
-
-  Class ffiNativeTypeClass(String name) {
-    return index.getClass('dart:ffi', name);
-  }
-
   Procedure get asyncErrorWrapperHelperProcedure {
     return _asyncErrorWrapperHelperProcedure ??=
         index.getTopLevelMember('dart:async', '_asyncErrorWrapperHelper');
diff --git a/pkg/kernel/lib/import_table.dart b/pkg/kernel/lib/import_table.dart
index ae2829c..f549933 100644
--- a/pkg/kernel/lib/import_table.dart
+++ b/pkg/kernel/lib/import_table.dart
@@ -4,7 +4,6 @@
 library kernel.import_table;
 
 import 'ast.dart';
-import 'package:path/path.dart' as path;
 
 abstract class ImportTable {
   int getImportIndex(Library library);
@@ -89,12 +88,8 @@
     bool isTargetSchemeFileOrCustom = isFileOrCustomScheme(targetUri);
     bool isReferenceSchemeFileOrCustom = isFileOrCustomScheme(referenceUri);
     if (isTargetSchemeFileOrCustom && isReferenceSchemeFileOrCustom) {
-      var targetDirectory = path.dirname(targetUri.path);
-      var currentDirectory = path.dirname(referenceUri.path);
-      var relativeDirectory =
-          path.relative(targetDirectory, from: currentDirectory);
-      var filename = path.basename(targetUri.path);
-      table.addImport(target, '$relativeDirectory/$filename');
+      String relativeUri = relativeUriPath(targetUri, referenceUri);
+      table.addImport(target, relativeUri);
     } else if (isTargetSchemeFileOrCustom) {
       // Cannot import a file:URI from a dart:URI or package:URI.
       // We may want to remove this restriction, but for now it's just a sanity
@@ -126,3 +121,36 @@
     }
   }
 }
+
+String relativeUriPath(Uri target, Uri ref) {
+  List<String> targetSegments = target.pathSegments;
+  List<String> refSegments = ref.pathSegments;
+  int to = refSegments.length;
+  if (targetSegments.length < to) to = targetSegments.length;
+  to--; // The last entry is the filename, here we compare only directories.
+  int same = -1;
+  for (int i = 0; i < to; i++) {
+    if (targetSegments[i] == refSegments[i]) {
+      same = i;
+    } else {
+      break;
+    }
+  }
+  if (same == targetSegments.length - 2 &&
+      targetSegments.length == refSegments.length) {
+    // Both parts have the same number of segments,
+    // and they agree on all directories.
+    if (targetSegments.last == "") return ".";
+    return targetSegments.last;
+  }
+  List<String> path = new List<String>();
+  int oked = same + 1;
+  while (oked < refSegments.length - 1) {
+    path.add("..");
+    oked++;
+  }
+  path.addAll(targetSegments.skip(same + 1));
+
+  if (path.isEmpty) path.add(".");
+  return path.join("/");
+}
diff --git a/pkg/kernel/lib/src/hierarchy_based_type_environment.dart b/pkg/kernel/lib/src/hierarchy_based_type_environment.dart
index beae19b..d41962f 100644
--- a/pkg/kernel/lib/src/hierarchy_based_type_environment.dart
+++ b/pkg/kernel/lib/src/hierarchy_based_type_environment.dart
@@ -15,9 +15,8 @@
 class HierarchyBasedTypeEnvironment extends TypeEnvironment {
   final ClassHierarchy hierarchy;
 
-  HierarchyBasedTypeEnvironment(CoreTypes coreTypes, this.hierarchy,
-      {bool legacyMode: false})
-      : super.fromSubclass(coreTypes, legacyMode: legacyMode);
+  HierarchyBasedTypeEnvironment(CoreTypes coreTypes, this.hierarchy)
+      : super.fromSubclass(coreTypes);
 
   @override
   InterfaceType getTypeAsInstanceOf(InterfaceType type, Class superclass) {
diff --git a/pkg/kernel/lib/src/tool/command_line_util.dart b/pkg/kernel/lib/src/tool/command_line_util.dart
index 7149f76..937093e 100644
--- a/pkg/kernel/lib/src/tool/command_line_util.dart
+++ b/pkg/kernel/lib/src/tool/command_line_util.dart
@@ -5,67 +5,6 @@
 import 'dart:io';
 
 import 'package:kernel/kernel.dart';
-import 'package:kernel/transformations/treeshaker.dart';
-
-/// Parses all given [embedderEntryPointManifests] and returns the program roots
-/// specified in them.
-///
-/// A embedder manifest consists of lines of the following form:
-///
-///   <import-uri>,<class-name>,<member-name>
-///
-/// Where
-///
-///   <import-uri> : The uri of the library which contains the root.
-///   <class-name> : Is either the name of the class or '::' for the library.
-///   <member-name>: Can be of the forms:
-///
-///     - get:<name>
-///     - set:<name>
-///     - <field-name>
-///     - <procedure-name>
-///     - <constructor-name>
-///     - <klass>.<factory-constructor-name>
-///     - *external-instantiation*
-///
-List<ProgramRoot> parseProgramRoots(List<String> embedderEntryPointManifests) {
-  List<ProgramRoot> roots = <ProgramRoot>[];
-
-  for (var file in embedderEntryPointManifests) {
-    var lines = new File(file).readAsStringSync().trim().split('\n');
-    for (var line in lines) {
-      var parts = line.split(',');
-      assert(parts.length == 3);
-
-      var library = parts[0];
-      var klass = parts[1];
-      var member = parts[2];
-
-      // The vm represents the toplevel class as '::'.
-      if (klass == '::') klass = null;
-
-      ProgramRootKind kind = ProgramRootKind.Other;
-
-      if (member.startsWith('set:')) {
-        kind = ProgramRootKind.Setter;
-        member = member.substring('set:'.length);
-      } else if (member.startsWith('get:')) {
-        kind = ProgramRootKind.Getter;
-        member = member.substring('get:'.length);
-      } else if (member == "*external-instantiation*") {
-        kind = ProgramRootKind.ExternallyInstantiatedClass;
-        member = null;
-      } else if (member.startsWith('$klass.')) {
-        kind = ProgramRootKind.Constructor;
-        member = member.substring('$klass.'.length);
-      }
-
-      roots.add(new ProgramRoot(library, klass, member, kind));
-    }
-  }
-
-  return roots;
-}
 
 class CommandLineHelper {
   static requireExactlyOneArgument(List<String> args, void Function() usage,
diff --git a/pkg/kernel/lib/target/targets.dart b/pkg/kernel/lib/target/targets.dart
index a0e9a5b..47521ca 100644
--- a/pkg/kernel/lib/target/targets.dart
+++ b/pkg/kernel/lib/target/targets.dart
@@ -6,23 +6,13 @@
 import '../ast.dart';
 import '../class_hierarchy.dart';
 import '../core_types.dart';
-import '../transformations/constants.dart' show ConstantsBackend;
-import '../transformations/treeshaker.dart' show ProgramRoot;
 
 final List<String> targetNames = targets.keys.toList();
 
 class TargetFlags {
   final bool legacyMode;
-  final bool treeShake;
 
-  final List<ProgramRoot> programRoots;
-  final Uri kernelRuntime;
-
-  TargetFlags(
-      {this.legacyMode: false,
-      this.treeShake: false,
-      this.programRoots: const <ProgramRoot>[],
-      this.kernelRuntime});
+  TargetFlags({this.legacyMode: false});
 }
 
 typedef Target _TargetBuilder(TargetFlags flags);
@@ -42,6 +32,32 @@
       {List<C> context});
 }
 
+/// The different kinds of number semantics supported by the constant evaluator.
+enum NumberSemantics {
+  /// Dart VM number semantics.
+  vm,
+
+  /// JavaScript (Dart2js and DDC) number semantics.
+  js,
+}
+
+// Backend specific constant evaluation behavior
+class ConstantsBackend {
+  const ConstantsBackend();
+
+  /// Lowering of a list constant to a backend-specific representation.
+  Constant lowerListConstant(ListConstant constant) => constant;
+
+  /// Lowering of a set constant to a backend-specific representation.
+  Constant lowerSetConstant(SetConstant constant) => constant;
+
+  /// Lowering of a map constant to a backend-specific representation.
+  Constant lowerMapConstant(MapConstant constant) => constant;
+
+  /// Number semantics to use for this backend.
+  NumberSemantics get numberSemantics => NumberSemantics.vm;
+}
+
 /// A target provides backend-specific options for generating kernel IR.
 abstract class Target {
   String get name;
@@ -240,5 +256,5 @@
 
   @override
   ConstantsBackend constantsBackend(CoreTypes coreTypes) =>
-      new ConstantsBackend();
+      const ConstantsBackend();
 }
diff --git a/pkg/kernel/lib/text/ast_to_text.dart b/pkg/kernel/lib/text/ast_to_text.dart
index dc0a65e..5862b83 100644
--- a/pkg/kernel/lib/text/ast_to_text.dart
+++ b/pkg/kernel/lib/text/ast_to_text.dart
@@ -448,6 +448,8 @@
         Library nodeLibrary = node.enclosingLibrary;
         String prefix = syntheticNames.nameLibraryPrefix(nodeLibrary);
         write(prefix + '::' + node.name);
+      } else if (reference.canonicalName != null) {
+        write(reference.canonicalName.toString());
       } else {
         throw new UnimplementedError('${node.runtimeType}');
       }
@@ -475,6 +477,9 @@
         }
         writeWord('external');
       }
+      if (showMetadata) {
+        inner.writeMetadata(library);
+      }
       writeAnnotationList(library.annotations);
       writeWord('library');
       if (library.name != null) {
@@ -1270,6 +1275,66 @@
     state = WORD;
   }
 
+  visitListConcatenation(ListConcatenation node) {
+    bool first = true;
+    for (Expression part in node.lists) {
+      if (!first) writeSpaced('+');
+      writeExpression(part);
+      first = false;
+    }
+  }
+
+  visitSetConcatenation(SetConcatenation node) {
+    bool first = true;
+    for (Expression part in node.sets) {
+      if (!first) writeSpaced('+');
+      writeExpression(part);
+      first = false;
+    }
+  }
+
+  visitMapConcatenation(MapConcatenation node) {
+    bool first = true;
+    for (Expression part in node.maps) {
+      if (!first) writeSpaced('+');
+      writeExpression(part);
+      first = false;
+    }
+  }
+
+  visitInstanceCreation(InstanceCreation node) {
+    write('${node.classNode}');
+    if (node.typeArguments.isNotEmpty) {
+      writeSymbol('<');
+      writeList(node.typeArguments, writeType);
+      writeSymbol('>');
+    }
+    write(' {');
+    bool first = true;
+    node.fieldValues.forEach((Reference fieldRef, Expression value) {
+      if (!first) {
+        writeComma();
+      }
+      write('${fieldRef.asField.name}: ');
+      writeExpression(value);
+      first = false;
+    });
+    for (AssertStatement assert_ in node.asserts) {
+      if (!first) {
+        writeComma();
+      }
+      write('assert(');
+      writeExpression(assert_.condition);
+      if (assert_.message != null) {
+        writeComma();
+        writeExpression(assert_.message);
+      }
+      write(')');
+    }
+
+    write('}');
+  }
+
   visitIsExpression(IsExpression node) {
     writeExpression(node.operand, Precedence.BITWISE_OR);
     writeSpaced('is');
@@ -1392,6 +1457,13 @@
     writeExpression(node.body);
   }
 
+  visitBlockExpression(BlockExpression node) {
+    writeSpaced('block');
+    writeBlockBody(node.body.statements, asExpression: true);
+    writeSymbol(' =>');
+    writeExpression(node.value);
+  }
+
   visitInstantiation(Instantiation node) {
     writeExpression(node.expression);
     writeSymbol('<');
@@ -1541,33 +1613,28 @@
     endLine(';');
   }
 
-  visitBlock(Block node) {
-    writeIndentation();
-    if (node.statements.isEmpty) {
-      endLine('{}');
-      return null;
+  void writeBlockBody(List<Statement> statements, {bool asExpression = false}) {
+    if (statements.isEmpty) {
+      asExpression ? writeSymbol('{}') : endLine('{}');
+      return;
     }
     endLine('{');
     ++indentation;
-    node.statements.forEach(writeNode);
+    statements.forEach(writeNode);
     --indentation;
     writeIndentation();
-    endLine('}');
+    asExpression ? writeSymbol('}') : endLine('}');
+  }
+
+  visitBlock(Block node) {
+    writeIndentation();
+    writeBlockBody(node.statements);
   }
 
   visitAssertBlock(AssertBlock node) {
     writeIndentation();
     writeSpaced('assert');
-    if (node.statements.isEmpty) {
-      endLine('{}');
-      return;
-    }
-    endLine('{');
-    ++indentation;
-    node.statements.forEach(writeNode);
-    --indentation;
-    writeIndentation();
-    endLine('}');
+    writeBlockBody(node.statements);
   }
 
   visitEmptyStatement(EmptyStatement node) {
@@ -1575,8 +1642,8 @@
     endLine(';');
   }
 
-  visitAssertStatement(AssertStatement node, {bool asExpr = false}) {
-    if (asExpr != true) {
+  visitAssertStatement(AssertStatement node, {bool asExpression = false}) {
+    if (!asExpression) {
       writeIndentation();
     }
     writeWord('assert');
@@ -1586,7 +1653,7 @@
       writeComma();
       writeExpression(node.message);
     }
-    if (asExpr != true) {
+    if (!asExpression) {
       endLine(');');
     } else {
       writeSymbol(')');
@@ -1863,7 +1930,7 @@
   }
 
   visitAssertInitializer(AssertInitializer node) {
-    visitAssertStatement(node.statement, asExpr: true);
+    visitAssertStatement(node.statement, asExpression: true);
   }
 
   defaultInitializer(Initializer node) {
@@ -1944,6 +2011,15 @@
     endLine('${node.runtimeType}<${node.typeArgument}>($entries)');
   }
 
+  visitSetConstant(SetConstant node) {
+    final String name = syntheticNames.nameConstant(node);
+    write('  $name = ');
+    final String entries = node.entries.map((Constant constant) {
+      return syntheticNames.nameConstant(constant);
+    }).join(', ');
+    endLine('${node.runtimeType}<${node.typeArgument}>($entries)');
+  }
+
   visitMapConstant(MapConstant node) {
     final String name = syntheticNames.nameConstant(node);
     write('  $name = ');
@@ -1971,20 +2047,25 @@
     node.fieldValues.forEach((Reference fieldRef, Constant constant) {
       final String name = syntheticNames.nameConstant(constant);
       if (!first) {
-        first = false;
         sb.write(', ');
       }
       sb.write('${fieldRef.asField.name}: $name');
+      first = false;
     });
     sb.write('}');
     endLine(sb.toString());
   }
 
+  visitStringConstant(StringConstant node) {
+    final String name = syntheticNames.nameConstant(node);
+    endLine('  $name = "${escapeString(node.value)}"');
+  }
+
   visitUnevaluatedConstant(UnevaluatedConstant node) {
     final String name = syntheticNames.nameConstant(node);
-    write('  $name = ');
+    write('  $name = (');
     writeExpression(node.expression);
-    endLine();
+    endLine(')');
   }
 
   defaultNode(Node node) {
diff --git a/pkg/kernel/lib/text/serializer_combinators.dart b/pkg/kernel/lib/text/serializer_combinators.dart
index c06937d..e6db3ac 100644
--- a/pkg/kernel/lib/text/serializer_combinators.dart
+++ b/pkg/kernel/lib/text/serializer_combinators.dart
@@ -11,49 +11,51 @@
 import 'text_serializer.dart' show Tagger;
 
 class DeserializationEnvironment<T extends Node> {
-  final Map<String, T> locals = <String, T>{};
-
   final DeserializationEnvironment<T> parent;
 
-  final Set<String> usedNames = new Set<String>();
+  final Map<String, T> locals = <String, T>{};
 
-  DeserializationEnvironment(this.parent) {
-    if (parent != null) {
-      usedNames.addAll(parent.usedNames);
-    }
-  }
+  final Map<String, T> binders = <String, T>{};
+
+  final Set<String> usedNames;
+
+  DeserializationEnvironment(this.parent)
+      : usedNames = parent?.usedNames?.toSet() ?? new Set<String>();
 
   T lookup(String name) => locals[name] ?? parent?.lookup(name);
 
-  T add(String name, T node) {
+  T addBinder(String name, T node) {
     if (usedNames.contains(name)) {
       throw StateError("name '$name' is already declared in this scope");
     }
     usedNames.add(name);
-    return locals[name] = node;
+    return binders[name] = node;
+  }
+
+  void close() {
+    locals.addAll(binders);
+    binders.clear();
   }
 }
 
 class SerializationEnvironment<T extends Node> {
+  final SerializationEnvironment<T> parent;
+
   final Map<T, String> locals = new Map<T, String>.identity();
 
+  final Map<T, String> binders = new Map<T, String>.identity();
+
   int nameCount;
 
-  final SerializationEnvironment<T> parent;
-
-  static const String separator = "^";
-
-  static final int codeOfZero = "0".codeUnitAt(0);
-
-  static final int codeOfNine = "9".codeUnitAt(0);
-
-  SerializationEnvironment(this.parent) {
-    nameCount = (parent?.nameCount ?? 0);
-  }
+  SerializationEnvironment(this.parent) : nameCount = parent?.nameCount ?? 0;
 
   String lookup(T node) => locals[node] ?? parent?.lookup(node);
 
-  String add(T node, String name) {
+  String addBinder(T node, String name) {
+    final String separator = "^";
+    final int codeOfZero = "0".codeUnitAt(0);
+    final int codeOfNine = "9".codeUnitAt(0);
+
     int prefixLength = name.length - 1;
     bool isOnlyDigits = true;
     while (prefixLength >= 0 && name[prefixLength] != separator) {
@@ -65,7 +67,12 @@
       prefixLength = name.length;
     }
     String prefix = name.substring(0, prefixLength);
-    return locals[node] = "$prefix$separator${nameCount++}";
+    return binders[node] = "$prefix$separator${nameCount++}";
+  }
+
+  void close() {
+    locals.addAll(binders);
+    binders.clear();
   }
 }
 
@@ -417,3 +424,125 @@
     }
   }
 }
+
+/// Introduces a binder to the environment.
+///
+/// Serializes an object and uses it as a binder for the name that is retrieved
+/// from the object using [nameGetter] and (temporarily) modified using
+/// [nameSetter].  The binder is added to the enclosing environment.
+class Binder<T extends Node> extends TextSerializer<T> {
+  final TextSerializer<T> contents;
+  final String Function(T) nameGetter;
+  final void Function(T, String) nameSetter;
+
+  const Binder(this.contents, this.nameGetter, this.nameSetter);
+
+  T readFrom(Iterator<Object> stream, DeserializationState state) {
+    T object = contents.readFrom(stream, state);
+    state.environment.addBinder(nameGetter(object), object);
+    return object;
+  }
+
+  void writeTo(StringBuffer buffer, T object, SerializationState state) {
+    String oldName = nameGetter(object);
+    String newName = state.environment.addBinder(object, oldName);
+    nameSetter(object, newName);
+    contents.writeTo(buffer, object, state);
+    nameSetter(object, oldName);
+  }
+}
+
+/// Binds binders from one term in the other.
+///
+/// Serializes a [Tuple2] of [pattern] and [term], closing [term] over the
+/// binders found in [pattern].  The binders aren't added to the enclosing
+/// environment.
+class Bind<P, T> extends TextSerializer<Tuple2<P, T>> {
+  final TextSerializer<P> pattern;
+  final TextSerializer<T> term;
+
+  const Bind(this.pattern, this.term);
+
+  Tuple2<P, T> readFrom(Iterator<Object> stream, DeserializationState state) {
+    var bindingState = new DeserializationState(
+        new DeserializationEnvironment(state.environment), state.nameRoot);
+    P first = pattern.readFrom(stream, bindingState);
+    bindingState.environment.close();
+    T second = term.readFrom(stream, bindingState);
+    return new Tuple2(first, second);
+  }
+
+  void writeTo(
+      StringBuffer buffer, Tuple2<P, T> tuple, SerializationState state) {
+    var bindingState =
+        new SerializationState(new SerializationEnvironment(state.environment));
+    pattern.writeTo(buffer, tuple.first, bindingState);
+    bindingState.environment.close();
+    buffer.write(' ');
+    term.writeTo(buffer, tuple.second, bindingState);
+  }
+}
+
+/// Binds binders from one term in the other and adds them to the environment.
+///
+/// Serializes a [Tuple2] of [pattern] and [term], closing [term] over the
+/// binders found in [pattern].  The binders are added to the enclosing
+/// environment.
+class Rebind<P, T> extends TextSerializer<Tuple2<P, T>> {
+  final TextSerializer<P> pattern;
+  final TextSerializer<T> term;
+
+  const Rebind(this.pattern, this.term);
+
+  Tuple2<P, T> readFrom(Iterator<Object> stream, DeserializationState state) {
+    P first = pattern.readFrom(stream, state);
+    var closedState = new DeserializationState(
+        new DeserializationEnvironment(state.environment)
+          ..binders.addAll(state.environment.binders)
+          ..close(),
+        state.nameRoot);
+    T second = term.readFrom(stream, closedState);
+    return new Tuple2(first, second);
+  }
+
+  void writeTo(
+      StringBuffer buffer, Tuple2<P, T> tuple, SerializationState state) {
+    pattern.writeTo(buffer, tuple.first, state);
+    var closedState =
+        new SerializationState(new SerializationEnvironment(state.environment)
+          ..binders.addAll(state.environment.binders)
+          ..close());
+    buffer.write(' ');
+    term.writeTo(buffer, tuple.second, closedState);
+  }
+}
+
+class Zip<T, T1, T2> extends TextSerializer<List<T>> {
+  final TextSerializer<Tuple2<List<T1>, List<T2>>> lists;
+  final T Function(T1, T2) zip;
+  final Tuple2<T1, T2> Function(T) unzip;
+
+  const Zip(this.lists, this.zip, this.unzip);
+
+  List<T> readFrom(Iterator<Object> stream, DeserializationState state) {
+    Tuple2<List<T1>, List<T2>> toZip = lists.readFrom(stream, state);
+    List<T1> firsts = toZip.first;
+    List<T2> seconds = toZip.second;
+    List<T> zipped = new List<T>(toZip.first.length);
+    for (int i = 0; i < zipped.length; ++i) {
+      zipped[i] = zip(firsts[i], seconds[i]);
+    }
+    return zipped;
+  }
+
+  void writeTo(StringBuffer buffer, List<T> zipped, SerializationState state) {
+    List<T1> firsts = new List<T1>(zipped.length);
+    List<T2> seconds = new List<T2>(zipped.length);
+    for (int i = 0; i < zipped.length; ++i) {
+      Tuple2<T1, T2> tuple = unzip(zipped[i]);
+      firsts[i] = tuple.first;
+      seconds[i] = tuple.second;
+    }
+    lists.writeTo(buffer, new Tuple2(firsts, seconds), state);
+  }
+}
diff --git a/pkg/kernel/lib/text/text_serialization_verifier.dart b/pkg/kernel/lib/text/text_serialization_verifier.dart
index 78659ef..3fed367 100644
--- a/pkg/kernel/lib/text/text_serialization_verifier.dart
+++ b/pkg/kernel/lib/text/text_serialization_verifier.dart
@@ -10,7 +10,11 @@
 import '../text/text_reader.dart' show TextIterator;
 
 import '../text/text_serializer.dart'
-    show dartTypeSerializer, expressionSerializer, initializeSerializers;
+    show
+        dartTypeSerializer,
+        expressionSerializer,
+        initializeSerializers,
+        statementSerializer;
 
 import '../visitor.dart' show Visitor;
 
@@ -144,6 +148,28 @@
     }
   }
 
+  void makeStatementRoundTrip(Statement node) {
+    Uri uri = noUri;
+    int offset = noOffset;
+    Location location = node.location;
+    if (location != null) {
+      uri = location.file;
+      offset = node.fileOffset;
+    }
+
+    String initial = writeNode(node, statementSerializer, uri, offset);
+
+    // Do the round trip.
+    Statement deserialized =
+        readNode(initial, statementSerializer, uri, offset);
+    String serialized =
+        writeNode(deserialized, expressionSerializer, uri, offset);
+
+    if (initial != serialized) {
+      failures.add(new TextRoundTripFailure(initial, serialized, uri, offset));
+    }
+  }
+
   @override
   void defaultExpression(Expression node) {
     throw new UnsupportedError("defaultExpression");
@@ -262,6 +288,12 @@
   }
 
   @override
+  void visitSetConstantReference(SetConstant node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
   void visitMapConstantReference(MapConstant node) {
     storeLastSeenUriAndOffset(node);
     node.visitChildren(this);
@@ -346,12 +378,24 @@
   }
 
   @override
+  void visitSetConstant(SetConstant node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
   void visitMapConstant(MapConstant node) {
     storeLastSeenUriAndOffset(node);
     node.visitChildren(this);
   }
 
   @override
+  void visitInstanceCreation(InstanceCreation node) {
+    storeLastSeenUriAndOffset(node);
+    node.visitChildren(this);
+  }
+
+  @override
   void visitSymbolConstant(SymbolConstant node) {
     storeLastSeenUriAndOffset(node);
     node.visitChildren(this);
@@ -588,121 +632,121 @@
   @override
   void visitFunctionDeclaration(FunctionDeclaration node) {
     storeLastSeenUriAndOffset(node);
-    node.visitChildren(this);
+    makeStatementRoundTrip(node);
   }
 
   @override
   void visitVariableDeclaration(VariableDeclaration node) {
     storeLastSeenUriAndOffset(node);
-    node.visitChildren(this);
+    makeStatementRoundTrip(node);
   }
 
   @override
   void visitYieldStatement(YieldStatement node) {
     storeLastSeenUriAndOffset(node);
-    node.visitChildren(this);
+    makeStatementRoundTrip(node);
   }
 
   @override
   void visitTryFinally(TryFinally node) {
     storeLastSeenUriAndOffset(node);
-    node.visitChildren(this);
+    makeStatementRoundTrip(node);
   }
 
   @override
   void visitTryCatch(TryCatch node) {
     storeLastSeenUriAndOffset(node);
-    node.visitChildren(this);
+    makeStatementRoundTrip(node);
   }
 
   @override
   void visitReturnStatement(ReturnStatement node) {
     storeLastSeenUriAndOffset(node);
-    node.visitChildren(this);
+    makeStatementRoundTrip(node);
   }
 
   @override
   void visitIfStatement(IfStatement node) {
     storeLastSeenUriAndOffset(node);
-    node.visitChildren(this);
+    makeStatementRoundTrip(node);
   }
 
   @override
   void visitContinueSwitchStatement(ContinueSwitchStatement node) {
     storeLastSeenUriAndOffset(node);
-    node.visitChildren(this);
+    makeStatementRoundTrip(node);
   }
 
   @override
   void visitSwitchStatement(SwitchStatement node) {
     storeLastSeenUriAndOffset(node);
-    node.visitChildren(this);
+    makeStatementRoundTrip(node);
   }
 
   @override
   void visitForInStatement(ForInStatement node) {
     storeLastSeenUriAndOffset(node);
-    node.visitChildren(this);
+    makeStatementRoundTrip(node);
   }
 
   @override
   void visitForStatement(ForStatement node) {
     storeLastSeenUriAndOffset(node);
-    node.visitChildren(this);
+    makeStatementRoundTrip(node);
   }
 
   @override
   void visitDoStatement(DoStatement node) {
     storeLastSeenUriAndOffset(node);
-    node.visitChildren(this);
+    makeStatementRoundTrip(node);
   }
 
   @override
   void visitWhileStatement(WhileStatement node) {
     storeLastSeenUriAndOffset(node);
-    node.visitChildren(this);
+    makeStatementRoundTrip(node);
   }
 
   @override
   void visitBreakStatement(BreakStatement node) {
     storeLastSeenUriAndOffset(node);
-    node.visitChildren(this);
+    makeStatementRoundTrip(node);
   }
 
   @override
   void visitLabeledStatement(LabeledStatement node) {
     storeLastSeenUriAndOffset(node);
-    node.visitChildren(this);
+    makeStatementRoundTrip(node);
   }
 
   @override
   void visitAssertStatement(AssertStatement node) {
     storeLastSeenUriAndOffset(node);
-    node.visitChildren(this);
+    makeStatementRoundTrip(node);
   }
 
   @override
   void visitEmptyStatement(EmptyStatement node) {
     storeLastSeenUriAndOffset(node);
-    node.visitChildren(this);
+    makeStatementRoundTrip(node);
   }
 
   @override
   void visitAssertBlock(AssertBlock node) {
     storeLastSeenUriAndOffset(node);
-    node.visitChildren(this);
+    makeStatementRoundTrip(node);
   }
 
   @override
   void visitBlock(Block node) {
     storeLastSeenUriAndOffset(node);
-    node.visitChildren(this);
+    makeStatementRoundTrip(node);
   }
 
   @override
   void visitExpressionStatement(ExpressionStatement node) {
     storeLastSeenUriAndOffset(node);
-    node.visitChildren(this);
+    makeStatementRoundTrip(node);
   }
 
   @override
@@ -730,6 +774,12 @@
   }
 
   @override
+  void visitBlockExpression(BlockExpression node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
   void visitNullLiteral(NullLiteral node) {
     storeLastSeenUriAndOffset(node);
     makeExpressionRoundTrip(node);
@@ -844,6 +894,24 @@
   }
 
   @override
+  void visitListConcatenation(ListConcatenation node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitSetConcatenation(SetConcatenation node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
+  void visitMapConcatenation(MapConcatenation node) {
+    storeLastSeenUriAndOffset(node);
+    makeExpressionRoundTrip(node);
+  }
+
+  @override
   void visitConditionalExpression(ConditionalExpression node) {
     storeLastSeenUriAndOffset(node);
     makeExpressionRoundTrip(node);
diff --git a/pkg/kernel/lib/text/text_serializer.dart b/pkg/kernel/lib/text/text_serializer.dart
index b3a3595..f13dc82 100644
--- a/pkg/kernel/lib/text/text_serializer.dart
+++ b/pkg/kernel/lib/text/text_serializer.dart
@@ -388,37 +388,27 @@
       keyType: tuple.first, valueType: tuple.second, isConst: true);
 }
 
-class LetSerializer extends TextSerializer<Let> {
-  const LetSerializer();
+TextSerializer<Let> letSerializer = new Wrapped(
+    unwrapLet,
+    wrapLet,
+    new Bind(
+        new Binder(variableDeclarationSerializer, getVariableDeclarationName,
+            setVariableDeclarationName),
+        expressionSerializer));
 
-  Let readFrom(Iterator<Object> stream, DeserializationState state) {
-    VariableDeclaration variable =
-        variableDeclarationSerializer.readFrom(stream, state);
-    Expression body = expressionSerializer.readFrom(
-        stream,
-        new DeserializationState(
-            new DeserializationEnvironment(state.environment)
-              ..add(variable.name, variable),
-            state.nameRoot));
-    return new Let(variable, body);
-  }
-
-  void writeTo(StringBuffer buffer, Let object, SerializationState state) {
-    SerializationState bodyState =
-        new SerializationState(new SerializationEnvironment(state.environment));
-    VariableDeclaration variable = object.variable;
-    String oldVariableName = variable.name;
-    String newVariableName =
-        bodyState.environment.add(variable, oldVariableName);
-    variableDeclarationSerializer.writeTo(
-        buffer, variable..name = newVariableName, state);
-    variable.name = oldVariableName;
-    buffer.write(' ');
-    expressionSerializer.writeTo(buffer, object.body, bodyState);
-  }
+Tuple2<VariableDeclaration, Expression> unwrapLet(Let expression) {
+  return new Tuple2(expression.variable, expression.body);
 }
 
-TextSerializer<Let> letSerializer = const LetSerializer();
+Let wrapLet(Tuple2<VariableDeclaration, Expression> tuple) {
+  return new Let(tuple.first, tuple.second);
+}
+
+String getVariableDeclarationName(VariableDeclaration node) => node.name;
+
+void setVariableDeclarationName(VariableDeclaration node, String name) {
+  node.name = name;
+}
 
 TextSerializer<PropertyGet> propertyGetSerializer = new Wrapped(
     unwrapPropertyGet,
@@ -828,6 +818,50 @@
   constDeclarationSerializer,
 ]);
 
+TextSerializer<TypeParameter> typeParameterSerializer =
+    new Wrapped(unwrapTypeParameter, wrapTypeParameter, const DartString());
+
+String unwrapTypeParameter(TypeParameter node) => node.name;
+
+TypeParameter wrapTypeParameter(String name) => new TypeParameter(name);
+
+TextSerializer<List<TypeParameter>> typeParametersSerializer = new Zip(
+    new Rebind(
+        new Zip(
+            new Rebind(
+                new ListSerializer(new Binder(typeParameterSerializer,
+                    getTypeParameterName, setTypeParameterName)),
+                new ListSerializer(dartTypeSerializer)),
+            zipTypeParameterBound,
+            unzipTypeParameterBound),
+        new ListSerializer(dartTypeSerializer)),
+    zipTypeParameterDefaultType,
+    unzipTypeParameterDefaultType);
+
+String getTypeParameterName(TypeParameter node) => node.name;
+
+void setTypeParameterName(TypeParameter node, String name) {
+  node.name = name;
+}
+
+TypeParameter zipTypeParameterBound(TypeParameter node, DartType bound) {
+  return node..bound = bound;
+}
+
+Tuple2<TypeParameter, DartType> unzipTypeParameterBound(TypeParameter node) {
+  return new Tuple2(node, node.bound);
+}
+
+TypeParameter zipTypeParameterDefaultType(
+    TypeParameter node, DartType defaultType) {
+  return node..defaultType = defaultType;
+}
+
+Tuple2<TypeParameter, DartType> unzipTypeParameterDefaultType(
+    TypeParameter node) {
+  return new Tuple2(node, node.defaultType);
+}
+
 class DartTypeTagger extends DartTypeVisitor<String>
     implements Tagger<DartType> {
   const DartTypeTagger();
@@ -839,6 +873,7 @@
   String visitVoidType(VoidType _) => "void";
   String visitBottomType(BottomType _) => "bottom";
   String visitFunctionType(FunctionType _) => "->";
+  String visitTypeParameterType(TypeParameterType _) => "par";
 }
 
 TextSerializer<InvalidType> invalidTypeSerializer =
@@ -869,26 +904,93 @@
 
 BottomType wrapBottomType(void ignored) => const BottomType();
 
-// TODO(dmitryas):  Also handle typeParameters, nameParameters, and typedefType.
+// TODO(dmitryas):  Also handle nameParameters, and typedefType.
 TextSerializer<FunctionType> functionTypeSerializer = new Wrapped(
     unwrapFunctionType,
     wrapFunctionType,
-    Tuple3Serializer(new ListSerializer(dartTypeSerializer), const DartInt(),
-        dartTypeSerializer));
+    new Bind(
+        typeParametersSerializer,
+        new Tuple4Serializer(
+            new ListSerializer(dartTypeSerializer),
+            new ListSerializer(dartTypeSerializer),
+            new ListSerializer(namedTypeSerializer),
+            dartTypeSerializer)));
 
-Tuple3<List<DartType>, int, DartType> unwrapFunctionType(FunctionType type) {
-  return new Tuple3(
-      type.positionalParameters, type.requiredParameterCount, type.returnType);
+Tuple2<List<TypeParameter>,
+        Tuple4<List<DartType>, List<DartType>, List<NamedType>, DartType>>
+    unwrapFunctionType(FunctionType type) {
+  return new Tuple2(
+      type.typeParameters,
+      new Tuple4(
+          type.positionalParameters.sublist(0, type.requiredParameterCount),
+          type.positionalParameters.sublist(type.requiredParameterCount),
+          type.namedParameters,
+          type.returnType));
 }
 
-FunctionType wrapFunctionType(Tuple3<List<DartType>, int, DartType> tuple) {
-  return new FunctionType(tuple.first, tuple.third,
-      requiredParameterCount: tuple.second);
+FunctionType wrapFunctionType(
+    Tuple2<List<TypeParameter>,
+            Tuple4<List<DartType>, List<DartType>, List<NamedType>, DartType>>
+        tuple) {
+  return new FunctionType(
+      tuple.second.first + tuple.second.second, tuple.second.fourth,
+      requiredParameterCount: tuple.second.first.length,
+      typeParameters: tuple.first,
+      namedParameters: tuple.second.third);
+}
+
+TextSerializer<NamedType> namedTypeSerializer = new Wrapped(unwrapNamedType,
+    wrapNamedType, Tuple2Serializer(const DartString(), dartTypeSerializer));
+
+Tuple2<String, DartType> unwrapNamedType(NamedType namedType) {
+  return new Tuple2(namedType.name, namedType.type);
+}
+
+NamedType wrapNamedType(Tuple2<String, DartType> tuple) {
+  return new NamedType(tuple.first, tuple.second);
+}
+
+TextSerializer<TypeParameterType> typeParameterTypeSerializer = new Wrapped(
+    unwrapTypeParameterType,
+    wrapTypeParameterType,
+    Tuple2Serializer(
+        new ScopedUse<TypeParameter>(), new Optional(dartTypeSerializer)));
+
+Tuple2<TypeParameter, DartType> unwrapTypeParameterType(
+    TypeParameterType node) {
+  return new Tuple2(node.parameter, node.promotedBound);
+}
+
+TypeParameterType wrapTypeParameterType(Tuple2<TypeParameter, DartType> tuple) {
+  return new TypeParameterType(tuple.first, tuple.second);
 }
 
 Case<DartType> dartTypeSerializer =
     new Case.uninitialized(const DartTypeTagger());
 
+class StatementTagger extends StatementVisitor<String>
+    implements Tagger<Statement> {
+  const StatementTagger();
+
+  String tag(Statement statement) => statement.accept(this);
+
+  String visitExpressionStatement(ExpressionStatement _) => "expr";
+}
+
+TextSerializer<ExpressionStatement> expressionStatementSerializer = new Wrapped(
+    unwrapExpressionStatement, wrapExpressionStatement, expressionSerializer);
+
+Expression unwrapExpressionStatement(ExpressionStatement statement) {
+  return statement.expression;
+}
+
+ExpressionStatement wrapExpressionStatement(Expression expression) {
+  return new ExpressionStatement(expression);
+}
+
+Case<Statement> statementSerializer =
+    new Case.uninitialized(const StatementTagger());
+
 void initializeSerializers() {
   expressionSerializer.tags.addAll([
     "string",
@@ -986,6 +1088,7 @@
     "void",
     "bottom",
     "->",
+    "par",
   ]);
   dartTypeSerializer.serializers.addAll([
     invalidTypeSerializer,
@@ -993,5 +1096,12 @@
     voidTypeSerializer,
     bottomTypeSerializer,
     functionTypeSerializer,
+    typeParameterTypeSerializer,
+  ]);
+  statementSerializer.tags.addAll([
+    "expr",
+  ]);
+  statementSerializer.serializers.addAll([
+    expressionStatementSerializer,
   ]);
 }
diff --git a/pkg/kernel/lib/transformations/async.dart b/pkg/kernel/lib/transformations/async.dart
index 31fe3f3..3ea9fe2 100644
--- a/pkg/kernel/lib/transformations/async.dart
+++ b/pkg/kernel/lib/transformations/async.dart
@@ -90,12 +90,12 @@
   /// surrounding context.
   Expression rewrite(Expression expression, List<Statement> outer) {
     assert(statements.isEmpty);
-    assert(nameIndex == 0);
+    var saved = seenAwait;
     seenAwait = false;
     Expression result = expression.accept(this);
     outer.addAll(statements.reversed);
     statements.clear();
-    nameIndex = 0;
+    seenAwait = seenAwait || saved;
     return result;
   }
 
@@ -503,4 +503,42 @@
         new RecursiveContinuationRewriter(continuationRewriter.helper);
     return node.accept(nestedRewriter);
   }
+
+  TreeNode visitBlockExpression(BlockExpression expr) {
+    return transform(expr, () {
+      expr.value = expr.value.accept(this)..parent = expr;
+      List<Statement> body = <Statement>[];
+      for (Statement stmt in expr.body.statements.reversed) {
+        Statement translation = stmt.accept(this);
+        if (translation != null) body.add(translation);
+      }
+      expr.body = new Block(body.reversed.toList())..parent = expr;
+    });
+  }
+
+  TreeNode defaultStatement(Statement stmt) {
+    // This method translates a statement nested in an expression (e.g., in a
+    // block expression).  It produces a translated statement, a list of
+    // statements which are side effects necessary for any await, and a flag
+    // indicating whether there was an await in the statement or to its right.
+    // The translated statement can be null in the case where there was already
+    // an await to the right.
+
+    // The translation is accumulating two lists of statements, an inner list
+    // which is a reversed list of effects needed for the current expression and
+    // an outer list which represents the block containing the current
+    // statement.  We need to preserve both of those from side effects.
+    List<Statement> savedInner = statements;
+    List<Statement> savedOuter = continuationRewriter.statements;
+    statements = <Statement>[];
+    continuationRewriter.statements = <Statement>[];
+    stmt.accept(continuationRewriter);
+
+    List<Statement> results = continuationRewriter.statements;
+    statements = savedInner;
+    continuationRewriter.statements = savedOuter;
+    if (!seenAwait && results.length == 1) return results.first;
+    statements.addAll(results.reversed);
+    return null;
+  }
 }
diff --git a/pkg/kernel/lib/transformations/constants.dart b/pkg/kernel/lib/transformations/constants.dart
deleted file mode 100644
index eceaa13..0000000
--- a/pkg/kernel/lib/transformations/constants.dart
+++ /dev/null
@@ -1,1752 +0,0 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-/// This library implements a kernel2kernel constant evaluation transformation.
-///
-/// Even though it is expected that the frontend does not emit kernel AST which
-/// contains compile-time errors, this transformation still performs some
-/// valiation and throws a [ConstantEvaluationError] if there was a compile-time
-/// errors.
-///
-/// Due to the lack information which is is only available in the front-end,
-/// this validation is incomplete (e.g. whether an integer literal used the
-/// hexadecimal syntax or not).
-///
-/// Furthermore due to the lowering of certain constructs in the front-end
-/// (e.g. '??') we need to support a super-set of the normal constant expression
-/// language.  Issue(http://dartbug.com/31799)
-library kernel.transformations.constants;
-
-import 'dart:io' as io;
-
-import '../ast.dart';
-import '../class_hierarchy.dart';
-import '../core_types.dart';
-import '../kernel.dart';
-import '../type_algebra.dart';
-import '../type_environment.dart';
-
-Component transformComponent(Component component, ConstantsBackend backend,
-    Map<String, String> environmentDefines, ErrorReporter errorReporter,
-    {bool keepFields: false,
-    bool legacyMode: false,
-    bool enableAsserts: false,
-    bool evaluateAnnotations: true,
-    CoreTypes coreTypes,
-    ClassHierarchy hierarchy}) {
-  coreTypes ??= new CoreTypes(component);
-  hierarchy ??= new ClassHierarchy(component);
-
-  final typeEnvironment =
-      new TypeEnvironment(coreTypes, hierarchy, legacyMode: legacyMode);
-
-  transformLibraries(component.libraries, backend, environmentDefines,
-      typeEnvironment, errorReporter,
-      keepFields: keepFields,
-      enableAsserts: enableAsserts,
-      evaluateAnnotations: evaluateAnnotations);
-  return component;
-}
-
-void transformLibraries(
-    List<Library> libraries,
-    ConstantsBackend backend,
-    Map<String, String> environmentDefines,
-    TypeEnvironment typeEnvironment,
-    ErrorReporter errorReporter,
-    {bool keepFields: false,
-    bool keepVariables: false,
-    bool evaluateAnnotations: true,
-    bool enableAsserts: false}) {
-  final ConstantsTransformer constantsTransformer = new ConstantsTransformer(
-      backend,
-      environmentDefines,
-      keepFields,
-      keepVariables,
-      evaluateAnnotations,
-      typeEnvironment,
-      enableAsserts,
-      errorReporter);
-  for (final Library library in libraries) {
-    constantsTransformer.convertLibrary(library);
-  }
-}
-
-class ConstantsTransformer extends Transformer {
-  final ConstantEvaluator constantEvaluator;
-  final TypeEnvironment typeEnvironment;
-
-  /// Whether to preserve constant [Field]s.  All use-sites will be rewritten.
-  final bool keepFields;
-  final bool keepVariables;
-  final bool evaluateAnnotations;
-
-  ConstantsTransformer(
-      ConstantsBackend backend,
-      Map<String, String> environmentDefines,
-      this.keepFields,
-      this.keepVariables,
-      this.evaluateAnnotations,
-      this.typeEnvironment,
-      bool enableAsserts,
-      ErrorReporter errorReporter)
-      : constantEvaluator = new ConstantEvaluator(backend, environmentDefines,
-            typeEnvironment, enableAsserts, errorReporter);
-
-  // Transform the library/class members:
-
-  void convertLibrary(Library library) {
-    transformAnnotations(library.annotations, library);
-
-    transformList(library.dependencies, this, library);
-    transformList(library.parts, this, library);
-    transformList(library.typedefs, this, library);
-    transformList(library.classes, this, library);
-    transformList(library.procedures, this, library);
-    transformList(library.fields, this, library);
-
-    if (!keepFields) {
-      // The transformer API does not iterate over `Library.additionalExports`,
-      // so we manually delete the references to shaken nodes.
-      library.additionalExports.removeWhere((Reference reference) {
-        return reference.canonicalName == null;
-      });
-    }
-  }
-
-  visitLibraryPart(LibraryPart node) {
-    constantEvaluator.withNewEnvironment(() {
-      transformAnnotations(node.annotations, node);
-    });
-    return node;
-  }
-
-  visitLibraryDependency(LibraryDependency node) {
-    constantEvaluator.withNewEnvironment(() {
-      transformAnnotations(node.annotations, node);
-    });
-    return node;
-  }
-
-  visitClass(Class node) {
-    constantEvaluator.withNewEnvironment(() {
-      transformAnnotations(node.annotations, node);
-      transformList(node.fields, this, node);
-      transformList(node.typeParameters, this, node);
-      transformList(node.constructors, this, node);
-      transformList(node.procedures, this, node);
-      transformList(node.redirectingFactoryConstructors, this, node);
-    });
-    return node;
-  }
-
-  visitProcedure(Procedure node) {
-    constantEvaluator.withNewEnvironment(() {
-      transformAnnotations(node.annotations, node);
-      node.function = node.function.accept(this)..parent = node;
-    });
-    return node;
-  }
-
-  visitConstructor(Constructor node) {
-    constantEvaluator.withNewEnvironment(() {
-      transformAnnotations(node.annotations, node);
-      transformList(node.initializers, this, node);
-      node.function = node.function.accept(this)..parent = node;
-    });
-    return node;
-  }
-
-  visitTypedef(Typedef node) {
-    constantEvaluator.withNewEnvironment(() {
-      transformAnnotations(node.annotations, node);
-      transformList(node.typeParameters, this, node);
-      transformList(node.typeParametersOfFunctionType, this, node);
-      transformList(node.positionalParameters, this, node);
-      transformList(node.namedParameters, this, node);
-    });
-    return node;
-  }
-
-  visitRedirectingFactoryConstructor(RedirectingFactoryConstructor node) {
-    constantEvaluator.withNewEnvironment(() {
-      transformAnnotations(node.annotations, node);
-      transformList(node.typeParameters, this, node);
-      transformList(node.positionalParameters, this, node);
-      transformList(node.namedParameters, this, node);
-    });
-    return node;
-  }
-
-  visitTypeParameter(TypeParameter node) {
-    transformAnnotations(node.annotations, node);
-    return node;
-  }
-
-  void transformAnnotations(List<Expression> nodes, TreeNode parent) {
-    if (evaluateAnnotations && nodes.length > 0) {
-      transformExpressions(nodes, parent);
-    }
-  }
-
-  void transformExpressions(List<Expression> nodes, TreeNode parent) {
-    constantEvaluator.withNewEnvironment(() {
-      for (int i = 0; i < nodes.length; ++i) {
-        nodes[i] = tryEvaluateAndTransformWithContext(parent, nodes[i])
-          ..parent = parent;
-      }
-    });
-  }
-
-  // Handle definition of constants:
-
-  visitFunctionNode(FunctionNode node) {
-    final positionalParameterCount = node.positionalParameters.length;
-    for (int i = node.requiredParameterCount;
-        i < positionalParameterCount;
-        ++i) {
-      final VariableDeclaration variable = node.positionalParameters[i];
-      transformAnnotations(variable.annotations, variable);
-      if (variable.initializer != null) {
-        variable.initializer =
-            tryEvaluateAndTransformWithContext(variable, variable.initializer)
-              ..parent = node;
-      }
-    }
-    for (final VariableDeclaration variable in node.namedParameters) {
-      transformAnnotations(variable.annotations, variable);
-      if (variable.initializer != null) {
-        variable.initializer =
-            tryEvaluateAndTransformWithContext(variable, variable.initializer)
-              ..parent = node;
-      }
-    }
-    if (node.body != null) {
-      node.body = node.body.accept(this)..parent = node;
-    }
-    return node;
-  }
-
-  visitVariableDeclaration(VariableDeclaration node) {
-    transformAnnotations(node.annotations, node);
-
-    if (node.initializer != null) {
-      if (node.isConst) {
-        final Constant constant =
-            tryEvaluateWithContext(node, node.initializer);
-
-        // If there was a constant evaluation error we will not continue and
-        // simply keep the old [node].
-        if (constant != null) {
-          constantEvaluator.env.addVariableValue(node, constant);
-
-          if (keepVariables) {
-            // So the value of the variable is still available for debugging
-            // purposes we convert the constant variable to be a final variable
-            // initialized to the evaluated constant expression.
-            node.initializer = new ConstantExpression(constant)..parent = node;
-            node.isFinal = true;
-            node.isConst = false;
-          } else {
-            // Since we convert all use-sites of constants, the constant
-            // [VariableDeclaration] is unused and we'll therefore remove it.
-            return null;
-          }
-        }
-      } else {
-        node.initializer = node.initializer.accept(this)..parent = node;
-      }
-    }
-    return node;
-  }
-
-  visitField(Field node) {
-    return constantEvaluator.withNewEnvironment(() {
-      if (node.isConst) {
-        // Since we convert all use-sites of constants, the constant [Field]
-        // cannot be referenced anymore.  We therefore get rid of it if
-        // [keepFields] was not specified.
-        if (!keepFields) {
-          return null;
-        }
-
-        // Otherwise we keep the constant [Field] and convert it's initializer.
-        transformAnnotations(node.annotations, node);
-        if (node.initializer != null) {
-          node.initializer =
-              tryEvaluateAndTransformWithContext(node, node.initializer)
-                ..parent = node;
-        }
-      } else {
-        transformAnnotations(node.annotations, node);
-        if (node.initializer != null) {
-          node.initializer = node.initializer.accept(this)..parent = node;
-        }
-      }
-      return node;
-    });
-  }
-
-  // Handle use-sites of constants (and "inline" constant expressions):
-
-  visitSymbolLiteral(SymbolLiteral node) {
-    return new ConstantExpression(constantEvaluator.evaluate(node));
-  }
-
-  visitStaticGet(StaticGet node) {
-    final Member target = node.target;
-    if (target is Field && target.isConst) {
-      final Constant constant =
-          tryEvaluateWithContext(node, target.initializer);
-      return constant != null ? new ConstantExpression(constant) : node;
-    } else if (target is Procedure && target.kind == ProcedureKind.Method) {
-      return tryEvaluateAndTransformWithContext(node, node);
-    }
-    return super.visitStaticGet(node);
-  }
-
-  visitSwitchCase(SwitchCase node) {
-    transformExpressions(node.expressions, node);
-    return super.visitSwitchCase(node);
-  }
-
-  visitVariableGet(VariableGet node) {
-    if (node.variable.isConst) {
-      return tryEvaluateAndTransformWithContext(node, node);
-    }
-    return super.visitVariableGet(node);
-  }
-
-  visitListLiteral(ListLiteral node) {
-    if (node.isConst) {
-      return tryEvaluateAndTransformWithContext(node, node);
-    }
-    return super.visitListLiteral(node);
-  }
-
-  visitMapLiteral(MapLiteral node) {
-    if (node.isConst) {
-      return tryEvaluateAndTransformWithContext(node, node);
-    }
-    return super.visitMapLiteral(node);
-  }
-
-  visitConstructorInvocation(ConstructorInvocation node) {
-    if (node.isConst) {
-      return tryEvaluateAndTransformWithContext(node, node);
-    }
-    return super.visitConstructorInvocation(node);
-  }
-
-  visitStaticInvocation(StaticInvocation node) {
-    if (node.isConst) {
-      return tryEvaluateAndTransformWithContext(node, node);
-    }
-    return super.visitStaticInvocation(node);
-  }
-
-  visitConstantExpression(ConstantExpression node) {
-    Constant constant = node.constant;
-    if (constant is UnevaluatedConstant) {
-      Expression expression = constant.expression;
-      return tryEvaluateAndTransformWithContext(expression, expression);
-    } else {
-      node.constant = constantEvaluator.canonicalize(constant);
-      return node;
-    }
-  }
-
-  tryEvaluateAndTransformWithContext(TreeNode treeContext, Expression node) {
-    final Constant constant = tryEvaluateWithContext(treeContext, node);
-    return constant != null ? new ConstantExpression(constant) : node;
-  }
-
-  tryEvaluateWithContext(TreeNode treeContext, Expression node) {
-    if (treeContext == node) {
-      return constantEvaluator.evaluate(node);
-    }
-
-    return constantEvaluator.runInsideContext(treeContext, () {
-      return constantEvaluator.evaluate(node);
-    });
-  }
-}
-
-class ConstantEvaluator extends RecursiveVisitor {
-  final ConstantsBackend backend;
-  Map<String, String> environmentDefines;
-  final CoreTypes coreTypes;
-  final TypeEnvironment typeEnvironment;
-  final bool enableAsserts;
-  final ErrorReporter errorReporter;
-
-  final isInstantiated = new IsInstantiatedVisitor().isInstantiated;
-
-  final Map<Constant, Constant> canonicalizationCache;
-  final Map<Node, Object> nodeCache;
-
-  final NullConstant nullConstant = new NullConstant();
-  final BoolConstant trueConstant = new BoolConstant(true);
-  final BoolConstant falseConstant = new BoolConstant(false);
-
-  final List<TreeNode> contextChain = [];
-
-  InstanceBuilder instanceBuilder;
-  EvaluationEnvironment env;
-
-  ConstantEvaluator(this.backend, this.environmentDefines, this.typeEnvironment,
-      this.enableAsserts, this.errorReporter)
-      : coreTypes = typeEnvironment.coreTypes,
-        canonicalizationCache = <Constant, Constant>{},
-        nodeCache = <Node, Constant>{},
-        env = new EvaluationEnvironment();
-
-  /// Evaluates [node] and possibly cache the evaluation result.
-  Constant evaluate(Expression node) {
-    try {
-      return _evaluateSubexpression(node);
-    } on _AbortCurrentEvaluation catch (e) {
-      return new UnevaluatedConstant(new InvalidExpression(e.message));
-    }
-  }
-
-  /// Evaluates [node] and possibly cache the evaluation result.
-  /// @throws _AbortCurrentEvaluation if expression can't be evaluated.
-  Constant _evaluateSubexpression(Expression node) {
-    if (node == null) return nullConstant;
-    if (env.isEmpty) {
-      // We only try to evaluate the same [node] *once* within an empty
-      // environment.
-      if (nodeCache.containsKey(node)) {
-        final Constant constant = nodeCache[node];
-        if (constant == null)
-          throw new _AbortCurrentEvaluation(
-              errorReporter.circularity(contextChain, node));
-        return constant;
-      }
-
-      nodeCache[node] = null;
-      return nodeCache[node] = node.accept(this);
-    }
-    return node.accept(this);
-  }
-
-  Constant runInsideContext(TreeNode node, Constant fun()) {
-    try {
-      pushContext(node);
-      return fun();
-    } finally {
-      popContext(node);
-    }
-  }
-
-  Constant runInsideContextIfNoContext(TreeNode node, Constant fun()) {
-    if (contextChain.isEmpty) {
-      return runInsideContext(node, fun);
-    } else {
-      return fun();
-    }
-  }
-
-  pushContext(TreeNode contextNode) {
-    contextChain.add(contextNode);
-  }
-
-  popContext(TreeNode contextNode) {
-    assert(contextChain.last == contextNode);
-    contextChain.length = contextChain.length - 1;
-  }
-
-  defaultTreeNode(Node node) {
-    // Only a subset of the expression language is valid for constant
-    // evaluation.
-    throw 'Constant evaluation has no support for ${node.runtimeType} yet!';
-  }
-
-  visitNullLiteral(NullLiteral node) => nullConstant;
-
-  visitBoolLiteral(BoolLiteral node) {
-    return node.value ? trueConstant : falseConstant;
-  }
-
-  visitIntLiteral(IntLiteral node) {
-    // The frontend will ensure the integer literals are in signed 64-bit
-    // range.
-    return canonicalize(new IntConstant(node.value));
-  }
-
-  visitDoubleLiteral(DoubleLiteral node) {
-    return canonicalize(new DoubleConstant(node.value));
-  }
-
-  visitStringLiteral(StringLiteral node) {
-    return canonicalize(new StringConstant(node.value));
-  }
-
-  visitTypeLiteral(TypeLiteral node) {
-    final DartType type = evaluateDartType(node, node.type);
-    return canonicalize(new TypeLiteralConstant(type));
-  }
-
-  visitConstantExpression(ConstantExpression node) {
-    // If there were already constants in the AST then we make sure we
-    // re-canonicalize them.  After running the transformer we will therefore
-    // have a fully-canonicalized constant DAG with roots coming from the
-    // [ConstantExpression] nodes in the AST.
-    return canonicalize(node.constant);
-  }
-
-  visitListLiteral(ListLiteral node) {
-    if (!node.isConst) {
-      throw new _AbortCurrentEvaluation(
-          errorReporter.nonConstLiteral(contextChain, node, 'List'));
-    }
-    final List<Constant> entries = new List<Constant>(node.expressions.length);
-    for (int i = 0; i < node.expressions.length; ++i) {
-      entries[i] = node.expressions[i].accept(this);
-    }
-    final DartType typeArgument = evaluateDartType(node, node.typeArgument);
-    return canonicalize(new ListConstant(typeArgument, entries));
-  }
-
-  visitMapLiteral(MapLiteral node) {
-    if (!node.isConst) {
-      throw new _AbortCurrentEvaluation(
-          errorReporter.nonConstLiteral(contextChain, node, 'Map'));
-    }
-    final Set<Constant> usedKeys = new Set<Constant>();
-    final List<ConstantMapEntry> entries =
-        new List<ConstantMapEntry>(node.entries.length);
-    for (int i = 0; i < node.entries.length; ++i) {
-      final key = node.entries[i].key.accept(this);
-      final value = node.entries[i].value.accept(this);
-      if (!usedKeys.add(key)) {
-        // TODO(kustermann): We should change the context handling from just
-        // capturing the `TreeNode`s to a `(TreeNode, String message)` tuple and
-        // report where the first key with the same value was.
-        throw new _AbortCurrentEvaluation(
-            errorReporter.duplicateKey(contextChain, node.entries[i], key));
-      }
-      entries[i] = new ConstantMapEntry(key, value);
-    }
-    final DartType keyType = evaluateDartType(node, node.keyType);
-    final DartType valueType = evaluateDartType(node, node.valueType);
-    return canonicalize(new MapConstant(keyType, valueType, entries));
-  }
-
-  visitFunctionExpression(FunctionExpression node) {
-    throw new _AbortCurrentEvaluation(
-        errorReporter.nonConstLiteral(contextChain, node, 'Function'));
-  }
-
-  visitConstructorInvocation(ConstructorInvocation node) {
-    final Constructor constructor = node.target;
-    final Class klass = constructor.enclosingClass;
-    if (!constructor.isConst) {
-      throw 'The front-end should ensure we do not encounter a '
-          'constructor invocation of a non-const constructor.';
-    }
-    if (constructor.function.body != null &&
-        constructor.function.body is! EmptyStatement) {
-      throw 'Constructor "$node" has non-trivial body "${constructor.function.body.runtimeType}".';
-    }
-    if (constructor.isInExternalLibrary &&
-        constructor.initializers.isEmpty &&
-        constructor.enclosingClass.supertype != null) {
-      // The constructor is unavailable due to separate compilation.
-      return new UnevaluatedConstant(new ConstructorInvocation(
-          constructor, unevaluatedArguments(node.arguments),
-          isConst: true));
-    }
-    if (klass.isAbstract) {
-      throw 'Constructor "$node" belongs to abstract class "${klass}".';
-    }
-
-    final typeArguments = evaluateTypeArguments(node, node.arguments);
-    final positionals = evaluatePositionalArguments(node.arguments);
-    final named = evaluateNamedArguments(node.arguments);
-
-    // Fill in any missing type arguments with "dynamic".
-    for (int i = typeArguments.length; i < klass.typeParameters.length; i++) {
-      typeArguments.add(const DynamicType());
-    }
-
-    // Start building a new instance.
-    return withNewInstanceBuilder(klass, typeArguments, () {
-      return runInsideContextIfNoContext(node, () {
-        // "Run" the constructor (and any super constructor calls), which will
-        // initialize the fields of the new instance.
-        handleConstructorInvocation(
-            constructor, typeArguments, positionals, named);
-        final InstanceConstant result = instanceBuilder.buildInstance();
-
-        // Special case the dart:core's Symbol class here and convert it to a
-        // [SymbolConstant].  For invalid values we report a compile-time error.
-        if (result.classNode == coreTypes.internalSymbolClass) {
-          // The dart:_internal's Symbol class has only the name field.
-          assert(coreTypes.internalSymbolClass.fields
-                  .where((f) => !f.isStatic)
-                  .length ==
-              1);
-          final nameValue = result.fieldValues.values.single;
-
-          if (nameValue is StringConstant &&
-              isValidSymbolName(nameValue.value)) {
-            return canonicalize(new SymbolConstant(nameValue.value, null));
-          }
-          throw new _AbortCurrentEvaluation(errorReporter.invalidSymbolName(
-              contextChain, node.arguments.positional.first, nameValue));
-        }
-
-        return canonicalize(result);
-      });
-    });
-  }
-
-  bool isValidSymbolName(String name) {
-    // See https://api.dartlang.org/stable/2.0.0/dart-core/Symbol/Symbol.html:
-    //
-    //  A qualified name is a valid name preceded by a public identifier name and
-    //  a '.', e.g., foo.bar.baz= is a qualified version of baz=.
-    //
-    //  That means that the content of the name String must be either
-    //     - a valid public Dart identifier (that is, an identifier not
-    //       starting with "_"),
-    //     - such an identifier followed by "=" (a setter name),
-    //     - the name of a declarable operator,
-    //     - 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).
-
-    const operatorNames = const <String>[
-      '+',
-      '-',
-      '*',
-      '/',
-      '%',
-      '~/',
-      '&',
-      '|',
-      '^',
-      '~',
-      '<<',
-      '>>',
-      '<',
-      '<=',
-      '>',
-      '>=',
-      '==',
-      '[]',
-      '[]=',
-      'unary-'
-    ];
-
-    if (name == null) return false;
-    if (name == '') return true;
-
-    final parts = name.split('.');
-
-    // Each qualifier must be a public identifier.
-    for (int i = 0; i < parts.length - 1; ++i) {
-      if (!isValidPublicIdentifier(parts[i])) return false;
-    }
-
-    String last = parts.last;
-    if (operatorNames.contains(last)) {
-      return true;
-    }
-    if (last.endsWith('=')) {
-      last = last.substring(0, last.length - 1);
-    }
-    if (!isValidPublicIdentifier(last)) return false;
-
-    return true;
-  }
-
-  /// From the Dart Language specification:
-  ///
-  ///   IDENTIFIER:
-  ///     IDENTIFIER_START IDENTIFIER_PART*
-  ///
-  ///   IDENTIFIER_START:
-  ///       IDENTIFIER_START_NO_DOLLAR | ‘$’
-  ///
-  ///   IDENTIFIER_PART:
-  ///       IDENTIFIER_START | DIGIT
-  ///
-  ///   IDENTIFIER_NO_DOLLAR:
-  ///     IDENTIFIER_START_NO_DOLLAR IDENTIFIER_PART_NO_DOLLAR*
-  ///
-  ///   IDENTIFIER_START_NO_DOLLAR:
-  ///       LETTER | '_'
-  ///
-  ///   IDENTIFIER_PART_NO_DOLLAR:
-  ///       IDENTIFIER_START_NO_DOLLAR | DIGIT
-  ///
-  static final publicIdentifierRegExp =
-      new RegExp(r'^[a-zA-Z$][a-zA-Z0-9_$]*$');
-
-  static const nonUsableKeywords = const <String>[
-    'assert',
-    'break',
-    'case',
-    'catch',
-    'class',
-    'const',
-    'continue',
-    'default',
-    'do',
-    'else',
-    'enum',
-    'extends',
-    'false',
-    'final',
-    'finally',
-    'for',
-    'if',
-    'in',
-    'is',
-    'new',
-    'null',
-    'rethrow',
-    'return',
-    'super',
-    'switch',
-    'this',
-    'throw',
-    'true',
-    'try',
-    'var',
-    'while',
-    'with',
-  ];
-
-  bool isValidPublicIdentifier(String name) {
-    return publicIdentifierRegExp.hasMatch(name) &&
-        !nonUsableKeywords.contains(name);
-  }
-
-  handleConstructorInvocation(
-      Constructor constructor,
-      List<DartType> typeArguments,
-      List<Constant> positionalArguments,
-      Map<String, Constant> namedArguments) {
-    return runInsideContext(constructor, () {
-      return withNewEnvironment(() {
-        final Class klass = constructor.enclosingClass;
-        final FunctionNode function = constructor.function;
-
-        // We simulate now the constructor invocation.
-
-        // Step 1) Map type arguments and normal arguments from caller to callee.
-        for (int i = 0; i < klass.typeParameters.length; i++) {
-          env.addTypeParameterValue(klass.typeParameters[i], typeArguments[i]);
-        }
-        for (int i = 0; i < function.positionalParameters.length; i++) {
-          final VariableDeclaration parameter =
-              function.positionalParameters[i];
-          final Constant value = (i < positionalArguments.length)
-              ? positionalArguments[i]
-              : _evaluateSubexpression(parameter.initializer);
-          env.addVariableValue(parameter, value);
-        }
-        for (final VariableDeclaration parameter in function.namedParameters) {
-          final Constant value = namedArguments[parameter.name] ??
-              _evaluateSubexpression(parameter.initializer);
-          env.addVariableValue(parameter, value);
-        }
-
-        // Step 2) Run all initializers (including super calls) with environment setup.
-        for (final Field field in klass.fields) {
-          if (!field.isStatic) {
-            instanceBuilder.setFieldValue(
-                field, _evaluateSubexpression(field.initializer));
-          }
-        }
-        for (final Initializer init in constructor.initializers) {
-          if (init is FieldInitializer) {
-            instanceBuilder.setFieldValue(
-                init.field, _evaluateSubexpression(init.value));
-          } else if (init is LocalInitializer) {
-            final VariableDeclaration variable = init.variable;
-            env.addVariableValue(
-                variable, _evaluateSubexpression(variable.initializer));
-          } else if (init is SuperInitializer) {
-            handleConstructorInvocation(
-                init.target,
-                evaluateSuperTypeArguments(
-                    init, constructor.enclosingClass.supertype),
-                evaluatePositionalArguments(init.arguments),
-                evaluateNamedArguments(init.arguments));
-          } else if (init is RedirectingInitializer) {
-            // Since a redirecting constructor targets a constructor of the same
-            // class, we pass the same [typeArguments].
-            handleConstructorInvocation(
-                init.target,
-                typeArguments,
-                evaluatePositionalArguments(init.arguments),
-                evaluateNamedArguments(init.arguments));
-          } else if (init is AssertInitializer) {
-            if (enableAsserts) {
-              final Constant condition = init.statement.condition.accept(this);
-
-              if (condition is BoolConstant) {
-                if (!condition.value) {
-                  final Constant message = init.statement.message?.accept(this);
-                  if (message == null) {
-                    throw new _AbortCurrentEvaluation(
-                        errorReporter.failedAssertion(
-                            contextChain, init.statement.condition, null));
-                  } else if (message is StringConstant) {
-                    throw new _AbortCurrentEvaluation(
-                        errorReporter.failedAssertion(contextChain,
-                            init.statement.condition, message.value));
-                  }
-                  throw new _AbortCurrentEvaluation(
-                      errorReporter.invalidDartType(
-                          contextChain,
-                          init.statement.message,
-                          message,
-                          typeEnvironment.stringType));
-                }
-              } else {
-                throw new _AbortCurrentEvaluation(errorReporter.invalidDartType(
-                    contextChain,
-                    init.statement.condition,
-                    condition,
-                    typeEnvironment.boolType));
-              }
-            }
-          } else {
-            throw new Exception(
-                'No support for handling initializer of type "${init.runtimeType}".');
-          }
-        }
-      });
-    });
-  }
-
-  visitInvalidExpression(InvalidExpression node) {
-    throw new _AbortCurrentEvaluation(node.message);
-  }
-
-  visitMethodInvocation(MethodInvocation node) {
-    // We have no support for generic method invocation atm.
-    assert(node.arguments.named.isEmpty);
-
-    final Constant receiver = _evaluateSubexpression(node.receiver);
-    final List<Constant> arguments =
-        evaluatePositionalArguments(node.arguments);
-
-    // TODO(http://dartbug.com/31799): Ensure we only invoke ==/!= on
-    // null/bool/int/double/String objects.
-
-    // Handle == and != first (it's common between all types).
-    if (arguments.length == 1 && node.name.name == '==') {
-      final right = arguments[0];
-      return receiver == right ? trueConstant : falseConstant;
-    }
-    if (arguments.length == 1 && node.name.name == '!=') {
-      final right = arguments[0];
-      return receiver != right ? trueConstant : falseConstant;
-    }
-
-    // This is a white-listed set of methods we need to support on constants.
-    if (receiver is StringConstant) {
-      if (arguments.length == 1) {
-        switch (node.name.name) {
-          case '+':
-            final Constant other = arguments[0];
-            if (other is StringConstant) {
-              return canonicalize(
-                  new StringConstant(receiver.value + other.value));
-            }
-            throw new _AbortCurrentEvaluation(
-                errorReporter.invalidBinaryOperandType(
-                    contextChain,
-                    node,
-                    receiver,
-                    '+',
-                    typeEnvironment.stringType,
-                    other.getType(typeEnvironment)));
-        }
-      }
-    } else if (receiver is BoolConstant) {
-      if (arguments.length == 1) {
-        switch (node.name.name) {
-          case '!':
-            return !receiver.value ? trueConstant : falseConstant;
-        }
-      } else if (arguments.length == 2) {
-        final right = arguments[0];
-        if (right is BoolConstant) {
-          switch (node.name.name) {
-            case '&&':
-              return (receiver.value && right.value)
-                  ? trueConstant
-                  : falseConstant;
-            case '||':
-              return (receiver.value || right.value)
-                  ? trueConstant
-                  : falseConstant;
-          }
-        }
-        throw new _AbortCurrentEvaluation(
-            errorReporter.invalidBinaryOperandType(
-                contextChain,
-                node,
-                receiver,
-                '${node.name.name}',
-                typeEnvironment.boolType,
-                right.getType(typeEnvironment)));
-      }
-    } else if (receiver is IntConstant) {
-      if (arguments.length == 0) {
-        switch (node.name.name) {
-          case 'unary-':
-            return canonicalize(new IntConstant(-receiver.value));
-          case '~':
-            return canonicalize(new IntConstant(~receiver.value));
-        }
-      } else if (arguments.length == 1) {
-        final Constant other = arguments[0];
-        final op = node.name.name;
-        if (other is IntConstant) {
-          if ((op == '<<' || op == '>>') && other.value < 0) {
-            throw new _AbortCurrentEvaluation(errorReporter.negativeShift(
-                contextChain,
-                node.arguments.positional.first,
-                receiver,
-                op,
-                other));
-          }
-          switch (op) {
-            case '|':
-              return canonicalize(
-                  new IntConstant(receiver.value | other.value));
-            case '&':
-              return canonicalize(
-                  new IntConstant(receiver.value & other.value));
-            case '^':
-              return canonicalize(
-                  new IntConstant(receiver.value ^ other.value));
-            case '<<':
-              return canonicalize(
-                  new IntConstant(receiver.value << other.value));
-            case '>>':
-              return canonicalize(
-                  new IntConstant(receiver.value >> other.value));
-          }
-        }
-
-        if (other is IntConstant) {
-          if (other.value == 0 && (op == '%' || op == '~/')) {
-            throw new _AbortCurrentEvaluation(errorReporter.zeroDivisor(
-                contextChain, node.arguments.positional.first, receiver, op));
-          }
-
-          return evaluateBinaryNumericOperation(
-              node.name.name, receiver.value, other.value, node);
-        } else if (other is DoubleConstant) {
-          return evaluateBinaryNumericOperation(
-              node.name.name, receiver.value, other.value, node);
-        }
-        throw new _AbortCurrentEvaluation(
-            errorReporter.invalidBinaryOperandType(
-                contextChain,
-                node,
-                receiver,
-                '${node.name.name}',
-                typeEnvironment.numType,
-                other.getType(typeEnvironment)));
-      }
-    } else if (receiver is DoubleConstant) {
-      if (arguments.length == 0) {
-        switch (node.name.name) {
-          case 'unary-':
-            return canonicalize(new DoubleConstant(-receiver.value));
-        }
-      } else if (arguments.length == 1) {
-        final Constant other = arguments[0];
-
-        if (other is IntConstant || other is DoubleConstant) {
-          final num value = (other is IntConstant)
-              ? other.value
-              : (other as DoubleConstant).value;
-          return evaluateBinaryNumericOperation(
-              node.name.name, receiver.value, value, node);
-        }
-        throw new _AbortCurrentEvaluation(
-            errorReporter.invalidBinaryOperandType(
-                contextChain,
-                node,
-                receiver,
-                '${node.name.name}',
-                typeEnvironment.numType,
-                other.getType(typeEnvironment)));
-      }
-    }
-    throw new _AbortCurrentEvaluation(errorReporter.invalidMethodInvocation(
-        contextChain, node, receiver, node.name.name));
-  }
-
-  visitLogicalExpression(LogicalExpression node) {
-    final Constant left = _evaluateSubexpression(node.left);
-    switch (node.operator) {
-      case '||':
-        if (left is BoolConstant) {
-          if (left.value) return trueConstant;
-
-          final Constant right = _evaluateSubexpression(node.right);
-          if (right is BoolConstant) {
-            return right;
-          }
-
-          throw new _AbortCurrentEvaluation(
-              errorReporter.invalidBinaryOperandType(
-                  contextChain,
-                  node,
-                  left,
-                  '${node.operator}',
-                  typeEnvironment.boolType,
-                  right.getType(typeEnvironment)));
-        }
-        throw new _AbortCurrentEvaluation(errorReporter.invalidMethodInvocation(
-            contextChain, node, left, '${node.operator}'));
-      case '&&':
-        if (left is BoolConstant) {
-          if (!left.value) return falseConstant;
-
-          final Constant right = _evaluateSubexpression(node.right);
-          if (right is BoolConstant) {
-            return right;
-          }
-          throw new _AbortCurrentEvaluation(
-              errorReporter.invalidBinaryOperandType(
-                  contextChain,
-                  node,
-                  left,
-                  '${node.operator}',
-                  typeEnvironment.boolType,
-                  right.getType(typeEnvironment)));
-        }
-        throw new _AbortCurrentEvaluation(errorReporter.invalidMethodInvocation(
-            contextChain, node, left, '${node.operator}'));
-      case '??':
-        return (left is! NullConstant)
-            ? left
-            : _evaluateSubexpression(node.right);
-      default:
-        throw new _AbortCurrentEvaluation(errorReporter.invalidMethodInvocation(
-            contextChain, node, left, '${node.operator}'));
-    }
-  }
-
-  visitConditionalExpression(ConditionalExpression node) {
-    final Constant constant = _evaluateSubexpression(node.condition);
-    if (constant == trueConstant) {
-      return _evaluateSubexpression(node.then);
-    } else if (constant == falseConstant) {
-      return _evaluateSubexpression(node.otherwise);
-    } else {
-      throw new _AbortCurrentEvaluation(errorReporter.invalidDartType(
-          contextChain, node, constant, typeEnvironment.boolType));
-    }
-  }
-
-  visitPropertyGet(PropertyGet node) {
-    if (node.receiver is ThisExpression) {
-      // Access "this" during instance creation.
-      for (final Field field in instanceBuilder.fields.keys) {
-        if (field.name == node.name) {
-          return instanceBuilder.fields[field];
-        }
-      }
-      throw 'Could not evaluate field get ${node.name} on incomplete instance';
-    }
-
-    final Constant receiver = _evaluateSubexpression(node.receiver);
-    if (receiver is StringConstant && node.name.name == 'length') {
-      return canonicalize(new IntConstant(receiver.value.length));
-    } else if (receiver is InstanceConstant) {
-      for (final Reference fieldRef in receiver.fieldValues.keys) {
-        if (fieldRef.asField.name == node.name) {
-          return receiver.fieldValues[fieldRef];
-        }
-      }
-    }
-    throw 'Could not evaluate property get on $receiver.';
-  }
-
-  visitLet(Let node) {
-    env.addVariableValue(
-        node.variable, _evaluateSubexpression(node.variable.initializer));
-    return node.body.accept(this);
-  }
-
-  visitVariableGet(VariableGet node) {
-    // Not every variable which a [VariableGet] refers to must be marked as
-    // constant.  For example function parameters as well as constructs
-    // desugared to [Let] expressions are ok.
-    //
-    // TODO(kustermann): The heuristic of allowing all [VariableGet]s on [Let]
-    // variables might allow more than it should.
-    final VariableDeclaration variable = node.variable;
-    if (variable.parent is Let || _isFormalParameter(variable)) {
-      final Constant constant = env.lookupVariable(node.variable);
-      if (constant == null) {
-        throw new _AbortCurrentEvaluation(errorReporter.nonConstantVariableGet(
-            contextChain, node, variable.name));
-      }
-      return constant;
-    }
-    if (variable.isConst) {
-      return _evaluateSubexpression(variable.initializer);
-    }
-    throw new Exception('The front-end should ensure we do not encounter a '
-        'variable get of a non-const variable.');
-  }
-
-  visitStaticGet(StaticGet node) {
-    return withNewEnvironment(() {
-      final Member target = node.target;
-      if (target is Field) {
-        if (target.isConst) {
-          if (target.isInExternalLibrary && target.initializer == null) {
-            // The variable is unavailable due to separate compilation.
-            return new UnevaluatedConstant(node);
-          }
-          return runInsideContext(target, () {
-            return _evaluateSubexpression(target.initializer);
-          });
-        }
-        throw new _AbortCurrentEvaluation(
-            errorReporter.invalidStaticInvocation(contextChain, node, target));
-      } else if (target is Procedure) {
-        if (target.kind == ProcedureKind.Method) {
-          return canonicalize(new TearOffConstant(target));
-        }
-        throw new _AbortCurrentEvaluation(
-            errorReporter.invalidStaticInvocation(contextChain, node, target));
-      } else {
-        throw new Exception(
-            'No support for ${target.runtimeType} in a static-get.');
-      }
-    });
-  }
-
-  visitStringConcatenation(StringConcatenation node) {
-    final String value = node.expressions.map((Expression node) {
-      final Constant constant = node.accept(this);
-
-      if (constant is NullConstant) {
-        return 'null';
-      } else if (constant is BoolConstant) {
-        return constant.value ? 'true' : 'false';
-      } else if (constant is IntConstant) {
-        return constant.value.toString();
-      } else if (constant is DoubleConstant) {
-        return constant.value.toString();
-      } else if (constant is StringConstant) {
-        return constant.value;
-      } else {
-        throw new _AbortCurrentEvaluation(errorReporter
-            .invalidStringInterpolationOperand(contextChain, node, constant));
-      }
-    }).join('');
-    return canonicalize(new StringConstant(value));
-  }
-
-  visitStaticInvocation(StaticInvocation node) {
-    final Procedure target = node.target;
-    final Arguments arguments = node.arguments;
-    if (target.kind == ProcedureKind.Factory) {
-      if (target.isConst &&
-          target.name.name == "fromEnvironment" &&
-          target.enclosingLibrary == coreTypes.coreLibrary &&
-          arguments.positional.length == 1) {
-        if (environmentDefines != null) {
-          // Evaluate environment constant.
-          Constant name = arguments.positional[0].accept(this);
-          if (name is StringConstant) {
-            String value = environmentDefines[name.value];
-            Constant defaultValue = null;
-            for (int i = 0; i < arguments.named.length; i++) {
-              NamedExpression named = arguments.named[i];
-              if (named.name == "defaultValue") {
-                defaultValue = named.value.accept(this);
-                break;
-              }
-            }
-
-            if (target.enclosingClass == coreTypes.boolClass) {
-              Constant boolConstant = value == "true"
-                  ? trueConstant
-                  : value == "false"
-                      ? falseConstant
-                      : defaultValue is BoolConstant
-                          ? defaultValue.value ? trueConstant : falseConstant
-                          : defaultValue is NullConstant
-                              ? nullConstant
-                              : falseConstant;
-              return boolConstant;
-            } else if (target.enclosingClass == coreTypes.intClass) {
-              int intValue = value != null ? int.tryParse(value) : null;
-              intValue ??=
-                  defaultValue is IntConstant ? defaultValue.value : null;
-              if (intValue == null) return nullConstant;
-              return canonicalize(new IntConstant(intValue));
-            } else if (target.enclosingClass == coreTypes.stringClass) {
-              value ??=
-                  defaultValue is StringConstant ? defaultValue.value : null;
-              if (value == null) return nullConstant;
-              return canonicalize(new StringConstant(value));
-            }
-          }
-          // TODO(askesc): Give more meaningful error message if name is null.
-        } else {
-          // Leave environment constant unevaluated.
-          return new UnevaluatedConstant(new StaticInvocation(
-              target, unevaluatedArguments(arguments),
-              isConst: true));
-        }
-      }
-    } else if (target.name.name == 'identical') {
-      // Ensure the "identical()" function comes from dart:core.
-      final parent = target.parent;
-      if (parent is Library && parent == coreTypes.coreLibrary) {
-        final positionalArguments = evaluatePositionalArguments(arguments);
-        final Constant left = positionalArguments[0];
-        final Constant right = positionalArguments[1];
-        // Since we canonicalize constants during the evaluation, we can use
-        // identical here.
-        return identical(left, right) ? trueConstant : falseConstant;
-      }
-    }
-    throw new _AbortCurrentEvaluation(
-        errorReporter.invalidStaticInvocation(contextChain, node, target));
-  }
-
-  visitAsExpression(AsExpression node) {
-    final Constant constant = node.operand.accept(this);
-    ensureIsSubtype(constant, evaluateDartType(node, node.type), node);
-    return constant;
-  }
-
-  visitNot(Not node) {
-    final Constant constant = node.operand.accept(this);
-    if (constant is BoolConstant) {
-      return constant == trueConstant ? falseConstant : trueConstant;
-    }
-    throw new _AbortCurrentEvaluation(errorReporter.invalidDartType(
-        contextChain, node, constant, typeEnvironment.boolType));
-  }
-
-  visitSymbolLiteral(SymbolLiteral node) {
-    final libraryReference =
-        node.value.startsWith('_') ? libraryOf(node).reference : null;
-    return canonicalize(new SymbolConstant(node.value, libraryReference));
-  }
-
-  visitInstantiation(Instantiation node) {
-    final Constant constant = _evaluateSubexpression(node.expression);
-    if (constant is TearOffConstant) {
-      if (node.typeArguments.length ==
-          constant.procedure.function.typeParameters.length) {
-        final typeArguments = evaluateDartTypes(node, node.typeArguments);
-        return canonicalize(
-            new PartialInstantiationConstant(constant, typeArguments));
-      }
-      throw new Exception(
-          'The number of type arguments supplied in the partial instantiation '
-          'does not match the number of type arguments of the $constant.');
-    }
-    throw new Exception(
-        'Only tear-off constants can be partially instantiated.');
-  }
-
-  @override
-  visitCheckLibraryIsLoaded(CheckLibraryIsLoaded node) {
-    throw new _AbortCurrentEvaluation(
-        errorReporter.deferredLibrary(contextChain, node, node.import.name));
-  }
-
-  // Helper methods:
-
-  void ensureIsSubtype(Constant constant, DartType type, TreeNode node) {
-    DartType constantType = constant.getType(typeEnvironment);
-
-    if (!typeEnvironment.isSubtypeOf(constantType, type)) {
-      throw new _AbortCurrentEvaluation(
-          errorReporter.invalidDartType(contextChain, node, constant, type));
-    }
-  }
-
-  List<DartType> evaluateTypeArguments(TreeNode node, Arguments arguments) {
-    return evaluateDartTypes(node, arguments.types);
-  }
-
-  List<DartType> evaluateSuperTypeArguments(TreeNode node, Supertype type) {
-    return evaluateDartTypes(node, type.typeArguments);
-  }
-
-  List<DartType> evaluateDartTypes(TreeNode node, List<DartType> types) {
-    // TODO: Once the frontend gurantees that there are no free type variables
-    // left over after stubstitution, we can enable this shortcut again:
-    // if (env.isEmpty) return types;
-    return types.map((t) => evaluateDartType(node, t)).toList();
-  }
-
-  DartType evaluateDartType(TreeNode node, DartType type) {
-    final result = env.subsituteType(type);
-
-    if (!isInstantiated(result)) {
-      throw new _AbortCurrentEvaluation(
-          errorReporter.freeTypeParameter(contextChain, node, type));
-    }
-
-    return result;
-  }
-
-  List<Constant> evaluatePositionalArguments(Arguments arguments) {
-    return arguments.positional.map((Expression node) {
-      return node.accept(this) as Constant;
-    }).toList();
-  }
-
-  Map<String, Constant> evaluateNamedArguments(Arguments arguments) {
-    if (arguments.named.isEmpty) return const <String, Constant>{};
-
-    final Map<String, Constant> named = {};
-    arguments.named.forEach((NamedExpression pair) {
-      named[pair.name] = pair.value.accept(this);
-    });
-    return named;
-  }
-
-  Arguments unevaluatedArguments(Arguments arguments) {
-    final positional = new List<Expression>(arguments.positional.length);
-    final named = new List<NamedExpression>(arguments.named.length);
-    for (int i = 0; i < arguments.positional.length; ++i) {
-      Constant constant = arguments.positional[i].accept(this);
-      positional[i] = constant.asExpression();
-    }
-    for (int i = 0; i < arguments.named.length; ++i) {
-      NamedExpression arg = arguments.named[i];
-      Constant constant = arg.value.accept(this);
-      named[i] = new NamedExpression(arg.name, constant.asExpression());
-    }
-    return new Arguments(positional, named: named, types: arguments.types);
-  }
-
-  Constant canonicalize(Constant constant) {
-    constant = backend.lowerConstant(constant);
-    return canonicalizationCache.putIfAbsent(constant, () => constant);
-  }
-
-  withNewInstanceBuilder(Class klass, List<DartType> typeArguments, fn()) {
-    InstanceBuilder old = instanceBuilder;
-    try {
-      instanceBuilder = new InstanceBuilder(klass, typeArguments);
-      return fn();
-    } finally {
-      instanceBuilder = old;
-    }
-  }
-
-  withNewEnvironment(fn()) {
-    final EvaluationEnvironment oldEnv = env;
-    try {
-      env = new EvaluationEnvironment();
-      return fn();
-    } finally {
-      env = oldEnv;
-    }
-  }
-
-  Constant evaluateBinaryNumericOperation(
-      String op, num a, num b, TreeNode node) {
-    a = backend.prepareNumericOperand(a);
-    b = backend.prepareNumericOperand(b);
-    num result;
-    switch (op) {
-      case '+':
-        result = a + b;
-        break;
-      case '-':
-        result = a - b;
-        break;
-      case '*':
-        result = a * b;
-        break;
-      case '/':
-        result = a / b;
-        break;
-      case '~/':
-        result = a ~/ b;
-        break;
-      case '%':
-        result = a % b;
-        break;
-    }
-
-    if (result != null) {
-      return canonicalize(result is int
-          ? new IntConstant(result.toSigned(64))
-          : new DoubleConstant(result as double));
-    }
-
-    switch (op) {
-      case '<':
-        return a < b ? trueConstant : falseConstant;
-      case '<=':
-        return a <= b ? trueConstant : falseConstant;
-      case '>=':
-        return a >= b ? trueConstant : falseConstant;
-      case '>':
-        return a > b ? trueConstant : falseConstant;
-    }
-
-    throw new Exception("Unexpected binary numeric operation '$op'.");
-  }
-
-  Library libraryOf(TreeNode node) {
-    // The tree structure of the kernel AST ensures we always have an enclosing
-    // library.
-    while (true) {
-      if (node is Library) return node;
-      node = node.parent;
-    }
-  }
-}
-
-/// Holds the necessary information for a constant object, namely
-///   * the [klass] being instantiated
-///   * the [typeArguments] used for the instantiation
-///   * the [fields] the instance will obtain (all fields from the
-///     instantiated [klass] up to the [Object] klass).
-class InstanceBuilder {
-  /// The class of the new instance.
-  final Class klass;
-
-  /// The values of the type parameters of the new instance.
-  final List<DartType> typeArguments;
-
-  /// The field values of the new instance.
-  final Map<Field, Constant> fields = <Field, Constant>{};
-
-  InstanceBuilder(this.klass, this.typeArguments);
-
-  void setFieldValue(Field field, Constant constant) {
-    fields[field] = constant;
-  }
-
-  InstanceConstant buildInstance() {
-    final Map<Reference, Constant> fieldValues = <Reference, Constant>{};
-    fields.forEach((Field field, Constant value) {
-      fieldValues[field.reference] = value;
-    });
-    return new InstanceConstant(klass.reference, typeArguments, fieldValues);
-  }
-}
-
-/// Holds an environment of type parameters, parameters and variables.
-class EvaluationEnvironment {
-  /// The values of the type parameters in scope.
-  final Map<TypeParameter, DartType> _typeVariables =
-      <TypeParameter, DartType>{};
-
-  /// The values of the parameters/variables in scope.
-  final Map<VariableDeclaration, Constant> _variables =
-      <VariableDeclaration, Constant>{};
-
-  /// Whether the current environment is empty.
-  bool get isEmpty => _typeVariables.isEmpty && _variables.isEmpty;
-
-  void addTypeParameterValue(TypeParameter parameter, DartType value) {
-    assert(!_typeVariables.containsKey(parameter));
-    _typeVariables[parameter] = value;
-  }
-
-  void addVariableValue(VariableDeclaration variable, Constant value) {
-    assert(!_variables.containsKey(variable));
-    _variables[variable] = value;
-  }
-
-  DartType lookupParameterValue(TypeParameter parameter) {
-    final DartType value = _typeVariables[parameter];
-    assert(value != null);
-    return value;
-  }
-
-  Constant lookupVariable(VariableDeclaration variable) {
-    return _variables[variable];
-  }
-
-  DartType subsituteType(DartType type) {
-    if (_typeVariables.isEmpty) return type;
-    return substitute(type, _typeVariables);
-  }
-}
-
-// Backend specific constant evaluation behavior
-class ConstantsBackend {
-  /// Transformation of constants prior to canonicalization, e.g. to change the
-  /// representation of certain kinds of constants, or to implement specific
-  /// number semantics.
-  Constant lowerConstant(Constant constant) => constant;
-
-  /// Transformation of numeric operands prior to a binary operation,
-  /// e.g. to implement specific number semantics.
-  num prepareNumericOperand(num operand) => operand;
-}
-
-// Used as control-flow to abort the current evaluation.
-class _AbortCurrentEvaluation {
-  final String message;
-  _AbortCurrentEvaluation(this.message);
-}
-
-abstract class ErrorReporter {
-  const ErrorReporter();
-
-  Uri getFileUri(TreeNode node) {
-    while (node is! FileUriNode) {
-      node = node.parent;
-    }
-    return (node as FileUriNode).fileUri;
-  }
-
-  int getFileOffset(TreeNode node) {
-    while (node.fileOffset == TreeNode.noOffset) {
-      node = node.parent;
-    }
-    return node == null ? TreeNode.noOffset : node.fileOffset;
-  }
-
-  String freeTypeParameter(
-      List<TreeNode> context, TreeNode node, DartType type);
-  String invalidDartType(List<TreeNode> context, TreeNode node,
-      Constant receiver, DartType expectedType);
-  String invalidBinaryOperandType(List<TreeNode> context, TreeNode node,
-      Constant receiver, String op, DartType expectedType, DartType actualType);
-  String invalidMethodInvocation(
-      List<TreeNode> context, TreeNode node, Constant receiver, String op);
-  String invalidStaticInvocation(
-      List<TreeNode> context, TreeNode node, Member target);
-  String invalidStringInterpolationOperand(
-      List<TreeNode> context, TreeNode node, Constant constant);
-  String invalidSymbolName(
-      List<TreeNode> context, TreeNode node, Constant constant);
-  String zeroDivisor(
-      List<TreeNode> context, TreeNode node, IntConstant receiver, String op);
-  String negativeShift(List<TreeNode> context, TreeNode node,
-      IntConstant receiver, String op, IntConstant argument);
-  String nonConstLiteral(List<TreeNode> context, TreeNode node, String klass);
-  String duplicateKey(List<TreeNode> context, TreeNode node, Constant key);
-  String failedAssertion(List<TreeNode> context, TreeNode node, String message);
-  String nonConstantVariableGet(
-      List<TreeNode> context, TreeNode node, String variableName);
-  String deferredLibrary(
-      List<TreeNode> context, TreeNode node, String importName);
-  String circularity(List<TreeNode> context, TreeNode node);
-}
-
-class SimpleErrorReporter extends ErrorReporter {
-  const SimpleErrorReporter();
-
-  String report(List<TreeNode> context, String what, TreeNode node) {
-    io.exitCode = 42;
-    final Uri uri = getFileUri(node);
-    final int fileOffset = getFileOffset(node);
-    final String message = '$uri:$fileOffset Constant evaluation error: $what';
-    io.stderr.writeln(message);
-    return message;
-  }
-
-  @override
-  String freeTypeParameter(
-      List<TreeNode> context, TreeNode node, DartType type) {
-    return report(
-        context, 'Expected type to be instantiated but was ${type}', node);
-  }
-
-  @override
-  String invalidDartType(List<TreeNode> context, TreeNode node,
-      Constant receiver, DartType expectedType) {
-    return report(
-        context,
-        'Expected expression to evaluate to "$expectedType" but got "$receiver.',
-        node);
-  }
-
-  @override
-  String invalidBinaryOperandType(
-      List<TreeNode> context,
-      TreeNode node,
-      Constant receiver,
-      String op,
-      DartType expectedType,
-      DartType actualType) {
-    return report(
-        context,
-        'Calling "$op" on "$receiver" needs operand of type '
-        '"$expectedType" (but got "$actualType")',
-        node);
-  }
-
-  @override
-  String invalidMethodInvocation(
-      List<TreeNode> context, TreeNode node, Constant receiver, String op) {
-    return report(context,
-        'Cannot call "$op" on "$receiver" in constant expression', node);
-  }
-
-  @override
-  String invalidStaticInvocation(
-      List<TreeNode> context, TreeNode node, Member target) {
-    return report(
-        context, 'Cannot invoke "$target" inside a constant expression', node);
-  }
-
-  @override
-  String invalidStringInterpolationOperand(
-      List<TreeNode> context, TreeNode node, Constant constant) {
-    return report(
-        context,
-        'Only null/bool/int/double/String values are allowed as string '
-        'interpolation expressions during constant evaluation (was: "$constant").',
-        node);
-  }
-
-  @override
-  String invalidSymbolName(
-      List<TreeNode> context, TreeNode node, Constant constant) {
-    return report(
-        context,
-        'The symbol name must be a valid public Dart member name, public '
-        'constructor name, or library name, optionally qualified.',
-        node);
-  }
-
-  @override
-  String zeroDivisor(
-      List<TreeNode> context, TreeNode node, IntConstant receiver, String op) {
-    return report(
-        context,
-        "Binary operator '$op' on '${receiver.value}' requires non-zero "
-        "divisor, but divisor was '0'.",
-        node);
-  }
-
-  @override
-  String negativeShift(List<TreeNode> context, TreeNode node,
-      IntConstant receiver, String op, IntConstant argument) {
-    return report(
-        context,
-        "Binary operator '$op' on '${receiver.value}' requires non-negative "
-        "operand, but was '${argument.value}'.",
-        node);
-  }
-
-  @override
-  String nonConstLiteral(List<TreeNode> context, TreeNode node, String klass) {
-    return report(
-        context,
-        'Cannot have a non-constant $klass literal within a const context.',
-        node);
-  }
-
-  @override
-  String duplicateKey(List<TreeNode> context, TreeNode node, Constant key) {
-    return report(
-        context,
-        'Duplicate keys are not allowed in constant maps (found duplicate key "$key")',
-        node);
-  }
-
-  @override
-  String failedAssertion(
-      List<TreeNode> context, TreeNode node, String message) {
-    return report(
-        context,
-        'The assertion condition evaluated to "false" with message "$message"',
-        node);
-  }
-
-  @override
-  String nonConstantVariableGet(
-      List<TreeNode> context, TreeNode node, String variableName) {
-    return report(
-        context,
-        'The variable "$variableName" cannot be used inside a constant '
-        'expression.',
-        node);
-  }
-
-  @override
-  String deferredLibrary(
-      List<TreeNode> context, TreeNode node, String importName) {
-    return report(
-        context,
-        'Deferred "$importName" cannot be used inside a constant '
-        'expression',
-        node);
-  }
-
-  @override
-  String circularity(List<TreeNode> context, TreeNode node) {
-    return report(context, 'Constant expression depends on itself.', node);
-  }
-}
-
-class IsInstantiatedVisitor extends DartTypeVisitor<bool> {
-  final _availableVariables = new Set<TypeParameter>();
-
-  bool isInstantiated(DartType type) {
-    return type.accept(this);
-  }
-
-  bool defaultDartType(DartType node) {
-    throw 'A visitor method seems to be unimplemented!';
-  }
-
-  bool visitInvalidType(InvalidType node) => true;
-  bool visitDynamicType(DynamicType node) => true;
-  bool visitVoidType(VoidType node) => true;
-  bool visitBottomType(BottomType node) => true;
-
-  bool visitTypeParameterType(TypeParameterType node) {
-    return _availableVariables.contains(node.parameter);
-  }
-
-  bool visitInterfaceType(InterfaceType node) {
-    return node.typeArguments
-        .every((DartType typeArgument) => typeArgument.accept(this));
-  }
-
-  bool visitFunctionType(FunctionType node) {
-    final parameters = node.typeParameters;
-    _availableVariables.addAll(parameters);
-    final bool result = node.returnType.accept(this) &&
-        node.positionalParameters.every((p) => p.accept(this)) &&
-        node.namedParameters.every((p) => p.type.accept(this));
-    _availableVariables.removeAll(parameters);
-    return result;
-  }
-
-  bool visitTypedefType(TypedefType node) {
-    return node.unalias.accept(this);
-  }
-}
-
-bool _isFormalParameter(VariableDeclaration variable) {
-  final parent = variable.parent;
-  if (parent is FunctionNode) {
-    return parent.positionalParameters.contains(variable) ||
-        parent.namedParameters.contains(variable);
-  }
-  return false;
-}
diff --git a/pkg/kernel/lib/transformations/continuation.dart b/pkg/kernel/lib/transformations/continuation.dart
index a78a3ab..b599cdf 100644
--- a/pkg/kernel/lib/transformations/continuation.dart
+++ b/pkg/kernel/lib/transformations/continuation.dart
@@ -747,7 +747,8 @@
           new VariableGet(iteratorVariable),
           new Name('moveNext'),
           new Arguments(<Expression>[]),
-          helper.streamIteratorMoveNext));
+          helper.streamIteratorMoveNext))
+        ..fileOffset = stmt.fileOffset;
 
       // _asyncStarMoveNextHelper(:stream)
       var asyncStarMoveNextCall = new StaticInvocation(
diff --git a/pkg/kernel/lib/transformations/mixin_full_resolution.dart b/pkg/kernel/lib/transformations/mixin_full_resolution.dart
index 5154517..4a401fa 100644
--- a/pkg/kernel/lib/transformations/mixin_full_resolution.dart
+++ b/pkg/kernel/lib/transformations/mixin_full_resolution.dart
@@ -188,7 +188,7 @@
 
           assert(src.typeParameters.length == dst.typeParameters.length);
           for (int j = 0; j < src.typeParameters.length; ++j) {
-            dst.typeParameters[j].flags = src.typeParameters[i].flags;
+            dst.typeParameters[j].flags = src.typeParameters[j].flags;
           }
           for (int j = 0; j < src.positionalParameters.length; ++j) {
             dst.positionalParameters[j].flags =
diff --git a/pkg/kernel/lib/transformations/treeshaker.dart b/pkg/kernel/lib/transformations/treeshaker.dart
deleted file mode 100644
index b340326..0000000
--- a/pkg/kernel/lib/transformations/treeshaker.dart
+++ /dev/null
@@ -1,1247 +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.
-
-library kernel.tree_shaker;
-
-import '../ast.dart';
-import '../class_hierarchy.dart';
-import '../core_types.dart';
-import '../type_environment.dart';
-import '../library_index.dart';
-
-Component transformComponent(
-    CoreTypes coreTypes, ClassHierarchy hierarchy, Component component,
-    {List<ProgramRoot> programRoots, bool legacyMode: false}) {
-  new TreeShaker(coreTypes, hierarchy, component,
-          programRoots: programRoots, legacyMode: legacyMode)
-      .transform(component);
-  return component;
-}
-
-enum ProgramRootKind {
-  /// The root is a class which will be instantiated by
-  /// external / non-Dart code.
-  ExternallyInstantiatedClass,
-
-  /// The root is a setter function or a field.
-  Setter,
-
-  /// The root is a getter function or a field.
-  Getter,
-
-  /// The root is some kind of constructor.
-  Constructor,
-
-  /// The root is a field, normal procedure or constructor.
-  Other,
-}
-
-/// A program root which the vm or embedder uses and needs to be retained.
-class ProgramRoot {
-  /// The library the root is contained in.
-  final String library;
-
-  /// The name of the class inside the library (optional).
-  final String klass;
-
-  /// The name of the member inside the library (or class, optional).
-  final String member;
-
-  /// The kind of this program root.
-  final ProgramRootKind kind;
-
-  ProgramRoot(this.library, this.klass, this.member, this.kind);
-
-  String toString() => "ProgramRoot($library, $klass, $member, $kind)";
-
-  String get disambiguatedName {
-    if (kind == ProgramRootKind.Getter) return 'get:$member';
-    if (kind == ProgramRootKind.Setter) return 'set:$member';
-    return member;
-  }
-
-  Member getMember(LibraryIndex table) {
-    assert(klass != null);
-    assert(member != null);
-    return table.getMember(
-        library, klass ?? LibraryIndex.topLevel, disambiguatedName);
-  }
-
-  Class getClass(LibraryIndex table) {
-    assert(klass != null);
-    return table.getClass(library, klass);
-  }
-}
-
-/// Tree shaking based on class hierarchy analysis.
-///
-/// Any dynamic dispatch not on `this` is conservatively assumed to target
-/// any instantiated class that implements a member matching the selector.
-///
-/// Member bodies are analyzed relative to a given "host class" which is the
-/// concrete type of `this` (or null if in static context), so dispatches on
-/// `this` can be resolved more precisely.
-///
-/// The tree shaker computes the following in a fixed-point iteration:
-/// - a set of instantiated classes
-/// - for each member, a set of potential host classes
-/// - a set of names used in dynamic dispatch not on `this`
-///
-/// If the `dart:mirrors` library is used then nothing will be tree-shaken.
-//
-// TODO(asgerf): Tree shake unused instance fields.
-class TreeShaker {
-  final CoreTypes coreTypes;
-  final ClosedWorldClassHierarchy hierarchy;
-  final ClassHierarchySubtypes hierarchySubtypes;
-  final Map<Class, int> numberedClasses;
-  final List<Class> classes;
-  final Component component;
-  final bool legacyMode;
-  final List<ProgramRoot> programRoots;
-
-  /// 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.
-  ///
-  /// The map is indexed by the name of the member, and value is a list of
-  /// interleaved (host class, member) pairs.
-  final Map<Name, List<TreeNode>> _dispatchTargetCandidates =
-      <Name, List<TreeNode>>{};
-
-  /// Map from classes to the set of members that are reachable with that
-  /// class as host.
-  ///
-  /// The map is implemented as a list, indexed according to
-  /// [ClassHierarchy.getClassIndex].
-  final List<Set<Member>> _usedMembersWithHost;
-
-  /// Map from used members (regardless of host) to a summary object describing
-  /// how the member invokes other members on `this`.
-  ///
-  /// The summary object is a heterogeneous list containing the [Member]s that
-  /// are invoked using `super` and the [Name]s that are dispatched on `this`.
-  ///
-  /// Names that are dispatched as a setter are preceded by the
-  /// [_setterSentinel] object, to distinguish them from getter/call names.
-  final Map<Member, List<Node>> _usedMembers = <Member, List<Node>>{};
-
-  /// The level to which a class must be retained after tree shaking.
-  ///
-  /// See [ClassRetention].
-  final List<ClassRetention> _classRetention;
-
-  /// Interleaved (host class, member) pairs that are reachable but have not yet
-  /// been analyzed for more uses.
-  final List<TreeNode> _worklist = new List<TreeNode>();
-
-  /// 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 Set<Member> _usedInterfaceMembers = new Set<Member>();
-
-  final Set<Typedef> _usedTypedefs = new Set<Typedef>();
-
-  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 _invariantVisitor;
-
-  Library _mirrorsLibrary;
-
-  /// Set to true if any use of the `dart:mirrors` API is found.
-  bool isUsingMirrors = false;
-
-  /// If we have roots, we will shake, even if we encounter some elements from
-  /// the mirrors library.
-  bool get forceShaking => programRoots != null && programRoots.isNotEmpty;
-
-  TreeShaker(CoreTypes coreTypes, ClassHierarchy hierarchy, Component component,
-      {List<ProgramRoot> programRoots, bool legacyMode: false})
-      : this._internal(
-            coreTypes, hierarchy, component, legacyMode, programRoots);
-
-  bool isMemberBodyUsed(Member member) {
-    return _usedMembers.containsKey(member);
-  }
-
-  bool isMemberOverridden(Member member) {
-    return _overriddenMembers.contains(member);
-  }
-
-  bool isMemberUsedInInterfaceTarget(Member member) {
-    return _usedInterfaceMembers.contains(member);
-  }
-
-  bool isTypedefUsed(Typedef node) {
-    return _usedTypedefs.contains(node);
-  }
-
-  bool isMemberUsed(Member member) {
-    return isMemberBodyUsed(member) || isMemberOverridden(member);
-  }
-
-  bool isInstantiated(Class classNode) {
-    return getClassRetention(classNode).index >= ClassRetention.Instance.index;
-  }
-
-  bool isHierarchyUsed(Class classNode) {
-    return getClassRetention(classNode).index >= ClassRetention.Hierarchy.index;
-  }
-
-  bool isNamespaceUsed(Class classNode) {
-    return getClassRetention(classNode).index >= ClassRetention.Namespace.index;
-  }
-
-  ClassRetention getClassRetention(Class classNode) {
-    int index = numberedClasses[classNode];
-    return _classRetention[index];
-  }
-
-  /// Applies the tree shaking results to the component.
-  ///
-  /// This removes unused classes, members, and hierarchy data.
-  void transform(Component component) {
-    if (isUsingMirrors) return; // Give up if using mirrors.
-    new _TreeShakingTransformer(this).transform(component);
-  }
-
-  TreeShaker._internal(this.coreTypes, this.hierarchy, this.component,
-      this.legacyMode, this.programRoots)
-      : this._dispatchedNames = new List<Set<Name>>(hierarchy.numberOfClasses),
-        this._usedMembersWithHost =
-            new List<Set<Member>>(hierarchy.numberOfClasses),
-        this._classRetention = new List<ClassRetention>.filled(
-            hierarchy.numberOfClasses, ClassRetention.None),
-        this.hierarchySubtypes = hierarchy.computeSubtypesInformation(),
-        this.numberedClasses = createMapNumberIndex(hierarchy.classes),
-        this.classes = new List<Class>.from(hierarchy.classes) {
-    _visitor = new _TreeShakerVisitor(this);
-    _covariantVisitor = new _ExternalTypeVisitor(this, isCovariant: true);
-    _contravariantVisitor =
-        new _ExternalTypeVisitor(this, isContravariant: true);
-    _invariantVisitor = new _ExternalTypeVisitor(this,
-        isCovariant: true, isContravariant: true);
-    _mirrorsLibrary = coreTypes.mirrorsLibrary;
-    try {
-      _build();
-    } on _UsingMirrorsException {
-      isUsingMirrors = true;
-    }
-  }
-
-  static Map<Class, int> createMapNumberIndex(Iterable<Class> classes) {
-    Map<Class, int> result = new Map<Class, int>();
-    for (Class class_ in classes) {
-      result[class_] = result.length;
-    }
-    return result;
-  }
-
-  void _build() {
-    if (component.mainMethod == null) {
-      throw 'Cannot perform tree shaking on a component without a main method';
-    }
-    if (component.mainMethod.function.positionalParameters.length > 0) {
-      // The main method takes a List<String> as argument.
-      _addInstantiatedExternalSubclass(coreTypes.listClass);
-      _addInstantiatedExternalSubclass(coreTypes.stringClass);
-    }
-    _addDispatchedName(coreTypes.objectClass, new Name('noSuchMethod'));
-    _addPervasiveUses();
-    _addUsedMember(null, component.mainMethod);
-    if (programRoots != null) {
-      var table =
-          new LibraryIndex(component, programRoots.map((r) => r.library));
-      for (var root in programRoots) {
-        _addUsedRoot(root, table);
-      }
-    }
-
-    _iterateWorklist();
-
-    // Mark overridden members in order to preserve abstract members as
-    // necessary.
-    if (!legacyMode) {
-      for (int i = classes.length - 1; i >= 0; --i) {
-        Class class_ = 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
-  /// we don't have to register them for every use we find.
-  void _addPervasiveUses() {
-    _addInstantiatedExternalSubclass(coreTypes.stringClass);
-    _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(Class receiver, Name name) {
-    int index = numberedClasses[receiver];
-    Set<Name> receiverNames = _dispatchedNames[index] ??= new Set<Name>();
-    // TODO(asgerf): make use of selector arity and getter/setter kind
-    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 = hierarchySubtypes.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) {
-    ClassSet receivers = _receiversOfName[member.name];
-    if (receivers != null && receivers.contains(host)) {
-      _addUsedMember(host, member);
-    } else {
-      _dispatchTargetCandidates.putIfAbsent(member.name, _makeTreeNodeList)
-        ..add(host)
-        ..add(member);
-    }
-  }
-
-  static List<TreeNode> _makeTreeNodeList() => <TreeNode>[];
-
-  /// Registers the given class as instantiated and discovers new dispatch
-  /// target candidates accordingly.
-  void _addInstantiatedClass(Class classNode) {
-    int index = numberedClasses[classNode];
-    ClassRetention retention = _classRetention[index];
-    if (retention.index < ClassRetention.Instance.index) {
-      _classRetention[index] = ClassRetention.Instance;
-      _propagateClassInstanceLevel(classNode, retention);
-    }
-  }
-
-  /// Register that an external subclass of the given class may be instantiated.
-  void _addInstantiatedExternalSubclass(Class classNode) {
-    int index = numberedClasses[classNode];
-    ClassRetention retention = _classRetention[index];
-    if (retention.index < ClassRetention.ExternalInstance.index) {
-      _classRetention[index] = ClassRetention.ExternalInstance;
-      _propagateClassExternalInstanceLevel(classNode, retention);
-    }
-  }
-
-  void _propagateClassExternalInstanceLevel(
-      Class classNode, ClassRetention oldRetention) {
-    if (oldRetention.index >= ClassRetention.ExternalInstance.index) {
-      return;
-    }
-    _propagateClassInstanceLevel(classNode, oldRetention);
-    for (Member member in hierarchy.getInterfaceMembers(classNode)) {
-      if (member is Field) {
-        _covariantVisitor.visit(member.type);
-      } else {
-        _addCallToExternalProcedure(member);
-      }
-      _addDispatchTarget(classNode, member);
-    }
-    for (Member member
-        in hierarchy.getInterfaceMembers(classNode, setters: true)) {
-      _addDispatchTarget(classNode, member);
-    }
-  }
-
-  /// Called when the retention level for [classNode] has been raised from
-  /// [oldRetention] to instance level.
-  ///
-  /// Ensures that the relevant members are put in the worklist, and super types
-  /// and raised to hierarchy level.
-  void _propagateClassInstanceLevel(
-      Class classNode, ClassRetention oldRetention) {
-    if (oldRetention.index >= ClassRetention.Instance.index) {
-      return;
-    }
-    _propagateClassHierarchyLevel(classNode, oldRetention);
-    for (Member member in hierarchy.getDispatchTargets(classNode)) {
-      _addDispatchTarget(classNode, member);
-    }
-    for (Member member
-        in hierarchy.getDispatchTargets(classNode, setters: true)) {
-      _addDispatchTarget(classNode, member);
-    }
-    // TODO(asgerf): Shake off unused instance fields.
-    // For now, just register them all inherited fields as used to ensure the
-    // effects of their initializers are taken into account.  To shake a field,
-    // we still need to preserve the side effects of the initializer.
-    for (Class node = classNode; node != null; node = node.superclass) {
-      for (Field field in node.mixin.fields) {
-        if (!field.isStatic) {
-          _addUsedMember(classNode, field);
-        }
-      }
-    }
-  }
-
-  /// Called when the retention level for [classNode] has been raised from
-  /// [oldRetention] to hierarchy level or higher.
-  ///
-  /// Ensure that all super types and type parameter bounds are also raised
-  /// to hierarchy level.
-  void _propagateClassHierarchyLevel(
-      Class classNode, ClassRetention oldRetention) {
-    if (oldRetention.index >= ClassRetention.Hierarchy.index) {
-      return;
-    }
-    _propagateClassNamespaceLevel(classNode, oldRetention);
-    var visitor = _visitor;
-    classNode.supertype?.accept(visitor);
-    classNode.mixedInType?.accept(visitor);
-    visitList(classNode.implementedTypes, visitor);
-    visitList(classNode.typeParameters, visitor);
-  }
-
-  /// Called when the retention level for [classNode] has been raised from
-  /// [oldRetention] to namespace level or higher.
-  ///
-  /// Ensures that all annotations on the class are analyzed.
-  void _propagateClassNamespaceLevel(
-      Class classNode, ClassRetention oldRetention) {
-    if (oldRetention.index >= ClassRetention.Namespace.index) {
-      return;
-    }
-    visitList(classNode.annotations, _visitor);
-  }
-
-  /// Registers the given root as being used.
-  void _addUsedRoot(ProgramRoot root, LibraryIndex table) {
-    if (root.kind == ProgramRootKind.ExternallyInstantiatedClass) {
-      Class class_ = root.getClass(table);
-
-      // This is a class which will be instantiated by non-Dart code (whether it
-      // has a valid generative constructor or not).
-      _addInstantiatedClass(class_);
-
-      // We keep all the constructors of externally instantiated classes.
-      // Sometimes the runtime might do a constructor call and sometimes it
-      // might just allocate the class without invoking the constructor.
-      // So we try to be on the safe side here!
-      for (var constructor in class_.constructors) {
-        _addUsedMember(class_, constructor);
-      }
-
-      // We keep all factory constructors as well for the same reason.
-      for (var member in class_.procedures) {
-        if (member.isStatic && member.kind == ProcedureKind.Factory) {
-          _addUsedMember(class_, member);
-        }
-      }
-    } else {
-      var member = root.getMember(table);
-      _addUsedMember(member.enclosingClass, member);
-      if (member is Constructor) {
-        _addInstantiatedClass(member.enclosingClass);
-      }
-    }
-  }
-
-  /// Registers the given class as being used in a type annotation.
-  void _addClassUsedInType(Class classNode) {
-    int index = numberedClasses[classNode];
-    ClassRetention retention = _classRetention[index];
-    if (retention.index < ClassRetention.Hierarchy.index) {
-      _classRetention[index] = ClassRetention.Hierarchy;
-      _propagateClassHierarchyLevel(classNode, retention);
-    }
-  }
-
-  /// Registers the given member as being used in an interface target.
-  void _addUsedInterfaceMember(Member member) {
-    _usedInterfaceMembers.add(member);
-  }
-
-  /// Registers the given typedef as being used.
-  void addUsedTypedef(Typedef node) {
-    if (_usedTypedefs.add(node)) {
-      visitList(node.annotations, _visitor);
-      node.type.accept(_visitor);
-    }
-  }
-
-  /// Registers the given class or library as containing static members.
-  void _addStaticNamespace(TreeNode container) {
-    assert(container is Class || container is Library);
-    if (container is Class) {
-      int index = numberedClasses[container];
-      var oldRetention = _classRetention[index];
-      if (oldRetention == ClassRetention.None) {
-        _classRetention[index] = ClassRetention.Namespace;
-        _propagateClassNamespaceLevel(container, oldRetention);
-      }
-    }
-  }
-
-  /// Registers the given member as being used, in the following sense:
-  /// - Fields are used if they can be read or written or their initializer is
-  ///   evaluated.
-  /// - Constructors are used if they can be invoked, either directly or through
-  ///   the initializer list of another constructor.
-  /// - Procedures are used if they can be invoked or torn off.
-  void _addUsedMember(Class host, Member member) {
-    if (!forceShaking && member.enclosingLibrary == _mirrorsLibrary) {
-      throw new _UsingMirrorsException();
-    }
-    if (host != null) {
-      // Check if the member has been seen with this host before.
-      int index = numberedClasses[host];
-      Set<Member> members = _usedMembersWithHost[index] ??= new Set<Member>();
-      if (!members.add(member)) return;
-      _usedMembers.putIfAbsent(member, _makeIncompleteSummary);
-    } else {
-      // Check if the member has been seen before.
-      if (_usedMembers.containsKey(member)) return;
-      _usedMembers[member] = _makeIncompleteSummary();
-      if (member is! Constructor) {
-        _addStaticNamespace(member.parent);
-      }
-    }
-    _worklist..add(host)..add(member);
-    if (member is Procedure && member.isExternal) {
-      _addCallToExternalProcedure(member);
-    }
-  }
-
-  /// Models the impact of a call from user code to an external implementation
-  /// of [member] based on its type annotations.
-  ///
-  /// Types in covariant position are assumed to be instantiated externally,
-  /// and types in contravariant position are assumed to have their methods
-  /// invoked by the external code.
-  void _addCallToExternalProcedure(Procedure member) {
-    FunctionNode function = member.function;
-    _covariantVisitor.visit(function.returnType);
-    for (int i = 0; i < function.positionalParameters.length; ++i) {
-      _contravariantVisitor.visit(function.positionalParameters[i].type);
-    }
-    for (int i = 0; i < function.namedParameters.length; ++i) {
-      _contravariantVisitor.visit(function.namedParameters[i].type);
-    }
-  }
-
-  /// Called when external code may invoke the interface of the given class.
-  void _addEscapedClass(Class node) {
-    if (!_escapedClasses.add(node)) return;
-    for (Member member in hierarchy.getInterfaceMembers(node)) {
-      if (member is Procedure) {
-        _addDispatchedName(node, member.name);
-      }
-    }
-  }
-
-  /// Creates a incomplete summary object, indicating that a member has not
-  /// yet been analyzed.
-  static List<Node> _makeIncompleteSummary() => <Node>[null];
-
-  bool isIncompleteSummary(List<Node> summary) {
-    return summary.isNotEmpty && summary[0] == null;
-  }
-
-  void _iterateWorklist() {
-    while (_worklist.isNotEmpty) {
-      // Get the host and member.
-      Member member = _worklist.removeLast();
-      Class host = _worklist.removeLast();
-
-      // Analyze the method body if we have not done so before.
-      List<Node> summary = _usedMembers[member];
-      if (isIncompleteSummary(summary)) {
-        summary.clear();
-        _visitor.analyzeAndBuildSummary(member, summary);
-      }
-
-      // Apply the summary in the context of this host.
-      for (int i = 0; i < summary.length; ++i) {
-        Node summaryNode = summary[i];
-        if (summaryNode is Member) {
-          _addUsedMember(host, summaryNode);
-        } else if (summaryNode is Name) {
-          Member target = hierarchy.getDispatchTarget(host, summaryNode);
-          if (target != null) {
-            _addUsedMember(host, target);
-          }
-        } else if (identical(summaryNode, _setterSentinel)) {
-          Name name = summary[++i];
-          Member target = hierarchy.getDispatchTarget(host, name, setter: true);
-          if (target != null) {
-            _addUsedMember(host, target);
-          }
-        } else {
-          throw 'Unexpected summary node: $summaryNode';
-        }
-      }
-    }
-  }
-
-  String getDiagnosticString() {
-    return """
-dispatchNames: ${_dispatchedNames.length}
-dispatchTargetCandidates.keys: ${_dispatchTargetCandidates.length}
-usedMembersWithHost: ${_usedMembersWithHost.length}
-usedMembers: ${_usedMembers.length}
-classRetention: ${_classRetention.length}
-escapedClasses: ${_escapedClasses.length}
-""";
-  }
-}
-
-/// Sentinel that occurs in method summaries in front of each name that should
-/// be interpreted as a setter.
-final Node _setterSentinel = const InvalidType();
-
-/// Searches the AST for static references and dynamically dispatched names.
-class _TreeShakerVisitor extends RecursiveVisitor {
-  final Set<Constant> visitedConstants = new Set<Constant>();
-
-  final TreeShaker shaker;
-  final CoreTypes coreTypes;
-  final TypeEnvironment types;
-  final bool legacyMode;
-  List<Node> summary;
-
-  _TreeShakerVisitor(TreeShaker shaker)
-      : this.shaker = shaker,
-        this.coreTypes = shaker.coreTypes,
-        this.legacyMode = shaker.legacyMode,
-        this.types = new TypeEnvironment(shaker.coreTypes, shaker.hierarchy,
-            legacyMode: true) {
-    types.errorHandler = handleError;
-  }
-
-  void handleError(TreeNode node, String message) {
-    print('[error] $message (${node.location})');
-  }
-
-  void analyzeAndBuildSummary(Member member, List<Node> summary) {
-    this.summary = summary;
-    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
-  visitFunctionNode(FunctionNode node) {
-    switch (node.asyncMarker) {
-      case AsyncMarker.Sync:
-        break;
-      case AsyncMarker.SyncStar:
-        shaker._addInstantiatedExternalSubclass(coreTypes.iterableClass);
-        break;
-      case AsyncMarker.Async:
-        shaker._addInstantiatedExternalSubclass(coreTypes.futureClass);
-        break;
-      case AsyncMarker.AsyncStar:
-        shaker._addInstantiatedExternalSubclass(coreTypes.streamClass);
-        break;
-      case AsyncMarker.SyncYielding:
-        break;
-    }
-    node.visitChildren(this);
-  }
-
-  void addUseFrom(Member target, Class from) {
-    shaker._addUsedMember(from, target);
-  }
-
-  void addUseFromCurrentHost(Member target) {
-    summary.add(target);
-  }
-
-  void addStaticUse(Member target) {
-    shaker._addUsedMember(null, target);
-  }
-
-  void addSelfDispatch(Name name, {bool setter: false}) {
-    if (setter) {
-      summary..add(_setterSentinel)..add(name);
-    } else {
-      summary.add(name);
-    }
-  }
-
-  @override
-  visitSuperInitializer(SuperInitializer node) {
-    addUseFromCurrentHost(node.target);
-    node.visitChildren(this);
-  }
-
-  @override
-  visitRedirectingInitializer(RedirectingInitializer node) {
-    addUseFromCurrentHost(node.target);
-    node.visitChildren(this);
-  }
-
-  @override
-  visitConstructorInvocation(ConstructorInvocation node) {
-    shaker._addInstantiatedClass(node.target.enclosingClass);
-    addUseFrom(node.target, node.target.enclosingClass);
-    node.visitChildren(this);
-  }
-
-  @override
-  visitStaticInvocation(StaticInvocation node) {
-    addStaticUse(node.target);
-    node.visitChildren(this);
-  }
-
-  @override
-  visitDirectMethodInvocation(DirectMethodInvocation node) {
-    if (node.receiver is! ThisExpression) {
-      // TODO(asgerf): Support arbitrary direct calls.
-      throw 'Direct calls are only supported on "this"';
-    }
-    addUseFromCurrentHost(node.target);
-    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 (legacyMode) return coreTypes.objectClass;
-    return getKnownSupertype(node.getStaticType(types));
-  }
-
-  @override
-  visitMethodInvocation(MethodInvocation node) {
-    if (node.receiver is ThisExpression) {
-      addSelfDispatch(node.name);
-    } else {
-      shaker._addDispatchedName(getStaticType(node.receiver), node.name);
-    }
-    if (node.interfaceTarget != null) {
-      shaker._addUsedInterfaceMember(node.interfaceTarget);
-      shaker._typedCalls.add(node);
-    }
-    node.visitChildren(this);
-  }
-
-  @override
-  visitStaticGet(StaticGet node) {
-    addStaticUse(node.target);
-    node.visitChildren(this);
-  }
-
-  @override
-  visitStaticSet(StaticSet node) {
-    addStaticUse(node.target);
-    node.visitChildren(this);
-  }
-
-  @override
-  visitDirectPropertyGet(DirectPropertyGet node) {
-    if (node.receiver is! ThisExpression) {
-      // TODO(asgerf): Support arbitrary direct calls.
-      throw 'Direct calls are only supported on "this"';
-    }
-    addUseFromCurrentHost(node.target);
-    node.visitChildren(this);
-  }
-
-  @override
-  visitDirectPropertySet(DirectPropertySet node) {
-    if (node.receiver is! ThisExpression) {
-      // TODO(asgerf): Support arbitrary direct calls.
-      throw 'Direct calls are only supported on "this"';
-    }
-    addUseFromCurrentHost(node.target);
-    node.visitChildren(this);
-  }
-
-  @override
-  visitPropertyGet(PropertyGet node) {
-    if (node.receiver is ThisExpression) {
-      addSelfDispatch(node.name);
-    } else {
-      shaker._addDispatchedName(getStaticType(node.receiver), node.name);
-    }
-    if (node.interfaceTarget != null) {
-      shaker._addUsedInterfaceMember(node.interfaceTarget);
-      shaker._typedCalls.add(node);
-    }
-    node.visitChildren(this);
-  }
-
-  @override
-  visitPropertySet(PropertySet node) {
-    if (node.receiver is ThisExpression) {
-      addSelfDispatch(node.name, setter: true);
-    } else {
-      shaker._addDispatchedName(getStaticType(node.receiver), node.name);
-    }
-    if (node.interfaceTarget != null) {
-      shaker._addUsedInterfaceMember(node.interfaceTarget);
-      shaker._typedCalls.add(node);
-    }
-    node.visitChildren(this);
-  }
-
-  @override
-  visitListLiteral(ListLiteral node) {
-    shaker._addInstantiatedExternalSubclass(coreTypes.listClass);
-    node.visitChildren(this);
-  }
-
-  @override
-  visitMapLiteral(MapLiteral node) {
-    shaker._addInstantiatedExternalSubclass(coreTypes.mapClass);
-    node.visitChildren(this);
-  }
-
-  static final Name _toStringName = new Name('toString');
-
-  @override
-  visitStringConcatenation(StringConcatenation node) {
-    for (var expression in node.expressions) {
-      shaker._addDispatchedName(getStaticType(expression), _toStringName);
-    }
-    node.visitChildren(this);
-  }
-
-  @override
-  visitInterfaceType(InterfaceType node) {
-    shaker._addClassUsedInType(node.classNode);
-    node.visitChildren(this);
-  }
-
-  @override
-  visitSupertype(Supertype node) {
-    shaker._addClassUsedInType(node.classNode);
-    node.visitChildren(this);
-  }
-
-  @override
-  visitDoubleLiteral(DoubleLiteral node) {
-    shaker._addInstantiatedExternalSubclass(coreTypes.doubleClass);
-  }
-
-  @override
-  visitSymbolLiteral(SymbolLiteral node) {
-    shaker._addInstantiatedExternalSubclass(coreTypes.symbolClass);
-  }
-
-  @override
-  visitTypeLiteral(TypeLiteral node) {
-    shaker._addInstantiatedExternalSubclass(coreTypes.typeClass);
-    node.visitChildren(this);
-  }
-
-  @override
-  visitConstantExpression(ConstantExpression node) {
-    if (visitedConstants.add(node.constant)) {
-      node.constant.accept(this);
-    }
-  }
-
-  @override
-  defaultConstant(Constant node) {
-    // This will visit all members of the [Constant], including any
-    // [DartType]s and [Reference]s to other constants.
-    node.visitChildren(this);
-  }
-
-  @override
-  visitNullConstant(NullConstant node) {
-    shaker._addInstantiatedExternalSubclass(shaker.coreTypes.nullClass);
-  }
-
-  @override
-  visitBoolConstant(BoolConstant node) {
-    shaker._addInstantiatedExternalSubclass(shaker.coreTypes.boolClass);
-  }
-
-  @override
-  visitIntConstant(IntConstant node) {
-    shaker._addInstantiatedExternalSubclass(shaker.coreTypes.intClass);
-  }
-
-  @override
-  visitDoubleConstant(DoubleConstant node) {
-    shaker._addInstantiatedExternalSubclass(shaker.coreTypes.doubleClass);
-  }
-
-  @override
-  visitStringConstant(StringConstant node) {
-    shaker._addInstantiatedExternalSubclass(shaker.coreTypes.stringClass);
-  }
-
-  @override
-  visitMapConstant(MapConstant node) {
-    shaker._addInstantiatedExternalSubclass(shaker.coreTypes.mapClass);
-    super.visitMapConstant(node);
-  }
-
-  @override
-  visitListConstant(ListConstant node) {
-    shaker._addInstantiatedExternalSubclass(shaker.coreTypes.listClass);
-    super.visitListConstant(node);
-  }
-
-  @override
-  visitInstanceConstant(InstanceConstant node) {
-    shaker._addInstantiatedClass(node.classNode);
-    super.visitInstanceConstant(node);
-  }
-
-  @override
-  visitTearOffConstant(TearOffConstant node) {
-    addStaticUse(node.procedure);
-    super.visitTearOffConstant(node);
-  }
-
-  @override
-  defaultConstantReference(Constant node) {
-    // Recurse into referenced constants.
-    if (visitedConstants.add(node)) {
-      node.accept(this);
-    }
-  }
-
-  @override
-  visitSuperPropertyGet(SuperPropertyGet node) {
-    throw 'The treeshaker assumes mixins have been desugared.';
-  }
-
-  @override
-  visitSuperPropertySet(SuperPropertySet node) {
-    throw 'The treeshaker assumes mixins have been desugared.';
-  }
-
-  @override
-  visitSuperMethodInvocation(SuperMethodInvocation node) {
-    throw 'The treeshaker assumes mixins have been desugared.';
-  }
-}
-
-/// The degree to which a class is needed in a program.
-///
-/// Each level implies those before it.
-enum ClassRetention {
-  /// The class can be removed.
-  None,
-
-  /// The class contains used static members but is otherwise unused.
-  Namespace,
-
-  /// The class is used in a type or has an instantiated subtype, or for some
-  /// other reason must have its hierarchy information preserved.
-  Hierarchy,
-
-  /// The class is instantiated.
-  Instance,
-
-  /// The class has an instantiated external subclass.
-  ExternalInstance,
-}
-
-/// Removes classes and members that are not needed.
-///
-/// There must not be any dangling references in the program afterwards.
-class _TreeShakingTransformer extends Transformer {
-  final TreeShaker shaker;
-
-  _TreeShakingTransformer(this.shaker);
-
-  Member _translateInterfaceTarget(Member target) {
-    final isUsed = target != null &&
-        (shaker.isMemberUsed(target) ||
-            shaker.isMemberUsedInInterfaceTarget(target));
-    return isUsed ? target : null;
-  }
-
-  void transform(Component component) {
-    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);
-      }
-    }
-    for (var library in component.libraries) {
-      if (!shaker.forceShaking && library.importUri.scheme == 'dart') {
-        // 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.
-
-      // The transformer API does not iterate over `Library.additionalExports`,
-      // so we manually delete the references to shaken nodes.
-      library.additionalExports.removeWhere((Reference reference) {
-        final node = reference.node;
-        if (node is Class) {
-          return !shaker.isNamespaceUsed(node);
-        } else if (node is Typedef) {
-          return !shaker.isTypedefUsed(node);
-        } else {
-          return !shaker.isMemberUsed(node as Member);
-        }
-      });
-    }
-  }
-
-  Typedef visitTypedef(Typedef node) {
-    if (shaker.isTypedefUsed(node)) return node;
-    return null;
-  }
-
-  Class visitClass(Class node) {
-    switch (shaker.getClassRetention(node)) {
-      case ClassRetention.None:
-        node.canonicalName?.unbind();
-        return null; // Remove the class.
-
-      case ClassRetention.Namespace:
-        // The class is only a namespace for static members.  Remove its
-        // hierarchy information.   This is mandatory, since these references
-        // might otherwise become dangling.
-        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);
-    return node;
-  }
-
-  Member defaultMember(Member node) {
-    if (!shaker.isMemberBodyUsed(node)) {
-      if (!shaker.isMemberOverridden(node) &&
-          !shaker.isMemberUsedInInterfaceTarget(node)) {
-        node.canonicalName?.unbind();
-        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;
-  }
-
-  TreeNode defaultTreeNode(TreeNode node) {
-    return node; // Do not traverse into other nodes.
-  }
-}
-
-class _ExternalTypeVisitor extends DartTypeVisitor {
-  final TreeShaker shaker;
-  final bool isCovariant;
-  final bool isContravariant;
-  ClassHierarchy get hierarchy => shaker.hierarchy;
-
-  _ExternalTypeVisitor(this.shaker,
-      {this.isCovariant: false, this.isContravariant: false});
-
-  void visit(DartType type) => type?.accept(this);
-
-  /// Analyze [type] with the opposite variance.
-  void visitContravariant(DartType type) {
-    if (isCovariant && isContravariant) {
-      type?.accept(this);
-    } else if (isContravariant) {
-      type?.accept(shaker._covariantVisitor);
-    } else {
-      type?.accept(shaker._contravariantVisitor);
-    }
-  }
-
-  void visitCovariant(DartType type) => type?.accept(this);
-
-  void visitInvariant(DartType type) => shaker._invariantVisitor.visit(type);
-
-  void visitInvalidType(InvalidType node) {}
-
-  void visitDynamicType(DynamicType node) {
-    // TODO(asgerf): Find a suitable model for untyped externals, e.g. track
-    // them to the first type boundary.
-  }
-
-  void visitVoidType(VoidType node) {}
-
-  void visitInterfaceType(InterfaceType node) {
-    if (isCovariant) {
-      shaker._addInstantiatedExternalSubclass(node.classNode);
-    }
-    if (isContravariant) {
-      shaker._addEscapedClass(node.classNode);
-    }
-    for (int i = 0; i < node.typeArguments.length; ++i) {
-      DartType typeArgument = node.typeArguments[i];
-      // In practice we don't get much out of analyzing variance here, so
-      // just use a whitelist of classes that can be seen as covariant
-      // for external purposes.
-      // TODO(asgerf): Variance analysis might pay off for other external APIs.
-      if (isWhitelistedCovariant(node.classNode)) {
-        visitCovariant(typeArgument);
-      } else {
-        visitInvariant(typeArgument);
-      }
-    }
-  }
-
-  void visitTypedefType(TypedefType node) {
-    shaker.addUsedTypedef(node.typedefNode);
-  }
-
-  void visitFunctionType(FunctionType node) {
-    visit(node.returnType);
-    for (int i = 0; i < node.positionalParameters.length; ++i) {
-      visitContravariant(node.positionalParameters[i]);
-    }
-    for (int i = 0; i < node.namedParameters.length; ++i) {
-      visitContravariant(node.namedParameters[i].type);
-    }
-  }
-
-  void visitTypeParameterType(TypeParameterType node) {}
-
-  /// Just treat a couple of whitelisted classes as having covariant type
-  /// parameters.
-  bool isWhitelistedCovariant(Class classNode) {
-    if (classNode.typeParameters.isEmpty) return false;
-    CoreTypes coreTypes = shaker.coreTypes;
-    return classNode == coreTypes.iteratorClass ||
-        classNode == coreTypes.iterableClass ||
-        classNode == coreTypes.futureClass ||
-        classNode == coreTypes.streamClass ||
-        classNode == coreTypes.listClass ||
-        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/lib/type_algebra.dart b/pkg/kernel/lib/type_algebra.dart
index 094bd2f..a8d41d4 100644
--- a/pkg/kernel/lib/type_algebra.dart
+++ b/pkg/kernel/lib/type_algebra.dart
@@ -275,6 +275,9 @@
 
   @override
   Supertype substituteSupertype(Supertype node) => node;
+
+  @override
+  String toString() => "Substitution.empty";
 }
 
 class _MapSubstitution extends Substitution {
@@ -286,6 +289,9 @@
   DartType getSubstitute(TypeParameter parameter, bool upperBound) {
     return upperBound ? upper[parameter] : lower[parameter];
   }
+
+  @override
+  String toString() => "_MapSubstitution($upper, $lower)";
 }
 
 class _TopSubstitutor extends _TypeSubstitutor {
diff --git a/pkg/kernel/lib/type_checker.dart b/pkg/kernel/lib/type_checker.dart
index 11503d0..8faae52 100644
--- a/pkg/kernel/lib/type_checker.dart
+++ b/pkg/kernel/lib/type_checker.dart
@@ -19,10 +19,8 @@
   final bool ignoreSdk;
   TypeEnvironment environment;
 
-  TypeChecker(this.coreTypes, this.hierarchy,
-      {bool legacyMode: false, this.ignoreSdk: true})
-      : environment =
-            new TypeEnvironment(coreTypes, hierarchy, legacyMode: legacyMode);
+  TypeChecker(this.coreTypes, this.hierarchy, {this.ignoreSdk: true})
+      : environment = new TypeEnvironment(coreTypes, hierarchy);
 
   void checkComponent(Component component) {
     for (var library in component.libraries) {
@@ -489,6 +487,12 @@
   }
 
   @override
+  DartType visitBlockExpression(BlockExpression node) {
+    visitStatement(node.body);
+    return visitExpression(node.value);
+  }
+
+  @override
   DartType visitInstantiation(Instantiation node) {
     DartType type = visitExpression(node.expression);
     if (type is! FunctionType) {
@@ -679,6 +683,48 @@
   }
 
   @override
+  DartType visitListConcatenation(ListConcatenation node) {
+    DartType type = environment.literalListType(node.typeArgument);
+    for (Expression part in node.lists) {
+      DartType partType = visitExpression(part);
+      checkAssignable(node, type, partType);
+    }
+    return type;
+  }
+
+  @override
+  DartType visitSetConcatenation(SetConcatenation node) {
+    DartType type = environment.literalSetType(node.typeArgument);
+    for (Expression part in node.sets) {
+      DartType partType = visitExpression(part);
+      checkAssignable(node, type, partType);
+    }
+    return type;
+  }
+
+  @override
+  DartType visitMapConcatenation(MapConcatenation node) {
+    DartType type = environment.literalMapType(node.keyType, node.valueType);
+    for (Expression part in node.maps) {
+      DartType partType = visitExpression(part);
+      checkAssignable(node, type, partType);
+    }
+    return type;
+  }
+
+  @override
+  DartType visitInstanceCreation(InstanceCreation node) {
+    Substitution substitution = Substitution.fromPairs(
+        node.classNode.typeParameters, node.typeArguments);
+    node.fieldValues.forEach((Reference fieldRef, Expression value) {
+      DartType fieldType = substitution.substituteType(fieldRef.asField.type);
+      DartType valueType = visitExpression(value);
+      checkAssignable(node, fieldType, valueType);
+    });
+    return new InterfaceType(node.classNode, node.typeArguments);
+  }
+
+  @override
   DartType visitStringLiteral(StringLiteral node) {
     return environment.stringType;
   }
@@ -765,6 +811,11 @@
   }
 
   @override
+  visitConstantExpression(ConstantExpression node) {
+    return node.type;
+  }
+
+  @override
   visitAssertStatement(AssertStatement node) {
     visitExpression(node.condition);
     if (node.message != null) {
@@ -988,11 +1039,4 @@
 
   @override
   visitInvalidInitializer(InvalidInitializer node) {}
-
-  @override
-  visitConstantExpression(ConstantExpression node) {
-    // Without explicitly running the "constants" transformation, we should
-    // never get here!
-    throw 'unreachable';
-  }
 }
diff --git a/pkg/kernel/lib/type_environment.dart b/pkg/kernel/lib/type_environment.dart
index 20cceb6..795f9d4 100644
--- a/pkg/kernel/lib/type_environment.dart
+++ b/pkg/kernel/lib/type_environment.dart
@@ -16,9 +16,6 @@
 abstract class TypeEnvironment extends SubtypeTester {
   final CoreTypes coreTypes;
 
-  @override
-  final bool legacyMode;
-
   InterfaceType thisType;
 
   DartType returnType;
@@ -29,12 +26,10 @@
   /// be tolerated.  See [typeError].
   ErrorHandler errorHandler;
 
-  TypeEnvironment.fromSubclass(this.coreTypes, {this.legacyMode: false});
+  TypeEnvironment.fromSubclass(this.coreTypes);
 
-  factory TypeEnvironment(CoreTypes coreTypes, ClassHierarchy hierarchy,
-      {bool legacyMode: false}) {
-    return new HierarchyBasedTypeEnvironment(coreTypes, hierarchy,
-        legacyMode: legacyMode);
+  factory TypeEnvironment(CoreTypes coreTypes, ClassHierarchy hierarchy) {
+    return new HierarchyBasedTypeEnvironment(coreTypes, hierarchy);
   }
 
   InterfaceType get objectType => coreTypes.objectClass.rawType;
@@ -161,7 +156,8 @@
   InterfaceType get rawFunctionType;
   Class get futureOrClass;
   InterfaceType futureType(DartType type);
-  bool get legacyMode;
+
+  static List<Object> typeChecks;
 
   InterfaceType getTypeAsInstanceOf(InterfaceType type, Class superclass);
 
@@ -170,6 +166,19 @@
   bool isTop(DartType type) =>
       type is DynamicType || type is VoidType || type == objectType;
 
+  /// Can be use to collect type checks. To use:
+  /// 1. Rename `isSubtypeOf` to `_isSubtypeOf`.
+  /// 2. Rename `_collect_isSubtypeOf` to `isSubtypeOf`.
+  /// 3. Comment out the call to `_isSubtypeOf` below.
+  // ignore:unused_element
+  bool _collect_isSubtypeOf(DartType subtype, DartType supertype) {
+    bool result = true;
+    // result = _isSubtypeOf(subtype, supertype);
+    typeChecks ??= <Object>[];
+    typeChecks.add([subtype, supertype, result]);
+    return result;
+  }
+
   /// Returns true if [subtype] is a subtype of [supertype].
   bool isSubtypeOf(DartType subtype, DartType supertype) {
     subtype = subtype.unalias;
@@ -183,8 +192,7 @@
     if (isTop(supertype)) return true;
 
     // Handle FutureOr<T> union type.
-    if (!legacyMode &&
-        subtype is InterfaceType &&
+    if (subtype is InterfaceType &&
         identical(subtype.classNode, futureOrClass)) {
       var subtypeArg = subtype.typeArguments[0];
       if (supertype is InterfaceType &&
@@ -201,8 +209,7 @@
           isSubtypeOf(subtypeArg, supertype);
     }
 
-    if (!legacyMode &&
-        supertype is InterfaceType &&
+    if (supertype is InterfaceType &&
         identical(supertype.classNode, futureOrClass)) {
       // given t2 is Future<A> | A, then:
       // t1 <: (Future<A> | A) iff t1 <: Future<A> or t1 <: A
diff --git a/pkg/kernel/lib/verifier.dart b/pkg/kernel/lib/verifier.dart
index 85a8177..39ee540 100644
--- a/pkg/kernel/lib/verifier.dart
+++ b/pkg/kernel/lib/verifier.dart
@@ -338,6 +338,21 @@
     visitWithLocalScope(node);
   }
 
+  visitBlockExpression(BlockExpression node) {
+    int stackHeight = enterLocalScope();
+    // Do not visit the block directly because the value expression needs to
+    // be in its scope.
+    TreeNode oldParent = enterParent(node);
+    enterParent(node.body);
+    for (int i = 0; i < node.body.statements.length; ++i) {
+      node.body.statements[i].accept(this);
+    }
+    exitParent(node);
+    node.value.accept(this);
+    exitParent(oldParent);
+    exitLocalScope(stackHeight);
+  }
+
   visitCatch(Catch node) {
     bool savedInCatchBlock = inCatchBlock;
     inCatchBlock = true;
diff --git a/pkg/kernel/lib/visitor.dart b/pkg/kernel/lib/visitor.dart
index a83374b..b1a9938 100644
--- a/pkg/kernel/lib/visitor.dart
+++ b/pkg/kernel/lib/visitor.dart
@@ -38,6 +38,10 @@
       defaultExpression(node);
   R visitStringConcatenation(StringConcatenation node) =>
       defaultExpression(node);
+  R visitListConcatenation(ListConcatenation node) => defaultExpression(node);
+  R visitSetConcatenation(SetConcatenation node) => defaultExpression(node);
+  R visitMapConcatenation(MapConcatenation node) => defaultExpression(node);
+  R visitInstanceCreation(InstanceCreation node) => defaultExpression(node);
   R visitIsExpression(IsExpression node) => defaultExpression(node);
   R visitAsExpression(AsExpression node) => defaultExpression(node);
   R visitSymbolLiteral(SymbolLiteral node) => defaultExpression(node);
@@ -57,6 +61,7 @@
   R visitBoolLiteral(BoolLiteral node) => defaultBasicLiteral(node);
   R visitNullLiteral(NullLiteral node) => defaultBasicLiteral(node);
   R visitLet(Let node) => defaultExpression(node);
+  R visitBlockExpression(BlockExpression node) => defaultExpression(node);
   R visitInstantiation(Instantiation node) => defaultExpression(node);
   R visitLoadLibrary(LoadLibrary node) => defaultExpression(node);
   R visitCheckLibraryIsLoaded(CheckLibraryIsLoaded node) =>
@@ -160,6 +165,10 @@
       defaultExpression(node);
   R visitStringConcatenation(StringConcatenation node) =>
       defaultExpression(node);
+  R visitListConcatenation(ListConcatenation node) => defaultExpression(node);
+  R visitSetConcatenation(SetConcatenation node) => defaultExpression(node);
+  R visitMapConcatenation(MapConcatenation node) => defaultExpression(node);
+  R visitInstanceCreation(InstanceCreation node) => defaultExpression(node);
   R visitIsExpression(IsExpression node) => defaultExpression(node);
   R visitAsExpression(AsExpression node) => defaultExpression(node);
   R visitSymbolLiteral(SymbolLiteral node) => defaultExpression(node);
@@ -179,6 +188,7 @@
   R visitBoolLiteral(BoolLiteral node) => defaultBasicLiteral(node);
   R visitNullLiteral(NullLiteral node) => defaultBasicLiteral(node);
   R visitLet(Let node) => defaultExpression(node);
+  R visitBlockExpression(BlockExpression node) => defaultExpression(node);
   R visitInstantiation(Instantiation node) => defaultExpression(node);
   R visitLoadLibrary(LoadLibrary node) => defaultExpression(node);
   R visitCheckLibraryIsLoaded(CheckLibraryIsLoaded node) =>
@@ -280,6 +290,8 @@
 }
 
 class ConstantVisitor<R> {
+  const ConstantVisitor();
+
   R defaultConstant(Constant node) => null;
 
   R visitNullConstant(NullConstant node) => defaultConstant(node);
@@ -290,6 +302,7 @@
   R visitSymbolConstant(SymbolConstant node) => defaultConstant(node);
   R visitMapConstant(MapConstant node) => defaultConstant(node);
   R visitListConstant(ListConstant node) => defaultConstant(node);
+  R visitSetConstant(SetConstant node) => defaultConstant(node);
   R visitInstanceConstant(InstanceConstant node) => defaultConstant(node);
   R visitPartialInstantiationConstant(PartialInstantiationConstant node) =>
       defaultConstant(node);
@@ -344,6 +357,7 @@
   R visitSymbolConstant(SymbolConstant node) => defaultConstant(node);
   R visitMapConstant(MapConstant node) => defaultConstant(node);
   R visitListConstant(ListConstant node) => defaultConstant(node);
+  R visitSetConstant(SetConstant node) => defaultConstant(node);
   R visitInstanceConstant(InstanceConstant node) => defaultConstant(node);
   R visitPartialInstantiationConstant(PartialInstantiationConstant node) =>
       defaultConstant(node);
@@ -373,6 +387,8 @@
       defaultConstantReference(node);
   R visitListConstantReference(ListConstant node) =>
       defaultConstantReference(node);
+  R visitSetConstantReference(SetConstant node) =>
+      defaultConstantReference(node);
   R visitInstanceConstantReference(InstanceConstant node) =>
       defaultConstantReference(node);
   R visitPartialInstantiationConstantReference(
@@ -490,6 +506,14 @@
       defaultExpression(node, arg);
   R visitStringConcatenation(StringConcatenation node, T arg) =>
       defaultExpression(node, arg);
+  R visitListConcatenation(ListConcatenation node, T arg) =>
+      defaultExpression(node, arg);
+  R visitSetConcatenation(SetConcatenation node, T arg) =>
+      defaultExpression(node, arg);
+  R visitMapConcatenation(MapConcatenation node, T arg) =>
+      defaultExpression(node, arg);
+  R visitInstanceCreation(InstanceCreation node, T arg) =>
+      defaultExpression(node, arg);
   R visitIsExpression(IsExpression node, T arg) => defaultExpression(node, arg);
   R visitAsExpression(AsExpression node, T arg) => defaultExpression(node, arg);
   R visitSymbolLiteral(SymbolLiteral node, T arg) =>
@@ -516,6 +540,8 @@
   R visitBoolLiteral(BoolLiteral node, T arg) => defaultBasicLiteral(node, arg);
   R visitNullLiteral(NullLiteral node, T arg) => defaultBasicLiteral(node, arg);
   R visitLet(Let node, T arg) => defaultExpression(node, arg);
+  R visitBlockExpression(BlockExpression node, T arg) =>
+      defaultExpression(node, arg);
   R visitInstantiation(Instantiation node, T arg) =>
       defaultExpression(node, arg);
   R visitLoadLibrary(LoadLibrary node, T arg) => defaultExpression(node, arg);
diff --git a/pkg/kernel/lib/vm/constants_native_effects.dart b/pkg/kernel/lib/vm/constants_native_effects.dart
index 58c8eca..2dc607d 100644
--- a/pkg/kernel/lib/vm/constants_native_effects.dart
+++ b/pkg/kernel/lib/vm/constants_native_effects.dart
@@ -5,7 +5,7 @@
 library vm.constants_native_effects;
 
 import '../ast.dart';
-import '../transformations/constants.dart';
+import '../target/targets.dart';
 import '../core_types.dart';
 
 class VmConstantsBackend extends ConstantsBackend {
@@ -26,30 +26,26 @@
   }
 
   @override
-  Constant lowerConstant(Constant constant) {
-    if (constant is MapConstant) {
-      // The _ImmutableMap class is implemented via one field pointing to a list
-      // of key/value pairs -- see runtime/lib/immutable_map.dart!
-      final List<Constant> kvListPairs =
-          new List<Constant>(2 * constant.entries.length);
-      for (int i = 0; i < constant.entries.length; i++) {
-        final ConstantMapEntry entry = constant.entries[i];
-        kvListPairs[2 * i] = entry.key;
-        kvListPairs[2 * i + 1] = entry.value;
-      }
-      // This is a bit fishy, since we merge the key and the value type by
-      // putting both into the same list.
-      final kvListConstant = new ListConstant(const DynamicType(), kvListPairs);
-      assert(immutableMapClass.fields.length == 1);
-      final Field kvPairListField = immutableMapClass.fields[0];
-      return new InstanceConstant(immutableMapClass.reference, <DartType>[
-        constant.keyType,
-        constant.valueType,
-      ], <Reference, Constant>{
-        kvPairListField.reference: kvListConstant,
-      });
+  Constant lowerMapConstant(MapConstant constant) {
+    // The _ImmutableMap class is implemented via one field pointing to a list
+    // of key/value pairs -- see runtime/lib/immutable_map.dart!
+    final List<Constant> kvListPairs =
+        new List<Constant>(2 * constant.entries.length);
+    for (int i = 0; i < constant.entries.length; i++) {
+      final ConstantMapEntry entry = constant.entries[i];
+      kvListPairs[2 * i] = entry.key;
+      kvListPairs[2 * i + 1] = entry.value;
     }
-
-    return constant;
+    // This is a bit fishy, since we merge the key and the value type by
+    // putting both into the same list.
+    final kvListConstant = new ListConstant(const DynamicType(), kvListPairs);
+    assert(immutableMapClass.fields.length == 1);
+    final Field kvPairListField = immutableMapClass.fields[0];
+    return new InstanceConstant(immutableMapClass.reference, <DartType>[
+      constant.keyType,
+      constant.valueType,
+    ], <Reference, Constant>{
+      kvPairListField.reference: kvListConstant,
+    });
   }
 }
diff --git a/pkg/kernel/pubspec.yaml b/pkg/kernel/pubspec.yaml
index 21e199c..3cbab2e 100644
--- a/pkg/kernel/pubspec.yaml
+++ b/pkg/kernel/pubspec.yaml
@@ -1,21 +1,16 @@
 name: kernel
 # Currently, kernel API is not stable and users should
 # not depend on semver semantics when depending on this package.
-version: 0.3.11
+version: 0.3.15
 author: Dart Team <misc@dartlang.org>
 description: Dart IR (Intermediate Representation)
 homepage: https://github.com/dart-lang/sdk/tree/master/pkg/kernel
 environment:
   sdk: '>=2.0.0-dev.48.0 <3.0.0'
 dependencies:
-  path: ^1.3.9
   args: '>=0.13.4 <2.0.0'
 dev_dependencies:
-  expect:
-    path: ../expect
-  front_end:
-    path: ../front_end
-  test:
-    path: ../third_party/pkg/test
-  testing:
-    path: ../testing
+  expect: any
+  front_end: any
+  test: any
+  testing: any
diff --git a/pkg/kernel/test/class_hierarchy_test.dart b/pkg/kernel/test/class_hierarchy_test.dart
index c195192..469b603 100644
--- a/pkg/kernel/test/class_hierarchy_test.dart
+++ b/pkg/kernel/test/class_hierarchy_test.dart
@@ -111,7 +111,7 @@
     _assertLibraryText(libWithB, '''
 library test_b;
 import self as self;
-import "./test.dart" as test;
+import "test.dart" as test;
 
 class B extends test::A {}
 ''');
diff --git a/pkg/kernel/test/import_table_test.dart b/pkg/kernel/test/import_table_test.dart
new file mode 100644
index 0000000..d02207f
--- /dev/null
+++ b/pkg/kernel/test/import_table_test.dart
@@ -0,0 +1,35 @@
+import 'package:kernel/import_table.dart';
+
+main() {
+  List<String> paths = new List<String>();
+  paths.add("file://");
+  paths.add("file:///a");
+  paths.add("file:///a/b");
+  paths.add("file:///a/b/c");
+
+  int end = paths.length;
+  for (int i = 0; i < end; i++) {
+    paths.add(paths[i] + "/d.dart");
+    paths.add(paths[i] + "/e.dart");
+    paths.add(paths[i] + "/");
+  }
+  paths[0] = "file:///";
+  paths.sort();
+  for (int i = 0; i < paths.length; i++) {
+    for (int j = 0; j < paths.length; j++) {
+      check(paths[i], paths[j]);
+    }
+  }
+  check("", "");
+}
+
+void check(String target, String ref) {
+  Uri uriTarget = Uri.parse(target);
+  Uri uriRef = Uri.parse(ref);
+  String relative = relativeUriPath(uriTarget, uriRef);
+  if (Uri.base.resolveUri(uriTarget) !=
+      Uri.base.resolveUri(uriRef).resolve(relative)) {
+    throw "Failure on '$target' and '$ref': Got '$relative' which resolves to "
+        "${uriRef.resolve(relative)}";
+  }
+}
diff --git a/pkg/kernel/test/text_serializer_from_kernel_nodes_test.dart b/pkg/kernel/test/text_serializer_from_kernel_nodes_test.dart
index 34f572b..9603db8 100644
--- a/pkg/kernel/test/text_serializer_from_kernel_nodes_test.dart
+++ b/pkg/kernel/test/text_serializer_from_kernel_nodes_test.dart
@@ -14,19 +14,19 @@
 }
 
 // Wrappers for testing.
-Expression readExpression(String input, DeserializationState state) {
+Statement readStatement(String input, DeserializationState state) {
   TextIterator stream = new TextIterator(input, 0);
   stream.moveNext();
-  Expression result = expressionSerializer.readFrom(stream, state);
+  Statement result = statementSerializer.readFrom(stream, state);
   if (stream.moveNext()) {
     throw StateError("extra cruft in basic literal");
   }
   return result;
 }
 
-String writeExpression(Expression expression, SerializationState state) {
+String writeStatement(Statement statement, SerializationState state) {
   StringBuffer buffer = new StringBuffer();
-  expressionSerializer.writeTo(buffer, expression, state);
+  statementSerializer.writeTo(buffer, statement, state);
   return buffer.toString();
 }
 
@@ -53,54 +53,59 @@
   List<String> failures = [];
   List<TestCase> tests = <TestCase>[
     new TestCase(
-        name: "let dynamic x = 42 in x",
+        name: "let dynamic x = 42 in x;",
         node: () {
           VariableDeclaration x = new VariableDeclaration("x",
               type: const DynamicType(), initializer: new IntLiteral(42));
-          return new Let(x, new VariableGet(x));
-        }(),
-        expectation:
-            "(let (var \"x^0\" (dynamic) (int 42) ()) (get-var \"x^0\" _))"),
-    new TestCase(
-        name: "let dynamic x = 42 in let Bottom x^0 = null in x",
-        node: () {
-          VariableDeclaration outterLetVar = new VariableDeclaration("x",
-              type: const DynamicType(), initializer: new IntLiteral(42));
-          VariableDeclaration innerLetVar = new VariableDeclaration("x",
-              type: const BottomType(), initializer: new NullLiteral());
-          return new Let(outterLetVar,
-              new Let(innerLetVar, new VariableGet(outterLetVar)));
+          return new ExpressionStatement(new Let(x, new VariableGet(x)));
         }(),
         expectation: ""
-            "(let (var \"x^0\" (dynamic) (int 42) ())"
-            " (let (var \"x^1\" (bottom) (null) ())"
+            "(expr (let (var \"x^0\" (dynamic) (int 42) ())"
             " (get-var \"x^0\" _)))"),
     new TestCase(
-        name: "let dynamic x = 42 in let Bottom x^0 = null in x^0",
+        name: "let dynamic x = 42 in let Bottom x^0 = null in x;",
         node: () {
           VariableDeclaration outterLetVar = new VariableDeclaration("x",
               type: const DynamicType(), initializer: new IntLiteral(42));
           VariableDeclaration innerLetVar = new VariableDeclaration("x",
               type: const BottomType(), initializer: new NullLiteral());
-          return new Let(
-              outterLetVar, new Let(innerLetVar, new VariableGet(innerLetVar)));
+          return new ExpressionStatement(new Let(outterLetVar,
+              new Let(innerLetVar, new VariableGet(outterLetVar))));
         }(),
         expectation: ""
-            "(let (var \"x^0\" (dynamic) (int 42) ())"
+            "(expr (let (var \"x^0\" (dynamic) (int 42) ())"
             " (let (var \"x^1\" (bottom) (null) ())"
-            " (get-var \"x^1\" _)))"),
+            " (get-var \"x^0\" _))))"),
+    new TestCase(
+        name: "let dynamic x = 42 in let Bottom x^0 = null in x^0;",
+        node: () {
+          VariableDeclaration outterLetVar = new VariableDeclaration("x",
+              type: const DynamicType(), initializer: new IntLiteral(42));
+          VariableDeclaration innerLetVar = new VariableDeclaration("x",
+              type: const BottomType(), initializer: new NullLiteral());
+          return new ExpressionStatement(new Let(outterLetVar,
+              new Let(innerLetVar, new VariableGet(innerLetVar))));
+        }(),
+        expectation: ""
+            "(expr (let (var \"x^0\" (dynamic) (int 42) ())"
+            " (let (var \"x^1\" (bottom) (null) ())"
+            " (get-var \"x^1\" _))))"),
     () {
       VariableDeclaration x =
           new VariableDeclaration("x", type: const DynamicType());
       return new TestCase(
-          name: "/* suppose: dynamic x; */ x = 42",
-          node: new VariableSet(x, new IntLiteral(42)),
-          expectation: "(set-var \"x^0\" (int 42))",
+          name: "/* suppose: dynamic x; */ x = 42;",
+          node: new ExpressionStatement(new VariableSet(x, new IntLiteral(42))),
+          expectation: "(expr (set-var \"x^0\" (int 42)))",
           serializationState: new SerializationState(
-            new SerializationEnvironment(null)..add(x, "x^0"),
+            new SerializationEnvironment(null)
+              ..addBinder(x, "x^0")
+              ..close(),
           ),
           deserializationState: new DeserializationState(
-              new DeserializationEnvironment(null)..add("x^0", x),
+              new DeserializationEnvironment(null)
+                ..addBinder("x^0", x)
+                ..close(),
               new CanonicalName.root()));
     }(),
     () {
@@ -111,9 +116,10 @@
       Component component = new Component(libraries: <Library>[library]);
       component.computeCanonicalNames();
       return new TestCase(
-          name: "/* suppose top-level: dynamic field; */ field",
-          node: new StaticGet(field),
-          expectation: "(get-static \"package:foo/bar.dart::@fields::field\")",
+          name: "/* suppose top-level: dynamic field; */ field;",
+          node: new ExpressionStatement(new StaticGet(field)),
+          expectation: ""
+              "(expr (get-static \"package:foo/bar.dart::@fields::field\"))",
           serializationState: new SerializationState(null),
           deserializationState: new DeserializationState(null, component.root));
     }(),
@@ -125,10 +131,12 @@
       Component component = new Component(libraries: <Library>[library]);
       component.computeCanonicalNames();
       return new TestCase(
-          name: "/* suppose top-level: dynamic field; */ field = 1",
-          node: new StaticSet(field, new IntLiteral(1)),
-          expectation:
-              "(set-static \"package:foo/bar.dart::@fields::field\" (int 1))",
+          name: "/* suppose top-level: dynamic field; */ field = 1;",
+          node:
+              new ExpressionStatement(new StaticSet(field, new IntLiteral(1))),
+          expectation: ""
+              "(expr"
+              " (set-static \"package:foo/bar.dart::@fields::field\" (int 1)))",
           serializationState: new SerializationState(null),
           deserializationState: new DeserializationState(null, component.root));
     }(),
@@ -146,13 +154,14 @@
       Component component = new Component(libraries: <Library>[library]);
       component.computeCanonicalNames();
       return new TestCase(
-          name: "/* suppose top-level: foo(dynamic x) {...}; */ foo(42)",
-          node: new StaticInvocation.byReference(topLevelProcedure.reference,
+          name: "/* suppose top-level: foo(dynamic x) {...}; */ foo(42);",
+          node: new ExpressionStatement(new StaticInvocation.byReference(
+              topLevelProcedure.reference,
               new Arguments(<Expression>[new IntLiteral(42)]),
-              isConst: false),
+              isConst: false)),
           expectation: ""
-              "(invoke-static \"package:foo/bar.dart::@methods::foo\""
-              " () ((int 42)) ())",
+              "(expr (invoke-static \"package:foo/bar.dart::@methods::foo\""
+              " () ((int 42)) ()))",
           serializationState: new SerializationState(null),
           deserializationState: new DeserializationState(null, component.root));
     }(),
@@ -170,14 +179,14 @@
       return new TestCase(
           name: ""
               "/* suppose A { const A(); const factory A.foo() = A; } */"
-              " const A.foo()",
-          node: new StaticInvocation.byReference(
+              " const A.foo();",
+          node: new ExpressionStatement(new StaticInvocation.byReference(
               factoryConstructor.reference, new Arguments([]),
-              isConst: true),
+              isConst: true)),
           expectation: ""
-              "(invoke-const-static"
+              "(expr (invoke-const-static"
               " \"package:foo/bar.dart::A::@factories::foo\""
-              " () () ())",
+              " () () ()))",
           serializationState: new SerializationState(null),
           deserializationState: new DeserializationState(null, component.root));
     }(),
@@ -193,16 +202,20 @@
       VariableDeclaration x =
           new VariableDeclaration("x", type: const DynamicType());
       return new TestCase(
-          name: "/* suppose A {dynamic field;} A x; */ x.{A::field}",
-          node: new DirectPropertyGet.byReference(
-              new VariableGet(x), field.reference),
+          name: "/* suppose A {dynamic field;} A x; */ x.{A::field};",
+          node: new ExpressionStatement(new DirectPropertyGet.byReference(
+              new VariableGet(x), field.reference)),
           expectation: ""
-              "(get-direct-prop (get-var \"x^0\" _)"
-              " \"package:foo/bar.dart::A::@fields::field\")",
-          serializationState: new SerializationState(
-              new SerializationEnvironment(null)..add(x, "x^0")),
+              "(expr (get-direct-prop (get-var \"x^0\" _)"
+              " \"package:foo/bar.dart::A::@fields::field\"))",
+          serializationState:
+              new SerializationState(new SerializationEnvironment(null)
+                ..addBinder(x, "x^0")
+                ..close()),
           deserializationState: new DeserializationState(
-              new DeserializationEnvironment(null)..add("x^0", x),
+              new DeserializationEnvironment(null)
+                ..addBinder("x^0", x)
+                ..close(),
               component.root));
     }(),
     () {
@@ -217,16 +230,20 @@
       VariableDeclaration x =
           new VariableDeclaration("x", type: const DynamicType());
       return new TestCase(
-          name: "/* suppose A {dynamic field;} A x; */ x.{A::field} = 42",
-          node: new DirectPropertySet.byReference(
-              new VariableGet(x), field.reference, new IntLiteral(42)),
+          name: "/* suppose A {dynamic field;} A x; */ x.{A::field} = 42;",
+          node: new ExpressionStatement(new DirectPropertySet.byReference(
+              new VariableGet(x), field.reference, new IntLiteral(42))),
           expectation: ""
-              "(set-direct-prop (get-var \"x^0\" _)"
-              " \"package:foo/bar.dart::A::@fields::field\" (int 42))",
-          serializationState: new SerializationState(
-              new SerializationEnvironment(null)..add(x, "x^0")),
+              "(expr (set-direct-prop (get-var \"x^0\" _)"
+              " \"package:foo/bar.dart::A::@fields::field\" (int 42)))",
+          serializationState:
+              new SerializationState(new SerializationEnvironment(null)
+                ..addBinder(x, "x^0")
+                ..close()),
           deserializationState: new DeserializationState(
-              new DeserializationEnvironment(null)..add("x^0", x),
+              new DeserializationEnvironment(null)
+                ..addBinder("x^0", x)
+                ..close(),
               component.root));
     }(),
     () {
@@ -243,17 +260,21 @@
       VariableDeclaration x =
           new VariableDeclaration("x", type: const DynamicType());
       return new TestCase(
-          name: "/* suppose A {foo() {...}} A x; */ x.{A::foo}()",
-          node: new DirectMethodInvocation.byReference(
-              new VariableGet(x), method.reference, new Arguments([])),
+          name: "/* suppose A {foo() {...}} A x; */ x.{A::foo}();",
+          node: new ExpressionStatement(new DirectMethodInvocation.byReference(
+              new VariableGet(x), method.reference, new Arguments([]))),
           expectation: ""
-              "(invoke-direct-method (get-var \"x^0\" _)"
+              "(expr (invoke-direct-method (get-var \"x^0\" _)"
               " \"package:foo/bar.dart::A::@methods::foo\""
-              " () () ())",
-          serializationState: new SerializationState(
-              new SerializationEnvironment(null)..add(x, "x^0")),
+              " () () ()))",
+          serializationState:
+              new SerializationState(new SerializationEnvironment(null)
+                ..addBinder(x, "x^0")
+                ..close()),
           deserializationState: new DeserializationState(
-              new DeserializationEnvironment(null)..add("x^0", x),
+              new DeserializationEnvironment(null)
+                ..addBinder("x^0", x)
+                ..close(),
               component.root));
     }(),
     () {
@@ -267,13 +288,13 @@
       Component component = new Component(libraries: <Library>[library]);
       component.computeCanonicalNames();
       return new TestCase(
-          name: "/* suppose A {A.foo();} */ new A()",
-          node: new ConstructorInvocation.byReference(
-              constructor.reference, new Arguments([])),
+          name: "/* suppose A {A.foo();} */ new A();",
+          node: new ExpressionStatement(new ConstructorInvocation.byReference(
+              constructor.reference, new Arguments([]))),
           expectation: ""
-              "(invoke-constructor"
+              "(expr (invoke-constructor"
               " \"package:foo/bar.dart::A::@constructors::foo\""
-              " () () ())",
+              " () () ()))",
           serializationState: new SerializationState(null),
           deserializationState: new DeserializationState(null, component.root));
     }(),
@@ -288,21 +309,44 @@
       Component component = new Component(libraries: <Library>[library]);
       component.computeCanonicalNames();
       return new TestCase(
-          name: "/* suppose A {const A.foo();} */ const A()",
-          node: new ConstructorInvocation.byReference(
+          name: "/* suppose A {const A.foo();} */ const A();",
+          node: new ExpressionStatement(new ConstructorInvocation.byReference(
               constructor.reference, new Arguments([]),
-              isConst: true),
+              isConst: true)),
           expectation: ""
-              "(invoke-const-constructor"
+              "(expr (invoke-const-constructor"
               " \"package:foo/bar.dart::A::@constructors::foo\""
-              " () () ())",
+              " () () ()))",
           serializationState: new SerializationState(null),
           deserializationState: new DeserializationState(null, component.root));
     }(),
+    () {
+      TypeParameter outterParam =
+          new TypeParameter("T", const DynamicType(), const DynamicType());
+      TypeParameter innerParam =
+          new TypeParameter("T", const DynamicType(), const DynamicType());
+      return new TestCase(
+          name: "/* T Function<T>(T Function<T>()); */",
+          node: new ExpressionStatement(new TypeLiteral(new FunctionType(
+              [
+                new FunctionType([], new TypeParameterType(innerParam),
+                    typeParameters: [innerParam])
+              ],
+              new TypeParameterType(outterParam),
+              typeParameters: [outterParam]))),
+          expectation: ""
+              "(expr (type (-> (\"T^0\") ((dynamic)) ((dynamic)) "
+              "((-> (\"T^1\") ((dynamic)) ((dynamic)) () () () "
+              "(par \"T^1\" _))) () () (par \"T^0\" _))))",
+          serializationState:
+              new SerializationState(new SerializationEnvironment(null)),
+          deserializationState: new DeserializationState(
+              new DeserializationEnvironment(null), null));
+    }(),
   ];
   for (TestCase testCase in tests) {
     String roundTripInput =
-        writeExpression(testCase.node, testCase.serializationState);
+        writeStatement(testCase.node, testCase.serializationState);
     if (roundTripInput != testCase.expectation) {
       failures.add(''
           '* initial serialization for test "${testCase.name}"'
@@ -310,9 +354,9 @@
     }
 
     TreeNode deserialized =
-        readExpression(roundTripInput, testCase.deserializationState);
+        readStatement(roundTripInput, testCase.deserializationState);
     String roundTripOutput =
-        writeExpression(deserialized, testCase.serializationState);
+        writeStatement(deserialized, testCase.serializationState);
     if (roundTripOutput != roundTripInput) {
       failures.add(''
           '* input "${testCase.name}" gave output "${roundTripOutput}"');
diff --git a/pkg/kernel/test/text_serializer_test.dart b/pkg/kernel/test/text_serializer_test.dart
index 1cd569c..ae80281 100644
--- a/pkg/kernel/test/text_serializer_test.dart
+++ b/pkg/kernel/test/text_serializer_test.dart
@@ -79,11 +79,17 @@
     "(map (dynamic) (void) ((int 0) (null) (int 1) (null) (int 2) (null)))",
     "(const-map (dynamic) (void) ((int 0) (null) (int 1) (null) "
         "(int 2) (null)))",
-    "(type (-> ((dynamic)) 1 (dynamic)))",
-    "(type (-> ((dynamic)) 0 (dynamic)))",
-    "(type (-> ((dynamic) (dynamic)) 2 (dynamic)))",
-    "(type (-> () 0 (dynamic)))",
-    "(type (-> ((-> ((dynamic)) 1 (dynamic))) 1 (dynamic)))",
+    "(type (-> () () () ((dynamic)) () () (dynamic)))",
+    "(type (-> () () () () ((dynamic)) () (dynamic)))",
+    "(type (-> () () () ((dynamic) (dynamic)) () () (dynamic)))",
+    "(type (-> () () () () () () (dynamic)))",
+    "(type (-> () () () ((-> () () () ((dynamic)) () () (dynamic))) () () "
+        "(dynamic)))",
+    "(type (-> (\"T^0\") ((dynamic)) ((dynamic)) () () () (dynamic)))",
+    "(type (-> (\"T^0\") ((dynamic)) ((dynamic)) ((par \"T^0\" _)) () () "
+        "(par \"T^0\" _)))",
+    "(type (-> (\"T^0\" \"S^1\") ((par \"S^1\" _) (par \"T^0\" _)) ((dynamic) "
+        "(dynamic)) () () () (dynamic)))",
   ];
   for (var test in tests) {
     var literal = readExpression(test);
diff --git a/pkg/kernel/test/treeshaker_bench.dart b/pkg/kernel/test/treeshaker_bench.dart
deleted file mode 100644
index a34ac9e..0000000
--- a/pkg/kernel/test/treeshaker_bench.dart
+++ /dev/null
@@ -1,97 +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.
-library kernel.treeshaker_bench;
-
-import 'dart:io';
-
-import 'package:args/args.dart';
-import 'package:kernel/class_hierarchy.dart';
-import 'package:kernel/core_types.dart';
-import 'package:kernel/kernel.dart';
-import 'package:kernel/transformations/treeshaker.dart';
-
-import 'class_hierarchy_basic.dart';
-
-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)
-  ..addFlag('legacy-mode',
-      help: 'Run the tree shaker in legacy mode', negatable: false);
-
-String usage = '''
-Usage: treeshaker_bench [options] FILE.dill
-
-Benchmark the tree shaker and the class hierarchy it depends on.
-
-Options:
-${argParser.usage}
-''';
-
-void main(List<String> args) {
-  if (args.length == 0) {
-    print(usage);
-    exit(1);
-  }
-  ArgResults options = argParser.parse(args);
-  if (options.rest.length != 1) {
-    print('Exactly one file must be given');
-    exit(1);
-  }
-  String filename = options.rest.single;
-  bool legacyMode = options['legacy-mode'];
-
-  Component component = loadComponentFromBinary(filename);
-
-  ClassHierarchy buildClassHierarchy() {
-    return options['basic']
-        ? new BasicClassHierarchy(component)
-        : new ClassHierarchy(component);
-  }
-
-  CoreTypes coreTypes = new CoreTypes(component);
-
-  var watch = new Stopwatch()..start();
-  ClassHierarchy sharedClassHierarchy = buildClassHierarchy();
-  int coldHierarchyTime = watch.elapsedMicroseconds;
-  var shaker = new TreeShaker(coreTypes, sharedClassHierarchy, component,
-      legacyMode: legacyMode);
-  if (options['diagnose']) {
-    print(shaker.getDiagnosticString());
-  }
-  shaker = null;
-  int coldTreeShakingTime = watch.elapsedMicroseconds;
-
-  ClassHierarchy getClassHierarchy() {
-    return options['from-scratch']
-        ? buildClassHierarchy()
-        : sharedClassHierarchy;
-  }
-
-  const int numberOfTrials = 50;
-  int hotHierarchyTime = 0;
-  int hotTreeShakingTime = 0;
-  watch.reset();
-  for (int i = 0; i < numberOfTrials; i++) {
-    watch.reset();
-    var hierarchy = getClassHierarchy();
-    hotHierarchyTime += watch.elapsedMicroseconds;
-    new TreeShaker(coreTypes, hierarchy, component, legacyMode: legacyMode);
-    hotTreeShakingTime += watch.elapsedMicroseconds;
-  }
-  hotHierarchyTime ~/= numberOfTrials;
-  hotTreeShakingTime ~/= numberOfTrials;
-
-  var coldShakingMs = coldTreeShakingTime ~/ 1000;
-  var coldHierarchyMs = coldHierarchyTime ~/ 1000;
-  var hotShakingMs = hotTreeShakingTime ~/ 1000;
-  var hotHierarchyMs = hotHierarchyTime ~/ 1000;
-
-  print('''
-build.cold $coldShakingMs ms ($coldHierarchyMs ms from hierarchy)
-build.hot  $hotShakingMs ms ($hotHierarchyMs ms from hierarchy)''');
-}
diff --git a/pkg/kernel/test/treeshaker_check.dart b/pkg/kernel/test/treeshaker_check.dart
deleted file mode 100644
index 92711b6..0000000
--- a/pkg/kernel/test/treeshaker_check.dart
+++ /dev/null
@@ -1,61 +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.
-library kernel.treeshaker_check;
-
-import 'dart:io';
-
-import 'package:kernel/class_hierarchy.dart';
-import 'package:kernel/core_types.dart';
-import 'package:kernel/kernel.dart';
-import 'package:kernel/transformations/treeshaker.dart';
-
-String usage = '''
-Usage: treeshaker_check FILE.dill
-
-Run the tree shaker on FILE.dill and perform some internal sanity checks.
-''';
-
-main(List<String> args) {
-  if (args.length == 0) {
-    print(usage);
-    exit(1);
-  }
-  var component = loadComponentFromBinary(args[0]);
-  var coreTypes = new CoreTypes(component);
-  var hierarchy = new ClassHierarchy(component);
-  var shaker =
-      new TreeShaker(coreTypes, hierarchy, component, legacyMode: true);
-  shaker.transform(component);
-  new TreeShakingSanityCheck(shaker).visit(component);
-}
-
-class TreeShakingSanityCheck extends RecursiveVisitor {
-  final TreeShaker shaker;
-  bool isInCoreLibrary = false;
-
-  TreeShakingSanityCheck(this.shaker);
-
-  void visit(Node node) {
-    node.accept(this);
-  }
-
-  visitLibrary(Library node) {
-    isInCoreLibrary = (node.importUri.scheme == 'dart');
-    super.visitLibrary(node);
-  }
-
-  defaultMember(Member member) {
-    if (!isInCoreLibrary &&
-        member is! Constructor &&
-        !shaker.isMemberUsed(member)) {
-      throw 'Unused member $member was not removed';
-    }
-  }
-
-  defaultMemberReference(Member target) {
-    if (!shaker.isMemberUsed(target)) {
-      throw 'Found reference to $target';
-    }
-  }
-}
diff --git a/pkg/kernel/test/treeshaker_dump.dart b/pkg/kernel/test/treeshaker_dump.dart
deleted file mode 100644
index 1073c6d..0000000
--- a/pkg/kernel/test/treeshaker_dump.dart
+++ /dev/null
@@ -1,150 +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.
-library kernel.treeshaker_dump;
-
-import 'dart:io';
-import 'package:kernel/class_hierarchy.dart';
-import 'package:kernel/core_types.dart';
-import 'package:kernel/kernel.dart';
-import 'package:kernel/transformations/treeshaker.dart';
-import 'package:args/args.dart';
-import 'package:path/path.dart' as pathlib;
-import 'package:kernel/text/ast_to_text.dart';
-
-ArgParser parser = new ArgParser(allowTrailingOptions: true)
-  ..addFlag('used', help: 'Print used members', negatable: false)
-  ..addFlag('unused', help: 'Print unused members', negatable: false)
-  ..addFlag('instantiated',
-      help: 'Print instantiated classes', negatable: false)
-  ..addFlag('types', help: 'Print classes used as a type', negatable: false)
-  ..addFlag('summary',
-      help: 'Print short summary of tree shaking results', defaultsTo: true)
-  ..addFlag('diff',
-      help: 'Print textual output before and after tree shaking.\n'
-          'Files are written to FILE.before.txt and FILE.after.txt',
-      negatable: false)
-  ..addOption('output',
-      help: 'The --diff files are written to the given directory instead of '
-          'the working directory')
-  ..addFlag('legacy-mode', help: 'Run the tree shaker in legacy mode');
-
-String usage = '''
-Usage: treeshaker_dump [options] FILE.dill
-
-Runs tree shaking on the given component and prints information about the results.
-
-Example:
-  treeshaker_dump --instantiated foo.dill
-
-Example:
-    treeshaker_dump --diff foo.dill
-    diff -cd foo.{before,after}.txt > diff.txt
-    # open diff.txt in an editor
-
-Options:
-${parser.usage}
-''';
-
-main(List<String> args) {
-  if (args.isEmpty) {
-    print(usage);
-    exit(1);
-  }
-  ArgResults options = parser.parse(args);
-  if (options.rest.length != 1) {
-    print('Exactly one file should be given.');
-    exit(1);
-  }
-  String filename = options.rest.single;
-
-  if (options['output'] != null && !options['diff']) {
-    print('--output must be used with --diff');
-    exit(1);
-  }
-
-  bool legacyMode = options['legacy-mode'];
-
-  Component component = loadComponentFromBinary(filename);
-  CoreTypes coreTypes = new CoreTypes(component);
-  ClassHierarchy hierarchy = new ClassHierarchy(component);
-  TreeShaker shaker =
-      new TreeShaker(coreTypes, hierarchy, component, legacyMode: legacyMode);
-  int totalClasses = 0;
-  int totalInstantiationCandidates = 0;
-  int totalMembers = 0;
-  int usedClasses = 0;
-  int instantiatedClasses = 0;
-  int usedMembers = 0;
-
-  void visitMember(Member member) {
-    if (member.isAbstract) return; // Abstract members are not relevant.
-    ++totalMembers;
-    bool isUsed = shaker.isMemberBodyUsed(member);
-    if (isUsed) {
-      ++usedMembers;
-    }
-    if (isUsed && options['used'] || !isUsed && options['unused']) {
-      String prefix = (options['used'] && options['unused'])
-          ? (isUsed ? 'USED   ' : 'UNUSED ')
-          : '';
-      print('$prefix$member');
-    }
-  }
-
-  for (var library in component.libraries) {
-    library.members.forEach(visitMember);
-    for (Class classNode in library.classes) {
-      ++totalClasses;
-      if (shaker.isInstantiated(classNode)) {
-        ++instantiatedClasses;
-        ++totalInstantiationCandidates;
-      } else if (!classNode.isAbstract &&
-          classNode.members.any((m) => m.isInstanceMember)) {
-        ++totalInstantiationCandidates;
-      }
-      if (shaker.isHierarchyUsed(classNode)) {
-        ++usedClasses;
-      }
-      classNode.members.forEach(visitMember);
-      if (options['instantiated'] && shaker.isInstantiated(classNode)) {
-        print(classNode);
-      }
-      if (options['types'] && shaker.isHierarchyUsed(classNode)) {
-        print(classNode);
-      }
-    }
-  }
-
-  if (options['summary']) {
-    print('Classes used:         ${ratio(usedClasses, totalClasses)}');
-    print('Classes instantiated: '
-        '${ratio(instantiatedClasses, totalInstantiationCandidates)}');
-    print('Members used:         ${ratio(usedMembers, totalMembers)}');
-  }
-
-  if (options['diff']) {
-    String name = pathlib.basenameWithoutExtension(filename);
-    String outputDir = options['output'] ?? '';
-    String beforeFile = pathlib.join(outputDir, '$name.before.txt');
-    String afterFile = pathlib.join(outputDir, '$name.after.txt');
-    NameSystem names = new NameSystem();
-    StringBuffer before = new StringBuffer();
-    new Printer(before, syntheticNames: names).writeComponentFile(component);
-    new File(beforeFile).writeAsStringSync('$before');
-    new TreeShaker(coreTypes, hierarchy, component, legacyMode: legacyMode)
-        .transform(component);
-    StringBuffer after = new StringBuffer();
-    new Printer(after, syntheticNames: names).writeComponentFile(component);
-    new File(afterFile).writeAsStringSync('$after');
-    print('Text written to $beforeFile and $afterFile');
-  }
-}
-
-String ratio(num x, num total) {
-  return '$x / $total (${percent(x, total)})';
-}
-
-String percent(num x, num total) {
-  return total == 0 ? '0%' : ((100 * x / total).toStringAsFixed(0) + '%');
-}
diff --git a/pkg/kernel/test/treeshaker_membench.dart b/pkg/kernel/test/treeshaker_membench.dart
deleted file mode 100644
index 937637d..0000000
--- a/pkg/kernel/test/treeshaker_membench.dart
+++ /dev/null
@@ -1,65 +0,0 @@
-#!/usr/bin/env dart
-// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-library kernel.treeshaker_membench;
-
-import 'package:kernel/kernel.dart';
-import 'package:kernel/transformations/treeshaker.dart';
-import 'package:kernel/class_hierarchy.dart';
-import 'package:kernel/core_types.dart';
-import 'package:args/args.dart';
-import 'dart:io';
-
-ArgParser argParser = new ArgParser(allowTrailingOptions: true)
-  ..addOption('count',
-      abbr: 'c', help: 'Build N copies of the tree shaker', defaultsTo: '100')
-  ..addFlag('legacy-mode', help: 'Run the tree shaker in legacy mode');
-
-String usage = """
-Usage: treeshaker_membench [options] FILE.dill
-
-Options:
-${argParser.usage}
-""";
-
-/// Builds N copies of the tree shaker data structure for the given component.
-/// Pass --print-metrics to the Dart VM to measure the memory use.
-main(List<String> args) {
-  if (args.length == 0) {
-    print(usage);
-    exit(1);
-  }
-  ArgResults options = argParser.parse(args);
-  if (options.rest.length != 1) {
-    print('Exactly one file should be given');
-    exit(1);
-  }
-  String filename = options.rest.single;
-  bool legacyMode = options['legacy-mode'];
-
-  Component component = loadComponentFromBinary(filename);
-  ClassHierarchy hierarchy = new ClassHierarchy(component);
-  CoreTypes coreTypes = new CoreTypes(component);
-
-  int copyCount = int.parse(options['count']);
-
-  TreeShaker buildTreeShaker() {
-    return new TreeShaker(coreTypes, hierarchy, component,
-        legacyMode: legacyMode);
-  }
-
-  List<TreeShaker> keepAlive = <TreeShaker>[];
-  for (int i = 0; i < copyCount; ++i) {
-    keepAlive.add(buildTreeShaker());
-  }
-
-  print('$copyCount copies built');
-
-  if (args.contains('-v')) {
-    // Use of the list for something to avoid premature GC.
-    for (var treeShaker in keepAlive) {
-      treeShaker.getClassRetention(coreTypes.objectClass);
-    }
-  }
-}
diff --git a/pkg/kernel/test/typecheck.dart b/pkg/kernel/test/typecheck.dart
deleted file mode 100644
index 565892b..0000000
--- a/pkg/kernel/test/typecheck.dart
+++ /dev/null
@@ -1,45 +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:kernel/kernel.dart';
-import 'package:kernel/class_hierarchy.dart';
-import 'package:kernel/core_types.dart';
-import 'package:kernel/type_checker.dart';
-import 'dart:io';
-
-final String usage = '''
-Usage: typecheck FILE.dill
-
-Runs the type checker on the given component.
-''';
-
-main(List<String> args) {
-  if (args.length != 1) {
-    print(usage);
-    exit(1);
-  }
-  var component = loadComponentFromBinary(args[0]);
-  var coreTypes = new CoreTypes(component);
-  var hierarchy = new ClassHierarchy(component);
-  new TestTypeChecker(coreTypes, hierarchy).checkComponent(component);
-}
-
-class TestTypeChecker extends TypeChecker {
-  TestTypeChecker(CoreTypes coreTypes, ClassHierarchy hierarchy)
-      : super(coreTypes, hierarchy, legacyMode: true);
-
-  @override
-  void checkAssignable(TreeNode where, DartType from, DartType to) {
-    if (!environment.isSubtypeOf(from, to)) {
-      fail(where, '$from is not a subtype of $to');
-    }
-  }
-
-  @override
-  void fail(TreeNode where, String message) {
-    Location location = where.location;
-    String locationString = location == null ? '' : '($location)';
-    print('[error] $message $locationString');
-  }
-}
diff --git a/pkg/pkg.status b/pkg/pkg.status
index edb50ff..d26e5ee 100644
--- a/pkg/pkg.status
+++ b/pkg/pkg.status
@@ -40,6 +40,8 @@
 front_end/test/fasta/shaker_test: Skip # Issue http://dartbug.com/32531
 front_end/test/fasta/strong_test: Pass, ExtraSlow
 front_end/test/fasta/text_serialization_test: Pass, ExtraSlow
+front_end/test/fasta/types/dart2js_benchmark_test: Pass, Slow
+front_end/test/fasta/types/large_app_benchmark_test: Pass, ExtraSlow
 front_end/test/minimal_incremental_kernel_generator_test: Slow, Pass
 front_end/test/whole_program_test: Slow, Pass
 front_end/testcases/*: Skip # These are not tests but input for tests.
diff --git a/pkg/smith/lib/configuration.dart b/pkg/smith/lib/configuration.dart
index 803ac2b..1b1c268 100644
--- a/pkg/smith/lib/configuration.dart
+++ b/pkg/smith/lib/configuration.dart
@@ -249,6 +249,7 @@
         name, architecture, compiler, mode, runtime, system,
         builderTag: stringOption("builder-tag"),
         vmOptions: stringListOption("vm-options"),
+        dart2jsOptions: stringListOption("dart2js-options"),
         timeout: intOption("timeout"),
         enableAsserts: boolOption("enable-asserts"),
         isChecked: boolOption("checked"),
@@ -259,8 +260,6 @@
         useAnalyzerCfe: boolOption("use-cfe"),
         useAnalyzerFastaParser: boolOption("analyzer-use-fasta-parser"),
         useBlobs: boolOption("use-blobs"),
-        useDart2JSWithKernel: boolOption("dart2js-with-kernel"),
-        useDart2JSOldFrontEnd: boolOption("dart2js-old-frontend"),
         useHotReload: boolOption("hot-reload"),
         useHotReloadRollback: boolOption("hot-reload-rollback"),
         useSdk: boolOption("use-sdk"));
@@ -289,6 +288,8 @@
 
   final List<String> vmOptions;
 
+  final List<String> dart2jsOptions;
+
   int timeout;
 
   final bool enableAsserts;
@@ -313,10 +314,6 @@
   // TODO(rnystrom): What is this?
   final bool useBlobs;
 
-  // TODO(rnystrom): Remove these when Dart 1.0 is no longer supported.
-  final bool useDart2JSWithKernel;
-  final bool useDart2JSOldFrontEnd;
-
   final bool useHotReload;
   final bool useHotReloadRollback;
 
@@ -326,6 +323,7 @@
       this.runtime, this.system,
       {String builderTag,
       List<String> vmOptions,
+      List<String> dart2jsOptions,
       int timeout,
       bool enableAsserts,
       bool isChecked,
@@ -336,13 +334,12 @@
       bool useAnalyzerCfe,
       bool useAnalyzerFastaParser,
       bool useBlobs,
-      bool useDart2JSWithKernel,
-      bool useDart2JSOldFrontEnd,
       bool useHotReload,
       bool useHotReloadRollback,
       bool useSdk})
       : builderTag = builderTag ?? "",
         vmOptions = vmOptions ?? <String>[],
+        dart2jsOptions = dart2jsOptions ?? <String>[],
         timeout = timeout,
         enableAsserts = enableAsserts ?? false,
         isChecked = isChecked ?? false,
@@ -353,8 +350,6 @@
         useAnalyzerCfe = useAnalyzerCfe ?? false,
         useAnalyzerFastaParser = useAnalyzerFastaParser ?? false,
         useBlobs = useBlobs ?? false,
-        useDart2JSWithKernel = useDart2JSWithKernel ?? false,
-        useDart2JSOldFrontEnd = useDart2JSOldFrontEnd ?? false,
         useHotReload = useHotReload ?? false,
         useHotReloadRollback = useHotReloadRollback ?? false,
         useSdk = useSdk ?? false;
@@ -369,6 +364,7 @@
       system == other.system &&
       builderTag == other.builderTag &&
       vmOptions.join(" & ") == other.vmOptions.join(" & ") &&
+      dart2jsOptions.join(" & ") == other.dart2jsOptions.join(" & ") &&
       timeout == other.timeout &&
       enableAsserts == other.enableAsserts &&
       isChecked == other.isChecked &&
@@ -379,8 +375,6 @@
       useAnalyzerCfe == other.useAnalyzerCfe &&
       useAnalyzerFastaParser == other.useAnalyzerFastaParser &&
       useBlobs == other.useBlobs &&
-      useDart2JSWithKernel == other.useDart2JSWithKernel &&
-      useDart2JSOldFrontEnd == other.useDart2JSOldFrontEnd &&
       useHotReload == other.useHotReload &&
       useHotReloadRollback == other.useHotReloadRollback &&
       useSdk == other.useSdk;
@@ -400,6 +394,7 @@
       system.hashCode ^
       builderTag.hashCode ^
       vmOptions.join(" & ").hashCode ^
+      dart2jsOptions.join(" & ").hashCode ^
       timeout.hashCode ^
       _toBinary([
         enableAsserts,
@@ -411,8 +406,6 @@
         useAnalyzerCfe,
         useAnalyzerFastaParser,
         useBlobs,
-        useDart2JSWithKernel,
-        useDart2JSOldFrontEnd,
         useHotReload,
         useHotReloadRollback,
         useSdk
@@ -432,6 +425,8 @@
 
     if (builderTag != "") fields.add("builder-tag: $builderTag");
     if (vmOptions != "") fields.add("vm-options: [${vmOptions.join(", ")}]");
+    if (dart2jsOptions != "")
+      fields.add("dart2js-options: [${dart2jsOptions.join(", ")}]");
     if (timeout != 0) fields.add("timeout: $timeout");
     if (enableAsserts) fields.add("enable-asserts");
     if (isChecked) fields.add("checked");
@@ -442,8 +437,6 @@
     if (useAnalyzerCfe) fields.add("use-cfe");
     if (useAnalyzerFastaParser) fields.add("analyzer-use-fasta-parser");
     if (useBlobs) fields.add("use-blobs");
-    if (useDart2JSWithKernel) fields.add("dart2js-with-kernel");
-    if (useDart2JSOldFrontEnd) fields.add("dart2js-old-frontend");
     if (useHotReload) fields.add("hot-reload");
     if (useHotReloadRollback) fields.add("hot-reload-rollback");
     if (useSdk) fields.add("use-sdk");
@@ -475,6 +468,11 @@
       var otherTag = "[${other.vmOptions.join(", ")}]";
       fields.add("vm-options: $tag $otherTag");
     }
+    if (dart2jsOptions != "" || other.dart2jsOptions != "") {
+      var tag = "[${dart2jsOptions.join(", ")}]";
+      var otherTag = "[${other.dart2jsOptions.join(", ")}]";
+      fields.add("dart2js-options: $tag $otherTag");
+    }
     fields.add("timeout: $timeout ${other.timeout}");
     if (enableAsserts || other.enableAsserts) {
       fields.add("enable-asserts $enableAsserts ${other.enableAsserts}");
@@ -504,14 +502,6 @@
     if (useBlobs || other.useBlobs) {
       fields.add("useBlobs $useBlobs ${other.useBlobs}");
     }
-    if (useDart2JSWithKernel || other.useDart2JSWithKernel) {
-      fields.add("useDart2JSWithKernel "
-          "$useDart2JSWithKernel ${other.useDart2JSWithKernel}");
-    }
-    if (useDart2JSOldFrontEnd || other.useDart2JSOldFrontEnd) {
-      fields.add("useDart2JSOldFrontEnd "
-          "$useDart2JSOldFrontEnd ${other.useDart2JSOldFrontEnd}");
-    }
     if (useHotReload || other.useHotReload) {
       fields.add("useHotReload $useHotReload ${other.useHotReload}");
     }
diff --git a/pkg/smith/test/configuration_test.dart b/pkg/smith/test/configuration_test.dart
index 0952c72..9c77fb3 100644
--- a/pkg/smith/test/configuration_test.dart
+++ b/pkg/smith/test/configuration_test.dart
@@ -200,14 +200,13 @@
             Configuration.parse("dart2js", {
               "builder-tag": "the tag",
               "vm-options": ["vm stuff", "more vm stuff"],
+              "dart2js-options": ["dart2js stuff", "more dart2js stuff"],
               "enable-asserts": true,
               "checked": true,
               "csp": true,
               "host-checked": true,
               "minified": true,
               "preview-dart-2": true,
-              "dart2js-with-kernel": true,
-              "dart2js-old-frontend": true,
               "hot-reload": true,
               "hot-reload-rollback": true,
               "use-sdk": true,
@@ -221,14 +220,13 @@
               System.host,
               builderTag: "the tag",
               vmOptions: ["vm stuff", "more vm stuff"],
+              dart2jsOptions: ["dart2js stuff", "more dart2js stuff"],
               enableAsserts: true,
               isChecked: true,
               isCsp: true,
               isHostChecked: true,
               isMinified: true,
               previewDart2: true,
-              useDart2JSWithKernel: true,
-              useDart2JSOldFrontEnd: true,
               useHotReload: true,
               useHotReloadRollback: true,
               useSdk: true,
diff --git a/pkg/vm/bin/compare_sizes.dart b/pkg/vm/bin/compare_sizes.dart
index 691566e..6c41417 100644
--- a/pkg/vm/bin/compare_sizes.dart
+++ b/pkg/vm/bin/compare_sizes.dart
@@ -157,6 +157,7 @@
         }
         return sb.toString() + '\n' + sb.toString();
     }
+    return null; // Make analyzer happy.
   }
 }
 
@@ -209,6 +210,7 @@
         final diff = width - value.length;
         return ' ' * (diff ~/ 2) + value + (' ' * (diff - diff ~/ 2));
     }
+    return null; // Make analyzer happy.
   }
 
   int get length => value.length;
diff --git a/pkg/vm/bin/kernel_service.dart b/pkg/vm/bin/kernel_service.dart
index 141fb61..619c943 100644
--- a/pkg/vm/bin/kernel_service.dart
+++ b/pkg/vm/bin/kernel_service.dart
@@ -110,6 +110,7 @@
       ..packagesFileUri = packagesUri
       ..sdkSummary = platformKernelPath
       ..verbose = verbose
+      ..omitPlatform = true
       ..bytecode = bytecode
       ..experimentalFlags =
           parseExperimentalFlags(expFlags, (msg) => errors.add(msg))
diff --git a/pkg/vm/bin/list_libraries.dart b/pkg/vm/bin/list_libraries.dart
new file mode 100644
index 0000000..dcaf735
--- /dev/null
+++ b/pkg/vm/bin/list_libraries.dart
@@ -0,0 +1,31 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:io';
+
+import 'package:kernel/kernel.dart' show Component;
+import 'package:kernel/binary/ast_from_binary.dart' show BinaryBuilder;
+
+final String _usage = '''
+Usage: list_libraries input.dill
+Lists libraries included in a kernel binary file.
+''';
+
+main(List<String> arguments) async {
+  if (arguments.length != 1) {
+    print(_usage);
+    exit(1);
+  }
+
+  final input = arguments[0];
+
+  final component = new Component();
+
+  final List<int> bytes = new File(input).readAsBytesSync();
+  new BinaryBuilder(bytes).readComponent(component);
+
+  for (final lib in component.libraries) {
+    print(lib.importUri);
+  }
+}
diff --git a/pkg/vm/bin/protobuf_aware_treeshaker.dart b/pkg/vm/bin/protobuf_aware_treeshaker.dart
new file mode 100644
index 0000000..b971b13
--- /dev/null
+++ b/pkg/vm/bin/protobuf_aware_treeshaker.dart
@@ -0,0 +1,169 @@
+#!/usr/bin/env dart
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// This program will take a .dill file and do a protobuf aware tree-shaking.
+///
+/// All fields of GeneratedMessage subclasses that are not accessed with their
+/// getter or setter will have their metadata removed from the class definition.
+///
+/// Then a general treeshaking will be run, and
+/// all GeneratedMessage subclasses that are never used directly will be
+/// removed.
+///
+/// The processed program will have observable differences: The tree-shaken
+/// fields will be parsed as unknown fields.
+/// The toString method will treat the unknown fields as missing.
+///
+/// Using the `GeneratedMessage.info_` field to reflect on fields will have
+/// unpredictable behavior.
+///
+/// Constants are evaluated, this is mainly to enable detecting
+/// `@pragma('vm:entry-point')`.
+library vm.protobuf_aware_treeshaker;
+
+import 'dart:async';
+import 'dart:io';
+import 'dart:typed_data';
+
+import 'package:args/args.dart';
+import 'package:kernel/kernel.dart';
+import 'package:kernel/binary/limited_ast_to_binary.dart';
+import 'package:kernel/target/targets.dart' show TargetFlags, getTarget;
+import 'package:meta/meta.dart';
+import 'package:vm/target/install.dart' show installAdditionalTargets;
+import 'package:vm/transformations/protobuf_aware_treeshaker/transformer.dart'
+    as treeshaker;
+
+ArgResults parseArgs(List<String> args) {
+  ArgParser argParser = ArgParser()
+    ..addOption('platform',
+        valueHelp: "path/to/vm_platform.dill",
+        help: 'A platform.dill file to append to the input. If not given, no '
+            'platform.dill will be appended.')
+    ..addOption('target',
+        allowed: ['dart_runner', 'flutter', 'flutter-runner', 'vm'],
+        defaultsTo: 'vm',
+        help: 'A platform.dill file to append to the input. If not given, no '
+            'platform.dill will be appended.')
+    ..addFlag('write-txt',
+        help: 'Also write the result in kernel-text format as <out.dill>.txt',
+        defaultsTo: false)
+    ..addFlag('remove-core-libs',
+        help:
+            'If set, the resulting dill file will not include `dart:` libraries',
+        defaultsTo: false)
+    ..addMultiOption('define',
+        abbr: 'D',
+        help: 'Perform constant evaluation with this environment define set.',
+        valueHelp: 'variable=value')
+    ..addFlag('remove-source',
+        help: 'Removes source code from the emitted dill', defaultsTo: false)
+    ..addFlag('enable-asserts',
+        help: 'Enables asserts in the emitted dill', defaultsTo: false)
+    ..addFlag('verbose',
+        help: 'Write to stdout about what classes and fields where remeoved')
+    ..addFlag('help', help: 'Prints this help', negatable: false);
+
+  ArgResults argResults;
+  try {
+    argResults = argParser.parse(args);
+  } on FormatException catch (e) {
+    print(e.message);
+  }
+  if (argResults == null || argResults['help'] || argResults.rest.length != 2) {
+    String script = 'protobuf_aware_treeshaker.dart';
+    print(
+        'A tool for removing protobuf messages types that are never referred by a program');
+    print('Usage: $script [args] <input.dill> <output.dill>');
+
+    print(argParser.usage);
+    exit(-1);
+  }
+
+  return argResults;
+}
+
+Future main(List<String> args) async {
+  ArgResults argResults = parseArgs(args);
+
+  final input = argResults.rest[0];
+  final output = argResults.rest[1];
+
+  final Map<String, String> environment = Map.fromIterable(
+      argResults['define'].map((x) => x.split('=')),
+      key: (x) => x[0],
+      value: (x) => x[1]);
+
+  var bytes = File(input).readAsBytesSync();
+  final platformFile = argResults['platform'];
+  if (platformFile != null) {
+    bytes = concatenate(File(platformFile).readAsBytesSync(), bytes);
+  }
+  final component = loadComponentFromBytes(bytes);
+
+  installAdditionalTargets();
+
+  treeshaker.TransformationInfo info = treeshaker.transformComponent(
+      component, environment, getTarget(argResults['target'], TargetFlags()),
+      collectInfo: argResults['verbose'],
+      enableAsserts: argResults['enable-asserts']);
+
+  if (argResults['verbose']) {
+    for (String fieldName in info.removedMessageFields) {
+      print('Removed $fieldName');
+    }
+    for (Class removedClass in info.removedMessageClasses) {
+      print('Removed $removedClass');
+    }
+  }
+
+  await writeComponent(component, output,
+      removeCoreLibs: argResults['remove-core-libs'],
+      removeSource: argResults['remove-source']);
+  if (argResults['write-txt']) {
+    writeComponentToText(component, path: output + '.txt');
+  }
+}
+
+Uint8List concatenate(Uint8List a, Uint8List b) {
+  final bytes = Uint8List(a.length + b.length);
+  bytes.setRange(0, a.length, a);
+  bytes.setRange(a.length, a.length + b.length, b);
+  return bytes;
+}
+
+Future writeComponent(Component component, String filename,
+    {@required bool removeCoreLibs, @required bool removeSource}) async {
+  if (removeSource) {
+    component.uriToSource.clear();
+  }
+
+  for (final lib in component.libraries) {
+    lib.dependencies.clear();
+    lib.additionalExports.clear();
+    lib.parts.clear();
+  }
+
+  final sink = File(filename).openWrite();
+  final printer = LimitedBinaryPrinter(sink, (lib) {
+    if (removeCoreLibs && isCoreLibrary(lib)) return false;
+    if (isLibEmpty(lib)) return false;
+    return true;
+  }, /*excludeUriToSource=*/ removeSource);
+
+  printer.writeComponentFile(component);
+  await sink.close();
+}
+
+bool isLibEmpty(Library lib) {
+  return lib.classes.isEmpty &&
+      lib.procedures.isEmpty &&
+      lib.fields.isEmpty &&
+      lib.typedefs.isEmpty;
+}
+
+bool isCoreLibrary(Library library) {
+  return library.importUri.scheme == 'dart';
+}
diff --git a/pkg/vm/lib/bytecode/assembler.dart b/pkg/vm/lib/bytecode/assembler.dart
index a8d8cb0..cfb843e 100644
--- a/pkg/vm/lib/bytecode/assembler.dart
+++ b/pkg/vm/lib/bytecode/assembler.dart
@@ -281,6 +281,11 @@
     emitWord(_encodeAD(Opcode.kInterfaceCall, ra, rd));
   }
 
+  void emitUncheckedInterfaceCall(int ra, int rd) {
+    emitSourcePosition();
+    emitWord(_encodeAD(Opcode.kUncheckedInterfaceCall, ra, rd));
+  }
+
   void emitDynamicCall(int ra, int rd) {
     emitSourcePosition();
     emitWord(_encodeAD(Opcode.kDynamicCall, ra, rd));
@@ -423,4 +428,9 @@
   void emitEntryOptional(int ra, int rb, int rc) {
     emitWord(_encodeABC(Opcode.kEntryOptional, ra, rb, rc));
   }
+
+  void emitAllocateClosure(int rd) {
+    emitSourcePosition();
+    emitWord(_encodeD(Opcode.kAllocateClosure, rd));
+  }
 }
diff --git a/pkg/vm/lib/bytecode/ast_remover.dart b/pkg/vm/lib/bytecode/ast_remover.dart
index 17adabc..e7a28d1 100644
--- a/pkg/vm/lib/bytecode/ast_remover.dart
+++ b/pkg/vm/lib/bytecode/ast_remover.dart
@@ -11,64 +11,171 @@
 /// Can preserve removed AST and restore it if needed.
 class ASTRemover extends Transformer {
   final BytecodeMetadataRepository metadata;
-  final droppedAST = <Member, dynamic>{};
+  final stashes = <Node, _Stash>{};
 
   ASTRemover(Component component)
-      : metadata = component.metadata[new BytecodeMetadataRepository().tag];
+      : metadata = component.metadata[new BytecodeMetadataRepository().tag] {
+    stashes[component] = new _ComponentStash(component.mainMethod,
+        new Map<String, MetadataRepository<dynamic>>.from(component.metadata));
+    component.mainMethod = null;
+    component.metadata.removeWhere((tag, md) => tag != metadata.tag);
+  }
 
   @override
-  TreeNode defaultMember(Member node) {
-    if (_hasBytecode(node)) {
-      if (node is Field) {
-        droppedAST[node] = node.initializer;
-        node.initializer = null;
-      } else if (node is Constructor) {
-        droppedAST[node] =
-            new _DroppedConstructor(node.initializers, node.function.body);
-        node.initializers = <Initializer>[];
-        node.function.body = null;
-      } else if (node.function != null) {
-        droppedAST[node] = node.function.body;
-        node.function.body = null;
-      }
-    }
+  visitLibrary(Library node) {
+    stashes[node] = new _LibraryStash(
+        new List<Expression>.from(node.annotations),
+        new List<Field>.from(node.fields),
+        new List<Procedure>.from(node.procedures),
+        new List<Reference>.from(node.additionalExports));
 
-    // Instance field initializers do not form separate functions, and bytecode
-    // is not attached to instance fields (it is included into constructors).
-    // When VM reads a constructor from kernel, it also reads and translates
-    // instance field initializers. So, their ASTs can be dropped only if
-    // bytecode was generated for all generative constructors.
-    if (node is Field && !node.isStatic && node.initializer != null) {
-      if (node.enclosingClass.constructors.every(_hasBytecode)) {
-        droppedAST[node] = node.initializer;
-        node.initializer = null;
-      }
-    }
+    node.annotations.clear();
+    node.fields.clear();
+    node.procedures.clear();
+    node.additionalExports.clear();
+
+    super.visitLibrary(node);
 
     return node;
   }
 
-  bool _hasBytecode(Member node) =>
-      metadata != null && metadata.mapping.containsKey(node);
+  @override
+  visitLibraryDependency(LibraryDependency node) {
+    stashes[node] = new _LibraryDependencyStash(
+        new List<Expression>.from(node.annotations));
+
+    node.annotations.clear();
+
+    super.visitLibraryDependency(node);
+
+    return node;
+  }
+
+  // Still referenced from function types which may appear in class supertypes.
+  @override
+  visitTypedef(Typedef node) {
+    stashes[node] = new _TypedefStash(node.annotations);
+
+    node.annotations = const <Expression>[];
+
+    super.visitTypedef(node);
+
+    // TODO(alexmarkov): fix Typedef visitor to visit these fields.
+    transformList(node.positionalParameters, this, node);
+    transformList(node.namedParameters, this, node);
+
+    return node;
+  }
+
+  // May appear in typedefs.
+  @override
+  visitVariableDeclaration(VariableDeclaration node) {
+    stashes[node] = new _VariableDeclarationStash(node.annotations);
+
+    node.annotations = const <Expression>[];
+
+    super.visitVariableDeclaration(node);
+
+    return node;
+  }
+
+  @override
+  visitClass(Class node) {
+    stashes[node] = new _ClassStash(
+        node.annotations,
+        new List<Field>.from(node.fields),
+        new List<Procedure>.from(node.procedures),
+        new List<Constructor>.from(node.constructors));
+
+    node.annotations = const <Expression>[];
+    node.fields.clear();
+    node.procedures.clear();
+    node.constructors.clear();
+
+    super.visitClass(node);
+
+    return node;
+  }
 
   void restoreAST() {
-    droppedAST.forEach((Member node, dynamic dropped) {
-      if (node is Field) {
-        node.initializer = dropped;
-      } else if (node is Constructor) {
-        _DroppedConstructor droppedConstructor = dropped;
-        node.initializers = droppedConstructor.initializers;
-        node.function.body = droppedConstructor.body;
+    stashes.forEach((Node node, _Stash stash) {
+      if (node is Component) {
+        _ComponentStash componentStash = stash as _ComponentStash;
+        node.mainMethod = componentStash.mainMethod;
+        node.metadata.addAll(componentStash.metadata);
+      } else if (node is Library) {
+        _LibraryStash libraryStash = stash as _LibraryStash;
+        node.annotations.addAll(libraryStash.annotations);
+        node.fields.addAll(libraryStash.fields);
+        node.procedures.addAll(libraryStash.procedures);
+        node.additionalExports.addAll(libraryStash.additionalExports);
+      } else if (node is LibraryDependency) {
+        _LibraryDependencyStash libraryDependencyStash =
+            stash as _LibraryDependencyStash;
+        node.annotations.addAll(libraryDependencyStash.annotations);
+      } else if (node is Typedef) {
+        _TypedefStash typedefStash = stash as _TypedefStash;
+        node.annotations = typedefStash.annotations;
+      } else if (node is VariableDeclaration) {
+        _VariableDeclarationStash variableDeclarationStash =
+            stash as _VariableDeclarationStash;
+        node.annotations = variableDeclarationStash.annotations;
+      } else if (node is Class) {
+        _ClassStash classStash = stash as _ClassStash;
+        node.annotations = classStash.annotations;
+        node.fields.addAll(classStash.fields);
+        node.procedures.addAll(classStash.procedures);
+        node.constructors.addAll(classStash.constructors);
       } else {
-        node.function.body = dropped;
+        throw 'Unexpected ${node.runtimeType} $node';
       }
     });
   }
 }
 
-class _DroppedConstructor {
-  final List<Initializer> initializers;
-  final Statement body;
+abstract class _Stash {}
 
-  _DroppedConstructor(this.initializers, this.body);
+class _ClassStash extends _Stash {
+  final List<Expression> annotations;
+  final List<Field> fields;
+  final List<Procedure> procedures;
+  final List<Constructor> constructors;
+
+  _ClassStash(
+      this.annotations, this.fields, this.procedures, this.constructors);
+}
+
+class _LibraryStash extends _Stash {
+  final List<Expression> annotations;
+  final List<Field> fields;
+  final List<Procedure> procedures;
+  final List<Reference> additionalExports;
+
+  _LibraryStash(
+      this.annotations, this.fields, this.procedures, this.additionalExports);
+}
+
+class _LibraryDependencyStash extends _Stash {
+  final List<Expression> annotations;
+
+  _LibraryDependencyStash(this.annotations);
+}
+
+class _TypedefStash extends _Stash {
+  final List<Expression> annotations;
+
+  _TypedefStash(this.annotations);
+}
+
+class _VariableDeclarationStash extends _Stash {
+  final List<Expression> annotations;
+
+  _VariableDeclarationStash(this.annotations);
+}
+
+class _ComponentStash extends _Stash {
+  final Procedure mainMethod;
+  final Map<String, MetadataRepository<dynamic>> metadata;
+
+  _ComponentStash(this.mainMethod, this.metadata);
 }
diff --git a/pkg/vm/lib/bytecode/bytecode_serialization.dart b/pkg/vm/lib/bytecode/bytecode_serialization.dart
index fd577df..4845307 100644
--- a/pkg/vm/lib/bytecode/bytecode_serialization.dart
+++ b/pkg/vm/lib/bytecode/bytecode_serialization.dart
@@ -29,15 +29,17 @@
   final int formatVersion;
   final StringWriter stringWriter;
   final ObjectWriter objectWriter;
+  final LinkWriter linkWriter;
   final BytesBuilder bytes = new BytesBuilder();
   final int baseOffset;
 
-  BufferedWriter(this.formatVersion, this.stringWriter, this.objectWriter,
+  BufferedWriter(
+      this.formatVersion, this.stringWriter, this.objectWriter, this.linkWriter,
       {this.baseOffset: 0});
 
   factory BufferedWriter.fromWriter(BufferedWriter writer) =>
-      new BufferedWriter(
-          writer.formatVersion, writer.stringWriter, writer.objectWriter);
+      new BufferedWriter(writer.formatVersion, writer.stringWriter,
+          writer.objectWriter, writer.linkWriter);
 
   List<int> takeBytes() => bytes.takeBytes();
 
@@ -110,6 +112,11 @@
     }
   }
 
+  void writeLinkOffset(Object target) {
+    final offset = linkWriter.getOffset(target);
+    writePackedUInt30(offset);
+  }
+
   void align(int alignment) {
     assert(alignment & (alignment - 1) == 0);
     int offs = baseOffset + offset;
@@ -124,14 +131,15 @@
   int formatVersion;
   StringReader stringReader;
   ObjectReader objectReader;
+  LinkReader linkReader;
   final List<int> bytes;
   final int baseOffset;
 
   /// Position within [bytes], already includes [baseOffset].
   int _pos;
 
-  BufferedReader(
-      this.formatVersion, this.stringReader, this.objectReader, this.bytes,
+  BufferedReader(this.formatVersion, this.stringReader, this.objectReader,
+      this.linkReader, this.bytes,
       {this.baseOffset: 0})
       : _pos = baseOffset {
     assert((0 <= _pos) && (_pos <= bytes.length));
@@ -221,6 +229,11 @@
     return result;
   }
 
+  T readLinkOffset<T>() {
+    final offset = readPackedUInt30();
+    return linkReader.get<T>(offset);
+  }
+
   void align(int alignment) {
     assert(alignment & (alignment - 1) == 0);
     _pos = ((_pos + alignment - 1) & -alignment);
@@ -384,6 +397,37 @@
       "  (count: ${count.toString().padLeft(8)})";
 }
 
+class LinkWriter {
+  final _map = <Object, int>{};
+
+  void put(Object target, int offset) {
+    _map[target] = offset;
+  }
+
+  int getOffset(Object target) {
+    return _map[target] ??
+        (throw 'Offset of ${target.runtimeType} $target is not set');
+  }
+}
+
+class LinkReader {
+  final _map = <Type, Map<int, Object>>{};
+
+  void setOffset<T>(T target, int offset) {
+    final offsetToObject = (_map[T] ??= <int, Object>{});
+    final previous = offsetToObject[offset];
+    if (previous != null) {
+      throw 'Unable to associate offset $T/$offset with ${target.runtimeType} $target.'
+          ' It is already associated with ${previous.runtimeType} $previous';
+    }
+    offsetToObject[offset] = target;
+  }
+
+  T get<T>(int offset) {
+    return _map[T][offset] ?? (throw 'No object at offset $T/$offset');
+  }
+}
+
 class BytecodeSizeStatistics {
   static int componentSize = 0;
   static int objectTableSize = 0;
diff --git a/pkg/vm/lib/bytecode/constant_pool.dart b/pkg/vm/lib/bytecode/constant_pool.dart
index 18b1ac1..3e204ae 100644
--- a/pkg/vm/lib/bytecode/constant_pool.dart
+++ b/pkg/vm/lib/bytecode/constant_pool.dart
@@ -4,8 +4,6 @@
 
 library vm.bytecode.constant_pool;
 
-import 'dart:typed_data';
-
 import 'package:kernel/ast.dart' hide MapEntry;
 
 import 'dbc.dart' show constantPoolIndexLimit, BytecodeLimitExceededException;
@@ -33,39 +31,6 @@
   Byte tag;
 }
 
-type ConstantNull extends ConstantPoolEntry {
-  Byte tag = 1;
-}
-
-type ConstantString extends ConstantPoolEntry {
-  Byte tag = 2;
-  PackedString value;
-}
-
-type ConstantInt extends ConstantPoolEntry {
-  Byte tag = 3;
-  UInt32 low;
-  UInt32 high;
-}
-
-type ConstantDouble extends ConstantPoolEntry {
-  Byte tag = 4;
-  UInt32 low;
-  UInt32 high;
-}
-
-type ConstantBool extends ConstantPoolEntry {
-  Byte tag = 5;
-  Byte flag;
-}
-
-type ConstantArgDesc extends ConstantPoolEntry {
-  Byte tag = 6;
-  UInt numArguments;
-  UInt numTypeArgs;
-  List<PackedString> names;
-}
-
 enum InvocationKind {
   method, // x.foo(...) or foo(...)
   getter, // x.foo
@@ -80,12 +45,6 @@
   ConstantIndex argDesc;
 }
 
-type ConstantStaticICData extends ConstantPoolEntry {
-  Byte tag = 8;
-  PackedObject target;
-  ConstantIndex argDesc;
-}
-
 type ConstantStaticField extends ConstantPoolEntry {
   Byte tag = 9;
   PackedObject field;
@@ -107,40 +66,11 @@
   PackedObject class;
 }
 
-type ConstantTearOff extends ConstantPoolEntry {
-  Byte tag = 13;
-  PackedObject target;
-}
-
 type ConstantType extends ConstantPoolEntry {
   Byte tag = 14;
   PackedObject type;
 }
 
-type ConstantTypeArguments extends ConstantPoolEntry {
-  Byte tag = 15;
-  List<PackedObject> types;
-}
-
-type ConstantList extends ConstantPoolEntry {
-  Byte tag = 16;
-  PackedObject typeArg;
-  List<ConstantIndex> entries;
-}
-
-type ConstantInstance extends ConstantPoolEntry {
-  Byte tag = 17;
-  PackedObject class;
-  ConstantIndex typeArguments;
-  List<Pair<PackedObject, ConstantIndex>> fieldValues;
-}
-
-type ConstantTypeArgumentsForInstanceAllocation extends ConstantPoolEntry {
-  Byte tag = 18;
-  PackedObject instantiatingClass;
-  List<PackedObject> types;
-}
-
 type ConstantClosureFunction extends ConstantPoolEntry {
   Byte tag = 19;
   UInt closureIndex;
@@ -159,30 +89,10 @@
   Byte tag = 22;
 }
 
-type ConstantPartialTearOffInstantiation extends ConstantPoolEntry {
-  Byte tag = 23;
-  ConstantIndex tearOffConstant;
-  ConstantIndex typeArguments;
-}
-
 type ConstantEmptyTypeArguments extends ConstantPoolEntry {
   Byte tag = 24;
 }
 
-type ConstantSymbol extends ConstantPoolEntry {
-  Byte tag = 25;
-  PackedObject name;
-}
-
-// Occupies 2 entries in the constant pool.
-type ConstantInterfaceCallV1 extends ConstantPoolEntry {
-  Byte tag = 26;
-  Byte flags(invocationKindBit0, invocationKindBit1);
-             // Where invocationKind is index into InvocationKind.
-  PackedObject targetName;
-  ConstantIndex argDesc;
-}
-
 type ConstantObjectRef extends ConstantPoolEntry {
   Byte tag = 27;
   PackedObject object;
@@ -206,32 +116,32 @@
 
 enum ConstantTag {
   kInvalid,
-  kNull, // TODO(alexmarkov): obsolete, remove
-  kString, // TODO(alexmarkov): obsolete, remove
-  kInt, // TODO(alexmarkov): obsolete, remove
-  kDouble, // TODO(alexmarkov): obsolete, remove
-  kBool, // TODO(alexmarkov): obsolete, remove
-  kArgDesc, // TODO(alexmarkov): obsolete, remove
+  kUnused1,
+  kUnused2,
+  kUnused3,
+  kUnused4,
+  kUnused5,
+  kUnused6,
   kICData,
-  kStaticICData, // TODO(alexmarkov): obsolete, remove
+  kUnused7,
   kStaticField,
   kInstanceField,
   kClass,
   kTypeArgumentsField,
-  kTearOff, // TODO(alexmarkov): obsolete, remove
+  kUnused8,
   kType,
-  kTypeArguments, // TODO(alexmarkov): obsolete, remove
-  kList, // TODO(alexmarkov): obsolete, remove
-  kInstance, // TODO(alexmarkov): obsolete, remove
-  kTypeArgumentsForInstanceAllocation, // TODO(alexmarkov): obsolete, remove
+  kUnused9,
+  kUnused10,
+  kUnused11,
+  kUnused12,
   kClosureFunction,
   kEndClosureFunctionScope,
   kNativeEntry,
   kSubtypeTestCache,
-  kPartialTearOffInstantiation, // TODO(alexmarkov): obsolete, remove
+  kUnused13,
   kEmptyTypeArguments,
-  kSymbol, // TODO(alexmarkov): obsolete, remove
-  kInterfaceCallV1, // TODO(alexmarkov): obsolete, remove
+  kUnused14,
+  kUnused15,
   kObjectRef,
   kDirectCall,
   kInterfaceCall,
@@ -261,22 +171,8 @@
     switch (tag) {
       case ConstantTag.kInvalid:
         break;
-      case ConstantTag.kNull:
-        return new ConstantNull.read(reader);
-      case ConstantTag.kString:
-        return new ConstantString.read(reader);
-      case ConstantTag.kInt:
-        return new ConstantInt.read(reader);
-      case ConstantTag.kDouble:
-        return new ConstantDouble.read(reader);
-      case ConstantTag.kBool:
-        return new ConstantBool.read(reader);
       case ConstantTag.kICData:
         return new ConstantICData.read(reader);
-      case ConstantTag.kStaticICData:
-        return new ConstantStaticICData.read(reader);
-      case ConstantTag.kArgDesc:
-        return new ConstantArgDesc.read(reader);
       case ConstantTag.kStaticField:
         return new ConstantStaticField.read(reader);
       case ConstantTag.kInstanceField:
@@ -285,18 +181,8 @@
         return new ConstantClass.read(reader);
       case ConstantTag.kTypeArgumentsField:
         return new ConstantTypeArgumentsField.read(reader);
-      case ConstantTag.kTearOff:
-        return new ConstantTearOff.read(reader);
       case ConstantTag.kType:
         return new ConstantType.read(reader);
-      case ConstantTag.kTypeArguments:
-        return new ConstantTypeArguments.read(reader);
-      case ConstantTag.kList:
-        return new ConstantList.read(reader);
-      case ConstantTag.kInstance:
-        return new ConstantInstance.read(reader);
-      case ConstantTag.kTypeArgumentsForInstanceAllocation:
-        return new ConstantTypeArgumentsForInstanceAllocation.read(reader);
       case ConstantTag.kClosureFunction:
         return new ConstantClosureFunction.read(reader);
       case ConstantTag.kEndClosureFunctionScope:
@@ -305,225 +191,36 @@
         return new ConstantNativeEntry.read(reader);
       case ConstantTag.kSubtypeTestCache:
         return new ConstantSubtypeTestCache.read(reader);
-      case ConstantTag.kPartialTearOffInstantiation:
-        return new ConstantPartialTearOffInstantiation.read(reader);
       case ConstantTag.kEmptyTypeArguments:
         return new ConstantEmptyTypeArguments.read(reader);
-      case ConstantTag.kSymbol:
-        return new ConstantSymbol.read(reader);
-      case ConstantTag.kInterfaceCallV1:
-        return new ConstantInterfaceCallV1.read(reader);
       case ConstantTag.kObjectRef:
         return new ConstantObjectRef.read(reader);
       case ConstantTag.kDirectCall:
         return new ConstantDirectCall.read(reader);
       case ConstantTag.kInterfaceCall:
         return new ConstantInterfaceCall.read(reader);
+      // Make analyzer happy.
+      case ConstantTag.kUnused1:
+      case ConstantTag.kUnused2:
+      case ConstantTag.kUnused3:
+      case ConstantTag.kUnused4:
+      case ConstantTag.kUnused5:
+      case ConstantTag.kUnused6:
+      case ConstantTag.kUnused7:
+      case ConstantTag.kUnused8:
+      case ConstantTag.kUnused9:
+      case ConstantTag.kUnused10:
+      case ConstantTag.kUnused11:
+      case ConstantTag.kUnused12:
+      case ConstantTag.kUnused13:
+      case ConstantTag.kUnused14:
+      case ConstantTag.kUnused15:
+        break;
     }
     throw 'Unexpected constant tag $tag';
   }
 }
 
-class ConstantNull extends ConstantPoolEntry {
-  const ConstantNull();
-
-  @override
-  ConstantTag get tag => ConstantTag.kNull;
-
-  @override
-  void writeValue(BufferedWriter writer) {}
-
-  ConstantNull.read(BufferedReader reader);
-
-  @override
-  String toString() => 'Null';
-
-  @override
-  int get hashCode => 1961;
-
-  @override
-  bool operator ==(other) => other is ConstantNull;
-}
-
-class ConstantString extends ConstantPoolEntry {
-  final String value;
-
-  ConstantString(this.value);
-  ConstantString.fromLiteral(StringLiteral literal) : this(literal.value);
-
-  @override
-  ConstantTag get tag => ConstantTag.kString;
-
-  @override
-  void writeValue(BufferedWriter writer) {
-    writer.writePackedStringReference(value);
-  }
-
-  ConstantString.read(BufferedReader reader)
-      : value = reader.readPackedStringReference();
-
-  @override
-  String toString() => 'String \'$value\'';
-
-  @override
-  int get hashCode => value.hashCode;
-
-  @override
-  bool operator ==(other) =>
-      other is ConstantString && this.value == other.value;
-}
-
-class ConstantInt extends ConstantPoolEntry {
-  final int value;
-
-  ConstantInt(this.value);
-
-  @override
-  ConstantTag get tag => ConstantTag.kInt;
-
-  @override
-  void writeValue(BufferedWriter writer) {
-    // TODO(alexmarkov): more efficient encoding
-    writer.writeUInt32(value & 0xffffffff);
-    writer.writeUInt32((value >> 32) & 0xffffffff);
-  }
-
-  ConstantInt.read(BufferedReader reader)
-      : value = reader.readUInt32() | (reader.readUInt32() << 32);
-
-  @override
-  String toString() => 'Int $value';
-
-  @override
-  int get hashCode => value;
-
-  @override
-  bool operator ==(other) => other is ConstantInt && this.value == other.value;
-}
-
-class ConstantDouble extends ConstantPoolEntry {
-  final double value;
-
-  ConstantDouble(this.value);
-
-  @override
-  ConstantTag get tag => ConstantTag.kDouble;
-
-  static int doubleToIntBits(double value) {
-    final buf = new ByteData(8);
-    buf.setFloat64(0, value, Endian.host);
-    return buf.getInt64(0, Endian.host);
-  }
-
-  static double intBitsToDouble(int bits) {
-    final buf = new ByteData(8);
-    buf.setInt64(0, bits, Endian.host);
-    return buf.getFloat64(0, Endian.host);
-  }
-
-  @override
-  void writeValue(BufferedWriter writer) {
-    // TODO(alexmarkov): more efficient encoding
-    int bits = doubleToIntBits(value);
-    writer.writeUInt32(bits & 0xffffffff);
-    writer.writeUInt32((bits >> 32) & 0xffffffff);
-  }
-
-  ConstantDouble.read(BufferedReader reader)
-      : value =
-            intBitsToDouble(reader.readUInt32() | (reader.readUInt32() << 32));
-
-  @override
-  String toString() => 'Double $value';
-
-  @override
-  int get hashCode => value.hashCode;
-
-  @override
-  bool operator ==(other) =>
-      other is ConstantDouble && value.compareTo(other.value) == 0;
-}
-
-class ConstantBool extends ConstantPoolEntry {
-  final bool value;
-
-  ConstantBool(this.value);
-  ConstantBool.fromLiteral(BoolLiteral literal) : this(literal.value);
-
-  @override
-  ConstantTag get tag => ConstantTag.kBool;
-
-  @override
-  void writeValue(BufferedWriter writer) {
-    writer.writeByte(value ? 1 : 0);
-  }
-
-  ConstantBool.read(BufferedReader reader) : value = reader.readByte() != 0;
-
-  @override
-  String toString() => 'Bool $value';
-
-  @override
-  int get hashCode => value.hashCode;
-
-  @override
-  bool operator ==(other) => other is ConstantBool && this.value == other.value;
-}
-
-class ConstantArgDesc extends ConstantPoolEntry {
-  final int numArguments;
-  final int numTypeArgs;
-  final List<String> argNames;
-
-  ConstantArgDesc(this.numArguments, this.numTypeArgs, this.argNames);
-
-  ConstantArgDesc.fromArguments(
-      Arguments args, bool hasReceiver, bool isFactory)
-      : this(
-            args.positional.length +
-                args.named.length +
-                (hasReceiver ? 1 : 0) +
-                // VM expects that type arguments vector passed to a factory
-                // constructor is counted in numArguments, and not counted in
-                // numTypeArgs.
-                // TODO(alexmarkov): Clean this up.
-                (isFactory ? 1 : 0),
-            isFactory ? 0 : args.types.length,
-            new List<String>.from(args.named.map((ne) => ne.name)));
-
-  @override
-  ConstantTag get tag => ConstantTag.kArgDesc;
-
-  @override
-  void writeValue(BufferedWriter writer) {
-    writer.writePackedUInt30(numArguments);
-    writer.writePackedUInt30(numTypeArgs);
-    writer.writePackedUInt30(argNames.length);
-    argNames.forEach(writer.writePackedStringReference);
-  }
-
-  ConstantArgDesc.read(BufferedReader reader)
-      : numArguments = reader.readPackedUInt30(),
-        numTypeArgs = reader.readPackedUInt30(),
-        argNames = new List<String>.generate(reader.readPackedUInt30(),
-            (_) => reader.readPackedStringReference());
-
-  @override
-  String toString() =>
-      'ArgDesc num-args $numArguments, num-type-args $numTypeArgs, names $argNames';
-
-  @override
-  int get hashCode => _combineHashes(
-      _combineHashes(numArguments, numTypeArgs), listHashCode(argNames));
-
-  @override
-  bool operator ==(other) =>
-      other is ConstantArgDesc &&
-      this.numArguments == other.numArguments &&
-      this.numTypeArgs == other.numTypeArgs &&
-      listEquals(this.argNames, other.argNames);
-}
-
 enum InvocationKind { method, getter, setter }
 
 String _invocationKindToString(InvocationKind kind) {
@@ -587,40 +284,6 @@
   bool operator ==(other) => identical(this, other);
 }
 
-class ConstantStaticICData extends ConstantPoolEntry {
-  final ObjectHandle target;
-  final int argDescConstantIndex;
-
-  ConstantStaticICData(this.target, this.argDescConstantIndex);
-
-  @override
-  ConstantTag get tag => ConstantTag.kStaticICData;
-
-  @override
-  void writeValue(BufferedWriter writer) {
-    writer.writePackedObject(target);
-    writer.writePackedUInt30(argDescConstantIndex);
-  }
-
-  ConstantStaticICData.read(BufferedReader reader)
-      : target = reader.readPackedObject(),
-        argDescConstantIndex = reader.readPackedUInt30();
-
-  @override
-  String toString() => 'StaticICData '
-      'target \'$target\', arg-desc CP#$argDescConstantIndex';
-
-  // ConstantStaticICData entries are created per call site and should not be
-  // merged, so ConstantStaticICData class uses identity [hashCode] and
-  // [operator ==].
-
-  @override
-  int get hashCode => identityHashCode(this);
-
-  @override
-  bool operator ==(other) => identical(this, other);
-}
-
 class ConstantStaticField extends ConstantPoolEntry {
   final ObjectHandle field;
 
@@ -732,33 +395,6 @@
       this.classHandle == other.classHandle;
 }
 
-class ConstantTearOff extends ConstantPoolEntry {
-  final ObjectHandle procedure;
-
-  ConstantTearOff(this.procedure);
-
-  @override
-  ConstantTag get tag => ConstantTag.kTearOff;
-
-  @override
-  void writeValue(BufferedWriter writer) {
-    writer.writePackedObject(procedure);
-  }
-
-  ConstantTearOff.read(BufferedReader reader)
-      : procedure = reader.readPackedObject();
-
-  @override
-  String toString() => 'TearOff $procedure';
-
-  @override
-  int get hashCode => procedure.hashCode;
-
-  @override
-  bool operator ==(other) =>
-      other is ConstantTearOff && this.procedure == other.procedure;
-}
-
 class ConstantType extends ConstantPoolEntry {
   final ObjectHandle type;
 
@@ -784,158 +420,6 @@
   bool operator ==(other) => other is ConstantType && this.type == other.type;
 }
 
-class ConstantTypeArguments extends ConstantPoolEntry {
-  final List<ObjectHandle> typeArgs;
-
-  ConstantTypeArguments(this.typeArgs);
-
-  @override
-  ConstantTag get tag => ConstantTag.kTypeArguments;
-
-  @override
-  void writeValue(BufferedWriter writer) {
-    writer.writePackedList(typeArgs);
-  }
-
-  ConstantTypeArguments.read(BufferedReader reader)
-      : typeArgs = reader.readPackedList();
-
-  @override
-  String toString() => 'TypeArgs $typeArgs';
-
-  @override
-  int get hashCode => listHashCode(typeArgs);
-
-  @override
-  bool operator ==(other) =>
-      other is ConstantTypeArguments &&
-      listEquals(this.typeArgs, other.typeArgs);
-}
-
-class ConstantList extends ConstantPoolEntry {
-  final ObjectHandle typeArg;
-  final List<int> entries;
-
-  ConstantList(this.typeArg, this.entries);
-
-  @override
-  ConstantTag get tag => ConstantTag.kList;
-
-  @override
-  void writeValue(BufferedWriter writer) {
-    writer.writePackedObject(typeArg);
-    writer.writePackedUInt30(entries.length);
-    entries.forEach(writer.writePackedUInt30);
-  }
-
-  ConstantList.read(BufferedReader reader)
-      : typeArg = reader.readPackedObject(),
-        entries = new List<int>.generate(
-            reader.readPackedUInt30(), (_) => reader.readPackedUInt30());
-
-  @override
-  String toString() => 'List type-arg $typeArg, entries CP# $entries';
-
-  @override
-  int get hashCode => typeArg.hashCode ^ listHashCode(entries);
-
-  @override
-  bool operator ==(other) =>
-      other is ConstantList &&
-      this.typeArg == other.typeArg &&
-      listEquals(this.entries, other.entries);
-}
-
-class ConstantInstance extends ConstantPoolEntry {
-  final ObjectHandle classHandle;
-  final int _typeArgumentsConstantIndex;
-  final Map<ObjectHandle, int> _fieldValues;
-
-  ConstantInstance(
-      this.classHandle, this._typeArgumentsConstantIndex, this._fieldValues);
-
-  @override
-  ConstantTag get tag => ConstantTag.kInstance;
-
-  @override
-  void writeValue(BufferedWriter writer) {
-    writer.writePackedObject(classHandle);
-    writer.writePackedUInt30(_typeArgumentsConstantIndex);
-    writer.writePackedUInt30(_fieldValues.length);
-    _fieldValues.forEach((ObjectHandle field, int valueIndex) {
-      writer.writePackedObject(field);
-      writer.writePackedUInt30(valueIndex);
-    });
-  }
-
-  ConstantInstance.read(BufferedReader reader)
-      : classHandle = reader.readPackedObject(),
-        _typeArgumentsConstantIndex = reader.readPackedUInt30(),
-        _fieldValues = new Map<ObjectHandle, int>() {
-    final fieldValuesLen = reader.readPackedUInt30();
-    for (int i = 0; i < fieldValuesLen; i++) {
-      final field = reader.readPackedObject();
-      final valueIndex = reader.readPackedUInt30();
-      _fieldValues[field] = valueIndex;
-    }
-  }
-
-  @override
-  String toString() {
-    final values = _fieldValues.map<String, String>(
-        (ObjectHandle field, int valueIndex) =>
-            new MapEntry(field.toString(), 'CP#$valueIndex'));
-    return 'Instance $classHandle type-args CP#$_typeArgumentsConstantIndex $values';
-  }
-
-  @override
-  int get hashCode => _combineHashes(
-      _combineHashes(classHandle.hashCode, _typeArgumentsConstantIndex),
-      mapHashCode(_fieldValues));
-
-  @override
-  bool operator ==(other) =>
-      other is ConstantInstance &&
-      this.classHandle == other.classHandle &&
-      this._typeArgumentsConstantIndex == other._typeArgumentsConstantIndex &&
-      mapEquals(this._fieldValues, other._fieldValues);
-}
-
-class ConstantTypeArgumentsForInstanceAllocation extends ConstantPoolEntry {
-  final ObjectHandle instantiatingClass;
-  final List<ObjectHandle> typeArgs;
-
-  ConstantTypeArgumentsForInstanceAllocation(
-      this.instantiatingClass, this.typeArgs);
-
-  @override
-  ConstantTag get tag => ConstantTag.kTypeArgumentsForInstanceAllocation;
-
-  @override
-  void writeValue(BufferedWriter writer) {
-    writer.writePackedObject(instantiatingClass);
-    writer.writePackedList(typeArgs);
-  }
-
-  ConstantTypeArgumentsForInstanceAllocation.read(BufferedReader reader)
-      : instantiatingClass = reader.readPackedObject(),
-        typeArgs = reader.readPackedList();
-
-  @override
-  String toString() =>
-      'TypeArgumentsForInstanceAllocation $instantiatingClass $typeArgs';
-
-  @override
-  int get hashCode =>
-      _combineHashes(instantiatingClass.hashCode, listHashCode(typeArgs));
-
-  @override
-  bool operator ==(other) =>
-      other is ConstantTypeArgumentsForInstanceAllocation &&
-      this.instantiatingClass == other.instantiatingClass &&
-      listEquals(this.typeArgs, other.typeArgs);
-}
-
 class ConstantClosureFunction extends ConstantPoolEntry {
   final int closureIndex;
 
@@ -1037,42 +521,6 @@
   bool operator ==(other) => identical(this, other);
 }
 
-class ConstantPartialTearOffInstantiation extends ConstantPoolEntry {
-  final int tearOffConstantIndex;
-  final int typeArgumentsConstantIndex;
-
-  ConstantPartialTearOffInstantiation(
-      this.tearOffConstantIndex, this.typeArgumentsConstantIndex);
-
-  @override
-  ConstantTag get tag => ConstantTag.kPartialTearOffInstantiation;
-
-  @override
-  void writeValue(BufferedWriter writer) {
-    writer.writePackedUInt30(tearOffConstantIndex);
-    writer.writePackedUInt30(typeArgumentsConstantIndex);
-  }
-
-  ConstantPartialTearOffInstantiation.read(BufferedReader reader)
-      : tearOffConstantIndex = reader.readPackedUInt30(),
-        typeArgumentsConstantIndex = reader.readPackedUInt30();
-
-  @override
-  String toString() {
-    return 'PartialTearOffInstantiation tear-off CP#$tearOffConstantIndex type-args CP#$typeArgumentsConstantIndex';
-  }
-
-  @override
-  int get hashCode =>
-      _combineHashes(tearOffConstantIndex, typeArgumentsConstantIndex);
-
-  @override
-  bool operator ==(other) =>
-      other is ConstantPartialTearOffInstantiation &&
-      this.tearOffConstantIndex == other.tearOffConstantIndex &&
-      this.typeArgumentsConstantIndex == other.typeArgumentsConstantIndex;
-}
-
 class ConstantEmptyTypeArguments extends ConstantPoolEntry {
   const ConstantEmptyTypeArguments();
 
@@ -1094,75 +542,6 @@
   bool operator ==(other) => other is ConstantEmptyTypeArguments;
 }
 
-class ConstantSymbol extends ConstantPoolEntry {
-  final ObjectHandle name;
-
-  ConstantSymbol(this.name);
-
-  @override
-  ConstantTag get tag => ConstantTag.kSymbol;
-
-  @override
-  void writeValue(BufferedWriter writer) {
-    writer.writePackedObject(name);
-  }
-
-  ConstantSymbol.read(BufferedReader reader) : name = reader.readPackedObject();
-
-  @override
-  String toString() => 'Symbol $name';
-
-  @override
-  int get hashCode => name.hashCode;
-
-  @override
-  bool operator ==(other) => other is ConstantSymbol && this.name == other.name;
-}
-
-class ConstantInterfaceCallV1 extends ConstantPoolEntry {
-  final InvocationKind invocationKind;
-  final ObjectHandle targetName;
-  final int argDescConstantIndex;
-
-  ConstantInterfaceCallV1(
-      this.invocationKind, this.targetName, this.argDescConstantIndex);
-
-  // Reserve 1 extra slot for arguments descriptor, following target name slot.
-  int get numReservedEntries => 1;
-
-  @override
-  ConstantTag get tag => ConstantTag.kInterfaceCallV1;
-
-  @override
-  void writeValue(BufferedWriter writer) {
-    writer.writeByte(invocationKind.index);
-    writer.writePackedObject(targetName);
-    writer.writePackedUInt30(argDescConstantIndex);
-  }
-
-  ConstantInterfaceCallV1.read(BufferedReader reader)
-      : invocationKind = InvocationKind.values[reader.readByte()],
-        targetName = reader.readPackedObject(),
-        argDescConstantIndex = reader.readPackedUInt30();
-
-  @override
-  String toString() => 'InterfaceCallV1 '
-      '${_invocationKindToString(invocationKind)}'
-      'target-name $targetName, arg-desc CP#$argDescConstantIndex';
-
-  @override
-  int get hashCode => _combineHashes(
-      _combineHashes(invocationKind.index, targetName.hashCode),
-      argDescConstantIndex);
-
-  @override
-  bool operator ==(other) =>
-      other is ConstantInterfaceCallV1 &&
-      this.invocationKind == other.invocationKind &&
-      this.targetName == other.targetName &&
-      this.argDescConstantIndex == other.argDescConstantIndex;
-}
-
 class ConstantObjectRef extends ConstantPoolEntry {
   final ObjectHandle object;
 
diff --git a/pkg/vm/lib/bytecode/dbc.dart b/pkg/vm/lib/bytecode/dbc.dart
index c4b55c6..730ee69 100644
--- a/pkg/vm/lib/bytecode/dbc.dart
+++ b/pkg/vm/lib/bytecode/dbc.dart
@@ -8,16 +8,14 @@
 
 /// Version of bytecode format, produced by default.
 /// Before bumping current bytecode version format, make sure that
-/// all users have switched to a VM which is able to consume next
+/// all users have switched to a VM which is able to consume new
 /// version of bytecode.
-const int stableBytecodeFormatVersion = 2;
+const int currentBytecodeFormatVersion = 6;
 
-/// Version of bleeding edge bytecode format.
+/// Version of experimental / bleeding edge bytecode format.
 /// Produced by bytecode generator when --use-future-bytecode-format
 /// option is enabled.
-/// Should match kMaxSupportedBytecodeFormatVersion in
-/// runtime/vm/constants_kbc.h.
-const int futureBytecodeFormatVersion = stableBytecodeFormatVersion + 1;
+const int futureBytecodeFormatVersion = currentBytecodeFormatVersion + 1;
 
 /// Alignment of bytecode instructions.
 const int bytecodeInstructionsAlignment = 4;
@@ -125,6 +123,22 @@
   kCompareIntLe,
 
   kDirectCall,
+
+  kAllocateClosure,
+
+  kUncheckedInterfaceCall,
+
+  // Double operations.
+  kNegateDouble,
+  kAddDouble,
+  kSubDouble,
+  kMulDouble,
+  kDivDouble,
+  kCompareDoubleEq,
+  kCompareDoubleGt,
+  kCompareDoubleLt,
+  kCompareDoubleGe,
+  kCompareDoubleLe,
 }
 
 enum Encoding {
@@ -302,6 +316,30 @@
       Encoding.k0, const [Operand.none, Operand.none, Operand.none]),
   Opcode.kDirectCall: const Format(
       Encoding.kAD, const [Operand.imm, Operand.lit, Operand.none]),
+  Opcode.kAllocateClosure: const Format(
+      Encoding.kD, const [Operand.lit, Operand.none, Operand.none]),
+  Opcode.kUncheckedInterfaceCall: const Format(
+      Encoding.kAD, const [Operand.imm, Operand.lit, Operand.none]),
+  Opcode.kNegateDouble: const Format(
+      Encoding.k0, const [Operand.none, Operand.none, Operand.none]),
+  Opcode.kAddDouble: const Format(
+      Encoding.k0, const [Operand.none, Operand.none, Operand.none]),
+  Opcode.kSubDouble: const Format(
+      Encoding.k0, const [Operand.none, Operand.none, Operand.none]),
+  Opcode.kMulDouble: const Format(
+      Encoding.k0, const [Operand.none, Operand.none, Operand.none]),
+  Opcode.kDivDouble: const Format(
+      Encoding.k0, const [Operand.none, Operand.none, Operand.none]),
+  Opcode.kCompareDoubleEq: const Format(
+      Encoding.k0, const [Operand.none, Operand.none, Operand.none]),
+  Opcode.kCompareDoubleGt: const Format(
+      Encoding.k0, const [Operand.none, Operand.none, Operand.none]),
+  Opcode.kCompareDoubleLt: const Format(
+      Encoding.k0, const [Operand.none, Operand.none, Operand.none]),
+  Opcode.kCompareDoubleGe: const Format(
+      Encoding.k0, const [Operand.none, Operand.none, Operand.none]),
+  Opcode.kCompareDoubleLe: const Format(
+      Encoding.k0, const [Operand.none, Operand.none, Operand.none]),
 };
 
 // Should match constant in runtime/vm/stack_frame_dbc.h.
@@ -320,6 +358,7 @@
   switch (opcode) {
     case Opcode.kIndirectStaticCall:
     case Opcode.kInterfaceCall:
+    case Opcode.kUncheckedInterfaceCall:
     case Opcode.kDynamicCall:
     case Opcode.kNativeCall:
     case Opcode.kDirectCall:
diff --git a/pkg/vm/lib/bytecode/declarations.dart b/pkg/vm/lib/bytecode/declarations.dart
new file mode 100644
index 0000000..a028f6e
--- /dev/null
+++ b/pkg/vm/lib/bytecode/declarations.dart
@@ -0,0 +1,1041 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library vm.bytecode.declarations;
+
+import 'package:kernel/ast.dart';
+import 'bytecode_serialization.dart'
+    show BufferedWriter, BufferedReader, BytecodeSizeStatistics, StringTable;
+import 'constant_pool.dart' show ConstantPool;
+import 'dbc.dart'
+    show
+        currentBytecodeFormatVersion,
+        futureBytecodeFormatVersion,
+        bytecodeInstructionsAlignment;
+import 'disassembler.dart' show BytecodeDisassembler;
+import 'exceptions.dart' show ExceptionsTable;
+import 'object_table.dart' show ObjectTable, ObjectHandle, NameAndType;
+import 'source_positions.dart' show SourcePositions;
+
+class Members {
+  final List<FieldDeclaration> fields;
+  final List<FunctionDeclaration> functions;
+
+  Members(this.fields, this.functions);
+
+  int countFunctions() {
+    int count = functions.length;
+    for (var field in fields) {
+      if ((field.flags & FieldDeclaration.hasGetterFlag) != 0) {
+        ++count;
+      }
+      if ((field.flags & FieldDeclaration.hasSetterFlag) != 0) {
+        ++count;
+      }
+    }
+    return count;
+  }
+
+  void write(BufferedWriter writer) {
+    writer.writePackedUInt30(countFunctions());
+    writer.writePackedUInt30(fields.length);
+    for (var field in fields) {
+      field.write(writer);
+    }
+    writer.writePackedUInt30(functions.length);
+    for (var func in functions) {
+      func.write(writer);
+    }
+  }
+
+  factory Members.read(BufferedReader reader) {
+    reader.readPackedUInt30(); // numFunctions
+    final fields = new List<FieldDeclaration>.generate(
+        reader.readPackedUInt30(), (_) => new FieldDeclaration.read(reader));
+    final functions = new List<FunctionDeclaration>.generate(
+        reader.readPackedUInt30(), (_) => new FunctionDeclaration.read(reader));
+    return new Members(fields, functions);
+  }
+
+  @override
+  String toString() => "\n"
+      "Members {\n"
+      "${fields.join('\n')}\n"
+      "${functions.join('\n')}"
+      "}\n";
+}
+
+class FieldDeclaration {
+  static const hasInitializerFlag = 1 << 0;
+  static const hasGetterFlag = 1 << 1;
+  static const hasSetterFlag = 1 << 2;
+  static const isReflectableFlag = 1 << 3;
+  static const isStaticFlag = 1 << 4;
+  static const isConstFlag = 1 << 5;
+  static const isFinalFlag = 1 << 6;
+  static const isCovariantFlag = 1 << 7;
+  static const isGenericCovariantImplFlag = 1 << 8;
+  static const hasSourcePositionsFlag = 1 << 9;
+  static const hasAnnotationsFlag = 1 << 10;
+  static const hasPragmaFlag = 1 << 11;
+  static const hasCustomScriptFlag = 1 << 12;
+
+  final int flags;
+  final ObjectHandle name;
+  final ObjectHandle type;
+  final ObjectHandle value;
+  final ObjectHandle script;
+  final int position;
+  final int endPosition;
+  final ObjectHandle getterName;
+  final ObjectHandle setterName;
+  final Code initializerCode;
+  final ObjectHandle annotations;
+
+  FieldDeclaration(
+      this.flags,
+      this.name,
+      this.type,
+      this.value,
+      this.script,
+      this.position,
+      this.endPosition,
+      this.getterName,
+      this.setterName,
+      this.initializerCode,
+      this.annotations);
+
+  void write(BufferedWriter writer) {
+    writer.writePackedUInt30(flags);
+    writer.writePackedObject(name);
+    writer.writePackedObject(type);
+
+    if ((flags & hasCustomScriptFlag) != 0) {
+      writer.writePackedObject(script);
+    }
+    if ((flags & hasSourcePositionsFlag) != 0) {
+      writer.writePackedUInt30(position + 1);
+      writer.writePackedUInt30(endPosition + 1);
+    }
+    if ((flags & hasInitializerFlag) != 0 && (flags & isStaticFlag) != 0) {
+      writer.writeLinkOffset(initializerCode);
+    }
+    if ((flags & hasInitializerFlag) == 0) {
+      writer.writePackedObject(value);
+    }
+    if ((flags & hasGetterFlag) != 0) {
+      writer.writePackedObject(getterName);
+    }
+    if ((flags & hasSetterFlag) != 0) {
+      writer.writePackedObject(setterName);
+    }
+    if ((flags & hasAnnotationsFlag) != 0) {
+      writer.writeLinkOffset(annotations);
+    }
+  }
+
+  factory FieldDeclaration.read(BufferedReader reader) {
+    final flags = reader.readPackedUInt30();
+    final name = reader.readPackedObject();
+    final type = reader.readPackedObject();
+    final script =
+        ((flags & hasCustomScriptFlag) != 0) ? reader.readPackedObject() : null;
+    final position = ((flags & hasSourcePositionsFlag) != 0)
+        ? reader.readPackedUInt30() - 1
+        : 0;
+    final endPosition = ((flags & hasSourcePositionsFlag) != 0)
+        ? reader.readPackedUInt30() - 1
+        : 0;
+    final initializerCode =
+        ((flags & hasInitializerFlag) != 0 && (flags & isStaticFlag) != 0)
+            ? reader.readLinkOffset<Code>()
+            : null;
+    final value =
+        ((flags & hasInitializerFlag) == 0) ? reader.readPackedObject() : null;
+    final getterName =
+        ((flags & hasGetterFlag) != 0) ? reader.readPackedObject() : null;
+    final setterName =
+        ((flags & hasSetterFlag) != 0) ? reader.readPackedObject() : null;
+    final annotations = ((flags & hasAnnotationsFlag) != 0)
+        ? reader.readLinkOffset<ObjectHandle>()
+        : null;
+    return new FieldDeclaration(flags, name, type, value, script, position,
+        endPosition, getterName, setterName, initializerCode, annotations);
+  }
+
+  @override
+  String toString() {
+    StringBuffer sb = new StringBuffer();
+    sb.write('Field $name, type = $type');
+    if ((flags & hasGetterFlag) != 0) {
+      sb.write(', getter = $getterName');
+    }
+    if ((flags & hasSetterFlag) != 0) {
+      sb.write(', setter = $setterName');
+    }
+    if ((flags & isReflectableFlag) != 0) {
+      sb.write(', reflectable');
+    }
+    if ((flags & isStaticFlag) != 0) {
+      sb.write(', static');
+    }
+    if ((flags & isConstFlag) != 0) {
+      sb.write(', const');
+    }
+    if ((flags & isFinalFlag) != 0) {
+      sb.write(', final');
+    }
+    if ((flags & hasPragmaFlag) != 0) {
+      sb.write(', has-pragma');
+    }
+    if ((flags & hasCustomScriptFlag) != 0) {
+      sb.write(', custom-script = $script');
+    }
+    if ((flags & hasSourcePositionsFlag) != 0) {
+      sb.write(', pos = $position, end-pos = $endPosition');
+    }
+    sb.writeln();
+    if ((flags & hasInitializerFlag) != 0) {
+      sb.write('    initializer $initializerCode\n');
+    } else {
+      sb.write('    value = $value\n');
+    }
+    if ((flags & hasAnnotationsFlag) != 0) {
+      sb.write('    annotations $annotations\n');
+    }
+    return sb.toString();
+  }
+}
+
+class FunctionDeclaration {
+  static const isConstructorFlag = 1 << 0;
+  static const isGetterFlag = 1 << 1;
+  static const isSetterFlag = 1 << 2;
+  static const isFactoryFlag = 1 << 3;
+  static const isStaticFlag = 1 << 4;
+  static const isAbstractFlag = 1 << 5;
+  static const isConstFlag = 1 << 6;
+  static const hasOptionalPositionalParamsFlag = 1 << 7;
+  static const hasOptionalNamedParamsFlag = 1 << 8;
+  static const hasTypeParamsFlag = 1 << 9;
+  static const isReflectableFlag = 1 << 10;
+  static const isDebuggableFlag = 1 << 11;
+  static const isAsyncFlag = 1 << 12;
+  static const isAsyncStarFlag = 1 << 13;
+  static const isSyncStarFlag = 1 << 14;
+  static const isForwardingStubFlag = 1 << 15;
+  static const isNoSuchMethodForwarderFlag = 1 << 16;
+  static const isNativeFlag = 1 << 17;
+  static const isExternalFlag = 1 << 18;
+  static const hasSourcePositionsFlag = 1 << 19;
+  static const hasAnnotationsFlag = 1 << 20;
+  static const hasPragmaFlag = 1 << 21;
+  static const hasCustomScriptFlag = 1 << 22;
+
+  final int flags;
+  final ObjectHandle name;
+  final ObjectHandle script;
+  final int position;
+  final int endPosition;
+  final TypeParametersDeclaration typeParameters;
+  final int numRequiredParameters;
+  final List<ParameterDeclaration> parameters;
+  final ObjectHandle returnType;
+  final ObjectHandle nativeName;
+  final Code code;
+  final ObjectHandle annotations;
+
+  FunctionDeclaration(
+      this.flags,
+      this.name,
+      this.script,
+      this.position,
+      this.endPosition,
+      this.typeParameters,
+      this.numRequiredParameters,
+      this.parameters,
+      this.returnType,
+      this.nativeName,
+      this.code,
+      this.annotations);
+
+  void write(BufferedWriter writer) {
+    writer.writePackedUInt30(flags);
+    writer.writePackedObject(name);
+    if ((flags & hasCustomScriptFlag) != 0) {
+      writer.writePackedObject(script);
+    }
+    if ((flags & hasSourcePositionsFlag) != 0) {
+      writer.writePackedUInt30(position + 1);
+      writer.writePackedUInt30(endPosition + 1);
+    }
+    if ((flags & hasTypeParamsFlag) != 0) {
+      typeParameters.write(writer);
+    }
+    writer.writePackedUInt30(parameters.length);
+    if ((flags & hasOptionalPositionalParamsFlag) != 0 ||
+        (flags & hasOptionalNamedParamsFlag) != 0) {
+      writer.writePackedUInt30(numRequiredParameters);
+    }
+    for (var param in parameters) {
+      param.write(writer);
+    }
+    writer.writePackedObject(returnType);
+    if ((flags & isNativeFlag) != 0) {
+      writer.writePackedObject(nativeName);
+    }
+    if ((flags & isAbstractFlag) == 0) {
+      writer.writeLinkOffset(code);
+    }
+    if ((flags & hasAnnotationsFlag) != 0) {
+      writer.writeLinkOffset(annotations);
+    }
+  }
+
+  factory FunctionDeclaration.read(BufferedReader reader) {
+    final flags = reader.readPackedUInt30();
+    final name = reader.readPackedObject();
+
+    final script =
+        ((flags & hasCustomScriptFlag) != 0) ? reader.readPackedObject() : null;
+    final position = ((flags & hasSourcePositionsFlag) != 0)
+        ? reader.readPackedUInt30() - 1
+        : 0;
+    final endPosition = ((flags & hasSourcePositionsFlag) != 0)
+        ? reader.readPackedUInt30() - 1
+        : 0;
+    final typeParameters = ((flags & hasTypeParamsFlag) != 0)
+        ? new TypeParametersDeclaration.read(reader)
+        : null;
+
+    final numParameters = reader.readPackedUInt30();
+    final numRequiredParameters =
+        ((flags & hasOptionalPositionalParamsFlag) != 0 ||
+                (flags & hasOptionalNamedParamsFlag) != 0)
+            ? reader.readPackedUInt30()
+            : numParameters;
+
+    final parameters = new List<ParameterDeclaration>.generate(
+        numParameters, (_) => new ParameterDeclaration.read(reader));
+    final returnType = reader.readPackedObject();
+    final nativeName =
+        ((flags & isNativeFlag) != 0) ? reader.readPackedObject() : null;
+    final code =
+        ((flags & isAbstractFlag) == 0) ? reader.readLinkOffset<Code>() : null;
+    final annotations = ((flags & hasAnnotationsFlag) != 0)
+        ? reader.readLinkOffset<ObjectHandle>()
+        : null;
+    return new FunctionDeclaration(
+        flags,
+        name,
+        script,
+        position,
+        endPosition,
+        typeParameters,
+        numRequiredParameters,
+        parameters,
+        returnType,
+        nativeName,
+        code,
+        annotations);
+  }
+
+  @override
+  String toString() {
+    StringBuffer sb = new StringBuffer();
+    sb.write('Function $name');
+    if ((flags & isConstructorFlag) != 0) {
+      sb.write(', constructor');
+    }
+    if ((flags & isGetterFlag) != 0) {
+      sb.write(', getter');
+    }
+    if ((flags & isSetterFlag) != 0) {
+      sb.write(', setter');
+    }
+    if ((flags & isFactoryFlag) != 0) {
+      sb.write(', factory');
+    }
+    if ((flags & isStaticFlag) != 0) {
+      sb.write(', static');
+    }
+    if ((flags & isAbstractFlag) != 0) {
+      sb.write(', abstract');
+    }
+    if ((flags & isConstFlag) != 0) {
+      sb.write(', const');
+    }
+    if ((flags & hasOptionalPositionalParamsFlag) != 0) {
+      sb.write(', has-optional-positional-params');
+    }
+    if ((flags & hasOptionalNamedParamsFlag) != 0) {
+      sb.write(', has-optional-named-params');
+    }
+    if ((flags & isReflectableFlag) != 0) {
+      sb.write(', reflectable');
+    }
+    if ((flags & isDebuggableFlag) != 0) {
+      sb.write(', debuggable');
+    }
+    if ((flags & isAsyncFlag) != 0) {
+      sb.write(', async');
+    }
+    if ((flags & isAsyncStarFlag) != 0) {
+      sb.write(', async*');
+    }
+    if ((flags & isSyncStarFlag) != 0) {
+      sb.write(', sync*');
+    }
+    if ((flags & isForwardingStubFlag) != 0) {
+      sb.write(', forwarding-stub');
+    }
+    if ((flags & isNoSuchMethodForwarderFlag) != 0) {
+      sb.write(', no-such-method-forwarder');
+    }
+    if ((flags & isNativeFlag) != 0) {
+      sb.write(', native $nativeName');
+    }
+    if ((flags & isExternalFlag) != 0) {
+      sb.write(', external');
+    }
+    if ((flags & hasPragmaFlag) != 0) {
+      sb.write(', has-pragma');
+    }
+    if ((flags & hasCustomScriptFlag) != 0) {
+      sb.write(', custom-script = $script');
+    }
+    if ((flags & hasSourcePositionsFlag) != 0) {
+      sb.write(', pos = $position, end-pos = $endPosition');
+    }
+    sb.writeln();
+    if ((flags & hasTypeParamsFlag) != 0) {
+      sb.write('    type-params $typeParameters\n');
+    }
+    sb.write('    parameters $parameters (required: $numRequiredParameters)\n');
+    sb.write('    return-type $returnType\n');
+    if ((flags & hasAnnotationsFlag) != 0) {
+      sb.write('    annotations $annotations\n');
+    }
+    if ((flags & isAbstractFlag) == 0 && (flags & isExternalFlag) == 0) {
+      sb.write('\n$code\n');
+    }
+    return sb.toString();
+  }
+}
+
+class TypeParametersDeclaration {
+  final List<NameAndType> typeParams;
+
+  TypeParametersDeclaration(this.typeParams);
+
+  void write(BufferedWriter writer) {
+    writer.writePackedUInt30(typeParams.length);
+    for (var tp in typeParams) {
+      writer.writePackedObject(tp.name);
+    }
+    for (var tp in typeParams) {
+      writer.writePackedObject(tp.type);
+    }
+  }
+
+  factory TypeParametersDeclaration.read(BufferedReader reader) {
+    final int numTypeParams = reader.readPackedUInt30();
+    List<ObjectHandle> names = new List<ObjectHandle>.generate(
+        numTypeParams, (_) => reader.readPackedObject());
+    List<ObjectHandle> bounds = new List<ObjectHandle>.generate(
+        numTypeParams, (_) => reader.readPackedObject());
+    return new TypeParametersDeclaration(new List<NameAndType>.generate(
+        numTypeParams, (int i) => new NameAndType(names[i], bounds[i])));
+  }
+
+  @override
+  int get hashCode => listHashCode(typeParams);
+
+  @override
+  bool operator ==(other) =>
+      other is TypeParametersDeclaration &&
+      listEquals(this.typeParams, other.typeParams);
+
+  @override
+  String toString() => '<${typeParams.join(', ')}>';
+}
+
+class ParameterDeclaration {
+  // Parameter flags are written separately (in Code).
+  static const isCovariantFlag = 1 << 0;
+  static const isGenericCovariantImplFlag = 1 << 1;
+
+  final ObjectHandle name;
+  final ObjectHandle type;
+
+  ParameterDeclaration(this.name, this.type);
+
+  void write(BufferedWriter writer) {
+    writer.writePackedObject(name);
+    writer.writePackedObject(type);
+  }
+
+  factory ParameterDeclaration.read(BufferedReader reader) {
+    final name = reader.readPackedObject();
+    final type = reader.readPackedObject();
+    return new ParameterDeclaration(name, type);
+  }
+
+  @override
+  String toString() => '$type $name';
+}
+
+class Code {
+  static const hasExceptionsTableFlag = 1 << 0;
+  static const hasSourcePositionsFlag = 1 << 1;
+  static const hasNullableFieldsFlag = 1 << 2;
+  static const hasClosuresFlag = 1 << 3;
+  static const hasParameterFlagsFlag = 1 << 4;
+  static const hasForwardingStubTargetFlag = 1 << 5;
+  static const hasDefaultFunctionTypeArgsFlag = 1 << 6;
+
+  final ConstantPool constantPool;
+  final List<int> bytecodes;
+  final ExceptionsTable exceptionsTable;
+  final SourcePositions sourcePositions;
+  final List<ObjectHandle> nullableFields;
+  final List<ClosureDeclaration> closures;
+  final List<int> parameterFlags;
+  final int forwardingStubTargetCpIndex;
+  final int defaultFunctionTypeArgsCpIndex;
+
+  bool get hasExceptionsTable => exceptionsTable.blocks.isNotEmpty;
+  bool get hasSourcePositions =>
+      sourcePositions != null && sourcePositions.mapping.isNotEmpty;
+  bool get hasNullableFields => nullableFields.isNotEmpty;
+  bool get hasClosures => closures.isNotEmpty;
+
+  int get flags =>
+      (hasExceptionsTable ? hasExceptionsTableFlag : 0) |
+      (hasSourcePositions ? hasSourcePositionsFlag : 0) |
+      (hasNullableFields ? hasNullableFieldsFlag : 0) |
+      (hasClosures ? hasClosuresFlag : 0) |
+      (parameterFlags != null ? hasParameterFlagsFlag : 0) |
+      (forwardingStubTargetCpIndex != null ? hasForwardingStubTargetFlag : 0) |
+      (defaultFunctionTypeArgsCpIndex != null
+          ? hasDefaultFunctionTypeArgsFlag
+          : 0);
+
+  Code(
+      this.constantPool,
+      this.bytecodes,
+      this.exceptionsTable,
+      this.sourcePositions,
+      this.nullableFields,
+      this.closures,
+      this.parameterFlags,
+      this.forwardingStubTargetCpIndex,
+      this.defaultFunctionTypeArgsCpIndex);
+
+  void write(BufferedWriter writer) {
+    final start = writer.offset;
+    writer.writePackedUInt30(flags);
+    if (parameterFlags != null) {
+      writer.writePackedUInt30(parameterFlags.length);
+      parameterFlags.forEach((flags) => writer.writePackedUInt30(flags));
+    }
+    if (forwardingStubTargetCpIndex != null) {
+      writer.writePackedUInt30(forwardingStubTargetCpIndex);
+    }
+    if (defaultFunctionTypeArgsCpIndex != null) {
+      writer.writePackedUInt30(defaultFunctionTypeArgsCpIndex);
+    }
+    if (hasClosures) {
+      writer.writePackedUInt30(closures.length);
+      closures.forEach((c) => c.write(writer));
+    }
+    constantPool.write(writer);
+    _writeBytecodeInstructions(writer, bytecodes);
+    if (hasExceptionsTable) {
+      exceptionsTable.write(writer);
+    }
+    if (hasSourcePositions) {
+      writer.writeLinkOffset(sourcePositions);
+    }
+    if (hasNullableFields) {
+      writer.writePackedList(nullableFields);
+    }
+    if (hasClosures) {
+      closures.forEach((c) => c.code.write(writer));
+    }
+    BytecodeSizeStatistics.membersSize += (writer.offset - start);
+  }
+
+  factory Code.read(BufferedReader reader) {
+    int flags = reader.readPackedUInt30();
+    final parameterFlags = ((flags & hasParameterFlagsFlag) != 0)
+        ? new List<int>.generate(
+            reader.readPackedUInt30(), (_) => reader.readPackedUInt30())
+        : null;
+    final forwardingStubTargetCpIndex =
+        ((flags & hasForwardingStubTargetFlag) != 0)
+            ? reader.readPackedUInt30()
+            : null;
+    final defaultFunctionTypeArgsCpIndex =
+        ((flags & hasDefaultFunctionTypeArgsFlag) != 0)
+            ? reader.readPackedUInt30()
+            : null;
+    final List<ClosureDeclaration> closures = ((flags & hasClosuresFlag) != 0)
+        ? new List<ClosureDeclaration>.generate(reader.readPackedUInt30(),
+            (_) => new ClosureDeclaration.read(reader))
+        : const <ClosureDeclaration>[];
+    final ConstantPool constantPool = new ConstantPool.read(reader);
+    final List<int> bytecodes = _readBytecodeInstructions(reader);
+    final exceptionsTable = ((flags & hasExceptionsTableFlag) != 0)
+        ? new ExceptionsTable.read(reader)
+        : new ExceptionsTable();
+    final sourcePositions = ((flags & hasSourcePositionsFlag) != 0)
+        ? reader.readLinkOffset<SourcePositions>()
+        : null;
+    final List<ObjectHandle> nullableFields =
+        ((flags & hasNullableFieldsFlag) != 0)
+            ? reader.readPackedList<ObjectHandle>()
+            : const <ObjectHandle>[];
+    for (var c in closures) {
+      c.code = new ClosureCode.read(reader);
+    }
+    return new Code(
+        constantPool,
+        bytecodes,
+        exceptionsTable,
+        sourcePositions,
+        nullableFields,
+        closures,
+        parameterFlags,
+        forwardingStubTargetCpIndex,
+        defaultFunctionTypeArgsCpIndex);
+  }
+
+  // TODO(alexmarkov): Consider printing constant pool before bytecode.
+  @override
+  String toString() => "\n"
+      "Bytecode {\n"
+      "${new BytecodeDisassembler().disassemble(bytecodes, exceptionsTable, annotations: [
+        hasSourcePositions
+            ? sourcePositions.getBytecodeAnnotations()
+            : const <int, String>{}
+      ])}}\n"
+      "$exceptionsTable"
+      "${nullableFields.isEmpty ? '' : 'Nullable fields: $nullableFields\n'}"
+      "${parameterFlags == null ? '' : 'Parameter flags: $parameterFlags\n'}"
+      "${forwardingStubTargetCpIndex == null ? '' : 'Forwarding stub target: CP#$forwardingStubTargetCpIndex\n'}"
+      "${defaultFunctionTypeArgsCpIndex == null ? '' : 'Default function type arguments: CP#$defaultFunctionTypeArgsCpIndex\n'}"
+      "$constantPool"
+      "${closures.join('\n')}";
+}
+
+class ClosureDeclaration {
+  static const int flagHasOptionalPositionalParams = 1 << 0;
+  static const int flagHasOptionalNamedParams = 1 << 1;
+  static const int flagHasTypeParams = 1 << 2;
+
+  final ObjectHandle parent;
+  final ObjectHandle name;
+  final List<NameAndType> typeParams;
+  final int numRequiredParams;
+  final int numNamedParams;
+  final List<NameAndType> parameters;
+  final ObjectHandle returnType;
+  ClosureCode code;
+
+  ClosureDeclaration(
+      this.parent,
+      this.name,
+      this.typeParams,
+      this.numRequiredParams,
+      this.numNamedParams,
+      this.parameters,
+      this.returnType);
+
+  void write(BufferedWriter writer) {
+    int flags = 0;
+    if (numRequiredParams != parameters.length) {
+      if (numNamedParams > 0) {
+        flags |= flagHasOptionalNamedParams;
+      } else {
+        flags |= flagHasOptionalPositionalParams;
+      }
+    }
+    if (typeParams.isNotEmpty) {
+      flags |= flagHasTypeParams;
+    }
+    writer.writePackedUInt30(flags);
+    writer.writePackedObject(parent);
+    writer.writePackedObject(name);
+
+    if (flags & flagHasTypeParams != 0) {
+      writer.writePackedUInt30(typeParams.length);
+      for (var tp in typeParams) {
+        writer.writePackedObject(tp.name);
+      }
+      for (var tp in typeParams) {
+        writer.writePackedObject(tp.type);
+      }
+    }
+    writer.writePackedUInt30(parameters.length);
+    if (flags &
+            (flagHasOptionalPositionalParams | flagHasOptionalNamedParams) !=
+        0) {
+      writer.writePackedUInt30(numRequiredParams);
+    }
+    for (var param in parameters) {
+      writer.writePackedObject(param.name);
+      writer.writePackedObject(param.type);
+    }
+    writer.writePackedObject(returnType);
+  }
+
+  factory ClosureDeclaration.read(BufferedReader reader) {
+    final int flags = reader.readPackedUInt30();
+    final parent = reader.readPackedObject();
+    final name = reader.readPackedObject();
+    List<NameAndType> typeParams;
+    if ((flags & flagHasTypeParams) != 0) {
+      final int numTypeParams = reader.readPackedUInt30();
+      List<ObjectHandle> names = new List<ObjectHandle>.generate(
+          numTypeParams, (_) => reader.readPackedObject());
+      List<ObjectHandle> bounds = new List<ObjectHandle>.generate(
+          numTypeParams, (_) => reader.readPackedObject());
+      typeParams = new List<NameAndType>.generate(
+          numTypeParams, (int i) => new NameAndType(names[i], bounds[i]));
+    } else {
+      typeParams = const <NameAndType>[];
+    }
+    final numParams = reader.readPackedUInt30();
+    final numRequiredParams = (flags &
+                (flagHasOptionalPositionalParams |
+                    flagHasOptionalNamedParams) !=
+            0)
+        ? reader.readPackedUInt30()
+        : numParams;
+    final numNamedParams = (flags & flagHasOptionalNamedParams != 0)
+        ? (numParams - numRequiredParams)
+        : 0;
+    final List<NameAndType> parameters = new List<NameAndType>.generate(
+        numParams,
+        (_) => new NameAndType(
+            reader.readPackedObject(), reader.readPackedObject()));
+    final returnType = reader.readPackedObject();
+    return new ClosureDeclaration(parent, name, typeParams, numRequiredParams,
+        numNamedParams, parameters, returnType);
+  }
+
+  @override
+  String toString() {
+    StringBuffer sb = new StringBuffer();
+    sb.write('Closure $parent::$name');
+    if (typeParams.isNotEmpty) {
+      sb.write(' <${typeParams.join(', ')}>');
+    }
+    sb.write(' (');
+    sb.write(parameters.sublist(0, numRequiredParams).join(', '));
+    if (numRequiredParams != parameters.length) {
+      if (numRequiredParams > 0) {
+        sb.write(', ');
+      }
+      if (numNamedParams > 0) {
+        sb.write('{ ${parameters.sublist(numRequiredParams).join(', ')} }');
+      } else {
+        sb.write('[ ${parameters.sublist(numRequiredParams).join(', ')} ]');
+      }
+    }
+    sb.write(') -> ');
+    sb.writeln(returnType);
+    if (code != null) {
+      sb.write(code.toString());
+    }
+    return sb.toString();
+  }
+}
+
+/// Bytecode of a nested function (closure).
+/// Closures share the constant pool of a top-level member.
+class ClosureCode {
+  final List<int> bytecodes;
+  final ExceptionsTable exceptionsTable;
+  final SourcePositions sourcePositions;
+
+  bool get hasExceptionsTable => exceptionsTable.blocks.isNotEmpty;
+  bool get hasSourcePositions =>
+      sourcePositions != null && sourcePositions.mapping.isNotEmpty;
+
+  int get flags =>
+      (hasExceptionsTable ? Code.hasExceptionsTableFlag : 0) |
+      (hasSourcePositions ? Code.hasSourcePositionsFlag : 0);
+
+  ClosureCode(this.bytecodes, this.exceptionsTable, this.sourcePositions);
+
+  void write(BufferedWriter writer) {
+    writer.writePackedUInt30(flags);
+    _writeBytecodeInstructions(writer, bytecodes);
+    if (hasExceptionsTable) {
+      exceptionsTable.write(writer);
+    }
+    if (hasSourcePositions) {
+      writer.writeLinkOffset(sourcePositions);
+    }
+  }
+
+  factory ClosureCode.read(BufferedReader reader) {
+    final int flags = reader.readPackedUInt30();
+    final List<int> bytecodes = _readBytecodeInstructions(reader);
+    final exceptionsTable = ((flags & Code.hasExceptionsTableFlag) != 0)
+        ? new ExceptionsTable.read(reader)
+        : new ExceptionsTable();
+    final sourcePositions = ((flags & Code.hasSourcePositionsFlag) != 0)
+        ? reader.readLinkOffset<SourcePositions>()
+        : null;
+    return new ClosureCode(bytecodes, exceptionsTable, sourcePositions);
+  }
+
+  @override
+  String toString() {
+    StringBuffer sb = new StringBuffer();
+    sb.writeln('ClosureCode {');
+    sb.writeln(new BytecodeDisassembler()
+        .disassemble(bytecodes, exceptionsTable, annotations: [
+      hasSourcePositions
+          ? sourcePositions.getBytecodeAnnotations()
+          : const <int, String>{}
+    ]));
+    sb.writeln('}');
+    return sb.toString();
+  }
+}
+
+class _Section {
+  int numItems;
+  int offset;
+  BufferedWriter writer;
+
+  _Section(this.numItems, this.writer);
+
+  int get size => writer.offset;
+}
+
+class Component {
+  static const int magicValue = 0x44424332; // 'DBC2'
+  static const int numSections = 7;
+  static const int sectionAlignment = 4;
+
+  //  UInt32 magic, version, numSections x (numItems, offset)
+  static const int headerSize = (2 + numSections * 2) * 4;
+
+  int version;
+  StringTable stringTable;
+  ObjectTable objectTable;
+  List<Members> members = <Members>[];
+  List<Code> codes = <Code>[];
+  List<SourcePositions> sourcePositions = <SourcePositions>[];
+  List<ObjectHandle> annotations = <ObjectHandle>[];
+  ObjectHandle mainLibrary;
+
+  Component(this.version)
+      : stringTable = new StringTable(),
+        objectTable = new ObjectTable();
+
+  void write(BufferedWriter writer) {
+    objectTable.allocateIndexTable();
+
+    // Write sections to their own buffers in reverse order as section may
+    // reference data structures from successor sections by offsets.
+
+    final BufferedWriter annotationsWriter =
+        new BufferedWriter.fromWriter(writer);
+    for (var annot in annotations) {
+      writer.linkWriter.put(annot, annotationsWriter.offset);
+      annotationsWriter.writePackedObject(annot);
+    }
+
+    final BufferedWriter sourcePositionsWriter =
+        new BufferedWriter.fromWriter(writer);
+    for (var sp in sourcePositions) {
+      writer.linkWriter.put(sp, sourcePositionsWriter.offset);
+      sp.write(sourcePositionsWriter);
+    }
+
+    final BufferedWriter codesWriter = new BufferedWriter.fromWriter(writer);
+    for (var code in codes) {
+      writer.linkWriter.put(code, codesWriter.offset);
+      code.write(codesWriter);
+    }
+
+    final BufferedWriter membersWriter = new BufferedWriter.fromWriter(writer);
+    for (var m in members) {
+      writer.linkWriter.put(m, membersWriter.offset);
+      m.write(membersWriter);
+    }
+
+    BufferedWriter mainWriter;
+    if (mainLibrary != null) {
+      mainWriter = new BufferedWriter.fromWriter(writer);
+      mainWriter.writePackedObject(mainLibrary);
+    }
+
+    final BufferedWriter objectsWriter = new BufferedWriter.fromWriter(writer);
+    objectTable.write(objectsWriter);
+
+    final BufferedWriter stringsWriter = new BufferedWriter.fromWriter(writer);
+    stringTable.write(stringsWriter);
+
+    List<_Section> sections = [
+      new _Section(0, stringsWriter),
+      new _Section(0, objectsWriter),
+      new _Section(0, mainWriter),
+      new _Section(members.length, membersWriter),
+      new _Section(codes.length, codesWriter),
+      new _Section(sourcePositions.length, sourcePositionsWriter),
+      new _Section(annotations.length, annotationsWriter),
+    ];
+    assert(sections.length == numSections);
+
+    int offset = headerSize;
+    for (var section in sections) {
+      if (section.writer != null) {
+        offset = (offset + sectionAlignment - 1) & ~(sectionAlignment - 1);
+        section.offset = offset;
+        offset += section.size;
+      } else {
+        section.offset = 0;
+      }
+    }
+
+    final start = writer.offset;
+
+    writer.writeUInt32(magicValue);
+    writer.writeUInt32(version);
+    for (var section in sections) {
+      writer.writeUInt32(section.numItems);
+      writer.writeUInt32(section.offset);
+    }
+    assert(writer.offset - start == headerSize);
+    for (var section in sections) {
+      if (section.writer != null) {
+        writer.align(sectionAlignment);
+        assert(writer.offset - start == section.offset);
+        writer.writeBytes(section.writer.takeBytes());
+      }
+    }
+
+    BytecodeSizeStatistics.componentSize += (writer.offset - start);
+  }
+
+  Component.read(BufferedReader reader) {
+    final int start = reader.offset;
+
+    final int magic = reader.readUInt32();
+    if (magic != magicValue) {
+      throw 'Error: unexpected bytecode magic $magic';
+    }
+
+    version = reader.readUInt32();
+    if (version != currentBytecodeFormatVersion) {
+      throw 'Error: unexpected bytecode format version $version';
+    }
+
+    reader.formatVersion = version;
+
+    reader.readUInt32();
+    final stringTableOffset = reader.readUInt32();
+
+    reader.readUInt32();
+    final objectTableOffset = reader.readUInt32();
+
+    reader.readUInt32();
+    final mainOffset = reader.readUInt32();
+
+    final membersNum = reader.readUInt32();
+    final membersOffset = reader.readUInt32();
+
+    final codesNum = reader.readUInt32();
+    final codesOffset = reader.readUInt32();
+
+    final sourcePositionsNum = reader.readUInt32();
+    final sourcePositionsOffset = reader.readUInt32();
+
+    final annotationsNum = reader.readUInt32();
+    final annotationsOffset = reader.readUInt32();
+
+    reader.offset = start + stringTableOffset;
+    stringTable = new StringTable.read(reader);
+    reader.stringReader = stringTable;
+
+    reader.offset = start + objectTableOffset;
+    objectTable = new ObjectTable.read(reader);
+    reader.objectReader = objectTable;
+
+    // Read sections in the reverse order as section may reference
+    // successor sections by offsets.
+
+    final annotationsStart = start + annotationsOffset;
+    reader.offset = annotationsStart;
+    for (int i = 0; i < annotationsNum; ++i) {
+      int offset = reader.offset - annotationsStart;
+      ObjectHandle annot = reader.readPackedObject();
+      reader.linkReader.setOffset(annot, offset);
+      annotations.add(annot);
+    }
+
+    final sourcePositionsStart = start + sourcePositionsOffset;
+    reader.offset = sourcePositionsStart;
+    for (int i = 0; i < sourcePositionsNum; ++i) {
+      int offset = reader.offset - sourcePositionsStart;
+      SourcePositions sp = new SourcePositions.read(reader);
+      reader.linkReader.setOffset(sp, offset);
+      sourcePositions.add(sp);
+    }
+
+    final codesStart = start + codesOffset;
+    reader.offset = codesStart;
+    for (int i = 0; i < codesNum; ++i) {
+      int offset = reader.offset - codesStart;
+      Code code = new Code.read(reader);
+      reader.linkReader.setOffset(code, offset);
+      codes.add(code);
+    }
+
+    final membersStart = start + membersOffset;
+    reader.offset = membersStart;
+    for (int i = 0; i < membersNum; ++i) {
+      int offset = reader.offset - membersStart;
+      Members m = new Members.read(reader);
+      reader.linkReader.setOffset(m, offset);
+      members.add(m);
+    }
+
+    if (mainOffset != 0) {
+      reader.offset = start + mainOffset;
+      mainLibrary = reader.readPackedObject();
+    }
+  }
+
+  String toString() => "\n"
+      "Bytecode"
+      " (version: "
+      "${version == currentBytecodeFormatVersion ? 'stable' : version == futureBytecodeFormatVersion ? 'future' : "v$version"}"
+      ")\n"
+//      "$objectTable\n"
+//      "$stringTable\n"
+      "${mainLibrary != null ? 'Main library: $mainLibrary\n' : ''}"
+//      "${members.join('\n')}\n"
+      ;
+}
+
+void _writeBytecodeInstructions(BufferedWriter writer, List<int> bytecodes) {
+  writer.writePackedUInt30(bytecodes.length);
+  writer.align(bytecodeInstructionsAlignment);
+  writer.writeBytes(bytecodes);
+  BytecodeSizeStatistics.instructionsSize += bytecodes.length;
+}
+
+List<int> _readBytecodeInstructions(BufferedReader reader) {
+  int len = reader.readPackedUInt30();
+  reader.align(bytecodeInstructionsAlignment);
+  return reader.readBytesAsUint8List(len);
+}
diff --git a/pkg/vm/lib/bytecode/gen_bytecode.dart b/pkg/vm/lib/bytecode/gen_bytecode.dart
index cecadf5..f8ae346 100644
--- a/pkg/vm/lib/bytecode/gen_bytecode.dart
+++ b/pkg/vm/lib/bytecode/gen_bytecode.dart
@@ -4,17 +4,18 @@
 
 library vm.bytecode.gen_bytecode;
 
-import 'package:kernel/ast.dart' hide MapEntry;
+// TODO(askesc): We should not need to call the constant evaluator
+// explicitly once constant-update-2018 is shipped.
+import 'package:front_end/src/api_prototype/constant_evaluator.dart'
+    show ConstantEvaluator, EvaluationEnvironment, ErrorReporter;
+
+import 'package:kernel/ast.dart' hide MapEntry, Component, FunctionDeclaration;
+import 'package:kernel/ast.dart' as ast show Component, FunctionDeclaration;
 import 'package:kernel/class_hierarchy.dart' show ClassHierarchy;
 import 'package:kernel/core_types.dart' show CoreTypes;
 import 'package:kernel/external_name.dart' show getExternalName;
 import 'package:kernel/library_index.dart' show LibraryIndex;
-import 'package:kernel/transformations/constants.dart'
-    show
-        ConstantEvaluator,
-        ConstantsBackend,
-        EvaluationEnvironment,
-        ErrorReporter;
+import 'package:kernel/target/targets.dart' show ConstantsBackend;
 import 'package:kernel/type_algebra.dart'
     show Substitution, containsTypeVariable;
 import 'package:kernel/type_environment.dart' show TypeEnvironment;
@@ -24,17 +25,21 @@
 import 'bytecode_serialization.dart' show StringTable;
 import 'constant_pool.dart';
 import 'dbc.dart';
+import 'declarations.dart';
 import 'exceptions.dart';
 import 'generics.dart'
     show
         flattenInstantiatorTypeArguments,
+        getDefaultFunctionTypeArguments,
         getInstantiatorTypeArguments,
         hasFreeTypeParameters,
-        hasInstantiatorTypeArguments;
+        hasInstantiatorTypeArguments,
+        isUncheckedCall;
 import 'local_vars.dart' show LocalVariables;
 import 'nullability_detector.dart' show NullabilityDetector;
 import 'object_table.dart' show ObjectHandle, ObjectTable, NameAndType;
 import 'recognized_methods.dart' show RecognizedMethods;
+import 'source_positions.dart' show SourcePositions;
 import '../constants_error_reporter.dart' show ForwardConstantEvaluationErrors;
 import '../metadata/bytecode.dart';
 
@@ -44,8 +49,9 @@
 const String symbolForTypeCast = ' in type cast';
 
 void generateBytecode(
-  Component component, {
+  ast.Component component, {
   bool emitSourcePositions: false,
+  bool emitAnnotations: false,
   bool omitAssertSourcePositions: false,
   bool useFutureBytecodeFormat: false,
   Map<String, String> environmentDefines: const <String, String>{},
@@ -58,7 +64,7 @@
       onAmbiguousSupertypes: ignoreAmbiguousSupertypes);
   final typeEnvironment = new TypeEnvironment(coreTypes, hierarchy);
   final constantsBackend = new VmConstantsBackend(coreTypes);
-  final errorReporter = new ForwardConstantEvaluationErrors(typeEnvironment);
+  final errorReporter = new ForwardConstantEvaluationErrors();
   libraries ??= component.libraries;
   final bytecodeGenerator = new BytecodeGenerator(
       component,
@@ -68,6 +74,7 @@
       constantsBackend,
       environmentDefines,
       emitSourcePositions,
+      emitAnnotations,
       omitAssertSourcePositions,
       useFutureBytecodeFormat,
       errorReporter);
@@ -77,13 +84,13 @@
 }
 
 class BytecodeGenerator extends RecursiveVisitor<Null> {
-  final Component component;
   final CoreTypes coreTypes;
   final ClassHierarchy hierarchy;
   final TypeEnvironment typeEnvironment;
   final ConstantsBackend constantsBackend;
   final Map<String, String> environmentDefines;
   final bool emitSourcePositions;
+  final bool emitAnnotations;
   final bool omitAssertSourcePositions;
   final bool useFutureBytecodeFormat;
   final ErrorReporter errorReporter;
@@ -92,8 +99,11 @@
   final int formatVersion;
   StringTable stringTable;
   ObjectTable objectTable;
+  Component bytecodeComponent;
   NullabilityDetector nullabilityDetector;
 
+  List<FieldDeclaration> fieldDeclarations;
+  List<FunctionDeclaration> functionDeclarations;
   Class enclosingClass;
   Member enclosingMember;
   FunctionNode enclosingFunction;
@@ -121,29 +131,37 @@
   int currentLoopDepth;
 
   BytecodeGenerator(
-      this.component,
+      ast.Component component,
       this.coreTypes,
       this.hierarchy,
       this.typeEnvironment,
       this.constantsBackend,
       this.environmentDefines,
       this.emitSourcePositions,
+      this.emitAnnotations,
       this.omitAssertSourcePositions,
       this.useFutureBytecodeFormat,
       this.errorReporter)
       : recognizedMethods = new RecognizedMethods(typeEnvironment),
         formatVersion = useFutureBytecodeFormat
             ? futureBytecodeFormatVersion
-            : stableBytecodeFormatVersion {
+            : currentBytecodeFormatVersion {
     nullabilityDetector = new NullabilityDetector(recognizedMethods);
     component.addMetadataRepository(metadata);
 
-    metadata.bytecodeComponent = new BytecodeComponent(formatVersion);
-    metadata.mapping[component] = metadata.bytecodeComponent;
+    bytecodeComponent = new Component(formatVersion);
+    metadata.bytecodeComponent = bytecodeComponent;
+    metadata.mapping[component] =
+        new ComponentBytecodeMetadata(bytecodeComponent);
 
-    stringTable = metadata.bytecodeComponent.stringTable;
-    objectTable = metadata.bytecodeComponent.objectTable;
+    stringTable = bytecodeComponent.stringTable;
+    objectTable = bytecodeComponent.objectTable;
     objectTable.coreTypes = coreTypes;
+
+    if (component.mainMethod != null) {
+      bytecodeComponent.mainLibrary =
+          objectTable.getHandle(component.mainMethod.enclosingLibrary);
+    }
   }
 
   @override
@@ -151,62 +169,373 @@
     if (node.isExternal) {
       return;
     }
+
     visitList(node.classes, this);
+
+    startMembers();
     visitList(node.procedures, this);
     visitList(node.fields, this);
+    endMembers(node);
   }
 
   @override
   visitClass(Class node) {
+    startMembers();
     visitList(node.constructors, this);
     visitList(node.procedures, this);
     visitList(node.fields, this);
+    endMembers(node);
+  }
+
+  void startMembers() {
+    fieldDeclarations = <FieldDeclaration>[];
+    functionDeclarations = <FunctionDeclaration>[];
+  }
+
+  void endMembers(TreeNode node) {
+    final members = new Members(fieldDeclarations, functionDeclarations);
+    bytecodeComponent.members.add(members);
+    metadata.mapping[node] = new MembersBytecodeMetadata(members);
+
+    fieldDeclarations = null;
+    functionDeclarations = null;
+  }
+
+  bool _isPragma(Constant annotation) =>
+      annotation is InstanceConstant &&
+      annotation.classNode == coreTypes.pragmaClass;
+
+  Annotations getAnnotations(List<Expression> nodes) {
+    if (nodes.isEmpty) {
+      return const Annotations(null, false);
+    }
+    List<Constant> constants = nodes.map(_evaluateConstantExpression).toList();
+    bool hasPragma = constants.any(_isPragma);
+    if (!emitAnnotations) {
+      if (hasPragma) {
+        constants = constants.where(_isPragma).toList();
+      } else {
+        return const Annotations(null, false);
+      }
+    }
+    final object =
+        objectTable.getHandle(new ListConstant(const DynamicType(), constants));
+    bytecodeComponent.annotations.add(object);
+    return new Annotations(object, hasPragma);
+  }
+
+  FieldDeclaration getFieldDeclaration(Field field, Code initializer) {
+    int flags = 0;
+    Constant value;
+    if (_hasTrivialInitializer(field)) {
+      if (field.initializer != null) {
+        value = _evaluateConstantExpression(field.initializer);
+      }
+    } else {
+      flags |= FieldDeclaration.hasInitializerFlag;
+    }
+    final name = objectTable.getNameHandle(
+        field.name.library, objectTable.mangleMemberName(field, false, false));
+    ObjectHandle getterName;
+    ObjectHandle setterName;
+    if (!field.isStatic || (initializer != null)) {
+      flags |= FieldDeclaration.hasGetterFlag;
+      getterName = objectTable.getNameHandle(
+          field.name.library, objectTable.mangleMemberName(field, true, false));
+    }
+    if (!field.isStatic && !field.isFinal) {
+      flags |= FieldDeclaration.hasSetterFlag;
+      setterName = objectTable.getNameHandle(
+          field.name.library, objectTable.mangleMemberName(field, false, true));
+    }
+    if (isReflectable(field)) {
+      flags |= FieldDeclaration.isReflectableFlag;
+    }
+    if (field.isStatic) {
+      flags |= FieldDeclaration.isStaticFlag;
+    }
+    if (field.isConst) {
+      flags |= FieldDeclaration.isConstFlag;
+    }
+    // Const fields are implicitly final.
+    if (field.isConst || field.isFinal) {
+      flags |= FieldDeclaration.isFinalFlag;
+    }
+    if (field.isCovariant) {
+      flags |= FieldDeclaration.isCovariantFlag;
+    }
+    if (field.isGenericCovariantImpl) {
+      flags |= FieldDeclaration.isGenericCovariantImplFlag;
+    }
+    int position = TreeNode.noOffset;
+    int endPosition = TreeNode.noOffset;
+    if (emitSourcePositions && field.fileOffset != TreeNode.noOffset) {
+      flags |= FieldDeclaration.hasSourcePositionsFlag;
+      position = field.fileOffset;
+      endPosition = field.fileEndOffset;
+    }
+    Annotations annotations = getAnnotations(field.annotations);
+    if (annotations.object != null) {
+      flags |= FieldDeclaration.hasAnnotationsFlag;
+      if (annotations.hasPragma) {
+        flags |= FieldDeclaration.hasPragmaFlag;
+      }
+    }
+    if (field.fileUri != (field.parent as dynamic).fileUri) {
+      // TODO(alexmarkov): support custom scripts
+      // flags |= FieldDeclaration.hasCustomScriptFlag;
+    }
+    return new FieldDeclaration(
+        flags,
+        name,
+        objectTable.getHandle(field.type),
+        objectTable.getHandle(value),
+        null, // TODO(alexmarkov): script
+        position,
+        endPosition,
+        getterName,
+        setterName,
+        initializer,
+        annotations.object);
+  }
+
+  FunctionDeclaration getFunctionDeclaration(Member member, Code code) {
+    int flags = 0;
+    if (member is Constructor) {
+      flags |= FunctionDeclaration.isConstructorFlag;
+    }
+    if (member is Procedure) {
+      if (member.isGetter) {
+        flags |= FunctionDeclaration.isGetterFlag;
+      } else if (member.isSetter) {
+        flags |= FunctionDeclaration.isSetterFlag;
+      } else if (member.isFactory) {
+        flags |= FunctionDeclaration.isFactoryFlag;
+      }
+      if (member.isStatic) {
+        flags |= FunctionDeclaration.isStaticFlag;
+      }
+      if (member.isForwardingStub) {
+        flags |= FunctionDeclaration.isForwardingStubFlag;
+      }
+      if (member.isNoSuchMethodForwarder) {
+        flags |= FunctionDeclaration.isNoSuchMethodForwarderFlag;
+      }
+    }
+    if (member.isAbstract) {
+      flags |= FunctionDeclaration.isAbstractFlag;
+    }
+    if (member.isConst) {
+      flags |= FunctionDeclaration.isConstFlag;
+    }
+
+    FunctionNode function = member.function;
+    if (function.requiredParameterCount !=
+        function.positionalParameters.length) {
+      flags |= FunctionDeclaration.hasOptionalPositionalParamsFlag;
+    }
+    if (function.namedParameters.isNotEmpty) {
+      flags |= FunctionDeclaration.hasOptionalNamedParamsFlag;
+    }
+    TypeParametersDeclaration typeParameters;
+    if (function.typeParameters.isNotEmpty) {
+      flags |= FunctionDeclaration.hasTypeParamsFlag;
+      typeParameters = getTypeParametersDeclaration(function.typeParameters);
+    }
+    if (isReflectable(member)) {
+      flags |= FunctionDeclaration.isReflectableFlag;
+    }
+    if (isDebuggable(member)) {
+      flags |= FunctionDeclaration.isDebuggableFlag;
+    }
+    switch (function.dartAsyncMarker) {
+      case AsyncMarker.Async:
+        flags |= FunctionDeclaration.isAsyncFlag;
+        break;
+      case AsyncMarker.AsyncStar:
+        flags |= FunctionDeclaration.isAsyncStarFlag;
+        break;
+      case AsyncMarker.SyncStar:
+        flags |= FunctionDeclaration.isSyncStarFlag;
+        break;
+      default:
+        break;
+    }
+    ObjectHandle nativeName;
+    if (member.isExternal) {
+      final String externalName = getExternalName(member);
+      if (externalName == null) {
+        flags |= FunctionDeclaration.isExternalFlag;
+      } else {
+        flags |= FunctionDeclaration.isNativeFlag;
+        nativeName = objectTable.getNameHandle(null, externalName);
+      }
+    }
+    int position = TreeNode.noOffset;
+    int endPosition = TreeNode.noOffset;
+    if (emitSourcePositions && member.fileOffset != TreeNode.noOffset) {
+      flags |= FunctionDeclaration.hasSourcePositionsFlag;
+      position = member.fileOffset;
+      endPosition = member.fileEndOffset;
+    }
+    Annotations annotations = getAnnotations(member.annotations);
+    if (annotations.object != null) {
+      flags |= FunctionDeclaration.hasAnnotationsFlag;
+      if (annotations.hasPragma) {
+        flags |= FunctionDeclaration.hasPragmaFlag;
+      }
+    }
+    if (member.fileUri != (member.parent as dynamic).fileUri) {
+      // TODO(alexmarkov): support custom scripts
+      // flags |= FunctionDeclaration.hasCustomScriptFlag;
+    }
+
+    final name = objectTable.getNameHandle(member.name.library,
+        objectTable.mangleMemberName(member, false, false));
+
+    final parameters = <ParameterDeclaration>[];
+    parameters
+        .addAll(function.positionalParameters.map(getParameterDeclaration));
+    parameters.addAll(function.namedParameters.map(getParameterDeclaration));
+
+    return new FunctionDeclaration(
+        flags,
+        name,
+        null, // TODO(alexmarkov): script
+        position,
+        endPosition,
+        typeParameters,
+        function.requiredParameterCount,
+        parameters,
+        objectTable.getHandle(function.returnType),
+        nativeName,
+        code,
+        annotations.object);
+  }
+
+  bool isReflectable(Member member) {
+    if (member is Field && member.fileOffset == TreeNode.noOffset) {
+      return false;
+    }
+    final library = member.enclosingLibrary;
+    if (library.importUri.scheme == 'dart' && member.name.isPrivate) {
+      return false;
+    }
+    if (member is Procedure &&
+        member.isStatic &&
+        library.importUri.toString() == 'dart:_internal') {
+      return false;
+    }
+    return true;
+  }
+
+  bool isDebuggable(Member member) {
+    if (member is Constructor && member.isSynthetic) {
+      return false;
+    }
+    if (member.function.dartAsyncMarker != AsyncMarker.Sync) {
+      return false;
+    }
+    if (member == asyncAwaitCompleterGetFuture) {
+      return false;
+    }
+    return true;
+  }
+
+  TypeParametersDeclaration getTypeParametersDeclaration(
+      List<TypeParameter> typeParams) {
+    return new TypeParametersDeclaration(typeParams
+        .map((tp) => new NameAndType(objectTable.getNameHandle(null, tp.name),
+            objectTable.getHandle(tp.bound)))
+        .toList());
+  }
+
+  ParameterDeclaration getParameterDeclaration(VariableDeclaration variable) {
+    final name = objectTable.getNameHandle(null, variable.name);
+    final type = objectTable.getHandle(variable.type);
+    return new ParameterDeclaration(name, type);
+  }
+
+  List<int> getParameterFlags(FunctionNode function) {
+    int getFlags(VariableDeclaration variable) {
+      int flags = 0;
+      if (variable.isCovariant) {
+        flags |= ParameterDeclaration.isCovariantFlag;
+      }
+      if (variable.isGenericCovariantImpl) {
+        flags |= ParameterDeclaration.isGenericCovariantImplFlag;
+      }
+      return flags;
+    }
+
+    List<int> paramFlags = <int>[];
+    paramFlags.addAll(function.positionalParameters.map(getFlags));
+    paramFlags.addAll(function.namedParameters.map(getFlags));
+
+    for (int flags in paramFlags) {
+      if (flags != 0) {
+        return paramFlags;
+      }
+    }
+    return null;
   }
 
   @override
   defaultMember(Member node) {
-    if (node.isAbstract) {
+    if (node is Procedure && node.isRedirectingFactoryConstructor) {
       return;
     }
     try {
+      bool hasCode = false;
+      start(node);
       if (node is Field) {
-        if (node.isStatic && !_hasTrivialInitializer(node)) {
-          start(node);
+        if (hasInitializerCode(node)) {
+          hasCode = true;
           if (node.isConst) {
             _genPushConstExpr(node.initializer);
           } else {
             _generateNode(node.initializer);
           }
           _genReturnTOS();
-          end(node);
         }
       } else if ((node is Procedure && !node.isRedirectingFactoryConstructor) ||
           (node is Constructor)) {
-        start(node);
-        if (node is Constructor) {
-          _genConstructorInitializers(node);
-        }
-        if (node.isExternal) {
-          final String nativeName = getExternalName(node);
-          if (nativeName == null) {
-            return;
+        if (!node.isAbstract) {
+          hasCode = true;
+          if (node is Constructor) {
+            _genConstructorInitializers(node);
           }
-          _genNativeCall(nativeName);
-        } else {
-          _generateNode(node.function?.body);
-          // BytecodeAssembler eliminates this bytecode if it is unreachable.
-          asm.emitPushNull();
+          if (node.isExternal) {
+            final String nativeName = getExternalName(node);
+            if (nativeName != null) {
+              _genNativeCall(nativeName);
+            } else {
+              // TODO(alexmarkov): generate throwing UnimplementedError
+              //  ("No definition given for external method Foo.bar").
+              asm.emitPushNull();
+            }
+          } else {
+            _generateNode(node.function?.body);
+            // BytecodeAssembler eliminates this bytecode if it is unreachable.
+            asm.emitPushNull();
+          }
+          _genReturnTOS();
         }
-        _genReturnTOS();
-        end(node);
+      } else {
+        throw 'Unexpected member ${node.runtimeType} $node';
       }
+      end(node, hasCode);
     } on BytecodeLimitExceededException {
       // Do not generate bytecode and fall back to using kernel AST.
+      // TODO(alexmarkov): issue compile-time error
       hasErrors = true;
-      end(node);
+      end(node, false);
     }
   }
 
+  bool hasInitializerCode(Field field) =>
+      field.isStatic && !_hasTrivialInitializer(field);
+
   void _genNativeCall(String nativeName) {
     final function = enclosingMember.function;
     assert(function != null);
@@ -324,6 +653,11 @@
   Procedure get iteratorCurrent => _iteratorCurrent ??=
       libraryIndex.getMember('dart:core', 'Iterator', 'get:current');
 
+  Procedure _asyncAwaitCompleterGetFuture;
+  Procedure get asyncAwaitCompleterGetFuture =>
+      _asyncAwaitCompleterGetFuture ??= libraryIndex.getMember(
+          'dart:async', '_AsyncAwaitCompleter', 'get:future');
+
   void _recordSourcePosition(TreeNode node) {
     if (emitSourcePositions) {
       asm.currentSourcePosition = node.fileOffset;
@@ -784,7 +1118,6 @@
           new List<TypeParameter>.from(enclosingFunction.typeParameters);
       functionTypeParametersSet = functionTypeParameters.toSet();
     }
-    locals = new LocalVariables(node);
     // TODO(alexmarkov): improve caching in ConstantEvaluator and reuse it
     constantEvaluator = new ConstantEvaluator(
         constantsBackend,
@@ -793,6 +1126,11 @@
         /* enableAsserts = */ true,
         errorReporter)
       ..env = new EvaluationEnvironment();
+
+    if (node.isAbstract || node is Field && !hasInitializerCode(node)) {
+      return;
+    }
+
     labeledStatements = <LabeledStatement, Label>{};
     switchCases = <SwitchCase, Label>{};
     tryCatches = <TryCatch, TryBlock>{};
@@ -807,6 +1145,7 @@
     savedAssemblers = <BytecodeAssembler>[];
     currentLoopDepth = 0;
 
+    locals = new LocalVariables(node);
     locals.enterScope(node);
     assert(!locals.isSyncYieldingFrame);
 
@@ -838,10 +1177,44 @@
     asm.bind(done);
   }
 
-  void end(Member node) {
+  void end(Member node, bool hasCode) {
     if (!hasErrors) {
-      metadata.mapping[node] = new MemberBytecode(cp, asm.bytecode,
-          asm.exceptionsTable, asm.sourcePositions, nullableFields, closures);
+      Code code;
+      if (hasCode) {
+        List<int> parameterFlags = null;
+        int forwardingStubTargetCpIndex = null;
+        int defaultFunctionTypeArgsCpIndex = null;
+
+        if (node is Procedure) {
+          parameterFlags = getParameterFlags(node.function);
+
+          if (node.isForwardingStub) {
+            forwardingStubTargetCpIndex =
+                cp.addObjectRef(node.forwardingStubSuperTarget);
+          }
+
+          final defaultTypes = getDefaultFunctionTypeArguments(node.function);
+          if (defaultTypes != null) {
+            defaultFunctionTypeArgsCpIndex = cp.addTypeArguments(defaultTypes);
+          }
+        }
+        code = new Code(
+            cp,
+            asm.bytecode,
+            asm.exceptionsTable,
+            finalizeSourcePositions(),
+            nullableFields,
+            closures,
+            parameterFlags,
+            forwardingStubTargetCpIndex,
+            defaultFunctionTypeArgsCpIndex);
+        bytecodeComponent.codes.add(code);
+      }
+      if (node is Field) {
+        fieldDeclarations.add(getFieldDeclaration(node, code));
+      } else {
+        functionDeclarations.add(getFunctionDeclaration(node, code));
+      }
     }
 
     typeEnvironment.thisType = null;
@@ -871,6 +1244,14 @@
     hasErrors = false;
   }
 
+  SourcePositions finalizeSourcePositions() {
+    if (asm.sourcePositions.mapping.isEmpty) {
+      return null;
+    }
+    bytecodeComponent.sourcePositions.add(asm.sourcePositions);
+    return asm.sourcePositions;
+  }
+
   void _genPrologue(Node node, FunctionNode function) {
     if (locals.hasOptionalParameters) {
       final int numOptionalPositional = function.positionalParameters.length -
@@ -971,18 +1352,13 @@
 
   void _handleDefaultTypeArguments(
       FunctionNode function, Label doneCheckingTypeArguments) {
-    bool hasNonDynamicDefaultTypes = function.typeParameters.any(
-        (p) => p.defaultType != null && p.defaultType != const DynamicType());
-    if (!hasNonDynamicDefaultTypes) {
+    List<DartType> defaultTypes = getDefaultFunctionTypeArguments(function);
+    if (defaultTypes == null) {
       return;
     }
 
     asm.emitJumpIfNotZeroTypeArgs(doneCheckingTypeArguments);
 
-    List<DartType> defaultTypes = function.typeParameters
-        .map((p) => p.defaultType ?? const DynamicType())
-        .toList();
-
     // Load parent function type arguments if they are used to
     // instantiate default types.
     if (isClosure &&
@@ -1317,8 +1693,8 @@
 
     locals.leaveScope();
 
-    closure.bytecode = new ClosureBytecode(
-        asm.bytecode, asm.exceptionsTable, asm.sourcePositions);
+    closure.code = new ClosureCode(
+        asm.bytecode, asm.exceptionsTable, finalizeSourcePositions());
 
     _popAssemblerState();
     yieldPoints = savedYieldPoints;
@@ -1370,10 +1746,7 @@
 
   void _genAllocateClosureInstance(
       TreeNode node, int closureFunctionIndex, FunctionNode function) {
-    // TODO(alexmarkov): Consider adding a bytecode to allocate closure.
-
-    assert(closureClass.typeParameters.isEmpty);
-    asm.emitAllocate(cp.addClass(closureClass));
+    asm.emitAllocateClosure(closureFunctionIndex);
 
     final int temp = locals.tempIndexInFrame(node);
     asm.emitStoreLocal(temp);
@@ -1776,19 +2149,22 @@
 
     _genTypeArguments([node.typeArgument]);
 
-    _genDupTOS(locals.tempIndexInFrame(node));
+    if (node.expressions.isEmpty) {
+      asm.emitPushConstant(
+          cp.addObjectRef(new ListConstant(const DynamicType(), const [])));
+    } else {
+      _genDupTOS(locals.tempIndexInFrame(node));
+      _genPushInt(node.expressions.length);
+      asm.emitCreateArrayTOS();
+      final int temp = locals.tempIndexInFrame(node);
+      asm.emitStoreLocal(temp);
 
-    // TODO(alexmarkov): gen more efficient code for empty array
-    _genPushInt(node.expressions.length);
-    asm.emitCreateArrayTOS();
-    final int temp = locals.tempIndexInFrame(node);
-    asm.emitStoreLocal(temp);
-
-    for (int i = 0; i < node.expressions.length; i++) {
-      asm.emitPush(temp);
-      _genPushInt(i);
-      _generateNode(node.expressions[i]);
-      asm.emitStoreIndexedTOS();
+      for (int i = 0; i < node.expressions.length; i++) {
+        asm.emitPush(temp);
+        _genPushInt(i);
+        _generateNode(node.expressions[i]);
+        asm.emitStoreIndexedTOS();
+      }
     }
 
     // List._fromLiteral is a factory constructor.
@@ -1877,6 +2253,7 @@
         break;
 
       case Opcode.kNegateInt:
+      case Opcode.kNegateDouble:
         _generateNode(node.receiver);
         break;
 
@@ -1895,6 +2272,15 @@
       case Opcode.kCompareIntLt:
       case Opcode.kCompareIntGe:
       case Opcode.kCompareIntLe:
+      case Opcode.kAddDouble:
+      case Opcode.kSubDouble:
+      case Opcode.kMulDouble:
+      case Opcode.kDivDouble:
+      case Opcode.kCompareDoubleEq:
+      case Opcode.kCompareDoubleGt:
+      case Opcode.kCompareDoubleLt:
+      case Opcode.kCompareDoubleGe:
+      case Opcode.kCompareDoubleLe:
         _generateNode(node.receiver);
         _generateNode(node.arguments.positional.single);
         break;
@@ -1906,9 +2292,13 @@
     asm.emitBytecode0(opcode);
   }
 
-  void _genInstanceCall(int totalArgCount, int callCpIndex, bool isDynamic) {
+  void _genInstanceCall(
+      int totalArgCount, int callCpIndex, bool isDynamic, bool isUnchecked) {
     if (isDynamic) {
+      assert(!isUnchecked);
       asm.emitDynamicCall(totalArgCount, callCpIndex);
+    } else if (isUnchecked) {
+      asm.emitUncheckedInterfaceCall(totalArgCount, callCpIndex);
     } else {
       asm.emitInterfaceCall(totalArgCount, callCpIndex);
     }
@@ -1930,6 +2320,8 @@
       interfaceTarget = null;
     }
     final isDynamic = interfaceTarget == null;
+    final isUnchecked =
+        isUncheckedCall(interfaceTarget, node.receiver, typeEnvironment);
     _genArguments(node.receiver, args);
     final argDesc =
         objectTable.getArgDescHandleByArguments(args, hasReceiver: true);
@@ -1939,7 +2331,7 @@
         args.named.length +
         1 /* receiver */ +
         (args.types.isNotEmpty ? 1 : 0) /* type arguments */;
-    _genInstanceCall(totalArgCount, callCpIndex, isDynamic);
+    _genInstanceCall(totalArgCount, callCpIndex, isDynamic, isUnchecked);
   }
 
   @override
@@ -1949,7 +2341,7 @@
     final argDesc = objectTable.getArgDescHandle(1);
     final callCpIndex = cp.addInstanceCall(
         InvocationKind.getter, node.interfaceTarget, node.name, argDesc);
-    _genInstanceCall(1, callCpIndex, isDynamic);
+    _genInstanceCall(1, callCpIndex, isDynamic, /*isUnchecked=*/ false);
   }
 
   @override
@@ -1965,10 +2357,12 @@
     }
 
     final isDynamic = node.interfaceTarget == null;
+    final isUnchecked =
+        isUncheckedCall(node.interfaceTarget, node.receiver, typeEnvironment);
     final argDesc = objectTable.getArgDescHandle(2);
     final callCpIndex = cp.addInstanceCall(
         InvocationKind.setter, node.interfaceTarget, node.name, argDesc);
-    _genInstanceCall(2, callCpIndex, isDynamic);
+    _genInstanceCall(2, callCpIndex, isDynamic, isUnchecked);
     asm.emitDrop1();
 
     if (hasResult) {
@@ -2070,13 +2464,27 @@
     _genRethrow(tryCatch);
   }
 
-  bool _hasTrivialInitializer(Field field) =>
-      (field.initializer == null) ||
-      (field.initializer is StringLiteral) ||
-      (field.initializer is BoolLiteral) ||
-      (field.initializer is IntLiteral) ||
-      (field.initializer is DoubleLiteral) ||
-      (field.initializer is NullLiteral);
+  bool _hasTrivialInitializer(Field field) {
+    final initializer = field.initializer;
+    if (initializer == null ||
+        initializer is StringLiteral ||
+        initializer is BoolLiteral ||
+        initializer is IntLiteral ||
+        initializer is DoubleLiteral ||
+        initializer is NullLiteral) {
+      return true;
+    }
+    Constant constValue;
+    if (initializer is ConstantExpression) {
+      constValue = initializer.constant;
+    } else if (field.isConst) {
+      constValue = _evaluateConstantExpression(initializer);
+    }
+    if (constValue is PrimitiveConstant) {
+      return true;
+    }
+    return false;
+  }
 
   @override
   visitStaticGet(StaticGet node) {
@@ -2313,6 +2721,14 @@
   }
 
   @override
+  visitBlockExpression(BlockExpression node) {
+    _enterScope(node);
+    _generateNodeList(node.body.statements);
+    _generateNode(node.value);
+    _leaveScope();
+  }
+
+  @override
   visitBreakStatement(BreakStatement node) {
     final targetLabel = labeledStatements[node.target] ??
         (throw 'Target label ${node.target} was not registered for break $node');
@@ -2483,7 +2899,7 @@
   }
 
   @override
-  visitFunctionDeclaration(FunctionDeclaration node) {
+  visitFunctionDeclaration(ast.FunctionDeclaration node) {
     _genPushContextIfCaptured(node.variable);
     _genClosure(node, node.variable.name, node.function);
     _genStoreVar(node.variable);
@@ -2991,3 +3407,10 @@
 
   FinallyBlock(this.generateContinuation);
 }
+
+class Annotations {
+  final ObjectHandle object;
+  final bool hasPragma;
+
+  const Annotations(this.object, this.hasPragma);
+}
diff --git a/pkg/vm/lib/bytecode/generics.dart b/pkg/vm/lib/bytecode/generics.dart
index 70b6327..4e795d6 100644
--- a/pkg/vm/lib/bytecode/generics.dart
+++ b/pkg/vm/lib/bytecode/generics.dart
@@ -7,7 +7,9 @@
 import 'dart:math' show min;
 
 import 'package:kernel/ast.dart' hide MapEntry;
+import 'package:kernel/core_types.dart' show CoreTypes;
 import 'package:kernel/type_algebra.dart' show Substitution;
+import 'package:kernel/type_environment.dart' show TypeEnvironment;
 
 bool hasInstantiatorTypeArguments(Class c) {
   for (; c != null; c = c.superclass) {
@@ -73,6 +75,16 @@
   return flatTypeArgs;
 }
 
+List<DartType> getDefaultFunctionTypeArguments(FunctionNode function) {
+  List<DartType> defaultTypes = function.typeParameters
+      .map((p) => p.defaultType ?? const DynamicType())
+      .toList();
+  if (_isAllDynamic(defaultTypes)) {
+    return null;
+  }
+  return defaultTypes;
+}
+
 bool _isAllDynamic(List<DartType> typeArgs) {
   for (var t in typeArgs) {
     if (t != const DynamicType()) {
@@ -226,3 +238,81 @@
     visit(node.returnType);
   }
 }
+
+/// Returns static type of [expr].
+DartType getStaticType(Expression expr, TypeEnvironment typeEnvironment) {
+  // TODO(dartbug.com/34496): Remove this try/catch once
+  // getStaticType() is reliable.
+  try {
+    return expr.getStaticType(typeEnvironment);
+  } catch (e) {
+    return const DynamicType();
+  }
+}
+
+/// Returns `true` if [type] cannot be extended in user code.
+bool isSealedType(DartType type, CoreTypes coreTypes) {
+  if (type is InterfaceType) {
+    final cls = type.classNode;
+    return cls == coreTypes.intClass ||
+        cls == coreTypes.doubleClass ||
+        cls == coreTypes.boolClass ||
+        cls == coreTypes.stringClass ||
+        cls == coreTypes.nullClass;
+  }
+  return false;
+}
+
+// Returns true if an instance call to [interfaceTarget] with given
+// [receiver] can omit argument type checks needed due to generic-covariant
+// parameters.
+bool isUncheckedCall(Member interfaceTarget, Expression receiver,
+    TypeEnvironment typeEnvironment) {
+  if (interfaceTarget == null) {
+    // Dynamic call cannot be unchecked.
+    return false;
+  }
+
+  if (!_hasGenericCovariantParameters(interfaceTarget)) {
+    // Unchecked call makes sense only if there are generic-covariant parameters.
+    return false;
+  }
+
+  // Calls via [this] do not require checks.
+  if (receiver is ThisExpression) {
+    return true;
+  }
+
+  DartType receiverStaticType = getStaticType(receiver, typeEnvironment);
+  if (receiverStaticType is InterfaceType) {
+    if (receiverStaticType.typeArguments.isEmpty) {
+      return true;
+    }
+
+    if (receiverStaticType.typeArguments
+        .every((t) => isSealedType(t, typeEnvironment.coreTypes))) {
+      return true;
+    }
+  }
+  return false;
+}
+
+bool _hasGenericCovariantParameters(Member target) {
+  if (target is Field) {
+    return target.isGenericCovariantImpl;
+  } else if (target is Procedure) {
+    for (var param in target.function.positionalParameters) {
+      if (param.isGenericCovariantImpl) {
+        return true;
+      }
+    }
+    for (var param in target.function.namedParameters) {
+      if (param.isGenericCovariantImpl) {
+        return true;
+      }
+    }
+    return false;
+  } else {
+    throw 'Unexpected instance call target ${target.runtimeType} $target';
+  }
+}
diff --git a/pkg/vm/lib/bytecode/local_vars.dart b/pkg/vm/lib/bytecode/local_vars.dart
index 0baa233..5d3862d 100644
--- a/pkg/vm/lib/bytecode/local_vars.dart
+++ b/pkg/vm/lib/bytecode/local_vars.dart
@@ -300,7 +300,7 @@
     _enterFrame(node);
 
     if (node is Field) {
-      node.initializer.accept(this);
+      node.initializer?.accept(this);
     } else {
       assert(node is Procedure ||
           node is Constructor ||
@@ -598,6 +598,16 @@
   }
 
   @override
+  visitBlockExpression(BlockExpression node) {
+    // Not using _visitWithScope as Block inside BlockExpression does not have
+    // a scope.
+    _enterScope(node);
+    visitList(node.body.statements, this);
+    node.value.accept(this);
+    _leaveScope();
+  }
+
+  @override
   visitAssertBlock(AssertBlock node) {
     _visitWithScope(node);
   }
@@ -959,7 +969,7 @@
 
     if (node is Field) {
       _allocateSpecialVariables();
-      node.initializer.accept(this);
+      node.initializer?.accept(this);
     } else {
       assert(node is Procedure ||
           node is Constructor ||
@@ -1037,6 +1047,15 @@
   }
 
   @override
+  visitBlockExpression(BlockExpression node) {
+    // Not using _visit as Block inside BlockExpression does not have a scope.
+    _enterScope(node);
+    visitList(node.body.statements, this);
+    node.value.accept(this);
+    _leaveScope();
+  }
+
+  @override
   visitAssertBlock(AssertBlock node) {
     _visit(node, scope: true);
   }
diff --git a/pkg/vm/lib/bytecode/nullability_detector.dart b/pkg/vm/lib/bytecode/nullability_detector.dart
index 961dfef..414807b 100644
--- a/pkg/vm/lib/bytecode/nullability_detector.dart
+++ b/pkg/vm/lib/bytecode/nullability_detector.dart
@@ -129,4 +129,14 @@
   Opcode.kCompareIntLt,
   Opcode.kCompareIntGe,
   Opcode.kCompareIntLe,
+  Opcode.kNegateDouble,
+  Opcode.kAddDouble,
+  Opcode.kSubDouble,
+  Opcode.kMulDouble,
+  Opcode.kDivDouble,
+  Opcode.kCompareDoubleEq,
+  Opcode.kCompareDoubleGt,
+  Opcode.kCompareDoubleLt,
+  Opcode.kCompareDoubleGe,
+  Opcode.kCompareDoubleLe,
 ]);
diff --git a/pkg/vm/lib/bytecode/object_table.dart b/pkg/vm/lib/bytecode/object_table.dart
index fd54b70..9c3f530 100644
--- a/pkg/vm/lib/bytecode/object_table.dart
+++ b/pkg/vm/lib/bytecode/object_table.dart
@@ -21,6 +21,7 @@
         StringWriter;
 import 'generics.dart'
     show getInstantiatorTypeArguments, isRecursiveAfterFlattening;
+import 'declarations.dart' show TypeParametersDeclaration;
 
 /*
 
@@ -797,13 +798,7 @@
   @override
   void writeContents(BufferedWriter writer) {
     if ((_flags & flagHasTypeParams) != 0) {
-      writer.writePackedUInt30(typeParams.length);
-      for (var tp in typeParams) {
-        writer.writePackedObject(tp.name);
-      }
-      for (var tp in typeParams) {
-        writer.writePackedObject(tp.type);
-      }
+      new TypeParametersDeclaration(typeParams).write(writer);
     }
     writer.writePackedUInt30(positionalParams.length + namedParams.length);
     if (_flags &
@@ -824,13 +819,7 @@
   @override
   void readContents(BufferedReader reader) {
     if ((_flags & flagHasTypeParams) != 0) {
-      final int numTypeParams = reader.readPackedUInt30();
-      List<_NameHandle> names = new List<_NameHandle>.generate(
-          numTypeParams, (_) => reader.readPackedObject());
-      List<_TypeHandle> bounds = new List<_TypeHandle>.generate(
-          numTypeParams, (_) => reader.readPackedObject());
-      typeParams = new List<NameAndType>.generate(
-          numTypeParams, (int i) => new NameAndType(names[i], bounds[i]));
+      typeParams = new TypeParametersDeclaration.read(reader).typeParams;
     } else {
       typeParams = const <NameAndType>[];
     }
@@ -847,7 +836,7 @@
         (_) => reader.readPackedObject());
     if (hasNamedParams) {
       namedParams = new List<NameAndType>.generate(
-          reader.readPackedUInt30(),
+          numParams - numRequiredParams,
           (_) => new NameAndType(
               reader.readPackedObject(), reader.readPackedObject()));
     } else {
@@ -1782,11 +1771,7 @@
     }
     final returnType = objectTable.getHandle(node.returnType);
 
-    for (int i = 0; i < node.typeParameters.length; ++i) {
-      _typeParameters.remove(node.typeParameters[i]);
-    }
-
-    return objectTable.getOrAddObject(new _FunctionTypeHandle(
+    final result = objectTable.getOrAddObject(new _FunctionTypeHandle(
         node.typeParameters
             .map((tp) => new NameAndType(
                 objectTable.getNameHandle(null, tp.name),
@@ -1796,6 +1781,12 @@
         positionalParams,
         namedParams,
         returnType));
+
+    for (int i = 0; i < node.typeParameters.length; ++i) {
+      _typeParameters.remove(node.typeParameters[i]);
+    }
+
+    return result;
   }
 
   @override
diff --git a/pkg/vm/lib/bytecode/recognized_methods.dart b/pkg/vm/lib/bytecode/recognized_methods.dart
index b658fdf..6b776cc 100644
--- a/pkg/vm/lib/bytecode/recognized_methods.dart
+++ b/pkg/vm/lib/bytecode/recognized_methods.dart
@@ -8,6 +8,7 @@
 import 'package:kernel/type_environment.dart' show TypeEnvironment;
 
 import 'dbc.dart';
+import 'generics.dart' show getStaticType;
 
 class RecognizedMethods {
   static const binaryIntOps = <String, Opcode>{
@@ -28,21 +29,27 @@
     '<=': Opcode.kCompareIntLe,
   };
 
+  static const binaryDoubleOps = <String, Opcode>{
+    '+': Opcode.kAddDouble,
+    '-': Opcode.kSubDouble,
+    '*': Opcode.kMulDouble,
+    '/': Opcode.kDivDouble,
+    '==': Opcode.kCompareDoubleEq,
+    '>': Opcode.kCompareDoubleGt,
+    '<': Opcode.kCompareDoubleLt,
+    '>=': Opcode.kCompareDoubleGe,
+    '<=': Opcode.kCompareDoubleLe,
+  };
+
   final TypeEnvironment typeEnv;
 
   RecognizedMethods(this.typeEnv);
 
-  DartType staticType(Expression expr) {
-    // TODO(dartbug.com/34496): Remove this ugly try/catch once
-    // getStaticType() is reliable.
-    try {
-      return expr.getStaticType(typeEnv);
-    } catch (e) {
-      return const DynamicType();
-    }
-  }
+  DartType staticType(Expression expr) => getStaticType(expr, typeEnv);
 
-  bool isInt(Expression expr) => staticType(expr) == typeEnv.intType;
+  bool isInt(DartType type) => type == typeEnv.intType;
+
+  bool isDouble(DartType type) => type == typeEnv.doubleType;
 
   Opcode specializedBytecodeFor(MethodInvocation node) {
     final args = node.arguments;
@@ -65,8 +72,13 @@
   }
 
   Opcode specializedBytecodeForUnaryOp(String selector, Expression arg) {
-    if (selector == 'unary-' && isInt(arg)) {
-      return Opcode.kNegateInt;
+    if (selector == 'unary-') {
+      final argType = staticType(arg);
+      if (isInt(argType)) {
+        return Opcode.kNegateInt;
+      } else if (isDouble(argType)) {
+        return Opcode.kNegateDouble;
+      }
     }
 
     return null;
@@ -78,10 +90,15 @@
       return Opcode.kEqualsNull;
     }
 
-    if (isInt(a) && isInt(b)) {
+    final aType = staticType(a);
+    final bType = staticType(b);
+
+    if (isInt(aType) && isInt(bType)) {
       return binaryIntOps[selector];
     }
-
+    if (isDouble(aType) && isDouble(bType)) {
+      return binaryDoubleOps[selector];
+    }
     return null;
   }
 }
diff --git a/pkg/vm/lib/bytecode/source_positions.dart b/pkg/vm/lib/bytecode/source_positions.dart
index ce4bc3a..22ed3b1 100644
--- a/pkg/vm/lib/bytecode/source_positions.dart
+++ b/pkg/vm/lib/bytecode/source_positions.dart
@@ -24,7 +24,7 @@
     }
   }
 
-  void writeContents(BufferedWriter writer) {
+  void write(BufferedWriter writer) {
     writer.writePackedUInt30(mapping.length);
     final encodePC = new PackedUInt30DeltaEncoder();
     final encodeOffset = new SLEB128DeltaEncoder();
@@ -34,18 +34,7 @@
     });
   }
 
-  void write(BufferedWriter writer) {
-    // TODO(alexmarkov): write source positions in a separate section
-    BufferedWriter contentsWriter = new BufferedWriter.fromWriter(writer);
-    writeContents(contentsWriter);
-
-    final contents = contentsWriter.takeBytes();
-    writer.writePackedUInt30(contents.length);
-    writer.writeBytes(contents);
-  }
-
   SourcePositions.read(BufferedReader reader) {
-    reader.readPackedUInt30(); // Contents length in bytes.
     final int length = reader.readPackedUInt30();
     final decodePC = new PackedUInt30DeltaDecoder();
     final decodeOffset = new SLEB128DeltaDecoder();
diff --git a/pkg/vm/lib/constants_error_reporter.dart b/pkg/vm/lib/constants_error_reporter.dart
index d2fdc95..724f5d8 100644
--- a/pkg/vm/lib/constants_error_reporter.dart
+++ b/pkg/vm/lib/constants_error_reporter.dart
@@ -6,164 +6,26 @@
 /// [constants.ErrorReporter] which uses package:front_end to report errors.
 library vm.constants_error_reporter;
 
+import 'package:front_end/src/api_prototype/constant_evaluator.dart'
+    as constants;
+
 import 'package:front_end/src/api_unstable/vm.dart'
-    show CompilerContext, Severity;
+    show CompilerContext, LocatedMessage, Severity;
 
-import 'package:front_end/src/api_unstable/vm.dart' as codes;
+import 'package:kernel/ast.dart' show InvalidExpression;
 
-import 'package:kernel/ast.dart'
-    show Constant, DartType, IntConstant, Member, TreeNode;
-import 'package:kernel/transformations/constants.dart' as constants;
-import 'package:kernel/type_environment.dart' show TypeEnvironment;
-
-class ForwardConstantEvaluationErrors extends constants.ErrorReporter {
+class ForwardConstantEvaluationErrors implements constants.ErrorReporter {
   // This will get the currently active [CompilerContext] from a zone variable.
   // If there is no active context, this will throw.
   final CompilerContext compilerContext = CompilerContext.current;
 
-  final TypeEnvironment typeEnvironment;
-
-  ForwardConstantEvaluationErrors(this.typeEnvironment);
-
   @override
-  String freeTypeParameter(
-      List<TreeNode> context, TreeNode node, DartType type) {
-    final message =
-        codes.templateConstEvalFreeTypeParameter.withArguments(type);
-    return reportIt(context, message, node);
+  void report(LocatedMessage message, List<LocatedMessage> context) {
+    compilerContext.options.report(message, Severity.error, context: context);
   }
 
   @override
-  String duplicateKey(List<TreeNode> context, TreeNode node, Constant key) {
-    final message = codes.templateConstEvalDuplicateKey.withArguments(key);
-    return reportIt(context, message, node);
-  }
-
-  @override
-  String invalidDartType(List<TreeNode> context, TreeNode node,
-      Constant receiver, DartType expectedType) {
-    final message = codes.templateConstEvalInvalidType.withArguments(
-        receiver, expectedType, receiver.getType(typeEnvironment));
-    return reportIt(context, message, node);
-  }
-
-  @override
-  String invalidBinaryOperandType(
-      List<TreeNode> context,
-      TreeNode node,
-      Constant receiver,
-      String op,
-      DartType expectedType,
-      DartType actualType) {
-    final message = codes.templateConstEvalInvalidBinaryOperandType
-        .withArguments(op, receiver, expectedType, actualType);
-    return reportIt(context, message, node);
-  }
-
-  @override
-  String invalidMethodInvocation(
-      List<TreeNode> context, TreeNode node, Constant receiver, String op) {
-    final message = codes.templateConstEvalInvalidMethodInvocation
-        .withArguments(op, receiver);
-    return reportIt(context, message, node);
-  }
-
-  @override
-  String invalidStaticInvocation(
-      List<TreeNode> context, TreeNode node, Member target) {
-    final message = codes.templateConstEvalInvalidStaticInvocation
-        .withArguments(target.name.toString());
-    return reportIt(context, message, node);
-  }
-
-  @override
-  String invalidStringInterpolationOperand(
-      List<TreeNode> context, TreeNode node, Constant constant) {
-    final message = codes.templateConstEvalInvalidStringInterpolationOperand
-        .withArguments(constant);
-    return reportIt(context, message, node);
-  }
-
-  @override
-  String invalidSymbolName(
-      List<TreeNode> context, TreeNode node, Constant constant) {
-    final message =
-        codes.templateConstEvalInvalidSymbolName.withArguments(constant);
-    return reportIt(context, message, node);
-  }
-
-  @override
-  String zeroDivisor(
-      List<TreeNode> context, TreeNode node, IntConstant receiver, String op) {
-    final message = codes.templateConstEvalZeroDivisor
-        .withArguments(op, '${receiver.value}');
-    return reportIt(context, message, node);
-  }
-
-  @override
-  String negativeShift(List<TreeNode> context, TreeNode node,
-      IntConstant receiver, String op, IntConstant argument) {
-    final message = codes.templateConstEvalNegativeShift
-        .withArguments(op, '${receiver.value}', '${argument.value}');
-    return reportIt(context, message, node);
-  }
-
-  @override
-  String nonConstLiteral(List<TreeNode> context, TreeNode node, String klass) {
-    final message =
-        codes.templateConstEvalNonConstantLiteral.withArguments(klass);
-    return reportIt(context, message, node);
-  }
-
-  @override
-  String failedAssertion(List<TreeNode> context, TreeNode node, String string) {
-    final message = string == null
-        ? codes.messageConstEvalFailedAssertion
-        : codes.templateConstEvalFailedAssertionWithMessage
-            .withArguments(string);
-    return reportIt(context, message, node);
-  }
-
-  @override
-  String nonConstantVariableGet(
-      List<TreeNode> context, TreeNode node, String variableName) {
-    final message = codes.templateConstEvalNonConstantVariableGet
-        .withArguments(variableName);
-    return reportIt(context, message, node);
-  }
-
-  @override
-  String deferredLibrary(
-      List<TreeNode> context, TreeNode node, String importName) {
-    final message =
-        codes.templateConstEvalDeferredLibrary.withArguments(importName);
-    return reportIt(context, message, node);
-  }
-
-  @override
-  String circularity(List<TreeNode> context, TreeNode node) {
-    final message = codes.messageConstEvalCircularity;
-    return reportIt(context, message, node);
-  }
-
-  String reportIt(
-      List<TreeNode> context, codes.Message message, TreeNode node) {
-    final Uri uri = getFileUri(node);
-    final int fileOffset = getFileOffset(node);
-
-    final contextMessages = <codes.LocatedMessage>[];
-    for (final TreeNode node in context) {
-      final Uri uri = getFileUri(node);
-      final int fileOffset = getFileOffset(node);
-      contextMessages.add(codes.messageConstEvalContext
-          .withLocation(uri, fileOffset, codes.noLength));
-    }
-
-    final locatedMessage =
-        message.withLocation(uri, fileOffset, codes.noLength);
-
-    compilerContext.options
-        .report(locatedMessage, Severity.error, context: contextMessages);
-    return locatedMessage.message;
+  void reportInvalidExpression(InvalidExpression node) {
+    // Assumed to be already reported.
   }
 }
diff --git a/pkg/vm/lib/frontend_server.dart b/pkg/vm/lib/frontend_server.dart
index 8b15aa5..6685160 100644
--- a/pkg/vm/lib/frontend_server.dart
+++ b/pkg/vm/lib/frontend_server.dart
@@ -28,11 +28,13 @@
 import 'package:vm/incremental_compiler.dart' show IncrementalCompiler;
 import 'package:vm/kernel_front_end.dart'
     show
+        asFileUri,
         compileToKernel,
         parseCommandLineDefines,
         convertFileOrUriArgumentToUri,
         createFrontEndTarget,
         createFrontEndFileSystem,
+        setVMEnvironmentDefines,
         writeDepfile;
 
 ArgParser argParser = new ArgParser(allowTrailingOptions: true)
@@ -115,16 +117,16 @@
 String usage = '''
 Usage: server [options] [input.dart]
 
-If input dart source code is provided on the command line, then the server
-compiles it, generates dill file and exits.
-If no input dart source is provided on the command line, server waits for
+If filename or uri pointing to the entrypoint is provided on the command line,
+then the server compiles it, generates dill file and exits.
+If no entrypoint is provided on the command line, server waits for
 instructions from stdin.
 
 Instructions:
 - compile <input.dart>
 - recompile [<input.dart>] <boundary-key>
-<path/to/updated/file1.dart>
-<path/to/updated/file2.dart>
+<invalidated file uri>
+<invalidated file uri>
 ...
 <boundary-key>
 - accept
@@ -152,20 +154,20 @@
 
 /// Actions that every compiler should implement.
 abstract class CompilerInterface {
-  /// Compile given Dart program identified by `filename` with given list of
+  /// Compile given Dart program identified by `entryPoint` with given list of
   /// `options`. When `generator` parameter is omitted, new instance of
   /// `IncrementalKernelGenerator` is created by this method. Main use for this
   /// parameter is for mocking in tests.
   /// Returns [true] if compilation was successful and produced no errors.
   Future<bool> compile(
-    String filename,
+    String entryPoint,
     ArgResults options, {
     IncrementalCompiler generator,
   });
 
   /// Assuming some Dart program was previously compiled, recompile it again
   /// taking into account some changed(invalidated) sources.
-  Future<Null> recompileDelta({String filename});
+  Future<Null> recompileDelta({String entryPoint});
 
   /// Accept results of previous compilation so that next recompilation cycle
   /// won't recompile sources that were previously reported as changed.
@@ -240,30 +242,27 @@
   String _kernelBinaryFilenameFull;
   String _initializeFromDill;
 
+  Set<Uri> previouslyReportedDependencies = Set<Uri>();
+
   final ProgramTransformer transformer;
 
   final List<String> errors = new List<String>();
 
-  void setMainSourceFilename(String filename) {
-    final Uri filenameUri = _getFileOrUri(filename);
-    _mainSource = filenameUri;
-  }
-
   @override
   Future<bool> compile(
-    String filename,
+    String entryPoint,
     ArgResults options, {
     IncrementalCompiler generator,
   }) async {
     _options = options;
     _fileSystem = createFrontEndFileSystem(
         options['filesystem-scheme'], options['filesystem-root']);
-    setMainSourceFilename(filename);
-    _kernelBinaryFilenameFull = _options['output-dill'] ?? '$filename.dill';
+    _mainSource = _getFileOrUri(entryPoint);
+    _kernelBinaryFilenameFull = _options['output-dill'] ?? '$entryPoint.dill';
     _kernelBinaryFilenameIncremental = _options['output-incremental-dill'] ??
         (_options['output-dill'] != null
             ? '${_options['output-dill']}.incremental.dill'
-            : '$filename.incremental.dill');
+            : '$entryPoint.incremental.dill');
     _kernelBinaryFilename = _kernelBinaryFilenameFull;
     _initializeFromDill =
         _options['initialize-from-dill'] ?? _kernelBinaryFilenameFull;
@@ -333,6 +332,9 @@
     Component component;
     if (options['incremental']) {
       _compilerOptions = compilerOptions;
+      setVMEnvironmentDefines(environmentDefines, _compilerOptions);
+
+      _compilerOptions.omitPlatform = false;
       _generator =
           generator ?? _createGenerator(new Uri.file(_initializeFromDill));
       await invalidateIfInitializingFromDill();
@@ -359,6 +361,8 @@
       await writeDillFile(component, _kernelBinaryFilename,
           filterExternal: importDill != null);
 
+      _outputStream.writeln(boundaryKey);
+      await _outputDependenciesDelta(component);
       _outputStream
           .writeln('$boundaryKey $_kernelBinaryFilename ${errors.length}');
       final String depfile = options['depfile'];
@@ -373,6 +377,27 @@
     return errors.isEmpty;
   }
 
+  void _outputDependenciesDelta(Component component) async {
+    Set<Uri> uris = new Set<Uri>();
+    for (Uri uri in component.uriToSource.keys) {
+      // Skip empty or corelib dependencies.
+      if (uri == null || uri.scheme == 'org-dartlang-sdk') continue;
+      uris.add(uri);
+    }
+    for (Uri uri in uris) {
+      if (previouslyReportedDependencies.contains(uri)) {
+        continue;
+      }
+      _outputStream.writeln('+${await asFileUri(_fileSystem, uri)}');
+    }
+    for (Uri uri in previouslyReportedDependencies) {
+      if (!uris.contains(uri)) {
+        _outputStream.writeln('-${await asFileUri(_fileSystem, uri)}');
+      }
+    }
+    previouslyReportedDependencies = uris;
+  }
+
   writeDillFile(Component component, String filename,
       {bool filterExternal: false}) async {
     final IOSink sink = new File(filename).openWrite();
@@ -430,7 +455,15 @@
         // Ignore errors that might be caused by non-file uris.
         continue nextUri;
       }
-      if (!await entity.exists()) {
+
+      bool exists;
+      try {
+        exists = await entity.exists();
+      } catch (e) {
+        exists = false;
+      }
+
+      if (!exists) {
         _generator.invalidate(uri);
         continue nextUri;
       }
@@ -449,12 +482,12 @@
   }
 
   @override
-  Future<Null> recompileDelta({String filename}) async {
+  Future<Null> recompileDelta({String entryPoint}) async {
     final String boundaryKey = new Uuid().generateV4();
     _outputStream.writeln('result $boundaryKey');
     await invalidateIfInitializingFromDill();
-    if (filename != null) {
-      setMainSourceFilename(filename);
+    if (entryPoint != null) {
+      _mainSource = _getFileOrUri(entryPoint);
     }
     errors.clear();
     final Component deltaProgram =
@@ -464,6 +497,8 @@
       transformer.transform(deltaProgram);
     }
     await writeDillFile(deltaProgram, _kernelBinaryFilename);
+    _outputStream.writeln(boundaryKey);
+    await _outputDependenciesDelta(deltaProgram);
     _outputStream
         .writeln('$boundaryKey $_kernelBinaryFilename ${errors.length}');
     _kernelBinaryFilename = _kernelBinaryFilenameIncremental;
@@ -674,7 +709,7 @@
   _State state = _State.READY_FOR_INSTRUCTION;
   _CompileExpressionRequest compileExpressionRequest;
   String boundaryKey;
-  String recompileFilename;
+  String recompileEntryPoint;
   input
       .transform(utf8.decoder)
       .transform(const LineSplitter())
@@ -686,17 +721,17 @@
         const String COMPILE_EXPRESSION_INSTRUCTION_SPACE =
             'compile-expression ';
         if (string.startsWith(COMPILE_INSTRUCTION_SPACE)) {
-          final String filename =
+          final String entryPoint =
               string.substring(COMPILE_INSTRUCTION_SPACE.length);
-          await compiler.compile(filename, options, generator: generator);
+          await compiler.compile(entryPoint, options, generator: generator);
         } else if (string.startsWith(RECOMPILE_INSTRUCTION_SPACE)) {
-          // 'recompile [<filename>] <boundarykey>'
+          // 'recompile [<entryPoint>] <boundarykey>'
           //   where <boundarykey> can't have spaces
           final String remainder =
               string.substring(RECOMPILE_INSTRUCTION_SPACE.length);
           final int spaceDelim = remainder.lastIndexOf(' ');
           if (spaceDelim > -1) {
-            recompileFilename = remainder.substring(0, spaceDelim);
+            recompileEntryPoint = remainder.substring(0, spaceDelim);
             boundaryKey = remainder.substring(spaceDelim + 1);
           } else {
             boundaryKey = remainder;
@@ -730,7 +765,7 @@
         break;
       case _State.RECOMPILE_LIST:
         if (string == boundaryKey) {
-          compiler.recompileDelta(filename: recompileFilename);
+          compiler.recompileDelta(entryPoint: recompileEntryPoint);
           state = _State.READY_FOR_INSTRUCTION;
         } else
           compiler.invalidate(Uri.base.resolve(string));
diff --git a/pkg/vm/lib/incremental_compiler.dart b/pkg/vm/lib/incremental_compiler.dart
index e1715745..7914070 100644
--- a/pkg/vm/lib/incremental_compiler.dart
+++ b/pkg/vm/lib/incremental_compiler.dart
@@ -17,10 +17,6 @@
 class IncrementalCompiler {
   IncrementalKernelGenerator _generator;
 
-  // Component that reflect current state of the compiler, which has not
-  // been yet accepted by the client. Is [null] if no compilation was done
-  // since last accept/reject acknowledgement by the client.
-  Component _candidate;
   // Component that reflect the state that was most recently accepted by the
   // client. Is [null], if no compilation results were accepted by the client.
   Component _lastKnownGood;
@@ -47,58 +43,69 @@
   /// compilation. Otherwise, previously set entryPoint is used.
   Future<Component> compile({Uri entryPoint}) async {
     _entryPoint = entryPoint ?? _entryPoint;
+    List<Uri> entryPoints;
+    if (entryPoint != null) entryPoints = [entryPoint];
     Component component = await _generator.computeDelta(
-        entryPoint: entryPoint, fullComponent: fullComponent);
+        entryPoints: entryPoints, fullComponent: fullComponent);
     initialized = true;
     fullComponent = false;
-    final bool firstDelta = _pendingDeltas.isEmpty;
     _pendingDeltas.add(component);
-    if (!firstDelta) {
-      // If more than one delta is pending, we need to combine them.
-      Procedure mainMethod;
-      Map<Uri, Library> combined = <Uri, Library>{};
-      for (Component delta in _pendingDeltas) {
-        if (delta.mainMethod != null) {
-          mainMethod = delta.mainMethod;
-        }
-        for (Library library in delta.libraries) {
-          combined[library.importUri] = library;
-        }
+    return _combinePendingDeltas(false);
+  }
+
+  _combinePendingDeltas(bool includePlatform) {
+    Procedure mainMethod;
+    Map<Uri, Library> combined = <Uri, Library>{};
+    Map<Uri, Source> uriToSource = new Map<Uri, Source>();
+    for (Component delta in _pendingDeltas) {
+      if (delta.mainMethod != null) {
+        mainMethod = delta.mainMethod;
       }
-      // TODO(vegorov) this needs to merge metadata repositories from deltas.
-      component = new Component(libraries: combined.values.toList())
-        ..mainMethod = mainMethod;
+      uriToSource.addAll(delta.uriToSource);
+      for (Library library in delta.libraries) {
+        bool isPlatform =
+            library.importUri.scheme == "dart" && !library.isSynthetic;
+        if (!includePlatform && isPlatform) continue;
+        combined[library.importUri] = library;
+      }
     }
-    _candidate = component;
-    return component;
+
+    // TODO(vegorov) this needs to merge metadata repositories from deltas.
+    return new Component(
+        libraries: combined.values.toList(), uriToSource: uriToSource)
+      ..mainMethod = mainMethod;
   }
 
   /// This lets incremental compiler know that results of last [compile] call
   /// were accepted, don't need to be included into subsequent [compile] calls
   /// results.
   accept() {
-    _pendingDeltas.clear();
-
     Map<Uri, Library> combined = <Uri, Library>{};
+    Map<Uri, Source> uriToSource = <Uri, Source>{};
+
     if (_lastKnownGood != null) {
       // TODO(aam): Figure out how to skip no-longer-used libraries from
       // [_lastKnownGood] libraries.
       for (Library library in _lastKnownGood.libraries) {
         combined[library.importUri] = library;
       }
-    }
-    for (Library library in _candidate.libraries) {
-      combined[library.importUri] = library;
-    }
-    _lastKnownGood = new Component(
-      libraries: combined.values.toList(),
-      uriToSource: _candidate.uriToSource,
-    )..mainMethod = _candidate.mainMethod;
-    for (final repo in _candidate.metadata.values) {
-      _lastKnownGood.addMetadataRepository(repo);
+      uriToSource.addAll(_lastKnownGood.uriToSource);
     }
 
-    _candidate = null;
+    Component candidate = _combinePendingDeltas(true);
+    for (Library library in candidate.libraries) {
+      combined[library.importUri] = library;
+    }
+    uriToSource.addAll(candidate.uriToSource);
+
+    _lastKnownGood = new Component(
+      libraries: combined.values.toList(),
+      uriToSource: uriToSource,
+    )..mainMethod = candidate.mainMethod;
+    for (final repo in candidate.metadata.values) {
+      _lastKnownGood.addMetadataRepository(repo);
+    }
+    _pendingDeltas.clear();
   }
 
   /// This lets incremental compiler know that results of last [compile] call
@@ -106,12 +113,11 @@
   /// be processed without changes picked up by rejected [compile] call.
   reject() async {
     _pendingDeltas.clear();
-    _candidate = null;
     // Need to reset and warm up compiler so that expression evaluation requests
     // are processed in that known good state.
     _generator = new IncrementalKernelGenerator.fromComponent(
         _compilerOptions, _entryPoint, _lastKnownGood);
-    await _generator.computeDelta(entryPoint: _entryPoint);
+    await _generator.computeDelta(entryPoints: [_entryPoint]);
   }
 
   /// This tells incremental compiler that it needs rescan [uri] file during
diff --git a/pkg/vm/lib/kernel_front_end.dart b/pkg/vm/lib/kernel_front_end.dart
index 088a723..452e2ca 100644
--- a/pkg/vm/lib/kernel_front_end.dart
+++ b/pkg/vm/lib/kernel_front_end.dart
@@ -13,6 +13,11 @@
 import 'package:build_integration/file_system/multi_root.dart'
     show MultiRootFileSystem, MultiRootFileSystemEntity;
 
+// TODO(askesc): We should not need to call the constant evaluator
+// explicitly once constant-update-2018 is shipped.
+import 'package:front_end/src/api_prototype/constant_evaluator.dart'
+    as constants;
+
 import 'package:front_end/src/api_unstable/vm.dart'
     show
         CompilerContext,
@@ -30,7 +35,6 @@
         parseExperimentalFlags,
         printDiagnosticMessage;
 
-import 'package:kernel/type_environment.dart' show TypeEnvironment;
 import 'package:kernel/class_hierarchy.dart' show ClassHierarchy;
 import 'package:kernel/ast.dart'
     show Component, Field, Library, Reference, StaticGet;
@@ -39,7 +43,6 @@
     show LimitedBinaryPrinter;
 import 'package:kernel/core_types.dart' show CoreTypes;
 import 'package:kernel/target/targets.dart' show Target, TargetFlags, getTarget;
-import 'package:kernel/transformations/constants.dart' as constants;
 import 'package:kernel/vm/constants_native_effects.dart' as vm_constants;
 
 import 'bytecode/ast_remover.dart' show ASTRemover;
@@ -54,6 +57,8 @@
     show transformComponent;
 import 'transformations/no_dynamic_invocations_annotator.dart'
     as no_dynamic_invocations_annotator show transformComponent;
+import 'transformations/protobuf_aware_treeshaker/transformer.dart'
+    as protobuf_tree_shaker;
 import 'transformations/type_flow/transformer.dart' as globalTypeFlow
     show transformComponent;
 import 'transformations/obfuscation_prohibitions_annotator.dart'
@@ -90,6 +95,9 @@
       help:
           'Enable global type flow analysis and related transformations in AOT mode.',
       defaultsTo: true);
+  args.addFlag('protobuf-tree-shaker',
+      help: 'Enable protobuf tree shaker transformation in AOT mode.',
+      defaultsTo: false);
   args.addMultiOption('define',
       abbr: 'D',
       help: 'The values for the environment constants (e.g. -Dkey=value).');
@@ -105,6 +113,8 @@
   args.addFlag('gen-bytecode', help: 'Generate bytecode', defaultsTo: false);
   args.addFlag('emit-bytecode-source-positions',
       help: 'Emit source positions in bytecode', defaultsTo: false);
+  args.addFlag('emit-bytecode-annotations',
+      help: 'Emit Dart annotations in bytecode', defaultsTo: false);
   args.addFlag('drop-ast',
       help: 'Drop AST for members with bytecode', defaultsTo: false);
   args.addFlag('show-bytecode-size-stat',
@@ -113,6 +123,8 @@
       help: 'Generate bytecode in the bleeding edge format', defaultsTo: false);
   args.addMultiOption('enable-experiment',
       help: 'Comma separated list of experimental features to enable.');
+  args.addFlag('help',
+      abbr: 'h', negatable: false, help: 'Print this help message.');
 }
 
 /// Create ArgParser and populate it with options consumed by [runCompiler].
@@ -131,6 +143,11 @@
 Future<int> runCompiler(ArgResults options, String usage) async {
   final String platformKernel = options['platform'];
 
+  if (options['help']) {
+    print(usage);
+    return successExitCode;
+  }
+
   if ((options.rest.length != 1) || (platformKernel == null)) {
     print(usage);
     return badUsageExitCode;
@@ -149,10 +166,12 @@
   final bool genBytecode = options['gen-bytecode'];
   final bool emitBytecodeSourcePositions =
       options['emit-bytecode-source-positions'];
+  final bool emitBytecodeAnnotations = options['emit-bytecode-annotations'];
   final bool dropAST = options['drop-ast'];
   final bool useFutureBytecodeFormat = options['use-future-bytecode-format'];
   final bool enableAsserts = options['enable-asserts'];
   final bool enableConstantEvaluation = options['enable-constant-evaluation'];
+  final bool useProtobufTreeShaker = options['protobuf-tree-shaker'];
   final bool splitOutputByPackages = options['split-output-by-packages'];
   final bool showBytecodeSizeStat = options['show-bytecode-size-stat'];
   final List<String> experimentalFlags = options['enable-experiment'];
@@ -207,10 +226,12 @@
       environmentDefines: environmentDefines,
       genBytecode: genBytecode,
       emitBytecodeSourcePositions: emitBytecodeSourcePositions,
+      emitBytecodeAnnotations: emitBytecodeAnnotations,
       dropAST: dropAST && !splitOutputByPackages,
       useFutureBytecodeFormat: useFutureBytecodeFormat,
       enableAsserts: enableAsserts,
-      enableConstantEvaluation: enableConstantEvaluation);
+      enableConstantEvaluation: enableConstantEvaluation,
+      useProtobufTreeShaker: useProtobufTreeShaker);
 
   errorPrinter.printCompilationMessages();
 
@@ -244,6 +265,7 @@
       environmentDefines: environmentDefines,
       genBytecode: genBytecode,
       emitBytecodeSourcePositions: emitBytecodeSourcePositions,
+      emitBytecodeAnnotations: emitBytecodeAnnotations,
       dropAST: dropAST,
       showBytecodeSizeStat: showBytecodeSizeStat,
       useFutureBytecodeFormat: useFutureBytecodeFormat,
@@ -264,34 +286,20 @@
     Map<String, String> environmentDefines,
     bool genBytecode: false,
     bool emitBytecodeSourcePositions: false,
+    bool emitBytecodeAnnotations: false,
     bool dropAST: false,
     bool useFutureBytecodeFormat: false,
     bool enableAsserts: false,
-    bool enableConstantEvaluation: true}) async {
+    bool enableConstantEvaluation: true,
+    bool useProtobufTreeShaker: false}) async {
   // Replace error handler to detect if there are compilation errors.
   final errorDetector =
       new ErrorDetector(previousErrorHandler: options.onDiagnostic);
   options.onDiagnostic = errorDetector;
 
+  setVMEnvironmentDefines(environmentDefines, options);
   final component = await kernelForProgram(source, options);
 
-  // If we don't default back to the current VM we'll add environment defines
-  // for the core libraries.
-  if (component != null && environmentDefines != null) {
-    if (environmentDefines['dart.vm.product'] == 'true') {
-      environmentDefines['dart.developer.causal_async_stacks'] = 'false';
-    }
-    environmentDefines['dart.isVM'] = 'true';
-    for (final library in component.libraries) {
-      if (library.importUri.scheme == 'dart') {
-        final path = library.importUri.path;
-        if (!path.startsWith('_')) {
-          environmentDefines['dart.library.${path}'] = 'true';
-        }
-      }
-    }
-  }
-
   // Run global transformations only if component is correct.
   if (aot && component != null) {
     await _runGlobalTransformations(
@@ -302,6 +310,7 @@
         environmentDefines,
         enableAsserts,
         enableConstantEvaluation,
+        useProtobufTreeShaker,
         errorDetector);
   }
 
@@ -309,6 +318,7 @@
     await runWithFrontEndCompilerContext(source, options, component, () {
       generateBytecode(component,
           emitSourcePositions: emitBytecodeSourcePositions,
+          emitAnnotations: emitBytecodeAnnotations,
           useFutureBytecodeFormat: useFutureBytecodeFormat,
           environmentDefines: environmentDefines);
     });
@@ -324,6 +334,30 @@
   return component;
 }
 
+void setVMEnvironmentDefines(
+    Map<String, dynamic> environmentDefines, CompilerOptions options) {
+  // TODO(alexmarkov): move this logic into VmTarget and call from front-end
+  // in order to have the same defines when compiling platform.
+  assert(environmentDefines != null);
+  if (environmentDefines['dart.vm.product'] == 'true') {
+    environmentDefines['dart.developer.causal_async_stacks'] = 'false';
+  }
+  environmentDefines['dart.isVM'] = 'true';
+  // TODO(dartbug.com/36460): Derive dart.library.* definitions from platform.
+  for (String library in options.target.extraRequiredLibraries) {
+    Uri libraryUri = Uri.parse(library);
+    if (libraryUri.scheme == 'dart') {
+      final path = libraryUri.path;
+      if (!path.startsWith('_')) {
+        environmentDefines['dart.library.${path}'] = 'true';
+      }
+    }
+  }
+  // dart:core is not mentioned in Target.extraRequiredLibraries.
+  environmentDefines['dart.library.core'] = 'true';
+  options.environmentDefines = environmentDefines;
+}
+
 Future _runGlobalTransformations(
     Uri source,
     CompilerOptions compilerOptions,
@@ -332,6 +366,7 @@
     Map<String, String> environmentDefines,
     bool enableAsserts,
     bool enableConstantEvaluation,
+    bool useProtobufTreeShaker,
     ErrorDetector errorDetector) async {
   if (errorDetector.hasCompilationErrors) return;
 
@@ -361,6 +396,18 @@
     no_dynamic_invocations_annotator.transformComponent(component);
   }
 
+  if (useProtobufTreeShaker) {
+    if (!useGlobalTypeFlowAnalysis) {
+      throw 'Protobuf tree shaker requires type flow analysis (--tfa)';
+    }
+
+    protobuf_tree_shaker.removeUnusedProtoReferences(
+        component, coreTypes, null);
+
+    globalTypeFlow.transformComponent(
+        compilerOptions.target, coreTypes, component);
+  }
+
   // TODO(35069): avoid recomputing CSA by reading it from the platform files.
   void ignoreAmbiguousSupertypes(cls, a, b) {}
   final hierarchy = new ClassHierarchy(component,
@@ -401,16 +448,14 @@
   final vmConstants = new vm_constants.VmConstantsBackend(coreTypes);
 
   await runWithFrontEndCompilerContext(source, compilerOptions, component, () {
-    final hierarchy = new ClassHierarchy(component);
-    final typeEnvironment = new TypeEnvironment(coreTypes, hierarchy);
-
     // TFA will remove constants fields which are unused (and respects the
     // vm/embedder entrypoints).
     constants.transformComponent(component, vmConstants, environmentDefines,
-        new ForwardConstantEvaluationErrors(typeEnvironment),
+        new ForwardConstantEvaluationErrors(),
         keepFields: true,
         evaluateAnnotations: true,
-        enableAsserts: enableAsserts);
+        enableAsserts: enableAsserts,
+        desugarSets: !compilerOptions.target.supportsSetLiterals);
   });
 }
 
@@ -517,7 +562,7 @@
 /// absolute URI.
 ///
 /// If virtual multi-root file system is used, or [input] can be parsed to a
-/// URI with 'package' scheme, then [input] is interpreted as URI.
+/// URI with 'package' or 'file' scheme, then [input] is interpreted as URI.
 /// Otherwise [input] is interpreted as a file path.
 Uri convertFileOrUriArgumentToUri(FileSystem fileSystem, String input) {
   if (input == null) {
@@ -530,7 +575,7 @@
   }
   try {
     Uri uri = Uri.parse(input);
-    if (uri.scheme == 'package') {
+    if (uri.scheme == 'package' || uri.scheme == 'file') {
       return uri;
     }
   } on FormatException {
@@ -551,6 +596,9 @@
 /// Convert URI to a package URI if it is inside one of the packages.
 Future<Uri> convertToPackageUri(
     FileSystem fileSystem, Uri uri, Uri packagesUri) async {
+  if (uri.scheme == 'package') {
+    return uri;
+  }
   // Convert virtual URI to a real file URI.
   String uriString = (await asFileUri(fileSystem, uri)).toString();
   List<String> packages;
@@ -599,6 +647,7 @@
   Map<String, String> environmentDefines,
   bool genBytecode: false,
   bool emitBytecodeSourcePositions: false,
+  bool emitBytecodeAnnotations: false,
   bool dropAST: false,
   bool showBytecodeSizeStat: false,
   bool useFutureBytecodeFormat: false,
@@ -636,8 +685,10 @@
       final IOSink sink = new File(filename).openWrite();
 
       final main = component.mainMethod;
+      final problems = component.problemsAsJson;
       if (package != 'main') {
         component.mainMethod = null;
+        component.problemsAsJson = null;
       }
 
       ASTRemover astRemover;
@@ -648,6 +699,7 @@
         generateBytecode(component,
             libraries: libraries,
             emitSourcePositions: emitBytecodeSourcePositions,
+            emitAnnotations: emitBytecodeAnnotations,
             useFutureBytecodeFormat: useFutureBytecodeFormat,
             environmentDefines: environmentDefines);
 
@@ -662,10 +714,12 @@
       final BinaryPrinter printer = new LimitedBinaryPrinter(sink,
           (lib) => packageFor(lib) == package, false /* excludeUriToSource */);
       printer.writeComponentFile(component);
-      component.mainMethod = main;
+
       if (genBytecode && dropAST) {
         astRemover.restoreAST();
       }
+      component.mainMethod = main;
+      component.problemsAsJson = problems;
 
       await sink.close();
     }
@@ -716,3 +770,6 @@
   file.write('\n');
   await file.close();
 }
+
+// Used by kernel_front_end_test.dart
+main() {}
diff --git a/pkg/vm/lib/metadata/bytecode.dart b/pkg/vm/lib/metadata/bytecode.dart
index cd9f65e..6b18d0e 100644
--- a/pkg/vm/lib/metadata/bytecode.dart
+++ b/pkg/vm/lib/metadata/bytecode.dart
@@ -4,417 +4,57 @@
 
 library vm.metadata.bytecode;
 
-import 'package:kernel/ast.dart';
+import 'package:kernel/ast.dart'
+    show BinarySink, BinarySource, MetadataRepository, Node, TreeNode;
+import 'package:kernel/ast.dart' as ast show Component;
 import '../bytecode/bytecode_serialization.dart'
-    show BufferedWriter, BufferedReader, BytecodeSizeStatistics, StringTable;
-import '../bytecode/constant_pool.dart' show ConstantPool;
-import '../bytecode/dbc.dart'
-    show
-        stableBytecodeFormatVersion,
-        futureBytecodeFormatVersion,
-        bytecodeInstructionsAlignment;
-import '../bytecode/disassembler.dart' show BytecodeDisassembler;
-import '../bytecode/exceptions.dart' show ExceptionsTable;
-import '../bytecode/object_table.dart'
-    show ObjectTable, ObjectHandle, NameAndType;
-import '../bytecode/source_positions.dart' show SourcePositions;
+    show BufferedWriter, BufferedReader, LinkWriter, LinkReader;
+import '../bytecode/declarations.dart' show Component, Members;
 
 abstract class BytecodeMetadata {
   void write(BufferedWriter writer);
 }
 
-/// Bytecode of a member is encoded in the following way:
-///
-/// type MemberBytecode {
-///   UInt flags (HasExceptionsTable, HasSourcePositions, HasNullableFields,
-///               HasClosures)
-///
-///   (optional, present if HasClosures)
-///   List<ClosureDeclaration> closureDeclarations
-///
-///   ConstantPool constantPool
-///
-///   UInt bytecodeSizeInBytes
-///   Byte[] padding
-///   Byte[bytecodeSizeInBytes] bytecodes
-///
-///   (optional, present if HasExceptionsTable)
-///   ExceptionsTable exceptionsTable
-///
-///   (optional, present if HasSourcePositions)
-///   SourcePositions sourcePositionsTabe
-///
-///   (optional, present if HasNullableFields)
-///   List<PackedObject> nullableFields
-///
-///   (optional, present if HasClosures)
-///   ClosureBytecode[] closures
-/// }
-///
-/// type ClosureDeclaration {
-///   UInt flags (hasOptionalPositionalParams, hasOptionalNamedParams,
-///               hasTypeParams)
-///
-///   PackedObject parent // Member or Closure
-///   PackedObject name
-///
-///   if hasTypeParams
-///     UInt numTypeParameters
-///     PackedObject[numTypeParameters] typeParameterNames
-///     PackedObject[numTypeParameters] typeParameterBounds
-///
-///   UInt numParameters
-///
-///   if hasOptionalPositionalParams || hasOptionalNamedParams
-///     UInt numRequiredParameters
-///
-///   NameAndType[numParameters] parameters
-///   PackedObject returnType
-/// }
-///
-/// type ClosureBytecode {
-///   UInt flags (HasExceptionsTable, HasSourcePositions)
-///
-///   UInt bytecodeSizeInBytes
-///   Byte[] padding
-///   Byte[bytecodeSizeInBytes] bytecodes
-///
-///   (optional, present if HasExceptionsTable)
-///   ExceptionsTable exceptionsTable
-///
-///   (optional, present if HasSourcePositions)
-///   SourcePositions sourcePositionsTabe
-/// }
-///
-/// Encoding of ExceptionsTable is described in
-/// pkg/vm/lib/bytecode/exceptions.dart.
-///
-/// Encoding of ConstantPool is described in
-/// pkg/vm/lib/bytecode/constant_pool.dart.
-///
-class MemberBytecode extends BytecodeMetadata {
-  static const hasExceptionsTableFlag = 1 << 0;
-  static const hasSourcePositionsFlag = 1 << 1;
-  static const hasNullableFieldsFlag = 1 << 2;
-  static const hasClosuresFlag = 1 << 3;
+class MembersBytecodeMetadata extends BytecodeMetadata {
+  final Members members;
 
-  final ConstantPool constantPool;
-  final List<int> bytecodes;
-  final ExceptionsTable exceptionsTable;
-  final SourcePositions sourcePositions;
-  final List<ObjectHandle> nullableFields;
-  final List<ClosureDeclaration> closures;
-
-  bool get hasExceptionsTable => exceptionsTable.blocks.isNotEmpty;
-  bool get hasSourcePositions => sourcePositions.mapping.isNotEmpty;
-  bool get hasNullableFields => nullableFields.isNotEmpty;
-  bool get hasClosures => closures.isNotEmpty;
-
-  int get flags =>
-      (hasExceptionsTable ? hasExceptionsTableFlag : 0) |
-      (hasSourcePositions ? hasSourcePositionsFlag : 0) |
-      (hasNullableFields ? hasNullableFieldsFlag : 0) |
-      (hasClosures ? hasClosuresFlag : 0);
-
-  MemberBytecode(this.constantPool, this.bytecodes, this.exceptionsTable,
-      this.sourcePositions, this.nullableFields, this.closures);
+  MembersBytecodeMetadata(this.members);
 
   @override
   void write(BufferedWriter writer) {
-    final start = writer.offset;
-    writer.writePackedUInt30(flags);
-    if (hasClosures) {
-      writer.writePackedUInt30(closures.length);
-      closures.forEach((c) => c.write(writer));
-    }
-    constantPool.write(writer);
-    _writeBytecodeInstructions(writer, bytecodes);
-    if (hasExceptionsTable) {
-      exceptionsTable.write(writer);
-    }
-    if (hasSourcePositions) {
-      sourcePositions.write(writer);
-    }
-    if (hasNullableFields) {
-      writer.writePackedList(nullableFields);
-    }
-    if (hasClosures) {
-      closures.forEach((c) => c.bytecode.write(writer));
-    }
-    BytecodeSizeStatistics.membersSize += (writer.offset - start);
+    writer.writeLinkOffset(members);
   }
 
-  factory MemberBytecode.read(BufferedReader reader) {
-    int flags = reader.readPackedUInt30();
-    final List<ClosureDeclaration> closures = ((flags & hasClosuresFlag) != 0)
-        ? new List<ClosureDeclaration>.generate(reader.readPackedUInt30(),
-            (_) => new ClosureDeclaration.read(reader))
-        : const <ClosureDeclaration>[];
-    final ConstantPool constantPool = new ConstantPool.read(reader);
-    final List<int> bytecodes = _readBytecodeInstructions(reader);
-    final exceptionsTable = ((flags & hasExceptionsTableFlag) != 0)
-        ? new ExceptionsTable.read(reader)
-        : new ExceptionsTable();
-    final sourcePositions = ((flags & hasSourcePositionsFlag) != 0)
-        ? new SourcePositions.read(reader)
-        : new SourcePositions();
-    final List<ObjectHandle> nullableFields =
-        ((flags & hasNullableFieldsFlag) != 0)
-            ? reader.readPackedList<ObjectHandle>()
-            : const <ObjectHandle>[];
-    for (var c in closures) {
-      c.bytecode = new ClosureBytecode.read(reader);
-    }
-    return new MemberBytecode(constantPool, bytecodes, exceptionsTable,
-        sourcePositions, nullableFields, closures);
+  factory MembersBytecodeMetadata.read(BufferedReader reader) {
+    return new MembersBytecodeMetadata(reader.readLinkOffset<Members>());
   }
 
-  // TODO(alexmarkov): Consider printing constant pool before bytecode.
   @override
   String toString() => "\n"
-      "Bytecode {\n"
-      "${new BytecodeDisassembler().disassemble(bytecodes, exceptionsTable, annotations: [
-        sourcePositions.getBytecodeAnnotations()
-      ])}}\n"
-      "$exceptionsTable"
-      "${nullableFields.isEmpty ? '' : 'Nullable fields: $nullableFields}\n'}"
-      "$constantPool"
-      "${closures.join('\n')}";
+      "MembersBytecodeMetadata {\n"
+      "$members\n"
+      "}\n";
 }
 
-class ClosureDeclaration {
-  static const int flagHasOptionalPositionalParams = 1 << 0;
-  static const int flagHasOptionalNamedParams = 1 << 1;
-  static const int flagHasTypeParams = 1 << 2;
+class ComponentBytecodeMetadata extends BytecodeMetadata {
+  final Component component;
 
-  final ObjectHandle parent;
-  final ObjectHandle name;
-  final List<NameAndType> typeParams;
-  final int numRequiredParams;
-  final int numNamedParams;
-  final List<NameAndType> parameters;
-  final ObjectHandle returnType;
-  ClosureBytecode bytecode;
-
-  ClosureDeclaration(
-      this.parent,
-      this.name,
-      this.typeParams,
-      this.numRequiredParams,
-      this.numNamedParams,
-      this.parameters,
-      this.returnType);
-
-  void write(BufferedWriter writer) {
-    int flags = 0;
-    if (numRequiredParams != parameters.length) {
-      if (numNamedParams > 0) {
-        flags |= flagHasOptionalNamedParams;
-      } else {
-        flags |= flagHasOptionalPositionalParams;
-      }
-    }
-    if (typeParams.isNotEmpty) {
-      flags |= flagHasTypeParams;
-    }
-    writer.writePackedUInt30(flags);
-    writer.writePackedObject(parent);
-    writer.writePackedObject(name);
-
-    if (flags & flagHasTypeParams != 0) {
-      writer.writePackedUInt30(typeParams.length);
-      for (var tp in typeParams) {
-        writer.writePackedObject(tp.name);
-      }
-      for (var tp in typeParams) {
-        writer.writePackedObject(tp.type);
-      }
-    }
-    writer.writePackedUInt30(parameters.length);
-    if (flags &
-            (flagHasOptionalPositionalParams | flagHasOptionalNamedParams) !=
-        0) {
-      writer.writePackedUInt30(numRequiredParams);
-    }
-    for (var param in parameters) {
-      writer.writePackedObject(param.name);
-      writer.writePackedObject(param.type);
-    }
-    writer.writePackedObject(returnType);
-  }
-
-  factory ClosureDeclaration.read(BufferedReader reader) {
-    final int flags = reader.readPackedUInt30();
-    final parent = reader.readPackedObject();
-    final name = reader.readPackedObject();
-    List<NameAndType> typeParams;
-    if ((flags & flagHasTypeParams) != 0) {
-      final int numTypeParams = reader.readPackedUInt30();
-      List<ObjectHandle> names = new List<ObjectHandle>.generate(
-          numTypeParams, (_) => reader.readPackedObject());
-      List<ObjectHandle> bounds = new List<ObjectHandle>.generate(
-          numTypeParams, (_) => reader.readPackedObject());
-      typeParams = new List<NameAndType>.generate(
-          numTypeParams, (int i) => new NameAndType(names[i], bounds[i]));
-    } else {
-      typeParams = const <NameAndType>[];
-    }
-    final numParams = reader.readPackedUInt30();
-    final numRequiredParams = (flags &
-                (flagHasOptionalPositionalParams |
-                    flagHasOptionalNamedParams) !=
-            0)
-        ? reader.readPackedUInt30()
-        : numParams;
-    final numNamedParams = (flags & flagHasOptionalNamedParams != 0)
-        ? (numParams - numRequiredParams)
-        : 0;
-    final List<NameAndType> parameters = new List<NameAndType>.generate(
-        numParams,
-        (_) => new NameAndType(
-            reader.readPackedObject(), reader.readPackedObject()));
-    final returnType = reader.readPackedObject();
-    return new ClosureDeclaration(parent, name, typeParams, numRequiredParams,
-        numNamedParams, parameters, returnType);
-  }
-
-  @override
-  String toString() {
-    StringBuffer sb = new StringBuffer();
-    sb.write('Closure $parent::$name');
-    if (typeParams.isNotEmpty) {
-      sb.write(' <${typeParams.join(', ')}>');
-    }
-    sb.write(' (');
-    sb.write(parameters.sublist(0, numRequiredParams).join(', '));
-    if (numRequiredParams != parameters.length) {
-      if (numRequiredParams > 0) {
-        sb.write(', ');
-      }
-      if (numNamedParams > 0) {
-        sb.write('{ ${parameters.sublist(numRequiredParams).join(', ')} }');
-      } else {
-        sb.write('[ ${parameters.sublist(numRequiredParams).join(', ')} ]');
-      }
-    }
-    sb.write(') -> ');
-    sb.writeln(returnType);
-    if (bytecode != null) {
-      sb.write(bytecode.toString());
-    }
-    return sb.toString();
-  }
-}
-
-/// Bytecode of a nested function (closure).
-/// Closures share the constant pool of a top-level member.
-class ClosureBytecode {
-  final List<int> bytecodes;
-  final ExceptionsTable exceptionsTable;
-  final SourcePositions sourcePositions;
-
-  bool get hasExceptionsTable => exceptionsTable.blocks.isNotEmpty;
-  bool get hasSourcePositions => sourcePositions.mapping.isNotEmpty;
-
-  int get flags =>
-      (hasExceptionsTable ? MemberBytecode.hasExceptionsTableFlag : 0) |
-      (hasSourcePositions ? MemberBytecode.hasSourcePositionsFlag : 0);
-
-  ClosureBytecode(this.bytecodes, this.exceptionsTable, this.sourcePositions);
-
-  void write(BufferedWriter writer) {
-    writer.writePackedUInt30(flags);
-    _writeBytecodeInstructions(writer, bytecodes);
-    if (hasExceptionsTable) {
-      exceptionsTable.write(writer);
-    }
-    if (hasSourcePositions) {
-      sourcePositions.write(writer);
-    }
-  }
-
-  factory ClosureBytecode.read(BufferedReader reader) {
-    final int flags = reader.readPackedUInt30();
-    final List<int> bytecodes = _readBytecodeInstructions(reader);
-    final exceptionsTable =
-        ((flags & MemberBytecode.hasExceptionsTableFlag) != 0)
-            ? new ExceptionsTable.read(reader)
-            : new ExceptionsTable();
-    final sourcePositions =
-        ((flags & MemberBytecode.hasSourcePositionsFlag) != 0)
-            ? new SourcePositions.read(reader)
-            : new SourcePositions();
-    return new ClosureBytecode(bytecodes, exceptionsTable, sourcePositions);
-  }
-
-  @override
-  String toString() {
-    StringBuffer sb = new StringBuffer();
-    sb.writeln('ClosureBytecode {');
-    sb.writeln(new BytecodeDisassembler().disassemble(
-        bytecodes, exceptionsTable,
-        annotations: [sourcePositions.getBytecodeAnnotations()]));
-    sb.writeln('}');
-    return sb.toString();
-  }
-}
-
-class BytecodeComponent extends BytecodeMetadata {
-  int version;
-  StringTable stringTable;
-  ObjectTable objectTable;
-
-  BytecodeComponent(this.version)
-      : stringTable = new StringTable(),
-        objectTable = new ObjectTable();
+  ComponentBytecodeMetadata(this.component);
 
   @override
   void write(BufferedWriter writer) {
-    final start = writer.offset;
-    objectTable.allocateIndexTable();
-
-    // Writing object table may add new strings to strings table,
-    // so serialize object table first.
-    BufferedWriter objectsWriter = new BufferedWriter.fromWriter(writer);
-    objectTable.write(objectsWriter);
-
-    BufferedWriter stringsWriter = new BufferedWriter.fromWriter(writer);
-    stringTable.write(stringsWriter);
-
-    writer.writePackedUInt30(version);
-    writer.writePackedUInt30(stringsWriter.offset);
-    writer.writePackedUInt30(objectsWriter.offset);
-
-    writer.writeBytes(stringsWriter.takeBytes());
-    writer.writeBytes(objectsWriter.takeBytes());
-    BytecodeSizeStatistics.componentSize += (writer.offset - start);
+    component.write(writer);
   }
 
-  BytecodeComponent.read(BufferedReader reader) {
-    version = reader.readPackedUInt30();
-    if (version != stableBytecodeFormatVersion &&
-        version != futureBytecodeFormatVersion) {
-      throw 'Error: unexpected bytecode version $version';
-    }
-    reader.formatVersion = version;
-    reader.readPackedUInt30(); // Strings size
-    reader.readPackedUInt30(); // Objects size
-
-    stringTable = new StringTable.read(reader);
-    reader.stringReader = stringTable;
-
-    objectTable = new ObjectTable.read(reader);
-    reader.objectReader = objectTable;
+  factory ComponentBytecodeMetadata.read(BufferedReader reader) {
+    return new ComponentBytecodeMetadata(new Component.read(reader));
   }
 
+  @override
   String toString() => "\n"
-      "Bytecode"
-      " (version: "
-      "${version == stableBytecodeFormatVersion ? 'stable' : version == futureBytecodeFormatVersion ? 'future' : "v$version"}"
-      ")\n"
-//      "$objectTable\n"
-//      "$stringTable\n"
-      ;
+      "ComponentBytecodeMetadata {\n"
+      "$component\n"
+      "}\n";
 }
 
 /// Repository for [BytecodeMetadata].
@@ -426,17 +66,24 @@
   final Map<TreeNode, BytecodeMetadata> mapping =
       <TreeNode, BytecodeMetadata>{};
 
-  BytecodeComponent bytecodeComponent;
+  Component bytecodeComponent;
+  LinkWriter linkWriter;
+  LinkReader linkReader;
 
   @override
   void writeToBinary(BytecodeMetadata metadata, Node node, BinarySink sink) {
-    if (node is Component) {
-      bytecodeComponent = metadata as BytecodeComponent;
+    if (node is ast.Component) {
+      bytecodeComponent = (metadata as ComponentBytecodeMetadata).component;
+      linkWriter = new LinkWriter();
     } else {
       assert(bytecodeComponent != null);
+      assert(linkWriter != null);
     }
-    final writer = new BufferedWriter(bytecodeComponent.version,
-        bytecodeComponent.stringTable, bytecodeComponent.objectTable,
+    final writer = new BufferedWriter(
+        bytecodeComponent.version,
+        bytecodeComponent.stringTable,
+        bytecodeComponent.objectTable,
+        linkWriter,
         baseOffset: sink.getBufferOffset());
     metadata.write(writer);
     sink.writeBytes(writer.takeBytes());
@@ -444,32 +91,22 @@
 
   @override
   BytecodeMetadata readFromBinary(Node node, BinarySource source) {
-    if (node is Component) {
-      final reader = new BufferedReader(-1, null, null, source.bytes,
+    if (node is ast.Component) {
+      linkReader = new LinkReader();
+      final reader = new BufferedReader(
+          -1, null, null, linkReader, source.bytes,
           baseOffset: source.currentOffset);
-      bytecodeComponent = new BytecodeComponent.read(reader);
-      return bytecodeComponent;
+      bytecodeComponent = new Component.read(reader);
+      return new ComponentBytecodeMetadata(bytecodeComponent);
     } else {
       final reader = new BufferedReader(
           bytecodeComponent.version,
           bytecodeComponent.stringTable,
           bytecodeComponent.objectTable,
+          linkReader,
           source.bytes,
           baseOffset: source.currentOffset);
-      return new MemberBytecode.read(reader);
+      return new MembersBytecodeMetadata.read(reader);
     }
   }
 }
-
-void _writeBytecodeInstructions(BufferedWriter writer, List<int> bytecodes) {
-  writer.writePackedUInt30(bytecodes.length);
-  writer.align(bytecodeInstructionsAlignment);
-  writer.writeBytes(bytecodes);
-  BytecodeSizeStatistics.instructionsSize += bytecodes.length;
-}
-
-List<int> _readBytecodeInstructions(BufferedReader reader) {
-  int len = reader.readPackedUInt30();
-  reader.align(bytecodeInstructionsAlignment);
-  return reader.readBytesAsUint8List(len);
-}
diff --git a/pkg/vm/lib/target/flutter_runner.dart b/pkg/vm/lib/target/flutter_runner.dart
index 3ffde3c..9266f3a 100644
--- a/pkg/vm/lib/target/flutter_runner.dart
+++ b/pkg/vm/lib/target/flutter_runner.dart
@@ -43,6 +43,5 @@
         'dart:fuchsia',
         'dart:vmservice_io',
         'dart:ui',
-        'dart:mozart.internal',
       ];
 }
diff --git a/pkg/vm/lib/target/vm.dart b/pkg/vm/lib/target/vm.dart
index 1682f35..a04416a 100644
--- a/pkg/vm/lib/target/vm.dart
+++ b/pkg/vm/lib/target/vm.dart
@@ -11,7 +11,6 @@
 import 'package:kernel/target/targets.dart';
 import 'package:kernel/transformations/mixin_full_resolution.dart'
     as transformMixins show transformLibraries;
-import 'package:kernel/transformations/constants.dart' show ConstantsBackend;
 import 'package:kernel/transformations/continuation.dart' as transformAsync
     show transformLibraries, transformProcedure;
 import 'package:kernel/vm/constants_native_effects.dart'
@@ -90,9 +89,9 @@
 
     transformFfi.ReplacedMembers replacedFields =
         transformFfiDefinitions.transformLibraries(
-            coreTypes, hierarchy, libraries, diagnosticReporter);
-    transformFfiUseSites.transformLibraries(
-        coreTypes, hierarchy, libraries, diagnosticReporter, replacedFields);
+            component, coreTypes, hierarchy, libraries, diagnosticReporter);
+    transformFfiUseSites.transformLibraries(component, coreTypes, hierarchy,
+        libraries, diagnosticReporter, replacedFields);
     logger?.call("Transformed ffi annotations");
 
     // TODO(kmillikin): Make this run on a per-method basis.
diff --git a/pkg/vm/lib/transformations/ffi.dart b/pkg/vm/lib/transformations/ffi.dart
index f79ce37..bcbf5fa 100644
--- a/pkg/vm/lib/transformations/ffi.dart
+++ b/pkg/vm/lib/transformations/ffi.dart
@@ -10,6 +10,7 @@
 import 'package:kernel/ast.dart';
 import 'package:kernel/class_hierarchy.dart' show ClassHierarchy;
 import 'package:kernel/core_types.dart';
+import 'package:kernel/library_index.dart' show LibraryIndex;
 import 'package:kernel/target/targets.dart' show DiagnosticReporter;
 import 'package:kernel/type_environment.dart' show TypeEnvironment;
 
@@ -77,6 +78,7 @@
 /// _FfiUseSiteTransformer and _FfiDefinitionTransformer.
 class FfiTransformer extends Transformer {
   final TypeEnvironment env;
+  final LibraryIndex index;
   final ClassHierarchy hierarchy;
   final DiagnosticReporter diagnosticReporter;
 
@@ -87,6 +89,7 @@
   final Library ffiLibrary;
   final Class nativeFunctionClass;
   final Class pointerClass;
+  final Class structClass;
   final Procedure castMethod;
   final Procedure loadMethod;
   final Procedure storeMethod;
@@ -99,25 +102,29 @@
   /// Classes corresponding to [NativeType], indexed by [NativeType].
   final List<Class> nativeTypesClasses;
 
-  FfiTransformer(this.hierarchy, CoreTypes coreTypes, this.diagnosticReporter)
+  FfiTransformer(
+      this.index, CoreTypes coreTypes, this.hierarchy, this.diagnosticReporter)
       : env = new TypeEnvironment(coreTypes, hierarchy),
         intClass = coreTypes.intClass,
         doubleClass = coreTypes.doubleClass,
-        ffiLibrary = coreTypes.ffiLibrary,
-        nativeFunctionClass = coreTypes.ffiNativeFunctionClass,
-        pointerClass = coreTypes.ffiPointerClass,
-        castMethod = coreTypes.ffiPointerCastProcedure,
-        loadMethod = coreTypes.ffiPointerLoadProcedure,
-        storeMethod = coreTypes.ffiPointerStoreProcedure,
-        offsetByMethod = coreTypes.ffiPointerOffsetByProcedure,
-        asFunctionMethod = coreTypes.ffiPointerAsFunctionProcedure,
-        lookupFunctionMethod =
-            coreTypes.ffiDynamicLibraryLookupFunctionProcedure,
-        fromFunctionMethod = coreTypes.ffiFromFunctionProcedure,
-        structField = coreTypes.ffiStructField,
         pragmaConstructor = coreTypes.pragmaConstructor,
-        nativeTypesClasses =
-            nativeTypeClassNames.map(coreTypes.ffiNativeTypeClass).toList() {}
+        ffiLibrary = index.getLibrary('dart:ffi'),
+        nativeFunctionClass = index.getClass('dart:ffi', 'NativeFunction'),
+        pointerClass = index.getClass('dart:ffi', 'Pointer'),
+        structClass = index.getClass('dart:ffi', 'Struct'),
+        castMethod = index.getMember('dart:ffi', 'Pointer', 'cast'),
+        loadMethod = index.getMember('dart:ffi', 'Pointer', 'load'),
+        storeMethod = index.getMember('dart:ffi', 'Pointer', 'store'),
+        offsetByMethod = index.getMember('dart:ffi', 'Pointer', 'offsetBy'),
+        asFunctionMethod = index.getMember('dart:ffi', 'Pointer', 'asFunction'),
+        lookupFunctionMethod =
+            index.getMember('dart:ffi', 'DynamicLibrary', 'lookupFunction'),
+        fromFunctionMethod =
+            index.getTopLevelMember('dart:ffi', 'fromFunction'),
+        structField = index.getTopLevelMember('dart:ffi', 'struct'),
+        nativeTypesClasses = nativeTypeClassNames
+            .map((name) => index.getClass('dart:ffi', name))
+            .toList() {}
 
   /// Computes the Dart type corresponding to a ffi.[NativeType], returns null
   /// if it is not a valid NativeType.
@@ -133,6 +140,7 @@
   /// [IntPtr]                             -> [int]
   /// [Double]                             -> [double]
   /// [Float]                              -> [double]
+  /// [Void]                               -> [void]
   /// [Pointer]<T>                         -> [Pointer]<T>
   /// T extends [Pointer]                  -> T
   /// [NativeFunction]<T1 Function(T2, T3) -> S1 Function(S2, S3)
@@ -157,6 +165,9 @@
     if (nativeType_ == NativeType.kFloat || nativeType_ == NativeType.kDouble) {
       return InterfaceType(doubleClass);
     }
+    if (nativeType_ == NativeType.kVoid) {
+      return VoidType();
+    }
     if (nativeType_ == NativeType.kNativeFunction) {
       DartType fun = (nativeType as InterfaceType).typeArguments[0];
       if (fun is FunctionType) {
diff --git a/pkg/vm/lib/transformations/ffi_definitions.dart b/pkg/vm/lib/transformations/ffi_definitions.dart
index e738406..ad38a18 100644
--- a/pkg/vm/lib/transformations/ffi_definitions.dart
+++ b/pkg/vm/lib/transformations/ffi_definitions.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 kernel.transformations.ffi_definitions;
+library vm.transformations.ffi_definitions;
 
 import 'dart:math' as math;
 
@@ -13,10 +13,10 @@
         templateFfiTypeMismatch,
         templateFfiFieldInitializer;
 
-import 'package:kernel/class_hierarchy.dart' show ClassHierarchy;
-
 import 'package:kernel/ast.dart';
+import 'package:kernel/class_hierarchy.dart' show ClassHierarchy;
 import 'package:kernel/core_types.dart';
+import 'package:kernel/library_index.dart' show LibraryIndex;
 import 'package:kernel/target/targets.dart' show DiagnosticReporter;
 
 import 'ffi.dart'
@@ -63,12 +63,19 @@
 ///   static int sizeOf() => 24;
 /// }
 ReplacedMembers transformLibraries(
+    Component component,
     CoreTypes coreTypes,
     ClassHierarchy hierarchy,
     List<Library> libraries,
     DiagnosticReporter diagnosticReporter) {
-  final transformer =
-      new _FfiDefinitionTransformer(hierarchy, coreTypes, diagnosticReporter);
+  final LibraryIndex index = LibraryIndex(
+      component, const ["dart:ffi", "dart:_internal", "dart:core"]);
+  if (!index.containsLibrary("dart:ffi")) {
+    // if dart:ffi is not loaded, do not do the transformation
+    return ReplacedMembers({}, {});
+  }
+  final transformer = new _FfiDefinitionTransformer(
+      index, coreTypes, hierarchy, diagnosticReporter);
   libraries.forEach(transformer.visitLibrary);
   return ReplacedMembers(
       transformer.replacedGetters, transformer.replacedSetters);
@@ -76,12 +83,28 @@
 
 /// Checks and expands the dart:ffi @struct and field annotations.
 class _FfiDefinitionTransformer extends FfiTransformer {
+  final LibraryIndex index;
+  final Field _internalIs64Bit;
+  final Constructor _unimplementedErrorCtor;
+  static const String _errorOn32BitMessage =
+      "Code-gen for FFI structs is not supported on 32-bit platforms.";
+
   Map<Field, Procedure> replacedGetters = {};
   Map<Field, Procedure> replacedSetters = {};
 
-  _FfiDefinitionTransformer(ClassHierarchy hierarchy, CoreTypes coreTypes,
-      DiagnosticReporter diagnosticReporter)
-      : super(hierarchy, coreTypes, diagnosticReporter) {}
+  _FfiDefinitionTransformer(this.index, CoreTypes coreTypes,
+      ClassHierarchy hierarchy, DiagnosticReporter diagnosticReporter)
+      : _internalIs64Bit = index.getTopLevelMember('dart:_internal', 'is64Bit'),
+        _unimplementedErrorCtor =
+            index.getMember('dart:core', 'UnimplementedError', ''),
+        super(index, coreTypes, hierarchy, diagnosticReporter) {}
+
+  Statement guardOn32Bit(Statement body) {
+    final Throw error = Throw(ConstructorInvocation(_unimplementedErrorCtor,
+        Arguments([StringLiteral(_errorOn32BitMessage)])));
+    return IfStatement(
+        StaticGet(_internalIs64Bit), body, ExpressionStatement(error));
+  }
 
   @override
   visitClass(Class node) {
@@ -231,8 +254,11 @@
         pointerName,
         ProcedureKind.Getter,
         FunctionNode(
-            ReturnStatement(MethodInvocation(offsetExpression, castMethod.name,
-                Arguments([], types: [pointerType]), castMethod)),
+            guardOn32Bit(ReturnStatement(MethodInvocation(
+                offsetExpression,
+                castMethod.name,
+                Arguments([], types: [pointerType]),
+                castMethod))),
             returnType: pointerType));
 
     // Sample output:
@@ -241,11 +267,11 @@
         field.name,
         ProcedureKind.Getter,
         FunctionNode(
-            ReturnStatement(MethodInvocation(
+            guardOn32Bit(ReturnStatement(MethodInvocation(
                 PropertyGet(ThisExpression(), pointerName, pointerGetter),
                 loadMethod.name,
                 Arguments([], types: [field.type]),
-                loadMethod)),
+                loadMethod))),
             returnType: field.type));
 
     // Sample output:
@@ -255,11 +281,11 @@
         field.name,
         ProcedureKind.Setter,
         FunctionNode(
-            ReturnStatement(MethodInvocation(
+            guardOn32Bit(ReturnStatement(MethodInvocation(
                 PropertyGet(ThisExpression(), pointerName, pointerGetter),
                 storeMethod.name,
                 Arguments([VariableGet(argument)]),
-                storeMethod)),
+                storeMethod))),
             returnType: VoidType(),
             positionalParameters: [argument]));
 
@@ -281,7 +307,8 @@
     }
 
     // replace in place to avoid going over use sites
-    sizeOf.function = FunctionNode(ReturnStatement(IntLiteral(size)),
+    sizeOf.function = FunctionNode(
+        guardOn32Bit(ReturnStatement(IntLiteral(size))),
         returnType: InterfaceType(intClass));
     sizeOf.isExternal = false;
   }
@@ -333,6 +360,8 @@
   }
 
   bool _hasAnnotation(Class node) {
+    // Pre constant 2018 update.
+    // TODO(dacoharkes): Remove pre constant 2018 after constants change landed.
     for (Expression e in node.annotations) {
       if (e is StaticGet) {
         if (e.target == structField) {
@@ -340,7 +369,12 @@
         }
       }
     }
-    return false;
+    Iterable<Class> postConstant2018 = node.annotations
+        .whereType<ConstantExpression>()
+        .map((expr) => expr.constant)
+        .whereType<InstanceConstant>()
+        .map((constant) => constant.classNode);
+    return postConstant2018.contains(structClass);
   }
 
   void _preventTreeShaking(Class node) {
@@ -359,11 +393,20 @@
   }
 
   Iterable<NativeType> _getAnnotations(Field node) {
-    return node.annotations
+    Iterable<NativeType> preConstant2018 = node.annotations
         .whereType<ConstructorInvocation>()
         .map((expr) => expr.target.parent)
         .map((klass) => _getFieldType(klass))
         .where((type) => type != null);
+    Iterable<NativeType> postConstant2018 = node.annotations
+        .whereType<ConstantExpression>()
+        .map((expr) => expr.constant)
+        .whereType<InstanceConstant>()
+        .map((constant) => constant.classNode)
+        .map((klass) => _getFieldType(klass))
+        .where((type) => type != null);
+    // TODO(dacoharkes): Remove preConstant2018 after constants change landed.
+    return postConstant2018.followedBy(preConstant2018);
   }
 }
 
diff --git a/pkg/vm/lib/transformations/ffi_use_sites.dart b/pkg/vm/lib/transformations/ffi_use_sites.dart
index 8e9227c..4b40caf 100644
--- a/pkg/vm/lib/transformations/ffi_use_sites.dart
+++ b/pkg/vm/lib/transformations/ffi_use_sites.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 kernel.transformations.ffi_use_sites;
+library vm.transformations.ffi_use_sites;
 
 import 'package:front_end/src/api_unstable/vm.dart'
     show
@@ -11,10 +11,10 @@
         templateFfiTypeUnsized,
         templateFfiNotStatic;
 
-import 'package:kernel/class_hierarchy.dart' show ClassHierarchy;
-
 import 'package:kernel/ast.dart';
+import 'package:kernel/class_hierarchy.dart' show ClassHierarchy;
 import 'package:kernel/core_types.dart';
+import 'package:kernel/library_index.dart' show LibraryIndex;
 import 'package:kernel/target/targets.dart' show DiagnosticReporter;
 
 import 'ffi.dart'
@@ -27,14 +27,21 @@
 
 /// Checks and replaces calls to dart:ffi struct fields and methods.
 void transformLibraries(
+    Component component,
     CoreTypes coreTypes,
     ClassHierarchy hierarchy,
     List<Library> libraries,
     DiagnosticReporter diagnosticReporter,
     ReplacedMembers replacedFields) {
+  final index = new LibraryIndex(component, ["dart:ffi"]);
+  if (!index.containsLibrary("dart:ffi")) {
+    // if dart:ffi is not loaded, do not do the transformation
+    return;
+  }
   final transformer = new _FfiUseSiteTransformer(
-      hierarchy,
+      index,
       coreTypes,
+      hierarchy,
       diagnosticReporter,
       replacedFields.replacedGetters,
       replacedFields.replacedSetters);
@@ -46,13 +53,22 @@
   final Map<Field, Procedure> replacedGetters;
   final Map<Field, Procedure> replacedSetters;
 
+  bool isFfiLibrary;
+
   _FfiUseSiteTransformer(
-      ClassHierarchy hierarchy,
+      LibraryIndex index,
       CoreTypes coreTypes,
+      ClassHierarchy hierarchy,
       DiagnosticReporter diagnosticReporter,
       this.replacedGetters,
       this.replacedSetters)
-      : super(hierarchy, coreTypes, diagnosticReporter) {}
+      : super(index, coreTypes, hierarchy, diagnosticReporter) {}
+
+  @override
+  TreeNode visitLibrary(Library node) {
+    isFfiLibrary = node == ffiLibrary;
+    return super.visitLibrary(node);
+  }
 
   @override
   visitClass(Class node) {
@@ -124,7 +140,7 @@
         _ensureNativeTypeValid(nativeType, node);
         _ensureNativeTypeToDartType(nativeType, dartType, node);
       } else if (target == asFunctionMethod) {
-        if (node.enclosingLibrary == ffiLibrary) {
+        if (isFfiLibrary) {
           // Library code of dart:ffi uses asFunction to implement
           // lookupFunction. Since we treat lookupFunction as well, this call
           // can be generic and still support AOT.
diff --git a/pkg/vm/lib/transformations/obfuscation_prohibitions_annotator.dart b/pkg/vm/lib/transformations/obfuscation_prohibitions_annotator.dart
index 8ff744d..b059fd3 100644
--- a/pkg/vm/lib/transformations/obfuscation_prohibitions_annotator.dart
+++ b/pkg/vm/lib/transformations/obfuscation_prohibitions_annotator.dart
@@ -50,6 +50,11 @@
   }
 
   @override
+  visitConstructor(Constructor ctor) {
+    _addIfEntryPoint(ctor.annotations, ctor.name.name, ctor);
+  }
+
+  @override
   visitProcedure(Procedure proc) {
     _addIfEntryPoint(proc.annotations, proc.name.name, proc);
   }
diff --git a/pkg/vm/lib/transformations/pragma.dart b/pkg/vm/lib/transformations/pragma.dart
index 0ab0b88..0fa7432 100644
--- a/pkg/vm/lib/transformations/pragma.dart
+++ b/pkg/vm/lib/transformations/pragma.dart
@@ -13,7 +13,7 @@
 
 abstract class ParsedPragma {}
 
-enum PragmaEntryPointType { Always, GetterOnly, SetterOnly }
+enum PragmaEntryPointType { Default, GetterOnly, SetterOnly, CallOnly }
 
 class ParsedEntryPointPragma extends ParsedPragma {
   final PragmaEntryPointType type;
@@ -50,10 +50,14 @@
     if (annotation is ConstantExpression) {
       Constant constant = annotation.constant;
       if (constant is InstanceConstant) {
-        if (constant.classReference.node == coreTypes.pragmaClass) {
+        if (constant.classNode == coreTypes.pragmaClass) {
           pragmaConstant = constant;
         }
+      } else if (constant is UnevaluatedConstant) {
+        throw 'Error: unevaluated constant $constant';
       }
+    } else {
+      throw 'Error: non-constant annotation $annotation';
     }
     if (pragmaConstant == null) return null;
 
@@ -73,17 +77,20 @@
       case kEntryPointPragmaName:
         PragmaEntryPointType type;
         if (options is NullConstant) {
-          type = PragmaEntryPointType.Always;
+          type = PragmaEntryPointType.Default;
         } else if (options is BoolConstant && options.value == true) {
-          type = PragmaEntryPointType.Always;
+          type = PragmaEntryPointType.Default;
         } else if (options is StringConstant) {
           if (options.value == "get") {
             type = PragmaEntryPointType.GetterOnly;
           } else if (options.value == "set") {
             type = PragmaEntryPointType.SetterOnly;
+          } else if (options.value == "call") {
+            type = PragmaEntryPointType.CallOnly;
           } else {
             throw "Error: string directive to @pragma('$kEntryPointPragmaName', ...) "
-                "must be either 'get' or 'set'.";
+                "must be either 'get' or 'set' for fields "
+                "or 'get' or 'call' for procedures.";
           }
         }
         return type != null ? new ParsedEntryPointPragma(type) : null;
diff --git a/pkg/vm/lib/transformations/protobuf_aware_treeshaker/transformer.dart b/pkg/vm/lib/transformations/protobuf_aware_treeshaker/transformer.dart
new file mode 100644
index 0000000..1aa352e
--- /dev/null
+++ b/pkg/vm/lib/transformations/protobuf_aware_treeshaker/transformer.dart
@@ -0,0 +1,272 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:front_end/src/api_prototype/constant_evaluator.dart'
+    as constants;
+import 'package:kernel/kernel.dart';
+import 'package:kernel/target/targets.dart';
+import 'package:kernel/core_types.dart';
+import 'package:kernel/vm/constants_native_effects.dart' as vm_constants;
+import 'package:meta/meta.dart';
+import 'package:vm/transformations/type_flow/transformer.dart' as globalTypeFlow
+    show transformComponent;
+import 'package:vm/transformations/no_dynamic_invocations_annotator.dart'
+    show Selector;
+
+class TransformationInfo {
+  final List<String> removedMessageFields = <String>[];
+  final List<Class> removedMessageClasses = <Class>[];
+}
+
+TransformationInfo transformComponent(
+    Component component, Map<String, String> environment, Target target,
+    {@required bool collectInfo, @required bool enableAsserts}) {
+  final coreTypes = new CoreTypes(component);
+  component.computeCanonicalNames();
+
+  // Evaluate constants to ensure @pragma("vm:entry-point") is seen by the
+  // type-flow analysis.
+  final vmConstants = new vm_constants.VmConstantsBackend(coreTypes);
+  constants.transformComponent(component, vmConstants, environment, null,
+      keepFields: true,
+      evaluateAnnotations: true,
+      enableAsserts: enableAsserts,
+      desugarSets: !target.supportsSetLiterals);
+
+  TransformationInfo info = collectInfo ? TransformationInfo() : null;
+
+  _treeshakeProtos(target, component, coreTypes, info);
+  return info;
+}
+
+void _treeshakeProtos(Target target, Component component, CoreTypes coreTypes,
+    TransformationInfo info) {
+  globalTypeFlow.transformComponent(target, coreTypes, component);
+  final collector = removeUnusedProtoReferences(component, coreTypes, info);
+  if (collector == null) {
+    return;
+  }
+  globalTypeFlow.transformComponent(target, coreTypes, component);
+  if (info != null) {
+    for (Class gmSubclass in collector.gmSubclasses) {
+      if (!gmSubclass.enclosingLibrary.classes.contains(gmSubclass)) {
+        info.removedMessageClasses.add(gmSubclass);
+      }
+    }
+  }
+  // Remove metadata added by the typeflow analysis.
+  component.metadata.clear();
+}
+
+InfoCollector removeUnusedProtoReferences(
+    Component component, CoreTypes coreTypes, TransformationInfo info) {
+  final protobufUri = Uri.parse('package:protobuf/protobuf.dart');
+  final protobufLibs =
+      component.libraries.where((lib) => lib.importUri == protobufUri);
+  if (protobufLibs.isEmpty) {
+    return null;
+  }
+  final protobufLib = protobufLibs.single;
+
+  final gmClass = protobufLib.classes
+      .where((klass) => klass.name == 'GeneratedMessage')
+      .single;
+  final collector = InfoCollector(gmClass);
+
+  final biClass =
+      protobufLib.classes.where((klass) => klass.name == 'BuilderInfo').single;
+  final addMethod =
+      biClass.members.singleWhere((Member member) => member.name.name == 'add');
+
+  component.accept(collector);
+
+  _UnusedFieldMetadataPruner(
+          biClass, addMethod, collector.dynamicSelectors, coreTypes, info)
+      .removeMetadataForUnusedFields(
+    collector.gmSubclasses,
+    collector.gmSubclassesInvokedMethods,
+    coreTypes,
+    info,
+  );
+
+  return collector;
+}
+
+/// For protobuf fields which are not accessed, prune away its metadata.
+class _UnusedFieldMetadataPruner extends TreeVisitor<void> {
+  // All of those methods have the dart field name as second positional
+  // parameter.
+  // Method names are defined in:
+  // https://github.com/dart-lang/protobuf/blob/master/protobuf/lib/src/protobuf/builder_info.dart
+  // The code is generated by:
+  // https://github.com/dart-lang/protobuf/blob/master/protoc_plugin/lib/protobuf_field.dart.
+  static final fieldAddingMethods = Set<String>.from(const <String>[
+    'a',
+    'm',
+    'pp',
+    'pc',
+    'e',
+    'pc',
+    'aOS',
+    'aOB',
+  ]);
+
+  final Class builderInfoClass;
+  Class visitedClass;
+  final names = Set<String>();
+
+  final dynamicNames = Set<String>();
+  final CoreTypes coreTypes;
+  final TransformationInfo info;
+  final Member addMethod;
+
+  _UnusedFieldMetadataPruner(this.builderInfoClass, this.addMethod,
+      Set<Selector> dynamicSelectors, this.coreTypes, this.info) {
+    dynamicNames.addAll(dynamicSelectors.map((sel) => sel.target.name));
+  }
+
+  /// If a proto message field is never accessed (neither read nor written to),
+  /// remove its corresponding metadata in the construction of the Message._i
+  /// field (i.e. the BuilderInfo metadata).
+  void removeMetadataForUnusedFields(
+      Set<Class> gmSubclasses,
+      Map<Class, Set<Selector>> invokedMethods,
+      CoreTypes coreTypes,
+      TransformationInfo info) {
+    for (final klass in gmSubclasses) {
+      final selectors = invokedMethods[klass] ?? Set<Selector>();
+      final builderInfoFields = klass.fields.where((f) => f.name.name == '_i');
+      if (builderInfoFields.isEmpty) {
+        continue;
+      }
+      final builderInfoField = builderInfoFields.single;
+      _pruneBuilderInfoField(builderInfoField, selectors, klass);
+    }
+  }
+
+  void _pruneBuilderInfoField(
+      Field field, Set<Selector> selectors, Class gmSubclass) {
+    names.clear();
+    names.addAll(selectors.map((sel) => sel.target.name));
+    visitedClass = gmSubclass;
+    field.initializer.accept(this);
+  }
+
+  @override
+  visitLet(Let node) {
+    final initializer = node.variable.initializer;
+    if (initializer is MethodInvocation &&
+        initializer.interfaceTarget?.enclosingClass == builderInfoClass &&
+        fieldAddingMethods.contains(initializer.name.name)) {
+      final fieldName =
+          (initializer.arguments.positional[1] as StringLiteral).value;
+      final ucase = fieldName[0].toUpperCase() + fieldName.substring(1);
+      // The name of the related `clear` method.
+      final clearName = 'clear${ucase}';
+      // The name of the related `has` method.
+      final hasName = 'has${ucase}';
+
+      bool nameIsUsed(String name) =>
+          dynamicNames.contains(name) || names.contains(name);
+
+      if (!(nameIsUsed(fieldName) ||
+          nameIsUsed(clearName) ||
+          nameIsUsed(hasName))) {
+        if (info != null) {
+          info.removedMessageFields.add("${visitedClass.name}.$fieldName");
+        }
+
+        // Replace the field metadata method with a dummy call to
+        // `BuilderInfo.add`. This is to preserve the index calculations when
+        // removing a field.
+        // Change the tag-number to 0. Otherwise the decoder will get confused.
+        initializer.interfaceTarget = addMethod;
+        initializer.name = addMethod.name;
+        initializer.arguments.replaceWith(
+          Arguments(
+            <Expression>[
+              IntLiteral(0), // tagNumber
+              NullLiteral(), // name
+              NullLiteral(), // fieldType
+              NullLiteral(), // defaultOrMaker
+              NullLiteral(), // subBuilder
+              NullLiteral(), // valueOf
+              NullLiteral(), // enumValues
+            ],
+            types: <DartType>[InterfaceType(coreTypes.nullClass)],
+          ),
+        );
+      }
+    }
+    node.body.accept(this);
+  }
+}
+
+/// Finds all subclasses of [GeneratedMessage] and all methods invoked on them
+/// (potentially in a dynamic call).
+class InfoCollector extends RecursiveVisitor<void> {
+  final dynamicSelectors = Set<Selector>();
+  final Class generatedMessageClass;
+  final gmSubclasses = Set<Class>();
+  final gmSubclassesInvokedMethods = Map<Class, Set<Selector>>();
+
+  InfoCollector(this.generatedMessageClass);
+
+  @override
+  visitClass(Class klass) {
+    if (isGeneratedMethodSubclass(klass)) {
+      gmSubclasses.add(klass);
+    }
+    return super.visitClass(klass);
+  }
+
+  @override
+  visitMethodInvocation(MethodInvocation node) {
+    if (node.interfaceTarget == null) {
+      dynamicSelectors.add(Selector.doInvoke(node.name));
+    }
+
+    final targetClass = node.interfaceTarget?.enclosingClass;
+    if (isGeneratedMethodSubclass(targetClass)) {
+      addInvokedMethod(targetClass, Selector.doInvoke(node.name));
+    }
+    super.visitMethodInvocation(node);
+  }
+
+  @override
+  visitPropertyGet(PropertyGet node) {
+    if (node.interfaceTarget == null) {
+      dynamicSelectors.add(Selector.doGet(node.name));
+    }
+
+    final targetClass = node.interfaceTarget?.enclosingClass;
+    if (isGeneratedMethodSubclass(targetClass)) {
+      addInvokedMethod(targetClass, Selector.doGet(node.name));
+    }
+    super.visitPropertyGet(node);
+  }
+
+  @override
+  visitPropertySet(PropertySet node) {
+    if (node.interfaceTarget == null) {
+      dynamicSelectors.add(Selector.doSet(node.name));
+    }
+
+    final targetClass = node.interfaceTarget?.enclosingClass;
+    if (isGeneratedMethodSubclass(targetClass)) {
+      addInvokedMethod(targetClass, Selector.doSet(node.name));
+    }
+    super.visitPropertySet(node);
+  }
+
+  bool isGeneratedMethodSubclass(Class klass) {
+    return klass?.superclass == generatedMessageClass;
+  }
+
+  void addInvokedMethod(Class klass, Selector selector) {
+    final selectors =
+        gmSubclassesInvokedMethods.putIfAbsent(klass, () => Set<Selector>());
+    selectors.add(selector);
+  }
+}
diff --git a/pkg/vm/lib/transformations/type_flow/native_code.dart b/pkg/vm/lib/transformations/type_flow/native_code.dart
index 291237b..26f3c47 100644
--- a/pkg/vm/lib/transformations/type_flow/native_code.dart
+++ b/pkg/vm/lib/transformations/type_flow/native_code.dart
@@ -58,7 +58,7 @@
     if (!klass.isAbstract) {
       var type = _annotationsDefineRoot(klass.annotations);
       if (type != null) {
-        if (type != PragmaEntryPointType.Always) {
+        if (type != PragmaEntryPointType.Default) {
           throw "Error: pragma entry-point definition on a class must evaluate "
               "to null, true or false. See entry_points_pragma.md.";
         }
@@ -73,17 +73,39 @@
   visitProcedure(Procedure proc) {
     var type = _annotationsDefineRoot(proc.annotations);
     if (type != null) {
-      if (type != PragmaEntryPointType.Always) {
-        throw "Error: pragma entry-point definition on a procedure (including"
-            "getters and setters) must evaluate to null, true or false. "
-            "See entry_points_pragma.md.";
+      void addSelector(CallKind ck) {
+        entryPoints.addRawCall(proc.isInstanceMember
+            ? new InterfaceSelector(proc, callKind: ck)
+            : new DirectSelector(proc, callKind: ck));
       }
-      var callKind = proc.isGetter
+
+      final defaultCallKind = proc.isGetter
           ? CallKind.PropertyGet
           : (proc.isSetter ? CallKind.PropertySet : CallKind.Method);
-      entryPoints.addRawCall(proc.isInstanceMember
-          ? new InterfaceSelector(proc, callKind: callKind)
-          : new DirectSelector(proc, callKind: callKind));
+
+      switch (type) {
+        case PragmaEntryPointType.CallOnly:
+          addSelector(defaultCallKind);
+          break;
+        case PragmaEntryPointType.SetterOnly:
+          if (!proc.isSetter) {
+            throw "Error: cannot generate a setter for a method or getter ($proc).";
+          }
+          addSelector(CallKind.PropertySet);
+          break;
+        case PragmaEntryPointType.GetterOnly:
+          if (proc.isSetter) {
+            throw "Error: cannot closurize a setter ($proc).";
+          }
+          addSelector(CallKind.PropertyGet);
+          break;
+        case PragmaEntryPointType.Default:
+          addSelector(defaultCallKind);
+          if (!proc.isSetter && !proc.isGetter) {
+            addSelector(CallKind.PropertyGet);
+          }
+      }
+
       nativeCodeOracle.setMemberReferencedFromNativeCode(proc);
     }
   }
@@ -92,9 +114,10 @@
   visitConstructor(Constructor ctor) {
     var type = _annotationsDefineRoot(ctor.annotations);
     if (type != null) {
-      if (type != PragmaEntryPointType.Always) {
-        throw "Error: pragma entry-point definition on a constructor must "
-            "evaluate to null, true or false. See entry_points_pragma.md.";
+      if (type != PragmaEntryPointType.Default &&
+          type != PragmaEntryPointType.CallOnly) {
+        throw "Error: pragma entry-point definition on a constructor ($ctor) must"
+            "evaluate to null, true, false or 'call'. See entry_points_pragma.md.";
       }
       entryPoints
           .addRawCall(new DirectSelector(ctor, callKind: CallKind.Method));
@@ -125,12 +148,15 @@
         }
         addSelector(CallKind.PropertySet);
         break;
-      case PragmaEntryPointType.Always:
+      case PragmaEntryPointType.Default:
         addSelector(CallKind.PropertyGet);
         if (!field.isFinal) {
           addSelector(CallKind.PropertySet);
         }
         break;
+      case PragmaEntryPointType.CallOnly:
+        throw "Error: can't generate invocation dispatcher for field $field"
+            "through @pragma('vm:entry-point')";
     }
 
     nativeCodeOracle.setMemberReferencedFromNativeCode(field);
diff --git a/pkg/vm/lib/transformations/type_flow/summary_collector.dart b/pkg/vm/lib/transformations/type_flow/summary_collector.dart
index f4e50e7..23f8d8b 100644
--- a/pkg/vm/lib/transformations/type_flow/summary_collector.dart
+++ b/pkg/vm/lib/transformations/type_flow/summary_collector.dart
@@ -870,6 +870,12 @@
   }
 
   @override
+  TypeExpr visitBlockExpression(BlockExpression node) {
+    _visit(node.body);
+    return _visit(node.value);
+  }
+
+  @override
   TypeExpr visitListLiteral(ListLiteral node) {
     node.expressions.forEach(_visit);
     Class concreteClass =
diff --git a/pkg/vm/lib/transformations/type_flow/transformer.dart b/pkg/vm/lib/transformations/type_flow/transformer.dart
index c0b92a0..b0fb04b 100644
--- a/pkg/vm/lib/transformations/type_flow/transformer.dart
+++ b/pkg/vm/lib/transformations/type_flow/transformer.dart
@@ -60,8 +60,13 @@
       matcher: matcher);
 
   Procedure main = component.mainMethod;
-  final Selector mainSelector = new DirectSelector(main);
-  typeFlowAnalysis.addRawCall(mainSelector);
+
+  // `main` can be null, roots can also come from @pragma("vm:entry-point").
+  if (main != null) {
+    final Selector mainSelector = new DirectSelector(main);
+    typeFlowAnalysis.addRawCall(mainSelector);
+  }
+
   typeFlowAnalysis.process();
 
   analysisStopWatch.stop();
diff --git a/pkg/vm/lib/transformations/type_flow/types.dart b/pkg/vm/lib/transformations/type_flow/types.dart
index 9904fa7..9c52e34 100644
--- a/pkg/vm/lib/transformations/type_flow/types.dart
+++ b/pkg/vm/lib/transformations/type_flow/types.dart
@@ -118,6 +118,17 @@
       return new Type.nullableAny();
     } else if (dartType == const BottomType()) {
       return new Type.nullable(new Type.empty());
+    } else if (
+        // Recognize Null type and use a more precise representation which
+        // doesn't need type specialization.
+        // TODO(alexmarkov): figure out where exactly approximation happens if
+        // Null is represented as Nullable(Cone(Null)) instead of
+        // Nullable(Empty).
+        dartType is InterfaceType &&
+            dartType.classNode.name == 'Null' &&
+            dartType.classNode.enclosingLibrary.importUri.scheme == 'dart' &&
+            dartType.classNode.enclosingLibrary.importUri.path == 'core') {
+      return new Type.nullable(new Type.empty());
     }
     return new Type.nullable(new ConeType(dartType));
   }
diff --git a/pkg/vm/test/bytecode/gen_bytecode_test.dart b/pkg/vm/test/bytecode/gen_bytecode_test.dart
index f821480..887a8a0 100644
--- a/pkg/vm/test/bytecode/gen_bytecode_test.dart
+++ b/pkg/vm/test/bytecode/gen_bytecode_test.dart
@@ -28,13 +28,17 @@
       fail("Compilation error: ${message.plainTextFormatted.join('\n')}");
     };
 
+  final mainLibrary = component.mainMethod.enclosingLibrary;
+
   await runWithFrontEndCompilerContext(source, options, component, () {
     // Need to omit source positions from bytecode as they are different on
     // Linux and Windows (due to differences in newline characters).
-    generateBytecode(component, omitAssertSourcePositions: true);
+    generateBytecode(component,
+        omitAssertSourcePositions: true, libraries: [mainLibrary]);
   });
 
-  String actual = kernelLibraryToString(component.mainMethod.enclosingLibrary);
+  component.libraries.removeWhere((lib) => lib != mainLibrary);
+  String actual = kernelComponentToString(component);
 
   // Remove absolute library URIs.
   actual = actual.replaceAll(new Uri.file(pkgVmDir).toString(), '#pkg/vm');
diff --git a/pkg/vm/test/common_test_utils.dart b/pkg/vm/test/common_test_utils.dart
index 9669536..9a496a8 100644
--- a/pkg/vm/test/common_test_utils.dart
+++ b/pkg/vm/test/common_test_utils.dart
@@ -19,7 +19,11 @@
 
 import 'package:vm/target/vm.dart' show VmTarget;
 
-const bool kDumpActualResult = const bool.fromEnvironment('dump.actual.result');
+/// Environment define to update expectation files on failures.
+const kUpdateExpectations = 'updateExpectations';
+
+/// Environment define to dump actual results alongside expectations.
+const kDumpActualResult = 'dump.actual.result';
 
 class TestingVmTarget extends VmTarget {
   TestingVmTarget(TargetFlags flags) : super(flags);
@@ -37,6 +41,7 @@
   final options = new CompilerOptions()
     ..target = target
     ..linkedDependencies = <Uri>[platformKernel]
+    ..environmentDefines = <String, String>{}
     ..onDiagnostic = (DiagnosticMessage message) {
       fail("Compilation error: ${message.plainTextFormatted.join('\n')}");
     };
@@ -59,6 +64,16 @@
       .replaceAll(library.importUri.toString(), library.name);
 }
 
+String kernelComponentToString(Component component) {
+  final StringBuffer buffer = new StringBuffer();
+  new Printer(buffer, showExternal: false, showMetadata: true)
+      .writeComponentFile(component);
+  final mainLibrary = component.mainMethod.enclosingLibrary;
+  return buffer
+      .toString()
+      .replaceAll(mainLibrary.importUri.toString(), mainLibrary.name);
+}
+
 class DevNullSink<T> extends Sink<T> {
   @override
   void add(T data) {}
@@ -71,14 +86,62 @@
   new BinaryPrinter(new DevNullSink<List<int>>()).writeComponentFile(component);
 }
 
+class Difference {
+  final int line;
+  final String actual;
+  final String expected;
+
+  Difference(this.line, this.actual, this.expected);
+}
+
+Difference findFirstDifference(String actual, String expected) {
+  final actualLines = actual.split('\n');
+  final expectedLines = expected.split('\n');
+  int i = 0;
+  for (; i < actualLines.length && i < expectedLines.length; ++i) {
+    if (actualLines[i] != expectedLines[i]) {
+      return new Difference(i + 1, actualLines[i], expectedLines[i]);
+    }
+  }
+  return new Difference(
+      i + 1,
+      i < actualLines.length ? actualLines[i] : '<END>',
+      i < expectedLines.length ? expectedLines[i] : '<END>');
+}
+
 void compareResultWithExpectationsFile(Uri source, String actual) {
   final expectFile = new File(source.toFilePath() + '.expect');
   final expected = expectFile.existsSync() ? expectFile.readAsStringSync() : '';
 
   if (actual != expected) {
-    if (kDumpActualResult) {
-      new File(source.toFilePath() + '.actual').writeAsStringSync(actual);
+    if (bool.fromEnvironment(kUpdateExpectations)) {
+      expectFile.writeAsStringSync(actual);
+      print("  Updated $expectFile");
+    } else {
+      if (bool.fromEnvironment(kDumpActualResult)) {
+        new File(source.toFilePath() + '.actual').writeAsStringSync(actual);
+      }
+      Difference diff = findFirstDifference(actual, expected);
+      fail("""
+
+Result is different for the test case $source
+
+The first difference is at line ${diff.line}.
+Actual:   ${diff.actual}
+Expected: ${diff.expected}
+
+This failure can be caused by changes in the front-end if it starts generating
+different kernel AST for the same Dart programs.
+
+In order to re-generate expectations run tests with -D$kUpdateExpectations=true VM option:
+
+  tools/test.py -m release --vm-options -D$kUpdateExpectations=true pkg/vm
+
+In order to dump actual results into .actual files run tests with -D$kDumpActualResult=true VM option:
+
+  tools/test.py -m release --vm-options -D$kDumpActualResult=true pkg/vm
+
+""");
     }
-    expect(actual, equals(expected), reason: "Test case: $source");
   }
 }
diff --git a/pkg/vm/test/frontend_server_flutter.dart b/pkg/vm/test/frontend_server_flutter.dart
new file mode 100644
index 0000000..be1ee67
--- /dev/null
+++ b/pkg/vm/test/frontend_server_flutter.dart
@@ -0,0 +1,251 @@
+import 'dart:async' show StreamController;
+import 'dart:convert' show utf8, LineSplitter;
+import 'dart:io' show Directory, File, FileSystemEntity, IOSink, stdout;
+
+import 'package:kernel/ast.dart' show Component;
+import 'package:kernel/kernel.dart' show loadComponentFromBytes;
+import 'package:kernel/verifier.dart' show verifyComponent;
+
+import '../lib/frontend_server.dart';
+
+main(List<String> args) async {
+  String flutterDir;
+  String flutterPlatformDir;
+  for (String arg in args) {
+    if (arg.startsWith("--flutterDir=")) {
+      flutterDir = arg.substring(13);
+    } else if (arg.startsWith("--flutterPlatformDir=")) {
+      flutterPlatformDir = arg.substring(21);
+    }
+  }
+  if (flutterDir == null || !(new Directory(flutterDir).existsSync())) {
+    throw "Didn't get a valid flutter directory to work with.";
+  }
+  Directory flutterDirectory = new Directory(flutterDir);
+  List<FileSystemEntity> allFlutterFiles =
+      flutterDirectory.listSync(recursive: true, followLinks: false);
+  Directory flutterPlatformDirectory;
+  if (flutterPlatformDir == null) {
+    List<File> platformFiles = new List<File>.from(allFlutterFiles.where((f) =>
+        f.uri
+            .toString()
+            .endsWith("/flutter_patched_sdk/platform_strong.dill")));
+    if (platformFiles.length < 1) {
+      throw "Expected to find a flutter platform file but didn't.";
+    }
+    flutterPlatformDirectory = platformFiles.first.parent;
+  } else {
+    flutterPlatformDirectory = Directory(flutterPlatformDir);
+  }
+  if (!flutterPlatformDirectory.existsSync()) {
+    throw "$flutterPlatformDirectory doesn't exist.";
+  }
+  if (!new File.fromUri(
+          flutterPlatformDirectory.uri.resolve("platform_strong.dill"))
+      .existsSync()) {
+    throw "$flutterPlatformDirectory doesn't contain a "
+        "platform_strong.dill file.";
+  }
+  print("Using $flutterPlatformDirectory as platform directory.");
+  List<File> dotPackagesFiles = new List<File>.from(allFlutterFiles.where((f) =>
+      (f.uri.toString().contains("/examples/") ||
+          f.uri.toString().contains("/packages/")) &&
+      f.uri.toString().endsWith("/.packages")));
+
+  for (File dotPackage in dotPackagesFiles) {
+    Directory tempDir;
+    Directory systemTempDir = Directory.systemTemp;
+    tempDir = systemTempDir.createTempSync('foo bar');
+    try {
+      Directory testDir =
+          new Directory.fromUri(dotPackage.parent.uri.resolve("test/"));
+      if (!testDir.existsSync()) continue;
+      print("Go for $testDir");
+      await attemptStuff(
+          tempDir, flutterPlatformDirectory, dotPackage, testDir);
+    } finally {
+      tempDir.delete(recursive: true);
+    }
+  }
+}
+
+void attemptStuff(Directory tempDir, Directory flutterPlatformDirectory,
+    File dotPackage, Directory testDir) async {
+  File dillFile = new File('${tempDir.path}/dill.dill');
+  if (dillFile.existsSync()) {
+    throw "$dillFile already exists.";
+  }
+  List<int> platformData = new File.fromUri(
+          flutterPlatformDirectory.uri.resolve("platform_strong.dill"))
+      .readAsBytesSync();
+  final List<String> args = <String>[
+    '--sdk-root',
+    flutterPlatformDirectory.path,
+    '--incremental',
+    '--strong',
+    '--target=flutter',
+    '--packages',
+    dotPackage.path,
+    '--output-dill=${dillFile.path}',
+    // '--unsafe-package-serialization',
+  ];
+
+  List<File> testFiles = new List<File>.from(testDir
+      .listSync(recursive: true)
+      .where((f) => f.path.endsWith("_test.dart")));
+  if (testFiles.isEmpty) return;
+
+  Stopwatch stopwatch = new Stopwatch()..start();
+
+  final StreamController<List<int>> inputStreamController =
+      new StreamController<List<int>>();
+  final StreamController<List<int>> stdoutStreamController =
+      new StreamController<List<int>>();
+  final IOSink ioSink = new IOSink(stdoutStreamController.sink);
+  StreamController<Result> receivedResults = new StreamController<Result>();
+
+  final outputParser = new OutputParser(receivedResults);
+  stdoutStreamController.stream
+      .transform(utf8.decoder)
+      .transform(const LineSplitter())
+      .listen(outputParser.listener);
+
+  Iterator<File> testFileIterator = testFiles.iterator;
+  testFileIterator.moveNext();
+
+  final Future<int> result =
+      starter(args, input: inputStreamController.stream, output: ioSink);
+  String shortTestPath =
+      testFileIterator.current.path.substring(testDir.path.length);
+  stdout.write("    => $shortTestPath");
+  Stopwatch stopwatch2 = new Stopwatch()..start();
+  inputStreamController
+      .add('compile ${testFileIterator.current.path}\n'.codeUnits);
+  int compilations = 0;
+  receivedResults.stream.listen((Result compiledResult) {
+    stdout.write(" --- done in ${stopwatch2.elapsedMilliseconds} ms\n");
+    stopwatch2.reset();
+    compiledResult.expectNoErrors();
+
+    List<int> resultBytes = dillFile.readAsBytesSync();
+    Component component = loadComponentFromBytes(platformData);
+    component = loadComponentFromBytes(resultBytes, component);
+    verifyComponent(component);
+    print("        => verified in ${stopwatch2.elapsedMilliseconds} ms.");
+    stopwatch2.reset();
+
+    inputStreamController.add('accept\n'.codeUnits);
+    inputStreamController.add('reset\n'.codeUnits);
+    compilations++;
+
+    if (!testFileIterator.moveNext()) {
+      inputStreamController.add('quit\n'.codeUnits);
+      return;
+    }
+    String shortTestPath =
+        testFileIterator.current.path.substring(testDir.path.length);
+    stdout.write("    => $shortTestPath");
+    inputStreamController.add('recompile ${testFileIterator.current.path} abc\n'
+            '${testFileIterator.current.uri}\n'
+            'abc\n'
+        .codeUnits);
+  });
+
+  int resultDone = await result;
+  if (resultDone != 0) {
+    throw "Got $resultDone, expected 0";
+  }
+
+  inputStreamController.close();
+
+  print("Did $compilations compilations and verifications in "
+      "${stopwatch.elapsedMilliseconds} ms.");
+}
+
+// The below is copied from incremental_compiler_test.dart,
+// but with expect stuff replaced with ifs and throws
+// (expect can only be used in tests via the test framework).
+
+class OutputParser {
+  OutputParser(this._receivedResults);
+  bool expectSources = true;
+
+  StreamController<Result> _receivedResults;
+  List<String> _receivedSources;
+
+  String _boundaryKey;
+  bool _readingSources;
+
+  void listener(String s) {
+    if (_boundaryKey == null) {
+      const String RESULT_OUTPUT_SPACE = 'result ';
+      if (s.startsWith(RESULT_OUTPUT_SPACE)) {
+        _boundaryKey = s.substring(RESULT_OUTPUT_SPACE.length);
+      }
+      _readingSources = false;
+      _receivedSources?.clear();
+      return;
+    }
+
+    if (s.startsWith(_boundaryKey)) {
+      // First boundaryKey separates compiler output from list of sources
+      // (if we expect list of sources, which is indicated by receivedSources
+      // being not null)
+      if (expectSources && !_readingSources) {
+        _readingSources = true;
+        return;
+      }
+      // Second boundaryKey indicates end of frontend server response
+      expectSources = true;
+      _receivedResults.add(new Result(
+          s.length > _boundaryKey.length
+              ? s.substring(_boundaryKey.length + 1)
+              : null,
+          _receivedSources));
+      _boundaryKey = null;
+    } else {
+      if (_readingSources) {
+        if (_receivedSources == null) {
+          _receivedSources = <String>[];
+        }
+        _receivedSources.add(s);
+      }
+    }
+  }
+}
+
+class Result {
+  String status;
+  List<String> sources;
+
+  Result(this.status, this.sources);
+
+  void expectNoErrors({String filename}) {
+    CompilationResult result = new CompilationResult.parse(status);
+    if (result.errorsCount != 0) {
+      throw "Got ${result.errorsCount} errors. Expected 0.";
+    }
+    if (filename != null) {
+      if (result.filename != filename) {
+        throw "Got ${result.filename} errors. Expected $filename.";
+      }
+    }
+  }
+}
+
+class CompilationResult {
+  String filename;
+  int errorsCount;
+
+  CompilationResult.parse(String filenameAndErrorCount) {
+    if (filenameAndErrorCount == null) {
+      return;
+    }
+    int delim = filenameAndErrorCount.lastIndexOf(' ');
+    if (delim <= 0) {
+      throw "Expected $delim > 0...";
+    }
+    filename = filenameAndErrorCount.substring(0, delim);
+    errorsCount = int.parse(filenameAndErrorCount.substring(delim + 1).trim());
+  }
+}
diff --git a/pkg/vm/test/frontend_server_test.dart b/pkg/vm/test/frontend_server_test.dart
index 4a4a7d8..5310517 100644
--- a/pkg/vm/test/frontend_server_test.dart
+++ b/pkg/vm/test/frontend_server_test.dart
@@ -179,7 +179,7 @@
           new StreamController<List<int>>();
       final ReceivePort recompileCalled = new ReceivePort();
 
-      when(compiler.recompileDelta(filename: null))
+      when(compiler.recompileDelta(entryPoint: null))
           .thenAnswer((Invocation invocation) {
         recompileCalled.sendPort.send(true);
       });
@@ -195,7 +195,7 @@
       verifyInOrder(<void>[
         compiler.invalidate(Uri.base.resolve('file1.dart')),
         compiler.invalidate(Uri.base.resolve('file2.dart')),
-        await compiler.recompileDelta(filename: null),
+        await compiler.recompileDelta(entryPoint: null),
       ]);
       inputStreamController.add('quit\n'.codeUnits);
       expect(await result, 0);
@@ -207,7 +207,7 @@
           new StreamController<List<int>>();
       final ReceivePort recompileCalled = new ReceivePort();
 
-      when(compiler.recompileDelta(filename: 'file2.dart'))
+      when(compiler.recompileDelta(entryPoint: 'file2.dart'))
           .thenAnswer((Invocation invocation) {
         recompileCalled.sendPort.send(true);
       });
@@ -223,7 +223,7 @@
       verifyInOrder(<void>[
         compiler.invalidate(Uri.base.resolve('file1.dart')),
         compiler.invalidate(Uri.base.resolve('file2.dart')),
-        await compiler.recompileDelta(filename: 'file2.dart'),
+        await compiler.recompileDelta(entryPoint: 'file2.dart'),
       ]);
       inputStreamController.add('quit\n'.codeUnits);
       expect(await result, 0);
@@ -274,7 +274,7 @@
           new StreamController<List<int>>();
       final ReceivePort recompileCalled = new ReceivePort();
 
-      when(compiler.recompileDelta(filename: null))
+      when(compiler.recompileDelta(entryPoint: null))
           .thenAnswer((Invocation invocation) {
         recompileCalled.sendPort.send(true);
       });
@@ -295,7 +295,7 @@
         compiler.acceptLastDelta(),
         compiler.invalidate(Uri.base.resolve('file2.dart')),
         compiler.invalidate(Uri.base.resolve('file3.dart')),
-        await compiler.recompileDelta(filename: null),
+        await compiler.recompileDelta(entryPoint: null),
       ]);
       inputStreamController.add('quit\n'.codeUnits);
       expect(await result, 0);
@@ -426,41 +426,25 @@
       final StreamController<List<int>> stdoutStreamController =
           new StreamController<List<int>>();
       final IOSink ioSink = new IOSink(stdoutStreamController.sink);
-      StreamController<String> receivedResults = new StreamController<String>();
-
-      String boundaryKey;
+      StreamController<Result> receivedResults = new StreamController<Result>();
+      final outputParser = new OutputParser(receivedResults);
       stdoutStreamController.stream
           .transform(utf8.decoder)
           .transform(const LineSplitter())
-          .listen((String s) {
-        const String RESULT_OUTPUT_SPACE = 'result ';
-        if (boundaryKey == null) {
-          if (s.startsWith(RESULT_OUTPUT_SPACE)) {
-            boundaryKey = s.substring(RESULT_OUTPUT_SPACE.length);
-          }
-        } else {
-          if (s.startsWith(boundaryKey)) {
-            receivedResults.add(s.length > boundaryKey.length
-                ? s.substring(boundaryKey.length + 1)
-                : null);
-            boundaryKey = null;
-          }
-        }
-      });
+          .listen(outputParser.listener);
 
       Future<int> result =
           starter(args, input: streamController.stream, output: ioSink);
       streamController.add('compile ${file.path}\n'.codeUnits);
       int count = 0;
-      receivedResults.stream.listen((String outputFilenameAndErrorCount) {
+      receivedResults.stream.listen((Result compiledResult) {
+        CompilationResult result =
+            new CompilationResult.parse(compiledResult.status);
         if (count == 0) {
           // First request is to 'compile', which results in full kernel file.
-          CompilationResult result =
-              new CompilationResult.parse(outputFilenameAndErrorCount);
-
+          expect(result.errorsCount, equals(0));
           expect(dillFile.existsSync(), equals(true));
           expect(result.filename, dillFile.path);
-          expect(result.errorsCount, equals(0));
           streamController.add('accept\n'.codeUnits);
 
           // 'compile-expression <boundarykey>
@@ -474,26 +458,25 @@
           // <libraryUri: String>
           // <klass: String>
           // <isStatic: true|false>
+          outputParser.expectSources = false;
           streamController.add(
               'compile-expression abc\n2+2\nabc\nabc\n${file.uri}\n\n\n'
                   .codeUnits);
           count += 1;
         } else if (count == 1) {
+          expect(result.errorsCount, isNull);
           // Previous request should have failed because isStatic was blank
-          expect(outputFilenameAndErrorCount, isNull);
+          expect(compiledResult.status, isNull);
 
+          outputParser.expectSources = false;
           streamController.add(
               'compile-expression abc\n2+2\nabc\nabc\n${file.uri}\n\nfalse\n'
                   .codeUnits);
           count += 1;
         } else if (count == 2) {
+          expect(result.errorsCount, equals(0));
           // Second request is to 'compile-expression', which results in
           // kernel file with a function that wraps compiled expression.
-          expect(outputFilenameAndErrorCount, isNotNull);
-          CompilationResult result =
-              new CompilationResult.parse(outputFilenameAndErrorCount);
-
-          expect(result.errorsCount, equals(0));
           File outputFile = new File(result.filename);
           expect(outputFile.existsSync(), equals(true));
           expect(outputFile.lengthSync(), isPositive);
@@ -503,9 +486,6 @@
         } else {
           expect(count, 3);
           // Third request is to 'compile' non-existent file, that should fail.
-          expect(outputFilenameAndErrorCount, isNotNull);
-          CompilationResult result =
-              new CompilationResult.parse(outputFilenameAndErrorCount);
           expect(result.errorsCount, greaterThan(0));
 
           streamController.add('quit\n'.codeUnits);
@@ -515,6 +495,124 @@
       expect(await result, 0);
     });
 
+    test('compiler reports correct sources added', () async {
+      var libFile = new File('${tempDir.path}/lib.dart')
+        ..createSync(recursive: true)
+        ..writeAsStringSync("var foo = 42;");
+      var mainFile = new File('${tempDir.path}/main.dart')
+        ..createSync(recursive: true)
+        ..writeAsStringSync("main() => print('foo');\n");
+      var dillFile = new File('${tempDir.path}/app.dill');
+      expect(dillFile.existsSync(), equals(false));
+      final List<String> args = <String>[
+        '--sdk-root=${sdkRoot.toFilePath()}',
+        '--incremental',
+        '--platform=${platformKernel.path}',
+        '--output-dill=${dillFile.path}'
+      ];
+
+      final StreamController<List<int>> inputStreamController =
+          new StreamController<List<int>>();
+      final StreamController<List<int>> stdoutStreamController =
+          new StreamController<List<int>>();
+      final IOSink ioSink = new IOSink(stdoutStreamController.sink);
+      StreamController<Result> receivedResults = new StreamController<Result>();
+
+      final outputParser = new OutputParser(receivedResults);
+      stdoutStreamController.stream
+          .transform(utf8.decoder)
+          .transform(const LineSplitter())
+          .listen(outputParser.listener);
+
+      final Future<int> result =
+          starter(args, input: inputStreamController.stream, output: ioSink);
+      inputStreamController.add('compile ${mainFile.path}\n'.codeUnits);
+      int count = 0;
+      receivedResults.stream.listen((Result compiledResult) {
+        compiledResult.expectNoErrors();
+        if (count == 0) {
+          expect(compiledResult.sources.length, equals(1));
+          expect(compiledResult.sources, contains('+${mainFile.uri}'));
+
+          inputStreamController.add('accept\n'.codeUnits);
+          mainFile
+              .writeAsStringSync("import 'lib.dart';  main() => print(foo);\n");
+          inputStreamController.add('recompile ${mainFile.path} abc\n'
+                  '${mainFile.uri}\n'
+                  'abc\n'
+              .codeUnits);
+          count += 1;
+        } else if (count == 1) {
+          expect(compiledResult.sources.length, equals(1));
+          expect(compiledResult.sources, contains('+${libFile.uri}'));
+          inputStreamController.add('accept\n'.codeUnits);
+          inputStreamController.add('quit\n'.codeUnits);
+        }
+      });
+
+      expect(await result, 0);
+      inputStreamController.close();
+    }, timeout: Timeout.factor(100));
+
+    test('compiler reports correct sources removed', () async {
+      var libFile = new File('${tempDir.path}/lib.dart')
+        ..createSync(recursive: true)
+        ..writeAsStringSync("var foo = 42;");
+      var mainFile = new File('${tempDir.path}/main.dart')
+        ..createSync(recursive: true)
+        ..writeAsStringSync("import 'lib.dart'; main() => print(foo);\n");
+      var dillFile = new File('${tempDir.path}/app.dill');
+      expect(dillFile.existsSync(), equals(false));
+      final List<String> args = <String>[
+        '--sdk-root=${sdkRoot.toFilePath()}',
+        '--incremental',
+        '--platform=${platformKernel.path}',
+        '--output-dill=${dillFile.path}'
+      ];
+
+      final StreamController<List<int>> inputStreamController =
+          new StreamController<List<int>>();
+      final StreamController<List<int>> stdoutStreamController =
+          new StreamController<List<int>>();
+      final IOSink ioSink = new IOSink(stdoutStreamController.sink);
+      StreamController<Result> receivedResults = new StreamController<Result>();
+
+      final outputParser = new OutputParser(receivedResults);
+      stdoutStreamController.stream
+          .transform(utf8.decoder)
+          .transform(const LineSplitter())
+          .listen(outputParser.listener);
+
+      final Future<int> result =
+          starter(args, input: inputStreamController.stream, output: ioSink);
+      inputStreamController.add('compile ${mainFile.path}\n'.codeUnits);
+      int count = 0;
+      receivedResults.stream.listen((Result compiledResult) {
+        compiledResult.expectNoErrors();
+        if (count == 0) {
+          expect(compiledResult.sources.length, equals(2));
+          expect(compiledResult.sources,
+              allOf(contains('+${mainFile.uri}'), contains('+${libFile.uri}')));
+
+          inputStreamController.add('accept\n'.codeUnits);
+          mainFile.writeAsStringSync("main() => print('foo');\n");
+          inputStreamController.add('recompile ${mainFile.path} abc\n'
+                  '${mainFile.uri}\n'
+                  'abc\n'
+              .codeUnits);
+          count += 1;
+        } else if (count == 1) {
+          expect(compiledResult.sources.length, equals(1));
+          expect(compiledResult.sources, contains('-${libFile.uri}'));
+          inputStreamController.add('accept\n'.codeUnits);
+          inputStreamController.add('quit\n'.codeUnits);
+        }
+      });
+
+      expect(await result, 0);
+      inputStreamController.close();
+    }, timeout: Timeout.factor(100));
+
     test('compile expression when delta is rejected', () async {
       var fileLib = new File('${tempDir.path}/lib.dart')..createSync();
       fileLib.writeAsStringSync("foo() => 42;\n");
@@ -534,42 +632,26 @@
       final StreamController<List<int>> stdoutStreamController =
           new StreamController<List<int>>();
       final IOSink ioSink = new IOSink(stdoutStreamController.sink);
-      StreamController<String> receivedResults = new StreamController<String>();
+      StreamController<Result> receivedResults = new StreamController<Result>();
 
-      String boundaryKey;
+      final outputParser = new OutputParser(receivedResults);
       stdoutStreamController.stream
           .transform(utf8.decoder)
           .transform(const LineSplitter())
-          .listen((String s) {
-        print(s);
-        const String RESULT_OUTPUT_SPACE = 'result ';
-        if (boundaryKey == null) {
-          if (s.startsWith(RESULT_OUTPUT_SPACE)) {
-            boundaryKey = s.substring(RESULT_OUTPUT_SPACE.length);
-          }
-        } else {
-          if (s.startsWith(boundaryKey)) {
-            receivedResults.add(s.length > boundaryKey.length
-                ? s.substring(boundaryKey.length + 1)
-                : null);
-            boundaryKey = null;
-          }
-        }
-      });
+          .listen(outputParser.listener);
 
       final Future<int> result =
           starter(args, input: inputStreamController.stream, output: ioSink);
       inputStreamController.add('compile ${file.path}\n'.codeUnits);
       int count = 0;
-      receivedResults.stream.listen((String outputFilenameAndErrorCount) {
+      receivedResults.stream.listen((Result compiledResult) {
+        CompilationResult result =
+            new CompilationResult.parse(compiledResult.status);
         if (count == 0) {
           // First request was to 'compile', which resulted in full kernel file.
-          CompilationResult result =
-              new CompilationResult.parse(outputFilenameAndErrorCount);
-
+          expect(result.errorsCount, 0);
           expect(dillFile.existsSync(), equals(true));
           expect(result.filename, dillFile.path);
-          expect(result.errorsCount, equals(0));
           inputStreamController.add('accept\n'.codeUnits);
 
           // 'compile-expression <boundarykey>
@@ -583,6 +665,7 @@
           // <libraryUri: String>
           // <klass: String>
           // <isStatic: true|false>
+          outputParser.expectSources = false;
           inputStreamController.add('''
 compile-expression abc
 main1
@@ -597,34 +680,27 @@
         } else if (count == 1) {
           // Second request was to 'compile-expression', which resulted in
           // kernel file with a function that wraps compiled expression.
-          expect(outputFilenameAndErrorCount, isNotNull);
-          CompilationResult result =
-              new CompilationResult.parse(outputFilenameAndErrorCount);
-          print(outputFilenameAndErrorCount);
-
-          expect(result.errorsCount, equals(0));
+          expect(result.errorsCount, 0);
           File outputFile = new File(result.filename);
           expect(outputFile.existsSync(), equals(true));
           expect(outputFile.lengthSync(), isPositive);
 
           file.writeAsStringSync("import 'lib.dart'; main() => foo();\n");
           inputStreamController.add('recompile ${file.path} abc\n'
-              '${file.path}\n'
-              'abc\n'
+                  '${file.path}\n'
+                  'abc\n'
               .codeUnits);
 
           count += 1;
         } else if (count == 2) {
           // Third request was to recompile the script after renaming a function.
-          expect(outputFilenameAndErrorCount, isNotNull);
-          CompilationResult result =
-              new CompilationResult.parse(outputFilenameAndErrorCount);
-          expect(result.errorsCount, equals(0));
-
+          expect(result.errorsCount, 0);
+          outputParser.expectSources = false;
           inputStreamController.add('reject\n'.codeUnits);
           count += 1;
         } else if (count == 3) {
           // Fourth request was to reject the compilation results.
+          outputParser.expectSources = false;
           inputStreamController.add(
               'compile-expression abc\nmain1\nabc\nabc\n${file.uri}\n\ntrue\n'
                   .codeUnits);
@@ -633,10 +709,7 @@
           expect(count, 4);
           // Fifth request was to 'compile-expression' that references original
           // function, which should still be successful.
-          expect(outputFilenameAndErrorCount, isNotNull);
-          CompilationResult result =
-              new CompilationResult.parse(outputFilenameAndErrorCount);
-          expect(result.errorsCount, equals(0));
+          expect(result.errorsCount, 0);
           inputStreamController.add('quit\n'.codeUnits);
         }
       });
@@ -662,52 +735,37 @@
       final StreamController<List<int>> stdoutStreamController =
           new StreamController<List<int>>();
       final IOSink ioSink = new IOSink(stdoutStreamController.sink);
-      StreamController<String> receivedResults = new StreamController<String>();
+      StreamController<Result> receivedResults = new StreamController<Result>();
 
-      String boundaryKey;
+      final outputParser = new OutputParser(receivedResults);
       stdoutStreamController.stream
           .transform(utf8.decoder)
           .transform(const LineSplitter())
-          .listen((String s) {
-        const String RESULT_OUTPUT_SPACE = 'result ';
-        if (boundaryKey == null) {
-          if (s.startsWith(RESULT_OUTPUT_SPACE)) {
-            boundaryKey = s.substring(RESULT_OUTPUT_SPACE.length);
-          }
-        } else {
-          if (s.startsWith(boundaryKey)) {
-            receivedResults.add(s.substring(boundaryKey.length + 1));
-            boundaryKey = null;
-          }
-        }
-      });
+          .listen(outputParser.listener);
+
       Future<int> result =
           starter(args, input: inputStreamController.stream, output: ioSink);
       inputStreamController.add('compile ${file.path}\n'.codeUnits);
       int count = 0;
-      receivedResults.stream.listen((String outputFilenameAndErrorCount) {
-        CompilationResult result =
-            new CompilationResult.parse(outputFilenameAndErrorCount);
+      receivedResults.stream.listen((Result compiledResult) {
         if (count == 0) {
           // First request is to 'compile', which results in full kernel file.
           expect(dillFile.existsSync(), equals(true));
-          expect(result.filename, dillFile.path);
-          expect(result.errorsCount, 0);
+          compiledResult.expectNoErrors(filename: dillFile.path);
           count += 1;
           inputStreamController.add('accept\n'.codeUnits);
           var file2 = new File('${tempDir.path}/bar.dart')..createSync();
           file2.writeAsStringSync("main() {}\n");
           inputStreamController.add('recompile ${file2.path} abc\n'
-              '${file2.path}\n'
-              'abc\n'
+                  '${file2.path}\n'
+                  'abc\n'
               .codeUnits);
         } else {
           expect(count, 1);
           // Second request is to 'recompile', which results in incremental
           // kernel file.
           var dillIncFile = new File('${dillFile.path}.incremental.dill');
-          expect(result.filename, dillIncFile.path);
-          expect(result.errorsCount, 0);
+          compiledResult.expectNoErrors(filename: dillIncFile.path);
           expect(dillIncFile.existsSync(), equals(true));
           inputStreamController.add('quit\n'.codeUnits);
         }
@@ -771,32 +829,20 @@
       final StreamController<List<int>> stdoutStreamController =
           new StreamController<List<int>>();
       final IOSink ioSink = new IOSink(stdoutStreamController.sink);
-      StreamController<String> receivedResults = new StreamController<String>();
-
-      String boundaryKey;
+      StreamController<Result> receivedResults = new StreamController<Result>();
+      final outputParser = new OutputParser(receivedResults);
       stdoutStreamController.stream
           .transform(utf8.decoder)
           .transform(const LineSplitter())
-          .listen((String s) {
-        const String RESULT_OUTPUT_SPACE = 'result ';
-        if (boundaryKey == null) {
-          if (s.startsWith(RESULT_OUTPUT_SPACE)) {
-            boundaryKey = s.substring(RESULT_OUTPUT_SPACE.length);
-          }
-        } else {
-          if (s.startsWith(boundaryKey)) {
-            receivedResults.add(s.substring(boundaryKey.length + 1));
-            boundaryKey = null;
-          }
-        }
-      });
+          .listen(outputParser.listener);
+
       Future<int> result =
           starter(args, input: inputStreamController.stream, output: ioSink);
       inputStreamController.add('compile ${file.path}\n'.codeUnits);
       int count = 0;
-      receivedResults.stream.listen((String outputFilenameAndErrorCount) {
+      receivedResults.stream.listen((Result compiledResult) {
         CompilationResult result =
-            new CompilationResult.parse(outputFilenameAndErrorCount);
+            new CompilationResult.parse(compiledResult.status);
         switch (count) {
           case 0:
             expect(dillFile.existsSync(), equals(true));
@@ -807,8 +853,8 @@
             inputStreamController.add('reset\n'.codeUnits);
 
             inputStreamController.add('recompile ${fileB.path} abc\n'
-                '${fileB.path}\n'
-                'abc\n'
+                    '${fileB.path}\n'
+                    'abc\n'
                 .codeUnits);
             break;
           case 1:
@@ -854,32 +900,21 @@
       final StreamController<List<int>> stdoutStreamController =
           new StreamController<List<int>>();
       final IOSink ioSink = new IOSink(stdoutStreamController.sink);
-      StreamController<String> receivedResults = new StreamController<String>();
+      StreamController<Result> receivedResults = new StreamController<Result>();
 
-      String boundaryKey;
+      final outputParser = new OutputParser(receivedResults);
       stdoutStreamController.stream
           .transform(utf8.decoder)
           .transform(const LineSplitter())
-          .listen((String s) {
-        const String RESULT_OUTPUT_SPACE = 'result ';
-        if (boundaryKey == null) {
-          if (s.startsWith(RESULT_OUTPUT_SPACE)) {
-            boundaryKey = s.substring(RESULT_OUTPUT_SPACE.length);
-          }
-        } else {
-          if (s.startsWith(boundaryKey)) {
-            receivedResults.add(s.substring(boundaryKey.length + 1));
-            boundaryKey = null;
-          }
-        }
-      });
+          .listen(outputParser.listener);
+
       Future<int> result =
           starter(args, input: inputStreamController.stream, output: ioSink);
-      inputStreamController.add('compile ${file.path}\n'.codeUnits);
+      inputStreamController.add('compile ${file.uri}\n'.codeUnits);
       int count = 0;
-      receivedResults.stream.listen((String outputFilenameAndErrorCount) {
+      receivedResults.stream.listen((Result compiledResult) {
         CompilationResult result =
-            new CompilationResult.parse(outputFilenameAndErrorCount);
+            new CompilationResult.parse(compiledResult.status);
         switch (count) {
           case 0:
             expect(dillFile.existsSync(), equals(true));
@@ -889,9 +924,9 @@
             inputStreamController.add('accept\n'.codeUnits);
             var file2 = new File('${tempDir.path}/bar.dart')..createSync();
             file2.writeAsStringSync("main() { baz(); }\n");
-            inputStreamController.add('recompile ${file2.path} abc\n'
-                '${file2.path}\n'
-                'abc\n'
+            inputStreamController.add('recompile ${file2.uri} abc\n'
+                    '${file2.uri}\n'
+                    'abc\n'
                 .codeUnits);
             break;
           case 1:
@@ -902,9 +937,9 @@
             inputStreamController.add('accept\n'.codeUnits);
             var file2 = new File('${tempDir.path}/bar.dart')..createSync();
             file2.writeAsStringSync("main() { }\n");
-            inputStreamController.add('recompile ${file2.path} abc\n'
-                '${file2.path}\n'
-                'abc\n'
+            inputStreamController.add('recompile ${file2.uri} abc\n'
+                    '${file2.uri}\n'
+                    'abc\n'
                 .codeUnits);
             break;
           case 2:
@@ -1035,36 +1070,23 @@
         final StreamController<List<int>> stdoutStreamController =
             new StreamController<List<int>>();
         final IOSink ioSink = new IOSink(stdoutStreamController.sink);
-        StreamController<String> receivedResults =
-            new StreamController<String>();
+        StreamController<Result> receivedResults =
+            new StreamController<Result>();
 
-        String boundaryKey;
+        final outputParser = new OutputParser(receivedResults);
         stdoutStreamController.stream
             .transform(utf8.decoder)
             .transform(const LineSplitter())
-            .listen((String s) {
-          const String RESULT_OUTPUT_SPACE = 'result ';
-          if (boundaryKey == null) {
-            if (s.startsWith(RESULT_OUTPUT_SPACE)) {
-              boundaryKey = s.substring(RESULT_OUTPUT_SPACE.length);
-            }
-          } else {
-            if (s.startsWith(boundaryKey)) {
-              receivedResults.add(s.substring(boundaryKey.length + 1));
-              boundaryKey = null;
-            }
-          }
-        });
+            .listen(outputParser.listener);
 
         Future<int> result =
             starter(args, input: inputStreamController.stream, output: ioSink);
         inputStreamController.add('compile ${dart2js.path}\n'.codeUnits);
         int count = 0;
-        receivedResults.stream.listen((String outputFilenameAndErrorCount) {
-          int delim = outputFilenameAndErrorCount.lastIndexOf(' ');
-          expect(delim > 0, equals(true));
-          String outputFilename =
-              outputFilenameAndErrorCount.substring(0, delim);
+        receivedResults.stream.listen((Result compiledResult) {
+          CompilationResult result =
+              CompilationResult.parse(compiledResult.status);
+          String outputFilename = result.filename;
           print("$outputFilename -- count $count");
 
           // Ensure that kernel file produced when compiler was initialized
@@ -1110,7 +1132,7 @@
             inputStreamController.add('accept\n'.codeUnits);
             inputStreamController.add('reset\n'.codeUnits);
             inputStreamController.add('recompile ${dart2js.path} x$count\n'
-                'x$count\n'
+                    'x$count\n'
                 .codeUnits);
           } else if (count == 1) {
             // Restart. Expect full kernel file.
@@ -1135,7 +1157,7 @@
             // Reload with no changes
             inputStreamController.add('accept\n'.codeUnits);
             inputStreamController.add('recompile ${dart2js.path} x$count\n'
-                'x$count\n'
+                    'x$count\n'
                 .codeUnits);
           } else if (count == 2) {
             // Partial file. Expect to be empty.
@@ -1152,8 +1174,8 @@
             // Reload with 1 change
             inputStreamController.add('accept\n'.codeUnits);
             inputStreamController.add('recompile ${dart2js.path} x$count\n'
-                '${dart2jsOtherFile.uri}\n'
-                'x$count\n'
+                    '${dart2jsOtherFile.uri}\n'
+                    'x$count\n'
                 .codeUnits);
           } else if (count == 3) {
             // Partial file. Expect to not be empty.
@@ -1205,9 +1227,75 @@
   int errorsCount;
 
   CompilationResult.parse(String filenameAndErrorCount) {
+    if (filenameAndErrorCount == null) {
+      return;
+    }
     int delim = filenameAndErrorCount.lastIndexOf(' ');
     expect(delim > 0, equals(true));
     filename = filenameAndErrorCount.substring(0, delim);
     errorsCount = int.parse(filenameAndErrorCount.substring(delim + 1).trim());
   }
 }
+
+class Result {
+  String status;
+  List<String> sources;
+
+  Result(this.status, this.sources);
+
+  void expectNoErrors({String filename}) {
+    var result = CompilationResult.parse(status);
+    expect(result.errorsCount, equals(0));
+    if (filename != null) {
+      expect(result.filename, equals(filename));
+    }
+  }
+}
+
+class OutputParser {
+  OutputParser(this._receivedResults);
+  bool expectSources = true;
+
+  StreamController<Result> _receivedResults;
+  List<String> _receivedSources;
+
+  String _boundaryKey;
+  bool _readingSources;
+
+  void listener(String s) {
+    if (_boundaryKey == null) {
+      const String RESULT_OUTPUT_SPACE = 'result ';
+      if (s.startsWith(RESULT_OUTPUT_SPACE)) {
+        _boundaryKey = s.substring(RESULT_OUTPUT_SPACE.length);
+      }
+      _readingSources = false;
+      _receivedSources?.clear();
+      return;
+    }
+
+    if (s.startsWith(_boundaryKey)) {
+      // First boundaryKey separates compiler output from list of sources
+      // (if we expect list of sources, which is indicated by receivedSources
+      // being not null)
+      if (expectSources && !_readingSources) {
+        _readingSources = true;
+        return;
+      }
+      // Second boundaryKey indicates end of frontend server response
+      expectSources = true;
+      _receivedResults.add(Result(
+          s.length > _boundaryKey.length
+              ? s.substring(_boundaryKey.length + 1)
+              : null,
+          _receivedSources));
+      _boundaryKey = null;
+    } else {
+      if (_readingSources) {
+        if (_receivedSources == null) {
+          _receivedSources = <String>[];
+        }
+        _receivedSources.add(s);
+      }
+    }
+  }
+}
diff --git a/pkg/vm/test/incremental_compiler_test.dart b/pkg/vm/test/incremental_compiler_test.dart
index 4050a60..2b714ec 100644
--- a/pkg/vm/test/incremental_compiler_test.dart
+++ b/pkg/vm/test/incremental_compiler_test.dart
@@ -36,12 +36,25 @@
     };
 
   group('basic', () {
-    test('compile', () async {
-      var systemTempDir = Directory.systemTemp;
-      var file = new File('${systemTempDir.path}/foo.dart')..createSync();
-      file.writeAsStringSync("main() {}\n");
+    Directory mytest;
+    File main;
 
-      IncrementalCompiler compiler = new IncrementalCompiler(options, file.uri);
+    setUpAll(() {
+      mytest = Directory.systemTemp.createTempSync('incremental');
+      main = new File('${mytest.path}/main.dart')..createSync();
+      main.writeAsStringSync("main() {}\n");
+    });
+
+    tearDownAll(() {
+      try {
+        mytest.deleteSync(recursive: true);
+      } catch (_) {
+        // Ignore errors;
+      }
+    });
+
+    test('compile', () async {
+      IncrementalCompiler compiler = new IncrementalCompiler(options, main.uri);
       Component component = await compiler.compile();
 
       final StringBuffer buffer = new StringBuffer();
@@ -56,13 +69,14 @@
     });
 
     test('compile exclude sources', () async {
-      var systemTempDir = Directory.systemTemp;
-      var file = new File('${systemTempDir.path}/foo.dart')..createSync();
-      file.writeAsStringSync("main() {}\n");
-
-      CompilerOptions optionsExcludeSources = options..embedSourceText = false;
+      CompilerOptions optionsExcludeSources = new CompilerOptions()
+        ..sdkRoot = options.sdkRoot
+        ..target = options.target
+        ..linkedDependencies = options.linkedDependencies
+        ..onDiagnostic = options.onDiagnostic
+        ..embedSourceText = false;
       IncrementalCompiler compiler =
-          new IncrementalCompiler(optionsExcludeSources, file.uri);
+          new IncrementalCompiler(optionsExcludeSources, main.uri);
       Component component = await compiler.compile();
 
       for (Source source in component.uriToSource.values) {
@@ -79,18 +93,72 @@
               '\n'
               'static method main() → dynamic {}\n'));
     });
+
+    test('compile expressions errors are not re-reported', () async {
+      var errorsReported = 0;
+      CompilerOptions optionsAcceptErrors = new CompilerOptions()
+        ..sdkRoot = options.sdkRoot
+        ..target = options.target
+        ..linkedDependencies = options.linkedDependencies
+        ..onDiagnostic = (DiagnosticMessage message) {
+          errorsReported++;
+          message.plainTextFormatted.forEach(print);
+        };
+      IncrementalCompiler compiler =
+          new IncrementalCompiler(optionsAcceptErrors, main.uri);
+      await compiler.compile();
+      compiler.accept();
+      {
+        Procedure procedure = await compiler.compileExpression(
+            'main', <String>[], <String>[], main.uri.toString(), null, true);
+        expect(procedure, isNotNull);
+        expect(errorsReported, equals(0));
+      }
+      {
+        Procedure procedure = await compiler.compileExpression(
+            'main1', <String>[], <String>[], main.uri.toString(), null, true);
+        expect(procedure, isNotNull);
+        expect(errorsReported, equals(1));
+        errorsReported = 0;
+      }
+      await compiler.compile();
+      expect(errorsReported, equals(0));
+    });
   });
 
   group('multiple kernels', () {
     Directory mytest;
     File main;
     File lib;
+    Process vm;
     setUpAll(() {
       mytest = Directory.systemTemp.createTempSync('incremental');
       main = new File('${mytest.path}/main.dart')..createSync();
-      main.writeAsStringSync("import 'lib.dart'; main() => print(foo()); \n");
+      main.writeAsStringSync("""
+      import 'lib.dart';
+      main() => print(foo());
+      class C1 extends Object with C2, C3 {
+        c1method() {
+          print("c1");
+        }
+      }
+      class C3 {
+        c3method() {
+          print("c3");
+        }
+      }
+      """);
       lib = new File('${mytest.path}/lib.dart')..createSync();
-      lib.writeAsStringSync("foo() => 'foo'; main() => print('bar');\n");
+      lib.writeAsStringSync("""
+      import 'main.dart';
+      foo() => 'foo';
+      main() => print('bar');
+      class C2 extends Object with C3 {
+        c2method() {
+          print("c2");
+        }
+      }
+      """);
     });
 
     tearDownAll(() {
@@ -99,6 +167,11 @@
       } catch (_) {
         // Ignore errors;
       }
+      try {
+        vm.kill();
+      } catch (_) {
+        // Ignore errors;
+      }
     });
 
     compileAndSerialize(
@@ -133,7 +206,7 @@
 
       var list = new File(p.join(dir.path, 'myMain.dilllist'))..createSync();
       list.writeAsStringSync("#@dill\n${mainDill.path}\n${libDill.path}\n");
-      var vm =
+      vm =
           await Process.start(Platform.resolvedExecutable, <String>[list.path]);
 
       final splitter = new LineSplitter();
@@ -160,7 +233,7 @@
 
       var list = new File(p.join(dir.path, 'myMain.dilllist'))..createSync();
       list.writeAsStringSync("#@dill\n${libDill.path}\n${mainDill.path}\n");
-      var vm =
+      vm =
           await Process.start(Platform.resolvedExecutable, <String>[list.path]);
 
       final splitter = new LineSplitter();
@@ -182,7 +255,7 @@
     test('empty list', () async {
       var list = new File(p.join(mytest.path, 'myMain.dilllist'))..createSync();
       list.writeAsStringSync("#@dill\n");
-      var vm =
+      vm =
           await Process.start(Platform.resolvedExecutable, <String>[list.path]);
 
       Completer<int> exitCodeCompleter = new Completer<int>();
@@ -196,7 +269,7 @@
     test('fallback to source compilation if fail to load', () async {
       var list = new File('${mytest.path}/myMain.dilllist')..createSync();
       list.writeAsStringSync("main() => print('baz');\n");
-      var vm =
+      vm =
           await Process.start(Platform.resolvedExecutable, <String>[list.path]);
 
       final splitter = new LineSplitter();
@@ -225,8 +298,7 @@
       var list = new File(p.join(dir.path, 'myMain.dilllist'))..createSync();
       list.writeAsStringSync("#@dill\n../main.dart.dill\n../lib.dart.dill\n");
       Directory runFrom = new Directory(dir.path + "/runFrom")..createSync();
-      var vm = await Process.start(
-          Platform.resolvedExecutable, <String>[list.path],
+      vm = await Process.start(Platform.resolvedExecutable, <String>[list.path],
           workingDirectory: runFrom.path);
 
       final splitter = new LineSplitter();
@@ -243,6 +315,130 @@
       expect(await portLineCompleter.future, equals('foo'));
       print("Compiler terminated with ${await vm.exitCode} exit code");
     });
+
+    test('collect coverage', () async {
+      collectStuff(int port) async {
+        RemoteVm remoteVm = new RemoteVm(port);
+
+        // Wait for the script to have finished.
+        while (true) {
+          Map isolate = await remoteVm.getIsolate();
+          Map pauseEvent = isolate["pauseEvent"];
+          if (pauseEvent["kind"] == "PauseExit") break;
+        }
+
+        // Collect coverage for the two user scripts.
+        Map sourceReport = await remoteVm.getSourceReport();
+        List scripts = sourceReport["scripts"];
+        Map<String, int> scriptIdToIndex = new Map<String, int>();
+        int i = 0;
+        for (Map script in scripts) {
+          if (script["uri"].toString().endsWith("main.dart") ||
+              script["uri"].toString().endsWith("lib.dart")) {
+            scriptIdToIndex[script["id"]] = i;
+          }
+          i++;
+        }
+        expect(scriptIdToIndex.length >= 2, isTrue);
+
+        List<String> errorMessages = new List<String>();
+
+        // Ensure the scripts all have a non-null 'tokenPosTable' entry.
+        Map<int, Map> scriptIndexToScript = new Map<int, Map>();
+        for (String scriptId in scriptIdToIndex.keys) {
+          Map script = await remoteVm.getObject(scriptId);
+          int scriptIdx = scriptIdToIndex[scriptId];
+          scriptIndexToScript[scriptIdx] = script;
+          List tokenPosTable = script["tokenPosTable"];
+          if (tokenPosTable == null) {
+            errorMessages.add("Script with uri ${script['uri']} "
+                "and id ${script['id']} "
+                "has null tokenPosTable.");
+          } else if (tokenPosTable.isEmpty) {
+            errorMessages.add("Script with uri ${script['uri']} "
+                "and id ${script['id']} "
+                "has empty tokenPosTable.");
+          }
+        }
+
+        // Ensure that we can get a line and column number for all reported
+        // positions in the scripts we care about.
+        List ranges = sourceReport["ranges"];
+        Set<int> scriptIndexesSet = new Set<int>.from(scriptIndexToScript.keys);
+        for (Map range in ranges) {
+          if (scriptIndexesSet.contains(range["scriptIndex"])) {
+            Set<int> positions = new Set<int>();
+            positions.add(range["startPos"]);
+            positions.add(range["endPos"]);
+            Map coverage = range["coverage"];
+            for (int pos in coverage["hits"]) positions.add(pos);
+            for (int pos in coverage["misses"]) positions.add(pos);
+            for (int pos in range["possibleBreakpoints"]) positions.add(pos);
+            Map script = scriptIndexToScript[range["scriptIndex"]];
+            Set<int> knownPositions = new Set<int>();
+            if (script["tokenPosTable"] != null) {
+              for (List tokenPosTableLine in script["tokenPosTable"]) {
+                for (int i = 1; i < tokenPosTableLine.length; i += 2) {
+                  knownPositions.add(tokenPosTableLine[i]);
+                }
+              }
+            }
+            for (int pos in positions) {
+              if (!knownPositions.contains(pos)) {
+                errorMessages.add("Script with uri ${script['uri']} "
+                    "and id ${script['id']} "
+                    "references position $pos which cannot be translated to "
+                    "line and column.");
+              }
+            }
+          }
+        }
+        expect(errorMessages, isEmpty);
+        remoteVm.resume();
+      }
+
+      Directory dir = mytest.createTempSync();
+      File mainDill = File(p.join(dir.path, p.basename(main.path + ".dill")));
+      File libDill = File(p.join(dir.path, p.basename(lib.path + ".dill")));
+      IncrementalCompiler compiler = new IncrementalCompiler(options, main.uri);
+      await compileAndSerialize(mainDill, libDill, compiler);
+
+      var list = new File(p.join(dir.path, 'myMain.dilllist'))..createSync();
+      list.writeAsStringSync("#@dill\n${mainDill.path}\n${libDill.path}\n");
+      vm = await Process.start(Platform.resolvedExecutable, <String>[
+        "--pause-isolates-on-exit",
+        "--enable-vm-service:0",
+        "--disable-service-auth-codes",
+        list.path
+      ]);
+
+      const kObservatoryListening = 'Observatory listening on ';
+      final RegExp observatoryPortRegExp =
+          new RegExp("Observatory listening on http://127.0.0.1:\([0-9]*\)/");
+      int port;
+      final splitter = new LineSplitter();
+      Completer<String> portLineCompleter = new Completer<String>();
+      vm.stdout
+          .transform(utf8.decoder)
+          .transform(splitter)
+          .listen((String s) async {
+        if (s.startsWith(kObservatoryListening)) {
+          expect(observatoryPortRegExp.hasMatch(s), isTrue);
+          final match = observatoryPortRegExp.firstMatch(s);
+          port = int.parse(match.group(1));
+          await collectStuff(port);
+          if (!portLineCompleter.isCompleted) {
+            portLineCompleter.complete("done");
+          }
+        }
+        print("vm stdout: $s");
+      });
+      vm.stderr.transform(utf8.decoder).transform(splitter).listen((String s) {
+        print("vm stderr: $s");
+      });
+      await portLineCompleter.future;
+      print("Compiler terminated with ${await vm.exitCode} exit code");
+    });
   });
 
   group('reload', () {
@@ -274,6 +470,7 @@
         '--trace_reload_verbose',
         '--enable-vm-service=0', // Note: use 0 to avoid port collisions.
         '--pause_isolates_on_start',
+        '--disable-service-auth-codes',
         outputFile.path
       ];
       final vm = await Process.start(Platform.resolvedExecutable, vmArgs);
@@ -336,6 +533,74 @@
       vm.kill();
     });
   });
+
+  group('reject', () {
+    Directory mytest;
+    setUpAll(() {
+      mytest = Directory.systemTemp.createTempSync('incremental_reject');
+    });
+
+    tearDownAll(() {
+      try {
+        mytest.deleteSync(recursive: true);
+      } catch (_) {
+        // Ignore errors;
+      }
+    });
+
+    test('compile, reject, compile again', () async {
+      var packageUri = Uri.file('${mytest.path}/.packages');
+      new File(packageUri.toFilePath()).writeAsStringSync('foo:lib/\n');
+      new Directory(mytest.path + "/lib").createSync();
+      var fooUri = Uri.file('${mytest.path}/lib/foo.dart');
+      new File(fooUri.toFilePath())
+          .writeAsStringSync("import 'package:foo/bar.dart';\n"
+              "import 'package:foo/baz.dart';\n"
+              "main() {\n"
+              "  new A();\n"
+              "  openReceivePortSoWeWontDie();"
+              "}\n");
+
+      var barUri = Uri.file('${mytest.path}/lib/bar.dart');
+      new File(barUri.toFilePath())
+          .writeAsStringSync("class A { static int a; }\n");
+
+      var bazUri = Uri.file('${mytest.path}/lib/baz.dart');
+      new File(bazUri.toFilePath()).writeAsStringSync("import 'dart:isolate';\n"
+          "openReceivePortSoWeWontDie() { new RawReceivePort(); }\n");
+
+      Uri packageEntry = Uri.parse('package:foo/foo.dart');
+      options.packagesFileUri = packageUri;
+      IncrementalCompiler compiler =
+          new IncrementalCompiler(options, packageEntry);
+      {
+        Component component = await compiler.compile(entryPoint: packageEntry);
+        File outputFile = new File('${mytest.path}/foo.dart.dill');
+        await _writeProgramToFile(component, outputFile);
+      }
+      compiler.accept();
+      {
+        Procedure procedure = await compiler.compileExpression(
+            'a', <String>[], <String>[], 'package:foo/bar.dart', 'A', true);
+        expect(procedure, isNotNull);
+      }
+
+      new File(barUri.toFilePath())
+          .writeAsStringSync("class A { static int b; }\n");
+      compiler.invalidate(barUri);
+      {
+        Component component = await compiler.compile(entryPoint: packageEntry);
+        File outputFile = new File('${mytest.path}/foo1.dart.dill');
+        await _writeProgramToFile(component, outputFile);
+      }
+      await compiler.reject();
+      {
+        Procedure procedure = await compiler.compileExpression(
+            'a', <String>[], <String>[], 'package:foo/bar.dart', 'A', true);
+        expect(procedure, isNotNull);
+      }
+    });
+  });
 }
 
 _writeProgramToFile(Component component, File outputFile) async {
@@ -416,6 +681,28 @@
     await rpc.sendRequest('resume', {'isolateId': id});
   }
 
+  Future getIsolate() async {
+    var id = await mainId;
+    return await rpc.sendRequest('getIsolate', {'isolateId': id});
+  }
+
+  Future getSourceReport() async {
+    var id = await mainId;
+    return await rpc.sendRequest('getSourceReport', {
+      'isolateId': id,
+      'reports': ['Coverage', 'PossibleBreakpoints'],
+      'forceCompile': true
+    });
+  }
+
+  Future getObject(String objectId) async {
+    var id = await mainId;
+    return await rpc.sendRequest('getObject', {
+      'isolateId': id,
+      'objectId': objectId,
+    });
+  }
+
   /// Close any connections used to communicate with the VM.
   Future disconnect() async {
     if (_rpc == null) return null;
diff --git a/pkg/vm/test/kernel_front_end_test.dart b/pkg/vm/test/kernel_front_end_test.dart
index 5a8379c..ec3e8b0 100644
--- a/pkg/vm/test/kernel_front_end_test.dart
+++ b/pkg/vm/test/kernel_front_end_test.dart
@@ -16,6 +16,7 @@
     .toFilePath();
 
 const String mainScript = 'pkg/vm/bin/gen_kernel.dart';
+const String mainScriptPackageUri = 'package:vm/kernel_front_end.dart';
 const String packagesFile = '.packages';
 
 void testCompile(List<String> args) async {
@@ -65,6 +66,22 @@
     ]);
   });
 
+  test('compile-multi-root-with-package-uri-main', () async {
+    await testCompile([
+      '--platform',
+      platformPath(),
+      '--filesystem-scheme',
+      'test-filesystem-scheme',
+      '--filesystem-root',
+      sdkDir,
+      '--packages',
+      'test-filesystem-scheme:///$packagesFile',
+      '--output',
+      outputDill(),
+      '$mainScriptPackageUri',
+    ]);
+  });
+
   test('compile-package-split', () async {
     await testCompile([
       '--platform',
diff --git a/pkg/vm/test/transformations/protobuf_aware_treeshaker/treeshaker_test.dart b/pkg/vm/test/transformations/protobuf_aware_treeshaker/treeshaker_test.dart
new file mode 100644
index 0000000..66d662e
--- /dev/null
+++ b/pkg/vm/test/transformations/protobuf_aware_treeshaker/treeshaker_test.dart
@@ -0,0 +1,74 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:io';
+
+import 'package:kernel/target/targets.dart';
+import 'package:kernel/ast.dart';
+import 'package:kernel/kernel.dart';
+import 'package:kernel/binary/limited_ast_to_binary.dart';
+import 'package:path/path.dart' as path;
+import 'package:test/test.dart';
+
+import 'package:vm/transformations/protobuf_aware_treeshaker/transformer.dart'
+    as treeshaker;
+
+import '../../common_test_utils.dart';
+
+final String pkgVmDir = Platform.script.resolve('../../..').toFilePath();
+
+runTestCase(Uri source) async {
+  final target = new TestingVmTarget(new TargetFlags());
+  Component component =
+      await compileTestCaseToKernelProgram(source, target: target);
+
+  List<Class> messageClasses = component.libraries
+      .expand(
+        (lib) => lib.classes.where((klass) =>
+            klass.superclass != null &&
+            klass.superclass.name == "GeneratedMessage"),
+      )
+      .toList();
+
+  treeshaker.transformComponent(component, {}, TestingVmTarget(TargetFlags()),
+      collectInfo: true, enableAsserts: false);
+
+  for (Class messageClass in messageClasses) {
+    expect(messageClass.enclosingLibrary.classes.contains(messageClass),
+        messageClass.name.endsWith('Keep'));
+  }
+
+  final systemTempDir = Directory.systemTemp;
+  final file =
+      new File('${systemTempDir.path}/${source.pathSegments.last}.dill');
+  try {
+    final sink = file.openWrite();
+    final printer =
+        LimitedBinaryPrinter(sink, (lib) => true, /*excludeUriToSource=*/ true);
+
+    printer.writeComponentFile(component);
+    await sink.close();
+
+    ProcessResult result =
+        Process.runSync(Platform.resolvedExecutable, [file.path]);
+    expect(result.exitCode, 0);
+  } finally {
+    if (file.existsSync()) {
+      file.deleteSync();
+    }
+  }
+}
+
+main() async {
+  final testCases = Directory(path.join(
+    pkgVmDir,
+    'testcases',
+    'transformations',
+    'protobuf_aware_treeshaker',
+    'lib',
+  )).listSync().where((f) => f.path.endsWith('_test.dart'));
+  for (final entry in testCases) {
+    test(entry.path, () => runTestCase(entry.uri));
+  }
+}
diff --git a/pkg/vm/test/transformations/type_flow/annotation_matcher.dart b/pkg/vm/test/transformations/type_flow/annotation_matcher.dart
deleted file mode 100644
index 1b959c5..0000000
--- a/pkg/vm/test/transformations/type_flow/annotation_matcher.dart
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'package:kernel/ast.dart';
-import 'package:kernel/core_types.dart';
-import 'package:vm/transformations/type_flow/utils.dart';
-import 'package:vm/transformations/pragma.dart';
-
-// Since we don't run the constants transformation in this test, we can't
-// recognize all pragma annotations precisely. Instead, we pattern match on
-// annotations which look like a pragma and assume that their options field
-// evaluates to true.
-class ExpressionPragmaAnnotationParser extends PragmaAnnotationParser {
-  final CoreTypes coreTypes;
-
-  ExpressionPragmaAnnotationParser(this.coreTypes);
-
-  ParsedPragma parsePragma(Expression annotation) {
-    assertx(annotation is! ConstantExpression);
-
-    String pragmaName;
-    Expression options;
-
-    if (annotation is ConstructorInvocation) {
-      if (annotation.constructedType.classNode != coreTypes.pragmaClass) {
-        return null;
-      }
-
-      if (annotation.arguments.types.length != 0 ||
-          (annotation.arguments.positional.length != 1 &&
-              annotation.arguments.positional.length != 2) ||
-          annotation.arguments.named.length != 0) {
-        throw "Cannot evaluate pragma annotation $annotation";
-      }
-
-      var arguments = annotation.arguments.positional;
-      var nameArg = arguments[0];
-      if (nameArg is StringLiteral) {
-        pragmaName = nameArg.value;
-      } else {
-        return null;
-      }
-
-      options = arguments.length > 1 ? arguments[1] : new NullLiteral();
-    }
-
-    switch (pragmaName) {
-      case kEntryPointPragmaName:
-        // We ignore the option because we can't properly evaluate it, assume
-        // it's true.
-        return new ParsedEntryPointPragma(PragmaEntryPointType.Always);
-      case kExactResultTypePragmaName:
-        if (options is TypeLiteral) {
-          return new ParsedResultTypeByTypePragma(options.type);
-        } else if (options is StringLiteral) {
-          return new ParsedResultTypeByPathPragma(options.value);
-        }
-        throw "Could not recognize option to $kExactResultTypePragmaName";
-      default:
-        return null;
-    }
-  }
-}
diff --git a/pkg/vm/test/transformations/type_flow/summary_collector_test.dart b/pkg/vm/test/transformations/type_flow/summary_collector_test.dart
index 022c7e1..4ab863b 100644
--- a/pkg/vm/test/transformations/type_flow/summary_collector_test.dart
+++ b/pkg/vm/test/transformations/type_flow/summary_collector_test.dart
@@ -9,10 +9,11 @@
 import 'package:kernel/core_types.dart';
 import 'package:kernel/type_environment.dart';
 import 'package:test/test.dart';
+import 'package:vm/transformations/pragma.dart'
+    show ConstantPragmaAnnotationParser;
 import 'package:vm/transformations/type_flow/native_code.dart';
 import 'package:vm/transformations/type_flow/summary_collector.dart';
 import 'package:vm/transformations/type_flow/analysis.dart';
-import 'annotation_matcher.dart';
 import 'package:kernel/target/targets.dart';
 
 import '../../common_test_utils.dart';
@@ -31,7 +32,7 @@
             hierarchy,
             new EmptyEntryPointsListener(),
             new NativeCodeOracle(
-                null, new ExpressionPragmaAnnotationParser(coreTypes)),
+                null, new ConstantPragmaAnnotationParser(coreTypes)),
             new GenericInterfacesInfoImpl(hierarchy));
 
   String print(TreeNode node) {
diff --git a/pkg/vm/test/transformations/type_flow/transformer_test.dart b/pkg/vm/test/transformations/type_flow/transformer_test.dart
index d031f10..4d1effb 100644
--- a/pkg/vm/test/transformations/type_flow/transformer_test.dart
+++ b/pkg/vm/test/transformations/type_flow/transformer_test.dart
@@ -11,7 +11,6 @@
 import 'package:test/test.dart';
 import 'package:vm/transformations/type_flow/transformer.dart'
     show transformComponent;
-import 'annotation_matcher.dart';
 
 import '../../common_test_utils.dart';
 
@@ -24,8 +23,7 @@
 
   final coreTypes = new CoreTypes(component);
 
-  component = transformComponent(target, coreTypes, component,
-      new ExpressionPragmaAnnotationParser(coreTypes));
+  component = transformComponent(target, coreTypes, component);
 
   final actual = kernelLibraryToString(component.mainMethod.enclosingLibrary);
 
diff --git a/pkg/vm/testcases/bytecode/asserts.dart.expect b/pkg/vm/testcases/bytecode/asserts.dart.expect
index 0c5afe3..de42a48 100644
--- a/pkg/vm/testcases/bytecode/asserts.dart.expect
+++ b/pkg/vm/testcases/bytecode/asserts.dart.expect
@@ -1,8 +1,21 @@
-library #lib;
-import self as self;
-import "dart:core" as core;
+main = #lib::main;
+ [@vm.bytecode=
+ComponentBytecodeMetadata {
 
-[@vm.bytecode=
+Bytecode (version: stable)
+Main library: #lib
+
+}
+] [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function 'test1', static, reflectable, debuggable
+    parameters [dart:core::bool 'condition'] (required: 1)
+    return-type void
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -23,10 +36,13 @@
   [0] = DirectCall 'dart:core::_AssertionError::_throwNew', ArgDesc num-args 3, num-type-args 0, names []
   [1] = Reserved
 }
-]static method test1(core::bool condition) → void {
-  assert(condition);
-}
-[@vm.bytecode=
+
+
+Function 'test2', static, reflectable, debuggable
+    parameters [FunctionType () -> dart:core::bool 'condition', FunctionType () -> dart:core::String 'message'] (required: 2)
+    return-type void
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -52,10 +68,13 @@
   [3] = DirectCall 'dart:core::_AssertionError::_throwNew', ArgDesc num-args 3, num-type-args 0, names []
   [4] = Reserved
 }
-]static method test2(() → core::bool condition, () → core::String message) → void {
-  assert([@vm.call-site-attributes.metadata=receiverType:() → dart.core::bool] condition.call(), [@vm.call-site-attributes.metadata=receiverType:() → dart.core::String] message.call());
-}
-[@vm.bytecode=
+
+
+Function 'main', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -64,4 +83,17 @@
 }
 ConstantPool {
 }
-]static method main() → dynamic {}
+
+}
+
+}
+]library #lib from "#lib" as #lib {
+
+  static method test1(dart.core::bool condition) → void {
+    assert(condition);
+  }
+  static method test2(() → dart.core::bool condition, () → dart.core::String message) → void {
+    assert([@vm.call-site-attributes.metadata=receiverType:() → dart.core::bool] condition.call(), [@vm.call-site-attributes.metadata=receiverType:() → dart.core::String] message.call());
+  }
+  static method main() → dynamic {}
+}
diff --git a/pkg/vm/testcases/bytecode/async.dart.expect b/pkg/vm/testcases/bytecode/async.dart.expect
index a9c151f..cce2837 100644
--- a/pkg/vm/testcases/bytecode/async.dart.expect
+++ b/pkg/vm/testcases/bytecode/async.dart.expect
@@ -1,28 +1,34 @@
-library #lib;
-import self as self;
-import "dart:async" as asy;
-import "dart:core" as core;
+main = #lib::main;
+ [@vm.bytecode=
+ComponentBytecodeMetadata {
 
-import "dart:async";
+Bytecode (version: stable)
+Main library: #lib
 
-[@vm.bytecode=
+}
+] [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+Field 'asyncInFieldInitializer', type = FunctionType (dart:async::Future < dart:core::int >) -> dart:async::Future < dart:core::Null >, getter = 'get:asyncInFieldInitializer', reflectable, static
+    initializer 
 Bytecode {
   Entry                3
   CheckStack           0
-  Allocate             CP#20
+  AllocateClosure      CP#0
   StoreLocal           r2
   Push                 r2
   PushNull
-  StoreFieldTOS        CP#21
+  StoreFieldTOS        CP#20
   Push                 r2
   PushNull
-  StoreFieldTOS        CP#23
+  StoreFieldTOS        CP#22
   Push                 r2
-  PushConstant         CP#25
-  StoreFieldTOS        CP#26
+  PushConstant         CP#24
+  StoreFieldTOS        CP#25
   Push                 r2
   PushConstant         CP#0
-  StoreFieldTOS        CP#28
+  StoreFieldTOS        CP#27
   Push                 r2
   Push                 r0
   StoreFieldTOS        CP#1
@@ -49,30 +55,29 @@
   [17] = InterfaceCall 'dart:async::Completer::completeError', ArgDesc num-args 3, num-type-args 0, names []
   [18] = Reserved
   [19] = EndClosureFunctionScope
-  [20] = Class dart:core::_Closure
-  [21] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
-  [22] = Reserved
-  [23] = InstanceField dart:core::_Closure::_function_type_arguments (field)
-  [24] = Reserved
-  [25] = EmptyTypeArguments
-  [26] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
-  [27] = Reserved
-  [28] = InstanceField dart:core::_Closure::_function (field)
-  [29] = Reserved
-  [30] = DirectCall 'dart:async::_asyncStackTraceHelper', ArgDesc num-args 1, num-type-args 0, names []
-  [31] = Reserved
-  [32] = DirectCall 'dart:async::_asyncThenWrapperHelper', ArgDesc num-args 1, num-type-args 0, names []
-  [33] = Reserved
-  [34] = DirectCall 'dart:async::_asyncErrorWrapperHelper', ArgDesc num-args 1, num-type-args 0, names []
-  [35] = Reserved
-  [36] = ObjectRef ArgDesc num-args 2, num-type-args 0, names []
-  [37] = ICData dynamic target-name 'start', arg-desc CP#36
-  [38] = InterfaceCall 'dart:async::Completer::get:future', ArgDesc num-args 1, num-type-args 0, names []
-  [39] = Reserved
-  [40] = EndClosureFunctionScope
+  [20] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
+  [21] = Reserved
+  [22] = InstanceField dart:core::_Closure::_function_type_arguments (field)
+  [23] = Reserved
+  [24] = EmptyTypeArguments
+  [25] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
+  [26] = Reserved
+  [27] = InstanceField dart:core::_Closure::_function (field)
+  [28] = Reserved
+  [29] = DirectCall 'dart:async::_asyncStackTraceHelper', ArgDesc num-args 1, num-type-args 0, names []
+  [30] = Reserved
+  [31] = DirectCall 'dart:async::_asyncThenWrapperHelper', ArgDesc num-args 1, num-type-args 0, names []
+  [32] = Reserved
+  [33] = DirectCall 'dart:async::_asyncErrorWrapperHelper', ArgDesc num-args 1, num-type-args 0, names []
+  [34] = Reserved
+  [35] = ObjectRef ArgDesc num-args 2, num-type-args 0, names []
+  [36] = ICData dynamic target-name 'start', arg-desc CP#35
+  [37] = InterfaceCall 'dart:async::Completer::get:future', ArgDesc num-args 1, num-type-args 0, names []
+  [38] = Reserved
+  [39] = EndClosureFunctionScope
 }
 Closure #lib::asyncInFieldInitializer (field)::'<anonymous closure>' (dart:async::Future < dart:core::int > x) -> dart:async::Future < dart:core::Null >
-ClosureBytecode {
+ClosureCode {
   EntryFixed           2, 4
   CheckStack           0
   Push                 FP[-6]
@@ -120,53 +125,53 @@
   PushNull
   StoreContextVar      0, 7
   Push                 r0
-  Allocate             CP#20
+  AllocateClosure      CP#10
   StoreLocal           r2
   Push                 r2
   PushNull
-  StoreFieldTOS        CP#21
+  StoreFieldTOS        CP#20
   Push                 r2
   PushNull
-  StoreFieldTOS        CP#23
+  StoreFieldTOS        CP#22
   Push                 r2
-  PushConstant         CP#25
-  StoreFieldTOS        CP#26
+  PushConstant         CP#24
+  StoreFieldTOS        CP#25
   Push                 r2
   PushConstant         CP#10
-  StoreFieldTOS        CP#28
+  StoreFieldTOS        CP#27
   Push                 r2
   Push                 r0
   StoreFieldTOS        CP#1
   StoreContextVar      0, 8
   Push                 r0
   LoadContextVar       0, 8
-  DirectCall           1, CP#30
+  DirectCall           1, CP#29
   PopLocal             r3
   Push                 r0
   Push                 r0
   LoadContextVar       0, 8
-  DirectCall           1, CP#32
+  DirectCall           1, CP#31
   StoreContextVar      0, 3
   Push                 r0
   Push                 r0
   LoadContextVar       0, 8
-  DirectCall           1, CP#34
+  DirectCall           1, CP#33
   StoreContextVar      0, 4
   Push                 r0
   LoadContextVar       0, 1
   Push                 r0
   LoadContextVar       0, 8
-  DynamicCall          2, CP#37
+  DynamicCall          2, CP#36
   Drop1
   Push                 r0
   LoadContextVar       0, 1
-  InterfaceCall        1, CP#38
+  InterfaceCall        1, CP#37
   ReturnTOS
 
 }
 
 Closure #lib::asyncInFieldInitializer (field)::Closure/0::':async_op' ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic
-ClosureBytecode {
+ClosureCode {
   EntryOptional        1, 3, 0
   LoadConstant         r1, CP#11
   LoadConstant         r2, CP#11
@@ -252,35 +257,13 @@
   Jump                 L4
 
 }
-]static field (asy::Future<core::int>) → asy::Future<core::Null> asyncInFieldInitializer = (asy::Future<core::int> x) → asy::Future<core::Null> /* originally async */ {
-  final asy::_AsyncAwaitCompleter<core::Null> :async_completer = new asy::_AsyncAwaitCompleter::•<core::Null>();
-  asy::FutureOr<core::Null> :return_value;
-  dynamic :async_stack_trace;
-  dynamic :async_op_then;
-  dynamic :async_op_error;
-  dynamic :await_jump_var = 0;
-  dynamic :await_ctx_var;
-  dynamic :saved_try_context_var0;
-  function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
-    try {
-      #L1:
-      {
-        [yield] let dynamic #t1 = asy::_awaitHelper(x, :async_op_then, :async_op_error, :async_op) in null;
-        :result;
-      }
-      asy::_completeOnAsyncReturn(:async_completer, :return_value);
-      return;
-    }
-    on dynamic catch(dynamic :exception, dynamic :stack_trace) {
-      :async_completer.{asy::Completer::completeError}(:exception, :stack_trace);
-    }
-  :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
-  :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
-  :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  :async_completer.start(:async_op);
-  return :async_completer.{asy::Completer::future};
-};
-[@vm.bytecode=
+
+
+Function 'foo', static, reflectable, async
+    parameters [] (required: 0)
+    return-type dart:async::Future < dart:core::int >
+
+
 Bytecode {
   Entry                7
   CheckStack           0
@@ -310,41 +293,41 @@
   Push                 r0
   PushNull
   StoreContextVar      0, 3
-  Allocate             CP#14
+  AllocateClosure      CP#4
   StoreLocal           r2
   Push                 r2
   PushNull
-  StoreFieldTOS        CP#15
+  StoreFieldTOS        CP#14
   Push                 r2
   PushNull
-  StoreFieldTOS        CP#17
+  StoreFieldTOS        CP#16
   Push                 r2
-  PushConstant         CP#19
-  StoreFieldTOS        CP#20
+  PushConstant         CP#18
+  StoreFieldTOS        CP#19
   Push                 r2
   PushConstant         CP#4
-  StoreFieldTOS        CP#22
+  StoreFieldTOS        CP#21
   Push                 r2
   Push                 r0
   StoreFieldTOS        CP#6
   PopLocal             r6
   Push                 r6
-  DirectCall           1, CP#24
+  DirectCall           1, CP#23
   PopLocal             r3
   Push                 r6
-  DirectCall           1, CP#26
+  DirectCall           1, CP#25
   PopLocal             r4
   Push                 r6
-  DirectCall           1, CP#28
+  DirectCall           1, CP#27
   PopLocal             r5
   Push                 r0
   LoadContextVar       0, 0
   Push                 r6
-  DynamicCall          2, CP#31
+  DynamicCall          2, CP#30
   Drop1
   Push                 r0
   LoadContextVar       0, 0
-  InterfaceCall        1, CP#32
+  InterfaceCall        1, CP#31
   ReturnTOS
 }
 ConstantPool {
@@ -362,29 +345,28 @@
   [11] = InterfaceCall 'dart:async::Completer::completeError', ArgDesc num-args 3, num-type-args 0, names []
   [12] = Reserved
   [13] = EndClosureFunctionScope
-  [14] = Class dart:core::_Closure
-  [15] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
-  [16] = Reserved
-  [17] = InstanceField dart:core::_Closure::_function_type_arguments (field)
-  [18] = Reserved
-  [19] = EmptyTypeArguments
-  [20] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
-  [21] = Reserved
-  [22] = InstanceField dart:core::_Closure::_function (field)
-  [23] = Reserved
-  [24] = DirectCall 'dart:async::_asyncStackTraceHelper', ArgDesc num-args 1, num-type-args 0, names []
-  [25] = Reserved
-  [26] = DirectCall 'dart:async::_asyncThenWrapperHelper', ArgDesc num-args 1, num-type-args 0, names []
-  [27] = Reserved
-  [28] = DirectCall 'dart:async::_asyncErrorWrapperHelper', ArgDesc num-args 1, num-type-args 0, names []
-  [29] = Reserved
-  [30] = ObjectRef ArgDesc num-args 2, num-type-args 0, names []
-  [31] = ICData dynamic target-name 'start', arg-desc CP#30
-  [32] = InterfaceCall 'dart:async::Completer::get:future', ArgDesc num-args 1, num-type-args 0, names []
-  [33] = Reserved
+  [14] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
+  [15] = Reserved
+  [16] = InstanceField dart:core::_Closure::_function_type_arguments (field)
+  [17] = Reserved
+  [18] = EmptyTypeArguments
+  [19] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
+  [20] = Reserved
+  [21] = InstanceField dart:core::_Closure::_function (field)
+  [22] = Reserved
+  [23] = DirectCall 'dart:async::_asyncStackTraceHelper', ArgDesc num-args 1, num-type-args 0, names []
+  [24] = Reserved
+  [25] = DirectCall 'dart:async::_asyncThenWrapperHelper', ArgDesc num-args 1, num-type-args 0, names []
+  [26] = Reserved
+  [27] = DirectCall 'dart:async::_asyncErrorWrapperHelper', ArgDesc num-args 1, num-type-args 0, names []
+  [28] = Reserved
+  [29] = ObjectRef ArgDesc num-args 2, num-type-args 0, names []
+  [30] = ICData dynamic target-name 'start', arg-desc CP#29
+  [31] = InterfaceCall 'dart:async::Completer::get:future', ArgDesc num-args 1, num-type-args 0, names []
+  [32] = Reserved
 }
 Closure #lib::foo::':async_op' ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic
-ClosureBytecode {
+ClosureCode {
   EntryOptional        1, 3, 0
   LoadConstant         r1, CP#5
   LoadConstant         r2, CP#5
@@ -440,34 +422,13 @@
   Trap
 
 }
-]static method foo() → asy::Future<core::int> /* originally async */ {
-  final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
-  asy::FutureOr<core::int> :return_value;
-  dynamic :async_stack_trace;
-  dynamic :async_op_then;
-  dynamic :async_op_error;
-  dynamic :await_jump_var = 0;
-  dynamic :await_ctx_var;
-  function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
-    try {
-      #L2:
-      {
-        :return_value = 42;
-        break #L2;
-      }
-      asy::_completeOnAsyncReturn(:async_completer, :return_value);
-      return;
-    }
-    on dynamic catch(dynamic :exception, dynamic :stack_trace) {
-      :async_completer.{asy::Completer::completeError}(:exception, :stack_trace);
-    }
-  :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
-  :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
-  :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  :async_completer.start(:async_op);
-  return :async_completer.{asy::Completer::future};
-}
-[@vm.bytecode=
+
+
+Function 'simpleAsyncAwait', static, reflectable, async
+    parameters [dart:async::Future < dart:core::int > 'a', dart:async::Future < dart:core::int > 'b'] (required: 2)
+    return-type dart:async::Future < dart:core::int >
+
+
 Bytecode {
   Entry                4
   CheckStack           0
@@ -512,47 +473,47 @@
   PushNull
   StoreContextVar      0, 9
   Push                 r0
-  Allocate             CP#18
+  AllocateClosure      CP#4
   StoreLocal           r2
   Push                 r2
   PushNull
-  StoreFieldTOS        CP#19
+  StoreFieldTOS        CP#18
   Push                 r2
   PushNull
-  StoreFieldTOS        CP#21
+  StoreFieldTOS        CP#20
   Push                 r2
-  PushConstant         CP#23
-  StoreFieldTOS        CP#24
+  PushConstant         CP#22
+  StoreFieldTOS        CP#23
   Push                 r2
   PushConstant         CP#4
-  StoreFieldTOS        CP#26
+  StoreFieldTOS        CP#25
   Push                 r2
   Push                 r0
   StoreFieldTOS        CP#6
   StoreContextVar      0, 10
   Push                 r0
   LoadContextVar       0, 10
-  DirectCall           1, CP#28
+  DirectCall           1, CP#27
   PopLocal             r3
   Push                 r0
   Push                 r0
   LoadContextVar       0, 10
-  DirectCall           1, CP#30
+  DirectCall           1, CP#29
   StoreContextVar      0, 4
   Push                 r0
   Push                 r0
   LoadContextVar       0, 10
-  DirectCall           1, CP#32
+  DirectCall           1, CP#31
   StoreContextVar      0, 5
   Push                 r0
   LoadContextVar       0, 2
   Push                 r0
   LoadContextVar       0, 10
-  DynamicCall          2, CP#35
+  DynamicCall          2, CP#34
   Drop1
   Push                 r0
   LoadContextVar       0, 2
-  InterfaceCall        1, CP#36
+  InterfaceCall        1, CP#35
   ReturnTOS
 }
 ConstantPool {
@@ -574,29 +535,28 @@
   [15] = InterfaceCall 'dart:async::Completer::completeError', ArgDesc num-args 3, num-type-args 0, names []
   [16] = Reserved
   [17] = EndClosureFunctionScope
-  [18] = Class dart:core::_Closure
-  [19] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
-  [20] = Reserved
-  [21] = InstanceField dart:core::_Closure::_function_type_arguments (field)
-  [22] = Reserved
-  [23] = EmptyTypeArguments
-  [24] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
-  [25] = Reserved
-  [26] = InstanceField dart:core::_Closure::_function (field)
-  [27] = Reserved
-  [28] = DirectCall 'dart:async::_asyncStackTraceHelper', ArgDesc num-args 1, num-type-args 0, names []
-  [29] = Reserved
-  [30] = DirectCall 'dart:async::_asyncThenWrapperHelper', ArgDesc num-args 1, num-type-args 0, names []
-  [31] = Reserved
-  [32] = DirectCall 'dart:async::_asyncErrorWrapperHelper', ArgDesc num-args 1, num-type-args 0, names []
-  [33] = Reserved
-  [34] = ObjectRef ArgDesc num-args 2, num-type-args 0, names []
-  [35] = ICData dynamic target-name 'start', arg-desc CP#34
-  [36] = InterfaceCall 'dart:async::Completer::get:future', ArgDesc num-args 1, num-type-args 0, names []
-  [37] = Reserved
+  [18] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
+  [19] = Reserved
+  [20] = InstanceField dart:core::_Closure::_function_type_arguments (field)
+  [21] = Reserved
+  [22] = EmptyTypeArguments
+  [23] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
+  [24] = Reserved
+  [25] = InstanceField dart:core::_Closure::_function (field)
+  [26] = Reserved
+  [27] = DirectCall 'dart:async::_asyncStackTraceHelper', ArgDesc num-args 1, num-type-args 0, names []
+  [28] = Reserved
+  [29] = DirectCall 'dart:async::_asyncThenWrapperHelper', ArgDesc num-args 1, num-type-args 0, names []
+  [30] = Reserved
+  [31] = DirectCall 'dart:async::_asyncErrorWrapperHelper', ArgDesc num-args 1, num-type-args 0, names []
+  [32] = Reserved
+  [33] = ObjectRef ArgDesc num-args 2, num-type-args 0, names []
+  [34] = ICData dynamic target-name 'start', arg-desc CP#33
+  [35] = InterfaceCall 'dart:async::Completer::get:future', ArgDesc num-args 1, num-type-args 0, names []
+  [36] = Reserved
 }
 Closure #lib::simpleAsyncAwait::':async_op' ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic
-ClosureBytecode {
+ClosureCode {
   EntryOptional        1, 3, 0
   LoadConstant         r1, CP#5
   LoadConstant         r2, CP#5
@@ -719,39 +679,13 @@
   Jump                 L7
 
 }
-]static method simpleAsyncAwait(asy::Future<core::int> a, asy::Future<core::int> b) → asy::Future<core::int> /* originally async */ {
-  final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
-  asy::FutureOr<core::int> :return_value;
-  dynamic :async_stack_trace;
-  dynamic :async_op_then;
-  dynamic :async_op_error;
-  dynamic :await_jump_var = 0;
-  dynamic :await_ctx_var;
-  dynamic :saved_try_context_var0;
-  dynamic :async_temporary_0;
-  function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
-    try {
-      #L3:
-      {
-        [yield] let dynamic #t2 = asy::_awaitHelper(a, :async_op_then, :async_op_error, :async_op) in null;
-        :async_temporary_0 = :result;
-        [yield] let dynamic #t3 = asy::_awaitHelper(b, :async_op_then, :async_op_error, :async_op) in null;
-        :return_value = :async_temporary_0.{core::num::+}(:result);
-        break #L3;
-      }
-      asy::_completeOnAsyncReturn(:async_completer, :return_value);
-      return;
-    }
-    on dynamic catch(dynamic :exception, dynamic :stack_trace) {
-      :async_completer.{asy::Completer::completeError}(:exception, :stack_trace);
-    }
-  :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
-  :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
-  :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  :async_completer.start(:async_op);
-  return :async_completer.{asy::Completer::future};
-}
-[@vm.bytecode=
+
+
+Function 'loops', static, reflectable, async
+    parameters [dart:core::List < dart:core::int > 'list'] (required: 1)
+    return-type dart:async::Future < dart:core::int >
+
+
 Bytecode {
   Entry                4
   CheckStack           0
@@ -796,47 +730,47 @@
   PushNull
   StoreContextVar      0, 9
   Push                 r0
-  Allocate             CP#26
+  AllocateClosure      CP#4
   StoreLocal           r2
   Push                 r2
   PushNull
-  StoreFieldTOS        CP#27
+  StoreFieldTOS        CP#26
   Push                 r2
   PushNull
-  StoreFieldTOS        CP#29
+  StoreFieldTOS        CP#28
   Push                 r2
-  PushConstant         CP#31
-  StoreFieldTOS        CP#32
+  PushConstant         CP#30
+  StoreFieldTOS        CP#31
   Push                 r2
   PushConstant         CP#4
-  StoreFieldTOS        CP#34
+  StoreFieldTOS        CP#33
   Push                 r2
   Push                 r0
   StoreFieldTOS        CP#6
   StoreContextVar      0, 10
   Push                 r0
   LoadContextVar       0, 10
-  DirectCall           1, CP#36
+  DirectCall           1, CP#35
   PopLocal             r3
   Push                 r0
   Push                 r0
   LoadContextVar       0, 10
-  DirectCall           1, CP#38
+  DirectCall           1, CP#37
   StoreContextVar      0, 3
   Push                 r0
   Push                 r0
   LoadContextVar       0, 10
-  DirectCall           1, CP#40
+  DirectCall           1, CP#39
   StoreContextVar      0, 4
   Push                 r0
   LoadContextVar       0, 1
   Push                 r0
   LoadContextVar       0, 10
-  DynamicCall          2, CP#43
+  DynamicCall          2, CP#42
   Drop1
   Push                 r0
   LoadContextVar       0, 1
-  InterfaceCall        1, CP#44
+  InterfaceCall        1, CP#43
   ReturnTOS
 }
 ConstantPool {
@@ -866,29 +800,28 @@
   [23] = InterfaceCall 'dart:async::Completer::completeError', ArgDesc num-args 3, num-type-args 0, names []
   [24] = Reserved
   [25] = EndClosureFunctionScope
-  [26] = Class dart:core::_Closure
-  [27] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
-  [28] = Reserved
-  [29] = InstanceField dart:core::_Closure::_function_type_arguments (field)
-  [30] = Reserved
-  [31] = EmptyTypeArguments
-  [32] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
-  [33] = Reserved
-  [34] = InstanceField dart:core::_Closure::_function (field)
-  [35] = Reserved
-  [36] = DirectCall 'dart:async::_asyncStackTraceHelper', ArgDesc num-args 1, num-type-args 0, names []
-  [37] = Reserved
-  [38] = DirectCall 'dart:async::_asyncThenWrapperHelper', ArgDesc num-args 1, num-type-args 0, names []
-  [39] = Reserved
-  [40] = DirectCall 'dart:async::_asyncErrorWrapperHelper', ArgDesc num-args 1, num-type-args 0, names []
-  [41] = Reserved
-  [42] = ObjectRef ArgDesc num-args 2, num-type-args 0, names []
-  [43] = ICData dynamic target-name 'start', arg-desc CP#42
-  [44] = InterfaceCall 'dart:async::Completer::get:future', ArgDesc num-args 1, num-type-args 0, names []
-  [45] = Reserved
+  [26] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
+  [27] = Reserved
+  [28] = InstanceField dart:core::_Closure::_function_type_arguments (field)
+  [29] = Reserved
+  [30] = EmptyTypeArguments
+  [31] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
+  [32] = Reserved
+  [33] = InstanceField dart:core::_Closure::_function (field)
+  [34] = Reserved
+  [35] = DirectCall 'dart:async::_asyncStackTraceHelper', ArgDesc num-args 1, num-type-args 0, names []
+  [36] = Reserved
+  [37] = DirectCall 'dart:async::_asyncThenWrapperHelper', ArgDesc num-args 1, num-type-args 0, names []
+  [38] = Reserved
+  [39] = DirectCall 'dart:async::_asyncErrorWrapperHelper', ArgDesc num-args 1, num-type-args 0, names []
+  [40] = Reserved
+  [41] = ObjectRef ArgDesc num-args 2, num-type-args 0, names []
+  [42] = ICData dynamic target-name 'start', arg-desc CP#41
+  [43] = InterfaceCall 'dart:async::Completer::get:future', ArgDesc num-args 1, num-type-args 0, names []
+  [44] = Reserved
 }
 Closure #lib::loops::':async_op' ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic
-ClosureBytecode {
+ClosureCode {
   EntryOptional        1, 3, 0
   LoadConstant         r1, CP#5
   LoadConstant         r2, CP#5
@@ -1127,53 +1060,17 @@
   Jump                 L11
 
 }
-]static method loops(core::List<core::int> list) → asy::Future<core::int> /* originally async */ {
-  final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
-  asy::FutureOr<core::int> :return_value;
-  dynamic :async_stack_trace;
-  dynamic :async_op_then;
-  dynamic :async_op_error;
-  dynamic :await_jump_var = 0;
-  dynamic :await_ctx_var;
-  dynamic :saved_try_context_var0;
-  dynamic :async_temporary_0;
-  dynamic :async_temporary_1;
-  function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
-    try {
-      #L4:
-      {
-        core::int sum = 0;
-        for (core::int i = 0; i.{core::num::<}(10); i = i.{core::num::+}(1)) {
-          for (core::int j in list) {
-            :async_temporary_1 = sum;
-            :async_temporary_0 = i.{core::num::+}(j);
-            [yield] let dynamic #t4 = asy::_awaitHelper(self::foo(), :async_op_then, :async_op_error, :async_op) in null;
-            sum = :async_temporary_1.{core::num::+}(:async_temporary_0.{core::num::+}(:result));
-          }
-        }
-        for (core::int k = 0; k.{core::num::<}(10); k = k.{core::num::+}(1)) {
-          sum = sum.{core::num::+}(k);
-        }
-        :return_value = sum;
-        break #L4;
-      }
-      asy::_completeOnAsyncReturn(:async_completer, :return_value);
-      return;
-    }
-    on dynamic catch(dynamic :exception, dynamic :stack_trace) {
-      :async_completer.{asy::Completer::completeError}(:exception, :stack_trace);
-    }
-  :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
-  :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
-  :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  :async_completer.start(:async_op);
-  return :async_completer.{asy::Completer::future};
-}
-[@vm.bytecode=
+
+
+Function 'tryCatchRethrow', static, reflectable, async
+    parameters [dart:async::Future < dart:core::int > 'a', dart:async::Future < dart:core::int > 'b', dart:async::Future < dart:core::int > 'c'] (required: 3)
+    return-type dart:async::Future < dart:core::int >
+
+
 Bytecode {
   Entry                4
   CheckStack           0
-  AllocateContext      0, 16
+  AllocateContext      0, 18
   PopLocal             r0
   Push                 r0
   Push                 FP[-7]
@@ -1229,47 +1126,53 @@
   PushNull
   StoreContextVar      0, 14
   Push                 r0
-  Allocate             CP#24
+  PushNull
+  StoreContextVar      0, 15
+  Push                 r0
+  PushNull
+  StoreContextVar      0, 16
+  Push                 r0
+  AllocateClosure      CP#4
   StoreLocal           r2
   Push                 r2
   PushNull
-  StoreFieldTOS        CP#25
+  StoreFieldTOS        CP#24
   Push                 r2
   PushNull
-  StoreFieldTOS        CP#27
+  StoreFieldTOS        CP#26
   Push                 r2
-  PushConstant         CP#29
-  StoreFieldTOS        CP#30
+  PushConstant         CP#28
+  StoreFieldTOS        CP#29
   Push                 r2
   PushConstant         CP#4
-  StoreFieldTOS        CP#32
+  StoreFieldTOS        CP#31
   Push                 r2
   Push                 r0
   StoreFieldTOS        CP#6
-  StoreContextVar      0, 15
+  StoreContextVar      0, 17
   Push                 r0
-  LoadContextVar       0, 15
-  DirectCall           1, CP#34
+  LoadContextVar       0, 17
+  DirectCall           1, CP#33
   PopLocal             r3
   Push                 r0
   Push                 r0
-  LoadContextVar       0, 15
-  DirectCall           1, CP#36
+  LoadContextVar       0, 17
+  DirectCall           1, CP#35
   StoreContextVar      0, 5
   Push                 r0
   Push                 r0
-  LoadContextVar       0, 15
-  DirectCall           1, CP#38
+  LoadContextVar       0, 17
+  DirectCall           1, CP#37
   StoreContextVar      0, 6
   Push                 r0
   LoadContextVar       0, 3
   Push                 r0
-  LoadContextVar       0, 15
-  DynamicCall          2, CP#41
+  LoadContextVar       0, 17
+  DynamicCall          2, CP#40
   Drop1
   Push                 r0
   LoadContextVar       0, 3
-  InterfaceCall        1, CP#42
+  InterfaceCall        1, CP#41
   ReturnTOS
 }
 ConstantPool {
@@ -1297,29 +1200,28 @@
   [21] = InterfaceCall 'dart:async::Completer::completeError', ArgDesc num-args 3, num-type-args 0, names []
   [22] = Reserved
   [23] = EndClosureFunctionScope
-  [24] = Class dart:core::_Closure
-  [25] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
-  [26] = Reserved
-  [27] = InstanceField dart:core::_Closure::_function_type_arguments (field)
-  [28] = Reserved
-  [29] = EmptyTypeArguments
-  [30] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
-  [31] = Reserved
-  [32] = InstanceField dart:core::_Closure::_function (field)
-  [33] = Reserved
-  [34] = DirectCall 'dart:async::_asyncStackTraceHelper', ArgDesc num-args 1, num-type-args 0, names []
-  [35] = Reserved
-  [36] = DirectCall 'dart:async::_asyncThenWrapperHelper', ArgDesc num-args 1, num-type-args 0, names []
-  [37] = Reserved
-  [38] = DirectCall 'dart:async::_asyncErrorWrapperHelper', ArgDesc num-args 1, num-type-args 0, names []
-  [39] = Reserved
-  [40] = ObjectRef ArgDesc num-args 2, num-type-args 0, names []
-  [41] = ICData dynamic target-name 'start', arg-desc CP#40
-  [42] = InterfaceCall 'dart:async::Completer::get:future', ArgDesc num-args 1, num-type-args 0, names []
-  [43] = Reserved
+  [24] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
+  [25] = Reserved
+  [26] = InstanceField dart:core::_Closure::_function_type_arguments (field)
+  [27] = Reserved
+  [28] = EmptyTypeArguments
+  [29] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
+  [30] = Reserved
+  [31] = InstanceField dart:core::_Closure::_function (field)
+  [32] = Reserved
+  [33] = DirectCall 'dart:async::_asyncStackTraceHelper', ArgDesc num-args 1, num-type-args 0, names []
+  [34] = Reserved
+  [35] = DirectCall 'dart:async::_asyncThenWrapperHelper', ArgDesc num-args 1, num-type-args 0, names []
+  [36] = Reserved
+  [37] = DirectCall 'dart:async::_asyncErrorWrapperHelper', ArgDesc num-args 1, num-type-args 0, names []
+  [38] = Reserved
+  [39] = ObjectRef ArgDesc num-args 2, num-type-args 0, names []
+  [40] = ICData dynamic target-name 'start', arg-desc CP#39
+  [41] = InterfaceCall 'dart:async::Completer::get:future', ArgDesc num-args 1, num-type-args 0, names []
+  [42] = Reserved
 }
 Closure #lib::tryCatchRethrow::':async_op' ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic
-ClosureBytecode {
+ClosureCode {
   EntryOptional        1, 3, 0
   LoadConstant         r1, CP#5
   LoadConstant         r2, CP#5
@@ -1381,7 +1283,7 @@
   LoadContextVar       0, 6
   Push                 r4
   LoadContextParent
-  LoadContextVar       0, 15
+  LoadContextVar       0, 17
   DirectCall           4, CP#8
   PopLocal             r13
   PushNull
@@ -1438,7 +1340,7 @@
   LoadContextParent
   Push                 r4
   LoadContextVar       1, 0
-  StoreContextVar      0, 14
+  StoreContextVar      0, 15
   Push                 r4
   LoadContextParent
   PushInt              2
@@ -1458,7 +1360,7 @@
   LoadContextVar       0, 6
   Push                 r4
   LoadContextParent
-  LoadContextVar       0, 15
+  LoadContextVar       0, 17
   DirectCall           4, CP#8
   PopLocal             r13
   PushNull
@@ -1473,7 +1375,7 @@
   Push                 r4
   Push                 r4
   LoadContextParent
-  LoadContextVar       0, 14
+  LoadContextVar       0, 15
   Push                 r1
   InterfaceCall        2, CP#10
   StoreContextVar      1, 0
@@ -1512,7 +1414,7 @@
   LoadContextParent
   Push                 r4
   LoadContextVar       1, 0
-  StoreContextVar      0, 14
+  StoreContextVar      0, 16
   Push                 r4
   LoadContextParent
   PushInt              3
@@ -1532,7 +1434,7 @@
   LoadContextVar       0, 6
   Push                 r4
   LoadContextParent
-  LoadContextVar       0, 15
+  LoadContextVar       0, 17
   DirectCall           4, CP#8
   PopLocal             r12
   PushNull
@@ -1547,7 +1449,7 @@
   Push                 r4
   Push                 r4
   LoadContextParent
-  LoadContextVar       0, 14
+  LoadContextVar       0, 16
   Push                 r1
   InterfaceCall        2, CP#10
   StoreContextVar      1, 0
@@ -1574,7 +1476,7 @@
   LoadContextParent
   Push                 r4
   LoadContextVar       1, 0
-  StoreContextVar      0, 14
+  StoreContextVar      0, 16
   Push                 r4
   LoadContextParent
   PushInt              4
@@ -1594,7 +1496,7 @@
   LoadContextVar       0, 6
   Push                 r4
   LoadContextParent
-  LoadContextVar       0, 15
+  LoadContextVar       0, 17
   DirectCall           4, CP#8
   PopLocal             r12
   PushNull
@@ -1609,7 +1511,7 @@
   Push                 r4
   Push                 r4
   LoadContextParent
-  LoadContextVar       0, 14
+  LoadContextVar       0, 16
   Push                 r1
   InterfaceCall        2, CP#10
   StoreContextVar      1, 0
@@ -1636,7 +1538,7 @@
   LoadContextParent
   Push                 r4
   LoadContextVar       1, 0
-  StoreContextVar      0, 14
+  StoreContextVar      0, 16
   Push                 r4
   LoadContextParent
   PushInt              5
@@ -1656,7 +1558,7 @@
   LoadContextVar       0, 6
   Push                 r4
   LoadContextParent
-  LoadContextVar       0, 15
+  LoadContextVar       0, 17
   DirectCall           4, CP#8
   PopLocal             r12
   PushNull
@@ -1671,7 +1573,7 @@
   Push                 r4
   Push                 r4
   LoadContextParent
-  LoadContextVar       0, 14
+  LoadContextVar       0, 16
   Push                 r1
   InterfaceCall        2, CP#10
   StoreContextVar      1, 0
@@ -1737,63 +1639,13 @@
   Jump                 L17
 
 }
-]static method tryCatchRethrow(asy::Future<core::int> a, asy::Future<core::int> b, asy::Future<core::int> c) → asy::Future<core::int> /* originally async */ {
-  final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
-  asy::FutureOr<core::int> :return_value;
-  dynamic :async_stack_trace;
-  dynamic :async_op_then;
-  dynamic :async_op_error;
-  dynamic :await_jump_var = 0;
-  dynamic :await_ctx_var;
-  dynamic :saved_try_context_var0;
-  dynamic :saved_try_context_var1;
-  dynamic :saved_try_context_var2;
-  dynamic :exception0;
-  dynamic :stack_trace0;
-  dynamic :async_temporary_0;
-  function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
-    try {
-      #L5:
-      {
-        core::int x = 1;
-        try
-          try {
-            :async_temporary_0 = x;
-            [yield] let dynamic #t5 = asy::_awaitHelper(a, :async_op_then, :async_op_error, :async_op) in null;
-            x = :async_temporary_0.{core::num::+}(:result);
-          }
-          on dynamic catch(final dynamic e) {
-            if(e is core::Error) {
-              :return_value = 42;
-              break #L5;
-            }
-            :async_temporary_0 = x;
-            [yield] let dynamic #t6 = asy::_awaitHelper(b, :async_op_then, :async_op_error, :async_op) in null;
-            x = :async_temporary_0.{core::num::+}(:result);
-            rethrow;
-          }
-        finally {
-          core::print("fin");
-          :async_temporary_0 = x;
-          [yield] let dynamic #t7 = asy::_awaitHelper(c, :async_op_then, :async_op_error, :async_op) in null;
-          x = :async_temporary_0.{core::num::+}(:result);
-          :return_value = x;
-          break #L5;
-        }
-      }
-      asy::_completeOnAsyncReturn(:async_completer, :return_value);
-      return;
-    }
-    on dynamic catch(dynamic :exception, dynamic :stack_trace) {
-      :async_completer.{asy::Completer::completeError}(:exception, :stack_trace);
-    }
-  :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
-  :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
-  :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  :async_completer.start(:async_op);
-  return :async_completer.{asy::Completer::future};
-}
-[@vm.bytecode=
+
+
+Function 'closure', static, reflectable, debuggable
+    parameters [dart:async::Future < dart:core::int > 'a'] (required: 1)
+    return-type dynamic
+
+
 Bytecode {
   Entry                4
   CheckStack           0
@@ -1805,20 +1657,20 @@
   Push                 r0
   PushInt              3
   StoreContextVar      0, 1
-  Allocate             CP#20
+  AllocateClosure      CP#0
   StoreLocal           r3
   Push                 r3
   PushNull
-  StoreFieldTOS        CP#21
+  StoreFieldTOS        CP#20
   Push                 r3
   PushNull
-  StoreFieldTOS        CP#23
+  StoreFieldTOS        CP#22
   Push                 r3
-  PushConstant         CP#25
-  StoreFieldTOS        CP#26
+  PushConstant         CP#24
+  StoreFieldTOS        CP#25
   Push                 r3
   PushConstant         CP#0
-  StoreFieldTOS        CP#28
+  StoreFieldTOS        CP#27
   Push                 r3
   Push                 r0
   StoreFieldTOS        CP#1
@@ -1847,30 +1699,29 @@
   [17] = InterfaceCall 'dart:async::Completer::completeError', ArgDesc num-args 3, num-type-args 0, names []
   [18] = Reserved
   [19] = EndClosureFunctionScope
-  [20] = Class dart:core::_Closure
-  [21] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
-  [22] = Reserved
-  [23] = InstanceField dart:core::_Closure::_function_type_arguments (field)
-  [24] = Reserved
-  [25] = EmptyTypeArguments
-  [26] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
-  [27] = Reserved
-  [28] = InstanceField dart:core::_Closure::_function (field)
-  [29] = Reserved
-  [30] = DirectCall 'dart:async::_asyncStackTraceHelper', ArgDesc num-args 1, num-type-args 0, names []
-  [31] = Reserved
-  [32] = DirectCall 'dart:async::_asyncThenWrapperHelper', ArgDesc num-args 1, num-type-args 0, names []
-  [33] = Reserved
-  [34] = DirectCall 'dart:async::_asyncErrorWrapperHelper', ArgDesc num-args 1, num-type-args 0, names []
-  [35] = Reserved
-  [36] = ObjectRef ArgDesc num-args 2, num-type-args 0, names []
-  [37] = ICData dynamic target-name 'start', arg-desc CP#36
-  [38] = InterfaceCall 'dart:async::Completer::get:future', ArgDesc num-args 1, num-type-args 0, names []
-  [39] = Reserved
-  [40] = EndClosureFunctionScope
+  [20] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
+  [21] = Reserved
+  [22] = InstanceField dart:core::_Closure::_function_type_arguments (field)
+  [23] = Reserved
+  [24] = EmptyTypeArguments
+  [25] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
+  [26] = Reserved
+  [27] = InstanceField dart:core::_Closure::_function (field)
+  [28] = Reserved
+  [29] = DirectCall 'dart:async::_asyncStackTraceHelper', ArgDesc num-args 1, num-type-args 0, names []
+  [30] = Reserved
+  [31] = DirectCall 'dart:async::_asyncThenWrapperHelper', ArgDesc num-args 1, num-type-args 0, names []
+  [32] = Reserved
+  [33] = DirectCall 'dart:async::_asyncErrorWrapperHelper', ArgDesc num-args 1, num-type-args 0, names []
+  [34] = Reserved
+  [35] = ObjectRef ArgDesc num-args 2, num-type-args 0, names []
+  [36] = ICData dynamic target-name 'start', arg-desc CP#35
+  [37] = InterfaceCall 'dart:async::Completer::get:future', ArgDesc num-args 1, num-type-args 0, names []
+  [38] = Reserved
+  [39] = EndClosureFunctionScope
 }
 Closure #lib::closure::'nested' () -> dart:async::Future < dart:core::int >
-ClosureBytecode {
+ClosureCode {
   EntryFixed           1, 4
   CheckStack           0
   Push                 FP[-5]
@@ -1915,53 +1766,53 @@
   PushNull
   StoreContextVar      1, 7
   Push                 r0
-  Allocate             CP#20
+  AllocateClosure      CP#7
   StoreLocal           r2
   Push                 r2
   PushNull
-  StoreFieldTOS        CP#21
+  StoreFieldTOS        CP#20
   Push                 r2
   PushNull
-  StoreFieldTOS        CP#23
+  StoreFieldTOS        CP#22
   Push                 r2
-  PushConstant         CP#25
-  StoreFieldTOS        CP#26
+  PushConstant         CP#24
+  StoreFieldTOS        CP#25
   Push                 r2
   PushConstant         CP#7
-  StoreFieldTOS        CP#28
+  StoreFieldTOS        CP#27
   Push                 r2
   Push                 r0
   StoreFieldTOS        CP#1
   StoreContextVar      1, 8
   Push                 r0
   LoadContextVar       1, 8
-  DirectCall           1, CP#30
+  DirectCall           1, CP#29
   PopLocal             r3
   Push                 r0
   Push                 r0
   LoadContextVar       1, 8
-  DirectCall           1, CP#32
+  DirectCall           1, CP#31
   StoreContextVar      1, 2
   Push                 r0
   Push                 r0
   LoadContextVar       1, 8
-  DirectCall           1, CP#34
+  DirectCall           1, CP#33
   StoreContextVar      1, 3
   Push                 r0
   LoadContextVar       1, 0
   Push                 r0
   LoadContextVar       1, 8
-  DynamicCall          2, CP#37
+  DynamicCall          2, CP#36
   Drop1
   Push                 r0
   LoadContextVar       1, 0
-  InterfaceCall        1, CP#38
+  InterfaceCall        1, CP#37
   ReturnTOS
 
 }
 
 Closure #lib::closure::Closure/0::':async_op' ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic
-ClosureBytecode {
+ClosureCode {
   EntryOptional        1, 3, 0
   LoadConstant         r1, CP#8
   LoadConstant         r2, CP#8
@@ -2117,49 +1968,13 @@
   Jump                 L6
 
 }
-]static method closure(asy::Future<core::int> a) → dynamic {
-  core::int x = 3;
-  function nested() → asy::Future<core::int> /* originally async */ {
-    final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
-    asy::FutureOr<core::int> :return_value;
-    dynamic :async_stack_trace;
-    dynamic :async_op_then;
-    dynamic :async_op_error;
-    dynamic :await_jump_var = 0;
-    dynamic :await_ctx_var;
-    dynamic :saved_try_context_var0;
-    dynamic :saved_try_context_var1;
-    function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
-      try {
-        #L6:
-        {
-          core::int y = 4;
-          try {
-            x = 5;
-            [yield] let dynamic #t8 = asy::_awaitHelper(a, :async_op_then, :async_op_error, :async_op) in null;
-            y = :result;
-            :return_value = x.{core::num::+}(y);
-            break #L6;
-          }
-          finally {
-            core::print("fin");
-          }
-        }
-        asy::_completeOnAsyncReturn(:async_completer, :return_value);
-        return;
-      }
-      on dynamic catch(dynamic :exception, dynamic :stack_trace) {
-        :async_completer.{asy::Completer::completeError}(:exception, :stack_trace);
-      }
-    :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
-    :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
-    :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-    :async_completer.start(:async_op);
-    return :async_completer.{asy::Completer::future};
-  }
-  return nested;
-}
-[@vm.bytecode=
+
+
+Function 'testAssert', static, reflectable, async
+    parameters [dart:async::Future < dart:core::int > 'a'] (required: 1)
+    return-type dart:async::Future < dart:core::int >
+
+
 Bytecode {
   Entry                4
   CheckStack           0
@@ -2198,47 +2013,47 @@
   PushNull
   StoreContextVar      0, 7
   Push                 r0
-  Allocate             CP#20
+  AllocateClosure      CP#4
   StoreLocal           r2
   Push                 r2
   PushNull
-  StoreFieldTOS        CP#21
+  StoreFieldTOS        CP#20
   Push                 r2
   PushNull
-  StoreFieldTOS        CP#23
+  StoreFieldTOS        CP#22
   Push                 r2
-  PushConstant         CP#25
-  StoreFieldTOS        CP#26
+  PushConstant         CP#24
+  StoreFieldTOS        CP#25
   Push                 r2
   PushConstant         CP#4
-  StoreFieldTOS        CP#28
+  StoreFieldTOS        CP#27
   Push                 r2
   Push                 r0
   StoreFieldTOS        CP#6
   StoreContextVar      0, 8
   Push                 r0
   LoadContextVar       0, 8
-  DirectCall           1, CP#30
+  DirectCall           1, CP#29
   PopLocal             r3
   Push                 r0
   Push                 r0
   LoadContextVar       0, 8
-  DirectCall           1, CP#32
+  DirectCall           1, CP#31
   StoreContextVar      0, 3
   Push                 r0
   Push                 r0
   LoadContextVar       0, 8
-  DirectCall           1, CP#34
+  DirectCall           1, CP#33
   StoreContextVar      0, 4
   Push                 r0
   LoadContextVar       0, 1
   Push                 r0
   LoadContextVar       0, 8
-  DynamicCall          2, CP#37
+  DynamicCall          2, CP#36
   Drop1
   Push                 r0
   LoadContextVar       0, 1
-  InterfaceCall        1, CP#38
+  InterfaceCall        1, CP#37
   ReturnTOS
 }
 ConstantPool {
@@ -2262,29 +2077,28 @@
   [17] = InterfaceCall 'dart:async::Completer::completeError', ArgDesc num-args 3, num-type-args 0, names []
   [18] = Reserved
   [19] = EndClosureFunctionScope
-  [20] = Class dart:core::_Closure
-  [21] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
-  [22] = Reserved
-  [23] = InstanceField dart:core::_Closure::_function_type_arguments (field)
-  [24] = Reserved
-  [25] = EmptyTypeArguments
-  [26] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
-  [27] = Reserved
-  [28] = InstanceField dart:core::_Closure::_function (field)
-  [29] = Reserved
-  [30] = DirectCall 'dart:async::_asyncStackTraceHelper', ArgDesc num-args 1, num-type-args 0, names []
-  [31] = Reserved
-  [32] = DirectCall 'dart:async::_asyncThenWrapperHelper', ArgDesc num-args 1, num-type-args 0, names []
-  [33] = Reserved
-  [34] = DirectCall 'dart:async::_asyncErrorWrapperHelper', ArgDesc num-args 1, num-type-args 0, names []
-  [35] = Reserved
-  [36] = ObjectRef ArgDesc num-args 2, num-type-args 0, names []
-  [37] = ICData dynamic target-name 'start', arg-desc CP#36
-  [38] = InterfaceCall 'dart:async::Completer::get:future', ArgDesc num-args 1, num-type-args 0, names []
-  [39] = Reserved
+  [20] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
+  [21] = Reserved
+  [22] = InstanceField dart:core::_Closure::_function_type_arguments (field)
+  [23] = Reserved
+  [24] = EmptyTypeArguments
+  [25] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
+  [26] = Reserved
+  [27] = InstanceField dart:core::_Closure::_function (field)
+  [28] = Reserved
+  [29] = DirectCall 'dart:async::_asyncStackTraceHelper', ArgDesc num-args 1, num-type-args 0, names []
+  [30] = Reserved
+  [31] = DirectCall 'dart:async::_asyncThenWrapperHelper', ArgDesc num-args 1, num-type-args 0, names []
+  [32] = Reserved
+  [33] = DirectCall 'dart:async::_asyncErrorWrapperHelper', ArgDesc num-args 1, num-type-args 0, names []
+  [34] = Reserved
+  [35] = ObjectRef ArgDesc num-args 2, num-type-args 0, names []
+  [36] = ICData dynamic target-name 'start', arg-desc CP#35
+  [37] = InterfaceCall 'dart:async::Completer::get:future', ArgDesc num-args 1, num-type-args 0, names []
+  [38] = Reserved
 }
 Closure #lib::testAssert::':async_op' ([ dynamic :result, dynamic :exception, dynamic :stack_trace ]) -> dynamic
-ClosureBytecode {
+ClosureCode {
   EntryOptional        1, 3, 0
   LoadConstant         r1, CP#5
   LoadConstant         r2, CP#5
@@ -2386,39 +2200,13 @@
   Jump                 L6
 
 }
-]static method testAssert(asy::Future<core::int> a) → asy::Future<core::int> /* originally async */ {
-  final asy::_AsyncAwaitCompleter<core::int> :async_completer = new asy::_AsyncAwaitCompleter::•<core::int>();
-  asy::FutureOr<core::int> :return_value;
-  dynamic :async_stack_trace;
-  dynamic :async_op_then;
-  dynamic :async_op_error;
-  dynamic :await_jump_var = 0;
-  dynamic :await_ctx_var;
-  dynamic :saved_try_context_var0;
-  function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
-    try {
-      #L7:
-      {
-        assert {
-          [yield] let dynamic #t9 = asy::_awaitHelper(a, :async_op_then, :async_op_error, :async_op) in null;
-          assert(:result.{core::num::==}(42));
-        }
-        :return_value = 7;
-        break #L7;
-      }
-      asy::_completeOnAsyncReturn(:async_completer, :return_value);
-      return;
-    }
-    on dynamic catch(dynamic :exception, dynamic :stack_trace) {
-      :async_completer.{asy::Completer::completeError}(:exception, :stack_trace);
-    }
-  :async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
-  :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
-  :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
-  :async_completer.start(:async_op);
-  return :async_completer.{asy::Completer::future};
-}
-[@vm.bytecode=
+
+
+Function 'main', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -2427,4 +2215,274 @@
 }
 ConstantPool {
 }
-]static method main() → dynamic {}
+
+}
+
+}
+]library #lib from "#lib" as #lib {
+
+  import "dart:async";
+
+  static field (dart.async::Future<dart.core::int>) → dart.async::Future<dart.core::Null> asyncInFieldInitializer = (dart.async::Future<dart.core::int> x) → dart.async::Future<dart.core::Null> /* originally async */ {
+    final dart.async::_AsyncAwaitCompleter<dart.core::Null> :async_completer = new dart.async::_AsyncAwaitCompleter::•<dart.core::Null>();
+    dart.async::FutureOr<dart.core::Null> :return_value;
+    dynamic :async_stack_trace;
+    dynamic :async_op_then;
+    dynamic :async_op_error;
+    dynamic :await_jump_var = 0;
+    dynamic :await_ctx_var;
+    dynamic :saved_try_context_var0;
+    function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
+      try {
+        #L1:
+        {
+          [yield] let dynamic #t1 = dart.async::_awaitHelper(x, :async_op_then, :async_op_error, :async_op) in null;
+          :result;
+        }
+        dart.async::_completeOnAsyncReturn(:async_completer, :return_value);
+        return;
+      }
+      on dynamic catch(dynamic :exception, dynamic :stack_trace) {
+        :async_completer.{dart.async::Completer::completeError}(:exception, :stack_trace);
+      }
+    :async_stack_trace = dart.async::_asyncStackTraceHelper(:async_op);
+    :async_op_then = dart.async::_asyncThenWrapperHelper(:async_op);
+    :async_op_error = dart.async::_asyncErrorWrapperHelper(:async_op);
+    :async_completer.start(:async_op);
+    return :async_completer.{dart.async::Completer::future};
+  };
+  static method foo() → dart.async::Future<dart.core::int> /* originally async */ {
+    final dart.async::_AsyncAwaitCompleter<dart.core::int> :async_completer = new dart.async::_AsyncAwaitCompleter::•<dart.core::int>();
+    dart.async::FutureOr<dart.core::int> :return_value;
+    dynamic :async_stack_trace;
+    dynamic :async_op_then;
+    dynamic :async_op_error;
+    dynamic :await_jump_var = 0;
+    dynamic :await_ctx_var;
+    function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
+      try {
+        #L2:
+        {
+          :return_value = 42;
+          break #L2;
+        }
+        dart.async::_completeOnAsyncReturn(:async_completer, :return_value);
+        return;
+      }
+      on dynamic catch(dynamic :exception, dynamic :stack_trace) {
+        :async_completer.{dart.async::Completer::completeError}(:exception, :stack_trace);
+      }
+    :async_stack_trace = dart.async::_asyncStackTraceHelper(:async_op);
+    :async_op_then = dart.async::_asyncThenWrapperHelper(:async_op);
+    :async_op_error = dart.async::_asyncErrorWrapperHelper(:async_op);
+    :async_completer.start(:async_op);
+    return :async_completer.{dart.async::Completer::future};
+  }
+  static method simpleAsyncAwait(dart.async::Future<dart.core::int> a, dart.async::Future<dart.core::int> b) → dart.async::Future<dart.core::int> /* originally async */ {
+    final dart.async::_AsyncAwaitCompleter<dart.core::int> :async_completer = new dart.async::_AsyncAwaitCompleter::•<dart.core::int>();
+    dart.async::FutureOr<dart.core::int> :return_value;
+    dynamic :async_stack_trace;
+    dynamic :async_op_then;
+    dynamic :async_op_error;
+    dynamic :await_jump_var = 0;
+    dynamic :await_ctx_var;
+    dynamic :saved_try_context_var0;
+    dynamic :async_temporary_0;
+    function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
+      try {
+        #L3:
+        {
+          [yield] let dynamic #t2 = dart.async::_awaitHelper(a, :async_op_then, :async_op_error, :async_op) in null;
+          :async_temporary_0 = :result;
+          [yield] let dynamic #t3 = dart.async::_awaitHelper(b, :async_op_then, :async_op_error, :async_op) in null;
+          :return_value = :async_temporary_0.{dart.core::num::+}(:result);
+          break #L3;
+        }
+        dart.async::_completeOnAsyncReturn(:async_completer, :return_value);
+        return;
+      }
+      on dynamic catch(dynamic :exception, dynamic :stack_trace) {
+        :async_completer.{dart.async::Completer::completeError}(:exception, :stack_trace);
+      }
+    :async_stack_trace = dart.async::_asyncStackTraceHelper(:async_op);
+    :async_op_then = dart.async::_asyncThenWrapperHelper(:async_op);
+    :async_op_error = dart.async::_asyncErrorWrapperHelper(:async_op);
+    :async_completer.start(:async_op);
+    return :async_completer.{dart.async::Completer::future};
+  }
+  static method loops(dart.core::List<dart.core::int> list) → dart.async::Future<dart.core::int> /* originally async */ {
+    final dart.async::_AsyncAwaitCompleter<dart.core::int> :async_completer = new dart.async::_AsyncAwaitCompleter::•<dart.core::int>();
+    dart.async::FutureOr<dart.core::int> :return_value;
+    dynamic :async_stack_trace;
+    dynamic :async_op_then;
+    dynamic :async_op_error;
+    dynamic :await_jump_var = 0;
+    dynamic :await_ctx_var;
+    dynamic :saved_try_context_var0;
+    dynamic :async_temporary_0;
+    dynamic :async_temporary_1;
+    function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
+      try {
+        #L4:
+        {
+          dart.core::int sum = 0;
+          for (dart.core::int i = 0; i.{dart.core::num::<}(10); i = i.{dart.core::num::+}(1)) {
+            for (dart.core::int j in list) {
+              :async_temporary_1 = sum;
+              :async_temporary_0 = i.{dart.core::num::+}(j);
+              [yield] let dynamic #t4 = dart.async::_awaitHelper(#lib::foo(), :async_op_then, :async_op_error, :async_op) in null;
+              sum = :async_temporary_1.{dart.core::num::+}(:async_temporary_0.{dart.core::num::+}(:result));
+            }
+          }
+          for (dart.core::int k = 0; k.{dart.core::num::<}(10); k = k.{dart.core::num::+}(1)) {
+            sum = sum.{dart.core::num::+}(k);
+          }
+          :return_value = sum;
+          break #L4;
+        }
+        dart.async::_completeOnAsyncReturn(:async_completer, :return_value);
+        return;
+      }
+      on dynamic catch(dynamic :exception, dynamic :stack_trace) {
+        :async_completer.{dart.async::Completer::completeError}(:exception, :stack_trace);
+      }
+    :async_stack_trace = dart.async::_asyncStackTraceHelper(:async_op);
+    :async_op_then = dart.async::_asyncThenWrapperHelper(:async_op);
+    :async_op_error = dart.async::_asyncErrorWrapperHelper(:async_op);
+    :async_completer.start(:async_op);
+    return :async_completer.{dart.async::Completer::future};
+  }
+  static method tryCatchRethrow(dart.async::Future<dart.core::int> a, dart.async::Future<dart.core::int> b, dart.async::Future<dart.core::int> c) → dart.async::Future<dart.core::int> /* originally async */ {
+    final dart.async::_AsyncAwaitCompleter<dart.core::int> :async_completer = new dart.async::_AsyncAwaitCompleter::•<dart.core::int>();
+    dart.async::FutureOr<dart.core::int> :return_value;
+    dynamic :async_stack_trace;
+    dynamic :async_op_then;
+    dynamic :async_op_error;
+    dynamic :await_jump_var = 0;
+    dynamic :await_ctx_var;
+    dynamic :saved_try_context_var0;
+    dynamic :saved_try_context_var1;
+    dynamic :saved_try_context_var2;
+    dynamic :exception0;
+    dynamic :stack_trace0;
+    dynamic :async_temporary_0;
+    dynamic :async_temporary_1;
+    dynamic :async_temporary_2;
+    function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
+      try {
+        #L5:
+        {
+          dart.core::int x = 1;
+          try
+            try {
+              :async_temporary_0 = x;
+              [yield] let dynamic #t5 = dart.async::_awaitHelper(a, :async_op_then, :async_op_error, :async_op) in null;
+              x = :async_temporary_0.{dart.core::num::+}(:result);
+            }
+            on dynamic catch(final dynamic e) {
+              if(e is dart.core::Error) {
+                :return_value = 42;
+                break #L5;
+              }
+              :async_temporary_1 = x;
+              [yield] let dynamic #t6 = dart.async::_awaitHelper(b, :async_op_then, :async_op_error, :async_op) in null;
+              x = :async_temporary_1.{dart.core::num::+}(:result);
+              rethrow;
+            }
+          finally {
+            dart.core::print("fin");
+            :async_temporary_2 = x;
+            [yield] let dynamic #t7 = dart.async::_awaitHelper(c, :async_op_then, :async_op_error, :async_op) in null;
+            x = :async_temporary_2.{dart.core::num::+}(:result);
+            :return_value = x;
+            break #L5;
+          }
+        }
+        dart.async::_completeOnAsyncReturn(:async_completer, :return_value);
+        return;
+      }
+      on dynamic catch(dynamic :exception, dynamic :stack_trace) {
+        :async_completer.{dart.async::Completer::completeError}(:exception, :stack_trace);
+      }
+    :async_stack_trace = dart.async::_asyncStackTraceHelper(:async_op);
+    :async_op_then = dart.async::_asyncThenWrapperHelper(:async_op);
+    :async_op_error = dart.async::_asyncErrorWrapperHelper(:async_op);
+    :async_completer.start(:async_op);
+    return :async_completer.{dart.async::Completer::future};
+  }
+  static method closure(dart.async::Future<dart.core::int> a) → dynamic {
+    dart.core::int x = 3;
+    function nested() → dart.async::Future<dart.core::int> /* originally async */ {
+      final dart.async::_AsyncAwaitCompleter<dart.core::int> :async_completer = new dart.async::_AsyncAwaitCompleter::•<dart.core::int>();
+      dart.async::FutureOr<dart.core::int> :return_value;
+      dynamic :async_stack_trace;
+      dynamic :async_op_then;
+      dynamic :async_op_error;
+      dynamic :await_jump_var = 0;
+      dynamic :await_ctx_var;
+      dynamic :saved_try_context_var0;
+      dynamic :saved_try_context_var1;
+      function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
+        try {
+          #L6:
+          {
+            dart.core::int y = 4;
+            try {
+              x = 5;
+              [yield] let dynamic #t8 = dart.async::_awaitHelper(a, :async_op_then, :async_op_error, :async_op) in null;
+              y = :result;
+              :return_value = x.{dart.core::num::+}(y);
+              break #L6;
+            }
+            finally {
+              dart.core::print("fin");
+            }
+          }
+          dart.async::_completeOnAsyncReturn(:async_completer, :return_value);
+          return;
+        }
+        on dynamic catch(dynamic :exception, dynamic :stack_trace) {
+          :async_completer.{dart.async::Completer::completeError}(:exception, :stack_trace);
+        }
+      :async_stack_trace = dart.async::_asyncStackTraceHelper(:async_op);
+      :async_op_then = dart.async::_asyncThenWrapperHelper(:async_op);
+      :async_op_error = dart.async::_asyncErrorWrapperHelper(:async_op);
+      :async_completer.start(:async_op);
+      return :async_completer.{dart.async::Completer::future};
+    }
+    return nested;
+  }
+  static method testAssert(dart.async::Future<dart.core::int> a) → dart.async::Future<dart.core::int> /* originally async */ {
+    final dart.async::_AsyncAwaitCompleter<dart.core::int> :async_completer = new dart.async::_AsyncAwaitCompleter::•<dart.core::int>();
+    dart.async::FutureOr<dart.core::int> :return_value;
+    dynamic :async_stack_trace;
+    dynamic :async_op_then;
+    dynamic :async_op_error;
+    dynamic :await_jump_var = 0;
+    dynamic :await_ctx_var;
+    dynamic :saved_try_context_var0;
+    function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding 
+      try {
+        #L7:
+        {
+          assert {
+            [yield] let dynamic #t9 = dart.async::_awaitHelper(a, :async_op_then, :async_op_error, :async_op) in null;
+            assert(:result.{dart.core::num::==}(42));
+          }
+          :return_value = 7;
+          break #L7;
+        }
+        dart.async::_completeOnAsyncReturn(:async_completer, :return_value);
+        return;
+      }
+      on dynamic catch(dynamic :exception, dynamic :stack_trace) {
+        :async_completer.{dart.async::Completer::completeError}(:exception, :stack_trace);
+      }
+    :async_stack_trace = dart.async::_asyncStackTraceHelper(:async_op);
+    :async_op_then = dart.async::_asyncThenWrapperHelper(:async_op);
+    :async_op_error = dart.async::_asyncErrorWrapperHelper(:async_op);
+    :async_completer.start(:async_op);
+    return :async_completer.{dart.async::Completer::future};
+  }
+  static method main() → dynamic {}
+}
diff --git a/pkg/vm/testcases/bytecode/bootstrapping.dart.expect b/pkg/vm/testcases/bytecode/bootstrapping.dart.expect
index 31b1d4a..fe17198 100644
--- a/pkg/vm/testcases/bytecode/bootstrapping.dart.expect
+++ b/pkg/vm/testcases/bytecode/bootstrapping.dart.expect
@@ -1,374 +1,35 @@
-library #lib;
-import self as self;
-import "dart:core" as core;
-import "dart:_internal" as _in;
+main = #lib::main;
+ [@vm.bytecode=
+ComponentBytecodeMetadata {
 
-typedef _ScheduleImmediateClosure = (() → void) → void;
-class _ScheduleImmediate extends core::Object {
-  static field (() → void) → void _closure = null;
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  Push                 FP[-5]
-  DirectCall           1, CP#0
-  Drop1
-  PushNull
-  ReturnTOS
+Bytecode (version: stable)
+Main library: #lib
+
 }
-ConstantPool {
-  [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [1] = Reserved
-}
-]  synthetic constructor •() → self::_ScheduleImmediate
-    : super core::Object::•()
-    ;
-}
-class _NamespaceImpl extends core::Object implements self::_Namespace {
-  static field self::_NamespaceImpl _cachedNamespace = null;
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  Push                 FP[-5]
-  DirectCall           1, CP#0
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [1] = Reserved
-}
-]  constructor _() → self::_NamespaceImpl
-    : super core::Object::•()
-    ;
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  Push                 FP[-6]
-  Push                 FP[-5]
-  NativeCall           CP#0
-  ReturnTOS
-}
-ConstantPool {
-  [0] = NativeEntry Namespace_Create
-}
-]  @_in::ExternalName::•("Namespace_Create")
-  external static method _create(self::_NamespaceImpl namespace, dynamic n) → self::_NamespaceImpl;
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  Push                 FP[-5]
-  NativeCall           CP#0
-  ReturnTOS
-}
-ConstantPool {
-  [0] = NativeEntry Namespace_GetPointer
-}
-]  @_in::ExternalName::•("Namespace_GetPointer")
-  external static method _getPointer(self::_NamespaceImpl namespace) → core::int;
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  NativeCall           CP#0
-  ReturnTOS
-}
-ConstantPool {
-  [0] = NativeEntry Namespace_GetDefault
-}
-]  @_in::ExternalName::•("Namespace_GetDefault")
-  external static method _getDefault() → core::int;
-[@vm.bytecode=
-Bytecode {
-  Entry                2
-  CheckStack           0
-  Allocate             CP#0
-  StoreLocal           r1
-  Push                 r1
-  DirectCall           1, CP#1
-  Drop1
-  Push                 FP[-5]
-  DirectCall           2, CP#3
-  StoreStaticTOS       CP#5
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = Class #lib::_NamespaceImpl
-  [1] = DirectCall '#lib::_NamespaceImpl::_ (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [2] = Reserved
-  [3] = DirectCall '#lib::_NamespaceImpl::_create', ArgDesc num-args 2, num-type-args 0, names []
-  [4] = Reserved
-  [5] = StaticField #lib::_NamespaceImpl::_cachedNamespace (field)
-}
-]  static method _setupNamespace(dynamic namespace) → void {
-    self::_NamespaceImpl::_cachedNamespace = self::_NamespaceImpl::_create(new self::_NamespaceImpl::_(), namespace);
-  }
-[@vm.bytecode=
-Bytecode {
-  Entry                2
-  CheckStack           0
-  PushConstant         CP#0
-  PushStatic           CP#0
-  EqualsNull
-  JumpIfFalse          L1
-  Allocate             CP#1
-  StoreLocal           r1
-  Push                 r1
-  DirectCall           1, CP#2
-  Drop1
-  DirectCall           0, CP#4
-  DirectCall           2, CP#6
-  StoreStaticTOS       CP#0
-L1:
-  PushConstant         CP#0
-  PushStatic           CP#0
-  ReturnTOS
-}
-ConstantPool {
-  [0] = StaticField #lib::_NamespaceImpl::_cachedNamespace (field)
-  [1] = Class #lib::_NamespaceImpl
-  [2] = DirectCall '#lib::_NamespaceImpl::_ (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [3] = Reserved
-  [4] = DirectCall '#lib::_NamespaceImpl::_getDefault', ArgDesc num-args 0, num-type-args 0, names []
-  [5] = Reserved
-  [6] = DirectCall '#lib::_NamespaceImpl::_create', ArgDesc num-args 2, num-type-args 0, names []
-  [7] = Reserved
-}
-]  static get _namespace() → self::_NamespaceImpl {
-    if(self::_NamespaceImpl::_cachedNamespace.{core::Object::==}(null)) {
-      self::_NamespaceImpl::_cachedNamespace = self::_NamespaceImpl::_create(new self::_NamespaceImpl::_(), self::_NamespaceImpl::_getDefault());
-    }
-    return self::_NamespaceImpl::_cachedNamespace;
-  }
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  DirectCall           0, CP#0
-  DirectCall           1, CP#2
-  ReturnTOS
-}
-ConstantPool {
-  [0] = DirectCall '#lib::_NamespaceImpl::get:_namespace', ArgDesc num-args 0, num-type-args 0, names []
-  [1] = Reserved
-  [2] = DirectCall '#lib::_NamespaceImpl::_getPointer', ArgDesc num-args 1, num-type-args 0, names []
-  [3] = Reserved
-}
-]  static get _namespacePointer() → core::int
-    return self::_NamespaceImpl::_getPointer(self::_NamespaceImpl::_namespace);
-}
-class _Namespace extends core::Object {
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  Push                 FP[-5]
-  DirectCall           1, CP#0
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [1] = Reserved
-}
-]  synthetic constructor •() → self::_Namespace
-    : super core::Object::•()
-    ;
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  Push                 FP[-5]
-  DirectCall           1, CP#0
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = DirectCall '#lib::_NamespaceImpl::_setupNamespace', ArgDesc num-args 1, num-type-args 0, names []
-  [1] = Reserved
-}
-]  static method _setupNamespace(dynamic namespace) → void {
-    self::_NamespaceImpl::_setupNamespace(namespace);
-  }
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  DirectCall           0, CP#0
-  ReturnTOS
-}
-ConstantPool {
-  [0] = DirectCall '#lib::_NamespaceImpl::get:_namespace', ArgDesc num-args 0, num-type-args 0, names []
-  [1] = Reserved
-}
-]  static get _namespace() → self::_Namespace
-    return self::_NamespaceImpl::_namespace;
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  DirectCall           0, CP#0
-  ReturnTOS
-}
-ConstantPool {
-  [0] = DirectCall '#lib::_NamespaceImpl::get:_namespacePointer', ArgDesc num-args 0, num-type-args 0, names []
-  [1] = Reserved
-}
-]  static get _namespacePointer() → core::int
-    return self::_NamespaceImpl::_namespacePointer;
-}
-class VMLibraryHooks extends core::Object {
-  static field dynamic timerFactory = null;
-  static field dynamic eventHandlerSendData = null;
-  static field dynamic timerMillisecondClock = null;
-  static field dynamic resourceReadAsBytes = null;
-  static field dynamic packageRootString = null;
-  static field dynamic packageConfigString = null;
-  static field dynamic packageRootUriFuture = null;
-  static field dynamic packageConfigUriFuture = null;
-  static field dynamic resolvePackageUriFuture = null;
-  static field dynamic _computeScriptUri = null;
-  static field dynamic _cachedScript = null;
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  Push                 FP[-5]
-  DirectCall           1, CP#0
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [1] = Reserved
-}
-]  synthetic constructor •() → self::VMLibraryHooks
-    : super core::Object::•()
-    ;
-[@vm.bytecode=
-Bytecode {
-  Entry                1
-  CheckStack           0
-  Push                 FP[-5]
-  StoreStaticTOS       CP#0
-  PushNull
-  StoreStaticTOS       CP#1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = StaticField #lib::VMLibraryHooks::_computeScriptUri (field)
-  [1] = StaticField #lib::VMLibraryHooks::_cachedScript (field)
-}
-]  static set platformScript(dynamic f) → void {
-    self::VMLibraryHooks::_computeScriptUri = f;
-    self::VMLibraryHooks::_cachedScript = null;
-  }
-[@vm.bytecode=
-Bytecode {
-  Entry                1
-  CheckStack           0
-  PushConstant         CP#0
-  PushStatic           CP#0
-  EqualsNull
-  JumpIfFalse          L1
-  PushConstant         CP#1
-  PushStatic           CP#1
-  EqualsNull
-  BooleanNegateTOS
-  PopLocal             r0
-  Jump                 L2
-L1:
-  PushFalse
-  PopLocal             r0
-L2:
-  Push                 r0
-  JumpIfFalse          L3
-  PushConstant         CP#1
-  PushStatic           CP#1
-  DynamicCall          1, CP#3
-  StoreStaticTOS       CP#0
-L3:
-  PushConstant         CP#0
-  PushStatic           CP#0
-  ReturnTOS
-}
-ConstantPool {
-  [0] = StaticField #lib::VMLibraryHooks::_cachedScript (field)
-  [1] = StaticField #lib::VMLibraryHooks::_computeScriptUri (field)
-  [2] = ObjectRef ArgDesc num-args 1, num-type-args 0, names []
-  [3] = ICData dynamic target-name 'call', arg-desc CP#2
-}
-]  static get platformScript() → dynamic {
-    if(self::VMLibraryHooks::_cachedScript.{core::Object::==}(null) && !self::VMLibraryHooks::_computeScriptUri.{core::Object::==}(null)) {
-      self::VMLibraryHooks::_cachedScript = [@vm.call-site-attributes.metadata=receiverType:dynamic] self::VMLibraryHooks::_computeScriptUri.call();
-    }
-    return self::VMLibraryHooks::_cachedScript;
-  }
-}
-class Stdin extends core::Object {
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  Push                 FP[-5]
-  DirectCall           1, CP#0
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [1] = Reserved
-}
-]  synthetic constructor •() → self::Stdin
-    : super core::Object::•()
-    ;
-}
-class _StdIOUtils extends core::Object {
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  Push                 FP[-5]
-  DirectCall           1, CP#0
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [1] = Reserved
-}
-]  synthetic constructor •() → self::_StdIOUtils
-    : super core::Object::•()
-    ;
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-}
-]  static method _getStdioInputStream(core::int fd) → self::Stdin
-    return null;
-}
-static field core::int _stdinFD = 0;
-static field core::int _stdoutFD = 1;
-static field core::int _stderrFD = 2;
-static field core::String _rawScript;
-static field self::Stdin _stdin;
-[@vm.bytecode=
+] [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+Field '_stdinFD', type = dart:core::int, reflectable, static
+    value = const 0
+
+Field '_stdoutFD', type = dart:core::int, reflectable, static
+    value = const 1
+
+Field '_stderrFD', type = dart:core::int, reflectable, static
+    value = const 2
+
+Field '_rawScript', type = dart:core::String, reflectable, static
+    value = null
+
+Field '_stdin', type = #lib::Stdin, reflectable, static
+    value = null
+
+Function '_printString', static, reflectable, debuggable, native 'Builtin_PrintString'
+    parameters [dart:core::String 's'] (required: 1)
+    return-type void
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -379,9 +40,13 @@
 ConstantPool {
   [0] = NativeEntry Builtin_PrintString
 }
-]@_in::ExternalName::•("Builtin_PrintString")
-external static method _printString(core::String s) → void;
-[@vm.bytecode=
+
+
+Function '_print', static, reflectable, debuggable
+    parameters [dynamic 'arg'] (required: 1)
+    return-type void
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -398,10 +63,13 @@
   [2] = DirectCall '#lib::_printString', ArgDesc num-args 1, num-type-args 0, names []
   [3] = Reserved
 }
-]static method _print(dynamic arg) → void {
-  self::_printString(arg.{core::Object::toString}());
-}
-[@vm.bytecode=
+
+
+Function '_getPrintClosure', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -411,9 +79,13 @@
 ConstantPool {
   [0] = ObjectRef const tear-off #lib::_print
 }
-]static method _getPrintClosure() → dynamic
-  return self::_print;
-[@vm.bytecode=
+
+
+Function '_setScheduleImmediateClosure', static, reflectable, debuggable
+    parameters [FunctionType (FunctionType () -> void) -> void 'closure'] (required: 1)
+    return-type void
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -425,10 +97,13 @@
 ConstantPool {
   [0] = StaticField #lib::_ScheduleImmediate::_closure (field)
 }
-]static method _setScheduleImmediateClosure((() → void) → void closure) → void {
-  self::_ScheduleImmediate::_closure = closure;
-}
-[@vm.bytecode=
+
+
+Function '_setStdioFDs', static, reflectable, debuggable
+    parameters [dart:core::int 'stdin', dart:core::int 'stdout', dart:core::int 'stderr'] (required: 3)
+    return-type void
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -446,12 +121,13 @@
   [1] = StaticField #lib::_stdoutFD (field)
   [2] = StaticField #lib::_stderrFD (field)
 }
-]static method _setStdioFDs(core::int stdin, core::int stdout, core::int stderr) → void {
-  self::_stdinFD = stdin;
-  self::_stdoutFD = stdout;
-  self::_stderrFD = stderr;
-}
-[@vm.bytecode=
+
+
+Function '_scriptUri', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dart:core::Uri
+
+
 Bytecode {
   Entry                2
   CheckStack           0
@@ -516,15 +192,13 @@
   [12] = InterfaceCall 'dart:core::Uri::resolveUri', ArgDesc num-args 2, num-type-args 0, names []
   [13] = Reserved
 }
-]static method _scriptUri() → core::Uri {
-  if(self::_rawScript.{core::String::startsWith}("http:") || self::_rawScript.{core::String::startsWith}("https:") || self::_rawScript.{core::String::startsWith}("file:")) {
-    return core::Uri::parse(self::_rawScript);
-  }
-  else {
-    return core::Uri::base.{core::Uri::resolveUri}(core::_Uri::file(self::_rawScript));
-  }
-}
-[@vm.bytecode=
+
+
+Function '_setupHooks', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -539,10 +213,13 @@
   [1] = DirectCall '#lib::VMLibraryHooks::set:platformScript', ArgDesc num-args 1, num-type-args 0, names []
   [2] = Reserved
 }
-]static method _setupHooks() → dynamic {
-  self::VMLibraryHooks::platformScript = self::_scriptUri;
-}
-[@vm.bytecode=
+
+
+Function 'get:stdin', getter, static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type #lib::Stdin
+
+
 Bytecode {
   Entry                2
   CheckStack           0
@@ -574,11 +251,13 @@
   [2] = DirectCall '#lib::_StdIOUtils::_getStdioInputStream', ArgDesc num-args 1, num-type-args 0, names []
   [3] = Reserved
 }
-]static get stdin() → self::Stdin {
-  self::_stdin.{core::Object::==}(null) ?{self::Stdin} self::_stdin = self::_StdIOUtils::_getStdioInputStream(self::_stdinFD) : null;
-  return self::_stdin;
-}
-[@vm.bytecode=
+
+
+Function 'main', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -587,4 +266,604 @@
 }
 ConstantPool {
 }
-]static method main() → dynamic {}
+
+}
+
+}
+]library #lib from "#lib" as #lib {
+
+  typedef _ScheduleImmediateClosure = (() → void) → void;
+[@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+Field '_closure', type = FunctionType (FunctionType () -> void) -> void, reflectable, static
+    value = null
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::_ScheduleImmediate
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  Push                 FP[-5]
+  DirectCall           1, CP#0
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [1] = Reserved
+}
+
+}
+
+}
+]  class _ScheduleImmediate extends dart.core::Object {
+    static field (() → void) → void _closure = null;
+    synthetic constructor •() → #lib::_ScheduleImmediate
+      : super dart.core::Object::•()
+      ;
+  }
+[@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+Field '_cachedNamespace', type = #lib::_NamespaceImpl, reflectable, static
+    value = null
+
+Function '_', constructor, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type #lib::_NamespaceImpl
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  Push                 FP[-5]
+  DirectCall           1, CP#0
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [1] = Reserved
+}
+
+
+Function '_create', static, reflectable, debuggable, native 'Namespace_Create'
+    parameters [#lib::_NamespaceImpl 'namespace', dynamic 'n'] (required: 2)
+    return-type #lib::_NamespaceImpl
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  Push                 FP[-6]
+  Push                 FP[-5]
+  NativeCall           CP#0
+  ReturnTOS
+}
+ConstantPool {
+  [0] = NativeEntry Namespace_Create
+}
+
+
+Function '_getPointer', static, reflectable, debuggable, native 'Namespace_GetPointer'
+    parameters [#lib::_NamespaceImpl 'namespace'] (required: 1)
+    return-type dart:core::int
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  Push                 FP[-5]
+  NativeCall           CP#0
+  ReturnTOS
+}
+ConstantPool {
+  [0] = NativeEntry Namespace_GetPointer
+}
+
+
+Function '_getDefault', static, reflectable, debuggable, native 'Namespace_GetDefault'
+    parameters [] (required: 0)
+    return-type dart:core::int
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  NativeCall           CP#0
+  ReturnTOS
+}
+ConstantPool {
+  [0] = NativeEntry Namespace_GetDefault
+}
+
+
+Function '_setupNamespace', static, reflectable, debuggable
+    parameters [dynamic 'namespace'] (required: 1)
+    return-type void
+
+
+Bytecode {
+  Entry                2
+  CheckStack           0
+  Allocate             CP#0
+  StoreLocal           r1
+  Push                 r1
+  DirectCall           1, CP#1
+  Drop1
+  Push                 FP[-5]
+  DirectCall           2, CP#3
+  StoreStaticTOS       CP#5
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = Class #lib::_NamespaceImpl
+  [1] = DirectCall '#lib::_NamespaceImpl::_ (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [2] = Reserved
+  [3] = DirectCall '#lib::_NamespaceImpl::_create', ArgDesc num-args 2, num-type-args 0, names []
+  [4] = Reserved
+  [5] = StaticField #lib::_NamespaceImpl::_cachedNamespace (field)
+}
+
+
+Function 'get:_namespace', getter, static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type #lib::_NamespaceImpl
+
+
+Bytecode {
+  Entry                2
+  CheckStack           0
+  PushConstant         CP#0
+  PushStatic           CP#0
+  EqualsNull
+  JumpIfFalse          L1
+  Allocate             CP#1
+  StoreLocal           r1
+  Push                 r1
+  DirectCall           1, CP#2
+  Drop1
+  DirectCall           0, CP#4
+  DirectCall           2, CP#6
+  StoreStaticTOS       CP#0
+L1:
+  PushConstant         CP#0
+  PushStatic           CP#0
+  ReturnTOS
+}
+ConstantPool {
+  [0] = StaticField #lib::_NamespaceImpl::_cachedNamespace (field)
+  [1] = Class #lib::_NamespaceImpl
+  [2] = DirectCall '#lib::_NamespaceImpl::_ (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [3] = Reserved
+  [4] = DirectCall '#lib::_NamespaceImpl::_getDefault', ArgDesc num-args 0, num-type-args 0, names []
+  [5] = Reserved
+  [6] = DirectCall '#lib::_NamespaceImpl::_create', ArgDesc num-args 2, num-type-args 0, names []
+  [7] = Reserved
+}
+
+
+Function 'get:_namespacePointer', getter, static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dart:core::int
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  DirectCall           0, CP#0
+  DirectCall           1, CP#2
+  ReturnTOS
+}
+ConstantPool {
+  [0] = DirectCall '#lib::_NamespaceImpl::get:_namespace', ArgDesc num-args 0, num-type-args 0, names []
+  [1] = Reserved
+  [2] = DirectCall '#lib::_NamespaceImpl::_getPointer', ArgDesc num-args 1, num-type-args 0, names []
+  [3] = Reserved
+}
+
+}
+
+}
+]  class _NamespaceImpl extends dart.core::Object implements #lib::_Namespace {
+    static field #lib::_NamespaceImpl _cachedNamespace = null;
+    constructor _() → #lib::_NamespaceImpl
+      : super dart.core::Object::•()
+      ;
+    @#C2
+    external static method _create(#lib::_NamespaceImpl namespace, dynamic n) → #lib::_NamespaceImpl;
+    @#C4
+    external static method _getPointer(#lib::_NamespaceImpl namespace) → dart.core::int;
+    @#C6
+    external static method _getDefault() → dart.core::int;
+    static method _setupNamespace(dynamic namespace) → void {
+      #lib::_NamespaceImpl::_cachedNamespace = #lib::_NamespaceImpl::_create(new #lib::_NamespaceImpl::_(), namespace);
+    }
+    static get _namespace() → #lib::_NamespaceImpl {
+      if(#lib::_NamespaceImpl::_cachedNamespace.{dart.core::Object::==}(null)) {
+        #lib::_NamespaceImpl::_cachedNamespace = #lib::_NamespaceImpl::_create(new #lib::_NamespaceImpl::_(), #lib::_NamespaceImpl::_getDefault());
+      }
+      return #lib::_NamespaceImpl::_cachedNamespace;
+    }
+    static get _namespacePointer() → dart.core::int
+      return #lib::_NamespaceImpl::_getPointer(#lib::_NamespaceImpl::_namespace);
+  }
+[@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::_Namespace
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  Push                 FP[-5]
+  DirectCall           1, CP#0
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [1] = Reserved
+}
+
+
+Function '_setupNamespace', static, reflectable, debuggable
+    parameters [dynamic 'namespace'] (required: 1)
+    return-type void
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  Push                 FP[-5]
+  DirectCall           1, CP#0
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = DirectCall '#lib::_NamespaceImpl::_setupNamespace', ArgDesc num-args 1, num-type-args 0, names []
+  [1] = Reserved
+}
+
+
+Function 'get:_namespace', getter, static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type #lib::_Namespace
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  DirectCall           0, CP#0
+  ReturnTOS
+}
+ConstantPool {
+  [0] = DirectCall '#lib::_NamespaceImpl::get:_namespace', ArgDesc num-args 0, num-type-args 0, names []
+  [1] = Reserved
+}
+
+
+Function 'get:_namespacePointer', getter, static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dart:core::int
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  DirectCall           0, CP#0
+  ReturnTOS
+}
+ConstantPool {
+  [0] = DirectCall '#lib::_NamespaceImpl::get:_namespacePointer', ArgDesc num-args 0, num-type-args 0, names []
+  [1] = Reserved
+}
+
+}
+
+}
+]  class _Namespace extends dart.core::Object {
+    synthetic constructor •() → #lib::_Namespace
+      : super dart.core::Object::•()
+      ;
+    static method _setupNamespace(dynamic namespace) → void {
+      #lib::_NamespaceImpl::_setupNamespace(namespace);
+    }
+    static get _namespace() → #lib::_Namespace
+      return #lib::_NamespaceImpl::_namespace;
+    static get _namespacePointer() → dart.core::int
+      return #lib::_NamespaceImpl::_namespacePointer;
+  }
+[@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+Field 'timerFactory', type = dynamic, reflectable, static
+    value = null
+
+Field 'eventHandlerSendData', type = dynamic, reflectable, static
+    value = null
+
+Field 'timerMillisecondClock', type = dynamic, reflectable, static
+    value = null
+
+Field 'resourceReadAsBytes', type = dynamic, reflectable, static
+    value = null
+
+Field 'packageRootString', type = dynamic, reflectable, static
+    value = null
+
+Field 'packageConfigString', type = dynamic, reflectable, static
+    value = null
+
+Field 'packageRootUriFuture', type = dynamic, reflectable, static
+    value = null
+
+Field 'packageConfigUriFuture', type = dynamic, reflectable, static
+    value = null
+
+Field 'resolvePackageUriFuture', type = dynamic, reflectable, static
+    value = null
+
+Field '_computeScriptUri', type = dynamic, reflectable, static
+    value = null
+
+Field '_cachedScript', type = dynamic, reflectable, static
+    value = null
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::VMLibraryHooks
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  Push                 FP[-5]
+  DirectCall           1, CP#0
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [1] = Reserved
+}
+
+
+Function 'set:platformScript', setter, static, reflectable, debuggable
+    parameters [dynamic 'f'] (required: 1)
+    return-type void
+
+
+Bytecode {
+  Entry                1
+  CheckStack           0
+  Push                 FP[-5]
+  StoreStaticTOS       CP#0
+  PushNull
+  StoreStaticTOS       CP#1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = StaticField #lib::VMLibraryHooks::_computeScriptUri (field)
+  [1] = StaticField #lib::VMLibraryHooks::_cachedScript (field)
+}
+
+
+Function 'get:platformScript', getter, static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
+Bytecode {
+  Entry                1
+  CheckStack           0
+  PushConstant         CP#0
+  PushStatic           CP#0
+  EqualsNull
+  JumpIfFalse          L1
+  PushConstant         CP#1
+  PushStatic           CP#1
+  EqualsNull
+  BooleanNegateTOS
+  PopLocal             r0
+  Jump                 L2
+L1:
+  PushFalse
+  PopLocal             r0
+L2:
+  Push                 r0
+  JumpIfFalse          L3
+  PushConstant         CP#1
+  PushStatic           CP#1
+  DynamicCall          1, CP#3
+  StoreStaticTOS       CP#0
+L3:
+  PushConstant         CP#0
+  PushStatic           CP#0
+  ReturnTOS
+}
+ConstantPool {
+  [0] = StaticField #lib::VMLibraryHooks::_cachedScript (field)
+  [1] = StaticField #lib::VMLibraryHooks::_computeScriptUri (field)
+  [2] = ObjectRef ArgDesc num-args 1, num-type-args 0, names []
+  [3] = ICData dynamic target-name 'call', arg-desc CP#2
+}
+
+}
+
+}
+]  class VMLibraryHooks extends dart.core::Object {
+    static field dynamic timerFactory = null;
+    static field dynamic eventHandlerSendData = null;
+    static field dynamic timerMillisecondClock = null;
+    static field dynamic resourceReadAsBytes = null;
+    static field dynamic packageRootString = null;
+    static field dynamic packageConfigString = null;
+    static field dynamic packageRootUriFuture = null;
+    static field dynamic packageConfigUriFuture = null;
+    static field dynamic resolvePackageUriFuture = null;
+    static field dynamic _computeScriptUri = null;
+    static field dynamic _cachedScript = null;
+    synthetic constructor •() → #lib::VMLibraryHooks
+      : super dart.core::Object::•()
+      ;
+    static set platformScript(dynamic f) → void {
+      #lib::VMLibraryHooks::_computeScriptUri = f;
+      #lib::VMLibraryHooks::_cachedScript = null;
+    }
+    static get platformScript() → dynamic {
+      if(#lib::VMLibraryHooks::_cachedScript.{dart.core::Object::==}(null) && !#lib::VMLibraryHooks::_computeScriptUri.{dart.core::Object::==}(null)) {
+        #lib::VMLibraryHooks::_cachedScript = [@vm.call-site-attributes.metadata=receiverType:dynamic] #lib::VMLibraryHooks::_computeScriptUri.call();
+      }
+      return #lib::VMLibraryHooks::_cachedScript;
+    }
+  }
+[@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::Stdin
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  Push                 FP[-5]
+  DirectCall           1, CP#0
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [1] = Reserved
+}
+
+}
+
+}
+]  class Stdin extends dart.core::Object {
+    synthetic constructor •() → #lib::Stdin
+      : super dart.core::Object::•()
+      ;
+  }
+[@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::_StdIOUtils
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  Push                 FP[-5]
+  DirectCall           1, CP#0
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [1] = Reserved
+}
+
+
+Function '_getStdioInputStream', static, reflectable, debuggable
+    parameters [dart:core::int 'fd'] (required: 1)
+    return-type #lib::Stdin
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+}
+
+}
+
+}
+]  class _StdIOUtils extends dart.core::Object {
+    synthetic constructor •() → #lib::_StdIOUtils
+      : super dart.core::Object::•()
+      ;
+    static method _getStdioInputStream(dart.core::int fd) → #lib::Stdin
+      return null;
+  }
+  static field dart.core::int _stdinFD = 0;
+  static field dart.core::int _stdoutFD = 1;
+  static field dart.core::int _stderrFD = 2;
+  static field dart.core::String _rawScript;
+  static field #lib::Stdin _stdin;
+  @#C8
+  external static method _printString(dart.core::String s) → void;
+  static method _print(dynamic arg) → void {
+    #lib::_printString(arg.{dart.core::Object::toString}());
+  }
+  static method _getPrintClosure() → dynamic
+    return #C9;
+  static method _setScheduleImmediateClosure((() → void) → void closure) → void {
+    #lib::_ScheduleImmediate::_closure = closure;
+  }
+  static method _setStdioFDs(dart.core::int stdin, dart.core::int stdout, dart.core::int stderr) → void {
+    #lib::_stdinFD = stdin;
+    #lib::_stdoutFD = stdout;
+    #lib::_stderrFD = stderr;
+  }
+  static method _scriptUri() → dart.core::Uri {
+    if(#lib::_rawScript.{dart.core::String::startsWith}("http:") || #lib::_rawScript.{dart.core::String::startsWith}("https:") || #lib::_rawScript.{dart.core::String::startsWith}("file:")) {
+      return dart.core::Uri::parse(#lib::_rawScript);
+    }
+    else {
+      return dart.core::Uri::base.{dart.core::Uri::resolveUri}(dart.core::_Uri::file(#lib::_rawScript));
+    }
+  }
+  static method _setupHooks() → dynamic {
+    #lib::VMLibraryHooks::platformScript = #C10;
+  }
+  static get stdin() → #lib::Stdin {
+    #lib::_stdin.{dart.core::Object::==}(null) ?{#lib::Stdin} #lib::_stdin = #lib::_StdIOUtils::_getStdioInputStream(#lib::_stdinFD) : null;
+    return #lib::_stdin;
+  }
+  static method main() → dynamic {}
+}
+constants  {
+  #C1 = "Namespace_Create"
+  #C2 = dart._internal::ExternalName {name: #C1}
+  #C3 = "Namespace_GetPointer"
+  #C4 = dart._internal::ExternalName {name: #C3}
+  #C5 = "Namespace_GetDefault"
+  #C6 = dart._internal::ExternalName {name: #C5}
+  #C7 = "Builtin_PrintString"
+  #C8 = dart._internal::ExternalName {name: #C7}
+  #C9 = TearOffConstant(#lib::_print)
+  #C10 = TearOffConstant(#lib::_scriptUri)
+}
diff --git a/pkg/vm/testcases/bytecode/closures.dart.expect b/pkg/vm/testcases/bytecode/closures.dart.expect
index 6eaeaf0..c168ee6 100644
--- a/pkg/vm/testcases/bytecode/closures.dart.expect
+++ b/pkg/vm/testcases/bytecode/closures.dart.expect
@@ -1,10 +1,390 @@
-library #lib;
-import self as self;
-import "dart:core" as core;
+main = #lib::main;
+ [@vm.bytecode=
+ComponentBytecodeMetadata {
 
-typedef IntFunc = (core::int) → dynamic;
-class C1 extends core::Object {
+Bytecode (version: stable)
+Main library: #lib
+
+}
+] [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function 'simpleClosure', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dart:core::int
+
+
+Bytecode {
+  Entry                4
+  CheckStack           0
+  AllocateContext      0, 1
+  PopLocal             r0
+  Push                 r0
+  PushInt              5
+  StoreContextVar      0, 0
+  AllocateClosure      CP#0
+  StoreLocal           r3
+  Push                 r3
+  PushNull
+  StoreFieldTOS        CP#7
+  Push                 r3
+  PushNull
+  StoreFieldTOS        CP#9
+  Push                 r3
+  PushConstant         CP#11
+  StoreFieldTOS        CP#12
+  Push                 r3
+  PushConstant         CP#0
+  StoreFieldTOS        CP#14
+  Push                 r3
+  Push                 r0
+  StoreFieldTOS        CP#1
+  PopLocal             r2
+  Push                 r2
+  PushInt              3
+  DynamicCall          2, CP#17
+  Drop1
+  Push                 r0
+  LoadContextVar       0, 0
+  ReturnTOS
+}
+ConstantPool {
+  [0] = ClosureFunction 0
+  [1] = InstanceField dart:core::_Closure::_context (field)
+  [2] = Reserved
+  [3] = Type dart:core::int
+  [4] = ObjectRef 'y'
+  [5] = SubtypeTestCache
+  [6] = EndClosureFunctionScope
+  [7] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
+  [8] = Reserved
+  [9] = InstanceField dart:core::_Closure::_function_type_arguments (field)
+  [10] = Reserved
+  [11] = EmptyTypeArguments
+  [12] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
+  [13] = Reserved
+  [14] = InstanceField dart:core::_Closure::_function (field)
+  [15] = Reserved
+  [16] = ObjectRef ArgDesc num-args 2, num-type-args 0, names []
+  [17] = ICData dynamic target-name 'call', arg-desc CP#16
+}
+Closure #lib::simpleClosure::'<anonymous closure>' (dart:core::int y) -> dart:core::Null
+ClosureCode {
+  EntryFixed           2, 3
+  CheckStack           0
+  Push                 FP[-6]
+  LoadFieldTOS         CP#1
+  PopLocal             r0
+  Push                 FP[-5]
+  PushConstant         CP#3
+  PushNull
+  PushNull
+  PushConstant         CP#4
+  AssertAssignable     1, CP#5
+  Drop1
+  Push                 r0
+  Push                 r0
+  LoadContextVar       0, 0
+  Push                 FP[-5]
+  AddInt
+  StoreContextVar      0, 0
+  PushNull
+  ReturnTOS
+
+}
+
+
+Function 'callWithArgs', static, reflectable, debuggable
+    type-params <dart:core::Object T1, dart:core::Object T2, dart:core::Object T3, dart:core::Object T4, dart:core::Object T5, dart:core::Object T6, dart:core::Object T7, dart:core::Object T8>
+    parameters [] (required: 0)
+    return-type void
+
+
+Bytecode {
+  Entry                2
+  CheckStack           0
+  CheckFunctionTypeArgs 8, r0
+  PushConstant         CP#0
+  StoreLocal           r1
+  Push                 r1
+  PushInt              8
+  CreateArrayTOS
+  StoreLocal           r1
+  Push                 r1
+  PushInt              0
+  PushNull
+  Push                 r0
+  InstantiateType      CP#1
+  StoreIndexedTOS
+  Push                 r1
+  PushInt              1
+  PushNull
+  Push                 r0
+  InstantiateType      CP#2
+  StoreIndexedTOS
+  Push                 r1
+  PushInt              2
+  PushNull
+  Push                 r0
+  InstantiateType      CP#3
+  StoreIndexedTOS
+  Push                 r1
+  PushInt              3
+  PushNull
+  Push                 r0
+  InstantiateType      CP#4
+  StoreIndexedTOS
+  Push                 r1
+  PushInt              4
+  PushNull
+  Push                 r0
+  InstantiateType      CP#5
+  StoreIndexedTOS
+  Push                 r1
+  PushInt              5
+  PushNull
+  Push                 r0
+  InstantiateType      CP#6
+  StoreIndexedTOS
+  Push                 r1
+  PushInt              6
+  PushNull
+  Push                 r0
+  InstantiateType      CP#7
+  StoreIndexedTOS
+  Push                 r1
+  PushInt              7
+  PushNull
+  Push                 r0
+  InstantiateType      CP#8
+  StoreIndexedTOS
+  DirectCall           2, CP#9
+  DirectCall           1, CP#11
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = ObjectRef < dart:core::Type >
+  [1] = Type #lib::callWithArgs::TypeParam/0
+  [2] = Type #lib::callWithArgs::TypeParam/1
+  [3] = Type #lib::callWithArgs::TypeParam/2
+  [4] = Type #lib::callWithArgs::TypeParam/3
+  [5] = Type #lib::callWithArgs::TypeParam/4
+  [6] = Type #lib::callWithArgs::TypeParam/5
+  [7] = Type #lib::callWithArgs::TypeParam/6
+  [8] = Type #lib::callWithArgs::TypeParam/7
+  [9] = DirectCall 'dart:core::List::_fromLiteral (constructor)', ArgDesc num-args 2, num-type-args 0, names []
+  [10] = Reserved
+  [11] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
+  [12] = Reserved
+}
+
+
+Function 'callA', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type void
+
+
+Bytecode {
+  Entry                1
+  CheckStack           0
+  PushConstant         CP#0
+  PushConstant         CP#2
+  PushConstant         CP#1
+  AllocateT
+  StoreLocal           r0
+  Push                 r0
+  DirectCall           1, CP#3
+  Drop1
+  InterfaceCall        2, CP#5
+  Drop1
+  PushConstant         CP#7
+  PushConstant         CP#2
+  PushConstant         CP#1
+  AllocateT
+  StoreLocal           r0
+  Push                 r0
+  DirectCall           1, CP#3
+  Drop1
+  InterfaceCall        2, CP#5
+  Drop1
+  PushConstant         CP#7
+  PushConstant         CP#8
+  PushConstant         CP#1
+  AllocateT
+  StoreLocal           r0
+  Push                 r0
+  DirectCall           1, CP#3
+  Drop1
+  InterfaceCall        2, CP#5
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = ObjectRef < #lib::C3, #lib::C4 >
+  [1] = Class #lib::A
+  [2] = ObjectRef < #lib::C1, #lib::C2 >
+  [3] = DirectCall '#lib::A:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [4] = Reserved
+  [5] = InterfaceCall '#lib::A::foo', ArgDesc num-args 1, num-type-args 2, names []
+  [6] = Reserved
+  [7] = ObjectRef < dart:core::List < #lib::C3 >, dart:core::List < #lib::C4 > >
+  [8] = ObjectRef < dart:core::List < #lib::C1 >, dart:core::List < #lib::C2 > >
+}
+
+
+Function 'testPartialInstantiation', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type FunctionType (dart:core::int) -> dynamic
+
+
+Bytecode {
+  Entry                7
+  CheckStack           0
+  AllocateClosure      CP#0
+  StoreLocal           r3
+  Push                 r3
+  PushNull
+  StoreFieldTOS        CP#14
+  Push                 r3
+  PushNull
+  StoreFieldTOS        CP#6
+  Push                 r3
+  PushConstant         CP#5
+  StoreFieldTOS        CP#3
+  Push                 r3
+  PushConstant         CP#0
+  StoreFieldTOS        CP#16
+  Push                 r3
+  Push                 r0
+  StoreFieldTOS        CP#1
+  PopLocal             r2
+  Push                 r2
+  StoreLocal           r3
+  PushConstant         CP#18
+  StoreLocal           r6
+  DirectCall           2, CP#19
+  Drop1
+  Allocate             CP#21
+  StoreLocal           r5
+  Push                 r6
+  StoreFieldTOS        CP#3
+  Push                 r5
+  Push                 r3
+  LoadFieldTOS         CP#14
+  StoreFieldTOS        CP#14
+  Push                 r5
+  Push                 r3
+  LoadFieldTOS         CP#6
+  StoreFieldTOS        CP#6
+  Push                 r5
+  Push                 r3
+  LoadFieldTOS         CP#16
+  StoreFieldTOS        CP#16
+  Push                 r5
+  Push                 r3
+  LoadFieldTOS         CP#1
+  StoreFieldTOS        CP#1
+  Push                 r5
+  PopLocal             r4
+  Push                 r4
+  ReturnTOS
+}
+ConstantPool {
+  [0] = ClosureFunction 0
+  [1] = InstanceField dart:core::_Closure::_context (field)
+  [2] = Reserved
+  [3] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
+  [4] = Reserved
+  [5] = EmptyTypeArguments
+  [6] = InstanceField dart:core::_Closure::_function_type_arguments (field)
+  [7] = Reserved
+  [8] = DirectCall 'dart:_internal::_prependTypeArguments', ArgDesc num-args 4, num-type-args 0, names []
+  [9] = Reserved
+  [10] = Type #lib::testPartialInstantiation::Closure/0::TypeParam/0
+  [11] = ObjectRef 't'
+  [12] = SubtypeTestCache
+  [13] = EndClosureFunctionScope
+  [14] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
+  [15] = Reserved
+  [16] = InstanceField dart:core::_Closure::_function (field)
+  [17] = Reserved
+  [18] = ObjectRef < dart:core::int >
+  [19] = DirectCall 'dart:_internal::_boundsCheckForPartialInstantiation', ArgDesc num-args 2, num-type-args 0, names []
+  [20] = Reserved
+  [21] = Class dart:core::_Closure
+}
+Closure #lib::testPartialInstantiation::'foo' <dart:core::Object T> (#lib::testPartialInstantiation::Closure/0::TypeParam/0 t) -> void
+ClosureCode {
+  EntryFixed           2, 3
+  CheckStack           0
+  Push                 FP[-6]
+  LoadFieldTOS         CP#1
+  PopLocal             r1
+  Push                 FP[-6]
+  LoadFieldTOS         CP#3
+  StoreLocal           r0
+  PushConstant         CP#5
+  JumpIfEqStrict       L1
+  CheckFunctionTypeArgs 0, r2
+  Jump                 L2
+L1:
+  CheckFunctionTypeArgs 1, r0
+L2:
+  Push                 r0
+  Push                 FP[-6]
+  LoadFieldTOS         CP#6
+  PushInt              0
+  PushInt              1
+  DirectCall           4, CP#8
+  PopLocal             r0
+  Push                 FP[-5]
+  PushConstant         CP#10
+  PushNull
+  Push                 r0
+  PushConstant         CP#11
+  AssertAssignable     0, CP#12
+  Drop1
+  PushNull
+  ReturnTOS
+
+}
+
+
+Function 'main', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+}
+
+}
+
+}
+]library #lib from "#lib" as #lib {
+
+  typedef IntFunc = (dart.core::int) → dynamic;
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::C1
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -18,12 +398,25 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::C1
-    : super core::Object::•()
-    ;
+
 }
-class C2 extends core::Object {
+
+}
+]  class C1 extends dart.core::Object {
+    synthetic constructor •() → #lib::C1
+      : super dart.core::Object::•()
+      ;
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::C2
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -37,12 +430,25 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::C2
-    : super core::Object::•()
-    ;
+
 }
-class C3 extends core::Object {
+
+}
+]  class C2 extends dart.core::Object {
+    synthetic constructor •() → #lib::C2
+      : super dart.core::Object::•()
+      ;
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::C3
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -56,12 +462,25 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::C3
-    : super core::Object::•()
-    ;
+
 }
-class C4 extends core::Object {
+
+}
+]  class C3 extends dart.core::Object {
+    synthetic constructor •() → #lib::C3
+      : super dart.core::Object::•()
+      ;
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::C4
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -75,12 +494,25 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::C4
-    : super core::Object::•()
-    ;
+
 }
-class C5 extends core::Object {
+
+}
+]  class C4 extends dart.core::Object {
+    synthetic constructor •() → #lib::C4
+      : super dart.core::Object::•()
+      ;
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::C5
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -94,12 +526,25 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::C5
-    : super core::Object::•()
-    ;
+
 }
-class C6 extends core::Object {
+
+}
+]  class C5 extends dart.core::Object {
+    synthetic constructor •() → #lib::C5
+      : super dart.core::Object::•()
+      ;
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::C6
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -113,12 +558,25 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::C6
-    : super core::Object::•()
-    ;
+
 }
-class C7 extends core::Object {
+
+}
+]  class C6 extends dart.core::Object {
+    synthetic constructor •() → #lib::C6
+      : super dart.core::Object::•()
+      ;
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::C7
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -132,12 +590,25 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::C7
-    : super core::Object::•()
-    ;
+
 }
-class C8 extends core::Object {
+
+}
+]  class C7 extends dart.core::Object {
+    synthetic constructor •() → #lib::C7
+      : super dart.core::Object::•()
+      ;
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::C8
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -151,12 +622,25 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::C8
-    : super core::Object::•()
-    ;
+
 }
-class A<T1 extends core::Object = dynamic, T2 extends core::Object = dynamic> extends core::Object {
+
+}
+]  class C8 extends dart.core::Object {
+    synthetic constructor •() → #lib::C8
+      : super dart.core::Object::•()
+      ;
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::A < #lib::A::TypeParam/0, #lib::A::TypeParam/1 >
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -170,10 +654,14 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::A<self::A::T1, self::A::T2>
-    : super core::Object::•()
-    ;
-[@vm.bytecode=
+
+
+Function 'foo', reflectable, debuggable
+    type-params <dart:core::Object T3, dart:core::Object T4>
+    parameters [] (required: 0)
+    return-type void
+
+
 Bytecode {
   Entry                5
   CheckStack           0
@@ -183,12 +671,12 @@
   Push                 r1
   Push                 FP[-5]
   StoreContextVar      0, 0
-  Allocate             CP#30
+  AllocateClosure      CP#0
   StoreLocal           r4
   Push                 r4
   Push                 FP[-5]
   LoadTypeArgumentsField CP#14
-  StoreFieldTOS        CP#31
+  StoreFieldTOS        CP#30
   Push                 r4
   Push                 r0
   StoreFieldTOS        CP#6
@@ -197,18 +685,18 @@
   StoreFieldTOS        CP#3
   Push                 r4
   PushConstant         CP#0
-  StoreFieldTOS        CP#33
+  StoreFieldTOS        CP#32
   Push                 r4
   Push                 r1
   StoreFieldTOS        CP#1
   PopLocal             r3
-  PushConstant         CP#44
+  PushConstant         CP#43
   Push                 r3
-  DynamicCall          2, CP#45
+  DynamicCall          2, CP#44
   Drop1
-  PushConstant         CP#46
+  PushConstant         CP#45
   Push                 r3
-  DynamicCall          2, CP#47
+  DynamicCall          2, CP#46
   Drop1
   PushNull
   ReturnTOS
@@ -244,27 +732,26 @@
   [27] = DirectCall '#lib::callWithArgs', ArgDesc num-args 0, num-type-args 8, names []
   [28] = Reserved
   [29] = EndClosureFunctionScope
-  [30] = Class dart:core::_Closure
-  [31] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
-  [32] = Reserved
-  [33] = InstanceField dart:core::_Closure::_function (field)
-  [34] = Reserved
-  [35] = ObjectRef ArgDesc num-args 1, num-type-args 0, names []
-  [36] = ICData dynamic target-name 'call', arg-desc CP#35
-  [37] = EndClosureFunctionScope
-  [38] = ObjectRef < #lib::C7, #lib::C8 >
-  [39] = ObjectRef ArgDesc num-args 1, num-type-args 2, names []
-  [40] = ICData dynamic target-name 'call', arg-desc CP#39
-  [41] = ObjectRef < dart:core::List < #lib::C7 >, dart:core::List < #lib::C8 > >
-  [42] = ICData dynamic target-name 'call', arg-desc CP#39
-  [43] = EndClosureFunctionScope
-  [44] = ObjectRef < #lib::C5, #lib::C6 >
-  [45] = ICData dynamic target-name 'call', arg-desc CP#39
-  [46] = ObjectRef < dart:core::List < #lib::C5 >, dart:core::List < #lib::C6 > >
-  [47] = ICData dynamic target-name 'call', arg-desc CP#39
+  [30] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
+  [31] = Reserved
+  [32] = InstanceField dart:core::_Closure::_function (field)
+  [33] = Reserved
+  [34] = ObjectRef ArgDesc num-args 1, num-type-args 0, names []
+  [35] = ICData dynamic target-name 'call', arg-desc CP#34
+  [36] = EndClosureFunctionScope
+  [37] = ObjectRef < #lib::C7, #lib::C8 >
+  [38] = ObjectRef ArgDesc num-args 1, num-type-args 2, names []
+  [39] = ICData dynamic target-name 'call', arg-desc CP#38
+  [40] = ObjectRef < dart:core::List < #lib::C7 >, dart:core::List < #lib::C8 > >
+  [41] = ICData dynamic target-name 'call', arg-desc CP#38
+  [42] = EndClosureFunctionScope
+  [43] = ObjectRef < #lib::C5, #lib::C6 >
+  [44] = ICData dynamic target-name 'call', arg-desc CP#38
+  [45] = ObjectRef < dart:core::List < #lib::C5 >, dart:core::List < #lib::C6 > >
+  [46] = ICData dynamic target-name 'call', arg-desc CP#38
 }
 Closure #lib::A::foo::'nested1' <dart:core::Object T5, dart:core::Object T6> () -> void
-ClosureBytecode {
+ClosureCode {
   EntryFixed           1, 5
   CheckStack           0
   Push                 FP[-5]
@@ -287,13 +774,13 @@
   PushInt              4
   DirectCall           4, CP#8
   PopLocal             r0
-  Allocate             CP#30
+  AllocateClosure      CP#10
   StoreLocal           r4
   Push                 r4
   Push                 r1
   LoadContextVar       0, 0
   LoadTypeArgumentsField CP#14
-  StoreFieldTOS        CP#31
+  StoreFieldTOS        CP#30
   Push                 r4
   Push                 r0
   StoreFieldTOS        CP#6
@@ -302,18 +789,18 @@
   StoreFieldTOS        CP#3
   Push                 r4
   PushConstant         CP#10
-  StoreFieldTOS        CP#33
+  StoreFieldTOS        CP#32
   Push                 r4
   Push                 r1
   StoreFieldTOS        CP#1
   PopLocal             r3
-  PushConstant         CP#38
+  PushConstant         CP#37
   Push                 r3
-  DynamicCall          2, CP#40
+  DynamicCall          2, CP#39
   Drop1
-  PushConstant         CP#41
+  PushConstant         CP#40
   Push                 r3
-  DynamicCall          2, CP#42
+  DynamicCall          2, CP#41
   Drop1
   PushNull
   ReturnTOS
@@ -321,7 +808,7 @@
 }
 
 Closure #lib::A::foo::Closure/0::'nested2' <dart:core::Object T7, dart:core::Object T8> () -> void
-ClosureBytecode {
+ClosureCode {
   EntryFixed           1, 5
   CheckStack           0
   Push                 FP[-5]
@@ -344,13 +831,13 @@
   PushInt              6
   DirectCall           4, CP#8
   PopLocal             r0
-  Allocate             CP#30
+  AllocateClosure      CP#11
   StoreLocal           r4
   Push                 r4
   Push                 r1
   LoadContextVar       0, 0
   LoadTypeArgumentsField CP#14
-  StoreFieldTOS        CP#31
+  StoreFieldTOS        CP#30
   Push                 r4
   Push                 r0
   StoreFieldTOS        CP#6
@@ -359,13 +846,13 @@
   StoreFieldTOS        CP#3
   Push                 r4
   PushConstant         CP#11
-  StoreFieldTOS        CP#33
+  StoreFieldTOS        CP#32
   Push                 r4
   Push                 r1
   StoreFieldTOS        CP#1
   PopLocal             r3
   Push                 r3
-  DynamicCall          1, CP#36
+  DynamicCall          1, CP#35
   Drop1
   PushNull
   ReturnTOS
@@ -373,7 +860,7 @@
 }
 
 Closure #lib::A::foo::Closure/1::'<anonymous closure>' () -> dart:core::Null
-ClosureBytecode {
+ClosureCode {
   EntryFixed           1, 4
   CheckStack           0
   Push                 FP[-5]
@@ -454,25 +941,42 @@
   ReturnTOS
 
 }
-]  method foo<T3 extends core::Object = dynamic, T4 extends core::Object = dynamic>() → void {
-    function nested1<T5 extends core::Object = dynamic, T6 extends core::Object = dynamic>() → void {
-      function nested2<T7 extends core::Object = dynamic, T8 extends core::Object = dynamic>() → void {
-        () → core::Null nested3 = () → core::Null {
-          core::print(<core::Type>[self::A::T1, self::A::T2, self::A::foo::T3, self::A::foo::T4, T5, T6, T7, T8]);
-          self::callWithArgs<self::A::T1, self::A::T2, self::A::foo::T3, self::A::foo::T4, T5, T6, T7, T8>();
-        };
-        [@vm.call-site-attributes.metadata=receiverType:() → dart.core::Null] nested3.call();
-      }
-      [@vm.call-site-attributes.metadata=receiverType:<T7 extends dart.core::Object = dynamic, T8 extends dart.core::Object = dynamic>() → void] nested2.call<self::C7, self::C8>();
-      [@vm.call-site-attributes.metadata=receiverType:<T7 extends dart.core::Object = dynamic, T8 extends dart.core::Object = dynamic>() → void] nested2.call<core::List<self::C7>, core::List<self::C8>>();
-    }
-    [@vm.call-site-attributes.metadata=receiverType:<T5 extends dart.core::Object = dynamic, T6 extends dart.core::Object = dynamic>() → void] nested1.call<self::C5, self::C6>();
-    [@vm.call-site-attributes.metadata=receiverType:<T5 extends dart.core::Object = dynamic, T6 extends dart.core::Object = dynamic>() → void] nested1.call<core::List<self::C5>, core::List<self::C6>>();
-  }
+
 }
-class B extends core::Object {
-  field core::int foo = null;
+
+}
+]  class A<T1 extends dart.core::Object = dynamic, T2 extends dart.core::Object = dynamic> extends dart.core::Object {
+    synthetic constructor •() → #lib::A<#lib::A::T1, #lib::A::T2>
+      : super dart.core::Object::•()
+      ;
+    method foo<T3 extends dart.core::Object = dynamic, T4 extends dart.core::Object = dynamic>() → void {
+      function nested1<T5 extends dart.core::Object = dynamic, T6 extends dart.core::Object = dynamic>() → void {
+        function nested2<T7 extends dart.core::Object = dynamic, T8 extends dart.core::Object = dynamic>() → void {
+          () → dart.core::Null nested3 = () → dart.core::Null {
+            dart.core::print(<dart.core::Type>[#lib::A::T1, #lib::A::T2, #lib::A::foo::T3, #lib::A::foo::T4, T5, T6, T7, T8]);
+            #lib::callWithArgs<#lib::A::T1, #lib::A::T2, #lib::A::foo::T3, #lib::A::foo::T4, T5, T6, T7, T8>();
+          };
+          [@vm.call-site-attributes.metadata=receiverType:() → dart.core::Null] nested3.call();
+        }
+        [@vm.call-site-attributes.metadata=receiverType:<T7 extends dart.core::Object = dynamic, T8 extends dart.core::Object = dynamic>() → void] nested2.call<#lib::C7, #lib::C8>();
+        [@vm.call-site-attributes.metadata=receiverType:<T7 extends dart.core::Object = dynamic, T8 extends dart.core::Object = dynamic>() → void] nested2.call<dart.core::List<#lib::C7>, dart.core::List<#lib::C8>>();
+      }
+      [@vm.call-site-attributes.metadata=receiverType:<T5 extends dart.core::Object = dynamic, T6 extends dart.core::Object = dynamic>() → void] nested1.call<#lib::C5, #lib::C6>();
+      [@vm.call-site-attributes.metadata=receiverType:<T5 extends dart.core::Object = dynamic, T6 extends dart.core::Object = dynamic>() → void] nested1.call<dart.core::List<#lib::C5>, dart.core::List<#lib::C6>>();
+    }
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+Field 'foo', type = dart:core::int, getter = 'get:foo', setter = 'set:foo', reflectable
+    value = null
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::B
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -482,15 +986,18 @@
   PushNull
   ReturnTOS
 }
-Nullable fields: [#lib::B::foo (field)]}
+Nullable fields: [#lib::B::foo (field)]
 ConstantPool {
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::B
-    : super core::Object::•()
-    ;
-[@vm.bytecode=
+
+
+Function 'topLevel', reflectable, debuggable
+    parameters [] (required: 0)
+    return-type void
+
+
 Bytecode {
   Entry                5
   CheckStack           0
@@ -507,66 +1014,66 @@
   Push                 r0
   PushInt              3
   StoreContextVar      0, 2
-  Allocate             CP#10
+  AllocateClosure      CP#0
   StoreLocal           r4
   Push                 r4
   PushNull
-  StoreFieldTOS        CP#11
+  StoreFieldTOS        CP#10
   Push                 r4
   PushNull
-  StoreFieldTOS        CP#13
+  StoreFieldTOS        CP#12
   Push                 r4
-  PushConstant         CP#15
-  StoreFieldTOS        CP#16
+  PushConstant         CP#14
+  StoreFieldTOS        CP#15
   Push                 r4
   PushConstant         CP#0
-  StoreFieldTOS        CP#18
+  StoreFieldTOS        CP#17
   Push                 r4
   Push                 r0
   StoreFieldTOS        CP#1
   PopLocal             r3
   Push                 r3
   PushInt              10
-  DynamicCall          2, CP#26
+  DynamicCall          2, CP#25
   Drop1
   Push                 r3
   PushInt              11
-  DynamicCall          2, CP#27
+  DynamicCall          2, CP#26
   Drop1
   Push                 r2
-  DirectCall           1, CP#22
+  DirectCall           1, CP#21
   Drop1
   Push                 r0
   LoadContextVar       0, 2
-  DirectCall           1, CP#22
+  DirectCall           1, CP#21
   Drop1
   Push                 r0
   LoadContextVar       0, 1
-  DirectCall           1, CP#22
+  DirectCall           1, CP#21
   Drop1
   Push                 r0
   PushInt              42
   StoreContextVar      0, 3
-  Allocate             CP#10
+  AllocateClosure      CP#27
   StoreLocal           r3
   Push                 r3
   PushNull
-  StoreFieldTOS        CP#11
+  StoreFieldTOS        CP#10
   Push                 r3
   PushNull
-  StoreFieldTOS        CP#13
+  StoreFieldTOS        CP#12
   Push                 r3
-  PushConstant         CP#15
-  StoreFieldTOS        CP#16
+  PushConstant         CP#14
+  StoreFieldTOS        CP#15
   Push                 r3
-  PushConstant         CP#28
-  StoreFieldTOS        CP#18
+  PushConstant         CP#27
+  StoreFieldTOS        CP#17
   Push                 r3
   Push                 r0
   StoreFieldTOS        CP#1
   PopLocal             r2
   Push                 r2
-  DynamicCall          1, CP#32
+  DynamicCall          1, CP#31
   Drop1
   PushNull
   ReturnTOS
@@ -582,32 +1089,31 @@
   [7] = InterfaceCall '#lib::B::get:foo', ArgDesc num-args 1, num-type-args 0, names []
   [8] = Reserved
   [9] = EndClosureFunctionScope
-  [10] = Class dart:core::_Closure
-  [11] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
-  [12] = Reserved
-  [13] = InstanceField dart:core::_Closure::_function_type_arguments (field)
-  [14] = Reserved
-  [15] = EmptyTypeArguments
-  [16] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
-  [17] = Reserved
-  [18] = InstanceField dart:core::_Closure::_function (field)
-  [19] = Reserved
-  [20] = ObjectRef ArgDesc num-args 1, num-type-args 0, names []
-  [21] = ICData dynamic target-name 'call', arg-desc CP#20
-  [22] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
-  [23] = Reserved
-  [24] = EndClosureFunctionScope
-  [25] = ObjectRef ArgDesc num-args 2, num-type-args 0, names []
-  [26] = ICData dynamic target-name 'call', arg-desc CP#25
-  [27] = ICData dynamic target-name 'call', arg-desc CP#25
-  [28] = ClosureFunction 2
-  [29] = InterfaceCall '#lib::B::set:foo', ArgDesc num-args 2, num-type-args 0, names []
-  [30] = Reserved
-  [31] = EndClosureFunctionScope
-  [32] = ICData dynamic target-name 'call', arg-desc CP#20
+  [10] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
+  [11] = Reserved
+  [12] = InstanceField dart:core::_Closure::_function_type_arguments (field)
+  [13] = Reserved
+  [14] = EmptyTypeArguments
+  [15] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
+  [16] = Reserved
+  [17] = InstanceField dart:core::_Closure::_function (field)
+  [18] = Reserved
+  [19] = ObjectRef ArgDesc num-args 1, num-type-args 0, names []
+  [20] = ICData dynamic target-name 'call', arg-desc CP#19
+  [21] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
+  [22] = Reserved
+  [23] = EndClosureFunctionScope
+  [24] = ObjectRef ArgDesc num-args 2, num-type-args 0, names []
+  [25] = ICData dynamic target-name 'call', arg-desc CP#24
+  [26] = ICData dynamic target-name 'call', arg-desc CP#24
+  [27] = ClosureFunction 2
+  [28] = InterfaceCall '#lib::B::set:foo', ArgDesc num-args 2, num-type-args 0, names []
+  [29] = Reserved
+  [30] = EndClosureFunctionScope
+  [31] = ICData dynamic target-name 'call', arg-desc CP#19
 }
 Closure #lib::B::topLevel::'<anonymous closure>' (dart:core::int y) -> dart:core::Null
-ClosureBytecode {
+ClosureCode {
   EntryFixed           2, 4
   CheckStack           0
   Push                 FP[-6]
@@ -645,30 +1151,30 @@
   Push                 r0
   PushInt              4
   StoreContextVar      1, 1
-  Allocate             CP#10
+  AllocateClosure      CP#6
   StoreLocal           r2
   Push                 r2
   PushNull
-  StoreFieldTOS        CP#11
+  StoreFieldTOS        CP#10
   Push                 r2
   PushNull
-  StoreFieldTOS        CP#13
+  StoreFieldTOS        CP#12
   Push                 r2
-  PushConstant         CP#15
-  StoreFieldTOS        CP#16
+  PushConstant         CP#14
+  StoreFieldTOS        CP#15
   Push                 r2
   PushConstant         CP#6
-  StoreFieldTOS        CP#18
+  StoreFieldTOS        CP#17
   Push                 r2
   Push                 r0
   StoreFieldTOS        CP#1
   PopLocal             r3
   Push                 r3
-  DynamicCall          1, CP#21
+  DynamicCall          1, CP#20
   Drop1
   Push                 r0
   LoadContextVar       1, 1
-  DirectCall           1, CP#22
+  DirectCall           1, CP#21
   Drop1
 L1:
   PushNull
@@ -677,7 +1183,7 @@
 }
 
 Closure #lib::B::topLevel::Closure/0::'closure2' () -> void
-ClosureBytecode {
+ClosureCode {
   EntryFixed           1, 3
   CheckStack           0
   Push                 FP[-5]
@@ -706,7 +1212,7 @@
 }
 
 Closure #lib::B::topLevel::'<anonymous closure>' () -> dart:core::Null
-ClosureBytecode {
+ClosureCode {
   EntryFixed           1, 3
   CheckStack           0
   Push                 FP[-5]
@@ -716,48 +1222,65 @@
   LoadContextVar       0, 0
   Push                 r0
   LoadContextVar       0, 3
-  InterfaceCall        2, CP#29
+  InterfaceCall        2, CP#28
   Drop1
   PushNull
   ReturnTOS
 
 }
-]  method topLevel() → void {
-    {
-      core::int x = 1;
+
+}
+
+}
+]  class B extends dart.core::Object {
+    field dart.core::int foo = null;
+    synthetic constructor •() → #lib::B
+      : super dart.core::Object::•()
+      ;
+    method topLevel() → void {
       {
-        core::int y = 2;
-        core::int z = 3;
-        (core::int) → core::Null closure1 = (core::int y) → core::Null {
-          x = y.{core::num::+}(1);
-          if(x.{core::num::>}(5)) {
-            core::int w = 4;
-            function closure2() → void {
-              z = x.{core::num::+}(2);
-              w = this.{self::B::foo}.{core::num::+}(y);
+        dart.core::int x = 1;
+        {
+          dart.core::int y = 2;
+          dart.core::int z = 3;
+          (dart.core::int) → dart.core::Null closure1 = (dart.core::int y) → dart.core::Null {
+            x = y.{dart.core::num::+}(1);
+            if(x.{dart.core::num::>}(5)) {
+              dart.core::int w = 4;
+              function closure2() → void {
+                z = x.{dart.core::num::+}(2);
+                w = this.{#lib::B::foo}.{dart.core::num::+}(y);
+              }
+              [@vm.call-site-attributes.metadata=receiverType:() → void] closure2.call();
+              dart.core::print(w);
             }
-            [@vm.call-site-attributes.metadata=receiverType:() → void] closure2.call();
-            core::print(w);
-          }
-        };
-        [@vm.call-site-attributes.metadata=receiverType:(dart.core::int) → dart.core::Null] closure1.call(10);
-        [@vm.call-site-attributes.metadata=receiverType:(dart.core::int) → dart.core::Null] closure1.call(11);
-        core::print(y);
-        core::print(z);
+          };
+          [@vm.call-site-attributes.metadata=receiverType:(dart.core::int) → dart.core::Null] closure1.call(10);
+          [@vm.call-site-attributes.metadata=receiverType:(dart.core::int) → dart.core::Null] closure1.call(11);
+          dart.core::print(y);
+          dart.core::print(z);
+        }
+        dart.core::print(x);
       }
-      core::print(x);
-    }
-    {
-      core::int x = 42;
-      () → core::Null closure3 = () → core::Null {
-        this.{self::B::foo} = x;
-      };
-      [@vm.call-site-attributes.metadata=receiverType:() → dart.core::Null] closure3.call();
+      {
+        dart.core::int x = 42;
+        () → dart.core::Null closure3 = () → dart.core::Null {
+          this.{#lib::B::foo} = x;
+        };
+        [@vm.call-site-attributes.metadata=receiverType:() → dart.core::Null] closure3.call();
+      }
     }
   }
-}
-class C extends core::Object {
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::C
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -771,10 +1294,13 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::C
-    : super core::Object::•()
-    ;
-[@vm.bytecode=
+
+
+Function 'testForLoop', reflectable, debuggable
+    parameters [] (required: 0)
+    return-type void
+
+
 Bytecode {
   Entry                5
   CheckStack           0
@@ -784,20 +1310,12 @@
   PushInt              0
   StoreContextVar      0, 0
   PushConstant         CP#0
-  StoreLocal           r3
-  Push                 r3
-  PushInt              0
-  CreateArrayTOS
-  StoreLocal           r3
-  DirectCall           2, CP#1
+  PushConstant         CP#1
+  DirectCall           2, CP#2
   PopLocal             r2
   PushConstant         CP#0
-  StoreLocal           r3
-  Push                 r3
-  PushInt              0
-  CreateArrayTOS
-  StoreLocal           r3
-  DirectCall           2, CP#1
+  PushConstant         CP#1
+  DirectCall           2, CP#2
   PopLocal             r4
   AllocateContext      1, 1
   StoreLocal           r1
@@ -816,7 +1334,7 @@
   CompareIntLt
   JumpIfFalse          L1
   Push                 r2
-  Allocate             CP#7
+  AllocateClosure      CP#4
   StoreLocal           r3
   Push                 r3
   PushNull
@@ -828,15 +1346,15 @@
   PushConstant         CP#12
   StoreFieldTOS        CP#13
   Push                 r3
-  PushConstant         CP#3
+  PushConstant         CP#4
   StoreFieldTOS        CP#15
   Push                 r3
   Push                 r0
-  StoreFieldTOS        CP#4
+  StoreFieldTOS        CP#5
   InterfaceCall        2, CP#17
   Drop1
   Push                 r4
-  Allocate             CP#7
+  AllocateClosure      CP#19
   StoreLocal           r3
   Push                 r3
   PushNull
@@ -852,7 +1370,7 @@
   StoreFieldTOS        CP#15
   Push                 r3
   Push                 r0
-  StoreFieldTOS        CP#4
+  StoreFieldTOS        CP#5
   InterfaceCall        2, CP#17
   Drop1
   Push                 r0
@@ -880,13 +1398,13 @@
 }
 ConstantPool {
   [0] = ObjectRef < dart:core::Function >
-  [1] = DirectCall 'dart:core::List::_fromLiteral (constructor)', ArgDesc num-args 2, num-type-args 0, names []
-  [2] = Reserved
-  [3] = ClosureFunction 0
-  [4] = InstanceField dart:core::_Closure::_context (field)
-  [5] = Reserved
-  [6] = EndClosureFunctionScope
-  [7] = Class dart:core::_Closure
+  [1] = ObjectRef const <dynamic> []
+  [2] = DirectCall 'dart:core::List::_fromLiteral (constructor)', ArgDesc num-args 2, num-type-args 0, names []
+  [3] = Reserved
+  [4] = ClosureFunction 0
+  [5] = InstanceField dart:core::_Closure::_context (field)
+  [6] = Reserved
+  [7] = EndClosureFunctionScope
   [8] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
   [9] = Reserved
   [10] = InstanceField dart:core::_Closure::_function_type_arguments (field)
@@ -905,11 +1423,11 @@
   [23] = EndClosureFunctionScope
 }
 Closure #lib::C::testForLoop::'<anonymous closure>' () -> dart:core::int
-ClosureBytecode {
+ClosureCode {
   EntryFixed           1, 2
   CheckStack           0
   Push                 FP[-5]
-  LoadFieldTOS         CP#4
+  LoadFieldTOS         CP#5
   PopLocal             r0
   Push                 r0
   LoadContextVar       1, 0
@@ -922,11 +1440,11 @@
 }
 
 Closure #lib::C::testForLoop::'<anonymous closure>' (dart:core::int ii) -> dart:core::Null
-ClosureBytecode {
+ClosureCode {
   EntryFixed           2, 3
   CheckStack           0
   Push                 FP[-6]
-  LoadFieldTOS         CP#4
+  LoadFieldTOS         CP#5
   PopLocal             r0
   Push                 FP[-5]
   PushConstant         CP#20
@@ -946,18 +1464,13 @@
   ReturnTOS
 
 }
-]  method testForLoop() → void {
-    core::int delta = 0;
-    core::List<core::Function> getI = <core::Function>[];
-    core::List<core::Function> setI = <core::Function>[];
-    for (core::int i = 0; i.{core::num::<}(10); i = i.{core::num::+}(1)) {
-      [@vm.call-site-attributes.metadata=receiverType:dart.core::List<dart.core::Function>] getI.{core::List::add}(() → core::int => i.{core::num::+}(delta));
-      [@vm.call-site-attributes.metadata=receiverType:dart.core::List<dart.core::Function>] setI.{core::List::add}((core::int ii) → core::Null {
-        i = ii.{core::num::+}(delta);
-      });
-    }
-  }
-[@vm.bytecode=
+
+
+Function 'testForInLoop', reflectable, debuggable
+    parameters [dart:core::List < dart:core::int > 'list'] (required: 1)
+    return-type void
+
+
 Bytecode {
   Entry                5
   CheckStack           0
@@ -975,30 +1488,30 @@
   Push                 r2
   InterfaceCall        1, CP#4
   StoreContextVar      0, 0
-  Allocate             CP#10
+  AllocateClosure      CP#6
   StoreLocal           r4
   Push                 r4
   PushNull
-  StoreFieldTOS        CP#11
+  StoreFieldTOS        CP#10
   Push                 r4
   PushNull
-  StoreFieldTOS        CP#13
+  StoreFieldTOS        CP#12
   Push                 r4
-  PushConstant         CP#15
-  StoreFieldTOS        CP#16
+  PushConstant         CP#14
+  StoreFieldTOS        CP#15
   Push                 r4
   PushConstant         CP#6
-  StoreFieldTOS        CP#18
+  StoreFieldTOS        CP#17
   Push                 r4
   Push                 r0
   StoreFieldTOS        CP#7
   PopLocal             r3
   Push                 r3
-  DynamicCall          1, CP#21
+  DynamicCall          1, CP#20
   Drop1
   Push                 r0
   LoadContextVar       0, 0
-  DirectCall           1, CP#22
+  DirectCall           1, CP#21
   Drop1
   Push                 r0
   LoadContextParent
@@ -1019,23 +1532,22 @@
   [7] = InstanceField dart:core::_Closure::_context (field)
   [8] = Reserved
   [9] = EndClosureFunctionScope
-  [10] = Class dart:core::_Closure
-  [11] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
-  [12] = Reserved
-  [13] = InstanceField dart:core::_Closure::_function_type_arguments (field)
-  [14] = Reserved
-  [15] = EmptyTypeArguments
-  [16] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
-  [17] = Reserved
-  [18] = InstanceField dart:core::_Closure::_function (field)
-  [19] = Reserved
-  [20] = ObjectRef ArgDesc num-args 1, num-type-args 0, names []
-  [21] = ICData dynamic target-name 'call', arg-desc CP#20
-  [22] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
-  [23] = Reserved
+  [10] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
+  [11] = Reserved
+  [12] = InstanceField dart:core::_Closure::_function_type_arguments (field)
+  [13] = Reserved
+  [14] = EmptyTypeArguments
+  [15] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
+  [16] = Reserved
+  [17] = InstanceField dart:core::_Closure::_function (field)
+  [18] = Reserved
+  [19] = ObjectRef ArgDesc num-args 1, num-type-args 0, names []
+  [20] = ICData dynamic target-name 'call', arg-desc CP#19
+  [21] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
+  [22] = Reserved
 }
 Closure #lib::C::testForInLoop::'<anonymous closure>' () -> dart:core::Null
-ClosureBytecode {
+ClosureCode {
   EntryFixed           1, 3
   CheckStack           0
   Push                 FP[-5]
@@ -1051,18 +1563,45 @@
   ReturnTOS
 
 }
-]  method testForInLoop(core::List<core::int> list) → void {
-    for (core::int i in list) {
-      () → core::Null inc = () → core::Null {
-        i = i.{core::num::+}(1);
-      };
-      [@vm.call-site-attributes.metadata=receiverType:() → dart.core::Null] inc.call();
-      core::print(i);
+
+}
+
+}
+]  class C extends dart.core::Object {
+    synthetic constructor •() → #lib::C
+      : super dart.core::Object::•()
+      ;
+    method testForLoop() → void {
+      dart.core::int delta = 0;
+      dart.core::List<dart.core::Function> getI = <dart.core::Function>[];
+      dart.core::List<dart.core::Function> setI = <dart.core::Function>[];
+      for (dart.core::int i = 0; i.{dart.core::num::<}(10); i = i.{dart.core::num::+}(1)) {
+        [@vm.call-site-attributes.metadata=receiverType:dart.core::List<dart.core::Function>] getI.{dart.core::List::add}(() → dart.core::int => i.{dart.core::num::+}(delta));
+        [@vm.call-site-attributes.metadata=receiverType:dart.core::List<dart.core::Function>] setI.{dart.core::List::add}((dart.core::int ii) → dart.core::Null {
+          i = ii.{dart.core::num::+}(delta);
+        });
+      }
+    }
+    method testForInLoop(dart.core::List<dart.core::int> list) → void {
+      for (dart.core::int i in list) {
+        () → dart.core::Null inc = () → dart.core::Null {
+          i = i.{dart.core::num::+}(1);
+        };
+        [@vm.call-site-attributes.metadata=receiverType:() → dart.core::Null] inc.call();
+        dart.core::print(i);
+      }
     }
   }
-}
-class D<T extends core::Object = dynamic> extends core::Object {
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::D < #lib::D::TypeParam/0 >
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -1076,10 +1615,13 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::D<self::D::T>
-    : super core::Object::•()
-    ;
-[@vm.bytecode=
+
+
+Function 'foo', reflectable, debuggable
+    parameters [#lib::D::TypeParam/0 't'] (required: 1)
+    return-type dynamic
+
+
 Bytecode {
   Entry                3
   CheckStack           0
@@ -1096,26 +1638,27 @@
   PushConstant         CP#2
   AssertAssignable     0, CP#3
   Drop1
-  Allocate             CP#8
+  AllocateClosure      CP#4
   StoreLocal           r2
   Push                 r2
   Push                 FP[-6]
   LoadTypeArgumentsField CP#1
-  StoreFieldTOS        CP#9
+  StoreFieldTOS        CP#8
   Push                 r2
   PushNull
-  StoreFieldTOS        CP#11
+  StoreFieldTOS        CP#10
   Push                 r2
-  PushConstant         CP#13
-  StoreFieldTOS        CP#14
+  PushConstant         CP#12
+  StoreFieldTOS        CP#13
   Push                 r2
   PushConstant         CP#4
-  StoreFieldTOS        CP#16
+  StoreFieldTOS        CP#15
   Push                 r2
   Push                 r0
   StoreFieldTOS        CP#5
   ReturnTOS
 }
+Parameter flags: [2]
 ConstantPool {
   [0] = Type #lib::D::TypeParam/0
   [1] = TypeArgumentsField #lib::D
@@ -1125,19 +1668,18 @@
   [5] = InstanceField dart:core::_Closure::_context (field)
   [6] = Reserved
   [7] = EndClosureFunctionScope
-  [8] = Class dart:core::_Closure
-  [9] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
-  [10] = Reserved
-  [11] = InstanceField dart:core::_Closure::_function_type_arguments (field)
-  [12] = Reserved
-  [13] = EmptyTypeArguments
-  [14] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
-  [15] = Reserved
-  [16] = InstanceField dart:core::_Closure::_function (field)
-  [17] = Reserved
+  [8] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
+  [9] = Reserved
+  [10] = InstanceField dart:core::_Closure::_function_type_arguments (field)
+  [11] = Reserved
+  [12] = EmptyTypeArguments
+  [13] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
+  [14] = Reserved
+  [15] = InstanceField dart:core::_Closure::_function (field)
+  [16] = Reserved
 }
 Closure #lib::D::foo::'<anonymous closure>' () -> #lib::D::TypeParam/0
-ClosureBytecode {
+ClosureCode {
   EntryFixed           1, 2
   CheckStack           0
   Push                 FP[-5]
@@ -1148,10 +1690,13 @@
   ReturnTOS
 
 }
-]  method foo(generic-covariant-impl self::D::T t) → dynamic {
-    return () → self::D::T => t;
-  }
-[@vm.bytecode=
+
+
+Function 'bar', reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                3
   CheckStack           0
@@ -1160,21 +1705,21 @@
   Push                 r0
   Push                 FP[-5]
   StoreContextVar      0, 0
-  Allocate             CP#5
+  AllocateClosure      CP#0
   StoreLocal           r2
   Push                 r2
   Push                 FP[-5]
-  LoadTypeArgumentsField CP#6
-  StoreFieldTOS        CP#7
+  LoadTypeArgumentsField CP#5
+  StoreFieldTOS        CP#6
   Push                 r2
   PushNull
-  StoreFieldTOS        CP#9
+  StoreFieldTOS        CP#8
   Push                 r2
-  PushConstant         CP#11
-  StoreFieldTOS        CP#12
+  PushConstant         CP#10
+  StoreFieldTOS        CP#11
   Push                 r2
   PushConstant         CP#0
-  StoreFieldTOS        CP#14
+  StoreFieldTOS        CP#13
   Push                 r2
   Push                 r0
   StoreFieldTOS        CP#1
@@ -1186,50 +1731,49 @@
   [2] = Reserved
   [3] = ClosureFunction 1
   [4] = EndClosureFunctionScope
-  [5] = Class dart:core::_Closure
-  [6] = TypeArgumentsField #lib::D
-  [7] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
-  [8] = Reserved
-  [9] = InstanceField dart:core::_Closure::_function_type_arguments (field)
-  [10] = Reserved
-  [11] = EmptyTypeArguments
-  [12] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
-  [13] = Reserved
-  [14] = InstanceField dart:core::_Closure::_function (field)
-  [15] = Reserved
-  [16] = ObjectRef ArgDesc num-args 1, num-type-args 0, names []
-  [17] = ICData dynamic target-name 'call', arg-desc CP#16
-  [18] = EndClosureFunctionScope
+  [5] = TypeArgumentsField #lib::D
+  [6] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
+  [7] = Reserved
+  [8] = InstanceField dart:core::_Closure::_function_type_arguments (field)
+  [9] = Reserved
+  [10] = EmptyTypeArguments
+  [11] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
+  [12] = Reserved
+  [13] = InstanceField dart:core::_Closure::_function (field)
+  [14] = Reserved
+  [15] = ObjectRef ArgDesc num-args 1, num-type-args 0, names []
+  [16] = ICData dynamic target-name 'call', arg-desc CP#15
+  [17] = EndClosureFunctionScope
 }
 Closure #lib::D::bar::'<anonymous closure>' () -> dart:core::Null
-ClosureBytecode {
+ClosureCode {
   EntryFixed           1, 4
   CheckStack           0
   Push                 FP[-5]
   LoadFieldTOS         CP#1
   PopLocal             r0
-  Allocate             CP#5
+  AllocateClosure      CP#3
   StoreLocal           r3
   Push                 r3
   Push                 r0
   LoadContextVar       0, 0
-  LoadTypeArgumentsField CP#6
-  StoreFieldTOS        CP#7
+  LoadTypeArgumentsField CP#5
+  StoreFieldTOS        CP#6
   Push                 r3
   PushNull
-  StoreFieldTOS        CP#9
+  StoreFieldTOS        CP#8
   Push                 r3
-  PushConstant         CP#11
-  StoreFieldTOS        CP#12
+  PushConstant         CP#10
+  StoreFieldTOS        CP#11
   Push                 r3
   PushConstant         CP#3
-  StoreFieldTOS        CP#14
+  StoreFieldTOS        CP#13
   Push                 r3
   Push                 r0
   StoreFieldTOS        CP#1
   PopLocal             r2
   Push                 r2
-  DynamicCall          1, CP#17
+  DynamicCall          1, CP#16
   Drop1
   PushNull
   ReturnTOS
@@ -1237,7 +1781,7 @@
 }
 
 Closure #lib::D::bar::Closure/0::'inner' () -> dart:core::Null
-ClosureBytecode {
+ClosureCode {
   EntryFixed           1, 2
   CheckStack           0
   Push                 FP[-5]
@@ -1247,361 +1791,44 @@
   ReturnTOS
 
 }
-]  method bar() → dynamic {
-    return () → core::Null {
-      function inner() → core::Null {}
-      [@vm.call-site-attributes.metadata=receiverType:() → dart.core::Null] inner.call();
-    };
+
+}
+
+}
+]  class D<T extends dart.core::Object = dynamic> extends dart.core::Object {
+    synthetic constructor •() → #lib::D<#lib::D::T>
+      : super dart.core::Object::•()
+      ;
+    method foo(generic-covariant-impl #lib::D::T t) → dynamic {
+      return () → #lib::D::T => t;
+    }
+    method bar() → dynamic {
+      return () → dart.core::Null {
+        function inner() → dart.core::Null {}
+        [@vm.call-site-attributes.metadata=receiverType:() → dart.core::Null] inner.call();
+      };
+    }
   }
+  static method simpleClosure() → dart.core::int {
+    dart.core::int x = 5;
+    (dart.core::int) → dart.core::Null inc = (dart.core::int y) → dart.core::Null {
+      x = x.{dart.core::num::+}(y);
+    };
+    [@vm.call-site-attributes.metadata=receiverType:(dart.core::int) → dart.core::Null] inc.call(3);
+    return x;
+  }
+  static method callWithArgs<T1 extends dart.core::Object = dynamic, T2 extends dart.core::Object = dynamic, T3 extends dart.core::Object = dynamic, T4 extends dart.core::Object = dynamic, T5 extends dart.core::Object = dynamic, T6 extends dart.core::Object = dynamic, T7 extends dart.core::Object = dynamic, T8 extends dart.core::Object = dynamic>() → void {
+    dart.core::print(<dart.core::Type>[#lib::callWithArgs::T1, #lib::callWithArgs::T2, #lib::callWithArgs::T3, #lib::callWithArgs::T4, #lib::callWithArgs::T5, #lib::callWithArgs::T6, #lib::callWithArgs::T7, #lib::callWithArgs::T8]);
+  }
+  static method callA() → void {
+    new #lib::A::•<#lib::C1, #lib::C2>().{#lib::A::foo}<#lib::C3, #lib::C4>();
+    new #lib::A::•<#lib::C1, #lib::C2>().{#lib::A::foo}<dart.core::List<#lib::C3>, dart.core::List<#lib::C4>>();
+    new #lib::A::•<dart.core::List<#lib::C1>, dart.core::List<#lib::C2>>().{#lib::A::foo}<dart.core::List<#lib::C3>, dart.core::List<#lib::C4>>();
+  }
+  static method testPartialInstantiation() → (dart.core::int) → dynamic {
+    function foo<T extends dart.core::Object = dynamic>(T t) → void {}
+    (dart.core::int) → dynamic intFunc = foo<dart.core::int>;
+    return intFunc;
+  }
+  static method main() → dynamic {}
 }
-[@vm.bytecode=
-Bytecode {
-  Entry                4
-  CheckStack           0
-  AllocateContext      0, 1
-  PopLocal             r0
-  Push                 r0
-  PushInt              5
-  StoreContextVar      0, 0
-  Allocate             CP#7
-  StoreLocal           r3
-  Push                 r3
-  PushNull
-  StoreFieldTOS        CP#8
-  Push                 r3
-  PushNull
-  StoreFieldTOS        CP#10
-  Push                 r3
-  PushConstant         CP#12
-  StoreFieldTOS        CP#13
-  Push                 r3
-  PushConstant         CP#0
-  StoreFieldTOS        CP#15
-  Push                 r3
-  Push                 r0
-  StoreFieldTOS        CP#1
-  PopLocal             r2
-  Push                 r2
-  PushInt              3
-  DynamicCall          2, CP#18
-  Drop1
-  Push                 r0
-  LoadContextVar       0, 0
-  ReturnTOS
-}
-ConstantPool {
-  [0] = ClosureFunction 0
-  [1] = InstanceField dart:core::_Closure::_context (field)
-  [2] = Reserved
-  [3] = Type dart:core::int
-  [4] = ObjectRef 'y'
-  [5] = SubtypeTestCache
-  [6] = EndClosureFunctionScope
-  [7] = Class dart:core::_Closure
-  [8] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
-  [9] = Reserved
-  [10] = InstanceField dart:core::_Closure::_function_type_arguments (field)
-  [11] = Reserved
-  [12] = EmptyTypeArguments
-  [13] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
-  [14] = Reserved
-  [15] = InstanceField dart:core::_Closure::_function (field)
-  [16] = Reserved
-  [17] = ObjectRef ArgDesc num-args 2, num-type-args 0, names []
-  [18] = ICData dynamic target-name 'call', arg-desc CP#17
-}
-Closure #lib::simpleClosure::'<anonymous closure>' (dart:core::int y) -> dart:core::Null
-ClosureBytecode {
-  EntryFixed           2, 3
-  CheckStack           0
-  Push                 FP[-6]
-  LoadFieldTOS         CP#1
-  PopLocal             r0
-  Push                 FP[-5]
-  PushConstant         CP#3
-  PushNull
-  PushNull
-  PushConstant         CP#4
-  AssertAssignable     1, CP#5
-  Drop1
-  Push                 r0
-  Push                 r0
-  LoadContextVar       0, 0
-  Push                 FP[-5]
-  AddInt
-  StoreContextVar      0, 0
-  PushNull
-  ReturnTOS
-
-}
-]static method simpleClosure() → core::int {
-  core::int x = 5;
-  (core::int) → core::Null inc = (core::int y) → core::Null {
-    x = x.{core::num::+}(y);
-  };
-  [@vm.call-site-attributes.metadata=receiverType:(dart.core::int) → dart.core::Null] inc.call(3);
-  return x;
-}
-[@vm.bytecode=
-Bytecode {
-  Entry                2
-  CheckStack           0
-  CheckFunctionTypeArgs 8, r0
-  PushConstant         CP#0
-  StoreLocal           r1
-  Push                 r1
-  PushInt              8
-  CreateArrayTOS
-  StoreLocal           r1
-  Push                 r1
-  PushInt              0
-  PushNull
-  Push                 r0
-  InstantiateType      CP#1
-  StoreIndexedTOS
-  Push                 r1
-  PushInt              1
-  PushNull
-  Push                 r0
-  InstantiateType      CP#2
-  StoreIndexedTOS
-  Push                 r1
-  PushInt              2
-  PushNull
-  Push                 r0
-  InstantiateType      CP#3
-  StoreIndexedTOS
-  Push                 r1
-  PushInt              3
-  PushNull
-  Push                 r0
-  InstantiateType      CP#4
-  StoreIndexedTOS
-  Push                 r1
-  PushInt              4
-  PushNull
-  Push                 r0
-  InstantiateType      CP#5
-  StoreIndexedTOS
-  Push                 r1
-  PushInt              5
-  PushNull
-  Push                 r0
-  InstantiateType      CP#6
-  StoreIndexedTOS
-  Push                 r1
-  PushInt              6
-  PushNull
-  Push                 r0
-  InstantiateType      CP#7
-  StoreIndexedTOS
-  Push                 r1
-  PushInt              7
-  PushNull
-  Push                 r0
-  InstantiateType      CP#8
-  StoreIndexedTOS
-  DirectCall           2, CP#9
-  DirectCall           1, CP#11
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = ObjectRef < dart:core::Type >
-  [1] = Type #lib::callWithArgs::TypeParam/0
-  [2] = Type #lib::callWithArgs::TypeParam/1
-  [3] = Type #lib::callWithArgs::TypeParam/2
-  [4] = Type #lib::callWithArgs::TypeParam/3
-  [5] = Type #lib::callWithArgs::TypeParam/4
-  [6] = Type #lib::callWithArgs::TypeParam/5
-  [7] = Type #lib::callWithArgs::TypeParam/6
-  [8] = Type #lib::callWithArgs::TypeParam/7
-  [9] = DirectCall 'dart:core::List::_fromLiteral (constructor)', ArgDesc num-args 2, num-type-args 0, names []
-  [10] = Reserved
-  [11] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
-  [12] = Reserved
-}
-]static method callWithArgs<T1 extends core::Object = dynamic, T2 extends core::Object = dynamic, T3 extends core::Object = dynamic, T4 extends core::Object = dynamic, T5 extends core::Object = dynamic, T6 extends core::Object = dynamic, T7 extends core::Object = dynamic, T8 extends core::Object = dynamic>() → void {
-  core::print(<core::Type>[self::callWithArgs::T1, self::callWithArgs::T2, self::callWithArgs::T3, self::callWithArgs::T4, self::callWithArgs::T5, self::callWithArgs::T6, self::callWithArgs::T7, self::callWithArgs::T8]);
-}
-[@vm.bytecode=
-Bytecode {
-  Entry                1
-  CheckStack           0
-  PushConstant         CP#0
-  PushConstant         CP#2
-  PushConstant         CP#1
-  AllocateT
-  StoreLocal           r0
-  Push                 r0
-  DirectCall           1, CP#3
-  Drop1
-  InterfaceCall        2, CP#5
-  Drop1
-  PushConstant         CP#7
-  PushConstant         CP#2
-  PushConstant         CP#1
-  AllocateT
-  StoreLocal           r0
-  Push                 r0
-  DirectCall           1, CP#3
-  Drop1
-  InterfaceCall        2, CP#5
-  Drop1
-  PushConstant         CP#7
-  PushConstant         CP#8
-  PushConstant         CP#1
-  AllocateT
-  StoreLocal           r0
-  Push                 r0
-  DirectCall           1, CP#3
-  Drop1
-  InterfaceCall        2, CP#5
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = ObjectRef < #lib::C3, #lib::C4 >
-  [1] = Class #lib::A
-  [2] = ObjectRef < #lib::C1, #lib::C2 >
-  [3] = DirectCall '#lib::A:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [4] = Reserved
-  [5] = InterfaceCall '#lib::A::foo', ArgDesc num-args 1, num-type-args 2, names []
-  [6] = Reserved
-  [7] = ObjectRef < dart:core::List < #lib::C3 >, dart:core::List < #lib::C4 > >
-  [8] = ObjectRef < dart:core::List < #lib::C1 >, dart:core::List < #lib::C2 > >
-}
-]static method callA() → void {
-  new self::A::•<self::C1, self::C2>().{self::A::foo}<self::C3, self::C4>();
-  new self::A::•<self::C1, self::C2>().{self::A::foo}<core::List<self::C3>, core::List<self::C4>>();
-  new self::A::•<core::List<self::C1>, core::List<self::C2>>().{self::A::foo}<core::List<self::C3>, core::List<self::C4>>();
-}
-[@vm.bytecode=
-Bytecode {
-  Entry                7
-  CheckStack           0
-  Allocate             CP#14
-  StoreLocal           r3
-  Push                 r3
-  PushNull
-  StoreFieldTOS        CP#15
-  Push                 r3
-  PushNull
-  StoreFieldTOS        CP#6
-  Push                 r3
-  PushConstant         CP#5
-  StoreFieldTOS        CP#3
-  Push                 r3
-  PushConstant         CP#0
-  StoreFieldTOS        CP#17
-  Push                 r3
-  Push                 r0
-  StoreFieldTOS        CP#1
-  PopLocal             r2
-  Push                 r2
-  StoreLocal           r3
-  PushConstant         CP#19
-  StoreLocal           r6
-  DirectCall           2, CP#20
-  Drop1
-  Allocate             CP#14
-  StoreLocal           r5
-  Push                 r6
-  StoreFieldTOS        CP#3
-  Push                 r5
-  Push                 r3
-  LoadFieldTOS         CP#15
-  StoreFieldTOS        CP#15
-  Push                 r5
-  Push                 r3
-  LoadFieldTOS         CP#6
-  StoreFieldTOS        CP#6
-  Push                 r5
-  Push                 r3
-  LoadFieldTOS         CP#17
-  StoreFieldTOS        CP#17
-  Push                 r5
-  Push                 r3
-  LoadFieldTOS         CP#1
-  StoreFieldTOS        CP#1
-  Push                 r5
-  PopLocal             r4
-  Push                 r4
-  ReturnTOS
-}
-ConstantPool {
-  [0] = ClosureFunction 0
-  [1] = InstanceField dart:core::_Closure::_context (field)
-  [2] = Reserved
-  [3] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
-  [4] = Reserved
-  [5] = EmptyTypeArguments
-  [6] = InstanceField dart:core::_Closure::_function_type_arguments (field)
-  [7] = Reserved
-  [8] = DirectCall 'dart:_internal::_prependTypeArguments', ArgDesc num-args 4, num-type-args 0, names []
-  [9] = Reserved
-  [10] = Type #lib::testPartialInstantiation::Closure/0::TypeParam/0
-  [11] = ObjectRef 't'
-  [12] = SubtypeTestCache
-  [13] = EndClosureFunctionScope
-  [14] = Class dart:core::_Closure
-  [15] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
-  [16] = Reserved
-  [17] = InstanceField dart:core::_Closure::_function (field)
-  [18] = Reserved
-  [19] = ObjectRef < dart:core::int >
-  [20] = DirectCall 'dart:_internal::_boundsCheckForPartialInstantiation', ArgDesc num-args 2, num-type-args 0, names []
-  [21] = Reserved
-}
-Closure #lib::testPartialInstantiation::'foo' <dart:core::Object T> (#lib::testPartialInstantiation::Closure/0::TypeParam/0 t) -> void
-ClosureBytecode {
-  EntryFixed           2, 3
-  CheckStack           0
-  Push                 FP[-6]
-  LoadFieldTOS         CP#1
-  PopLocal             r1
-  Push                 FP[-6]
-  LoadFieldTOS         CP#3
-  StoreLocal           r0
-  PushConstant         CP#5
-  JumpIfEqStrict       L1
-  CheckFunctionTypeArgs 0, r2
-  Jump                 L2
-L1:
-  CheckFunctionTypeArgs 1, r0
-L2:
-  Push                 r0
-  Push                 FP[-6]
-  LoadFieldTOS         CP#6
-  PushInt              0
-  PushInt              1
-  DirectCall           4, CP#8
-  PopLocal             r0
-  Push                 FP[-5]
-  PushConstant         CP#10
-  PushNull
-  Push                 r0
-  PushConstant         CP#11
-  AssertAssignable     0, CP#12
-  Drop1
-  PushNull
-  ReturnTOS
-
-}
-]static method testPartialInstantiation() → (core::int) → dynamic {
-  function foo<T extends core::Object = dynamic>(T t) → void {}
-  (core::int) → dynamic intFunc = foo<core::int>;
-  return intFunc;
-}
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-}
-]static method main() → dynamic {}
diff --git a/pkg/vm/testcases/bytecode/deferred_lib.dart.expect b/pkg/vm/testcases/bytecode/deferred_lib.dart.expect
index 131cb14..3974030 100644
--- a/pkg/vm/testcases/bytecode/deferred_lib.dart.expect
+++ b/pkg/vm/testcases/bytecode/deferred_lib.dart.expect
@@ -1,10 +1,21 @@
-library #lib;
-import self as self;
-import "./hello.dart" as hel;
+main = #lib::main;
+ [@vm.bytecode=
+ComponentBytecodeMetadata {
 
-import "#pkg/vm/testcases/bytecode/hello.dart" deferred as lib;
+Bytecode (version: stable)
+Main library: #lib
 
-[@vm.bytecode=
+}
+] [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function 'callDeferred', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -20,9 +31,13 @@
   [2] = DirectCall '#pkg/vm/testcases/bytecode/hello.dart::main', ArgDesc num-args 0, num-type-args 0, names []
   [3] = Reserved
 }
-]static method callDeferred() → dynamic
-  return let final dynamic #t1 = CheckLibraryIsLoaded(lib) in hel::main();
-[@vm.bytecode=
+
+
+Function 'testLoadLibrary', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -34,9 +49,13 @@
   [0] = DirectCall 'dart:async::Future::value (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]static method testLoadLibrary() → dynamic
-  return LoadLibrary(lib);
-[@vm.bytecode=
+
+
+Function 'main', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -45,4 +64,17 @@
 }
 ConstantPool {
 }
-]static method main() → dynamic {}
+
+}
+
+}
+]library #lib from "#lib" as #lib {
+
+  import "#pkg/vm/testcases/bytecode/hello.dart" deferred as lib;
+
+  static method callDeferred() → dynamic
+    return let final dynamic #t1 = CheckLibraryIsLoaded(lib) in #lib1::main();
+  static method testLoadLibrary() → dynamic
+    return LoadLibrary(lib);
+  static method main() → dynamic {}
+}
diff --git a/pkg/vm/testcases/bytecode/field_initializers.dart.expect b/pkg/vm/testcases/bytecode/field_initializers.dart.expect
index f5f3808..1a25aa9 100644
--- a/pkg/vm/testcases/bytecode/field_initializers.dart.expect
+++ b/pkg/vm/testcases/bytecode/field_initializers.dart.expect
@@ -1,14 +1,59 @@
-library #lib;
-import self as self;
-import "dart:core" as core;
+main = #lib::main;
+ [@vm.bytecode=
+ComponentBytecodeMetadata {
 
-class A extends core::Object {
-  field core::int foo1;
-  field core::int foo2 = null;
-  field core::int foo3 = 42;
-  field core::int foo4;
-  field core::int foo5 = 43;
+Bytecode (version: stable)
+Main library: #lib
+
+}
+] [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function 'main', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+}
+
+}
+
+}
+]library #lib from "#lib" as #lib {
+
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+Field 'foo1', type = dart:core::int, getter = 'get:foo1', setter = 'set:foo1', reflectable
+    value = null
+
+Field 'foo2', type = dart:core::int, getter = 'get:foo2', setter = 'set:foo2', reflectable
+    value = null
+
+Field 'foo3', type = dart:core::int, getter = 'get:foo3', setter = 'set:foo3', reflectable
+    value = const 42
+
+Field 'foo4', type = dart:core::int, getter = 'get:foo4', setter = 'set:foo4', reflectable
+    value = null
+
+Field 'foo5', type = dart:core::int, getter = 'get:foo5', setter = 'set:foo5', reflectable
+    value = const 43
+
+Function '', constructor, reflectable, debuggable
+    parameters [dart:core::int 'foo4'] (required: 1)
+    return-type #lib::A
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -30,7 +75,7 @@
   PushNull
   ReturnTOS
 }
-Nullable fields: [#lib::A::foo1 (field), #lib::A::foo2 (field)]}
+Nullable fields: [#lib::A::foo1 (field), #lib::A::foo2 (field)]
 ConstantPool {
   [0] = InstanceField #lib::A::foo3 (field)
   [1] = Reserved
@@ -41,10 +86,13 @@
   [6] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [7] = Reserved
 }
-]  constructor •(core::int foo4) → self::A
-    : self::A::foo1 = null, self::A::foo4 = foo4, self::A::foo5 = 44, super core::Object::•()
-    ;
-[@vm.bytecode=
+
+
+Function 'constr2', constructor, reflectable, debuggable
+    parameters [dart:core::int 'x', dart:core::int 'y'] (required: 2)
+    return-type #lib::A
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -68,7 +116,7 @@
   PushNull
   ReturnTOS
 }
-Nullable fields: [#lib::A::foo2 (field), #lib::A::foo4 (field)]}
+Nullable fields: [#lib::A::foo2 (field), #lib::A::foo4 (field)]
 ConstantPool {
   [0] = InstanceField #lib::A::foo3 (field)
   [1] = Reserved
@@ -79,10 +127,13 @@
   [6] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [7] = Reserved
 }
-]  constructor constr2(core::int x, core::int y) → self::A
-    : self::A::foo4 = null, self::A::foo1 = x, self::A::foo5 = y.{core::num::+}(1), super core::Object::•()
-    ;
-[@vm.bytecode=
+
+
+Function 'redirecting1', constructor, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type #lib::A
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -97,10 +148,13 @@
   [0] = DirectCall '#lib::A:: (constructor)', ArgDesc num-args 2, num-type-args 0, names []
   [1] = Reserved
 }
-]  constructor redirecting1() → self::A
-    : this self::A::•(45)
-    ;
-[@vm.bytecode=
+
+
+Function 'redirecting2', constructor, reflectable, debuggable
+    parameters [dart:core::int 'a', dart:core::int 'b', dart:core::int 'c'] (required: 3)
+    return-type #lib::A
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -118,15 +172,47 @@
   [0] = DirectCall '#lib::A::constr2 (constructor)', ArgDesc num-args 3, num-type-args 0, names []
   [1] = Reserved
 }
-]  constructor redirecting2(core::int a, core::int b, core::int c) → self::A
-    : this self::A::constr2(a, b.{core::num::*}(c))
-    ;
+
 }
-class B extends self::A {
-  field core::int foo6 = 46;
-  static field core::int foo7 = 47;
-  static const field core::int foo8 = 48;
+
+}
+]  class A extends dart.core::Object {
+    field dart.core::int foo1;
+    field dart.core::int foo2 = null;
+    field dart.core::int foo3 = 42;
+    field dart.core::int foo4;
+    field dart.core::int foo5 = 43;
+    constructor •(dart.core::int foo4) → #lib::A
+      : #lib::A::foo1 = null, #lib::A::foo4 = foo4, #lib::A::foo5 = 44, super dart.core::Object::•()
+      ;
+    constructor constr2(dart.core::int x, dart.core::int y) → #lib::A
+      : #lib::A::foo4 = null, #lib::A::foo1 = x, #lib::A::foo5 = y.{dart.core::num::+}(1), super dart.core::Object::•()
+      ;
+    constructor redirecting1() → #lib::A
+      : this #lib::A::•(45)
+      ;
+    constructor redirecting2(dart.core::int a, dart.core::int b, dart.core::int c) → #lib::A
+      : this #lib::A::constr2(a, b.{dart.core::num::*}(c))
+      ;
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+Field 'foo6', type = dart:core::int, getter = 'get:foo6', setter = 'set:foo6', reflectable
+    value = const 46
+
+Field 'foo7', type = dart:core::int, reflectable, static
+    value = const 47
+
+Field 'foo8', type = dart:core::int, reflectable, static, const, final
+    value = const 48
+
+Function '', constructor, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type #lib::B
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -146,10 +232,13 @@
   [2] = DirectCall '#lib::A:: (constructor)', ArgDesc num-args 2, num-type-args 0, names []
   [3] = Reserved
 }
-]  constructor •() → self::B
-    : super self::A::•(49)
-    ;
-[@vm.bytecode=
+
+
+Function 'c2', constructor, reflectable, debuggable
+    parameters [dart:core::int 'i', dart:core::int 'j'] (required: 2)
+    return-type #lib::B
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -174,17 +263,23 @@
   [2] = DirectCall '#lib::A::redirecting2 (constructor)', ArgDesc num-args 4, num-type-args 0, names []
   [3] = Reserved
 }
-]  constructor c2(core::int i, core::int j) → self::B
-    : self::B::foo6 = 50, super self::A::redirecting2(i, j, 51)
-    ;
+
 }
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  PushNull
-  ReturnTOS
+
 }
-ConstantPool {
+]  class B extends #lib::A {
+    field dart.core::int foo6 = 46;
+    static field dart.core::int foo7 = 47;
+    static const field dart.core::int foo8 = #C1;
+    constructor •() → #lib::B
+      : super #lib::A::•(49)
+      ;
+    constructor c2(dart.core::int i, dart.core::int j) → #lib::B
+      : #lib::B::foo6 = 50, super #lib::A::redirecting2(i, j, 51)
+      ;
+  }
+  static method main() → dynamic {}
 }
-]static method main() → dynamic {}
+constants  {
+  #C1 = 48
+}
diff --git a/pkg/vm/testcases/bytecode/hello.dart.expect b/pkg/vm/testcases/bytecode/hello.dart.expect
index bcddfbb..ce754e8 100644
--- a/pkg/vm/testcases/bytecode/hello.dart.expect
+++ b/pkg/vm/testcases/bytecode/hello.dart.expect
@@ -1,8 +1,21 @@
-library #lib;
-import self as self;
-import "dart:core" as core;
+main = #lib::main;
+ [@vm.bytecode=
+ComponentBytecodeMetadata {
 
-[@vm.bytecode=
+Bytecode (version: stable)
+Main library: #lib
+
+}
+] [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function 'main', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -17,6 +30,13 @@
   [1] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
   [2] = Reserved
 }
-]static method main() → dynamic {
-  core::print("Hello, Dart Bytecode!");
+
+}
+
+}
+]library #lib from "#lib" as #lib {
+
+  static method main() → dynamic {
+    dart.core::print("Hello, Dart Bytecode!");
+  }
 }
diff --git a/pkg/vm/testcases/bytecode/instance_creation.dart.expect b/pkg/vm/testcases/bytecode/instance_creation.dart.expect
index 7c6bf14..2a98dd2 100644
--- a/pkg/vm/testcases/bytecode/instance_creation.dart.expect
+++ b/pkg/vm/testcases/bytecode/instance_creation.dart.expect
@@ -1,12 +1,247 @@
-library #lib;
-import self as self;
-import "dart:core" as core;
-import "dart:_internal" as _in;
+main = #lib::main;
+ [@vm.bytecode=
+ComponentBytecodeMetadata {
 
-class Base<T1 extends core::Object = dynamic, T2 extends core::Object = dynamic> extends core::Object {
-  generic-covariant-impl field self::Base::T1 t1 = null;
-  generic-covariant-impl field self::Base::T2 t2 = null;
+Bytecode (version: stable)
+Main library: #lib
+
+}
+] [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function 'foo1', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
+Bytecode {
+  Entry                1
+  CheckStack           0
+  Allocate             CP#0
+  StoreLocal           r0
+  Push                 r0
+  PushConstant         CP#1
+  DirectCall           2, CP#2
+  Drop1
+  ReturnTOS
+}
+ConstantPool {
+  [0] = Class #lib::C
+  [1] = ObjectRef 'hello'
+  [2] = DirectCall '#lib::C:: (constructor)', ArgDesc num-args 2, num-type-args 0, names []
+  [3] = Reserved
+}
+
+
+Function 'foo2', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type void
+
+
+Bytecode {
+  Entry                1
+  CheckStack           0
+  PushConstant         CP#1
+  PushConstant         CP#0
+  AllocateT
+  StoreLocal           r0
+  Push                 r0
+  PushConstant         CP#2
+  DirectCall           2, CP#3
+  Drop1
+  Drop1
+  PushConstant         CP#6
+  PushConstant         CP#5
+  AllocateT
+  StoreLocal           r0
+  Push                 r0
+  DirectCall           1, CP#7
+  Drop1
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = Class #lib::A
+  [1] = ObjectRef < dart:core::int, dart:core::String >
+  [2] = ObjectRef 'hi'
+  [3] = DirectCall '#lib::A:: (constructor)', ArgDesc num-args 2, num-type-args 0, names []
+  [4] = Reserved
+  [5] = Class #lib::B
+  [6] = ObjectRef < dart:core::List < dart:core::int >, dart:core::String, dart:core::int >
+  [7] = DirectCall '#lib::B:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [8] = Reserved
+}
+
+
+Function 'foo3', static, reflectable, debuggable
+    type-params <dart:core::Object T>
+    parameters [] (required: 0)
+    return-type void
+
+
+Bytecode {
+  Entry                2
+  CheckStack           0
+  CheckFunctionTypeArgs 1, r0
+  PushNull
+  Push                 r0
+  InstantiateTypeArgumentsTOS 0, CP#1
+  PushConstant         CP#0
+  AllocateT
+  StoreLocal           r1
+  Push                 r1
+  DirectCall           1, CP#2
+  Drop1
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = Class #lib::B
+  [1] = ObjectRef < dart:core::List < dart:core::List < #lib::foo3::TypeParam/0 > >, dart:core::String, dart:core::List < #lib::foo3::TypeParam/0 > >
+  [2] = DirectCall '#lib::B:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [3] = Reserved
+}
+
+
+Function 'foo4', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type void
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  PushConstant         CP#0
+  DirectCall           1, CP#1
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = ObjectRef < dart:core::int, dart:core::List < dart:core::String > >
+  [1] = DirectCall '#lib::G::test_factory (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [2] = Reserved
+}
+
+
+Function 'foo5', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type void
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  PushNull
+  DirectCall           1, CP#0
+  Drop1
+  PushNull
+  PushInt              42
+  DirectCall           2, CP#2
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = DirectCall '#lib::I::test_factory2 (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [1] = Reserved
+  [2] = DirectCall '#lib::I::test_factory2 (constructor)', ArgDesc num-args 2, num-type-args 0, names ['param']
+  [3] = Reserved
+}
+
+
+Function 'foo6', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  PushConstant         CP#0
+  PushInt              0
+  DirectCall           2, CP#1
+  ReturnTOS
+}
+ConstantPool {
+  [0] = ObjectRef < dart:core::String >
+  [1] = DirectCall 'dart:core::_GrowableList:: (constructor)', ArgDesc num-args 2, num-type-args 0, names []
+  [2] = Reserved
+}
+
+
+Function 'foo7', static, reflectable, debuggable
+    parameters [dart:core::int 'n'] (required: 1)
+    return-type dynamic
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  PushConstant         CP#0
+  Push                 FP[-5]
+  DirectCall           2, CP#1
+  ReturnTOS
+}
+ConstantPool {
+  [0] = ObjectRef < dart:core::int >
+  [1] = DirectCall 'dart:core::_List:: (constructor)', ArgDesc num-args 2, num-type-args 0, names []
+  [2] = Reserved
+}
+
+
+Function 'main', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  DirectCall           0, CP#0
+  Drop1
+  DirectCall           0, CP#2
+  Drop1
+  PushConstant         CP#4
+  DirectCall           1, CP#5
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = DirectCall '#lib::foo1', ArgDesc num-args 0, num-type-args 0, names []
+  [1] = Reserved
+  [2] = DirectCall '#lib::foo2', ArgDesc num-args 0, num-type-args 0, names []
+  [3] = Reserved
+  [4] = ObjectRef < dart:core::String >
+  [5] = DirectCall '#lib::foo3', ArgDesc num-args 0, num-type-args 1, names []
+  [6] = Reserved
+}
+
+}
+
+}
+]library #lib from "#lib" as #lib {
+
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+Field 't1', type = #lib::Base::TypeParam/0, getter = 'get:t1', setter = 'set:t1', reflectable
+    value = null
+
+Field 't2', type = #lib::Base::TypeParam/1, getter = 'get:t2', setter = 'set:t2', reflectable
+    value = null
+
+Function '', constructor, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type #lib::Base < #lib::Base::TypeParam/0, #lib::Base::TypeParam/1 >
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -45,7 +280,7 @@
   PushNull
   ReturnTOS
 }
-Nullable fields: [#lib::Base::t1 (field), #lib::Base::t2 (field)]}
+Nullable fields: [#lib::Base::t1 (field), #lib::Base::t2 (field)]
 ConstantPool {
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
@@ -59,13 +294,28 @@
   [9] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
   [10] = Reserved
 }
-]  constructor •() → self::Base<self::Base::T1, self::Base::T2>
-    : super core::Object::•() {
-    core::print("Base: ${self::Base::T1}, ${self::Base::T2}");
-  }
+
 }
-class A extends self::Base<core::int, core::String> {
+
+}
+]  class Base<T1 extends dart.core::Object = dynamic, T2 extends dart.core::Object = dynamic> extends dart.core::Object {
+    generic-covariant-impl field #lib::Base::T1 t1 = null;
+    generic-covariant-impl field #lib::Base::T2 t2 = null;
+    constructor •() → #lib::Base<#lib::Base::T1, #lib::Base::T2>
+      : super dart.core::Object::•() {
+      dart.core::print("Base: ${#lib::Base::T1}, ${#lib::Base::T2}");
+    }
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable, debuggable
+    parameters [dart:core::String 's'] (required: 1)
+    return-type #lib::A
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -79,12 +329,25 @@
   [0] = DirectCall '#lib::Base:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  constructor •(core::String s) → self::A
-    : super self::Base::•()
-    ;
+
 }
-class B<T extends core::Object = dynamic> extends self::Base<core::List<self::B::T>, core::String> {
+
+}
+]  class A extends #lib::Base<dart.core::int, dart.core::String> {
+    constructor •(dart.core::String s) → #lib::A
+      : super #lib::Base::•()
+      ;
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type #lib::B < dart:core::List < #lib::B::TypeParam/0 >, dart:core::String, #lib::B::TypeParam/0 >
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -123,13 +386,26 @@
   [7] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
   [8] = Reserved
 }
-]  constructor •() → self::B<self::B::T>
-    : super self::Base::•() {
-    core::print("B: ${self::B::T}");
-  }
+
 }
-class C extends core::Object {
+
+}
+]  class B<T extends dart.core::Object = dynamic> extends #lib::Base<dart.core::List<#lib::B::T>, dart.core::String> {
+    constructor •() → #lib::B<#lib::B::T>
+      : super #lib::Base::•() {
+      dart.core::print("B: ${#lib::B::T}");
+    }
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable, debuggable
+    parameters [dart:core::String 's'] (required: 1)
+    return-type #lib::C
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -163,13 +439,26 @@
   [5] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
   [6] = Reserved
 }
-]  constructor •(core::String s) → self::C
-    : super core::Object::•() {
-    core::print("C: ${s}");
-  }
+
 }
-class E<K extends core::Object = dynamic, V extends core::Object = dynamic> extends core::Object {
+
+}
+]  class C extends dart.core::Object {
+    constructor •(dart.core::String s) → #lib::C
+      : super dart.core::Object::•() {
+      dart.core::print("C: ${s}");
+    }
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::E < #lib::E::TypeParam/0, #lib::E::TypeParam/1 >
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -183,10 +472,13 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::E<self::E::K, self::E::V>
-    : super core::Object::•()
-    ;
-[@vm.bytecode=
+
+
+Function 'test_reuse1', reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -200,11 +492,27 @@
   [1] = DirectCall 'dart:core::Map:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [2] = Reserved
 }
-]  method test_reuse1() → dynamic
-    return core::Map::•<self::E::K, self::E::V>();
+
 }
-class F<K extends core::Object = dynamic, V extends core::Object = dynamic> extends self::E<core::String, core::List<self::F::V>> {
+
+}
+]  class E<K extends dart.core::Object = dynamic, V extends dart.core::Object = dynamic> extends dart.core::Object {
+    synthetic constructor •() → #lib::E<#lib::E::K, #lib::E::V>
+      : super dart.core::Object::•()
+      ;
+    method test_reuse1() → dynamic
+      return dart.core::Map::•<#lib::E::K, #lib::E::V>();
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::F < dart:core::String, dart:core::List < #lib::F::TypeParam/1 >, #lib::F::TypeParam/0, #lib::F::TypeParam/1 >
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -218,10 +526,13 @@
   [0] = DirectCall '#lib::E:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::F<self::F::K, self::F::V>
-    : super self::E::•()
-    ;
-[@vm.bytecode=
+
+
+Function 'test_reuse2', reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -235,11 +546,27 @@
   [1] = DirectCall 'dart:core::Map:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [2] = Reserved
 }
-]  method test_reuse2() → dynamic
-    return core::Map::•<core::String, core::List<self::F::V>>();
+
 }
-class G<K extends core::Object = dynamic, V extends core::Object = dynamic> extends core::Object {
+
+}
+]  class F<K extends dart.core::Object = dynamic, V extends dart.core::Object = dynamic> extends #lib::E<dart.core::String, dart.core::List<#lib::F::V>> {
+    synthetic constructor •() → #lib::F<#lib::F::K, #lib::F::V>
+      : super #lib::E::•()
+      ;
+    method test_reuse2() → dynamic
+      return dart.core::Map::•<dart.core::String, dart.core::List<#lib::F::V>>();
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type #lib::G < #lib::G::TypeParam/0, #lib::G::TypeParam/1 >
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -253,10 +580,14 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  constructor •() → self::G<self::G::K, self::G::V>
-    : super core::Object::•()
-    ;
-[@vm.bytecode=
+
+
+Function 'test_factory', factory, static, reflectable, debuggable
+    type-params <dart:core::Object K, dart:core::Object V>
+    parameters [] (required: 0)
+    return-type #lib::G < #lib::G::test_factory (constructor)::TypeParam/0, #lib::G::test_factory (constructor)::TypeParam/1 >
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -277,11 +608,27 @@
   [2] = DirectCall '#lib::H:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [3] = Reserved
 }
-]  static factory test_factory<K extends core::Object = dynamic, V extends core::Object = dynamic>() → self::G<self::G::test_factory::K, self::G::test_factory::V>
-    return new self::H::•<core::String, self::G::test_factory::K, self::G::test_factory::V>();
+
 }
-class H<P1 extends core::Object = dynamic, P2 extends core::Object = dynamic, P3 extends core::Object = dynamic> extends self::G<self::H::P2, self::H::P3> {
+
+}
+]  class G<K extends dart.core::Object = dynamic, V extends dart.core::Object = dynamic> extends dart.core::Object {
+    constructor •() → #lib::G<#lib::G::K, #lib::G::V>
+      : super dart.core::Object::•()
+      ;
+    static factory test_factory<K extends dart.core::Object = dynamic, V extends dart.core::Object = dynamic>() → #lib::G<#lib::G::test_factory::K, #lib::G::test_factory::V>
+      return new #lib::H::•<dart.core::String, #lib::G::test_factory::K, #lib::G::test_factory::V>();
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::H < #lib::H::TypeParam/1, #lib::H::TypeParam/2, #lib::H::TypeParam/0, #lib::H::TypeParam/1, #lib::H::TypeParam/2 >
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -295,12 +642,25 @@
   [0] = DirectCall '#lib::G:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::H<self::H::P1, self::H::P2, self::H::P3>
-    : super self::G::•()
-    ;
+
 }
-class I extends core::Object {
+
+}
+]  class H<P1 extends dart.core::Object = dynamic, P2 extends dart.core::Object = dynamic, P3 extends dart.core::Object = dynamic> extends #lib::G<#lib::H::P2, #lib::H::P3> {
+    synthetic constructor •() → #lib::H<#lib::H::P1, #lib::H::P2, #lib::H::P3>
+      : super #lib::G::•()
+      ;
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable, debuggable
+    parameters [dynamic 'param'] (required: 1)
+    return-type #lib::I
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -314,10 +674,13 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  constructor •(dynamic param) → self::I
-    : super core::Object::•()
-    ;
-[@vm.bytecode=
+
+
+Function 'test_factory2', factory, static, has-optional-named-params, reflectable, debuggable
+    parameters [dynamic 'param'] (required: 0)
+    return-type #lib::I
+
+
 Bytecode {
   EntryOptional        1, 0, 1
   LoadConstant         r1, CP#0
@@ -339,11 +702,27 @@
   [3] = DirectCall '#lib::I:: (constructor)', ArgDesc num-args 2, num-type-args 0, names []
   [4] = Reserved
 }
-]  static factory test_factory2({dynamic param = null}) → self::I
-    return new self::I::•(param);
+
 }
-class J extends core::Object {
+
+}
+]  class I extends dart.core::Object {
+    constructor •(dynamic param) → #lib::I
+      : super dart.core::Object::•()
+      ;
+    static factory test_factory2({dynamic param = #C1}) → #lib::I
+      return new #lib::I::•(param);
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', factory, static, reflectable, debuggable, native 'agent_J'
+    parameters [] (required: 0)
+    return-type #lib::J
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -354,11 +733,25 @@
 ConstantPool {
   [0] = NativeEntry agent_J
 }
-]  @_in::ExternalName::•("agent_J")
-  external static factory •() → self::J;
+
 }
-abstract class K<A extends core::Object = dynamic, B extends core::Object = dynamic> extends core::Object {
+
+}
+]  class J extends dart.core::Object {
+    @#C3
+    external static factory •() → #lib::J;
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', factory, static, reflectable, debuggable
+    type-params <dart:core::Object A, dart:core::Object B>
+    parameters [] (required: 0)
+    return-type #lib::K < #lib::K:: (constructor)::TypeParam/0, #lib::K:: (constructor)::TypeParam/1 >
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -376,11 +769,24 @@
   [1] = DirectCall '#lib::TestTypeArgReuse:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [2] = Reserved
 }
-]  static factory •<A extends core::Object = dynamic, B extends core::Object = dynamic>() → self::K<self::K::•::A, self::K::•::B>
-    return new self::TestTypeArgReuse::•<self::K::•::A, self::K::•::B>();
+
 }
-class TestTypeArgReuse<P extends core::Object = dynamic, Q extends core::Object = dynamic> extends self::Base<self::TestTypeArgReuse::P, self::TestTypeArgReuse::Q> implements self::K<self::TestTypeArgReuse::P, self::TestTypeArgReuse::Q> {
+
+}
+]  abstract class K<A extends dart.core::Object = dynamic, B extends dart.core::Object = dynamic> extends dart.core::Object {
+    static factory •<A extends dart.core::Object = dynamic, B extends dart.core::Object = dynamic>() → #lib::K<#lib::K::•::A, #lib::K::•::B>
+      return new #lib::TestTypeArgReuse::•<#lib::K::•::A, #lib::K::•::B>();
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::TestTypeArgReuse < #lib::TestTypeArgReuse::TypeParam/0, #lib::TestTypeArgReuse::TypeParam/1 >
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -394,195 +800,43 @@
   [0] = DirectCall '#lib::Base:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::TestTypeArgReuse<self::TestTypeArgReuse::P, self::TestTypeArgReuse::Q>
-    : super self::Base::•()
-    ;
+
 }
-[@vm.bytecode=
-Bytecode {
-  Entry                1
-  CheckStack           0
-  Allocate             CP#0
-  StoreLocal           r0
-  Push                 r0
-  PushConstant         CP#1
-  DirectCall           2, CP#2
-  Drop1
-  ReturnTOS
+
 }
-ConstantPool {
-  [0] = Class #lib::C
-  [1] = ObjectRef 'hello'
-  [2] = DirectCall '#lib::C:: (constructor)', ArgDesc num-args 2, num-type-args 0, names []
-  [3] = Reserved
+]  class TestTypeArgReuse<P extends dart.core::Object = dynamic, Q extends dart.core::Object = dynamic> extends #lib::Base<#lib::TestTypeArgReuse::P, #lib::TestTypeArgReuse::Q> implements #lib::K<#lib::TestTypeArgReuse::P, #lib::TestTypeArgReuse::Q> {
+    synthetic constructor •() → #lib::TestTypeArgReuse<#lib::TestTypeArgReuse::P, #lib::TestTypeArgReuse::Q>
+      : super #lib::Base::•()
+      ;
+  }
+  static method foo1() → dynamic
+    return new #lib::C::•("hello");
+  static method foo2() → void {
+    new #lib::A::•("hi");
+    new #lib::B::•<dart.core::int>();
+  }
+  static method foo3<T extends dart.core::Object = dynamic>() → void {
+    new #lib::B::•<dart.core::List<#lib::foo3::T>>();
+  }
+  static method foo4() → void {
+    #lib::G::test_factory<dart.core::int, dart.core::List<dart.core::String>>();
+  }
+  static method foo5() → void {
+    #lib::I::test_factory2();
+    #lib::I::test_factory2(param: 42);
+  }
+  static method foo6() → dynamic
+    return dart.core::_GrowableList::•<dart.core::String>(0);
+  static method foo7(dart.core::int n) → dynamic
+    return dart.core::_List::•<dart.core::int>(n);
+  static method main() → dynamic {
+    #lib::foo1();
+    #lib::foo2();
+    #lib::foo3<dart.core::String>();
+  }
 }
-]static method foo1() → dynamic
-  return new self::C::•("hello");
-[@vm.bytecode=
-Bytecode {
-  Entry                1
-  CheckStack           0
-  PushConstant         CP#1
-  PushConstant         CP#0
-  AllocateT
-  StoreLocal           r0
-  Push                 r0
-  PushConstant         CP#2
-  DirectCall           2, CP#3
-  Drop1
-  Drop1
-  PushConstant         CP#6
-  PushConstant         CP#5
-  AllocateT
-  StoreLocal           r0
-  Push                 r0
-  DirectCall           1, CP#7
-  Drop1
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = Class #lib::A
-  [1] = ObjectRef < dart:core::int, dart:core::String >
-  [2] = ObjectRef 'hi'
-  [3] = DirectCall '#lib::A:: (constructor)', ArgDesc num-args 2, num-type-args 0, names []
-  [4] = Reserved
-  [5] = Class #lib::B
-  [6] = ObjectRef < dart:core::List < dart:core::int >, dart:core::String, dart:core::int >
-  [7] = DirectCall '#lib::B:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [8] = Reserved
-}
-]static method foo2() → void {
-  new self::A::•("hi");
-  new self::B::•<core::int>();
-}
-[@vm.bytecode=
-Bytecode {
-  Entry                2
-  CheckStack           0
-  CheckFunctionTypeArgs 1, r0
-  PushNull
-  Push                 r0
-  InstantiateTypeArgumentsTOS 0, CP#1
-  PushConstant         CP#0
-  AllocateT
-  StoreLocal           r1
-  Push                 r1
-  DirectCall           1, CP#2
-  Drop1
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = Class #lib::B
-  [1] = ObjectRef < dart:core::List < dart:core::List < #lib::foo3::TypeParam/0 > >, dart:core::String, dart:core::List < #lib::foo3::TypeParam/0 > >
-  [2] = DirectCall '#lib::B:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [3] = Reserved
-}
-]static method foo3<T extends core::Object = dynamic>() → void {
-  new self::B::•<core::List<self::foo3::T>>();
-}
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  PushConstant         CP#0
-  DirectCall           1, CP#1
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = ObjectRef < dart:core::int, dart:core::List < dart:core::String > >
-  [1] = DirectCall '#lib::G::test_factory (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [2] = Reserved
-}
-]static method foo4() → void {
-  self::G::test_factory<core::int, core::List<core::String>>();
-}
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  PushNull
-  DirectCall           1, CP#0
-  Drop1
-  PushNull
-  PushInt              42
-  DirectCall           2, CP#2
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = DirectCall '#lib::I::test_factory2 (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [1] = Reserved
-  [2] = DirectCall '#lib::I::test_factory2 (constructor)', ArgDesc num-args 2, num-type-args 0, names ['param']
-  [3] = Reserved
-}
-]static method foo5() → void {
-  self::I::test_factory2();
-  self::I::test_factory2(param: 42);
-}
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  PushConstant         CP#0
-  PushInt              0
-  DirectCall           2, CP#1
-  ReturnTOS
-}
-ConstantPool {
-  [0] = ObjectRef < dart:core::String >
-  [1] = DirectCall 'dart:core::_GrowableList:: (constructor)', ArgDesc num-args 2, num-type-args 0, names []
-  [2] = Reserved
-}
-]static method foo6() → dynamic
-  return core::_GrowableList::•<core::String>(0);
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  PushConstant         CP#0
-  Push                 FP[-5]
-  DirectCall           2, CP#1
-  ReturnTOS
-}
-ConstantPool {
-  [0] = ObjectRef < dart:core::int >
-  [1] = DirectCall 'dart:core::_List:: (constructor)', ArgDesc num-args 2, num-type-args 0, names []
-  [2] = Reserved
-}
-]static method foo7(core::int n) → dynamic
-  return core::_List::•<core::int>(n);
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  DirectCall           0, CP#0
-  Drop1
-  DirectCall           0, CP#2
-  Drop1
-  PushConstant         CP#4
-  DirectCall           1, CP#5
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = DirectCall '#lib::foo1', ArgDesc num-args 0, num-type-args 0, names []
-  [1] = Reserved
-  [2] = DirectCall '#lib::foo2', ArgDesc num-args 0, num-type-args 0, names []
-  [3] = Reserved
-  [4] = ObjectRef < dart:core::String >
-  [5] = DirectCall '#lib::foo3', ArgDesc num-args 0, num-type-args 1, names []
-  [6] = Reserved
-}
-]static method main() → dynamic {
-  self::foo1();
-  self::foo2();
-  self::foo3<core::String>();
+constants  {
+  #C1 = null
+  #C2 = "agent_J"
+  #C3 = dart._internal::ExternalName {name: #C2}
 }
diff --git a/pkg/vm/testcases/bytecode/literals.dart.expect b/pkg/vm/testcases/bytecode/literals.dart.expect
index bef20c6..3449af2 100644
--- a/pkg/vm/testcases/bytecode/literals.dart.expect
+++ b/pkg/vm/testcases/bytecode/literals.dart.expect
@@ -1,45 +1,17 @@
-library #lib;
-import self as self;
-import "dart:core" as core;
+main = #lib::main;
+ [@vm.bytecode=
+ComponentBytecodeMetadata {
 
-typedef GenericFunctionType = <X extends core::Object = dynamic>(X) → X;
-class A extends core::Object {
-  final field core::int index;
-  final field core::String _name;
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  PushConstant         CP#0
-  ReturnTOS
+Bytecode (version: stable)
+Main library: #lib
+
 }
-ConstantPool {
-  [0] = ObjectRef const <#lib::A> [const #lib::A {#lib::A::index (field): const 0, #lib::A::_name (field): 'A.elem1'}, const #lib::A {#lib::A::index (field): const 1, #lib::A::_name (field): 'A.elem2'}, const #lib::A {#lib::A::index (field): const 2, #lib::A::_name (field): 'A.elem3'}, const #lib::A {#lib::A::index (field): const 3, #lib::A::_name (field): 'A.elem4'}]
-}
-]  static const field core::List<self::A> values = const <self::A>[self::A::elem1, self::A::elem2, self::A::elem3, self::A::elem4];
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  PushConstant         CP#0
-  ReturnTOS
-}
-ConstantPool {
-  [0] = ObjectRef const #lib::A {#lib::A::index (field): const 0, #lib::A::_name (field): 'A.elem1'}
-}
-]  static const field self::A elem1 = const self::A::•(0, "A.elem1");
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  PushConstant         CP#0
-  ReturnTOS
-}
-ConstantPool {
-  [0] = ObjectRef const #lib::A {#lib::A::index (field): const 1, #lib::A::_name (field): 'A.elem2'}
-}
-]  static const field self::A elem2 = const self::A::•(1, "A.elem2");
-[@vm.bytecode=
+] [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+Field 'c1', type = #lib::A, getter = 'get:c1', reflectable, static, const, final
+    initializer 
 Bytecode {
   Entry                0
   CheckStack           0
@@ -49,210 +21,16 @@
 ConstantPool {
   [0] = ObjectRef const #lib::A {#lib::A::index (field): const 2, #lib::A::_name (field): 'A.elem3'}
 }
-]  static const field self::A elem3 = const self::A::•(2, "A.elem3");
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  PushConstant         CP#0
-  ReturnTOS
-}
-ConstantPool {
-  [0] = ObjectRef const #lib::A {#lib::A::index (field): const 3, #lib::A::_name (field): 'A.elem4'}
-}
-]  static const field self::A elem4 = const self::A::•(3, "A.elem4");
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  Push                 FP[-7]
-  Push                 FP[-6]
-  StoreFieldTOS        CP#0
-  Push                 FP[-7]
-  Push                 FP[-5]
-  StoreFieldTOS        CP#2
-  Push                 FP[-7]
-  DirectCall           1, CP#4
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = InstanceField #lib::A::index (field)
-  [1] = Reserved
-  [2] = InstanceField #lib::A::_name (field)
-  [3] = Reserved
-  [4] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [5] = Reserved
-}
-]  const constructor •(core::int index, core::String _name) → self::A
-    : self::A::index = index, self::A::_name = _name, super core::Object::•()
-    ;
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  Push                 FP[-5]
-  DirectCall           1, CP#0
-  ReturnTOS
-}
-ConstantPool {
-  [0] = DirectCall '#lib::A::get:_name', ArgDesc num-args 1, num-type-args 0, names []
-  [1] = Reserved
-}
-]  method toString() → core::String
-    return this.{=self::A::_name};
-}
-class B extends core::Object {
-  final field core::int i;
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  Push                 FP[-6]
-  Push                 FP[-5]
-  StoreFieldTOS        CP#0
-  Push                 FP[-6]
-  DirectCall           1, CP#2
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = InstanceField #lib::B::i (field)
-  [1] = Reserved
-  [2] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [3] = Reserved
-}
-]  const constructor •(core::int i) → self::B
-    : self::B::i = i, super core::Object::•()
-    ;
-}
-class C extends self::B {
-  final field core::int j;
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  Push                 FP[-8]
-  Push                 FP[-7]
-  Push                 FP[-6]
-  AddInt
-  StoreFieldTOS        CP#0
-  Push                 FP[-8]
-  Push                 FP[-5]
-  PushInt              5
-  MulInt
-  DirectCall           2, CP#2
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = InstanceField #lib::C::j (field)
-  [1] = Reserved
-  [2] = DirectCall '#lib::B:: (constructor)', ArgDesc num-args 2, num-type-args 0, names []
-  [3] = Reserved
-}
-]  const constructor •(core::int a, core::int b, core::int c) → self::C
-    : self::C::j = a.{core::num::+}(b), super self::B::•(c.{core::num::*}(5))
-    ;
-}
-class D extends core::Object {
-  final field dynamic x;
-  final field dynamic y;
-[@vm.bytecode=
-Bytecode {
-  EntryOptional        2, 1, 0
-  LoadConstant         r2, CP#0
-  Frame                0
-  CheckStack           0
-  Push                 r0
-  Push                 r1
-  StoreFieldTOS        CP#1
-  Push                 r0
-  Push                 r2
-  StoreFieldTOS        CP#3
-  Push                 r0
-  DirectCall           1, CP#5
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = ObjectRef null
-  [1] = InstanceField #lib::D::x (field)
-  [2] = Reserved
-  [3] = InstanceField #lib::D::y (field)
-  [4] = Reserved
-  [5] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [6] = Reserved
-}
-]  const constructor •(dynamic x, [dynamic y = null]) → self::D
-    : self::D::x = x, self::D::y = y, super core::Object::•()
-    ;
-}
-class E<T extends core::Object = dynamic> extends core::Object {
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  Push                 FP[-5]
-  DirectCall           1, CP#0
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [1] = Reserved
-}
-]  const constructor •() → self::E<self::E::T>
-    : super core::Object::•()
-    ;
-}
-class F<P extends core::Object = dynamic, Q extends core::Object = dynamic> extends self::E<core::Map<self::F::P, self::F::Q>> {
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  Push                 FP[-5]
-  DirectCall           1, CP#0
-  Drop1
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = DirectCall '#lib::E:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
-  [1] = Reserved
-}
-]  const constructor •() → self::F<self::F::P, self::F::Q>
-    : super self::E::•()
-    ;
-}
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  PushConstant         CP#0
-  ReturnTOS
-}
-ConstantPool {
-  [0] = ObjectRef const #lib::A {#lib::A::index (field): const 2, #lib::A::_name (field): 'A.elem3'}
-}
-]static const field self::A c1 = self::A::elem3;
-static const field core::String c2 = "hello!";
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  PushInt              6
-  ReturnTOS
-}
-ConstantPool {
-}
-]static const field core::int c3 = self::c2.{core::String::length};
-[@vm.bytecode=
+
+
+Field 'c2', type = dart:core::String, reflectable, static, const, final
+    value = 'hello!'
+
+Field 'c3', type = dart:core::int, reflectable, static, const, final
+    value = const 6
+
+Field 'c4', type = #lib::C, getter = 'get:c4', reflectable, static, const, final
+    initializer 
 Bytecode {
   Entry                0
   CheckStack           0
@@ -262,8 +40,10 @@
 ConstantPool {
   [0] = ObjectRef const #lib::C {#lib::C::j (field): const 3, #lib::B::i (field): const 15}
 }
-]static const field self::C c4 = const self::C::•(1, 2, 3);
-[@vm.bytecode=
+
+
+Field 'c5', type = #lib::D, getter = 'get:c5', reflectable, static, const, final
+    initializer 
 Bytecode {
   Entry                0
   CheckStack           0
@@ -273,9 +53,16 @@
 ConstantPool {
   [0] = ObjectRef const #lib::D {#lib::D::x (field): const #lib::B {#lib::B::i (field): const 4}, #lib::D::y (field): null}
 }
-]static const field self::D c5 = const self::D::•(const self::B::•(4));
-static field core::double fieldWithDoubleLiteralInitializer = 1.0;
-[@vm.bytecode=
+
+
+Field 'fieldWithDoubleLiteralInitializer', type = dart:core::double, reflectable, static
+    value = const 1.0
+
+Function 'test_constants1', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type void
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -305,14 +92,13 @@
   [4] = ObjectRef const #lib::C {#lib::C::j (field): const 3, #lib::B::i (field): const 15}
   [5] = ObjectRef const #lib::D {#lib::D::x (field): const #lib::B {#lib::B::i (field): const 4}, #lib::D::y (field): null}
 }
-]static method test_constants1() → void {
-  core::print(self::c1);
-  core::print(self::c2);
-  core::print(self::c3);
-  core::print(self::c4);
-  core::print(self::c5);
-}
-[@vm.bytecode=
+
+
+Function 'test_constants2', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type void
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -346,15 +132,13 @@
   [5] = ObjectRef const dart:core::_ImmutableMap < dart:core::String, #lib::A > {dart:core::_ImmutableMap::_kvPairs (field): const <dynamic> ['E2', const #lib::A {#lib::A::index (field): const 1, #lib::A::_name (field): 'A.elem2'}, 'E4', const #lib::A {#lib::A::index (field): const 3, #lib::A::_name (field): 'A.elem4'}]}
   [6] = ObjectRef const #lib::D {#lib::D::x (field): const #lib::C {#lib::C::j (field): const 9, #lib::B::i (field): const 30}, #lib::D::y (field): const dart:core::_ImmutableMap < dart:core::String, dart:core::Object > {dart:core::_ImmutableMap::_kvPairs (field): const <dynamic> ['foo', const 42, 'bar', const #lib::B {#lib::B::i (field): const 6}]}}
 }
-]static method test_constants2() → void {
-  core::print(42);
-  core::print("foo");
-  core::print(self::A::elem2);
-  core::print(const <core::Object>[42, "foo", core::int]);
-  core::print(const <core::String, self::A>{"E2": self::A::elem2, "E4": self::A::elem4});
-  core::print(const self::D::•(const self::C::•(4, 5, 6), const <core::String, core::Object>{"foo": 42, "bar": const self::B::•(self::c2.{core::String::length})}));
-}
-[@vm.bytecode=
+
+
+Function 'test_list_literal', static, reflectable, debuggable
+    parameters [dart:core::int 'a'] (required: 1)
+    return-type void
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -416,11 +200,14 @@
   [8] = Reserved
   [9] = ObjectRef 'b'
 }
-]static method test_list_literal(core::int a) → void {
-  core::print(<core::int>[1, a, 3]);
-  core::print(<core::String>["a", a.{core::int::toString}(), "b"]);
-}
-[@vm.bytecode=
+
+
+Function 'test_map_literal', static, reflectable, debuggable
+    type-params <dart:core::Object T>
+    parameters [dart:core::int 'a', dart:core::int 'b', #lib::test_map_literal::TypeParam/0 'c'] (required: 3)
+    return-type void
+
+
 Bytecode {
   Entry                2
   CheckStack           0
@@ -517,13 +304,13 @@
   [11] = ObjectRef const <dynamic> []
   [12] = ObjectRef < #lib::test_map_literal::TypeParam/0, dart:core::int >
 }
-]static method test_map_literal<T extends core::Object = dynamic>(core::int a, core::int b, self::test_map_literal::T c) → void {
-  core::print(<core::int, core::int>{1: a, b: 2});
-  core::print(<core::String, core::int>{"foo": a, b.{core::int::toString}(): 3});
-  core::print(<core::String, self::test_map_literal::T>{});
-  core::print(<self::test_map_literal::T, core::int>{c: 4});
-}
-[@vm.bytecode=
+
+
+Function 'test_symbol', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type void
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -542,11 +329,14 @@
   [2] = Reserved
   [3] = ObjectRef const '_private_symbol'
 }
-]static method test_symbol() → void {
-  core::print(#test_symbol);
-  core::print(#_private_symbol);
-}
-[@vm.bytecode=
+
+
+Function 'test_type_literal', static, reflectable, debuggable
+    type-params <dart:core::Object T>
+    parameters [] (required: 0)
+    return-type void
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -568,11 +358,13 @@
   [2] = Reserved
   [3] = Type #lib::test_type_literal::TypeParam/0
 }
-]static method test_type_literal<T extends core::Object = dynamic>() → void {
-  core::print(core::String);
-  core::print(self::test_type_literal::T);
-}
-[@vm.bytecode=
+
+
+Function 'testGenericConstInstance', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -582,9 +374,13 @@
 ConstantPool {
   [0] = ObjectRef const #lib::F < dart:core::Map < dart:core::int, dart:core::String >, dart:core::int, dart:core::String > {}
 }
-]static method testGenericConstInstance() → dynamic
-  return const self::F::•<core::int, core::String>();
-[@vm.bytecode=
+
+
+Function 'testGenericFunctionTypeLiteral', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -594,9 +390,13 @@
 ConstantPool {
   [0] = Type FunctionType <dart:core::Object X> (null::TypeParam/0) -> null::TypeParam/0
 }
-]static method testGenericFunctionTypeLiteral() → dynamic
-  return <X extends core::Object = dynamic>(X) → X;
-[@vm.bytecode=
+
+
+Function 'testFieldWithDoubleLiteralInitializer', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -607,9 +407,13 @@
 ConstantPool {
   [0] = StaticField #lib::fieldWithDoubleLiteralInitializer (field)
 }
-]static method testFieldWithDoubleLiteralInitializer() → dynamic
-  return self::fieldWithDoubleLiteralInitializer;
-[@vm.bytecode=
+
+
+Function 'main', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -618,4 +422,439 @@
 }
 ConstantPool {
 }
-]static method main() → dynamic {}
+
+}
+
+}
+]library #lib from "#lib" as #lib {
+
+  typedef GenericFunctionType = <X extends dart.core::Object = dynamic>(X) → X;
+[@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+Field 'index', type = dart:core::int, getter = 'get:index', reflectable, final
+    value = null
+
+Field '_name', type = dart:core::String, getter = 'get:_name', reflectable, final
+    value = null
+
+Field 'values', type = dart:core::List < #lib::A >, getter = 'get:values', reflectable, static, const, final
+    initializer 
+Bytecode {
+  Entry                0
+  CheckStack           0
+  PushConstant         CP#0
+  ReturnTOS
+}
+ConstantPool {
+  [0] = ObjectRef const <#lib::A> [const #lib::A {#lib::A::index (field): const 0, #lib::A::_name (field): 'A.elem1'}, const #lib::A {#lib::A::index (field): const 1, #lib::A::_name (field): 'A.elem2'}, const #lib::A {#lib::A::index (field): const 2, #lib::A::_name (field): 'A.elem3'}, const #lib::A {#lib::A::index (field): const 3, #lib::A::_name (field): 'A.elem4'}]
+}
+
+
+Field 'elem1', type = #lib::A, getter = 'get:elem1', reflectable, static, const, final
+    initializer 
+Bytecode {
+  Entry                0
+  CheckStack           0
+  PushConstant         CP#0
+  ReturnTOS
+}
+ConstantPool {
+  [0] = ObjectRef const #lib::A {#lib::A::index (field): const 0, #lib::A::_name (field): 'A.elem1'}
+}
+
+
+Field 'elem2', type = #lib::A, getter = 'get:elem2', reflectable, static, const, final
+    initializer 
+Bytecode {
+  Entry                0
+  CheckStack           0
+  PushConstant         CP#0
+  ReturnTOS
+}
+ConstantPool {
+  [0] = ObjectRef const #lib::A {#lib::A::index (field): const 1, #lib::A::_name (field): 'A.elem2'}
+}
+
+
+Field 'elem3', type = #lib::A, getter = 'get:elem3', reflectable, static, const, final
+    initializer 
+Bytecode {
+  Entry                0
+  CheckStack           0
+  PushConstant         CP#0
+  ReturnTOS
+}
+ConstantPool {
+  [0] = ObjectRef const #lib::A {#lib::A::index (field): const 2, #lib::A::_name (field): 'A.elem3'}
+}
+
+
+Field 'elem4', type = #lib::A, getter = 'get:elem4', reflectable, static, const, final
+    initializer 
+Bytecode {
+  Entry                0
+  CheckStack           0
+  PushConstant         CP#0
+  ReturnTOS
+}
+ConstantPool {
+  [0] = ObjectRef const #lib::A {#lib::A::index (field): const 3, #lib::A::_name (field): 'A.elem4'}
+}
+
+
+Function '', constructor, const, reflectable, debuggable
+    parameters [dart:core::int 'index', dart:core::String '_name'] (required: 2)
+    return-type #lib::A
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  Push                 FP[-7]
+  Push                 FP[-6]
+  StoreFieldTOS        CP#0
+  Push                 FP[-7]
+  Push                 FP[-5]
+  StoreFieldTOS        CP#2
+  Push                 FP[-7]
+  DirectCall           1, CP#4
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = InstanceField #lib::A::index (field)
+  [1] = Reserved
+  [2] = InstanceField #lib::A::_name (field)
+  [3] = Reserved
+  [4] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [5] = Reserved
+}
+
+
+Function 'toString', reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dart:core::String
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  Push                 FP[-5]
+  DirectCall           1, CP#0
+  ReturnTOS
+}
+ConstantPool {
+  [0] = DirectCall '#lib::A::get:_name', ArgDesc num-args 1, num-type-args 0, names []
+  [1] = Reserved
+}
+
+}
+
+}
+]  class A extends dart.core::Object {
+    final field dart.core::int index;
+    final field dart.core::String _name;
+    static const field dart.core::List<#lib::A> values = #C13;
+    static const field #lib::A elem1 = #C3;
+    static const field #lib::A elem2 = #C6;
+    static const field #lib::A elem3 = #C9;
+    static const field #lib::A elem4 = #C12;
+    const constructor •(dart.core::int index, dart.core::String _name) → #lib::A
+      : #lib::A::index = index, #lib::A::_name = _name, super dart.core::Object::•()
+      ;
+    method toString() → dart.core::String
+      return this.{=#lib::A::_name};
+  }
+[@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+Field 'i', type = dart:core::int, getter = 'get:i', reflectable, final
+    value = null
+
+Function '', constructor, const, reflectable, debuggable
+    parameters [dart:core::int 'i'] (required: 1)
+    return-type #lib::B
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  Push                 FP[-6]
+  Push                 FP[-5]
+  StoreFieldTOS        CP#0
+  Push                 FP[-6]
+  DirectCall           1, CP#2
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = InstanceField #lib::B::i (field)
+  [1] = Reserved
+  [2] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [3] = Reserved
+}
+
+}
+
+}
+]  class B extends dart.core::Object {
+    final field dart.core::int i;
+    const constructor •(dart.core::int i) → #lib::B
+      : #lib::B::i = i, super dart.core::Object::•()
+      ;
+  }
+[@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+Field 'j', type = dart:core::int, getter = 'get:j', reflectable, final
+    value = null
+
+Function '', constructor, const, reflectable, debuggable
+    parameters [dart:core::int 'a', dart:core::int 'b', dart:core::int 'c'] (required: 3)
+    return-type #lib::C
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  Push                 FP[-8]
+  Push                 FP[-7]
+  Push                 FP[-6]
+  AddInt
+  StoreFieldTOS        CP#0
+  Push                 FP[-8]
+  Push                 FP[-5]
+  PushInt              5
+  MulInt
+  DirectCall           2, CP#2
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = InstanceField #lib::C::j (field)
+  [1] = Reserved
+  [2] = DirectCall '#lib::B:: (constructor)', ArgDesc num-args 2, num-type-args 0, names []
+  [3] = Reserved
+}
+
+}
+
+}
+]  class C extends #lib::B {
+    final field dart.core::int j;
+    const constructor •(dart.core::int a, dart.core::int b, dart.core::int c) → #lib::C
+      : #lib::C::j = a.{dart.core::num::+}(b), super #lib::B::•(c.{dart.core::num::*}(5))
+      ;
+  }
+[@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+Field 'x', type = dynamic, getter = 'get:x', reflectable, final
+    value = null
+
+Field 'y', type = dynamic, getter = 'get:y', reflectable, final
+    value = null
+
+Function '', constructor, const, has-optional-positional-params, reflectable, debuggable
+    parameters [dynamic 'x', dynamic 'y'] (required: 1)
+    return-type #lib::D
+
+
+Bytecode {
+  EntryOptional        2, 1, 0
+  LoadConstant         r2, CP#0
+  Frame                0
+  CheckStack           0
+  Push                 r0
+  Push                 r1
+  StoreFieldTOS        CP#1
+  Push                 r0
+  Push                 r2
+  StoreFieldTOS        CP#3
+  Push                 r0
+  DirectCall           1, CP#5
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = ObjectRef null
+  [1] = InstanceField #lib::D::x (field)
+  [2] = Reserved
+  [3] = InstanceField #lib::D::y (field)
+  [4] = Reserved
+  [5] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [6] = Reserved
+}
+
+}
+
+}
+]  class D extends dart.core::Object {
+    final field dynamic x;
+    final field dynamic y;
+    const constructor •(dynamic x, [dynamic y = #C14]) → #lib::D
+      : #lib::D::x = x, #lib::D::y = y, super dart.core::Object::•()
+      ;
+  }
+[@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, const, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type #lib::E < #lib::E::TypeParam/0 >
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  Push                 FP[-5]
+  DirectCall           1, CP#0
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [1] = Reserved
+}
+
+}
+
+}
+]  class E<T extends dart.core::Object = dynamic> extends dart.core::Object {
+    const constructor •() → #lib::E<#lib::E::T>
+      : super dart.core::Object::•()
+      ;
+  }
+[@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, const, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type #lib::F < dart:core::Map < #lib::F::TypeParam/0, #lib::F::TypeParam/1 >, #lib::F::TypeParam/0, #lib::F::TypeParam/1 >
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  Push                 FP[-5]
+  DirectCall           1, CP#0
+  Drop1
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = DirectCall '#lib::E:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
+  [1] = Reserved
+}
+
+}
+
+}
+]  class F<P extends dart.core::Object = dynamic, Q extends dart.core::Object = dynamic> extends #lib::E<dart.core::Map<#lib::F::P, #lib::F::Q>> {
+    const constructor •() → #lib::F<#lib::F::P, #lib::F::Q>
+      : super #lib::E::•()
+      ;
+  }
+  static const field #lib::A c1 = #C9;
+  static const field dart.core::String c2 = #C15;
+  static const field dart.core::int c3 = #C16;
+  static const field #lib::C c4 = #C18;
+  static const field #lib::D c5 = #C21;
+  static field dart.core::double fieldWithDoubleLiteralInitializer = 1.0;
+  static method test_constants1() → void {
+    dart.core::print(#C9);
+    dart.core::print(#C15);
+    dart.core::print(#C16);
+    dart.core::print(#C18);
+    dart.core::print(#C21);
+  }
+  static method test_constants2() → void {
+    dart.core::print(42);
+    dart.core::print("foo");
+    dart.core::print(#C6);
+    dart.core::print(#C25);
+    dart.core::print(#C29);
+    dart.core::print(#C37);
+  }
+  static method test_list_literal(dart.core::int a) → void {
+    dart.core::print(<dart.core::int>[1, a, 3]);
+    dart.core::print(<dart.core::String>["a", a.{dart.core::int::toString}(), "b"]);
+  }
+  static method test_map_literal<T extends dart.core::Object = dynamic>(dart.core::int a, dart.core::int b, #lib::test_map_literal::T c) → void {
+    dart.core::print(<dart.core::int, dart.core::int>{1: a, b: 2});
+    dart.core::print(<dart.core::String, dart.core::int>{"foo": a, b.{dart.core::int::toString}(): 3});
+    dart.core::print(<dart.core::String, #lib::test_map_literal::T>{});
+    dart.core::print(<#lib::test_map_literal::T, dart.core::int>{c: 4});
+  }
+  static method test_symbol() → void {
+    dart.core::print(#C38);
+    dart.core::print(#C39);
+  }
+  static method test_type_literal<T extends dart.core::Object = dynamic>() → void {
+    dart.core::print(dart.core::String);
+    dart.core::print(#lib::test_type_literal::T);
+  }
+  static method testGenericConstInstance() → dynamic
+    return #C40;
+  static method testGenericFunctionTypeLiteral() → dynamic
+    return <X extends dart.core::Object = dynamic>(X) → X;
+  static method testFieldWithDoubleLiteralInitializer() → dynamic
+    return #lib::fieldWithDoubleLiteralInitializer;
+  static method main() → dynamic {}
+}
+constants  {
+  #C1 = 0
+  #C2 = "A.elem1"
+  #C3 = #lib::A {index: #C1, #lib::_name: #C2}
+  #C4 = 1
+  #C5 = "A.elem2"
+  #C6 = #lib::A {index: #C4, #lib::_name: #C5}
+  #C7 = 2
+  #C8 = "A.elem3"
+  #C9 = #lib::A {index: #C7, #lib::_name: #C8}
+  #C10 = 3
+  #C11 = "A.elem4"
+  #C12 = #lib::A {index: #C10, #lib::_name: #C11}
+  #C13 = ListConstant<#lib::A>(#C3, #C6, #C9, #C12)
+  #C14 = null
+  #C15 = "hello!"
+  #C16 = 6
+  #C17 = 15
+  #C18 = #lib::C {j: #C10, i: #C17}
+  #C19 = 4
+  #C20 = #lib::B {i: #C19}
+  #C21 = #lib::D {x: #C20, y: #C14}
+  #C22 = 42
+  #C23 = "foo"
+  #C24 = TypeLiteralConstant(dart.core::int)
+  #C25 = ListConstant<dart.core::Object>(#C22, #C23, #C24)
+  #C26 = "E2"
+  #C27 = "E4"
+  #C28 = ListConstant<dynamic>(#C26, #C6, #C27, #C12)
+  #C29 = dart.core::_ImmutableMap<dart.core::String, #lib::A> {dart.core::_kvPairs: #C28}
+  #C30 = 9
+  #C31 = 30
+  #C32 = #lib::C {j: #C30, i: #C31}
+  #C33 = "bar"
+  #C34 = #lib::B {i: #C16}
+  #C35 = ListConstant<dynamic>(#C23, #C22, #C33, #C34)
+  #C36 = dart.core::_ImmutableMap<dart.core::String, dart.core::Object> {dart.core::_kvPairs: #C35}
+  #C37 = #lib::D {x: #C32, y: #C36}
+  #C38 = #test_symbol
+  #C39 = ##lib::_private_symbol
+  #C40 = #lib::F<dart.core::int, dart.core::String> {}
+}
diff --git a/pkg/vm/testcases/bytecode/loops.dart.expect b/pkg/vm/testcases/bytecode/loops.dart.expect
index 0c91ab3..d4b5acb 100644
--- a/pkg/vm/testcases/bytecode/loops.dart.expect
+++ b/pkg/vm/testcases/bytecode/loops.dart.expect
@@ -1,8 +1,21 @@
-library #lib;
-import self as self;
-import "dart:core" as core;
+main = #lib::main;
+ [@vm.bytecode=
+ComponentBytecodeMetadata {
 
-[@vm.bytecode=
+Bytecode (version: stable)
+Main library: #lib
+
+}
+] [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function 'test_for', static, reflectable, debuggable
+    parameters [dart:core::List < dart:core::int > 'list'] (required: 1)
+    return-type dart:core::int
+
+
 Bytecode {
   Entry                2
   CheckStack           0
@@ -39,14 +52,13 @@
   [2] = InterfaceCall 'dart:core::List::[]', ArgDesc num-args 2, num-type-args 0, names []
   [3] = Reserved
 }
-]static method test_for(core::List<core::int> list) → core::int {
-  core::int sum = 0;
-  for (core::int i = 0; i.{core::num::<}(list.{core::List::length}); i = i.{core::num::+}(1)) {
-    sum = sum.{core::num::+}(list.{core::List::[]}(i));
-  }
-  return sum;
-}
-[@vm.bytecode=
+
+
+Function 'test_for_break', static, reflectable, debuggable
+    parameters [dart:core::List < dart:core::int > 'list'] (required: 1)
+    return-type dart:core::int
+
+
 Bytecode {
   Entry                2
   CheckStack           0
@@ -89,18 +101,13 @@
   [2] = InterfaceCall 'dart:core::List::[]', ArgDesc num-args 2, num-type-args 0, names []
   [3] = Reserved
 }
-]static method test_for_break(core::List<core::int> list) → core::int {
-  core::int sum = 0;
-  #L1:
-  for (core::int i = 0; i.{core::num::>=}(0); i = i.{core::num::+}(1)) {
-    if(i.{core::num::>=}(list.{core::List::length})) {
-      break #L1;
-    }
-    sum = sum.{core::num::+}(list.{core::List::[]}(i));
-  }
-  return sum;
-}
-[@vm.bytecode=
+
+
+Function 'test_for_continue', static, reflectable, debuggable
+    parameters [dart:core::List < dart:core::int > 'list'] (required: 1)
+    return-type dart:core::int
+
+
 Bytecode {
   Entry                2
   CheckStack           0
@@ -145,19 +152,13 @@
   [2] = InterfaceCall 'dart:core::List::[]', ArgDesc num-args 2, num-type-args 0, names []
   [3] = Reserved
 }
-]static method test_for_continue(core::List<core::int> list) → core::int {
-  core::int sum = 0;
-  for (core::int i = 100.{core::int::unary-}(); i.{core::num::<}(list.{core::List::length}); i = i.{core::num::+}(1))
-    #L2:
-    {
-      if(i.{core::num::<}(0)) {
-        break #L2;
-      }
-      sum = sum.{core::num::+}(list.{core::List::[]}(i));
-    }
-  return sum;
-}
-[@vm.bytecode=
+
+
+Function 'test_while', static, reflectable, debuggable
+    parameters [dart:core::List < dart:core::int > 'list'] (required: 1)
+    return-type dart:core::int
+
+
 Bytecode {
   Entry                4
   CheckStack           0
@@ -196,15 +197,13 @@
   [2] = InterfaceCall 'dart:core::List::[]', ArgDesc num-args 2, num-type-args 0, names []
   [3] = Reserved
 }
-]static method test_while(core::List<core::int> list) → core::int {
-  core::int sum = 0;
-  core::int i = 0;
-  while (i.{core::num::<}(list.{core::List::length})) {
-    sum = sum.{core::num::+}(list.{core::List::[]}(let final core::int #t1 = i in let final core::int #t2 = i = #t1.{core::num::+}(1) in #t1));
-  }
-  return sum;
-}
-[@vm.bytecode=
+
+
+Function 'test_do_while', static, reflectable, debuggable
+    parameters [dart:core::List < dart:core::int > 'list'] (required: 1)
+    return-type dart:core::int
+
+
 Bytecode {
   Entry                2
   CheckStack           0
@@ -238,17 +237,13 @@
   [2] = InterfaceCall 'dart:core::List::get:length', ArgDesc num-args 1, num-type-args 0, names []
   [3] = Reserved
 }
-]static method test_do_while(core::List<core::int> list) → core::int {
-  core::int sum = 0;
-  core::int i = 0;
-  do {
-    sum = sum.{core::num::+}(list.{core::List::[]}(i));
-    i = i.{core::num::+}(1);
-  }
-  while (i.{core::num::<}(list.{core::List::length}))
-  return sum;
-}
-[@vm.bytecode=
+
+
+Function 'test_for_in', static, reflectable, debuggable
+    parameters [dart:core::List < dart:core::int > 'list'] (required: 1)
+    return-type dart:core::int
+
+
 Bytecode {
   Entry                3
   CheckStack           0
@@ -282,14 +277,13 @@
   [4] = InterfaceCall 'dart:core::Iterator::get:current', ArgDesc num-args 1, num-type-args 0, names []
   [5] = Reserved
 }
-]static method test_for_in(core::List<core::int> list) → core::int {
-  core::int sum = 0;
-  for (core::int e in list) {
-    sum = sum.{core::num::+}(e);
-  }
-  return sum;
-}
-[@vm.bytecode=
+
+
+Function 'test_for_in_with_outer_var', static, reflectable, debuggable
+    parameters [dart:core::List < dart:core::int > 'list'] (required: 1)
+    return-type dart:core::int
+
+
 Bytecode {
   Entry                4
   CheckStack           0
@@ -327,16 +321,13 @@
   [4] = InterfaceCall 'dart:core::Iterator::get:current', ArgDesc num-args 1, num-type-args 0, names []
   [5] = Reserved
 }
-]static method test_for_in_with_outer_var(core::List<core::int> list) → core::int {
-  core::int sum = 0;
-  core::int e = 42;
-  for (final core::int #t3 in list) {
-    e = #t3;
-    sum = sum.{core::num::+}(e);
-  }
-  return sum;
-}
-[@vm.bytecode=
+
+
+Function 'main', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -345,4 +336,75 @@
 }
 ConstantPool {
 }
-]static method main() → dynamic {}
+
+}
+
+}
+]library #lib from "#lib" as #lib {
+
+  static method test_for(dart.core::List<dart.core::int> list) → dart.core::int {
+    dart.core::int sum = 0;
+    for (dart.core::int i = 0; i.{dart.core::num::<}(list.{dart.core::List::length}); i = i.{dart.core::num::+}(1)) {
+      sum = sum.{dart.core::num::+}(list.{dart.core::List::[]}(i));
+    }
+    return sum;
+  }
+  static method test_for_break(dart.core::List<dart.core::int> list) → dart.core::int {
+    dart.core::int sum = 0;
+    #L1:
+    for (dart.core::int i = 0; i.{dart.core::num::>=}(0); i = i.{dart.core::num::+}(1)) {
+      if(i.{dart.core::num::>=}(list.{dart.core::List::length})) {
+        break #L1;
+      }
+      sum = sum.{dart.core::num::+}(list.{dart.core::List::[]}(i));
+    }
+    return sum;
+  }
+  static method test_for_continue(dart.core::List<dart.core::int> list) → dart.core::int {
+    dart.core::int sum = 0;
+    for (dart.core::int i = 100.{dart.core::int::unary-}(); i.{dart.core::num::<}(list.{dart.core::List::length}); i = i.{dart.core::num::+}(1))
+      #L2:
+      {
+        if(i.{dart.core::num::<}(0)) {
+          break #L2;
+        }
+        sum = sum.{dart.core::num::+}(list.{dart.core::List::[]}(i));
+      }
+    return sum;
+  }
+  static method test_while(dart.core::List<dart.core::int> list) → dart.core::int {
+    dart.core::int sum = 0;
+    dart.core::int i = 0;
+    while (i.{dart.core::num::<}(list.{dart.core::List::length})) {
+      sum = sum.{dart.core::num::+}(list.{dart.core::List::[]}(let final dart.core::int #t1 = i in let final dart.core::int #t2 = i = #t1.{dart.core::num::+}(1) in #t1));
+    }
+    return sum;
+  }
+  static method test_do_while(dart.core::List<dart.core::int> list) → dart.core::int {
+    dart.core::int sum = 0;
+    dart.core::int i = 0;
+    do {
+      sum = sum.{dart.core::num::+}(list.{dart.core::List::[]}(i));
+      i = i.{dart.core::num::+}(1);
+    }
+    while (i.{dart.core::num::<}(list.{dart.core::List::length}))
+    return sum;
+  }
+  static method test_for_in(dart.core::List<dart.core::int> list) → dart.core::int {
+    dart.core::int sum = 0;
+    for (dart.core::int e in list) {
+      sum = sum.{dart.core::num::+}(e);
+    }
+    return sum;
+  }
+  static method test_for_in_with_outer_var(dart.core::List<dart.core::int> list) → dart.core::int {
+    dart.core::int sum = 0;
+    dart.core::int e = 42;
+    for (final dart.core::int #t3 in list) {
+      e = #t3;
+      sum = sum.{dart.core::num::+}(e);
+    }
+    return sum;
+  }
+  static method main() → dynamic {}
+}
diff --git a/pkg/vm/testcases/bytecode/optional_params.dart.expect b/pkg/vm/testcases/bytecode/optional_params.dart.expect
index 0920f3c..4fcf451 100644
--- a/pkg/vm/testcases/bytecode/optional_params.dart.expect
+++ b/pkg/vm/testcases/bytecode/optional_params.dart.expect
@@ -1,8 +1,21 @@
-library #lib;
-import self as self;
-import "dart:core" as core;
+main = #lib::main;
+ [@vm.bytecode=
+ComponentBytecodeMetadata {
 
-[@vm.bytecode=
+Bytecode (version: stable)
+Main library: #lib
+
+}
+] [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function 'foo1', static, has-optional-positional-params, reflectable, debuggable
+    parameters [dynamic 'x', dynamic 'a', dynamic 'b'] (required: 1)
+    return-type void
+
+
 Bytecode {
   EntryOptional        1, 2, 0
   LoadConstant         r1, CP#0
@@ -68,12 +81,13 @@
   [7] = ObjectRef 'a = '
   [8] = ObjectRef 'b = '
 }
-]static method foo1(dynamic x, [dynamic a = "default_a", dynamic b = "default_b"]) → void {
-  core::print("x = ${x}");
-  core::print("a = ${a}");
-  core::print("b = ${b}");
-}
-[@vm.bytecode=
+
+
+Function 'foo2', static, has-optional-named-params, reflectable, debuggable
+    parameters [dynamic 'y', dynamic 'z', dynamic 'c', dynamic 'a', dynamic 'b'] (required: 2)
+    return-type void
+
+
 Bytecode {
   EntryOptional        2, 0, 3
   LoadConstant         r2, CP#0
@@ -179,14 +193,14 @@
   [13] = ObjectRef 'b = '
   [14] = ObjectRef 'c = '
 }
-]static method foo2(dynamic y, dynamic z, {dynamic c = "default_c", dynamic a = 42, dynamic b = const <core::String>["default_b"]}) → void {
-  core::print("y = ${y}");
-  core::print("z = ${z}");
-  core::print("a = ${a}");
-  core::print("b = ${b}");
-  core::print("c = ${c}");
-}
-[@vm.bytecode=
+
+
+Function 'foo3', static, has-optional-named-params, reflectable, debuggable
+    type-params <dart:core::Object P, dart:core::Object Q>
+    parameters [dynamic 'z', dynamic 'y', dart:core::bool 'a', dart:core::Map < #lib::foo3::TypeParam/0, #lib::foo3::TypeParam/1 > 'b'] (required: 2)
+    return-type void
+
+
 Bytecode {
   EntryOptional        2, 0, 2
   LoadConstant         r2, CP#0
@@ -219,12 +233,13 @@
   [5] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
   [6] = Reserved
 }
-]static method foo3<P extends core::Object = dynamic, Q extends core::Object = dynamic>(dynamic z, dynamic y, {core::bool a = false, core::Map<self::foo3::P, self::foo3::Q> b = null}) → void {
-  core::print(self::foo3::P);
-  core::print(y);
-  core::print(b);
-}
-[@vm.bytecode=
+
+
+Function 'main', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -250,7 +265,40 @@
   [6] = DirectCall '#lib::foo2', ArgDesc num-args 3, num-type-args 0, names ['a']
   [7] = Reserved
 }
-]static method main() → dynamic {
-  self::foo1("fixed_x", "concrete_a");
-  self::foo2("fixed_y", "fixed_z", a: "concrete_a");
+
+}
+
+}
+]library #lib from "#lib" as #lib {
+
+  static method foo1(dynamic x, [dynamic a = #C1, dynamic b = #C2]) → void {
+    dart.core::print("x = ${x}");
+    dart.core::print("a = ${a}");
+    dart.core::print("b = ${b}");
+  }
+  static method foo2(dynamic y, dynamic z, {dynamic c = #C3, dynamic a = #C4, dynamic b = #C5}) → void {
+    dart.core::print("y = ${y}");
+    dart.core::print("z = ${z}");
+    dart.core::print("a = ${a}");
+    dart.core::print("b = ${b}");
+    dart.core::print("c = ${c}");
+  }
+  static method foo3<P extends dart.core::Object = dynamic, Q extends dart.core::Object = dynamic>(dynamic z, dynamic y, {dart.core::bool a = #C6, dart.core::Map<#lib::foo3::P, #lib::foo3::Q> b = #C7}) → void {
+    dart.core::print(#lib::foo3::P);
+    dart.core::print(y);
+    dart.core::print(b);
+  }
+  static method main() → dynamic {
+    #lib::foo1("fixed_x", "concrete_a");
+    #lib::foo2("fixed_y", "fixed_z", a: "concrete_a");
+  }
+}
+constants  {
+  #C1 = "default_a"
+  #C2 = "default_b"
+  #C3 = "default_c"
+  #C4 = 42
+  #C5 = ListConstant<dart.core::String>(#C2)
+  #C6 = false
+  #C7 = null
 }
diff --git a/pkg/vm/testcases/bytecode/super_calls.dart.expect b/pkg/vm/testcases/bytecode/super_calls.dart.expect
index 4fa0a47..286cf41 100644
--- a/pkg/vm/testcases/bytecode/super_calls.dart.expect
+++ b/pkg/vm/testcases/bytecode/super_calls.dart.expect
@@ -1,9 +1,45 @@
-library #lib;
-import self as self;
-import "dart:core" as core;
+main = #lib::main;
+ [@vm.bytecode=
+ComponentBytecodeMetadata {
 
-class Base1 extends core::Object {
+Bytecode (version: stable)
+Main library: #lib
+
+}
+] [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function 'main', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+}
+
+}
+
+}
+]library #lib from "#lib" as #lib {
+
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::Base1
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -17,10 +53,14 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::Base1
-    : super core::Object::•()
-    ;
-[@vm.bytecode=
+
+
+Function 'foo', reflectable, debuggable
+    type-params <dart:core::Object T>
+    parameters [#lib::Base1::foo::TypeParam/0 'a1', dart:core::int 'a2'] (required: 2)
+    return-type void
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -30,8 +70,13 @@
 }
 ConstantPool {
 }
-]  method foo<T extends core::Object = dynamic>(self::Base1::foo::T a1, core::int a2) → void {}
-[@vm.bytecode=
+
+
+Function 'get:bar', getter, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -40,9 +85,13 @@
 }
 ConstantPool {
 }
-]  get bar() → dynamic
-    return 42;
-[@vm.bytecode=
+
+
+Function 'set:bazz', setter, reflectable, debuggable
+    parameters [dart:core::int 'x'] (required: 1)
+    return-type void
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -51,10 +100,29 @@
 }
 ConstantPool {
 }
-]  set bazz(core::int x) → void {}
+
 }
-class A extends self::Base1 {
+
+}
+]  class Base1 extends dart.core::Object {
+    synthetic constructor •() → #lib::Base1
+      : super dart.core::Object::•()
+      ;
+    method foo<T extends dart.core::Object = dynamic>(#lib::Base1::foo::T a1, dart.core::int a2) → void {}
+    get bar() → dynamic
+      return 42;
+    set bazz(dart.core::int x) → void {}
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::A
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -68,10 +136,13 @@
   [0] = DirectCall '#lib::Base1:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::A
-    : super self::Base1::•()
-    ;
-[@vm.bytecode=
+
+
+Function 'testSuperCall', reflectable, debuggable
+    parameters [dart:core::int 'x'] (required: 1)
+    return-type dynamic
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -88,9 +159,13 @@
   [2] = DirectCall '#lib::Base1::foo', ArgDesc num-args 3, num-type-args 1, names []
   [3] = Reserved
 }
-]  method testSuperCall(core::int x) → dynamic
-    return super.{self::Base1::foo}<core::String>("a1", 2);
-[@vm.bytecode=
+
+
+Function 'testSuperTearOff', reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -102,9 +177,13 @@
   [0] = DirectCall '#lib::Base1::get:foo', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  method testSuperTearOff() → dynamic
-    return super.{self::Base1::foo};
-[@vm.bytecode=
+
+
+Function 'testSuperGet', reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -116,9 +195,13 @@
   [0] = DirectCall '#lib::Base1::get:bar', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  method testSuperGet() → dynamic
-    return super.{self::Base1::bar};
-[@vm.bytecode=
+
+
+Function 'testSuperCallViaGetter', reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -137,9 +220,13 @@
   [4] = ObjectRef ArgDesc num-args 2, num-type-args 1, names []
   [5] = ICData dynamic target-name 'call', arg-desc CP#4
 }
-]  method testSuperCallViaGetter() → dynamic
-    return [@vm.call-site-attributes.metadata=receiverType:dynamic] super.{self::Base1::bar}.call<core::int>("param");
-[@vm.bytecode=
+
+
+Function 'testSuperSet', reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -154,12 +241,36 @@
   [0] = DirectCall '#lib::Base1::set:bazz', ArgDesc num-args 2, num-type-args 0, names []
   [1] = Reserved
 }
-]  method testSuperSet() → dynamic {
-    super.{self::Base1::bazz} = 3;
-  }
+
 }
-abstract class Base2 extends core::Object {
+
+}
+]  class A extends #lib::Base1 {
+    synthetic constructor •() → #lib::A
+      : super #lib::Base1::•()
+      ;
+    method testSuperCall(dart.core::int x) → dynamic
+      return super.{#lib::Base1::foo}<dart.core::String>("a1", 2);
+    method testSuperTearOff() → dynamic
+      return super.{#lib::Base1::foo};
+    method testSuperGet() → dynamic
+      return super.{#lib::Base1::bar};
+    method testSuperCallViaGetter() → dynamic
+      return [@vm.call-site-attributes.metadata=receiverType:dynamic] super.{#lib::Base1::bar}.call<dart.core::int>("param");
+    method testSuperSet() → dynamic {
+      super.{#lib::Base1::bazz} = 3;
+    }
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::Base2
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -173,15 +284,41 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::Base2
-    : super core::Object::•()
-    ;
-  abstract method foo<T extends core::Object = dynamic>(core::String a1, self::Base2::foo::T a2, core::int a3) → void;
-  abstract get bar() → dynamic;
-  abstract set bazz(core::int x) → void;
+
+
+Function 'foo', abstract, reflectable, debuggable
+    type-params <dart:core::Object T>
+    parameters [dart:core::String 'a1', #lib::Base2::foo::TypeParam/0 'a2', dart:core::int 'a3'] (required: 3)
+    return-type void
+
+Function 'get:bar', getter, abstract, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+Function 'set:bazz', setter, abstract, reflectable, debuggable
+    parameters [dart:core::int 'x'] (required: 1)
+    return-type void
 }
-abstract class B extends self::Base2 {
+
+}
+]  abstract class Base2 extends dart.core::Object {
+    synthetic constructor •() → #lib::Base2
+      : super dart.core::Object::•()
+      ;
+    abstract method foo<T extends dart.core::Object = dynamic>(dart.core::String a1, #lib::Base2::foo::T a2, dart.core::int a3) → void;
+    abstract get bar() → dynamic;
+    abstract set bazz(dart.core::int x) → void;
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::B
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -195,10 +332,13 @@
   [0] = DirectCall '#lib::Base2:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::B
-    : super self::Base2::•()
-    ;
-[@vm.bytecode=
+
+
+Function 'testSuperCall', reflectable, debuggable
+    parameters [dart:core::int 'x'] (required: 1)
+    return-type dynamic
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -246,9 +386,13 @@
   [8] = DirectCall 'dart:core::Object::noSuchMethod', ArgDesc num-args 2, num-type-args 0, names []
   [9] = Reserved
 }
-]  method testSuperCall(core::int x) → dynamic
-    return super.{self::Base2::foo}<core::double>("a1", 3.14, 5);
-[@vm.bytecode=
+
+
+Function 'testSuperTearOff', reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -277,9 +421,13 @@
   [5] = DirectCall 'dart:core::Object::noSuchMethod', ArgDesc num-args 2, num-type-args 0, names []
   [6] = Reserved
 }
-]  method testSuperTearOff() → dynamic
-    return super.{self::Base2::foo};
-[@vm.bytecode=
+
+
+Function 'testSuperGet', reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -308,9 +456,13 @@
   [5] = DirectCall 'dart:core::Object::noSuchMethod', ArgDesc num-args 2, num-type-args 0, names []
   [6] = Reserved
 }
-]  method testSuperGet() → dynamic
-    return super.{self::Base2::bar};
-[@vm.bytecode=
+
+
+Function 'testSuperCallViaGetter', reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -346,9 +498,13 @@
   [9] = ObjectRef ArgDesc num-args 2, num-type-args 1, names []
   [10] = ICData dynamic target-name 'call', arg-desc CP#9
 }
-]  method testSuperCallViaGetter() → dynamic
-    return [@vm.call-site-attributes.metadata=receiverType:dynamic] super.{self::Base2::bar}.call<core::int>("param");
-[@vm.bytecode=
+
+
+Function 'testSuperSet', reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -383,17 +539,25 @@
   [5] = DirectCall 'dart:core::Object::noSuchMethod', ArgDesc num-args 2, num-type-args 0, names []
   [6] = Reserved
 }
-]  method testSuperSet() → dynamic {
-    super.{self::Base2::bazz} = 3;
+
+}
+
+}
+]  abstract class B extends #lib::Base2 {
+    synthetic constructor •() → #lib::B
+      : super #lib::Base2::•()
+      ;
+    method testSuperCall(dart.core::int x) → dynamic
+      return super.{#lib::Base2::foo}<dart.core::double>("a1", 3.14, 5);
+    method testSuperTearOff() → dynamic
+      return super.{#lib::Base2::foo};
+    method testSuperGet() → dynamic
+      return super.{#lib::Base2::bar};
+    method testSuperCallViaGetter() → dynamic
+      return [@vm.call-site-attributes.metadata=receiverType:dynamic] super.{#lib::Base2::bar}.call<dart.core::int>("param");
+    method testSuperSet() → dynamic {
+      super.{#lib::Base2::bazz} = 3;
+    }
   }
+  static method main() → dynamic {}
 }
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-}
-]static method main() → dynamic {}
diff --git a/pkg/vm/testcases/bytecode/switch.dart.expect b/pkg/vm/testcases/bytecode/switch.dart.expect
index d66c358..adea1f5a 100644
--- a/pkg/vm/testcases/bytecode/switch.dart.expect
+++ b/pkg/vm/testcases/bytecode/switch.dart.expect
@@ -1,8 +1,21 @@
-library #lib;
-import self as self;
-import "dart:core" as core;
+main = #lib::main;
+ [@vm.bytecode=
+ComponentBytecodeMetadata {
 
-[@vm.bytecode=
+Bytecode (version: stable)
+Main library: #lib
+
+}
+] [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function 'foo1', static, reflectable, debuggable
+    parameters [dart:core::int 'x'] (required: 1)
+    return-type dart:core::int
+
+
 Bytecode {
   Entry                2
   CheckStack           0
@@ -43,32 +56,13 @@
   [0] = InterfaceCall 'dart:core::Object::==', ArgDesc num-args 2, num-type-args 0, names []
   [1] = Reserved
 }
-]static method foo1(core::int x) → core::int {
-  core::int y;
-  #L1:
-  switch(x) {
-    #L2:
-    case 1:
-      {
-        y = 11;
-        break #L1;
-      }
-    #L3:
-    case 2:
-      {
-        y = 22;
-        break #L1;
-      }
-    #L4:
-    case 3:
-      {
-        y = 33;
-        break #L1;
-      }
-  }
-  return y;
-}
-[@vm.bytecode=
+
+
+Function 'foo2', static, reflectable, debuggable
+    parameters [dart:core::int 'x'] (required: 1)
+    return-type dart:core::int
+
+
 Bytecode {
   Entry                2
   CheckStack           0
@@ -120,35 +114,13 @@
   [0] = InterfaceCall 'dart:core::Object::==', ArgDesc num-args 2, num-type-args 0, names []
   [1] = Reserved
 }
-]static method foo2(core::int x) → core::int {
-  core::int y;
-  #L5:
-  switch(x) {
-    #L6:
-    case 1:
-    case 2:
-    case 3:
-      {
-        y = 11;
-        break #L5;
-      }
-    #L7:
-    case 4:
-    case 5:
-    case 6:
-      {
-        y = 22;
-        break #L5;
-      }
-    #L8:
-    default:
-      {
-        y = 33;
-      }
-  }
-  return y;
-}
-[@vm.bytecode=
+
+
+Function 'foo3', static, reflectable, debuggable
+    parameters [dart:core::int 'x'] (required: 1)
+    return-type dart:core::int
+
+
 Bytecode {
   Entry                2
   CheckStack           0
@@ -200,34 +172,13 @@
   [0] = InterfaceCall 'dart:core::Object::==', ArgDesc num-args 2, num-type-args 0, names []
   [1] = Reserved
 }
-]static method foo3(core::int x) → core::int {
-  core::int y;
-  switch(x) {
-    #L9:
-    case 1:
-    case 2:
-    case 3:
-      {
-        y = 11;
-        continue #L10;
-      }
-    #L10:
-    case 4:
-    case 5:
-    case 6:
-      {
-        y = 22;
-        return 42;
-      }
-    #L11:
-    default:
-      {
-        y = 33;
-      }
-  }
-  return y;
-}
-[@vm.bytecode=
+
+
+Function 'main', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -236,4 +187,99 @@
 }
 ConstantPool {
 }
-]static method main() → dynamic {}
+
+}
+
+}
+]library #lib from "#lib" as #lib {
+
+  static method foo1(dart.core::int x) → dart.core::int {
+    dart.core::int y;
+    #L1:
+    switch(x) {
+      #L2:
+      case #C1:
+        {
+          y = 11;
+          break #L1;
+        }
+      #L3:
+      case #C2:
+        {
+          y = 22;
+          break #L1;
+        }
+      #L4:
+      case #C3:
+        {
+          y = 33;
+          break #L1;
+        }
+    }
+    return y;
+  }
+  static method foo2(dart.core::int x) → dart.core::int {
+    dart.core::int y;
+    #L5:
+    switch(x) {
+      #L6:
+      case #C1:
+      case #C2:
+      case #C3:
+        {
+          y = 11;
+          break #L5;
+        }
+      #L7:
+      case #C4:
+      case #C5:
+      case #C6:
+        {
+          y = 22;
+          break #L5;
+        }
+      #L8:
+      default:
+        {
+          y = 33;
+        }
+    }
+    return y;
+  }
+  static method foo3(dart.core::int x) → dart.core::int {
+    dart.core::int y;
+    switch(x) {
+      #L9:
+      case #C1:
+      case #C2:
+      case #C3:
+        {
+          y = 11;
+          continue #L10;
+        }
+      #L10:
+      case #C4:
+      case #C5:
+      case #C6:
+        {
+          y = 22;
+          return 42;
+        }
+      #L11:
+      default:
+        {
+          y = 33;
+        }
+    }
+    return y;
+  }
+  static method main() → dynamic {}
+}
+constants  {
+  #C1 = 1
+  #C2 = 2
+  #C3 = 3
+  #C4 = 4
+  #C5 = 5
+  #C6 = 6
+}
diff --git a/pkg/vm/testcases/bytecode/try_blocks.dart.expect b/pkg/vm/testcases/bytecode/try_blocks.dart.expect
index 384bd81..b6575db 100644
--- a/pkg/vm/testcases/bytecode/try_blocks.dart.expect
+++ b/pkg/vm/testcases/bytecode/try_blocks.dart.expect
@@ -1,8 +1,21 @@
-library #lib;
-import self as self;
-import "dart:core" as core;
+main = #lib::main;
+ [@vm.bytecode=
+ComponentBytecodeMetadata {
 
-[@vm.bytecode=
+Bytecode (version: stable)
+Main library: #lib
+
+}
+] [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function 'testTryCatch1', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                4
   CheckStack           0
@@ -50,15 +63,13 @@
   [5] = DirectCall 'dart:core::_StringBase::_interpolate', ArgDesc num-args 1, num-type-args 0, names []
   [6] = Reserved
 }
-]static method testTryCatch1() → dynamic {
-  try {
-    core::print("danger!");
-  }
-  on dynamic catch(final dynamic e) {
-    core::print("caught ${e}");
-  }
-}
-[@vm.bytecode=
+
+
+Function 'testTryCatch2', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                5
   CheckStack           0
@@ -190,24 +201,13 @@
   [14] = Type dynamic
   [15] = ObjectRef 'caught something '
 }
-]static method testTryCatch2() → dynamic {
-  try {
-    core::print("danger!");
-  }
-  on core::TypeError catch(no-exception-var) {
-    core::print("caught type error");
-  }
-  on core::AssertionError catch(final core::AssertionError e) {
-    core::print("caught assertion error ${e}");
-  }
-  on core::Error catch(final core::Error e, final core::StackTrace st) {
-    core::print("caught error ${e} ${st}");
-  }
-  on dynamic catch(final dynamic e, final core::StackTrace st) {
-    core::print("caught something ${e} ${st}");
-  }
-}
-[@vm.bytecode=
+
+
+Function 'testTryCatch3', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                7
   CheckStack           0
@@ -222,26 +222,26 @@
   Push                 r0
   PushInt              2
   StoreContextVar      0, 1
-  Allocate             CP#8
+  AllocateClosure      CP#0
   StoreLocal           r5
   Push                 r5
   PushNull
-  StoreFieldTOS        CP#9
+  StoreFieldTOS        CP#8
   Push                 r5
   PushNull
-  StoreFieldTOS        CP#11
+  StoreFieldTOS        CP#10
   Push                 r5
-  PushConstant         CP#13
-  StoreFieldTOS        CP#14
+  PushConstant         CP#12
+  StoreFieldTOS        CP#13
   Push                 r5
   PushConstant         CP#0
-  StoreFieldTOS        CP#16
+  StoreFieldTOS        CP#15
   Push                 r5
   Push                 r0
   StoreFieldTOS        CP#1
   PopLocal             r4
   Push                 r4
-  DynamicCall          1, CP#19
+  DynamicCall          1, CP#18
   Drop1
   Push                 r0
   LoadContextVar       0, 1
@@ -266,7 +266,7 @@
   StoreLocal           r5
   Push                 r5
   PushInt              0
-  PushConstant         CP#20
+  PushConstant         CP#19
   StoreIndexedTOS
   Push                 r5
   PushInt              1
@@ -274,30 +274,30 @@
   StoreIndexedTOS
   Push                 r5
   PushInt              2
-  PushConstant         CP#21
+  PushConstant         CP#20
   StoreIndexedTOS
   Push                 r5
   PushInt              3
   Push                 r0
   LoadContextVar       0, 2
   StoreIndexedTOS
-  DirectCall           1, CP#22
+  DirectCall           1, CP#21
   DirectCall           1, CP#4
   Drop1
-  Allocate             CP#8
+  AllocateClosure      CP#23
   StoreLocal           r5
   Push                 r5
   PushNull
-  StoreFieldTOS        CP#9
+  StoreFieldTOS        CP#8
   Push                 r5
   PushNull
-  StoreFieldTOS        CP#11
+  StoreFieldTOS        CP#10
   Push                 r5
-  PushConstant         CP#13
-  StoreFieldTOS        CP#14
+  PushConstant         CP#12
+  StoreFieldTOS        CP#13
   Push                 r5
-  PushConstant         CP#24
-  StoreFieldTOS        CP#16
+  PushConstant         CP#23
+  StoreFieldTOS        CP#15
   Push                 r5
   Push                 r0
   StoreFieldTOS        CP#1
@@ -323,33 +323,32 @@
   [5] = Reserved
   [6] = Type dynamic
   [7] = EndClosureFunctionScope
-  [8] = Class dart:core::_Closure
-  [9] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
-  [10] = Reserved
-  [11] = InstanceField dart:core::_Closure::_function_type_arguments (field)
-  [12] = Reserved
-  [13] = EmptyTypeArguments
-  [14] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
-  [15] = Reserved
-  [16] = InstanceField dart:core::_Closure::_function (field)
-  [17] = Reserved
-  [18] = ObjectRef ArgDesc num-args 1, num-type-args 0, names []
-  [19] = ICData dynamic target-name 'call', arg-desc CP#18
-  [20] = ObjectRef 'caught '
-  [21] = ObjectRef ' '
-  [22] = DirectCall 'dart:core::_StringBase::_interpolate', ArgDesc num-args 1, num-type-args 0, names []
-  [23] = Reserved
-  [24] = ClosureFunction 1
-  [25] = ObjectRef 'danger bar'
-  [26] = Type dart:core::Error
-  [27] = InterfaceCall 'dart:core::Object::_simpleInstanceOf', ArgDesc num-args 2, num-type-args 0, names []
-  [28] = Reserved
-  [29] = ObjectRef 'error '
-  [30] = ObjectRef ', captured stack trace: '
-  [31] = EndClosureFunctionScope
+  [8] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
+  [9] = Reserved
+  [10] = InstanceField dart:core::_Closure::_function_type_arguments (field)
+  [11] = Reserved
+  [12] = EmptyTypeArguments
+  [13] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
+  [14] = Reserved
+  [15] = InstanceField dart:core::_Closure::_function (field)
+  [16] = Reserved
+  [17] = ObjectRef ArgDesc num-args 1, num-type-args 0, names []
+  [18] = ICData dynamic target-name 'call', arg-desc CP#17
+  [19] = ObjectRef 'caught '
+  [20] = ObjectRef ' '
+  [21] = DirectCall 'dart:core::_StringBase::_interpolate', ArgDesc num-args 1, num-type-args 0, names []
+  [22] = Reserved
+  [23] = ClosureFunction 1
+  [24] = ObjectRef 'danger bar'
+  [25] = Type dart:core::Error
+  [26] = InterfaceCall 'dart:core::Object::_simpleInstanceOf', ArgDesc num-args 2, num-type-args 0, names []
+  [27] = Reserved
+  [28] = ObjectRef 'error '
+  [29] = ObjectRef ', captured stack trace: '
+  [30] = EndClosureFunctionScope
 }
 Closure #lib::testTryCatch3::'foo' () -> void
-ClosureBytecode {
+ClosureCode {
   EntryFixed           1, 6
   CheckStack           0
   Push                 FP[-5]
@@ -386,7 +385,7 @@
 }
 
 Closure #lib::testTryCatch3::'bar' () -> void
-ClosureBytecode {
+ClosureCode {
   EntryFixed           1, 6
   CheckStack           0
   Push                 FP[-5]
@@ -395,7 +394,7 @@
   Push                 r0
   PopLocal             r2
 Try #0 start:
-  PushConstant         CP#25
+  PushConstant         CP#24
   DirectCall           1, CP#4
   Drop1
   Jump                 L1
@@ -407,8 +406,8 @@
   MoveSpecial          exception, r2
   MoveSpecial          stackTrace, r3
   Push                 r2
-  PushConstant         CP#26
-  InterfaceCall        2, CP#27
+  PushConstant         CP#25
+  InterfaceCall        2, CP#26
   JumpIfFalse          L2
   Push                 r2
   PopLocal             r4
@@ -418,7 +417,7 @@
   StoreLocal           r5
   Push                 r5
   PushInt              0
-  PushConstant         CP#29
+  PushConstant         CP#28
   StoreIndexedTOS
   Push                 r5
   PushInt              1
@@ -426,14 +425,14 @@
   StoreIndexedTOS
   Push                 r5
   PushInt              2
-  PushConstant         CP#30
+  PushConstant         CP#29
   StoreIndexedTOS
   Push                 r5
   PushInt              3
   Push                 r0
   LoadContextVar       0, 2
   StoreIndexedTOS
-  DirectCall           1, CP#22
+  DirectCall           1, CP#21
   DirectCall           1, CP#4
   Drop1
   Jump                 L1
@@ -446,36 +445,13 @@
   ReturnTOS
 
 }
-]static method testTryCatch3() → dynamic {
-  core::int x = 1;
-  try {
-    core::int y = 2;
-    function foo() → void {
-      try {
-        core::print("danger foo");
-      }
-      on dynamic catch(final dynamic e) {
-        core::print(x);
-        y = 3;
-      }
-    }
-    [@vm.call-site-attributes.metadata=receiverType:() → void] foo.call();
-    core::print(y);
-  }
-  on dynamic catch(final dynamic e, final core::StackTrace st) {
-    core::print("caught ${e} ${st}");
-    function bar() → void {
-      try {
-        core::print("danger bar");
-      }
-      on core::Error catch(final core::Error e) {
-        core::print("error ${e}, captured stack trace: ${st}");
-      }
-    }
-    return bar;
-  }
-}
-[@vm.bytecode=
+
+
+Function 'testRethrow', static, reflectable, debuggable
+    parameters [dart:core::bool 'cond'] (required: 1)
+    return-type dynamic
+
+
 Bytecode {
   Entry                8
   CheckStack           0
@@ -553,29 +529,13 @@
   [5] = ObjectRef 'try 1 > catch 2 > catch 3'
   [6] = ObjectRef 'catch 1'
 }
-]static method testRethrow(core::bool cond) → dynamic {
-  try {
-    try {
-      core::print("try 1 > try 2");
-    }
-    on dynamic catch(final dynamic e) {
-      try {
-        core::print("try 1 > catch 2 > try 3");
-        if(cond) {
-          rethrow;
-        }
-      }
-      on dynamic catch(final dynamic e) {
-        core::print("try 1 > catch 2 > catch 3");
-      }
-    }
-  }
-  on dynamic catch(final dynamic e, final core::StackTrace st) {
-    core::print("catch 1");
-    core::print(st);
-  }
-}
-[@vm.bytecode=
+
+
+Function 'testTryFinally1', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                3
   CheckStack           0
@@ -633,20 +593,13 @@
   [1] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
   [2] = Reserved
 }
-]static method testTryFinally1() → dynamic {
-  #L1:
-  for (core::int i = 0; i.{core::num::<}(10); i = i.{core::num::+}(1)) {
-    try {
-      if(i.{core::num::>}(5)) {
-        break #L1;
-      }
-    }
-    finally {
-      core::print(i);
-    }
-  }
-}
-[@vm.bytecode=
+
+
+Function 'testTryFinally2', static, reflectable, debuggable
+    parameters [dart:core::int 'x'] (required: 1)
+    return-type dynamic
+
+
 Bytecode {
   Entry                9
   CheckStack           0
@@ -683,26 +636,26 @@
   PushConstant         CP#5
   DirectCall           1, CP#3
   Drop1
-  Allocate             CP#10
+  AllocateClosure      CP#6
   StoreLocal           r8
   Push                 r8
   PushNull
-  StoreFieldTOS        CP#11
+  StoreFieldTOS        CP#10
   Push                 r8
   PushNull
-  StoreFieldTOS        CP#13
+  StoreFieldTOS        CP#12
   Push                 r8
-  PushConstant         CP#15
-  StoreFieldTOS        CP#16
+  PushConstant         CP#14
+  StoreFieldTOS        CP#15
   Push                 r8
   PushConstant         CP#6
-  StoreFieldTOS        CP#18
+  StoreFieldTOS        CP#17
   Push                 r8
   Push                 r0
   StoreFieldTOS        CP#7
   PopLocal             r7
   Push                 r7
-  DynamicCall          1, CP#21
+  DynamicCall          1, CP#20
   Drop1
   Jump                 L4
 Try #1 end:
@@ -712,7 +665,7 @@
   PopLocal             r0
   MoveSpecial          exception, r5
   MoveSpecial          stackTrace, r6
-  PushConstant         CP#23
+  PushConstant         CP#22
   DirectCall           1, CP#3
   Drop1
   Push                 r5
@@ -721,7 +674,7 @@
 L4:
   Push                 r5
   PopLocal             r0
-  PushConstant         CP#23
+  PushConstant         CP#22
   DirectCall           1, CP#3
   Drop1
   Jump                 L5
@@ -732,7 +685,7 @@
   PopLocal             r0
   MoveSpecial          exception, r3
   MoveSpecial          stackTrace, r4
-  PushConstant         CP#25
+  PushConstant         CP#24
   DirectCall           1, CP#3
   Drop1
   Push                 r3
@@ -741,12 +694,12 @@
 L5:
   Push                 r3
   PopLocal             r0
-  PushConstant         CP#25
+  PushConstant         CP#24
   DirectCall           1, CP#3
   Drop1
   Jump                 L2
 L2:
-  PushConstant         CP#26
+  PushConstant         CP#25
   DirectCall           1, CP#3
   Drop1
   Jump                 L3
@@ -755,8 +708,8 @@
   ReturnTOS
 }
 ExceptionsTable {
-  try-index 0, outer -1, start 21, end 71, handler 71, needs-stack-trace, types [CP#22]
-  try-index 1, outer 0, start 29, end 54, handler 54, needs-stack-trace, types [CP#22]
+  try-index 0, outer -1, start 21, end 71, handler 71, needs-stack-trace, types [CP#21]
+  try-index 1, outer 0, start 29, end 54, handler 54, needs-stack-trace, types [CP#21]
 }
 ConstantPool {
   [0] = InterfaceCall 'dart:core::Object::==', ArgDesc num-args 2, num-type-args 0, names []
@@ -769,26 +722,25 @@
   [7] = InstanceField dart:core::_Closure::_context (field)
   [8] = Reserved
   [9] = EndClosureFunctionScope
-  [10] = Class dart:core::_Closure
-  [11] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
-  [12] = Reserved
-  [13] = InstanceField dart:core::_Closure::_function_type_arguments (field)
-  [14] = Reserved
-  [15] = EmptyTypeArguments
-  [16] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
-  [17] = Reserved
-  [18] = InstanceField dart:core::_Closure::_function (field)
-  [19] = Reserved
-  [20] = ObjectRef ArgDesc num-args 1, num-type-args 0, names []
-  [21] = ICData dynamic target-name 'call', arg-desc CP#20
-  [22] = Type dynamic
-  [23] = ObjectRef 'finally 1'
-  [24] = ObjectRef 'after try 1'
-  [25] = ObjectRef 'finally 2'
-  [26] = ObjectRef 'case 2'
+  [10] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
+  [11] = Reserved
+  [12] = InstanceField dart:core::_Closure::_function_type_arguments (field)
+  [13] = Reserved
+  [14] = EmptyTypeArguments
+  [15] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
+  [16] = Reserved
+  [17] = InstanceField dart:core::_Closure::_function (field)
+  [18] = Reserved
+  [19] = ObjectRef ArgDesc num-args 1, num-type-args 0, names []
+  [20] = ICData dynamic target-name 'call', arg-desc CP#19
+  [21] = Type dynamic
+  [22] = ObjectRef 'finally 1'
+  [23] = ObjectRef 'after try 1'
+  [24] = ObjectRef 'finally 2'
+  [25] = ObjectRef 'case 2'
 }
 Closure #lib::testTryFinally2::'foo' () -> void
-ClosureBytecode {
+ClosureCode {
   EntryFixed           1, 2
   CheckStack           0
   Push                 FP[-5]
@@ -806,43 +758,13 @@
   ReturnTOS
 
 }
-]static method testTryFinally2(core::int x) → dynamic {
-  #L2:
-  switch(x) {
-    #L3:
-    case 1:
-      {
-        try {
-          core::print("before try 1");
-          core::int y = 3;
-          try {
-            core::print("try");
-            function foo() → void {
-              core::print(x);
-              core::print(y);
-            }
-            [@vm.call-site-attributes.metadata=receiverType:() → void] foo.call();
-            continue #L4;
-          }
-          finally {
-            core::print("finally 1");
-          }
-          core::print("after try 1");
-        }
-        finally {
-          core::print("finally 2");
-        }
-        break #L2;
-      }
-    #L4:
-    case 2:
-      {
-        core::print("case 2");
-        break #L2;
-      }
-  }
-}
-[@vm.bytecode=
+
+
+Function 'testTryFinally3', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                6
   CheckStack           0
@@ -856,20 +778,20 @@
   Push                 r0
   PopLocal             r3
 Try #0 start:
-  Allocate             CP#9
+  AllocateClosure      CP#0
   StoreLocal           r5
   Push                 r5
   PushNull
-  StoreFieldTOS        CP#10
+  StoreFieldTOS        CP#9
   Push                 r5
   PushNull
-  StoreFieldTOS        CP#12
+  StoreFieldTOS        CP#11
   Push                 r5
-  PushConstant         CP#14
-  StoreFieldTOS        CP#15
+  PushConstant         CP#13
+  StoreFieldTOS        CP#14
   Push                 r5
   PushConstant         CP#0
-  StoreFieldTOS        CP#17
+  StoreFieldTOS        CP#16
   Push                 r5
   Push                 r0
   StoreFieldTOS        CP#1
@@ -887,7 +809,7 @@
   DirectCall           1, CP#3
   Drop1
   Push                 r2
-  DynamicCall          1, CP#20
+  DynamicCall          1, CP#19
   Drop1
   Push                 r3
   Push                 r4
@@ -900,7 +822,7 @@
   DirectCall           1, CP#3
   Drop1
   Push                 r2
-  DynamicCall          1, CP#21
+  DynamicCall          1, CP#20
   Drop1
   Push                 r0
   LoadContextParent
@@ -921,22 +843,21 @@
   [6] = Type dynamic
   [7] = ObjectRef 'try 2'
   [8] = EndClosureFunctionScope
-  [9] = Class dart:core::_Closure
-  [10] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
-  [11] = Reserved
-  [12] = InstanceField dart:core::_Closure::_function_type_arguments (field)
-  [13] = Reserved
-  [14] = EmptyTypeArguments
-  [15] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
-  [16] = Reserved
-  [17] = InstanceField dart:core::_Closure::_function (field)
-  [18] = Reserved
-  [19] = ObjectRef ArgDesc num-args 1, num-type-args 0, names []
-  [20] = ICData dynamic target-name 'call', arg-desc CP#19
-  [21] = ICData dynamic target-name 'call', arg-desc CP#19
+  [9] = InstanceField dart:core::_Closure::_instantiator_type_arguments (field)
+  [10] = Reserved
+  [11] = InstanceField dart:core::_Closure::_function_type_arguments (field)
+  [12] = Reserved
+  [13] = EmptyTypeArguments
+  [14] = InstanceField dart:core::_Closure::_delayed_type_arguments (field)
+  [15] = Reserved
+  [16] = InstanceField dart:core::_Closure::_function (field)
+  [17] = Reserved
+  [18] = ObjectRef ArgDesc num-args 1, num-type-args 0, names []
+  [19] = ICData dynamic target-name 'call', arg-desc CP#18
+  [20] = ICData dynamic target-name 'call', arg-desc CP#18
 }
 Closure #lib::testTryFinally3::'<anonymous closure>' () -> dart:core::int
-ClosureBytecode {
+ClosureCode {
   EntryFixed           1, 6
   CheckStack           0
   Push                 FP[-5]
@@ -1025,33 +946,13 @@
   ReturnTOS
 
 }
-]static method testTryFinally3() → dynamic {
-  core::int x = 11;
-  dynamic y;
-  try {
-    y = () → core::int {
-      core::print(x);
-      try {
-        core::print("try 1");
-        return 42;
-      }
-      finally {
-        try {
-          core::print("try 2");
-          return 43;
-        }
-        finally {
-          core::print(x);
-        }
-      }
-    };
-  }
-  finally {
-    core::print(x);
-    [@vm.call-site-attributes.metadata=receiverType:dynamic] y.call();
-  }
-}
-[@vm.bytecode=
+
+
+Function 'testTryCatchFinally', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                5
   CheckStack           0
@@ -1104,19 +1005,13 @@
   [4] = ObjectRef 'catch'
   [5] = ObjectRef 'finally'
 }
-]static method testTryCatchFinally() → dynamic {
-  try
-    try {
-      core::print("try");
-    }
-    on dynamic catch(final dynamic e) {
-      core::print("catch");
-    }
-  finally {
-    core::print("finally");
-  }
-}
-[@vm.bytecode=
+
+
+Function 'main', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -1125,4 +1020,178 @@
 }
 ConstantPool {
 }
-]static method main() → dynamic {}
+
+}
+
+}
+]library #lib from "#lib" as #lib {
+
+  static method testTryCatch1() → dynamic {
+    try {
+      dart.core::print("danger!");
+    }
+    on dynamic catch(final dynamic e) {
+      dart.core::print("caught ${e}");
+    }
+  }
+  static method testTryCatch2() → dynamic {
+    try {
+      dart.core::print("danger!");
+    }
+    on dart.core::TypeError catch(no-exception-var) {
+      dart.core::print("caught type error");
+    }
+    on dart.core::AssertionError catch(final dart.core::AssertionError e) {
+      dart.core::print("caught assertion error ${e}");
+    }
+    on dart.core::Error catch(final dart.core::Error e, final dart.core::StackTrace st) {
+      dart.core::print("caught error ${e} ${st}");
+    }
+    on dynamic catch(final dynamic e, final dart.core::StackTrace st) {
+      dart.core::print("caught something ${e} ${st}");
+    }
+  }
+  static method testTryCatch3() → dynamic {
+    dart.core::int x = 1;
+    try {
+      dart.core::int y = 2;
+      function foo() → void {
+        try {
+          dart.core::print("danger foo");
+        }
+        on dynamic catch(final dynamic e) {
+          dart.core::print(x);
+          y = 3;
+        }
+      }
+      [@vm.call-site-attributes.metadata=receiverType:() → void] foo.call();
+      dart.core::print(y);
+    }
+    on dynamic catch(final dynamic e, final dart.core::StackTrace st) {
+      dart.core::print("caught ${e} ${st}");
+      function bar() → void {
+        try {
+          dart.core::print("danger bar");
+        }
+        on dart.core::Error catch(final dart.core::Error e) {
+          dart.core::print("error ${e}, captured stack trace: ${st}");
+        }
+      }
+      return bar;
+    }
+  }
+  static method testRethrow(dart.core::bool cond) → dynamic {
+    try {
+      try {
+        dart.core::print("try 1 > try 2");
+      }
+      on dynamic catch(final dynamic e) {
+        try {
+          dart.core::print("try 1 > catch 2 > try 3");
+          if(cond) {
+            rethrow;
+          }
+        }
+        on dynamic catch(final dynamic e) {
+          dart.core::print("try 1 > catch 2 > catch 3");
+        }
+      }
+    }
+    on dynamic catch(final dynamic e, final dart.core::StackTrace st) {
+      dart.core::print("catch 1");
+      dart.core::print(st);
+    }
+  }
+  static method testTryFinally1() → dynamic {
+    #L1:
+    for (dart.core::int i = 0; i.{dart.core::num::<}(10); i = i.{dart.core::num::+}(1)) {
+      try {
+        if(i.{dart.core::num::>}(5)) {
+          break #L1;
+        }
+      }
+      finally {
+        dart.core::print(i);
+      }
+    }
+  }
+  static method testTryFinally2(dart.core::int x) → dynamic {
+    #L2:
+    switch(x) {
+      #L3:
+      case #C1:
+        {
+          try {
+            dart.core::print("before try 1");
+            dart.core::int y = 3;
+            try {
+              dart.core::print("try");
+              function foo() → void {
+                dart.core::print(x);
+                dart.core::print(y);
+              }
+              [@vm.call-site-attributes.metadata=receiverType:() → void] foo.call();
+              continue #L4;
+            }
+            finally {
+              dart.core::print("finally 1");
+            }
+            dart.core::print("after try 1");
+          }
+          finally {
+            dart.core::print("finally 2");
+          }
+          break #L2;
+        }
+      #L4:
+      case #C2:
+        {
+          dart.core::print("case 2");
+          break #L2;
+        }
+    }
+  }
+  static method testTryFinally3() → dynamic {
+    dart.core::int x = 11;
+    dynamic y;
+    try {
+      y = () → dart.core::int {
+        dart.core::print(x);
+        try {
+          dart.core::print("try 1");
+          return 42;
+        }
+        finally {
+          try {
+            dart.core::print("try 2");
+            return 43;
+          }
+          finally {
+            dart.core::print(x);
+          }
+        }
+      };
+    }
+    finally {
+      dart.core::print(x);
+      [@vm.call-site-attributes.metadata=receiverType:dynamic] y.call();
+    }
+  }
+  static method testTryCatchFinally() → dynamic {
+    try
+      try {
+        dart.core::print("try");
+      }
+      on dynamic catch(final dynamic e) {
+        dart.core::print("catch");
+      }
+    finally {
+      dart.core::print("finally");
+    }
+  }
+  static method main() → dynamic {}
+}
+constants  {
+  #C1 = 1
+  #C2 = 2
+}
diff --git a/pkg/vm/testcases/bytecode/type_ops.dart.expect b/pkg/vm/testcases/bytecode/type_ops.dart.expect
index 6da40f3..22da680 100644
--- a/pkg/vm/testcases/bytecode/type_ops.dart.expect
+++ b/pkg/vm/testcases/bytecode/type_ops.dart.expect
@@ -1,9 +1,124 @@
-library #lib;
-import self as self;
-import "dart:core" as core;
+main = #lib::main;
+ [@vm.bytecode=
+ComponentBytecodeMetadata {
 
-class A<T extends core::Object = dynamic> extends core::Object {
+Bytecode (version: stable)
+Main library: #lib
+
+}
+] [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+Field 'globalVar', type = dart:core::List < dart:core::Iterable null >, reflectable, static
+    value = null
+
+Function 'foo1', static, reflectable, debuggable
+    parameters [dynamic 'x'] (required: 1)
+    return-type dynamic
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  Push                 FP[-5]
+  PushConstant         CP#0
+  InterfaceCall        2, CP#1
+  JumpIfFalse          L1
+  PushConstant         CP#3
+  DirectCall           1, CP#4
+  Drop1
+L1:
+  Push                 FP[-5]
+  PushNull
+  PushNull
+  PushConstant         CP#6
+  InterfaceCall        4, CP#7
+  JumpIfFalse          L2
+  PushConstant         CP#9
+  DirectCall           1, CP#4
+  Drop1
+L2:
+  Push                 FP[-5]
+  PushConstant         CP#10
+  PushNull
+  PushNull
+  PushConstant         CP#11
+  AssertAssignable     0, CP#12
+  ReturnTOS
+}
+ConstantPool {
+  [0] = Type #lib::B
+  [1] = InterfaceCall 'dart:core::Object::_simpleInstanceOf', ArgDesc num-args 2, num-type-args 0, names []
+  [2] = Reserved
+  [3] = ObjectRef '11'
+  [4] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
+  [5] = Reserved
+  [6] = Type #lib::C < dart:core::String, dart:core::int, dart:core::Object, dynamic >
+  [7] = InterfaceCall 'dart:core::Object::_instanceOf', ArgDesc num-args 4, num-type-args 0, names []
+  [8] = Reserved
+  [9] = ObjectRef '12'
+  [10] = Type #lib::A < dart:core::int >
+  [11] = ObjectRef ' in type cast'
+  [12] = SubtypeTestCache
+}
+
+
+Function 'foo5', static, reflectable, debuggable
+    parameters [dynamic 'x'] (required: 1)
+    return-type void
+
+
+Bytecode {
+  Entry                1
+  CheckStack           0
+  Push                 FP[-5]
+  PushConstant         CP#0
+  PushNull
+  PushNull
+  PushConstant         CP#1
+  AssertAssignable     0, CP#2
+  StoreStaticTOS       CP#3
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+  [0] = Type dart:core::List < dart:core::Iterable null >
+  [1] = ObjectRef ''
+  [2] = SubtypeTestCache
+  [3] = StaticField #lib::globalVar (field)
+}
+
+
+Function 'main', static, reflectable, debuggable
+    parameters [] (required: 0)
+    return-type dynamic
+
+
+Bytecode {
+  Entry                0
+  CheckStack           0
+  PushNull
+  ReturnTOS
+}
+ConstantPool {
+}
+
+}
+
+}
+]library #lib from "#lib" as #lib {
+
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::A < #lib::A::TypeParam/0 >
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -17,12 +132,25 @@
   [0] = DirectCall 'dart:core::Object:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::A<self::A::T>
-    : super core::Object::•()
-    ;
+
 }
-class B extends self::A<core::String> {
+
+}
+]  class A<T extends dart.core::Object = dynamic> extends dart.core::Object {
+    synthetic constructor •() → #lib::A<#lib::A::T>
+      : super dart.core::Object::•()
+      ;
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::B
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -36,12 +164,25 @@
   [0] = DirectCall '#lib::A:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::B
-    : super self::A::•()
-    ;
+
 }
-class C<T1 extends core::Object = dynamic, T2 extends core::Object = dynamic, T3 extends core::Object = dynamic> extends self::B {
+
+}
+]  class B extends #lib::A<dart.core::String> {
+    synthetic constructor •() → #lib::B
+      : super #lib::A::•()
+      ;
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', constructor, reflectable
+    parameters [] (required: 0)
+    return-type #lib::C < dart:core::String, #lib::C::TypeParam/0, #lib::C::TypeParam/1, #lib::C::TypeParam/2 >
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -55,13 +196,27 @@
   [0] = DirectCall '#lib::B:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [1] = Reserved
 }
-]  synthetic constructor •() → self::C<self::C::T1, self::C::T2, self::C::T3>
-    : super self::B::•()
-    ;
+
 }
-class D<P extends core::Object = dynamic, Q extends core::Object = dynamic> extends self::C<core::int, self::D::Q, self::D::P> {
-  generic-covariant-impl field core::Map<self::D::P, self::D::Q> foo;
+
+}
+]  class C<T1 extends dart.core::Object = dynamic, T2 extends dart.core::Object = dynamic, T3 extends dart.core::Object = dynamic> extends #lib::B {
+    synthetic constructor •() → #lib::C<#lib::C::T1, #lib::C::T2, #lib::C::T3>
+      : super #lib::B::•()
+      ;
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+Field 'foo', type = dart:core::Map < #lib::D::TypeParam/0, #lib::D::TypeParam/1 >, getter = 'get:foo', setter = 'set:foo', reflectable
+    value = null
+
+Function '', constructor, reflectable, debuggable
+    parameters [dynamic 'tt'] (required: 1)
+    return-type #lib::D < dart:core::String, dart:core::int, #lib::D::TypeParam/1, #lib::D::TypeParam/0, #lib::D::TypeParam/1 >
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -90,10 +245,13 @@
   [6] = DirectCall '#lib::C:: (constructor)', ArgDesc num-args 1, num-type-args 0, names []
   [7] = Reserved
 }
-]  constructor •(dynamic tt) → self::D<self::D::P, self::D::Q>
-    : self::D::foo = tt as{TypeError} core::Map<self::D::P, self::D::Q>, super self::C::•()
-    ;
-[@vm.bytecode=
+
+
+Function 'foo2', reflectable, debuggable
+    parameters [dynamic 'y'] (required: 1)
+    return-type dynamic
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -127,7 +285,7 @@
   PushNull
   PushConstant         CP#10
   AssertAssignable     0, CP#11
-  InterfaceCall        2, CP#12
+  UncheckedInterfaceCall 2, CP#12
   Drop1
   PushNull
   ReturnTOS
@@ -148,16 +306,14 @@
   [12] = InterfaceCall '#lib::D::set:foo', ArgDesc num-args 2, num-type-args 0, names []
   [13] = Reserved
 }
-]  method foo2(dynamic y) → dynamic {
-    if(y is self::A<self::D::P>) {
-      core::print("21");
-    }
-    if(y is self::C<dynamic, self::D::Q, core::List<self::D::P>>) {
-      core::print("22");
-    }
-    [@vm.call-site-attributes.metadata=receiverType:#lib::D<#lib::D::P, #lib::D::Q>] this.{self::D::foo} = y as{TypeError} core::Map<self::D::P, self::D::Q>;
-  }
-[@vm.bytecode=
+
+
+Function 'foo3', reflectable, debuggable
+    type-params <dart:core::Object T1, dart:core::Object T2>
+    parameters [dynamic 'z'] (required: 1)
+    return-type dynamic
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -209,16 +365,13 @@
   [12] = InterfaceCall 'dart:core::Map::get:values', ArgDesc num-args 1, num-type-args 0, names []
   [13] = Reserved
 }
-]  method foo3<T1 extends core::Object = dynamic, T2 extends core::Object = dynamic>(dynamic z) → dynamic {
-    if(z is self::A<self::D::foo3::T1>) {
-      core::print("31");
-    }
-    if(z is self::C<core::Map<self::D::foo3::T1, self::D::P>, core::List<self::D::foo3::T2>, self::D::Q>) {
-      core::print("32");
-    }
-    return (z as core::Map<self::D::foo3::T2, self::D::Q>).{core::Map::values};
-  }
-[@vm.bytecode=
+
+
+Function 'foo4', reflectable, debuggable
+    parameters [dynamic 'w'] (required: 1)
+    return-type dart:core::Map < #lib::D::TypeParam/0, #lib::D::TypeParam/1 >
+
+
 Bytecode {
   Entry                2
   CheckStack           0
@@ -262,13 +415,49 @@
   [6] = Reserved
   [7] = SubtypeTestCache
 }
-]  method foo4(dynamic w) → core::Map<self::D::P, self::D::Q> {
-    core::List<core::Map<self::D::P, self::D::Q>> list = <core::Map<self::D::P, self::D::Q>>[w as{TypeError} core::Map<self::D::P, self::D::Q>];
-    return w as{TypeError} core::Map<self::D::P, self::D::Q>;
-  }
+
 }
-class E<P extends core::String = core::String> extends core::Object {
+
+}
+]  class D<P extends dart.core::Object = dynamic, Q extends dart.core::Object = dynamic> extends #lib::C<dart.core::int, #lib::D::Q, #lib::D::P> {
+    generic-covariant-impl field dart.core::Map<#lib::D::P, #lib::D::Q> foo;
+    constructor •(dynamic tt) → #lib::D<#lib::D::P, #lib::D::Q>
+      : #lib::D::foo = tt as{TypeError} dart.core::Map<#lib::D::P, #lib::D::Q>, super #lib::C::•()
+      ;
+    method foo2(dynamic y) → dynamic {
+      if(y is #lib::A<#lib::D::P>) {
+        dart.core::print("21");
+      }
+      if(y is #lib::C<dynamic, #lib::D::Q, dart.core::List<#lib::D::P>>) {
+        dart.core::print("22");
+      }
+      [@vm.call-site-attributes.metadata=receiverType:#lib::D<#lib::D::P, #lib::D::Q>] this.{#lib::D::foo} = y as{TypeError} dart.core::Map<#lib::D::P, #lib::D::Q>;
+    }
+    method foo3<T1 extends dart.core::Object = dynamic, T2 extends dart.core::Object = dynamic>(dynamic z) → dynamic {
+      if(z is #lib::A<#lib::D::foo3::T1>) {
+        dart.core::print("31");
+      }
+      if(z is #lib::C<dart.core::Map<#lib::D::foo3::T1, #lib::D::P>, dart.core::List<#lib::D::foo3::T2>, #lib::D::Q>) {
+        dart.core::print("32");
+      }
+      return (z as dart.core::Map<#lib::D::foo3::T2, #lib::D::Q>).{dart.core::Map::values};
+    }
+    method foo4(dynamic w) → dart.core::Map<#lib::D::P, #lib::D::Q> {
+      dart.core::List<dart.core::Map<#lib::D::P, #lib::D::Q>> list = <dart.core::Map<#lib::D::P, #lib::D::Q>>[w as{TypeError} dart.core::Map<#lib::D::P, #lib::D::Q>];
+      return w as{TypeError} dart.core::Map<#lib::D::P, #lib::D::Q>;
+    }
+  }
 [@vm.bytecode=
+MembersBytecodeMetadata {
+
+Members {
+
+Function '', factory, static, reflectable, debuggable
+    type-params <dart:core::String P>
+    parameters [] (required: 0)
+    return-type #lib::E < #lib::E:: (constructor)::TypeParam/0 >
+
+
 Bytecode {
   Entry                0
   CheckStack           0
@@ -277,9 +466,14 @@
 }
 ConstantPool {
 }
-]  static factory •<P extends core::String = dynamic>() → self::E<self::E::•::P>
-    return null;
-[@vm.bytecode=
+
+
+Function 'foo6', reflectable, debuggable
+    type-params <#lib::E::TypeParam/0 T, dart:core::List < #lib::E::foo6::TypeParam/0 > U>
+    parameters [dart:core::Map < #lib::E::foo6::TypeParam/0, #lib::E::foo6::TypeParam/1 > 'map'] (required: 1)
+    return-type void
+
+
 Bytecode {
   Entry                1
   CheckStack           0
@@ -301,6 +495,7 @@
   PushNull
   ReturnTOS
 }
+Default function type arguments: CP#1
 ConstantPool {
   [0] = TypeArgumentsField #lib::E
   [1] = ObjectRef < #lib::E::TypeParam/0, dart:core::List < #lib::E::TypeParam/0 > >
@@ -308,93 +503,27 @@
   [3] = Type #lib::E::TypeParam/0
   [4] = ObjectRef 'T'
 }
-]  method foo6<generic-covariant-impl T extends self::E::P = self::E::P, U extends core::List<self::E::foo6::T> = core::List<self::E::P>>(core::Map<self::E::foo6::T, self::E::foo6::U> map) → void {}
+
 }
-static field core::List<core::Iterable<dynamic>> globalVar;
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  Push                 FP[-5]
-  PushConstant         CP#0
-  InterfaceCall        2, CP#1
-  JumpIfFalse          L1
-  PushConstant         CP#3
-  DirectCall           1, CP#4
-  Drop1
-L1:
-  Push                 FP[-5]
-  PushNull
-  PushNull
-  PushConstant         CP#6
-  InterfaceCall        4, CP#7
-  JumpIfFalse          L2
-  PushConstant         CP#9
-  DirectCall           1, CP#4
-  Drop1
-L2:
-  Push                 FP[-5]
-  PushConstant         CP#10
-  PushNull
-  PushNull
-  PushConstant         CP#11
-  AssertAssignable     0, CP#12
-  ReturnTOS
+
 }
-ConstantPool {
-  [0] = Type #lib::B
-  [1] = InterfaceCall 'dart:core::Object::_simpleInstanceOf', ArgDesc num-args 2, num-type-args 0, names []
-  [2] = Reserved
-  [3] = ObjectRef '11'
-  [4] = DirectCall 'dart:core::print', ArgDesc num-args 1, num-type-args 0, names []
-  [5] = Reserved
-  [6] = Type #lib::C < dart:core::String, dart:core::int, dart:core::Object, dynamic >
-  [7] = InterfaceCall 'dart:core::Object::_instanceOf', ArgDesc num-args 4, num-type-args 0, names []
-  [8] = Reserved
-  [9] = ObjectRef '12'
-  [10] = Type #lib::A < dart:core::int >
-  [11] = ObjectRef ' in type cast'
-  [12] = SubtypeTestCache
-}
-]static method foo1(dynamic x) → dynamic {
-  if(x is self::B) {
-    core::print("11");
+]  class E<P extends dart.core::String = dart.core::String> extends dart.core::Object {
+    static factory •<P extends dart.core::String = dynamic>() → #lib::E<#lib::E::•::P>
+      return null;
+    method foo6<generic-covariant-impl T extends #lib::E::P = #lib::E::P, U extends dart.core::List<#lib::E::foo6::T> = dart.core::List<#lib::E::P>>(dart.core::Map<#lib::E::foo6::T, #lib::E::foo6::U> map) → void {}
   }
-  if(x is self::C<core::int, core::Object, dynamic>) {
-    core::print("12");
+  static field dart.core::List<dart.core::Iterable<dynamic>> globalVar;
+  static method foo1(dynamic x) → dynamic {
+    if(x is #lib::B) {
+      dart.core::print("11");
+    }
+    if(x is #lib::C<dart.core::int, dart.core::Object, dynamic>) {
+      dart.core::print("12");
+    }
+    return x as #lib::A<dart.core::int>;
   }
-  return x as self::A<core::int>;
+  static method foo5(dynamic x) → void {
+    #lib::globalVar = x as{TypeError} dart.core::List<dart.core::Iterable<dynamic>>;
+  }
+  static method main() → dynamic {}
 }
-[@vm.bytecode=
-Bytecode {
-  Entry                1
-  CheckStack           0
-  Push                 FP[-5]
-  PushConstant         CP#0
-  PushNull
-  PushNull
-  PushConstant         CP#1
-  AssertAssignable     0, CP#2
-  StoreStaticTOS       CP#3
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-  [0] = Type dart:core::List < dart:core::Iterable null >
-  [1] = ObjectRef ''
-  [2] = SubtypeTestCache
-  [3] = StaticField #lib::globalVar (field)
-}
-]static method foo5(dynamic x) → void {
-  self::globalVar = x as{TypeError} core::List<core::Iterable<dynamic>>;
-}
-[@vm.bytecode=
-Bytecode {
-  Entry                0
-  CheckStack           0
-  PushNull
-  ReturnTOS
-}
-ConstantPool {
-}
-]static method main() → dynamic {}
diff --git a/pkg/vm/testcases/transformations/protobuf_aware_treeshaker/compile_protos.sh b/pkg/vm/testcases/transformations/protobuf_aware_treeshaker/compile_protos.sh
new file mode 100755
index 0000000..b4793ee
--- /dev/null
+++ b/pkg/vm/testcases/transformations/protobuf_aware_treeshaker/compile_protos.sh
@@ -0,0 +1,18 @@
+#!/usr/bin/env bash
+# Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE file.
+
+# Running this script requires having protoc_plugin installed in your path.
+
+rm -rf lib/generated
+mkdir lib/generated
+
+# Directory of the script
+DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
+GENERATED_DIR=$DIR/lib/generated
+
+protoc --dart_out=$GENERATED_DIR -I$DIR/protos $DIR/protos/*.proto
+rm $GENERATED_DIR/*.pbenum.dart $GENERATED_DIR/*.pbjson.dart $GENERATED_DIR/*.pbserver.dart
+
+dartfmt -w $DIR/lib/generated
diff --git a/pkg/vm/testcases/transformations/protobuf_aware_treeshaker/lib/create_test.dart b/pkg/vm/testcases/transformations/protobuf_aware_treeshaker/lib/create_test.dart
new file mode 100644
index 0000000..1912459
--- /dev/null
+++ b/pkg/vm/testcases/transformations/protobuf_aware_treeshaker/lib/create_test.dart
@@ -0,0 +1,21 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test/test.dart';
+
+import 'generated/foo.pb.dart';
+
+main() {
+  FooKeep foo = FooKeep()
+    ..barKeep = (BarKeep()..aKeep = 5)
+    ..mapKeep['foo'] = (BarKeep()..aKeep = 2)
+    ..aKeep = 43;
+  test('retrieving values', () {
+    expect(foo.barKeep.aKeep, 5);
+    expect(foo.mapKeep['foo'].aKeep, 2);
+    expect(foo.hasHasKeep(), false);
+    expect(foo.aKeep, 43);
+    foo.clearClearKeep();
+  });
+}
diff --git a/pkg/vm/testcases/transformations/protobuf_aware_treeshaker/lib/decode_test.dart b/pkg/vm/testcases/transformations/protobuf_aware_treeshaker/lib/decode_test.dart
new file mode 100644
index 0000000..d33289f
--- /dev/null
+++ b/pkg/vm/testcases/transformations/protobuf_aware_treeshaker/lib/decode_test.dart
@@ -0,0 +1,28 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:test/test.dart';
+
+import 'generated/foo.pb.dart';
+
+List<int> buffer = <int>[
+  10, 4, 8, 5, 16, //
+  4, 26, 9, 10, 3,
+  102, 111, 111, 18, 2,
+  8, 42, 34, 9, 10,
+  3, 122, 111, 112, 18,
+  2, 8, 3, 40, 43,
+  50, 0, 58, 0,
+];
+
+main() {
+  FooKeep foo = FooKeep.fromBuffer(buffer);
+  test('Kept values are restored correctly', () {
+    expect(foo.mapKeep['foo'].aKeep, 42);
+    expect(foo.barKeep.aKeep, 5);
+    expect(foo.aKeep, 43);
+    expect(foo.hasHasKeep(), true);
+    foo.clearClearKeep();
+  });
+}
diff --git a/pkg/vm/testcases/transformations/protobuf_aware_treeshaker/lib/encode_all_fields.dart b/pkg/vm/testcases/transformations/protobuf_aware_treeshaker/lib/encode_all_fields.dart
new file mode 100644
index 0000000..de756cc
--- /dev/null
+++ b/pkg/vm/testcases/transformations/protobuf_aware_treeshaker/lib/encode_all_fields.dart
@@ -0,0 +1,26 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:math';
+
+import 'generated/foo.pb.dart';
+
+main() {
+  FooKeep foo = FooKeep()
+    ..barKeep = (BarKeep()
+      ..aKeep = 5
+      ..bDrop = 4)
+    ..mapKeep['foo'] = (BarKeep()..aKeep = 42)
+    ..mapDrop['zop'] = (ZopDrop()..aDrop = 3)
+    ..aKeep = 43
+    ..hasKeep = HasKeep()
+    ..clearKeep = ClearKeep();
+  final buffer = foo.writeToBuffer();
+  print('List<int> buffer = <int>[');
+  for (int i = 0; i < buffer.length; i += 5) {
+    final numbers = buffer.sublist(i, min(buffer.length, i + 5)).join(', ');
+    print('  $numbers,${i == 0 ? ' //' : ''}');
+  }
+  print('];');
+}
diff --git a/pkg/vm/testcases/transformations/protobuf_aware_treeshaker/lib/generated/foo.pb.dart b/pkg/vm/testcases/transformations/protobuf_aware_treeshaker/lib/generated/foo.pb.dart
new file mode 100644
index 0000000..4063773
--- /dev/null
+++ b/pkg/vm/testcases/transformations/protobuf_aware_treeshaker/lib/generated/foo.pb.dart
@@ -0,0 +1,253 @@
+///
+//  Generated code. Do not modify.
+//  source: foo.proto
+///
+// ignore_for_file: non_constant_identifier_names,library_prefixes,unused_import
+
+// ignore: UNUSED_SHOWN_NAME
+import 'dart:core' show int, bool, double, String, List, Map, override;
+
+import 'package:protobuf/protobuf.dart' as $pb;
+
+class FooKeep extends $pb.GeneratedMessage {
+  static final $pb.BuilderInfo _i = new $pb.BuilderInfo('FooKeep')
+    ..a<BarKeep>(
+        1, 'barKeep', $pb.PbFieldType.OM, BarKeep.getDefault, BarKeep.create)
+    ..a<BarKeep>(
+        2, 'barDrop', $pb.PbFieldType.OM, BarKeep.getDefault, BarKeep.create)
+    ..m<String, BarKeep>(3, 'mapKeep', 'FooKeep.MapKeepEntry',
+        $pb.PbFieldType.OS, $pb.PbFieldType.OM, BarKeep.create, null, null)
+    ..m<String, ZopDrop>(4, 'mapDrop', 'FooKeep.MapDropEntry',
+        $pb.PbFieldType.OS, $pb.PbFieldType.OM, ZopDrop.create, null, null)
+    ..a<int>(5, 'aKeep', $pb.PbFieldType.O3)
+    ..a<HasKeep>(
+        6, 'hasKeep', $pb.PbFieldType.OM, HasKeep.getDefault, HasKeep.create)
+    ..a<ClearKeep>(7, 'clearKeep', $pb.PbFieldType.OM, ClearKeep.getDefault,
+        ClearKeep.create)
+    ..hasRequiredFields = false;
+
+  FooKeep() : super();
+  FooKeep.fromBuffer(List<int> i,
+      [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
+      : super.fromBuffer(i, r);
+  FooKeep.fromJson(String i,
+      [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
+      : super.fromJson(i, r);
+  FooKeep clone() => new FooKeep()..mergeFromMessage(this);
+  FooKeep copyWith(void Function(FooKeep) updates) =>
+      super.copyWith((message) => updates(message as FooKeep));
+  $pb.BuilderInfo get info_ => _i;
+  static FooKeep create() => new FooKeep();
+  FooKeep createEmptyInstance() => create();
+  static $pb.PbList<FooKeep> createRepeated() => new $pb.PbList<FooKeep>();
+  static FooKeep getDefault() => _defaultInstance ??= create()..freeze();
+  static FooKeep _defaultInstance;
+
+  BarKeep get barKeep => $_getN(0);
+  set barKeep(BarKeep v) {
+    setField(1, v);
+  }
+
+  bool hasBarKeep() => $_has(0);
+  void clearBarKeep() => clearField(1);
+
+  BarKeep get barDrop => $_getN(1);
+  set barDrop(BarKeep v) {
+    setField(2, v);
+  }
+
+  bool hasBarDrop() => $_has(1);
+  void clearBarDrop() => clearField(2);
+
+  Map<String, BarKeep> get mapKeep => $_getMap(2);
+
+  Map<String, ZopDrop> get mapDrop => $_getMap(3);
+
+  int get aKeep => $_get(4, 0);
+  set aKeep(int v) {
+    $_setSignedInt32(4, v);
+  }
+
+  bool hasAKeep() => $_has(4);
+  void clearAKeep() => clearField(5);
+
+  HasKeep get hasKeep => $_getN(5);
+  set hasKeep(HasKeep v) {
+    setField(6, v);
+  }
+
+  bool hasHasKeep() => $_has(5);
+  void clearHasKeep() => clearField(6);
+
+  ClearKeep get clearKeep => $_getN(6);
+  set clearKeep(ClearKeep v) {
+    setField(7, v);
+  }
+
+  bool hasClearKeep() => $_has(6);
+  void clearClearKeep() => clearField(7);
+}
+
+class BarKeep extends $pb.GeneratedMessage {
+  static final $pb.BuilderInfo _i = new $pb.BuilderInfo('BarKeep')
+    ..a<int>(1, 'aKeep', $pb.PbFieldType.O3)
+    ..a<int>(2, 'bDrop', $pb.PbFieldType.O3)
+    ..hasRequiredFields = false;
+
+  BarKeep() : super();
+  BarKeep.fromBuffer(List<int> i,
+      [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
+      : super.fromBuffer(i, r);
+  BarKeep.fromJson(String i,
+      [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
+      : super.fromJson(i, r);
+  BarKeep clone() => new BarKeep()..mergeFromMessage(this);
+  BarKeep copyWith(void Function(BarKeep) updates) =>
+      super.copyWith((message) => updates(message as BarKeep));
+  $pb.BuilderInfo get info_ => _i;
+  static BarKeep create() => new BarKeep();
+  BarKeep createEmptyInstance() => create();
+  static $pb.PbList<BarKeep> createRepeated() => new $pb.PbList<BarKeep>();
+  static BarKeep getDefault() => _defaultInstance ??= create()..freeze();
+  static BarKeep _defaultInstance;
+
+  int get aKeep => $_get(0, 0);
+  set aKeep(int v) {
+    $_setSignedInt32(0, v);
+  }
+
+  bool hasAKeep() => $_has(0);
+  void clearAKeep() => clearField(1);
+
+  int get bDrop => $_get(1, 0);
+  set bDrop(int v) {
+    $_setSignedInt32(1, v);
+  }
+
+  bool hasBDrop() => $_has(1);
+  void clearBDrop() => clearField(2);
+}
+
+class HasKeep extends $pb.GeneratedMessage {
+  static final $pb.BuilderInfo _i = new $pb.BuilderInfo('HasKeep')
+    ..a<int>(1, 'aDrop', $pb.PbFieldType.O3)
+    ..hasRequiredFields = false;
+
+  HasKeep() : super();
+  HasKeep.fromBuffer(List<int> i,
+      [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
+      : super.fromBuffer(i, r);
+  HasKeep.fromJson(String i,
+      [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
+      : super.fromJson(i, r);
+  HasKeep clone() => new HasKeep()..mergeFromMessage(this);
+  HasKeep copyWith(void Function(HasKeep) updates) =>
+      super.copyWith((message) => updates(message as HasKeep));
+  $pb.BuilderInfo get info_ => _i;
+  static HasKeep create() => new HasKeep();
+  HasKeep createEmptyInstance() => create();
+  static $pb.PbList<HasKeep> createRepeated() => new $pb.PbList<HasKeep>();
+  static HasKeep getDefault() => _defaultInstance ??= create()..freeze();
+  static HasKeep _defaultInstance;
+
+  int get aDrop => $_get(0, 0);
+  set aDrop(int v) {
+    $_setSignedInt32(0, v);
+  }
+
+  bool hasADrop() => $_has(0);
+  void clearADrop() => clearField(1);
+}
+
+class ClearKeep extends $pb.GeneratedMessage {
+  static final $pb.BuilderInfo _i = new $pb.BuilderInfo('ClearKeep')
+    ..a<int>(1, 'aDrop', $pb.PbFieldType.O3)
+    ..hasRequiredFields = false;
+
+  ClearKeep() : super();
+  ClearKeep.fromBuffer(List<int> i,
+      [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
+      : super.fromBuffer(i, r);
+  ClearKeep.fromJson(String i,
+      [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
+      : super.fromJson(i, r);
+  ClearKeep clone() => new ClearKeep()..mergeFromMessage(this);
+  ClearKeep copyWith(void Function(ClearKeep) updates) =>
+      super.copyWith((message) => updates(message as ClearKeep));
+  $pb.BuilderInfo get info_ => _i;
+  static ClearKeep create() => new ClearKeep();
+  ClearKeep createEmptyInstance() => create();
+  static $pb.PbList<ClearKeep> createRepeated() => new $pb.PbList<ClearKeep>();
+  static ClearKeep getDefault() => _defaultInstance ??= create()..freeze();
+  static ClearKeep _defaultInstance;
+
+  int get aDrop => $_get(0, 0);
+  set aDrop(int v) {
+    $_setSignedInt32(0, v);
+  }
+
+  bool hasADrop() => $_has(0);
+  void clearADrop() => clearField(1);
+}
+
+class ZopDrop extends $pb.GeneratedMessage {
+  static final $pb.BuilderInfo _i = new $pb.BuilderInfo('ZopDrop')
+    ..a<int>(1, 'aDrop', $pb.PbFieldType.O3)
+    ..hasRequiredFields = false;
+
+  ZopDrop() : super();
+  ZopDrop.fromBuffer(List<int> i,
+      [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
+      : super.fromBuffer(i, r);
+  ZopDrop.fromJson(String i,
+      [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
+      : super.fromJson(i, r);
+  ZopDrop clone() => new ZopDrop()..mergeFromMessage(this);
+  ZopDrop copyWith(void Function(ZopDrop) updates) =>
+      super.copyWith((message) => updates(message as ZopDrop));
+  $pb.BuilderInfo get info_ => _i;
+  static ZopDrop create() => new ZopDrop();
+  ZopDrop createEmptyInstance() => create();
+  static $pb.PbList<ZopDrop> createRepeated() => new $pb.PbList<ZopDrop>();
+  static ZopDrop getDefault() => _defaultInstance ??= create()..freeze();
+  static ZopDrop _defaultInstance;
+
+  int get aDrop => $_get(0, 0);
+  set aDrop(int v) {
+    $_setSignedInt32(0, v);
+  }
+
+  bool hasADrop() => $_has(0);
+  void clearADrop() => clearField(1);
+}
+
+class MobDrop extends $pb.GeneratedMessage {
+  static final $pb.BuilderInfo _i = new $pb.BuilderInfo('MobDrop')
+    ..a<int>(1, 'aDrop', $pb.PbFieldType.O3)
+    ..hasRequiredFields = false;
+
+  MobDrop() : super();
+  MobDrop.fromBuffer(List<int> i,
+      [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
+      : super.fromBuffer(i, r);
+  MobDrop.fromJson(String i,
+      [$pb.ExtensionRegistry r = $pb.ExtensionRegistry.EMPTY])
+      : super.fromJson(i, r);
+  MobDrop clone() => new MobDrop()..mergeFromMessage(this);
+  MobDrop copyWith(void Function(MobDrop) updates) =>
+      super.copyWith((message) => updates(message as MobDrop));
+  $pb.BuilderInfo get info_ => _i;
+  static MobDrop create() => new MobDrop();
+  MobDrop createEmptyInstance() => create();
+  static $pb.PbList<MobDrop> createRepeated() => new $pb.PbList<MobDrop>();
+  static MobDrop getDefault() => _defaultInstance ??= create()..freeze();
+  static MobDrop _defaultInstance;
+
+  int get aDrop => $_get(0, 0);
+  set aDrop(int v) {
+    $_setSignedInt32(0, v);
+  }
+
+  bool hasADrop() => $_has(0);
+  void clearADrop() => clearField(1);
+}
diff --git a/pkg/vm/testcases/transformations/protobuf_aware_treeshaker/protos/foo.proto b/pkg/vm/testcases/transformations/protobuf_aware_treeshaker/protos/foo.proto
new file mode 100644
index 0000000..0a14433
--- /dev/null
+++ b/pkg/vm/testcases/transformations/protobuf_aware_treeshaker/protos/foo.proto
@@ -0,0 +1,41 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+syntax = "proto3";
+
+message FooKeep {
+  BarKeep barKeep = 1;
+  BarKeep barDrop = 2;
+  map<string, BarKeep> mapKeep = 3;
+  map<string, ZopDrop> mapDrop = 4;
+  int32 aKeep = 5;
+  HasKeep hasKeep = 6;
+  ClearKeep clearKeep = 7;
+}
+
+message BarKeep {
+  int32 aKeep = 1;
+  int32 bDrop = 2;
+}
+
+message HasKeep {
+  int32 aDrop = 1;
+}
+
+message ClearKeep {
+  int32 aDrop = 1;
+}
+
+message ZopDrop {
+  int32 aDrop = 1;
+}
+
+message MobDrop {
+  int32 aDrop = 1;
+}
+
+message A {
+  B unused = 1;
+  C used = 2;
+}
\ No newline at end of file
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/annotation.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/annotation.dart.expect
index ea11fc1..16476c9 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/annotation.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/annotation.dart.expect
@@ -2,44 +2,37 @@
 import self as self;
 import "dart:core" as core;
 
-@self::TypedefAnnotation::•(const <core::int>[1, 2, 3])
+@#C5
 typedef SomeType<T extends core::Object = dynamic> = (core::List<T>) → void;
 abstract class ClassAnnotation2 extends core::Object {
-[@vm.unreachable.metadata=]  const constructor •() → self::ClassAnnotation2
-    throw "Attempt to execute method removed by Dart AOT compiler (TFA)";
 }
 abstract class MethodAnnotation extends core::Object {
-[@vm.unreachable.metadata=]  const constructor •(core::int x) → self::MethodAnnotation
-    throw "Attempt to execute method removed by Dart AOT compiler (TFA)";
+[@vm.unreachable.metadata=]  final field core::int x;
 }
 abstract class TypedefAnnotation extends core::Object {
-[@vm.unreachable.metadata=]  const constructor •(core::List<core::int> list) → self::TypedefAnnotation
-    throw "Attempt to execute method removed by Dart AOT compiler (TFA)";
+[@vm.unreachable.metadata=]  final field core::List<core::int> list;
 }
 abstract class VarAnnotation extends core::Object {
-[@vm.unreachable.metadata=]  const constructor •() → self::VarAnnotation
-    throw "Attempt to execute method removed by Dart AOT compiler (TFA)";
 }
 abstract class ParametrizedAnnotation<T extends core::Object = dynamic> extends core::Object {
-[@vm.unreachable.metadata=]  const constructor •(self::ParametrizedAnnotation::T foo) → self::ParametrizedAnnotation<self::ParametrizedAnnotation::T>
-    throw "Attempt to execute method removed by Dart AOT compiler (TFA)";
+[@vm.unreachable.metadata=]  final field self::ParametrizedAnnotation::T foo;
 }
 abstract class A extends core::Object {
   static method staticMethod() → void {}
 }
-@self::ClassAnnotation2::•()
+@#C6
 class B extends core::Object {
   synthetic constructor •() → self::B
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasTearOffUses:false]  @self::MethodAnnotation::•(42)
+[@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasTearOffUses:false]  @#C8
   method instanceMethod() → void {}
 }
 static method foo([@vm.inferred-type.metadata=dart.core::Null?] (core::List<core::int>) → void a) → core::int {
-  @self::VarAnnotation::•() core::int x = 2;
-  return [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+] [@vm.inferred-type.metadata=int? (skip check)] x.{core::num::+}(2);
+  @#C9 core::int x = 2;
+  return [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+] [@vm.inferred-type.metadata=int (skip check)] x.{core::num::+}(2);
 }
-@self::ParametrizedAnnotation::•<core::Null>(null)
+@#C11
 static method main(core::List<core::String> args) → dynamic {
   self::A::staticMethod();
   [@vm.direct-call.metadata=#lib::B::instanceMethod] [@vm.inferred-type.metadata=!? (skip check)] new self::B::•().{self::B::instanceMethod}();
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/bench_is_prime.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/bench_is_prime.dart.expect
index ffdd14f..fa9c87b 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/bench_is_prime.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/bench_is_prime.dart.expect
@@ -3,21 +3,21 @@
 import "dart:core" as core;
 import "dart:_internal" as _in;
 
-static method isPrime([@vm.inferred-type.metadata=int?] dynamic n) → core::bool {
-  if(_in::unsafeCast<core::bool>([@vm.direct-call.metadata=dart.core::_IntegerImplementation::<??] [@vm.inferred-type.metadata=dart.core::bool] n.<(2)))
+static method isPrime([@vm.inferred-type.metadata=int] dynamic n) → core::bool {
+  if(_in::unsafeCast<core::bool>([@vm.direct-call.metadata=dart.core::_IntegerImplementation::<] [@vm.inferred-type.metadata=dart.core::bool] n.<(2)))
     return false;
-  for (core::int i = 2; [@vm.direct-call.metadata=dart.core::_IntegerImplementation::<=??] [@vm.inferred-type.metadata=dart.core::bool (skip check)] [@vm.direct-call.metadata=dart.core::_IntegerImplementation::*??] [@vm.inferred-type.metadata=int? (skip check)] i.{core::num::*}(i).{core::num::<=}(_in::unsafeCast<core::num>(n)); i = [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+??] [@vm.inferred-type.metadata=int? (skip check)] i.{core::num::+}(1)) {
-    if([@vm.inferred-type.metadata=dart.core::bool] [@vm.direct-call.metadata=dart.core::_IntegerImplementation::%??] [@vm.inferred-type.metadata=int?] n.%(i).{core::Object::==}(0))
+  for (core::int i = 2; [@vm.direct-call.metadata=dart.core::_IntegerImplementation::<=] [@vm.inferred-type.metadata=dart.core::bool (skip check)] [@vm.direct-call.metadata=dart.core::_IntegerImplementation::*] [@vm.inferred-type.metadata=int (skip check)] i.{core::num::*}(i).{core::num::<=}(_in::unsafeCast<core::num>(n)); i = [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+??] [@vm.inferred-type.metadata=int (skip check)] i.{core::num::+}(1)) {
+    if([@vm.direct-call.metadata=dart.core::_IntegerImplementation::==] [@vm.inferred-type.metadata=dart.core::bool (skip check)] [@vm.direct-call.metadata=dart.core::_IntegerImplementation::%] [@vm.inferred-type.metadata=int] n.%(i).{core::Object::==}(0))
       return false;
   }
   return true;
 }
 static method nThPrimeNumber([@vm.inferred-type.metadata=dart.core::_Smi] core::int n) → core::int {
   core::int counter = 0;
-  for (core::int i = 1; ; i = [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+??] [@vm.inferred-type.metadata=int? (skip check)] i.{core::num::+}(1)) {
+  for (core::int i = 1; ; i = [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+??] [@vm.inferred-type.metadata=int (skip check)] i.{core::num::+}(1)) {
     if([@vm.inferred-type.metadata=dart.core::bool] self::isPrime(i))
-      counter = [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+??] [@vm.inferred-type.metadata=int? (skip check)] counter.{core::num::+}(1);
-    if([@vm.inferred-type.metadata=dart.core::bool] counter.{core::num::==}(n)) {
+      counter = [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+??] [@vm.inferred-type.metadata=int (skip check)] counter.{core::num::+}(1);
+    if([@vm.direct-call.metadata=dart.core::_IntegerImplementation::==] [@vm.inferred-type.metadata=dart.core::bool (skip check)] counter.{core::num::==}(n)) {
       return i;
     }
   }
@@ -31,7 +31,7 @@
 }
 static method main(core::List<core::String> args) → dynamic {
   core::Stopwatch timer = let final core::Stopwatch #t1 = new core::Stopwatch::•() in let final dynamic #t2 = [@vm.direct-call.metadata=dart.core::Stopwatch::start] [@vm.inferred-type.metadata=!? (skip check)] #t1.{core::Stopwatch::start}() in #t1;
-  for (core::int i = 0; [@vm.direct-call.metadata=dart.core::_IntegerImplementation::<??] [@vm.inferred-type.metadata=dart.core::bool (skip check)] i.{core::num::<}(100); i = [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+??] [@vm.inferred-type.metadata=int? (skip check)] i.{core::num::+}(1)) {
+  for (core::int i = 0; [@vm.direct-call.metadata=dart.core::_IntegerImplementation::<] [@vm.inferred-type.metadata=dart.core::bool (skip check)] i.{core::num::<}(100); i = [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+??] [@vm.inferred-type.metadata=int (skip check)] i.{core::num::+}(1)) {
     self::run();
   }
   [@vm.direct-call.metadata=dart.core::Stopwatch::stop] [@vm.inferred-type.metadata=!? (skip check)] timer.{core::Stopwatch::stop}();
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/bench_vector.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/bench_vector.dart.expect
index fb2975e..7fa4e1f 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/bench_vector.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/bench_vector.dart.expect
@@ -12,14 +12,14 @@
   constructor •([@vm.inferred-type.metadata=dart.core::_Smi] core::int size) → self::_Vector
     : self::_Vector::_offset = 0, self::_Vector::_length = size, self::_Vector::_elements = [@vm.inferred-type.metadata=dart.typed_data::_Float64List] typ::Float64List::•(size), super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=hasTearOffUses:false]  operator [](core::int i) → core::double
-    return [@vm.direct-call.metadata=dart.typed_data::_Float64List::[]] [@vm.inferred-type.metadata=dart.core::_Double (skip check)] [@vm.direct-call.metadata=#lib::_Vector::_elements] [@vm.inferred-type.metadata=dart.typed_data::_Float64List] this.{self::_Vector::_elements}.{core::List::[]}([@vm.direct-call.metadata=dart.core::_IntegerImplementation::+??] [@vm.inferred-type.metadata=int? (skip check)] i.{core::num::+}([@vm.direct-call.metadata=#lib::_Vector::_offset] [@vm.inferred-type.metadata=dart.core::_Smi] this.{self::_Vector::_offset}));
+[@vm.procedure-attributes.metadata=hasTearOffUses:false]  operator []([@vm.inferred-type.metadata=!] core::int i) → core::double
+    return [@vm.direct-call.metadata=dart.typed_data::_Float64List::[]] [@vm.inferred-type.metadata=dart.core::_Double (skip check)] [@vm.direct-call.metadata=#lib::_Vector::_elements] [@vm.inferred-type.metadata=dart.typed_data::_Float64List] this.{self::_Vector::_elements}.{core::List::[]}([@vm.direct-call.metadata=dart.core::_IntegerImplementation::+] [@vm.inferred-type.metadata=int (skip check)] i.{core::num::+}([@vm.direct-call.metadata=#lib::_Vector::_offset] [@vm.inferred-type.metadata=dart.core::_Smi] this.{self::_Vector::_offset}));
 [@vm.procedure-attributes.metadata=hasThisUses:false,hasTearOffUses:false]  operator []=([@vm.inferred-type.metadata=dart.core::_OneByteString] core::int i, core::double value) → void {
     let dynamic #t1 = [@vm.direct-call.metadata=#lib::_Vector::_elements] [@vm.inferred-type.metadata=dart.typed_data::_Float64List] this.{self::_Vector::_elements} in let dynamic #t2 = i in let dynamic #t3 = [@vm.direct-call.metadata=#lib::_Vector::_offset] [@vm.inferred-type.metadata=dart.core::_Smi] this.{self::_Vector::_offset} in throw "Attempt to execute code removed by Dart AOT compiler (TFA)";
   }
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasTearOffUses:false]  operator *([@vm.inferred-type.metadata=#lib::_Vector?] self::_Vector a) → core::double {
     core::double result = 0.0;
-    for (core::int i = 0; [@vm.direct-call.metadata=dart.core::_IntegerImplementation::<??] [@vm.inferred-type.metadata=dart.core::bool (skip check)] i.{core::num::<}([@vm.direct-call.metadata=#lib::_Vector::_length] [@vm.inferred-type.metadata=dart.core::_Smi] this.{self::_Vector::_length}); i = [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+??] [@vm.inferred-type.metadata=int? (skip check)] i.{core::num::+}(1))
+    for (core::int i = 0; [@vm.direct-call.metadata=dart.core::_IntegerImplementation::<] [@vm.inferred-type.metadata=dart.core::bool (skip check)] i.{core::num::<}([@vm.direct-call.metadata=#lib::_Vector::_length] [@vm.inferred-type.metadata=dart.core::_Smi] this.{self::_Vector::_length}); i = [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+??] [@vm.inferred-type.metadata=int (skip check)] i.{core::num::+}(1))
       result = [@vm.direct-call.metadata=dart.core::_Double::+??] [@vm.inferred-type.metadata=dart.core::_Double (skip check)] result.{core::double::+}([@vm.direct-call.metadata=dart.core::_Double::*] [@vm.inferred-type.metadata=dart.core::_Double (skip check)] [@vm.direct-call.metadata=#lib::_Vector::[]] [@vm.inferred-type.metadata=dart.core::_Double (skip check)] this.{self::_Vector::[]}(i).{core::double::*}([@vm.direct-call.metadata=#lib::_Vector::[]??] [@vm.inferred-type.metadata=dart.core::_Double (skip check)] a.{self::_Vector::[]}(i)));
     return result;
   }
@@ -28,7 +28,7 @@
 [@vm.inferred-type.metadata=dart.core::_Double?]static field core::double x = 0.0;
 static method main(core::List<core::String> args) → dynamic {
   core::Stopwatch timer = let final core::Stopwatch #t4 = new core::Stopwatch::•() in let final dynamic #t5 = [@vm.direct-call.metadata=dart.core::Stopwatch::start] [@vm.inferred-type.metadata=!? (skip check)] #t4.{core::Stopwatch::start}() in #t4;
-  for (core::int i = 0; [@vm.direct-call.metadata=dart.core::_IntegerImplementation::<??] [@vm.inferred-type.metadata=dart.core::bool (skip check)] i.{core::num::<}(100000000); i = [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+??] [@vm.inferred-type.metadata=int? (skip check)] i.{core::num::+}(1)) {
+  for (core::int i = 0; [@vm.direct-call.metadata=dart.core::_IntegerImplementation::<] [@vm.inferred-type.metadata=dart.core::bool (skip check)] i.{core::num::<}(100000000); i = [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+??] [@vm.inferred-type.metadata=int (skip check)] i.{core::num::+}(1)) {
     self::x = [@vm.direct-call.metadata=dart.core::_Double::+??] [@vm.inferred-type.metadata=dart.core::_Double (skip check)] [@vm.inferred-type.metadata=dart.core::_Double?] self::x.{core::double::+}([@vm.direct-call.metadata=#lib::_Vector::*??] [@vm.inferred-type.metadata=dart.core::_Double (skip check)] [@vm.inferred-type.metadata=#lib::_Vector?] self::v.{self::_Vector::*}([@vm.inferred-type.metadata=#lib::_Vector?] self::v));
   }
   [@vm.direct-call.metadata=dart.core::Stopwatch::stop] [@vm.inferred-type.metadata=!? (skip check)] timer.{core::Stopwatch::stop}();
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/devirt.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/devirt.dart.expect
index aee6417..d508c60 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/devirt.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/devirt.dart.expect
@@ -42,7 +42,7 @@
 static method callerA2([@vm.inferred-type.metadata=#lib::B] self::A aa) → void {
   [@vm.direct-call.metadata=#lib::B::foo] [@vm.inferred-type.metadata=!? (skip check)] aa.{self::A::foo}();
 }
-static method callerA3({[@vm.inferred-type.metadata=#lib::C] self::A aa = null}) → void {
+static method callerA3({[@vm.inferred-type.metadata=#lib::C] self::A aa = #C1}) → void {
   [@vm.direct-call.metadata=#lib::C::foo] [@vm.inferred-type.metadata=!? (skip check)] aa.{self::A::foo}();
 }
 static method callerA4([@vm.inferred-type.metadata=#lib::D?] self::A aa) → void {
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_cycle.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_cycle.dart.expect
index 999e779..1762eb3 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_cycle.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/invalidation_cycle.dart.expect
@@ -21,13 +21,13 @@
   synthetic constructor •() → self::Stream
     : super core::Object::•()
     ;
-  abstract method foobar((dynamic) → void onData, {core::Function onError = null}) → self::StreamSubscription;
+  abstract method foobar((dynamic) → void onData, {core::Function onError = #C1}) → self::StreamSubscription;
 }
 abstract class _StreamImpl extends self::Stream {
   synthetic constructor •() → self::_StreamImpl
     : super self::Stream::•()
     ;
-[@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasTearOffUses:false]  method foobar([@vm.inferred-type.metadata=dart.core::Null?] (dynamic) → void onData, {[@vm.inferred-type.metadata=dart.core::Null?] core::Function onError = null}) → self::StreamSubscription {
+[@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasTearOffUses:false]  method foobar([@vm.inferred-type.metadata=dart.core::Null?] (dynamic) → void onData, {[@vm.inferred-type.metadata=dart.core::Null?] core::Function onError = #C1}) → self::StreamSubscription {
     return [@vm.inferred-type.metadata=!] this.{self::_StreamImpl::_createSubscription}();
   }
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasNonThisUses:false,hasTearOffUses:false]  method _createSubscription() → self::StreamSubscription {
@@ -52,7 +52,7 @@
   constructor •([@vm.inferred-type.metadata=!] self::Stream stream) → self::StreamView
     : self::StreamView::_stream = stream, super self::Stream::•()
     ;
-[@vm.procedure-attributes.metadata=hasDynamicUses:false,hasTearOffUses:false]  method foobar([@vm.inferred-type.metadata=dart.core::Null?] (dynamic) → void onData, {[@vm.inferred-type.metadata=dart.core::Null?] core::Function onError = null}) → self::StreamSubscription {
+[@vm.procedure-attributes.metadata=hasDynamicUses:false,hasTearOffUses:false]  method foobar([@vm.inferred-type.metadata=dart.core::Null?] (dynamic) → void onData, {[@vm.inferred-type.metadata=dart.core::Null?] core::Function onError = #C1}) → self::StreamSubscription {
     return [@vm.direct-call.metadata=#lib::StreamView::_stream] [@vm.inferred-type.metadata=!] this.{self::StreamView::_stream}.{self::Stream::foobar}(onData, onError: onError);
   }
 }
@@ -66,7 +66,7 @@
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasTearOffUses:false]  method super_foobar2([@vm.inferred-type.metadata=dart.core::Null?] (dynamic) → void onData) → dynamic {
     super.{self::StreamView::foobar}(onData);
   }
-[@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasTearOffUses:false]  method super_foobar3({[@vm.inferred-type.metadata=dart.core::Null?] (dynamic) → void onData = null, [@vm.inferred-type.metadata=dart.core::Null?] core::Function onError = null}) → dynamic {
+[@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasTearOffUses:false]  method super_foobar3({[@vm.inferred-type.metadata=dart.core::Null?] (dynamic) → void onData = #C1, [@vm.inferred-type.metadata=dart.core::Null?] core::Function onError = #C1}) → dynamic {
     super.{self::StreamView::foobar}(onData, onError: onError);
   }
   get super_stream() → self::Stream
@@ -80,23 +80,23 @@
 static method round0() → void {
   new self::ByteStream::•(new self::ByteStream::•(new self::_GeneratedStreamImpl::•()));
 }
-static method round1({[@vm.inferred-type.metadata=dart.core::Null?] (dynamic) → void onData = null}) → void {
+static method round1({[@vm.inferred-type.metadata=dart.core::Null?] (dynamic) → void onData = #C1}) → void {
   self::ByteStream x = new self::ByteStream::•(new self::ByteStream::•(new self::_GeneratedStreamImpl::•()));
   [@vm.direct-call.metadata=#lib::ByteStream::super_foobar1] [@vm.inferred-type.metadata=!? (skip check)] x.{self::ByteStream::super_foobar1}(onData);
 }
-static method round2({[@vm.inferred-type.metadata=dart.core::Null?] (dynamic) → void onData = null, [@vm.inferred-type.metadata=dart.core::Null?] core::Function onError = null}) → void {
+static method round2({[@vm.inferred-type.metadata=dart.core::Null?] (dynamic) → void onData = #C1, [@vm.inferred-type.metadata=dart.core::Null?] core::Function onError = #C1}) → void {
   new self::_ControllerStream::•();
   self::Stream x = new self::_GeneratedStreamImpl::•();
   x = new self::ByteStream::•(x);
   x.{self::Stream::foobar}(onData, onError: onError);
 }
-static method round3({[@vm.inferred-type.metadata=dart.core::Null?] (dynamic) → void onData = null, [@vm.inferred-type.metadata=dart.core::Null?] core::Function onError = null}) → void {
+static method round3({[@vm.inferred-type.metadata=dart.core::Null?] (dynamic) → void onData = #C1, [@vm.inferred-type.metadata=dart.core::Null?] core::Function onError = #C1}) → void {
   self::Stream x = new self::_GeneratedStreamImpl::•();
   x = new self::ByteStream::•(x);
   x = new self::_ControllerStream::•();
   x.{self::Stream::foobar}(onData, onError: onError);
 }
-static method round4({[@vm.inferred-type.metadata=dart.core::Null?] (dynamic) → void onData = null}) → void {
+static method round4({[@vm.inferred-type.metadata=dart.core::Null?] (dynamic) → void onData = #C1}) → void {
   self::ByteStream x = new self::ByteStream::•(new self::_ControllerStream::•());
   self::Stream y = [@vm.direct-call.metadata=#lib::ByteStream::super_stream] [@vm.inferred-type.metadata=!] x.{self::ByteStream::super_stream};
   self::Stream z = [@vm.direct-call.metadata=#lib::StreamView::_stream] [@vm.inferred-type.metadata=!] x.{self::StreamView::_stream};
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/no_such_method.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/no_such_method.dart.expect
index 5c65020..1b22241 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/no_such_method.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/no_such_method.dart.expect
@@ -39,7 +39,7 @@
     ;
   abstract method foo() → dynamic;
   abstract get bar() → dynamic;
-  abstract method bazz(dynamic a1, dynamic a2, dynamic a3, [dynamic a4 = null, dynamic a5 = null]) → dynamic;
+  abstract method bazz(dynamic a1, dynamic a2, dynamic a3, [dynamic a4 = #C1, dynamic a5 = #C1]) → dynamic;
 }
 class B extends self::A {
   synthetic constructor •() → self::B
@@ -49,11 +49,11 @@
     return new self::T1::•();
   }
   no-such-method-forwarder get bar() → dynamic
-    return _in::unsafeCast<dynamic>([@vm.direct-call.metadata=#lib::B::noSuchMethod] [@vm.inferred-type.metadata=#lib::T1 (skip check)] this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#bar, 1, const <core::Type>[], const <dynamic>[], [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol, dynamic>] core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+    return _in::unsafeCast<dynamic>([@vm.direct-call.metadata=#lib::B::noSuchMethod] [@vm.inferred-type.metadata=#lib::T1 (skip check)] this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 1, #C3, #C4, [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol, dynamic>] core::Map::unmodifiable<core::Symbol, dynamic>(#C5))));
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasTearOffUses:false]  no-such-method-forwarder method foo() → dynamic
-    return _in::unsafeCast<dynamic>([@vm.direct-call.metadata=#lib::B::noSuchMethod] [@vm.inferred-type.metadata=#lib::T1 (skip check)] this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type>[], const <dynamic>[], [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol, dynamic>] core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
-[@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasTearOffUses:false]  no-such-method-forwarder method bazz([@vm.inferred-type.metadata=dart.core::_Smi] dynamic a1, [@vm.inferred-type.metadata=dart.core::_Smi] dynamic a2, [@vm.inferred-type.metadata=dart.core::_Smi] dynamic a3, [[@vm.inferred-type.metadata=dart.core::_Smi] dynamic a4 = null, [@vm.inferred-type.metadata=dart.core::Null?] dynamic a5 = null]) → dynamic
-    return _in::unsafeCast<dynamic>([@vm.direct-call.metadata=#lib::B::noSuchMethod] [@vm.inferred-type.metadata=#lib::T1 (skip check)] this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#bazz, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[a1, a2, a3, a4, a5]), [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol, dynamic>] core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+    return _in::unsafeCast<dynamic>([@vm.direct-call.metadata=#lib::B::noSuchMethod] [@vm.inferred-type.metadata=#lib::T1 (skip check)] this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#C6, 0, #C3, #C4, [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol, dynamic>] core::Map::unmodifiable<core::Symbol, dynamic>(#C5))));
+[@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasTearOffUses:false]  no-such-method-forwarder method bazz([@vm.inferred-type.metadata=dart.core::_Smi] dynamic a1, [@vm.inferred-type.metadata=dart.core::_Smi] dynamic a2, [@vm.inferred-type.metadata=dart.core::_Smi] dynamic a3, [[@vm.inferred-type.metadata=dart.core::_Smi] dynamic a4 = #C1, [@vm.inferred-type.metadata=dart.core::Null?] dynamic a5 = #C1]) → dynamic
+    return _in::unsafeCast<dynamic>([@vm.direct-call.metadata=#lib::B::noSuchMethod] [@vm.inferred-type.metadata=#lib::T1 (skip check)] this.{self::B::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[a1, a2, a3, a4, a5]), [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol, dynamic>] core::Map::unmodifiable<core::Symbol, dynamic>(#C5))));
 }
 abstract class C extends core::Object {
   synthetic constructor •() → self::C
@@ -68,11 +68,11 @@
     : super self::C::•()
     ;
   no-such-method-forwarder get bar() → dynamic
-    return _in::unsafeCast<dynamic>([@vm.direct-call.metadata=#lib::C::noSuchMethod] [@vm.inferred-type.metadata=#lib::T2 (skip check)] this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#bar, 1, const <core::Type>[], const <dynamic>[], [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol, dynamic>] core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+    return _in::unsafeCast<dynamic>([@vm.direct-call.metadata=#lib::C::noSuchMethod] [@vm.inferred-type.metadata=#lib::T2 (skip check)] this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 1, #C3, #C4, [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol, dynamic>] core::Map::unmodifiable<core::Symbol, dynamic>(#C5))));
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasTearOffUses:false]  no-such-method-forwarder method foo() → dynamic
-    return _in::unsafeCast<dynamic>([@vm.direct-call.metadata=#lib::C::noSuchMethod] [@vm.inferred-type.metadata=#lib::T2 (skip check)] this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#foo, 0, const <core::Type>[], const <dynamic>[], [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol, dynamic>] core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
-[@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasTearOffUses:false]  no-such-method-forwarder method bazz([@vm.inferred-type.metadata=dart.core::_Smi] dynamic a1, [@vm.inferred-type.metadata=dart.core::_Smi] dynamic a2, [@vm.inferred-type.metadata=dart.core::_Smi] dynamic a3, [[@vm.inferred-type.metadata=dart.core::_Smi] dynamic a4 = null, [@vm.inferred-type.metadata=dart.core::Null?] dynamic a5 = null]) → dynamic
-    return _in::unsafeCast<dynamic>([@vm.direct-call.metadata=#lib::C::noSuchMethod] [@vm.inferred-type.metadata=#lib::T2 (skip check)] this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#bazz, 0, const <core::Type>[], core::List::unmodifiable<dynamic>(<dynamic>[a1, a2, a3, a4, a5]), [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol, dynamic>] core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+    return _in::unsafeCast<dynamic>([@vm.direct-call.metadata=#lib::C::noSuchMethod] [@vm.inferred-type.metadata=#lib::T2 (skip check)] this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#C6, 0, #C3, #C4, [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol, dynamic>] core::Map::unmodifiable<core::Symbol, dynamic>(#C5))));
+[@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasTearOffUses:false]  no-such-method-forwarder method bazz([@vm.inferred-type.metadata=dart.core::_Smi] dynamic a1, [@vm.inferred-type.metadata=dart.core::_Smi] dynamic a2, [@vm.inferred-type.metadata=dart.core::_Smi] dynamic a3, [[@vm.inferred-type.metadata=dart.core::_Smi] dynamic a4 = #C1, [@vm.inferred-type.metadata=dart.core::Null?] dynamic a5 = #C1]) → dynamic
+    return _in::unsafeCast<dynamic>([@vm.direct-call.metadata=#lib::C::noSuchMethod] [@vm.inferred-type.metadata=#lib::T2 (skip check)] this.{self::C::noSuchMethod}(new core::_InvocationMirror::_withType(#C7, 0, #C3, core::List::unmodifiable<dynamic>(<dynamic>[a1, a2, a3, a4, a5]), [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol, dynamic>] core::Map::unmodifiable<core::Symbol, dynamic>(#C5))));
 }
 class E extends core::Object implements self::A {
   synthetic constructor •() → self::E
@@ -82,7 +82,7 @@
     return new self::T4::•();
   }
   no-such-method-forwarder get bar() → dynamic
-    return _in::unsafeCast<dynamic>([@vm.direct-call.metadata=#lib::E::noSuchMethod] [@vm.inferred-type.metadata=#lib::T4 (skip check)] this.{self::E::noSuchMethod}(new core::_InvocationMirror::_withType(#bar, 1, const <core::Type>[], const <dynamic>[], [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol, dynamic>] core::Map::unmodifiable<core::Symbol, dynamic>(const <core::Symbol, dynamic>{}))));
+    return _in::unsafeCast<dynamic>([@vm.direct-call.metadata=#lib::E::noSuchMethod] [@vm.inferred-type.metadata=#lib::T4 (skip check)] this.{self::E::noSuchMethod}(new core::_InvocationMirror::_withType(#C2, 1, #C3, #C4, [@vm.inferred-type.metadata=dart.collection::UnmodifiableMapView<dart.core::Symbol, dynamic>] core::Map::unmodifiable<core::Symbol, dynamic>(#C5))));
 }
 class F extends core::Object {
   synthetic constructor •() → self::F
@@ -104,7 +104,7 @@
   synthetic constructor •() → self::H
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=hasThisUses:false,hasTearOffUses:false]  method foo({[@vm.inferred-type.metadata=dart.core::_Smi] dynamic left = null, [@vm.inferred-type.metadata=dart.core::_Smi] dynamic right = null}) → dynamic
+[@vm.procedure-attributes.metadata=hasThisUses:false,hasTearOffUses:false]  method foo({[@vm.inferred-type.metadata=dart.core::_Smi] dynamic left = #C1, [@vm.inferred-type.metadata=dart.core::_Smi] dynamic right = #C1}) → dynamic
     return new self::T6::•();
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasTearOffUses:false]  method noSuchMethod(core::Invocation invocation) → dynamic {
     return new self::T7::•();
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/param_types_before_strong_mode_checks.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/param_types_before_strong_mode_checks.dart.expect
index 472fbbd..7f64259 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/param_types_before_strong_mode_checks.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/param_types_before_strong_mode_checks.dart.expect
@@ -54,7 +54,7 @@
   return [@vm.call-site-attributes.metadata=receiverType:dart.core::Function] self::unknown.call(x);
 static method main(core::List<core::String> args) → dynamic {
   self::func1(self::getDynamic() as{TypeError} self::T0);
-  self::use(self::func2);
+  self::use(#C1);
   self::use(new self::A::•().{self::A::method1});
   self::B bb = self::getDynamic() as{TypeError} self::B;
   [@vm.direct-call.metadata=#lib::C::method2??] [@vm.inferred-type.metadata=!? (skip check)] bb.{self::B::method2}(self::getDynamic());
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/regress_flutter16182.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/regress_flutter16182.dart.expect
index 0630a2a..36dbf0d 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/regress_flutter16182.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/regress_flutter16182.dart.expect
@@ -19,7 +19,7 @@
   synthetic constructor •() → self::A1
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=hasThisUses:false,hasTearOffUses:false]  method call([dynamic a1 = null, dynamic a2 = null, dynamic a3 = null, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a4 = null, [@vm.inferred-type.metadata=#lib::T1?] dynamic a5 = null]) → void {
+[@vm.procedure-attributes.metadata=hasThisUses:false,hasTearOffUses:false]  method call([dynamic a1 = #C1, dynamic a2 = #C1, dynamic a3 = #C1, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a4 = #C1, [@vm.inferred-type.metadata=#lib::T1?] dynamic a5 = #C1]) → void {
     [@vm.direct-call.metadata=#lib::A1::foo] this.{self::A1::foo} = _in::unsafeCast<self::T1>(a5);
   }
 }
@@ -42,7 +42,7 @@
   synthetic constructor •() → self::A2
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=hasThisUses:false,hasTearOffUses:false]  method call([dynamic a1 = null, dynamic a2 = null, dynamic a3 = null, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a4 = null, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a5 = null, [@vm.inferred-type.metadata=#lib::T2?] dynamic a6 = null]) → void {
+[@vm.procedure-attributes.metadata=hasThisUses:false,hasTearOffUses:false]  method call([dynamic a1 = #C1, dynamic a2 = #C1, dynamic a3 = #C1, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a4 = #C1, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a5 = #C1, [@vm.inferred-type.metadata=#lib::T2?] dynamic a6 = #C1]) → void {
     [@vm.direct-call.metadata=#lib::A2::foo] this.{self::A2::foo} = a6;
   }
 }
@@ -75,7 +75,7 @@
   synthetic constructor •() → self::A3
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=hasThisUses:false,hasTearOffUses:false]  method call([dynamic a1 = null, dynamic a2 = null, dynamic a3 = null, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a4 = null, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a5 = null, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a6 = null, [@vm.inferred-type.metadata=#lib::T3?] dynamic a7 = null]) → void {
+[@vm.procedure-attributes.metadata=hasThisUses:false,hasTearOffUses:false]  method call([dynamic a1 = #C1, dynamic a2 = #C1, dynamic a3 = #C1, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a4 = #C1, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a5 = #C1, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a6 = #C1, [@vm.inferred-type.metadata=#lib::T3?] dynamic a7 = #C1]) → void {
     [@vm.direct-call.metadata=#lib::A3::foo] this.{self::A3::foo} = a7;
   }
 }
@@ -98,7 +98,7 @@
   synthetic constructor •() → self::A4
     : super core::Object::•()
     ;
-[@vm.procedure-attributes.metadata=hasThisUses:false,hasTearOffUses:false]  method call([dynamic a1 = null, dynamic a2 = null, dynamic a3 = null, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a4 = null, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a5 = null, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a6 = null, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a7 = null, [@vm.inferred-type.metadata=#lib::T4?] dynamic a8 = null]) → void {
+[@vm.procedure-attributes.metadata=hasThisUses:false,hasTearOffUses:false]  method call([dynamic a1 = #C1, dynamic a2 = #C1, dynamic a3 = #C1, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a4 = #C1, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a5 = #C1, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a6 = #C1, [@vm.inferred-type.metadata=dart.core::_Smi?] dynamic a7 = #C1, [@vm.inferred-type.metadata=#lib::T4?] dynamic a8 = #C1]) → void {
     [@vm.direct-call.metadata=#lib::A4::foo] this.{self::A4::foo} = a8;
   }
 }
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_dynamic_method.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_dynamic_method.dart.expect
index 2c96882..3c1beb0 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_dynamic_method.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_dynamic_method.dart.expect
@@ -12,7 +12,7 @@
     : super self::A::•()
     ;
 [@vm.procedure-attributes.metadata=hasThisUses:false]  method foo() → core::int
-    return [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+] [@vm.inferred-type.metadata=!? (skip check)] 1.{core::num::+}([@vm.direct-call.metadata=#lib::B::foo] [@vm.inferred-type.metadata=#lib::B] self::knownResult().foo() as{TypeError} core::num) as{TypeError} core::int;
+    return [@vm.direct-call.metadata=dart.core::_IntegerImplementation::+] [@vm.inferred-type.metadata=! (skip check)] 1.{core::num::+}([@vm.direct-call.metadata=#lib::B::foo] [@vm.inferred-type.metadata=#lib::B] self::knownResult().foo() as{TypeError} core::num) as{TypeError} core::int;
 }
 class TearOffDynamicMethod extends core::Object {
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasNonThisUses:false,hasTearOffUses:false]  field dynamic bazz;
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_interface_method.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_interface_method.dart.expect
index 66af620..ccb925f 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_interface_method.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_interface_method.dart.expect
@@ -14,7 +14,7 @@
     : super self::A::•()
     ;
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasNonThisUses:false]  method foo() → core::int
-    return _in::unsafeCast<core::int>([@vm.direct-call.metadata=dart.core::_IntegerImplementation::+] [@vm.inferred-type.metadata=int? (skip check)] 1.{core::num::+}(_in::unsafeCast<core::num>([@vm.direct-call.metadata=#lib::B::bar] [@vm.inferred-type.metadata=dart.core::_Smi] [@vm.inferred-type.metadata=#lib::B] self::knownResult().bar())));
+    return _in::unsafeCast<core::int>([@vm.direct-call.metadata=dart.core::_IntegerImplementation::+] [@vm.inferred-type.metadata=int (skip check)] 1.{core::num::+}(_in::unsafeCast<core::num>([@vm.direct-call.metadata=#lib::B::bar] [@vm.inferred-type.metadata=dart.core::_Smi] [@vm.inferred-type.metadata=#lib::B] self::knownResult().bar())));
 [@vm.procedure-attributes.metadata=hasThisUses:false,hasTearOffUses:false]  method bar() → core::int
     return 3;
 }
diff --git a/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_super_method.dart.expect b/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_super_method.dart.expect
index 950a81d..b147844 100644
--- a/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_super_method.dart.expect
+++ b/pkg/vm/testcases/transformations/type_flow/transformer/tear_off_super_method.dart.expect
@@ -14,14 +14,14 @@
     : super self::A::•()
     ;
 [@vm.procedure-attributes.metadata=hasThisUses:false,hasTearOffUses:false]  method foo() → core::int
-    return _in::unsafeCast<core::int>([@vm.direct-call.metadata=dart.core::_IntegerImplementation::+] [@vm.inferred-type.metadata=int? (skip check)] 1.{core::num::+}(_in::unsafeCast<core::num>([@vm.direct-call.metadata=#lib::B::foo] [@vm.inferred-type.metadata=int?] [@vm.inferred-type.metadata=#lib::B] self::knownResult().foo())));
+    return _in::unsafeCast<core::int>([@vm.direct-call.metadata=dart.core::_IntegerImplementation::+] [@vm.inferred-type.metadata=int (skip check)] 1.{core::num::+}(_in::unsafeCast<core::num>([@vm.direct-call.metadata=#lib::B::foo] [@vm.inferred-type.metadata=int?] [@vm.inferred-type.metadata=#lib::B] self::knownResult().foo())));
 }
 abstract class Base extends core::Object {
   synthetic constructor •() → self::Base
     : super core::Object::•()
     ;
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasThisUses:false,hasNonThisUses:false]  method foo() → core::int
-    return _in::unsafeCast<core::int>([@vm.direct-call.metadata=dart.core::_IntegerImplementation::+] [@vm.inferred-type.metadata=int? (skip check)] 3.{core::num::+}(_in::unsafeCast<core::num>([@vm.direct-call.metadata=#lib::B::foo] [@vm.inferred-type.metadata=int?] [@vm.inferred-type.metadata=#lib::B] self::knownResult().foo())));
+    return _in::unsafeCast<core::int>([@vm.direct-call.metadata=dart.core::_IntegerImplementation::+] [@vm.inferred-type.metadata=int (skip check)] 3.{core::num::+}(_in::unsafeCast<core::num>([@vm.direct-call.metadata=#lib::B::foo] [@vm.inferred-type.metadata=int?] [@vm.inferred-type.metadata=#lib::B] self::knownResult().foo())));
 [@vm.procedure-attributes.metadata=hasDynamicUses:false,hasNonThisUses:false,hasTearOffUses:false]  method doCall(dynamic x) → core::int
     return [@vm.call-site-attributes.metadata=receiverType:dynamic] x.call() as{TypeError} core::int;
 }
diff --git a/pkg/vm/tool/gen_kernel b/pkg/vm/tool/gen_kernel
index d0494c7..8174ed5 100755
--- a/pkg/vm/tool/gen_kernel
+++ b/pkg/vm/tool/gen_kernel
@@ -8,6 +8,25 @@
 
 set -e
 
+ABI_VERSION=""
+HAS_PLATFORM=""
+ARGV=()
+
+for arg in "$@"; do
+  case $arg in
+    --use-abi-version=*)
+    ABI_VERSION="$(echo "$arg" | sed "s|--use-abi-version=||")"
+    ;;
+    --platform*)
+    HAS_PLATFORM="TRUE"
+    ARGV+=("$arg")
+    ;;
+    *)
+    ARGV+=("$arg")
+    ;;
+  esac
+done
+
 function follow_links() {
   file="$1"
   while [ -h "$file" ]; do
@@ -35,4 +54,18 @@
   OUT_DIR="$SDK_DIR/out"
 fi
 
-exec "$DART" $DART_VM_FLAGS "${SDK_DIR}/pkg/vm/bin/gen_kernel.dart" $@
+export DART_CONFIGURATION=${DART_CONFIGURATION:-ReleaseX64}
+BIN_DIR="$OUT_DIR/$DART_CONFIGURATION"
+
+if [ $ABI_VERSION ]; then
+  ABI_DIR="$BIN_DIR/dart-sdk/lib/_internal/abiversions/$ABI_VERSION"
+  PLATFORM=()
+  if [ -z $HAS_PLATFORM ]; then
+    PLATFORM+=("--platform" "$ABI_DIR/vm_platform_strong.dill")
+  fi
+  exec "$BIN_DIR/dart" $DART_VM_FLAGS --enable-interpreter \
+    "$ABI_DIR/gen_kernel_bytecode.dill" "${PLATFORM[@]}" "${ARGV[@]}"
+else
+  exec "$DART" $DART_VM_FLAGS \
+    "${SDK_DIR}/pkg/vm/bin/gen_kernel.dart" "${ARGV[@]}"
+fi
diff --git a/runtime/BUILD.gn b/runtime/BUILD.gn
index 0e3e2e2..9ef4444 100644
--- a/runtime/BUILD.gn
+++ b/runtime/BUILD.gn
@@ -143,12 +143,7 @@
   }
 
   if (is_fuchsia) {
-    import("//build/config/scudo/scudo.gni")
     include_dirs += [ "//zircon/system/ulib/zx/include" ]
-    if (!use_scudo) {
-      defines += [ "DART_USE_JEMALLOC" ]
-      include_dirs += [ "//zircon/third_party/ulib/jemalloc/include" ]
-    }
   }
 
   if (!is_win) {
@@ -157,6 +152,7 @@
       "-Wall",
       "-Wextra",  # Also known as -W.
       "-Wno-unused-parameter",
+      "-Wno-unused-private-field",
       "-Wnon-virtual-dtor",
       "-Wvla",
       "-Wno-conversion-null",
@@ -166,6 +162,7 @@
       "-ggdb3",
       "-fno-rtti",
       "-fno-exceptions",
+      "-Wimplicit-fallthrough",
     ]
 
     ldflags = []
@@ -220,6 +217,12 @@
     "third_party/double-conversion/src:libdouble_conversion",
     ":generate_version_cc_file",
   ]
+  if (is_fuchsia) {
+    extra_deps += [
+      "//zircon/public/lib/fbl",
+      "//zircon/public/lib/trace-engine",
+    ]
+  }
   configurable_deps = [
     "platform:libdart_platform",
     "vm:libdart_lib",
diff --git a/runtime/bin/BUILD.gn b/runtime/bin/BUILD.gn
index 41a4b0a..a13c951 100644
--- a/runtime/bin/BUILD.gn
+++ b/runtime/bin/BUILD.gn
@@ -136,7 +136,9 @@
     if (is_fuchsia) {
       configs -= [ "//build/config:symbol_visibility_hidden" ]
     }
-    deps = extra_deps
+    deps = [ ":generate_abi_version_cc_file" ] + extra_deps
+
+    defines = [ "EXCLUDE_CFE_AND_KERNEL_PLATFORM" ]
 
     sources = [
       "address_sanitizer.cc",
@@ -152,6 +154,7 @@
       "snapshot_utils.h",
 
       # Very limited native resolver provided.
+      "$target_gen_dir/abi_version.cc",
       "builtin_common.cc",
       "builtin_gen_snapshot.cc",
       "dfe.cc",
@@ -179,6 +182,13 @@
       ]
     }
 
+    if (!is_win) {
+      # Adds all symbols to the dynamic symbol table, not just used ones.
+      # This is needed to make native extensions work. It is also needed to get
+      # symbols in VM-generated backtraces and profiles.
+      ldflags = [ "-rdynamic" ]
+    }
+
     if (is_win) {
       libs = [
         "iphlpapi.lib",
@@ -434,7 +444,7 @@
 
 gen_snapshot_action("generate_snapshot_bin") {
   deps = [
-    "../vm:vm_platform",
+    "../vm:vm_platform_stripped",
   ]
   vm_snapshot_data = "$target_gen_dir/vm_snapshot_data.bin"
   vm_snapshot_instructions = "$target_gen_dir/vm_snapshot_instructions.bin"
@@ -442,7 +452,7 @@
   isolate_snapshot_instructions =
       "$target_gen_dir/isolate_snapshot_instructions.bin"
 
-  platform_dill = "$root_out_dir/vm_platform_strong.dill"
+  platform_dill = "$root_out_dir/vm_platform_strong_stripped.dill"
   inputs = [
     platform_dill,
   ]
@@ -640,13 +650,36 @@
 source_set("dart_kernel_platform_cc") {
   visibility = [ ":*" ]
   deps = [
+    ":gen_kernel_bytecode_dill",
     ":kernel_service_dill_linkable",
     ":platform_strong_dill_linkable",
+    "../../utils/kernel-service:kernel_service_bytecode_dill",
   ]
   sources = get_target_outputs(":kernel_service_dill_linkable") +
             get_target_outputs(":platform_strong_dill_linkable")
 }
 
+action("generate_abi_version_cc_file") {
+  inputs = [
+    "../../tools/utils.py",
+    "../../tools/VERSION",
+    "abi_version_in.cc",
+  ]
+  output = "$target_gen_dir/abi_version.cc"
+  outputs = [
+    output,
+  ]
+
+  script = "../../tools/make_version.py"
+  args = [
+    "--quiet",
+    "--output",
+    rebase_path(output, root_build_dir),
+    "--input",
+    rebase_path("abi_version_in.cc", root_build_dir),
+  ]
+}
+
 template("dart_executable") {
   extra_configs = []
   if (defined(invoker.extra_configs)) {
@@ -695,6 +728,7 @@
              "//third_party/boringssl",
              "//third_party/zlib",
              ":crashpad",
+             ":generate_abi_version_cc_file",
            ] + extra_deps
 
     defines = extra_defines
@@ -724,13 +758,15 @@
                 "snapshot_utils.h",
                 "vmservice_impl.cc",
                 "vmservice_impl.h",
+                "$target_gen_dir/abi_version.cc",
               ] + extra_sources
 
     if (is_win) {
       ldflags = [ "/EXPORT:Dart_True" ]
     } else {
       # Adds all symbols to the dynamic symbol table, not just used ones.
-      # This is needed to make native extensions work.
+      # This is needed to make native extensions work. It is also needed to get
+      # symbols in VM-generated backtraces and profiles.
       ldflags = [ "-rdynamic" ]
     }
 
@@ -812,45 +848,27 @@
   target_type = "static_library"
 }
 
+dart_executable("dartaotruntime") {
+  extra_configs = [ "..:dart_precompiled_runtime_config" ]
+  extra_deps = [ "..:libdart_precompiled_runtime" ]
+  extra_sources = [
+    "builtin.cc",
+    "snapshot_empty.cc",
+    "loader.cc",
+    "loader.h",
+    "gzip.cc",
+    "gzip.h",
+    "observatory_assets_empty.cc",
+  ]
+}
+
 executable("process_test") {
   sources = [
     "process_test.cc",
   ]
 }
 
-action("generate_snapshot_test_dat_file") {
-  snapshot_test_dat_file = "$root_gen_dir/snapshot_test.dat"
-  snapshot_test_in_dat_file = "../vm/snapshot_test_in.dat"
-  snapshot_test_dart_file = "../vm/snapshot_test.dart"
-  inputs = [
-    "../tools/create_string_literal.py",
-    snapshot_test_in_dat_file,
-    snapshot_test_dart_file,
-  ]
-
-  outputs = [
-    snapshot_test_dat_file,
-  ]
-
-  script = "../tools/create_string_literal.py"
-  args = [
-    "--output",
-    rebase_path(snapshot_test_dat_file),
-    "--input_cc",
-    rebase_path(snapshot_test_in_dat_file),
-    "--include",
-    "INTENTIONALLY_LEFT_BLANK",
-    "--var_name",
-    "INTENTIONALLY_LEFT_BLANK_TOO",
-    rebase_path(snapshot_test_dart_file),
-  ]
-}
-
 prebuilt_dart_action("gen_kernel_bytecode_dill") {
-  if (target_os == "fuchsia") {
-    testonly = true
-  }
-
   deps = [
     "../vm:vm_platform",
   ]
@@ -895,6 +913,10 @@
     "..:dart_os_config",
     "..:dart_maybe_product_config",
   ]
+
+  if (dart_target_arch != "ia32") {
+    configs += [ "..:dart_precompiler_config" ]
+  }
   if (is_fuchsia) {
     configs -= [ "//build/config:symbol_visibility_hidden" ]
   }
@@ -904,10 +926,10 @@
     ":dart_kernel_platform_cc",
     ":dart_snapshot_cc",
     ":gen_kernel_bytecode_dill",
-    ":generate_snapshot_test_dat_file",
+    ":generate_abi_version_cc_file",
     ":libdart_builtin",
     ":standalone_dart_io",
-    "..:libdart_jit",
+    "..:libdart_nosnapshot_with_precompiler",
     "//third_party/zlib",
   ]
   include_dirs = [
@@ -932,6 +954,7 @@
   heap_tests = rebase_path(heap_sources_tests, ".", "../vm/heap")
 
   sources = [
+              "$target_gen_dir/abi_version.cc",
               "builtin.cc",
               "dfe.cc",
               "dfe.h",
@@ -943,6 +966,9 @@
             ] + builtin_impl_tests + vm_tests + compiler_tests + heap_tests
 
   if (!is_win) {
+    # Adds all symbols to the dynamic symbol table, not just used ones.
+    # This is needed to make native extensions work. It is also needed to get
+    # symbols in VM-generated backtraces and profiles.
     ldflags = [ "-rdynamic" ]
   }
 
diff --git a/runtime/bin/abi_version.h b/runtime/bin/abi_version.h
new file mode 100644
index 0000000..acd0cdf
--- /dev/null
+++ b/runtime/bin/abi_version.h
@@ -0,0 +1,18 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#ifndef RUNTIME_BIN_ABI_VERSION_H_
+#define RUNTIME_BIN_ABI_VERSION_H_
+
+namespace dart {
+
+class AbiVersion {
+ public:
+  static int GetCurrent();
+  static int GetOldestSupported();
+};
+
+}  // namespace dart
+
+#endif  // RUNTIME_BIN_ABI_VERSION_H_
diff --git a/runtime/bin/abi_version_in.cc b/runtime/bin/abi_version_in.cc
new file mode 100644
index 0000000..ad737b2
--- /dev/null
+++ b/runtime/bin/abi_version_in.cc
@@ -0,0 +1,17 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#include "bin/abi_version.h"
+
+namespace dart {
+
+int AbiVersion::GetCurrent() {
+  return {{ABI_VERSION}};
+}
+
+int AbiVersion::GetOldestSupported() {
+  return {{OLDEST_SUPPORTED_ABI_VERSION}};
+}
+
+}  // namespace dart
diff --git a/runtime/bin/builtin.cc b/runtime/bin/builtin.cc
index a10ee81..a18ca56 100644
--- a/runtime/bin/builtin.cc
+++ b/runtime/bin/builtin.cc
@@ -39,8 +39,9 @@
     Dart_Handle library = Dart_LookupLibrary(url);
     ASSERT(!Dart_IsError(library));
     // Setup the native resolver for built in library functions.
-    DART_CHECK_VALID(
-        Dart_SetNativeResolver(library, NativeLookup, NativeSymbol));
+    Dart_Handle result =
+        Dart_SetNativeResolver(library, NativeLookup, NativeSymbol);
+    ASSERT(!Dart_IsError(result));
   }
 }
 
diff --git a/runtime/bin/builtin_gen_snapshot.cc b/runtime/bin/builtin_gen_snapshot.cc
index 070e140..d4828a6 100644
--- a/runtime/bin/builtin_gen_snapshot.cc
+++ b/runtime/bin/builtin_gen_snapshot.cc
@@ -30,7 +30,9 @@
                                           bool* auto_setup_scope) {
   const char* function_name = NULL;
   Dart_Handle result = Dart_StringToCString(name, &function_name);
-  DART_CHECK_VALID(result);
+  if (Dart_IsError(result)) {
+    Dart_PropagateError(result);
+  }
   ASSERT(function_name != NULL);
   ASSERT(auto_setup_scope != NULL);
   *auto_setup_scope = true;
diff --git a/runtime/bin/builtin_impl_sources.gni b/runtime/bin/builtin_impl_sources.gni
index d4c7489..f329f03 100644
--- a/runtime/bin/builtin_impl_sources.gni
+++ b/runtime/bin/builtin_impl_sources.gni
@@ -7,6 +7,7 @@
 # io_impl_sources.gypi.
 
 builtin_impl_sources = [
+  "abi_version.h",
   "crypto.cc",
   "crypto.h",
   "crypto_android.cc",
diff --git a/runtime/bin/builtin_natives.cc b/runtime/bin/builtin_natives.cc
index b91c95b..0c27be9 100644
--- a/runtime/bin/builtin_natives.cc
+++ b/runtime/bin/builtin_natives.cc
@@ -47,7 +47,9 @@
                                           bool* auto_setup_scope) {
   const char* function_name = NULL;
   Dart_Handle err = Dart_StringToCString(name, &function_name);
-  DART_CHECK_VALID(err);
+  if (Dart_IsError(err)) {
+    Dart_PropagateError(err);
+  }
   ASSERT(function_name != NULL);
   ASSERT(auto_setup_scope != NULL);
   *auto_setup_scope = true;
diff --git a/runtime/bin/common_patch.dart b/runtime/bin/common_patch.dart
index 8df0749..1bcd089 100644
--- a/runtime/bin/common_patch.dart
+++ b/runtime/bin/common_patch.dart
@@ -55,7 +55,7 @@
   static Uint8List getRandomBytes(int count) native "Crypto_GetRandomBytes";
 }
 
-@pragma("vm:entry-point")
+@pragma("vm:entry-point", "call")
 _setupHooks() {
   VMLibraryHooks.eventHandlerSendData = _EventHandler._sendData;
   VMLibraryHooks.timerMillisecondClock = _EventHandler._timerMillisecondClock;
diff --git a/runtime/bin/crypto_android.cc b/runtime/bin/crypto_android.cc
index 2b6147c..6af505f 100644
--- a/runtime/bin/crypto_android.cc
+++ b/runtime/bin/crypto_android.cc
@@ -28,13 +28,13 @@
         read(fd, buffer + bytes_read, count - bytes_read));
     if (res < 0) {
       int err = errno;
-      VOID_TEMP_FAILURE_RETRY_NO_SIGNAL_BLOCKER(close(fd));
+      close(fd);
       errno = err;
       return false;
     }
     bytes_read += res;
   } while (bytes_read < count);
-  VOID_TEMP_FAILURE_RETRY_NO_SIGNAL_BLOCKER(close(fd));
+  close(fd);
   return true;
 }
 
diff --git a/runtime/bin/crypto_linux.cc b/runtime/bin/crypto_linux.cc
index 0a9fcb1..9a14ee3 100644
--- a/runtime/bin/crypto_linux.cc
+++ b/runtime/bin/crypto_linux.cc
@@ -28,13 +28,13 @@
         read(fd, buffer + bytes_read, count - bytes_read));
     if (res < 0) {
       int err = errno;
-      VOID_TEMP_FAILURE_RETRY_NO_SIGNAL_BLOCKER(close(fd));
+      close(fd);
       errno = err;
       return false;
     }
     bytes_read += res;
   } while (bytes_read < count);
-  VOID_TEMP_FAILURE_RETRY_NO_SIGNAL_BLOCKER(close(fd));
+  close(fd);
   return true;
 }
 
diff --git a/runtime/bin/crypto_macos.cc b/runtime/bin/crypto_macos.cc
index c799d07..5d0690e 100644
--- a/runtime/bin/crypto_macos.cc
+++ b/runtime/bin/crypto_macos.cc
@@ -28,13 +28,13 @@
         read(fd, buffer + bytes_read, count - bytes_read));
     if (res < 0) {
       int err = errno;
-      VOID_TEMP_FAILURE_RETRY_NO_SIGNAL_BLOCKER(close(fd));
+      close(fd);
       errno = err;
       return false;
     }
     bytes_read += res;
   } while (bytes_read < count);
-  VOID_TEMP_FAILURE_RETRY_NO_SIGNAL_BLOCKER(close(fd));
+  close(fd);
   return true;
 }
 
diff --git a/runtime/bin/dart_embedder_api_impl.cc b/runtime/bin/dart_embedder_api_impl.cc
index ba47d33..492aab8 100644
--- a/runtime/bin/dart_embedder_api_impl.cc
+++ b/runtime/bin/dart_embedder_api_impl.cc
@@ -88,10 +88,9 @@
   Dart_EnterScope();
   // Load embedder specific bits and return.
   if (!bin::VmService::Setup(config.ip, config.port, config.dev_mode,
-                             /*trace_loading=*/false, config.deterministic)) {
+                             config.disable_auth_codes, /*trace_loading=*/false,
+                             config.deterministic)) {
     *error = strdup(bin::VmService::GetErrorMessage());
-    Dart_ExitScope();
-    Dart_ShutdownIsolate();
     return nullptr;
   }
 
diff --git a/runtime/bin/dartutils.cc b/runtime/bin/dartutils.cc
index 9252508..9211fc0 100644
--- a/runtime/bin/dartutils.cc
+++ b/runtime/bin/dartutils.cc
@@ -801,9 +801,9 @@
 Dart_CObject CObject::api_null_ = {Dart_CObject_kNull, {0}};
 Dart_CObject CObject::api_true_ = {Dart_CObject_kBool, {true}};
 Dart_CObject CObject::api_false_ = {Dart_CObject_kBool, {false}};
-CObject CObject::null_ = CObject(&api_null_);
-CObject CObject::true_ = CObject(&api_true_);
-CObject CObject::false_ = CObject(&api_false_);
+CObject CObject::null_(&api_null_);
+CObject CObject::true_(&api_true_);
+CObject CObject::false_(&api_false_);
 
 CObject* CObject::Null() {
   return &null_;
diff --git a/runtime/bin/dfe.cc b/runtime/bin/dfe.cc
index 40a605f..edf14c4 100644
--- a/runtime/bin/dfe.cc
+++ b/runtime/bin/dfe.cc
@@ -4,10 +4,14 @@
 
 #include "bin/dfe.h"
 
+#include <memory>
+
+#include "bin/abi_version.h"
 #include "bin/dartutils.h"
 #include "bin/directory.h"
 #include "bin/error_exit.h"
 #include "bin/file.h"
+#include "bin/main_options.h"
 #include "bin/platform.h"
 #include "bin/utils.h"
 #include "include/dart_tools_api.h"
@@ -35,18 +39,6 @@
 DFE dfe;
 #endif
 
-#if defined(DART_NO_SNAPSHOT) || defined(DART_PRECOMPILER)
-const uint8_t* kernel_service_dill = NULL;
-const intptr_t kernel_service_dill_size = 0;
-const uint8_t* platform_strong_dill = NULL;
-const intptr_t platform_strong_dill_size = 0;
-#else
-const uint8_t* kernel_service_dill = kKernelServiceDill;
-const intptr_t kernel_service_dill_size = kKernelServiceDillSize;
-const uint8_t* platform_strong_dill = kPlatformStrongDill;
-const intptr_t platform_strong_dill_size = kPlatformStrongDillSize;
-#endif
-
 const char kKernelServiceSnapshot[] = "kernel-service.dart.snapshot";
 const char kSnapshotsDirectory[] = "snapshots";
 
@@ -76,7 +68,25 @@
       use_incremental_compiler_(false),
       frontend_filename_(NULL),
       application_kernel_buffer_(NULL),
-      application_kernel_buffer_size_(0) {}
+      application_kernel_buffer_size_(0) {
+  // The run_vm_tests binary has the DART_PRECOMPILER set in order to allow unit
+  // tests to exercise JIT and AOT pipeline.
+  //
+  // Only on X64 do we have kernel-service.dart.snapshot available otherwise we
+  // need to fall back to the built-in one (if we have it).
+#if defined(EXCLUDE_CFE_AND_KERNEL_PLATFORM) || defined(DART_NO_SNAPSHOT) ||   \
+    (defined(DART_PRECOMPILER) && defined(TARGET_ARCH_X64))
+  kernel_service_dill_ = NULL;
+  kernel_service_dill_size_ = 0;
+  platform_strong_dill_ = NULL;
+  platform_strong_dill_size_ = 0;
+#else
+  kernel_service_dill_ = kKernelServiceDill;
+  kernel_service_dill_size_ = kKernelServiceDillSize;
+  platform_strong_dill_ = kPlatformStrongDill;
+  platform_strong_dill_size_ = kPlatformStrongDillSize;
+#endif
+}
 
 DFE::~DFE() {
   if (frontend_filename_ != NULL) {
@@ -90,53 +100,108 @@
 }
 
 void DFE::Init() {
-  if (platform_strong_dill == NULL) {
+  Init(Options::kAbiVersionUnset);
+}
+
+void DFE::Init(int target_abi_version) {
+  if (platform_strong_dill_ == NULL) {
     return;
   }
 
-  if (frontend_filename_ == NULL) {
-    // Look for the frontend snapshot next to the executable.
-    char* dir_prefix = GetDirectoryPrefixFromExeName();
-    // |dir_prefix| includes the last path seperator.
-    frontend_filename_ =
-        OS::SCreate(NULL, "%s%s", dir_prefix, kKernelServiceSnapshot);
-
-    if (!File::Exists(NULL, frontend_filename_)) {
-      // If the frontend snapshot is not found next to the executable,
-      // then look for it in the "snapshots" directory.
-      free(frontend_filename_);
-      // |dir_prefix| includes the last path seperator.
-      frontend_filename_ =
-          OS::SCreate(NULL, "%s%s%s%s", dir_prefix, kSnapshotsDirectory,
-                      File::PathSeparator(), kKernelServiceSnapshot);
-    }
-
-    free(dir_prefix);
-    if (!File::Exists(NULL, frontend_filename_)) {
-      free(frontend_filename_);
-      frontend_filename_ = NULL;
-    }
+  if (!InitKernelServiceAndPlatformDills(target_abi_version)) {
+    return;
   }
+
+  Dart_SetDartLibrarySourcesKernel(platform_strong_dill_,
+                                   platform_strong_dill_size_);
 }
 
-bool DFE::KernelServiceDillAvailable() {
-  return kernel_service_dill != NULL;
+bool DFE::InitKernelServiceAndPlatformDills(int target_abi_version) {
+  const char kAbiVersionsDir[] = "dart-sdk/lib/_internal/abiversions";
+  const char kKernelServiceDillFile[] = "kernel_service.dill";
+  const char kPlatformStrongDillFile[] = "vm_platform_strong.dill";
+
+  if (frontend_filename_ != NULL) {
+    return true;
+  }
+
+  // |dir_prefix| includes the last path seperator.
+  auto dir_prefix = std::unique_ptr<char, void (*)(void*)>(
+      GetDirectoryPrefixFromExeName(), free);
+
+  if (target_abi_version != Options::kAbiVersionUnset) {
+    kernel_service_dill_ = NULL;
+    kernel_service_dill_size_ = 0;
+    platform_strong_dill_ = NULL;
+    platform_strong_dill_size_ = 0;
+
+    // Look in the old abi version directory.
+    char* script_uri =
+        OS::SCreate(NULL, "%s%s/%d/%s", dir_prefix.get(), kAbiVersionsDir,
+                    target_abi_version, kPlatformStrongDillFile);
+    if (!TryReadKernelFile(script_uri,
+                           const_cast<uint8_t**>(&platform_strong_dill_),
+                           &platform_strong_dill_size_)) {
+      Log::PrintErr("Can't find old ABI dill file: %s\n", script_uri);
+      free(script_uri);
+      return false;
+    }
+    free(script_uri);
+    script_uri =
+        OS::SCreate(NULL, "%s%s/%d/%s", dir_prefix.get(), kAbiVersionsDir,
+                    target_abi_version, kKernelServiceDillFile);
+    if (!TryReadKernelFile(script_uri,
+                           const_cast<uint8_t**>(&kernel_service_dill_),
+                           &kernel_service_dill_size_)) {
+      Log::PrintErr("Can't find old ABI dill file: %s\n", script_uri);
+      free(script_uri);
+      return false;
+    } else {
+      frontend_filename_ = script_uri;
+      return true;
+    }
+  }
+
+  // Look for the frontend snapshot next to the executable.
+  frontend_filename_ =
+      OS::SCreate(NULL, "%s%s", dir_prefix.get(), kKernelServiceSnapshot);
+  if (File::Exists(NULL, frontend_filename_)) {
+    return true;
+  }
+  free(frontend_filename_);
+  frontend_filename_ = NULL;
+
+  // If the frontend snapshot is not found next to the executable, then look for
+  // it in the "snapshots" directory.
+  frontend_filename_ =
+      OS::SCreate(NULL, "%s%s%s%s", dir_prefix.get(), kSnapshotsDirectory,
+                  File::PathSeparator(), kKernelServiceSnapshot);
+  if (File::Exists(NULL, frontend_filename_)) {
+    return true;
+  }
+  free(frontend_filename_);
+  frontend_filename_ = NULL;
+  return true;
+}
+
+bool DFE::KernelServiceDillAvailable() const {
+  return kernel_service_dill_ != NULL;
 }
 
 void DFE::LoadKernelService(const uint8_t** kernel_service_buffer,
                             intptr_t* kernel_service_buffer_size) {
-  *kernel_service_buffer = kernel_service_dill;
-  *kernel_service_buffer_size = kernel_service_dill_size;
+  *kernel_service_buffer = kernel_service_dill_;
+  *kernel_service_buffer_size = kernel_service_dill_size_;
 }
 
 void DFE::LoadPlatform(const uint8_t** kernel_buffer,
                        intptr_t* kernel_buffer_size) {
-  *kernel_buffer = platform_strong_dill;
-  *kernel_buffer_size = platform_strong_dill_size;
+  *kernel_buffer = platform_strong_dill_;
+  *kernel_buffer_size = platform_strong_dill_size_;
 }
 
 bool DFE::CanUseDartFrontend() const {
-  return (platform_strong_dill != NULL) &&
+  return (platform_strong_dill_ != NULL) &&
          (KernelServiceDillAvailable() || (frontend_filename() != NULL));
 }
 
@@ -188,8 +253,8 @@
   const char* sanitized_uri = script_uri;
 #endif
 
-  return Dart_CompileToKernel(sanitized_uri, platform_strong_dill,
-                              platform_strong_dill_size, incremental,
+  return Dart_CompileToKernel(sanitized_uri, platform_strong_dill_,
+                              platform_strong_dill_size_, incremental,
                               package_config);
 }
 
diff --git a/runtime/bin/dfe.h b/runtime/bin/dfe.h
index af520658..932936f 100644
--- a/runtime/bin/dfe.h
+++ b/runtime/bin/dfe.h
@@ -21,6 +21,7 @@
   // Call Init before Dart_Initialize to prevent races between the
   // different isolates.
   void Init();
+  void Init(int target_abi_version);
 
   char* frontend_filename() const { return frontend_filename_; }
 
@@ -78,7 +79,7 @@
                   uint8_t** kernel_buffer,
                   intptr_t* kernel_buffer_size) const;
 
-  static bool KernelServiceDillAvailable();
+  bool KernelServiceDillAvailable() const;
 
   // Tries to read [script_uri] as a Kernel IR file.
   // Returns `true` if successful and sets [kernel_file] and [kernel_length]
@@ -104,11 +105,17 @@
   bool use_dfe_;
   bool use_incremental_compiler_;
   char* frontend_filename_;
+  const uint8_t* kernel_service_dill_;
+  intptr_t kernel_service_dill_size_;
+  const uint8_t* platform_strong_dill_;
+  intptr_t platform_strong_dill_size_;
 
   // Kernel binary specified on the cmd line.
   uint8_t* application_kernel_buffer_;
   intptr_t application_kernel_buffer_size_;
 
+  bool InitKernelServiceAndPlatformDills(int target_abi_version);
+
   DISALLOW_COPY_AND_ASSIGN(DFE);
 };
 
diff --git a/runtime/bin/directory_android.cc b/runtime/bin/directory_android.cc
index 9152f91..507aadb 100644
--- a/runtime/bin/directory_android.cc
+++ b/runtime/bin/directory_android.cc
@@ -142,8 +142,8 @@
         if (!listing->follow_links()) {
           return kListLink;
         }
-      // Else fall through to next case.
-      // Fall through.
+        // Else fall through to next case.
+        FALL_THROUGH;
       case DT_UNKNOWN: {
         // On some file systems the entry type is not determined by
         // readdir. For those and for links we use stat to determine
diff --git a/runtime/bin/directory_fuchsia.cc b/runtime/bin/directory_fuchsia.cc
index d1f89ea..0ddddd1 100644
--- a/runtime/bin/directory_fuchsia.cc
+++ b/runtime/bin/directory_fuchsia.cc
@@ -148,8 +148,8 @@
         if (!listing->follow_links()) {
           return kListLink;
         }
-      // Else fall through to next case.
-      // Fall through.
+        // Else fall through to next case.
+        FALL_THROUGH;
       case DT_UNKNOWN: {
         // On some file systems the entry type is not determined by
         // readdir. For those and for links we use stat to determine
diff --git a/runtime/bin/directory_linux.cc b/runtime/bin/directory_linux.cc
index ade373e..73a199a 100644
--- a/runtime/bin/directory_linux.cc
+++ b/runtime/bin/directory_linux.cc
@@ -142,8 +142,8 @@
         if (!listing->follow_links()) {
           return kListLink;
         }
-      // Else fall through to next case.
-      // Fall through.
+        // Else fall through to next case.
+        FALL_THROUGH;
       case DT_UNKNOWN: {
         // On some file systems the entry type is not determined by
         // readdir. For those and for links we use stat to determine
diff --git a/runtime/bin/directory_macos.cc b/runtime/bin/directory_macos.cc
index 3c2262f..e7bb3a5 100644
--- a/runtime/bin/directory_macos.cc
+++ b/runtime/bin/directory_macos.cc
@@ -131,8 +131,8 @@
         if (!listing->follow_links()) {
           return kListLink;
         }
-      // Else fall through to next case.
-      // Fall through.
+        // Else fall through to next case.
+        FALL_THROUGH;
       case DT_UNKNOWN: {
         // On some file systems the entry type is not determined by
         // readdir_r. For those and for links we use stat to determine
diff --git a/runtime/bin/directory_patch.dart b/runtime/bin/directory_patch.dart
index 8249bbd..7549f72 100644
--- a/runtime/bin/directory_patch.dart
+++ b/runtime/bin/directory_patch.dart
@@ -67,5 +67,5 @@
   return new Uri.directory(result);
 }
 
-@pragma("vm:entry-point")
+@pragma("vm:entry-point", "call")
 _getUriBaseClosure() => _uriBaseClosure;
diff --git a/runtime/bin/entrypoints_verification_test_extension.cc b/runtime/bin/entrypoints_verification_test_extension.cc
index e070996..1f4eab6 100644
--- a/runtime/bin/entrypoints_verification_test_extension.cc
+++ b/runtime/bin/entrypoints_verification_test_extension.cc
@@ -8,7 +8,15 @@
 #include "./include/dart_api.h"
 #include "./include/dart_native_api.h"
 
-#define CHECK(H) DART_CHECK_VALID(H)
+#define CHECK(H)                                                               \
+  do {                                                                         \
+    Dart_Handle __handle__ = H;                                                \
+    if (Dart_IsError(__handle__)) {                                            \
+      const char* message = Dart_GetError(__handle__);                         \
+      fprintf(stderr, "Check \"" #H "\" failed: %s", message);                 \
+      abort();                                                                 \
+    }                                                                          \
+  } while (false)
 
 #define ASSERT(E)                                                              \
   if (!(E)) {                                                                  \
@@ -16,25 +24,14 @@
     abort();                                                                   \
   }
 
-Dart_Handle GetCurrentLibrary() {
-  Dart_Handle libraries = Dart_GetLoadedLibraries();
-  CHECK(libraries);
-  intptr_t length = 0;
-  CHECK(Dart_ListLength(libraries, &length));
-  for (intptr_t i = 0; i < length; ++i) {
-    Dart_Handle library = Dart_ListGetAt(libraries, i);
-    CHECK(library);
-    Dart_Handle url = Dart_LibraryUrl(library);
-    CHECK(url);
-    const char* url_str;
-    CHECK(Dart_StringToCString(url, &url_str));
-    if (strstr(url_str, "entrypoints_verification_test")) {
-      return library;
-    }
+bool isDartPrecompiledRuntime = true;
+
+// Some invalid accesses are allowed in AOT since we don't retain @pragma
+// annotations. Therefore we skip the negative tests in AOT.
+#define FAIL(name, result)                                                     \
+  if (!isDartPrecompiledRuntime) {                                             \
+    Fail(name, result);                                                        \
   }
-  fprintf(stderr, "Could not find current library!");
-  abort();
-}
 
 void Fail(const char* name, Dart_Handle result) {
   ASSERT(Dart_IsApiError(result));
@@ -43,52 +40,67 @@
   ASSERT(strstr(error, "It is illegal to access"));
 }
 
-void FailClosurize(const char* name, Dart_Handle result) {
+#define FAIL_INVOKE_FIELD(name, result)                                        \
+  if (!isDartPrecompiledRuntime) {                                             \
+    FailInvokeField(name, result);                                             \
+  }
+
+void FailInvokeField(const char* name, Dart_Handle result) {
   ASSERT(Dart_IsApiError(result));
   const char* error = Dart_GetError(result);
   ASSERT(strstr(error, name));
-  ASSERT(strstr(error, "Entry-points do not allow closurizing methods"));
+  ASSERT(strstr(error, "Entry-points do not allow invoking fields"));
+}
+
+void FailClosurizeConstructor(const char* name, Dart_Handle result) {
+  ASSERT(Dart_IsUnhandledExceptionError(result));
+  const char* error = Dart_GetError(result);
+  ASSERT(strstr(error, name));
+  ASSERT(strstr(error, "No static getter"));
 }
 
 void TestFields(Dart_Handle target) {
-  Fail("fld0", Dart_GetField(target, Dart_NewStringFromCString("fld0")));
-  Fail("fld0",
+  FAIL("fld0", Dart_GetField(target, Dart_NewStringFromCString("fld0")));
+  FAIL("fld0",
        Dart_SetField(target, Dart_NewStringFromCString("fld0"), Dart_Null()));
 
-  Dart_Handle result =
-      Dart_Invoke(target, Dart_NewStringFromCString("fld0"), 0, nullptr);
-  FailClosurize("fld0", result);
+  FAIL_INVOKE_FIELD(
+      "fld0",
+      Dart_Invoke(target, Dart_NewStringFromCString("fld0"), 0, nullptr));
 
   CHECK(Dart_GetField(target, Dart_NewStringFromCString("fld1")));
   CHECK(Dart_SetField(target, Dart_NewStringFromCString("fld1"), Dart_Null()));
-  FailClosurize("fld1", Dart_Invoke(target, Dart_NewStringFromCString("fld1"),
-                                    0, nullptr));
+  FAIL_INVOKE_FIELD(
+      "fld1",
+      Dart_Invoke(target, Dart_NewStringFromCString("fld1"), 0, nullptr));
 
   CHECK(Dart_GetField(target, Dart_NewStringFromCString("fld2")));
-  Fail("fld2",
+  FAIL("fld2",
        Dart_SetField(target, Dart_NewStringFromCString("fld2"), Dart_Null()));
-  FailClosurize("fld2", Dart_Invoke(target, Dart_NewStringFromCString("fld2"),
-                                    0, nullptr));
+  FAIL_INVOKE_FIELD(
+      "fld2",
+      Dart_Invoke(target, Dart_NewStringFromCString("fld2"), 0, nullptr));
 
-  Fail("fld3", Dart_GetField(target, Dart_NewStringFromCString("fld3")));
+  FAIL("fld3", Dart_GetField(target, Dart_NewStringFromCString("fld3")));
   CHECK(Dart_SetField(target, Dart_NewStringFromCString("fld3"), Dart_Null()));
-  FailClosurize("fld3", Dart_Invoke(target, Dart_NewStringFromCString("fld3"),
-                                    0, nullptr));
+  FAIL_INVOKE_FIELD(
+      "fld3",
+      Dart_Invoke(target, Dart_NewStringFromCString("fld3"), 0, nullptr));
 }
 
 void RunTests(Dart_NativeArguments arguments) {
-  Dart_Handle lib = GetCurrentLibrary();
+  Dart_Handle lib = Dart_RootLibrary();
 
   //////// Test allocation and constructor invocation.
 
-  Fail("C", Dart_GetClass(lib, Dart_NewStringFromCString("C")));
+  FAIL("C", Dart_GetClass(lib, Dart_NewStringFromCString("C")));
 
   Dart_Handle D_class = Dart_GetClass(lib, Dart_NewStringFromCString("D"));
   CHECK(D_class);
 
   CHECK(Dart_Allocate(D_class));
 
-  Fail("D.", Dart_New(D_class, Dart_Null(), 0, nullptr));
+  FAIL("D.", Dart_New(D_class, Dart_Null(), 0, nullptr));
 
   CHECK(Dart_New(D_class, Dart_NewStringFromCString("defined"), 0, nullptr));
   Dart_Handle D =
@@ -97,32 +109,51 @@
 
   //////// Test actions against methods
 
-  Fail("fn0", Dart_Invoke(D, Dart_NewStringFromCString("fn0"), 0, nullptr));
+  FailClosurizeConstructor(
+      "defined", Dart_GetField(D_class, Dart_NewStringFromCString("defined")));
+  FailClosurizeConstructor(
+      "fact", Dart_GetField(D_class, Dart_NewStringFromCString("fact")));
+
+  FAIL("fn0", Dart_Invoke(D, Dart_NewStringFromCString("fn0"), 0, nullptr));
 
   CHECK(Dart_Invoke(D, Dart_NewStringFromCString("fn1"), 0, nullptr));
+  FAIL("fn1", Dart_Invoke(D, Dart_NewStringFromCString("fn1_get"), 0, nullptr));
+  CHECK(Dart_Invoke(D, Dart_NewStringFromCString("fn1_call"), 0, nullptr));
 
-  Fail("get_fn0", Dart_GetField(D, Dart_NewStringFromCString("fn0")));
+  FAIL("fn0", Dart_GetField(D, Dart_NewStringFromCString("fn0")));
 
-  Fail("get_fn1", Dart_GetField(D, Dart_NewStringFromCString("fn1")));
+  CHECK(Dart_GetField(D, Dart_NewStringFromCString("fn1")));
+  CHECK(Dart_GetField(D, Dart_NewStringFromCString("fn1_get")));
+  FAIL("fn1", Dart_GetField(D, Dart_NewStringFromCString("fn1_call")));
 
-  Fail("fn2",
+  FAIL("fn2",
        Dart_Invoke(D_class, Dart_NewStringFromCString("fn2"), 0, nullptr));
 
   CHECK(Dart_Invoke(D_class, Dart_NewStringFromCString("fn3"), 0, nullptr));
+  CHECK(
+      Dart_Invoke(D_class, Dart_NewStringFromCString("fn3_call"), 0, nullptr));
+  FAIL("fn3",
+       Dart_Invoke(D_class, Dart_NewStringFromCString("fn3_get"), 0, nullptr));
 
-  FailClosurize("fn2",
-                Dart_GetField(D_class, Dart_NewStringFromCString("fn2")));
+  FAIL("fn2", Dart_GetField(D_class, Dart_NewStringFromCString("fn2")));
 
-  FailClosurize("fn3",
-                Dart_GetField(D_class, Dart_NewStringFromCString("fn3")));
+  CHECK(Dart_GetField(D_class, Dart_NewStringFromCString("fn3")));
+  FAIL("fn3_call",
+       Dart_GetField(D_class, Dart_NewStringFromCString("fn3_call")));
+  CHECK(Dart_GetField(D_class, Dart_NewStringFromCString("fn3_get")));
 
-  Fail("fn0", Dart_Invoke(lib, Dart_NewStringFromCString("fn0"), 0, nullptr));
+  FAIL("fn0", Dart_Invoke(lib, Dart_NewStringFromCString("fn0"), 0, nullptr));
 
   CHECK(Dart_Invoke(lib, Dart_NewStringFromCString("fn1"), 0, nullptr));
+  FAIL("fn1",
+       Dart_Invoke(lib, Dart_NewStringFromCString("fn1_get"), 0, nullptr));
+  CHECK(Dart_Invoke(lib, Dart_NewStringFromCString("fn1_call"), 0, nullptr));
 
-  FailClosurize("fn0", Dart_GetField(lib, Dart_NewStringFromCString("fn0")));
+  FAIL("fn0", Dart_GetField(lib, Dart_NewStringFromCString("fn0")));
 
-  FailClosurize("fn1", Dart_GetField(lib, Dart_NewStringFromCString("fn1")));
+  CHECK(Dart_GetField(lib, Dart_NewStringFromCString("fn1")));
+  CHECK(Dart_GetField(lib, Dart_NewStringFromCString("fn1_get")));
+  FAIL("fn1", Dart_GetField(lib, Dart_NewStringFromCString("fn1_call")));
 
   //////// Test actions against fields
 
@@ -146,6 +177,8 @@
 
 DART_EXPORT Dart_Handle
 entrypoints_verification_test_extension_Init(Dart_Handle parent_library) {
+  isDartPrecompiledRuntime = Dart_IsPrecompiledRuntime();
+
   if (Dart_IsError(parent_library)) {
     return parent_library;
   }
diff --git a/runtime/bin/eventhandler_android.cc b/runtime/bin/eventhandler_android.cc
index a6bd764..4fe2832 100644
--- a/runtime/bin/eventhandler_android.cc
+++ b/runtime/bin/eventhandler_android.cc
@@ -120,9 +120,9 @@
 
 EventHandlerImplementation::~EventHandlerImplementation() {
   socket_map_.Clear(DeleteDescriptorInfo);
-  VOID_TEMP_FAILURE_RETRY(close(epoll_fd_));
-  VOID_TEMP_FAILURE_RETRY(close(interrupt_fds_[0]));
-  VOID_TEMP_FAILURE_RETRY(close(interrupt_fds_[1]));
+  close(epoll_fd_);
+  close(interrupt_fds_[0]);
+  close(interrupt_fds_[1]);
 }
 
 void EventHandlerImplementation::UpdateEpollInstance(intptr_t old_mask,
@@ -401,8 +401,9 @@
 }
 
 void EventHandlerImplementation::Start(EventHandler* handler) {
-  int result = Thread::Start(&EventHandlerImplementation::Poll,
-                             reinterpret_cast<uword>(handler));
+  int result =
+      Thread::Start("dart:io EventHandler", &EventHandlerImplementation::Poll,
+                    reinterpret_cast<uword>(handler));
   if (result != 0) {
     FATAL1("Failed to start event handler thread %d", result);
   }
diff --git a/runtime/bin/eventhandler_android.h b/runtime/bin/eventhandler_android.h
index 0cfd543..d8cceca 100644
--- a/runtime/bin/eventhandler_android.h
+++ b/runtime/bin/eventhandler_android.h
@@ -30,7 +30,7 @@
   intptr_t GetPollEvents();
 
   virtual void Close() {
-    VOID_TEMP_FAILURE_RETRY(close(fd_));
+    close(fd_);
     fd_ = -1;
   }
 
diff --git a/runtime/bin/eventhandler_fuchsia.cc b/runtime/bin/eventhandler_fuchsia.cc
index a74f0c2..9f3b1df 100644
--- a/runtime/bin/eventhandler_fuchsia.cc
+++ b/runtime/bin/eventhandler_fuchsia.cc
@@ -32,7 +32,7 @@
 #include "platform/utils.h"
 
 // The EventHandler for Fuchsia uses its "ports v2" API:
-// https://fuchsia.googlesource.com/zircon/+/HEAD/docs/syscalls/port_create.md
+// https://fuchsia.googlesource.com/fuchsia/+/HEAD/zircon/docs/syscalls/port_create.md
 // This API does not have epoll()-like edge triggering (EPOLLET). Since clients
 // of the EventHandler expect edge-triggered notifications, we must simulate it.
 // When a packet from zx_port_wait() indicates that a signal is asserted for a
@@ -45,7 +45,7 @@
 // 4. Some time later the Dart thread actually does a write().
 // 5. After writing, the Dart thread resubscribes to write events.
 //
-// We use he same procedure for ZX_SOCKET_READABLE, and read()/accept().
+// We use the same procedure for ZX_SOCKET_READABLE, and read()/accept().
 
 // define EVENTHANDLER_LOG_ERROR to get log messages only for errors.
 // define EVENTHANDLER_LOG_INFO to get log messages for both information and
@@ -267,7 +267,23 @@
     LOG_INFO("IOHandle::ToggleEvents: fd=%ld de-asserting read\n", fd_);
     event_mask = event_mask & ~(1 << kInEvent);
   }
-  if ((event_mask & (1 << kInEvent)) != 0) {
+  // We may get In events without available bytes, so we must make sure there
+  // are actually bytes, or we will never resubscribe (due to a short-circuit
+  // on the Dart side).
+  //
+  // This happens due to how packets get enqueued on the port with all signals
+  // asserted at that time. Sometimes we enqueue a packet due to
+  // zx_object_wait_async e.g. for POLLOUT (writability) while the socket is
+  // readable and while we have a Read queued up on the Dart side. This packet
+  // will also have POLLIN (readable) asserted. We may then perform the Read
+  // and drain the socket before our zx_port_wait is serviced, at which point
+  // when we process the packet for POLLOUT with its stale POLLIN (readable)
+  // signal, the socket is no longer actually readable.
+  //
+  // As a detail, negative available bytes (errors) are handled specially; see
+  // IOHandle::AvailableBytes for more information.
+  if ((event_mask & (1 << kInEvent)) != 0 &&
+      FDUtils::AvailableBytes(fd_) != 0) {
     LOG_INFO("IOHandle::ToggleEvents: fd = %ld asserting read and disabling\n",
              fd_);
     read_events_enabled_ = false;
@@ -468,15 +484,15 @@
 
 void EventHandlerImplementation::HandlePacket(zx_port_packet_t* pkt) {
   LOG_INFO("HandlePacket: Got event packet: key=%lx\n", pkt->key);
-  LOG_INFO("HandlePacket: Got event packet: type=%lx\n", pkt->type);
-  LOG_INFO("HandlePacket: Got event packet: status=%ld\n", pkt->status);
+  LOG_INFO("HandlePacket: Got event packet: type=%x\n", pkt->type);
+  LOG_INFO("HandlePacket: Got event packet: status=%d\n", pkt->status);
   if (pkt->type == ZX_PKT_TYPE_USER) {
     ASSERT(pkt->key == kInterruptPacketKey);
     InterruptMessage* msg = reinterpret_cast<InterruptMessage*>(&pkt->user);
     HandleInterrupt(msg);
     return;
   }
-  LOG_INFO("HandlePacket: Got event packet: observed = %lx\n",
+  LOG_INFO("HandlePacket: Got event packet: observed = %x\n",
            pkt->signal.observed);
   LOG_INFO("HandlePacket: Got event packet: count = %ld\n", pkt->signal.count);
 
@@ -553,8 +569,9 @@
 }
 
 void EventHandlerImplementation::Start(EventHandler* handler) {
-  int result = Thread::Start(&EventHandlerImplementation::Poll,
-                             reinterpret_cast<uword>(handler));
+  int result =
+      Thread::Start("dart:io EventHandler", &EventHandlerImplementation::Poll,
+                    reinterpret_cast<uword>(handler));
   if (result != 0) {
     FATAL1("Failed to start event handler thread %d", result);
   }
diff --git a/runtime/bin/eventhandler_linux.cc b/runtime/bin/eventhandler_linux.cc
index d02a49e..142f0b1 100644
--- a/runtime/bin/eventhandler_linux.cc
+++ b/runtime/bin/eventhandler_linux.cc
@@ -127,10 +127,10 @@
 
 EventHandlerImplementation::~EventHandlerImplementation() {
   socket_map_.Clear(DeleteDescriptorInfo);
-  VOID_TEMP_FAILURE_RETRY(close(epoll_fd_));
-  VOID_TEMP_FAILURE_RETRY(close(timer_fd_));
-  VOID_TEMP_FAILURE_RETRY(close(interrupt_fds_[0]));
-  VOID_TEMP_FAILURE_RETRY(close(interrupt_fds_[1]));
+  close(epoll_fd_);
+  close(timer_fd_);
+  close(interrupt_fds_[0]);
+  close(interrupt_fds_[1]);
 }
 
 void EventHandlerImplementation::UpdateEpollInstance(intptr_t old_mask,
@@ -405,8 +405,9 @@
 }
 
 void EventHandlerImplementation::Start(EventHandler* handler) {
-  int result = Thread::Start(&EventHandlerImplementation::Poll,
-                             reinterpret_cast<uword>(handler));
+  int result =
+      Thread::Start("dart:io EventHandler", &EventHandlerImplementation::Poll,
+                    reinterpret_cast<uword>(handler));
   if (result != 0) {
     FATAL1("Failed to start event handler thread %d", result);
   }
diff --git a/runtime/bin/eventhandler_linux.h b/runtime/bin/eventhandler_linux.h
index ac468dc..31cb3ec 100644
--- a/runtime/bin/eventhandler_linux.h
+++ b/runtime/bin/eventhandler_linux.h
@@ -29,7 +29,7 @@
   intptr_t GetPollEvents();
 
   virtual void Close() {
-    VOID_TEMP_FAILURE_RETRY(close(fd_));
+    close(fd_);
     fd_ = -1;
   }
 
diff --git a/runtime/bin/eventhandler_macos.cc b/runtime/bin/eventhandler_macos.cc
index 04abaac..e3d5a9a 100644
--- a/runtime/bin/eventhandler_macos.cc
+++ b/runtime/bin/eventhandler_macos.cc
@@ -137,9 +137,9 @@
 
 EventHandlerImplementation::~EventHandlerImplementation() {
   socket_map_.Clear(DeleteDescriptorInfo);
-  VOID_TEMP_FAILURE_RETRY(close(kqueue_fd_));
-  VOID_TEMP_FAILURE_RETRY(close(interrupt_fds_[0]));
-  VOID_TEMP_FAILURE_RETRY(close(interrupt_fds_[1]));
+  close(kqueue_fd_);
+  close(interrupt_fds_[0]);
+  close(interrupt_fds_[1]);
 }
 
 void EventHandlerImplementation::UpdateKQueueInstance(intptr_t old_mask,
@@ -464,7 +464,8 @@
 }
 
 void EventHandlerImplementation::Start(EventHandler* handler) {
-  int result = Thread::Start(&EventHandlerImplementation::EventHandlerEntry,
+  int result = Thread::Start("dart:io EventHandler",
+                             &EventHandlerImplementation::EventHandlerEntry,
                              reinterpret_cast<uword>(handler));
   if (result != 0) {
     FATAL1("Failed to start event handler thread %d", result);
diff --git a/runtime/bin/eventhandler_macos.h b/runtime/bin/eventhandler_macos.h
index 7550fce..a7684f2 100644
--- a/runtime/bin/eventhandler_macos.h
+++ b/runtime/bin/eventhandler_macos.h
@@ -30,7 +30,7 @@
   intptr_t GetPollEvents();
 
   virtual void Close() {
-    VOID_TEMP_FAILURE_RETRY(close(fd_));
+    close(fd_);
     fd_ = -1;
   }
 
diff --git a/runtime/bin/eventhandler_win.cc b/runtime/bin/eventhandler_win.cc
index 7b73b7e..e328f72 100644
--- a/runtime/bin/eventhandler_win.cc
+++ b/runtime/bin/eventhandler_win.cc
@@ -301,7 +301,8 @@
     // Completing asynchronously through thread.
     pending_read_ = buffer;
     read_thread_starting_ = true;
-    int result = Thread::Start(ReadFileThread, reinterpret_cast<uword>(this));
+    int result = Thread::Start("dart:io ReadFile", ReadFileThread,
+                               reinterpret_cast<uword>(this));
     if (result != 0) {
       FATAL1("Failed to start read file thread %d", result);
     }
@@ -781,7 +782,8 @@
     // the events it puts on the IO completion port. The reference is
     // Released by DeleteIfClosed.
     Retain();
-    int result = Thread::Start(WriteFileThread, reinterpret_cast<uword>(this));
+    int result = Thread::Start("dart:io WriteFile", WriteFileThread,
+                               reinterpret_cast<uword>(this));
     if (result != 0) {
       FATAL1("Failed to start write file thread %d", result);
     }
@@ -1460,8 +1462,8 @@
 }
 
 void EventHandlerImplementation::Start(EventHandler* handler) {
-  int result =
-      Thread::Start(EventHandlerEntry, reinterpret_cast<uword>(handler));
+  int result = Thread::Start("dart:io EventHandler", EventHandlerEntry,
+                             reinterpret_cast<uword>(handler));
   if (result != 0) {
     FATAL1("Failed to start event handler thread %d", result);
   }
diff --git a/runtime/bin/fdutils_android.cc b/runtime/bin/fdutils_android.cc
index 86e501b..de1fb6b 100644
--- a/runtime/bin/fdutils_android.cc
+++ b/runtime/bin/fdutils_android.cc
@@ -132,7 +132,7 @@
 
 void FDUtils::SaveErrorAndClose(intptr_t fd) {
   int err = errno;
-  VOID_TEMP_FAILURE_RETRY(close(fd));
+  close(fd);
   errno = err;
 }
 
diff --git a/runtime/bin/fdutils_linux.cc b/runtime/bin/fdutils_linux.cc
index 2cc20c5..1caa786 100644
--- a/runtime/bin/fdutils_linux.cc
+++ b/runtime/bin/fdutils_linux.cc
@@ -132,7 +132,7 @@
 
 void FDUtils::SaveErrorAndClose(intptr_t fd) {
   int err = errno;
-  VOID_TEMP_FAILURE_RETRY(close(fd));
+  close(fd);
   errno = err;
 }
 
diff --git a/runtime/bin/fdutils_macos.cc b/runtime/bin/fdutils_macos.cc
index e691506..341e85f 100644
--- a/runtime/bin/fdutils_macos.cc
+++ b/runtime/bin/fdutils_macos.cc
@@ -132,7 +132,7 @@
 
 void FDUtils::SaveErrorAndClose(intptr_t fd) {
   int err = errno;
-  VOID_TEMP_FAILURE_RETRY(close(fd));
+  close(fd);
   errno = err;
 }
 
diff --git a/runtime/bin/ffi_test_functions.cc b/runtime/bin/ffi_test_functions.cc
index 0248829..1f07257 100644
--- a/runtime/bin/ffi_test_functions.cc
+++ b/runtime/bin/ffi_test_functions.cc
@@ -5,7 +5,19 @@
 // This file contains test functions for the dart:ffi test cases.
 
 #include <stddef.h>
+#include <stdlib.h>
+#include <sys/types.h>
+
+#include "platform/assert.h"
+#include "platform/globals.h"
+#if defined(HOST_OS_WINDOWS)
+#include <psapi.h>
+#else
+#include <unistd.h>
+#endif
+
 #include <iostream>
+#include <limits>
 
 #include "include/dart_api.h"
 
@@ -22,6 +34,62 @@
   return retval;
 }
 
+//// Tests for sign and zero extension of arguments and results.
+
+DART_EXPORT uint8_t ReturnMaxUint8() {
+  return 0xff;
+}
+
+DART_EXPORT uint16_t ReturnMaxUint16() {
+  return 0xffff;
+}
+
+DART_EXPORT uint32_t ReturnMaxUint32() {
+  return 0xffffffff;
+}
+
+DART_EXPORT int8_t ReturnMinInt8() {
+  return 0x80;
+}
+
+DART_EXPORT int16_t ReturnMinInt16() {
+  return 0x8000;
+}
+
+DART_EXPORT int32_t ReturnMinInt32() {
+  return 0x80000000;
+}
+
+DART_EXPORT intptr_t TakeMaxUint8(uint8_t x) {
+  return x == 0xff ? 1 : 0;
+}
+
+DART_EXPORT intptr_t TakeMaxUint16(uint16_t x) {
+  return x == 0xffff ? 1 : 0;
+}
+
+DART_EXPORT intptr_t TakeMaxUint32(uint32_t x) {
+  return x == 0xffffffff ? 1 : 0;
+}
+
+DART_EXPORT intptr_t TakeMinInt8(int8_t x) {
+  const int64_t expected = -0x80;
+  const int64_t received = x;
+  return expected == received ? 1 : 0;
+}
+
+DART_EXPORT intptr_t TakeMinInt16(int16_t x) {
+  const int64_t expected = -0x8000;
+  const int64_t received = x;
+  return expected == received ? 1 : 0;
+}
+
+DART_EXPORT intptr_t TakeMinInt32(int32_t x) {
+  const int64_t expected = -(int32_t)0x80000000;
+  const int64_t received = x;
+  return expected == received ? 1 : 0;
+}
+
 // Performs some computation on various sized signed ints.
 // Used for testing value ranges for signed ints.
 DART_EXPORT int64_t IntComputation(int8_t a, int16_t b, int32_t c, int64_t d) {
@@ -365,4 +433,81 @@
   return retval;
 }
 
+// Does nothing with input.
+// Used for testing functions that return void
+DART_EXPORT void DevNullFloat(float a) {
+  std::cout << "DevNullFloat(" << a << ")\n";
+  std::cout << "returning nothing\n";
+}
+
+// Invents an elite floating point number.
+// Used for testing functions that do not take any arguments.
+DART_EXPORT float InventFloatValue() {
+  std::cout << "InventFloatValue()\n";
+  float retval = 1337.0f;
+  std::cout << "returning " << retval << "\n";
+  return retval;
+}
+
+// Functions for stress-testing GC by returning values that require boxing.
+
+DART_EXPORT int64_t MinInt64() {
+  return 0x8000000000000000;
+}
+
+DART_EXPORT int64_t MinInt32() {
+  return 0x80000000;
+}
+
+DART_EXPORT double SmallDouble() {
+  return 0x80000000 * -1.0;
+}
+
+// Requires boxing on 32-bit and 64-bit systems, even if the top 32-bits are
+// truncated.
+DART_EXPORT void* LargePointer() {
+  uint64_t origin = 0x8100000082000000;
+  return *reinterpret_cast<void**>(&origin);
+}
+
+// Allocates 'count'-many Mint boxes, to stress-test GC during an FFI call.
+DART_EXPORT void AllocateMints(uint64_t count) {
+  Dart_EnterScope();
+  for (uint64_t i = 0; i < count; ++i) {
+    Dart_NewInteger(0x8000000000000001);
+  }
+  Dart_ExitScope();
+}
+
+// Calls a Dart function to allocate 'count' objects.
+// Used for stress-testing GC when re-entering the API.
+DART_EXPORT void AllocateThroughDart(uint64_t count) {
+  Dart_EnterScope();
+  Dart_Handle root = Dart_RootLibrary();
+  Dart_Handle arguments[1] = {Dart_NewIntegerFromUint64(count)};
+  Dart_Handle result = Dart_Invoke(
+      root, Dart_NewStringFromCString("testAllocationsInDartHelper"), 1,
+      arguments);
+  const char* error;
+  if (Dart_IsError(result)) {
+    Dart_StringToCString(Dart_ToString(result), &error);
+    fprintf(stderr, "Could not call 'testAllocationsInDartHelper': %s\n",
+            error);
+    Dart_DumpNativeStackTrace(nullptr);
+    Dart_PrepareToAbort();
+    abort();
+  }
+  Dart_ExitScope();
+}
+
+#if !defined(_WIN32)
+DART_EXPORT int RedirectStderr() {
+  char filename[256];
+  snprintf(filename, sizeof(filename), "/tmp/captured_stderr_%d", getpid());
+  freopen(filename, "w", stderr);
+  printf("Got file %s\n", filename);
+  return getpid();
+}
+#endif
+
 }  // namespace dart
diff --git a/runtime/bin/file_android.cc b/runtime/bin/file_android.cc
index 918565a..0ef2414 100644
--- a/runtime/bin/file_android.cc
+++ b/runtime/bin/file_android.cc
@@ -56,9 +56,9 @@
     int null_fd = TEMP_FAILURE_RETRY(open("/dev/null", O_WRONLY));
     ASSERT(null_fd >= 0);
     VOID_TEMP_FAILURE_RETRY(dup2(null_fd, handle_->fd()));
-    VOID_TEMP_FAILURE_RETRY(close(null_fd));
+    close(null_fd);
   } else {
-    int err = TEMP_FAILURE_RETRY(close(handle_->fd()));
+    int err = close(handle_->fd());
     if (err != 0) {
       const int kBufferSize = 1024;
       char error_buf[kBufferSize];
@@ -402,7 +402,7 @@
       openat(newns.fd(), newns.path(), O_WRONLY | O_TRUNC | O_CREAT | O_CLOEXEC,
              st.st_mode));
   if (new_fd < 0) {
-    VOID_TEMP_FAILURE_RETRY(close(old_fd));
+    close(old_fd);
     return false;
   }
   off_t offset = 0;
@@ -427,8 +427,8 @@
     }
   }
   int e = errno;
-  VOID_TEMP_FAILURE_RETRY(close(old_fd));
-  VOID_TEMP_FAILURE_RETRY(close(new_fd));
+  close(old_fd);
+  close(new_fd);
   if (result < 0) {
     VOID_NO_RETRY_EXPECTED(unlinkat(newns.fd(), newns.path(), 0));
     errno = e;
diff --git a/runtime/bin/file_fuchsia.cc b/runtime/bin/file_fuchsia.cc
index 40aaf7d..9b480d5 100644
--- a/runtime/bin/file_fuchsia.cc
+++ b/runtime/bin/file_fuchsia.cc
@@ -395,7 +395,7 @@
       openat(newns.fd(), newns.path(),
              O_WRONLY | O_TRUNC | O_CREAT | O_CLOEXEC, st.st_mode));
   if (new_fd < 0) {
-    VOID_TEMP_FAILURE_RETRY(close(old_fd));
+    close(old_fd);
     return false;
   }
   // TODO(ZX-429): Use sendfile/copyfile or equivalent when there is one.
@@ -590,11 +590,18 @@
   return "/";
 }
 
+static int fd_is_valid(int fd) {
+    return NO_RETRY_EXPECTED(fcntl(fd, F_GETFD)) != -1 || errno != EBADF;
+}
+
 File::StdioHandleType File::GetStdioHandleType(int fd) {
   struct stat buf;
   int result = TEMP_FAILURE_RETRY(fstat(fd, &buf));
   if (result == -1) {
-    return kOther;
+    // fstat() on fds 0, 1, 2 on Fuchsia return -1 with errno ENOTSUP,
+    // but if they are opened, then we can read/write them, so pretend they
+    // are kPipe.
+    return ((errno == ENOTSUP) && fd_is_valid(fd)) ? kPipe : kOther;
   }
   if (S_ISCHR(buf.st_mode)) {
     return kTerminal;
diff --git a/runtime/bin/file_linux.cc b/runtime/bin/file_linux.cc
index ee59efe..3346d64 100644
--- a/runtime/bin/file_linux.cc
+++ b/runtime/bin/file_linux.cc
@@ -55,9 +55,9 @@
     int null_fd = TEMP_FAILURE_RETRY(open("/dev/null", O_WRONLY));
     ASSERT(null_fd >= 0);
     VOID_TEMP_FAILURE_RETRY(dup2(null_fd, handle_->fd()));
-    VOID_TEMP_FAILURE_RETRY(close(null_fd));
+    close(null_fd);
   } else {
-    int err = TEMP_FAILURE_RETRY(close(handle_->fd()));
+    int err = close(handle_->fd());
     if (err != 0) {
       const int kBufferSize = 1024;
       char error_buf[kBufferSize];
@@ -396,7 +396,7 @@
       openat64(newns.fd(), newns.path(),
                O_WRONLY | O_TRUNC | O_CREAT | O_CLOEXEC, st.st_mode));
   if (new_fd < 0) {
-    VOID_TEMP_FAILURE_RETRY(close(old_fd));
+    close(old_fd);
     return false;
   }
   int64_t offset = 0;
@@ -421,8 +421,8 @@
     }
   }
   int e = errno;
-  VOID_TEMP_FAILURE_RETRY(close(old_fd));
-  VOID_TEMP_FAILURE_RETRY(close(new_fd));
+  close(old_fd);
+  close(new_fd);
   if (result < 0) {
     VOID_NO_RETRY_EXPECTED(unlinkat(newns.fd(), newns.path(), 0));
     errno = e;
diff --git a/runtime/bin/file_macos.cc b/runtime/bin/file_macos.cc
index 244838f..3320491 100644
--- a/runtime/bin/file_macos.cc
+++ b/runtime/bin/file_macos.cc
@@ -55,9 +55,9 @@
     intptr_t null_fd = TEMP_FAILURE_RETRY(open("/dev/null", O_WRONLY));
     ASSERT(null_fd >= 0);
     VOID_TEMP_FAILURE_RETRY(dup2(null_fd, handle_->fd()));
-    VOID_TEMP_FAILURE_RETRY(close(null_fd));
+    close(null_fd);
   } else {
-    intptr_t err = TEMP_FAILURE_RETRY(close(handle_->fd()));
+    intptr_t err = close(handle_->fd());
     if (err != 0) {
       const int kBufferSize = 1024;
       char error_message[kBufferSize];
diff --git a/runtime/bin/file_patch.dart b/runtime/bin/file_patch.dart
index a9b3637..338a260 100644
--- a/runtime/bin/file_patch.dart
+++ b/runtime/bin/file_patch.dart
@@ -415,7 +415,7 @@
   }
 }
 
-@pragma("vm:entry-point")
+@pragma("vm:entry-point", "call")
 Uint8List _makeUint8ListView(Uint8List source, int offsetInBytes, int length) {
   return new Uint8List.view(source.buffer, offsetInBytes, length);
 }
diff --git a/runtime/bin/file_system_watcher_macos.cc b/runtime/bin/file_system_watcher_macos.cc
index 53ca879..770ed06 100644
--- a/runtime/bin/file_system_watcher_macos.cc
+++ b/runtime/bin/file_system_watcher_macos.cc
@@ -75,7 +75,7 @@
 
     ~Node() {
       Stop();
-      VOID_TEMP_FAILURE_RETRY(close(write_fd_));
+      close(write_fd_);
       CFRelease(path_ref_);
     }
 
@@ -178,7 +178,7 @@
   FSEventsWatcher() : run_loop_(0) { Start(); }
 
   void Start() {
-    Thread::Start(Run, reinterpret_cast<uword>(this));
+    Thread::Start("dart:io FileWatcher", Run, reinterpret_cast<uword>(this));
     monitor_.Enter();
     while (run_loop_ == NULL) {
       monitor_.Wait(Monitor::kNoTimeout);
diff --git a/runtime/bin/gen_snapshot.cc b/runtime/bin/gen_snapshot.cc
index c0656b7..6632130 100644
--- a/runtime/bin/gen_snapshot.cc
+++ b/runtime/bin/gen_snapshot.cc
@@ -15,7 +15,6 @@
 #include "bin/builtin.h"
 #include "bin/console.h"
 #include "bin/dartutils.h"
-#include "bin/dfe.h"
 #include "bin/eventhandler.h"
 #include "bin/file.h"
 #include "bin/loader.h"
@@ -60,6 +59,15 @@
     exit(exit_code);                                                           \
   }
 
+// The environment provided through the command line using -D options.
+static dart::SimpleHashMap* environment = NULL;
+
+static bool ProcessEnvironmentOption(const char* arg,
+                                     CommandLineOptions* vm_options) {
+  return OptionProcessor::ProcessEnvironmentOption(arg, vm_options,
+                                                   &environment);
+}
+
 // The core snapshot to use when creating isolates. Normally NULL, but loaded
 // from a file when creating AppJIT snapshots.
 const uint8_t* isolate_snapshot_data = NULL;
@@ -79,20 +87,6 @@
 };
 static SnapshotKind snapshot_kind = kCore;
 
-// Global state which contains a pointer to the script name for which
-// a snapshot needs to be created (NULL would result in the creation
-// of a generic snapshot that contains only the corelibs).
-static char* app_script_name = NULL;
-
-// The environment provided through the command line using -D options.
-static dart::SimpleHashMap* environment = NULL;
-
-static bool ProcessEnvironmentOption(const char* arg,
-                                     CommandLineOptions* vm_options) {
-  return OptionProcessor::ProcessEnvironmentOption(arg, vm_options,
-                                                   &environment);
-}
-
 // The ordering of this list must match the SnapshotKind enum above.
 static const char* kSnapshotKindNames[] = {
     // clang-format off
@@ -102,7 +96,8 @@
     "app-jit",
     "app-aot-blobs",
     "app-aot-assembly",
-    "vm-aot-assembly", NULL,
+    "vm-aot-assembly",
+    NULL,
     // clang-format on
 };
 
@@ -122,11 +117,8 @@
   V(reused_instructions, reused_instructions_filename)                         \
   V(blobs_container_filename, blobs_container_filename)                        \
   V(assembly, assembly_filename)                                               \
-  V(dependencies, dependencies_filename)                                       \
   V(load_compilation_trace, load_compilation_trace_filename)                   \
   V(load_type_feedback, load_type_feedback_filename)                           \
-  V(package_root, commandline_package_root)                                    \
-  V(packages, commandline_packages_file)                                       \
   V(save_obfuscation_map, obfuscation_map_filename)
 
 #define BOOL_OPTIONS_LIST(V)                                                   \
@@ -164,13 +156,6 @@
 "Usage: gen_snapshot [<vm-flags>] [<options>] <dart-kernel-file>             \n"
 "                                                                            \n"
 "Common options:                                                             \n"
-"--package_root=<path>                                                       \n"
-"  Where to find packages, that is, package:...  imports.                    \n"
-"--packages=<packages_file>                                                  \n"
-"  Where to find a package spec file                                         \n"
-"--dependencies=<output-file>                                                \n"
-"  Generates a Makefile with snapshot output files as targets and all        \n"
-"  transitive imports as sources.                                            \n"
 "--help                                                                      \n"
 "  Display this message (add --verbose for information about all VM options).\n"
 "--version                                                                   \n"
@@ -180,15 +165,7 @@
 "--snapshot_kind=core                                                        \n"
 "--vm_snapshot_data=<output-file>                                            \n"
 "--isolate_snapshot_data=<output-file>                                       \n"
-"[<dart-kernel-file>]                                                        \n"
-"                                                                            \n"
-"Writes a snapshot of <dart-kernel-file> to the specified snapshot files.    \n"
-"If no <dart-kernel-file> is passed, a generic snapshot of all the corelibs  \n"
-"is created.                                                                 \n"
-"                                                                            \n"
-"Writes a snapshot of <dart-kernel-file> to the specified snapshot files.    \n"
-"If no <dart-kernel-file> is passed, a generic snapshot of all the corelibs  \n"
-"is created.                                                                 \n"
+"<dart-kernel-file>                                                          \n"
 "                                                                            \n"
 "To create an AOT application snapshot as blobs suitable for loading with    \n"
 "mmap:                                                                       \n"
@@ -199,7 +176,7 @@
 "--isolate_snapshot_instructions=<output-file>                               \n"
 "[--obfuscate]                                                               \n"
 "[--save-obfuscation-map=<map-filename>]                                     \n"
-" <dart-kernel-file>                                                         \n"
+"<dart-kernel-file>                                                          \n"
 "                                                                            \n"
 "To create an AOT application snapshot as assembly suitable for compilation  \n"
 "as a static or dynamic library:                                             \n"
@@ -232,7 +209,7 @@
 static int ParseArguments(int argc,
                           char** argv,
                           CommandLineOptions* vm_options,
-                          char** script_name) {
+                          CommandLineOptions* inputs) {
   const char* kPrefix = "-";
   const intptr_t kPrefixLen = strlen(kPrefix);
 
@@ -250,12 +227,10 @@
     i += 1;
   }
 
-  // Get the script name.
-  if (i < argc) {
-    *script_name = argv[i];
-    i += 1;
-  } else {
-    *script_name = NULL;
+  // Parse out the kernel inputs.
+  while (i < argc) {
+    inputs->AddArgument(argv[i]);
+    i++;
   }
 
   if (help) {
@@ -267,11 +242,8 @@
   }
 
   // Verify consistency of arguments.
-  if ((commandline_package_root != NULL) &&
-      (commandline_packages_file != NULL)) {
-    Log::PrintErr(
-        "Specifying both a packages directory and a packages "
-        "file is invalid.\n\n");
+  if (inputs->count() < 1) {
+    Log::PrintErr("At least one input is required\n");
     return -1;
   }
 
@@ -316,12 +288,6 @@
       break;
     }
     case kAppAOTBlobs: {
-      if (*script_name == NULL) {
-        Log::PrintErr(
-            "Building an AOT snapshot as blobs requires specifying "
-            " a kernel file.\n\n");
-        return -1;
-      }
       if ((blobs_container_filename == NULL) &&
           ((vm_snapshot_data_filename == NULL) ||
            (vm_snapshot_instructions_filename == NULL) ||
@@ -350,19 +316,19 @@
       break;
     }
     case kAppAOTAssembly: {
-      if ((assembly_filename == NULL) || (*script_name == NULL)) {
+      if (assembly_filename == NULL) {
         Log::PrintErr(
             "Building an AOT snapshot as assembly requires specifying "
-            "an output file for --assembly and a kernel file.\n\n");
+            "an output file for --assembly.\n\n");
         return -1;
       }
       break;
     }
     case kVMAOTAssembly: {
-      if ((assembly_filename == NULL) || (*script_name == NULL)) {
+      if (assembly_filename == NULL) {
         Log::PrintErr(
             "Building an AOT snapshot as assembly requires specifying "
-            "an output file for --assembly and a kernel file.\n\n");
+            "an output file for --assembly.\n\n");
         return -1;
       }
       break;
@@ -428,124 +394,14 @@
   }
 }
 
-// Generates a depfile like gcc -M -MF. Must be consumable by Ninja.
-class DependenciesFileWriter : public ValueObject {
- public:
-  DependenciesFileWriter() : dependencies_(NULL), file_(NULL), success_(true) {}
-
-  void WriteDependencies(MallocGrowableArray<char*>* dependencies) {
-    dependencies_ = dependencies;
-
-    file_ = File::Open(NULL, dependencies_filename, File::kWriteTruncate);
-    if (file_ == NULL) {
-      Log::PrintErr("Error: Unable to open dependencies file: %s\n\n",
-                    dependencies_filename);
-      exit(kErrorExitCode);
-    }
-    RefCntReleaseScope<File> rs(file_);
-
-    // Write dependencies for one of the output files.
-    // TODO(https://github.com/ninja-build/ninja/issues/1184): Do this for all
-    // output files.
-    switch (snapshot_kind) {
-      case kCore:
-        WriteDependenciesWithTarget(vm_snapshot_data_filename);
-        // WriteDependenciesWithTarget(isolate_snapshot_data_filename);
-        break;
-      case kAppAOTAssembly:
-        WriteDependenciesWithTarget(assembly_filename);
-        break;
-      case kApp:
-      case kAppJIT:
-        WriteDependenciesWithTarget(isolate_snapshot_data_filename);
-        // WriteDependenciesWithTarget(isolate_snapshot_instructions_filename);
-        break;
-      case kCoreJIT:
-        WriteDependenciesWithTarget(vm_snapshot_data_filename);
-        // WriteDependenciesWithTarget(vm_snapshot_instructions_filename);
-        // WriteDependenciesWithTarget(isolate_snapshot_data_filename);
-        // WriteDependenciesWithTarget(isolate_snapshot_instructions_filename);
-        break;
-      case kAppAOTBlobs:
-        if (blobs_container_filename != NULL) {
-          WriteDependenciesWithTarget(blobs_container_filename);
-        } else {
-          WriteDependenciesWithTarget(vm_snapshot_data_filename);
-          // WriteDependenciesWithTarget(vm_snapshot_instructions_filename);
-          // WriteDependenciesWithTarget(isolate_snapshot_data_filename);
-          // WriteDependenciesWithTarget(isolate_snapshot_instructions_filename);
-        }
-        break;
-      default:
-        UNREACHABLE();
-    }
-
-    if (!success_) {
-      Log::PrintErr("Error: Unable to write dependencies file: %s\n\n",
-                    dependencies_filename);
-      exit(kErrorExitCode);
-    }
+static void MaybeLoadExtraInputs(const CommandLineOptions& inputs) {
+  for (intptr_t i = 1; i < inputs.count(); i++) {
+    uint8_t* buffer = NULL;
+    intptr_t size = 0;
+    ReadFile(inputs.GetArgument(i), &buffer, &size);
+    Dart_Handle result = Dart_LoadLibraryFromKernel(buffer, size);
+    CHECK_RESULT(result);
   }
-
- private:
-  void WriteDependenciesWithTarget(const char* target) {
-    WritePath(target);
-    Write(": ");
-
-    for (intptr_t i = 0; i < dependencies_->length(); i++) {
-      WritePath(dependencies_->At(i));
-    }
-
-    Write("\n");
-  }
-
-  char* EscapePath(const char* path) {
-    char* escaped_path = reinterpret_cast<char*>(malloc(strlen(path) * 2 + 1));
-    const char* read_cursor = path;
-    char* write_cursor = escaped_path;
-    while (*read_cursor != '\0') {
-      if ((*read_cursor == ' ') || (*read_cursor == '\\')) {
-        *write_cursor++ = '\\';
-      }
-      *write_cursor++ = *read_cursor++;
-    }
-    *write_cursor = '\0';
-    return escaped_path;
-  }
-
-  void WritePath(const char* path) {
-    char* escaped_path = EscapePath(path);
-    success_ &= file_->Print("%s ", escaped_path);
-    free(escaped_path);
-  }
-
-  void Write(const char* string) { success_ &= file_->Print("%s", string); }
-
-  MallocGrowableArray<char*>* dependencies_;
-  File* file_;
-  bool success_;
-};
-
-static void CreateAndWriteDependenciesFile() {
-  IsolateData* isolate_data =
-      reinterpret_cast<IsolateData*>(Dart_CurrentIsolateData());
-  MallocGrowableArray<char*>* dependencies = isolate_data->dependencies();
-  if (dependencies == NULL) {
-    return;
-  }
-
-  Loader::ResolveDependenciesAsFilePaths();
-
-  ASSERT(dependencies_filename != NULL);
-  if (dependencies_filename != NULL) {
-    DependenciesFileWriter writer;
-    writer.WriteDependencies(dependencies);
-  }
-
-  for (intptr_t i = 0; i < dependencies->length(); i++) {
-    free(dependencies->At(i));
-  }
-  dependencies->Clear();
 }
 
 static void MaybeLoadCode() {
@@ -568,6 +424,7 @@
     intptr_t size = 0;
     ReadFile(load_compilation_trace_filename, &buffer, &size);
     Dart_Handle result = Dart_LoadCompilationTrace(buffer, size);
+    free(buffer);
     CHECK_RESULT(result);
   }
 
@@ -577,6 +434,7 @@
     intptr_t size = 0;
     ReadFile(load_type_feedback_filename, &buffer, &size);
     Dart_Handle result = Dart_LoadTypeFeedback(buffer, size);
+    free(buffer);
     CHECK_RESULT(result);
   }
 }
@@ -845,24 +703,21 @@
     {NULL, NULL, NULL}  // Must be terminated with NULL entries.
 };
 
-static int GenerateSnapshotFromKernel(const uint8_t* kernel_buffer,
-                                      intptr_t kernel_buffer_size) {
-  char* error = NULL;
-  IsolateData* isolate_data = new IsolateData(NULL, commandline_package_root,
-                                              commandline_packages_file, NULL);
-  if (dependencies_filename != NULL) {
-    isolate_data->set_dependencies(new MallocGrowableArray<char*>());
-  }
+static int CreateIsolateAndSnapshot(const CommandLineOptions& inputs) {
+  uint8_t* kernel_buffer = NULL;
+  intptr_t kernel_buffer_size = NULL;
+  ReadFile(inputs.GetArgument(0), &kernel_buffer, &kernel_buffer_size);
 
   Dart_IsolateFlags isolate_flags;
   Dart_IsolateFlagsInitialize(&isolate_flags);
-
   if (IsSnapshottingForPrecompilation()) {
     isolate_flags.obfuscate = obfuscate;
     isolate_flags.entry_points = no_entry_points;
   }
 
+  IsolateData* isolate_data = new IsolateData(NULL, NULL, NULL, NULL);
   Dart_Isolate isolate;
+  char* error = NULL;
   if (isolate_snapshot_data == NULL) {
     // We need to capture the vmservice library in the core snapshot, so load it
     // in the main isolate as well.
@@ -905,23 +760,11 @@
       Dart_LoadLibraryFromKernel(kernel_buffer, kernel_buffer_size));
   CHECK_RESULT(result);
 
+  MaybeLoadExtraInputs(inputs);
+
   MaybeLoadCode();
 
   switch (snapshot_kind) {
-    case kAppAOTBlobs:
-    case kAppAOTAssembly: {
-      if (Dart_IsNull(Dart_RootLibrary())) {
-        Log::PrintErr(
-            "Unable to load root library from the input dill file.\n");
-        return kErrorExitCode;
-      }
-
-      CreateAndWritePrecompiledSnapshot();
-
-      CreateAndWriteDependenciesFile();
-
-      break;
-    }
     case kCore:
       CreateAndWriteCoreSnapshot();
       break;
@@ -934,6 +777,10 @@
     case kAppJIT:
       CreateAndWriteAppJITSnapshot();
       break;
+    case kAppAOTBlobs:
+    case kAppAOTAssembly:
+      CreateAndWritePrecompiledSnapshot();
+      break;
     case kVMAOTAssembly: {
       File* file = OpenFile(assembly_filename);
       RefCntReleaseScope<File> rs(file);
@@ -947,18 +794,13 @@
 
   Dart_ExitScope();
   Dart_ShutdownIsolate();
-  error = Dart_Cleanup();
-  if (error != NULL) {
-    Log::PrintErr("VM cleanup failed: %s\n", error);
-    free(error);
-  }
-  EventHandler::Stop();
   return 0;
 }
 
 int main(int argc, char** argv) {
   const int EXTRA_VM_ARGUMENTS = 7;
   CommandLineOptions vm_options(argc + EXTRA_VM_ARGUMENTS);
+  CommandLineOptions inputs(argc);
 
   // When running from the command line we assume that we are optimizing for
   // throughput, and therefore use a larger new gen semi space size and a faster
@@ -972,25 +814,12 @@
   vm_options.AddArgument("--deterministic");
 
   // Parse command line arguments.
-  if (ParseArguments(argc, argv, &vm_options, &app_script_name) < 0) {
+  if (ParseArguments(argc, argv, &vm_options, &inputs) < 0) {
     PrintUsage();
     return kErrorExitCode;
   }
   DartUtils::SetEnvironment(environment);
 
-  // Sniff the script to check if it is actually a dill file.
-  uint8_t* kernel_buffer = NULL;
-  intptr_t kernel_buffer_size = NULL;
-  if (app_script_name != NULL) {
-    dfe.ReadScript(app_script_name, &kernel_buffer, &kernel_buffer_size);
-  }
-  if (kernel_buffer != NULL) {
-    if (dependencies_filename != NULL) {
-      Log::PrintErr("Depfiles are not supported in Dart 2.\n");
-      return kErrorExitCode;
-    }
-  }
-
   if (!Platform::Initialize()) {
     Log::PrintErr("Initialization failed\n");
     return kErrorExitCode;
@@ -1026,16 +855,9 @@
     return kErrorExitCode;
   }
 
-  // Initialize the Dart VM.
-  // Note: We don't expect isolates to be created from dart code during
-  // core library snapshot generation. However for the case when a full
-  // snasphot is generated from a script (app_script_name != NULL) we will
-  // need the service isolate to resolve URI and load code.
-
   Dart_InitializeParams init_params;
   memset(&init_params, 0, sizeof(init_params));
   init_params.version = DART_INITIALIZE_PARAMS_CURRENT_VERSION;
-  ASSERT((app_script_name != NULL) || (kernel_buffer == NULL));
   init_params.file_open = DartUtils::OpenFile;
   init_params.file_read = DartUtils::ReadFile;
   init_params.file_write = DartUtils::WriteFile;
@@ -1075,13 +897,18 @@
     return kErrorExitCode;
   }
 
-  if (kernel_buffer != NULL) {
-    return GenerateSnapshotFromKernel(kernel_buffer, kernel_buffer_size);
-  } else {
-    Log::PrintErr("Invalid input script specified : %s\n",
-                  (app_script_name == NULL) ? "null Script" : app_script_name);
-    return kErrorExitCode;
+  int result = CreateIsolateAndSnapshot(inputs);
+  if (result != 0) {
+    return result;
   }
+
+  error = Dart_Cleanup();
+  if (error != NULL) {
+    Log::PrintErr("VM cleanup failed: %s\n", error);
+    free(error);
+  }
+  EventHandler::Stop();
+  return 0;
 }
 
 }  // namespace bin
diff --git a/runtime/bin/io_natives.cc b/runtime/bin/io_natives.cc
index 94a0c35258..935f2ea 100644
--- a/runtime/bin/io_natives.cc
+++ b/runtime/bin/io_natives.cc
@@ -194,7 +194,7 @@
                                    bool* auto_setup_scope) {
   const char* function_name = NULL;
   Dart_Handle result = Dart_StringToCString(name, &function_name);
-  DART_CHECK_VALID(result);
+  ASSERT(!Dart_IsError(result));
   ASSERT(function_name != NULL);
   ASSERT(auto_setup_scope != NULL);
   *auto_setup_scope = true;
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc
index 301b3ee..2d09c17 100644
--- a/runtime/bin/main.cc
+++ b/runtime/bin/main.cc
@@ -12,6 +12,7 @@
 #include "include/dart_embedder_api.h"
 #include "include/dart_tools_api.h"
 
+#include "bin/abi_version.h"
 #include "bin/builtin.h"
 #include "bin/console.h"
 #include "bin/crashpad.h"
@@ -353,6 +354,14 @@
 #endif  // !defined(DART_PRECOMPILED_RUNTIME)
   }
 
+  if (Options::gen_snapshot_kind() == kAppJIT) {
+    // If we sort, we must do it for all isolates, not just the main isolate,
+    // otherwise isolates related by spawnFunction will disagree on CIDs and
+    // cannot correctly send each other messages.
+    result = Dart_SortClasses();
+    CHECK_RESULT(result);
+  }
+
   // Make the isolate runnable so that it is ready to handle messages.
   Dart_ExitScope();
   Dart_ExitIsolate();
@@ -371,7 +380,6 @@
 // For now we only support the kernel isolate coming up from an
 // application snapshot or from a .dill file.
 static Dart_Isolate CreateAndSetupKernelIsolate(const char* script_uri,
-                                                const char* main,
                                                 const char* package_root,
                                                 const char* packages_config,
                                                 Dart_IsolateFlags* flags,
@@ -416,9 +424,10 @@
     isolate_data =
         new IsolateData(uri, package_root, packages_config, app_snapshot);
     isolate = Dart_CreateIsolate(
-        DART_KERNEL_ISOLATE_NAME, main, isolate_snapshot_data,
-        isolate_snapshot_instructions, app_isolate_shared_data,
-        app_isolate_shared_instructions, flags, isolate_data, error);
+        DART_KERNEL_ISOLATE_NAME, DART_KERNEL_ISOLATE_NAME,
+        isolate_snapshot_data, isolate_snapshot_instructions,
+        app_isolate_shared_data, app_isolate_shared_instructions, flags,
+        isolate_data, error);
   }
   if (isolate == NULL) {
     // Clear error from app snapshot and re-trying from kernel file.
@@ -435,8 +444,9 @@
         const_cast<uint8_t*>(kernel_service_buffer),
         kernel_service_buffer_size);
     isolate = Dart_CreateIsolateFromKernel(
-        DART_KERNEL_ISOLATE_NAME, main, kernel_service_buffer,
-        kernel_service_buffer_size, flags, isolate_data, error);
+        DART_KERNEL_ISOLATE_NAME, DART_KERNEL_ISOLATE_NAME,
+        kernel_service_buffer, kernel_service_buffer_size, flags, isolate_data,
+        error);
   }
 
   if (isolate == NULL) {
@@ -455,7 +465,6 @@
 // For now we only support the service isolate coming up from sources
 // which are compiled by the VM parser.
 static Dart_Isolate CreateAndSetupServiceIsolate(const char* script_uri,
-                                                 const char* main,
                                                  const char* package_root,
                                                  const char* packages_config,
                                                  Dart_IsolateFlags* flags,
@@ -472,9 +481,9 @@
   const uint8_t* isolate_snapshot_instructions =
       app_isolate_snapshot_instructions;
   isolate = Dart_CreateIsolate(
-      script_uri, main, isolate_snapshot_data, isolate_snapshot_instructions,
-      app_isolate_shared_data, app_isolate_shared_instructions, flags,
-      isolate_data, error);
+      script_uri, DART_VM_SERVICE_ISOLATE_NAME, isolate_snapshot_data,
+      isolate_snapshot_instructions, app_isolate_shared_data,
+      app_isolate_shared_instructions, flags, isolate_data, error);
 #else
   // JIT: Service isolate uses the core libraries snapshot.
 
@@ -485,9 +494,9 @@
   const uint8_t* isolate_snapshot_instructions =
       core_isolate_snapshot_instructions;
   isolate = Dart_CreateIsolate(
-      script_uri, NULL, isolate_snapshot_data, isolate_snapshot_instructions,
-      app_isolate_shared_data, app_isolate_shared_instructions, flags,
-      isolate_data, error);
+      script_uri, DART_VM_SERVICE_ISOLATE_NAME, isolate_snapshot_data,
+      isolate_snapshot_instructions, app_isolate_shared_data,
+      app_isolate_shared_instructions, flags, isolate_data, error);
 #endif  // !defined(DART_PRECOMPILED_RUNTIME)
   if (isolate == NULL) {
     delete isolate_data;
@@ -500,10 +509,10 @@
   CHECK_RESULT(result);
 
   // Load embedder specific bits and return.
-  if (!VmService::Setup(Options::vm_service_server_ip(),
-                        Options::vm_service_server_port(),
-                        Options::vm_service_dev_mode(),
-                        Options::trace_loading(), Options::deterministic())) {
+  if (!VmService::Setup(
+          Options::vm_service_server_ip(), Options::vm_service_server_port(),
+          Options::vm_service_dev_mode(), Options::vm_service_auth_disabled(),
+          Options::trace_loading(), Options::deterministic())) {
     *error = strdup(VmService::GetErrorMessage());
     return NULL;
   }
@@ -521,7 +530,7 @@
 // Returns newly created Isolate on success, NULL on failure.
 static Dart_Isolate CreateIsolateAndSetupHelper(bool is_main_isolate,
                                                 const char* script_uri,
-                                                const char* main,
+                                                const char* name,
                                                 const char* package_root,
                                                 const char* packages_config,
                                                 Dart_IsolateFlags* flags,
@@ -597,7 +606,8 @@
   Dart_Isolate isolate = NULL;
 
 #if !defined(DART_PRECOMPILED_RUNTIME)
-  if (!isolate_run_app_snapshot && (isolate_snapshot_data == NULL)) {
+  if ((!isolate_run_app_snapshot && (isolate_snapshot_data == NULL)) ||
+      (Options::target_abi_version() != Options::kAbiVersionUnset)) {
     const uint8_t* platform_kernel_buffer = NULL;
     intptr_t platform_kernel_buffer_size = 0;
     dfe.LoadPlatform(&platform_kernel_buffer, &platform_kernel_buffer_size);
@@ -618,17 +628,17 @@
     // application kernel binary is self contained or an incremental binary.
     // Isolate should be created only if it is a self contained kernel binary.
     isolate = Dart_CreateIsolateFromKernel(
-        script_uri, main, platform_kernel_buffer, platform_kernel_buffer_size,
+        script_uri, name, platform_kernel_buffer, platform_kernel_buffer_size,
         flags, isolate_data, error);
   } else {
     isolate = Dart_CreateIsolate(
-        script_uri, main, isolate_snapshot_data, isolate_snapshot_instructions,
+        script_uri, name, isolate_snapshot_data, isolate_snapshot_instructions,
         app_isolate_shared_data, app_isolate_shared_instructions, flags,
         isolate_data, error);
   }
 #else
   isolate = Dart_CreateIsolate(
-      script_uri, main, isolate_snapshot_data, isolate_snapshot_instructions,
+      script_uri, name, isolate_snapshot_data, isolate_snapshot_instructions,
       app_isolate_shared_data, app_isolate_shared_instructions, flags,
       isolate_data, error);
 #endif  // !defined(DART_PRECOMPILED_RUNTIME)
@@ -669,15 +679,13 @@
   int exit_code = 0;
 #if !defined(EXCLUDE_CFE_AND_KERNEL_PLATFORM)
   if (strcmp(script_uri, DART_KERNEL_ISOLATE_NAME) == 0) {
-    return CreateAndSetupKernelIsolate(script_uri, main, package_root,
-                                       package_config, flags, error,
-                                       &exit_code);
+    return CreateAndSetupKernelIsolate(script_uri, package_root, package_config,
+                                       flags, error, &exit_code);
   }
 #endif  // !defined(EXCLUDE_CFE_AND_KERNEL_PLATFORM)
   if (strcmp(script_uri, DART_VM_SERVICE_ISOLATE_NAME) == 0) {
-    return CreateAndSetupServiceIsolate(script_uri, main, package_root,
-                                        package_config, flags, error,
-                                        &exit_code);
+    return CreateAndSetupServiceIsolate(
+        script_uri, package_root, package_config, flags, error, &exit_code);
   }
   bool is_main_isolate = false;
   return CreateIsolateAndSetupHelper(is_main_isolate, script_uri, main,
@@ -685,21 +693,6 @@
                                      callback_data, error, &exit_code);
 }
 
-char* BuildIsolateName(const char* script_name, const char* func_name) {
-  // Skip past any slashes in the script name.
-  const char* last_slash = strrchr(script_name, '/');
-  if (last_slash != NULL) {
-    script_name = last_slash + 1;
-  }
-
-  const char* kFormat = "%s/%s";
-  intptr_t len = strlen(script_name) + strlen(func_name) + 2;
-  char* buffer = new char[len];
-  ASSERT(buffer != NULL);
-  snprintf(buffer, len, kFormat, script_name, func_name);
-  return buffer;
-}
-
 static void OnIsolateShutdown(void* callback_data) {
   Dart_EnterScope();
 
@@ -810,7 +803,6 @@
   char* error = NULL;
   bool is_main_isolate = true;
   int exit_code = 0;
-  char* isolate_name = BuildIsolateName(script_name, "main");
   Dart_IsolateFlags flags;
   Dart_IsolateFlagsInitialize(&flags);
 
@@ -820,7 +812,6 @@
       &exit_code);
 
   if (isolate == NULL) {
-    delete[] isolate_name;
     Log::PrintErr("%s\n", error);
     free(error);
     error = NULL;
@@ -835,7 +826,6 @@
     Platform::Exit((exit_code != 0) ? exit_code : kErrorExitCode);
   }
   main_isolate = isolate;
-  delete[] isolate_name;
 
   Dart_EnterIsolate(isolate);
   ASSERT(isolate == Dart_CurrentIsolate());
@@ -872,16 +862,23 @@
     }
 
     if (Options::gen_snapshot_kind() == kAppJIT) {
-      result = Dart_SortClasses();
-      CHECK_RESULT(result);
       LoadBytecode();
     }
 
+    if (Options::load_compilation_trace_filename() != NULL) {
+      uint8_t* buffer = NULL;
+      intptr_t size = 0;
+      ReadFile(Options::load_compilation_trace_filename(), &buffer, &size);
+      result = Dart_LoadCompilationTrace(buffer, size);
+      free(buffer);
+      CHECK_RESULT(result);
+    }
     if (Options::load_type_feedback_filename() != NULL) {
       uint8_t* buffer = NULL;
       intptr_t size = 0;
       ReadFile(Options::load_type_feedback_filename(), &buffer, &size);
       result = Dart_LoadTypeFeedback(buffer, size);
+      free(buffer);
       CHECK_RESULT(result);
     }
 
@@ -920,6 +917,13 @@
     }
     CHECK_RESULT(result);
 
+    if (Options::save_compilation_trace_filename() != NULL) {
+      uint8_t* buffer = NULL;
+      intptr_t size = 0;
+      result = Dart_SaveCompilationTrace(&buffer, &size);
+      CHECK_RESULT(result);
+      WriteFile(Options::save_compilation_trace_filename(), buffer, size);
+    }
     if (Options::save_type_feedback_filename() != NULL) {
       uint8_t* buffer = NULL;
       intptr_t size = 0;
@@ -1103,7 +1107,7 @@
 // Note: must read platform only *after* VM flags are parsed because
 // they might affect how the platform is loaded.
 #if !defined(DART_PRECOMPILED_RUNTIME)
-  dfe.Init();
+  dfe.Init(Options::target_abi_version());
   uint8_t* application_kernel_buffer = NULL;
   intptr_t application_kernel_buffer_size = 0;
   dfe.ReadScript(script_name, &application_kernel_buffer,
diff --git a/runtime/bin/main_options.cc b/runtime/bin/main_options.cc
index a7181f5..0826fa1 100644
--- a/runtime/bin/main_options.cc
+++ b/runtime/bin/main_options.cc
@@ -8,6 +8,7 @@
 #include <stdlib.h>
 #include <string.h>
 
+#include "bin/abi_version.h"
 #include "bin/log.h"
 #include "bin/options.h"
 #include "bin/platform.h"
@@ -119,13 +120,14 @@
 // clang-format off
 void Options::PrintUsage() {
   Log::PrintErr(
-      "Usage: dart [<vm-flags>] <dart-script-file> [<dart-options>]\n"
+      "Usage: dart [<vm-flags>] <dart-script-file> [<script-arguments>]\n"
       "\n"
-      "Executes the Dart script passed as <dart-script-file>.\n"
+      "Executes the Dart script <dart-script-file> with "
+      "the given list of <script-arguments>.\n"
       "\n");
   if (!Options::verbose_option()) {
     Log::PrintErr(
-"Common options:\n"
+"Common VM flags:\n"
 "--enable-asserts\n"
 "  Enable assert statements.\n"
 "--help or -h\n"
@@ -190,9 +192,15 @@
 "  enables tracing of library and script loading\n"
 "\n"
 "--enable-vm-service[=<port>[/<bind-address>]]\n"
-"  enables the VM service and listens on specified port for connections\n"
+"  Enables the VM service and listens on specified port for connections\n"
 "  (default port number is 8181, default bind address is localhost).\n"
 "\n"
+"--disable-service-auth-codes\n"
+"  Disables the requirement for an authentication code to communicate with\n"
+"  the VM service. Authentication codes help protect against CSRF attacks,\n"
+"  so it is not recommended to disable them unless behind a firewall on a\n"
+"  secure device.\n"
+"\n"
 "--root-certs-file=<path>\n"
 "  The path to a file containing the trusted root certificates to use for\n"
 "  secure socket connections.\n"
@@ -324,7 +332,31 @@
   return true;
 }
 
-static bool checked_set = false;
+int Options::target_abi_version_ = Options::kAbiVersionUnset;
+bool Options::ProcessAbiVersionOption(const char* arg,
+                                      CommandLineOptions* vm_options) {
+  const char* value = OptionProcessor::ProcessOption(arg, "--use_abi_version=");
+  if (value == NULL) {
+    return false;
+  }
+  int ver = 0;
+  for (int i = 0; value[i]; ++i) {
+    if (value[i] >= '0' && value[i] <= '9') {
+      ver = (ver * 10) + value[i] - '0';
+    } else {
+      Log::PrintErr("--use_abi_version must be an int\n");
+      return false;
+    }
+  }
+  if (ver < AbiVersion::GetOldestSupported() ||
+      ver > AbiVersion::GetCurrent()) {
+    Log::PrintErr("--use_abi_version must be between %d and %d inclusive\n",
+                  AbiVersion::GetOldestSupported(), AbiVersion::GetCurrent());
+    return false;
+  }
+  target_abi_version_ = ver;
+  return true;
+}
 
 int Options::ParseArguments(int argc,
                             char** argv,
@@ -349,14 +381,7 @@
       i++;
     } else {
       // Check if this flag is a potentially valid VM flag.
-      const char* kChecked = "-c";
-      const char* kCheckedFull = "--checked";
-      if ((strncmp(argv[i], kChecked, strlen(kChecked)) == 0) ||
-          (strncmp(argv[i], kCheckedFull, strlen(kCheckedFull)) == 0)) {
-        checked_set = true;
-        i++;
-        continue;  // '-c' is not a VM flag so don't add to vm options.
-      } else if (!OptionProcessor::IsValidFlag(argv[i], kPrefix, kPrefixLen)) {
+      if (!OptionProcessor::IsValidFlag(argv[i], kPrefix, kPrefixLen)) {
         break;
       }
       // The following two flags are processed by both the embedder and
@@ -458,9 +483,6 @@
         " run using a snapshot is invalid.\n");
     return -1;
   }
-  if (checked_set) {
-    vm_options->AddArgument("--enable-asserts");
-  }
 
   // If --snapshot is given without --snapshot-kind, default to script snapshot.
   if ((snapshot_filename_ != NULL) && (gen_snapshot_kind_ == kNone)) {
diff --git a/runtime/bin/main_options.h b/runtime/bin/main_options.h
index 2b668ac..8513fe3 100644
--- a/runtime/bin/main_options.h
+++ b/runtime/bin/main_options.h
@@ -24,6 +24,8 @@
   V(depfile, depfile)                                                          \
   V(depfile_output_filename, depfile_output_filename)                          \
   V(shared_blobs, shared_blobs_filename)                                       \
+  V(save_compilation_trace, save_compilation_trace_filename)                   \
+  V(load_compilation_trace, load_compilation_trace_filename)                   \
   V(save_type_feedback, save_type_feedback_filename)                           \
   V(load_type_feedback, load_type_feedback_filename)                           \
   V(root_certs_file, root_certs_file)                                          \
@@ -36,6 +38,7 @@
   V(version, version_option)                                                   \
   V(compile_all, compile_all)                                                  \
   V(disable_service_origin_check, vm_service_dev_mode)                         \
+  V(disable_service_auth_codes, vm_service_auth_disabled)                      \
   V(deterministic, deterministic)                                              \
   V(trace_loading, trace_loading)                                              \
   V(short_socket_read, short_socket_read)                                      \
@@ -60,7 +63,8 @@
 #define CB_OPTIONS_LIST(V)                                                     \
   V(ProcessEnvironmentOption)                                                  \
   V(ProcessEnableVmServiceOption)                                              \
-  V(ProcessObserveOption)
+  V(ProcessObserveOption)                                                      \
+  V(ProcessAbiVersionOption)
 
 // This enum must match the strings in kSnapshotKindNames in main_options.cc.
 enum SnapshotKind {
@@ -113,6 +117,9 @@
   static const char* vm_service_server_ip() { return vm_service_server_ip_; }
   static int vm_service_server_port() { return vm_service_server_port_; }
 
+  static constexpr int kAbiVersionUnset = -1;
+  static int target_abi_version() { return target_abi_version_; }
+
 #if !defined(DART_PRECOMPILED_RUNTIME)
   static DFE* dfe() { return dfe_; }
   static void set_dfe(DFE* dfe) { dfe_ = dfe; }
@@ -157,6 +164,8 @@
                                     int default_port,
                                     const char* default_ip);
 
+  static int target_abi_version_;
+
 #define OPTION_FRIEND(flag, variable) friend class OptionProcessor_##flag;
   STRING_OPTIONS_LIST(OPTION_FRIEND)
   BOOL_OPTIONS_LIST(OPTION_FRIEND)
diff --git a/runtime/bin/namespace_patch.dart b/runtime/bin/namespace_patch.dart
index f28c104..d8b7295 100644
--- a/runtime/bin/namespace_patch.dart
+++ b/runtime/bin/namespace_patch.dart
@@ -35,7 +35,7 @@
 @pragma("vm:entry-point")
 class _Namespace {
   @patch
-  @pragma("vm:entry-point")
+  @pragma("vm:entry-point", "call")
   static void _setupNamespace(var namespace) {
     _NamespaceImpl._setupNamespace(namespace);
   }
diff --git a/runtime/bin/platform_android.cc b/runtime/bin/platform_android.cc
index cd1efd7..37240b9 100644
--- a/runtime/bin/platform_android.cc
+++ b/runtime/bin/platform_android.cc
@@ -28,10 +28,9 @@
 static void segv_handler(int signal, siginfo_t* siginfo, void* context) {
   Log::PrintErr(
       "\n===== CRASH =====\n"
-      "version=%s\n"
       "si_signo=%s(%d), si_code=%d, si_addr=%p\n",
-      Dart_VersionString(), strsignal(siginfo->si_signo), siginfo->si_signo,
-      siginfo->si_code, siginfo->si_addr);
+      strsignal(siginfo->si_signo), siginfo->si_signo, siginfo->si_code,
+      siginfo->si_addr);
   Dart_DumpNativeStackTrace(context);
   abort();
 }
diff --git a/runtime/bin/platform_linux.cc b/runtime/bin/platform_linux.cc
index 260a900..6bc50aa 100644
--- a/runtime/bin/platform_linux.cc
+++ b/runtime/bin/platform_linux.cc
@@ -28,10 +28,9 @@
 static void segv_handler(int signal, siginfo_t* siginfo, void* context) {
   Log::PrintErr(
       "\n===== CRASH =====\n"
-      "version=%s\n"
       "si_signo=%s(%d), si_code=%d, si_addr=%p\n",
-      Dart_VersionString(), strsignal(siginfo->si_signo), siginfo->si_signo,
-      siginfo->si_code, siginfo->si_addr);
+      strsignal(siginfo->si_signo), siginfo->si_signo, siginfo->si_code,
+      siginfo->si_addr);
   Dart_DumpNativeStackTrace(context);
   abort();
 }
diff --git a/runtime/bin/platform_macos.cc b/runtime/bin/platform_macos.cc
index c41e8b2..ef3c90f 100644
--- a/runtime/bin/platform_macos.cc
+++ b/runtime/bin/platform_macos.cc
@@ -36,10 +36,9 @@
 static void segv_handler(int signal, siginfo_t* siginfo, void* context) {
   Log::PrintErr(
       "\n===== CRASH =====\n"
-      "version=%s\n"
       "si_signo=%s(%d), si_code=%d, si_addr=%p\n",
-      Dart_VersionString(), strsignal(siginfo->si_signo), siginfo->si_signo,
-      siginfo->si_code, siginfo->si_addr);
+      strsignal(siginfo->si_signo), siginfo->si_signo, siginfo->si_code,
+      siginfo->si_addr);
   Dart_DumpNativeStackTrace(context);
   abort();
 }
diff --git a/runtime/bin/platform_win.cc b/runtime/bin/platform_win.cc
index 5cdf6fc..9b2face 100644
--- a/runtime/bin/platform_win.cc
+++ b/runtime/bin/platform_win.cc
@@ -75,9 +75,8 @@
          EXCEPTION_ILLEGAL_INSTRUCTION)) {
       Log::PrintErr(
           "\n===== CRASH =====\n"
-          "version=%s\n"
           "ExceptionCode=%d, ExceptionFlags=%d, ExceptionAddress=%p\n",
-          Dart_VersionString(), ExceptionInfo->ExceptionRecord->ExceptionCode,
+          ExceptionInfo->ExceptionRecord->ExceptionCode,
           ExceptionInfo->ExceptionRecord->ExceptionFlags,
           ExceptionInfo->ExceptionRecord->ExceptionAddress);
       Dart_DumpNativeStackTrace(ExceptionInfo->ContextRecord);
diff --git a/runtime/bin/process_android.cc b/runtime/bin/process_android.cc
index d379d2d..c26e462 100644
--- a/runtime/bin/process_android.cc
+++ b/runtime/bin/process_android.cc
@@ -46,7 +46,7 @@
  public:
   ProcessInfo(pid_t pid, intptr_t fd) : pid_(pid), fd_(fd) {}
   ~ProcessInfo() {
-    int closed = TEMP_FAILURE_RETRY(close(fd_));
+    int closed = close(fd_);
     if (closed != 0) {
       FATAL("Failed to close process exit code pipe");
     }
@@ -141,7 +141,8 @@
     }
 
     // Start thread that handles process exits when wait returns.
-    int result = Thread::Start(ExitCodeHandlerEntry, 0);
+    int result =
+        Thread::Start("dart:io Process.start", ExitCodeHandlerEntry, 0);
     if (result != 0) {
       FATAL1("Failed to start exit code handler worker thread %d", result);
     }
@@ -337,14 +338,14 @@
     }
 
     // Read the result of executing the child process.
-    VOID_TEMP_FAILURE_RETRY(close(exec_control_[1]));
+    close(exec_control_[1]);
     exec_control_[1] = -1;
     if (Process::ModeIsAttached(mode_)) {
       err = ReadExecResult();
     } else {
       err = ReadDetachedExecResult(&pid);
     }
-    VOID_TEMP_FAILURE_RETRY(close(exec_control_[0]));
+    close(exec_control_[0]);
     exec_control_[0] = -1;
 
     // Return error code if any failures.
@@ -355,7 +356,7 @@
         // GetProcessExitCodes will get a broken pipe error when it
         // tries to write to the writing side of the pipe and it will
         // ignore the error.
-        VOID_TEMP_FAILURE_RETRY(close(*exit_event_));
+        close(*exit_event_);
         *exit_event_ = -1;
       }
       CloseAllPipes();
@@ -366,17 +367,17 @@
       // Connect stdio, stdout and stderr.
       FDUtils::SetNonBlocking(read_in_[0]);
       *in_ = read_in_[0];
-      VOID_TEMP_FAILURE_RETRY(close(read_in_[1]));
+      close(read_in_[1]);
       FDUtils::SetNonBlocking(write_out_[1]);
       *out_ = write_out_[1];
-      VOID_TEMP_FAILURE_RETRY(close(write_out_[0]));
+      close(write_out_[0]);
       FDUtils::SetNonBlocking(read_err_[0]);
       *err_ = read_err_[0];
-      VOID_TEMP_FAILURE_RETRY(close(read_err_[1]));
+      close(read_err_[1]);
     } else {
       // Close all fds.
-      VOID_TEMP_FAILURE_RETRY(close(read_in_[0]));
-      VOID_TEMP_FAILURE_RETRY(close(read_in_[1]));
+      close(read_in_[0]);
+      close(read_in_[1]);
       ASSERT(write_out_[0] == -1);
       ASSERT(write_out_[1] == -1);
       ASSERT(read_err_[0] == -1);
@@ -513,9 +514,9 @@
       ASSERT(read_err_[1] == -1);
       // For a detached process the pipe to connect stdout is only used for
       // signaling when to do the first fork.
-      VOID_TEMP_FAILURE_RETRY(close(read_in_[0]));
+      close(read_in_[0]);
       read_in_[0] = -1;
-      VOID_TEMP_FAILURE_RETRY(close(read_in_[1]));
+      close(read_in_[1]);
       read_in_[1] = -1;
     } else {
       // Don't close any fds if keeping stdio open to the detached process.
@@ -546,6 +547,10 @@
             ReportChildError();
           }
 
+          if (program_environment_ != NULL) {
+            environ = program_environment_;
+          }
+
           // Report the final PID and do the exec.
           ReportPid(getpid());  // getpid cannot fail.
           char realpath[PATH_MAX];
@@ -631,7 +636,7 @@
     }
     for (int fd = 0; fd < max_fds; fd++) {
       if (fd != exec_control_[1]) {
-        VOID_TEMP_FAILURE_RETRY(close(fd));
+        close(fd);
       }
     }
 
@@ -663,24 +668,24 @@
     for (int fd = 0; fd < max_fds; fd++) {
       if ((fd != exec_control_[1]) && (fd != write_out_[0]) &&
           (fd != read_in_[1]) && (fd != read_err_[1])) {
-        VOID_TEMP_FAILURE_RETRY(close(fd));
+        close(fd);
       }
     }
 
     if (TEMP_FAILURE_RETRY(dup2(write_out_[0], STDIN_FILENO)) == -1) {
       ReportChildError();
     }
-    VOID_TEMP_FAILURE_RETRY(close(write_out_[0]));
+    close(write_out_[0]);
 
     if (TEMP_FAILURE_RETRY(dup2(read_in_[1], STDOUT_FILENO)) == -1) {
       ReportChildError();
     }
-    VOID_TEMP_FAILURE_RETRY(close(read_in_[1]));
+    close(read_in_[1]);
 
     if (TEMP_FAILURE_RETRY(dup2(read_err_[1], STDERR_FILENO)) == -1) {
       ReportChildError();
     }
-    VOID_TEMP_FAILURE_RETRY(close(read_err_[1]));
+    close(read_err_[1]);
   }
 
   int CleanupAndReturnError() {
@@ -715,7 +720,7 @@
       FDUtils::WriteToBlocking(exec_control_[1], os_error_message,
                                strlen(os_error_message) + 1);
     }
-    VOID_TEMP_FAILURE_RETRY(close(exec_control_[1]));
+    close(exec_control_[1]);
 
     // We avoid running through registered atexit() handlers because that is
     // unnecessary work.
@@ -747,7 +752,7 @@
   void ClosePipe(int* fds) {
     for (int i = 0; i < 2; i++) {
       if (fds[i] != -1) {
-        VOID_TEMP_FAILURE_RETRY(close(fds[i]));
+        close(fds[i]);
         fds[i] = -1;
       }
     }
@@ -805,9 +810,9 @@
 
 static bool CloseProcessBuffers(struct pollfd fds[3]) {
   int e = errno;
-  VOID_TEMP_FAILURE_RETRY(close(fds[0].fd));
-  VOID_TEMP_FAILURE_RETRY(close(fds[1].fd));
-  VOID_TEMP_FAILURE_RETRY(close(fds[2].fd));
+  close(fds[0].fd);
+  close(fds[1].fd);
+  close(fds[2].fd);
   errno = e;
   return false;
 }
@@ -819,7 +824,7 @@
                    intptr_t exit_event,
                    ProcessResult* result) {
   // Close input to the process right away.
-  VOID_TEMP_FAILURE_RETRY(close(in));
+  close(in);
 
   // There is no return from this function using Dart_PropagateError
   // as memory used by the buffer lists is freed through their
@@ -873,7 +878,7 @@
         }
       }
       if ((fds[i].revents & POLLHUP) != 0) {
-        VOID_TEMP_FAILURE_RETRY(close(fds[i].fd));
+        close(fds[i].fd);
         alive--;
         if (i < alive) {
           fds[i] = fds[alive];
@@ -954,7 +959,7 @@
 };
 
 SignalInfo::~SignalInfo() {
-  VOID_TEMP_FAILURE_RETRY(close(fd_));
+  close(fd_);
 }
 
 static void SignalHandler(int signal) {
@@ -985,8 +990,8 @@
     return -1;
   }
   if (!FDUtils::SetNonBlocking(fds[0])) {
-    VOID_TEMP_FAILURE_RETRY(close(fds[0]));
-    VOID_TEMP_FAILURE_RETRY(close(fds[1]));
+    close(fds[0]);
+    close(fds[1]);
     return -1;
   }
   ThreadSignalBlocker blocker(kSignalsCount, kSignals);
@@ -1010,8 +1015,8 @@
     }
     int status = NO_RETRY_EXPECTED(sigaction(signal, &act, NULL));
     if (status < 0) {
-      VOID_TEMP_FAILURE_RETRY(close(fds[0]));
-      VOID_TEMP_FAILURE_RETRY(close(fds[1]));
+      close(fds[0]);
+      close(fds[1]);
       return -1;
     }
   }
diff --git a/runtime/bin/process_fuchsia.cc b/runtime/bin/process_fuchsia.cc
index 6fd29a0..3680f23 100644
--- a/runtime/bin/process_fuchsia.cc
+++ b/runtime/bin/process_fuchsia.cc
@@ -12,7 +12,6 @@
 #include <lib/fdio/io.h>
 #include <lib/fdio/namespace.h>
 #include <lib/fdio/spawn.h>
-#include <lib/fdio/util.h>
 #include <poll.h>
 #include <pthread.h>
 #include <stdbool.h>
@@ -167,7 +166,8 @@
     }
 
     // Start thread that handles process exits when wait returns.
-    intptr_t result = Thread::Start(ExitCodeHandlerEntry, 0);
+    intptr_t result =
+        Thread::Start("dart:io Process.start", ExitCodeHandlerEntry, 0);
     if (result != 0) {
       FATAL1("Failed to start exit code handler worker thread %ld", result);
     }
@@ -580,7 +580,7 @@
         TEMP_FAILURE_RETRY(openat(ns.fd(), ns.path(), O_RDONLY));
     zx_handle_t vmo = ZX_HANDLE_INVALID;
     zx_status_t status = fdio_get_vmo_clone(pathfd, &vmo);
-    VOID_TEMP_FAILURE_RETRY(close(pathfd));
+    close(pathfd);
     if (status != ZX_OK) {
       close(exit_pipe_fds[0]);
       close(exit_pipe_fds[1]);
@@ -589,10 +589,24 @@
       return status;
     }
 
+    // After reading the binary into a VMO, we need to mark it as executable,
+    // since the VMO returned by fdio_get_vmo_clone should be read-only.
+    status = zx_vmo_replace_as_executable(vmo, ZX_HANDLE_INVALID, &vmo);
+    if (status != ZX_OK) {
+      close(exit_pipe_fds[0]);
+      close(exit_pipe_fds[1]);
+      *os_error_message_ = DartUtils::ScopedCopyCString(
+          "Failed to mark binary as executable for process start.");
+      return status;
+    }
+
     fdio_spawn_action_t* actions;
     const intptr_t actions_count = BuildSpawnActions(
         namespc_->namespc()->fdio_ns(), &actions);
     if (actions_count < 0) {
+      zx_handle_close(vmo);
+      close(exit_pipe_fds[0]);
+      close(exit_pipe_fds[1]);
       *os_error_message_ = DartUtils::ScopedCopyCString(
           "Failed to build spawn actions array.");
       return ZX_ERR_IO;
@@ -605,10 +619,9 @@
     zx_handle_t process = ZX_HANDLE_INVALID;
     char err_msg[FDIO_SPAWN_ERR_MSG_MAX_LENGTH];
     uint32_t flags = FDIO_SPAWN_CLONE_JOB | FDIO_SPAWN_CLONE_LDSVC;
-    status =
-        fdio_spawn_vmo(ZX_HANDLE_INVALID, flags, vmo, program_arguments_,
-                       program_environment_, actions_count, actions, &process,
-                       err_msg);
+    status = fdio_spawn_vmo(ZX_HANDLE_INVALID, flags, vmo, program_arguments_,
+                            program_environment_, actions_count, actions,
+                            &process, err_msg);
     // Handles are consumed by fdio_spawn_vmo even if it fails.
     delete[] actions;
     if (status != ZX_OK) {
@@ -664,12 +677,10 @@
 
   zx_status_t AddPipe(int target_fd, int* local_fd,
                       fdio_spawn_action_t* action) {
-    zx_status_t status = fdio_pipe_half(&action->h.handle, &action->h.id);
-    if (status < 0)
-      return status;
-    *local_fd = status;
+    zx_status_t status = fdio_pipe_half2(local_fd, &action->h.handle);
+    if (status != ZX_OK) return status;
     action->action = FDIO_SPAWN_ACTION_ADD_HANDLE;
-    action->h.id = PA_HND(PA_HND_TYPE(action->h.id), target_fd);
+    action->h.id = PA_HND(PA_HND_TYPE(PA_FD), target_fd);
     return ZX_OK;
   }
 
@@ -677,11 +688,12 @@
   intptr_t BuildSpawnActions(fdio_ns_t* ns, fdio_spawn_action_t** actions_out) {
     const intptr_t fixed_actions_cnt = 4;
     intptr_t ns_cnt = 0;
+    zx_status_t status;
 
     // First, figure out how many namespace actions are needed.
     fdio_flat_namespace_t* flat_ns = nullptr;
     if (ns != nullptr) {
-      zx_status_t status = fdio_ns_export(ns, &flat_ns);
+      status = fdio_ns_export(ns, &flat_ns);
       if (status != ZX_OK) {
         LOG_ERR("ProcessStarter: BuildSpawnActions: fdio_ns_export: %s\n",
                 zx_status_get_string(status));
@@ -696,9 +708,33 @@
 
     // Fill in the entries for passing stdin/out/err handles, and the program
     // name.
-    AddPipe(0, &write_out_, &actions[0]);
-    AddPipe(1, &read_in_, &actions[1]);
-    AddPipe(2, &read_err_, &actions[2]);
+    status = AddPipe(0, &write_out_, &actions[0]);
+    if (status != ZX_OK) {
+      LOG_ERR("ProcessStarter: BuildSpawnActions: stdout AddPipe failed: %s\n",
+              zx_status_get_string(status));
+      if (flat_ns != nullptr) {
+        fdio_ns_free_flat_ns(flat_ns);
+      }
+      return -1;
+    }
+    status = AddPipe(1, &read_in_, &actions[1]);
+    if (status != ZX_OK) {
+      LOG_ERR("ProcessStarter: BuildSpawnActions: stdin AddPipe failed: %s\n",
+              zx_status_get_string(status));
+      if (flat_ns != nullptr) {
+        fdio_ns_free_flat_ns(flat_ns);
+      }
+      return -1;
+    }
+    status = AddPipe(2, &read_err_, &actions[2]);
+    if (status != ZX_OK) {
+      LOG_ERR("ProcessStarter: BuildSpawnActions: stderr AddPipe failed: %s\n",
+              zx_status_get_string(status));
+      if (flat_ns != nullptr) {
+        fdio_ns_free_flat_ns(flat_ns);
+      }
+      return -1;
+    }
     actions[3] = {
       .action = FDIO_SPAWN_ACTION_SET_NAME,
       .name.data = program_arguments_[0],
diff --git a/runtime/bin/process_linux.cc b/runtime/bin/process_linux.cc
index 825bc1d..93c7f6c 100644
--- a/runtime/bin/process_linux.cc
+++ b/runtime/bin/process_linux.cc
@@ -46,7 +46,7 @@
  public:
   ProcessInfo(pid_t pid, intptr_t fd) : pid_(pid), fd_(fd) {}
   ~ProcessInfo() {
-    int closed = TEMP_FAILURE_RETRY(close(fd_));
+    int closed = close(fd_);
     if (closed != 0) {
       FATAL("Failed to close process exit code pipe");
     }
@@ -141,7 +141,8 @@
     }
 
     // Start thread that handles process exits when wait returns.
-    int result = Thread::Start(ExitCodeHandlerEntry, 0);
+    int result =
+        Thread::Start("dart:io Process.start", ExitCodeHandlerEntry, 0);
     if (result != 0) {
       FATAL1("Failed to start exit code handler worker thread %d", result);
     }
@@ -337,14 +338,14 @@
     }
 
     // Read the result of executing the child process.
-    VOID_TEMP_FAILURE_RETRY(close(exec_control_[1]));
+    close(exec_control_[1]);
     exec_control_[1] = -1;
     if (Process::ModeIsAttached(mode_)) {
       err = ReadExecResult();
     } else {
       err = ReadDetachedExecResult(&pid);
     }
-    VOID_TEMP_FAILURE_RETRY(close(exec_control_[0]));
+    close(exec_control_[0]);
     exec_control_[0] = -1;
 
     // Return error code if any failures.
@@ -355,7 +356,7 @@
         // GetProcessExitCodes will get a broken pipe error when it
         // tries to write to the writing side of the pipe and it will
         // ignore the error.
-        VOID_TEMP_FAILURE_RETRY(close(*exit_event_));
+        close(*exit_event_);
         *exit_event_ = -1;
       }
       CloseAllPipes();
@@ -366,17 +367,17 @@
       // Connect stdio, stdout and stderr.
       FDUtils::SetNonBlocking(read_in_[0]);
       *in_ = read_in_[0];
-      VOID_TEMP_FAILURE_RETRY(close(read_in_[1]));
+      close(read_in_[1]);
       FDUtils::SetNonBlocking(write_out_[1]);
       *out_ = write_out_[1];
-      VOID_TEMP_FAILURE_RETRY(close(write_out_[0]));
+      close(write_out_[0]);
       FDUtils::SetNonBlocking(read_err_[0]);
       *err_ = read_err_[0];
-      VOID_TEMP_FAILURE_RETRY(close(read_err_[1]));
+      close(read_err_[1]);
     } else {
       // Close all fds.
-      VOID_TEMP_FAILURE_RETRY(close(read_in_[0]));
-      VOID_TEMP_FAILURE_RETRY(close(read_in_[1]));
+      close(read_in_[0]);
+      close(read_in_[1]);
       ASSERT(write_out_[0] == -1);
       ASSERT(write_out_[1] == -1);
       ASSERT(read_err_[0] == -1);
@@ -513,9 +514,9 @@
       ASSERT(read_err_[1] == -1);
       // For a detached process the pipe to connect stdout is only used for
       // signaling when to do the first fork.
-      VOID_TEMP_FAILURE_RETRY(close(read_in_[0]));
+      close(read_in_[0]);
       read_in_[0] = -1;
-      VOID_TEMP_FAILURE_RETRY(close(read_in_[1]));
+      close(read_in_[1]);
       read_in_[1] = -1;
     } else {
       // Don't close any fds if keeping stdio open to the detached process.
@@ -545,6 +546,9 @@
               !Directory::SetCurrent(namespc_, working_directory_)) {
             ReportChildError();
           }
+          if (program_environment_ != NULL) {
+            environ = program_environment_;
+          }
 
           // Report the final PID and do the exec.
           ReportPid(getpid());  // getpid cannot fail.
@@ -631,7 +635,7 @@
     }
     for (int fd = 0; fd < max_fds; fd++) {
       if (fd != exec_control_[1]) {
-        VOID_TEMP_FAILURE_RETRY(close(fd));
+        close(fd);
       }
     }
 
@@ -663,24 +667,24 @@
     for (int fd = 0; fd < max_fds; fd++) {
       if ((fd != exec_control_[1]) && (fd != write_out_[0]) &&
           (fd != read_in_[1]) && (fd != read_err_[1])) {
-        VOID_TEMP_FAILURE_RETRY(close(fd));
+        close(fd);
       }
     }
 
     if (TEMP_FAILURE_RETRY(dup2(write_out_[0], STDIN_FILENO)) == -1) {
       ReportChildError();
     }
-    VOID_TEMP_FAILURE_RETRY(close(write_out_[0]));
+    close(write_out_[0]);
 
     if (TEMP_FAILURE_RETRY(dup2(read_in_[1], STDOUT_FILENO)) == -1) {
       ReportChildError();
     }
-    VOID_TEMP_FAILURE_RETRY(close(read_in_[1]));
+    close(read_in_[1]);
 
     if (TEMP_FAILURE_RETRY(dup2(read_err_[1], STDERR_FILENO)) == -1) {
       ReportChildError();
     }
-    VOID_TEMP_FAILURE_RETRY(close(read_err_[1]));
+    close(read_err_[1]);
   }
 
   int CleanupAndReturnError() {
@@ -715,7 +719,7 @@
       FDUtils::WriteToBlocking(exec_control_[1], os_error_message,
                                strlen(os_error_message) + 1);
     }
-    VOID_TEMP_FAILURE_RETRY(close(exec_control_[1]));
+    close(exec_control_[1]);
 
     // We avoid running through registered atexit() handlers because that is
     // unnecessary work.
@@ -747,7 +751,7 @@
   void ClosePipe(int* fds) {
     for (int i = 0; i < 2; i++) {
       if (fds[i] != -1) {
-        VOID_TEMP_FAILURE_RETRY(close(fds[i]));
+        close(fds[i]);
         fds[i] = -1;
       }
     }
@@ -805,9 +809,9 @@
 
 static bool CloseProcessBuffers(struct pollfd fds[3]) {
   int e = errno;
-  VOID_TEMP_FAILURE_RETRY(close(fds[0].fd));
-  VOID_TEMP_FAILURE_RETRY(close(fds[1].fd));
-  VOID_TEMP_FAILURE_RETRY(close(fds[2].fd));
+  close(fds[0].fd);
+  close(fds[1].fd);
+  close(fds[2].fd);
   errno = e;
   return false;
 }
@@ -819,7 +823,7 @@
                    intptr_t exit_event,
                    ProcessResult* result) {
   // Close input to the process right away.
-  VOID_TEMP_FAILURE_RETRY(close(in));
+  close(in);
 
   // There is no return from this function using Dart_PropagateError
   // as memory used by the buffer lists is freed through their
@@ -873,7 +877,7 @@
         }
       }
       if ((fds[i].revents & POLLHUP) != 0) {
-        VOID_TEMP_FAILURE_RETRY(close(fds[i].fd));
+        close(fds[i].fd);
         alive--;
         if (i < alive) {
           fds[i] = fds[alive];
@@ -954,7 +958,7 @@
 };
 
 SignalInfo::~SignalInfo() {
-  VOID_TEMP_FAILURE_RETRY(close(fd_));
+  close(fd_);
 }
 
 static void SignalHandler(int signal) {
@@ -1006,8 +1010,8 @@
     int status = sigaction(signal, &act, NULL);
     if (status < 0) {
       int err = errno;
-      VOID_TEMP_FAILURE_RETRY(close(fds[0]));
-      VOID_TEMP_FAILURE_RETRY(close(fds[1]));
+      close(fds[0]);
+      close(fds[1]);
       errno = err;
       return -1;
     }
diff --git a/runtime/bin/process_macos.cc b/runtime/bin/process_macos.cc
index d83443a..d78db22 100644
--- a/runtime/bin/process_macos.cc
+++ b/runtime/bin/process_macos.cc
@@ -45,7 +45,7 @@
  public:
   ProcessInfo(pid_t pid, intptr_t fd) : pid_(pid), fd_(fd) {}
   ~ProcessInfo() {
-    int closed = TEMP_FAILURE_RETRY(close(fd_));
+    int closed = close(fd_);
     if (closed != 0) {
       FATAL("Failed to close process exit code pipe");
     }
@@ -140,7 +140,8 @@
     }
 
     // Start thread that handles process exits when wait returns.
-    int result = Thread::Start(ExitCodeHandlerEntry, 0);
+    int result =
+        Thread::Start("dart:io Process.start", ExitCodeHandlerEntry, 0);
     if (result != 0) {
       FATAL1("Failed to start exit code handler worker thread %d", result);
     }
@@ -331,14 +332,14 @@
     }
 
     // Read the result of executing the child process.
-    VOID_TEMP_FAILURE_RETRY(close(exec_control_[1]));
+    close(exec_control_[1]);
     exec_control_[1] = -1;
     if (Process::ModeIsAttached(mode_)) {
       err = ReadExecResult();
     } else {
       err = ReadDetachedExecResult(&pid);
     }
-    VOID_TEMP_FAILURE_RETRY(close(exec_control_[0]));
+    close(exec_control_[0]);
     exec_control_[0] = -1;
 
     // Return error code if any failures.
@@ -349,7 +350,7 @@
         // GetProcessExitCodes will get a broken pipe error when it
         // tries to write to the writing side of the pipe and it will
         // ignore the error.
-        VOID_TEMP_FAILURE_RETRY(close(*exit_event_));
+        close(*exit_event_);
         *exit_event_ = -1;
       }
       CloseAllPipes();
@@ -360,17 +361,17 @@
       // Connect stdio, stdout and stderr.
       FDUtils::SetNonBlocking(read_in_[0]);
       *in_ = read_in_[0];
-      VOID_TEMP_FAILURE_RETRY(close(read_in_[1]));
+      close(read_in_[1]);
       FDUtils::SetNonBlocking(write_out_[1]);
       *out_ = write_out_[1];
-      VOID_TEMP_FAILURE_RETRY(close(write_out_[0]));
+      close(write_out_[0]);
       FDUtils::SetNonBlocking(read_err_[0]);
       *err_ = read_err_[0];
-      VOID_TEMP_FAILURE_RETRY(close(read_err_[1]));
+      close(read_err_[1]);
     } else {
       // Close all fds.
-      VOID_TEMP_FAILURE_RETRY(close(read_in_[0]));
-      VOID_TEMP_FAILURE_RETRY(close(read_in_[1]));
+      close(read_in_[0]);
+      close(read_in_[1]);
       ASSERT(write_out_[0] == -1);
       ASSERT(write_out_[1] == -1);
       ASSERT(read_err_[0] == -1);
@@ -482,9 +483,9 @@
       ASSERT(read_err_[1] == -1);
       // For a detached process the pipe to connect stdout is only used for
       // signaling when to do the first fork.
-      VOID_TEMP_FAILURE_RETRY(close(read_in_[0]));
+      close(read_in_[0]);
       read_in_[0] = -1;
-      VOID_TEMP_FAILURE_RETRY(close(read_in_[1]));
+      close(read_in_[1]);
       read_in_[1] = -1;
     } else {
       // Don't close any fds if keeping stdio open to the detached process.
@@ -514,6 +515,14 @@
               (TEMP_FAILURE_RETRY(chdir(working_directory_)) == -1)) {
             ReportChildError();
           }
+#if !HOST_OS_IOS
+          if (program_environment_ != NULL) {
+            // On MacOS you have to do a bit of magic to get to the
+            // environment strings.
+            char*** environ = _NSGetEnviron();
+            *environ = program_environment_;
+          }
+#endif
 
           // Report the final PID and do the exec.
           ReportPid(getpid());  // getpid cannot fail.
@@ -596,7 +605,7 @@
     }
     for (int fd = 0; fd < max_fds; fd++) {
       if (fd != exec_control_[1]) {
-        VOID_TEMP_FAILURE_RETRY(close(fd));
+        close(fd);
       }
     }
 
@@ -628,24 +637,24 @@
     for (int fd = 0; fd < max_fds; fd++) {
       if ((fd != exec_control_[1]) && (fd != write_out_[0]) &&
           (fd != read_in_[1]) && (fd != read_err_[1])) {
-        VOID_TEMP_FAILURE_RETRY(close(fd));
+        close(fd);
       }
     }
 
     if (TEMP_FAILURE_RETRY(dup2(write_out_[0], STDIN_FILENO)) == -1) {
       ReportChildError();
     }
-    VOID_TEMP_FAILURE_RETRY(close(write_out_[0]));
+    close(write_out_[0]);
 
     if (TEMP_FAILURE_RETRY(dup2(read_in_[1], STDOUT_FILENO)) == -1) {
       ReportChildError();
     }
-    VOID_TEMP_FAILURE_RETRY(close(read_in_[1]));
+    close(read_in_[1]);
 
     if (TEMP_FAILURE_RETRY(dup2(read_err_[1], STDERR_FILENO)) == -1) {
       ReportChildError();
     }
-    VOID_TEMP_FAILURE_RETRY(close(read_err_[1]));
+    close(read_err_[1]);
   }
 
   int CleanupAndReturnError() {
@@ -680,7 +689,7 @@
       FDUtils::WriteToBlocking(exec_control_[1], os_error_message,
                                strlen(os_error_message) + 1);
     }
-    VOID_TEMP_FAILURE_RETRY(close(exec_control_[1]));
+    close(exec_control_[1]);
     exit(1);
   }
 
@@ -709,7 +718,7 @@
   void ClosePipe(int* fds) {
     for (int i = 0; i < 2; i++) {
       if (fds[i] != -1) {
-        VOID_TEMP_FAILURE_RETRY(close(fds[i]));
+        close(fds[i]);
         fds[i] = -1;
       }
     }
@@ -766,9 +775,9 @@
 
 static bool CloseProcessBuffers(struct pollfd fds[3]) {
   int e = errno;
-  VOID_TEMP_FAILURE_RETRY(close(fds[0].fd));
-  VOID_TEMP_FAILURE_RETRY(close(fds[1].fd));
-  VOID_TEMP_FAILURE_RETRY(close(fds[2].fd));
+  close(fds[0].fd);
+  close(fds[1].fd);
+  close(fds[2].fd);
   errno = e;
   return false;
 }
@@ -780,7 +789,7 @@
                    intptr_t exit_event,
                    ProcessResult* result) {
   // Close input to the process right away.
-  VOID_TEMP_FAILURE_RETRY(close(in));
+  close(in);
 
   // There is no return from this function using Dart_PropagateError
   // as memory used by the buffer lists is freed through their
@@ -840,7 +849,7 @@
       }
       if (((fds[i].revents & POLLHUP) != 0) ||
           (((fds[i].revents & POLLIN) != 0) && (avail == 0))) {
-        VOID_TEMP_FAILURE_RETRY(close(fds[i].fd));
+        close(fds[i].fd);
         alive--;
         if (i < alive) {
           fds[i] = fds[alive];
@@ -973,7 +982,7 @@
 };
 
 SignalInfo::~SignalInfo() {
-  VOID_TEMP_FAILURE_RETRY(close(fd_));
+  close(fd_);
 }
 
 static void SignalHandler(int signal) {
@@ -1009,8 +1018,8 @@
   }
   if (!FDUtils::SetCloseOnExec(fds[0]) || !FDUtils::SetCloseOnExec(fds[1]) ||
       !FDUtils::SetNonBlocking(fds[0])) {
-    VOID_TEMP_FAILURE_RETRY(close(fds[0]));
-    VOID_TEMP_FAILURE_RETRY(close(fds[1]));
+    close(fds[0]);
+    close(fds[1]);
     return -1;
   }
   ThreadSignalBlocker blocker(kSignalsCount, kSignals);
@@ -1034,8 +1043,8 @@
     }
     intptr_t status = NO_RETRY_EXPECTED(sigaction(signal, &act, NULL));
     if (status < 0) {
-      VOID_TEMP_FAILURE_RETRY(close(fds[0]));
-      VOID_TEMP_FAILURE_RETRY(close(fds[1]));
+      close(fds[0]);
+      close(fds[1]);
       return -1;
     }
   }
diff --git a/runtime/bin/process_patch.dart b/runtime/bin/process_patch.dart
index 373eb7d..1e5ae1e 100644
--- a/runtime/bin/process_patch.dart
+++ b/runtime/bin/process_patch.dart
@@ -129,7 +129,7 @@
       native "Process_ClearSignalHandler";
 }
 
-@pragma("vm:entry-point")
+@pragma("vm:entry-point", "call")
 Function _getWatchSignalInternal() => _ProcessUtils._watchSignalInternal;
 
 @patch
diff --git a/runtime/bin/run_vm_tests.cc b/runtime/bin/run_vm_tests.cc
index f024c4d..aa36a87 100644
--- a/runtime/bin/run_vm_tests.cc
+++ b/runtime/bin/run_vm_tests.cc
@@ -148,13 +148,22 @@
         &isolate_snapshot_data, &isolate_snapshot_instructions);
     isolate_data = new bin::IsolateData(script_uri, package_root,
                                         packages_config, app_snapshot);
-    isolate = Dart_CreateIsolate(
-        DART_KERNEL_ISOLATE_NAME, main, isolate_snapshot_data,
-        isolate_snapshot_instructions, NULL, NULL, flags, isolate_data, error);
+    isolate =
+        Dart_CreateIsolate(DART_KERNEL_ISOLATE_NAME, DART_KERNEL_ISOLATE_NAME,
+                           isolate_snapshot_data, isolate_snapshot_instructions,
+                           NULL, NULL, flags, isolate_data, error);
     if (*error != NULL) {
       free(*error);
       *error = NULL;
     }
+    // If a test does not actually require the kernel isolate the main thead can
+    // start calling Dart::Cleanup() while the kernel isolate is booting up.
+    // This can cause the isolate to be killed early which will return `nullptr`
+    // here.
+    if (isolate == nullptr) {
+      delete isolate_data;
+      return NULL;
+    }
   }
   if (isolate == NULL) {
     delete isolate_data;
diff --git a/runtime/bin/socket_base_android.cc b/runtime/bin/socket_base_android.cc
index 83f400b..084ab2f 100644
--- a/runtime/bin/socket_base_android.cc
+++ b/runtime/bin/socket_base_android.cc
@@ -260,7 +260,7 @@
 
 void SocketBase::Close(intptr_t fd) {
   ASSERT(fd >= 0);
-  VOID_TEMP_FAILURE_RETRY(close(fd));
+  close(fd);
 }
 
 bool SocketBase::GetNoDelay(intptr_t fd, bool* enabled) {
diff --git a/runtime/bin/socket_base_linux.cc b/runtime/bin/socket_base_linux.cc
index 2e6b461..87aedbd 100644
--- a/runtime/bin/socket_base_linux.cc
+++ b/runtime/bin/socket_base_linux.cc
@@ -301,7 +301,7 @@
 
 void SocketBase::Close(intptr_t fd) {
   ASSERT(fd >= 0);
-  VOID_TEMP_FAILURE_RETRY(close(fd));
+  close(fd);
 }
 
 bool SocketBase::GetNoDelay(intptr_t fd, bool* enabled) {
diff --git a/runtime/bin/socket_base_macos.cc b/runtime/bin/socket_base_macos.cc
index 4a53bac..a448911 100644
--- a/runtime/bin/socket_base_macos.cc
+++ b/runtime/bin/socket_base_macos.cc
@@ -291,7 +291,7 @@
 
 void SocketBase::Close(intptr_t fd) {
   ASSERT(fd >= 0);
-  VOID_TEMP_FAILURE_RETRY(close(fd));
+  close(fd);
 }
 
 bool SocketBase::GetNoDelay(intptr_t fd, bool* enabled) {
diff --git a/runtime/bin/socket_fuchsia.cc b/runtime/bin/socket_fuchsia.cc
index d45119d..4af64a6 100644
--- a/runtime/bin/socket_fuchsia.cc
+++ b/runtime/bin/socket_fuchsia.cc
@@ -11,6 +11,7 @@
 
 #include "bin/eventhandler.h"
 #include "bin/fdutils.h"
+#include "bin/log.h"
 #include "platform/signal_blocker.h"
 
 // #define SOCKET_LOG_INFO 1
@@ -19,6 +20,7 @@
 // define SOCKET_LOG_ERROR to get log messages only for errors.
 // define SOCKET_LOG_INFO to get log messages for both information and errors.
 #if defined(SOCKET_LOG_INFO) || defined(SOCKET_LOG_ERROR)
+
 #define LOG_ERR(msg, ...)                                                      \
   {                                                                            \
     int err = errno;                                                           \
@@ -204,7 +206,7 @@
   intptr_t socket;
   struct sockaddr clientaddr;
   socklen_t addrlen = sizeof(clientaddr);
-  LOG_INFO("ServerSocket::Accept: calling accept(%ld)\n", listen_fd);
+  LOG_INFO("ServerSocket::Accept: calling accept(%ld)\n", fd);
   socket = listen_handle->Accept(&clientaddr, &addrlen);
   if (socket == -1) {
     if (IsTemporaryAcceptError(errno)) {
@@ -214,12 +216,11 @@
       ASSERT(kTemporaryFailure != -1);
       socket = kTemporaryFailure;
     } else {
-      LOG_ERR("ServerSocket::Accept: accept(%ld) failed\n", listen_fd);
+      LOG_ERR("ServerSocket::Accept: accept(%ld) failed\n", fd);
     }
   } else {
     IOHandle* io_handle = new IOHandle(socket);
-    LOG_INFO("ServerSocket::Accept: accept(%ld) -> socket %ld\n", listen_fd,
-             socket);
+    LOG_INFO("ServerSocket::Accept: accept(%ld) -> socket %ld\n", fd, socket);
     if (!FDUtils::SetCloseOnExec(socket)) {
       LOG_ERR("FDUtils::SetCloseOnExec(%ld) failed\n", socket);
       FDUtils::SaveErrorAndClose(socket);
diff --git a/runtime/bin/socket_patch.dart b/runtime/bin/socket_patch.dart
index fb7b69d..870179c 100644
--- a/runtime/bin/socket_patch.dart
+++ b/runtime/bin/socket_patch.dart
@@ -1971,7 +1971,7 @@
   void setRawOption(RawSocketOption option) => _socket.setRawOption(option);
 }
 
-@pragma("vm:entry-point")
+@pragma("vm:entry-point", "call")
 Datagram _makeDatagram(
     List<int> data, String address, List<int> in_addr, int port) {
   return new Datagram(data, new _InternetAddress(address, null, in_addr), port);
diff --git a/runtime/bin/thread.h b/runtime/bin/thread.h
index 8e31cb6..09c9743 100644
--- a/runtime/bin/thread.h
+++ b/runtime/bin/thread.h
@@ -43,7 +43,9 @@
   // Start a thread running the specified function. Returns 0 if the
   // thread started successfuly and a system specific error code if
   // the thread failed to start.
-  static int Start(ThreadStartFunction function, uword parameters);
+  static int Start(const char* name,
+                   ThreadStartFunction function,
+                   uword parameters);
 
   static ThreadLocalKey CreateThreadLocal();
   static void DeleteThreadLocal(ThreadLocalKey key);
diff --git a/runtime/bin/thread_android.cc b/runtime/bin/thread_android.cc
index 4970240..2bef99c 100644
--- a/runtime/bin/thread_android.cc
+++ b/runtime/bin/thread_android.cc
@@ -58,13 +58,17 @@
 
 class ThreadStartData {
  public:
-  ThreadStartData(Thread::ThreadStartFunction function, uword parameter)
-      : function_(function), parameter_(parameter) {}
+  ThreadStartData(const char* name,
+                  Thread::ThreadStartFunction function,
+                  uword parameter)
+      : name_(name), function_(function), parameter_(parameter) {}
 
+  const char* name() const { return name_; }
   Thread::ThreadStartFunction function() const { return function_; }
   uword parameter() const { return parameter_; }
 
  private:
+  const char* name_;
   Thread::ThreadStartFunction function_;
   uword parameter_;
 
@@ -77,17 +81,23 @@
 static void* ThreadStart(void* data_ptr) {
   ThreadStartData* data = reinterpret_cast<ThreadStartData*>(data_ptr);
 
+  const char* name = data->name();
   Thread::ThreadStartFunction function = data->function();
   uword parameter = data->parameter();
   delete data;
 
+  // Set the thread name.
+  pthread_setname_np(pthread_self(), name);
+
   // Call the supplied thread start function handing it its parameters.
   function(parameter);
 
   return NULL;
 }
 
-int Thread::Start(ThreadStartFunction function, uword parameter) {
+int Thread::Start(const char* name,
+                  ThreadStartFunction function,
+                  uword parameter) {
   pthread_attr_t attr;
   int result = pthread_attr_init(&attr);
   RETURN_ON_PTHREAD_FAILURE(result);
@@ -98,7 +108,7 @@
   result = pthread_attr_setstacksize(&attr, Thread::GetMaxStackSize());
   RETURN_ON_PTHREAD_FAILURE(result);
 
-  ThreadStartData* data = new ThreadStartData(function, parameter);
+  ThreadStartData* data = new ThreadStartData(name, function, parameter);
 
   pthread_t tid;
   result = pthread_create(&tid, &attr, ThreadStart, data);
diff --git a/runtime/bin/thread_fuchsia.cc b/runtime/bin/thread_fuchsia.cc
index 793e9c1..d71a1df 100644
--- a/runtime/bin/thread_fuchsia.cc
+++ b/runtime/bin/thread_fuchsia.cc
@@ -8,8 +8,12 @@
 #include "bin/thread.h"
 #include "bin/thread_fuchsia.h"
 
-#include <errno.h>         // NOLINT
-#include <sys/time.h>      // NOLINT
+#include <errno.h>     // NOLINT
+#include <sys/time.h>  // NOLINT
+#include <zircon/status.h>
+#include <zircon/syscalls.h>
+#include <zircon/threads.h>
+#include <zircon/types.h>
 
 #include "platform/assert.h"
 #include "platform/utils.h"
@@ -57,13 +61,17 @@
 
 class ThreadStartData {
  public:
-  ThreadStartData(Thread::ThreadStartFunction function, uword parameter)
-      : function_(function), parameter_(parameter) {}
+  ThreadStartData(const char* name,
+                  Thread::ThreadStartFunction function,
+                  uword parameter)
+      : name_(name), function_(function), parameter_(parameter) {}
 
+  const char* name() const { return name_; }
   Thread::ThreadStartFunction function() const { return function_; }
   uword parameter() const { return parameter_; }
 
  private:
+  const char* name_;
   Thread::ThreadStartFunction function_;
   uword parameter_;
 
@@ -76,17 +84,24 @@
 static void* ThreadStart(void* data_ptr) {
   ThreadStartData* data = reinterpret_cast<ThreadStartData*>(data_ptr);
 
+  const char* name = data->name();
   Thread::ThreadStartFunction function = data->function();
   uword parameter = data->parameter();
   delete data;
 
+  // Set the thread name.
+  zx_handle_t thread_handle = thrd_get_zx_handle(thrd_current());
+  zx_object_set_property(thread_handle, ZX_PROP_NAME, name, strlen(name) + 1);
+
   // Call the supplied thread start function handing it its parameters.
   function(parameter);
 
   return NULL;
 }
 
-int Thread::Start(ThreadStartFunction function, uword parameter) {
+int Thread::Start(const char* name,
+                  ThreadStartFunction function,
+                  uword parameter) {
   pthread_attr_t attr;
   int result = pthread_attr_init(&attr);
   RETURN_ON_PTHREAD_FAILURE(result);
@@ -97,7 +112,7 @@
   result = pthread_attr_setstacksize(&attr, Thread::GetMaxStackSize());
   RETURN_ON_PTHREAD_FAILURE(result);
 
-  ThreadStartData* data = new ThreadStartData(function, parameter);
+  ThreadStartData* data = new ThreadStartData(name, function, parameter);
 
   pthread_t tid;
   result = pthread_create(&tid, &attr, ThreadStart, data);
diff --git a/runtime/bin/thread_linux.cc b/runtime/bin/thread_linux.cc
index 1140ed4..2b3a7e6 100644
--- a/runtime/bin/thread_linux.cc
+++ b/runtime/bin/thread_linux.cc
@@ -58,13 +58,17 @@
 
 class ThreadStartData {
  public:
-  ThreadStartData(Thread::ThreadStartFunction function, uword parameter)
-      : function_(function), parameter_(parameter) {}
+  ThreadStartData(const char* name,
+                  Thread::ThreadStartFunction function,
+                  uword parameter)
+      : name_(name), function_(function), parameter_(parameter) {}
 
+  const char* name() const { return name_; }
   Thread::ThreadStartFunction function() const { return function_; }
   uword parameter() const { return parameter_; }
 
  private:
+  const char* name_;
   Thread::ThreadStartFunction function_;
   uword parameter_;
 
@@ -77,17 +81,23 @@
 static void* ThreadStart(void* data_ptr) {
   ThreadStartData* data = reinterpret_cast<ThreadStartData*>(data_ptr);
 
+  const char* name = data->name();
   Thread::ThreadStartFunction function = data->function();
   uword parameter = data->parameter();
   delete data;
 
+  // Set the thread name.
+  pthread_setname_np(pthread_self(), name);
+
   // Call the supplied thread start function handing it its parameters.
   function(parameter);
 
   return NULL;
 }
 
-int Thread::Start(ThreadStartFunction function, uword parameter) {
+int Thread::Start(const char* name,
+                  ThreadStartFunction function,
+                  uword parameter) {
   pthread_attr_t attr;
   int result = pthread_attr_init(&attr);
   RETURN_ON_PTHREAD_FAILURE(result);
@@ -98,7 +108,7 @@
   result = pthread_attr_setstacksize(&attr, Thread::GetMaxStackSize());
   RETURN_ON_PTHREAD_FAILURE(result);
 
-  ThreadStartData* data = new ThreadStartData(function, parameter);
+  ThreadStartData* data = new ThreadStartData(name, function, parameter);
 
   pthread_t tid;
   result = pthread_create(&tid, &attr, ThreadStart, data);
diff --git a/runtime/bin/thread_macos.cc b/runtime/bin/thread_macos.cc
index 6618ba8..af636f0 100644
--- a/runtime/bin/thread_macos.cc
+++ b/runtime/bin/thread_macos.cc
@@ -52,13 +52,17 @@
 
 class ThreadStartData {
  public:
-  ThreadStartData(Thread::ThreadStartFunction function, uword parameter)
-      : function_(function), parameter_(parameter) {}
+  ThreadStartData(const char* name,
+                  Thread::ThreadStartFunction function,
+                  uword parameter)
+      : name_(name), function_(function), parameter_(parameter) {}
 
+  const char* name() const { return name_; }
   Thread::ThreadStartFunction function() const { return function_; }
   uword parameter() const { return parameter_; }
 
  private:
+  const char* name_;
   Thread::ThreadStartFunction function_;
   uword parameter_;
 
@@ -71,17 +75,23 @@
 static void* ThreadStart(void* data_ptr) {
   ThreadStartData* data = reinterpret_cast<ThreadStartData*>(data_ptr);
 
+  const char* name = data->name();
   Thread::ThreadStartFunction function = data->function();
   uword parameter = data->parameter();
   delete data;
 
+  // Set the thread name.
+  pthread_setname_np(name);
+
   // Call the supplied thread start function handing it its parameters.
   function(parameter);
 
   return NULL;
 }
 
-int Thread::Start(ThreadStartFunction function, uword parameter) {
+int Thread::Start(const char* name,
+                  ThreadStartFunction function,
+                  uword parameter) {
   pthread_attr_t attr;
   int result = pthread_attr_init(&attr);
   RETURN_ON_PTHREAD_FAILURE(result);
@@ -92,7 +102,7 @@
   result = pthread_attr_setstacksize(&attr, Thread::GetMaxStackSize());
   RETURN_ON_PTHREAD_FAILURE(result);
 
-  ThreadStartData* data = new ThreadStartData(function, parameter);
+  ThreadStartData* data = new ThreadStartData(name, function, parameter);
 
   pthread_t tid;
   result = pthread_create(&tid, &attr, ThreadStart, data);
diff --git a/runtime/bin/thread_win.cc b/runtime/bin/thread_win.cc
index cba3652..ef6b632 100644
--- a/runtime/bin/thread_win.cc
+++ b/runtime/bin/thread_win.cc
@@ -17,13 +17,17 @@
 
 class ThreadStartData {
  public:
-  ThreadStartData(Thread::ThreadStartFunction function, uword parameter)
-      : function_(function), parameter_(parameter) {}
+  ThreadStartData(const char* name,
+                  Thread::ThreadStartFunction function,
+                  uword parameter)
+      : name_(name), function_(function), parameter_(parameter) {}
 
+  const char* name() const { return name_; }
   Thread::ThreadStartFunction function() const { return function_; }
   uword parameter() const { return parameter_; }
 
  private:
+  const char* name_;
   Thread::ThreadStartFunction function_;
   uword parameter_;
 
@@ -46,8 +50,10 @@
   return 0;
 }
 
-int Thread::Start(ThreadStartFunction function, uword parameter) {
-  ThreadStartData* start_data = new ThreadStartData(function, parameter);
+int Thread::Start(const char* name,
+                  ThreadStartFunction function,
+                  uword parameter) {
+  ThreadStartData* start_data = new ThreadStartData(name, function, parameter);
   uint32_t tid;
   uintptr_t thread = _beginthreadex(NULL, Thread::GetMaxStackSize(),
                                     ThreadEntry, start_data, 0, &tid);
diff --git a/runtime/bin/vmservice/server.dart b/runtime/bin/vmservice/server.dart
index f4733ae..40d7def 100644
--- a/runtime/bin/vmservice/server.dart
+++ b/runtime/bin/vmservice/server.dart
@@ -4,7 +4,7 @@
 
 part of vmservice_io;
 
-final bool silentObservatory = const bool.fromEnvironment('SILENT_OBSERVATORY');
+final bool silentObservatory = new bool.fromEnvironment('SILENT_OBSERVATORY');
 
 void serverPrint(String s) {
   if (silentObservatory) {
@@ -81,10 +81,9 @@
           socket.addUtf8Text(result.payload);
           break;
       }
-    } catch (e, st) {
-      serverPrint("Ignoring error posting over WebSocket.");
-      serverPrint(e.toString());
-      serverPrint(st.toString());
+    } on StateError catch (_) {
+      // VM has shutdown, do nothing.
+      return;
     }
   }
 
@@ -148,6 +147,7 @@
   final String _ip;
   final int _port;
   final bool _originCheckDisabled;
+  final bool _authCodesDisabled;
   HttpServer _server;
   bool get running => _server != null;
 
@@ -158,11 +158,15 @@
     }
     var ip = _server.address.address;
     var port = _server.port;
-    var path = useAuthToken ? "$serviceAuthToken/" : "/";
+    var path = !_authCodesDisabled ? "$serviceAuthToken/" : "/";
     return new Uri(scheme: 'http', host: ip, port: port, path: path);
   }
 
-  Server(this._service, this._ip, this._port, this._originCheckDisabled);
+  // On Fuchsia, authentication codes are disabled by default. To enable, the authentication token
+  // would have to be written into the hub alongside the port number.
+  Server(this._service, this._ip, this._port, this._originCheckDisabled,
+      bool authCodesDisabled)
+      : _authCodesDisabled = (authCodesDisabled || Platform.isFuchsia);
 
   bool _isAllowedOrigin(String origin) {
     Uri uri;
@@ -215,7 +219,7 @@
   /// Checks the [requestUri] for the service auth token and returns the path.
   /// If the service auth token check fails, returns null.
   String _checkAuthTokenAndGetPath(Uri requestUri) {
-    if (!useAuthToken) {
+    if (_authCodesDisabled) {
       return requestUri.path == '/' ? ROOT_REDIRECT_PATH : requestUri.path;
     }
     final List<String> requestPathSegments = requestUri.pathSegments;
@@ -303,7 +307,10 @@
 
     final String path = _checkAuthTokenAndGetPath(request.uri);
     if (path == null) {
-      // Malformed.
+      // Either no authentication code was provided when one was expected or an
+      // incorrect authentication code was provided.
+      request.response.statusCode = HttpStatus.forbidden;
+      request.response.write("missing or invalid authentication code");
       request.response.close();
       return;
     }
@@ -331,7 +338,7 @@
     }
     // HTTP based service request.
     final client = new HttpRequestClient(request, _service);
-    final message = new Message.fromUri(client, request.uri);
+    final message = new Message.fromUri(client, Uri.parse(path));
     client.onRequest(message); // exception free, no need to try catch
   }
 
diff --git a/runtime/bin/vmservice/vmservice_io.dart b/runtime/bin/vmservice/vmservice_io.dart
index 64d602d..6d7c55f 100644
--- a/runtime/bin/vmservice/vmservice_io.dart
+++ b/runtime/bin/vmservice/vmservice_io.dart
@@ -23,6 +23,9 @@
 // Should the HTTP server auto start?
 @pragma("vm:entry-point")
 bool _autoStart;
+// Should the HTTP server require an auth code?
+@pragma("vm:entry-point")
+bool _authCodesDisabled;
 // Should the HTTP server run in devmode?
 @pragma("vm:entry-point")
 bool _originCheckDisabled;
@@ -45,7 +48,8 @@
   // Lazily create service.
   var service = new VMService();
   // Lazily create server.
-  server = new Server(service, _ip, _port, _originCheckDisabled);
+  server =
+      new Server(service, _ip, _port, _originCheckDisabled, _authCodesDisabled);
 }
 
 Future cleanupCallback() async {
diff --git a/runtime/bin/vmservice_impl.cc b/runtime/bin/vmservice_impl.cc
index 04a3e89..683d4b4 100644
--- a/runtime/bin/vmservice_impl.cc
+++ b/runtime/bin/vmservice_impl.cc
@@ -113,6 +113,7 @@
 bool VmService::Setup(const char* server_ip,
                       intptr_t server_port,
                       bool dev_mode_server,
+                      bool auth_codes_disabled,
                       bool trace_loading,
                       bool deterministic) {
   Dart_Isolate isolate = Dart_CurrentIsolate();
@@ -169,6 +170,11 @@
   SHUTDOWN_ON_ERROR(result);
   result = Dart_SetField(library, DartUtils::NewString("_originCheckDisabled"),
                          Dart_NewBoolean(dev_mode_server));
+  SHUTDOWN_ON_ERROR(result);
+
+  result = Dart_SetField(library, DartUtils::NewString("_authCodesDisabled"),
+                         Dart_NewBoolean(auth_codes_disabled));
+  SHUTDOWN_ON_ERROR(result);
 
 // Are we running on Windows?
 #if defined(HOST_OS_WINDOWS)
diff --git a/runtime/bin/vmservice_impl.h b/runtime/bin/vmservice_impl.h
index 0a40178..51e9bfc 100644
--- a/runtime/bin/vmservice_impl.h
+++ b/runtime/bin/vmservice_impl.h
@@ -17,6 +17,7 @@
   static bool Setup(const char* server_ip,
                     intptr_t server_port,
                     bool dev_mode_server,
+                    bool auth_codes_disabled,
                     bool trace_loading,
                     bool deterministic);
 
diff --git a/runtime/docs/compiler/aot/entry_point_pragma.md b/runtime/docs/compiler/aot/entry_point_pragma.md
index c560070..3694a98 100644
--- a/runtime/docs/compiler/aot/entry_point_pragma.md
+++ b/runtime/docs/compiler/aot/entry_point_pragma.md
@@ -55,16 +55,24 @@
 @pragma("vm:entry-point")
 @pragma("vm:entry-point", true/false)
 @pragma("vm:entry-point", !const bool.formEnvironment("dart.vm.product"))
+@pragma("vm:entry-point", "get")
+@pragma("vm:entry-point", "call")
 void foo() { ... }
 ```
 
-If the second parameter is missing, `null` or `true`, the procedure will
-available for lookup and invocation directly from native or VM code. If the
-procedure is a *generative* constructor, the enclosing class must also be
+If the second parameter is missing, `null` or `true`, the procedure (and its
+closurized form, excluding constructors and setters) will available for lookup
+and invocation directly from native or VM code.
+
+If the procedure is a *generative* constructor, the enclosing class must also be
 annotated for allocation from native or VM code.
 
-Note that annotating a procedure does not allow closurizing it, e.g. access a
-non-getter via `Dart_GetField`.
+If the annotation is "get" or "call", the procedure will only be available for
+closurization (access via `Dart_GetField`) or invocation (access via
+`Dart_Invoke`).
+
+"@pragma("vm:entry-point", "get") against constructors or setters is disallowed
+since they cannot be closurized.
 
 ### Fields
 
@@ -86,3 +94,5 @@
 'get'/'set' parameter is used, only the getter/setter is marked. For static
 fields, the implicit getter is always marked. The third form does not make sense
 for static fields because they do not belong to an interface.
+
+Note that no form of entry-point annotation allows invoking a field.
diff --git a/runtime/docs/gc.md b/runtime/docs/gc.md
index 22aebee..37303f1 100644
--- a/runtime/docs/gc.md
+++ b/runtime/docs/gc.md
@@ -1,13 +1,31 @@
 # Garbage Collection
 
+The Dart VM has a generational garbage collector with two generations. The new generation is collected by a stop-the-world semispace [scavenger](https://github.com/dart-lang/sdk/blob/master/runtime/vm/heap/scavenger.h). The old generation is collected by concurrent-[mark](https://github.com/dart-lang/sdk/blob/master/runtime/vm/heap/marker.h)-concurrent-[sweep](https://github.com/dart-lang/sdk/blob/master/runtime/vm/heap/sweeper.h) or by concurrent-mark-parallel-[compact](https://github.com/dart-lang/sdk/blob/master/runtime/vm/heap/compactor.h).
+
 ## Object representation
 
+Object pointers refer either to immediate objects or heap objects, distinguished by a tag in the low bits of the pointer. The Dart VM has only one kind of immediate object, Smis (small integers), whose pointers have a tag of 0. Heap objects have a pointer tag of 1. The upper bits of a Smi pointer are its value, and the upper bits of a heap object pointer are the most signficant bits of its address (the least significant bit is always 0 because heap objects always have greater than 2-byte alignment).
+
+A tag of 0 allows many operations to be performed on Smis without untagging and retagging. It also allows hiding aligned addresses to the C heap from the GC.
+
+A tag of 1 has no penalty on heap object access because removing the tag can be folded into the offset used by load and store instructions.
+
+Heap objects are always allocated in double-word increments. Objects in old-space are kept at double-word alignment, and objects in new-space are kept offset from double-word alignment. This allows checking an object's age without comparing to a boundry address, avoiding restrictions on heap placement and avoiding loading the boundry from thread-local storage. Additionally, the scavenger can quickly skip over both immediates and old objects with a single branch.
+
+Heap objects have a single-word header, which encodes the object's class, size, and some status flags.
+
+On 64-bit architectures, the header of heap objects also contains a 32-bit identity hash field. On 32-bit architectures, the identity hash for heap objects is kept in a side table.
+
 ## Scavenge
 
+See [Cheney's algorithm](https://dl.acm.org/citation.cfm?doid=362790.362798).
+
 ## Mark-Sweep
 
 ## Mark-Compact
 
+The Dart VM includes a sliding compactor. The forwarding table is compactly represented by dividing the heap into blocks and for each block recording its target address and the bitvector for each surviving double-word. The table is accessed in constant time by keeping heap pages aligned so the page header of any object can be accessed by masking the object.
+
 ## Concurrent Marking
 
 To reduce the time the mutator is paused for old-space GCs, we allow the mutator to continue running during most of the marking work. 
@@ -85,7 +103,7 @@
 
 ### Data races
 
-Operations on headers and slots use (relaxed ordering)[https://en.cppreference.com/w/cpp/atomic/memory_order] and do not provide synchronization.
+Operations on headers and slots use [relaxed ordering](https://en.cppreference.com/w/cpp/atomic/memory_order) and do not provide synchronization.
 
 The concurrent marker starts with an acquire-release operation, so all writes by the mutator up to the time that marking starts are visible to the marker.
 
diff --git a/runtime/include/dart_api.h b/runtime/include/dart_api.h
index a017584..18714e5 100644
--- a/runtime/include/dart_api.h
+++ b/runtime/include/dart_api.h
@@ -386,34 +386,10 @@
  *
  * \param An error handle (See Dart_IsError)
  *
- * \return On success, this function does not return.  On failure, an
- *   error handle is returned.
+ * \return On success, this function does not return.  On failure, the
+ * process is terminated.
  */
-DART_EXPORT Dart_Handle Dart_PropagateError(Dart_Handle handle);
-/* TODO(turnidge): Should this really return an error handle? */
-/* Consider just terminating. */
-
-/* Internal routine used for reporting error handles. */
-DART_EXPORT void _Dart_ReportErrorHandle(const char* file,
-                                         int line,
-                                         const char* handle_string,
-                                         const char* error);
-
-/* TODO(turnidge): Move DART_CHECK_VALID to some sort of dart_utils
- * header instead of this header. */
-/**
- * Aborts the process if 'handle' is an error handle.
- *
- * Provided for convenience.
- */
-#define DART_CHECK_VALID(handle)                                               \
-  {                                                                            \
-    Dart_Handle __handle = handle;                                             \
-    if (Dart_IsError((__handle))) {                                            \
-      _Dart_ReportErrorHandle(__FILE__, __LINE__, #handle,                     \
-                              Dart_GetError(__handle));                        \
-    }                                                                          \
-  }
+DART_EXPORT void Dart_PropagateError(Dart_Handle handle);
 
 /**
  * Converts an object to a string.
@@ -836,9 +812,8 @@
  *   The VM will provide this URI to the Dart_IsolateCreateCallback when a child
  *   isolate is created by Isolate.spawn. The embedder should use a URI that
  *   allows it to load the same program into such a child isolate.
- * \param main The name of the main entry point this isolate will run. Provided
- *   only for advisory purposes to improve debugging messages. Typically either
- *   'main' or the name of the function passed to Isolate.spawn.
+ * \param name A short name for the isolate to improve debugging messages.
+ *   Typically of the format 'foo.dart:main()'.
  * \param isolate_snapshot_data
  * \param isolate_snapshot_instructions Buffers containing a snapshot of the
  *   isolate or NULL if no snapshot is provided. If provided, the buffers must
@@ -855,7 +830,7 @@
  */
 DART_EXPORT Dart_Isolate
 Dart_CreateIsolate(const char* script_uri,
-                   const char* main,
+                   const char* name,
                    const uint8_t* isolate_snapshot_data,
                    const uint8_t* isolate_snapshot_instructions,
                    const uint8_t* shared_data,
@@ -876,9 +851,8 @@
  *   The VM will provide this URI to the Dart_IsolateCreateCallback when a child
  *   isolate is created by Isolate.spawn. The embedder should use a URI that
  *   allows it to load the same program into such a child isolate.
- * \param main The name of the main entry point this isolate will run. Provided
- *   only for advisory purposes to improve debugging messages. Typically either
- *   'main' or the name of the function passed to Isolate.spawn.
+ * \param name A short name for the isolate to improve debugging messages.
+ *   Typically of the format 'foo.dart:main()'.
  * \param kernel_buffer
  * \param kernel_buffer_size A buffer which contains a kernel/DIL program. Must
  *   remain valid until isolate shutdown.
@@ -894,7 +868,7 @@
  */
 DART_EXPORT Dart_Isolate
 Dart_CreateIsolateFromKernel(const char* script_uri,
-                             const char* main,
+                             const char* name,
                              const uint8_t* kernel_buffer,
                              intptr_t kernel_buffer_size,
                              Dart_IsolateFlags* flags,
@@ -967,6 +941,20 @@
 DART_EXPORT void Dart_NotifyLowMemory();
 
 /**
+ * Starts the CPU sampling profiler.
+ */
+DART_EXPORT void Dart_StartProfiling();
+
+/**
+ * Stops the CPU sampling profiler.
+ *
+ * Note that some profile samples might still be taken after this fucntion
+ * returns due to the asynchronous nature of the implementation on some
+ * platforms.
+ */
+DART_EXPORT void Dart_StopProfiling();
+
+/**
  * Notifies the VM that the current thread should not be profiled until a
  * matching call to Dart_ThreadEnableProfiling is made.
  *
@@ -3124,6 +3112,19 @@
 
 DART_EXPORT Dart_KernelCompilationResult Dart_KernelListDependencies();
 
+/**
+ * Sets the kernel buffer which will be used to load Dart SDK sources
+ * dynamically at runtime.
+ *
+ * \param platform_kernel A buffer containing kernel which has sources for the
+ * Dart SDK populated. Note: The VM does not take ownership of this memory.
+ *
+ * \param platform_kernel_size The length of the platform_kernel buffer.
+ */
+DART_EXPORT void Dart_SetDartLibrarySourcesKernel(
+    const uint8_t* platform_kernel,
+    const intptr_t platform_kernel_size);
+
 #define DART_KERNEL_ISOLATE_NAME "kernel-service"
 
 /*
@@ -3151,6 +3152,20 @@
  */
 DART_EXPORT Dart_Port Dart_ServiceWaitForLoadPort();
 
+/**
+ * Writes the CPU profile to the timeline as a series of 'instant' events.
+ *
+ * Note that this is an expensive operation.
+ *
+ * \param main_port The main port of the Isolate whose profile samples to write.
+ * \param error An optional error, must be free()ed by caller.
+ *
+ * \return Returns true if the profile is successfully written and false
+ *         otherwise.
+ */
+DART_EXPORT bool Dart_WriteProfileToTimeline(Dart_Port main_port,
+                                             char** error);
+
 /*
  * ====================
  * Compilation Feedback
@@ -3357,4 +3372,10 @@
  */
 DART_EXPORT void Dart_DumpNativeStackTrace(void* context);
 
+/**
+ *  Indicate that the process is about to abort, and the Dart VM should not
+ *  attempt to cleanup resources.
+ */
+DART_EXPORT void Dart_PrepareToAbort();
+
 #endif /* INCLUDE_DART_API_H_ */ /* NOLINT */
diff --git a/runtime/include/dart_embedder_api.h b/runtime/include/dart_embedder_api.h
index eda9059..9a91a83 100644
--- a/runtime/include/dart_embedder_api.h
+++ b/runtime/include/dart_embedder_api.h
@@ -60,6 +60,7 @@
   // TODO(vegorov) document these ones.
   bool dev_mode;
   bool deterministic;
+  bool disable_auth_codes;
 };
 
 // Create and initialize vm-service isolate. This method should be used
diff --git a/runtime/include/dart_native_api.h b/runtime/include/dart_native_api.h
index ae31e47..39b29ff 100644
--- a/runtime/include/dart_native_api.h
+++ b/runtime/include/dart_native_api.h
@@ -122,7 +122,6 @@
  * data references from the message are allocated by the caller and
  * will be reclaimed when returning to it.
  */
-
 typedef void (*Dart_NativeMessageHandler)(Dart_Port dest_port_id,
                                           Dart_CObject* message);
 
diff --git a/runtime/include/dart_tools_api.h b/runtime/include/dart_tools_api.h
index 402e01d..03b38aa 100644
--- a/runtime/include/dart_tools_api.h
+++ b/runtime/include/dart_tools_api.h
@@ -360,13 +360,17 @@
 /**
  * Add a timeline event to the embedder stream.
  *
- * \param label The name of the evnet.
+ * \param label The name of the event. Its lifetime must extend at least until
+ *     Dart_Cleanup.
  * \param timestamp0 The first timestamp of the event.
  * \param timestamp1_or_async_id The second timestamp of the event or
  *     the async id.
  * \param argument_count The number of argument names and values.
- * \param argument_names An array of names of the arguments.
- * \param argument_values An array of values of the arguments.
+ * \param argument_names An array of names of the arguments. The lifetime of the
+ *     names must extend at least until Dart_Cleanup. The array may be reclaimed
+ *     when this call returns.
+ * \param argument_values An array of values of the arguments. The values and
+ *     the array may be reclaimed when this call returns.
  */
 DART_EXPORT void Dart_TimelineEvent(const char* label,
                                     int64_t timestamp0,
diff --git a/runtime/lib/array_patch.dart b/runtime/lib/array_patch.dart
index 7bea7c9..99daf3a 100644
--- a/runtime/lib/array_patch.dart
+++ b/runtime/lib/array_patch.dart
@@ -65,7 +65,7 @@
 
   // Factory constructing a mutable List from a parser generated List literal.
   // [elements] contains elements that are already type checked.
-  @pragma("vm:entry-point")
+  @pragma("vm:entry-point", "call")
   factory List._fromLiteral(List elements) {
     if (elements.isEmpty) {
       return new _GrowableList<E>(0);
diff --git a/runtime/lib/async_patch.dart b/runtime/lib/async_patch.dart
index c293221..f0381ab 100644
--- a/runtime/lib/async_patch.dart
+++ b/runtime/lib/async_patch.dart
@@ -120,7 +120,7 @@
   object._awaiter = awaiter;
 }
 
-@pragma("vm:entry-point")
+@pragma("vm:entry-point", "call")
 void _asyncStarMoveNextHelper(var stream) {
   if (stream is! _StreamImpl) {
     return;
@@ -289,7 +289,7 @@
   Function _generator;
 }
 
-@pragma("vm:entry-point")
+@pragma("vm:entry-point", "call")
 void _completeOnAsyncReturn(Completer completer, Object value) {
   completer.complete(value);
 }
@@ -299,11 +299,11 @@
 Object _asyncStackTraceHelper(Function async_op)
     native "StackTrace_asyncStackTraceHelper";
 
-@pragma("vm:entry-point")
+@pragma("vm:entry-point", "call")
 void _clearAsyncThreadStackTrace()
     native "StackTrace_clearAsyncThreadStackTrace";
 
-@pragma("vm:entry-point")
+@pragma("vm:entry-point", "call")
 void _setAsyncThreadStackTrace(StackTrace stackTrace)
     native "StackTrace_setAsyncThreadStackTrace";
 
diff --git a/runtime/lib/bigint_patch.dart b/runtime/lib/bigint_patch.dart
index 0341923..2046284 100644
--- a/runtime/lib/bigint_patch.dart
+++ b/runtime/lib/bigint_patch.dart
@@ -537,7 +537,7 @@
   /// Shifts the digits of [xDigits] into the right place in [resultDigits].
   ///
   /// `resultDigits[ds..xUsed+ds] = xDigits[0..xUsed-1] << (n % _digitBits)`
-  ///   where `ds = ceil(n / _digitBits)`
+  ///   where `ds = n ~/ _digitBits`
   ///
   /// Does *not* clear digits below ds.
   ///
@@ -582,7 +582,8 @@
     }
     // Need one extra digit to hold bits shifted by bitShift.
     var resultUsed = _used + digitShift + 1;
-    var resultDigits = _newDigits(resultUsed);
+    // The 64-bit intrinsic requires one extra pair to work with.
+    var resultDigits = _newDigits(resultUsed + 1);
     _lsh(_digits, _used, shiftAmount, resultDigits);
     return new _BigIntImpl._(_isNegative, resultUsed, resultDigits);
   }
@@ -598,7 +599,8 @@
     }
     // Need one extra digit to hold bits shifted by bitShift.
     var resultUsed = xUsed + digitsShift + 1;
-    assert(resultDigits.length >= resultUsed + (resultUsed & 1));
+    // The 64-bit intrinsic requires one extra pair to work with.
+    assert(resultDigits.length >= resultUsed + 2 - (resultUsed & 1));
     _lsh(xDigits, xUsed, n, resultDigits);
     var i = digitsShift;
     while (--i >= 0) {
@@ -2310,7 +2312,9 @@
     var resultBits = new Uint8List(8);
 
     var length = _digitBits * (_used - 1) + _digits[_used - 1].bitLength;
-    if (length - 53 > maxDoubleExponent) return double.infinity;
+    if (length > maxDoubleExponent + 53) {
+      return _isNegative ? double.negativeInfinity : double.infinity;
+    }
 
     // The most significant bit is for the sign.
     if (_isNegative) resultBits[7] = 0x80;
diff --git a/runtime/lib/class_id_fasta.dart b/runtime/lib/class_id_fasta.dart
index f8579c0..c95930f 100644
--- a/runtime/lib/class_id_fasta.dart
+++ b/runtime/lib/class_id_fasta.dart
@@ -6,7 +6,7 @@
 
 @pragma("vm:entry-point")
 class ClassID {
-  @pragma("vm:entry-point")
+  @pragma("vm:entry-point", "call")
   @pragma("vm:exact-result-type", "dart:core#_Smi")
   static int getID(Object value) native "ClassID_getID";
 
diff --git a/runtime/lib/compact_hash.dart b/runtime/lib/compact_hash.dart
index 8123b0f..e73a551 100644
--- a/runtime/lib/compact_hash.dart
+++ b/runtime/lib/compact_hash.dart
@@ -8,7 +8,7 @@
 
 // This function takes care of rehashing of the linked hashmaps in [objects]. We
 // do this eagerly after snapshot deserialization.
-@pragma("vm:entry-point")
+@pragma("vm:entry-point", "call")
 void _rehashObjects(List objects) {
   final int length = objects.length;
   for (int i = 0; i < length; ++i) {
@@ -614,6 +614,11 @@
   // is not required by the spec. (For instance, always using an identity set
   // would be technically correct, albeit surprising.)
   Set<E> toSet() => new _CompactLinkedHashSet<E>()..addAll(this);
+
+  // This method is called by [_rehashObjects] (see above).
+  void _regenerateIndex() {
+    _rehash();
+  }
 }
 
 class _CompactLinkedIdentityHashSet<E> extends _CompactLinkedHashSet<E>
diff --git a/runtime/lib/convert_patch.dart b/runtime/lib/convert_patch.dart
index 7342f87..747e1e3 100644
--- a/runtime/lib/convert_patch.dart
+++ b/runtime/lib/convert_patch.dart
@@ -53,7 +53,7 @@
 }
 
 class _JsonUtf8Decoder extends Converter<List<int>, Object> {
-  final _Reviver _reviver;
+  final Function(Object key, Object value) _reviver;
   final bool _allowMalformed;
 
   _JsonUtf8Decoder(this._reviver, this._allowMalformed);
@@ -193,7 +193,7 @@
 }
 
 class _ReviverJsonListener extends _BuildJsonListener {
-  final _Reviver reviver;
+  final Function(Object key, Object value) reviver;
   _ReviverJsonListener(this.reviver);
 
   void arrayElement() {
@@ -1456,7 +1456,7 @@
  */
 class _JsonStringDecoderSink extends StringConversionSinkBase {
   _JsonStringParser _parser;
-  final Function _reviver;
+  final Function(Object key, Object value) _reviver;
   final Sink<Object> _sink;
 
   _JsonStringDecoderSink(this._reviver, this._sink)
@@ -1857,8 +1857,7 @@
   final to = endIndex;
 
   // Special case for _Uint8ArrayView.
-  final cid = ClassID.getID(units);
-  if (identical(cid, ClassID.cidUint8ArrayView)) {
+  if (units is Uint8List) {
     if (from >= 0 && to >= 0 && to <= units.length) {
       for (int i = from; i < to; i++) {
         final unit = units[i];
diff --git a/runtime/lib/errors_patch.dart b/runtime/lib/errors_patch.dart
index 1fd86bd..1e61ce6 100644
--- a/runtime/lib/errors_patch.dart
+++ b/runtime/lib/errors_patch.dart
@@ -31,7 +31,7 @@
   // AssertionError_throwNew in errors.cc fishes the assertion source code
   // out of the script. It expects a Dart stack frame from class
   // _AssertionError. Thus we need a Dart stub that calls the native code.
-  @pragma("vm:entry-point")
+  @pragma("vm:entry-point", "call")
   static _throwNew(int assertionStart, int assertionEnd, Object message) {
     _doThrowNew(assertionStart, assertionEnd, message);
   }
@@ -39,7 +39,7 @@
   static _doThrowNew(int assertionStart, int assertionEnd, Object message)
       native "AssertionError_throwNew";
 
-  @pragma("vm:entry-point")
+  @pragma("vm:entry-point", "call")
   static _evaluateAssertion(condition) {
     if (identical(condition, true) || identical(condition, false)) {
       return condition;
@@ -194,7 +194,7 @@
   // The compiler emits a call to _throwNew when it cannot resolve a static
   // method at compile time. The receiver is actually the literal class of the
   // unresolved method.
-  @pragma("vm:entry-point")
+  @pragma("vm:entry-point", "call")
   static void _throwNew(Object receiver, String memberName, int invocation_type,
       Object typeArguments, List arguments, List argumentNames) {
     throw new NoSuchMethodError._withType(receiver, memberName, invocation_type,
diff --git a/runtime/lib/ffi.cc b/runtime/lib/ffi.cc
index 0621990..7bdca63 100644
--- a/runtime/lib/ffi.cc
+++ b/runtime/lib/ffi.cc
@@ -2,6 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+#include "vm/compiler/ffi.h"
 #include "include/dart_api.h"
 #include "vm/bootstrap_natives.h"
 #include "vm/class_finalizer.h"
@@ -211,37 +212,6 @@
   return Double::Cast(instance);
 }
 
-// Native data types sizes in bytes
-
-static const size_t kSizeUnknown = 0;
-
-static const intptr_t kNumElementSizes = kFfiVoidCid - kFfiPointerCid + 1;
-
-static const size_t element_size_table[kNumElementSizes] = {
-    sizeof(intptr_t),  // kFfiPointerCid
-    kSizeUnknown,      // kFfiNativeFunctionCid
-    1,                 // kFfiInt8Cid
-    2,                 // kFfiInt16Cid
-    4,                 // kFfiInt32Cid
-    8,                 // kFfiInt64Cid
-    1,                 // kFfiUint8Cid
-    2,                 // kFfiUint16Cid
-    4,                 // kFfiUint32Cid
-    8,                 // kFfiUint64Cid
-    sizeof(intptr_t),  // kFfiIntPtrCid
-    4,                 // kFfiFloatCid
-    8,                 // kFfiDoubleCid
-    kSizeUnknown,      // kFfiVoidCid
-};
-
-static size_t ElementSizeInBytes(intptr_t class_id) {
-  ASSERT(RawObject::IsFfiTypeClassId(class_id));
-  ASSERT(class_id != kFfiNativeFunctionCid);
-  ASSERT(class_id != kFfiVoidCid);
-  intptr_t index = class_id - kFfiPointerCid;
-  return element_size_table[index];
-}
-
 // The remainder of this file implements the dart:ffi native methods.
 
 DEFINE_NATIVE_ENTRY(Ffi_allocate, 1, 1) {
@@ -256,18 +226,19 @@
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, argCount, arguments->NativeArgAt(0));
   int64_t count = argCount.AsInt64Value();
   classid_t type_cid = type_arg.type_class_id();
-  int64_t max_count = INTPTR_MAX / ElementSizeInBytes(type_cid);
+  int64_t max_count = INTPTR_MAX / compiler::ffi::ElementSizeInBytes(type_cid);
   CheckRange(argCount, 1, max_count, "count");
 
-  size_t size = ElementSizeInBytes(type_cid) * count;
-  uint8_t* memory = reinterpret_cast<uint8_t*>(malloc(size));
-  if (memory == NULL) {
+  size_t size = compiler::ffi::ElementSizeInBytes(type_cid) * count;
+  uint64_t memory = reinterpret_cast<uint64_t>(malloc(size));
+  if (memory == 0) {
     const String& error = String::Handle(String::NewFormatted(
         "allocating (%" Pd ") bytes of memory failed", size));
     Exceptions::ThrowArgumentError(error);
   }
 
-  RawPointer* result = Pointer::New(type_arg, memory);
+  RawPointer* result = Pointer::New(
+      type_arg, Integer::Handle(zone, Integer::NewFromUint64(memory)));
   return result;
 }
 
@@ -279,12 +250,11 @@
   CheckIsConcreteNativeType(native_type);
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, arg_ptr, arguments->NativeArgAt(0));
 
-  uint8_t* address = reinterpret_cast<uint8_t*>(arg_ptr.AsInt64Value());
-  // TODO(dacoharkes): should this return NULL if addres is 0?
+  // TODO(dacoharkes): should this return NULL if address is 0?
   // https://github.com/dart-lang/sdk/issues/35756
 
   RawPointer* result =
-      Pointer::New(native_type, address, type_arg.type_class_id());
+      Pointer::New(native_type, arg_ptr, type_arg.type_class_id());
   return result;
 }
 
@@ -292,14 +262,15 @@
   GET_NON_NULL_NATIVE_ARGUMENT(Pointer, pointer, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(Integer, index, arguments->NativeArgAt(1));
   AbstractType& pointer_type_arg =
-      AbstractType::Handle(pointer.type_argument());
+      AbstractType::Handle(zone, pointer.type_argument());
   CheckSized(pointer_type_arg);
 
   classid_t class_id = pointer_type_arg.type_class_id();
-  uint8_t* address = pointer.GetCMemoryAddress();
-  uint8_t* address_new =
-      address + index.AsInt64Value() * ElementSizeInBytes(class_id);
-  RawPointer* result = Pointer::New(pointer_type_arg, address_new);
+  Integer& address = Integer::Handle(zone, pointer.GetCMemoryAddress());
+  address = Integer::New(address.AsInt64Value() +
+                         index.AsInt64Value() *
+                             compiler::ffi::ElementSizeInBytes(class_id));
+  RawPointer* result = Pointer::New(pointer_type_arg, address);
   return result;
 }
 
@@ -309,9 +280,11 @@
   AbstractType& pointer_type_arg =
       AbstractType::Handle(pointer.type_argument());
 
-  uint8_t* address = pointer.GetCMemoryAddress();
-  uint8_t* address_new = address + offset.AsInt64Value();
-  RawPointer* result = Pointer::New(pointer_type_arg, address_new);
+  intptr_t address =
+      Integer::Handle(zone, pointer.GetCMemoryAddress()).AsInt64Value() +
+      offset.AsInt64Value();
+  RawPointer* result = Pointer::New(
+      pointer_type_arg, Integer::Handle(zone, Integer::New(address)));
   return result;
 }
 
@@ -323,7 +296,7 @@
       type_args.TypeAtNullSafe(Pointer::kNativeTypeArgPos));
   CheckIsConcreteNativeType(native_type);
 
-  uint8_t* address = pointer.GetCMemoryAddress();
+  const Integer& address = Integer::Handle(zone, pointer.GetCMemoryAddress());
   RawPointer* result =
       Pointer::New(native_type, address, type_arg.type_class_id());
   return result;
@@ -332,35 +305,37 @@
 DEFINE_NATIVE_ENTRY(Ffi_free, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Pointer, pointer, arguments->NativeArgAt(0));
 
-  uint8_t* address = pointer.GetCMemoryAddress();
-  free(address);
-  pointer.SetCMemoryAddress(0);
+  const Integer& address = Integer::Handle(zone, pointer.GetCMemoryAddress());
+  free(reinterpret_cast<void*>(address.AsInt64Value()));
+  pointer.SetCMemoryAddress(Integer::Handle(zone, Integer::New(0)));
   return Object::null();
 }
 
 DEFINE_NATIVE_ENTRY(Ffi_address, 0, 1) {
   GET_NON_NULL_NATIVE_ARGUMENT(Pointer, pointer, arguments->NativeArgAt(0));
-
-  uint8_t* address = pointer.GetCMemoryAddress();
-  intptr_t int_ptr = reinterpret_cast<intptr_t>(address);
-  return Integer::NewFromUint64(int_ptr);
+  return pointer.GetCMemoryAddress();
 }
 
-static RawInstance* BoxLoadPointer(uint8_t* address,
+static RawInstance* BoxLoadPointer(Zone* zone,
+                                   uint8_t* address,
                                    const AbstractType& instance_type_arg,
                                    intptr_t type_cid) {
   // TODO(dacoharkes): should this return NULL if addres is 0?
   // https://github.com/dart-lang/sdk/issues/35756
-  if (address == 0) {  // 0 is the c++ null pointer
+  if (address == nullptr) {
     return Instance::null();
   }
   AbstractType& type_arg =
       AbstractType::Handle(TypeArguments::Handle(instance_type_arg.arguments())
                                .TypeAt(Pointer::kNativeTypeArgPos));
-  return Pointer::New(type_arg, address, type_cid);
+  return Pointer::New(
+      type_arg,
+      Integer::Handle(zone, Integer::New(reinterpret_cast<intptr_t>(address))),
+      type_cid);
 }
 
-static RawInstance* LoadValue(uint8_t* address,
+static RawInstance* LoadValue(Zone* zone,
+                              uint8_t* address,
                               const AbstractType& instance_type_arg) {
   classid_t type_cid = instance_type_arg.type_class_id();
   switch (type_cid) {
@@ -389,7 +364,7 @@
     case kFfiPointerCid:
     default:
       ASSERT(IsPointerType(instance_type_arg));
-      return BoxLoadPointer(*reinterpret_cast<uint8_t**>(address),
+      return BoxLoadPointer(zone, *reinterpret_cast<uint8_t**>(address),
                             instance_type_arg, type_cid);
   }
 }
@@ -402,14 +377,17 @@
   CheckSized(pointer_type_arg);
   ASSERT(DartAndCTypeCorrespond(pointer_type_arg, type_arg));
 
-  uint8_t* address = pointer.GetCMemoryAddress();
-  return LoadValue(address, pointer_type_arg);
+  uint8_t* address = reinterpret_cast<uint8_t*>(
+      Integer::Handle(pointer.GetCMemoryAddress()).AsInt64Value());
+  return LoadValue(zone, address, pointer_type_arg);
 }
 
-static void StoreValue(const Pointer& pointer,
+static void StoreValue(Zone* zone,
+                       const Pointer& pointer,
                        classid_t type_cid,
                        const Instance& new_value) {
-  uint8_t* address = pointer.GetCMemoryAddress();
+  uint8_t* address = reinterpret_cast<uint8_t*>(
+      Integer::Handle(pointer.GetCMemoryAddress()).AsInt64Value());
   AbstractType& pointer_type_arg =
       AbstractType::Handle(pointer.type_argument());
   switch (type_cid) {
@@ -457,14 +435,16 @@
     case kFfiPointerCid:
     default: {
       ASSERT(IsPointerType(pointer_type_arg));
-      uint8_t* new_value_unwrapped = nullptr;
+      intptr_t new_value_unwrapped = 0;
       if (!new_value.IsNull()) {
         ASSERT(new_value.IsPointer());
-        new_value_unwrapped = AsPointer(new_value).GetCMemoryAddress();
+        new_value_unwrapped =
+            Integer::Handle(AsPointer(new_value).GetCMemoryAddress())
+                .AsInt64Value();
         // TODO(dacoharkes): should this return NULL if addres is 0?
         // https://github.com/dart-lang/sdk/issues/35756
       }
-      *reinterpret_cast<uint8_t**>(address) = new_value_unwrapped;
+      *reinterpret_cast<intptr_t*>(address) = new_value_unwrapped;
     } break;
   }
 }
@@ -479,7 +459,7 @@
   ASSERT(DartAndCTypeCorrespond(pointer_type_arg, arg_type));
 
   classid_t type_cid = pointer_type_arg.type_class_id();
-  StoreValue(pointer, type_cid, new_value);
+  StoreValue(zone, pointer, type_cid, new_value);
   return Object::null();
 }
 
@@ -489,54 +469,7 @@
   CheckSized(type_arg);
 
   classid_t type_cid = type_arg.type_class_id();
-  return Smi::New(ElementSizeInBytes(type_cid));
-}
-
-// Generates assembly to trampoline from Dart into C++.
-//
-// Attaches assembly code to the function with the folling features:
-// - unboxes arguments
-// - puts the arguments on the c stack
-// - invokes the c function
-// - reads the the result
-// - boxes the result and returns it.
-//
-// It inspects the signature to know what to box/unbox
-// Parameter `function` has the Dart types in its signature
-// Parameter `c_signature` has the C++ types in its signature
-static RawCode* TrampolineCode(const Function& function,
-                               const Function& c_signature) {
-#if defined(DART_PRECOMPILED_RUNTIME) || defined(DART_PRECOMPILER)
-  // Currently we generate the trampoline when calling asFunction(), this means
-  // the ffi cannot be used in AOT.
-  // In order make it work in AOT we need to:
-  // - collect all asFunction signatures ahead of time
-  // - generate trampolines for those
-  // - store these in the object store
-  // - and read these from the object store when calling asFunction()
-  // https://github.com/dart-lang/sdk/issues/35765
-  UNREACHABLE();
-#elif !defined(TARGET_ARCH_X64)
-  // https://github.com/dart-lang/sdk/issues/35774
-  UNREACHABLE();
-#elif !defined(TARGET_OS_LINUX) && !defined(TARGET_OS_MACOS)
-  // https://github.com/dart-lang/sdk/issues/35760 Arm32 && Android
-  // https://github.com/dart-lang/sdk/issues/35771 Windows
-  // https://github.com/dart-lang/sdk/issues/35772 Arm64
-  // https://github.com/dart-lang/sdk/issues/35773 DBC
-  UNREACHABLE();
-#else
-  extern void GenerateFfiTrampoline(Assembler * assembler,
-                                    const Function& signature);
-  ObjectPoolBuilder object_pool_builder;
-  Assembler assembler(&object_pool_builder);
-  GenerateFfiTrampoline(&assembler, c_signature);
-  const Code& code = Code::Handle(Code::FinalizeCode(
-      function, nullptr, &assembler, Code::PoolAttachment::kAttachPool));
-  code.set_exception_handlers(
-      ExceptionHandlers::Handle(ExceptionHandlers::New(0)));
-  return code.raw();
-#endif
+  return Smi::New(compiler::ffi::ElementSizeInBytes(type_cid));
 }
 
 // TODO(dacoharkes): Cache the trampolines.
@@ -545,25 +478,37 @@
                                        const Function& c_signature) {
   Thread* thread = Thread::Current();
   Zone* zone = thread->zone();
-  const String& name =
+  String& name =
       String::ZoneHandle(Symbols::New(Thread::Current(), "FfiTrampoline"));
   const Library& lib = Library::Handle(Library::FfiLibrary());
   const Class& owner_class = Class::Handle(lib.toplevel_class());
-  Function& function = Function::ZoneHandle(
-      zone, Function::New(name, RawFunction::kFfiTrampoline,
-                          true,   // is_static
-                          false,  // is_const
-                          false,  // is_abstract
-                          false,  // is_external
-                          true,   // is_native
-                          owner_class, TokenPosition::kMinSource));
-
+  Function& function =
+      Function::Handle(zone, Function::New(name, RawFunction::kFfiTrampoline,
+                                           /*is_static=*/true,
+                                           /*is_const=*/false,
+                                           /*is_abstract=*/false,
+                                           /*is_external=*/false,
+                                           /*is_native=*/false, owner_class,
+                                           TokenPosition::kMinSource));
+  function.set_is_debuggable(false);
   function.set_num_fixed_parameters(dart_signature.num_fixed_parameters());
   function.set_result_type(AbstractType::Handle(dart_signature.result_type()));
   function.set_parameter_types(Array::Handle(dart_signature.parameter_types()));
 
-  const Code& code = Code::Handle(TrampolineCode(function, c_signature));
-  function.AttachCode(code);
+  // The signature function won't have any names for the parameters. We need to
+  // assign unique names for scope building and error messages.
+  const intptr_t num_params = dart_signature.num_fixed_parameters();
+  const Array& parameter_names = Array::Handle(Array::New(num_params));
+  for (intptr_t i = 0; i < num_params; ++i) {
+    if (i == 0) {
+      name = Symbols::ClosureParameter().raw();
+    } else {
+      name = Symbols::NewFormatted(thread, ":ffiParam%" Pd, i);
+    }
+    parameter_names.SetAt(i, name);
+  }
+  function.set_parameter_names(parameter_names);
+  function.SetFfiCSignature(c_signature);
 
   return function.raw();
 }
@@ -590,9 +535,7 @@
   // the function so that we can reuse the function for each c function with
   // the same signature.
   Context& context = Context::Handle(Context::New(1));
-  context.SetAt(0,
-                Object::Handle(Integer::NewFromUint64(
-                    reinterpret_cast<intptr_t>(pointer.GetCMemoryAddress()))));
+  context.SetAt(0, Integer::Handle(zone, pointer.GetCMemoryAddress()));
 
   RawClosure* raw_closure =
       Closure::New(Object::null_type_arguments(), Object::null_type_arguments(),
@@ -609,25 +552,18 @@
 #elif !defined(TARGET_ARCH_X64)
   // https://github.com/dart-lang/sdk/issues/35774
   UNREACHABLE();
-#elif !defined(TARGET_OS_LINUX) && !defined(TARGET_OS_MACOS)
+#elif !defined(TARGET_OS_LINUX) && !defined(TARGET_OS_MACOS) &&                \
+    !defined(TARGET_OS_WINDOWS)
   // https://github.com/dart-lang/sdk/issues/35760 Arm32 && Android
-  // https://github.com/dart-lang/sdk/issues/35771 Windows
   // https://github.com/dart-lang/sdk/issues/35772 Arm64
   // https://github.com/dart-lang/sdk/issues/35773 DBC
   UNREACHABLE();
 #else
-  extern void GenerateFfiInverseTrampoline(
-      Assembler * assembler, const Function& signature, void* dart_entry_point);
-  ObjectPoolBuilder object_pool_builder;
-  Assembler assembler(&object_pool_builder);
-  GenerateFfiInverseTrampoline(&assembler, signature, dart_entry_point);
-  const Code& code = Code::Handle(
-      Code::FinalizeCode("inverse trampoline", nullptr, &assembler,
-                         Code::PoolAttachment::kAttachPool, false));
 
-  uword entryPoint = code.EntryPoint();
-
-  return reinterpret_cast<void*>(entryPoint);
+  // TODO(dacoharkes): Implement this.
+  // https://github.com/dart-lang/sdk/issues/35761
+  // Look at StubCode::GenerateInvokeDartCodeStub.
+  UNREACHABLE();
 #endif
 }
 
@@ -652,7 +588,8 @@
   THR_Print("Ffi_fromFunction: %p\n", entryPoint);
   THR_Print("Ffi_fromFunction: %" Pd "\n", code.Size());
 
-  void* address = GenerateFfiInverseTrampoline(c_signature, entryPoint);
+  intptr_t address = reinterpret_cast<intptr_t>(
+      GenerateFfiInverseTrampoline(c_signature, entryPoint));
 
   TypeArguments& type_args = TypeArguments::Handle(zone);
   type_args = TypeArguments::New(1);
@@ -671,8 +608,8 @@
 
   address = 0;  // https://github.com/dart-lang/sdk/issues/35761
 
-  Pointer& result = Pointer::Handle(
-      Pointer::New(native_function_type, reinterpret_cast<uint8_t*>(address)));
+  Pointer& result = Pointer::Handle(Pointer::New(
+      native_function_type, Integer::Handle(zone, Integer::New(address))));
 
   return result.raw();
 }
diff --git a/runtime/lib/ffi_dynamic_library.cc b/runtime/lib/ffi_dynamic_library.cc
index b083e04..4bd67e2 100644
--- a/runtime/lib/ffi_dynamic_library.cc
+++ b/runtime/lib/ffi_dynamic_library.cc
@@ -2,13 +2,14 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-#if !defined(TARGET_OS_LINUX) && !defined(TARGET_OS_MACOS)
-// TODO(dacoharkes): implement dynamic libraries for other targets.
-// see
-// - runtime/vm/native_symbol.h
-// - runtime/vm/native_symbol_linux.cc
-// - runtime/bin/extensions.h (but we cannot import from bin)
+#if !defined(TARGET_OS_LINUX) && !defined(TARGET_OS_MACOS) &&                  \
+    !defined(TARGET_OS_ANDROID)
+// TODO(dacoharkes): Implement dynamic libraries for other targets & merge the
+// implementation with:
+// - runtime/bin/extensions.h
 // - runtime/bin/extensions_linux.cc
+// TODO(dacoharkes): Make the code from bin available in a manner similar to
+// runtime/vm/dart.h Dart_FileReadCallback.
 #else
 #include <dlfcn.h>
 #endif
@@ -19,66 +20,87 @@
 
 namespace dart {
 
-// Concatenates a NULL terminated array of strings.
-// The returned string is scope allocated.
-// TODO(dacoharkes): Can we share this with runtime/bin/extensions.cc?
-const char* Concatenate(const char** strings) {
-  int size = 1;  // null termination.
-  for (int i = 0; strings[i] != NULL; i++) {
-    size += strlen(strings[i]);
-  }
-  char* result = reinterpret_cast<char*>(Dart_ScopeAllocate(size));
-  int index = 0;
-  for (int i = 0; strings[i] != NULL; i++) {
-    index += snprintf(result + index, size - index, "%s", strings[i]);
-  }
-  ASSERT(index == size - 1);
-  ASSERT(result[size - 1] == '\0');
-  return result;
-}
-
-// TODO(dacoharkes): Can we share this with runtime/bin/extensions.cc?
-const char* LibraryPath(const char* library_name) {
-  const char* library_prefix = "lib";
-#if defined(TARGET_OS_LINUX)
-  const char* library_extension = "so";
-#elif defined(TARGET_OS_MACOS)
-  const char* library_extension = "dylib";
-#else
-  const char* library_extension = "";
-  UNREACHABLE();
-#endif
-
-  const char* path_components[] = {
-      library_prefix, library_name, ".", library_extension, NULL,
-  };
-
-  return Concatenate(path_components);
-}
-
-DEFINE_NATIVE_ENTRY(Ffi_dl_open, 0, 1) {
-#if !defined(TARGET_OS_LINUX) && !defined(TARGET_OS_MACOS)
-  UNREACHABLE();
-#else
-  GET_NON_NULL_NATIVE_ARGUMENT(String, argName, arguments->NativeArgAt(0));
-
-  dlerror();  // Clear any errors.
-  void* handle = dlopen(LibraryPath(argName.ToCString()), RTLD_LAZY);
+static void* LoadExtensionLibrary(const char* library_file) {
+#if defined(TARGET_OS_LINUX) || defined(TARGET_OS_MACOS) ||                    \
+    defined(TARGET_OS_ANDROID)
+  void* handle = dlopen(library_file, RTLD_LAZY);
   if (handle == nullptr) {
     char* error = dlerror();
     const String& msg = String::Handle(
-        String::NewFormatted("Failed to load dynamic library(%s)", error));
+        String::NewFormatted("Failed to load dynamic library (%s)", error));
     Exceptions::ThrowArgumentError(msg);
   }
 
+  return handle;
+#elif defined(TARGET_OS_WINDOWS)
+  SetLastError(0);  // Clear any errors.
+
+  // Convert to wchar_t string.
+  const int name_len =
+      MultiByteToWideChar(CP_UTF8, 0, library_file, -1, NULL, 0);
+  wchar_t* name = new wchar_t[name_len];
+  MultiByteToWideChar(CP_UTF8, 0, library_file, -1, name, name_len);
+
+  void* ext = LoadLibraryW(name);
+  delete[] name;
+
+  if (ext == nullptr) {
+    const int error = GetLastError();
+    const String& msg = String::Handle(
+        String::NewFormatted("Failed to load dynamic library (%i)", error));
+    Exceptions::ThrowArgumentError(msg);
+  }
+
+  return ext;
+#else
+  const Array& args = Array::Handle(Array::New(1));
+  args.SetAt(0,
+             String::Handle(String::New(
+                 "The dart:ffi library is not available on this platform.")));
+  Exceptions::ThrowByType(Exceptions::kUnsupported, args);
+#endif
+}
+
+DEFINE_NATIVE_ENTRY(Ffi_dl_open, 0, 1) {
+  GET_NON_NULL_NATIVE_ARGUMENT(String, lib_path, arguments->NativeArgAt(0));
+
+  void* handle = LoadExtensionLibrary(lib_path.ToCString());
+
   return DynamicLibrary::New(handle);
+}
+
+static void* ResolveSymbol(void* handle, const char* symbol) {
+#if defined(TARGET_OS_LINUX) || defined(TARGET_OS_MACOS) ||                    \
+    defined(TARGET_OS_ANDROID)
+  dlerror();  // Clear any errors.
+  void* pointer = dlsym(handle, symbol);
+  if (pointer == nullptr) {
+    char* error = dlerror();
+    const String& msg = String::Handle(
+        String::NewFormatted("Failed to lookup symbol (%s)", error));
+    Exceptions::ThrowArgumentError(msg);
+  }
+  return pointer;
+#elif defined(TARGET_OS_WINDOWS)
+  SetLastError(0);
+  void* pointer = GetProcAddress(reinterpret_cast<HMODULE>(handle), symbol);
+  if (pointer == nullptr) {
+    const int error = GetLastError();
+    const String& msg = String::Handle(
+        String::NewFormatted("Failed to lookup symbol (%i)", error));
+    Exceptions::ThrowArgumentError(msg);
+  }
+  return pointer;
+#else
+  const Array& args = Array::Handle(Array::New(1));
+  args.SetAt(0,
+             String::Handle(String::New(
+                 "The dart:ffi library is not available on this platform.")));
+  Exceptions::ThrowByType(Exceptions::kUnsupported, args);
 #endif
 }
 
 DEFINE_NATIVE_ENTRY(Ffi_dl_lookup, 1, 2) {
-#if !defined(TARGET_OS_LINUX) && !defined(TARGET_OS_MACOS)
-  UNREACHABLE();
-#else
   GET_NATIVE_TYPE_ARGUMENT(type_arg, arguments->NativeTypeArgAt(0));
 
   GET_NON_NULL_NATIVE_ARGUMENT(DynamicLibrary, dlib, arguments->NativeArgAt(0));
@@ -87,21 +109,14 @@
 
   void* handle = dlib.GetHandle();
 
-  dlerror();  // Clear any errors.
-  uint8_t* pointer =
-      reinterpret_cast<uint8_t*>(dlsym(handle, argSymbolName.ToCString()));
-  char* error;
-  if ((error = dlerror()) != NULL) {
-    const String& msg = String::Handle(
-        String::NewFormatted("Failed to lookup symbol (%s)", error));
-    Exceptions::ThrowArgumentError(msg);
-  }
+  const intptr_t pointer = reinterpret_cast<intptr_t>(
+      ResolveSymbol(handle, argSymbolName.ToCString()));
 
-  // TODO(dacoharkes): should this return NULL if addres is 0?
+  // TODO(dacoharkes): should this return Object::null() if address is 0?
   // https://github.com/dart-lang/sdk/issues/35756
-  RawPointer* result = Pointer::New(type_arg, pointer);
+  RawPointer* result =
+      Pointer::New(type_arg, Integer::Handle(zone, Integer::New(pointer)));
   return result;
-#endif
 }
 
 DEFINE_NATIVE_ENTRY(Ffi_dl_getHandle, 0, 1) {
diff --git a/runtime/lib/ffi_dynamic_library_patch.dart b/runtime/lib/ffi_dynamic_library_patch.dart
index db45805..29e8c88 100644
--- a/runtime/lib/ffi_dynamic_library_patch.dart
+++ b/runtime/lib/ffi_dynamic_library_patch.dart
@@ -7,9 +7,9 @@
 DynamicLibrary _open(String name) native "Ffi_dl_open";
 
 @patch
+@pragma("vm:entry-point")
 class DynamicLibrary {
   @patch
-  @pragma("vm:entry-point")
   factory DynamicLibrary.open(String name) {
     return _open(name);
   }
diff --git a/runtime/lib/growable_array.dart b/runtime/lib/growable_array.dart
index e22e8bf..876e6df 100644
--- a/runtime/lib/growable_array.dart
+++ b/runtime/lib/growable_array.dart
@@ -150,7 +150,7 @@
 
   void _setIndexed(int index, T value) native "GrowableList_setIndexed";
 
-  @pragma("vm:entry-point")
+  @pragma("vm:entry-point", "call")
   void add(T value) {
     var len = length;
     if (len == _capacity) {
diff --git a/runtime/lib/identical_patch.dart b/runtime/lib/identical_patch.dart
index 36607fb..7fa8959 100644
--- a/runtime/lib/identical_patch.dart
+++ b/runtime/lib/identical_patch.dart
@@ -9,5 +9,5 @@
 bool identical(Object a, Object b) native "Identical_comparison";
 
 @patch
-@pragma("vm:entry-point")
+@pragma("vm:entry-point", "call")
 int identityHashCode(Object object) => object._identityHashCode;
diff --git a/runtime/lib/internal_patch.dart b/runtime/lib/internal_patch.dart
index 83359ac..1b2bfe6 100644
--- a/runtime/lib/internal_patch.dart
+++ b/runtime/lib/internal_patch.dart
@@ -68,7 +68,7 @@
 
 bool _inquireIs64Bit() native "Internal_inquireIs64Bit";
 
-@pragma("vm:entry-point")
+@pragma("vm:entry-point", "call")
 @pragma("vm:exact-result-type", bool)
 bool _classRangeCheck(int cid, int lowerLimit, int upperLimit) {
   return cid >= lowerLimit && cid <= upperLimit;
@@ -99,13 +99,13 @@
 // function type arguments (may be null). The result is null if both input
 // vectors are null or is a newly allocated and canonicalized vector of length
 // 'totalLen'.
-@pragma("vm:entry-point")
+@pragma("vm:entry-point", "call")
 _prependTypeArguments(functionTypeArguments, parentTypeArguments, parentLen,
     totalLen) native "Internal_prependTypeArguments";
 
 // Check that a set of type arguments satisfy the type parameter bounds on a
 // closure.
-@pragma("vm:entry-point")
+@pragma("vm:entry-point", "call")
 _boundsCheckForPartialInstantiation(closure, typeArgs)
     native "Internal_boundsCheckForPartialInstantiation";
 
diff --git a/runtime/lib/invocation_mirror_patch.dart b/runtime/lib/invocation_mirror_patch.dart
index f982d3a..e7e2fe3 100644
--- a/runtime/lib/invocation_mirror_patch.dart
+++ b/runtime/lib/invocation_mirror_patch.dart
@@ -176,7 +176,7 @@
       this._positionalArguments, this._namedArguments, this._isSuperInvocation,
       [this._delayedTypeArgumentsLen = 0]);
 
-  @pragma("vm:entry-point")
+  @pragma("vm:entry-point", "call")
   static _allocateInvocationMirror(String functionName,
       List argumentsDescriptor, List arguments, bool isSuperInvocation,
       [int type = null]) {
@@ -189,7 +189,7 @@
   // indicate 0 type arguments, but the actual number of type arguments are
   // passed in `delayedTypeArgumentsLen`. If any type arguments are available,
   // the type arguments vector will be the first entry in `arguments`.
-  @pragma("vm:entry-point")
+  @pragma("vm:entry-point", "call")
   static _allocateInvocationMirrorForClosure(
       String functionName,
       List argumentsDescriptor,
diff --git a/runtime/lib/isolate.cc b/runtime/lib/isolate.cc
index b925147..55c61f8 100644
--- a/runtime/lib/isolate.cc
+++ b/runtime/lib/isolate.cc
@@ -130,9 +130,12 @@
 
     // Make a copy of the state's isolate flags and hand it to the callback.
     Dart_IsolateFlags api_flags = *(state_->isolate_flags());
+    const char* name = (state_->debug_name() == NULL) ? state_->function_name()
+                                                      : state_->debug_name();
+    ASSERT(name != NULL);
 
     Isolate* isolate = reinterpret_cast<Isolate*>((callback)(
-        state_->script_url(), state_->function_name(), state_->package_root(),
+        state_->script_url(), name, state_->package_root(),
         state_->package_config(), &api_flags, state_->init_data(), &error));
     state_->DecrementSpawnCount();
     if (isolate == NULL) {
@@ -182,7 +185,7 @@
   return result;
 }
 
-DEFINE_NATIVE_ENTRY(Isolate_spawnFunction, 0, 10) {
+DEFINE_NATIVE_ENTRY(Isolate_spawnFunction, 0, 11) {
   GET_NON_NULL_NATIVE_ARGUMENT(SendPort, port, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(String, script_uri, arguments->NativeArgAt(1));
   GET_NON_NULL_NATIVE_ARGUMENT(Instance, closure, arguments->NativeArgAt(2));
@@ -193,6 +196,7 @@
   GET_NATIVE_ARGUMENT(SendPort, onError, arguments->NativeArgAt(7));
   GET_NATIVE_ARGUMENT(String, packageRoot, arguments->NativeArgAt(8));
   GET_NATIVE_ARGUMENT(String, packageConfig, arguments->NativeArgAt(9));
+  GET_NATIVE_ARGUMENT(String, debugName, arguments->NativeArgAt(10));
 
   if (closure.IsClosure()) {
     Function& func = Function::Handle();
@@ -223,13 +227,15 @@
       const char* utf8_package_root = NULL;
       const char* utf8_package_config =
           packageConfig.IsNull() ? NULL : String2UTF8(packageConfig);
+      const char* utf8_debug_name =
+          debugName.IsNull() ? NULL : String2UTF8(debugName);
 
       IsolateSpawnState* state = new IsolateSpawnState(
           port.Id(), isolate->origin_id(), isolate->init_callback_data(),
           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);
+          on_exit_port, on_error_port, utf8_debug_name);
 
       // Since this is a call to Isolate.spawn, copy the parent isolate's code.
       state->isolate_flags()->copy_parent_code = true;
@@ -285,7 +291,7 @@
   return result;
 }
 
-DEFINE_NATIVE_ENTRY(Isolate_spawnUri, 0, 12) {
+DEFINE_NATIVE_ENTRY(Isolate_spawnUri, 0, 13) {
   GET_NON_NULL_NATIVE_ARGUMENT(SendPort, port, arguments->NativeArgAt(0));
   GET_NON_NULL_NATIVE_ARGUMENT(String, uri, arguments->NativeArgAt(1));
 
@@ -304,6 +310,8 @@
   GET_NATIVE_ARGUMENT(String, packageRoot, arguments->NativeArgAt(10));
   GET_NATIVE_ARGUMENT(String, packageConfig, arguments->NativeArgAt(11));
 
+  GET_NATIVE_ARGUMENT(String, debugName, arguments->NativeArgAt(12));
+
   if (Dart::vm_snapshot_kind() == Snapshot::kFullAOT) {
     const Array& args = Array::Handle(Array::New(1));
     args.SetAt(
@@ -347,12 +355,15 @@
   const char* utf8_package_root = NULL;
   const char* utf8_package_config =
       packageConfig.IsNull() ? NULL : String2UTF8(packageConfig);
+  const char* utf8_debug_name =
+      debugName.IsNull() ? NULL : String2UTF8(debugName);
 
   IsolateSpawnState* state = new IsolateSpawnState(
       port.Id(), isolate->init_callback_data(), canonical_uri,
       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);
+      paused.value(), fatal_errors, on_exit_port, on_error_port,
+      utf8_debug_name);
 
   // If we were passed a value then override the default flags state for
   // checked mode.
@@ -378,6 +389,15 @@
   return Object::null();
 }
 
+DEFINE_NATIVE_ENTRY(Isolate_getDebugName, 0, 1) {
+  GET_NON_NULL_NATIVE_ARGUMENT(SendPort, port, arguments->NativeArgAt(0));
+  Isolate* isolate_lookup = Isolate::LookupIsolateByPort(port.Id());
+  if (isolate_lookup == NULL) {
+    return String::null();
+  }
+  return String::New(isolate_lookup->name());
+}
+
 DEFINE_NATIVE_ENTRY(Isolate_getPortAndCapabilitiesOfCurrentIsolate, 0, 0) {
   const Array& result = Array::Handle(Array::New(3));
   result.SetAt(0, SendPort::Handle(SendPort::New(isolate->main_port())));
diff --git a/runtime/lib/isolate_patch.dart b/runtime/lib/isolate_patch.dart
index a9a6a41..cdd5394 100644
--- a/runtime/lib/isolate_patch.dart
+++ b/runtime/lib/isolate_patch.dart
@@ -107,7 +107,7 @@
   _pendingImmediateCallback = callback;
 }
 
-@pragma("vm:entry-point")
+@pragma("vm:entry-point", "call")
 void _runPendingImmediateCallback() {
   if (_pendingImmediateCallback != null) {
     var callback = _pendingImmediateCallback;
@@ -124,7 +124,7 @@
 
 /// The embedder can execute this function to get hold of
 /// [_isolateScheduleImmediate] above.
-@pragma("vm:entry-point")
+@pragma("vm:entry-point", "call")
 Function _getIsolateScheduleImmediateClosure() {
   return _isolateScheduleImmediate;
 }
@@ -156,14 +156,14 @@
   _get_sendport() native "RawReceivePortImpl_get_sendport";
 
   // Called from the VM to retrieve the handler for a message.
-  @pragma("vm:entry-point")
+  @pragma("vm:entry-point", "call")
   static _lookupHandler(int id) {
     var result = _handlerMap[id];
     return result;
   }
 
   // Called from the VM to dispatch to the handler.
-  @pragma("vm:entry-point")
+  @pragma("vm:entry-point", "call")
   static void _handleMessage(Function handler, var message) {
     // TODO(floitsch): this relies on the fact that any exception aborts the
     // VM. Once we have non-fatal global exceptions we need to catch errors
@@ -197,7 +197,7 @@
 @pragma("vm:entry-point")
 class _SendPortImpl implements SendPort {
   /*--- public interface ---*/
-  @pragma("vm:entry-point")
+  @pragma("vm:entry-point", "call")
   void send(var message) {
     _sendInternal(message);
   }
@@ -227,7 +227,7 @@
  * initial message.  Defers execution of the entry point until the
  * isolate is in the message loop.
  */
-@pragma("vm:entry-point")
+@pragma("vm:entry-point", "call")
 void _startMainIsolate(Function entryPoint, List<String> args) {
   _startIsolate(
       null, // no parent port
@@ -245,7 +245,7 @@
  * once support for @pragma("vm:entry_point", "get") as documented in
  * https://github.com/dart-lang/sdk/issues/35720 lands.
  */
-@pragma("vm:entry-point")
+@pragma("vm:entry-point", "call")
 Function _getStartMainIsolateFunction() {
   return _startMainIsolate;
 }
@@ -254,7 +254,7 @@
  * Takes the real entry point as argument and invokes it with the initial
  * message.
  */
-@pragma("vm:entry-point")
+@pragma("vm:entry-point", "call")
 void _startIsolate(
     SendPort parentPort,
     Function entryPoint,
@@ -316,6 +316,9 @@
   static Isolate get current => _currentIsolate;
 
   @patch
+  String get debugName => _getDebugName(controlPort);
+
+  @patch
   static Future<Uri> get packageRoot {
     var hook = VMLibraryHooks.packageRootUriFuture;
     if (hook == null) {
@@ -352,7 +355,8 @@
       {bool paused: false,
       bool errorsAreFatal,
       SendPort onExit,
-      SendPort onError}) async {
+      SendPort onError,
+      String debugName}) async {
     // `paused` isn't handled yet.
     RawReceivePort readyPort;
     try {
@@ -377,8 +381,18 @@
         script = await Isolate.resolvePackageUri(script);
       }
 
-      _spawnFunction(readyPort.sendPort, script.toString(), entryPoint, message,
-          paused, errorsAreFatal, onExit, onError, null, packageConfig);
+      _spawnFunction(
+          readyPort.sendPort,
+          script.toString(),
+          entryPoint,
+          message,
+          paused,
+          errorsAreFatal,
+          onExit,
+          onError,
+          null,
+          packageConfig,
+          debugName);
       return await _spawnCommon(readyPort);
     } catch (e, st) {
       if (readyPort != null) {
@@ -398,7 +412,8 @@
       Map<String, String> environment,
       Uri packageRoot,
       Uri packageConfig,
-      bool automaticPackageResolution: false}) async {
+      bool automaticPackageResolution: false,
+      String debugName}) async {
     RawReceivePort readyPort;
     if (environment != null) {
       throw new UnimplementedError("environment");
@@ -467,7 +482,8 @@
           null,
           /* environment */
           packageRootString,
-          packageConfigString);
+          packageConfigString,
+          debugName);
       return await _spawnCommon(readyPort);
     } catch (e) {
       if (readyPort != null) {
@@ -524,7 +540,8 @@
       SendPort onExit,
       SendPort onError,
       String packageRoot,
-      String packageConfig) native "Isolate_spawnFunction";
+      String packageConfig,
+      String debugName) native "Isolate_spawnFunction";
 
   static void _spawnUri(
       SendPort readyPort,
@@ -538,10 +555,14 @@
       bool checked,
       List environment,
       String packageRoot,
-      String packageConfig) native "Isolate_spawnUri";
+      String packageConfig,
+      String debugName) native "Isolate_spawnUri";
 
   static void _sendOOB(port, msg) native "Isolate_sendOOB";
 
+  static String _getDebugName(SendPort controlPort)
+      native "Isolate_getDebugName";
+
   @patch
   void _pause(Capability resumeCapability) {
     var msg = new List(4)
diff --git a/runtime/lib/lib_prefix.dart b/runtime/lib/lib_prefix.dart
index c895931..483a660 100644
--- a/runtime/lib/lib_prefix.dart
+++ b/runtime/lib/lib_prefix.dart
@@ -47,7 +47,7 @@
 var _outstandingLoadRequests = new List<List>();
 
 // Called from the VM when an outstanding load request has finished.
-@pragma("vm:entry-point")
+@pragma("vm:entry-point", "call")
 _completeDeferredLoads() {
   // Determine which outstanding load requests have completed and complete
   // their completer (with an error or true). For outstanding load requests
diff --git a/runtime/lib/map_patch.dart b/runtime/lib/map_patch.dart
index a604206..07dbc69 100644
--- a/runtime/lib/map_patch.dart
+++ b/runtime/lib/map_patch.dart
@@ -11,7 +11,7 @@
   // The keys are at position 2*n and are already type checked by the parser
   // in checked mode.
   // The values are at position 2*n+1 and are not yet type checked.
-  @pragma("vm:entry-point")
+  @pragma("vm:entry-point", "call")
   factory Map._fromLiteral(List elements) {
     var map = new LinkedHashMap<K, V>();
     var len = elements.length;
diff --git a/runtime/lib/mirrors.cc b/runtime/lib/mirrors.cc
index 81ce5c3..916649f 100644
--- a/runtime/lib/mirrors.cc
+++ b/runtime/lib/mirrors.cc
@@ -274,6 +274,8 @@
       ((is_ctor && func.is_redirecting()) << Mirrors::kRedirectingCtor);
   kind_flags |= ((is_ctor && func.IsFactory()) << Mirrors::kFactoryCtor);
   kind_flags |= (func.is_external() << Mirrors::kExternal);
+  bool is_synthetic = func.is_no_such_method_forwarder();
+  kind_flags |= (is_synthetic << Mirrors::kSynthetic);
   args.SetAt(5, Smi::Handle(Smi::New(kind_flags)));
 
   return CreateMirror(Symbols::_LocalMethodMirror(), args);
@@ -551,15 +553,22 @@
   const Library& lib = Library::Handle(zone, Library::MirrorsLibrary());
   const Class& cls = Class::Handle(
       zone, lib.LookupClassAllowPrivate(Symbols::_LocalMethodMirror()));
-  const Error& error = Error::Handle(zone, cls.EnsureIsFinalized(thread));
+  Error& error = Error::Handle(zone);
+  error ^= cls.EnsureIsFinalized(thread);
   ASSERT(error.IsNull());
 
-  Field& field = Field::Handle();
-  Smi& value = Smi::Handle();
+  Field& field = Field::Handle(zone);
+  Smi& value = Smi::Handle(zone);
+  String& fname = String::Handle(zone);
 
 #define CHECK_KIND_SHIFT(name)                                                 \
-  field = cls.LookupField(String::Handle(String::New(#name)));                 \
+  fname ^= String::New(#name);                                                 \
+  field = cls.LookupField(fname);                                              \
   ASSERT(!field.IsNull());                                                     \
+  if (field.IsUninitialized()) {                                               \
+    error ^= field.Initialize();                                               \
+    ASSERT(error.IsNull());                                                    \
+  }                                                                            \
   value ^= field.StaticValue();                                                \
   ASSERT(value.Value() == Mirrors::name);
   MIRRORS_KIND_SHIFT_LIST(CHECK_KIND_SHIFT)
diff --git a/runtime/lib/mirrors.h b/runtime/lib/mirrors.h
index d6a5398..7a6fe4a 100644
--- a/runtime/lib/mirrors.h
+++ b/runtime/lib/mirrors.h
@@ -20,7 +20,8 @@
   V(kGenerativeCtor)                                                           \
   V(kRedirectingCtor)                                                          \
   V(kFactoryCtor)                                                              \
-  V(kExternal)
+  V(kExternal)                                                                 \
+  V(kSynthetic)
 
   // These offsets much be kept in sync with those in mirrors_impl.dart.
   enum KindShifts {
diff --git a/runtime/lib/mirrors_impl.dart b/runtime/lib/mirrors_impl.dart
index b11223b..0047640 100644
--- a/runtime/lib/mirrors_impl.dart
+++ b/runtime/lib/mirrors_impl.dart
@@ -1181,6 +1181,7 @@
   static const kRedirectingCtor = 6;
   static const kFactoryCtor = 7;
   static const kExternal = 8;
+  static const kSynthetic = 9;
 
   // These offsets much be kept in sync with those in mirrors.h.
   bool get isAbstract => 0 != (_kindFlags & (1 << kAbstract));
@@ -1194,6 +1195,7 @@
       0 != (_kindFlags & (1 << kRedirectingCtor));
   bool get isFactoryConstructor => 0 != (_kindFlags & (1 << kFactoryCtor));
   bool get isExternal => 0 != (_kindFlags & (1 << kExternal));
+  bool get isSynthetic => 0 != (_kindFlags & (1 << kSynthetic));
 
   static const _operators = const [
     "%", "&", "*", "+", "-", "/", "<", "<<", //
@@ -1216,7 +1218,6 @@
       _n(simpleName).startsWith('_') || _n(constructorName).startsWith('_');
 
   bool get isTopLevel => owner is LibraryMirror;
-  bool get isSynthetic => false;
 
   TypeMirror _returnType;
   TypeMirror get returnType {
diff --git a/runtime/lib/object_patch.dart b/runtime/lib/object_patch.dart
index 20e62c3..c6dbf5b 100644
--- a/runtime/lib/object_patch.dart
+++ b/runtime/lib/object_patch.dart
@@ -44,7 +44,7 @@
   static String _toString(obj) native "Object_toString";
 
   @patch
-  @pragma("vm:entry-point")
+  @pragma("vm:entry-point", "call")
   dynamic noSuchMethod(Invocation invocation) {
     // TODO(regis): Remove temp constructor identifier 'withInvocation'.
     throw new NoSuchMethodError.withInvocation(this, invocation);
@@ -54,21 +54,21 @@
   @pragma("vm:exact-result-type", "dart:core#_Type")
   Type get runtimeType native "Object_runtimeType";
 
-  @pragma("vm:entry-point")
+  @pragma("vm:entry-point", "call")
   @pragma("vm:exact-result-type", bool)
   static bool _haveSameRuntimeType(a, b) native "Object_haveSameRuntimeType";
 
   // Call this function instead of inlining instanceof, thus collecting
   // type feedback and reducing code size of unoptimized code.
-  @pragma("vm:entry-point")
+  @pragma("vm:entry-point", "call")
   bool _instanceOf(instantiatorTypeArguments, functionTypeArguments, type)
       native "Object_instanceOf";
 
   // Group of functions for implementing fast simple instance of.
-  @pragma("vm:entry-point")
+  @pragma("vm:entry-point", "call")
   bool _simpleInstanceOf(type) native "Object_simpleInstanceOf";
-  @pragma("vm:entry-point")
+  @pragma("vm:entry-point", "call")
   bool _simpleInstanceOfTrue(type) => true;
-  @pragma("vm:entry-point")
+  @pragma("vm:entry-point", "call")
   bool _simpleInstanceOfFalse(type) => false;
 }
diff --git a/runtime/lib/regexp.cc b/runtime/lib/regexp.cc
index aa58c5f..4dba76e 100644
--- a/runtime/lib/regexp.cc
+++ b/runtime/lib/regexp.cc
@@ -60,6 +60,22 @@
     return regexp.num_bracket_expressions();
   }
   const String& pattern = String::Handle(regexp.pattern());
+  const String& errmsg =
+      String::Handle(String::New("Regular expression is not initialized yet."));
+  const String& message = String::Handle(String::Concat(errmsg, pattern));
+  const Array& args = Array::Handle(Array::New(1));
+  args.SetAt(0, message);
+  Exceptions::ThrowByType(Exceptions::kFormat, args);
+  return Object::null();
+}
+
+DEFINE_NATIVE_ENTRY(RegExp_getGroupNameMap, 0, 1) {
+  const RegExp& regexp = RegExp::CheckedHandle(zone, arguments->NativeArgAt(0));
+  ASSERT(!regexp.IsNull());
+  if (regexp.is_initialized()) {
+    return regexp.capture_name_map();
+  }
+  const String& pattern = String::Handle(regexp.pattern());
   const String& errmsg = String::Handle(
       String::New("Regular expression is not initialized yet. "));
   const String& message = String::Handle(String::Concat(errmsg, pattern));
diff --git a/runtime/lib/regexp_patch.dart b/runtime/lib/regexp_patch.dart
index de20a72..4eac446 100644
--- a/runtime/lib/regexp_patch.dart
+++ b/runtime/lib/regexp_patch.dart
@@ -104,6 +104,8 @@
       new LinkedList<_RegExpHashKey>();
 
   int get _groupCount;
+  Iterable<String> get _groupNames;
+  int _groupNameIndex(String name);
 }
 
 // Represents both a key in the regular expression cache as well as its
@@ -133,7 +135,7 @@
   _RegExpHashValue(this.regexp, this.key);
 }
 
-class _RegExpMatch implements Match {
+class _RegExpMatch implements RegExpMatch {
   _RegExpMatch(this._regexp, this.input, this._match);
 
   int get start => _start(0);
@@ -176,6 +178,18 @@
 
   Pattern get pattern => _regexp;
 
+  String namedGroup(String name) {
+    var idx = _regexp._groupNameIndex(name);
+    if (idx < 0) {
+      throw ArgumentError("Not a capture group name: ${name}");
+    }
+    return group(idx);
+  }
+
+  Iterable<String> get groupNames {
+    return _regexp._groupNames;
+  }
+
   final RegExp _regexp;
   final String input;
   final List<int> _match;
@@ -240,6 +254,28 @@
 
   int get _groupCount native "RegExp_getGroupCount";
 
+  // Returns a List [String, int, String, int, ...] where each
+  // String is the name of a capture group and the following
+  // int is that capture group's index.
+  List get _groupNameList native "RegExp_getGroupNameMap";
+
+  Iterable<String> get _groupNames sync* {
+    final nameList = _groupNameList;
+    for (var i = 0; i < nameList.length; i += 2) {
+      yield nameList[i] as String;
+    }
+  }
+
+  int _groupNameIndex(String name) {
+    var nameList = _groupNameList;
+    for (var i = 0; i < nameList.length; i += 2) {
+      if (name == nameList[i]) {
+        return nameList[i + 1];
+      }
+    }
+    return -1;
+  }
+
   // Byte map of one byte characters with a 0xff if the character is a word
   // character (digit, letter or underscore) and 0x00 otherwise.
   // Used by generated RegExp code.
diff --git a/runtime/lib/schedule_microtask_patch.dart b/runtime/lib/schedule_microtask_patch.dart
index 58e30e7..0f90f1e 100644
--- a/runtime/lib/schedule_microtask_patch.dart
+++ b/runtime/lib/schedule_microtask_patch.dart
@@ -21,12 +21,12 @@
   static _ScheduleImmediateClosure _closure;
 }
 
-@pragma("vm:entry-point")
+@pragma("vm:entry-point", "call")
 void _setScheduleImmediateClosure(_ScheduleImmediateClosure closure) {
   _ScheduleImmediate._closure = closure;
 }
 
-@pragma("vm:entry-point")
+@pragma("vm:entry-point", "call")
 void _ensureScheduleImmediate() {
   _AsyncRun._scheduleImmediate(_startMicrotaskLoop);
 }
diff --git a/runtime/lib/stopwatch_patch.dart b/runtime/lib/stopwatch_patch.dart
index 3e8a55c..87bc584 100644
--- a/runtime/lib/stopwatch_patch.dart
+++ b/runtime/lib/stopwatch_patch.dart
@@ -6,6 +6,8 @@
 
 @patch
 class Stopwatch {
+  static const _maxInt = 0x7FFFFFFFFFFFFFFF;
+
   @patch
   static void _initTicker() {
     if (_frequency == null) {
@@ -19,4 +21,36 @@
 
   // Returns the frequency of clock ticks in Hz.
   static int _computeFrequency() native "Stopwatch_frequency";
+
+  @patch
+  int get elapsedMicroseconds {
+    int ticks = elapsedTicks;
+    // Special case the more likely frequencies to avoid division,
+    // or divide by a known value.
+    if (_frequency == 1000000000) return ticks ~/ 1000;
+    if (_frequency == 1000000) return ticks;
+    if (_frequency == 1000) return ticks * 1000;
+    if (ticks <= (_maxInt ~/ 1000000)) {
+      return (ticks * 1000000) ~/ _frequency;
+    }
+    // Multiplication would have overflowed.
+    int ticksPerSecond = ticks ~/ _frequency;
+    int remainingTicks = ticks.remainder(_frequency);
+    return ticksPerSecond * 1000000 + (remainingTicks * 1000000) ~/ _frequency;
+  }
+
+  @patch
+  int get elapsedMilliseconds {
+    int ticks = elapsedTicks;
+    if (_frequency == 1000000000) return ticks ~/ 1000000;
+    if (_frequency == 1000000) return ticks ~/ 1000;
+    if (_frequency == 1000) return ticks;
+    if (ticks <= (_maxInt ~/ 1000)) {
+      return (ticks * 1000) ~/ _frequency;
+    }
+    // Multiplication would have overflowed.
+    int ticksPerSecond = ticks ~/ _frequency;
+    int remainingTicks = ticks.remainder(_frequency);
+    return ticksPerSecond * 1000 + (remainingTicks * 1000) ~/ _frequency;
+  }
 }
diff --git a/runtime/lib/string.cc b/runtime/lib/string.cc
index 5592f20..5402def 100644
--- a/runtime/lib/string.cc
+++ b/runtime/lib/string.cc
@@ -328,15 +328,15 @@
       Exceptions::ThrowByType(Exceptions::kArgument, args);
     }
     return OneByteString::New(array, start, length, space);
-  } else if (RawObject::IsTypedDataViewClassId(list.GetClassId())) {
-    const Instance& view = Instance::Cast(list);
-    if (end > Smi::Value(TypedDataView::Length(view))) {
+  } else if (list.IsTypedDataView()) {
+    const auto& view = TypedDataView::Cast(list);
+    if (end > Smi::Value(view.length())) {
       const Array& args = Array::Handle(Array::New(1));
       args.SetAt(0, end_obj);
       Exceptions::ThrowByType(Exceptions::kArgument, args);
     }
-    const Instance& data_obj = Instance::Handle(TypedDataView::Data(view));
-    intptr_t data_offset = Smi::Value(TypedDataView::OffsetInBytes(view));
+    const Instance& data_obj = Instance::Handle(view.typed_data());
+    intptr_t data_offset = Smi::Value(view.offset_in_bytes());
     if (data_obj.IsTypedData()) {
       const TypedData& array = TypedData::Cast(data_obj);
       return OneByteString::New(array, data_offset + start, length, space);
@@ -422,16 +422,16 @@
     }
     return TwoByteString::New(array, start * sizeof(uint16_t), length, space);
   } else if (RawObject::IsTypedDataViewClassId(list.GetClassId())) {
+    const auto& view = TypedDataView::Cast(list);
     const intptr_t cid = list.GetClassId();
     if (cid != kTypedDataUint16ArrayViewCid) {
       Exceptions::ThrowArgumentError(list);
     }
-    if (end > Smi::Value(TypedDataView::Length(list))) {
+    if (end > Smi::Value(view.length())) {
       Exceptions::ThrowArgumentError(end_obj);
     }
-    const Instance& data_obj =
-        Instance::Handle(zone, TypedDataView::Data(list));
-    intptr_t data_offset = Smi::Value(TypedDataView::OffsetInBytes(list));
+    const auto& data_obj = Instance::Handle(zone, view.typed_data());
+    const intptr_t data_offset = Smi::Value(view.offset_in_bytes());
     if (data_obj.IsTypedData()) {
       const TypedData& array = TypedData::Cast(data_obj);
       return TwoByteString::New(array, data_offset + start * sizeof(uint16_t),
diff --git a/runtime/lib/string_patch.dart b/runtime/lib/string_patch.dart
index e90667a..1099263 100644
--- a/runtime/lib/string_patch.dart
+++ b/runtime/lib/string_patch.dart
@@ -224,8 +224,7 @@
     var s = _OneByteString._allocate(len);
 
     // Special case for _Uint8ArrayView.
-    final cid = ClassID.getID(charCodes);
-    if (identical(cid, ClassID.cidUint8ArrayView)) {
+    if (charCodes is Uint8List) {
       if (start >= 0 && len >= 0) {
         for (int i = 0; i < len; i++) {
           s._setAt(i, charCodes[start + i]);
@@ -628,10 +627,13 @@
   String replaceAll(Pattern pattern, String replacement) {
     if (pattern == null) throw new ArgumentError.notNull("pattern");
     if (replacement == null) throw new ArgumentError.notNull("replacement");
-    List matches = [];
-    int length = 0;
-    int replacementLength = replacement.length;
+
     int startIndex = 0;
+    // String fragments that replace the the prefix [this] up to [startIndex].
+    List matches = [];
+    int length = 0; // Length of all fragments.
+    int replacementLength = replacement.length;
+
     if (replacementLength == 0) {
       for (Match match in pattern.allMatches(this)) {
         length += _addReplaceSlice(matches, startIndex, match.start);
@@ -645,6 +647,8 @@
         startIndex = match.end;
       }
     }
+    // No match, or a zero-length match at start with zero-length replacement.
+    if (startIndex == 0 && length == 0) return this;
     length += _addReplaceSlice(matches, startIndex, this.length);
     bool replacementIsOneByte = replacement._isOneByte;
     if (replacementIsOneByte &&
@@ -811,7 +815,7 @@
   }
 
   // Convert single object to string.
-  @pragma("vm:entry-point")
+  @pragma("vm:entry-point", "call")
   static String _interpolateSingle(Object o) {
     if (o is String) return o;
     final s = o.toString();
@@ -826,7 +830,7 @@
    * into a result string.
    * Modifies the input list if it contains non-`String` values.
    */
-  @pragma("vm:entry-point")
+  @pragma("vm:entry-point", "call")
   static String _interpolate(final List values) {
     final numValues = values.length;
     int totalLength = 0;
diff --git a/runtime/lib/timer_impl.dart b/runtime/lib/timer_impl.dart
index 01db53f..d61c71d 100644
--- a/runtime/lib/timer_impl.dart
+++ b/runtime/lib/timer_impl.dart
@@ -430,9 +430,10 @@
 
   // Cancel pending wakeups in the event handler.
   static void _cancelWakeup() {
-    assert(_sendPort != null);
-    VMLibraryHooks.eventHandlerSendData(null, _sendPort, _NO_TIMER);
-    _scheduledWakeupTime = null;
+    if (_sendPort != null) {
+      VMLibraryHooks.eventHandlerSendData(null, _sendPort, _NO_TIMER);
+      _scheduledWakeupTime = null;
+    }
   }
 
   // Create a receive port and register a message handler for the timer
@@ -462,7 +463,7 @@
   }
 }
 
-@pragma("vm:entry-point")
+@pragma("vm:entry-point", "call")
 _setupHooks() {
   VMLibraryHooks.timerFactory = _Timer._factory;
 }
diff --git a/runtime/lib/typed_data.cc b/runtime/lib/typed_data.cc
index 4a373fc..af97a0f 100644
--- a/runtime/lib/typed_data.cc
+++ b/runtime/lib/typed_data.cc
@@ -28,6 +28,15 @@
   }
 }
 
+static void AlignmentCheck(intptr_t offset_in_bytes, intptr_t element_size) {
+  if ((offset_in_bytes % element_size) != 0) {
+    const auto& error = String::Handle(String::NewFormatted(
+        "Offset in bytes (%" Pd ") must be a multiple of %" Pd "",
+        offset_in_bytes, element_size));
+    Exceptions::ThrowArgumentError(error);
+  }
+}
+
 // Checks to see if a length will not result in an OOM error.
 static void LengthCheck(intptr_t len, intptr_t max) {
   if (len < 0 || len > max) {
@@ -53,6 +62,27 @@
   return Integer::null();
 }
 
+DEFINE_NATIVE_ENTRY(TypedDataView_offsetInBytes, 0, 1) {
+  // "this" is either a _*ArrayView class or _ByteDataView.
+  GET_NON_NULL_NATIVE_ARGUMENT(Instance, instance, arguments->NativeArgAt(0));
+  ASSERT(instance.IsTypedDataView());
+  return TypedDataView::Cast(instance).offset_in_bytes();
+}
+
+DEFINE_NATIVE_ENTRY(TypedDataView_length, 0, 1) {
+  // "this" is either a _*ArrayView class or _ByteDataView.
+  GET_NON_NULL_NATIVE_ARGUMENT(Instance, instance, arguments->NativeArgAt(0));
+  ASSERT(instance.IsTypedDataView());
+  return TypedDataView::Cast(instance).length();
+}
+
+DEFINE_NATIVE_ENTRY(TypedDataView_typedData, 0, 1) {
+  // "this" is either a _*ArrayView class or _ByteDataView.
+  GET_NON_NULL_NATIVE_ARGUMENT(Instance, instance, arguments->NativeArgAt(0));
+  ASSERT(instance.IsTypedDataView());
+  return TypedDataView::Cast(instance).typed_data();
+}
+
 template <typename DstType, typename SrcType>
 static RawBool* CopyData(const Instance& dst,
                          const Instance& src,
@@ -160,9 +190,9 @@
 #define TYPED_DATA_NEW(name)                                                   \
   DEFINE_NATIVE_ENTRY(TypedData_##name##_new, 0, 2) {                          \
     GET_NON_NULL_NATIVE_ARGUMENT(Smi, length, arguments->NativeArgAt(1));      \
-    intptr_t cid = kTypedData##name##Cid;                                      \
-    intptr_t len = length.Value();                                             \
-    intptr_t max = TypedData::MaxElements(cid);                                \
+    const intptr_t cid = kTypedData##name##Cid;                                \
+    const intptr_t len = length.Value();                                       \
+    const intptr_t max = TypedData::MaxElements(cid);                          \
     LengthCheck(len, max);                                                     \
     return TypedData::New(cid, len);                                           \
   }
@@ -170,6 +200,31 @@
 #define TYPED_DATA_NEW_NATIVE(name) TYPED_DATA_NEW(name)
 
 CLASS_LIST_TYPED_DATA(TYPED_DATA_NEW_NATIVE)
+#undef TYPED_DATA_NEW_NATIVE
+#undef TYPED_DATA_NEW
+
+#define TYPED_DATA_VIEW_NEW(native_name, cid)                                  \
+  DEFINE_NATIVE_ENTRY(native_name, 0, 4) {                                     \
+    GET_NON_NULL_NATIVE_ARGUMENT(TypedDataBase, typed_data,                    \
+                                 arguments->NativeArgAt(1));                   \
+    GET_NON_NULL_NATIVE_ARGUMENT(Smi, offset, arguments->NativeArgAt(2));      \
+    GET_NON_NULL_NATIVE_ARGUMENT(Smi, len, arguments->NativeArgAt(3));         \
+    const intptr_t backing_length = typed_data.LengthInBytes();                \
+    const intptr_t offset_in_bytes = offset.Value();                           \
+    const intptr_t length = len.Value();                                       \
+    const intptr_t element_size = TypedDataBase::ElementSizeInBytes(cid);      \
+    AlignmentCheck(offset_in_bytes, element_size);                             \
+    LengthCheck(offset_in_bytes + length * element_size, backing_length);      \
+    return TypedDataView::New(cid, typed_data, offset_in_bytes, length);       \
+  }
+
+#define TYPED_DATA_NEW_NATIVE(name)                                            \
+  TYPED_DATA_VIEW_NEW(TypedDataView_##name##View_new, kTypedData##name##ViewCid)
+
+CLASS_LIST_TYPED_DATA(TYPED_DATA_NEW_NATIVE)
+TYPED_DATA_VIEW_NEW(TypedDataView_ByteDataView_new, kByteDataViewCid)
+#undef TYPED_DATA_NEW_NATIVE
+#undef TYPED_DATA_VIEW_NEW
 
 #define TYPED_DATA_GETTER(getter, object, ctor, access_size)                   \
   DEFINE_NATIVE_ENTRY(TypedData_##getter, 0, 2) {                              \
diff --git a/runtime/lib/typed_data_patch.dart b/runtime/lib/typed_data_patch.dart
index 56d4fe3..7af2181 100644
--- a/runtime/lib/typed_data_patch.dart
+++ b/runtime/lib/typed_data_patch.dart
@@ -1914,7 +1914,7 @@
     length ??= (this.lengthInBytes - offsetInBytes) ~/ Int8List.bytesPerElement;
     _rangeCheck(
         this.lengthInBytes, offsetInBytes, length * Int8List.bytesPerElement);
-    return new _Int8ArrayView(this, offsetInBytes, length);
+    return new _Int8ArrayView(this._data, offsetInBytes, length);
   }
 
   Uint8List asUint8List([int offsetInBytes = 0, int length]) {
@@ -1922,7 +1922,7 @@
         (this.lengthInBytes - offsetInBytes) ~/ Uint8List.bytesPerElement;
     _rangeCheck(
         this.lengthInBytes, offsetInBytes, length * Uint8List.bytesPerElement);
-    return new _Uint8ArrayView(this, offsetInBytes, length);
+    return new _Uint8ArrayView(this._data, offsetInBytes, length);
   }
 
   Uint8ClampedList asUint8ClampedList([int offsetInBytes = 0, int length]) {
@@ -1930,7 +1930,7 @@
         Uint8ClampedList.bytesPerElement;
     _rangeCheck(this.lengthInBytes, offsetInBytes,
         length * Uint8ClampedList.bytesPerElement);
-    return new _Uint8ClampedArrayView(this, offsetInBytes, length);
+    return new _Uint8ClampedArrayView(this._data, offsetInBytes, length);
   }
 
   Int16List asInt16List([int offsetInBytes = 0, int length]) {
@@ -1938,7 +1938,8 @@
         (this.lengthInBytes - offsetInBytes) ~/ Int16List.bytesPerElement;
     _rangeCheck(
         this.lengthInBytes, offsetInBytes, length * Int16List.bytesPerElement);
-    return new _Int16ArrayView(this, offsetInBytes, length);
+    _offsetAlignmentCheck(offsetInBytes, Int16List.bytesPerElement);
+    return new _Int16ArrayView(this._data, offsetInBytes, length);
   }
 
   Uint16List asUint16List([int offsetInBytes = 0, int length]) {
@@ -1946,7 +1947,8 @@
         (this.lengthInBytes - offsetInBytes) ~/ Uint16List.bytesPerElement;
     _rangeCheck(
         this.lengthInBytes, offsetInBytes, length * Uint16List.bytesPerElement);
-    return new _Uint16ArrayView(this, offsetInBytes, length);
+    _offsetAlignmentCheck(offsetInBytes, Uint16List.bytesPerElement);
+    return new _Uint16ArrayView(this._data, offsetInBytes, length);
   }
 
   Int32List asInt32List([int offsetInBytes = 0, int length]) {
@@ -1954,7 +1956,8 @@
         (this.lengthInBytes - offsetInBytes) ~/ Int32List.bytesPerElement;
     _rangeCheck(
         this.lengthInBytes, offsetInBytes, length * Int32List.bytesPerElement);
-    return new _Int32ArrayView(this, offsetInBytes, length);
+    _offsetAlignmentCheck(offsetInBytes, Int32List.bytesPerElement);
+    return new _Int32ArrayView(this._data, offsetInBytes, length);
   }
 
   Uint32List asUint32List([int offsetInBytes = 0, int length]) {
@@ -1962,7 +1965,8 @@
         (this.lengthInBytes - offsetInBytes) ~/ Uint32List.bytesPerElement;
     _rangeCheck(
         this.lengthInBytes, offsetInBytes, length * Uint32List.bytesPerElement);
-    return new _Uint32ArrayView(this, offsetInBytes, length);
+    _offsetAlignmentCheck(offsetInBytes, Uint32List.bytesPerElement);
+    return new _Uint32ArrayView(this._data, offsetInBytes, length);
   }
 
   Int64List asInt64List([int offsetInBytes = 0, int length]) {
@@ -1970,7 +1974,8 @@
         (this.lengthInBytes - offsetInBytes) ~/ Int64List.bytesPerElement;
     _rangeCheck(
         this.lengthInBytes, offsetInBytes, length * Int64List.bytesPerElement);
-    return new _Int64ArrayView(this, offsetInBytes, length);
+    _offsetAlignmentCheck(offsetInBytes, Int64List.bytesPerElement);
+    return new _Int64ArrayView(this._data, offsetInBytes, length);
   }
 
   Uint64List asUint64List([int offsetInBytes = 0, int length]) {
@@ -1978,7 +1983,8 @@
         (this.lengthInBytes - offsetInBytes) ~/ Uint64List.bytesPerElement;
     _rangeCheck(
         this.lengthInBytes, offsetInBytes, length * Uint64List.bytesPerElement);
-    return new _Uint64ArrayView(this, offsetInBytes, length);
+    _offsetAlignmentCheck(offsetInBytes, Uint64List.bytesPerElement);
+    return new _Uint64ArrayView(this._data, offsetInBytes, length);
   }
 
   Float32List asFloat32List([int offsetInBytes = 0, int length]) {
@@ -1986,7 +1992,8 @@
         (this.lengthInBytes - offsetInBytes) ~/ Float32List.bytesPerElement;
     _rangeCheck(this.lengthInBytes, offsetInBytes,
         length * Float32List.bytesPerElement);
-    return new _Float32ArrayView(this, offsetInBytes, length);
+    _offsetAlignmentCheck(offsetInBytes, Float32List.bytesPerElement);
+    return new _Float32ArrayView(this._data, offsetInBytes, length);
   }
 
   Float64List asFloat64List([int offsetInBytes = 0, int length]) {
@@ -1994,7 +2001,8 @@
         (this.lengthInBytes - offsetInBytes) ~/ Float64List.bytesPerElement;
     _rangeCheck(this.lengthInBytes, offsetInBytes,
         length * Float64List.bytesPerElement);
-    return new _Float64ArrayView(this, offsetInBytes, length);
+    _offsetAlignmentCheck(offsetInBytes, Float64List.bytesPerElement);
+    return new _Float64ArrayView(this._data, offsetInBytes, length);
   }
 
   Float32x4List asFloat32x4List([int offsetInBytes = 0, int length]) {
@@ -2002,7 +2010,8 @@
         (this.lengthInBytes - offsetInBytes) ~/ Float32x4List.bytesPerElement;
     _rangeCheck(this.lengthInBytes, offsetInBytes,
         length * Float32x4List.bytesPerElement);
-    return new _Float32x4ArrayView(this, offsetInBytes, length);
+    _offsetAlignmentCheck(offsetInBytes, Float32x4List.bytesPerElement);
+    return new _Float32x4ArrayView(this._data, offsetInBytes, length);
   }
 
   Int32x4List asInt32x4List([int offsetInBytes = 0, int length]) {
@@ -2010,7 +2019,8 @@
         (this.lengthInBytes - offsetInBytes) ~/ Int32x4List.bytesPerElement;
     _rangeCheck(this.lengthInBytes, offsetInBytes,
         length * Int32x4List.bytesPerElement);
-    return new _Int32x4ArrayView(this, offsetInBytes, length);
+    _offsetAlignmentCheck(offsetInBytes, Int32x4List.bytesPerElement);
+    return new _Int32x4ArrayView(this._data, offsetInBytes, length);
   }
 
   Float64x2List asFloat64x2List([int offsetInBytes = 0, int length]) {
@@ -2018,7 +2028,8 @@
         (this.lengthInBytes - offsetInBytes) ~/ Float64x2List.bytesPerElement;
     _rangeCheck(this.lengthInBytes, offsetInBytes,
         length * Float64x2List.bytesPerElement);
-    return new _Float64x2ArrayView(this, offsetInBytes, length);
+    _offsetAlignmentCheck(offsetInBytes, Float64x2List.bytesPerElement);
+    return new _Float64x2ArrayView(this._data, offsetInBytes, length);
   }
 }
 
@@ -3562,11 +3573,6 @@
 }
 
 abstract class _TypedListView extends _TypedListBase implements TypedData {
-  _TypedListView(_ByteBuffer _buffer, int _offset, int _length)
-      : _typedData = _buffer._data,
-        offsetInBytes = _offset,
-        length = _length;
-
   // Method(s) implementing the TypedData interface.
 
   int get lengthInBytes {
@@ -3578,13 +3584,13 @@
   }
 
   @pragma("vm:non-nullable-result-type")
-  final _TypedList _typedData;
+  _TypedList get _typedData native "TypedDataView_typedData";
 
   @pragma("vm:exact-result-type", "dart:core#_Smi")
-  final int offsetInBytes;
+  int get offsetInBytes native "TypedDataView_offsetInBytes";
 
   @pragma("vm:exact-result-type", "dart:core#_Smi")
-  final int length;
+  int get length native "TypedDataView_length";
 }
 
 @pragma("vm:entry-point")
@@ -3592,8 +3598,9 @@
     with _IntListMixin
     implements Int8List {
   // Constructor.
-  _Int8ArrayView(_ByteBuffer buffer, int offsetInBytes, int length)
-      : super(buffer, offsetInBytes, length);
+  @pragma("vm:exact-result-type", _Int8ArrayView)
+  factory _Int8ArrayView(_TypedList buffer, int offsetInBytes, int length)
+      native "TypedDataView_Int8ArrayView_new";
 
   // Method(s) implementing List interface.
   int operator [](int index) {
@@ -3628,8 +3635,9 @@
     with _IntListMixin
     implements Uint8List {
   // Constructor.
-  _Uint8ArrayView(_ByteBuffer buffer, int offsetInBytes, int length)
-      : super(buffer, offsetInBytes, length);
+  @pragma("vm:exact-result-type", _Uint8ArrayView)
+  factory _Uint8ArrayView(_TypedList buffer, int offsetInBytes, int length)
+      native "TypedDataView_Uint8ArrayView_new";
 
   // Method(s) implementing List interface.
   int operator [](int index) {
@@ -3664,8 +3672,9 @@
     with _IntListMixin
     implements Uint8ClampedList {
   // Constructor.
-  _Uint8ClampedArrayView(_ByteBuffer buffer, int _offsetInBytes, int _length)
-      : super(buffer, _offsetInBytes, _length);
+  @pragma("vm:exact-result-type", _Uint8ClampedArrayView)
+  factory _Uint8ClampedArrayView(_TypedList buffer, int offsetInBytes,
+      int length) native "TypedDataView_Uint8ClampedArrayView_new";
 
   // Method(s) implementing List interface.
   int operator [](int index) {
@@ -3700,10 +3709,9 @@
     with _IntListMixin
     implements Int16List {
   // Constructor.
-  _Int16ArrayView(_ByteBuffer buffer, int _offsetInBytes, int _length)
-      : super(buffer, _offsetInBytes, _length) {
-    _offsetAlignmentCheck(_offsetInBytes, Int16List.bytesPerElement);
-  }
+  @pragma("vm:exact-result-type", _Int16ArrayView)
+  factory _Int16ArrayView(_TypedList buffer, int offsetInBytes, int length)
+      native "TypedDataView_Int16ArrayView_new";
 
   // Method(s) implementing List interface.
   int operator [](int index) {
@@ -3750,10 +3758,9 @@
     with _IntListMixin
     implements Uint16List {
   // Constructor.
-  _Uint16ArrayView(_ByteBuffer buffer, int _offsetInBytes, int _length)
-      : super(buffer, _offsetInBytes, _length) {
-    _offsetAlignmentCheck(_offsetInBytes, Uint16List.bytesPerElement);
-  }
+  @pragma("vm:exact-result-type", _Uint16ArrayView)
+  factory _Uint16ArrayView(_TypedList buffer, int offsetInBytes, int length)
+      native "TypedDataView_Uint16ArrayView_new";
 
   // Method(s) implementing List interface.
   int operator [](int index) {
@@ -3801,10 +3808,9 @@
     with _IntListMixin
     implements Int32List {
   // Constructor.
-  _Int32ArrayView(_ByteBuffer buffer, int _offsetInBytes, int _length)
-      : super(buffer, _offsetInBytes, _length) {
-    _offsetAlignmentCheck(_offsetInBytes, Int32List.bytesPerElement);
-  }
+  @pragma("vm:exact-result-type", _Int32ArrayView)
+  factory _Int32ArrayView(_TypedList buffer, int offsetInBytes, int length)
+      native "TypedDataView_Int32ArrayView_new";
 
   // Method(s) implementing List interface.
   int operator [](int index) {
@@ -3839,10 +3845,9 @@
     with _IntListMixin
     implements Uint32List {
   // Constructor.
-  _Uint32ArrayView(_ByteBuffer buffer, int _offsetInBytes, int _length)
-      : super(buffer, _offsetInBytes, _length) {
-    _offsetAlignmentCheck(_offsetInBytes, Uint32List.bytesPerElement);
-  }
+  @pragma("vm:exact-result-type", _Uint32ArrayView)
+  factory _Uint32ArrayView(_TypedList buffer, int offsetInBytes, int length)
+      native "TypedDataView_Uint32ArrayView_new";
 
   // Method(s) implementing List interface.
   int operator [](int index) {
@@ -3877,10 +3882,9 @@
     with _IntListMixin
     implements Int64List {
   // Constructor.
-  _Int64ArrayView(_ByteBuffer buffer, int _offsetInBytes, int _length)
-      : super(buffer, _offsetInBytes, _length) {
-    _offsetAlignmentCheck(_offsetInBytes, Int64List.bytesPerElement);
-  }
+  @pragma("vm:exact-result-type", _Int64ArrayView)
+  factory _Int64ArrayView(_TypedList buffer, int offsetInBytes, int length)
+      native "TypedDataView_Int64ArrayView_new";
 
   // Method(s) implementing List interface.
   int operator [](int index) {
@@ -3915,10 +3919,9 @@
     with _IntListMixin
     implements Uint64List {
   // Constructor.
-  _Uint64ArrayView(_ByteBuffer buffer, int _offsetInBytes, int _length)
-      : super(buffer, _offsetInBytes, _length) {
-    _offsetAlignmentCheck(_offsetInBytes, Uint64List.bytesPerElement);
-  }
+  @pragma("vm:exact-result-type", _Uint64ArrayView)
+  factory _Uint64ArrayView(_TypedList buffer, int offsetInBytes, int length)
+      native "TypedDataView_Uint64ArrayView_new";
 
   // Method(s) implementing List interface.
   int operator [](int index) {
@@ -3953,10 +3956,9 @@
     with _DoubleListMixin
     implements Float32List {
   // Constructor.
-  _Float32ArrayView(_ByteBuffer buffer, int _offsetInBytes, int _length)
-      : super(buffer, _offsetInBytes, _length) {
-    _offsetAlignmentCheck(_offsetInBytes, Float32List.bytesPerElement);
-  }
+  @pragma("vm:exact-result-type", _Float32ArrayView)
+  factory _Float32ArrayView(_TypedList buffer, int offsetInBytes, int length)
+      native "TypedDataView_Float32ArrayView_new";
 
   // Method(s) implementing List interface.
   double operator [](int index) {
@@ -3991,10 +3993,9 @@
     with _DoubleListMixin
     implements Float64List {
   // Constructor.
-  _Float64ArrayView(_ByteBuffer buffer, int _offsetInBytes, int _length)
-      : super(buffer, _offsetInBytes, _length) {
-    _offsetAlignmentCheck(_offsetInBytes, Float64List.bytesPerElement);
-  }
+  @pragma("vm:exact-result-type", _Float64ArrayView)
+  factory _Float64ArrayView(_TypedList buffer, int offsetInBytes, int length)
+      native "TypedDataView_Float64ArrayView_new";
 
   // Method(s) implementing List interface.
   double operator [](int index) {
@@ -4029,10 +4030,9 @@
     with _Float32x4ListMixin
     implements Float32x4List {
   // Constructor.
-  _Float32x4ArrayView(_ByteBuffer buffer, int _offsetInBytes, int _length)
-      : super(buffer, _offsetInBytes, _length) {
-    _offsetAlignmentCheck(_offsetInBytes, Float32x4List.bytesPerElement);
-  }
+  @pragma("vm:exact-result-type", _Float32x4ArrayView)
+  factory _Float32x4ArrayView(_TypedList buffer, int offsetInBytes, int length)
+      native "TypedDataView_Float32x4ArrayView_new";
 
   // Method(s) implementing List interface.
   Float32x4 operator [](int index) {
@@ -4067,10 +4067,9 @@
     with _Int32x4ListMixin
     implements Int32x4List {
   // Constructor.
-  _Int32x4ArrayView(_ByteBuffer buffer, int _offsetInBytes, int _length)
-      : super(buffer, _offsetInBytes, _length) {
-    _offsetAlignmentCheck(_offsetInBytes, Int32x4List.bytesPerElement);
-  }
+  @pragma("vm:exact-result-type", _Int32x4ArrayView)
+  factory _Int32x4ArrayView(_TypedList buffer, int offsetInBytes, int length)
+      native "TypedDataView_Int32x4ArrayView_new";
 
   // Method(s) implementing List interface.
   Int32x4 operator [](int index) {
@@ -4105,10 +4104,9 @@
     with _Float64x2ListMixin
     implements Float64x2List {
   // Constructor.
-  _Float64x2ArrayView(_ByteBuffer buffer, int _offsetInBytes, int _length)
-      : super(buffer, _offsetInBytes, _length) {
-    _offsetAlignmentCheck(_offsetInBytes, Float64x2List.bytesPerElement);
-  }
+  @pragma("vm:exact-result-type", _Float64x2ArrayView)
+  factory _Float64x2ArrayView(_TypedList buffer, int offsetInBytes, int length)
+      native "TypedDataView_Float64x2ArrayView_new";
 
   // Method(s) implementing List interface.
   Float64x2 operator [](int index) {
@@ -4140,7 +4138,9 @@
 
 @pragma("vm:entry-point")
 class _ByteDataView implements ByteData {
-  _ByteDataView(this._typedData, this._offset, this.length);
+  @pragma("vm:exact-result-type", _ByteDataView)
+  factory _ByteDataView(_TypedList buffer, int offsetInBytes, int length)
+      native "TypedDataView_ByteDataView_new";
 
   // Method(s) implementing TypedData interface.
   _ByteBuffer get buffer {
@@ -4151,10 +4151,6 @@
     return length;
   }
 
-  int get offsetInBytes {
-    return _offset;
-  }
-
   int get elementSizeInBytes {
     return 1;
   }
@@ -4165,35 +4161,35 @@
     if (byteOffset < 0 || byteOffset >= length) {
       throw new RangeError.index(byteOffset, this, "byteOffset");
     }
-    return _typedData._getInt8(_offset + byteOffset);
+    return _typedData._getInt8(offsetInBytes + byteOffset);
   }
 
   void setInt8(int byteOffset, int value) {
     if (byteOffset < 0 || byteOffset >= length) {
       throw new RangeError.index(byteOffset, this, "byteOffset");
     }
-    _typedData._setInt8(_offset + byteOffset, value);
+    _typedData._setInt8(offsetInBytes + byteOffset, value);
   }
 
   int getUint8(int byteOffset) {
     if (byteOffset < 0 || byteOffset >= length) {
       throw new RangeError.index(byteOffset, this, "byteOffset");
     }
-    return _typedData._getUint8(_offset + byteOffset);
+    return _typedData._getUint8(offsetInBytes + byteOffset);
   }
 
   void setUint8(int byteOffset, int value) {
     if (byteOffset < 0 || byteOffset >= length) {
       throw new RangeError.index(byteOffset, this, "byteOffset");
     }
-    _typedData._setUint8(_offset + byteOffset, value);
+    _typedData._setUint8(offsetInBytes + byteOffset, value);
   }
 
   int getInt16(int byteOffset, [Endian endian = Endian.big]) {
     if (byteOffset < 0 || byteOffset + 1 >= length) {
       throw new RangeError.range(byteOffset, 0, length - 2, "byteOffset");
     }
-    var result = _typedData._getInt16(_offset + byteOffset);
+    var result = _typedData._getInt16(offsetInBytes + byteOffset);
     if (identical(endian, Endian.host)) {
       return result;
     }
@@ -4204,7 +4200,7 @@
     if (byteOffset < 0 || byteOffset + 1 >= length) {
       throw new RangeError.range(byteOffset, 0, length - 2, "byteOffset");
     }
-    _typedData._setInt16(_offset + byteOffset,
+    _typedData._setInt16(offsetInBytes + byteOffset,
         identical(endian, Endian.host) ? value : _byteSwap16(value));
   }
 
@@ -4212,7 +4208,7 @@
     if (byteOffset < 0 || byteOffset + 1 >= length) {
       throw new RangeError.range(byteOffset, 0, length - 2, "byteOffset");
     }
-    var result = _typedData._getUint16(_offset + byteOffset);
+    var result = _typedData._getUint16(offsetInBytes + byteOffset);
     if (identical(endian, Endian.host)) {
       return result;
     }
@@ -4223,7 +4219,7 @@
     if (byteOffset < 0 || byteOffset + 1 >= length) {
       throw new RangeError.range(byteOffset, 0, length - 2, "byteOffset");
     }
-    _typedData._setUint16(_offset + byteOffset,
+    _typedData._setUint16(offsetInBytes + byteOffset,
         identical(endian, Endian.host) ? value : _byteSwap16(value));
   }
 
@@ -4231,7 +4227,7 @@
     if (byteOffset < 0 || byteOffset + 3 >= length) {
       throw new RangeError.range(byteOffset, 0, length - 4, "byteOffset");
     }
-    var result = _typedData._getInt32(_offset + byteOffset);
+    var result = _typedData._getInt32(offsetInBytes + byteOffset);
     if (identical(endian, Endian.host)) {
       return result;
     }
@@ -4242,7 +4238,7 @@
     if (byteOffset < 0 || byteOffset + 3 >= length) {
       throw new RangeError.range(byteOffset, 0, length - 4, "byteOffset");
     }
-    _typedData._setInt32(_offset + byteOffset,
+    _typedData._setInt32(offsetInBytes + byteOffset,
         identical(endian, Endian.host) ? value : _byteSwap32(value));
   }
 
@@ -4250,7 +4246,7 @@
     if (byteOffset < 0 || byteOffset + 3 >= length) {
       throw new RangeError.range(byteOffset, 0, length - 4, "byteOffset");
     }
-    var result = _typedData._getUint32(_offset + byteOffset);
+    var result = _typedData._getUint32(offsetInBytes + byteOffset);
     if (identical(endian, Endian.host)) {
       return result;
     }
@@ -4261,7 +4257,7 @@
     if (byteOffset < 0 || byteOffset + 3 >= length) {
       throw new RangeError.range(byteOffset, 0, length - 4, "byteOffset");
     }
-    _typedData._setUint32(_offset + byteOffset,
+    _typedData._setUint32(offsetInBytes + byteOffset,
         identical(endian, Endian.host) ? value : _byteSwap32(value));
   }
 
@@ -4269,7 +4265,7 @@
     if (byteOffset < 0 || byteOffset + 7 >= length) {
       throw new RangeError.range(byteOffset, 0, length - 8, "byteOffset");
     }
-    var result = _typedData._getInt64(_offset + byteOffset);
+    var result = _typedData._getInt64(offsetInBytes + byteOffset);
     if (identical(endian, Endian.host)) {
       return result;
     }
@@ -4280,7 +4276,7 @@
     if (byteOffset < 0 || byteOffset + 7 >= length) {
       throw new RangeError.range(byteOffset, 0, length - 8, "byteOffset");
     }
-    _typedData._setInt64(_offset + byteOffset,
+    _typedData._setInt64(offsetInBytes + byteOffset,
         identical(endian, Endian.host) ? value : _byteSwap64(value));
   }
 
@@ -4288,7 +4284,7 @@
     if (byteOffset < 0 || byteOffset + 7 >= length) {
       throw new RangeError.range(byteOffset, 0, length - 8, "byteOffset");
     }
-    var result = _typedData._getUint64(_offset + byteOffset);
+    var result = _typedData._getUint64(offsetInBytes + byteOffset);
     if (identical(endian, Endian.host)) {
       return result;
     }
@@ -4299,7 +4295,7 @@
     if (byteOffset < 0 || byteOffset + 7 >= length) {
       throw new RangeError.range(byteOffset, 0, length - 8, "byteOffset");
     }
-    _typedData._setUint64(_offset + byteOffset,
+    _typedData._setUint64(offsetInBytes + byteOffset,
         identical(endian, Endian.host) ? value : _byteSwap64(value));
   }
 
@@ -4308,9 +4304,10 @@
       throw new RangeError.range(byteOffset, 0, length - 4, "byteOffset");
     }
     if (identical(endian, Endian.host)) {
-      return _typedData._getFloat32(_offset + byteOffset);
+      return _typedData._getFloat32(offsetInBytes + byteOffset);
     }
-    _convU32[0] = _byteSwap32(_typedData._getUint32(_offset + byteOffset));
+    _convU32[0] =
+        _byteSwap32(_typedData._getUint32(offsetInBytes + byteOffset));
     return _convF32[0];
   }
 
@@ -4319,11 +4316,11 @@
       throw new RangeError.range(byteOffset, 0, length - 4, "byteOffset");
     }
     if (identical(endian, Endian.host)) {
-      _typedData._setFloat32(_offset + byteOffset, value);
+      _typedData._setFloat32(offsetInBytes + byteOffset, value);
       return;
     }
     _convF32[0] = value;
-    _typedData._setUint32(_offset + byteOffset, _byteSwap32(_convU32[0]));
+    _typedData._setUint32(offsetInBytes + byteOffset, _byteSwap32(_convU32[0]));
   }
 
   double getFloat64(int byteOffset, [Endian endian = Endian.big]) {
@@ -4331,9 +4328,10 @@
       throw new RangeError.range(byteOffset, 0, length - 8, "byteOffset");
     }
     if (identical(endian, Endian.host)) {
-      return _typedData._getFloat64(_offset + byteOffset);
+      return _typedData._getFloat64(offsetInBytes + byteOffset);
     }
-    _convU64[0] = _byteSwap64(_typedData._getUint64(_offset + byteOffset));
+    _convU64[0] =
+        _byteSwap64(_typedData._getUint64(offsetInBytes + byteOffset));
     return _convF64[0];
   }
 
@@ -4342,11 +4340,11 @@
       throw new RangeError.range(byteOffset, 0, length - 8, "byteOffset");
     }
     if (identical(endian, Endian.host)) {
-      _typedData._setFloat64(_offset + byteOffset, value);
+      _typedData._setFloat64(offsetInBytes + byteOffset, value);
       return;
     }
     _convF64[0] = value;
-    _typedData._setUint64(_offset + byteOffset, _byteSwap64(_convU64[0]));
+    _typedData._setUint64(offsetInBytes + byteOffset, _byteSwap64(_convU64[0]));
   }
 
   Float32x4 getFloat32x4(int byteOffset, [Endian endian = Endian.big]) {
@@ -4354,7 +4352,7 @@
       throw new RangeError.range(byteOffset, 0, length - 4, "byteOffset");
     }
     // TODO(johnmccutchan) : Need to resolve this for endianity.
-    return _typedData._getFloat32x4(_offset + byteOffset);
+    return _typedData._getFloat32x4(offsetInBytes + byteOffset);
   }
 
   void setFloat32x4(int byteOffset, Float32x4 value,
@@ -4363,17 +4361,17 @@
       throw new RangeError.range(byteOffset, 0, length - 4, "byteOffset");
     }
     // TODO(johnmccutchan) : Need to resolve this for endianity.
-    _typedData._setFloat32x4(_offset + byteOffset, value);
+    _typedData._setFloat32x4(offsetInBytes + byteOffset, value);
   }
 
   @pragma("vm:non-nullable-result-type")
-  final _TypedList _typedData;
+  _TypedList get _typedData native "TypedDataView_typedData";
 
   @pragma("vm:exact-result-type", "dart:core#_Smi")
-  final int _offset;
+  int get offsetInBytes native "TypedDataView_offsetInBytes";
 
   @pragma("vm:exact-result-type", "dart:core#_Smi")
-  final int length;
+  int get length native "TypedDataView_length";
 }
 
 int _byteSwap16(int value) {
diff --git a/runtime/observatory/.packages b/runtime/observatory/.packages
index 69347be..0b5a10a 100644
--- a/runtime/observatory/.packages
+++ b/runtime/observatory/.packages
@@ -22,6 +22,7 @@
 matcher:../../third_party/pkg/matcher/lib
 package_config:../../third_party/pkg_tested/package_config/lib
 package_resolver:../../third_party/pkg_tested/package_resolver/lib
+pedantic:../../third_party/pkg/pedantic/lib
 pool:../../third_party/pkg/pool/lib
 pub_semver:../../third_party/pkg/pub_semver/lib
 source_map_stack_trace:../../third_party/pkg/source_map_stack_trace/lib
@@ -30,5 +31,8 @@
 stream_channel:../../third_party/pkg/stream_channel/lib
 string_scanner:../../third_party/pkg/string_scanner/lib
 term_glyph:../../third_party/pkg/term_glyph/lib
-test:../../third_party/pkg/test/lib
+test:../../third_party/pkg/test/pkgs/test/lib
+test_api:../../third_party/pkg/test/pkgs/test_api/lib
+test_core:../../third_party/pkg/test/pkgs/test_core/lib
 typed_data:../../third_party/pkg/typed_data/lib
+observatory_test_package:tests/service/observatory_test_package
diff --git a/runtime/observatory/HACKING.md b/runtime/observatory/HACKING.md
index afcab5c..b645f9e 100644
--- a/runtime/observatory/HACKING.md
+++ b/runtime/observatory/HACKING.md
@@ -62,8 +62,8 @@
 submit your code.
 
 The main reviewers for Observatory related CLs are:
-  - turnidge
-  - johnmccutchan
+  - asiva
+  - bkonyi
   - rmacnak
 
 ## Write a new service test
diff --git a/runtime/observatory/lib/service_io.dart b/runtime/observatory/lib/service_io.dart
index 4565d9f..2ecbbf1 100644
--- a/runtime/observatory/lib/service_io.dart
+++ b/runtime/observatory/lib/service_io.dart
@@ -52,9 +52,7 @@
   }
 }
 
-/// The [WebSocketVM] communicates with a Dart VM over WebSocket. The Dart VM
-/// can be embedded in Chromium or standalone. In the case of Chromium, we
-/// make the service requests via the Chrome Remote Debugging Protocol.
+/// The [WebSocketVM] communicates with a Dart VM over WebSocket.
 class WebSocketVM extends CommonWebSocketVM {
   WebSocketVM(WebSocketVMTarget target) : super(target, new _IOWebSocket());
 }
diff --git a/runtime/observatory/lib/src/app/application.dart b/runtime/observatory/lib/src/app/application.dart
index 740c6ec..9b7f90c 100644
--- a/runtime/observatory/lib/src/app/application.dart
+++ b/runtime/observatory/lib/src/app/application.dart
@@ -277,11 +277,6 @@
     events.onConnectionClosed.listen(_addNotification);
   }
 
-  loadCrashDump(Map crashDump) {
-    _switchVM(new FakeVM(crashDump['result']));
-    app.locationManager.go(Uris.vm());
-  }
-
   void handleException(e, st) {
     if (e is ServerRpcException) {
       if (e.code == ServerRpcException.kFeatureDisabled) return;
diff --git a/runtime/observatory/lib/src/app/page.dart b/runtime/observatory/lib/src/app/page.dart
index 9563098..526e182 100644
--- a/runtime/observatory/lib/src/app/page.dart
+++ b/runtime/observatory/lib/src/app/page.dart
@@ -890,9 +890,7 @@
 
   void onInstall() {
     if (element == null) {
-      element = new VMConnectElement(
-          ObservatoryApplication.app.targets,
-          ObservatoryApplication.app.loadCrashDump,
+      element = new VMConnectElement(ObservatoryApplication.app.targets,
           ObservatoryApplication.app.notifications,
           queue: ObservatoryApplication.app.queue);
     }
diff --git a/runtime/observatory/lib/src/elements/function_view.dart b/runtime/observatory/lib/src/elements/function_view.dart
index 3c32189..6b73ba8 100644
--- a/runtime/observatory/lib/src/elements/function_view.dart
+++ b/runtime/observatory/lib/src/elements/function_view.dart
@@ -428,10 +428,10 @@
         return 'implicit setter';
       case M.FunctionKind.implicitStaticFinalGetter:
         return 'implicit static final getter';
+      case M.FunctionKind.staticFieldInitializer:
+        return 'field initializer';
       case M.FunctionKind.irregexpFunction:
         return 'irregexp function';
-      case M.FunctionKind.staticInitializer:
-        return 'static initializer';
       case M.FunctionKind.methodExtractor:
         return 'method extractor';
       case M.FunctionKind.noSuchMethodDispatcher:
diff --git a/runtime/observatory/lib/src/elements/script_inset.dart b/runtime/observatory/lib/src/elements/script_inset.dart
index 3a46dab..c386824 100644
--- a/runtime/observatory/lib/src/elements/script_inset.dart
+++ b/runtime/observatory/lib/src/elements/script_inset.dart
@@ -476,7 +476,7 @@
     var rootUri = Uri.parse(script.library.uri);
     if (rootUri.scheme == 'dart') {
       // The relative paths from dart:* libraries to their parts are not valid.
-      rootUri = new Uri.directory(script.library.uri);
+      rootUri = Uri.parse(script.library.uri + '/');
     }
     var targetUri = rootUri.resolve(relativeUri);
     for (M.Script s in script.library.scripts) {
diff --git a/runtime/observatory/lib/src/elements/vm_connect.dart b/runtime/observatory/lib/src/elements/vm_connect.dart
index d6036df..c8cac11 100644
--- a/runtime/observatory/lib/src/elements/vm_connect.dart
+++ b/runtime/observatory/lib/src/elements/vm_connect.dart
@@ -16,8 +16,6 @@
 import 'package:observatory/src/elements/view_footer.dart';
 import 'package:observatory/src/elements/vm_connect_target.dart';
 
-typedef void CrashDumpLoadCallback(Map dump);
-
 class VMConnectElement extends HtmlElement implements Renderable {
   static const tag =
       const Tag<VMConnectElement>('vm-connect', dependencies: const [
@@ -31,24 +29,21 @@
 
   Stream<RenderedEvent<VMConnectElement>> get onRendered => _r.onRendered;
 
-  CrashDumpLoadCallback _loadDump;
   M.NotificationRepository _notifications;
   M.TargetRepository _targets;
   StreamSubscription _targetsSubscription;
 
   String _address;
 
-  factory VMConnectElement(M.TargetRepository targets,
-      CrashDumpLoadCallback loadDump, M.NotificationRepository notifications,
+  factory VMConnectElement(
+      M.TargetRepository targets, M.NotificationRepository notifications,
       {String address: '', RenderingQueue queue}) {
     assert(address != null);
-    assert(loadDump != null);
     assert(notifications != null);
     assert(targets != null);
     VMConnectElement e = document.createElement(tag.name);
     e._r = new RenderingScheduler<VMConnectElement>(e, queue: queue);
     e._address = address;
-    e._loadDump = loadDump;
     e._notifications = notifications;
     e._targets = targets;
     return e;
@@ -124,19 +119,6 @@
                     ..text = 'Run Standalone with: \'--observe\'',
                 ],
               new DivElement()..classes = ['flex-item-20-percent'],
-              new DivElement()
-                ..classes = ['flex-item-40-percent']
-                ..children = <Element>[
-                  new HeadingElement.h2()..text = 'View crash dump',
-                  new BRElement(),
-                  _createCrushDumpLoader(),
-                  new BRElement(),
-                  new BRElement(),
-                  new PreElement()
-                    ..classes = ['well']
-                    ..text = 'Request a crash dump with:\n'
-                        '\'curl $host:$port/_getCrashDump > dump.json\'',
-                ]
             ],
         ],
       new ViewFooterElement(queue: _r.queue)
@@ -158,20 +140,6 @@
     return textbox;
   }
 
-  FileUploadInputElement _createCrushDumpLoader() {
-    FileUploadInputElement e = new FileUploadInputElement()
-      ..id = 'crashDumpFile';
-    e.onChange.listen((_) {
-      var reader = new FileReader();
-      reader.readAsText(e.files[0]);
-      reader.onLoad.listen((_) {
-        var crashDump = json.decode(reader.result);
-        _loadDump(crashDump);
-      });
-    });
-    return e;
-  }
-
   void _createAndConnect() {
     if (_address == null || _address.isEmpty) return;
     String normalizedNetworkAddress = _normalizeStandaloneAddress(_address);
diff --git a/runtime/observatory/lib/src/models/objects/function.dart b/runtime/observatory/lib/src/models/objects/function.dart
index 541dcad..777f57d 100644
--- a/runtime/observatory/lib/src/models/objects/function.dart
+++ b/runtime/observatory/lib/src/models/objects/function.dart
@@ -14,8 +14,8 @@
   implicitGetter,
   implicitSetter,
   implicitStaticFinalGetter,
+  staticFieldInitializer,
   irregexpFunction,
-  staticInitializer,
   methodExtractor,
   noSuchMethodDispatcher,
   invokeFieldDispatcher,
diff --git a/runtime/observatory/lib/src/models/repositories/eval.dart b/runtime/observatory/lib/src/models/repositories/eval.dart
index e127d84..2bd4c61 100644
--- a/runtime/observatory/lib/src/models/repositories/eval.dart
+++ b/runtime/observatory/lib/src/models/repositories/eval.dart
@@ -6,5 +6,6 @@
 
 abstract class EvalRepository {
   Future<ObjectRef> evaluate(
-      IsolateRef isolate, ObjectRef context, String expression);
+      IsolateRef isolate, ObjectRef context, String expression,
+      {bool disableBreakpoints: false});
 }
diff --git a/runtime/observatory/lib/src/repositories/eval.dart b/runtime/observatory/lib/src/repositories/eval.dart
index 90b8b12..57ab1ec 100644
--- a/runtime/observatory/lib/src/repositories/eval.dart
+++ b/runtime/observatory/lib/src/repositories/eval.dart
@@ -5,12 +5,14 @@
 part of repositories;
 
 class EvalRepository extends M.EvalRepository {
-  Future<M.ObjectRef> evaluate(M.IsolateRef i, M.ObjectRef o, String e) async {
+  Future<M.ObjectRef> evaluate(M.IsolateRef i, M.ObjectRef o, String e,
+      {bool disableBreakpoints: false}) async {
     S.Isolate isolate = i as S.Isolate;
     S.ServiceObject object = o as S.HeapObject;
     assert(isolate != null);
     assert(object != null);
     assert(e != null);
-    return await isolate.eval(object, e);
+    return await isolate.eval(object, e,
+        disableBreakpoints: disableBreakpoints);
   }
 }
diff --git a/runtime/observatory/lib/src/repositories/target.dart b/runtime/observatory/lib/src/repositories/target.dart
index 245542d..4fb1fb1 100644
--- a/runtime/observatory/lib/src/repositories/target.dart
+++ b/runtime/observatory/lib/src/repositories/target.dart
@@ -120,7 +120,7 @@
       scheme: 'ws',
       host: host ?? serverAddress.host,
       port: int.tryParse(port ?? '') ?? serverAddress.port,
-      path: '/ws',
+      path: serverAddress.path.isEmpty ? '/ws' : serverAddress.path + 'ws',
     );
     return wsAddress.toString();
   }
diff --git a/runtime/observatory/lib/src/service/object.dart b/runtime/observatory/lib/src/service/object.dart
index aa59574..99e84be 100644
--- a/runtime/observatory/lib/src/service/object.dart
+++ b/runtime/observatory/lib/src/service/object.dart
@@ -99,12 +99,6 @@
   String toString() => 'MalformedResponseRpcException(${message})';
 }
 
-class FakeVMRpcException extends RpcException {
-  FakeVMRpcException(String message) : super(message);
-
-  String toString() => 'FakeVMRpcException(${message})';
-}
-
 /// A [ServiceObject] represents a persistent object within the vm.
 abstract class ServiceObject implements M.ObjectRef {
   static int LexicalSortName(ServiceObject o1, ServiceObject o2) {
@@ -886,8 +880,6 @@
         await listenEventStream(kDebugStream, _dispatchEventToIsolate);
         await listenEventStream(_kGraphStream, _dispatchEventToIsolate);
         await listenEventStream(kServiceStream, _updateService);
-      } on FakeVMRpcException catch (_) {
-        // ignore FakeVMRpcExceptions here.
       } on NetworkRpcException catch (_) {
         // ignore network errors here.
       }
@@ -1011,78 +1003,6 @@
   }
 }
 
-class FakeVM extends VM {
-  String get displayName => name;
-
-  final Map _responses = {};
-  FakeVM(Map responses) {
-    if (responses == null) {
-      return;
-    }
-    responses.forEach((uri, response) {
-      // Encode as string.
-      _responses[_canonicalizeUri(Uri.parse(uri))] = response;
-    });
-  }
-
-  String _canonicalizeUri(Uri uri) {
-    // We use the uri as the key to the response map. Uri parameters can be
-    // serialized in any order, this function canonicalizes the uri parameters
-    // so they are serialized in sorted-by-parameter-name order.
-    var method = uri.path;
-    // Create a map sorted on insertion order.
-    var parameters = new Map();
-    // Sort keys.
-    var sortedKeys = uri.queryParameters.keys.toList();
-    sortedKeys.sort();
-    // Filter keys to remove any private options.
-    sortedKeys.removeWhere((k) => k.startsWith('_'));
-    // Insert parameters in sorted order.
-    for (var key in sortedKeys) {
-      parameters[key] = uri.queryParameters[key];
-    }
-    // Return canonical uri.
-    return new Uri(path: method, queryParameters: parameters).toString();
-  }
-
-  /// Force the VM to disconnect.
-  void disconnect() {
-    _onDisconnect.complete('Disconnected');
-  }
-
-  // Always connected.
-  Future _onConnect;
-  Future get onConnect {
-    if (_onConnect != null) {
-      return _onConnect;
-    }
-    _onConnect = new Future.value(this);
-    return _onConnect;
-  }
-
-  bool get isConnected => !isDisconnected;
-  // Only complete when requested.
-  Completer<String> _onDisconnect = new Completer<String>();
-  Future<String> get onDisconnect => _onDisconnect.future;
-  bool get isDisconnected => _onDisconnect.isCompleted;
-
-  Future<Map> invokeRpcRaw(String method, Map params) {
-    if (params.isEmpty) {
-      params = null;
-    }
-    var key = _canonicalizeUri(new Uri(path: method, queryParameters: params));
-    var response = _responses[key];
-    if (response == null) {
-      return new Future.error(new FakeVMRpcException(
-          "Unable to find key '${key}' in cached response set"));
-    }
-    return new Future.value(response);
-  }
-
-  @override
-  WebSocketVMTarget get target => throw new UnimplementedError();
-}
-
 /// Snapshot in time of tag counters.
 class TagProfileSnapshot {
   final double seconds;
@@ -1893,10 +1813,11 @@
   }
 
   Future<ServiceObject> eval(ServiceObject target, String expression,
-      {Map<String, ServiceObject> scope}) {
+      {Map<String, ServiceObject> scope, bool disableBreakpoints: false}) {
     Map params = {
       'targetId': target.id,
       'expression': expression,
+      'disableBreakpoints': disableBreakpoints,
     };
     if (scope != null) {
       Map<String, String> scopeWithIds = new Map();
@@ -1909,10 +1830,12 @@
   }
 
   Future<ServiceObject> evalFrame(int frameIndex, String expression,
-      {Map<String, ServiceObject> scope}) async {
+      {Map<String, ServiceObject> scope,
+      bool disableBreakpoints: false}) async {
     Map params = {
       'frameIndex': frameIndex,
       'expression': expression,
+      'disableBreakpoints': disableBreakpoints,
     };
     if (scope != null) {
       Map<String, String> scopeWithIds = new Map();
@@ -2482,8 +2405,9 @@
   }
 
   Future<ServiceObject> evaluate(String expression,
-      {Map<String, ServiceObject> scope}) {
-    return isolate.eval(this, expression, scope: scope);
+      {Map<String, ServiceObject> scope, bool disableBreakpoints: false}) {
+    return isolate.eval(this, expression,
+        scope: scope, disableBreakpoints: disableBreakpoints);
   }
 
   Script get rootScript {
@@ -2661,8 +2585,9 @@
   }
 
   Future<ServiceObject> evaluate(String expression,
-      {Map<String, ServiceObject> scope}) {
-    return isolate.eval(this, expression, scope: scope);
+      {Map<String, ServiceObject> scope, disableBreakpoints: false}) {
+    return isolate.eval(this, expression,
+        scope: scope, disableBreakpoints: disableBreakpoints);
   }
 
   Future<ServiceObject> setTraceAllocations(bool enable) {
@@ -3027,8 +2952,9 @@
   }
 
   Future<ServiceObject> evaluate(String expression,
-      {Map<String, ServiceObject> scope}) {
-    return isolate.eval(this, expression, scope: scope);
+      {Map<String, ServiceObject> scope, bool disableBreakpoints: false}) {
+    return isolate.eval(this, expression,
+        scope: scope, disableBreakpoints: disableBreakpoints);
   }
 
   String toString() => 'Instance($shortName)';
@@ -3096,10 +3022,10 @@
       return M.FunctionKind.implicitSetter;
     case 'ImplicitStaticFinalGetter':
       return M.FunctionKind.implicitStaticFinalGetter;
+    case 'StaticFieldInitializer':
+      return M.FunctionKind.staticFieldInitializer;
     case 'IrregexpFunction':
       return M.FunctionKind.irregexpFunction;
-    case 'StaticInitializer':
-      return M.FunctionKind.staticInitializer;
     case 'MethodExtractor':
       return M.FunctionKind.methodExtractor;
     case 'NoSuchMethodDispatcher':
diff --git a/runtime/observatory/tests/observatory_ui/mocks/repositories/eval.dart b/runtime/observatory/tests/observatory_ui/mocks/repositories/eval.dart
index 5f143fa..0b7a072 100644
--- a/runtime/observatory/tests/observatory_ui/mocks/repositories/eval.dart
+++ b/runtime/observatory/tests/observatory_ui/mocks/repositories/eval.dart
@@ -5,7 +5,8 @@
 part of mocks;
 
 typedef Future<M.Object> EvalRepositoryMockCallback(
-    M.IsolateRef isolate, M.ObjectRef context, String expression);
+    M.IsolateRef isolate, M.ObjectRef context, String expression,
+    {bool disableBreakpoints});
 
 class EvalRepositoryMock implements M.EvalRepository {
   final EvalRepositoryMockCallback _get;
@@ -13,9 +14,11 @@
   EvalRepositoryMock({EvalRepositoryMockCallback getter}) : _get = getter;
 
   Future<M.Object> evaluate(
-      M.IsolateRef isolate, M.ObjectRef context, String expression) {
+      M.IsolateRef isolate, M.ObjectRef context, String expression,
+      {bool disableBreakpoints: false}) {
     if (_get != null) {
-      return _get(isolate, context, expression);
+      return _get(isolate, context, expression,
+          disableBreakpoints: disableBreakpoints);
     }
     return new Future.value(null);
   }
diff --git a/runtime/observatory/tests/observatory_ui/vm_connect/element_test.dart b/runtime/observatory/tests/observatory_ui/vm_connect/element_test.dart
index 8727212..1f5d1b6 100644
--- a/runtime/observatory/tests/observatory_ui/vm_connect/element_test.dart
+++ b/runtime/observatory/tests/observatory_ui/vm_connect/element_test.dart
@@ -10,8 +10,6 @@
 import 'package:observatory/src/elements/vm_connect.dart';
 import '../mocks.dart';
 
-void load(_) {}
-
 main() {
   VMConnectElement.tag.ensureRegistration();
 
@@ -21,14 +19,13 @@
   group('instantiation', () {
     test('default', () {
       final e = new VMConnectElement(
-          new TargetRepositoryMock(), load, new NotificationRepositoryMock());
+          new TargetRepositoryMock(), new NotificationRepositoryMock());
       expect(e, isNotNull, reason: 'element correctly created');
     });
   });
   test('is correctly listening', () async {
     final targets = new TargetRepositoryMock();
-    final e =
-        new VMConnectElement(targets, load, new NotificationRepositoryMock());
+    final e = new VMConnectElement(targets, new NotificationRepositoryMock());
     document.body.append(e);
     await e.onRendered.first;
     expect(targets.hasListeners, isTrue, reason: 'is listening');
@@ -42,8 +39,7 @@
         const TargetMock(name: 't-1'),
         const TargetMock(name: 't-2'),
       ]);
-      final e =
-          new VMConnectElement(targets, load, new NotificationRepositoryMock());
+      final e = new VMConnectElement(targets, new NotificationRepositoryMock());
       document.body.append(e);
       await e.onRendered.first;
       expect(targets.listInvoked, isTrue, reason: 'should invoke list()');
@@ -57,8 +53,7 @@
     test('react to update event', () async {
       final list = <TargetMock>[const TargetMock(name: 't-1')];
       final targets = new TargetRepositoryMock(list: list);
-      final e =
-          new VMConnectElement(targets, load, new NotificationRepositoryMock());
+      final e = new VMConnectElement(targets, new NotificationRepositoryMock());
       document.body.append(e);
       await e.onRendered.first;
       expect(e.querySelectorAll(tTag).length, equals(1));
@@ -80,8 +75,7 @@
           add: expectAsync1((String val) {
             expect(val, equals(address));
           }, count: 1, reason: 'should be invoked'));
-      final e = new VMConnectElement(
-          targets, load, new NotificationRepositoryMock(),
+      final e = new VMConnectElement(targets, new NotificationRepositoryMock(),
           address: address);
       document.body.append(e);
       await e.onRendered.first;
@@ -96,8 +90,7 @@
           setCurrent: expectAsync1((M.Target t) {
             expect(t, equals(list[0]));
           }, count: 1, reason: 'should be invoked'));
-      final e =
-          new VMConnectElement(targets, load, new NotificationRepositoryMock());
+      final e = new VMConnectElement(targets, new NotificationRepositoryMock());
       document.body.append(e);
       await e.onRendered.first;
       (e.querySelector(tTag) as VMConnectTargetElement).connect();
@@ -111,8 +104,7 @@
           delete: expectAsync1((M.Target t) {
             expect(t, equals(list[0]));
           }, count: 1, reason: 'should be invoked'));
-      final e =
-          new VMConnectElement(targets, load, new NotificationRepositoryMock());
+      final e = new VMConnectElement(targets, new NotificationRepositoryMock());
       document.body.append(e);
       await e.onRendered.first;
       (e.querySelector(tTag) as VMConnectTargetElement).delete();
diff --git a/runtime/observatory/tests/service/breakpoint_in_package_parts_class_file_uri_test.dart b/runtime/observatory/tests/service/breakpoint_in_package_parts_class_file_uri_test.dart
new file mode 100644
index 0000000..52dee71
--- /dev/null
+++ b/runtime/observatory/tests/service/breakpoint_in_package_parts_class_file_uri_test.dart
@@ -0,0 +1,43 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library breakpoint_in_parts_class;
+
+import 'dart:io' show Platform;
+
+import 'package:observatory_test_package/has_part.dart' as hasPart;
+import 'package:path/path.dart' as path;
+import 'test_helper.dart';
+import 'service_test_common.dart';
+
+// Chop off the file name.
+String baseDirectory = path.dirname(Platform.script.path) + '/';
+Uri baseUri = Platform.script.replace(path: baseDirectory);
+Uri breakpointFile = baseUri.resolve('observatory_test_package/the_part.dart');
+const String shortFile = "the_part.dart";
+
+const int LINE = 87;
+
+code() {
+  hasPart.main();
+}
+
+List<String> stops = [];
+
+List<String> expected = [
+  "$shortFile:${LINE + 0}:5", // on 'print'
+  "$shortFile:${LINE + 1}:3" // on class ending '}'
+];
+
+var tests = <IsolateTest>[
+  hasPausedAtStart,
+  setBreakpointAtUriAndLine(breakpointFile.toString(), LINE),
+  runStepThroughProgramRecordingStops(stops),
+  checkRecordedStops(stops, expected)
+];
+
+main(args) {
+  runIsolateTestsSynchronous(args, tests,
+      testeeConcurrent: code, pause_on_start: true, pause_on_exit: true);
+}
diff --git a/runtime/observatory/tests/service/breakpoint_in_package_parts_class_test.dart b/runtime/observatory/tests/service/breakpoint_in_package_parts_class_test.dart
new file mode 100644
index 0000000..504065d
--- /dev/null
+++ b/runtime/observatory/tests/service/breakpoint_in_package_parts_class_test.dart
@@ -0,0 +1,36 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library breakpoint_in_parts_class;
+
+import 'package:observatory_test_package/has_part.dart' as hasPart;
+import 'test_helper.dart';
+import 'service_test_common.dart';
+
+const int LINE = 87;
+const String breakpointFile = "package:observatory_test_package/the_part.dart";
+const String shortFile = "the_part.dart";
+
+code() {
+  hasPart.main();
+}
+
+List<String> stops = [];
+
+List<String> expected = [
+  "$shortFile:${LINE + 0}:5", // on 'print'
+  "$shortFile:${LINE + 1}:3" // on class ending '}'
+];
+
+var tests = <IsolateTest>[
+  hasPausedAtStart,
+  setBreakpointAtUriAndLine(breakpointFile, LINE),
+  runStepThroughProgramRecordingStops(stops),
+  checkRecordedStops(stops, expected)
+];
+
+main(args) {
+  runIsolateTestsSynchronous(args, tests,
+      testeeConcurrent: code, pause_on_start: true, pause_on_exit: true);
+}
diff --git a/runtime/observatory/tests/service/breakpoint_on_if_null_1_test.dart b/runtime/observatory/tests/service/breakpoint_on_if_null_1_test.dart
new file mode 100644
index 0000000..2d28590
--- /dev/null
+++ b/runtime/observatory/tests/service/breakpoint_on_if_null_1_test.dart
@@ -0,0 +1,50 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library breakpoint_in_parts_class;
+
+import 'test_helper.dart';
+import 'service_test_common.dart';
+
+const int LINE = 18;
+const String file = "breakpoint_on_if_null_1_test.dart";
+
+code() {
+  foo(42);
+}
+
+foo(dynamic args) {
+  if (args == null) {
+    print("was null");
+  }
+  if (args != null) {
+    print("was not null");
+  }
+  if (args == 42) {
+    print("was 42!");
+  }
+}
+
+List<String> stops = [];
+
+List<String> expected = [
+  "$file:${LINE + 0}:12", // on '=='
+  "$file:${LINE + 3}:12", // on '!='
+  "$file:${LINE + 4}:5", // on 'print'
+  "$file:${LINE + 6}:12", // on '=='
+  "$file:${LINE + 7}:5", // on 'print'
+  "$file:${LINE + 9}:1", // on ending '}'
+];
+
+var tests = <IsolateTest>[
+  hasPausedAtStart,
+  setBreakpointAtUriAndLine(file, LINE),
+  runStepThroughProgramRecordingStops(stops),
+  checkRecordedStops(stops, expected)
+];
+
+main(args) {
+  runIsolateTestsSynchronous(args, tests,
+      testeeConcurrent: code, pause_on_start: true, pause_on_exit: true);
+}
diff --git a/runtime/observatory/tests/service/breakpoint_on_if_null_2_test.dart b/runtime/observatory/tests/service/breakpoint_on_if_null_2_test.dart
new file mode 100644
index 0000000..5eb37e5
--- /dev/null
+++ b/runtime/observatory/tests/service/breakpoint_on_if_null_2_test.dart
@@ -0,0 +1,53 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library breakpoint_in_parts_class;
+
+import 'test_helper.dart';
+import 'service_test_common.dart';
+
+const int LINE = 21;
+const String file = "breakpoint_on_if_null_2_test.dart";
+
+dynamic compareWithMe = 43;
+
+code() {
+  compareWithMe = null;
+  foo(42);
+}
+
+foo(dynamic args) {
+  if (args == compareWithMe) {
+    print("was null");
+  }
+  if (args != compareWithMe) {
+    print("was not null");
+  }
+  if (args == 42) {
+    print("was 42!");
+  }
+}
+
+List<String> stops = [];
+
+List<String> expected = [
+  "$file:${LINE + 0}:12", // on '=='
+  "$file:${LINE + 3}:12", // on '!='
+  "$file:${LINE + 4}:5", // on 'print'
+  "$file:${LINE + 6}:12", // on '=='
+  "$file:${LINE + 7}:5", // on 'print'
+  "$file:${LINE + 9}:1", // on ending '}'
+];
+
+var tests = <IsolateTest>[
+  hasPausedAtStart,
+  setBreakpointAtUriAndLine(file, LINE),
+  runStepThroughProgramRecordingStops(stops),
+  checkRecordedStops(stops, expected)
+];
+
+main(args) {
+  runIsolateTestsSynchronous(args, tests,
+      testeeConcurrent: code, pause_on_start: true, pause_on_exit: true);
+}
diff --git a/runtime/observatory/tests/service/breakpoint_on_if_null_3_test.dart b/runtime/observatory/tests/service/breakpoint_on_if_null_3_test.dart
new file mode 100644
index 0000000..a4c1fde
--- /dev/null
+++ b/runtime/observatory/tests/service/breakpoint_on_if_null_3_test.dart
@@ -0,0 +1,51 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library breakpoint_in_parts_class;
+
+import 'test_helper.dart';
+import 'service_test_common.dart';
+
+const int LINE = 17;
+const String file = "breakpoint_on_if_null_3_test.dart";
+
+code() {
+  foo(42);
+}
+
+foo(dynamic args) {
+  if (args == null) {
+    print("was null");
+  }
+  if (args != null) {
+    print("was not null");
+  }
+  if (args == 42) {
+    print("was 42!");
+  }
+}
+
+List<String> stops = [];
+
+List<String> expected = [
+  "$file:${LINE + 0}:13", // on 'args'
+  "$file:${LINE + 1}:12", // on '=='
+  "$file:${LINE + 4}:12", // on '!='
+  "$file:${LINE + 5}:5", // on 'print'
+  "$file:${LINE + 7}:12", // on '=='
+  "$file:${LINE + 8}:5", // on 'print'
+  "$file:${LINE + 10}:1", // on ending '}'
+];
+
+var tests = <IsolateTest>[
+  hasPausedAtStart,
+  setBreakpointAtUriAndLine(file, LINE),
+  runStepThroughProgramRecordingStops(stops),
+  checkRecordedStops(stops, expected)
+];
+
+main(args) {
+  runIsolateTestsSynchronous(args, tests,
+      testeeConcurrent: code, pause_on_start: true, pause_on_exit: true);
+}
diff --git a/runtime/observatory/tests/service/breakpoint_on_if_null_4_test.dart b/runtime/observatory/tests/service/breakpoint_on_if_null_4_test.dart
new file mode 100644
index 0000000..7b9ffe1
--- /dev/null
+++ b/runtime/observatory/tests/service/breakpoint_on_if_null_4_test.dart
@@ -0,0 +1,54 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library breakpoint_in_parts_class;
+
+import 'test_helper.dart';
+import 'service_test_common.dart';
+
+const int LINE = 20;
+const String file = "breakpoint_on_if_null_4_test.dart";
+
+dynamic compareWithMe = 43;
+
+code() {
+  compareWithMe = null;
+  foo(42);
+}
+
+foo(dynamic args) {
+  if (args == compareWithMe) {
+    print("was null");
+  }
+  if (args != compareWithMe) {
+    print("was not null");
+  }
+  if (args == 42) {
+    print("was 42!");
+  }
+}
+
+List<String> stops = [];
+
+List<String> expected = [
+  "$file:${LINE + 0}:13", // on 'args'
+  "$file:${LINE + 1}:12", // on '=='
+  "$file:${LINE + 4}:12", // on '!='
+  "$file:${LINE + 5}:5", // on 'print'
+  "$file:${LINE + 7}:12", // on '=='
+  "$file:${LINE + 8}:5", // on 'print'
+  "$file:${LINE + 10}:1", // on ending '}'
+];
+
+var tests = <IsolateTest>[
+  hasPausedAtStart,
+  setBreakpointAtUriAndLine(file, LINE),
+  runStepThroughProgramRecordingStops(stops),
+  checkRecordedStops(stops, expected)
+];
+
+main(args) {
+  runIsolateTestsSynchronous(args, tests,
+      testeeConcurrent: code, pause_on_start: true, pause_on_exit: true);
+}
diff --git a/runtime/observatory/tests/service/breakpoint_partfile_test.dart b/runtime/observatory/tests/service/breakpoint_partfile_test.dart
new file mode 100644
index 0000000..33e80f5
--- /dev/null
+++ b/runtime/observatory/tests/service/breakpoint_partfile_test.dart
@@ -0,0 +1,37 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library breakpoint_in_parts_class;
+
+import 'package:observatory_test_package/has_part.dart' as hasPart;
+import 'test_helper.dart';
+import 'service_test_common.dart';
+
+const int LINE = 8;
+const String breakpointFile =
+    "package:observatory_test_package/the_part_2.dart";
+const String shortFile = "the_part_2.dart";
+
+code() {
+  hasPart.bar();
+}
+
+List<String> stops = [];
+
+List<String> expected = [
+  "$shortFile:${LINE + 0}:3", // on 'print'
+  "$shortFile:${LINE + 1}:1" // on class ending '}'
+];
+
+var tests = <IsolateTest>[
+  hasPausedAtStart,
+  setBreakpointAtUriAndLine(breakpointFile, LINE),
+  runStepThroughProgramRecordingStops(stops),
+  checkRecordedStops(stops, expected)
+];
+
+main(args) {
+  runIsolateTestsSynchronous(args, tests,
+      testeeConcurrent: code, pause_on_start: true, pause_on_exit: true);
+}
diff --git a/runtime/observatory/tests/service/crash_dump_test.dart b/runtime/observatory/tests/service/crash_dump_test.dart
deleted file mode 100644
index 2309c94..0000000
--- a/runtime/observatory/tests/service/crash_dump_test.dart
+++ /dev/null
@@ -1,36 +0,0 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library crash_dump_test;
-
-import 'dart:async';
-import 'dart:convert';
-import 'dart:io';
-import 'package:observatory/service_io.dart';
-
-import 'test_helper.dart';
-
-Future warmup() async {
-  print('hi');
-}
-
-var tests = <VMTest>[
-  (VM vm) async {
-    HttpClient client = new HttpClient();
-    print('Requesting uri ${serviceHttpAddress}/_getCrashDump');
-    var request =
-        await client.getUrl(Uri.parse('$serviceHttpAddress/_getCrashDump'));
-    var response = await request.close();
-    print('Received response');
-    Completer completer = new Completer<String>();
-    StringBuffer sb = new StringBuffer();
-    response.transform(utf8.decoder).listen((chunk) {
-      sb.write(chunk);
-    }, onDone: () => completer.complete(sb.toString()));
-    var responseString = await completer.future;
-    json.decode(responseString);
-  }
-];
-
-main(args) async => runVMTests(args, tests, testeeBefore: warmup);
diff --git a/runtime/observatory/tests/service/dev_fs_spawn_test.dart b/runtime/observatory/tests/service/dev_fs_spawn_test.dart
index c0a182e..1221a58 100644
--- a/runtime/observatory/tests/service/dev_fs_spawn_test.dart
+++ b/runtime/observatory/tests/service/dev_fs_spawn_test.dart
@@ -118,7 +118,7 @@
       if (event.kind == ServiceEvent.kIsolateSpawn) {
         expect(event.spawnToken, equals('mySpawnToken0'));
         expect(event.isolate, isNotNull);
-        expect(event.isolate.name, equals('devfs_file0.dart:main()'));
+        expect(event.isolate.name, equals('main'));
         completer.complete(event.isolate);
         sub.cancel();
       }
@@ -147,7 +147,7 @@
       if (event.kind == ServiceEvent.kIsolateSpawn) {
         expect(event.spawnToken, equals('mySpawnToken1'));
         expect(event.isolate, isNotNull);
-        expect(event.isolate.name, equals('devfs_file1.dart:main()'));
+        expect(event.isolate.name, equals('main'));
         completer.complete(event.isolate);
         sub.cancel();
       }
@@ -177,7 +177,7 @@
       if (event.kind == ServiceEvent.kIsolateSpawn) {
         expect(event.spawnToken, equals('mySpawnToken2'));
         expect(event.isolate, isNotNull);
-        expect(event.isolate.name, equals('devfs_file2.dart:main()'));
+        expect(event.isolate.name, equals('main'));
         completer.complete(event.isolate);
         sub.cancel();
       }
diff --git a/runtime/observatory/tests/service/eval_skip_breakpoint.dart b/runtime/observatory/tests/service/eval_skip_breakpoint.dart
new file mode 100644
index 0000000..447852f
--- /dev/null
+++ b/runtime/observatory/tests/service/eval_skip_breakpoint.dart
@@ -0,0 +1,44 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// VMOptions=--verbose_debug
+
+import 'package:observatory/service_io.dart';
+import 'package:unittest/unittest.dart';
+import 'service_test_common.dart';
+import 'test_helper.dart';
+import 'dart:developer';
+
+const int LINE_A = 21;
+const int LINE_B = 16;
+
+bar() {
+  print('bar');
+}
+
+testMain() {
+  debugger();
+  bar();
+  print("Done");
+}
+
+var tests = <IsolateTest>[
+  hasStoppedAtBreakpoint,
+  stoppedAtLine(LINE_A),
+// Add breakpoint
+  setBreakpointAtLine(LINE_B),
+// Evaluate 'bar()'
+  (Isolate isolate) async {
+    final lib = isolate.rootLibrary;
+    await lib.evaluate('bar()', disableBreakpoints: true);
+  },
+  hasStoppedAtBreakpoint,
+  stoppedAtLine(LINE_A),
+  resumeIsolate,
+
+  hasStoppedAtBreakpoint,
+  stoppedAtLine(LINE_B),
+  resumeIsolate,
+];
+
+main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain);
diff --git a/runtime/observatory/tests/service/get_memory_usage.dart b/runtime/observatory/tests/service/get_memory_usage.dart
new file mode 100644
index 0000000..96832c2
--- /dev/null
+++ b/runtime/observatory/tests/service/get_memory_usage.dart
@@ -0,0 +1,49 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:observatory/service_io.dart';
+import 'package:unittest/unittest.dart';
+
+import 'test_helper.dart';
+
+var tests = <VMTest>[
+  (VM vm) async {
+    var params = {
+      'isolateId': vm.isolates.first.id,
+    };
+    var result = await vm.invokeRpcNoUpgrade('getMemoryUsage', params);
+    expect(result['type'], equals('MemoryUsage'));
+    expect(result['heapUsage'], isPositive);
+    expect(result['heapCapacity'], isPositive);
+    expect(result['externalUsage'], isPositive);
+  },
+  (VM vm) async {
+    var params = {
+      'isolateId': 'badid',
+    };
+    bool caughtException;
+    try {
+      await vm.invokeRpcNoUpgrade('getMemoryUsage', params);
+      expect(false, isTrue, reason: 'Unreachable');
+    } on ServerRpcException catch (e) {
+      caughtException = true;
+      expect(e.code, equals(ServerRpcException.kInvalidParams));
+      expect(e.message, "getMemoryUsage: invalid 'isolateId' parameter: badid");
+    }
+    expect(caughtException, isTrue);
+  },
+
+  // Plausible isolate id, not found.
+  (VM vm) async {
+    var params = {
+      'isolateId': 'isolates/9999999999',
+    };
+    var result = await vm.invokeRpcNoUpgrade('getMemoryUsage', params);
+    expect(result['type'], equals('Sentinel'));
+    expect(result['kind'], equals('Collected'));
+    expect(result['valueAsString'], equals('<collected>'));
+  },
+];
+
+main(args) async => runVMTests(args, tests);
diff --git a/runtime/observatory/tests/service/get_source_report_test.dart b/runtime/observatory/tests/service/get_source_report_test.dart
index 6b70552..f859e6d 100644
--- a/runtime/observatory/tests/service/get_source_report_test.dart
+++ b/runtime/observatory/tests/service/get_source_report_test.dart
@@ -91,9 +91,7 @@
     final numRanges = coverage['ranges'].length;
     expect(coverage['type'], equals('SourceReport'));
 
-    // Running in app_jitk mode will result in the number of ranges being 10
-    // during the training run and 11 when running from the snapshot.
-    expect(((numRanges == 10) || (numRanges == 11)), isTrue);
+    expect((numRanges == 12), isTrue);
     expect(coverage['ranges'][0], equals(expectedRange));
     expect(coverage['scripts'].length, 1);
     expect(
@@ -108,7 +106,7 @@
     };
     coverage = await isolate.invokeRpcNoUpgrade('getSourceReport', params);
     expect(coverage['type'], equals('SourceReport'));
-    expect(coverage['ranges'].length, numRanges + 3);
+    expect(coverage['ranges'].length, numRanges);
     expect(allRangesCompiled(coverage), isTrue);
 
     // One function
diff --git a/runtime/observatory/tests/service/invoke_skip_breakpoint.dart b/runtime/observatory/tests/service/invoke_skip_breakpoint.dart
new file mode 100644
index 0000000..d2d258c
--- /dev/null
+++ b/runtime/observatory/tests/service/invoke_skip_breakpoint.dart
@@ -0,0 +1,50 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:developer';
+import 'package:observatory/service_io.dart';
+import 'package:unittest/unittest.dart';
+import 'service_test_common.dart';
+import 'test_helper.dart';
+
+const int LINE_A = 21;
+const int LINE_B = 16;
+
+bar() {
+  print('bar');
+  return 'bar';
+}
+
+testMain() {
+  debugger();
+  bar();
+  print("Done");
+}
+
+var tests = <IsolateTest>[
+  hasStoppedAtBreakpoint,
+  stoppedAtLine(LINE_A),
+  setBreakpointAtLine(LINE_B),
+  (Isolate isolate) async {
+    Library lib = isolate.rootLibrary;
+    await lib.load();
+
+    dynamic result = await isolate.invokeRpc("invoke", {
+      "targetId": lib.id,
+      "selector": "bar",
+      "argumentIds": [],
+      "disableBreakpoints": true
+    });
+    print(result);
+    expect(result.valueAsString, equals('bar'));
+  },
+  hasStoppedAtBreakpoint,
+  stoppedAtLine(LINE_A),
+  resumeIsolate,
+  hasStoppedAtBreakpoint,
+  stoppedAtLine(LINE_B),
+  resumeIsolate,
+];
+
+main(args) => runIsolateTests(args, tests, testeeConcurrent: testMain);
diff --git a/runtime/observatory/tests/service/next_through_await_for_test.dart b/runtime/observatory/tests/service/next_through_await_for_test.dart
new file mode 100644
index 0000000..734c1f1
--- /dev/null
+++ b/runtime/observatory/tests/service/next_through_await_for_test.dart
@@ -0,0 +1,69 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+
+import 'test_helper.dart';
+import 'service_test_common.dart';
+
+const int LINE = 14;
+const String file = "next_through_await_for_test.dart";
+
+code() async {
+  int count = 0;
+  await for (var num in naturalsTo(2)) {
+    print(num);
+    count++;
+  }
+}
+
+Stream<int> naturalsTo(int n) async* {
+  int k = 0;
+  while (k < n) {
+    k++;
+    yield k;
+  }
+  yield 42;
+}
+
+List<String> stops = [];
+List<String> expected = [
+  "$file:${LINE + 0}:13", // on '='
+  "$file:${LINE + 1}:25", // on 'naturalsTo'
+
+  // Iteration #1
+  "$file:${LINE + 1}:3", // on 'await'
+  "$file:${LINE + 1}:40", // on '{'
+  "$file:${LINE + 2}:5", // on 'print'
+  "$file:${LINE + 3}:10", // on '++'
+
+  // Iteration #2
+  "$file:${LINE + 1}:3", // on 'await'
+  "$file:${LINE + 1}:40", // on '{'
+  "$file:${LINE + 2}:5", // on 'print'
+  "$file:${LINE + 3}:10", // on '++'
+
+  // Iteration #3
+  "$file:${LINE + 1}:3", // on 'await'
+  "$file:${LINE + 1}:40", // on '{'
+  "$file:${LINE + 2}:5", // on 'print'
+  "$file:${LINE + 3}:10", // on '++'
+
+  // Done
+  "$file:${LINE + 1}:3", // on 'await'
+  "$file:${LINE + 5}:1"
+];
+
+var tests = <IsolateTest>[
+  hasPausedAtStart,
+  setBreakpointAtLine(LINE),
+  runStepThroughProgramRecordingStops(stops),
+  checkRecordedStops(stops, expected,
+      debugPrint: true, debugPrintFile: file, debugPrintLine: LINE)
+];
+
+main(args) {
+  runIsolateTestsSynchronous(args, tests,
+      testeeConcurrent: code, pause_on_start: true, pause_on_exit: true);
+}
diff --git a/runtime/observatory/tests/service/observatory_test_package/.packages b/runtime/observatory/tests/service/observatory_test_package/.packages
new file mode 100644
index 0000000..684be4e
--- /dev/null
+++ b/runtime/observatory/tests/service/observatory_test_package/.packages
@@ -0,0 +1 @@
+observatory_test_package:.
\ No newline at end of file
diff --git a/runtime/observatory/tests/service/observatory_test_package/has_part.dart b/runtime/observatory/tests/service/observatory_test_package/has_part.dart
new file mode 100644
index 0000000..381f7e8
--- /dev/null
+++ b/runtime/observatory/tests/service/observatory_test_package/has_part.dart
@@ -0,0 +1,13 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library has_part;
+
+part 'the_part.dart';
+part 'the_part_2.dart';
+
+main() {
+  Foo10 foo = new Foo10("Foo!");
+  print(foo);
+}
diff --git a/runtime/observatory/tests/service/observatory_test_package/the_part.dart b/runtime/observatory/tests/service/observatory_test_package/the_part.dart
new file mode 100644
index 0000000..d8545f8
--- /dev/null
+++ b/runtime/observatory/tests/service/observatory_test_package/the_part.dart
@@ -0,0 +1,91 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+part of has_part;
+
+void foo() {
+  print("lalala");
+}
+
+class Foo1 {
+  final foo;
+
+  Foo1(this.foo) {
+    print("hello from foo!");
+  }
+}
+
+class Foo2 {
+  final foo;
+
+  Foo2(this.foo) {
+    print("hello from foo!");
+  }
+}
+
+class Foo3 {
+  final foo;
+
+  Foo3(this.foo) {
+    print("hello from foo!");
+  }
+}
+
+class Foo4 {
+  final foo;
+
+  Foo4(this.foo) {
+    print("hello from foo!");
+  }
+}
+
+class Foo5 {
+  final foo;
+
+  Foo5(this.foo) {
+    print("hello from foo!");
+  }
+}
+
+class Foo6 {
+  final foo;
+
+  Foo6(this.foo) {
+    print("hello from foo!");
+  }
+}
+
+class Foo7 {
+  final foo;
+
+  Foo7(this.foo) {
+    print("hello from foo!");
+  }
+}
+
+class Foo8 {
+  final foo;
+
+  Foo8(this.foo) {
+    print("hello from foo!");
+  }
+}
+
+class Foo9 {
+  final foo;
+
+  Foo9(this.foo) {
+    print("hello from foo!");
+  }
+}
+
+class Foo10 {
+  final foo;
+
+  Foo10(this.foo) {
+    print("hello from foo!");
+  }
+}
+
+var foo2 = foo() as dynamic;
diff --git a/runtime/observatory/tests/service/observatory_test_package/the_part_2.dart b/runtime/observatory/tests/service/observatory_test_package/the_part_2.dart
new file mode 100644
index 0000000..c38df9c
--- /dev/null
+++ b/runtime/observatory/tests/service/observatory_test_package/the_part_2.dart
@@ -0,0 +1,9 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+part of has_part;
+
+void bar() {
+  print('Should break here');
+}
diff --git a/runtime/observatory/tests/service/service_kernel.status b/runtime/observatory/tests/service/service_kernel.status
index b72cf4c..7012181 100644
--- a/runtime/observatory/tests/service/service_kernel.status
+++ b/runtime/observatory/tests/service/service_kernel.status
@@ -50,6 +50,9 @@
 regress_34841_test: RuntimeError # http://dartbug.com/34841
 unused_changes_in_last_reload_test: RuntimeError
 
+[ $compiler == dartkb ]
+*: Skip # Debugging capabilities are not yet supported in bytecode modes.
+
 [ $compiler == dartkp ]
 *: SkipByDesign # Non-kernel also skips precompiled mode.
 
@@ -140,6 +143,7 @@
 async_generator_breakpoint_test: SkipByDesign # No incremental compiler available.
 bad_reload_test: Skip # Times out on sim architectures, also RuntimeError.
 break_on_activation_test: RuntimeError # Issue #34736
+breakpoint_in_package_parts_class_file_uri_test: RuntimeError # Issue #34736
 complex_reload_test: Skip # Times out on sim architectures, also RuntimeError.
 debugger_inspect_test: RuntimeError, Timeout # Issue #34736
 developer_service_get_isolate_id_test: RuntimeError # Issue #34736
diff --git a/runtime/observatory/tests/service/set_name_rpc_test.dart b/runtime/observatory/tests/service/set_name_rpc_test.dart
index 1d743cc..186e4e0 100644
--- a/runtime/observatory/tests/service/set_name_rpc_test.dart
+++ b/runtime/observatory/tests/service/set_name_rpc_test.dart
@@ -10,11 +10,7 @@
 
 var tests = <IsolateTest>[
   (Isolate isolate) async {
-    expect(
-        ((isolate.name == 'set_name_rpc_test.dart:main()') ||
-            (isolate.name == 'out.jitsnapshot:main()')),
-        isTrue);
-
+    expect(isolate.name == 'main', isTrue);
     Completer completer = new Completer();
     var stream = await isolate.vm.getEventStream(VM.kIsolateStream);
     var subscription;
diff --git a/runtime/observatory/tests/service/simple_reload_test.dart b/runtime/observatory/tests/service/simple_reload_test.dart
index 9a41817..3ae8295 100644
--- a/runtime/observatory/tests/service/simple_reload_test.dart
+++ b/runtime/observatory/tests/service/simple_reload_test.dart
@@ -1,6 +1,8 @@
 // Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
+//
+// OtherResources=simple_reload/v1/main.dart simple_reload/v2/main.dart
 
 import 'test_helper.dart';
 import 'dart:async';
diff --git a/runtime/observatory/tests/service/step_through_mixin_from_sdk_test.dart b/runtime/observatory/tests/service/step_through_mixin_from_sdk_test.dart
index a38c966..9f70deb 100644
--- a/runtime/observatory/tests/service/step_through_mixin_from_sdk_test.dart
+++ b/runtime/observatory/tests/service/step_through_mixin_from_sdk_test.dart
@@ -33,23 +33,23 @@
 
 List<String> stops = [];
 List<String> expected = [
-  "$file:${LINE+0}:17", // on "Foo" (in "new Foo()")
-  "$file:${LINE+1}:11", // on "="
-  "list.dart:105:24", // on parameter to "contains"
-  "list.dart:106:23", // on "length" in "this.length"
-  "list.dart:107:16", // on "=" in "i = 0"
-  "list.dart:107:23", // on "<" in "i < length"
-  "list.dart:108:15", // on "[" in "this[i]"
-  "$file:${LINE+13}:23", // on parameter in "operator []"
-  "$file:${LINE+14}:5", // on "return"
-  "list.dart:108:19", // on "=="
-  "list.dart:109:26", // on "length" in "this.length"
-  "list.dart:109:18", // on "!="
-  "list.dart:107:34", // on "++" in "i++"
-  "list.dart:107:23", // on "<" in "i < length"
-  "list.dart:113:5", // on "return"
-  "$file:${LINE+4}:5", // on "print"
-  "$file:${LINE+6}:1" // on ending '}'
+  "$file:${LINE + 0}:17", // on "Foo" (in "new Foo()")
+  "$file:${LINE + 1}:11", // on "="
+  "list.dart:100:24", // on parameter to "contains"
+  "list.dart:101:23", // on "length" in "this.length"
+  "list.dart:102:16", // on "=" in "i = 0"
+  "list.dart:102:23", // on "<" in "i < length"
+  "list.dart:103:15", // on "[" in "this[i]"
+  "$file:${LINE + 13}:23", // on parameter in "operator []"
+  "$file:${LINE + 14}:5", // on "return"
+  "list.dart:103:19", // on "=="
+  "list.dart:104:26", // on "length" in "this.length"
+  "list.dart:104:18", // on "!="
+  "list.dart:102:34", // on "++" in "i++"
+  "list.dart:102:23", // on "<" in "i < length"
+  "list.dart:108:5", // on "return"
+  "$file:${LINE + 4}:5", // on "print"
+  "$file:${LINE + 6}:1" // on ending '}'
 ];
 
 var tests = <IsolateTest>[
diff --git a/runtime/observatory/tests/service/test_helper.dart b/runtime/observatory/tests/service/test_helper.dart
index 3913854..05c37a1 100644
--- a/runtime/observatory/tests/service/test_helper.dart
+++ b/runtime/observatory/tests/service/test_helper.dart
@@ -132,6 +132,9 @@
     if (pause_on_exit) {
       fullArgs.add('--pause-isolates-on-exit');
     }
+    if (!useAuthToken) {
+      fullArgs.add('--disable-service-auth-codes');
+    }
     if (pause_on_unhandled_exceptions) {
       fullArgs.add('--pause-isolates-on-unhandled-exceptions');
     }
@@ -147,7 +150,7 @@
     fullArgs.addAll(args);
 
     return _spawnCommon(dartExecutable, fullArgs,
-        <String, String>{'DART_SERVICE_USE_AUTH': '$useAuthToken'});
+        <String, String>{});
   }
 
   Future<Process> _spawnSkyProcess(
diff --git a/runtime/platform/assert.h b/runtime/platform/assert.h
index 48d1443..ed56f3a 100644
--- a/runtime/platform/assert.h
+++ b/runtime/platform/assert.h
@@ -278,29 +278,7 @@
     if (!(cond)) dart::Assert(__FILE__, __LINE__).Fail("expected: %s", #cond); \
   } while (false)
 
-// The COMPILE_ASSERT macro can be used to verify that a compile time
-// expression is true. For example, you could use it to verify the
-// size of a static array:
-//
-//   COMPILE_ASSERT(ARRAYSIZE(content_type_names) == CONTENT_NUM_TYPES);
-//
-// or to make sure a struct is smaller than a certain size:
-//
-//   COMPILE_ASSERT(sizeof(foo) < 128);
-//
-
-template <bool>
-struct CompileAssert {};
-// Macro to concatenate two tokens. The helper is need to proper expansion
-// in case an argument is a macro itself.
-#if !defined(COMPILE_ASSERT)
-#define COMPILE_ASSERT_JOIN(a, b) COMPILE_ASSERT_JOIN_HELPER(a, b)
-#define COMPILE_ASSERT_JOIN_HELPER(a, b) a##b
-#define COMPILE_ASSERT(expr)                                                   \
-  DART_UNUSED typedef CompileAssert<(static_cast<bool>(expr))>                 \
-      COMPILE_ASSERT_JOIN(CompileAssertTypeDef,                                \
-                          __LINE__)[static_cast<bool>(expr) ? 1 : -1]
-#endif  // !defined(COMPILE_ASSERT)
+#define COMPILE_ASSERT(expr) static_assert(expr, "")
 
 #if defined(TESTING)
 
diff --git a/runtime/platform/globals.h b/runtime/platform/globals.h
index 0dfd620..7815569 100644
--- a/runtime/platform/globals.h
+++ b/runtime/platform/globals.h
@@ -5,6 +5,16 @@
 #ifndef RUNTIME_PLATFORM_GLOBALS_H_
 #define RUNTIME_PLATFORM_GLOBALS_H_
 
+#if __cplusplus >= 201703L            // C++17
+#define FALL_THROUGH [[fallthrough]]  // NOLINT
+#elif defined(__GNUC__) && __GNUC__ >= 7
+#define FALL_THROUGH __attribute__((fallthrough));
+#elif defined(__clang__)
+#define FALL_THROUGH [[clang::fallthrough]]  // NOLINT
+#else
+#define FALL_THROUGH ((void)0)
+#endif
+
 // __STDC_FORMAT_MACROS has to be defined before including <inttypes.h> to
 // enable platform independent printf format specifiers.
 #ifndef __STDC_FORMAT_MACROS
@@ -342,10 +352,17 @@
 #error Unknown architecture.
 #endif
 
-// Disable background threads by default on armv5te. The relevant
-// implementations are uniprocessors.
-#if !defined(TARGET_ARCH_ARM_5TE)
-#define ARCH_IS_MULTI_CORE 1
+// Determine whether HOST_ARCH equals TARGET_ARCH.
+#if defined(HOST_ARCH_ARM) && defined(TARGET_ARCH_ARM)
+#define HOST_ARCH_EQUALS_TARGET_ARCH 1
+#elif defined(HOST_ARCH_ARM64) && defined(TARGET_ARCH_ARM64)
+#define HOST_ARCH_EQUALS_TARGET_ARCH 1
+#elif defined(HOST_ARCH_IA32) && defined(TARGET_ARCH_IA32)
+#define HOST_ARCH_EQUALS_TARGET_ARCH 1
+#elif defined(HOST_ARCH_X64) && defined(TARGET_ARCH_X64)
+#define HOST_ARCH_EQUALS_TARGET_ARCH 1
+#else
+// HOST_ARCH != TARGET_ARCH.
 #endif
 
 #if !defined(TARGET_OS_ANDROID) && !defined(TARGET_OS_FUCHSIA) &&              \
@@ -370,6 +387,20 @@
 #endif
 #endif
 
+// Determine whether dual mapping of code pages is supported.
+// We test dual mapping on linux x64 and deploy it on fuchsia.
+#if !defined(DART_PRECOMPILED_RUNTIME) &&                                      \
+    (defined(TARGET_OS_LINUX) && defined(TARGET_ARCH_X64) ||                   \
+     defined(TARGET_OS_FUCHSIA))
+#define DUAL_MAPPING_SUPPORTED 1
+#endif
+
+// Disable background threads by default on armv5te. The relevant
+// implementations are uniprocessors.
+#if !defined(TARGET_ARCH_ARM_5TE)
+#define ARCH_IS_MULTI_CORE 1
+#endif
+
 // Short form printf format specifiers
 #define Pd PRIdPTR
 #define Pu PRIuPTR
@@ -513,8 +544,8 @@
 #if !defined(DISALLOW_COPY_AND_ASSIGN)
 #define DISALLOW_COPY_AND_ASSIGN(TypeName)                                     \
  private:                                                                      \
-  TypeName(const TypeName&);                                                   \
-  void operator=(const TypeName&)
+  TypeName(const TypeName&) = delete;                                          \
+  void operator=(const TypeName&) = delete
 #endif  // !defined(DISALLOW_COPY_AND_ASSIGN)
 
 // A macro to disallow all the implicit constructors, namely the default
@@ -525,7 +556,7 @@
 #if !defined(DISALLOW_IMPLICIT_CONSTRUCTORS)
 #define DISALLOW_IMPLICIT_CONSTRUCTORS(TypeName)                               \
  private:                                                                      \
-  TypeName();                                                                  \
+  TypeName() = delete;                                                         \
   DISALLOW_COPY_AND_ASSIGN(TypeName)
 #endif  // !defined(DISALLOW_IMPLICIT_CONSTRUCTORS)
 
diff --git a/runtime/platform/text_buffer.cc b/runtime/platform/text_buffer.cc
index b1ef63a..ec42113 100644
--- a/runtime/platform/text_buffer.cc
+++ b/runtime/platform/text_buffer.cc
@@ -135,12 +135,7 @@
 void TextBuffer::EnsureCapacity(intptr_t len) {
   intptr_t remaining = buf_size_ - msg_len_;
   if (remaining <= len) {
-    const int kBufferSpareCapacity = 64;  // Somewhat arbitrary.
-    // TODO(turnidge): do we need to guard against overflow or other
-    // security issues here? Text buffers are used by the debugger
-    // to send user-controlled data (e.g. values of string variables) to
-    // the debugger front-end.
-    intptr_t new_size = buf_size_ + len + kBufferSpareCapacity;
+    intptr_t new_size = buf_size_ + Utils::Maximum(buf_size_, len);
     char* new_buf = reinterpret_cast<char*>(realloc(buf_, new_size));
     if (new_buf == NULL) {
       OUT_OF_MEMORY();
diff --git a/runtime/platform/utils.cc b/runtime/platform/utils.cc
index 205cafc..ee982dc 100644
--- a/runtime/platform/utils.cc
+++ b/runtime/platform/utils.cc
@@ -78,10 +78,10 @@
   switch (size) {
     case 3:
       hash ^= cursor[2] << 16;
-      /* Falls through. */
+      FALL_THROUGH;
     case 2:
       hash ^= cursor[1] << 8;
-      /* Falls through. */
+      FALL_THROUGH;
     case 1:
       hash ^= cursor[0];
       hash *= M;
diff --git a/runtime/runtime_args.gni b/runtime/runtime_args.gni
index d830208..cf9e71d 100644
--- a/runtime/runtime_args.gni
+++ b/runtime/runtime_args.gni
@@ -95,7 +95,7 @@
   # We create a kernel service app-jit snapshot only for when the target
   # architecture is x64 for other cases we will use the '.dill' file
   # which is already linked in the VM.
-  if (dart_target_arch == "x64" && !dart_platform_bytecode) {
+  if (dart_target_arch == "x64") {
     create_kernel_service_snapshot = true
   } else {
     create_kernel_service_snapshot = false
diff --git a/runtime/tests/vm/dart/appjit_bytecode_simple_test.dart b/runtime/tests/vm/dart/appjit_bytecode_simple_test.dart
index 6600482..d936339 100644
--- a/runtime/tests/vm/dart/appjit_bytecode_simple_test.dart
+++ b/runtime/tests/vm/dart/appjit_bytecode_simple_test.dart
@@ -2,11 +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.
 
+// OtherResources=appjit_bytecode_simple_test_body.dart
+
 // Verify that app-jit snapshot contains dependencies between classes and CHA
 // optimized code.
 
 import 'dart:async';
+import 'dart:io' show Platform;
 
 import 'snapshot_test_helper.dart';
 
-Future<void> main() => runAppJitBytecodeTest();
+Future<void> main() => runAppJitBytecodeTest(
+    Platform.script.resolve('appjit_bytecode_simple_test_body.dart'));
diff --git a/runtime/tests/vm/dart/appjit_cha_deopt_test.dart b/runtime/tests/vm/dart/appjit_cha_deopt_test.dart
index fabc41b..104d431 100644
--- a/runtime/tests/vm/dart/appjit_cha_deopt_test.dart
+++ b/runtime/tests/vm/dart/appjit_cha_deopt_test.dart
@@ -2,13 +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.
 
+// OtherResources=appjit_cha_deopt_test_body.dart
 // VMOptions=--optimization-counter-threshold=100
 
 // Verify that app-jit snapshot contains dependencies between classes and CHA
 // optimized code.
 
 import 'dart:async';
+import 'dart:io' show Platform;
 
 import 'snapshot_test_helper.dart';
 
-Future<void> main() => runAppJitTest();
+Future<void> main() =>
+    runAppJitTest(Platform.script.resolve('appjit_cha_deopt_test_body.dart'));
diff --git a/runtime/tests/vm/dart/appjit_load_static_licm_test.dart b/runtime/tests/vm/dart/appjit_load_static_licm_test.dart
index 9f51b70..804e30c 100644
--- a/runtime/tests/vm/dart/appjit_load_static_licm_test.dart
+++ b/runtime/tests/vm/dart/appjit_load_static_licm_test.dart
@@ -2,11 +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.
 
+// OtherResources=appjit_load_static_licm_test_body.dart
+
 // Verify that app-jit snapshot contains dependencies between classes and CHA
 // optimized code.
 
 import 'dart:async';
+import 'dart:io' show Platform;
 
 import 'snapshot_test_helper.dart';
 
-Future<void> main() => runAppJitTest();
+Future<void> main() => runAppJitTest(
+    Platform.script.resolve('appjit_load_static_licm_test_body.dart'));
diff --git a/runtime/tests/vm/dart/compilation_trace_test.dart b/runtime/tests/vm/dart/compilation_trace_test.dart
new file mode 100644
index 0000000..4ebafb5
--- /dev/null
+++ b/runtime/tests/vm/dart/compilation_trace_test.dart
@@ -0,0 +1,45 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "dart:async";
+import "dart:io";
+
+import "package:path/path.dart" as p;
+
+import "snapshot_test_helper.dart";
+
+int fib(int n) {
+  if (n <= 1) return 1;
+  return fib(n - 1) + fib(n - 2);
+}
+
+Future<void> main(List<String> args) async {
+  if (args.contains("--child")) {
+    print(fib(35));
+    return;
+  }
+
+  if (!Platform.script.toString().endsWith(".dart")) {
+    print("This test must run from source");
+    return;
+  }
+
+  await withTempDir((String tmp) async {
+    final String tracePath = p.join(tmp, "compilation_trace.txt");
+
+    final result1 = await runDart("generate compilation trace", [
+      "--save_compilation_trace=$tracePath",
+      Platform.script.toFilePath(),
+      "--child",
+    ]);
+    expectOutput("14930352", result1);
+
+    final result2 = await runDart("use compilation trace", [
+      "--load_compilation_trace=$tracePath",
+      Platform.script.toFilePath(),
+      "--child",
+    ]);
+    expectOutput("14930352", result2);
+  });
+}
diff --git a/runtime/tests/vm/dart/licm_and_assert_strengthening_test.dart b/runtime/tests/vm/dart/licm_and_assert_strengthening_test.dart
new file mode 100644
index 0000000..a1c962e
--- /dev/null
+++ b/runtime/tests/vm/dart/licm_and_assert_strengthening_test.dart
@@ -0,0 +1,48 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+// VMOptions=--optimization-counter-threshold=10 --no-background-compilation
+
+// This test checks for obscure interaction between LICM and AssertAssignable
+// strengthening performed by Type Propagator. The later would use deopt_id
+// from an environment attached to AssertAssignable, and this deopt id under
+// certain conditions would be set to -1. The code was changed to never
+// use deopt_id from the environment but this regression test is provided for
+// completeness.
+
+class A<T> {
+  var foo = 42;
+}
+
+class B extends A<String> {}
+
+class C extends B {}
+
+void foo(dynamic a) {
+  // To prevent AssertAssignable strengthening from occuring too early we
+  // need to hide the fact that CheckClass and AssertAssignable are performed
+  // against the same SSA value. To achieve that we store a into an array and
+  // then load it back. Load Forwarding would happen just before LICM and
+  // will remove the indirection. Then LICM would hoist both CheckClass
+  // and AssertAssignable out of the loop and then strengthening would happen.
+  final box = <dynamic>[null];
+  box[0] = a;
+
+  for (var i = 0; i < 1; i++) {
+    a as A<String>;
+    if (box[0].foo != 42) {
+      throw "unexpected";
+    }
+  }
+}
+
+void main() {
+  for (var i = 0; i < 100; i++) {
+    foo(B());
+  }
+
+  // Trigger deoptimization on the CheckClass produced by strengthened
+  // AssertAssignable - if this CheckClass has wrong deoptimization id a crash
+  // would occur.
+  foo(C());
+}
diff --git a/runtime/tests/vm/dart/null_checks_with_dwarf_stack_traces_test.dart b/runtime/tests/vm/dart/null_checks_with_dwarf_stack_traces_test.dart
new file mode 100644
index 0000000..e8dfe76
--- /dev/null
+++ b/runtime/tests/vm/dart/null_checks_with_dwarf_stack_traces_test.dart
@@ -0,0 +1,56 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// VMOptions=--dwarf-stack-traces
+
+// This test verifies that null checks are handled correctly
+// with --dwarf-stack-traces option (dartbug.com/35851).
+
+import "package:expect/expect.dart";
+
+class A {
+  void foo() {
+    Expect.fail('A.foo should not be reachable');
+  }
+
+  dynamic get bar {
+    Expect.fail('A.bar should not be reachable');
+  }
+
+  set bazz(int x) {
+    Expect.fail('A.bazz should not be reachable');
+  }
+}
+
+A myNull;
+double doubleNull;
+int intNull;
+
+main(List<String> args) {
+  // Make sure value of `myNull` is not a compile-time null and
+  // devirtualization happens.
+  if (args.length > 42) {
+    myNull = new A();
+    doubleNull = 3.14;
+    intNull = 2;
+  }
+
+  Expect.throws(() => myNull.foo(), (e) => e is NoSuchMethodError);
+
+  Expect.throws(() => myNull.foo, (e) => e is NoSuchMethodError);
+
+  Expect.throws(() => myNull.bar, (e) => e is NoSuchMethodError);
+
+  Expect.throws(() => myNull.bar(), (e) => e is NoSuchMethodError);
+
+  Expect.throws(() {
+    myNull.bazz = 3;
+  }, (e) => e is NoSuchMethodError);
+
+  Expect.throws(() => doubleNull + 2.17, (e) => e is NoSuchMethodError);
+
+  Expect.throws(() => 9.81 - doubleNull, (e) => e is NoSuchMethodError);
+
+  Expect.throws(() => intNull * 7, (e) => e is NoSuchMethodError);
+}
diff --git a/runtime/tests/vm/dart/regress_36374_test.dart b/runtime/tests/vm/dart/regress_36374_test.dart
new file mode 100644
index 0000000..45df0f1
--- /dev/null
+++ b/runtime/tests/vm/dart/regress_36374_test.dart
@@ -0,0 +1,29 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// Regression test for https://github.com/dart-lang/sdk/issues/36374.
+//
+// Bytecode flow graph builder should be able to correctly handle non-empty
+// expression stack when throwing an exception: dropping some of the entries,
+// while keeping entries which could still be used.
+//
+// VMOptions=--optimization_counter_threshold=10 --deterministic
+
+class Foo {
+  Foo(int x);
+}
+
+class Bar {
+  Bar(String y, Foo z);
+}
+
+foo(Object arg) {
+  return Bar('abc', arg == null ? null : Foo((throw 'Err')));
+}
+
+main() {
+  for (int i = 0; i < 20; ++i) {
+    foo(null);
+  }
+}
diff --git a/runtime/tests/vm/dart/regress_36590_test.dart b/runtime/tests/vm/dart/regress_36590_test.dart
new file mode 100644
index 0000000..645c45b
--- /dev/null
+++ b/runtime/tests/vm/dart/regress_36590_test.dart
@@ -0,0 +1,58 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// Regression test for https://github.com/dart-lang/sdk/issues/36590.
+//
+// This test verifies that compiler does not crash if OSR occurs at
+// CheckStack bytecode instruction which is not at the beginning of a join
+// block in bytecode (if the end of the "loop" body is unreachable and hence
+// there is no backward jump).
+//
+// VMOptions=--deterministic
+
+var var6 = [1, 2, 3];
+
+void bar() {}
+
+var cond_true = true;
+
+void foo() {
+  for (int i = 0; i < 9995; ++i) {
+    var6[0] += 1;
+  }
+  if (cond_true) {
+    var6[0] += 1;
+    for (var loc1 in var6) {
+      break;
+    }
+  }
+  if (cond_true) {
+    var6[0] += 1;
+    for (var loc1 in var6) {
+      break;
+    }
+  }
+  if (cond_true) {
+    var6[0] += 1;
+    for (var loc1 in var6) {
+      break;
+    }
+  }
+  if (cond_true) {
+    var6[0] += 1;
+    for (var loc1 in var6) {
+      break;
+    }
+  }
+  if (cond_true) {
+    var6[0] += 1;
+    for (var loc1 in var6) {
+      break;
+    }
+  }
+}
+
+main() {
+  foo();
+}
diff --git a/runtime/tests/vm/dart/reused_instructions_test.dart b/runtime/tests/vm/dart/reused_instructions_test.dart
new file mode 100644
index 0000000..a2316c8
--- /dev/null
+++ b/runtime/tests/vm/dart/reused_instructions_test.dart
@@ -0,0 +1,92 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "dart:async";
+import "dart:io";
+
+import "package:path/path.dart" as p;
+
+import "snapshot_test_helper.dart";
+
+int fib(int n) {
+  if (n <= 1) return 1;
+  return fib(n - 1) + fib(n - 2);
+}
+
+Future<void> main(List<String> args) async {
+  if (args.contains("--child")) {
+    print(fib(35));
+    return;
+  }
+
+  if (!Platform.script.toString().endsWith(".dart")) {
+    print("This test must run from source");
+    return;
+  }
+
+  await withTempDir((String tmp) async {
+    final String coreVMDataPath = p.join(tmp, "core_vm_snapshot_data.bin");
+    final String coreIsoDataPath =
+        p.join(tmp, "core_isolate_snapshot_data.bin");
+    final String baselineIsoDataPath =
+        p.join(tmp, "baseline_isolate_snapshot_data.bin");
+    final String baselineIsoInstrPath =
+        p.join(tmp, "baseline_isolate_snapshot_instructions.bin");
+    final String patchIsoDataPath =
+        p.join(tmp, "patch_isolate_snapshot_data.bin");
+    final String patchIsoInstrPath =
+        p.join(tmp, "patch_isolate_snapshot_instr.bin");
+    final String kernelPath = p.join(tmp, "app.dill");
+    final String tracePath = p.join(tmp, "compilation_trace.txt");
+
+    // We don't support snapshot with code on IA32.
+    final String appSnapshotKind =
+        Platform.version.contains("ia32") ? "app" : "app-jit";
+
+    final result1 = await runGenKernel("generate kernel", [
+      Platform.script.toFilePath(),
+      "--output",
+      kernelPath,
+    ]);
+    expectOutput("", result1);
+
+    final result2 = await runDart("generate compilation trace", [
+      "--save_compilation_trace=$tracePath",
+      kernelPath,
+      "--child",
+    ]);
+    expectOutput("14930352", result2);
+
+    final result3 = await runGenSnapshot("generate core snapshot", [
+      "--snapshot_kind=core",
+      "--vm_snapshot_data=${coreVMDataPath}",
+      "--isolate_snapshot_data=${coreIsoDataPath}",
+      platformDill,
+    ]);
+    expectOutput("", result3);
+
+    final result4 = await runGenSnapshot("generate baseline app snapshot", [
+      "--snapshot_kind=${appSnapshotKind}",
+      "--load_vm_snapshot_data=${coreVMDataPath}",
+      "--load_isolate_snapshot_data=${coreIsoDataPath}",
+      "--isolate_snapshot_data=${baselineIsoDataPath}",
+      "--isolate_snapshot_instructions=${baselineIsoInstrPath}",
+      "--load_compilation_trace=$tracePath",
+      kernelPath,
+    ]);
+    expectOutput("", result4);
+
+    final result5 = await runGenSnapshot("generate patch app snapshot", [
+      "--snapshot_kind=${appSnapshotKind}",
+      "--load_vm_snapshot_data=${coreVMDataPath}",
+      "--load_isolate_snapshot_data=${coreIsoDataPath}",
+      "--isolate_snapshot_data=${patchIsoDataPath}",
+      "--isolate_snapshot_instructions=${patchIsoInstrPath}",
+      "--reused_instructions=${baselineIsoInstrPath}",
+      "--load_compilation_trace=$tracePath",
+      kernelPath,
+    ]);
+    expectOutput("", result5);
+  });
+}
diff --git a/runtime/tests/vm/dart/shared_snapshot_test.dart b/runtime/tests/vm/dart/shared_snapshot_test.dart
new file mode 100644
index 0000000..eff8068
--- /dev/null
+++ b/runtime/tests/vm/dart/shared_snapshot_test.dart
@@ -0,0 +1,93 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "dart:async";
+import "dart:io";
+
+import "package:path/path.dart" as p;
+
+import "snapshot_test_helper.dart";
+
+int fib(int n) {
+  if (n <= 1) return 1;
+  return fib(n - 1) + fib(n - 2);
+}
+
+Future<void> main(List<String> args) async {
+  if (args.contains("--child")) {
+    print(fib(35));
+    return;
+  }
+
+  if (!Platform.script.toString().endsWith(".dart")) {
+    print("This test must run from source");
+    return;
+  }
+
+  await withTempDir((String tmp) async {
+    final String coreVMDataPath = p.join(tmp, "core_vm_snapshot_data.bin");
+    final String coreIsoDataPath =
+        p.join(tmp, "core_isolate_snapshot_data.bin");
+    final String baselineIsoDataPath =
+        p.join(tmp, "baseline_isolate_snapshot_data.bin");
+    final String baselineIsoInstrPath =
+        p.join(tmp, "baseline_isolate_snapshot_instructions.bin");
+    final String patchIsoDataPath =
+        p.join(tmp, "patch_isolate_snapshot_data.bin");
+    final String patchIsoInstrPath =
+        p.join(tmp, "patch_isolate_snapshot_instr.bin");
+    final String kernelPath = p.join(tmp, "app.dill");
+    final String tracePath = p.join(tmp, "compilation_trace.txt");
+
+    // We don't support snapshot with code on IA32.
+    final String appSnapshotKind =
+        Platform.version.contains("ia32") ? "app" : "app-jit";
+
+    final result1 = await runGenKernel("generate kernel", [
+      Platform.script.toFilePath(),
+      "--output",
+      kernelPath,
+    ]);
+    expectOutput("", result1);
+
+    final result2 = await runDart("generate compilation trace", [
+      "--save_compilation_trace=$tracePath",
+      kernelPath,
+      "--child",
+    ]);
+    expectOutput("14930352", result2);
+
+    final result3 = await runGenSnapshot("generate core snapshot", [
+      "--snapshot_kind=core",
+      "--vm_snapshot_data=${coreVMDataPath}",
+      "--isolate_snapshot_data=${coreIsoDataPath}",
+      platformDill,
+    ]);
+    expectOutput("", result3);
+
+    final result4 = await runGenSnapshot("generate baseline app snapshot", [
+      "--snapshot_kind=${appSnapshotKind}",
+      "--load_vm_snapshot_data=${coreVMDataPath}",
+      "--load_isolate_snapshot_data=${coreIsoDataPath}",
+      "--isolate_snapshot_data=${baselineIsoDataPath}",
+      "--isolate_snapshot_instructions=${baselineIsoInstrPath}",
+      "--load_compilation_trace=$tracePath",
+      kernelPath,
+    ]);
+    expectOutput("", result4);
+
+    final result5 = await runGenSnapshot("generate patch app snapshot", [
+      "--snapshot_kind=${appSnapshotKind}",
+      "--load_vm_snapshot_data=${coreVMDataPath}",
+      "--load_isolate_snapshot_data=${coreIsoDataPath}",
+      "--isolate_snapshot_data=${patchIsoDataPath}",
+      "--isolate_snapshot_instructions=${patchIsoInstrPath}",
+      "--shared_data=${baselineIsoDataPath}",
+      "--shared_instructions=${baselineIsoInstrPath}",
+      "--load_compilation_trace=$tracePath",
+      kernelPath,
+    ]);
+    expectOutput("", result5);
+  });
+}
diff --git a/runtime/tests/vm/dart/snapshot_test_helper.dart b/runtime/tests/vm/dart/snapshot_test_helper.dart
index 5c27ced..5c63da1 100644
--- a/runtime/tests/vm/dart/snapshot_test_helper.dart
+++ b/runtime/tests/vm/dart/snapshot_test_helper.dart
@@ -41,15 +41,39 @@
   }
 }
 
-Future<Result> runDartBinary(String prefix, List<String> arguments) async {
-  final binary = Platform.executable;
-  final actualArguments = <String>[]
+final String scriptSuffix = Platform.isWindows ? ".bat" : "";
+final String executableSuffix = Platform.isWindows ? ".exe" : "";
+final String buildDir = p.dirname(Platform.executable);
+final String platformDill = p.join(buildDir, "vm_platform_strong.dill");
+final String genSnapshot = p.join(buildDir, "gen_snapshot${executableSuffix}");
+final String genKernel =
+    p.join("pkg", "vm", "tool", "gen_kernel${scriptSuffix}");
+
+Future<Result> runDart(String prefix, List<String> arguments) {
+  final augmentedArguments = <String>[]
     ..addAll(Platform.executableArguments)
     ..addAll(arguments);
-  print("+ $binary " + actualArguments.join(" "));
-  final processResult = await Process.run(binary, actualArguments);
-  final result = new Result(
-      '[$prefix] ${binary} ${actualArguments.join(' ')}', processResult);
+  return runBinary(prefix, Platform.executable, augmentedArguments);
+}
+
+Future<Result> runGenKernel(String prefix, List<String> arguments) {
+  final augmentedArguments = <String>[]
+    ..add("--platform")
+    ..add(platformDill)
+    ..addAll(arguments);
+  return runBinary(prefix, genKernel, augmentedArguments);
+}
+
+Future<Result> runGenSnapshot(String prefix, List<String> arguments) {
+  return runBinary(prefix, genSnapshot, arguments);
+}
+
+Future<Result> runBinary(
+    String prefix, String binary, List<String> arguments) async {
+  print("+ $binary " + arguments.join(" "));
+  final processResult = await Process.run(binary, arguments);
+  final result =
+      new Result('[$prefix] ${binary} ${arguments.join(' ')}', processResult);
 
   if (processResult.stdout.isNotEmpty) {
     print('''
@@ -72,16 +96,23 @@
   return result;
 }
 
-Future<Null> checkDeterministicSnapshot(
-    String snapshotKind, String expectedStdout) async {
-  final Directory temp = Directory.systemTemp.createTempSync();
-  final snapshot1Path = p.join(temp.path, 'snapshot1');
-  final snapshot2Path = p.join(temp.path, 'snapshot2');
-
+withTempDir(Future fun(String dir)) async {
+  final Directory tempDir = Directory.systemTemp.createTempSync();
   try {
+    await fun(tempDir.path);
+  } finally {
+    tempDir.deleteSync(recursive: true);
+  }
+}
+
+checkDeterministicSnapshot(String snapshotKind, String expectedStdout) async {
+  await withTempDir((String temp) async {
+    final snapshot1Path = p.join(temp, 'snapshot1');
+    final snapshot2Path = p.join(temp, 'snapshot2');
+
     print("Version ${Platform.version}");
 
-    final generate1Result = await runDartBinary('GENERATE SNAPSHOT 1', [
+    final generate1Result = await runDart('GENERATE SNAPSHOT 1', [
       '--deterministic',
       '--trace_class_finalization',
       '--trace_type_finalization',
@@ -94,7 +125,7 @@
     ]);
     expectOutput(expectedStdout, generate1Result);
 
-    final generate2Result = await runDartBinary('GENERATE SNAPSHOT 2', [
+    final generate2Result = await runDart('GENERATE SNAPSHOT 2', [
       '--deterministic',
       '--trace_class_finalization',
       '--trace_type_finalization',
@@ -117,42 +148,32 @@
       }
     }
     Expect.equals(snapshot1Bytes.length, snapshot2Bytes.length);
-  } finally {
-    await temp.delete(recursive: true);
-  }
+  });
 }
 
-Future<void> runAppJitTest() async {
-  final Directory temp = Directory.systemTemp.createTempSync();
-  final snapshotPath = p.join(temp.path, 'app.jit');
-  final testPath = Platform.script
-      .toFilePath()
-      .replaceAll(new RegExp(r'_test.dart$'), '_test_body.dart');
+runAppJitTest(Uri testScriptUri) async {
+  await withTempDir((String temp) async {
+    final snapshotPath = p.join(temp, 'app.jit');
+    final testPath = testScriptUri.toFilePath();
 
-  try {
-    final trainingResult = await runDartBinary('TRAINING RUN', [
+    final trainingResult = await runDart('TRAINING RUN', [
       '--snapshot=$snapshotPath',
       '--snapshot-kind=app-jit',
       testPath,
       '--train'
     ]);
     expectOutput("OK(Trained)", trainingResult);
-    final runResult = await runDartBinary('RUN FROM SNAPSHOT', [snapshotPath]);
+    final runResult = await runDart('RUN FROM SNAPSHOT', [snapshotPath]);
     expectOutput("OK(Run)", runResult);
-  } finally {
-    await temp.delete(recursive: true);
-  }
+  });
 }
 
-Future<void> runAppJitBytecodeTest() async {
-  final Directory temp = Directory.systemTemp.createTempSync();
-  final snapshotPath = p.join(temp.path, 'app.jit');
-  final testPath = Platform.script
-      .toFilePath()
-      .replaceAll(new RegExp(r'_test.dart$'), '_test_body.dart');
+Future<void> runAppJitBytecodeTest(Uri testScriptUri) async {
+  await withTempDir((String temp) async {
+    final snapshotPath = p.join(temp, 'app.jit');
+    final testPath = testScriptUri.toFilePath();
 
-  try {
-    final trainingResult = await runDartBinary('TRAINING RUN', [
+    final trainingResult = await runDart('TRAINING RUN', [
       '--enable_interpreter',
       '--snapshot=$snapshotPath',
       '--snapshot-kind=app-jit',
@@ -160,10 +181,8 @@
       '--train'
     ]);
     expectOutput("OK(Trained)", trainingResult);
-    final runResult = await runDartBinary(
+    final runResult = await runDart(
         'RUN FROM SNAPSHOT', ['--enable_interpreter', snapshotPath]);
     expectOutput("OK(Run)", runResult);
-  } finally {
-    await temp.delete(recursive: true);
-  }
+  });
 }
diff --git a/runtime/tests/vm/dart/trigger_gc_in_native_test.dart b/runtime/tests/vm/dart/trigger_gc_in_native_test.dart
new file mode 100644
index 0000000..4205fa6
--- /dev/null
+++ b/runtime/tests/vm/dart/trigger_gc_in_native_test.dart
@@ -0,0 +1,31 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// VMOptions=--no_concurrent_mark --no_concurrent_sweep
+// VMOptions=--no_concurrent_mark --concurrent_sweep
+// VMOptions=--no_concurrent_mark --use_compactor
+// VMOptions=--no_concurrent_mark --use_compactor --force_evacuation
+// VMOptions=--concurrent_mark --no_concurrent_sweep
+// VMOptions=--concurrent_mark --concurrent_sweep
+// VMOptions=--concurrent_mark --use_compactor
+// VMOptions=--concurrent_mark --use_compactor --force_evacuation
+
+import 'dart:typed_data';
+
+main() {
+  final List<List> arrays = [];
+  // Fill up heap with alternate large-small items.
+  for (int i = 0; i < 500000; i++) {
+    arrays.add(new Uint32List(260));
+    arrays.add(new Uint32List(1));
+  }
+  // Clear the large items so the heap has large gaps.
+  for (int i = 0; i < arrays.length; i += 2) {
+    arrays[i] = null;
+  }
+  // Allocate a lot of large items which don't fit in the gaps created above.
+  for (int i = 0; i < 600000; i++) {
+    arrays.add(new Uint32List(300));
+  }
+}
diff --git a/runtime/tests/vm/dart/type_feedback_test.dart b/runtime/tests/vm/dart/type_feedback_test.dart
new file mode 100644
index 0000000..6211c70
--- /dev/null
+++ b/runtime/tests/vm/dart/type_feedback_test.dart
@@ -0,0 +1,45 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "dart:async";
+import "dart:io";
+
+import "package:path/path.dart" as p;
+
+import "snapshot_test_helper.dart";
+
+int fib(int n) {
+  if (n <= 1) return 1;
+  return fib(n - 1) + fib(n - 2);
+}
+
+Future<void> main(List<String> args) async {
+  if (args.contains("--child")) {
+    print(fib(35));
+    return;
+  }
+
+  if (!Platform.script.toString().endsWith(".dart")) {
+    print("This test must run from source");
+    return;
+  }
+
+  await withTempDir((String tmp) async {
+    final String feedbackPath = p.join(tmp, "type_feedback.bin");
+
+    final result1 = await runDart("generate type feedback", [
+      "--save_type_feedback=$feedbackPath",
+      Platform.script.toFilePath(),
+      "--child",
+    ]);
+    expectOutput("14930352", result1);
+
+    final result2 = await runDart("use type feedback", [
+      "--load_type_feedback=$feedbackPath",
+      Platform.script.toFilePath(),
+      "--child",
+    ]);
+    expectOutput("14930352", result2);
+  });
+}
diff --git a/runtime/tests/vm/vm.status b/runtime/tests/vm/vm.status
index 4e33a68..195b548 100644
--- a/runtime/tests/vm/vm.status
+++ b/runtime/tests/vm/vm.status
@@ -4,6 +4,7 @@
 
 cc/AllocGeneric_Overflow: Crash, Fail # These tests are expected to crash on all platforms.
 cc/ArrayNew_Overflow_Crash: Crash, Fail # These tests are expected to crash on all platforms.
+cc/CodeExecutability: Crash, Fail # These tests are expected to crash on all platforms.
 cc/CodeImmutability: Crash, Fail # These tests are expected to crash on all platforms.
 cc/Dart2JSCompileAll: Fail, Crash # Issue 27369
 cc/Dart2JSCompilerStats: Fail, Crash # Issue 27369
@@ -28,6 +29,7 @@
 dart/appjit_cha_deopt_test: Pass, Slow # Quite slow in debug mode, uses --optimization-counter-threshold=100
 
 [ $builder_tag == asan ]
+cc/CodeExecutability: Fail, OK # Address Sanitizer turns a crash into a failure.
 cc/CodeImmutability: Fail, OK # Address Sanitizer turns a crash into a failure.
 
 [ $builder_tag == optimization_counter_threshold ]
@@ -39,21 +41,9 @@
 dart/redirection_type_shuffling_test/none: RuntimeError
 dart/snapshot_version_test: RuntimeError
 
-[ $compiler == dart2js ]
-dart/byte_array_optimized_test: Skip # compilers not aware of byte arrays
-dart/byte_array_test: Skip # compilers not aware of byte arrays
-dart/error_messages_in_null_checks_test: SkipByDesign # Dart2js throws NullError exceptions with different messages.
-dart/inline_stack_frame_test: Skip # Issue 7953, Methods can be missing in dart2js stack traces due to inlining. Also when minifying they can be renamed, which is issue 7953.
-dart/issue32950_test: SkipByDesign # uses isolates.
-dart/optimized_stacktrace_line_and_column_test: RuntimeError # The source positions do not match with dart2js.
-dart/optimized_stacktrace_line_test: RuntimeError # The source positions do not match with dart2js.
-dart/redirection_type_shuffling_test: Skip # Depends on lazy enforcement of type bounds
-dart/simd128float32_array_test: Skip # compilers not aware of Simd128
-dart/simd128float32_test: Skip # compilers not aware of Simd128
-dart/truncating_ints_test: SkipByDesign # The test requires int64.
-dart/wrap_around_in_range_analysis_test: SkipByDesign # The test requires int64.
-dart/regress_range_analysis_shift_test: SkipByDesign # The test requires int64.
-dart/fuzz3608420507_regression_test: SkipByDesign # Not relevant to dart2js.
+[ $hot_reload || $hot_reload_rollback ]
+dart/compilation_trace_test: Pass, Slow
+dart/type_feedback_test: Pass, Slow
 
 [ $compiler != dartk || ($arch != x64 && $arch != simarm && $arch != arm) || $hot_reload || $hot_reload_rollback ]
 dart/entrypoints/jit/*: SkipByDesign  # Only supported in the Dart 2 JIT and AOT, and test optimizations - hence disabled on hotreload bots.
@@ -87,8 +77,7 @@
 dart/data_uri_import_test/badencodeddate: CompileTimeError
 
 [ $compiler == precompiler ]
-dart/byte_array_test: Skip # Incompatible flag --disable_alloc_stubs_after_gc
-vm/dart/error_stacktrace_test: Skip # Dart 1 AOT to be retired soon.
+dart/byte_array_test: SkipByDesign # Incompatible flag --disable_alloc_stubs_after_gc
 
 [ $mode == debug ]
 cc/CorelibIsolateStartup: SkipByDesign # This is a benchmark that is not informative in debug mode.
@@ -104,10 +93,7 @@
 cc/CorelibIsolateStartup: Timeout, Pass
 
 [ $runtime != vm ]
-dart/hello_fuchsia_test: SkipByDesign # This is a test for fuchsia OS
-dart/snapshot_version_test: SkipByDesign # Spawns processes
-dart/spawn_infinite_loop_test: SkipByDesign # VM shutdown test
-dart/spawn_shutdown_test: SkipByDesign # VM Shutdown test
+dart/*: SkipByDesign # VM specific tests
 
 [ $runtime != dart_precompiled  || $system == android ]
 dart/bare_instructions_trampolines_test: SkipByDesign # This test is for VM AOT only (android fails due to listing interfaces).
@@ -129,6 +115,12 @@
 cc/GenKernelKernelMaxRSS: Skip  # Issue 34393.
 dart/appjit_bytecode_simple_test: Skip  # Issue 34393.
 
+[ $arch == simarm || $arch == simarm64 || $arch == simdbc || $arch == simdbc64 || $arch == ia32 || $arch == arm ]
+cc/GenKernelKernelLoadKernel: SkipByDesign  # No interpreter support.
+cc/GenKernelKernelReadAllBytecode: SkipByDesign  # No interpreter support.
+cc/GenKernelKernelCombined: SkipByDesign  # No interpreter support.
+cc/GenKernelKernelMaxRSS: SkipByDesign  # No interpreter support.
+
 [ !$strong ]
 dart/callee_side_type_checks_test: SkipByDesign
 
@@ -146,10 +138,6 @@
 [ $builder_tag == asan && $mode == debug && ($runtime == dart_precompiled || $runtime == vm) ]
 cc/Dart2JSCompileAll: SkipSlow # Timeout.
 
-[ ($compiler == dartk || $compiler == dartkb) && $mode == debug && $runtime == vm ]
-cc/PrintJSON: Crash
-cc/Service_TokenStream: Crash
-
 # Enabling of dartk for sim{arm,arm64,dbc64} revelaed these test failures, which
 # are to be triaged.  Isolate tests are skipped on purpose due to the usage of
 # batch mode.
@@ -158,7 +146,6 @@
 
 [ ($compiler == dartk || $compiler == dartkb) && $mode == release && $runtime == vm ]
 cc/CorelibIsolateStartup: Timeout, Pass
-cc/Service_TokenStream: Fail
 
 [ ($compiler == dartk || $compiler == dartkb) && $runtime == vm ]
 cc/Class_ComputeEndTokenPos: Crash
@@ -174,20 +161,6 @@
 cc/Debugger_SetBreakpointInPartOfLibrary: Crash
 cc/IsolateReload_NotTypedefToTypedef: Fail
 cc/IsolateReload_TypedefToNotTypedef: Fail
-cc/SourceReport_CallSites_PolymorphicCall: Fail
-cc/SourceReport_CallSites_SimpleCall: Fail
-cc/SourceReport_Coverage_AllFunctions: Fail
-cc/SourceReport_Coverage_AllFunctions_ForceCompile: Fail
-cc/SourceReport_Coverage_ForceCompile: Fail
-cc/SourceReport_Coverage_NestedFunctions: Fail
-cc/SourceReport_Coverage_NoCalls: Fail
-cc/SourceReport_Coverage_RestrictedRange: Fail
-cc/SourceReport_Coverage_SimpleCall: Fail
-cc/SourceReport_Coverage_UnusedClass_ForceCompile: Fail
-cc/SourceReport_Coverage_UnusedClass_ForceCompileError: Crash
-cc/SourceReport_Coverage_UnusedClass_NoForceCompile: Fail
-cc/SourceReport_MultipleReports: Fail
-cc/SourceReport_PossibleBreakpoints_Simple: Fail
 dart/data_uri_import_test/utf16: MissingRuntimeError
 dart/spawn_shutdown_test: SkipSlow
 
@@ -250,32 +223,32 @@
 # up with the real Dart stack trace and hence we don't get correct
 # symbol names.
 [ $arch == simarm || $arch == simarm64 || $arch == simarmv5te || $arch == simarmv6 || $arch == simdbc || $arch == simdbc64 ]
-cc/LargeMap: Skip
-cc/Profiler_AllocationSampleTest: Skip
-cc/Profiler_ArrayAllocation: Skip
-cc/Profiler_BasicSourcePosition: Skip
-cc/Profiler_BasicSourcePositionOptimized: Skip
-cc/Profiler_BinaryOperatorSourcePosition: Skip
-cc/Profiler_BinaryOperatorSourcePositionOptimized: Skip
-cc/Profiler_ChainedSamples: Skip
-cc/Profiler_ClosureAllocation: Skip
-cc/Profiler_CodeTicks: Skip
-cc/Profiler_ContextAllocation: Skip
-cc/Profiler_FunctionInline: Skip
-cc/Profiler_FunctionTicks: Skip
-cc/Profiler_GetSourceReport: Skip
-cc/Profiler_InliningIntervalBoundry: Skip
-cc/Profiler_IntrinsicAllocation: Skip
-cc/Profiler_SampleBufferIterateTest: Skip
-cc/Profiler_SampleBufferWrapTest: Skip
-cc/Profiler_SourcePosition: Skip
-cc/Profiler_SourcePositionOptimized: Skip
-cc/Profiler_StringAllocation: Skip
-cc/Profiler_StringInterpolation: Skip
-cc/Profiler_ToggleRecordAllocation: Skip
-cc/Profiler_TrivialRecordAllocation: Skip
-cc/Profiler_TypedArrayAllocation: Skip
-cc/Service_Profile: Skip
+cc/LargeMap: SkipByDesign
+cc/Profiler_AllocationSampleTest: SkipByDesign
+cc/Profiler_ArrayAllocation: SkipByDesign
+cc/Profiler_BasicSourcePosition: SkipByDesign
+cc/Profiler_BasicSourcePositionOptimized: SkipByDesign
+cc/Profiler_BinaryOperatorSourcePosition: SkipByDesign
+cc/Profiler_BinaryOperatorSourcePositionOptimized: SkipByDesign
+cc/Profiler_ChainedSamples: SkipByDesign
+cc/Profiler_ClosureAllocation: SkipByDesign
+cc/Profiler_CodeTicks: SkipByDesign
+cc/Profiler_ContextAllocation: SkipByDesign
+cc/Profiler_FunctionInline: SkipByDesign
+cc/Profiler_FunctionTicks: SkipByDesign
+cc/Profiler_GetSourceReport: SkipByDesign
+cc/Profiler_InliningIntervalBoundry: SkipByDesign
+cc/Profiler_IntrinsicAllocation: SkipByDesign
+cc/Profiler_SampleBufferIterateTest: SkipByDesign
+cc/Profiler_SampleBufferWrapTest: SkipByDesign
+cc/Profiler_SourcePosition: SkipByDesign
+cc/Profiler_SourcePositionOptimized: SkipByDesign
+cc/Profiler_StringAllocation: SkipByDesign
+cc/Profiler_StringInterpolation: SkipByDesign
+cc/Profiler_ToggleRecordAllocation: SkipByDesign
+cc/Profiler_TrivialRecordAllocation: SkipByDesign
+cc/Profiler_TypedArrayAllocation: SkipByDesign
+cc/Service_Profile: SkipByDesign
 
 [ $arch == simdbc || $arch == simdbc64 ]
 cc/GuardFieldConstructor2Test: Skip # TODO(vegorov) Field guards are disabled for SIMDBC
@@ -287,7 +260,7 @@
 cc/RegExp_ExternalTwoByteString: Skip # TODO(vegorov) These tests don't seem to work if FLAG_interpret_irregexp is switched on by default because they attempt to call regexp functions directly instead of going through JSSyntaxRegExp_ExecuteMatch.
 cc/RegExp_OneByteString: Skip # TODO(vegorov) These tests don't seem to work if FLAG_interpret_irregexp is switched on by default because they attempt to call regexp functions directly instead of going through JSSyntaxRegExp_ExecuteMatch.
 cc/RegExp_TwoByteString: Skip # TODO(vegorov) These tests don't seem to work if FLAG_interpret_irregexp is switched on by default because they attempt to call regexp functions directly instead of going through JSSyntaxRegExp_ExecuteMatch.
-cc/RegenerateAllocStubs: Skip # This test is meaningless for DBC as allocation stubs are not used.
+cc/RegenerateAllocStubs: SkipByDesign # This test is meaningless for DBC as allocation stubs are not used.
 
 [ $arch == simdbc || $arch == simdbc64 || $compiler == dartkb ]
 dart/generic_field_invocation_test: SkipByDesign # DBC and KBC interpreters do not support --no_lazy_dispatchers
@@ -298,7 +271,6 @@
 # Tests that use functionality not supported in Dart 2.
 [ ($compiler == dartk || $compiler == dartkb) || $compiler == dartkp ]
 cc/DartAPI_IsolateSetCheckedMode: SkipByDesign # Checked mode is not relevant for dart 2?
-cc/CompileFunctionOnHelperThread: SkipByDesign
 cc/CompileFunction: SkipByDesign
 cc/InvokeDynamic_CompileError: SkipByDesign
 cc/InvokeStatic_CompileError: SkipByDesign
@@ -321,9 +293,6 @@
 dart/spawn_shutdown_test: Skip # We can shutdown an isolate before it reloads.
 dart/stack_overflow_shared_test: SkipSlow # Too slow with --shared-slow-path-triggers-gc flag and not relevant outside precompiled.
 
-[ ($runtime == vm || $runtime == dart_precompiled) && !$preview_dart_2 ]
-*:SkipByDesign # Deprecating all Dart1 modes of execution
-
 [ $builder_tag == obfuscated && $compiler == dartkp ]
 dart/optimized_stacktrace_line_and_column_test: SkipByDesign # Looks for filenames in stacktrace output
 dart/optimized_stacktrace_line_test: SkipByDesign # Looks for filenames in stacktrace output
@@ -333,3 +302,9 @@
 
 [ $compiler == dartkp ]
 dart/v8_snapshot_profile_writer_test: Pass, Slow # Can be slow due to re-invoking the precompiler.
+
+[ $compiler == dartkb ]
+cc/*: Skip # Bytecode modes are not properly hooked up in run_vm_tests.
+
+[ $mode == debug ]
+cc/IRTest_TypedDataAOT_FunctionalGetSet: Skip # run_vm_tests contains JIT/AOT but FLAG_precompiled_mode is not always correct. This causes this test to fail in debug mode, hitting an assertion. See http://dartbug.com/36521
diff --git a/runtime/tools/dartfuzz/dartfuzz.dart b/runtime/tools/dartfuzz/dartfuzz.dart
index 9843383..879e669 100644
--- a/runtime/tools/dartfuzz/dartfuzz.dart
+++ b/runtime/tools/dartfuzz/dartfuzz.dart
@@ -8,14 +8,15 @@
 import 'package:args/args.dart';
 
 import 'dartfuzz_values.dart';
+import 'dartfuzz_api_table.dart';
 
 // Version of DartFuzz. Increase this each time changes are made
 // to preserve the property that a given version of DartFuzz yields
 // the same fuzzed program for a deterministic random seed.
-const String version = '1.3';
+const String version = '1.9';
 
 // Restriction on statement and expression depths.
-const int stmtDepth = 5;
+const int stmtDepth = 2;
 const int exprDepth = 2;
 
 // Naming conventions.
@@ -33,6 +34,7 @@
     // Initialize program variables.
     rand = new Random(seed);
     indent = 0;
+    nest = 0;
     currentClass = null;
     currentMethod = null;
     // Setup the types.
@@ -52,6 +54,7 @@
     assert(currentClass == null);
     assert(currentMethod == null);
     assert(indent == 0);
+    assert(nest == 0);
     assert(localVars.length == 0);
   }
 
@@ -63,6 +66,16 @@
     emitLn('// The Dart Project Fuzz Tester ($version).');
     emitLn('// Program generated as:');
     emitLn('//   dart dartfuzz.dart --seed $seed');
+    emitLn('');
+    emitLn("import 'dart:async';");
+    emitLn("import 'dart:cli';");
+    emitLn("import 'dart:collection';");
+    emitLn("import 'dart:convert';");
+    emitLn("import 'dart:core';");
+    emitLn("import 'dart:io';");
+    emitLn("import 'dart:isolate';");
+    emitLn("import 'dart:math';");
+    emitLn("import 'dart:typed_data';");
   }
 
   void emitMethods(String name, List<List<DartType>> methods) {
@@ -88,10 +101,10 @@
   void emitClasses() {
     assert(classFields.length == classMethods.length);
     for (int i = 0; i < classFields.length; i++) {
-      currentClass = i;
       emitLn('class X$i ${i == 0 ? "" : "extends X${i - 1}"} {');
       indent += 2;
       emitVarDecls('$fieldName${i}_', classFields[i]);
+      currentClass = i;
       emitMethods('$methodName${i}_', classMethods[i]);
       emitLn('void run() {');
       indent += 2;
@@ -143,7 +156,7 @@
     for (int i = 0; i < vars.length; i++) {
       DartType tp = vars[i];
       emitLn('${tp.name} $name$i = ', newline: false);
-      emitLiteral(tp);
+      emitLiteral(0, tp);
       emit(';', newline: true);
     }
     emit('', newline: true);
@@ -223,6 +236,15 @@
     return false;
   }
 
+  // Emit a throw statement.
+  bool emitThrow() {
+    DartType tp = getType();
+    emitLn('throw ', newline: false);
+    emitExpr(0, tp);
+    emit(';', newline: true);
+    return false;
+  }
+
   // Emit a one-way if statement.
   bool emitIf1(int depth) {
     emitLn('if (', newline: false);
@@ -258,12 +280,113 @@
     emitSmallPositiveInt();
     emit('; $localName$i++) {', newline: true);
     indent += 2;
+    nest++;
     localVars.add(DartType.INT);
-    bool b = emitStatements(depth + 1);
+    emitStatements(depth + 1);
     localVars.removeLast();
+    nest--;
     indent -= 2;
     emitLn('}');
-    return b;
+    return true;
+  }
+
+  // Emit a simple membership for-in-loop.
+  bool emitForIn(int depth) {
+    int i = localVars.length;
+    emitLn('for (var $localName$i in ', newline: false);
+    emitExpr(0, rand.nextBool() ? DartType.INT_LIST : DartType.INT_SET);
+    emit(') {', newline: true);
+    indent += 2;
+    nest++;
+    localVars.add(DartType.INT);
+    emitStatements(depth + 1);
+    localVars.removeLast();
+    nest--;
+    indent -= 2;
+    emitLn('}');
+    return true;
+  }
+
+  // Emit a while-loop.
+  bool emitWhile(int depth) {
+    int i = localVars.length;
+    emitLn('{ int $localName$i = ', newline: false);
+    emitSmallPositiveInt();
+    emit(';', newline: true);
+    indent += 2;
+    emitLn('while (--$localName$i > 0) {');
+    indent += 2;
+    nest++;
+    localVars.add(DartType.INT);
+    emitStatements(depth + 1);
+    localVars.removeLast();
+    nest--;
+    indent -= 2;
+    emitLn('}');
+    indent -= 2;
+    emitLn('}');
+    return true;
+  }
+
+  // Emit a do-while-loop.
+  bool emitDoWhile(int depth) {
+    int i = localVars.length;
+    emitLn('{ int $localName$i = 0;');
+    indent += 2;
+    emitLn('do {');
+    indent += 2;
+    nest++;
+    localVars.add(DartType.INT);
+    emitStatements(depth + 1);
+    localVars.removeLast();
+    nest--;
+    indent -= 2;
+    emitLn('} while (++$localName$i < ', newline: false);
+    emitSmallPositiveInt();
+    emit(');', newline: true);
+    indent -= 2;
+    emitLn('}');
+    return true;
+  }
+
+  // Emit a break/continue when inside iteration.
+  bool emitBreakOrContinue(int depth) {
+    if (nest > 0) {
+      switch (rand.nextInt(2)) {
+        case 0:
+          emitLn('continue;');
+          return false;
+        default:
+          emitLn('break;');
+          return false;
+      }
+    }
+    return emitAssign(); // resort to assignment
+  }
+
+  // Emit a switch statement.
+  bool emitSwitch(int depth) {
+    emitLn('switch (', newline: false);
+    emitExpr(0, DartType.INT);
+    emit(') {', newline: true);
+    int start = rand.nextInt(1 << 32);
+    int step = 1 + rand.nextInt(10);
+    for (int i = 0; i < 2; i++, start += step) {
+      indent += 2;
+      if (i == 2) {
+        emitLn('default: {');
+      } else {
+        emitLn('case $start: {');
+      }
+      indent += 2;
+      emitStatements(depth + 1);
+      indent -= 2;
+      emitLn('}');
+      emitLn('break;'); // always generate, avoid FE complaints
+      indent -= 2;
+    }
+    emitLn('}');
+    return true;
   }
 
   // Emit a new program scope that introduces a new local variable.
@@ -278,11 +401,31 @@
     localVars.removeLast();
     indent -= 2;
     emitLn('}');
-    return b;
+    return true;
   }
 
-  // Emit a statement. Returns true if code may fall-through.
-  // TODO: add many more constructs
+  // Emit try/catch/finally.
+  bool emitTryCatch(int depth) {
+    emitLn('try {');
+    indent += 2;
+    emitStatements(depth + 1);
+    indent -= 2;
+    emitLn('} catch (e) {');
+    indent += 2;
+    emitStatements(depth + 1);
+    indent -= 2;
+    if (rand.nextInt(2) == 0) {
+      emitLn('} finally {');
+      indent += 2;
+      emitStatements(depth + 1);
+      indent -= 2;
+    }
+    emitLn('}');
+    return true;
+  }
+
+  // Emit a statement. Returns true if code *may* fall-through
+  // (not made too advanced to avoid FE complaints).
   bool emitStatement(int depth) {
     // Throw in a comment every once in a while.
     if (rand.nextInt(10) == 0) {
@@ -293,20 +436,34 @@
       return emitAssign();
     }
     // Possibly nested statement.
-    switch (rand.nextInt(8)) {
+    switch (rand.nextInt(16)) {
       // Favors assignment.
       case 0:
-        return emitIf1(depth);
-      case 1:
-        return emitIf2(depth);
-      case 2:
-        return emitFor(depth);
-      case 3:
-        return emitScope(depth);
-      case 4:
         return emitPrint();
-      case 5:
+      case 1:
         return emitReturn();
+      case 2:
+        return emitThrow();
+      case 3:
+        return emitIf1(depth);
+      case 4:
+        return emitIf2(depth);
+      case 5:
+        return emitFor(depth);
+      case 6:
+        return emitForIn(depth);
+      case 7:
+        return emitWhile(depth);
+      case 8:
+        return emitDoWhile(depth);
+      case 9:
+        return emitBreakOrContinue(depth);
+      case 10:
+        return emitSwitch(depth);
+      case 11:
+        return emitScope(depth);
+      case 12:
+        return emitTryCatch(depth);
       default:
         return emitAssign();
     }
@@ -340,30 +497,26 @@
   }
 
   void emitInt() {
-    switch (rand.nextInt(4)) {
-      // Favors small positive int.
+    switch (rand.nextInt(7)) {
+      // Favors small ints.
       case 0:
-        emit('${oneOf(DartFuzzValues.interestingIntegers)}');
-        break;
       case 1:
+      case 2:
+        emitSmallPositiveInt();
+        break;
+      case 3:
+      case 4:
+      case 5:
         emitSmallNegativeInt();
         break;
       default:
-        emitSmallPositiveInt();
+        emit('${oneOf(DartFuzzValues.interestingIntegers)}');
         break;
     }
   }
 
   void emitDouble() {
-    switch (rand.nextInt(10)) {
-      // Favors regular double.
-      case 0:
-        emit(oneOf(DartFuzzValues.interestingDoubles));
-        break;
-      default:
-        emit('${rand.nextDouble()}');
-        break;
-    }
+    emit('${rand.nextDouble()}');
   }
 
   void emitChar() {
@@ -373,47 +526,104 @@
         emit(oneOf(DartFuzzValues.interestingChars));
         break;
       default:
-        emit(DartFuzzValues.regularChars[
-            rand.nextInt(DartFuzzValues.interestingChars.length)]);
+        emit(DartFuzzValues
+            .regularChars[rand.nextInt(DartFuzzValues.regularChars.length)]);
         break;
     }
   }
 
   void emitString() {
     emit("'");
-    int l = rand.nextInt(8);
-    for (int i = 0; i < l; i++) {
+    for (int i = 0, n = rand.nextInt(8); i < n; i++) {
       emitChar();
     }
     emit("'");
   }
 
-  void emitIntList() {
-    emit('[ ');
-    int l = 1 + rand.nextInt(4);
-    for (int i = 0; i < l; i++) {
-      emitInt();
-      if (i != (l - 1)) {
+  void emitElementExpr(int depth, DartType tp) {
+    if (currentMethod != null) {
+      emitExpr(depth, tp);
+    } else {
+      emitLiteral(depth, tp);
+    }
+  }
+
+  void emitElement(int depth, DartType tp) {
+    if (tp == DartType.INT_STRING_MAP) {
+      emitSmallPositiveInt();
+      emit(' : ');
+      emitElementExpr(depth, DartType.STRING);
+    } else {
+      emitElementExpr(depth, DartType.INT);
+    }
+  }
+
+  void emitCollectionElement(int depth, DartType tp) {
+    int r = depth <= exprDepth ? rand.nextInt(10) : 10;
+    switch (r + 3) {
+      // TODO(ajcbik): enable when on by default
+      // Favors elements over control-flow collections.
+      case 0:
+        emit('...'); // spread
+        emitCollection(depth + 1, tp);
+        break;
+      case 1:
+        emit('if (');
+        emitElementExpr(depth + 1, DartType.BOOL);
+        emit(') ');
+        emitCollectionElement(depth + 1, tp);
+        if (rand.nextBool()) {
+          emit(' else ');
+          emitCollectionElement(depth + 1, tp);
+        }
+        break;
+      case 2:
+        {
+          int i = localVars.length;
+          emit('for (int $localName$i ');
+          // For-loop (induction, list, set).
+          switch (rand.nextInt(3)) {
+            case 0:
+              emit('= 0; $localName$i < ');
+              emitSmallPositiveInt();
+              emit('; $localName$i++) ');
+              break;
+            case 1:
+              emit('in ');
+              emitCollection(depth + 1, DartType.INT_LIST);
+              emit(') ');
+              break;
+            default:
+              emit('in ');
+              emitCollection(depth + 1, DartType.INT_SET);
+              emit(') ');
+              break;
+          }
+          nest++;
+          localVars.add(DartType.INT);
+          emitCollectionElement(depth + 1, tp);
+          localVars.removeLast();
+          nest--;
+          break;
+        }
+      default:
+        emitElement(depth, tp);
+        break;
+    }
+  }
+
+  void emitCollection(int depth, DartType tp) {
+    emit(tp == DartType.INT_LIST ? '[ ' : '{ ');
+    for (int i = 0, n = 1 + rand.nextInt(8); i < n; i++) {
+      emitCollectionElement(depth, tp);
+      if (i != (n - 1)) {
         emit(', ');
       }
     }
-    emit(' ]');
+    emit(tp == DartType.INT_LIST ? ' ]' : ' }');
   }
 
-  void emitIntStringMap() {
-    emit('{ ');
-    int l = 1 + rand.nextInt(4);
-    for (int i = 0; i < l; i++) {
-      emit('$i : ');
-      emitString();
-      if (i != (l - 1)) {
-        emit(', ');
-      }
-    }
-    emit(' }');
-  }
-
-  void emitLiteral(DartType tp) {
+  void emitLiteral(int depth, DartType tp) {
     if (tp == DartType.BOOL) {
       emitBool();
     } else if (tp == DartType.INT) {
@@ -422,10 +632,10 @@
       emitDouble();
     } else if (tp == DartType.STRING) {
       emitString();
-    } else if (tp == DartType.INT_LIST) {
-      emitIntList();
-    } else if (tp == DartType.INT_STRING_MAP) {
-      emitIntStringMap();
+    } else if (tp == DartType.INT_LIST ||
+        tp == DartType.INT_SET ||
+        tp == DartType.INT_STRING_MAP) {
+      emitCollection(depth, tp);
     } else {
       assert(false);
     }
@@ -487,7 +697,7 @@
   void emitTerminal(int depth, DartType tp) {
     switch (rand.nextInt(2)) {
       case 0:
-        emitLiteral(tp);
+        emitLiteral(depth, tp);
         break;
       default:
         emitVar(depth, tp);
@@ -539,7 +749,7 @@
       emit('(');
       emitExpr(depth + 1, tp);
       emitBinaryOp(tp);
-      emitLiteral(tp);
+      emitLiteral(depth + 1, tp);
       emit(')');
       return;
     }
@@ -619,8 +829,9 @@
   void emitMethodCall(int depth, DartType tp) {
     // Only call backward to avoid infinite recursion.
     if (currentClass == null) {
-      // Outside a class: call backward in global methods.
-      if (pickedCall(depth, tp, methodName, globalMethods, currentMethod)) {
+      // Outside a class but inside a method: call backward in global methods.
+      if (currentMethod != null &&
+          pickedCall(depth, tp, methodName, globalMethods, currentMethod)) {
         return;
       }
     } else {
@@ -773,9 +984,11 @@
     } else if (tp == DartType.STRING) {
       return oneOf(DartLib.stringLibs);
     } else if (tp == DartType.INT_LIST) {
-      return oneOf(DartLib.intListLibs);
+      return oneOf(DartLib.listLibs);
+    } else if (tp == DartType.INT_SET) {
+      return oneOf(DartLib.setLibs);
     } else if (tp == DartType.INT_STRING_MAP) {
-      return oneOf(DartLib.intStringMapLibs);
+      return oneOf(DartLib.mapLibs);
     } else {
       assert(false);
     }
@@ -802,6 +1015,9 @@
       case 'L':
         emitExpr(depth, DartType.INT_LIST);
         break;
+      case 'X':
+        emitExpr(depth, DartType.INT_SET);
+        break;
       case 'M':
         emitExpr(depth, DartType.INT_STRING_MAP);
         break;
@@ -816,7 +1032,7 @@
 
   // Get a random value type.
   DartType getType() {
-    switch (rand.nextInt(6)) {
+    switch (rand.nextInt(7)) {
       case 0:
         return DartType.BOOL;
       case 1:
@@ -828,14 +1044,15 @@
       case 4:
         return DartType.INT_LIST;
       case 5:
+        return DartType.INT_SET;
+      case 6:
         return DartType.INT_STRING_MAP;
     }
   }
 
   List<DartType> fillTypes1() {
     List<DartType> list = new List<DartType>();
-    int n = 1 + rand.nextInt(4);
-    for (int i = 0; i < n; i++) {
+    for (int i = 0, n = 1 + rand.nextInt(4); i < n; i++) {
       list.add(getType());
     }
     return list;
@@ -843,8 +1060,7 @@
 
   List<List<DartType>> fillTypes2() {
     List<List<DartType>> list = new List<List<DartType>>();
-    int n = 1 + rand.nextInt(4);
-    for (int i = 0; i < n; i++) {
+    for (int i = 0, n = 1 + rand.nextInt(4); i < n; i++) {
       list.add(fillTypes1());
     }
     return list;
@@ -908,6 +1124,7 @@
   // Program variables.
   Random rand;
   int indent;
+  int nest;
   int currentClass;
   int currentMethod;
 
diff --git a/runtime/tools/dartfuzz/dartfuzz_api_table.dart b/runtime/tools/dartfuzz/dartfuzz_api_table.dart
new file mode 100644
index 0000000..787e324
--- /dev/null
+++ b/runtime/tools/dartfuzz/dartfuzz_api_table.dart
@@ -0,0 +1,812 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// Class that represents Dart library methods.
+///
+/// The invididual lists are organized by return type.
+/// The proto string has the following format:
+///    +-------> receiver type (V denotes none)
+///    |+------> param1 type  (V denotes none, v denotes getter)
+///    ||+-----> param2 type
+///    |||+----> ..
+///    ||||
+///   'TTTT..'
+/// where:
+///   V void
+///   v void (special)
+///   B bool
+///   I int
+///   i int (small)
+///   D double
+///   S String
+///   L List<int>
+///   X Set<int>
+///   M Map<int, String>
+///
+/// NOTE: this code has been generated automatically.
+///
+class DartLib {
+  final String name;
+  final String proto;
+  const DartLib(this.name, this.proto);
+
+  static const boolLibs = [
+    DartLib('bool.fromEnvironment', 'VS'),
+    DartLib('isEven', 'Iv'),
+    DartLib('isOdd', 'Iv'),
+    DartLib('isEmpty', 'Mv'),
+    DartLib('isNotEmpty', 'Mv'),
+    DartLib('isNaN', 'Dv'),
+    DartLib('isNegative', 'Dv'),
+    DartLib('isInfinite', 'Dv'),
+    DartLib('isFinite', 'Dv'),
+    DartLib('add', 'XI'),
+    DartLib('endsWith', 'SS'),
+    DartLib('isEmpty', 'Sv'),
+    DartLib('isNotEmpty', 'Sv'),
+    DartLib('FileSystemEntity.identicalSync', 'VSS'),
+    DartLib('FileSystemEntity.isLinkSync', 'VS'),
+    DartLib('FileSystemEntity.isFileSync', 'VS'),
+    DartLib('FileSystemEntity.isDirectorySync', 'VS'),
+    DartLib('FileSystemEntity.isWatchSupported', 'Vv'),
+    DartLib('SecurityContext.alpnSupported', 'Vv'),
+    DartLib('NetworkInterface.listSupported', 'Vv'),
+  ];
+  static const intLibs = [
+    DartLib('JsonUtf8Encoder.DEFAULT_BUFFER_SIZE', 'Vv'),
+    DartLib('unicodeReplacementCharacterRune', 'Vv'),
+    DartLib('unicodeBomCharacterRune', 'Vv'),
+    DartLib('hashCode', 'Bv'),
+    DartLib('DateTime.monday', 'Vv'),
+    DartLib('DateTime.tuesday', 'Vv'),
+    DartLib('DateTime.wednesday', 'Vv'),
+    DartLib('DateTime.thursday', 'Vv'),
+    DartLib('DateTime.friday', 'Vv'),
+    DartLib('DateTime.saturday', 'Vv'),
+    DartLib('DateTime.sunday', 'Vv'),
+    DartLib('DateTime.daysPerWeek', 'Vv'),
+    DartLib('DateTime.january', 'Vv'),
+    DartLib('DateTime.february', 'Vv'),
+    DartLib('DateTime.march', 'Vv'),
+    DartLib('DateTime.april', 'Vv'),
+    DartLib('DateTime.may', 'Vv'),
+    DartLib('DateTime.june', 'Vv'),
+    DartLib('DateTime.july', 'Vv'),
+    DartLib('DateTime.august', 'Vv'),
+    DartLib('DateTime.september', 'Vv'),
+    DartLib('DateTime.october', 'Vv'),
+    DartLib('DateTime.november', 'Vv'),
+    DartLib('DateTime.december', 'Vv'),
+    DartLib('DateTime.monthsPerYear', 'Vv'),
+    DartLib('round', 'DV'),
+    DartLib('floor', 'DV'),
+    DartLib('ceil', 'DV'),
+    DartLib('truncate', 'DV'),
+    DartLib('Duration.microsecondsPerMillisecond', 'Vv'),
+    DartLib('Duration.millisecondsPerSecond', 'Vv'),
+    DartLib('Duration.secondsPerMinute', 'Vv'),
+    DartLib('Duration.minutesPerHour', 'Vv'),
+    DartLib('Duration.hoursPerDay', 'Vv'),
+    DartLib('Duration.microsecondsPerSecond', 'Vv'),
+    DartLib('Duration.microsecondsPerMinute', 'Vv'),
+    DartLib('Duration.microsecondsPerHour', 'Vv'),
+    DartLib('Duration.microsecondsPerDay', 'Vv'),
+    DartLib('Duration.millisecondsPerMinute', 'Vv'),
+    DartLib('Duration.millisecondsPerHour', 'Vv'),
+    DartLib('Duration.millisecondsPerDay', 'Vv'),
+    DartLib('Duration.secondsPerHour', 'Vv'),
+    DartLib('Duration.secondsPerDay', 'Vv'),
+    DartLib('Duration.minutesPerDay', 'Vv'),
+    DartLib('RangeError.checkValidRange', 'VIIISSS'),
+    DartLib('int.fromEnvironment', 'VS'),
+    DartLib('modPow', 'III'),
+    DartLib('modInverse', 'II'),
+    DartLib('gcd', 'II'),
+    DartLib('toUnsigned', 'II'),
+    DartLib('toSigned', 'II'),
+    DartLib('abs', 'IV'),
+    DartLib('round', 'IV'),
+    DartLib('floor', 'IV'),
+    DartLib('ceil', 'IV'),
+    DartLib('truncate', 'IV'),
+    DartLib('int.parse', 'VS'),
+    DartLib('int.tryParse', 'VS'),
+    DartLib('bitLength', 'Iv'),
+    DartLib('sign', 'Iv'),
+    DartLib('indexOf', 'LII'),
+    DartLib('lastIndexOf', 'LII'),
+    DartLib('removeAt', 'LI'),
+    DartLib('removeLast', 'LV'),
+    DartLib('length', 'Lv'),
+    DartLib('length', 'Mv'),
+    DartLib('compareTo', 'DD'),
+    DartLib('round', 'DV'),
+    DartLib('floor', 'DV'),
+    DartLib('ceil', 'DV'),
+    DartLib('truncate', 'DV'),
+    DartLib('toInt', 'DV'),
+    DartLib('hashCode', 'Dv'),
+    DartLib('codeUnitAt', 'SI'),
+    DartLib('compareTo', 'SS'),
+    DartLib('length', 'Sv'),
+    DartLib('hashCode', 'Sv'),
+    DartLib('OSError.noErrorCode', 'Vv'),
+    DartLib('ZLibOption.minWindowBits', 'Vv'),
+    DartLib('ZLibOption.MIN_WINDOW_BITS', 'Vv'),
+    DartLib('ZLibOption.maxWindowBits', 'Vv'),
+    DartLib('ZLibOption.MAX_WINDOW_BITS', 'Vv'),
+    DartLib('ZLibOption.defaultWindowBits', 'Vv'),
+    DartLib('ZLibOption.DEFAULT_WINDOW_BITS', 'Vv'),
+    DartLib('ZLibOption.minLevel', 'Vv'),
+    DartLib('ZLibOption.MIN_LEVEL', 'Vv'),
+    DartLib('ZLibOption.maxLevel', 'Vv'),
+    DartLib('ZLibOption.MAX_LEVEL', 'Vv'),
+    DartLib('ZLibOption.defaultLevel', 'Vv'),
+    DartLib('ZLibOption.DEFAULT_LEVEL', 'Vv'),
+    DartLib('ZLibOption.minMemLevel', 'Vv'),
+    DartLib('ZLibOption.MIN_MEM_LEVEL', 'Vv'),
+    DartLib('ZLibOption.maxMemLevel', 'Vv'),
+    DartLib('ZLibOption.MAX_MEM_LEVEL', 'Vv'),
+    DartLib('ZLibOption.defaultMemLevel', 'Vv'),
+    DartLib('ZLibOption.DEFAULT_MEM_LEVEL', 'Vv'),
+    DartLib('ZLibOption.strategyFiltered', 'Vv'),
+    DartLib('ZLibOption.STRATEGY_FILTERED', 'Vv'),
+    DartLib('ZLibOption.strategyHuffmanOnly', 'Vv'),
+    DartLib('ZLibOption.STRATEGY_HUFFMAN_ONLY', 'Vv'),
+    DartLib('ZLibOption.strategyRle', 'Vv'),
+    DartLib('ZLibOption.STRATEGY_RLE', 'Vv'),
+    DartLib('ZLibOption.strategyFixed', 'Vv'),
+    DartLib('ZLibOption.STRATEGY_FIXED', 'Vv'),
+    DartLib('ZLibOption.strategyDefault', 'Vv'),
+    DartLib('ZLibOption.STRATEGY_DEFAULT', 'Vv'),
+    DartLib('FileSystemEvent.create', 'Vv'),
+    DartLib('FileSystemEvent.CREATE', 'Vv'),
+    DartLib('FileSystemEvent.modify', 'Vv'),
+    DartLib('FileSystemEvent.MODIFY', 'Vv'),
+    DartLib('FileSystemEvent.delete', 'Vv'),
+    DartLib('FileSystemEvent.DELETE', 'Vv'),
+    DartLib('FileSystemEvent.move', 'Vv'),
+    DartLib('FileSystemEvent.MOVE', 'Vv'),
+    DartLib('FileSystemEvent.all', 'Vv'),
+    DartLib('FileSystemEvent.ALL', 'Vv'),
+    DartLib('exitCode', 'Vv'),
+    DartLib('RawSocketOption.levelSocket', 'Vv'),
+    DartLib('RawSocketOption.levelIPv4', 'Vv'),
+    DartLib('RawSocketOption.IPv4MulticastInterface', 'Vv'),
+    DartLib('RawSocketOption.levelIPv6', 'Vv'),
+    DartLib('RawSocketOption.IPv6MulticastInterface', 'Vv'),
+    DartLib('RawSocketOption.levelTcp', 'Vv'),
+    DartLib('RawSocketOption.levelUdp', 'Vv'),
+    DartLib('Isolate.immediate', 'Vv'),
+    DartLib('Isolate.beforeNextEvent', 'Vv'),
+    DartLib('Int8List.bytesPerElement', 'Vv'),
+    DartLib('Uint8List.bytesPerElement', 'Vv'),
+    DartLib('Uint8ClampedList.bytesPerElement', 'Vv'),
+    DartLib('Int16List.bytesPerElement', 'Vv'),
+    DartLib('Uint16List.bytesPerElement', 'Vv'),
+    DartLib('Int32List.bytesPerElement', 'Vv'),
+    DartLib('Uint32List.bytesPerElement', 'Vv'),
+    DartLib('Int64List.bytesPerElement', 'Vv'),
+    DartLib('Uint64List.bytesPerElement', 'Vv'),
+    DartLib('Float32List.bytesPerElement', 'Vv'),
+    DartLib('Float64List.bytesPerElement', 'Vv'),
+    DartLib('Float32x4List.bytesPerElement', 'Vv'),
+    DartLib('Int32x4List.bytesPerElement', 'Vv'),
+    DartLib('Float64x2List.bytesPerElement', 'Vv'),
+    DartLib('Float32x4.xxxx', 'Vv'),
+    DartLib('Float32x4.xxxy', 'Vv'),
+    DartLib('Float32x4.xxxz', 'Vv'),
+    DartLib('Float32x4.xxxw', 'Vv'),
+    DartLib('Float32x4.xxyx', 'Vv'),
+    DartLib('Float32x4.xxyy', 'Vv'),
+    DartLib('Float32x4.xxyz', 'Vv'),
+    DartLib('Float32x4.xxyw', 'Vv'),
+    DartLib('Float32x4.xxzx', 'Vv'),
+    DartLib('Float32x4.xxzy', 'Vv'),
+    DartLib('Float32x4.xxzz', 'Vv'),
+    DartLib('Float32x4.xxzw', 'Vv'),
+    DartLib('Float32x4.xxwx', 'Vv'),
+    DartLib('Float32x4.xxwy', 'Vv'),
+    DartLib('Float32x4.xxwz', 'Vv'),
+    DartLib('Float32x4.xxww', 'Vv'),
+    DartLib('Float32x4.xyxx', 'Vv'),
+    DartLib('Float32x4.xyxy', 'Vv'),
+    DartLib('Float32x4.xyxz', 'Vv'),
+    DartLib('Float32x4.xyxw', 'Vv'),
+    DartLib('Float32x4.xyyx', 'Vv'),
+    DartLib('Float32x4.xyyy', 'Vv'),
+    DartLib('Float32x4.xyyz', 'Vv'),
+    DartLib('Float32x4.xyyw', 'Vv'),
+    DartLib('Float32x4.xyzx', 'Vv'),
+    DartLib('Float32x4.xyzy', 'Vv'),
+    DartLib('Float32x4.xyzz', 'Vv'),
+    DartLib('Float32x4.xyzw', 'Vv'),
+    DartLib('Float32x4.xywx', 'Vv'),
+    DartLib('Float32x4.xywy', 'Vv'),
+    DartLib('Float32x4.xywz', 'Vv'),
+    DartLib('Float32x4.xyww', 'Vv'),
+    DartLib('Float32x4.xzxx', 'Vv'),
+    DartLib('Float32x4.xzxy', 'Vv'),
+    DartLib('Float32x4.xzxz', 'Vv'),
+    DartLib('Float32x4.xzxw', 'Vv'),
+    DartLib('Float32x4.xzyx', 'Vv'),
+    DartLib('Float32x4.xzyy', 'Vv'),
+    DartLib('Float32x4.xzyz', 'Vv'),
+    DartLib('Float32x4.xzyw', 'Vv'),
+    DartLib('Float32x4.xzzx', 'Vv'),
+    DartLib('Float32x4.xzzy', 'Vv'),
+    DartLib('Float32x4.xzzz', 'Vv'),
+    DartLib('Float32x4.xzzw', 'Vv'),
+    DartLib('Float32x4.xzwx', 'Vv'),
+    DartLib('Float32x4.xzwy', 'Vv'),
+    DartLib('Float32x4.xzwz', 'Vv'),
+    DartLib('Float32x4.xzww', 'Vv'),
+    DartLib('Float32x4.xwxx', 'Vv'),
+    DartLib('Float32x4.xwxy', 'Vv'),
+    DartLib('Float32x4.xwxz', 'Vv'),
+    DartLib('Float32x4.xwxw', 'Vv'),
+    DartLib('Float32x4.xwyx', 'Vv'),
+    DartLib('Float32x4.xwyy', 'Vv'),
+    DartLib('Float32x4.xwyz', 'Vv'),
+    DartLib('Float32x4.xwyw', 'Vv'),
+    DartLib('Float32x4.xwzx', 'Vv'),
+    DartLib('Float32x4.xwzy', 'Vv'),
+    DartLib('Float32x4.xwzz', 'Vv'),
+    DartLib('Float32x4.xwzw', 'Vv'),
+    DartLib('Float32x4.xwwx', 'Vv'),
+    DartLib('Float32x4.xwwy', 'Vv'),
+    DartLib('Float32x4.xwwz', 'Vv'),
+    DartLib('Float32x4.xwww', 'Vv'),
+    DartLib('Float32x4.yxxx', 'Vv'),
+    DartLib('Float32x4.yxxy', 'Vv'),
+    DartLib('Float32x4.yxxz', 'Vv'),
+    DartLib('Float32x4.yxxw', 'Vv'),
+    DartLib('Float32x4.yxyx', 'Vv'),
+    DartLib('Float32x4.yxyy', 'Vv'),
+    DartLib('Float32x4.yxyz', 'Vv'),
+    DartLib('Float32x4.yxyw', 'Vv'),
+    DartLib('Float32x4.yxzx', 'Vv'),
+    DartLib('Float32x4.yxzy', 'Vv'),
+    DartLib('Float32x4.yxzz', 'Vv'),
+    DartLib('Float32x4.yxzw', 'Vv'),
+    DartLib('Float32x4.yxwx', 'Vv'),
+    DartLib('Float32x4.yxwy', 'Vv'),
+    DartLib('Float32x4.yxwz', 'Vv'),
+    DartLib('Float32x4.yxww', 'Vv'),
+    DartLib('Float32x4.yyxx', 'Vv'),
+    DartLib('Float32x4.yyxy', 'Vv'),
+    DartLib('Float32x4.yyxz', 'Vv'),
+    DartLib('Float32x4.yyxw', 'Vv'),
+    DartLib('Float32x4.yyyx', 'Vv'),
+    DartLib('Float32x4.yyyy', 'Vv'),
+    DartLib('Float32x4.yyyz', 'Vv'),
+    DartLib('Float32x4.yyyw', 'Vv'),
+    DartLib('Float32x4.yyzx', 'Vv'),
+    DartLib('Float32x4.yyzy', 'Vv'),
+    DartLib('Float32x4.yyzz', 'Vv'),
+    DartLib('Float32x4.yyzw', 'Vv'),
+    DartLib('Float32x4.yywx', 'Vv'),
+    DartLib('Float32x4.yywy', 'Vv'),
+    DartLib('Float32x4.yywz', 'Vv'),
+    DartLib('Float32x4.yyww', 'Vv'),
+    DartLib('Float32x4.yzxx', 'Vv'),
+    DartLib('Float32x4.yzxy', 'Vv'),
+    DartLib('Float32x4.yzxz', 'Vv'),
+    DartLib('Float32x4.yzxw', 'Vv'),
+    DartLib('Float32x4.yzyx', 'Vv'),
+    DartLib('Float32x4.yzyy', 'Vv'),
+    DartLib('Float32x4.yzyz', 'Vv'),
+    DartLib('Float32x4.yzyw', 'Vv'),
+    DartLib('Float32x4.yzzx', 'Vv'),
+    DartLib('Float32x4.yzzy', 'Vv'),
+    DartLib('Float32x4.yzzz', 'Vv'),
+    DartLib('Float32x4.yzzw', 'Vv'),
+    DartLib('Float32x4.yzwx', 'Vv'),
+    DartLib('Float32x4.yzwy', 'Vv'),
+    DartLib('Float32x4.yzwz', 'Vv'),
+    DartLib('Float32x4.yzww', 'Vv'),
+    DartLib('Float32x4.ywxx', 'Vv'),
+    DartLib('Float32x4.ywxy', 'Vv'),
+    DartLib('Float32x4.ywxz', 'Vv'),
+    DartLib('Float32x4.ywxw', 'Vv'),
+    DartLib('Float32x4.ywyx', 'Vv'),
+    DartLib('Float32x4.ywyy', 'Vv'),
+    DartLib('Float32x4.ywyz', 'Vv'),
+    DartLib('Float32x4.ywyw', 'Vv'),
+    DartLib('Float32x4.ywzx', 'Vv'),
+    DartLib('Float32x4.ywzy', 'Vv'),
+    DartLib('Float32x4.ywzz', 'Vv'),
+    DartLib('Float32x4.ywzw', 'Vv'),
+    DartLib('Float32x4.ywwx', 'Vv'),
+    DartLib('Float32x4.ywwy', 'Vv'),
+    DartLib('Float32x4.ywwz', 'Vv'),
+    DartLib('Float32x4.ywww', 'Vv'),
+    DartLib('Float32x4.zxxx', 'Vv'),
+    DartLib('Float32x4.zxxy', 'Vv'),
+    DartLib('Float32x4.zxxz', 'Vv'),
+    DartLib('Float32x4.zxxw', 'Vv'),
+    DartLib('Float32x4.zxyx', 'Vv'),
+    DartLib('Float32x4.zxyy', 'Vv'),
+    DartLib('Float32x4.zxyz', 'Vv'),
+    DartLib('Float32x4.zxyw', 'Vv'),
+    DartLib('Float32x4.zxzx', 'Vv'),
+    DartLib('Float32x4.zxzy', 'Vv'),
+    DartLib('Float32x4.zxzz', 'Vv'),
+    DartLib('Float32x4.zxzw', 'Vv'),
+    DartLib('Float32x4.zxwx', 'Vv'),
+    DartLib('Float32x4.zxwy', 'Vv'),
+    DartLib('Float32x4.zxwz', 'Vv'),
+    DartLib('Float32x4.zxww', 'Vv'),
+    DartLib('Float32x4.zyxx', 'Vv'),
+    DartLib('Float32x4.zyxy', 'Vv'),
+    DartLib('Float32x4.zyxz', 'Vv'),
+    DartLib('Float32x4.zyxw', 'Vv'),
+    DartLib('Float32x4.zyyx', 'Vv'),
+    DartLib('Float32x4.zyyy', 'Vv'),
+    DartLib('Float32x4.zyyz', 'Vv'),
+    DartLib('Float32x4.zyyw', 'Vv'),
+    DartLib('Float32x4.zyzx', 'Vv'),
+    DartLib('Float32x4.zyzy', 'Vv'),
+    DartLib('Float32x4.zyzz', 'Vv'),
+    DartLib('Float32x4.zyzw', 'Vv'),
+    DartLib('Float32x4.zywx', 'Vv'),
+    DartLib('Float32x4.zywy', 'Vv'),
+    DartLib('Float32x4.zywz', 'Vv'),
+    DartLib('Float32x4.zyww', 'Vv'),
+    DartLib('Float32x4.zzxx', 'Vv'),
+    DartLib('Float32x4.zzxy', 'Vv'),
+    DartLib('Float32x4.zzxz', 'Vv'),
+    DartLib('Float32x4.zzxw', 'Vv'),
+    DartLib('Float32x4.zzyx', 'Vv'),
+    DartLib('Float32x4.zzyy', 'Vv'),
+    DartLib('Float32x4.zzyz', 'Vv'),
+    DartLib('Float32x4.zzyw', 'Vv'),
+    DartLib('Float32x4.zzzx', 'Vv'),
+    DartLib('Float32x4.zzzy', 'Vv'),
+    DartLib('Float32x4.zzzz', 'Vv'),
+    DartLib('Float32x4.zzzw', 'Vv'),
+    DartLib('Float32x4.zzwx', 'Vv'),
+    DartLib('Float32x4.zzwy', 'Vv'),
+    DartLib('Float32x4.zzwz', 'Vv'),
+    DartLib('Float32x4.zzww', 'Vv'),
+    DartLib('Float32x4.zwxx', 'Vv'),
+    DartLib('Float32x4.zwxy', 'Vv'),
+    DartLib('Float32x4.zwxz', 'Vv'),
+    DartLib('Float32x4.zwxw', 'Vv'),
+    DartLib('Float32x4.zwyx', 'Vv'),
+    DartLib('Float32x4.zwyy', 'Vv'),
+    DartLib('Float32x4.zwyz', 'Vv'),
+    DartLib('Float32x4.zwyw', 'Vv'),
+    DartLib('Float32x4.zwzx', 'Vv'),
+    DartLib('Float32x4.zwzy', 'Vv'),
+    DartLib('Float32x4.zwzz', 'Vv'),
+    DartLib('Float32x4.zwzw', 'Vv'),
+    DartLib('Float32x4.zwwx', 'Vv'),
+    DartLib('Float32x4.zwwy', 'Vv'),
+    DartLib('Float32x4.zwwz', 'Vv'),
+    DartLib('Float32x4.zwww', 'Vv'),
+    DartLib('Float32x4.wxxx', 'Vv'),
+    DartLib('Float32x4.wxxy', 'Vv'),
+    DartLib('Float32x4.wxxz', 'Vv'),
+    DartLib('Float32x4.wxxw', 'Vv'),
+    DartLib('Float32x4.wxyx', 'Vv'),
+    DartLib('Float32x4.wxyy', 'Vv'),
+    DartLib('Float32x4.wxyz', 'Vv'),
+    DartLib('Float32x4.wxyw', 'Vv'),
+    DartLib('Float32x4.wxzx', 'Vv'),
+    DartLib('Float32x4.wxzy', 'Vv'),
+    DartLib('Float32x4.wxzz', 'Vv'),
+    DartLib('Float32x4.wxzw', 'Vv'),
+    DartLib('Float32x4.wxwx', 'Vv'),
+    DartLib('Float32x4.wxwy', 'Vv'),
+    DartLib('Float32x4.wxwz', 'Vv'),
+    DartLib('Float32x4.wxww', 'Vv'),
+    DartLib('Float32x4.wyxx', 'Vv'),
+    DartLib('Float32x4.wyxy', 'Vv'),
+    DartLib('Float32x4.wyxz', 'Vv'),
+    DartLib('Float32x4.wyxw', 'Vv'),
+    DartLib('Float32x4.wyyx', 'Vv'),
+    DartLib('Float32x4.wyyy', 'Vv'),
+    DartLib('Float32x4.wyyz', 'Vv'),
+    DartLib('Float32x4.wyyw', 'Vv'),
+    DartLib('Float32x4.wyzx', 'Vv'),
+    DartLib('Float32x4.wyzy', 'Vv'),
+    DartLib('Float32x4.wyzz', 'Vv'),
+    DartLib('Float32x4.wyzw', 'Vv'),
+    DartLib('Float32x4.wywx', 'Vv'),
+    DartLib('Float32x4.wywy', 'Vv'),
+    DartLib('Float32x4.wywz', 'Vv'),
+    DartLib('Float32x4.wyww', 'Vv'),
+    DartLib('Float32x4.wzxx', 'Vv'),
+    DartLib('Float32x4.wzxy', 'Vv'),
+    DartLib('Float32x4.wzxz', 'Vv'),
+    DartLib('Float32x4.wzxw', 'Vv'),
+    DartLib('Float32x4.wzyx', 'Vv'),
+    DartLib('Float32x4.wzyy', 'Vv'),
+    DartLib('Float32x4.wzyz', 'Vv'),
+    DartLib('Float32x4.wzyw', 'Vv'),
+    DartLib('Float32x4.wzzx', 'Vv'),
+    DartLib('Float32x4.wzzy', 'Vv'),
+    DartLib('Float32x4.wzzz', 'Vv'),
+    DartLib('Float32x4.wzzw', 'Vv'),
+    DartLib('Float32x4.wzwx', 'Vv'),
+    DartLib('Float32x4.wzwy', 'Vv'),
+    DartLib('Float32x4.wzwz', 'Vv'),
+    DartLib('Float32x4.wzww', 'Vv'),
+    DartLib('Float32x4.wwxx', 'Vv'),
+    DartLib('Float32x4.wwxy', 'Vv'),
+    DartLib('Float32x4.wwxz', 'Vv'),
+    DartLib('Float32x4.wwxw', 'Vv'),
+    DartLib('Float32x4.wwyx', 'Vv'),
+    DartLib('Float32x4.wwyy', 'Vv'),
+    DartLib('Float32x4.wwyz', 'Vv'),
+    DartLib('Float32x4.wwyw', 'Vv'),
+    DartLib('Float32x4.wwzx', 'Vv'),
+    DartLib('Float32x4.wwzy', 'Vv'),
+    DartLib('Float32x4.wwzz', 'Vv'),
+    DartLib('Float32x4.wwzw', 'Vv'),
+    DartLib('Float32x4.wwwx', 'Vv'),
+    DartLib('Float32x4.wwwy', 'Vv'),
+    DartLib('Float32x4.wwwz', 'Vv'),
+    DartLib('Float32x4.wwww', 'Vv'),
+    DartLib('Int32x4.xxxx', 'Vv'),
+    DartLib('Int32x4.xxxy', 'Vv'),
+    DartLib('Int32x4.xxxz', 'Vv'),
+    DartLib('Int32x4.xxxw', 'Vv'),
+    DartLib('Int32x4.xxyx', 'Vv'),
+    DartLib('Int32x4.xxyy', 'Vv'),
+    DartLib('Int32x4.xxyz', 'Vv'),
+    DartLib('Int32x4.xxyw', 'Vv'),
+    DartLib('Int32x4.xxzx', 'Vv'),
+    DartLib('Int32x4.xxzy', 'Vv'),
+    DartLib('Int32x4.xxzz', 'Vv'),
+    DartLib('Int32x4.xxzw', 'Vv'),
+    DartLib('Int32x4.xxwx', 'Vv'),
+    DartLib('Int32x4.xxwy', 'Vv'),
+    DartLib('Int32x4.xxwz', 'Vv'),
+    DartLib('Int32x4.xxww', 'Vv'),
+    DartLib('Int32x4.xyxx', 'Vv'),
+    DartLib('Int32x4.xyxy', 'Vv'),
+    DartLib('Int32x4.xyxz', 'Vv'),
+    DartLib('Int32x4.xyxw', 'Vv'),
+    DartLib('Int32x4.xyyx', 'Vv'),
+    DartLib('Int32x4.xyyy', 'Vv'),
+    DartLib('Int32x4.xyyz', 'Vv'),
+    DartLib('Int32x4.xyyw', 'Vv'),
+    DartLib('Int32x4.xyzx', 'Vv'),
+    DartLib('Int32x4.xyzy', 'Vv'),
+    DartLib('Int32x4.xyzz', 'Vv'),
+    DartLib('Int32x4.xyzw', 'Vv'),
+    DartLib('Int32x4.xywx', 'Vv'),
+    DartLib('Int32x4.xywy', 'Vv'),
+    DartLib('Int32x4.xywz', 'Vv'),
+    DartLib('Int32x4.xyww', 'Vv'),
+    DartLib('Int32x4.xzxx', 'Vv'),
+    DartLib('Int32x4.xzxy', 'Vv'),
+    DartLib('Int32x4.xzxz', 'Vv'),
+    DartLib('Int32x4.xzxw', 'Vv'),
+    DartLib('Int32x4.xzyx', 'Vv'),
+    DartLib('Int32x4.xzyy', 'Vv'),
+    DartLib('Int32x4.xzyz', 'Vv'),
+    DartLib('Int32x4.xzyw', 'Vv'),
+    DartLib('Int32x4.xzzx', 'Vv'),
+    DartLib('Int32x4.xzzy', 'Vv'),
+    DartLib('Int32x4.xzzz', 'Vv'),
+    DartLib('Int32x4.xzzw', 'Vv'),
+    DartLib('Int32x4.xzwx', 'Vv'),
+    DartLib('Int32x4.xzwy', 'Vv'),
+    DartLib('Int32x4.xzwz', 'Vv'),
+    DartLib('Int32x4.xzww', 'Vv'),
+    DartLib('Int32x4.xwxx', 'Vv'),
+    DartLib('Int32x4.xwxy', 'Vv'),
+    DartLib('Int32x4.xwxz', 'Vv'),
+    DartLib('Int32x4.xwxw', 'Vv'),
+    DartLib('Int32x4.xwyx', 'Vv'),
+    DartLib('Int32x4.xwyy', 'Vv'),
+    DartLib('Int32x4.xwyz', 'Vv'),
+    DartLib('Int32x4.xwyw', 'Vv'),
+    DartLib('Int32x4.xwzx', 'Vv'),
+    DartLib('Int32x4.xwzy', 'Vv'),
+    DartLib('Int32x4.xwzz', 'Vv'),
+    DartLib('Int32x4.xwzw', 'Vv'),
+    DartLib('Int32x4.xwwx', 'Vv'),
+    DartLib('Int32x4.xwwy', 'Vv'),
+    DartLib('Int32x4.xwwz', 'Vv'),
+    DartLib('Int32x4.xwww', 'Vv'),
+    DartLib('Int32x4.yxxx', 'Vv'),
+    DartLib('Int32x4.yxxy', 'Vv'),
+    DartLib('Int32x4.yxxz', 'Vv'),
+    DartLib('Int32x4.yxxw', 'Vv'),
+    DartLib('Int32x4.yxyx', 'Vv'),
+    DartLib('Int32x4.yxyy', 'Vv'),
+    DartLib('Int32x4.yxyz', 'Vv'),
+    DartLib('Int32x4.yxyw', 'Vv'),
+    DartLib('Int32x4.yxzx', 'Vv'),
+    DartLib('Int32x4.yxzy', 'Vv'),
+    DartLib('Int32x4.yxzz', 'Vv'),
+    DartLib('Int32x4.yxzw', 'Vv'),
+    DartLib('Int32x4.yxwx', 'Vv'),
+    DartLib('Int32x4.yxwy', 'Vv'),
+    DartLib('Int32x4.yxwz', 'Vv'),
+    DartLib('Int32x4.yxww', 'Vv'),
+    DartLib('Int32x4.yyxx', 'Vv'),
+    DartLib('Int32x4.yyxy', 'Vv'),
+    DartLib('Int32x4.yyxz', 'Vv'),
+    DartLib('Int32x4.yyxw', 'Vv'),
+    DartLib('Int32x4.yyyx', 'Vv'),
+    DartLib('Int32x4.yyyy', 'Vv'),
+    DartLib('Int32x4.yyyz', 'Vv'),
+    DartLib('Int32x4.yyyw', 'Vv'),
+    DartLib('Int32x4.yyzx', 'Vv'),
+    DartLib('Int32x4.yyzy', 'Vv'),
+    DartLib('Int32x4.yyzz', 'Vv'),
+    DartLib('Int32x4.yyzw', 'Vv'),
+    DartLib('Int32x4.yywx', 'Vv'),
+    DartLib('Int32x4.yywy', 'Vv'),
+    DartLib('Int32x4.yywz', 'Vv'),
+    DartLib('Int32x4.yyww', 'Vv'),
+    DartLib('Int32x4.yzxx', 'Vv'),
+    DartLib('Int32x4.yzxy', 'Vv'),
+    DartLib('Int32x4.yzxz', 'Vv'),
+    DartLib('Int32x4.yzxw', 'Vv'),
+    DartLib('Int32x4.yzyx', 'Vv'),
+    DartLib('Int32x4.yzyy', 'Vv'),
+    DartLib('Int32x4.yzyz', 'Vv'),
+    DartLib('Int32x4.yzyw', 'Vv'),
+    DartLib('Int32x4.yzzx', 'Vv'),
+    DartLib('Int32x4.yzzy', 'Vv'),
+    DartLib('Int32x4.yzzz', 'Vv'),
+    DartLib('Int32x4.yzzw', 'Vv'),
+    DartLib('Int32x4.yzwx', 'Vv'),
+    DartLib('Int32x4.yzwy', 'Vv'),
+    DartLib('Int32x4.yzwz', 'Vv'),
+    DartLib('Int32x4.yzww', 'Vv'),
+    DartLib('Int32x4.ywxx', 'Vv'),
+    DartLib('Int32x4.ywxy', 'Vv'),
+    DartLib('Int32x4.ywxz', 'Vv'),
+    DartLib('Int32x4.ywxw', 'Vv'),
+    DartLib('Int32x4.ywyx', 'Vv'),
+    DartLib('Int32x4.ywyy', 'Vv'),
+    DartLib('Int32x4.ywyz', 'Vv'),
+    DartLib('Int32x4.ywyw', 'Vv'),
+    DartLib('Int32x4.ywzx', 'Vv'),
+    DartLib('Int32x4.ywzy', 'Vv'),
+    DartLib('Int32x4.ywzz', 'Vv'),
+    DartLib('Int32x4.ywzw', 'Vv'),
+    DartLib('Int32x4.ywwx', 'Vv'),
+    DartLib('Int32x4.ywwy', 'Vv'),
+    DartLib('Int32x4.ywwz', 'Vv'),
+    DartLib('Int32x4.ywww', 'Vv'),
+    DartLib('Int32x4.zxxx', 'Vv'),
+    DartLib('Int32x4.zxxy', 'Vv'),
+    DartLib('Int32x4.zxxz', 'Vv'),
+    DartLib('Int32x4.zxxw', 'Vv'),
+    DartLib('Int32x4.zxyx', 'Vv'),
+    DartLib('Int32x4.zxyy', 'Vv'),
+    DartLib('Int32x4.zxyz', 'Vv'),
+    DartLib('Int32x4.zxyw', 'Vv'),
+    DartLib('Int32x4.zxzx', 'Vv'),
+    DartLib('Int32x4.zxzy', 'Vv'),
+    DartLib('Int32x4.zxzz', 'Vv'),
+    DartLib('Int32x4.zxzw', 'Vv'),
+    DartLib('Int32x4.zxwx', 'Vv'),
+    DartLib('Int32x4.zxwy', 'Vv'),
+    DartLib('Int32x4.zxwz', 'Vv'),
+    DartLib('Int32x4.zxww', 'Vv'),
+    DartLib('Int32x4.zyxx', 'Vv'),
+    DartLib('Int32x4.zyxy', 'Vv'),
+    DartLib('Int32x4.zyxz', 'Vv'),
+    DartLib('Int32x4.zyxw', 'Vv'),
+    DartLib('Int32x4.zyyx', 'Vv'),
+    DartLib('Int32x4.zyyy', 'Vv'),
+    DartLib('Int32x4.zyyz', 'Vv'),
+    DartLib('Int32x4.zyyw', 'Vv'),
+    DartLib('Int32x4.zyzx', 'Vv'),
+    DartLib('Int32x4.zyzy', 'Vv'),
+    DartLib('Int32x4.zyzz', 'Vv'),
+    DartLib('Int32x4.zyzw', 'Vv'),
+    DartLib('Int32x4.zywx', 'Vv'),
+    DartLib('Int32x4.zywy', 'Vv'),
+    DartLib('Int32x4.zywz', 'Vv'),
+    DartLib('Int32x4.zyww', 'Vv'),
+    DartLib('Int32x4.zzxx', 'Vv'),
+    DartLib('Int32x4.zzxy', 'Vv'),
+    DartLib('Int32x4.zzxz', 'Vv'),
+    DartLib('Int32x4.zzxw', 'Vv'),
+    DartLib('Int32x4.zzyx', 'Vv'),
+    DartLib('Int32x4.zzyy', 'Vv'),
+    DartLib('Int32x4.zzyz', 'Vv'),
+    DartLib('Int32x4.zzyw', 'Vv'),
+    DartLib('Int32x4.zzzx', 'Vv'),
+    DartLib('Int32x4.zzzy', 'Vv'),
+    DartLib('Int32x4.zzzz', 'Vv'),
+    DartLib('Int32x4.zzzw', 'Vv'),
+    DartLib('Int32x4.zzwx', 'Vv'),
+    DartLib('Int32x4.zzwy', 'Vv'),
+    DartLib('Int32x4.zzwz', 'Vv'),
+    DartLib('Int32x4.zzww', 'Vv'),
+    DartLib('Int32x4.zwxx', 'Vv'),
+    DartLib('Int32x4.zwxy', 'Vv'),
+    DartLib('Int32x4.zwxz', 'Vv'),
+    DartLib('Int32x4.zwxw', 'Vv'),
+    DartLib('Int32x4.zwyx', 'Vv'),
+    DartLib('Int32x4.zwyy', 'Vv'),
+    DartLib('Int32x4.zwyz', 'Vv'),
+    DartLib('Int32x4.zwyw', 'Vv'),
+    DartLib('Int32x4.zwzx', 'Vv'),
+    DartLib('Int32x4.zwzy', 'Vv'),
+    DartLib('Int32x4.zwzz', 'Vv'),
+    DartLib('Int32x4.zwzw', 'Vv'),
+    DartLib('Int32x4.zwwx', 'Vv'),
+    DartLib('Int32x4.zwwy', 'Vv'),
+    DartLib('Int32x4.zwwz', 'Vv'),
+    DartLib('Int32x4.zwww', 'Vv'),
+    DartLib('Int32x4.wxxx', 'Vv'),
+    DartLib('Int32x4.wxxy', 'Vv'),
+    DartLib('Int32x4.wxxz', 'Vv'),
+    DartLib('Int32x4.wxxw', 'Vv'),
+    DartLib('Int32x4.wxyx', 'Vv'),
+    DartLib('Int32x4.wxyy', 'Vv'),
+    DartLib('Int32x4.wxyz', 'Vv'),
+    DartLib('Int32x4.wxyw', 'Vv'),
+    DartLib('Int32x4.wxzx', 'Vv'),
+    DartLib('Int32x4.wxzy', 'Vv'),
+    DartLib('Int32x4.wxzz', 'Vv'),
+    DartLib('Int32x4.wxzw', 'Vv'),
+    DartLib('Int32x4.wxwx', 'Vv'),
+    DartLib('Int32x4.wxwy', 'Vv'),
+    DartLib('Int32x4.wxwz', 'Vv'),
+    DartLib('Int32x4.wxww', 'Vv'),
+    DartLib('Int32x4.wyxx', 'Vv'),
+    DartLib('Int32x4.wyxy', 'Vv'),
+    DartLib('Int32x4.wyxz', 'Vv'),
+    DartLib('Int32x4.wyxw', 'Vv'),
+    DartLib('Int32x4.wyyx', 'Vv'),
+    DartLib('Int32x4.wyyy', 'Vv'),
+    DartLib('Int32x4.wyyz', 'Vv'),
+    DartLib('Int32x4.wyyw', 'Vv'),
+    DartLib('Int32x4.wyzx', 'Vv'),
+    DartLib('Int32x4.wyzy', 'Vv'),
+    DartLib('Int32x4.wyzz', 'Vv'),
+    DartLib('Int32x4.wyzw', 'Vv'),
+    DartLib('Int32x4.wywx', 'Vv'),
+    DartLib('Int32x4.wywy', 'Vv'),
+    DartLib('Int32x4.wywz', 'Vv'),
+    DartLib('Int32x4.wyww', 'Vv'),
+    DartLib('Int32x4.wzxx', 'Vv'),
+    DartLib('Int32x4.wzxy', 'Vv'),
+    DartLib('Int32x4.wzxz', 'Vv'),
+    DartLib('Int32x4.wzxw', 'Vv'),
+    DartLib('Int32x4.wzyx', 'Vv'),
+    DartLib('Int32x4.wzyy', 'Vv'),
+    DartLib('Int32x4.wzyz', 'Vv'),
+    DartLib('Int32x4.wzyw', 'Vv'),
+    DartLib('Int32x4.wzzx', 'Vv'),
+    DartLib('Int32x4.wzzy', 'Vv'),
+    DartLib('Int32x4.wzzz', 'Vv'),
+    DartLib('Int32x4.wzzw', 'Vv'),
+    DartLib('Int32x4.wzwx', 'Vv'),
+    DartLib('Int32x4.wzwy', 'Vv'),
+    DartLib('Int32x4.wzwz', 'Vv'),
+    DartLib('Int32x4.wzww', 'Vv'),
+    DartLib('Int32x4.wwxx', 'Vv'),
+    DartLib('Int32x4.wwxy', 'Vv'),
+    DartLib('Int32x4.wwxz', 'Vv'),
+    DartLib('Int32x4.wwxw', 'Vv'),
+    DartLib('Int32x4.wwyx', 'Vv'),
+    DartLib('Int32x4.wwyy', 'Vv'),
+    DartLib('Int32x4.wwyz', 'Vv'),
+    DartLib('Int32x4.wwyw', 'Vv'),
+    DartLib('Int32x4.wwzx', 'Vv'),
+    DartLib('Int32x4.wwzy', 'Vv'),
+    DartLib('Int32x4.wwzz', 'Vv'),
+    DartLib('Int32x4.wwzw', 'Vv'),
+    DartLib('Int32x4.wwwx', 'Vv'),
+    DartLib('Int32x4.wwwy', 'Vv'),
+    DartLib('Int32x4.wwwz', 'Vv'),
+    DartLib('Int32x4.wwww', 'Vv'),
+  ];
+  static const doubleLibs = [
+    DartLib('remainder', 'DD'),
+    DartLib('abs', 'DV'),
+    DartLib('roundToDouble', 'DV'),
+    DartLib('floorToDouble', 'DV'),
+    DartLib('ceilToDouble', 'DV'),
+    DartLib('truncateToDouble', 'DV'),
+    DartLib('double.tryParse', 'VS'),
+    DartLib('sign', 'Dv'),
+    DartLib('double.nan', 'Vv'),
+    DartLib('double.infinity', 'Vv'),
+    DartLib('double.negativeInfinity', 'Vv'),
+    DartLib('double.minPositive', 'Vv'),
+    DartLib('double.maxFinite', 'Vv'),
+    DartLib('roundToDouble', 'IV'),
+    DartLib('floorToDouble', 'IV'),
+    DartLib('ceilToDouble', 'IV'),
+    DartLib('truncateToDouble', 'IV'),
+    DartLib('remainder', 'DD'),
+    DartLib('abs', 'DV'),
+    DartLib('roundToDouble', 'DV'),
+    DartLib('floorToDouble', 'DV'),
+    DartLib('ceilToDouble', 'DV'),
+    DartLib('truncateToDouble', 'DV'),
+    DartLib('clamp', 'DDD'),
+    DartLib('toDouble', 'DV'),
+    DartLib('num.tryParse', 'VS'),
+    DartLib('sign', 'Dv'),
+    DartLib('e', 'Vv'),
+    DartLib('ln10', 'Vv'),
+    DartLib('ln2', 'Vv'),
+    DartLib('log2e', 'Vv'),
+    DartLib('log10e', 'Vv'),
+    DartLib('pi', 'Vv'),
+    DartLib('sqrt1_2', 'Vv'),
+    DartLib('sqrt2', 'Vv'),
+    DartLib('atan2', 'VDD'),
+    DartLib('pow', 'VDD'),
+    DartLib('sin', 'VD'),
+    DartLib('cos', 'VD'),
+    DartLib('tan', 'VD'),
+    DartLib('acos', 'VD'),
+    DartLib('asin', 'VD'),
+    DartLib('atan', 'VD'),
+    DartLib('sqrt', 'VD'),
+    DartLib('exp', 'VD'),
+    DartLib('log', 'VD'),
+  ];
+  static const stringLibs = [
+    DartLib('ListBase.listToString', 'VL'),
+    DartLib('MapBase.mapToString', 'VM'),
+    DartLib('SetBase.setToString', 'VX'),
+    DartLib('base64Encode', 'VL'),
+    DartLib('base64UrlEncode', 'VL'),
+    DartLib('toString', 'BV'),
+    DartLib('toString', 'DV'),
+    DartLib('toString', 'IV'),
+    DartLib('toRadixString', 'II'),
+    DartLib('toStringAsFixed', 'DI'),
+    DartLib('toStringAsExponential', 'DI'),
+    DartLib('toStringAsPrecision', 'DI'),
+    DartLib('toString', 'DV'),
+    DartLib('RegExp.escape', 'VS'),
+    DartLib('String.fromCharCode', 'VI'),
+    DartLib('String.fromEnvironment', 'VS'),
+    DartLib('substring', 'SII'),
+    DartLib('trim', 'SV'),
+    DartLib('trimLeft', 'SV'),
+    DartLib('trimRight', 'SV'),
+    DartLib('padLeft', 'SiS'),
+    DartLib('padRight', 'SiS'),
+    DartLib('replaceRange', 'SIIS'),
+    DartLib('toLowerCase', 'SV'),
+    DartLib('toUpperCase', 'SV'),
+    DartLib('Uri.encodeComponent', 'VS'),
+    DartLib('Uri.encodeQueryComponent', 'VS'),
+    DartLib('Uri.decodeComponent', 'VS'),
+    DartLib('Uri.decodeQueryComponent', 'VS'),
+    DartLib('Uri.encodeFull', 'VS'),
+    DartLib('Uri.decodeFull', 'VS'),
+    DartLib('FileSystemEntity.parentOf', 'VS'),
+  ];
+  static const listLibs = [
+    DartLib('List.filled', 'VII'),
+    DartLib('sublist', 'LII'),
+    DartLib('codeUnits', 'Sv'),
+    DartLib('Uri.parseIPv4Address', 'VS'),
+    DartLib('Uri.parseIPv6Address', 'VSII'),
+  ];
+  static const setLibs = [
+    DartLib('Set.identity', 'VV'),
+    DartLib('intersection', 'XX'),
+    DartLib('union', 'XX'),
+    DartLib('difference', 'XX'),
+    DartLib('toSet', 'XV'),
+  ];
+  static const mapLibs = [
+    DartLib('Map.from', 'VM'),
+    DartLib('Map.of', 'VM'),
+    DartLib('Map.unmodifiable', 'VM'),
+    DartLib('Map.identity', 'VV'),
+  ];
+}
diff --git a/runtime/tools/dartfuzz/dartfuzz_test.dart b/runtime/tools/dartfuzz/dartfuzz_test.dart
index 148f19e..5bdaadc 100644
--- a/runtime/tools/dartfuzz/dartfuzz_test.dart
+++ b/runtime/tools/dartfuzz/dartfuzz_test.dart
@@ -27,7 +27,6 @@
 
 /// Command runner.
 TestResult runCommand(List<String> cmd, Map<String, String> env) {
-  // TODO: use Dart API for some of the modes?
   ProcessResult res = Process.runSync(
       'timeout', ['-s', '$sigkill', '$timeout'] + cmd,
       environment: env);
@@ -70,7 +69,7 @@
     }
     // Every once in a while, stress test JIT.
     if (mode.startsWith('jit') && rand.nextInt(4) == 0) {
-      final r = rand.nextInt(6);
+      final r = rand.nextInt(7);
       if (r == 0) {
         prefix += '-NOFIELDGUARDS';
         extraFlags += ['--use_field_guards=false'];
@@ -90,7 +89,6 @@
         prefix += '-STACKTRACEEVERY';
         extraFlags += ['--stacktrace_every=100'];
       } else if (r == 6) {
-        // Crashes (https://github.com/dart-lang/sdk/issues/35196):
         prefix += '-OPTCOUNTER';
         extraFlags += ['--optimization_counter_threshold=1'];
       }
diff --git a/runtime/tools/dartfuzz/dartfuzz_values.dart b/runtime/tools/dartfuzz/dartfuzz_values.dart
index c97249d..704e511 100644
--- a/runtime/tools/dartfuzz/dartfuzz_values.dart
+++ b/runtime/tools/dartfuzz/dartfuzz_values.dart
@@ -4,7 +4,7 @@
 
 /// Class that represents some common Dart types.
 ///
-/// TODO(ajcbik): generalize
+/// TODO(ajcbik): generalize Dart types
 ///
 class DartType {
   final String name;
@@ -17,10 +17,19 @@
   static const DOUBLE = const DartType._withName('double');
   static const STRING = const DartType._withName('String');
   static const INT_LIST = const DartType._withName('List<int>');
+  static const INT_SET = const DartType._withName('Set<int>');
   static const INT_STRING_MAP = const DartType._withName('Map<int, String>');
 
   // All value types.
-  static const allTypes = [BOOL, INT, DOUBLE, STRING, INT_LIST, INT_STRING_MAP];
+  static const allTypes = [
+    BOOL,
+    INT,
+    DOUBLE,
+    STRING,
+    INT_LIST,
+    INT_SET,
+    INT_STRING_MAP
+  ];
 }
 
 /// Class with interesting values for fuzzing.
@@ -35,15 +44,6 @@
   static const regularChars =
       'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#&()+- ';
 
-  // Interesting doubles.
-  static const interestingDoubles = [
-    'double.infinity',
-    'double.maxFinite',
-    'double.minPositive',
-    'double.nan',
-    'double.negativeInfinity',
-  ];
-
   // Interesting integer values.
   static const List<int> interestingIntegers = [
     0x0000000000000000,
@@ -84,113 +84,3 @@
     0xffffffffffffffff
   ];
 }
-
-/// Class that represents Dart library methods.
-//
-/// The invididual lists are organized by return type.
-/// The proto string has the following format:
-///    +-------> receiver type (V denotes none)
-///    |+------> param1 type  (V denotes none, v denotes getter)
-///    ||+-----> param2 type
-///    |||+----> ....
-///    ||||
-///   "TTTT...."
-/// where:
-///   V void
-///   v void (special)
-///   B bool
-///   I int
-///   i int (small)
-///   D double
-///   S String
-///   L List<int>
-///   M Map<int, String>
-///
-/// TODO(ajcbik): generate these lists automatically
-///
-class DartLib {
-  final String name;
-  final String proto;
-  const DartLib(this.name, this.proto);
-
-  static const boolLibs = [
-    DartLib('isEven', "Iv"),
-    DartLib('isOdd', "Iv"),
-    DartLib('isEmpty', "Sv"),
-    DartLib('isEmpty', "Mv"),
-    DartLib('isNotEmpty', "Sv"),
-    DartLib('isNotEmpty', "Mv"),
-    DartLib('endsWith', "SS"),
-    DartLib('remove', "LI"),
-    DartLib('containsValue', "MS"),
-    DartLib('containsKey', "MI"),
-  ];
-
-  static const intLibs = [
-    DartLib('bitLength', "Iv"),
-    DartLib('sign', "Iv"),
-    DartLib('abs', "IV"),
-    DartLib('round', "IV"),
-    DartLib('round', "DV"),
-    DartLib('floor', "IV"),
-    DartLib('floor', "DV"),
-    DartLib('ceil', "IV"),
-    DartLib('ceil', "DV"),
-    DartLib('truncate', "IV"),
-    DartLib('truncate', "DV"),
-    DartLib('toInt', "DV"),
-    DartLib('toUnsigned', "II"),
-    DartLib('toSigned', "II"),
-    DartLib('modInverse', "II"),
-    DartLib('modPow', "III"),
-    DartLib('length', "Sv"),
-    DartLib('length', "Lv"),
-    DartLib('length', "Mv"),
-    DartLib('codeUnitAt', "SI"),
-    DartLib('compareTo', "SS"),
-    DartLib('removeLast', "LV"),
-    DartLib('removeAt', "LI"),
-    DartLib('indexOf', "LI"),
-    DartLib('lastIndexOf', "LI"),
-  ];
-
-  static const doubleLibs = [
-    DartLib('sign', "Dv"),
-    DartLib('abs', "DV"),
-    DartLib('toDouble', "IV"),
-    DartLib('roundToDouble', "IV"),
-    DartLib('roundToDouble', "DV"),
-    DartLib('floorToDouble', "IV"),
-    DartLib('floorToDouble', "DV"),
-    DartLib('ceilToDouble', "IV"),
-    DartLib('ceilToDouble', "DV"),
-    DartLib('truncateToDouble', "IV"),
-    DartLib('truncateToDouble', "DV"),
-    DartLib('remainder', "DD"),
-  ];
-
-  static const stringLibs = [
-    DartLib('toString', "BV"),
-    DartLib('toString', "IV"),
-    DartLib('toString', "DV"),
-    DartLib('toRadixString', "II"),
-    DartLib('trim', "SV"),
-    DartLib('trimLeft', "SV"),
-    DartLib('trimRight', "SV"),
-    DartLib('toLowerCase', "SV"),
-    DartLib('toUpperCase', "SV"),
-    DartLib('substring', "SI"),
-    DartLib('replaceRange', "SIIS"),
-    DartLib('remove', "MI"),
-    DartLib('padLeft', "Si"), // restrict!
-    DartLib('padRight', "Si"), // restrict!
-  ];
-
-  static const intListLibs = [
-    DartLib('sublist', "LI"),
-  ];
-
-  static const intStringMapLibs = [
-    DartLib('Map.from', "VM"),
-  ];
-}
diff --git a/runtime/tools/dartfuzz/gen_api_table.dart b/runtime/tools/dartfuzz/gen_api_table.dart
new file mode 100755
index 0000000..05a5000
--- /dev/null
+++ b/runtime/tools/dartfuzz/gen_api_table.dart
@@ -0,0 +1,315 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Generates the API tables used by DartFuzz. Automatically generating these
+// tables is less error-prone than generating such tables by hand. Furthermore,
+// it simplifies regenerating the table when the libraries change.
+//
+// Usage:
+//   dart gen_api_table.dart > dartfuzz_api_table.dart
+//
+// Then send out modified dartfuzz_api_table.dart for review together
+// with a modified dartfuzz.dart that increases the version.
+
+import 'dart:io';
+
+import 'package:analyzer/dart/analysis/analysis_context_collection.dart';
+import 'package:analyzer/dart/analysis/session.dart';
+import 'package:analyzer/dart/analysis/results.dart';
+import 'package:analyzer/dart/element/element.dart';
+import 'package:analyzer/dart/element/type.dart';
+import 'package:analyzer/file_system/physical_file_system.dart';
+
+import 'package:analyzer/src/dart/analysis/analysis_context_collection.dart';
+
+// Class to represent a library method by name and prototype representation.
+class DartLib {
+  final String name;
+  final String proto;
+  const DartLib(this.name, this.proto);
+}
+
+// Lists of recognized methods, organized by return type.
+var boolTable = List<DartLib>();
+var intTable = List<DartLib>();
+var doubleTable = List<DartLib>();
+var stringTable = List<DartLib>();
+var listTable = List<DartLib>();
+var setTable = List<DartLib>();
+var mapTable = List<DartLib>();
+
+main() async {
+  // Set paths. Note that for this particular use case, packageRoot can be
+  // any directory. Here, we set it to the top of the SDK development, and
+  // derive the required sdkPath from there.
+  String packageRoot = Platform.environment['DART_TOP'];
+  if (packageRoot == null) {
+    throw new StateError('No environment variable DART_TOP');
+  }
+  String sdkPath = '$packageRoot/tools/sdks/dart-sdk';
+
+  // This does most of the hard work of getting the analyzer configured
+  // correctly. Typically the included paths are the files and directories
+  // that need to be analyzed, but the SDK is always available, so it isn't
+  // really important for this particular use case. We use the implementation
+  // class in order to pass in the sdkPath directly.
+  PhysicalResourceProvider provider = PhysicalResourceProvider.INSTANCE;
+  AnalysisContextCollection collection = new AnalysisContextCollectionImpl(
+      includedPaths: <String>[packageRoot],
+      resourceProvider: provider,
+      sdkPath: sdkPath);
+  AnalysisSession session = collection.contexts[0].currentSession;
+
+  // Visit libraries for table generation.
+  await visitLibraryAtUri(session, 'dart:async');
+  await visitLibraryAtUri(session, 'dart:cli');
+  await visitLibraryAtUri(session, 'dart:collection');
+  await visitLibraryAtUri(session, 'dart:convert');
+  await visitLibraryAtUri(session, 'dart:core');
+  await visitLibraryAtUri(session, 'dart:io');
+  await visitLibraryAtUri(session, 'dart:isolate');
+  await visitLibraryAtUri(session, 'dart:math');
+  await visitLibraryAtUri(session, 'dart:typed_data');
+
+  // Generate the tables in a stand-alone Dart class.
+  dumpHeader();
+  dumpTable('boolLibs', boolTable);
+  dumpTable('intLibs', intTable);
+  dumpTable('doubleLibs', doubleTable);
+  dumpTable('stringLibs', stringTable);
+  dumpTable('listLibs', listTable);
+  dumpTable('setLibs', setTable);
+  dumpTable('mapLibs', mapTable);
+  dumpFooter();
+}
+
+visitLibraryAtUri(AnalysisSession session, String uri) async {
+  String libPath = session.uriConverter.uriToPath(Uri.parse(uri));
+  ResolvedLibraryResult result = await session.getResolvedLibrary(libPath);
+  if (result.state != ResultState.VALID) {
+    throw new StateError('Unable to resolve "$uri"');
+  }
+  visitLibrary(result.element);
+}
+
+visitLibrary(LibraryElement library) async {
+  // This uses the element model to traverse the code. The element model
+  // represents the semantic structure of the code. A library consists of
+  // one or more compilation units.
+  for (CompilationUnitElement unit in library.units) {
+    visitCompilationUnit(unit);
+  }
+}
+
+visitCompilationUnit(CompilationUnitElement unit) {
+  // Each compilation unit contains elements for all of the top-level
+  // declarations in a single file, such as variables, functions, and
+  // classes. Note that `types` only returns classes. You can use
+  // `mixins` to visit mixins, `enums` to visit enum, `functionTypeAliases`
+  // to visit typedefs, etc.
+  for (TopLevelVariableElement variable in unit.topLevelVariables) {
+    if (variable.isPublic) {
+      addToTable(typeString(variable.type), variable.name, 'Vv');
+    }
+  }
+  for (FunctionElement function in unit.functions) {
+    if (function.isPublic && !function.isOperator) {
+      addToTable(typeString(function.returnType), function.name,
+          protoString(null, function.parameters));
+    }
+  }
+  for (ClassElement classElement in unit.types) {
+    if (classElement.isPublic) {
+      visitClass(classElement);
+    }
+  }
+}
+
+void visitClass(ClassElement classElement) {
+  // Classes that cause too many false divergences.
+  if (classElement.name == 'ProcessInfo' || classElement.name == 'Platform') {
+    return;
+  }
+  // Every class element contains elements for the members, viz. `methods` visits
+  // methods, `fields` visits fields, `accessors` visits getters and setters, etc.
+  // There are also accessors to get the superclass, mixins, interfaces, type
+  // parameters, etc.
+  for (ConstructorElement constructor in classElement.constructors) {
+    if (constructor.isPublic &&
+        constructor.isFactory &&
+        !constructor.name.isEmpty) {
+      addToTable(
+          typeString(classElement.type),
+          '${classElement.name}.${constructor.name}',
+          protoString(null, constructor.parameters));
+    }
+  }
+  for (MethodElement method in classElement.methods) {
+    if (method.isPublic && !method.isOperator) {
+      if (method.isStatic) {
+        addToTable(
+            typeString(method.returnType),
+            '${classElement.name}.${method.name}',
+            protoString(null, method.parameters));
+      } else {
+        addToTable(typeString(method.returnType), method.name,
+            protoString(classElement.type, method.parameters));
+      }
+    }
+  }
+  for (PropertyAccessorElement accessor in classElement.accessors) {
+    if (accessor.isPublic && accessor.isGetter) {
+      var variable = accessor.variable;
+      if (accessor.isStatic) {
+        addToTable(typeString(variable.type),
+            '${classElement.name}.${variable.name}', 'Vv');
+      } else {
+        addToTable(typeString(variable.type), variable.name,
+            '${typeString(classElement.type)}v');
+      }
+    }
+  }
+}
+
+// Types are represented by an instance of `DartType`. For classes, the type
+// will be an instance of `InterfaceType`, which will provide access to the
+// defining (class) element, as well as any type arguments.
+String typeString(DartType type) {
+  if (type.isDartCoreBool) {
+    return 'B';
+  } else if (type.isDartCoreInt) {
+    return 'I';
+  } else if (type.isDartCoreDouble) {
+    return 'D';
+  } else if (type.isDartCoreString) {
+    return 'S';
+  }
+  // Supertypes or type parameters are specialized in a consistent manner.
+  // TODO(ajcbik): inspect type structure semantically, not by display name
+  //               and unify DartFuzz's DartType with analyzer DartType.
+  switch (type.displayName) {
+    case 'E':
+      return 'I';
+    case 'num':
+      return 'D';
+    case 'List<E>':
+    case 'List<Object>':
+    case 'List<dynamic>':
+    case 'List<int>':
+    case 'List':
+      return 'L';
+    case 'Set<E>':
+    case 'Set<Object>':
+    case 'Set<dynamic>':
+    case 'Set<int>':
+    case 'Set':
+      return 'X';
+    case 'Map<K, V>':
+    case 'Map<dynamic, dynamic>':
+    case 'Map<int, String>':
+    case 'Map':
+      return 'M';
+  }
+  return '?';
+}
+
+String protoString(DartType receiver, List<ParameterElement> parameters) {
+  var proto = receiver == null ? 'V' : typeString(receiver);
+  // Construct prototype for non-named parameters.
+  for (ParameterElement parameter in parameters) {
+    if (!parameter.isNamed) {
+      proto += typeString(parameter.type);
+    }
+  }
+  // Use 'void' for an empty parameter list.
+  return proto.length == 1 ? proto + 'V' : proto;
+}
+
+List<DartLib> getTable(String ret) {
+  switch (ret) {
+    case 'B':
+      return boolTable;
+    case 'I':
+      return intTable;
+    case 'D':
+      return doubleTable;
+    case 'S':
+      return stringTable;
+    case 'L':
+      return listTable;
+    case 'X':
+      return setTable;
+    case 'M':
+      return mapTable;
+  }
+}
+
+void addToTable(String ret, String name, String proto) {
+  // If any of the type representations contains a question
+  // mark, this means that DartFuzz' type system cannot
+  // deal with such an expression yet. So drop the entry.
+  if (ret.contains('?') || proto.contains('?')) {
+    return;
+  }
+  // Restrict parameters for a few hardcoded cases,
+  // for example, to avoid excessive runtime or memory
+  // allocation in the generated fuzzing program or to
+  // avoid false divergences.
+  if (name == 'padLeft' || name == 'padRight') {
+    proto = proto.replaceAll('I', 'i');
+  } else if (name == 'pid' ||
+      name == 'Platform.executable' ||
+      name == 'Platform.resolvedExecutable') {
+    return;
+  }
+  // Add to table.
+  getTable(ret).add(DartLib(name, proto));
+}
+
+void dumpHeader() {
+  print("""
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// Class that represents Dart library methods.
+///
+/// The invididual lists are organized by return type.
+/// The proto string has the following format:
+///    +-------> receiver type (V denotes none)
+///    |+------> param1 type  (V denotes none, v denotes getter)
+///    ||+-----> param2 type
+///    |||+----> ..
+///    ||||
+///   'TTTT..'
+/// where:
+///   V void
+///   v void (special)
+///   B bool
+///   I int
+///   i int (small)
+///   D double
+///   S String
+///   L List<int>
+///   X Set<int>
+///   M Map<int, String>
+///
+/// NOTE: this code has been generated automatically.
+///
+class DartLib {
+  final String name;
+  final String proto;
+  const DartLib(this.name, this.proto);
+""");
+}
+
+void dumpTable(String identifier, List<DartLib> table) {
+  print('  static const $identifier = [');
+  table.forEach((t) => print('    DartLib(\'${t.name}\', \'${t.proto}\'),'));
+  print('  ];');
+}
+
+void dumpFooter() {
+  print('}');
+}
diff --git a/runtime/tools/graphexplorer/graphexplorer.css b/runtime/tools/graphexplorer/graphexplorer.css
new file mode 100644
index 0000000..c3d78f3
--- /dev/null
+++ b/runtime/tools/graphexplorer/graphexplorer.css
@@ -0,0 +1,67 @@
+/*
+Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+for details. All rights reserved. Use of this source code is governed by a
+BSD-style license that can be found in the LICENSE file.
+*/
+
+.actionCell {
+    cursor: pointer;
+}
+.actionCell:hover {
+    text-decoration: underline;
+}
+
+.headerRow {
+    font-weight: bold;
+    background-color: #BBBBBB;
+}
+
+.nameCell {
+    flex-basis: 0px;
+    flex-grow: 3;
+    overflow: hidden;
+    white-space: nowrap;
+    padding: 5;
+}
+
+.edgeCell {
+    flex-basis: 0px;
+    flex-grow: 2;
+    overflow: hidden;
+    white-space: nowrap;
+    padding: 5;
+}
+
+.classCell {
+    flex-basis: 0px;
+    flex-grow: 1;
+    overflow: hidden;
+    white-space: nowrap;
+    padding: 5;
+}
+
+.sizeCell {
+    flex-basis: 7em;
+    flex-grow: 0;
+    text-align: right;
+    padding: 5;
+}
+
+.sizePercentCell {
+    flex-basis: 2.5em;
+    flex-grow: 0;
+    text-align: right;
+    padding: 5;
+    color: gray;
+}
+
+.treemapTile {
+    position: absolute;
+    box-sizing: border-box;
+    border: solid 1px;
+    font-size: 10;
+    text-align: center;
+    overflow: hidden;
+    white-space: nowrap;
+    cursor: default;
+}
diff --git a/runtime/tools/graphexplorer/graphexplorer.html b/runtime/tools/graphexplorer/graphexplorer.html
new file mode 100644
index 0000000..4ca288a
--- /dev/null
+++ b/runtime/tools/graphexplorer/graphexplorer.html
@@ -0,0 +1,14 @@
+<!--
+Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+for details. All rights reserved. Use of this source code is governed by a
+BSD-style license that can be found in the LICENSE file.
+-->
+<html>
+  <head>
+    <title>Graph Explorer</title>
+    <link rel="stylesheet" type="text/css" href="graphexplorer.css">
+  </head>
+  <body>
+    <script src="graphexplorer.js"></script>
+  </body>
+</html>
diff --git a/runtime/tools/graphexplorer/graphexplorer.js b/runtime/tools/graphexplorer/graphexplorer.js
new file mode 100644
index 0000000..9b6132b
--- /dev/null
+++ b/runtime/tools/graphexplorer/graphexplorer.js
@@ -0,0 +1,1455 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// TODO:
+//  - starting dominator treemap from a group of nodes instead of only a
+//    single node
+
+"use strict";
+
+function Graph() {
+  // Create all slots up front to prevent V8 map transitions.
+
+  // We extensively use parallel arrays instead of objects like
+  //
+  // function Vertex {
+  //   this.size = 0;
+  //   this.successors = new Array();
+  //   this.predecessors = new Array();
+  //   this.semi = 0;
+  //   this.dom = 0;
+  //   this.label = 0;
+  //   this.parent = 0;
+  //   this.ancestor = 0;
+  // }
+  //
+  // This avoids GC work in V8, and it allows us to release the memory for
+  // intermediate values that are only needed while computing the dominators.
+
+  // Inputs.
+  this.N_ = 0;  // Number of nodes.
+  this.E_ = 0;  // Number of edges.
+  this.strings_ = null;
+  this.name_ = null;
+  this.class_ = null;
+  this.shallowSize_ = null;
+  this.firstSuccessor_ = null;
+  this.successors_ = null;
+  this.successorName_ = null;
+
+  // Outputs.
+  this.shallowSizeSum_ = 0;
+  this.firstPredecessor_ = null;
+  this.predecessors_ = null;
+  this.predecessorName_ = null;
+  this.retainedSize_ = null;
+  this.dom_ = null;
+  this.domHead_ = null;
+  this.domNext_ = null;
+
+  // Intermediates.
+  this.Nconnected_ = 0;  // Number of nodes reachable from root.
+  this.vertex_ = null;
+  this.semi_ = null;
+  this.parent_ = null;
+  this.ancestor_ = null;
+  this.label_ = null;
+  this.bucket_ = null;
+
+  // Recycled memory.
+  this.mark_ = null;
+  this.stack_ = null;
+}
+
+// Load a graph in V8 heap profile format from `data`, then compute the graph's
+// dominator tree and the retained size of each vertex.
+//
+// If `rewriteForOwners` is true, for each vertex that has an "owner" edge,
+// replace all edges to the vertex with an edge from the owner to the vertex.
+// This can be the graph more hierachical and reveal more structure in the
+// dominator tree.
+Graph.prototype.loadV8Profile = function(data, rewriteForOwners) {
+  console.log("Building successors...");
+
+  const N = data.snapshot.node_count;
+  const E = data.snapshot.edge_count;
+
+  const firstSuccessor = new Uint32Array(N + 2);
+  const successors = new Uint32Array(E);
+  const successorName = new Uint32Array(E);
+
+  const name = new Uint32Array(N + 1);
+  const clazz = new Array(N + 1);
+  const shallowSize = new Uint32Array(N + 1);
+  let shallowSizeSum = 0;
+
+  const node_stride = data.snapshot.meta.node_fields.length;
+  const node_type_offset = data.snapshot.meta.node_fields.indexOf("type");
+  const node_name_offset = data.snapshot.meta.node_fields.indexOf("name");
+  const node_id_offset = data.snapshot.meta.node_fields.indexOf("id");
+  const node_size_offset = data.snapshot.meta.node_fields.indexOf("self_size");
+  const node_edge_count_offset = data.snapshot.meta.node_fields.indexOf("edge_count");
+
+  const edge_stride = data.snapshot.meta.edge_fields.length;
+  const edge_type_offset = data.snapshot.meta.edge_fields.indexOf("type");
+  const edge_name_or_index_offset = data.snapshot.meta.edge_fields.indexOf("name_or_index");
+  const edge_target_offset = data.snapshot.meta.edge_fields.indexOf("to_node");
+  const edge_type_property = data.snapshot.meta.edge_types[0].indexOf("property");
+
+  let nextSuccessorIndex = 0;
+  let edge_cursor = 0;
+  let i = 1;
+  for (let node_cursor = 0;
+       node_cursor < data.nodes.length;
+       node_cursor += node_stride) {
+    let type = data.nodes[node_cursor + node_type_offset];
+    let node_name = data.nodes[node_cursor + node_name_offset];
+    let id = data.nodes[node_cursor + node_id_offset];
+    let self_size = data.nodes[node_cursor + node_size_offset];
+    let edge_count = data.nodes[node_cursor + node_edge_count_offset];
+
+    name[i] = node_name;
+    clazz[i] = data.snapshot.meta.node_types[0][type];
+    shallowSize[i] = self_size;
+    shallowSizeSum += self_size;
+    firstSuccessor[i] = nextSuccessorIndex;
+
+    for (let j = 0; j < edge_count; j++) {
+      let edge_type = data.edges[edge_cursor + edge_type_offset];
+      let edge_name_or_index = data.edges[edge_cursor + edge_name_or_index_offset];
+      let edge_to_node = (data.edges[edge_cursor + edge_target_offset] / node_stride) + 1;
+      edge_cursor += edge_stride;
+
+      if (edge_to_node < 1 || edge_to_node > N) {
+        throw "Invalid edge target";
+      }
+
+      successors[nextSuccessorIndex] = edge_to_node;
+
+      if (edge_type == edge_type_property) {
+        successorName[nextSuccessorIndex] = edge_name_or_index;
+      }
+
+      nextSuccessorIndex++;
+    }
+
+    i++;
+  }
+  firstSuccessor[N + 1] = nextSuccessorIndex;
+
+  if (i != (N + 1)) {
+    throw "Incorrect node_count!";
+  }
+  if (nextSuccessorIndex != E) {
+    throw "Incorrect edge_count!";
+  }
+
+  // Free memory.
+  data["nodes"] = null;
+  data["edges"] = null;
+
+  this.N_ = N;
+  this.E_ = E;
+  this.strings_ = data.strings;
+  this.firstSuccessor_ = firstSuccessor;
+  this.successorName_ = successorName;
+  this.successors_ = successors;
+  this.name_ = name;
+  this.class_ = clazz;
+  this.shallowSize_ = shallowSize;
+  this.shallowSizeSum_ = shallowSizeSum;
+
+  this.computePredecessors();
+  if (rewriteForOwners) {
+    this.rewriteEdgesForOwners();
+  }
+  this.computePreorder(1);
+  this.computeDominators();
+  this.computeRetainedSizes();
+  this.linkDominatorChildren();
+
+  this.mark_ = new Uint8Array(N + 1);
+  this.stack_ = new Uint32Array(E);
+};
+
+Graph.prototype.computePredecessors = function() {
+  console.log("Building predecessors...");
+
+  const N = this.N_;
+  const E = this.E_;
+  const firstSuccessor = this.firstSuccessor_;
+  const successors = this.successors_;
+  const successorName = this.successorName_;
+  const firstPredecessor = new Uint32Array(N + 2);
+  const predecessors = new Uint32Array(E);
+  const predecessorName = new Uint32Array(E);
+
+  const predecessorCount = new Uint32Array(N + 1);
+  for (let i = 1; i <= N; i++) {
+    let firstSuccessorIndex = firstSuccessor[i];
+    let lastSuccessorIndex = firstSuccessor[i + 1];
+    for (let successorIndex = firstSuccessorIndex;
+       successorIndex < lastSuccessorIndex;
+       successorIndex++) {
+      let successor = successors[successorIndex];
+      predecessorCount[successor]++;
+    }
+  }
+
+  let nextPredecessorIndex = 0;
+  for (let i = 1; i <= N; i++) {
+    firstPredecessor[i] = nextPredecessorIndex;
+    nextPredecessorIndex += predecessorCount[i];
+  }
+  firstPredecessor[N + 1] = nextPredecessorIndex;
+  if (nextPredecessorIndex != E) {
+    throw "Mismatched edges";
+  }
+
+  for (let i = 1; i <= N; i++) {
+    let firstSuccessorIndex = firstSuccessor[i];
+    let lastSuccessorIndex = firstSuccessor[i + 1];
+    for (let successorIndex = firstSuccessorIndex;
+       successorIndex < lastSuccessorIndex;
+       successorIndex++) {
+      let successor = successors[successorIndex];
+      let count = --predecessorCount[successor];
+      let predecessorIndex = firstPredecessor[successor] + count;
+      predecessors[predecessorIndex] = i;
+      predecessorName[predecessorIndex] = successorName[successorIndex];
+    }
+  }
+
+  this.firstPredecessor_ = firstPredecessor;
+  this.predecessors_ = predecessors;
+  this.predecessorName_ = predecessorName;
+};
+
+Graph.prototype.rewriteEdgesForOwners = function() {
+  console.log("Rewriting edges for owners...");
+
+  // Rewrite some edges to make the graph more hierarchical.
+  // If there is an edge A.owner -> B,
+  //   - remove all edges to A, and
+  //   - add edge B.<unnamed> -> A.
+
+  const N = this.N_;
+  const E = this.E_;
+  const firstSuccessor = this.firstSuccessor_;
+  const successors = this.successors_;
+  const successorName = this.successorName_;
+  const firstPredecessor = this.firstPredecessor_;
+  const predecessors = this.predecessors_;
+  const predecessorName = this.predecessorName_;
+  const owners = new Uint32Array(N + 1);
+  const owneeCount = new Uint32Array(N + 1);
+
+  // Identify owner.
+  for (let i = 1; i <= N; i++) {
+    let cls = this.class_[i];
+    let ownerEdgeName;
+
+    if (cls == "Class") {
+      ownerEdgeName = "library_";
+    } else if (cls == "PatchClass") {
+      ownerEdgeName = "patched_class_";
+    } else if (cls == "Function") {
+      ownerEdgeName = "owner_";
+    } else if (cls == "Field") {
+      ownerEdgeName = "owner_";
+    } else if (cls == "Code") {
+      ownerEdgeName = "owner_";
+    } else if (cls == "ICData") {
+      ownerEdgeName = "owner_";
+    } else {
+      continue;
+    }
+
+    let firstSuccessorIndex = firstSuccessor[i];
+    let lastSuccessorIndex = firstSuccessor[i + 1];
+    for (let successorIndex = firstSuccessorIndex;
+         successorIndex < lastSuccessorIndex;
+         successorIndex++) {
+      let edge = this.strings_[this.successorName_[successorIndex]];
+      if (edge == ownerEdgeName) {
+        let owner = successors[successorIndex];
+        owners[i] = owner;
+        owneeCount[owner]++;
+        break;
+      }
+    }
+  }
+
+  // Remove successors if the target has an owner.
+  // Allocate space for extra successors added to owners.
+  const newSuccessors = new Uint32Array(E);
+  const newSuccessorName = new Uint32Array(E);
+  let newSuccessorIndex = 0;
+  for (let i = 1; i <= N; i++) {
+    let firstSuccessorIndex = firstSuccessor[i];
+    let lastSuccessorIndex = firstSuccessor[i + 1];
+    firstSuccessor[i] = newSuccessorIndex;
+    for (let successorIndex = firstSuccessorIndex;
+         successorIndex < lastSuccessorIndex;
+         successorIndex++) {
+      let successor = successors[successorIndex];
+      let name = successorName[successorIndex];
+
+      if (owners[successor] != 0) {
+        // Drop successor.
+      } else {
+        newSuccessors[newSuccessorIndex] = successor;
+        newSuccessorName[newSuccessorIndex] = name;
+        newSuccessorIndex++;
+      }
+    }
+    newSuccessorIndex += owneeCount[i];
+  }
+  firstSuccessor[N + 1] = newSuccessorIndex;
+
+  // Remove predecessors if the target has an owner.
+  // Add the owner as a predecessor.
+  // Add extra successors for owner.
+  for (let i = 1; i <= N; i++) {
+    let owner = owners[i];
+    if (owner == 0) {
+      continue;
+    }
+
+    let firstPredecessorIndex = firstPredecessor[i];
+    let lastPredecessorIndex = firstPredecessor[i + 1];
+    for (let predecessorIndex = firstPredecessorIndex;
+         predecessorIndex < lastPredecessorIndex;
+         predecessorIndex++) {
+      predecessors[predecessorIndex] = 0;
+    }
+    predecessors[firstPredecessorIndex] = owner;
+
+    let nextSuccessorIndex = firstSuccessor[owner + 1] - owneeCount[owner];
+    newSuccessors[nextSuccessorIndex] = i;
+    owneeCount[owner]--;
+  }
+
+  this.successors_ = newSuccessors;
+  this.successorName_ = newSuccessorName;
+};
+
+// Thomas Lengauer and Robert Endre Tarjan. 1979. A fast algorithm for finding
+// dominators in a flowgraph. ACM Trans. Program. Lang. Syst. 1, 1 (January
+// 1979), 121-141. DOI: https://doi.org/10.1145/357062.357071
+
+Graph.prototype.computePreorder = function(root) {
+  console.log("Computing preorder...");
+
+  // Lengauer and Tarjan Step 1.
+  const N = this.N_;
+  const firstSuccessor = this.firstSuccessor_;
+  const successors = this.successors_;
+
+  const semi = new Uint32Array(N + 1);
+  const vertex = new Uint32Array(N + 1);
+  const ancestor = new Uint32Array(N + 1);
+  const parent = new Uint32Array(N + 1);
+  const label = new Uint32Array(N + 1);
+
+  let preorderNumber = 0;
+
+  let stackNodes = new Uint32Array(N + 1);
+  let stackEdges = new Uint32Array(N + 1);
+  let stackTop = 0;
+
+  // Push root.
+  preorderNumber++;
+  vertex[preorderNumber] = root;
+  semi[root] = preorderNumber;
+  label[root] = root;
+  ancestor[root] = 0;
+  stackNodes[stackTop] = root;
+  stackEdges[stackTop] = firstSuccessor[root];
+
+  while (stackTop >= 0) {
+    let v = stackNodes[stackTop];
+    let e = stackEdges[stackTop];
+
+    if (e < firstSuccessor[v + 1]) {
+      // Visit next successor.
+      let w = successors[e];
+      e++;
+      stackEdges[stackTop] = e;
+
+      if (semi[w] == 0) {
+        parent[w] = v;
+
+        preorderNumber++;
+        vertex[preorderNumber] = w;
+        semi[w] = preorderNumber;
+        label[w] = w;
+        ancestor[w] = 0;
+
+        // Push successor.
+        stackTop++;
+        stackNodes[stackTop] = w;
+        stackEdges[stackTop] = firstSuccessor[w];
+      }
+    } else {
+      // No more successors: pop.
+      stackTop--;
+    }
+  }
+
+  this.Nconnected_ = preorderNumber;
+  if (this.Nconnected_ != N) {
+    console.log("Graph is not fully connected: " + this.Nconnected_ +
+          " nodes are reachable, but graph has " + this.N_ + " nodes");
+  }
+
+  this.semi_ = semi;
+  this.vertex_ = vertex;
+  this.ancestor_ = ancestor;
+  this.parent_ = parent;
+  this.label_ = label;
+};
+
+Graph.prototype.computeDominators = function() {
+  console.log("Computing dominator tree...");
+
+  const N = this.N_;
+  const Nconnected = this.Nconnected_;
+  const firstPredecessor = this.firstPredecessor_;
+  const predecessors = this.predecessors_;
+  const vertex = this.vertex_;
+  const semi = this.semi_;
+  const bucket = new Array(N + 1);
+  const parent = this.parent_;
+  const dom = new Uint32Array(N + 1);
+
+  for (let i = Nconnected; i > 1; i--) {
+    let w = vertex[i];
+
+    // Lengauer and Tarjan Step 2.
+    let firstPredecessorIndex = firstPredecessor[w];
+    let lastPredecessorIndex = firstPredecessor[w + 1];
+    for (let predecessorIndex = firstPredecessorIndex;
+         predecessorIndex < lastPredecessorIndex;
+         predecessorIndex++) {
+      let v = predecessors[predecessorIndex];
+
+      if (semi[v] == 0) {
+        // The predecessor was not reachable from the root: ignore
+        // this edge.
+        continue;
+      }
+
+      let u = this.forestEval(v);
+      if (semi[u] < semi[w]) {
+        semi[w] = semi[u]
+      }
+    }
+
+    let z = vertex[semi[w]];
+    let b = bucket[z];
+    if (b == null) {
+      b = new Array();
+      bucket[z] = b;
+    }
+    b.push(w);
+    this.forestLink(parent[w], w);
+
+    // Lengauer and Tarjan Step 3.
+    z = parent[w];
+    b = bucket[z];
+    bucket[z] = null;
+    if (b != null) {
+      for (let j = 0; j < b.length; j++) {
+        let v = b[j];
+        let u = this.forestEval(v);
+        dom[v] = semi[u] < semi[v] ? u : parent[w];
+      }
+    }
+  }
+
+  this.ancestor_ = null;
+  this.label_ = null;
+  this.parent_ = null;
+  this.bucket_ = null;
+
+  // Lengauer and Tarjan Step 4.
+  for (let i = 2; i <= Nconnected; i++) {
+    let w = vertex[i];
+    if (dom[w] != vertex[semi[w]]) {
+      dom[w] = dom[dom[w]];
+    }
+  }
+  dom[vertex[1]] = 0;
+
+  this.semi_ = null;
+  this.dom_ = dom;
+};
+
+Graph.prototype.forestCompress = function(v) {
+  const ancestor = this.ancestor_;
+  if (ancestor[ancestor[v]] != 0) {
+    this.forestCompress(ancestor[v]);
+    const semi = this.semi_;
+    const label = this.label_;
+    if (semi[label[ancestor[v]]] < semi[label[v]]) {
+      label[v] = label[ancestor[v]];
+    }
+    ancestor[v] = ancestor[ancestor[v]];
+  }
+};
+
+Graph.prototype.forestEval = function(v) {
+  if (this.ancestor_[v] == 0) {
+    return v;
+  } else {
+    this.forestCompress(v);
+    return this.label_[v];
+  }
+};
+
+Graph.prototype.forestLink = function(v, w) {
+  this.ancestor_[w] = v;
+};
+
+Graph.prototype.computeRetainedSizes = function() {
+  console.log("Computing retained sizes...");
+
+  const N = this.N_;
+  const Nconnected = this.Nconnected_;
+  const vertex = this.vertex_;
+  const dom = this.dom_;
+  const shallowSize = this.shallowSize_;
+  const retainedSize = new Uint32Array(N + 1);
+
+  let shallowSum = 0;
+
+  for (let i = 1; i <= Nconnected; i++) {
+    let w = vertex[i];
+    let shallow = shallowSize[w];
+    retainedSize[w] = shallow;
+    shallowSum += shallow;
+  }
+
+  for (let i = Nconnected; i > 1; i--) {
+    let w = vertex[i];
+    retainedSize[dom[w]] += retainedSize[w];
+  }
+
+  if (retainedSize[vertex[1]] != shallowSum) {
+    console.log("Retained size mismatch: root retains " + retainedSize[vertex[1]] +
+                " but shallow sizes sum to " + shallowSum);
+  }
+
+  this.retainedSize_ = retainedSize;
+};
+
+Graph.prototype.linkDominatorChildren = function() {
+  console.log("Linking dominator tree children...");
+
+  const N = this.N_;
+  const Nconnected = this.Nconnected_;
+
+  const vertex = this.vertex_;
+  const dom = this.dom_;
+  const head = new Uint32Array(N + 1);
+  const next = new Uint32Array(N + 1);
+
+  for (let i = 2; i <= Nconnected; i++) {
+    let child = vertex[i];
+    let parent = dom[child];
+    next[child] = head[parent];
+    head[parent] = child;
+  }
+
+  this.domHead_ = head;
+  this.domNext_ = next;
+};
+
+Graph.prototype.getTotalSize = function() {
+  return this.shallowSizeSum_;
+};
+
+Graph.prototype.getRoot = function() {
+  return this.vertex_[1];
+};
+
+Graph.prototype.getAll = function() {
+  let nodes = new Array();
+  for (let v = 1; v <= this.N_; v++) {
+    nodes.push(v);
+  }
+  return nodes;
+};
+
+function removeDuplicates(array) {
+  let set = new Set(array);
+  let result = new Array();
+  for (let element of set) {
+    result.push(element);
+  }
+  return result
+}
+
+Graph.prototype.successorsOfDo = function(v, action) {
+  let cls = this.class_[v];
+  let firstSuccessorIndex = this.firstSuccessor_[v];
+  let lastSuccessorIndex = this.firstSuccessor_[v + 1];
+  for (let successorIndex = firstSuccessorIndex;
+     successorIndex < lastSuccessorIndex;
+     successorIndex++) {
+    let successor = this.successors_[successorIndex];
+    let edgeName = this.strings_[this.successorName_[successorIndex]];
+    action(successor, cls + "::" + edgeName);
+  }
+}
+
+Graph.prototype.predecessorsOfDo = function(v, action) {
+  let firstPredecessorIndex = this.firstPredecessor_[v];
+  let lastPredecessorIndex = this.firstPredecessor_[v + 1];
+  for (let predecessorIndex = firstPredecessorIndex;
+     predecessorIndex < lastPredecessorIndex;
+     predecessorIndex++) {
+    let predecessor = this.predecessors_[predecessorIndex];
+    let cls = this.class_[predecessor];
+    let edgeName = this.strings_[this.predecessorName_[predecessorIndex]];
+    action(predecessor, cls + "::" + edgeName);
+  }
+}
+
+Graph.prototype.dominatorChildrenOfDo = function(v, action) {
+  for (let w = this.domHead_[v]; w != 0; w = this.domNext_[w]) {
+    action(w);
+  }
+};
+
+Graph.prototype.nameOf = function(v) {
+  return this.strings_[this.name_[v]];
+};
+
+Graph.prototype.classOf = function(v) {
+  return this.class_[v];
+};
+
+Graph.prototype.shallowSizeOf = function(v) {
+  return this.shallowSize_[v];
+};
+
+Graph.prototype.retainedSizeOf = function(v) {
+  return this.retainedSize_[v];
+};
+
+Graph.prototype.shallowSizeOfSet = function(nodes) {
+  let sum = 0;
+  for (let i = 0; i < nodes.length; i++) {
+    sum += this.shallowSize_[nodes[i]];
+  }
+  return sum;
+};
+
+Graph.prototype.retainedSizeOfSet = function(nodes) {
+  const N = this.N_;
+  const E = this.E_;
+  const mark = this.mark_;
+  const stack = this.stack_;
+
+  for (let i = 1; i <= N; i++) {
+    mark[i] = 0;
+  }
+
+  for (let i = 0; i < nodes.length; i++) {
+    let v = nodes[i];
+    mark[v] = 1;
+  }
+
+  let scan = 0;
+  let top = 0;
+  stack[top++] = 1;
+
+  while (scan < top) {
+    let v = stack[scan++];
+    let firstSuccessorIndex = this.firstSuccessor_[v];
+    let lastSuccessorIndex = this.firstSuccessor_[v + 1];
+    for (let successorIndex = firstSuccessorIndex;
+       successorIndex < lastSuccessorIndex;
+       successorIndex++) {
+      let successor = this.successors_[successorIndex];
+      if (mark[successor] == 0) {
+        mark[successor] = 1;
+        stack[top++] = successor;
+      }
+    }
+  }
+
+
+  for (let i = 0; i < nodes.length; i++) {
+    let v = nodes[i];
+    mark[v] = 0;
+  }
+  for (let i = 0; i < nodes.length; i++) {
+    let v = nodes[i];
+    if (mark[v] == 0) {
+      mark[v] = 1;
+      stack[top++] = v;
+    }
+  }
+
+  let sum = 0;
+  while (scan < top) {
+    let v = stack[scan++];
+    sum += this.shallowSize_[v];
+    let firstSuccessorIndex = this.firstSuccessor_[v];
+    let lastSuccessorIndex = this.firstSuccessor_[v + 1];
+    for (let successorIndex = firstSuccessorIndex;
+       successorIndex < lastSuccessorIndex;
+       successorIndex++) {
+      let successor = this.successors_[successorIndex];
+      if (mark[successor] == 0) {
+        mark[successor] = 1;
+        stack[top++] = successor;
+      }
+    }
+  }
+  return sum;
+};
+
+function hash(string) {
+  // Jenkin's one_at_a_time.
+  let h = string.length;
+  for (let i = 0; i < string.length; i++) {
+    h += string.charCodeAt(i);
+    h += h << 10;
+    h ^= h >> 6;
+  }
+  h += h << 3;
+  h ^= h >> 11;
+  h += h << 15;
+  return h;
+}
+
+function color(string) {
+  let hue = hash(string) % 360;
+  return "hsl(" + hue + ",60%,60%)";
+}
+
+function prettySize(size) {
+  if (size < 1024) return size + "B";
+  size /= 1024;
+  if (size < 1024) return size.toFixed(1) + "KiB";
+  size /= 1024;
+  if (size < 1024) return size.toFixed(1) + "MiB";
+  size /= 1024;
+  return size.toFixed(1) + "GiB";
+}
+
+function prettyPercent(fraction) {
+  return (fraction * 100).toFixed(1);
+}
+
+function createTreemapTile(v, width, height, depth) {
+  let div = document.createElement("div");
+  div.className = "treemapTile";
+  div.style["background-color"] = color(graph.classOf(v));
+  div.ondblclick = function(event) {
+    event.stopPropagation();
+    if (depth == 0) {
+      let dom = graph.dom_[v];
+      if (dom == 0) {
+        // Already at root.
+      } else {
+        showDominatorTree(dom);  // Zoom out.
+      }
+    } else {
+      showDominatorTree(v);  // Zoom in.
+    }
+  };
+  div.oncontextmenu = function(event) {
+    event.stopPropagation();
+    event.preventDefault();
+    showTables([v]);
+  };
+
+  let left = 0;
+  let top = 0;
+
+  const kPadding = 5;
+  const kBorder = 1;
+  left += kPadding - kBorder;
+  top += kPadding - kBorder;
+  width -= 2 * kPadding;
+  height -= 2 * kPadding;
+
+  div.title =
+    graph.nameOf(v) +
+    " \nclass: " + graph.classOf(v) +
+    " \nretained: " + graph.retainedSizeOf(v) +
+    " \nshallow: " + graph.shallowSizeOf(v);
+
+  if (width < 10 || height < 10) {
+    // Too small: don't render label or children.
+    return div;
+  }
+
+  let label = graph.nameOf(v) + " [" + prettySize(graph.retainedSizeOf(v)) + "]";
+  div.appendChild(document.createTextNode(label));
+  const kLabelHeight = 9;
+  top += kLabelHeight;
+  height -= kLabelHeight;
+
+  if (depth > 2) {
+    // Too deep: don't render children.
+    return div;
+  }
+  if (width < 4 || height < 4) {
+    // Too small: don't render children.
+    return div;
+  }
+
+  let children = new Array();
+  graph.dominatorChildrenOfDo(v, function(c) {
+    // Size 0 children seem to confuse the layout algorithm (accumulating
+    // rounding errors?).
+    if (graph.retainedSizeOf(c) > 0) {
+      children.push(c);
+    }
+  });
+  children.sort(function (a, b) {
+    return graph.retainedSizeOf(b) - graph.retainedSizeOf(a);
+  });
+
+  const scale = width * height / graph.retainedSizeOf(v);
+
+  // Bruls M., Huizing K., van Wijk J.J. (2000) Squarified Treemaps. In: de
+  // Leeuw W.C., van Liere R. (eds) Data Visualization 2000. Eurographics.
+  // Springer, Vienna.
+  for (let rowStart = 0;  // Index of first child in the next row.
+       rowStart < children.length;) {
+    // Prefer wider rectangles, the better to fit text labels.
+    const GOLDEN_RATIO = 1.61803398875;
+    let verticalSplit = (width / height) > GOLDEN_RATIO;
+
+    let space;
+    if (verticalSplit) {
+      space = height;
+    } else {
+      space = width;
+    }
+
+    let rowMin = graph.retainedSizeOf(children[rowStart]) * scale;
+    let rowMax = rowMin;
+    let rowSum = 0;
+    let lastRatio = 0;
+
+    let rowEnd;  // One after index of last child in the next row.
+    for (rowEnd = rowStart; rowEnd < children.length; rowEnd++) {
+      let size = graph.retainedSizeOf(children[rowEnd]) * scale;
+      if (size < rowMin) rowMin = size;
+      if (size > rowMax) rowMax = size;
+      rowSum += size;
+
+      let ratio = Math.max((space * space * rowMax) / (rowSum * rowSum),
+                           (rowSum * rowSum) / (space * space * rowMin));
+      if ((lastRatio != 0) && (ratio > lastRatio)) {
+        // Adding the next child makes the aspect ratios worse: remove it and
+        // add the row.
+        rowSum -= size;
+        break;
+      }
+      lastRatio = ratio;
+    }
+
+    let rowLeft = left;
+    let rowTop = top;
+    let rowSpace = rowSum / space;
+
+    for (let i = rowStart; i < rowEnd; i++) {
+      let child = children[i];
+      let size = graph.retainedSizeOf(child) * scale;
+
+      let childWidth;
+      let childHeight;
+      if (verticalSplit) {
+        childWidth = rowSpace;
+        childHeight = size / childWidth;
+      } else {
+        childHeight = rowSpace;
+        childWidth = size / childHeight;
+      }
+
+      let childDiv = createTreemapTile(child, childWidth, childHeight, depth + 1);
+      childDiv.style.left = rowLeft + "px";
+      childDiv.style.top = rowTop + "px";
+      // Oversize the final div by kBorder to make the borders overlap.
+      childDiv.style.width = (childWidth + kBorder) + "px";
+      childDiv.style.height = (childHeight + kBorder) + "px";
+      div.appendChild(childDiv);
+
+      if (verticalSplit)
+        rowTop += childHeight;
+      else
+        rowLeft += childWidth;
+    }
+
+    if (verticalSplit) {
+      left += rowSpace;
+      width -= rowSpace;
+    } else {
+      top += rowSpace;
+      height -= rowSpace;
+    }
+
+    rowStart = rowEnd;
+  }
+
+  return div;
+}
+
+function showDominatorTree(v) {
+  let header = document.createElement("div");
+  header.textContent = "Dominator Tree";
+  header.title =
+    "Double click a box to zoom in.\n" +
+    "Double click the outermost box to zoom out.\n" +
+    "Right click a box to view successor and predecessor tables.";
+  header.className = "headerRow";
+  header.style["flex-grow"] = 0;
+  header.style["padding"] = 5;
+  header.style["border-bottom"] = "solid 1px";
+
+  let content = document.createElement("div");
+  content.style["flex-basis"] = 0;
+  content.style["flex-grow"] = 1;
+
+  let column = document.createElement("div");
+  column.style["width"] = "100%";
+  column.style["height"] = "100%";
+  column.style["border"] = "solid 2px";
+  column.style["display"] = "flex";
+  column.style["flex-direction"] = "column";
+  column.appendChild(header);
+  column.appendChild(content);
+
+  setBody(column);
+
+  // Add the content div to the document first so the browser will calculate
+  // the available width and height.
+  let w = content.offsetWidth;
+  let h = content.offsetHeight;
+
+  let topTile = createTreemapTile(v, w, h, 0);
+  topTile.style.width = w;
+  topTile.style.height = h;
+  topTile.style.border = "none";
+  content.appendChild(topTile);
+}
+
+function Group(edge, cls) {
+  this.name = "";
+  this.edge = edge;
+  this.cls = cls;
+  this.shallowSize = 0;
+  this.retainedSize = 0;
+  this.nodes = new Array();
+}
+
+Group.prototype.add = function(v, edge, cls) {
+  this.nodes.push(v);
+  if (this.edge != edge) {
+    this.edge = "<multiple>";
+  }
+  if (this.cls != cls) {
+    this.cls = "<multiple>"
+  }
+};
+
+function asGroupsByClass(labeledNodes) {
+  let map = new Map();
+  let groups = new Array();
+  for (let i = 0; i < labeledNodes.length; i++) {
+    let v = labeledNodes[i].node;
+    let edge = labeledNodes[i].name;
+    let cls = graph.classOf(v);
+    let group = map.get(cls);
+    if (group === undefined) {
+      group = new Group(edge, cls);
+      groups.push(group);
+      map.set(cls, group);
+    }
+    group.add(v, edge, cls);
+  }
+  for (let i = 0; i < groups.length; i++) {
+    let group = groups[i];
+    group.shallowSize = graph.shallowSizeOfSet(group.nodes);
+    group.retainedSize = graph.retainedSizeOfSet(group.nodes);
+    group.name = group.nodes.length + " instances of " + group.cls;
+  }
+  return groups;
+}
+
+function LabeledNode(node, name) {
+  this.node = node;
+  this.name = name;
+}
+
+LabeledNode.prototype.addName = function(name) {
+  if (this.name != name) {
+    this.name = "<multiple>";
+  }
+};
+
+function Table(title, labeledNodes, byEdges) {
+  const self = this;
+
+  this.title = title;
+  this.labeledNodes = labeledNodes;
+  this.groupsByEdge = byEdges;
+  this.groupsByClass = asGroupsByClass(labeledNodes);
+  this.grouping = 0;
+
+  this.nom = document.createElement("span");
+  this.nom.onclick = function() {
+    self.grouping = (self.grouping + 1) % 3;
+    self.refreshRows();
+  };
+  this.nom.className = "nameCell actionCell"
+  this.nom.textContent = title;
+  this.nom.title = "Toggle grouping by object, class or edge";
+
+  let edge = document.createElement("span");
+  edge.onclick = function() { self.sortByEdge(); };
+  edge.className = "edgeCell actionCell";
+  edge.textContent = "Edge";
+  edge.title = "Sort by edge";
+
+  let cls = document.createElement("span");
+  cls.onclick = function() { self.sortByClass(); };
+  cls.className = "classCell actionCell";
+  cls.textContent = "Class";
+  cls.title = "Sort by class";
+
+  let shallowSize = document.createElement("span");
+  shallowSize.onclick = function() { self.sortByShallowSize(); };
+  shallowSize.className = "sizeCell actionCell";
+  shallowSize.textContent = "Size";
+  shallowSize.title = "Sort by shallow size";
+
+  let shallowPercent = document.createElement("span");
+  shallowPercent.className = "sizePercentCell"
+
+  let retainedSize = document.createElement("span");
+  retainedSize.onclick = function() { self.sortByRetainedSize(); };
+  retainedSize.className = "sizeCell actionCell";
+  retainedSize.textContent = "Retained Size";
+  retainedSize.title = "Sort by retained size";
+
+  let retainedPercent = document.createElement("span");
+  retainedPercent.className = "sizePercentCell";
+
+  let header = document.createElement("div");
+  header.className = "headerRow";
+  header.style["display"] = "flex";
+  header.style["flex-direction"] = "row";
+  header.style["border-bottom"] = "solid 1px";
+  header.appendChild(this.nom);
+  header.appendChild(edge);
+  header.appendChild(cls);
+  header.appendChild(shallowSize);
+  header.appendChild(shallowPercent);
+  header.appendChild(retainedSize);
+  header.appendChild(retainedPercent);
+
+  this.listDiv = document.createElement("div");
+  this.listDiv.style["overflow-y"] = "scroll";
+  this.listDiv.style["flex-basis"] = "0px";
+  this.listDiv.style["flex-grow"] = 1;
+
+  this.div = document.createElement("div");
+  this.div.style["border"] = "solid 2px";
+  this.div.style["display"] = "flex";
+  this.div.style["flex-direction"] = "column";
+  this.div.style["background-color"] = "#DDDDDD";
+
+  this.div.appendChild(header);
+  this.div.appendChild(this.listDiv);
+
+  this.refreshRows();
+}
+
+Table.prototype.sortByEdge = function() {
+  this.labeledNodes.sort(function (a, b) {
+    return a.name.localeCompare(b.name);
+  });
+  this.groupsByEdge.sort(function (a, b) {
+    return a.edge.localeCompare(b.edge);
+  });
+  this.groupsByClass.sort(function (a, b) {
+    return a.edge.localeCompare(b.edge);
+  });
+  this.refreshRows();
+};
+
+Table.prototype.sortByClass = function() {
+  this.labeledNodes.sort(function (a, b) {
+    return graph.classOf(a.node).localeCompare(graph.classOf(b.node));
+  });
+  this.groupsByEdge.sort(function (a, b) {
+    return a.cls.localeCompare(b.cls);
+  });
+  this.groupsByClass.sort(function (a, b) {
+    return a.cls.localeCompare(b.cls);
+  });
+  this.refreshRows();
+};
+
+Table.prototype.sortByShallowSize = function() {
+  this.labeledNodes.sort(function (a, b) {
+    return graph.shallowSizeOf(b.node) - graph.shallowSizeOf(a.node);
+  });
+  this.groupsByEdge.sort(function (a, b) {
+    return b.shallowSize - a.shallowSize;
+  });
+  this.groupsByClass.sort(function (a, b) {
+    return b.shallowSize - a.shallowSize;
+  });
+  this.refreshRows();
+};
+
+Table.prototype.sortByRetainedSize = function() {
+  this.labeledNodes.sort(function (a, b) {
+    return graph.retainedSizeOf(b.node) - graph.retainedSizeOf(a.node);
+  });
+  this.groupsByEdge.sort(function (a, b) {
+    return b.retainedSize - a.retainedSize;
+  });
+  this.groupsByClass.sort(function (a, b) {
+    return b.retainedSize - a.retainedSize;
+  });
+  this.refreshRows();
+};
+
+Table.prototype.refreshRows = function() {
+  while (this.listDiv.firstChild) {
+    this.listDiv.removeChild(this.listDiv.firstChild);
+  }
+
+  // To prevent rendering lag.
+  const MAX_TABLE_ROWS = 500;
+
+  if (this.grouping == 0) {
+    let labeledNodes = this.labeledNodes;
+    this.nom.textContent = this.title + " (" + labeledNodes.length + " objects)";
+
+    for (let i = 0; i < labeledNodes.length; i++) {
+      if (i > MAX_TABLE_ROWS) {
+        this.listDiv.appendChild(document.createTextNode((labeledNodes.length - i) + " more objects"));
+        break;
+      }
+      this.listDiv.appendChild(createObjectRow(labeledNodes[i]));
+    }
+  } else if (this.grouping == 1) {
+    let groups = this.groupsByClass;
+    this.nom.textContent = this.title + " (" + groups.length + " classes)";
+
+    for (let i = 0; i < groups.length; i++) {
+      if (i > MAX_TABLE_ROWS) {
+        // Prevent rendering lag.
+        this.listDiv.appendChild(document.createTextNode((groups.length - i) + " more classes"));
+        break;
+      }
+      this.listDiv.appendChild(createGroupRow(groups[i]));
+    }
+  } else {
+    let groups = this.groupsByEdge;
+    this.nom.textContent = this.title + " (" + groups.length + " edges)";
+
+    for (let i = 0; i < groups.length; i++) {
+      if (i > MAX_TABLE_ROWS) {
+        // Prevent rendering lag.
+        this.listDiv.appendChild(document.createTextNode((groups.length - i) + " more edges"));
+        break;
+      }
+      this.listDiv.appendChild(createGroupRow(groups[i]));
+    }
+  }
+};
+
+function createObjectRow(labeledNode) {
+  const v = labeledNode.node;
+
+  let nom = document.createElement("span");
+  nom.onclick = function() { showTables([v]); }
+  nom.className = "nameCell actionCell";
+  nom.textContent = graph.nameOf(v);
+  nom.title = "Select this object";
+
+  let edge = document.createElement("span");
+  edge.className = "edgeCell";
+  edge.textContent = labeledNode.name;
+
+  let cls = document.createElement("span");
+  cls.className = "classCell";
+  cls.textContent = graph.classOf(v);
+
+  let shallowSize = document.createElement("span");
+  shallowSize.className = "sizeCell";
+  shallowSize.textContent = graph.shallowSizeOf(v);
+
+  let shallowPercent = document.createElement("span");
+  shallowPercent.className = "sizePercentCell";
+  shallowPercent.textContent = prettyPercent(graph.shallowSizeOf(v) / graph.getTotalSize());
+
+  let retainedSize = document.createElement("span");
+  retainedSize.onclick = function(event) { showDominatorTree(v); };
+  retainedSize.className = "sizeCell actionCell";
+  retainedSize.textContent = graph.retainedSizeOf(v);
+  retainedSize.title = "Show dominator tree";
+
+  let retainedPercent = document.createElement("span");
+  retainedPercent.onclick = function(event) { showDominatorTree(v); };
+  retainedPercent.className = "sizePercentCell actionCell";
+  retainedPercent.textContent = prettyPercent(graph.retainedSizeOf(v) / graph.getTotalSize());
+  retainedPercent.title = "Show dominator tree";
+
+  let row = document.createElement("div");
+  row.style["display"] = "flex";
+  row.style["flex-direction"] = "row";
+  row.style["border-bottom"] = "solid 1px";
+  row.appendChild(nom);
+  row.appendChild(edge);
+  row.appendChild(cls);
+  row.appendChild(shallowSize);
+  row.appendChild(shallowPercent);
+  row.appendChild(retainedSize);
+  row.appendChild(retainedPercent);
+  return row;
+}
+
+function createGroupRow(g) {
+  let nom = document.createElement("span");
+  nom.onclick = function() { showTables(g.nodes); }
+  nom.className = "nameCell actionCell";
+  nom.textContent = g.name;
+  nom.title = "Select these objects";
+
+  let cls = document.createElement("span");
+  cls.className = "classCell";
+  cls.textContent = g.cls;
+
+  let edge = document.createElement("span");
+  edge.className = "edgeCell";
+  edge.textContent = g.edge;
+
+  let shallowSize = document.createElement("span");
+  shallowSize.className = "sizeCell";
+  shallowSize.textContent = g.shallowSize;
+
+  let shallowPercent = document.createElement("span");
+  shallowPercent.className = "sizePercentCell";
+  shallowPercent.textContent = prettyPercent(g.shallowSize / graph.getTotalSize());
+
+  let retainedSize = document.createElement("span");
+  retainedSize.className = "sizeCell";
+  retainedSize.textContent = g.retainedSize;
+
+  let retainedPercent = document.createElement("span");
+  retainedPercent.className = "sizePercentCell";
+  retainedPercent.textContent = prettyPercent(g.retainedSize / graph.getTotalSize());
+
+  let row = document.createElement("div");
+  row.style["display"] = "flex";
+  row.style["flex-direction"] = "row";
+  row.style["border-bottom"] = "solid 1px";
+  row.appendChild(nom);
+  row.appendChild(edge);
+  row.appendChild(cls);
+  row.appendChild(shallowSize);
+  row.appendChild(shallowPercent);
+  row.appendChild(retainedSize);
+  row.appendChild(retainedPercent);
+  return row;
+}
+
+function mapValuesToArray(map) {
+  let array = new Array();
+  for (let element of map.values()) {
+    array.push(element);
+  }
+  return array;
+}
+
+function showTables(nodes) {
+  let labeledNodes = new Array();
+  let successors = new Map();
+  let successorEdges = new Map();
+  let successorEdgeGroups = new Array();
+  let predecessors = new Map();
+  let predecessorEdges = new Map();
+  let predecessorEdgeGroups = new Array();
+  for (let i = 0; i < nodes.length; i++) {
+    let n = nodes[i];
+    labeledNodes.push(new LabeledNode(n, "-"));
+    graph.successorsOfDo(n, function (child, edgeName) {
+      let e = successors.get(child);
+      if (e) {
+        e.addName(edgeName);
+      } else {
+        successors.set(child, new LabeledNode(child, edgeName));
+      }
+      let cls = graph.classOf(child);
+      let g = successorEdges.get(edgeName);
+      if (!g) {
+        g = new Group(edgeName, cls);
+        successorEdgeGroups.push(g);
+        successorEdges.set(edgeName, g);
+      }
+      g.add(child, edgeName, cls);
+    });
+    graph.predecessorsOfDo(n, function (parent, edgeName) {
+      let e = predecessors.get(parent);
+      if (e) {
+        e.addName(edgeName);
+      } else {
+        predecessors.set(parent, new LabeledNode(parent, edgeName));
+      }
+      let cls = graph.classOf(parent);
+      let g = predecessorEdges.get(edgeName);
+      if (!g) {
+        g = new Group(edgeName, cls);
+        predecessorEdgeGroups.push(g);
+        predecessorEdges.set(edgeName, g);
+      }
+      g.add(parent, edgeName, cls);
+    });
+  }
+
+  // Computing retained sizes here O((C + E) * N) where
+  //   N is the number of objects
+  //   C is the number of classes
+  //   E is the number of edges
+  successors = mapValuesToArray(successors);
+  for (let i = 0; i < successorEdgeGroups.length; i++) {
+    let group = successorEdgeGroups[i];
+    group.nodes = removeDuplicates(group.nodes);
+    group.shallowSize = graph.shallowSizeOfSet(group.nodes);
+    group.retainedSize = graph.retainedSizeOfSet(group.nodes);
+    group.name = group.nodes.length + " targets of " + group.edge;
+  }
+  predecessors = mapValuesToArray(predecessors);
+  for (let i = 0; i < predecessorEdgeGroups.length; i++) {
+    let group = predecessorEdgeGroups[i];
+    group.nodes = removeDuplicates(group.nodes);
+    group.shallowSize = graph.shallowSizeOfSet(group.nodes);
+    group.retainedSize = graph.retainedSizeOfSet(group.nodes);
+    group.name = group.nodes.length + " sources of " + group.edge;
+  }
+
+  let rewrite = document.createElement("input");
+  rewrite.setAttribute("type", "checkbox");
+
+  let rewriteLabel = document.createElement("span");
+  rewriteLabel.textContent = "Owners ";
+
+  let input = document.createElement("input");
+  input.setAttribute("type", "file");
+  input.setAttribute("multiple", false);
+  input.onchange = function(event) {
+    let file = event.target.files[0];
+    let reader = new FileReader();
+    reader.readAsText(file, 'UTF-8');
+    reader.onload = function(event) {
+      let data = JSON.parse(event.target.result);
+      document.title = file.name;
+      graph = new Graph();
+      graph.loadV8Profile(data, rewrite.checked);
+      data = null; // Release memory
+      showTables([graph.getRoot()]);
+    };
+  };
+
+  let selectRoot = document.createElement("button");
+  selectRoot.textContent = "Select Root";
+  selectRoot.onclick = function(event) {
+    showTables([graph.getRoot()]);
+  };
+
+  let selectAll = document.createElement("button");
+  selectAll.textContent = "Select All";
+  selectAll.onclick = function(event) {
+    showTables(graph.getAll());
+  };
+
+  let filler = document.createElement("span");
+  filler.style["flex-grow"] = 1;
+
+  let totalSize = document.createElement("span");
+  totalSize.className = "sizeCell";
+  totalSize.textContent = graph ? "" + graph.getTotalSize() : "0";
+
+  let totalPercent = document.createElement("span");
+  totalPercent.className = "sizePercentCell";
+  totalPercent.textContent = prettyPercent(1.0);
+
+  let topBar = document.createElement("div");
+  topBar.className = "headerRow";
+  topBar.style["border"] = "solid 2px";
+  topBar.style["display"] = "flex";
+  topBar.style["flex-direction"] = "row";
+  topBar.style["align-items"] = "center";
+  topBar.appendChild(rewrite);
+  topBar.appendChild(rewriteLabel);
+  topBar.appendChild(input);
+  if (graph) {
+    topBar.appendChild(selectRoot);
+    topBar.appendChild(selectAll);
+    topBar.appendChild(filler);
+    topBar.appendChild(totalSize);
+    topBar.appendChild(totalPercent);
+  }
+
+  let selectionTable = new Table("Selection", labeledNodes, []).div;
+  selectionTable.style["flex-basis"] = "0px";
+  selectionTable.style["flex-grow"] = 1;
+
+  let successorsTable = new Table("Successors", successors, successorEdgeGroups).div;
+  successorsTable.style["flex-basis"] = "0px";
+  successorsTable.style["flex-grow"] = 1;
+
+  let predecessorsTable = new Table("Predecessors", predecessors, predecessorEdgeGroups).div;
+  predecessorsTable.style["flex-basis"] = "0px";
+  predecessorsTable.style["flex-grow"] = 1;
+
+  let help = document.createElement("span");
+  help.textContent =
+      "Create a snapshot profile by passing " +
+      "--write_v8_snapshot_profile_to=example.json to gen_snapshot.";
+
+  let column = document.createElement("div");
+  column.style["height"] = "100%";
+  column.style["display"] = "flex";
+  column.style["flex-direction"] = "column";
+  column.appendChild(topBar);
+  column.appendChild(document.createElement("br"));
+  if (graph) {
+    column.appendChild(selectionTable);
+    column.appendChild(document.createElement("br"));
+    column.appendChild(successorsTable);
+    column.appendChild(document.createElement("br"));
+    column.appendChild(predecessorsTable);
+  } else {
+    column.appendChild(help);
+  }
+
+  setBody(column);
+}
+
+function setBody(div) {
+  let body = document.body;
+  while (body.firstChild) {
+    body.removeChild(body.firstChild);
+  }
+  body.appendChild(div);
+}
+
+let graph = null;
+showTables([]);
diff --git a/runtime/vm/BUILD.gn b/runtime/vm/BUILD.gn
index d018eb1..680ab84 100644
--- a/runtime/vm/BUILD.gn
+++ b/runtime/vm/BUILD.gn
@@ -64,11 +64,9 @@
     extra_deps = [
       # TODO(US-399): Remove time_service specific code when it is no longer
       # necessary.
-      "//garnet/public/lib/component/cpp",
+      "//sdk/lib/sys/cpp",
       "//sdk/fidl/fuchsia.timezone",
 
-      # TODO(zra): When the platform-specific timeline code is moved out to
-      # the embedder, this can go away.
       "//zircon/public/lib/fbl",
       "//zircon/public/lib/trace-engine",
     ]
@@ -85,6 +83,12 @@
 
 library_for_all_configs("libdart_lib") {
   target_type = "source_set"
+  if (is_fuchsia) {
+    extra_deps = [
+      "//zircon/public/lib/fbl",
+      "//zircon/public/lib/trace-engine",
+    ]
+  }
   include_dirs = [ ".." ]
   allsources =
       async_runtime_sources + collection_runtime_sources +
@@ -98,47 +102,68 @@
   nosnapshot_sources = []
 }
 
-compile_platform("vm_legacy_platform") {
-  single_root_scheme = "org-dartlang-sdk"
-  single_root_base = rebase_path("../../")
-  libraries_specification_uri = "org-dartlang-sdk:///sdk/lib/libraries.json"
+template("gen_vm_platform") {
+  assert(defined(invoker.output_postfix),
+         "Must define output postfix (e.g., '_strong'")
+  compile_platform(target_name) {
+    output_postfix = invoker.output_postfix
+    if (defined(invoker.add_implicit_vm_platform_dependency)) {
+      add_implicit_vm_platform_dependency =
+          invoker.add_implicit_vm_platform_dependency
+    }
+    single_root_scheme = "org-dartlang-sdk"
+    single_root_base = rebase_path("../../")
+    libraries_specification_uri = "org-dartlang-sdk:///sdk/lib/libraries.json"
+    outputs = [
+      "$root_out_dir/vm_platform" + output_postfix + ".dill",
+      "$root_out_dir/vm_outline" + output_postfix + ".dill",
+    ]
+    args = [ "dart:core" ]
+    is_product_flag = dart_runtime_mode == "release"
+    allow_causal_async_stacks = !is_product_flag
+    args += [
+      "-Ddart.vm.product=$is_product_flag",
+      "-Ddart.developer.causal_async_stacks=$allow_causal_async_stacks",
+      "-Ddart.isVM=true",
+    ]
 
-  outputs = [
-    "$root_out_dir/vm_platform.dill",
-    "$root_out_dir/vm_outline.dill",
-  ]
-
-  args = [
-    "--legacy-mode",
-    "dart:core",
-  ]
+    if (defined(invoker.exclude_source) && invoker.exclude_source) {
+      args += [ "--exclude-source" ]
+    }
+    if (defined(invoker.legacy) && invoker.legacy) {
+      args += [ "--legacy-mode" ]
+      outline = "vm_outline_strong.dill"
+    } else {
+      outline = "vm_outline" + output_postfix + ".dill"
+    }
+    if (dart_platform_bytecode) {
+      args += [ "--bytecode" ]
+    }
+  }
 }
 
-compile_platform("vm_platform") {
+gen_vm_platform("vm_legacy_platform") {
+  exclude_source = false
+  legacy = true
+  output_postfix = ""
+}
+
+gen_vm_platform("vm_platform") {
   add_implicit_vm_platform_dependency = false
+  exclude_source = false
+  output_postfix = "_strong"
+}
 
-  single_root_scheme = "org-dartlang-sdk"
-  single_root_base = rebase_path("../../")
-  libraries_specification_uri = "org-dartlang-sdk:///sdk/lib/libraries.json"
-
-  outputs = [
-    "$root_out_dir/vm_platform_strong.dill",
-    "$root_out_dir/vm_outline_strong.dill",
-  ]
-
-  args = [
-    "--exclude-source",
-    "dart:core",
-  ]
-
-  if (dart_platform_bytecode) {
-    args += [ "--bytecode" ]
-  }
+gen_vm_platform("vm_platform_stripped") {
+  add_implicit_vm_platform_dependency = false
+  exclude_source = true
+  output_postfix = "_strong_stripped"
 }
 
 group("kernel_platform_files") {
   public_deps = [
     ":vm_legacy_platform",
     ":vm_platform",
+    ":vm_platform_stripped",
   ]
 }
diff --git a/runtime/vm/benchmark_test.cc b/runtime/vm/benchmark_test.cc
index c3e1db3..10ddc29 100644
--- a/runtime/vm/benchmark_test.cc
+++ b/runtime/vm/benchmark_test.cc
@@ -68,7 +68,7 @@
   EXPECT(worked);
 
   Dart_Handle result = bin::DartUtils::PrepareForScriptLoading(false, false);
-  DART_CHECK_VALID(result);
+  EXPECT_VALID(result);
 
   // Setup package root.
   char buffer[2048];
@@ -79,7 +79,7 @@
   Utils::SNPrint(buffer, 2048, packages_path, executable_path, path_separator,
                  path_separator);
   result = bin::DartUtils::SetupPackageRoot(buffer, NULL);
-  DART_CHECK_VALID(result);
+  EXPECT_VALID(result);
 }
 
 void Benchmark::RunAll(const char* executable) {
@@ -313,7 +313,7 @@
 
   Dart_Handle lib = TestCase::LoadTestScript(
       kScriptChars, reinterpret_cast<Dart_NativeEntryResolver>(bm_uda_lookup),
-      USER_TEST_URI, false);
+      RESOLVED_USER_TEST_URI, false);
   Dart_Handle result = Dart_FinalizeLoading(false);
   EXPECT_VALID(result);
 
diff --git a/runtime/vm/bootstrap.cc b/runtime/vm/bootstrap.cc
index fc59b64..8c05417 100644
--- a/runtime/vm/bootstrap.cc
+++ b/runtime/vm/bootstrap.cc
@@ -89,7 +89,7 @@
     const String& msg = String::Handle(String::New(message_buffer, Heap::kOld));
     return ApiError::New(msg, Heap::kOld);
   }
-  kernel::KernelLoader loader(program);
+  kernel::KernelLoader loader(program, /*uri_to_source_table=*/nullptr);
 
   Isolate* isolate = thread->isolate();
 
diff --git a/runtime/vm/bootstrap_natives.h b/runtime/vm/bootstrap_natives.h
index 194a86c..da1dc36 100644
--- a/runtime/vm/bootstrap_natives.h
+++ b/runtime/vm/bootstrap_natives.h
@@ -103,6 +103,7 @@
   V(RegExp_getIsMultiLine, 1)                                                  \
   V(RegExp_getIsCaseSensitive, 1)                                              \
   V(RegExp_getGroupCount, 1)                                                   \
+  V(RegExp_getGroupNameMap, 1)                                                 \
   V(RegExp_ExecuteMatch, 3)                                                    \
   V(RegExp_ExecuteMatchSticky, 3)                                              \
   V(List_new, 2)                                                               \
@@ -211,6 +212,24 @@
   V(TypedData_SetInt32x4, 3)                                                   \
   V(TypedData_GetFloat64x2, 2)                                                 \
   V(TypedData_SetFloat64x2, 3)                                                 \
+  V(TypedDataView_ByteDataView_new, 4)                                         \
+  V(TypedDataView_Int8ArrayView_new, 4)                                        \
+  V(TypedDataView_Uint8ArrayView_new, 4)                                       \
+  V(TypedDataView_Uint8ClampedArrayView_new, 4)                                \
+  V(TypedDataView_Int16ArrayView_new, 4)                                       \
+  V(TypedDataView_Uint16ArrayView_new, 4)                                      \
+  V(TypedDataView_Int32ArrayView_new, 4)                                       \
+  V(TypedDataView_Uint32ArrayView_new, 4)                                      \
+  V(TypedDataView_Int64ArrayView_new, 4)                                       \
+  V(TypedDataView_Uint64ArrayView_new, 4)                                      \
+  V(TypedDataView_Float32ArrayView_new, 4)                                     \
+  V(TypedDataView_Float64ArrayView_new, 4)                                     \
+  V(TypedDataView_Float32x4ArrayView_new, 4)                                   \
+  V(TypedDataView_Int32x4ArrayView_new, 4)                                     \
+  V(TypedDataView_Float64x2ArrayView_new, 4)                                   \
+  V(TypedDataView_length, 1)                                                   \
+  V(TypedDataView_offsetInBytes, 1)                                            \
+  V(TypedDataView_typedData, 1)                                                \
   V(Float32x4_fromDoubles, 5)                                                  \
   V(Float32x4_splat, 2)                                                        \
   V(Float32x4_fromInt32x4Bits, 2)                                              \
@@ -294,11 +313,12 @@
   V(Int32x4_setFlagZ, 2)                                                       \
   V(Int32x4_setFlagW, 2)                                                       \
   V(Int32x4_select, 3)                                                         \
-  V(Isolate_spawnFunction, 10)                                                 \
-  V(Isolate_spawnUri, 12)                                                      \
+  V(Isolate_spawnFunction, 11)                                                 \
+  V(Isolate_spawnUri, 13)                                                      \
   V(Isolate_getPortAndCapabilitiesOfCurrentIsolate, 0)                         \
   V(Isolate_getCurrentRootUriStr, 0)                                           \
   V(Isolate_sendOOB, 2)                                                        \
+  V(Isolate_getDebugName, 1)                                                   \
   V(GrowableList_allocate, 2)                                                  \
   V(GrowableList_getIndexed, 2)                                                \
   V(GrowableList_setIndexed, 3)                                                \
diff --git a/runtime/vm/catch_entry_moves_test.cc b/runtime/vm/catch_entry_moves_test.cc
new file mode 100644
index 0000000..faa41f6
--- /dev/null
+++ b/runtime/vm/catch_entry_moves_test.cc
@@ -0,0 +1,198 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#include <functional>
+#include <utility>
+
+#include "platform/assert.h"
+#include "vm/code_descriptors.h"
+#include "vm/exceptions.h"
+#include "vm/unit_test.h"
+
+namespace dart {
+
+static CatchEntryMove NewMove(intptr_t src, intptr_t dst) {
+  return CatchEntryMove::FromSlot(CatchEntryMove::SourceKind::kTaggedSlot, src,
+                                  dst);
+}
+const auto kA = NewMove(1, 10);
+const auto kB = NewMove(2, 20);
+const auto kC = NewMove(3, 30);
+const auto kD = NewMove(4, 40);
+const auto kE = NewMove(5, 50);
+const auto kX = NewMove(-1, -10);
+
+const CatchEntryMove abcde[] = {kA, kB, kC, kD, kE};
+const CatchEntryMove abcdx[] = {kA, kB, kC, kD, kX};
+const CatchEntryMove xbcde[] = {kX, kB, kC, kD, kE};
+const CatchEntryMove abxde[] = {kA, kB, kX, kD, kE};
+const CatchEntryMove ab[] = {kA, kB};
+const CatchEntryMove de[] = {kD, kE};
+
+struct TestCaseMoves {
+  const CatchEntryMove* moves;
+  const intptr_t count;
+};
+
+void RunTestCaseWithPermutations(const TestCaseMoves* mapping,
+                                 intptr_t* insert_permutation,
+                                 intptr_t count) {
+  CatchEntryMovesMapBuilder b;
+
+  for (intptr_t i = 0; i < count; ++i) {
+    auto expected_moves = mapping[insert_permutation[i]];
+    b.NewMapping(/*pc_offset=*/insert_permutation[i]);
+    for (intptr_t j = 0; j < expected_moves.count; ++j) {
+      b.Append(expected_moves.moves[j]);
+    }
+    b.EndMapping();
+  }
+
+  const auto& bytes = TypedData::Handle(b.FinalizeCatchEntryMovesMap());
+  CatchEntryMovesMapReader reader(bytes);
+
+  for (intptr_t i = 0; i < count; ++i) {
+    auto expected_moves = mapping[i];
+    auto read_moves = reader.ReadMovesForPcOffset(i);
+    EXPECT_EQ(expected_moves.count, read_moves->count());
+    for (intptr_t j = 0; j < expected_moves.count; ++j) {
+      EXPECT(expected_moves.moves[j] == read_moves->At(j));
+    }
+    free(read_moves);
+  }
+}
+
+void RunTestCase(const TestCaseMoves* mapping, intptr_t count) {
+  std::unique_ptr<intptr_t[]> permutation(new intptr_t[count]);
+  for (intptr_t i = 0; i < count; ++i) {
+    permutation[i] = i;
+  }
+
+  std::function<void(intptr_t)> run_all_permutations = [&](intptr_t offset) {
+    if (offset == count) {
+      RunTestCaseWithPermutations(mapping, &permutation[0], count);
+    } else {
+      for (intptr_t i = offset; i < count; ++i) {
+        const intptr_t start = permutation[offset];
+        const intptr_t replacement = permutation[i];
+
+        permutation[offset] = replacement;
+        permutation[i] = start;
+
+        run_all_permutations(offset + 1);
+
+        permutation[offset] = start;
+        permutation[i] = replacement;
+      }
+    }
+  };
+
+  run_all_permutations(0);
+}
+
+ISOLATE_UNIT_TEST_CASE(CatchEntryMoves) {
+  // Common prefix.
+  const TestCaseMoves test1[] = {
+      TestCaseMoves{
+          abcde,
+          ARRAY_SIZE(abcde),
+      },
+      TestCaseMoves{
+          abcdx,
+          ARRAY_SIZE(abcdx),
+      },
+  };
+  RunTestCase(test1, ARRAY_SIZE(test1));
+
+  // Common suffix.
+  const TestCaseMoves test2[] = {
+      TestCaseMoves{
+          abcde,
+          ARRAY_SIZE(abcde),
+      },
+      TestCaseMoves{
+          xbcde,
+          ARRAY_SIZE(xbcde),
+      },
+  };
+  RunTestCase(test2, ARRAY_SIZE(test2));
+
+  // Common prefix and suffix.
+  const TestCaseMoves test3[] = {
+      TestCaseMoves{
+          abcde,
+          ARRAY_SIZE(abcde),
+      },
+      TestCaseMoves{
+          abxde,
+          ARRAY_SIZE(abxde),
+      },
+  };
+  RunTestCase(test3, ARRAY_SIZE(test3));
+
+  // Subset of suffix.
+  const TestCaseMoves test4[] = {
+      TestCaseMoves{
+          abcde,
+          ARRAY_SIZE(abcde),
+      },
+      TestCaseMoves{
+          de,
+          ARRAY_SIZE(de),
+      },
+  };
+  RunTestCase(test4, ARRAY_SIZE(test4));
+
+  // Subset of prefix.
+  const TestCaseMoves test5[] = {
+      TestCaseMoves{
+          abcde,
+          ARRAY_SIZE(abcde),
+      },
+      TestCaseMoves{
+          ab,
+          ARRAY_SIZE(ab),
+      },
+  };
+  RunTestCase(test5, ARRAY_SIZE(test5));
+
+  // All moves (with duplicates).
+  const TestCaseMoves test6[] = {
+      TestCaseMoves{
+          abcde,
+          ARRAY_SIZE(abcde),
+      },
+      TestCaseMoves{
+          abcde,
+          ARRAY_SIZE(abcde),
+      },
+      TestCaseMoves{
+          abcdx,
+          ARRAY_SIZE(abcdx),
+      },
+      TestCaseMoves{
+          xbcde,
+          ARRAY_SIZE(xbcde),
+      },
+      TestCaseMoves{
+          abxde,
+          ARRAY_SIZE(abxde),
+      },
+      TestCaseMoves{
+          ab,
+          ARRAY_SIZE(ab),
+      },
+      TestCaseMoves{
+          de,
+          ARRAY_SIZE(de),
+      },
+      TestCaseMoves{
+          de,
+          ARRAY_SIZE(de),
+      },
+  };
+  RunTestCase(test6, ARRAY_SIZE(test6));
+}
+
+}  // namespace dart
diff --git a/runtime/vm/class_finalizer.cc b/runtime/vm/class_finalizer.cc
index a60217b..ba2dc60 100644
--- a/runtime/vm/class_finalizer.cc
+++ b/runtime/vm/class_finalizer.cc
@@ -954,7 +954,7 @@
     field.SetFieldType(type);
     if (track_exactness && IsPotentialExactGeneric(type)) {
       field.set_static_type_exactness_state(
-          StaticTypeExactnessState::Unitialized());
+          StaticTypeExactnessState::Uninitialized());
     }
   }
   // Finalize function signatures and check for conflicts in super classes and
@@ -1088,19 +1088,6 @@
     interface_class.AddDirectImplementor(cls,
                                          /* is_mixin = */ i == mixin_index);
   }
-
-  if (FLAG_use_cha_deopt) {
-    // Invalidate all CHA code which depends on knowing the implementors of any
-    // of the interfaces implemented by this new class.
-    ClassTable* class_table = thread->isolate()->class_table();
-    GrowableArray<intptr_t> cids;
-    InterfaceFinder finder(zone, class_table, &cids);
-    finder.FindAllInterfaces(cls);
-    for (intptr_t j = 0; j < cids.length(); ++j) {
-      interface_class = class_table->At(cids[j]);
-      interface_class.DisableCHAImplementorUsers();
-    }
-  }
 }
 
 void ClassFinalizer::FinalizeClass(const Class& cls) {
@@ -1169,6 +1156,22 @@
     RemoveCHAOptimizedCode(cls, cids);
   }
 
+  if (FLAG_use_cha_deopt) {
+    Zone* zone = thread->zone();
+    ClassTable* class_table = thread->isolate()->class_table();
+    auto& interface_class = Class::Handle(zone);
+
+    // We scan every interface this [cls] implements and invalidate all CHA code
+    // which depends on knowing the implementors of that interface.
+    GrowableArray<intptr_t> cids;
+    InterfaceFinder finder(zone, class_table, &cids);
+    finder.FindAllInterfaces(cls);
+    for (intptr_t j = 0; j < cids.length(); ++j) {
+      interface_class = class_table->At(cids[j]);
+      interface_class.DisableCHAImplementorUsers();
+    }
+  }
+
   if (cls.is_enum_class()) {
     AllocateEnumValues(cls);
   }
@@ -1178,6 +1181,14 @@
   ASSERT(Thread::Current()->IsMutatorThread());
   LongJumpScope jump;
   if (setjmp(*jump.Set()) == 0) {
+    // TODO(36584) : We expect is_type_finalized to be true for all classes
+    // here, but with eager reading of the constant table we get into
+    // situations where we see classes whose types have not been finalized yet,
+    // the real solution is to implement lazy evaluation of constants. This is
+    // a temporary workaround until lazy evaluation is implemented.
+    if (!cls.is_type_finalized()) {
+      FinalizeTypesInClass(cls);
+    }
     ClassFinalizer::FinalizeClass(cls);
     return Error::null();
   } else {
@@ -1225,6 +1236,12 @@
   sentinel.SetStaticValue(enum_value, true);
   sentinel.RecordStore(enum_value);
 
+  const GrowableObjectArray& pending_unevaluated_const_fields =
+      GrowableObjectArray::Handle(zone,
+                                  thread->isolate()
+                                      ->object_store()
+                                      ->pending_unevaluated_const_fields());
+
   if (enum_cls.kernel_offset() > 0) {
     Error& error = Error::Handle(zone);
     for (intptr_t i = 0; i < fields.Length(); i++) {
@@ -1234,12 +1251,19 @@
         continue;
       }
       // The eager evaluation of the enum values is required for hot-reload (see
-      // commit e3ecc87).
+      // commit e3ecc87). However, while busy loading the constant table, we
+      // need to postpone this evaluation until table is done.
       if (!FLAG_precompiled_mode) {
         if (field.IsUninitialized()) {
-          error = field.EvaluateInitializer();
-          if (!error.IsNull()) {
-            ReportError(error);
+          if (pending_unevaluated_const_fields.IsNull()) {
+            // Evaluate right away.
+            error = field.Initialize();
+            if (!error.IsNull()) {
+              ReportError(error);
+            }
+          } else {
+            // Postpone evaluation until we have a constant table.
+            pending_unevaluated_const_fields.Add(field);
           }
         }
       }
@@ -1387,52 +1411,6 @@
   Error& error = Error::Handle(zone);
   TypeParameter& type_param = TypeParameter::Handle(zone);
 
-  // First verify field offsets of all the TypedDataView classes.
-  for (intptr_t cid = kTypedDataInt8ArrayViewCid;
-       cid <= kTypedDataFloat32x4ArrayViewCid; cid++) {
-    cls = class_table.At(cid);  // Get the TypedDataView class.
-    error = cls.EnsureIsFinalized(thread);
-    ASSERT(error.IsNull());
-    cls = cls.SuperClass();  // Get it's super class '_TypedListView'.
-    cls = cls.SuperClass();
-    fields_array ^= cls.fields();
-    ASSERT(fields_array.Length() == TypedDataView::NumberOfFields());
-    field ^= fields_array.At(0);
-    ASSERT(field.Offset() == TypedDataView::data_offset());
-    name ^= field.name();
-    expected_name ^= String::New("_typedData");
-    ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name));
-    field ^= fields_array.At(1);
-    ASSERT(field.Offset() == TypedDataView::offset_in_bytes_offset());
-    name ^= field.name();
-    ASSERT(name.Equals("offsetInBytes"));
-    field ^= fields_array.At(2);
-    ASSERT(field.Offset() == TypedDataView::length_offset());
-    name ^= field.name();
-    ASSERT(name.Equals("length"));
-  }
-
-  // Now verify field offsets of '_ByteDataView' class.
-  cls = class_table.At(kByteDataViewCid);
-  error = cls.EnsureIsFinalized(thread);
-  ASSERT(error.IsNull());
-  fields_array ^= cls.fields();
-  ASSERT(fields_array.Length() == TypedDataView::NumberOfFields());
-  field ^= fields_array.At(0);
-  ASSERT(field.Offset() == TypedDataView::data_offset());
-  name ^= field.name();
-  expected_name ^= String::New("_typedData");
-  ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name));
-  field ^= fields_array.At(1);
-  ASSERT(field.Offset() == TypedDataView::offset_in_bytes_offset());
-  name ^= field.name();
-  expected_name ^= String::New("_offset");
-  ASSERT(String::EqualsIgnoringPrivateKey(name, expected_name));
-  field ^= fields_array.At(2);
-  ASSERT(field.Offset() == TypedDataView::length_offset());
-  name ^= field.name();
-  ASSERT(name.Equals("length"));
-
   // Now verify field offsets of '_ByteBuffer' class.
   cls = class_table.At(kByteBufferCid);
   error = cls.EnsureIsFinalized(thread);
@@ -1532,6 +1510,7 @@
   RemapClassIds(old_to_new_cid);
   delete[] old_to_new_cid;
   RehashTypes();  // Types use cid's as part of their hashes.
+  I->RehashConstants();  // Const objects use cid's as part of their hashes.
 }
 
 class CidRewriteVisitor : public ObjectVisitor {
diff --git a/runtime/vm/class_id.h b/runtime/vm/class_id.h
index ddbd7a0..9acabba 100644
--- a/runtime/vm/class_id.h
+++ b/runtime/vm/class_id.h
@@ -64,8 +64,10 @@
   V(Float32x4)                                                                 \
   V(Int32x4)                                                                   \
   V(Float64x2)                                                                 \
+  V(TypedDataBase)                                                             \
   V(TypedData)                                                                 \
   V(ExternalTypedData)                                                         \
+  V(TypedDataView)                                                             \
   V(Pointer)                                                                   \
   V(DynamicLibrary)                                                            \
   V(Capability)                                                                \
@@ -176,25 +178,19 @@
   CLASS_LIST(DEFINE_OBJECT_KIND)
 #undef DEFINE_OBJECT_KIND
 
-#define DEFINE_OBJECT_KIND(clazz) kFfi##clazz##Cid,
-      CLASS_LIST_FFI(DEFINE_OBJECT_KIND)
-#undef DEFINE_OBJECT_KIND
-
 // clang-format off
-#define DEFINE_OBJECT_KIND(clazz) kTypedData##clazz##Cid,
-  CLASS_LIST_TYPED_DATA(DEFINE_OBJECT_KIND)
+#define DEFINE_OBJECT_KIND(clazz) kFfi##clazz##Cid,
+  CLASS_LIST_FFI(DEFINE_OBJECT_KIND)
 #undef DEFINE_OBJECT_KIND
 
-#define DEFINE_OBJECT_KIND(clazz) kTypedData##clazz##ViewCid,
+#define DEFINE_OBJECT_KIND(clazz)                                              \
+  kTypedData##clazz##Cid,                                                      \
+  kTypedData##clazz##ViewCid,                                                  \
+  kExternalTypedData##clazz##Cid,
   CLASS_LIST_TYPED_DATA(DEFINE_OBJECT_KIND)
 #undef DEFINE_OBJECT_KIND
-
   kByteDataViewCid,
 
-#define DEFINE_OBJECT_KIND(clazz) kExternalTypedData##clazz##Cid,
-  CLASS_LIST_TYPED_DATA(DEFINE_OBJECT_KIND)
-#undef DEFINE_OBJECT_KIND
-
   kByteBufferCid,
   // clang-format on
 
@@ -207,6 +203,11 @@
   kNumPredefinedCids,
 };
 
+// Keep these in sync with the cid numbering above.
+const int kTypedDataCidRemainderInternal = 0;
+const int kTypedDataCidRemainderView = 1;
+const int kTypedDataCidRemainderExternal = 2;
+
 }  // namespace dart
 
 #endif  // RUNTIME_VM_CLASS_ID_H_
diff --git a/runtime/vm/class_table.cc b/runtime/vm/class_table.cc
index 6da5677..70ad37c 100644
--- a/runtime/vm/class_table.cc
+++ b/runtime/vm/class_table.cc
@@ -22,7 +22,6 @@
       table_(NULL),
       old_tables_(new MallocGrowableArray<ClassAndSize*>()) {
   NOT_IN_PRODUCT(class_heap_stats_table_ = NULL);
-  NOT_IN_PRODUCT(predefined_class_heap_stats_table_ = NULL);
   if (Dart::vm_isolate() == NULL) {
     capacity_ = initial_capacity_;
     table_ = reinterpret_cast<ClassAndSize*>(
@@ -41,20 +40,12 @@
     table_[kForwardingCorpse] = vm_class_table->PairAt(kForwardingCorpse);
     table_[kDynamicCid] = vm_class_table->PairAt(kDynamicCid);
     table_[kVoidCid] = vm_class_table->PairAt(kVoidCid);
-
-#ifndef PRODUCT
-    class_heap_stats_table_ = reinterpret_cast<ClassHeapStats*>(
-        calloc(capacity_, sizeof(ClassHeapStats)));  // NOLINT
-    for (intptr_t i = 0; i < capacity_; i++) {
-      class_heap_stats_table_[i].Initialize();
-    }
-#endif  // !PRODUCT
   }
 #ifndef PRODUCT
-  predefined_class_heap_stats_table_ = reinterpret_cast<ClassHeapStats*>(
-      calloc(kNumPredefinedCids, sizeof(ClassHeapStats)));  // NOLINT
-  for (intptr_t i = 0; i < kNumPredefinedCids; i++) {
-    predefined_class_heap_stats_table_[i].Initialize();
+  class_heap_stats_table_ = reinterpret_cast<ClassHeapStats*>(
+      calloc(capacity_, sizeof(ClassHeapStats)));  // NOLINT
+  for (intptr_t i = 0; i < capacity_; i++) {
+    class_heap_stats_table_[i].Initialize();
   }
 #endif  // !PRODUCT
 }
@@ -65,7 +56,6 @@
       table_(original->table_),
       old_tables_(NULL) {
   NOT_IN_PRODUCT(class_heap_stats_table_ = NULL);
-  NOT_IN_PRODUCT(predefined_class_heap_stats_table_ = NULL);
 }
 
 ClassTable::~ClassTable() {
@@ -73,11 +63,9 @@
     FreeOldTables();
     delete old_tables_;
     free(table_);
-    NOT_IN_PRODUCT(free(predefined_class_heap_stats_table_));
     NOT_IN_PRODUCT(free(class_heap_stats_table_));
   } else {
     // This instance was a shallow copy. It doesn't own any memory.
-    NOT_IN_PRODUCT(ASSERT(predefined_class_heap_stats_table_ == NULL));
     NOT_IN_PRODUCT(ASSERT(class_heap_stats_table_ == NULL));
   }
 }
@@ -93,18 +81,6 @@
   }
 }
 
-#ifndef PRODUCT
-void ClassTable::SetTraceAllocationFor(intptr_t cid, bool trace) {
-  ClassHeapStats* stats = PreliminaryStatsAt(cid);
-  stats->set_trace_allocation(trace);
-}
-
-bool ClassTable::TraceAllocationFor(intptr_t cid) {
-  ClassHeapStats* stats = PreliminaryStatsAt(cid);
-  return stats->trace_allocation();
-}
-#endif  // !PRODUCT
-
 void ClassTable::Register(const Class& cls) {
   ASSERT(Thread::Current()->IsMutatorThread());
   intptr_t index = cls.id();
@@ -319,11 +295,15 @@
   pre_gc.new_size = post_gc.new_size + recent.new_size;
   pre_gc.new_external_size =
       post_gc.new_external_size + recent.new_external_size;
+  pre_gc.old_external_size =
+      post_gc.old_external_size + recent.old_external_size;
   // Accumulate allocations.
   accumulated.new_count += recent.new_count - last_reset.new_count;
   accumulated.new_size += recent.new_size - last_reset.new_size;
   accumulated.new_external_size +=
       recent.new_external_size - last_reset.new_external_size;
+  accumulated.old_external_size +=
+      recent.old_external_size - last_reset.old_external_size;
   last_reset.ResetNew();
   post_gc.ResetNew();
   recent.ResetNew();
@@ -337,11 +317,15 @@
   pre_gc.old_size = post_gc.old_size + recent.old_size;
   pre_gc.old_external_size =
       post_gc.old_external_size + recent.old_external_size;
+  pre_gc.new_external_size =
+      post_gc.new_external_size + recent.new_external_size;
   // Accumulate allocations.
   accumulated.old_count += recent.old_count - last_reset.old_count;
   accumulated.old_size += recent.old_size - last_reset.old_size;
   accumulated.old_external_size +=
       recent.old_external_size - last_reset.old_external_size;
+  accumulated.new_external_size +=
+      recent.new_external_size - last_reset.new_external_size;
   last_reset.ResetOld();
   post_gc.ResetOld();
   recent.ResetOld();
@@ -421,18 +405,11 @@
   obj->AddProperty("promotedBytes", promoted_size);
 }
 
-void ClassTable::UpdateAllocatedNew(intptr_t cid, intptr_t size) {
+void ClassTable::UpdateAllocatedOldGC(intptr_t cid, intptr_t size) {
   ClassHeapStats* stats = PreliminaryStatsAt(cid);
   ASSERT(stats != NULL);
   ASSERT(size != 0);
-  stats->recent.AddNew(size);
-}
-
-void ClassTable::UpdateAllocatedOld(intptr_t cid, intptr_t size) {
-  ClassHeapStats* stats = PreliminaryStatsAt(cid);
-  ASSERT(stats != NULL);
-  ASSERT(size != 0);
-  stats->recent.AddOld(size);
+  stats->recent.AddOldGC(size);
 }
 
 void ClassTable::UpdateAllocatedExternalNew(intptr_t cid, intptr_t size) {
@@ -451,15 +428,6 @@
   return !RawObject::IsVariableSizeClassId(cid);
 }
 
-ClassHeapStats* ClassTable::PreliminaryStatsAt(intptr_t cid) {
-  ASSERT(cid > 0);
-  if (cid < kNumPredefinedCids) {
-    return &predefined_class_heap_stats_table_[cid];
-  }
-  ASSERT(cid < top_);
-  return &class_heap_stats_table_[cid];
-}
-
 ClassHeapStats* ClassTable::StatsWithUpdatedSize(intptr_t cid) {
   if (!HasValidClassAt(cid) || (cid == kFreeListElement) ||
       (cid == kForwardingCorpse) || (cid == kSmiCid)) {
@@ -479,41 +447,25 @@
 }
 
 void ClassTable::ResetCountersOld() {
-  for (intptr_t i = 0; i < kNumPredefinedCids; i++) {
-    predefined_class_heap_stats_table_[i].ResetAtOldGC();
-  }
-  for (intptr_t i = kNumPredefinedCids; i < top_; i++) {
+  for (intptr_t i = 0; i < top_; i++) {
     class_heap_stats_table_[i].ResetAtOldGC();
   }
 }
 
 void ClassTable::ResetCountersNew() {
-  for (intptr_t i = 0; i < kNumPredefinedCids; i++) {
-    predefined_class_heap_stats_table_[i].ResetAtNewGC();
-  }
-  for (intptr_t i = kNumPredefinedCids; i < top_; i++) {
+  for (intptr_t i = 0; i < top_; i++) {
     class_heap_stats_table_[i].ResetAtNewGC();
   }
 }
 
 void ClassTable::UpdatePromoted() {
-  for (intptr_t i = 0; i < kNumPredefinedCids; i++) {
-    predefined_class_heap_stats_table_[i].UpdatePromotedAfterNewGC();
-  }
-  for (intptr_t i = kNumPredefinedCids; i < top_; i++) {
+  for (intptr_t i = 0; i < top_; i++) {
     class_heap_stats_table_[i].UpdatePromotedAfterNewGC();
   }
 }
 
-ClassHeapStats** ClassTable::TableAddressFor(intptr_t cid) {
-  return (cid < kNumPredefinedCids) ? &predefined_class_heap_stats_table_
-                                    : &class_heap_stats_table_;
-}
-
 intptr_t ClassTable::TableOffsetFor(intptr_t cid) {
-  return (cid < kNumPredefinedCids)
-             ? OFFSET_OF(ClassTable, predefined_class_heap_stats_table_)
-             : OFFSET_OF(ClassTable, class_heap_stats_table_);
+  return OFFSET_OF(ClassTable, class_heap_stats_table_);
 }
 
 intptr_t ClassTable::ClassOffsetFor(intptr_t cid) {
@@ -603,6 +555,13 @@
   stats->post_gc.AddNew(size);
 }
 
+void ClassTable::UpdateLiveNewGC(intptr_t cid, intptr_t size) {
+  ClassHeapStats* stats = PreliminaryStatsAt(cid);
+  ASSERT(stats != NULL);
+  ASSERT(size >= 0);
+  stats->post_gc.AddNewGC(size);
+}
+
 void ClassTable::UpdateLiveOldExternal(intptr_t cid, intptr_t size) {
   ClassHeapStats* stats = PreliminaryStatsAt(cid);
   ASSERT(stats != NULL);
diff --git a/runtime/vm/class_table.h b/runtime/vm/class_table.h
index bbf55b9..fd2bdc1 100644
--- a/runtime/vm/class_table.h
+++ b/runtime/vm/class_table.h
@@ -61,6 +61,7 @@
     new_count = 0;
     new_size = 0;
     new_external_size = 0;
+    old_external_size = 0;
   }
 
   void AddNew(T size) {
@@ -68,6 +69,11 @@
     AtomicOperations::IncrementBy(&new_size, size);
   }
 
+  void AddNewGC(T size) {
+    new_count += 1;
+    new_size += size;
+  }
+
   void AddNewExternal(T size) {
     AtomicOperations::IncrementBy(&new_external_size, size);
   }
@@ -76,6 +82,7 @@
     old_count = 0;
     old_size = 0;
     old_external_size = 0;
+    new_external_size = 0;
   }
 
   void AddOld(T size, T count = 1) {
@@ -83,6 +90,11 @@
     AtomicOperations::IncrementBy(&old_size, size);
   }
 
+  void AddOldGC(T size, T count = 1) {
+    old_count += count;
+    old_size += size;
+  }
+
   void AddOldExternal(T size) {
     AtomicOperations::IncrementBy(&old_external_size, size);
   }
@@ -249,9 +261,19 @@
 
 #ifndef PRODUCT
   // Called whenever a class is allocated in the runtime.
-  void UpdateAllocatedNew(intptr_t cid, intptr_t size);
-  void UpdateAllocatedOld(intptr_t cid, intptr_t size);
-
+  void UpdateAllocatedNew(intptr_t cid, intptr_t size) {
+    ClassHeapStats* stats = PreliminaryStatsAt(cid);
+    ASSERT(stats != NULL);
+    ASSERT(size != 0);
+    stats->recent.AddNew(size);
+  }
+  void UpdateAllocatedOld(intptr_t cid, intptr_t size) {
+    ClassHeapStats* stats = PreliminaryStatsAt(cid);
+    ASSERT(stats != NULL);
+    ASSERT(size != 0);
+    stats->recent.AddOld(size);
+  }
+  void UpdateAllocatedOldGC(intptr_t cid, intptr_t size);
   void UpdateAllocatedExternalNew(intptr_t cid, intptr_t size);
   void UpdateAllocatedExternalOld(intptr_t cid, intptr_t size);
 
@@ -263,7 +285,6 @@
   void UpdatePromoted();
 
   // Used by the generated code.
-  ClassHeapStats** TableAddressFor(intptr_t cid);
   static intptr_t TableOffsetFor(intptr_t cid);
 
   // Used by the generated code.
@@ -281,21 +302,29 @@
   void ResetAllocationAccumulators();
 
   void PrintToJSONObject(JSONObject* object);
+
+  void SetTraceAllocationFor(intptr_t cid, bool trace) {
+    ClassHeapStats* stats = PreliminaryStatsAt(cid);
+    stats->set_trace_allocation(trace);
+  }
+  bool TraceAllocationFor(intptr_t cid) {
+    ClassHeapStats* stats = PreliminaryStatsAt(cid);
+    return stats->trace_allocation();
+  }
 #endif  // !PRODUCT
 
   void AddOldTable(ClassAndSize* old_table);
   // Deallocates table copies. Do not call during concurrent access to table.
   void FreeOldTables();
 
-  void SetTraceAllocationFor(intptr_t cid, bool trace);
-  bool TraceAllocationFor(intptr_t cid);
 
  private:
   friend class GCMarker;
   friend class MarkingWeakVisitor;
-  friend class ScavengerVisitor;
+  friend class Scavenger;
   friend class ScavengerWeakVisitor;
   friend class ClassHeapStatsTestHelper;
+  friend class HeapTestsHelper;
   static const int initial_capacity_ = 512;
   static const int capacity_increment_ = 256;
 
@@ -310,12 +339,16 @@
 
 #ifndef PRODUCT
   ClassHeapStats* class_heap_stats_table_;
-  ClassHeapStats* predefined_class_heap_stats_table_;
 
   // May not have updated size for variable size classes.
-  ClassHeapStats* PreliminaryStatsAt(intptr_t cid);
+  ClassHeapStats* PreliminaryStatsAt(intptr_t cid) {
+    ASSERT(cid > 0);
+    ASSERT(cid < top_);
+    return &class_heap_stats_table_[cid];
+  }
   void UpdateLiveOld(intptr_t cid, intptr_t size, intptr_t count = 1);
   void UpdateLiveNew(intptr_t cid, intptr_t size);
+  void UpdateLiveNewGC(intptr_t cid, intptr_t size);
   void UpdateLiveOldExternal(intptr_t cid, intptr_t size);
   void UpdateLiveNewExternal(intptr_t cid, intptr_t size);
 #endif  // !PRODUCT
diff --git a/runtime/vm/clustered_snapshot.cc b/runtime/vm/clustered_snapshot.cc
index 2f07321..5f0accb 100644
--- a/runtime/vm/clustered_snapshot.cc
+++ b/runtime/vm/clustered_snapshot.cc
@@ -61,8 +61,7 @@
 
 static RawObject* AllocateUninitialized(PageSpace* old_space, intptr_t size) {
   ASSERT(Utils::IsAligned(size, kObjectAlignment));
-  uword address =
-      old_space->TryAllocateDataBumpLocked(size, PageSpace::kForceGrowth);
+  uword address = old_space->TryAllocateDataBumpLocked(size);
   if (address == 0) {
     OUT_OF_MEMORY();
   }
@@ -72,14 +71,12 @@
 void Deserializer::InitializeHeader(RawObject* raw,
                                     intptr_t class_id,
                                     intptr_t size,
-                                    bool is_vm_isolate,
                                     bool is_canonical) {
   ASSERT(Utils::IsAligned(size, kObjectAlignment));
   uint32_t tags = 0;
   tags = RawObject::ClassIdTag::update(class_id, tags);
   tags = RawObject::SizeTag::update(size, tags);
-  tags = RawObject::VMHeapObjectTag::update(is_vm_isolate, tags);
-  tags = RawObject::CanonicalObjectTag::update(is_canonical, tags);
+  tags = RawObject::CanonicalBit::update(is_canonical, tags);
   tags = RawObject::OldBit::update(true, tags);
   tags = RawObject::OldAndNotMarkedBit::update(true, tags);
   tags = RawObject::OldAndNotRememberedBit::update(true, tags);
@@ -225,7 +222,6 @@
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
     ClassTable* table = d->isolate()->class_table();
 
     for (intptr_t id = predefined_start_index_; id < predefined_stop_index_;
@@ -256,8 +252,7 @@
 
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawClass* cls = reinterpret_cast<RawClass*>(d->Ref(id));
-      Deserializer::InitializeHeader(cls, kClassCid, Class::InstanceSize(),
-                                     is_vm_object);
+      Deserializer::InitializeHeader(cls, kClassCid, Class::InstanceSize());
       ReadFromTo(cls);
 
       intptr_t class_id = d->ReadCid();
@@ -361,8 +356,6 @@
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
-
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawTypeArguments* type_args =
           reinterpret_cast<RawTypeArguments*>(d->Ref(id));
@@ -370,7 +363,7 @@
       bool is_canonical = d->Read<bool>();
       Deserializer::InitializeHeader(type_args, kTypeArgumentsCid,
                                      TypeArguments::InstanceSize(length),
-                                     is_vm_object, is_canonical);
+                                     is_canonical);
       type_args->ptr()->length_ = Smi::New(length);
       type_args->ptr()->hash_ = Smi::New(d->Read<int32_t>());
       type_args->ptr()->instantiations_ =
@@ -439,12 +432,10 @@
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
-
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawPatchClass* cls = reinterpret_cast<RawPatchClass*>(d->Ref(id));
       Deserializer::InitializeHeader(cls, kPatchClassCid,
-                                     PatchClass::InstanceSize(), is_vm_object);
+                                     PatchClass::InstanceSize());
       ReadFromTo(cls);
 #if !defined(DART_PRECOMPILED_RUNTIME)
       if (d->kind() != Snapshot::kFullAOT) {
@@ -511,7 +502,7 @@
       if (kind != Snapshot::kFullAOT) {
         s->WriteTokenPosition(func->ptr()->token_pos_);
         s->WriteTokenPosition(func->ptr()->end_token_pos_);
-        s->Write<int32_t>(func->ptr()->kernel_offset_);
+        s->Write<uint32_t>(func->ptr()->binary_declaration_);
       }
 #endif
       s->Write<uint32_t>(func->ptr()->packed_fields_);
@@ -541,12 +532,11 @@
 
   void ReadFill(Deserializer* d) {
     Snapshot::Kind kind = d->kind();
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
 
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawFunction* func = reinterpret_cast<RawFunction*>(d->Ref(id));
       Deserializer::InitializeHeader(func, kFunctionCid,
-                                     Function::InstanceSize(), is_vm_object);
+                                     Function::InstanceSize());
       ReadFromTo(func);
 
       if (kind == Snapshot::kFull) {
@@ -572,7 +562,7 @@
       if (kind != Snapshot::kFullAOT) {
         func->ptr()->token_pos_ = d->ReadTokenPosition();
         func->ptr()->end_token_pos_ = d->ReadTokenPosition();
-        func->ptr()->kernel_offset_ = d->Read<int32_t>();
+        func->ptr()->binary_declaration_ = d->Read<uint32_t>();
       }
 #endif
       func->ptr()->packed_fields_ = d->Read<uint32_t>();
@@ -700,12 +690,10 @@
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
-
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawClosureData* data = reinterpret_cast<RawClosureData*>(d->Ref(id));
       Deserializer::InitializeHeader(data, kClosureDataCid,
-                                     ClosureData::InstanceSize(), is_vm_object);
+                                     ClosureData::InstanceSize());
       if (d->kind() == Snapshot::kFullAOT) {
         data->ptr()->context_scope_ = ContextScope::null();
       } else {
@@ -772,12 +760,10 @@
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
-
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawSignatureData* data = reinterpret_cast<RawSignatureData*>(d->Ref(id));
-      Deserializer::InitializeHeader(
-          data, kSignatureDataCid, SignatureData::InstanceSize(), is_vm_object);
+      Deserializer::InitializeHeader(data, kSignatureDataCid,
+                                     SignatureData::InstanceSize());
       ReadFromTo(data);
     }
   }
@@ -837,14 +823,11 @@
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
-
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawRedirectionData* data =
           reinterpret_cast<RawRedirectionData*>(d->Ref(id));
       Deserializer::InitializeHeader(data, kRedirectionDataCid,
-                                     RedirectionData::InstanceSize(),
-                                     is_vm_object);
+                                     RedirectionData::InstanceSize());
       ReadFromTo(data);
     }
   }
@@ -882,7 +865,7 @@
       s->Push(field->ptr()->value_.offset_);
     }
     // Write out the initializer function
-    s->Push(field->ptr()->initializer_);
+    s->Push(field->ptr()->initializer_function_);
     if (kind != Snapshot::kFullAOT) {
       // Write out the saved initial value
       s->Push(field->ptr()->saved_initial_value_);
@@ -932,8 +915,8 @@
       } else {
         WriteField(field, value_.offset_);
       }
-      // Write out the initializer function or saved initial value.
-      WriteField(field, initializer_);
+      // Write out the initializer function and initial value if not in AOT.
+      WriteField(field, initializer_function_);
       if (kind != Snapshot::kFullAOT) {
         WriteField(field, saved_initial_value_);
       }
@@ -952,7 +935,7 @@
         s->WriteCid(field->ptr()->is_nullable_);
         s->Write<int8_t>(field->ptr()->static_type_exactness_state_);
 #if !defined(DART_PRECOMPILED_RUNTIME)
-        s->Write<int32_t>(field->ptr()->kernel_offset_);
+        s->Write<uint32_t>(field->ptr()->binary_declaration_);
 #endif
       }
       s->Write<uint16_t>(field->ptr()->kind_bits_);
@@ -981,12 +964,10 @@
 
   void ReadFill(Deserializer* d) {
     Snapshot::Kind kind = d->kind();
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
 
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawField* field = reinterpret_cast<RawField*>(d->Ref(id));
-      Deserializer::InitializeHeader(field, kFieldCid, Field::InstanceSize(),
-                                     is_vm_object);
+      Deserializer::InitializeHeader(field, kFieldCid, Field::InstanceSize());
       ReadFromTo(field);
       if (kind != Snapshot::kFullAOT) {
         field->ptr()->token_pos_ = d->ReadTokenPosition();
@@ -995,7 +976,7 @@
         field->ptr()->is_nullable_ = d->ReadCid();
         field->ptr()->static_type_exactness_state_ = d->Read<int8_t>();
 #if !defined(DART_PRECOMPILED_RUNTIME)
-        field->ptr()->kernel_offset_ = d->Read<int32_t>();
+        field->ptr()->binary_declaration_ = d->Read<uint32_t>();
 #endif
       }
       field->ptr()->kind_bits_ = d->Read<uint16_t>();
@@ -1080,12 +1061,10 @@
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
-
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawScript* script = reinterpret_cast<RawScript*>(d->Ref(id));
-      Deserializer::InitializeHeader(script, kScriptCid, Script::InstanceSize(),
-                                     is_vm_object);
+      Deserializer::InitializeHeader(script, kScriptCid,
+                                     Script::InstanceSize());
       ReadFromTo(script);
       script->ptr()->line_offset_ = d->Read<int32_t>();
       script->ptr()->col_offset_ = d->Read<int32_t>();
@@ -1156,12 +1135,9 @@
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
-
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawLibrary* lib = reinterpret_cast<RawLibrary*>(d->Ref(id));
-      Deserializer::InitializeHeader(lib, kLibraryCid, Library::InstanceSize(),
-                                     is_vm_object);
+      Deserializer::InitializeHeader(lib, kLibraryCid, Library::InstanceSize());
       ReadFromTo(lib);
       lib->ptr()->native_entry_resolver_ = NULL;
       lib->ptr()->native_entry_symbol_resolver_ = NULL;
@@ -1232,12 +1208,10 @@
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
-
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawNamespace* ns = reinterpret_cast<RawNamespace*>(d->Ref(id));
       Deserializer::InitializeHeader(ns, kNamespaceCid,
-                                     Namespace::InstanceSize(), is_vm_object);
+                                     Namespace::InstanceSize());
       ReadFromTo(ns);
     }
   }
@@ -1299,14 +1273,11 @@
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
-
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawKernelProgramInfo* info =
           reinterpret_cast<RawKernelProgramInfo*>(d->Ref(id));
       Deserializer::InitializeHeader(info, kKernelProgramInfoCid,
-                                     KernelProgramInfo::InstanceSize(),
-                                     is_vm_object);
+                                     KernelProgramInfo::InstanceSize());
       ReadFromTo(info);
     }
   }
@@ -1433,8 +1404,6 @@
   ~CodeDeserializationCluster() {}
 
   void ReadAlloc(Deserializer* d) {
-    const bool is_vm_object = d->isolate() == Dart::vm_isolate();
-
     start_index_ = d->next_index();
     PageSpace* old_space = d->heap()->old_space();
     const intptr_t count = d->ReadUnsigned();
@@ -1449,7 +1418,7 @@
       code_order = static_cast<RawArray*>(
           AllocateUninitialized(old_space, Array::InstanceSize(count)));
       Deserializer::InitializeHeader(code_order, kArrayCid,
-                                     Array::InstanceSize(count), is_vm_object,
+                                     Array::InstanceSize(count),
                                      /*is_canonical=*/false);
       code_order->ptr()->type_arguments_ = TypeArguments::null();
       code_order->ptr()->length_ = Smi::New(code_order_length);
@@ -1472,12 +1441,9 @@
   }
 
   void ReadFill(Deserializer* d) {
-    const bool is_vm_object = d->isolate() == Dart::vm_isolate();
-
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawCode* code = reinterpret_cast<RawCode*>(d->Ref(id));
-      Deserializer::InitializeHeader(code, kCodeCid, Code::InstanceSize(0),
-                                     is_vm_object);
+      Deserializer::InitializeHeader(code, kCodeCid, Code::InstanceSize(0));
 
       RawInstructions* instr = d->ReadInstructions();
 
@@ -1601,12 +1567,11 @@
 
   void ReadFill(Deserializer* d) {
     ASSERT(d->kind() == Snapshot::kFullJIT);
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
 
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawBytecode* bytecode = reinterpret_cast<RawBytecode*>(d->Ref(id));
       Deserializer::InitializeHeader(bytecode, kBytecodeCid,
-                                     Bytecode::InstanceSize(), is_vm_object);
+                                     Bytecode::InstanceSize());
       bytecode->ptr()->instructions_ = 0;
       bytecode->ptr()->instructions_size_ = d->Read<int32_t>();
       ReadFromTo(bytecode);
@@ -1742,12 +1707,11 @@
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
     for (intptr_t id = start_index_; id < stop_index_; id += 1) {
       intptr_t length = d->ReadUnsigned();
       RawObjectPool* pool = reinterpret_cast<RawObjectPool*>(d->Ref(id + 0));
-      Deserializer::InitializeHeader(
-          pool, kObjectPoolCid, ObjectPool::InstanceSize(length), is_vm_object);
+      Deserializer::InitializeHeader(pool, kObjectPoolCid,
+                                     ObjectPool::InstanceSize(length));
       pool->ptr()->length_ = length;
       for (intptr_t j = 0; j < length; j++) {
         const uint8_t entry_bits = d->Read<uint8_t>();
@@ -1796,7 +1760,8 @@
     // will be loaded into read-only memory. Extra bytes due to allocation
     // rounding need to be deterministically set for reliable deduplication in
     // shared images.
-    if (object->IsVMHeapObject()) {
+    if (object->InVMIsolateHeap() ||
+        s->isolate()->heap()->old_space()->IsObjectFromImagePages(object)) {
       // This object is already read-only.
     } else {
       Object::FinalizeReadOnlyObject(object);
@@ -1951,15 +1916,12 @@
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
-
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawExceptionHandlers* handlers =
           reinterpret_cast<RawExceptionHandlers*>(d->Ref(id));
       intptr_t length = d->ReadUnsigned();
       Deserializer::InitializeHeader(handlers, kExceptionHandlersCid,
-                                     ExceptionHandlers::InstanceSize(length),
-                                     is_vm_object);
+                                     ExceptionHandlers::InstanceSize(length));
       handlers->ptr()->num_entries_ = length;
       handlers->ptr()->handled_types_data_ =
           reinterpret_cast<RawArray*>(d->ReadRef());
@@ -2042,13 +2004,11 @@
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
-
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawContext* context = reinterpret_cast<RawContext*>(d->Ref(id));
       intptr_t length = d->ReadUnsigned();
-      Deserializer::InitializeHeader(
-          context, kContextCid, Context::InstanceSize(length), is_vm_object);
+      Deserializer::InitializeHeader(context, kContextCid,
+                                     Context::InstanceSize(length));
       context->ptr()->num_variables_ = length;
       context->ptr()->parent_ = reinterpret_cast<RawContext*>(d->ReadRef());
       for (intptr_t j = 0; j < length; j++) {
@@ -2120,14 +2080,11 @@
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
-
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawContextScope* scope = reinterpret_cast<RawContextScope*>(d->Ref(id));
       intptr_t length = d->ReadUnsigned();
       Deserializer::InitializeHeader(scope, kContextScopeCid,
-                                     ContextScope::InstanceSize(length),
-                                     is_vm_object);
+                                     ContextScope::InstanceSize(length));
       scope->ptr()->num_variables_ = length;
       scope->ptr()->is_implicit_ = d->Read<bool>();
       ReadFromTo(scope, length);
@@ -2188,14 +2145,11 @@
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
-
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawUnlinkedCall* unlinked =
           reinterpret_cast<RawUnlinkedCall*>(d->Ref(id));
       Deserializer::InitializeHeader(unlinked, kUnlinkedCallCid,
-                                     UnlinkedCall::InstanceSize(),
-                                     is_vm_object);
+                                     UnlinkedCall::InstanceSize());
       ReadFromTo(unlinked);
     }
   }
@@ -2258,12 +2212,9 @@
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
-
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawICData* ic = reinterpret_cast<RawICData*>(d->Ref(id));
-      Deserializer::InitializeHeader(ic, kICDataCid, ICData::InstanceSize(),
-                                     is_vm_object);
+      Deserializer::InitializeHeader(ic, kICDataCid, ICData::InstanceSize());
       ReadFromTo(ic);
       NOT_IN_PRECOMPILED(ic->ptr()->deopt_id_ = d->Read<int32_t>());
       ic->ptr()->state_bits_ = d->Read<int32_t>();
@@ -2326,14 +2277,11 @@
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
-
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawMegamorphicCache* cache =
           reinterpret_cast<RawMegamorphicCache*>(d->Ref(id));
       Deserializer::InitializeHeader(cache, kMegamorphicCacheCid,
-                                     MegamorphicCache::InstanceSize(),
-                                     is_vm_object);
+                                     MegamorphicCache::InstanceSize());
       ReadFromTo(cache);
       cache->ptr()->filled_entry_count_ = d->Read<int32_t>();
     }
@@ -2420,14 +2368,11 @@
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
-
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawSubtypeTestCache* cache =
           reinterpret_cast<RawSubtypeTestCache*>(d->Ref(id));
       Deserializer::InitializeHeader(cache, kSubtypeTestCacheCid,
-                                     SubtypeTestCache::InstanceSize(),
-                                     is_vm_object);
+                                     SubtypeTestCache::InstanceSize());
       cache->ptr()->cache_ = reinterpret_cast<RawArray*>(d->ReadRef());
     }
   }
@@ -2489,13 +2434,10 @@
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
-
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawLanguageError* error = reinterpret_cast<RawLanguageError*>(d->Ref(id));
       Deserializer::InitializeHeader(error, kLanguageErrorCid,
-                                     LanguageError::InstanceSize(),
-                                     is_vm_object);
+                                     LanguageError::InstanceSize());
       ReadFromTo(error);
       error->ptr()->token_pos_ = d->ReadTokenPosition();
       error->ptr()->report_after_token_ = d->Read<bool>();
@@ -2558,14 +2500,11 @@
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
-
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawUnhandledException* exception =
           reinterpret_cast<RawUnhandledException*>(d->Ref(id));
       Deserializer::InitializeHeader(exception, kUnhandledExceptionCid,
-                                     UnhandledException::InstanceSize(),
-                                     is_vm_object);
+                                     UnhandledException::InstanceSize());
       ReadFromTo(exception);
     }
   }
@@ -2660,13 +2599,12 @@
     intptr_t next_field_offset = next_field_offset_in_words_ << kWordSizeLog2;
     intptr_t instance_size =
         Object::RoundedAllocationSize(instance_size_in_words_ * kWordSize);
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
 
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawInstance* instance = reinterpret_cast<RawInstance*>(d->Ref(id));
       bool is_canonical = d->Read<bool>();
       Deserializer::InitializeHeader(instance, cid_, instance_size,
-                                     is_vm_object, is_canonical);
+                                     is_canonical);
       intptr_t offset = Instance::NextFieldOffset();
       while (offset < next_field_offset) {
         RawObject** p = reinterpret_cast<RawObject**>(
@@ -2745,14 +2683,11 @@
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
-
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawLibraryPrefix* prefix =
           reinterpret_cast<RawLibraryPrefix*>(d->Ref(id));
       Deserializer::InitializeHeader(prefix, kLibraryPrefixCid,
-                                     LibraryPrefix::InstanceSize(),
-                                     is_vm_object);
+                                     LibraryPrefix::InstanceSize());
       ReadFromTo(prefix);
       prefix->ptr()->num_imports_ = d->Read<uint16_t>();
       prefix->ptr()->is_deferred_load_ = d->Read<bool>();
@@ -2852,13 +2787,12 @@
   }
 
   void ReadFill(Deserializer* d) {
-    const bool is_vm_isolate = d->isolate() == Dart::vm_isolate();
-
     for (intptr_t id = canonical_start_index_; id < canonical_stop_index_;
          id++) {
       RawType* type = reinterpret_cast<RawType*>(d->Ref(id));
+      bool is_canonical = true;
       Deserializer::InitializeHeader(type, kTypeCid, Type::InstanceSize(),
-                                     is_vm_isolate, true);
+                                     is_canonical);
       ReadFromTo(type);
       type->ptr()->token_pos_ = d->ReadTokenPosition();
       type->ptr()->type_state_ = d->Read<int8_t>();
@@ -2866,8 +2800,9 @@
 
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawType* type = reinterpret_cast<RawType*>(d->Ref(id));
+      bool is_canonical = false;
       Deserializer::InitializeHeader(type, kTypeCid, Type::InstanceSize(),
-                                     is_vm_isolate);
+                                     is_canonical);
       ReadFromTo(type);
       type->ptr()->token_pos_ = d->ReadTokenPosition();
       type->ptr()->type_state_ = d->Read<int8_t>();
@@ -2962,12 +2897,10 @@
   }
 
   void ReadFill(Deserializer* d) {
-    const bool is_vm_object = d->isolate() == Dart::vm_isolate();
-
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawTypeRef* type = reinterpret_cast<RawTypeRef*>(d->Ref(id));
-      Deserializer::InitializeHeader(type, kTypeRefCid, TypeRef::InstanceSize(),
-                                     is_vm_object);
+      Deserializer::InitializeHeader(type, kTypeRefCid,
+                                     TypeRef::InstanceSize());
       ReadFromTo(type);
     }
   }
@@ -3026,7 +2959,7 @@
       s->Write<int32_t>(type->ptr()->parameterized_class_id_);
       s->WriteTokenPosition(type->ptr()->token_pos_);
       s->Write<int16_t>(type->ptr()->index_);
-      s->Write<int8_t>(type->ptr()->type_state_);
+      s->Write<uint8_t>(type->ptr()->flags_);
     }
   }
 
@@ -3052,17 +2985,15 @@
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
-
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawTypeParameter* type = reinterpret_cast<RawTypeParameter*>(d->Ref(id));
-      Deserializer::InitializeHeader(
-          type, kTypeParameterCid, TypeParameter::InstanceSize(), is_vm_object);
+      Deserializer::InitializeHeader(type, kTypeParameterCid,
+                                     TypeParameter::InstanceSize());
       ReadFromTo(type);
       type->ptr()->parameterized_class_id_ = d->Read<int32_t>();
       type->ptr()->token_pos_ = d->ReadTokenPosition();
       type->ptr()->index_ = d->Read<int16_t>();
-      type->ptr()->type_state_ = d->Read<int8_t>();
+      type->ptr()->flags_ = d->Read<uint8_t>();
     }
   }
 
@@ -3140,14 +3071,11 @@
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
-
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawClosure* closure = reinterpret_cast<RawClosure*>(d->Ref(id));
       bool is_canonical = d->Read<bool>();
       Deserializer::InitializeHeader(closure, kClosureCid,
-                                     Closure::InstanceSize(), is_vm_object,
-                                     is_canonical);
+                                     Closure::InstanceSize(), is_canonical);
       ReadFromTo(closure);
     }
   }
@@ -3204,7 +3132,6 @@
 
   void ReadAlloc(Deserializer* d) {
     PageSpace* old_space = d->heap()->old_space();
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
 
     start_index_ = d->next_index();
     intptr_t count = d->ReadUnsigned();
@@ -3217,7 +3144,7 @@
         RawMint* mint = static_cast<RawMint*>(
             AllocateUninitialized(old_space, Mint::InstanceSize()));
         Deserializer::InitializeHeader(mint, kMintCid, Mint::InstanceSize(),
-                                       is_vm_object, is_canonical);
+                                       is_canonical);
         mint->ptr()->value_ = value;
         d->AssignRef(mint);
       }
@@ -3293,13 +3220,11 @@
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
-
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawDouble* dbl = reinterpret_cast<RawDouble*>(d->Ref(id));
       bool is_canonical = d->Read<bool>();
       Deserializer::InitializeHeader(dbl, kDoubleCid, Double::InstanceSize(),
-                                     is_vm_object, is_canonical);
+                                     is_canonical);
       dbl->ptr()->value_ = d->Read<double>();
     }
   }
@@ -3361,15 +3286,13 @@
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
-
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawGrowableObjectArray* list =
           reinterpret_cast<RawGrowableObjectArray*>(d->Ref(id));
       bool is_canonical = d->Read<bool>();
       Deserializer::InitializeHeader(list, kGrowableObjectArrayCid,
                                      GrowableObjectArray::InstanceSize(),
-                                     is_vm_object, is_canonical);
+                                     is_canonical);
       ReadFromTo(list);
     }
   }
@@ -3439,7 +3362,6 @@
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
     intptr_t element_size = TypedData::ElementSizeInBytes(cid_);
 
     for (intptr_t id = start_index_; id < stop_index_; id++) {
@@ -3447,10 +3369,10 @@
       intptr_t length = d->ReadUnsigned();
       bool is_canonical = d->Read<bool>();
       intptr_t length_in_bytes = length * element_size;
-      Deserializer::InitializeHeader(data, cid_,
-                                     TypedData::InstanceSize(length_in_bytes),
-                                     is_vm_object, is_canonical);
+      Deserializer::InitializeHeader(
+          data, cid_, TypedData::InstanceSize(length_in_bytes), is_canonical);
       data->ptr()->length_ = Smi::New(length);
+      data->RecomputeDataField();
       uint8_t* cdata = reinterpret_cast<uint8_t*>(data->ptr()->data());
       d->ReadBytes(cdata, length_in_bytes);
     }
@@ -3461,6 +3383,84 @@
 };
 
 #if !defined(DART_PRECOMPILED_RUNTIME)
+class TypedDataViewSerializationCluster : public SerializationCluster {
+ public:
+  explicit TypedDataViewSerializationCluster(intptr_t cid)
+      : SerializationCluster("TypedDataView"), cid_(cid) {}
+  ~TypedDataViewSerializationCluster() {}
+
+  void Trace(Serializer* s, RawObject* object) {
+    RawTypedDataView* view = TypedDataView::RawCast(object);
+    objects_.Add(view);
+
+    PushFromTo(view);
+  }
+
+  void WriteAlloc(Serializer* s) {
+    const intptr_t count = objects_.length();
+    s->WriteCid(cid_);
+    s->WriteUnsigned(count);
+    for (intptr_t i = 0; i < count; i++) {
+      RawTypedDataView* view = objects_[i];
+      s->AssignRef(view);
+    }
+  }
+
+  void WriteFill(Serializer* s) {
+    const intptr_t count = objects_.length();
+    for (intptr_t i = 0; i < count; i++) {
+      RawTypedDataView* view = objects_[i];
+      AutoTraceObject(view);
+      s->Write<bool>(view->IsCanonical());
+      WriteFromTo(view);
+    }
+  }
+
+ private:
+  const intptr_t cid_;
+  GrowableArray<RawTypedDataView*> objects_;
+};
+#endif  // !DART_PRECOMPILED_RUNTIME
+
+class TypedDataViewDeserializationCluster : public DeserializationCluster {
+ public:
+  explicit TypedDataViewDeserializationCluster(intptr_t cid) : cid_(cid) {}
+  ~TypedDataViewDeserializationCluster() {}
+
+  void ReadAlloc(Deserializer* d) {
+    start_index_ = d->next_index();
+    PageSpace* old_space = d->heap()->old_space();
+    const intptr_t count = d->ReadUnsigned();
+    for (intptr_t i = 0; i < count; i++) {
+      d->AssignRef(
+          AllocateUninitialized(old_space, TypedDataView::InstanceSize()));
+    }
+    stop_index_ = d->next_index();
+  }
+
+  void ReadFill(Deserializer* d) {
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      RawTypedDataView* view = reinterpret_cast<RawTypedDataView*>(d->Ref(id));
+      const bool is_canonical = d->Read<bool>();
+      Deserializer::InitializeHeader(view, cid_, TypedDataView::InstanceSize(),
+                                     is_canonical);
+      ReadFromTo(view);
+    }
+  }
+
+  void PostLoad(const Array& refs, Snapshot::Kind kind, Zone* zone) {
+    auto& view = TypedDataView::Handle(zone);
+    for (intptr_t id = start_index_; id < stop_index_; id++) {
+      view ^= refs.At(id);
+      view.RecomputeDataField();
+    }
+  }
+
+ private:
+  const intptr_t cid_;
+};
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
 class ExternalTypedDataSerializationCluster : public SerializationCluster {
  public:
   explicit ExternalTypedDataSerializationCluster(intptr_t cid)
@@ -3520,15 +3520,14 @@
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
     intptr_t element_size = ExternalTypedData::ElementSizeInBytes(cid_);
 
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawExternalTypedData* data =
           reinterpret_cast<RawExternalTypedData*>(d->Ref(id));
       intptr_t length = d->ReadUnsigned();
-      Deserializer::InitializeHeader(
-          data, cid_, ExternalTypedData::InstanceSize(), is_vm_object);
+      Deserializer::InitializeHeader(data, cid_,
+                                     ExternalTypedData::InstanceSize());
       data->ptr()->length_ = Smi::New(length);
       d->Align(ExternalTypedData::kDataSerializationAlignment);
       data->ptr()->data_ = const_cast<uint8_t*>(d->CurrentBufferAddress());
@@ -3594,12 +3593,10 @@
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
-
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawStackTrace* trace = reinterpret_cast<RawStackTrace*>(d->Ref(id));
       Deserializer::InitializeHeader(trace, kStackTraceCid,
-                                     StackTrace::InstanceSize(), is_vm_object);
+                                     StackTrace::InstanceSize());
       ReadFromTo(trace);
     }
   }
@@ -3659,12 +3656,10 @@
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
-
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawRegExp* regexp = reinterpret_cast<RawRegExp*>(d->Ref(id));
-      Deserializer::InitializeHeader(regexp, kRegExpCid, RegExp::InstanceSize(),
-                                     is_vm_object);
+      Deserializer::InitializeHeader(regexp, kRegExpCid,
+                                     RegExp::InstanceSize());
       ReadFromTo(regexp);
       regexp->ptr()->num_registers_ = d->Read<int32_t>();
       regexp->ptr()->type_flags_ = d->Read<int8_t>();
@@ -3725,14 +3720,11 @@
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
-
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawWeakProperty* property =
           reinterpret_cast<RawWeakProperty*>(d->Ref(id));
       Deserializer::InitializeHeader(property, kWeakPropertyCid,
-                                     WeakProperty::InstanceSize(),
-                                     is_vm_object);
+                                     WeakProperty::InstanceSize());
       ReadFromTo(property);
     }
   }
@@ -3824,15 +3816,13 @@
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
     PageSpace* old_space = d->heap()->old_space();
 
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawLinkedHashMap* map = reinterpret_cast<RawLinkedHashMap*>(d->Ref(id));
       bool is_canonical = d->Read<bool>();
-      Deserializer::InitializeHeader(map, kLinkedHashMapCid,
-                                     LinkedHashMap::InstanceSize(),
-                                     is_vm_object, is_canonical);
+      Deserializer::InitializeHeader(
+          map, kLinkedHashMapCid, LinkedHashMap::InstanceSize(), is_canonical);
 
       map->ptr()->type_arguments_ =
           reinterpret_cast<RawTypeArguments*>(d->ReadRef());
@@ -3935,14 +3925,12 @@
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
-
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawArray* array = reinterpret_cast<RawArray*>(d->Ref(id));
       intptr_t length = d->ReadUnsigned();
       bool is_canonical = d->Read<bool>();
       Deserializer::InitializeHeader(array, cid_, Array::InstanceSize(length),
-                                     is_vm_object, is_canonical);
+                                     is_canonical);
       array->ptr()->type_arguments_ =
           reinterpret_cast<RawTypeArguments*>(d->ReadRef());
       array->ptr()->length_ = Smi::New(length);
@@ -4017,15 +4005,13 @@
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
-
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawOneByteString* str = reinterpret_cast<RawOneByteString*>(d->Ref(id));
       intptr_t length = d->ReadUnsigned();
       bool is_canonical = d->Read<bool>();
       Deserializer::InitializeHeader(str, kOneByteStringCid,
                                      OneByteString::InstanceSize(length),
-                                     is_vm_object, is_canonical);
+                                     is_canonical);
       str->ptr()->length_ = Smi::New(length);
       String::SetCachedHash(str, d->Read<int32_t>());
       for (intptr_t j = 0; j < length; j++) {
@@ -4096,15 +4082,13 @@
   }
 
   void ReadFill(Deserializer* d) {
-    bool is_vm_object = d->isolate() == Dart::vm_isolate();
-
     for (intptr_t id = start_index_; id < stop_index_; id++) {
       RawTwoByteString* str = reinterpret_cast<RawTwoByteString*>(d->Ref(id));
       intptr_t length = d->ReadUnsigned();
       bool is_canonical = d->Read<bool>();
       Deserializer::InitializeHeader(str, kTwoByteStringCid,
                                      TwoByteString::InstanceSize(length),
-                                     is_vm_object, is_canonical);
+                                     is_canonical);
       str->ptr()->length_ = Smi::New(length);
       String::SetCachedHash(str, d->Read<int32_t>());
       uint8_t* cdata = reinterpret_cast<uint8_t*>(str->ptr()->data());
@@ -4217,11 +4201,13 @@
   return NULL;
 #else
   Zone* Z = zone_;
-  if ((cid >= kNumPredefinedCids) || (cid == kInstanceCid) ||
-      RawObject::IsTypedDataViewClassId(cid)) {
+  if (cid >= kNumPredefinedCids || cid == kInstanceCid) {
     Push(isolate()->class_table()->At(cid));
     return new (Z) InstanceSerializationCluster(cid);
   }
+  if (RawObject::IsTypedDataViewClassId(cid)) {
+    return new (Z) TypedDataViewSerializationCluster(cid);
+  }
   if (RawObject::IsExternalTypedDataClassId(cid)) {
     return new (Z) ExternalTypedDataSerializationCluster(cid);
   }
@@ -4346,7 +4332,10 @@
   ASSERT(code != Code::null());
 
   const intptr_t offset = image_writer_->GetTextOffsetFor(instr, code);
-  ASSERT(offset != 0);
+  if (offset == 0) {
+    // Code should have been removed by DropCodeWithoutReusableInstructions.
+    UnexpectedObject(code, "Expected instructions to reuse");
+  }
   Write<int32_t>(offset);
 
   // If offset < 0, it's pointing to a shared instruction. We don't profile
@@ -4696,6 +4685,12 @@
                 "<empty>");
   AddBaseObject(Object::empty_exception_handlers().raw(), "ExceptionHandlers",
                 "<empty>");
+  AddBaseObject(Object::implicit_getter_bytecode().raw(), "Bytecode",
+                "<implicit getter>");
+  AddBaseObject(Object::implicit_setter_bytecode().raw(), "Bytecode",
+                "<implicit setter>");
+  AddBaseObject(Object::method_extractor_bytecode().raw(), "Bytecode",
+                "<method extractor>");
 
   for (intptr_t i = 0; i < ArgumentsDescriptor::kCachedDescriptorCount; i++) {
     AddBaseObject(ArgumentsDescriptor::cached_args_descriptors_[i],
@@ -4724,8 +4719,7 @@
   }
 }
 
-intptr_t Serializer::WriteVMSnapshot(const Array& symbols,
-                                     ZoneGrowableArray<Object*>* seeds) {
+intptr_t Serializer::WriteVMSnapshot(const Array& symbols) {
   NoSafepointScope no_safepoint;
 
   AddVMIsolateBaseObjects();
@@ -4737,11 +4731,6 @@
       Push(StubCode::EntryAt(i).raw());
     }
   }
-  if (seeds != NULL) {
-    for (intptr_t i = 0; i < seeds->length(); i++) {
-      Push((*seeds)[i]->raw());
-    }
-  }
 
   Serialize();
 
@@ -4837,10 +4826,12 @@
 DeserializationCluster* Deserializer::ReadCluster() {
   intptr_t cid = ReadCid();
   Zone* Z = zone_;
-  if ((cid >= kNumPredefinedCids) || (cid == kInstanceCid) ||
-      RawObject::IsTypedDataViewClassId(cid)) {
+  if (cid >= kNumPredefinedCids || cid == kInstanceCid) {
     return new (Z) InstanceDeserializationCluster(cid);
   }
+  if (RawObject::IsTypedDataViewClassId(cid)) {
+    return new (Z) TypedDataViewDeserializationCluster(cid);
+  }
   if (RawObject::IsExternalTypedDataClassId(cid)) {
     return new (Z) ExternalTypedDataDeserializationCluster(cid);
   }
@@ -5155,6 +5146,9 @@
   AddBaseObject(Object::empty_descriptors().raw());
   AddBaseObject(Object::empty_var_descriptors().raw());
   AddBaseObject(Object::empty_exception_handlers().raw());
+  AddBaseObject(Object::implicit_getter_bytecode().raw());
+  AddBaseObject(Object::implicit_setter_bytecode().raw());
+  AddBaseObject(Object::method_extractor_bytecode().raw());
 
   for (intptr_t i = 0; i < ArgumentsDescriptor::kCachedDescriptorCount; i++) {
     AddBaseObject(ArgumentsDescriptor::cached_args_descriptors_[i]);
@@ -5280,92 +5274,6 @@
   Bootstrap::SetupNativeResolver();
 }
 
-// Iterates the program structure looking for objects to write into
-// the VM isolate's snapshot, causing them to be shared across isolates.
-// Duplicates will be removed by Serializer::Push.
-class SeedVMIsolateVisitor : public ClassVisitor, public FunctionVisitor {
- public:
-  SeedVMIsolateVisitor(Zone* zone, bool include_code)
-      : zone_(zone),
-        include_code_(include_code),
-        seeds_(new (zone) ZoneGrowableArray<Object*>(4 * KB)),
-        script_(Script::Handle(zone)),
-        code_(Code::Handle(zone)),
-        stack_maps_(Array::Handle(zone)),
-        library_(Library::Handle(zone)),
-        kernel_program_info_(KernelProgramInfo::Handle(zone)) {}
-
-  void Visit(const Class& cls) {
-    script_ = cls.script();
-    if (!script_.IsNull()) {
-      Visit(script_);
-    }
-
-    library_ = cls.library();
-    AddSeed(library_.kernel_data());
-
-    if (!include_code_) return;
-
-    code_ = cls.allocation_stub();
-    Visit(code_);
-  }
-
-  void Visit(const Function& function) {
-    script_ = function.script();
-    if (!script_.IsNull()) {
-      Visit(script_);
-    }
-
-    if (!include_code_) return;
-
-    code_ = function.CurrentCode();
-    Visit(code_);
-    code_ = function.unoptimized_code();
-    Visit(code_);
-  }
-
-  void Visit(const Script& script) {
-    kernel_program_info_ = script_.kernel_program_info();
-    if (!kernel_program_info_.IsNull()) {
-      AddSeed(kernel_program_info_.string_offsets());
-      AddSeed(kernel_program_info_.string_data());
-      AddSeed(kernel_program_info_.canonical_names());
-      AddSeed(kernel_program_info_.metadata_payloads());
-      AddSeed(kernel_program_info_.metadata_mappings());
-      AddSeed(kernel_program_info_.constants());
-    }
-  }
-
-  ZoneGrowableArray<Object*>* seeds() { return seeds_; }
-
- private:
-  void Visit(const Code& code) {
-    ASSERT(include_code_);
-    if (code.IsNull()) return;
-
-    AddSeed(code.pc_descriptors());
-    AddSeed(code.code_source_map());
-
-    stack_maps_ = code_.stackmaps();
-    if (!stack_maps_.IsNull()) {
-      for (intptr_t i = 0; i < stack_maps_.Length(); i++) {
-        AddSeed(stack_maps_.At(i));
-      }
-    }
-  }
-
-  void AddSeed(RawObject* seed) { seeds_->Add(&Object::Handle(zone_, seed)); }
-
-  Zone* zone_;
-  bool include_code_;
-  ZoneGrowableArray<Object*>* seeds_;
-  Script& script_;
-  Code& code_;
-  Array& stack_maps_;
-  Library& library_;
-  KernelProgramInfo& kernel_program_info_;
-};
-
 #if defined(DART_PRECOMPILER)
 DEFINE_FLAG(charp,
             write_v8_snapshot_profile_to,
@@ -5388,9 +5296,6 @@
       isolate_snapshot_size_(0),
       vm_image_writer_(vm_image_writer),
       isolate_image_writer_(isolate_image_writer),
-      seeds_(NULL),
-      saved_symbol_table_(Array::Handle(zone())),
-      new_vm_symbol_table_(Array::Handle(zone())),
       clustered_vm_size_(0),
       clustered_isolate_size_(0),
       mapped_data_size_(0),
@@ -5406,36 +5311,6 @@
   isolate()->ValidateConstants();
 #endif  // DEBUG
 
-  // TODO(rmacnak): The special case for AOT causes us to always generate the
-  // same VM isolate snapshot for every app. AOT snapshots should be cleaned up
-  // so the VM isolate snapshot is generated separately and each app is
-  // generated from a VM that has loaded this snapshots, much like app-jit
-  // snapshots.
-  if ((vm_snapshot_data_buffer != NULL) && (kind != Snapshot::kFullAOT)) {
-    TIMELINE_DURATION(thread(), Isolate, "PrepareNewVMIsolate");
-
-    SeedVMIsolateVisitor visitor(thread()->zone(),
-                                 Snapshot::IncludesCode(kind));
-    ProgramVisitor::VisitClasses(&visitor);
-    ProgramVisitor::VisitFunctions(&visitor);
-    seeds_ = visitor.seeds();
-
-    // Tuck away the current symbol table.
-    saved_symbol_table_ = object_store->symbol_table();
-
-    // Create a unified symbol table that will be written as the vm isolate's
-    // symbol table.
-    new_vm_symbol_table_ = Symbols::UnifiedSymbolTable();
-
-    // Create an empty symbol table that will be written as the isolate's symbol
-    // table.
-    Symbols::SetupSymbolTable(isolate());
-  } else {
-    // Reuse the current vm isolate.
-    saved_symbol_table_ = object_store->symbol_table();
-    new_vm_symbol_table_ = Dart::vm_isolate()->object_store()->symbol_table();
-  }
-
 #if defined(DART_PRECOMPILER)
   if (FLAG_write_v8_snapshot_profile_to != nullptr) {
     profile_writer_ = new (zone()) V8SnapshotProfileWriter(zone());
@@ -5443,14 +5318,7 @@
 #endif
 }
 
-FullSnapshotWriter::~FullSnapshotWriter() {
-  // We may run Dart code afterwards, restore the symbol table if needed.
-  if (!saved_symbol_table_.IsNull()) {
-    isolate()->object_store()->set_symbol_table(saved_symbol_table_);
-    saved_symbol_table_ = Array::null();
-  }
-  new_vm_symbol_table_ = Array::null();
-}
+FullSnapshotWriter::~FullSnapshotWriter() {}
 
 intptr_t FullSnapshotWriter::WriteVMSnapshot() {
   TIMELINE_DURATION(thread(), Isolate, "WriteVMSnapshot");
@@ -5464,10 +5332,11 @@
   serializer.WriteVersionAndFeatures(true);
   // VM snapshot roots are:
   // - the symbol table
-  // - all the token streams
   // - the stub code (App-AOT, App-JIT or Core-JIT)
-  intptr_t num_objects =
-      serializer.WriteVMSnapshot(new_vm_symbol_table_, seeds_);
+
+  const Array& symbols =
+      Array::Handle(Dart::vm_isolate()->object_store()->symbol_table());
+  intptr_t num_objects = serializer.WriteVMSnapshot(symbols);
   serializer.FillHeader(serializer.kind());
   clustered_vm_size_ = serializer.bytes_written();
 
diff --git a/runtime/vm/clustered_snapshot.h b/runtime/vm/clustered_snapshot.h
index 3b863bd..2233715 100644
--- a/runtime/vm/clustered_snapshot.h
+++ b/runtime/vm/clustered_snapshot.h
@@ -139,8 +139,7 @@
              V8SnapshotProfileWriter* profile_writer = nullptr);
   ~Serializer();
 
-  intptr_t WriteVMSnapshot(const Array& symbols,
-                           ZoneGrowableArray<Object*>* seeds);
+  intptr_t WriteVMSnapshot(const Array& symbols);
   void WriteIsolateSnapshot(intptr_t num_base_objects,
                             ObjectStore* object_store);
 
@@ -492,7 +491,6 @@
   static void InitializeHeader(RawObject* raw,
                                intptr_t cid,
                                intptr_t size,
-                               bool is_vm_isolate,
                                bool is_canonical = false);
 
   // Reads raw data (for basic types).
@@ -642,9 +640,6 @@
   ForwardList* forward_list_;
   ImageWriter* vm_image_writer_;
   ImageWriter* isolate_image_writer_;
-  ZoneGrowableArray<Object*>* seeds_;
-  Array& saved_symbol_table_;
-  Array& new_vm_symbol_table_;
 
   // Stats for benchmarking.
   intptr_t clustered_vm_size_;
diff --git a/runtime/vm/code_patcher.cc b/runtime/vm/code_patcher.cc
index 4926926..7168231 100644
--- a/runtime/vm/code_patcher.cc
+++ b/runtime/vm/code_patcher.cc
@@ -12,6 +12,13 @@
 
 DEFINE_FLAG(bool, write_protect_code, true, "Write protect jitted code");
 
+#if defined(DUAL_MAPPING_SUPPORTED)
+DEFINE_FLAG(bool, dual_map_code, true, "Dual map jitted code, RW and RX");
+#else
+DEFINE_FLAG(bool, dual_map_code, false, "Dual map jitted code, RW and RX");
+#endif  // defined(DUAL_MAPPING_SUPPORTED)
+
+#if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_DBC)
 WritableInstructionsScope::WritableInstructionsScope(uword address,
                                                      intptr_t size)
     : address_(address), size_(size) {
@@ -27,6 +34,7 @@
                            VirtualMemory::kReadExecute);
   }
 }
+#endif  // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_DBC)
 
 bool MatchesPattern(uword end, const int16_t* pattern, intptr_t size) {
   // When breaking within generated code in GDB, it may overwrite individual
diff --git a/runtime/vm/code_patcher.h b/runtime/vm/code_patcher.h
index 6aa62af..239a69d 100644
--- a/runtime/vm/code_patcher.h
+++ b/runtime/vm/code_patcher.h
@@ -19,10 +19,12 @@
 class RawFunction;
 class RawObject;
 
+#if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_DBC)
 // Stack-allocated class to create a scope where the specified region
 // [address, address + size] has write access enabled. This is used
 // when patching generated code. Access is reset to read-execute in
 // the destructor of this scope.
+// Dual mapping of instructions pages is not supported on these target arch.
 class WritableInstructionsScope : public ValueObject {
  public:
   WritableInstructionsScope(uword address, intptr_t size);
@@ -32,6 +34,7 @@
   const uword address_;
   const intptr_t size_;
 };
+#endif  // defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_DBC)
 
 class CodePatcher : public AllStatic {
  public:
diff --git a/runtime/vm/compilation_trace.cc b/runtime/vm/compilation_trace.cc
index 29cdfa2..48db21c 100644
--- a/runtime/vm/compilation_trace.cc
+++ b/runtime/vm/compilation_trace.cc
@@ -20,7 +20,7 @@
 DEFINE_FLAG(bool, trace_compilation_trace, false, "Trace compilation trace.");
 
 CompilationTraceSaver::CompilationTraceSaver(Zone* zone)
-    : buf_(zone, 4 * KB),
+    : buf_(zone, 1 * MB),
       func_name_(String::Handle(zone)),
       cls_(Class::Handle(zone)),
       cls_name_(String::Handle(zone)),
@@ -60,6 +60,13 @@
       function_(Function::Handle(zone_)),
       function2_(Function::Handle(zone_)),
       field_(Field::Handle(zone_)),
+      sites_(Array::Handle(zone_)),
+      site_(ICData::Handle(zone_)),
+      static_type_(AbstractType::Handle(zone_)),
+      receiver_cls_(Class::Handle(zone_)),
+      target_(Function::Handle(zone_)),
+      selector_(String::Handle(zone_)),
+      args_desc_(Array::Handle(zone_)),
       error_(Object::Handle(zone_)) {}
 
 static char* FindCharacter(char* str, char goal, char* limit) {
@@ -178,7 +185,14 @@
     return Object::null();
   }
 
+  bool is_dyn = Function::IsDynamicInvocationForwarderName(function_name_);
+  if (is_dyn) {
+    function_name_ =
+        Function::DemangleDynamicInvocationForwarderName(function_name_);
+  }
+
   bool is_getter = Field::IsGetterName(function_name_);
+  bool is_init = Field::IsInitName(function_name_);
   bool add_closure = false;
   bool processed = false;
 
@@ -192,6 +206,14 @@
       function_ = lib_.LookupFunctionAllowPrivate(function_name2_);
       field_ = lib_.LookupFieldAllowPrivate(function_name2_);
     }
+    if (field_.IsNull() && is_getter) {
+      function_name2_ = Field::NameFromGetter(function_name_);
+      field_ = lib_.LookupFieldAllowPrivate(function_name2_);
+    }
+    if (field_.IsNull() && is_init) {
+      function_name2_ = Field::NameFromInit(function_name_);
+      field_ = lib_.LookupFieldAllowPrivate(function_name2_);
+    }
   } else {
     cls_ = lib_.SlowLookupClassAllowMultiPartPrivate(class_name_);
     if (cls_.IsNull()) {
@@ -244,12 +266,20 @@
         }
       }
     }
+    if (field_.IsNull() && is_getter) {
+      function_name2_ = Field::NameFromGetter(function_name_);
+      field_ = cls_.LookupFieldAllowPrivate(function_name2_);
+    }
+    if (field_.IsNull() && is_init) {
+      function_name2_ = Field::NameFromInit(function_name_);
+      field_ = cls_.LookupFieldAllowPrivate(function_name2_);
+    }
   }
 
   if (!field_.IsNull() && field_.is_const() && field_.is_static() &&
       (field_.StaticValue() == Object::sentinel().raw())) {
     processed = true;
-    error_ = field_.EvaluateInitializer();
+    error_ = field_.Initialize();
     if (error_.IsError()) {
       if (FLAG_trace_compilation_trace) {
         THR_Print(
@@ -286,6 +316,38 @@
         }
         return error_.raw();
       }
+    } else if (is_dyn) {
+      function_name_ = function_.name();  // With private mangling.
+      function_name_ =
+          Function::CreateDynamicInvocationForwarderName(function_name_);
+      function_ = function_.GetDynamicInvocationForwarder(function_name_);
+      error_ = CompileFunction(function_);
+      if (error_.IsError()) {
+        if (FLAG_trace_compilation_trace) {
+          THR_Print(
+              "Compilation trace: error compiling dynamic forwarder %s,%s,%s "
+              "(%s)\n",
+              uri_.ToCString(), class_name_.ToCString(),
+              function_name_.ToCString(), Error::Cast(error_).ToErrorCString());
+        }
+        return error_.raw();
+      }
+    }
+  }
+
+  if (!field_.IsNull() && field_.is_static() && !field_.is_const() &&
+      field_.has_initializer()) {
+    processed = true;
+    function_ = field_.EnsureInitializerFunction();
+    error_ = CompileFunction(function_);
+    if (error_.IsError()) {
+      if (FLAG_trace_compilation_trace) {
+        THR_Print(
+            "Compilation trace: error compiling initializer %s,%s,%s (%s)\n",
+            uri_.ToCString(), class_name_.ToCString(),
+            function_name_.ToCString(), Error::Cast(error_).ToErrorCString());
+      }
+      return error_.raw();
     }
   }
 
@@ -299,10 +361,75 @@
 }
 
 RawObject* CompilationTraceLoader::CompileFunction(const Function& function) {
-  if (function.is_abstract()) {
+  if (function.is_abstract() || function.HasCode()) {
     return Object::null();
   }
-  return Compiler::CompileFunction(thread_, function);
+
+  // Prevent premature code collection due to major GC during startup.
+  if (function.usage_counter() < Function::kGraceUsageCounter) {
+    function.set_usage_counter(Function::kGraceUsageCounter);
+  }
+
+  error_ = Compiler::CompileFunction(thread_, function);
+  if (error_.IsError()) {
+    return error_.raw();
+  }
+
+  SpeculateInstanceCallTargets(function);
+
+  return error_.raw();
+}
+
+// For instance calls, if the receiver's static type has one concrete
+// implementation, lookup the target for that implementation and add it
+// to the ICData's entries.
+// For some well-known interfaces, do the same for the most common concrete
+// implementation (e.g., int -> _Smi).
+void CompilationTraceLoader::SpeculateInstanceCallTargets(
+    const Function& function) {
+  sites_ = function.ic_data_array();
+  if (sites_.IsNull()) {
+    return;
+  }
+  for (intptr_t i = 1; i < sites_.Length(); i++) {
+    site_ ^= sites_.At(i);
+    if (site_.rebind_rule() != ICData::kInstance) {
+      continue;
+    }
+    if (site_.NumArgsTested() != 1) {
+      continue;
+    }
+
+    static_type_ = site_.receivers_static_type();
+    if (static_type_.IsNull()) {
+      continue;
+    } else if (static_type_.IsDoubleType()) {
+      receiver_cls_ = Isolate::Current()->class_table()->At(kDoubleCid);
+    } else if (static_type_.IsIntType()) {
+      receiver_cls_ = Isolate::Current()->class_table()->At(kSmiCid);
+    } else if (static_type_.IsStringType()) {
+      receiver_cls_ = Isolate::Current()->class_table()->At(kOneByteStringCid);
+    } else if (static_type_.IsDartFunctionType() ||
+               static_type_.IsDartClosureType()) {
+      receiver_cls_ = Isolate::Current()->class_table()->At(kClosureCid);
+    } else if (static_type_.HasTypeClass()) {
+      receiver_cls_ = static_type_.type_class();
+      if (receiver_cls_.is_implemented() || receiver_cls_.is_abstract()) {
+        continue;
+      }
+    } else {
+      continue;
+    }
+
+    selector_ = site_.target_name();
+    args_desc_ = site_.arguments_descriptor();
+    target_ = Resolver::ResolveDynamicForReceiverClass(
+        receiver_cls_, selector_, ArgumentsDescriptor(args_desc_));
+    if (!target_.IsNull() && !site_.HasReceiverClassId(receiver_cls_.id())) {
+      intptr_t count = 0;  // Don't pollute type feedback and coverage data.
+      site_.AddReceiverCheck(receiver_cls_.id(), target_, count);
+    }
+  }
 }
 
 TypeFeedbackSaver::TypeFeedbackSaver(WriteStream* stream)
@@ -467,6 +594,7 @@
     : thread_(thread),
       zone_(thread->zone()),
       stream_(nullptr),
+      cid_map_(nullptr),
       uri_(String::Handle(zone_)),
       lib_(Library::Handle(zone_)),
       cls_name_(String::Handle(zone_)),
@@ -485,6 +613,10 @@
           GrowableObjectArray::Handle(zone_, GrowableObjectArray::New())),
       error_(Error::Handle(zone_)) {}
 
+TypeFeedbackLoader::~TypeFeedbackLoader() {
+  delete[] cid_map_;
+}
+
 RawObject* TypeFeedbackLoader::LoadFeedback(ReadStream* stream) {
   stream_ = stream;
 
diff --git a/runtime/vm/compilation_trace.h b/runtime/vm/compilation_trace.h
index 106dbbe..e3a8fbd 100644
--- a/runtime/vm/compilation_trace.h
+++ b/runtime/vm/compilation_trace.h
@@ -42,6 +42,7 @@
                            const char* cls_cstr,
                            const char* func_cstr);
   RawObject* CompileFunction(const Function& function);
+  void SpeculateInstanceCallTargets(const Function& function);
 
   Thread* thread_;
   Zone* zone_;
@@ -54,6 +55,13 @@
   Function& function_;
   Function& function2_;
   Field& field_;
+  Array& sites_;
+  ICData& site_;
+  AbstractType& static_type_;
+  Class& receiver_cls_;
+  Function& target_;
+  String& selector_;
+  Array& args_desc_;
   Object& error_;
 };
 
@@ -85,6 +93,7 @@
 class TypeFeedbackLoader : public ValueObject {
  public:
   explicit TypeFeedbackLoader(Thread* thread);
+  ~TypeFeedbackLoader();
 
   RawObject* LoadFeedback(ReadStream* stream);
 
diff --git a/runtime/vm/compiler/aot/aot_call_specializer.cc b/runtime/vm/compiler/aot/aot_call_specializer.cc
index 23e66c0..07d879f 100644
--- a/runtime/vm/compiler/aot/aot_call_specializer.cc
+++ b/runtime/vm/compiler/aot/aot_call_specializer.cc
@@ -442,8 +442,8 @@
       Smi::ZoneHandle(Z, Smi::New(modulus - 1)), kUnboxedInt32);
   InsertBefore(instr, right_definition, /*env=*/NULL, FlowGraph::kValue);
   right_definition = new (Z)
-      UnboxedIntConverterInstr(kUnboxedInt32, kUnboxedInt64,
-                               new (Z) Value(right_definition), DeoptId::kNone);
+      IntConverterInstr(kUnboxedInt32, kUnboxedInt64,
+                        new (Z) Value(right_definition), DeoptId::kNone);
   InsertBefore(instr, right_definition, /*env=*/NULL, FlowGraph::kValue);
 #else
   Definition* right_definition = new (Z) UnboxedConstantInstr(
@@ -544,18 +544,28 @@
       case Token::kMOD:
         replacement = TryOptimizeMod(instr, op_kind, left_value, right_value);
         if (replacement != nullptr) break;
+        FALL_THROUGH;
       case Token::kTRUNCDIV:
 #if !defined(TARGET_ARCH_X64) && !defined(TARGET_ARCH_ARM64)
         // TODO(ajcbik): 32-bit archs too?
         break;
+#else
+        FALL_THROUGH;
 #endif
       case Token::kSHL:
+        FALL_THROUGH;
       case Token::kSHR:
+        FALL_THROUGH;
       case Token::kBIT_OR:
+        FALL_THROUGH;
       case Token::kBIT_XOR:
+        FALL_THROUGH;
       case Token::kBIT_AND:
+        FALL_THROUGH;
       case Token::kADD:
+        FALL_THROUGH;
       case Token::kSUB:
+        FALL_THROUGH;
       case Token::kMUL: {
         if (FlowGraphCompiler::SupportsUnboxedInt64()) {
           if (op_kind == Token::kSHR || op_kind == Token::kSHL) {
@@ -648,6 +658,7 @@
 
     switch (op_kind) {
       case Token::kEQ:
+        FALL_THROUGH;
       case Token::kNE: {
         // TODO(dartbug.com/32166): Support EQ, NE for nullable doubles.
         // (requires null-aware comparison instruction).
@@ -662,8 +673,11 @@
         break;
       }
       case Token::kLT:
+        FALL_THROUGH;
       case Token::kLTE:
+        FALL_THROUGH;
       case Token::kGT:
+        FALL_THROUGH;
       case Token::kGTE: {
         left_value = PrepareStaticOpInput(left_value, kDoubleCid, instr);
         right_value = PrepareStaticOpInput(right_value, kDoubleCid, instr);
@@ -673,8 +687,11 @@
         break;
       }
       case Token::kADD:
+        FALL_THROUGH;
       case Token::kSUB:
+        FALL_THROUGH;
       case Token::kMUL:
+        FALL_THROUGH;
       case Token::kDIV: {
         if (op_kind == Token::kDIV &&
             !FlowGraphCompiler::SupportsHardwareDivision()) {
@@ -689,10 +706,15 @@
       }
 
       case Token::kBIT_OR:
+        FALL_THROUGH;
       case Token::kBIT_XOR:
+        FALL_THROUGH;
       case Token::kBIT_AND:
+        FALL_THROUGH;
       case Token::kMOD:
+        FALL_THROUGH;
       case Token::kTRUNCDIV:
+        FALL_THROUGH;
       default:
         break;
     }
@@ -745,8 +767,6 @@
 // TODO(dartbug.com/30635) Evaluate how much this can be shared with
 // JitCallSpecializer.
 void AotCallSpecializer::VisitInstanceCall(InstanceCallInstr* instr) {
-  ASSERT(FLAG_precompiled_mode);
-
   // Type test is special as it always gets converted into inlined code.
   const Token::Kind op_kind = instr->token_kind();
   if (Token::IsTypeTestOperator(op_kind)) {
diff --git a/runtime/vm/compiler/aot/precompiler.cc b/runtime/vm/compiler/aot/precompiler.cc
index 2187130..58750f8 100644
--- a/runtime/vm/compiler/aot/precompiler.cc
+++ b/runtime/vm/compiler/aot/precompiler.cc
@@ -126,19 +126,6 @@
   Thread::Current()->long_jump_base()->Jump(1, error);
 }
 
-TypeRangeCache::TypeRangeCache(Precompiler* precompiler,
-                               Thread* thread,
-                               intptr_t num_cids)
-    : precompiler_(precompiler),
-      thread_(thread),
-      lower_limits_(thread->zone()->Alloc<intptr_t>(num_cids)),
-      upper_limits_(thread->zone()->Alloc<intptr_t>(num_cids)) {
-  for (intptr_t i = 0; i < num_cids; i++) {
-    lower_limits_[i] = kNotComputed;
-    upper_limits_[i] = kNotComputed;
-  }
-}
-
 RawError* Precompiler::CompileAll() {
   LongJumpScope jump;
   if (setjmp(*jump.Set()) == 0) {
@@ -807,6 +794,8 @@
         Z, Closure::Cast(instance).instantiator_type_arguments()));
     AddTypeArguments(TypeArguments::Handle(
         Z, Closure::Cast(instance).function_type_arguments()));
+    AddTypeArguments(TypeArguments::Handle(
+        Z, Closure::Cast(instance).delayed_type_arguments()));
     return;
   }
 
@@ -877,8 +866,8 @@
       // Should not be in the middle of initialization while precompiling.
       ASSERT(value.raw() != Object::transition_sentinel().raw());
 
-      if (!field.HasInitializer() ||
-          !Function::Handle(Z, field.Initializer()).HasCode()) {
+      if (!field.HasInitializerFunction() ||
+          !Function::Handle(Z, field.InitializerFunction()).HasCode()) {
         if (FLAG_trace_precompiler) {
           THR_Print("Precompiling initializer for %s\n", field.ToCString());
         }
@@ -890,7 +879,7 @@
         const Function& initializer =
             Function::Handle(Z, CompileStaticInitializer(field));
         ASSERT(!initializer.IsNull());
-        field.SetInitializer(initializer);
+        field.SetInitializerFunction(initializer);
         AddCalleesOf(initializer, gop_offset);
       }
     }
@@ -987,6 +976,7 @@
   auto& cls = Class::Handle(Z);
   auto& members = Array::Handle(Z);
   auto& function = Function::Handle(Z);
+  auto& function2 = Function::Handle(Z);
   auto& field = Field::Handle(Z);
   auto& metadata = Array::Handle(Z);
   auto& reusable_object_handle = Object::Handle(Z);
@@ -1051,13 +1041,23 @@
         if (function.has_pragma()) {
           metadata ^= lib.GetMetadata(function);
           if (metadata.IsNull()) continue;
-          if (FindEntryPointPragma(isolate(), metadata, &reusable_field_handle,
-                                   &reusable_object_handle) !=
-              EntryPointPragma::kAlways) {
-            continue;
+          auto type =
+              FindEntryPointPragma(isolate(), metadata, &reusable_field_handle,
+                                   &reusable_object_handle);
+
+          if (type == EntryPointPragma::kAlways ||
+              type == EntryPointPragma::kCallOnly) {
+            AddFunction(function);
           }
 
-          AddFunction(function);
+          if ((type == EntryPointPragma::kAlways ||
+               type == EntryPointPragma::kGetterOnly) &&
+              function.kind() != RawFunction::kConstructor &&
+              !function.IsSetterFunction()) {
+            function2 = function.ImplicitClosureFunction();
+            AddFunction(function2);
+          }
+
           if (function.IsGenerativeConstructor()) {
             AddInstantiatedClass(cls);
           }
@@ -1508,7 +1508,7 @@
   for (intptr_t i = 0; i < types.length(); i++) {
     const AbstractType& type = types.At(i);
 
-    if (type.InVMHeap()) {
+    if (type.InVMIsolateHeap()) {
       // The only important types in the vm isolate are "dynamic"/"void", which
       // will get their optimized top-type testing stub installed at creation.
       continue;
@@ -2221,9 +2221,9 @@
   const auto pool_attachment = FLAG_use_bare_instructions
                                    ? Code::PoolAttachment::kNotAttachPool
                                    : Code::PoolAttachment::kAttachPool;
-  const Code& code =
-      Code::Handle(Code::FinalizeCode(function, graph_compiler, assembler,
-                                      pool_attachment, optimized(), stats));
+  const Code& code = Code::Handle(
+      Code::FinalizeCodeAndNotify(function, graph_compiler, assembler,
+                                  pool_attachment, optimized(), stats));
   code.set_is_optimized(optimized());
   code.set_owner(function);
   if (!function.IsOptimizable()) {
diff --git a/runtime/vm/compiler/aot/precompiler.h b/runtime/vm/compiler/aot/precompiler.h
index 28c0a67..0df81c0 100644
--- a/runtime/vm/compiler/aot/precompiler.h
+++ b/runtime/vm/compiler/aot/precompiler.h
@@ -29,25 +29,6 @@
 class FlowGraph;
 class PrecompilerEntryPointsPrinter;
 
-class TypeRangeCache : public ValueObject {
- public:
-  TypeRangeCache(Precompiler* precompiler, Thread* thread, intptr_t num_cids);
-  ~TypeRangeCache();
-
-  bool InstanceOfHasClassRange(const AbstractType& type,
-                               intptr_t* lower_limit,
-                               intptr_t* upper_limit);
-
- private:
-  static const intptr_t kNotComputed = -1;
-  static const intptr_t kNotContiguous = -2;
-
-  Precompiler* precompiler_;
-  Thread* thread_;
-  intptr_t* lower_limits_;
-  intptr_t* upper_limits_;
-};
-
 class SymbolKeyValueTrait {
  public:
   // Typedefs needed for the DirectChainedHashMap template.
diff --git a/runtime/vm/compiler/asm_intrinsifier_arm.cc b/runtime/vm/compiler/asm_intrinsifier_arm.cc
index c00607e..2da017e 100644
--- a/runtime/vm/compiler/asm_intrinsifier_arm.cc
+++ b/runtime/vm/compiler/asm_intrinsifier_arm.cc
@@ -153,7 +153,7 @@
   /* R4: allocation stats address. */                                          \
   __ ldr(R3, Address(SP, kArrayLengthStackOffset)); /* Array length. */        \
   __ StoreIntoObjectNoBarrier(                                                 \
-      R0, FieldAddress(R0, target::TypedData::length_offset()), R3);           \
+      R0, FieldAddress(R0, target::TypedDataBase::length_offset()), R3);       \
   /* Initialize all array elements to 0. */                                    \
   /* R0: new object start as a tagged pointer. */                              \
   /* R1: new object end address. */                                            \
@@ -165,6 +165,8 @@
   __ LoadImmediate(R8, 0);                                                     \
   __ mov(R9, Operand(R8));                                                     \
   __ AddImmediate(R3, R0, target::TypedData::InstanceSize() - 1);              \
+  __ StoreInternalPointer(                                                     \
+      R0, FieldAddress(R0, target::TypedDataBase::data_field_offset()), R3);   \
   Label init_loop;                                                             \
   __ Bind(&init_loop);                                                         \
   __ AddImmediate(R3, 2 * target::kWordSize);                                  \
diff --git a/runtime/vm/compiler/asm_intrinsifier_arm64.cc b/runtime/vm/compiler/asm_intrinsifier_arm64.cc
index 6ba42cd..6c63421 100644
--- a/runtime/vm/compiler/asm_intrinsifier_arm64.cc
+++ b/runtime/vm/compiler/asm_intrinsifier_arm64.cc
@@ -168,7 +168,7 @@
   /* R1: new object end address. */                                            \
   __ ldr(R2, Address(SP, kArrayLengthStackOffset)); /* Array length. */        \
   __ StoreIntoObjectNoBarrier(                                                 \
-      R0, FieldAddress(R0, target::TypedData::length_offset()), R2);           \
+      R0, FieldAddress(R0, target::TypedDataBase::length_offset()), R2);       \
   /* Initialize all array elements to 0. */                                    \
   /* R0: new object start as a tagged pointer. */                              \
   /* R1: new object end address. */                                            \
@@ -177,6 +177,8 @@
   /* data area to be initialized. */                                           \
   __ mov(R3, ZR);                                                              \
   __ AddImmediate(R2, R0, target::TypedData::InstanceSize() - 1);              \
+  __ StoreInternalPointer(                                                     \
+      R0, FieldAddress(R0, target::TypedDataBase::data_field_offset()), R2);   \
   Label init_loop, done;                                                       \
   __ Bind(&init_loop);                                                         \
   __ cmp(R2, Operand(R1));                                                     \
diff --git a/runtime/vm/compiler/asm_intrinsifier_ia32.cc b/runtime/vm/compiler/asm_intrinsifier_ia32.cc
index 392d129..d26494d 100644
--- a/runtime/vm/compiler/asm_intrinsifier_ia32.cc
+++ b/runtime/vm/compiler/asm_intrinsifier_ia32.cc
@@ -158,7 +158,7 @@
   /* EBX: new object end address. */                                           \
   __ movl(EDI, Address(ESP, kArrayLengthStackOffset)); /* Array length. */     \
   __ StoreIntoObjectNoBarrier(                                                 \
-      EAX, FieldAddress(EAX, target::TypedData::length_offset()), EDI);        \
+      EAX, FieldAddress(EAX, target::TypedDataBase::length_offset()), EDI);    \
   /* Initialize all array elements to 0. */                                    \
   /* EAX: new object start as a tagged pointer. */                             \
   /* EBX: new object end address. */                                           \
@@ -167,6 +167,9 @@
   /* data area to be initialized. */                                           \
   __ xorl(ECX, ECX); /* Zero. */                                               \
   __ leal(EDI, FieldAddress(EAX, target::TypedData::InstanceSize()));          \
+  __ StoreInternalPointer(                                                     \
+      EAX, FieldAddress(EAX, target::TypedDataBase::data_field_offset()),      \
+      EDI);                                                                    \
   Label done, init_loop;                                                       \
   __ Bind(&init_loop);                                                         \
   __ cmpl(EDI, EBX);                                                           \
@@ -2210,7 +2213,7 @@
 // On stack: user tag (+1), return-address (+0).
 void AsmIntrinsifier::UserTag_makeCurrent(Assembler* assembler,
                                           Label* normal_ir_body) {
-  // RDI: Isolate.
+  // EDI: Isolate.
   __ LoadIsolate(EDI);
   // EAX: Current user tag.
   __ movl(EAX, Address(EDI, target::Isolate::current_tag_offset()));
diff --git a/runtime/vm/compiler/asm_intrinsifier_x64.cc b/runtime/vm/compiler/asm_intrinsifier_x64.cc
index 1c34df5..76618bc 100644
--- a/runtime/vm/compiler/asm_intrinsifier_x64.cc
+++ b/runtime/vm/compiler/asm_intrinsifier_x64.cc
@@ -160,7 +160,7 @@
   /* RCX: new object end address. */                                           \
   __ movq(RDI, Address(RSP, kArrayLengthStackOffset)); /* Array length. */     \
   __ StoreIntoObjectNoBarrier(                                                 \
-      RAX, FieldAddress(RAX, target::TypedData::length_offset()), RDI);        \
+      RAX, FieldAddress(RAX, target::TypedDataBase::length_offset()), RDI);    \
   /* Initialize all array elements to 0. */                                    \
   /* RAX: new object start as a tagged pointer. */                             \
   /* RCX: new object end address. */                                           \
@@ -169,6 +169,9 @@
   /* data area to be initialized. */                                           \
   __ xorq(RBX, RBX); /* Zero. */                                               \
   __ leaq(RDI, FieldAddress(RAX, target::TypedData::InstanceSize()));          \
+  __ StoreInternalPointer(                                                     \
+      RAX, FieldAddress(RAX, target::TypedDataBase::data_field_offset()),      \
+      RDI);                                                                    \
   Label done, init_loop;                                                       \
   __ Bind(&init_loop);                                                         \
   __ cmpq(RDI, RCX);                                                           \
diff --git a/runtime/vm/compiler/assembler/assembler_arm.cc b/runtime/vm/compiler/assembler/assembler_arm.cc
index d441d61..b3debf1 100644
--- a/runtime/vm/compiler/assembler/assembler_arm.cc
+++ b/runtime/vm/compiler/assembler/assembler_arm.cc
@@ -547,6 +547,90 @@
   Emit(encoding);
 }
 
+void Assembler::TransitionGeneratedToNative(Register destination_address,
+                                            Register addr,
+                                            Register state) {
+  // Save exit frame information to enable stack walking.
+  StoreToOffset(kWord, FP, THR, Thread::top_exit_frame_info_offset());
+
+  // Mark that the thread is executing native code.
+  StoreToOffset(kWord, destination_address, THR, Thread::vm_tag_offset());
+  LoadImmediate(state, compiler::target::Thread::native_execution_state());
+  StoreToOffset(kWord, state, THR, Thread::execution_state_offset());
+
+  if (TargetCPUFeatures::arm_version() == ARMv5TE) {
+    EnterSafepointSlowly();
+  } else {
+    Label slow_path, done, retry;
+    LoadImmediate(addr, compiler::target::Thread::safepoint_state_offset());
+    add(addr, THR, Operand(addr));
+    Bind(&retry);
+    ldrex(state, addr);
+    cmp(state, Operand(Thread::safepoint_state_unacquired()));
+    b(&slow_path, NE);
+
+    mov(state, Operand(Thread::safepoint_state_acquired()));
+    strex(TMP, state, addr);
+    cmp(TMP, Operand(0));  // 0 means strex was successful.
+    b(&done, EQ);
+    b(&retry);
+
+    Bind(&slow_path);
+    EnterSafepointSlowly();
+
+    Bind(&done);
+  }
+}
+
+void Assembler::EnterSafepointSlowly() {
+  ldr(TMP,
+      Address(THR, compiler::target::Thread::enter_safepoint_stub_offset()));
+  ldr(TMP, FieldAddress(TMP, compiler::target::Code::entry_point_offset()));
+  blx(TMP);
+}
+
+void Assembler::TransitionNativeToGenerated(Register addr, Register state) {
+  if (TargetCPUFeatures::arm_version() == ARMv5TE) {
+    ExitSafepointSlowly();
+  } else {
+    Label slow_path, done, retry;
+    LoadImmediate(addr, compiler::target::Thread::safepoint_state_offset());
+    add(addr, THR, Operand(addr));
+    Bind(&retry);
+    ldrex(state, addr);
+    cmp(state, Operand(Thread::safepoint_state_acquired()));
+    b(&slow_path, NE);
+
+    mov(state, Operand(Thread::safepoint_state_unacquired()));
+    strex(TMP, state, addr);
+    cmp(TMP, Operand(0));  // 0 means strex was successful.
+    b(&done, EQ);
+    b(&retry);
+
+    Bind(&slow_path);
+    ExitSafepointSlowly();
+
+    Bind(&done);
+  }
+
+  // Mark that the thread is executing Dart code.
+  LoadImmediate(state, compiler::target::Thread::vm_tag_compiled_id());
+  StoreToOffset(kWord, state, THR, Thread::vm_tag_offset());
+  LoadImmediate(state, compiler::target::Thread::generated_execution_state());
+  StoreToOffset(kWord, state, THR, Thread::execution_state_offset());
+
+  // Reset exit frame information in Isolate structure.
+  LoadImmediate(state, 0);
+  StoreToOffset(kWord, state, THR, Thread::top_exit_frame_info_offset());
+}
+
+void Assembler::ExitSafepointSlowly() {
+  ldr(TMP,
+      Address(THR, compiler::target::Thread::exit_safepoint_stub_offset()));
+  ldr(TMP, FieldAddress(TMP, compiler::target::Code::entry_point_offset()));
+  blx(TMP);
+}
+
 void Assembler::clrex() {
   ASSERT(TargetCPUFeatures::arm_version() != ARMv5TE);
   int32_t encoding = (kSpecialCondition << kConditionShift) | B26 | B24 | B22 |
@@ -1747,6 +1831,11 @@
 #if defined(DEBUG)
   Label done;
   StoreIntoObjectFilter(object, value, &done, kValueCanBeSmi, kJumpToNoUpdate);
+
+  ldrb(TMP, FieldAddress(object, target::Object::tags_offset()));
+  tst(TMP, Operand(1 << target::RawObject::kOldAndNotRememberedBit));
+  b(&done, ZERO);
+
   Stop("Store buffer update is required");
   Bind(&done);
 #endif  // defined(DEBUG)
@@ -1794,6 +1883,12 @@
   }
 }
 
+void Assembler::StoreInternalPointer(Register object,
+                                     const Address& dest,
+                                     Register value) {
+  str(value, dest);
+}
+
 void Assembler::InitializeFieldsNoBarrier(Register object,
                                           Register begin,
                                           Register end,
@@ -3147,8 +3242,6 @@
     }
   }
 
-  LoadPoolPointer();
-
   ReserveAlignedFrameSpace(frame_space);
 }
 
@@ -3191,7 +3284,7 @@
   entry.Call(this, argument_count);
 }
 
-void Assembler::EnterDartFrame(intptr_t frame_size) {
+void Assembler::EnterDartFrame(intptr_t frame_size, bool load_pool_pointer) {
   ASSERT(!constant_pool_allowed());
 
   // Registers are pushed in descending order: R5 | R6 | R7/R11 | R14.
@@ -3203,7 +3296,7 @@
     EnterFrame((1 << PP) | (1 << CODE_REG) | (1 << FP) | (1 << LR), 0);
 
     // Setup pool pointer for this dart function.
-    LoadPoolPointer();
+    if (load_pool_pointer) LoadPoolPointer();
   } else {
     EnterFrame((1 << FP) | (1 << LR), 0);
   }
@@ -3584,28 +3677,6 @@
   strb(tmp, Address(addr, 3));
 }
 
-static const char* cpu_reg_names[kNumberOfCpuRegisters] = {
-    "r0", "r1",  "r2", "r3", "r4", "r5", "r6", "r7",
-    "r8", "ctx", "pp", "fp", "ip", "sp", "lr", "pc",
-};
-
-const char* Assembler::RegisterName(Register reg) {
-  ASSERT((0 <= reg) && (reg < kNumberOfCpuRegisters));
-  return cpu_reg_names[reg];
-}
-
-static const char* fpu_reg_names[kNumberOfFpuRegisters] = {
-    "q0", "q1", "q2",  "q3",  "q4",  "q5",  "q6",  "q7",
-#if defined(VFPv3_D32)
-    "q8", "q9", "q10", "q11", "q12", "q13", "q14", "q15",
-#endif
-};
-
-const char* Assembler::FpuRegisterName(FpuRegister reg) {
-  ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters));
-  return fpu_reg_names[reg];
-}
-
 }  // namespace compiler
 }  // namespace dart
 
diff --git a/runtime/vm/compiler/assembler/assembler_arm.h b/runtime/vm/compiler/assembler/assembler_arm.h
index 6b79492..3f37cbd6 100644
--- a/runtime/vm/compiler/assembler/assembler_arm.h
+++ b/runtime/vm/compiler/assembler/assembler_arm.h
@@ -15,7 +15,7 @@
 #include "platform/utils.h"
 #include "vm/code_entry_kind.h"
 #include "vm/compiler/runtime_api.h"
-#include "vm/constants_arm.h"
+#include "vm/constants.h"
 #include "vm/cpu.h"
 #include "vm/hash_map.h"
 #include "vm/simulator.h"
@@ -379,10 +379,6 @@
 
   static void InitializeMemoryWithBreakpoints(uword data, intptr_t length);
 
-  static const char* RegisterName(Register reg);
-
-  static const char* FpuRegisterName(FpuRegister reg);
-
   // Data-processing instructions.
   void and_(Register rd, Register rn, Operand o, Condition cond = AL);
 
@@ -514,6 +510,13 @@
   void ldrex(Register rd, Register rn, Condition cond = AL);
   void strex(Register rd, Register rt, Register rn, Condition cond = AL);
 
+  // Requires two temporary registers 'scratch0' and 'scratch1' (in addition to
+  // TMP).
+  void TransitionGeneratedToNative(Register destination_address,
+                                   Register scratch0,
+                                   Register scratch1);
+  void TransitionNativeToGenerated(Register scratch0, Register scratch1);
+
   // Miscellaneous instructions.
   void clrex();
   void nop(Condition cond = AL);
@@ -808,6 +811,11 @@
                                       int32_t offset,
                                       const Object& value);
 
+  // Stores a non-tagged value into a heap object.
+  void StoreInternalPointer(Register object,
+                            const Address& dest,
+                            Register value);
+
   // Store value_even, value_odd, value_even, ... into the words in the address
   // range [begin, end), assumed to be uninitialized fields in object (tagged).
   // The stores must not need a generational store barrier (e.g., smi/null),
@@ -854,6 +862,13 @@
                      Register base,
                      int32_t offset,
                      Condition cond = AL);
+  void StoreFieldToOffset(OperandSize type,
+                          Register reg,
+                          Register base,
+                          int32_t offset,
+                          Condition cond = AL) {
+    StoreToOffset(type, reg, base, offset - kHeapObjectTag, cond);
+  }
   void LoadSFromOffset(SRegister reg,
                        Register base,
                        int32_t offset,
@@ -1002,7 +1017,7 @@
   // Set up a Dart frame on entry with a frame pointer and PC information to
   // enable easy access to the RawInstruction object of code corresponding
   // to this frame.
-  void EnterDartFrame(intptr_t frame_size);
+  void EnterDartFrame(intptr_t frame_size, bool load_pool_pointer = true);
 
   void LeaveDartFrame();
 
@@ -1283,6 +1298,9 @@
                              CanBeSmi can_be_smi,
                              BarrierFilterMode barrier_filter_mode);
 
+  void EnterSafepointSlowly();
+  void ExitSafepointSlowly();
+
   friend class dart::FlowGraphCompiler;
   std::function<void(Condition, Register)>
       generate_invoke_write_barrier_wrapper_;
diff --git a/runtime/vm/compiler/assembler/assembler_arm64.cc b/runtime/vm/compiler/assembler/assembler_arm64.cc
index b41c7a4..c88687fc 100644
--- a/runtime/vm/compiler/assembler/assembler_arm64.cc
+++ b/runtime/vm/compiler/assembler/assembler_arm64.cc
@@ -68,28 +68,6 @@
   buffer_.Emit<int32_t>(value);
 }
 
-static const char* cpu_reg_names[kNumberOfCpuRegisters] = {
-    "r0",  "r1",  "r2",  "r3",  "r4",  "r5",  "r6",  "r7",  "r8",  "r9",  "r10",
-    "r11", "r12", "r13", "r14", "r15", "r16", "r17", "r18", "r19", "r20", "r21",
-    "r22", "r23", "r24", "ip0", "ip1", "pp",  "ctx", "fp",  "lr",  "r31",
-};
-
-const char* Assembler::RegisterName(Register reg) {
-  ASSERT((0 <= reg) && (reg < kNumberOfCpuRegisters));
-  return cpu_reg_names[reg];
-}
-
-static const char* fpu_reg_names[kNumberOfFpuRegisters] = {
-    "v0",  "v1",  "v2",  "v3",  "v4",  "v5",  "v6",  "v7",  "v8",  "v9",  "v10",
-    "v11", "v12", "v13", "v14", "v15", "v16", "v17", "v18", "v19", "v20", "v21",
-    "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30", "v31",
-};
-
-const char* Assembler::FpuRegisterName(FpuRegister reg) {
-  ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters));
-  return fpu_reg_names[reg];
-}
-
 int32_t Assembler::BindImm19Branch(int64_t position, int64_t dest) {
   if (use_far_branches() && !CanEncodeImm19BranchOffset(dest)) {
     // Far branches are enabled, and we can't encode the branch offset in
@@ -1093,6 +1071,11 @@
 #if defined(DEBUG)
   Label done;
   StoreIntoObjectFilter(object, value, &done, kValueCanBeSmi, kJumpToNoUpdate);
+
+  ldr(TMP, FieldAddress(object, target::Object::tags_offset()), kUnsignedByte);
+  tsti(TMP, Immediate(1 << target::RawObject::kOldAndNotRememberedBit));
+  b(&done, ZERO);
+
   Stop("Store buffer update is required");
   Bind(&done);
 #endif  // defined(DEBUG)
@@ -1131,6 +1114,12 @@
   }
 }
 
+void Assembler::StoreInternalPointer(Register object,
+                                     const Address& dest,
+                                     Register value) {
+  str(value, dest);
+}
+
 void Assembler::LoadClassId(Register result, Register object) {
   ASSERT(RawObject::kClassIdTagPos == 16);
   ASSERT(RawObject::kClassIdTagSize == 16);
@@ -1316,9 +1305,82 @@
   LeaveFrame();
 }
 
+void Assembler::TransitionGeneratedToNative(Register destination,
+                                            Register state) {
+  Register addr = TMP2;
+
+  // Save exit frame information to enable stack walking.
+  StoreToOffset(FPREG, THR,
+                compiler::target::Thread::top_exit_frame_info_offset());
+
+  // Mark that the thread is executing native code.
+  StoreToOffset(destination, THR, compiler::target::Thread::vm_tag_offset());
+  LoadImmediate(state, Thread::native_execution_state());
+  StoreToOffset(state, THR, compiler::target::Thread::execution_state_offset());
+
+  Label slow_path, done, retry;
+  movz(addr, Immediate(compiler::target::Thread::safepoint_state_offset()), 0);
+  add(addr, THR, Operand(addr));
+  Bind(&retry);
+  ldxr(state, addr);
+  cmp(state, Operand(Thread::safepoint_state_unacquired()));
+  b(&slow_path, NE);
+
+  movz(state, Immediate(Thread::safepoint_state_acquired()), 0);
+  stxr(TMP, state, addr);
+  cbz(&done, TMP);  // 0 means stxr was successful.
+  b(&retry);
+
+  Bind(&slow_path);
+  ldr(addr,
+      Address(THR, compiler::target::Thread::enter_safepoint_stub_offset()));
+  ldr(addr, FieldAddress(addr, compiler::target::Code::entry_point_offset()));
+  blr(addr);
+
+  Bind(&done);
+}
+
+void Assembler::TransitionNativeToGenerated(Register state) {
+  Register addr = TMP2;
+
+  Label slow_path, done, retry;
+  movz(addr, Immediate(compiler::target::Thread::safepoint_state_offset()), 0);
+  add(addr, THR, Operand(addr));
+  Bind(&retry);
+  ldxr(state, addr);
+  cmp(state, Operand(Thread::safepoint_state_acquired()));
+  b(&slow_path, NE);
+
+  movz(state, Immediate(Thread::safepoint_state_unacquired()), 0);
+  stxr(TMP, state, addr);
+  cbz(&done, TMP);  // 0 means stxr was successful.
+  b(&retry);
+
+  Bind(&slow_path);
+  ldr(addr,
+      Address(THR, compiler::target::Thread::exit_safepoint_stub_offset()));
+  ldr(addr, FieldAddress(TMP, compiler::target::Code::entry_point_offset()));
+  blr(addr);
+
+  Bind(&done);
+
+  // Mark that the thread is executing Dart code.
+  LoadImmediate(state, compiler::target::Thread::vm_tag_compiled_id());
+  StoreToOffset(state, THR, compiler::target::Thread::vm_tag_offset());
+  LoadImmediate(state, compiler::target::Thread::generated_execution_state());
+  StoreToOffset(state, THR, compiler::target::Thread::execution_state_offset());
+
+  // Reset exit frame information in Isolate structure.
+  StoreToOffset(ZR, THR,
+                compiler::target::Thread::top_exit_frame_info_offset());
+}
+
 void Assembler::EnterCallRuntimeFrame(intptr_t frame_size) {
   Comment("EnterCallRuntimeFrame");
-  EnterStubFrame();
+  EnterFrame(0);
+  if (!(FLAG_precompiled_mode && FLAG_use_bare_instructions)) {
+    TagAndPushPPAndPcMarker();  // Save PP and PC marker.
+  }
 
   // Store fpu registers with the lowest register number at the lowest
   // address.
diff --git a/runtime/vm/compiler/assembler/assembler_arm64.h b/runtime/vm/compiler/assembler/assembler_arm64.h
index da5466b..1ff5ac9 100644
--- a/runtime/vm/compiler/assembler/assembler_arm64.h
+++ b/runtime/vm/compiler/assembler/assembler_arm64.h
@@ -14,7 +14,7 @@
 #include "platform/assert.h"
 #include "platform/utils.h"
 #include "vm/class_id.h"
-#include "vm/constants_arm64.h"
+#include "vm/constants.h"
 #include "vm/hash_map.h"
 #include "vm/simulator.h"
 
@@ -473,10 +473,6 @@
 
   static void InitializeMemoryWithBreakpoints(uword data, intptr_t length);
 
-  static const char* RegisterName(Register reg);
-
-  static const char* FpuRegisterName(FpuRegister reg);
-
   void SetPrologueOffset() {
     if (prologue_offset_ == -1) {
       prologue_offset_ = CodeSize();
@@ -1265,11 +1261,9 @@
     ldr(reg, Address(SP, 1 * target::kWordSize, Address::PostIndex));
   }
   void PushPair(Register low, Register high) {
-    ASSERT((low != PP) && (high != PP));
     stp(low, high, Address(SP, -2 * target::kWordSize, Address::PairPreIndex));
   }
   void PopPair(Register low, Register high) {
-    ASSERT((low != PP) && (high != PP));
     ldp(low, high, Address(SP, 2 * target::kWordSize, Address::PairPostIndex));
   }
   void PushFloat(VRegister reg) {
@@ -1475,6 +1469,11 @@
                                       int32_t offset,
                                       const Object& value);
 
+  // Stores a non-tagged value into a heap object.
+  void StoreInternalPointer(Register object,
+                            const Address& dest,
+                            Register value);
+
   // Object pool, loading from pool, etc.
   void LoadPoolPointer(Register pp = PP);
 
@@ -1528,6 +1527,12 @@
   void LeaveFrame();
   void Ret() { ret(LR); }
 
+  // These require that CSP and SP are equal and aligned.
+  // These require a scratch register (in addition to TMP/TMP2).
+  void TransitionGeneratedToNative(Register destination_address,
+                                   Register scratch);
+  void TransitionNativeToGenerated(Register scratch);
+
   void CheckCodePointer();
   void RestoreCodePointer();
 
diff --git a/runtime/vm/compiler/assembler/assembler_dbc.cc b/runtime/vm/compiler/assembler/assembler_dbc.cc
index 141c36a..fe6f47f 100644
--- a/runtime/vm/compiler/assembler/assembler_dbc.cc
+++ b/runtime/vm/compiler/assembler/assembler_dbc.cc
@@ -71,14 +71,6 @@
   buffer_.Emit<int32_t>(value);
 }
 
-const char* Assembler::RegisterName(Register reg) {
-  return ThreadState::Current()->zone()->PrintToString("R%d", reg);
-}
-
-const char* Assembler::FpuRegisterName(FpuRegister reg) {
-  return ThreadState::Current()->zone()->PrintToString("F%d", reg);
-}
-
 static int32_t EncodeJump(int32_t relative_pc) {
   return SimulatorBytecode::kJump | (relative_pc << 8);
 }
diff --git a/runtime/vm/compiler/assembler/assembler_dbc.h b/runtime/vm/compiler/assembler/assembler_dbc.h
index 3c57878..253fdc1 100644
--- a/runtime/vm/compiler/assembler/assembler_dbc.h
+++ b/runtime/vm/compiler/assembler/assembler_dbc.h
@@ -44,10 +44,6 @@
 
   static void InitializeMemoryWithBreakpoints(uword data, intptr_t length);
 
-  static const char* RegisterName(Register reg);
-
-  static const char* FpuRegisterName(FpuRegister reg);
-
   static uword GetBreakInstructionFiller() { return SimulatorBytecode::kTrap; }
 
   static bool IsSafe(const Object& value) { return true; }
diff --git a/runtime/vm/compiler/assembler/assembler_dbc_test.cc b/runtime/vm/compiler/assembler/assembler_dbc_test.cc
index c87d7aa..1b192b5 100644
--- a/runtime/vm/compiler/assembler/assembler_dbc_test.cc
+++ b/runtime/vm/compiler/assembler/assembler_dbc_test.cc
@@ -75,9 +75,9 @@
   const char* dummy_function_name = "dummy_instance_function";
   const Function& dummy_instance_function =
       Function::Handle(CreateFunction(dummy_function_name));
-  Code& code = Code::Handle(
-      Code::FinalizeCode(dummy_instance_function, nullptr, &_assembler_,
-                         Code::PoolAttachment::kAttachPool));
+  Code& code = Code::Handle(Code::FinalizeCodeAndNotify(
+      dummy_instance_function, nullptr, &_assembler_,
+      Code::PoolAttachment::kAttachPool));
   dummy_instance_function.AttachCode(code);
 
   // Make a dummy ICData.
@@ -1681,6 +1681,70 @@
   EXPECT_EQ(42, EXECUTE_TEST_CODE_INTPTR(test->code()));
 }
 
+ASSEMBLER_TEST_GENERATE(IfEqNullTOSNotNull, assembler) {
+  Label branch_taken;
+  __ PushConstant(Smi::Handle(Smi::New(-1)));
+  __ IfEqNullTOS();
+  __ Jump(&branch_taken);
+  __ PushConstant(Smi::Handle(Smi::New(42)));
+  __ ReturnTOS();
+  __ Bind(&branch_taken);
+  __ PushConstant(Smi::Handle(Smi::New(0)));
+  __ ReturnTOS();
+}
+
+ASSEMBLER_TEST_RUN(IfEqNullTOSNotNull, test) {
+  EXPECT_EQ(42, EXECUTE_TEST_CODE_INTPTR(test->code()));
+}
+
+ASSEMBLER_TEST_GENERATE(IfEqNullTOSIsNull, assembler) {
+  Label branch_taken;
+  __ PushConstant(Object::null_object());
+  __ IfEqNullTOS();
+  __ Jump(&branch_taken);
+  __ PushConstant(Smi::Handle(Smi::New(0)));
+  __ ReturnTOS();
+  __ Bind(&branch_taken);
+  __ PushConstant(Smi::Handle(Smi::New(42)));
+  __ ReturnTOS();
+}
+
+ASSEMBLER_TEST_RUN(IfEqNullTOSIsNull, test) {
+  EXPECT_EQ(42, EXECUTE_TEST_CODE_INTPTR(test->code()));
+}
+
+ASSEMBLER_TEST_GENERATE(IfNeNullTOSNotNull, assembler) {
+  Label branch_taken;
+  __ PushConstant(Smi::Handle(Smi::New(-1)));
+  __ IfNeNullTOS();
+  __ Jump(&branch_taken);
+  __ PushConstant(Smi::Handle(Smi::New(0)));
+  __ ReturnTOS();
+  __ Bind(&branch_taken);
+  __ PushConstant(Smi::Handle(Smi::New(42)));
+  __ ReturnTOS();
+}
+
+ASSEMBLER_TEST_RUN(IfNeNullTOSNotNull, test) {
+  EXPECT_EQ(42, EXECUTE_TEST_CODE_INTPTR(test->code()));
+}
+
+ASSEMBLER_TEST_GENERATE(IfNeNullTOSIsNull, assembler) {
+  Label branch_taken;
+  __ PushConstant(Object::null_object());
+  __ IfNeNullTOS();
+  __ Jump(&branch_taken);
+  __ PushConstant(Smi::Handle(Smi::New(42)));
+  __ ReturnTOS();
+  __ Bind(&branch_taken);
+  __ PushConstant(Smi::Handle(Smi::New(0)));
+  __ ReturnTOS();
+}
+
+ASSEMBLER_TEST_RUN(IfNeNullTOSIsNull, test) {
+  EXPECT_EQ(42, EXECUTE_TEST_CODE_INTPTR(test->code()));
+}
+
 //  - If<Cond> rA, rD
 //
 //    Cond is Le, Lt, Ge, Gt, unsigned variants ULe, ULt, UGe, UGt, and
diff --git a/runtime/vm/compiler/assembler/assembler_ia32.cc b/runtime/vm/compiler/assembler/assembler_ia32.cc
index f1ef6b1..4ca49e3 100644
--- a/runtime/vm/compiler/assembler/assembler_ia32.cc
+++ b/runtime/vm/compiler/assembler/assembler_ia32.cc
@@ -1910,6 +1910,11 @@
   Label done;
   pushl(value);
   StoreIntoObjectFilter(object, value, &done, kValueCanBeSmi, kJumpToNoUpdate);
+
+  testb(FieldAddress(object, target::Object::tags_offset()),
+        Immediate(1 << target::RawObject::kOldAndNotRememberedBit));
+  j(ZERO, &done, Assembler::kNearJump);
+
   Stop("Store buffer update is required");
   Bind(&done);
   popl(value);
@@ -1975,6 +1980,12 @@
   // No store buffer update.
 }
 
+void Assembler::StoreInternalPointer(Register object,
+                                     const Address& dest,
+                                     Register value) {
+  movl(dest, value);
+}
+
 void Assembler::StoreIntoSmiField(const Address& dest, Register value) {
 #if defined(DEBUG)
   Label done;
@@ -2067,6 +2078,72 @@
   }
 }
 
+void Assembler::TransitionGeneratedToNative(Register destination_address,
+                                            Register scratch) {
+  // Save exit frame information to enable stack walking.
+  movl(Address(THR, Thread::top_exit_frame_info_offset()), FPREG);
+
+  // Mark that the thread is executing native code.
+  movl(VMTagAddress(), destination_address);
+  movl(Address(THR, Thread::execution_state_offset()),
+       Immediate(compiler::target::Thread::native_execution_state()));
+
+  // Compare and swap the value at Thread::safepoint_state from unacquired to
+  // acquired. On success, jump to 'success'; otherwise, fallthrough.
+  pushl(EAX);
+  movl(EAX, Immediate(Thread::safepoint_state_unacquired()));
+  movl(scratch, Immediate(Thread::safepoint_state_acquired()));
+  LockCmpxchgl(Address(THR, Thread::safepoint_state_offset()), scratch);
+  movl(scratch, EAX);
+  popl(EAX);
+  cmpl(scratch, Immediate(Thread::safepoint_state_unacquired()));
+
+  Label done;
+  j(EQUAL, &done);
+
+  movl(scratch,
+       Address(THR, compiler::target::Thread::enter_safepoint_stub_offset()));
+  movl(scratch,
+       FieldAddress(scratch, compiler::target::Code::entry_point_offset()));
+  call(scratch);
+
+  Bind(&done);
+}
+
+void Assembler::TransitionNativeToGenerated(Register scratch) {
+  // Compare and swap the value at Thread::safepoint_state from acquired to
+  // unacquired. On success, jump to 'success'; otherwise, fallthrough.
+  pushl(EAX);
+  movl(EAX, Immediate(compiler::target::Thread::safepoint_state_acquired()));
+  movl(scratch,
+       Immediate(compiler::target::Thread::safepoint_state_unacquired()));
+  LockCmpxchgl(Address(THR, compiler::target::Thread::safepoint_state_offset()),
+               scratch);
+  movl(scratch, EAX);
+  popl(EAX);
+  cmpl(scratch, Immediate(Thread::safepoint_state_acquired()));
+
+  Label done;
+  j(EQUAL, &done);
+
+  movl(scratch,
+       Address(THR, compiler::target::Thread::exit_safepoint_stub_offset()));
+  movl(scratch,
+       FieldAddress(scratch, compiler::target::Code::entry_point_offset()));
+  call(scratch);
+
+  Bind(&done);
+
+  // Mark that the thread is executing Dart code.
+  movl(Assembler::VMTagAddress(),
+       Immediate(compiler::target::Thread::vm_tag_compiled_id()));
+  movl(Address(THR, Thread::execution_state_offset()),
+       Immediate(compiler::target::Thread::generated_execution_state()));
+
+  // Reset exit frame information in Isolate structure.
+  movl(Address(THR, Thread::top_exit_frame_info_offset()), Immediate(0));
+}
+
 static const intptr_t kNumberOfVolatileCpuRegisters = 3;
 static const Register volatile_cpu_registers[kNumberOfVolatileCpuRegisters] = {
     EAX, ECX, EDX};
@@ -2583,24 +2660,6 @@
 
 #endif  // !defined(DART_PRECOMPILED_RUNTIME)
 
-// Used by disassembler, so it is declared outside of
-// !defined(DART_PRECOMPILED_RUNTIME) section.
-static const char* cpu_reg_names[kNumberOfCpuRegisters] = {
-    "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi"};
-
-const char* Assembler::RegisterName(Register reg) {
-  ASSERT((0 <= reg) && (reg < kNumberOfCpuRegisters));
-  return cpu_reg_names[reg];
-}
-
-static const char* xmm_reg_names[kNumberOfXmmRegisters] = {
-    "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"};
-
-const char* Assembler::FpuRegisterName(FpuRegister reg) {
-  ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters));
-  return xmm_reg_names[reg];
-}
-
 }  // namespace compiler
 }  // namespace dart
 
diff --git a/runtime/vm/compiler/assembler/assembler_ia32.h b/runtime/vm/compiler/assembler/assembler_ia32.h
index 1b110d7..91fa1c2 100644
--- a/runtime/vm/compiler/assembler/assembler_ia32.h
+++ b/runtime/vm/compiler/assembler/assembler_ia32.h
@@ -11,7 +11,7 @@
 
 #include "platform/assert.h"
 #include "platform/utils.h"
-#include "vm/constants_ia32.h"
+#include "vm/constants.h"
 #include "vm/constants_x86.h"
 #include "vm/pointer_tagging.h"
 
@@ -466,7 +466,7 @@
   F(sub, 0x2b, 0x29, 5)                                                        \
   F(sbb, 0x1b, 0x19, 3)                                                        \
   F(cmp, 0x3b, 0x39, 7)
-// clang-format on
+  // clang-format on
 
 #define DECLARE_ALU(op, opcode, opcode2, modrm_opcode)                         \
   void op##l(Register dst, Register src) { Alu(4, opcode, dst, src); }         \
@@ -620,6 +620,11 @@
                                 const Address& dest,
                                 const Object& value);
 
+  // Stores a non-tagged value into a heap object.
+  void StoreInternalPointer(Register object,
+                            const Address& dest,
+                            Register value);
+
   // Stores a Smi value into a heap object field that always contains a Smi.
   void StoreIntoSmiField(const Address& dest, Register value);
   void ZeroInitSmiField(const Address& dest);
@@ -640,6 +645,12 @@
   void LeaveFrame();
   void ReserveAlignedFrameSpace(intptr_t frame_space);
 
+  // Require a temporary register 'tmp'.
+  // Clobber all non-CPU registers (e.g. XMM registers and the "FPU stack").
+  void TransitionGeneratedToNative(Register destination_address,
+                                   Register scratch);
+  void TransitionNativeToGenerated(Register scratch);
+
   // Create a frame for calling into runtime that preserves all volatile
   // registers.  Frame's RSP is guaranteed to be correctly aligned and
   // frame_space bytes are reserved under it.
@@ -806,9 +817,6 @@
 
   static void InitializeMemoryWithBreakpoints(uword data, intptr_t length);
 
-  static const char* RegisterName(Register reg);
-  static const char* FpuRegisterName(FpuRegister reg);
-
   // Check if the given value is an integer value that can be directly
   // emdedded into the code without additional XORing with jit_cookie.
   // We consider 16-bit integers, powers of two and corresponding masks
diff --git a/runtime/vm/compiler/assembler/assembler_x64.cc b/runtime/vm/compiler/assembler/assembler_x64.cc
index af6b564..64f3d7ed 100644
--- a/runtime/vm/compiler/assembler/assembler_x64.cc
+++ b/runtime/vm/compiler/assembler/assembler_x64.cc
@@ -164,6 +164,63 @@
   EmitUint8(0xC0 + (dst & 0x07));
 }
 
+void Assembler::TransitionGeneratedToNative(Register destination_address) {
+  // Save exit frame information to enable stack walking.
+  movq(Address(THR, Thread::top_exit_frame_info_offset()), FPREG);
+
+  movq(Assembler::VMTagAddress(), destination_address);
+  movq(Address(THR, compiler::target::Thread::execution_state_offset()),
+       Immediate(compiler::target::Thread::native_execution_state()));
+
+  // Compare and swap the value at Thread::safepoint_state from unacquired to
+  // acquired. If the CAS fails, go to a slow-path stub.
+  Label done;
+  pushq(RAX);
+  movq(RAX, Immediate(Thread::safepoint_state_unacquired()));
+  movq(TMP, Immediate(Thread::safepoint_state_acquired()));
+  LockCmpxchgq(Address(THR, Thread::safepoint_state_offset()), TMP);
+  movq(TMP, RAX);
+  popq(RAX);
+  cmpq(TMP, Immediate(Thread::safepoint_state_unacquired()));
+  j(EQUAL, &done);
+
+  movq(TMP,
+       Address(THR, compiler::target::Thread::enter_safepoint_stub_offset()));
+  movq(TMP, FieldAddress(TMP, compiler::target::Code::entry_point_offset()));
+  CallCFunction(TMP);
+
+  Bind(&done);
+}
+
+void Assembler::TransitionNativeToGenerated() {
+  // Compare and swap the value at Thread::safepoint_state from acquired to
+  // unacquired. On success, jump to 'success'; otherwise, fallthrough.
+  Label done;
+  pushq(RAX);
+  movq(RAX, Immediate(Thread::safepoint_state_acquired()));
+  movq(TMP, Immediate(Thread::safepoint_state_unacquired()));
+  LockCmpxchgq(Address(THR, Thread::safepoint_state_offset()), TMP);
+  movq(TMP, RAX);
+  popq(RAX);
+  cmpq(TMP, Immediate(Thread::safepoint_state_acquired()));
+  j(EQUAL, &done);
+
+  movq(TMP,
+       Address(THR, compiler::target::Thread::exit_safepoint_stub_offset()));
+  movq(TMP, FieldAddress(TMP, compiler::target::Code::entry_point_offset()));
+  CallCFunction(TMP);
+
+  Bind(&done);
+
+  movq(Assembler::VMTagAddress(),
+       Immediate(compiler::target::Thread::vm_tag_compiled_id()));
+  movq(Address(THR, Thread::execution_state_offset()),
+       Immediate(compiler::target::Thread::generated_execution_state()));
+
+  // Reset exit frame information in Isolate structure.
+  movq(Address(THR, Thread::top_exit_frame_info_offset()), Immediate(0));
+}
+
 void Assembler::EmitQ(int reg,
                       const Address& address,
                       int opcode,
@@ -1371,6 +1428,11 @@
   Label done;
   pushq(value);
   StoreIntoObjectFilter(object, value, &done, kValueCanBeSmi, kJumpToNoUpdate);
+
+  testb(FieldAddress(object, target::Object::tags_offset()),
+        Immediate(1 << target::RawObject::kOldAndNotRememberedBit));
+  j(ZERO, &done, Assembler::kNearJump);
+
   Stop("Store buffer update is required");
   Bind(&done);
   popq(value);
@@ -1384,6 +1446,12 @@
   StoreObject(dest, value);
 }
 
+void Assembler::StoreInternalPointer(Register object,
+                                     const Address& dest,
+                                     Register value) {
+  movq(dest, value);
+}
+
 void Assembler::StoreIntoSmiField(const Address& dest, Register value) {
 #if defined(DEBUG)
   Label done;
@@ -1516,7 +1584,11 @@
 
 void Assembler::EnterCallRuntimeFrame(intptr_t frame_space) {
   Comment("EnterCallRuntimeFrame");
-  EnterStubFrame();
+  EnterFrame(0);
+  if (!(FLAG_precompiled_mode && FLAG_use_bare_instructions)) {
+    pushq(CODE_REG);
+    pushq(PP);
+  }
 
   // TODO(vegorov): avoid saving FpuTMP, it is used only as scratch.
   PushRegisters(CallingConventions::kVolatileCpuRegisters,
@@ -2122,26 +2194,6 @@
 
 #endif  // !defined(DART_PRECOMPILED_RUNTIME)
 
-static const char* xmm_reg_names[kNumberOfXmmRegisters] = {
-    "xmm0", "xmm1", "xmm2",  "xmm3",  "xmm4",  "xmm5",  "xmm6",  "xmm7",
-    "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14", "xmm15"};
-
-const char* Assembler::FpuRegisterName(FpuRegister reg) {
-  ASSERT((0 <= reg) && (reg < kNumberOfXmmRegisters));
-  return xmm_reg_names[reg];
-}
-
-static const char* cpu_reg_names[kNumberOfCpuRegisters] = {
-    "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi",
-    "r8",  "r9",  "r10", "r11", "r12", "r13", "thr", "pp"};
-
-// Used by disassembler, so it is declared outside of
-// !defined(DART_PRECOMPILED_RUNTIME) section.
-const char* Assembler::RegisterName(Register reg) {
-  ASSERT((0 <= reg) && (reg < kNumberOfCpuRegisters));
-  return cpu_reg_names[reg];
-}
-
 }  // namespace compiler
 }  // namespace dart
 
diff --git a/runtime/vm/compiler/assembler/assembler_x64.h b/runtime/vm/compiler/assembler/assembler_x64.h
index db70602..0ef1efe 100644
--- a/runtime/vm/compiler/assembler/assembler_x64.h
+++ b/runtime/vm/compiler/assembler/assembler_x64.h
@@ -13,7 +13,7 @@
 
 #include "platform/assert.h"
 #include "platform/utils.h"
-#include "vm/constants_x64.h"
+#include "vm/constants.h"
 #include "vm/constants_x86.h"
 #include "vm/hash_map.h"
 #include "vm/pointer_tagging.h"
@@ -306,6 +306,9 @@
 
   void setcc(Condition condition, ByteRegister dst);
 
+  void TransitionGeneratedToNative(Register destination_address);
+  void TransitionNativeToGenerated();
+
 // Register-register, register-address and address-register instructions.
 #define RR(width, name, ...)                                                   \
   void name(Register dst, Register src) { Emit##width(dst, src, __VA_ARGS__); }
@@ -744,6 +747,11 @@
                                 const Address& dest,
                                 const Object& value);
 
+  // Stores a non-tagged value into a heap object.
+  void StoreInternalPointer(Register object,
+                            const Address& dest,
+                            Register value);
+
   // Stores a Smi value into a heap object field that always contains a Smi.
   void StoreIntoSmiField(const Address& dest, Register value);
   void ZeroInitSmiField(const Address& dest);
@@ -836,7 +844,7 @@
   //   ....
   //   locals space  <=== RSP
   //   saved PP
-  //   pc (used to derive the RawInstruction Object of the dart code)
+  //   code object (used to derive the RawInstruction Object of the dart code)
   //   saved RBP     <=== RBP
   //   ret PC
   //   .....
@@ -924,10 +932,6 @@
 
   static void InitializeMemoryWithBreakpoints(uword data, intptr_t length);
 
-  static const char* RegisterName(Register reg);
-
-  static const char* FpuRegisterName(FpuRegister reg);
-
   static Address ElementAddressForIntIndex(bool is_external,
                                            intptr_t cid,
                                            intptr_t index_scale,
diff --git a/runtime/vm/compiler/assembler/disassembler_kbc.cc b/runtime/vm/compiler/assembler/disassembler_kbc.cc
index e0c7f8a..c0b9538 100644
--- a/runtime/vm/compiler/assembler/disassembler_kbc.cc
+++ b/runtime/vm/compiler/assembler/disassembler_kbc.cc
@@ -215,6 +215,7 @@
     case KernelBytecode::kPushConstant:
     case KernelBytecode::kIndirectStaticCall:
     case KernelBytecode::kInterfaceCall:
+    case KernelBytecode::kUncheckedInterfaceCall:
     case KernelBytecode::kDynamicCall:
     case KernelBytecode::kStoreStaticTOS:
     case KernelBytecode::kPushStatic:
diff --git a/runtime/vm/compiler/assembler/disassembler_x86.cc b/runtime/vm/compiler/assembler/disassembler_x86.cc
index fb00c01..756e5d4 100644
--- a/runtime/vm/compiler/assembler/disassembler_x86.cc
+++ b/runtime/vm/compiler/assembler/disassembler_x86.cc
@@ -308,7 +308,7 @@
   }
 
   const char* NameOfCPURegister(int reg) const {
-    return compiler::Assembler::RegisterName(static_cast<Register>(reg));
+    return RegisterNames::RegisterName(static_cast<Register>(reg));
   }
 
   const char* NameOfByteCPURegister(int reg) const {
@@ -435,7 +435,8 @@
         return 1;
       }
       break;
-    case 1:  // fall through
+    case 1:
+      FALL_THROUGH;
     case 2:
       if ((rm & 7) == 4) {
         uint8_t sib = *(modrmp + 1);
@@ -1613,7 +1614,8 @@
         data += 4;
         break;
 
-      case 0x69:  // fall through
+      case 0x69:
+        FALL_THROUGH;
       case 0x6B: {
         int mod, regop, rm;
         get_modrm(*(data + 1), &mod, &regop, &rm);
@@ -1626,7 +1628,8 @@
         break;
       }
 
-      case 0x81:  // fall through
+      case 0x81:
+        FALL_THROUGH;
       case 0x83:  // 0x81 with sign extension bit set
         data += PrintImmediateOp(data);
         break;
@@ -1791,7 +1794,8 @@
         data += 2;
         break;
 
-      case 0xA1:  // Fall through.
+      case 0xA1:
+        FALL_THROUGH;
       case 0xA3:
         switch (operand_size()) {
           case DOUBLEWORD_SIZE: {
@@ -1843,24 +1847,34 @@
         data += PrintImmediate(data, operand_size());
         break;
       }
-      case 0xD1:  // fall through
-      case 0xD3:  // fall through
+      case 0xD1:
+        FALL_THROUGH;
+      case 0xD3:
+        FALL_THROUGH;
       case 0xC1:
         data += ShiftInstruction(data);
         break;
-      case 0xD0:  // fall through
-      case 0xD2:  // fall through
+      case 0xD0:
+        FALL_THROUGH;
+      case 0xD2:
+        FALL_THROUGH;
       case 0xC0:
         byte_size_operand_ = true;
         data += ShiftInstruction(data);
         break;
 
-      case 0xD9:  // fall through
-      case 0xDA:  // fall through
-      case 0xDB:  // fall through
-      case 0xDC:  // fall through
-      case 0xDD:  // fall through
-      case 0xDE:  // fall through
+      case 0xD9:
+        FALL_THROUGH;
+      case 0xDA:
+        FALL_THROUGH;
+      case 0xDB:
+        FALL_THROUGH;
+      case 0xDC:
+        FALL_THROUGH;
+      case 0xDD:
+        FALL_THROUGH;
+      case 0xDE:
+        FALL_THROUGH;
       case 0xDF:
         data += FPUInstruction(data);
         break;
@@ -1870,7 +1884,8 @@
         break;
 
       case 0xF6:
-        byte_size_operand_ = true;  // fall through
+        byte_size_operand_ = true;
+        FALL_THROUGH;
       case 0xF7:
         data += F6F7Instruction(data);
         break;
diff --git a/runtime/vm/compiler/backend/block_builder.h b/runtime/vm/compiler/backend/block_builder.h
new file mode 100644
index 0000000..22557d7
--- /dev/null
+++ b/runtime/vm/compiler/backend/block_builder.h
@@ -0,0 +1,134 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#ifndef RUNTIME_VM_COMPILER_BACKEND_BLOCK_BUILDER_H_
+#define RUNTIME_VM_COMPILER_BACKEND_BLOCK_BUILDER_H_
+
+#include "vm/compiler/backend/flow_graph.h"
+#include "vm/compiler/backend/il.h"
+
+namespace dart {
+namespace compiler {
+
+// Helper class for building basic blocks in SSA form.
+class BlockBuilder : public ValueObject {
+ public:
+  BlockBuilder(FlowGraph* flow_graph, BlockEntryInstr* entry)
+      : flow_graph_(flow_graph),
+        entry_(entry),
+        current_(entry),
+        dummy_env_(
+            new Environment(0, 0, flow_graph->parsed_function(), nullptr)) {}
+
+  Definition* AddToInitialDefinitions(Definition* def) {
+    def->set_ssa_temp_index(flow_graph_->alloc_ssa_temp_index());
+    auto normal_entry = flow_graph_->graph_entry()->normal_entry();
+    flow_graph_->AddToInitialDefinitions(normal_entry, def);
+    return def;
+  }
+
+  template <typename T>
+  T* AddDefinition(T* def) {
+    def->set_ssa_temp_index(flow_graph_->alloc_ssa_temp_index());
+    AddInstruction(def);
+    return def;
+  }
+
+  template <typename T>
+  T* AddInstruction(T* instr) {
+    if (instr->ComputeCanDeoptimize()) {
+      // All instructions that can deoptimize must have an environment attached
+      // to them.
+      instr->SetEnvironment(dummy_env_);
+    }
+    current_ = current_->AppendInstruction(instr);
+    return instr;
+  }
+
+  void AddReturn(Value* value) {
+    ReturnInstr* instr = new ReturnInstr(
+        TokenPos(), value, CompilerState::Current().GetNextDeoptId());
+    AddInstruction(instr);
+    entry_->set_last_instruction(instr);
+  }
+
+  Definition* AddParameter(intptr_t index, bool with_frame) {
+    return AddToInitialDefinitions(new ParameterInstr(
+        index, flow_graph_->graph_entry(), with_frame ? FPREG : SPREG));
+  }
+
+  TokenPosition TokenPos() { return flow_graph_->function().token_pos(); }
+
+  Definition* AddNullDefinition() {
+    return flow_graph_->GetConstant(Object::ZoneHandle());
+  }
+
+  Definition* AddUnboxInstr(Representation rep, Value* value, bool is_checked) {
+    Definition* unboxed_value =
+        AddDefinition(UnboxInstr::Create(rep, value, DeoptId::kNone));
+    if (is_checked) {
+      // The type of |value| has already been checked and it is safe to
+      // adjust reaching type. This is done manually because there is no type
+      // propagation when building intrinsics.
+      unboxed_value->AsUnbox()->value()->SetReachingType(
+          new CompileType(CompileType::FromCid(CidForRepresentation(rep))));
+    }
+    return unboxed_value;
+  }
+
+  Definition* AddUnboxInstr(Representation rep,
+                            Definition* boxed,
+                            bool is_checked) {
+    return AddUnboxInstr(rep, new Value(boxed), is_checked);
+  }
+
+  BranchInstr* AddBranch(ComparisonInstr* comp,
+                         TargetEntryInstr* true_successor,
+                         TargetEntryInstr* false_successor) {
+    auto branch =
+        new BranchInstr(comp, CompilerState::Current().GetNextDeoptId());
+    current_->AppendInstruction(branch);
+    current_ = nullptr;
+
+    *branch->true_successor_address() = true_successor;
+    *branch->false_successor_address() = false_successor;
+
+    return branch;
+  }
+
+  void AddPhi(PhiInstr* phi) {
+    phi->set_ssa_temp_index(flow_graph_->alloc_ssa_temp_index());
+    phi->mark_alive();
+    entry_->AsJoinEntry()->InsertPhi(phi);
+  }
+
+ private:
+  static intptr_t CidForRepresentation(Representation rep) {
+    switch (rep) {
+      case kUnboxedDouble:
+        return kDoubleCid;
+      case kUnboxedFloat32x4:
+        return kFloat32x4Cid;
+      case kUnboxedInt32x4:
+        return kInt32x4Cid;
+      case kUnboxedFloat64x2:
+        return kFloat64x2Cid;
+      case kUnboxedUint32:
+        return kDynamicCid;  // smi or mint.
+      default:
+        UNREACHABLE();
+        return kIllegalCid;
+    }
+  }
+
+  FlowGraph* flow_graph_;
+  BlockEntryInstr* entry_;
+  Instruction* current_;
+  Environment* dummy_env_;
+};
+
+}  // namespace compiler
+}  // namespace dart
+
+#endif  // RUNTIME_VM_COMPILER_BACKEND_BLOCK_BUILDER_H_
diff --git a/runtime/vm/compiler/backend/block_scheduler.cc b/runtime/vm/compiler/backend/block_scheduler.cc
index 451c824..af57dfd 100644
--- a/runtime/vm/compiler/backend/block_scheduler.cc
+++ b/runtime/vm/compiler/backend/block_scheduler.cc
@@ -59,16 +59,17 @@
     return;
   }
 
+  const Function& function = flow_graph()->parsed_function().function();
   const Array& ic_data_array =
-      Array::Handle(flow_graph()->zone(),
-                    flow_graph()->parsed_function().function().ic_data_array());
+      Array::Handle(flow_graph()->zone(), function.ic_data_array());
   if (Compiler::IsBackgroundCompilation() && ic_data_array.IsNull()) {
     // Deferred loading cleared ic_data_array.
     Compiler::AbortBackgroundCompilation(
         DeoptId::kNone, "BlockScheduler: ICData array cleared");
   }
   if (ic_data_array.IsNull()) {
-    DEBUG_ASSERT(Isolate::Current()->HasAttemptedReload());
+    DEBUG_ASSERT(Isolate::Current()->HasAttemptedReload() ||
+                 function.ForceOptimize());
     return;
   }
   Array& edge_counters = Array::Handle();
diff --git a/runtime/vm/compiler/backend/compile_type.h b/runtime/vm/compiler/backend/compile_type.h
index ded5fa6..a6f4e93 100644
--- a/runtime/vm/compiler/backend/compile_type.h
+++ b/runtime/vm/compiler/backend/compile_type.h
@@ -5,12 +5,15 @@
 #ifndef RUNTIME_VM_COMPILER_BACKEND_COMPILE_TYPE_H_
 #define RUNTIME_VM_COMPILER_BACKEND_COMPILE_TYPE_H_
 
-#include "vm/object.h"
-#include "vm/thread.h"
+#include "vm/allocation.h"
+#include "vm/class_id.h"
+#include "vm/compiler/runtime_api.h"
 
 namespace dart {
 
+class AbstractType;
 class BufferFormatter;
+class Definition;
 
 // CompileType describes type of a value produced by a definition.
 //
@@ -39,6 +42,7 @@
         type_(other.type_) {}
 
   CompileType& operator=(const CompileType& other) {
+    // This intentionally does not change the owner of this type.
     is_nullable_ = other.is_nullable_;
     cid_ = other.cid_;
     type_ = other.type_;
@@ -87,11 +91,12 @@
       // unreachable values) as None.
       return None();
     }
-    return CompileType(kNonNullable, kIllegalCid, type_);
+
+    return CompileType(kNonNullable, cid_, type_);
   }
 
   static CompileType CreateNullable(bool is_nullable, intptr_t cid) {
-    return CompileType(is_nullable, cid, NULL);
+    return CompileType(is_nullable, cid, nullptr);
   }
 
   // Create a new CompileType representing given abstract type. By default
@@ -106,7 +111,7 @@
   // Create None CompileType. It is the bottom of the lattice and is used to
   // represent type of the phi that was not yet inferred.
   static CompileType None() {
-    return CompileType(kNullable, kIllegalCid, NULL);
+    return CompileType(kNullable, kIllegalCid, nullptr);
   }
 
   // Create Dynamic CompileType. It is the top of the lattice and is used to
@@ -159,10 +164,10 @@
   bool IsEqualTo(CompileType* other) {
     return (is_nullable_ == other->is_nullable_) &&
            (ToNullableCid() == other->ToNullableCid()) &&
-           (ToAbstractType()->Equals(*other->ToAbstractType()));
+           (compiler::IsEqualType(*ToAbstractType(), *other->ToAbstractType()));
   }
 
-  bool IsNone() const { return (cid_ == kIllegalCid) && (type_ == NULL); }
+  bool IsNone() const { return (cid_ == kIllegalCid) && (type_ == nullptr); }
 
   // Return true if value of this type is a non-nullable int.
   bool IsInt() { return !is_nullable() && IsNullableInt(); }
@@ -172,11 +177,12 @@
 
   // Return true if value of this type is either int or null.
   bool IsNullableInt() {
-    if ((cid_ == kSmiCid) || (cid_ == kMintCid)) {
+    if (cid_ == kSmiCid || cid_ == kMintCid) {
       return true;
     }
-    if ((cid_ == kIllegalCid) || (cid_ == kDynamicCid)) {
-      return (type_ != NULL) && ((type_->IsIntType() || type_->IsSmiType()));
+    if (cid_ == kIllegalCid || cid_ == kDynamicCid) {
+      return type_ != nullptr &&
+             (compiler::IsIntType(*type_) || compiler::IsSmiType(*type_));
     }
     return false;
   }
@@ -186,8 +192,8 @@
     if (cid_ == kSmiCid) {
       return true;
     }
-    if ((cid_ == kIllegalCid) || (cid_ == kDynamicCid)) {
-      return type_ != nullptr && type_->IsSmiType();
+    if (cid_ == kIllegalCid || cid_ == kDynamicCid) {
+      return type_ != nullptr && compiler::IsSmiType(*type_);
     }
     return false;
   }
@@ -198,7 +204,7 @@
       return true;
     }
     if ((cid_ == kIllegalCid) || (cid_ == kDynamicCid)) {
-      return (type_ != NULL) && type_->IsDoubleType();
+      return type_ != nullptr && compiler::IsDoubleType(*type_);
     }
     return false;
   }
@@ -206,14 +212,25 @@
   void PrintTo(BufferFormatter* f) const;
   const char* ToCString() const;
 
+  // CompileType object might be unowned or owned by a definition.
+  // Owned CompileType objects can change during type propagation when
+  // [RecomputeType] is called on the owner. We keep track of which
+  // definition owns [CompileType] to prevent situations where
+  // owned [CompileType] is cached as a reaching type in a [Value] which
+  // is no longer connected to the original owning definition.
+  // See [Value::SetReachingType].
+  void set_owner(Definition* owner) { owner_ = owner; }
+  Definition* owner() const { return owner_; }
+
  private:
   bool CanComputeIsInstanceOf(const AbstractType& type,
                               bool is_nullable,
                               bool* is_instance);
 
   bool is_nullable_;
-  intptr_t cid_;
+  classid_t cid_;
   const AbstractType* type_;
+  Definition* owner_ = nullptr;
 };
 
 }  // namespace dart
diff --git a/runtime/vm/compiler/backend/constant_propagator.cc b/runtime/vm/compiler/backend/constant_propagator.cc
index 56f2a36..d27b6e2 100644
--- a/runtime/vm/compiler/backend/constant_propagator.cc
+++ b/runtime/vm/compiler/backend/constant_propagator.cc
@@ -267,11 +267,11 @@
 
 void ConstantPropagator::VisitTailCall(TailCallInstr* instr) {}
 
-void ConstantPropagator::VisitCheckNull(CheckNullInstr* instr) {}
-
 void ConstantPropagator::VisitCheckEitherNonSmi(CheckEitherNonSmiInstr* instr) {
 }
 
+void ConstantPropagator::VisitStoreUntagged(StoreUntaggedInstr* instr) {}
+
 void ConstantPropagator::VisitStoreIndexedUnsafe(
     StoreIndexedUnsafeInstr* instr) {}
 
@@ -354,12 +354,34 @@
   SetValue(instr, non_constant_);
 }
 
+void ConstantPropagator::VisitCheckNull(CheckNullInstr* instr) {
+  // Don't propagate constants through check, since it would eliminate
+  // the data dependence between the null check and its use.
+  // Graph finalization will expose the constant eventually.
+  SetValue(instr, non_constant_);
+}
+
 void ConstantPropagator::VisitParameter(ParameterInstr* instr) {
   SetValue(instr, non_constant_);
 }
 
 void ConstantPropagator::VisitPushArgument(PushArgumentInstr* instr) {
-  SetValue(instr, instr->value()->definition()->constant_value());
+  if (SetValue(instr, instr->value()->definition()->constant_value())) {
+    // The worklist implementation breaks down around push arguments,
+    // since these instructions do not have a direct use-link to the
+    // corresponding call. This is remedied by visiting all calls in
+    // the enviroment use list each time a push argument changes its
+    // value. Currently, this only needs to be done for static calls
+    // (the only calls involved in constant propagation).
+    // TODO(ajcbik): calls with multiple arguments may be revisited
+    //               several times; a direct use-link would be better
+    for (Value* use = instr->env_use_list(); use != nullptr;
+         use = use->next_use()) {
+      if (use->instruction()->IsStaticCall()) {
+        use->instruction()->Accept(this);
+      }
+    }
+  }
 }
 
 void ConstantPropagator::VisitAssertAssignable(AssertAssignableInstr* instr) {
@@ -410,8 +432,8 @@
 }
 
 void ConstantPropagator::VisitStaticCall(StaticCallInstr* instr) {
-  const Function& function = instr->function();
-  switch (MethodRecognizer::RecognizeKind(function)) {
+  const auto kind = MethodRecognizer::RecognizeKind(instr->function());
+  switch (kind) {
     case MethodRecognizer::kOneByteString_equality:
     case MethodRecognizer::kTwoByteString_equality: {
       ASSERT(instr->FirstArgIndex() == 0);
@@ -421,10 +443,32 @@
         SetValue(instr, Bool::True());
         return;
       }
+      // Otherwise evaluate string compare with propagated constants.
+      const Object& o1 = instr->ArgumentAt(0)->constant_value();
+      const Object& o2 = instr->ArgumentAt(1)->constant_value();
+      if (IsConstant(o1) && IsConstant(o2) && o1.IsString() && o2.IsString()) {
+        SetValue(instr, Bool::Get(String::Cast(o1).Equals(String::Cast(o2))));
+        return;
+      }
+      break;
+    }
+    case MethodRecognizer::kStringBaseLength:
+    case MethodRecognizer::kStringBaseIsEmpty: {
+      ASSERT(instr->FirstArgIndex() == 0);
+      // Otherwise evaluate string length with propagated constants.
+      const Object& o = instr->ArgumentAt(0)->constant_value();
+      if (IsConstant(o) && o.IsString()) {
+        const auto& str = String::Cast(o);
+        if (kind == MethodRecognizer::kStringBaseLength) {
+          SetValue(instr, Integer::ZoneHandle(Z, Integer::New(str.Length())));
+        } else {
+          SetValue(instr, Bool::Get(str.Length() == 0));
+        }
+        return;
+      }
       break;
     }
     default:
-      // TODO(ajcbik): consider more cases
       break;
   }
   SetValue(instr, non_constant_);
@@ -627,6 +671,10 @@
   SetValue(instr, non_constant_);
 }
 
+void ConstantPropagator::VisitFfiCall(FfiCallInstr* instr) {
+  SetValue(instr, non_constant_);
+}
+
 void ConstantPropagator::VisitDebugStepCheck(DebugStepCheckInstr* instr) {
   // Nothing to do.
 }
@@ -1269,8 +1317,16 @@
   SetValue(instr, non_constant_);
 }
 
-void ConstantPropagator::VisitUnboxedIntConverter(
-    UnboxedIntConverterInstr* instr) {
+void ConstantPropagator::VisitIntConverter(IntConverterInstr* instr) {
+  SetValue(instr, non_constant_);
+}
+
+void ConstantPropagator::VisitUnboxedWidthExtender(
+    UnboxedWidthExtenderInstr* instr) {
+  SetValue(instr, non_constant_);
+}
+
+void ConstantPropagator::VisitBitCast(BitCastInstr* instr) {
   SetValue(instr, non_constant_);
 }
 
@@ -1288,10 +1344,9 @@
     if (block_worklist_.is_empty()) {
       if (definition_worklist_.IsEmpty()) break;
       Definition* definition = definition_worklist_.RemoveLast();
-      Value* use = definition->input_use_list();
-      while (use != NULL) {
+      for (Value* use = definition->input_use_list(); use != nullptr;
+           use = use->next_use()) {
         use->instruction()->Accept(this);
-        use = use->next_use();
       }
     } else {
       BlockEntryInstr* block = block_worklist_.RemoveLast();
@@ -1378,7 +1433,7 @@
 static void RemovePushArguments(StaticCallInstr* call) {
   for (intptr_t i = 0; i < call->ArgumentCount(); ++i) {
     PushArgumentInstr* push = call->PushArgumentAt(i);
-    push->ReplaceUsesWith(push->value()->definition());
+    ASSERT(push->input_use_list() == nullptr);
     push->RemoveFromGraph();
   }
 }
diff --git a/runtime/vm/compiler/backend/flow_graph.cc b/runtime/vm/compiler/backend/flow_graph.cc
index b8806bd..40eac02 100644
--- a/runtime/vm/compiler/backend/flow_graph.cc
+++ b/runtime/vm/compiler/backend/flow_graph.cc
@@ -123,7 +123,8 @@
 
 bool FlowGraph::ShouldReorderBlocks(const Function& function,
                                     bool is_optimized) {
-  return is_optimized && FLAG_reorder_basic_blocks && !function.is_intrinsic();
+  return is_optimized && FLAG_reorder_basic_blocks &&
+         !function.is_intrinsic() && !function.IsFfiTrampoline();
 }
 
 GrowableArray<BlockEntryInstr*>* FlowGraph::CodegenBlockOrder(
@@ -496,10 +497,6 @@
   // If the receiver can have the null value, exclude any method
   // that is actually valid on a null receiver.
   if (receiver_maybe_null) {
-#ifdef TARGET_ARCH_DBC
-    // TODO(ajcbik): DBC does not support null check at all yet.
-    return ToCheck::kCheckCid;
-#else
     const Class& null_class =
         Class::Handle(zone(), isolate()->object_store()->null_class());
     const Function& target = Function::Handle(
@@ -508,7 +505,6 @@
     if (!target.IsNull()) {
       return ToCheck::kCheckCid;
     }
-#endif
   }
 
   // Use CHA to determine if the method is not overridden by any subclass
@@ -566,7 +562,7 @@
   InsertBefore(call, load_type_args, call->env(), FlowGraph::kValue);
 
   const AbstractType& type =
-      AbstractType::Handle(zone(), call->ic_data()->StaticReceiverType());
+      AbstractType::Handle(zone(), call->ic_data()->receivers_static_type());
   ASSERT(!type.IsNull());
   const TypeArguments& args = TypeArguments::Handle(zone(), type.arguments());
   Instruction* guard = new (zone()) CheckConditionInstr(
@@ -1052,6 +1048,8 @@
       }
     }
 
+    const intptr_t var_length =
+        IsCompiledForOsr() ? osr_variable_count() : variable_count();
     while (!worklist.is_empty()) {
       BlockEntryInstr* current = worklist.RemoveLast();
       // Ensure a phi for each block in the dominance frontier of current.
@@ -1062,7 +1060,7 @@
           BlockEntryInstr* block = preorder[index];
           ASSERT(block->IsJoinEntry());
           PhiInstr* phi =
-              block->AsJoinEntry()->InsertPhi(var_index, variable_count());
+              block->AsJoinEntry()->InsertPhi(var_index, var_length);
           if (always_live) {
             phi->mark_alive();
             live_phis->Add(phi);
@@ -1078,17 +1076,26 @@
   }
 }
 
+void FlowGraph::CreateCommonConstants() {
+  constant_null_ = GetConstant(Object::ZoneHandle());
+  constant_dead_ = GetConstant(Symbols::OptimizedOut());
+}
+
 void FlowGraph::Rename(GrowableArray<PhiInstr*>* live_phis,
                        VariableLivenessAnalysis* variable_liveness,
                        ZoneGrowableArray<Definition*>* inlining_parameters) {
   GraphEntryInstr* entry = graph_entry();
 
   // Add global constants to the initial definitions.
-  constant_null_ = GetConstant(Object::ZoneHandle());
-  constant_dead_ = GetConstant(Symbols::OptimizedOut());
+  CreateCommonConstants();
 
+  // During regular execution, only the direct parameters appear in
+  // the fixed part of the environment. During OSR, however, all
+  // variables and possibly a non-empty stack are passed as
+  // parameters. The latter mimics the incoming expression stack
+  // that was set up prior to triggering OSR.
   const intptr_t parameter_count =
-      IsCompiledForOsr() ? variable_count() : num_direct_parameters_;
+      IsCompiledForOsr() ? osr_variable_count() : num_direct_parameters_;
 
   // Initial renaming environment.
   GrowableArray<Definition*> env(parameter_count + num_stack_locals());
@@ -1106,7 +1113,6 @@
     ASSERT(entry->unchecked_entry() != nullptr ? entry->SuccessorCount() == 2
                                                : entry->SuccessorCount() == 1);
   }
-
   RenameRecursive(entry, &env, live_phis, variable_liveness,
                   inlining_parameters);
 }
@@ -1124,6 +1130,7 @@
   const intptr_t inlined_type_args_param =
       ((inlining_parameters != NULL) && function().IsGeneric()) ? 1 : 0;
 
+  ASSERT(parameter_count <= env->length());
   for (intptr_t i = 0; i < parameter_count; i++) {
     ParameterInstr* param = new (zone()) ParameterInstr(i, function_entry);
     param->set_ssa_temp_index(alloc_ssa_temp_index());
@@ -1181,13 +1188,26 @@
     OsrEntryInstr* osr_entry,
     GrowableArray<Definition*>* env) {
   ASSERT(IsCompiledForOsr());
-  const intptr_t parameter_count = variable_count();
+  const intptr_t parameter_count = osr_variable_count();
+  // Initialize the initial enviroment.
+  ASSERT(parameter_count <= env->length());
   for (intptr_t i = 0; i < parameter_count; i++) {
     ParameterInstr* param = new (zone()) ParameterInstr(i, osr_entry);
     param->set_ssa_temp_index(alloc_ssa_temp_index());
     AddToInitialDefinitions(osr_entry, param);
     (*env)[i] = param;
   }
+  // For OSR on a non-emtpy stack, insert synthetic phis on the joining entry.
+  // These phis are synthetic since they are not driven by live variable
+  // analysis, but merely serve the purpose of merging stack slots from
+  // parameters and other predecessors at the block in which OSR occurred.
+  JoinEntryInstr* join =
+      osr_entry->last_instruction()->SuccessorAt(0)->AsJoinEntry();
+  ASSERT(join != nullptr);
+  for (intptr_t i = variable_count(); i < parameter_count; i++) {
+    PhiInstr* phi = join->InsertPhi(i, parameter_count);
+    phi->mark_alive();
+  }
 }
 
 void FlowGraph::PopulateEnvironmentFromCatchEntry(
@@ -1203,7 +1223,8 @@
           : -1;
 
   // Add real definitions for all locals and parameters.
-  for (intptr_t i = 0; i < variable_count(); ++i) {
+  ASSERT(variable_count() <= env->length());
+  for (intptr_t i = 0, n = variable_count(); i < n; ++i) {
     // Replace usages of the raw exception/stacktrace variables with
     // [SpecialParameterInstr]s.
     Definition* param = nullptr;
@@ -1236,9 +1257,6 @@
     Value* use = it.CurrentValue();
     use->definition()->AddEnvUse(use);
   }
-  if (instr->ComputeCanDeoptimize()) {
-    instr->env()->set_deopt_id(instr->deopt_id());
-  }
 }
 
 void FlowGraph::RenameRecursive(
@@ -1249,10 +1267,13 @@
     ZoneGrowableArray<Definition*>* inlining_parameters) {
   // 1. Process phis first.
   if (auto join = block_entry->AsJoinEntry()) {
-    if (join->phis() != NULL) {
-      for (intptr_t i = 0; i < join->phis()->length(); ++i) {
+    if (join->phis() != nullptr) {
+      const intptr_t var_length =
+          IsCompiledForOsr() ? osr_variable_count() : variable_count();
+      ASSERT(join->phis()->length() == var_length);
+      for (intptr_t i = 0; i < var_length; ++i) {
         PhiInstr* phi = (*join->phis())[i];
-        if (phi != NULL) {
+        if (phi != nullptr) {
           (*env)[i] = phi;
           AllocateSSAIndexes(phi);  // New SSA temp.
           if (block_entry->InsideTryBlock() && !phi->is_alive()) {
@@ -1292,7 +1313,6 @@
     }
   }
 
-
   // Attach environment to the block entry.
   AttachEnvironment(block_entry, env);
 
@@ -1336,7 +1356,6 @@
       Value* v = current->InputAt(i);
       // Update expression stack.
       ASSERT(env->length() > variable_count());
-
       Definition* reaching_defn = env->RemoveLast();
       Definition* input_defn = v->definition();
       if (input_defn != reaching_defn) {
@@ -1352,12 +1371,37 @@
       input_defn->AddInputUse(v);
     }
 
-    // Drop pushed arguments for calls.
-    for (intptr_t j = 0; j < current->ArgumentCount(); j++) {
-      env->RemoveLast();
+    // 2b. Handle arguments. Usually this just consists of popping
+    // all consumed parameters from the expression stack. However,
+    // during OSR with a non-empty stack, PushArguments may have
+    // been lost (since the defining value resides in the now
+    // removed original entry).
+    Instruction* insert_at = current;  // keeps push arguments in order
+    for (intptr_t i = current->ArgumentCount() - 1; i >= 0; --i) {
+      // Update expression stack.
+      ASSERT(env->length() > variable_count());
+      Definition* reaching_defn = env->RemoveLast();
+      if (reaching_defn->IsPushArgument()) {
+        insert_at = reaching_defn;
+      } else {
+        // We lost the PushArgument! This situation can only happen
+        // during OSR with a non-empty stack: replace the argument
+        // with the incoming parameter that mimics the stack slot.
+        ASSERT(IsCompiledForOsr());
+        PushArgumentInstr* push_arg = current->PushArgumentAt(i);
+        ASSERT(push_arg->IsPushArgument());
+        ASSERT(reaching_defn->ssa_temp_index() != -1);
+        ASSERT(reaching_defn->IsPhi());
+        push_arg->previous()->LinkTo(push_arg->next());
+        push_arg->set_previous(nullptr);
+        push_arg->set_next(nullptr);
+        push_arg->value()->set_definition(reaching_defn);
+        InsertBefore(insert_at, push_arg, nullptr, FlowGraph::kEffect);
+        insert_at = push_arg;
+      }
     }
 
-    // 2b. Handle LoadLocal/StoreLocal/MakeTemp/DropTemps/Constant and
+    // 2c. Handle LoadLocal/StoreLocal/MakeTemp/DropTemps/Constant and
     // PushArgument specially. Other definitions are just pushed
     // to the environment directly.
     Definition* result = NULL;
@@ -1561,7 +1605,7 @@
   RedefinitionInstr* redef = new RedefinitionInstr(new Value(original));
 
   // Don't set the constrained type when the type is None(), which denotes an
-  // unreachable value (e.g. using value null after an explicit null check).
+  // unreachable value (e.g. using value null after some form of null check).
   if (!compile_type.IsNone()) {
     redef->set_constrained_type(new CompileType(compile_type));
   }
@@ -1581,20 +1625,20 @@
     for (ForwardInstructionIterator instr_it(block_it.Current());
          !instr_it.Done(); instr_it.Advance()) {
       Instruction* instruction = instr_it.Current();
-      if (instruction->IsRedefinition()) {
-        RedefinitionInstr* redef = instruction->AsRedefinition();
+      if (auto redef = instruction->AsRedefinition()) {
         redef->ReplaceUsesWith(redef->value()->definition());
         instr_it.RemoveCurrentFromGraph();
       } else if (keep_checks) {
         continue;
-      } else if (instruction->IsCheckArrayBound()) {
-        CheckArrayBoundInstr* check = instruction->AsCheckArrayBound();
+      } else if (auto check = instruction->AsCheckArrayBound()) {
         check->ReplaceUsesWith(check->index()->definition());
         check->ClearSSATempIndex();
-      } else if (instruction->IsGenericCheckBound()) {
-        GenericCheckBoundInstr* check = instruction->AsGenericCheckBound();
+      } else if (auto check = instruction->AsGenericCheckBound()) {
         check->ReplaceUsesWith(check->index()->definition());
         check->ClearSSATempIndex();
+      } else if (auto check = instruction->AsCheckNull()) {
+        check->ReplaceUsesWith(check->value()->definition());
+        check->ClearSSATempIndex();
       }
     }
   }
@@ -1729,8 +1773,8 @@
     const intptr_t deopt_id = (to == kUnboxedInt32) && (deopt_target != NULL)
                                   ? deopt_target->DeoptimizationTarget()
                                   : DeoptId::kNone;
-    converted = new (Z)
-        UnboxedIntConverterInstr(from, to, use->CopyWithType(), deopt_id);
+    converted =
+        new (Z) IntConverterInstr(from, to, use->CopyWithType(), deopt_id);
   } else if ((from == kUnboxedInt32) && (to == kUnboxedDouble)) {
     converted = new Int32ToDoubleInstr(use->CopyWithType());
   } else if ((from == kUnboxedInt64) && (to == kUnboxedDouble) &&
@@ -2138,7 +2182,7 @@
         // propagation information (e.g. it might no longer be a _Smi).
         for (Value::Iterator it(defn->input_use_list()); !it.Done();
              it.Advance()) {
-          it.Current()->SetReachingType(NULL);
+          it.Current()->SetReachingType(nullptr);
         }
 
         if (defn->IsBinarySmiOp()) {
diff --git a/runtime/vm/compiler/backend/flow_graph.h b/runtime/vm/compiler/backend/flow_graph.h
index 0012962..67f47ce 100644
--- a/runtime/vm/compiler/backend/flow_graph.h
+++ b/runtime/vm/compiler/backend/flow_graph.h
@@ -120,6 +120,13 @@
     return num_direct_parameters_ + parsed_function_.num_stack_locals();
   }
 
+  // The number of variables during OSR, which may include stack slots
+  // that pass in initial contents for the expression stack.
+  intptr_t osr_variable_count() const {
+    ASSERT(IsCompiledForOsr());
+    return variable_count() + graph_entry()->osr_entry()->stack_depth();
+  }
+
   // The number of variables (or boxes) inside the functions frame - meaning
   // below the frame pointer.  This does not include the expression stack.
   intptr_t num_stack_locals() const {
@@ -412,6 +419,11 @@
   // Adds a 2-way phi.
   PhiInstr* AddPhi(JoinEntryInstr* join, Definition* d1, Definition* d2);
 
+  // SSA transformation methods and fields.
+  void ComputeDominators(GrowableArray<BitVector*>* dominance_frontier);
+
+  void CreateCommonConstants();
+
  private:
   friend class FlowGraphCompiler;  // TODO(ajcbik): restructure
   friend class FlowGraphChecker;
@@ -421,9 +433,6 @@
   friend class DeadCodeElimination;
   friend class compiler::GraphIntrinsifier;
 
-  // SSA transformation methods and fields.
-  void ComputeDominators(GrowableArray<BitVector*>* dominance_frontier);
-
   void CompressPath(intptr_t start_index,
                     intptr_t current_index,
                     GrowableArray<intptr_t>* parent,
diff --git a/runtime/vm/compiler/backend/flow_graph_checker.cc b/runtime/vm/compiler/backend/flow_graph_checker.cc
index a07ed6d..3b9481f 100644
--- a/runtime/vm/compiler/backend/flow_graph_checker.cc
+++ b/runtime/vm/compiler/backend/flow_graph_checker.cc
@@ -119,6 +119,7 @@
   }
   // Visit regular instructions.
   Instruction* last = block->last_instruction();
+  ASSERT((last == block) == block->IsGraphEntry());
   Instruction* prev = block;
   ASSERT(prev->previous() == nullptr);
   for (ForwardInstructionIterator it(block); !it.Done(); it.Advance()) {
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler.cc b/runtime/vm/compiler/backend/flow_graph_compiler.cc
index cd503e0..9e5377b 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler.cc
@@ -81,7 +81,8 @@
         it.CurrentValue()->definition()->IsPushArgument()) {
       it.SetCurrentLocation(Location::StackSlot(
           compiler::target::frame_layout.FrameSlotForVariableIndex(
-              -*stack_height)));
+              -*stack_height),
+          FPREG));
       (*stack_height)++;
     }
   }
@@ -174,14 +175,13 @@
       (SupportsUnboxedDoubles() && (field.guarded_cid() == kDoubleCid)) ||
       (SupportsUnboxedSimd128() && (field.guarded_cid() == kFloat32x4Cid)) ||
       (SupportsUnboxedSimd128() && (field.guarded_cid() == kFloat64x2Cid));
-  return field.is_unboxing_candidate() && !field.is_final() &&
-         !field.is_nullable() && valid_class;
+  return field.is_unboxing_candidate() && !field.is_nullable() && valid_class;
 }
 
 bool FlowGraphCompiler::IsPotentialUnboxedField(const Field& field) {
   return field.is_unboxing_candidate() &&
          (FlowGraphCompiler::IsUnboxedField(field) ||
-          (!field.is_final() && (field.guarded_cid() == kIllegalCid)));
+          (field.guarded_cid() == kIllegalCid));
 }
 
 void FlowGraphCompiler::InitCompiler() {
@@ -216,7 +216,7 @@
     }
   }
 
-  if (!is_optimizing()) {
+  if (!is_optimizing() && FLAG_reorder_basic_blocks) {
     // Initialize edge counter array.
     const intptr_t num_counters = flow_graph_.preorder().length();
     const Array& edge_counters =
@@ -321,12 +321,12 @@
 }
 
 intptr_t FlowGraphCompiler::UncheckedEntryOffset() const {
-  // On ARM64 we cannot use the position of the label bound in the
-  // FunctionEntryInstr, because `FunctionEntryInstr::EmitNativeCode` does not
-  // emit the monomorphic entry and frame entry (instead on ARM64 this is done
-  // in FlowGraphCompiler::CompileGraph()).
-  //
-  // See http://dartbug.com/34162
+// On ARM64 we cannot use the position of the label bound in the
+// FunctionEntryInstr, because `FunctionEntryInstr::EmitNativeCode` does not
+// emit the monomorphic entry and frame entry (instead on ARM64 this is done
+// in FlowGraphCompiler::CompileGraph()).
+//
+// See http://dartbug.com/34162
 #if defined(TARGET_ARCH_ARM64)
   return 0;
 #endif
@@ -345,7 +345,7 @@
     return target->Position();
   }
 
-  // Intrinsification happened.
+// Intrinsification happened.
 #ifdef DART_PRECOMPILER
   if (parsed_function().function().IsDynamicFunction()) {
     return Instructions::kMonomorphicEntryOffset;
@@ -560,6 +560,14 @@
     StatsEnd(entry);
     pending_deoptimization_env_ = NULL;
     EndCodeSourceRange(entry->token_pos());
+
+    // The function was fully intrinsified, so there's no need to generate any
+    // more code.
+    if (fully_intrinsified_) {
+      ASSERT(entry == flow_graph().graph_entry()->normal_entry());
+      break;
+    }
+
     // Compile all successors until an exit, branch, or a block entry.
     for (ForwardInstructionIterator it(entry); !it.Done(); it.Advance()) {
       Instruction* instr = it.Current();
@@ -615,6 +623,14 @@
   }
 }
 
+intptr_t FlowGraphCompiler::ExtraStackSlotsOnOsrEntry() const {
+  ASSERT(flow_graph().IsCompiledForOsr());
+  const intptr_t stack_depth =
+      flow_graph().graph_entry()->osr_entry()->stack_depth();
+  const intptr_t num_stack_locals = flow_graph().num_stack_locals();
+  return StackSize() - stack_depth - num_stack_locals;
+}
+
 Label* FlowGraphCompiler::GetJumpLabel(BlockEntryInstr* block_entry) const {
   const intptr_t block_index = block_entry->postorder_number();
   return block_info_[block_index]->jump_label();
@@ -953,8 +969,8 @@
   for (Environment::DeepIterator it(env); !it.Done(); it.Advance()) {
     Location loc = it.CurrentLocation();
     Value* value = it.CurrentValue();
-    it.SetCurrentLocation(loc.RemapForSlowPath(value->definition(),
-                                               cpu_reg_slots, fpu_reg_slots));
+    it.SetCurrentLocation(LocationRemapForSlowPath(
+        loc, value->definition(), cpu_reg_slots, fpu_reg_slots));
   }
 
   return env;
@@ -1066,7 +1082,9 @@
 // No debugger: no var descriptors.
 #else
   // TODO(alexmarkov): revise local vars descriptors when compiling bytecode
-  if (code.is_optimized() || flow_graph().function().HasBytecode()) {
+  if (code.is_optimized() ||
+      flow_graph().function().is_declared_in_bytecode() ||
+      flow_graph().function().HasBytecode()) {
     // Optimized code does not need variable descriptors. They are
     // only stored in the unoptimized version.
     code.set_var_descriptors(Object::empty_var_descriptors());
@@ -1153,6 +1171,14 @@
 
 // Returns 'true' if regular code generation should be skipped.
 bool FlowGraphCompiler::TryIntrinsify() {
+  if (TryIntrinsifyHelper()) {
+    fully_intrinsified_ = true;
+    return true;
+  }
+  return false;
+}
+
+bool FlowGraphCompiler::TryIntrinsifyHelper() {
   Label exit;
   set_intrinsic_slow_path_label(&exit);
 
@@ -1258,7 +1284,7 @@
   switch (ic_data.NumArgsTested()) {
     case 1:
 #if defined(TARGET_ARCH_X64)
-      if (ic_data.IsTrackingExactness()) {
+      if (ic_data.is_tracking_exactness()) {
         if (optimized) {
           return StubCode::OneArgOptimizedCheckInlineCacheWithExactnessCheck();
         } else {
@@ -1267,12 +1293,12 @@
       }
 #else
       // TODO(dartbug.com/34170) Port exactness tracking to other platforms.
-      ASSERT(!ic_data.IsTrackingExactness());
+      ASSERT(!ic_data.is_tracking_exactness());
 #endif
       return optimized ? StubCode::OneArgOptimizedCheckInlineCache()
                        : StubCode::OneArgCheckInlineCache();
     case 2:
-      ASSERT(!ic_data.IsTrackingExactness());
+      ASSERT(!ic_data.is_tracking_exactness());
       return optimized ? StubCode::TwoArgsOptimizedCheckInlineCache()
                        : StubCode::TwoArgsCheckInlineCache();
     default:
@@ -1758,7 +1784,7 @@
     ASSERT(res->TypeArgsLen() ==
            ArgumentsDescriptor(arguments_descriptor).TypeArgsLen());
     ASSERT(!res->is_static_call());
-    ASSERT(res->StaticReceiverType() == receiver_type.raw());
+    ASSERT(res->receivers_static_type() == receiver_type.raw());
     return res;
   }
   const ICData& ic_data = ICData::ZoneHandle(
@@ -1808,6 +1834,9 @@
     threshold = FLAG_reoptimization_counter_threshold;
   } else if (parsed_function_.function().IsIrregexpFunction()) {
     threshold = FLAG_regexp_optimization_counter_threshold;
+  } else if (FLAG_randomize_optimization_counter) {
+    threshold = Thread::Current()->GetRandomUInt64() %
+                FLAG_optimization_counter_threshold;
   } else {
     const intptr_t basic_blocks = flow_graph().preorder().length();
     ASSERT(basic_blocks > 0);
@@ -1817,11 +1846,27 @@
       threshold = FLAG_optimization_counter_threshold;
     }
   }
+
+  // Threshold = 0 doesn't make sense because we increment the counter before
+  // testing against the threshold. Perhaps we could interpret it to mean
+  // "generate optimized code immediately without unoptimized compilation
+  // first", but this isn't supported in our pipeline because there would be no
+  // code for the optimized code to deoptimize into.
+  if (threshold == 0) threshold = 1;
+
+  // See Compiler::CanOptimizeFunction. In short, we have to allow the
+  // unoptimized code to run at least once to prevent an infinite compilation
+  // loop.
+  if (threshold == 1 && parsed_function().function().HasBreakpoint()) {
+    threshold = 2;
+  }
+
   return threshold;
 }
 
 const Class& FlowGraphCompiler::BoxClassFor(Representation rep) {
   switch (rep) {
+    case kUnboxedFloat:
     case kUnboxedDouble:
       return double_class();
     case kUnboxedFloat32x4:
@@ -2059,7 +2104,10 @@
                                                   Label* is_subtype) {
   HierarchyInfo* hi = Thread::Current()->hierarchy_info();
   if (hi != NULL) {
-    const CidRangeVector& ranges = hi->SubtypeRangesForClass(type_class);
+    const CidRangeVector& ranges =
+        hi->SubtypeRangesForClass(type_class,
+                                  /*include_abstract=*/false,
+                                  /*exclude_null=*/false);
     if (ranges.length() <= kMaxNumberOfCidRangesToTest) {
       GenerateCidRangesCheck(assembler(), class_id_reg, ranges, is_subtype);
       return true;
@@ -2161,7 +2209,10 @@
       const bool can_use_simple_cid_range_test =
           hi->CanUseSubtypeRangeCheckFor(dst_type);
       if (can_use_simple_cid_range_test) {
-        const CidRangeVector& ranges = hi->SubtypeRangesForClass(type_class);
+        const CidRangeVector& ranges =
+            hi->SubtypeRangesForClass(type_class,
+                                      /*include_abstract=*/false,
+                                      /*exclude_null=*/false);
         if (ranges.length() <= kMaxNumberOfCidRangesToTest) {
           if (is_non_smi) {
             __ LoadClassId(scratch_reg, instance_reg);
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler.h b/runtime/vm/compiler/backend/flow_graph_compiler.h
index 8cfee57..56046747 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler.h
+++ b/runtime/vm/compiler/backend/flow_graph_compiler.h
@@ -243,8 +243,6 @@
   }
 };
 
-#if !defined(TARGET_ARCH_DBC)
-
 // Slow path code which calls runtime entry to throw an exception.
 class ThrowErrorSlowPathCode : public TemplateSlowPathCode<Instruction> {
  public:
@@ -298,8 +296,6 @@
   }
 };
 
-#endif  // !defined(TARGET_ARCH_DBC)
-
 class FlowGraphCompiler : public ValueObject {
  private:
   class BlockInfo : public ZoneAllocated {
@@ -639,8 +635,15 @@
 
   void EmitComment(Instruction* instr);
 
+  // Returns stack size (number of variables on stack for unoptimized
+  // code, or number of spill slots for optimized code).
   intptr_t StackSize() const;
 
+  // Returns the number of extra stack slots used during an Osr entry
+  // (values for all [ParameterInstr]s, representing local variables
+  // and expression stack values, are already on the stack).
+  intptr_t ExtraStackSlotsOnOsrEntry() const;
+
   // Returns assembler label associated with the given block entry.
   Label* GetJumpLabel(BlockEntryInstr* block_entry) const;
   bool WasCompacted(BlockEntryInstr* block_entry) const;
@@ -814,6 +817,7 @@
 
   void EmitFrameEntry();
 
+  bool TryIntrinsifyHelper();
   void AddPcRelativeCallTarget(const Function& function,
                                Code::EntryKind entry_kind);
   void AddPcRelativeCallStubTarget(const Code& stub_code);
@@ -1027,6 +1031,7 @@
   // True while emitting intrinsic code.
   bool intrinsic_mode_;
   Label* intrinsic_slow_path_label_ = nullptr;
+  bool fully_intrinsified_ = false;
   CodeStatistics* stats_;
 
   const Class& double_class_;
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc b/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
index 70f614f..04a4a85 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
@@ -33,7 +33,7 @@
 
     const auto& stub =
         Code::ZoneHandle(object_store->write_barrier_wrappers_stub());
-    if (!stub.InVMHeap()) {
+    if (!stub.InVMIsolateHeap()) {
       assembler_->generate_invoke_write_barrier_wrapper_ =
           [&](Condition condition, Register reg) {
             const intptr_t offset_into_target =
@@ -46,7 +46,7 @@
 
     const auto& array_stub =
         Code::ZoneHandle(object_store->array_write_barrier_stub());
-    if (!array_stub.InVMHeap()) {
+    if (!array_stub.InVMIsolateHeap()) {
       assembler_->generate_invoke_array_write_barrier_ =
           [&](Condition condition) {
             AddPcRelativeCallStubTarget(array_stub);
@@ -886,7 +886,7 @@
   }
   __ Comment("Enter frame");
   if (flow_graph().IsCompiledForOsr()) {
-    intptr_t extra_slots = StackSize() - flow_graph().num_stack_locals();
+    const intptr_t extra_slots = ExtraStackSlotsOnOsrEntry();
     ASSERT(extra_slots >= 0);
     __ EnterOsrFrame(extra_slots * kWordSize);
   } else {
@@ -943,15 +943,19 @@
   VisitBlocks();
 
   __ bkpt(0);
-  ASSERT(assembler()->constant_pool_allowed());
-  GenerateDeferredCode();
+
+  if (!fully_intrinsified_) {
+    ASSERT(assembler()->constant_pool_allowed());
+    GenerateDeferredCode();
+  }
 }
 
 void FlowGraphCompiler::GenerateCall(TokenPosition token_pos,
                                      const Code& stub,
                                      RawPcDescriptors::Kind kind,
                                      LocationSummary* locs) {
-  if (FLAG_precompiled_mode && FLAG_use_bare_instructions && !stub.InVMHeap()) {
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions &&
+      !stub.InVMIsolateHeap()) {
     AddPcRelativeCallStubTarget(stub);
     __ GenerateUnRelocatedPcRelativeCall();
     EmitCallsiteMetadata(token_pos, DeoptId::kNone, kind, locs);
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc b/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc
index b128224..943aaec 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc
@@ -32,7 +32,7 @@
 
     const auto& stub =
         Code::ZoneHandle(object_store->write_barrier_wrappers_stub());
-    if (!stub.InVMHeap()) {
+    if (!stub.InVMIsolateHeap()) {
       assembler_->generate_invoke_write_barrier_wrapper_ = [&](Register reg) {
         const intptr_t offset_into_target =
             Thread::WriteBarrierWrappersOffsetForRegister(reg);
@@ -43,7 +43,7 @@
 
     const auto& array_stub =
         Code::ZoneHandle(object_store->array_write_barrier_stub());
-    if (!array_stub.InVMHeap()) {
+    if (!array_stub.InVMIsolateHeap()) {
       assembler_->generate_invoke_array_write_barrier_ = [&]() {
         AddPcRelativeCallStubTarget(array_stub);
         assembler_->GenerateUnRelocatedPcRelativeCall();
@@ -870,7 +870,7 @@
   }
   __ Comment("Enter frame");
   if (flow_graph().IsCompiledForOsr()) {
-    intptr_t extra_slots = StackSize() - flow_graph().num_stack_locals();
+    const intptr_t extra_slots = ExtraStackSlotsOnOsrEntry();
     ASSERT(extra_slots >= 0);
     __ EnterOsrFrame(extra_slots * kWordSize, new_pp);
   } else {
@@ -944,7 +944,8 @@
                                      const Code& stub,
                                      RawPcDescriptors::Kind kind,
                                      LocationSummary* locs) {
-  if (FLAG_precompiled_mode && FLAG_use_bare_instructions && !stub.InVMHeap()) {
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions &&
+      !stub.InVMIsolateHeap()) {
     AddPcRelativeCallStubTarget(stub);
     __ GenerateUnRelocatedPcRelativeCall();
     EmitCallsiteMetadata(token_pos, DeoptId::kNone, kind, locs);
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_dbc.cc b/runtime/vm/compiler/backend/flow_graph_compiler_dbc.cc
index 09c490bd..892cdb5 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_dbc.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_dbc.cc
@@ -113,7 +113,8 @@
         NULL,
         Location::StackSlot(
             compiler::target::frame_layout.FrameSlotForVariableIndex(
-                -stack_height)),
+                -stack_height),
+            FPREG),
         slot_ix++);
   }
 
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_ia32.cc b/runtime/vm/compiler/backend/flow_graph_compiler_ia32.cc
index b1c4671..dfa2fc7 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_ia32.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_ia32.cc
@@ -727,7 +727,7 @@
       __ PushObject(value.constant());
     } else {
       ASSERT(value.IsStackSlot());
-      __ pushl(value.ToStackSlotAddress());
+      __ pushl(LocationToStackSlotAddress(value));
     }
   }
 }
@@ -779,7 +779,7 @@
   }
   __ Comment("Enter frame");
   if (flow_graph().IsCompiledForOsr()) {
-    intptr_t extra_slots = StackSize() - flow_graph().num_stack_locals();
+    intptr_t extra_slots = ExtraStackSlotsOnOsrEntry();
     ASSERT(extra_slots >= 0);
     __ EnterOsrFrame(extra_slots * kWordSize);
   } else {
@@ -990,8 +990,8 @@
   }
   // Do not use the code from the function, but let the code be patched so that
   // we can record the outgoing edges to other code.
-  GenerateStaticDartCall(deopt_id, token_pos,
-                         RawPcDescriptors::kOther, locs, function);
+  GenerateStaticDartCall(deopt_id, token_pos, RawPcDescriptors::kOther, locs,
+                         function);
   __ Drop(count_with_type_args);
 }
 
@@ -1182,15 +1182,15 @@
       __ movl(destination.reg(), source.reg());
     } else {
       ASSERT(destination.IsStackSlot());
-      __ movl(destination.ToStackSlotAddress(), source.reg());
+      __ movl(LocationToStackSlotAddress(destination), source.reg());
     }
   } else if (source.IsStackSlot()) {
     if (destination.IsRegister()) {
-      __ movl(destination.reg(), source.ToStackSlotAddress());
+      __ movl(destination.reg(), LocationToStackSlotAddress(source));
     } else {
       ASSERT(destination.IsStackSlot());
-      MoveMemoryToMemory(destination.ToStackSlotAddress(),
-                         source.ToStackSlotAddress());
+      MoveMemoryToMemory(LocationToStackSlotAddress(destination),
+                         LocationToStackSlotAddress(source));
     }
   } else if (source.IsFpuRegister()) {
     if (destination.IsFpuRegister()) {
@@ -1199,27 +1199,27 @@
       __ movaps(destination.fpu_reg(), source.fpu_reg());
     } else {
       if (destination.IsDoubleStackSlot()) {
-        __ movsd(destination.ToStackSlotAddress(), source.fpu_reg());
+        __ movsd(LocationToStackSlotAddress(destination), source.fpu_reg());
       } else {
         ASSERT(destination.IsQuadStackSlot());
-        __ movups(destination.ToStackSlotAddress(), source.fpu_reg());
+        __ movups(LocationToStackSlotAddress(destination), source.fpu_reg());
       }
     }
   } else if (source.IsDoubleStackSlot()) {
     if (destination.IsFpuRegister()) {
-      __ movsd(destination.fpu_reg(), source.ToStackSlotAddress());
+      __ movsd(destination.fpu_reg(), LocationToStackSlotAddress(source));
     } else {
       ASSERT(destination.IsDoubleStackSlot());
-      __ movsd(XMM0, source.ToStackSlotAddress());
-      __ movsd(destination.ToStackSlotAddress(), XMM0);
+      __ movsd(XMM0, LocationToStackSlotAddress(source));
+      __ movsd(LocationToStackSlotAddress(destination), XMM0);
     }
   } else if (source.IsQuadStackSlot()) {
     if (destination.IsFpuRegister()) {
-      __ movups(destination.fpu_reg(), source.ToStackSlotAddress());
+      __ movups(destination.fpu_reg(), LocationToStackSlotAddress(source));
     } else {
       ASSERT(destination.IsQuadStackSlot());
-      __ movups(XMM0, source.ToStackSlotAddress());
-      __ movups(destination.ToStackSlotAddress(), XMM0);
+      __ movups(XMM0, LocationToStackSlotAddress(source));
+      __ movups(LocationToStackSlotAddress(destination), XMM0);
     }
   } else {
     ASSERT(source.IsConstant());
@@ -1237,11 +1237,12 @@
   if (source.IsRegister() && destination.IsRegister()) {
     __ xchgl(destination.reg(), source.reg());
   } else if (source.IsRegister() && destination.IsStackSlot()) {
-    Exchange(source.reg(), destination.ToStackSlotAddress());
+    Exchange(source.reg(), LocationToStackSlotAddress(destination));
   } else if (source.IsStackSlot() && destination.IsRegister()) {
-    Exchange(destination.reg(), source.ToStackSlotAddress());
+    Exchange(destination.reg(), LocationToStackSlotAddress(source));
   } else if (source.IsStackSlot() && destination.IsStackSlot()) {
-    Exchange(destination.ToStackSlotAddress(), source.ToStackSlotAddress());
+    Exchange(LocationToStackSlotAddress(destination),
+             LocationToStackSlotAddress(source));
   } else if (source.IsFpuRegister() && destination.IsFpuRegister()) {
     __ movaps(XMM0, source.fpu_reg());
     __ movaps(source.fpu_reg(), destination.fpu_reg());
@@ -1254,8 +1255,8 @@
     XmmRegister reg =
         source.IsFpuRegister() ? source.fpu_reg() : destination.fpu_reg();
     const Address& slot_address = source.IsFpuRegister()
-                                      ? destination.ToStackSlotAddress()
-                                      : source.ToStackSlotAddress();
+                                      ? LocationToStackSlotAddress(destination)
+                                      : LocationToStackSlotAddress(source);
 
     if (double_width) {
       __ movsd(XMM0, slot_address);
@@ -1266,8 +1267,9 @@
     }
     __ movaps(reg, XMM0);
   } else if (source.IsDoubleStackSlot() && destination.IsDoubleStackSlot()) {
-    const Address& source_slot_address = source.ToStackSlotAddress();
-    const Address& destination_slot_address = destination.ToStackSlotAddress();
+    const Address& source_slot_address = LocationToStackSlotAddress(source);
+    const Address& destination_slot_address =
+        LocationToStackSlotAddress(destination);
 
     ScratchFpuRegisterScope ensure_scratch(this, XMM0);
     __ movsd(XMM0, source_slot_address);
@@ -1275,8 +1277,9 @@
     __ movsd(destination_slot_address, XMM0);
     __ movsd(source_slot_address, ensure_scratch.reg());
   } else if (source.IsQuadStackSlot() && destination.IsQuadStackSlot()) {
-    const Address& source_slot_address = source.ToStackSlotAddress();
-    const Address& destination_slot_address = destination.ToStackSlotAddress();
+    const Address& source_slot_address = LocationToStackSlotAddress(source);
+    const Address& destination_slot_address =
+        LocationToStackSlotAddress(destination);
 
     ScratchFpuRegisterScope ensure_scratch(this, XMM0);
     __ movups(XMM0, source_slot_address);
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc b/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc
index 0f087fa..192a903 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc
@@ -31,7 +31,7 @@
 
     const auto& stub =
         Code::ZoneHandle(object_store->write_barrier_wrappers_stub());
-    if (!stub.InVMHeap()) {
+    if (!stub.InVMIsolateHeap()) {
       assembler_->generate_invoke_write_barrier_wrapper_ = [&](Register reg) {
         const intptr_t offset_into_target =
             Thread::WriteBarrierWrappersOffsetForRegister(reg);
@@ -42,7 +42,7 @@
 
     const auto& array_stub =
         Code::ZoneHandle(object_store->array_write_barrier_stub());
-    if (!array_stub.InVMHeap()) {
+    if (!array_stub.InVMIsolateHeap()) {
       assembler_->generate_invoke_array_write_barrier_ = [&]() {
         AddPcRelativeCallStubTarget(array_stub);
         assembler_->GenerateUnRelocatedPcRelativeCall();
@@ -648,11 +648,11 @@
   Label done;
   if (!test_cache.IsNull()) {
     // Generate runtime call.
-    __ PushObject(Object::null_object());       // Make room for the result.
-    __ pushq(RAX);                              // Push the instance.
-    __ PushObject(type);                        // Push the type.
-    __ pushq(RDX);                              // Instantiator type arguments.
-    __ pushq(RCX);                              // Function type arguments.
+    __ PushObject(Object::null_object());  // Make room for the result.
+    __ pushq(RAX);                         // Push the instance.
+    __ PushObject(type);                   // Push the type.
+    __ pushq(RDX);                         // Instantiator type arguments.
+    __ pushq(RCX);                         // Function type arguments.
     __ LoadUniqueObject(RAX, test_cache);
     __ pushq(RAX);
     GenerateRuntimeCall(token_pos, deopt_id, kInstanceofRuntimeEntry, 5, locs);
@@ -787,7 +787,7 @@
       __ PushObject(value.constant());
     } else {
       ASSERT(value.IsStackSlot());
-      __ pushq(value.ToStackSlotAddress());
+      __ pushq(LocationToStackSlotAddress(value));
     }
   }
 }
@@ -854,7 +854,7 @@
 // needs to be updated to match.
 void FlowGraphCompiler::EmitFrameEntry() {
   if (flow_graph().IsCompiledForOsr()) {
-    intptr_t extra_slots = StackSize() - flow_graph().num_stack_locals();
+    const intptr_t extra_slots = ExtraStackSlotsOnOsrEntry();
     ASSERT(extra_slots >= 0);
     __ EnterOsrFrame(extra_slots * kWordSize);
   } else {
@@ -932,15 +932,19 @@
   VisitBlocks();
 
   __ int3();
-  ASSERT(assembler()->constant_pool_allowed());
-  GenerateDeferredCode();
+
+  if (!fully_intrinsified_) {
+    ASSERT(assembler()->constant_pool_allowed());
+    GenerateDeferredCode();
+  }
 }
 
 void FlowGraphCompiler::GenerateCall(TokenPosition token_pos,
                                      const Code& stub,
                                      RawPcDescriptors::Kind kind,
                                      LocationSummary* locs) {
-  if (FLAG_precompiled_mode && FLAG_use_bare_instructions && !stub.InVMHeap()) {
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions &&
+      !stub.InVMIsolateHeap()) {
     AddPcRelativeCallStubTarget(stub);
     __ GenerateUnRelocatedPcRelativeCall();
     EmitCallsiteMetadata(token_pos, DeoptId::kNone, kind, locs);
@@ -1150,8 +1154,8 @@
   }
   // Do not use the code from the function, but let the code be patched so that
   // we can record the outgoing edges to other code.
-  GenerateStaticDartCall(deopt_id, token_pos,
-                         RawPcDescriptors::kOther, locs, function, entry_kind);
+  GenerateStaticDartCall(deopt_id, token_pos, RawPcDescriptors::kOther, locs,
+                         function, entry_kind);
   __ Drop(count_with_type_args, RCX);
 }
 
@@ -1307,18 +1311,18 @@
       ASSERT((destination.base_reg() != FPREG) ||
              ((-compiler::target::frame_layout.VariableIndexForFrameSlot(
                   destination.stack_index())) < compiler_->StackSize()));
-      __ movq(destination.ToStackSlotAddress(), source.reg());
+      __ movq(LocationToStackSlotAddress(destination), source.reg());
     }
   } else if (source.IsStackSlot()) {
     ASSERT((source.base_reg() != FPREG) ||
            ((-compiler::target::frame_layout.VariableIndexForFrameSlot(
                 source.stack_index())) < compiler_->StackSize()));
     if (destination.IsRegister()) {
-      __ movq(destination.reg(), source.ToStackSlotAddress());
+      __ movq(destination.reg(), LocationToStackSlotAddress(source));
     } else {
       ASSERT(destination.IsStackSlot());
-      MoveMemoryToMemory(destination.ToStackSlotAddress(),
-                         source.ToStackSlotAddress());
+      MoveMemoryToMemory(LocationToStackSlotAddress(destination),
+                         LocationToStackSlotAddress(source));
     }
   } else if (source.IsFpuRegister()) {
     if (destination.IsFpuRegister()) {
@@ -1327,27 +1331,27 @@
       __ movaps(destination.fpu_reg(), source.fpu_reg());
     } else {
       if (destination.IsDoubleStackSlot()) {
-        __ movsd(destination.ToStackSlotAddress(), source.fpu_reg());
+        __ movsd(LocationToStackSlotAddress(destination), source.fpu_reg());
       } else {
         ASSERT(destination.IsQuadStackSlot());
-        __ movups(destination.ToStackSlotAddress(), source.fpu_reg());
+        __ movups(LocationToStackSlotAddress(destination), source.fpu_reg());
       }
     }
   } else if (source.IsDoubleStackSlot()) {
     if (destination.IsFpuRegister()) {
-      __ movsd(destination.fpu_reg(), source.ToStackSlotAddress());
+      __ movsd(destination.fpu_reg(), LocationToStackSlotAddress(source));
     } else {
       ASSERT(destination.IsDoubleStackSlot());
-      __ movsd(XMM0, source.ToStackSlotAddress());
-      __ movsd(destination.ToStackSlotAddress(), XMM0);
+      __ movsd(XMM0, LocationToStackSlotAddress(source));
+      __ movsd(LocationToStackSlotAddress(destination), XMM0);
     }
   } else if (source.IsQuadStackSlot()) {
     if (destination.IsFpuRegister()) {
-      __ movups(destination.fpu_reg(), source.ToStackSlotAddress());
+      __ movups(destination.fpu_reg(), LocationToStackSlotAddress(source));
     } else {
       ASSERT(destination.IsQuadStackSlot());
-      __ movups(XMM0, source.ToStackSlotAddress());
-      __ movups(destination.ToStackSlotAddress(), XMM0);
+      __ movups(XMM0, LocationToStackSlotAddress(source));
+      __ movups(LocationToStackSlotAddress(destination), XMM0);
     }
   } else {
     ASSERT(source.IsConstant());
@@ -1371,11 +1375,12 @@
   if (source.IsRegister() && destination.IsRegister()) {
     __ xchgq(destination.reg(), source.reg());
   } else if (source.IsRegister() && destination.IsStackSlot()) {
-    Exchange(source.reg(), destination.ToStackSlotAddress());
+    Exchange(source.reg(), LocationToStackSlotAddress(destination));
   } else if (source.IsStackSlot() && destination.IsRegister()) {
-    Exchange(destination.reg(), source.ToStackSlotAddress());
+    Exchange(destination.reg(), LocationToStackSlotAddress(source));
   } else if (source.IsStackSlot() && destination.IsStackSlot()) {
-    Exchange(destination.ToStackSlotAddress(), source.ToStackSlotAddress());
+    Exchange(LocationToStackSlotAddress(destination),
+             LocationToStackSlotAddress(source));
   } else if (source.IsFpuRegister() && destination.IsFpuRegister()) {
     __ movaps(XMM0, source.fpu_reg());
     __ movaps(source.fpu_reg(), destination.fpu_reg());
@@ -1388,8 +1393,8 @@
     XmmRegister reg =
         source.IsFpuRegister() ? source.fpu_reg() : destination.fpu_reg();
     Address slot_address = source.IsFpuRegister()
-                               ? destination.ToStackSlotAddress()
-                               : source.ToStackSlotAddress();
+                               ? LocationToStackSlotAddress(destination)
+                               : LocationToStackSlotAddress(source);
 
     if (double_width) {
       __ movsd(XMM0, slot_address);
@@ -1400,8 +1405,9 @@
     }
     __ movaps(reg, XMM0);
   } else if (source.IsDoubleStackSlot() && destination.IsDoubleStackSlot()) {
-    const Address& source_slot_address = source.ToStackSlotAddress();
-    const Address& destination_slot_address = destination.ToStackSlotAddress();
+    const Address& source_slot_address = LocationToStackSlotAddress(source);
+    const Address& destination_slot_address =
+        LocationToStackSlotAddress(destination);
 
     ScratchFpuRegisterScope ensure_scratch(this, XMM0);
     __ movsd(XMM0, source_slot_address);
@@ -1409,8 +1415,9 @@
     __ movsd(destination_slot_address, XMM0);
     __ movsd(source_slot_address, ensure_scratch.reg());
   } else if (source.IsQuadStackSlot() && destination.IsQuadStackSlot()) {
-    const Address& source_slot_address = source.ToStackSlotAddress();
-    const Address& destination_slot_address = destination.ToStackSlotAddress();
+    const Address& source_slot_address = LocationToStackSlotAddress(source);
+    const Address& destination_slot_address =
+        LocationToStackSlotAddress(destination);
 
     ScratchFpuRegisterScope ensure_scratch(this, XMM0);
     __ movups(XMM0, source_slot_address);
diff --git a/runtime/vm/compiler/backend/il.cc b/runtime/vm/compiler/backend/il.cc
index c8b82ed..92b725f 100644
--- a/runtime/vm/compiler/backend/il.cc
+++ b/runtime/vm/compiler/backend/il.cc
@@ -15,6 +15,7 @@
 #include "vm/compiler/backend/locations.h"
 #include "vm/compiler/backend/loops.h"
 #include "vm/compiler/backend/range_analysis.h"
+#include "vm/compiler/ffi.h"
 #include "vm/compiler/frontend/flow_graph_builder.h"
 #include "vm/compiler/jit/compiler.h"
 #include "vm/compiler/method_recognizer.h"
@@ -109,23 +110,33 @@
 
 const CidRangeVector& HierarchyInfo::SubtypeRangesForClass(
     const Class& klass,
-    bool include_abstract) {
+    bool include_abstract,
+    bool exclude_null) {
   ClassTable* table = thread()->isolate()->class_table();
   const intptr_t cid_count = table->NumCids();
-  CidRangeVector** cid_ranges =
-      include_abstract ? &cid_subtype_ranges_abstract_ : &cid_subtype_ranges_;
-  if (*cid_ranges == NULL) {
+  CidRangeVector** cid_ranges = nullptr;
+  if (include_abstract) {
+    ASSERT(!exclude_null);
+    cid_ranges = &cid_subtype_ranges_abstract_nullable_;
+  } else if (exclude_null) {
+    ASSERT(!include_abstract);
+    cid_ranges = &cid_subtype_ranges_nonnullable_;
+  } else {
+    ASSERT(!include_abstract);
+    ASSERT(!exclude_null);
+    cid_ranges = &cid_subtype_ranges_nullable_;
+  }
+  if (*cid_ranges == nullptr) {
     *cid_ranges = new CidRangeVector[cid_count];
   }
-
   CidRangeVector& ranges = (*cid_ranges)[klass.id()];
   if (ranges.length() == 0) {
     if (!FLAG_precompiled_mode) {
       BuildRangesForJIT(table, &ranges, klass, /*use_subtype_test=*/true,
-                        include_abstract);
+                        include_abstract, exclude_null);
     } else {
       BuildRangesFor(table, &ranges, klass, /*use_subtype_test=*/true,
-                     include_abstract);
+                     include_abstract, exclude_null);
     }
   }
   return ranges;
@@ -142,19 +153,29 @@
   CidRangeVector& ranges = cid_subclass_ranges_[klass.id()];
   if (ranges.length() == 0) {
     if (!FLAG_precompiled_mode) {
-      BuildRangesForJIT(table, &ranges, klass, /*use_subtype_test=*/true);
+      BuildRangesForJIT(table, &ranges, klass,
+                        /*use_subtype_test=*/true,
+                        /*include_abstract=*/false,
+                        /*exclude_null=*/false);
     } else {
-      BuildRangesFor(table, &ranges, klass, /*use_subtype_test=*/false);
+      BuildRangesFor(table, &ranges, klass,
+                     /*use_subtype_test=*/false,
+                     /*include_abstract=*/false,
+                     /*exclude_null=*/false);
     }
   }
   return ranges;
 }
 
+// Build the ranges either for:
+//    "<obj> as <Type>", or
+//    "<obj> is <Type>"
 void HierarchyInfo::BuildRangesFor(ClassTable* table,
                                    CidRangeVector* ranges,
                                    const Class& klass,
                                    bool use_subtype_test,
-                                   bool include_abstract) {
+                                   bool include_abstract,
+                                   bool exclude_null) {
   Zone* zone = thread()->zone();
   ClassTable* class_table = thread()->isolate()->class_table();
 
@@ -166,56 +187,68 @@
   AbstractType& super_type = AbstractType::Handle(zone);
   const intptr_t cid_count = table->NumCids();
 
+  // Iterate over all cids to find the ones to be included in the ranges.
   intptr_t start = -1;
+  intptr_t end = -1;
   for (intptr_t cid = kInstanceCid; cid < cid_count; ++cid) {
     // Create local zone because deep hierarchies may allocate lots of handles
     // within one iteration of this loop.
     StackZone stack_zone(thread());
     HANDLESCOPE(thread());
 
+    // Some cases are "don't care", i.e., they may or may not be included,
+    // whatever yields the least number of ranges for efficiency.
     if (!table->HasValidClassAt(cid)) continue;
     if (cid == kTypeArgumentsCid) continue;
     if (cid == kVoidCid) continue;
     if (cid == kDynamicCid) continue;
-    if (cid == kNullCid) continue;
+    if (cid == kNullCid && !exclude_null) continue;
     cls = table->At(cid);
     if (!include_abstract && cls.is_abstract()) continue;
     if (cls.is_patch()) continue;
     if (cls.IsTopLevel()) continue;
 
     // We are either interested in [CidRange]es of subclasses or subtypes.
-    bool test_succeded = false;
-    if (use_subtype_test) {
+    bool test_succeeded = false;
+    if (cid == kNullCid) {
+      ASSERT(exclude_null);
+      test_succeeded = false;
+    } else if (use_subtype_test) {
       cls_type = cls.RareType();
-      test_succeded = cls_type.IsSubtypeOf(dst_type, Heap::kNew);
+      test_succeeded = cls_type.IsSubtypeOf(dst_type, Heap::kNew);
     } else {
       while (!cls.IsObjectClass()) {
         if (cls.raw() == klass.raw()) {
-          test_succeded = true;
+          test_succeeded = true;
           break;
         }
-
         super_type = cls.super_type();
         const intptr_t type_class_id = super_type.type_class_id();
         cls = class_table->At(type_class_id);
       }
     }
 
-    if (start == -1 && test_succeded) {
-      start = cid;
-    } else if (start != -1 && !test_succeded) {
-      CidRange range(start, cid - 1);
+    if (test_succeeded) {
+      // On success, open a new or continue any open range.
+      if (start == -1) start = cid;
+      end = cid;
+    } else if (start != -1) {
+      // On failure, close any open range from start to end
+      // (the latter is the most recent succesful "do-care" cid).
+      ASSERT(start <= end);
+      CidRange range(start, end);
       ranges->Add(range);
       start = -1;
+      end = -1;
     }
   }
 
+  // Construct last range (either close open one, or add invalid).
   if (start != -1) {
-    CidRange range(start, cid_count - 1);
+    ASSERT(start <= end);
+    CidRange range(start, end);
     ranges->Add(range);
-  }
-
-  if (start == -1 && ranges->length() == 0) {
+  } else if (ranges->length() == 0) {
     CidRange range;
     ASSERT(range.IsIllegalRange());
     ranges->Add(range);
@@ -226,12 +259,14 @@
                                       CidRangeVector* ranges,
                                       const Class& dst_klass,
                                       bool use_subtype_test,
-                                      bool include_abstract) {
-  if (dst_klass.InVMHeap()) {
-    BuildRangesFor(table, ranges, dst_klass, use_subtype_test,
-                   include_abstract);
+                                      bool include_abstract,
+                                      bool exclude_null) {
+  if (dst_klass.InVMIsolateHeap()) {
+    BuildRangesFor(table, ranges, dst_klass, use_subtype_test, include_abstract,
+                   exclude_null);
     return;
   }
+  ASSERT(!exclude_null);
 
   Zone* zone = thread()->zone();
   GrowableArray<intptr_t> cids;
@@ -417,10 +452,14 @@
 bool HierarchyInfo::InstanceOfHasClassRange(const AbstractType& type,
                                             intptr_t* lower_limit,
                                             intptr_t* upper_limit) {
+  ASSERT(FLAG_precompiled_mode);
   if (CanUseSubtypeRangeCheckFor(type)) {
     const Class& type_class =
         Class::Handle(thread()->zone(), type.type_class());
-    const CidRangeVector& ranges = SubtypeRangesForClass(type_class);
+    const CidRangeVector& ranges =
+        SubtypeRangesForClass(type_class,
+                              /*include_abstract=*/false,
+                              /*exclude_null=*/true);
     if (ranges.length() == 1) {
       const CidRange& range = ranges[0];
       if (!range.IsIllegalRange()) {
@@ -440,15 +479,7 @@
 }
 #endif  // DEBUG
 
-Definition::Definition(intptr_t deopt_id)
-    : Instruction(deopt_id),
-      range_(NULL),
-      type_(NULL),
-      temp_index_(-1),
-      ssa_temp_index_(-1),
-      input_use_list_(NULL),
-      env_use_list_(NULL),
-      constant_value_(NULL) {}
+Definition::Definition(intptr_t deopt_id) : Instruction(deopt_id) {}
 
 // A value in the constant propagation lattice.
 //    - non-constant sentinel
@@ -463,21 +494,47 @@
 
 Definition* Definition::OriginalDefinition() {
   Definition* defn = this;
-  while (defn->IsRedefinition() || defn->IsAssertAssignable() ||
-         defn->IsCheckArrayBound() || defn->IsGenericCheckBound()) {
-    if (defn->IsRedefinition()) {
-      defn = defn->AsRedefinition()->value()->definition();
-    } else if (defn->IsAssertAssignable()) {
-      defn = defn->AsAssertAssignable()->value()->definition();
-    } else if (defn->IsCheckArrayBound()) {
-      defn = defn->AsCheckArrayBound()->index()->definition();
-    } else {
-      defn = defn->AsGenericCheckBound()->index()->definition();
-    }
+  Value* unwrapped;
+  while ((unwrapped = defn->RedefinedValue()) != nullptr) {
+    defn = unwrapped->definition();
   }
   return defn;
 }
 
+Value* Definition::RedefinedValue() const {
+  return nullptr;
+}
+
+Value* RedefinitionInstr::RedefinedValue() const {
+  return value();
+}
+
+Value* AssertAssignableInstr::RedefinedValue() const {
+  return value();
+}
+
+Value* CheckBoundBase::RedefinedValue() const {
+  return index();
+}
+
+Value* CheckNullInstr::RedefinedValue() const {
+  return value();
+}
+
+Definition* Definition::OriginalDefinitionIgnoreBoxingAndConstraints() {
+  Definition* def = this;
+  while (true) {
+    Definition* orig;
+    if (def->IsConstraint() || def->IsBox() || def->IsUnbox()) {
+      orig = def->InputAt(0)->definition();
+    } else {
+      orig = def->OriginalDefinition();
+    }
+    if (orig == def) return def;
+    def = orig;
+  }
+}
+
 const ICData* Instruction::GetICData(
     const ZoneGrowableArray<const ICData*>& ic_data_array) const {
   // The deopt_id can be outside the range of the IC data array for
@@ -1252,14 +1309,12 @@
       flow_graph->zone(), this, call->ArgumentCount(),
       flow_graph->constant_dead(),
       result != NULL ? result : flow_graph->constant_dead());
-  env()->set_deopt_id(deopt_id_);
 }
 
 void Instruction::InheritDeoptTarget(Zone* zone, Instruction* other) {
   ASSERT(other->env() != NULL);
   CopyDeoptIdFrom(*other);
   other->env()->DeepCopyTo(zone, this);
-  env()->set_deopt_id(deopt_id_);
 }
 
 void BranchInstr::InheritDeoptTarget(Zone* zone, Instruction* other) {
@@ -1468,10 +1523,11 @@
       // we can simply jump to the beginning of the block.
       ASSERT(instr->previous() == this);
 
+      const intptr_t stack_depth = instr->AsCheckStackOverflow()->stack_depth();
       auto normal_entry = graph_entry->normal_entry();
       auto osr_entry = new OsrEntryInstr(graph_entry, normal_entry->block_id(),
                                          normal_entry->try_index(),
-                                         normal_entry->deopt_id());
+                                         normal_entry->deopt_id(), stack_depth);
 
       auto goto_join = new GotoInstr(AsJoinEntry(),
                                      CompilerState::Current().GetNextDeoptId());
@@ -1716,7 +1772,7 @@
   LinkTo(new GotoInstr(entry, CompilerState::Current().GetNextDeoptId()));
 }
 
-bool UnboxedIntConverterInstr::ComputeCanDeoptimize() const {
+bool IntConverterInstr::ComputeCanDeoptimize() const {
   return (to() == kUnboxedInt32) && !is_truncating() &&
          !RangeUtils::Fits(value()->definition()->range(),
                            RangeBoundary::kRangeBoundaryInt32);
@@ -1799,6 +1855,14 @@
     case Token::kMOD:
       return RangeUtils::CanBeZero(right_range());
 
+    case Token::kTRUNCDIV:
+#if defined(TARGET_ARCH_DBC)
+      return true;
+#else
+      return RangeUtils::CanBeZero(right_range()) ||
+             RangeUtils::Overlaps(right_range(), -1, -1);
+#endif
+
     default:
       return can_overflow();
   }
@@ -1970,9 +2034,13 @@
 static bool IsCommutative(Token::Kind op) {
   switch (op) {
     case Token::kMUL:
+      FALL_THROUGH;
     case Token::kADD:
+      FALL_THROUGH;
     case Token::kBIT_AND:
+      FALL_THROUGH;
     case Token::kBIT_OR:
+      FALL_THROUGH;
     case Token::kBIT_XOR:
       return true;
     default:
@@ -2154,26 +2222,32 @@
 
   switch (op_kind()) {
     case Token::kTRUNCDIV:
+      FALL_THROUGH;
     case Token::kMOD:
       // Check right value for zero.
       if (right.AsInt64Value() == 0) {
         break;  // Will throw.
       }
-    // Fall through.
+      FALL_THROUGH;
     case Token::kADD:
+      FALL_THROUGH;
     case Token::kSUB:
+      FALL_THROUGH;
     case Token::kMUL: {
       result = left.ArithmeticOp(op_kind(), right, Heap::kOld);
       break;
     }
     case Token::kSHL:
+      FALL_THROUGH;
     case Token::kSHR:
       if (right.AsInt64Value() >= 0) {
         result = left.ShiftOp(op_kind(), right, Heap::kOld);
       }
       break;
     case Token::kBIT_AND:
+      FALL_THROUGH;
     case Token::kBIT_OR:
+      FALL_THROUGH;
     case Token::kBIT_XOR: {
       result = left.BitOp(op_kind(), right, Heap::kOld);
       break;
@@ -2228,11 +2302,14 @@
     // range information.
     switch (op_kind()) {
       case Token::kBIT_AND:
+        FALL_THROUGH;
       case Token::kBIT_OR:
+        FALL_THROUGH;
       case Token::kBIT_XOR:
         replacement = new BinarySmiOpInstr(
             op_kind(), new Value(left()->definition()),
             new Value(right()->definition()), DeoptId::kNone);
+        FALL_THROUGH;
       default:
         break;
     }
@@ -2340,13 +2417,21 @@
       } else if (rhs == 0) {
         return right()->definition();
       } else if (rhs == 2) {
+        const int64_t shift_1 = 1;
         ConstantInstr* constant_1 =
-            flow_graph->GetConstant(Smi::Handle(Smi::New(1)));
+            flow_graph->GetConstant(Smi::Handle(Smi::New(shift_1)));
         BinaryIntegerOpInstr* shift = BinaryIntegerOpInstr::Make(
             representation(), Token::kSHL, left()->CopyWithType(),
             new Value(constant_1), GetDeoptId(), can_overflow(),
             is_truncating(), range(), speculative_mode());
-        if (shift != NULL) {
+        if (shift != nullptr) {
+          // Assign a range to the shift factor, just in case range
+          // analysis no longer runs after this rewriting.
+          if (auto shift_with_range = shift->AsShiftIntegerOp()) {
+            shift_with_range->set_shift_range(
+                new Range(RangeBoundary::FromConstant(shift_1),
+                          RangeBoundary::FromConstant(shift_1)));
+          }
           flow_graph->InsertBefore(this, shift, env(), FlowGraph::kValue);
           return shift;
         }
@@ -2475,8 +2560,7 @@
   if (!HasUses() && !flow_graph->is_licm_allowed()) {
     return NULL;
   }
-  if ((constrained_type() != NULL) &&
-      Type()->IsEqualTo(value()->definition()->Type())) {
+  if ((constrained_type() != nullptr) && Type()->IsEqualTo(value()->Type())) {
     return value()->definition();
   }
   return this;
@@ -2500,7 +2584,7 @@
 bool LoadFieldInstr::IsImmutableLengthLoad() const {
   switch (slot().kind()) {
     case Slot::Kind::kArray_length:
-    case Slot::Kind::kTypedData_length:
+    case Slot::Kind::kTypedDataBase_length:
     case Slot::Kind::kString_length:
       return true;
     case Slot::Kind::kGrowableObjectArray_length:
@@ -2516,6 +2600,9 @@
     case Slot::Kind::kArgumentsDescriptor_positional_count:
     case Slot::Kind::kArgumentsDescriptor_count:
     case Slot::Kind::kTypeArguments:
+    case Slot::Kind::kTypedDataBase_data_field:
+    case Slot::Kind::kTypedDataView_offset_in_bytes:
+    case Slot::Kind::kTypedDataView_data:
     case Slot::Kind::kGrowableObjectArray_data:
     case Slot::Kind::kContext_parent:
     case Slot::Kind::kClosure_context:
@@ -2526,6 +2613,7 @@
     case Slot::Kind::kClosure_hash:
     case Slot::Kind::kCapturedVariable:
     case Slot::Kind::kDartField:
+    case Slot::Kind::kPointer_c_memory_address:
       return false;
   }
   UNREACHABLE();
@@ -2848,8 +2936,7 @@
     return replacement;
   }
 
-  UnboxedIntConverterInstr* conv =
-      value()->definition()->AsUnboxedIntConverter();
+  IntConverterInstr* conv = value()->definition()->AsIntConverter();
   if (conv != NULL) {
     Definition* replacement = this;
 
@@ -2919,7 +3006,7 @@
       return box_defn->value()->definition();
     } else if (from_representation != kTagged) {
       // Only operate on explicit unboxed operands.
-      UnboxedIntConverterInstr* converter = new UnboxedIntConverterInstr(
+      IntConverterInstr* converter = new IntConverterInstr(
           from_representation, representation(),
           box_defn->value()->CopyWithType(),
           (representation() == kUnboxedInt32) ? GetDeoptId() : DeoptId::kNone);
@@ -2995,11 +3082,10 @@
   return this;
 }
 
-Definition* UnboxedIntConverterInstr::Canonicalize(FlowGraph* flow_graph) {
+Definition* IntConverterInstr::Canonicalize(FlowGraph* flow_graph) {
   if (!HasUses()) return NULL;
 
-  UnboxedIntConverterInstr* box_defn =
-      value()->definition()->AsUnboxedIntConverter();
+  IntConverterInstr* box_defn = value()->definition()->AsIntConverter();
   if ((box_defn != NULL) && (box_defn->representation() == from())) {
     if (box_defn->from() == to()) {
       // Do not erase truncating conversions from 64-bit value to 32-bit values
@@ -3010,7 +3096,7 @@
       return box_defn->value()->definition();
     }
 
-    UnboxedIntConverterInstr* converter = new UnboxedIntConverterInstr(
+    IntConverterInstr* converter = new IntConverterInstr(
         box_defn->from(), representation(), box_defn->value()->CopyWithType(),
         (to() == kUnboxedInt32) ? GetDeoptId() : DeoptId::kNone);
     if ((representation() == kUnboxedInt32) && is_truncating()) {
@@ -3404,8 +3490,8 @@
   return this;
 }
 
-Instruction* CheckNullInstr::Canonicalize(FlowGraph* flow_graph) {
-  return (!value()->Type()->is_nullable()) ? NULL : this;
+Definition* CheckNullInstr::Canonicalize(FlowGraph* flow_graph) {
+  return (!value()->Type()->is_nullable()) ? value()->definition() : this;
 }
 
 BoxInstr* BoxInstr::Create(Representation from, Value* value) {
@@ -3420,6 +3506,7 @@
       return new BoxInt64Instr(value);
 
     case kUnboxedDouble:
+    case kUnboxedFloat:
     case kUnboxedFloat32x4:
     case kUnboxedFloat64x2:
     case kUnboxedInt32x4:
@@ -3437,8 +3524,12 @@
                                SpeculativeMode speculative_mode) {
   switch (to) {
     case kUnboxedInt32:
-      return new UnboxInt32Instr(UnboxInt32Instr::kNoTruncation, value,
-                                 deopt_id, speculative_mode);
+      // We must truncate if we can't deoptimize.
+      return new UnboxInt32Instr(
+          speculative_mode == SpeculativeMode::kNotSpeculative
+              ? UnboxInt32Instr::kTruncate
+              : UnboxInt32Instr::kNoTruncation,
+          value, deopt_id, speculative_mode);
 
     case kUnboxedUint32:
       return new UnboxUint32Instr(value, deopt_id, speculative_mode);
@@ -3447,6 +3538,7 @@
       return new UnboxInt64Instr(value, deopt_id, speculative_mode);
 
     case kUnboxedDouble:
+    case kUnboxedFloat:
     case kUnboxedFloat32x4:
     case kUnboxedFloat64x2:
     case kUnboxedInt32x4:
@@ -3462,6 +3554,8 @@
 bool UnboxInstr::CanConvertSmi() const {
   switch (representation()) {
     case kUnboxedDouble:
+    case kUnboxedFloat:
+    case kUnboxedInt32:
     case kUnboxedInt64:
       return true;
 
@@ -3675,10 +3769,10 @@
 #endif
   __ Bind(compiler->GetJumpLabel(this));
 
-  // In the AOT compiler we want to reduce code size, so generate no
-  // fall-through code in [FlowGraphCompiler::CompileGraph()].
-  // (As opposed to here where we don't check for the return value of
-  // [Intrinsify]).
+// In the AOT compiler we want to reduce code size, so generate no
+// fall-through code in [FlowGraphCompiler::CompileGraph()].
+// (As opposed to here where we don't check for the return value of
+// [Intrinsify]).
 #if defined(TARGET_ARCH_X64) || defined(TARGET_ARCH_ARM)
   if (FLAG_precompiled_mode) {
     const Function& function = compiler->parsed_function().function();
@@ -3688,14 +3782,11 @@
       compiler->SpecialStatsEnd(CombinedCodeStatistics::kTagCheckedEntry);
     }
   }
-  // NOTE: Because in JIT X64/ARM mode the graph can have multiple
-  // entrypoints, so we generate several times the same intrinsification &
-  // frame setup.  That's why we cannot rely on the constant pool being
-  // `false` when we come in here.
+  // NOTE: Because in X64/ARM mode the graph can have multiple entrypoints, we
+  // generate several times the same intrinsification & frame setup. That's why
+  // we cannot rely on the constant pool being `false` when we come in here.
   __ set_constant_pool_allowed(false);
-  // TODO(#34162): Don't emit more code if 'TryIntrinsify' returns 'true'
-  // (meaning the function was fully intrinsified).
-  compiler->TryIntrinsify();
+  if (compiler->TryIntrinsify()) return;
   compiler->EmitPrologue();
   ASSERT(__ constant_pool_allowed());
 #endif
@@ -3874,8 +3965,8 @@
   registers_remapped_ = true;
 
   for (intptr_t i = 0; i < InputCount(); i++) {
-    locations_[i] = LocationAt(i).RemapForSlowPath(
-        InputAt(i)->definition(), cpu_reg_slots, fpu_reg_slots);
+    locations_[i] = LocationRemapForSlowPath(
+        LocationAt(i), InputAt(i)->definition(), cpu_reg_slots, fpu_reg_slots);
   }
 }
 
@@ -4030,26 +4121,14 @@
     const Array& arguments_descriptor =
         Array::Handle(zone, GetArgumentsDescriptor());
 
-    AbstractType& static_receiver_type = AbstractType::Handle(zone);
-
-#if defined(TARGET_ARCH_X64)
-    // Enable static type exactness tracking for the callsite by setting
-    // static receiver type on the ICData.
-    if (checked_argument_count() == 1) {
-      if (static_receiver_type_ != nullptr &&
-          static_receiver_type_->HasTypeClass()) {
-        const Class& cls =
-            Class::Handle(zone, static_receiver_type_->type_class());
-        if (cls.IsGeneric() && !cls.IsFutureOrClass()) {
-          static_receiver_type = static_receiver_type_->raw();
-        }
-      }
+    AbstractType& receivers_static_type = AbstractType::Handle(zone);
+    if (receivers_static_type_ != nullptr) {
+      receivers_static_type = receivers_static_type_->raw();
     }
-#endif
 
     call_ic_data = compiler->GetOrAddInstanceCallICData(
         deopt_id(), function_name(), arguments_descriptor,
-        checked_argument_count(), static_receiver_type);
+        checked_argument_count(), receivers_static_type);
   } else {
     call_ic_data = &ICData::ZoneHandle(zone, ic_data()->raw());
   }
@@ -4535,7 +4614,8 @@
   return locs;
 }
 
-#if !defined(TARGET_ARCH_DBC)
+#endif  // !defined(TARGET_ARCH_DBC)
+
 void CheckNullInstr::AddMetadataForRuntimeCall(CheckNullInstr* check_null,
                                                FlowGraphCompiler* compiler) {
   const String& function_name = check_null->function_name();
@@ -4544,7 +4624,8 @@
   compiler->AddNullCheck(compiler->assembler()->CodeSize(),
                          check_null->token_pos(), name_index);
 }
-#endif  // !defined(TARGET_ARCH_DBC)
+
+#if !defined(TARGET_ARCH_DBC)
 
 void UnboxInstr::EmitLoadFromBoxWithDeopt(FlowGraphCompiler* compiler) {
   const intptr_t box_cid = BoxCid();
@@ -4579,9 +4660,14 @@
   if (speculative_mode() == kNotSpeculative) {
     switch (representation()) {
       case kUnboxedDouble:
+      case kUnboxedFloat:
         EmitLoadFromBox(compiler);
         break;
 
+      case kUnboxedInt32:
+        EmitLoadInt32FromBoxOrSmi(compiler);
+        break;
+
       case kUnboxedInt64: {
         if (value()->Type()->ToCid() == kSmiCid) {
           // Smi -> int64 conversion is more efficient than
@@ -4592,7 +4678,6 @@
         }
         break;
       }
-
       default:
         UNREACHABLE();
         break;
@@ -4619,9 +4704,8 @@
                                const GrowableArray<Definition*>& definitions,
                                intptr_t fixed_parameter_count,
                                const ParsedFunction& parsed_function) {
-  Environment* env =
-      new (zone) Environment(definitions.length(), fixed_parameter_count,
-                             DeoptId::kNone, parsed_function, NULL);
+  Environment* env = new (zone) Environment(
+      definitions.length(), fixed_parameter_count, parsed_function, NULL);
   for (intptr_t i = 0; i < definitions.length(); ++i) {
     env->values_.Add(new (zone) Value(definitions[i]));
   }
@@ -4634,9 +4718,10 @@
 
 Environment* Environment::DeepCopy(Zone* zone, intptr_t length) const {
   ASSERT(length <= values_.length());
-  Environment* copy = new (zone)
-      Environment(length, fixed_parameter_count_, deopt_id_, parsed_function_,
-                  (outer_ == NULL) ? NULL : outer_->DeepCopy(zone));
+  Environment* copy =
+      new (zone) Environment(length, fixed_parameter_count_, parsed_function_,
+                             (outer_ == NULL) ? NULL : outer_->DeepCopy(zone));
+  copy->deopt_id_ = this->deopt_id_;
   if (locations_ != NULL) {
     Location* new_locations = zone->Alloc<Location>(length);
     copy->set_locations(new_locations);
@@ -4688,12 +4773,15 @@
 
 // Copies the environment as outer on an inlined instruction and updates the
 // environment use lists.
-void Environment::DeepCopyToOuter(Zone* zone, Instruction* instr) const {
+void Environment::DeepCopyToOuter(Zone* zone,
+                                  Instruction* instr,
+                                  intptr_t outer_deopt_id) const {
   // Create a deep copy removing caller arguments from the environment.
   ASSERT(this != NULL);
   ASSERT(instr->env()->outer() == NULL);
   intptr_t argument_count = instr->env()->fixed_parameter_count();
   Environment* copy = DeepCopy(zone, values_.length() - argument_count);
+  copy->deopt_id_ = outer_deopt_id;
   instr->env()->outer_ = copy;
   intptr_t use_index = instr->env()->Length();  // Start index after inner.
   for (Environment::DeepIterator it(copy); !it.Done(); it.Advance()) {
@@ -4814,12 +4902,12 @@
 }
 
 intptr_t CheckArrayBoundInstr::LengthOffsetFor(intptr_t class_id) {
-  if (RawObject::IsExternalTypedDataClassId(class_id)) {
-    return ExternalTypedData::length_offset();
+  if (RawObject::IsTypedDataClassId(class_id) ||
+      RawObject::IsTypedDataViewClassId(class_id) ||
+      RawObject::IsExternalTypedDataClassId(class_id)) {
+    return TypedDataBase::length_offset();
   }
-  if (RawObject::IsTypedDataClassId(class_id)) {
-    return TypedData::length_offset();
-  }
+
   switch (class_id) {
     case kGrowableObjectArrayCid:
       return GrowableObjectArray::length_offset();
@@ -4971,13 +5059,15 @@
                                      intptr_t class_id,
                                      AlignmentType alignment,
                                      intptr_t deopt_id,
-                                     TokenPosition token_pos)
+                                     TokenPosition token_pos,
+                                     SpeculativeMode speculative_mode)
     : TemplateInstruction(deopt_id),
       emit_store_barrier_(emit_store_barrier),
       index_scale_(index_scale),
       class_id_(class_id),
       alignment_(StrengthenAlignment(class_id, alignment)),
-      token_pos_(token_pos) {
+      token_pos_(token_pos),
+      speculative_mode_(speculative_mode) {
   SetInputAt(kArrayPos, array);
   SetInputAt(kIndexPos, index);
   SetInputAt(kValuePos, value);
@@ -5125,6 +5215,122 @@
   set_native_c_function(native_function);
 }
 
+#if !defined(TARGET_ARCH_ARM)
+
+LocationSummary* BitCastInstr::MakeLocationSummary(Zone* zone, bool opt) const {
+  UNREACHABLE();
+}
+
+void BitCastInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+  UNREACHABLE();
+}
+
+#endif  // defined(TARGET_ARCH_ARM)
+
+#if !defined(TARGET_ARCH_DBC)
+
+#define Z zone_
+
+Representation FfiCallInstr::RequiredInputRepresentation(intptr_t idx) const {
+  if (idx == TargetAddressIndex()) {
+    return kUnboxedFfiIntPtr;
+  } else {
+    return arg_representations_[idx];
+  }
+}
+
+LocationSummary* FfiCallInstr::MakeLocationSummary(Zone* zone,
+                                                   bool is_optimizing) const {
+  // The temporary register needs to be callee-saved and not an argument
+  // register.
+  ASSERT(((1 << CallingConventions::kFirstCalleeSavedCpuReg) &
+          CallingConventions::kArgumentRegisters) == 0);
+
+#if defined(TARGET_ARCH_ARM64) || defined(TARGET_ARCH_IA32) ||                 \
+    defined(TARGET_ARCH_ARM)
+  constexpr intptr_t kNumTemps = 2;
+#else
+  constexpr intptr_t kNumTemps = 1;
+#endif
+
+  LocationSummary* summary = new (zone)
+      LocationSummary(zone, /*num_inputs=*/InputCount(),
+                      /*num_temps=*/kNumTemps, LocationSummary::kCall);
+
+  summary->set_in(TargetAddressIndex(),
+                  Location::RegisterLocation(
+                      CallingConventions::kFirstNonArgumentRegister));
+  summary->set_temp(0, Location::RegisterLocation(
+                           CallingConventions::kSecondNonArgumentRegister));
+#if defined(TARGET_ARCH_IA32) || defined(TARGET_ARCH_ARM64) ||                 \
+    defined(TARGET_ARCH_ARM)
+  summary->set_temp(1, Location::RegisterLocation(
+                           CallingConventions::kFirstCalleeSavedCpuReg));
+#endif
+  summary->set_out(0, compiler::ffi::ResultLocation(
+                          compiler::ffi::ResultRepresentation(signature_)));
+
+  for (intptr_t i = 0, n = NativeArgCount(); i < n; ++i) {
+    // Floating point values are never split: they are either in a single "FPU"
+    // register or a contiguous 64-bit slot on the stack. Unboxed 64-bit integer
+    // values, in contrast, can be split between any two registers on a 32-bit
+    // system.
+    //
+    // There is an exception for iOS and Android 32-bit ARM, where
+    // floating-point values are treated as integers as far as the calling
+    // convention is concerned. However, the representation of these arguments
+    // are set to kUnboxedInt32 or kUnboxedInt64 already, so we don't have to
+    // account for that here.
+    const bool is_atomic = arg_representations_[i] == kUnboxedFloat ||
+                           arg_representations_[i] == kUnboxedDouble;
+
+    // Since we have to move this input down to the stack, there's no point in
+    // pinning it to any specific register.
+    summary->set_in(i, UnallocateStackSlots(arg_locations_[i], is_atomic));
+  }
+
+  return summary;
+}
+
+Representation FfiCallInstr::representation() const {
+  return compiler::ffi::ResultRepresentation(signature_);
+}
+
+Location FfiCallInstr::UnallocateStackSlots(Location in, bool is_atomic) {
+  if (in.IsPairLocation()) {
+    ASSERT(!is_atomic);
+    return Location::Pair(UnallocateStackSlots(in.AsPairLocation()->At(0)),
+                          UnallocateStackSlots(in.AsPairLocation()->At(1)));
+  } else if (in.IsMachineRegister()) {
+    return in;
+  } else if (in.IsDoubleStackSlot()) {
+    return is_atomic ? Location::Any()
+                     : Location::Pair(Location::Any(), Location::Any());
+  } else {
+    ASSERT(in.IsStackSlot());
+    return Location::Any();
+  }
+}
+
+#undef Z
+
+#else
+
+Representation FfiCallInstr::RequiredInputRepresentation(intptr_t idx) const {
+  UNREACHABLE();
+}
+
+LocationSummary* FfiCallInstr::MakeLocationSummary(Zone* zone,
+                                                   bool is_optimizing) const {
+  UNREACHABLE();
+}
+
+Representation FfiCallInstr::representation() const {
+  UNREACHABLE();
+}
+
+#endif  // !defined(TARGET_ARCH_DBC)
+
 // SIMD
 
 SimdOpInstr* SimdOpInstr::CreateFromCall(Zone* zone,
diff --git a/runtime/vm/compiler/backend/il.h b/runtime/vm/compiler/backend/il.h
index 6241f4b..3ce025c 100644
--- a/runtime/vm/compiler/backend/il.h
+++ b/runtime/vm/compiler/backend/il.h
@@ -11,6 +11,7 @@
 #include "vm/compiler/backend/locations.h"
 #include "vm/compiler/backend/slot.h"
 #include "vm/compiler/compiler_state.h"
+#include "vm/compiler/ffi.h"
 #include "vm/compiler/method_recognizer.h"
 #include "vm/flags.h"
 #include "vm/growable_array.h"
@@ -29,6 +30,7 @@
 class BufferFormatter;
 class CallTargets;
 class CatchBlockEntryInstr;
+class CheckBoundBase;
 class ComparisonInstr;
 class Definition;
 class Environment;
@@ -116,7 +118,8 @@
 
   CompileType* Type();
 
-  void SetReachingType(CompileType* type) { reaching_type_ = type; }
+  CompileType* reaching_type() const { return reaching_type_; }
+  void SetReachingType(CompileType* type);
   void RefineReachingType(CompileType* type);
 
   void PrintTo(BufferFormatter* f) const;
@@ -190,8 +193,9 @@
  public:
   explicit HierarchyInfo(Thread* thread)
       : ThreadStackResource(thread),
-        cid_subtype_ranges_(NULL),
-        cid_subtype_ranges_abstract_(NULL),
+        cid_subtype_ranges_nullable_(NULL),
+        cid_subtype_ranges_abstract_nullable_(NULL),
+        cid_subtype_ranges_nonnullable_(NULL),
         cid_subclass_ranges_(NULL) {
     thread->set_hierarchy_info(this);
   }
@@ -199,18 +203,22 @@
   ~HierarchyInfo() {
     thread()->set_hierarchy_info(NULL);
 
-    delete[] cid_subtype_ranges_;
-    cid_subtype_ranges_ = NULL;
+    delete[] cid_subtype_ranges_nullable_;
+    cid_subtype_ranges_nullable_ = NULL;
 
-    delete[] cid_subtype_ranges_abstract_;
-    cid_subtype_ranges_abstract_ = NULL;
+    delete[] cid_subtype_ranges_abstract_nullable_;
+    cid_subtype_ranges_abstract_nullable_ = NULL;
+
+    delete[] cid_subtype_ranges_nonnullable_;
+    cid_subtype_ranges_nonnullable_ = NULL;
 
     delete[] cid_subclass_ranges_;
     cid_subclass_ranges_ = NULL;
   }
 
   const CidRangeVector& SubtypeRangesForClass(const Class& klass,
-                                              bool include_abstract = false);
+                                              bool include_abstract,
+                                              bool exclude_null);
   const CidRangeVector& SubclassRangesForClass(const Class& klass);
 
   bool InstanceOfHasClassRange(const AbstractType& type,
@@ -237,12 +245,16 @@
 
  private:
   // Does not use any hierarchy information available in the system but computes
-  // it via O(n) class table traversal.
+  // it via O(n) class table traversal. The boolean parameters denote:
+  //   use_subtype_test : if set, IsSubtypeOf() is used to compute inclusion
+  //   include_abstract : if set, include abstract types (don't care otherwise)
+  //   exclude_null     : if set, exclude null types (don't care otherwise)
   void BuildRangesFor(ClassTable* table,
                       CidRangeVector* ranges,
                       const Class& klass,
                       bool use_subtype_test,
-                      bool include_abstract = false);
+                      bool include_abstract,
+                      bool exclude_null);
 
   // In JIT mode we use hierarchy information stored in the [RawClass]s
   // direct_subclasses_/direct_implementors_ arrays.
@@ -250,10 +262,12 @@
                          CidRangeVector* ranges,
                          const Class& klass,
                          bool use_subtype_test,
-                         bool include_abstract = false);
+                         bool include_abstract,
+                         bool exclude_null);
 
-  CidRangeVector* cid_subtype_ranges_;
-  CidRangeVector* cid_subtype_ranges_abstract_;
+  CidRangeVector* cid_subtype_ranges_nullable_;
+  CidRangeVector* cid_subtype_ranges_abstract_nullable_;
+  CidRangeVector* cid_subtype_ranges_nonnullable_;
   CidRangeVector* cid_subclass_ranges_;
 };
 
@@ -344,6 +358,7 @@
   M(AssertBoolean, _)                                                          \
   M(SpecialParameter, kNoGC)                                                   \
   M(ClosureCall, _)                                                            \
+  M(FfiCall, _)                                                                \
   M(InstanceCall, _)                                                           \
   M(PolymorphicInstanceCall, _)                                                \
   M(StaticCall, _)                                                             \
@@ -369,6 +384,7 @@
   M(AllocateObject, _)                                                         \
   M(LoadField, kNoGC)                                                          \
   M(LoadUntagged, kNoGC)                                                       \
+  M(StoreUntagged, kNoGC)                                                      \
   M(LoadClassId, kNoGC)                                                        \
   M(InstantiateType, _)                                                        \
   M(InstantiateTypeArguments, _)                                               \
@@ -436,7 +452,9 @@
   M(UnboxUint32, kNoGC)                                                        \
   M(BoxInt32, _)                                                               \
   M(UnboxInt32, kNoGC)                                                         \
-  M(UnboxedIntConverter, _)                                                    \
+  M(IntConverter, _)                                                           \
+  M(BitCast, _)                                                                \
+  M(UnboxedWidthExtender, _)                                                   \
   M(Deoptimize, kNoGC)                                                         \
   M(SimdOp, kNoGC)
 
@@ -743,6 +761,7 @@
   DECLARE_INSTRUCTION_TYPE_CHECK(Definition, Definition)
   DECLARE_INSTRUCTION_TYPE_CHECK(BlockEntryWithInitialDefs,
                                  BlockEntryWithInitialDefs)
+  DECLARE_INSTRUCTION_TYPE_CHECK(CheckBoundBase, CheckBoundBase)
   FOR_EACH_INSTRUCTION(INSTRUCTION_TYPE_CHECK)
   FOR_EACH_ABSTRACT_INSTRUCTION(INSTRUCTION_TYPE_CHECK)
 
@@ -1292,6 +1311,15 @@
 
   Instruction* Current() const { return current_; }
 
+  bool operator==(const ForwardInstructionIterator& other) const {
+    return current_ == other.current_;
+  }
+
+  ForwardInstructionIterator& operator++() {
+    Advance();
+    return *this;
+  }
+
  private:
   Instruction* current_;
 };
@@ -1594,8 +1622,10 @@
   OsrEntryInstr(GraphEntryInstr* graph_entry,
                 intptr_t block_id,
                 intptr_t try_index,
-                intptr_t deopt_id)
+                intptr_t deopt_id,
+                intptr_t stack_depth)
       : BlockEntryWithInitialDefs(block_id, try_index, deopt_id),
+        stack_depth_(stack_depth),
         graph_entry_(graph_entry) {}
 
   DECLARE_INSTRUCTION(OsrEntry)
@@ -1608,6 +1638,7 @@
     return graph_entry_;
   }
 
+  intptr_t stack_depth() const { return stack_depth_; }
   GraphEntryInstr* graph_entry() const { return graph_entry_; }
 
   PRINT_TO_SUPPORT
@@ -1619,6 +1650,7 @@
     graph_entry_ = predecessor->AsGraphEntry();
   }
 
+  const intptr_t stack_depth_;
   GraphEntryInstr* graph_entry_;
 
   DISALLOW_COPY_AND_ASSIGN(OsrEntryInstr);
@@ -1815,7 +1847,9 @@
   // propagation during graph building.
   CompileType* Type() {
     if (type_ == NULL) {
-      type_ = new CompileType(ComputeType());
+      auto type = new CompileType(ComputeType());
+      type->set_owner(this);
+      set_type(type);
     }
     return type_;
   }
@@ -1826,7 +1860,7 @@
 
   bool IsInt32Definition() {
     return IsBinaryInt32Op() || IsBoxInt32() || IsUnboxInt32() ||
-           IsUnboxedIntConverter();
+           IsIntConverter();
   }
 
   // Compute compile type for this definition. It is safe to use this
@@ -1841,8 +1875,10 @@
   PRINT_TO_SUPPORT
 
   bool UpdateType(CompileType new_type) {
-    if (type_ == NULL) {
-      type_ = new CompileType(new_type);
+    if (type_ == nullptr) {
+      auto type = new CompileType(new_type);
+      type->set_owner(this);
+      set_type(type);
       return true;
     }
 
@@ -1924,24 +1960,49 @@
 
   virtual void SetIdentity(AliasIdentity identity) { UNREACHABLE(); }
 
+  // Find the original definition of [this] by following through any
+  // redefinition and check instructions.
   Definition* OriginalDefinition();
 
+  // If this definition is a redefinition (in a broad sense, this includes
+  // CheckArrayBound and CheckNull instructions) return [Value] corresponding
+  // to the input which is being redefined.
+  // Otherwise return [nullptr].
+  virtual Value* RedefinedValue() const;
+
+  // Find the original definition of [this].
+  //
+  // This is an extension of [OriginalDefinition] which also follows through any
+  // boxing/unboxing and constraint instructions.
+  Definition* OriginalDefinitionIgnoreBoxingAndConstraints();
+
   virtual Definition* AsDefinition() { return this; }
 
  protected:
   friend class RangeAnalysis;
   friend class Value;
 
-  Range* range_;
-  CompileType* type_;
+  Range* range_ = nullptr;
+
+  void set_type(CompileType* type) {
+    ASSERT(type->owner() == this);
+    type_ = type;
+  }
+
+#if !defined(PRODUCT) || defined(FORCE_INCLUDE_DISASSEMBLER)
+  const char* TypeAsCString() const {
+    return HasType() ? type_->ToCString() : "";
+  }
+#endif
 
  private:
-  intptr_t temp_index_;
-  intptr_t ssa_temp_index_;
-  Value* input_use_list_;
-  Value* env_use_list_;
+  intptr_t temp_index_ = -1;
+  intptr_t ssa_temp_index_ = -1;
+  Value* input_use_list_ = nullptr;
+  Value* env_use_list_ = nullptr;
 
-  Object* constant_value_;
+  Object* constant_value_ = nullptr;
+  CompileType* type_ = nullptr;
 
   DISALLOW_COPY_AND_ASSIGN(Definition);
 };
@@ -2079,6 +2140,12 @@
   DISALLOW_COPY_AND_ASSIGN(PhiInstr);
 };
 
+// This instruction represents an incomming parameter for a function entry,
+// or incomming value for OSR entry or incomming value for a catch entry.
+// When [base_reg] is set to FPREG [index] corresponds to environment
+// variable index (0 is the very first parameter, 1 is next and so on).
+// When [base_reg] is set to SPREG [index] corresponds to SP relative parameter
+// indices (0 is the very last parameter, 1 is next and so on).
 class ParameterInstr : public Definition {
  public:
   ParameterInstr(intptr_t index,
@@ -2188,7 +2255,9 @@
 // the frame.  This is asserted via `inliner.cc::CalleeGraphValidator`.
 class LoadIndexedUnsafeInstr : public TemplateDefinition<1, NoThrow> {
  public:
-  LoadIndexedUnsafeInstr(Value* index, intptr_t offset) : offset_(offset) {
+  LoadIndexedUnsafeInstr(Value* index, intptr_t offset, CompileType result_type)
+      : offset_(offset) {
+    UpdateType(result_type);
     SetInputAt(0, index);
   }
 
@@ -2743,6 +2812,10 @@
   virtual bool ComputeCanDeoptimize() const { return false; }
   virtual bool HasUnknownSideEffects() const { return false; }
 
+  virtual Value* RedefinedValue() const;
+
+  PRINT_OPERANDS_TO_SUPPORT
+
  private:
   CompileType* constrained_type_;
   DISALLOW_COPY_AND_ASSIGN(RedefinitionInstr);
@@ -2966,6 +3039,8 @@
 
   virtual bool AttributesEqual(Instruction* other) const;
 
+  virtual Value* RedefinedValue() const;
+
   PRINT_OPERANDS_TO_SUPPORT
 
  private:
@@ -3099,7 +3174,7 @@
         argument_names_(argument_names),
         arguments_(arguments),
         token_pos_(token_pos) {
-    ASSERT(argument_names.IsZoneHandle() || argument_names.InVMHeap());
+    ASSERT(argument_names.IsZoneHandle() || argument_names.InVMIsolateHeap());
   }
 
   RawString* Selector() {
@@ -3267,9 +3342,9 @@
   intptr_t checked_argument_count() const { return checked_argument_count_; }
   const Function& interface_target() const { return interface_target_; }
 
-  void set_static_receiver_type(const AbstractType* receiver_type) {
-    ASSERT(receiver_type != nullptr && receiver_type->IsInstantiated());
-    static_receiver_type_ = receiver_type;
+  void set_receivers_static_type(const AbstractType* receiver_type) {
+    ASSERT(receiver_type != nullptr);
+    receivers_static_type_ = receiver_type;
   }
 
   bool has_unique_selector() const { return has_unique_selector_; }
@@ -3330,7 +3405,7 @@
   bool has_unique_selector_;
   Code::EntryKind entry_kind_ = Code::EntryKind::kNormal;
 
-  const AbstractType* static_receiver_type_ = nullptr;
+  const AbstractType* receivers_static_type_ = nullptr;
 
   DISALLOW_COPY_AND_ASSIGN(InstanceCallInstr);
 };
@@ -4076,6 +4151,67 @@
   DISALLOW_COPY_AND_ASSIGN(NativeCallInstr);
 };
 
+// Performs a call to native C code. In contrast to NativeCall, the arguments
+// are unboxed and passed through the native calling convention. However, not
+// all dart objects can be passed as arguments. Please see the FFI documentation
+// for more details.
+// TODO(35775): Add link to the documentation when it's written.
+class FfiCallInstr : public Definition {
+ public:
+  FfiCallInstr(Zone* zone,
+               intptr_t deopt_id,
+               const Function& signature,
+               const ZoneGrowableArray<Representation>& arg_reps,
+               const ZoneGrowableArray<Location>& arg_locs)
+      : Definition(deopt_id),
+        zone_(zone),
+        signature_(signature),
+        inputs_(arg_reps.length() + 1),
+        arg_representations_(arg_reps),
+        arg_locations_(arg_locs) {
+    inputs_.FillWith(nullptr, 0, arg_reps.length() + 1);
+    ASSERT(signature.IsZoneHandle());
+  }
+
+  DECLARE_INSTRUCTION(FfiCall)
+
+  // Number of arguments to the native function.
+  intptr_t NativeArgCount() const { return InputCount() - 1; }
+
+  // Input index of the function pointer to invoke.
+  intptr_t TargetAddressIndex() const { return NativeArgCount(); }
+
+  virtual intptr_t InputCount() const { return inputs_.length(); }
+  virtual Value* InputAt(intptr_t i) const { return inputs_[i]; }
+  virtual bool MayThrow() const { return false; }
+
+  // FfiCallInstr calls C code, which can call back into Dart.
+  virtual bool ComputeCanDeoptimize() const { return true; }
+
+  virtual bool HasUnknownSideEffects() const { return true; }
+
+  virtual Representation RequiredInputRepresentation(intptr_t idx) const;
+  virtual Representation representation() const;
+
+  PRINT_OPERANDS_TO_SUPPORT
+
+ private:
+  virtual void RawSetInputAt(intptr_t i, Value* value) { inputs_[i] = value; }
+
+  // Mark stack slots in 'loc' as unallocated. Split a double-word stack slot
+  // into a pair location if 'is_atomic' is false.
+  static Location UnallocateStackSlots(Location loc, bool is_atomic = false);
+
+  Zone* const zone_;
+  const Function& signature_;
+
+  GrowableArray<Value*> inputs_;
+  const ZoneGrowableArray<Representation>& arg_representations_;
+  const ZoneGrowableArray<Location>& arg_locations_;
+
+  DISALLOW_COPY_AND_ASSIGN(FfiCallInstr);
+};
+
 class DebugStepCheckInstr : public TemplateInstruction<0, NoThrow> {
  public:
   DebugStepCheckInstr(TokenPosition token_pos,
@@ -4602,7 +4738,8 @@
                     intptr_t class_id,
                     AlignmentType alignment,
                     intptr_t deopt_id,
-                    TokenPosition token_pos);
+                    TokenPosition token_pos,
+                    SpeculativeMode speculative_mode = kGuardInputs);
   DECLARE_INSTRUCTION(StoreIndexed)
 
   enum { kArrayPos = 0, kIndexPos = 1, kValuePos = 2 };
@@ -4626,6 +4763,8 @@
            (emit_store_barrier_ == kEmitStoreBarrier);
   }
 
+  virtual SpeculativeMode speculative_mode() const { return speculative_mode_; }
+
   virtual bool ComputeCanDeoptimize() const { return false; }
 
   virtual Representation RequiredInputRepresentation(intptr_t idx) const;
@@ -4652,6 +4791,7 @@
   const intptr_t class_id_;
   const AlignmentType alignment_;
   const TokenPosition token_pos_;
+  const SpeculativeMode speculative_mode_;
 
   DISALLOW_COPY_AND_ASSIGN(StoreIndexedInstr);
 };
@@ -4793,7 +4933,11 @@
   virtual void SetIdentity(AliasIdentity identity) { identity_ = identity; }
 
   virtual bool WillAllocateNewOrRemembered() const {
-    return Heap::IsAllocatableInNewSpace(cls().instance_size());
+    return WillAllocateNewOrRemembered(cls());
+  }
+
+  static bool WillAllocateNewOrRemembered(const Class& cls) {
+    return Heap::IsAllocatableInNewSpace(cls.instance_size());
   }
 
   PRINT_OPERANDS_TO_SUPPORT
@@ -4831,8 +4975,12 @@
   virtual bool HasUnknownSideEffects() const { return false; }
 
   virtual bool WillAllocateNewOrRemembered() const {
+    return WillAllocateNewOrRemembered(num_context_variables_);
+  }
+
+  static bool WillAllocateNewOrRemembered(intptr_t num_context_variables) {
     return Heap::IsAllocatableInNewSpace(
-        Context::InstanceSize(num_context_variables_));
+        Context::InstanceSize(num_context_variables));
   }
 
   virtual AliasIdentity Identity() const { return identity_; }
@@ -4985,9 +5133,13 @@
     if (!num_elements()->BindsToConstant()) return false;
     const Object& length = num_elements()->BoundConstant();
     if (!length.IsSmi()) return false;
-    intptr_t raw_length = Smi::Cast(length).Value();
-    // Compare Array::New.
-    return (raw_length >= 0) && (raw_length < Array::kMaxNewSpaceElements);
+    const intptr_t value = Smi::Cast(length).Value();
+    if (value < 0) return false;
+    return WillAllocateNewOrRemembered(value);
+  }
+
+  static bool WillAllocateNewOrRemembered(const intptr_t length) {
+    return !Array::UseCardMarkingForAllocation(length);
   }
 
  private:
@@ -4997,9 +5149,9 @@
   DISALLOW_COPY_AND_ASSIGN(CreateArrayInstr);
 };
 
-// Note: this instruction must not be moved without the indexed access that
-// depends on it (e.g. out of loops). GC may cause collect
-// the array while the external data-array is still accessed.
+// Note: This instruction must not be moved without the indexed access that
+// depends on it (e.g. out of loops). GC may collect the array while the
+// external data-array is still accessed.
 // TODO(vegorov) enable LICMing this instruction by ensuring that array itself
 // is kept alive.
 class LoadUntaggedInstr : public TemplateDefinition<1, NoThrow> {
@@ -5024,7 +5176,9 @@
   virtual bool ComputeCanDeoptimize() const { return false; }
 
   virtual bool HasUnknownSideEffects() const { return false; }
-  virtual bool AttributesEqual(Instruction* other) const { return true; }
+  virtual bool AttributesEqual(Instruction* other) const {
+    return other->AsLoadUntagged()->offset_ == offset_;
+  }
 
  private:
   intptr_t offset_;
@@ -5032,6 +5186,55 @@
   DISALLOW_COPY_AND_ASSIGN(LoadUntaggedInstr);
 };
 
+// Stores an untagged value into the given object.
+//
+// If the untagged value is a derived pointer (e.g. pointer to start of internal
+// typed data array backing) then this instruction cannot be moved across
+// instructions which can trigger GC, to ensure that
+//
+//    LoadUntaggeed + Arithmetic + StoreUntagged
+//
+// are performed atomically
+//
+// See kernel_to_il.cc:BuildTypedDataViewFactoryConstructor.
+class StoreUntaggedInstr : public TemplateInstruction<2, NoThrow> {
+ public:
+  StoreUntaggedInstr(Value* object, Value* value, intptr_t offset)
+      : offset_(offset) {
+    SetInputAt(0, object);
+    SetInputAt(1, value);
+  }
+
+  DECLARE_INSTRUCTION(StoreUntagged)
+
+  virtual Representation RequiredInputRepresentation(intptr_t idx) const {
+    ASSERT(idx == 0 || idx == 1);
+    // The object may be tagged or untagged (for external objects).
+    if (idx == 0) return kNoRepresentation;
+    return kUntagged;
+  }
+
+  Value* object() const { return inputs_[0]; }
+  Value* value() const { return inputs_[1]; }
+  intptr_t offset() const { return offset_; }
+
+  virtual bool ComputeCanDeoptimize() const { return false; }
+  virtual bool HasUnknownSideEffects() const { return false; }
+  virtual bool AttributesEqual(Instruction* other) const {
+    return other->AsStoreUntagged()->offset_ == offset_;
+  }
+
+  intptr_t offset_from_tagged() const {
+    const bool is_tagged = object()->definition()->representation() == kTagged;
+    return offset() - (is_tagged ? kHeapObjectTag : 0);
+  }
+
+ private:
+  intptr_t offset_;
+
+  DISALLOW_COPY_AND_ASSIGN(StoreUntaggedInstr);
+};
+
 class LoadClassIdInstr : public TemplateDefinition<1, NoThrow, Pure> {
  public:
   explicit LoadClassIdInstr(Value* object) { SetInputAt(0, object); }
@@ -5222,8 +5425,12 @@
   virtual bool HasUnknownSideEffects() const { return false; }
 
   virtual bool WillAllocateNewOrRemembered() const {
+    return WillAllocateNewOrRemembered(context_variables().length());
+  }
+
+  static bool WillAllocateNewOrRemembered(intptr_t num_context_variables) {
     return Heap::IsAllocatableInNewSpace(
-        Context::InstanceSize(context_variables().length()));
+        Context::InstanceSize(num_context_variables));
   }
 
   PRINT_OPERANDS_TO_SUPPORT
@@ -5339,6 +5546,7 @@
 
   static intptr_t ValueOffset(Representation rep) {
     switch (rep) {
+      case kUnboxedFloat:
       case kUnboxedDouble:
         return Double::value_offset();
 
@@ -5365,6 +5573,7 @@
       case kUnboxedInt64:
         return kMintCid;
       case kUnboxedDouble:
+      case kUnboxedFloat:
         return kDoubleCid;
       case kUnboxedFloat32x4:
         return kFloat32x4Cid;
@@ -5549,6 +5758,7 @@
   bool CanConvertSmi() const;
   void EmitLoadFromBox(FlowGraphCompiler* compiler);
   void EmitSmiConversion(FlowGraphCompiler* compiler);
+  void EmitLoadInt32FromBoxOrSmi(FlowGraphCompiler* compiler);
   void EmitLoadInt64FromBoxOrSmi(FlowGraphCompiler* compiler);
   void EmitLoadFromBoxWithDeopt(FlowGraphCompiler* compiler);
 
@@ -6088,6 +6298,7 @@
   virtual bool ComputeCanDeoptimize() const { return false; }
 
   virtual CompileType ComputeType() const;
+  virtual bool RecomputeType();
 
   virtual bool HasUnknownSideEffects() const { return true; }
 
@@ -6414,6 +6625,9 @@
 
   Range* shift_range() const { return shift_range_; }
 
+  // Set the range directly (takes ownership).
+  void set_shift_range(Range* shift_range) { shift_range_ = shift_range; }
+
   virtual void InferRange(RangeAnalysis* analysis, Range* range);
 
   DEFINE_INSTRUCTION_TYPE_CHECK(ShiftIntegerOp)
@@ -6614,11 +6828,13 @@
   };
 
   CheckStackOverflowInstr(TokenPosition token_pos,
+                          intptr_t stack_depth,
                           intptr_t loop_depth,
                           intptr_t deopt_id,
-                          Kind kind = kOsrAndPreemption)
+                          Kind kind)
       : TemplateInstruction(deopt_id),
         token_pos_(token_pos),
+        stack_depth_(stack_depth),
         loop_depth_(loop_depth),
         kind_(kind) {
     ASSERT(kind != kOsrOnly || loop_depth > 0);
@@ -6626,6 +6842,7 @@
 
   virtual TokenPosition token_pos() const { return token_pos_; }
   bool in_loop() const { return loop_depth_ > 0; }
+  intptr_t stack_depth() const { return stack_depth_; }
   intptr_t loop_depth() const { return loop_depth_; }
 
   DECLARE_INSTRUCTION(CheckStackOverflow)
@@ -6644,6 +6861,7 @@
 
  private:
   const TokenPosition token_pos_;
+  const intptr_t stack_depth_;
   const intptr_t loop_depth_;
   const Kind kind_;
 
@@ -6835,8 +7053,10 @@
 
 class DoubleToFloatInstr : public TemplateDefinition<1, NoThrow, Pure> {
  public:
-  DoubleToFloatInstr(Value* value, intptr_t deopt_id)
-      : TemplateDefinition(deopt_id) {
+  DoubleToFloatInstr(Value* value,
+                     intptr_t deopt_id,
+                     SpeculativeMode speculative_mode = kGuardInputs)
+      : TemplateDefinition(deopt_id), speculative_mode_(speculative_mode) {
     SetInputAt(0, value);
   }
 
@@ -6861,6 +7081,8 @@
     return kUnboxedDouble;
   }
 
+  virtual SpeculativeMode speculative_mode() const { return speculative_mode_; }
+
   virtual intptr_t DeoptimizationTarget() const { return GetDeoptId(); }
 
   virtual bool AttributesEqual(Instruction* other) const { return true; }
@@ -6868,6 +7090,8 @@
   virtual Definition* Canonicalize(FlowGraph* flow_graph);
 
  private:
+  const SpeculativeMode speculative_mode_;
+
   DISALLOW_COPY_AND_ASSIGN(DoubleToFloatInstr);
 };
 
@@ -6903,6 +7127,7 @@
   DISALLOW_COPY_AND_ASSIGN(FloatToDoubleInstr);
 };
 
+// TODO(sjindel): Replace with FFICallInstr.
 class InvokeMathCFunctionInstr : public PureDefinition {
  public:
   InvokeMathCFunctionInstr(ZoneGrowableArray<Value*>* inputs,
@@ -7145,13 +7370,13 @@
 // CheckNull instruction takes one input (`value`) and tests it for `null`.
 // If `value` is `null`, then `NoSuchMethodError` is thrown. Otherwise,
 // execution proceeds to the next instruction.
-class CheckNullInstr : public TemplateInstruction<1, Throws, NoCSE> {
+class CheckNullInstr : public TemplateDefinition<1, Throws, Pure> {
  public:
   CheckNullInstr(Value* value,
                  const String& function_name,
                  intptr_t deopt_id,
                  TokenPosition token_pos)
-      : TemplateInstruction(deopt_id),
+      : TemplateDefinition(deopt_id),
         token_pos_(token_pos),
         function_name_(function_name) {
     ASSERT(function_name.IsNotTemporaryScopedHandle());
@@ -7168,19 +7393,22 @@
 
   DECLARE_INSTRUCTION(CheckNull)
 
+  virtual CompileType ComputeType() const;
+  virtual bool RecomputeType();
+
   // CheckNull can implicitly call Dart code (NoSuchMethodError constructor),
   // so it can lazily deopt.
   virtual bool ComputeCanDeoptimize() const { return true; }
 
-  virtual Instruction* Canonicalize(FlowGraph* flow_graph);
-
-  virtual bool HasUnknownSideEffects() const { return false; }
+  virtual Definition* Canonicalize(FlowGraph* flow_graph);
 
   virtual bool AttributesEqual(Instruction* other) const { return true; }
 
   static void AddMetadataForRuntimeCall(CheckNullInstr* check_null,
                                         FlowGraphCompiler* compiler);
 
+  virtual Value* RedefinedValue() const;
+
  private:
   const TokenPosition token_pos_;
   const String& function_name_;
@@ -7219,17 +7447,12 @@
   DISALLOW_COPY_AND_ASSIGN(CheckClassIdInstr);
 };
 
-// Performs an array bounds check, where
-//   safe_index := CheckArrayBound(length, index)
-// returns the "safe" index when
-//   0 <= index < length
-// or otherwise deoptimizes (viz. speculative).
-class CheckArrayBoundInstr : public TemplateDefinition<2, NoThrow, Pure> {
+// Base class for speculative [CheckArrayBoundInstr] and
+// [GenericCheckBoundInstr]
+class CheckBoundBase : public TemplateDefinition<2, NoThrow, Pure> {
  public:
-  CheckArrayBoundInstr(Value* length, Value* index, intptr_t deopt_id)
-      : TemplateDefinition(deopt_id),
-        generalized_(false),
-        licm_hoisted_(false) {
+  CheckBoundBase(Value* length, Value* index, intptr_t deopt_id)
+      : TemplateDefinition(deopt_id) {
     SetInputAt(kLengthPos, length);
     SetInputAt(kIndexPos, index);
   }
@@ -7237,8 +7460,34 @@
   Value* length() const { return inputs_[kLengthPos]; }
   Value* index() const { return inputs_[kIndexPos]; }
 
+  virtual bool IsCheckBoundBase() { return true; }
+  virtual CheckBoundBase* AsCheckBoundBase() { return this; }
+  virtual Value* RedefinedValue() const;
+
+  // Give a name to the location/input indices.
+  enum { kLengthPos = 0, kIndexPos = 1 };
+
+ private:
+  DISALLOW_COPY_AND_ASSIGN(CheckBoundBase);
+};
+
+// Performs an array bounds check, where
+//   safe_index := CheckArrayBound(length, index)
+// returns the "safe" index when
+//   0 <= index < length
+// or otherwise deoptimizes (viz. speculative).
+class CheckArrayBoundInstr : public CheckBoundBase {
+ public:
+  CheckArrayBoundInstr(Value* length, Value* index, intptr_t deopt_id)
+      : CheckBoundBase(length, index, deopt_id),
+        generalized_(false),
+        licm_hoisted_(false) {}
+
   DECLARE_INSTRUCTION(CheckArrayBound)
 
+  virtual CompileType ComputeType() const;
+  virtual bool RecomputeType();
+
   virtual bool ComputeCanDeoptimize() const { return true; }
 
   bool IsRedundant(const RangeBoundary& length);
@@ -7256,9 +7505,6 @@
 
   void set_licm_hoisted(bool value) { licm_hoisted_ = value; }
 
-  // Give a name to the location/input indices.
-  enum { kLengthPos = 0, kIndexPos = 1 };
-
  private:
   bool generalized_;
   bool licm_hoisted_;
@@ -7267,34 +7513,28 @@
 };
 
 // Performs an array bounds check, where
-//   safe_index := CheckArrayBound(length, index)
+//   safe_index := GenericCheckBound(length, index)
 // returns the "safe" index when
 //   0 <= index < length
 // or otherwise throws an out-of-bounds exception (viz. non-speculative).
-class GenericCheckBoundInstr : public TemplateDefinition<2, Throws, NoCSE> {
+class GenericCheckBoundInstr : public CheckBoundBase {
  public:
   GenericCheckBoundInstr(Value* length, Value* index, intptr_t deopt_id)
-      : TemplateDefinition(deopt_id) {
-    SetInputAt(kLengthPos, length);
-    SetInputAt(kIndexPos, index);
-  }
+      : CheckBoundBase(length, index, deopt_id) {}
 
-  Value* length() const { return inputs_[kLengthPos]; }
-  Value* index() const { return inputs_[kIndexPos]; }
-
-  virtual bool HasUnknownSideEffects() const { return false; }
+  virtual bool AttributesEqual(Instruction* other) const { return true; }
 
   DECLARE_INSTRUCTION(GenericCheckBound)
 
+  virtual CompileType ComputeType() const;
+  virtual bool RecomputeType();
+
   // GenericCheckBound can implicitly call Dart code (RangeError or
   // ArgumentError constructor), so it can lazily deopt.
   virtual bool ComputeCanDeoptimize() const { return true; }
 
   bool IsRedundant(const RangeBoundary& length);
 
-  // Give a name to the location/input indices.
-  enum { kLengthPos = 0, kIndexPos = 1 };
-
  private:
   DISALLOW_COPY_AND_ASSIGN(GenericCheckBoundInstr);
 };
@@ -7345,21 +7585,23 @@
   DISALLOW_COPY_AND_ASSIGN(CheckConditionInstr);
 };
 
-class UnboxedIntConverterInstr : public TemplateDefinition<1, NoThrow> {
+class IntConverterInstr : public TemplateDefinition<1, NoThrow, Pure> {
  public:
-  UnboxedIntConverterInstr(Representation from,
-                           Representation to,
-                           Value* value,
-                           intptr_t deopt_id)
+  IntConverterInstr(Representation from,
+                    Representation to,
+                    Value* value,
+                    intptr_t deopt_id)
       : TemplateDefinition(deopt_id),
         from_representation_(from),
         to_representation_(to),
         is_truncating_(to == kUnboxedUint32) {
     ASSERT(from != to);
-    ASSERT((from == kUnboxedInt64) || (from == kUnboxedUint32) ||
-           (from == kUnboxedInt32));
-    ASSERT((to == kUnboxedInt64) || (to == kUnboxedUint32) ||
-           (to == kUnboxedInt32));
+    ASSERT(from == kUnboxedInt64 || from == kUnboxedUint32 ||
+           from == kUnboxedInt32 || from == kUntagged);
+    ASSERT(to == kUnboxedInt64 || to == kUnboxedUint32 || to == kUnboxedInt32 ||
+           to == kUntagged);
+    ASSERT(from != kUntagged || to == kUnboxedIntPtr);
+    ASSERT(to != kUntagged || from == kUnboxedIntPtr);
     SetInputAt(0, value);
   }
 
@@ -7382,11 +7624,9 @@
     return from();
   }
 
-  virtual bool HasUnknownSideEffects() const { return false; }
-
   virtual bool AttributesEqual(Instruction* other) const {
-    ASSERT(other->IsUnboxedIntConverter());
-    UnboxedIntConverterInstr* converter = other->AsUnboxedIntConverter();
+    ASSERT(other->IsIntConverter());
+    auto converter = other->AsIntConverter();
     return (converter->from() == from()) && (converter->to() == to()) &&
            (converter->is_truncating() == is_truncating());
   }
@@ -7398,7 +7638,7 @@
     return CompileType::Int();
   }
 
-  DECLARE_INSTRUCTION(UnboxedIntConverter);
+  DECLARE_INSTRUCTION(IntConverter);
 
   PRINT_OPERANDS_TO_SUPPORT
 
@@ -7407,10 +7647,111 @@
   const Representation to_representation_;
   bool is_truncating_;
 
-  DISALLOW_COPY_AND_ASSIGN(UnboxedIntConverterInstr);
+  DISALLOW_COPY_AND_ASSIGN(IntConverterInstr);
 };
 
+// Moves a floating-point value between CPU and FPU registers. Used to implement
+// "softfp" calling conventions, where FPU arguments/return values are passed in
+// normal CPU registers.
+class BitCastInstr : public TemplateDefinition<1, NoThrow, Pure> {
+ public:
+  BitCastInstr(Representation from, Representation to, Value* value)
+      : TemplateDefinition(DeoptId::kNone),
+        from_representation_(from),
+        to_representation_(to) {
+    ASSERT(from != to);
+    ASSERT(to == kUnboxedInt32 && from == kUnboxedFloat ||
+           to == kUnboxedFloat && from == kUnboxedInt32 ||
+           to == kUnboxedInt64 && from == kUnboxedDouble ||
+           to == kUnboxedDouble && from == kUnboxedInt64);
+    SetInputAt(0, value);
+  }
+
+  Value* value() const { return inputs_[0]; }
+
+  Representation from() const { return from_representation_; }
+  Representation to() const { return to_representation_; }
+
+  virtual bool ComputeCanDeoptimize() const { return false; }
+
+  virtual Representation representation() const { return to(); }
+
+  virtual Representation RequiredInputRepresentation(intptr_t idx) const {
+    ASSERT(idx == 0);
+    return from();
+  }
+
+  virtual bool AttributesEqual(Instruction* other) const {
+    ASSERT(other->IsBitCast());
+    BitCastInstr* converter = other->AsBitCast();
+    return converter->from() == from() && converter->to() == to();
+  }
+
+  virtual CompileType ComputeType() const { return CompileType::Dynamic(); }
+
+  DECLARE_INSTRUCTION(BitCast);
+
+  PRINT_OPERANDS_TO_SUPPORT
+
+ private:
+  const Representation from_representation_;
+  const Representation to_representation_;
+
+  DISALLOW_COPY_AND_ASSIGN(BitCastInstr);
+};
+
+// Sign- or zero-extends an integer in unboxed 32-bit representation.
 //
+// The choice between sign- and zero- extension is made based on the whether the
+// chosen representation is signed or unsigned.
+//
+// It is only supported to extend 1- or 2-byte operands; however, since we don't
+// have a representation less than 32-bits, both the input and output
+// representations are 32-bit (and equal).
+class UnboxedWidthExtenderInstr : public TemplateDefinition<1, NoThrow, Pure> {
+ public:
+  UnboxedWidthExtenderInstr(Value* value,
+                            Representation rep,
+                            intptr_t from_width_bytes)
+      : TemplateDefinition(DeoptId::kNone),
+        representation_(rep),
+        from_width_bytes_(from_width_bytes) {
+    ASSERT(from_width_bytes == 1 || from_width_bytes == 2);
+    ASSERT(rep == kUnboxedInt32 || rep == kUnboxedUint32);
+    SetInputAt(0, value);
+  }
+
+  Value* value() const { return inputs_[0]; }
+
+  Representation representation() const { return representation_; }
+
+  bool ComputeCanDeoptimize() const { return false; }
+
+  virtual Representation RequiredInputRepresentation(intptr_t idx) const {
+    ASSERT(idx == 0);
+    return representation_;
+  }
+
+  virtual bool AttributesEqual(Instruction* other) const {
+    ASSERT(other->IsUnboxedWidthExtender());
+    const UnboxedWidthExtenderInstr* ext = other->AsUnboxedWidthExtender();
+    return ext->representation() == representation() &&
+           ext->from_width_bytes_ == from_width_bytes_;
+  }
+
+  virtual CompileType ComputeType() const { return CompileType::Int(); }
+
+  DECLARE_INSTRUCTION(UnboxedWidthExtender);
+
+  PRINT_OPERANDS_TO_SUPPORT
+
+ private:
+  const Representation representation_;
+  const intptr_t from_width_bytes_;
+
+  DISALLOW_COPY_AND_ASSIGN(UnboxedWidthExtenderInstr);
+};
+
 // SimdOpInstr
 //
 // All SIMD intrinsics and recognized methods are represented via instances
@@ -7758,8 +8099,13 @@
     locations_ = locations;
   }
 
-  void set_deopt_id(intptr_t deopt_id) { deopt_id_ = deopt_id; }
-  intptr_t deopt_id() const { return deopt_id_; }
+  // Get deopt_id associated with this environment.
+  // Note that only outer environments have deopt id associated with
+  // them (set by DeepCopyToOuter).
+  intptr_t deopt_id() const {
+    ASSERT(deopt_id_ != DeoptId::kNone);
+    return deopt_id_;
+  }
 
   Environment* outer() const { return outer_; }
 
@@ -7809,7 +8155,9 @@
   Environment* DeepCopy(Zone* zone) const { return DeepCopy(zone, Length()); }
 
   void DeepCopyTo(Zone* zone, Instruction* instr) const;
-  void DeepCopyToOuter(Zone* zone, Instruction* instr) const;
+  void DeepCopyToOuter(Zone* zone,
+                       Instruction* instr,
+                       intptr_t outer_deopt_id) const;
 
   void DeepCopyAfterTo(Zone* zone,
                        Instruction* instr,
@@ -7842,20 +8190,19 @@
 
   Environment(intptr_t length,
               intptr_t fixed_parameter_count,
-              intptr_t deopt_id,
               const ParsedFunction& parsed_function,
               Environment* outer)
       : values_(length),
-        locations_(NULL),
         fixed_parameter_count_(fixed_parameter_count),
-        deopt_id_(deopt_id),
         parsed_function_(parsed_function),
         outer_(outer) {}
 
   GrowableArray<Value*> values_;
-  Location* locations_;
+  Location* locations_ = nullptr;
   const intptr_t fixed_parameter_count_;
-  intptr_t deopt_id_;
+  // Deoptimization id associated with this environment. Only set for
+  // outer environments.
+  intptr_t deopt_id_ = DeoptId::kNone;
   const ParsedFunction& parsed_function_;
   Environment* outer_;
 
diff --git a/runtime/vm/compiler/backend/il_arm.cc b/runtime/vm/compiler/backend/il_arm.cc
index 6c3ea35..d7dc61d 100644
--- a/runtime/vm/compiler/backend/il_arm.cc
+++ b/runtime/vm/compiler/backend/il_arm.cc
@@ -79,7 +79,7 @@
   const intptr_t kNumTemps = 0;
   LocationSummary* locs = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
-  locs->set_in(0, Location::AnyOrConstant(value()));
+  locs->set_in(0, LocationAnyOrConstant(value()));
   return locs;
 }
 
@@ -558,12 +558,12 @@
     const intptr_t kNumTemps = 0;
     LocationSummary* locs = new (zone)
         LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
-    locs->set_in(0, Location::RegisterOrConstant(left()));
+    locs->set_in(0, LocationRegisterOrConstant(left()));
     // Only one input can be a constant operand. The case of two constant
     // operands should be handled by constant propagation.
     locs->set_in(1, locs->in(0).IsConstant()
                         ? Location::RequiresRegister()
-                        : Location::RegisterOrConstant(right()));
+                        : LocationRegisterOrConstant(right()));
     locs->set_out(0, Location::RequiresRegister());
     return locs;
   }
@@ -794,7 +794,7 @@
   locs->set_in(0, Location::RequiresRegister());
   // Only one input can be a constant operand. The case of two constant
   // operands should be handled by constant propagation.
-  locs->set_in(1, Location::RegisterOrConstant(right()));
+  locs->set_in(1, LocationRegisterOrConstant(right()));
   return locs;
 }
 
@@ -894,12 +894,12 @@
   ASSERT(operation_cid() == kSmiCid);
   LocationSummary* summary = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
-  summary->set_in(0, Location::RegisterOrConstant(left()));
+  summary->set_in(0, LocationRegisterOrConstant(left()));
   // Only one input can be a constant operand. The case of two constant
   // operands should be handled by constant propagation.
   summary->set_in(1, summary->in(0).IsConstant()
                          ? Location::RequiresRegister()
-                         : Location::RegisterOrConstant(right()));
+                         : LocationRegisterOrConstant(right()));
   summary->set_out(0, Location::RequiresRegister());
   return summary;
 }
@@ -982,6 +982,100 @@
   __ Drop(ArgumentCount());  // Drop the arguments.
 }
 
+void FfiCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+  const Register saved_fp = locs()->temp(0).reg();
+  const Register branch = locs()->in(TargetAddressIndex()).reg();
+
+  // Save frame pointer because we're going to update it when we enter the exit
+  // frame.
+  __ mov(saved_fp, Operand(FPREG));
+
+  // Make a space to put the return address.
+  __ PushImmediate(0);
+
+  // We need to create a dummy "exit frame". It will have a null code object.
+  __ LoadObject(CODE_REG, Object::null_object());
+  __ set_constant_pool_allowed(false);
+  __ EnterDartFrame(0, /*load_pool_pointer=*/false);
+
+  // Reserve space for arguments and align frame before entering C++ world.
+  __ ReserveAlignedFrameSpace(compiler::ffi::NumStackSlots(arg_locations_) *
+                              kWordSize);
+
+  // Load a 32-bit argument, or a 32-bit component of a 64-bit argument.
+  auto load_single_slot = [&](Location from, Location to) {
+    if (!to.IsStackSlot()) return;
+    if (from.IsRegister()) {
+      __ str(from.reg(), LocationToStackSlotAddress(to));
+    } else if (from.IsFpuRegister()) {
+      __ vstrs(EvenSRegisterOf(EvenDRegisterOf(from.fpu_reg())),
+               LocationToStackSlotAddress(to));
+    } else if (from.IsStackSlot() || from.IsDoubleStackSlot()) {
+      ASSERT(from.base_reg() == FPREG);
+      __ ldr(TMP, Address(saved_fp, from.ToStackSlotOffset()));
+      __ str(TMP, LocationToStackSlotAddress(to));
+    } else {
+      UNREACHABLE();
+    }
+  };
+
+  for (intptr_t i = 0, n = NativeArgCount(); i < n; ++i) {
+    Location origin = locs()->in(i);
+    Location target = arg_locations_[i];
+
+    if (target.IsStackSlot()) {
+      load_single_slot(origin, target);
+    } else if (target.IsDoubleStackSlot()) {
+      if (origin.IsFpuRegister()) {
+        __ vstrd(EvenDRegisterOf(origin.fpu_reg()),
+                 LocationToStackSlotAddress(target));
+      } else {
+        ASSERT(origin.IsDoubleStackSlot() && origin.base_reg() == FPREG);
+        __ vldrd(DTMP, Address(saved_fp, origin.ToStackSlotOffset()));
+        __ vstrd(DTMP, LocationToStackSlotAddress(target));
+      }
+    } else if (target.IsPairLocation()) {
+      ASSERT(origin.IsPairLocation());
+      load_single_slot(origin.AsPairLocation()->At(0),
+                       target.AsPairLocation()->At(0));
+      load_single_slot(origin.AsPairLocation()->At(1),
+                       target.AsPairLocation()->At(1));
+    }
+  }
+
+  // We need to copy the return address up into the dummy stack frame so the
+  // stack walker will know which safepoint to use.
+  __ mov(TMP, Operand(PC));
+  __ str(TMP, Address(FPREG, kSavedCallerPcSlotFromFp * kWordSize));
+
+  // For historical reasons, the PC on ARM points 8 bytes past the current
+  // instruction. Therefore we emit the metadata here, 8 bytes (2 instructions)
+  // after the original mov.
+  compiler->EmitCallsiteMetadata(TokenPosition::kNoSource, DeoptId::kNone,
+                                 RawPcDescriptors::Kind::kOther, locs());
+
+  // Update information in the thread object and enter a safepoint.
+  __ TransitionGeneratedToNative(branch, saved_fp, locs()->temp(1).reg());
+
+  __ blx(branch);
+
+  // Update information in the thread object and leave the safepoint.
+  __ TransitionNativeToGenerated(saved_fp, locs()->temp(1).reg());
+
+  // Restore the global object pool after returning from runtime (old space is
+  // moving, so the GOP could have been relocated).
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    __ ldr(PP, Address(THR, Thread::global_object_pool_offset()));
+  }
+
+  // Leave dummy exit frame.
+  __ LeaveDartFrame();
+  __ set_constant_pool_allowed(true);
+
+  // Instead of returning to the "fake" return address, we just pop it.
+  __ PopRegister(TMP);
+}
+
 LocationSummary* OneByteStringFromCharCodeInstr::MakeLocationSummary(
     Zone* zone,
     bool opt) const {
@@ -1062,6 +1156,10 @@
   }
 }
 
+DEFINE_BACKEND(StoreUntagged, (NoLocation, Register obj, Register value)) {
+  __ StoreToOffset(kWord, value, obj, instr->offset_from_tagged());
+}
+
 LocationSummary* LoadClassIdInstr::MakeLocationSummary(Zone* zone,
                                                        bool opt) const {
   const intptr_t kNumInputs = 1;
@@ -1513,7 +1611,7 @@
     case kArrayCid:
       locs->set_in(2, ShouldEmitStoreBarrier()
                           ? Location::RegisterLocation(kWriteBarrierValueReg)
-                          : Location::RegisterOrConstant(value()));
+                          : LocationRegisterOrConstant(value()));
       if (ShouldEmitStoreBarrier()) {
         locs->set_in(0, Location::RegisterLocation(kWriteBarrierObjectReg));
         locs->set_temp(0, Location::RegisterLocation(kWriteBarrierSlotReg));
@@ -1848,10 +1946,7 @@
         __ strh(IP, field_nullability_operand);
       }
 
-      if (deopt == NULL) {
-        ASSERT(!compiler->is_optimizing());
-        __ b(&ok);
-      }
+      __ b(&ok);
     }
 
     if (deopt == NULL) {
@@ -1866,6 +1961,8 @@
       __ Push(value_reg);
       __ CallRuntime(kUpdateFieldCidRuntimeEntry, 2);
       __ Drop(2);  // Drop the field and the value.
+    } else {
+      __ b(fail);
     }
   } else {
     ASSERT(compiler->is_optimizing());
@@ -2203,7 +2300,7 @@
   } else {
     summary->set_in(1, ShouldEmitStoreBarrier()
                            ? Location::RegisterLocation(kWriteBarrierValueReg)
-                           : Location::RegisterOrConstant(value()));
+                           : LocationRegisterOrConstant(value()));
   }
   return summary;
 }
@@ -3083,7 +3180,7 @@
           : object_store->stack_overflow_stub_without_fpu_regs_stub());
   const bool using_shared_stub = locs()->call_on_shared_slow_path();
   if (FLAG_precompiled_mode && FLAG_use_bare_instructions &&
-      using_shared_stub && !stub.InVMHeap()) {
+      using_shared_stub && !stub.InVMIsolateHeap()) {
     compiler->AddPcRelativeCallStubTarget(stub);
     __ GenerateUnRelocatedPcRelativeCall(LS);
 
@@ -3517,7 +3614,7 @@
     return summary;
   }
   summary->set_in(0, Location::RequiresRegister());
-  summary->set_in(1, Location::RegisterOrSmiConstant(right()));
+  summary->set_in(1, LocationRegisterOrSmiConstant(right()));
   if (((op_kind() == Token::kSHL) && can_overflow()) ||
       (op_kind() == Token::kSHR)) {
     summary->set_temp(0, Location::RequiresRegister());
@@ -3712,10 +3809,12 @@
       __ SmiUntag(IP, right);
       __ IntegerDivide(result, temp, IP, dtemp, DTMP);
 
-      // Check the corner case of dividing the 'MIN_SMI' with -1, in which
-      // case we cannot tag the result.
-      __ CompareImmediate(result, 0x40000000);
-      __ b(deopt, EQ);
+      if (RangeUtils::Overlaps(right_range(), -1, -1)) {
+        // Check the corner case of dividing the 'MIN_SMI' with -1, in which
+        // case we cannot tag the result.
+        __ CompareImmediate(result, 0x40000000);
+        __ b(deopt, EQ);
+      }
       __ SmiTag(result);
       break;
     }
@@ -3827,7 +3926,7 @@
   LocationSummary* summary = new (zone)
       LocationSummary(zone, kNumInputs, num_temps, LocationSummary::kNoCall);
   summary->set_in(0, Location::RequiresRegister());
-  summary->set_in(1, Location::RegisterOrSmiConstant(right()));
+  summary->set_in(1, LocationRegisterOrSmiConstant(right()));
   if (((op_kind() == Token::kSHL) && can_overflow()) ||
       (op_kind() == Token::kSHR)) {
     summary->set_temp(0, Location::RequiresRegister());
@@ -4048,6 +4147,11 @@
     case kUnboxedDouble:
       __ StoreDToOffset(value, out_reg, ValueOffset() - kHeapObjectTag);
       break;
+    case kUnboxedFloat:
+      __ vcvtds(DTMP, EvenSRegisterOf(value));
+      __ StoreDToOffset(EvenDRegisterOf(FpuTMP), out_reg,
+                        ValueOffset() - kHeapObjectTag);
+      break;
     case kUnboxedFloat32x4:
     case kUnboxedFloat64x2:
     case kUnboxedInt32x4:
@@ -4073,6 +4177,8 @@
   if (representation() == kUnboxedInt64) {
     summary->set_out(0, Location::Pair(Location::RequiresRegister(),
                                        Location::RequiresRegister()));
+  } else if (representation() == kUnboxedInt32) {
+    summary->set_out(0, Location::RequiresRegister());
   } else {
     summary->set_out(0, Location::RequiresFpuRegister());
   }
@@ -4098,6 +4204,13 @@
       break;
     }
 
+    case kUnboxedFloat: {
+      const DRegister result = EvenDRegisterOf(locs()->out(0).fpu_reg());
+      __ LoadDFromOffset(result, box, ValueOffset() - kHeapObjectTag);
+      __ vcvtsd(EvenSRegisterOf(result), result);
+      break;
+    }
+
     case kUnboxedFloat32x4:
     case kUnboxedFloat64x2:
     case kUnboxedInt32x4: {
@@ -4138,6 +4251,15 @@
   }
 }
 
+void UnboxInstr::EmitLoadInt32FromBoxOrSmi(FlowGraphCompiler* compiler) {
+  const Register value = locs()->in(0).reg();
+  const Register result = locs()->out(0).reg();
+  Label done;
+  __ SmiUntag(result, value, &done);
+  __ LoadFieldFromOffset(kWord, result, value, Mint::value_offset());
+  __ Bind(&done);
+}
+
 void UnboxInstr::EmitLoadInt64FromBoxOrSmi(FlowGraphCompiler* compiler) {
   const Register box = locs()->in(0).reg();
   PairLocation* result = locs()->out(0).AsPairLocation();
@@ -5778,7 +5900,7 @@
                     : object_store->null_error_stub_without_fpu_regs_stub());
   const bool using_shared_stub = locs()->call_on_shared_slow_path();
   if (FLAG_precompiled_mode && FLAG_use_bare_instructions &&
-      using_shared_stub && !stub.InVMHeap()) {
+      using_shared_stub && !stub.InVMIsolateHeap()) {
     compiler->AddPcRelativeCallStubTarget(stub);
     __ GenerateUnRelocatedPcRelativeCall(EQUAL);
 
@@ -5835,8 +5957,8 @@
   const intptr_t kNumTemps = 0;
   LocationSummary* locs = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
-  locs->set_in(kLengthPos, Location::RegisterOrSmiConstant(length()));
-  locs->set_in(kIndexPos, Location::RegisterOrSmiConstant(index()));
+  locs->set_in(kLengthPos, LocationRegisterOrSmiConstant(length()));
+  locs->set_in(kIndexPos, LocationRegisterOrSmiConstant(index()));
   return locs;
 }
 
@@ -6202,7 +6324,7 @@
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
   summary->set_in(0, Location::Pair(Location::RequiresRegister(),
                                     Location::RequiresRegister()));
-  summary->set_in(1, Location::WritableRegisterOrSmiConstant(right()));
+  summary->set_in(1, LocationWritableRegisterOrSmiConstant(right()));
   summary->set_out(0, Location::Pair(Location::RequiresRegister(),
                                      Location::RequiresRegister()));
   return summary;
@@ -6337,7 +6459,7 @@
   LocationSummary* summary = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
   summary->set_in(0, Location::RequiresRegister());
-  summary->set_in(1, Location::RegisterOrSmiConstant(right()));
+  summary->set_in(1, LocationRegisterOrSmiConstant(right()));
   summary->set_temp(0, Location::RequiresRegister());
   summary->set_out(0, Location::RequiresRegister());
   return summary;
@@ -6495,32 +6617,48 @@
   __ mvn(out, Operand(left));
 }
 
-LocationSummary* UnboxedIntConverterInstr::MakeLocationSummary(Zone* zone,
-                                                               bool opt) const {
+LocationSummary* IntConverterInstr::MakeLocationSummary(Zone* zone,
+                                                        bool opt) const {
   const intptr_t kNumInputs = 1;
   const intptr_t kNumTemps = 0;
   LocationSummary* summary = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
-  if (from() == kUnboxedInt64) {
-    ASSERT((to() == kUnboxedUint32) || (to() == kUnboxedInt32));
+  if (from() == kUntagged || to() == kUntagged) {
+    ASSERT((from() == kUntagged && to() == kUnboxedIntPtr) ||
+           (from() == kUnboxedIntPtr && to() == kUntagged));
+    ASSERT(!CanDeoptimize());
+    summary->set_in(0, Location::RequiresRegister());
+    summary->set_out(0, Location::SameAsFirstInput());
+  } else if (from() == kUnboxedInt64) {
+    ASSERT(to() == kUnboxedUint32 || to() == kUnboxedInt32);
     summary->set_in(0, Location::Pair(Location::RequiresRegister(),
                                       Location::RequiresRegister()));
     summary->set_out(0, Location::RequiresRegister());
   } else if (to() == kUnboxedInt64) {
-    ASSERT((from() == kUnboxedUint32) || (from() == kUnboxedInt32));
+    ASSERT(from() == kUnboxedUint32 || from() == kUnboxedInt32);
     summary->set_in(0, Location::RequiresRegister());
     summary->set_out(0, Location::Pair(Location::RequiresRegister(),
                                        Location::RequiresRegister()));
   } else {
-    ASSERT((to() == kUnboxedUint32) || (to() == kUnboxedInt32));
-    ASSERT((from() == kUnboxedUint32) || (from() == kUnboxedInt32));
+    ASSERT(to() == kUnboxedUint32 || to() == kUnboxedInt32);
+    ASSERT(from() == kUnboxedUint32 || from() == kUnboxedInt32);
     summary->set_in(0, Location::RequiresRegister());
     summary->set_out(0, Location::SameAsFirstInput());
   }
   return summary;
 }
 
-void UnboxedIntConverterInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+void IntConverterInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+  const bool is_nop_conversion =
+      (from() == kUntagged && to() == kUnboxedInt32) ||
+      (from() == kUntagged && to() == kUnboxedUint32) ||
+      (from() == kUnboxedInt32 && to() == kUntagged) ||
+      (from() == kUnboxedUint32 && to() == kUntagged);
+  if (is_nop_conversion) {
+    ASSERT(locs()->in(0).reg() == locs()->out(0).reg());
+    return;
+  }
+
   if (from() == kUnboxedInt32 && to() == kUnboxedUint32) {
     const Register out = locs()->out(0).reg();
     // Representations are bitwise equivalent.
@@ -6569,6 +6707,113 @@
   }
 }
 
+LocationSummary* UnboxedWidthExtenderInstr::MakeLocationSummary(
+    Zone* zone,
+    bool is_optimizing) const {
+  const intptr_t kNumTemps = 0;
+  LocationSummary* summary = new (zone)
+      LocationSummary(zone, /*num_inputs=*/InputCount(),
+                      /*num_temps=*/kNumTemps, LocationSummary::kNoCall);
+  summary->set_in(0, Location::RequiresRegister());
+  summary->set_out(0, Location::SameAsFirstInput());
+  return summary;
+}
+
+void UnboxedWidthExtenderInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+  Register reg = locs()->in(0).reg();
+  // There are no builtin sign- or zero-extension instructions, so we'll have to
+  // use shifts instead.
+  const intptr_t shift_length = (kWordSize - from_width_bytes_) * kBitsPerByte;
+  __ Lsl(reg, reg, Operand(shift_length));
+  switch (representation_) {
+    case kUnboxedInt32:  // Sign extend operand.
+      __ Asr(reg, reg, Operand(shift_length));
+      break;
+    case kUnboxedUint32:  // Zero extend operand.
+      __ Lsr(reg, reg, Operand(shift_length));
+      break;
+    default:
+      UNREACHABLE();
+  }
+}
+
+LocationSummary* BitCastInstr::MakeLocationSummary(Zone* zone, bool opt) const {
+  LocationSummary* summary =
+      new (zone) LocationSummary(zone, /*num_inputs=*/InputCount(),
+                                 /*num_temps=*/0, LocationSummary::kNoCall);
+  switch (from()) {
+    case kUnboxedInt32:
+      summary->set_in(0, Location::RequiresRegister());
+      break;
+    case kUnboxedInt64:
+      summary->set_in(0, Location::Pair(Location::RequiresRegister(),
+                                        Location::RequiresRegister()));
+      break;
+    case kUnboxedFloat:
+    case kUnboxedDouble:
+      summary->set_in(0, Location::RequiresFpuRegister());
+      break;
+    default:
+      UNREACHABLE();
+  }
+
+  switch (to()) {
+    case kUnboxedInt32:
+      summary->set_out(0, Location::RequiresRegister());
+      break;
+    case kUnboxedInt64:
+      summary->set_out(0, Location::Pair(Location::RequiresRegister(),
+                                         Location::RequiresRegister()));
+      break;
+    case kUnboxedFloat:
+    case kUnboxedDouble:
+      summary->set_out(0, Location::RequiresFpuRegister());
+      break;
+    default:
+      UNREACHABLE();
+  }
+  return summary;
+}
+
+void BitCastInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+  switch (from()) {
+    case kUnboxedInt32: {
+      ASSERT(to() == kUnboxedFloat);
+      const Register from_reg = locs()->in(0).reg();
+      const FpuRegister to_reg = locs()->out(0).fpu_reg();
+      __ vmovsr(EvenSRegisterOf(EvenDRegisterOf(to_reg)), from_reg);
+      break;
+    }
+    case kUnboxedFloat: {
+      ASSERT(to() == kUnboxedInt32);
+      const FpuRegister from_reg = locs()->in(0).fpu_reg();
+      const Register to_reg = locs()->out(0).reg();
+      __ vmovrs(to_reg, EvenSRegisterOf(EvenDRegisterOf(from_reg)));
+      break;
+    }
+    case kUnboxedInt64: {
+      ASSERT(to() == kUnboxedDouble);
+      const Register from_lo = locs()->in(0).AsPairLocation()->At(0).reg();
+      const Register from_hi = locs()->in(0).AsPairLocation()->At(1).reg();
+      const FpuRegister to_reg = locs()->out(0).fpu_reg();
+      __ vmovsr(EvenSRegisterOf(EvenDRegisterOf(to_reg)), from_lo);
+      __ vmovsr(OddSRegisterOf(EvenDRegisterOf(to_reg)), from_hi);
+      break;
+    }
+    case kUnboxedDouble: {
+      ASSERT(to() == kUnboxedInt64);
+      const FpuRegister from_reg = locs()->in(0).fpu_reg();
+      const Register to_lo = locs()->out(0).AsPairLocation()->At(0).reg();
+      const Register to_hi = locs()->out(0).AsPairLocation()->At(1).reg();
+      __ vmovrs(to_lo, EvenSRegisterOf(EvenDRegisterOf(from_reg)));
+      __ vmovrs(to_hi, OddSRegisterOf(EvenDRegisterOf(from_reg)));
+      break;
+    }
+    default:
+      UNREACHABLE();
+  }
+}
+
 LocationSummary* ThrowInstr::MakeLocationSummary(Zone* zone, bool opt) const {
   return new (zone) LocationSummary(zone, 0, 0, LocationSummary::kCall);
 }
@@ -6685,7 +6930,7 @@
   if ((constant != NULL) && !left()->IsSingleUse()) {
     locs->set_in(0, Location::RequiresRegister());
   } else {
-    locs->set_in(0, Location::RegisterOrConstant(left()));
+    locs->set_in(0, LocationRegisterOrConstant(left()));
   }
 
   constant = right()->definition()->AsConstant();
@@ -6696,7 +6941,7 @@
     // one is a constant.
     locs->set_in(1, locs->in(0).IsConstant()
                         ? Location::RequiresRegister()
-                        : Location::RegisterOrConstant(right()));
+                        : LocationRegisterOrConstant(right()));
   }
   locs->set_out(0, Location::RequiresRegister());
   return locs;
@@ -6797,10 +7042,14 @@
 }
 
 void DebugStepCheckInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+#ifdef PRODUCT
+  UNREACHABLE();
+#else
   ASSERT(!compiler->is_optimizing());
   __ BranchLinkPatchable(StubCode::DebugStepCheck());
   compiler->AddCurrentDescriptor(stub_kind_, deopt_id_, token_pos());
   compiler->RecordSafepoint(locs());
+#endif
 }
 
 }  // namespace dart
diff --git a/runtime/vm/compiler/backend/il_arm64.cc b/runtime/vm/compiler/backend/il_arm64.cc
index ba567b0..5ba37ca 100644
--- a/runtime/vm/compiler/backend/il_arm64.cc
+++ b/runtime/vm/compiler/backend/il_arm64.cc
@@ -79,7 +79,7 @@
   const intptr_t kNumTemps = 0;
   LocationSummary* locs = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
-  locs->set_in(0, Location::AnyOrConstant(value()));
+  locs->set_in(0, LocationAnyOrConstant(value()));
   return locs;
 }
 
@@ -627,13 +627,13 @@
     const intptr_t kNumTemps = 0;
     LocationSummary* locs = new (zone)
         LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
-    locs->set_in(0, Location::RegisterOrConstant(left()));
+    locs->set_in(0, LocationRegisterOrConstant(left()));
     // Only one input can be a constant operand. The case of two constant
     // operands should be handled by constant propagation.
     // Only right can be a stack slot.
     locs->set_in(1, locs->in(0).IsConstant()
                         ? Location::RequiresRegister()
-                        : Location::RegisterOrConstant(right()));
+                        : LocationRegisterOrConstant(right()));
     locs->set_out(0, Location::RequiresRegister());
     return locs;
   }
@@ -695,7 +695,7 @@
   locs->set_in(0, Location::RequiresRegister());
   // Only one input can be a constant operand. The case of two constant
   // operands should be handled by constant propagation.
-  locs->set_in(1, Location::RegisterOrConstant(right()));
+  locs->set_in(1, LocationRegisterOrConstant(right()));
   return locs;
 }
 
@@ -783,12 +783,12 @@
   if (operation_cid() == kSmiCid || operation_cid() == kMintCid) {
     LocationSummary* summary = new (zone)
         LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
-    summary->set_in(0, Location::RegisterOrConstant(left()));
+    summary->set_in(0, LocationRegisterOrConstant(left()));
     // Only one input can be a constant operand. The case of two constant
     // operands should be handled by constant propagation.
     summary->set_in(1, summary->in(0).IsConstant()
                            ? Location::RequiresRegister()
-                           : Location::RegisterOrConstant(right()));
+                           : LocationRegisterOrConstant(right()));
     summary->set_out(0, Location::RequiresRegister());
     return summary;
   }
@@ -872,6 +872,89 @@
   __ Drop(ArgumentCount());  // Drop the arguments.
 }
 
+void FfiCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+  Register saved_fp = locs()->temp(0).reg();
+  Register temp = locs()->temp(1).reg();
+  Register branch = locs()->in(TargetAddressIndex()).reg();
+
+  // Save frame pointer because we're going to update it when we enter the exit
+  // frame.
+  __ mov(saved_fp, FPREG);
+
+  // We need to create a dummy "exit frame". It will share the same pool pointer
+  // but have a null code object.
+  __ LoadObject(CODE_REG, Object::null_object());
+  __ set_constant_pool_allowed(false);
+  __ EnterDartFrame(0, PP);
+
+  // Save the stack limit address.
+  __ PushRegister(CSP);
+
+  // Make space for arguments and align the frame.
+  __ ReserveAlignedFrameSpace(compiler::ffi::NumStackSlots(arg_locations_) *
+                              kWordSize);
+
+  for (intptr_t i = 0, n = NativeArgCount(); i < n; ++i) {
+    Location origin = locs()->in(i);
+    Location target = arg_locations_[i];
+
+    if (target.IsStackSlot()) {
+      if (origin.IsRegister()) {
+        __ StoreToOffset(origin.reg(), SPREG, target.ToStackSlotOffset());
+      } else if (origin.IsFpuRegister()) {
+        __ StoreDToOffset(origin.fpu_reg(), SPREG, target.ToStackSlotOffset());
+      } else if (origin.IsStackSlot() || origin.IsDoubleStackSlot()) {
+        // The base register cannot be SPREG because we've moved it.
+        ASSERT(origin.base_reg() == FPREG);
+        __ LoadFromOffset(TMP, saved_fp, origin.ToStackSlotOffset());
+        __ StoreToOffset(TMP, SPREG, target.ToStackSlotOffset());
+      }
+    } else {
+      ASSERT(origin.Equals(target));
+    }
+  }
+
+  // We need to copy a dummy return address up into the dummy stack frame so the
+  // stack walker will know which safepoint to use.
+  __ adr(temp, Immediate(0));
+  compiler->EmitCallsiteMetadata(token_pos(), DeoptId::kNone,
+                                 RawPcDescriptors::Kind::kOther, locs());
+
+  __ StoreToOffset(temp, FPREG, kSavedCallerPcSlotFromFp * kWordSize);
+
+  // We are entering runtime code, so the C stack pointer must be restored from
+  // the stack limit to the top of the stack.
+  __ mov(CSP, SP);
+
+  // Update information in the thread object and enter a safepoint.
+  __ TransitionGeneratedToNative(branch, temp);
+
+  __ blr(branch);
+
+  // Update information in the thread object and leave the safepoint.
+  __ TransitionNativeToGenerated(temp);
+
+  // Restore the Dart stack pointer and the saved C stack pointer.
+  __ mov(SP, CSP);
+  __ LoadFromOffset(CSP, FPREG, kFirstLocalSlotFromFp * kWordSize);
+
+  // Refresh write barrier mask.
+  __ ldr(BARRIER_MASK,
+         Address(THR, compiler::target::Thread::write_barrier_mask_offset()));
+
+  // Although PP is a callee-saved register, it may have been moved by the GC.
+  __ LeaveDartFrame(compiler::kRestoreCallerPP);
+
+  // Restore the global object pool after returning from runtime (old space is
+  // moving, so the GOP could have been relocated).
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    __ ldr(PP, Address(THR, Thread::global_object_pool_offset()));
+    __ sub(PP, PP, Operand(kHeapObjectTag));  // Pool in PP is untagged!
+  }
+
+  __ set_constant_pool_allowed(true);
+}
+
 LocationSummary* OneByteStringFromCharCodeInstr::MakeLocationSummary(
     Zone* zone,
     bool opt) const {
@@ -954,6 +1037,10 @@
   }
 }
 
+DEFINE_BACKEND(StoreUntagged, (NoLocation, Register obj, Register value)) {
+  __ StoreToOffset(value, obj, instr->offset_from_tagged());
+}
+
 LocationSummary* LoadClassIdInstr::MakeLocationSummary(Zone* zone,
                                                        bool opt) const {
   const intptr_t kNumInputs = 1;
@@ -1362,7 +1449,7 @@
     case kArrayCid:
       locs->set_in(2, ShouldEmitStoreBarrier()
                           ? Location::RegisterLocation(kWriteBarrierValueReg)
-                          : Location::RegisterOrConstant(value()));
+                          : LocationRegisterOrConstant(value()));
       if (ShouldEmitStoreBarrier()) {
         locs->set_in(0, Location::RegisterLocation(kWriteBarrierObjectReg));
         locs->set_temp(0, Location::RegisterLocation(kWriteBarrierSlotReg));
@@ -1676,10 +1763,7 @@
         __ str(TMP, field_nullability_operand, kUnsignedHalfword);
       }
 
-      if (deopt == NULL) {
-        ASSERT(!compiler->is_optimizing());
-        __ b(&ok);
-      }
+      __ b(&ok);
     }
 
     if (deopt == NULL) {
@@ -1695,6 +1779,8 @@
       __ Push(value_reg);
       __ CallRuntime(kUpdateFieldCidRuntimeEntry, 2);
       __ Drop(2);  // Drop the field and the value.
+    } else {
+      __ b(fail);
     }
   } else {
     ASSERT(compiler->is_optimizing());
@@ -1913,7 +1999,7 @@
   } else {
     summary->set_in(1, ShouldEmitStoreBarrier()
                            ? Location::RegisterLocation(kWriteBarrierValueReg)
-                           : Location::RegisterOrConstant(value()));
+                           : LocationRegisterOrConstant(value()));
   }
   return summary;
 }
@@ -2727,7 +2813,7 @@
               : object_store->stack_overflow_stub_without_fpu_regs_stub());
 
       if (FLAG_precompiled_mode && FLAG_use_bare_instructions &&
-          using_shared_stub && !stub.InVMHeap()) {
+          using_shared_stub && !stub.InVMIsolateHeap()) {
         compiler->AddPcRelativeCallStubTarget(stub);
         __ GenerateUnRelocatedPcRelativeCall();
 
@@ -2778,9 +2864,7 @@
   compiler->AddSlowPathCode(slow_path);
 
   __ ldr(TMP, Address(THR, Thread::stack_limit_offset()));
-  // Compare to CSP not SP because CSP is closer to the stack limit. See
-  // Assembler::EnterFrame.
-  __ CompareRegisters(CSP, TMP);
+  __ CompareRegisters(SP, TMP);
   __ b(slow_path->entry_label(), LS);
   if (compiler->CanOSRFunction() && in_loop()) {
     const Register temp = locs()->temp(0).reg();
@@ -3201,7 +3285,7 @@
     return summary;
   }
   summary->set_in(0, Location::RequiresRegister());
-  summary->set_in(1, Location::RegisterOrSmiConstant(right()));
+  summary->set_in(1, LocationRegisterOrSmiConstant(right()));
   if (((op_kind() == Token::kSHL) && can_overflow()) ||
       (op_kind() == Token::kSHR)) {
     summary->set_temp(0, Location::RequiresRegister());
@@ -3369,11 +3453,12 @@
       __ SmiUntag(TMP, right);
 
       __ sdiv(result, temp, TMP);
-
-      // Check the corner case of dividing the 'MIN_SMI' with -1, in which
-      // case we cannot tag the result.
-      __ CompareImmediate(result, 0x4000000000000000LL);
-      __ b(deopt, EQ);
+      if (RangeUtils::Overlaps(right_range(), -1, -1)) {
+        // Check the corner case of dividing the 'MIN_SMI' with -1, in which
+        // case we cannot tag the result.
+        __ CompareImmediate(result, 0x4000000000000000LL);
+        __ b(deopt, EQ);
+      }
       __ SmiTag(result);
       break;
     }
@@ -3507,6 +3592,10 @@
     case kUnboxedDouble:
       __ StoreDFieldToOffset(value, out_reg, ValueOffset());
       break;
+    case kUnboxedFloat:
+      __ fcvtds(FpuTMP, value);
+      __ StoreDFieldToOffset(FpuTMP, out_reg, ValueOffset());
+      break;
     case kUnboxedFloat32x4:
     case kUnboxedFloat64x2:
     case kUnboxedInt32x4:
@@ -3521,7 +3610,8 @@
 LocationSummary* UnboxInstr::MakeLocationSummary(Zone* zone, bool opt) const {
   const intptr_t kNumInputs = 1;
   const intptr_t kNumTemps = 0;
-  const bool is_floating_point = representation() != kUnboxedInt64;
+  const bool is_floating_point =
+      representation() != kUnboxedInt64 && representation() != kUnboxedInt32;
   LocationSummary* summary = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
   summary->set_in(0, Location::RequiresRegister());
@@ -3546,6 +3636,13 @@
       break;
     }
 
+    case kUnboxedFloat: {
+      const VRegister result = locs()->out(0).fpu_reg();
+      __ LoadDFieldFromOffset(result, box, ValueOffset());
+      __ fcvtsd(result, result);
+      break;
+    }
+
     case kUnboxedFloat32x4:
     case kUnboxedFloat64x2:
     case kUnboxedInt32x4: {
@@ -3583,6 +3680,18 @@
   }
 }
 
+void UnboxInstr::EmitLoadInt32FromBoxOrSmi(FlowGraphCompiler* compiler) {
+  const Register value = locs()->in(0).reg();
+  const Register result = locs()->out(0).reg();
+  ASSERT(value != result);
+  Label done;
+  __ SmiUntag(result, value);
+  __ BranchIfSmi(value, &done);
+  __ ldr(result, FieldAddress(value, Mint::value_offset()), kWord);
+  __ LoadFieldFromOffset(result, value, Mint::value_offset());
+  __ Bind(&done);
+}
+
 void UnboxInstr::EmitLoadInt64FromBoxOrSmi(FlowGraphCompiler* compiler) {
   const Register value = locs()->in(0).reg();
   const Register result = locs()->out(0).reg();
@@ -4995,7 +5104,7 @@
       live_fpu_regs ? object_store->null_error_stub_with_fpu_regs_stub()
                     : object_store->null_error_stub_without_fpu_regs_stub());
   if (FLAG_precompiled_mode && FLAG_use_bare_instructions &&
-      using_shared_stub && !stub.InVMHeap()) {
+      using_shared_stub && !stub.InVMIsolateHeap()) {
     compiler->AddPcRelativeCallStubTarget(stub);
     compiler->assembler()->GenerateUnRelocatedPcRelativeCall();
     return;
@@ -5010,8 +5119,8 @@
   const intptr_t kNumTemps = 0;
   LocationSummary* locs = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
-  locs->set_in(kLengthPos, Location::RegisterOrSmiConstant(length()));
-  locs->set_in(kIndexPos, Location::RegisterOrSmiConstant(index()));
+  locs->set_in(kLengthPos, LocationRegisterOrSmiConstant(length()));
+  locs->set_in(kIndexPos, LocationRegisterOrSmiConstant(index()));
   return locs;
 }
 
@@ -5212,7 +5321,7 @@
       LocationSummary* summary = new (zone) LocationSummary(
           zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
       summary->set_in(0, Location::RequiresRegister());
-      summary->set_in(1, Location::RegisterOrConstant(right()));
+      summary->set_in(1, LocationRegisterOrConstant(right()));
       summary->set_out(0, Location::RequiresRegister());
       return summary;
     }
@@ -5428,7 +5537,7 @@
       zone, kNumInputs, kNumTemps, LocationSummary::kCallOnSlowPath);
   summary->set_in(0, Location::RequiresRegister());
   summary->set_in(1, RangeUtils::IsPositive(shift_range())
-                         ? Location::RegisterOrConstant(right())
+                         ? LocationRegisterOrConstant(right())
                          : Location::RequiresRegister());
   summary->set_out(0, Location::RequiresRegister());
   return summary;
@@ -5472,7 +5581,7 @@
   LocationSummary* summary = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
   summary->set_in(0, Location::RequiresRegister());
-  summary->set_in(1, Location::RegisterOrSmiConstant(right()));
+  summary->set_in(1, LocationRegisterOrSmiConstant(right()));
   summary->set_out(0, Location::RequiresRegister());
   return summary;
 }
@@ -5539,7 +5648,7 @@
       zone, kNumInputs, kNumTemps, LocationSummary::kCallOnSlowPath);
   summary->set_in(0, Location::RequiresRegister());
   summary->set_in(1, RangeUtils::IsPositive(shift_range())
-                         ? Location::RegisterOrConstant(right())
+                         ? LocationRegisterOrConstant(right())
                          : Location::RequiresRegister());
   summary->set_out(0, Location::RequiresRegister());
   return summary;
@@ -5585,7 +5694,7 @@
   LocationSummary* summary = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
   summary->set_in(0, Location::RequiresRegister());
-  summary->set_in(1, Location::RegisterOrSmiConstant(right()));
+  summary->set_in(1, LocationRegisterOrSmiConstant(right()));
   summary->set_out(0, Location::RequiresRegister());
   return summary;
 }
@@ -5730,19 +5839,23 @@
 
 DEFINE_UNIMPLEMENTED_INSTRUCTION(BinaryInt32OpInstr)
 
-LocationSummary* UnboxedIntConverterInstr::MakeLocationSummary(Zone* zone,
-                                                               bool opt) const {
+LocationSummary* IntConverterInstr::MakeLocationSummary(Zone* zone,
+                                                        bool opt) const {
   const intptr_t kNumInputs = 1;
   const intptr_t kNumTemps = 0;
   LocationSummary* summary = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
-  if (from() == kUnboxedInt64) {
-    ASSERT((to() == kUnboxedUint32) || (to() == kUnboxedInt32));
+  if (from() == kUntagged || to() == kUntagged) {
+    ASSERT((from() == kUntagged && to() == kUnboxedIntPtr) ||
+           (from() == kUnboxedIntPtr && to() == kUntagged));
+    ASSERT(!CanDeoptimize());
+  } else if (from() == kUnboxedInt64) {
+    ASSERT(to() == kUnboxedUint32 || to() == kUnboxedInt32);
   } else if (to() == kUnboxedInt64) {
-    ASSERT((from() == kUnboxedUint32) || (from() == kUnboxedInt32));
+    ASSERT(from() == kUnboxedInt32 || from() == kUnboxedUint32);
   } else {
-    ASSERT((to() == kUnboxedUint32) || (to() == kUnboxedInt32));
-    ASSERT((from() == kUnboxedUint32) || (from() == kUnboxedInt32));
+    ASSERT(to() == kUnboxedUint32 || to() == kUnboxedInt32);
+    ASSERT(from() == kUnboxedUint32 || from() == kUnboxedInt32);
   }
   summary->set_in(0, Location::RequiresRegister());
   if (CanDeoptimize()) {
@@ -5753,8 +5866,17 @@
   return summary;
 }
 
-void UnboxedIntConverterInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+void IntConverterInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
   ASSERT(from() != to());  // We don't convert from a representation to itself.
+
+  const bool is_nop_conversion =
+      (from() == kUntagged && to() == kUnboxedIntPtr) ||
+      (from() == kUnboxedIntPtr && to() == kUntagged);
+  if (is_nop_conversion) {
+    ASSERT(locs()->in(0).reg() == locs()->out(0).reg());
+    return;
+  }
+
   const Register value = locs()->in(0).reg();
   const Register out = locs()->out(0).reg();
   Label* deopt = !CanDeoptimize() ? NULL
@@ -5806,6 +5928,50 @@
   }
 }
 
+LocationSummary* UnboxedWidthExtenderInstr::MakeLocationSummary(
+    Zone* zone,
+    bool is_optimizing) const {
+  const intptr_t kNumTemps = 0;
+  LocationSummary* summary = new (zone)
+      LocationSummary(zone, /*num_inputs=*/InputCount(),
+                      /*num_temps=*/kNumTemps, LocationSummary::kNoCall);
+  summary->set_in(0, Location::RequiresRegister());
+  summary->set_out(0, Location::SameAsFirstInput());
+  return summary;
+}
+
+void UnboxedWidthExtenderInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+  Register reg = locs()->in(0).reg();
+  switch (representation_) {
+    case kUnboxedInt32:  // Sign extend operand.
+      switch (from_width_bytes_) {
+        case 1:
+          __ sxtb(reg, reg);
+          break;
+        case 2:
+          __ sxth(reg, reg);
+          break;
+        default:
+          UNREACHABLE();
+      }
+      break;
+    case kUnboxedUint32:  // Zero extend operand.
+      switch (from_width_bytes_) {
+        case 1:
+          __ uxtb(reg, reg);
+          break;
+        case 2:
+          __ uxth(reg, reg);
+          break;
+        default:
+          UNREACHABLE();
+      }
+      break;
+    default:
+      UNREACHABLE();
+  }
+}
+
 LocationSummary* ThrowInstr::MakeLocationSummary(Zone* zone, bool opt) const {
   return new (zone) LocationSummary(zone, 0, 0, LocationSummary::kCall);
 }
@@ -5920,12 +6086,12 @@
   }
   LocationSummary* locs = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
-  locs->set_in(0, Location::RegisterOrConstant(left()));
+  locs->set_in(0, LocationRegisterOrConstant(left()));
   // Only one of the inputs can be a constant. Choose register if the first one
   // is a constant.
   locs->set_in(1, locs->in(0).IsConstant()
                       ? Location::RequiresRegister()
-                      : Location::RegisterOrConstant(right()));
+                      : LocationRegisterOrConstant(right()));
   locs->set_out(0, Location::RequiresRegister());
   return locs;
 }
@@ -6019,10 +6185,14 @@
 }
 
 void DebugStepCheckInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+#ifdef PRODUCT
+  UNREACHABLE();
+#else
   ASSERT(!compiler->is_optimizing());
   __ BranchLinkPatchable(StubCode::DebugStepCheck());
   compiler->AddCurrentDescriptor(stub_kind_, deopt_id_, token_pos());
   compiler->RecordSafepoint(locs());
+#endif
 }
 
 }  // namespace dart
diff --git a/runtime/vm/compiler/backend/il_dbc.cc b/runtime/vm/compiler/backend/il_dbc.cc
index 70f8e2b..e75bfef 100644
--- a/runtime/vm/compiler/backend/il_dbc.cc
+++ b/runtime/vm/compiler/backend/il_dbc.cc
@@ -46,7 +46,8 @@
   M(SpeculativeShiftUint32Op)                                                  \
   M(TruncDivMod)                                                               \
   M(UnaryUint32Op)                                                             \
-  M(UnboxedIntConverter)
+  M(IntConverter)                                                              \
+  M(UnboxedWidthExtender)
 
 // List of instructions that are not used by DBC.
 // Things we aren't planning to implement for DBC:
@@ -57,7 +58,6 @@
 #define FOR_EACH_UNREACHABLE_INSTRUCTION(M)                                    \
   M(CaseInsensitiveCompareUC16)                                                \
   M(GenericCheckBound)                                                         \
-  M(CheckNull)                                                                 \
   M(IndirectGoto)                                                              \
   M(Int64ToDouble)                                                             \
   M(BinaryInt64Op)                                                             \
@@ -748,7 +748,7 @@
     case kExternalTypedDataUint8ArrayCid:
       ASSERT(index_scale() == 1);
       if (IsExternal()) {
-        __ StoreIndexedExternalUint8(array, index, value);
+        __ StoreIndexedUntaggedUint8(array, index, value);
       } else {
         __ StoreIndexedUint8(array, index, value);
       }
@@ -760,43 +760,58 @@
     case kTypedDataInt32ArrayCid:
     case kTypedDataUint32ArrayCid: {
       if (IsExternal()) {
-        Unsupported(compiler);
-        UNREACHABLE();
-      }
-      if (index_scale() == 1) {
-        __ StoreIndexedUint32(array, index, value);
+        if (index_scale() == 1) {
+          __ StoreIndexedUntaggedUint32(array, index, value);
+        } else {
+          __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+          __ StoreIndexedUntaggedUint32(array, temp, value);
+        }
       } else {
-        __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
-        __ StoreIndexedUint32(array, temp, value);
+        if (index_scale() == 1) {
+          __ StoreIndexedUint32(array, index, value);
+        } else {
+          __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+          __ StoreIndexedUint32(array, temp, value);
+        }
       }
       break;
     }
     case kTypedDataFloat32ArrayCid:
       if (IsExternal()) {
-        Unsupported(compiler);
-        UNREACHABLE();
-      }
-      if (index_scale() == 1) {
-        __ StoreIndexedFloat32(array, index, value);
-      } else if (index_scale() == 4) {
-        __ StoreIndexed4Float32(array, index, value);
+        if (index_scale() == 1) {
+          __ StoreIndexedUntaggedFloat32(array, index, value);
+        } else {
+          __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+          __ StoreIndexedUntaggedFloat32(array, temp, value);
+        }
       } else {
-        __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
-        __ StoreIndexedFloat32(array, temp, value);
+        if (index_scale() == 1) {
+          __ StoreIndexedFloat32(array, index, value);
+        } else if (index_scale() == 4) {
+          __ StoreIndexed4Float32(array, index, value);
+        } else {
+          __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+          __ StoreIndexedFloat32(array, temp, value);
+        }
       }
       break;
     case kTypedDataFloat64ArrayCid:
       if (IsExternal()) {
-        Unsupported(compiler);
-        UNREACHABLE();
-      }
-      if (index_scale() == 1) {
-        __ StoreIndexedFloat64(array, index, value);
-      } else if (index_scale() == 8) {
-        __ StoreIndexed8Float64(array, index, value);
+        if (index_scale() == 1) {
+          __ StoreIndexedUntaggedFloat64(array, index, value);
+        } else {
+          __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+          __ StoreIndexedUntaggedFloat64(array, temp, value);
+        }
       } else {
-        __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
-        __ StoreIndexedFloat64(array, temp, value);
+        if (index_scale() == 1) {
+          __ StoreIndexedFloat64(array, index, value);
+        } else if (index_scale() == 8) {
+          __ StoreIndexed8Float64(array, index, value);
+        } else {
+          __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+          __ StoreIndexedFloat64(array, temp, value);
+        }
       }
       break;
     default:
@@ -829,7 +844,7 @@
       case kExternalTypedDataUint8ClampedArrayCid:
         ASSERT(index_scale() == 1);
         if (IsExternal()) {
-          __ LoadIndexedExternalUint8(result, array, index);
+          __ LoadIndexedUntaggedUint8(result, array, index);
         } else {
           __ LoadIndexedUint8(result, array, index);
         }
@@ -837,7 +852,7 @@
       case kTypedDataInt8ArrayCid:
         ASSERT(index_scale() == 1);
         if (IsExternal()) {
-          __ LoadIndexedExternalInt8(result, array, index);
+          __ LoadIndexedUntaggedInt8(result, array, index);
         } else {
           __ LoadIndexedInt8(result, array, index);
         }
@@ -861,55 +876,75 @@
       case kTypedDataInt32ArrayCid:
         ASSERT(representation() == kUnboxedInt32);
         if (IsExternal()) {
-          Unsupported(compiler);
-          UNREACHABLE();
-        }
-        if (index_scale() == 1) {
-          __ LoadIndexedInt32(result, array, index);
+          if (index_scale() == 1) {
+            __ LoadIndexedUntaggedInt32(result, array, index);
+          } else {
+            __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+            __ LoadIndexedUntaggedInt32(result, array, temp);
+          }
         } else {
-          __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
-          __ LoadIndexedInt32(result, array, temp);
+          if (index_scale() == 1) {
+            __ LoadIndexedInt32(result, array, index);
+          } else {
+            __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+            __ LoadIndexedInt32(result, array, temp);
+          }
         }
         break;
       case kTypedDataUint32ArrayCid:
         ASSERT(representation() == kUnboxedUint32);
         if (IsExternal()) {
-          Unsupported(compiler);
-          UNREACHABLE();
-        }
-        if (index_scale() == 1) {
-          __ LoadIndexedUint32(result, array, index);
+          if (index_scale() == 1) {
+            __ LoadIndexedUntaggedUint32(result, array, index);
+          } else {
+            __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+            __ LoadIndexedUntaggedUint32(result, array, temp);
+          }
         } else {
-          __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
-          __ LoadIndexedUint32(result, array, temp);
+          if (index_scale() == 1) {
+            __ LoadIndexedUint32(result, array, index);
+          } else {
+            __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+            __ LoadIndexedUint32(result, array, temp);
+          }
         }
         break;
       case kTypedDataFloat32ArrayCid:
         if (IsExternal()) {
-          Unsupported(compiler);
-          UNREACHABLE();
-        }
-        if (index_scale() == 1) {
-          __ LoadIndexedFloat32(result, array, index);
-        } else if (index_scale() == 4) {
-          __ LoadIndexed4Float32(result, array, index);
+          if (index_scale() == 1) {
+            __ LoadIndexedUntaggedFloat32(result, array, index);
+          } else {
+            __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+            __ LoadIndexedUntaggedFloat32(result, array, temp);
+          }
         } else {
-          __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
-          __ LoadIndexedFloat32(result, array, temp);
+          if (index_scale() == 1) {
+            __ LoadIndexedFloat32(result, array, index);
+          } else if (index_scale() == 4) {
+            __ LoadIndexed4Float32(result, array, index);
+          } else {
+            __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+            __ LoadIndexedFloat32(result, array, temp);
+          }
         }
         break;
       case kTypedDataFloat64ArrayCid:
         if (IsExternal()) {
-          Unsupported(compiler);
-          UNREACHABLE();
-        }
-        if (index_scale() == 1) {
-          __ LoadIndexedFloat64(result, array, index);
-        } else if (index_scale() == 8) {
-          __ LoadIndexed8Float64(result, array, index);
+          if (index_scale() == 1) {
+            __ LoadIndexedUntaggedFloat64(result, array, index);
+          } else {
+            __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+            __ LoadIndexedUntaggedFloat64(result, array, temp);
+          }
         } else {
-          __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
-          __ LoadIndexedFloat64(result, array, temp);
+          if (index_scale() == 1) {
+            __ LoadIndexedFloat64(result, array, index);
+          } else if (index_scale() == 8) {
+            __ LoadIndexed8Float64(result, array, index);
+          } else {
+            __ ShlImm(temp, index, Utils::ShiftForPowerOfTwo(index_scale()));
+            __ LoadIndexedFloat64(result, array, temp);
+          }
         }
         break;
       default:
@@ -958,6 +993,10 @@
   }
 }
 
+void FfiCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+  UNREACHABLE();
+}
+
 EMIT_NATIVE_CODE(NativeCall,
                  0,
                  Location::NoLocation(),
@@ -1127,6 +1166,18 @@
   }
 }
 
+EMIT_NATIVE_CODE(StoreUntagged, 1, Location::RequiresRegister()) {
+  const Register obj = locs()->in(0).reg();
+  const Register value = locs()->out(0).reg();
+  const auto offset_in_words = offset() / kWordSize;
+  if (object()->definition()->representation() == kUntagged) {
+    __ StoreUntagged(obj, offset_in_words, value);
+  } else {
+    ASSERT(object()->definition()->representation() == kTagged);
+    __ StoreField(obj, offset_in_words, value);
+  }
+}
+
 EMIT_NATIVE_CODE(BooleanNegate, 1, Location::RequiresRegister()) {
   if (compiler->is_optimizing()) {
     __ BooleanNegate(locs()->out(0).reg(), locs()->in(0).reg());
@@ -1266,8 +1317,12 @@
 }
 
 void DebugStepCheckInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+#ifdef PRODUCT
+  UNREACHABLE();
+#else
   __ DebugStep();
   compiler->AddCurrentDescriptor(stub_kind_, deopt_id_, token_pos());
+#endif
 }
 
 void GraphEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
@@ -1523,6 +1578,17 @@
                       licm_hoisted_ ? ICData::kHoisted : 0);
 }
 
+EMIT_NATIVE_CODE(CheckNull, 1) {
+  if (compiler->is_optimizing()) {
+    const Register value = locs()->in(0).reg();
+    __ IfEqNull(value);
+  } else {
+    __ IfEqNullTOS();
+  }
+  __ NullError();
+  CheckNullInstr::AddMetadataForRuntimeCall(this, compiler);
+}
+
 EMIT_NATIVE_CODE(BinarySmiOp, 2, Location::RequiresRegister()) {
   if (compiler->is_optimizing()) {
     const Register left = locs()->in(0).reg();
diff --git a/runtime/vm/compiler/backend/il_ia32.cc b/runtime/vm/compiler/backend/il_ia32.cc
index 3f6ee68..88ce5ba 100644
--- a/runtime/vm/compiler/backend/il_ia32.cc
+++ b/runtime/vm/compiler/backend/il_ia32.cc
@@ -12,6 +12,7 @@
 #include "vm/compiler/backend/locations.h"
 #include "vm/compiler/backend/locations_helpers.h"
 #include "vm/compiler/backend/range_analysis.h"
+#include "vm/compiler/ffi.h"
 #include "vm/compiler/frontend/flow_graph_builder.h"
 #include "vm/compiler/jit/compiler.h"
 #include "vm/dart_entry.h"
@@ -72,7 +73,7 @@
   const intptr_t kNumTemps = 0;
   LocationSummary* locs = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
-  locs->set_in(0, Location::AnyOrConstant(value()));
+  locs->set_in(0, LocationAnyOrConstant(value()));
   return locs;
 }
 
@@ -87,7 +88,7 @@
       __ PushObject(value.constant());
     } else {
       ASSERT(value.IsStackSlot());
-      __ pushl(value.ToStackSlotAddress());
+      __ pushl(LocationToStackSlotAddress(value));
     }
   }
 }
@@ -139,7 +140,7 @@
   const intptr_t stack_index =
       compiler::target::frame_layout.FrameSlotForVariable(&local());
   return LocationSummary::Make(zone, kNumInputs,
-                               Location::StackSlot(stack_index),
+                               Location::StackSlot(stack_index, FPREG),
                                LocationSummary::kNoCall);
 }
 
@@ -223,20 +224,20 @@
     } else {
       __ movsd(XMM0, Address::Absolute(addr));
     }
-    __ movsd(destination.ToStackSlotAddress(), XMM0);
+    __ movsd(LocationToStackSlotAddress(destination), XMM0);
   } else {
     ASSERT(destination.IsStackSlot());
     if (value_.IsSmi() && representation() == kUnboxedInt32) {
-      __ movl(destination.ToStackSlotAddress(),
+      __ movl(LocationToStackSlotAddress(destination),
               Immediate(Smi::Cast(value_).Value()));
     } else {
       if (Assembler::IsSafeSmi(value_) || value_.IsNull()) {
-        __ movl(destination.ToStackSlotAddress(),
+        __ movl(LocationToStackSlotAddress(destination),
                 Immediate(reinterpret_cast<int32_t>(value_.raw())));
       } else {
         __ pushl(EAX);
         __ LoadObjectSafely(EAX, value_);
-        __ movl(destination.ToStackSlotAddress(), EAX);
+        __ movl(LocationToStackSlotAddress(destination), EAX);
         __ popl(EAX);
       }
     }
@@ -380,13 +381,13 @@
     const intptr_t kNumTemps = 0;
     LocationSummary* locs = new (zone)
         LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
-    locs->set_in(0, Location::RegisterOrConstant(left()));
+    locs->set_in(0, LocationRegisterOrConstant(left()));
     // Only one input can be a constant operand. The case of two constant
     // operands should be handled by constant propagation.
     // Only right can be a stack slot.
     locs->set_in(1, locs->in(0).IsConstant()
                         ? Location::RequiresRegister()
-                        : Location::RegisterOrConstant(right()));
+                        : LocationRegisterOrConstant(right()));
     locs->set_out(0, Location::RequiresRegister());
     return locs;
   }
@@ -506,7 +507,7 @@
   } else if (right.IsConstant()) {
     __ CompareObject(left.reg(), right.constant());
   } else if (right.IsStackSlot()) {
-    __ cmpl(left.reg(), right.ToStackSlotAddress());
+    __ cmpl(left.reg(), LocationToStackSlotAddress(right));
   } else {
     __ cmpl(left.reg(), right.reg());
   }
@@ -681,7 +682,7 @@
   locs->set_in(0, Location::RequiresRegister());
   // Only one input can be a constant operand. The case of two constant
   // operands should be handled by constant propagation.
-  locs->set_in(1, Location::RegisterOrConstant(right()));
+  locs->set_in(1, LocationRegisterOrConstant(right()));
   return locs;
 }
 
@@ -780,12 +781,12 @@
   ASSERT(operation_cid() == kSmiCid);
   LocationSummary* summary = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
-  summary->set_in(0, Location::RegisterOrConstant(left()));
+  summary->set_in(0, LocationRegisterOrConstant(left()));
   // Only one input can be a constant operand. The case of two constant
   // operands should be handled by constant propagation.
   summary->set_in(1, summary->in(0).IsConstant()
                          ? Location::RequiresRegister()
-                         : Location::RegisterOrConstant(right()));
+                         : LocationRegisterOrConstant(right()));
   summary->set_out(0, Location::RequiresRegister());
   return summary;
 }
@@ -844,6 +845,113 @@
   __ Drop(ArgumentCount());  // Drop the arguments.
 }
 
+void FfiCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+  Register saved_fp = locs()->temp(0).reg();  // volatile
+  Register branch = locs()->in(TargetAddressIndex()).reg();
+  Register tmp = locs()->temp(1).reg();  // callee-saved
+
+  // Save frame pointer because we're going to update it when we enter the exit
+  // frame.
+  __ movl(saved_fp, FPREG);
+
+  // Make a space to put the return address.
+  __ pushl(Immediate(0));
+
+  // We need to create a dummy "exit frame". It will have a null code object.
+  __ LoadObject(CODE_REG, Object::null_object());
+  __ EnterDartFrame(compiler::ffi::NumStackSlots(arg_locations_) * kWordSize);
+
+  // Align frame before entering C++ world.
+  if (OS::ActivationFrameAlignment() > 1) {
+    __ andl(SPREG, Immediate(~(OS::ActivationFrameAlignment() - 1)));
+  }
+
+  // Load a 32-bit argument, or a 32-bit component of a 64-bit argument.
+  auto load_single_slot = [&](Location from, Location to) {
+    ASSERT(to.IsStackSlot());
+    if (from.IsRegister()) {
+      __ movl(LocationToStackSlotAddress(to), from.reg());
+    } else if (from.IsFpuRegister()) {
+      __ movss(LocationToStackSlotAddress(to), from.fpu_reg());
+    } else if (from.IsStackSlot() || from.IsDoubleStackSlot()) {
+      ASSERT(from.base_reg() == FPREG);
+      __ movl(tmp, Address(saved_fp, from.ToStackSlotOffset()));
+      __ movl(LocationToStackSlotAddress(to), tmp);
+    } else {
+      UNREACHABLE();
+    }
+  };
+
+  for (intptr_t i = 0, n = NativeArgCount(); i < n; ++i) {
+    Location origin = locs()->in(i);
+    Location target = arg_locations_[i];
+
+    if (target.IsStackSlot()) {
+      load_single_slot(origin, target);
+    } else if (target.IsDoubleStackSlot()) {
+      if (origin.IsFpuRegister()) {
+        __ movsd(LocationToStackSlotAddress(target), origin.fpu_reg());
+      } else {
+        ASSERT(origin.IsDoubleStackSlot() && origin.base_reg() == FPREG);
+        __ movl(tmp, Address(saved_fp, origin.ToStackSlotOffset()));
+        __ movl(LocationToStackSlotAddress(target), tmp);
+        __ movl(tmp, Address(saved_fp, origin.ToStackSlotOffset() + 4));
+        __ movl(Address(SPREG, target.ToStackSlotOffset() + 4), tmp);
+      }
+    } else if (target.IsPairLocation()) {
+      ASSERT(origin.IsPairLocation());
+      load_single_slot(origin.AsPairLocation()->At(0),
+                       target.AsPairLocation()->At(0));
+      load_single_slot(origin.AsPairLocation()->At(1),
+                       target.AsPairLocation()->At(1));
+    }
+  }
+
+  // We need to copy a dummy return address up into the dummy stack frame so the
+  // stack walker will know which safepoint to use. Unlike X64, there's no
+  // PC-relative 'leaq' available, so we have do a trick with 'call'.
+  Label get_pc;
+  __ call(&get_pc);
+  compiler->EmitCallsiteMetadata(TokenPosition::kNoSource, DeoptId::kNone,
+                                 RawPcDescriptors::Kind::kOther, locs());
+  __ Bind(&get_pc);
+  __ popl(tmp);
+  __ movl(Address(FPREG, kSavedCallerPcSlotFromFp * kWordSize), tmp);
+
+  __ TransitionGeneratedToNative(branch, tmp);
+  __ call(branch);
+
+  // The x86 calling convention requires floating point values to be returned on
+  // the "floating-point stack" (aka. register ST0). We don't use the
+  // floating-point stack in Dart, so we need to move the return value back into
+  // an XMM register.
+  if (representation() == kUnboxedDouble || representation() == kUnboxedFloat) {
+    __ subl(SPREG, Immediate(8));
+    __ fstpl(Address(SPREG, 0));
+    __ TransitionNativeToGenerated(tmp);
+    __ fldl(Address(SPREG, 0));
+    __ addl(SPREG, Immediate(8));
+  } else {
+    __ TransitionNativeToGenerated(tmp);
+  }
+
+  if (representation() == kUnboxedDouble) {
+    __ subl(SPREG, Immediate(8));
+    __ fstpl(Address(SPREG, 0));
+    __ movsd(XMM0, Address(SPREG, 0));
+  } else if (representation() == kUnboxedFloat) {
+    __ subl(SPREG, Immediate(4));
+    __ fstps(Address(SPREG, 0));
+    __ movss(XMM0, Address(SPREG, 0));
+  }
+
+  // Leave dummy exit frame.
+  __ LeaveFrame();
+
+  // Instead of returning to the "fake" return address, we just pop it.
+  __ popl(tmp);
+}
+
 static bool CanBeImmediateIndex(Value* value, intptr_t cid) {
   ConstantInstr* constant = value->definition()->AsConstant();
   if ((constant == NULL) || !Assembler::IsSafeSmi(constant->value())) {
@@ -941,6 +1049,10 @@
   }
 }
 
+DEFINE_BACKEND(StoreUntagged, (NoLocation, Register obj, Register value)) {
+  __ movl(Address(obj, instr->offset_from_tagged()), value);
+}
+
 LocationSummary* LoadClassIdInstr::MakeLocationSummary(Zone* zone,
                                                        bool opt) const {
   const intptr_t kNumInputs = 1;
@@ -1271,7 +1383,7 @@
     case kArrayCid:
       locs->set_in(2, ShouldEmitStoreBarrier()
                           ? Location::WritableRegister()
-                          : Location::RegisterOrConstant(value()));
+                          : LocationRegisterOrConstant(value()));
       if (ShouldEmitStoreBarrier()) {
         locs->set_in(0, Location::RegisterLocation(kWriteBarrierObjectReg));
         locs->set_temp(0, Location::RegisterLocation(kWriteBarrierSlotReg));
@@ -1285,7 +1397,7 @@
     case kOneByteStringCid:
       // TODO(fschneider): Add location constraint for byte registers (EAX,
       // EBX, ECX, EDX) instead of using a fixed register.
-      locs->set_in(2, Location::FixedRegisterOrSmiConstant(value(), EAX));
+      locs->set_in(2, LocationFixedRegisterOrSmiConstant(value(), EAX));
       break;
     case kTypedDataInt16ArrayCid:
     case kTypedDataUint16ArrayCid:
@@ -1561,10 +1673,7 @@
         __ movw(field_nullability_operand, Immediate(value_cid));
       }
 
-      if (deopt == NULL) {
-        ASSERT(!compiler->is_optimizing());
-        __ jmp(&ok);
-      }
+      __ jmp(&ok);
     }
 
     if (deopt == NULL) {
@@ -1579,6 +1688,8 @@
       __ pushl(value_reg);
       __ CallRuntime(kUpdateFieldCidRuntimeEntry, 2);
       __ Drop(2);  // Drop the field and the value.
+    } else {
+      __ jmp(fail);
     }
   } else {
     ASSERT(compiler->is_optimizing());
@@ -1787,7 +1898,7 @@
   } else {
     summary->set_in(1, ShouldEmitStoreBarrier()
                            ? Location::WritableRegister()
-                           : Location::RegisterOrConstant(value()));
+                           : LocationRegisterOrConstant(value()));
   }
   return summary;
 }
@@ -2842,7 +2953,7 @@
     LocationSummary* summary = new (zone)
         LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
     summary->set_in(0, Location::RequiresRegister());
-    summary->set_in(1, Location::FixedRegisterOrSmiConstant(right(), ECX));
+    summary->set_in(1, LocationFixedRegisterOrSmiConstant(right(), ECX));
     summary->set_out(0, Location::SameAsFirstInput());
     return summary;
   } else if (op_kind() == Token::kSHL) {
@@ -2854,7 +2965,7 @@
     LocationSummary* summary = new (zone)
         LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
     summary->set_in(0, Location::RequiresRegister());
-    summary->set_in(1, Location::FixedRegisterOrSmiConstant(right(), ECX));
+    summary->set_in(1, LocationFixedRegisterOrSmiConstant(right(), ECX));
     if (kNumTemps == 1) {
       summary->set_temp(0, Location::RequiresRegister());
     }
@@ -2867,7 +2978,7 @@
     summary->set_in(0, Location::RequiresRegister());
     ConstantInstr* constant = right()->definition()->AsConstant();
     if (constant != NULL) {
-      summary->set_in(1, Location::RegisterOrSmiConstant(right()));
+      summary->set_in(1, LocationRegisterOrSmiConstant(right()));
     } else {
       summary->set_in(1, Location::PrefersRegister());
     }
@@ -2976,7 +3087,7 @@
   }  // if locs()->in(1).IsConstant()
 
   if (locs()->in(1).IsStackSlot()) {
-    const Address& right = locs()->in(1).ToStackSlotAddress();
+    const Address& right = LocationToStackSlotAddress(locs()->in(1));
     if (op_kind() == Token::kMUL) {
       __ SmiUntag(left);
     }
@@ -3013,10 +3124,12 @@
       __ SmiUntag(right);
       __ cdq();         // Sign extend EAX -> EDX:EAX.
       __ idivl(right);  //  EAX: quotient, EDX: remainder.
-      // Check the corner case of dividing the 'MIN_SMI' with -1, in which
-      // case we cannot tag the result.
-      __ cmpl(result, Immediate(0x40000000));
-      __ j(EQUAL, deopt);
+      if (RangeUtils::Overlaps(right_range(), -1, -1)) {
+        // Check the corner case of dividing the 'MIN_SMI' with -1, in which
+        // case we cannot tag the result.
+        __ cmpl(result, Immediate(0x40000000));
+        __ j(EQUAL, deopt);
+      }
       __ SmiTag(result);
       break;
     }
@@ -3121,7 +3234,7 @@
     LocationSummary* summary = new (zone)
         LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
     summary->set_in(0, Location::RequiresRegister());
-    summary->set_in(1, Location::FixedRegisterOrSmiConstant(right(), ECX));
+    summary->set_in(1, LocationFixedRegisterOrSmiConstant(right(), ECX));
     summary->set_out(0, Location::SameAsFirstInput());
     return summary;
   } else if (op_kind() == Token::kSHL) {
@@ -3129,7 +3242,7 @@
     LocationSummary* summary = new (zone)
         LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
     summary->set_in(0, Location::RequiresRegister());
-    summary->set_in(1, Location::FixedRegisterOrSmiConstant(right(), ECX));
+    summary->set_in(1, LocationFixedRegisterOrSmiConstant(right(), ECX));
     if (can_overflow()) {
       summary->set_temp(0, Location::RequiresRegister());
     }
@@ -3142,7 +3255,7 @@
     summary->set_in(0, Location::RequiresRegister());
     ConstantInstr* constant = right()->definition()->AsConstant();
     if (constant != NULL) {
-      summary->set_in(1, Location::RegisterOrSmiConstant(right()));
+      summary->set_in(1, LocationRegisterOrSmiConstant(right()));
     } else {
       summary->set_in(1, Location::PrefersRegister());
     }
@@ -3231,7 +3344,7 @@
   }  // if locs()->in(1).IsConstant()
 
   if (locs()->in(1).IsStackSlot()) {
-    const Address& right = locs()->in(1).ToStackSlotAddress();
+    const Address& right = LocationToStackSlotAddress(locs()->in(1));
     EmitIntegerArithmetic(compiler, op_kind(), left, right, deopt);
     return;
   }  // if locs()->in(1).IsStackSlot.
@@ -3358,6 +3471,10 @@
     case kUnboxedDouble:
       __ movsd(FieldAddress(out_reg, ValueOffset()), value);
       break;
+    case kUnboxedFloat:
+      __ cvtss2sd(FpuTMP, value);
+      __ movsd(FieldAddress(out_reg, ValueOffset()), FpuTMP);
+      break;
     case kUnboxedFloat32x4:
     case kUnboxedFloat64x2:
     case kUnboxedInt32x4:
@@ -3385,6 +3502,8 @@
   if (representation() == kUnboxedInt64) {
     summary->set_out(0, Location::Pair(Location::RegisterLocation(EAX),
                                        Location::RegisterLocation(EDX)));
+  } else if (representation() == kUnboxedInt32) {
+    summary->set_out(0, Location::SameAsFirstInput());
   } else {
     summary->set_out(0, Location::RequiresFpuRegister());
   }
@@ -3410,6 +3529,13 @@
       break;
     }
 
+    case kUnboxedFloat: {
+      const FpuRegister result = locs()->out(0).fpu_reg();
+      __ movsd(result, FieldAddress(box, ValueOffset()));
+      __ cvtsd2ss(result, result);
+      break;
+    }
+
     case kUnboxedFloat32x4:
     case kUnboxedFloat64x2:
     case kUnboxedInt32x4: {
@@ -3453,6 +3579,17 @@
   }
 }
 
+void UnboxInstr::EmitLoadInt32FromBoxOrSmi(FlowGraphCompiler* compiler) {
+  const Register value = locs()->in(0).reg();
+  const Register result = locs()->out(0).reg();
+  ASSERT(value == result);
+  Label done;
+  __ SmiUntag(value);  // Leaves CF after SmiUntag.
+  __ j(NOT_CARRY, &done, Assembler::kNearJump);
+  __ movl(result, FieldAddress(value, Mint::value_offset()));
+  __ Bind(&done);
+}
+
 void UnboxInstr::EmitLoadInt64FromBoxOrSmi(FlowGraphCompiler* compiler) {
   const Register box = locs()->in(0).reg();
   PairLocation* result = locs()->out(0).AsPairLocation();
@@ -5155,11 +5292,11 @@
   LocationSummary* locs = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
   if (length()->definition()->IsConstant()) {
-    locs->set_in(kLengthPos, Location::RegisterOrSmiConstant(length()));
+    locs->set_in(kLengthPos, LocationRegisterOrSmiConstant(length()));
   } else {
     locs->set_in(kLengthPos, Location::PrefersRegister());
   }
-  locs->set_in(kIndexPos, Location::RegisterOrSmiConstant(index()));
+  locs->set_in(kIndexPos, LocationRegisterOrSmiConstant(index()));
   return locs;
 }
 
@@ -5199,7 +5336,7 @@
   } else if (index_loc.IsConstant()) {
     const Smi& index = Smi::Cast(index_loc.constant());
     if (length_loc.IsStackSlot()) {
-      const Address& length = length_loc.ToStackSlotAddress();
+      const Address& length = LocationToStackSlotAddress(length_loc);
       __ cmpl(length, Immediate(reinterpret_cast<int32_t>(index.raw())));
     } else {
       Register length = length_loc.reg();
@@ -5208,7 +5345,7 @@
     __ j(BELOW_EQUAL, deopt);
   } else if (length_loc.IsStackSlot()) {
     Register index = index_loc.reg();
-    const Address& length = length_loc.ToStackSlotAddress();
+    const Address& length = LocationToStackSlotAddress(length_loc);
     if (index_cid != kSmiCid) {
       __ BranchIfNotSmi(index, deopt);
     }
@@ -5576,7 +5713,7 @@
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
   summary->set_in(0, Location::Pair(Location::RequiresRegister(),
                                     Location::RequiresRegister()));
-  summary->set_in(1, Location::FixedRegisterOrSmiConstant(right(), ECX));
+  summary->set_in(1, LocationFixedRegisterOrSmiConstant(right(), ECX));
   summary->set_out(0, Location::SameAsFirstInput());
   return summary;
 }
@@ -5713,7 +5850,7 @@
   LocationSummary* summary = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
   summary->set_in(0, Location::RequiresRegister());
-  summary->set_in(1, Location::FixedRegisterOrSmiConstant(right(), ECX));
+  summary->set_in(1, LocationFixedRegisterOrSmiConstant(right(), ECX));
   summary->set_out(0, Location::SameAsFirstInput());
   return summary;
 }
@@ -5827,14 +5964,21 @@
   __ notl(out);
 }
 
-LocationSummary* UnboxedIntConverterInstr::MakeLocationSummary(Zone* zone,
-                                                               bool opt) const {
+LocationSummary* IntConverterInstr::MakeLocationSummary(Zone* zone,
+                                                        bool opt) const {
   const intptr_t kNumInputs = 1;
   const intptr_t kNumTemps = 0;
   LocationSummary* summary = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
-  if ((from() == kUnboxedInt32 || from() == kUnboxedUint32) &&
-      (to() == kUnboxedInt32 || to() == kUnboxedUint32)) {
+
+  if (from() == kUntagged || to() == kUntagged) {
+    ASSERT((from() == kUntagged && to() == kUnboxedIntPtr) ||
+           (from() == kUnboxedIntPtr && to() == kUntagged));
+    ASSERT(!CanDeoptimize());
+    summary->set_in(0, Location::RequiresRegister());
+    summary->set_out(0, Location::SameAsFirstInput());
+  } else if ((from() == kUnboxedInt32 || from() == kUnboxedUint32) &&
+             (to() == kUnboxedInt32 || to() == kUnboxedUint32)) {
     summary->set_in(0, Location::RequiresRegister());
     summary->set_out(0, Location::SameAsFirstInput());
   } else if (from() == kUnboxedInt64) {
@@ -5852,10 +5996,19 @@
     summary->set_out(0, Location::Pair(Location::RegisterLocation(EAX),
                                        Location::RegisterLocation(EDX)));
   }
+
   return summary;
 }
 
-void UnboxedIntConverterInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+void IntConverterInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+  const bool is_nop_conversion =
+      (from() == kUntagged && to() == kUnboxedIntPtr) ||
+      (from() == kUnboxedIntPtr && to() == kUntagged);
+  if (is_nop_conversion) {
+    ASSERT(locs()->in(0).reg() == locs()->out(0).reg());
+    return;
+  }
+
   if (from() == kUnboxedInt32 && to() == kUnboxedUint32) {
     // Representations are bitwise equivalent.
     ASSERT(locs()->out(0).reg() == locs()->in(0).reg());
@@ -5910,6 +6063,49 @@
   }
 }
 
+LocationSummary* UnboxedWidthExtenderInstr::MakeLocationSummary(
+    Zone* zone,
+    bool is_optimizing) const {
+  const intptr_t kNumTemps = 0;
+  LocationSummary* summary = new (zone)
+      LocationSummary(zone, /*num_inputs=*/InputCount(),
+                      /*num_temps=*/kNumTemps, LocationSummary::kNoCall);
+  summary->set_in(0, Location::RegisterLocation(EAX));
+  summary->set_out(0, Location::RegisterLocation(EAX));
+  return summary;
+}
+
+void UnboxedWidthExtenderInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+  switch (representation_) {
+    case kUnboxedInt32:  // Sign-extend operand.
+      switch (from_width_bytes_) {
+        case 1:
+          __ movsxb(EAX, AL);
+          break;
+        case 2:
+          __ movsxw(EAX, EAX);
+          break;
+        default:
+          UNREACHABLE();
+      }
+      break;
+    case kUnboxedUint32:  // Zero-extend operand.
+      switch (from_width_bytes_) {
+        case 1:
+          __ movzxb(EAX, AL);
+          break;
+        case 2:
+          __ movzxw(EAX, EAX);
+          break;
+        default:
+          UNREACHABLE();
+      }
+      break;
+    default:
+      UNREACHABLE();
+  }
+}
+
 LocationSummary* ThrowInstr::MakeLocationSummary(Zone* zone, bool opt) const {
   return new (zone) LocationSummary(zone, 0, 0, LocationSummary::kCall);
 }
@@ -6024,12 +6220,12 @@
   }
   LocationSummary* locs = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
-  locs->set_in(0, Location::RegisterOrConstant(left()));
+  locs->set_in(0, LocationRegisterOrConstant(left()));
   // Only one of the inputs can be a constant. Choose register if the first one
   // is a constant.
   locs->set_in(1, locs->in(0).IsConstant()
                       ? Location::RequiresRegister()
-                      : Location::RegisterOrConstant(right()));
+                      : LocationRegisterOrConstant(right()));
   locs->set_out(0, Location::RequiresRegister());
   return locs;
 }
@@ -6188,10 +6384,14 @@
 }
 
 void DebugStepCheckInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+#ifdef PRODUCT
+  UNREACHABLE();
+#else
   ASSERT(!compiler->is_optimizing());
   __ Call(StubCode::DebugStepCheck());
   compiler->AddCurrentDescriptor(stub_kind_, deopt_id_, token_pos());
   compiler->RecordSafepoint(locs());
+#endif
 }
 
 }  // namespace dart
diff --git a/runtime/vm/compiler/backend/il_printer.cc b/runtime/vm/compiler/backend/il_printer.cc
index a2a26ea..19b2aed 100644
--- a/runtime/vm/compiler/backend/il_printer.cc
+++ b/runtime/vm/compiler/backend/il_printer.cc
@@ -155,12 +155,15 @@
 
 void CompileType::PrintTo(BufferFormatter* f) const {
   const char* type_name = "?";
-  if ((cid_ != kIllegalCid) && (cid_ != kDynamicCid)) {
+  if (IsNone()) {
+    f->Print("T{}");
+    return;
+  } else if ((cid_ != kIllegalCid) && (cid_ != kDynamicCid)) {
     const Class& cls =
         Class::Handle(Isolate::Current()->class_table()->At(cid_));
     type_name = String::Handle(cls.ScrubbedName()).ToCString();
-  } else if (type_ != NULL && !type_->IsDynamicType()) {
-    type_name = TypeToUserVisibleName(*type_);
+  } else if (type_ != NULL) {
+    type_name = type_->IsDynamicType() ? "*" : TypeToUserVisibleName(*type_);
   } else if (!is_nullable()) {
     type_name = "!null";
   }
@@ -249,9 +252,9 @@
                               const ICData& ic_data,
                               intptr_t num_checks_to_print) {
   f->Print(" IC[");
-  if (ic_data.IsTrackingExactness()) {
+  if (ic_data.is_tracking_exactness()) {
     f->Print("(%s) ",
-             AbstractType::Handle(ic_data.StaticReceiverType()).ToCString());
+             AbstractType::Handle(ic_data.receivers_static_type()).ToCString());
   }
   f->Print("%" Pd ": ", ic_data.NumberOfChecks());
   Function& target = Function::Handle();
@@ -275,7 +278,7 @@
       f->Print("%s", String::Handle(cls.Name()).ToCString());
     }
     f->Print(" cnt:%" Pd " trgt:'%s'", count, target.ToQualifiedCString());
-    if (ic_data.IsTrackingExactness()) {
+    if (ic_data.is_tracking_exactness()) {
       f->Print(" %s", ic_data.GetExactnessAt(i).ToCString());
     }
   }
@@ -388,6 +391,13 @@
   }
 }
 
+void RedefinitionInstr::PrintOperandsTo(BufferFormatter* f) const {
+  Definition::PrintOperandsTo(f);
+  if (constrained_type_ != nullptr) {
+    f->Print(" ^ %s", constrained_type_->ToCString());
+  }
+}
+
 void Value::PrintTo(BufferFormatter* f) const {
   PrintUse(f, *definition());
 
@@ -511,6 +521,18 @@
   }
 }
 
+void FfiCallInstr::PrintOperandsTo(BufferFormatter* f) const {
+  f->Print(" pointer=");
+  InputAt(TargetAddressIndex())->PrintTo(f);
+  f->Print(" signature=%s",
+           Type::Handle(signature_.SignatureType()).ToCString());
+  for (intptr_t i = 0, n = InputCount(); i < n - 1; ++i) {
+    f->Print(", ");
+    InputAt(i)->PrintTo(f);
+    f->Print(" (at %s) ", arg_locations_[i].ToCString());
+  }
+}
+
 void InstanceCallInstr::PrintOperandsTo(BufferFormatter* f) const {
   f->Print(" %s<%" Pd ">", function_name().ToCString(), type_args_len());
   for (intptr_t i = 0; i < ArgumentCount(); ++i) {
@@ -910,6 +932,8 @@
       return "untagged";
     case kUnboxedDouble:
       return "double";
+    case kUnboxedFloat:
+      return "float";
     case kUnboxedInt32:
       return "int32";
     case kUnboxedUint32:
@@ -958,9 +982,8 @@
     f->Print(" %s", RepresentationToCString(representation()));
   }
 
-  if (type_ != NULL) {
-    f->Print(" ");
-    type_->PrintTo(f);
+  if (HasType()) {
+    f->Print(" %s", TypeAsCString());
   }
 }
 
@@ -971,12 +994,24 @@
   Definition::PrintOperandsTo(f);
 }
 
-void UnboxedIntConverterInstr::PrintOperandsTo(BufferFormatter* f) const {
+void IntConverterInstr::PrintOperandsTo(BufferFormatter* f) const {
   f->Print("%s->%s%s, ", RepresentationToCString(from()),
            RepresentationToCString(to()), is_truncating() ? "[tr]" : "");
   Definition::PrintOperandsTo(f);
 }
 
+void UnboxedWidthExtenderInstr::PrintOperandsTo(BufferFormatter* f) const {
+  f->Print("%" Pd " -> 4 (%s), ", from_width_bytes_,
+           RepresentationToCString(representation()));
+  Definition::PrintOperandsTo(f);
+}
+
+void BitCastInstr::PrintOperandsTo(BufferFormatter* f) const {
+  Definition::PrintOperandsTo(f);
+  f->Print(" (%s -> %s)", RepresentationToCString(from()),
+           RepresentationToCString(to()));
+}
+
 void ParameterInstr::PrintOperandsTo(BufferFormatter* f) const {
   f->Print("%" Pd, index());
 }
@@ -993,7 +1028,7 @@
 }
 
 void CheckStackOverflowInstr::PrintOperandsTo(BufferFormatter* f) const {
-  if (in_loop()) f->Print("depth %" Pd, loop_depth());
+  f->Print("stack=%" Pd ", loop=%" Pd, stack_depth(), loop_depth());
 }
 
 void TargetEntryInstr::PrintTo(BufferFormatter* f) const {
@@ -1010,7 +1045,8 @@
 }
 
 void OsrEntryInstr::PrintTo(BufferFormatter* f) const {
-  f->Print("B%" Pd "[osr entry]:%" Pd, block_id(), GetDeoptId());
+  f->Print("B%" Pd "[osr entry]:%" Pd " stack_depth=%" Pd, block_id(),
+           GetDeoptId(), stack_depth());
   if (HasParallelMove()) {
     f->Print("\n");
     parallel_move()->PrintTo(f);
@@ -1039,13 +1075,13 @@
 }
 
 void LoadIndexedUnsafeInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print("%s[", Assembler::RegisterName(base_reg()));
+  f->Print("%s[", RegisterNames::RegisterName(base_reg()));
   index()->PrintTo(f);
   f->Print(" + %" Pd "]", offset());
 }
 
 void StoreIndexedUnsafeInstr::PrintOperandsTo(BufferFormatter* f) const {
-  f->Print("%s[", Assembler::RegisterName(base_reg()));
+  f->Print("%s[", RegisterNames::RegisterName(base_reg()));
   index()->PrintTo(f);
   f->Print(" + %" Pd "], ", offset());
   value()->PrintTo(f);
diff --git a/runtime/vm/compiler/backend/il_test_helper.cc b/runtime/vm/compiler/backend/il_test_helper.cc
new file mode 100644
index 0000000..4315c29
--- /dev/null
+++ b/runtime/vm/compiler/backend/il_test_helper.cc
@@ -0,0 +1,328 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#include "vm/compiler/backend/il_test_helper.h"
+
+#include "vm/compiler/aot/aot_call_specializer.h"
+#include "vm/compiler/backend/block_scheduler.h"
+#include "vm/compiler/backend/flow_graph.h"
+#include "vm/compiler/backend/flow_graph_compiler.h"
+#include "vm/compiler/backend/il.h"
+#include "vm/compiler/backend/il_printer.h"
+#include "vm/compiler/backend/inliner.h"
+#include "vm/compiler/call_specializer.h"
+#include "vm/compiler/compiler_pass.h"
+#include "vm/compiler/jit/compiler.h"
+#include "vm/compiler/jit/jit_call_specializer.h"
+#include "vm/dart_api_impl.h"
+#include "vm/parser.h"
+#include "vm/unit_test.h"
+
+namespace dart {
+
+RawLibrary* LoadTestScript(const char* script,
+                           Dart_NativeEntryResolver resolver,
+                           const char* lib_uri) {
+  Dart_Handle api_lib;
+  {
+    TransitionVMToNative transition(Thread::Current());
+    api_lib = TestCase::LoadTestScript(script, resolver, lib_uri);
+  }
+  auto& lib = Library::Handle();
+  lib ^= Api::UnwrapHandle(api_lib);
+  EXPECT(!lib.IsNull());
+  return lib.raw();
+}
+
+RawFunction* GetFunction(const Library& lib, const char* name) {
+  Thread* thread = Thread::Current();
+  const auto& func = Function::Handle(lib.LookupFunctionAllowPrivate(
+      String::Handle(Symbols::New(thread, name))));
+  EXPECT(!func.IsNull());
+  return func.raw();
+}
+
+void Invoke(const Library& lib, const char* name) {
+  Thread* thread = Thread::Current();
+  Dart_Handle api_lib = Api::NewHandle(thread, lib.raw());
+  TransitionVMToNative transition(thread);
+  Dart_Handle result =
+      Dart_Invoke(api_lib, NewString(name), /*argc=*/0, /*argv=*/nullptr);
+  EXPECT_VALID(result);
+}
+
+FlowGraph* TestPipeline::RunPasses(
+    std::initializer_list<CompilerPass::Id> passes) {
+  auto thread = Thread::Current();
+  auto zone = thread->zone();
+  const bool optimized = true;
+  const intptr_t osr_id = Compiler::kNoOSRDeoptId;
+
+  auto pipeline = CompilationPipeline::New(zone, function_);
+
+  parsed_function_ = new (zone)
+      ParsedFunction(thread, Function::ZoneHandle(zone, function_.raw()));
+  pipeline->ParseFunction(parsed_function_);
+
+  // Extract type feedback before the graph is built, as the graph
+  // builder uses it to attach it to nodes.
+  ic_data_array_ = new (zone) ZoneGrowableArray<const ICData*>();
+  if (mode_ == CompilerPass::kJIT) {
+    function_.RestoreICDataMap(ic_data_array_, /*clone_ic_data=*/false);
+  }
+
+  flow_graph_ = pipeline->BuildFlowGraph(zone, parsed_function_, ic_data_array_,
+                                         osr_id, optimized);
+
+  if (mode_ == CompilerPass::kAOT) {
+    flow_graph_->PopulateWithICData(function_);
+  }
+
+  BlockScheduler block_scheduler(flow_graph_);
+  const bool reorder_blocks =
+      FlowGraph::ShouldReorderBlocks(function_, optimized);
+  if (mode_ == CompilerPass::kJIT && reorder_blocks) {
+    block_scheduler.AssignEdgeWeights();
+  }
+
+  SpeculativeInliningPolicy speculative_policy(/*enable_blacklist=*/false);
+  pass_state_ = new CompilerPassState(thread, flow_graph_, &speculative_policy);
+  pass_state_->block_scheduler = &block_scheduler;
+  pass_state_->reorder_blocks = reorder_blocks;
+
+  if (optimized) {
+    pass_state_->inline_id_to_function.Add(&function_);
+    // We do not add the token position now because we don't know the
+    // position of the inlined call until later. A side effect of this
+    // is that the length of |inline_id_to_function| is always larger
+    // than the length of |inline_id_to_token_pos| by one.
+    // Top scope function has no caller (-1). We do this because we expect
+    // all token positions to be at an inlined call.
+    pass_state_->caller_inline_id.Add(-1);
+
+    JitCallSpecializer jit_call_specializer(flow_graph_, &speculative_policy);
+    AotCallSpecializer aot_call_specializer(/*precompiler=*/nullptr,
+                                            flow_graph_, &speculative_policy);
+    if (mode_ == CompilerPass::kAOT) {
+      pass_state_->call_specializer = &aot_call_specializer;
+    } else {
+      pass_state_->call_specializer = &jit_call_specializer;
+    }
+
+    if (passes.size() > 0) {
+      CompilerPass::RunPipelineWithPasses(pass_state_, passes);
+    } else {
+      CompilerPass::RunPipeline(mode_, pass_state_);
+    }
+  }
+
+  return flow_graph_;
+}
+
+void TestPipeline::CompileGraphAndAttachFunction() {
+  Zone* zone = thread_->zone();
+  const bool optimized = true;
+
+  SpeculativeInliningPolicy speculative_policy(/*enable_blacklist=*/false);
+
+#if defined(TARGET_ARCH_X64) || defined(TARGET_ARCH_IA32) ||                   \
+    defined(TARGET_ARCH_DBC)
+  const bool use_far_branches = false;
+#else
+  const bool use_far_branches = true;
+#endif
+
+  ASSERT(pass_state_->inline_id_to_function.length() ==
+         pass_state_->caller_inline_id.length());
+  ObjectPoolBuilder object_pool_builder;
+  Assembler assembler(&object_pool_builder, use_far_branches);
+  FlowGraphCompiler graph_compiler(
+      &assembler, flow_graph_, *parsed_function_, optimized,
+      &speculative_policy, pass_state_->inline_id_to_function,
+      pass_state_->inline_id_to_token_pos, pass_state_->caller_inline_id,
+      ic_data_array_);
+
+  graph_compiler.CompileGraph();
+
+  const auto& deopt_info_array =
+      Array::Handle(zone, graph_compiler.CreateDeoptInfo(&assembler));
+  const auto pool_attachment = Code::PoolAttachment::kAttachPool;
+  const auto& code = Code::Handle(Code::FinalizeCode(
+      &graph_compiler, &assembler, pool_attachment, optimized, nullptr));
+  code.set_is_optimized(optimized);
+  code.set_owner(function_);
+
+  graph_compiler.FinalizePcDescriptors(code);
+  code.set_deopt_info_array(deopt_info_array);
+
+  graph_compiler.FinalizeStackMaps(code);
+  graph_compiler.FinalizeVarDescriptors(code);
+  graph_compiler.FinalizeExceptionHandlers(code);
+  graph_compiler.FinalizeCatchEntryMovesMap(code);
+  graph_compiler.FinalizeStaticCallTargetsTable(code);
+  graph_compiler.FinalizeCodeSourceMap(code);
+
+  if (optimized) {
+    function_.InstallOptimizedCode(code);
+  } else {
+    function_.set_unoptimized_code(code);
+    function_.AttachCode(code);
+  }
+
+  // We expect there to be no deoptimizations.
+  if (mode_ == CompilerPass::kAOT) {
+    // TODO(kustermann): Enable this once we get rid of [CheckedSmiSlowPath]s.
+    // EXPECT(deopt_info_array.IsNull() || deopt_info_array.Length() == 0);
+  }
+}
+
+bool ILMatcher::TryMatch(std::initializer_list<MatchCode> match_codes) {
+  std::vector<MatchCode> qcodes = match_codes;
+
+  if (trace_) {
+    OS::PrintErr("ILMatcher: Matching the following graph\n");
+    FlowGraphPrinter::PrintGraph("ILMatcher", flow_graph_);
+    OS::PrintErr("ILMatcher: Starting match at %s:\n", cursor_->ToCString());
+  }
+
+  Instruction* cursor = cursor_;
+  for (size_t i = 0; i < qcodes.size(); ++i) {
+    Instruction** capture = qcodes[i].capture_;
+    if (trace_) {
+      OS::PrintErr("  matching %30s @ %s\n",
+                   MatchOpCodeToCString(qcodes[i].opcode()),
+                   cursor->ToCString());
+    }
+
+    auto next = MatchInternal(qcodes, i, cursor);
+    if (next == nullptr) {
+      if (trace_) {
+        OS::PrintErr("  -> Match failed\n");
+      }
+      cursor = next;
+      break;
+    }
+    if (capture != nullptr) {
+      *capture = cursor;
+    }
+    cursor = next;
+  }
+  if (cursor != nullptr) {
+    cursor_ = cursor;
+    return true;
+  }
+  return false;
+}
+
+Instruction* ILMatcher::MatchInternal(std::vector<MatchCode> match_codes,
+                                      size_t i,
+                                      Instruction* cursor) {
+  const MatchOpCode opcode = match_codes[i].opcode();
+  if (opcode == kMatchAndMoveBranchTrue) {
+    auto branch = cursor->AsBranch();
+    if (branch == nullptr) return nullptr;
+    return branch->true_successor();
+  }
+  if (opcode == kMatchAndMoveBranchFalse) {
+    auto branch = cursor->AsBranch();
+    if (branch == nullptr) return nullptr;
+    return branch->false_successor();
+  }
+  if (opcode == kMoveAny) {
+    return cursor->next();
+  }
+  if (opcode == kMoveParallelMoves) {
+    while (cursor != nullptr && cursor->IsParallelMove()) {
+      cursor = cursor->next();
+    }
+    return cursor;
+  }
+
+  if (opcode == kMoveGlob) {
+    ASSERT((i + 1) < match_codes.size());
+    while (true) {
+      if (cursor == nullptr) return nullptr;
+      if (MatchInternal(match_codes, i + 1, cursor) != nullptr) {
+        return cursor;
+      }
+      if (auto as_goto = cursor->AsGoto()) {
+        cursor = as_goto->successor();
+      } else {
+        cursor = cursor->next();
+      }
+    }
+  }
+
+  if (opcode == kMatchAndMoveGoto) {
+    if (auto goto_instr = cursor->AsGoto()) {
+      return goto_instr->successor();
+    }
+  }
+
+  switch (opcode) {
+#define EMIT_CASE(Instruction, _)                                              \
+  case kMatch##Instruction: {                                                  \
+    if (cursor->Is##Instruction()) {                                           \
+      return cursor;                                                           \
+    }                                                                          \
+    return nullptr;                                                            \
+  }                                                                            \
+  case kMatchAndMove##Instruction: {                                           \
+    if (cursor->Is##Instruction()) {                                           \
+      return cursor->next();                                                   \
+    }                                                                          \
+    return nullptr;                                                            \
+  }                                                                            \
+  case kMatchAndMoveOptional##Instruction: {                                   \
+    if (cursor->Is##Instruction()) {                                           \
+      return cursor->next();                                                   \
+    }                                                                          \
+    return cursor;                                                             \
+  }
+    FOR_EACH_INSTRUCTION(EMIT_CASE)
+#undef EMIT_CASE
+    default:
+      UNREACHABLE();
+  }
+
+  UNREACHABLE();
+  return nullptr;
+}
+
+const char* ILMatcher::MatchOpCodeToCString(MatchOpCode opcode) {
+  if (opcode == kMatchAndMoveBranchTrue) {
+    return "kMatchAndMoveBranchTrue";
+  }
+  if (opcode == kMatchAndMoveBranchFalse) {
+    return "kMatchAndMoveBranchFalse";
+  }
+  if (opcode == kMoveAny) {
+    return "kMoveAny";
+  }
+  if (opcode == kMoveParallelMoves) {
+    return "kMoveParallelMoves";
+  }
+  if (opcode == kMoveGlob) {
+    return "kMoveGlob";
+  }
+
+  switch (opcode) {
+#define EMIT_CASE(Instruction, _)                                              \
+  case kMatch##Instruction:                                                    \
+    return "kMatch" #Instruction;                                              \
+  case kMatchAndMove##Instruction:                                             \
+    return "kMatchAndMove" #Instruction;                                       \
+  case kMatchAndMoveOptional##Instruction:                                     \
+    return "kMatchAndMoveOptional" #Instruction;
+    FOR_EACH_INSTRUCTION(EMIT_CASE)
+#undef EMIT_CASE
+    default:
+      UNREACHABLE();
+  }
+
+  UNREACHABLE();
+  return nullptr;
+}
+
+}  // namespace dart
diff --git a/runtime/vm/compiler/backend/il_test_helper.h b/runtime/vm/compiler/backend/il_test_helper.h
new file mode 100644
index 0000000..dc6385d
--- /dev/null
+++ b/runtime/vm/compiler/backend/il_test_helper.h
@@ -0,0 +1,319 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#ifndef RUNTIME_VM_COMPILER_BACKEND_IL_TEST_HELPER_H_
+#define RUNTIME_VM_COMPILER_BACKEND_IL_TEST_HELPER_H_
+
+#include <utility>
+#include <vector>
+
+#include "include/dart_api.h"
+
+#include "platform/allocation.h"
+#include "vm/compiler/backend/flow_graph.h"
+#include "vm/compiler/backend/il.h"
+#include "vm/compiler/compiler_pass.h"
+#include "vm/compiler/compiler_state.h"
+#include "vm/compiler/jit/compiler.h"
+#include "vm/unit_test.h"
+
+// The helpers in this file make it easier to write C++ unit tests which assert
+// that Dart code gets turned into certain IR.
+//
+// Here is an example on how to use it:
+//
+//     ISOLATE_UNIT_TEST_CASE(MyIRTest) {
+//       const char* script = R"(
+//           void foo() { ... }
+//           void main() { foo(); }
+//       )";
+//
+//       // Load the script and exercise the code once.
+//       const auto& lib = Library::Handle(LoadTestScript(script);
+//
+//       // Cause the code to be exercised once (to populate ICData).
+//       Invoke(lib, "main");
+//
+//       // Look up the function.
+//       const auto& function = Function::Handle(GetFunction(lib, "foo"));
+//
+//       // Run the JIT compilation pipeline with two passes.
+//       TestPipeline pipeline(function);
+//       FlowGraph* graph = pipeline.RunJITPasses("ComputeSSA,TypePropagation");
+//
+//       ...
+//     }
+//
+namespace dart {
+
+class FlowGraph;
+class Function;
+class Library;
+class RawFunction;
+class RawLibrary;
+
+RawLibrary* LoadTestScript(const char* script,
+                           Dart_NativeEntryResolver resolver = nullptr,
+                           const char* lib_uri = RESOLVED_USER_TEST_URI);
+
+RawFunction* GetFunction(const Library& lib, const char* name);
+
+void Invoke(const Library& lib, const char* name);
+
+class TestPipeline : public ValueObject {
+ public:
+  explicit TestPipeline(const Function& function,
+                        CompilerPass::PipelineMode mode)
+      : function_(function),
+        thread_(Thread::Current()),
+        compiler_state_(thread_),
+        mode_(mode) {}
+  ~TestPipeline() { delete pass_state_; }
+
+  // As a side-effect this will populate
+  //   - [ic_data_array_]
+  //   - [parsed_function_]
+  //   - [pass_state_]
+  //   - [flow_graph_]
+  FlowGraph* RunPasses(std::initializer_list<CompilerPass::Id> passes);
+
+  void CompileGraphAndAttachFunction();
+
+ private:
+  const Function& function_;
+  Thread* thread_;
+  CompilerState compiler_state_;
+  CompilerPass::PipelineMode mode_;
+  ZoneGrowableArray<const ICData*>* ic_data_array_ = nullptr;
+  ParsedFunction* parsed_function_ = nullptr;
+  CompilerPassState* pass_state_ = nullptr;
+  FlowGraph* flow_graph_ = nullptr;
+};
+
+// Match opcodes used for [ILMatcher], see below.
+enum MatchOpCode {
+// Emit a match and match-and-move code for every instruction.
+#define DEFINE_MATCH_OPCODES(Instruction, _)                                   \
+  kMatch##Instruction, kMatchAndMove##Instruction,                             \
+      kMatchAndMoveOptional##Instruction,
+  FOR_EACH_INSTRUCTION(DEFINE_MATCH_OPCODES)
+#undef DEFINE_MATCH_OPCODES
+
+  // Matches a branch and moves left.
+  kMatchAndMoveBranchTrue,
+
+  // Matches a branch and moves right.
+  kMatchAndMoveBranchFalse,
+
+  // Moves forward across any instruction.
+  kMoveAny,
+
+  // Moves over all parallel moves.
+  kMoveParallelMoves,
+
+  // Moves forward until the next match code matches.
+  kMoveGlob,
+};
+
+// Match codes used for [ILMatcher], see below.
+class MatchCode {
+ public:
+  MatchCode(MatchOpCode opcode)  // NOLINT
+      : opcode_(opcode), capture_(nullptr) {}
+
+  MatchCode(MatchOpCode opcode, Instruction** capture)
+      : opcode_(opcode), capture_(capture) {}
+
+#define DEFINE_TYPED_CONSTRUCTOR(Type, ignored)                                \
+  MatchCode(MatchOpCode opcode, Type##Instr** capture)                         \
+      : opcode_(opcode), capture_(reinterpret_cast<Instruction**>(capture)) {  \
+    RELEASE_ASSERT(opcode == kMatch##Type || opcode == kMatchAndMove##Type);   \
+  }
+  FOR_EACH_INSTRUCTION(DEFINE_TYPED_CONSTRUCTOR)
+#undef DEFINE_TYPED_CONSTRUCTOR
+
+  MatchOpCode opcode() { return opcode_; }
+
+ private:
+  friend class ILMatcher;
+
+  MatchOpCode opcode_;
+  Instruction** capture_;
+};
+
+// Used for matching a sequence of IL instructions including capturing support.
+//
+// Example:
+//
+//     TargetEntryInstr* entry = ....;
+//     BranchInstr* branch = nullptr;
+//
+//     ILMatcher matcher(flow_graph, entry);
+//     if (matcher.TryMatch({ kMoveGlob, {kMatchBranch, &branch}, })) {
+//       EXPECT(branch->operation_cid() == kMintCid);
+//       ...
+//     }
+//
+// This match will start at [entry], follow any number instructions (including
+// [GotoInstr]s until a [BranchInstr] is found).
+//
+// If the match was successful, this returns `true` and updates the current
+// value for the cursor.
+class ILMatcher : public ValueObject {
+ public:
+  ILMatcher(FlowGraph* flow_graph, Instruction* cursor, bool trace = true)
+      : flow_graph_(flow_graph),
+        cursor_(cursor),
+  // clang-format off
+#if !defined(PRODUCT)
+        trace_(trace) {}
+#else
+        trace_(false) {}
+#endif
+  // clang-format on
+
+  Instruction* value() { return cursor_; }
+
+  // From the current [value] according to match_codes.
+  //
+  // Returns `true` if the match was successful and cursor has been updated,
+  // otherwise returns `false`.
+  bool TryMatch(std::initializer_list<MatchCode> match_codes);
+
+ private:
+  Instruction* MatchInternal(std::vector<MatchCode> match_codes,
+                             size_t i,
+                             Instruction* cursor);
+
+  const char* MatchOpCodeToCString(MatchOpCode code);
+
+  FlowGraph* flow_graph_;
+  Instruction* cursor_;
+  bool trace_;
+};
+
+#if !defined(PRODUCT)
+#define ENTITY_TOCSTRING(v) ((v)->ToCString())
+#else
+#define ENTITY_TOCSTRING(v) "<?>"
+#endif
+
+// Helper to check various IL and object properties and informative error
+// messages if check fails. [entity] should be a pointer to a value.
+// [property] should be an expression which can refer to [entity] using
+// variable named [it].
+// [entity] is expected to have a ToCString() method in non-PRODUCT builds.
+#define EXPECT_PROPERTY(entity, property)                                      \
+  do {                                                                         \
+    auto& it = *entity;                                                        \
+    if (!(property)) {                                                         \
+      dart::Expect(__FILE__, __LINE__)                                         \
+          .Fail("expected " #property " for " #entity " which is %s.\n",       \
+                ENTITY_TOCSTRING(entity));                                     \
+    }                                                                          \
+  } while (0)
+
+class FlowGraphBuilderHelper {
+ public:
+  FlowGraphBuilderHelper()
+      : state_(CompilerState::Current()),
+        flow_graph_(MakeDummyGraph(Thread::Current())) {
+    flow_graph_.CreateCommonConstants();
+  }
+
+  TargetEntryInstr* TargetEntry(intptr_t try_index = kInvalidTryIndex) const {
+    return new TargetEntryInstr(flow_graph_.allocate_block_id(), try_index,
+                                state_.GetNextDeoptId());
+  }
+
+  JoinEntryInstr* JoinEntry(intptr_t try_index = kInvalidTryIndex) const {
+    return new JoinEntryInstr(flow_graph_.allocate_block_id(), try_index,
+                              state_.GetNextDeoptId());
+  }
+
+  ConstantInstr* IntConstant(int64_t value) const {
+    return flow_graph_.GetConstant(
+        Integer::Handle(Integer::New(value, Heap::kOld)));
+  }
+
+  ConstantInstr* DoubleConstant(double value) {
+    return flow_graph_.GetConstant(
+        Double::Handle(Double::New(value, Heap::kOld)));
+  }
+
+  PhiInstr* Phi(JoinEntryInstr* join,
+                std::initializer_list<std::pair<BlockEntryInstr*, Definition*>>
+                    incomming) {
+    auto phi = new PhiInstr(join, incomming.size());
+    for (size_t i = 0; i < incomming.size(); i++) {
+      auto input = new Value(flow_graph_.constant_dead());
+      phi->SetInputAt(i, input);
+      input->definition()->AddInputUse(input);
+    }
+    for (auto pair : incomming) {
+      pending_phis_.Add({phi, pair.first, pair.second});
+    }
+    return phi;
+  }
+
+  void FinishGraph() {
+    flow_graph_.DiscoverBlocks();
+    GrowableArray<BitVector*> dominance_frontier;
+    flow_graph_.ComputeDominators(&dominance_frontier);
+
+    for (auto& pending : pending_phis_) {
+      auto join = pending.phi->block();
+      EXPECT(pending.phi->InputCount() == join->PredecessorCount());
+      auto pred_index = join->IndexOfPredecessor(pending.pred);
+      EXPECT(pred_index != -1);
+      pending.phi->InputAt(pred_index)->BindTo(pending.defn);
+    }
+  }
+
+  FlowGraph* flow_graph() { return &flow_graph_; }
+
+ private:
+  static FlowGraph& MakeDummyGraph(Thread* thread) {
+    const Function& func = Function::ZoneHandle(Function::New(
+        String::Handle(Symbols::New(thread, "dummy")),
+        RawFunction::kRegularFunction,
+        /*is_static=*/true,
+        /*is_const=*/false,
+        /*is_abstract=*/false,
+        /*is_external=*/false,
+        /*is_native=*/true,
+        Class::Handle(thread->isolate()->object_store()->object_class()),
+        TokenPosition::kNoSource));
+
+    Zone* zone = thread->zone();
+    ParsedFunction* parsed_function = new (zone) ParsedFunction(thread, func);
+
+    parsed_function->SetNodeSequence(new SequenceNode(
+        TokenPosition::kNoSource, new LocalScope(nullptr, 0, 0)));
+
+    auto graph_entry =
+        new GraphEntryInstr(*parsed_function, Compiler::kNoOSRDeoptId);
+
+    const intptr_t block_id = 1;  // 0 is GraphEntry.
+    graph_entry->set_normal_entry(
+        new FunctionEntryInstr(graph_entry, block_id, kInvalidTryIndex,
+                               CompilerState::Current().GetNextDeoptId()));
+    return *new FlowGraph(*parsed_function, graph_entry, block_id,
+                          PrologueInfo{-1, -1});
+  }
+
+  CompilerState& state_;
+  FlowGraph& flow_graph_;
+
+  struct PendingPhiInput {
+    PhiInstr* phi;
+    BlockEntryInstr* pred;
+    Definition* defn;
+  };
+  GrowableArray<PendingPhiInput> pending_phis_;
+};
+
+}  // namespace dart
+
+#endif  // RUNTIME_VM_COMPILER_BACKEND_IL_TEST_HELPER_H_
diff --git a/runtime/vm/compiler/backend/il_x64.cc b/runtime/vm/compiler/backend/il_x64.cc
index aa045cf..af182c4 100644
--- a/runtime/vm/compiler/backend/il_x64.cc
+++ b/runtime/vm/compiler/backend/il_x64.cc
@@ -7,11 +7,13 @@
 
 #include "vm/compiler/backend/il.h"
 
+#include "vm/compiler/assembler/assembler.h"
 #include "vm/compiler/backend/flow_graph.h"
 #include "vm/compiler/backend/flow_graph_compiler.h"
 #include "vm/compiler/backend/locations.h"
 #include "vm/compiler/backend/locations_helpers.h"
 #include "vm/compiler/backend/range_analysis.h"
+#include "vm/compiler/ffi.h"
 #include "vm/compiler/jit/compiler.h"
 #include "vm/dart_entry.h"
 #include "vm/instructions.h"
@@ -72,7 +74,7 @@
   const intptr_t kNumTemps = 0;
   LocationSummary* locs = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
-  locs->set_in(0, Location::AnyOrConstant(value()));
+  locs->set_in(0, LocationAnyOrConstant(value()));
   return locs;
 }
 
@@ -87,7 +89,7 @@
       __ PushObject(value.constant());
     } else {
       ASSERT(value.IsStackSlot());
-      __ pushq(value.ToStackSlotAddress());
+      __ pushq(LocationToStackSlotAddress(value));
     }
   }
 }
@@ -241,7 +243,7 @@
   const intptr_t stack_index =
       compiler::target::frame_layout.FrameSlotForVariable(&local());
   return LocationSummary::Make(zone, kNumInputs,
-                               Location::StackSlot(stack_index),
+                               Location::StackSlot(stack_index, FPREG),
                                LocationSummary::kNoCall);
 }
 
@@ -319,16 +321,16 @@
       __ LoadObject(tmp, value_);
       __ movsd(XMM0, FieldAddress(tmp, Double::value_offset()));
     }
-    __ movsd(destination.ToStackSlotAddress(), XMM0);
+    __ movsd(LocationToStackSlotAddress(destination), XMM0);
   } else {
     ASSERT(destination.IsStackSlot());
     if (representation() == kUnboxedInt32 ||
         representation() == kUnboxedInt64) {
       const int64_t value = Integer::Cast(value_).AsInt64Value();
-      __ movq(destination.ToStackSlotAddress(), Immediate(value));
+      __ movq(LocationToStackSlotAddress(destination), Immediate(value));
     } else {
       ASSERT(representation() == kTagged);
-      __ StoreObject(destination.ToStackSlotAddress(), value_);
+      __ StoreObject(LocationToStackSlotAddress(destination), value_);
     }
   }
 }
@@ -523,13 +525,13 @@
     const intptr_t kNumTemps = 0;
     LocationSummary* locs = new (zone)
         LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
-    locs->set_in(0, Location::RegisterOrConstant(left()));
+    locs->set_in(0, LocationRegisterOrConstant(left()));
     // Only one input can be a constant operand. The case of two constant
     // operands should be handled by constant propagation.
     // Only right can be a stack slot.
     locs->set_in(1, locs->in(0).IsConstant()
                         ? Location::RequiresRegister()
-                        : Location::RegisterOrConstant(right()));
+                        : LocationRegisterOrConstant(right()));
     locs->set_out(0, Location::RequiresRegister());
     return locs;
   }
@@ -630,7 +632,7 @@
       __ CompareObject(left.reg(), right.constant());
     }
   } else if (right.IsStackSlot()) {
-    __ cmpq(left.reg(), right.ToStackSlotAddress());
+    __ cmpq(left.reg(), LocationToStackSlotAddress(right));
   } else {
     __ cmpq(left.reg(), right.reg());
   }
@@ -718,7 +720,7 @@
   locs->set_in(0, Location::RequiresRegister());
   // Only one input can be a constant operand. The case of two constant
   // operands should be handled by constant propagation.
-  locs->set_in(1, Location::RegisterOrConstant(right()));
+  locs->set_in(1, LocationRegisterOrConstant(right()));
   return locs;
 }
 
@@ -806,12 +808,12 @@
   if (operation_cid() == kSmiCid || operation_cid() == kMintCid) {
     LocationSummary* summary = new (zone)
         LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
-    summary->set_in(0, Location::RegisterOrConstant(left()));
+    summary->set_in(0, LocationRegisterOrConstant(left()));
     // Only one input can be a constant operand. The case of two constant
     // operands should be handled by constant propagation.
     summary->set_in(1, summary->in(0).IsConstant()
                            ? Location::RequiresRegister()
-                           : Location::RegisterOrConstant(right()));
+                           : LocationRegisterOrConstant(right()));
     summary->set_out(0, Location::RequiresRegister());
     return summary;
   }
@@ -877,6 +879,82 @@
   __ Drop(ArgumentCount());  // Drop the arguments.
 }
 
+void FfiCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+  Register saved_fp = locs()->temp(0).reg();
+  Register target_address = locs()->in(TargetAddressIndex()).reg();
+
+  // Save frame pointer because we're going to update it when we enter the exit
+  // frame.
+  __ movq(saved_fp, FPREG);
+
+  // Make a space to put the return address.
+  __ pushq(Immediate(0));
+
+  // We need to create a dummy "exit frame". It will share the same pool pointer
+  // but have a null code object.
+  __ LoadObject(CODE_REG, Object::null_object());
+  __ set_constant_pool_allowed(false);
+  __ EnterDartFrame(compiler::ffi::NumStackSlots(arg_locations_) * kWordSize,
+                    PP);
+
+  // Align frame before entering C++ world.
+  if (OS::ActivationFrameAlignment() > 1) {
+    __ andq(SPREG, Immediate(~(OS::ActivationFrameAlignment() - 1)));
+  }
+
+  for (intptr_t i = 0, n = NativeArgCount(); i < n; ++i) {
+    Location origin = locs()->in(i);
+    Location target = arg_locations_[i];
+
+    if (target.IsStackSlot()) {
+      if (origin.IsRegister()) {
+        __ movq(LocationToStackSlotAddress(target), origin.reg());
+      } else if (origin.IsFpuRegister()) {
+        __ movq(TMP, origin.fpu_reg());
+        __ movq(LocationToStackSlotAddress(target), TMP);
+      } else if (origin.IsStackSlot() || origin.IsDoubleStackSlot()) {
+        // The base register cannot be SPREG because we've moved it.
+        ASSERT(origin.base_reg() == FPREG);
+        __ movq(TMP, Address(saved_fp, origin.ToStackSlotOffset()));
+        __ movq(LocationToStackSlotAddress(target), TMP);
+      }
+    } else {
+      ASSERT(origin.Equals(target));
+    }
+  }
+
+  // We need to copy a dummy return address up into the dummy stack frame so the
+  // stack walker will know which safepoint to use. RIP points to the *next*
+  // instruction, so 'AddressRIPRelative' loads the address of the following
+  // 'movq'.
+  __ leaq(TMP, Address::AddressRIPRelative(0));
+  compiler->EmitCallsiteMetadata(TokenPosition::kNoSource, DeoptId::kNone,
+                                 RawPcDescriptors::Kind::kOther, locs());
+  __ movq(Address(FPREG, kSavedCallerPcSlotFromFp * kWordSize), TMP);
+
+  // Update information in the thread object and enter a safepoint.
+  __ TransitionGeneratedToNative(target_address);
+
+  __ CallCFunction(target_address);
+
+  // Update information in the thread object and leave the safepoint.
+  __ TransitionNativeToGenerated();
+
+  // Although PP is a callee-saved register, it may have been moved by the GC.
+  __ LeaveDartFrame(compiler::kRestoreCallerPP);
+
+  // Restore the global object pool after returning from runtime (old space is
+  // moving, so the GOP could have been relocated).
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    __ movq(PP, Address(THR, Thread::global_object_pool_offset()));
+  }
+
+  __ set_constant_pool_allowed(true);
+
+  // Instead of returning to the "fake" return address, we just pop it.
+  __ popq(TMP);
+}
+
 static bool CanBeImmediateIndex(Value* index, intptr_t cid) {
   if (!index->definition()->IsConstant()) return false;
   const Object& constant = index->definition()->AsConstant()->value();
@@ -974,6 +1052,10 @@
   }
 }
 
+DEFINE_BACKEND(StoreUntagged, (NoLocation, Register obj, Register value)) {
+  __ movq(Address(obj, instr->offset_from_tagged()), value);
+}
+
 LocationSummary* LoadClassIdInstr::MakeLocationSummary(Zone* zone,
                                                        bool opt) const {
   const intptr_t kNumInputs = 1;
@@ -1399,7 +1481,7 @@
     case kArrayCid:
       locs->set_in(2, ShouldEmitStoreBarrier()
                           ? Location::RegisterLocation(kWriteBarrierValueReg)
-                          : Location::RegisterOrConstant(value()));
+                          : LocationRegisterOrConstant(value()));
       if (ShouldEmitStoreBarrier()) {
         locs->set_in(0, Location::RegisterLocation(kWriteBarrierObjectReg));
         locs->set_temp(0, Location::RegisterLocation(kWriteBarrierSlotReg));
@@ -1413,7 +1495,7 @@
     case kOneByteStringCid:
       // TODO(fschneider): Add location constraint for byte registers (RAX,
       // RBX, RCX, RDX) instead of using a fixed register.
-      locs->set_in(2, Location::FixedRegisterOrSmiConstant(value(), RAX));
+      locs->set_in(2, LocationFixedRegisterOrSmiConstant(value(), RAX));
       break;
     case kTypedDataInt16ArrayCid:
     case kTypedDataUint16ArrayCid:
@@ -1669,10 +1751,7 @@
         __ movw(field_nullability_operand, Immediate(value_cid));
       }
 
-      if (deopt == NULL) {
-        ASSERT(!compiler->is_optimizing());
-        __ jmp(&ok);
-      }
+      __ jmp(&ok);
     }
 
     if (deopt == NULL) {
@@ -1687,6 +1766,8 @@
       __ pushq(value_reg);
       __ CallRuntime(kUpdateFieldCidRuntimeEntry, 2);
       __ Drop(2);  // Drop the field and the value.
+    } else {
+      __ jmp(fail);
     }
   } else {
     ASSERT(compiler->is_optimizing());
@@ -1854,7 +1935,9 @@
   }
 
   // Get the state.
-  __ LoadObject(temp, Field::ZoneHandle(compiler->zone(), field().Original()));
+  const Field& original =
+      Field::ZoneHandle(compiler->zone(), field().Original());
+  __ LoadObject(temp, original);
   __ movsxb(temp,
             FieldAddress(temp, Field::static_type_exactness_state_offset()));
 
@@ -1883,7 +1966,7 @@
     __ j(EQUAL, &ok);
 
     __ Bind(&call_runtime);
-    __ PushObject(field());
+    __ PushObject(original);
     __ pushq(value_reg);
     __ CallRuntime(kUpdateFieldCidRuntimeEntry, 2);
     __ Drop(2);
@@ -1919,7 +2002,7 @@
   } else {
     summary->set_in(1, ShouldEmitStoreBarrier()
                            ? Location::RegisterLocation(kWriteBarrierValueReg)
-                           : Location::RegisterOrConstant(value()));
+                           : LocationRegisterOrConstant(value()));
   }
   return summary;
 }
@@ -3275,7 +3358,7 @@
     LocationSummary* summary = new (zone)
         LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
     summary->set_in(0, Location::RequiresRegister());
-    summary->set_in(1, Location::FixedRegisterOrSmiConstant(right(), RCX));
+    summary->set_in(1, LocationFixedRegisterOrSmiConstant(right(), RCX));
     summary->set_out(0, Location::SameAsFirstInput());
     return summary;
   } else if (op_kind() == Token::kSHL) {
@@ -3286,7 +3369,7 @@
     LocationSummary* summary = new (zone)
         LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
     summary->set_in(0, Location::RequiresRegister());
-    summary->set_in(1, Location::FixedRegisterOrSmiConstant(right(), RCX));
+    summary->set_in(1, LocationFixedRegisterOrSmiConstant(right(), RCX));
     if (kNumTemps == 1) {
       summary->set_temp(0, Location::RequiresRegister());
     }
@@ -3299,7 +3382,7 @@
     summary->set_in(0, Location::RequiresRegister());
     ConstantInstr* constant = right()->definition()->AsConstant();
     if (constant != NULL) {
-      summary->set_in(1, Location::RegisterOrSmiConstant(right()));
+      summary->set_in(1, LocationRegisterOrSmiConstant(right()));
     } else {
       summary->set_in(1, Location::PrefersRegister());
     }
@@ -3399,7 +3482,7 @@
   }  // locs()->in(1).IsConstant().
 
   if (locs()->in(1).IsStackSlot()) {
-    const Address& right = locs()->in(1).ToStackSlotAddress();
+    const Address& right = LocationToStackSlotAddress(locs()->in(1));
     switch (op_kind()) {
       case Token::kADD: {
         __ addq(left, right);
@@ -3512,10 +3595,12 @@
       __ SmiUntag(right);
       __ cqo();         // Sign extend RAX -> RDX:RAX.
       __ idivq(right);  //  RAX: quotient, RDX: remainder.
-      // Check the corner case of dividing the 'MIN_SMI' with -1, in which
-      // case we cannot tag the result.
-      __ CompareImmediate(result, Immediate(0x4000000000000000));
-      __ j(EQUAL, deopt);
+      if (RangeUtils::Overlaps(right_range(), -1, -1)) {
+        // Check the corner case of dividing the 'MIN_SMI' with -1, in which
+        // case we cannot tag the result.
+        __ CompareImmediate(result, Immediate(0x4000000000000000));
+        __ j(EQUAL, deopt);
+      }
       __ Bind(&done);
       __ SmiTag(result);
       break;
@@ -3696,6 +3781,11 @@
     case kUnboxedDouble:
       __ movsd(FieldAddress(out_reg, ValueOffset()), value);
       break;
+    case kUnboxedFloat: {
+      __ cvtss2sd(FpuTMP, value);
+      __ movsd(FieldAddress(out_reg, ValueOffset()), FpuTMP);
+      break;
+    }
     case kUnboxedFloat32x4:
     case kUnboxedFloat64x2:
     case kUnboxedInt32x4:
@@ -3717,7 +3807,7 @@
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
   summary->set_in(0, needs_writable_input ? Location::WritableRegister()
                                           : Location::RequiresRegister());
-  if (representation() == kUnboxedInt64) {
+  if (representation() == kUnboxedInt64 || representation() == kUnboxedInt32) {
     summary->set_out(0, Location::SameAsFirstInput());
   } else {
     summary->set_out(0, Location::RequiresFpuRegister());
@@ -3741,6 +3831,13 @@
       break;
     }
 
+    case kUnboxedFloat: {
+      const FpuRegister result = locs()->out(0).fpu_reg();
+      __ movsd(result, FieldAddress(box, ValueOffset()));
+      __ cvtsd2ss(result, result);
+      break;
+    }
+
     case kUnboxedFloat32x4:
     case kUnboxedFloat64x2:
     case kUnboxedInt32x4: {
@@ -3779,6 +3876,17 @@
   }
 }
 
+void UnboxInstr::EmitLoadInt32FromBoxOrSmi(FlowGraphCompiler* compiler) {
+  const Register value = locs()->in(0).reg();
+  const Register result = locs()->out(0).reg();
+  ASSERT(value == result);
+  Label done;
+  __ SmiUntag(value);
+  __ j(NOT_CARRY, &done, Assembler::kNearJump);
+  __ movsxw(result, Address(value, TIMES_2, Mint::value_offset()));
+  __ Bind(&done);
+}
+
 void UnboxInstr::EmitLoadInt64FromBoxOrSmi(FlowGraphCompiler* compiler) {
   const Register value = locs()->in(0).reg();
   const Register result = locs()->out(0).reg();
@@ -5260,8 +5368,8 @@
   const intptr_t kNumTemps = 0;
   LocationSummary* locs = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
-  locs->set_in(kLengthPos, Location::RegisterOrSmiConstant(length()));
-  locs->set_in(kIndexPos, Location::RegisterOrSmiConstant(index()));
+  locs->set_in(kLengthPos, LocationRegisterOrSmiConstant(length()));
+  locs->set_in(kIndexPos, LocationRegisterOrSmiConstant(index()));
   return locs;
 }
 
@@ -5544,7 +5652,7 @@
       LocationSummary* summary = new (zone) LocationSummary(
           zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
       summary->set_in(0, Location::RequiresRegister());
-      summary->set_in(1, Location::RegisterOrConstant(right()));
+      summary->set_in(1, LocationRegisterOrConstant(right()));
       summary->set_out(0, Location::SameAsFirstInput());
       return summary;
     }
@@ -5731,7 +5839,7 @@
       zone, kNumInputs, kNumTemps, LocationSummary::kCallOnSlowPath);
   summary->set_in(0, Location::RequiresRegister());
   summary->set_in(1, RangeUtils::IsPositive(shift_range())
-                         ? Location::FixedRegisterOrConstant(right(), RCX)
+                         ? LocationFixedRegisterOrConstant(right(), RCX)
                          : Location::RegisterLocation(RCX));
   summary->set_out(0, Location::SameAsFirstInput());
   return summary;
@@ -5777,7 +5885,7 @@
   LocationSummary* summary = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
   summary->set_in(0, Location::RequiresRegister());
-  summary->set_in(1, Location::FixedRegisterOrSmiConstant(right(), RCX));
+  summary->set_in(1, LocationFixedRegisterOrSmiConstant(right(), RCX));
   summary->set_out(0, Location::SameAsFirstInput());
   return summary;
 }
@@ -5851,7 +5959,7 @@
       zone, kNumInputs, kNumTemps, LocationSummary::kCallOnSlowPath);
   summary->set_in(0, Location::RequiresRegister());
   summary->set_in(1, RangeUtils::IsPositive(shift_range())
-                         ? Location::FixedRegisterOrConstant(right(), RCX)
+                         ? LocationFixedRegisterOrConstant(right(), RCX)
                          : Location::RegisterLocation(RCX));
   summary->set_out(0, Location::SameAsFirstInput());
   return summary;
@@ -5896,7 +6004,7 @@
   LocationSummary* summary = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
   summary->set_in(0, Location::RequiresRegister());
-  summary->set_in(1, Location::FixedRegisterOrSmiConstant(right(), RCX));
+  summary->set_in(1, LocationFixedRegisterOrSmiConstant(right(), RCX));
   summary->set_out(0, Location::SameAsFirstInput());
   return summary;
 }
@@ -6021,30 +6129,40 @@
 
 DEFINE_UNIMPLEMENTED_INSTRUCTION(BinaryInt32OpInstr)
 
-LocationSummary* UnboxedIntConverterInstr::MakeLocationSummary(Zone* zone,
-                                                               bool opt) const {
+LocationSummary* IntConverterInstr::MakeLocationSummary(Zone* zone,
+                                                        bool opt) const {
   const intptr_t kNumInputs = 1;
   const intptr_t kNumTemps = 0;
   LocationSummary* summary = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
-  if (from() == kUnboxedInt64) {
-    ASSERT((to() == kUnboxedUint32) || (to() == kUnboxedInt32));
-    summary->set_in(0, Location::RequiresRegister());
-    summary->set_out(0, Location::SameAsFirstInput());
+  if (from() == kUntagged || to() == kUntagged) {
+    ASSERT((from() == kUntagged && to() == kUnboxedIntPtr) ||
+           (from() == kUnboxedIntPtr && to() == kUntagged));
+    ASSERT(!CanDeoptimize());
+  } else if (from() == kUnboxedInt64) {
+    ASSERT(to() == kUnboxedUint32 || to() == kUnboxedInt32);
   } else if (to() == kUnboxedInt64) {
-    ASSERT((from() == kUnboxedInt32) || (from() == kUnboxedUint32));
-    summary->set_in(0, Location::RequiresRegister());
-    summary->set_out(0, Location::SameAsFirstInput());
+    ASSERT(from() == kUnboxedInt32 || from() == kUnboxedUint32);
   } else {
-    ASSERT((to() == kUnboxedUint32) || (to() == kUnboxedInt32));
-    ASSERT((from() == kUnboxedUint32) || (from() == kUnboxedInt32));
-    summary->set_in(0, Location::RequiresRegister());
-    summary->set_out(0, Location::SameAsFirstInput());
+    ASSERT(to() == kUnboxedUint32 || to() == kUnboxedInt32);
+    ASSERT(from() == kUnboxedUint32 || from() == kUnboxedInt32);
   }
+
+  summary->set_in(0, Location::RequiresRegister());
+  summary->set_out(0, Location::SameAsFirstInput());
+
   return summary;
 }
 
-void UnboxedIntConverterInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+void IntConverterInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+  const bool is_nop_conversion =
+      (from() == kUntagged && to() == kUnboxedIntPtr) ||
+      (from() == kUnboxedIntPtr && to() == kUntagged);
+  if (is_nop_conversion) {
+    ASSERT(locs()->in(0).reg() == locs()->out(0).reg());
+    return;
+  }
+
   if (from() == kUnboxedInt32 && to() == kUnboxedUint32) {
     const Register value = locs()->in(0).reg();
     const Register out = locs()->out(0).reg();
@@ -6065,7 +6183,7 @@
       __ j(NEGATIVE, deopt);
     }
   } else if (from() == kUnboxedInt64) {
-    ASSERT((to() == kUnboxedUint32) || (to() == kUnboxedInt32));
+    ASSERT(to() == kUnboxedUint32 || to() == kUnboxedInt32);
     const Register value = locs()->in(0).reg();
     const Register out = locs()->out(0).reg();
     if (!CanDeoptimize()) {
@@ -6098,6 +6216,49 @@
   }
 }
 
+LocationSummary* UnboxedWidthExtenderInstr::MakeLocationSummary(
+    Zone* zone,
+    bool is_optimizing) const {
+  const intptr_t kNumTemps = 0;
+  LocationSummary* summary = new (zone)
+      LocationSummary(zone, /*num_inputs=*/InputCount(),
+                      /*num_temps=*/kNumTemps, LocationSummary::kNoCall);
+  summary->set_in(0, Location::RegisterLocation(RAX));
+  summary->set_out(0, Location::RegisterLocation(RAX));
+  return summary;
+}
+
+void UnboxedWidthExtenderInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+  switch (representation_) {
+    case kUnboxedInt32:  // Sign extend operand.
+      switch (from_width_bytes_) {
+        case 1:
+          __ movsxb(RAX, RAX);
+          break;
+        case 2:
+          __ movsxw(RAX, RAX);
+          break;
+        default:
+          UNREACHABLE();
+      }
+      break;
+    case kUnboxedUint32:  // Zero extend operand.
+      switch (from_width_bytes_) {
+        case 1:
+          __ movzxb(RAX, RAX);
+          break;
+        case 2:
+          __ movzxw(RAX, RAX);
+          break;
+        default:
+          UNREACHABLE();
+      }
+      break;
+    default:
+      UNREACHABLE();
+  }
+}
+
 LocationSummary* ThrowInstr::MakeLocationSummary(Zone* zone, bool opt) const {
   return new (zone) LocationSummary(zone, 0, 0, LocationSummary::kCall);
 }
@@ -6213,12 +6374,12 @@
   }
   LocationSummary* locs = new (zone)
       LocationSummary(zone, kNumInputs, kNumTemps, LocationSummary::kNoCall);
-  locs->set_in(0, Location::RegisterOrConstant(left()));
+  locs->set_in(0, LocationRegisterOrConstant(left()));
   // Only one of the inputs can be a constant. Choose register if the first one
   // is a constant.
   locs->set_in(1, locs->in(0).IsConstant()
                       ? Location::RequiresRegister()
-                      : Location::RegisterOrConstant(right()));
+                      : LocationRegisterOrConstant(right()));
   locs->set_out(0, Location::RequiresRegister());
   return locs;
 }
@@ -6320,10 +6481,14 @@
 }
 
 void DebugStepCheckInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
+#ifdef PRODUCT
+  UNREACHABLE();
+#else
   ASSERT(!compiler->is_optimizing());
   __ CallPatchable(StubCode::DebugStepCheck());
   compiler->AddCurrentDescriptor(stub_kind_, deopt_id_, token_pos());
   compiler->RecordSafepoint(locs());
+#endif
 }
 
 }  // namespace dart
diff --git a/runtime/vm/compiler/backend/inliner.cc b/runtime/vm/compiler/backend/inliner.cc
index 159a903..8a7550f 100644
--- a/runtime/vm/compiler/backend/inliner.cc
+++ b/runtime/vm/compiler/backend/inliner.cc
@@ -10,6 +10,7 @@
 #include "vm/compiler/aot/precompiler.h"
 #include "vm/compiler/backend/block_scheduler.h"
 #include "vm/compiler/backend/branch_optimizer.h"
+#include "vm/compiler/backend/flow_graph_checker.h"
 #include "vm/compiler/backend/flow_graph_compiler.h"
 #include "vm/compiler/backend/il_printer.h"
 #include "vm/compiler/backend/type_propagator.h"
@@ -535,8 +536,11 @@
         if (!function.always_inline() && !function.IsRecognized()) {
           return false;
         }
-        static constexpr intptr_t kAvgListedMethodSize = 20;
-        instruction_count += (inl_size == 0 ? kAvgListedMethodSize : inl_size);
+        if (!function.always_inline()) {
+          static constexpr intptr_t kAvgListedMethodSize = 20;
+          instruction_count +=
+              (inl_size == 0 ? kAvgListedMethodSize : inl_size);
+        }
       }
     }
   }
@@ -1059,6 +1063,10 @@
         {
           callee_graph = builder.BuildGraph();
 
+#if defined(DEBUG)
+          FlowGraphChecker(callee_graph).Check();
+#endif
+
           CalleeGraphValidator::Validate(callee_graph);
         }
 #if defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_DBC) &&                  \
@@ -1066,15 +1074,14 @@
         if (FLAG_precompiled_mode) {
           callee_graph->PopulateWithICData(parsed_function->function());
         }
-#else
+#endif
+
         // If we inline a function which is intrinsified without a fall-through
         // to IR code, we will not have any ICData attached, so we do it
         // manually here.
-        if (function.is_intrinsic()) {
+        if (!FLAG_precompiled_mode && function.is_intrinsic()) {
           callee_graph->PopulateWithICData(parsed_function->function());
         }
-#endif  // defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_DBC) &&           \
-    // !defined(TARGET_ARCH_IA32)
 
         // The parameter stubs are a copy of the actual arguments providing
         // concrete information about the values, for example constant values,
@@ -2554,19 +2561,30 @@
         break;
       }
       case kTypedDataInt8ArrayCid:
+        FALL_THROUGH;
       case kTypedDataUint8ArrayCid:
+        FALL_THROUGH;
       case kTypedDataUint8ClampedArrayCid:
+        FALL_THROUGH;
       case kExternalTypedDataUint8ArrayCid:
+        FALL_THROUGH;
       case kExternalTypedDataUint8ClampedArrayCid:
+        FALL_THROUGH;
       case kTypedDataInt16ArrayCid:
+        FALL_THROUGH;
       case kTypedDataUint16ArrayCid:
+        FALL_THROUGH;
       case kTypedDataInt32ArrayCid:
+        FALL_THROUGH;
       case kTypedDataUint32ArrayCid:
+        FALL_THROUGH;
       case kTypedDataInt64ArrayCid:
+        FALL_THROUGH;
       case kTypedDataUint64ArrayCid:
         ASSERT(value_type.IsIntType());
-      // Fall through.
+        FALL_THROUGH;
       case kTypedDataFloat32ArrayCid:
+        FALL_THROUGH;
       case kTypedDataFloat64ArrayCid: {
         type_args = flow_graph->constant_null();
         ASSERT((array_cid != kTypedDataFloat32ArrayCid &&
@@ -2844,59 +2862,25 @@
 
 // Emits preparatory code for a typed getter/setter.
 // Handles three cases:
-//   (1) dynamic:  generates a conditional on the receiver cid
-//                 that handles external (load untagged) and
-//                 internal storage at runtime.
-//   (2) external: generates load untagged.
+//   (1) dynamic:  generates load untagged (internal or external)
+//   (2) external: generates load untagged
 //   (3) internal: no code required.
 static void PrepareInlineByteArrayBaseOp(FlowGraph* flow_graph,
                                          Instruction* call,
                                          Definition* receiver,
                                          intptr_t array_cid,
                                          Definition** array,
-                                         Instruction** cursor,
-                                         TargetEntryInstr** block_external,
-                                         TargetEntryInstr** block_internal) {
-  if (array_cid == kDynamicCid) {
-    // Dynamic case:   runtime resolution between external/internal typed data.
-    //                 cid = LoadCid
-    //                 if cid in [ kExternalTypedDataInt8ArrayCid,
-    //                             kExternalTypedDataFloat64x2ArrayCid ]
-    // block_external: LoadUntagged
-    //                 ..
-    //                 else
-    // block_internal: ..
-    //
-    // TODO(ajcbik): as suggested above, subtract + single unsigned test.
-    //
-    LoadClassIdInstr* load_cid =
-        new (Z) LoadClassIdInstr(new (Z) Value(receiver));
-    *cursor = flow_graph->AppendTo(*cursor, load_cid, NULL, FlowGraph::kValue);
-    ConstantInstr* cid_lo = flow_graph->GetConstant(
-        Smi::ZoneHandle(Smi::New(kExternalTypedDataInt8ArrayCid)));
-    RelationalOpInstr* le_lo = new (Z)
-        RelationalOpInstr(call->token_pos(), Token::kLTE, new (Z) Value(cid_lo),
-                          new (Z) Value(load_cid), kSmiCid, call->deopt_id());
-    ConstantInstr* cid_hi = flow_graph->GetConstant(
-        Smi::ZoneHandle(Smi::New(kExternalTypedDataFloat64x2ArrayCid)));
-    RelationalOpInstr* le_hi = new (Z) RelationalOpInstr(
-        call->token_pos(), Token::kLTE, new (Z) Value(load_cid),
-        new (Z) Value(cid_hi), kSmiCid, call->deopt_id());
-    *cursor = flow_graph->NewDiamond(*cursor, call,
-                                     FlowGraph::LogicalAnd(le_lo, le_hi),
-                                     block_external, block_internal);
-    LoadUntaggedInstr* elements = new (Z) LoadUntaggedInstr(
-        new (Z) Value(*array), ExternalTypedData::data_offset());
-    flow_graph->InsertAfter(*block_external, elements, NULL, FlowGraph::kValue);
-    *array = elements;  // return load untagged definition in array
-  } else if (RawObject::IsExternalTypedDataClassId(array_cid)) {
-    // External typed data: load untagged.
-    LoadUntaggedInstr* elements = new (Z) LoadUntaggedInstr(
-        new (Z) Value(*array), ExternalTypedData::data_offset());
+                                         Instruction** cursor) {
+  if (array_cid == kDynamicCid ||
+      RawObject::IsExternalTypedDataClassId(array_cid)) {
+    // Internal or External typed data: load untagged.
+    auto elements = new (Z) LoadUntaggedInstr(
+        new (Z) Value(*array), TypedDataBase::data_field_offset());
     *cursor = flow_graph->AppendTo(*cursor, elements, NULL, FlowGraph::kValue);
     *array = elements;
   } else {
     // Internal typed data: no action.
+    ASSERT(RawObject::IsTypedDataClassId(array_cid));
   }
 }
 
@@ -2954,33 +2938,11 @@
   // Generates a template for the load, either a dynamic conditional
   // that dispatches on external and internal storage, or a single
   // case that deals with either external or internal storage.
-  TargetEntryInstr* block_external = nullptr;
-  TargetEntryInstr* block_internal = nullptr;
   PrepareInlineByteArrayBaseOp(flow_graph, call, receiver, array_cid, &array,
-                               &cursor, &block_external, &block_internal);
+                               &cursor);
 
   // Fill out the generated template with loads.
-  if (array_cid == kDynamicCid) {
-    ASSERT(block_external != nullptr && block_internal != nullptr);
-    // Load from external in block_external and internal in block_internal
-    // (resolves (B)). The former loads from "array", which is the returned
-    // load untagged definition. The latter loads from the original "receiver".
-    LoadIndexedInstr* load1 = NewLoad(flow_graph, call, array, index, view_cid);
-    ASSERT(block_external->next() == array);
-    flow_graph->InsertAfter(
-        block_external->next(), load1,
-        call->deopt_id() != DeoptId::kNone ? call->env() : nullptr,
-        FlowGraph::kValue);
-    LoadIndexedInstr* load2 =
-        NewLoad(flow_graph, call, receiver, index, view_cid);
-    flow_graph->InsertAfter(
-        block_internal, load2,
-        call->deopt_id() != DeoptId::kNone ? call->env() : nullptr,
-        FlowGraph::kValue);
-    // Construct phi of external and internal load.
-    *last = flow_graph->AddPhi(cursor->AsJoinEntry(), load1, load2);
-  } else {
-    ASSERT(block_external == nullptr && block_internal == nullptr);
+  {
     // Load from either external or internal.
     LoadIndexedInstr* load = NewLoad(flow_graph, call, array, index, view_cid);
     flow_graph->AppendTo(
@@ -3170,31 +3132,11 @@
   // Generates a template for the store, either a dynamic conditional
   // that dispatches on external and internal storage, or a single
   // case that deals with either external or internal storage.
-  TargetEntryInstr* block_external = nullptr;
-  TargetEntryInstr* block_internal = nullptr;
   PrepareInlineByteArrayBaseOp(flow_graph, call, receiver, array_cid, &array,
-                               &cursor, &block_external, &block_internal);
+                               &cursor);
 
   // Fill out the generated template with stores.
-  if (array_cid == kDynamicCid) {
-    ASSERT(block_external != nullptr && block_internal != nullptr);
-    // Store to external in block_external and internal in block_internal
-    // (resolves (B)). The former stores to "array", which is the returned
-    // load untagged definition. The latter stores to the original "receiver".
-    ASSERT(block_external->next() == array);
-    flow_graph->InsertAfter(
-        block_external->next(),
-        NewStore(flow_graph, call, array, index, stored_value, view_cid),
-        call->deopt_id() != DeoptId::kNone ? call->env() : nullptr,
-        FlowGraph::kEffect);
-    flow_graph->InsertAfter(
-        block_internal,
-        NewStore(flow_graph, call, receiver, index, stored_value, view_cid),
-        call->deopt_id() != DeoptId::kNone ? call->env() : nullptr,
-        FlowGraph::kEffect);
-    *last = cursor;
-  } else {
-    ASSERT(block_external == nullptr && block_internal == nullptr);
+  {
     // Store on either external or internal.
     StoreIndexedInstr* store =
         NewStore(flow_graph, call, array, index, stored_value, view_cid);
@@ -4091,7 +4033,7 @@
                              call->GetBlock()->try_index(), DeoptId::kNone);
       (*entry)->InheritDeoptTarget(Z, call);
       ASSERT(!call->HasUses());
-      *last = NULL;  // Empty body.
+      *last = NULL;    // Empty body.
       *result = NULL;  // Since no uses of original call, result will be unused.
       return true;
     }
diff --git a/runtime/vm/compiler/backend/linearscan.cc b/runtime/vm/compiler/backend/linearscan.cc
index b09079d..4f5473c 100644
--- a/runtime/vm/compiler/backend/linearscan.cc
+++ b/runtime/vm/compiler/backend/linearscan.cc
@@ -675,10 +675,10 @@
       Location loc;
       switch (param->kind()) {
         case SpecialParameterInstr::kException:
-          loc = Location::ExceptionLocation();
+          loc = LocationExceptionLocation();
           break;
         case SpecialParameterInstr::kStackTrace:
-          loc = Location::StackTraceLocation();
+          loc = LocationStackTraceLocation();
           break;
         default:
           UNREACHABLE();
@@ -752,6 +752,9 @@
     if (param->base_reg() == FPREG) {
       slot_index =
           compiler::target::frame_layout.FrameSlotForVariableIndex(-slot_index);
+    } else {
+      ASSERT(param->base_reg() == SPREG);
+      slot_index += compiler::target::frame_layout.last_param_from_entry_sp;
     }
     range->set_assigned_location(
         Location::StackSlot(slot_index, param->base_reg()));
@@ -761,7 +764,7 @@
     ASSERT(param->kind() == SpecialParameterInstr::kArgDescriptor);
     Location loc;
 #if defined(TARGET_ARCH_DBC)
-    loc = Location::ArgumentsDescriptorLocation();
+    loc = LocationArgumentsDescriptorLocation();
 #else
     loc = Location::RegisterLocation(ARGS_DESC_REG);
 #endif  // defined(TARGET_ARCH_DBC)
@@ -824,8 +827,9 @@
 static Location::Kind RegisterKindForResult(Instruction* instr) {
   const Representation rep = instr->representation();
 #if !defined(TARGET_ARCH_DBC)
-  if ((rep == kUnboxedDouble) || (rep == kUnboxedFloat32x4) ||
-      (rep == kUnboxedInt32x4) || (rep == kUnboxedFloat64x2)) {
+  if ((rep == kUnboxedFloat) || (rep == kUnboxedDouble) ||
+      (rep == kUnboxedFloat32x4) || (rep == kUnboxedInt32x4) ||
+      (rep == kUnboxedFloat64x2)) {
     return Location::kFpuRegister;
   } else {
     return Location::kRegister;
@@ -1454,7 +1458,7 @@
 #if defined(DEBUG)
     // Verify that temps, inputs and output were specified as fixed
     // locations.  Every register is blocked now so attempt to
-    // allocate will not succeed.
+    // allocate will go on the stack.
     for (intptr_t j = 0; j < locs->temp_count(); j++) {
       ASSERT(!locs->temp(j).IsPairLocation());
       ASSERT(!locs->temp(j).IsUnallocated());
@@ -1463,10 +1467,13 @@
     for (intptr_t j = 0; j < locs->input_count(); j++) {
       if (locs->in(j).IsPairLocation()) {
         PairLocation* pair = locs->in_slot(j)->AsPairLocation();
-        ASSERT(!pair->At(0).IsUnallocated());
-        ASSERT(!pair->At(1).IsUnallocated());
+        ASSERT(!pair->At(0).IsUnallocated() ||
+               pair->At(0).policy() == Location::kAny);
+        ASSERT(!pair->At(1).IsUnallocated() ||
+               pair->At(1).policy() == Location::kAny);
       } else {
-        ASSERT(!locs->in(j).IsUnallocated());
+        ASSERT(!locs->in(j).IsUnallocated() ||
+               locs->in(j).policy() == Location::kAny);
       }
     }
 
@@ -2042,7 +2049,7 @@
   if (register_kind_ == Location::kRegister) {
     const intptr_t slot_index =
         compiler::target::frame_layout.FrameSlotForVariableIndex(-idx);
-    range->set_spill_slot(Location::StackSlot(slot_index));
+    range->set_spill_slot(Location::StackSlot(slot_index, FPREG));
   } else {
     // We use the index of the slot with the lowest address as an index for the
     // FPU register spill slot. In terms of indexes this relation is inverted:
@@ -2057,10 +2064,11 @@
         (range->representation() == kUnboxedInt32x4) ||
         (range->representation() == kUnboxedFloat64x2)) {
       ASSERT(need_quad);
-      location = Location::QuadStackSlot(slot_idx);
+      location = Location::QuadStackSlot(slot_idx, FPREG);
     } else {
-      ASSERT((range->representation() == kUnboxedDouble));
-      location = Location::DoubleStackSlot(slot_idx);
+      ASSERT(range->representation() == kUnboxedFloat ||
+             range->representation() == kUnboxedDouble);
+      location = Location::DoubleStackSlot(slot_idx, FPREG);
     }
     range->set_spill_slot(location);
   }
diff --git a/runtime/vm/compiler/backend/locations.cc b/runtime/vm/compiler/backend/locations.cc
index e549879..f705a15 100644
--- a/runtime/vm/compiler/backend/locations.cc
+++ b/runtime/vm/compiler/backend/locations.cc
@@ -27,7 +27,7 @@
   for (intptr_t i = 0; i < kNumberOfCpuRegisters; i++) {
     Register r = static_cast<Register>(i);
     if (ContainsRegister(r)) {
-      THR_Print("%s %s\n", Assembler::RegisterName(r),
+      THR_Print("%s %s\n", RegisterNames::RegisterName(r),
                 IsTagged(r) ? "tagged" : "untagged");
     }
   }
@@ -35,7 +35,7 @@
   for (intptr_t i = 0; i < kNumberOfFpuRegisters; i++) {
     FpuRegister r = static_cast<FpuRegister>(i);
     if (ContainsFpuRegister(r)) {
-      THR_Print("%s\n", Assembler::FpuRegisterName(r));
+      THR_Print("%s\n", RegisterNames::FpuRegisterName(r));
     }
   }
 }
@@ -70,56 +70,66 @@
   return summary;
 }
 
-Location Location::Pair(Location first, Location second) {
-  PairLocation* pair_location = new PairLocation();
+template <class Register, class FpuRegister>
+TemplateLocation<Register, FpuRegister>
+TemplateLocation<Register, FpuRegister>::Pair(
+    TemplateLocation<Register, FpuRegister> first,
+    TemplateLocation<Register, FpuRegister> second) {
+  TemplatePairLocation<TemplateLocation<Register, FpuRegister>>* pair_location =
+      new TemplatePairLocation<TemplateLocation<Register, FpuRegister>>();
   ASSERT((reinterpret_cast<intptr_t>(pair_location) & kLocationTagMask) == 0);
   pair_location->SetAt(0, first);
   pair_location->SetAt(1, second);
-  Location loc(reinterpret_cast<uword>(pair_location) | kPairLocationTag);
+  TemplateLocation<Register, FpuRegister> loc(
+      reinterpret_cast<uword>(pair_location) | kPairLocationTag);
   return loc;
 }
 
-PairLocation* Location::AsPairLocation() const {
+template <class Register, class FpuRegister>
+TemplatePairLocation<TemplateLocation<Register, FpuRegister>>*
+TemplateLocation<Register, FpuRegister>::AsPairLocation() const {
   ASSERT(IsPairLocation());
-  return reinterpret_cast<PairLocation*>(value_ & ~kLocationTagMask);
+  return reinterpret_cast<
+      TemplatePairLocation<TemplateLocation<Register, FpuRegister>>*>(
+      value_ & ~kLocationTagMask);
 }
 
-Location Location::RegisterOrConstant(Value* value) {
+Location LocationRegisterOrConstant(Value* value) {
   ConstantInstr* constant = value->definition()->AsConstant();
   return ((constant != NULL) && Assembler::IsSafe(constant->value()))
              ? Location::Constant(constant)
              : Location::RequiresRegister();
 }
 
-Location Location::RegisterOrSmiConstant(Value* value) {
+Location LocationRegisterOrSmiConstant(Value* value) {
   ConstantInstr* constant = value->definition()->AsConstant();
   return ((constant != NULL) && Assembler::IsSafeSmi(constant->value()))
              ? Location::Constant(constant)
              : Location::RequiresRegister();
 }
 
-Location Location::WritableRegisterOrSmiConstant(Value* value) {
+Location LocationWritableRegisterOrSmiConstant(Value* value) {
   ConstantInstr* constant = value->definition()->AsConstant();
   return ((constant != NULL) && Assembler::IsSafeSmi(constant->value()))
              ? Location::Constant(constant)
              : Location::WritableRegister();
 }
 
-Location Location::FixedRegisterOrConstant(Value* value, Register reg) {
+Location LocationFixedRegisterOrConstant(Value* value, Register reg) {
   ConstantInstr* constant = value->definition()->AsConstant();
   return ((constant != NULL) && Assembler::IsSafe(constant->value()))
              ? Location::Constant(constant)
              : Location::RegisterLocation(reg);
 }
 
-Location Location::FixedRegisterOrSmiConstant(Value* value, Register reg) {
+Location LocationFixedRegisterOrSmiConstant(Value* value, Register reg) {
   ConstantInstr* constant = value->definition()->AsConstant();
   return ((constant != NULL) && Assembler::IsSafeSmi(constant->value()))
              ? Location::Constant(constant)
              : Location::RegisterLocation(reg);
 }
 
-Location Location::AnyOrConstant(Value* value) {
+Location LocationAnyOrConstant(Value* value) {
   ConstantInstr* constant = value->definition()->AsConstant();
   return ((constant != NULL) && Assembler::IsSafe(constant->value()))
              ? Location::Constant(constant)
@@ -128,27 +138,30 @@
 
 // DBC does not have an notion of 'address' in its instruction set.
 #if !defined(TARGET_ARCH_DBC)
-Address Location::ToStackSlotAddress() const {
-  return Address(base_reg(), ToStackSlotOffset());
+Address LocationToStackSlotAddress(Location loc) {
+  return Address(loc.base_reg(), loc.ToStackSlotOffset());
 }
 #endif
 
-intptr_t Location::ToStackSlotOffset() const {
+template <class Register, class FpuRegister>
+intptr_t TemplateLocation<Register, FpuRegister>::ToStackSlotOffset() const {
   return stack_index() * kWordSize;
 }
 
-const Object& Location::constant() const {
+template <class Register, class FpuRegister>
+const Object& TemplateLocation<Register, FpuRegister>::constant() const {
   return constant_instruction()->value();
 }
 
-const char* Location::Name() const {
+template <class Register, class FpuRegister>
+const char* TemplateLocation<Register, FpuRegister>::Name() const {
   switch (kind()) {
     case kInvalid:
       return "?";
     case kRegister:
-      return Assembler::RegisterName(reg());
+      return RegisterNames::RegisterName(reg());
     case kFpuRegister:
-      return Assembler::FpuRegisterName(fpu_reg());
+      return RegisterNames::FpuRegisterName(fpu_reg());
     case kStackSlot:
       return "S";
     case kDoubleStackSlot:
@@ -195,7 +208,9 @@
   return "?";
 }
 
-void Location::PrintTo(BufferFormatter* f) const {
+template <class Register, class FpuRegister>
+void TemplateLocation<Register, FpuRegister>::PrintTo(
+    BufferFormatter* f) const {
   if (!FLAG_support_il_printer) {
     return;
   }
@@ -216,14 +231,16 @@
   }
 }
 
-const char* Location::ToCString() const {
+template <class Register, class FpuRegister>
+const char* TemplateLocation<Register, FpuRegister>::ToCString() const {
   char buffer[1024];
   BufferFormatter bf(buffer, 1024);
   PrintTo(&bf);
   return Thread::Current()->zone()->MakeCopyOfString(buffer);
 }
 
-void Location::Print() const {
+template <class Register, class FpuRegister>
+void TemplateLocation<Register, FpuRegister>::Print() const {
   if (kind() == kStackSlot) {
     THR_Print("S%+" Pd "", stack_index());
   } else {
@@ -231,46 +248,77 @@
   }
 }
 
-Location Location::Copy() const {
+template <class Register, class FpuRegister>
+TemplateLocation<Register, FpuRegister>
+TemplateLocation<Register, FpuRegister>::Copy() const {
   if (IsPairLocation()) {
-    PairLocation* pair = AsPairLocation();
+    TemplatePairLocation<TemplateLocation<Register, FpuRegister>>* pair =
+        AsPairLocation();
     ASSERT(!pair->At(0).IsPairLocation());
     ASSERT(!pair->At(1).IsPairLocation());
-    return Location::Pair(pair->At(0).Copy(), pair->At(1).Copy());
+    return TemplateLocation::Pair(pair->At(0).Copy(), pair->At(1).Copy());
   } else {
     // Copy by value.
     return *this;
   }
 }
 
-Location Location::RemapForSlowPath(Definition* def,
-                                    intptr_t* cpu_reg_slots,
-                                    intptr_t* fpu_reg_slots) const {
-  if (IsRegister()) {
-    intptr_t index = cpu_reg_slots[reg()];
+Location LocationArgumentsDescriptorLocation() {
+#ifdef TARGET_ARCH_DBC
+  return Location(Location::kSpecialDbcRegister, Location::kArgsDescriptorReg);
+#else
+  return Location::RegisterLocation(ARGS_DESC_REG);
+#endif
+}
+
+Location LocationExceptionLocation() {
+#ifdef TARGET_ARCH_DBC
+  return Location(Location::kSpecialDbcRegister, Location::kExceptionReg);
+#else
+  return Location::RegisterLocation(kExceptionObjectReg);
+#endif
+}
+
+Location LocationStackTraceLocation() {
+#ifdef TARGET_ARCH_DBC
+  return Location(Location::kSpecialDbcRegister, Location::kStackTraceReg);
+#else
+  return Location::RegisterLocation(kStackTraceObjectReg);
+#endif
+}
+
+Location LocationRemapForSlowPath(Location loc,
+                                  Definition* def,
+                                  intptr_t* cpu_reg_slots,
+                                  intptr_t* fpu_reg_slots) {
+  if (loc.IsRegister()) {
+    intptr_t index = cpu_reg_slots[loc.reg()];
     ASSERT(index >= 0);
     return Location::StackSlot(
-        compiler::target::frame_layout.FrameSlotForVariableIndex(-index));
-  } else if (IsFpuRegister()) {
-    intptr_t index = fpu_reg_slots[fpu_reg()];
+        compiler::target::frame_layout.FrameSlotForVariableIndex(-index),
+        FPREG);
+  } else if (loc.IsFpuRegister()) {
+    intptr_t index = fpu_reg_slots[loc.fpu_reg()];
     ASSERT(index >= 0);
     switch (def->representation()) {
       case kUnboxedDouble:
         return Location::DoubleStackSlot(
-            compiler::target::frame_layout.FrameSlotForVariableIndex(-index));
+            compiler::target::frame_layout.FrameSlotForVariableIndex(-index),
+            FPREG);
 
       case kUnboxedFloat32x4:
       case kUnboxedInt32x4:
       case kUnboxedFloat64x2:
         return Location::QuadStackSlot(
-            compiler::target::frame_layout.FrameSlotForVariableIndex(-index));
+            compiler::target::frame_layout.FrameSlotForVariableIndex(-index),
+            FPREG);
 
       default:
         UNREACHABLE();
     }
-  } else if (IsPairLocation()) {
+  } else if (loc.IsPairLocation()) {
     ASSERT(def->representation() == kUnboxedInt64);
-    PairLocation* value_pair = AsPairLocation();
+    PairLocation* value_pair = loc.AsPairLocation();
     intptr_t index_lo;
     intptr_t index_hi;
 
@@ -290,14 +338,14 @@
       index_hi = value_pair->At(1).stack_index();
     }
 
-    return Location::Pair(Location::StackSlot(index_lo),
-                          Location::StackSlot(index_hi));
-  } else if (IsInvalid() && def->IsMaterializeObject()) {
+    return Location::Pair(Location::StackSlot(index_lo, FPREG),
+                          Location::StackSlot(index_hi, FPREG));
+  } else if (loc.IsInvalid() && def->IsMaterializeObject()) {
     def->AsMaterializeObject()->RemapRegisters(cpu_reg_slots, fpu_reg_slots);
-    return *this;
+    return loc;
   }
 
-  return *this;
+  return loc;
 }
 
 void LocationSummary::PrintTo(BufferFormatter* f) const {
@@ -358,6 +406,14 @@
 }
 #endif
 
+template class TemplateLocation<dart::Register, dart::FpuRegister>;
+template class TemplatePairLocation<Location>;
+
+#if !defined(HOST_ARCH_EQUALS_TARGET_ARCH)
+template class TemplateLocation<dart::host::Register, dart::host::FpuRegister>;
+template class TemplatePairLocation<HostLocation>;
+#endif  // !defined(HOST_ARCH_EQUALS_TARGET_ARCH)
+
 }  // namespace dart
 
 #endif  // !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/compiler/backend/locations.h b/runtime/vm/compiler/backend/locations.h
index 9c76dd6..513d61b 100644
--- a/runtime/vm/compiler/backend/locations.h
+++ b/runtime/vm/compiler/backend/locations.h
@@ -9,20 +9,24 @@
 #include "vm/bitfield.h"
 #include "vm/bitmap.h"
 #include "vm/compiler/assembler/assembler.h"
+#include "vm/constants.h"
 
 namespace dart {
 
 class BufferFormatter;
 class ConstantInstr;
 class Definition;
-class PairLocation;
 class Value;
 
+template <class Location>
+class TemplatePairLocation;
+
 enum Representation {
   kNoRepresentation,
   kTagged,
   kUntagged,
   kUnboxedDouble,
+  kUnboxedFloat,
   kUnboxedInt32,
   kUnboxedUint32,
   kUnboxedInt64,
@@ -33,6 +37,20 @@
   kNumRepresentations
 };
 
+// 'UnboxedFfiIntPtr' should be able to hold a pointer of the target word-size.
+// On a 32-bit platform, it's an unsigned 32-bit int because it should be
+// zero-extended to 64-bits, not sign-extended (pointers are inherently
+// unsigned).
+//
+// Issue(36370): Use [kUnboxedIntPtr] instead.
+static constexpr Representation kUnboxedFfiIntPtr =
+    compiler::target::kWordSize == 4 ? kUnboxedUint32 : kUnboxedInt64;
+
+// The representation which can be used for native pointers. We use signed 32/64
+// bit representation to be able to do arithmetic on pointers.
+static constexpr Representation kUnboxedIntPtr =
+    compiler::target::kWordSize == 4 ? kUnboxedInt32 : kUnboxedInt64;
+
 // Location objects are used to connect register allocator and code generator.
 // Instruction templates used by code generator have a corresponding
 // LocationSummary object which specifies expected location for every input
@@ -47,7 +65,8 @@
 // are bitwise unequal then these two locations are guaranteed to be disjoint.
 // Properties like representation belong to the value that is stored in
 // the location not to the location itself.
-class Location : public ValueObject {
+template <class Register, class FpuRegister>
+class TemplateLocation : public ValueObject {
  private:
   enum {
     // Number of bits required to encode Kind value.
@@ -113,7 +132,7 @@
 #endif
   };
 
-  Location() : value_(kInvalidLocation) {
+  TemplateLocation() : value_(kInvalidLocation) {
     // Verify that non-tagged location kinds do not interfere with location tags
     // (kConstantTag and kPairLocationTag).
     COMPILE_ASSERT((kInvalid & kLocationTagMask) != kConstantTag);
@@ -151,9 +170,10 @@
     ASSERT(IsInvalid());
   }
 
-  Location(const Location& other) : ValueObject(), value_(other.value_) {}
+  TemplateLocation(const TemplateLocation& other)
+      : ValueObject(), value_(other.value_) {}
 
-  Location& operator=(const Location& other) {
+  TemplateLocation& operator=(const TemplateLocation& other) {
     value_ = other.value_;
     return *this;
   }
@@ -165,8 +185,8 @@
     return (value_ & kLocationTagMask) == kConstantTag;
   }
 
-  static Location Constant(const ConstantInstr* obj) {
-    Location loc(reinterpret_cast<uword>(obj) | kConstantTag);
+  static TemplateLocation Constant(const ConstantInstr* obj) {
+    TemplateLocation loc(reinterpret_cast<uword>(obj) | kConstantTag);
     ASSERT(obj == loc.constant_instruction());
     return loc;
   }
@@ -182,9 +202,10 @@
     return (value_ & kLocationTagMask) == kPairLocationTag;
   }
 
-  static Location Pair(Location first, Location second);
+  static TemplateLocation Pair(TemplateLocation first, TemplateLocation second);
 
-  PairLocation* AsPairLocation() const;
+  TemplatePairLocation<TemplateLocation<Register, FpuRegister>>*
+  AsPairLocation() const;
 
   // Unallocated locations.
   enum Policy {
@@ -200,37 +221,37 @@
 
   bool IsRegisterBeneficial() { return !Equals(Any()); }
 
-  static Location UnallocatedLocation(Policy policy) {
-    return Location(kUnallocated, PolicyField::encode(policy));
+  static TemplateLocation UnallocatedLocation(Policy policy) {
+    return TemplateLocation(kUnallocated, PolicyField::encode(policy));
   }
 
   // Any free register is suitable to replace this unallocated location.
-  static Location Any() { return UnallocatedLocation(kAny); }
+  static TemplateLocation Any() { return UnallocatedLocation(kAny); }
 
-  static Location PrefersRegister() {
+  static TemplateLocation PrefersRegister() {
     return UnallocatedLocation(kPrefersRegister);
   }
 
-  static Location RequiresRegister() {
+  static TemplateLocation RequiresRegister() {
     return UnallocatedLocation(kRequiresRegister);
   }
 
-  static Location RequiresFpuRegister() {
+  static TemplateLocation RequiresFpuRegister() {
     return UnallocatedLocation(kRequiresFpuRegister);
   }
 
-  static Location WritableRegister() {
+  static TemplateLocation WritableRegister() {
     return UnallocatedLocation(kWritableRegister);
   }
 
   // The location of the first input to the instruction will be
   // used to replace this unallocated location.
-  static Location SameAsFirstInput() {
+  static TemplateLocation SameAsFirstInput() {
     return UnallocatedLocation(kSameAsFirstInput);
   }
 
   // Empty location. Used if there the location should be ignored.
-  static Location NoLocation() { return Location(); }
+  static TemplateLocation NoLocation() { return TemplateLocation(); }
 
   Policy policy() const {
     ASSERT(IsUnallocated());
@@ -238,8 +259,8 @@
   }
 
   // Register locations.
-  static Location RegisterLocation(Register reg) {
-    return Location(kRegister, reg);
+  static TemplateLocation RegisterLocation(Register reg) {
+    return TemplateLocation(kRegister, reg);
   }
 
   bool IsRegister() const { return kind() == kRegister; }
@@ -250,36 +271,12 @@
   }
 
   // FpuRegister locations.
-  static Location FpuRegisterLocation(FpuRegister reg) {
-    return Location(kFpuRegister, reg);
+  static TemplateLocation FpuRegisterLocation(FpuRegister reg) {
+    return TemplateLocation(kFpuRegister, reg);
   }
 
   bool IsFpuRegister() const { return kind() == kFpuRegister; }
 
-  static Location ArgumentsDescriptorLocation() {
-#ifdef TARGET_ARCH_DBC
-    return Location(kSpecialDbcRegister, kArgsDescriptorReg);
-#else
-    return Location::RegisterLocation(ARGS_DESC_REG);
-#endif
-  }
-
-  static Location ExceptionLocation() {
-#ifdef TARGET_ARCH_DBC
-    return Location(kSpecialDbcRegister, kExceptionReg);
-#else
-    return Location::RegisterLocation(kExceptionObjectReg);
-#endif
-  }
-
-  static Location StackTraceLocation() {
-#ifdef TARGET_ARCH_DBC
-    return Location(kSpecialDbcRegister, kStackTraceReg);
-#else
-    return Location::RegisterLocation(kStackTraceObjectReg);
-#endif
-  }
-
 #ifdef TARGET_ARCH_DBC
   bool IsArgsDescRegister() const {
     return IsSpecialDbcRegister(kArgsDescriptorReg);
@@ -305,7 +302,7 @@
     return (kind == kRegister) || (kind == kFpuRegister);
   }
 
-  static Location MachineRegisterLocation(Kind kind, intptr_t reg) {
+  static TemplateLocation MachineRegisterLocation(Kind kind, intptr_t reg) {
     if (kind == kRegister) {
       return RegisterLocation(static_cast<Register>(reg));
     } else {
@@ -327,10 +324,10 @@
     return static_cast<uword>(kStackIndexBias + stack_index);
   }
 
-  static Location StackSlot(intptr_t stack_index, Register base = FPREG) {
+  static TemplateLocation StackSlot(intptr_t stack_index, Register base) {
     uword payload = StackSlotBaseField::encode(base) |
                     StackIndexField::encode(EncodeStackIndex(stack_index));
-    Location loc(kStackSlot, payload);
+    TemplateLocation loc(kStackSlot, payload);
     // Ensure that sign is preserved.
     ASSERT(loc.stack_index() == stack_index);
     return loc;
@@ -338,10 +335,10 @@
 
   bool IsStackSlot() const { return kind() == kStackSlot; }
 
-  static Location DoubleStackSlot(intptr_t stack_index) {
-    uword payload = StackSlotBaseField::encode(FPREG) |
+  static TemplateLocation DoubleStackSlot(intptr_t stack_index, Register base) {
+    uword payload = StackSlotBaseField::encode(base) |
                     StackIndexField::encode(EncodeStackIndex(stack_index));
-    Location loc(kDoubleStackSlot, payload);
+    TemplateLocation loc(kDoubleStackSlot, payload);
     // Ensure that sign is preserved.
     ASSERT(loc.stack_index() == stack_index);
     return loc;
@@ -349,10 +346,10 @@
 
   bool IsDoubleStackSlot() const { return kind() == kDoubleStackSlot; }
 
-  static Location QuadStackSlot(intptr_t stack_index) {
-    uword payload = StackSlotBaseField::encode(FPREG) |
+  static TemplateLocation QuadStackSlot(intptr_t stack_index, Register base) {
+    uword payload = StackSlotBaseField::encode(base) |
                     StackIndexField::encode(EncodeStackIndex(stack_index));
-    Location loc(kQuadStackSlot, payload);
+    TemplateLocation loc(kQuadStackSlot, payload);
     // Ensure that sign is preserved.
     ASSERT(loc.stack_index() == stack_index);
     return loc;
@@ -375,45 +372,27 @@
     return IsStackSlot() || IsDoubleStackSlot() || IsQuadStackSlot();
   }
 
-// DBC does not have an notion of 'address' in its instruction set.
-#if !defined(TARGET_ARCH_DBC)
-  // Return a memory operand for stack slot locations.
-  Address ToStackSlotAddress() const;
-#endif
-
   // Returns the offset from the frame pointer for stack slot locations.
   intptr_t ToStackSlotOffset() const;
 
-  // Constants.
-  static Location RegisterOrConstant(Value* value);
-  static Location RegisterOrSmiConstant(Value* value);
-  static Location WritableRegisterOrSmiConstant(Value* value);
-  static Location FixedRegisterOrConstant(Value* value, Register reg);
-  static Location FixedRegisterOrSmiConstant(Value* value, Register reg);
-  static Location AnyOrConstant(Value* value);
-
   const char* Name() const;
   void PrintTo(BufferFormatter* f) const;
   void Print() const;
   const char* ToCString() const;
 
   // Compare two locations.
-  bool Equals(Location other) const { return value_ == other.value_; }
+  bool Equals(TemplateLocation other) const { return value_ == other.value_; }
 
   // If current location is constant might return something that
   // is not equal to any Kind.
   Kind kind() const { return KindField::decode(value_); }
 
-  Location Copy() const;
-
-  Location RemapForSlowPath(Definition* def,
-                            intptr_t* cpu_reg_slots,
-                            intptr_t* fpu_reg_slots) const;
+  TemplateLocation Copy() const;
 
  private:
-  explicit Location(uword value) : value_(value) {}
+  explicit TemplateLocation(uword value) : value_(value) {}
 
-  Location(Kind kind, uword payload)
+  TemplateLocation(Kind kind, uword payload)
       : value_(KindField::encode(kind) | PayloadField::encode(payload)) {}
 
   uword payload() const { return PayloadField::decode(value_); }
@@ -447,11 +426,48 @@
   // a constant locations. Values of enumeration Kind are selected in such a
   // way that none of them can be interpreted as a kConstant tag.
   uword value_;
+
+  // The following functions are only defined for Location, not for
+  // HostLocation, but they do need access to private fields or constructors.
+  friend TemplateLocation<dart::Register, dart::FpuRegister>
+  LocationArgumentsDescriptorLocation();
+  friend TemplateLocation<dart::Register, dart::FpuRegister>
+  LocationExceptionLocation();
+  friend TemplateLocation<dart::Register, dart::FpuRegister>
+  LocationStackTraceLocation();
 };
 
-class PairLocation : public ZoneAllocated {
+using Location = TemplateLocation<dart::Register, dart::FpuRegister>;
+using HostLocation =
+    TemplateLocation<dart::host::Register, dart::host::FpuRegister>;
+
+// The following functions are only defined for Location, not for HostLocation.
+Location LocationArgumentsDescriptorLocation();
+Location LocationExceptionLocation();
+Location LocationStackTraceLocation();
+// Constants.
+Location LocationRegisterOrConstant(Value* value);
+Location LocationRegisterOrSmiConstant(Value* value);
+Location LocationWritableRegisterOrSmiConstant(Value* value);
+Location LocationFixedRegisterOrConstant(Value* value, Register reg);
+Location LocationFixedRegisterOrSmiConstant(Value* value, Register reg);
+Location LocationAnyOrConstant(Value* value);
+
+Location LocationRemapForSlowPath(Location loc,
+                                  Definition* def,
+                                  intptr_t* cpu_reg_slots,
+                                  intptr_t* fpu_reg_slots);
+
+// DBC does not have an notion of 'address' in its instruction set.
+#if !defined(TARGET_ARCH_DBC)
+// Return a memory operand for stack slot locations.
+Address LocationToStackSlotAddress(Location loc);
+#endif
+
+template <class Location>
+class TemplatePairLocation : public ZoneAllocated {
  public:
-  PairLocation() {
+  TemplatePairLocation() {
     for (intptr_t i = 0; i < kPairLength; i++) {
       ASSERT(locations_[i].IsInvalid());
     }
@@ -482,6 +498,9 @@
   Location locations_[kPairLength];
 };
 
+using PairLocation = TemplatePairLocation<Location>;
+using HostPairLocation = TemplatePairLocation<HostLocation>;
+
 template <typename T>
 class SmallSet {
  public:
@@ -529,6 +548,25 @@
     }
   }
 
+  // Adds all registers which don't have a special purpose (e.g. FP, SP, PC,
+  // CSP, etc.).
+  void AddAllGeneralRegisters() {
+    for (intptr_t i = kNumberOfCpuRegisters - 1; i >= 0; --i) {
+      Register reg = static_cast<Register>(i);
+      if (reg == FPREG || reg == SPREG) continue;
+#if defined(TARGET_ARCH_ARM)
+      if (reg == PC) continue;
+#elif defined(TARGET_ARCH_ARM64)
+      if (reg == R31) continue;
+#endif
+      Add(Location::RegisterLocation(reg));
+    }
+
+    for (intptr_t i = kNumberOfFpuRegisters - 1; i >= 0; --i) {
+      Add(Location::FpuRegisterLocation(static_cast<FpuRegister>(i)));
+    }
+  }
+
   void Add(Location loc, Representation rep = kTagged) {
     if (loc.IsRegister()) {
       cpu_registers_.Add(loc.reg());
@@ -636,7 +674,18 @@
   void set_in(intptr_t index, Location loc) {
     ASSERT(index >= 0);
     ASSERT(index < num_inputs_);
-    ASSERT(!always_calls() || loc.IsMachineRegister());
+    // See FlowGraphAllocator::ProcessOneInstruction for explanation of this
+    // restriction.
+    if (always_calls()) {
+      if (loc.IsUnallocated()) {
+        ASSERT(loc.policy() == Location::kAny);
+      } else if (loc.IsPairLocation()) {
+        ASSERT(!loc.AsPairLocation()->At(0).IsUnallocated() ||
+               loc.AsPairLocation()->At(0).policy() == Location::kAny);
+        ASSERT(!loc.AsPairLocation()->At(0).IsUnallocated() ||
+               loc.AsPairLocation()->At(0).policy() == Location::kAny);
+      }
+    }
     input_locations_[index] = loc;
   }
 
diff --git a/runtime/vm/compiler/backend/loops.cc b/runtime/vm/compiler/backend/loops.cc
index f0e8a5b..a641557 100644
--- a/runtime/vm/compiler/backend/loops.cc
+++ b/runtime/vm/compiler/backend/loops.cc
@@ -132,22 +132,6 @@
   return false;
 }
 
-// Helper method to trace back to original true definition, now
-// also ignoring constraints and (un)boxing operations, since
-// these are not relevant to the induction behavior.
-static Definition* OriginalDefinition(Definition* def) {
-  while (true) {
-    Definition* orig;
-    if (def->IsConstraint() || def->IsBox() || def->IsUnbox()) {
-      orig = def->InputAt(0)->definition();
-    } else {
-      orig = def->OriginalDefinition();
-    }
-    if (orig == def) return def;
-    def = orig;
-  }
-}
-
 void InductionVarAnalysis::VisitHierarchy(LoopInfo* loop) {
   for (; loop != nullptr; loop = loop->next_) {
     VisitLoop(loop);
@@ -273,7 +257,7 @@
   } else if (def->IsUnaryIntegerOp()) {
     induc = TransferUnary(loop, def);
   } else {
-    Definition* orig = OriginalDefinition(def);
+    Definition* orig = def->OriginalDefinitionIgnoreBoxingAndConstraints();
     if (orig != def) {
       induc = Lookup(loop, orig);  // pass-through
     }
@@ -316,7 +300,7 @@
       } else if (def->IsConstraint()) {
         update = SolveConstraint(loop, def, init);
       } else {
-        Definition* orig = OriginalDefinition(def);
+        Definition* orig = def->OriginalDefinitionIgnoreBoxingAndConstraints();
         if (orig != def) {
           update = LookupCycle(orig);  // pass-through
         }
@@ -370,10 +354,14 @@
     // Comparison against linear constant stride induction?
     // Express the comparison such that induction appears left.
     int64_t stride = 0;
-    InductionVar* x =
-        Lookup(loop, OriginalDefinition(compare->left()->definition()));
-    InductionVar* y =
-        Lookup(loop, OriginalDefinition(compare->right()->definition()));
+    auto left = compare->left()
+                    ->definition()
+                    ->OriginalDefinitionIgnoreBoxingAndConstraints();
+    auto right = compare->right()
+                     ->definition()
+                     ->OriginalDefinitionIgnoreBoxingAndConstraints();
+    InductionVar* x = Lookup(loop, left);
+    InductionVar* y = Lookup(loop, right);
     if (InductionVar::IsLinear(x, &stride) && InductionVar::IsInvariant(y)) {
       // ok as is
     } else if (InductionVar::IsInvariant(x) &&
@@ -443,6 +431,10 @@
     // on the intended use of this information, clients should still test
     // dominance on the test and the initial value of the induction variable.
     x->bounds_.Add(InductionVar::Bound(branch, y));
+    // Record control induction.
+    if (branch == loop->header_->last_instruction()) {
+      loop->control_ = x;
+    }
   }
 }
 
@@ -774,6 +766,7 @@
       back_edges_(),
       induction_(),
       limit_(nullptr),
+      control_(nullptr),
       outer_(nullptr),
       inner_(nullptr),
       next_(nullptr) {}
@@ -795,6 +788,42 @@
   return false;
 }
 
+bool LoopInfo::IsAlwaysTaken(BlockEntryInstr* block) const {
+  // The loop header is always executed when executing a loop (including
+  // loop body of a do-while). Reject any other loop body block that is
+  // not directly controlled by header.
+  if (block == header_) {
+    return true;
+  } else if (block->PredecessorCount() != 1 ||
+             block->PredecessorAt(0) != header_) {
+    return false;
+  }
+  // If the loop has a control induction, make sure the condition is such
+  // that the loop body is entered at least once from the header.
+  if (control_ != nullptr) {
+    InductionVar* limit = nullptr;
+    for (auto bound : control_->bounds()) {
+      if (bound.branch_ == header_->last_instruction()) {
+        limit = bound.limit_;
+        break;
+      }
+    }
+    // Control iterates at least once?
+    if (limit != nullptr) {
+      int64_t stride = 0;
+      int64_t begin = 0;
+      int64_t end = 0;
+      if (InductionVar::IsLinear(control_, &stride) &&
+          InductionVar::IsConstant(control_->initial(), &begin) &&
+          InductionVar::IsConstant(limit, &end) &&
+          ((stride == 1 && begin < end) || (stride == -1 && begin > end))) {
+        return true;
+      }
+    }
+  }
+  return false;
+}
+
 bool LoopInfo::IsHeaderPhi(Definition* def) const {
   return def != nullptr && def->IsPhi() && def->GetBlock() == header_ &&
          !def->AsPhi()->IsRedundant();  // phi(x,..,x) = x
diff --git a/runtime/vm/compiler/backend/loops.h b/runtime/vm/compiler/backend/loops.h
index 2bd3b31..215d26f 100644
--- a/runtime/vm/compiler/backend/loops.h
+++ b/runtime/vm/compiler/backend/loops.h
@@ -193,6 +193,9 @@
   // Returns true if given block is backedge of this loop.
   bool IsBackEdge(BlockEntryInstr* block) const;
 
+  // Returns true if given block is alway taken in this loop.
+  bool IsAlwaysTaken(BlockEntryInstr* block) const;
+
   // Returns true if given definition is a header phi for this loop.
   bool IsHeaderPhi(Definition* def) const;
 
@@ -220,6 +223,7 @@
   BitVector* blocks() const { return blocks_; }
   const GrowableArray<BlockEntryInstr*>& back_edges() { return back_edges_; }
   ConstraintInstr* limit() const { return limit_; }
+  InductionVar* control() const { return control_; }
   LoopInfo* outer() const { return outer_; }
   LoopInfo* inner() const { return inner_; }
   LoopInfo* next() const { return next_; }
@@ -255,6 +259,9 @@
   //               should we really store it here?
   ConstraintInstr* limit_;
 
+  // Control induction.
+  InductionVar* control_;
+
   // Loop hierarchy.
   LoopInfo* outer_;
   LoopInfo* inner_;
diff --git a/runtime/vm/compiler/backend/loops_test.cc b/runtime/vm/compiler/backend/loops_test.cc
index 1e9c8cd..4b208f8 100644
--- a/runtime/vm/compiler/backend/loops_test.cc
+++ b/runtime/vm/compiler/backend/loops_test.cc
@@ -9,6 +9,7 @@
 
 #include "vm/compiler/backend/loops.h"
 #include "vm/compiler/backend/il_printer.h"
+#include "vm/compiler/backend/il_test_helper.h"
 #include "vm/compiler/backend/inliner.h"
 #include "vm/compiler/backend/type_propagator.h"
 #include "vm/compiler/compiler_pass.h"
@@ -62,43 +63,18 @@
 
 // Helper method to build CFG and compute induction.
 static const char* ComputeInduction(Thread* thread, const char* script_chars) {
-  // Invoke the script.
-  Dart_Handle script = TestCase::LoadTestScript(script_chars, NULL);
-  Dart_Handle result = Dart_Invoke(script, NewString("main"), 0, NULL);
-  EXPECT_VALID(result);
+  // Load the script and exercise the code once.
+  const auto& root_library = Library::Handle(LoadTestScript(script_chars));
+  Invoke(root_library, "main");
 
-  // Find parsed function "foo".
-  TransitionNativeToVM transition(thread);
-  Zone* zone = thread->zone();
-  Library& lib =
-      Library::ZoneHandle(Library::RawCast(Api::UnwrapHandle(script)));
-  RawFunction* raw_func =
-      lib.LookupLocalFunction(String::Handle(Symbols::New(thread, "foo")));
-  ParsedFunction* parsed_function =
-      new (zone) ParsedFunction(thread, Function::ZoneHandle(zone, raw_func));
-  EXPECT(parsed_function != nullptr);
-
-  // Build flow graph.
-  CompilerState state(thread);
-  ZoneGrowableArray<const ICData*>* ic_data_array =
-      new (zone) ZoneGrowableArray<const ICData*>();
-  parsed_function->function().RestoreICDataMap(ic_data_array, true);
-  kernel::FlowGraphBuilder builder(parsed_function, ic_data_array, nullptr,
-                                   nullptr, true, DeoptId::kNone);
-  FlowGraph* flow_graph = builder.BuildGraph();
-  EXPECT(flow_graph != nullptr);
-
-  // Setup some pass data structures and perform minimum passes.
-  SpeculativeInliningPolicy speculative_policy(/*enable_blacklist*/ false);
-  CompilerPassState pass_state(thread, flow_graph, &speculative_policy);
-  JitCallSpecializer call_specializer(flow_graph, &speculative_policy);
-  pass_state.call_specializer = &call_specializer;
-  flow_graph->ComputeSSA(0, nullptr);
-  FlowGraphTypePropagator::Propagate(flow_graph);
-  call_specializer.ApplyICData();
-  flow_graph->SelectRepresentations();
-  FlowGraphTypePropagator::Propagate(flow_graph);
-  flow_graph->Canonicalize();
+  std::initializer_list<CompilerPass::Id> passes = {
+      CompilerPass::kComputeSSA,      CompilerPass::kTypePropagation,
+      CompilerPass::kApplyICData,     CompilerPass::kSelectRepresentations,
+      CompilerPass::kTypePropagation, CompilerPass::kCanonicalize,
+  };
+  const auto& function = Function::Handle(GetFunction(root_library, "foo"));
+  TestPipeline pipeline(function, CompilerPass::kJIT);
+  FlowGraph* flow_graph = pipeline.RunPasses(passes);
 
   // Build loop hierarchy and find induction.
   const LoopHierarchy& hierarchy = flow_graph->GetLoopHierarchy();
@@ -116,15 +92,17 @@
 // Induction tests.
 //
 
-TEST_CASE(BasicInductionUp) {
+ISOLATE_UNIT_TEST_CASE(BasicInductionUp) {
   const char* script_chars =
-      "foo() {\n"
-      "  for (int i = 0; i < 100; i++) {\n"
-      "  }\n"
-      "}\n"
-      "main() {\n"
-      "  foo();\n"
-      "}\n";
+      R"(
+      foo() {
+        for (int i = 0; i < 100; i++) {
+        }
+      }
+      main() {
+        foo();
+      }
+    )";
   const char* expected =
       "  [0\n"
       "  LIN(0 + 1 * i) 100\n"  // phi
@@ -133,15 +111,17 @@
   EXPECT_STREQ(expected, ComputeInduction(thread, script_chars));
 }
 
-TEST_CASE(BasicInductionDown) {
+ISOLATE_UNIT_TEST_CASE(BasicInductionDown) {
   const char* script_chars =
-      "foo() {\n"
-      "  for (int i = 100; i > 0; i--) {\n"
-      "  }\n"
-      "}\n"
-      "main() {\n"
-      "  foo();\n"
-      "}\n";
+      R"(
+      foo() {
+        for (int i = 100; i > 0; i--) {
+        }
+      }
+      main() {
+        foo();
+      }
+    )";
   const char* expected =
       "  [0\n"
       "  LIN(100 + -1 * i) 0\n"  // phi
@@ -150,15 +130,17 @@
   EXPECT_STREQ(expected, ComputeInduction(thread, script_chars));
 }
 
-TEST_CASE(BasicInductionStepUp) {
+ISOLATE_UNIT_TEST_CASE(BasicInductionStepUp) {
   const char* script_chars =
-      "foo() {\n"
-      "  for (int i = 10; i < 100; i += 2) {\n"
-      "  }\n"
-      "}\n"
-      "main() {\n"
-      "  foo();\n"
-      "}\n";
+      R"(
+      foo() {
+        for (int i = 10; i < 100; i += 2) {
+        }
+      }
+      main() {
+        foo();
+      }
+    )";
   const char* expected =
       "  [0\n"
       "  LIN(10 + 2 * i)\n"  // phi
@@ -167,15 +149,17 @@
   EXPECT_STREQ(expected, ComputeInduction(thread, script_chars));
 }
 
-TEST_CASE(BasicInductionStepDown) {
+ISOLATE_UNIT_TEST_CASE(BasicInductionStepDown) {
   const char* script_chars =
-      "foo() {\n"
-      "  for (int i = 100; i >= 0; i -= 7) {\n"
-      "  }\n"
-      "}\n"
-      "main() {\n"
-      "  foo();\n"
-      "}\n";
+      R"(
+      foo() {
+        for (int i = 100; i >= 0; i -= 7) {
+        }
+      }
+      main() {
+        foo();
+      }
+    )";
   const char* expected =
       "  [0\n"
       "  LIN(100 + -7 * i)\n"  // phi
@@ -184,19 +168,21 @@
   EXPECT_STREQ(expected, ComputeInduction(thread, script_chars));
 }
 
-TEST_CASE(BasicInductionLoopNest) {
+ISOLATE_UNIT_TEST_CASE(BasicInductionLoopNest) {
   const char* script_chars =
-      "foo() {\n"
-      "  for (int i = 0; i < 100; i++) {\n"
-      "    for (int j = 1; j < 100; j++) {\n"
-      "      for (int k = 2; k < 100; k++) {\n"
-      "      }\n"
-      "    }\n"
-      "  }\n"
-      "}\n"
-      "main() {\n"
-      "  foo();\n"
-      "}\n";
+      R"(
+      foo() {
+        for (int i = 0; i < 100; i++) {
+          for (int j = 1; j < 100; j++) {
+            for (int k = 2; k < 100; k++) {
+            }
+          }
+        }
+      }
+      main() {
+        foo();
+      }
+    )";
   const char* expected =
       "  [2\n"
       "  LIN(0 + 1 * i) 100\n"  // i
@@ -213,18 +199,20 @@
   EXPECT_STREQ(expected, ComputeInduction(thread, script_chars));
 }
 
-TEST_CASE(ChainInduction) {
+ISOLATE_UNIT_TEST_CASE(ChainInduction) {
   const char* script_chars =
-      "foo() {\n"
-      "  int j = 1;\n"
-      "  for (int i = 0; i < 100; i++) {\n"
-      "    j += 5;\n"
-      "    j += 7;\n"
-      "  }\n"
-      "}\n"
-      "main() {\n"
-      "  foo();\n"
-      "}\n";
+      R"(
+      foo() {
+        int j = 1;
+        for (int i = 0; i < 100; i++) {
+          j += 5;
+          j += 7;
+        }
+      }
+      main() {
+        foo();
+      }
+    )";
   const char* expected =
       "  [0\n"
       "  LIN(1 + 12 * i)\n"     // phi (j)
@@ -236,21 +224,23 @@
   EXPECT_STREQ(expected, ComputeInduction(thread, script_chars));
 }
 
-TEST_CASE(TwoWayInduction) {
+ISOLATE_UNIT_TEST_CASE(TwoWayInduction) {
   const char* script_chars =
-      "foo() {\n"
-      "  int j = 123;\n"
-      "  for (int i = 0; i < 100; i++) {\n"
-      "     if (i == 10) {\n"
-      "       j += 3;\n"
-      "     } else {\n"
-      "       j += 3;\n"
-      "     }\n"
-      "  }\n"
-      "}\n"
-      "main() {\n"
-      "  foo();\n"
-      "}\n";
+      R"(
+      foo() {
+        int j = 123;
+        for (int i = 0; i < 100; i++) {
+           if (i == 10) {
+             j += 3;
+           } else {
+             j += 3;
+           }
+        }
+      }
+      main() {
+        foo();
+      }
+    )";
   const char* expected =
       "  [0\n"
       "  LIN(123 + 3 * i)\n"    // phi (j)
@@ -263,19 +253,21 @@
   EXPECT_STREQ(expected, ComputeInduction(thread, script_chars));
 }
 
-TEST_CASE(DerivedInduction) {
+ISOLATE_UNIT_TEST_CASE(DerivedInduction) {
   const char* script_chars =
-      "foo() {\n"
-      "  for (int i = 1; i < 100; i++) {\n"
-      "    int a = i + 3;\n"
-      "    int b = i - 5;\n"
-      "    int c = i * 7;\n"
-      "    int d = - i;\n"
-      "  }\n"
-      "}\n"
-      "main() {\n"
-      "  foo();\n"
-      "}\n";
+      R"(
+      foo() {
+        for (int i = 1; i < 100; i++) {
+          int a = i + 3;
+          int b = i - 5;
+          int c = i * 7;
+          int d = - i;
+        }
+      }
+      main() {
+        foo();
+      }
+    )";
   const char* expected =
       "  [0\n"
       "  LIN(1 + 1 * i) 100\n"  // phi
@@ -288,21 +280,23 @@
   EXPECT_STREQ(expected, ComputeInduction(thread, script_chars));
 }
 
-TEST_CASE(WrapAroundAndDerived) {
+ISOLATE_UNIT_TEST_CASE(WrapAroundAndDerived) {
   const char* script_chars =
-      "foo() {\n"
-      "  int w = 99;\n"
-      "  for (int i = 0; i < 100; i++) {\n"
-      "    int a = w + 3;\n"
-      "    int b = w - 5;\n"
-      "    int c = w * 7;\n"
-      "    int d = - w;\n"
-      "    w = i;\n"
-      "  }\n"
-      "}\n"
-      "main() {\n"
-      "  foo();\n"
-      "}\n";
+      R"(
+      foo() {
+        int w = 99;
+        for (int i = 0; i < 100; i++) {
+          int a = w + 3;
+          int b = w - 5;
+          int c = w * 7;
+          int d = - w;
+          w = i;
+        }
+      }
+      main() {
+        foo();
+      }
+      )";
   const char* expected =
       "  [0\n"
       "  WRAP(99, LIN(0 + 1 * i))\n"    // phi (w)
@@ -316,23 +310,25 @@
   EXPECT_STREQ(ComputeInduction(thread, script_chars), expected);
 }
 
-TEST_CASE(PeriodicAndDerived) {
+ISOLATE_UNIT_TEST_CASE(PeriodicAndDerived) {
   const char* script_chars =
-      "foo() {\n"
-      "  int p1 = 3;\n"
-      "  int p2 = 5;\n"
-      "  for (int i = 0; i < 100; i++) {\n"
-      "    int a = p1 + 3;\n"
-      "    int b = p1 - 5;\n"
-      "    int c = p1 * 7;\n"
-      "    int d = - p1;\n"
-      "    p1 = - p1;\n"
-      "    p2 = 100 - p2;\n"
-      "  }\n"
-      "}\n"
-      "main() {\n"
-      "  foo();\n"
-      "}\n";
+      R"(
+      foo() {
+        int p1 = 3;
+        int p2 = 5;
+        for (int i = 0; i < 100; i++) {
+          int a = p1 + 3;
+          int b = p1 - 5;
+          int c = p1 * 7;
+          int d = - p1;
+          p1 = - p1;
+          p2 = 100 - p2;
+        }
+      }
+      main() {
+        foo();
+      }
+    )";
   const char* expected =
       "  [0\n"
       "  PERIOD(3, -3)\n"       // phi(p1)
@@ -353,15 +349,17 @@
 // Bound specific tests.
 //
 
-TEST_CASE(NonStrictConditionUp) {
+ISOLATE_UNIT_TEST_CASE(NonStrictConditionUp) {
   const char* script_chars =
-      "foo() {\n"
-      "  for (int i = 0; i <= 100; i++) {\n"
-      "  }\n"
-      "}\n"
-      "main() {\n"
-      "  foo();\n"
-      "}\n";
+      R"(
+      foo() {
+        for (int i = 0; i <= 100; i++) {
+        }
+      }
+      main() {
+        foo();
+      }
+    )";
   const char* expected =
       "  [0\n"
       "  LIN(0 + 1 * i) 101\n"  // phi
@@ -371,16 +369,18 @@
 }
 
 #ifndef TARGET_ARCH_DBC
-TEST_CASE(NonStrictConditionUpWrap) {
+ISOLATE_UNIT_TEST_CASE(NonStrictConditionUpWrap) {
   const char* script_chars =
-      "foo() {\n"
-      "  for (int i = 0x7ffffffffffffffe; i <= 0x7fffffffffffffff; i++) {\n"
-      "    if (i < 0) break;\n"
-      "  }\n"
-      "}\n"
-      "main() {\n"
-      "  foo();\n"
-      "}\n";
+      R"(
+      foo() {
+        for (int i = 0x7ffffffffffffffe; i <= 0x7fffffffffffffff; i++) {
+          if (i < 0) break;
+        }
+      }
+      main() {
+        foo();
+      }
+    )";
   const char* expected =
       "  [0\n"
       "  LIN(9223372036854775806 + 1 * i)\n"  // phi
@@ -394,15 +394,17 @@
 }
 #endif
 
-TEST_CASE(NonStrictConditionDown) {
+ISOLATE_UNIT_TEST_CASE(NonStrictConditionDown) {
   const char* script_chars =
-      "foo() {\n"
-      "  for (int i = 100; i >= 0; i--) {\n"
-      "  }\n"
-      "}\n"
-      "main() {\n"
-      "  foo();\n"
-      "}\n";
+      R"(
+      foo() {
+        for (int i = 100; i >= 0; i--) {
+        }
+      }
+      main() {
+        foo();
+      }
+    )";
   const char* expected =
       "  [0\n"
       "  LIN(100 + -1 * i) -1\n"  // phi
@@ -412,16 +414,18 @@
 }
 
 #ifndef TARGET_ARCH_DBC
-TEST_CASE(NonStrictConditionDownWrap) {
+ISOLATE_UNIT_TEST_CASE(NonStrictConditionDownWrap) {
   const char* script_chars =
-      "foo() {\n"
-      "  for (int i = 0x8000000000000001; i >= 0x8000000000000000; i--) {\n"
-      "    if (i > 0) break;\n"
-      "  }\n"
-      "}\n"
-      "main() {\n"
-      "  foo();\n"
-      "}\n";
+      R"(
+      foo() {
+        for (int i = 0x8000000000000001; i >= 0x8000000000000000; i--) {
+          if (i > 0) break;
+        }
+      }
+      main() {
+        foo();
+      }
+    )";
   const char* expected =
       "  [0\n"
       "  LIN(-9223372036854775807 + -1 * i)\n"  // phi
@@ -433,17 +437,20 @@
       "  ]\n";
   EXPECT_STREQ(expected, ComputeInduction(thread, script_chars));
 }
+
 #endif
 
-TEST_CASE(NotEqualConditionUp) {
+ISOLATE_UNIT_TEST_CASE(NotEqualConditionUp) {
   const char* script_chars =
-      "foo() {\n"
-      "  for (int i = 10; i != 20; i++) {\n"
-      "  }\n"
-      "}\n"
-      "main() {\n"
-      "  foo();\n"
-      "}\n";
+      R"(
+      foo() {
+        for (int i = 10; i != 20; i++) {
+        }
+      }
+      main() {
+        foo();
+      }
+    )";
   const char* expected =
       "  [0\n"
       "  LIN(10 + 1 * i) 20\n"  // phi
@@ -452,15 +459,17 @@
   EXPECT_STREQ(expected, ComputeInduction(thread, script_chars));
 }
 
-TEST_CASE(NotEqualConditionDown) {
+ISOLATE_UNIT_TEST_CASE(NotEqualConditionDown) {
   const char* script_chars =
-      "foo() {\n"
-      "  for (int i = 20; i != 10; i--) {\n"
-      "  }\n"
-      "}\n"
-      "main() {\n"
-      "  foo();\n"
-      "}\n";
+      R"(
+      foo() {
+        for (int i = 20; i != 10; i--) {
+        }
+      }
+      main() {
+        foo();
+      }
+    )";
   const char* expected =
       "  [0\n"
       "  LIN(20 + -1 * i) 10\n"  // phi
@@ -469,16 +478,18 @@
   EXPECT_STREQ(expected, ComputeInduction(thread, script_chars));
 }
 
-TEST_CASE(SecondExitUp) {
+ISOLATE_UNIT_TEST_CASE(SecondExitUp) {
   const char* script_chars =
-      "foo() {\n"
-      "  for (int i = 0; i < 100; i++) {\n"
-      "     if (i >= 50) break;\n"
-      "  }\n"
-      "}\n"
-      "main() {\n"
-      "  foo();\n"
-      "}\n";
+      R"(
+      foo() {
+        for (int i = 0; i < 100; i++) {
+           if (i >= 50) break;
+        }
+      }
+      main() {
+        foo();
+      }
+    )";
   const char* expected =
       "  [0\n"
       "  LIN(0 + 1 * i) 100 50\n"  // phi
@@ -487,16 +498,18 @@
   EXPECT_STREQ(expected, ComputeInduction(thread, script_chars));
 }
 
-TEST_CASE(SecondExitDown) {
+ISOLATE_UNIT_TEST_CASE(SecondExitDown) {
   const char* script_chars =
-      "foo() {\n"
-      "  for (int i = 100; i > 0; i--) {\n"
-      "     if (i <= 10) break;\n"
-      "  }\n"
-      "}\n"
-      "main() {\n"
-      "  foo();\n"
-      "}\n";
+      R"(
+      foo() {
+        for (int i = 100; i > 0; i--) {
+           if (i <= 10) break;
+        }
+      }
+      main() {
+        foo();
+      }
+    )";
   const char* expected =
       "  [0\n"
       "  LIN(100 + -1 * i) 0 10\n"  // phi
diff --git a/runtime/vm/compiler/backend/range_analysis.cc b/runtime/vm/compiler/backend/range_analysis.cc
index e0f096b..c2bd37b 100644
--- a/runtime/vm/compiler/backend/range_analysis.cc
+++ b/runtime/vm/compiler/backend/range_analysis.cc
@@ -64,12 +64,8 @@
 
   for (intptr_t i = 0; i < graph_entry->SuccessorCount(); ++i) {
     auto successor = graph_entry->SuccessorAt(i);
-    if (successor->IsFunctionEntry() || successor->IsCatchBlockEntry()) {
-      auto function_entry = successor->AsFunctionEntry();
-      auto catch_entry = successor->AsCatchBlockEntry();
-      const auto& initial = function_entry != nullptr
-                                ? *function_entry->initial_definitions()
-                                : *catch_entry->initial_definitions();
+    if (auto entry = successor->AsBlockEntryWithInitialDefs()) {
+      const auto& initial = *entry->initial_definitions();
       for (intptr_t j = 0; j < initial.length(); ++j) {
         Definition* current = initial[j];
         if (IsIntegerDefinition(current)) {
@@ -215,31 +211,31 @@
 void RangeAnalysis::InsertConstraintsFor(Definition* defn) {
   for (Value* use = defn->input_use_list(); use != NULL;
        use = use->next_use()) {
-    if (use->instruction()->IsBranch()) {
+    if (auto branch = use->instruction()->AsBranch()) {
       if (ConstrainValueAfterBranch(use, defn)) {
-        Value* other_value = use->instruction()->InputAt(1 - use->use_index());
+        Value* other_value = branch->InputAt(1 - use->use_index());
         if (!IsIntegerDefinition(other_value->definition())) {
           ConstrainValueAfterBranch(other_value, other_value->definition());
         }
       }
-    } else if (use->instruction()->IsCheckArrayBound()) {
-      ConstrainValueAfterCheckArrayBound(use, defn);
+    } else if (auto check = use->instruction()->AsCheckBoundBase()) {
+      ConstrainValueAfterCheckBound(use, check, defn);
     }
   }
 }
 
-void RangeAnalysis::ConstrainValueAfterCheckArrayBound(Value* use,
-                                                       Definition* defn) {
-  CheckArrayBoundInstr* check = use->instruction()->AsCheckArrayBound();
-  intptr_t use_index = use->use_index();
+void RangeAnalysis::ConstrainValueAfterCheckBound(Value* use,
+                                                  CheckBoundBase* check,
+                                                  Definition* defn) {
+  const intptr_t use_index = use->use_index();
 
   Range* constraint_range = NULL;
-  if (use_index == CheckArrayBoundInstr::kIndexPos) {
+  if (use_index == CheckBoundBase::kIndexPos) {
     Definition* length = check->length()->definition();
     constraint_range = new (Z) Range(RangeBoundary::FromConstant(0),
                                      RangeBoundary::FromDefinition(length, -1));
   } else {
-    ASSERT(use_index == CheckArrayBoundInstr::kLengthPos);
+    ASSERT(use_index == CheckBoundBase::kLengthPos);
     Definition* index = check->index()->definition();
     constraint_range = new (Z)
         Range(RangeBoundary::FromDefinition(index, 1), RangeBoundary::MaxSmi());
@@ -699,7 +695,6 @@
         last, instr, last->env(),
         instr->IsDefinition() ? FlowGraph::kValue : FlowGraph::kEffect);
     instr->CopyDeoptIdFrom(*last);
-    instr->env()->set_deopt_id(instr->deopt_id_);
 
     map_.Insert(instr);
     emitted_.Add(instr);
@@ -1322,11 +1317,12 @@
 
     for (intptr_t i = 0; i < bounds_checks_.length(); i++) {
       // Is this a non-speculative check bound?
-      GenericCheckBoundInstr* aot_check =
-          bounds_checks_[i]->AsGenericCheckBound();
+      auto aot_check = bounds_checks_[i]->AsGenericCheckBound();
       if (aot_check != nullptr) {
-        RangeBoundary array_length =
-            RangeBoundary::FromDefinition(aot_check->length()->definition());
+        auto length = aot_check->length()
+                          ->definition()
+                          ->OriginalDefinitionIgnoreBoxingAndConstraints();
+        auto array_length = RangeBoundary::FromDefinition(length);
         if (aot_check->IsRedundant(array_length)) {
           aot_check->ReplaceUsesWith(aot_check->index()->definition());
           aot_check->RemoveFromGraph();
@@ -2329,6 +2325,31 @@
   *result_max = RangeBoundary::PositiveInfinity();
 }
 
+void Range::TruncDiv(const Range* left_range,
+                     const Range* right_range,
+                     RangeBoundary* result_min,
+                     RangeBoundary* result_max) {
+  ASSERT(left_range != nullptr);
+  ASSERT(right_range != nullptr);
+  ASSERT(result_min != nullptr);
+  ASSERT(result_max != nullptr);
+
+  if (left_range->OnlyGreaterThanOrEqualTo(0) &&
+      right_range->OnlyGreaterThanOrEqualTo(1)) {
+    const int64_t left_max = ConstantAbsMax(left_range);
+    const int64_t left_min = ConstantAbsMin(left_range);
+    const int64_t right_max = ConstantAbsMax(right_range);
+    const int64_t right_min = ConstantAbsMin(right_range);
+
+    *result_max = RangeBoundary::FromConstant(left_max / right_min);
+    *result_min = RangeBoundary::FromConstant(left_min / right_max);
+    return;
+  }
+
+  *result_min = RangeBoundary::NegativeInfinity();
+  *result_max = RangeBoundary::PositiveInfinity();
+}
+
 // Both the a and b ranges are >= 0.
 bool Range::OnlyPositiveOrZero(const Range& a, const Range& b) {
   return a.OnlyGreaterThanOrEqualTo(0) && b.OnlyGreaterThanOrEqualTo(0);
@@ -2392,6 +2413,10 @@
       Range::Mul(left_range, right_range, &min, &max);
       break;
 
+    case Token::kTRUNCDIV:
+      Range::TruncDiv(left_range, right_range, &min, &max);
+      break;
+
     case Token::kSHL:
       Range::Shl(left_range, right_range, &min, &max);
       break;
@@ -2605,7 +2630,8 @@
                      RangeBoundary::FromConstant(Array::kMaxElements));
       break;
 
-    case Slot::Kind::kTypedData_length:
+    case Slot::Kind::kTypedDataBase_length:
+    case Slot::Kind::kTypedDataView_offset_in_bytes:
       *range = Range(RangeBoundary::FromConstant(0), RangeBoundary::MaxSmi());
       break;
 
@@ -2630,6 +2656,9 @@
     case Slot::Kind::kClosure_function:
     case Slot::Kind::kClosure_function_type_arguments:
     case Slot::Kind::kClosure_instantiator_type_arguments:
+    case Slot::Kind::kPointer_c_memory_address:
+    case Slot::Kind::kTypedDataBase_data_field:
+    case Slot::Kind::kTypedDataView_data:
       // Not an integer valued field.
       UNREACHABLE();
       break;
@@ -2867,12 +2896,17 @@
   }
 }
 
-void UnboxedIntConverterInstr::InferRange(RangeAnalysis* analysis,
-                                          Range* range) {
-  ASSERT((from() == kUnboxedInt32) || (from() == kUnboxedInt64) ||
-         (from() == kUnboxedUint32));
-  ASSERT((to() == kUnboxedInt32) || (to() == kUnboxedInt64) ||
-         (to() == kUnboxedUint32));
+void IntConverterInstr::InferRange(RangeAnalysis* analysis, Range* range) {
+  if (from() == kUntagged || to() == kUntagged) {
+    ASSERT((from() == kUntagged && to() == kUnboxedIntPtr) ||
+           (from() == kUnboxedIntPtr && to() == kUntagged));
+  } else {
+    ASSERT(from() == kUnboxedInt32 || from() == kUnboxedInt64 ||
+           from() == kUnboxedUint32);
+    ASSERT(to() == kUnboxedInt32 || to() == kUnboxedInt64 ||
+           to() == kUnboxedUint32);
+  }
+
   const Range* value_range = value()->definition()->range();
   if (Range::IsUnknown(value_range)) {
     return;
diff --git a/runtime/vm/compiler/backend/range_analysis.h b/runtime/vm/compiler/backend/range_analysis.h
index 24adeed..a16ea2b 100644
--- a/runtime/vm/compiler/backend/range_analysis.h
+++ b/runtime/vm/compiler/backend/range_analysis.h
@@ -436,6 +436,12 @@
                   const Range* right_range,
                   RangeBoundary* min,
                   RangeBoundary* max);
+
+  static void TruncDiv(const Range* left_range,
+                       const Range* right_range,
+                       RangeBoundary* min,
+                       RangeBoundary* max);
+
   static void Shr(const Range* left_range,
                   const Range* right_range,
                   RangeBoundary* min,
@@ -560,7 +566,9 @@
                                        Instruction* after);
 
   bool ConstrainValueAfterBranch(Value* use, Definition* defn);
-  void ConstrainValueAfterCheckArrayBound(Value* use, Definition* defn);
+  void ConstrainValueAfterCheckBound(Value* use,
+                                     CheckBoundBase* check,
+                                     Definition* defn);
 
   // Infer ranges for integer (smi or mint) definitions.
   void InferRanges();
diff --git a/runtime/vm/compiler/backend/redundancy_elimination.cc b/runtime/vm/compiler/backend/redundancy_elimination.cc
index c507504..f29815c 100644
--- a/runtime/vm/compiler/backend/redundancy_elimination.cc
+++ b/runtime/vm/compiler/backend/redundancy_elimination.cc
@@ -202,7 +202,7 @@
         LoadIndexedInstr* load_indexed = instr->AsLoadIndexed();
         set_representation(load_indexed->representation());
         instance_ = load_indexed->array()->definition()->OriginalDefinition();
-        SetIndex(load_indexed->index()->definition(),
+        SetIndex(load_indexed->index()->definition()->OriginalDefinition(),
                  load_indexed->index_scale(), load_indexed->class_id());
         *is_load = true;
         break;
@@ -213,7 +213,7 @@
         set_representation(store_indexed->RequiredInputRepresentation(
             StoreIndexedInstr::kValuePos));
         instance_ = store_indexed->array()->definition()->OriginalDefinition();
-        SetIndex(store_indexed->index()->definition(),
+        SetIndex(store_indexed->index()->definition()->OriginalDefinition(),
                  store_indexed->index_scale(), store_indexed->class_id());
         *is_store = true;
         break;
@@ -951,8 +951,8 @@
     for (Value* use = defn->input_use_list(); use != NULL;
          use = use->next_use()) {
       Instruction* instr = use->instruction();
-      if ((instr->IsRedefinition() || instr->IsAssertAssignable()) &&
-          HasLoadsFromPlace(instr->AsDefinition(), place)) {
+      if (UseIsARedefinition(use) &&
+          HasLoadsFromPlace(instr->Cast<Definition>(), place)) {
         return true;
       }
       bool is_load = false, is_store;
@@ -966,6 +966,14 @@
     return false;
   }
 
+  // Returns true if the given [use] is a redefinition (e.g. RedefinitionInstr,
+  // CheckNull, CheckArrayBound, etc).
+  static bool UseIsARedefinition(Value* use) {
+    Instruction* instr = use->instruction();
+    return instr->IsDefinition() &&
+           (instr->Cast<Definition>()->RedefinedValue() == use);
+  }
+
   // Check if any use of the definition can create an alias.
   // Can add more objects into aliasing_worklist_.
   bool AnyUseCreatesAlias(Definition* defn) {
@@ -978,8 +986,8 @@
            (use->use_index() == StoreIndexedInstr::kValuePos)) ||
           instr->IsStoreStaticField() || instr->IsPhi()) {
         return true;
-      } else if ((instr->IsAssertAssignable() || instr->IsRedefinition()) &&
-                 AnyUseCreatesAlias(instr->AsDefinition())) {
+      } else if (UseIsARedefinition(use) &&
+                 AnyUseCreatesAlias(instr->Cast<Definition>())) {
         return true;
       } else if ((instr->IsStoreInstanceField() &&
                   (use->use_index() !=
@@ -1017,15 +1025,14 @@
     // Find all stores into this object.
     for (Value* use = defn->input_use_list(); use != NULL;
          use = use->next_use()) {
-      if (use->instruction()->IsRedefinition() ||
-          use->instruction()->IsAssertAssignable()) {
-        MarkStoredValuesEscaping(use->instruction()->AsDefinition());
+      auto instr = use->instruction();
+      if (UseIsARedefinition(use)) {
+        MarkStoredValuesEscaping(instr->AsDefinition());
         continue;
       }
       if ((use->use_index() == StoreInstanceFieldInstr::kInstancePos) &&
-          use->instruction()->IsStoreInstanceField()) {
-        StoreInstanceFieldInstr* store =
-            use->instruction()->AsStoreInstanceField();
+          instr->IsStoreInstanceField()) {
+        StoreInstanceFieldInstr* store = instr->AsStoreInstanceField();
         Definition* value = store->value()->definition()->OriginalDefinition();
         if (value->Identity().IsNotAliased()) {
           value->SetIdentity(AliasIdentity::Aliased());
@@ -1256,8 +1263,11 @@
   } else if (current->IsCheckEitherNonSmi()) {
     current->AsCheckEitherNonSmi()->set_licm_hoisted(true);
   } else if (current->IsCheckArrayBound()) {
-    ASSERT(!FLAG_precompiled_mode);  // AOT uses non-deopting GenericCheckBound
+    ASSERT(!FLAG_precompiled_mode);  // speculative in JIT only
     current->AsCheckArrayBound()->set_licm_hoisted(true);
+  } else if (current->IsGenericCheckBound()) {
+    ASSERT(FLAG_precompiled_mode);  // non-speculative in AOT only
+    // Does not deopt, so no need for licm_hoisted flag.
   } else if (current->IsTestCids()) {
     current->AsTestCids()->set_licm_hoisted(true);
   }
@@ -1353,27 +1363,61 @@
   }
 }
 
+// Returns true if instruction may have a "visible" effect,
+static bool MayHaveVisibleEffect(Instruction* instr) {
+  switch (instr->tag()) {
+    case Instruction::kStoreInstanceField:
+    case Instruction::kStoreStaticField:
+    case Instruction::kStoreIndexed:
+    case Instruction::kStoreIndexedUnsafe:
+      return true;
+    default:
+      return instr->HasUnknownSideEffects() || instr->MayThrow();
+  }
+}
+
 void LICM::Optimize() {
   if (flow_graph()->function().ProhibitsHoistingCheckClass()) {
     // Do not hoist any.
     return;
   }
 
+  // Compute loops and induction in flow graph.
+  const LoopHierarchy& loop_hierarchy = flow_graph()->GetLoopHierarchy();
   const ZoneGrowableArray<BlockEntryInstr*>& loop_headers =
-      flow_graph()->GetLoopHierarchy().headers();
+      loop_hierarchy.headers();
+  loop_hierarchy.ComputeInduction();
 
   ZoneGrowableArray<BitVector*>* loop_invariant_loads =
       flow_graph()->loop_invariant_loads();
 
+  // Iterate over all loops.
   for (intptr_t i = 0; i < loop_headers.length(); ++i) {
     BlockEntryInstr* header = loop_headers[i];
-    // Skip loop that don't have a pre-header block.
-    BlockEntryInstr* pre_header = header->ImmediateDominator();
-    if (pre_header == NULL) continue;
 
-    for (BitVector::Iterator loop_it(header->loop_info()->blocks());
-         !loop_it.Done(); loop_it.Advance()) {
+    // Skip loops that don't have a pre-header block.
+    BlockEntryInstr* pre_header = header->ImmediateDominator();
+    if (pre_header == nullptr) {
+      continue;
+    }
+
+    // Flag that remains true as long as the loop has not seen any instruction
+    // that may have a "visible" effect (write, throw, or other side-effect).
+    bool seen_visible_effect = false;
+
+    // Iterate over all blocks in the loop.
+    LoopInfo* loop = header->loop_info();
+    for (BitVector::Iterator loop_it(loop->blocks()); !loop_it.Done();
+         loop_it.Advance()) {
       BlockEntryInstr* block = flow_graph()->preorder()[loop_it.Current()];
+
+      // Preserve the "visible" effect flag as long as the preorder traversal
+      // sees always-taken blocks. This way, we can only hoist invariant
+      // may-throw instructions that are always seen during the first iteration.
+      if (!seen_visible_effect && !loop->IsAlwaysTaken(block)) {
+        seen_visible_effect = true;
+      }
+      // Iterate over all instructions in the block.
       for (ForwardInstructionIterator it(block); !it.Done(); it.Advance()) {
         Instruction* current = it.Current();
 
@@ -1382,24 +1426,35 @@
         // Otherwise we might move load past the initialization.
         if (LoadStaticFieldInstr* load = current->AsLoadStaticField()) {
           if (load->AllowsCSE() && !load->IsFieldInitialized()) {
+            seen_visible_effect = true;
             continue;
           }
         }
 
+        // Determine if we can hoist loop invariant code. Even may-throw
+        // instructions can be hoisted as long as its exception is still
+        // the very first "visible" effect of the loop.
+        bool is_loop_invariant = false;
         if ((current->AllowsCSE() ||
              IsLoopInvariantLoad(loop_invariant_loads, i, current)) &&
-            !current->MayThrow()) {
-          bool inputs_loop_invariant = true;
-          for (int i = 0; i < current->InputCount(); ++i) {
+            (!seen_visible_effect || !current->MayThrow())) {
+          is_loop_invariant = true;
+          for (intptr_t i = 0; i < current->InputCount(); ++i) {
             Definition* input_def = current->InputAt(i)->definition();
             if (!input_def->GetBlock()->Dominates(pre_header)) {
-              inputs_loop_invariant = false;
+              is_loop_invariant = false;
               break;
             }
           }
-          if (inputs_loop_invariant) {
-            Hoist(&it, pre_header, current);
-          }
+        }
+
+        // Hoist if all inputs are loop invariant. If not hoisted, any
+        // instruction that writes, may throw, or has an unknown side
+        // effect invalidates the first "visible" effect flag.
+        if (is_loop_invariant) {
+          Hoist(&it, pre_header, current);
+        } else if (!seen_visible_effect && MayHaveVisibleEffect(current)) {
+          seen_visible_effect = true;
         }
       }
     }
@@ -3128,18 +3183,270 @@
   }
 }
 
-void TryCatchAnalyzer::Optimize(FlowGraph* flow_graph) {
+// TryCatchAnalyzer tries to reduce the state that needs to be synchronized
+// on entry to the catch by discovering Parameter-s which are never used
+// or which are always constant.
+//
+// This analysis is similar to dead/redundant phi elimination because
+// Parameter instructions serve as "implicit" phis.
+//
+// Caveat: when analyzing which Parameter-s are redundant we limit ourselves to
+// constant values because CatchBlockEntry-s are hanging out directly from
+// GraphEntry and thus they are only dominated by constants from GraphEntry -
+// thus we can't replace Parameter with arbitrary Definition which is not a
+// Constant even if we know that this Parameter is redundant and would always
+// evaluate to that Definition.
+class TryCatchAnalyzer : public ValueObject {
+ public:
+  explicit TryCatchAnalyzer(FlowGraph* flow_graph, bool is_aot)
+      : flow_graph_(flow_graph),
+        is_aot_(is_aot),
+        // Initial capacity is selected based on trivial examples.
+        worklist_(flow_graph, /*initial_capacity=*/10) {}
+
+  // Run analysis and eliminate dead/redundant Parameter-s.
+  void Optimize();
+
+ private:
+  // In precompiled mode we can eliminate all parameters that have no real uses
+  // and subsequently clear out corresponding slots in the environments assigned
+  // to instructions that can throw an exception which would be caught by
+  // the corresponding CatchEntryBlock.
+  //
+  // Computing "dead" parameters is essentially a fixed point algorithm because
+  // Parameter value can flow into another Parameter via an environment attached
+  // to an instruction that can throw.
+  //
+  // Note: this optimization pass assumes that environment values are only
+  // used during catching, that is why it should only be used in AOT mode.
+  void OptimizeDeadParameters() {
+    ASSERT(is_aot_);
+
+    NumberCatchEntryParameters();
+    ComputeIncommingValues();
+    CollectAliveParametersOrPhis();
+    PropagateLivenessToInputs();
+    EliminateDeadParameters();
+  }
+
+  // Assign sequential ids to each ParameterInstr in each CatchEntryBlock.
+  // Collect reverse mapping from try indexes to corresponding catches.
+  void NumberCatchEntryParameters() {
+    for (auto catch_entry : flow_graph_->graph_entry()->catch_entries()) {
+      const GrowableArray<Definition*>& idefs =
+          *catch_entry->initial_definitions();
+      for (auto idef : idefs) {
+        if (idef->IsParameter()) {
+          idef->set_place_id(parameter_info_.length());
+          parameter_info_.Add(new ParameterInfo(idef->AsParameter()));
+        }
+      }
+
+      catch_by_index_.EnsureLength(catch_entry->catch_try_index() + 1, nullptr);
+      catch_by_index_[catch_entry->catch_try_index()] = catch_entry;
+    }
+  }
+
+  // Compute potential incoming values for each Parameter in each catch block
+  // by looking into environments assigned to MayThrow instructions within
+  // blocks covered by the corresponding catch.
+  void ComputeIncommingValues() {
+    for (auto block : flow_graph_->reverse_postorder()) {
+      if (block->try_index() == -1) continue;
+
+      auto catch_entry = catch_by_index_[block->try_index()];
+      const auto& idefs = *catch_entry->initial_definitions();
+
+      for (ForwardInstructionIterator instr_it(block); !instr_it.Done();
+           instr_it.Advance()) {
+        Instruction* current = instr_it.Current();
+        if (!current->MayThrow()) continue;
+
+        Environment* env = current->env()->Outermost();
+        ASSERT(env != nullptr);
+
+        for (intptr_t env_idx = 0; env_idx < idefs.length(); ++env_idx) {
+          if (ParameterInstr* param = idefs[env_idx]->AsParameter()) {
+            Definition* defn = env->ValueAt(env_idx)->definition();
+
+            // Add defn as an incoming value to the parameter if it is not
+            // already present in the list.
+            bool found = false;
+            for (auto other_defn :
+                 parameter_info_[param->place_id()]->incoming) {
+              if (other_defn == defn) {
+                found = true;
+                break;
+              }
+            }
+            if (!found) {
+              parameter_info_[param->place_id()]->incoming.Add(defn);
+            }
+          }
+        }
+      }
+    }
+  }
+
+  // Find all parameters (and phis) that are definitely alive - because they
+  // have non-phi uses and place them into worklist.
+  //
+  // Note: phis that only have phi (and environment) uses would be marked as
+  // dead.
+  void CollectAliveParametersOrPhis() {
+    for (auto block : flow_graph_->reverse_postorder()) {
+      if (JoinEntryInstr* join = block->AsJoinEntry()) {
+        if (join->phis() == nullptr) continue;
+
+        for (auto phi : *join->phis()) {
+          phi->mark_dead();
+          if (HasNonPhiUse(phi)) {
+            MarkLive(phi);
+          }
+        }
+      }
+    }
+
+    for (auto info : parameter_info_) {
+      if (HasNonPhiUse(info->instr)) {
+        MarkLive(info->instr);
+      }
+    }
+  }
+
+  // Propagate liveness from live parameters and phis to other parameters and
+  // phis transitively.
+  void PropagateLivenessToInputs() {
+    while (!worklist_.IsEmpty()) {
+      Definition* defn = worklist_.RemoveLast();
+      if (ParameterInstr* param = defn->AsParameter()) {
+        auto s = parameter_info_[param->place_id()];
+        for (auto input : s->incoming) {
+          MarkLive(input);
+        }
+      } else if (PhiInstr* phi = defn->AsPhi()) {
+        for (intptr_t i = 0; i < phi->InputCount(); i++) {
+          MarkLive(phi->InputAt(i)->definition());
+        }
+      }
+    }
+  }
+
+  // Mark definition as live if it is a dead Phi or a dead Parameter and place
+  // them into worklist.
+  void MarkLive(Definition* defn) {
+    if (PhiInstr* phi = defn->AsPhi()) {
+      if (!phi->is_alive()) {
+        phi->mark_alive();
+        worklist_.Add(phi);
+      }
+    } else if (ParameterInstr* param = defn->AsParameter()) {
+      if (param->place_id() != -1) {
+        auto input_s = parameter_info_[param->place_id()];
+        if (!input_s->alive) {
+          input_s->alive = true;
+          worklist_.Add(param);
+        }
+      }
+    }
+  }
+
+  // Replace all dead parameters with null value and clear corresponding
+  // slots in environments.
+  void EliminateDeadParameters() {
+    for (auto info : parameter_info_) {
+      if (!info->alive) {
+        info->instr->ReplaceUsesWith(flow_graph_->constant_null());
+      }
+    }
+
+    for (auto block : flow_graph_->reverse_postorder()) {
+      if (block->try_index() == -1) continue;
+
+      auto catch_entry = catch_by_index_[block->try_index()];
+      const auto& idefs = *catch_entry->initial_definitions();
+
+      for (ForwardInstructionIterator instr_it(block); !instr_it.Done();
+           instr_it.Advance()) {
+        Instruction* current = instr_it.Current();
+        if (!current->MayThrow()) continue;
+
+        Environment* env = current->env()->Outermost();
+        RELEASE_ASSERT(env != nullptr);
+
+        for (intptr_t env_idx = 0; env_idx < idefs.length(); ++env_idx) {
+          if (ParameterInstr* param = idefs[env_idx]->AsParameter()) {
+            if (!parameter_info_[param->place_id()]->alive) {
+              env->ValueAt(env_idx)->BindToEnvironment(
+                  flow_graph_->constant_null());
+            }
+          }
+        }
+      }
+    }
+
+    DeadCodeElimination::RemoveDeadAndRedundantPhisFromTheGraph(flow_graph_);
+  }
+
+  // Returns true if definition has a use in an instruction which is not a phi.
+  static bool HasNonPhiUse(Definition* defn) {
+    for (Value* use = defn->input_use_list(); use != nullptr;
+         use = use->next_use()) {
+      if (!use->instruction()->IsPhi()) {
+        return true;
+      }
+    }
+    return false;
+  }
+
+  struct ParameterInfo : public ZoneAllocated {
+    explicit ParameterInfo(ParameterInstr* instr) : instr(instr) {}
+
+    ParameterInstr* instr;
+    bool alive = false;
+    GrowableArray<Definition*> incoming;
+  };
+
+  FlowGraph* const flow_graph_;
+  const bool is_aot_;
+
+  // Additional information for each Parameter from each CatchBlockEntry.
+  // Parameter-s are numbered and their number is stored in
+  // Instruction::place_id() field which is otherwise not used for anything
+  // at this stage.
+  GrowableArray<ParameterInfo*> parameter_info_;
+
+  // Mapping from catch_try_index to corresponding CatchBlockEntry-s.
+  GrowableArray<CatchBlockEntryInstr*> catch_by_index_;
+
+  // Worklist for live Phi and Parameter instructions which need to be
+  // processed by PropagateLivenessToInputs.
+  DefinitionWorklist worklist_;
+};
+
+void OptimizeCatchEntryStates(FlowGraph* flow_graph, bool is_aot) {
+  if (flow_graph->graph_entry()->catch_entries().is_empty()) {
+    return;
+  }
+
+  TryCatchAnalyzer analyzer(flow_graph, is_aot);
+  analyzer.Optimize();
+}
+
+void TryCatchAnalyzer::Optimize() {
+  // Analyze catch entries and remove "dead" Parameter instructions.
+  if (is_aot_) {
+    OptimizeDeadParameters();
+  }
+
   // For every catch-block: Iterate over all call instructions inside the
   // corresponding try-block and figure out for each environment value if it
   // is the same constant at all calls. If yes, replace the initial definition
   // at the catch-entry with this constant.
   const GrowableArray<CatchBlockEntryInstr*>& catch_entries =
-      flow_graph->graph_entry()->catch_entries();
+      flow_graph_->graph_entry()->catch_entries();
 
-  for (intptr_t catch_idx = 0; catch_idx < catch_entries.length();
-       ++catch_idx) {
-    CatchBlockEntryInstr* catch_entry = catch_entries[catch_idx];
-
+  for (auto catch_entry : catch_entries) {
     // Initialize cdefs with the original initial definitions (ParameterInstr).
     // The following representation is used:
     // ParameterInstr => unknown
@@ -3153,10 +3460,10 @@
     // generator functions they may be context-allocated in which case they are
     // not tracked in the environment anyway.
 
-    cdefs[flow_graph->EnvIndex(catch_entry->raw_exception_var())] = NULL;
-    cdefs[flow_graph->EnvIndex(catch_entry->raw_stacktrace_var())] = NULL;
+    cdefs[flow_graph_->EnvIndex(catch_entry->raw_exception_var())] = nullptr;
+    cdefs[flow_graph_->EnvIndex(catch_entry->raw_stacktrace_var())] = nullptr;
 
-    for (BlockIterator block_it = flow_graph->reverse_postorder_iterator();
+    for (BlockIterator block_it = flow_graph_->reverse_postorder_iterator();
          !block_it.Done(); block_it.Advance()) {
       BlockEntryInstr* block = block_it.Current();
       if (block->try_index() == catch_entry->catch_try_index()) {
@@ -3165,17 +3472,17 @@
           Instruction* current = instr_it.Current();
           if (current->MayThrow()) {
             Environment* env = current->env()->Outermost();
-            ASSERT(env != NULL);
+            ASSERT(env != nullptr);
             for (intptr_t env_idx = 0; env_idx < cdefs.length(); ++env_idx) {
-              if (cdefs[env_idx] != NULL && !cdefs[env_idx]->IsConstant() &&
+              if (cdefs[env_idx] != nullptr && !cdefs[env_idx]->IsConstant() &&
                   env->ValueAt(env_idx)->BindsToConstant()) {
                 // If the recorded definition is not a constant, record this
                 // definition as the current constant definition.
                 cdefs[env_idx] = env->ValueAt(env_idx)->definition();
               }
               if (cdefs[env_idx] != env->ValueAt(env_idx)->definition()) {
-                // Non-constant definitions are reset to NULL.
-                cdefs[env_idx] = NULL;
+                // Non-constant definitions are reset to nullptr.
+                cdefs[env_idx] = nullptr;
               }
             }
           }
@@ -3183,13 +3490,12 @@
       }
     }
     for (intptr_t j = 0; j < idefs->length(); ++j) {
-      if (cdefs[j] != NULL && cdefs[j]->IsConstant()) {
-        // TODO(fschneider): Use constants from the constant pool.
+      if (cdefs[j] != nullptr && cdefs[j]->IsConstant()) {
         Definition* old = (*idefs)[j];
         ConstantInstr* orig = cdefs[j]->AsConstant();
         ConstantInstr* copy =
-            new (flow_graph->zone()) ConstantInstr(orig->value());
-        copy->set_ssa_temp_index(flow_graph->alloc_ssa_temp_index());
+            new (flow_graph_->zone()) ConstantInstr(orig->value());
+        copy->set_ssa_temp_index(flow_graph_->alloc_ssa_temp_index());
         old->ReplaceUsesWith(copy);
         (*idefs)[j] = copy;
       }
@@ -3218,7 +3524,7 @@
         PhiInstr* phi = it.Current();
         // Phis that have uses and phis inside try blocks are
         // marked as live.
-        if (HasRealUse(phi) || join->InsideTryBlock()) {
+        if (HasRealUse(phi)) {
           live_phis.Add(phi);
           phi->mark_alive();
         } else {
@@ -3240,28 +3546,31 @@
     }
   }
 
-  for (BlockIterator it(flow_graph->postorder_iterator()); !it.Done();
-       it.Advance()) {
-    JoinEntryInstr* join = it.Current()->AsJoinEntry();
-    if (join != NULL) {
-      if (join->phis_ == NULL) continue;
+  RemoveDeadAndRedundantPhisFromTheGraph(flow_graph);
+}
+
+void DeadCodeElimination::RemoveDeadAndRedundantPhisFromTheGraph(
+    FlowGraph* flow_graph) {
+  for (auto block : flow_graph->postorder()) {
+    if (JoinEntryInstr* join = block->AsJoinEntry()) {
+      if (join->phis_ == nullptr) continue;
 
       // Eliminate dead phis and compact the phis_ array of the block.
       intptr_t to_index = 0;
       for (intptr_t i = 0; i < join->phis_->length(); ++i) {
         PhiInstr* phi = (*join->phis_)[i];
-        if (phi != NULL) {
+        if (phi != nullptr) {
           if (!phi->is_alive()) {
             phi->ReplaceUsesWith(flow_graph->constant_null());
             phi->UnuseAllInputs();
-            (*join->phis_)[i] = NULL;
+            (*join->phis_)[i] = nullptr;
             if (FLAG_trace_optimization) {
               THR_Print("Removing dead phi v%" Pd "\n", phi->ssa_temp_index());
             }
           } else if (phi->IsRedundant()) {
             phi->ReplaceUsesWith(phi->InputAt(0)->definition());
             phi->UnuseAllInputs();
-            (*join->phis_)[i] = NULL;
+            (*join->phis_)[i] = nullptr;
             if (FLAG_trace_optimization) {
               THR_Print("Removing redundant phi v%" Pd "\n",
                         phi->ssa_temp_index());
@@ -3272,7 +3581,7 @@
         }
       }
       if (to_index == 0) {
-        join->phis_ = NULL;
+        join->phis_ = nullptr;
       } else {
         join->phis_->TruncateTo(to_index);
       }
diff --git a/runtime/vm/compiler/backend/redundancy_elimination.h b/runtime/vm/compiler/backend/redundancy_elimination.h
index f759073..6fb3438 100644
--- a/runtime/vm/compiler/backend/redundancy_elimination.h
+++ b/runtime/vm/compiler/backend/redundancy_elimination.h
@@ -100,15 +100,20 @@
 
 class DeadCodeElimination : public AllStatic {
  public:
+  // Discover phis that have no real (non-phi) uses and don't escape into
+  // deoptimization environments and eliminate them.
   static void EliminateDeadPhis(FlowGraph* graph);
+
+  // Remove phis that are not marked alive from the graph.
+  static void RemoveDeadAndRedundantPhisFromTheGraph(FlowGraph* graph);
 };
 
 // Optimize spill stores inside try-blocks by identifying values that always
 // contain a single known constant at catch block entry.
-class TryCatchAnalyzer : public AllStatic {
- public:
-  static void Optimize(FlowGraph* flow_graph);
-};
+// If is_aot is passed then this optimization can assume that no deoptimization
+// can occur and environments assigned to instructions are only used to
+// compute try/catch sync moves.
+void OptimizeCatchEntryStates(FlowGraph* flow_graph, bool is_aot);
 
 // Loop invariant code motion.
 class LICM : public ValueObject {
diff --git a/runtime/vm/compiler/backend/redundancy_elimination_test.cc b/runtime/vm/compiler/backend/redundancy_elimination_test.cc
new file mode 100644
index 0000000..e06aca3
--- /dev/null
+++ b/runtime/vm/compiler/backend/redundancy_elimination_test.cc
@@ -0,0 +1,554 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#include "vm/compiler/backend/redundancy_elimination.h"
+
+#include <functional>
+
+#include "vm/compiler/backend/block_builder.h"
+#include "vm/compiler/backend/il_printer.h"
+#include "vm/compiler/backend/il_test_helper.h"
+#include "vm/compiler/backend/inliner.h"
+#include "vm/compiler/backend/loops.h"
+#include "vm/compiler/backend/type_propagator.h"
+#include "vm/compiler/compiler_pass.h"
+#include "vm/compiler/frontend/kernel_to_il.h"
+#include "vm/compiler/jit/jit_call_specializer.h"
+#include "vm/log.h"
+#include "vm/object.h"
+#include "vm/parser.h"
+#include "vm/symbols.h"
+#include "vm/unit_test.h"
+
+namespace dart {
+
+static void NoopNative(Dart_NativeArguments args) {}
+
+static Dart_NativeFunction NoopNativeLookup(Dart_Handle name,
+                                            int argument_count,
+                                            bool* auto_setup_scope) {
+  ASSERT(auto_setup_scope != nullptr);
+  *auto_setup_scope = false;
+  return reinterpret_cast<Dart_NativeFunction>(&NoopNative);
+}
+
+// Flatten all non-captured LocalVariables from the given scope and its children
+// and siblings into the given array based on their environment index.
+static void FlattenScopeIntoEnvironment(FlowGraph* graph,
+                                        LocalScope* scope,
+                                        GrowableArray<LocalVariable*>* env) {
+  for (intptr_t i = 0; i < scope->num_variables(); i++) {
+    auto var = scope->VariableAt(i);
+    if (var->is_captured()) {
+      continue;
+    }
+
+    auto index = graph->EnvIndex(var);
+    env->EnsureLength(index + 1, nullptr);
+    (*env)[index] = var;
+  }
+
+  if (scope->sibling() != nullptr) {
+    FlattenScopeIntoEnvironment(graph, scope->sibling(), env);
+  }
+  if (scope->child() != nullptr) {
+    FlattenScopeIntoEnvironment(graph, scope->child(), env);
+  }
+}
+
+// Run TryCatchAnalyzer optimization on the function foo from the given script
+// and check that the only variables from the given list are synchronized
+// on catch entry.
+static void TryCatchOptimizerTest(
+    Thread* thread,
+    const char* script_chars,
+    std::initializer_list<const char*> synchronized) {
+  // Load the script and exercise the code once.
+  const auto& root_library =
+      Library::Handle(LoadTestScript(script_chars, &NoopNativeLookup));
+  Invoke(root_library, "main");
+
+  // Build the flow graph.
+  std::initializer_list<CompilerPass::Id> passes = {
+      CompilerPass::kComputeSSA,      CompilerPass::kTypePropagation,
+      CompilerPass::kApplyICData,     CompilerPass::kSelectRepresentations,
+      CompilerPass::kTypePropagation, CompilerPass::kCanonicalize,
+  };
+  const auto& function = Function::Handle(GetFunction(root_library, "foo"));
+  TestPipeline pipeline(function, CompilerPass::kJIT);
+  FlowGraph* graph = pipeline.RunPasses(passes);
+
+  // Finally run TryCatchAnalyzer on the graph (in AOT mode).
+  OptimizeCatchEntryStates(graph, /*is_aot=*/true);
+
+  EXPECT_EQ(1, graph->graph_entry()->catch_entries().length());
+  auto scope = graph->parsed_function().node_sequence()->scope();
+
+  GrowableArray<LocalVariable*> env;
+  FlattenScopeIntoEnvironment(graph, scope, &env);
+
+  for (intptr_t i = 0; i < env.length(); i++) {
+    bool found = false;
+    for (auto name : synchronized) {
+      if (env[i]->name().Equals(name)) {
+        found = true;
+        break;
+      }
+    }
+    if (!found) {
+      env[i] = nullptr;
+    }
+  }
+
+  CatchBlockEntryInstr* catch_entry = graph->graph_entry()->catch_entries()[0];
+
+  // We should only synchronize state for variables from the synchronized list.
+  for (auto defn : *catch_entry->initial_definitions()) {
+    if (ParameterInstr* param = defn->AsParameter()) {
+      EXPECT(0 <= param->index() && param->index() < env.length());
+      EXPECT(env[param->index()] != nullptr);
+    }
+  }
+}
+
+//
+// Tests for TryCatchOptimizer.
+//
+
+ISOLATE_UNIT_TEST_CASE(TryCatchOptimizer_DeadParameterElimination_Simple1) {
+  const char* script_chars = R"(
+      dynamic blackhole([dynamic val]) native 'BlackholeNative';
+      foo(int p) {
+        var a = blackhole(), b = blackhole();
+        try {
+          blackhole([a, b]);
+        } catch (e) {
+          // nothing is used
+        }
+      }
+      main() {
+        foo(42);
+      }
+  )";
+
+  TryCatchOptimizerTest(thread, script_chars, /*synchronized=*/{});
+}
+
+ISOLATE_UNIT_TEST_CASE(TryCatchOptimizer_DeadParameterElimination_Simple2) {
+  const char* script_chars = R"(
+      dynamic blackhole([dynamic val]) native 'BlackholeNative';
+      foo(int p) {
+        var a = blackhole(), b = blackhole();
+        try {
+          blackhole([a, b]);
+        } catch (e) {
+          // a should be synchronized
+          blackhole(a);
+        }
+      }
+      main() {
+        foo(42);
+      }
+  )";
+
+  TryCatchOptimizerTest(thread, script_chars, /*synchronized=*/{"a"});
+}
+
+ISOLATE_UNIT_TEST_CASE(TryCatchOptimizer_DeadParameterElimination_Cyclic1) {
+  const char* script_chars = R"(
+      dynamic blackhole([dynamic val]) native 'BlackholeNative';
+      foo(int p) {
+        var a = blackhole(), b;
+        for (var i = 0; i < 42; i++) {
+          b = blackhole();
+          try {
+            blackhole([a, b]);
+          } catch (e) {
+            // a and i should be synchronized
+          }
+        }
+      }
+      main() {
+        foo(42);
+      }
+  )";
+
+  TryCatchOptimizerTest(thread, script_chars, /*synchronized=*/{"a", "i"});
+}
+
+ISOLATE_UNIT_TEST_CASE(TryCatchOptimizer_DeadParameterElimination_Cyclic2) {
+  const char* script_chars = R"(
+      dynamic blackhole([dynamic val]) native 'BlackholeNative';
+      foo(int p) {
+        var a = blackhole(), b = blackhole();
+        for (var i = 0; i < 42; i++) {
+          try {
+            blackhole([a, b]);
+          } catch (e) {
+            // a, b and i should be synchronized
+          }
+        }
+      }
+      main() {
+        foo(42);
+      }
+  )";
+
+  TryCatchOptimizerTest(thread, script_chars, /*synchronized=*/{"a", "b", "i"});
+}
+
+// LoadOptimizer tests
+
+// This family of tests verifies behavior of load forwarding when alias for an
+// allocation A is created by creating a redefinition for it and then
+// letting redefinition escape.
+static void TestAliasingViaRedefinition(
+    Thread* thread,
+    bool make_it_escape,
+    std::function<Definition*(CompilerState* S, FlowGraph*, Definition*)>
+        make_redefinition) {
+  const char* script_chars = R"(
+    dynamic blackhole([a, b, c, d, e, f]) native 'BlackholeNative';
+    class K {
+      var field;
+    }
+  )";
+  const Library& lib =
+      Library::Handle(LoadTestScript(script_chars, NoopNativeLookup));
+
+  const Class& cls = Class::Handle(
+      lib.LookupLocalClass(String::Handle(Symbols::New(thread, "K"))));
+  const Error& err = Error::Handle(cls.EnsureIsFinalized(thread));
+  EXPECT(err.IsNull());
+
+  const Field& field = Field::Handle(
+      cls.LookupField(String::Handle(Symbols::New(thread, "field"))));
+  EXPECT(!field.IsNull());
+
+  const Function& blackhole =
+      Function::ZoneHandle(GetFunction(lib, "blackhole"));
+
+  using compiler::BlockBuilder;
+  CompilerState S(thread);
+  FlowGraphBuilderHelper H;
+
+  // We are going to build the following graph:
+  //
+  // B0[graph_entry]
+  // B1[function_entry]:
+  //   v0 <- AllocateObject(class K)
+  //   v1 <- LoadField(v0, K.field)
+  //   v2 <- make_redefinition(v0)
+  //   PushArgument(v1)
+  // #if make_it_escape
+  //   PushArgument(v2)
+  // #endif
+  //   v3 <- StaticCall(blackhole, v1, v2)
+  //   v4 <- LoadField(v2, K.field)
+  //   Return v4
+
+  auto b1 = H.flow_graph()->graph_entry()->normal_entry();
+  AllocateObjectInstr* v0;
+  LoadFieldInstr* v1;
+  PushArgumentInstr* push_v1;
+  LoadFieldInstr* v4;
+  ReturnInstr* ret;
+
+  {
+    BlockBuilder builder(H.flow_graph(), b1);
+    auto& slot = Slot::Get(field, &H.flow_graph()->parsed_function());
+    v0 = builder.AddDefinition(new AllocateObjectInstr(
+        TokenPosition::kNoSource, cls, new PushArgumentsArray(0)));
+    v1 = builder.AddDefinition(
+        new LoadFieldInstr(new Value(v0), slot, TokenPosition::kNoSource));
+    auto v2 = builder.AddDefinition(make_redefinition(&S, H.flow_graph(), v0));
+    auto args = new PushArgumentsArray(2);
+    push_v1 = builder.AddInstruction(new PushArgumentInstr(new Value(v1)));
+    args->Add(push_v1);
+    if (make_it_escape) {
+      auto push_v2 =
+          builder.AddInstruction(new PushArgumentInstr(new Value(v2)));
+      args->Add(push_v2);
+    }
+    builder.AddInstruction(new StaticCallInstr(
+        TokenPosition::kNoSource, blackhole, 0, Array::empty_array(), args,
+        S.GetNextDeoptId(), 0, ICData::RebindRule::kStatic));
+    v4 = builder.AddDefinition(
+        new LoadFieldInstr(new Value(v2), slot, TokenPosition::kNoSource));
+    ret = builder.AddInstruction(new ReturnInstr(
+        TokenPosition::kNoSource, new Value(v4), S.GetNextDeoptId()));
+  }
+  H.FinishGraph();
+  DominatorBasedCSE::Optimize(H.flow_graph());
+
+  if (make_it_escape) {
+    // Allocation must be considered aliased.
+    EXPECT_PROPERTY(v0, !it.Identity().IsNotAliased());
+  } else {
+    // Allocation must be considered not-aliased.
+    EXPECT_PROPERTY(v0, it.Identity().IsNotAliased());
+  }
+
+  // v1 should have been removed from the graph and replaced with constant_null.
+  EXPECT_PROPERTY(v1, it.next() == nullptr && it.previous() == nullptr);
+  EXPECT_PROPERTY(push_v1,
+                  it.value()->definition() == H.flow_graph()->constant_null());
+
+  if (make_it_escape) {
+    // v4 however should not be removed from the graph, because v0 escapes into
+    // blackhole.
+    EXPECT_PROPERTY(v4, it.next() != nullptr && it.previous() != nullptr);
+    EXPECT_PROPERTY(ret, it.value()->definition() == v4);
+  } else {
+    // If v0 it not aliased then v4 should also be removed from the graph.
+    EXPECT_PROPERTY(v4, it.next() == nullptr && it.previous() == nullptr);
+    EXPECT_PROPERTY(
+        ret, it.value()->definition() == H.flow_graph()->constant_null());
+  }
+}
+
+static Definition* MakeCheckNull(CompilerState* S,
+                                 FlowGraph* flow_graph,
+                                 Definition* defn) {
+  return new CheckNullInstr(new Value(defn), String::ZoneHandle(),
+                            S->GetNextDeoptId(), TokenPosition::kNoSource);
+}
+
+static Definition* MakeRedefinition(CompilerState* S,
+                                    FlowGraph* flow_graph,
+                                    Definition* defn) {
+  return new RedefinitionInstr(new Value(defn));
+}
+
+static Definition* MakeAssertAssignable(CompilerState* S,
+                                        FlowGraph* flow_graph,
+                                        Definition* defn) {
+  return new AssertAssignableInstr(TokenPosition::kNoSource, new Value(defn),
+                                   new Value(flow_graph->constant_null()),
+                                   new Value(flow_graph->constant_null()),
+                                   AbstractType::ZoneHandle(Type::ObjectType()),
+                                   Symbols::Empty(), S->GetNextDeoptId());
+}
+
+ISOLATE_UNIT_TEST_CASE(LoadOptimizer_RedefinitionAliasing_CheckNull_NoEscape) {
+  TestAliasingViaRedefinition(thread, /*make_it_escape=*/false, MakeCheckNull);
+}
+
+ISOLATE_UNIT_TEST_CASE(LoadOptimizer_RedefinitionAliasing_CheckNull_Escape) {
+  TestAliasingViaRedefinition(thread, /*make_it_escape=*/true, MakeCheckNull);
+}
+
+ISOLATE_UNIT_TEST_CASE(
+    LoadOptimizer_RedefinitionAliasing_Redefinition_NoEscape) {
+  TestAliasingViaRedefinition(thread, /*make_it_escape=*/false,
+                              MakeRedefinition);
+}
+
+ISOLATE_UNIT_TEST_CASE(LoadOptimizer_RedefinitionAliasing_Redefinition_Escape) {
+  TestAliasingViaRedefinition(thread, /*make_it_escape=*/true,
+                              MakeRedefinition);
+}
+
+ISOLATE_UNIT_TEST_CASE(
+    LoadOptimizer_RedefinitionAliasing_AssertAssignable_NoEscape) {
+  TestAliasingViaRedefinition(thread, /*make_it_escape=*/false,
+                              MakeAssertAssignable);
+}
+
+ISOLATE_UNIT_TEST_CASE(
+    LoadOptimizer_RedefinitionAliasing_AssertAssignable_Escape) {
+  TestAliasingViaRedefinition(thread, /*make_it_escape=*/true,
+                              MakeAssertAssignable);
+}
+
+// This family of tests verifies behavior of load forwarding when alias for an
+// allocation A is created by storing it into another object B and then
+// either loaded from it ([make_it_escape] is true) or object B itself
+// escapes ([make_host_escape] is true).
+// We insert redefinition for object B to check that use list traversal
+// correctly discovers all loads and stores from B.
+static void TestAliasingViaStore(
+    Thread* thread,
+    bool make_it_escape,
+    bool make_host_escape,
+    std::function<Definition*(CompilerState* S, FlowGraph*, Definition*)>
+        make_redefinition) {
+  const char* script_chars = R"(
+    dynamic blackhole([a, b, c, d, e, f]) native 'BlackholeNative';
+    class K {
+      var field;
+    }
+  )";
+  const Library& lib =
+      Library::Handle(LoadTestScript(script_chars, NoopNativeLookup));
+
+  const Class& cls = Class::Handle(
+      lib.LookupLocalClass(String::Handle(Symbols::New(thread, "K"))));
+  const Error& err = Error::Handle(cls.EnsureIsFinalized(thread));
+  EXPECT(err.IsNull());
+
+  const Field& field = Field::Handle(
+      cls.LookupField(String::Handle(Symbols::New(thread, "field"))));
+  EXPECT(!field.IsNull());
+
+  const Function& blackhole =
+      Function::ZoneHandle(GetFunction(lib, "blackhole"));
+
+  using compiler::BlockBuilder;
+  CompilerState S(thread);
+  FlowGraphBuilderHelper H;
+
+  // We are going to build the following graph:
+  //
+  // B0[graph_entry]
+  // B1[function_entry]:
+  //   v0 <- AllocateObject(class K)
+  //   v5 <- AllocateObject(class K)
+  // #if !make_host_escape
+  //   StoreField(v5 . K.field = v0)
+  // #endif
+  //   v1 <- LoadField(v0, K.field)
+  //   v2 <- REDEFINITION(v5)
+  //   PushArgument(v1)
+  // #if make_it_escape
+  //   v6 <- LoadField(v2, K.field)
+  //   PushArgument(v6)
+  // #elif make_host_escape
+  //   StoreField(v2 . K.field = v0)
+  //   PushArgument(v5)
+  // #endif
+  //   v3 <- StaticCall(blackhole, v1, v6)
+  //   v4 <- LoadField(v0, K.field)
+  //   Return v4
+
+  auto b1 = H.flow_graph()->graph_entry()->normal_entry();
+  AllocateObjectInstr* v0;
+  AllocateObjectInstr* v5;
+  LoadFieldInstr* v1;
+  PushArgumentInstr* push_v1;
+  LoadFieldInstr* v4;
+  ReturnInstr* ret;
+
+  {
+    BlockBuilder builder(H.flow_graph(), b1);
+    auto& slot = Slot::Get(field, &H.flow_graph()->parsed_function());
+    v0 = builder.AddDefinition(new AllocateObjectInstr(
+        TokenPosition::kNoSource, cls, new PushArgumentsArray(0)));
+    v5 = builder.AddDefinition(new AllocateObjectInstr(
+        TokenPosition::kNoSource, cls, new PushArgumentsArray(0)));
+    if (!make_host_escape) {
+      builder.AddInstruction(new StoreInstanceFieldInstr(
+          slot, new Value(v5), new Value(v0), kEmitStoreBarrier,
+          TokenPosition::kNoSource));
+    }
+    v1 = builder.AddDefinition(
+        new LoadFieldInstr(new Value(v0), slot, TokenPosition::kNoSource));
+    auto v2 = builder.AddDefinition(make_redefinition(&S, H.flow_graph(), v5));
+    push_v1 = builder.AddInstruction(new PushArgumentInstr(new Value(v1)));
+    auto args = new PushArgumentsArray(2);
+    args->Add(push_v1);
+    if (make_it_escape) {
+      auto v6 = builder.AddDefinition(
+          new LoadFieldInstr(new Value(v2), slot, TokenPosition::kNoSource));
+      auto push_v6 =
+          builder.AddInstruction(new PushArgumentInstr(new Value(v6)));
+      args->Add(push_v6);
+    } else if (make_host_escape) {
+      builder.AddInstruction(new StoreInstanceFieldInstr(
+          slot, new Value(v2), new Value(v0), kEmitStoreBarrier,
+          TokenPosition::kNoSource));
+      args->Add(builder.AddInstruction(new PushArgumentInstr(new Value(v5))));
+    }
+    builder.AddInstruction(new StaticCallInstr(
+        TokenPosition::kNoSource, blackhole, 0, Array::empty_array(), args,
+        S.GetNextDeoptId(), 0, ICData::RebindRule::kStatic));
+    v4 = builder.AddDefinition(
+        new LoadFieldInstr(new Value(v0), slot, TokenPosition::kNoSource));
+    ret = builder.AddInstruction(new ReturnInstr(
+        TokenPosition::kNoSource, new Value(v4), S.GetNextDeoptId()));
+  }
+  H.FinishGraph();
+  DominatorBasedCSE::Optimize(H.flow_graph());
+
+  if (make_it_escape || make_host_escape) {
+    // Allocation must be considered aliased.
+    EXPECT_PROPERTY(v0, !it.Identity().IsNotAliased());
+  } else {
+    // Allocation must not be considered aliased.
+    EXPECT_PROPERTY(v0, it.Identity().IsNotAliased());
+  }
+
+  if (make_host_escape) {
+    EXPECT_PROPERTY(v5, !it.Identity().IsNotAliased());
+  } else {
+    EXPECT_PROPERTY(v5, it.Identity().IsNotAliased());
+  }
+
+  // v1 should have been removed from the graph and replaced with constant_null.
+  EXPECT_PROPERTY(v1, it.next() == nullptr && it.previous() == nullptr);
+  EXPECT_PROPERTY(push_v1,
+                  it.value()->definition() == H.flow_graph()->constant_null());
+
+  if (make_it_escape || make_host_escape) {
+    // v4 however should not be removed from the graph, because v0 escapes into
+    // blackhole.
+    EXPECT_PROPERTY(v4, it.next() != nullptr && it.previous() != nullptr);
+    EXPECT_PROPERTY(ret, it.value()->definition() == v4);
+  } else {
+    // If v0 it not aliased then v4 should also be removed from the graph.
+    EXPECT_PROPERTY(v4, it.next() == nullptr && it.previous() == nullptr);
+    EXPECT_PROPERTY(
+        ret, it.value()->definition() == H.flow_graph()->constant_null());
+  }
+}
+
+ISOLATE_UNIT_TEST_CASE(LoadOptimizer_AliasingViaStore_CheckNull_NoEscape) {
+  TestAliasingViaStore(thread, /*make_it_escape=*/false,
+                       /* make_host_escape= */ false, MakeCheckNull);
+}
+
+ISOLATE_UNIT_TEST_CASE(LoadOptimizer_AliasingViaStore_CheckNull_Escape) {
+  TestAliasingViaStore(thread, /*make_it_escape=*/true,
+                       /* make_host_escape= */ false, MakeCheckNull);
+}
+
+ISOLATE_UNIT_TEST_CASE(LoadOptimizer_AliasingViaStore_CheckNull_EscapeViaHost) {
+  TestAliasingViaStore(thread, /*make_it_escape=*/false,
+                       /* make_host_escape= */ true, MakeCheckNull);
+}
+
+ISOLATE_UNIT_TEST_CASE(LoadOptimizer_AliasingViaStore_Redefinition_NoEscape) {
+  TestAliasingViaStore(thread, /*make_it_escape=*/false,
+                       /* make_host_escape= */ false, MakeRedefinition);
+}
+
+ISOLATE_UNIT_TEST_CASE(LoadOptimizer_AliasingViaStore_Redefinition_Escape) {
+  TestAliasingViaStore(thread, /*make_it_escape=*/true,
+                       /* make_host_escape= */ false, MakeRedefinition);
+}
+
+ISOLATE_UNIT_TEST_CASE(
+    LoadOptimizer_AliasingViaStore_Redefinition_EscapeViaHost) {
+  TestAliasingViaStore(thread, /*make_it_escape=*/false,
+                       /* make_host_escape= */ true, MakeRedefinition);
+}
+
+ISOLATE_UNIT_TEST_CASE(
+    LoadOptimizer_AliasingViaStore_AssertAssignable_NoEscape) {
+  TestAliasingViaStore(thread, /*make_it_escape=*/false,
+                       /* make_host_escape= */ false, MakeAssertAssignable);
+}
+
+ISOLATE_UNIT_TEST_CASE(LoadOptimizer_AliasingViaStore_AssertAssignable_Escape) {
+  TestAliasingViaStore(thread, /*make_it_escape=*/true,
+                       /* make_host_escape= */ false, MakeAssertAssignable);
+}
+
+ISOLATE_UNIT_TEST_CASE(
+    LoadOptimizer_AliasingViaStore_AssertAssignable_EscapeViaHost) {
+  TestAliasingViaStore(thread, /*make_it_escape=*/false,
+                       /* make_host_escape= */ true, MakeAssertAssignable);
+}
+
+}  // namespace dart
diff --git a/runtime/vm/compiler/backend/slot.cc b/runtime/vm/compiler/backend/slot.cc
index f1c01f9..df6904b 100644
--- a/runtime/vm/compiler/backend/slot.cc
+++ b/runtime/vm/compiler/backend/slot.cc
@@ -70,10 +70,10 @@
 // Note: should only be called with cids of array-like classes.
 const Slot& Slot::GetLengthFieldForArrayCid(intptr_t array_cid) {
   if (RawObject::IsExternalTypedDataClassId(array_cid) ||
-      RawObject::IsTypedDataClassId(array_cid)) {
-    return GetNativeSlot(Kind::kTypedData_length);
+      RawObject::IsTypedDataClassId(array_cid) ||
+      RawObject::IsTypedDataViewClassId(array_cid)) {
+    return GetNativeSlot(Kind::kTypedDataBase_length);
   }
-
   switch (array_cid) {
     case kGrowableObjectArrayCid:
       return GetNativeSlot(Kind::kGrowableObjectArray_length);
diff --git a/runtime/vm/compiler/backend/slot.h b/runtime/vm/compiler/backend/slot.h
index d448e40..ef6a408 100644
--- a/runtime/vm/compiler/backend/slot.h
+++ b/runtime/vm/compiler/backend/slot.h
@@ -58,7 +58,10 @@
   V(Closure, hash, Context, VAR)                                               \
   V(GrowableObjectArray, length, Smi, VAR)                                     \
   V(GrowableObjectArray, data, Array, VAR)                                     \
-  V(TypedData, length, Smi, FINAL)                                             \
+  V(TypedDataBase, data_field, Dynamic, FINAL)                                 \
+  V(TypedDataBase, length, Smi, FINAL)                                         \
+  V(TypedDataView, offset_in_bytes, Smi, FINAL)                                \
+  V(TypedDataView, data, Dynamic, FINAL)                                       \
   V(String, length, Smi, FINAL)                                                \
   V(LinkedHashMap, index, TypedDataUint32Array, VAR)                           \
   V(LinkedHashMap, data, Array, VAR)                                           \
@@ -67,7 +70,8 @@
   V(LinkedHashMap, deleted_keys, Smi, VAR)                                     \
   V(ArgumentsDescriptor, type_args_len, Smi, FINAL)                            \
   V(ArgumentsDescriptor, positional_count, Smi, FINAL)                         \
-  V(ArgumentsDescriptor, count, Smi, FINAL)
+  V(ArgumentsDescriptor, count, Smi, FINAL)                                    \
+  V(Pointer, c_memory_address, Integer, FINAL)
 
 // Slot is an abstraction that describes an readable (and possibly writeable)
 // location within an object.
diff --git a/runtime/vm/compiler/backend/type_propagator.cc b/runtime/vm/compiler/backend/type_propagator.cc
index 4f707cd..0dec0c9 100644
--- a/runtime/vm/compiler/backend/type_propagator.cc
+++ b/runtime/vm/compiler/backend/type_propagator.cc
@@ -192,17 +192,21 @@
   }
 }
 
+void FlowGraphTypePropagator::GrowTypes(intptr_t up_to) {
+  // Grow types array if a new redefinition was inserted.
+  for (intptr_t i = types_.length(); i <= up_to; ++i) {
+    types_.Add(nullptr);
+  }
+}
+
 void FlowGraphTypePropagator::EnsureMoreAccurateRedefinition(
     Instruction* prev,
     Definition* original,
     CompileType new_type) {
   RedefinitionInstr* redef =
       flow_graph_->EnsureRedefinition(prev, original, new_type);
-  // Grow types array if a new redefinition was inserted.
-  if (redef != NULL) {
-    for (intptr_t i = types_.length(); i <= redef->ssa_temp_index() + 1; ++i) {
-      types_.Add(NULL);
-    }
+  if (redef != nullptr) {
+    GrowTypes(redef->ssa_temp_index() + 1);
   }
 }
 
@@ -280,9 +284,21 @@
   Definition* receiver = check->value()->definition();
   CompileType* type = TypeOf(receiver);
   if (type->is_nullable()) {
-    // Insert redefinition for the receiver to guard against invalid
-    // code motion.
-    EnsureMoreAccurateRedefinition(check, receiver, type->CopyNonNullable());
+    // If the type is nullable, translate an implicit control
+    // dependence to an explicit data dependence at this point
+    // to guard against invalid code motion later. Valid code
+    // motion of the check may still enable valid code motion
+    // of the checked code.
+    if (check->ssa_temp_index() == -1) {
+      flow_graph_->AllocateSSAIndexes(check);
+      GrowTypes(check->ssa_temp_index() + 1);
+    }
+    FlowGraph::RenameDominatedUses(receiver, check, check);
+    // Set non-nullable type on check itself (but avoid None()).
+    CompileType result = type->CopyNonNullable();
+    if (!result.IsNone()) {
+      SetTypeOf(check, new (zone()) CompileType(result));
+    }
   }
 }
 
@@ -489,21 +505,19 @@
 
   Instruction* check_clone = NULL;
   if (check->IsCheckSmi()) {
-    check_clone =
-        new CheckSmiInstr(assert->value()->Copy(zone()),
-                          assert->env()->deopt_id(), check->token_pos());
+    check_clone = new CheckSmiInstr(assert->value()->Copy(zone()),
+                                    assert->deopt_id(), check->token_pos());
     check_clone->AsCheckSmi()->set_licm_hoisted(
         check->AsCheckSmi()->licm_hoisted());
   } else {
     ASSERT(check->IsCheckClass());
-    check_clone = new CheckClassInstr(
-        assert->value()->Copy(zone()), assert->env()->deopt_id(),
-        check->AsCheckClass()->cids(), check->token_pos());
+    check_clone =
+        new CheckClassInstr(assert->value()->Copy(zone()), assert->deopt_id(),
+                            check->AsCheckClass()->cids(), check->token_pos());
     check_clone->AsCheckClass()->set_licm_hoisted(
         check->AsCheckClass()->licm_hoisted());
   }
   ASSERT(check_clone != NULL);
-  ASSERT(assert->deopt_id() == assert->env()->deopt_id());
   check_clone->InsertBefore(assert);
   assert->env()->DeepCopyTo(zone(), check_clone);
 
@@ -566,12 +580,14 @@
 
 CompileType* CompileType::ComputeRefinedType(CompileType* old_type,
                                              CompileType* new_type) {
+  ASSERT(new_type != nullptr);
+
   // In general, prefer the newly inferred type over old type.
   // It is possible that new and old types are unrelated or do not intersect
   // at all (for example, in case of unreachable code).
 
   // Discard None type as it is used to denote an unknown type.
-  if (old_type->IsNone()) {
+  if (old_type == nullptr || old_type->IsNone()) {
     return new_type;
   }
   if (new_type->IsNone()) {
@@ -812,13 +828,22 @@
   return reaching_type_;
 }
 
-void Value::RefineReachingType(CompileType* type) {
-  ASSERT(type != NULL);
-  if (reaching_type_ == NULL) {
-    reaching_type_ = type;
-  } else {
-    reaching_type_ = CompileType::ComputeRefinedType(reaching_type_, type);
+void Value::SetReachingType(CompileType* type) {
+  // If [type] is owned but not by the definition which flows into this use
+  // then we need to disconect the type from original owner by cloning it.
+  // This is done to prevent situations when [type] is updated by its owner
+  // but [owner] is no longer connected to this use through def-use chain
+  // and as a result type propagator does not recompute type of the current
+  // instruction.
+  if (type != nullptr && type->owner() != nullptr &&
+      type->owner() != definition()) {
+    type = new CompileType(*type);
   }
+  reaching_type_ = type;
+}
+
+void Value::RefineReachingType(CompileType* type) {
+  SetReachingType(CompileType::ComputeRefinedType(reaching_type_, type));
 }
 
 CompileType PhiInstr::ComputeType() const {
@@ -880,6 +905,37 @@
   return UpdateType(ComputeType());
 }
 
+CompileType CheckNullInstr::ComputeType() const {
+  CompileType* type = value()->Type();
+  if (type->is_nullable()) {
+    CompileType result = type->CopyNonNullable();
+    if (!result.IsNone()) {
+      return result;
+    }
+  }
+  return *type;
+}
+
+bool CheckNullInstr::RecomputeType() {
+  return UpdateType(ComputeType());
+}
+
+CompileType CheckArrayBoundInstr::ComputeType() const {
+  return *index()->Type();
+}
+
+bool CheckArrayBoundInstr::RecomputeType() {
+  return UpdateType(ComputeType());
+}
+
+CompileType GenericCheckBoundInstr::ComputeType() const {
+  return *index()->Type();
+}
+
+bool GenericCheckBoundInstr::RecomputeType() {
+  return UpdateType(ComputeType());
+}
+
 CompileType IfThenElseInstr::ComputeType() const {
   return CompileType::FromCid(kSmiCid);
 }
@@ -940,8 +996,8 @@
   // Parameter is the receiver.
   if ((index() == 0) &&
       (function.IsDynamicFunction() || function.IsGenerativeConstructor())) {
-    LocalScope* scope = graph_entry->parsed_function().node_sequence()->scope();
-    const AbstractType& type = scope->VariableAt(index())->type();
+    const AbstractType& type =
+        graph_entry->parsed_function().ParameterVariable(index())->type();
     if (type.IsObjectType() || type.IsNullType()) {
       // Receiver can be null.
       return CompileType::FromAbstractType(type, CompileType::kNullable);
@@ -1402,6 +1458,10 @@
   return CompileType::Dynamic();
 }
 
+bool CheckedSmiOpInstr::RecomputeType() {
+  return UpdateType(ComputeType());
+}
+
 CompileType CheckedSmiComparisonInstr::ComputeType() const {
   if (Isolate::Current()->can_use_strong_mode_types()) {
     CompileType* type = call()->Type();
@@ -1461,6 +1521,7 @@
 
 CompileType UnboxInstr::ComputeType() const {
   switch (representation()) {
+    case kUnboxedFloat:
     case kUnboxedDouble:
       return CompileType::FromCid(kDoubleCid);
 
@@ -1484,6 +1545,7 @@
 
 CompileType BoxInstr::ComputeType() const {
   switch (from_representation()) {
+    case kUnboxedFloat:
     case kUnboxedDouble:
       return CompileType::FromCid(kDoubleCid);
 
diff --git a/runtime/vm/compiler/backend/type_propagator.h b/runtime/vm/compiler/backend/type_propagator.h
index 28627ba..d59acf7 100644
--- a/runtime/vm/compiler/backend/type_propagator.h
+++ b/runtime/vm/compiler/backend/type_propagator.h
@@ -53,6 +53,9 @@
   // Mark definition as having given class id in all dominated instructions.
   void SetCid(Definition* value, intptr_t cid);
 
+  // Grow type array up to new index.
+  void GrowTypes(intptr_t up_to);
+
   // Ensures that redefinition with more accurate type is inserted after given
   // instruction.
   void EnsureMoreAccurateRedefinition(Instruction* prev,
diff --git a/runtime/vm/compiler/backend/type_propagator_test.cc b/runtime/vm/compiler/backend/type_propagator_test.cc
new file mode 100644
index 0000000..89bc20c
--- /dev/null
+++ b/runtime/vm/compiler/backend/type_propagator_test.cc
@@ -0,0 +1,400 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#include <utility>
+
+#include "vm/compiler/backend/block_builder.h"
+#include "vm/compiler/backend/il_printer.h"
+#include "vm/compiler/backend/il_test_helper.h"
+#include "vm/compiler/backend/inliner.h"
+#include "vm/compiler/backend/loops.h"
+#include "vm/compiler/backend/redundancy_elimination.h"
+#include "vm/compiler/backend/type_propagator.h"
+#include "vm/compiler/compiler_pass.h"
+#include "vm/compiler/frontend/kernel_to_il.h"
+#include "vm/compiler/jit/compiler.h"
+#include "vm/compiler/jit/jit_call_specializer.h"
+#include "vm/log.h"
+#include "vm/object.h"
+#include "vm/parser.h"
+#include "vm/symbols.h"
+#include "vm/unit_test.h"
+
+namespace dart {
+
+using compiler::BlockBuilder;
+
+ISOLATE_UNIT_TEST_CASE(TypePropagator_RedefinitionAfterStrictCompareWithNull) {
+  CompilerState S(thread);
+
+  FlowGraphBuilderHelper H;
+
+  // Add a variable into the scope which would provide static type for the
+  // parameter.
+  LocalVariable* v0_var =
+      new LocalVariable(TokenPosition::kNoSource, TokenPosition::kNoSource,
+                        String::Handle(Symbols::New(thread, "v0")),
+                        AbstractType::ZoneHandle(Type::IntType()));
+  v0_var->set_type_check_mode(LocalVariable::kTypeCheckedByCaller);
+  H.flow_graph()->parsed_function().node_sequence()->scope()->AddVariable(
+      v0_var);
+
+  auto normal_entry = H.flow_graph()->graph_entry()->normal_entry();
+
+  // We are going to build the following graph:
+  //
+  // B0[graph_entry]:
+  // B1[function_entry]:
+  //   v0 <- Parameter(0)
+  //   if v0 == null then B2 else B3
+  // B2:
+  //   Return(v0)
+  // B3:
+  //   Return(v0)
+
+  Definition* v0;
+  auto b2 = H.TargetEntry();
+  auto b3 = H.TargetEntry();
+
+  {
+    BlockBuilder builder(H.flow_graph(), normal_entry);
+    v0 = builder.AddParameter(0, /*with_frame=*/true);
+    builder.AddBranch(
+        new StrictCompareInstr(
+            TokenPosition::kNoSource, Token::kEQ_STRICT, new Value(v0),
+            new Value(H.flow_graph()->GetConstant(Object::Handle())),
+            /*needs_number_check=*/false, S.GetNextDeoptId()),
+        b2, b3);
+  }
+
+  {
+    BlockBuilder builder(H.flow_graph(), b2);
+    builder.AddReturn(new Value(v0));
+  }
+
+  {
+    BlockBuilder builder(H.flow_graph(), b3);
+    builder.AddReturn(new Value(v0));
+  }
+
+  H.FinishGraph();
+
+  FlowGraphTypePropagator::Propagate(H.flow_graph());
+
+  // We expect that v0 is inferred to be nullable int because that is what
+  // static type of an associated variable tells us.
+  EXPECT(v0->Type()->IsNullableInt());
+
+  // In B2 v0 should not have any additional type information so reaching
+  // type should be still nullable int.
+  auto b2_value = b2->last_instruction()->AsReturn()->value();
+  EXPECT(b2_value->Type()->IsNullableInt());
+
+  // In B3 v0 is constrained by comparison with null - it should be non-nullable
+  // integer. There should be a Redefinition inserted to prevent LICM past
+  // the branch.
+  auto b3_value = b3->last_instruction()->AsReturn()->value();
+  EXPECT(b3_value->Type()->IsInt());
+  EXPECT(b3_value->definition()->IsRedefinition());
+  EXPECT(b3_value->definition()->GetBlock() == b3);
+}
+
+ISOLATE_UNIT_TEST_CASE(
+    TypePropagator_RedefinitionAfterStrictCompareWithLoadClassId) {
+  CompilerState S(thread);
+
+  FlowGraphBuilderHelper H;
+
+  // We are going to build the following graph:
+  //
+  // B0[graph_entry]:
+  // B1[function_entry]:
+  //   v0 <- Parameter(0)
+  //   v1 <- LoadClassId(v0)
+  //   if v1 == kDoubleCid then B2 else B3
+  // B2:
+  //   Return(v0)
+  // B3:
+  //   Return(v0)
+
+  Definition* v0;
+  auto b1 = H.flow_graph()->graph_entry()->normal_entry();
+  auto b2 = H.TargetEntry();
+  auto b3 = H.TargetEntry();
+
+  {
+    BlockBuilder builder(H.flow_graph(), b1);
+    v0 = builder.AddParameter(0, /*with_frame=*/true);
+    auto load_cid = builder.AddDefinition(new LoadClassIdInstr(new Value(v0)));
+    builder.AddBranch(
+        new StrictCompareInstr(
+            TokenPosition::kNoSource, Token::kEQ_STRICT, new Value(load_cid),
+            new Value(H.IntConstant(kDoubleCid)),
+            /*needs_number_check=*/false, S.GetNextDeoptId()),
+        b2, b3);
+  }
+
+  {
+    BlockBuilder builder(H.flow_graph(), b2);
+    builder.AddReturn(new Value(v0));
+  }
+
+  {
+    BlockBuilder builder(H.flow_graph(), b3);
+    builder.AddReturn(new Value(v0));
+  }
+
+  H.FinishGraph();
+
+  FlowGraphTypePropagator::Propagate(H.flow_graph());
+
+  // There should be no information available about the incoming type of
+  // the parameter either on entry or in B3.
+  EXPECT_PROPERTY(v0->Type()->ToAbstractType(), it.IsDynamicType());
+  auto b3_value = b3->last_instruction()->AsReturn()->value();
+  EXPECT(b3_value->Type() == v0->Type());
+
+  // In B3 v0 is constrained by comparison of its cid with kDoubleCid - it
+  // should be non-nullable double. There should be a Redefinition inserted to
+  // prevent LICM past the branch.
+  auto b2_value = b2->last_instruction()->AsReturn()->value();
+  EXPECT_PROPERTY(b2_value->Type(), it.IsDouble());
+  EXPECT_PROPERTY(b2_value->definition(), it.IsRedefinition());
+  EXPECT_PROPERTY(b2_value->definition()->GetBlock(), &it == b2);
+}
+
+ISOLATE_UNIT_TEST_CASE(TypePropagator_Refinement) {
+  CompilerState S(thread);
+
+  const Class& object_class =
+      Class::Handle(thread->isolate()->object_store()->object_class());
+
+  const Function& target_func = Function::ZoneHandle(Function::New(
+      String::Handle(Symbols::New(thread, "dummy2")),
+      RawFunction::kRegularFunction,
+      /*is_static=*/true,
+      /*is_const=*/false,
+      /*is_abstract=*/false,
+      /*is_external=*/false,
+      /*is_native=*/true, object_class, TokenPosition::kNoSource));
+  target_func.set_result_type(AbstractType::Handle(Type::IntType()));
+
+  const Field& field = Field::ZoneHandle(
+      Field::New(String::Handle(Symbols::New(thread, "dummy")),
+                 /*is_static=*/true,
+                 /*is_final=*/false,
+                 /*is_const=*/false,
+                 /*is_reflectable=*/true, object_class, Object::dynamic_type(),
+                 TokenPosition::kNoSource, TokenPosition::kNoSource));
+
+  FlowGraphBuilderHelper H;
+
+  // We are going to build the following graph:
+  //
+  // B0[graph_entry]
+  // B1[function_entry]:
+  //   v0 <- Parameter(0)
+  //   v1 <- Constant(0)
+  //   if v0 == 1 then B3 else B2
+  // B2:
+  //   v2 <- StaticCall(target_func)
+  //   goto B4
+  // B3:
+  //   goto B4
+  // B4:
+  //  v3 <- phi(v1, v2)
+  //  return v5
+
+  Definition* v0;
+  Definition* v2;
+  PhiInstr* v3;
+  auto b1 = H.flow_graph()->graph_entry()->normal_entry();
+  auto b2 = H.TargetEntry();
+  auto b3 = H.TargetEntry();
+  auto b4 = H.JoinEntry();
+
+  {
+    BlockBuilder builder(H.flow_graph(), b1);
+    v0 = builder.AddParameter(0, /*with_frame=*/true);
+    builder.AddBranch(new StrictCompareInstr(
+                          TokenPosition::kNoSource, Token::kEQ_STRICT,
+                          new Value(v0), new Value(H.IntConstant(1)),
+                          /*needs_number_check=*/false, S.GetNextDeoptId()),
+                      b2, b3);
+  }
+
+  {
+    BlockBuilder builder(H.flow_graph(), b2);
+    v2 = builder.AddDefinition(
+        new StaticCallInstr(TokenPosition::kNoSource, target_func,
+                            /*type_args_len=*/0,
+                            /*argument_names=*/Array::empty_array(),
+                            new PushArgumentsArray(0), S.GetNextDeoptId(),
+                            /*call_count=*/0, ICData::RebindRule::kStatic));
+    builder.AddInstruction(new GotoInstr(b4, S.GetNextDeoptId()));
+  }
+
+  {
+    BlockBuilder builder(H.flow_graph(), b3);
+    builder.AddInstruction(new GotoInstr(b4, S.GetNextDeoptId()));
+  }
+
+  {
+    BlockBuilder builder(H.flow_graph(), b4);
+    v3 = H.Phi(b4, {{b2, v2}, {b3, H.IntConstant(0)}});
+    builder.AddPhi(v3);
+    builder.AddReturn(new Value(v3));
+  }
+
+  H.FinishGraph();
+  FlowGraphTypePropagator::Propagate(H.flow_graph());
+
+  EXPECT_PROPERTY(v2->Type(), it.IsNullableInt());
+  EXPECT_PROPERTY(v3->Type(), it.IsNullableInt());
+
+  auto v4 = new LoadStaticFieldInstr(
+      new Value(H.flow_graph()->GetConstant(field)), TokenPosition::kNoSource);
+  H.flow_graph()->InsertBefore(v2, v4, nullptr, FlowGraph::kValue);
+  v2->ReplaceUsesWith(v4);
+  v2->RemoveFromGraph();
+
+  FlowGraphTypePropagator::Propagate(H.flow_graph());
+
+  EXPECT_PROPERTY(v3->Type(), it.IsNullableInt());
+}
+
+// This test verifies that mutable compile types are not incorrectly cached
+// as reaching types after inference.
+ISOLATE_UNIT_TEST_CASE(TypePropagator_Regress36156) {
+  CompilerState S(thread);
+  FlowGraphBuilderHelper H;
+
+  // We are going to build the following graph:
+  //
+  // B0[graph_entry]
+  // B1[function_entry]:
+  //   v0 <- Parameter(0)
+  //   v1 <- Constant(42)
+  //   v2 <- Constant(24)
+  //   v4 <- Constant(1.0)
+  //   if v0 == 1 then B6 else B2
+  // B2:
+  //   if v0 == 2 then B3 else B4
+  // B3:
+  //   goto B5
+  // B4:
+  //   goto B5
+  // B5:
+  //   v3 <- phi(v1, v2)
+  //   goto B7
+  // B6:
+  //   goto B7
+  // B7:
+  //  v5 <- phi(v4, v3)
+  //  return v5
+
+  Definition* v0;
+  PhiInstr* v3;
+  PhiInstr* v5;
+  auto b1 = H.flow_graph()->graph_entry()->normal_entry();
+  auto b2 = H.TargetEntry();
+  auto b3 = H.TargetEntry();
+  auto b4 = H.TargetEntry();
+  auto b5 = H.JoinEntry();
+  auto b6 = H.TargetEntry();
+  auto b7 = H.JoinEntry();
+
+  {
+    BlockBuilder builder(H.flow_graph(), b1);
+    v0 = builder.AddParameter(0, /*with_frame=*/true);
+    builder.AddBranch(new StrictCompareInstr(
+                          TokenPosition::kNoSource, Token::kEQ_STRICT,
+                          new Value(v0), new Value(H.IntConstant(1)),
+                          /*needs_number_check=*/false, S.GetNextDeoptId()),
+                      b6, b2);
+  }
+
+  {
+    BlockBuilder builder(H.flow_graph(), b2);
+    builder.AddBranch(new StrictCompareInstr(
+                          TokenPosition::kNoSource, Token::kEQ_STRICT,
+                          new Value(v0), new Value(H.IntConstant(2)),
+                          /*needs_number_check=*/false, S.GetNextDeoptId()),
+                      b3, b4);
+  }
+
+  {
+    BlockBuilder builder(H.flow_graph(), b3);
+    builder.AddInstruction(new GotoInstr(b5, S.GetNextDeoptId()));
+  }
+
+  {
+    BlockBuilder builder(H.flow_graph(), b4);
+    builder.AddInstruction(new GotoInstr(b5, S.GetNextDeoptId()));
+  }
+
+  {
+    BlockBuilder builder(H.flow_graph(), b5);
+    v3 = H.Phi(b5, {{b3, H.IntConstant(42)}, {b4, H.IntConstant(24)}});
+    builder.AddPhi(v3);
+    builder.AddInstruction(new GotoInstr(b7, S.GetNextDeoptId()));
+  }
+
+  {
+    BlockBuilder builder(H.flow_graph(), b6);
+    builder.AddInstruction(new GotoInstr(b7, S.GetNextDeoptId()));
+  }
+
+  {
+    BlockBuilder builder(H.flow_graph(), b7);
+    v5 = H.Phi(b7, {{b5, v3}, {b6, H.DoubleConstant(1.0)}});
+    builder.AddPhi(v5);
+    builder.AddInstruction(new ReturnInstr(TokenPosition::kNoSource,
+                                           new Value(v5), S.GetNextDeoptId()));
+  }
+
+  H.FinishGraph();
+
+  FlowGraphTypePropagator::Propagate(H.flow_graph());
+
+  // We expect that v3 has an integer type, and v5 is either T{Object} or
+  // T{num}.
+  EXPECT_PROPERTY(v3->Type(), it.IsInt());
+  EXPECT_PROPERTY(v5->Type()->ToAbstractType(),
+                  it.IsObjectType() || it.IsNumberType());
+
+  // Now unbox v3 phi by inserting unboxing for both inputs and boxing
+  // for the result.
+  {
+    v3->set_representation(kUnboxedInt64);
+    for (intptr_t i = 0; i < v3->InputCount(); i++) {
+      auto input = v3->InputAt(i);
+      auto unbox =
+          new UnboxInt64Instr(input->CopyWithType(), S.GetNextDeoptId(),
+                              Instruction::kNotSpeculative);
+      H.flow_graph()->InsertBefore(
+          v3->block()->PredecessorAt(i)->last_instruction(), unbox, nullptr,
+          FlowGraph::kValue);
+      input->BindTo(unbox);
+    }
+
+    auto box = new BoxInt64Instr(new Value(v3));
+    v3->ReplaceUsesWith(box);
+    H.flow_graph()->InsertBefore(b4->last_instruction(), box, nullptr,
+                                 FlowGraph::kValue);
+  }
+
+  // Run type propagation again.
+  FlowGraphTypePropagator::Propagate(H.flow_graph());
+
+  // If CompileType of v3 would be cached as a reaching type at its use in
+  // v5 then we will be incorrect type propagation results.
+  // We expect that v3 has an integer type, and v5 is either T{Object} or
+  // T{num}.
+  EXPECT_PROPERTY(v3->Type(), it.IsInt());
+  EXPECT_PROPERTY(v5->Type()->ToAbstractType(),
+                  it.IsObjectType() || it.IsNumberType());
+}
+
+}  // namespace dart
diff --git a/runtime/vm/compiler/backend/typed_data_aot_test.cc b/runtime/vm/compiler/backend/typed_data_aot_test.cc
new file mode 100644
index 0000000..65156bf
--- /dev/null
+++ b/runtime/vm/compiler/backend/typed_data_aot_test.cc
@@ -0,0 +1,450 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#include <vector>
+
+#include "vm/compiler/backend/il_printer.h"
+#include "vm/compiler/backend/il_test_helper.h"
+#include "vm/compiler/call_specializer.h"
+#include "vm/compiler/compiler_pass.h"
+#include "vm/object.h"
+#include "vm/unit_test.h"
+
+namespace dart {
+
+#if defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_DBC)
+
+// This test asserts that we are inlining accesses to typed data interfaces
+// (e.g. Uint8List) if there are no instantiated 3rd party classes.
+ISOLATE_UNIT_TEST_CASE(IRTest_TypedDataAOT_Inlining) {
+  const char* kScript =
+      R"(
+      import 'dart:typed_data';
+
+      void foo(Uint8List list, int from) {
+        if (from >= list.length) {
+          list[from];
+        }
+      }
+      )";
+
+  const auto& root_library = Library::Handle(LoadTestScript(kScript));
+  const auto& function = Function::Handle(GetFunction(root_library, "foo"));
+
+  TestPipeline pipeline(function, CompilerPass::kAOT);
+  FlowGraph* flow_graph = pipeline.RunPasses({});
+
+  auto entry = flow_graph->graph_entry()->normal_entry();
+  EXPECT(entry != nullptr);
+
+  CheckNullInstr* check_null = nullptr;
+  LoadFieldInstr* load_field = nullptr;
+  GenericCheckBoundInstr* bounds_check = nullptr;
+  Instruction* load_untagged = nullptr;
+  LoadIndexedInstr* load_indexed = nullptr;
+
+  ILMatcher cursor(flow_graph, entry);
+  RELEASE_ASSERT(cursor.TryMatch({
+      kMoveGlob,
+      {kMatchAndMoveCheckNull, &check_null},
+      {kMatchAndMoveLoadField, &load_field},
+      kMoveGlob,
+      kMatchAndMoveBranchTrue,
+      kMoveGlob,
+      {kMatchAndMoveGenericCheckBound, &bounds_check},
+      {kMatchAndMoveLoadUntagged, &load_untagged},
+      kMoveParallelMoves,
+      {kMatchAndMoveLoadIndexed, &load_indexed},
+      kMoveGlob,
+      kMatchReturn,
+  }));
+
+  EXPECT(load_field->InputAt(0)->definition()->IsParameter());
+  EXPECT(bounds_check->InputAt(0)->definition() == load_field);
+  EXPECT(load_untagged->InputAt(0)->definition()->IsParameter());
+  EXPECT(load_indexed->InputAt(0)->definition() == load_untagged);
+}
+
+// This test asserts that we are not inlining accesses to typed data interfaces
+// (e.g. Uint8List) if there are instantiated 3rd party classes (e.g.
+// UnmodifiableUint8ListView).
+ISOLATE_UNIT_TEST_CASE(IRTest_TypedDataAOT_NotInlining) {
+  const char* kScript =
+      R"(
+      import 'dart:typed_data';
+
+      createThirdPartyUint8List() => UnmodifiableUint8ListView(Uint8List(10));
+
+      void foo(Uint8List list, int from) {
+        if (from >= list.length) {
+          list[from];
+        }
+      }
+      )";
+
+  const auto& root_library = Library::Handle(LoadTestScript(kScript));
+
+  // Firstly we ensure a non internal/external/view Uint8List is allocated.
+  Invoke(root_library, "createThirdPartyUint8List");
+
+  // Now we ensure that we don't perform the inlining of the `list[from]`
+  // access.
+  const auto& function = Function::Handle(GetFunction(root_library, "foo"));
+  TestPipeline pipeline(function, CompilerPass::kAOT);
+  FlowGraph* flow_graph = pipeline.RunPasses({});
+
+  auto entry = flow_graph->graph_entry()->normal_entry();
+  EXPECT(entry != nullptr);
+
+  InstanceCallInstr* length_call = nullptr;
+  PushArgumentInstr* pusharg1 = nullptr;
+  PushArgumentInstr* pusharg2 = nullptr;
+  InstanceCallInstr* index_get_call = nullptr;
+
+  ILMatcher cursor(flow_graph, entry);
+  RELEASE_ASSERT(cursor.TryMatch({
+      kMoveGlob,
+      {kMatchAndMoveInstanceCall, &length_call},
+      kMoveGlob,
+      kMatchAndMoveBranchTrue,
+      kMoveGlob,
+      {kMatchAndMovePushArgument, &pusharg1},
+      {kMatchAndMovePushArgument, &pusharg2},
+      {kMatchAndMoveInstanceCall, &index_get_call},
+      kMoveGlob,
+      kMatchReturn,
+  }));
+
+  EXPECT(length_call->Selector() == Symbols::GetLength().raw());
+  EXPECT(pusharg1->InputAt(0)->definition()->IsParameter());
+  EXPECT(pusharg2->InputAt(0)->definition()->IsParameter());
+  EXPECT(index_get_call->Selector() == Symbols::IndexToken().raw());
+}
+
+// This test asserts that we are inlining get:length, [] and []= for all typed
+// data interfaces.  It also ensures that the asserted IR actually works by
+// exercising it.
+ISOLATE_UNIT_TEST_CASE(IRTest_TypedDataAOT_FunctionalGetSet) {
+  const char* kTemplate =
+      R"(
+      import 'dart:typed_data';
+
+      void reverse%s(%s list) {
+        final length = list.length;
+        final halfLength = length ~/ 2;
+        for (int i = 0; i < halfLength; ++i) {
+          final tmp = list[length-i-1];
+          list[length-i-1] = list[i];
+          list[i] = tmp;
+        }
+      }
+      )";
+
+  std::initializer_list<MatchCode> expected_il = {
+      // Before loop
+      kMoveGlob,
+      kMatchAndMoveCheckNull,
+      kMatchAndMoveLoadField,
+      kMoveGlob,
+      kMatchAndMoveBranchTrue,
+
+      // Loop
+      kMoveGlob,
+      // Load 1
+      kMatchAndMoveGenericCheckBound,
+      kMoveGlob,
+      kMatchAndMoveLoadUntagged,
+      kMoveParallelMoves,
+      kMatchAndMoveLoadIndexed,
+      kMoveGlob,
+      // Load 2
+      kMatchAndMoveGenericCheckBound,
+      kMoveGlob,
+      kMatchAndMoveLoadUntagged,
+      kMoveParallelMoves,
+      kMatchAndMoveLoadIndexed,
+      kMoveGlob,
+      // Store 1
+      kMatchAndMoveGenericCheckBound,
+      kMoveGlob,
+      kMoveParallelMoves,
+      kMatchAndMoveLoadUntagged,
+      kMoveParallelMoves,
+      kMatchAndMoveStoreIndexed,
+      kMoveGlob,
+      // Store 2
+      kMoveParallelMoves,
+      kMatchAndMoveLoadUntagged,
+      kMoveParallelMoves,
+      kMatchAndMoveStoreIndexed,
+      kMoveGlob,
+
+      // Exit the loop.
+      kMatchAndMoveBranchFalse,
+      kMoveGlob,
+      kMatchReturn,
+  };
+
+  char script_buffer[1024];
+  char uri_buffer[1024];
+  char function_name[1024];
+  auto& lib = Library::Handle();
+  auto& function = Function::Handle();
+  auto& view = TypedDataView::Handle();
+  auto& arguments = Array::Handle();
+  auto& result = Object::Handle();
+
+  auto run_reverse_list = [&](const char* name, const TypedDataBase& data) {
+    // Fill in the template with the [name].
+    Utils::SNPrint(script_buffer, sizeof(script_buffer), kTemplate, name, name);
+    Utils::SNPrint(uri_buffer, sizeof(uri_buffer), "file:///reverse-%s.dart",
+                   name);
+    Utils::SNPrint(function_name, sizeof(function_name), "reverse%s", name);
+
+    // Create a new library, load the function and compile it using our AOT
+    // pipeline.
+    lib = LoadTestScript(script_buffer, nullptr, uri_buffer);
+    function = GetFunction(lib, function_name);
+    TestPipeline pipeline(function, CompilerPass::kAOT);
+    FlowGraph* flow_graph = pipeline.RunPasses({});
+    auto entry = flow_graph->graph_entry()->normal_entry();
+
+    // Ensure the IL matches what we expect.
+    ILMatcher cursor(flow_graph, entry);
+    EXPECT(cursor.TryMatch(expected_il));
+
+    // Compile the graph and attach the code.
+    pipeline.CompileGraphAndAttachFunction();
+
+    // Class ids are numbered from internal/view/external.
+    const classid_t view_cid = data.GetClassId() + 1;
+    ASSERT(RawObject::IsTypedDataViewClassId(view_cid));
+
+    // First and last element are not in the view, i.e.
+    //    view[0:view.length()-1] = data[1:data.length()-2]
+    const intptr_t length_in_bytes =
+        (data.LengthInBytes() - 2 * data.ElementSizeInBytes());
+    view = TypedDataView::New(view_cid, data, data.ElementSizeInBytes(),
+                              length_in_bytes / data.ElementSizeInBytes());
+    ASSERT(data.ElementType() == view.ElementType());
+
+    arguments = Array::New(1);
+    arguments.SetAt(0, view);
+    result = DartEntry::InvokeFunction(function, arguments);
+    EXPECT(result.IsNull());
+
+    // Ensure we didn't deoptimize to unoptimized code.
+    EXPECT(function.unoptimized_code() == Code::null());
+  };
+
+  const auto& uint8_list =
+      TypedData::Handle(TypedData::New(kTypedDataUint8ArrayCid, 16));
+  const auto& uint8c_list =
+      TypedData::Handle(TypedData::New(kTypedDataUint8ClampedArrayCid, 16));
+  const auto& int16_list =
+      TypedData::Handle(TypedData::New(kTypedDataInt16ArrayCid, 16));
+  const auto& uint16_list =
+      TypedData::Handle(TypedData::New(kTypedDataUint16ArrayCid, 16));
+  const auto& int32_list =
+      TypedData::Handle(TypedData::New(kTypedDataInt32ArrayCid, 16));
+  const auto& uint32_list =
+      TypedData::Handle(TypedData::New(kTypedDataUint32ArrayCid, 16));
+  const auto& int64_list =
+      TypedData::Handle(TypedData::New(kTypedDataInt64ArrayCid, 16));
+  const auto& uint64_list =
+      TypedData::Handle(TypedData::New(kTypedDataUint64ArrayCid, 16));
+  const auto& float32_list =
+      TypedData::Handle(TypedData::New(kTypedDataFloat32ArrayCid, 16));
+  const auto& float64_list =
+      TypedData::Handle(TypedData::New(kTypedDataFloat64ArrayCid, 16));
+  const auto& int8_list =
+      TypedData::Handle(TypedData::New(kTypedDataInt8ArrayCid, 16));
+  for (intptr_t i = 0; i < 16; ++i) {
+    int8_list.SetInt8(i, i);
+    uint8_list.SetUint8(i, i);
+    uint8c_list.SetUint8(i, i);
+    int16_list.SetInt16(2 * i, i);
+    uint16_list.SetUint16(2 * i, i);
+    int32_list.SetInt32(4 * i, i);
+    uint32_list.SetUint32(4 * i, i);
+    int64_list.SetInt64(8 * i, i);
+    uint64_list.SetUint64(8 * i, i);
+    float32_list.SetFloat32(4 * i, i + 0.5);
+    float64_list.SetFloat64(8 * i, i + 0.7);
+  }
+  run_reverse_list("Uint8List", int8_list);
+  run_reverse_list("Int8List", uint8_list);
+  run_reverse_list("Uint8ClampedList", uint8c_list);
+  run_reverse_list("Int16List", int16_list);
+  run_reverse_list("Uint16List", uint16_list);
+  run_reverse_list("Int32List", int32_list);
+  run_reverse_list("Uint32List", uint32_list);
+  run_reverse_list("Int64List", int64_list);
+  run_reverse_list("Uint64List", uint64_list);
+  run_reverse_list("Float32List", float32_list);
+  run_reverse_list("Float64List", float64_list);
+  for (intptr_t i = 0; i < 16; ++i) {
+    // Only the values in the view are reversed.
+    const bool in_view = i >= 1 && i < 15;
+
+    const int64_t expected_value = in_view ? (16 - i - 1) : i;
+    const uint64_t expected_uvalue = in_view ? (16 - i - 1) : i;
+    const float expected_fvalue = (in_view ? (16 - i - 1) : i) + 0.5;
+    const double expected_dvalue = (in_view ? (16 - i - 1) : i) + 0.7;
+
+    EXPECT(int8_list.GetInt8(i) == expected_value);
+    EXPECT(uint8_list.GetUint8(i) == expected_uvalue);
+    EXPECT(uint8c_list.GetUint8(i) == expected_uvalue);
+    EXPECT(int16_list.GetInt16(2 * i) == expected_value);
+    EXPECT(uint16_list.GetUint16(2 * i) == expected_uvalue);
+    EXPECT(int32_list.GetInt32(4 * i) == expected_value);
+    EXPECT(uint32_list.GetUint32(4 * i) == expected_uvalue);
+    EXPECT(int64_list.GetInt64(8 * i) == expected_value);
+    EXPECT(uint64_list.GetUint64(8 * i) == expected_uvalue);
+    EXPECT(float32_list.GetFloat32(4 * i) == expected_fvalue);
+    EXPECT(float64_list.GetFloat64(8 * i) == expected_dvalue);
+  }
+}
+
+// This test asserts that we get errors if receiver, index or value are null.
+ISOLATE_UNIT_TEST_CASE(IRTest_TypedDataAOT_FunctionalIndexError) {
+  const char* kTemplate =
+      R"(
+      import 'dart:typed_data';
+      void set%s(%s list, int index, %s value) {
+        list[index] = value;
+      }
+      )";
+
+  std::initializer_list<MatchCode> expected_il = {
+      // Receiver null check
+      kMoveGlob,
+      kMatchAndMoveCheckNull,
+
+      // Index null check
+      kMoveGlob,
+      kMatchAndMoveCheckNull,
+
+      // Value null check
+      kMoveGlob,
+      kMatchAndMoveCheckNull,
+
+      // LoadField length
+      kMoveGlob,
+      kMatchAndMoveLoadField,
+
+      // Bounds check
+      kMoveGlob,
+      kMatchAndMoveGenericCheckBound,
+
+      // Store value.
+      kMoveGlob,
+      kMatchAndMoveLoadUntagged,
+      kMoveParallelMoves,
+      kMatchAndMoveOptionalUnbox,
+      kMoveParallelMoves,
+      kMatchAndMoveStoreIndexed,
+
+      // Return
+      kMoveGlob,
+      kMatchReturn,
+  };
+
+  char script_buffer[1024];
+  char uri_buffer[1024];
+  char function_name[1024];
+  auto& lib = Library::Handle();
+  auto& function = Function::Handle();
+  auto& arguments = Array::Handle();
+  auto& result = Object::Handle();
+
+  const intptr_t kIndex = 1;
+  const intptr_t kLastStage = 3;
+
+  auto run_test = [&](const char* name, const char* type,
+                      const TypedDataBase& data, const Object& value,
+                      int stage) {
+    // Fill in the template with the [name].
+    Utils::SNPrint(script_buffer, sizeof(script_buffer), kTemplate, name, name,
+                   type);
+    Utils::SNPrint(uri_buffer, sizeof(uri_buffer), "file:///set-%s.dart", name);
+    Utils::SNPrint(function_name, sizeof(function_name), "set%s", name);
+
+    // Create a new library, load the function and compile it using our AOT
+    // pipeline.
+    lib = LoadTestScript(script_buffer, nullptr, uri_buffer);
+    function = GetFunction(lib, function_name);
+    TestPipeline pipeline(function, CompilerPass::kAOT);
+    FlowGraph* flow_graph = pipeline.RunPasses({});
+    auto entry = flow_graph->graph_entry()->normal_entry();
+
+    // Ensure the IL matches what we expect.
+    ILMatcher cursor(flow_graph, entry, /*trace=*/true);
+    EXPECT(cursor.TryMatch(expected_il));
+
+    // Compile the graph and attach the code.
+    pipeline.CompileGraphAndAttachFunction();
+
+    arguments = Array::New(3);
+    arguments.SetAt(0, stage == 0 ? Object::null_object() : data);
+    arguments.SetAt(
+        1, stage == 1 ? Object::null_object() : Smi::Handle(Smi::New(kIndex)));
+    arguments.SetAt(2, stage == 2 ? Object::null_object() : value);
+    result = DartEntry::InvokeFunction(function, arguments);
+
+    // Ensure we didn't deoptimize to unoptimized code.
+    EXPECT(function.unoptimized_code() == Code::null());
+
+    if (stage == kLastStage) {
+      // The last stage must be successful
+      EXPECT(result.IsNull());
+    } else {
+      // Ensure we get an error.
+      EXPECT(result.IsUnhandledException());
+      result = UnhandledException::Cast(result).exception();
+    }
+  };
+
+  const auto& uint8_list =
+      TypedData::Handle(TypedData::New(kTypedDataUint8ArrayCid, 16));
+  const auto& uint8c_list =
+      TypedData::Handle(TypedData::New(kTypedDataUint8ClampedArrayCid, 16));
+  const auto& int16_list =
+      TypedData::Handle(TypedData::New(kTypedDataInt16ArrayCid, 16));
+  const auto& uint16_list =
+      TypedData::Handle(TypedData::New(kTypedDataUint16ArrayCid, 16));
+  const auto& int32_list =
+      TypedData::Handle(TypedData::New(kTypedDataInt32ArrayCid, 16));
+  const auto& uint32_list =
+      TypedData::Handle(TypedData::New(kTypedDataUint32ArrayCid, 16));
+  const auto& int64_list =
+      TypedData::Handle(TypedData::New(kTypedDataInt64ArrayCid, 16));
+  const auto& uint64_list =
+      TypedData::Handle(TypedData::New(kTypedDataUint64ArrayCid, 16));
+  const auto& float32_list =
+      TypedData::Handle(TypedData::New(kTypedDataFloat32ArrayCid, 16));
+  const auto& float64_list =
+      TypedData::Handle(TypedData::New(kTypedDataFloat64ArrayCid, 16));
+  const auto& int8_list =
+      TypedData::Handle(TypedData::New(kTypedDataInt8ArrayCid, 16));
+  const auto& int_value = Integer::Handle(Integer::New(42));
+  const auto& float_value = Double::Handle(Double::New(4.2));
+  for (intptr_t stage = 0; stage <= kLastStage; ++stage) {
+    run_test("Uint8List", "int", int8_list, int_value, stage);
+    run_test("Int8List", "int", uint8_list, int_value, stage);
+    run_test("Uint8ClampedList", "int", uint8c_list, int_value, stage);
+    run_test("Int16List", "int", int16_list, int_value, stage);
+    run_test("Uint16List", "int", uint16_list, int_value, stage);
+    run_test("Int32List", "int", int32_list, int_value, stage);
+    run_test("Uint32List", "int", uint32_list, int_value, stage);
+    run_test("Int64List", "int", int64_list, int_value, stage);
+    run_test("Uint64List", "int", uint64_list, int_value, stage);
+    run_test("Float32List", "double", float32_list, float_value, stage);
+    run_test("Float64List", "double", float64_list, float_value, stage);
+  }
+}
+
+#endif  // defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_DBC)
+
+}  // namespace dart
diff --git a/runtime/vm/compiler/call_specializer.cc b/runtime/vm/compiler/call_specializer.cc
index 42e2f9b..c141850 100644
--- a/runtime/vm/compiler/call_specializer.cc
+++ b/runtime/vm/compiler/call_specializer.cc
@@ -17,6 +17,13 @@
 #define I (isolate())
 #define Z (zone())
 
+static void RefineUseTypes(Definition* instr) {
+  CompileType* new_type = instr->Type();
+  for (Value::Iterator it(instr->input_use_list()); !it.Done(); it.Advance()) {
+    it.Current()->RefineReachingType(new_type);
+  }
+}
+
 static bool ShouldInlineSimd() {
   return FlowGraphCompiler::SupportsUnboxedSimd128();
 }
@@ -921,7 +928,7 @@
   if (load->slot().nullable_cid() != kDynamicCid) {
     // Reset value types if we know concrete cid.
     for (Value::Iterator it(load->input_use_list()); !it.Done(); it.Advance()) {
-      it.Current()->SetReachingType(NULL);
+      it.Current()->SetReachingType(nullptr);
     }
   }
 }
@@ -949,7 +956,7 @@
   }
   // Inline implicit instance setter.
   String& field_name = String::Handle(Z, instr->function_name().raw());
-  if (Function::IsDynamicInvocationForwaderName(field_name)) {
+  if (Function::IsDynamicInvocationForwarderName(field_name)) {
     field_name = Function::DemangleDynamicInvocationForwarderName(field_name);
   }
   field_name = Field::NameFromSetter(field_name);
@@ -1016,15 +1023,11 @@
     // Compute if we need to type check the value. Always type check if
     // not in strong mode or if at a dynamic invocation.
     bool needs_check = true;
-    if (!instr->interface_target().IsNull() && (field.kernel_offset() >= 0)) {
-      bool is_covariant = false;
-      bool is_generic_covariant = false;
-      field.GetCovarianceAttributes(&is_covariant, &is_generic_covariant);
-
-      if (is_covariant) {
+    if (!instr->interface_target().IsNull()) {
+      if (field.is_covariant()) {
         // Always type check covariant fields.
         needs_check = true;
-      } else if (is_generic_covariant) {
+      } else if (field.is_generic_covariant_impl()) {
         // If field is generic covariant then we don't need to check it
         // if the invocation was marked as unchecked (e.g. receiver of
         // the invocation is also the receiver of the surrounding method).
@@ -1630,5 +1633,261 @@
   return true;  // May deoptimize since we have not identified all 'true' tests.
 }
 
+void TypedDataSpecializer::Optimize(FlowGraph* flow_graph) {
+  TypedDataSpecializer optimizer(flow_graph);
+  optimizer.VisitBlocks();
+}
+
+void TypedDataSpecializer::EnsureIsInitialized() {
+  if (initialized_) return;
+
+  initialized_ = true;
+
+  int_type_ = Type::IntType();
+  double_type_ = Type::Double();
+
+  const auto& typed_data = Library::Handle(
+      Z, Library::LookupLibrary(thread_, Symbols::DartTypedData()));
+
+  auto& td_class = Class::Handle(Z);
+  auto& direct_implementors = GrowableObjectArray::Handle(Z);
+
+#define INIT_HANDLE(iface, member_name, type, cid)                             \
+  td_class = typed_data.LookupClass(Symbols::iface());                         \
+  ASSERT(!td_class.IsNull());                                                  \
+  direct_implementors = td_class.direct_implementors();                        \
+  if (!HasThirdPartyImplementor(direct_implementors)) {                        \
+    member_name = td_class.RareType();                                         \
+  }
+
+  PUBLIC_TYPED_DATA_CLASS_LIST(INIT_HANDLE)
+#undef INIT_HANDLE
+}
+
+bool TypedDataSpecializer::HasThirdPartyImplementor(
+    const GrowableObjectArray& direct_implementors) {
+  // Check if there are non internal/external/view implementors.
+  for (intptr_t i = 0; i < direct_implementors.Length(); ++i) {
+    implementor_ ^= direct_implementors.At(i);
+
+    // We only consider [implementor_] a 3rd party implementor if it was
+    // finalized by the class finalizer, since only then can we have concrete
+    // instances of the [implementor_].
+    if (implementor_.is_finalized()) {
+      const classid_t cid = implementor_.id();
+      if (!RawObject::IsTypedDataClassId(cid) &&
+          !RawObject::IsTypedDataViewClassId(cid) &&
+          !RawObject::IsExternalTypedDataClassId(cid)) {
+        return true;
+      }
+    }
+  }
+  return false;
+}
+
+void TypedDataSpecializer::VisitInstanceCall(InstanceCallInstr* call) {
+  TryInlineCall(call);
+}
+
+void TypedDataSpecializer::VisitStaticCall(StaticCallInstr* call) {
+  TryInlineCall(call);
+}
+
+void TypedDataSpecializer::TryInlineCall(TemplateDartCall<0>* call) {
+  const bool is_length_getter = call->Selector() == Symbols::GetLength().raw();
+  const bool is_index_get = call->Selector() == Symbols::IndexToken().raw();
+  const bool is_index_set =
+      call->Selector() == Symbols::AssignIndexToken().raw();
+
+  if (is_length_getter || is_index_get || is_index_set) {
+    EnsureIsInitialized();
+
+    const intptr_t receiver_index = call->FirstArgIndex();
+
+    CompileType* receiver_type = call->ArgumentAt(receiver_index + 0)->Type();
+
+    CompileType* index_type = nullptr;
+    if (is_index_get || is_index_set) {
+      index_type = call->ArgumentAt(receiver_index + 1)->Type();
+    }
+
+    CompileType* value_type = nullptr;
+    if (is_index_set) {
+      value_type = call->ArgumentAt(receiver_index + 2)->Type();
+    }
+
+    auto& type_class = Class::Handle(zone_);
+#define TRY_INLINE(iface, member_name, type, cid)                              \
+  if (!member_name.IsNull()) {                                                 \
+    if (receiver_type->IsAssignableTo(member_name)) {                          \
+      if (is_length_getter) {                                                  \
+        type_class = member_name.type_class();                                 \
+        ReplaceWithLengthGetter(call);                                         \
+      } else if (is_index_get) {                                               \
+        if (!index_type->IsNullableInt()) return;                              \
+        type_class = member_name.type_class();                                 \
+        ReplaceWithIndexGet(call, cid);                                        \
+      } else {                                                                 \
+        if (!index_type->IsNullableInt()) return;                              \
+        if (!value_type->IsAssignableTo(type)) return;                         \
+        type_class = member_name.type_class();                                 \
+        ReplaceWithIndexSet(call, cid);                                        \
+      }                                                                        \
+      return;                                                                  \
+    }                                                                          \
+  }
+    PUBLIC_TYPED_DATA_CLASS_LIST(TRY_INLINE)
+#undef INIT_HANDLE
+  }
+}
+
+void TypedDataSpecializer::ReplaceWithLengthGetter(TemplateDartCall<0>* call) {
+  const intptr_t receiver_idx = call->FirstArgIndex();
+  auto array = call->PushArgumentAt(receiver_idx + 0)->value()->definition();
+
+  if (array->Type()->is_nullable()) {
+    AppendNullCheck(call, &array);
+  }
+  Definition* length = AppendLoadLength(call, array);
+  flow_graph_->ReplaceCurrentInstruction(current_iterator(), call, length);
+  RefineUseTypes(length);
+}
+
+void TypedDataSpecializer::ReplaceWithIndexGet(TemplateDartCall<0>* call,
+                                               classid_t cid) {
+  const intptr_t receiver_idx = call->FirstArgIndex();
+  auto array = call->PushArgumentAt(receiver_idx + 0)->value()->definition();
+  auto index = call->PushArgumentAt(receiver_idx + 1)->value()->definition();
+
+  if (array->Type()->is_nullable()) {
+    AppendNullCheck(call, &array);
+  }
+  if (index->Type()->is_nullable()) {
+    AppendNullCheck(call, &index);
+  }
+  AppendBoundsCheck(call, array, &index);
+  Definition* value = AppendLoadIndexed(call, array, index, cid);
+  flow_graph_->ReplaceCurrentInstruction(current_iterator(), call, value);
+  RefineUseTypes(value);
+}
+
+void TypedDataSpecializer::ReplaceWithIndexSet(TemplateDartCall<0>* call,
+                                               classid_t cid) {
+  const intptr_t receiver_idx = call->FirstArgIndex();
+  auto array = call->PushArgumentAt(receiver_idx + 0)->value()->definition();
+  auto index = call->PushArgumentAt(receiver_idx + 1)->value()->definition();
+  auto value = call->PushArgumentAt(receiver_idx + 2)->value()->definition();
+
+  if (array->Type()->is_nullable()) {
+    AppendNullCheck(call, &array);
+  }
+  if (index->Type()->is_nullable()) {
+    AppendNullCheck(call, &index);
+  }
+  if (value->Type()->is_nullable()) {
+    AppendNullCheck(call, &value);
+  }
+  AppendBoundsCheck(call, array, &index);
+  AppendStoreIndexed(call, array, index, value, cid);
+
+  RELEASE_ASSERT(!call->HasUses());
+  flow_graph_->ReplaceCurrentInstruction(current_iterator(), call, nullptr);
+}
+
+void TypedDataSpecializer::AppendNullCheck(TemplateDartCall<0>* call,
+                                           Definition** value) {
+  auto check =
+      new (Z) CheckNullInstr(new (Z) Value(*value), Symbols::OptimizedOut(),
+                             call->deopt_id(), call->token_pos());
+  flow_graph_->InsertBefore(call, check, call->env(), FlowGraph::kValue);
+
+  // Use data dependency as control dependency.
+  *value = check;
+}
+
+void TypedDataSpecializer::AppendBoundsCheck(TemplateDartCall<0>* call,
+                                             Definition* array,
+                                             Definition** index) {
+  auto length = new (Z) LoadFieldInstr(
+      new (Z) Value(array), Slot::TypedDataBase_length(), call->token_pos());
+  flow_graph_->InsertBefore(call, length, call->env(), FlowGraph::kValue);
+
+  auto check = new (Z) GenericCheckBoundInstr(
+      new (Z) Value(length), new (Z) Value(*index), DeoptId::kNone);
+  flow_graph_->InsertBefore(call, check, call->env(), FlowGraph::kValue);
+
+  // Use data dependency as control dependency.
+  *index = check;
+}
+
+Definition* TypedDataSpecializer::AppendLoadLength(TemplateDartCall<0>* call,
+                                                   Definition* array) {
+  auto length = new (Z) LoadFieldInstr(
+      new (Z) Value(array), Slot::TypedDataBase_length(), call->token_pos());
+  flow_graph_->InsertBefore(call, length, call->env(), FlowGraph::kValue);
+  return length;
+}
+
+Definition* TypedDataSpecializer::AppendLoadIndexed(TemplateDartCall<0>* call,
+                                                    Definition* array,
+                                                    Definition* index,
+                                                    classid_t cid) {
+  const intptr_t element_size = TypedDataBase::ElementSizeFor(cid);
+  const intptr_t index_scale = element_size;
+
+  auto data = new (Z) LoadUntaggedInstr(new (Z) Value(array),
+                                        TypedDataBase::data_field_offset());
+  flow_graph_->InsertBefore(call, data, call->env(), FlowGraph::kValue);
+
+  Definition* load = new (Z)
+      LoadIndexedInstr(new (Z) Value(data), new (Z) Value(index), index_scale,
+                       cid, kAlignedAccess, DeoptId::kNone, call->token_pos());
+  flow_graph_->InsertBefore(call, load, call->env(), FlowGraph::kValue);
+
+  if (cid == kTypedDataFloat32ArrayCid) {
+    load = new (Z) FloatToDoubleInstr(new (Z) Value(load), call->deopt_id());
+    flow_graph_->InsertBefore(call, load, call->env(), FlowGraph::kValue);
+  }
+
+  return load;
+}
+
+void TypedDataSpecializer::AppendStoreIndexed(TemplateDartCall<0>* call,
+                                              Definition* array,
+                                              Definition* index,
+                                              Definition* value,
+                                              classid_t cid) {
+  const intptr_t element_size = TypedDataBase::ElementSizeFor(cid);
+  const intptr_t index_scale = element_size;
+
+  const auto deopt_id = call->deopt_id();
+
+  if (cid == kTypedDataFloat32ArrayCid) {
+    value = new (Z) DoubleToFloatInstr(new (Z) Value(value), deopt_id,
+                                       Instruction::kNotSpeculative);
+    flow_graph_->InsertBefore(call, value, call->env(), FlowGraph::kValue);
+  } else if (cid == kTypedDataInt32ArrayCid) {
+    value = new (Z)
+        UnboxInt32Instr(UnboxInt32Instr::kTruncate, new (Z) Value(value),
+                        deopt_id, Instruction::kNotSpeculative);
+    flow_graph_->InsertBefore(call, value, call->env(), FlowGraph::kValue);
+  } else if (cid == kTypedDataUint32ArrayCid) {
+    value = new (Z) UnboxUint32Instr(new (Z) Value(value), deopt_id,
+                                     Instruction::kNotSpeculative);
+    ASSERT(value->AsUnboxInteger()->is_truncating());
+    flow_graph_->InsertBefore(call, value, call->env(), FlowGraph::kValue);
+  }
+
+  auto data = new (Z) LoadUntaggedInstr(new (Z) Value(array),
+                                        TypedDataBase::data_field_offset());
+  flow_graph_->InsertBefore(call, data, call->env(), FlowGraph::kValue);
+
+  auto store = new (Z) StoreIndexedInstr(
+      new (Z) Value(data), new (Z) Value(index), new (Z) Value(value),
+      kNoStoreBarrier, index_scale, cid, kAlignedAccess, DeoptId::kNone,
+      call->token_pos(), Instruction::kNotSpeculative);
+  flow_graph_->InsertBefore(call, store, call->env(), FlowGraph::kEffect);
+}
+
 }  // namespace dart
 #endif  // DART_PRECOMPILED_RUNTIME
diff --git a/runtime/vm/compiler/call_specializer.h b/runtime/vm/compiler/call_specializer.h
index cb9ca8c..e9a0a6d 100644
--- a/runtime/vm/compiler/call_specializer.h
+++ b/runtime/vm/compiler/call_specializer.h
@@ -178,6 +178,106 @@
   FlowGraph* flow_graph_;
 };
 
+#define PUBLIC_TYPED_DATA_CLASS_LIST(V)                                        \
+  V(Int8List, int8_list_type_, int_type_, kTypedDataInt8ArrayCid)              \
+  V(Uint8List, uint8_list_type_, int_type_, kTypedDataUint8ArrayCid)           \
+  V(Uint8ClampedList, uint8_clamped_type_, int_type_,                          \
+    kTypedDataUint8ClampedArrayCid)                                            \
+  V(Int16List, int16_list_type_, int_type_, kTypedDataInt16ArrayCid)           \
+  V(Uint16List, uint16_list_type_, int_type_, kTypedDataUint16ArrayCid)        \
+  V(Int32List, int32_list_type_, int_type_, kTypedDataInt32ArrayCid)           \
+  V(Uint32List, uint32_list_type_, int_type_, kTypedDataUint32ArrayCid)        \
+  V(Int64List, int64_list_type_, int_type_, kTypedDataInt64ArrayCid)           \
+  V(Uint64List, uint64_list_type_, int_type_, kTypedDataUint64ArrayCid)        \
+  V(Float32List, float32_list_type_, double_type_, kTypedDataFloat32ArrayCid)  \
+  V(Float64List, float64_list_type_, double_type_, kTypedDataFloat64ArrayCid)
+
+// Specializes instance/static calls with receiver type being a typed data
+// interface (if that interface is only implemented by internal/external/view
+// typed data classes).
+//
+// For example:
+//
+//    foo(Uint8List bytes) => bytes[0];
+//
+// Would be translated to something like this:
+//
+//    v0 <- Constant(0)
+//
+//    // Ensures the list is non-null.
+//    v1 <- ParameterInstr(0)
+//    v2 <- CheckNull(v1)
+//
+//    // Load the length & perform bounds checks
+//    v3 <- LoadField(v2, "TypedDataBase.length");
+//    v4 <- GenericCheckBounds(v3, v0);
+//
+//    // Directly access the byte, independent of whether `bytes` is
+//    // _Uint8List, _Uint8ArrayView or _ExternalUint8Array.
+//    v5 <- LoadUntagged(v1, "TypedDataBase.data");
+//    v5 <- LoadIndexed(v5, v4)
+//
+class TypedDataSpecializer : public FlowGraphVisitor {
+ public:
+  static void Optimize(FlowGraph* flow_graph);
+
+  virtual void VisitInstanceCall(InstanceCallInstr* instr);
+  virtual void VisitStaticCall(StaticCallInstr* instr);
+
+ private:
+  // clang-format off
+  explicit TypedDataSpecializer(FlowGraph* flow_graph)
+      : FlowGraphVisitor(flow_graph->reverse_postorder()),
+        thread_(Thread::Current()),
+        zone_(thread_->zone()),
+        flow_graph_(flow_graph),
+#define ALLOCATE_HANDLE(iface, member_name, type, cid)                         \
+        member_name(AbstractType::Handle(zone_)),
+        PUBLIC_TYPED_DATA_CLASS_LIST(ALLOCATE_HANDLE)
+#undef INIT_HANDLE
+        int_type_(AbstractType::Handle()),
+        double_type_(AbstractType::Handle()),
+        implementor_(Class::Handle()) {
+  }
+  // clang-format on
+
+  void EnsureIsInitialized();
+  bool HasThirdPartyImplementor(const GrowableObjectArray& direct_implementors);
+  void TryInlineCall(TemplateDartCall<0>* call);
+  void ReplaceWithLengthGetter(TemplateDartCall<0>* call);
+  void ReplaceWithIndexGet(TemplateDartCall<0>* call, classid_t cid);
+  void ReplaceWithIndexSet(TemplateDartCall<0>* call, classid_t cid);
+  void AppendNullCheck(TemplateDartCall<0>* call, Definition** array);
+  void AppendBoundsCheck(TemplateDartCall<0>* call,
+                         Definition* array,
+                         Definition** index);
+  Definition* AppendLoadLength(TemplateDartCall<0>* call, Definition* array);
+  Definition* AppendLoadIndexed(TemplateDartCall<0>* call,
+                                Definition* array,
+                                Definition* index,
+                                classid_t cid);
+  void AppendStoreIndexed(TemplateDartCall<0>* call,
+                          Definition* array,
+                          Definition* index,
+                          Definition* value,
+                          classid_t cid);
+
+  Zone* zone() const { return zone_; }
+
+  Thread* thread_;
+  Zone* zone_;
+  FlowGraph* flow_graph_;
+  bool initialized_ = false;
+
+#define DEF_HANDLE(iface, member_name, type, cid) AbstractType& member_name;
+  PUBLIC_TYPED_DATA_CLASS_LIST(DEF_HANDLE)
+#undef DEF_HANDLE
+
+  AbstractType& int_type_;
+  AbstractType& double_type_;
+  Class& implementor_;
+};
+
 }  // namespace dart
 
 #endif  // RUNTIME_VM_COMPILER_CALL_SPECIALIZER_H_
diff --git a/runtime/vm/compiler/cha.cc b/runtime/vm/compiler/cha.cc
index 5a2fcdd..53e2480 100644
--- a/runtime/vm/compiler/cha.cc
+++ b/runtime/vm/compiler/cha.cc
@@ -39,7 +39,7 @@
   // read-only.
   // TODO(fschneider): Enable tracking of CHA dependent code for VM heap
   // classes.
-  if (cls.InVMHeap()) return true;
+  if (cls.InVMIsolateHeap()) return true;
 
   if (cls.IsObjectClass()) {
     // Class Object has subclasses, although we do not keep track of them.
@@ -58,7 +58,7 @@
 
 bool CHA::ConcreteSubclasses(const Class& cls,
                              GrowableArray<intptr_t>* class_ids) {
-  if (cls.InVMHeap()) return false;
+  if (cls.InVMIsolateHeap()) return false;
   if (cls.IsObjectClass()) return false;
 
   if (!cls.is_abstract()) {
@@ -87,7 +87,7 @@
   // read-only.
   // TODO(fschneider): Enable tracking of CHA dependent code for VM heap
   // classes.
-  if (cls.InVMHeap()) return true;
+  if (cls.InVMIsolateHeap()) return true;
 
   return cls.is_implemented();
 }
@@ -129,7 +129,7 @@
   // read-only.
   // TODO(fschneider): Enable tracking of CHA dependent code for VM heap
   // classes.
-  if (cls.InVMHeap()) return true;
+  if (cls.InVMIsolateHeap()) return true;
 
   // Subclasses of Object are not tracked by CHA. Safely assume that overrides
   // exist.
diff --git a/runtime/vm/compiler/compiler_pass.cc b/runtime/vm/compiler/compiler_pass.cc
index 4befad9..3e08c06 100644
--- a/runtime/vm/compiler/compiler_pass.cc
+++ b/runtime/vm/compiler/compiler_pass.cc
@@ -241,6 +241,9 @@
     // unreachable code.
     INVOKE_PASS(ApplyICData);
   }
+  if (mode == kAOT) {
+    INVOKE_PASS(OptimizeTypedDataAccesses);
+  }
 #endif
   INVOKE_PASS(WidenSmiToInt32);
   INVOKE_PASS(SelectRepresentations);
@@ -270,6 +273,14 @@
   INVOKE_PASS(ReorderBlocks);
 }
 
+void CompilerPass::RunPipelineWithPasses(
+    CompilerPassState* state,
+    std::initializer_list<CompilerPass::Id> passes) {
+  for (auto pass_id : passes) {
+    passes_[pass_id]->Run(state);
+  }
+}
+
 COMPILER_PASS(ComputeSSA, {
   // Transform to SSA (virtual register 0 and no inlining arguments).
   flow_graph->ComputeSSA(0, NULL);
@@ -363,8 +374,12 @@
   ConstantPropagator::OptimizeBranches(flow_graph);
 });
 
-COMPILER_PASS(TryCatchOptimization,
-              { TryCatchAnalyzer::Optimize(flow_graph); });
+COMPILER_PASS(OptimizeTypedDataAccesses,
+              { TypedDataSpecializer::Optimize(flow_graph); });
+
+COMPILER_PASS(TryCatchOptimization, {
+  OptimizeCatchEntryStates(flow_graph, /*is_aot=*/FLAG_precompiled_mode);
+});
 
 COMPILER_PASS(EliminateEnvironments, { flow_graph->EliminateEnvironments(); });
 
diff --git a/runtime/vm/compiler/compiler_pass.h b/runtime/vm/compiler/compiler_pass.h
index 044ae6e..e5aa823 100644
--- a/runtime/vm/compiler/compiler_pass.h
+++ b/runtime/vm/compiler/compiler_pass.h
@@ -7,6 +7,8 @@
 
 #ifndef DART_PRECOMPILED_RUNTIME
 
+#include <initializer_list>
+
 #include "vm/growable_array.h"
 #include "vm/token_position.h"
 #include "vm/zone.h"
@@ -34,6 +36,7 @@
   V(LICM)                                                                      \
   V(OptimisticallySpecializeSmiPhis)                                           \
   V(OptimizeBranches)                                                          \
+  V(OptimizeTypedDataAccesses)                                                 \
   V(RangeAnalysis)                                                             \
   V(ReorderBlocks)                                                             \
   V(SelectRepresentations)                                                     \
@@ -141,6 +144,10 @@
 
   static void RunPipeline(PipelineMode mode, CompilerPassState* state);
 
+  static void RunPipelineWithPasses(
+      CompilerPassState* state,
+      std::initializer_list<CompilerPass::Id> passes);
+
  protected:
   // This function executes the pass. If it returns true then
   // we will run Canonicalize on the graph and execute the pass
diff --git a/runtime/vm/compiler/compiler_sources.gni b/runtime/vm/compiler/compiler_sources.gni
index 24c985a..f388295 100644
--- a/runtime/vm/compiler/compiler_sources.gni
+++ b/runtime/vm/compiler/compiler_sources.gni
@@ -37,6 +37,7 @@
   "assembler/disassembler_kbc.h",
   "assembler/disassembler_x86.cc",
   "assembler/object_pool_builder.h",
+  "backend/block_builder.h",
   "backend/block_scheduler.cc",
   "backend/block_scheduler.h",
   "backend/branch_optimizer.cc",
@@ -92,12 +93,16 @@
   "compiler_pass.h",
   "compiler_state.cc",
   "compiler_state.h",
+  "ffi.cc",
+  "ffi.h",
   "frontend/base_flow_graph_builder.cc",
   "frontend/base_flow_graph_builder.h",
   "frontend/bytecode_flow_graph_builder.cc",
   "frontend/bytecode_flow_graph_builder.h",
   "frontend/bytecode_reader.cc",
   "frontend/bytecode_reader.h",
+  "frontend/bytecode_scope_builder.cc",
+  "frontend/bytecode_scope_builder.h",
   "frontend/constant_evaluator.cc",
   "frontend/constant_evaluator.h",
   "frontend/flow_graph_builder.cc",
@@ -150,9 +155,14 @@
   "assembler/assembler_x64_test.cc",
   "assembler/disassembler_test.cc",
   "backend/il_test.cc",
+  "backend/il_test_helper.h",
+  "backend/il_test_helper.cc",
   "backend/locations_helpers_test.cc",
   "backend/loops_test.cc",
   "backend/range_analysis_test.cc",
+  "backend/redundancy_elimination_test.cc",
   "backend/slot_test.cc",
+  "backend/type_propagator_test.cc",
+  "backend/typed_data_aot_test.cc",
   "cha_test.cc",
 ]
diff --git a/runtime/vm/compiler/ffi.cc b/runtime/vm/compiler/ffi.cc
new file mode 100644
index 0000000..8d8d136
--- /dev/null
+++ b/runtime/vm/compiler/ffi.cc
@@ -0,0 +1,316 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#include "vm/compiler/ffi.h"
+#include <algorithm>
+#include "platform/globals.h"
+#include "vm/compiler/runtime_api.h"
+
+namespace dart {
+
+namespace compiler {
+
+namespace ffi {
+
+#if !defined(TARGET_ARCH_DBC)
+
+static const size_t kSizeUnknown = 0;
+
+static const intptr_t kNumElementSizes = kFfiVoidCid - kFfiPointerCid + 1;
+
+static const size_t element_size_table[kNumElementSizes] = {
+    target::kWordSize,  // kFfiPointerCid
+    kSizeUnknown,       // kFfiNativeFunctionCid
+    1,                  // kFfiInt8Cid
+    2,                  // kFfiInt16Cid
+    4,                  // kFfiInt32Cid
+    8,                  // kFfiInt64Cid
+    1,                  // kFfiUint8Cid
+    2,                  // kFfiUint16Cid
+    4,                  // kFfiUint32Cid
+    8,                  // kFfiUint64Cid
+    target::kWordSize,  // kFfiIntPtrCid
+    4,                  // kFfiFloatCid
+    8,                  // kFfiDoubleCid
+    kSizeUnknown,       // kFfiVoidCid
+};
+
+size_t ElementSizeInBytes(intptr_t class_id) {
+  ASSERT(class_id != kFfiNativeFunctionCid);
+  ASSERT(class_id != kFfiVoidCid);
+  if (!RawObject::IsFfiTypeClassId(class_id)) {
+    // subtype of Pointer
+    class_id = kFfiPointerCid;
+  }
+  intptr_t index = class_id - kFfiPointerCid;
+  return element_size_table[index];
+}
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+
+Representation TypeRepresentation(const AbstractType& result_type) {
+  switch (result_type.type_class_id()) {
+    case kFfiFloatCid:
+      return kUnboxedFloat;
+    case kFfiDoubleCid:
+      return kUnboxedDouble;
+    case kFfiInt8Cid:
+    case kFfiInt16Cid:
+    case kFfiInt32Cid:
+      return kUnboxedInt32;
+    case kFfiUint8Cid:
+    case kFfiUint16Cid:
+    case kFfiUint32Cid:
+      return kUnboxedUint32;
+    case kFfiInt64Cid:
+    case kFfiUint64Cid:
+      return kUnboxedInt64;
+    case kFfiIntPtrCid:
+    case kFfiPointerCid:
+    default:  // Subtypes of Pointer.
+      return kUnboxedFfiIntPtr;
+  }
+}
+
+bool NativeTypeIsVoid(const AbstractType& result_type) {
+  return result_type.type_class_id() == kFfiVoidCid;
+}
+
+bool NativeTypeIsPointer(const AbstractType& result_type) {
+  switch (result_type.type_class_id()) {
+    case kFfiVoidCid:
+    case kFfiFloatCid:
+    case kFfiDoubleCid:
+    case kFfiInt8Cid:
+    case kFfiInt16Cid:
+    case kFfiInt32Cid:
+    case kFfiUint8Cid:
+    case kFfiUint16Cid:
+    case kFfiUint32Cid:
+    case kFfiInt64Cid:
+    case kFfiUint64Cid:
+    case kFfiIntPtrCid:
+      return false;
+    case kFfiPointerCid:
+    default:
+      return true;
+  }
+}
+
+// Converts a Ffi [signature] to a list of Representations.
+// Note that this ignores first argument (receiver) which is dynamic.
+ZoneGrowableArray<Representation>* ArgumentRepresentations(
+    const Function& signature) {
+  intptr_t num_arguments = signature.num_fixed_parameters() - 1;
+  auto result = new ZoneGrowableArray<Representation>(num_arguments);
+  for (intptr_t i = 0; i < num_arguments; i++) {
+    AbstractType& arg_type =
+        AbstractType::Handle(signature.ParameterTypeAt(i + 1));
+    Representation rep = TypeRepresentation(arg_type);
+    if (rep == kUnboxedFloat && CallingConventions::kAbiSoftFP) {
+      rep = kUnboxedInt32;
+    } else if (rep == kUnboxedDouble && CallingConventions::kAbiSoftFP) {
+      rep = kUnboxedInt64;
+    }
+    result->Add(rep);
+  }
+  return result;
+}
+
+// Represents the state of a stack frame going into a call, between allocations
+// of argument locations. Acts like a register allocator but for arguments in
+// the native ABI.
+class ArgumentFrameState : public ValueObject {
+ public:
+  Location AllocateArgument(Representation rep) {
+    switch (rep) {
+      case kUnboxedFloat:
+      case kUnboxedDouble: {
+        Location result = AllocateFpuRegister();
+        if (!result.IsUnallocated()) return result;
+        break;
+      }
+      case kUnboxedInt64:
+      case kUnboxedUint32:
+      case kUnboxedInt32: {
+        Location result =
+            rep == kUnboxedInt64 && compiler::target::kWordSize == 4
+                ? AllocateAlignedRegisterPair()
+                : AllocateCpuRegister();
+        if (!result.IsUnallocated()) return result;
+        break;
+      }
+      default:
+        UNREACHABLE();
+    }
+
+    // Argument must be spilled.
+    if ((rep == kUnboxedInt64 || rep == kUnboxedDouble) &&
+        compiler::target::kWordSize == 4) {
+      return AllocateAlignedStackSlots(rep);
+    } else {
+      return AllocateStackSlot();
+    }
+  }
+
+ private:
+  Location AllocateStackSlot() {
+    return Location::StackSlot(stack_height_in_slots++, SPREG);
+  }
+
+  // Allocates a pair of stack slots where the first stack slot is aligned to an
+  // 8-byte boundary, if necessary.
+  Location AllocateAlignedStackSlots(Representation rep) {
+    if (CallingConventions::kAlignArguments &&
+        compiler::target::kWordSize == 4) {
+      stack_height_in_slots += stack_height_in_slots % 2;
+    }
+
+    Location result;
+    if (rep == kUnboxedDouble) {
+      result = Location::DoubleStackSlot(stack_height_in_slots, SPREG);
+      stack_height_in_slots += 2;
+    } else {
+      const Location low = AllocateStackSlot();
+      const Location high = AllocateStackSlot();
+      result = Location::Pair(low, high);
+    }
+    return result;
+  }
+
+  Location AllocateFpuRegister() {
+    if (fpu_regs_used == CallingConventions::kNumFpuArgRegs) {
+      return Location::RequiresFpuRegister();
+    }
+
+    const Location result = Location::FpuRegisterLocation(
+        CallingConventions::FpuArgumentRegisters[fpu_regs_used]);
+    fpu_regs_used++;
+    if (CallingConventions::kArgumentIntRegXorFpuReg) {
+      cpu_regs_used++;
+    }
+    return result;
+  }
+
+  Location AllocateCpuRegister() {
+    if (cpu_regs_used == CallingConventions::kNumArgRegs) {
+      return Location::RequiresRegister();
+    }
+
+    const Location result = Location::RegisterLocation(
+        CallingConventions::ArgumentRegisters[cpu_regs_used]);
+    cpu_regs_used++;
+    if (CallingConventions::kArgumentIntRegXorFpuReg) {
+      fpu_regs_used++;
+    }
+    return result;
+  }
+
+  // Allocates a pair of registers where the first register index is even, if
+  // necessary.
+  Location AllocateAlignedRegisterPair() {
+    if (CallingConventions::kAlignArguments) {
+      cpu_regs_used += cpu_regs_used % 2;
+    }
+    if (cpu_regs_used > CallingConventions::kNumArgRegs - 2) {
+      return Location::Any();
+    }
+    return Location::Pair(AllocateCpuRegister(), AllocateCpuRegister());
+  }
+
+  intptr_t cpu_regs_used = 0;
+  intptr_t fpu_regs_used = 0;
+  intptr_t stack_height_in_slots = 0;
+};
+
+// Takes a list of argument representations, and converts it to a list of
+// argument locations based on calling convention.
+ZoneGrowableArray<Location>* ArgumentLocations(
+    const ZoneGrowableArray<Representation>& arg_reps) {
+  intptr_t num_arguments = arg_reps.length();
+  auto result = new ZoneGrowableArray<Location>(num_arguments);
+
+  // Loop through all arguments and assign a register or a stack location.
+  ArgumentFrameState frame_state;
+  for (intptr_t i = 0; i < num_arguments; i++) {
+    Representation rep = arg_reps[i];
+    result->Add(frame_state.AllocateArgument(rep));
+  }
+  return result;
+}
+
+Representation ResultRepresentation(const Function& signature) {
+  AbstractType& arg_type = AbstractType::Handle(signature.result_type());
+  Representation rep = TypeRepresentation(arg_type);
+  if (rep == kUnboxedFloat && CallingConventions::kAbiSoftFP) {
+    rep = kUnboxedInt32;
+  } else if (rep == kUnboxedDouble && CallingConventions::kAbiSoftFP) {
+    rep = kUnboxedInt64;
+  }
+  return rep;
+}
+
+Location ResultLocation(Representation result_rep) {
+  switch (result_rep) {
+    case kUnboxedFloat:
+    case kUnboxedDouble:
+#if defined(TARGET_ARCH_IA32)
+      // The result is returned in ST0, but we don't allocate ST registers, so
+      // the FFI trampoline will move it to XMM0.
+      return Location::FpuRegisterLocation(XMM0);
+#else
+      return Location::FpuRegisterLocation(CallingConventions::kReturnFpuReg);
+#endif
+    case kUnboxedInt32:
+    case kUnboxedUint32:
+      return Location::RegisterLocation(CallingConventions::kReturnReg);
+    case kUnboxedInt64:
+      if (compiler::target::kWordSize == 4) {
+        return Location::Pair(
+            Location::RegisterLocation(CallingConventions::kReturnReg),
+            Location::RegisterLocation(CallingConventions::kSecondReturnReg));
+      } else {
+        return Location::RegisterLocation(CallingConventions::kReturnReg);
+      }
+    default:
+      UNREACHABLE();
+  }
+}
+
+// Accounts for alignment, where some stack slots are used as padding.
+intptr_t NumStackSlots(const ZoneGrowableArray<Location>& locations) {
+  intptr_t num_arguments = locations.length();
+  intptr_t max_height_in_slots = 0;
+  for (intptr_t i = 0; i < num_arguments; i++) {
+    intptr_t height = 0;
+    if (locations.At(i).IsStackSlot()) {
+      height = locations.At(i).stack_index() + 1;
+    } else if (locations.At(i).IsDoubleStackSlot()) {
+      height = locations.At(i).stack_index() + 8 / compiler::target::kWordSize;
+    } else if (locations.At(i).IsPairLocation()) {
+      const Location first = locations.At(i).AsPairLocation()->At(0);
+      const Location second = locations.At(i).AsPairLocation()->At(1);
+      height = std::max(first.IsStackSlot() ? first.stack_index() + 1 : 0,
+                        second.IsStackSlot() ? second.stack_index() + 1 : 0);
+    }
+    max_height_in_slots = std::max(height, max_height_in_slots);
+  }
+  return max_height_in_slots;
+}
+
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
+
+#else
+
+size_t ElementSizeInBytes(intptr_t class_id) {
+  UNREACHABLE();
+}
+
+#endif  // !defined(TARGET_ARCH_DBC)
+
+}  // namespace ffi
+
+}  // namespace compiler
+
+}  // namespace dart
diff --git a/runtime/vm/compiler/ffi.h b/runtime/vm/compiler/ffi.h
new file mode 100644
index 0000000..efed0cc
--- /dev/null
+++ b/runtime/vm/compiler/ffi.h
@@ -0,0 +1,60 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#ifndef RUNTIME_VM_COMPILER_FFI_H_
+#define RUNTIME_VM_COMPILER_FFI_H_
+
+#include <platform/globals.h>
+
+#include "../class_id.h"
+#include "../object.h"
+#include "../raw_object.h"
+#include "backend/locations.h"
+
+namespace dart {
+
+namespace compiler {
+
+namespace ffi {
+
+// On all supported platforms, the minimum width an argument must be sign- or
+// zero-extended to is 4 bytes.
+constexpr intptr_t kMinimumArgumentWidth = 4;
+
+// Storage size for an FFI type (extends 'ffi.NativeType').
+size_t ElementSizeInBytes(intptr_t class_id);
+
+// Unboxed representation of an FFI type (extends 'ffi.NativeType').
+Representation TypeRepresentation(const AbstractType& result_type);
+
+// Whether a type which extends 'ffi.NativeType' also extends 'ffi.Pointer'.
+bool NativeTypeIsPointer(const AbstractType& result_type);
+
+// Whether a type is 'ffi.Void'.
+bool NativeTypeIsVoid(const AbstractType& result_type);
+
+// Unboxed representation of the result of a C signature function.
+Representation ResultRepresentation(const Function& signature);
+
+// Location for the result of a C signature function.
+Location ResultLocation(Representation result_rep);
+
+// Unboxed representations of the arguments to a C signature function.
+ZoneGrowableArray<Representation>* ArgumentRepresentations(
+    const Function& signature);
+
+// Location for the arguments of a C signature function.
+ZoneGrowableArray<Location>* ArgumentLocations(
+    const ZoneGrowableArray<Representation>& arg_reps);
+
+// Number of stack slots used in 'locations'.
+intptr_t NumStackSlots(const ZoneGrowableArray<Location>& locations);
+
+}  // namespace ffi
+
+}  // namespace compiler
+
+}  // namespace dart
+
+#endif  // RUNTIME_VM_COMPILER_FFI_H_
diff --git a/runtime/vm/compiler/frontend/base_flow_graph_builder.cc b/runtime/vm/compiler/frontend/base_flow_graph_builder.cc
index eebb0b8..07ac0b0 100644
--- a/runtime/vm/compiler/frontend/base_flow_graph_builder.cc
+++ b/runtime/vm/compiler/frontend/base_flow_graph_builder.cc
@@ -6,6 +6,8 @@
 
 #include "vm/compiler/frontend/flow_graph_builder.h"  // For InlineExitCollector.
 #include "vm/compiler/jit/compiler.h"  // For Compiler::IsBackgroundCompilation().
+#include "vm/compiler/runtime_api.h"
+#include "vm/object_store.h"
 
 #if !defined(DART_PRECOMPILED_RUNTIME)
 
@@ -119,6 +121,17 @@
   return instructions;
 }
 
+Fragment BaseFlowGraphBuilder::StrictCompare(TokenPosition position,
+                                             Token::Kind kind,
+                                             bool number_check /* = false */) {
+  Value* right = Pop();
+  Value* left = Pop();
+  StrictCompareInstr* compare = new (Z) StrictCompareInstr(
+      position, kind, left, right, number_check, GetNextDeoptId());
+  Push(compare);
+  return Fragment(compare);
+}
+
 Fragment BaseFlowGraphBuilder::StrictCompare(Token::Kind kind,
                                              bool number_check /* = false */) {
   Value* right = Pop();
@@ -188,9 +201,22 @@
 }
 
 Fragment BaseFlowGraphBuilder::CheckStackOverflow(TokenPosition position,
+                                                  intptr_t stack_depth,
                                                   intptr_t loop_depth) {
-  return Fragment(
-      new (Z) CheckStackOverflowInstr(position, loop_depth, GetNextDeoptId()));
+  return Fragment(new (Z) CheckStackOverflowInstr(
+      position, stack_depth, loop_depth, GetNextDeoptId(),
+      CheckStackOverflowInstr::kOsrAndPreemption));
+}
+
+Fragment BaseFlowGraphBuilder::CheckStackOverflowInPrologue(
+    TokenPosition position) {
+  if (IsInlining()) {
+    // If we are inlining don't actually attach the stack check.  We must still
+    // create the stack check in order to allocate a deopt id.
+    CheckStackOverflow(position, 0, 0);
+    return Fragment();
+  }
+  return CheckStackOverflow(position, 0, 0);
 }
 
 Fragment BaseFlowGraphBuilder::Constant(const Object& value) {
@@ -284,8 +310,7 @@
 Fragment BaseFlowGraphBuilder::TestAnyTypeArgs(Fragment present,
                                                Fragment absent) {
   if (parsed_function_->function().IsClosureFunction()) {
-    LocalVariable* closure =
-        parsed_function_->node_sequence()->scope()->VariableAt(0);
+    LocalVariable* closure = parsed_function_->ParameterVariable(0);
 
     JoinEntryInstr* complete = BuildJoinEntry();
     JoinEntryInstr* present_entry = BuildJoinEntry();
@@ -313,6 +338,62 @@
   return Fragment(instr);
 }
 
+Fragment BaseFlowGraphBuilder::LoadUntagged(intptr_t offset) {
+  Value* object = Pop();
+  auto load = new (Z) LoadUntaggedInstr(object, offset);
+  Push(load);
+  return Fragment(load);
+}
+
+Fragment BaseFlowGraphBuilder::StoreUntagged(intptr_t offset) {
+  Value* value = Pop();
+  Value* object = Pop();
+  auto store = new (Z) StoreUntaggedInstr(object, value, offset);
+  return Fragment(store);
+}
+
+Fragment BaseFlowGraphBuilder::ConvertUntaggedToIntptr() {
+  Value* value = Pop();
+  auto converted = new (Z)
+      IntConverterInstr(kUntagged, kUnboxedIntPtr, value, DeoptId::kNone);
+  converted->mark_truncating();
+  Push(converted);
+  return Fragment(converted);
+}
+
+Fragment BaseFlowGraphBuilder::ConvertIntptrToUntagged() {
+  Value* value = Pop();
+  auto converted = new (Z)
+      IntConverterInstr(kUnboxedIntPtr, kUntagged, value, DeoptId::kNone);
+  converted->mark_truncating();
+  Push(converted);
+  return Fragment(converted);
+}
+
+Fragment BaseFlowGraphBuilder::AddIntptrIntegers() {
+  Value* right = Pop();
+  Value* left = Pop();
+#if defined(TARGET_ARCH_ARM64) || defined(TARGET_ARCH_X64)
+  auto add = new (Z) BinaryInt64OpInstr(
+      Token::kADD, left, right, DeoptId::kNone, Instruction::kNotSpeculative);
+#else
+  auto add =
+      new (Z) BinaryInt32OpInstr(Token::kADD, left, right, DeoptId::kNone);
+#endif
+  add->mark_truncating();
+  Push(add);
+  return Fragment(add);
+}
+
+Fragment BaseFlowGraphBuilder::UnboxSmiToIntptr() {
+  Value* value = Pop();
+  auto untagged = new (Z)
+      UnboxIntegerInstr(kUnboxedIntPtr, UnboxIntegerInstr::kNoTruncation, value,
+                        DeoptId::kNone, Instruction::kNotSpeculative);
+  Push(untagged);
+  return Fragment(untagged);
+}
+
 Fragment BaseFlowGraphBuilder::LoadField(const Field& field) {
   return LoadNativeField(Slot::Get(MayCloneField(field), parsed_function_));
 }
@@ -325,6 +406,7 @@
 }
 
 Fragment BaseFlowGraphBuilder::LoadLocal(LocalVariable* variable) {
+  ASSERT(!variable->is_captured());
   LoadLocalInstr* load =
       new (Z) LoadLocalInstr(*variable, TokenPosition::kNoSource);
   Push(load);
@@ -338,10 +420,7 @@
 Fragment BaseFlowGraphBuilder::PushArgument() {
   PushArgumentInstr* argument = new (Z) PushArgumentInstr(Pop());
   Push(argument);
-
-  argument->set_temp_index(argument->temp_index() - 1);
   ++pending_argument_count_;
-
   return Fragment(argument);
 }
 
@@ -470,6 +549,7 @@
 
 Fragment BaseFlowGraphBuilder::StoreLocalRaw(TokenPosition position,
                                              LocalVariable* variable) {
+  ASSERT(!variable->is_captured());
   Value* value = Pop();
   StoreLocalInstr* store = new (Z) StoreLocalInstr(*variable, value, position);
   Fragment instructions(store);
@@ -480,7 +560,7 @@
 LocalVariable* BaseFlowGraphBuilder::MakeTemporary() {
   char name[64];
   intptr_t index = stack_->definition()->temp_index();
-  Utils::SNPrint(name, 64, ":temp%" Pd, index);
+  Utils::SNPrint(name, 64, ":t%" Pd, index);
   const String& symbol_name =
       String::ZoneHandle(Z, Symbols::New(thread_, name));
   LocalVariable* variable =
@@ -488,8 +568,8 @@
                             symbol_name, Object::dynamic_type());
   // Set the index relative to the base of the expression stack including
   // outgoing arguments.
-  variable->set_index(VariableIndex(-parsed_function_->num_stack_locals() -
-                                    pending_argument_count_ - index));
+  variable->set_index(
+      VariableIndex(-parsed_function_->num_stack_locals() - index));
 
   // The value has uses as if it were a local variable.  Mark the definition
   // as used so that its temp index will not be cleared (causing it to never
@@ -619,8 +699,10 @@
   return Fragment(instr);
 }
 
-Fragment BaseFlowGraphBuilder::LoadFpRelativeSlot(intptr_t offset) {
-  LoadIndexedUnsafeInstr* instr = new (Z) LoadIndexedUnsafeInstr(Pop(), offset);
+Fragment BaseFlowGraphBuilder::LoadFpRelativeSlot(intptr_t offset,
+                                                  CompileType result_type) {
+  LoadIndexedUnsafeInstr* instr =
+      new (Z) LoadIndexedUnsafeInstr(Pop(), offset, result_type);
   Push(instr);
   return Fragment(instr);
 }
@@ -669,6 +751,18 @@
   return Fragment(allocate);
 }
 
+Fragment BaseFlowGraphBuilder::AllocateClosure(
+    TokenPosition position,
+    const Function& closure_function) {
+  const Class& cls = Class::ZoneHandle(Z, I->object_store()->closure_class());
+  ArgumentArray arguments = new (Z) ZoneGrowableArray<PushArgumentInstr*>(Z, 0);
+  AllocateObjectInstr* allocate =
+      new (Z) AllocateObjectInstr(position, cls, arguments);
+  allocate->set_closure_function(closure_function);
+  Push(allocate);
+  return Fragment(allocate);
+}
+
 Fragment BaseFlowGraphBuilder::CreateArray() {
   Value* element_count = Pop();
   CreateArrayInstr* array =
@@ -701,6 +795,12 @@
   return Fragment(instr);
 }
 
+Fragment BaseFlowGraphBuilder::LoadClassId() {
+  LoadClassIdInstr* load = new (Z) LoadClassIdInstr(Pop());
+  Push(load);
+  return Fragment(load);
+}
+
 }  // namespace kernel
 }  // namespace dart
 
diff --git a/runtime/vm/compiler/frontend/base_flow_graph_builder.h b/runtime/vm/compiler/frontend/base_flow_graph_builder.h
index 69ff503..a800743 100644
--- a/runtime/vm/compiler/frontend/base_flow_graph_builder.h
+++ b/runtime/vm/compiler/frontend/base_flow_graph_builder.h
@@ -136,6 +136,14 @@
   Fragment LoadNativeField(const Slot& native_field);
   Fragment LoadIndexed(intptr_t index_scale);
 
+  Fragment LoadUntagged(intptr_t offset);
+  Fragment StoreUntagged(intptr_t offset);
+  Fragment ConvertUntaggedToIntptr();
+  Fragment ConvertIntptrToUntagged();
+  Fragment UnboxSmiToIntptr();
+
+  Fragment AddIntptrIntegers();
+
   void SetTempIndex(Definition* definition);
 
   Fragment LoadLocal(LocalVariable* variable);
@@ -197,6 +205,9 @@
   JoinEntryInstr* BuildJoinEntry();
   JoinEntryInstr* BuildJoinEntry(intptr_t try_index);
 
+  Fragment StrictCompare(TokenPosition position,
+                         Token::Kind kind,
+                         bool number_check = false);
   Fragment StrictCompare(Token::Kind kind, bool number_check = false);
   Fragment Goto(JoinEntryInstr* destination);
   Fragment IntConstant(int64_t value);
@@ -204,7 +215,7 @@
   Fragment NullConstant();
   Fragment SmiRelationalOp(Token::Kind kind);
   Fragment SmiBinaryOp(Token::Kind op, bool is_truncating = false);
-  Fragment LoadFpRelativeSlot(intptr_t offset);
+  Fragment LoadFpRelativeSlot(intptr_t offset, CompileType result_type);
   Fragment StoreFpRelativeSlot(intptr_t offset);
   Fragment BranchIfTrue(TargetEntryInstr** then_entry,
                         TargetEntryInstr** otherwise_entry,
@@ -218,7 +229,10 @@
   Fragment BranchIfStrictEqual(TargetEntryInstr** then_entry,
                                TargetEntryInstr** otherwise_entry);
   Fragment Return(TokenPosition position);
-  Fragment CheckStackOverflow(TokenPosition position, intptr_t loop_depth);
+  Fragment CheckStackOverflow(TokenPosition position,
+                              intptr_t stack_depth,
+                              intptr_t loop_depth);
+  Fragment CheckStackOverflowInPrologue(TokenPosition position);
   Fragment ThrowException(TokenPosition position);
   Fragment TailCall(const Code& code);
 
@@ -262,14 +276,22 @@
   Fragment AssertBool(TokenPosition position);
   Fragment BooleanNegate();
   Fragment AllocateContext(const GrowableArray<LocalVariable*>& scope);
+  Fragment AllocateClosure(TokenPosition position,
+                           const Function& closure_function);
   Fragment CreateArray();
   Fragment InstantiateType(const AbstractType& type);
   Fragment InstantiateTypeArguments(const TypeArguments& type_arguments);
+  Fragment LoadClassId();
 
   // Returns true if we are building a graph for inlining of a call site that
   // enters the function through the unchecked entry.
   bool InliningUncheckedEntry() const { return inlining_unchecked_entry_; }
 
+  // Returns depth of expression stack.
+  intptr_t GetStackDepth() const {
+    return stack_ == nullptr ? 0 : stack_->definition()->temp_index() + 1;
+  }
+
  protected:
   intptr_t AllocateBlockId() { return ++last_used_block_id_; }
 
diff --git a/runtime/vm/compiler/frontend/bytecode_flow_graph_builder.cc b/runtime/vm/compiler/frontend/bytecode_flow_graph_builder.cc
index 3853076..19b94e1 100644
--- a/runtime/vm/compiler/frontend/bytecode_flow_graph_builder.cc
+++ b/runtime/vm/compiler/frontend/bytecode_flow_graph_builder.cc
@@ -126,6 +126,7 @@
   if (is_generating_interpreter()) {
     UNIMPLEMENTED();  // TODO(alexmarkov): interpreter
   } else {
+    ASSERT(!IsStackEmpty());
     const Object& value = B->stack_->definition()->AsConstant()->value();
     code_ += B->Drop();
     return Constant(Z, value);
@@ -133,14 +134,11 @@
 }
 
 void BytecodeFlowGraphBuilder::LoadStackSlots(intptr_t num_slots) {
-  if (B->stack_ != nullptr) {
-    intptr_t stack_depth = B->stack_->definition()->temp_index() + 1;
-    ASSERT(stack_depth >= num_slots);
-    return;
+  if (is_generating_interpreter()) {
+    UNIMPLEMENTED();  // TODO(alexmarkov): interpreter
   }
 
-  ASSERT(is_generating_interpreter());
-  UNIMPLEMENTED();  // TODO(alexmarkov): interpreter
+  ASSERT(GetStackDepth() >= num_slots);
 }
 
 void BytecodeFlowGraphBuilder::AllocateLocalVariables(
@@ -288,11 +286,22 @@
   return B->Pop();
 }
 
+intptr_t BytecodeFlowGraphBuilder::GetStackDepth() const {
+  ASSERT(!is_generating_interpreter());
+  return B->GetStackDepth();
+}
+
+bool BytecodeFlowGraphBuilder::IsStackEmpty() const {
+  ASSERT(!is_generating_interpreter());
+  return B->GetStackDepth() == 0;
+}
+
 ArgumentArray BytecodeFlowGraphBuilder::GetArguments(int count) {
   ArgumentArray arguments =
       new (Z) ZoneGrowableArray<PushArgumentInstr*>(Z, count);
   arguments->SetLength(count);
   for (intptr_t i = count - 1; i >= 0; --i) {
+    ASSERT(!IsStackEmpty());
     Definition* arg_def = B->stack_->definition();
     ASSERT(!arg_def->HasSSATemp());
     ASSERT(arg_def->temp_index() >= i);
@@ -314,16 +323,10 @@
 }
 
 void BytecodeFlowGraphBuilder::PropagateStackState(intptr_t target_pc) {
-  if (is_generating_interpreter() || (B->stack_ == nullptr)) {
+  if (is_generating_interpreter() || IsStackEmpty()) {
     return;
   }
 
-  // Stack state propagation is supported for forward branches only.
-  // Bytecode generation guarantees that expression stack is empty between
-  // statements and backward jumps are only used to transfer control between
-  // statements (e.g. in loop and continue statements).
-  RELEASE_ASSERT(target_pc > pc_);
-
   Value* current_stack = B->stack_;
   Value* target_stack = stack_states_.Lookup(target_pc);
 
@@ -332,10 +335,38 @@
     // all incoming branches.
     RELEASE_ASSERT(target_stack == current_stack);
   } else {
+    // Stack state propagation is supported for forward branches only.
+    RELEASE_ASSERT(target_pc > pc_);
     stack_states_.Insert(target_pc, current_stack);
   }
 }
 
+// Drop values from the stack unless they are used in control flow joins
+// which are not generated yet (dartbug.com/36374).
+void BytecodeFlowGraphBuilder::DropUnusedValuesFromStack() {
+  intptr_t drop_depth = GetStackDepth();
+  auto it = stack_states_.GetIterator();
+  for (const auto* current = it.Next(); current != nullptr;
+       current = it.Next()) {
+    if (current->key > pc_) {
+      Value* used_value = current->value;
+      Value* value = B->stack_;
+      // Find if a value on the expression stack is used in a propagated
+      // stack state, and adjust [drop_depth] to preserve it.
+      for (intptr_t i = 0; i < drop_depth; ++i) {
+        if (value == used_value) {
+          drop_depth = i;
+          break;
+        }
+        value = value->next_use();
+      }
+    }
+  }
+  for (intptr_t i = 0; i < drop_depth; ++i) {
+    B->Pop();
+  }
+}
+
 void BytecodeFlowGraphBuilder::BuildInstruction(KernelBytecode::Opcode opcode) {
   switch (opcode) {
 #define BUILD_BYTECODE_CASE(name, encoding, op1, op2, op3)                     \
@@ -343,7 +374,7 @@
     Build##name();                                                             \
     break;
 
-    KERNEL_BYTECODES_LIST(BUILD_BYTECODE_CASE)
+    PUBLIC_KERNEL_BYTECODES_LIST(BUILD_BYTECODE_CASE)
 
 #undef BUILD_BYTECODE_CASE
     default:
@@ -391,7 +422,7 @@
   Fragment(fail1) + B->Goto(throw_no_such_method_);
   Fragment(fail2) + B->Goto(throw_no_such_method_);
 
-  ASSERT(B->stack_ == nullptr);
+  ASSERT(IsStackEmpty());
 
   if (!B->IsInlining() && !B->IsCompiledForOsr()) {
     code_ += check_args;
@@ -527,7 +558,7 @@
   // Skip LoadConstant and Frame instructions.
   pc_ += num_load_const + 1;
 
-  ASSERT(B->stack_ == nullptr);
+  ASSERT(IsStackEmpty());
 }
 
 void BytecodeFlowGraphBuilder::BuildLoadConstant() {
@@ -597,7 +628,8 @@
     store_type_args += B->LoadArgDescriptor();
     store_type_args += B->LoadNativeField(Slot::ArgumentsDescriptor_count());
     store_type_args += B->LoadFpRelativeSlot(
-        kWordSize * (1 + compiler::target::frame_layout.param_end_from_fp));
+        kWordSize * (1 + compiler::target::frame_layout.param_end_from_fp),
+        CompileType::CreateNullable(/*is_nullable=*/true, kTypeArgumentsCid));
     store_type_args +=
         B->StoreLocalRaw(TokenPosition::kNoSource, type_args_var);
     store_type_args += B->Drop();
@@ -613,7 +645,7 @@
   }
 
   setup_type_args = Fragment(setup_type_args.entry, done);
-  ASSERT(B->stack_ == nullptr);
+  ASSERT(IsStackEmpty());
 
   if (expected_num_type_args != 0) {
     parsed_function()->set_function_type_arguments(type_args_var);
@@ -629,8 +661,14 @@
   if (is_generating_interpreter()) {
     UNIMPLEMENTED();  // TODO(alexmarkov): interpreter
   }
-  code_ += B->CheckStackOverflow(position_, DecodeOperandA().value());
-  ASSERT(B->stack_ == nullptr);
+  const intptr_t loop_depth = DecodeOperandA().value();
+  if (loop_depth == 0) {
+    ASSERT(IsStackEmpty());
+    code_ += B->CheckStackOverflowInPrologue(position_);
+  } else {
+    const intptr_t stack_depth = B->GetStackDepth();
+    code_ += B->CheckStackOverflow(position_, stack_depth, loop_depth);
+  }
 }
 
 void BytecodeFlowGraphBuilder::BuildPushConstant() {
@@ -707,10 +745,24 @@
   }
 
   const Function& target = Function::Cast(ConstantAt(DecodeOperandD()).value());
+  const intptr_t argc = DecodeOperandA().value();
+
+  // Recognize identical() call.
+  // Note: similar optimization is performed in AST flow graph builder - see
+  // StreamingFlowGraphBuilder::BuildStaticInvocation, special_case_identical.
+  // TODO(alexmarkov): find a better place for this optimization.
+  if (target.name() == Symbols::Identical().raw()) {
+    const auto& owner = Class::Handle(Z, target.Owner());
+    if (owner.IsTopLevel() && (owner.library() == Library::CoreLibrary())) {
+      ASSERT(argc == 2);
+      code_ += B->StrictCompare(Token::kEQ_STRICT, /*number_check=*/true);
+      return;
+    }
+  }
+
   const Array& arg_desc_array =
       Array::Cast(ConstantAt(DecodeOperandD(), 1).value());
   const ArgumentsDescriptor arg_desc(arg_desc_array);
-  intptr_t argc = DecodeOperandA().value();
 
   ArgumentArray arguments = GetArguments(argc);
 
@@ -728,12 +780,15 @@
   B->Push(call);
 }
 
-void BytecodeFlowGraphBuilder::BuildInterfaceCall() {
+void BytecodeFlowGraphBuilder::BuildInterfaceCallCommon(
+    bool is_unchecked_call) {
   if (is_generating_interpreter()) {
     UNIMPLEMENTED();  // TODO(alexmarkov): interpreter
   }
 
-  const String& name = String::Cast(ConstantAt(DecodeOperandD()).value());
+  const Function& interface_target =
+      Function::Cast(ConstantAt(DecodeOperandD()).value());
+  const String& name = String::ZoneHandle(Z, interface_target.name());
   ASSERT(name.IsSymbol());
 
   const Array& arg_desc_array =
@@ -757,19 +812,29 @@
 
   const ArgumentArray arguments = GetArguments(argc);
 
-  // TODO(alexmarkov): store interface_target in bytecode and pass it here.
-
   InstanceCallInstr* call = new (Z) InstanceCallInstr(
       position_, name, token_kind, arguments, arg_desc.TypeArgsLen(),
       Array::ZoneHandle(Z, arg_desc.GetArgumentNames()), checked_argument_count,
-      *ic_data_array_, B->GetNextDeoptId());
+      *ic_data_array_, B->GetNextDeoptId(), interface_target);
 
   // TODO(alexmarkov): add type info - call->SetResultType()
 
+  if (is_unchecked_call) {
+    call->set_entry_kind(Code::EntryKind::kUnchecked);
+  }
+
   code_ <<= call;
   B->Push(call);
 }
 
+void BytecodeFlowGraphBuilder::BuildInterfaceCall() {
+  BuildInterfaceCallCommon(/*is_unchecked_call=*/false);
+}
+
+void BytecodeFlowGraphBuilder::BuildUncheckedInterfaceCall() {
+  BuildInterfaceCallCommon(/*is_unchecked_call=*/true);
+}
+
 void BytecodeFlowGraphBuilder::BuildDynamicCall() {
   if (is_generating_interpreter()) {
     UNIMPLEMENTED();  // TODO(alexmarkov): interpreter
@@ -788,12 +853,12 @@
 
   const ArgumentArray arguments = GetArguments(argc);
 
-  // TODO(alexmarkov): store interface_target in bytecode and pass it here.
+  const Function& interface_target = Function::null_function();
 
   InstanceCallInstr* call = new (Z) InstanceCallInstr(
       position_, name, token_kind, arguments, arg_desc.TypeArgsLen(),
       Array::ZoneHandle(Z, arg_desc.GetArgumentNames()), icdata.NumArgsTested(),
-      *ic_data_array_, icdata.deopt_id());
+      *ic_data_array_, icdata.deopt_id(), interface_target);
 
   ASSERT(call->ic_data() != nullptr);
   ASSERT(call->ic_data()->Original() == icdata.raw());
@@ -809,8 +874,195 @@
     UNIMPLEMENTED();  // TODO(alexmarkov): interpreter
   }
 
-  // Default flow graph builder is used to compile native methods.
-  UNREACHABLE();
+  ASSERT(function().is_native());
+
+  // TODO(alexmarkov): find a way to avoid code duplication with
+  // FlowGraphBuilder::NativeFunctionBody.
+  const MethodRecognizer::Kind kind =
+      MethodRecognizer::RecognizeKind(function());
+  switch (kind) {
+    case MethodRecognizer::kObjectEquals:
+      ASSERT((function().NumParameters() == 2) && !function().IsGeneric());
+      code_ += B->StrictCompare(Token::kEQ_STRICT);
+      break;
+    case MethodRecognizer::kStringBaseLength:
+    case MethodRecognizer::kStringBaseIsEmpty:
+      ASSERT((function().NumParameters() == 1) && !function().IsGeneric());
+      code_ += B->LoadNativeField(Slot::String_length());
+      if (kind == MethodRecognizer::kStringBaseIsEmpty) {
+        code_ += B->IntConstant(0);
+        code_ += B->StrictCompare(Token::kEQ_STRICT);
+      }
+      break;
+    case MethodRecognizer::kGrowableArrayLength:
+      ASSERT((function().NumParameters() == 1) && !function().IsGeneric());
+      code_ += B->LoadNativeField(Slot::GrowableObjectArray_length());
+      break;
+    case MethodRecognizer::kObjectArrayLength:
+    case MethodRecognizer::kImmutableArrayLength:
+      ASSERT((function().NumParameters() == 1) && !function().IsGeneric());
+      code_ += B->LoadNativeField(Slot::Array_length());
+      break;
+    case MethodRecognizer::kTypedListLength:
+    case MethodRecognizer::kTypedListViewLength:
+    case MethodRecognizer::kByteDataViewLength:
+      ASSERT((function().NumParameters() == 1) && !function().IsGeneric());
+      code_ += B->LoadNativeField(Slot::TypedDataBase_length());
+      break;
+    case MethodRecognizer::kClassIDgetID:
+      ASSERT((function().NumParameters() == 1) && !function().IsGeneric());
+      code_ += B->LoadClassId();
+      break;
+    case MethodRecognizer::kGrowableArrayCapacity:
+      ASSERT((function().NumParameters() == 1) && !function().IsGeneric());
+      code_ += B->LoadNativeField(Slot::GrowableObjectArray_data());
+      code_ += B->LoadNativeField(Slot::Array_length());
+      break;
+    case MethodRecognizer::kListFactory: {
+      ASSERT((function().NumParameters() == 2) && !function().IsGeneric() &&
+             function().HasOptionalParameters());
+      ASSERT(scratch_var_ != nullptr);
+      // Generate code that performs:
+      //
+      // factory List<E>([int length]) {
+      //   return (:arg_desc.positional_count == 2) ? new _List<E>(length)
+      //                                            : new _GrowableList<E>(0);
+      // }
+      const auto& core_lib = Library::Handle(Z, Library::CoreLibrary());
+
+      TargetEntryInstr *allocate_non_growable, *allocate_growable;
+
+      code_ += B->Drop();  // Drop 'length'.
+      code_ += B->Drop();  // Drop 'type arguments'.
+      code_ += B->LoadArgDescriptor();
+      code_ += B->LoadNativeField(Slot::ArgumentsDescriptor_positional_count());
+      code_ += B->IntConstant(2);
+      code_ +=
+          B->BranchIfStrictEqual(&allocate_non_growable, &allocate_growable);
+
+      JoinEntryInstr* join = B->BuildJoinEntry();
+
+      {
+        const auto& cls = Class::Handle(
+            Z, core_lib.LookupClass(
+                   Library::PrivateCoreLibName(Symbols::_List())));
+        ASSERT(!cls.IsNull());
+        const auto& func = Function::ZoneHandle(
+            Z, cls.LookupFactoryAllowPrivate(Symbols::_ListFactory()));
+        ASSERT(!func.IsNull());
+
+        code_ = Fragment(allocate_non_growable);
+        code_ += B->LoadLocal(LocalVariableAt(0));
+        code_ += B->LoadLocal(LocalVariableAt(1));
+        auto* call = new (Z) StaticCallInstr(
+            TokenPosition::kNoSource, func, 0, Array::null_array(),
+            GetArguments(2), *ic_data_array_, B->GetNextDeoptId(),
+            ICData::kStatic);
+        code_ <<= call;
+        B->Push(call);
+        code_ += B->StoreLocal(TokenPosition::kNoSource, scratch_var_);
+        code_ += B->Drop();
+        code_ += B->Goto(join);
+      }
+
+      {
+        const auto& cls = Class::Handle(
+            Z, core_lib.LookupClass(
+                   Library::PrivateCoreLibName(Symbols::_GrowableList())));
+        ASSERT(!cls.IsNull());
+        const auto& func = Function::ZoneHandle(
+            Z, cls.LookupFactoryAllowPrivate(Symbols::_GrowableListFactory()));
+        ASSERT(!func.IsNull());
+
+        code_ = Fragment(allocate_growable);
+        code_ += B->LoadLocal(LocalVariableAt(0));
+        code_ += B->IntConstant(0);
+        auto* call = new (Z) StaticCallInstr(
+            TokenPosition::kNoSource, func, 0, Array::null_array(),
+            GetArguments(2), *ic_data_array_, B->GetNextDeoptId(),
+            ICData::kStatic);
+        code_ <<= call;
+        B->Push(call);
+        code_ += B->StoreLocal(TokenPosition::kNoSource, scratch_var_);
+        code_ += B->Drop();
+        code_ += B->Goto(join);
+      }
+
+      code_ = Fragment(join);
+      code_ += B->LoadLocal(scratch_var_);
+      break;
+    }
+    case MethodRecognizer::kObjectArrayAllocate:
+      ASSERT((function().NumParameters() == 2) && !function().IsGeneric());
+      code_ += B->CreateArray();
+      break;
+    case MethodRecognizer::kLinkedHashMap_getIndex:
+      ASSERT((function().NumParameters() == 1) && !function().IsGeneric());
+      code_ += B->LoadNativeField(Slot::LinkedHashMap_index());
+      break;
+    case MethodRecognizer::kLinkedHashMap_setIndex:
+      ASSERT((function().NumParameters() == 2) && !function().IsGeneric());
+      code_ += B->StoreInstanceField(TokenPosition::kNoSource,
+                                     Slot::LinkedHashMap_index());
+      code_ += B->NullConstant();
+      break;
+    case MethodRecognizer::kLinkedHashMap_getData:
+      ASSERT((function().NumParameters() == 1) && !function().IsGeneric());
+      code_ += B->LoadNativeField(Slot::LinkedHashMap_data());
+      break;
+    case MethodRecognizer::kLinkedHashMap_setData:
+      ASSERT((function().NumParameters() == 2) && !function().IsGeneric());
+      code_ += B->StoreInstanceField(TokenPosition::kNoSource,
+                                     Slot::LinkedHashMap_data());
+      code_ += B->NullConstant();
+      break;
+    case MethodRecognizer::kLinkedHashMap_getHashMask:
+      ASSERT((function().NumParameters() == 1) && !function().IsGeneric());
+      code_ += B->LoadNativeField(Slot::LinkedHashMap_hash_mask());
+      break;
+    case MethodRecognizer::kLinkedHashMap_setHashMask:
+      ASSERT((function().NumParameters() == 2) && !function().IsGeneric());
+      code_ += B->StoreInstanceField(TokenPosition::kNoSource,
+                                     Slot::LinkedHashMap_hash_mask(),
+                                     kNoStoreBarrier);
+      code_ += B->NullConstant();
+      break;
+    case MethodRecognizer::kLinkedHashMap_getUsedData:
+      ASSERT((function().NumParameters() == 1) && !function().IsGeneric());
+      code_ += B->LoadNativeField(Slot::LinkedHashMap_used_data());
+      break;
+    case MethodRecognizer::kLinkedHashMap_setUsedData:
+      ASSERT((function().NumParameters() == 2) && !function().IsGeneric());
+      code_ += B->StoreInstanceField(TokenPosition::kNoSource,
+                                     Slot::LinkedHashMap_used_data(),
+                                     kNoStoreBarrier);
+      code_ += B->NullConstant();
+      break;
+    case MethodRecognizer::kLinkedHashMap_getDeletedKeys:
+      ASSERT((function().NumParameters() == 1) && !function().IsGeneric());
+      code_ += B->LoadNativeField(Slot::LinkedHashMap_deleted_keys());
+      break;
+    case MethodRecognizer::kLinkedHashMap_setDeletedKeys:
+      ASSERT((function().NumParameters() == 2) && !function().IsGeneric());
+      code_ += B->StoreInstanceField(TokenPosition::kNoSource,
+                                     Slot::LinkedHashMap_deleted_keys(),
+                                     kNoStoreBarrier);
+      code_ += B->NullConstant();
+      break;
+    default: {
+      B->InlineBailout("BytecodeFlowGraphBuilder::BuildNativeCall");
+      const auto& name = String::ZoneHandle(Z, function().native_name());
+      const intptr_t num_args =
+          function().NumParameters() + (function().IsGeneric() ? 1 : 0);
+      ArgumentArray arguments = GetArguments(num_args);
+      auto* call =
+          new (Z) NativeCallInstr(&name, &function(), FLAG_link_natives_lazily,
+                                  function().end_token_pos(), arguments);
+      code_ <<= call;
+      B->Push(call);
+      break;
+    }
+  }
 }
 
 void BytecodeFlowGraphBuilder::BuildAllocate() {
@@ -1112,7 +1364,7 @@
 }
 
 void BytecodeFlowGraphBuilder::BuildJumpIfNoAsserts() {
-  ASSERT(B->stack_ == nullptr);
+  ASSERT(IsStackEmpty());
   if (!isolate()->asserts()) {
     BuildJump();
     // Skip all instructions up to the target PC, as they are all unreachable.
@@ -1216,7 +1468,7 @@
   LoadStackSlots(1);
   ASSERT(code_.is_open());
   code_ += B->Return(position_);
-  ASSERT(B->stack_ == nullptr);
+  ASSERT(IsStackEmpty());
 }
 
 void BytecodeFlowGraphBuilder::BuildTrap() {
@@ -1244,9 +1496,9 @@
 
   ASSERT(code_.is_closed());
 
-  // Empty stack as closed fragment should not leave any values on the stack.
-  while (B->stack_ != nullptr) {
-    B->Pop();
+  if (!IsStackEmpty()) {
+    DropUnusedValuesFromStack();
+    B->stack_ = nullptr;
   }
 }
 
@@ -1280,7 +1532,7 @@
   }
 
   // No-op in compiled code.
-  ASSERT(B->stack_ == nullptr);
+  ASSERT(IsStackEmpty());
 }
 
 void BytecodeFlowGraphBuilder::BuildEqualsNull() {
@@ -1309,9 +1561,11 @@
   code_ += B->LoadLocal(scratch_var_);
 }
 
-void BytecodeFlowGraphBuilder::BuildIntOp(const String& name,
-                                          Token::Kind token_kind,
-                                          int num_args) {
+void BytecodeFlowGraphBuilder::BuildPrimitiveOp(
+    const String& name,
+    Token::Kind token_kind,
+    const AbstractType& static_receiver_type,
+    int num_args) {
   ASSERT((num_args == 1) || (num_args == 2));
   ASSERT(MethodTokenRecognizer::RecognizeTokenKind(name) == token_kind);
 
@@ -1322,10 +1576,26 @@
       position_, name, token_kind, arguments, 0, Array::null_array(), num_args,
       *ic_data_array_, B->GetNextDeoptId());
 
+  call->set_receivers_static_type(&static_receiver_type);
+
   code_ <<= call;
   B->Push(call);
 }
 
+void BytecodeFlowGraphBuilder::BuildIntOp(const String& name,
+                                          Token::Kind token_kind,
+                                          int num_args) {
+  BuildPrimitiveOp(name, token_kind,
+                   AbstractType::ZoneHandle(Z, Type::IntType()), num_args);
+}
+
+void BytecodeFlowGraphBuilder::BuildDoubleOp(const String& name,
+                                             Token::Kind token_kind,
+                                             int num_args) {
+  BuildPrimitiveOp(name, token_kind,
+                   AbstractType::ZoneHandle(Z, Type::Double()), num_args);
+}
+
 void BytecodeFlowGraphBuilder::BuildNegateInt() {
   BuildIntOp(Symbols::UnaryMinus(), Token::kNEGATE, 1);
 }
@@ -1390,6 +1660,55 @@
   BuildIntOp(Symbols::LessEqualOperator(), Token::kLTE, 2);
 }
 
+void BytecodeFlowGraphBuilder::BuildNegateDouble() {
+  BuildDoubleOp(Symbols::UnaryMinus(), Token::kNEGATE, 1);
+}
+
+void BytecodeFlowGraphBuilder::BuildAddDouble() {
+  BuildDoubleOp(Symbols::Plus(), Token::kADD, 2);
+}
+
+void BytecodeFlowGraphBuilder::BuildSubDouble() {
+  BuildDoubleOp(Symbols::Minus(), Token::kSUB, 2);
+}
+
+void BytecodeFlowGraphBuilder::BuildMulDouble() {
+  BuildDoubleOp(Symbols::Star(), Token::kMUL, 2);
+}
+
+void BytecodeFlowGraphBuilder::BuildDivDouble() {
+  BuildDoubleOp(Symbols::Slash(), Token::kDIV, 2);
+}
+
+void BytecodeFlowGraphBuilder::BuildCompareDoubleEq() {
+  BuildDoubleOp(Symbols::EqualOperator(), Token::kEQ, 2);
+}
+
+void BytecodeFlowGraphBuilder::BuildCompareDoubleGt() {
+  BuildDoubleOp(Symbols::RAngleBracket(), Token::kGT, 2);
+}
+
+void BytecodeFlowGraphBuilder::BuildCompareDoubleLt() {
+  BuildDoubleOp(Symbols::LAngleBracket(), Token::kLT, 2);
+}
+
+void BytecodeFlowGraphBuilder::BuildCompareDoubleGe() {
+  BuildDoubleOp(Symbols::GreaterEqualOperator(), Token::kGTE, 2);
+}
+
+void BytecodeFlowGraphBuilder::BuildCompareDoubleLe() {
+  BuildDoubleOp(Symbols::LessEqualOperator(), Token::kLTE, 2);
+}
+
+void BytecodeFlowGraphBuilder::BuildAllocateClosure() {
+  if (is_generating_interpreter()) {
+    UNIMPLEMENTED();  // TODO(alexmarkov): interpreter
+  }
+
+  const Function& target = Function::Cast(ConstantAt(DecodeOperandD()).value());
+  code_ += B->AllocateClosure(position_, target);
+}
+
 static bool IsICDataEntry(const ObjectPool& object_pool, intptr_t index) {
   if (object_pool.TypeAt(index) != ObjectPool::EntryType::kTaggedObject) {
     return false;
@@ -1471,6 +1790,9 @@
       return KernelBytecode::DecodeC(instr) > 0;
     case KernelBytecode::kEqualsNull:
       return true;
+    case KernelBytecode::kNativeCall:
+      return MethodRecognizer::RecognizeKind(function()) ==
+             MethodRecognizer::kListFactory;
     default:
       return false;
   }
@@ -1486,6 +1808,13 @@
     if (KernelBytecode::IsJumpOpcode(instr)) {
       const intptr_t target = pc + KernelBytecode::DecodeT(instr);
       EnsureControlFlowJoin(descriptors, target);
+    } else if ((KernelBytecode::DecodeOpcode(instr) ==
+                KernelBytecode::kCheckStack) &&
+               (KernelBytecode::DecodeA(instr) != 0)) {
+      // (dartbug.com/36590) BlockEntryInstr::FindOsrEntryAndRelink assumes
+      // that CheckStackOverflow instruction is at the beginning of a join
+      // block.
+      EnsureControlFlowJoin(descriptors, pc);
     }
 
     if ((scratch_var_ == nullptr) && RequiresScratchVar(instr)) {
@@ -1547,9 +1876,6 @@
 }
 
 FlowGraph* BytecodeFlowGraphBuilder::BuildGraph() {
-  // Use default flow graph builder for native methods.
-  ASSERT(!function().is_native());
-
   const Bytecode& bytecode = Bytecode::Handle(Z, function().bytecode());
 
   object_pool_ = bytecode.object_pool();
@@ -1583,10 +1909,13 @@
     if (join != nullptr) {
       Value* stack_state = stack_states_.Lookup(pc_);
       if (code_.is_open()) {
-        ASSERT((stack_state == nullptr) || (stack_state == B->stack_));
+        if (stack_state != B->stack_) {
+          ASSERT(stack_state == nullptr);
+          stack_states_.Insert(pc_, B->stack_);
+        }
         code_ += B->Goto(join);
       } else {
-        ASSERT(B->stack_ == nullptr);
+        ASSERT(IsStackEmpty());
         B->stack_ = stack_state;
       }
       code_ = Fragment(join);
@@ -1605,7 +1934,7 @@
     BuildInstruction(KernelBytecode::DecodeOpcode(bytecode_instr_));
 
     if (code_.is_closed()) {
-      ASSERT(B->stack_ == nullptr);
+      ASSERT(IsStackEmpty());
     }
   }
 
diff --git a/runtime/vm/compiler/frontend/bytecode_flow_graph_builder.h b/runtime/vm/compiler/frontend/bytecode_flow_graph_builder.h
index cbfa60d..c085374 100644
--- a/runtime/vm/compiler/frontend/bytecode_flow_graph_builder.h
+++ b/runtime/vm/compiler/frontend/bytecode_flow_graph_builder.h
@@ -126,10 +126,19 @@
   void StoreLocal(Operand local_index);
   void LoadLocal(Operand local_index);
   Value* Pop();
+  intptr_t GetStackDepth() const;
+  bool IsStackEmpty() const;
   ArgumentArray GetArguments(int count);
   void PropagateStackState(intptr_t target_pc);
+  void DropUnusedValuesFromStack();
   void BuildJumpIfStrictCompare(Token::Kind cmp_kind);
+  void BuildPrimitiveOp(const String& name,
+                        Token::Kind token_kind,
+                        const AbstractType& static_receiver_type,
+                        int num_args);
   void BuildIntOp(const String& name, Token::Kind token_kind, int num_args);
+  void BuildDoubleOp(const String& name, Token::Kind token_kind, int num_args);
+  void BuildInterfaceCallCommon(bool is_unchecked_call);
 
   void BuildInstruction(KernelBytecode::Opcode opcode);
 
diff --git a/runtime/vm/compiler/frontend/bytecode_reader.cc b/runtime/vm/compiler/frontend/bytecode_reader.cc
index 3c7e344..c2a6590 100644
--- a/runtime/vm/compiler/frontend/bytecode_reader.cc
+++ b/runtime/vm/compiler/frontend/bytecode_reader.cc
@@ -4,10 +4,12 @@
 
 #include "vm/compiler/frontend/bytecode_reader.h"
 
+#include "vm/bit_vector.h"
 #include "vm/bootstrap.h"
 #include "vm/class_finalizer.h"
 #include "vm/code_descriptors.h"
 #include "vm/compiler/assembler/disassembler_kbc.h"
+#include "vm/compiler/frontend/bytecode_scope_builder.h"
 #include "vm/constants_kbc.h"
 #include "vm/dart_entry.h"
 #include "vm/longjump.h"
@@ -19,7 +21,7 @@
 
 #define Z (zone_)
 #define H (translation_helper_)
-#define I Isolate::Current()
+#define I (translation_helper_.isolate())
 
 namespace dart {
 
@@ -47,28 +49,142 @@
   tds.SetNumArguments(1);
   tds.CopyArgument(0, "Function", function.ToQualifiedCString());
 #endif  // defined(DEBUG)
-#endif  // !defined(PRODUCT)
+#endif  // !defined(SUPPORT_TIMELINE)
 
-  const intptr_t node_offset = function.kernel_offset();
-  const intptr_t md_offset = GetNextMetadataPayloadOffset(node_offset);
-  if (md_offset < 0) {
-    return;
+  switch (function.kind()) {
+    case RawFunction::kImplicitGetter:
+      function.AttachBytecode(Object::implicit_getter_bytecode());
+      return;
+    case RawFunction::kImplicitSetter:
+      function.AttachBytecode(Object::implicit_setter_bytecode());
+      return;
+    case RawFunction::kMethodExtractor:
+      function.AttachBytecode(Object::method_extractor_bytecode());
+      return;
+    default: {
+    }
+  }
+
+  intptr_t code_offset = 0;
+  if (function.is_declared_in_bytecode()) {
+    code_offset = function.bytecode_offset();
+    if (code_offset == 0) {
+      return;
+    }
+  } else {
+    const intptr_t node_offset = function.kernel_offset();
+    code_offset = GetNextMetadataPayloadOffset(node_offset);
+    if (code_offset < 0) {
+      return;
+    }
   }
 
   ASSERT(Thread::Current()->IsMutatorThread());
 
-  Array& bytecode_component_array =
-      Array::Handle(helper_->zone_, translation_helper_.GetBytecodeComponent());
-  if (bytecode_component_array.IsNull()) {
-    bytecode_component_array = ReadBytecodeComponent();
-    ASSERT(!bytecode_component_array.IsNull());
-  }
-
-  BytecodeComponentData bytecode_component(bytecode_component_array);
+  BytecodeComponentData bytecode_component(
+      Array::Handle(helper_->zone_, GetBytecodeComponent()));
   BytecodeReaderHelper bytecode_reader(helper_, active_class_,
                                        &bytecode_component);
 
-  bytecode_reader.ReadMemberBytecode(function, md_offset);
+  bytecode_reader.ReadCode(function, code_offset);
+}
+
+void BytecodeMetadataHelper::ParseBytecodeFunction(
+    ParsedFunction* parsed_function) {
+  TIMELINE_DURATION(Thread::Current(), CompilerVerbose,
+                    "BytecodeMetadataHelper::ParseBytecodeFunction");
+
+  const Function& function = parsed_function->function();
+  ASSERT(function.is_declared_in_bytecode());
+
+  // No parsing is needed if function has bytecode attached.
+  // With one exception: implicit functions with artificial are still handled
+  // by shared flow graph builder which requires scopes/parsing.
+  if (function.HasBytecode() &&
+      (function.kind() != RawFunction::kImplicitGetter) &&
+      (function.kind() != RawFunction::kImplicitSetter) &&
+      (function.kind() != RawFunction::kMethodExtractor)) {
+    return;
+  }
+
+  BytecodeComponentData bytecode_component(
+      Array::Handle(helper_->zone_, GetBytecodeComponent()));
+  BytecodeReaderHelper bytecode_reader(helper_, active_class_,
+                                       &bytecode_component);
+
+  bytecode_reader.ParseBytecodeFunction(parsed_function, function);
+}
+
+bool BytecodeMetadataHelper::ReadMembers(intptr_t node_offset,
+                                         const Class& cls,
+                                         bool discard_fields) {
+  TIMELINE_DURATION(Thread::Current(), Compiler,
+                    "BytecodeMetadataHelper::ReadMembers");
+
+  ASSERT(node_offset > 0);
+  const intptr_t md_offset = GetNextMetadataPayloadOffset(node_offset);
+  if (md_offset < 0) {
+    return false;
+  }
+
+  ASSERT(Thread::Current()->IsMutatorThread());
+
+  BytecodeComponentData bytecode_component(
+      Array::Handle(helper_->zone_, GetBytecodeComponent()));
+  BytecodeReaderHelper bytecode_reader(helper_, active_class_,
+                                       &bytecode_component);
+
+  AlternativeReadingScope alt(&helper_->reader_, &H.metadata_payloads(),
+                              md_offset);
+
+  intptr_t members_offset = helper_->reader_.ReadUInt();
+
+  bytecode_reader.ReadMembers(cls, members_offset, discard_fields);
+
+  return true;
+}
+
+RawObject* BytecodeMetadataHelper::ReadAnnotation(intptr_t annotation_offset) {
+  ASSERT(Thread::Current()->IsMutatorThread());
+
+  BytecodeComponentData bytecode_component(
+      Array::Handle(helper_->zone_, GetBytecodeComponent()));
+  BytecodeReaderHelper bytecode_reader(helper_, active_class_,
+                                       &bytecode_component);
+
+  AlternativeReadingScope alt(&helper_->reader_, &H.metadata_payloads(),
+                              annotation_offset);
+
+  return bytecode_reader.ReadObject();
+}
+
+RawLibrary* BytecodeMetadataHelper::GetMainLibrary() {
+  const intptr_t md_offset = GetComponentMetadataPayloadOffset();
+  if (md_offset < 0) {
+    return Library::null();
+  }
+
+  BytecodeComponentData bytecode_component(
+      Array::Handle(helper_->zone_, GetBytecodeComponent()));
+  const intptr_t main_offset = bytecode_component.GetMainOffset();
+  if (main_offset == 0) {
+    return Library::null();
+  }
+
+  BytecodeReaderHelper bytecode_reader(helper_, active_class_,
+                                       &bytecode_component);
+  AlternativeReadingScope alt(&helper_->reader_, &H.metadata_payloads(),
+                              main_offset);
+  return bytecode_reader.ReadMain();
+}
+
+RawArray* BytecodeMetadataHelper::GetBytecodeComponent() {
+  RawArray* array = translation_helper_.GetBytecodeComponent();
+  if (array == Array::null()) {
+    array = ReadBytecodeComponent();
+    ASSERT(array != Array::null());
+  }
+  return array;
 }
 
 RawArray* BytecodeMetadataHelper::ReadBytecodeComponent() {
@@ -90,26 +206,47 @@
       active_class_(active_class),
       zone_(helper_->zone_),
       bytecode_component_(bytecode_component),
-      closures_(nullptr),
-      function_type_type_parameters_(nullptr) {}
+      scoped_function_(Function::Handle(helper_->zone_)),
+      scoped_function_name_(String::Handle(helper_->zone_)),
+      scoped_function_class_(Class::Handle(helper_->zone_)) {}
 
-void BytecodeReaderHelper::ReadMemberBytecode(const Function& function,
-                                              intptr_t md_offset) {
+void BytecodeReaderHelper::ReadCode(const Function& function,
+                                    intptr_t code_offset) {
   ASSERT(Thread::Current()->IsMutatorThread());
+  ASSERT(!function.IsImplicitGetterFunction() &&
+         !function.IsImplicitSetterFunction());
+  ASSERT(code_offset > 0);
 
   AlternativeReadingScope alt(&helper_->reader_, &H.metadata_payloads(),
-                              md_offset);
-
-  const int kHasExceptionsTableFlag = 1 << 0;
-  const int kHasSourcePositionsFlag = 1 << 1;
-  const int kHasNullableFieldsFlag = 1 << 2;
-  const int kHasClosuresFlag = 1 << 3;
+                              code_offset);
 
   const intptr_t flags = helper_->reader_.ReadUInt();
-  const bool has_exceptions_table = (flags & kHasExceptionsTableFlag) != 0;
-  const bool has_source_positions = (flags & kHasSourcePositionsFlag) != 0;
-  const bool has_nullable_fields = (flags & kHasNullableFieldsFlag) != 0;
-  const bool has_closures = (flags & kHasClosuresFlag) != 0;
+  const bool has_exceptions_table =
+      (flags & Code::kHasExceptionsTableFlag) != 0;
+  const bool has_source_positions =
+      (flags & Code::kHasSourcePositionsFlag) != 0;
+  const bool has_nullable_fields = (flags & Code::kHasNullableFieldsFlag) != 0;
+  const bool has_closures = (flags & Code::kHasClosuresFlag) != 0;
+  const bool has_parameters_flags = (flags & Code::kHasParameterFlagsFlag) != 0;
+  const bool has_forwarding_stub_target =
+      (flags & Code::kHasForwardingStubTargetFlag) != 0;
+  const bool has_default_function_type_args =
+      (flags & Code::kHasDefaultFunctionTypeArgsFlag) != 0;
+
+  if (has_parameters_flags) {
+    intptr_t num_params = helper_->reader_.ReadUInt();
+    ASSERT(num_params ==
+           function.NumParameters() - function.NumImplicitParameters());
+    for (intptr_t i = 0; i < num_params; ++i) {
+      helper_->reader_.ReadUInt();
+    }
+  }
+  if (has_forwarding_stub_target) {
+    helper_->reader_.ReadUInt();
+  }
+  if (has_default_function_type_args) {
+    helper_->reader_.ReadUInt();
+  }
 
   intptr_t num_closures = 0;
   if (has_closures) {
@@ -173,8 +310,10 @@
       closure ^= closures_->At(i);
 
       const intptr_t flags = helper_->reader_.ReadUInt();
-      const bool has_exceptions_table = (flags & kHasExceptionsTableFlag) != 0;
-      const bool has_source_positions = (flags & kHasSourcePositionsFlag) != 0;
+      const bool has_exceptions_table =
+          (flags & Code::kHasExceptionsTableFlag) != 0;
+      const bool has_source_positions =
+          (flags & Code::kHasSourcePositionsFlag) != 0;
 
       // Read closure bytecode and attach to closure function.
       closure_bytecode = ReadBytecode(pool);
@@ -203,7 +342,7 @@
   Object& parent = Object::Handle(Z, ReadObject());
   if (!parent.IsFunction()) {
     ASSERT(parent.IsField());
-    ASSERT(function.kind() == RawFunction::kImplicitStaticFinalGetter);
+    ASSERT(function.kind() == RawFunction::kStaticFieldInitializer);
     // Closure in a static field initializer, so use current function as parent.
     parent = function.raw();
   }
@@ -236,8 +375,7 @@
   FunctionTypeScope function_type_scope(this);
 
   if (has_type_params) {
-    const intptr_t num_type_params = helper_->reader_.ReadUInt();
-    ReadTypeParametersDeclaration(Class::Handle(Z), func, num_type_params);
+    ReadTypeParametersDeclaration(Class::Handle(Z), func);
     function_type_type_parameters_ =
         &TypeArguments::Handle(Z, func.type_parameters());
   }
@@ -291,9 +429,10 @@
 
 void BytecodeReaderHelper::ReadTypeParametersDeclaration(
     const Class& parameterized_class,
-    const Function& parameterized_function,
-    intptr_t num_type_params) {
+    const Function& parameterized_function) {
   ASSERT(parameterized_class.IsNull() != parameterized_function.IsNull());
+
+  const intptr_t num_type_params = helper_->reader_.ReadUInt();
   ASSERT(num_type_params > 0);
 
   // First setup the type parameters, so if any of the following code uses it
@@ -308,14 +447,17 @@
   for (intptr_t i = 0; i < num_type_params; ++i) {
     name ^= ReadObject();
     ASSERT(name.IsSymbol());
-    parameter = TypeParameter::New(parameterized_class, parameterized_function,
-                                   i, name, bound, TokenPosition::kNoSource);
+    parameter = TypeParameter::New(
+        parameterized_class, parameterized_function, i, name, bound,
+        /* is_generic_covariant_impl = */ false, TokenPosition::kNoSource);
     type_parameters.SetTypeAt(i, parameter);
   }
 
   if (!parameterized_class.IsNull()) {
     parameterized_class.set_type_parameters(type_parameters);
-  } else {
+  } else if (!parameterized_function.IsFactory()) {
+    // Do not set type parameters for factories, as VM uses class type
+    // parameters instead.
     parameterized_function.set_type_parameters(type_parameters);
   }
 
@@ -336,32 +478,32 @@
   // be kept in sync with pkg/vm/lib/bytecode/constant_pool.dart.
   enum ConstantPoolTag {
     kInvalid,
-    kNull,    // TODO(alexmarkov): obsolete, remove
-    kString,  // TODO(alexmarkov): obsolete, remove
-    kInt,     // TODO(alexmarkov): obsolete, remove
-    kDouble,  // TODO(alexmarkov): obsolete, remove
-    kBool,    // TODO(alexmarkov): obsolete, remove
-    kArgDesc,
+    kUnused1,
+    kUnused2,
+    kUnused3,
+    kUnused4,
+    kUnused5,
+    kUnused6,
     kICData,
-    kStaticICData,
+    kUnused7,
     kStaticField,
     kInstanceField,
     kClass,
     kTypeArgumentsField,
-    kTearOff,  // TODO(alexmarkov): obsolete, remove
+    kUnused8,
     kType,
-    kTypeArguments,                       // TODO(alexmarkov): obsolete, remove
-    kList,                                // TODO(alexmarkov): obsolete, remove
-    kInstance,                            // TODO(alexmarkov): obsolete, remove
-    kTypeArgumentsForInstanceAllocation,  // TODO(alexmarkov): obsolete, remove
+    kUnused9,
+    kUnused10,
+    kUnused11,
+    kUnused12,
     kClosureFunction,
     kEndClosureFunctionScope,
     kNativeEntry,
     kSubtypeTestCache,
-    kPartialTearOffInstantiation,  // TODO(alexmarkov): obsolete, remove
+    kUnused13,
     kEmptyTypeArguments,
-    kSymbol,           // TODO(alexmarkov): obsolete, remove
-    kInterfaceCallV1,  // TODO(alexmarkov): obsolete, remove
+    kUnused14,
+    kUnused15,
     kObjectRef,
     kDirectCall,
     kInterfaceCall,
@@ -382,9 +524,6 @@
   Field& field = Field::Handle(Z);
   Class& cls = Class::Handle(Z);
   String& name = String::Handle(Z);
-  TypeArguments& type_args = TypeArguments::Handle(Z);
-  Class* symbol_class = nullptr;
-  Field* symbol_name_field = nullptr;
   const String* simpleInstanceOf = nullptr;
   const intptr_t obj_count = pool.Length();
   for (intptr_t i = 0; i < obj_count; ++i) {
@@ -392,50 +531,6 @@
     switch (tag) {
       case ConstantPoolTag::kInvalid:
         UNREACHABLE();
-      case ConstantPoolTag::kNull:
-        obj = Object::null();
-        break;
-      case ConstantPoolTag::kString:
-        obj = ReadString();
-        ASSERT(obj.IsString() && obj.IsCanonical());
-        break;
-      case ConstantPoolTag::kInt: {
-        uint32_t low_bits = helper_->ReadUInt32();
-        int64_t value = helper_->ReadUInt32();
-        value = (value << 32) | low_bits;
-        obj = Integer::New(value, Heap::kOld);
-        obj = H.Canonicalize(Integer::Cast(obj));
-      } break;
-      case ConstantPoolTag::kDouble: {
-        uint32_t low_bits = helper_->ReadUInt32();
-        uint64_t bits = helper_->ReadUInt32();
-        bits = (bits << 32) | low_bits;
-        double value = bit_cast<double, uint64_t>(bits);
-        obj = Double::New(value, Heap::kOld);
-        obj = H.Canonicalize(Double::Cast(obj));
-      } break;
-      case ConstantPoolTag::kBool:
-        if (helper_->ReadByte() == 1) {
-          obj = Bool::True().raw();
-        } else {
-          obj = Bool::False().raw();
-        }
-        break;
-      case ConstantPoolTag::kArgDesc: {
-        intptr_t num_arguments = helper_->ReadUInt();
-        intptr_t num_type_args = helper_->ReadUInt();
-        intptr_t num_arg_names = helper_->ReadListLength();
-        if (num_arg_names == 0) {
-          obj = ArgumentsDescriptor::New(num_type_args, num_arguments);
-        } else {
-          array = Array::New(num_arg_names);
-          for (intptr_t j = 0; j < num_arg_names; j++) {
-            name = ReadString();
-            array.SetAt(j, name);
-          }
-          obj = ArgumentsDescriptor::New(num_type_args, num_arguments, array);
-        }
-      } break;
       case ConstantPoolTag::kICData: {
         intptr_t flags = helper_->ReadByte();
         InvocationKind kind =
@@ -476,21 +571,6 @@
                         H.thread()->compiler_state().GetNextDeoptId(),
                         checked_argument_count, ICData::RebindRule::kInstance);
       } break;
-      case ConstantPoolTag::kStaticICData: {
-        elem = ReadObject();
-        ASSERT(elem.IsFunction());
-        name = Function::Cast(elem).name();
-        const int num_args_checked =
-            MethodRecognizer::NumArgsCheckedForStaticCall(Function::Cast(elem));
-        intptr_t arg_desc_index = helper_->ReadUInt();
-        ASSERT(arg_desc_index < i);
-        array ^= pool.ObjectAt(arg_desc_index);
-        obj = ICData::New(function, name,
-                          array,  // Arguments descriptor.
-                          H.thread()->compiler_state().GetNextDeoptId(),
-                          num_args_checked, ICData::RebindRule::kStatic);
-        ICData::Cast(obj).AddTarget(Function::Cast(elem));
-      } break;
       case ConstantPoolTag::kStaticField:
         obj = ReadObject();
         ASSERT(obj.IsField());
@@ -516,63 +596,10 @@
         cls ^= ReadObject();
         obj = Smi::New(cls.type_arguments_field_offset() / kWordSize);
         break;
-      case ConstantPoolTag::kTearOff:
-        obj = ReadObject();
-        ASSERT(obj.IsFunction());
-        obj = Function::Cast(obj).ImplicitClosureFunction();
-        ASSERT(obj.IsFunction());
-        obj = Function::Cast(obj).ImplicitStaticClosure();
-        ASSERT(obj.IsInstance());
-        obj = H.Canonicalize(Instance::Cast(obj));
-        break;
       case ConstantPoolTag::kType:
         obj = ReadObject();
         ASSERT(obj.IsAbstractType());
         break;
-      case ConstantPoolTag::kTypeArguments:
-        cls = Class::null();
-        obj = ReadTypeArguments(cls);
-        ASSERT(obj.IsNull() || obj.IsTypeArguments());
-        break;
-      case ConstantPoolTag::kList: {
-        obj = ReadObject();
-        ASSERT(obj.IsAbstractType());
-        const intptr_t length = helper_->ReadListLength();
-        array = Array::New(length, AbstractType::Cast(obj));
-        for (intptr_t j = 0; j < length; j++) {
-          intptr_t elem_index = helper_->ReadUInt();
-          ASSERT(elem_index < i);
-          elem = pool.ObjectAt(elem_index);
-          array.SetAt(j, elem);
-        }
-        array.MakeImmutable();
-        obj = H.Canonicalize(Array::Cast(array));
-        ASSERT(!obj.IsNull());
-      } break;
-      case ConstantPoolTag::kInstance: {
-        cls ^= ReadObject();
-        obj = Instance::New(cls, Heap::kOld);
-        intptr_t type_args_index = helper_->ReadUInt();
-        ASSERT(type_args_index < i);
-        type_args ^= pool.ObjectAt(type_args_index);
-        if (!type_args.IsNull()) {
-          Instance::Cast(obj).SetTypeArguments(type_args);
-        }
-        intptr_t num_fields = helper_->ReadUInt();
-        for (intptr_t j = 0; j < num_fields; j++) {
-          field ^= ReadObject();
-          intptr_t elem_index = helper_->ReadUInt();
-          ASSERT(elem_index < i);
-          elem = pool.ObjectAt(elem_index);
-          Instance::Cast(obj).SetField(field, elem);
-        }
-        obj = H.Canonicalize(Instance::Cast(obj));
-      } break;
-      case ConstantPoolTag::kTypeArgumentsForInstanceAllocation: {
-        cls ^= ReadObject();
-        obj = ReadTypeArguments(cls);
-        ASSERT(obj.IsNull() || obj.IsTypeArguments());
-      } break;
       case ConstantPoolTag::kClosureFunction: {
         intptr_t closure_index = helper_->ReadUInt();
         obj = closures_->At(closure_index);
@@ -593,61 +620,9 @@
       case ConstantPoolTag::kSubtypeTestCache: {
         obj = SubtypeTestCache::New();
       } break;
-      case ConstantPoolTag::kPartialTearOffInstantiation: {
-        intptr_t tearoff_index = helper_->ReadUInt();
-        ASSERT(tearoff_index < i);
-        const Closure& old_closure =
-            Closure::CheckedHandle(Z, pool.ObjectAt(tearoff_index));
-
-        intptr_t type_args_index = helper_->ReadUInt();
-        ASSERT(type_args_index < i);
-        type_args ^= pool.ObjectAt(type_args_index);
-
-        obj = Closure::New(
-            TypeArguments::Handle(Z, old_closure.instantiator_type_arguments()),
-            TypeArguments::Handle(Z, old_closure.function_type_arguments()),
-            type_args, Function::Handle(Z, old_closure.function()),
-            Context::Handle(Z, old_closure.context()), Heap::kOld);
-        obj = H.Canonicalize(Instance::Cast(obj));
-      } break;
       case ConstantPoolTag::kEmptyTypeArguments:
         obj = Object::empty_type_arguments().raw();
         break;
-      case ConstantPoolTag::kSymbol: {
-        name ^= ReadObject();
-        ASSERT(name.IsSymbol());
-        if (symbol_class == nullptr) {
-          elem = Library::InternalLibrary();
-          ASSERT(!elem.IsNull());
-          symbol_class = &Class::Handle(
-              Z, Library::Cast(elem).LookupClass(Symbols::Symbol()));
-          ASSERT(!symbol_class->IsNull());
-          symbol_name_field = &Field::Handle(
-              Z,
-              symbol_class->LookupInstanceFieldAllowPrivate(Symbols::_name()));
-          ASSERT(!symbol_name_field->IsNull());
-        }
-        obj = Instance::New(*symbol_class, Heap::kOld);
-        Instance::Cast(obj).SetField(*symbol_name_field, name);
-        obj = H.Canonicalize(Instance::Cast(obj));
-      } break;
-      case ConstantPoolTag::kInterfaceCallV1: {
-        helper_->ReadByte();  // TODO(regis): Remove, unneeded.
-        name ^= ReadObject();
-        ASSERT(name.IsSymbol());
-        intptr_t arg_desc_index = helper_->ReadUInt();
-        ASSERT(arg_desc_index < i);
-        array ^= pool.ObjectAt(arg_desc_index);
-        // InterfaceCall constant occupies 2 entries.
-        // The first entry is used for selector name.
-        pool.SetTypeAt(i, ObjectPool::EntryType::kTaggedObject,
-                       ObjectPool::Patchability::kNotPatchable);
-        pool.SetObjectAt(i, name);
-        ++i;
-        ASSERT(i < obj_count);
-        // The second entry is used for arguments descriptor.
-        obj = array.raw();
-      } break;
       case ConstantPoolTag::kObjectRef:
         obj = ReadObject();
         break;
@@ -667,13 +642,11 @@
       case ConstantPoolTag::kInterfaceCall: {
         elem = ReadObject();
         ASSERT(elem.IsFunction());
-        name = Function::Cast(elem).name();
-        ASSERT(name.IsSymbol());
         // InterfaceCall constant occupies 2 entries.
-        // The first entry is used for selector name.
+        // The first entry is used for interface target.
         pool.SetTypeAt(i, ObjectPool::EntryType::kTaggedObject,
                        ObjectPool::Patchability::kNotPatchable);
-        pool.SetObjectAt(i, name);
+        pool.SetObjectAt(i, elem);
         ++i;
         ASSERT(i < obj_count);
         // The second entry is used for arguments descriptor.
@@ -689,8 +662,10 @@
 }
 
 RawBytecode* BytecodeReaderHelper::ReadBytecode(const ObjectPool& pool) {
+#if defined(SUPPORT_TIMELINE)
   TIMELINE_DURATION(Thread::Current(), CompilerVerbose,
                     "BytecodeReaderHelper::ReadBytecode");
+#endif  // defined(SUPPORT_TIMELINE)
   intptr_t size = helper_->ReadUInt();
   intptr_t offset = Utils::RoundUp(helper_->reader_.offset(), sizeof(KBCInstr));
   const uint8_t* data = helper_->reader_.BufferAt(offset);
@@ -703,8 +678,10 @@
 
 void BytecodeReaderHelper::ReadExceptionsTable(const Bytecode& bytecode,
                                                bool has_exceptions_table) {
+#if defined(SUPPORT_TIMELINE)
   TIMELINE_DURATION(Thread::Current(), CompilerVerbose,
                     "BytecodeReaderHelper::ReadExceptionsTable");
+#endif
 
   const intptr_t try_block_count =
       has_exceptions_table ? helper_->reader_.ReadListLength() : 0;
@@ -772,9 +749,9 @@
     return;
   }
 
-  intptr_t length = helper_->reader_.ReadUInt();
-  bytecode.set_source_positions_binary_offset(helper_->reader_.offset());
-  helper_->SkipBytes(length);
+  intptr_t offset = helper_->reader_.ReadUInt();
+  bytecode.set_source_positions_binary_offset(
+      bytecode_component_->GetSourcePositionsOffset() + offset);
 }
 
 RawTypedData* BytecodeReaderHelper::NativeEntry(const Function& function,
@@ -789,7 +766,9 @@
     case MethodRecognizer::kGrowableArrayLength:
     case MethodRecognizer::kObjectArrayLength:
     case MethodRecognizer::kImmutableArrayLength:
-    case MethodRecognizer::kTypedDataLength:
+    case MethodRecognizer::kTypedListLength:
+    case MethodRecognizer::kTypedListViewLength:
+    case MethodRecognizer::kByteDataViewLength:
     case MethodRecognizer::kClassIDgetID:
     case MethodRecognizer::kGrowableArrayCapacity:
     case MethodRecognizer::kListFactory:
@@ -822,7 +801,13 @@
       bool is_auto_scope = true;
       native_function = NativeEntry::ResolveNative(library, external_name,
                                                    num_params, &is_auto_scope);
-      ASSERT(native_function != NULL);  // TODO(regis): Should we throw instead?
+      if (native_function == nullptr) {
+        Report::MessageF(Report::kError, Script::Handle(function.script()),
+                         function.token_pos(), Report::AtLocation,
+                         "native function '%s' (%" Pd
+                         " arguments) cannot be found",
+                         external_name.ToCString(), function.NumParameters());
+      }
       if (is_bootstrap_native) {
         trampoline = &NativeEntry::BootstrapNativeCallWrapper;
       } else if (is_auto_scope) {
@@ -842,7 +827,14 @@
   AlternativeReadingScope alt(&helper_->reader_, &H.metadata_payloads(),
                               md_offset);
 
-  const intptr_t version = helper_->reader_.ReadUInt();
+  const intptr_t start_offset = helper_->reader_.offset();
+
+  intptr_t magic = helper_->reader_.ReadUInt32();
+  if (magic != KernelBytecode::kMagicValue) {
+    return ReadBytecodeComponentV2(md_offset);
+  }
+
+  const intptr_t version = helper_->reader_.ReadUInt32();
   if ((version < KernelBytecode::kMinSupportedBytecodeFormatVersion) ||
       (version > KernelBytecode::kMaxSupportedBytecodeFormatVersion)) {
     FATAL3("Unsupported Dart bytecode format version %" Pd
@@ -853,6 +845,83 @@
            KernelBytecode::kMaxSupportedBytecodeFormatVersion);
   }
 
+  helper_->reader_.ReadUInt32();  // Skip stringTable.numItems
+  const intptr_t string_table_offset =
+      start_offset + helper_->reader_.ReadUInt32();
+
+  helper_->reader_.ReadUInt32();  // Skip objectTable.numItems
+  const intptr_t object_table_offset =
+      start_offset + helper_->reader_.ReadUInt32();
+
+  helper_->reader_.ReadUInt32();  // Skip main.numItems
+  const intptr_t main_offset = start_offset + helper_->reader_.ReadUInt32();
+
+  helper_->reader_.ReadUInt32();  // Skip members.numItems
+  const intptr_t members_offset = start_offset + helper_->reader_.ReadUInt32();
+
+  helper_->reader_.ReadUInt32();  // Skip codes.numItems
+  const intptr_t codes_offset = start_offset + helper_->reader_.ReadUInt32();
+
+  helper_->reader_.ReadUInt32();  // Skip sourcePositions.numItems
+  const intptr_t sources_positions_offset =
+      start_offset + helper_->reader_.ReadUInt32();
+
+  helper_->reader_.ReadUInt32();  // Skip annotations.numItems
+  const intptr_t annotations_offset =
+      start_offset + helper_->reader_.ReadUInt32();
+
+  // Read header of string table.
+  helper_->reader_.set_offset(string_table_offset);
+  const intptr_t num_one_byte_strings = helper_->reader_.ReadUInt32();
+  const intptr_t num_two_byte_strings = helper_->reader_.ReadUInt32();
+  const intptr_t strings_contents_offset =
+      helper_->reader_.offset() +
+      (num_one_byte_strings + num_two_byte_strings) * 4;
+
+  // Read header of object table.
+  helper_->reader_.set_offset(object_table_offset);
+  const intptr_t num_objects = helper_->reader_.ReadUInt();
+  const intptr_t objects_size = helper_->reader_.ReadUInt();
+
+  // Skip over contents of objects.
+  const intptr_t objects_contents_offset = helper_->reader_.offset();
+  helper_->reader_.set_offset(objects_contents_offset + objects_size);
+
+  const Array& bytecode_component_array = Array::Handle(
+      Z,
+      BytecodeComponentData::New(
+          Z, version, num_objects, string_table_offset, strings_contents_offset,
+          objects_contents_offset, main_offset, members_offset, codes_offset,
+          sources_positions_offset, annotations_offset, Heap::kOld));
+
+  BytecodeComponentData bytecode_component(bytecode_component_array);
+
+  // Read object offsets.
+  Smi& offs = Smi::Handle(Z);
+  for (intptr_t i = 0; i < num_objects; ++i) {
+    offs = Smi::New(helper_->reader_.ReadUInt());
+    bytecode_component.SetObject(i, offs);
+  }
+
+  H.SetBytecodeComponent(bytecode_component_array);
+
+  return bytecode_component_array.raw();
+}
+
+// TODO(alexmarkov): obsolete, remove when dropping support for old bytecode
+// format version.
+RawArray* BytecodeReaderHelper::ReadBytecodeComponentV2(intptr_t md_offset) {
+  AlternativeReadingScope alt(&helper_->reader_, &H.metadata_payloads(),
+                              md_offset);
+
+  const intptr_t kMinVersion = 1;
+  const intptr_t kMaxVersion = 2;
+
+  const intptr_t version = helper_->reader_.ReadUInt();
+  if ((version < kMinVersion) || (version > kMaxVersion)) {
+    FATAL1("Unsupported Dart bytecode format version %" Pd ".", version);
+  }
+
   const intptr_t strings_size = helper_->reader_.ReadUInt();
   helper_->reader_.ReadUInt();  // Objects table size.
 
@@ -873,10 +942,11 @@
   const intptr_t objects_contents_offset = helper_->reader_.offset();
   helper_->reader_.set_offset(objects_contents_offset + objects_size);
 
-  const Array& bytecode_component_array = Array::Handle(
-      Z, BytecodeComponentData::New(
-             Z, version, num_objects, strings_header_offset,
-             strings_contents_offset, objects_contents_offset, Heap::kOld));
+  const Array& bytecode_component_array =
+      Array::Handle(Z, BytecodeComponentData::New(
+                           Z, version, num_objects, strings_header_offset,
+                           strings_contents_offset, objects_contents_offset, 0,
+                           0, 0, 0, 0, Heap::kOld));
   BytecodeComponentData bytecode_component(bytecode_component_array);
 
   // Read object offsets.
@@ -924,6 +994,15 @@
   return ReadObjectContents(header);
 }
 
+RawString* BytecodeReaderHelper::ConstructorName(const Class& cls,
+                                                 const String& name) {
+  GrowableHandlePtrArray<const String> pieces(Z, 3);
+  pieces.Add(String::Handle(Z, cls.Name()));
+  pieces.Add(Symbols::Dot());
+  pieces.Add(name);
+  return Symbols::FromConcatAll(H.thread(), pieces);
+}
+
 RawObject* BytecodeReaderHelper::ReadObjectContents(uint32_t header) {
   ASSERT(((header & kReferenceBit) == 0));
 
@@ -1007,11 +1086,12 @@
         return field;
       } else {
         if ((flags & kFlagIsConstructor) != 0) {
-          GrowableHandlePtrArray<const String> pieces(Z, 3);
-          pieces.Add(String::Handle(Z, cls.Name()));
-          pieces.Add(Symbols::Dot());
-          pieces.Add(name);
-          name = Symbols::FromConcatAll(H.thread(), pieces);
+          name = ConstructorName(cls, name);
+        }
+        ASSERT(!name.IsNull() && name.IsSymbol());
+        if (name.raw() == scoped_function_name_.raw() &&
+            cls.raw() == scoped_function_class_.raw()) {
+          return scoped_function_.raw();
         }
         RawFunction* function = cls.LookupFunctionAllowPrivate(name);
         if (function == Function::null()) {
@@ -1338,6 +1418,659 @@
   return type.arguments();
 }
 
+void BytecodeReaderHelper::ReadMembers(const Class& cls,
+                                       intptr_t members_offset,
+                                       bool discard_fields) {
+  ASSERT(Thread::Current()->IsMutatorThread());
+  ASSERT(cls.is_type_finalized());
+  ASSERT(!cls.is_loaded());
+
+  const intptr_t offset =
+      bytecode_component_->GetMembersOffset() + members_offset;
+  AlternativeReadingScope alt_md(&helper_->reader_, &H.metadata_payloads(),
+                                 offset);
+
+  const intptr_t num_functions = helper_->reader_.ReadUInt();
+  functions_ = &Array::Handle(Z, Array::New(num_functions, Heap::kOld));
+  function_index_ = 0;
+
+  ReadFieldDeclarations(cls, discard_fields);
+  ReadFunctionDeclarations(cls);
+
+  cls.set_is_loaded(true);
+}
+
+void BytecodeReaderHelper::ReadFieldDeclarations(const Class& cls,
+                                                 bool discard_fields) {
+  // Field flags, must be in sync with FieldDeclaration constants in
+  // pkg/vm/lib/bytecode/declarations.dart.
+  const int kHasInitializerFlag = 1 << 0;
+  const int kHasGetterFlag = 1 << 1;
+  const int kHasSetterFlag = 1 << 2;
+  const int kIsReflectableFlag = 1 << 3;
+  const int kIsStaticFlag = 1 << 4;
+  const int kIsConstFlag = 1 << 5;
+  const int kIsFinalFlag = 1 << 6;
+  const int kIsCovariantFlag = 1 << 7;
+  const int kIsGenericCovariantImplFlag = 1 << 8;
+  const int kHasSourcePositionsFlag = 1 << 9;
+  const int kHasAnnotationsFlag = 1 << 10;
+  const int kHasPragmaFlag = 1 << 11;
+  const int kHasCustomScriptFlag = 1 << 12;
+
+  const int num_fields = helper_->ReadListLength();
+  if ((num_fields == 0) && !cls.is_enum_class()) {
+    return;
+  }
+  const Array& fields = Array::Handle(
+      Z, Array::New(num_fields + (cls.is_enum_class() ? 1 : 0), Heap::kOld));
+  String& name = String::Handle(Z);
+  Object& script_class = Object::Handle(Z);
+  AbstractType& type = AbstractType::Handle(Z);
+  Field& field = Field::Handle(Z);
+  Instance& value = Instance::Handle(Z);
+  Function& function = Function::Handle(Z);
+
+  for (intptr_t i = 0; i < num_fields; ++i) {
+    intptr_t flags = helper_->reader_.ReadUInt();
+
+    const bool is_static = (flags & kIsStaticFlag) != 0;
+    const bool is_final = (flags & kIsFinalFlag) != 0;
+    const bool is_const = (flags & kIsConstFlag) != 0;
+    const bool has_initializer = (flags & kHasInitializerFlag) != 0;
+    const bool has_pragma = (flags & kHasPragmaFlag) != 0;
+
+    name ^= ReadObject();
+    type ^= ReadObject();
+
+    if ((flags & kHasCustomScriptFlag) != 0) {
+      Script& script = Script::CheckedHandle(Z, ReadObject());
+      script_class = GetPatchClass(cls, script);
+    } else {
+      script_class = cls.raw();
+    }
+
+    TokenPosition position = TokenPosition::kNoSource;
+    TokenPosition end_position = TokenPosition::kNoSource;
+    if ((flags & kHasSourcePositionsFlag) != 0) {
+      position = helper_->ReadPosition();
+      end_position = helper_->ReadPosition();
+    }
+
+    field = Field::New(name, is_static, is_final, is_const,
+                       (flags & kIsReflectableFlag) != 0, script_class, type,
+                       position, end_position);
+
+    field.set_is_declared_in_bytecode(true);
+    field.set_has_pragma(has_pragma);
+    field.set_is_covariant((flags & kIsCovariantFlag) != 0);
+    field.set_is_generic_covariant_impl((flags & kIsGenericCovariantImplFlag) !=
+                                        0);
+    field.set_has_initializer(has_initializer);
+
+    if (!has_initializer) {
+      value ^= ReadObject();
+      if (is_static) {
+        field.SetStaticValue(value, true);
+      } else {
+        // Null-initialized instance fields are tracked separately for each
+        // constructor (see handling of kHasNullableFieldsFlag).
+        if (!value.IsNull()) {
+          // Note: optimizer relies on DoubleInitialized bit in its
+          // field-unboxing heuristics.
+          // See JitCallSpecializer::VisitStoreInstanceField for more details.
+          field.RecordStore(value);
+          if (value.IsDouble()) {
+            field.set_is_double_initialized(true);
+          }
+        }
+      }
+    }
+
+    if (has_initializer && is_static) {
+      const intptr_t code_offset = helper_->reader_.ReadUInt();
+      field.set_bytecode_offset(code_offset +
+                                bytecode_component_->GetCodesOffset());
+      field.SetStaticValue(Object::sentinel(), true);
+    }
+
+    if ((flags & kHasGetterFlag) != 0) {
+      name ^= ReadObject();
+      function =
+          Function::New(name,
+                        is_static ? RawFunction::kImplicitStaticFinalGetter
+                                  : RawFunction::kImplicitGetter,
+                        is_static, is_const,
+                        false,  // is_abstract
+                        false,  // is_external
+                        false,  // is_native
+                        script_class, position);
+      function.set_end_token_pos(end_position);
+      function.set_result_type(type);
+      function.set_is_debuggable(false);
+      function.set_accessor_field(field);
+      function.set_is_declared_in_bytecode(true);
+      if (is_const && has_initializer) {
+        function.set_bytecode_offset(field.bytecode_offset());
+      }
+      H.SetupFieldAccessorFunction(cls, function, type);
+      functions_->SetAt(function_index_++, function);
+    }
+
+    if ((flags & kHasSetterFlag) != 0) {
+      ASSERT((!is_static) && (!is_final) && (!is_const));
+      name ^= ReadObject();
+      function = Function::New(name, RawFunction::kImplicitSetter,
+                               false,  // is_static
+                               false,  // is_const
+                               false,  // is_abstract
+                               false,  // is_external
+                               false,  // is_native
+                               script_class, position);
+      function.set_end_token_pos(end_position);
+      function.set_result_type(Object::void_type());
+      function.set_is_debuggable(false);
+      function.set_accessor_field(field);
+      function.set_is_declared_in_bytecode(true);
+      H.SetupFieldAccessorFunction(cls, function, type);
+      functions_->SetAt(function_index_++, function);
+    }
+
+    if ((flags & kHasAnnotationsFlag) != 0) {
+      intptr_t annotations_offset = helper_->reader_.ReadUInt() +
+                                    bytecode_component_->GetAnnotationsOffset();
+      ASSERT(annotations_offset > 0);
+
+      if (FLAG_enable_mirrors || has_pragma) {
+        Library& library = Library::Handle(Z, cls.library());
+        library.AddFieldMetadata(field, TokenPosition::kNoSource, 0,
+                                 annotations_offset);
+        if (has_pragma) {
+          // TODO(alexmarkov): read annotations right away using
+          //  annotations_offset.
+          Thread* thread = H.thread();
+          NoOOBMessageScope no_msg_scope(thread);
+          NoReloadScope no_reload_scope(thread->isolate(), thread);
+          library.GetMetadata(field);
+        }
+      }
+    }
+
+    fields.SetAt(i, field);
+  }
+
+  if (cls.is_enum_class()) {
+    // Add static field 'const _deleted_enum_sentinel'.
+    field =
+        Field::New(Symbols::_DeletedEnumSentinel(),
+                   /* is_static = */ true,
+                   /* is_final = */ true,
+                   /* is_const = */ true,
+                   /* is_reflectable = */ false, cls, Object::dynamic_type(),
+                   TokenPosition::kNoSource, TokenPosition::kNoSource);
+
+    fields.SetAt(num_fields, field);
+  }
+
+  if (!discard_fields) {
+    cls.SetFields(fields);
+  }
+
+  if (cls.IsTopLevel()) {
+    const Library& library = Library::Handle(Z, cls.library());
+    for (intptr_t i = 0, n = fields.Length(); i < n; ++i) {
+      field ^= fields.At(i);
+      name = field.name();
+      library.AddObject(field, name);
+    }
+  }
+}
+
+RawPatchClass* BytecodeReaderHelper::GetPatchClass(const Class& cls,
+                                                   const Script& script) {
+  if (patch_class_ != nullptr && patch_class_->patched_class() == cls.raw() &&
+      patch_class_->script() == script.raw()) {
+    return patch_class_->raw();
+  }
+  if (patch_class_ == nullptr) {
+    patch_class_ = &PatchClass::Handle(Z);
+  }
+  *patch_class_ = PatchClass::New(cls, script);
+  return patch_class_->raw();
+}
+
+void BytecodeReaderHelper::ReadFunctionDeclarations(const Class& cls) {
+  // Function flags, must be in sync with FunctionDeclaration constants in
+  // pkg/vm/lib/bytecode/declarations.dart.
+  const int kIsConstructorFlag = 1 << 0;
+  const int kIsGetterFlag = 1 << 1;
+  const int kIsSetterFlag = 1 << 2;
+  const int kIsFactoryFlag = 1 << 3;
+  const int kIsStaticFlag = 1 << 4;
+  const int kIsAbstractFlag = 1 << 5;
+  const int kIsConstFlag = 1 << 6;
+  const int kHasOptionalPositionalParamsFlag = 1 << 7;
+  const int kHasOptionalNamedParamsFlag = 1 << 8;
+  const int kHasTypeParamsFlag = 1 << 9;
+  const int kIsReflectableFlag = 1 << 10;
+  const int kIsDebuggableFlag = 1 << 11;
+  const int kIsAsyncFlag = 1 << 12;
+  const int kIsAsyncStarFlag = 1 << 13;
+  const int kIsSyncStarFlag = 1 << 14;
+  // const int kIsForwardingStubFlag = 1 << 15;
+  const int kIsNoSuchMethodForwarderFlag = 1 << 16;
+  const int kIsNativeFlag = 1 << 17;
+  const int kIsExternalFlag = 1 << 18;
+  const int kHasSourcePositionsFlag = 1 << 19;
+  const int kHasAnnotationsFlag = 1 << 20;
+  const int kHasPragmaFlag = 1 << 21;
+  const int kHasCustomScriptFlag = 1 << 22;
+
+  const intptr_t num_functions = helper_->ReadListLength();
+  ASSERT(function_index_ + num_functions == functions_->Length());
+
+  if (function_index_ + num_functions == 0) {
+    return;
+  }
+
+  String& name = String::Handle(Z);
+  Object& script_class = Object::Handle(Z);
+  Function& function = Function::Handle(Z);
+  Array& parameter_types = Array::Handle(Z);
+  Array& parameter_names = Array::Handle(Z);
+  AbstractType& type = AbstractType::Handle(Z);
+
+  for (intptr_t i = 0; i < num_functions; ++i) {
+    intptr_t flags = helper_->reader_.ReadUInt();
+
+    const bool is_static = (flags & kIsStaticFlag) != 0;
+    const bool is_factory = (flags & kIsFactoryFlag) != 0;
+    const bool is_native = (flags & kIsNativeFlag) != 0;
+    const bool has_pragma = (flags & kHasPragmaFlag) != 0;
+
+    name ^= ReadObject();
+
+    if ((flags & kHasCustomScriptFlag) != 0) {
+      Script& script = Script::CheckedHandle(Z, ReadObject());
+      script_class = GetPatchClass(cls, script);
+    } else {
+      script_class = cls.raw();
+    }
+
+    TokenPosition position = TokenPosition::kNoSource;
+    TokenPosition end_position = TokenPosition::kNoSource;
+    if ((flags & kHasSourcePositionsFlag) != 0) {
+      position = helper_->ReadPosition();
+      end_position = helper_->ReadPosition();
+    }
+
+    RawFunction::Kind kind = RawFunction::kRegularFunction;
+    if ((flags & kIsGetterFlag) != 0) {
+      kind = RawFunction::kGetterFunction;
+    } else if ((flags & kIsSetterFlag) != 0) {
+      kind = RawFunction::kSetterFunction;
+    } else if ((flags & (kIsConstructorFlag | kIsFactoryFlag)) != 0) {
+      kind = RawFunction::kConstructor;
+      name = ConstructorName(cls, name);
+    }
+
+    // Expression evaluation functions are not supported yet.
+    ASSERT(!name.Equals(Symbols::DebugProcedureName()));
+
+    function = Function::New(name, kind, is_static, (flags & kIsConstFlag) != 0,
+                             (flags & kIsAbstractFlag) != 0,
+                             (flags & kIsExternalFlag) != 0, is_native,
+                             script_class, position);
+
+    // Declare function scope as types (type parameters) in function
+    // signature may back-reference to the function being declared.
+    // At this moment, owner class is not fully loaded yet and it won't be
+    // able to serve function lookup requests.
+    FunctionScope function_scope(this, function, name, cls);
+
+    function.set_is_declared_in_bytecode(true);
+    function.set_has_pragma(has_pragma);
+    function.set_end_token_pos(end_position);
+    function.set_is_no_such_method_forwarder(
+        (flags & kIsNoSuchMethodForwarderFlag) != 0);
+    function.set_is_reflectable((flags & kIsReflectableFlag) != 0);
+    function.set_is_debuggable((flags & kIsDebuggableFlag) != 0);
+
+    if ((flags & kIsSyncStarFlag) != 0) {
+      function.set_modifier(RawFunction::kSyncGen);
+    } else if ((flags & kIsAsyncFlag) != 0) {
+      function.set_modifier(RawFunction::kAsync);
+      function.set_is_inlinable(!FLAG_causal_async_stacks);
+    } else if ((flags & kIsAsyncStarFlag) != 0) {
+      function.set_modifier(RawFunction::kAsyncGen);
+      function.set_is_inlinable(!FLAG_causal_async_stacks);
+    }
+
+    if ((flags & kHasTypeParamsFlag) != 0) {
+      ReadTypeParametersDeclaration(Class::Handle(Z), function);
+    }
+
+    const intptr_t num_implicit_params = (!is_static || is_factory) ? 1 : 0;
+    const intptr_t num_params =
+        num_implicit_params + helper_->reader_.ReadUInt();
+
+    intptr_t num_required_params = num_params;
+    if ((flags & (kHasOptionalPositionalParamsFlag |
+                  kHasOptionalNamedParamsFlag)) != 0) {
+      num_required_params = num_implicit_params + helper_->reader_.ReadUInt();
+    }
+
+    function.set_num_fixed_parameters(num_required_params);
+    function.SetNumOptionalParameters(
+        num_params - num_required_params,
+        (flags & kHasOptionalNamedParamsFlag) == 0);
+
+    parameter_types = Array::New(num_params, Heap::kOld);
+    function.set_parameter_types(parameter_types);
+
+    parameter_names = Array::New(num_params, Heap::kOld);
+    function.set_parameter_names(parameter_names);
+
+    intptr_t param_index = 0;
+    if (!is_static) {
+      function.SetParameterTypeAt(param_index, H.GetDeclarationType(cls));
+      function.SetParameterNameAt(param_index, Symbols::This());
+      ++param_index;
+    } else if (is_factory) {
+      function.SetParameterTypeAt(param_index, AbstractType::dynamic_type());
+      function.SetParameterNameAt(param_index,
+                                  Symbols::TypeArgumentsParameter());
+      ++param_index;
+    }
+
+    for (; param_index < num_params; ++param_index) {
+      name ^= ReadObject();
+      parameter_names.SetAt(param_index, name);
+      type ^= ReadObject();
+      parameter_types.SetAt(param_index, type);
+    }
+
+    type ^= ReadObject();
+    function.set_result_type(type);
+
+    if (is_native) {
+      name ^= ReadObject();
+      function.set_native_name(name);
+    }
+
+    if ((flags & kIsAbstractFlag) == 0) {
+      const intptr_t code_offset = helper_->reader_.ReadUInt();
+      function.set_bytecode_offset(code_offset +
+                                   bytecode_component_->GetCodesOffset());
+    }
+
+    if ((flags & kHasAnnotationsFlag) != 0) {
+      const intptr_t annotations_offset =
+          helper_->reader_.ReadUInt() +
+          bytecode_component_->GetAnnotationsOffset();
+      ASSERT(annotations_offset > 0);
+
+      if (FLAG_enable_mirrors || has_pragma) {
+        Library& library = Library::Handle(Z, cls.library());
+        library.AddFunctionMetadata(function, TokenPosition::kNoSource, 0,
+                                    annotations_offset);
+
+        if (has_pragma) {
+          if (H.constants().IsNull() &&
+              library.raw() == Library::CoreLibrary()) {
+            // Bootstrapping, need to postpone evaluation of pragma annotations
+            // as classes are not fully loaded/finalized yet.
+            const auto& pragma_funcs = GrowableObjectArray::Handle(
+                Z, H.EnsurePotentialPragmaFunctions());
+            pragma_funcs.Add(function);
+          } else {
+            // TODO(alexmarkov): read annotations right away using
+            //  annotations_offset.
+            Thread* thread = H.thread();
+            NoOOBMessageScope no_msg_scope(thread);
+            NoReloadScope no_reload_scope(thread->isolate(), thread);
+            library.GetMetadata(function);
+          }
+        }
+      }
+    }
+
+    functions_->SetAt(function_index_++, function);
+  }
+
+  cls.SetFunctions(*functions_);
+
+  if (cls.IsTopLevel()) {
+    const Library& library = Library::Handle(Z, cls.library());
+    for (intptr_t i = 0, n = functions_->Length(); i < n; ++i) {
+      function ^= functions_->At(i);
+      name = function.name();
+      library.AddObject(function, name);
+    }
+  }
+
+  functions_ = nullptr;
+}
+
+void BytecodeReaderHelper::ReadParameterCovariance(
+    const Function& function,
+    BitVector* is_covariant,
+    BitVector* is_generic_covariant_impl) {
+  ASSERT(function.is_declared_in_bytecode());
+
+  const intptr_t num_params = function.NumParameters();
+  ASSERT(is_covariant->length() == num_params);
+  ASSERT(is_generic_covariant_impl->length() == num_params);
+
+  AlternativeReadingScope alt(&helper_->reader_, &H.metadata_payloads(),
+                              function.bytecode_offset());
+
+  const intptr_t code_flags = helper_->reader_.ReadUInt();
+  if ((code_flags & Code::kHasParameterFlagsFlag) != 0) {
+    const intptr_t num_explicit_params = helper_->reader_.ReadUInt();
+    ASSERT(num_params ==
+           function.NumImplicitParameters() + num_explicit_params);
+
+    for (intptr_t i = function.NumImplicitParameters(); i < num_params; ++i) {
+      const intptr_t flags = helper_->reader_.ReadUInt();
+
+      if ((flags & Parameter::kIsCovariantFlag) != 0) {
+        is_covariant->Add(i);
+      }
+      if ((flags & Parameter::kIsGenericCovariantImplFlag) != 0) {
+        is_generic_covariant_impl->Add(i);
+      }
+    }
+  }
+}
+
+void BytecodeReaderHelper::ParseBytecodeFunction(
+    ParsedFunction* parsed_function,
+    const Function& function) {
+  switch (function.kind()) {
+    case RawFunction::kImplicitClosureFunction:
+      ParseForwarderFunction(parsed_function, function,
+                             Function::Handle(Z, function.parent_function()));
+      break;
+    case RawFunction::kDynamicInvocationForwarder:
+      ParseForwarderFunction(
+          parsed_function, function,
+          Function::Handle(Z,
+                           function.GetTargetOfDynamicInvocationForwarder()));
+      break;
+    case RawFunction::kImplicitGetter:
+    case RawFunction::kImplicitSetter:
+      BytecodeScopeBuilder(parsed_function).BuildScopes();
+      break;
+    case RawFunction::kImplicitStaticFinalGetter: {
+      if (IsStaticFieldGetterGeneratedAsInitializer(function, Z)) {
+        ReadCode(function, function.bytecode_offset());
+      } else {
+        BytecodeScopeBuilder(parsed_function).BuildScopes();
+      }
+      break;
+    }
+    case RawFunction::kStaticFieldInitializer:
+      ReadCode(function, function.bytecode_offset());
+      break;
+    case RawFunction::kMethodExtractor:
+      BytecodeScopeBuilder(parsed_function).BuildScopes();
+      break;
+    case RawFunction::kRegularFunction:
+    case RawFunction::kGetterFunction:
+    case RawFunction::kSetterFunction:
+    case RawFunction::kClosureFunction:
+    case RawFunction::kConstructor:
+      ReadCode(function, function.bytecode_offset());
+      break;
+    case RawFunction::kNoSuchMethodDispatcher:
+    case RawFunction::kInvokeFieldDispatcher:
+    case RawFunction::kSignatureFunction:
+    case RawFunction::kIrregexpFunction:
+    case RawFunction::kFfiTrampoline:
+      UNREACHABLE();
+      break;
+  }
+}
+
+void BytecodeReaderHelper::ParseForwarderFunction(
+    ParsedFunction* parsed_function,
+    const Function& function,
+    const Function& target) {
+  ASSERT(function.IsImplicitClosureFunction() ||
+         function.IsDynamicInvocationForwarder());
+
+  ASSERT(target.is_declared_in_bytecode());
+
+  if (function.IsDynamicInvocationForwarder() &&
+      target.IsImplicitSetterFunction()) {
+    BytecodeScopeBuilder(parsed_function).BuildScopes();
+    return;
+  }
+
+  if (!target.HasBytecode()) {
+    ReadCode(target, target.bytecode_offset());
+  }
+
+  BytecodeScopeBuilder(parsed_function).BuildScopes();
+
+  const auto& target_bytecode = Bytecode::Handle(Z, target.bytecode());
+  const auto& obj_pool = ObjectPool::Handle(Z, target_bytecode.object_pool());
+
+  AlternativeReadingScope alt(&helper_->reader_, &H.metadata_payloads(),
+                              target.bytecode_offset());
+
+  const intptr_t flags = helper_->reader_.ReadUInt();
+  const bool has_parameters_flags = (flags & Code::kHasParameterFlagsFlag) != 0;
+  const bool has_forwarding_stub_target =
+      (flags & Code::kHasForwardingStubTargetFlag) != 0;
+  const bool has_default_function_type_args =
+      (flags & Code::kHasDefaultFunctionTypeArgsFlag) != 0;
+
+  if (has_parameters_flags) {
+    const intptr_t num_params = helper_->reader_.ReadUInt();
+    const intptr_t num_implicit_params = function.NumImplicitParameters();
+    for (intptr_t i = 0; i < num_params; ++i) {
+      const intptr_t flags = helper_->reader_.ReadUInt();
+
+      bool is_covariant = (flags & Parameter::kIsCovariantFlag) != 0;
+      bool is_generic_covariant_impl =
+          (flags & Parameter::kIsGenericCovariantImplFlag) != 0;
+
+      LocalVariable* variable =
+          parsed_function->ParameterVariable(num_implicit_params + i);
+
+      if (is_covariant) {
+        variable->set_is_explicit_covariant_parameter();
+      }
+
+      const bool checked_in_method_body =
+          is_covariant || is_generic_covariant_impl;
+
+      if (checked_in_method_body) {
+        variable->set_type_check_mode(LocalVariable::kSkipTypeCheck);
+      } else {
+        ASSERT(variable->type_check_mode() == LocalVariable::kDoTypeCheck);
+      }
+    }
+  }
+
+  if (has_forwarding_stub_target) {
+    const intptr_t cp_index = helper_->reader_.ReadUInt();
+    const auto& forwarding_stub_target =
+        Function::CheckedZoneHandle(Z, obj_pool.ObjectAt(cp_index));
+    parsed_function->MarkForwardingStub(&forwarding_stub_target);
+  }
+
+  if (has_default_function_type_args) {
+    ASSERT(function.IsGeneric());
+    const intptr_t cp_index = helper_->reader_.ReadUInt();
+    const auto& type_args =
+        TypeArguments::CheckedHandle(Z, obj_pool.ObjectAt(cp_index));
+    parsed_function->SetDefaultFunctionTypeArguments(type_args);
+  }
+
+  if (function.HasOptionalParameters()) {
+    const KBCInstr* raw_bytecode =
+        reinterpret_cast<KBCInstr*>(target_bytecode.PayloadStart());
+    KBCInstr entry = raw_bytecode[0];
+    ASSERT(KernelBytecode::DecodeOpcode(entry) ==
+           KernelBytecode::kEntryOptional);
+    ASSERT(KernelBytecode::DecodeB(entry) ==
+           function.NumOptionalPositionalParameters());
+    ASSERT(KernelBytecode::DecodeC(entry) ==
+           function.NumOptionalNamedParameters());
+
+    const intptr_t num_opt_params = function.NumOptionalParameters();
+    ZoneGrowableArray<const Instance*>* default_values =
+        new (Z) ZoneGrowableArray<const Instance*>(Z, num_opt_params);
+
+    if (function.HasOptionalPositionalParameters()) {
+      for (intptr_t i = 0, n = function.NumOptionalPositionalParameters();
+           i < n; ++i) {
+        const KBCInstr load = raw_bytecode[1 + i];
+        ASSERT(KernelBytecode::DecodeOpcode(load) ==
+               KernelBytecode::kLoadConstant);
+        const auto& value = Instance::CheckedZoneHandle(
+            Z, obj_pool.ObjectAt(KernelBytecode::DecodeD(load)));
+        default_values->Add(&value);
+      }
+    } else {
+      const intptr_t num_fixed_params = function.num_fixed_parameters();
+      auto& param_name = String::Handle(Z);
+      default_values->EnsureLength(num_opt_params, nullptr);
+      for (intptr_t i = 0; i < num_opt_params; ++i) {
+        const KBCInstr load_name = raw_bytecode[1 + 2 * i];
+        const KBCInstr load_value = raw_bytecode[1 + 2 * i + 1];
+        ASSERT(KernelBytecode::DecodeOpcode(load_name) ==
+               KernelBytecode::kLoadConstant);
+        ASSERT(KernelBytecode::DecodeOpcode(load_value) ==
+               KernelBytecode::kLoadConstant);
+        param_name ^= obj_pool.ObjectAt(KernelBytecode::DecodeD(load_name));
+        const auto& value = Instance::CheckedZoneHandle(
+            Z, obj_pool.ObjectAt(KernelBytecode::DecodeD(load_value)));
+
+        const intptr_t num_params = function.NumParameters();
+        intptr_t param_index = num_fixed_params;
+        for (; param_index < num_params; ++param_index) {
+          if (function.ParameterNameAt(param_index) == param_name.raw()) {
+            break;
+          }
+        }
+        ASSERT(param_index < num_params);
+        ASSERT(default_values->At(param_index - num_fixed_params) == nullptr);
+        (*default_values)[param_index - num_fixed_params] = &value;
+      }
+    }
+
+    parsed_function->set_default_parameter_values(default_values);
+  }
+}
+
+RawLibrary* BytecodeReaderHelper::ReadMain() {
+  return Library::RawCast(ReadObject());
+}
+
 intptr_t BytecodeComponentData::GetVersion() const {
   return Smi::Value(Smi::RawCast(data_.At(kVersion)));
 }
@@ -1354,6 +2087,26 @@
   return Smi::Value(Smi::RawCast(data_.At(kObjectsContentsOffset)));
 }
 
+intptr_t BytecodeComponentData::GetMainOffset() const {
+  return Smi::Value(Smi::RawCast(data_.At(kMainOffset)));
+}
+
+intptr_t BytecodeComponentData::GetMembersOffset() const {
+  return Smi::Value(Smi::RawCast(data_.At(kMembersOffset)));
+}
+
+intptr_t BytecodeComponentData::GetCodesOffset() const {
+  return Smi::Value(Smi::RawCast(data_.At(kCodesOffset)));
+}
+
+intptr_t BytecodeComponentData::GetSourcePositionsOffset() const {
+  return Smi::Value(Smi::RawCast(data_.At(kSourcePositionsOffset)));
+}
+
+intptr_t BytecodeComponentData::GetAnnotationsOffset() const {
+  return Smi::Value(Smi::RawCast(data_.At(kAnnotationsOffset)));
+}
+
 void BytecodeComponentData::SetObject(intptr_t index, const Object& obj) const {
   data_.SetAt(kNumFields + index, obj);
 }
@@ -1368,6 +2121,11 @@
                                      intptr_t strings_header_offset,
                                      intptr_t strings_contents_offset,
                                      intptr_t objects_contents_offset,
+                                     intptr_t main_offset,
+                                     intptr_t members_offset,
+                                     intptr_t codes_offset,
+                                     intptr_t source_positions_offset,
+                                     intptr_t annotations_offset,
                                      Heap::Space space) {
   const Array& data =
       Array::Handle(zone, Array::New(kNumFields + num_objects, space));
@@ -1385,6 +2143,21 @@
   smi_handle = Smi::New(objects_contents_offset);
   data.SetAt(kObjectsContentsOffset, smi_handle);
 
+  smi_handle = Smi::New(main_offset);
+  data.SetAt(kMainOffset, smi_handle);
+
+  smi_handle = Smi::New(members_offset);
+  data.SetAt(kMembersOffset, smi_handle);
+
+  smi_handle = Smi::New(codes_offset);
+  data.SetAt(kCodesOffset, smi_handle);
+
+  smi_handle = Smi::New(source_positions_offset);
+  data.SetAt(kSourcePositionsOffset, smi_handle);
+
+  smi_handle = Smi::New(annotations_offset);
+  data.SetAt(kAnnotationsOffset, smi_handle);
+
   return data.raw();
 }
 
@@ -1435,6 +2208,39 @@
   }
 }
 
+RawObject* BytecodeReader::ReadAnnotation(const Field& annotation_field) {
+  ASSERT(annotation_field.is_declared_in_bytecode());
+
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  ASSERT(thread->IsMutatorThread());
+
+  const Script& script = Script::Handle(zone, annotation_field.Script());
+  TranslationHelper translation_helper(thread);
+  translation_helper.InitFromScript(script);
+
+  KernelReaderHelper reader_helper(
+      zone, &translation_helper, script,
+      ExternalTypedData::Handle(zone, annotation_field.KernelData()),
+      annotation_field.KernelDataProgramOffset());
+  ActiveClass active_class;
+
+  BytecodeMetadataHelper bytecode_metadata_helper(&reader_helper,
+                                                  &active_class);
+
+  return bytecode_metadata_helper.ReadAnnotation(
+      annotation_field.bytecode_offset());
+}
+
+bool IsStaticFieldGetterGeneratedAsInitializer(const Function& function,
+                                               Zone* zone) {
+  ASSERT(function.kind() == RawFunction::kImplicitStaticFinalGetter);
+
+  const auto& field = Field::Handle(zone, function.accessor_field());
+  return field.is_declared_in_bytecode() && field.is_const() &&
+         field.has_initializer();
+}
+
 }  // namespace kernel
 }  // namespace dart
 
diff --git a/runtime/vm/compiler/frontend/bytecode_reader.h b/runtime/vm/compiler/frontend/bytecode_reader.h
index 600dc84..bb858c3 100644
--- a/runtime/vm/compiler/frontend/bytecode_reader.h
+++ b/runtime/vm/compiler/frontend/bytecode_reader.h
@@ -28,6 +28,20 @@
 
   void ReadMetadata(const Function& function);
 
+  void ParseBytecodeFunction(ParsedFunction* parsed_function);
+  void ParseBytecodeImplicitClosureFunction(ParsedFunction* parsed_function);
+
+  // Reads members associated with given [node_offset] and fills in [cls].
+  // Discards fields if [discard_fields] is true.
+  // Returns true if class members are loaded.
+  bool ReadMembers(intptr_t node_offset, const Class& cls, bool discard_fields);
+
+  // Read annotation at given offset.
+  RawObject* ReadAnnotation(intptr_t annotation_offset);
+
+  RawLibrary* GetMainLibrary();
+
+  RawArray* GetBytecodeComponent();
   RawArray* ReadBytecodeComponent();
 
  private:
@@ -43,9 +57,35 @@
                                 ActiveClass* active_class,
                                 BytecodeComponentData* bytecode_component);
 
-  void ReadMemberBytecode(const Function& function, intptr_t md_offset);
+  void ReadCode(const Function& function, intptr_t code_offset);
+
+  void ReadMembers(const Class& cls,
+                   intptr_t members_offset,
+                   bool discard_fields);
+
+  void ReadFieldDeclarations(const Class& cls, bool discard_fields);
+  void ReadFunctionDeclarations(const Class& cls);
+
+  void ParseBytecodeFunction(ParsedFunction* parsed_function,
+                             const Function& function);
+
+  RawLibrary* ReadMain();
 
   RawArray* ReadBytecodeComponent(intptr_t md_offset);
+  RawArray* ReadBytecodeComponentV2(intptr_t md_offset);
+
+  // Fills in [is_covariant] and [is_generic_covariant_impl] vectors
+  // according to covariance attributes of [function] parameters.
+  //
+  // [function] should be declared in bytecode.
+  // [is_covariant] and [is_generic_covariant_impl] should contain bitvectors
+  // of function.NumParameters() length.
+  void ReadParameterCovariance(const Function& function,
+                               BitVector* is_covariant,
+                               BitVector* is_generic_covariant_impl);
+
+  // Read bytecode PackedObject.
+  RawObject* ReadObject();
 
  private:
   // These constants should match corresponding constants in class ObjectHandle
@@ -60,6 +100,25 @@
   static const int kFlagBit3 = 1 << 8;
   static const int kFlagsMask = (kFlagBit0 | kFlagBit1 | kFlagBit2 | kFlagBit3);
 
+  // Code flags, must be in sync with Code constants in
+  // pkg/vm/lib/bytecode/declarations.dart.
+  struct Code {
+    static const int kHasExceptionsTableFlag = 1 << 0;
+    static const int kHasSourcePositionsFlag = 1 << 1;
+    static const int kHasNullableFieldsFlag = 1 << 2;
+    static const int kHasClosuresFlag = 1 << 3;
+    static const int kHasParameterFlagsFlag = 1 << 4;
+    static const int kHasForwardingStubTargetFlag = 1 << 5;
+    static const int kHasDefaultFunctionTypeArgsFlag = 1 << 6;
+  };
+
+  // Parameter flags, must be in sync with ParameterDeclaration constants in
+  // pkg/vm/lib/bytecode/declarations.dart.
+  struct Parameter {
+    static const int kIsCovariantFlag = 1 << 0;
+    static const int kIsGenericCovariantImplFlag = 1 << 1;
+  };
+
   class FunctionTypeScope : public ValueObject {
    public:
     explicit FunctionTypeScope(BytecodeReaderHelper* bytecode_reader)
@@ -76,6 +135,32 @@
     TypeArguments* const saved_type_parameters_;
   };
 
+  class FunctionScope : public ValueObject {
+   public:
+    FunctionScope(BytecodeReaderHelper* bytecode_reader,
+                  const Function& function,
+                  const String& name,
+                  const Class& cls)
+        : bytecode_reader_(bytecode_reader) {
+      ASSERT(bytecode_reader_->scoped_function_.IsNull());
+      ASSERT(bytecode_reader_->scoped_function_name_.IsNull());
+      ASSERT(bytecode_reader_->scoped_function_class_.IsNull());
+      ASSERT(name.IsSymbol());
+      bytecode_reader_->scoped_function_ = function.raw();
+      bytecode_reader_->scoped_function_name_ = name.raw();
+      bytecode_reader_->scoped_function_class_ = cls.raw();
+    }
+
+    ~FunctionScope() {
+      bytecode_reader_->scoped_function_ = Function::null();
+      bytecode_reader_->scoped_function_name_ = String::null();
+      bytecode_reader_->scoped_function_class_ = Class::null();
+    }
+
+   private:
+    BytecodeReaderHelper* bytecode_reader_;
+  };
+
   void ReadClosureDeclaration(const Function& function, intptr_t closureIndex);
   RawType* ReadFunctionSignature(const Function& func,
                                  bool has_optional_positional_params,
@@ -83,8 +168,7 @@
                                  bool has_type_params,
                                  bool has_positional_param_names);
   void ReadTypeParametersDeclaration(const Class& parameterized_class,
-                                     const Function& parameterized_function,
-                                     intptr_t num_type_params);
+                                     const Function& parameterized_function);
 
   void ReadConstantPool(const Function& function, const ObjectPool& pool);
   RawBytecode* ReadBytecode(const ObjectPool& pool);
@@ -92,20 +176,30 @@
   void ReadSourcePositions(const Bytecode& bytecode, bool has_source_positions);
   RawTypedData* NativeEntry(const Function& function,
                             const String& external_name);
+  RawString* ConstructorName(const Class& cls, const String& name);
 
-  RawObject* ReadObject();
   RawObject* ReadObjectContents(uint32_t header);
   RawObject* ReadConstObject(intptr_t tag);
   RawString* ReadString(bool is_canonical = true);
   RawTypeArguments* ReadTypeArguments(const Class& instantiator);
+  RawPatchClass* GetPatchClass(const Class& cls, const Script& script);
+  void ParseForwarderFunction(ParsedFunction* parsed_function,
+                              const Function& function,
+                              const Function& target);
 
   KernelReaderHelper* const helper_;
   TranslationHelper& translation_helper_;
   ActiveClass* const active_class_;
   Zone* const zone_;
   BytecodeComponentData* const bytecode_component_;
-  Array* closures_;
-  TypeArguments* function_type_type_parameters_;
+  Array* closures_ = nullptr;
+  TypeArguments* function_type_type_parameters_ = nullptr;
+  PatchClass* patch_class_ = nullptr;
+  Array* functions_ = nullptr;
+  intptr_t function_index_ = 0;
+  Function& scoped_function_;
+  String& scoped_function_name_;
+  Class& scoped_function_class_;
 
   DISALLOW_COPY_AND_ASSIGN(BytecodeReaderHelper);
 };
@@ -117,6 +211,11 @@
     kStringsHeaderOffset,
     kStringsContentsOffset,
     kObjectsContentsOffset,
+    kMainOffset,
+    kMembersOffset,
+    kCodesOffset,
+    kSourcePositionsOffset,
+    kAnnotationsOffset,
     kNumFields
   };
 
@@ -126,6 +225,11 @@
   intptr_t GetStringsHeaderOffset() const;
   intptr_t GetStringsContentsOffset() const;
   intptr_t GetObjectsContentsOffset() const;
+  intptr_t GetMainOffset() const;
+  intptr_t GetMembersOffset() const;
+  intptr_t GetCodesOffset() const;
+  intptr_t GetSourcePositionsOffset() const;
+  intptr_t GetAnnotationsOffset() const;
   void SetObject(intptr_t index, const Object& obj) const;
   RawObject* GetObject(intptr_t index) const;
 
@@ -137,6 +241,11 @@
                        intptr_t strings_header_offset,
                        intptr_t strings_contents_offset,
                        intptr_t objects_contents_offset,
+                       intptr_t main_offset,
+                       intptr_t members_offset,
+                       intptr_t codes_offset,
+                       intptr_t source_positions_offset,
+                       intptr_t annotations_offset,
                        Heap::Space space);
 
  private:
@@ -149,6 +258,9 @@
   // Returns error (if any), or null.
   static RawError* ReadFunctionBytecode(Thread* thread,
                                         const Function& function);
+
+  // Read annotation for the given annotation field.
+  static RawObject* ReadAnnotation(const Field& annotation_field);
 };
 
 class BytecodeSourcePositionsIterator : ValueObject {
@@ -191,6 +303,9 @@
   intptr_t cur_token_pos_;
 };
 
+bool IsStaticFieldGetterGeneratedAsInitializer(const Function& function,
+                                               Zone* zone);
+
 }  // namespace kernel
 }  // namespace dart
 
diff --git a/runtime/vm/compiler/frontend/bytecode_scope_builder.cc b/runtime/vm/compiler/frontend/bytecode_scope_builder.cc
new file mode 100644
index 0000000..5143ae9
--- /dev/null
+++ b/runtime/vm/compiler/frontend/bytecode_scope_builder.cc
@@ -0,0 +1,183 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#include "vm/compiler/frontend/bytecode_scope_builder.h"
+
+#include "vm/compiler/frontend/bytecode_reader.h"
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+
+namespace dart {
+namespace kernel {
+
+#define Z (zone_)
+
+BytecodeScopeBuilder::BytecodeScopeBuilder(ParsedFunction* parsed_function)
+    : parsed_function_(parsed_function),
+      zone_(parsed_function->zone()),
+      scope_(nullptr) {}
+
+void BytecodeScopeBuilder::BuildScopes() {
+  if (parsed_function_->node_sequence() != nullptr) {
+    return;  // Scopes are already built.
+  }
+
+  const Function& function = parsed_function_->function();
+
+  LocalScope* enclosing_scope = nullptr;
+  if (function.IsImplicitClosureFunction() && !function.is_static()) {
+    // Create artificial enclosing scope for the tear-off that contains
+    // captured receiver value. This ensure that AssertAssignable will correctly
+    // load instantiator type arguments if they are needed.
+    LocalVariable* receiver_variable =
+        MakeReceiverVariable(/* is_parameter = */ false);
+    receiver_variable->set_is_captured();
+    enclosing_scope = new (Z) LocalScope(NULL, 0, 0);
+    enclosing_scope->set_context_level(0);
+    enclosing_scope->AddVariable(receiver_variable);
+    enclosing_scope->AddContextVariable(receiver_variable);
+  }
+  scope_ = new (Z) LocalScope(enclosing_scope, 0, 0);
+  scope_->set_begin_token_pos(function.token_pos());
+  scope_->set_end_token_pos(function.end_token_pos());
+
+  // Add function type arguments variable before current context variable.
+  if ((function.IsGeneric() || function.HasGenericParent())) {
+    LocalVariable* type_args_var = MakeVariable(
+        Symbols::FunctionTypeArgumentsVar(), AbstractType::dynamic_type());
+    scope_->AddVariable(type_args_var);
+    parsed_function_->set_function_type_arguments(type_args_var);
+  }
+
+  bool needs_expr_temp = false;
+  if (parsed_function_->has_arg_desc_var()) {
+    needs_expr_temp = true;
+    scope_->AddVariable(parsed_function_->arg_desc_var());
+  }
+
+  LocalVariable* context_var = parsed_function_->current_context_var();
+  context_var->set_is_forced_stack();
+  scope_->AddVariable(context_var);
+
+  parsed_function_->SetNodeSequence(
+      new SequenceNode(TokenPosition::kNoSource, scope_));
+
+  switch (function.kind()) {
+    case RawFunction::kImplicitClosureFunction: {
+      ASSERT(function.NumImplicitParameters() == 1);
+
+      LocalVariable* closure_parameter = MakeVariable(
+          Symbols::ClosureParameter(), AbstractType::dynamic_type());
+      closure_parameter->set_is_forced_stack();
+      scope_->InsertParameterAt(0, closure_parameter);
+
+      // Type check all parameters by default.
+      // This may be overridden with parameter flags in
+      // BytecodeReaderHelper::ParseImplicitClosureFunction.
+      AddParameters(function, LocalVariable::kDoTypeCheck);
+      break;
+    }
+
+    case RawFunction::kImplicitGetter:
+    case RawFunction::kImplicitSetter: {
+      const bool is_setter = function.IsImplicitSetterFunction();
+      const bool is_method = !function.IsStaticFunction();
+      intptr_t pos = 0;
+      if (is_method) {
+        MakeReceiverVariable(/* is_parameter = */ true);
+        ++pos;
+      }
+      if (is_setter) {
+        LocalVariable* setter_value = MakeVariable(
+            Symbols::Value(),
+            AbstractType::ZoneHandle(Z, function.ParameterTypeAt(pos)));
+        scope_->InsertParameterAt(pos++, setter_value);
+
+        if (is_method) {
+          const Field& field = Field::Handle(Z, function.accessor_field());
+          if (field.is_covariant()) {
+            setter_value->set_is_explicit_covariant_parameter();
+          } else if (!field.is_generic_covariant_impl()) {
+            setter_value->set_type_check_mode(
+                LocalVariable::kTypeCheckedByCaller);
+          }
+        }
+      }
+      break;
+    }
+    case RawFunction::kImplicitStaticFinalGetter:
+      ASSERT(!IsStaticFieldGetterGeneratedAsInitializer(function, Z));
+      break;
+    case RawFunction::kDynamicInvocationForwarder: {
+      // Create [this] variable.
+      MakeReceiverVariable(/* is_parameter = */ true);
+
+      // Type check all parameters by default.
+      // This may be overridden with parameter flags in
+      // BytecodeReaderHelper::ParseImplicitClosureFunction.
+      AddParameters(function, LocalVariable::kDoTypeCheck);
+      break;
+    }
+    case RawFunction::kMethodExtractor: {
+      // Add a receiver parameter.  Though it is captured, we emit code to
+      // explicitly copy it to a fixed offset in a freshly-allocated context
+      // instead of using the generic code for regular functions.
+      // Therefore, it isn't necessary to mark it as captured here.
+      MakeReceiverVariable(/* is_parameter = */ true);
+      break;
+    }
+    default:
+      UNREACHABLE();
+  }
+
+  if (needs_expr_temp) {
+    scope_->AddVariable(parsed_function_->EnsureExpressionTemp());
+  }
+  if (parsed_function_->function().MayHaveUncheckedEntryPoint(
+          parsed_function_->isolate())) {
+    scope_->AddVariable(parsed_function_->EnsureEntryPointsTemp());
+  }
+  parsed_function_->AllocateVariables();
+}
+
+// TODO(alexmarkov): pass bitvectors of parameter covariance to set type
+// check mode before AllocateVariables.
+void BytecodeScopeBuilder::AddParameters(const Function& function,
+                                         LocalVariable::TypeCheckMode mode) {
+  for (intptr_t i = function.NumImplicitParameters(),
+                n = function.NumParameters();
+       i < n; ++i) {
+    // LocalVariable caches handles, so new handles are created for each
+    // parameter.
+    String& name = String::ZoneHandle(Z, function.ParameterNameAt(i));
+    AbstractType& type =
+        AbstractType::ZoneHandle(Z, function.ParameterTypeAt(i));
+
+    LocalVariable* variable = MakeVariable(name, type);
+    variable->set_type_check_mode(mode);
+    scope_->InsertParameterAt(i, variable);
+  }
+}
+
+LocalVariable* BytecodeScopeBuilder::MakeVariable(const String& name,
+                                                  const AbstractType& type) {
+  return new (Z) LocalVariable(TokenPosition::kNoSource,
+                               TokenPosition::kNoSource, name, type, nullptr);
+}
+
+LocalVariable* BytecodeScopeBuilder::MakeReceiverVariable(bool is_parameter) {
+  const auto& cls = Class::Handle(Z, parsed_function_->function().Owner());
+  const auto& type = Type::ZoneHandle(Z, cls.DeclarationType());
+  LocalVariable* receiver_variable = MakeVariable(Symbols::This(), type);
+  parsed_function_->set_receiver_var(receiver_variable);
+  if (is_parameter) {
+    scope_->InsertParameterAt(0, receiver_variable);
+  }
+  return receiver_variable;
+}
+
+}  // namespace kernel
+}  // namespace dart
+
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/compiler/frontend/bytecode_scope_builder.h b/runtime/vm/compiler/frontend/bytecode_scope_builder.h
new file mode 100644
index 0000000..4436565
--- /dev/null
+++ b/runtime/vm/compiler/frontend/bytecode_scope_builder.h
@@ -0,0 +1,40 @@
+// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#ifndef RUNTIME_VM_COMPILER_FRONTEND_BYTECODE_SCOPE_BUILDER_H_
+#define RUNTIME_VM_COMPILER_FRONTEND_BYTECODE_SCOPE_BUILDER_H_
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+
+#include "vm/object.h"
+#include "vm/parser.h"  // For ParsedFunction.
+#include "vm/scopes.h"
+
+namespace dart {
+namespace kernel {
+
+// Builds scopes, populates parameters and local variables for
+// certain functions declared in bytecode.
+class BytecodeScopeBuilder : public ValueObject {
+ public:
+  explicit BytecodeScopeBuilder(ParsedFunction* parsed_function);
+
+  void BuildScopes();
+
+ private:
+  void AddParameters(const Function& function,
+                     LocalVariable::TypeCheckMode mode);
+  LocalVariable* MakeVariable(const String& name, const AbstractType& type);
+  LocalVariable* MakeReceiverVariable(bool is_parameter);
+
+  ParsedFunction* parsed_function_;
+  Zone* zone_;
+  LocalScope* scope_;
+};
+
+}  // namespace kernel
+}  // namespace dart
+
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
+#endif  // RUNTIME_VM_COMPILER_FRONTEND_BYTECODE_SCOPE_BUILDER_H_
diff --git a/runtime/vm/compiler/frontend/constant_evaluator.cc b/runtime/vm/compiler/frontend/constant_evaluator.cc
index 9c9b8ec..182e47d 100644
--- a/runtime/vm/compiler/frontend/constant_evaluator.cc
+++ b/runtime/vm/compiler/frontend/constant_evaluator.cc
@@ -94,6 +94,19 @@
       case kStringConcatenation:
         EvaluateStringConcatenation();
         break;
+      case kListConcatenation:
+      case kSetConcatenation:
+      case kMapConcatenation:
+      case kInstanceCreation:
+        // These only occur inside unevaluated constants, so if we decide to
+        // remove support for late evaluation of environment constants from
+        // dill files in the VM, an implementation here will not be necessary.
+        H.ReportError(
+            script_, TokenPosition::kNoSource,
+            "Unexpected unevaluated constant, All constant expressions"
+            " are expected to be evaluated at this point %s (%d)",
+            Reader::TagName(tag), tag);
+        break;
       case kSymbolLiteral:
         EvaluateSymbolLiteral();
         break;
@@ -109,7 +122,10 @@
       case kConstSetLiteral:
         // Set literals are currently desugared in the frontend and will not
         // reach the VM. See http://dartbug.com/35124 for discussion.
-        UNREACHABLE();
+        H.ReportError(script_, TokenPosition::kNoSource,
+                      "Unexpected set literal constant, this constant"
+                      " is expected to be evaluated at this point %s (%d)",
+                      Reader::TagName(tag), tag);
         break;
       case kConstMapLiteral:
         EvaluateMapLiteralInternal();
@@ -117,6 +133,10 @@
       case kLet:
         EvaluateLet();
         break;
+      case kBlockExpression: {
+        UNIMPLEMENTED();
+        break;
+      }
       case kInstantiation:
         EvaluatePartialTearoffInstantiation();
         break;
@@ -148,7 +168,10 @@
         EvaluateNullLiteral();
         break;
       case kConstantExpression:
-        EvaluateConstantExpression();
+        EvaluateConstantExpression(tag);
+        break;
+      case kDeprecated_ConstantExpression:
+        EvaluateConstantExpression(tag);
         break;
       default:
         H.ReportError(
@@ -371,13 +394,11 @@
       H.ReportError(script_, position, "Not a constant expression.");
     } else if (field.StaticValue() == Object::sentinel().raw()) {
       field.SetStaticValue(Object::transition_sentinel());
-      const Object& value =
-          Object::Handle(Compiler::EvaluateStaticInitializer(field));
+      const Object& value = Object::Handle(Z, field.EvaluateInitializer());
       if (value.IsError()) {
         field.SetStaticValue(Object::null_instance());
         H.ReportError(Error::Cast(value), script_, position,
                       "Not a constant expression.");
-        UNREACHABLE();
       }
       Thread* thread = H.thread();
       const Error& error =
@@ -385,7 +406,6 @@
       if (!error.IsNull()) {
         field.SetStaticValue(Object::null_instance());
         H.ReportError(error, script_, position, "Not a constant expression.");
-        UNREACHABLE();
       }
       ASSERT(value.IsNull() || value.IsInstance());
       field.SetStaticValue(value.IsNull() ? Instance::null_instance()
@@ -462,11 +482,11 @@
   ASSERT(IsBuildingFlowGraph());
   TokenPosition position = helper_->ReadPosition();  // read position.
 
-  const LocalVariable* this_variable =
-      flow_graph_builder_->scopes_->this_variable;
-  ASSERT(this_variable->IsConst());
+  const LocalVariable* receiver_variable =
+      flow_graph_builder_->parsed_function_->receiver_var();
+  ASSERT(receiver_variable->IsConst());
   const Instance& receiver =
-      Instance::Handle(Z, this_variable->ConstValue()->raw());
+      Instance::Handle(Z, receiver_variable->ConstValue()->raw());
   ASSERT(!receiver.IsNull());
 
   Class& klass = Class::Handle(Z, active_class_->klass->SuperClass());
@@ -848,12 +868,16 @@
   result_ = Instance::null();
 }
 
-void ConstantEvaluator::EvaluateConstantExpression() {
+void ConstantEvaluator::EvaluateConstantExpression(Tag tag) {
   // Please note that this constants array is constructed exactly once, see
   // ReadConstantTable() and is immutable from that point on, so there is no
   // need to guard against concurrent access between mutator and background
   // compiler.
   KernelConstantsMap constant_map(H.constants().raw());
+  if (tag == kConstantExpression) {
+    helper_->ReadPosition();
+    helper_->SkipDartType();
+  }
   result_ ^= constant_map.GetOrDie(helper_->ReadUInt());
   ASSERT(constant_map.Release().raw() == H.constants().raw());
 }
@@ -1026,14 +1050,16 @@
   if (!IsBuildingFlowGraph()) return false;
 
   const Function& function = flow_graph_builder_->parsed_function_->function();
-  if (function.kind() == RawFunction::kImplicitStaticFinalGetter) {
+  if ((function.kind() == RawFunction::kImplicitStaticFinalGetter ||
+       function.kind() == RawFunction::kStaticFieldInitializer) &&
+      !I->CanOptimizeImmediately()) {
     // Don't cache constants in initializer expressions. They get
     // evaluated only once.
     return false;
   }
 
   bool is_present = false;
-  ASSERT(!script_.InVMHeap());
+  ASSERT(!script_.InVMIsolateHeap());
   if (script_.compile_time_constants() == Array::null()) {
     return false;
   }
@@ -1057,13 +1083,15 @@
   if (!IsBuildingFlowGraph()) return;
 
   const Function& function = flow_graph_builder_->parsed_function_->function();
-  if (function.kind() == RawFunction::kImplicitStaticFinalGetter) {
+  if ((function.kind() == RawFunction::kImplicitStaticFinalGetter ||
+       function.kind() == RawFunction::kStaticFieldInitializer) &&
+      !I->CanOptimizeImmediately()) {
     // Don't cache constants in initializer expressions. They get
     // evaluated only once.
     return;
   }
   const intptr_t kInitialConstMapSize = 16;
-  ASSERT(!script_.InVMHeap());
+  ASSERT(!script_.InVMIsolateHeap());
   if (script_.compile_time_constants() == Array::null()) {
     const Array& array = Array::Handle(
         HashTables::New<KernelConstantsMap>(kInitialConstMapSize, Heap::kNew));
@@ -1193,7 +1221,7 @@
         temp_array_.SetTypeArguments(temp_type_arguments_);
         for (intptr_t j = 0; j < length; ++j) {
           const intptr_t entry_offset = helper_.ReadUInt();
-          ASSERT(entry_offset < offset);  // We have a DAG!
+          ASSERT(entry_offset < (offset - start_offset));  // We have a DAG!
           temp_object_ = constants.GetOrDie(entry_offset);
           temp_array_.SetAt(j, temp_object_);
         }
@@ -1201,6 +1229,14 @@
         temp_instance_ = H.Canonicalize(temp_array_);
         break;
       }
+      case kSetConstant:
+        // Set literals are currently desugared in the frontend and will not
+        // reach the VM. See http://dartbug.com/35124 for discussion.
+        H.ReportError(script(), TokenPosition::kNoSource,
+                      "Unexpected set constant, this constant"
+                      " is expected to be evaluated at this point (%" Pd ")",
+                      constant_tag);
+        break;
       case kInstanceConstant: {
         const NameIndex index = helper_.ReadCanonicalNameReference();
         if (ShouldSkipConstant(index)) {
@@ -1232,7 +1268,7 @@
           temp_field_ =
               H.LookupFieldByKernelField(helper_.ReadCanonicalNameReference());
           const intptr_t entry_offset = helper_.ReadUInt();
-          ASSERT(entry_offset < offset);  // We have a DAG!
+          ASSERT(entry_offset < (offset - start_offset));  // We have a DAG!
           temp_object_ = constants.GetOrDie(entry_offset);
           temp_instance_.SetField(temp_field_, temp_object_);
         }
@@ -1242,6 +1278,7 @@
       }
       case kPartialInstantiationConstant: {
         const intptr_t entry_offset = helper_.ReadUInt();
+        ASSERT(entry_offset < (offset - start_offset));  // We have a DAG!
         temp_object_ = constants.GetOrDie(entry_offset);
 
         // Happens if the tearoff was in the vmservice library and we have
@@ -1258,6 +1295,7 @@
         for (intptr_t j = 0; j < number_of_type_arguments; ++j) {
           temp_type_arguments_.SetTypeAt(j, type_translator_.BuildType());
         }
+        temp_type_arguments_ = temp_type_arguments_.Canonicalize();
 
         // Make a copy of the old closure, with the delayed type arguments
         // set to [temp_type_arguments_].
@@ -1291,12 +1329,19 @@
       }
       case kMapConstant:
         // Note: This is already lowered to InstanceConstant/ListConstant.
-        UNREACHABLE();
+        H.ReportError(script(), TokenPosition::kNoSource,
+                      "Unexpected map constant, this constant"
+                      " is expected to be evaluated at this point (%" Pd ")",
+                      constant_tag);
         break;
       case kUnevaluatedConstant:
         // We should not see unevaluated constants in the constant table, they
         // should have been fully evaluated before we get them.
-        UNREACHABLE();
+        H.ReportError(
+            script(), TokenPosition::kNoSource,
+            "Unexpected unevaluated constant, All constant expressions"
+            " are expected to be evaluated at this point (%" Pd ")",
+            constant_tag);
         break;
       default:
         UNREACHABLE();
diff --git a/runtime/vm/compiler/frontend/constant_evaluator.h b/runtime/vm/compiler/frontend/constant_evaluator.h
index f5fe543..0483baa 100644
--- a/runtime/vm/compiler/frontend/constant_evaluator.h
+++ b/runtime/vm/compiler/frontend/constant_evaluator.h
@@ -88,7 +88,7 @@
   void EvaluateDoubleLiteral();
   void EvaluateBoolLiteral(bool value);
   void EvaluateNullLiteral();
-  void EvaluateConstantExpression();
+  void EvaluateConstantExpression(Tag tag);
 
   void EvaluateGetStringLength(intptr_t expression_offset,
                                TokenPosition position);
@@ -156,6 +156,8 @@
   const Array& ReadConstantTable();
 
  private:
+  const Script& script() const { return helper_.script_; }
+
   void InstantiateTypeArguments(const Class& receiver_class,
                                 TypeArguments* type_arguments);
 
diff --git a/runtime/vm/compiler/frontend/flow_graph_builder.cc b/runtime/vm/compiler/frontend/flow_graph_builder.cc
index 00ff453..c1b1dea 100644
--- a/runtime/vm/compiler/frontend/flow_graph_builder.cc
+++ b/runtime/vm/compiler/frontend/flow_graph_builder.cc
@@ -51,6 +51,8 @@
 
   // Attach the outer environment on each instruction in the callee graph.
   ASSERT(call_->env() != NULL);
+  ASSERT(call_->deopt_id() != DeoptId::kNone);
+  const intptr_t outer_deopt_id = call_->deopt_id();
   // Scale the edge weights by the call count for the inlined function.
   double scale_factor =
       static_cast<double>(call_->CallCount()) /
@@ -63,7 +65,8 @@
     }
     Instruction* instr = block;
     if (block->env() != NULL) {
-      call_->env()->DeepCopyToOuter(callee_graph->zone(), block);
+      call_->env()->DeepCopyToOuter(callee_graph->zone(), block,
+                                    outer_deopt_id);
     }
     for (ForwardInstructionIterator it(block); !it.Done(); it.Advance()) {
       instr = it.Current();
@@ -71,7 +74,8 @@
       // optimizations need deoptimization info for non-deoptable instructions,
       // eg, LICM on GOTOs.
       if (instr->env() != NULL) {
-        call_->env()->DeepCopyToOuter(callee_graph->zone(), instr);
+        call_->env()->DeepCopyToOuter(callee_graph->zone(), instr,
+                                      outer_deopt_id);
       }
     }
     if (instr->IsGoto()) {
diff --git a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
index bf8977a..935ae39 100644
--- a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
+++ b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
@@ -9,7 +9,6 @@
 #include "vm/compiler/frontend/flow_graph_builder.h"  // For dart::FlowGraphBuilder::SimpleInstanceOfType.
 #include "vm/compiler/frontend/prologue_builder.h"
 #include "vm/compiler/jit/compiler.h"
-#include "vm/kernel.h"  // For IsFieldInitializer.
 #include "vm/object_store.h"
 #include "vm/stack_frame.h"
 
@@ -67,79 +66,18 @@
                            B->last_used_block_id_, prologue_info);
 }
 
-FlowGraph* StreamingFlowGraphBuilder::BuildGraphOfFieldAccessor(
-    LocalVariable* setter_value) {
+void StreamingFlowGraphBuilder::EvaluateConstFieldValue(const Field& field) {
+  ASSERT(field.is_const() && field.IsUninitialized());
+
   FieldHelper field_helper(this);
-  field_helper.ReadUntilIncluding(FieldHelper::kCanonicalName);
+  field_helper.ReadUntilExcluding(FieldHelper::kInitializer);
+  Tag initializer_tag = ReadTag();  // read first part of initializer.
 
-  const Function& function = parsed_function()->function();
+  ASSERT(initializer_tag == kSomething);
 
-  // Instead of building a dynamic invocation forwarder that checks argument
-  // type and then invokes original setter we simply generate the type check
-  // and inlined field store. Scope builder takes care of setting correct
-  // type check mode in this case.
-  const bool is_setter = function.IsDynamicInvocationForwader() ||
-                         function.IsImplicitSetterFunction();
-  const bool is_method = !function.IsStaticFunction();
-  Field& field = Field::ZoneHandle(
-      Z, H.LookupFieldByKernelField(field_helper.canonical_name_));
-
-  B->graph_entry_ =
-      new (Z) GraphEntryInstr(*parsed_function(), Compiler::kNoOSRDeoptId);
-
-  auto normal_entry = B->BuildFunctionEntry(B->graph_entry_);
-  B->graph_entry_->set_normal_entry(normal_entry);
-
-  Fragment body(normal_entry);
-  if (is_setter) {
-    // We only expect to generate a dynamic invocation forwarder if
-    // the value needs type check.
-    ASSERT(!function.IsDynamicInvocationForwader() ||
-           setter_value->needs_type_check());
-    if (is_method) {
-      body += LoadLocal(scopes()->this_variable);
-    }
-    body += LoadLocal(setter_value);
-    if (I->argument_type_checks() && setter_value->needs_type_check()) {
-      body += CheckArgumentType(setter_value, setter_value->type());
-    }
-    if (is_method) {
-      body += flow_graph_builder_->StoreInstanceFieldGuarded(field, false);
-    } else {
-      body += StoreStaticField(TokenPosition::kNoSource, field);
-    }
-    body += NullConstant();
-  } else if (is_method) {
-    body += LoadLocal(scopes()->this_variable);
-    body += flow_graph_builder_->LoadField(field);
-  } else if (field.is_const()) {
-    field_helper.ReadUntilExcluding(FieldHelper::kInitializer);
-    Tag initializer_tag = ReadTag();  // read first part of initializer.
-
-    // If the parser needs to know the value of an uninitialized constant field
-    // it will set the value to the transition sentinel (used to detect circular
-    // initialization) and then call the implicit getter.  Thus, the getter
-    // cannot contain the InitStaticField instruction that normal static getters
-    // contain because it would detect spurious circular initialization when it
-    // checks for the transition sentinel.
-    ASSERT(initializer_tag == kSomething);
-    body += Constant(Instance::ZoneHandle(
-        Z, constant_evaluator_.EvaluateExpression(ReaderOffset())));
-  } else {
-    // The field always has an initializer because static fields without
-    // initializers are initialized eagerly and do not have implicit getters.
-    ASSERT(field.has_initializer());
-    body += Constant(field);
-    body += flow_graph_builder_->InitStaticField(field);
-    body += Constant(field);
-    body += LoadStaticField();
-  }
-  body += Return(TokenPosition::kNoSource);
-
-  PrologueInfo prologue_info(-1, -1);
-  return new (Z)
-      FlowGraph(*parsed_function(), flow_graph_builder_->graph_entry_,
-                flow_graph_builder_->last_used_block_id_, prologue_info);
+  Instance& value = Instance::Handle(
+      Z, constant_evaluator_.EvaluateExpression(ReaderOffset()));
+  field.SetStaticValue(value);
 }
 
 void StreamingFlowGraphBuilder::SetupDefaultParameterValues() {
@@ -232,7 +170,7 @@
   }
 
   Fragment instructions;
-  instructions += LoadLocal(scopes()->this_variable);
+  instructions += LoadLocal(parsed_function()->receiver_var());
   instructions += BuildExpression();
   instructions += flow_graph_builder_->StoreInstanceFieldGuarded(field, true);
   return instructions;
@@ -328,7 +266,7 @@
           NameIndex canonical_target =
               ReadCanonicalNameReference();  // read target_reference.
 
-          instructions += LoadLocal(scopes()->this_variable);
+          instructions += LoadLocal(parsed_function()->receiver_var());
           instructions += PushArgument();
 
           // TODO(jensj): ASSERT(init->arguments()->types().length() == 0);
@@ -355,7 +293,7 @@
           NameIndex canonical_target =
               ReadCanonicalNameReference();  // read target_reference.
 
-          instructions += LoadLocal(scopes()->this_variable);
+          instructions += LoadLocal(parsed_function()->receiver_var());
           instructions += PushArgument();
 
           // TODO(jensj): ASSERT(init->arguments()->types().length() == 0);
@@ -422,859 +360,30 @@
   return instructions;
 }
 
-// If no type arguments are passed to a generic function, we need to fill the
-// type arguments in with the default types stored on the TypeParameter nodes
-// in Kernel.
-Fragment StreamingFlowGraphBuilder::BuildDefaultTypeHandling(
-    const Function& function,
-    intptr_t type_parameters_offset) {
-  if (function.IsGeneric()) {
-    AlternativeReadingScope alt(&reader_);
-    SetOffset(type_parameters_offset);
-    intptr_t num_type_params = ReadListLength();
-    ASSERT(num_type_params == function.NumTypeParameters());
-    TypeArguments& default_types =
-        TypeArguments::ZoneHandle(TypeArguments::New(num_type_params));
-    for (intptr_t i = 0; i < num_type_params; ++i) {
-      TypeParameterHelper helper(this);
-      helper.ReadUntilExcludingAndSetJustRead(
-          TypeParameterHelper::kDefaultType);
-      if (ReadTag() == kSomething) {
-        default_types.SetTypeAt(i, T.BuildType());
-      } else {
-        default_types.SetTypeAt(i, Object::dynamic_type());
-      }
-      helper.Finish();
-    }
-    default_types = default_types.Canonicalize();
-
-    if (!default_types.IsNull()) {
-      Fragment then;
-      Fragment otherwise;
-
-      otherwise += TranslateInstantiatedTypeArguments(default_types);
-      otherwise += StoreLocal(TokenPosition::kNoSource,
-                              parsed_function()->function_type_arguments());
-      otherwise += Drop();
-      return B->TestAnyTypeArgs(then, otherwise);
-    }
-  }
-  return Fragment();
-}
-
-void StreamingFlowGraphBuilder::RecordUncheckedEntryPoint(
-    FunctionEntryInstr* extra_entry) {
-  // Closures always check all arguments on their checked entry-point, most
-  // call-sites are unchecked, and they're inlined less often, so it's very
-  // beneficial to build multiple entry-points for them. Regular methods however
-  // have fewer checks to begin with since they have dynamic invocation
-  // forwarders, so in AOT we implement a more conservative time-space tradeoff
-  // by only building the unchecked entry-point when inlining. We should
-  // reconsider this heuristic if we identify non-inlined type-checks in
-  // hotspots of new benchmarks.
-  if (!B->IsInlining() && (parsed_function()->function().IsClosureFunction() ||
-                           !FLAG_precompiled_mode)) {
-    B->graph_entry_->set_unchecked_entry(extra_entry);
-  } else if (B->InliningUncheckedEntry()) {
-    B->graph_entry_->set_normal_entry(extra_entry);
-  }
-}
-
-FlowGraph* StreamingFlowGraphBuilder::BuildGraphOfImplicitClosureFunction(
+void StreamingFlowGraphBuilder::ReadDefaultFunctionTypeArguments(
     const Function& function) {
-  const Function& parent = Function::ZoneHandle(Z, function.parent_function());
-  const String& func_name = String::ZoneHandle(Z, parent.name());
-  const Class& owner = Class::ZoneHandle(Z, parent.Owner());
-  Function& target = Function::ZoneHandle(Z, owner.LookupFunction(func_name));
-
-  if (!target.IsNull() && (target.raw() != parent.raw())) {
-    DEBUG_ASSERT(Isolate::Current()->HasAttemptedReload());
-    if ((target.is_static() != parent.is_static()) ||
-        (target.kind() != parent.kind())) {
-      target = Function::null();
-    }
+  if (!function.IsGeneric()) {
+    return;
   }
-
-  if (target.IsNull() ||
-      (parent.num_fixed_parameters() != target.num_fixed_parameters())) {
-    return BuildGraphOfNoSuchMethodForwarder(function, true,
-                                             parent.is_static());
-  }
-
-  // The prologue builder needs the default parameter values.
-  SetupDefaultParameterValues();
-
-  flow_graph_builder_->graph_entry_ =
-      new (Z) GraphEntryInstr(*parsed_function(), Compiler::kNoOSRDeoptId);
-
-  auto normal_entry = flow_graph_builder_->BuildFunctionEntry(
-      flow_graph_builder_->graph_entry_);
-  flow_graph_builder_->graph_entry_->set_normal_entry(normal_entry);
-
-  PrologueInfo prologue_info(-1, -1);
-  BlockEntryInstr* instruction_cursor =
-      flow_graph_builder_->BuildPrologue(normal_entry, &prologue_info);
-
-  const Fragment prologue =
-      flow_graph_builder_->CheckStackOverflowInPrologue(function.token_pos());
-
+  AlternativeReadingScope alt(&reader_);
   FunctionNodeHelper function_node_helper(this);
   function_node_helper.ReadUntilExcluding(FunctionNodeHelper::kTypeParameters);
-
-  const Fragment default_type_handling =
-      BuildDefaultTypeHandling(function, ReaderOffset());
-
-  const ProcedureAttributesMetadata parent_attrs =
-      procedure_attributes_metadata_helper_.GetProcedureAttributes(
-          parent.kernel_offset());
-
-  // We're going to throw away the explicit checks because the target will
-  // always check them.
-  Fragment implicit_checks;
-  if (function.NeedsArgumentTypeChecks(I)) {
-    Fragment explicit_checks_unused;
-    if (target.is_static()) {
-      // Tearoffs of static methods needs to perform arguments checks since
-      // static methods they forward to don't do it themselves.
-      AlternativeReadingScope _(&reader_);
-      BuildArgumentTypeChecks(kCheckAllTypeParameterBounds,
-                              &explicit_checks_unused, &implicit_checks,
-                              nullptr);
-    } else {
-      // Check if parent function was annotated with no-dynamic-invocations.
-      if (MethodCanSkipTypeChecksForNonCovariantArguments(parent,
-                                                          parent_attrs)) {
-        // If it was then we might need to build some checks in the
-        // tear-off.
-        AlternativeReadingScope _(&reader_);
-        BuildArgumentTypeChecks(kCheckNonCovariantTypeParameterBounds,
-                                &explicit_checks_unused, &implicit_checks,
-                                nullptr);
-      }
-    }
-  }
-
-  Fragment body;
-
-  function_node_helper.ReadUntilExcluding(
-      FunctionNodeHelper::kPositionalParameters);
-
-  intptr_t type_args_len = 0;
-  if (function.IsGeneric()) {
-    type_args_len = function.NumTypeParameters();
-    ASSERT(parsed_function()->function_type_arguments() != NULL);
-    body += LoadLocal(parsed_function()->function_type_arguments());
-    body += PushArgument();
-  }
-
-  // Load all the arguments.
-  if (!target.is_static()) {
-    // The context has a fixed shape: a single variable which is the
-    // closed-over receiver.
-    body +=
-        LoadLocal(parsed_function()->node_sequence()->scope()->VariableAt(0));
-    body += LoadNativeField(Slot::Closure_context());
-    body += LoadNativeField(
-        Slot::GetContextVariableSlotFor(thread(), *scopes()->this_variable));
-    body += PushArgument();
-  }
-
-  // Positional.
-  intptr_t positional_argument_count = ReadListLength();
-  for (intptr_t i = 0; i < positional_argument_count; ++i) {
-    body += LoadLocal(LookupVariable(
-        ReaderOffset() + data_program_offset_));  // ith variable offset.
-    body += PushArgument();
-    SkipVariableDeclaration();  // read ith variable.
-  }
-
-  // Named.
-  intptr_t named_argument_count = ReadListLength();
-  Array& argument_names = Array::ZoneHandle(Z);
-  if (named_argument_count > 0) {
-    argument_names = Array::New(named_argument_count, H.allocation_space());
-    for (intptr_t i = 0; i < named_argument_count; ++i) {
-      // ith variable offset.
-      body += LoadLocal(LookupVariable(ReaderOffset() + data_program_offset_));
-      body += PushArgument();
-
-      // read ith variable.
-      VariableDeclarationHelper helper(this);
-      helper.ReadUntilExcluding(VariableDeclarationHelper::kEnd);
-
-      argument_names.SetAt(i, H.DartSymbolObfuscate(helper.name_index_));
-    }
-  }
-
-  // Forward them to the parent.
-  intptr_t argument_count = positional_argument_count + named_argument_count;
-  if (!parent.is_static()) {
-    ++argument_count;
-  }
-  body += StaticCall(TokenPosition::kNoSource, target, argument_count,
-                     argument_names, ICData::kNoRebind,
-                     /* result_type = */ NULL, type_args_len);
-
-  // Return the result.
-  body += Return(function_node_helper.end_position_);
-
-  // Setup multiple entrypoints if useful.
-  FunctionEntryInstr* extra_entry = nullptr;
-  if (function.MayHaveUncheckedEntryPoint(I)) {
-    // The prologue for a closure will always have context handling (e.g.
-    // setting up the 'this_variable'), but we don't need it on the unchecked
-    // entry because the only time we reference this is for loading the
-    // receiver, which we fetch directly from the context.
-    if (PrologueBuilder::PrologueSkippableOnUncheckedEntry(function)) {
-      // Use separate entry points since we can skip almost everything on the
-      // static entry.
-      extra_entry = BuildSeparateUncheckedEntryPoint(
-          /*normal_entry=*/instruction_cursor,
-          /*normal_prologue=*/prologue + default_type_handling +
-              implicit_checks,
-          /*extra_prologue=*/
-          B->CheckStackOverflowInPrologue(function.token_pos()),
-          /*shared_prologue=*/Fragment(),
-          /*body=*/body);
-    } else {
-      Fragment shared_prologue(normal_entry, instruction_cursor);
-      shared_prologue += prologue;
-      extra_entry = BuildSharedUncheckedEntryPoint(
-          /*shared_prologue_linked_in=*/shared_prologue,
-          /*skippable_checks=*/default_type_handling + implicit_checks,
-          /*redefinitions_if_skipped=*/Fragment(),
-          /*body=*/body);
-    }
-    RecordUncheckedEntryPoint(extra_entry);
-  } else {
-    Fragment function(instruction_cursor);
-    function += prologue;
-    function += default_type_handling;
-    function += implicit_checks;
-    function += body;
-  }
-
-  return new (Z)
-      FlowGraph(*parsed_function(), flow_graph_builder_->graph_entry_,
-                flow_graph_builder_->last_used_block_id_, prologue_info);
-}
-
-// If throw_no_such_method_error is set to true (defaults to false), an
-// instance of NoSuchMethodError is thrown. Otherwise, the instance
-// noSuchMethod is called.
-FlowGraph* StreamingFlowGraphBuilder::BuildGraphOfNoSuchMethodForwarder(
-    const Function& function,
-    bool is_implicit_closure_function,
-    bool throw_no_such_method_error) {
-  // The prologue builder needs the default parameter values.
-  SetupDefaultParameterValues();
-
-  B->graph_entry_ =
-      new (Z) GraphEntryInstr(*parsed_function(), Compiler::kNoOSRDeoptId);
-
-  auto normal_entry = B->BuildFunctionEntry(B->graph_entry_);
-  B->graph_entry_->set_normal_entry(normal_entry);
-
-  PrologueInfo prologue_info(-1, -1);
-  BlockEntryInstr* instruction_cursor =
-      B->BuildPrologue(normal_entry, &prologue_info);
-
-  Fragment body(instruction_cursor);
-  body += B->CheckStackOverflowInPrologue(function.token_pos());
-
-  // If we are inside the tearoff wrapper function (implicit closure), we need
-  // to extract the receiver from the context. We just replace it directly on
-  // the stack to simplify the rest of the code.
-  if (is_implicit_closure_function && !function.is_static()) {
-    if (parsed_function()->has_arg_desc_var()) {
-      body += B->LoadArgDescriptor();
-      body += LoadNativeField(Slot::ArgumentsDescriptor_count());
-      body += LoadLocal(parsed_function()->current_context_var());
-      body += B->LoadNativeField(
-          Slot::GetContextVariableSlotFor(thread(), *scopes()->this_variable));
-      body += B->StoreFpRelativeSlot(
-          kWordSize * compiler::target::frame_layout.param_end_from_fp);
-    } else {
-      body += LoadLocal(parsed_function()->current_context_var());
-      body += B->LoadNativeField(
-          Slot::GetContextVariableSlotFor(thread(), *scopes()->this_variable));
-      body += B->StoreFpRelativeSlot(
-          kWordSize * (compiler::target::frame_layout.param_end_from_fp +
-                       function.NumParameters()));
-    }
-  }
-
-  FunctionNodeHelper function_node_helper(this);
-  function_node_helper.ReadUntilExcluding(FunctionNodeHelper::kTypeParameters);
-
-  if (function.NeedsArgumentTypeChecks(I)) {
-    AlternativeReadingScope _(&reader_);
-    BuildArgumentTypeChecks(kCheckAllTypeParameterBounds, &body, &body,
-                            nullptr);
-  }
-
-  function_node_helper.ReadUntilExcluding(
-      FunctionNodeHelper::kPositionalParameters);
-
-  body += MakeTemp();
-  LocalVariable* result = MakeTemporary();
-
-  // Do "++argument_count" if any type arguments were passed.
-  LocalVariable* argument_count_var = parsed_function()->expression_temp_var();
-  body += IntConstant(0);
-  body += StoreLocal(TokenPosition::kNoSource, argument_count_var);
-  body += Drop();
-  if (function.IsGeneric()) {
-    Fragment then;
-    Fragment otherwise;
-    otherwise += IntConstant(1);
-    otherwise += StoreLocal(TokenPosition::kNoSource, argument_count_var);
-    otherwise += Drop();
-    body += flow_graph_builder_->TestAnyTypeArgs(then, otherwise);
-  }
-
-  if (function.HasOptionalParameters()) {
-    body += B->LoadArgDescriptor();
-    body += LoadNativeField(Slot::ArgumentsDescriptor_count());
-  } else {
-    body += IntConstant(function.NumParameters());
-  }
-  body += LoadLocal(argument_count_var);
-  body += B->SmiBinaryOp(Token::kADD, /* truncate= */ true);
-  LocalVariable* argument_count = MakeTemporary();
-
-  // We are generating code like the following:
-  //
-  // var arguments = new Array<dynamic>(argument_count);
-  //
-  // int i = 0;
-  // if (any type arguments are passed) {
-  //   arguments[0] = function_type_arguments;
-  //   ++i;
-  // }
-  //
-  // for (; i < argument_count; ++i) {
-  //   arguments[i] = LoadFpRelativeSlot(
-  //       kWordSize * (frame_layout.param_end_from_fp + argument_count - i));
-  // }
-  body += Constant(TypeArguments::ZoneHandle(Z, TypeArguments::null()));
-  body += LoadLocal(argument_count);
-  body += CreateArray();
-  LocalVariable* arguments = MakeTemporary();
-
-  {
-    // int i = 0
-    LocalVariable* index = parsed_function()->expression_temp_var();
-    body += IntConstant(0);
-    body += StoreLocal(TokenPosition::kNoSource, index);
-    body += Drop();
-
-    // if (any type arguments are passed) {
-    //   arguments[0] = function_type_arguments;
-    //   i = 1;
-    // }
-    if (function.IsGeneric()) {
-      Fragment store;
-      store += LoadLocal(arguments);
-      store += IntConstant(0);
-      store += LoadFunctionTypeArguments();
-      store += StoreIndexed(kArrayCid);
-      store += IntConstant(1);
-      store += StoreLocal(TokenPosition::kNoSource, index);
-      store += Drop();
-      body += B->TestAnyTypeArgs(store, Fragment());
-    }
-
-    TargetEntryInstr* body_entry;
-    TargetEntryInstr* loop_exit;
-
-    Fragment condition;
-    // i < argument_count
-    condition += LoadLocal(index);
-    condition += LoadLocal(argument_count);
-    condition += B->SmiRelationalOp(Token::kLT);
-    condition += BranchIfTrue(&body_entry, &loop_exit, /*negate=*/false);
-
-    Fragment loop_body(body_entry);
-
-    // arguments[i] = LoadFpRelativeSlot(
-    //     kWordSize * (frame_layout.param_end_from_fp + argument_count - i));
-    loop_body += LoadLocal(arguments);
-    loop_body += LoadLocal(index);
-    loop_body += LoadLocal(argument_count);
-    loop_body += LoadLocal(index);
-    loop_body += B->SmiBinaryOp(Token::kSUB, /*truncate=*/true);
-    loop_body += B->LoadFpRelativeSlot(
-        kWordSize * compiler::target::frame_layout.param_end_from_fp);
-    loop_body += StoreIndexed(kArrayCid);
-
-    // ++i
-    loop_body += LoadLocal(index);
-    loop_body += IntConstant(1);
-    loop_body += B->SmiBinaryOp(Token::kADD, /*truncate=*/true);
-    loop_body += StoreLocal(TokenPosition::kNoSource, index);
-    loop_body += Drop();
-
-    JoinEntryInstr* join = BuildJoinEntry();
-    loop_body += Goto(join);
-
-    Fragment loop(join);
-    loop += condition;
-
-    Instruction* entry =
-        new (Z) GotoInstr(join, CompilerState::Current().GetNextDeoptId());
-    body += Fragment(entry, loop_exit);
-  }
-
-  // Load receiver.
-  if (is_implicit_closure_function) {
-    if (throw_no_such_method_error) {
-      const Function& parent =
-          Function::ZoneHandle(Z, function.parent_function());
-      const Class& owner = Class::ZoneHandle(Z, parent.Owner());
-      AbstractType& type = AbstractType::ZoneHandle(Z);
-      type ^= Type::New(owner, TypeArguments::Handle(Z), owner.token_pos(),
-                        Heap::kOld);
-      type ^= ClassFinalizer::FinalizeType(owner, type);
-      body += Constant(type);
-    } else {
-      body += LoadLocal(parsed_function()->current_context_var());
-      body += B->LoadNativeField(
-          Slot::GetContextVariableSlotFor(thread(), *scopes()->this_variable));
-    }
-  } else {
-    LocalScope* scope = parsed_function()->node_sequence()->scope();
-    body += LoadLocal(scope->VariableAt(0));
-  }
-  body += PushArgument();
-
-  body += Constant(String::ZoneHandle(Z, function.name()));
-  body += PushArgument();
-
-  if (!parsed_function()->has_arg_desc_var()) {
-    // If there is no variable for the arguments descriptor (this function's
-    // signature doesn't require it), then we need to create one.
-    Array& args_desc = Array::ZoneHandle(
-        Z, ArgumentsDescriptor::New(0, function.NumParameters()));
-    body += Constant(args_desc);
-  } else {
-    body += B->LoadArgDescriptor();
-  }
-  body += PushArgument();
-
-  body += LoadLocal(arguments);
-  body += PushArgument();
-
-  if (throw_no_such_method_error) {
-    const Function& parent =
-        Function::ZoneHandle(Z, function.parent_function());
-    const Class& owner = Class::ZoneHandle(Z, parent.Owner());
-    InvocationMirror::Level im_level = owner.IsTopLevel()
-                                           ? InvocationMirror::kTopLevel
-                                           : InvocationMirror::kStatic;
-    InvocationMirror::Kind im_kind;
-    if (function.IsImplicitGetterFunction() || function.IsGetterFunction()) {
-      im_kind = InvocationMirror::kGetter;
-    } else if (function.IsImplicitSetterFunction() ||
-               function.IsSetterFunction()) {
-      im_kind = InvocationMirror::kSetter;
-    } else {
-      im_kind = InvocationMirror::kMethod;
-    }
-    body += IntConstant(InvocationMirror::EncodeType(im_level, im_kind));
-  } else {
-    body += NullConstant();
-  }
-  body += PushArgument();
-
-  // Push the number of delayed type arguments.
-  if (function.IsClosureFunction()) {
-    LocalVariable* closure =
-        parsed_function()->node_sequence()->scope()->VariableAt(0);
-    Fragment then;
-    then += IntConstant(function.NumTypeParameters());
-    then += StoreLocal(TokenPosition::kNoSource, argument_count_var);
-    then += Drop();
-    Fragment otherwise;
-    otherwise += IntConstant(0);
-    otherwise += StoreLocal(TokenPosition::kNoSource, argument_count_var);
-    otherwise += Drop();
-    body += B->TestDelayedTypeArgs(closure, then, otherwise);
-    body += LoadLocal(argument_count_var);
-  } else {
-    body += IntConstant(0);
-  }
-  body += PushArgument();
-
-  const Class& mirror_class =
-      Class::Handle(Z, Library::LookupCoreClass(Symbols::InvocationMirror()));
-  ASSERT(!mirror_class.IsNull());
-  const Function& allocation_function = Function::ZoneHandle(
-      Z, mirror_class.LookupStaticFunction(Library::PrivateCoreLibName(
-             Symbols::AllocateInvocationMirrorForClosure())));
-  ASSERT(!allocation_function.IsNull());
-  body += StaticCall(TokenPosition::kMinSource, allocation_function,
-                     /* argument_count = */ 5, ICData::kStatic);
-  body += PushArgument();  // For the call to noSuchMethod.
-
-  if (throw_no_such_method_error) {
-    const Class& klass = Class::ZoneHandle(
-        Z, Library::LookupCoreClass(Symbols::NoSuchMethodError()));
-    ASSERT(!klass.IsNull());
-    const Function& throw_function = Function::ZoneHandle(
-        Z,
-        klass.LookupStaticFunctionAllowPrivate(Symbols::ThrowNewInvocation()));
-    ASSERT(!throw_function.IsNull());
-    body += StaticCall(TokenPosition::kNoSource, throw_function, 2,
-                       ICData::kStatic);
-  } else {
-    body += InstanceCall(TokenPosition::kNoSource, Symbols::NoSuchMethod(),
-                         Token::kILLEGAL, 2, 1);
-  }
-  body += StoreLocal(TokenPosition::kNoSource, result);
-  body += Drop();
-
-  body += Drop();  // arguments
-  body += Drop();  // argument count
-
-  AbstractType& return_type = AbstractType::Handle(function.result_type());
-  if (!return_type.IsDynamicType() && !return_type.IsVoidType() &&
-      !return_type.IsObjectType()) {
-    body += flow_graph_builder_->AssertAssignable(
-        TokenPosition::kNoSource, return_type, Symbols::Empty());
-  }
-  body += Return(TokenPosition::kNoSource);
-
-  return new (Z) FlowGraph(*parsed_function(), B->graph_entry_,
-                           B->last_used_block_id_, prologue_info);
-}
-
-void StreamingFlowGraphBuilder::BuildArgumentTypeChecks(
-    TypeChecksToBuild mode,
-    Fragment* explicit_checks,
-    Fragment* implicit_checks,
-    Fragment* implicit_redefinitions) {
-  if (!I->should_emit_strong_mode_checks()) return;
-
-  FunctionNodeHelper function_node_helper(this);
-  function_node_helper.SetNext(FunctionNodeHelper::kTypeParameters);
-  const Function& dart_function = parsed_function()->function();
-
-  const Function* forwarding_target = NULL;
-  if (parsed_function()->is_forwarding_stub()) {
-    NameIndex target_name = parsed_function()->forwarding_stub_super_target();
-    const String& name = dart_function.IsSetterFunction()
-                             ? H.DartSetterName(target_name)
-                             : H.DartProcedureName(target_name);
-    forwarding_target =
-        &Function::ZoneHandle(Z, H.LookupMethodByMember(target_name, name));
-    ASSERT(!forwarding_target->IsNull());
-  }
-
   intptr_t num_type_params = ReadListLength();
-  TypeArguments& forwarding_params = TypeArguments::Handle(Z);
-  if (forwarding_target != NULL) {
-    forwarding_params = forwarding_target->type_parameters();
-    ASSERT(forwarding_params.Length() == num_type_params);
-  }
-
-  TypeParameter& forwarding_param = TypeParameter::Handle(Z);
-  Fragment check_bounds;
+  ASSERT(num_type_params == function.NumTypeParameters());
+  TypeArguments& default_types =
+      TypeArguments::Handle(Z, TypeArguments::New(num_type_params));
   for (intptr_t i = 0; i < num_type_params; ++i) {
     TypeParameterHelper helper(this);
-    helper.ReadUntilExcludingAndSetJustRead(TypeParameterHelper::kBound);
-    String& name = H.DartSymbolObfuscate(helper.name_index_);
-    AbstractType& bound = T.BuildType();  // read bound
-    helper.Finish();
-
-    if (forwarding_target != NULL) {
-      forwarding_param ^= forwarding_params.TypeAt(i);
-      bound = forwarding_param.bound();
-    }
-
-    if (bound.IsTopType()) {
-      continue;
-    }
-
-    switch (mode) {
-      case kCheckAllTypeParameterBounds:
-        break;
-      case kCheckCovariantTypeParameterBounds:
-        if (!helper.IsGenericCovariantImpl()) {
-          continue;
-        }
-        break;
-      case kCheckNonCovariantTypeParameterBounds:
-        if (helper.IsGenericCovariantImpl()) {
-          continue;
-        }
-        break;
-    }
-
-    TypeParameter& param = TypeParameter::Handle(Z);
-    if (dart_function.IsFactory()) {
-      param ^= TypeArguments::Handle(
-                   Class::Handle(dart_function.Owner()).type_parameters())
-                   .TypeAt(i);
+    helper.ReadUntilExcludingAndSetJustRead(TypeParameterHelper::kDefaultType);
+    if (ReadTag() == kSomething) {
+      default_types.SetTypeAt(i, T.BuildType());
     } else {
-      param ^= TypeArguments::Handle(dart_function.type_parameters()).TypeAt(i);
+      default_types.SetTypeAt(i, Object::dynamic_type());
     }
-    ASSERT(param.IsFinalized());
-    check_bounds += CheckTypeArgumentBound(param, bound, name);
+    helper.Finish();
   }
-
-  // Type arguments passed through partial instantiation are guaranteed to be
-  // bounds-checked at the point of partial instantiation, so we don't need to
-  // check them again at the call-site.
-  if (dart_function.IsClosureFunction() && !check_bounds.is_empty() &&
-      FLAG_eliminate_type_checks) {
-    LocalVariable* closure =
-        parsed_function()->node_sequence()->scope()->VariableAt(0);
-    *implicit_checks += B->TestDelayedTypeArgs(closure, /*present=*/{},
-                                               /*absent=*/check_bounds);
-  } else {
-    *implicit_checks += check_bounds;
-  }
-
-  function_node_helper.SetJustRead(FunctionNodeHelper::kTypeParameters);
-  function_node_helper.ReadUntilExcluding(
-      FunctionNodeHelper::kPositionalParameters);
-
-  // Positional.
-  const intptr_t num_positional_params = ReadListLength();
-  const intptr_t kFirstParameterOffset = 1;
-  for (intptr_t i = 0; i < num_positional_params; ++i) {
-    // ith variable offset.
-    const intptr_t offset = ReaderOffset();
-    VariableDeclarationHelper helper(this);
-    helper.ReadUntilExcluding(VariableDeclarationHelper::kEnd);
-
-    LocalVariable* param = LookupVariable(offset + data_program_offset_);
-    if (!param->needs_type_check()) {
-      continue;
-    }
-
-    const AbstractType* target_type = &param->type();
-    if (forwarding_target != NULL) {
-      // We add 1 to the parameter index to account for the receiver.
-      target_type = &AbstractType::ZoneHandle(
-          Z, forwarding_target->ParameterTypeAt(kFirstParameterOffset + i));
-    }
-
-    if (target_type->IsTopType()) continue;
-
-    Fragment* checks = helper.IsCovariant() ? explicit_checks : implicit_checks;
-
-    *checks += LoadLocal(param);
-    *checks += CheckArgumentType(param, *target_type);
-    *checks += Drop();
-
-    if (!helper.IsCovariant() && implicit_redefinitions != nullptr &&
-        B->optimizing_) {
-      // We generate slightly different code in optimized vs. un-optimized code,
-      // which is ok since we don't allocate any deopt ids.
-      AssertNoDeoptIdsAllocatedScope no_deopt_allocation(H.thread());
-
-      *implicit_redefinitions += LoadLocal(param);
-      *implicit_redefinitions += RedefinitionWithType(*target_type);
-      *implicit_redefinitions += StoreLocal(TokenPosition::kNoSource, param);
-      *implicit_redefinitions += Drop();
-    }
-  }
-
-  // Named.
-  const intptr_t num_named_params = ReadListLength();
-  for (intptr_t i = 0; i < num_named_params; ++i) {
-    // ith variable offset.
-    const intptr_t offset = ReaderOffset();
-    VariableDeclarationHelper helper(this);
-    helper.ReadUntilExcluding(VariableDeclarationHelper::kEnd);
-
-    LocalVariable* param = LookupVariable(offset + data_program_offset_);
-    if (!param->needs_type_check()) {
-      continue;
-    }
-
-    const AbstractType* target_type = &param->type();
-    if (forwarding_target != NULL) {
-      // We add 1 to the parameter index to account for the receiver.
-      target_type = &AbstractType::ZoneHandle(
-          Z, forwarding_target->ParameterTypeAt(num_positional_params + i + 1));
-    }
-
-    if (target_type->IsTopType()) continue;
-
-    Fragment* checks = helper.IsCovariant() ? explicit_checks : implicit_checks;
-
-    *checks += LoadLocal(param);
-    *checks += CheckArgumentType(param, *target_type);
-    *checks += Drop();
-
-    if (!helper.IsCovariant() && implicit_redefinitions != nullptr &&
-        B->optimizing_) {
-      // We generate slightly different code in optimized vs. un-optimized code,
-      // which is ok since we don't allocate any deopt ids.
-      AssertNoDeoptIdsAllocatedScope no_deopt_allocation(H.thread());
-
-      *implicit_redefinitions += LoadLocal(param);
-      *implicit_redefinitions += RedefinitionWithType(*target_type);
-      *implicit_redefinitions += StoreLocal(TokenPosition::kNoSource, param);
-      *implicit_redefinitions += Drop();
-    }
-  }
-}
-
-Fragment StreamingFlowGraphBuilder::PushAllArguments(PushedArguments* pushed) {
-  FunctionNodeHelper function_node_helper(this);
-  function_node_helper.SetNext(FunctionNodeHelper::kTypeParameters);
-
-  Fragment body;
-
-  const intptr_t num_type_params = ReadListLength();
-  if (num_type_params > 0) {
-    // Skip type arguments.
-    for (intptr_t i = 0; i < num_type_params; ++i) {
-      TypeParameterHelper helper(this);
-      helper.Finish();
-    }
-
-    body += LoadLocal(parsed_function()->function_type_arguments());
-    body += PushArgument();
-    pushed->type_args_len = num_type_params;
-  }
-  function_node_helper.SetJustRead(FunctionNodeHelper::kTypeParameters);
-  function_node_helper.ReadUntilExcluding(
-      FunctionNodeHelper::kPositionalParameters);
-
-  // Push receiver.
-  body += LoadLocal(scopes()->this_variable);
-  body += PushArgument();
-
-  // Push positional parameters.
-  const intptr_t num_positional_params = ReadListLength();
-  for (intptr_t i = 0; i < num_positional_params; ++i) {
-    // ith variable offset.
-    const intptr_t offset = ReaderOffset();
-    SkipVariableDeclaration();
-
-    LocalVariable* param = LookupVariable(offset + data_program_offset_);
-    body += LoadLocal(param);
-    body += PushArgument();
-  }
-
-  // Push named parameters.
-  const intptr_t num_named_params = ReadListLength();
-  pushed->argument_names = Array::New(num_named_params, Heap::kOld);
-  for (intptr_t i = 0; i < num_named_params; ++i) {
-    // ith variable offset.
-    const intptr_t offset = ReaderOffset();
-    SkipVariableDeclaration();
-
-    LocalVariable* param = LookupVariable(offset + data_program_offset_);
-    pushed->argument_names.SetAt(i, param->name());
-    body += LoadLocal(param);
-    body += PushArgument();
-  }
-
-  pushed->argument_count = num_positional_params + num_named_params + 1;
-
-  return body;
-}
-
-FlowGraph* StreamingFlowGraphBuilder::BuildGraphOfDynamicInvocationForwarder() {
-  const Function& dart_function = parsed_function()->function();
-
-  // The prologue builder needs the default parameter values.
-  SetupDefaultParameterValues();
-
-  B->graph_entry_ = new (Z) GraphEntryInstr(*parsed_function(), B->osr_id_);
-
-  auto normal_entry = B->BuildFunctionEntry(B->graph_entry_);
-  B->graph_entry_->set_normal_entry(normal_entry);
-
-  PrologueInfo prologue_info(-1, -1);
-  auto instruction_cursor = B->BuildPrologue(normal_entry, &prologue_info);
-
-  Fragment body;
-  if (!dart_function.is_native()) {
-    body += B->CheckStackOverflowInPrologue(dart_function.token_pos());
-  }
-
-  ASSERT(parsed_function()->node_sequence()->scope()->num_context_variables() ==
-         0);
-
-  FunctionNodeHelper function_node_helper(this);
-  function_node_helper.ReadUntilExcluding(FunctionNodeHelper::kTypeParameters);
-  const intptr_t type_parameters_offset = ReaderOffset();
-  function_node_helper.ReadUntilExcluding(
-      FunctionNodeHelper::kPositionalParameters);
-  intptr_t first_parameter_offset = -1;
-  {
-    AlternativeReadingScope alt(&reader_);
-    intptr_t list_length = ReadListLength();  // read number of positionals.
-    if (list_length > 0) {
-      first_parameter_offset = ReaderOffset() + data_program_offset_;
-    }
-  }
-  USE(first_parameter_offset);
-  // Current position: About to read list of positionals.
-
-  // Should never build a dynamic invocation forwarder for equality
-  // operator.
-  ASSERT(dart_function.name() != Symbols::EqualOperator().raw());
-
-  // Even if the caller did not pass argument vector we would still
-  // call the target with instantiate-to-bounds type arguments.
-  body += BuildDefaultTypeHandling(dart_function, type_parameters_offset);
-
-  String& name = String::Handle(Z, dart_function.name());
-  name = Function::DemangleDynamicInvocationForwarderName(name);
-  const Class& owner = Class::Handle(Z, dart_function.Owner());
-  const Function& target =
-      Function::ZoneHandle(Z, owner.LookupDynamicFunction(name));
-  ASSERT(!target.IsNull());
-
-  // Build argument type checks that complement those that are emitted in the
-  // target.
-  {
-    AlternativeReadingScope alt(&reader_);
-    SetOffset(type_parameters_offset);
-    BuildArgumentTypeChecks(kCheckNonCovariantTypeParameterBounds, &body, &body,
-                            nullptr);
-  }
-
-  // Push all arguments and invoke the original method.
-  PushedArguments pushed = {0, 0, Array::ZoneHandle(Z)};
-  {
-    AlternativeReadingScope alt(&reader_);
-    SetOffset(type_parameters_offset);
-    body += PushAllArguments(&pushed);
-  }
-  body += StaticCall(TokenPosition::kNoSource, target, pushed.argument_count,
-                     pushed.argument_names, ICData::kNoRebind, nullptr,
-                     pushed.type_args_len);
-
-  // Some IL optimization passes assume that result of operator []= invocation
-  // is never used, so we drop it and replace with an explicit null constant.
-  if (name.raw() == Symbols::AssignIndexToken().raw()) {
-    body += Drop();
-    body += NullConstant();
-  }
-
-  body += Return(TokenPosition::kNoSource);
-
-  instruction_cursor->LinkTo(body.entry);
-
-  GraphEntryInstr* graph_entry = B->graph_entry_;
-  // When compiling for OSR, use a depth first search to find the OSR
-  // entry and make graph entry jump to it instead of normal entry.
-  // Catch entries are always considered reachable, even if they
-  // become unreachable after OSR.
-  if (B->IsCompiledForOsr()) {
-    graph_entry->RelinkToOsrEntry(Z, B->last_used_block_id_ + 1);
-  }
-  return new (Z) FlowGraph(*parsed_function(), graph_entry,
-                           B->last_used_block_id_, prologue_info);
+  default_types = default_types.Canonicalize();
+  parsed_function()->SetDefaultFunctionTypeArguments(default_types);
 }
 
 Fragment StreamingFlowGraphBuilder::DebugStepCheckInPrologue(
@@ -1289,8 +398,8 @@
   const int parameter_count = dart_function.NumParameters();
   TokenPosition check_pos = TokenPosition::kNoSource;
   if (parameter_count > 0) {
-    LocalScope* scope = parsed_function()->node_sequence()->scope();
-    const LocalVariable& parameter = *scope->VariableAt(parameter_count - 1);
+    const LocalVariable& parameter =
+        *parsed_function()->ParameterVariable(parameter_count - 1);
     check_pos = parameter.token_pos();
   }
   if (!check_pos.IsDebugPause()) {
@@ -1338,15 +447,12 @@
 }
 
 Fragment StreamingFlowGraphBuilder::TypeArgumentsHandling(
-    const Function& dart_function,
-    intptr_t type_parameters_offset) {
-  Fragment prologue =
-      BuildDefaultTypeHandling(dart_function, type_parameters_offset);
+    const Function& dart_function) {
+  Fragment prologue = B->BuildDefaultTypeHandling(dart_function);
 
   if (dart_function.IsClosureFunction() &&
       dart_function.NumParentTypeParameters() > 0) {
-    LocalVariable* closure =
-        parsed_function()->node_sequence()->scope()->VariableAt(0);
+    LocalVariable* closure = parsed_function()->ParameterVariable(0);
 
     // Function with yield points can not be generic itself but the outer
     // function can be.
@@ -1476,7 +582,7 @@
     const Function& function = pf.function();
 
     for (intptr_t i = 0; i < parameter_count; ++i) {
-      LocalVariable* variable = scope->VariableAt(i);
+      LocalVariable* variable = pf.ParameterVariable(i);
       if (variable->is_captured()) {
         LocalVariable& raw_parameter = *pf.RawParameterVariable(i);
         ASSERT((function.HasOptionalParameters() &&
@@ -1524,10 +630,10 @@
 
   AlternativeReadingScope _(&reader_);
   SetOffset(type_parameters_offset);
-  BuildArgumentTypeChecks(
+  B->BuildArgumentTypeChecks(
       MethodCanSkipTypeChecksForNonCovariantArguments(dart_function, attrs)
-          ? kCheckCovariantTypeParameterBounds
-          : kCheckAllTypeParameterBounds,
+          ? TypeChecksToBuild::kCheckCovariantTypeParameterBounds
+          : TypeChecksToBuild::kCheckAllTypeParameterBounds,
       explicit_checks, implicit_checks, implicit_redefinitions);
 }
 
@@ -1622,134 +728,7 @@
   return F;
 }
 
-// Pop the index of the current entry-point off the stack. If there is any
-// entrypoint-tracing hook registered in a pragma for the function, it is called
-// with the name of the current function and the current entry-point index.
-Fragment StreamingFlowGraphBuilder::BuildEntryPointsIntrospection() {
-  if (!FLAG_enable_testing_pragmas) return Drop();
-
-  auto& function = Function::Handle(Z, parsed_function()->function().raw());
-
-  if (function.IsImplicitClosureFunction()) {
-    const auto& parent = Function::Handle(Z, function.parent_function());
-    const auto& func_name = String::Handle(Z, parent.name());
-    const auto& owner = Class::Handle(Z, parent.Owner());
-    function = owner.LookupFunction(func_name);
-  }
-
-  auto& tmp = Object::Handle(Z);
-  tmp = function.Owner();
-  tmp = Class::Cast(tmp).library();
-  auto& library = Library::Cast(tmp);
-
-  Object& options = Object::Handle(Z);
-  if (!library.FindPragma(H.thread(), function, Symbols::vm_trace_entrypoints(),
-                          &options) ||
-      options.IsNull() || !options.IsClosure()) {
-    return Drop();
-  }
-  auto& closure = Closure::ZoneHandle(Z, Closure::Cast(options).raw());
-  LocalVariable* entry_point_num = MakeTemporary();
-
-  auto& function_name = String::ZoneHandle(
-      Z, String::New(function.ToLibNamePrefixedQualifiedCString(), Heap::kOld));
-  if (parsed_function()->function().IsImplicitClosureFunction()) {
-    function_name = String::Concat(
-        function_name, String::Handle(Z, String::New("#tearoff", Heap::kNew)),
-        Heap::kOld);
-  }
-
-  Fragment call_hook;
-  call_hook += Constant(closure);
-  call_hook += PushArgument();
-  call_hook += Constant(function_name);
-  call_hook += PushArgument();
-  call_hook += LoadLocal(entry_point_num);
-  call_hook += PushArgument();
-  call_hook += Constant(Function::ZoneHandle(Z, closure.function()));
-  call_hook += B->ClosureCall(TokenPosition::kNoSource,
-                              /*type_args_len=*/0, /*argument_count=*/3,
-                              /*argument_names=*/Array::ZoneHandle(Z));
-  call_hook += Drop();  // result of closure call
-  call_hook += Drop();  // entrypoint number
-  return call_hook;
-}
-
-FunctionEntryInstr* StreamingFlowGraphBuilder::BuildSharedUncheckedEntryPoint(
-    Fragment shared_prologue_linked_in,
-    Fragment skippable_checks,
-    Fragment redefinitions_if_skipped,
-    Fragment body) {
-  ASSERT(shared_prologue_linked_in.entry == B->graph_entry_->normal_entry());
-  ASSERT(parsed_function()->has_entry_points_temp_var());
-  Instruction* prologue_start = shared_prologue_linked_in.entry->next();
-
-  auto* join_entry = B->BuildJoinEntry();
-
-  Fragment normal_entry(shared_prologue_linked_in.entry);
-  normal_entry += IntConstant(UncheckedEntryPointStyle::kNone);
-  normal_entry += StoreLocal(TokenPosition::kNoSource,
-                             parsed_function()->entry_points_temp_var());
-  normal_entry += Drop();
-  normal_entry += Goto(join_entry);
-
-  auto* extra_target_entry = B->BuildFunctionEntry(B->graph_entry_);
-  Fragment extra_entry(extra_target_entry);
-  extra_entry += IntConstant(UncheckedEntryPointStyle::kSharedWithVariable);
-  extra_entry += StoreLocal(TokenPosition::kNoSource,
-                            parsed_function()->entry_points_temp_var());
-  extra_entry += Drop();
-  extra_entry += Goto(join_entry);
-
-  join_entry->LinkTo(prologue_start);
-
-  TargetEntryInstr *do_checks, *skip_checks;
-  shared_prologue_linked_in +=
-      LoadLocal(parsed_function()->entry_points_temp_var());
-  shared_prologue_linked_in += BuildEntryPointsIntrospection();
-  shared_prologue_linked_in +=
-      LoadLocal(parsed_function()->entry_points_temp_var());
-  shared_prologue_linked_in +=
-      IntConstant(UncheckedEntryPointStyle::kSharedWithVariable);
-  shared_prologue_linked_in +=
-      BranchIfEqual(&skip_checks, &do_checks, /*negate=*/false);
-
-  JoinEntryInstr* rest_entry = B->BuildJoinEntry();
-
-  Fragment(do_checks) + skippable_checks + Goto(rest_entry);
-  Fragment(skip_checks) + redefinitions_if_skipped + Goto(rest_entry);
-  Fragment(rest_entry) + body;
-
-  return extra_target_entry;
-}
-
-FunctionEntryInstr* StreamingFlowGraphBuilder::BuildSeparateUncheckedEntryPoint(
-    BlockEntryInstr* normal_entry,
-    Fragment normal_prologue,
-    Fragment extra_prologue,
-    Fragment shared_prologue,
-    Fragment body) {
-  auto* join_entry = BuildJoinEntry();
-  auto* extra_entry = B->BuildFunctionEntry(B->graph_entry_);
-
-  Fragment normal(normal_entry);
-  normal += IntConstant(UncheckedEntryPointStyle::kNone);
-  normal += BuildEntryPointsIntrospection();
-  normal += normal_prologue;
-  normal += Goto(join_entry);
-
-  Fragment extra(extra_entry);
-  extra += IntConstant(UncheckedEntryPointStyle::kSeparate);
-  extra += BuildEntryPointsIntrospection();
-  extra += extra_prologue;
-  extra += Goto(join_entry);
-
-  Fragment(join_entry) + shared_prologue + body;
-  return extra_entry;
-}
-
-StreamingFlowGraphBuilder::UncheckedEntryPointStyle
-StreamingFlowGraphBuilder::ChooseEntryPointStyle(
+UncheckedEntryPointStyle StreamingFlowGraphBuilder::ChooseEntryPointStyle(
     const Function& dart_function,
     const Fragment& implicit_type_checks,
     const Fragment& first_time_prologue,
@@ -1785,8 +764,13 @@
 
 FlowGraph* StreamingFlowGraphBuilder::BuildGraphOfFunction(
     bool is_constructor) {
+  const Function& dart_function = parsed_function()->function();
+
   // The prologue builder needs the default parameter values.
   SetupDefaultParameterValues();
+  // TypeArgumentsHandling / BuildDefaultTypeHandling needs
+  // default function type arguments.
+  ReadDefaultFunctionTypeArguments(dart_function);
 
   intptr_t type_parameters_offset = 0;
   LocalVariable* first_parameter = nullptr;
@@ -1807,8 +791,6 @@
     token_position = function_node_helper.position_;
   }
 
-  const Function& dart_function = parsed_function()->function();
-
   auto graph_entry = flow_graph_builder_->graph_entry_ =
       new (Z) GraphEntryInstr(*parsed_function(), flow_graph_builder_->osr_id_);
 
@@ -1832,8 +814,7 @@
   // TODO(#34162): We can remove the default type handling (and
   // shorten the prologue type handling sequence) for non-dynamic invocations of
   // regular methods.
-  const Fragment type_args_handling =
-      TypeArgumentsHandling(dart_function, type_parameters_offset);
+  const Fragment type_args_handling = TypeArgumentsHandling(dart_function);
 
   Fragment explicit_type_checks;
   Fragment implicit_type_checks;
@@ -1867,7 +848,7 @@
         const Fragment prologue_copy = BuildEveryTimePrologue(
             dart_function, token_position, type_parameters_offset);
 
-        extra_entry = BuildSeparateUncheckedEntryPoint(
+        extra_entry = B->BuildSeparateUncheckedEntryPoint(
             normal_entry,
             /*normal_prologue=*/every_time_prologue + implicit_type_checks,
             /*extra_prologue=*/prologue_copy,
@@ -1881,7 +862,7 @@
         prologue += first_time_prologue;
         prologue += type_args_handling;
         prologue += explicit_type_checks;
-        extra_entry = BuildSharedUncheckedEntryPoint(
+        extra_entry = B->BuildSharedUncheckedEntryPoint(
             /*shared_prologue_linked_in=*/prologue,
             /*skippable_checks=*/implicit_type_checks,
             /*redefinitions_if_skipped=*/implicit_redefinitions,
@@ -1890,7 +871,7 @@
       }
     }
     if (extra_entry != nullptr) {
-      RecordUncheckedEntryPoint(extra_entry);
+      B->RecordUncheckedEntryPoint(extra_entry);
     }
   } else {
     // If the function's body contains any yield points, build switch statement
@@ -1927,7 +908,6 @@
   ASSERT(flow_graph_builder_ != nullptr);
 
   const Function& function = parsed_function()->function();
-  const intptr_t kernel_offset = function.kernel_offset();
 
   // Setup a [ActiveClassScope] and a [ActiveMemberScope] which will be used
   // e.g. for type translation.
@@ -1940,66 +920,68 @@
   ActiveMemberScope active_member(active_class(), &outermost_function);
   ActiveTypeParametersScope active_type_params(active_class(), function, Z);
 
-  SetOffset(kernel_offset);
+  if (function.is_declared_in_bytecode()) {
+    if (!(FLAG_use_bytecode_compiler || FLAG_enable_interpreter)) {
+      FATAL1(
+          "Cannot run bytecode function %s: specify --enable-interpreter or "
+          "--use-bytecode-compiler",
+          function.ToFullyQualifiedCString());
+    }
 
+    bytecode_metadata_helper_.ParseBytecodeFunction(parsed_function());
+
+    switch (function.kind()) {
+      case RawFunction::kImplicitClosureFunction:
+        return B->BuildGraphOfImplicitClosureFunction(function);
+      case RawFunction::kImplicitGetter:
+      case RawFunction::kImplicitSetter:
+        return B->BuildGraphOfFieldAccessor(function);
+      case RawFunction::kImplicitStaticFinalGetter: {
+        if (IsStaticFieldGetterGeneratedAsInitializer(function, Z)) {
+          break;
+        }
+        return B->BuildGraphOfFieldAccessor(function);
+      }
+      case RawFunction::kDynamicInvocationForwarder:
+        return B->BuildGraphOfDynamicInvocationForwarder(function);
+      case RawFunction::kMethodExtractor:
+        return B->BuildGraphOfMethodExtractor(function);
+      default:
+        break;
+    }
+
+    ASSERT(function.HasBytecode());
+    BytecodeFlowGraphBuilder bytecode_compiler(
+        flow_graph_builder_, parsed_function(),
+        &(flow_graph_builder_->ic_data_array_));
+    return bytecode_compiler.BuildGraph();
+  }
+
+  // This is the legacy code path to handle bytecode attached to kernel AST
+  // members.
+  // TODO(alexmarkov): clean this up after dropping old format versions.
   if ((FLAG_use_bytecode_compiler || FLAG_enable_interpreter) &&
-      function.IsBytecodeAllowed(Z) && !function.is_native()) {
+      function.IsBytecodeAllowed(Z)) {
     if (!function.HasBytecode()) {
       bytecode_metadata_helper_.ReadMetadata(function);
     }
-    if (function.HasBytecode()) {
+    if (function.HasBytecode() &&
+        (function.kind() != RawFunction::kImplicitGetter) &&
+        (function.kind() != RawFunction::kImplicitSetter) &&
+        (function.kind() != RawFunction::kMethodExtractor)) {
       BytecodeFlowGraphBuilder bytecode_compiler(
           flow_graph_builder_, parsed_function(),
           &(flow_graph_builder_->ic_data_array_));
-      FlowGraph* flow_graph = bytecode_compiler.BuildGraph();
-      ASSERT(flow_graph != nullptr);
-      return flow_graph;
+      return bytecode_compiler.BuildGraph();
     }
   }
 
-  // Mark forwarding stubs.
+  ParseKernelASTFunction();
+
   switch (function.kind()) {
     case RawFunction::kRegularFunction:
-    case RawFunction::kImplicitClosureFunction:
     case RawFunction::kGetterFunction:
     case RawFunction::kSetterFunction:
-    case RawFunction::kClosureFunction:
-    case RawFunction::kConstructor:
-    case RawFunction::kDynamicInvocationForwarder:
-      if (PeekTag() == kProcedure) {
-        AlternativeReadingScope alt(&reader_);
-        ProcedureHelper procedure_helper(this);
-        procedure_helper.ReadUntilExcluding(ProcedureHelper::kFunction);
-        if (procedure_helper.IsForwardingStub() &&
-            !procedure_helper.IsAbstract()) {
-          ASSERT(procedure_helper.forwarding_stub_super_target_ != -1);
-          parsed_function()->MarkForwardingStub(
-              procedure_helper.forwarding_stub_super_target_);
-        }
-      }
-      break;
-    default:
-      break;
-  }
-
-  // The IR builder will create its own local variables and scopes, and it
-  // will not need an AST.  The code generator will assume that there is a
-  // local variable stack slot allocated for the current context and (I
-  // think) that the runtime will expect it to be at a fixed offset which
-  // requires allocating an unused expression temporary variable.
-  set_scopes(parsed_function()->EnsureKernelScopes());
-
-  switch (function.kind()) {
-    case RawFunction::kRegularFunction:
-    case RawFunction::kImplicitClosureFunction:
-    case RawFunction::kGetterFunction:
-    case RawFunction::kSetterFunction: {
-      ReadUntilFunctionNode();
-      if (function.IsImplicitClosureFunction()) {
-        return BuildGraphOfImplicitClosureFunction(function);
-      }
-    }
-    /* Falls through */
     case RawFunction::kClosureFunction: {
       ReadUntilFunctionNode();
       return BuildGraphOfFunction(false);
@@ -2011,32 +993,114 @@
     case RawFunction::kImplicitGetter:
     case RawFunction::kImplicitStaticFinalGetter:
     case RawFunction::kImplicitSetter: {
-      return IsFieldInitializer(function, Z)
-                 ? BuildGraphOfFieldInitializer()
-                 : BuildGraphOfFieldAccessor(scopes()->setter_value);
-    }
-    case RawFunction::kDynamicInvocationForwarder:
-      if (PeekTag() == kField) {
-        return BuildGraphOfFieldAccessor(scopes()->setter_value);
-      } else {
-        ReadUntilFunctionNode();
-        return BuildGraphOfDynamicInvocationForwarder();
+      const Field& field = Field::Handle(Z, function.accessor_field());
+      if (field.is_const() && field.IsUninitialized()) {
+        EvaluateConstFieldValue(field);
       }
+      return B->BuildGraphOfFieldAccessor(function);
+    }
+    case RawFunction::kStaticFieldInitializer:
+      return BuildGraphOfFieldInitializer();
+    case RawFunction::kDynamicInvocationForwarder:
+      return B->BuildGraphOfDynamicInvocationForwarder(function);
     case RawFunction::kMethodExtractor:
       return flow_graph_builder_->BuildGraphOfMethodExtractor(function);
     case RawFunction::kNoSuchMethodDispatcher:
       return flow_graph_builder_->BuildGraphOfNoSuchMethodDispatcher(function);
     case RawFunction::kInvokeFieldDispatcher:
       return flow_graph_builder_->BuildGraphOfInvokeFieldDispatcher(function);
+    case RawFunction::kImplicitClosureFunction:
+      return flow_graph_builder_->BuildGraphOfImplicitClosureFunction(function);
+    case RawFunction::kFfiTrampoline:
+      return flow_graph_builder_->BuildGraphOfFfiTrampoline(function);
     case RawFunction::kSignatureFunction:
     case RawFunction::kIrregexpFunction:
-    case RawFunction::kFfiTrampoline:
       break;
   }
   UNREACHABLE();
   return NULL;
 }
 
+void StreamingFlowGraphBuilder::ParseKernelASTFunction() {
+  const Function& function = parsed_function()->function();
+
+  const intptr_t kernel_offset = function.kernel_offset();
+  ASSERT(kernel_offset >= 0);
+
+  SetOffset(kernel_offset);
+
+  // Mark forwarding stubs.
+  switch (function.kind()) {
+    case RawFunction::kRegularFunction:
+    case RawFunction::kImplicitClosureFunction:
+    case RawFunction::kGetterFunction:
+    case RawFunction::kSetterFunction:
+    case RawFunction::kClosureFunction:
+    case RawFunction::kConstructor:
+    case RawFunction::kDynamicInvocationForwarder:
+      ReadForwardingStubTarget(function);
+      break;
+    default:
+      break;
+  }
+
+  set_scopes(parsed_function()->EnsureKernelScopes());
+
+  switch (function.kind()) {
+    case RawFunction::kRegularFunction:
+    case RawFunction::kGetterFunction:
+    case RawFunction::kSetterFunction:
+    case RawFunction::kClosureFunction:
+    case RawFunction::kConstructor:
+    case RawFunction::kImplicitGetter:
+    case RawFunction::kImplicitStaticFinalGetter:
+    case RawFunction::kImplicitSetter:
+    case RawFunction::kStaticFieldInitializer:
+    case RawFunction::kMethodExtractor:
+    case RawFunction::kNoSuchMethodDispatcher:
+    case RawFunction::kInvokeFieldDispatcher:
+    case RawFunction::kFfiTrampoline:
+      break;
+    case RawFunction::kImplicitClosureFunction:
+      ReadUntilFunctionNode();
+      SetupDefaultParameterValues();
+      ReadDefaultFunctionTypeArguments(function);
+      break;
+    case RawFunction::kDynamicInvocationForwarder:
+      if (PeekTag() != kField) {
+        ReadUntilFunctionNode();
+        SetupDefaultParameterValues();
+        ReadDefaultFunctionTypeArguments(function);
+      }
+      break;
+    case RawFunction::kSignatureFunction:
+    case RawFunction::kIrregexpFunction:
+      UNREACHABLE();
+      break;
+  }
+}
+
+void StreamingFlowGraphBuilder::ReadForwardingStubTarget(
+    const Function& function) {
+  if (PeekTag() == kProcedure) {
+    AlternativeReadingScope alt(&reader_);
+    ProcedureHelper procedure_helper(this);
+    procedure_helper.ReadUntilExcluding(ProcedureHelper::kFunction);
+    if (procedure_helper.IsForwardingStub() && !procedure_helper.IsAbstract()) {
+      const NameIndex target_name =
+          procedure_helper.forwarding_stub_super_target_;
+      ASSERT(target_name != NameIndex::kInvalidName);
+      const String& name = function.IsSetterFunction()
+                               ? H.DartSetterName(target_name)
+                               : H.DartProcedureName(target_name);
+      const Function* forwarding_target =
+          &Function::ZoneHandle(Z, H.LookupMethodByMember(target_name, name));
+      ASSERT(!forwarding_target->IsNull());
+      parsed_function()->MarkForwardingStub(forwarding_target);
+    }
+  }
+}
+
 Fragment StreamingFlowGraphBuilder::BuildStatementAt(intptr_t kernel_offset) {
   SetOffset(kernel_offset);
   return BuildStatement();  // read statement.
@@ -2094,6 +1158,14 @@
       return BuildConditionalExpression(position);
     case kStringConcatenation:
       return BuildStringConcatenation(position);
+    case kListConcatenation:
+    case kSetConcatenation:
+    case kMapConcatenation:
+    case kInstanceCreation:
+      // Collection concatenation and instance creation operations are removed
+      // by the constant evaluator.
+      UNREACHABLE();
+      break;
     case kIsExpression:
       return BuildIsExpression(position);
     case kAsExpression:
@@ -2126,6 +1198,8 @@
       return BuildFunctionExpression();
     case kLet:
       return BuildLet(position);
+    case kBlockExpression:
+      return BuildBlockExpression();
     case kBigIntLiteral:
       return BuildBigIntLiteral(position);
     case kStringLiteral:
@@ -2145,7 +1219,9 @@
     case kNullLiteral:
       return BuildNullLiteral(position);
     case kConstantExpression:
-      return BuildConstantExpression(position);
+      return BuildConstantExpression(position, tag);
+    case kDeprecated_ConstantExpression:
+      return BuildConstantExpression(position, tag);
     case kInstantiation:
       return BuildPartialTearoffInstantiation(position);
     case kLoadLibrary:
@@ -2268,6 +1344,18 @@
   --flow_graph_builder_->try_depth_;
 }
 
+intptr_t StreamingFlowGraphBuilder::block_expression_depth() {
+  return flow_graph_builder_->block_expression_depth_;
+}
+
+void StreamingFlowGraphBuilder::block_expression_depth_inc() {
+  ++flow_graph_builder_->block_expression_depth_;
+}
+
+void StreamingFlowGraphBuilder::block_expression_depth_dec() {
+  --flow_graph_builder_->block_expression_depth_;
+}
+
 intptr_t StreamingFlowGraphBuilder::CurrentTryIndex() {
   return flow_graph_builder_->CurrentTryIndex();
 }
@@ -2530,9 +1618,10 @@
       type_arguments);
 }
 
-Fragment StreamingFlowGraphBuilder::StrictCompare(Token::Kind kind,
+Fragment StreamingFlowGraphBuilder::StrictCompare(TokenPosition position,
+                                                  Token::Kind kind,
                                                   bool number_check) {
-  return flow_graph_builder_->StrictCompare(kind, number_check);
+  return flow_graph_builder_->StrictCompare(position, kind, number_check);
 }
 
 Fragment StreamingFlowGraphBuilder::AllocateObject(TokenPosition position,
@@ -2541,12 +1630,6 @@
   return flow_graph_builder_->AllocateObject(position, klass, argument_count);
 }
 
-Fragment StreamingFlowGraphBuilder::AllocateObject(
-    const Class& klass,
-    const Function& closure_function) {
-  return flow_graph_builder_->AllocateObject(klass, closure_function);
-}
-
 Fragment StreamingFlowGraphBuilder::AllocateContext(
     const GrowableArray<LocalVariable*>& context_variables) {
   return flow_graph_builder_->AllocateContext(context_variables);
@@ -2601,7 +1684,8 @@
 
 Fragment StreamingFlowGraphBuilder::CheckStackOverflow(TokenPosition position) {
   return flow_graph_builder_->CheckStackOverflow(
-      position, flow_graph_builder_->loop_depth_);
+      position, flow_graph_builder_->GetStackDepth(),
+      flow_graph_builder_->loop_depth_);
 }
 
 Fragment StreamingFlowGraphBuilder::CloneContext(
@@ -2616,18 +1700,22 @@
   // Save the current position and restore it afterwards.
   AlternativeReadingScope alt(&reader_);
 
-  TryFinallyBlock* const saved_block = B->try_finally_block_;
+  // Save context.
+  TryFinallyBlock* const saved_finally_block = B->try_finally_block_;
   TryCatchBlock* const saved_try_catch_block = B->CurrentTryCatchBlock();
-  const intptr_t saved_depth = B->context_depth_;
-  const intptr_t saved_try_depth = B->try_depth_;
+  const intptr_t saved_context_depth = B->context_depth_;
+  const ProgramState state(B->breakable_block_, B->switch_block_,
+                           B->loop_depth_, B->for_in_depth_, B->try_depth_,
+                           B->catch_depth_, B->block_expression_depth_);
 
   Fragment instructions;
 
   // While translating the body of a finalizer we need to set the try-finally
   // block which is active when translating the body.
   while (B->try_finally_block_ != outer_finally) {
-    // Set correct try depth (in case there are nested try statements).
-    B->try_depth_ = B->try_finally_block_->try_depth();
+    ASSERT(B->try_finally_block_ != nullptr);
+    // Adjust program context to finalizer's position.
+    B->try_finally_block_->state().assignTo(B);
 
     // Potentially restore the context to what is expected for the finally
     // block.
@@ -2664,10 +1752,11 @@
     instructions += B->AdjustContextTo(target_context_depth);
   }
 
-  B->try_finally_block_ = saved_block;
+  // Restore.
+  B->try_finally_block_ = saved_finally_block;
   B->SetCurrentTryCatchBlock(saved_try_catch_block);
-  B->context_depth_ = saved_depth;
-  B->try_depth_ = saved_try_depth;
+  B->context_depth_ = saved_context_depth;
+  state.assignTo(B);
 
   return instructions;
 }
@@ -3154,12 +2243,12 @@
   // Populate array containing the actual arguments. Just add [this] here.
   instructions += LoadLocal(actuals_array);                      // array
   instructions += IntConstant(num_type_arguments == 0 ? 0 : 1);  // index
-  instructions += LoadLocal(scopes()->this_variable);            // receiver
+  instructions += LoadLocal(parsed_function()->receiver_var());  // receiver
   instructions += StoreIndexed(kArrayCid);
   instructions += build_rest_of_actuals;
 
   // First argument is receiver.
-  instructions += LoadLocal(scopes()->this_variable);
+  instructions += LoadLocal(parsed_function()->receiver_var());
   instructions += PushArgument();
 
   // Push the arguments for allocating the invocation mirror:
@@ -3259,7 +2348,7 @@
     ASSERT(!klass.IsNull());
     ASSERT(!function.IsNull());
 
-    instructions += LoadLocal(scopes()->this_variable);
+    instructions += LoadLocal(parsed_function()->receiver_var());
     instructions += PushArgument();
 
     instructions +=
@@ -3316,7 +2405,7 @@
     instructions += Drop();  // Drop array
   } else {
     // receiver
-    instructions += LoadLocal(scopes()->this_variable);
+    instructions += LoadLocal(parsed_function()->receiver_var());
     instructions += PushArgument();
 
     instructions += BuildExpression();  // read value.
@@ -3527,7 +2616,6 @@
 
   bool is_unchecked_closure_call = false;
   bool is_unchecked_call = result_type.IsSkipCheck();
-#ifndef TARGET_ARCH_DBC
   if (call_site_attributes.receiver_type != nullptr) {
     if (call_site_attributes.receiver_type->IsFunctionType()) {
       AlternativeReadingScope alt(&reader_);
@@ -3540,7 +2628,6 @@
       is_unchecked_call = true;
     }
   }
-#endif
 
   Fragment instructions;
 
@@ -3594,7 +2681,7 @@
     Token::Kind strict_cmp_kind =
         token_kind == Token::kEQ ? Token::kEQ_STRICT : Token::kNE_STRICT;
     return instructions +
-           StrictCompare(strict_cmp_kind, /*number_check = */ true);
+           StrictCompare(position, strict_cmp_kind, /*number_check = */ true);
   }
 
   LocalVariable* receiver_temp = NULL;
@@ -3768,7 +2855,7 @@
     Token::Kind strict_cmp_kind =
         token_kind == Token::kEQ ? Token::kEQ_STRICT : Token::kNE_STRICT;
     return instructions +
-           StrictCompare(strict_cmp_kind, /*number_check = */ true);
+           StrictCompare(position, strict_cmp_kind, /*number_check = */ true);
   }
 
   instructions += PushArgument();  // push receiver as argument.
@@ -3912,7 +2999,7 @@
     }
 
     // receiver
-    instructions += LoadLocal(scopes()->this_variable);
+    instructions += LoadLocal(parsed_function()->receiver_var());
     instructions += PushArgument();
 
     Array& argument_names = Array::ZoneHandle(Z);
@@ -4029,11 +3116,14 @@
                                   NULL));
 
   // Special case identical(x, y) call.
+  // Note: similar optimization is performed in bytecode flow graph builder -
+  // see BytecodeFlowGraphBuilder::BuildDirectCall().
   // TODO(27590) consider moving this into the inliner and force inline it
   // there.
   if (special_case_identical) {
     ASSERT(argument_count == 2);
-    instructions += StrictCompare(Token::kEQ_STRICT, /*number_check=*/true);
+    instructions +=
+        StrictCompare(position, Token::kEQ_STRICT, /*number_check=*/true);
   } else if (special_case_unchecked_cast) {
     // Simply do nothing: the result value is already pushed on the stack.
   } else {
@@ -4417,7 +3507,7 @@
     TokenPosition* position) {
   if (position != NULL) *position = TokenPosition::kNoSource;
 
-  return LoadLocal(scopes()->this_variable);
+  return LoadLocal(parsed_function()->receiver_var());
 }
 
 Fragment StreamingFlowGraphBuilder::BuildRethrow(TokenPosition* p) {
@@ -4577,6 +3667,24 @@
   return instructions;
 }
 
+Fragment StreamingFlowGraphBuilder::BuildBlockExpression() {
+  block_expression_depth_inc();
+  const intptr_t offset = ReaderOffset() - 1;  // Include the tag.
+
+  Fragment instructions;
+
+  instructions += EnterScope(offset);
+  const intptr_t list_length = ReadListLength();  // read number of statements.
+  for (intptr_t i = 0; i < list_length; ++i) {
+    instructions += BuildStatement();  // read ith statement.
+  }
+  instructions += BuildExpression();  // read expression (inside scope).
+  instructions += ExitScope(offset);
+
+  block_expression_depth_dec();
+  return instructions;
+}
+
 Fragment StreamingFlowGraphBuilder::BuildBigIntLiteral(
     TokenPosition* position) {
   if (position != NULL) *position = TokenPosition::kNoSource;
@@ -4658,8 +3766,14 @@
 }
 
 Fragment StreamingFlowGraphBuilder::BuildConstantExpression(
-    TokenPosition* position) {
-  if (position != NULL) *position = TokenPosition::kNoSource;
+    TokenPosition* position,
+    Tag tag) {
+  TokenPosition p = TokenPosition::kNoSource;
+  if (tag == kConstantExpression) {
+    p = ReadPosition();
+    SkipDartType();
+  }
+  if (position != nullptr) *position = p;
   const intptr_t constant_offset = ReadUInt();
   KernelConstantsMap constant_map(H.constants().raw());
   Fragment result =
@@ -4913,8 +4027,9 @@
 }
 
 Fragment StreamingFlowGraphBuilder::BuildWhileStatement() {
+  ASSERT(block_expression_depth() == 0);  // no while in block-expr
   loop_depth_inc();
-  const TokenPosition position = ReadPosition();  // read position.
+  const TokenPosition position = ReadPosition();            // read position.
   TestFragment condition = TranslateConditionForControl();  // read condition.
   const Fragment body = BuildStatement();                   // read body
 
@@ -4927,6 +4042,7 @@
     body_entry += Goto(join);
 
     Fragment loop(join);
+    ASSERT(B->GetStackDepth() == 0);
     loop += CheckStackOverflow(position);
     loop.current->LinkTo(condition.entry);
 
@@ -4940,6 +4056,7 @@
 }
 
 Fragment StreamingFlowGraphBuilder::BuildDoStatement() {
+  ASSERT(block_expression_depth() == 0);  // no do-while in block-expr
   loop_depth_inc();
   const TokenPosition position = ReadPosition();  // read position.
   Fragment body = BuildStatement();               // read body.
@@ -4954,6 +4071,7 @@
 
   JoinEntryInstr* join = BuildJoinEntry();
   Fragment loop(join);
+  ASSERT(B->GetStackDepth() == 0);
   loop += CheckStackOverflow(position);
   loop += body;
   loop <<= condition.entry;
@@ -5022,7 +4140,7 @@
     body += Goto(join);
 
     Fragment loop(join);
-    loop += CheckStackOverflow(position);
+    loop += CheckStackOverflow(position);  // may have non-empty stack
     if (condition.entry != nullptr) {
       loop <<= condition.entry;
     } else {
@@ -5049,7 +4167,7 @@
   intptr_t offset = ReaderOffset() - 1;  // Include the tag.
 
   const TokenPosition position = ReadPosition();  // read position.
-  TokenPosition body_position = ReadPosition();  // read body position.
+  TokenPosition body_position = ReadPosition();   // read body position.
   intptr_t variable_kernel_position = ReaderOffset() + data_program_offset_;
   SkipVariableDeclaration();  // read variable.
 
@@ -5095,7 +4213,7 @@
     body += Goto(join);
 
     Fragment loop(join);
-    loop += CheckStackOverflow(position);
+    loop += CheckStackOverflow(position);  // may have non-empty stack
     loop += condition;
   } else {
     instructions += condition;
@@ -5338,7 +4456,7 @@
 }
 
 Fragment StreamingFlowGraphBuilder::BuildIfStatement() {
-  ReadPosition();                                       // read position.
+  ReadPosition();  // read position.
 
   TestFragment condition = TranslateConditionForControl();
 
@@ -5400,6 +4518,7 @@
 }
 
 Fragment StreamingFlowGraphBuilder::BuildTryCatch() {
+  ASSERT(block_expression_depth() == 0);  // no try-catch in block-expr
   InlineBailout("kernel::FlowgraphBuilder::VisitTryCatch");
 
   intptr_t try_handler_index = AllocateTryIndex();
@@ -5529,6 +4648,7 @@
 }
 
 Fragment StreamingFlowGraphBuilder::BuildTryFinally() {
+  ASSERT(block_expression_depth() == 0);  // no try-finally in block-expr
   // Note on streaming:
   // We only stream this TryFinally if we can stream everything inside it,
   // so creating a "TryFinallyBlock" with a kernel binary offset instead of an
@@ -5540,7 +4660,7 @@
   //
   //  a) 1/2/3th case: Special control flow going out of `node->body()`:
   //
-  //   * [BreakStatement] transfers control to a [LabledStatement]
+  //   * [BreakStatement] transfers control to a [LabeledStatement]
   //   * [ContinueSwitchStatement] transfers control to a [SwitchCase]
   //   * [ReturnStatement] returns a value
   //
@@ -5664,9 +4784,8 @@
     //     ...
     //   }
     //
-    LocalScope* scope = parsed_function()->node_sequence()->scope();
-    LocalVariable* exception_var = scope->VariableAt(2);
-    LocalVariable* stack_trace_var = scope->VariableAt(3);
+    LocalVariable* exception_var = parsed_function()->ParameterVariable(2);
+    LocalVariable* stack_trace_var = parsed_function()->ParameterVariable(3);
     ASSERT(exception_var->name().raw() == Symbols::ExceptionParameter().raw());
     ASSERT(stack_trace_var->name().raw() ==
            Symbols::StackTraceParameter().raw());
@@ -5836,11 +4955,8 @@
 
   function_node_helper.ReadUntilExcluding(FunctionNodeHelper::kEnd);
 
-  const Class& closure_class =
-      Class::ZoneHandle(Z, I->object_store()->closure_class());
-  ASSERT(!closure_class.IsNull());
   Fragment instructions =
-      flow_graph_builder_->AllocateObject(closure_class, function);
+      flow_graph_builder_->AllocateClosure(TokenPosition::kNoSource, function);
   LocalVariable* closure = MakeTemporary();
 
   // The function signature can have uninstantiated class type parameters.
diff --git a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.h b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.h
index 01b6693..edf29ea 100644
--- a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.h
+++ b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.h
@@ -56,51 +56,20 @@
  private:
   Thread* thread() const { return flow_graph_builder_->thread_; }
 
-  FlowGraph* BuildGraphOfFieldInitializer();
-  FlowGraph* BuildGraphOfFieldAccessor(LocalVariable* setter_value);
+  void ParseKernelASTFunction();
+  void ReadForwardingStubTarget(const Function& function);
+  void EvaluateConstFieldValue(const Field& field);
   void SetupDefaultParameterValues();
+  void ReadDefaultFunctionTypeArguments(const Function& function);
+
+  FlowGraph* BuildGraphOfFieldInitializer();
   Fragment BuildFieldInitializer(NameIndex canonical_name);
   Fragment BuildInitializers(const Class& parent_class);
-  FlowGraph* BuildGraphOfImplicitClosureFunction(const Function& function);
   FlowGraph* BuildGraphOfFunction(bool constructor);
-  FlowGraph* BuildGraphOfDynamicInvocationForwarder();
-  FlowGraph* BuildGraphOfNoSuchMethodForwarder(
-      const Function& function,
-      bool is_implicit_closure_function,
-      bool throw_no_such_method_error = false);
 
   Fragment BuildExpression(TokenPosition* position = NULL);
   Fragment BuildStatement();
 
-  // Indicates which form of the unchecked entrypoint we are compiling.
-  //
-  // kNone:
-  //
-  //   There is no unchecked entrypoint: the unchecked entry is set to NULL in
-  //   the 'GraphEntryInstr'.
-  //
-  // kSeparate:
-  //
-  //   The normal and unchecked entrypoint each point to their own versions of
-  //   the prologue, containing exactly those checks which need to be performed
-  //   on either side. Both sides jump directly to the body after performing
-  //   their prologue.
-  //
-  // kSharedWithVariable:
-  //
-  //   A temporary variable is allocated and initialized to 0 on normal entry
-  //   and 2 on unchecked entry. Code which should be ommitted on the unchecked
-  //   entrypoint is made conditional on this variable being equal to 0.
-  //
-  struct UncheckedEntryPointStyle_ {
-    enum Style {
-      kNone = 0,
-      kSeparate = 1,
-      kSharedWithVariable = 2,
-    };
-  };
-  typedef UncheckedEntryPointStyle_::Style UncheckedEntryPointStyle;
-
   // Kernel offset:
   //   start of function expression -> end of function body statement
   Fragment BuildFunctionBody(const Function& dart_function,
@@ -121,27 +90,13 @@
   Fragment SetupCapturedParameters(const Function& dart_function);
   Fragment ShortcutForUserDefinedEquals(const Function& dart_function,
                                         LocalVariable* first_parameter);
-  Fragment TypeArgumentsHandling(const Function& dart_function,
-                                 intptr_t type_parameters_offset);
+  Fragment TypeArgumentsHandling(const Function& dart_function);
   void CheckArgumentTypesAsNecessary(const Function& dart_function,
                                      intptr_t type_parameters_offset,
                                      Fragment* explicit_checks,
                                      Fragment* implicit_checks,
                                      Fragment* implicit_redefinitions);
   Fragment CompleteBodyWithYieldContinuations(Fragment body);
-  FunctionEntryInstr* BuildSeparateUncheckedEntryPoint(
-      BlockEntryInstr* normal_entry,
-      Fragment normal_prologue,
-      Fragment extra_prologue,
-      Fragment shared_prologue,
-      Fragment body);
-  FunctionEntryInstr* BuildSharedUncheckedEntryPoint(
-      Fragment prologue_from_normal_entry,
-      Fragment skippable_checks,
-      Fragment redefinitions_if_skipped,
-      Fragment body);
-
-  Fragment BuildEntryPointsIntrospection();
 
   static UncheckedEntryPointStyle ChooseEntryPointStyle(
       const Function& dart_function,
@@ -150,8 +105,6 @@
       const Fragment& every_time_prologue,
       const Fragment& type_args_handling);
 
-  void RecordUncheckedEntryPoint(FunctionEntryInstr* extra_entry);
-
   void loop_depth_inc();
   void loop_depth_dec();
   intptr_t for_in_depth();
@@ -161,6 +114,9 @@
   void catch_depth_dec();
   void try_depth_inc();
   void try_depth_dec();
+  intptr_t block_expression_depth();
+  void block_expression_depth_inc();
+  void block_expression_depth_dec();
   intptr_t CurrentTryIndex();
   intptr_t AllocateTryIndex();
   LocalVariable* CurrentException();
@@ -242,33 +198,13 @@
       bool use_unchecked_entry = false,
       const CallSiteAttributesMetadata* call_site_attrs = nullptr);
 
-  enum TypeChecksToBuild {
-    kCheckAllTypeParameterBounds,
-    kCheckNonCovariantTypeParameterBounds,
-    kCheckCovariantTypeParameterBounds,
-  };
-
-  // Does not move the cursor.
-  Fragment BuildDefaultTypeHandling(const Function& function,
-                                    intptr_t type_parameters_offset);
-
-  struct PushedArguments {
-    intptr_t type_args_len;
-    intptr_t argument_count;
-    Array& argument_names;
-  };
-  Fragment PushAllArguments(PushedArguments* pushed);
-
-  void BuildArgumentTypeChecks(TypeChecksToBuild mode,
-                               Fragment* explicit_checks,
-                               Fragment* implicit_checks,
-                               Fragment* implicit_redefinitions);
-
   Fragment ThrowException(TokenPosition position);
   Fragment BooleanNegate();
   Fragment TranslateInstantiatedTypeArguments(
       const TypeArguments& type_arguments);
-  Fragment StrictCompare(Token::Kind kind, bool number_check = false);
+  Fragment StrictCompare(TokenPosition position,
+                         Token::Kind kind,
+                         bool number_check = false);
   Fragment AllocateObject(TokenPosition position,
                           const Class& klass,
                           intptr_t argument_count);
@@ -378,6 +314,7 @@
   Fragment BuildMapLiteral(bool is_const, TokenPosition* position);
   Fragment BuildFunctionExpression();
   Fragment BuildLet(TokenPosition* position);
+  Fragment BuildBlockExpression();
   Fragment BuildBigIntLiteral(TokenPosition* position);
   Fragment BuildStringLiteral(TokenPosition* position);
   Fragment BuildIntLiteral(uint8_t payload, TokenPosition* position);
@@ -386,7 +323,7 @@
   Fragment BuildBoolLiteral(bool value, TokenPosition* position);
   Fragment BuildNullLiteral(TokenPosition* position);
   Fragment BuildFutureNullValue(TokenPosition* position);
-  Fragment BuildConstantExpression(TokenPosition* position);
+  Fragment BuildConstantExpression(TokenPosition* position, Tag tag);
   Fragment BuildPartialTearoffInstantiation(TokenPosition* position);
 
   Fragment BuildExpressionStatement();
diff --git a/runtime/vm/compiler/frontend/kernel_fingerprints.cc b/runtime/vm/compiler/frontend/kernel_fingerprints.cc
index 03a4e59..848365d 100644
--- a/runtime/vm/compiler/frontend/kernel_fingerprints.cc
+++ b/runtime/vm/compiler/frontend/kernel_fingerprints.cc
@@ -447,6 +447,14 @@
       ReadPosition();                           // read position.
       CalculateListOfExpressionsFingerprint();  // read list of expressions.
       return;
+    case kListConcatenation:
+    case kSetConcatenation:
+    case kMapConcatenation:
+    case kInstanceCreation:
+      // Collection concatenation and instance creation operations are removed
+      // by the constant evaluator.
+      UNREACHABLE();
+      break;
     case kIsExpression:
       ReadPosition();                    // read position.
       CalculateExpressionFingerprint();  // read operand.
@@ -505,6 +513,10 @@
       CalculateVariableDeclarationFingerprint();  // read variable declaration.
       CalculateExpressionFingerprint();           // read expression.
       return;
+    case kBlockExpression:
+      CalculateStatementListFingerprint();
+      CalculateExpressionFingerprint();  // read expression.
+      return;
     case kInstantiation:
       CalculateExpressionFingerprint();       // read expression.
       CalculateListOfDartTypesFingerprint();  // read type arguments.
@@ -537,6 +549,11 @@
     case kNullLiteral:
       return;
     case kConstantExpression:
+      ReadPosition();
+      SkipDartType();
+      SkipConstantReference();
+      return;
+    case kDeprecated_ConstantExpression:
       SkipConstantReference();
       return;
     case kLoadLibrary:
diff --git a/runtime/vm/compiler/frontend/kernel_to_il.cc b/runtime/vm/compiler/frontend/kernel_to_il.cc
index dcc617c..ba7ab1b 100644
--- a/runtime/vm/compiler/frontend/kernel_to_il.cc
+++ b/runtime/vm/compiler/frontend/kernel_to_il.cc
@@ -2,11 +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.
 
-#include "vm/compiler/aot/precompiler.h"
 #include "vm/compiler/frontend/kernel_to_il.h"
+#include "vm/compiler/aot/precompiler.h"
+#include "vm/compiler/backend/locations.h"
 
 #include "vm/compiler/backend/il.h"
 #include "vm/compiler/backend/il_printer.h"
+#include "vm/compiler/ffi.h"
 #include "vm/compiler/frontend/kernel_binary_flowgraph.h"
 #include "vm/compiler/frontend/kernel_translation_helper.h"
 #include "vm/compiler/frontend/prologue_builder.h"
@@ -54,6 +56,7 @@
       try_depth_(0),
       catch_depth_(0),
       for_in_depth_(0),
+      block_expression_depth_(0),
       graph_entry_(NULL),
       scopes_(NULL),
       breakable_block_(NULL),
@@ -127,7 +130,7 @@
 Fragment FlowGraphBuilder::LoadInstantiatorTypeArguments() {
   // TODO(27590): We could use `active_class_->IsGeneric()`.
   Fragment instructions;
-  if (scopes_->type_arguments_variable != NULL) {
+  if (scopes_ != nullptr && scopes_->type_arguments_variable != nullptr) {
 #ifdef DEBUG
     Function& function =
         Function::Handle(Z, parsed_function_->function().raw());
@@ -137,10 +140,10 @@
     ASSERT(function.IsFactory());
 #endif
     instructions += LoadLocal(scopes_->type_arguments_variable);
-  } else if (scopes_->this_variable != NULL &&
+  } else if (parsed_function_->has_receiver_var() &&
              active_class_.ClassNumTypeArguments() > 0) {
     ASSERT(!parsed_function_->function().IsFactory());
-    instructions += LoadLocal(scopes_->this_variable);
+    instructions += LoadLocal(parsed_function_->receiver_var());
     instructions += LoadNativeField(
         Slot::GetTypeArgumentsSlotFor(thread_, *active_class_.klass));
   } else {
@@ -221,16 +224,6 @@
   return Fragment(allocate);
 }
 
-Fragment FlowGraphBuilder::AllocateObject(const Class& klass,
-                                          const Function& closure_function) {
-  ArgumentArray arguments = new (Z) ZoneGrowableArray<PushArgumentInstr*>(Z, 0);
-  AllocateObjectInstr* allocate =
-      new (Z) AllocateObjectInstr(TokenPosition::kNoSource, klass, arguments);
-  allocate->set_closure_function(closure_function);
-  Push(allocate);
-  return Fragment(allocate);
-}
-
 Fragment FlowGraphBuilder::CatchBlockEntry(const Array& handler_types,
                                            intptr_t handler_index,
                                            bool needs_stacktrace,
@@ -258,9 +251,8 @@
   LocalVariable* context_variable = parsed_function_->current_context_var();
   if (should_restore_closure_context) {
     ASSERT(parsed_function_->function().IsClosureFunction());
-    LocalScope* scope = parsed_function_->node_sequence()->scope();
 
-    LocalVariable* closure_parameter = scope->VariableAt(0);
+    LocalVariable* closure_parameter = parsed_function_->ParameterVariable(0);
     ASSERT(!closure_parameter->is_captured());
     instructions += LoadLocal(closure_parameter);
     instructions += LoadNativeField(Slot::Closure_context());
@@ -319,13 +311,8 @@
 
 Fragment FlowGraphBuilder::CheckStackOverflowInPrologue(
     TokenPosition position) {
-  if (IsInlining()) {
-    // If we are inlining don't actually attach the stack check.  We must still
-    // create the stack check in order to allocate a deopt id.
-    CheckStackOverflow(position, loop_depth_);
-    return Fragment();
-  }
-  return CheckStackOverflow(position, loop_depth_);
+  ASSERT(loop_depth_ == 0);
+  return BaseFlowGraphBuilder::CheckStackOverflowInPrologue(position);
 }
 
 Fragment FlowGraphBuilder::CloneContext(
@@ -370,7 +357,12 @@
   }
   if (call_site_attrs != nullptr && call_site_attrs->receiver_type != nullptr &&
       call_site_attrs->receiver_type->IsInstantiated()) {
-    call->set_static_receiver_type(call_site_attrs->receiver_type);
+    call->set_receivers_static_type(call_site_attrs->receiver_type);
+  } else if (!interface_target.IsNull()) {
+    const Class& owner = Class::Handle(Z, interface_target.Owner());
+    const AbstractType& type =
+        AbstractType::ZoneHandle(Z, owner.DeclarationType());
+    call->set_receivers_static_type(&type);
   }
   Push(call);
   return Fragment(call);
@@ -393,6 +385,25 @@
   return Fragment(call);
 }
 
+Fragment FlowGraphBuilder::FfiCall(
+    const Function& signature,
+    const ZoneGrowableArray<Representation>& arg_reps,
+    const ZoneGrowableArray<Location>& arg_locs) {
+  Fragment body;
+
+  FfiCallInstr* call =
+      new (Z) FfiCallInstr(Z, GetNextDeoptId(), signature, arg_reps, arg_locs);
+
+  for (intptr_t i = call->InputCount() - 1; i >= 0; --i) {
+    call->SetInputAt(i, Pop());
+  }
+
+  Push(call);
+  body <<= call;
+
+  return body;
+}
+
 Fragment FlowGraphBuilder::RethrowException(TokenPosition position,
                                             int catch_try_index) {
   Fragment instructions;
@@ -410,12 +421,6 @@
   return instructions;
 }
 
-Fragment FlowGraphBuilder::LoadClassId() {
-  LoadClassIdInstr* load = new (Z) LoadClassIdInstr(Pop());
-  Push(load);
-  return Fragment(load);
-}
-
 Fragment FlowGraphBuilder::LoadLocal(LocalVariable* variable) {
   if (variable->is_captured()) {
     Fragment instructions;
@@ -733,14 +738,76 @@
   const MethodRecognizer::Kind kind = MethodRecognizer::RecognizeKind(function);
   bool omit_result_type_check = true;
   switch (kind) {
+// On simdbc we fall back to natives.
+#if !defined(TARGET_ARCH_DBC)
+    case MethodRecognizer::kTypedData_ByteDataView_factory:
+      body += BuildTypedDataViewFactoryConstructor(function, kByteDataViewCid);
+      break;
+    case MethodRecognizer::kTypedData_Int8ArrayView_factory:
+      body += BuildTypedDataViewFactoryConstructor(function,
+                                                   kTypedDataInt8ArrayViewCid);
+      break;
+    case MethodRecognizer::kTypedData_Uint8ArrayView_factory:
+      body += BuildTypedDataViewFactoryConstructor(function,
+                                                   kTypedDataUint8ArrayViewCid);
+      break;
+    case MethodRecognizer::kTypedData_Uint8ClampedArrayView_factory:
+      body += BuildTypedDataViewFactoryConstructor(
+          function, kTypedDataUint8ClampedArrayViewCid);
+      break;
+    case MethodRecognizer::kTypedData_Int16ArrayView_factory:
+      body += BuildTypedDataViewFactoryConstructor(function,
+                                                   kTypedDataInt16ArrayViewCid);
+      break;
+    case MethodRecognizer::kTypedData_Uint16ArrayView_factory:
+      body += BuildTypedDataViewFactoryConstructor(
+          function, kTypedDataUint16ArrayViewCid);
+      break;
+    case MethodRecognizer::kTypedData_Int32ArrayView_factory:
+      body += BuildTypedDataViewFactoryConstructor(function,
+                                                   kTypedDataInt32ArrayViewCid);
+      break;
+    case MethodRecognizer::kTypedData_Uint32ArrayView_factory:
+      body += BuildTypedDataViewFactoryConstructor(
+          function, kTypedDataUint32ArrayViewCid);
+      break;
+    case MethodRecognizer::kTypedData_Int64ArrayView_factory:
+      body += BuildTypedDataViewFactoryConstructor(function,
+                                                   kTypedDataInt64ArrayViewCid);
+      break;
+    case MethodRecognizer::kTypedData_Uint64ArrayView_factory:
+      body += BuildTypedDataViewFactoryConstructor(
+          function, kTypedDataUint64ArrayViewCid);
+      break;
+    case MethodRecognizer::kTypedData_Float32ArrayView_factory:
+      body += BuildTypedDataViewFactoryConstructor(
+          function, kTypedDataFloat32ArrayViewCid);
+      break;
+    case MethodRecognizer::kTypedData_Float64ArrayView_factory:
+      body += BuildTypedDataViewFactoryConstructor(
+          function, kTypedDataFloat64ArrayViewCid);
+      break;
+    case MethodRecognizer::kTypedData_Float32x4ArrayView_factory:
+      body += BuildTypedDataViewFactoryConstructor(
+          function, kTypedDataFloat32x4ArrayViewCid);
+      break;
+    case MethodRecognizer::kTypedData_Int32x4ArrayView_factory:
+      body += BuildTypedDataViewFactoryConstructor(
+          function, kTypedDataInt32x4ArrayViewCid);
+      break;
+    case MethodRecognizer::kTypedData_Float64x2ArrayView_factory:
+      body += BuildTypedDataViewFactoryConstructor(
+          function, kTypedDataFloat64x2ArrayViewCid);
+      break;
+#endif  // !defined(TARGET_ARCH_DBC)
     case MethodRecognizer::kObjectEquals:
-      body += LoadLocal(scopes_->this_variable);
+      body += LoadLocal(parsed_function_->receiver_var());
       body += LoadLocal(first_parameter);
       body += StrictCompare(Token::kEQ_STRICT);
       break;
     case MethodRecognizer::kStringBaseLength:
     case MethodRecognizer::kStringBaseIsEmpty:
-      body += LoadLocal(scopes_->this_variable);
+      body += LoadLocal(parsed_function_->receiver_var());
       body += LoadNativeField(Slot::String_length());
       if (kind == MethodRecognizer::kStringBaseIsEmpty) {
         body += IntConstant(0);
@@ -748,24 +815,36 @@
       }
       break;
     case MethodRecognizer::kGrowableArrayLength:
-      body += LoadLocal(scopes_->this_variable);
+      body += LoadLocal(parsed_function_->receiver_var());
       body += LoadNativeField(Slot::GrowableObjectArray_length());
       break;
     case MethodRecognizer::kObjectArrayLength:
     case MethodRecognizer::kImmutableArrayLength:
-      body += LoadLocal(scopes_->this_variable);
+      body += LoadLocal(parsed_function_->receiver_var());
       body += LoadNativeField(Slot::Array_length());
       break;
-    case MethodRecognizer::kTypedDataLength:
-      body += LoadLocal(scopes_->this_variable);
-      body += LoadNativeField(Slot::TypedData_length());
+    case MethodRecognizer::kTypedListLength:
+    case MethodRecognizer::kTypedListViewLength:
+    case MethodRecognizer::kByteDataViewLength:
+      body += LoadLocal(parsed_function_->receiver_var());
+      body += LoadNativeField(Slot::TypedDataBase_length());
+      break;
+    case MethodRecognizer::kByteDataViewOffsetInBytes:
+    case MethodRecognizer::kTypedDataViewOffsetInBytes:
+      body += LoadLocal(parsed_function_->receiver_var());
+      body += LoadNativeField(Slot::TypedDataView_offset_in_bytes());
+      break;
+    case MethodRecognizer::kByteDataViewTypedData:
+    case MethodRecognizer::kTypedDataViewTypedData:
+      body += LoadLocal(parsed_function_->receiver_var());
+      body += LoadNativeField(Slot::TypedDataView_data());
       break;
     case MethodRecognizer::kClassIDgetID:
       body += LoadLocal(first_parameter);
       body += LoadClassId();
       break;
     case MethodRecognizer::kGrowableArrayCapacity:
-      body += LoadLocal(scopes_->this_variable);
+      body += LoadLocal(parsed_function_->receiver_var());
       body += LoadNativeField(Slot::GrowableObjectArray_data());
       body += LoadNativeField(Slot::Array_length());
       break;
@@ -839,33 +918,33 @@
       body += CreateArray();
       break;
     case MethodRecognizer::kLinkedHashMap_getIndex:
-      body += LoadLocal(scopes_->this_variable);
+      body += LoadLocal(parsed_function_->receiver_var());
       body += LoadNativeField(Slot::LinkedHashMap_index());
       break;
     case MethodRecognizer::kLinkedHashMap_setIndex:
-      body += LoadLocal(scopes_->this_variable);
+      body += LoadLocal(parsed_function_->receiver_var());
       body += LoadLocal(first_parameter);
       body += StoreInstanceField(TokenPosition::kNoSource,
                                  Slot::LinkedHashMap_index());
       body += NullConstant();
       break;
     case MethodRecognizer::kLinkedHashMap_getData:
-      body += LoadLocal(scopes_->this_variable);
+      body += LoadLocal(parsed_function_->receiver_var());
       body += LoadNativeField(Slot::LinkedHashMap_data());
       break;
     case MethodRecognizer::kLinkedHashMap_setData:
-      body += LoadLocal(scopes_->this_variable);
+      body += LoadLocal(parsed_function_->receiver_var());
       body += LoadLocal(first_parameter);
       body += StoreInstanceField(TokenPosition::kNoSource,
                                  Slot::LinkedHashMap_data());
       body += NullConstant();
       break;
     case MethodRecognizer::kLinkedHashMap_getHashMask:
-      body += LoadLocal(scopes_->this_variable);
+      body += LoadLocal(parsed_function_->receiver_var());
       body += LoadNativeField(Slot::LinkedHashMap_hash_mask());
       break;
     case MethodRecognizer::kLinkedHashMap_setHashMask:
-      body += LoadLocal(scopes_->this_variable);
+      body += LoadLocal(parsed_function_->receiver_var());
       body += LoadLocal(first_parameter);
       body +=
           StoreInstanceField(TokenPosition::kNoSource,
@@ -873,11 +952,11 @@
       body += NullConstant();
       break;
     case MethodRecognizer::kLinkedHashMap_getUsedData:
-      body += LoadLocal(scopes_->this_variable);
+      body += LoadLocal(parsed_function_->receiver_var());
       body += LoadNativeField(Slot::LinkedHashMap_used_data());
       break;
     case MethodRecognizer::kLinkedHashMap_setUsedData:
-      body += LoadLocal(scopes_->this_variable);
+      body += LoadLocal(parsed_function_->receiver_var());
       body += LoadLocal(first_parameter);
       body +=
           StoreInstanceField(TokenPosition::kNoSource,
@@ -885,11 +964,11 @@
       body += NullConstant();
       break;
     case MethodRecognizer::kLinkedHashMap_getDeletedKeys:
-      body += LoadLocal(scopes_->this_variable);
+      body += LoadLocal(parsed_function_->receiver_var());
       body += LoadNativeField(Slot::LinkedHashMap_deleted_keys());
       break;
     case MethodRecognizer::kLinkedHashMap_setDeletedKeys:
-      body += LoadLocal(scopes_->this_variable);
+      body += LoadLocal(parsed_function_->receiver_var());
       body += LoadLocal(first_parameter);
       body += StoreInstanceField(TokenPosition::kNoSource,
                                  Slot::LinkedHashMap_deleted_keys(),
@@ -915,33 +994,76 @@
   return body + Return(TokenPosition::kNoSource, omit_result_type_check);
 }
 
-static const LocalScope* MakeImplicitClosureScope(Zone* Z,
-                                                  const Function& function) {
-  Class& klass = Class::Handle(Z, function.Owner());
+Fragment FlowGraphBuilder::BuildTypedDataViewFactoryConstructor(
+    const Function& function,
+    classid_t cid) {
+  auto token_pos = function.token_pos();
+  auto class_table = Thread::Current()->isolate()->class_table();
+
+  ASSERT(class_table->HasValidClassAt(cid));
+  const auto& view_class = Class::ZoneHandle(H.zone(), class_table->At(cid));
+
+  LocalVariable* typed_data = parsed_function_->RawParameterVariable(1);
+  LocalVariable* offset_in_bytes = parsed_function_->RawParameterVariable(2);
+  LocalVariable* length = parsed_function_->RawParameterVariable(3);
+
+  Fragment body;
+
+  body += AllocateObject(token_pos, view_class, /*arg_count=*/0);
+  LocalVariable* view_object = MakeTemporary();
+
+  body += LoadLocal(view_object);
+  body += LoadLocal(typed_data);
+  body += StoreInstanceField(token_pos, Slot::TypedDataView_data());
+
+  body += LoadLocal(view_object);
+  body += LoadLocal(offset_in_bytes);
+  body += StoreInstanceField(token_pos, Slot::TypedDataView_offset_in_bytes());
+
+  body += LoadLocal(view_object);
+  body += LoadLocal(length);
+  body += StoreInstanceField(token_pos, Slot::TypedDataBase_length());
+
+  // Update the inner pointer.
+  //
+  // WARNING: Notice that we assume here no GC happens between those 4
+  // instructions!
+  body += LoadLocal(view_object);
+  body += LoadLocal(typed_data);
+  body += LoadUntagged(TypedDataBase::data_field_offset());
+  body += ConvertUntaggedToIntptr();
+  body += LoadLocal(offset_in_bytes);
+  body += UnboxSmiToIntptr();
+  body += AddIntptrIntegers();
+  body += ConvertIntptrToUntagged();
+  body += StoreUntagged(TypedDataView::data_field_offset());
+
+  return body;
+}
+
+static const LocalScope* MakeImplicitClosureScope(Zone* Z, const Class& klass) {
   ASSERT(!klass.IsNull());
   // Note that if klass is _Closure, DeclarationType will be _Closure,
   // and not the signature type.
   Type& klass_type = Type::ZoneHandle(Z, klass.DeclarationType());
 
-  LocalVariable* this_variable = new (Z)
+  LocalVariable* receiver_variable = new (Z)
       LocalVariable(TokenPosition::kNoSource, TokenPosition::kNoSource,
                     Symbols::This(), klass_type, /*param_type=*/nullptr);
 
-  this_variable->set_is_captured();
-  //  this_variable->set_is_final();
+  receiver_variable->set_is_captured();
+  //  receiver_variable->set_is_final();
   LocalScope* scope = new (Z) LocalScope(NULL, 0, 0);
   scope->set_context_level(0);
-  scope->AddVariable(this_variable);
-  scope->AddContextVariable(this_variable);
+  scope->AddVariable(receiver_variable);
+  scope->AddContextVariable(receiver_variable);
   return scope;
 }
 
 Fragment FlowGraphBuilder::BuildImplicitClosureCreation(
     const Function& target) {
   Fragment fragment;
-  const Class& closure_class =
-      Class::ZoneHandle(Z, I->object_store()->closure_class());
-  fragment += AllocateObject(closure_class, target);
+  fragment += AllocateClosure(TokenPosition::kNoSource, target);
   LocalVariable* closure = MakeTemporary();
 
   // The function signature can have uninstantiated class type parameters.
@@ -959,7 +1081,7 @@
   // Allocate a context that closes over `this`.
   // Note: this must be kept in sync with ScopeBuilder::BuildScopes.
   const LocalScope* implicit_closure_scope =
-      MakeImplicitClosureScope(Z, target);
+      MakeImplicitClosureScope(Z, Class::Handle(Z, target.Owner()));
   fragment += AllocateContext(implicit_closure_scope->context_variables());
   LocalVariable* context = MakeTemporary();
 
@@ -982,7 +1104,7 @@
   // The context is on top of the operand stack.  Store `this`.  The context
   // doesn't need a parent pointer because it doesn't close over anything
   // else.
-  fragment += LoadLocal(scopes_->this_variable);
+  fragment += LoadLocal(parsed_function_->receiver_var());
   fragment += StoreInstanceField(
       TokenPosition::kNoSource,
       Slot::GetContextVariableSlotFor(
@@ -1020,8 +1142,12 @@
 }
 
 Fragment FlowGraphBuilder::DebugStepCheck(TokenPosition position) {
+#ifdef PRODUCT
+  return Fragment();
+#else
   return Fragment(new (Z) DebugStepCheckInstr(
       position, RawPcDescriptors::kRuntimeCall, GetNextDeoptId()));
+#endif
 }
 
 Fragment FlowGraphBuilder::EvaluateAssertion() {
@@ -1116,6 +1242,116 @@
   return instructions;
 }
 
+void FlowGraphBuilder::BuildArgumentTypeChecks(
+    TypeChecksToBuild mode,
+    Fragment* explicit_checks,
+    Fragment* implicit_checks,
+    Fragment* implicit_redefinitions) {
+  if (!I->should_emit_strong_mode_checks()) return;
+  const Function& dart_function = parsed_function_->function();
+
+  const Function* forwarding_target = nullptr;
+  if (parsed_function_->is_forwarding_stub()) {
+    forwarding_target = parsed_function_->forwarding_stub_super_target();
+    ASSERT(!forwarding_target->IsNull());
+  }
+
+  TypeArguments& type_parameters = TypeArguments::Handle(Z);
+  if (dart_function.IsFactory()) {
+    type_parameters = Class::Handle(Z, dart_function.Owner()).type_parameters();
+  } else {
+    type_parameters = dart_function.type_parameters();
+  }
+  intptr_t num_type_params = type_parameters.Length();
+  if (forwarding_target != nullptr) {
+    type_parameters = forwarding_target->type_parameters();
+    ASSERT(type_parameters.Length() == num_type_params);
+  }
+
+  TypeParameter& type_param = TypeParameter::Handle(Z);
+  String& name = String::Handle(Z);
+  AbstractType& bound = AbstractType::Handle(Z);
+  Fragment check_bounds;
+  for (intptr_t i = 0; i < num_type_params; ++i) {
+    type_param ^= type_parameters.TypeAt(i);
+
+    bound = type_param.bound();
+    if (bound.IsTopType()) {
+      continue;
+    }
+
+    switch (mode) {
+      case TypeChecksToBuild::kCheckAllTypeParameterBounds:
+        break;
+      case TypeChecksToBuild::kCheckCovariantTypeParameterBounds:
+        if (!type_param.IsGenericCovariantImpl()) {
+          continue;
+        }
+        break;
+      case TypeChecksToBuild::kCheckNonCovariantTypeParameterBounds:
+        if (type_param.IsGenericCovariantImpl()) {
+          continue;
+        }
+        break;
+    }
+
+    name = type_param.name();
+
+    ASSERT(type_param.IsFinalized());
+    check_bounds +=
+        AssertSubtype(TokenPosition::kNoSource, type_param, bound, name);
+  }
+
+  // Type arguments passed through partial instantiation are guaranteed to be
+  // bounds-checked at the point of partial instantiation, so we don't need to
+  // check them again at the call-site.
+  if (dart_function.IsClosureFunction() && !check_bounds.is_empty() &&
+      FLAG_eliminate_type_checks) {
+    LocalVariable* closure = parsed_function_->ParameterVariable(0);
+    *implicit_checks += TestDelayedTypeArgs(closure, /*present=*/{},
+                                            /*absent=*/check_bounds);
+  } else {
+    *implicit_checks += check_bounds;
+  }
+
+  const intptr_t num_params = dart_function.NumParameters();
+  for (intptr_t i = dart_function.NumImplicitParameters(); i < num_params;
+       ++i) {
+    LocalVariable* param = parsed_function_->ParameterVariable(i);
+    if (!param->needs_type_check()) {
+      continue;
+    }
+
+    const AbstractType* target_type = &param->type();
+    if (forwarding_target != NULL) {
+      // We add 1 to the parameter index to account for the receiver.
+      target_type =
+          &AbstractType::ZoneHandle(Z, forwarding_target->ParameterTypeAt(i));
+    }
+
+    if (target_type->IsTopType()) continue;
+
+    const bool is_covariant = param->is_explicit_covariant_parameter();
+    Fragment* checks = is_covariant ? explicit_checks : implicit_checks;
+
+    *checks += LoadLocal(param);
+    *checks += CheckAssignable(*target_type, param->name(),
+                               AssertAssignableInstr::kParameterCheck);
+    *checks += Drop();
+
+    if (!is_covariant && implicit_redefinitions != nullptr && optimizing_) {
+      // We generate slightly different code in optimized vs. un-optimized code,
+      // which is ok since we don't allocate any deopt ids.
+      AssertNoDeoptIdsAllocatedScope no_deopt_allocation(thread_);
+
+      *implicit_redefinitions += LoadLocal(param);
+      *implicit_redefinitions += RedefinitionWithType(*target_type);
+      *implicit_redefinitions += StoreLocal(TokenPosition::kNoSource, param);
+      *implicit_redefinitions += Drop();
+    }
+  }
+}
+
 BlockEntryInstr* FlowGraphBuilder::BuildPrologue(BlockEntryInstr* normal_entry,
                                                  PrologueInfo* prologue_info) {
   const bool compiling_for_osr = IsCompiledForOsr();
@@ -1130,6 +1366,34 @@
   return instruction_cursor;
 }
 
+RawArray* FlowGraphBuilder::GetOptionalParameterNames(
+    const Function& function) {
+  if (!function.HasOptionalNamedParameters()) {
+    return Array::null();
+  }
+
+  const intptr_t num_fixed_params = function.num_fixed_parameters();
+  const intptr_t num_opt_params = function.NumOptionalNamedParameters();
+  const auto& names = Array::Handle(Z, Array::New(num_opt_params, Heap::kOld));
+  auto& name = String::Handle(Z);
+  for (intptr_t i = 0; i < num_opt_params; ++i) {
+    name = function.ParameterNameAt(num_fixed_params + i);
+    names.SetAt(i, name);
+  }
+  return names.raw();
+}
+
+Fragment FlowGraphBuilder::PushExplicitParameters(const Function& function) {
+  Fragment instructions;
+  for (intptr_t i = function.NumImplicitParameters(),
+                n = function.NumParameters();
+       i < n; ++i) {
+    instructions += LoadLocal(parsed_function_->ParameterVariable(i));
+    instructions += PushArgument();
+  }
+  return instructions;
+}
+
 FlowGraph* FlowGraphBuilder::BuildGraphOfMethodExtractor(
     const Function& method) {
   // A method extractor is the implicit getter for a method.
@@ -1187,8 +1451,7 @@
 
   // The receiver is the first argument to noSuchMethod, and it is the first
   // argument passed to the dispatcher function.
-  LocalScope* scope = parsed_function_->node_sequence()->scope();
-  body += LoadLocal(scope->VariableAt(0));
+  body += LoadLocal(parsed_function_->ParameterVariable(0));
   body += PushArgument();
 
   // The second argument to noSuchMethod is an invocation mirror.  Push the
@@ -1218,7 +1481,7 @@
   for (intptr_t i = 0; i < descriptor.PositionalCount(); ++i) {
     body += LoadLocal(array);
     body += IntConstant(receiver_index + i);
-    body += LoadLocal(scope->VariableAt(i));
+    body += LoadLocal(parsed_function_->ParameterVariable(i));
     body += StoreIndexed(kArrayCid);
   }
   String& name = String::Handle(Z);
@@ -1228,7 +1491,7 @@
     name = Symbols::New(H.thread(), name);
     body += LoadLocal(array);
     body += IntConstant(receiver_index + descriptor.PositionAt(i));
-    body += LoadLocal(scope->VariableAt(parameter_index));
+    body += LoadLocal(parsed_function_->ParameterVariable(parameter_index));
     body += StoreIndexed(kArrayCid);
   }
   body += PushArgument();
@@ -1277,7 +1540,7 @@
   ASSERT(!owner.IsNull());
   const String& field_name = String::Handle(Z, function.name());
   const String& getter_name = String::ZoneHandle(
-      Z, Symbols::New(H.thread(),
+      Z, Symbols::New(thread_,
                       String::Handle(Z, Field::GetterSymbol(field_name))));
 
   // Determine if this is `class Closure { get call => this; }`
@@ -1320,8 +1583,6 @@
   Fragment body(instruction_cursor);
   body += CheckStackOverflowInPrologue(function.token_pos());
 
-  LocalScope* scope = parsed_function_->node_sequence()->scope();
-
   if (descriptor.TypeArgsLen() > 0) {
     LocalVariable* type_args = parsed_function_->function_type_arguments();
     ASSERT(type_args != NULL);
@@ -1331,13 +1592,13 @@
 
   LocalVariable* closure = NULL;
   if (is_closure_call) {
-    closure = scope->VariableAt(0);
+    closure = parsed_function_->ParameterVariable(0);
 
     // The closure itself is the first argument.
     body += LoadLocal(closure);
   } else {
     // Invoke the getter to get the field value.
-    body += LoadLocal(scope->VariableAt(0));
+    body += LoadLocal(parsed_function_->ParameterVariable(0));
     body += PushArgument();
     const intptr_t kTypeArgsLen = 0;
     const intptr_t kNumArgsChecked = 1;
@@ -1351,7 +1612,7 @@
   // Push all arguments onto the stack.
   intptr_t pos = 1;
   for (; pos < descriptor.Count(); pos++) {
-    body += LoadLocal(scope->VariableAt(pos));
+    body += LoadLocal(parsed_function_->ParameterVariable(pos));
     body += PushArgument();
   }
 
@@ -1376,6 +1637,962 @@
                            prologue_info);
 }
 
+FlowGraph* FlowGraphBuilder::BuildGraphOfNoSuchMethodForwarder(
+    const Function& function,
+    bool is_implicit_closure_function,
+    bool throw_no_such_method_error) {
+  graph_entry_ =
+      new (Z) GraphEntryInstr(*parsed_function_, Compiler::kNoOSRDeoptId);
+
+  auto normal_entry = BuildFunctionEntry(graph_entry_);
+  graph_entry_->set_normal_entry(normal_entry);
+
+  PrologueInfo prologue_info(-1, -1);
+  BlockEntryInstr* instruction_cursor =
+      BuildPrologue(normal_entry, &prologue_info);
+
+  Fragment body(instruction_cursor);
+  body += CheckStackOverflowInPrologue(function.token_pos());
+
+  // If we are inside the tearoff wrapper function (implicit closure), we need
+  // to extract the receiver from the context. We just replace it directly on
+  // the stack to simplify the rest of the code.
+  if (is_implicit_closure_function && !function.is_static()) {
+    if (parsed_function_->has_arg_desc_var()) {
+      body += LoadArgDescriptor();
+      body += LoadNativeField(Slot::ArgumentsDescriptor_count());
+      body += LoadLocal(parsed_function_->current_context_var());
+      body += LoadNativeField(Slot::GetContextVariableSlotFor(
+          thread_, *parsed_function_->receiver_var()));
+      body += StoreFpRelativeSlot(
+          kWordSize * compiler::target::frame_layout.param_end_from_fp);
+    } else {
+      body += LoadLocal(parsed_function_->current_context_var());
+      body += LoadNativeField(Slot::GetContextVariableSlotFor(
+          thread_, *parsed_function_->receiver_var()));
+      body += StoreFpRelativeSlot(
+          kWordSize * (compiler::target::frame_layout.param_end_from_fp +
+                       function.NumParameters()));
+    }
+  }
+
+  if (function.NeedsArgumentTypeChecks(I)) {
+    BuildArgumentTypeChecks(TypeChecksToBuild::kCheckAllTypeParameterBounds,
+                            &body, &body, nullptr);
+  }
+
+  body += MakeTemp();
+  LocalVariable* result = MakeTemporary();
+
+  // Do "++argument_count" if any type arguments were passed.
+  LocalVariable* argument_count_var = parsed_function_->expression_temp_var();
+  body += IntConstant(0);
+  body += StoreLocal(TokenPosition::kNoSource, argument_count_var);
+  body += Drop();
+  if (function.IsGeneric()) {
+    Fragment then;
+    Fragment otherwise;
+    otherwise += IntConstant(1);
+    otherwise += StoreLocal(TokenPosition::kNoSource, argument_count_var);
+    otherwise += Drop();
+    body += TestAnyTypeArgs(then, otherwise);
+  }
+
+  if (function.HasOptionalParameters()) {
+    body += LoadArgDescriptor();
+    body += LoadNativeField(Slot::ArgumentsDescriptor_count());
+  } else {
+    body += IntConstant(function.NumParameters());
+  }
+  body += LoadLocal(argument_count_var);
+  body += SmiBinaryOp(Token::kADD, /* truncate= */ true);
+  LocalVariable* argument_count = MakeTemporary();
+
+  // We are generating code like the following:
+  //
+  // var arguments = new Array<dynamic>(argument_count);
+  //
+  // int i = 0;
+  // if (any type arguments are passed) {
+  //   arguments[0] = function_type_arguments;
+  //   ++i;
+  // }
+  //
+  // for (; i < argument_count; ++i) {
+  //   arguments[i] = LoadFpRelativeSlot(
+  //       kWordSize * (frame_layout.param_end_from_fp + argument_count - i));
+  // }
+  body += Constant(TypeArguments::ZoneHandle(Z, TypeArguments::null()));
+  body += LoadLocal(argument_count);
+  body += CreateArray();
+  LocalVariable* arguments = MakeTemporary();
+
+  {
+    // int i = 0
+    LocalVariable* index = parsed_function_->expression_temp_var();
+    body += IntConstant(0);
+    body += StoreLocal(TokenPosition::kNoSource, index);
+    body += Drop();
+
+    // if (any type arguments are passed) {
+    //   arguments[0] = function_type_arguments;
+    //   i = 1;
+    // }
+    if (function.IsGeneric()) {
+      Fragment store;
+      store += LoadLocal(arguments);
+      store += IntConstant(0);
+      store += LoadFunctionTypeArguments();
+      store += StoreIndexed(kArrayCid);
+      store += IntConstant(1);
+      store += StoreLocal(TokenPosition::kNoSource, index);
+      store += Drop();
+      body += TestAnyTypeArgs(store, Fragment());
+    }
+
+    TargetEntryInstr* body_entry;
+    TargetEntryInstr* loop_exit;
+
+    Fragment condition;
+    // i < argument_count
+    condition += LoadLocal(index);
+    condition += LoadLocal(argument_count);
+    condition += SmiRelationalOp(Token::kLT);
+    condition += BranchIfTrue(&body_entry, &loop_exit, /*negate=*/false);
+
+    Fragment loop_body(body_entry);
+
+    // arguments[i] = LoadFpRelativeSlot(
+    //     kWordSize * (frame_layout.param_end_from_fp + argument_count - i));
+    loop_body += LoadLocal(arguments);
+    loop_body += LoadLocal(index);
+    loop_body += LoadLocal(argument_count);
+    loop_body += LoadLocal(index);
+    loop_body += SmiBinaryOp(Token::kSUB, /*truncate=*/true);
+    loop_body += LoadFpRelativeSlot(
+        kWordSize * compiler::target::frame_layout.param_end_from_fp,
+        CompileType::Dynamic());
+    loop_body += StoreIndexed(kArrayCid);
+
+    // ++i
+    loop_body += LoadLocal(index);
+    loop_body += IntConstant(1);
+    loop_body += SmiBinaryOp(Token::kADD, /*truncate=*/true);
+    loop_body += StoreLocal(TokenPosition::kNoSource, index);
+    loop_body += Drop();
+
+    JoinEntryInstr* join = BuildJoinEntry();
+    loop_body += Goto(join);
+
+    Fragment loop(join);
+    loop += condition;
+
+    Instruction* entry =
+        new (Z) GotoInstr(join, CompilerState::Current().GetNextDeoptId());
+    body += Fragment(entry, loop_exit);
+  }
+
+  // Load receiver.
+  if (is_implicit_closure_function) {
+    if (throw_no_such_method_error) {
+      const Function& parent =
+          Function::ZoneHandle(Z, function.parent_function());
+      const Class& owner = Class::ZoneHandle(Z, parent.Owner());
+      AbstractType& type = AbstractType::ZoneHandle(Z);
+      type ^= Type::New(owner, TypeArguments::Handle(Z), owner.token_pos(),
+                        Heap::kOld);
+      type ^= ClassFinalizer::FinalizeType(owner, type);
+      body += Constant(type);
+    } else {
+      body += LoadLocal(parsed_function_->current_context_var());
+      body += LoadNativeField(Slot::GetContextVariableSlotFor(
+          thread_, *parsed_function_->receiver_var()));
+    }
+  } else {
+    body += LoadLocal(parsed_function_->ParameterVariable(0));
+  }
+  body += PushArgument();
+
+  body += Constant(String::ZoneHandle(Z, function.name()));
+  body += PushArgument();
+
+  if (!parsed_function_->has_arg_desc_var()) {
+    // If there is no variable for the arguments descriptor (this function's
+    // signature doesn't require it), then we need to create one.
+    Array& args_desc = Array::ZoneHandle(
+        Z, ArgumentsDescriptor::New(0, function.NumParameters()));
+    body += Constant(args_desc);
+  } else {
+    body += LoadArgDescriptor();
+  }
+  body += PushArgument();
+
+  body += LoadLocal(arguments);
+  body += PushArgument();
+
+  if (throw_no_such_method_error) {
+    const Function& parent =
+        Function::ZoneHandle(Z, function.parent_function());
+    const Class& owner = Class::ZoneHandle(Z, parent.Owner());
+    InvocationMirror::Level im_level = owner.IsTopLevel()
+                                           ? InvocationMirror::kTopLevel
+                                           : InvocationMirror::kStatic;
+    InvocationMirror::Kind im_kind;
+    if (function.IsImplicitGetterFunction() || function.IsGetterFunction()) {
+      im_kind = InvocationMirror::kGetter;
+    } else if (function.IsImplicitSetterFunction() ||
+               function.IsSetterFunction()) {
+      im_kind = InvocationMirror::kSetter;
+    } else {
+      im_kind = InvocationMirror::kMethod;
+    }
+    body += IntConstant(InvocationMirror::EncodeType(im_level, im_kind));
+  } else {
+    body += NullConstant();
+  }
+  body += PushArgument();
+
+  // Push the number of delayed type arguments.
+  if (function.IsClosureFunction()) {
+    LocalVariable* closure = parsed_function_->ParameterVariable(0);
+    Fragment then;
+    then += IntConstant(function.NumTypeParameters());
+    then += StoreLocal(TokenPosition::kNoSource, argument_count_var);
+    then += Drop();
+    Fragment otherwise;
+    otherwise += IntConstant(0);
+    otherwise += StoreLocal(TokenPosition::kNoSource, argument_count_var);
+    otherwise += Drop();
+    body += TestDelayedTypeArgs(closure, then, otherwise);
+    body += LoadLocal(argument_count_var);
+  } else {
+    body += IntConstant(0);
+  }
+  body += PushArgument();
+
+  const Class& mirror_class =
+      Class::Handle(Z, Library::LookupCoreClass(Symbols::InvocationMirror()));
+  ASSERT(!mirror_class.IsNull());
+  const Function& allocation_function = Function::ZoneHandle(
+      Z, mirror_class.LookupStaticFunction(Library::PrivateCoreLibName(
+             Symbols::AllocateInvocationMirrorForClosure())));
+  ASSERT(!allocation_function.IsNull());
+  body += StaticCall(TokenPosition::kMinSource, allocation_function,
+                     /* argument_count = */ 5, ICData::kStatic);
+  body += PushArgument();  // For the call to noSuchMethod.
+
+  if (throw_no_such_method_error) {
+    const Class& klass = Class::ZoneHandle(
+        Z, Library::LookupCoreClass(Symbols::NoSuchMethodError()));
+    ASSERT(!klass.IsNull());
+    const Function& throw_function = Function::ZoneHandle(
+        Z,
+        klass.LookupStaticFunctionAllowPrivate(Symbols::ThrowNewInvocation()));
+    ASSERT(!throw_function.IsNull());
+    body += StaticCall(TokenPosition::kNoSource, throw_function, 2,
+                       ICData::kStatic);
+  } else {
+    body += InstanceCall(
+        TokenPosition::kNoSource, Symbols::NoSuchMethod(), Token::kILLEGAL,
+        /*type_args_len=*/0, /*argument_count=*/2, Array::null_array(),
+        /*checked_argument_count=*/1, Function::null_function());
+  }
+  body += StoreLocal(TokenPosition::kNoSource, result);
+  body += Drop();
+
+  body += Drop();  // arguments
+  body += Drop();  // argument count
+
+  AbstractType& return_type = AbstractType::Handle(function.result_type());
+  if (!return_type.IsDynamicType() && !return_type.IsVoidType() &&
+      !return_type.IsObjectType()) {
+    body += AssertAssignable(TokenPosition::kNoSource, return_type,
+                             Symbols::Empty());
+  }
+  body += Return(TokenPosition::kNoSource);
+
+  return new (Z) FlowGraph(*parsed_function_, graph_entry_, last_used_block_id_,
+                           prologue_info);
+}
+
+Fragment FlowGraphBuilder::BuildDefaultTypeHandling(const Function& function) {
+  if (function.IsGeneric()) {
+    const TypeArguments& default_types =
+        parsed_function_->DefaultFunctionTypeArguments();
+
+    if (!default_types.IsNull()) {
+      Fragment then;
+      Fragment otherwise;
+
+      otherwise += TranslateInstantiatedTypeArguments(default_types);
+      otherwise += StoreLocal(TokenPosition::kNoSource,
+                              parsed_function_->function_type_arguments());
+      otherwise += Drop();
+      return TestAnyTypeArgs(then, otherwise);
+    }
+  }
+  return Fragment();
+}
+
+// Pop the index of the current entry-point off the stack. If there is any
+// entrypoint-tracing hook registered in a pragma for the function, it is called
+// with the name of the current function and the current entry-point index.
+Fragment FlowGraphBuilder::BuildEntryPointsIntrospection() {
+  if (!FLAG_enable_testing_pragmas) return Drop();
+
+  auto& function = Function::Handle(Z, parsed_function_->function().raw());
+
+  if (function.IsImplicitClosureFunction()) {
+    const auto& parent = Function::Handle(Z, function.parent_function());
+    const auto& func_name = String::Handle(Z, parent.name());
+    const auto& owner = Class::Handle(Z, parent.Owner());
+    function = owner.LookupFunction(func_name);
+  }
+
+  auto& tmp = Object::Handle(Z);
+  tmp = function.Owner();
+  tmp = Class::Cast(tmp).library();
+  auto& library = Library::Cast(tmp);
+
+  Object& options = Object::Handle(Z);
+  if (!library.FindPragma(thread_, function, Symbols::vm_trace_entrypoints(),
+                          &options) ||
+      options.IsNull() || !options.IsClosure()) {
+    return Drop();
+  }
+  auto& closure = Closure::ZoneHandle(Z, Closure::Cast(options).raw());
+  LocalVariable* entry_point_num = MakeTemporary();
+
+  auto& function_name = String::ZoneHandle(
+      Z, String::New(function.ToLibNamePrefixedQualifiedCString(), Heap::kOld));
+  if (parsed_function_->function().IsImplicitClosureFunction()) {
+    function_name = String::Concat(
+        function_name, String::Handle(Z, String::New("#tearoff", Heap::kNew)),
+        Heap::kOld);
+  }
+
+  Fragment call_hook;
+  call_hook += Constant(closure);
+  call_hook += PushArgument();
+  call_hook += Constant(function_name);
+  call_hook += PushArgument();
+  call_hook += LoadLocal(entry_point_num);
+  call_hook += PushArgument();
+  call_hook += Constant(Function::ZoneHandle(Z, closure.function()));
+  call_hook += ClosureCall(TokenPosition::kNoSource,
+                           /*type_args_len=*/0, /*argument_count=*/3,
+                           /*argument_names=*/Array::ZoneHandle(Z));
+  call_hook += Drop();  // result of closure call
+  call_hook += Drop();  // entrypoint number
+  return call_hook;
+}
+
+FunctionEntryInstr* FlowGraphBuilder::BuildSharedUncheckedEntryPoint(
+    Fragment shared_prologue_linked_in,
+    Fragment skippable_checks,
+    Fragment redefinitions_if_skipped,
+    Fragment body) {
+  ASSERT(shared_prologue_linked_in.entry == graph_entry_->normal_entry());
+  ASSERT(parsed_function_->has_entry_points_temp_var());
+  Instruction* prologue_start = shared_prologue_linked_in.entry->next();
+
+  auto* join_entry = BuildJoinEntry();
+
+  Fragment normal_entry(shared_prologue_linked_in.entry);
+  normal_entry +=
+      IntConstant(static_cast<intptr_t>(UncheckedEntryPointStyle::kNone));
+  normal_entry += StoreLocal(TokenPosition::kNoSource,
+                             parsed_function_->entry_points_temp_var());
+  normal_entry += Drop();
+  normal_entry += Goto(join_entry);
+
+  auto* extra_target_entry = BuildFunctionEntry(graph_entry_);
+  Fragment extra_entry(extra_target_entry);
+  extra_entry += IntConstant(
+      static_cast<intptr_t>(UncheckedEntryPointStyle::kSharedWithVariable));
+  extra_entry += StoreLocal(TokenPosition::kNoSource,
+                            parsed_function_->entry_points_temp_var());
+  extra_entry += Drop();
+  extra_entry += Goto(join_entry);
+
+  if (prologue_start != nullptr) {
+    join_entry->LinkTo(prologue_start);
+  } else {
+    // Prologue is empty.
+    shared_prologue_linked_in.current = join_entry;
+  }
+
+  TargetEntryInstr *do_checks, *skip_checks;
+  shared_prologue_linked_in +=
+      LoadLocal(parsed_function_->entry_points_temp_var());
+  shared_prologue_linked_in += BuildEntryPointsIntrospection();
+  shared_prologue_linked_in +=
+      LoadLocal(parsed_function_->entry_points_temp_var());
+  shared_prologue_linked_in += IntConstant(
+      static_cast<intptr_t>(UncheckedEntryPointStyle::kSharedWithVariable));
+  shared_prologue_linked_in +=
+      BranchIfEqual(&skip_checks, &do_checks, /*negate=*/false);
+
+  JoinEntryInstr* rest_entry = BuildJoinEntry();
+
+  Fragment(do_checks) + skippable_checks + Goto(rest_entry);
+  Fragment(skip_checks) + redefinitions_if_skipped + Goto(rest_entry);
+  Fragment(rest_entry) + body;
+
+  return extra_target_entry;
+}
+
+FunctionEntryInstr* FlowGraphBuilder::BuildSeparateUncheckedEntryPoint(
+    BlockEntryInstr* normal_entry,
+    Fragment normal_prologue,
+    Fragment extra_prologue,
+    Fragment shared_prologue,
+    Fragment body) {
+  auto* join_entry = BuildJoinEntry();
+  auto* extra_entry = BuildFunctionEntry(graph_entry_);
+
+  Fragment normal(normal_entry);
+  normal += IntConstant(static_cast<intptr_t>(UncheckedEntryPointStyle::kNone));
+  normal += BuildEntryPointsIntrospection();
+  normal += normal_prologue;
+  normal += Goto(join_entry);
+
+  Fragment extra(extra_entry);
+  extra +=
+      IntConstant(static_cast<intptr_t>(UncheckedEntryPointStyle::kSeparate));
+  extra += BuildEntryPointsIntrospection();
+  extra += extra_prologue;
+  extra += Goto(join_entry);
+
+  Fragment(join_entry) + shared_prologue + body;
+  return extra_entry;
+}
+
+void FlowGraphBuilder::RecordUncheckedEntryPoint(
+    FunctionEntryInstr* extra_entry) {
+  // Closures always check all arguments on their checked entry-point, most
+  // call-sites are unchecked, and they're inlined less often, so it's very
+  // beneficial to build multiple entry-points for them. Regular methods however
+  // have fewer checks to begin with since they have dynamic invocation
+  // forwarders, so in AOT we implement a more conservative time-space tradeoff
+  // by only building the unchecked entry-point when inlining. We should
+  // reconsider this heuristic if we identify non-inlined type-checks in
+  // hotspots of new benchmarks.
+  if (!IsInlining() && (parsed_function_->function().IsClosureFunction() ||
+                        !FLAG_precompiled_mode)) {
+    graph_entry_->set_unchecked_entry(extra_entry);
+  } else if (InliningUncheckedEntry()) {
+    graph_entry_->set_normal_entry(extra_entry);
+  }
+}
+
+FlowGraph* FlowGraphBuilder::BuildGraphOfImplicitClosureFunction(
+    const Function& function) {
+  const Function& parent = Function::ZoneHandle(Z, function.parent_function());
+  const String& func_name = String::ZoneHandle(Z, parent.name());
+  const Class& owner = Class::ZoneHandle(Z, parent.Owner());
+  Function& target = Function::ZoneHandle(Z, owner.LookupFunction(func_name));
+
+  if (!target.IsNull() && (target.raw() != parent.raw())) {
+    DEBUG_ASSERT(Isolate::Current()->HasAttemptedReload());
+    if ((target.is_static() != parent.is_static()) ||
+        (target.kind() != parent.kind())) {
+      target = Function::null();
+    }
+  }
+
+  if (target.IsNull() ||
+      (parent.num_fixed_parameters() != target.num_fixed_parameters())) {
+    return BuildGraphOfNoSuchMethodForwarder(function, true,
+                                             parent.is_static());
+  }
+
+  graph_entry_ =
+      new (Z) GraphEntryInstr(*parsed_function_, Compiler::kNoOSRDeoptId);
+
+  auto normal_entry = BuildFunctionEntry(graph_entry_);
+  graph_entry_->set_normal_entry(normal_entry);
+
+  PrologueInfo prologue_info(-1, -1);
+  BlockEntryInstr* instruction_cursor =
+      BuildPrologue(normal_entry, &prologue_info);
+
+  const Fragment prologue = CheckStackOverflowInPrologue(function.token_pos());
+
+  const Fragment default_type_handling = BuildDefaultTypeHandling(function);
+
+  // We're going to throw away the explicit checks because the target will
+  // always check them.
+  Fragment implicit_checks;
+  if (function.NeedsArgumentTypeChecks(I)) {
+    Fragment explicit_checks_unused;
+    if (target.is_static()) {
+      // Tearoffs of static methods needs to perform arguments checks since
+      // static methods they forward to don't do it themselves.
+      BuildArgumentTypeChecks(TypeChecksToBuild::kCheckAllTypeParameterBounds,
+                              &explicit_checks_unused, &implicit_checks,
+                              nullptr);
+    } else {
+      if (MethodCanSkipTypeChecksForNonCovariantArguments(
+              parent, ProcedureAttributesMetadata())) {
+        // Generate checks that are skipped inside a body of a function.
+        BuildArgumentTypeChecks(
+            TypeChecksToBuild::kCheckNonCovariantTypeParameterBounds,
+            &explicit_checks_unused, &implicit_checks, nullptr);
+      }
+    }
+  }
+
+  Fragment body;
+
+  intptr_t type_args_len = 0;
+  if (function.IsGeneric()) {
+    type_args_len = function.NumTypeParameters();
+    ASSERT(parsed_function_->function_type_arguments() != NULL);
+    body += LoadLocal(parsed_function_->function_type_arguments());
+    body += PushArgument();
+  }
+
+  // Push receiver.
+  if (!target.is_static()) {
+    // The context has a fixed shape: a single variable which is the
+    // closed-over receiver.
+    body += LoadLocal(parsed_function_->ParameterVariable(0));
+    body += LoadNativeField(Slot::Closure_context());
+    body += LoadNativeField(Slot::GetContextVariableSlotFor(
+        thread_, *parsed_function_->receiver_var()));
+    body += PushArgument();
+  }
+
+  body += PushExplicitParameters(function);
+
+  // Forward parameters to the target.
+  intptr_t argument_count = function.NumParameters() -
+                            function.NumImplicitParameters() +
+                            (target.is_static() ? 0 : 1);
+  ASSERT(argument_count == target.NumParameters());
+
+  Array& argument_names =
+      Array::ZoneHandle(Z, GetOptionalParameterNames(function));
+
+  body += StaticCall(TokenPosition::kNoSource, target, argument_count,
+                     argument_names, ICData::kNoRebind,
+                     /* result_type = */ NULL, type_args_len);
+
+  // Return the result.
+  body += Return(function.end_token_pos());
+
+  // Setup multiple entrypoints if useful.
+  FunctionEntryInstr* extra_entry = nullptr;
+  if (function.MayHaveUncheckedEntryPoint(I)) {
+    // The prologue for a closure will always have context handling (e.g.
+    // setting up the receiver variable), but we don't need it on the unchecked
+    // entry because the only time we reference this is for loading the
+    // receiver, which we fetch directly from the context.
+    if (PrologueBuilder::PrologueSkippableOnUncheckedEntry(function)) {
+      // Use separate entry points since we can skip almost everything on the
+      // static entry.
+      extra_entry = BuildSeparateUncheckedEntryPoint(
+          /*normal_entry=*/instruction_cursor,
+          /*normal_prologue=*/prologue + default_type_handling +
+              implicit_checks,
+          /*extra_prologue=*/
+          CheckStackOverflowInPrologue(function.token_pos()),
+          /*shared_prologue=*/Fragment(),
+          /*body=*/body);
+    } else {
+      Fragment shared_prologue(normal_entry, instruction_cursor);
+      shared_prologue += prologue;
+      extra_entry = BuildSharedUncheckedEntryPoint(
+          /*shared_prologue_linked_in=*/shared_prologue,
+          /*skippable_checks=*/default_type_handling + implicit_checks,
+          /*redefinitions_if_skipped=*/Fragment(),
+          /*body=*/body);
+    }
+    RecordUncheckedEntryPoint(extra_entry);
+  } else {
+    Fragment function(instruction_cursor);
+    function += prologue;
+    function += default_type_handling;
+    function += implicit_checks;
+    function += body;
+  }
+
+  return new (Z) FlowGraph(*parsed_function_, graph_entry_, last_used_block_id_,
+                           prologue_info);
+}
+
+FlowGraph* FlowGraphBuilder::BuildGraphOfFieldAccessor(
+    const Function& function) {
+  ASSERT(function.IsImplicitGetterOrSetter() ||
+         function.IsDynamicInvocationForwarder());
+
+  // Instead of building a dynamic invocation forwarder that checks argument
+  // type and then invokes original setter we simply generate the type check
+  // and inlined field store. Scope builder takes care of setting correct
+  // type check mode in this case.
+  const bool is_setter = function.IsDynamicInvocationForwarder() ||
+                         function.IsImplicitSetterFunction();
+  const bool is_method = !function.IsStaticFunction();
+
+  Field& field = Field::ZoneHandle(Z, function.accessor_field());
+
+  graph_entry_ =
+      new (Z) GraphEntryInstr(*parsed_function_, Compiler::kNoOSRDeoptId);
+
+  auto normal_entry = BuildFunctionEntry(graph_entry_);
+  graph_entry_->set_normal_entry(normal_entry);
+
+  Fragment body(normal_entry);
+  if (is_setter) {
+    LocalVariable* setter_value =
+        parsed_function_->ParameterVariable(is_method ? 1 : 0);
+
+    // We only expect to generate a dynamic invocation forwarder if
+    // the value needs type check.
+    ASSERT(!function.IsDynamicInvocationForwarder() ||
+           setter_value->needs_type_check());
+    if (is_method) {
+      body += LoadLocal(parsed_function_->ParameterVariable(0));
+    }
+    body += LoadLocal(setter_value);
+    if (I->argument_type_checks() && setter_value->needs_type_check()) {
+      body += CheckAssignable(setter_value->type(), setter_value->name(),
+                              AssertAssignableInstr::kParameterCheck);
+    }
+    if (is_method) {
+      body += StoreInstanceFieldGuarded(field, false);
+    } else {
+      body += StoreStaticField(TokenPosition::kNoSource, field);
+    }
+    body += NullConstant();
+  } else if (is_method) {
+    body += LoadLocal(parsed_function_->ParameterVariable(0));
+    body += LoadField(field);
+  } else if (field.is_const()) {
+    // If the parser needs to know the value of an uninitialized constant field
+    // it will set the value to the transition sentinel (used to detect circular
+    // initialization) and then call the implicit getter.  Thus, the getter
+    // cannot contain the InitStaticField instruction that normal static getters
+    // contain because it would detect spurious circular initialization when it
+    // checks for the transition sentinel.
+    ASSERT(!field.IsUninitialized());
+    body += Constant(Instance::ZoneHandle(Z, field.StaticValue()));
+  } else {
+    // The field always has an initializer because static fields without
+    // initializers are initialized eagerly and do not have implicit getters.
+    ASSERT(field.has_initializer());
+    body += Constant(field);
+    body += InitStaticField(field);
+    body += Constant(field);
+    body += LoadStaticField();
+  }
+  body += Return(TokenPosition::kNoSource);
+
+  PrologueInfo prologue_info(-1, -1);
+  return new (Z) FlowGraph(*parsed_function_, graph_entry_, last_used_block_id_,
+                           prologue_info);
+}
+
+FlowGraph* FlowGraphBuilder::BuildGraphOfDynamicInvocationForwarder(
+    const Function& function) {
+  auto& name = String::Handle(Z, function.name());
+  name = Function::DemangleDynamicInvocationForwarderName(name);
+  const auto& owner = Class::Handle(Z, function.Owner());
+  const auto& target =
+      Function::ZoneHandle(Z, owner.LookupDynamicFunction(name));
+  ASSERT(!target.IsNull());
+  ASSERT(!target.IsImplicitGetterFunction());
+
+  if (target.IsImplicitSetterFunction()) {
+    return BuildGraphOfFieldAccessor(function);
+  }
+
+  graph_entry_ = new (Z) GraphEntryInstr(*parsed_function_, osr_id_);
+
+  auto normal_entry = BuildFunctionEntry(graph_entry_);
+  graph_entry_->set_normal_entry(normal_entry);
+
+  PrologueInfo prologue_info(-1, -1);
+  auto instruction_cursor = BuildPrologue(normal_entry, &prologue_info);
+
+  Fragment body;
+  if (!function.is_native()) {
+    body += CheckStackOverflowInPrologue(function.token_pos());
+  }
+
+  ASSERT(parsed_function_->node_sequence()->scope()->num_context_variables() ==
+         0);
+
+  // Should never build a dynamic invocation forwarder for equality
+  // operator.
+  ASSERT(function.name() != Symbols::EqualOperator().raw());
+
+  // Even if the caller did not pass argument vector we would still
+  // call the target with instantiate-to-bounds type arguments.
+  body += BuildDefaultTypeHandling(function);
+
+  // Build argument type checks that complement those that are emitted in the
+  // target.
+  BuildArgumentTypeChecks(
+      TypeChecksToBuild::kCheckNonCovariantTypeParameterBounds, &body, &body,
+      nullptr);
+
+  // Push all arguments and invoke the original method.
+
+  intptr_t type_args_len = 0;
+  if (function.IsGeneric()) {
+    type_args_len = function.NumTypeParameters();
+    ASSERT(parsed_function_->function_type_arguments() != nullptr);
+    body += LoadLocal(parsed_function_->function_type_arguments());
+    body += PushArgument();
+  }
+
+  // Push receiver.
+  ASSERT(function.NumImplicitParameters() == 1);
+  body += LoadLocal(parsed_function_->receiver_var());
+  body += PushArgument();
+
+  body += PushExplicitParameters(function);
+
+  const intptr_t argument_count = function.NumParameters();
+  const auto& argument_names =
+      Array::ZoneHandle(Z, GetOptionalParameterNames(function));
+
+  body += StaticCall(TokenPosition::kNoSource, target, argument_count,
+                     argument_names, ICData::kNoRebind, nullptr, type_args_len);
+
+  // Later optimization passes assume that result of a x.[]=(...) call is not
+  // used. We must guarantee this invariant because violation will lead to an
+  // illegal IL once we replace x.[]=(...) with a sequence that does not
+  // actually produce any value. See http://dartbug.com/29135 for more details.
+  if (name.raw() == Symbols::AssignIndexToken().raw()) {
+    body += Drop();
+    body += NullConstant();
+  }
+
+  body += Return(TokenPosition::kNoSource);
+
+  instruction_cursor->LinkTo(body.entry);
+
+  // When compiling for OSR, use a depth first search to find the OSR
+  // entry and make graph entry jump to it instead of normal entry.
+  // Catch entries are always considered reachable, even if they
+  // become unreachable after OSR.
+  if (IsCompiledForOsr()) {
+    graph_entry_->RelinkToOsrEntry(Z, last_used_block_id_ + 1);
+  }
+  return new (Z) FlowGraph(*parsed_function_, graph_entry_, last_used_block_id_,
+                           prologue_info);
+}
+
+Fragment FlowGraphBuilder::UnboxTruncate(Representation to) {
+  auto* unbox = UnboxInstr::Create(to, Pop(), DeoptId::kNone,
+                                   Instruction::kNotSpeculative);
+  Push(unbox);
+  return Fragment(unbox);
+}
+
+Fragment FlowGraphBuilder::LoadAddressFromFfiPointer() {
+  Fragment test;
+  TargetEntryInstr* null_entry;
+  TargetEntryInstr* not_null_entry;
+  JoinEntryInstr* join = BuildJoinEntry();
+
+  LocalVariable* result = parsed_function_->expression_temp_var();
+
+  LocalVariable* pointer = MakeTemporary();
+  test += LoadLocal(pointer);
+  test += BranchIfNull(&null_entry, &not_null_entry);
+
+  Fragment load_0(null_entry);
+  load_0 += IntConstant(0);
+  load_0 += StoreLocal(TokenPosition::kNoSource, result);
+  load_0 += Drop();
+  load_0 += Goto(join);
+
+  Fragment unbox(not_null_entry);
+  unbox += LoadLocal(pointer);
+  unbox += LoadNativeField(Slot::Pointer_c_memory_address());
+  unbox += StoreLocal(TokenPosition::kNoSource, result);
+  unbox += Drop();
+  unbox += Goto(join);
+
+  Fragment done{test.entry, join};
+  done += Drop();
+  done += LoadLocal(result);
+
+  return done;
+}
+
+Fragment FlowGraphBuilder::Box(Representation from) {
+  BoxInstr* box = BoxInstr::Create(from, Pop());
+  Push(box);
+  return Fragment(box);
+}
+
+Fragment FlowGraphBuilder::FfiUnboxedExtend(Representation representation,
+                                            const AbstractType& ffi_type) {
+  const intptr_t width =
+      compiler::ffi::ElementSizeInBytes(ffi_type.type_class_id());
+  if (width >= compiler::ffi::kMinimumArgumentWidth) return {};
+
+  auto* extend =
+      new (Z) UnboxedWidthExtenderInstr(Pop(), representation, width);
+  Push(extend);
+  return Fragment(extend);
+}
+
+Fragment FlowGraphBuilder::FfiPointerFromAddress(const Type& result_type) {
+  Fragment test;
+  TargetEntryInstr* null_entry;
+  TargetEntryInstr* not_null_entry;
+  JoinEntryInstr* join = BuildJoinEntry();
+
+  LocalVariable* address = MakeTemporary();
+  LocalVariable* result = parsed_function_->expression_temp_var();
+
+  test += LoadLocal(address);
+  test += IntConstant(0);
+  test += BranchIfEqual(&null_entry, &not_null_entry);
+
+  // If the result is 0, we return null because "0 means null".
+  Fragment load_null(null_entry);
+  {
+    load_null += NullConstant();
+    load_null += StoreLocal(TokenPosition::kNoSource, result);
+    load_null += Drop();
+    load_null += Goto(join);
+  }
+
+  Fragment box(not_null_entry);
+  {
+    Class& result_class = Class::ZoneHandle(Z, result_type.type_class());
+    TypeArguments& args = TypeArguments::ZoneHandle(Z, result_type.arguments());
+
+    // A kernel transform for FFI in the front-end ensures that type parameters
+    // do not appear in the type arguments to a any Pointer classes in an FFI
+    // signature.
+    ASSERT(args.IsNull() || args.IsInstantiated());
+
+    box += Constant(args);
+    box += PushArgument();
+    box += AllocateObject(TokenPosition::kNoSource, result_class, 1);
+    LocalVariable* pointer = MakeTemporary();
+    box += LoadLocal(pointer);
+    box += LoadLocal(address);
+    box += StoreInstanceField(TokenPosition::kNoSource,
+                              Slot::Pointer_c_memory_address());
+    box += StoreLocal(TokenPosition::kNoSource, result);
+    box += Drop();
+    box += Goto(join);
+  }
+
+  Fragment rest(test.entry, join);
+  rest += Drop();
+  rest += LoadLocal(result);
+
+  return rest;
+}
+
+Fragment FlowGraphBuilder::BitCast(Representation from, Representation to) {
+  BitCastInstr* instr = new (Z) BitCastInstr(from, to, Pop());
+  Push(instr);
+  return Fragment(instr);
+}
+
+FlowGraph* FlowGraphBuilder::BuildGraphOfFfiTrampoline(
+    const Function& function) {
+#if !defined(TARGET_ARCH_DBC)
+  graph_entry_ =
+      new (Z) GraphEntryInstr(*parsed_function_, Compiler::kNoOSRDeoptId);
+
+  auto normal_entry = BuildFunctionEntry(graph_entry_);
+  graph_entry_->set_normal_entry(normal_entry);
+
+  PrologueInfo prologue_info(-1, -1);
+
+  BlockEntryInstr* instruction_cursor =
+      BuildPrologue(normal_entry, &prologue_info);
+
+  Fragment body(instruction_cursor);
+  body += CheckStackOverflowInPrologue(function.token_pos());
+
+  const Function& signature = Function::ZoneHandle(Z, function.FfiCSignature());
+  const auto& arg_reps = *compiler::ffi::ArgumentRepresentations(signature);
+  const auto& arg_locs = *compiler::ffi::ArgumentLocations(arg_reps);
+
+  BuildArgumentTypeChecks(TypeChecksToBuild::kCheckAllTypeParameterBounds,
+                          &body, &body, &body);
+
+  // Unbox and push the arguments.
+  AbstractType& ffi_type = AbstractType::Handle(Z);
+  for (intptr_t pos = 1; pos < function.num_fixed_parameters(); pos++) {
+    body += LoadLocal(parsed_function_->ParameterVariable(pos));
+    ffi_type = signature.ParameterTypeAt(pos);
+
+    // Check for 'null'. Only ffi.Pointers are allowed to be null.
+    if (!compiler::ffi::NativeTypeIsPointer(ffi_type)) {
+      body += LoadLocal(parsed_function_->ParameterVariable(pos));
+      body <<=
+          new (Z) CheckNullInstr(Pop(), String::ZoneHandle(Z, function.name()),
+                                 GetNextDeoptId(), TokenPosition::kNoSource);
+    }
+
+    if (compiler::ffi::NativeTypeIsPointer(ffi_type)) {
+      body += LoadAddressFromFfiPointer();
+      body += UnboxTruncate(kUnboxedFfiIntPtr);
+    } else {
+      Representation from_rep = compiler::ffi::TypeRepresentation(ffi_type);
+      body += UnboxTruncate(from_rep);
+
+      Representation to_rep = arg_reps[pos - 1];
+      if (from_rep != to_rep) {
+        body += BitCast(from_rep, to_rep);
+      } else {
+        body += FfiUnboxedExtend(from_rep, ffi_type);
+      }
+    }
+  }
+
+  // Push the function pointer, which is stored (boxed) in the first slot of the
+  // context.
+  body += LoadLocal(parsed_function_->ParameterVariable(0));
+  body += LoadNativeField(Slot::Closure_context());
+  body += LoadNativeField(Slot::GetContextVariableSlotFor(
+      thread_, *MakeImplicitClosureScope(
+                    Z, Class::Handle(I->object_store()->ffi_pointer_class()))
+                    ->context_variables()[0]));
+  body += UnboxTruncate(kUnboxedFfiIntPtr);
+  body += FfiCall(signature, arg_reps, arg_locs);
+
+  ffi_type = signature.result_type();
+  if (compiler::ffi::NativeTypeIsPointer(ffi_type)) {
+    body += Box(kUnboxedFfiIntPtr);
+    body += FfiPointerFromAddress(Type::Cast(ffi_type));
+  } else if (compiler::ffi::NativeTypeIsVoid(ffi_type)) {
+    body += Drop();
+    body += NullConstant();
+  } else {
+    Representation from_rep = compiler::ffi::ResultRepresentation(signature);
+    Representation to_rep = compiler::ffi::TypeRepresentation(ffi_type);
+    if (from_rep != to_rep) {
+      body += BitCast(from_rep, to_rep);
+    } else {
+      body += FfiUnboxedExtend(from_rep, ffi_type);
+    }
+    body += Box(to_rep);
+  }
+
+  body += Return(TokenPosition::kNoSource);
+
+  return new (Z) FlowGraph(*parsed_function_, graph_entry_, last_used_block_id_,
+                           prologue_info);
+#else
+  UNREACHABLE();
+#endif
+}
+
 void FlowGraphBuilder::SetCurrentTryCatchBlock(TryCatchBlock* try_catch_block) {
   try_catch_block_ = try_catch_block;
   SetCurrentTryIndex(try_catch_block == nullptr ? kInvalidTryIndex
diff --git a/runtime/vm/compiler/frontend/kernel_to_il.h b/runtime/vm/compiler/frontend/kernel_to_il.h
index 40ea70e..0b18641 100644
--- a/runtime/vm/compiler/frontend/kernel_to_il.h
+++ b/runtime/vm/compiler/frontend/kernel_to_il.h
@@ -41,6 +41,38 @@
   YieldContinuation() : entry(NULL), try_index(kInvalidTryIndex) {}
 };
 
+enum class TypeChecksToBuild {
+  kCheckAllTypeParameterBounds,
+  kCheckNonCovariantTypeParameterBounds,
+  kCheckCovariantTypeParameterBounds,
+};
+
+// Indicates which form of the unchecked entrypoint we are compiling.
+//
+// kNone:
+//
+//   There is no unchecked entrypoint: the unchecked entry is set to NULL in
+//   the 'GraphEntryInstr'.
+//
+// kSeparate:
+//
+//   The normal and unchecked entrypoint each point to their own versions of
+//   the prologue, containing exactly those checks which need to be performed
+//   on either side. Both sides jump directly to the body after performing
+//   their prologue.
+//
+// kSharedWithVariable:
+//
+//   A temporary variable is allocated and initialized to 0 on normal entry
+//   and 2 on unchecked entry. Code which should be ommitted on the unchecked
+//   entrypoint is made conditional on this variable being equal to 0.
+//
+enum class UncheckedEntryPointStyle {
+  kNone = 0,
+  kSeparate = 1,
+  kSharedWithVariable = 2,
+};
+
 class FlowGraphBuilder : public BaseFlowGraphBuilder {
  public:
   FlowGraphBuilder(ParsedFunction* parsed_function,
@@ -59,13 +91,23 @@
   BlockEntryInstr* BuildPrologue(BlockEntryInstr* normal_entry,
                                  PrologueInfo* prologue_info);
 
+  // Return names of optional named parameters of [function].
+  RawArray* GetOptionalParameterNames(const Function& function);
+
+  // Generate fragment which pushes all explicit parameters of [function].
+  Fragment PushExplicitParameters(const Function& function);
+
   FlowGraph* BuildGraphOfMethodExtractor(const Function& method);
   FlowGraph* BuildGraphOfNoSuchMethodDispatcher(const Function& function);
   FlowGraph* BuildGraphOfInvokeFieldDispatcher(const Function& function);
+  FlowGraph* BuildGraphOfFfiTrampoline(const Function& function);
 
   Fragment NativeFunctionBody(const Function& function,
                               LocalVariable* first_parameter);
 
+  Fragment BuildTypedDataViewFactoryConstructor(const Function& function,
+                                                classid_t cid);
+
   Fragment EnterScope(intptr_t kernel_offset,
                       const LocalScope** scope = nullptr);
   Fragment ExitScope(intptr_t kernel_offset);
@@ -83,7 +125,6 @@
   Fragment AllocateObject(TokenPosition position,
                           const Class& klass,
                           intptr_t argument_count);
-  Fragment AllocateObject(const Class& klass, const Function& closure_function);
   Fragment CatchBlockEntry(const Array& handler_types,
                            intptr_t handler_index,
                            bool needs_stacktrace,
@@ -110,9 +151,11 @@
                        intptr_t argument_count,
                        const Array& argument_names,
                        bool use_unchecked_entry = false);
+  Fragment FfiCall(const Function& signature,
+                   const ZoneGrowableArray<Representation>& arg_reps,
+                   const ZoneGrowableArray<Location>& arg_locs);
 
   Fragment RethrowException(TokenPosition position, int catch_try_index);
-  Fragment LoadClassId();
   Fragment LoadLocal(LocalVariable* variable);
   Fragment InitStaticField(const Field& field);
   Fragment NativeCall(const String* name, const Function* function);
@@ -166,8 +209,133 @@
   bool NeedsDebugStepCheck(Value* value, TokenPosition position);
   Fragment DebugStepCheck(TokenPosition position);
 
+  // Truncates (instead of deoptimizing) if the origin does not fit into the
+  // target representation.
+  Fragment UnboxTruncate(Representation to);
+
+  // Sign-extends kUnboxedInt32 and zero-extends kUnboxedUint32.
+  Fragment Box(Representation from);
+
+  // Sign- or zero-extends an integer parameter or return value for an FFI call
+  // as necessary.
+  Fragment FfiUnboxedExtend(Representation representation,
+                            const AbstractType& ffi_type);
+
+  // Pops an 'ffi.Pointer' off the stack.
+  // If it's null, pushes 0.
+  // Otherwise pushes the address (in boxed representation).
+  Fragment LoadAddressFromFfiPointer();
+
+  // Reverse of 'LoadPointerFromFfiPointer':
+  // Pops an integer off the the stack.
+  // If it's zero, pushes null.
+  // If it's nonzero, creates an 'ffi.Pointer' holding the address and pushes
+  // the pointer.
+  Fragment FfiPointerFromAddress(const Type& result_type);
+
+  // Bit-wise cast between representations.
+  // Pops the input and pushes the converted result.
+  // Currently only works with equal sizes and floating point <-> integer.
+  Fragment BitCast(Representation from, Representation to);
+
   LocalVariable* LookupVariable(intptr_t kernel_offset);
 
+  // Build argument type checks for the current function.
+  // ParsedFunction should have the following information:
+  //  - is_forwarding_stub()
+  //  - forwarding_stub_super_target()
+  // Scope should be populated with parameter variables including
+  //  - needs_type_check()
+  //  - is_explicit_covariant_parameter()
+  void BuildArgumentTypeChecks(TypeChecksToBuild mode,
+                               Fragment* explicit_checks,
+                               Fragment* implicit_checks,
+                               Fragment* implicit_redefinitions);
+
+  // Builds flow graph for noSuchMethod forwarder.
+  //
+  // If throw_no_such_method_error is set to true, an
+  // instance of NoSuchMethodError is thrown. Otherwise, the instance
+  // noSuchMethod is called.
+  //
+  // ParsedFunction should have the following information:
+  //  - default_parameter_values()
+  //  - is_forwarding_stub()
+  //  - forwarding_stub_super_target()
+  //
+  // Scope should be populated with parameter variables including
+  //  - needs_type_check()
+  //  - is_explicit_covariant_parameter()
+  //
+  FlowGraph* BuildGraphOfNoSuchMethodForwarder(
+      const Function& function,
+      bool is_implicit_closure_function,
+      bool throw_no_such_method_error);
+
+  // If no type arguments are passed to a generic function, we need to fill the
+  // type arguments in with the default types stored on the TypeParameter nodes
+  // in Kernel.
+  //
+  // ParsedFunction should have the following information:
+  //  - DefaultFunctionTypeArguments()
+  //  - function_type_arguments()
+  Fragment BuildDefaultTypeHandling(const Function& function);
+
+  Fragment BuildEntryPointsIntrospection();
+  FunctionEntryInstr* BuildSharedUncheckedEntryPoint(
+      Fragment prologue_from_normal_entry,
+      Fragment skippable_checks,
+      Fragment redefinitions_if_skipped,
+      Fragment body);
+  FunctionEntryInstr* BuildSeparateUncheckedEntryPoint(
+      BlockEntryInstr* normal_entry,
+      Fragment normal_prologue,
+      Fragment extra_prologue,
+      Fragment shared_prologue,
+      Fragment body);
+  void RecordUncheckedEntryPoint(FunctionEntryInstr* extra_entry);
+
+  // Builds flow graph for implicit closure function (tear-off).
+  //
+  // ParsedFunction should have the following information:
+  //  - DefaultFunctionTypeArguments()
+  //  - function_type_arguments()
+  //  - default_parameter_values()
+  //  - is_forwarding_stub()
+  //  - forwarding_stub_super_target()
+  //
+  // Scope should be populated with parameter variables including
+  //  - needs_type_check()
+  //  - is_explicit_covariant_parameter()
+  //
+  FlowGraph* BuildGraphOfImplicitClosureFunction(const Function& function);
+
+  // Builds flow graph of implicit field getter, setter, or a
+  // dynamic invocation forwarder to a field setter.
+  //
+  // If field is const, its value should be evaluated and stored in
+  //  - StaticValue()
+  //
+  // Scope should be populated with parameter variables including
+  //  - needs_type_check()
+  //
+  FlowGraph* BuildGraphOfFieldAccessor(const Function& function);
+
+  // Builds flow graph of dynamic invocation forwarder.
+  //
+  // ParsedFunction should have the following information:
+  //  - DefaultFunctionTypeArguments()
+  //  - function_type_arguments()
+  //  - default_parameter_values()
+  //  - is_forwarding_stub()
+  //  - forwarding_stub_super_target()
+  //
+  // Scope should be populated with parameter variables including
+  //  - needs_type_check()
+  //  - is_explicit_covariant_parameter()
+  //
+  FlowGraph* BuildGraphOfDynamicInvocationForwarder(const Function& function);
+
   TranslationHelper translation_helper_;
   Thread* thread_;
   Zone* zone_;
@@ -183,6 +351,7 @@
   intptr_t try_depth_;
   intptr_t catch_depth_;
   intptr_t for_in_depth_;
+  intptr_t block_expression_depth_;
 
   GraphEntryInstr* graph_entry_;
 
@@ -235,6 +404,7 @@
   friend class BreakableBlock;
   friend class CatchBlock;
   friend class ConstantEvaluator;
+  friend class ProgramState;
   friend class StreamingFlowGraphBuilder;
   friend class SwitchBlock;
   friend class TryCatchBlock;
@@ -243,6 +413,47 @@
   DISALLOW_COPY_AND_ASSIGN(FlowGraphBuilder);
 };
 
+// Convenience class to save/restore program state.
+// This snapshot denotes a partial state of the flow
+// grap builder that is needed when recursing into
+// the statements and expressions of a finalizer block.
+class ProgramState {
+ public:
+  ProgramState(BreakableBlock* breakable_block,
+               SwitchBlock* switch_block,
+               intptr_t loop_depth,
+               intptr_t for_in_depth,
+               intptr_t try_depth,
+               intptr_t catch_depth,
+               intptr_t block_expression_depth)
+      : breakable_block_(breakable_block),
+        switch_block_(switch_block),
+        loop_depth_(loop_depth),
+        for_in_depth_(for_in_depth),
+        try_depth_(try_depth),
+        catch_depth_(catch_depth),
+        block_expression_depth_(block_expression_depth) {}
+
+  void assignTo(FlowGraphBuilder* builder) const {
+    builder->breakable_block_ = breakable_block_;
+    builder->switch_block_ = switch_block_;
+    builder->loop_depth_ = loop_depth_;
+    builder->for_in_depth_ = for_in_depth_;
+    builder->try_depth_ = try_depth_;
+    builder->catch_depth_ = catch_depth_;
+    builder->block_expression_depth_ = block_expression_depth_;
+  }
+
+ private:
+  BreakableBlock* const breakable_block_;
+  SwitchBlock* const switch_block_;
+  const intptr_t loop_depth_;
+  const intptr_t for_in_depth_;
+  const intptr_t try_depth_;
+  const intptr_t catch_depth_;
+  const intptr_t block_expression_depth_;
+};
+
 class SwitchBlock {
  public:
   SwitchBlock(FlowGraphBuilder* builder, intptr_t case_count)
@@ -266,14 +477,17 @@
   }
 
   // Get destination via absolute target number (i.e. the correct destination
-  // is not not necessarily in this block.
+  // is not necessarily in this block).
   JoinEntryInstr* Destination(intptr_t target_index,
                               TryFinallyBlock** outer_finally = NULL,
                               intptr_t* context_depth = NULL) {
-    // Find corresponding [SwitchStatement].
+    // Verify consistency of program state.
+    ASSERT(builder_->switch_block_ == this);
+    // Find corresponding destination.
     SwitchBlock* block = this;
     while (block->depth_ > target_index) {
       block = block->outer_;
+      ASSERT(block != nullptr);
     }
 
     // Set the outer finally block.
@@ -355,28 +569,34 @@
         outer_(builder->try_finally_block_),
         finalizer_kernel_offset_(finalizer_kernel_offset),
         context_depth_(builder->context_depth_),
+        try_index_(builder_->CurrentTryIndex()),
         // Finalizers are executed outside of the try block hence
         // try depth of finalizers are one less than current try
-        // depth.
-        try_depth_(builder->try_depth_ - 1),
-        try_index_(builder_->CurrentTryIndex()) {
+        // depth. For others, program state is snapshot of current.
+        state_(builder_->breakable_block_,
+               builder_->switch_block_,
+               builder_->loop_depth_,
+               builder_->for_in_depth_,
+               builder_->try_depth_ - 1,
+               builder_->catch_depth_,
+               builder_->block_expression_depth_) {
     builder_->try_finally_block_ = this;
   }
   ~TryFinallyBlock() { builder_->try_finally_block_ = outer_; }
 
+  TryFinallyBlock* outer() const { return outer_; }
   intptr_t finalizer_kernel_offset() const { return finalizer_kernel_offset_; }
   intptr_t context_depth() const { return context_depth_; }
-  intptr_t try_depth() const { return try_depth_; }
   intptr_t try_index() const { return try_index_; }
-  TryFinallyBlock* outer() const { return outer_; }
+  const ProgramState& state() const { return state_; }
 
  private:
   FlowGraphBuilder* const builder_;
   TryFinallyBlock* const outer_;
-  intptr_t finalizer_kernel_offset_;
+  const intptr_t finalizer_kernel_offset_;
   const intptr_t context_depth_;
-  const intptr_t try_depth_;
   const intptr_t try_index_;
+  const ProgramState state_;
 
   DISALLOW_COPY_AND_ASSIGN(TryFinallyBlock);
 };
@@ -406,11 +626,14 @@
   JoinEntryInstr* BreakDestination(intptr_t label_index,
                                    TryFinallyBlock** outer_finally,
                                    intptr_t* context_depth) {
-    BreakableBlock* block = builder_->breakable_block_;
+    // Verify consistency of program state.
+    ASSERT(builder_->breakable_block_ == this);
+    // Find corresponding destination.
+    BreakableBlock* block = this;
     while (block->index_ != label_index) {
       block = block->outer_;
+      ASSERT(block != nullptr);
     }
-    ASSERT(block != NULL);
     *outer_finally = block->outer_finally_;
     *context_depth = block->context_depth_;
     return block->EnsureDestination();
diff --git a/runtime/vm/compiler/frontend/kernel_translation_helper.cc b/runtime/vm/compiler/frontend/kernel_translation_helper.cc
index 082fd39..6f46ea7 100644
--- a/runtime/vm/compiler/frontend/kernel_translation_helper.cc
+++ b/runtime/vm/compiler/frontend/kernel_translation_helper.cc
@@ -25,7 +25,7 @@
     : thread_(thread),
       zone_(thread->zone()),
       isolate_(thread->isolate()),
-      allocation_space_(thread->IsMutatorThread() ? Heap::kNew : Heap::kOld),
+      allocation_space_(Heap::kNew),
       string_offsets_(TypedData::Handle(Z)),
       string_data_(ExternalTypedData::Handle(Z)),
       canonical_names_(TypedData::Handle(Z)),
@@ -82,6 +82,16 @@
   SetKernelProgramInfo(info);
 }
 
+RawGrowableObjectArray* TranslationHelper::EnsurePotentialPragmaFunctions() {
+  auto& funcs =
+      GrowableObjectArray::Handle(Z, info_.potential_pragma_functions());
+  if (funcs.IsNull()) {
+    funcs = GrowableObjectArray::New(16, Heap::kNew);
+    info_.set_potential_pragma_functions(funcs);
+  }
+  return funcs.raw();
+}
+
 void TranslationHelper::SetStringOffsets(const TypedData& string_offsets) {
   ASSERT(string_offsets_.IsNull());
   string_offsets_ = string_offsets.raw();
@@ -598,9 +608,9 @@
     const Class& owner,
     StringIndex constructor_name) {
   GrowableHandlePtrArray<const String> pieces(Z, 3);
-  pieces.Add(DartString(String::Handle(owner.Name()).ToCString(), Heap::kOld));
+  pieces.Add(String::Handle(Z, owner.Name()));
   pieces.Add(Symbols::Dot());
-  String& name = DartString(constructor_name);
+  String& name = DartSymbolPlain(constructor_name);
   pieces.Add(ManglePrivateName(Library::Handle(owner.library()), &name));
 
   String& new_name =
@@ -657,6 +667,34 @@
   return type;
 }
 
+void TranslationHelper::SetupFieldAccessorFunction(
+    const Class& klass,
+    const Function& function,
+    const AbstractType& field_type) {
+  bool is_setter = function.IsImplicitSetterFunction();
+  bool is_method = !function.IsStaticFunction();
+  intptr_t parameter_count = (is_method ? 1 : 0) + (is_setter ? 1 : 0);
+
+  function.SetNumOptionalParameters(0, false);
+  function.set_num_fixed_parameters(parameter_count);
+  function.set_parameter_types(
+      Array::Handle(Z, Array::New(parameter_count, Heap::kOld)));
+  function.set_parameter_names(
+      Array::Handle(Z, Array::New(parameter_count, Heap::kOld)));
+
+  intptr_t pos = 0;
+  if (is_method) {
+    function.SetParameterTypeAt(pos, GetDeclarationType(klass));
+    function.SetParameterNameAt(pos, Symbols::This());
+    pos++;
+  }
+  if (is_setter) {
+    function.SetParameterTypeAt(pos, field_type);
+    function.SetParameterNameAt(pos, Symbols::Value());
+    pos++;
+  }
+}
+
 void TranslationHelper::ReportError(const char* format, ...) {
   const Script& null_script = Script::Handle(Z);
 
@@ -760,56 +798,56 @@
       Tag tag = helper_->ReadTag();  // read tag.
       ASSERT(tag == kFunctionNode);
       if (++next_read_ == field) return;
+      FALL_THROUGH;
     }
-      /* Falls through */
     case kPosition:
       position_ = helper_->ReadPosition();  // read position.
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kEndPosition:
       end_position_ = helper_->ReadPosition();  // read end position.
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kAsyncMarker:
       async_marker_ = static_cast<AsyncMarker>(helper_->ReadByte());
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kDartAsyncMarker:
       dart_async_marker_ = static_cast<AsyncMarker>(
           helper_->ReadByte());  // read dart async marker.
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kTypeParameters:
       helper_->SkipTypeParametersList();  // read type parameters.
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kTotalParameterCount:
       total_parameter_count_ =
           helper_->ReadUInt();  // read total parameter count.
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kRequiredParameterCount:
       required_parameter_count_ =
           helper_->ReadUInt();  // read required parameter count.
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kPositionalParameters:
       helper_->SkipListOfVariableDeclarations();  // read positionals.
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kNamedParameters:
       helper_->SkipListOfVariableDeclarations();  // read named.
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kReturnType:
       helper_->SkipDartType();  // read return type.
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kBody:
       if (helper_->ReadTag() == kSomething)
         helper_->SkipStatement();  // read body.
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kEnd:
       return;
   }
@@ -849,35 +887,35 @@
     case kPosition:
       position_ = helper_->ReadPosition();  // read position.
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kEqualPosition:
       equals_position_ = helper_->ReadPosition();  // read equals position.
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kAnnotations:
       annotation_count_ = helper_->ReadListLength();  // read list length.
       for (intptr_t i = 0; i < annotation_count_; ++i) {
         helper_->SkipExpression();  // read ith expression.
       }
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kFlags:
       flags_ = helper_->ReadFlags();
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kNameIndex:
       name_index_ = helper_->ReadStringReference();  // read name index.
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kType:
       helper_->SkipDartType();  // read type.
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kInitializer:
       if (helper_->ReadTag() == kSomething)
         helper_->SkipExpression();  // read initializer.
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kEnd:
       return;
   }
@@ -900,48 +938,48 @@
       Tag tag = helper_->ReadTag();  // read tag.
       ASSERT(tag == kField);
       if (++next_read_ == field) return;
+      FALL_THROUGH;
     }
-      /* Falls through */
     case kCanonicalName:
       canonical_name_ =
           helper_->ReadCanonicalNameReference();  // read canonical_name.
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kSourceUriIndex:
       source_uri_index_ = helper_->ReadUInt();  // read source_uri_index.
       helper_->set_current_script_id(source_uri_index_);
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kPosition:
       position_ = helper_->ReadPosition(false);  // read position.
       helper_->RecordTokenPosition(position_);
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kEndPosition:
       end_position_ = helper_->ReadPosition(false);  // read end position.
       helper_->RecordTokenPosition(end_position_);
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kFlags:
       flags_ = helper_->ReadFlags();
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kName:
       helper_->SkipName();  // read name.
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kAnnotations: {
       annotation_count_ = helper_->ReadListLength();  // read list length.
       for (intptr_t i = 0; i < annotation_count_; ++i) {
         helper_->SkipExpression();  // read ith expression.
       }
       if (++next_read_ == field) return;
+      FALL_THROUGH;
     }
-      /* Falls through */
     case kType:
       helper_->SkipDartType();  // read type.
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kInitializer:
       if (helper_->ReadTag() == kSomething) {
         if (detect_function_literal_initializer &&
@@ -961,7 +999,7 @@
         helper_->SkipExpression();  // read initializer.
       }
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kEnd:
       return;
   }
@@ -976,67 +1014,67 @@
       Tag tag = helper_->ReadTag();  // read tag.
       ASSERT(tag == kProcedure);
       if (++next_read_ == field) return;
+      FALL_THROUGH;
     }
-      /* Falls through */
     case kCanonicalName:
       canonical_name_ =
           helper_->ReadCanonicalNameReference();  // read canonical_name.
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kSourceUriIndex:
       source_uri_index_ = helper_->ReadUInt();  // read source_uri_index.
       helper_->set_current_script_id(source_uri_index_);
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kStartPosition:
       start_position_ = helper_->ReadPosition(false);  // read position.
       helper_->RecordTokenPosition(start_position_);
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kPosition:
       position_ = helper_->ReadPosition(false);  // read position.
       helper_->RecordTokenPosition(position_);
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kEndPosition:
       end_position_ = helper_->ReadPosition(false);  // read end position.
       helper_->RecordTokenPosition(end_position_);
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kKind:
       kind_ = static_cast<Kind>(helper_->ReadByte());
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kFlags:
       flags_ = helper_->ReadFlags();
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kName:
       helper_->SkipName();  // read name.
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kAnnotations: {
       annotation_count_ = helper_->ReadListLength();  // read list length.
       for (intptr_t i = 0; i < annotation_count_; ++i) {
         helper_->SkipExpression();  // read ith expression.
       }
       if (++next_read_ == field) return;
+      FALL_THROUGH;
     }
-      /* Falls through */
     case kForwardingStubSuperTarget:
       forwarding_stub_super_target_ = helper_->ReadCanonicalNameReference();
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kForwardingStubInterfaceTarget:
       helper_->ReadCanonicalNameReference();
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kFunction:
       if (helper_->ReadTag() == kSomething) {
         helper_->SkipFunctionNode();  // read function node.
       }
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kEnd:
       return;
   }
@@ -1051,53 +1089,53 @@
       Tag tag = helper_->ReadTag();  // read tag.
       ASSERT(tag == kConstructor);
       if (++next_read_ == field) return;
+      FALL_THROUGH;
     }
-      /* Falls through */
     case kCanonicalName:
       canonical_name_ =
           helper_->ReadCanonicalNameReference();  // read canonical_name.
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kSourceUriIndex:
       source_uri_index_ = helper_->ReadUInt();  // read source_uri_index.
       helper_->set_current_script_id(source_uri_index_);
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kStartPosition:
       start_position_ = helper_->ReadPosition();  // read position.
       helper_->RecordTokenPosition(start_position_);
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kPosition:
       position_ = helper_->ReadPosition();  // read position.
       helper_->RecordTokenPosition(position_);
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kEndPosition:
       end_position_ = helper_->ReadPosition();  // read end position.
       helper_->RecordTokenPosition(end_position_);
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kFlags:
       flags_ = helper_->ReadFlags();
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kName:
       helper_->SkipName();  // read name.
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kAnnotations: {
       annotation_count_ = helper_->ReadListLength();  // read list length.
       for (intptr_t i = 0; i < annotation_count_; ++i) {
         helper_->SkipExpression();  // read ith expression.
       }
       if (++next_read_ == field) return;
+      FALL_THROUGH;
     }
-      /* Falls through */
     case kFunction:
       helper_->SkipFunctionNode();  // read function.
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kInitializers: {
       intptr_t list_length =
           helper_->ReadListLength();  // read initializers list length.
@@ -1106,7 +1144,7 @@
       }
       if (++next_read_ == field) return;
     }
-      /* Falls through */
+      FALL_THROUGH;
     case kEnd:
       return;
   }
@@ -1121,73 +1159,73 @@
       Tag tag = helper_->ReadTag();  // read tag.
       ASSERT(tag == kClass);
       if (++next_read_ == field) return;
+      FALL_THROUGH;
     }
-      /* Falls through */
     case kCanonicalName:
       canonical_name_ =
           helper_->ReadCanonicalNameReference();  // read canonical_name.
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kSourceUriIndex:
       source_uri_index_ = helper_->ReadUInt();  // read source_uri_index.
       helper_->set_current_script_id(source_uri_index_);
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kStartPosition:
       start_position_ = helper_->ReadPosition(false);  // read position.
       helper_->RecordTokenPosition(start_position_);
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kPosition:
       position_ = helper_->ReadPosition(false);  // read position.
       helper_->RecordTokenPosition(position_);
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kEndPosition:
       end_position_ = helper_->ReadPosition();  // read end position.
       helper_->RecordTokenPosition(end_position_);
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kFlags:
       flags_ = helper_->ReadFlags();  // read flags.
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kNameIndex:
       name_index_ = helper_->ReadStringReference();  // read name index.
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kAnnotations: {
       annotation_count_ = helper_->ReadListLength();  // read list length.
       for (intptr_t i = 0; i < annotation_count_; ++i) {
         helper_->SkipExpression();  // read ith expression.
       }
       if (++next_read_ == field) return;
+      FALL_THROUGH;
     }
-      /* Falls through */
     case kTypeParameters:
       helper_->SkipTypeParametersList();  // read type parameters.
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kSuperClass: {
       Tag type_tag = helper_->ReadTag();  // read super class type (part 1).
       if (type_tag == kSomething) {
         helper_->SkipDartType();  // read super class type (part 2).
       }
       if (++next_read_ == field) return;
+      FALL_THROUGH;
     }
-      /* Falls through */
     case kMixinType: {
       Tag type_tag = helper_->ReadTag();  // read mixin type (part 1).
       if (type_tag == kSomething) {
         helper_->SkipDartType();  // read mixin type (part 2).
       }
       if (++next_read_ == field) return;
+      FALL_THROUGH;
     }
-      /* Falls through */
     case kImplementedClasses:
       helper_->SkipListOfDartTypes();  // read implemented_classes.
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kFields: {
       intptr_t list_length =
           helper_->ReadListLength();  // read fields list length.
@@ -1196,8 +1234,8 @@
         field_helper.ReadUntilExcluding(FieldHelper::kEnd);  // read field.
       }
       if (++next_read_ == field) return;
+      FALL_THROUGH;
     }
-      /* Falls through */
     case kConstructors: {
       intptr_t list_length =
           helper_->ReadListLength();  // read constructors list length.
@@ -1207,8 +1245,8 @@
             ConstructorHelper::kEnd);  // read constructor.
       }
       if (++next_read_ == field) return;
+      FALL_THROUGH;
     }
-      /* Falls through */
     case kProcedures: {
       procedure_count_ = helper_->ReadListLength();  // read procedures #.
       for (intptr_t i = 0; i < procedure_count_; i++) {
@@ -1217,8 +1255,8 @@
             ProcedureHelper::kEnd);  // read procedure.
       }
       if (++next_read_ == field) return;
+      FALL_THROUGH;
     }
-      /* Falls through */
     case kClassIndex:
       // Read class index.
       for (intptr_t i = 0; i < procedure_count_; ++i) {
@@ -1227,7 +1265,7 @@
       helper_->reader_.ReadUInt32();
       helper_->reader_.ReadUInt32();
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kEnd:
       return;
   }
@@ -1241,34 +1279,34 @@
     case kFlags: {
       flags_ = helper_->ReadFlags();
       if (++next_read_ == field) return;
+      FALL_THROUGH;
     }
-      /* Falls through */
     case kCanonicalName:
       canonical_name_ =
           helper_->ReadCanonicalNameReference();  // read canonical_name.
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kName:
       name_index_ = helper_->ReadStringReference();  // read name index.
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kSourceUriIndex:
       source_uri_index_ = helper_->ReadUInt();  // read source_uri_index.
       helper_->set_current_script_id(source_uri_index_);
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kProblemsAsJson: {
       intptr_t length = helper_->ReadUInt();  // read length of table.
       for (intptr_t i = 0; i < length; ++i) {
         helper_->SkipBytes(helper_->ReadUInt());  // read strings.
       }
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     }
     case kAnnotations:
       helper_->SkipListOfExpressions();  // read annotations.
       if (++next_read_ == field) return;
-      /* Falls through */
+      FALL_THROUGH;
     case kDependencies: {
       intptr_t dependency_count = helper_->ReadUInt();  // read list length.
       for (intptr_t i = 0; i < dependency_count; ++i) {
@@ -1276,73 +1314,6 @@
       }
       if (++next_read_ == field) return;
     }
-      /* Falls through */
-    case kAdditionalExports: {
-      intptr_t name_count = helper_->ReadUInt();
-      for (intptr_t i = 0; i < name_count; ++i) {
-        helper_->SkipCanonicalNameReference();
-      }
-      if (++next_read_ == field) return;
-    }
-      /* Falls through */
-    case kParts: {
-      intptr_t part_count = helper_->ReadUInt();  // read list length.
-      for (intptr_t i = 0; i < part_count; ++i) {
-        helper_->SkipLibraryPart();
-      }
-      if (++next_read_ == field) return;
-    }
-      /* Falls through */
-    case kTypedefs: {
-      intptr_t typedef_count = helper_->ReadListLength();  // read list length.
-      for (intptr_t i = 0; i < typedef_count; i++) {
-        helper_->SkipLibraryTypedef();
-      }
-      if (++next_read_ == field) return;
-    }
-      /* Falls through */
-    case kClasses: {
-      class_count_ = helper_->ReadListLength();  // read list length.
-      for (intptr_t i = 0; i < class_count_; ++i) {
-        ClassHelper class_helper(helper_);
-        class_helper.ReadUntilExcluding(ClassHelper::kEnd);
-      }
-      if (++next_read_ == field) return;
-    }
-      /* Falls through */
-    case kToplevelField: {
-      intptr_t field_count = helper_->ReadListLength();  // read list length.
-      for (intptr_t i = 0; i < field_count; ++i) {
-        FieldHelper field_helper(helper_);
-        field_helper.ReadUntilExcluding(FieldHelper::kEnd);
-      }
-      if (++next_read_ == field) return;
-    }
-      /* Falls through */
-    case kToplevelProcedures: {
-      procedure_count_ = helper_->ReadListLength();  // read list length.
-      for (intptr_t i = 0; i < procedure_count_; ++i) {
-        ProcedureHelper procedure_helper(helper_);
-        procedure_helper.ReadUntilExcluding(ProcedureHelper::kEnd);
-      }
-      if (++next_read_ == field) return;
-    }
-      /* Falls through */
-    case kLibraryIndex:
-      // Read library index.
-      for (intptr_t i = 0; i < class_count_; ++i) {
-        helper_->reader_.ReadUInt32();
-      }
-      helper_->reader_.ReadUInt32();
-      helper_->reader_.ReadUInt32();
-      for (intptr_t i = 0; i < procedure_count_; ++i) {
-        helper_->reader_.ReadUInt32();
-      }
-      helper_->reader_.ReadUInt32();
-      helper_->reader_.ReadUInt32();
-      if (++next_read_ == field) return;
-      /* Falls through */
-    case kEnd:
       return;
   }
 }
@@ -1355,31 +1326,31 @@
     case kFileOffset: {
       helper_->ReadPosition();
       if (++next_read_ == field) return;
+      FALL_THROUGH;
     }
-      /* Falls through */
     case kFlags: {
       flags_ = helper_->ReadFlags();
       if (++next_read_ == field) return;
+      FALL_THROUGH;
     }
-      /* Falls through */
     case kAnnotations: {
       annotation_count_ = helper_->ReadListLength();
       for (intptr_t i = 0; i < annotation_count_; ++i) {
         helper_->SkipExpression();  // read ith expression.
       }
       if (++next_read_ == field) return;
+      FALL_THROUGH;
     }
-      /* Falls through */
     case kTargetLibrary: {
       target_library_canonical_name_ = helper_->ReadCanonicalNameReference();
       if (++next_read_ == field) return;
+      FALL_THROUGH;
     }
-      /* Falls through */
     case kName: {
       name_index_ = helper_->ReadStringReference();
       if (++next_read_ == field) return;
+      FALL_THROUGH;
     }
-      /* Falls through */
     case kCombinators: {
       intptr_t count = helper_->ReadListLength();
       for (intptr_t i = 0; i < count; ++i) {
@@ -1389,8 +1360,8 @@
         helper_->SkipListOfStrings();
       }
       if (++next_read_ == field) return;
+      FALL_THROUGH;
     }
-      /* Falls through */
     case kEnd:
       return;
   }
@@ -1894,9 +1865,8 @@
 }
 
 void KernelReaderHelper::ReportUnexpectedTag(const char* variant, Tag tag) {
-  H.ReportError(script_, TokenPosition::kNoSource,
-                "Unexpected tag %d (%s) in ?, expected %s", tag,
-                Reader::TagName(tag), variant);
+  FATAL3("Unexpected tag %d (%s) in ?, expected %s", tag, Reader::TagName(tag),
+         variant);
 }
 
 void KernelReaderHelper::ReadUntilFunctionNode() {
@@ -2197,6 +2167,14 @@
       ReadPosition();           // read position.
       SkipListOfExpressions();  // read list of expressions.
       return;
+    case kListConcatenation:
+    case kSetConcatenation:
+    case kMapConcatenation:
+    case kInstanceCreation:
+      // Collection concatenation and instance creation operations are removed
+      // by the constant evaluator.
+      UNREACHABLE();
+      break;
     case kIsExpression:
       ReadPosition();    // read position.
       SkipExpression();  // read operand.
@@ -2255,6 +2233,10 @@
       SkipVariableDeclaration();  // read variable declaration.
       SkipExpression();           // read expression.
       return;
+    case kBlockExpression:
+      SkipStatementList();
+      SkipExpression();  // read expression.
+      return;
     case kInstantiation:
       SkipExpression();       // read expression.
       SkipListOfDartTypes();  // read type arguments.
@@ -2283,6 +2265,11 @@
     case kNullLiteral:
       return;
     case kConstantExpression:
+      ReadPosition();  // read position.
+      SkipDartType();  // read type.
+      SkipConstantReference();
+      return;
+    case kDeprecated_ConstantExpression:
       SkipConstantReference();
       return;
     case kLoadLibrary:
@@ -2606,6 +2593,26 @@
   return line_starts_data.raw();
 }
 
+String& KernelReaderHelper::SourceTableImportUriFor(intptr_t index,
+                                                    uint32_t binaryVersion) {
+  if (binaryVersion < 22) {
+    return SourceTableUriFor(index);
+  }
+
+  AlternativeReadingScope alt(&reader_);
+  SetOffset(GetOffsetForSourceInfo(index));
+  SkipBytes(ReadUInt());                         // skip uri.
+  SkipBytes(ReadUInt());                         // skip source.
+  const intptr_t line_start_count = ReadUInt();  // read number of line start
+                                                 // entries.
+  for (intptr_t i = 0; i < line_start_count; ++i) {
+    ReadUInt();
+  }
+
+  intptr_t size = ReadUInt();  // read import uri List<byte> size.
+  return H.DartString(reader_.BufferAt(ReaderOffset()), size, Heap::kOld);
+}
+
 intptr_t ActiveClass::MemberTypeParameterCount(Zone* zone) {
   ASSERT(member != NULL);
   if (member->IsFactory()) {
@@ -3049,7 +3056,8 @@
           set_on_class ? *active_class->klass : Class::Handle(Z),
           parameterized_function, i,
           H.DartIdentifier(lib, helper.name_index_),  // read ith name index.
-          null_bound, TokenPosition::kNoSource);
+          null_bound, helper.IsGenericCovariantImpl(),
+          TokenPosition::kNoSource);
       type_parameters.SetTypeAt(i, parameter);
     }
   }
diff --git a/runtime/vm/compiler/frontend/kernel_translation_helper.h b/runtime/vm/compiler/frontend/kernel_translation_helper.h
index d50712e..9508b70 100644
--- a/runtime/vm/compiler/frontend/kernel_translation_helper.h
+++ b/runtime/vm/compiler/frontend/kernel_translation_helper.h
@@ -59,6 +59,8 @@
   const Array& constants() { return constants_; }
   void SetConstants(const Array& constants);
 
+  RawGrowableObjectArray* EnsurePotentialPragmaFunctions();
+
   void SetKernelProgramInfo(const KernelProgramInfo& info);
 
   intptr_t StringOffset(StringIndex index) const;
@@ -156,6 +158,10 @@
 
   Type& GetDeclarationType(const Class& klass);
 
+  void SetupFieldAccessorFunction(const Class& klass,
+                                  const Function& function,
+                                  const AbstractType& field_type);
+
   void ReportError(const char* format, ...) PRINTF_ATTRIBUTE(2, 3);
   void ReportError(const Script& script,
                    const TokenPosition position,
@@ -702,14 +708,17 @@
     kProblemsAsJson,
     kAnnotations,
     kDependencies,
-    kAdditionalExports,
-    kParts,
-    kTypedefs,
-    kClasses,
-    kToplevelField,
-    kToplevelProcedures,
-    kLibraryIndex,
-    kEnd,
+    // There are other fields in a library:
+    // * kAdditionalExports
+    // * kParts
+    // * kTypedefs
+    // * kClasses
+    // * kToplevelField
+    // * kToplevelProcedures
+    // * kSourceReferences
+    // * kLibraryIndex
+    // but we never read them via this helper and it makes extending the format
+    // harder to keep the code around.
   };
 
   enum Flag {
@@ -736,8 +745,6 @@
   NameIndex canonical_name_;
   StringIndex name_index_;
   intptr_t source_uri_index_;
-  intptr_t class_count_;
-  intptr_t procedure_count_;
 
  private:
   KernelReaderHelper* helper_;
@@ -1061,6 +1068,7 @@
   String& SourceTableUriFor(intptr_t index);
   const String& GetSourceFor(intptr_t index);
   RawTypedData* GetLineStartsFor(intptr_t index);
+  String& SourceTableImportUriFor(intptr_t index, uint32_t binaryVersion);
 
   Zone* zone_;
   TranslationHelper& translation_helper_;
diff --git a/runtime/vm/compiler/frontend/prologue_builder.cc b/runtime/vm/compiler/frontend/prologue_builder.cc
index 1149d15..f0cb2cf 100644
--- a/runtime/vm/compiler/frontend/prologue_builder.cc
+++ b/runtime/vm/compiler/frontend/prologue_builder.cc
@@ -21,6 +21,14 @@
 
 #define Z (zone_)
 
+// Returns static type of the parameter if it can be trusted (was type checked
+// by caller) and dynamic otherwise.
+static CompileType ParameterType(LocalVariable* param) {
+  return param->was_type_checked_by_caller()
+             ? CompileType::FromAbstractType(param->type())
+             : CompileType::Dynamic();
+}
+
 bool PrologueBuilder::PrologueSkippableOnUncheckedEntry(
     const Function& function) {
   return !function.HasOptionalParameters() &&
@@ -29,7 +37,7 @@
 
 bool PrologueBuilder::HasEmptyPrologue(const Function& function) {
   return !function.HasOptionalParameters() && !function.IsGeneric() &&
-         !function.IsClosureFunction();
+         !function.CanReceiveDynamicInvocation();
 }
 
 BlockEntryInstr* PrologueBuilder::BuildPrologue(BlockEntryInstr* entry,
@@ -41,7 +49,7 @@
 
   const bool load_optional_arguments = function_.HasOptionalParameters();
   const bool expect_type_args = function_.IsGeneric();
-  const bool check_arguments = function_.IsClosureFunction();
+  const bool check_arguments = function_.CanReceiveDynamicInvocation();
 
   Fragment prologue = Fragment(entry);
   JoinEntryInstr* nsm = NULL;
@@ -73,12 +81,13 @@
 
   // Always do this to preserve deoptid numbering.
   JoinEntryInstr* normal_code = BuildJoinEntry();
-  prologue += Goto(normal_code);
+  Fragment jump_to_normal_code = Goto(normal_code);
 
   if (is_empty_prologue) {
     *prologue_info = PrologueInfo(-1, -1);
     return entry;
   } else {
+    prologue += jump_to_normal_code;
     *prologue_info =
         PrologueInfo(previous_block_id, normal_code->block_id() - 1);
     return normal_code;
@@ -182,7 +191,8 @@
     copy_args_prologue += LoadLocal(optional_count_var);
     copy_args_prologue += LoadFpRelativeSlot(
         kWordSize * (compiler::target::frame_layout.param_end_from_fp +
-                     num_fixed_params - param));
+                     num_fixed_params - param),
+        ParameterType(ParameterVariable(param)));
     copy_args_prologue +=
         StoreLocalRaw(TokenPosition::kNoSource, ParameterVariable(param));
     copy_args_prologue += Drop();
@@ -202,7 +212,8 @@
       good += LoadLocal(optional_count_var);
       good += LoadFpRelativeSlot(
           kWordSize * (compiler::target::frame_layout.param_end_from_fp +
-                       num_fixed_params - param));
+                       num_fixed_params - param),
+          ParameterType(ParameterVariable(param)));
       good += StoreLocalRaw(TokenPosition::kNoSource, ParameterVariable(param));
       good += Drop();
 
@@ -300,7 +311,8 @@
         }
         good += SmiBinaryOp(Token::kSUB, /* truncate= */ true);
         good += LoadFpRelativeSlot(
-            kWordSize * compiler::target::frame_layout.param_end_from_fp);
+            kWordSize * compiler::target::frame_layout.param_end_from_fp,
+            ParameterType(ParameterVariable(opt_param_position[i])));
 
         // Copy down.
         good += StoreLocalRaw(TokenPosition::kNoSource,
@@ -383,9 +395,7 @@
 }
 
 Fragment PrologueBuilder::BuildClosureContextHandling() {
-  LocalScope* scope = parsed_function_->node_sequence()->scope();
-  LocalVariable* closure_parameter = scope->VariableAt(0);
-
+  LocalVariable* closure_parameter = parsed_function_->ParameterVariable(0);
   LocalVariable* context = parsed_function_->current_context_var();
 
   // Load closure.context & store it into the context variable.
@@ -407,7 +417,8 @@
   store_type_args += LoadArgDescriptor();
   store_type_args += LoadNativeField(Slot::ArgumentsDescriptor_count());
   store_type_args += LoadFpRelativeSlot(
-      kWordSize * (1 + compiler::target::frame_layout.param_end_from_fp));
+      kWordSize * (1 + compiler::target::frame_layout.param_end_from_fp),
+      CompileType::CreateNullable(/*is_nullable=*/true, kTypeArgumentsCid));
   store_type_args += StoreLocal(TokenPosition::kNoSource, type_args_var);
   store_type_args += Drop();
 
@@ -419,8 +430,7 @@
   handling += TestTypeArgsLen(store_null, store_type_args, 0);
 
   if (parsed_function_->function().IsClosureFunction()) {
-    LocalVariable* closure =
-        parsed_function_->node_sequence()->scope()->VariableAt(0);
+    LocalVariable* closure = parsed_function_->ParameterVariable(0);
 
     // Currently, delayed type arguments can only be introduced through type
     // inference in the FE. So if they are present, we can assume they are
diff --git a/runtime/vm/compiler/frontend/scope_builder.cc b/runtime/vm/compiler/frontend/scope_builder.cc
index d585002..268e3d9 100644
--- a/runtime/vm/compiler/frontend/scope_builder.cc
+++ b/runtime/vm/compiler/frontend/scope_builder.cc
@@ -5,7 +5,6 @@
 #include "vm/compiler/frontend/scope_builder.h"
 
 #include "vm/compiler/backend/il.h"  // For CompileType.
-#include "vm/kernel.h"               // For IsFieldInitializer.
 
 #if !defined(DART_PRECOMPILED_RUNTIME)
 
@@ -96,14 +95,15 @@
     // load instantiator type arguments if they are needed.
     Class& klass = Class::Handle(Z, function.Owner());
     Type& klass_type = H.GetDeclarationType(klass);
-    result_->this_variable =
+    LocalVariable* receiver_variable =
         MakeVariable(TokenPosition::kNoSource, TokenPosition::kNoSource,
                      Symbols::This(), klass_type);
-    result_->this_variable->set_is_captured();
+    parsed_function_->set_receiver_var(receiver_variable);
+    receiver_variable->set_is_captured();
     enclosing_scope = new (Z) LocalScope(NULL, 0, 0);
     enclosing_scope->set_context_level(0);
-    enclosing_scope->AddVariable(result_->this_variable);
-    enclosing_scope->AddContextVariable(result_->this_variable);
+    enclosing_scope->AddVariable(receiver_variable);
+    enclosing_scope->AddContextVariable(receiver_variable);
   } else if (function.IsLocalFunction()) {
     enclosing_scope = LocalScope::RestoreOuterScope(
         ContextScope::Handle(Z, function.context_scope()));
@@ -126,6 +126,10 @@
     scope_->AddVariable(parsed_function_->arg_desc_var());
   }
 
+  if (parsed_function_->function().IsFfiTrampoline()) {
+    needs_expr_temp_ = true;
+  }
+
   LocalVariable* context_var = parsed_function_->current_context_var();
   context_var->set_is_forced_stack();
   scope_->AddVariable(context_var);
@@ -170,7 +174,7 @@
             MakeVariable(TokenPosition::kNoSource, TokenPosition::kNoSource,
                          Symbols::This(), klass_type);
         scope_->InsertParameterAt(pos++, variable);
-        result_->this_variable = variable;
+        parsed_function_->set_receiver_var(variable);
 
         // We visit instance field initializers because they might contain
         // [Let] expressions and we need to have a mapping.
@@ -279,7 +283,7 @@
             MakeVariable(TokenPosition::kNoSource, TokenPosition::kNoSource,
                          Symbols::This(), klass_type);
         scope_->InsertParameterAt(pos++, variable);
-        result_->this_variable = variable;
+        parsed_function_->set_receiver_var(variable);
       }
       if (is_setter) {
         result_->setter_value = MakeVariable(
@@ -290,12 +294,10 @@
 
         if (is_method &&
             MethodCanSkipTypeChecksForNonCovariantArguments(function, attrs)) {
-          FieldHelper field_helper(&helper_);
-          field_helper.ReadUntilIncluding(FieldHelper::kFlags);
-
-          if (field_helper.IsCovariant()) {
+          const auto& field = Field::Handle(Z, function.accessor_field());
+          if (field.is_covariant()) {
             result_->setter_value->set_is_explicit_covariant_parameter();
-          } else if (!field_helper.IsGenericCovariantImpl() ||
+          } else if (!field.is_generic_covariant_impl() ||
                      (!attrs.has_non_this_uses && !attrs.has_tearoff_uses)) {
             result_->setter_value->set_type_check_mode(
                 LocalVariable::kTypeCheckedByCaller);
@@ -310,26 +312,31 @@
       // In addition to static field initializers, scopes/local variables
       // are needed for implicit getters of static const fields, in order to
       // be able to evaluate their initializers in constant evaluator.
-      if (IsFieldInitializer(function, Z) ||
-          Field::Handle(Z, function.accessor_field()).is_const()) {
+      if (Field::Handle(Z, function.accessor_field()).is_const()) {
         VisitNode();
       }
       break;
     }
+    case RawFunction::kStaticFieldInitializer: {
+      ASSERT(helper_.PeekTag() == kField);
+      ASSERT(function.IsStaticFunction());
+      VisitNode();
+      break;
+    }
     case RawFunction::kDynamicInvocationForwarder: {
       if (helper_.PeekTag() == kField) {
 #ifdef DEBUG
         String& name = String::Handle(Z, function.name());
-        ASSERT(Function::IsDynamicInvocationForwaderName(name));
+        ASSERT(Function::IsDynamicInvocationForwarderName(name));
         name = Function::DemangleDynamicInvocationForwarderName(name);
         ASSERT(Field::IsSetterName(name));
 #endif
         // Create [this] variable.
         const Class& klass = Class::Handle(Z, function.Owner());
-        result_->this_variable =
+        parsed_function_->set_receiver_var(
             MakeVariable(TokenPosition::kNoSource, TokenPosition::kNoSource,
-                         Symbols::This(), H.GetDeclarationType(klass));
-        scope_->InsertParameterAt(0, result_->this_variable);
+                         Symbols::This(), H.GetDeclarationType(klass)));
+        scope_->InsertParameterAt(0, parsed_function_->receiver_var());
 
         // Create setter value variable.
         result_->setter_value = MakeVariable(
@@ -345,10 +352,10 @@
         // Create [this] variable.
         intptr_t pos = 0;
         Class& klass = Class::Handle(Z, function.Owner());
-        result_->this_variable =
+        parsed_function_->set_receiver_var(
             MakeVariable(TokenPosition::kNoSource, TokenPosition::kNoSource,
-                         Symbols::This(), H.GetDeclarationType(klass));
-        scope_->InsertParameterAt(pos++, result_->this_variable);
+                         Symbols::This(), H.GetDeclarationType(klass)));
+        scope_->InsertParameterAt(pos++, parsed_function_->receiver_var());
 
         // Create all positional and named parameters.
         AddPositionalAndNamedParameters(
@@ -368,22 +375,24 @@
           MakeVariable(TokenPosition::kNoSource, TokenPosition::kNoSource,
                        Symbols::This(), klass_type);
       scope_->InsertParameterAt(0, variable);
-      result_->this_variable = variable;
+      parsed_function_->set_receiver_var(variable);
       break;
     }
     case RawFunction::kNoSuchMethodDispatcher:
     case RawFunction::kInvokeFieldDispatcher:
+    case RawFunction::kFfiTrampoline:
       for (intptr_t i = 0; i < function.NumParameters(); ++i) {
-        LocalVariable* variable =
-            MakeVariable(TokenPosition::kNoSource, TokenPosition::kNoSource,
-                         String::ZoneHandle(Z, function.ParameterNameAt(i)),
-                         AbstractType::dynamic_type());
+        LocalVariable* variable = MakeVariable(
+            TokenPosition::kNoSource, TokenPosition::kNoSource,
+            String::ZoneHandle(Z, function.ParameterNameAt(i)),
+            AbstractType::ZoneHandle(Z, function.IsFfiTrampoline()
+                                            ? function.ParameterTypeAt(i)
+                                            : Object::dynamic_type().raw()));
         scope_->InsertParameterAt(i, variable);
       }
       break;
     case RawFunction::kSignatureFunction:
     case RawFunction::kIrregexpFunction:
-    case RawFunction::kFfiTrampoline:
       UNREACHABLE();
   }
   if (needs_expr_temp_) {
@@ -513,12 +522,11 @@
   }
 
   if (function_node_helper.async_marker_ == FunctionNodeHelper::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(offset + i)->set_is_forced_stack();
+      parsed_function_->ParameterVariable(offset + i)->set_is_forced_stack();
     }
   }
 
@@ -678,13 +686,13 @@
       VisitExpression();                     // read value·
       return;
     case kSuperPropertyGet:
-      HandleSpecialLoad(&result_->this_variable, Symbols::This());
+      HandleLoadReceiver();
       helper_.ReadPosition();                // read position.
       helper_.SkipName();                    // read name.
       helper_.SkipCanonicalNameReference();  // read target_reference.
       return;
     case kSuperPropertySet:
-      HandleSpecialLoad(&result_->this_variable, Symbols::This());
+      HandleLoadReceiver();
       helper_.ReadPosition();                // read position.
       helper_.SkipName();                    // read name.
       VisitExpression();                     // read value.
@@ -714,7 +722,7 @@
       VisitArguments();                      // read arguments.
       return;
     case kSuperMethodInvocation:
-      HandleSpecialLoad(&result_->this_variable, Symbols::This());
+      HandleLoadReceiver();
       helper_.ReadPosition();  // read position.
       helper_.SkipName();      // read name.
       VisitArguments();        // read arguments.
@@ -758,6 +766,14 @@
       }
       return;
     }
+    case kListConcatenation:
+    case kSetConcatenation:
+    case kMapConcatenation:
+    case kInstanceCreation:
+      // Collection concatenation and instance creation operations are removed
+      // by the constant evaluator.
+      UNREACHABLE();
+      break;
     case kIsExpression:
       helper_.ReadPosition();  // read position.
       VisitExpression();       // read operand.
@@ -776,7 +792,7 @@
       VisitDartType();  // read type.
       return;
     case kThisExpression:
-      HandleSpecialLoad(&result_->this_variable, Symbols::This());
+      HandleLoadReceiver();
       return;
     case kRethrow:
       helper_.ReadPosition();  // read position.
@@ -832,6 +848,22 @@
       ExitScope(helper_.reader_.min_position(), helper_.reader_.max_position());
       return;
     }
+    case kBlockExpression: {
+      PositionScope scope(&helper_.reader_);
+      intptr_t offset = helper_.ReaderOffset() - 1;  // -1 to include tag byte.
+
+      EnterScope(offset);
+
+      intptr_t list_length =
+          helper_.ReadListLength();  // read number of statements.
+      for (intptr_t i = 0; i < list_length; ++i) {
+        VisitStatement();  // read ith statement.
+      }
+      VisitExpression();  // read expression.
+
+      ExitScope(helper_.reader_.min_position(), helper_.reader_.max_position());
+      return;
+    }
     case kBigIntLiteral:
       helper_.SkipStringReference();  // read string reference.
       return;
@@ -855,7 +887,12 @@
       return;
     case kNullLiteral:
       return;
-    case kConstantExpression: {
+    case kConstantExpression:
+      helper_.ReadPosition();
+      helper_.SkipDartType();
+      helper_.SkipConstantReference();
+      return;
+    case kDeprecated_ConstantExpression: {
       helper_.SkipConstantReference();
       return;
     }
@@ -1338,7 +1375,7 @@
     // object, so we need to capture 'this'.
     Class& parent_class = Class::Handle(Z, function.Owner());
     if (index < parent_class.NumTypeParameters()) {
-      HandleSpecialLoad(&result_->this_variable, Symbols::This());
+      HandleLoadReceiver();
     }
   }
 
@@ -1685,6 +1722,24 @@
   return H.DartSymbolObfuscate(name);
 }
 
+void ScopeBuilder::HandleLoadReceiver() {
+  if (!parsed_function_->has_receiver_var() &&
+      current_function_scope_->parent() != nullptr) {
+    // Lazily populate receiver variable using the parent function scope.
+    parsed_function_->set_receiver_var(
+        current_function_scope_->parent()->LookupVariable(Symbols::This(),
+                                                          true));
+  }
+
+  if ((current_function_scope_->parent() != nullptr) ||
+      (scope_->function_level() > 0)) {
+    // Every scope we use the [receiver] from needs to be notified of the usage
+    // in order to ensure that preserving the context scope on that particular
+    // use-site also includes the [receiver].
+    scope_->CaptureVariable(parsed_function_->receiver_var());
+  }
+}
+
 void ScopeBuilder::HandleSpecialLoad(LocalVariable** variable,
                                      const String& symbol) {
   if (current_function_scope_->parent() != NULL) {
diff --git a/runtime/vm/compiler/frontend/scope_builder.h b/runtime/vm/compiler/frontend/scope_builder.h
index 12521be..b2227aa 100644
--- a/runtime/vm/compiler/frontend/scope_builder.h
+++ b/runtime/vm/compiler/frontend/scope_builder.h
@@ -116,6 +116,7 @@
 
   const String& GenerateName(const char* prefix, intptr_t suffix);
 
+  void HandleLoadReceiver();
   void HandleSpecialLoad(LocalVariable** variable, const String& symbol);
   void LookupCapturedVariableByName(LocalVariable** variable,
                                     const String& name);
@@ -171,8 +172,7 @@
 class ScopeBuildingResult : public ZoneAllocated {
  public:
   ScopeBuildingResult()
-      : this_variable(NULL),
-        type_arguments_variable(NULL),
+      : type_arguments_variable(NULL),
         switch_variable(NULL),
         finally_return_variable(NULL),
         setter_value(NULL),
@@ -184,9 +184,6 @@
   IntMap<LocalScope*> scopes;
   GrowableArray<FunctionScope> function_scopes;
 
-  // Only non-NULL for instance functions.
-  LocalVariable* this_variable;
-
   // Only non-NULL for factory constructor functions.
   LocalVariable* type_arguments_variable;
 
diff --git a/runtime/vm/compiler/graph_intrinsifier.cc b/runtime/vm/compiler/graph_intrinsifier.cc
index d537054..85b9e11 100644
--- a/runtime/vm/compiler/graph_intrinsifier.cc
+++ b/runtime/vm/compiler/graph_intrinsifier.cc
@@ -7,6 +7,7 @@
 #if !defined(DART_PRECOMPILED_RUNTIME) && !defined(TARGET_ARCH_DBC)
 
 #include "vm/compiler/graph_intrinsifier.h"
+#include "vm/compiler/backend/block_builder.h"
 #include "vm/compiler/backend/flow_graph.h"
 #include "vm/compiler/backend/flow_graph_compiler.h"
 #include "vm/compiler/backend/il.h"
@@ -115,24 +116,6 @@
   return true;
 }
 
-static intptr_t CidForRepresentation(Representation rep) {
-  switch (rep) {
-    case kUnboxedDouble:
-      return kDoubleCid;
-    case kUnboxedFloat32x4:
-      return kFloat32x4Cid;
-    case kUnboxedInt32x4:
-      return kInt32x4Cid;
-    case kUnboxedFloat64x2:
-      return kFloat64x2Cid;
-    case kUnboxedUint32:
-      return kDynamicCid;  // smi or mint.
-    default:
-      UNREACHABLE();
-      return kIllegalCid;
-  }
-}
-
 static Representation RepresentationForCid(intptr_t cid) {
   switch (cid) {
     case kDoubleCid:
@@ -154,101 +137,6 @@
 // IR instructions which would jump to a deoptimization sequence on failure
 // instead branch to the intrinsic slow path.
 //
-class BlockBuilder : public ValueObject {
- public:
-  BlockBuilder(FlowGraph* flow_graph, BlockEntryInstr* entry)
-      : flow_graph_(flow_graph),
-        entry_(entry),
-        current_(entry),
-        fall_through_env_(new Environment(0,
-                                          0,
-                                          DeoptId::kNone,
-                                          flow_graph->parsed_function(),
-                                          NULL)) {}
-
-  Definition* AddToInitialDefinitions(Definition* def) {
-    def->set_ssa_temp_index(flow_graph_->alloc_ssa_temp_index());
-    auto normal_entry = flow_graph_->graph_entry()->normal_entry();
-    flow_graph_->AddToInitialDefinitions(normal_entry, def);
-    return def;
-  }
-
-  Definition* AddDefinition(Definition* def) {
-    def->set_ssa_temp_index(flow_graph_->alloc_ssa_temp_index());
-    AddInstruction(def);
-    return def;
-  }
-
-  Instruction* AddInstruction(Instruction* instr) {
-    if (instr->ComputeCanDeoptimize()) {
-      // Since we use the presence of an environment to determine if an
-      // instructions can deoptimize, we need an empty environment for
-      // instructions that "deoptimize" to the intrinsic fall-through code.
-      instr->SetEnvironment(fall_through_env_);
-    }
-    current_ = current_->AppendInstruction(instr);
-    return instr;
-  }
-
-  void AddIntrinsicReturn(Value* value) {
-    ReturnInstr* instr = new ReturnInstr(
-        TokenPos(), value, CompilerState::Current().GetNextDeoptId());
-    AddInstruction(instr);
-    entry_->set_last_instruction(instr);
-  }
-
-  Definition* AddParameter(intptr_t index) {
-    intptr_t adjustment = GraphIntrinsifier::ParameterSlotFromSp();
-    return AddToInitialDefinitions(new ParameterInstr(
-        adjustment + index, flow_graph_->graph_entry(), SPREG));
-  }
-
-  TokenPosition TokenPos() { return flow_graph_->function().token_pos(); }
-
-  Definition* AddNullDefinition() {
-    return AddDefinition(new ConstantInstr(Object::ZoneHandle(Object::null())));
-  }
-
-  Definition* AddUnboxInstr(Representation rep, Value* value, bool is_checked) {
-    Definition* unboxed_value =
-        AddDefinition(UnboxInstr::Create(rep, value, DeoptId::kNone));
-    if (is_checked) {
-      // The type of |value| has already been checked and it is safe to
-      // adjust reaching type. This is done manually because there is no type
-      // propagation when building intrinsics.
-      unboxed_value->AsUnbox()->value()->SetReachingType(
-          new CompileType(CompileType::FromCid(CidForRepresentation(rep))));
-    }
-    return unboxed_value;
-  }
-
-  Definition* AddUnboxInstr(Representation rep,
-                            Definition* boxed,
-                            bool is_checked) {
-    return AddUnboxInstr(rep, new Value(boxed), is_checked);
-  }
-
-  Definition* InvokeMathCFunction(MethodRecognizer::Kind recognized_kind,
-                                  ZoneGrowableArray<Value*>* args) {
-    return InvokeMathCFunctionHelper(recognized_kind, args);
-  }
-
- private:
-  Definition* InvokeMathCFunctionHelper(MethodRecognizer::Kind recognized_kind,
-                                        ZoneGrowableArray<Value*>* args) {
-    InvokeMathCFunctionInstr* invoke_math_c_function =
-        new InvokeMathCFunctionInstr(args, DeoptId::kNone, recognized_kind,
-                                     TokenPos());
-    AddDefinition(invoke_math_c_function);
-    return invoke_math_c_function;
-  }
-
-  FlowGraph* flow_graph_;
-  BlockEntryInstr* entry_;
-  Instruction* current_;
-  Environment* fall_through_env_;
-};
-
 static Definition* PrepareIndexedOp(FlowGraph* flow_graph,
                                     BlockBuilder* builder,
                                     Definition* array,
@@ -270,8 +158,8 @@
   auto normal_entry = graph_entry->normal_entry();
   BlockBuilder builder(flow_graph, normal_entry);
 
-  Definition* index = builder.AddParameter(1);
-  Definition* array = builder.AddParameter(2);
+  Definition* index = builder.AddParameter(0, /*with_frame=*/false);
+  Definition* array = builder.AddParameter(1, /*with_frame=*/false);
 
   index = PrepareIndexedOp(flow_graph, &builder, array, index,
                            Slot::GetLengthFieldForArrayCid(array_cid));
@@ -300,7 +188,7 @@
     case kTypedDataFloat32ArrayCid:
       result = builder.AddDefinition(
           new FloatToDoubleInstr(new Value(result), DeoptId::kNone));
-    // Fall through.
+      FALL_THROUGH;
     case kTypedDataFloat64ArrayCid:
       result = builder.AddDefinition(
           BoxInstr::Create(kUnboxedDouble, new Value(result)));
@@ -337,7 +225,7 @@
       UNREACHABLE();
       break;
   }
-  builder.AddIntrinsicReturn(new Value(result));
+  builder.AddReturn(new Value(result));
   return true;
 }
 
@@ -347,9 +235,9 @@
   auto normal_entry = graph_entry->normal_entry();
   BlockBuilder builder(flow_graph, normal_entry);
 
-  Definition* value = builder.AddParameter(1);
-  Definition* index = builder.AddParameter(2);
-  Definition* array = builder.AddParameter(3);
+  Definition* value = builder.AddParameter(0, /*with_frame=*/false);
+  Definition* index = builder.AddParameter(1, /*with_frame=*/false);
+  Definition* array = builder.AddParameter(2, /*with_frame=*/false);
 
   index = PrepareIndexedOp(flow_graph, &builder, array, index,
                            Slot::GetLengthFieldForArrayCid(array_cid));
@@ -369,7 +257,7 @@
     case kTypedDataInt32ArrayCid:
     case kExternalTypedDataInt32ArrayCid:
     // Use same truncating unbox-instruction for int32 and uint32.
-    // Fall-through.
+    FALL_THROUGH;
     case kTypedDataUint32ArrayCid:
     case kExternalTypedDataUint32ArrayCid:
       // Supports smi and mint, slow-case for bigints.
@@ -435,7 +323,7 @@
       array_cid, kAlignedAccess, DeoptId::kNone, builder.TokenPos()));
   // Return null.
   Definition* null_def = builder.AddNullDefinition();
-  builder.AddIntrinsicReturn(new Value(null_def));
+  builder.AddReturn(new Value(null_def));
   return true;
 }
 
@@ -550,8 +438,8 @@
   auto normal_entry = graph_entry->normal_entry();
   BlockBuilder builder(flow_graph, normal_entry);
 
-  Definition* index = builder.AddParameter(1);
-  Definition* str = builder.AddParameter(2);
+  Definition* index = builder.AddParameter(0, /*with_frame=*/false);
+  Definition* str = builder.AddParameter(1, /*with_frame=*/false);
 
   index =
       PrepareIndexedOp(flow_graph, &builder, str, index, Slot::String_length());
@@ -568,7 +456,7 @@
   Definition* result = builder.AddDefinition(new LoadIndexedInstr(
       new Value(str), new Value(index), Instance::ElementSizeFor(cid), cid,
       kAlignedAccess, DeoptId::kNone, builder.TokenPos()));
-  builder.AddIntrinsicReturn(new Value(result));
+  builder.AddReturn(new Value(result));
   return true;
 }
 
@@ -600,8 +488,8 @@
   auto normal_entry = graph_entry->normal_entry();
   BlockBuilder builder(flow_graph, normal_entry);
 
-  Definition* right = builder.AddParameter(1);
-  Definition* left = builder.AddParameter(2);
+  Definition* right = builder.AddParameter(0, /*with_frame=*/false);
+  Definition* left = builder.AddParameter(1, /*with_frame=*/false);
 
   Cids* value_check = Cids::CreateMonomorphic(zone, cid);
   // Check argument. Receiver (left) is known to be a Float32x4.
@@ -618,7 +506,7 @@
       new Value(right_simd), DeoptId::kNone));
   Definition* result =
       builder.AddDefinition(BoxInstr::Create(rep, new Value(unboxed_result)));
-  builder.AddIntrinsicReturn(new Value(result));
+  builder.AddReturn(new Value(result));
   return true;
 }
 
@@ -644,7 +532,7 @@
   auto normal_entry = graph_entry->normal_entry();
   BlockBuilder builder(flow_graph, normal_entry);
 
-  Definition* receiver = builder.AddParameter(1);
+  Definition* receiver = builder.AddParameter(0, /*with_frame=*/false);
 
   Definition* unboxed_receiver =
       builder.AddUnboxInstr(kUnboxedFloat32x4, new Value(receiver),
@@ -655,7 +543,7 @@
 
   Definition* result = builder.AddDefinition(
       BoxInstr::Create(kUnboxedDouble, new Value(unboxed_result)));
-  builder.AddIntrinsicReturn(new Value(result));
+  builder.AddReturn(new Value(result));
   return true;
 }
 
@@ -684,11 +572,11 @@
   auto normal_entry = graph_entry->normal_entry();
   BlockBuilder builder(flow_graph, normal_entry);
 
-  Definition* array = builder.AddParameter(1);
+  Definition* array = builder.AddParameter(0, /*with_frame=*/false);
 
   Definition* length = builder.AddDefinition(
       new LoadFieldInstr(new Value(array), field, builder.TokenPos()));
-  builder.AddIntrinsicReturn(new Value(length));
+  builder.AddReturn(new Value(length));
   return true;
 }
 
@@ -708,8 +596,16 @@
   return BuildLoadField(flow_graph, Slot::String_length());
 }
 
-bool GraphIntrinsifier::Build_TypedDataLength(FlowGraph* flow_graph) {
-  return BuildLoadField(flow_graph, Slot::TypedData_length());
+bool GraphIntrinsifier::Build_TypedListLength(FlowGraph* flow_graph) {
+  return BuildLoadField(flow_graph, Slot::TypedDataBase_length());
+}
+
+bool GraphIntrinsifier::Build_TypedListViewLength(FlowGraph* flow_graph) {
+  return BuildLoadField(flow_graph, Slot::TypedDataBase_length());
+}
+
+bool GraphIntrinsifier::Build_ByteDataViewLength(FlowGraph* flow_graph) {
+  return BuildLoadField(flow_graph, Slot::TypedDataBase_length());
 }
 
 bool GraphIntrinsifier::Build_GrowableArrayCapacity(FlowGraph* flow_graph) {
@@ -717,13 +613,13 @@
   auto normal_entry = graph_entry->normal_entry();
   BlockBuilder builder(flow_graph, normal_entry);
 
-  Definition* array = builder.AddParameter(1);
+  Definition* array = builder.AddParameter(0, /*with_frame=*/false);
 
   Definition* backing_store = builder.AddDefinition(new LoadFieldInstr(
       new Value(array), Slot::GrowableObjectArray_data(), builder.TokenPos()));
   Definition* capacity = builder.AddDefinition(new LoadFieldInstr(
       new Value(backing_store), Slot::Array_length(), builder.TokenPos()));
-  builder.AddIntrinsicReturn(new Value(capacity));
+  builder.AddReturn(new Value(capacity));
   return true;
 }
 
@@ -732,8 +628,8 @@
   auto normal_entry = graph_entry->normal_entry();
   BlockBuilder builder(flow_graph, normal_entry);
 
-  Definition* index = builder.AddParameter(1);
-  Definition* growable_array = builder.AddParameter(2);
+  Definition* index = builder.AddParameter(0, /*with_frame=*/false);
+  Definition* growable_array = builder.AddParameter(1, /*with_frame=*/false);
 
   index = PrepareIndexedOp(flow_graph, &builder, growable_array, index,
                            Slot::GrowableObjectArray_length());
@@ -745,7 +641,7 @@
       new Value(backing_store), new Value(index),
       Instance::ElementSizeFor(kArrayCid),  // index scale
       kArrayCid, kAlignedAccess, DeoptId::kNone, builder.TokenPos()));
-  builder.AddIntrinsicReturn(new Value(result));
+  builder.AddReturn(new Value(result));
   return true;
 }
 
@@ -763,9 +659,9 @@
   auto normal_entry = graph_entry->normal_entry();
   BlockBuilder builder(flow_graph, normal_entry);
 
-  Definition* value = builder.AddParameter(1);
-  Definition* index = builder.AddParameter(2);
-  Definition* array = builder.AddParameter(3);
+  Definition* value = builder.AddParameter(0, /*with_frame=*/false);
+  Definition* index = builder.AddParameter(1, /*with_frame=*/false);
+  Definition* array = builder.AddParameter(2, /*with_frame=*/false);
 
   index = PrepareIndexedOp(flow_graph, &builder, array, index,
                            Slot::Array_length());
@@ -776,7 +672,7 @@
       kArrayCid, kAlignedAccess, DeoptId::kNone, builder.TokenPos()));
   // Return null.
   Definition* null_def = builder.AddNullDefinition();
-  builder.AddIntrinsicReturn(new Value(null_def));
+  builder.AddReturn(new Value(null_def));
   return true;
 }
 
@@ -794,9 +690,9 @@
   auto normal_entry = graph_entry->normal_entry();
   BlockBuilder builder(flow_graph, normal_entry);
 
-  Definition* value = builder.AddParameter(1);
-  Definition* index = builder.AddParameter(2);
-  Definition* array = builder.AddParameter(3);
+  Definition* value = builder.AddParameter(0, /*with_frame=*/false);
+  Definition* index = builder.AddParameter(1, /*with_frame=*/false);
+  Definition* array = builder.AddParameter(2, /*with_frame=*/false);
 
   index = PrepareIndexedOp(flow_graph, &builder, array, index,
                            Slot::GrowableObjectArray_length());
@@ -811,7 +707,7 @@
       kArrayCid, kAlignedAccess, DeoptId::kNone, builder.TokenPos()));
   // Return null.
   Definition* null_def = builder.AddNullDefinition();
-  builder.AddIntrinsicReturn(new Value(null_def));
+  builder.AddReturn(new Value(null_def));
   return true;
 }
 
@@ -820,8 +716,8 @@
   auto normal_entry = graph_entry->normal_entry();
   BlockBuilder builder(flow_graph, normal_entry);
 
-  Definition* data = builder.AddParameter(1);
-  Definition* growable_array = builder.AddParameter(2);
+  Definition* data = builder.AddParameter(0, /*with_frame=*/false);
+  Definition* growable_array = builder.AddParameter(1, /*with_frame=*/false);
   Zone* zone = flow_graph->zone();
 
   Cids* value_check = Cids::CreateMonomorphic(zone, kArrayCid);
@@ -833,7 +729,7 @@
       new Value(data), kEmitStoreBarrier, builder.TokenPos()));
   // Return null.
   Definition* null_def = builder.AddNullDefinition();
-  builder.AddIntrinsicReturn(new Value(null_def));
+  builder.AddReturn(new Value(null_def));
   return true;
 }
 
@@ -842,8 +738,8 @@
   auto normal_entry = graph_entry->normal_entry();
   BlockBuilder builder(flow_graph, normal_entry);
 
-  Definition* length = builder.AddParameter(1);
-  Definition* growable_array = builder.AddParameter(2);
+  Definition* length = builder.AddParameter(0, /*with_frame=*/false);
+  Definition* growable_array = builder.AddParameter(1, /*with_frame=*/false);
 
   builder.AddInstruction(
       new CheckSmiInstr(new Value(length), DeoptId::kNone, builder.TokenPos()));
@@ -851,7 +747,7 @@
       Slot::GrowableObjectArray_length(), new Value(growable_array),
       new Value(length), kNoStoreBarrier, builder.TokenPos()));
   Definition* null_def = builder.AddNullDefinition();
-  builder.AddIntrinsicReturn(new Value(null_def));
+  builder.AddReturn(new Value(null_def));
   return true;
 }
 
@@ -863,7 +759,7 @@
   auto normal_entry = graph_entry->normal_entry();
   BlockBuilder builder(flow_graph, normal_entry);
 
-  Definition* receiver = builder.AddParameter(1);
+  Definition* receiver = builder.AddParameter(0, /*with_frame=*/false);
   Definition* unboxed_value =
       builder.AddUnboxInstr(kUnboxedDouble, new Value(receiver),
                             /* is_checked = */ true);
@@ -871,7 +767,7 @@
       Token::kNEGATE, new Value(unboxed_value), DeoptId::kNone));
   Definition* result = builder.AddDefinition(
       BoxInstr::Create(kUnboxedDouble, new Value(unboxed_result)));
-  builder.AddIntrinsicReturn(new Value(result));
+  builder.AddReturn(new Value(result));
   return true;
 }
 
@@ -885,19 +781,21 @@
       new ZoneGrowableArray<Value*>(num_parameters);
 
   for (intptr_t i = 0; i < num_parameters; i++) {
-    const intptr_t parameter_index = (num_parameters - i);
-    Definition* value = builder->AddParameter(parameter_index);
+    const intptr_t parameter_index = (num_parameters - i - 1);
+    Definition* value =
+        builder->AddParameter(parameter_index, /*with_frame=*/false);
     Definition* unboxed_value =
         builder->AddUnboxInstr(kUnboxedDouble, value, /* is_checked = */ false);
     args->Add(new Value(unboxed_value));
   }
 
-  Definition* unboxed_result = builder->InvokeMathCFunction(kind, args);
-
+  Definition* unboxed_result =
+      builder->AddDefinition(new InvokeMathCFunctionInstr(
+          args, DeoptId::kNone, kind, builder->TokenPos()));
   Definition* result = builder->AddDefinition(
       BoxInstr::Create(kUnboxedDouble, new Value(unboxed_result)));
 
-  builder->AddIntrinsicReturn(new Value(result));
+  builder->AddReturn(new Value(result));
 
   return true;
 }
diff --git a/runtime/vm/compiler/jit/compiler.cc b/runtime/vm/compiler/jit/compiler.cc
index 66292fa..412e6b0 100644
--- a/runtime/vm/compiler/jit/compiler.cc
+++ b/runtime/vm/compiler/jit/compiler.cc
@@ -174,6 +174,7 @@
   RegExpParser::ParseRegExp(pattern, multiline, compile_data);
 
   regexp.set_num_bracket_expressions(compile_data->capture_count);
+  regexp.set_capture_name_map(compile_data->capture_name_map);
   if (compile_data->simple) {
     regexp.set_is_simple();
   } else {
@@ -270,6 +271,14 @@
     // so do not optimize the function. Bump usage counter down to avoid
     // repeatedly entering the runtime for an optimization attempt.
     function.SetUsageCounter(0);
+
+    // If the optimization counter = 1, the unoptimized code will come back here
+    // immediately, causing an infinite compilation loop. The compiler raises
+    // the threshold for functions with breakpoints, so we drop the unoptimized
+    // to force it to be recompiled.
+    if (thread->isolate()->CanOptimizeImmediately()) {
+      function.ClearCode();
+    }
     return false;
   }
 #endif
@@ -360,7 +369,7 @@
   RawCode* FinalizeCompilation(Assembler* assembler,
                                FlowGraphCompiler* graph_compiler,
                                FlowGraph* flow_graph);
-  void CheckIfBackgroundCompilerIsBeingStopped();
+  void CheckIfBackgroundCompilerIsBeingStopped(bool optimizing_compiler);
 
   ParsedFunction* parsed_function_;
   const bool optimized_;
@@ -381,13 +390,16 @@
 
   // CreateDeoptInfo uses the object pool and needs to be done before
   // FinalizeCode.
-  const Array& deopt_info_array =
-      Array::Handle(zone, graph_compiler->CreateDeoptInfo(assembler));
+  Array& deopt_info_array = Array::Handle(zone, Object::empty_array().raw());
+  if (!function.ForceOptimize()) {
+    deopt_info_array = graph_compiler->CreateDeoptInfo(assembler);
+  }
+
   // Allocates instruction object. Since this occurs only at safepoint,
   // there can be no concurrent access to the instruction page.
   Code& code = Code::Handle(Code::FinalizeCode(
-      function, graph_compiler, assembler, Code::PoolAttachment::kAttachPool,
-      optimized(), /*stats=*/nullptr));
+      graph_compiler, assembler, Code::PoolAttachment::kAttachPool, optimized(),
+      /*stats=*/nullptr));
   code.set_is_optimized(optimized());
   code.set_owner(function);
 #if !defined(PRODUCT)
@@ -415,6 +427,12 @@
   }
 #endif  // !defined(PRODUCT)
 
+  if (function.is_intrinsic() &&
+      (function.usage_counter() < Function::kGraceUsageCounter)) {
+    // Intrinsic functions may execute without incrementing their usage counter.
+    // Give them a non-zero initial usage to prevent premature code collection.
+    function.set_usage_counter(Function::kGraceUsageCounter);
+  }
   if (!function.IsOptimizable()) {
     // A function with huge unoptimized code can become non-optimizable
     // after generating unoptimized code.
@@ -431,7 +449,13 @@
   graph_compiler->FinalizeStaticCallTargetsTable(code);
   graph_compiler->FinalizeCodeSourceMap(code);
 
-  if (optimized()) {
+  if (function.ForceOptimize()) {
+    ASSERT(optimized() && thread()->IsMutatorThread());
+    code.set_is_optimized(false);
+    function.AttachCode(code);
+    function.set_unoptimized_code(code);
+    function.SetWasCompiled(true);
+  } else if (optimized()) {
     // Installs code while at safepoint.
     if (thread()->IsMutatorThread()) {
       const bool is_osr = osr_id() != Compiler::kNoOSRDeoptId;
@@ -540,12 +564,22 @@
   return code.raw();
 }
 
-void CompileParsedFunctionHelper::CheckIfBackgroundCompilerIsBeingStopped() {
+void CompileParsedFunctionHelper::CheckIfBackgroundCompilerIsBeingStopped(
+    bool optimizing_compiler) {
   ASSERT(Compiler::IsBackgroundCompilation());
-  if (!isolate()->background_compiler()->is_running()) {
-    // The background compiler is being stopped.
-    Compiler::AbortBackgroundCompilation(
-        DeoptId::kNone, "Background compilation is being stopped");
+  if (optimizing_compiler) {
+    if (!isolate()->optimizing_background_compiler()->is_running()) {
+      // The background compiler is being stopped.
+      Compiler::AbortBackgroundCompilation(
+          DeoptId::kNone, "Optimizing Background compilation is being stopped");
+    }
+  } else {
+    if (FLAG_enable_interpreter &&
+        !isolate()->background_compiler()->is_running()) {
+      // The background compiler is being stopped.
+      Compiler::AbortBackgroundCompilation(
+          DeoptId::kNone, "Background compilation is being stopped");
+    }
   }
 }
 
@@ -692,16 +726,20 @@
           // changes code page access permissions (makes them temporary not
           // executable).
           {
-            CheckIfBackgroundCompilerIsBeingStopped();
+            CheckIfBackgroundCompilerIsBeingStopped(optimized());
             SafepointOperationScope safepoint_scope(thread());
             // Do not Garbage collect during this stage and instead allow the
             // heap to grow.
             NoHeapGrowthControlScope no_growth_control;
-            CheckIfBackgroundCompilerIsBeingStopped();
+            CheckIfBackgroundCompilerIsBeingStopped(optimized());
             *result =
                 FinalizeCompilation(&assembler, &graph_compiler, flow_graph);
           }
         }
+
+        // We notify code observers after finalizing the code in order to be
+        // outside a [SafepointOperationScope].
+        Code::NotifyCodeObservers(function, *result, optimized());
       }
       if (!result->IsNull()) {
 #if !defined(PRODUCT)
@@ -737,18 +775,18 @@
         if (FLAG_trace_bailout) {
           THR_Print("%s\n", error.ToErrorCString());
         }
+        if (!Compiler::IsBackgroundCompilation() && error.IsLanguageError() &&
+            (LanguageError::Cast(error).kind() == Report::kBailout)) {
+          // If is is not a background compilation, discard the error if it was
+          // not a real error, but just a bailout. If we're it a background
+          // compilation this will be dealt with in the caller.
+        } else {
+          // Otherwise, continue propagating unless we will try again.
+          thread()->set_sticky_error(error);
+        }
         done = true;
       }
 
-      if (!Compiler::IsBackgroundCompilation() && error.IsLanguageError() &&
-          (LanguageError::Cast(error).kind() == Report::kBailout)) {
-        // If is is not a background compilation, discard the error if it was
-        // not a real error, but just a bailout. If we're it a background
-        // compilation this will be dealt with in the caller.
-      } else {
-        // Otherwise, continue propagating.
-        thread()->set_sticky_error(error);
-      }
     }
   }
   return result->raw();
@@ -759,7 +797,8 @@
                                         bool optimized,
                                         intptr_t osr_id) {
   ASSERT(!FLAG_precompiled_mode);
-  ASSERT(!optimized || function.WasCompiled());
+  ASSERT(!optimized || function.WasCompiled() || function.ForceOptimize());
+  if (function.ForceOptimize()) optimized = true;
   LongJumpScope jump;
   if (setjmp(*jump.Set()) == 0) {
     Thread* const thread = Thread::Current();
@@ -968,8 +1007,8 @@
            Function::KindToCString(function.kind()));
   }
 
-#if !defined(PRODUCT)
   VMTagScope tagScope(thread, VMTag::kCompileUnoptimizedTagId);
+#if defined(SUPPORT_TIMELINE)
   const char* event_name;
   if (IsBackgroundCompilation()) {
     event_name = "CompileFunctionUnoptimizedBackground";
@@ -977,22 +1016,20 @@
     event_name = "CompileFunction";
   }
   TIMELINE_FUNCTION_COMPILATION_DURATION(thread, event_name, function);
-#endif  // !defined(PRODUCT)
+#endif  // defined(SUPPORT_TIMELINE)
 
   CompilationPipeline* pipeline =
       CompilationPipeline::New(thread->zone(), function);
 
-  return CompileFunctionHelper(pipeline, function,
-                               /* optimized = */ false, kNoOSRDeoptId);
+  const bool optimized = function.ForceOptimize();
+  return CompileFunctionHelper(pipeline, function, optimized, kNoOSRDeoptId);
 }
 
 RawError* Compiler::ParseFunction(Thread* thread, const Function& function) {
-  Isolate* isolate = thread->isolate();
-#if !defined(PRODUCT)
   VMTagScope tagScope(thread, VMTag::kCompileUnoptimizedTagId);
   TIMELINE_FUNCTION_COMPILATION_DURATION(thread, "ParseFunction", function);
-#endif  // !defined(PRODUCT)
 
+  Isolate* isolate = thread->isolate();
   if (!isolate->compilation_allowed()) {
     FATAL3("Precompilation missed function %s (%s, %s)\n",
            function.ToLibNamePrefixedQualifiedCString(),
@@ -1041,8 +1078,8 @@
 RawObject* Compiler::CompileOptimizedFunction(Thread* thread,
                                               const Function& function,
                                               intptr_t osr_id) {
-#if !defined(PRODUCT)
   VMTagScope tagScope(thread, VMTag::kCompileOptimizedTagId);
+#if defined(SUPPORT_TIMELINE)
   const char* event_name;
   if (osr_id != kNoOSRDeoptId) {
     event_name = "CompileFunctionOptimizedOSR";
@@ -1052,17 +1089,10 @@
     event_name = "CompileFunctionOptimized";
   }
   TIMELINE_FUNCTION_COMPILATION_DURATION(thread, event_name, function);
-#endif  // !defined(PRODUCT)
+#endif  // defined(SUPPORT_TIMELINE)
 
   ASSERT(function.ShouldCompilerOptimize());
 
-  // If we are in the optimizing in the mutator/Dart thread, then
-  // this is either an OSR compilation or background compilation is
-  // not currently allowed.
-  ASSERT(!thread->IsMutatorThread() || (osr_id != kNoOSRDeoptId) ||
-         !FLAG_background_compilation ||
-         BackgroundCompiler::IsDisabled(Isolate::Current()) ||
-         !function.is_background_optimizable());
   CompilationPipeline* pipeline =
       CompilationPipeline::New(thread->zone(), function);
   return CompileFunctionHelper(pipeline, function, /* optimized = */ true,
@@ -1181,77 +1211,6 @@
   return Error::null();
 }
 
-RawObject* Compiler::EvaluateStaticInitializer(const Field& field) {
-#if defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_DBC) &&                  \
-    !defined(TARGET_ARCH_IA32)
-  if (FLAG_precompiled_mode) {
-    UNREACHABLE();
-  }
-#endif
-  ASSERT(field.is_static());
-  // The VM sets the field's value to transiton_sentinel prior to
-  // evaluating the initializer value.
-  ASSERT(field.StaticValue() == Object::transition_sentinel().raw());
-  LongJumpScope jump;
-  if (setjmp(*jump.Set()) == 0) {
-    Thread* const thread = Thread::Current();
-    ASSERT(thread->IsMutatorThread());
-    NoOOBMessageScope no_msg_scope(thread);
-    NoReloadScope no_reload_scope(thread->isolate(), thread);
-    if (field.HasInitializer()) {
-      const Function& initializer = Function::Handle(field.Initializer());
-      return DartEntry::InvokeFunction(initializer, Object::empty_array());
-    }
-    {
-#if defined(SUPPORT_TIMELINE)
-      VMTagScope tagScope(thread, VMTag::kCompileUnoptimizedTagId);
-      TimelineDurationScope tds(thread, Timeline::GetCompilerStream(),
-                                "CompileStaticInitializer");
-      if (tds.enabled()) {
-        tds.SetNumArguments(1);
-        tds.CopyArgument(0, "field", field.ToCString());
-      }
-#endif  // !defined(PRODUCT)
-
-      StackZone stack_zone(thread);
-      Zone* zone = stack_zone.GetZone();
-      ParsedFunction* parsed_function;
-
-      // Create a one-time-use function to evaluate the initializer and invoke
-      // it immediately.
-      parsed_function = kernel::ParseStaticFieldInitializer(zone, field);
-      const Function& initializer = parsed_function->function();
-
-      if (FLAG_enable_interpreter) {
-        ASSERT(initializer.IsBytecodeAllowed(zone));
-        if (!initializer.HasBytecode()) {
-          RawError* error =
-              kernel::BytecodeReader::ReadFunctionBytecode(thread, initializer);
-          if (error != Error::null()) {
-            return error;
-          }
-        }
-        if (initializer.HasBytecode()) {
-          return DartEntry::InvokeFunction(initializer, Object::empty_array());
-        }
-      }
-
-      // Non-optimized code generator.
-      DartCompilationPipeline pipeline;
-      CompileParsedFunctionHelper helper(parsed_function, false, kNoOSRDeoptId);
-      const Code& code = Code::Handle(helper.Compile(&pipeline));
-
-      if (!code.IsNull()) {
-        NOT_IN_PRODUCT(
-            code.set_var_descriptors(Object::empty_var_descriptors()));
-        return DartEntry::InvokeFunction(initializer, Object::empty_array());
-      }
-    }
-  }
-
-  return Thread::Current()->StealStickyError();
-}
-
 RawObject* Compiler::ExecuteOnce(SequenceNode* fragment) {
 #if defined(DART_PRECOMPILER) && !defined(TARGET_ARCH_DBC) &&                  \
     !defined(TARGET_ARCH_IA32)
@@ -1533,7 +1492,7 @@
   }
 }
 
-void BackgroundCompiler::CompileOptimized(const Function& function) {
+void BackgroundCompiler::Compile(const Function& function) {
   ASSERT(Thread::Current()->IsMutatorThread());
   // TODO(srdjan): Checking different strategy for collecting garbage
   // accumulated by background compiler.
@@ -1575,18 +1534,6 @@
   ASSERT(thread->IsMutatorThread());
   ASSERT(!thread->IsAtSafepoint());
 
-  // Finalize NoSuchMethodError, _Mint; occasionally needed in optimized
-  // compilation.
-  Class& cls = Class::Handle(
-      thread->zone(), Library::LookupCoreClass(Symbols::NoSuchMethodError()));
-  ASSERT(!cls.IsNull());
-  Error& error = Error::Handle(thread->zone(), cls.EnsureIsFinalized(thread));
-  ASSERT(error.IsNull());
-  cls = Library::LookupCoreClass(Symbols::_Mint());
-  ASSERT(!cls.IsNull());
-  error = cls.EnsureIsFinalized(thread);
-  ASSERT(error.IsNull());
-
   MonitorLocker ml(done_monitor_);
   if (running_ || !done_) return;
   running_ = true;
@@ -1703,12 +1650,6 @@
   return Error::null();
 }
 
-RawObject* Compiler::EvaluateStaticInitializer(const Field& field) {
-  ASSERT(field.HasInitializer());
-  const Function& initializer = Function::Handle(field.Initializer());
-  return DartEntry::InvokeFunction(initializer, Object::empty_array());
-}
-
 RawObject* Compiler::ExecuteOnce(SequenceNode* fragment) {
   UNREACHABLE();
   return Object::null();
@@ -1718,7 +1659,7 @@
   UNREACHABLE();
 }
 
-void BackgroundCompiler::CompileOptimized(const Function& function) {
+void BackgroundCompiler::Compile(const Function& function) {
   UNREACHABLE();
 }
 
diff --git a/runtime/vm/compiler/jit/compiler.h b/runtime/vm/compiler/jit/compiler.h
index 43f4320..c7e6412 100644
--- a/runtime/vm/compiler/jit/compiler.h
+++ b/runtime/vm/compiler/jit/compiler.h
@@ -127,12 +127,6 @@
   // on compilation failure.
   static RawObject* ExecuteOnce(SequenceNode* fragment);
 
-  // Evaluates the initializer expression of the given static field.
-  //
-  // The return value is either a RawInstance on success or a RawError
-  // on compilation failure.
-  static RawObject* EvaluateStaticInitializer(const Field& field);
-
   // Generates local var descriptors and sets it in 'code'. Do not call if the
   // local var descriptor already exists.
   static void ComputeLocalVarDescriptors(const Code& code);
@@ -163,46 +157,57 @@
 
   static void Start(Isolate* isolate) {
     ASSERT(Thread::Current()->IsMutatorThread());
-    if (isolate->background_compiler() != NULL) {
+    if (FLAG_enable_interpreter && isolate->background_compiler() != NULL) {
       isolate->background_compiler()->Start();
     }
+    if (isolate->optimizing_background_compiler() != NULL) {
+      isolate->optimizing_background_compiler()->Start();
+    }
   }
   static void Stop(Isolate* isolate) {
     ASSERT(Thread::Current()->IsMutatorThread());
-    if (isolate->background_compiler() != NULL) {
+    if (FLAG_enable_interpreter && isolate->background_compiler() != NULL) {
       isolate->background_compiler()->Stop();
     }
+    if (isolate->optimizing_background_compiler() != NULL) {
+      isolate->optimizing_background_compiler()->Stop();
+    }
   }
   static void Enable(Isolate* isolate) {
     ASSERT(Thread::Current()->IsMutatorThread());
-    if (isolate->background_compiler() != NULL) {
+    if (FLAG_enable_interpreter && isolate->background_compiler() != NULL) {
       isolate->background_compiler()->Enable();
     }
+    if (isolate->optimizing_background_compiler() != NULL) {
+      isolate->optimizing_background_compiler()->Enable();
+    }
   }
   static void Disable(Isolate* isolate) {
     ASSERT(Thread::Current()->IsMutatorThread());
-    if (isolate->background_compiler() != NULL) {
+    if (FLAG_enable_interpreter && isolate->background_compiler() != NULL) {
       isolate->background_compiler()->Disable();
     }
-  }
-  static bool IsDisabled(Isolate* isolate) {
-    ASSERT(Thread::Current()->IsMutatorThread());
-    if (isolate->background_compiler() != NULL) {
-      return isolate->background_compiler()->IsDisabled();
+    if (isolate->optimizing_background_compiler() != NULL) {
+      isolate->optimizing_background_compiler()->Disable();
     }
-    return false;
   }
-  static bool IsRunning(Isolate* isolate) {
+  static bool IsDisabled(Isolate* isolate, bool optimizing_compiler) {
     ASSERT(Thread::Current()->IsMutatorThread());
-    if (isolate->background_compiler() != NULL) {
-      return isolate->background_compiler()->IsRunning();
+    if (optimizing_compiler) {
+      if (isolate->optimizing_background_compiler() != NULL) {
+        return isolate->optimizing_background_compiler()->IsDisabled();
+      }
+    } else {
+      if (FLAG_enable_interpreter && isolate->background_compiler() != NULL) {
+        return isolate->background_compiler()->IsDisabled();
+      }
     }
     return false;
   }
 
-  // Call to optimize a function in the background, enters the function in the
-  // compilation queue.
-  void CompileOptimized(const Function& function);
+  // Call to compile (unoptimized or optimized) a function in the background,
+  // enters the function in the compilation queue.
+  void Compile(const Function& function);
 
   void VisitPointers(ObjectPointerVisitor* visitor);
 
diff --git a/runtime/vm/compiler/method_recognizer.cc b/runtime/vm/compiler/method_recognizer.cc
index be12f08..0973fed 100644
--- a/runtime/vm/compiler/method_recognizer.cc
+++ b/runtime/vm/compiler/method_recognizer.cc
@@ -304,7 +304,7 @@
   String& name = thread->StringHandle();
   name = name_.raw();
   ASSERT(name.IsSymbol());
-  if (Function::IsDynamicInvocationForwaderName(name)) {
+  if (Function::IsDynamicInvocationForwarderName(name)) {
     name = Function::DemangleDynamicInvocationForwarderName(name);
   }
   if (name.raw() == Symbols::Plus().raw()) {
diff --git a/runtime/vm/compiler/recognized_methods_list.h b/runtime/vm/compiler/recognized_methods_list.h
index fa35d7c..6fc48f4 100644
--- a/runtime/vm/compiler/recognized_methods_list.h
+++ b/runtime/vm/compiler/recognized_methods_list.h
@@ -8,7 +8,7 @@
 namespace dart {
 
 // clang-format off
-// (class-name, function-name, recognized enum, result type, fingerprint).
+// (class-name, function-name, recognized enum, fingerprint).
 // When adding a new function add a 0 as fingerprint, build and run to get the
 // correct fingerprint from the mismatch error (or use Library::GetFunction()
 // and print func.SourceFingerprint()).
@@ -42,6 +42,25 @@
   V(_TypedList, _setFloat64, ByteArrayBaseSetFloat64, 0x38a80b0d)              \
   V(_TypedList, _setFloat32x4, ByteArrayBaseSetFloat32x4, 0x40052c4e)          \
   V(_TypedList, _setInt32x4, ByteArrayBaseSetInt32x4, 0x07b89f54)              \
+  V(_ByteDataView, get:offsetInBytes, ByteDataViewOffsetInBytes, 0x0)          \
+  V(_ByteDataView, get:_typedData, ByteDataViewTypedData, 0x0)                 \
+  V(_TypedListView, get:offsetInBytes, TypedDataViewOffsetInBytes, 0x0)        \
+  V(_TypedListView, get:_typedData, TypedDataViewTypedData, 0x0)               \
+  V(_ByteDataView, ., TypedData_ByteDataView_factory, 0x0)                     \
+  V(_Int8ArrayView, ., TypedData_Int8ArrayView_factory, 0x0)                   \
+  V(_Uint8ArrayView, ., TypedData_Uint8ArrayView_factory, 0x0)                 \
+  V(_Uint8ClampedArrayView, ., TypedData_Uint8ClampedArrayView_factory, 0x0)   \
+  V(_Int16ArrayView, ., TypedData_Int16ArrayView_factory, 0x0)                 \
+  V(_Uint16ArrayView, ., TypedData_Uint16ArrayView_factory, 0x0)               \
+  V(_Int32ArrayView, ., TypedData_Int32ArrayView_factory, 0x0)                 \
+  V(_Uint32ArrayView, ., TypedData_Uint32ArrayView_factory, 0x0)               \
+  V(_Int64ArrayView, ., TypedData_Int64ArrayView_factory, 0x0)                 \
+  V(_Uint64ArrayView, ., TypedData_Uint64ArrayView_factory, 0x0)               \
+  V(_Float32ArrayView, ., TypedData_Float32ArrayView_factory, 0x0)             \
+  V(_Float64ArrayView, ., TypedData_Float64ArrayView_factory, 0x0)             \
+  V(_Float32x4ArrayView, ., TypedData_Float32x4ArrayView_factory, 0x0)         \
+  V(_Int32x4ArrayView, ., TypedData_Int32x4ArrayView_factory, 0x0)             \
+  V(_Float64x2ArrayView, ., TypedData_Float64x2ArrayView_factory, 0x0)         \
   V(::, _toClampedUint8, ConvertIntToClampedUint8, 0x564b0435)                 \
   V(_StringBase, _interpolate, StringBaseInterpolate, 0x01ecb15a)              \
   V(_IntegerImplementation, toDouble, IntegerToDouble, 0x05da96ed)             \
@@ -277,7 +296,9 @@
   V(_Int32x4List, []=, Int32x4ArraySetIndexed, 0x31453dab)                     \
   V(_Float64x2List, [], Float64x2ArrayGetIndexed, 0x644a0be1)                  \
   V(_Float64x2List, []=, Float64x2ArraySetIndexed, 0x6b836b0b)                 \
-  V(_TypedList, get:length, TypedDataLength, 0x2091c4d8)                       \
+  V(_TypedList, get:length, TypedListLength, 0x0)                \
+  V(_TypedListView, get:length, TypedListViewLength, 0x0)        \
+  V(_ByteDataView, get:length, ByteDataViewLength, 0x0)          \
   V(_Float32x4, get:x, Float32x4ShuffleX, 0x63d1a9fd)                          \
   V(_Float32x4, get:y, Float32x4ShuffleY, 0x203523d9)                          \
   V(_Float32x4, get:z, Float32x4ShuffleZ, 0x13190678)                          \
@@ -351,7 +372,11 @@
   V(Object, ==, ObjectEquals, 0x7b32a55a)                                      \
   V(_List, get:length, ObjectArrayLength, 0x25952390)                          \
   V(_ImmutableList, get:length, ImmutableArrayLength, 0x25952390)              \
-  V(_TypedList, get:length, TypedDataLength, 0x2091c4d8)                       \
+  V(_TypedListView, get:offsetInBytes, TypedDataViewOffsetInBytes, 0x0)        \
+  V(_TypedListView, get:_typedData, TypedDataViewTypedData, 0x0)               \
+  V(_TypedList, get:length, TypedListLength, 0x0)                \
+  V(_TypedListView, get:length, TypedListViewLength, 0x0)        \
+  V(_ByteDataView, get:length, ByteDataViewLength, 0x0)          \
   V(_GrowableList, get:length, GrowableArrayLength, 0x18dd86b4)                \
   V(_GrowableList, get:_capacity, GrowableArrayCapacity, 0x2e04be60)           \
   V(_GrowableList, add, GrowableListAdd, 0x40b490b8)                           \
@@ -390,6 +415,9 @@
   V(_Float32ArrayView, []=, Float32ArrayViewSetIndexed, 0xc9b691bd)            \
   V(_Float64ArrayView, [], Float64ArrayViewGetIndexed, 0x9d83f585)             \
   V(_Float64ArrayView, []=, Float64ArrayViewSetIndexed, 0x3c1adabd)            \
+  V(_ByteDataView, get:length, ByteDataViewLength, 0x0)                        \
+  V(_ByteDataView, get:offsetInBytes, ByteDataViewOffsetInBytes, 0x0)          \
+  V(_ByteDataView, get:_typedData, ByteDataViewTypedData, 0x0)                 \
   V(_ByteDataView, setInt8, ByteDataViewSetInt8, 0x6395293e)                   \
   V(_ByteDataView, setUint8, ByteDataViewSetUint8, 0x79979d1f)                 \
   V(_ByteDataView, setInt16, ByteDataViewSetInt16, 0x525ec534)                 \
diff --git a/runtime/vm/compiler/relocation.cc b/runtime/vm/compiler/relocation.cc
index 467aa78..5d4d35f 100644
--- a/runtime/vm/compiler/relocation.cc
+++ b/runtime/vm/compiler/relocation.cc
@@ -5,6 +5,7 @@
 #include "vm/compiler/relocation.h"
 
 #include "vm/code_patcher.h"
+#include "vm/heap/pages.h"
 #include "vm/instructions.h"
 #include "vm/object_store.h"
 #include "vm/stub_code.h"
@@ -362,8 +363,11 @@
   auto caller = Code::InstructionsOf(unresolved_call->caller);
   const int32_t distance = destination_text - call_text_offset;
   {
-    PcRelativeCallPattern call(Instructions::PayloadStart(caller) +
-                               call_offset);
+    uword addr = Instructions::PayloadStart(caller) + call_offset;
+    if (FLAG_write_protect_code) {
+      addr -= HeapPage::Of(caller)->AliasOffset();
+    }
+    PcRelativeCallPattern call(addr);
     ASSERT(call.IsValid());
     call.set_distance(static_cast<int32_t>(distance));
     ASSERT(call.distance() == distance);
diff --git a/runtime/vm/compiler/runtime_api.cc b/runtime/vm/compiler/runtime_api.cc
index aca31eb..8f927b8 100644
--- a/runtime/vm/compiler/runtime_api.cc
+++ b/runtime/vm/compiler/runtime_api.cc
@@ -23,6 +23,22 @@
   return a.raw() == b.raw();
 }
 
+bool IsEqualType(const AbstractType& a, const AbstractType& b) {
+  return a.Equals(b);
+}
+
+bool IsDoubleType(const AbstractType& type) {
+  return type.IsDoubleType();
+}
+
+bool IsIntType(const AbstractType& type) {
+  return type.IsIntType();
+}
+
+bool IsSmiType(const AbstractType& type) {
+  return type.IsSmiType();
+}
+
 bool IsNotTemporaryScopedHandle(const Object& obj) {
   return obj.IsNotTemporaryScopedHandle();
 }
@@ -198,6 +214,10 @@
   Thread::Current()->long_jump_base()->Jump(1, Object::branch_offset_error());
 }
 
+word RuntimeEntry::OffsetFromThread() const {
+  return dart::Thread::OffsetFromThread(runtime_entry_);
+}
+
 namespace target {
 
 const word kPageSize = dart::kPageSize;
@@ -238,6 +258,10 @@
 const word RawObject::kBarrierOverlapShift =
     dart::RawObject::kBarrierOverlapShift;
 
+bool RawObject::IsTypedDataClassId(intptr_t cid) {
+  return dart::RawObject::IsTypedDataClassId(cid);
+}
+
 intptr_t ObjectPool::element_offset(intptr_t index) {
   return dart::ObjectPool::element_offset(index);
 }
@@ -328,8 +352,8 @@
   return dart::ICData::entries_offset();
 }
 
-word ICData::static_receiver_type_offset() {
-  return dart::ICData::static_receiver_type_offset();
+word ICData::receivers_static_type_offset() {
+  return dart::ICData::receivers_static_type_offset();
 }
 
 word ICData::state_bits_offset() {
@@ -475,11 +499,13 @@
   V(Thread, top_offset)                                                        \
   V(Thread, top_resource_offset)                                               \
   V(Thread, vm_tag_offset)                                                     \
+  V(Thread, safepoint_state_offset)                                            \
   V(TimelineStream, enabled_offset)                                            \
   V(TwoByteString, data_offset)                                                \
   V(Type, arguments_offset)                                                    \
+  V(TypedDataBase, data_field_offset)                                          \
+  V(TypedDataBase, length_offset)                                              \
   V(TypedData, data_offset)                                                    \
-  V(TypedData, length_offset)                                                  \
   V(Type, hash_offset)                                                         \
   V(TypeRef, type_offset)                                                      \
   V(Type, signature_offset)                                                    \
@@ -492,6 +518,14 @@
 CLASS_NAME_LIST(DEFINE_FORWARDER)
 #undef DEFINE_FORWARDER
 
+uword Thread::safepoint_state_unacquired() {
+  return dart::Thread::safepoint_state_unacquired();
+}
+
+uword Thread::safepoint_state_acquired() {
+  return dart::Thread::safepoint_state_acquired();
+}
+
 const word HeapPage::kBytesPerCardLog2 = dart::HeapPage::kBytesPerCardLog2;
 
 const word String::kHashBits = dart::String::kHashBits;
@@ -620,6 +654,30 @@
   return dart::Thread::deoptimize_stub_offset();
 }
 
+word Thread::enter_safepoint_stub_offset() {
+  return dart::Thread::enter_safepoint_stub_offset();
+}
+
+word Thread::exit_safepoint_stub_offset() {
+  return dart::Thread::exit_safepoint_stub_offset();
+}
+
+word Thread::execution_state_offset() {
+  return dart::Thread::execution_state_offset();
+}
+
+uword Thread::native_execution_state() {
+  return dart::Thread::ExecutionState::kThreadInNative;
+}
+
+uword Thread::generated_execution_state() {
+  return dart::Thread::ExecutionState::kThreadInGenerated;
+}
+
+uword Thread::vm_tag_compiled_id() {
+  return dart::VMTag::kDartCompiledTagId;
+}
+
 #endif  // !defined(TARGET_ARCH_DBC)
 
 #define DECLARE_CONSTANT_OFFSET_GETTER(name)                                   \
@@ -753,7 +811,7 @@
 }
 
 bool CanEmbedAsRawPointerInGeneratedCode(const dart::Object& obj) {
-  return obj.IsSmi() || obj.InVMHeap();
+  return obj.IsSmi() || obj.InVMIsolateHeap();
 }
 
 word ToRawPointer(const dart::Object& a) {
diff --git a/runtime/vm/compiler/runtime_api.h b/runtime/vm/compiler/runtime_api.h
index 853fac0..d910575 100644
--- a/runtime/vm/compiler/runtime_api.h
+++ b/runtime/vm/compiler/runtime_api.h
@@ -36,7 +36,9 @@
 class RuntimeEntry;
 class Zone;
 
-#define DO(clazz) class clazz;
+#define DO(clazz)                                                              \
+  class Raw##clazz;                                                            \
+  class clazz;
 CLASS_LIST_FOR_HANDLES(DO)
 #undef DO
 
@@ -106,6 +108,18 @@
 // Returns true if [a] and [b] are the same object.
 bool IsSameObject(const Object& a, const Object& b);
 
+// Returns true if [a] and [b] represent the same type (are equal).
+bool IsEqualType(const AbstractType& a, const AbstractType& b);
+
+// Returns true if [type] is the "int" type.
+bool IsIntType(const AbstractType& type);
+
+// Returns true if [type] is the "double" type.
+bool IsDoubleType(const AbstractType& type);
+
+// Returns true if [type] is the "_Smi" type.
+bool IsSmiType(const AbstractType& type);
+
 // Returns true if the given handle is a zone handle or one of the global
 // cached handles.
 bool IsNotTemporaryScopedHandle(const Object& obj);
@@ -204,6 +218,8 @@
     call_(runtime_entry_, assembler, argument_count);
   }
 
+  word OffsetFromThread() const;
+
  protected:
   RuntimeEntry(const dart::RuntimeEntry* runtime_entry,
                RuntimeEntryCallInternal call)
@@ -321,6 +337,8 @@
   static const word kSizeTagMaxSizeTag;
   static const word kTagBitsSizeTagPos;
   static const word kBarrierOverlapShift;
+
+  static bool IsTypedDataClassId(intptr_t cid);
 };
 
 class RawAbstractType : public AllStatic {
@@ -395,7 +413,7 @@
   static word owner_offset();
   static word arguments_descriptor_offset();
   static word entries_offset();
-  static word static_receiver_type_offset();
+  static word receivers_static_type_offset();
   static word state_bits_offset();
 
   static word CodeIndexFor(word num_args);
@@ -442,10 +460,15 @@
   static word length_offset();
 };
 
+class TypedDataBase : public AllStatic {
+ public:
+  static word data_field_offset();
+  static word length_offset();
+};
+
 class TypedData : public AllStatic {
  public:
   static word data_offset();
-  static word length_offset();
   static word InstanceSize();
 };
 
@@ -550,6 +573,15 @@
   static word array_write_barrier_entry_point_offset();
   static word write_barrier_entry_point_offset();
   static word vm_tag_offset();
+  static uword vm_tag_compiled_id();
+
+  static word safepoint_state_offset();
+  static uword safepoint_state_unacquired();
+  static uword safepoint_state_acquired();
+
+  static word execution_state_offset();
+  static uword native_execution_state();
+  static uword generated_execution_state();
 
 #if !defined(TARGET_ARCH_DBC)
   static word write_barrier_code_offset();
@@ -572,6 +604,8 @@
   static word lazy_deopt_from_return_stub_offset();
   static word lazy_deopt_from_throw_stub_offset();
   static word deoptimize_stub_offset();
+  static word enter_safepoint_stub_offset();
+  static word exit_safepoint_stub_offset();
 #endif  // !defined(TARGET_ARCH_DBC)
 
   static word no_scope_native_wrapper_entry_point_offset();
diff --git a/runtime/vm/compiler/stub_code_compiler_arm.cc b/runtime/vm/compiler/stub_code_compiler_arm.cc
index fc4b9dc..7024fd8 100644
--- a/runtime/vm/compiler/stub_code_compiler_arm.cc
+++ b/runtime/vm/compiler/stub_code_compiler_arm.cc
@@ -4,6 +4,9 @@
 
 #include "vm/globals.h"
 
+// For `AllocateObjectInstr::WillAllocateNewOrRemembered`
+#include "vm/compiler/backend/il.h"
+
 #define SHOULD_NOT_INCLUDE_RUNTIME
 
 #include "vm/compiler/stub_code_compiler.h"
@@ -14,7 +17,7 @@
 #include "vm/code_entry_kind.h"
 #include "vm/compiler/assembler/assembler.h"
 #include "vm/compiler/backend/locations.h"
-#include "vm/constants_arm.h"
+#include "vm/constants.h"
 #include "vm/instructions.h"
 #include "vm/static_type_exactness_state.h"
 #include "vm/tags.h"
@@ -32,6 +35,34 @@
 
 namespace compiler {
 
+// Ensures that [R0] is a new object, if not it will be added to the remembered
+// set via a leaf runtime call.
+//
+// WARNING: This might clobber all registers except for [R0], [THR] and [FP].
+// The caller should simply call LeaveStubFrame() and return.
+static void EnsureIsNewOrRemembered(Assembler* assembler,
+                                    bool preserve_registers = true) {
+  // If the object is not remembered we call a leaf-runtime to add it to the
+  // remembered set.
+  Label done;
+  __ tst(R0, Operand(1 << target::ObjectAlignment::kNewObjectBitPosition));
+  __ BranchIf(NOT_ZERO, &done);
+
+  if (preserve_registers) {
+    __ EnterCallRuntimeFrame(0);
+  } else {
+    __ ReserveAlignedFrameSpace(0);
+  }
+  // [R0] already contains first argument.
+  __ mov(R1, Operand(THR));
+  __ CallRuntime(kAddAllocatedObjectToRememberedSetRuntimeEntry, 2);
+  if (preserve_registers) {
+    __ LeaveCallRuntimeFrame();
+  }
+
+  __ Bind(&done);
+}
+
 // Input parameters:
 //   LR : return address.
 //   SP : address of last argument in argument array.
@@ -239,6 +270,26 @@
   __ Ret();
 }
 
+void StubCodeCompiler::GenerateEnterSafepointStub(Assembler* assembler) {
+  RegisterSet all_registers;
+  all_registers.AddAllGeneralRegisters();
+  __ PushRegisters(all_registers);
+  __ ldr(R0, Address(THR, kEnterSafepointRuntimeEntry.OffsetFromThread()));
+  __ blx(R0);
+  __ PopRegisters(all_registers);
+  __ Ret();
+}
+
+void StubCodeCompiler::GenerateExitSafepointStub(Assembler* assembler) {
+  RegisterSet all_registers;
+  all_registers.AddAllGeneralRegisters();
+  __ PushRegisters(all_registers);
+  __ ldr(R0, Address(THR, kExitSafepointRuntimeEntry.OffsetFromThread()));
+  __ blx(R0);
+  __ PopRegisters(all_registers);
+  __ Ret();
+}
+
 void StubCodeCompiler::GenerateNullErrorSharedWithoutFPURegsStub(
     Assembler* assembler) {
   GenerateSharedStub(
@@ -362,6 +413,12 @@
   __ StoreToOffset(kWord, R2, THR,
                    target::Thread::top_exit_frame_info_offset());
 
+  // Restore the global object pool after returning from runtime (old space is
+  // moving, so the GOP could have been relocated).
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    __ ldr(PP, Address(THR, target::Thread::global_object_pool_offset()));
+  }
+
   __ LeaveStubFrame();
   __ Ret();
 }
@@ -456,6 +513,12 @@
   __ StoreToOffset(kWord, R2, THR,
                    target::Thread::top_exit_frame_info_offset());
 
+  // Restore the global object pool after returning from runtime (old space is
+  // moving, so the GOP could have been relocated).
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    __ ldr(PP, Address(THR, target::Thread::global_object_pool_offset()));
+  }
+
   __ LeaveStubFrame();
   __ Ret();
 }
@@ -943,6 +1006,12 @@
   // Pop arguments; result is popped in IP.
   __ PopList((1 << R1) | (1 << R2) | (1 << IP));  // R2 is restored.
   __ mov(R0, Operand(IP));
+
+  // Write-barrier elimination might be enabled for this array (depending on the
+  // array length). To be sure we will check if the allocated object is in old
+  // space and if so call a leaf runtime to add it to the remembered set.
+  EnsureIsNewOrRemembered(assembler);
+
   __ LeaveStubFrame();
   __ Ret();
 }
@@ -1083,9 +1152,140 @@
   __ Ret();
 }
 
+// Called when invoking compiled Dart code from interpreted Dart code.
+// Input parameters:
+//   LR : points to return address.
+//   R0 : raw code object of the Dart function to call.
+//   R1 : arguments raw descriptor array.
+//   R2 : address of first argument.
+//   R3 : current thread.
 void StubCodeCompiler::GenerateInvokeDartCodeFromBytecodeStub(
     Assembler* assembler) {
-  __ Unimplemented("Interpreter not yet supported");
+#if defined(DART_PRECOMPILED_RUNTIME)
+  __ Stop("Not using interpreter");
+#else
+  __ Push(LR);  // Marker for the profiler.
+  __ EnterFrame((1 << FP) | (1 << LR), 0);
+
+  // Push code object to PC marker slot.
+  __ ldr(IP,
+         Address(R3,
+                 target::Thread::invoke_dart_code_from_bytecode_stub_offset()));
+  __ Push(IP);
+
+  // Save new context and C++ ABI callee-saved registers.
+  __ PushList(kAbiPreservedCpuRegs);
+
+  const DRegister firstd = EvenDRegisterOf(kAbiFirstPreservedFpuReg);
+  if (TargetCPUFeatures::vfp_supported()) {
+    ASSERT(2 * kAbiPreservedFpuRegCount < 16);
+    // Save FPU registers. 2 D registers per Q register.
+    __ vstmd(DB_W, SP, firstd, 2 * kAbiPreservedFpuRegCount);
+  } else {
+    __ sub(SP, SP, Operand(kAbiPreservedFpuRegCount * kFpuRegisterSize));
+  }
+
+  // Set up THR, which caches the current thread in Dart code.
+  if (THR != R3) {
+    __ mov(THR, Operand(R3));
+  }
+
+  // Save the current VMTag on the stack.
+  __ LoadFromOffset(kWord, R9, THR, target::Thread::vm_tag_offset());
+  __ Push(R9);
+
+  // Save top resource and top exit frame info. Use R4-6 as temporary registers.
+  // StackFrameIterator reads the top exit frame info saved in this frame.
+  __ LoadFromOffset(kWord, R9, THR,
+                    target::Thread::top_exit_frame_info_offset());
+  __ LoadFromOffset(kWord, R4, THR, target::Thread::top_resource_offset());
+  __ LoadImmediate(R8, 0);
+  __ StoreToOffset(kWord, R8, THR, target::Thread::top_resource_offset());
+  __ StoreToOffset(kWord, R8, THR,
+                   target::Thread::top_exit_frame_info_offset());
+
+  // target::frame_layout.exit_link_slot_from_entry_fp must be kept in sync
+  // with the code below.
+  __ Push(R4);
+#if defined(TARGET_OS_MACOS) || defined(TARGET_OS_MACOS_IOS)
+  ASSERT(target::frame_layout.exit_link_slot_from_entry_fp == -26);
+#else
+  ASSERT(target::frame_layout.exit_link_slot_from_entry_fp == -27);
+#endif
+  __ Push(R9);
+
+  // Mark that the thread is executing Dart code. Do this after initializing the
+  // exit link for the profiler.
+  __ LoadImmediate(R9, VMTag::kDartCompiledTagId);
+  __ StoreToOffset(kWord, R9, THR, target::Thread::vm_tag_offset());
+
+  // Load arguments descriptor array into R4, which is passed to Dart code.
+  __ mov(R4, Operand(R1));
+
+  // Load number of arguments into R9 and adjust count for type arguments.
+  __ ldr(R3,
+         FieldAddress(R4, target::ArgumentsDescriptor::type_args_len_offset()));
+  __ ldr(R9, FieldAddress(R4, target::ArgumentsDescriptor::count_offset()));
+  __ cmp(R3, Operand(0));
+  __ AddImmediate(R9, R9, target::ToRawSmi(1),
+                  NE);  // Include the type arguments.
+  __ SmiUntag(R9);
+
+  // R2 points to first argument.
+  // Set up arguments for the Dart call.
+  Label push_arguments;
+  Label done_push_arguments;
+  __ CompareImmediate(R9, 0);  // check if there are arguments.
+  __ b(&done_push_arguments, EQ);
+  __ LoadImmediate(R1, 0);
+  __ Bind(&push_arguments);
+  __ ldr(R3, Address(R2));
+  __ Push(R3);
+  __ AddImmediate(R2, target::kWordSize);
+  __ AddImmediate(R1, 1);
+  __ cmp(R1, Operand(R9));
+  __ b(&push_arguments, LT);
+  __ Bind(&done_push_arguments);
+
+  // Call the Dart code entrypoint.
+  __ LoadImmediate(PP, 0);  // GC safe value into PP.
+  __ mov(CODE_REG, Operand(R0));
+  __ ldr(R0, FieldAddress(CODE_REG, target::Code::entry_point_offset()));
+  __ blx(R0);  // R4 is the arguments descriptor array.
+
+  // Get rid of arguments pushed on the stack.
+  __ AddImmediate(
+      SP, FP,
+      target::frame_layout.exit_link_slot_from_entry_fp * target::kWordSize);
+
+  // Restore the saved top exit frame info and top resource back into the
+  // Isolate structure. Uses R9 as a temporary register for this.
+  __ Pop(R9);
+  __ StoreToOffset(kWord, R9, THR,
+                   target::Thread::top_exit_frame_info_offset());
+  __ Pop(R9);
+  __ StoreToOffset(kWord, R9, THR, target::Thread::top_resource_offset());
+
+  // Restore the current VMTag from the stack.
+  __ Pop(R4);
+  __ StoreToOffset(kWord, R4, THR, target::Thread::vm_tag_offset());
+
+  // Restore C++ ABI callee-saved registers.
+  if (TargetCPUFeatures::vfp_supported()) {
+    // Restore FPU registers. 2 D registers per Q register.
+    __ vldmd(IA_W, SP, firstd, 2 * kAbiPreservedFpuRegCount);
+  } else {
+    __ AddImmediate(SP, kAbiPreservedFpuRegCount * kFpuRegisterSize);
+  }
+  // Restore CPU registers.
+  __ PopList(kAbiPreservedCpuRegs);
+  __ set_constant_pool_allowed(false);
+
+  // Restore the frame pointer and return.
+  __ LeaveFrame((1 << FP) | (1 << LR));
+  __ Drop(1);
+  __ Ret();
+#endif  // defined(DART_PRECOMPILED_RUNTIME)
 }
 
 // Called for inline allocation of contexts.
@@ -1206,6 +1406,12 @@
   __ CallRuntime(kAllocateContextRuntimeEntry, 1);  // Allocate context.
   __ Drop(1);  // Pop number of context variables argument.
   __ Pop(R0);  // Pop the new context object.
+
+  // Write-barrier elimination might be enabled for this context (depending on
+  // the size). To be sure we will check if the allocated object is in old
+  // space and if so call a leaf runtime to add it to the remembered set.
+  EnsureIsNewOrRemembered(assembler, /*preserve_registers=*/false);
+
   // R0: new object
   // Restore the frame pointer.
   __ LeaveStubFrame();
@@ -1534,6 +1740,14 @@
       kInstanceReg,
       Address(SP,
               2 * target::kWordSize));  // Pop result (newly allocated object).
+
+  ASSERT(kInstanceReg == R0);
+  if (AllocateObjectInstr::WillAllocateNewOrRemembered(cls)) {
+    // Write-barrier elimination is enabled for [cls] and we therefore need to
+    // ensure that the object is in new-space or has remembered bit set.
+    EnsureIsNewOrRemembered(assembler, /*preserve_registers=*/false);
+  }
+
   __ LeaveDartFrameAndReturn();         // Restores correct SP.
 }
 
@@ -2032,12 +2246,86 @@
   __ Branch(FieldAddress(R0, target::Function::entry_point_offset()));
 }
 
+// Stub for interpreting a function call.
+// R4: Arguments descriptor.
+// R0: Function.
 void StubCodeCompiler::GenerateInterpretCallStub(Assembler* assembler) {
-  __ Unimplemented("Interpreter not yet supported");
+#if defined(DART_PRECOMPILED_RUNTIME)
+  __ Stop("Not using interpreter")
+#else
+  __ EnterStubFrame();
+
+#if defined(DEBUG)
+  {
+    Label ok;
+    // Check that we are always entering from Dart code.
+    __ LoadFromOffset(kWord, R8, THR, target::Thread::vm_tag_offset());
+    __ CompareImmediate(R8, VMTag::kDartCompiledTagId);
+    __ b(&ok, EQ);
+    __ Stop("Not coming from Dart code.");
+    __ Bind(&ok);
+  }
+#endif
+
+  // Adjust arguments count for type arguments vector.
+  __ LoadFieldFromOffset(kWord, R2, R4,
+                         target::ArgumentsDescriptor::count_offset());
+  __ SmiUntag(R2);
+  __ LoadFieldFromOffset(kWord, R1, R4,
+                         target::ArgumentsDescriptor::type_args_len_offset());
+  __ cmp(R1, Operand(0));
+  __ AddImmediate(R2, R2, 1, NE);  // Include the type arguments.
+
+  // Compute argv.
+  __ mov(R3, Operand(R2, LSL, 2));
+  __ add(R3, FP, Operand(R3));
+  __ AddImmediate(R3,
+                  target::frame_layout.param_end_from_fp * target::kWordSize);
+
+  // Indicate decreasing memory addresses of arguments with negative argc.
+  __ rsb(R2, R2, Operand(0));
+
+  // Align frame before entering C++ world. Fifth argument passed on the stack.
+  __ ReserveAlignedFrameSpace(1 * target::kWordSize);
+
+  // Pass arguments in registers.
+  // R0: Function.
+  __ mov(R1, Operand(R4));  // Arguments descriptor.
+  // R2: Negative argc.
+  // R3: Argv.
+  __ str(THR, Address(SP, 0));  // Fifth argument: Thread.
+
+  // Save exit frame information to enable stack walking as we are about
+  // to transition to Dart VM C++ code.
+  __ StoreToOffset(kWord, FP, THR,
+                   target::Thread::top_exit_frame_info_offset());
+
+  // Mark that the thread is executing VM code.
+  __ LoadFromOffset(kWord, R5, THR,
+                    target::Thread::interpret_call_entry_point_offset());
+  __ StoreToOffset(kWord, R5, THR, target::Thread::vm_tag_offset());
+
+  __ blx(R5);
+
+  // Mark that the thread is executing Dart code.
+  __ LoadImmediate(R2, VMTag::kDartCompiledTagId);
+  __ StoreToOffset(kWord, R2, THR, target::Thread::vm_tag_offset());
+
+  // Reset exit frame information in Isolate structure.
+  __ LoadImmediate(R2, 0);
+  __ StoreToOffset(kWord, R2, THR,
+                   target::Thread::top_exit_frame_info_offset());
+
+  __ LeaveStubFrame();
+  __ Ret();
+#endif  // defined(DART_PRECOMPILED_RUNTIME)
 }
 
 // R9: Contains an ICData.
 void StubCodeCompiler::GenerateICCallBreakpointStub(Assembler* assembler) {
+#if defined(PRODUCT)
+  __ Stop("No debugging in PRODUCT mode");
+#else
   __ EnterStubFrame();
   __ LoadImmediate(R0, 0);
   // Preserve arguments descriptor and make room for result.
@@ -2047,9 +2335,13 @@
   __ LeaveStubFrame();
   __ mov(CODE_REG, Operand(R0));
   __ Branch(FieldAddress(CODE_REG, target::Code::entry_point_offset()));
+#endif  // defined(PRODUCT)
 }
 
 void StubCodeCompiler::GenerateRuntimeCallBreakpointStub(Assembler* assembler) {
+#if defined(PRODUCT)
+  __ Stop("No debugging in PRODUCT mode");
+#else
   __ EnterStubFrame();
   __ LoadImmediate(R0, 0);
   // Make room for result.
@@ -2058,12 +2350,13 @@
   __ PopList((1 << CODE_REG));
   __ LeaveStubFrame();
   __ Branch(FieldAddress(CODE_REG, target::Code::entry_point_offset()));
+#endif  // defined(PRODUCT)
 }
 
 // Called only from unoptimized code. All relevant registers have been saved.
 void StubCodeCompiler::GenerateDebugStepCheckStub(Assembler* assembler) {
 #if defined(PRODUCT)
-  __ Ret();
+  __ Stop("No debugging in PRODUCT mode");
 #else
   // Check single stepping.
   Label stepping, done_stepping;
diff --git a/runtime/vm/compiler/stub_code_compiler_arm64.cc b/runtime/vm/compiler/stub_code_compiler_arm64.cc
index 30acf68..2205c2b 100644
--- a/runtime/vm/compiler/stub_code_compiler_arm64.cc
+++ b/runtime/vm/compiler/stub_code_compiler_arm64.cc
@@ -4,6 +4,9 @@
 
 #include "vm/globals.h"
 
+// For `AllocateObjectInstr::WillAllocateNewOrRemembered`
+#include "vm/compiler/backend/il.h"
+
 #define SHOULD_NOT_INCLUDE_RUNTIME
 
 #include "vm/compiler/stub_code_compiler.h"
@@ -14,7 +17,7 @@
 #include "vm/code_entry_kind.h"
 #include "vm/compiler/assembler/assembler.h"
 #include "vm/compiler/backend/locations.h"
-#include "vm/constants_arm64.h"
+#include "vm/constants.h"
 #include "vm/instructions.h"
 #include "vm/static_type_exactness_state.h"
 #include "vm/tags.h"
@@ -28,11 +31,37 @@
             use_slow_path,
             false,
             "Set to true for debugging & verifying the slow paths.");
-DECLARE_FLAG(bool, enable_interpreter);
 DECLARE_FLAG(bool, precompiled_mode);
 
 namespace compiler {
 
+// Ensures that [R0] is a new object, if not it will be added to the remembered
+// set via a leaf runtime call.
+//
+// WARNING: This might clobber all registers except for [R0], [THR] and [FP].
+// The caller should simply call LeaveStubFrame() and return.
+static void EnsureIsNewOrRemembered(Assembler* assembler,
+                                    bool preserve_registers = true) {
+  // If the object is not remembered we call a leaf-runtime to add it to the
+  // remembered set.
+  Label done;
+  __ tbnz(&done, R0, target::ObjectAlignment::kNewObjectBitPosition);
+
+  if (preserve_registers) {
+    __ EnterCallRuntimeFrame(0);
+  } else {
+    __ ReserveAlignedFrameSpace(0);
+  }
+  // [R0] already contains first argument.
+  __ mov(R1, THR);
+  __ CallRuntime(kAddAllocatedObjectToRememberedSetRuntimeEntry, 2);
+  if (preserve_registers) {
+    __ LeaveCallRuntimeFrame();
+  }
+
+  __ Bind(&done);
+}
+
 // Input parameters:
 //   LR : return address.
 //   SP : address of last argument in argument array.
@@ -176,6 +205,36 @@
   __ ret(LR);
 }
 
+void StubCodeCompiler::GenerateEnterSafepointStub(Assembler* assembler) {
+  RegisterSet all_registers;
+  all_registers.AddAllGeneralRegisters();
+  __ PushRegisters(all_registers);
+  __ mov(CallingConventions::kFirstCalleeSavedCpuReg, SP);
+  __ ReserveAlignedFrameSpace(0);
+  __ mov(CSP, SP);
+  __ ldr(R0, Address(THR, kEnterSafepointRuntimeEntry.OffsetFromThread()));
+  __ blr(R0);
+  __ mov(SP, CallingConventions::kFirstCalleeSavedCpuReg);
+  __ PopRegisters(all_registers);
+  __ mov(CSP, SP);
+  __ Ret();
+}
+
+void StubCodeCompiler::GenerateExitSafepointStub(Assembler* assembler) {
+  RegisterSet all_registers;
+  all_registers.AddAllGeneralRegisters();
+  __ PushRegisters(all_registers);
+  __ mov(CallingConventions::kFirstCalleeSavedCpuReg, SP);
+  __ ReserveAlignedFrameSpace(0);
+  __ mov(CSP, SP);
+  __ ldr(R0, Address(THR, kExitSafepointRuntimeEntry.OffsetFromThread()));
+  __ blr(R0);
+  __ mov(SP, CallingConventions::kFirstCalleeSavedCpuReg);
+  __ PopRegisters(all_registers);
+  __ mov(CSP, SP);
+  __ Ret();
+}
+
 // R1: The extracted method.
 // R4: The type_arguments_field_offset (or 0)
 void StubCodeCompiler::GenerateBuildMethodExtractorStub(
@@ -387,6 +446,13 @@
   // Reset exit frame information in Isolate structure.
   __ StoreToOffset(ZR, THR, target::Thread::top_exit_frame_info_offset());
 
+  // Restore the global object pool after returning from runtime (old space is
+  // moving, so the GOP could have been relocated).
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    __ ldr(PP, Address(THR, target::Thread::global_object_pool_offset()));
+    __ sub(PP, PP, Operand(kHeapObjectTag));  // Pool in PP is untagged!
+  }
+
   __ LeaveStubFrame();
   __ ret();
 }
@@ -495,6 +561,13 @@
   // Reset exit frame information in Isolate structure.
   __ StoreToOffset(ZR, THR, target::Thread::top_exit_frame_info_offset());
 
+  // Restore the global object pool after returning from runtime (old space is
+  // moving, so the GOP could have been relocated).
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    __ ldr(PP, Address(THR, target::Thread::global_object_pool_offset()));
+    __ sub(PP, PP, Operand(kHeapObjectTag));  // Pool in PP is untagged!
+  }
+
   __ LeaveStubFrame();
   __ ret();
 }
@@ -1008,6 +1081,12 @@
   __ Pop(R1);
   __ Pop(R2);
   __ Pop(R0);
+
+  // Write-barrier elimination might be enabled for this array (depending on the
+  // array length). To be sure we will check if the allocated object is in old
+  // space and if so call a leaf runtime to add it to the remembered set.
+  EnsureIsNewOrRemembered(assembler);
+
   __ LeaveStubFrame();
   __ ret();
 }
@@ -1419,6 +1498,12 @@
   __ CallRuntime(kAllocateContextRuntimeEntry, 1);  // Allocate context.
   __ Drop(1);  // Pop number of context variables argument.
   __ Pop(R0);  // Pop the new context object.
+
+  // Write-barrier elimination might be enabled for this context (depending on
+  // the size). To be sure we will check if the allocated object is in old
+  // space and if so call a leaf runtime to add it to the remembered set.
+  EnsureIsNewOrRemembered(assembler, /*preserve_registers=*/false);
+
   // R0: new object
   // Restore the frame pointer.
   __ LeaveStubFrame();
@@ -1714,6 +1799,13 @@
       kInstanceReg,
       Address(SP,
               2 * target::kWordSize));  // Pop result (newly allocated object).
+
+  ASSERT(kInstanceReg == R0);
+  if (AllocateObjectInstr::WillAllocateNewOrRemembered(cls)) {
+    // Write-barrier elimination is enabled for [cls] and we therefore need to
+    // ensure that the object is in new-space or has remembered bit set.
+    EnsureIsNewOrRemembered(assembler, /*preserve_registers=*/false);
+  }
   __ LeaveStubFrame();                  // Restores correct SP.
   __ ret();
 }
@@ -2321,6 +2413,9 @@
 
 // R5: Contains an ICData.
 void StubCodeCompiler::GenerateICCallBreakpointStub(Assembler* assembler) {
+#if defined(PRODUCT)
+  __ Stop("No debugging in PRODUCT mode");
+#else
   __ EnterStubFrame();
   __ Push(R5);
   __ Push(ZR);  // Space for result.
@@ -2330,9 +2425,13 @@
   __ LeaveStubFrame();
   __ LoadFieldFromOffset(R0, CODE_REG, target::Code::entry_point_offset());
   __ br(R0);
+#endif  // defined(PRODUCT)
 }
 
 void StubCodeCompiler::GenerateRuntimeCallBreakpointStub(Assembler* assembler) {
+#if defined(PRODUCT)
+  __ Stop("No debugging in PRODUCT mode");
+#else
   __ EnterStubFrame();
   __ Push(ZR);  // Space for result.
   __ CallRuntime(kBreakpointRuntimeHandlerRuntimeEntry, 0);
@@ -2340,12 +2439,13 @@
   __ LeaveStubFrame();
   __ LoadFieldFromOffset(R0, CODE_REG, target::Code::entry_point_offset());
   __ br(R0);
+#endif  // defined(PRODUCT)
 }
 
 // Called only from unoptimized code. All relevant registers have been saved.
 void StubCodeCompiler::GenerateDebugStepCheckStub(Assembler* assembler) {
 #if defined(PRODUCT)
-  __ ret();
+  __ Stop("No debugging in PRODUCT mode");
 #else
   // Check single stepping.
   Label stepping, done_stepping;
diff --git a/runtime/vm/compiler/stub_code_compiler_ia32.cc b/runtime/vm/compiler/stub_code_compiler_ia32.cc
index 0fe7e81..12259cc 100644
--- a/runtime/vm/compiler/stub_code_compiler_ia32.cc
+++ b/runtime/vm/compiler/stub_code_compiler_ia32.cc
@@ -4,6 +4,9 @@
 
 #include "vm/globals.h"
 
+// For `AllocateObjectInstr::WillAllocateNewOrRemembered`
+#include "vm/compiler/backend/il.h"
+
 #define SHOULD_NOT_INCLUDE_RUNTIME
 
 #include "vm/compiler/stub_code_compiler.h"
@@ -14,7 +17,7 @@
 #include "vm/code_entry_kind.h"
 #include "vm/compiler/assembler/assembler.h"
 #include "vm/compiler/backend/locations.h"
-#include "vm/constants_ia32.h"
+#include "vm/constants.h"
 #include "vm/instructions.h"
 #include "vm/static_type_exactness_state.h"
 #include "vm/tags.h"
@@ -31,6 +34,34 @@
 
 namespace compiler {
 
+// Ensures that [EAX] is a new object, if not it will be added to the remembered
+// set via a leaf runtime call.
+//
+// WARNING: This might clobber all registers except for [EAX], [THR] and [FP].
+// The caller should simply call LeaveFrame() and return.
+static void EnsureIsNewOrRemembered(Assembler* assembler,
+                                    bool preserve_registers = true) {
+  // If the object is not remembered we call a leaf-runtime to add it to the
+  // remembered set.
+  Label done;
+  __ testl(EAX, Immediate(1 << target::ObjectAlignment::kNewObjectBitPosition));
+  __ BranchIf(NOT_ZERO, &done);
+
+  if (preserve_registers) {
+    __ EnterCallRuntimeFrame(2 * target::kWordSize);
+  } else {
+    __ ReserveAlignedFrameSpace(2 * target::kWordSize);
+  }
+  __ movl(Address(ESP, 1 * target::kWordSize), THR);
+  __ movl(Address(ESP, 0 * target::kWordSize), EAX);
+  __ CallRuntime(kAddAllocatedObjectToRememberedSetRuntimeEntry, 2);
+  if (preserve_registers) {
+    __ LeaveCallRuntimeFrame();
+  }
+
+  __ Bind(&done);
+}
+
 // Input parameters:
 //   ESP : points to return address.
 //   ESP + 4 : address of last argument in argument array.
@@ -107,6 +138,22 @@
   __ ret();
 }
 
+void StubCodeCompiler::GenerateEnterSafepointStub(Assembler* assembler) {
+  __ pushal();
+  __ movl(EAX, Address(THR, kEnterSafepointRuntimeEntry.OffsetFromThread()));
+  __ call(EAX);
+  __ popal();
+  __ ret();
+}
+
+void StubCodeCompiler::GenerateExitSafepointStub(Assembler* assembler) {
+  __ pushal();
+  __ movl(EAX, Address(THR, kExitSafepointRuntimeEntry.OffsetFromThread()));
+  __ call(EAX);
+  __ popal();
+  __ ret();
+}
+
 void StubCodeCompiler::GenerateNullErrorSharedWithoutFPURegsStub(
     Assembler* assembler) {
   __ Breakpoint();
@@ -757,6 +804,12 @@
   __ popl(EAX);  // Pop element type argument.
   __ popl(EDX);  // Pop array length argument (preserved).
   __ popl(EAX);  // Pop return value from return slot.
+
+  // Write-barrier elimination might be enabled for this array (depending on the
+  // array length). To be sure we will check if the allocated object is in old
+  // space and if so call a leaf runtime to add it to the remembered set.
+  EnsureIsNewOrRemembered(assembler);
+
   __ LeaveFrame();
   __ ret();
 }
@@ -878,9 +931,117 @@
   __ ret();
 }
 
+// Called when invoking compiled Dart code from interpreted Dart code.
+// Input parameters:
+//   ESP : points to return address.
+//   ESP + 4 : target raw code
+//   ESP + 8 : arguments raw descriptor array.
+//   ESP + 12: address of first argument.
+//   ESP + 16 : current thread.
 void StubCodeCompiler::GenerateInvokeDartCodeFromBytecodeStub(
     Assembler* assembler) {
-  __ Unimplemented("Interpreter not yet supported");
+  const intptr_t kTargetCodeOffset = 3 * target::kWordSize;
+  const intptr_t kArgumentsDescOffset = 4 * target::kWordSize;
+  const intptr_t kArgumentsOffset = 5 * target::kWordSize;
+  const intptr_t kThreadOffset = 6 * target::kWordSize;
+
+  __ pushl(Address(ESP, 0));  // Marker for the profiler.
+  __ EnterFrame(0);
+
+  // Push code object to PC marker slot.
+  __ movl(EAX, Address(EBP, kThreadOffset));
+  __ pushl(Address(EAX, target::Thread::invoke_dart_code_stub_offset()));
+
+  // Save C++ ABI callee-saved registers.
+  __ pushl(EBX);
+  __ pushl(ESI);
+  __ pushl(EDI);
+
+  // Set up THR, which caches the current thread in Dart code.
+  __ movl(THR, EAX);
+
+  // Save the current VMTag on the stack.
+  __ movl(ECX, Assembler::VMTagAddress());
+  __ pushl(ECX);
+
+  // Save top resource and top exit frame info. Use EDX as a temporary register.
+  // StackFrameIterator reads the top exit frame info saved in this frame.
+  __ movl(EDX, Address(THR, target::Thread::top_resource_offset()));
+  __ pushl(EDX);
+  __ movl(Address(THR, target::Thread::top_resource_offset()), Immediate(0));
+  // The constant target::frame_layout.exit_link_slot_from_entry_fp must be
+  // kept in sync with the code below.
+  ASSERT(target::frame_layout.exit_link_slot_from_entry_fp == -7);
+  __ movl(EDX, Address(THR, target::Thread::top_exit_frame_info_offset()));
+  __ pushl(EDX);
+  __ movl(Address(THR, target::Thread::top_exit_frame_info_offset()),
+          Immediate(0));
+
+  // Mark that the thread is executing Dart code. Do this after initializing the
+  // exit link for the profiler.
+  __ movl(Assembler::VMTagAddress(), Immediate(VMTag::kDartCompiledTagId));
+
+  // Load arguments descriptor array into EDX.
+  __ movl(EDX, Address(EBP, kArgumentsDescOffset));
+
+  // Load number of arguments into EBX and adjust count for type arguments.
+  __ movl(EBX, FieldAddress(EDX, target::ArgumentsDescriptor::count_offset()));
+  __ cmpl(
+      FieldAddress(EDX, target::ArgumentsDescriptor::type_args_len_offset()),
+      Immediate(0));
+  Label args_count_ok;
+  __ j(EQUAL, &args_count_ok, Assembler::kNearJump);
+  __ addl(EBX, Immediate(target::ToRawSmi(1)));  // Include the type arguments.
+  __ Bind(&args_count_ok);
+  // Save number of arguments as Smi on stack, replacing ArgumentsDesc.
+  __ movl(Address(EBP, kArgumentsDescOffset), EBX);
+  __ SmiUntag(EBX);
+
+  // Set up arguments for the dart call.
+  Label push_arguments;
+  Label done_push_arguments;
+  __ testl(EBX, EBX);  // check if there are arguments.
+  __ j(ZERO, &done_push_arguments, Assembler::kNearJump);
+  __ movl(EAX, Immediate(0));
+
+  // Compute address of 'arguments array' data area into EDI.
+  __ movl(EDI, Address(EBP, kArgumentsOffset));
+
+  __ Bind(&push_arguments);
+  __ movl(ECX, Address(EDI, EAX, TIMES_4, 0));
+  __ pushl(ECX);
+  __ incl(EAX);
+  __ cmpl(EAX, EBX);
+  __ j(LESS, &push_arguments, Assembler::kNearJump);
+  __ Bind(&done_push_arguments);
+
+  // Call the dart code entrypoint.
+  __ movl(EAX, Address(EBP, kTargetCodeOffset));
+  __ call(FieldAddress(EAX, target::Code::entry_point_offset()));
+
+  // Read the saved number of passed arguments as Smi.
+  __ movl(EDX, Address(EBP, kArgumentsDescOffset));
+  // Get rid of arguments pushed on the stack.
+  __ leal(ESP, Address(ESP, EDX, TIMES_2, 0));  // EDX is a Smi.
+
+  // Restore the saved top exit frame info and top resource back into the
+  // Isolate structure.
+  __ popl(Address(THR, target::Thread::top_exit_frame_info_offset()));
+  __ popl(Address(THR, target::Thread::top_resource_offset()));
+
+  // Restore the current VMTag from the stack.
+  __ popl(Assembler::VMTagAddress());
+
+  // Restore C++ ABI callee-saved registers.
+  __ popl(EDI);
+  __ popl(ESI);
+  __ popl(EBX);
+
+  // Restore the frame pointer.
+  __ LeaveFrame();
+  __ popl(ECX);
+
+  __ ret();
 }
 
 // Called for inline allocation of contexts.
@@ -1007,6 +1168,12 @@
   __ CallRuntime(kAllocateContextRuntimeEntry, 1);  // Allocate context.
   __ popl(EAX);  // Pop number of context variables argument.
   __ popl(EAX);  // Pop the new context object.
+
+  // Write-barrier elimination might be enabled for this context (depending on
+  // the size). To be sure we will check if the allocated object is in old
+  // space and if so call a leaf runtime to add it to the remembered set.
+  EnsureIsNewOrRemembered(assembler, /*preserve_registers=*/false);
+
   // EAX: new object
   // Restore the frame pointer.
   __ LeaveFrame();
@@ -1273,6 +1440,13 @@
   __ popl(EAX);  // Pop argument (type arguments of object).
   __ popl(EAX);  // Pop argument (class of object).
   __ popl(EAX);  // Pop result (newly allocated object).
+
+  if (AllocateObjectInstr::WillAllocateNewOrRemembered(cls)) {
+    // Write-barrier elimination is enabled for [cls] and we therefore need to
+    // ensure that the object is in new-space or has remembered bit set.
+    EnsureIsNewOrRemembered(assembler, /*preserve_registers=*/false);
+  }
+
   // EAX: new object
   // Restore the frame pointer.
   __ LeaveFrame();
@@ -1794,12 +1968,77 @@
   __ jmp(EBX);
 }
 
+// Stub for interpreting a function call.
+// EDX: Arguments descriptor.
+// EAX: Function.
 void StubCodeCompiler::GenerateInterpretCallStub(Assembler* assembler) {
-  __ Unimplemented("Interpreter not yet supported");
+  __ EnterStubFrame();
+
+#if defined(DEBUG)
+  {
+    Label ok;
+    // Check that we are always entering from Dart code.
+    __ cmpl(Assembler::VMTagAddress(), Immediate(VMTag::kDartCompiledTagId));
+    __ j(EQUAL, &ok, Assembler::kNearJump);
+    __ Stop("Not coming from Dart code.");
+    __ Bind(&ok);
+  }
+#endif
+
+  // Adjust arguments count for type arguments vector.
+  __ movl(ECX, FieldAddress(EDX, target::ArgumentsDescriptor::count_offset()));
+  __ SmiUntag(ECX);
+  __ cmpl(
+      FieldAddress(EDX, target::ArgumentsDescriptor::type_args_len_offset()),
+      Immediate(0));
+  Label args_count_ok;
+  __ j(EQUAL, &args_count_ok, Assembler::kNearJump);
+  __ incl(ECX);
+  __ Bind(&args_count_ok);
+
+  // Compute argv.
+  __ leal(EBX,
+          Address(EBP, ECX, TIMES_4,
+                  target::frame_layout.param_end_from_fp * target::kWordSize));
+
+  // Indicate decreasing memory addresses of arguments with negative argc.
+  __ negl(ECX);
+
+  __ pushl(THR);  // Arg 4: Thread.
+  __ pushl(EBX);  // Arg 3: Argv.
+  __ pushl(ECX);  // Arg 2: Negative argc.
+  __ pushl(EDX);  // Arg 1: Arguments descriptor
+  __ pushl(EAX);  // Arg 0: Function
+
+  // Save exit frame information to enable stack walking as we are about
+  // to transition to Dart VM C++ code.
+  __ movl(Address(THR, target::Thread::top_exit_frame_info_offset()), EBP);
+
+  // Mark that the thread is executing VM code.
+  __ movl(EAX,
+          Address(THR, target::Thread::interpret_call_entry_point_offset()));
+  __ movl(Assembler::VMTagAddress(), EAX);
+
+  __ call(EAX);
+
+  __ Drop(5);
+
+  // Mark that the thread is executing Dart code.
+  __ movl(Assembler::VMTagAddress(), Immediate(VMTag::kDartCompiledTagId));
+
+  // Reset exit frame information in Isolate structure.
+  __ movl(Address(THR, target::Thread::top_exit_frame_info_offset()),
+          Immediate(0));
+
+  __ LeaveFrame();
+  __ ret();
 }
 
 // ECX: Contains an ICData.
 void StubCodeCompiler::GenerateICCallBreakpointStub(Assembler* assembler) {
+#if defined(PRODUCT)
+  __ Stop("No debugging in PRODUCT mode");
+#else
   __ EnterStubFrame();
   // Save IC data.
   __ pushl(ECX);
@@ -1813,9 +2052,13 @@
   // Jump to original stub.
   __ movl(EAX, FieldAddress(EAX, target::Code::entry_point_offset()));
   __ jmp(EAX);
+#endif  // defined(PRODUCT)
 }
 
 void StubCodeCompiler::GenerateRuntimeCallBreakpointStub(Assembler* assembler) {
+#if defined(PRODUCT)
+  __ Stop("No debugging in PRODUCT mode");
+#else
   __ EnterStubFrame();
   // Room for result. Debugger stub returns address of the
   // unpatched runtime stub.
@@ -1826,12 +2069,13 @@
   // Jump to original stub.
   __ movl(EAX, FieldAddress(EAX, target::Code::entry_point_offset()));
   __ jmp(EAX);
+#endif  // defined(PRODUCT)
 }
 
 // Called only from unoptimized code.
 void StubCodeCompiler::GenerateDebugStepCheckStub(Assembler* assembler) {
 #if defined(PRODUCT)
-  __ ret();
+  __ Stop("No debugging in PRODUCT mode");
 #else
   // Check single stepping.
   Label stepping, done_stepping;
diff --git a/runtime/vm/compiler/stub_code_compiler_x64.cc b/runtime/vm/compiler/stub_code_compiler_x64.cc
index b357b77..0df3f7a 100644
--- a/runtime/vm/compiler/stub_code_compiler_x64.cc
+++ b/runtime/vm/compiler/stub_code_compiler_x64.cc
@@ -2,10 +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.
 
+#include "vm/compiler/runtime_api.h"
 #include "vm/globals.h"
 
+// For `AllocateObjectInstr::WillAllocateNewOrRemembered`
+#include "vm/compiler/backend/il.h"
+
 #define SHOULD_NOT_INCLUDE_RUNTIME
 
+#include "vm/compiler/backend/locations.h"
 #include "vm/compiler/stub_code_compiler.h"
 
 #if defined(TARGET_ARCH_X64) && !defined(DART_PRECOMPILED_RUNTIME)
@@ -13,7 +18,7 @@
 #include "vm/class_id.h"
 #include "vm/code_entry_kind.h"
 #include "vm/compiler/assembler/assembler.h"
-#include "vm/constants_x64.h"
+#include "vm/constants.h"
 #include "vm/instructions.h"
 #include "vm/static_type_exactness_state.h"
 #include "vm/tags.h"
@@ -27,11 +32,38 @@
             use_slow_path,
             false,
             "Set to true for debugging & verifying the slow paths.");
-DECLARE_FLAG(bool, enable_interpreter);
 DECLARE_FLAG(bool, precompiled_mode);
 
 namespace compiler {
 
+// Ensures that [RAX] is a new object, if not it will be added to the remembered
+// set via a leaf runtime call.
+//
+// WARNING: This might clobber all registers except for [RAX], [THR] and [FP].
+// The caller should simply call LeaveStubFrame() and return.
+static void EnsureIsNewOrRemembered(Assembler* assembler,
+                                    bool preserve_registers = true) {
+  // If the object is not remembered we call a leaf-runtime to add it to the
+  // remembered set.
+  Label done;
+  __ testq(RAX, Immediate(1 << target::ObjectAlignment::kNewObjectBitPosition));
+  __ BranchIf(NOT_ZERO, &done);
+
+  if (preserve_registers) {
+    __ EnterCallRuntimeFrame(0);
+  } else {
+    __ ReserveAlignedFrameSpace(0);
+  }
+  __ movq(CallingConventions::kArg1Reg, RAX);
+  __ movq(CallingConventions::kArg2Reg, THR);
+  __ CallRuntime(kAddAllocatedObjectToRememberedSetRuntimeEntry, 2);
+  if (preserve_registers) {
+    __ LeaveCallRuntimeFrame();
+  }
+
+  __ Bind(&done);
+}
+
 // Input parameters:
 //   RSP : points to return address.
 //   RSP + 8 : address of last argument in argument array.
@@ -167,6 +199,28 @@
   __ ret();
 }
 
+void StubCodeCompiler::GenerateEnterSafepointStub(Assembler* assembler) {
+  RegisterSet all_registers;
+  all_registers.AddAllGeneralRegisters();
+  __ PushRegisters(all_registers.cpu_registers(),
+                   all_registers.fpu_registers());
+  __ movq(RAX, Address(THR, kEnterSafepointRuntimeEntry.OffsetFromThread()));
+  __ CallCFunction(RAX);
+  __ PopRegisters(all_registers.cpu_registers(), all_registers.fpu_registers());
+  __ ret();
+}
+
+void StubCodeCompiler::GenerateExitSafepointStub(Assembler* assembler) {
+  RegisterSet all_registers;
+  all_registers.AddAllGeneralRegisters();
+  __ PushRegisters(all_registers.cpu_registers(),
+                   all_registers.fpu_registers());
+  __ movq(RAX, Address(THR, kExitSafepointRuntimeEntry.OffsetFromThread()));
+  __ CallCFunction(RAX);
+  __ PopRegisters(all_registers.cpu_registers(), all_registers.fpu_registers());
+  __ ret();
+}
+
 // RBX: The extracted method.
 // RDX: The type_arguments_field_offset (or 0)
 void StubCodeCompiler::GenerateBuildMethodExtractorStub(
@@ -370,6 +424,12 @@
   __ movq(Address(THR, target::Thread::top_exit_frame_info_offset()),
           Immediate(0));
 
+  // Restore the global object pool after returning from runtime (old space is
+  // moving, so the GOP could have been relocated).
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    __ movq(PP, Address(THR, target::Thread::global_object_pool_offset()));
+  }
+
   __ LeaveStubFrame();
   __ ret();
 }
@@ -456,6 +516,12 @@
   __ movq(Address(THR, target::Thread::top_exit_frame_info_offset()),
           Immediate(0));
 
+  // Restore the global object pool after returning from runtime (old space is
+  // moving, so the GOP could have been relocated).
+  if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
+    __ movq(PP, Address(THR, target::Thread::global_object_pool_offset()));
+  }
+
   __ LeaveStubFrame();
   __ ret();
 }
@@ -956,6 +1022,12 @@
   __ popq(RAX);  // Pop element type argument.
   __ popq(R10);  // Pop array length argument.
   __ popq(RAX);  // Pop return value from return slot.
+
+  // Write-barrier elimination might be enabled for this array (depending on the
+  // array length). To be sure we will check if the allocated object is in old
+  // space and if so call a leaf runtime to add it to the remembered set.
+  EnsureIsNewOrRemembered(assembler);
+
   __ LeaveStubFrame();
   __ ret();
 }
@@ -1380,6 +1452,12 @@
   __ CallRuntime(kAllocateContextRuntimeEntry, 1);  // Allocate context.
   __ popq(RAX);  // Pop number of context variables argument.
   __ popq(RAX);  // Pop the new context object.
+
+  // Write-barrier elimination might be enabled for this context (depending on
+  // the size). To be sure we will check if the allocated object is in old
+  // space and if so call a leaf runtime to add it to the remembered set.
+  EnsureIsNewOrRemembered(assembler, /*preserve_registers=*/false);
+
   // RAX: new object
   // Restore the frame pointer.
   __ LeaveStubFrame();
@@ -1683,6 +1761,7 @@
   // RDX: new object type arguments.
   // Create a stub frame.
   __ EnterStubFrame();  // Uses PP to access class object.
+
   __ pushq(R9);         // Setup space on stack for return value.
   __ PushObject(
       CastHandle<Object>(cls));  // Push class of object to be allocated.
@@ -1695,6 +1774,13 @@
   __ popq(RAX);  // Pop argument (type arguments of object).
   __ popq(RAX);  // Pop argument (class of object).
   __ popq(RAX);  // Pop result (newly allocated object).
+
+  if (AllocateObjectInstr::WillAllocateNewOrRemembered(cls)) {
+    // Write-barrier elimination is enabled for [cls] and we therefore need to
+    // ensure that the object is in new-space or has remembered bit set.
+    EnsureIsNewOrRemembered(assembler, /*preserve_registers=*/false);
+  }
+
   // RAX: new object
   // Restore the frame pointer.
   __ LeaveStubFrame();
@@ -2006,10 +2092,10 @@
     __ j(EQUAL, &call_target_function_through_unchecked_entry);
 
     // Check trivial exactness.
-    // Note: RawICData::static_receiver_type_ is guaranteed to be not null
+    // Note: RawICData::receivers_static_type_ is guaranteed to be not null
     // because we only emit calls to this stub when it is not null.
     __ movq(RCX,
-            FieldAddress(RBX, target::ICData::static_receiver_type_offset()));
+            FieldAddress(RBX, target::ICData::receivers_static_type_offset()));
     __ movq(RCX, FieldAddress(RCX, target::Type::arguments_offset()));
     // RAX contains an offset to type arguments in words as a smi,
     // hence TIMES_4. RDX is guaranteed to be non-smi because it is expected to
@@ -2343,6 +2429,9 @@
 // RBX: Contains an ICData.
 // TOS(0): return address (Dart code).
 void StubCodeCompiler::GenerateICCallBreakpointStub(Assembler* assembler) {
+#if defined(PRODUCT)
+  __ Stop("No debugging in PRODUCT mode");
+#else
   __ EnterStubFrame();
   __ pushq(RBX);           // Preserve IC data.
   __ pushq(Immediate(0));  // Result slot.
@@ -2353,10 +2442,14 @@
 
   __ movq(RAX, FieldAddress(CODE_REG, target::Code::entry_point_offset()));
   __ jmp(RAX);  // Jump to original stub.
+#endif  // defined(PRODUCT)
 }
 
 //  TOS(0): return address (Dart code).
 void StubCodeCompiler::GenerateRuntimeCallBreakpointStub(Assembler* assembler) {
+#if defined(PRODUCT)
+  __ Stop("No debugging in PRODUCT mode");
+#else
   __ EnterStubFrame();
   __ pushq(Immediate(0));  // Result slot.
   __ CallRuntime(kBreakpointRuntimeHandlerRuntimeEntry, 0);
@@ -2365,12 +2458,13 @@
 
   __ movq(RAX, FieldAddress(CODE_REG, target::Code::entry_point_offset()));
   __ jmp(RAX);  // Jump to original stub.
+#endif  // defined(PRODUCT)
 }
 
 // Called only from unoptimized code.
 void StubCodeCompiler::GenerateDebugStepCheckStub(Assembler* assembler) {
 #if defined(PRODUCT)
-  __ Ret();
+  __ Stop("No debugging in PRODUCT mode");
 #else
   // Check single stepping.
   Label stepping, done_stepping;
diff --git a/runtime/vm/compiler_test.cc b/runtime/vm/compiler_test.cc
index 02a4ed1..d10c8c4 100644
--- a/runtime/vm/compiler_test.cc
+++ b/runtime/vm/compiler_test.cc
@@ -37,12 +37,13 @@
       "    // A.foo();\n"
       "  }\n"
       "}\n";
-  String& url = String::Handle(String::New("dart-test:CompileFunction"));
-  String& source = String::Handle(String::New(kScriptChars));
-  Script& script =
-      Script::Handle(Script::New(url, source, RawScript::kScriptTag));
-  Library& lib = Library::Handle(Library::CoreLibrary());
-  EXPECT(CompilerTest::TestCompileScript(lib, script));
+  Dart_Handle library;
+  {
+    TransitionVMToNative transition(thread);
+    library = TestCase::LoadTestScript(kScriptChars, NULL);
+  }
+  const Library& lib =
+      Library::Handle(Library::RawCast(Api::UnwrapHandle(library)));
   EXPECT(ClassFinalizer::ProcessPendingClasses());
   Class& cls =
       Class::Handle(lib.LookupClass(String::Handle(Symbols::New(thread, "A"))));
@@ -68,19 +69,19 @@
                function_source.ToCString());
 }
 
-ISOLATE_UNIT_TEST_CASE(CompileFunctionOnHelperThread) {
+ISOLATE_UNIT_TEST_CASE(OptimizeCompileFunctionOnHelperThread) {
   // Create a simple function and compile it without optimization.
   const char* kScriptChars =
       "class A {\n"
       "  static foo() { return 42; }\n"
       "}\n";
-  String& url =
-      String::Handle(String::New("dart-test:CompileFunctionOnHelperThread"));
-  String& source = String::Handle(String::New(kScriptChars));
-  Script& script =
-      Script::Handle(Script::New(url, source, RawScript::kScriptTag));
-  Library& lib = Library::Handle(Library::CoreLibrary());
-  EXPECT(CompilerTest::TestCompileScript(lib, script));
+  Dart_Handle library;
+  {
+    TransitionVMToNative transition(thread);
+    library = TestCase::LoadTestScript(kScriptChars, NULL);
+  }
+  const Library& lib =
+      Library::Handle(Library::RawCast(Api::UnwrapHandle(library)));
   EXPECT(ClassFinalizer::ProcessPendingClasses());
   Class& cls =
       Class::Handle(lib.LookupClass(String::Handle(Symbols::New(thread, "A"))));
@@ -98,7 +99,7 @@
 #endif
   Isolate* isolate = thread->isolate();
   BackgroundCompiler::Start(isolate);
-  isolate->background_compiler()->CompileOptimized(func);
+  isolate->optimizing_background_compiler()->Compile(func);
   Monitor* m = new Monitor();
   {
     MonitorLocker ml(m);
@@ -110,6 +111,50 @@
   BackgroundCompiler::Stop(isolate);
 }
 
+ISOLATE_UNIT_TEST_CASE(CompileFunctionOnHelperThread) {
+  // Create a simple function and compile it without optimization.
+  const char* kScriptChars =
+      "class A {\n"
+      "  static foo() { return 42; }\n"
+      "}\n";
+  Dart_Handle library;
+  {
+    TransitionVMToNative transition(thread);
+    library = TestCase::LoadTestScript(kScriptChars, NULL);
+  }
+  const Library& lib =
+      Library::Handle(Library::RawCast(Api::UnwrapHandle(library)));
+  EXPECT(ClassFinalizer::ProcessPendingClasses());
+  Class& cls =
+      Class::Handle(lib.LookupClass(String::Handle(Symbols::New(thread, "A"))));
+  EXPECT(!cls.IsNull());
+  String& function_foo_name = String::Handle(String::New("foo"));
+  Function& func =
+      Function::Handle(cls.LookupStaticFunction(function_foo_name));
+  EXPECT(!func.HasCode());
+  if (!FLAG_enable_interpreter) {
+    CompilerTest::TestCompileFunction(func);
+    EXPECT(func.HasCode());
+    return;
+  }
+#if !defined(PRODUCT)
+  // Constant in product mode.
+  FLAG_background_compilation = true;
+#endif
+  Isolate* isolate = thread->isolate();
+  BackgroundCompiler::Start(isolate);
+  isolate->background_compiler()->Compile(func);
+  Monitor* m = new Monitor();
+  {
+    MonitorLocker ml(m);
+    while (!func.HasCode()) {
+      ml.WaitWithSafepointCheck(thread, 1);
+    }
+  }
+  delete m;
+  BackgroundCompiler::Stop(isolate);
+}
+
 ISOLATE_UNIT_TEST_CASE(RegenerateAllocStubs) {
   const char* kScriptChars =
       "class A {\n"
diff --git a/runtime/vm/constants.h b/runtime/vm/constants.h
index c6412d2..7fe6c15 100644
--- a/runtime/vm/constants.h
+++ b/runtime/vm/constants.h
@@ -19,4 +19,72 @@
 #error Unknown architecture.
 #endif
 
+#if defined(HOST_ARCH_IA32)
+#include "vm/constants_ia32.h"
+#elif defined(HOST_ARCH_X64)
+#include "vm/constants_x64.h"
+#elif defined(HOST_ARCH_ARM)
+#include "vm/constants_arm.h"
+#elif defined(HOST_ARCH_ARM64)
+#include "vm/constants_arm64.h"
+#else
+#error Unknown host architecture.
+#endif
+
+namespace dart {
+
+#if defined(TARGET_ARCH_IA32)
+using namespace arch_ia32;  // NOLINT
+#elif defined(TARGET_ARCH_X64)
+using namespace arch_x64;  // NOLINT
+#elif defined(TARGET_ARCH_ARM)
+using namespace arch_arm;  // NOLINT
+#elif defined(TARGET_ARCH_ARM64)
+using namespace arch_arm64;  // NOLINT
+#elif defined(TARGET_ARCH_DBC)
+// DBC is defined in namespace dart already.
+#else
+#error Unknown architecture.
+#endif
+
+namespace host {
+
+#if defined(HOST_ARCH_IA32)
+using namespace arch_ia32;  // NOLINT
+#elif defined(HOST_ARCH_X64)
+using namespace arch_x64;  // NOLINT
+#elif defined(HOST_ARCH_ARM)
+using namespace arch_arm;  // NOLINT
+#elif defined(HOST_ARCH_ARM64)
+using namespace arch_arm64;  // NOLINT
+#else
+#error Unknown host architecture.
+#endif
+
+}  // namespace host
+
+class RegisterNames {
+ public:
+  static const char* RegisterName(Register reg) {
+    ASSERT((0 <= reg) && (reg < kNumberOfCpuRegisters));
+    return cpu_reg_names[reg];
+  }
+  static const char* FpuRegisterName(FpuRegister reg) {
+    ASSERT((0 <= reg) && (reg < kNumberOfFpuRegisters));
+    return fpu_reg_names[reg];
+  }
+#if !defined(HOST_ARCH_EQUALS_TARGET_ARCH)
+  static const char* RegisterName(host::Register reg) {
+    ASSERT((0 <= reg) && (reg < host::kNumberOfCpuRegisters));
+    return host::cpu_reg_names[reg];
+  }
+  static const char* FpuRegisterName(host::FpuRegister reg) {
+    ASSERT((0 <= reg) && (reg < host::kNumberOfFpuRegisters));
+    return host::fpu_reg_names[reg];
+  }
+#endif  // !defined(HOST_ARCH_EQUALS_TARGET_ARCH)
+};
+
+}  // namespace dart
+
 #endif  // RUNTIME_VM_CONSTANTS_H_
diff --git a/runtime/vm/constants_arm.cc b/runtime/vm/constants_arm.cc
new file mode 100644
index 0000000..0934c48
--- /dev/null
+++ b/runtime/vm/constants_arm.cc
@@ -0,0 +1,16 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#define RUNTIME_VM_CONSTANTS_H_  // To work around include guard.
+#include "vm/constants_arm.h"
+
+namespace arch_arm {
+
+const Register CallingConventions::ArgumentRegisters[] = {R0, R1, R2, R3};
+
+// Although 'kFpuArgumentRegisters' is 0, we have to give this array at least
+// one element to appease MSVC.
+const FpuRegister CallingConventions::FpuArgumentRegisters[] = {Q0};
+
+}  // namespace arch_arm
diff --git a/runtime/vm/constants_arm.h b/runtime/vm/constants_arm.h
index 4e272c5..afbcb92 100644
--- a/runtime/vm/constants_arm.h
+++ b/runtime/vm/constants_arm.h
@@ -5,10 +5,14 @@
 #ifndef RUNTIME_VM_CONSTANTS_ARM_H_
 #define RUNTIME_VM_CONSTANTS_ARM_H_
 
+#ifndef RUNTIME_VM_CONSTANTS_H_
+#error Do not include constants_arm.h directly; use constants.h instead.
+#endif
+
 #include "platform/assert.h"
 #include "platform/globals.h"
 
-namespace dart {
+namespace arch_arm {
 
 // We support both VFPv3-D16 and VFPv3-D32 profiles, but currently only one at
 // a time.
@@ -261,6 +265,18 @@
 const int kNumberOfFpuRegisters = kNumberOfQRegisters;
 const FpuRegister kNoFpuRegister = kNoQRegister;
 
+static const char* cpu_reg_names[kNumberOfCpuRegisters] = {
+    "r0", "r1",  "r2", "r3", "r4", "r5", "r6", "r7",
+    "r8", "ctx", "pp", "fp", "ip", "sp", "lr", "pc",
+};
+
+static const char* fpu_reg_names[kNumberOfFpuRegisters] = {
+    "q0", "q1", "q2",  "q3",  "q4",  "q5",  "q6",  "q7",
+#if defined(VFPv3_D32)
+    "q8", "q9", "q10", "q11", "q12", "q13", "q14", "q15",
+#endif
+};
+
 // Register aliases.
 const Register TMP = IP;            // Used as scratch register by assembler.
 const Register TMP2 = kNoRegister;  // There is no second assembler temporary.
@@ -328,6 +344,46 @@
 const QRegister kDartLastVolatileFpuReg = Q3;
 const int kDartVolatileFpuRegCount = 4;
 
+#define R(REG) (1 << REG)
+
+class CallingConventions {
+ public:
+  static const intptr_t kArgumentRegisters = kAbiArgumentCpuRegs;
+  static const Register ArgumentRegisters[];
+  static const intptr_t kNumArgRegs = 4;
+
+  static const FpuRegister FpuArgumentRegisters[];
+  static const intptr_t kFpuArgumentRegisters = 0;
+  static const intptr_t kNumFpuArgRegs = 0;
+
+  static constexpr bool kArgumentIntRegXorFpuReg = false;
+
+  // Whether floating-point values should be passed as integers ("softfp" vs
+  // "hardfp"). Android and iOS always use the "softfp" calling convention, even
+  // when hardfp support is present.
+#if defined(TARGET_OS_MACOS_IOS) || defined(TARGET_OS_ANDROID)
+  static constexpr bool kAbiSoftFP = true;
+#else
+  static constexpr bool kAbiSoftFP = false;
+#endif
+
+  // Whether 64-bit arguments must be aligned to an even register or 8-byte
+  // stack address. True for ARM 32-bit, see "Procedure Call Standard for the
+  // ARM Architecture".
+  static constexpr bool kAlignArguments = true;
+
+  static constexpr Register kReturnReg = R0;
+  static constexpr Register kSecondReturnReg = R1;
+  static constexpr FpuRegister kReturnFpuReg = kNoFpuRegister;
+
+  // We choose these to avoid overlap between themselves and reserved registers.
+  static constexpr Register kFirstNonArgumentRegister = R8;
+  static constexpr Register kSecondNonArgumentRegister = R9;
+  static constexpr Register kFirstCalleeSavedCpuReg = NOTFP;
+};
+
+#undef R
+
 // Values for the condition field as defined in section A3.2.
 enum Condition {
   kNoCondition = -1,
@@ -609,14 +665,14 @@
   inline float ImmFloatField() const {
     uint32_t imm32 = (Bit(19) << 31) | (((1 << 5) - Bit(18)) << 25) |
                      (Bits(16, 2) << 23) | (Bits(0, 4) << 19);
-    return bit_cast<float, uint32_t>(imm32);
+    return ::dart::bit_cast<float, uint32_t>(imm32);
   }
 
   // Field used in VFP double immediate move instruction
   inline double ImmDoubleField() const {
     uint64_t imm64 = (Bit(19) * (1LL << 63)) | (((1LL << 8) - Bit(18)) << 54) |
                      (Bits(16, 2) * (1LL << 52)) | (Bits(0, 4) * (1LL << 48));
-    return bit_cast<double, uint64_t>(imm64);
+    return ::dart::bit_cast<double, uint64_t>(imm64);
   }
 
   inline Register DivRdField() const {
@@ -757,13 +813,13 @@
   // reference to an instruction is to convert a pointer. There is no way
   // to allocate or create instances of class Instr.
   // Use the At(pc) function to create references to Instr.
-  static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); }
+  static Instr* At(::dart::uword pc) { return reinterpret_cast<Instr*>(pc); }
 
  private:
   DISALLOW_ALLOCATION();
   DISALLOW_IMPLICIT_CONSTRUCTORS(Instr);
 };
 
-}  // namespace dart
+}  // namespace arch_arm
 
 #endif  // RUNTIME_VM_CONSTANTS_ARM_H_
diff --git a/runtime/vm/constants_arm64.cc b/runtime/vm/constants_arm64.cc
new file mode 100644
index 0000000..9938d7c
--- /dev/null
+++ b/runtime/vm/constants_arm64.cc
@@ -0,0 +1,18 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#define RUNTIME_VM_CONSTANTS_H_  // To work around include guard.
+#include "vm/constants_arm64.h"
+
+namespace arch_arm64 {
+
+const Register CallingConventions::ArgumentRegisters[] = {
+    R0, R1, R2, R3, R4, R5, R6, R7,
+};
+
+const FpuRegister CallingConventions::FpuArgumentRegisters[] = {
+    V0, V1, V2, V3, V4, V5, V6, V7,
+};
+
+}  // namespace arch_arm64
diff --git a/runtime/vm/constants_arm64.h b/runtime/vm/constants_arm64.h
index 0e2d6ea..9f3355a 100644
--- a/runtime/vm/constants_arm64.h
+++ b/runtime/vm/constants_arm64.h
@@ -5,9 +5,13 @@
 #ifndef RUNTIME_VM_CONSTANTS_ARM64_H_
 #define RUNTIME_VM_CONSTANTS_ARM64_H_
 
+#ifndef RUNTIME_VM_CONSTANTS_H_
+#error Do not include constants_arm64.h directly; use constants.h instead.
+#endif
+
 #include "platform/assert.h"
 
-namespace dart {
+namespace arch_arm64 {
 
 enum Register {
   R0 = 0,
@@ -104,10 +108,22 @@
 const int kNumberOfFpuRegisters = kNumberOfVRegisters;
 const FpuRegister kNoFpuRegister = kNoVRegister;
 
+static const char* cpu_reg_names[kNumberOfCpuRegisters] = {
+    "r0",  "r1",  "r2",  "r3",  "r4",  "r5",  "r6",  "r7",  "r8",  "r9",  "r10",
+    "r11", "r12", "r13", "r14", "r15", "r16", "r17", "r18", "r19", "r20", "r21",
+    "r22", "r23", "r24", "ip0", "ip1", "pp",  "ctx", "fp",  "lr",  "r31",
+};
+
+static const char* fpu_reg_names[kNumberOfFpuRegisters] = {
+    "v0",  "v1",  "v2",  "v3",  "v4",  "v5",  "v6",  "v7",  "v8",  "v9",  "v10",
+    "v11", "v12", "v13", "v14", "v15", "v16", "v17", "v18", "v19", "v20", "v21",
+    "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30", "v31",
+};
+
 // Register aliases.
 const Register TMP = R16;  // Used as scratch register by assembler.
 const Register TMP2 = R17;
-const Register PP = R27;   // Caches object pool pointer in generated code.
+const Register PP = R27;  // Caches object pool pointer in generated code.
 const Register CODE_REG = R24;
 const Register FPREG = FP;          // Frame pointer register.
 const Register SPREG = R15;         // Stack pointer register.
@@ -137,6 +153,9 @@
 typedef uint32_t RegList;
 const RegList kAllCpuRegistersList = 0xFFFFFFFF;
 
+// See "Procedure Call Standard for the ARM 64-bit Architecture", document
+// number "ARM IHI 0055B", May 22 2013.
+
 // C++ ABI call registers.
 const RegList kAbiArgumentCpuRegs = (1 << R0) | (1 << R1) | (1 << R2) |
                                     (1 << R3) | (1 << R4) | (1 << R5) |
@@ -173,6 +192,40 @@
 
 constexpr int kStoreBufferWrapperSize = 32;
 
+#define R(REG) (1 << REG)
+
+class CallingConventions {
+ public:
+  static const intptr_t kArgumentRegisters = kAbiArgumentCpuRegs;
+  static const Register ArgumentRegisters[];
+  static const intptr_t kNumArgRegs = 8;
+
+  static const FpuRegister FpuArgumentRegisters[];
+  static const intptr_t kFpuArgumentRegisters =
+      R(V0) | R(V1) | R(V2) | R(V3) | R(V4) | R(V5) | R(V6) | R(V7);
+  static const intptr_t kNumFpuArgRegs = 8;
+
+  static const bool kArgumentIntRegXorFpuReg = false;
+
+  // Whether floating-point values should be passed as integers ("softfp" vs
+  // "hardfp").
+  static constexpr bool kAbiSoftFP = false;
+
+  // Whether 64-bit arguments must be aligned to an even register or 8-byte
+  // stack address. Not relevant on X64 since the word size is 64-bits already.
+  static constexpr bool kAlignArguments = false;
+
+  static constexpr Register kReturnReg = R0;
+  static constexpr Register kSecondReturnReg = kNoRegister;
+  static constexpr FpuRegister kReturnFpuReg = V0;
+
+  static constexpr Register kFirstCalleeSavedCpuReg = kAbiFirstPreservedCpuReg;
+  static constexpr Register kFirstNonArgumentRegister = R8;
+  static constexpr Register kSecondNonArgumentRegister = R9;
+};
+
+#undef R
+
 static inline Register ConcreteRegister(Register r) {
   return ((r == ZR) || (r == CSP)) ? R31 : r;
 }
@@ -368,10 +421,7 @@
   SystemFixed = CompareBranchFixed | B31 | B30 | B24,
   HINT = SystemFixed | B17 | B16 | B13 | B4 | B3 | B2 | B1 | B0,
   CLREX = SystemFixed | B17 | B16 | B13 | B12 | B11 | B10 | B9 | B8 | B6 | B4 |
-          B3 |
-          B2 |
-          B1 |
-          B0,
+          B3 | B2 | B1 | B0,
 };
 
 // C3.2.5
@@ -1157,13 +1207,13 @@
   // reference to an instruction is to convert a pointer. There is no way
   // to allocate or create instances of class Instr.
   // Use the At(pc) function to create references to Instr.
-  static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); }
+  static Instr* At(::dart::uword pc) { return reinterpret_cast<Instr*>(pc); }
 
  private:
   DISALLOW_ALLOCATION();
   DISALLOW_IMPLICIT_CONSTRUCTORS(Instr);
 };
 
-}  // namespace dart
+}  // namespace arch_arm64
 
 #endif  // RUNTIME_VM_CONSTANTS_ARM64_H_
diff --git a/runtime/vm/constants_dbc.h b/runtime/vm/constants_dbc.h
index 74e1ac1..2eb202d 100644
--- a/runtime/vm/constants_dbc.h
+++ b/runtime/vm/constants_dbc.h
@@ -337,6 +337,7 @@
 //        Jump T         ;; jump if not equal
 //
 //  - If<Cond>Null rA
+//    If<Cond>NullTOS
 //
 //    Cond is Eq or Ne. Skips the next instruction unless the given condition
 //    holds.
@@ -490,6 +491,10 @@
 //    stored in the following Nop instruction. Used to access fields with
 //    large offsets.
 //
+//  - StoreUntagged rA, B, rC
+//
+//    Like StoreField, but assumes that FP[rC] is untagged.
+//
 //  - StoreFieldTOS D
 //
 //    Store value SP[0] into object SP[-1] at offset (in words) D.
@@ -719,6 +724,10 @@
 //    InstanceCall ... <- lazy deopt inside first call
 //    InstanceCall ... <- patches second call with Deopt
 //
+//  - NullError
+//
+//    Throws a NullError.
+//
 // BYTECODE LIST FORMAT
 //
 // Bytecode list below is specified using the following format:
@@ -858,6 +867,8 @@
   V(IfEqStrictNum,                       A_D, reg, reg, ___) \
   V(IfEqNull,                              A, reg, ___, ___) \
   V(IfNeNull,                              A, reg, ___, ___) \
+  V(IfEqNullTOS,                           0, ___, ___, ___) \
+  V(IfNeNullTOS,                           0, ___, ___, ___) \
   V(CreateArrayTOS,                        0, ___, ___, ___) \
   V(CreateArrayOpt,                    A_B_C, reg, reg, reg) \
   V(Allocate,                              D, lit, ___, ___) \
@@ -866,14 +877,17 @@
   V(AllocateTOpt,                        A_D, reg, lit, ___) \
   V(StoreIndexedTOS,                       0, ___, ___, ___) \
   V(StoreIndexed,                      A_B_C, reg, reg, reg) \
-  V(StoreIndexedUint8,                 A_B_C, reg, reg, reg) \
-  V(StoreIndexedExternalUint8,         A_B_C, reg, reg, reg) \
   V(StoreIndexedOneByteString,         A_B_C, reg, reg, reg) \
+  V(StoreIndexedUint8,                 A_B_C, reg, reg, reg) \
   V(StoreIndexedUint32,                A_B_C, reg, reg, reg) \
   V(StoreIndexedFloat32,               A_B_C, reg, reg, reg) \
   V(StoreIndexed4Float32,              A_B_C, reg, reg, reg) \
   V(StoreIndexedFloat64,               A_B_C, reg, reg, reg) \
   V(StoreIndexed8Float64,              A_B_C, reg, reg, reg) \
+  V(StoreIndexedUntaggedUint8,         A_B_C, reg, reg, reg) \
+  V(StoreIndexedUntaggedUint32,        A_B_C, reg, reg, reg) \
+  V(StoreIndexedUntaggedFloat32,       A_B_C, reg, reg, reg) \
+  V(StoreIndexedUntaggedFloat64,       A_B_C, reg, reg, reg) \
   V(NoSuchMethod,                          0, ___, ___, ___) \
   V(TailCall,                              0, ___, ___, ___) \
   V(TailCallOpt,                         A_D, reg, reg, ___) \
@@ -885,20 +899,25 @@
   V(StoreFpRelativeSlotOpt,             A_B_Y, reg, reg, reg) \
   V(LoadIndexedTOS,                        0, ___, ___, ___) \
   V(LoadIndexed,                       A_B_C, reg, reg, reg) \
+  V(LoadIndexedOneByteString,          A_B_C, reg, reg, reg) \
+  V(LoadIndexedTwoByteString,          A_B_C, reg, reg, reg) \
   V(LoadIndexedUint8,                  A_B_C, reg, reg, reg) \
   V(LoadIndexedInt8,                   A_B_C, reg, reg, reg) \
   V(LoadIndexedInt32,                  A_B_C, reg, reg, reg) \
   V(LoadIndexedUint32,                 A_B_C, reg, reg, reg) \
-  V(LoadIndexedExternalUint8,          A_B_C, reg, reg, reg) \
-  V(LoadIndexedExternalInt8,           A_B_C, reg, reg, reg) \
   V(LoadIndexedFloat32,                A_B_C, reg, reg, reg) \
   V(LoadIndexed4Float32,               A_B_C, reg, reg, reg) \
   V(LoadIndexedFloat64,                A_B_C, reg, reg, reg) \
   V(LoadIndexed8Float64,               A_B_C, reg, reg, reg) \
-  V(LoadIndexedOneByteString,          A_B_C, reg, reg, reg) \
-  V(LoadIndexedTwoByteString,          A_B_C, reg, reg, reg) \
+  V(LoadIndexedUntaggedInt8,           A_B_C, reg, reg, reg) \
+  V(LoadIndexedUntaggedUint8,          A_B_C, reg, reg, reg) \
+  V(LoadIndexedUntaggedInt32,          A_B_C, reg, reg, reg) \
+  V(LoadIndexedUntaggedUint32,         A_B_C, reg, reg, reg) \
+  V(LoadIndexedUntaggedFloat32,        A_B_C, reg, reg, reg) \
+  V(LoadIndexedUntaggedFloat64,        A_B_C, reg, reg, reg) \
   V(StoreField,                        A_B_C, reg, num, reg) \
   V(StoreFieldExt,                       A_D, reg, reg, ___) \
+  V(StoreUntagged,                     A_B_C, reg, num, reg) \
   V(StoreFieldTOS,                         D, num, ___, ___) \
   V(LoadField,                         A_B_C, reg, reg, num) \
   V(LoadFieldExt,                        A_D, reg, reg, ___) \
@@ -937,7 +956,8 @@
   V(DebugStep,                             0, ___, ___, ___) \
   V(DebugBreak,                            A, num, ___, ___) \
   V(Deopt,                               A_D, num, num, ___) \
-  V(DeoptRewind,                           0, ___, ___, ___)
+  V(DeoptRewind,                           0, ___, ___, ___) \
+  V(NullError,                             0, ___, ___, ___)
 
 // clang-format on
 
@@ -1091,6 +1111,21 @@
 const FpuRegister FpuTMP = kFakeFpuRegister;
 const intptr_t kNumberOfFpuRegisters = 1;
 
+static const char* cpu_reg_names[kNumberOfCpuRegisters] = {
+    "R0",  "R1",  "R2",  "R3",  "R4",  "R5",  "R6",  "R7",  "R8",  "R9",  "R10",
+    "R11", "R12", "R13", "R14", "R15", "R16", "R17", "R18", "R19", "R20", "R21",
+    "R22", "R23", "R24", "R25", "R26", "R27", "R28", "R29", "R30", "R31",
+#if defined(ARCH_IS_64_BIT)
+    "R32", "R33", "R34", "R35", "R36", "R37", "R38", "R39", "R40", "R41", "R42",
+    "R43", "R44", "R45", "R46", "R47", "R48", "R49", "R50", "R51", "R52", "R53",
+    "R54", "R55", "R56", "R57", "R58", "R59", "R60", "R61", "R62", "R63",
+#endif
+};
+
+static const char* fpu_reg_names[kNumberOfFpuRegisters] = {
+    "F0",
+};
+
 // After a comparison, the condition NEXT_IS_TRUE means the following
 // instruction is executed if the comparison is true and skipped over overwise.
 // Condition NEXT_IS_FALSE means the following instruction is executed if the
diff --git a/runtime/vm/constants_ia32.cc b/runtime/vm/constants_ia32.cc
new file mode 100644
index 0000000..a12af82
--- /dev/null
+++ b/runtime/vm/constants_ia32.cc
@@ -0,0 +1,18 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+#define RUNTIME_VM_CONSTANTS_H_  // To work around include guard.
+#include "vm/constants_ia32.h"
+
+namespace arch_ia32 {
+
+// Although 'kArgumentRegisters' and 'kFpuArgumentRegisters' are both 0, we have
+// to give these arrays at least one element to appease MSVC.
+
+const Register CallingConventions::ArgumentRegisters[] = {
+    static_cast<Register>(0)};
+const FpuRegister CallingConventions::FpuArgumentRegisters[] = {
+    static_cast<FpuRegister>(0)};
+
+}  // namespace arch_ia32
diff --git a/runtime/vm/constants_ia32.h b/runtime/vm/constants_ia32.h
index 4e56d03..ce697b9 100644
--- a/runtime/vm/constants_ia32.h
+++ b/runtime/vm/constants_ia32.h
@@ -5,9 +5,13 @@
 #ifndef RUNTIME_VM_CONSTANTS_IA32_H_
 #define RUNTIME_VM_CONSTANTS_IA32_H_
 
+#ifndef RUNTIME_VM_CONSTANTS_H_
+#error Do not include constants_ia32.h directly; use constants.h instead.
+#endif
+
 #include "platform/assert.h"
 
-namespace dart {
+namespace arch_ia32 {
 
 enum Register {
   EAX = 0,
@@ -53,6 +57,12 @@
 const int kNumberOfFpuRegisters = kNumberOfXmmRegisters;
 const FpuRegister kNoFpuRegister = kNoXmmRegister;
 
+static const char* cpu_reg_names[kNumberOfCpuRegisters] = {
+    "eax", "ecx", "edx", "ebx", "esp", "ebp", "esi", "edi"};
+
+static const char* fpu_reg_names[kNumberOfXmmRegisters] = {
+    "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7"};
+
 // Register aliases.
 const Register TMP = kNoRegister;   // No scratch register used by assembler.
 const Register TMP2 = kNoRegister;  // No second assembler scratch register.
@@ -88,7 +98,7 @@
   TIMES_4 = 2,
   TIMES_8 = 3,
   TIMES_16 = 4,
-  TIMES_HALF_WORD_SIZE = kWordSizeLog2 - 1
+  TIMES_HALF_WORD_SIZE = ::dart::kWordSizeLog2 - 1
 };
 
 class Instr {
@@ -107,7 +117,7 @@
   // reference to an instruction is to convert a pointer. There is no way
   // to allocate or create instances of class Instr.
   // Use the At(pc) function to create references to Instr.
-  static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); }
+  static Instr* At(::dart::uword pc) { return reinterpret_cast<Instr*>(pc); }
 
  private:
   DISALLOW_ALLOCATION();
@@ -119,6 +129,38 @@
 // becomes important to us.
 const int MAX_NOP_SIZE = 8;
 
-}  // namespace dart
+class CallingConventions {
+ public:
+  static const Register ArgumentRegisters[];
+  static const intptr_t kArgumentRegisters = 0;
+  static const intptr_t kNumArgRegs = 0;
+
+  static const XmmRegister FpuArgumentRegisters[];
+  static const intptr_t kXmmArgumentRegisters = 0;
+  static const intptr_t kNumFpuArgRegs = 0;
+
+  static const bool kArgumentIntRegXorFpuReg = false;
+
+  // Whether floating-point values should be passed as integers ("softfp" vs
+  // "hardfp").
+  static constexpr bool kAbiSoftFP = false;
+
+  static constexpr Register kReturnReg = EAX;
+  static constexpr Register kSecondReturnReg = EDX;
+
+  // Floating point values are returned on the "FPU stack" (in "ST" registers).
+  static constexpr XmmRegister kReturnFpuReg = kNoXmmRegister;
+
+  static constexpr Register kFirstCalleeSavedCpuReg = EBX;
+  static constexpr Register kFirstNonArgumentRegister = EAX;
+  static constexpr Register kSecondNonArgumentRegister = ECX;
+
+  // Whether 64-bit arguments must be aligned to an even register or 8-byte
+  // stack address. On IA32, 64-bit integers and floating-point values do *not*
+  // need to be 8-byte aligned.
+  static constexpr bool kAlignArguments = false;
+};
+
+}  // namespace arch_ia32
 
 #endif  // RUNTIME_VM_CONSTANTS_IA32_H_
diff --git a/runtime/vm/constants_kbc.h b/runtime/vm/constants_kbc.h
index aeb775e..dc8e954 100644
--- a/runtime/vm/constants_kbc.h
+++ b/runtime/vm/constants_kbc.h
@@ -285,6 +285,11 @@
 //    interface method declaration.
 //    The ICData indicates whether the first argument is a type argument vector.
 //
+//  - UncheckedInterfaceCall ArgC, D
+//
+//    Same as InterfaceCall, but can omit type checks of generic-covariant
+//    parameters.
+//
 //  - DynamicCall ArgC, D
 //
 //    Lookup and invoke method using ICData in PP[D]
@@ -389,6 +394,29 @@
 //    Receiver and argument should have static type int.
 //    Check SP[-1] and SP[0] for null; push SP[-1] <op> SP[0] ? true : false.
 //
+//  - NegateDouble
+//
+//    Equivalent to invocation of unary double operator-.
+//    Receiver should have static type double.
+//    Check SP[0] for null; SP[0] = -SP[0].
+//
+//  - AddDouble; SubDouble; MulDouble; DivDouble
+//
+//    Equivalent to invocation of binary int operator +, -, *, /.
+//    Receiver and argument should have static type double.
+//    Check SP[-1] and SP[0] for null; push SP[-1] <op> SP[0].
+//
+//  - CompareDoubleEq; CompareDoubleGt; CompareDoubleLt; CompareDoubleGe;
+//    CompareDoubleLe
+//
+//    Equivalent to invocation of binary double operator ==, >, <, >= or <=.
+//    Receiver and argument should have static type double.
+//    Check SP[-1] and SP[0] for null; push SP[-1] <op> SP[0] ? true : false.
+//
+//  - AllocateClosure D
+//
+//    Allocate closure object for closure function ConstantPool[D].
+//
 // BYTECODE LIST FORMAT
 //
 // KernelBytecode list below is specified using the following format:
@@ -411,7 +439,7 @@
 //               instruction because PC is incremented immediately after fetch
 //               and before decoding.
 //
-#define KERNEL_BYTECODES_LIST(V)                                               \
+#define PUBLIC_KERNEL_BYTECODES_LIST(V)                                        \
   V(Trap,                                  0, ___, ___, ___)                   \
   V(Entry,                                 D, num, ___, ___)                   \
   V(EntryFixed,                          A_D, num, num, ___)                   \
@@ -484,7 +512,30 @@
   V(CompareIntLt,                          0, ___, ___, ___)                   \
   V(CompareIntGe,                          0, ___, ___, ___)                   \
   V(CompareIntLe,                          0, ___, ___, ___)                   \
-  V(DirectCall,                          A_D, num, num, ___)
+  V(DirectCall,                          A_D, num, num, ___)                   \
+  V(AllocateClosure,                       D, lit, ___, ___)                   \
+  V(UncheckedInterfaceCall,              A_D, num, num, ___)                   \
+  V(NegateDouble,                          0, ___, ___, ___)                   \
+  V(AddDouble,                             0, ___, ___, ___)                   \
+  V(SubDouble,                             0, ___, ___, ___)                   \
+  V(MulDouble,                             0, ___, ___, ___)                   \
+  V(DivDouble,                             0, ___, ___, ___)                   \
+  V(CompareDoubleEq,                       0, ___, ___, ___)                   \
+  V(CompareDoubleGt,                       0, ___, ___, ___)                   \
+  V(CompareDoubleLt,                       0, ___, ___, ___)                   \
+  V(CompareDoubleGe,                       0, ___, ___, ___)                   \
+  V(CompareDoubleLe,                       0, ___, ___, ___)                   \
+
+  // These bytecodes are only generated within the VM. Reassinging their
+  // opcodes is not a breaking change.
+#define INTERNAL_KERNEL_BYTECODES_LIST(V)                                      \
+  V(VMInternal_ImplicitGetter,             0, ___, ___, ___)                   \
+  V(VMInternal_ImplicitSetter,             0, ___, ___, ___)                   \
+  V(VMInternal_MethodExtractor,            0, ___, ___, ___)                   \
+
+#define KERNEL_BYTECODES_LIST(V)                                               \
+  PUBLIC_KERNEL_BYTECODES_LIST(V)                                              \
+  INTERNAL_KERNEL_BYTECODES_LIST(V)
 
 // clang-format on
 
@@ -492,11 +543,14 @@
 
 class KernelBytecode {
  public:
+  // Magic value of bytecode files.
+  static const intptr_t kMagicValue = 0x44424332;  // 'DBC2'
   // Minimum bytecode format version supported by VM.
-  static const intptr_t kMinSupportedBytecodeFormatVersion = 1;
+  static const intptr_t kMinSupportedBytecodeFormatVersion = 2;
   // Maximum bytecode format version supported by VM.
-  // Should match futureBytecodeFormatVersion in pkg/vm/lib/bytecode/dbc.dart.
-  static const intptr_t kMaxSupportedBytecodeFormatVersion = 2;
+  // The range of supported versions should include version produced by bytecode
+  // generator (currentBytecodeFormatVersion in pkg/vm/lib/bytecode/dbc.dart).
+  static const intptr_t kMaxSupportedBytecodeFormatVersion = 6;
 
   enum Opcode {
 #define DECLARE_BYTECODE(name, encoding, op1, op2, op3) k##name,
@@ -612,6 +666,7 @@
     switch (DecodeOpcode(instr)) {
       case KernelBytecode::kIndirectStaticCall:
       case KernelBytecode::kInterfaceCall:
+      case KernelBytecode::kUncheckedInterfaceCall:
       case KernelBytecode::kDynamicCall:
       case KernelBytecode::kDirectCall:
         return true;
diff --git a/runtime/vm/constants_x64.cc b/runtime/vm/constants_x64.cc
index df6fb75..8d80a33 100644
--- a/runtime/vm/constants_x64.cc
+++ b/runtime/vm/constants_x64.cc
@@ -2,16 +2,17 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+#define RUNTIME_VM_CONSTANTS_H_  // To work around include guard.
 #include "vm/constants_x64.h"
 
-namespace dart {
+namespace arch_x64 {
 
 #if defined(_WIN64)
 const Register CallingConventions::ArgumentRegisters[] = {
     CallingConventions::kArg1Reg, CallingConventions::kArg2Reg,
     CallingConventions::kArg3Reg, CallingConventions::kArg4Reg};
 
-const XmmRegister CallingConventions::XmmArgumentRegisters[] = {
+const XmmRegister CallingConventions::FpuArgumentRegisters[] = {
     XmmRegister::XMM0, XmmRegister::XMM1, XmmRegister::XMM2, XmmRegister::XMM3};
 #else
 const Register CallingConventions::ArgumentRegisters[] = {
@@ -19,9 +20,9 @@
     CallingConventions::kArg3Reg, CallingConventions::kArg4Reg,
     CallingConventions::kArg5Reg, CallingConventions::kArg6Reg};
 
-const XmmRegister CallingConventions::XmmArgumentRegisters[] = {
+const XmmRegister CallingConventions::FpuArgumentRegisters[] = {
     XmmRegister::XMM0, XmmRegister::XMM1, XmmRegister::XMM2, XmmRegister::XMM3,
     XmmRegister::XMM4, XmmRegister::XMM5, XmmRegister::XMM6, XmmRegister::XMM7};
 #endif
 
-}  // namespace dart
+}  // namespace arch_x64
diff --git a/runtime/vm/constants_x64.h b/runtime/vm/constants_x64.h
index 5de7ddc..c9eea38 100644
--- a/runtime/vm/constants_x64.h
+++ b/runtime/vm/constants_x64.h
@@ -5,10 +5,14 @@
 #ifndef RUNTIME_VM_CONSTANTS_X64_H_
 #define RUNTIME_VM_CONSTANTS_X64_H_
 
+#ifndef RUNTIME_VM_CONSTANTS_H_
+#error Do not include constants_x64.h directly; use constants.h instead.
+#endif
+
 #include "platform/assert.h"
 #include "platform/globals.h"
 
-namespace dart {
+namespace arch_x64 {
 
 enum Register {
   RAX = 0,
@@ -90,6 +94,14 @@
 const int kNumberOfFpuRegisters = kNumberOfXmmRegisters;
 const FpuRegister kNoFpuRegister = kNoXmmRegister;
 
+static const char* cpu_reg_names[kNumberOfCpuRegisters] = {
+    "rax", "rcx", "rdx", "rbx", "rsp", "rbp", "rsi", "rdi",
+    "r8",  "r9",  "r10", "r11", "r12", "r13", "thr", "pp"};
+
+static const char* fpu_reg_names[kNumberOfXmmRegisters] = {
+    "xmm0", "xmm1", "xmm2",  "xmm3",  "xmm4",  "xmm5",  "xmm6",  "xmm7",
+    "xmm8", "xmm9", "xmm10", "xmm11", "xmm12", "xmm13", "xmm14", "xmm15"};
+
 enum RexBits {
   REX_NONE = 0,
   REX_B = 1 << 0,
@@ -140,14 +152,14 @@
   TIMES_4 = 2,
   TIMES_8 = 3,
   TIMES_16 = 4,
-  TIMES_HALF_WORD_SIZE = kWordSizeLog2 - 1
+  TIMES_HALF_WORD_SIZE = ::dart::kWordSizeLog2 - 1
 };
 
 #define R(reg) (1 << (reg))
 
-#if defined(_WIN64)
 class CallingConventions {
  public:
+#if defined(_WIN64)
   static const Register kArg1Reg = RCX;
   static const Register kArg2Reg = RDX;
   static const Register kArg3Reg = R8;
@@ -157,16 +169,16 @@
       R(kArg1Reg) | R(kArg2Reg) | R(kArg3Reg) | R(kArg4Reg);
   static const intptr_t kNumArgRegs = 4;
 
-  static const XmmRegister XmmArgumentRegisters[];
-  static const intptr_t kXmmArgumentRegisters =
+  static const XmmRegister FpuArgumentRegisters[];
+  static const intptr_t kFpuArgumentRegisters =
       R(XMM0) | R(XMM1) | R(XMM2) | R(XMM3);
-  static const intptr_t kNumXmmArgRegs = 4;
+  static const intptr_t kNumFpuArgRegs = 4;
 
   // can ArgumentRegisters[i] and XmmArgumentRegisters[i] both be used at the
   // same time? (Windows no, rest yes)
-  static const bool kArgumentIntRegXorXmmReg = true;
+  static const bool kArgumentIntRegXorFpuReg = true;
 
-  static const intptr_t kShadowSpaceBytes = 4 * kWordSize;
+  static const intptr_t kShadowSpaceBytes = 4 * ::dart::kWordSize;
 
   static const intptr_t kVolatileCpuRegisters =
       R(RAX) | R(RCX) | R(RDX) | R(R8) | R(R9) | R(R10) | R(R11);
@@ -186,10 +198,19 @@
   // Windows x64 ABI specifies that small objects are passed in registers.
   // Otherwise they are passed by reference.
   static const size_t kRegisterTransferLimit = 16;
-};
+
+  static constexpr Register kReturnReg = RAX;
+  static constexpr Register kSecondReturnReg = kNoRegister;
+  static constexpr FpuRegister kReturnFpuReg = XMM0;
+
+  // Whether floating-point values should be passed as integers ("softfp" vs
+  // "hardfp").
+  static constexpr bool kAbiSoftFP = false;
+
+  // Whether 64-bit arguments must be aligned to an even register or 8-byte
+  // stack address. Not relevant on X64 since the word size is 64-bits already.
+  static constexpr bool kAlignArguments = false;
 #else
-class CallingConventions {
- public:
   static const Register kArg1Reg = RDI;
   static const Register kArg2Reg = RSI;
   static const Register kArg3Reg = RDX;
@@ -202,15 +223,15 @@
                                              R(kArg5Reg) | R(kArg6Reg);
   static const intptr_t kNumArgRegs = 6;
 
-  static const XmmRegister XmmArgumentRegisters[];
-  static const intptr_t kXmmArgumentRegisters = R(XMM0) | R(XMM1) | R(XMM2) |
+  static const XmmRegister FpuArgumentRegisters[];
+  static const intptr_t kFpuArgumentRegisters = R(XMM0) | R(XMM1) | R(XMM2) |
                                                 R(XMM3) | R(XMM4) | R(XMM5) |
                                                 R(XMM6) | R(XMM7);
-  static const intptr_t kNumXmmArgRegs = 8;
+  static const intptr_t kNumFpuArgRegs = 8;
 
   // can ArgumentRegisters[i] and XmmArgumentRegisters[i] both be used at the
   // same time? (Windows no, rest yes)
-  static const bool kArgumentIntRegXorXmmReg = false;
+  static const bool kArgumentIntRegXorFpuReg = false;
 
   static const intptr_t kShadowSpaceBytes = 0;
 
@@ -229,9 +250,33 @@
   static const intptr_t kCalleeSaveXmmRegisters = 0;
 
   static const XmmRegister xmmFirstNonParameterReg = XMM8;
-};
+
+  static constexpr Register kReturnReg = RAX;
+  static constexpr Register kSecondReturnReg = kNoRegister;
+  static constexpr FpuRegister kReturnFpuReg = XMM0;
+
+  // Whether floating-point values should be passed as integers ("softfp" vs
+  // "hardfp").
+  static constexpr bool kAbiSoftFP = false;
+
+  // Whether 64-bit arguments must be aligned to an even register or 8-byte
+  // stack address. Not relevant on X64 since the word size is 64-bits already.
+  static constexpr bool kAlignArguments = false;
 #endif
 
+  COMPILE_ASSERT((kArgumentRegisters & kReservedCpuRegisters) == 0);
+
+  static constexpr Register kFirstCalleeSavedCpuReg = RBX;
+  static constexpr Register kFirstNonArgumentRegister = RAX;
+  static constexpr Register kSecondNonArgumentRegister = RBX;
+
+  COMPILE_ASSERT(((R(kFirstCalleeSavedCpuReg)) & kCalleeSaveCpuRegisters) != 0);
+
+  COMPILE_ASSERT(((R(kFirstNonArgumentRegister) |
+                   R(kSecondNonArgumentRegister)) &
+                  kArgumentRegisters) == 0);
+};
+
 #undef R
 
 class Instr {
@@ -251,7 +296,7 @@
   // reference to an instruction is to convert a pointer. There is no way
   // to allocate or create instances of class Instr.
   // Use the At(pc) function to create references to Instr.
-  static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); }
+  static Instr* At(::dart::uword pc) { return reinterpret_cast<Instr*>(pc); }
 
  private:
   DISALLOW_ALLOCATION();
@@ -263,6 +308,6 @@
 // becomes important to us.
 const int MAX_NOP_SIZE = 8;
 
-}  // namespace dart
+}  // namespace arch_x64
 
 #endif  // RUNTIME_VM_CONSTANTS_X64_H_
diff --git a/runtime/vm/cpu_ia32.cc b/runtime/vm/cpu_ia32.cc
index 08cfc5e..82ab263 100644
--- a/runtime/vm/cpu_ia32.cc
+++ b/runtime/vm/cpu_ia32.cc
@@ -9,7 +9,7 @@
 #include "vm/cpu_ia32.h"
 
 #include "vm/compiler/assembler/assembler.h"
-#include "vm/constants_ia32.h"
+#include "vm/constants.h"
 #include "vm/cpuinfo.h"
 #include "vm/heap/heap.h"
 #include "vm/isolate.h"
diff --git a/runtime/vm/cpu_x64.cc b/runtime/vm/cpu_x64.cc
index 553e9cd..a4a17f1 100644
--- a/runtime/vm/cpu_x64.cc
+++ b/runtime/vm/cpu_x64.cc
@@ -9,7 +9,7 @@
 #include "vm/cpu_x64.h"
 
 #include "vm/compiler/assembler/assembler.h"
-#include "vm/constants_x64.h"
+#include "vm/constants.h"
 #include "vm/cpuinfo.h"
 #include "vm/heap/heap.h"
 #include "vm/isolate.h"
diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc
index ad749aa..ffb115e 100644
--- a/runtime/vm/dart.cc
+++ b/runtime/vm/dart.cc
@@ -165,14 +165,15 @@
   }
 #endif
 
-  if (FLAG_enable_interpreter) {
-#if defined(USING_SIMULATOR) || defined(TARGET_ARCH_DBC)
-    return strdup(
-        "--enable-interpreter is not supported when targeting "
-        "a sim* architecture.");
-#endif  // defined(USING_SIMULATOR) || defined(TARGET_ARCH_DBC)
+#if defined(TARGET_ARCH_DBC)
+  // DBC instructions are never executable.
+  FLAG_write_protect_code = false;
+#endif
 
-    FLAG_use_field_guards = false;
+  if (FLAG_enable_interpreter) {
+#if defined(TARGET_ARCH_DBC)
+    return strdup("--enable-interpreter is not supported with DBC");
+#endif  // defined(TARGET_ARCH_DBC)
   }
 
   FrameLayout::Init();
@@ -525,10 +526,7 @@
   StoreBuffer::Cleanup();
   Object::Cleanup();
   SemiSpace::Cleanup();
-#if !defined(DART_PRECOMPILED_RUNTIME)
-  // Stubs are generated when not precompiled, clean them up.
   StubCode::Cleanup();
-#endif
   // Delete the current thread's TLS and set it's TLS to null.
   // If it is the last thread then the destructor would call
   // OSThread::Cleanup.
@@ -761,6 +759,10 @@
     buffer.AddString(FLAG_causal_async_stacks ? " causal_async_stacks"
                                               : " no-causal_async_stacks");
 
+    buffer.AddString((FLAG_enable_interpreter || FLAG_use_bytecode_compiler)
+                         ? " bytecode"
+                         : " no-bytecode");
+
 // Generated code must match the host architecture and ABI.
 #if defined(TARGET_ARCH_ARM)
 #if defined(TARGET_OS_MACOS) || defined(TARGET_OS_MACOS_IOS)
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 8e45f57..0f50b62 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -38,6 +38,7 @@
 #include "vm/os_thread.h"
 #include "vm/port.h"
 #include "vm/profiler.h"
+#include "vm/profiler_service.h"
 #include "vm/program_visitor.h"
 #include "vm/resolver.h"
 #include "vm/reusable_handles.h"
@@ -358,6 +359,7 @@
 RawObject* Api::UnwrapHandle(Dart_Handle object) {
 #if defined(DEBUG)
   Thread* thread = Thread::Current();
+  ASSERT(thread->execution_state() == Thread::kThreadInVM);
   ASSERT(thread->IsMutatorThread());
   ASSERT(thread->isolate() != NULL);
   ASSERT(!FLAG_verify_handles || thread->IsValidLocalHandle(object) ||
@@ -490,7 +492,7 @@
 }
 
 static Dart_Handle InitNewReadOnlyApiHandle(RawObject* raw) {
-  ASSERT(raw->IsVMHeapObject());
+  ASSERT(raw->InVMIsolateHeap());
   LocalHandle* ref = Dart::AllocateReadOnlyApiHandle();
   ref->set_raw(raw);
   return ref->apiHandle();
@@ -693,14 +695,20 @@
 // --- Handles ---
 
 DART_EXPORT bool Dart_IsError(Dart_Handle handle) {
+  Thread* thread = Thread::Current();
+  TransitionNativeToVM transition(thread);
   return Api::IsError(handle);
 }
 
 DART_EXPORT bool Dart_IsApiError(Dart_Handle object) {
+  Thread* thread = Thread::Current();
+  TransitionNativeToVM transition(thread);
   return Api::ClassId(object) == kApiErrorCid;
 }
 
 DART_EXPORT bool Dart_IsUnhandledExceptionError(Dart_Handle object) {
+  Thread* thread = Thread::Current();
+  TransitionNativeToVM transition(thread);
   return Api::ClassId(object) == kUnhandledExceptionCid;
 }
 
@@ -712,10 +720,15 @@
     const Instance& exc = Instance::Handle(Z, error.exception());
     return IsCompiletimeErrorObject(Z, exc);
   }
+
+  Thread* thread = Thread::Current();
+  TransitionNativeToVM transition(thread);
   return Api::ClassId(object) == kLanguageErrorCid;
 }
 
 DART_EXPORT bool Dart_IsFatalError(Dart_Handle object) {
+  Thread* thread = Thread::Current();
+  TransitionNativeToVM transition(thread);
   return Api::ClassId(object) == kUnwindErrorCid;
 }
 
@@ -793,12 +806,13 @@
   return Api::NewHandle(T, UnhandledException::New(obj, stacktrace));
 }
 
-DART_EXPORT Dart_Handle Dart_PropagateError(Dart_Handle handle) {
+DART_EXPORT void Dart_PropagateError(Dart_Handle handle) {
   Thread* thread = Thread::Current();
+  CHECK_ISOLATE(thread->isolate());
   TransitionNativeToVM transition(thread);
   const Object& obj = Object::Handle(thread->zone(), Api::UnwrapHandle(handle));
   if (!obj.IsError()) {
-    return Api::NewError(
+    FATAL1(
         "%s expects argument 'handle' to be an error handle.  "
         "Did you forget to check Dart_IsError first?",
         CURRENT_FUNC);
@@ -806,7 +820,7 @@
   if (thread->top_exit_frame_info() == 0) {
     // There are no dart frames on the stack so it would be illegal to
     // propagate an error here.
-    return Api::NewError("No Dart frames on stack, cannot propagate error.");
+    FATAL("No Dart frames on stack, cannot propagate error.");
   }
   // Unwind all the API scopes till the exit frame before propagating.
   const Error* error;
@@ -824,16 +838,6 @@
   }
   Exceptions::PropagateError(*error);
   UNREACHABLE();
-  return Api::NewError("Cannot reach here.  Internal error.");
-}
-
-DART_EXPORT void _Dart_ReportErrorHandle(const char* file,
-                                         int line,
-                                         const char* handle,
-                                         const char* message) {
-  fprintf(stderr, "%s:%d: error handle: '%s':\n    '%s'\n", file, line, handle,
-          message);
-  OS::Abort();
 }
 
 DART_EXPORT Dart_Handle Dart_ToString(Dart_Handle object) {
@@ -1032,7 +1036,7 @@
 #if !defined(PRODUCT)
 #define VM_METRIC_API(type, variable, name, unit)                              \
   DART_EXPORT int64_t Dart_VM##variable##Metric() {                            \
-    return vm_metric_##variable##_.value();                                    \
+    return vm_metric_##variable.value();                                       \
   }
 VM_METRIC_LIST(VM_METRIC_API);
 #undef VM_METRIC_API
@@ -1062,43 +1066,8 @@
 
 // --- Isolates ---
 
-static char* BuildIsolateName(const char* script_uri, const char* main) {
-  if (script_uri == NULL) {
-    // Just use the main as the name.
-    if (main == NULL) {
-      return strdup("isolate");
-    } else {
-      return strdup(main);
-    }
-  }
-
-  if (ServiceIsolate::NameEquals(script_uri) ||
-      (strcmp(script_uri, DART_KERNEL_ISOLATE_NAME) == 0)) {
-    return strdup(script_uri);
-  }
-
-  // Skip past any slashes and backslashes in the script uri.
-  const char* last_slash = strrchr(script_uri, '/');
-  if (last_slash != NULL) {
-    script_uri = last_slash + 1;
-  }
-  const char* last_backslash = strrchr(script_uri, '\\');
-  if (last_backslash != NULL) {
-    script_uri = last_backslash + 1;
-  }
-  if (main == NULL) {
-    main = "main";
-  }
-
-  char* chars = NULL;
-  intptr_t len = Utils::SNPrint(NULL, 0, "%s:%s()", script_uri, main) + 1;
-  chars = reinterpret_cast<char*>(malloc(len));
-  Utils::SNPrint(chars, len, "%s:%s()", script_uri, main);
-  return chars;
-}
-
 static Dart_Isolate CreateIsolate(const char* script_uri,
-                                  const char* main,
+                                  const char* name,
                                   const uint8_t* snapshot_data,
                                   const uint8_t* snapshot_instructions,
                                   const uint8_t* shared_data,
@@ -1109,7 +1078,6 @@
                                   void* callback_data,
                                   char** error) {
   CHECK_NO_ISOLATE(Isolate::Current());
-  char* isolate_name = BuildIsolateName(script_uri, main);
 
   // Setup default flags in case none were passed.
   Dart_IsolateFlags api_flags;
@@ -1117,8 +1085,7 @@
     Isolate::FlagsInitialize(&api_flags);
     flags = &api_flags;
   }
-  Isolate* I = Dart::CreateIsolate(isolate_name, *flags);
-  free(isolate_name);
+  Isolate* I = Dart::CreateIsolate((name == NULL) ? "isolate" : name, *flags);
   if (I == NULL) {
     if (error != NULL) {
       *error = strdup("Isolate creation failed");
@@ -1173,7 +1140,7 @@
 
 DART_EXPORT Dart_Isolate
 Dart_CreateIsolate(const char* script_uri,
-                   const char* main,
+                   const char* name,
                    const uint8_t* snapshot_data,
                    const uint8_t* snapshot_instructions,
                    const uint8_t* shared_data,
@@ -1182,21 +1149,21 @@
                    void* callback_data,
                    char** error) {
   API_TIMELINE_DURATION(Thread::Current());
-  return CreateIsolate(script_uri, main, snapshot_data, snapshot_instructions,
+  return CreateIsolate(script_uri, name, snapshot_data, snapshot_instructions,
                        shared_data, shared_instructions, NULL, 0, flags,
                        callback_data, error);
 }
 
 DART_EXPORT Dart_Isolate
 Dart_CreateIsolateFromKernel(const char* script_uri,
-                             const char* main,
+                             const char* name,
                              const uint8_t* kernel_buffer,
                              intptr_t kernel_buffer_size,
                              Dart_IsolateFlags* flags,
                              void* callback_data,
                              char** error) {
   API_TIMELINE_DURATION(Thread::Current());
-  return CreateIsolate(script_uri, main, NULL, NULL, NULL, NULL, kernel_buffer,
+  return CreateIsolate(script_uri, name, NULL, NULL, NULL, NULL, kernel_buffer,
                        kernel_buffer_size, flags, callback_data, error);
 }
 
@@ -1279,6 +1246,24 @@
   T->EnterSafepoint();
 }
 
+DART_EXPORT void Dart_StartProfiling() {
+#if !defined(PRODUCT)
+  if (!FLAG_profiler) {
+    FLAG_profiler = true;
+    Profiler::Init();
+  }
+#endif  // !defined(PRODUCT)
+}
+
+DART_EXPORT void Dart_StopProfiling() {
+#if !defined(PRODUCT)
+  if (FLAG_profiler) {
+    Profiler::Cleanup();
+    FLAG_profiler = false;
+  }
+#endif  // !defined(PRODUCT)
+}
+
 DART_EXPORT void Dart_ThreadDisableProfiling() {
   OSThread* os_thread = OSThread::Current();
   if (os_thread == NULL) {
@@ -1295,6 +1280,39 @@
   os_thread->EnableThreadInterrupts();
 }
 
+DART_EXPORT bool Dart_WriteProfileToTimeline(Dart_Port main_port,
+                                             char** error) {
+#if defined(PRODUCT)
+  return false;
+#else
+  if (!FLAG_profiler) {
+    if (error != NULL) {
+      *error = strdup("The profiler is not running.");
+    }
+    return false;
+  }
+
+  const intptr_t kBufferLength = 512;
+  char method[kBufferLength];
+  intptr_t method_length = snprintf(method, kBufferLength, "{"
+      "\"jsonrpc\": \"2.0\","
+      "\"method\": \"_writeCpuProfileTimeline\","
+      "\"id\": \"\","
+      "\"params\": {\"isolateId\": \"isolates/%" Pd64 "\"}"
+    "}", main_port);
+  ASSERT(method_length <= kBufferLength);
+
+  char* response = NULL;
+  intptr_t response_length;
+  bool success = Dart_InvokeVMServiceMethod(
+      reinterpret_cast<uint8_t*>(method), method_length,
+      reinterpret_cast<uint8_t**>(&response), &response_length,
+      error);
+  free(response);
+  return success;
+#endif
+}
+
 DART_EXPORT bool Dart_ShouldPauseOnStart() {
 #if defined(PRODUCT)
   return false;
@@ -1405,14 +1423,17 @@
   Isolate* isolate = thread->isolate();
   CHECK_ISOLATE(isolate);
   NoSafepointScope no_safepoint_scope;
-  if ((isolate->sticky_error() != Error::null()) && !::Dart_IsNull(error)) {
+  const Error& error_handle = Api::UnwrapErrorHandle(Z, error);
+  if ((isolate->sticky_error() != Error::null()) &&
+      (error_handle.raw() != Object::null())) {
     FATAL1("%s expects there to be no sticky error.", CURRENT_FUNC);
   }
-  if (!::Dart_IsUnhandledExceptionError(error) && !::Dart_IsNull(error)) {
+  if (!error_handle.IsUnhandledException() &&
+      (error_handle.raw() != Object::null())) {
     FATAL1("%s expects the error to be an unhandled exception error or null.",
            CURRENT_FUNC);
   }
-  isolate->SetStickyError(Api::UnwrapErrorHandle(Z, error).raw());
+  isolate->SetStickyError(error_handle.raw());
 }
 
 DART_EXPORT bool Dart_HasStickyError() {
@@ -1489,7 +1510,7 @@
   CHECK_NULL(isolate_snapshot_data_size);
   // Finalize all classes if needed.
   Dart_Handle state = Api::CheckAndFinalizePendingClasses(T);
-  if (::Dart_IsError(state)) {
+  if (Api::IsError(state)) {
     return state;
   }
   BackgroundCompiler::Stop(I);
@@ -1825,6 +1846,7 @@
 }
 
 DART_EXPORT bool Dart_IsNull(Dart_Handle object) {
+  TransitionNativeToVM transition(Thread::Current());
   return Api::UnwrapHandle(object) == Object::null();
 }
 
@@ -1884,6 +1906,7 @@
 DART_EXPORT bool Dart_IsInstance(Dart_Handle object) {
   Thread* thread = Thread::Current();
   CHECK_ISOLATE(thread->isolate());
+  TransitionNativeToVM transition(thread);
   REUSABLE_OBJECT_HANDLESCOPE(thread);
   Object& ref = thread->ObjectHandle();
   ref = Api::UnwrapHandle(object);
@@ -1891,39 +1914,60 @@
 }
 
 DART_EXPORT bool Dart_IsNumber(Dart_Handle object) {
+  Thread* thread = Thread::Current();
+  CHECK_ISOLATE(thread->isolate());
+  TransitionNativeToVM transition(thread);
   return RawObject::IsNumberClassId(Api::ClassId(object));
 }
 
 DART_EXPORT bool Dart_IsInteger(Dart_Handle object) {
+  Thread* thread = Thread::Current();
+  CHECK_ISOLATE(thread->isolate());
+  TransitionNativeToVM transition(thread);
   return RawObject::IsIntegerClassId(Api::ClassId(object));
 }
 
 DART_EXPORT bool Dart_IsDouble(Dart_Handle object) {
+  Thread* thread = Thread::Current();
+  CHECK_ISOLATE(thread->isolate());
+  TransitionNativeToVM transition(thread);
   return Api::ClassId(object) == kDoubleCid;
 }
 
 DART_EXPORT bool Dart_IsBoolean(Dart_Handle object) {
+  Thread* thread = Thread::Current();
+  CHECK_ISOLATE(thread->isolate());
+  TransitionNativeToVM transition(thread);
   return Api::ClassId(object) == kBoolCid;
 }
 
 DART_EXPORT bool Dart_IsString(Dart_Handle object) {
+  Thread* thread = Thread::Current();
+  CHECK_ISOLATE(thread->isolate());
+  TransitionNativeToVM transition(thread);
   return RawObject::IsStringClassId(Api::ClassId(object));
 }
 
 DART_EXPORT bool Dart_IsStringLatin1(Dart_Handle object) {
+  Thread* thread = Thread::Current();
+  CHECK_ISOLATE(thread->isolate());
+  TransitionNativeToVM transition(thread);
   return RawObject::IsOneByteStringClassId(Api::ClassId(object));
 }
 
 DART_EXPORT bool Dart_IsExternalString(Dart_Handle object) {
+  Thread* thread = Thread::Current();
+  CHECK_ISOLATE(thread->isolate());
+  TransitionNativeToVM transition(thread);
   return RawObject::IsExternalStringClassId(Api::ClassId(object));
 }
 
 DART_EXPORT bool Dart_IsList(Dart_Handle object) {
+  DARTSCOPE(Thread::Current());
   if (RawObject::IsBuiltinListClassId(Api::ClassId(object))) {
     return true;
   }
 
-  DARTSCOPE(Thread::Current());
   const Object& obj = Object::Handle(Z, Api::UnwrapHandle(object));
   return GetListInstance(Z, obj) != Instance::null();
 }
@@ -1935,26 +1979,44 @@
 }
 
 DART_EXPORT bool Dart_IsLibrary(Dart_Handle object) {
+  Thread* thread = Thread::Current();
+  CHECK_ISOLATE(thread->isolate());
+  TransitionNativeToVM transition(thread);
   return Api::ClassId(object) == kLibraryCid;
 }
 
 DART_EXPORT bool Dart_IsType(Dart_Handle handle) {
+  Thread* thread = Thread::Current();
+  CHECK_ISOLATE(thread->isolate());
+  TransitionNativeToVM transition(thread);
   return Api::ClassId(handle) == kTypeCid;
 }
 
 DART_EXPORT bool Dart_IsFunction(Dart_Handle handle) {
+  Thread* thread = Thread::Current();
+  CHECK_ISOLATE(thread->isolate());
+  TransitionNativeToVM transition(thread);
   return Api::ClassId(handle) == kFunctionCid;
 }
 
 DART_EXPORT bool Dart_IsVariable(Dart_Handle handle) {
+  Thread* thread = Thread::Current();
+  CHECK_ISOLATE(thread->isolate());
+  TransitionNativeToVM transition(thread);
   return Api::ClassId(handle) == kFieldCid;
 }
 
 DART_EXPORT bool Dart_IsTypeVariable(Dart_Handle handle) {
+  Thread* thread = Thread::Current();
+  CHECK_ISOLATE(thread->isolate());
+  TransitionNativeToVM transition(thread);
   return Api::ClassId(handle) == kTypeParameterCid;
 }
 
 DART_EXPORT bool Dart_IsClosure(Dart_Handle object) {
+  Thread* thread = Thread::Current();
+  CHECK_ISOLATE(thread->isolate());
+  TransitionNativeToVM transition(thread);
   return Api::ClassId(object) == kClosureCid;
 }
 
@@ -1971,6 +2033,9 @@
 }
 
 DART_EXPORT bool Dart_IsTypedData(Dart_Handle handle) {
+  Thread* thread = Thread::Current();
+  CHECK_ISOLATE(thread->isolate());
+  TransitionNativeToVM transition(thread);
   intptr_t cid = Api::ClassId(handle);
   return RawObject::IsTypedDataClassId(cid) ||
          RawObject::IsExternalTypedDataClassId(cid) ||
@@ -1978,6 +2043,9 @@
 }
 
 DART_EXPORT bool Dart_IsByteBuffer(Dart_Handle handle) {
+  Thread* thread = Thread::Current();
+  CHECK_ISOLATE(thread->isolate());
+  TransitionNativeToVM transition(thread);
   return Api::ClassId(handle) == kByteBufferCid;
 }
 
@@ -2118,13 +2186,16 @@
   API_TIMELINE_DURATION(thread);
   Isolate* isolate = thread->isolate();
   CHECK_ISOLATE(isolate);
-  intptr_t class_id = Api::ClassId(integer);
-  if (class_id == kSmiCid || class_id == kMintCid) {
+  if (Api::IsSmi(integer)) {
     *fits = true;
     return Api::Success();
   }
-  // Slow path for type error.
+  // Slow path for mints and type error.
   DARTSCOPE(thread);
+  if (Api::ClassId(integer) == kMintCid) {
+    *fits = true;
+    return Api::Success();
+  }
   const Integer& int_obj = Api::UnwrapIntegerHandle(Z, integer);
   ASSERT(int_obj.IsNull());
   RETURN_TYPE_ERROR(Z, integer, Integer);
@@ -2550,6 +2621,7 @@
                                                intptr_t* size) {
   Thread* thread = Thread::Current();
   CHECK_ISOLATE(thread->isolate());
+  TransitionNativeToVM transition(thread);
   ReusableObjectHandleScope reused_obj_handle(thread);
   const String& str_obj = Api::UnwrapStringHandle(reused_obj_handle, str);
   if (str_obj.IsNull()) {
@@ -2568,6 +2640,7 @@
                                                  void** peer) {
   Thread* thread = Thread::Current();
   CHECK_ISOLATE(thread->isolate());
+  TransitionNativeToVM transition(thread);
   ReusableObjectHandleScope reused_obj_handle(thread);
   const String& str = Api::UnwrapStringHandle(reused_obj_handle, object);
   if (str.IsNull()) {
@@ -2778,7 +2851,7 @@
           args.SetAt(1, index);
           Dart_Handle value =
               Api::NewHandle(T, DartEntry::InvokeFunction(function, args));
-          if (::Dart_IsError(value)) return value;
+          if (Api::IsError(value)) return value;
           result[i] = value;
         }
         return Api::Success();
@@ -2968,19 +3041,19 @@
     }
   }
   if (RawObject::IsTypedDataViewClassId(obj.GetClassId())) {
-    const Instance& view = Instance::Cast(obj);
-    if (TypedDataView::ElementSizeInBytes(view) == 1) {
-      intptr_t view_length = Smi::Value(TypedDataView::Length(view));
+    const auto& view = TypedDataView::Cast(obj);
+    if (view.ElementSizeInBytes() == 1) {
+      const intptr_t view_length = Smi::Value(view.length());
       if (!Utils::RangeCheck(offset, length, view_length)) {
         return Api::NewError(
             "Invalid length passed in to access list elements");
       }
-      const Instance& data = Instance::Handle(TypedDataView::Data(view));
+      const auto& data = Instance::Handle(view.typed_data());
       if (data.IsTypedData()) {
         const TypedData& array = TypedData::Cast(data);
         if (array.ElementSizeInBytes() == 1) {
-          intptr_t data_offset =
-              Smi::Value(TypedDataView::OffsetInBytes(view)) + offset;
+          const intptr_t data_offset =
+              Smi::Value(view.offset_in_bytes()) + offset;
           // Range check already performed on the view object.
           ASSERT(Utils::RangeCheck(data_offset, length, array.Length()));
           return CopyBytes(array, data_offset, native_array, length);
@@ -3247,7 +3320,9 @@
 }
 
 DART_EXPORT Dart_TypedData_Type Dart_GetTypeOfTypedData(Dart_Handle object) {
-  API_TIMELINE_DURATION(Thread::Current());
+  Thread* thread = Thread::Current();
+  API_TIMELINE_DURATION(thread);
+  TransitionNativeToVM transition(thread);
   intptr_t class_id = Api::ClassId(object);
   if (RawObject::IsTypedDataClassId(class_id) ||
       RawObject::IsTypedDataViewClassId(class_id)) {
@@ -3258,18 +3333,19 @@
 
 DART_EXPORT Dart_TypedData_Type
 Dart_GetTypeOfExternalTypedData(Dart_Handle object) {
-  API_TIMELINE_DURATION(Thread::Current());
+  Thread* thread = Thread::Current();
+  API_TIMELINE_DURATION(thread);
+  TransitionNativeToVM transition(thread);
   intptr_t class_id = Api::ClassId(object);
   if (RawObject::IsExternalTypedDataClassId(class_id)) {
     return GetType(class_id);
   }
   if (RawObject::IsTypedDataViewClassId(class_id)) {
     // Check if data object of the view is external.
-    Zone* zone = Thread::Current()->zone();
-    const Instance& view_obj = Api::UnwrapInstanceHandle(zone, object);
+    Zone* zone = thread->zone();
+    const auto& view_obj = Api::UnwrapTypedDataViewHandle(zone, object);
     ASSERT(!view_obj.IsNull());
-    const Instance& data_obj =
-        Instance::Handle(zone, TypedDataView::Data(view_obj));
+    const auto& data_obj = Instance::Handle(zone, view_obj.typed_data());
     if (ExternalTypedData::IsExternalTypedData(data_obj)) {
       return GetType(class_id);
     }
@@ -3349,7 +3425,7 @@
   Dart_Handle ext_data =
       NewExternalTypedData(thread, kExternalTypedDataUint8ArrayCid, data,
                            length, peer, external_allocation_size, callback);
-  if (::Dart_IsError(ext_data)) {
+  if (Api::IsError(ext_data)) {
     return ext_data;
   }
   Object& result = Object::Handle(zone);
@@ -3621,15 +3697,15 @@
     data_tmp = obj.DataAddr(0);
   } else {
     ASSERT(RawObject::IsTypedDataViewClassId(class_id));
-    const Instance& view_obj = Api::UnwrapInstanceHandle(Z, object);
+    const auto& view_obj = Api::UnwrapTypedDataViewHandle(Z, object);
     ASSERT(!view_obj.IsNull());
     Smi& val = Smi::Handle();
-    val ^= TypedDataView::Length(view_obj);
+    val ^= view_obj.length();
     length = val.Value();
     size_in_bytes = length * TypedDataView::ElementSizeInBytes(class_id);
-    val ^= TypedDataView::OffsetInBytes(view_obj);
+    val ^= view_obj.offset_in_bytes();
     intptr_t offset_in_bytes = val.Value();
-    const Instance& obj = Instance::Handle(TypedDataView::Data(view_obj));
+    const auto& obj = Instance::Handle(view_obj.typed_data());
     T->IncrementNoSafepointScopeDepth();
     START_NO_CALLBACK_SCOPE(T);
     if (TypedData::IsTypedData(obj)) {
@@ -3749,7 +3825,7 @@
         current_func, constr_name.ToCString(), error_message.ToCString()));
     return ApiError::New(message);
   }
-  RawError* error = constructor.VerifyEntryPoint();
+  RawError* error = constructor.VerifyCallEntryPoint();
   if (error != Error::null()) return error;
   return constructor.raw();
 }
@@ -4043,7 +4119,7 @@
   if (!constructor.IsNull() && constructor.IsGenerativeConstructor() &&
       constructor.AreValidArgumentCounts(
           kTypeArgsLen, number_of_arguments + extra_args, 0, NULL)) {
-    CHECK_ERROR_HANDLE(constructor.VerifyEntryPoint());
+    CHECK_ERROR_HANDLE(constructor.VerifyCallEntryPoint());
     // Create the argument list.
     // Constructors get the uninitialized object.
     if (!type_arguments.IsNull()) {
@@ -4057,7 +4133,7 @@
     Array& args = Array::Handle(Z);
     result =
         SetupArguments(T, number_of_arguments, arguments, extra_args, &args);
-    if (!::Dart_IsError(result)) {
+    if (!Api::IsError(result)) {
       args.SetAt(0, instance);
       const Object& retval =
           Object::Handle(Z, DartEntry::InvokeFunction(constructor, args));
@@ -4116,7 +4192,7 @@
 
     // Setup args and check for malformed arguments in the arguments list.
     result = SetupArguments(T, number_of_arguments, arguments, 0, &args);
-    if (::Dart_IsError(result)) {
+    if (Api::IsError(result)) {
       return result;
     }
     return Api::NewHandle(
@@ -4131,7 +4207,7 @@
 
     // Setup args and check for malformed arguments in the arguments list.
     result = SetupArguments(T, number_of_arguments, arguments, 1, &args);
-    if (::Dart_IsError(result)) {
+    if (Api::IsError(result)) {
       return result;
     }
     args.SetAt(0, instance);
@@ -4154,7 +4230,7 @@
 
     // Setup args and check for malformed arguments in the arguments list.
     result = SetupArguments(T, number_of_arguments, arguments, 0, &args);
-    if (::Dart_IsError(result)) {
+    if (Api::IsError(result)) {
       return result;
     }
 
@@ -4349,7 +4425,7 @@
   Isolate* isolate = thread->isolate();
   CHECK_ISOLATE(isolate);
   CHECK_CALLBACK_STATE(thread);
-  if (Api::IsError(exception)) {
+  if (::Dart_IsError(exception)) {
     ::Dart_PropagateError(exception);
   }
   TransitionNativeToVM transition(thread);
@@ -4423,6 +4499,7 @@
                                                          int* count) {
   Thread* thread = Thread::Current();
   CHECK_ISOLATE(thread->isolate());
+  TransitionNativeToVM transition(thread);
   ReusableObjectHandleScope reused_obj_handle(thread);
   const Instance& instance = Api::UnwrapInstanceHandle(reused_obj_handle, obj);
   if (instance.IsNull()) {
@@ -4437,6 +4514,7 @@
                                                     intptr_t* value) {
   Thread* thread = Thread::Current();
   CHECK_ISOLATE(thread->isolate());
+  TransitionNativeToVM transition(thread);
   ReusableObjectHandleScope reused_obj_handle(thread);
   const Instance& instance = Api::UnwrapInstanceHandle(reused_obj_handle, obj);
   if (instance.IsNull()) {
@@ -4731,11 +4809,11 @@
   NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
   ASSERT(arguments->thread()->isolate() == Isolate::Current());
   ASSERT_CALLBACK_STATE(arguments->thread());
+  TransitionNativeToVM transition(arguments->thread());
   if ((retval != Api::Null()) && !Api::IsInstance(retval) &&
       !Api::IsError(retval)) {
     // Print the current stack trace to make the problematic caller
     // easier to find.
-    TransitionNativeToVM transition(arguments->thread());
     const StackTrace& stacktrace = GetCurrentStackTrace(0);
     OS::PrintErr("=== Current Trace:\n%s===\n", stacktrace.ToCString());
 
@@ -4752,6 +4830,7 @@
 DART_EXPORT void Dart_SetWeakHandleReturnValue(Dart_NativeArguments args,
                                                Dart_WeakPersistentHandle rval) {
   NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
+  TransitionNativeToVM transition(arguments->thread());
 #if defined(DEBUG)
   Isolate* isolate = arguments->thread()->isolate();
   ASSERT(isolate == Isolate::Current());
@@ -4774,7 +4853,7 @@
       return Symbols::False().raw();
     }
 
-    if (!Api::ffiEnabled() && name.Equals(Symbols::DartLibraryFfi())) {
+    if (!Api::IsFfiEnabled() && name.Equals(Symbols::DartLibraryFfi())) {
       return Symbols::False().raw();
     }
 
@@ -4863,6 +4942,7 @@
 DART_EXPORT void Dart_SetBooleanReturnValue(Dart_NativeArguments args,
                                             bool retval) {
   NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
+  TransitionNativeToVM transition(arguments->thread());
   ASSERT(arguments->thread()->isolate() == Isolate::Current());
   ASSERT_CALLBACK_STATE(arguments->thread());
   arguments->SetReturn(Bool::Get(retval));
@@ -4871,14 +4951,13 @@
 DART_EXPORT void Dart_SetIntegerReturnValue(Dart_NativeArguments args,
                                             int64_t retval) {
   NativeArguments* arguments = reinterpret_cast<NativeArguments*>(args);
+  TransitionNativeToVM transition(arguments->thread());
   ASSERT(arguments->thread()->isolate() == Isolate::Current());
   ASSERT_CALLBACK_STATE(arguments->thread());
   if (Smi::IsValid(retval)) {
     Api::SetSmiReturnValue(arguments, static_cast<intptr_t>(retval));
   } else {
     // Slow path for Mints.
-    ASSERT_CALLBACK_STATE(arguments->thread());
-    TransitionNativeToVM transition(arguments->thread());
     Api::SetIntegerReturnValue(arguments, retval);
   }
 }
@@ -5264,7 +5343,7 @@
 
   // Finalize all classes if needed.
   Dart_Handle state = Api::CheckAndFinalizePendingClasses(T);
-  if (::Dart_IsError(state)) {
+  if (Api::IsError(state)) {
     return state;
   }
 
@@ -5364,6 +5443,7 @@
   }
   Thread* thread = Thread::Current();
   CHECK_ISOLATE(thread->isolate());
+  TransitionNativeToVM transition(thread);
   REUSABLE_OBJECT_HANDLESCOPE(thread);
   Object& obj = thread->ObjectHandle();
   obj = Api::UnwrapHandle(object);
@@ -5383,6 +5463,7 @@
 DART_EXPORT Dart_Handle Dart_SetPeer(Dart_Handle object, void* peer) {
   Thread* thread = Thread::Current();
   CHECK_ISOLATE(thread->isolate());
+  TransitionNativeToVM transition(thread);
   REUSABLE_OBJECT_HANDLESCOPE(thread);
   Object& obj = thread->ObjectHandle();
   obj = Api::UnwrapHandle(object);
@@ -5498,6 +5579,15 @@
   return result;
 }
 
+DART_EXPORT void Dart_SetDartLibrarySourcesKernel(
+    const uint8_t* platform_kernel,
+    const intptr_t platform_kernel_size) {
+#if !defined(PRODUCT)
+  Service::SetDartLibraryKernelForSources(platform_kernel,
+                                          platform_kernel_size);
+#endif
+}
+
 // --- Service support ---
 
 DART_EXPORT bool Dart_IsServiceIsolate(Dart_Isolate isolate) {
@@ -5702,7 +5792,6 @@
   if (event == NULL) {
     return;
   }
-  label = strdup(label);
   switch (type) {
     case Dart_Timeline_Event_Begin:
       event->Begin(label, timestamp0);
@@ -5740,7 +5829,6 @@
     default:
       FATAL("Unknown Dart_Timeline_Event_Type");
   }
-  event->set_owns_label(true);
   event->SetNumArguments(argument_count);
   for (intptr_t i = 0; i < argument_count; i++) {
     event->CopyArgument(i, argument_names[i], argument_values[i]);
@@ -5808,6 +5896,10 @@
   API_TIMELINE_DURATION(thread);
   DARTSCOPE(thread);
   CHECK_NULL(buffer);
+  Dart_Handle state = Api::CheckAndFinalizePendingClasses(T);
+  if (Api::IsError(state)) {
+    return state;
+  }
   CompilationTraceLoader loader(thread);
   const Object& error =
       Object::Handle(loader.CompileTrace(buffer, buffer_length));
@@ -5827,6 +5919,10 @@
   API_TIMELINE_DURATION(thread);
   DARTSCOPE(thread);
   CHECK_NULL(buffer);
+  Dart_Handle state = Api::CheckAndFinalizePendingClasses(T);
+  if (Api::IsError(state)) {
+    return state;
+  }
   ReadStream stream(buffer, buffer_length);
   TypeFeedbackLoader loader(thread);
   const Object& error = Object::Handle(loader.LoadFeedback(&stream));
@@ -5868,7 +5964,7 @@
     return Api::NewError("Flag --precompilation was not specified.");
   }
   Dart_Handle result = Api::CheckAndFinalizePendingClasses(T);
-  if (::Dart_IsError(result)) {
+  if (Api::IsError(result)) {
     return result;
   }
   CHECK_CALLBACK_STATE(T);
@@ -6090,7 +6186,7 @@
   CHECK_NULL(isolate_snapshot_instructions_size);
   // Finalize all classes if needed.
   Dart_Handle state = Api::CheckAndFinalizePendingClasses(T);
-  if (::Dart_IsError(state)) {
+  if (Api::IsError(state)) {
     return state;
   }
   BackgroundCompiler::Stop(I);
@@ -6149,7 +6245,7 @@
   CHECK_NULL(isolate_snapshot_instructions_size);
   // Finalize all classes if needed.
   Dart_Handle state = Api::CheckAndFinalizePendingClasses(T);
-  if (::Dart_IsError(state)) {
+  if (Api::IsError(state)) {
     return state;
   }
   BackgroundCompiler::Stop(I);
@@ -6245,4 +6341,8 @@
 #endif
 }
 
+DART_EXPORT void Dart_PrepareToAbort() {
+  OS::PrepareToAbort();
+}
+
 }  // namespace dart
diff --git a/runtime/vm/dart_api_impl.h b/runtime/vm/dart_api_impl.h
index 570a855..f2cd2e8 100644
--- a/runtime/vm/dart_api_impl.h
+++ b/runtime/vm/dart_api_impl.h
@@ -186,11 +186,20 @@
 
   // Returns true if the handle holds a Smi.
   static bool IsSmi(Dart_Handle handle) {
-    // TODO(turnidge): Assumes RawObject* is at offset zero.  Fix.
+    // Important: we do not require current thread to be in VM state because
+    // we do not dereference the handle.
     RawObject* raw = *(reinterpret_cast<RawObject**>(handle));
     return !raw->IsHeapObject();
   }
 
+  // Returns the value of a Smi.
+  static intptr_t SmiValue(Dart_Handle handle) {
+    // Important: we do not require current thread to be in VM state because
+    // we do not dereference the handle.
+    RawObject* value = *(reinterpret_cast<RawObject**>(handle));
+    return Smi::Value(static_cast<RawSmi*>(value));
+  }
+
   // Returns true if the handle holds a Dart Instance.
   static bool IsInstance(Dart_Handle handle) {
     return (ClassId(handle) >= kInstanceCid);
@@ -204,16 +213,8 @@
     return RawObject::IsErrorClassId(ClassId(handle));
   }
 
-  // Returns the value of a Smi.
-  static intptr_t SmiValue(Dart_Handle handle) {
-    // TODO(turnidge): Assumes RawObject* is at offset zero.  Fix.
-    uword value = *(reinterpret_cast<uword*>(handle));
-    return Smi::ValueFromRaw(value);
-  }
-
   static intptr_t ClassId(Dart_Handle handle) {
-    // TODO(turnidge): Assumes RawObject* is at offset zero.  Fix.
-    RawObject* raw = *(reinterpret_cast<RawObject**>(handle));
+    RawObject* raw = UnwrapHandle(handle);
     if (!raw->IsHeapObject()) {
       return kSmiCid;
     }
@@ -294,17 +295,18 @@
 
   static RawString* GetEnvironmentValue(Thread* thread, const String& name);
 
-  static bool ffiEnabled() {
+  static bool IsFfiEnabled() {
     // dart:ffi is not implemented for the following configurations
-#if !defined(TARGET_ARCH_X64)
-    // https://github.com/dart-lang/sdk/issues/35774
-    return false;
-#elif !defined(TARGET_OS_LINUX) && !defined(TARGET_OS_MACOS)
-    // https://github.com/dart-lang/sdk/issues/35760 Arm32 && Android
-    // https://github.com/dart-lang/sdk/issues/35771 Windows
-    // https://github.com/dart-lang/sdk/issues/35772 Arm64
+#if defined(TARGET_ARCH_DBC)
     // https://github.com/dart-lang/sdk/issues/35773 DBC
     return false;
+#elif defined(TARGET_ARCH_ARM) &&                                              \
+    !(defined(TARGET_OS_ANDROID) || defined(TARGET_OS_MACOS_IOS))
+    // TODO(36309): Support hardfp calling convention.
+    return false;
+#elif !defined(TARGET_OS_LINUX) && !defined(TARGET_OS_MACOS) &&                \
+    !defined(TARGET_OS_ANDROID) && !defined(TARGET_OS_WINDOWS)
+    return false;
 #else
     // dart:ffi is also not implemented for precompiled in which case
     // FLAG_enable_ffi is set to false by --precompilation.
diff --git a/runtime/vm/dart_api_impl_test.cc b/runtime/vm/dart_api_impl_test.cc
index b4ad32a..406901a 100644
--- a/runtime/vm/dart_api_impl_test.cc
+++ b/runtime/vm/dart_api_impl_test.cc
@@ -571,8 +571,7 @@
     EXPECT_VALID(result);  // We do not expect to reach here.
     UNREACHABLE();
   } else {
-    result = Dart_PropagateError(result);
-    EXPECT_VALID(result);  // We do not expect to reach here.
+    Dart_PropagateError(result);
     UNREACHABLE();
   }
 }
@@ -5375,7 +5374,7 @@
   Dart_Handle instance;
   // Create a test library and Load up a test script in it.
   // The test library must have a dart: url so it can import dart:_internal.
-  Dart_Handle lib = TestCase::LoadCoreTestScript(kScriptChars, NULL);
+  Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
   Dart_Handle type = Dart_GetType(lib, NewString("TestClass"), 0, NULL);
   EXPECT_VALID(type);
 
diff --git a/runtime/vm/dart_api_message.cc b/runtime/vm/dart_api_message.cc
index 6b4b612..88c6c92 100644
--- a/runtime/vm/dart_api_message.cc
+++ b/runtime/vm/dart_api_message.cc
@@ -243,39 +243,6 @@
   return value;
 }
 
-static Dart_TypedData_Type GetTypedDataTypeFromView(
-    Dart_CObject_Internal* object,
-    char* class_name) {
-  struct {
-    const char* name;
-    Dart_TypedData_Type type;
-  } view_class_names[] = {
-      {"_Int8ArrayView", Dart_TypedData_kInt8},
-      {"_Uint8ArrayView", Dart_TypedData_kUint8},
-      {"_Uint8ClampedArrayView", Dart_TypedData_kUint8Clamped},
-      {"_Int16ArrayView", Dart_TypedData_kInt16},
-      {"_Uint16ArrayView", Dart_TypedData_kUint16},
-      {"_Int32ArrayView", Dart_TypedData_kInt32},
-      {"_Uint32ArrayView", Dart_TypedData_kUint32},
-      {"_Int64ArrayView", Dart_TypedData_kInt64},
-      {"_Uint64ArrayView", Dart_TypedData_kUint64},
-      {"_ByteDataView", Dart_TypedData_kUint8},
-      {"_Float32ArrayView", Dart_TypedData_kFloat32},
-      {"_Float64ArrayView", Dart_TypedData_kFloat64},
-      {NULL, Dart_TypedData_kInvalid},
-  };
-
-  int i = 0;
-  while (view_class_names[i].name != NULL) {
-    if (strncmp(view_class_names[i].name, class_name,
-                strlen(view_class_names[i].name)) == 0) {
-      return view_class_names[i].type;
-    }
-    i++;
-  }
-  return Dart_TypedData_kInvalid;
-}
-
 Dart_CObject* ApiMessageReader::ReadInlinedObject(intptr_t object_id) {
   // Read the class header information and lookup the class.
   intptr_t class_header = Read<int32_t>();
@@ -299,46 +266,6 @@
     }
     ASSERT(object->type == static_cast<Dart_CObject_Type>(
                                Dart_CObject_Internal::kUninitialized));
-
-    char* library_uri =
-        object->cls->internal.as_class.library_url->value.as_string;
-    char* class_name =
-        object->cls->internal.as_class.class_name->value.as_string;
-
-    // Handle typed data views.
-    if (strcmp("dart:typed_data", library_uri) == 0) {
-      Dart_TypedData_Type type = GetTypedDataTypeFromView(object, class_name);
-      if (type != Dart_TypedData_kInvalid) {
-        object->type =
-            static_cast<Dart_CObject_Type>(Dart_CObject_Internal::kView);
-        Dart_CObject_Internal* cls =
-            reinterpret_cast<Dart_CObject_Internal*>(ReadObjectImpl());
-        ASSERT(cls == object->cls);
-        object->internal.as_view.buffer = ReadObjectImpl();
-        object->internal.as_view.offset_in_bytes = ReadSmiValue();
-        object->internal.as_view.length = ReadSmiValue();
-
-        // The buffer is fully read now as typed data objects are
-        // serialized in-line.
-        Dart_CObject* buffer = object->internal.as_view.buffer;
-        ASSERT(buffer->type == Dart_CObject_kTypedData);
-
-        // Now turn the view into a byte array.
-        object->type = Dart_CObject_kTypedData;
-        object->value.as_typed_data.type = type;
-        object->value.as_typed_data.length =
-            object->internal.as_view.length * GetTypedDataSizeInBytes(type);
-        object->value.as_typed_data.values =
-            buffer->value.as_typed_data.values +
-            object->internal.as_view.offset_in_bytes;
-      } else {
-        // TODO(sgjesse): Handle other instances. Currently this will
-        // skew the reading as the fields of the instance is not read.
-      }
-    } else {
-      // TODO(sgjesse): Handle other instances. Currently this will
-      // skew the reading as the fields of the instance is not read.
-    }
     return object;
   }
 
@@ -531,7 +458,6 @@
       return value;
     }
     case kTypeParameterCid: {
-      // TODO(sgjesse): Fix this workaround ignoring the type parameter.
       Dart_CObject* value = &dynamic_type_marker;
       AddBackRef(object_id, value, kIsDeserialized);
       intptr_t index = Read<int32_t>();
@@ -657,60 +583,59 @@
     return object;                                                             \
   }
 
-    case kTypedDataInt8ArrayCid:
-      READ_TYPED_DATA(Int8, int8_t);
-    case kExternalTypedDataInt8ArrayCid:
-      READ_EXTERNAL_TYPED_DATA(Int8, int8_t);
+#define READ_TYPED_DATA_VIEW(tname, ctype)                                     \
+  {                                                                            \
+    Dart_CObject_Internal* object =                                            \
+        AllocateDartCObjectInternal(Dart_CObject_Internal::kUninitialized);    \
+    AddBackRef(object_id, object, kIsDeserialized);                            \
+    object->type =                                                             \
+        static_cast<Dart_CObject_Type>(Dart_CObject_Internal::kView);          \
+    object->internal.as_view.offset_in_bytes = ReadSmiValue();                 \
+    object->internal.as_view.length = ReadSmiValue();                          \
+    object->internal.as_view.buffer = ReadObjectImpl();                        \
+    Dart_CObject* buffer = object->internal.as_view.buffer;                    \
+    RELEASE_ASSERT(buffer->type == Dart_CObject_kTypedData);                   \
+                                                                               \
+    /* Now turn the view into a byte array.*/                                  \
+    const Dart_TypedData_Type type = Dart_TypedData_k##tname;                  \
+    object->type = Dart_CObject_kTypedData;                                    \
+    object->value.as_typed_data.type = type;                                   \
+    object->value.as_typed_data.length =                                       \
+        object->internal.as_view.length * GetTypedDataSizeInBytes(type);       \
+    object->value.as_typed_data.values =                                       \
+        buffer->value.as_typed_data.values +                                   \
+        object->internal.as_view.offset_in_bytes;                              \
+    return object;                                                             \
+  }
 
-    case kTypedDataUint8ArrayCid:
-      READ_TYPED_DATA(Uint8, uint8_t);
-    case kExternalTypedDataUint8ArrayCid:
-      READ_EXTERNAL_TYPED_DATA(Uint8, uint8_t);
+#define TYPED_DATA_LIST(V)                                                     \
+  V(Int8, int8_t)                                                              \
+  V(Uint8, uint8_t)                                                            \
+  V(Uint8Clamped, uint8_t)                                                     \
+  V(Int16, int16_t)                                                            \
+  V(Uint16, uint16_t)                                                          \
+  V(Int32, int32_t)                                                            \
+  V(Uint32, uint32_t)                                                          \
+  V(Int64, int64_t)                                                            \
+  V(Uint64, uint64_t)                                                          \
+  V(Float32, float)                                                            \
+  V(Float64, double)
 
-    case kTypedDataUint8ClampedArrayCid:
-      READ_TYPED_DATA(Uint8Clamped, uint8_t);
-    case kExternalTypedDataUint8ClampedArrayCid:
-      READ_EXTERNAL_TYPED_DATA(Uint8Clamped, uint8_t);
+#define EMIT_TYPED_DATA_CASES(type, c_type)                                    \
+  case kTypedData##type##ArrayCid:                                             \
+    READ_TYPED_DATA(type, c_type);                                             \
+  case kExternalTypedData##type##ArrayCid:                                     \
+    READ_EXTERNAL_TYPED_DATA(type, c_type);                                    \
+  case kTypedData##type##ArrayViewCid:                                         \
+    READ_TYPED_DATA_VIEW(type, c_type);
 
-    case kTypedDataInt16ArrayCid:
-      READ_TYPED_DATA(Int16, int16_t);
-    case kExternalTypedDataInt16ArrayCid:
-      READ_EXTERNAL_TYPED_DATA(Int16, int16_t);
-
-    case kTypedDataUint16ArrayCid:
-      READ_TYPED_DATA(Uint16, uint16_t);
-    case kExternalTypedDataUint16ArrayCid:
-      READ_EXTERNAL_TYPED_DATA(Uint16, uint16_t);
-
-    case kTypedDataInt32ArrayCid:
-      READ_TYPED_DATA(Int32, int32_t);
-    case kExternalTypedDataInt32ArrayCid:
-      READ_EXTERNAL_TYPED_DATA(Int32, int32_t);
-
-    case kTypedDataUint32ArrayCid:
-      READ_TYPED_DATA(Uint32, uint32_t);
-    case kExternalTypedDataUint32ArrayCid:
-      READ_EXTERNAL_TYPED_DATA(Uint32, uint32_t);
-
-    case kTypedDataInt64ArrayCid:
-      READ_TYPED_DATA(Int64, int64_t);
-    case kExternalTypedDataInt64ArrayCid:
-      READ_EXTERNAL_TYPED_DATA(Int64, int64_t);
-
-    case kTypedDataUint64ArrayCid:
-      READ_TYPED_DATA(Uint64, uint64_t);
-    case kExternalTypedDataUint64ArrayCid:
-      READ_EXTERNAL_TYPED_DATA(Uint64, uint64_t);
-
-    case kTypedDataFloat32ArrayCid:
-      READ_TYPED_DATA(Float32, float);
-    case kExternalTypedDataFloat32ArrayCid:
-      READ_EXTERNAL_TYPED_DATA(Float32, float);
-
-    case kTypedDataFloat64ArrayCid:
-      READ_TYPED_DATA(Float64, double);
-    case kExternalTypedDataFloat64ArrayCid:
-      READ_EXTERNAL_TYPED_DATA(Float64, double);
+      TYPED_DATA_LIST(EMIT_TYPED_DATA_CASES)
+#undef EMIT_TYPED_DATA_CASES
+#undef TYPED_DATA_LIST
+#undef READ_TYPED_DATA
+#undef READ_EXTERNAL_TYPED_DATA
+#undef READ_TYPED_DATA_VIEW
+#undef READ_TYPED_DATA_HEADER
 
     case kGrowableObjectArrayCid: {
       // A GrowableObjectArray is serialized as its type arguments and
diff --git a/runtime/vm/debugger.cc b/runtime/vm/debugger.cc
index 753a7c3..e117e1d 100644
--- a/runtime/vm/debugger.cc
+++ b/runtime/vm/debugger.cc
@@ -446,6 +446,7 @@
     case RawFunction::kImplicitGetter:
     case RawFunction::kImplicitSetter:
     case RawFunction::kImplicitStaticFinalGetter:
+    case RawFunction::kStaticFieldInitializer:
     case RawFunction::kMethodExtractor:
     case RawFunction::kNoSuchMethodDispatcher:
     case RawFunction::kInvokeFieldDispatcher:
@@ -1407,34 +1408,28 @@
       ContextLevel());
 }
 
-void ActivationFrame::PrintToJSONObject(JSONObject* jsobj, bool full) {
+void ActivationFrame::PrintToJSONObject(JSONObject* jsobj) {
   if (kind_ == kRegular) {
-    PrintToJSONObjectRegular(jsobj, full);
+    PrintToJSONObjectRegular(jsobj);
   } else if (kind_ == kAsyncCausal) {
-    PrintToJSONObjectAsyncCausal(jsobj, full);
+    PrintToJSONObjectAsyncCausal(jsobj);
   } else if (kind_ == kAsyncSuspensionMarker) {
-    PrintToJSONObjectAsyncSuspensionMarker(jsobj, full);
+    PrintToJSONObjectAsyncSuspensionMarker(jsobj);
   } else if (kind_ == kAsyncActivation) {
-    PrintToJSONObjectAsyncActivation(jsobj, full);
+    PrintToJSONObjectAsyncActivation(jsobj);
   } else {
     UNIMPLEMENTED();
   }
 }
 
-void ActivationFrame::PrintToJSONObjectRegular(JSONObject* jsobj, bool full) {
+void ActivationFrame::PrintToJSONObjectRegular(JSONObject* jsobj) {
   const Script& script = Script::Handle(SourceScript());
   jsobj->AddProperty("type", "Frame");
   jsobj->AddProperty("kind", KindToCString(kind_));
   const TokenPosition pos = TokenPos().SourcePosition();
   jsobj->AddLocation(script, pos);
-  jsobj->AddProperty("function", function(), !full);
+  jsobj->AddProperty("function", function());
   jsobj->AddProperty("code", code());
-  if (full) {
-    // TODO(cutch): The old "full" script usage no longer fits
-    // in the world where we pass the script as part of the
-    // location.
-    jsobj->AddProperty("script", script, !full);
-  }
   {
     JSONArray jsvars(jsobj, "vars");
     const int num_vars = NumLocalVariables();
@@ -1455,7 +1450,7 @@
         jsvar.AddProperty("type", "BoundVariable");
         var_name = String::ScrubName(var_name);
         jsvar.AddProperty("name", var_name.ToCString());
-        jsvar.AddProperty("value", var_value, !full);
+        jsvar.AddProperty("value", var_value);
         // Where was the variable declared?
         jsvar.AddProperty("declarationTokenPos", declaration_token_pos);
         // When the variable becomes visible to the scope.
@@ -1467,45 +1462,31 @@
   }
 }
 
-void ActivationFrame::PrintToJSONObjectAsyncCausal(JSONObject* jsobj,
-                                                   bool full) {
+void ActivationFrame::PrintToJSONObjectAsyncCausal(JSONObject* jsobj) {
   jsobj->AddProperty("type", "Frame");
   jsobj->AddProperty("kind", KindToCString(kind_));
   const Script& script = Script::Handle(SourceScript());
   const TokenPosition pos = TokenPos().SourcePosition();
   jsobj->AddLocation(script, pos);
-  jsobj->AddProperty("function", function(), !full);
+  jsobj->AddProperty("function", function());
   jsobj->AddProperty("code", code());
-  if (full) {
-    // TODO(cutch): The old "full" script usage no longer fits
-    // in the world where we pass the script as part of the
-    // location.
-    jsobj->AddProperty("script", script, !full);
-  }
 }
 
-void ActivationFrame::PrintToJSONObjectAsyncSuspensionMarker(JSONObject* jsobj,
-                                                             bool full) {
+void ActivationFrame::PrintToJSONObjectAsyncSuspensionMarker(
+    JSONObject* jsobj) {
   jsobj->AddProperty("type", "Frame");
   jsobj->AddProperty("kind", KindToCString(kind_));
   jsobj->AddProperty("marker", "AsynchronousSuspension");
 }
 
-void ActivationFrame::PrintToJSONObjectAsyncActivation(JSONObject* jsobj,
-                                                       bool full) {
+void ActivationFrame::PrintToJSONObjectAsyncActivation(JSONObject* jsobj) {
   jsobj->AddProperty("type", "Frame");
   jsobj->AddProperty("kind", KindToCString(kind_));
   const Script& script = Script::Handle(SourceScript());
   const TokenPosition pos = TokenPos().SourcePosition();
   jsobj->AddLocation(script, pos);
-  jsobj->AddProperty("function", function(), !full);
+  jsobj->AddProperty("function", function());
   jsobj->AddProperty("code", code());
-  if (full) {
-    // TODO(cutch): The old "full" script usage no longer fits
-    // in the world where we pass the script as part of the
-    // location.
-    jsobj->AddProperty("script", script, !full);
-  }
 }
 
 static bool IsFunctionVisible(const Function& function) {
@@ -3011,9 +2992,14 @@
       GrowableObjectArray::Handle(isolate_->object_store()->libraries());
   const GrowableObjectArray& scripts =
       GrowableObjectArray::Handle(zone, GrowableObjectArray::New());
+  bool is_package = script_url.StartsWith(Symbols::PackageScheme());
   for (intptr_t i = 0; i < libs.Length(); i++) {
     lib ^= libs.At(i);
-    script = lib.LookupScript(script_url);
+    // Ensure that all top-level members are loaded so their scripts
+    // are available for look up. When certain script only contains
+    // top level functions, scripts could still be loaded correctly.
+    lib.EnsureTopLevelClassIsFinalized();
+    script = lib.LookupScript(script_url, !is_package);
     if (!script.IsNull()) {
       scripts.Add(script);
     }
@@ -3915,9 +3901,10 @@
   while (loc != NULL) {
     url = loc->url();
     bool found_match = false;
+    bool is_package = url.StartsWith(Symbols::PackageScheme());
     for (intptr_t i = 0; i < libs.Length(); i++) {
       lib ^= libs.At(i);
-      script = lib.LookupScript(url);
+      script = lib.LookupScript(url, !is_package);
       if (!script.IsNull()) {
         // Found a script with matching url for this latent breakpoint.
         // Unlink the latent breakpoint from the list.
diff --git a/runtime/vm/debugger.h b/runtime/vm/debugger.h
index 759a180..d15fbb9 100644
--- a/runtime/vm/debugger.h
+++ b/runtime/vm/debugger.h
@@ -338,10 +338,7 @@
                                         const Array& type_definitions,
                                         const TypeArguments& type_arguments);
 
-  // Print the activation frame into |jsobj|. if |full| is false, script
-  // and local variable objects are only references. if |full| is true,
-  // the complete script, function, and, local variable objects are included.
-  void PrintToJSONObject(JSONObject* jsobj, bool full = false);
+  void PrintToJSONObject(JSONObject* jsobj);
 
   RawObject* GetAsyncAwaiter();
   RawObject* GetCausalStack();
@@ -349,10 +346,10 @@
   bool HandlesException(const Instance& exc_obj);
 
  private:
-  void PrintToJSONObjectRegular(JSONObject* jsobj, bool full);
-  void PrintToJSONObjectAsyncCausal(JSONObject* jsobj, bool full);
-  void PrintToJSONObjectAsyncSuspensionMarker(JSONObject* jsobj, bool full);
-  void PrintToJSONObjectAsyncActivation(JSONObject* jsobj, bool full);
+  void PrintToJSONObjectRegular(JSONObject* jsobj);
+  void PrintToJSONObjectAsyncCausal(JSONObject* jsobj);
+  void PrintToJSONObjectAsyncSuspensionMarker(JSONObject* jsobj);
+  void PrintToJSONObjectAsyncActivation(JSONObject* jsobj);
   void PrintContextMismatchError(intptr_t ctx_slot,
                                  intptr_t frame_ctx_level,
                                  intptr_t var_ctx_level);
@@ -522,6 +519,11 @@
 
   bool IsPaused() const { return pause_event_ != NULL; }
 
+  bool ignore_breakpoints() const { return ignore_breakpoints_; }
+  void set_ignore_breakpoints(bool ignore_breakpoints) {
+    ignore_breakpoints_ = ignore_breakpoints;
+  }
+
   // Put the isolate into single stepping mode when Dart code next runs.
   //
   // This is used by the vm service to allow the user to step while
@@ -780,6 +782,26 @@
   DISALLOW_COPY_AND_ASSIGN(Debugger);
 };
 
+class DisableBreakpointsScope : public ValueObject {
+ public:
+  DisableBreakpointsScope(Debugger* debugger, bool disable)
+      : debugger_(debugger) {
+    ASSERT(debugger_ != NULL);
+    initial_state_ = debugger_->ignore_breakpoints();
+    debugger_->set_ignore_breakpoints(disable);
+  }
+
+  ~DisableBreakpointsScope() {
+    debugger_->set_ignore_breakpoints(initial_state_);
+  }
+
+ private:
+  Debugger* debugger_;
+  bool initial_state_;
+
+  DISALLOW_COPY_AND_ASSIGN(DisableBreakpointsScope);
+};
+
 }  // namespace dart
 
 #endif  // RUNTIME_VM_DEBUGGER_H_
diff --git a/runtime/vm/deferred_objects.cc b/runtime/vm/deferred_objects.cc
index 9529569..76ca7b7 100644
--- a/runtime/vm/deferred_objects.cc
+++ b/runtime/vm/deferred_objects.cc
@@ -105,16 +105,13 @@
     Exceptions::PropagateError(error);
   }
   const Code& code = Code::Handle(zone, function.unoptimized_code());
-// Check that deopt_id exists.
-// TODO(vegorov): verify after deoptimization targets as well.
-#ifdef DEBUG
-  ASSERT(DeoptId::IsDeoptAfter(deopt_id_) ||
-         (code.GetPcForDeoptId(deopt_id_, RawPcDescriptors::kDeopt) != 0));
-#endif
 
   uword continue_at_pc =
       code.GetPcForDeoptId(deopt_id_, RawPcDescriptors::kDeopt);
-  ASSERT(continue_at_pc != 0);
+  if (continue_at_pc == 0) {
+    FATAL2("Can't locate continuation PC for deoptid %" Pd " within %s\n",
+           deopt_id_, function.ToFullyQualifiedCString());
+  }
   uword* dest_addr = reinterpret_cast<uword*>(slot());
   *dest_addr = continue_at_pc;
 
@@ -306,7 +303,11 @@
                        value.ToCString());
         }
       } else {
-        ASSERT(offset.Value() == cls.type_arguments_field_offset());
+        // In addition to the type arguments vector we can also have lazy
+        // materialization of e.g. _ByteDataView objects which don't have
+        // explicit fields in Dart (all accesses to the fields are done via
+        // recognized native methods).
+        ASSERT(offset.Value() < cls.instance_size());
         obj.SetFieldAtOffset(offset.Value(), value);
         if (FLAG_trace_deoptimization_verbose) {
           OS::PrintErr("    null Field @ offset(%" Pd ") <- %s\n",
diff --git a/runtime/vm/deopt_instructions.h b/runtime/vm/deopt_instructions.h
index 9270768..3e5d46c 100644
--- a/runtime/vm/deopt_instructions.h
+++ b/runtime/vm/deopt_instructions.h
@@ -19,7 +19,6 @@
 
 namespace dart {
 
-class Location;
 class Value;
 class MaterializeObjectInstr;
 class StackFrame;
@@ -462,10 +461,12 @@
 
   RegisterType reg() const { return static_cast<RegisterType>(raw_index()); }
 
-  static const char* Name(Register reg) { return Assembler::RegisterName(reg); }
+  static const char* Name(Register reg) {
+    return RegisterNames::RegisterName(reg);
+  }
 
   static const char* Name(FpuRegister fpu_reg) {
-    return Assembler::FpuRegisterName(fpu_reg);
+    return RegisterNames::FpuRegisterName(fpu_reg);
   }
 
   const intptr_t source_index_;
@@ -601,7 +602,6 @@
   static const intptr_t kEntrySize = 3;
 };
 
-
 // Holds deopt information at one deoptimization point. The information consists
 // of two parts:
 //  - first a prefix consisting of kMaterializeObject instructions describing
@@ -638,7 +638,6 @@
                                   const Array& deopt_table,
                                   const TypedData& packed);
 
-
  private:
   static void UnpackInto(const Array& table,
                          const TypedData& packed,
diff --git a/runtime/vm/exceptions.cc b/runtime/vm/exceptions.cc
index 2783bd7..058d9c7 100644
--- a/runtime/vm/exceptions.cc
+++ b/runtime/vm/exceptions.cc
@@ -239,12 +239,15 @@
   }
 
   void ExecuteCatchEntryMoves(const CatchEntryMoves& moves) {
+    Zone* zone = Thread::Current()->zone();
+    auto& value = Object::Handle(zone);
+    auto& dst_values = Array::Handle(zone, Array::New(moves.count()));
+
     uword fp = handler_fp;
     ObjectPool* pool = nullptr;
     for (int j = 0; j < moves.count(); j++) {
       const CatchEntryMove& move = moves.At(j);
 
-      RawObject* value;
       switch (move.source_kind()) {
         case CatchEntryMove::SourceKind::kConstant:
           if (pool == nullptr) {
@@ -295,64 +298,28 @@
           UNREACHABLE();
       }
 
-      *TaggedSlotAt(fp, move.dest_slot()) = value;
+      dst_values.SetAt(j, value);
+    }
+
+    {
+      NoSafepointScope no_safepoint_scope;
+
+      for (int j = 0; j < moves.count(); j++) {
+        const CatchEntryMove& move = moves.At(j);
+        value = dst_values.At(j);
+        *TaggedSlotAt(fp, move.dest_slot()) = value.raw();
+      }
     }
   }
 
 #if defined(DART_PRECOMPILED_RUNTIME) || defined(DART_PRECOMPILER)
   void ReadCompressedCatchEntryMoves() {
-    intptr_t pc_offset = pc_ - code_->PayloadStart();
-    const TypedData& td = TypedData::Handle(code_->catch_entry_moves_maps());
-    NoSafepointScope no_safepoint;
-    ReadStream stream(static_cast<uint8_t*>(td.DataAddr(0)), td.Length());
+    const intptr_t pc_offset = pc_ - code_->PayloadStart();
+    const auto& td = TypedData::Handle(code_->catch_entry_moves_maps());
 
-    intptr_t prefix_length = 0, suffix_length = 0, suffix_offset = 0;
-    while (stream.PendingBytes() > 0) {
-      intptr_t target_pc_offset = Reader::Read(&stream);
-      prefix_length = Reader::Read(&stream);
-      suffix_length = Reader::Read(&stream);
-      suffix_offset = Reader::Read(&stream);
-      if (pc_offset == target_pc_offset) {
-        break;
-      }
-
-      // Skip the moves.
-      for (intptr_t j = 0; j < prefix_length; j++) {
-        CatchEntryMove::ReadFrom(&stream);
-      }
-    }
-    ASSERT((stream.PendingBytes() > 0) || (prefix_length == 0));
-
-    CatchEntryMoves* moves =
-        CatchEntryMoves::Allocate(prefix_length + suffix_length);
-    for (int j = 0; j < prefix_length; j++) {
-      moves->At(j) = CatchEntryMove::ReadFrom(&stream);
-    }
-    ReadCompressedCatchEntryMovesSuffix(&stream, suffix_offset, suffix_length,
-                                        moves, prefix_length);
-    catch_entry_moves_ = moves;
+    CatchEntryMovesMapReader reader(td);
+    catch_entry_moves_ = reader.ReadMovesForPcOffset(pc_offset);
   }
-
-  void ReadCompressedCatchEntryMovesSuffix(ReadStream* stream,
-                                           intptr_t offset,
-                                           intptr_t length,
-                                           CatchEntryMoves* moves,
-                                           intptr_t moves_offset) {
-    stream->SetPosition(offset);
-    Reader::Read(stream);  // skip pc_offset
-    Reader::Read(stream);  // skip variables
-    intptr_t suffix_length = Reader::Read(stream);
-    intptr_t suffix_offset = Reader::Read(stream);
-    intptr_t to_read = length - suffix_length;
-    for (int j = 0; j < to_read; j++) {
-      moves->At(moves_offset + j) = CatchEntryMove::ReadFrom(stream);
-    }
-    if (suffix_length > 0) {
-      ReadCompressedCatchEntryMovesSuffix(stream, suffix_offset, suffix_length,
-                                          moves, moves_offset + to_read);
-    }
-  }
-
 #else
   void GetCatchEntryMovesFromDeopt(intptr_t num_vars, StackFrame* frame) {
     Isolate* isolate = thread_->isolate();
@@ -415,6 +382,79 @@
 }
 #endif
 
+CatchEntryMoves* CatchEntryMovesMapReader::ReadMovesForPcOffset(
+    intptr_t pc_offset) {
+  NoSafepointScope no_safepoint;
+
+  ReadStream stream(static_cast<uint8_t*>(bytes_.DataAddr(0)), bytes_.Length());
+
+  intptr_t position = 0;
+  intptr_t length = 0;
+  FindEntryForPc(&stream, pc_offset, &position, &length);
+
+  return ReadCompressedCatchEntryMovesSuffix(&stream, position, length);
+}
+
+void CatchEntryMovesMapReader::FindEntryForPc(ReadStream* stream,
+                                              intptr_t pc_offset,
+                                              intptr_t* position,
+                                              intptr_t* length) {
+  using Reader = ReadStream::Raw<sizeof(intptr_t), intptr_t>;
+
+  while (stream->PendingBytes() > 0) {
+    const intptr_t stream_position = stream->Position();
+    const intptr_t target_pc_offset = Reader::Read(stream);
+    const intptr_t prefix_length = Reader::Read(stream);
+    const intptr_t suffix_length = Reader::Read(stream);
+    Reader::Read(stream);  // Skip suffix_offset
+    if (pc_offset == target_pc_offset) {
+      *position = stream_position;
+      *length = prefix_length + suffix_length;
+      return;
+    }
+
+    // Skip the prefix moves.
+    for (intptr_t j = 0; j < prefix_length; j++) {
+      CatchEntryMove::ReadFrom(stream);
+    }
+  }
+
+  UNREACHABLE();
+}
+
+CatchEntryMoves* CatchEntryMovesMapReader::ReadCompressedCatchEntryMovesSuffix(
+    ReadStream* stream,
+    intptr_t offset,
+    intptr_t length) {
+  using Reader = ReadStream::Raw<sizeof(intptr_t), intptr_t>;
+
+  CatchEntryMoves* moves = CatchEntryMoves::Allocate(length);
+
+  intptr_t remaining_length = length;
+
+  intptr_t moves_offset = 0;
+  while (remaining_length > 0) {
+    stream->SetPosition(offset);
+    Reader::Read(stream);  // skip pc_offset
+    Reader::Read(stream);  // skip prefix length
+    const intptr_t suffix_length = Reader::Read(stream);
+    const intptr_t suffix_offset = Reader::Read(stream);
+    const intptr_t to_read = remaining_length - suffix_length;
+    if (to_read > 0) {
+      for (int j = 0; j < to_read; j++) {
+        // The prefix is written from the back.
+        moves->At(moves_offset + to_read - j - 1) =
+            CatchEntryMove::ReadFrom(stream);
+      }
+      remaining_length -= to_read;
+      moves_offset += to_read;
+    }
+    offset = suffix_offset;
+  }
+
+  return moves;
+}
+
 static void FindErrorHandler(uword* handler_pc,
                              uword* handler_sp,
                              uword* handler_fp) {
@@ -529,18 +569,6 @@
   uword fp_for_clearing =
       (clear_deopt_at_target ? frame_pointer + 1 : frame_pointer);
   ClearLazyDeopts(thread, fp_for_clearing);
-#if defined(USING_SIMULATOR)
-  // Unwinding of the C++ frames and destroying of their stack resources is done
-  // by the simulator, because the target stack_pointer is a simulated stack
-  // pointer and not the C++ stack pointer.
-
-  // Continue simulating at the given pc in the given frame after setting up the
-  // exception object in the kExceptionObjectReg register and the stacktrace
-  // object (may be raw null) in the kStackTraceObjectReg register.
-
-  Simulator::Current()->JumpToFrame(program_counter, stack_pointer,
-                                    frame_pointer, thread);
-#else
 
 #if !defined(DART_PRECOMPILED_RUNTIME)
   // TODO(regis): We still possibly need to unwind interpreter frames if they
@@ -554,6 +582,19 @@
   }
 #endif  // !defined(DART_PRECOMPILED_RUNTIME)
 
+#if defined(USING_SIMULATOR)
+  // Unwinding of the C++ frames and destroying of their stack resources is done
+  // by the simulator, because the target stack_pointer is a simulated stack
+  // pointer and not the C++ stack pointer.
+
+  // Continue simulating at the given pc in the given frame after setting up the
+  // exception object in the kExceptionObjectReg register and the stacktrace
+  // object (may be raw null) in the kStackTraceObjectReg register.
+
+  Simulator::Current()->JumpToFrame(program_counter, stack_pointer,
+                                    frame_pointer, thread);
+#else
+
   // Prepare for unwinding frames by destroying all the stack resources
   // in the previous frames.
   StackResource::Unwind(thread);
diff --git a/runtime/vm/exceptions.h b/runtime/vm/exceptions.h
index d43201f..894f374 100644
--- a/runtime/vm/exceptions.h
+++ b/runtime/vm/exceptions.h
@@ -27,6 +27,7 @@
 class WriteStream;
 class String;
 class Thread;
+class TypedData;
 
 class Exceptions : AllStatic {
  public:
@@ -190,7 +191,7 @@
            (dest_slot() == src_slot());
   }
 
-  bool operator==(const CatchEntryMove& rhs) {
+  bool operator==(const CatchEntryMove& rhs) const {
     return src_ == rhs.src_ && dest_and_kind_ == rhs.dest_and_kind_;
   }
 
@@ -253,6 +254,30 @@
   // Followed by CatchEntryMove[count_]
 };
 
+// Used for reading the [CatchEntryMoves] from the compressed form.
+class CatchEntryMovesMapReader : public ValueObject {
+ public:
+  explicit CatchEntryMovesMapReader(const TypedData& bytes) : bytes_(bytes) {}
+
+  // The returned [CatchEntryMoves] must be freed by the caller via [free].
+  CatchEntryMoves* ReadMovesForPcOffset(intptr_t pc_offset);
+
+ private:
+  // Given the [pc_offset] this function will find the [position] at which to
+  // read the catch entries and the [length] of the catch entry moves array.
+  void FindEntryForPc(ReadStream* stream,
+                      intptr_t pc_offset,
+                      intptr_t* position,
+                      intptr_t* length);
+
+  // Reads the [length] catch entry moves from [offset] in the [stream].
+  CatchEntryMoves* ReadCompressedCatchEntryMovesSuffix(ReadStream* stream,
+                                                       intptr_t offset,
+                                                       intptr_t length);
+
+  const TypedData& bytes_;
+};
+
 // A simple reference counting wrapper for CatchEntryMoves.
 //
 // TODO(vegorov) switch this to intrusive reference counting.
diff --git a/runtime/vm/ffi_trampoline_stubs_x64.cc b/runtime/vm/ffi_trampoline_stubs_x64.cc
deleted file mode 100644
index 9374f61..0000000
--- a/runtime/vm/ffi_trampoline_stubs_x64.cc
+++ /dev/null
@@ -1,564 +0,0 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// TODO(dacoharkes): Move this into compiler namespace.
-
-#include "vm/globals.h"
-
-#include "vm/stub_code.h"
-
-#if defined(TARGET_ARCH_X64) && !defined(DART_PRECOMPILED_RUNTIME)
-
-#include "vm/compiler/assembler/assembler.h"
-#include "vm/compiler/assembler/disassembler.h"
-#include "vm/compiler/backend/flow_graph_compiler.h"
-#include "vm/compiler/jit/compiler.h"
-#include "vm/constants_x64.h"
-#include "vm/dart_entry.h"
-#include "vm/heap/heap.h"
-#include "vm/heap/scavenger.h"
-#include "vm/instructions.h"
-#include "vm/object_store.h"
-#include "vm/resolver.h"
-#include "vm/stack_frame.h"
-#include "vm/tags.h"
-#include "vm/type_testing_stubs.h"
-
-#define __ assembler->
-
-namespace dart {
-
-static Representation TypeRepresentation(const AbstractType& result_type) {
-  switch (result_type.type_class_id()) {
-    case kFfiFloatCid:
-    case kFfiDoubleCid:
-      return kUnboxedDouble;
-    case kFfiInt8Cid:
-    case kFfiInt16Cid:
-    case kFfiInt32Cid:
-    case kFfiInt64Cid:
-    case kFfiUint8Cid:
-    case kFfiUint16Cid:
-    case kFfiUint32Cid:
-    case kFfiUint64Cid:
-    case kFfiIntPtrCid:
-    case kFfiPointerCid:
-    default:  // Subtypes of Pointer.
-      return kUnboxedInt64;
-  }
-}
-
-// Converts a Ffi [signature] to a list of Representations.
-// Note that this ignores first argument (receiver) which is dynamic.
-static ZoneGrowableArray<Representation>* ArgumentRepresentations(
-    const Function& signature) {
-  intptr_t num_arguments = signature.num_fixed_parameters() - 1;
-  auto result = new ZoneGrowableArray<Representation>(num_arguments);
-  for (intptr_t i = 0; i < num_arguments; i++) {
-    AbstractType& arg_type =
-        AbstractType::Handle(signature.ParameterTypeAt(i + 1));
-    result->Add(TypeRepresentation(arg_type));
-  }
-  return result;
-}
-
-// Takes a list of argument representations, and converts it to a list of
-// argument locations based on calling convention.
-static ZoneGrowableArray<Location>* ArgumentLocations(
-    const ZoneGrowableArray<Representation>& arg_representations) {
-  intptr_t num_arguments = arg_representations.length();
-  auto result = new ZoneGrowableArray<Location>(num_arguments);
-  result->FillWith(Location(), 0, num_arguments);
-  Location* data = result->data();
-
-  // Loop through all arguments and assign a register or a stack location.
-  intptr_t int_regs_used = 0;
-  intptr_t xmm_regs_used = 0;
-  intptr_t nth_stack_argument = 0;
-  bool on_stack;
-  for (intptr_t i = 0; i < num_arguments; i++) {
-    on_stack = true;
-    switch (arg_representations.At(i)) {
-      case kUnboxedInt64:
-        if (int_regs_used < CallingConventions::kNumArgRegs) {
-          data[i] = Location::RegisterLocation(
-              CallingConventions::ArgumentRegisters[int_regs_used]);
-          int_regs_used++;
-          if (CallingConventions::kArgumentIntRegXorXmmReg) {
-            xmm_regs_used++;
-          }
-          on_stack = false;
-        }
-        break;
-      case kUnboxedDouble:
-        if (xmm_regs_used < CallingConventions::kNumXmmArgRegs) {
-          data[i] = Location::FpuRegisterLocation(
-              CallingConventions::XmmArgumentRegisters[xmm_regs_used]);
-          xmm_regs_used++;
-          if (CallingConventions::kArgumentIntRegXorXmmReg) {
-            int_regs_used++;
-          }
-          on_stack = false;
-        }
-        break;
-      default:
-        UNREACHABLE();
-    }
-    if (on_stack) {
-      data[i] = Location::StackSlot(nth_stack_argument, RSP);
-      nth_stack_argument++;
-    }
-  }
-  return result;
-}
-
-static intptr_t NumStackArguments(
-    const ZoneGrowableArray<Location>& locations) {
-  intptr_t num_arguments = locations.length();
-  intptr_t num_stack_arguments = 0;
-  for (intptr_t i = 0; i < num_arguments; i++) {
-    if (locations.At(i).IsStackSlot()) {
-      num_stack_arguments++;
-    }
-  }
-  return num_stack_arguments;
-}
-
-// Input parameters:
-//   Register reg : a Null, or something else
-static void GenerateNotNullCheck(Assembler* assembler, Register reg) {
-  Label not_null;
-  Address throw_null_pointer_address =
-      Address(THR, Thread::OffsetFromThread(&kArgumentNullErrorRuntimeEntry));
-
-  __ CompareObject(reg, Object::null_object());
-  __ j(NOT_EQUAL, &not_null, Assembler::kNearJump);
-
-  // TODO(dacoharkes): Create the message here and use
-  // kArgumentErrorRuntimeEntry to report which argument was null.
-  __ movq(CODE_REG, Address(THR, Thread::call_to_runtime_stub_offset()));
-  __ movq(RBX, throw_null_pointer_address);
-  __ movq(R10, Immediate(0));
-  __ call(Address(THR, Thread::call_to_runtime_entry_point_offset()));
-
-  __ Bind(&not_null);
-}
-
-// Saves an int64 in the thread so GC does not trip.
-//
-// Input parameters:
-//   Register src : a C int64
-static void GenerateSaveInt64GCSafe(Assembler* assembler, Register src) {
-  __ movq(Address(THR, Thread::unboxed_int64_runtime_arg_offset()), src);
-}
-
-// Loads an int64 from the thread.
-static void GenerateLoadInt64GCSafe(Assembler* assembler, Register dst) {
-  __ movq(dst, Address(THR, Thread::unboxed_int64_runtime_arg_offset()));
-}
-
-// Takes a Dart int and converts it to a C int64.
-//
-// Input parameters:
-//   Register reg : a Dart Null, Smi, or Mint
-// Output parameters:
-//   Register reg : a C int64
-// Invariant: keeps ArgumentRegisters and XmmArgumentRegisters intact
-void GenerateMarshalInt64(Assembler* assembler, Register reg) {
-  ASSERT(reg != TMP);
-  ASSERT((1 << TMP & CallingConventions::kArgumentRegisters) == 0);
-  Label done, not_smi;
-
-  // Exception on Null
-  GenerateNotNullCheck(assembler, reg);
-
-  // Smi or Mint?
-  __ movq(TMP, reg);
-  __ testq(TMP, Immediate(kSmiTagMask));
-  __ j(NOT_ZERO, &not_smi, Assembler::kNearJump);
-
-  // Smi
-  __ SmiUntag(reg);
-  __ jmp(&done, Assembler::kNearJump);
-
-  // Mint
-  __ Bind(&not_smi);
-  __ movq(reg, FieldAddress(reg, Mint::value_offset()));
-  __ Bind(&done);
-}
-
-// Takes a C int64 and converts it to a Dart int.
-//
-// Input parameters:
-//   RAX : a C int64
-// Output paramaters:
-//   RAX : a Dart Smi or Mint
-static void GenerateUnmarshalInt64(Assembler* assembler) {
-  const Class& mint_class =
-      Class::ZoneHandle(Isolate::Current()->object_store()->mint_class());
-  ASSERT(!mint_class.IsNull());
-  const auto& mint_allocation_stub =
-      Code::ZoneHandle(StubCode::GetAllocationStubForClass(mint_class));
-  ASSERT(!mint_allocation_stub.IsNull());
-  Label done;
-
-  // Try whether it fits in a Smi.
-  __ movq(TMP, RAX);
-  __ SmiTag(RAX);
-  __ j(NO_OVERFLOW, &done, Assembler::kNearJump);
-
-  // Mint
-  // Backup result value (to avoid GC).
-  GenerateSaveInt64GCSafe(assembler, TMP);
-
-  // Allocate object (can call into runtime).
-  __ Call(mint_allocation_stub);
-
-  // Store result value.
-  GenerateLoadInt64GCSafe(assembler, TMP);
-  __ movq(FieldAddress(RAX, Mint::value_offset()), TMP);
-
-  __ Bind(&done);
-}
-
-// Takes a Dart double and converts it into a C double.
-//
-// Input parameters:
-//   Register reg : a Dart Null or Double
-// Output parameters:
-//   XmmRegister xmm_reg : a C double
-// Invariant: keeps ArgumentRegisters and other XmmArgumentRegisters intact
-static void GenerateMarshalDouble(Assembler* assembler,
-                                  Register reg,
-                                  XmmRegister xmm_reg) {
-  ASSERT((1 << reg & CallingConventions::kArgumentRegisters) == 0);
-
-  // Throw a Dart Exception on Null.
-  GenerateNotNullCheck(assembler, reg);
-
-  __ movq(reg, FieldAddress(reg, Double::value_offset()));
-  __ movq(xmm_reg, reg);
-}
-
-// Takes a C double and converts it into a Dart double.
-//
-// Input parameters:
-//   XMM0 : a C double
-// Output parameters:
-//   RAX : a Dart Double
-static void GenerateUnmarshalDouble(Assembler* assembler) {
-  const auto& double_class =
-      Class::ZoneHandle(Isolate::Current()->object_store()->double_class());
-  ASSERT(!double_class.IsNull());
-  const auto& double_allocation_stub =
-      Code::ZoneHandle(StubCode::GetAllocationStubForClass(double_class));
-  ASSERT(!double_allocation_stub.IsNull());
-
-  // Backup result value (to avoid GC).
-  __ movq(RAX, XMM0);
-  GenerateSaveInt64GCSafe(assembler, RAX);
-
-  // Allocate object (can call into runtime).
-  __ Call(double_allocation_stub);
-
-  // Store the result value.
-  GenerateLoadInt64GCSafe(assembler, TMP);
-  __ movq(FieldAddress(RAX, Double::value_offset()), TMP);
-}
-
-// Takes a Dart double and converts into a C float.
-//
-// Input parameters:
-//   Register reg : a Dart double
-// Output parameters:
-//   XmmRegister xxmReg : a C float
-// Invariant: keeps ArgumentRegisters and other XmmArgumentRegisters intact
-static void GenerateMarshalFloat(Assembler* assembler,
-                                 Register reg,
-                                 XmmRegister xmm_reg) {
-  ASSERT((1 << reg & CallingConventions::kArgumentRegisters) == 0);
-
-  GenerateMarshalDouble(assembler, reg, xmm_reg);
-
-  __ cvtsd2ss(xmm_reg, xmm_reg);
-}
-
-// Takes a C float and converts it into a Dart double.
-//
-// Input parameters:
-//   XMM0 : a C float
-// Output paramaters:
-//   RAX : a Dart Double
-static void GenerateUnmarshalFloat(Assembler* assembler) {
-  __ cvtss2sd(XMM0, XMM0);
-  GenerateUnmarshalDouble(assembler);
-}
-
-// Takes a Dart ffi.Pointer and converts it into a C pointer.
-//
-// Input parameters:
-//   Register reg : a Dart ffi.Pointer or Null
-// Output parameters:
-//   Register reg : a C pointer
-static void GenerateMarshalPointer(Assembler* assembler, Register reg) {
-  Label done, not_null;
-
-  __ CompareObject(reg, Object::null_object());
-  __ j(NOT_EQUAL, &not_null, Assembler::kNearJump);
-
-  // If null, the address is 0.
-  __ movq(reg, Immediate(0));
-  __ jmp(&done);
-
-  // If not null but a Pointer, load the address.
-  __ Bind(&not_null);
-  __ movq(reg, FieldAddress(reg, Pointer::address_offset()));
-  __ Bind(&done);
-}
-
-// Takes a C pointer and converts it into a Dart ffi.Pointer or Null.
-//
-// Input parameters:
-//   RAX : a C pointer
-// Outpot paramaters:
-//   RAX : a Dart ffi.Pointer or Null
-static void GenerateUnmarshalPointer(Assembler* assembler,
-                                     Address closure_dart,
-                                     const Class& pointer_class) {
-  Label done, not_null;
-  ASSERT(!pointer_class.IsNull());
-  const auto& pointer_allocation_stub =
-      Code::ZoneHandle(StubCode::GetAllocationStubForClass(pointer_class));
-  ASSERT(!pointer_allocation_stub.IsNull());
-
-  // If the address is 0, return a Dart Null.
-  __ cmpq(RAX, Immediate(0));
-  __ j(NOT_EQUAL, &not_null, Assembler::kNearJump);
-  __ LoadObject(RAX, Object::null_object());
-  __ jmp(&done);
-
-  // Backup result value (to avoid GC).
-  __ Bind(&not_null);
-  GenerateSaveInt64GCSafe(assembler, RAX);
-
-  // Allocate object (can call into runtime).
-  __ movq(TMP, closure_dart);
-  __ movq(TMP, FieldAddress(TMP, Closure::function_offset()));
-  __ movq(TMP, FieldAddress(TMP, Function::result_type_offset()));
-  __ pushq(FieldAddress(TMP, Type::arguments_offset()));
-  __ Call(pointer_allocation_stub);
-  __ popq(TMP);  // Pop type arguments.
-
-  // Store the result value.
-  GenerateLoadInt64GCSafe(assembler, RDX);
-  __ movq(FieldAddress(RAX, Pointer::address_offset()), RDX);
-  __ Bind(&done);
-}
-
-static void GenerateMarshalArgument(Assembler* assembler,
-                                    const AbstractType& arg_type,
-                                    Register reg,
-                                    XmmRegister xmm_reg) {
-  switch (arg_type.type_class_id()) {
-    case kFfiInt8Cid:
-    case kFfiInt16Cid:
-    case kFfiInt32Cid:
-    case kFfiInt64Cid:
-    case kFfiUint8Cid:
-    case kFfiUint16Cid:
-    case kFfiUint32Cid:
-    case kFfiUint64Cid:
-    case kFfiIntPtrCid:
-      // TODO(dacoharkes): Truncate and sign extend 8 bit and 16 bit, and write
-      // tests. https://github.com/dart-lang/sdk/issues/35787
-      GenerateMarshalInt64(assembler, reg);
-      return;
-    case kFfiFloatCid:
-      GenerateMarshalFloat(assembler, reg, xmm_reg);
-      return;
-    case kFfiDoubleCid:
-      GenerateMarshalDouble(assembler, reg, xmm_reg);
-      return;
-    case kFfiPointerCid:
-    default:  // Subtypes of Pointer.
-      GenerateMarshalPointer(assembler, reg);
-      return;
-  }
-}
-
-static void GenerateUnmarshalResult(Assembler* assembler,
-                                    const AbstractType& result_type,
-                                    Address closure_dart) {
-  switch (result_type.type_class_id()) {
-    case kFfiInt8Cid:
-    case kFfiInt16Cid:
-    case kFfiInt32Cid:
-    case kFfiInt64Cid:
-    case kFfiUint8Cid:
-    case kFfiUint16Cid:
-    case kFfiUint32Cid:
-    case kFfiUint64Cid:
-    case kFfiIntPtrCid:
-      GenerateUnmarshalInt64(assembler);
-      return;
-    case kFfiFloatCid:
-      GenerateUnmarshalFloat(assembler);
-      return;
-    case kFfiDoubleCid:
-      GenerateUnmarshalDouble(assembler);
-      return;
-    case kFfiPointerCid:
-    default:  // subtypes of Pointer
-      break;
-  }
-  Class& cls = Class::ZoneHandle(Thread::Current()->zone(),
-                                 Type::Cast(result_type).type_class());
-
-  GenerateUnmarshalPointer(assembler, closure_dart, cls);
-}
-
-// Generates a assembly for dart:ffi trampolines:
-// - marshal arguments
-// - put the arguments in registers and on the c stack
-// - invoke the c function
-// - (c result register is the same as dart, so keep in place)
-// - unmarshal c result
-// - return
-//
-// Input parameters:
-//   RSP + kWordSize *  num_arguments      : closure.
-//   RSP + kWordSize * (num_arguments - 1) : arg 1.
-//   RSP + kWordSize * (num_arguments - 2) : arg 2.
-//   RSP + kWordSize                       : arg n.
-// After entering stub:
-//   RBP = RSP (before stub) - kWordSize
-//   RBP + kWordSize * (num_arguments + 1) : closure.
-//   RBP + kWordSize *  num_arguments      : arg 1.
-//   RBP + kWordSize * (num_arguments - 1) : arg 2.
-//   RBP + kWordSize *  2                  : arg n.
-//
-// TODO(dacoharkes): Test truncation on non 64 bits ints and floats.
-void GenerateFfiTrampoline(Assembler* assembler, const Function& signature) {
-  ZoneGrowableArray<Representation>* arg_representations =
-      ArgumentRepresentations(signature);
-  ZoneGrowableArray<Location>* arg_locations =
-      ArgumentLocations(*arg_representations);
-
-  intptr_t num_dart_arguments = signature.num_fixed_parameters();
-  intptr_t num_arguments = num_dart_arguments - 1;  // ignore closure
-
-  __ EnterStubFrame();
-
-  // Save exit frame information to enable stack walking as we are about
-  // to transition to Dart VM C++ code.
-  __ movq(Address(THR, Thread::top_exit_frame_info_offset()), RBP);
-
-#if defined(DEBUG)
-  {
-    Label ok;
-    // Check that we are always entering from Dart code.
-    __ movq(TMP, Immediate(VMTag::kDartCompiledTagId));
-    __ cmpq(TMP, Assembler::VMTagAddress());
-    __ j(EQUAL, &ok, Assembler::kNearJump);
-    __ Stop("Not coming from Dart code.");
-    __ Bind(&ok);
-  }
-#endif
-
-  // Reserve space for arguments and align frame before entering C++ world.
-  __ subq(RSP, Immediate(NumStackArguments(*arg_locations) * kWordSize));
-  if (OS::ActivationFrameAlignment() > 1) {
-    __ andq(RSP, Immediate(~(OS::ActivationFrameAlignment() - 1)));
-  }
-
-  // Prepare address for calling the C function.
-  Address closure_dart = Address(RBP, (num_dart_arguments + 1) * kWordSize);
-  __ movq(RBX, closure_dart);
-  __ movq(RBX, FieldAddress(RBX, Closure::context_offset()));
-  __ movq(RBX, FieldAddress(RBX, Context::variable_offset(0)));
-  GenerateMarshalInt64(assembler, RBX);  // Address is a Smi or Mint.
-
-  // Marshal arguments and store in the right register.
-  for (intptr_t i = 0; i < num_arguments; i++) {
-    Representation rep = arg_representations->At(i);
-    Location loc = arg_locations->At(i);
-
-    // We do marshalling in the the target register or in RAX.
-    Register reg = loc.IsRegister() ? loc.reg() : RAX;
-    // For doubles and floats we use target xmm register or first non param reg.
-    FpuRegister xmm_reg = loc.IsFpuRegister()
-                              ? loc.fpu_reg()
-                              : CallingConventions::xmmFirstNonParameterReg;
-
-    // Load parameter from Dart stack.
-    __ movq(reg, Address(RBP, (num_arguments + 1 - i) * kWordSize));
-
-    // Marshal argument.
-    AbstractType& arg_type =
-        AbstractType::Handle(signature.ParameterTypeAt(i + 1));
-    GenerateMarshalArgument(assembler, arg_type, reg, xmm_reg);
-
-    // Store marshalled argument where c expects value.
-    if (loc.IsStackSlot()) {
-      if (rep == kUnboxedDouble) {
-        __ movq(reg, xmm_reg);
-      }
-      __ movq(loc.ToStackSlotAddress(), reg);
-    }
-  }
-
-  // Mark that the thread is executing VM code.
-  __ movq(Assembler::VMTagAddress(), RBX);
-
-  __ CallCFunction(RBX);
-
-  // Mark that the thread is executing Dart code.
-  __ movq(Assembler::VMTagAddress(), Immediate(VMTag::kDartCompiledTagId));
-
-  // Unmarshal result.
-  AbstractType& return_type = AbstractType::Handle(signature.result_type());
-  GenerateUnmarshalResult(assembler, return_type, closure_dart);
-
-  // Reset exit frame information in Isolate structure.
-  __ movq(Address(THR, Thread::top_exit_frame_info_offset()), Immediate(0));
-
-  __ LeaveStubFrame();
-
-  __ ret();
-}
-
-void GenerateFfiInverseTrampoline(Assembler* assembler,
-                                  const Function& signature,
-                                  void* dart_entry_point) {
-  ZoneGrowableArray<Representation>* arg_representations =
-      ArgumentRepresentations(signature);
-  ZoneGrowableArray<Location>* arg_locations =
-      ArgumentLocations(*arg_representations);
-
-  intptr_t num_dart_arguments = signature.num_fixed_parameters();
-  intptr_t num_arguments = num_dart_arguments - 1;  // Ignore closure.
-
-  // TODO(dacoharkes): Implement this.
-  // https://github.com/dart-lang/sdk/issues/35761
-  // Look at StubCode::GenerateInvokeDartCodeStub.
-
-  __ int3();
-
-  for (intptr_t i = 0; i < num_arguments; i++) {
-    Register reg = arg_locations->At(i).reg();
-    __ SmiTag(reg);
-  }
-
-  __ movq(RBX, Immediate(reinterpret_cast<intptr_t>(dart_entry_point)));
-
-  __ int3();
-
-  __ call(RBX);
-
-  __ int3();
-}
-
-}  // namespace dart
-
-#endif  // defined(TARGET_ARCH_X64) && !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/flag_list.h b/runtime/vm/flag_list.h
index edd0226..d7b662d 100644
--- a/runtime/vm/flag_list.h
+++ b/runtime/vm/flag_list.h
@@ -57,8 +57,6 @@
     "Debugger support async functions.")                                       \
   P(background_compilation, bool, USING_MULTICORE,                             \
     "Run optimizing compilation in background")                                \
-  R(background_compilation_stop_alot, false, bool, false,                      \
-    "Stress test system: stop background compiler often.")                     \
   P(causal_async_stacks, bool, !USING_PRODUCT, "Improved async stacks")        \
   P(collect_code, bool, true, "Attempt to GC infrequently used code.")         \
   P(collect_dynamic_function_names, bool, true,                                \
@@ -127,6 +125,9 @@
     "Initial size of new gen semi space in MB")                                \
   P(optimization_counter_threshold, int, 30000,                                \
     "Function's usage-counter value before it is optimized, -1 means never")   \
+  R(randomize_optimization_counter, false, bool, false,                        \
+    "Randomize optimization counter thresholds on a per-function basis (for "  \
+    "testing).")                                                               \
   P(optimization_level, int, 2,                                                \
     "Optimization level: 1 (favor size), 2 (default), 3 (favor speed)")        \
   P(old_gen_heap_size, int, kDefaultMaxOldGenHeapSize,                         \
diff --git a/runtime/vm/frame_layout.h b/runtime/vm/frame_layout.h
index 53ddcc7..3242353 100644
--- a/runtime/vm/frame_layout.h
+++ b/runtime/vm/frame_layout.h
@@ -23,9 +23,13 @@
   // The offset (in words) from FP to the last fixed object.
   int last_fixed_object_from_fp;
 
-  // The offset (in words) from FP to the first local.
+  // The offset (in words) from FP to the slot past the last parameter.
   int param_end_from_fp;
 
+  // The offset (in words) from SP on entry (before frame is setup) to
+  // the last parameter.
+  int last_param_from_entry_sp;
+
   // The offset (in words) from FP to the first local.
   int first_local_from_fp;
 
diff --git a/runtime/vm/guard_field_test.cc b/runtime/vm/guard_field_test.cc
index bc30357..be010ce 100644
--- a/runtime/vm/guard_field_test.cc
+++ b/runtime/vm/guard_field_test.cc
@@ -224,8 +224,8 @@
       "}\n";
   Dart_Handle lib = TestCase::LoadTestScript(script_chars, NULL);
   Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
-  TransitionNativeToVM transition(thread);
   EXPECT_VALID(result);
+  TransitionNativeToVM transition(thread);
   Field& f1 = Field::ZoneHandle(LookupField(lib, "A", "f1"));
   Field& f2 = Field::ZoneHandle(LookupField(lib, "A", "f2"));
   Field& f3 = Field::ZoneHandle(LookupField(lib, "A", "f3"));
diff --git a/runtime/vm/handles_test.cc b/runtime/vm/handles_test.cc
index 8dcb1ba..142e147 100644
--- a/runtime/vm/handles_test.cc
+++ b/runtime/vm/handles_test.cc
@@ -92,7 +92,10 @@
     TransitionNativeToVM transition(thread);
     StackZone sz(thread);
     handle = reinterpret_cast<Dart_Handle>(&Smi::ZoneHandle(Smi::New(1)));
-    EXPECT_VALID(handle);
+    {
+      TransitionVMToNative to_native(thread);
+      EXPECT_VALID(handle);
+    }
   }
   EXPECT(!Api::IsValid(handle));
 
@@ -103,7 +106,10 @@
       TransitionNativeToVM transition(thread);
       HANDLESCOPE(thread);
       handle = reinterpret_cast<Dart_Handle>(&Smi::Handle(Smi::New(1)));
-      EXPECT_VALID(handle);
+      {
+        TransitionVMToNative to_native(thread);
+        EXPECT_VALID(handle);
+      }
     }
     Dart_ExitScope();
   }
diff --git a/runtime/vm/hash_table.h b/runtime/vm/hash_table.h
index 250a8d0..cd05fde 100644
--- a/runtime/vm/hash_table.h
+++ b/runtime/vm/hash_table.h
@@ -302,7 +302,7 @@
   }
   void UpdateCollisions(intptr_t collisions) const {
     if (KeyTraits::ReportStats()) {
-      if (data_->raw()->IsVMHeapObject()) {
+      if (data_->raw()->InVMIsolateHeap()) {
         return;
       }
       AdjustSmiValueAt(kNumProbesIndex, collisions + 1);
diff --git a/runtime/vm/heap/become.cc b/runtime/vm/heap/become.cc
index 1b1823a..d6feee1 100644
--- a/runtime/vm/heap/become.cc
+++ b/runtime/vm/heap/become.cc
@@ -193,14 +193,14 @@
   OS::PrintErr("BEFORE ADDRESS: %p\n", before_obj);
   OS::PrintErr("BEFORE IS HEAP OBJECT: %s",
                before_obj->IsHeapObject() ? "YES" : "NO");
-  OS::PrintErr("BEFORE IS VM HEAP OBJECT: %s",
-               before_obj->IsVMHeapObject() ? "YES" : "NO");
+  OS::PrintErr("BEFORE IN VMISOLATE HEAP OBJECT: %s",
+               before_obj->InVMIsolateHeap() ? "YES" : "NO");
 
   OS::PrintErr("AFTER ADDRESS: %p\n", after_obj);
   OS::PrintErr("AFTER IS HEAP OBJECT: %s",
                after_obj->IsHeapObject() ? "YES" : "NO");
-  OS::PrintErr("AFTER IS VM HEAP OBJECT: %s",
-               after_obj->IsVMHeapObject() ? "YES" : "NO");
+  OS::PrintErr("AFTER IN VMISOLATE HEAP OBJECT: %s",
+               after_obj->InVMIsolateHeap() ? "YES" : "NO");
 
   if (before_obj->IsHeapObject()) {
     OS::PrintErr("BEFORE OBJECT CLASS ID=%" Pd "\n", before_obj->GetClassId());
@@ -240,7 +240,7 @@
       CrashDump(before_obj, after_obj);
       FATAL("become: Cannot become immediates");
     }
-    if (before_obj->IsVMHeapObject()) {
+    if (before_obj->InVMIsolateHeap()) {
       CrashDump(before_obj, after_obj);
       FATAL("become: Cannot forward VM heap objects");
     }
diff --git a/runtime/vm/heap/compactor.cc b/runtime/vm/heap/compactor.cc
index e3073a0..06ac415 100644
--- a/runtime/vm/heap/compactor.cc
+++ b/runtime/vm/heap/compactor.cc
@@ -162,9 +162,9 @@
 // Slides live objects down past free gaps, updates pointers and frees empty
 // pages. Keeps cursors pointing to the next free and next live chunks, and
 // repeatedly moves the next live chunk to the next free chunk, one block at a
-// time, keeping blocks from spanning page boundries (see ForwardingBlock). Free
-// space at the end of a page that is too small for the next block is added to
-// the freelist.
+// time, keeping blocks from spanning page boundaries (see ForwardingBlock).
+// Free space at the end of a page that is too small for the next block is
+// added to the freelist.
 void GCCompactor::Compact(HeapPage* pages,
                           FreeList* freelist,
                           Mutex* pages_lock) {
@@ -246,6 +246,34 @@
     barrier.Exit();
   }
 
+  // Update inner pointers in typed data views (needs to be done after all
+  // threads are done with sliding since we need to access fields of the
+  // view's backing store)
+  //
+  // (If the sliding compactor was single-threaded we could do this during the
+  // sliding phase: The class id of the backing store can be either accessed by
+  // looking at the already-slided-object or the not-yet-slided object. Though
+  // with parallel sliding there is no safe way to access the backing store
+  // object header.)
+  {
+    TIMELINE_FUNCTION_GC_DURATION(thread(),
+                                  "ForwardTypedDataViewInternalPointers");
+    const intptr_t length = typed_data_views_.length();
+    for (intptr_t i = 0; i < length; ++i) {
+      auto raw_view = typed_data_views_[i];
+      const classid_t cid = raw_view->ptr()->typed_data_->GetClassIdMayBeSmi();
+
+      // If we have external typed data we can simply return, since the backing
+      // store lives in C-heap and will not move. Otherwise we have to update
+      // the inner pointer.
+      if (RawObject::IsTypedDataClassId(cid)) {
+        raw_view->RecomputeDataFieldForInternalTypedData();
+      } else {
+        ASSERT(RawObject::IsExternalTypedDataClassId(cid));
+      }
+    }
+  }
+
   for (intptr_t task_index = 0; task_index < num_tasks; task_index++) {
     ASSERT(tails[task_index] != NULL);
   }
@@ -394,7 +422,7 @@
   uword current = page->object_start();
   uword end = page->object_end();
 
-  ForwardingPage* forwarding_page = page->AllocateForwardingPage();
+  auto forwarding_page = page->AllocateForwardingPage();
   while (current < end) {
     current = PlanBlock(current, forwarding_page);
   }
@@ -404,7 +432,7 @@
   uword current = page->object_start();
   uword end = page->object_end();
 
-  ForwardingPage* forwarding_page = page->forwarding_page();
+  auto forwarding_page = page->forwarding_page();
   while (current < end) {
     current = SlideBlock(current, forwarding_page);
   }
@@ -483,6 +511,10 @@
         // Slide the object down.
         memmove(reinterpret_cast<void*>(new_addr),
                 reinterpret_cast<void*>(old_addr), size);
+
+        if (RawObject::IsTypedDataClassId(new_obj->GetClassId())) {
+          reinterpret_cast<RawTypedData*>(new_obj)->RecomputeDataField();
+        }
       }
       new_obj->ClearMarkBit();
       new_obj->VisitPointers(compactor_);
@@ -566,6 +598,40 @@
   *ptr = new_target;
 }
 
+void GCCompactor::VisitTypedDataViewPointers(RawTypedDataView* view,
+                                             RawObject** first,
+                                             RawObject** last) {
+  // First we forward all fields of the typed data view.
+  RawObject* old_backing = view->ptr()->typed_data_;
+  VisitPointers(first, last);
+  RawObject* new_backing = view->ptr()->typed_data_;
+
+  const bool backing_moved = old_backing != new_backing;
+  if (backing_moved) {
+    // The backing store moved, so we *might* need to update the view's inner
+    // pointer. If the backing store is internal typed data we *have* to update
+    // it, otherwise (in case of external typed data) we don't have to.
+    //
+    // Unfortunately we cannot find out whether the backing store is internal
+    // or external during sliding phase: Even though we know the old and new
+    // location of the backing store another thread might be responsible for
+    // moving it and we have no way to tell when it got moved.
+    //
+    // So instead we queue all those views up and fix their inner pointer in a
+    // final phase after compaction.
+    MutexLocker ml(&typed_data_view_mutex_);
+    typed_data_views_.Add(view);
+  } else {
+    // The backing store didn't move, we therefore don't need to update the
+    // inner pointer.
+    if (view->ptr()->data_ == 0) {
+      ASSERT(ValueFromRawSmi(view->ptr()->offset_in_bytes_) == 0 &&
+             ValueFromRawSmi(view->ptr()->length_) == 0 &&
+             view->ptr()->typed_data_ == Object::null());
+    }
+  }
+}
+
 // N.B.: This pointer visitor is not idempotent. We must take care to visit
 // each pointer exactly once.
 void GCCompactor::VisitPointers(RawObject** first, RawObject** last) {
diff --git a/runtime/vm/heap/compactor.h b/runtime/vm/heap/compactor.h
index 903bf0e..c55eb9a 100644
--- a/runtime/vm/heap/compactor.h
+++ b/runtime/vm/heap/compactor.h
@@ -5,6 +5,8 @@
 #ifndef RUNTIME_VM_HEAP_COMPACTOR_H_
 #define RUNTIME_VM_HEAP_COMPACTOR_H_
 
+#include "platform/growable_array.h"
+
 #include "vm/allocation.h"
 #include "vm/dart_api_state.h"
 #include "vm/globals.h"
@@ -32,9 +34,14 @@
   void Compact(HeapPage* pages, FreeList* freelist, Mutex* mutex);
 
  private:
+  friend class CompactorTask;
+
   void SetupImagePageBoundaries();
   void ForwardStackPointers();
   void ForwardPointer(RawObject** ptr);
+  void VisitTypedDataViewPointers(RawTypedDataView* view,
+                                  RawObject** first,
+                                  RawObject** last);
   void VisitPointers(RawObject** first, RawObject** last);
   void VisitHandle(uword addr);
 
@@ -48,6 +55,11 @@
   // {instructions, data} x {vm isolate, current isolate, shared}
   static const intptr_t kMaxImagePages = 6;
   ImagePageRange image_page_ranges_[kMaxImagePages];
+
+  // The typed data views whose inner pointer must be updated after sliding is
+  // complete.
+  Mutex typed_data_view_mutex_;
+  MallocGrowableArray<RawTypedDataView*> typed_data_views_;
 };
 
 }  // namespace dart
diff --git a/runtime/vm/heap/freelist.cc b/runtime/vm/heap/freelist.cc
index cacb13e..9c2aca1 100644
--- a/runtime/vm/heap/freelist.cc
+++ b/runtime/vm/heap/freelist.cc
@@ -202,17 +202,6 @@
   }
 }
 
-intptr_t FreeList::IndexForSize(intptr_t size) {
-  ASSERT(size >= kObjectAlignment);
-  ASSERT(Utils::IsAligned(size, kObjectAlignment));
-
-  intptr_t index = size >> kObjectAlignmentLog2;
-  if (index >= kNumLists) {
-    index = kNumLists;
-  }
-  return index;
-}
-
 void FreeList::EnqueueElement(FreeListElement* element, intptr_t index) {
   FreeListElement* next = free_lists_[index];
   if (next == NULL && index != kNumLists) {
@@ -224,23 +213,6 @@
   free_lists_[index] = element;
 }
 
-FreeListElement* FreeList::DequeueElement(intptr_t index) {
-  FreeListElement* result = free_lists_[index];
-  FreeListElement* next = result->next();
-  if (next == NULL && index != kNumLists) {
-    intptr_t size = index << kObjectAlignmentLog2;
-    if (size == last_free_small_size_) {
-      // Note: This is -1 * kObjectAlignment if no other small sizes remain.
-      last_free_small_size_ =
-          free_map_.ClearLastAndFindPrevious(index) * kObjectAlignment;
-    } else {
-      free_map_.Set(index, false);
-    }
-  }
-  free_lists_[index] = next;
-  return result;
-}
-
 intptr_t FreeList::LengthLocked(int index) const {
   DEBUG_ASSERT(mutex_->IsOwnedByCurrentThread());
   ASSERT(index >= 0);
@@ -398,24 +370,4 @@
   return NULL;
 }
 
-uword FreeList::TryAllocateSmallLocked(intptr_t size) {
-  DEBUG_ASSERT(mutex_->IsOwnedByCurrentThread());
-  if (size > last_free_small_size_) {
-    return 0;
-  }
-  int index = IndexForSize(size);
-  if (index != kNumLists && free_map_.Test(index)) {
-    return reinterpret_cast<uword>(DequeueElement(index));
-  }
-  if ((index + 1) < kNumLists) {
-    intptr_t next_index = free_map_.Next(index + 1);
-    if (next_index != -1) {
-      FreeListElement* element = DequeueElement(next_index);
-      SplitElementAfterAndEnqueue(element, size, false);
-      return reinterpret_cast<uword>(element);
-    }
-  }
-  return 0;
-}
-
 }  // namespace dart
diff --git a/runtime/vm/heap/freelist.h b/runtime/vm/heap/freelist.h
index 552c7a2..171ff1c 100644
--- a/runtime/vm/heap/freelist.h
+++ b/runtime/vm/heap/freelist.h
@@ -96,18 +96,60 @@
 
   // Allocates locked and unprotected memory, but only from small elements
   // (i.e., fixed size lists).
-  uword TryAllocateSmallLocked(intptr_t size);
+  uword TryAllocateSmallLocked(intptr_t size) {
+    DEBUG_ASSERT(mutex_->IsOwnedByCurrentThread());
+    if (size > last_free_small_size_) {
+      return 0;
+    }
+    int index = IndexForSize(size);
+    if (index != kNumLists && free_map_.Test(index)) {
+      return reinterpret_cast<uword>(DequeueElement(index));
+    }
+    if ((index + 1) < kNumLists) {
+      intptr_t next_index = free_map_.Next(index + 1);
+      if (next_index != -1) {
+        FreeListElement* element = DequeueElement(next_index);
+        SplitElementAfterAndEnqueue(element, size, false);
+        return reinterpret_cast<uword>(element);
+      }
+    }
+    return 0;
+  }
 
  private:
   static const int kNumLists = 128;
   static const intptr_t kInitialFreeListSearchBudget = 1000;
 
-  static intptr_t IndexForSize(intptr_t size);
+  static intptr_t IndexForSize(intptr_t size) {
+    ASSERT(size >= kObjectAlignment);
+    ASSERT(Utils::IsAligned(size, kObjectAlignment));
+
+    intptr_t index = size >> kObjectAlignmentLog2;
+    if (index >= kNumLists) {
+      index = kNumLists;
+    }
+    return index;
+  }
 
   intptr_t LengthLocked(int index) const;
 
   void EnqueueElement(FreeListElement* element, intptr_t index);
-  FreeListElement* DequeueElement(intptr_t index);
+  FreeListElement* DequeueElement(intptr_t index) {
+    FreeListElement* result = free_lists_[index];
+    FreeListElement* next = result->next();
+    if (next == NULL && index != kNumLists) {
+      intptr_t size = index << kObjectAlignmentLog2;
+      if (size == last_free_small_size_) {
+        // Note: This is -1 * kObjectAlignment if no other small sizes remain.
+        last_free_small_size_ =
+            free_map_.ClearLastAndFindPrevious(index) * kObjectAlignment;
+      } else {
+        free_map_.Set(index, false);
+      }
+    }
+    free_lists_[index] = next;
+    return result;
+  }
 
   void SplitElementAfterAndEnqueue(FreeListElement* element,
                                    intptr_t size,
diff --git a/runtime/vm/heap/heap.cc b/runtime/vm/heap/heap.cc
index b6b1960..10f20bb 100644
--- a/runtime/vm/heap/heap.cc
+++ b/runtime/vm/heap/heap.cc
@@ -83,8 +83,6 @@
 
 uword Heap::AllocateNew(intptr_t size) {
   ASSERT(Thread::Current()->no_safepoint_scope_depth() == 0);
-  // Currently, only the Dart thread may allocate in new space.
-  isolate()->AssertCurrentThreadIsMutator();
   Thread* thread = Thread::Current();
   uword addr = new_space_.TryAllocateInTLAB(thread, size);
   if (addr != 0) {
@@ -210,7 +208,7 @@
 
 void Heap::PromoteExternal(intptr_t cid, intptr_t size) {
   new_space_.FreeExternal(size);
-  old_space_.AllocateExternal(cid, size);
+  old_space_.PromoteExternal(cid, size);
 }
 
 bool Heap::Contains(uword addr) const {
@@ -729,6 +727,18 @@
                        : old_space_.ExternalInWords();
 }
 
+int64_t Heap::TotalUsedInWords() const {
+  return UsedInWords(kNew) + UsedInWords(kOld);
+}
+
+int64_t Heap::TotalCapacityInWords() const {
+  return CapacityInWords(kNew) + CapacityInWords(kOld);
+}
+
+int64_t Heap::TotalExternalInWords() const {
+  return ExternalInWords(kNew) + ExternalInWords(kOld);
+}
+
 int64_t Heap::GCTimeInMicros(Space space) const {
   if (space == kNew) {
     return new_space_.gc_time_micros();
@@ -853,6 +863,14 @@
     old_space_.PrintToJSONObject(object);
   }
 }
+
+void Heap::PrintMemoryUsageJSON(JSONStream* stream) const {
+  JSONObject jsobj(stream);
+  jsobj.AddProperty("type", "MemoryUsage");
+  jsobj.AddProperty64("heapUsage", TotalUsedInWords() * kWordSize);
+  jsobj.AddProperty64("heapCapacity", TotalCapacityInWords() * kWordSize);
+  jsobj.AddProperty64("externalUsage", TotalExternalInWords() * kWordSize);
+}
 #endif  // PRODUCT
 
 void Heap::RecordBeforeGC(GCType type, GCReason reason) {
@@ -1016,14 +1034,14 @@
 
 WritableVMIsolateScope::WritableVMIsolateScope(Thread* thread)
     : ThreadStackResource(thread) {
-  if (FLAG_write_protect_vm_isolate) {
+  if (FLAG_write_protect_code && FLAG_write_protect_vm_isolate) {
     Dart::vm_isolate()->heap()->WriteProtect(false);
   }
 }
 
 WritableVMIsolateScope::~WritableVMIsolateScope() {
   ASSERT(Dart::vm_isolate()->heap()->UsedInWords(Heap::kNew) == 0);
-  if (FLAG_write_protect_vm_isolate) {
+  if (FLAG_write_protect_code && FLAG_write_protect_vm_isolate) {
     Dart::vm_isolate()->heap()->WriteProtect(true);
   }
 }
diff --git a/runtime/vm/heap/heap.h b/runtime/vm/heap/heap.h
index 7cdb876..628ab15 100644
--- a/runtime/vm/heap/heap.h
+++ b/runtime/vm/heap/heap.h
@@ -180,6 +180,10 @@
   int64_t UsedInWords(Space space) const;
   int64_t CapacityInWords(Space space) const;
   int64_t ExternalInWords(Space space) const;
+
+  int64_t TotalUsedInWords() const;
+  int64_t TotalCapacityInWords() const;
+  int64_t TotalExternalInWords() const;
   // Return the amount of GCing in microseconds.
   int64_t GCTimeInMicros(Space space) const;
 
@@ -268,6 +272,10 @@
 #ifndef PRODUCT
   void PrintToJSONObject(Space space, JSONObject* object) const;
 
+  // Returns a JSON object with total memory usage statistics for both new and
+  // old space combined.
+  void PrintMemoryUsageJSON(JSONStream* stream) const;
+
   // The heap map contains the sizes and class ids for the objects in each page.
   void PrintHeapMapToJSONStream(Isolate* isolate, JSONStream* stream) {
     old_space_.PrintHeapMapToJSONStream(isolate, stream);
@@ -400,6 +408,7 @@
   friend class HeapIterationScope;    // VisitObjects
   friend class ProgramVisitor;        // VisitObjectsImagePages
   friend class Serializer;            // VisitObjectsImagePages
+  friend class HeapTestHelper;
 
   DISALLOW_COPY_AND_ASSIGN(Heap);
 };
diff --git a/runtime/vm/heap/heap_test.cc b/runtime/vm/heap/heap_test.cc
index af5236c..c79848e 100644
--- a/runtime/vm/heap/heap_test.cc
+++ b/runtime/vm/heap/heap_test.cc
@@ -697,6 +697,49 @@
   EXPECT_EQ(size_before, size_after);
 }
 
+#if !defined(PRODUCT)
+class HeapTestHelper {
+ public:
+  static void Scavenge(Thread* thread) {
+    thread->heap()->CollectNewSpaceGarbage(thread, Heap::kDebugging);
+  }
+  static void MarkSweep(Thread* thread) {
+    thread->heap()->CollectOldSpaceGarbage(thread, Heap::kMarkSweep,
+                                           Heap::kDebugging);
+    thread->heap()->WaitForMarkerTasks(thread);
+    thread->heap()->WaitForSweeperTasks(thread);
+  }
+};
+
+ISOLATE_UNIT_TEST_CASE(ExternalAllocationStats) {
+  Isolate* isolate = thread->isolate();
+  Heap* heap = thread->heap();
+
+  Array& old = Array::Handle(Array::New(100, Heap::kOld));
+  Array& neu = Array::Handle();
+  for (intptr_t i = 0; i < 100; i++) {
+    neu = Array::New(1, Heap::kNew);
+    FinalizablePersistentHandle::New(isolate, neu, NULL, NoopFinalizer, 1 * MB);
+    old.SetAt(i, neu);
+
+    if ((i % 4) == 0) {
+      HeapTestHelper::MarkSweep(thread);
+    } else {
+      HeapTestHelper::Scavenge(thread);
+    }
+
+    ClassHeapStats* stats = ClassHeapStatsTestHelper::GetHeapStatsForCid(
+        isolate->class_table(), kArrayCid);
+    EXPECT_LE(
+        stats->post_gc.old_external_size + stats->recent.old_external_size,
+        heap->old_space()->ExternalInWords() * kWordSize);
+    EXPECT_LE(
+        stats->post_gc.new_external_size + stats->recent.new_external_size,
+        heap->new_space()->ExternalInWords() * kWordSize);
+  }
+}
+#endif  // !defined(PRODUCT)
+
 ISOLATE_UNIT_TEST_CASE(ArrayTruncationRaces) {
   // Alternate between allocating new lists and truncating.
   // For each list, the life cycle is
diff --git a/runtime/vm/heap/marker.cc b/runtime/vm/heap/marker.cc
index c246f43..7ff24be 100644
--- a/runtime/vm/heap/marker.cc
+++ b/runtime/vm/heap/marker.cc
@@ -316,17 +316,30 @@
     return raw_weak->VisitPointersNonvirtual(this);
   }
 
-  void FinalizeInstructions() {
+  void ProcessDeferredMarking() {
     RawObject* raw_obj;
     while ((raw_obj = deferred_work_list_.Pop()) != NULL) {
-      ASSERT(raw_obj->IsInstructions());
-      RawInstructions* instr = static_cast<RawInstructions*>(raw_obj);
-      if (TryAcquireMarkBit(instr)) {
-        intptr_t size = instr->HeapSize();
+      ASSERT(raw_obj->IsHeapObject() && raw_obj->IsOldObject());
+      // N.B. We are scanning the object even if it is already marked.
+      const intptr_t class_id = raw_obj->GetClassId();
+      intptr_t size;
+      if (class_id != kWeakPropertyCid) {
+        size = raw_obj->VisitPointersNonvirtual(this);
+      } else {
+        RawWeakProperty* raw_weak = static_cast<RawWeakProperty*>(raw_obj);
+        size = ProcessWeakProperty(raw_weak);
+      }
+      // Add the size only if we win the marking race to prevent
+      // double-counting.
+      if (TryAcquireMarkBit(raw_obj)) {
         marked_bytes_ += size;
-        NOT_IN_PRODUCT(UpdateLiveOld(kInstructionsCid, size));
+        NOT_IN_PRODUCT(UpdateLiveOld(class_id, size));
       }
     }
+  }
+
+  void FinalizeDeferredMarking() {
+    ProcessDeferredMarking();
     deferred_work_list_.Finalize();
   }
 
@@ -368,6 +381,10 @@
   }
 
   static bool TryAcquireMarkBit(RawObject* raw_obj) {
+    if (FLAG_write_protect_code && raw_obj->IsInstructions()) {
+      // A non-writable alias mapping may exist for instruction pages.
+      raw_obj = HeapPage::ToWritable(raw_obj);
+    }
     if (!sync) {
       raw_obj->SetMarkBitUnsynchronized();
       return true;
@@ -376,6 +393,7 @@
     }
   }
 
+  DART_FORCE_INLINE
   void MarkObject(RawObject* raw_obj) {
     // Fast exit if the raw object is immediate or in new space. No memory
     // access.
@@ -486,8 +504,9 @@
   isolate_->ReleaseStoreBuffers();
 
 #ifndef DART_PRECOMPILED_RUNTIME
-  if (isolate_->IsMutatorThreadScheduled()) {
-    Interpreter* interpreter = isolate_->mutator_thread()->interpreter();
+  Thread* mutator_thread = isolate_->mutator_thread();
+  if (mutator_thread != NULL) {
+    Interpreter* interpreter = mutator_thread->interpreter();
     if (interpreter != NULL) {
       interpreter->MajorGC();
     }
@@ -648,6 +667,8 @@
       // Phase 1: Iterate over roots and drain marking stack in tasks.
       marker_->IterateRoots(visitor_);
 
+      visitor_->ProcessDeferredMarking();
+
       bool more_to_mark = false;
       do {
         do {
@@ -701,7 +722,7 @@
         barrier_->Sync();
       } while (more_to_mark);
 
-      visitor_->FinalizeInstructions();
+      visitor_->FinalizeDeferredMarking();
 
       // Phase 2: Weak processing and follow-up marking on main thread.
       barrier_->Sync();
@@ -919,8 +940,9 @@
                                 skipped_code_functions);
       ResetRootSlices();
       IterateRoots(&mark);
+      mark.ProcessDeferredMarking();
       mark.DrainMarkingStack();
-      mark.FinalizeInstructions();
+      mark.FinalizeDeferredMarking();
       {
         TIMELINE_FUNCTION_GC_DURATION(thread, "ProcessWeakHandles");
         MarkingWeakVisitor mark_weak(thread);
diff --git a/runtime/vm/heap/pages.cc b/runtime/vm/heap/pages.cc
index 4ba70ca..5ef2454 100644
--- a/runtime/vm/heap/pages.cc
+++ b/runtime/vm/heap/pages.cc
@@ -57,11 +57,14 @@
 HeapPage* HeapPage::Allocate(intptr_t size_in_words,
                              PageType type,
                              const char* name) {
-  bool is_executable = (type == kExecutable);
-  // Create the new page executable (RWX) only if we're not in W^X mode
-  bool create_executable = !FLAG_write_protect_code && is_executable;
+#if defined(TARGET_ARCH_DBC)
+  bool executable = false;
+#else
+  bool executable = type == kExecutable;
+#endif
+
   VirtualMemory* memory = VirtualMemory::AllocateAligned(
-      size_in_words << kWordSizeLog2, kPageSize, create_executable, name);
+      size_in_words << kWordSizeLog2, kPageSize, executable, name);
   if (memory == NULL) {
     return NULL;
   }
@@ -214,7 +217,7 @@
 
   VirtualMemory::Protection prot;
   if (read_only) {
-    if (type_ == kExecutable) {
+    if ((type_ == kExecutable) && (memory_->AliasOffset() == 0)) {
       prot = VirtualMemory::kReadExecute;
     } else {
       prot = VirtualMemory::kReadOnly;
@@ -548,6 +551,11 @@
       heap_->isolate()->class_table()->UpdateAllocatedExternalOld(cid, size));
 }
 
+void PageSpace::PromoteExternal(intptr_t cid, intptr_t size) {
+  intptr_t size_in_words = size >> kWordSizeLog2;
+  AtomicOperations::IncrementBy(&(usage_.external_in_words), size_in_words);
+}
+
 void PageSpace::FreeExternal(intptr_t size) {
   intptr_t size_in_words = size >> kWordSizeLog2;
   AtomicOperations::DecrementBy(&(usage_.external_in_words), size_in_words);
@@ -1274,36 +1282,28 @@
   }
 }
 
-uword PageSpace::TryAllocateDataBumpInternal(intptr_t size,
-                                             GrowthPolicy growth_policy,
-                                             bool is_locked) {
+uword PageSpace::TryAllocateDataBumpLocked(intptr_t size) {
   ASSERT(size >= kObjectAlignment);
   ASSERT(Utils::IsAligned(size, kObjectAlignment));
   intptr_t remaining = bump_end_ - bump_top_;
-  if (remaining < size) {
+  if (UNLIKELY(remaining < size)) {
     // Checking this first would be logical, but needlessly slow.
     if (size >= kAllocatablePageSize) {
-      return is_locked ? TryAllocateDataLocked(size, growth_policy)
-                       : TryAllocate(size, HeapPage::kData, growth_policy);
+      return TryAllocateDataLocked(size, kForceGrowth);
     }
     FreeListElement* block =
-        is_locked ? freelist_[HeapPage::kData].TryAllocateLargeLocked(size)
-                  : freelist_[HeapPage::kData].TryAllocateLarge(size);
+        freelist_[HeapPage::kData].TryAllocateLargeLocked(size);
     if (block == NULL) {
       // Allocating from a new page (if growth policy allows) will have the
       // side-effect of populating the freelist with a large block. The next
       // bump allocation request will have a chance to consume that block.
       // TODO(koda): Could take freelist lock just once instead of twice.
-      return TryAllocateInFreshPage(size, HeapPage::kData, growth_policy,
-                                    is_locked);
+      return TryAllocateInFreshPage(size, HeapPage::kData, kForceGrowth,
+                                    true /* is_locked*/);
     }
     intptr_t block_size = block->HeapSize();
     if (remaining > 0) {
-      if (is_locked) {
-        freelist_[HeapPage::kData].FreeLocked(bump_top_, remaining);
-      } else {
-        freelist_[HeapPage::kData].Free(bump_top_, remaining);
-      }
+      freelist_[HeapPage::kData].FreeLocked(bump_top_, remaining);
     }
     bump_top_ = reinterpret_cast<uword>(block);
     bump_end_ = bump_top_ + block_size;
@@ -1312,8 +1312,11 @@
   ASSERT(remaining >= size);
   uword result = bump_top_;
   bump_top_ += size;
-  AtomicOperations::IncrementBy(&(usage_.used_in_words),
-                                (size >> kWordSizeLog2));
+
+  // No need for atomic operation: This is either running during a scavenge or
+  // isolate snapshot loading.
+  usage_.used_in_words += (size >> kWordSizeLog2);
+
 // Note: Remaining block is unwalkable until MakeIterable is called.
 #ifdef DEBUG
   if (bump_top_ < bump_end_) {
@@ -1325,28 +1328,17 @@
   return result;
 }
 
-uword PageSpace::TryAllocateDataBump(intptr_t size,
-                                     GrowthPolicy growth_policy) {
-  return TryAllocateDataBumpInternal(size, growth_policy, false);
-}
-
-uword PageSpace::TryAllocateDataBumpLocked(intptr_t size,
-                                           GrowthPolicy growth_policy) {
-  return TryAllocateDataBumpInternal(size, growth_policy, true);
-}
-
-uword PageSpace::TryAllocatePromoLocked(intptr_t size,
-                                        GrowthPolicy growth_policy) {
+uword PageSpace::TryAllocatePromoLocked(intptr_t size) {
   FreeList* freelist = &freelist_[HeapPage::kData];
   uword result = freelist->TryAllocateSmallLocked(size);
   if (result != 0) {
-    AtomicOperations::IncrementBy(&(usage_.used_in_words),
-                                  (size >> kWordSizeLog2));
+    // No need for atomic operation: we're at a safepoint.
+    usage_.used_in_words += (size >> kWordSizeLog2);
     return result;
   }
-  result = TryAllocateDataBumpLocked(size, growth_policy);
+  result = TryAllocateDataBumpLocked(size);
   if (result != 0) return result;
-  return TryAllocateDataLocked(size, growth_policy);
+  return TryAllocateDataLocked(size, PageSpace::kForceGrowth);
 }
 
 void PageSpace::SetupImagePage(void* pointer, uword size, bool is_executable) {
@@ -1379,6 +1371,18 @@
   image_pages_ = page;
 }
 
+bool PageSpace::IsObjectFromImagePages(dart::RawObject* object) {
+  uword object_addr = RawObject::ToAddr(object);
+  HeapPage* image_page = image_pages_;
+  while (image_page != nullptr) {
+    if (image_page->Contains(object_addr)) {
+      return true;
+    }
+    image_page = image_page->next();
+  }
+  return false;
+}
+
 PageSpaceController::PageSpaceController(Heap* heap,
                                          int heap_growth_ratio,
                                          int heap_growth_max,
diff --git a/runtime/vm/heap/pages.h b/runtime/vm/heap/pages.h
index 321b0be..8844ee7 100644
--- a/runtime/vm/heap/pages.h
+++ b/runtime/vm/heap/pages.h
@@ -40,7 +40,8 @@
   HeapPage* next() const { return next_; }
   void set_next(HeapPage* next) { next_ = next; }
 
-  bool Contains(uword addr) { return memory_->Contains(addr); }
+  bool Contains(uword addr) const { return memory_->Contains(addr); }
+  intptr_t AliasOffset() const { return memory_->AliasOffset(); }
 
   uword object_start() const { return memory_->start() + ObjectStartOffset(); }
   uword object_end() const { return object_end_; }
@@ -70,7 +71,8 @@
   }
 
   // Warning: This does not work for objects on image pages because image pages
-  // are not aligned.
+  // are not aligned. However, it works for objects on large pages, because
+  // only one object is allocated per large page.
   static HeapPage* Of(RawObject* obj) {
     ASSERT(obj->IsHeapObject());
     ASSERT(obj->IsOldObject());
@@ -78,10 +80,45 @@
                                        kPageMask);
   }
 
-  static HeapPage* Of(uintptr_t addr) {
+  // Warning: This does not work for addresses on image pages or on large pages.
+  static HeapPage* Of(uword addr) {
     return reinterpret_cast<HeapPage*>(addr & kPageMask);
   }
 
+  // Warning: This does not work for objects on image pages.
+  static RawObject* ToExecutable(RawObject* obj) {
+    HeapPage* page = Of(obj);
+    VirtualMemory* memory = page->memory_;
+    const intptr_t alias_offset = memory->AliasOffset();
+    if (alias_offset == 0) {
+      return obj;  // Not aliased.
+    }
+    uword addr = RawObject::ToAddr(obj);
+    if (memory->Contains(addr)) {
+      return RawObject::FromAddr(addr + alias_offset);
+    }
+    // obj is executable.
+    ASSERT(memory->ContainsAlias(addr));
+    return obj;
+  }
+
+  // Warning: This does not work for objects on image pages.
+  static RawObject* ToWritable(RawObject* obj) {
+    HeapPage* page = Of(obj);
+    VirtualMemory* memory = page->memory_;
+    const intptr_t alias_offset = memory->AliasOffset();
+    if (alias_offset == 0) {
+      return obj;  // Not aliased.
+    }
+    uword addr = RawObject::ToAddr(obj);
+    if (memory->ContainsAlias(addr)) {
+      return RawObject::FromAddr(addr - alias_offset);
+    }
+    // obj is writable.
+    ASSERT(memory->Contains(addr));
+    return obj;
+  }
+
   // 1 card = 128 slots.
   static const intptr_t kSlotsPerCardLog2 = 7;
   static const intptr_t kBytesPerCardLog2 = kWordSizeLog2 + kSlotsPerCardLog2;
@@ -360,6 +397,7 @@
   }
 
   void AllocateExternal(intptr_t cid, intptr_t size);
+  void PromoteExternal(intptr_t cid, intptr_t size);
   void FreeExternal(intptr_t size);
 
   // Bulk data allocation.
@@ -391,10 +429,9 @@
   void set_phase(Phase val) { phase_ = val; }
 
   // Attempt to allocate from bump block rather than normal freelist.
-  uword TryAllocateDataBump(intptr_t size, GrowthPolicy growth_policy);
-  uword TryAllocateDataBumpLocked(intptr_t size, GrowthPolicy growth_policy);
+  uword TryAllocateDataBumpLocked(intptr_t size);
   // Prefer small freelist blocks, then chip away at the bump block.
-  uword TryAllocatePromoLocked(intptr_t size, GrowthPolicy growth_policy);
+  uword TryAllocatePromoLocked(intptr_t size);
 
   void SetupImagePage(void* pointer, uword size, bool is_executable);
 
@@ -408,6 +445,8 @@
     enable_concurrent_mark_ = enable_concurrent_mark;
   }
 
+  bool IsObjectFromImagePages(RawObject* object);
+
  private:
   // Ids for time and data records in Heap::GCStats.
   enum {
@@ -436,9 +475,6 @@
                                HeapPage::PageType type,
                                GrowthPolicy growth_policy,
                                bool is_locked);
-  uword TryAllocateDataBumpInternal(intptr_t size,
-                                    GrowthPolicy growth_policy,
-                                    bool is_locked);
   // Makes bump block walkable; do not call concurrently with mutator.
   void MakeIterable() const;
   HeapPage* AllocatePage(HeapPage::PageType type, bool link = true);
diff --git a/runtime/vm/heap/scavenger.cc b/runtime/vm/heap/scavenger.cc
index b6906ae..fca7761 100644
--- a/runtime/vm/heap/scavenger.cc
+++ b/runtime/vm/heap/scavenger.cc
@@ -60,6 +60,31 @@
   *reinterpret_cast<uword*>(original) = target | kForwarded;
 }
 
+static inline void objcpy(void* dst, const void* src, size_t size) {
+  // A memcopy specialized for objects. We can assume:
+  //  - dst and src do not overlap
+  ASSERT(
+      (reinterpret_cast<uword>(dst) + size <= reinterpret_cast<uword>(src)) ||
+      (reinterpret_cast<uword>(src) + size <= reinterpret_cast<uword>(dst)));
+  //  - dst and src are word aligned
+  ASSERT(Utils::IsAligned(reinterpret_cast<uword>(dst), sizeof(uword)));
+  ASSERT(Utils::IsAligned(reinterpret_cast<uword>(src), sizeof(uword)));
+  //  - size is strictly positive
+  ASSERT(size > 0);
+  //  - size is a multiple of double words
+  ASSERT(Utils::IsAligned(size, 2 * sizeof(uword)));
+
+  uword* __restrict dst_cursor = reinterpret_cast<uword*>(dst);
+  const uword* __restrict src_cursor = reinterpret_cast<const uword*>(src);
+  do {
+    uword a = *src_cursor++;
+    uword b = *src_cursor++;
+    *dst_cursor++ = a;
+    *dst_cursor++ = b;
+    size -= (2 * sizeof(uword));
+  } while (size > 0);
+}
+
 class ScavengerVisitor : public ObjectPointerVisitor {
  public:
   explicit ScavengerVisitor(Isolate* isolate,
@@ -74,6 +99,44 @@
         bytes_promoted_(0),
         visiting_old_object_(NULL) {}
 
+  virtual void VisitTypedDataViewPointers(RawTypedDataView* view,
+                                          RawObject** first,
+                                          RawObject** last) {
+    // First we forward all fields of the typed data view.
+    VisitPointers(first, last);
+
+    if (view->ptr()->data_ == nullptr) {
+      ASSERT(ValueFromRawSmi(view->ptr()->offset_in_bytes_) == 0 &&
+             ValueFromRawSmi(view->ptr()->length_) == 0);
+      return;
+    }
+
+    // Validate 'this' is a typed data view.
+    const uword view_header =
+        *reinterpret_cast<uword*>(RawObject::ToAddr(view));
+    ASSERT(!IsForwarding(view_header) || view->IsOldObject());
+    ASSERT(RawObject::IsTypedDataViewClassId(view->GetClassIdMayBeSmi()));
+
+    // Validate that the backing store is not a forwarding word.
+    RawTypedDataBase* td = view->ptr()->typed_data_;
+    ASSERT(td->IsHeapObject());
+    const uword td_header = *reinterpret_cast<uword*>(RawObject::ToAddr(td));
+    ASSERT(!IsForwarding(td_header) || td->IsOldObject());
+
+    // We can always obtain the class id from the forwarded backing store.
+    const classid_t cid = td->GetClassId();
+
+    // If we have external typed data we can simply return since the backing
+    // store lives in C-heap and will not move.
+    if (RawObject::IsExternalTypedDataClassId(cid)) {
+      return;
+    }
+
+    // Now we update the inner pointer.
+    ASSERT(RawObject::IsTypedDataClassId(cid));
+    view->RecomputeDataFieldForInternalTypedData();
+  }
+
   void VisitPointers(RawObject** first, RawObject** last) {
     ASSERT(Utils::IsAligned(first, sizeof(*first)));
     ASSERT(Utils::IsAligned(last, sizeof(*last)));
@@ -135,14 +198,11 @@
       new_addr = ForwardedAddr(header);
     } else {
       intptr_t size = raw_obj->HeapSize();
-      NOT_IN_PRODUCT(intptr_t cid = raw_obj->GetClassId());
-      NOT_IN_PRODUCT(ClassTable* class_table = isolate()->class_table());
       // Check whether object should be promoted.
       if (scavenger_->survivor_end_ <= raw_addr) {
         // Not a survivor of a previous scavenge. Just copy the object into the
         // to space.
         new_addr = scavenger_->AllocateGC(size);
-        NOT_IN_PRODUCT(class_table->UpdateLiveNew(cid, size));
       } else {
         // TODO(iposva): Experiment with less aggressive promotion. For example
         // a coin toss determines if an object is promoted or whether it should
@@ -150,27 +210,24 @@
         //
         // This object is a survivor of a previous scavenge. Attempt to promote
         // the object.
-        new_addr =
-            page_space_->TryAllocatePromoLocked(size, PageSpace::kForceGrowth);
+        new_addr = page_space_->TryAllocatePromoLocked(size);
         if (new_addr != 0) {
           // If promotion succeeded then we need to remember it so that it can
           // be traversed later.
           scavenger_->PushToPromotedStack(new_addr);
           bytes_promoted_ += size;
-          NOT_IN_PRODUCT(class_table->UpdateAllocatedOld(cid, size));
         } else {
           // Promotion did not succeed. Copy into the to space instead.
           scavenger_->failed_to_promote_ = true;
           new_addr = scavenger_->AllocateGC(size);
-          NOT_IN_PRODUCT(class_table->UpdateLiveNew(cid, size));
         }
       }
       // During a scavenge we always succeed to at least copy all of the
       // current objects to the to space.
       ASSERT(new_addr != 0);
       // Copy the object to the new location.
-      memmove(reinterpret_cast<void*>(new_addr),
-              reinterpret_cast<void*>(raw_addr), size);
+      objcpy(reinterpret_cast<void*>(new_addr),
+             reinterpret_cast<void*>(raw_addr), size);
 
       RawObject* new_obj = RawObject::FromAddr(new_addr);
       if (new_obj->IsOldObject()) {
@@ -189,6 +246,10 @@
         new_obj->ptr()->tags_ = tags;
       }
 
+      if (RawObject::IsTypedDataClassId(new_obj->GetClassId())) {
+        reinterpret_cast<RawTypedData*>(new_obj)->RecomputeDataField();
+      }
+
       // Remember forwarding address.
       ForwardTo(raw_addr, new_addr);
     }
@@ -428,6 +489,7 @@
   NOT_IN_PRODUCT(isolate->class_table()->ResetCountersNew());
 
   isolate->ReleaseStoreBuffers();
+  AbandonTLABs(isolate);
 
   // Flip the two semi-spaces so that to_ is always the space for allocating
   // objects.
@@ -646,18 +708,22 @@
 
 void Scavenger::ProcessToSpace(ScavengerVisitor* visitor) {
   Thread* thread = Thread::Current();
+  NOT_IN_PRODUCT(ClassTable* class_table = thread->isolate()->class_table());
 
   // Iterate until all work has been drained.
   while ((resolved_top_ < top_) || PromotedStackHasMore()) {
     while (resolved_top_ < top_) {
       RawObject* raw_obj = RawObject::FromAddr(resolved_top_);
       intptr_t class_id = raw_obj->GetClassId();
+      intptr_t size;
       if (class_id != kWeakPropertyCid) {
-        resolved_top_ += raw_obj->VisitPointersNonvirtual(visitor);
+        size = raw_obj->VisitPointersNonvirtual(visitor);
       } else {
         RawWeakProperty* raw_weak = reinterpret_cast<RawWeakProperty*>(raw_obj);
-        resolved_top_ += ProcessWeakProperty(raw_weak, visitor);
+        size = ProcessWeakProperty(raw_weak, visitor);
       }
+      NOT_IN_PRODUCT(class_table->UpdateLiveNewGC(class_id, size));
+      resolved_top_ += size;
     }
     {
       // Visit all the promoted objects and update/scavenge their internal
@@ -669,7 +735,12 @@
         // objects to be resolved in the to space.
         ASSERT(!raw_object->IsRemembered());
         visitor->VisitingOldObject(raw_object);
-        raw_object->VisitPointersNonvirtual(visitor);
+        intptr_t size = raw_object->VisitPointersNonvirtual(visitor);
+#if defined(PRODUCT)
+        USE(size);
+#else
+        class_table->UpdateAllocatedOldGC(raw_object->GetClassId(), size);
+#endif
         if (raw_object->IsMarked()) {
           // Complete our promise from ScavengePointer. Note that marker cannot
           // visit this object until it pops a block from the mark stack, which
@@ -830,11 +901,12 @@
   }
 }
 
-void Scavenger::MakeAllTLABsIterable(Isolate* isolate) const {
-  MonitorLocker ml(isolate->threads_lock(), false);
+void Scavenger::MakeNewSpaceIterable() const {
   ASSERT(Thread::Current()->IsAtSafepoint() ||
          (Thread::Current()->task_kind() == Thread::kMarkerTask) ||
          (Thread::Current()->task_kind() == Thread::kCompactorTask));
+  Isolate* isolate = heap_->isolate();
+  MonitorLocker ml(isolate->threads_lock(), false);
   Thread* current = heap_->isolate()->thread_registry()->active_list();
   while (current != NULL) {
     if (current->HasActiveTLAB()) {
@@ -843,22 +915,12 @@
     current = current->next();
   }
   Thread* mutator_thread = isolate->mutator_thread();
-  if ((mutator_thread != NULL) && (!isolate->IsMutatorThreadScheduled())) {
+  if (mutator_thread != NULL) {
     heap_->MakeTLABIterable(mutator_thread);
   }
 }
 
-void Scavenger::MakeNewSpaceIterable() const {
-  ASSERT(heap_ != NULL);
-  ASSERT(Thread::Current()->IsAtSafepoint() ||
-         (Thread::Current()->task_kind() == Thread::kMarkerTask) ||
-         (Thread::Current()->task_kind() == Thread::kCompactorTask));
-  if (!scavenging_) {
-    MakeAllTLABsIterable(heap_->isolate());
-  }
-}
-
-void Scavenger::AbandonAllTLABs(Isolate* isolate) {
+void Scavenger::AbandonTLABs(Isolate* isolate) {
   ASSERT(Thread::Current()->IsAtSafepoint());
   MonitorLocker ml(isolate->threads_lock(), false);
   Thread* current = isolate->thread_registry()->active_list();
@@ -867,7 +929,7 @@
     current = current->next();
   }
   Thread* mutator_thread = isolate->mutator_thread();
-  if ((mutator_thread != NULL) && (!isolate->IsMutatorThreadScheduled())) {
+  if (mutator_thread != NULL) {
     heap_->AbandonRemainingTLAB(mutator_thread);
   }
 }
@@ -972,13 +1034,6 @@
   int64_t safe_point = OS::GetCurrentMonotonicMicros();
   heap_->RecordTime(kSafePoint, safe_point - start);
 
-  AbandonAllTLABs(isolate);
-
-  Thread* mutator_thread = isolate->mutator_thread();
-  if ((mutator_thread != NULL) && (mutator_thread->HasActiveTLAB())) {
-    heap_->AbandonRemainingTLAB(mutator_thread);
-  }
-
   // TODO(koda): Make verification more compatible with concurrent sweep.
   if (FLAG_verify_before_gc && !FLAG_concurrent_sweep) {
     OS::PrintErr("Verifying before Scavenge...");
@@ -987,7 +1042,6 @@
   }
 
   // Prepare for a scavenge.
-  MakeNewSpaceIterable();
   SpaceUsage usage_before = GetCurrentUsage();
   intptr_t promo_candidate_words =
       (survivor_end_ - FirstObjectStart()) / kWordSize;
diff --git a/runtime/vm/heap/scavenger.h b/runtime/vm/heap/scavenger.h
index 6867278..7e5f623 100644
--- a/runtime/vm/heap/scavenger.h
+++ b/runtime/vm/heap/scavenger.h
@@ -149,8 +149,6 @@
   uword TryAllocateInTLAB(Thread* thread, intptr_t size) {
     ASSERT(Utils::IsAligned(size, kObjectAlignment));
     ASSERT(heap_ != Dart::vm_isolate()->heap());
-    ASSERT(thread->IsMutatorThread());
-    ASSERT(thread->isolate()->IsMutatorThreadScheduled());
     uword top = thread->top();
     uword end = thread->end();
     uword result = top;
@@ -220,8 +218,7 @@
 
   void MakeNewSpaceIterable() const;
   int64_t FreeSpaceInWords(Isolate* isolate) const;
-  void MakeAllTLABsIterable(Isolate* isolate) const;
-  void AbandonAllTLABs(Isolate* isolate);
+  void AbandonTLABs(Isolate* isolate);
 
  private:
   // Ids for time and data records in Heap::GCStats.
diff --git a/runtime/vm/heap/verifier.cc b/runtime/vm/heap/verifier.cc
index 8ea2fdb..237777e 100644
--- a/runtime/vm/heap/verifier.cc
+++ b/runtime/vm/heap/verifier.cc
@@ -49,6 +49,10 @@
     RawObject* raw_obj = *current;
     if (raw_obj->IsHeapObject()) {
       if (!allocated_set_->Contains(raw_obj)) {
+        if (raw_obj->IsInstructions() &&
+            allocated_set_->Contains(HeapPage::ToWritable(raw_obj))) {
+          continue;
+        }
         uword raw_addr = RawObject::ToAddr(raw_obj);
         FATAL1("Invalid object pointer encountered %#" Px "\n", raw_addr);
       }
diff --git a/runtime/vm/image_snapshot.cc b/runtime/vm/image_snapshot.cc
index 838e2b7..34ede80 100644
--- a/runtime/vm/image_snapshot.cc
+++ b/runtime/vm/image_snapshot.cc
@@ -157,8 +157,9 @@
     ObjectOffsetPair* pair = reuse_instructions_.Lookup(instructions);
     if (pair == NULL) {
       // Code should have been removed by DropCodeWithoutReusableInstructions.
-      FATAL("Expected instructions to reuse\n");
+      return 0;
     }
+    ASSERT(pair->offset != 0);
     return pair->offset;
   }
 
@@ -167,6 +168,7 @@
     // Negative offsets tell the reader the offset is w/r/t the shared
     // instructions image instead of the app-specific instructions image.
     // Compare ImageReader::GetInstructionsAt.
+    ASSERT(pair->offset != 0);
     return -pair->offset;
   }
 
@@ -175,6 +177,7 @@
   next_text_offset_ += instructions->HeapSize();
   instructions_.Add(InstructionsData(instructions, code, offset));
 
+  ASSERT(offset != 0);
   return offset;
 }
 
@@ -331,9 +334,8 @@
     uword start = reinterpret_cast<uword>(obj.raw()) - kHeapObjectTag;
     uword end = start + obj.raw()->HeapSize();
 
-    // Write object header with the mark and VM heap bits set.
+    // Write object header with the mark and read-only bits set.
     uword marked_tags = obj.raw()->ptr()->tags_;
-    marked_tags = RawObject::VMHeapObjectTag::update(true, marked_tags);
     marked_tags = RawObject::OldBit::update(true, marked_tags);
     marked_tags = RawObject::OldAndNotMarkedBit::update(false, marked_tags);
     marked_tags = RawObject::OldAndNotRememberedBit::update(true, marked_tags);
@@ -482,9 +484,8 @@
       uword beginning = reinterpret_cast<uword>(insns.raw_ptr());
       uword entry = beginning + Instructions::HeaderSize();
 
-      // Write Instructions with the mark and VM heap bits set.
+      // Write Instructions with the mark and read-only bits set.
       uword marked_tags = insns.raw_ptr()->tags_;
-      marked_tags = RawObject::VMHeapObjectTag::update(true, marked_tags);
       marked_tags = RawObject::OldBit::update(true, marked_tags);
       marked_tags = RawObject::OldAndNotMarkedBit::update(false, marked_tags);
       marked_tags =
@@ -732,9 +733,8 @@
     ASSERT(Utils::IsAligned(beginning, sizeof(uword)));
     ASSERT(Utils::IsAligned(entry, sizeof(uword)));
 
-    // Write Instructions with the mark and VM heap bits set.
+    // Write Instructions with the mark and read-only bits set.
     uword marked_tags = insns.raw_ptr()->tags_;
-    marked_tags = RawObject::VMHeapObjectTag::update(true, marked_tags);
     marked_tags = RawObject::OldBit::update(true, marked_tags);
     marked_tags = RawObject::OldAndNotMarkedBit::update(false, marked_tags);
     marked_tags = RawObject::OldAndNotRememberedBit::update(true, marked_tags);
@@ -820,7 +820,11 @@
   class DropCodeVisitor : public FunctionVisitor, public ClassVisitor {
    public:
     explicit DropCodeVisitor(const void* reused_instructions)
-        : code_(Code::Handle()), instructions_(Instructions::Handle()) {
+        : code_(Code::Handle()),
+          instructions_(Instructions::Handle()),
+          pool_(ObjectPool::Handle()),
+          table_(Array::Handle()),
+          entry_(Object::Handle()) {
       ImageWriter::SetupShared(&reused_instructions_, reused_instructions);
       if (FLAG_trace_reused_instructions) {
         OS::PrintErr("%" Pd " reusable instructions\n",
@@ -830,18 +834,20 @@
 
     void Visit(const Class& cls) {
       code_ = cls.allocation_stub();
-      if (!code_.IsNull() && !IsAvailable(code_)) {
-        if (FLAG_trace_reused_instructions) {
-          OS::PrintErr("No reusable instructions for %s\n", cls.ToCString());
+      if (!code_.IsNull()) {
+        if (!CanKeep(code_)) {
+          if (FLAG_trace_reused_instructions) {
+            OS::PrintErr("No reusable instructions for %s\n", cls.ToCString());
+          }
+          cls.DisableAllocationStub();
         }
-        cls.DisableAllocationStub();
       }
     }
 
     void Visit(const Function& func) {
       if (func.HasCode()) {
         code_ = func.CurrentCode();
-        if (!IsAvailable(code_)) {
+        if (!CanKeep(code_)) {
           if (FLAG_trace_reused_instructions) {
             OS::PrintErr("No reusable instructions for %s\n", func.ToCString());
           }
@@ -851,16 +857,44 @@
         }
       }
       code_ = func.unoptimized_code();
-      if (!code_.IsNull() && !IsAvailable(code_)) {
+      if (!code_.IsNull() && !CanKeep(code_)) {
         if (FLAG_trace_reused_instructions) {
           OS::PrintErr("No reusable instructions for %s\n", func.ToCString());
         }
         func.ClearCode();
         func.ClearICDataArray();
-        return;
       }
     }
 
+    bool CanKeep(const Code& code) {
+      if (!IsAvailable(code)) {
+        return false;
+      }
+
+      pool_ = code.object_pool();
+      for (intptr_t i = 0; i < pool_.Length(); i++) {
+        if (pool_.TypeAt(i) == ObjectPool::EntryType::kTaggedObject) {
+          entry_ = pool_.ObjectAt(i);
+          if (entry_.IsCode() && !IsAvailable(Code::Cast(entry_))) {
+            return false;
+          }
+        }
+      }
+
+      table_ = code.static_calls_target_table();
+      if (!table_.IsNull()) {
+        StaticCallsTable static_calls(table_);
+        for (auto& view : static_calls) {
+          entry_ = view.Get<Code::kSCallTableCodeTarget>();
+          if (entry_.IsCode() && !IsAvailable(Code::Cast(entry_))) {
+            return false;
+          }
+        }
+      }
+
+      return true;
+    }
+
    private:
     bool IsAvailable(const Code& code) {
       ObjectOffsetPair* pair = reused_instructions_.Lookup(code.instructions());
@@ -870,6 +904,9 @@
     ObjectOffsetMap reused_instructions_;
     Code& code_;
     Instructions& instructions_;
+    ObjectPool& pool_;
+    Array& table_;
+    Object& entry_;
 
     DISALLOW_COPY_AND_ASSIGN(DropCodeVisitor);
   };
diff --git a/runtime/vm/instructions_arm.cc b/runtime/vm/instructions_arm.cc
index 785f8fb..c8e8af9 100644
--- a/runtime/vm/instructions_arm.cc
+++ b/runtime/vm/instructions_arm.cc
@@ -9,7 +9,7 @@
 #include "vm/instructions_arm.h"
 
 #include "vm/compiler/assembler/assembler.h"
-#include "vm/constants_arm.h"
+#include "vm/constants.h"
 #include "vm/cpu.h"
 #include "vm/object.h"
 #include "vm/reverse_pc_lookup_cache.h"
diff --git a/runtime/vm/instructions_arm.h b/runtime/vm/instructions_arm.h
index 37b7cef..d3e1cdb 100644
--- a/runtime/vm/instructions_arm.h
+++ b/runtime/vm/instructions_arm.h
@@ -12,7 +12,7 @@
 
 #include "vm/allocation.h"
 #include "vm/compiler/assembler/assembler.h"
-#include "vm/constants_arm.h"
+#include "vm/constants.h"
 #include "vm/native_function.h"
 
 namespace dart {
diff --git a/runtime/vm/instructions_arm64.cc b/runtime/vm/instructions_arm64.cc
index ea9a118..d34d7a7 100644
--- a/runtime/vm/instructions_arm64.cc
+++ b/runtime/vm/instructions_arm64.cc
@@ -9,7 +9,7 @@
 #include "vm/instructions_arm64.h"
 
 #include "vm/compiler/assembler/assembler.h"
-#include "vm/constants_arm64.h"
+#include "vm/constants.h"
 #include "vm/cpu.h"
 #include "vm/object.h"
 #include "vm/reverse_pc_lookup_cache.h"
diff --git a/runtime/vm/instructions_arm64.h b/runtime/vm/instructions_arm64.h
index c78cee3..8550643 100644
--- a/runtime/vm/instructions_arm64.h
+++ b/runtime/vm/instructions_arm64.h
@@ -12,7 +12,7 @@
 
 #include "vm/allocation.h"
 #include "vm/compiler/assembler/assembler.h"
-#include "vm/constants_arm64.h"
+#include "vm/constants.h"
 #include "vm/native_function.h"
 
 namespace dart {
diff --git a/runtime/vm/instructions_x64.cc b/runtime/vm/instructions_x64.cc
index 70ed255..7c0e336 100644
--- a/runtime/vm/instructions_x64.cc
+++ b/runtime/vm/instructions_x64.cc
@@ -9,7 +9,7 @@
 #include "vm/instructions.h"
 #include "vm/instructions_x64.h"
 
-#include "vm/constants_x64.h"
+#include "vm/constants.h"
 #include "vm/cpu.h"
 #include "vm/object.h"
 
diff --git a/runtime/vm/interpreter.cc b/runtime/vm/interpreter.cc
index 1500348..c72f6b0 100644
--- a/runtime/vm/interpreter.cc
+++ b/runtime/vm/interpreter.cc
@@ -117,6 +117,19 @@
                                : static_cast<intptr_t>(kSmiCid);
   }
 
+  DART_FORCE_INLINE static RawTypeArguments* GetTypeArguments(
+      Thread* thread,
+      RawInstance* instance) {
+    RawClass* instance_class =
+        thread->isolate()->class_table()->At(GetClassId(instance));
+    return instance_class->ptr()->num_type_arguments_ > 0
+               ? reinterpret_cast<RawTypeArguments**>(
+                     instance
+                         ->ptr())[instance_class->ptr()
+                                      ->type_arguments_field_offset_in_words_]
+               : TypeArguments::null();
+  }
+
   // The usage counter is actually a 'hotness' counter.
   // For an instance call, both the usage counters of the caller and of the
   // calle will get incremented, as well as the ICdata counter at the call site.
@@ -162,6 +175,58 @@
     ASSERT(GetClassId(FP[kKBCPcMarkerSlotFromFp]) == kBytecodeCid);
     return static_cast<RawBytecode*>(FP[kKBCPcMarkerSlotFromFp]);
   }
+
+  DART_FORCE_INLINE static bool FieldNeedsGuardUpdate(RawField* field,
+                                                      RawObject* value) {
+    // The interpreter should never see a cloned field.
+    ASSERT(field->ptr()->owner_->GetClassId() != kFieldCid);
+
+    const classid_t guarded_cid = field->ptr()->guarded_cid_;
+
+    if (guarded_cid == kDynamicCid) {
+      // Field is not guarded.
+      return false;
+    }
+
+    ASSERT(Isolate::Current()->use_field_guards());
+
+    const classid_t nullability_cid = field->ptr()->is_nullable_;
+    const classid_t value_cid = InterpreterHelpers::GetClassId(value);
+
+    if (nullability_cid == value_cid) {
+      // Storing null into a nullable field.
+      return false;
+    }
+
+    if (guarded_cid != value_cid) {
+      // First assignment (guarded_cid == kIllegalCid) or
+      // field no longer monomorphic or
+      // field has become nullable.
+      return true;
+    }
+
+    intptr_t guarded_list_length =
+        Smi::Value(field->ptr()->guarded_list_length_);
+
+    if (UNLIKELY(guarded_list_length >= Field::kUnknownFixedLength)) {
+      // Guarding length, check this in the runtime.
+      return true;
+    }
+
+    if (UNLIKELY(field->ptr()->static_type_exactness_state_ >=
+                 StaticTypeExactnessState::Uninitialized().Encode())) {
+      // Guarding "exactness", check this in the runtime.
+      return true;
+    }
+
+    // Everything matches.
+    return false;
+  }
+
+  DART_FORCE_INLINE static bool IsFinalized(RawClass* cls) {
+    return Class::ClassFinalizedBits::decode(cls->ptr()->state_bits_) ==
+           RawClass::kFinalized;
+  }
 };
 
 DART_FORCE_INLINE static uint32_t* SavedCallerPC(RawObject** FP) {
@@ -175,6 +240,21 @@
   return function;
 }
 
+DART_FORCE_INLINE static RawObject* InitializeHeader(uword addr,
+                                                     intptr_t class_id,
+                                                     intptr_t instance_size) {
+  uint32_t tags = 0;
+  tags = RawObject::ClassIdTag::update(class_id, tags);
+  tags = RawObject::SizeTag::update(instance_size, tags);
+  tags = RawObject::OldBit::update(false, tags);
+  tags = RawObject::OldAndNotMarkedBit::update(false, tags);
+  tags = RawObject::OldAndNotRememberedBit::update(false, tags);
+  tags = RawObject::NewBit::update(true, tags);
+  // Also writes zero in the hash_ field.
+  *reinterpret_cast<uword*>(addr + Object::tags_offset()) = tags;
+  return RawObject::FromAddr(addr);
+}
+
 void LookupCache::Clear() {
   for (intptr_t i = 0; i < kNumEntries; i++) {
     entries_[i].receiver_cid = kIllegalCid;
@@ -237,6 +317,10 @@
 
 Interpreter::Interpreter()
     : stack_(NULL), fp_(NULL), pp_(NULL), argdesc_(NULL), lookup_cache_() {
+#if defined(TARGET_ARCH_DBC)
+  FATAL("Interpreter is not supported when targeting DBC\n");
+#endif  // defined(USING_SIMULATOR) || defined(TARGET_ARCH_DBC)
+
   // Setup interpreter support first. Some of this information is needed to
   // setup the architecture state.
   // We allocate the stack here, the size is computed as the sum of
@@ -244,7 +328,7 @@
   // handling stack overflow exceptions. To be safe in potential
   // stack underflows we also add some underflow buffer space.
   stack_ = new uintptr_t[(OSThread::GetSpecifiedStackSize() +
-                          OSThread::kStackSizeBuffer +
+                          OSThread::kStackSizeBufferMax +
                           kInterpreterStackUnderflowSize) /
                          sizeof(uintptr_t)];
   // Low address.
@@ -253,7 +337,7 @@
   // Limit for StackOverflowError.
   overflow_stack_limit_ = stack_base_ + OSThread::GetSpecifiedStackSize();
   // High address.
-  stack_limit_ = overflow_stack_limit_ + OSThread::kStackSizeBuffer;
+  stack_limit_ = overflow_stack_limit_ + OSThread::kStackSizeBufferMax;
 
   last_setjmp_buffer_ = NULL;
 
@@ -381,17 +465,32 @@
   frame[1] = Bytecode::null();
   frame[2] = reinterpret_cast<RawObject*>(pc);
   frame[3] = reinterpret_cast<RawObject*>(base);
-  fp_ = frame + kKBCDartFrameFixedSize;
-  thread->set_top_exit_frame_info(reinterpret_cast<uword>(fp_));
+
+  RawObject** exit_fp = frame + kKBCDartFrameFixedSize;
+  thread->set_top_exit_frame_info(reinterpret_cast<uword>(exit_fp));
+  fp_ = exit_fp;
+
 #if defined(DEBUG)
   if (IsTracingExecution()) {
     THR_Print("%" Pu64 " ", icount_);
     THR_Print("Exiting interpreter 0x%" Px " at fp_ 0x%" Px "\n",
-              reinterpret_cast<uword>(this), reinterpret_cast<uword>(fp_));
+              reinterpret_cast<uword>(this), reinterpret_cast<uword>(exit_fp));
   }
 #endif
 }
 
+void Interpreter::Unexit(Thread* thread) {
+#if !defined(PRODUCT)
+  // For the profiler.
+  RawObject** exit_fp =
+      reinterpret_cast<RawObject**>(thread->top_exit_frame_info());
+  ASSERT(exit_fp != 0);
+  pc_ = SavedCallerPC(exit_fp);
+  fp_ = SavedCallerFP(exit_fp);
+#endif
+  thread->set_top_exit_frame_info(0);
+}
+
 // Calling into runtime may trigger garbage collection and relocate objects,
 // so all RawObject* pointers become outdated and should not be used across
 // runtime calls.
@@ -407,7 +506,7 @@
     thread->set_vm_tag(reinterpret_cast<uword>(drt));
     drt(args);
     thread->set_vm_tag(VMTag::kDartInterpretedTagId);
-    thread->set_top_exit_frame_info(0);
+    interpreter->Unexit(thread);
     return true;
   } else {
     return false;
@@ -424,7 +523,7 @@
     thread->set_vm_tag(reinterpret_cast<uword>(function));
     wrapper(args, function);
     thread->set_vm_tag(VMTag::kDartInterpretedTagId);
-    thread->set_top_exit_frame_info(0);
+    interpreter->Unexit(thread);
     return true;
   } else {
     return false;
@@ -438,10 +537,6 @@
                                                uint32_t** pc,
                                                RawObject*** FP,
                                                RawObject*** SP) {
-#if defined(USING_SIMULATOR) || defined(TARGET_ARCH_DBC)
-  // TODO(regis): Revisit.
-  UNIMPLEMENTED();
-#endif
   ASSERT(Function::HasCode(function));
   RawCode* volatile code = function->ptr()->code_;
   ASSERT(code != StubCode::LazyCompile().raw());
@@ -462,10 +557,22 @@
   {
     InterpreterSetjmpBuffer buffer(this);
     if (!setjmp(buffer.buffer_)) {
+#if defined(TARGET_ARCH_DBC)
+      USE(entrypoint);
+      UNIMPLEMENTED();
+#elif defined(USING_SIMULATOR)
+      result = bit_copy<RawObject*, int64_t>(
+          Simulator::Current()->Call(reinterpret_cast<intptr_t>(entrypoint),
+                                     reinterpret_cast<intptr_t>(code),
+                                     reinterpret_cast<intptr_t>(argdesc_),
+                                     reinterpret_cast<intptr_t>(call_base),
+                                     reinterpret_cast<intptr_t>(thread)));
+#else
       result = entrypoint(code, argdesc_, call_base, thread);
-      thread->set_top_exit_frame_info(0);
+#endif
       ASSERT(thread->vm_tag() == VMTag::kDartInterpretedTagId);
       ASSERT(thread->execution_state() == Thread::kThreadInGenerated);
+      Unexit(thread);
     } else {
       return false;
     }
@@ -494,10 +601,10 @@
     if (RawObject::IsErrorClassId(result_cid)) {
       // Unwind to entry frame.
       fp_ = *FP;
-      pc_ = reinterpret_cast<uword>(SavedCallerPC(fp_));
+      pc_ = SavedCallerPC(fp_);
       while (!IsEntryFrameMarker(pc_)) {
         fp_ = SavedCallerFP(fp_);
-        pc_ = reinterpret_cast<uword>(SavedCallerPC(fp_));
+        pc_ = SavedCallerPC(fp_);
       }
       // Pop entry frame.
       fp_ = SavedCallerFP(fp_);
@@ -518,123 +625,8 @@
                                                   RawObject*** SP) {
   ASSERT(!Function::HasCode(function) && !Function::HasBytecode(function));
   ASSERT(function == call_top[0]);
-  // If the function is an implicit getter or setter, process its invocation
-  // here without code or bytecode.
   RawFunction::Kind kind = Function::kind(function);
   switch (kind) {
-    case RawFunction::kImplicitGetter: {
-      // Field object is cached in function's data_.
-      RawInstance* instance = reinterpret_cast<RawInstance*>(*call_base);
-      RawField* field = reinterpret_cast<RawField*>(function->ptr()->data_);
-      intptr_t offset_in_words = Smi::Value(field->ptr()->value_.offset_);
-      *SP = call_base;
-      **SP = reinterpret_cast<RawObject**>(instance->ptr())[offset_in_words];
-      *invoked = true;
-      return true;
-    }
-    case RawFunction::kImplicitSetter: {
-      // Field object is cached in function's data_.
-      RawInstance* instance = reinterpret_cast<RawInstance*>(call_base[0]);
-      RawField* field = reinterpret_cast<RawField*>(function->ptr()->data_);
-      intptr_t offset_in_words = Smi::Value(field->ptr()->value_.offset_);
-      RawAbstractType* field_type = field->ptr()->type_;
-      classid_t cid;
-      if (field_type->GetClassId() == kTypeCid) {
-        cid = Smi::Value(reinterpret_cast<RawSmi*>(
-            Type::RawCast(field_type)->ptr()->type_class_id_));
-      } else {
-        cid = kIllegalCid;  // Not really illegal, but not a Type to skip.
-      }
-      // Perform type test of value if field type is not one of dynamic, object,
-      // or void, and if the value is not null.
-      RawObject* null_value = Object::null();
-      RawObject* value = call_base[1];
-      if (cid != kDynamicCid && cid != kInstanceCid && cid != kVoidCid &&
-          value != null_value) {
-        RawSubtypeTestCache* cache = field->ptr()->type_test_cache_;
-        if (cache->GetClassId() != kSubtypeTestCacheCid) {
-          // Allocate new cache.
-          call_top[1] = null_value;  // Result.
-          Exit(thread, *FP, call_top + 2, *pc);
-          NativeArguments native_args(thread, 0, call_top + 1, call_top + 1);
-          if (!InvokeRuntime(thread, this, DRT_AllocateSubtypeTestCache,
-                             native_args)) {
-            *invoked = true;
-            return false;
-          }
-          // Reload objects after the call which may trigger GC.
-          function = reinterpret_cast<RawFunction*>(call_top[0]);
-          field = reinterpret_cast<RawField*>(function->ptr()->data_);
-          field_type = field->ptr()->type_;
-          instance = reinterpret_cast<RawInstance*>(call_base[0]);
-          value = call_base[1];
-          cache = reinterpret_cast<RawSubtypeTestCache*>(call_top[1]);
-          field->ptr()->type_test_cache_ = cache;
-        }
-        // Push arguments of type test.
-        call_top[1] = value;
-        call_top[2] = field_type;
-        // Provide type arguments of instance as instantiator.
-        RawClass* instance_class = thread->isolate()->class_table()->At(
-            InterpreterHelpers::GetClassId(instance));
-        call_top[3] =
-            instance_class->ptr()->num_type_arguments_ > 0
-                ? reinterpret_cast<RawObject**>(
-                      instance
-                          ->ptr())[instance_class->ptr()
-                                       ->type_arguments_field_offset_in_words_]
-                : null_value;
-        call_top[4] = null_value;  // Implicit setters cannot be generic.
-        call_top[5] = field->ptr()->name_;
-        if (!AssertAssignable(thread, *pc, *FP, call_top + 5, call_top + 1,
-                              cache)) {
-          *invoked = true;
-          return false;
-        }
-        // Reload objects after the call which may trigger GC.
-        function = reinterpret_cast<RawFunction*>(call_top[0]);
-        field = reinterpret_cast<RawField*>(function->ptr()->data_);
-        instance = reinterpret_cast<RawInstance*>(call_base[0]);
-        value = call_base[1];
-      }
-      if (thread->isolate()->use_field_guards()) {
-        // Check value cid according to field.guarded_cid().
-        // The interpreter should never see a cloned field.
-        ASSERT(field->ptr()->owner_->GetClassId() != kFieldCid);
-        const classid_t field_guarded_cid = field->ptr()->guarded_cid_;
-        const classid_t field_nullability_cid = field->ptr()->is_nullable_;
-        const classid_t value_cid = InterpreterHelpers::GetClassId(value);
-        if (value_cid != field_guarded_cid &&
-            value_cid != field_nullability_cid) {
-          if (Smi::Value(field->ptr()->guarded_list_length_) <
-                  Field::kUnknownFixedLength &&
-              field_guarded_cid == kIllegalCid) {
-            field->ptr()->guarded_cid_ = value_cid;
-            field->ptr()->is_nullable_ = value_cid;
-          } else if (field_guarded_cid != kDynamicCid) {
-            call_top[1] = 0;  // Unused result of runtime call.
-            call_top[2] = field;
-            call_top[3] = value;
-            Exit(thread, *FP, call_top + 4, *pc);
-            NativeArguments native_args(thread, 2, call_top + 2, call_top + 1);
-            if (!InvokeRuntime(thread, this, DRT_UpdateFieldCid, native_args)) {
-              *invoked = true;
-              return false;
-            }
-            // Reload objects after the call which may trigger GC.
-            instance = reinterpret_cast<RawInstance*>(call_base[0]);
-            value = call_base[1];
-          }
-        }
-      }
-      instance->StorePointer(
-          reinterpret_cast<RawObject**>(instance->ptr()) + offset_in_words,
-          value, thread);
-      *SP = call_base;
-      **SP = null_value;
-      *invoked = true;
-      return true;
-    }
     case RawFunction::kImplicitStaticFinalGetter: {
       // Field object is cached in function's data_.
       RawField* field = reinterpret_cast<RawField*>(function->ptr()->data_);
@@ -662,21 +654,6 @@
       *invoked = true;
       return true;
     }
-    case RawFunction::kMethodExtractor: {
-      ASSERT(InterpreterHelpers::ArgDescTypeArgsLen(argdesc_) == 0);
-      call_top[1] = 0;                       // Result of runtime call.
-      call_top[2] = *call_base;              // Receiver.
-      call_top[3] = function->ptr()->data_;  // Method.
-      Exit(thread, *FP, call_top + 4, *pc);
-      NativeArguments native_args(thread, 2, call_top + 2, call_top + 1);
-      if (!InvokeRuntime(thread, this, DRT_ExtractMethod, native_args)) {
-        return false;
-      }
-      *SP = call_base;
-      **SP = call_top[1];
-      *invoked = true;
-      return true;
-    }
     case RawFunction::kInvokeFieldDispatcher: {
       const intptr_t type_args_len =
           InterpreterHelpers::ArgDescTypeArgsLen(argdesc_);
@@ -697,39 +674,91 @@
       }
       if (call_function == Function::null()) {
         // Invoke field getter on receiver.
-        call_top[1] = 0;                       // Result of runtime call.
-        call_top[2] = receiver;                // Receiver.
-        call_top[3] = function->ptr()->name_;  // Field name.
-        Exit(thread, *FP, call_top + 4, *pc);
-        NativeArguments native_args(thread, 2, call_top + 2, call_top + 1);
+        call_top[1] = argdesc_;                // Save argdesc_.
+        call_top[2] = 0;                       // Result of runtime call.
+        call_top[3] = receiver;                // Receiver.
+        call_top[4] = function->ptr()->name_;  // Field name.
+        Exit(thread, *FP, call_top + 5, *pc);
+        NativeArguments native_args(thread, 2, call_top + 3, call_top + 2);
         if (!InvokeRuntime(thread, this, DRT_GetFieldForDispatch,
                            native_args)) {
           return false;
         }
+        argdesc_ = Array::RawCast(call_top[1]);
+
+        // Replace receiver with field value, keep all other arguments, and
+        // invoke 'call' function, or if not found, invoke noSuchMethod.
+        receiver = call_top[2];
+        call_base[receiver_idx] = receiver;
+
         // If the field value is a closure, no need to resolve 'call' function.
         // Otherwise, call runtime to resolve 'call' function.
-        if (InterpreterHelpers::GetClassId(call_top[1]) == kClosureCid) {
+        if (InterpreterHelpers::GetClassId(receiver) == kClosureCid) {
           // Closure call.
-          call_function = Closure::RawCast(call_top[1])->ptr()->function_;
+          call_function = Closure::RawCast(receiver)->ptr()->function_;
         } else {
           // Resolve and invoke the 'call' function.
-          call_top[2] = 0;  // Result of runtime call.
-          Exit(thread, *FP, call_top + 3, *pc);
-          NativeArguments native_args(thread, 1, call_top + 1, call_top + 2);
+          call_top[3] = argdesc_;
+          call_top[4] = 0;  // Result of runtime call.
+          Exit(thread, *FP, call_top + 5, *pc);
+          NativeArguments native_args(thread, 2, call_top + 2, call_top + 4);
           if (!InvokeRuntime(thread, this, DRT_ResolveCallFunction,
                              native_args)) {
             return false;
           }
-          call_function = Function::RawCast(call_top[2]);
+          argdesc_ = Array::RawCast(call_top[1]);
+          call_function = Function::RawCast(call_top[4]);
           if (call_function == Function::null()) {
-            // 'Call' could not be resolved. TODO(regis): Can this happen?
-            // Fall back to jitting the field dispatcher function.
-            break;
+            // Function 'call' could not be resolved for argdesc_.
+            // Invoke noSuchMethod.
+            const intptr_t argc =
+                receiver_idx + InterpreterHelpers::ArgDescArgCount(argdesc_);
+            RawObject* null_value = Object::null();
+            call_top[1] = null_value;
+            call_top[2] = call_base[receiver_idx];
+            call_top[3] = argdesc_;
+            call_top[4] = null_value;  // Array of arguments (will be filled).
+
+            // Allocate array of arguments.
+            {
+              call_top[5] = Smi::New(argc);  // length
+              call_top[6] = null_value;      // type
+              Exit(thread, *FP, call_top + 7, *pc);
+              NativeArguments native_args(thread, 2, call_top + 5,
+                                          call_top + 4);
+              if (!InvokeRuntime(thread, this, DRT_AllocateArray,
+                                 native_args)) {
+                return false;
+              }
+
+              // Copy arguments into the newly allocated array.
+              RawArray* array = static_cast<RawArray*>(call_top[4]);
+              ASSERT(array->GetClassId() == kArrayCid);
+              for (intptr_t i = 0; i < argc; i++) {
+                array->ptr()->data()[i] = call_base[i];
+              }
+            }
+
+            // We failed to resolve 'call' function.
+            call_top[5] = Symbols::Call().raw();
+
+            // Invoke noSuchMethod passing down receiver, argument descriptor,
+            // array of arguments, and target name.
+            {
+              Exit(thread, *FP, call_top + 6, *pc);
+              NativeArguments native_args(thread, 4, call_top + 2,
+                                          call_top + 1);
+              if (!InvokeRuntime(thread, this, DRT_InvokeNoSuchMethod,
+                                 native_args)) {
+                return false;
+              }
+            }
+            *SP = call_base;
+            **SP = call_top[1];
+            *invoked = true;
+            return true;
           }
         }
-        // Replace receiver with field value, keep all other arguments, and
-        // invoke 'call' function.
-        call_base[receiver_idx] = call_top[1];
       }
       ASSERT(call_function != Function::null());
       // Patch field dispatcher in callee frame with call function.
@@ -814,9 +843,9 @@
   callee_fp[kKBCSavedCallerFpSlotFromFp] = reinterpret_cast<RawObject*>(*FP);
   pp_ = bytecode->ptr()->object_pool_;
   *pc = reinterpret_cast<uint32_t*>(bytecode->ptr()->instructions_);
-  pc_ = reinterpret_cast<uword>(*pc);  // For the profiler.
+  NOT_IN_PRODUCT(pc_ = *pc);  // For the profiler.
   *FP = callee_fp;
-  fp_ = callee_fp;  // For the profiler.
+  NOT_IN_PRODUCT(fp_ = callee_fp);  // For the profiler.
   *SP = *FP - 1;
   return true;
 }
@@ -831,7 +860,12 @@
                                   RawObject** SP) {
   RawObject** result = top;
   top[0] = 0;  // Clean up result slot.
-  RawObject** miss_handler_args = top + 1;
+
+  // Save arguments descriptor as it may be clobbered by running Dart code
+  // during the call to miss handler (class finalization).
+  top[1] = argdesc_;
+
+  RawObject** miss_handler_args = top + 2;
   for (intptr_t i = 0; i < checked_args; i++) {
     miss_handler_args[i] = args[i];
   }
@@ -856,6 +890,8 @@
   NativeArguments native_args(thread, miss_handler_argc, miss_handler_args,
                               result);
   handler(native_args);
+
+  argdesc_ = Array::RawCast(top[1]);
 }
 
 DART_FORCE_INLINE bool Interpreter::InterfaceCall(Thread* thread,
@@ -883,7 +919,10 @@
     Exit(thread, *FP, top + 5, *pc);
     NativeArguments native_args(thread, 3, /* argv */ top + 1,
                                 /* result */ top + 4);
-    DRT_InterpretedInterfaceCallMissHandler(native_args);
+    if (!InvokeRuntime(thread, this, DRT_InterpretedInterfaceCallMissHandler,
+                       native_args)) {
+      return false;
+    }
 
     target = static_cast<RawFunction*>(top[4]);
     target_name = static_cast<RawString*>(top[2]);
@@ -1078,66 +1117,14 @@
   USE(rD)
 #define DECODE_A_X rD = (static_cast<int32_t>(op) >> KernelBytecode::kDShift);
 
-
-// Exception handling helper. Gets handler FP and PC from the Interpreter where
-// they were stored by Interpreter::Longjmp and proceeds to execute the handler.
-// Corner case: handler PC can be a fake marker that marks entry frame, which
-// means exception was not handled in the Dart code. In this case we return
-// caught exception from Interpreter::Call.
-#if defined(DEBUG)
-
 #define HANDLE_EXCEPTION                                                       \
   do {                                                                         \
-    FP = reinterpret_cast<RawObject**>(fp_);                                   \
-    pc = reinterpret_cast<uint32_t*>(pc_);                                     \
-    if (IsEntryFrameMarker(reinterpret_cast<uword>(pc))) {                     \
-      pp_ = reinterpret_cast<RawObjectPool*>(fp_[kKBCSavedPpSlotFromEntryFp]); \
-      argdesc_ =                                                               \
-          reinterpret_cast<RawArray*>(fp_[kKBCSavedArgDescSlotFromEntryFp]);   \
-      uword exit_fp =                                                          \
-          reinterpret_cast<uword>(fp_[kKBCExitLinkSlotFromEntryFp]);           \
-      thread->set_top_exit_frame_info(exit_fp);                                \
-      thread->set_top_resource(top_resource);                                  \
-      thread->set_vm_tag(vm_tag);                                              \
-      if (IsTracingExecution()) {                                              \
-        THR_Print("%" Pu64 " ", icount_);                                      \
-        THR_Print("Returning exception from interpreter 0x%" Px                \
-                  " at fp_ 0x%" Px " exit 0x%" Px "\n",                        \
-                  reinterpret_cast<uword>(this), reinterpret_cast<uword>(fp_), \
-                  exit_fp);                                                    \
-      }                                                                        \
-      ASSERT(HasFrame(reinterpret_cast<uword>(fp_)));                          \
-      return special_[KernelBytecode::kExceptionSpecialIndex];                 \
-    }                                                                          \
-    goto DispatchAfterException;                                               \
+    goto HandleException;                                                      \
   } while (0)
 
-#else  // !defined(DEBUG)
-
-#define HANDLE_EXCEPTION                                                       \
-  do {                                                                         \
-    FP = reinterpret_cast<RawObject**>(fp_);                                   \
-    pc = reinterpret_cast<uint32_t*>(pc_);                                     \
-    if (IsEntryFrameMarker(reinterpret_cast<uword>(pc))) {                     \
-      pp_ = reinterpret_cast<RawObjectPool*>(fp_[kKBCSavedPpSlotFromEntryFp]); \
-      argdesc_ =                                                               \
-          reinterpret_cast<RawArray*>(fp_[kKBCSavedArgDescSlotFromEntryFp]);   \
-      uword exit_fp =                                                          \
-          reinterpret_cast<uword>(fp_[kKBCExitLinkSlotFromEntryFp]);           \
-      thread->set_top_exit_frame_info(exit_fp);                                \
-      thread->set_top_resource(top_resource);                                  \
-      thread->set_vm_tag(vm_tag);                                              \
-      return special_[KernelBytecode::kExceptionSpecialIndex];                 \
-    }                                                                          \
-    goto DispatchAfterException;                                               \
-  } while (0)
-
-#endif  // !defined(DEBUG)
-
 #define HANDLE_RETURN                                                          \
   do {                                                                         \
     pp_ = InterpreterHelpers::FrameBytecode(FP)->ptr()->object_pool_;          \
-    fp_ = FP; /* For the profiler. */                                          \
   } while (0)
 
 // Runtime call helpers: handle invocation and potential exception after return.
@@ -1175,11 +1162,27 @@
 #define BOX_INT64_RESULT(result)                                               \
   if (LIKELY(Smi::IsValid(result))) {                                          \
     SP[0] = Smi::New(static_cast<intptr_t>(result));                           \
-  } else if (!AllocateInt64Box(thread, result, pc, FP, SP)) {                  \
+  } else if (!AllocateMint(thread, result, pc, FP, SP)) {                      \
     HANDLE_EXCEPTION;                                                          \
   }                                                                            \
   ASSERT(Integer::GetInt64Value(RAW_CAST(Integer, SP[0])) == result);
 
+#define UNBOX_DOUBLE(value, obj, selector)                                     \
+  double value;                                                                \
+  {                                                                            \
+    if (UNLIKELY(obj == null_value)) {                                         \
+      SP[0] = selector.raw();                                                  \
+      goto ThrowNullError;                                                     \
+    }                                                                          \
+    value = Double::RawCast(obj)->ptr()->value_;                               \
+  }
+
+#define BOX_DOUBLE_RESULT(result)                                              \
+  if (!AllocateDouble(thread, result, pc, FP, SP)) {                           \
+    HANDLE_EXCEPTION;                                                          \
+  }                                                                            \
+  ASSERT(Utils::DoublesBitEqual(Double::RawCast(SP[0])->ptr()->value_, result));
+
 bool Interpreter::AssertAssignable(Thread* thread,
                                    uint32_t* pc,
                                    RawObject** FP,
@@ -1271,26 +1274,22 @@
               arguments.raw_ptr()->data(), thread);
 }
 
-// Allocate _Mint box for the given int64_t value and puts it into SP[0].
+// Allocate a _Mint for the given int64_t value and puts it into SP[0].
 // Returns false on exception.
-DART_NOINLINE bool Interpreter::AllocateInt64Box(Thread* thread,
-                                                 int64_t value,
-                                                 uint32_t* pc,
-                                                 RawObject** FP,
-                                                 RawObject** SP) {
+DART_NOINLINE bool Interpreter::AllocateMint(Thread* thread,
+                                             int64_t value,
+                                             uint32_t* pc,
+                                             RawObject** FP,
+                                             RawObject** SP) {
   ASSERT(!Smi::IsValid(value));
   const intptr_t instance_size = Mint::InstanceSize();
-  const uword start =
-      thread->heap()->new_space()->TryAllocateInTLAB(thread, instance_size);
-  if (LIKELY(start != 0)) {
-    uword tags = 0;
-    tags = RawObject::ClassIdTag::update(kMintCid, tags);
-    tags = RawObject::SizeTag::update(instance_size, tags);
-    tags = RawObject::NewBit::update(true, tags);
-    // Also writes zero in the hash_ field.
-    *reinterpret_cast<uword*>(start + Mint::tags_offset()) = tags;
-    *reinterpret_cast<int64_t*>(start + Mint::value_offset()) = value;
-    SP[0] = reinterpret_cast<RawObject*>(start + kHeapObjectTag);
+  const uword start = thread->top();
+  if (LIKELY((start + instance_size) < thread->end())) {
+    thread->set_top(start + instance_size);
+    RawMint* result =
+        Mint::RawCast(InitializeHeader(start, kMintCid, instance_size));
+    result->ptr()->value_ = value;
+    SP[0] = result;
     return true;
   } else {
     SP[0] = 0;  // Space for the result.
@@ -1301,12 +1300,198 @@
     if (!InvokeRuntime(thread, this, DRT_AllocateObject, args)) {
       return false;
     }
-    *reinterpret_cast<int64_t*>(reinterpret_cast<uword>(SP[0]) -
-                                kHeapObjectTag + Mint::value_offset()) = value;
+    reinterpret_cast<RawMint*>(SP[0])->ptr()->value_ = value;
     return true;
   }
 }
 
+// Allocate a _Double for the given double value and put it into SP[0].
+// Returns false on exception.
+DART_NOINLINE bool Interpreter::AllocateDouble(Thread* thread,
+                                               double value,
+                                               uint32_t* pc,
+                                               RawObject** FP,
+                                               RawObject** SP) {
+  const intptr_t instance_size = Double::InstanceSize();
+  const uword start = thread->top();
+  if (LIKELY((start + instance_size) < thread->end())) {
+    thread->set_top(start + instance_size);
+    RawDouble* result =
+        Double::RawCast(InitializeHeader(start, kDoubleCid, instance_size));
+    result->ptr()->value_ = value;
+    SP[0] = result;
+    return true;
+  } else {
+    SP[0] = 0;  // Space for the result.
+    SP[1] = thread->isolate()->object_store()->double_class();
+    SP[2] = Object::null();  // Type arguments.
+    Exit(thread, FP, SP + 3, pc);
+    NativeArguments args(thread, 2, SP + 1, SP);
+    if (!InvokeRuntime(thread, this, DRT_AllocateObject, args)) {
+      return false;
+    }
+    Double::RawCast(SP[0])->ptr()->value_ = value;
+    return true;
+  }
+}
+
+// Allocate a _Float32x4 for the given simd value and put it into SP[0].
+// Returns false on exception.
+DART_NOINLINE bool Interpreter::AllocateFloat32x4(Thread* thread,
+                                                  simd128_value_t value,
+                                                  uint32_t* pc,
+                                                  RawObject** FP,
+                                                  RawObject** SP) {
+  const intptr_t instance_size = Float32x4::InstanceSize();
+  const uword start = thread->top();
+  if (LIKELY((start + instance_size) < thread->end())) {
+    thread->set_top(start + instance_size);
+    RawFloat32x4* result = Float32x4::RawCast(
+        InitializeHeader(start, kFloat32x4Cid, instance_size));
+    value.writeTo(result->ptr()->value_);
+    SP[0] = result;
+    return true;
+  } else {
+    SP[0] = 0;  // Space for the result.
+    SP[1] = thread->isolate()->object_store()->float32x4_class();
+    SP[2] = Object::null();  // Type arguments.
+    Exit(thread, FP, SP + 3, pc);
+    NativeArguments args(thread, 2, SP + 1, SP);
+    if (!InvokeRuntime(thread, this, DRT_AllocateObject, args)) {
+      return false;
+    }
+    value.writeTo(Float32x4::RawCast(SP[0])->ptr()->value_);
+    return true;
+  }
+}
+
+// Allocate _Float64x2 box for the given simd value and put it into SP[0].
+// Returns false on exception.
+DART_NOINLINE bool Interpreter::AllocateFloat64x2(Thread* thread,
+                                                  simd128_value_t value,
+                                                  uint32_t* pc,
+                                                  RawObject** FP,
+                                                  RawObject** SP) {
+  const intptr_t instance_size = Float64x2::InstanceSize();
+  const uword start = thread->top();
+  if (LIKELY((start + instance_size) < thread->end())) {
+    thread->set_top(start + instance_size);
+    RawFloat64x2* result = Float64x2::RawCast(
+        InitializeHeader(start, kFloat64x2Cid, instance_size));
+    value.writeTo(result->ptr()->value_);
+    SP[0] = result;
+    return true;
+  } else {
+    SP[0] = 0;  // Space for the result.
+    SP[1] = thread->isolate()->object_store()->float64x2_class();
+    SP[2] = Object::null();  // Type arguments.
+    Exit(thread, FP, SP + 3, pc);
+    NativeArguments args(thread, 2, SP + 1, SP);
+    if (!InvokeRuntime(thread, this, DRT_AllocateObject, args)) {
+      return false;
+    }
+    value.writeTo(Float64x2::RawCast(SP[0])->ptr()->value_);
+    return true;
+  }
+}
+
+// Allocate a _List with the given type arguments and length and put it into
+// SP[0]. Returns false on exception.
+bool Interpreter::AllocateArray(Thread* thread,
+                                RawTypeArguments* type_args,
+                                RawObject* length_object,
+                                uint32_t* pc,
+                                RawObject** FP,
+                                RawObject** SP) {
+  if (LIKELY(!length_object->IsHeapObject())) {
+    const intptr_t length = Smi::Value(Smi::RawCast(length_object));
+    if (LIKELY((0 <= length) && (length <= Array::kMaxElements))) {
+      const intptr_t instance_size = Array::InstanceSize(length);
+      const uword start = thread->top();
+      if (LIKELY((start + instance_size) < thread->end())) {
+        thread->set_top(start + instance_size);
+        RawArray* result =
+            Array::RawCast(InitializeHeader(start, kArrayCid, instance_size));
+        result->ptr()->type_arguments_ = type_args;
+        result->ptr()->length_ = Smi::New(length);
+        for (intptr_t i = 0; i < length; i++) {
+          result->ptr()->data()[i] = Object::null();
+        }
+        SP[0] = result;
+        return true;
+      }
+    }
+  }
+
+  SP[0] = 0;  // Space for the result;
+  SP[1] = length_object;
+  SP[2] = type_args;
+  Exit(thread, FP, SP + 3, pc);
+  NativeArguments args(thread, 2, SP + 1, SP);
+  return InvokeRuntime(thread, this, DRT_AllocateArray, args);
+}
+
+// Allocate a _Context with the given length and put it into SP[0].
+// Returns false on exception.
+bool Interpreter::AllocateContext(Thread* thread,
+                                  intptr_t num_context_variables,
+                                  uint32_t* pc,
+                                  RawObject** FP,
+                                  RawObject** SP) {
+  const intptr_t instance_size = Context::InstanceSize(num_context_variables);
+  ASSERT(Utils::IsAligned(instance_size, kObjectAlignment));
+  const uword start = thread->top();
+  if (LIKELY((start + instance_size) < thread->end())) {
+    thread->set_top(start + instance_size);
+    RawContext* result =
+        Context::RawCast(InitializeHeader(start, kContextCid, instance_size));
+    result->ptr()->num_variables_ = num_context_variables;
+    RawObject* null_value = Object::null();
+    result->ptr()->parent_ = static_cast<RawContext*>(null_value);
+    for (intptr_t offset = sizeof(RawContext); offset < instance_size;
+         offset += kWordSize) {
+      *reinterpret_cast<RawObject**>(start + offset) = null_value;
+    }
+    SP[0] = result;
+    return true;
+  } else {
+    SP[0] = 0;  // Space for the result.
+    SP[1] = Smi::New(num_context_variables);
+    Exit(thread, FP, SP + 2, pc);
+    NativeArguments args(thread, 1, SP + 1, SP);
+    return InvokeRuntime(thread, this, DRT_AllocateContext, args);
+  }
+}
+
+// Allocate a _Closure and put it into SP[0].
+// Returns false on exception.
+bool Interpreter::AllocateClosure(Thread* thread,
+                                  uint32_t* pc,
+                                  RawObject** FP,
+                                  RawObject** SP) {
+  const intptr_t instance_size = Closure::InstanceSize();
+  const uword start = thread->top();
+  if (LIKELY((start + instance_size) < thread->end())) {
+    thread->set_top(start + instance_size);
+    RawClosure* result =
+        Closure::RawCast(InitializeHeader(start, kClosureCid, instance_size));
+    RawObject* null_value = Object::null();
+    for (intptr_t offset = sizeof(RawInstance); offset < instance_size;
+         offset += kWordSize) {
+      *reinterpret_cast<RawObject**>(start + offset) = null_value;
+    }
+    SP[0] = result;
+    return true;
+  } else {
+    SP[0] = 0;  // Space for the result.
+    SP[1] = thread->isolate()->object_store()->closure_class();
+    SP[2] = Object::null();  // Type arguments.
+    Exit(thread, FP, SP + 3, pc);
+    NativeArguments args(thread, 2, SP + 1, SP);
+    return InvokeRuntime(thread, this, DRT_AllocateObject, args);
+  }
+}
+
 RawObject* Interpreter::Call(RawFunction* function,
                              RawArray* argdesc,
                              intptr_t argc,
@@ -1379,7 +1564,7 @@
   FP[kKBCFunctionSlotFromFp] = function;
   FP[kKBCPcMarkerSlotFromFp] = bytecode;
   FP[kKBCSavedCallerPcSlotFromFp] =
-      reinterpret_cast<RawObject*>((arg_count << 2) | 2);
+      reinterpret_cast<RawObject*>(kEntryFramePcMarker);
   FP[kKBCSavedCallerFpSlotFromFp] = reinterpret_cast<RawObject*>(fp_);
 
   // Load argument descriptor.
@@ -1388,8 +1573,8 @@
   // Ready to start executing bytecode. Load entry point and corresponding
   // object pool.
   pc = reinterpret_cast<uint32_t*>(bytecode->ptr()->instructions_);
-  pc_ = reinterpret_cast<uword>(pc);  // For the profiler.
-  fp_ = FP;                           // For the profiler.
+  NOT_IN_PRODUCT(pc_ = pc);  // For the profiler.
+  NOT_IN_PRODUCT(fp_ = FP);  // For the profiler.
   pp_ = bytecode->ptr()->object_pool_;
 
   // Save current VM tag and mark thread as executing Dart code. For the
@@ -1882,7 +2067,40 @@
       RawObject** call_top = SP + 1;
 
       InterpreterHelpers::IncrementUsageCounter(FrameFunction(FP));
-      RawString* target_name = static_cast<RawString*>(LOAD_CONSTANT(kidx));
+      RawString* target_name =
+          static_cast<RawFunction*>(LOAD_CONSTANT(kidx))->ptr()->name_;
+      argdesc_ = static_cast<RawArray*>(LOAD_CONSTANT(kidx + 1));
+      if (!InterfaceCall(thread, target_name, call_base, call_top, &pc, &FP,
+                         &SP)) {
+        HANDLE_EXCEPTION;
+      }
+    }
+
+    DISPATCH();
+  }
+
+  {
+    BYTECODE(UncheckedInterfaceCall, A_D);
+
+#ifndef PRODUCT
+    // Check if single stepping.
+    if (thread->isolate()->single_step()) {
+      Exit(thread, FP, SP + 1, pc);
+      NativeArguments args(thread, 0, NULL, NULL);
+      INVOKE_RUNTIME(DRT_SingleStepHandler, args);
+    }
+#endif  // !PRODUCT
+
+    {
+      const uint16_t argc = rA;
+      const uint16_t kidx = rD;
+
+      RawObject** call_base = SP - argc + 1;
+      RawObject** call_top = SP + 1;
+
+      InterpreterHelpers::IncrementUsageCounter(FrameFunction(FP));
+      RawString* target_name =
+          static_cast<RawFunction*>(LOAD_CONSTANT(kidx))->ptr()->name_;
       argdesc_ = static_cast<RawArray*>(LOAD_CONSTANT(kidx + 1));
       if (!InterfaceCall(thread, target_name, call_base, call_top, &pc, &FP,
                          &SP)) {
@@ -1963,10 +2181,12 @@
         SP[0] = reinterpret_cast<RawObject**>(
             instance->ptr())[Array::length_offset() / kWordSize];
       } break;
-      case MethodRecognizer::kTypedDataLength: {
-        RawInstance* instance = reinterpret_cast<RawInstance*>(SP[0]);
+      case MethodRecognizer::kTypedListLength:
+      case MethodRecognizer::kTypedListViewLength:
+      case MethodRecognizer::kByteDataViewLength: {
+        RawInstance* instance = reinterpret_cast<RawTypedDataBase*>(SP[0]);
         SP[0] = reinterpret_cast<RawObject**>(
-            instance->ptr())[TypedData::length_offset() / kWordSize];
+            instance->ptr())[TypedDataBase::length_offset() / kWordSize];
       } break;
       case MethodRecognizer::kClassIDgetID: {
         SP[0] = InterpreterHelpers::GetClassIdAsSmi(SP[0]);
@@ -1984,12 +2204,12 @@
         //                                            : new _GrowableList<E>(0);
         // }
         if (InterpreterHelpers::ArgDescPosCount(argdesc_) == 2) {
-          SP[1] = SP[0];   // length
-          SP[2] = SP[-1];  // type
-          Exit(thread, FP, SP + 3, pc);
-          NativeArguments native_args(thread, 2, SP + 1, SP - 1);
-          INVOKE_RUNTIME(DRT_AllocateArray, native_args);
-          SP -= 1;  // Result is in SP - 1.
+          RawTypeArguments* type_args = TypeArguments::RawCast(SP[-1]);
+          RawObject* length = SP[0];
+          SP--;
+          if (!AllocateArray(thread, type_args, length, pc, FP, SP)) {
+            HANDLE_EXCEPTION;
+          }
         } else {
           ASSERT(InterpreterHelpers::ArgDescPosCount(argdesc_) == 1);
           // SP[-1] is type.
@@ -2007,12 +2227,12 @@
         }
       } break;
       case MethodRecognizer::kObjectArrayAllocate: {
-        SP[1] = SP[0];   // length
-        SP[2] = SP[-1];  // type
-        Exit(thread, FP, SP + 3, pc);
-        NativeArguments native_args(thread, 2, SP + 1, SP - 1);
-        INVOKE_RUNTIME(DRT_AllocateArray, native_args);
-        SP -= 1;  // Result is in SP - 1.
+        RawTypeArguments* type_args = TypeArguments::RawCast(SP[-1]);
+        RawObject* length = SP[0];
+        SP--;
+        if (!AllocateArray(thread, type_args, length, pc, FP, SP)) {
+          HANDLE_EXCEPTION;
+        }
       } break;
       case MethodRecognizer::kLinkedHashMap_getIndex: {
         RawInstance* instance = reinterpret_cast<RawInstance*>(SP[0]);
@@ -2116,20 +2336,23 @@
     result = *SP;
     // Restore caller PC.
     pc = SavedCallerPC(FP);
-    pc_ = reinterpret_cast<uword>(pc);  // For the profiler.
 
     // Check if it is a fake PC marking the entry frame.
-    if (IsEntryFrameMarker(reinterpret_cast<uword>(pc))) {
+    if (IsEntryFrameMarker(pc)) {
       // Pop entry frame.
-      fp_ = SavedCallerFP(FP);
+      RawObject** entry_fp = SavedCallerFP(FP);
       // Restore exit frame info saved in entry frame.
-      pp_ = reinterpret_cast<RawObjectPool*>(fp_[kKBCSavedPpSlotFromEntryFp]);
-      argdesc_ =
-          reinterpret_cast<RawArray*>(fp_[kKBCSavedArgDescSlotFromEntryFp]);
-      uword exit_fp = reinterpret_cast<uword>(fp_[kKBCExitLinkSlotFromEntryFp]);
+      pp_ = reinterpret_cast<RawObjectPool*>(
+          entry_fp[kKBCSavedPpSlotFromEntryFp]);
+      argdesc_ = reinterpret_cast<RawArray*>(
+          entry_fp[kKBCSavedArgDescSlotFromEntryFp]);
+      uword exit_fp =
+          reinterpret_cast<uword>(entry_fp[kKBCExitLinkSlotFromEntryFp]);
       thread->set_top_exit_frame_info(exit_fp);
       thread->set_top_resource(top_resource);
       thread->set_vm_tag(vm_tag);
+      fp_ = entry_fp;
+      NOT_IN_PRODUCT(pc_ = pc);  // For the profiler.
 #if defined(DEBUG)
       if (IsTracingExecution()) {
         THR_Print("%" Pu64 " ", icount_);
@@ -2139,8 +2362,6 @@
                   exit_fp);
       }
       ASSERT(HasFrame(reinterpret_cast<uword>(fp_)));
-      const intptr_t argc = reinterpret_cast<uword>(pc) >> 2;
-      ASSERT(fp_ == FrameArguments(FP, argc + kKBCEntrySavedSlots));
       // Exception propagation should have been done.
       ASSERT(!result->IsHeapObject() ||
              result->GetClassId() != kUnhandledExceptionCid);
@@ -2154,7 +2375,8 @@
     // Restore SP, FP and PP. Push result and dispatch.
     SP = FrameArguments(FP, argc);
     FP = SavedCallerFP(FP);
-    fp_ = FP;  // For the profiler.
+    NOT_IN_PRODUCT(fp_ = FP);  // For the profiler.
+    NOT_IN_PRODUCT(pc_ = pc);  // For the profiler.
     pp_ = InterpreterHelpers::FrameBytecode(FP)->ptr()->object_pool_;
     *SP = result;
     DISPATCH();
@@ -2178,19 +2400,76 @@
 
   {
     BYTECODE(StoreFieldTOS, __D);
-    const uword offset_in_words =
-        static_cast<uword>(Smi::Value(RAW_CAST(Smi, LOAD_CONSTANT(rD))));
+    RawField* field = RAW_CAST(Field, LOAD_CONSTANT(rD + 1));
     RawInstance* instance = reinterpret_cast<RawInstance*>(SP[-1]);
     RawObject* value = reinterpret_cast<RawObject*>(SP[0]);
+    intptr_t offset_in_words = Smi::Value(field->ptr()->value_.offset_);
+
+    if (InterpreterHelpers::FieldNeedsGuardUpdate(field, value)) {
+      SP[1] = 0;  // Unused result of runtime call.
+      SP[2] = field;
+      SP[3] = value;
+      Exit(thread, FP, SP + 4, pc);
+      NativeArguments args(thread, 2, /* argv */ SP + 2, /* retval */ SP + 1);
+      if (!InvokeRuntime(thread, this, DRT_UpdateFieldCid, args)) {
+        HANDLE_EXCEPTION;
+      }
+
+      // Reload objects after the call which may trigger GC.
+      field = RAW_CAST(Field, LOAD_CONSTANT(rD + 1));
+      instance = reinterpret_cast<RawInstance*>(SP[-1]);
+      value = SP[0];
+    }
+
+    const bool unboxing =
+        (field->ptr()->is_nullable_ != kNullCid) &&
+        Field::UnboxingCandidateBit::decode(field->ptr()->kind_bits_);
+    classid_t guarded_cid = field->ptr()->guarded_cid_;
+    if (unboxing && (guarded_cid == kDoubleCid)) {
+      double raw_value = Double::RawCast(value)->ptr()->value_;
+      ASSERT(*(reinterpret_cast<RawDouble**>(instance->ptr()) +
+               offset_in_words) == null_value);  // Initializing store.
+      if (!AllocateDouble(thread, raw_value, pc, FP, SP)) {
+        HANDLE_EXCEPTION;
+      }
+      RawDouble* box = Double::RawCast(SP[0]);
+      instance = reinterpret_cast<RawInstance*>(SP[-1]);
+      instance->StorePointer(
+          reinterpret_cast<RawDouble**>(instance->ptr()) + offset_in_words, box,
+          thread);
+    } else if (unboxing && (guarded_cid == kFloat32x4Cid)) {
+      simd128_value_t raw_value;
+      raw_value.readFrom(Float32x4::RawCast(value)->ptr()->value_);
+      ASSERT(*(reinterpret_cast<RawFloat32x4**>(instance->ptr()) +
+               offset_in_words) == null_value);  // Initializing store.
+      if (!AllocateFloat32x4(thread, raw_value, pc, FP, SP)) {
+        HANDLE_EXCEPTION;
+      }
+      RawFloat32x4* box = Float32x4::RawCast(SP[0]);
+      instance = reinterpret_cast<RawInstance*>(SP[-1]);
+      instance->StorePointer(
+          reinterpret_cast<RawFloat32x4**>(instance->ptr()) + offset_in_words,
+          box, thread);
+    } else if (unboxing && (guarded_cid == kFloat64x2Cid)) {
+      simd128_value_t raw_value;
+      raw_value.readFrom(Float64x2::RawCast(value)->ptr()->value_);
+      ASSERT(*(reinterpret_cast<RawFloat64x2**>(instance->ptr()) +
+               offset_in_words) == null_value);  // Initializing store.
+      if (!AllocateFloat64x2(thread, raw_value, pc, FP, SP)) {
+        HANDLE_EXCEPTION;
+      }
+      RawFloat64x2* box = Float64x2::RawCast(SP[0]);
+      instance = reinterpret_cast<RawInstance*>(SP[-1]);
+      instance->StorePointer(
+          reinterpret_cast<RawFloat64x2**>(instance->ptr()) + offset_in_words,
+          box, thread);
+    } else {
+      instance->StorePointer(
+          reinterpret_cast<RawObject**>(instance->ptr()) + offset_in_words,
+          value, thread);
+    }
+
     SP -= 2;  // Drop instance and value.
-
-    // TODO(regis): Implement cid guard.
-    ASSERT(!thread->isolate()->use_field_guards());
-
-    instance->StorePointer(
-        reinterpret_cast<RawObject**>(instance->ptr()) + offset_in_words, value,
-        thread);
-
     DISPATCH();
   }
 
@@ -2226,6 +2505,16 @@
 
   {
     BYTECODE(LoadFieldTOS, __D);
+#if defined(DEBUG)
+    // Currently only used to load closure fields, which are not unboxed.
+    // If used for general field, code for copying the mutable box must be
+    // added.
+    RawField* field = RAW_CAST(Field, LOAD_CONSTANT(rD + 1));
+    const bool unboxing =
+        (field->ptr()->is_nullable_ != kNullCid) &&
+        Field::UnboxingCandidateBit::decode(field->ptr()->kind_bits_);
+    ASSERT(!unboxing);
+#endif
     const uword offset_in_words =
         static_cast<uword>(Smi::Value(RAW_CAST(Smi, LOAD_CONSTANT(rD))));
     RawInstance* instance = static_cast<RawInstance*>(SP[0]);
@@ -2261,17 +2550,12 @@
     DISPATCH();
   }
 
-  // TODO(vegorov) allocation bytecodes can benefit from the new-space
-  // allocation fast-path that does not transition into the runtime system.
   {
     BYTECODE(AllocateContext, A_D);
+    ++SP;
     const uint16_t num_context_variables = rD;
-    {
-      *++SP = 0;
-      SP[1] = Smi::New(num_context_variables);
-      Exit(thread, FP, SP + 2, pc);
-      NativeArguments args(thread, 1, SP + 1, SP);
-      INVOKE_RUNTIME(DRT_AllocateContext, args);
+    if (!AllocateContext(thread, num_context_variables, pc, FP, SP)) {
+      HANDLE_EXCEPTION;
     }
     DISPATCH();
   }
@@ -2289,9 +2573,27 @@
 
   {
     BYTECODE(Allocate, A_D);
-    SP[1] = 0;                  // Space for the result.
-    SP[2] = LOAD_CONSTANT(rD);  // Class object.
-    SP[3] = null_value;         // Type arguments.
+    RawClass* cls = Class::RawCast(LOAD_CONSTANT(rD));
+    if (LIKELY(InterpreterHelpers::IsFinalized(cls))) {
+      const intptr_t class_id = cls->ptr()->id_;
+      const intptr_t instance_size = cls->ptr()->instance_size_in_words_
+                                     << kWordSizeLog2;
+      const uword start = thread->top();
+      if (LIKELY((start + instance_size) < thread->end())) {
+        thread->set_top(start + instance_size);
+        RawObject* result = InitializeHeader(start, class_id, instance_size);
+        for (intptr_t offset = sizeof(RawInstance); offset < instance_size;
+             offset += kWordSize) {
+          *reinterpret_cast<RawObject**>(start + offset) = null_value;
+        }
+        *++SP = result;
+        DISPATCH();
+      }
+    }
+
+    SP[1] = 0;           // Space for the result.
+    SP[2] = cls;         // Class object.
+    SP[3] = null_value;  // Type arguments.
     Exit(thread, FP, SP + 4, pc);
     NativeArguments args(thread, 2, SP + 2, SP + 1);
     INVOKE_RUNTIME(DRT_AllocateObject, args);
@@ -2301,8 +2603,30 @@
 
   {
     BYTECODE(AllocateT, 0);
-    SP[1] = SP[-0];  // Class object.
-    SP[2] = SP[-1];  // Type arguments
+    RawClass* cls = Class::RawCast(SP[0]);
+    RawTypeArguments* type_args = TypeArguments::RawCast(SP[-1]);
+    if (LIKELY(InterpreterHelpers::IsFinalized(cls))) {
+      const intptr_t class_id = cls->ptr()->id_;
+      const intptr_t instance_size = cls->ptr()->instance_size_in_words_
+                                     << kWordSizeLog2;
+      const uword start = thread->top();
+      if (LIKELY((start + instance_size) < thread->end())) {
+        thread->set_top(start + instance_size);
+        RawObject* result = InitializeHeader(start, class_id, instance_size);
+        for (intptr_t offset = sizeof(RawInstance); offset < instance_size;
+             offset += kWordSize) {
+          *reinterpret_cast<RawObject**>(start + offset) = null_value;
+        }
+        const intptr_t type_args_offset =
+            cls->ptr()->type_arguments_field_offset_in_words_ << kWordSizeLog2;
+        *reinterpret_cast<RawObject**>(start + type_args_offset) = type_args;
+        *--SP = result;
+        DISPATCH();
+      }
+    }
+
+    SP[1] = cls;
+    SP[2] = type_args;
     Exit(thread, FP, SP + 3, pc);
     NativeArguments args(thread, 2, SP + 1, SP - 1);
     INVOKE_RUNTIME(DRT_AllocateObject, args);
@@ -2312,12 +2636,12 @@
 
   {
     BYTECODE(CreateArrayTOS, 0);
-    SP[1] = SP[-0];  // Length.
-    SP[2] = SP[-1];  // Type.
-    Exit(thread, FP, SP + 3, pc);
-    NativeArguments args(thread, 2, SP + 1, SP - 1);
-    INVOKE_RUNTIME(DRT_AllocateArray, args);
-    SP -= 1;
+    RawTypeArguments* type_args = TypeArguments::RawCast(SP[-1]);
+    RawObject* length = SP[0];
+    SP--;
+    if (!AllocateArray(thread, type_args, length, pc, FP, SP)) {
+      HANDLE_EXCEPTION;
+    }
     DISPATCH();
   }
 
@@ -2681,11 +3005,350 @@
   }
 
   {
+    BYTECODE(NegateDouble, 0);
+    UNBOX_DOUBLE(value, SP[0], Symbols::UnaryMinus());
+    double result = -value;
+    BOX_DOUBLE_RESULT(result);
+    DISPATCH();
+  }
+
+  {
+    BYTECODE(AddDouble, 0);
+    SP -= 1;
+    UNBOX_DOUBLE(a, SP[0], Symbols::Plus());
+    UNBOX_DOUBLE(b, SP[1], Symbols::Plus());
+    double result = a + b;
+    BOX_DOUBLE_RESULT(result);
+    DISPATCH();
+  }
+
+  {
+    BYTECODE(SubDouble, 0);
+    SP -= 1;
+    UNBOX_DOUBLE(a, SP[0], Symbols::Minus());
+    UNBOX_DOUBLE(b, SP[1], Symbols::Minus());
+    double result = a - b;
+    BOX_DOUBLE_RESULT(result);
+    DISPATCH();
+  }
+
+  {
+    BYTECODE(MulDouble, 0);
+    SP -= 1;
+    UNBOX_DOUBLE(a, SP[0], Symbols::Star());
+    UNBOX_DOUBLE(b, SP[1], Symbols::Star());
+    double result = a * b;
+    BOX_DOUBLE_RESULT(result);
+    DISPATCH();
+  }
+
+  {
+    BYTECODE(DivDouble, 0);
+    SP -= 1;
+    UNBOX_DOUBLE(a, SP[0], Symbols::Slash());
+    UNBOX_DOUBLE(b, SP[1], Symbols::Slash());
+    double result = a / b;
+    BOX_DOUBLE_RESULT(result);
+    DISPATCH();
+  }
+
+  {
+    BYTECODE(CompareDoubleEq, 0);
+    SP -= 1;
+    if ((SP[0] == null_value) || (SP[1] == null_value)) {
+      SP[0] = (SP[0] == SP[1]) ? true_value : false_value;
+    } else {
+      double a = Double::RawCast(SP[0])->ptr()->value_;
+      double b = Double::RawCast(SP[1])->ptr()->value_;
+      SP[0] = (a == b) ? true_value : false_value;
+    }
+    DISPATCH();
+  }
+
+  {
+    BYTECODE(CompareDoubleGt, 0);
+    SP -= 1;
+    UNBOX_DOUBLE(a, SP[0], Symbols::RAngleBracket());
+    UNBOX_DOUBLE(b, SP[1], Symbols::RAngleBracket());
+    SP[0] = (a > b) ? true_value : false_value;
+    DISPATCH();
+  }
+
+  {
+    BYTECODE(CompareDoubleLt, 0);
+    SP -= 1;
+    UNBOX_DOUBLE(a, SP[0], Symbols::LAngleBracket());
+    UNBOX_DOUBLE(b, SP[1], Symbols::LAngleBracket());
+    SP[0] = (a < b) ? true_value : false_value;
+    DISPATCH();
+  }
+
+  {
+    BYTECODE(CompareDoubleGe, 0);
+    SP -= 1;
+    UNBOX_DOUBLE(a, SP[0], Symbols::GreaterEqualOperator());
+    UNBOX_DOUBLE(b, SP[1], Symbols::GreaterEqualOperator());
+    SP[0] = (a >= b) ? true_value : false_value;
+    DISPATCH();
+  }
+
+  {
+    BYTECODE(CompareDoubleLe, 0);
+    SP -= 1;
+    UNBOX_DOUBLE(a, SP[0], Symbols::LessEqualOperator());
+    UNBOX_DOUBLE(b, SP[1], Symbols::LessEqualOperator());
+    SP[0] = (a <= b) ? true_value : false_value;
+    DISPATCH();
+  }
+
+  {
+    BYTECODE(AllocateClosure, A_D);
+    ++SP;
+    if (!AllocateClosure(thread, pc, FP, SP)) {
+      HANDLE_EXCEPTION;
+    }
+    DISPATCH();
+  }
+
+  {
     BYTECODE(Trap, 0);
     UNIMPLEMENTED();
     DISPATCH();
   }
 
+  {
+    BYTECODE(VMInternal_ImplicitGetter, 0);
+
+    RawFunction* function = FrameFunction(FP);
+    int32_t counter = ++(function->ptr()->usage_counter_);
+    if (UNLIKELY(FLAG_compilation_counter_threshold >= 0 &&
+                 counter >= FLAG_compilation_counter_threshold &&
+                 !Function::HasCode(function))) {
+      SP[1] = 0;  // Unused code result.
+      SP[2] = function;
+      Exit(thread, FP, SP + 3, pc);
+      NativeArguments native_args(thread, 1, SP + 2, SP + 1);
+      INVOKE_RUNTIME(DRT_OptimizeInvokedFunction, native_args);
+      function = FrameFunction(FP);
+    }
+
+    // Field object is cached in function's data_.
+    RawField* field = reinterpret_cast<RawField*>(function->ptr()->data_);
+    intptr_t offset_in_words = Smi::Value(field->ptr()->value_.offset_);
+
+    const intptr_t kArgc = 1;
+    RawInstance* instance =
+        reinterpret_cast<RawInstance*>(FrameArguments(FP, kArgc)[0]);
+    RawObject* value =
+        reinterpret_cast<RawObject**>(instance->ptr())[offset_in_words];
+
+    *++SP = value;
+
+    const bool unboxing =
+        (field->ptr()->is_nullable_ != kNullCid) &&
+        Field::UnboxingCandidateBit::decode(field->ptr()->kind_bits_);
+    classid_t guarded_cid = field->ptr()->guarded_cid_;
+    if (unboxing && (guarded_cid == kDoubleCid)) {
+      double raw_value = Double::RawCast(value)->ptr()->value_;
+      // AllocateDouble places result at SP[0]
+      if (!AllocateDouble(thread, raw_value, pc, FP, SP)) {
+        HANDLE_EXCEPTION;
+      }
+    } else if (unboxing && (guarded_cid == kFloat32x4Cid)) {
+      simd128_value_t raw_value;
+      raw_value.readFrom(Float32x4::RawCast(value)->ptr()->value_);
+      // AllocateFloat32x4 places result at SP[0]
+      if (!AllocateFloat32x4(thread, raw_value, pc, FP, SP)) {
+        HANDLE_EXCEPTION;
+      }
+    } else if (unboxing && (guarded_cid == kFloat64x2Cid)) {
+      simd128_value_t raw_value;
+      raw_value.readFrom(Float64x2::RawCast(value)->ptr()->value_);
+      // AllocateFloat64x2 places result at SP[0]
+      if (!AllocateFloat64x2(thread, raw_value, pc, FP, SP)) {
+        HANDLE_EXCEPTION;
+      }
+    }
+
+    DISPATCH();
+  }
+
+  {
+    BYTECODE(VMInternal_ImplicitSetter, 0);
+
+    RawFunction* function = FrameFunction(FP);
+    int32_t counter = ++(function->ptr()->usage_counter_);
+    if (UNLIKELY(FLAG_compilation_counter_threshold >= 0 &&
+                 counter >= FLAG_compilation_counter_threshold &&
+                 !Function::HasCode(function))) {
+      SP[1] = 0;  // Unused code result.
+      SP[2] = function;
+      Exit(thread, FP, SP + 3, pc);
+      NativeArguments native_args(thread, 1, SP + 2, SP + 1);
+      INVOKE_RUNTIME(DRT_OptimizeInvokedFunction, native_args);
+      function = FrameFunction(FP);
+    }
+
+    // Field object is cached in function's data_.
+    RawField* field = reinterpret_cast<RawField*>(function->ptr()->data_);
+    intptr_t offset_in_words = Smi::Value(field->ptr()->value_.offset_);
+    const intptr_t kArgc = 2;
+    RawInstance* instance =
+        reinterpret_cast<RawInstance*>(FrameArguments(FP, kArgc)[0]);
+    RawObject* value = FrameArguments(FP, kArgc)[1];
+
+    RawAbstractType* field_type = field->ptr()->type_;
+    classid_t cid;
+    if (field_type->GetClassId() == kTypeCid) {
+      cid = Smi::Value(reinterpret_cast<RawSmi*>(
+          Type::RawCast(field_type)->ptr()->type_class_id_));
+    } else {
+      cid = kIllegalCid;  // Not really illegal, but not a Type to skip.
+    }
+    // Perform type test of value if field type is not one of dynamic, object,
+    // or void, and if the value is not null.
+    RawObject* null_value = Object::null();
+    if (cid != kDynamicCid && cid != kInstanceCid && cid != kVoidCid &&
+        value != null_value) {
+      RawSubtypeTestCache* cache = field->ptr()->type_test_cache_;
+      if (cache->GetClassId() != kSubtypeTestCacheCid) {
+        // Allocate new cache.
+        SP[1] = null_value;  // Result.
+
+        Exit(thread, FP, SP + 2, pc);
+        NativeArguments native_args(thread, 0, /* argv */ SP + 1,
+                                    /* retval */ SP + 1);
+        if (!InvokeRuntime(thread, this, DRT_AllocateSubtypeTestCache,
+                           native_args)) {
+          HANDLE_EXCEPTION;
+        }
+
+        // Reload objects after the call which may trigger GC.
+        field = reinterpret_cast<RawField*>(FrameFunction(FP)->ptr()->data_);
+        field_type = field->ptr()->type_;
+        instance = reinterpret_cast<RawInstance*>(FrameArguments(FP, kArgc)[0]);
+        value = FrameArguments(FP, kArgc)[1];
+        cache = reinterpret_cast<RawSubtypeTestCache*>(SP[1]);
+        field->ptr()->type_test_cache_ = cache;
+      }
+
+      // Push arguments of type test.
+      SP[1] = value;
+      SP[2] = field_type;
+      // Provide type arguments of instance as instantiator.
+      SP[3] = InterpreterHelpers::GetTypeArguments(thread, instance);
+      SP[4] = null_value;  // Implicit setters cannot be generic.
+      SP[5] = field->ptr()->name_;
+      if (!AssertAssignable(thread, pc, FP, /* argv */ SP + 5,
+                            /* reval */ SP + 1, cache)) {
+        HANDLE_EXCEPTION;
+      }
+
+      // Reload objects after the call which may trigger GC.
+      field = reinterpret_cast<RawField*>(FrameFunction(FP)->ptr()->data_);
+      instance = reinterpret_cast<RawInstance*>(FrameArguments(FP, kArgc)[0]);
+      value = FrameArguments(FP, kArgc)[1];
+    }
+
+    if (InterpreterHelpers::FieldNeedsGuardUpdate(field, value)) {
+      SP[1] = 0;  // Unused result of runtime call.
+      SP[2] = field;
+      SP[3] = value;
+      Exit(thread, FP, SP + 4, pc);
+      NativeArguments native_args(thread, 2, /* argv */ SP + 2,
+                                  /* retval */ SP + 1);
+      if (!InvokeRuntime(thread, this, DRT_UpdateFieldCid, native_args)) {
+        HANDLE_EXCEPTION;
+      }
+
+      // Reload objects after the call which may trigger GC.
+      instance = reinterpret_cast<RawInstance*>(FrameArguments(FP, kArgc)[0]);
+      value = FrameArguments(FP, kArgc)[1];
+    }
+
+    const bool unboxing =
+        (field->ptr()->is_nullable_ != kNullCid) &&
+        Field::UnboxingCandidateBit::decode(field->ptr()->kind_bits_);
+    classid_t guarded_cid = field->ptr()->guarded_cid_;
+    if (unboxing && (guarded_cid == kDoubleCid)) {
+      double raw_value = Double::RawCast(value)->ptr()->value_;
+      RawDouble* box =
+          *(reinterpret_cast<RawDouble**>(instance->ptr()) + offset_in_words);
+      ASSERT(box != null_value);  // Non-initializing store.
+      box->ptr()->value_ = raw_value;
+    } else if (unboxing && (guarded_cid == kFloat32x4Cid)) {
+      simd128_value_t raw_value;
+      raw_value.readFrom(Float32x4::RawCast(value)->ptr()->value_);
+      RawFloat32x4* box = *(reinterpret_cast<RawFloat32x4**>(instance->ptr()) +
+                            offset_in_words);
+      ASSERT(box != null_value);  // Non-initializing store.
+      raw_value.writeTo(box->ptr()->value_);
+    } else if (unboxing && (guarded_cid == kFloat64x2Cid)) {
+      simd128_value_t raw_value;
+      raw_value.readFrom(Float64x2::RawCast(value)->ptr()->value_);
+      RawFloat64x2* box = *(reinterpret_cast<RawFloat64x2**>(instance->ptr()) +
+                            offset_in_words);
+      ASSERT(box != null_value);  // Non-initializing store.
+      raw_value.writeTo(box->ptr()->value_);
+    } else {
+      instance->StorePointer(
+          reinterpret_cast<RawObject**>(instance->ptr()) + offset_in_words,
+          value, thread);
+    }
+
+    *++SP = null_value;
+
+    DISPATCH();
+  }
+
+  {
+    BYTECODE(VMInternal_MethodExtractor, 0);
+
+    RawFunction* function = FrameFunction(FP);
+    int32_t counter = ++(function->ptr()->usage_counter_);
+    if (UNLIKELY(FLAG_compilation_counter_threshold >= 0 &&
+                 counter >= FLAG_compilation_counter_threshold &&
+                 !Function::HasCode(function))) {
+      SP[1] = 0;  // Unused code result.
+      SP[2] = function;
+      Exit(thread, FP, SP + 3, pc);
+      NativeArguments native_args(thread, 1, SP + 2, SP + 1);
+      INVOKE_RUNTIME(DRT_OptimizeInvokedFunction, native_args);
+      function = FrameFunction(FP);
+    }
+
+    ASSERT(InterpreterHelpers::ArgDescTypeArgsLen(argdesc_) == 0);
+
+    ++SP;
+    if (!AllocateClosure(thread, pc, FP, SP)) {
+      HANDLE_EXCEPTION;
+    }
+
+    ++SP;
+    if (!AllocateContext(thread, 1, pc, FP, SP)) {
+      HANDLE_EXCEPTION;
+    }
+
+    RawContext* context = Context::RawCast(*SP--);
+    RawInstance* instance = Instance::RawCast(FrameArguments(FP, 1)[0]);
+    context->StorePointer(
+        reinterpret_cast<RawInstance**>(&context->ptr()->data()[0]), instance);
+
+    RawClosure* closure = Closure::RawCast(*SP);
+    closure->StorePointer(
+        &closure->ptr()->instantiator_type_arguments_,
+        InterpreterHelpers::GetTypeArguments(thread, instance));
+    // function_type_arguments_ is already null
+    closure->ptr()->delayed_type_arguments_ =
+        Object::empty_type_arguments().raw();
+    closure->StorePointer(&closure->ptr()->function_,
+                          Function::RawCast(FrameFunction(FP)->ptr()->data_));
+    closure->StorePointer(&closure->ptr()->context_, context);
+    // hash_ is already null
+
+    DISPATCH();
+  }
+
   // Helper used to handle noSuchMethod on closures.
   {
   ClosureNoSuchMethod:
@@ -2697,18 +3360,17 @@
     // Restore caller context as we are going to throw NoSuchMethod.
     pc = SavedCallerPC(FP);
 
-    const bool has_dart_caller =
-        !IsEntryFrameMarker(reinterpret_cast<uword>(pc));
-    const intptr_t argc = has_dart_caller ? KernelBytecode::DecodeArgc(pc[-1])
-                                          : (reinterpret_cast<uword>(pc) >> 2);
+    const bool has_dart_caller = !IsEntryFrameMarker(pc);
     const intptr_t type_args_len =
         InterpreterHelpers::ArgDescTypeArgsLen(argdesc_);
     const intptr_t receiver_idx = type_args_len > 0 ? 1 : 0;
+    const intptr_t argc =
+        InterpreterHelpers::ArgDescArgCount(argdesc_) + receiver_idx;
 
     SP = FrameArguments(FP, 0);
     RawObject** args = SP - argc;
     FP = SavedCallerFP(FP);
-    fp_ = FP;  // For the profiler.
+    NOT_IN_PRODUCT(fp_ = FP);  // For the profiler.
     if (has_dart_caller) {
       pp_ = InterpreterHelpers::FrameBytecode(FP)->ptr()->object_pool_;
     }
@@ -2779,9 +3441,36 @@
     UNREACHABLE();
   }
 
-  // Single dispatch point used by exception handling macros.
+  // Exception handling helper. Gets handler FP and PC from the Interpreter
+  // where they were stored by Interpreter::Longjmp and proceeds to execute the
+  // handler. Corner case: handler PC can be a fake marker that marks entry
+  // frame, which means exception was not handled in the interpreter. In this
+  // case we return the caught exception from Interpreter::Call.
   {
-  DispatchAfterException:
+  HandleException:
+    FP = fp_;
+    pc = pc_;
+    if (IsEntryFrameMarker(pc)) {
+      pp_ = reinterpret_cast<RawObjectPool*>(fp_[kKBCSavedPpSlotFromEntryFp]);
+      argdesc_ =
+          reinterpret_cast<RawArray*>(fp_[kKBCSavedArgDescSlotFromEntryFp]);
+      uword exit_fp = reinterpret_cast<uword>(fp_[kKBCExitLinkSlotFromEntryFp]);
+      thread->set_top_exit_frame_info(exit_fp);
+      thread->set_top_resource(top_resource);
+      thread->set_vm_tag(vm_tag);
+#if defined(DEBUG)
+      if (IsTracingExecution()) {
+        THR_Print("%" Pu64 " ", icount_);
+        THR_Print("Returning exception from interpreter 0x%" Px " at fp_ 0x%" Px
+                  " exit 0x%" Px "\n",
+                  reinterpret_cast<uword>(this), reinterpret_cast<uword>(fp_),
+                  exit_fp);
+      }
+#endif
+      ASSERT(HasFrame(reinterpret_cast<uword>(fp_)));
+      return special_[KernelBytecode::kExceptionSpecialIndex];
+    }
+
     pp_ = InterpreterHelpers::FrameBytecode(FP)->ptr()->object_pool_;
     DISPATCH();
   }
@@ -2817,9 +3506,9 @@
     thread->set_active_stacktrace(Object::null_object());
     special_[KernelBytecode::kExceptionSpecialIndex] = raw_exception;
     special_[KernelBytecode::kStackTraceSpecialIndex] = raw_stacktrace;
-    pc_ = thread->resume_pc();
+    pc_ = reinterpret_cast<uint32_t*>(thread->resume_pc());
   } else {
-    pc_ = pc;
+    pc_ = reinterpret_cast<uint32_t*>(pc);
   }
 
   // Set the tag.
diff --git a/runtime/vm/interpreter.h b/runtime/vm/interpreter.h
index 4e98f3e..e8fe9db 100644
--- a/runtime/vm/interpreter.h
+++ b/runtime/vm/interpreter.h
@@ -26,6 +26,7 @@
 class RawFunction;
 class RawString;
 class RawSubtypeTestCache;
+class RawTypeArguments;
 class ObjectPointerVisitor;
 
 class LookupCache : public ValueObject {
@@ -70,6 +71,8 @@
 class Interpreter {
  public:
   static const uword kInterpreterStackUnderflowSize = 0x80;
+  // The entry frame pc marker must be non-zero (a valid exception handler pc).
+  static const word kEntryFramePcMarker = -1;
 
   Interpreter();
   ~Interpreter();
@@ -93,7 +96,9 @@
   }
 
   // Identify an entry frame by looking at its pc marker value.
-  static bool IsEntryFrameMarker(uword pc) { return (pc & 2) != 0; }
+  static bool IsEntryFrameMarker(uint32_t* pc) {
+    return reinterpret_cast<word>(pc) == kEntryFramePcMarker;
+  }
 
   RawObject* Call(const Function& function,
                   const Array& arguments_descriptor,
@@ -110,7 +115,9 @@
 
   uword get_sp() const { return reinterpret_cast<uword>(fp_); }  // Yes, fp_.
   uword get_fp() const { return reinterpret_cast<uword>(fp_); }
-  uword get_pc() const { return pc_; }
+  uword get_pc() const { return reinterpret_cast<uword>(pc_); }
+
+  void Unexit(Thread* thread);
 
   void VisitObjectPointers(ObjectPointerVisitor* visitor);
   void MajorGC() { lookup_cache_.Clear(); }
@@ -121,8 +128,8 @@
   uword overflow_stack_limit_;
   uword stack_limit_;
 
-  RawObject** fp_;
-  uword pc_;
+  RawObject** volatile fp_;
+  uint32_t* volatile pc_;
   DEBUG_ONLY(uint64_t icount_;)
 
   InterpreterSetjmpBuffer* last_setjmp_buffer_;
@@ -205,11 +212,41 @@
                         RawObject** args,
                         RawSubtypeTestCache* cache);
 
-  bool AllocateInt64Box(Thread* thread,
-                        int64_t value,
-                        uint32_t* pc,
-                        RawObject** FP,
-                        RawObject** SP);
+  bool AllocateMint(Thread* thread,
+                    int64_t value,
+                    uint32_t* pc,
+                    RawObject** FP,
+                    RawObject** SP);
+  bool AllocateDouble(Thread* thread,
+                      double value,
+                      uint32_t* pc,
+                      RawObject** FP,
+                      RawObject** SP);
+  bool AllocateFloat32x4(Thread* thread,
+                         simd128_value_t value,
+                         uint32_t* pc,
+                         RawObject** FP,
+                         RawObject** SP);
+  bool AllocateFloat64x2(Thread* thread,
+                         simd128_value_t value,
+                         uint32_t* pc,
+                         RawObject** FP,
+                         RawObject** SP);
+  bool AllocateArray(Thread* thread,
+                     RawTypeArguments* type_args,
+                     RawObject* length,
+                     uint32_t* pc,
+                     RawObject** FP,
+                     RawObject** SP);
+  bool AllocateContext(Thread* thread,
+                       intptr_t num_variables,
+                       uint32_t* pc,
+                       RawObject** FP,
+                       RawObject** SP);
+  bool AllocateClosure(Thread* thread,
+                       uint32_t* pc,
+                       RawObject** FP,
+                       RawObject** SP);
 
 #if defined(DEBUG)
   // Returns true if tracing of executed instructions is enabled.
diff --git a/runtime/vm/isolate.cc b/runtime/vm/isolate.cc
index 6be1715..49caa27 100644
--- a/runtime/vm/isolate.cc
+++ b/runtime/vm/isolate.cc
@@ -66,20 +66,6 @@
 DECLARE_FLAG(bool, trace_reload);
 #endif  // !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
 
-#if !defined(PRODUCT)
-static void CheckedModeHandler(bool value) {
-  FLAG_enable_asserts = value;
-}
-
-// --enable-checked-mode and --checked both enable checked mode which is
-// equivalent to setting --enable-asserts and --enable-type-checks.
-DEFINE_FLAG_HANDLER(CheckedModeHandler,
-                    enable_checked_mode,
-                    "Enable checked mode.");
-
-DEFINE_FLAG_HANDLER(CheckedModeHandler, checked, "Enable checked mode.");
-#endif  // !defined(PRODUCT)
-
 static void DeterministicModeHandler(bool value) {
   if (value) {
     FLAG_background_compilation = false;  // Timing dependent.
@@ -880,6 +866,7 @@
       heap_(NULL),
       isolate_flags_(0),
       background_compiler_(NULL),
+      optimizing_background_compiler_(NULL),
 #if !defined(PRODUCT)
       debugger_(NULL),
       last_resume_timestamp_(OS::GetCurrentTimeMillis()),
@@ -965,7 +952,11 @@
         "         See dartbug.com/30524 for more information.\n");
   }
 
-  NOT_IN_PRECOMPILED(background_compiler_ = new BackgroundCompiler(this));
+  if (FLAG_enable_interpreter) {
+    NOT_IN_PRECOMPILED(background_compiler_ = new BackgroundCompiler(this));
+  }
+  NOT_IN_PRECOMPILED(optimizing_background_compiler_ =
+                         new BackgroundCompiler(this));
 }
 
 #undef REUSABLE_HANDLE_SCOPE_INIT
@@ -980,8 +971,13 @@
   delete reverse_pc_lookup_cache_;
   reverse_pc_lookup_cache_ = nullptr;
 
-  delete background_compiler_;
-  background_compiler_ = NULL;
+  if (FLAG_enable_interpreter) {
+    delete background_compiler_;
+    background_compiler_ = NULL;
+  }
+
+  delete optimizing_background_compiler_;
+  optimizing_background_compiler_ = NULL;
 
 #if !defined(PRODUCT)
   delete debugger_;
@@ -1876,8 +1872,12 @@
 void Isolate::Shutdown() {
   ASSERT(this == Isolate::Current());
   BackgroundCompiler::Stop(this);
-  delete background_compiler_;
-  background_compiler_ = NULL;
+  if (FLAG_enable_interpreter) {
+    delete background_compiler_;
+    background_compiler_ = NULL;
+  }
+  delete optimizing_background_compiler_;
+  optimizing_background_compiler_ = NULL;
 
 #if defined(DEBUG)
   if (heap_ != NULL && FLAG_verify_on_transition) {
@@ -2000,6 +2000,9 @@
   if (background_compiler() != NULL) {
     background_compiler()->VisitPointers(visitor);
   }
+  if (optimizing_background_compiler() != NULL) {
+    optimizing_background_compiler()->VisitPointers(visitor);
+  }
 
 #if !defined(PRODUCT)
   // Visit objects in the debugger.
@@ -2288,6 +2291,14 @@
 
   jsobj.AddProperty("_threads", thread_registry_);
 }
+
+void Isolate::PrintMemoryUsageJSON(JSONStream* stream) {
+  if (!FLAG_support_service) {
+    return;
+  }
+  heap()->PrintMemoryUsageJSON(stream);
+}
+
 #endif
 
 void Isolate::set_tag_table(const GrowableObjectArray& value) {
@@ -2633,6 +2644,18 @@
   return count;
 }
 
+Isolate* Isolate::LookupIsolateByPort(Dart_Port port) {
+  MonitorLocker ml(isolates_list_monitor_);
+  Isolate* current = isolates_list_head_;
+  while (current != NULL) {
+    if (current->main_port() == port) {
+      return current;
+    }
+    current = current->next_;
+  }
+  return NULL;
+}
+
 bool Isolate::AddIsolateToList(Isolate* isolate) {
   MonitorLocker ml(isolates_list_monitor_);
   if (!creation_enabled_) {
@@ -2918,7 +2941,8 @@
                                      bool paused,
                                      bool errors_are_fatal,
                                      Dart_Port on_exit_port,
-                                     Dart_Port on_error_port)
+                                     Dart_Port on_error_port,
+                                     const char* debug_name)
     : isolate_(NULL),
       parent_port_(parent_port),
       origin_id_(origin_id),
@@ -2931,6 +2955,7 @@
       library_url_(NULL),
       class_name_(NULL),
       function_name_(NULL),
+      debug_name_(debug_name),
       serialized_args_(NULL),
       serialized_message_(message_buffer->StealMessage()),
       spawn_count_monitor_(spawn_count_monitor),
@@ -2967,7 +2992,8 @@
                                      bool paused,
                                      bool errors_are_fatal,
                                      Dart_Port on_exit_port,
-                                     Dart_Port on_error_port)
+                                     Dart_Port on_error_port,
+                                     const char* debug_name)
     : isolate_(NULL),
       parent_port_(parent_port),
       origin_id_(ILLEGAL_PORT),
@@ -2980,6 +3006,7 @@
       library_url_(NULL),
       class_name_(NULL),
       function_name_(NULL),
+      debug_name_(debug_name),
       serialized_args_(args_buffer->StealMessage()),
       serialized_message_(message_buffer->StealMessage()),
       spawn_count_monitor_(spawn_count_monitor),
@@ -3001,6 +3028,7 @@
   delete[] library_url_;
   delete[] class_name_;
   delete[] function_name_;
+  delete[] debug_name_;
   delete serialized_args_;
   delete serialized_message_;
 }
diff --git a/runtime/vm/isolate.h b/runtime/vm/isolate.h
index 086831b..584eeae 100644
--- a/runtime/vm/isolate.h
+++ b/runtime/vm/isolate.h
@@ -238,11 +238,6 @@
 
   Thread* mutator_thread() const;
 
-  // Mutator thread is not scheduled if NULL or no heap is attached
-  // to it. The latter only occurs when the mutator thread object
-  // is unscheduled by the isolate (or never scheduled).
-  bool IsMutatorThreadScheduled() { return scheduled_mutator_thread_ != NULL; }
-
   const char* name() const { return name_; }
   void set_name(const char* name);
 
@@ -484,6 +479,10 @@
     return background_compiler_;
   }
 
+  BackgroundCompiler* optimizing_background_compiler() const {
+    return optimizing_background_compiler_;
+  }
+
 #if !defined(PRODUCT)
   void UpdateLastAllocationProfileAccumulatorResetTimestamp() {
     last_allocationprofile_accumulator_reset_timestamp_ =
@@ -520,6 +519,10 @@
 
 #ifndef PRODUCT
   void PrintJSON(JSONStream* stream, bool ref = true);
+
+  // Creates an object with the total heap memory usage statistics for this
+  // isolate.
+  void PrintMemoryUsageJSON(JSONStream* stream);
 #endif
 
 #if !defined(PRODUCT)
@@ -698,6 +701,13 @@
     return FLAG_use_strong_mode_types && !unsafe_trust_strong_mode_types();
   }
 
+  // Whether it's possible for unoptimized code to optimize immediately on entry
+  // (can happen with random or very low optimization counter thresholds)
+  bool CanOptimizeImmediately() const {
+    return FLAG_optimization_counter_threshold < 2 ||
+           FLAG_randomize_optimization_counter;
+  }
+
   bool should_load_vmservice() const {
     return ShouldLoadVmServiceBit::decode(isolate_flags_);
   }
@@ -773,6 +783,10 @@
   static void KillAllIsolates(LibMsgId msg_id);
   static void KillIfExists(Isolate* isolate, LibMsgId msg_id);
 
+  // Lookup an isolate by its main port. Returns NULL if no matching isolate is
+  // found.
+  static Isolate* LookupIsolateByPort(Dart_Port port);
+
   static void DisableIsolateCreation();
   static void EnableIsolateCreation();
   static bool IsolateCreationEnabled();
@@ -906,9 +920,12 @@
 
   uint32_t isolate_flags_;
 
-  // Background compilation.
+  // Unoptimized background compilation.
   BackgroundCompiler* background_compiler_;
 
+  // Optimized background compilation.
+  BackgroundCompiler* optimizing_background_compiler_;
+
 // Fields that aren't needed in a product build go here with boolean flags at
 // the top.
 #if !defined(PRODUCT)
@@ -1121,7 +1138,8 @@
                     bool paused,
                     bool errorsAreFatal,
                     Dart_Port onExit,
-                    Dart_Port onError);
+                    Dart_Port onError,
+                    const char* debug_name);
   IsolateSpawnState(Dart_Port parent_port,
                     void* init_data,
                     const char* script_url,
@@ -1134,7 +1152,8 @@
                     bool paused,
                     bool errorsAreFatal,
                     Dart_Port onExit,
-                    Dart_Port onError);
+                    Dart_Port onError,
+                    const char* debug_name);
   ~IsolateSpawnState();
 
   Isolate* isolate() const { return isolate_; }
@@ -1151,6 +1170,7 @@
   const char* library_url() const { return library_url_; }
   const char* class_name() const { return class_name_; }
   const char* function_name() const { return function_name_; }
+  const char* debug_name() const { return debug_name_; }
   bool is_spawn_uri() const { return library_url_ == NULL; }
   bool paused() const { return paused_; }
   bool errors_are_fatal() const { return errors_are_fatal_; }
@@ -1175,6 +1195,7 @@
   const char* library_url_;
   const char* class_name_;
   const char* function_name_;
+  const char* debug_name_;
   Message* serialized_args_;
   Message* serialized_message_;
 
diff --git a/runtime/vm/isolate_reload.cc b/runtime/vm/isolate_reload.cc
index 381a50b..76e8e9d 100644
--- a/runtime/vm/isolate_reload.cc
+++ b/runtime/vm/isolate_reload.cc
@@ -1890,151 +1890,34 @@
   // new ones.
 }
 
-class MarkFunctionsForRecompilation : public ObjectVisitor {
+class InvalidationCollector : public ObjectVisitor {
  public:
-  MarkFunctionsForRecompilation(Isolate* isolate,
-                                IsolateReloadContext* reload_context,
-                                Zone* zone)
-      : ObjectVisitor(),
-        handle_(Object::Handle(zone)),
-        owning_class_(Class::Handle(zone)),
-        owning_lib_(Library::Handle(zone)),
-        code_(Code::Handle(zone)),
-        bytecode_(Bytecode::Handle(zone)),
-        reload_context_(reload_context),
-        zone_(zone) {}
+  InvalidationCollector(Zone* zone,
+                        GrowableArray<const Function*>* functions,
+                        GrowableArray<const KernelProgramInfo*>* kernel_infos)
+      : zone_(zone), functions_(functions), kernel_infos_(kernel_infos) {}
+  virtual ~InvalidationCollector() {}
 
   virtual void VisitObject(RawObject* obj) {
     if (obj->IsPseudoObject()) {
-      // Cannot even be wrapped in handles.
-      return;
+      return;  // Cannot be wrapped in handles.
     }
-    handle_ = obj;
-    if (handle_.IsFunction()) {
-      const Function& func = Function::Cast(handle_);
-      if (func.IsSignatureFunction()) {
-        return;
-      }
-
-      // Switch to unoptimized code or the lazy compilation stub.
-      func.SwitchToLazyCompiledUnoptimizedCode();
-
-      // Grab the current code.
-      code_ = func.CurrentCode();
-      ASSERT(!code_.IsNull());
-      bytecode_ = func.bytecode();
-      const bool clear_code = IsFromDirtyLibrary(func);
-      const bool stub_code = code_.IsStubCode();
-
-      // Zero edge counters.
-      func.ZeroEdgeCounters();
-
-      if (!stub_code || !bytecode_.IsNull()) {
-        if (clear_code) {
-          VTIR_Print("Marking %s for recompilation, clearing code\n",
-                     func.ToCString());
-          ClearAllCode(func);
-        } else {
-          if (!stub_code) {
-            PreserveUnoptimizedCode();
-          }
-          if (!bytecode_.IsNull()) {
-            PreserveBytecode();
-          }
-        }
-      }
-
-      // Clear counters.
-      func.set_usage_counter(0);
-      func.set_deoptimization_counter(0);
-      func.set_optimized_instruction_count(0);
-      func.set_optimized_call_site_count(0);
+    const Object& handle = Object::Handle(zone_, obj);
+    if (handle.IsFunction()) {
+      functions_->Add(&Function::Cast(handle));
+    } else if (handle.IsKernelProgramInfo()) {
+      kernel_infos_->Add(&KernelProgramInfo::Cast(handle));
     }
   }
 
  private:
-  void ClearAllCode(const Function& func) {
-    // Null out the ICData array and code.
-    func.ClearICDataArray();
-    func.ClearCode();
-    func.SetWasCompiled(false);
-  }
-
-  void PreserveUnoptimizedCode() {
-    ASSERT(!code_.IsNull());
-    // We are preserving the unoptimized code, fill all ICData arrays with
-    // the sentinel values so that we have no stale type feedback.
-    code_.ResetICDatas(zone_);
-  }
-
-  void PreserveBytecode() {
-    ASSERT(!bytecode_.IsNull());
-    // We are preserving the bytecode, fill all ICData arrays with
-    // the sentinel values so that we have no stale type feedback.
-    bytecode_.ResetICDatas(zone_);
-  }
-
-  bool IsFromDirtyLibrary(const Function& func) {
-    owning_class_ = func.Owner();
-    owning_lib_ = owning_class_.library();
-    return reload_context_->IsDirty(owning_lib_);
-  }
-
-  Object& handle_;
-  Class& owning_class_;
-  Library& owning_lib_;
-  Code& code_;
-  Bytecode& bytecode_;
-  IsolateReloadContext* reload_context_;
-  Zone* zone_;
+  Zone* const zone_;
+  GrowableArray<const Function*>* const functions_;
+  GrowableArray<const KernelProgramInfo*>* const kernel_infos_;
 };
 
 typedef UnorderedHashMap<SmiTraits> IntHashMap;
 
-class InvalidateKernelInfoCaches : public ObjectVisitor {
- public:
-  explicit InvalidateKernelInfoCaches(Zone* zone)
-      : ObjectVisitor(),
-        handle_(Object::Handle(zone)),
-        data_(Array::Handle(zone)),
-        key_(Object::Handle(zone)),
-        value_(Smi::Handle(zone)) {}
-
-  virtual void VisitObject(RawObject* obj) {
-    if (obj->IsPseudoObject()) {
-      // Cannot even be wrapped in handles.
-      return;
-    }
-    handle_ = obj;
-    if (!handle_.IsKernelProgramInfo()) {
-      return;
-    }
-    const KernelProgramInfo& info = KernelProgramInfo::Cast(handle_);
-    // Clear the libraries cache.
-    {
-      data_ ^= info.libraries_cache();
-      ASSERT(!data_.IsNull());
-      IntHashMap table(&key_, &value_, &data_);
-      table.Clear();
-      info.set_libraries_cache(table.Release());
-    }
-    // Clear the classes cache.
-    {
-      data_ ^= info.classes_cache();
-      ASSERT(!data_.IsNull());
-      IntHashMap table(&key_, &value_, &data_);
-      table.Clear();
-      info.set_classes_cache(table.Release());
-    }
-  }
-
- private:
-  Object& handle_;
-  Array& data_;
-  Object& key_;
-  Smi& value_;
-};
-
 void IsolateReloadContext::RunInvalidationVisitors() {
   TIMELINE_SCOPE(MarkAllFunctionsForRecompilation);
   TIR_Print("---- RUNNING INVALIDATION HEAP VISITORS\n");
@@ -2042,15 +1925,92 @@
   StackZone stack_zone(thread);
   Zone* zone = stack_zone.GetZone();
 
-  HeapIterationScope iteration(thread);
-  GrowableArray<ObjectVisitor*> arr(zone, 2);
-  ExtensibleObjectVisitor visitor(&arr);
-  MarkFunctionsForRecompilation function_visitor(isolate_, this, zone);
-  InvalidateKernelInfoCaches kernel_info_visitor(zone);
+  GrowableArray<const Function*> functions(4 * KB);
+  GrowableArray<const KernelProgramInfo*> kernel_infos(KB);
 
-  visitor.Add(&function_visitor);
-  visitor.Add(&kernel_info_visitor);
-  iteration.IterateObjects(&visitor);
+  {
+    HeapIterationScope iteration(thread);
+    InvalidationCollector visitor(zone, &functions, &kernel_infos);
+    iteration.IterateObjects(&visitor);
+  }
+
+  Array& data = Array::Handle(zone);
+  Object& key = Object::Handle(zone);
+  Smi& value = Smi::Handle(zone);
+  for (intptr_t i = 0; i < kernel_infos.length(); i++) {
+    const KernelProgramInfo& info = *kernel_infos[i];
+    // Clear the libraries cache.
+    {
+      data ^= info.libraries_cache();
+      ASSERT(!data.IsNull());
+      IntHashMap table(&key, &value, &data);
+      table.Clear();
+      info.set_libraries_cache(table.Release());
+    }
+    // Clear the classes cache.
+    {
+      data ^= info.classes_cache();
+      ASSERT(!data.IsNull());
+      IntHashMap table(&key, &value, &data);
+      table.Clear();
+      info.set_classes_cache(table.Release());
+    }
+  }
+
+  Class& owning_class = Class::Handle(zone);
+  Library& owning_lib = Library::Handle(zone);
+  Code& code = Code::Handle(zone);
+  Bytecode& bytecode = Bytecode::Handle(zone);
+  for (intptr_t i = 0; i < functions.length(); i++) {
+    const Function& func = *functions[i];
+    if (func.IsSignatureFunction()) {
+      continue;
+    }
+
+    // Switch to unoptimized code or the lazy compilation stub.
+    func.SwitchToLazyCompiledUnoptimizedCode();
+
+    // Grab the current code.
+    code = func.CurrentCode();
+    ASSERT(!code.IsNull());
+    bytecode = func.bytecode();
+
+    owning_class = func.Owner();
+    owning_lib = owning_class.library();
+    const bool clear_code = IsDirty(owning_lib);
+    const bool stub_code = code.IsStubCode();
+
+    // Zero edge counters.
+    func.ZeroEdgeCounters();
+
+    if (!stub_code || !bytecode.IsNull()) {
+      if (clear_code) {
+        VTIR_Print("Marking %s for recompilation, clearing code\n",
+                   func.ToCString());
+        // Null out the ICData array and code.
+        func.ClearICDataArray();
+        func.ClearCode();
+        func.SetWasCompiled(false);
+      } else {
+        if (!stub_code) {
+          // We are preserving the unoptimized code, fill all ICData arrays with
+          // the sentinel values so that we have no stale type feedback.
+          code.ResetICDatas(zone);
+        }
+        if (!bytecode.IsNull()) {
+          // We are preserving the bytecode, fill all ICData arrays with
+          // the sentinel values so that we have no stale type feedback.
+          bytecode.ResetICDatas(zone);
+        }
+      }
+    }
+
+    // Clear counters.
+    func.set_usage_counter(0);
+    func.set_deoptimization_counter(0);
+    func.set_optimized_instruction_count(0);
+    func.set_optimized_call_site_count(0);
+  }
 }
 
 void IsolateReloadContext::InvalidateWorld() {
diff --git a/runtime/vm/isolate_test.cc b/runtime/vm/isolate_test.cc
index a9d3a85..b019598c 100644
--- a/runtime/vm/isolate_test.cc
+++ b/runtime/vm/isolate_test.cc
@@ -43,30 +43,30 @@
   // Necessary because asynchronous errors use "print" to print their
   // stack trace.
   Dart_Handle url = NewString("dart:_internal");
-  DART_CHECK_VALID(url);
+  EXPECT_VALID(url);
   Dart_Handle internal_lib = Dart_LookupLibrary(url);
-  DART_CHECK_VALID(internal_lib);
+  EXPECT_VALID(internal_lib);
   Dart_Handle print = Dart_GetField(test_lib, NewString("_nullPrintClosure"));
   Dart_Handle result =
       Dart_SetField(internal_lib, NewString("_printClosure"), print);
 
-  DART_CHECK_VALID(result);
+  EXPECT_VALID(result);
 
   // Setup the 'scheduleImmediate' closure.
   url = NewString("dart:isolate");
-  DART_CHECK_VALID(url);
+  EXPECT_VALID(url);
   Dart_Handle isolate_lib = Dart_LookupLibrary(url);
-  DART_CHECK_VALID(isolate_lib);
+  EXPECT_VALID(isolate_lib);
   Dart_Handle schedule_immediate_closure = Dart_Invoke(
       isolate_lib, NewString("_getIsolateScheduleImmediateClosure"), 0, NULL);
   Dart_Handle args[1];
   args[0] = schedule_immediate_closure;
   url = NewString("dart:async");
-  DART_CHECK_VALID(url);
+  EXPECT_VALID(url);
   Dart_Handle async_lib = Dart_LookupLibrary(url);
-  DART_CHECK_VALID(async_lib);
-  DART_CHECK_VALID(Dart_Invoke(
-      async_lib, NewString("_setScheduleImmediateClosure"), 1, args));
+  EXPECT_VALID(async_lib);
+  EXPECT_VALID(Dart_Invoke(async_lib, NewString("_setScheduleImmediateClosure"),
+                           1, args));
 
   result = Dart_Invoke(test_lib, NewString("testMain"), 0, NULL);
   EXPECT_VALID(result);
diff --git a/runtime/vm/json_test.cc b/runtime/vm/json_test.cc
index c42d2e6..1746328 100644
--- a/runtime/vm/json_test.cc
+++ b/runtime/vm/json_test.cc
@@ -218,26 +218,35 @@
   Dart_Handle result;
   TransitionNativeToVM transition1(thread);
   String& obj = String::Handle();
-  TransitionVMToNative transition2(thread);
 
-  {
-    result = Dart_GetField(lib, NewString("ascii"));
-    EXPECT_VALID(result);
+  auto do_test = [&](const char* field_name, const char* expected) {
+    {
+      TransitionVMToNative to_native(thread);
+      result = Dart_GetField(lib, NewString(field_name));
+      EXPECT_VALID(result);
+    }
+
     obj ^= Api::UnwrapHandle(result);
 
-    JSONStream js;
     {
-      JSONObject jsobj(&js);
-      EXPECT(!jsobj.AddPropertyStr("ascii", obj));
+      JSONStream js;
+      {
+        JSONObject jsobj(&js);
+        EXPECT(!jsobj.AddPropertyStr(field_name, obj));
+      }
+      EXPECT_STREQ(expected, js.ToCString());
     }
-    EXPECT_STREQ("{\"ascii\":\"Hello, World!\"}", js.ToCString());
+  };
+
+  {
+    TransitionVMToNative to_native(thread);
+    result = Dart_GetField(lib, NewString("ascii"));
+    EXPECT_VALID(result);
   }
 
-  {
-    result = Dart_GetField(lib, NewString("ascii"));
-    EXPECT_VALID(result);
-    obj ^= Api::UnwrapHandle(result);
+  obj ^= Api::UnwrapHandle(result);
 
+  {
     JSONStream js;
     {
       JSONObject jsobj(&js);
@@ -246,58 +255,11 @@
     EXPECT_STREQ("{\"subrange\":\"ello\"}", js.ToCString());
   }
 
-  {
-    result = Dart_GetField(lib, NewString("unicode"));
-    EXPECT_VALID(result);
-    obj ^= Api::UnwrapHandle(result);
-
-    JSONStream js;
-    {
-      JSONObject jsobj(&js);
-      EXPECT(!jsobj.AddPropertyStr("unicode", obj));
-    }
-    EXPECT_STREQ("{\"unicode\":\"Îñţérñåţîöñåļîžåţîờñ\"}", js.ToCString());
-  }
-
-  {
-    result = Dart_GetField(lib, NewString("surrogates"));
-    EXPECT_VALID(result);
-    obj ^= Api::UnwrapHandle(result);
-
-    JSONStream js;
-    {
-      JSONObject jsobj(&js);
-      EXPECT(!jsobj.AddPropertyStr("surrogates", obj));
-    }
-    EXPECT_STREQ("{\"surrogates\":\"𝄞𝄞𝄞𝄞𝄞\"}", js.ToCString());
-  }
-
-  {
-    result = Dart_GetField(lib, NewString("wrongEncoding"));
-    EXPECT_VALID(result);
-    obj ^= Api::UnwrapHandle(result);
-
-    JSONStream js;
-    {
-      JSONObject jsobj(&js);
-      EXPECT(!jsobj.AddPropertyStr("wrongEncoding", obj));
-    }
-    EXPECT_STREQ("{\"wrongEncoding\":\"𝄞\\uD834𝄞\"}", js.ToCString());
-  }
-
-  {
-    result = Dart_GetField(lib, NewString("nullInMiddle"));
-    EXPECT_VALID(result);
-    obj ^= Api::UnwrapHandle(result);
-
-    JSONStream js;
-    {
-      JSONObject jsobj(&js);
-      EXPECT(!jsobj.AddPropertyStr("nullInMiddle", obj));
-    }
-    EXPECT_STREQ("{\"nullInMiddle\":\"This has\\u0000 four words.\"}",
-                 js.ToCString());
-  }
+  do_test("ascii", "{\"ascii\":\"Hello, World!\"}");
+  do_test("unicode", "{\"unicode\":\"Îñţérñåţîöñåļîžåţîờñ\"}");
+  do_test("surrogates", "{\"surrogates\":\"𝄞𝄞𝄞𝄞𝄞\"}");
+  do_test("wrongEncoding", "{\"wrongEncoding\":\"𝄞\\uD834𝄞\"}");
+  do_test("nullInMiddle", "{\"nullInMiddle\":\"This has\\u0000 four words.\"}");
 }
 
 TEST_CASE(JSON_JSONStream_Params) {
diff --git a/runtime/vm/kernel.cc b/runtime/vm/kernel.cc
index edf12af..a4a6eea 100644
--- a/runtime/vm/kernel.cc
+++ b/runtime/vm/kernel.cc
@@ -4,6 +4,8 @@
 
 #include "vm/kernel.h"
 
+#include "vm/bit_vector.h"
+#include "vm/compiler/frontend/bytecode_reader.h"
 #include "vm/compiler/frontend/constant_evaluator.h"
 #include "vm/compiler/frontend/kernel_translation_helper.h"
 #include "vm/longjump.h"
@@ -312,7 +314,9 @@
           temp_array = klass.fields();
           for (intptr_t i = 0; i < temp_array.Length(); ++i) {
             temp_field ^= temp_array.At(i);
-            if (temp_field.kernel_offset() <= 0) {
+            // TODO(alexmarkov): collect token positions from bytecode
+            if (temp_field.is_declared_in_bytecode() ||
+                temp_field.kernel_offset() <= 0) {
               // Skip artificially injected fields.
               continue;
             }
@@ -331,6 +335,10 @@
           for (intptr_t i = 0; i < temp_array.Length(); ++i) {
             temp_function ^= temp_array.At(i);
             entry_script = temp_function.script();
+            // TODO(alexmarkov): collect token positions from bytecode
+            if (temp_function.is_declared_in_bytecode()) {
+              continue;
+            }
             if (entry_script.raw() != interesting_script.raw()) {
               continue;
             }
@@ -361,6 +369,10 @@
         }
       } else if (entry.IsFunction()) {
         temp_function ^= entry.raw();
+        // TODO(alexmarkov): collect token positions from bytecode
+        if (temp_function.is_declared_in_bytecode()) {
+          continue;
+        }
         entry_script = temp_function.script();
         if (entry_script.raw() != interesting_script.raw()) {
           continue;
@@ -373,7 +385,8 @@
                                    &yield_positions);
       } else if (entry.IsField()) {
         const Field& field = Field::Cast(entry);
-        if (field.kernel_offset() <= 0) {
+        // TODO(alexmarkov): collect token positions from bytecode
+        if (field.is_declared_in_bytecode() || field.kernel_offset() <= 0) {
           // Skip artificially injected fields.
           continue;
         }
@@ -585,91 +598,108 @@
   }
 }
 
-bool NeedsDynamicInvocationForwarder(const Function& function) {
+void ReadParameterCovariance(const Function& function,
+                             BitVector* is_covariant,
+                             BitVector* is_generic_covariant_impl) {
   Thread* thread = Thread::Current();
   Zone* zone = thread->zone();
 
-  TranslationHelper helper(thread);
-  Script& script = Script::Handle(zone, function.script());
-  helper.InitFromScript(script);
+  const intptr_t num_params = function.NumParameters();
+  ASSERT(is_covariant->length() == num_params);
+  ASSERT(is_generic_covariant_impl->length() == num_params);
 
-  // Setup a [ActiveClassScope] and a [ActiveMemberScope] which will be used
-  // e.g. for type translation.
-
-  const Class& owner_class = Class::Handle(zone, function.Owner());
-  Function& outermost_function =
-      Function::Handle(zone, function.GetOutermostFunction());
-
-  ActiveClass active_class;
-  ActiveClassScope active_class_scope(&active_class, &owner_class);
-  ActiveMemberScope active_member(&active_class, &outermost_function);
-  ActiveTypeParametersScope active_type_params(&active_class, function, zone);
+  const auto& script = Script::Handle(zone, function.script());
+  TranslationHelper translation_helper(thread);
+  translation_helper.InitFromScript(script);
 
   KernelReaderHelper reader_helper(
-      zone, &helper, script,
+      zone, &translation_helper, script,
       ExternalTypedData::Handle(zone, function.KernelData()),
       function.KernelDataProgramOffset());
 
-  TypeTranslator type_translator(&reader_helper, &active_class,
-                                 /* finalize= */ true);
-
-  reader_helper.SetOffset(function.kernel_offset());
-
-  // Handle setters.
-  if (reader_helper.PeekTag() == kField) {
-    ASSERT(function.IsImplicitSetterFunction());
-    FieldHelper field_helper(&reader_helper);
-    field_helper.ReadUntilIncluding(FieldHelper::kFlags);
-    return !(field_helper.IsCovariant() ||
-             field_helper.IsGenericCovariantImpl());
+  if (function.is_declared_in_bytecode()) {
+    BytecodeReaderHelper bytecode_reader_helper(&reader_helper, nullptr,
+                                                nullptr);
+    bytecode_reader_helper.ReadParameterCovariance(function, is_covariant,
+                                                   is_generic_covariant_impl);
+    return;
   }
 
+  reader_helper.SetOffset(function.kernel_offset());
   reader_helper.ReadUntilFunctionNode();
 
   FunctionNodeHelper function_node_helper(&reader_helper);
-  function_node_helper.ReadUntilExcluding(FunctionNodeHelper::kTypeParameters);
-  intptr_t num_type_params = reader_helper.ReadListLength();
-
-  for (intptr_t i = 0; i < num_type_params; ++i) {
-    TypeParameterHelper helper(&reader_helper);
-    helper.ReadUntilExcludingAndSetJustRead(TypeParameterHelper::kBound);
-    AbstractType& bound = type_translator.BuildType();  // read bound
-    helper.Finish();
-
-    if (!bound.IsTopType() && !helper.IsGenericCovariantImpl()) {
-      return true;
-    }
-  }
-  function_node_helper.SetJustRead(FunctionNodeHelper::kTypeParameters);
   function_node_helper.ReadUntilExcluding(
       FunctionNodeHelper::kPositionalParameters);
 
   // Positional.
   const intptr_t num_positional_params = reader_helper.ReadListLength();
-  for (intptr_t i = 0; i < num_positional_params; ++i) {
+  intptr_t param_index = function.NumImplicitParameters();
+  for (intptr_t i = 0; i < num_positional_params; ++i, ++param_index) {
     VariableDeclarationHelper helper(&reader_helper);
-    helper.ReadUntilExcluding(VariableDeclarationHelper::kType);
-    AbstractType& type = type_translator.BuildType();  // read type.
-    helper.SetJustRead(VariableDeclarationHelper::kType);
     helper.ReadUntilExcluding(VariableDeclarationHelper::kEnd);
 
-    if (!type.IsTopType() && !helper.IsGenericCovariantImpl() &&
-        !helper.IsCovariant()) {
-      return true;
+    if (helper.IsCovariant()) {
+      is_covariant->Add(param_index);
+    }
+    if (helper.IsGenericCovariantImpl()) {
+      is_generic_covariant_impl->Add(param_index);
     }
   }
 
   // Named.
   const intptr_t num_named_params = reader_helper.ReadListLength();
-  for (intptr_t i = 0; i < num_named_params; ++i) {
+  for (intptr_t i = 0; i < num_named_params; ++i, ++param_index) {
     VariableDeclarationHelper helper(&reader_helper);
-    helper.ReadUntilExcluding(VariableDeclarationHelper::kType);
-    AbstractType& type = type_translator.BuildType();  // read type.
-    helper.SetJustRead(VariableDeclarationHelper::kType);
     helper.ReadUntilExcluding(VariableDeclarationHelper::kEnd);
 
-    if (!type.IsTopType() && !helper.IsGenericCovariantImpl() &&
-        !helper.IsCovariant()) {
+    if (helper.IsCovariant()) {
+      is_covariant->Add(param_index);
+    }
+    if (helper.IsGenericCovariantImpl()) {
+      is_generic_covariant_impl->Add(param_index);
+    }
+  }
+}
+
+bool NeedsDynamicInvocationForwarder(const Function& function) {
+  Zone* zone = Thread::Current()->zone();
+
+  // Covariant parameters (both explicitly covariant and generic-covariant-impl)
+  // are checked in the body of a function and therefore don't need checks in a
+  // dynamic invocation forwarder. So dynamic invocation forwarder is only
+  // needed if there are non-covariant parameters of non-top type.
+
+  ASSERT(!function.IsImplicitGetterFunction());
+  if (function.IsImplicitSetterFunction()) {
+    const auto& field = Field::Handle(zone, function.accessor_field());
+    return !(field.is_covariant() || field.is_generic_covariant_impl());
+  }
+
+  const auto& type_params =
+      TypeArguments::Handle(zone, function.type_parameters());
+  if (!type_params.IsNull()) {
+    auto& type_param = TypeParameter::Handle(zone);
+    auto& bound = AbstractType::Handle(zone);
+    for (intptr_t i = 0, n = type_params.Length(); i < n; ++i) {
+      type_param ^= type_params.TypeAt(i);
+      bound = type_param.bound();
+      if (!bound.IsTopType() && !type_param.IsGenericCovariantImpl()) {
+        return true;
+      }
+    }
+  }
+
+  const intptr_t num_params = function.NumParameters();
+  BitVector is_covariant(zone, num_params);
+  BitVector is_generic_covariant_impl(zone, num_params);
+  ReadParameterCovariance(function, &is_covariant, &is_generic_covariant_impl);
+
+  auto& type = AbstractType::Handle(zone);
+  for (intptr_t i = function.NumImplicitParameters(); i < num_params; ++i) {
+    type = function.ParameterTypeAt(i);
+    if (!type.IsTopType() && !is_generic_covariant_impl.Contains(i) &&
+        !is_covariant.Contains(i)) {
       return true;
     }
   }
@@ -677,12 +707,6 @@
   return false;
 }
 
-bool IsFieldInitializer(const Function& function, Zone* zone) {
-  return (function.kind() == RawFunction::kImplicitStaticFinalGetter) &&
-         String::Handle(zone, function.name())
-             .StartsWith(Symbols::InitPrefix());
-}
-
 static ProcedureAttributesMetadata ProcedureAttributesOf(
     Zone* zone,
     const Script& script,
diff --git a/runtime/vm/kernel.h b/runtime/vm/kernel.h
index 34609b8..0de9d5d 100644
--- a/runtime/vm/kernel.h
+++ b/runtime/vm/kernel.h
@@ -32,6 +32,7 @@
 #if !defined(DART_PRECOMPILED_RUNTIME)
 namespace dart {
 
+class BitVector;
 class Field;
 class ParsedFunction;
 class Zone;
@@ -72,6 +73,7 @@
                                     const char** error = nullptr);
 
   bool is_single_program() { return single_program_; }
+  uint32_t binary_version() { return binary_version_; }
   NameIndex main_method() { return main_method_reference_; }
   intptr_t source_table_offset() const { return source_table_offset_; }
   intptr_t string_table_offset() const { return string_table_offset_; }
@@ -91,6 +93,7 @@
   Program() : kernel_data_(NULL), kernel_data_size_(-1) {}
 
   bool single_program_;
+  uint32_t binary_version_;
   NameIndex main_method_reference_;  // Procedure.
   intptr_t library_count_;
 
@@ -194,14 +197,21 @@
                             bool is_annotations_offset);
 RawObject* BuildParameterDescriptor(const Function& function);
 
+// Fills in [is_covariant] and [is_generic_covariant_impl] vectors
+// according to covariance attributes of [function] parameters.
+//
+// [is_covariant] and [is_generic_covariant_impl] should contain bitvectors
+// of function.NumParameters() length.
+void ReadParameterCovariance(const Function& function,
+                             BitVector* is_covariant,
+                             BitVector* is_generic_covariant_impl);
+
 // Returns true if the given function needs dynamic invocation forwarder:
 // that is if any of the arguments require checking on the dynamic
 // call-site: if function has no parameters or has only covariant parameters
 // as such function already checks all of its parameters.
 bool NeedsDynamicInvocationForwarder(const Function& function);
 
-bool IsFieldInitializer(const Function& function, Zone* zone);
-
 ProcedureAttributesMetadata ProcedureAttributesOf(const Function& function,
                                                   Zone* zone);
 
diff --git a/runtime/vm/kernel_binary.cc b/runtime/vm/kernel_binary.cc
index 2dd239e..d3f2838 100644
--- a/runtime/vm/kernel_binary.cc
+++ b/runtime/vm/kernel_binary.cc
@@ -68,7 +68,8 @@
   }
 
   uint32_t formatVersion = reader->ReadUInt32();
-  if (formatVersion != kBinaryFormatVersion) {
+  if ((formatVersion < kMinSupportedKernelFormatVersion) ||
+      (formatVersion > kMaxSupportedKernelFormatVersion)) {
     if (error != nullptr) {
       *error = kKernelInvalidBinaryFormatVersion;
     }
@@ -76,6 +77,7 @@
   }
 
   Program* program = new Program();
+  program->binary_version_ = formatVersion;
   program->kernel_data_ = reader->buffer();
   program->kernel_data_size_ = reader->size();
 
diff --git a/runtime/vm/kernel_binary.h b/runtime/vm/kernel_binary.h
index 85ed239..760c6ac 100644
--- a/runtime/vm/kernel_binary.h
+++ b/runtime/vm/kernel_binary.h
@@ -17,7 +17,10 @@
 // package:kernel/binary.md.
 
 static const uint32_t kMagicProgramFile = 0x90ABCDEFu;
-static const uint32_t kBinaryFormatVersion = 18;
+
+// Both version numbers are inclusive.
+static const uint32_t kMinSupportedKernelFormatVersion = 18;
+static const uint32_t kMaxSupportedKernelFormatVersion = 25;
 
 // Keep in sync with package:kernel/lib/binary/tag.dart
 #define KERNEL_TAG_LIST(V)                                                     \
@@ -59,6 +62,10 @@
   V(LogicalExpression, 34)                                                     \
   V(ConditionalExpression, 35)                                                 \
   V(StringConcatenation, 36)                                                   \
+  V(ListConcatenation, 111)                                                    \
+  V(SetConcatenation, 112)                                                     \
+  V(MapConcatenation, 113)                                                     \
+  V(InstanceCreation, 114)                                                     \
   V(IsExpression, 37)                                                          \
   V(AsExpression, 38)                                                          \
   V(StringLiteral, 39)                                                         \
@@ -77,6 +84,7 @@
   V(AwaitExpression, 51)                                                       \
   V(FunctionExpression, 52)                                                    \
   V(Let, 53)                                                                   \
+  V(BlockExpression, 82)                                                       \
   V(Instantiation, 54)                                                         \
   V(PositiveIntLiteral, 55)                                                    \
   V(NegativeIntLiteral, 56)                                                    \
@@ -118,7 +126,8 @@
   V(NullReference, 99)                                                         \
   V(ClassReference, 100)                                                       \
   V(MemberReference, 101)                                                      \
-  V(ConstantExpression, 107)                                                   \
+  V(ConstantExpression, 106)                                                   \
+  V(Deprecated_ConstantExpression, 107)                                        \
   V(SpecializedVariableGet, 128)                                               \
   V(SpecializedVariableSet, 136)                                               \
   V(SpecializedIntLiteral, 144)
@@ -143,6 +152,7 @@
   kSymbolConstant = 5,
   kMapConstant = 6,
   kListConstant = 7,
+  kSetConstant = 13,
   kInstanceConstant = 8,
   kPartialInstantiationConstant = 9,
   kTearOffConstant = 10,
diff --git a/runtime/vm/kernel_isolate.cc b/runtime/vm/kernel_isolate.cc
index ab90491..4862219 100644
--- a/runtime/vm/kernel_isolate.cc
+++ b/runtime/vm/kernel_isolate.cc
@@ -44,8 +44,6 @@
             "URI scheme that replaces filepaths prefixes specified"
             " by kernel_multiroot_filepaths option");
 
-const char* KernelIsolate::kName = DART_KERNEL_ISOLATE_NAME;
-
 // Tags used to indicate different requests to the dart frontend.
 //
 // Current tags include the following:
@@ -61,10 +59,11 @@
 const int KernelIsolate::kListDependenciesTag = 5;
 const int KernelIsolate::kNotifyIsolateShutdown = 6;
 
+const char* KernelIsolate::kName = DART_KERNEL_ISOLATE_NAME;
 Dart_IsolateCreateCallback KernelIsolate::create_callback_ = NULL;
 Monitor* KernelIsolate::monitor_ = new Monitor();
+KernelIsolate::State KernelIsolate::state_ = KernelIsolate::kStopped;
 Isolate* KernelIsolate::isolate_ = NULL;
-bool KernelIsolate::initializing_ = true;
 Dart_Port KernelIsolate::kernel_port_ = ILLEGAL_PORT;
 
 class RunKernelTask : public ThreadPool::Task {
@@ -79,11 +78,7 @@
 
     Dart_IsolateCreateCallback create_callback =
         KernelIsolate::create_callback();
-
-    if (create_callback == NULL) {
-      KernelIsolate::FinishedInitializing();
-      return;
-    }
+    ASSERT(create_callback != NULL);
 
     // Note: these flags must match those passed to the VM during
     // the app-jit training run (see //utils/kernel-service/BUILD.gn).
@@ -98,8 +93,9 @@
     api_flags.use_osr = true;
 #endif
 
-    isolate = reinterpret_cast<Isolate*>(create_callback(
-        KernelIsolate::kName, NULL, NULL, NULL, &api_flags, NULL, &error));
+    isolate = reinterpret_cast<Isolate*>(
+        create_callback(KernelIsolate::kName, KernelIsolate::kName, NULL, NULL,
+                        &api_flags, NULL, &error));
     if (isolate == NULL) {
       if (FLAG_trace_kernel) {
         OS::PrintErr(DART_KERNEL_ISOLATE_NAME ": Isolate creation error: %s\n",
@@ -108,7 +104,7 @@
       free(error);
       error = NULL;
       KernelIsolate::SetKernelIsolate(NULL);
-      KernelIsolate::FinishedInitializing();
+      KernelIsolate::InitializingFailed();
       return;
     }
 
@@ -170,6 +166,7 @@
     if (FLAG_trace_kernel) {
       OS::PrintErr(DART_KERNEL_ISOLATE_NAME ": Shutdown.\n");
     }
+    KernelIsolate::FinishedExiting();
   }
 
   bool RunMain(Isolate* I) {
@@ -222,18 +219,36 @@
 };
 
 void KernelIsolate::Run() {
-  MonitorLocker ml(monitor_);
-  initializing_ = true;
+  {
+    MonitorLocker ml(monitor_);
+    ASSERT(state_ == kStopped);
+    state_ = kStarting;
+    ml.NotifyAll();
+  }
   // Grab the isolate create callback here to avoid race conditions with tests
   // that change this after Dart_Initialize returns.
   create_callback_ = Isolate::CreateCallback();
-  Dart::thread_pool()->Run(new RunKernelTask());
+  if (create_callback_ == NULL) {
+    KernelIsolate::InitializingFailed();
+    return;
+  }
+  bool task_started = Dart::thread_pool()->Run(new RunKernelTask());
+  ASSERT(task_started);
 }
 
 void KernelIsolate::Shutdown() {
   MonitorLocker ml(monitor_);
-  while (isolate_ != NULL) {
-    Isolate::KillIfExists(isolate_, Isolate::kInternalKillMsg);
+  while (state_ == kStarting) {
+    ml.Wait();
+  }
+  if (state_ == kStopped) {
+    return;
+  }
+  ASSERT(state_ == kStarted);
+  state_ = kStopping;
+  ml.NotifyAll();
+  Isolate::KillIfExists(isolate_, Isolate::kInternalKillMsg);
+  while (state_ != kStopped) {
     ml.Wait();
   }
 }
@@ -289,16 +304,31 @@
   ml.NotifyAll();
 }
 
+void KernelIsolate::FinishedExiting() {
+  MonitorLocker ml(monitor_);
+  ASSERT(state_ == kStarted || state_ == kStopping);
+  state_ = kStopped;
+  ml.NotifyAll();
+}
+
 void KernelIsolate::FinishedInitializing() {
   MonitorLocker ml(monitor_);
-  initializing_ = false;
+  ASSERT(state_ == kStarting);
+  state_ = kStarted;
+  ml.NotifyAll();
+}
+
+void KernelIsolate::InitializingFailed() {
+  MonitorLocker ml(monitor_);
+  ASSERT(state_ == kStarting);
+  state_ = kStopped;
   ml.NotifyAll();
 }
 
 Dart_Port KernelIsolate::WaitForKernelPort() {
   VMTagScope tagScope(Thread::Current(), VMTag::kLoadWaitTagId);
   MonitorLocker ml(monitor_);
-  while (initializing_ && (kernel_port_ == ILLEGAL_PORT)) {
+  while (state_ == kStarting && (kernel_port_ == ILLEGAL_PORT)) {
     ml.Wait();
   }
   return kernel_port_;
diff --git a/runtime/vm/kernel_isolate.h b/runtime/vm/kernel_isolate.h
index 284177b..cdfe9da 100644
--- a/runtime/vm/kernel_isolate.h
+++ b/runtime/vm/kernel_isolate.h
@@ -70,22 +70,28 @@
   static void AddExperimentalFlag(const char* value);
 
  protected:
-  static Monitor* monitor_;
-  static Dart_IsolateCreateCallback create_callback_;
-
   static void InitCallback(Isolate* I);
   static void SetKernelIsolate(Isolate* isolate);
   static void SetLoadPort(Dart_Port port);
+  static void FinishedExiting();
   static void FinishedInitializing();
-
-  static Dart_Port kernel_port_;
-  static Isolate* isolate_;
-  static bool initializing_;
-
+  static void InitializingFailed();
   static Dart_IsolateCreateCallback create_callback() {
     return create_callback_;
   }
 
+  static Dart_IsolateCreateCallback create_callback_;
+  static Monitor* monitor_;
+  enum State {
+    kStopped,
+    kStarting,
+    kStarted,
+    kStopping,
+  };
+  static State state_;
+  static Isolate* isolate_;
+  static Dart_Port kernel_port_;
+
   static MallocGrowableArray<char*>* experimental_flags_;
 
   friend class Dart;
diff --git a/runtime/vm/kernel_loader.cc b/runtime/vm/kernel_loader.cc
index 9817832..b90a609 100644
--- a/runtime/vm/kernel_loader.cc
+++ b/runtime/vm/kernel_loader.cc
@@ -143,8 +143,9 @@
   return loader_->LookupClass(library_lookup_handle_, klass);
 }
 
-LibraryIndex::LibraryIndex(const ExternalTypedData& kernel_data)
-    : reader_(kernel_data) {
+LibraryIndex::LibraryIndex(const ExternalTypedData& kernel_data,
+                           int32_t binary_version)
+    : reader_(kernel_data), binary_version_(binary_version) {
   intptr_t data_size = reader_.size();
 
   procedure_count_ = reader_.ReadUInt32At(data_size - 4);
@@ -152,6 +153,11 @@
 
   class_count_ = reader_.ReadUInt32At(procedure_index_offset_ - 4);
   class_index_offset_ = procedure_index_offset_ - 4 - (class_count_ + 1) * 4;
+
+  source_references_offset_ = -1;
+  if (binary_version >= 25) {
+    source_references_offset_ = reader_.ReadUInt32At(class_index_offset_ - 4);
+  }
 }
 
 ClassIndex::ClassIndex(const uint8_t* buffer,
@@ -175,7 +181,10 @@
       class_offset + class_size - 4 - (procedure_count_ + 1) * 4;
 }
 
-KernelLoader::KernelLoader(Program* program)
+using UriToSourceTable = DirectChainedHashMap<UriToSourceTableTrait>;
+
+KernelLoader::KernelLoader(Program* program,
+                           UriToSourceTable* uri_to_source_table)
     : program_(program),
       thread_(Thread::Current()),
       zone_(thread_->zone()),
@@ -209,7 +218,7 @@
         "Trying to load a concatenated dill file at a time where that is "
         "not allowed");
   }
-  InitializeFields();
+  InitializeFields(uri_to_source_table);
 }
 
 void KernelLoader::ReadObfuscationProhibitions() {
@@ -223,7 +232,7 @@
   TIMELINE_DURATION(thread, Isolate, "LoadKernel");
 
   if (program->is_single_program()) {
-    KernelLoader loader(program);
+    KernelLoader loader(program, /*uri_to_source_table=*/nullptr);
     return Object::Handle(loader.LoadProgram(process_pending_classes));
   }
 
@@ -233,8 +242,50 @@
 
   Zone* zone = thread->zone();
   Library& library = Library::Handle(zone);
-  // Create "fake programs" for each sub-program.
   intptr_t subprogram_count = subprogram_file_starts.length() - 1;
+
+  // First index all source tables.
+  UriToSourceTable uri_to_source_table;
+  UriToSourceTableEntry wrapper;
+  for (intptr_t i = subprogram_count - 1; i >= 0; --i) {
+    intptr_t subprogram_start = subprogram_file_starts.At(i);
+    intptr_t subprogram_end = subprogram_file_starts.At(i + 1);
+    Thread* thread_ = Thread::Current();
+    Zone* zone_ = thread_->zone();
+    TranslationHelper translation_helper(thread);
+    KernelReaderHelper helper_(zone_, &translation_helper,
+                               program->kernel_data() + subprogram_start,
+                               subprogram_end - subprogram_start, 0);
+    const intptr_t source_table_size = helper_.SourceTableSize();
+    for (intptr_t index = 0; index < source_table_size; ++index) {
+      const String& uri_string = helper_.SourceTableUriFor(index);
+      wrapper.uri = &uri_string;
+      TypedData& line_starts =
+          TypedData::Handle(Z, helper_.GetLineStartsFor(index));
+      if (line_starts.Length() == 0) continue;
+      const String& script_source = helper_.GetSourceFor(index);
+      wrapper.uri = &uri_string;
+      UriToSourceTableEntry* pair = uri_to_source_table.LookupValue(&wrapper);
+      if (pair != NULL) {
+        // At least two entries with content. Unless the content is the same
+        // that's not valid.
+        if (pair->sources->CompareTo(script_source) != 0 ||
+            !pair->line_starts->CanonicalizeEquals(line_starts)) {
+          FATAL(
+              "Invalid kernel binary: Contains at least two source entries "
+              "that do not agree.");
+        }
+      } else {
+        UriToSourceTableEntry* tmp = new UriToSourceTableEntry();
+        tmp->uri = &uri_string;
+        tmp->sources = &script_source;
+        tmp->line_starts = &line_starts;
+        uri_to_source_table.Insert(tmp);
+      }
+    }
+  }
+
+  // Create "fake programs" for each sub-program.
   for (intptr_t i = subprogram_count - 1; i >= 0; --i) {
     intptr_t subprogram_start = subprogram_file_starts.At(i);
     intptr_t subprogram_end = subprogram_file_starts.At(i + 1);
@@ -243,7 +294,7 @@
     reader.set_offset(0);
     Program* subprogram = Program::ReadFrom(&reader);
     ASSERT(subprogram->is_single_program());
-    KernelLoader loader(subprogram);
+    KernelLoader loader(subprogram, &uri_to_source_table);
     Object& load_result = Object::Handle(loader.LoadProgram(false));
     if (load_result.IsError()) return load_result;
 
@@ -283,7 +334,25 @@
   subprogram_file_starts->Reverse();
 }
 
-void KernelLoader::InitializeFields() {
+RawString* KernelLoader::FindSourceForScript(const uint8_t* kernel_buffer,
+                                             intptr_t kernel_buffer_length,
+                                             const String& uri) {
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  TranslationHelper translation_helper(thread);
+  KernelReaderHelper reader(zone, &translation_helper, kernel_buffer,
+                            kernel_buffer_length, 0);
+  intptr_t source_table_size = reader.SourceTableSize();
+  for (intptr_t i = 0; i < source_table_size; ++i) {
+    const String& source_uri = reader.SourceTableUriFor(i);
+    if (source_uri.EndsWith(uri)) {
+      return reader.GetSourceFor(i).raw();
+    }
+  }
+  return String::null();
+}
+
+void KernelLoader::InitializeFields(UriToSourceTable* uri_to_source_table) {
   const intptr_t source_table_size = helper_.SourceTableSize();
   const Array& scripts =
       Array::Handle(Z, Array::New(source_table_size, Heap::kOld));
@@ -352,7 +421,7 @@
 
   Script& script = Script::Handle(Z);
   for (intptr_t index = 0; index < source_table_size; ++index) {
-    script = LoadScriptAt(index);
+    script = LoadScriptAt(index, uri_to_source_table);
     scripts.SetAt(index, script);
   }
 
@@ -426,7 +495,10 @@
 }
 
 void KernelLoader::EvaluateDelayedPragmas() {
+  potential_pragma_functions_ =
+      kernel_program_info_.potential_pragma_functions();
   if (potential_pragma_functions_.IsNull()) return;
+
   Thread* thread = Thread::Current();
   NoOOBMessageScope no_msg_scope(thread);
   NoReloadScope no_reload_scope(thread->isolate(), thread);
@@ -473,11 +545,16 @@
       const intptr_t annotation_count = helper_.ReadListLength();
       for (intptr_t j = 0; j < annotation_count; ++j) {
         const intptr_t tag = helper_.PeekTag();
-        if (tag == kConstantExpression) {
+        if (tag == kConstantExpression ||
+            tag == kDeprecated_ConstantExpression) {
           helper_.ReadByte();  // Skip the tag.
 
           // We have a candiate.  Let's look if it's an instance of the
           // ExternalName class.
+          if (tag == kConstantExpression) {
+            helper_.ReadPosition();  // Skip fileOffset.
+            helper_.SkipDartType();  // Skip type.
+          }
           const intptr_t constant_table_offset = helper_.ReadUInt();
           constant ^= constant_table.GetOrDie(constant_table_offset);
           if (constant.clazz() == external_name_class_.raw()) {
@@ -572,7 +649,9 @@
   Instance& constant = Instance::Handle(Z);
   String& uri_path = String::Handle(Z);
   Library& library = Library::Handle(Z);
+#if !defined(DART_PRECOMPILER)
   Object& result = Object::Handle(Z);
+#endif
 
   for (intptr_t i = 0; i < length; ++i) {
     library ^= potential_extension_libraries_.At(i);
@@ -586,9 +665,13 @@
       uri_path = String::null();
 
       const intptr_t tag = helper_.PeekTag();
-      if (tag == kConstantExpression) {
+      if (tag == kConstantExpression || tag == kDeprecated_ConstantExpression) {
         helper_.ReadByte();  // Skip the tag.
 
+        if (tag == kConstantExpression) {
+          helper_.ReadPosition();  // Skip fileOffset.
+          helper_.SkipDartType();  // Skip type.
+        }
         const intptr_t constant_table_index = helper_.ReadUInt();
         constant ^= constant_table.GetOrDie(constant_table_index);
         if (constant.clazz() == external_name_class_.raw()) {
@@ -603,6 +686,7 @@
 
       if (uri_path.IsNull()) continue;
 
+#if !defined(DART_PRECOMPILER)
       if (!I->HasTagHandler()) {
         H.ReportError("no library handler registered.");
       }
@@ -614,6 +698,16 @@
       if (result.IsError()) {
         H.ReportError(Error::Cast(result), "library handler failed");
       }
+#endif
+
+      // Create a dummy library and add it as an import to the current library.
+      // This allows later to discover and reload this native extension, e.g.
+      // when running from an app-jit snapshot.
+      // See Loader::ReloadNativeExtensions(...) which relies on
+      // Dart_GetImportsOfScheme('dart-ext').
+      const auto& native_library = Library::Handle(Library::New(uri_path));
+      library.AddImport(Namespace::Handle(Namespace::New(
+          native_library, Array::null_array(), Array::null_array())));
     }
   }
   potential_extension_libraries_ = GrowableObjectArray::null();
@@ -645,6 +739,14 @@
       }
     }
 
+    // Set pending fields array to flag constant table loading.
+    ASSERT(I->object_store()->pending_unevaluated_const_fields() ==
+           GrowableObjectArray::null());
+    GrowableObjectArray& pending_unevaluated_const_fields =
+        GrowableObjectArray::Handle(Z, GrowableObjectArray::New());
+    I->object_store()->set_pending_unevaluated_const_fields(
+        pending_unevaluated_const_fields);
+
     // All classes were successfully loaded, so let's:
     //     a) load & canonicalize the constant table
     const Array& constants = ReadConstantTable();
@@ -659,15 +761,31 @@
     kernel_program_info_.set_constants(constants);
     kernel_program_info_.set_constants_table(ExternalTypedData::Handle(Z));
 
+    //     d) evaluate pending field initializers
+    Error& error = Error::Handle(Z);
+    Field& field = Field::Handle(Z);
+    for (intptr_t i = 0, n = pending_unevaluated_const_fields.Length(); i < n;
+         i++) {
+      field ^= pending_unevaluated_const_fields.At(i);
+      error = field.Initialize();
+      if (!error.IsNull()) {
+        H.ReportError(error, "postponed field initializer");
+      }
+    }
+    pending_unevaluated_const_fields = GrowableObjectArray::null();
+    I->object_store()->set_pending_unevaluated_const_fields(
+        pending_unevaluated_const_fields);
+
+    //     e) evaluate pragmas that were delayed
     EvaluateDelayedPragmas();
 
     NameIndex main = program_->main_method();
-    if (main == -1) {
-      return Library::null();
+    if (main != -1) {
+      NameIndex main_library = H.EnclosingName(main);
+      return LookupLibrary(main_library);
     }
 
-    NameIndex main_library = H.EnclosingName(main);
-    return LookupLibrary(main_library);
+    return bytecode_metadata_helper_.GetMainLibrary();
   }
 
   // Either class finalization failed or we caught a compile error.
@@ -755,7 +873,7 @@
     // kernel files, these will constitute the modified libraries.
     *is_empty_program = true;
     if (program->is_single_program()) {
-      KernelLoader loader(program);
+      KernelLoader loader(program, /*uri_to_source_table=*/nullptr);
       loader.walk_incremental_kernel(modified_libs, is_empty_program,
                                      p_num_classes, p_num_procedures);
     }
@@ -773,7 +891,7 @@
       reader.set_offset(0);
       Program* subprogram = Program::ReadFrom(&reader);
       ASSERT(subprogram->is_single_program());
-      KernelLoader loader(subprogram);
+      KernelLoader loader(subprogram, /*uri_to_source_table=*/nullptr);
       loader.walk_incremental_kernel(modified_libs, is_empty_program,
                                      p_num_classes, p_num_procedures);
       delete subprogram;
@@ -807,7 +925,8 @@
       library_kernel_data_ =
           helper_.reader_.ExternalDataFromTo(kernel_offset, library_end);
 
-      LibraryIndex library_index(library_kernel_data_);
+      LibraryIndex library_index(library_kernel_data_,
+                                 program_->binary_version());
       num_classes += library_index.class_count();
       num_procedures += library_index.procedure_count();
     }
@@ -898,7 +1017,7 @@
   library.set_kernel_data(library_kernel_data_);
   library.set_kernel_offset(library_kernel_offset_);
 
-  LibraryIndex library_index(library_kernel_data_);
+  LibraryIndex library_index(library_kernel_data_, program_->binary_version());
   intptr_t class_count = library_index.class_count();
 
   library_helper.ReadUntilIncluding(LibraryHelper::kName);
@@ -914,11 +1033,10 @@
     loading_native_wrappers_library_ = false;
     library.SetLoadInProgress();
   }
-  StringIndex import_uri_index =
-      H.CanonicalNameString(library_helper.canonical_name_);
+
   library_helper.ReadUntilIncluding(LibraryHelper::kSourceUriIndex);
-  const Script& script = Script::Handle(
-      Z, ScriptAt(library_helper.source_uri_index_, import_uri_index));
+  const Script& script =
+      Script::Handle(Z, ScriptAt(library_helper.source_uri_index_));
 
   library_helper.ReadUntilExcluding(LibraryHelper::kAnnotations);
   intptr_t annotations_kernel_offset =
@@ -944,6 +1062,7 @@
   Class& toplevel_class =
       Class::Handle(Z, Class::New(library, Symbols::TopLevel(), script,
                                   TokenPosition::kNoSource, register_class));
+  toplevel_class.set_is_type_finalized();
   toplevel_class.set_is_cycle_free();
   library.set_toplevel_class(toplevel_class);
 
@@ -981,6 +1100,19 @@
 
   if (register_class) {
     classes.Add(toplevel_class, Heap::kOld);
+
+    if (library_index.HasSourceReferences()) {
+      helper_.SetOffset(library_index.SourceReferencesOffset());
+      intptr_t count = helper_.ReadUInt();
+      const GrowableObjectArray& owned_scripts =
+          GrowableObjectArray::Handle(library.owned_scripts());
+      Script& script = Script::Handle(Z);
+      for (intptr_t i = 0; i < count; i++) {
+        intptr_t uri_index = helper_.ReadUInt();
+        script = ScriptAt(uri_index);
+        owned_scripts.Add(script);
+      }
+    }
   }
   if (!library.Loaded()) library.SetLoaded();
 
@@ -997,6 +1129,16 @@
 
   TIMELINE_DURATION(Thread::Current(), Isolate, "FinishTopLevelClassLoading");
 
+  ActiveClassScope active_class_scope(&active_class_, &toplevel_class);
+
+  if (FLAG_enable_interpreter || FLAG_use_bytecode_compiler) {
+    if (bytecode_metadata_helper_.ReadMembers(library_kernel_offset_,
+                                              toplevel_class, false)) {
+      ASSERT(toplevel_class.is_loaded());
+      return;
+    }
+  }
+
   // Offsets within library index are whole program offsets and not
   // relative to the library.
   const intptr_t correction = correction_offset_ - library_kernel_offset_;
@@ -1005,7 +1147,6 @@
 
   fields_.Clear();
   functions_.Clear();
-  ActiveClassScope active_class_scope(&active_class_, &toplevel_class);
 
   // Load toplevel fields.
   const intptr_t field_count = helper_.ReadListLength();  // read list length.
@@ -1035,6 +1176,9 @@
     // In the VM all const fields are implicitly final whereas in Kernel they
     // are not final because they are not explicitly declared that way.
     const bool is_final = field_helper.IsConst() || field_helper.IsFinal();
+    // Only instance fields could be covariant.
+    ASSERT(!field_helper.IsCovariant() &&
+           !field_helper.IsGenericCovariantImpl());
     const Field& field = Field::Handle(
         Z,
         Field::NewTopLevel(name, is_final, field_helper.IsConst(), script_class,
@@ -1056,7 +1200,8 @@
     }
     if ((FLAG_enable_mirrors || has_pragma_annotation) &&
         annotation_count > 0) {
-      library.AddFieldMetadata(field, TokenPosition::kNoSource, field_offset);
+      library.AddFieldMetadata(field, TokenPosition::kNoSource, field_offset,
+                               0);
     }
     fields_.Add(&field);
   }
@@ -1165,7 +1310,7 @@
         target_library.url() == Symbols::DartMirrors().raw()) {
       H.ReportError("import of dart:mirrors with --enable-mirrors=false");
     }
-    if (!Api::ffiEnabled() &&
+    if (!Api::IsFfiEnabled() &&
         target_library.url() == Symbols::DartFfi().raw()) {
       H.ReportError("import of dart:ffi with --enable-ffi=false");
     }
@@ -1239,80 +1384,6 @@
   }
 }
 
-// Workaround for http://dartbug.com/32087: currently Kernel front-end
-// embeds absolute build-time paths to core library sources into Kernel
-// binaries this introduces discrepancy between how stack traces were
-// looked like in legacy pipeline and how they look in Dart 2 pipeline and
-// breaks users' code that attempts to pattern match and filter various
-// irrelevant frames (e.g. frames from dart:async).
-// This also breaks debugging experience in external debuggers because
-// debugger attempts to open files that don't exist in the local file
-// system.
-// To work around this issue we reformat urls of scripts belonging to
-// dart:-scheme libraries to look like they looked like in legacy pipeline:
-//
-//               dart:libname/filename.dart
-//               dart:libname/runtime/lib/filename.dart
-//               dart:libname/runtime/bin/filename.dart
-//
-void KernelLoader::FixCoreLibraryScriptUri(const Library& library,
-                                           const Script& script) {
-  struct Helper {
-    static bool EndsWithCString(const String& haystack,
-                                const char* needle,
-                                intptr_t needle_length,
-                                intptr_t end_pos) {
-      const intptr_t start = end_pos - needle_length + 1;
-      if (start >= 0) {
-        for (intptr_t i = 0; i < needle_length; i++) {
-          if (haystack.CharAt(start + i) != needle[i]) {
-            return false;
-          }
-        }
-        return true;
-      }
-      return false;
-    }
-  };
-
-  if (library.is_dart_scheme()) {
-    String& url = String::Handle(zone_, script.url());
-    if (!url.StartsWith(Symbols::DartScheme())) {
-      // Search backwards until '/' is found. That gives us the filename.
-      // Note: can't use reusable handle in the code below because
-      // concat also needs it.
-      intptr_t pos = url.Length() - 1;
-      while (pos >= 0 && url.CharAt(pos) != '/') {
-        pos--;
-      }
-
-      static const char* kRuntimeLib = "runtime/lib/";
-      static const intptr_t kRuntimeLibLen = strlen(kRuntimeLib);
-      const bool inside_runtime_lib =
-          Helper::EndsWithCString(url, kRuntimeLib, kRuntimeLibLen, pos);
-
-      static const char* kRuntimeBin = "runtime/bin/";
-      static const intptr_t kRuntimeBinLen = strlen(kRuntimeBin);
-      const bool inside_runtime_bin =
-          Helper::EndsWithCString(url, kRuntimeBin, kRuntimeBinLen, pos);
-
-      String& tmp = String::Handle(zone_);
-      url = String::SubString(url, pos + 1);
-      if (inside_runtime_lib) {
-        tmp = String::New("runtime/lib", Heap::kNew);
-        url = String::Concat(tmp, url);
-      } else if (inside_runtime_bin) {
-        tmp = String::New("runtime/bin", Heap::kNew);
-        url = String::Concat(tmp, url);
-      }
-      tmp = library.url();
-      url = String::Concat(Symbols::Slash(), url);
-      url = String::Concat(tmp, url);
-      script.set_url(url);
-    }
-  }
-}
-
 void KernelLoader::LoadClass(const Library& library,
                              const Class& toplevel_class,
                              intptr_t class_end,
@@ -1334,7 +1405,6 @@
     const Script& script =
         Script::Handle(Z, ScriptAt(class_helper.source_uri_index_));
     out_class->set_script(script);
-    FixCoreLibraryScriptUri(library, script);
   }
   if (out_class->token_pos() == TokenPosition::kNoSource) {
     class_helper.ReadUntilIncluding(ClassHelper::kStartPosition);
@@ -1404,16 +1474,30 @@
 
   TIMELINE_DURATION(Thread::Current(), Isolate, "FinishClassLoading");
 
-  fields_.Clear();
-  functions_.Clear();
   ActiveClassScope active_class_scope(&active_class_, &klass);
+
+  bool discard_fields = false;
   if (library.raw() == Library::InternalLibrary() &&
       klass.Name() == Symbols::ClassID().raw()) {
     // If this is a dart:internal.ClassID class ignore field declarations
     // contained in the Kernel file and instead inject our own const
     // fields.
     klass.InjectCIDFields();
-  } else {
+    discard_fields = true;
+  }
+
+  if (FLAG_enable_interpreter || FLAG_use_bytecode_compiler) {
+    if (bytecode_metadata_helper_.ReadMembers(
+            klass.kernel_offset() + library_kernel_offset_, klass,
+            discard_fields)) {
+      ASSERT(klass.is_loaded());
+      return;
+    }
+  }
+
+  fields_.Clear();
+  functions_.Clear();
+  if (!discard_fields) {
     class_helper->ReadUntilExcluding(ClassHelper::kFields);
     int field_count = helper_.ReadListLength();  // read list length.
     for (intptr_t i = 0; i < field_count; ++i) {
@@ -1458,6 +1542,9 @@
                      field_helper.position_, field_helper.end_position_));
       field.set_kernel_offset(field_offset);
       field.set_has_pragma(has_pragma_annotation);
+      field.set_is_covariant(field_helper.IsCovariant());
+      field.set_is_generic_covariant_impl(
+          field_helper.IsGenericCovariantImpl());
       ReadInferredType(field, field_offset + library_kernel_offset_);
       CheckForInitializer(field);
       field_helper.ReadUntilExcluding(FieldHelper::kInitializer);
@@ -1470,7 +1557,8 @@
       }
       if ((FLAG_enable_mirrors || has_pragma_annotation) &&
           annotation_count > 0) {
-        library.AddFieldMetadata(field, TokenPosition::kNoSource, field_offset);
+        library.AddFieldMetadata(field, TokenPosition::kNoSource, field_offset,
+                                 0);
       }
       fields_.Add(&field);
     }
@@ -1560,7 +1648,7 @@
     if ((FLAG_enable_mirrors || has_pragma_annotation) &&
         annotation_count > 0) {
       library.AddFunctionMetadata(function, TokenPosition::kNoSource,
-                                  constructor_offset);
+                                  constructor_offset, 0);
     }
   }
 
@@ -1609,7 +1697,7 @@
 
   KernelLoader kernel_loader(script, library_kernel_data,
                              library_kernel_offset);
-  LibraryIndex library_index(library_kernel_data);
+  LibraryIndex library_index(library_kernel_data, /*binary_version=*/-1);
 
   if (klass.IsTopLevel()) {
     ASSERT(klass.raw() == toplevel_class.raw());
@@ -1666,7 +1754,8 @@
       if (DetectPragmaCtor()) {
         *has_pragma_annotation = true;
       }
-    } else if (tag == kConstantExpression) {
+    } else if (tag == kConstantExpression ||
+               tag == kDeprecated_ConstantExpression) {
       const Array& constant_table_array =
           Array::Handle(kernel_program_info_.constants());
       if (constant_table_array.IsNull()) {
@@ -1688,6 +1777,10 @@
 
         helper_.ReadByte();  // Skip the tag.
 
+        if (tag == kConstantExpression) {
+          helper_.ReadPosition();  // Skip fileOffset.
+          helper_.SkipDartType();  // Skip type.
+        }
         const intptr_t offset_in_constant_table = helper_.ReadUInt();
 
         AlternativeReadingScope scope(
@@ -1717,6 +1810,10 @@
         // Obtain `dart:_internal::pragma`.
         EnsurePragmaClassIsLookedUp();
 
+        if (tag == kConstantExpression) {
+          helper_.ReadPosition();  // Skip fileOffset.
+          helper_.SkipDartType();  // Skip type.
+        }
         const intptr_t constant_table_index = helper_.ReadUInt();
         const Object& constant =
             Object::Handle(constant_table.GetOrDie(constant_table_index));
@@ -1850,7 +1947,7 @@
 
   if (annotation_count > 0) {
     library.AddFunctionMetadata(function, TokenPosition::kNoSource,
-                                procedure_offset);
+                                procedure_offset, 0);
   }
 
   if (has_pragma_annotation) {
@@ -1875,7 +1972,6 @@
     patch_class ^= patch_classes_.At(source_uri_index);
     if (patch_class.IsNull() || patch_class.origin_class() != klass.raw()) {
       ASSERT(!library_kernel_data_.IsNull());
-      FixCoreLibraryScriptUri(Library::Handle(klass.library()), correct_script);
       patch_class = PatchClass::New(klass, correct_script);
       patch_class.set_library_kernel_data(library_kernel_data_);
       patch_class.set_library_kernel_offset(library_kernel_offset_);
@@ -1886,37 +1982,54 @@
   return klass;
 }
 
-RawScript* KernelLoader::LoadScriptAt(intptr_t index) {
+RawScript* KernelLoader::LoadScriptAt(intptr_t index,
+                                      UriToSourceTable* uri_to_source_table) {
   const String& uri_string = helper_.SourceTableUriFor(index);
-  const String& script_source = helper_.GetSourceFor(index);
+  const String& import_uri_string =
+      helper_.SourceTableImportUriFor(index, program_->binary_version());
+
   String& sources = String::Handle(Z);
-  TypedData& line_starts =
-      TypedData::Handle(Z, helper_.GetLineStartsFor(index));
-  if (script_source.raw() == Symbols::Empty().raw() &&
-      line_starts.Length() == 0 && uri_string.Length() > 0) {
-    // Entry included only to provide URI - actual source should already exist
-    // in the VM, so try to find it.
-    Library& lib = Library::Handle(Z);
-    Script& script = Script::Handle(Z);
-    const GrowableObjectArray& libs =
-        GrowableObjectArray::Handle(isolate_->object_store()->libraries());
-    for (intptr_t i = 0; i < libs.Length(); i++) {
-      lib ^= libs.At(i);
-      script = lib.LookupScript(uri_string, /* useResolvedUri = */ true);
-      if (!script.IsNull() && script.kind() == RawScript::kKernelTag) {
-        sources ^= script.Source();
-        line_starts ^= script.line_starts();
-        break;
-      }
+  TypedData& line_starts = TypedData::Handle(Z);
+
+  if (uri_to_source_table != nullptr) {
+    UriToSourceTableEntry wrapper;
+    wrapper.uri = &uri_string;
+    UriToSourceTableEntry* pair = uri_to_source_table->LookupValue(&wrapper);
+    if (pair != nullptr) {
+      sources ^= pair->sources->raw();
+      line_starts ^= pair->line_starts->raw();
     }
-  } else {
-    sources = script_source.raw();
   }
 
-  const Script& script = Script::Handle(
-      Z, Script::New(uri_string, sources, RawScript::kKernelTag));
-  String& script_url = String::Handle();
-  script_url = script.url();
+  if (sources.IsNull() || line_starts.IsNull()) {
+    const String& script_source = helper_.GetSourceFor(index);
+    line_starts ^= helper_.GetLineStartsFor(index);
+
+    if (script_source.raw() == Symbols::Empty().raw() &&
+        line_starts.Length() == 0 && uri_string.Length() > 0) {
+      // Entry included only to provide URI - actual source should already exist
+      // in the VM, so try to find it.
+      Library& lib = Library::Handle(Z);
+      Script& script = Script::Handle(Z);
+      const GrowableObjectArray& libs =
+          GrowableObjectArray::Handle(isolate_->object_store()->libraries());
+      for (intptr_t i = 0; i < libs.Length(); i++) {
+        lib ^= libs.At(i);
+        script = lib.LookupScript(uri_string, /* useResolvedUri = */ true);
+        if (!script.IsNull() && script.kind() == RawScript::kKernelTag) {
+          sources ^= script.Source();
+          line_starts ^= script.line_starts();
+          break;
+        }
+      }
+    } else {
+      sources = script_source.raw();
+    }
+  }
+
+  const Script& script =
+      Script::Handle(Z, Script::New(import_uri_string, uri_string, sources,
+                                    RawScript::kKernelTag));
   script.set_kernel_script_index(index);
   script.set_kernel_program_info(kernel_program_info_);
   script.set_line_starts(line_starts);
@@ -1925,16 +2038,6 @@
   return script.raw();
 }
 
-RawScript* KernelLoader::ScriptAt(intptr_t index, StringIndex import_uri) {
-  if (import_uri != -1) {
-    const Script& script =
-        Script::Handle(Z, kernel_program_info_.ScriptAt(index));
-    script.set_url(H.DartString(import_uri, Heap::kOld));
-    return script.raw();
-  }
-  return kernel_program_info_.ScriptAt(index);
-}
-
 void KernelLoader::GenerateFieldAccessors(const Class& klass,
                                           const Field& field,
                                           FieldHelper* field_helper) {
@@ -2008,7 +2111,7 @@
   getter.set_result_type(field_type);
   getter.set_is_debuggable(false);
   getter.set_accessor_field(field);
-  SetupFieldAccessorFunction(klass, getter, field_type);
+  H.SetupFieldAccessorFunction(klass, getter, field_type);
 
   if (!field_helper->IsStatic() && !field_helper->IsFinal()) {
     // Only static fields can be const.
@@ -2028,34 +2131,7 @@
     setter.set_result_type(Object::void_type());
     setter.set_is_debuggable(false);
     setter.set_accessor_field(field);
-    SetupFieldAccessorFunction(klass, setter, field_type);
-  }
-}
-
-void KernelLoader::SetupFieldAccessorFunction(const Class& klass,
-                                              const Function& function,
-                                              const AbstractType& field_type) {
-  bool is_setter = function.IsImplicitSetterFunction();
-  bool is_method = !function.IsStaticFunction();
-  intptr_t parameter_count = (is_method ? 1 : 0) + (is_setter ? 1 : 0);
-
-  function.SetNumOptionalParameters(0, false);
-  function.set_num_fixed_parameters(parameter_count);
-  function.set_parameter_types(
-      Array::Handle(Z, Array::New(parameter_count, Heap::kOld)));
-  function.set_parameter_names(
-      Array::Handle(Z, Array::New(parameter_count, Heap::kOld)));
-
-  intptr_t pos = 0;
-  if (is_method) {
-    function.SetParameterTypeAt(pos, T.ReceiverType(klass));
-    function.SetParameterNameAt(pos, Symbols::This());
-    pos++;
-  }
-  if (is_setter) {
-    function.SetParameterTypeAt(pos, field_type);
-    function.SetParameterNameAt(pos, Symbols::Value());
-    pos++;
+    H.SetupFieldAccessorFunction(klass, setter, field_type);
   }
 }
 
@@ -2173,9 +2249,8 @@
 RawFunction* CreateFieldInitializerFunction(Thread* thread,
                                             Zone* zone,
                                             const Field& field) {
-  if (field.Initializer() != Function::null()) {
-    return field.Initializer();
-  }
+  ASSERT(field.InitializerFunction() == Function::null());
+
   String& init_name = String::Handle(zone, field.name());
   init_name = Symbols::FromConcat(thread, Symbols::InitPrefix(), init_name);
 
@@ -2196,23 +2271,21 @@
 
   // Create a static initializer.
   const Function& initializer_fun = Function::Handle(
-      zone, Function::New(init_name,
-                          // TODO(alexmarkov): Consider creating a separate
-                          // function kind for field initializers.
-                          RawFunction::kImplicitStaticFinalGetter,
+      zone, Function::New(init_name, RawFunction::kStaticFieldInitializer,
                           true,   // is_static
                           false,  // is_const
                           false,  // is_abstract
                           false,  // is_external
                           false,  // is_native
                           initializer_owner, TokenPosition::kNoSource));
-  initializer_fun.set_kernel_offset(field.kernel_offset());
   initializer_fun.set_result_type(AbstractType::Handle(zone, field.type()));
   initializer_fun.set_is_reflectable(false);
   initializer_fun.set_is_inlinable(false);
   initializer_fun.set_token_pos(field.token_pos());
   initializer_fun.set_end_token_pos(field.end_token_pos());
-  field.SetInitializer(initializer_fun);
+  initializer_fun.set_accessor_field(field);
+  initializer_fun.InheritBinaryDeclarationFrom(field);
+  field.SetInitializerFunction(initializer_fun);
   return initializer_fun.raw();
 }
 
diff --git a/runtime/vm/kernel_loader.h b/runtime/vm/kernel_loader.h
index 6554706..79c58b6 100644
--- a/runtime/vm/kernel_loader.h
+++ b/runtime/vm/kernel_loader.h
@@ -82,7 +82,10 @@
 class LibraryIndex {
  public:
   // |kernel_data| is the kernel data for one library alone.
-  explicit LibraryIndex(const ExternalTypedData& kernel_data);
+  // binary_version can be -1 in which case some parts of the index might not
+  // be read.
+  explicit LibraryIndex(const ExternalTypedData& kernel_data,
+                        int32_t binary_version);
 
   intptr_t class_count() const { return class_count_; }
   intptr_t procedure_count() const { return procedure_count_; }
@@ -106,8 +109,17 @@
     return -1;
   }
 
+  bool HasSourceReferences() {
+    if (binary_version_ < 25) return false;
+    return true;
+  }
+
+  intptr_t SourceReferencesOffset() { return source_references_offset_; }
+
  private:
   Reader reader_;
+  int32_t binary_version_;
+  intptr_t source_references_offset_;
   intptr_t class_index_offset_;
   intptr_t class_count_;
   intptr_t procedure_index_offset_;
@@ -147,9 +159,36 @@
   DISALLOW_COPY_AND_ASSIGN(ClassIndex);
 };
 
+struct UriToSourceTableEntry : public ZoneAllocated {
+  UriToSourceTableEntry() {}
+
+  const String* uri = nullptr;
+  const String* sources = nullptr;
+  const TypedData* line_starts = nullptr;
+};
+
+struct UriToSourceTableTrait {
+  typedef UriToSourceTableEntry* Value;
+  typedef const UriToSourceTableEntry* Key;
+  typedef UriToSourceTableEntry* Pair;
+
+  static Key KeyOf(Pair kv) { return kv; }
+
+  static Value ValueOf(Pair kv) { return kv; }
+
+  static inline intptr_t Hashcode(Key key) { return key->uri->Hash(); }
+
+  static inline bool IsKeyEqual(Pair kv, Key key) {
+    // Only compare uri.
+    return kv->uri->CompareTo(*key->uri) == 0;
+  }
+};
+
 class KernelLoader : public ValueObject {
  public:
-  explicit KernelLoader(Program* program);
+  explicit KernelLoader(
+      Program* program,
+      DirectChainedHashMap<UriToSourceTableTrait>* uri_to_source_table);
   static Object& LoadEntireProgram(Program* program,
                                    bool process_pending_classes = true);
 
@@ -176,6 +215,10 @@
                                     intptr_t* p_num_classes,
                                     intptr_t* p_num_procedures);
 
+  static RawString* FindSourceForScript(const uint8_t* kernel_buffer,
+                                        intptr_t kernel_buffer_length,
+                                        const String& url);
+
   RawLibrary* LoadLibrary(intptr_t index);
 
   void FinishTopLevelClassLoading(const Class& toplevel_class,
@@ -248,7 +291,8 @@
                const ExternalTypedData& kernel_data,
                intptr_t data_program_offset);
 
-  void InitializeFields();
+  void InitializeFields(
+      DirectChainedHashMap<UriToSourceTableTrait>* uri_to_source_table);
   static void index_programs(kernel::Reader* reader,
                              GrowableArray<intptr_t>* subprogram_file_starts);
   void walk_incremental_kernel(BitVector* modified_libs,
@@ -262,8 +306,6 @@
   void ReadInferredType(const Field& field, intptr_t kernel_offset);
   void CheckForInitializer(const Field& field);
 
-  void FixCoreLibraryScriptUri(const Library& library, const Script& script);
-
   void LoadClass(const Library& library,
                  const Class& toplevel_class,
                  intptr_t class_end,
@@ -284,23 +326,22 @@
   RawArray* MakeFieldsArray();
   RawArray* MakeFunctionsArray();
 
-  RawScript* LoadScriptAt(intptr_t index);
+  RawScript* LoadScriptAt(
+      intptr_t index,
+      DirectChainedHashMap<UriToSourceTableTrait>* uri_to_source_table);
 
   // If klass's script is not the script at the uri index, return a PatchClass
   // for klass whose script corresponds to the uri index.
   // Otherwise return klass.
   const Object& ClassForScriptAt(const Class& klass, intptr_t source_uri_index);
-  RawScript* ScriptAt(intptr_t source_uri_index,
-                      StringIndex import_uri = StringIndex());
+  RawScript* ScriptAt(intptr_t source_uri_index) {
+    return kernel_program_info_.ScriptAt(source_uri_index);
+  }
 
   void GenerateFieldAccessors(const Class& klass,
                               const Field& field,
                               FieldHelper* field_helper);
 
-  void SetupFieldAccessorFunction(const Class& klass,
-                                  const Function& function,
-                                  const AbstractType& field_type);
-
   void LoadLibraryImportsAndExports(Library* library,
                                     const Class& toplevel_class);
 
@@ -344,14 +385,7 @@
 
   void EnsurePotentialPragmaFunctions() {
     potential_pragma_functions_ =
-        kernel_program_info_.potential_pragma_functions();
-    if (potential_pragma_functions_.IsNull()) {
-      // To avoid too many grows in this array, we'll set it's initial size to
-      // something close to the actual number of potential native functions.
-      potential_pragma_functions_ = GrowableObjectArray::New(100, Heap::kNew);
-      kernel_program_info_.set_potential_pragma_functions(
-          potential_pragma_functions_);
-    }
+        translation_helper_.EnsurePotentialPragmaFunctions();
   }
 
   void EnsurePotentialExtensionLibraries() {
diff --git a/runtime/vm/malloc_hooks_arm.cc b/runtime/vm/malloc_hooks_arm.cc
index 7e857e5..e344434 100644
--- a/runtime/vm/malloc_hooks_arm.cc
+++ b/runtime/vm/malloc_hooks_arm.cc
@@ -10,7 +10,7 @@
 
 namespace dart {
 
-const intptr_t kSkipCount = 5;
+const intptr_t kSkipCount = 4;
 
 }  // namespace dart
 
diff --git a/runtime/vm/malloc_hooks_arm64.cc b/runtime/vm/malloc_hooks_arm64.cc
index e50ea0b..d063748 100644
--- a/runtime/vm/malloc_hooks_arm64.cc
+++ b/runtime/vm/malloc_hooks_arm64.cc
@@ -10,7 +10,7 @@
 
 namespace dart {
 
-const intptr_t kSkipCount = 5;
+const intptr_t kSkipCount = 4;
 
 }  // namespace dart
 
diff --git a/runtime/vm/malloc_hooks_ia32.cc b/runtime/vm/malloc_hooks_ia32.cc
index 2b7a371..b056456 100644
--- a/runtime/vm/malloc_hooks_ia32.cc
+++ b/runtime/vm/malloc_hooks_ia32.cc
@@ -11,9 +11,9 @@
 namespace dart {
 
 #if defined(DEBUG)
-const intptr_t kSkipCount = 6;
-#elif !(defined(PRODUCT) || defined(DEBUG))
 const intptr_t kSkipCount = 5;
+#elif !(defined(PRODUCT) || defined(DEBUG))
+const intptr_t kSkipCount = 4;
 #endif
 
 }  // namespace dart
diff --git a/runtime/vm/malloc_hooks_jemalloc.cc b/runtime/vm/malloc_hooks_jemalloc.cc
deleted file mode 100644
index 2eb1b94..0000000
--- a/runtime/vm/malloc_hooks_jemalloc.cc
+++ /dev/null
@@ -1,80 +0,0 @@
-// Copyright (c) 2017, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-#include "platform/globals.h"
-#if defined(DART_USE_JEMALLOC) && !defined(PRODUCT)
-
-#include "vm/malloc_hooks.h"
-
-#include <jemalloc/jemalloc.h>
-
-#include "vm/json_stream.h"
-
-namespace dart {
-
-void MallocHooks::Init() {
-  // Do nothing.
-}
-
-void MallocHooks::Cleanup() {
-  // Do nothing.
-}
-
-void MallocHooks::PrintToJSONObject(JSONObject* jsobj) {
-  // Here, we ignore the value of FLAG_profiler_native_memory because we can
-  // gather this information cheaply without hooking into every call to the
-  // malloc library.
-  jsobj->AddProperty("_heapAllocatedMemoryUsage",
-                     heap_allocated_memory_in_bytes());
-  jsobj->AddProperty("_heapAllocationCount", allocation_count());
-}
-
-intptr_t MallocHooks::heap_allocated_memory_in_bytes() {
-  uint64_t epoch = 1;
-  size_t epoch_sz = sizeof(epoch);
-  int result = mallctl("epoch", &epoch, &epoch_sz, &epoch, epoch_sz);
-  if (result != 0) {
-    return 0;
-  }
-
-  intptr_t allocated;
-  size_t allocated_sz = sizeof(allocated);
-  result = mallctl("stats.allocated", &allocated, &allocated_sz, NULL, 0);
-  if (result != 0) {
-    return 0;
-  }
-  return allocated;
-}
-
-intptr_t MallocHooks::allocation_count() {
-  return 0;
-}
-
-bool MallocHooks::ProfilingEnabled() {
-  return false;
-}
-
-bool MallocHooks::stack_trace_collection_enabled() {
-  return false;
-}
-
-void MallocHooks::set_stack_trace_collection_enabled(bool enabled) {
-  // Do nothing.
-}
-
-void MallocHooks::ResetStats() {
-  // Do nothing.
-}
-
-bool MallocHooks::Active() {
-  return false;
-}
-
-Sample* MallocHooks::GetSample(const void* ptr) {
-  return NULL;
-}
-
-}  // namespace dart
-
-#endif  // defined(DART_USE_JEMALLOC) && ...
diff --git a/runtime/vm/malloc_hooks_unsupported.cc b/runtime/vm/malloc_hooks_unsupported.cc
index e37ca80..b08d138 100644
--- a/runtime/vm/malloc_hooks_unsupported.cc
+++ b/runtime/vm/malloc_hooks_unsupported.cc
@@ -4,8 +4,7 @@
 
 #include "platform/globals.h"
 
-#if (!defined(DART_USE_TCMALLOC) && !defined(DART_USE_JEMALLOC)) ||            \
-    defined(PRODUCT)
+#if defined(PRODUCT) || !defined(DART_USE_TCMALLOC)
 
 #include "vm/malloc_hooks.h"
 
diff --git a/runtime/vm/malloc_hooks_x64.cc b/runtime/vm/malloc_hooks_x64.cc
index 2ec564b..25e2283 100644
--- a/runtime/vm/malloc_hooks_x64.cc
+++ b/runtime/vm/malloc_hooks_x64.cc
@@ -11,9 +11,9 @@
 namespace dart {
 
 #if defined(DEBUG)
-const intptr_t kSkipCount = 6;
-#elif !(defined(PRODUCT) || defined(DEBUG))
 const intptr_t kSkipCount = 5;
+#elif !(defined(PRODUCT) || defined(DEBUG))
+const intptr_t kSkipCount = 4;
 #endif
 
 }  // namespace dart
diff --git a/runtime/vm/message.cc b/runtime/vm/message.cc
index 82816de..985c5b5 100644
--- a/runtime/vm/message.cc
+++ b/runtime/vm/message.cc
@@ -40,7 +40,7 @@
       snapshot_length_(0),
       finalizable_data_(NULL),
       priority_(priority) {
-  ASSERT(!raw_obj->IsHeapObject() || raw_obj->IsVMHeapObject());
+  ASSERT(!raw_obj->IsHeapObject() || raw_obj->InVMIsolateHeap());
   ASSERT((priority == kNormalPriority) ||
          (delivery_failure_port == kIllegalPort));
   ASSERT(IsRaw());
diff --git a/runtime/vm/metrics.cc b/runtime/vm/metrics.cc
index 99bc372..c20cfc7 100644
--- a/runtime/vm/metrics.cc
+++ b/runtime/vm/metrics.cc
@@ -303,9 +303,14 @@
   return Service::MaxRSS();
 }
 
+#define VM_METRIC_VARIABLE(type, variable, name, unit)                         \
+  type vm_metric_##variable;
+VM_METRIC_LIST(VM_METRIC_VARIABLE);
+#undef VM_METRIC_VARIABLE
+
 void Metric::Init() {
 #define VM_METRIC_INIT(type, variable, name, unit)                             \
-  vm_metric_##variable##_.InitInstance(name, NULL, Metric::unit);
+  vm_metric_##variable.InitInstance(name, NULL, Metric::unit);
   VM_METRIC_LIST(VM_METRIC_INIT);
 #undef VM_METRIC_INIT
 }
@@ -323,7 +328,7 @@
     OS::PrintErr("\n");
   }
 #define VM_METRIC_CLEANUP(type, variable, name, unit)                          \
-  vm_metric_##variable##_.CleanupInstance();
+  vm_metric_##variable.CleanupInstance();
   VM_METRIC_LIST(VM_METRIC_CLEANUP);
 #undef VM_METRIC_CLEANUP
 }
diff --git a/runtime/vm/metrics.h b/runtime/vm/metrics.h
index 75f0781..b54fc12 100644
--- a/runtime/vm/metrics.h
+++ b/runtime/vm/metrics.h
@@ -182,7 +182,7 @@
 
 #if !defined(PRODUCT)
 #define VM_METRIC_VARIABLE(type, variable, name, unit)                         \
-  static type vm_metric_##variable##_;
+  extern type vm_metric_##variable;
 VM_METRIC_LIST(VM_METRIC_VARIABLE);
 #undef VM_METRIC_VARIABLE
 #endif  // !defined(PRODUCT)
diff --git a/runtime/vm/native_api_impl.cc b/runtime/vm/native_api_impl.cc
index 6f12a68..92192fd 100644
--- a/runtime/vm/native_api_impl.cc
+++ b/runtime/vm/native_api_impl.cc
@@ -185,7 +185,7 @@
   DARTSCOPE(Thread::Current());
   API_TIMELINE_DURATION(T);
   Dart_Handle result = Api::CheckAndFinalizePendingClasses(T);
-  if (::Dart_IsError(result)) {
+  if (Api::IsError(result)) {
     return result;
   }
   CHECK_CALLBACK_STATE(T);
@@ -205,7 +205,7 @@
   DARTSCOPE(Thread::Current());
   API_TIMELINE_DURATION(T);
   Dart_Handle result = Api::CheckAndFinalizePendingClasses(T);
-  if (::Dart_IsError(result)) {
+  if (Api::IsError(result)) {
     return result;
   }
   CHECK_CALLBACK_STATE(T);
diff --git a/runtime/vm/native_arguments.h b/runtime/vm/native_arguments.h
index 86d7be5..7c637b3 100644
--- a/runtime/vm/native_arguments.h
+++ b/runtime/vm/native_arguments.h
@@ -158,7 +158,12 @@
     return type_args.TypeAt(index);
   }
 
-  void SetReturn(const Object& value) const { *retval_ = value.raw(); }
+  RawObject** ReturnValueAddress() const { return retval_; }
+
+  void SetReturn(const Object& value) const {
+    ASSERT(thread_->execution_state() == Thread::kThreadInVM);
+    *retval_ = value.raw();
+  }
 
   RawObject* ReturnValue() const {
     // Tell MemorySanitizer the retval_ was initialized (by generated code).
@@ -250,7 +255,10 @@
   // exceedingly careful when we use it.  If there are any other side
   // effects in the statement that may cause GC, it could lead to
   // bugs.
-  void SetReturnUnsafe(RawObject* value) const { *retval_ = value; }
+  void SetReturnUnsafe(RawObject* value) const {
+    ASSERT(thread_->execution_state() == Thread::kThreadInVM);
+    *retval_ = value;
+  }
 
   // Returns true if the arguments are those of an instance function call.
   bool ToInstanceFunction() const {
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 318379e..7a8b971 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -36,6 +36,7 @@
 #include "vm/heap/weak_code.h"
 #include "vm/isolate_reload.h"
 #include "vm/kernel.h"
+#include "vm/kernel_binary.h"
 #include "vm/kernel_isolate.h"
 #include "vm/kernel_loader.h"
 #include "vm/native_symbol.h"
@@ -89,6 +90,8 @@
 static const intptr_t kGetterPrefixLength = strlen(kGetterPrefix);
 static const char* const kSetterPrefix = "set:";
 static const intptr_t kSetterPrefixLength = strlen(kSetterPrefix);
+static const char* const kInitPrefix = "init:";
+static const intptr_t kInitPrefixLength = strlen(kInitPrefix);
 
 // A cache of VM heap allocated preinitialized empty ic data entry arrays.
 RawArray* ICData::cached_icdata_arrays_[kCachedICDataArrayCount];
@@ -456,7 +459,7 @@
     uword address = heap->Allocate(Instance::InstanceSize(), Heap::kOld);
     null_ = reinterpret_cast<RawInstance*>(address + kHeapObjectTag);
     // The call below is using 'null_' to initialize itself.
-    InitializeObject(address, kNullCid, Instance::InstanceSize(), true);
+    InitializeObject(address, kNullCid, Instance::InstanceSize());
   }
 }
 
@@ -502,7 +505,7 @@
     intptr_t size = Class::InstanceSize();
     uword address = heap->Allocate(size, Heap::kOld);
     class_class_ = reinterpret_cast<RawClass*>(address + kHeapObjectTag);
-    InitializeObject(address, Class::kClassId, size, true);
+    InitializeObject(address, Class::kClassId, size);
 
     Class fake;
     // Initialization from Class::New<Class>.
@@ -701,7 +704,7 @@
   // Allocate and initialize the empty_array instance.
   {
     uword address = heap->Allocate(Array::InstanceSize(0), Heap::kOld);
-    InitializeObject(address, kImmutableArrayCid, Array::InstanceSize(0), true);
+    InitializeObject(address, kImmutableArrayCid, Array::InstanceSize(0));
     Array::initializeHandle(
         empty_array_, reinterpret_cast<RawArray*>(address + kHeapObjectTag));
     empty_array_->StoreSmi(&empty_array_->raw_ptr()->length_, Smi::New(0));
@@ -712,7 +715,7 @@
   // Allocate and initialize the zero_array instance.
   {
     uword address = heap->Allocate(Array::InstanceSize(1), Heap::kOld);
-    InitializeObject(address, kImmutableArrayCid, Array::InstanceSize(1), true);
+    InitializeObject(address, kImmutableArrayCid, Array::InstanceSize(1));
     Array::initializeHandle(
         zero_array_, reinterpret_cast<RawArray*>(address + kHeapObjectTag));
     zero_array_->StoreSmi(&zero_array_->raw_ptr()->length_, Smi::New(1));
@@ -724,8 +727,7 @@
   // Allocate and initialize the canonical empty context scope object.
   {
     uword address = heap->Allocate(ContextScope::InstanceSize(0), Heap::kOld);
-    InitializeObject(address, kContextScopeCid, ContextScope::InstanceSize(0),
-                     true);
+    InitializeObject(address, kContextScopeCid, ContextScope::InstanceSize(0));
     ContextScope::initializeHandle(
         empty_context_scope_,
         reinterpret_cast<RawContextScope*>(address + kHeapObjectTag));
@@ -739,8 +741,7 @@
   // Allocate and initialize the canonical empty object pool object.
   {
     uword address = heap->Allocate(ObjectPool::InstanceSize(0), Heap::kOld);
-    InitializeObject(address, kObjectPoolCid, ObjectPool::InstanceSize(0),
-                     true);
+    InitializeObject(address, kObjectPoolCid, ObjectPool::InstanceSize(0));
     ObjectPool::initializeHandle(
         empty_object_pool_,
         reinterpret_cast<RawObjectPool*>(address + kHeapObjectTag));
@@ -752,8 +753,8 @@
   // Allocate and initialize the empty_descriptors instance.
   {
     uword address = heap->Allocate(PcDescriptors::InstanceSize(0), Heap::kOld);
-    InitializeObject(address, kPcDescriptorsCid, PcDescriptors::InstanceSize(0),
-                     true);
+    InitializeObject(address, kPcDescriptorsCid,
+                     PcDescriptors::InstanceSize(0));
     PcDescriptors::initializeHandle(
         empty_descriptors_,
         reinterpret_cast<RawPcDescriptors*>(address + kHeapObjectTag));
@@ -767,7 +768,7 @@
     uword address =
         heap->Allocate(LocalVarDescriptors::InstanceSize(0), Heap::kOld);
     InitializeObject(address, kLocalVarDescriptorsCid,
-                     LocalVarDescriptors::InstanceSize(0), true);
+                     LocalVarDescriptors::InstanceSize(0));
     LocalVarDescriptors::initializeHandle(
         empty_var_descriptors_,
         reinterpret_cast<RawLocalVarDescriptors*>(address + kHeapObjectTag));
@@ -783,7 +784,7 @@
     uword address =
         heap->Allocate(ExceptionHandlers::InstanceSize(0), Heap::kOld);
     InitializeObject(address, kExceptionHandlersCid,
-                     ExceptionHandlers::InstanceSize(0), true);
+                     ExceptionHandlers::InstanceSize(0));
     ExceptionHandlers::initializeHandle(
         empty_exception_handlers_,
         reinterpret_cast<RawExceptionHandlers*>(address + kHeapObjectTag));
@@ -795,8 +796,8 @@
   // Allocate and initialize the canonical empty type arguments object.
   {
     uword address = heap->Allocate(TypeArguments::InstanceSize(0), Heap::kOld);
-    InitializeObject(address, kTypeArgumentsCid, TypeArguments::InstanceSize(0),
-                     true);
+    InitializeObject(address, kTypeArgumentsCid,
+                     TypeArguments::InstanceSize(0));
     TypeArguments::initializeHandle(
         empty_type_arguments_,
         reinterpret_cast<RawTypeArguments*>(address + kHeapObjectTag));
@@ -879,6 +880,39 @@
   // needs to be created earlier as VM isolate snapshot reader references it
   // before Object::FinalizeVMIsolate.
 
+  static const KBCInstr getter_instr[2] = {
+      KernelBytecode::Encode(KernelBytecode::kVMInternal_ImplicitGetter),
+      KernelBytecode::Encode(KernelBytecode::kReturnTOS),
+  };
+  *implicit_getter_bytecode_ =
+      Bytecode::New(reinterpret_cast<uword>(getter_instr), sizeof(getter_instr),
+                    -1, Object::empty_object_pool());
+  implicit_getter_bytecode_->set_pc_descriptors(Object::empty_descriptors());
+  implicit_getter_bytecode_->set_exception_handlers(
+      Object::empty_exception_handlers());
+
+  static const KBCInstr setter_instr[2] = {
+      KernelBytecode::Encode(KernelBytecode::kVMInternal_ImplicitSetter),
+      KernelBytecode::Encode(KernelBytecode::kReturnTOS),
+  };
+  *implicit_setter_bytecode_ =
+      Bytecode::New(reinterpret_cast<uword>(setter_instr), sizeof(setter_instr),
+                    -1, Object::empty_object_pool());
+  implicit_setter_bytecode_->set_pc_descriptors(Object::empty_descriptors());
+  implicit_setter_bytecode_->set_exception_handlers(
+      Object::empty_exception_handlers());
+
+  static const KBCInstr method_extractor_instr[2] = {
+      KernelBytecode::Encode(KernelBytecode::kVMInternal_MethodExtractor),
+      KernelBytecode::Encode(KernelBytecode::kReturnTOS),
+  };
+  *method_extractor_bytecode_ = Bytecode::New(
+      reinterpret_cast<uword>(method_extractor_instr),
+      sizeof(method_extractor_instr), -1, Object::empty_object_pool());
+  method_extractor_bytecode_->set_pc_descriptors(Object::empty_descriptors());
+  method_extractor_bytecode_->set_exception_handlers(
+      Object::empty_exception_handlers());
+
   // Some thread fields need to be reinitialized as null constants have not been
   // initialized until now.
   Thread* thr = Thread::Current();
@@ -936,6 +970,12 @@
   ASSERT(extractor_parameter_types_->IsArray());
   ASSERT(!extractor_parameter_names_->IsSmi());
   ASSERT(extractor_parameter_names_->IsArray());
+  ASSERT(!implicit_getter_bytecode_->IsSmi());
+  ASSERT(implicit_getter_bytecode_->IsBytecode());
+  ASSERT(!implicit_setter_bytecode_->IsSmi());
+  ASSERT(implicit_setter_bytecode_->IsBytecode());
+  ASSERT(!method_extractor_bytecode_->IsSmi());
+  ASSERT(method_extractor_bytecode_->IsBytecode());
 }
 
 void Object::FinishInit(Isolate* isolate) {
@@ -1009,7 +1049,6 @@
     // No forwarding corpses in the VM isolate.
     ASSERT(!obj->IsForwardingCorpse());
     if (!obj->IsFreeListElement()) {
-      ASSERT(obj->IsVMHeapObject());
       obj->SetMarkBitUnsynchronized();
       Object::FinalizeReadOnlyObject(obj);
 #if defined(HASH_IN_OBJECT_HEADER)
@@ -1200,8 +1239,6 @@
           reinterpret_cast<RawTypedData*>(RawObject::FromAddr(addr));
       uword new_tags = RawObject::ClassIdTag::update(kTypedDataInt8ArrayCid, 0);
       new_tags = RawObject::SizeTag::update(leftover_size, new_tags);
-      new_tags = RawObject::VMHeapObjectTag::update(obj.raw()->IsVMHeapObject(),
-                                                    new_tags);
       const bool is_old = obj.raw()->IsOldObject();
       new_tags = RawObject::OldBit::update(is_old, new_tags);
       new_tags = RawObject::OldAndNotMarkedBit::update(is_old, new_tags);
@@ -1226,14 +1263,13 @@
       intptr_t leftover_len = (leftover_size - TypedData::InstanceSize(0));
       ASSERT(TypedData::InstanceSize(leftover_len) == leftover_size);
       raw->StoreSmi(&(raw->ptr()->length_), Smi::New(leftover_len));
+      raw->RecomputeDataField();
     } else {
       // Update the leftover space as a basic object.
       ASSERT(leftover_size == Object::InstanceSize());
       RawObject* raw = reinterpret_cast<RawObject*>(RawObject::FromAddr(addr));
       uword new_tags = RawObject::ClassIdTag::update(kInstanceCid, 0);
       new_tags = RawObject::SizeTag::update(leftover_size, new_tags);
-      new_tags = RawObject::VMHeapObjectTag::update(obj.raw()->IsVMHeapObject(),
-                                                    new_tags);
       const bool is_old = obj.raw()->IsOldObject();
       new_tags = RawObject::OldBit::update(is_old, new_tags);
       new_tags = RawObject::OldAndNotMarkedBit::update(is_old, new_tags);
@@ -1645,9 +1681,11 @@
   pending_classes.Add(cls);
 
     CLASS_LIST_TYPED_DATA(REGISTER_TYPED_DATA_VIEW_CLASS);
+
     cls = Class::NewTypedDataViewClass(kByteDataViewCid);
     RegisterPrivateClass(cls, Symbols::_ByteDataView(), lib);
     pending_classes.Add(cls);
+
 #undef REGISTER_TYPED_DATA_VIEW_CLASS
 #define REGISTER_EXT_TYPED_DATA_CLASS(clazz)                                   \
   cls = Class::NewExternalTypedDataClass(kExternalTypedData##clazz##Cid);      \
@@ -2016,12 +2054,17 @@
 }
 
 #if defined(DEBUG)
-bool Object::InVMHeap() const {
-  if (FLAG_verify_handles && raw()->IsVMHeapObject()) {
+bool Object::InVMIsolateHeap() const {
+  if (FLAG_verify_handles && raw()->InVMIsolateHeap()) {
     Heap* vm_isolate_heap = Dart::vm_isolate()->heap();
-    ASSERT(vm_isolate_heap->Contains(RawObject::ToAddr(raw())));
+    uword addr = RawObject::ToAddr(raw());
+    if (!vm_isolate_heap->Contains(addr)) {
+      ASSERT(FLAG_write_protect_code);
+      addr = RawObject::ToAddr(HeapPage::ToWritable(raw()));
+      ASSERT(vm_isolate_heap->Contains(addr));
+    }
   }
-  return raw()->IsVMHeapObject();
+  return raw()->InVMIsolateHeap();
 }
 #endif  // DEBUG
 
@@ -2033,10 +2076,7 @@
   return String::null();
 }
 
-void Object::InitializeObject(uword address,
-                              intptr_t class_id,
-                              intptr_t size,
-                              bool is_vm_object) {
+void Object::InitializeObject(uword address, intptr_t class_id, intptr_t size) {
   uword initial_value = (class_id == kInstructionsCid)
                             ? Assembler::GetBreakInstructionFiller()
                             : reinterpret_cast<uword>(null_);
@@ -2050,7 +2090,6 @@
   ASSERT(class_id != kIllegalCid);
   tags = RawObject::ClassIdTag::update(class_id, tags);
   tags = RawObject::SizeTag::update(size, tags);
-  tags = RawObject::VMHeapObjectTag::update(is_vm_object, tags);
   const bool is_old =
       (address & kNewObjectAlignmentOffset) == kOldObjectAlignmentOffset;
   tags = RawObject::OldBit::update(is_old, tags);
@@ -2061,7 +2100,6 @@
 #if defined(HASH_IN_OBJECT_HEADER)
   reinterpret_cast<RawObject*>(address)->hash_ = 0;
 #endif
-  ASSERT(is_vm_object == RawObject::IsVMHeapObject(tags));
 }
 
 void Object::CheckHandle() const {
@@ -2080,8 +2118,12 @@
       Isolate* isolate = Isolate::Current();
       Heap* isolate_heap = isolate->heap();
       Heap* vm_isolate_heap = Dart::vm_isolate()->heap();
-      ASSERT(isolate_heap->Contains(RawObject::ToAddr(raw_)) ||
-             vm_isolate_heap->Contains(RawObject::ToAddr(raw_)));
+      uword addr = RawObject::ToAddr(raw_);
+      if (!isolate_heap->Contains(addr) && !vm_isolate_heap->Contains(addr)) {
+        ASSERT(FLAG_write_protect_code);
+        addr = RawObject::ToAddr(HeapPage::ToWritable(raw_));
+        ASSERT(isolate_heap->Contains(addr) || vm_isolate_heap->Contains(addr));
+      }
     }
   }
 #endif
@@ -2090,45 +2132,40 @@
 RawObject* Object::Allocate(intptr_t cls_id, intptr_t size, Heap::Space space) {
   ASSERT(Utils::IsAligned(size, kObjectAlignment));
   Thread* thread = Thread::Current();
-  // New space allocation allowed only in mutator thread (Dart thread);
-  ASSERT(thread->IsMutatorThread() || (space != Heap::kNew));
   ASSERT(thread->execution_state() == Thread::kThreadInVM);
   ASSERT(thread->no_callback_scope_depth() == 0);
-  Isolate* isolate = thread->isolate();
-  Heap* heap = isolate->heap();
+  Heap* heap = thread->heap();
 
   uword address;
 
   // In a bump allocation scope, all allocations go into old space.
   if (thread->bump_allocate() && (space != Heap::kCode)) {
     DEBUG_ASSERT(heap->old_space()->CurrentThreadOwnsDataLock());
-    address = heap->old_space()->TryAllocateDataBumpLocked(
-        size, PageSpace::kForceGrowth);
+    address = heap->old_space()->TryAllocateDataBumpLocked(size);
   } else {
     address = heap->Allocate(size, space);
   }
-  if (address == 0) {
+  if (UNLIKELY(address == 0)) {
     // Use the preallocated out of memory exception to avoid calling
     // into dart code or allocating any code.
     const Instance& exception =
-        Instance::Handle(isolate->object_store()->out_of_memory());
+        Instance::Handle(thread->isolate()->object_store()->out_of_memory());
     Exceptions::Throw(thread, exception);
     UNREACHABLE();
   }
 #ifndef PRODUCT
-  ClassTable* class_table = isolate->class_table();
+  ClassTable* class_table = thread->isolate()->class_table();
   if (space == Heap::kNew) {
     class_table->UpdateAllocatedNew(cls_id, size);
   } else {
     class_table->UpdateAllocatedOld(cls_id, size);
   }
-  const Class& cls = Class::Handle(class_table->At(cls_id));
-  if (FLAG_profiler && cls.TraceAllocation(isolate)) {
+  if (class_table->TraceAllocationFor(cls_id)) {
     Profiler::SampleAllocation(thread, cls_id);
   }
 #endif  // !PRODUCT
   NoSafepointScope no_safepoint;
-  InitializeObject(address, cls_id, size, (isolate == Dart::vm_isolate()));
+  InitializeObject(address, cls_id, size);
   RawObject* raw_obj = reinterpret_cast<RawObject*>(address + kHeapObjectTag);
   ASSERT(cls_id == RawObject::ClassIdTag::decode(raw_obj->ptr()->tags_));
   if (raw_obj->IsOldObject() && thread->is_marking()) {
@@ -2565,6 +2602,10 @@
 }
 
 void Class::set_type_parameters(const TypeArguments& value) const {
+  ASSERT((num_own_type_arguments() == kUnknownNumTypeArguments) ||
+         is_prefinalized());
+  ASSERT((num_type_arguments() == kUnknownNumTypeArguments) ||
+         is_prefinalized());
   StorePointer(&raw_ptr()->type_parameters_, value.raw());
 }
 
@@ -2915,7 +2956,7 @@
                     RawFunction::kMethodExtractor,
                     false,  // Not static.
                     false,  // Not const.
-                    false,  // Not abstract.
+                    is_abstract(),
                     false,  // Not external.
                     false,  // Not native.
                     owner, TokenPosition::kMethodExtractor));
@@ -2927,7 +2968,8 @@
   extractor.set_parameter_types(Object::extractor_parameter_types());
   extractor.set_parameter_names(Object::extractor_parameter_names());
   extractor.set_result_type(Object::dynamic_type());
-  extractor.set_kernel_offset(kernel_offset());
+
+  extractor.InheritBinaryDeclarationFrom(*this);
 
   extractor.set_extracted_method_closure(closure_function);
   extractor.set_is_debuggable(false);
@@ -3008,7 +3050,7 @@
   return false;
 }
 
-bool Function::IsDynamicInvocationForwaderName(const String& name) {
+bool Function::IsDynamicInvocationForwarderName(const String& name) {
   return name.StartsWith(Symbols::DynamicPrefix());
 }
 
@@ -3046,7 +3088,8 @@
   forwarder.set_optimized_instruction_count(0);
   forwarder.set_inlining_depth(0);
   forwarder.set_optimized_call_site_count(0);
-  forwarder.set_kernel_offset(kernel_offset());
+
+  forwarder.InheritBinaryDeclarationFrom(*this);
 
   return forwarder.raw();
 }
@@ -3058,7 +3101,7 @@
 RawFunction* Function::GetDynamicInvocationForwarder(
     const String& mangled_name,
     bool allow_add /* = true */) const {
-  ASSERT(IsDynamicInvocationForwaderName(mangled_name));
+  ASSERT(IsDynamicInvocationForwarderName(mangled_name));
   const Class& owner = Class::Handle(Owner());
   Function& result = Function::Handle(owner.GetInvocationDispatcher(
       mangled_name, Array::null_array(),
@@ -3081,6 +3124,17 @@
 
   return result.raw();
 }
+
+RawFunction* Function::GetTargetOfDynamicInvocationForwarder() const {
+  ASSERT(IsDynamicInvocationForwarder());
+  auto& func_name = String::Handle(name());
+  func_name = DemangleDynamicInvocationForwarderName(func_name);
+  const auto& owner = Class::Handle(Owner());
+  RawFunction* target = owner.LookupDynamicFunction(func_name);
+  ASSERT(target != Function::null());
+  return target;
+}
+
 #endif
 
 bool AbstractType::InstantiateAndTestSubtype(
@@ -3294,7 +3348,7 @@
         Function::Handle(zone, LookupStaticFunction(internal_getter_name));
 
     if (field.IsNull() && !getter.IsNull() && check_is_entrypoint) {
-      CHECK_ERROR(getter.VerifyEntryPoint());
+      CHECK_ERROR(getter.VerifyCallEntryPoint());
     }
 
     if (getter.IsNull() || (respect_reflectable && !getter.is_reflectable())) {
@@ -3302,7 +3356,7 @@
         getter = LookupStaticFunction(getter_name);
         if (!getter.IsNull()) {
           if (check_is_entrypoint) {
-            CHECK_ERROR(EntryPointClosurizationError(getter_name));
+            CHECK_ERROR(getter.VerifyClosurizedEntryPoint());
           }
           if (getter.SafeToClosurize()) {
             // Looking for a getter but found a regular method: closurize it.
@@ -3360,7 +3414,7 @@
     const Function& setter =
         Function::Handle(zone, LookupStaticFunction(internal_setter_name));
     if (!setter.IsNull() && check_is_entrypoint) {
-      CHECK_ERROR(setter.VerifyEntryPoint());
+      CHECK_ERROR(setter.VerifyCallEntryPoint());
     }
     const int kNumArgs = 1;
     const Array& args = Array::Handle(zone, Array::New(kNumArgs));
@@ -3422,7 +3476,7 @@
       Function::Handle(zone, LookupStaticFunction(function_name));
 
   if (!function.IsNull() && check_is_entrypoint) {
-    CHECK_ERROR(function.VerifyEntryPoint());
+    CHECK_ERROR(function.VerifyCallEntryPoint());
   }
 
   if (function.IsNull()) {
@@ -3432,7 +3486,7 @@
                            check_is_entrypoint));
     if (getter_result.raw() != Object::sentinel().raw()) {
       if (check_is_entrypoint) {
-        CHECK_ERROR(EntryPointClosurizationError(function_name));
+        CHECK_ERROR(EntryPointFieldInvocationError(function_name));
       }
       // Make room for the closure (receiver) in the argument list.
       const intptr_t num_args = args.Length();
@@ -3710,9 +3764,11 @@
 
 RawClass* Class::NewTypedDataViewClass(intptr_t class_id) {
   ASSERT(RawObject::IsTypedDataViewClassId(class_id));
-  Class& result = Class::Handle(New<Instance>(class_id));
-  result.set_instance_size(0);
-  result.set_next_field_offset(-kWordSize);
+  const intptr_t instance_size = TypedDataView::InstanceSize();
+  Class& result = Class::Handle(New<TypedDataView>(class_id));
+  result.set_instance_size(instance_size);
+  result.set_next_field_offset(TypedDataView::NextFieldOffset());
+  result.set_is_prefinalized();
   return result.raw();
 }
 
@@ -4819,7 +4875,7 @@
 RawInstance* Class::LookupCanonicalInstance(Zone* zone,
                                             const Instance& value) const {
   ASSERT(this->raw() == value.clazz());
-  ASSERT(is_finalized());
+  ASSERT(is_finalized() || is_prefinalized());
   Instance& canonical_value = Instance::Handle(zone);
   if (this->constants() != Object::empty_array().raw()) {
     CanonicalInstancesSet constants(zone, this->constants());
@@ -5636,17 +5692,15 @@
     }
   }
   switch (kind()) {
-    case RawFunction::kImplicitGetter:
-    case RawFunction::kImplicitSetter:
-    case RawFunction::kMethodExtractor:
     case RawFunction::kNoSuchMethodDispatcher:
     case RawFunction::kInvokeFieldDispatcher:
     case RawFunction::kDynamicInvocationForwarder:
     case RawFunction::kImplicitClosureFunction:
     case RawFunction::kIrregexpFunction:
+    case RawFunction::kFfiTrampoline:
       return false;
     case RawFunction::kImplicitStaticFinalGetter:
-      return kernel::IsFieldInitializer(*this, zone) || is_const();
+      return is_const();
     default:
       return true;
   }
@@ -5655,8 +5709,11 @@
 void Function::AttachBytecode(const Bytecode& value) const {
   DEBUG_ASSERT(IsMutatorOrAtSafepoint());
   ASSERT(FLAG_enable_interpreter || FLAG_use_bytecode_compiler);
+  ASSERT(!value.IsNull());
   // Finish setting up code before activating it.
-  value.set_function(*this);
+  if (!value.InVMIsolateHeap()) {
+    value.set_function(*this);
+  }
   StorePointer(&raw_ptr()->bytecode_, value.raw());
 
   // We should not have loaded the bytecode if the function had code.
@@ -5868,14 +5925,17 @@
 RawField* Function::accessor_field() const {
   ASSERT(kind() == RawFunction::kImplicitGetter ||
          kind() == RawFunction::kImplicitSetter ||
-         kind() == RawFunction::kImplicitStaticFinalGetter);
+         kind() == RawFunction::kImplicitStaticFinalGetter ||
+         kind() == RawFunction::kStaticFieldInitializer ||
+         kind() == RawFunction::kDynamicInvocationForwarder);
   return Field::RawCast(raw_ptr()->data_);
 }
 
 void Function::set_accessor_field(const Field& value) const {
   ASSERT(kind() == RawFunction::kImplicitGetter ||
          kind() == RawFunction::kImplicitSetter ||
-         kind() == RawFunction::kImplicitStaticFinalGetter);
+         kind() == RawFunction::kImplicitStaticFinalGetter ||
+         kind() == RawFunction::kStaticFieldInitializer);
   // Top level classes may be finalized multiple times.
   ASSERT(raw_ptr()->data_ == Object::null() || raw_ptr()->data_ == value.raw());
   set_data(value);
@@ -5986,6 +6046,20 @@
   }
 }
 
+void Function::SetFfiCSignature(const Function& sig) const {
+  ASSERT(IsFfiTrampoline());
+  const Object& obj = Object::Handle(raw_ptr()->data_);
+  ASSERT(!obj.IsNull());
+  FfiTrampolineData::Cast(obj).set_c_signature(sig);
+}
+
+RawFunction* Function::FfiCSignature() const {
+  ASSERT(IsFfiTrampoline());
+  const Object& obj = Object::Handle(raw_ptr()->data_);
+  ASSERT(!obj.IsNull());
+  return FfiTrampolineData::Cast(obj).c_signature();
+}
+
 RawType* Function::SignatureType() const {
   Type& type = Type::Handle(ExistingSignatureType());
   if (type.IsNull()) {
@@ -6089,6 +6163,9 @@
     case RawFunction::kImplicitStaticFinalGetter:
       return "ImplicitStaticFinalGetter";
       break;
+    case RawFunction::kStaticFieldInitializer:
+      return "StaticFieldInitializer";
+      break;
     case RawFunction::kMethodExtractor:
       return "MethodExtractor";
       break;
@@ -6163,6 +6240,7 @@
 //   implicit getter:         Field
 //   implicit setter:         Field
 //   impl. static final gttr: Field
+//   field initializer:       Field
 //   noSuchMethod dispatcher: Array arguments descriptor
 //   invoke-field dispatcher: Array arguments descriptor
 //   redirecting constructor: RedirectionData
@@ -6440,6 +6518,7 @@
   if (FLAG_precompiled_mode) {
     return true;
   }
+  if (ForceOptimize()) return true;
   if (is_native()) {
     // Native methods don't need to be optimized.
     return false;
@@ -6899,10 +6978,11 @@
           }
           cls = type_param.parameterized_class();
           param_name = type_param.name();
+          const bool is_generic_covariant = type_param.IsGenericCovariantImpl();
           ASSERT(type_param.IsFinalized());
           type_param ^=
               TypeParameter::New(cls, sig, type_param.index(), param_name, type,
-                                 type_param.token_pos());
+                                 is_generic_covariant, type_param.token_pos());
           type_param.SetIsFinalized();
           if (instantiated_type_params.IsNull()) {
             instantiated_type_params = TypeArguments::New(type_params.Length());
@@ -7162,7 +7242,8 @@
   NOT_IN_PRECOMPILED(result.set_optimized_instruction_count(0));
   NOT_IN_PRECOMPILED(result.set_optimized_call_site_count(0));
   NOT_IN_PRECOMPILED(result.set_inlining_depth(0));
-  NOT_IN_PRECOMPILED(result.set_kernel_offset(0));
+  NOT_IN_PRECOMPILED(result.set_is_declared_in_bytecode(false));
+  NOT_IN_PRECOMPILED(result.set_binary_declaration_offset(0));
   result.set_is_optimizable(is_native ? false : true);
   result.set_is_background_optimizable(is_native ? false : true);
   result.set_is_inlinable(true);
@@ -7340,50 +7421,21 @@
     param_name = ParameterNameAt(has_receiver - kClosure + i);
     closure_function.SetParameterNameAt(i, param_name);
   }
-  closure_function.set_kernel_offset(kernel_offset());
+  closure_function.InheritBinaryDeclarationFrom(*this);
 
   // Change covariant parameter types to Object in the implicit closure.
   if (!is_static()) {
-    const Script& function_script = Script::Handle(zone, script());
-    kernel::TranslationHelper translation_helper(thread);
-    translation_helper.InitFromScript(function_script);
+    BitVector is_covariant(zone, NumParameters());
+    BitVector is_generic_covariant_impl(zone, NumParameters());
+    kernel::ReadParameterCovariance(*this, &is_covariant,
+                                    &is_generic_covariant_impl);
 
-    kernel::KernelReaderHelper kernel_reader_helper(
-        zone, &translation_helper, function_script,
-        ExternalTypedData::Handle(zone, KernelData()),
-        KernelDataProgramOffset());
-
-    kernel_reader_helper.SetOffset(kernel_offset());
-    kernel_reader_helper.ReadUntilFunctionNode();
-
-    kernel::FunctionNodeHelper fn_helper(&kernel_reader_helper);
-
-    // Check the positional parameters, including the optional positional ones.
-    fn_helper.ReadUntilExcluding(
-        kernel::FunctionNodeHelper::kPositionalParameters);
-    intptr_t num_pos_params = kernel_reader_helper.ReadListLength();
-    ASSERT(num_pos_params ==
-           num_fixed_params - 1 + (has_opt_pos_params ? num_opt_params : 0));
     const Type& object_type = Type::Handle(zone, Type::ObjectType());
-    for (intptr_t i = 0; i < num_pos_params; ++i) {
-      kernel::VariableDeclarationHelper var_helper(&kernel_reader_helper);
-      var_helper.ReadUntilExcluding(kernel::VariableDeclarationHelper::kEnd);
-      if (var_helper.IsCovariant() || var_helper.IsGenericCovariantImpl()) {
-        closure_function.SetParameterTypeAt(i + 1, object_type);
-      }
-    }
-    fn_helper.SetJustRead(kernel::FunctionNodeHelper::kPositionalParameters);
-
-    // Check the optional named parameters.
-    fn_helper.ReadUntilExcluding(kernel::FunctionNodeHelper::kNamedParameters);
-    intptr_t num_named_params = kernel_reader_helper.ReadListLength();
-    ASSERT(num_named_params == (has_opt_pos_params ? 0 : num_opt_params));
-    for (intptr_t i = 0; i < num_named_params; ++i) {
-      kernel::VariableDeclarationHelper var_helper(&kernel_reader_helper);
-      var_helper.ReadUntilExcluding(kernel::VariableDeclarationHelper::kEnd);
-      if (var_helper.IsCovariant() || var_helper.IsGenericCovariantImpl()) {
-        closure_function.SetParameterTypeAt(num_pos_params + 1 + i,
-                                            object_type);
+    for (intptr_t i = kClosure; i < num_params; ++i) {
+      const intptr_t original_param_index = has_receiver - kClosure + i;
+      if (is_covariant.Contains(original_param_index) ||
+          is_generic_covariant_impl.Contains(original_param_index)) {
+        closure_function.SetParameterTypeAt(i, object_type);
       }
     }
   }
@@ -7610,6 +7662,28 @@
   return PatchClass::Cast(obj).origin_class();
 }
 
+void Function::InheritBinaryDeclarationFrom(const Function& src) const {
+#if defined(DART_PRECOMPILED_RUNTIME)
+  UNREACHABLE();
+#else
+  StoreNonPointer(&raw_ptr()->binary_declaration_,
+                  src.raw_ptr()->binary_declaration_);
+#endif
+}
+
+void Function::InheritBinaryDeclarationFrom(const Field& src) const {
+#if defined(DART_PRECOMPILED_RUNTIME)
+  UNREACHABLE();
+#else
+  if (src.is_declared_in_bytecode()) {
+    set_is_declared_in_bytecode(true);
+    set_bytecode_offset(src.bytecode_offset());
+  } else {
+    set_kernel_offset(src.kernel_offset());
+  }
+#endif
+}
+
 void Function::SetKernelDataAndScript(const Script& script,
                                       const ExternalTypedData& data,
                                       intptr_t offset) {
@@ -7795,8 +7869,9 @@
       uint16_t end_char = src.CharAt(end_token_pos().value());
       if ((end_char == ',') ||  // Case 1.
           (end_char == ')') ||  // Case 2.
-          (end_char == ';' && String::Handle(zone, name())
-                                  .Equals("<anonymous closure>"))) {  // Case 3.
+          (end_char == ';' &&
+           String::Handle(zone, name())
+               .Equals("<anonymous closure>"))) {  // Case 3.
         to_length = 0;
       }
     }
@@ -7915,8 +7990,10 @@
 }
 
 bool Function::CheckSourceFingerprint(const char* prefix, int32_t fp) const {
-  if (!Isolate::Current()->obfuscate() && (kernel_offset() <= 0) &&
-      (SourceFingerprint() != fp)) {
+  // TODO(alexmarkov): '(kernel_offset() <= 0)' looks like an impossible
+  // condition, fix this and re-enable fingerprints checking.
+  if (!Isolate::Current()->obfuscate() && !is_declared_in_bytecode() &&
+      (kernel_offset() <= 0) && (SourceFingerprint() != fp)) {
     const bool recalculatingFingerprints = false;
     if (recalculatingFingerprints) {
       // This output can be copied into a file, then used with sed
@@ -7993,6 +8070,9 @@
     case RawFunction::kImplicitStaticFinalGetter:
       kind_str = " static-final-getter";
       break;
+    case RawFunction::kStaticFieldInitializer:
+      kind_str = " static-field-initializer";
+      break;
     case RawFunction::kMethodExtractor:
       kind_str = " method-extractor";
       break;
@@ -8000,13 +8080,16 @@
       kind_str = " no-such-method-dispatcher";
       break;
     case RawFunction::kDynamicInvocationForwarder:
-      kind_str = " dynamic-invocation-forwader";
+      kind_str = " dynamic-invocation-forwarder";
       break;
     case RawFunction::kInvokeFieldDispatcher:
-      kind_str = "invoke-field-dispatcher";
+      kind_str = " invoke-field-dispatcher";
       break;
     case RawFunction::kIrregexpFunction:
-      kind_str = "irregexp-function";
+      kind_str = " irregexp-function";
+      break;
+    case RawFunction::kFfiTrampoline:
+      kind_str = " ffi-trampoline-function";
       break;
     default:
       UNREACHABLE();
@@ -8123,6 +8206,10 @@
   StorePointer(&raw_ptr()->signature_type_, value.raw());
 }
 
+void FfiTrampolineData::set_c_signature(const Function& value) const {
+  StorePointer(&raw_ptr()->c_signature_, value.raw());
+}
+
 RawFfiTrampolineData* FfiTrampolineData::New() {
   ASSERT(Object::ffi_trampoline_data_class() != Class::null());
   RawObject* raw =
@@ -8196,6 +8283,11 @@
                       setter_name.Length() - kSetterPrefixLength);
 }
 
+RawString* Field::NameFromInit(const String& init_name) {
+  return Symbols::New(Thread::Current(), init_name, kInitPrefixLength,
+                      init_name.Length() - kInitPrefixLength);
+}
+
 bool Field::IsGetterName(const String& function_name) {
   return function_name.StartsWith(Symbols::GetterPrefix());
 }
@@ -8204,6 +8296,10 @@
   return function_name.StartsWith(Symbols::SetterPrefix());
 }
 
+bool Field::IsInitName(const String& function_name) {
+  return function_name.StartsWith(Symbols::InitPrefix());
+}
+
 void Field::set_name(const String& value) const {
   ASSERT(value.IsSymbol());
   ASSERT(IsOriginal());
@@ -8270,6 +8366,15 @@
   return PatchClass::Cast(obj).library_kernel_data();
 }
 
+void Field::InheritBinaryDeclarationFrom(const Field& src) const {
+#if defined(DART_PRECOMPILED_RUNTIME)
+  UNREACHABLE();
+#else
+  StoreNonPointer(&raw_ptr()->binary_declaration_,
+                  src.raw_ptr()->binary_declaration_);
+#endif
+}
+
 intptr_t Field::KernelDataProgramOffset() const {
   const Object& obj = Object::Handle(raw_ptr()->owner_);
   // During background JIT compilation field objects are copied
@@ -8284,27 +8389,6 @@
   return PatchClass::Cast(obj).library_kernel_offset();
 }
 
-#if !defined(DART_PRECOMPILED_RUNTIME)
-void Field::GetCovarianceAttributes(bool* is_covariant,
-                                    bool* is_generic_covariant) const {
-  Thread* thread = Thread::Current();
-  Zone* zone = Thread::Current()->zone();
-  auto& script = Script::Handle(zone, Script());
-
-  kernel::TranslationHelper translation_helper(thread);
-  translation_helper.InitFromScript(script);
-
-  kernel::KernelReaderHelper kernel_reader_helper(
-      zone, &translation_helper, script,
-      ExternalTypedData::Handle(zone, KernelData()), KernelDataProgramOffset());
-  kernel_reader_helper.SetOffset(kernel_offset());
-  kernel::FieldHelper field_helper(&kernel_reader_helper);
-  field_helper.ReadUntilIncluding(kernel::FieldHelper::kFlags);
-  *is_covariant = field_helper.IsCovariant();
-  *is_generic_covariant = field_helper.IsGenericCovariantImpl();
-}
-#endif
-
 // Called at finalization time
 void Field::SetFieldType(const AbstractType& value) const {
   ASSERT(Thread::Current()->IsMutatorThread());
@@ -8345,9 +8429,10 @@
   result.set_token_pos(token_pos);
   result.set_end_token_pos(end_token_pos);
   result.set_has_initializer(false);
-  result.set_is_unboxing_candidate(true);
+  result.set_is_unboxing_candidate(!is_final);
   result.set_initializer_changed_after_initialization(false);
-  result.set_kernel_offset(0);
+  NOT_IN_PRECOMPILED(result.set_is_declared_in_bytecode(false));
+  NOT_IN_PRECOMPILED(result.set_binary_declaration_offset(0));
   result.set_has_pragma(false);
   result.set_static_type_exactness_state(
       StaticTypeExactnessState::NotTracking());
@@ -8414,7 +8499,7 @@
   Field& clone = Field::Handle();
   clone ^= Object::Clone(*this, Heap::kOld);
   clone.SetOriginal(original);
-  clone.set_kernel_offset(original.kernel_offset());
+  clone.InheritBinaryDeclarationFrom(original);
   return clone.raw();
 }
 
@@ -8591,22 +8676,37 @@
   return value.raw() == Object::sentinel().raw();
 }
 
-void Field::SetInitializer(const Function& initializer) const {
+RawFunction* Field::EnsureInitializerFunction() const {
+  ASSERT(is_static() && has_initializer());
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  Function& initializer = Function::Handle(zone, InitializerFunction());
+  if (initializer.IsNull()) {
+#if defined(DART_PRECOMPILED_RUNTIME)
+    UNREACHABLE();
+#else
+    initializer = kernel::CreateFieldInitializerFunction(thread, zone, *this);
+    SetInitializerFunction(initializer);
+#endif
+  }
+  return initializer.raw();
+}
+
+void Field::SetInitializerFunction(const Function& initializer) const {
   ASSERT(IsOriginal());
-  StorePointer(&raw_ptr()->initializer_, initializer.raw());
+  StorePointer(&raw_ptr()->initializer_function_, initializer.raw());
 }
 
-bool Field::HasInitializer() const {
-  return raw_ptr()->initializer_ != Function::null();
+bool Field::HasInitializerFunction() const {
+  return raw_ptr()->initializer_function_ != Function::null();
 }
 
-RawError* Field::EvaluateInitializer() const {
+RawError* Field::Initialize() const {
   ASSERT(IsOriginal());
   ASSERT(is_static());
   if (StaticValue() == Object::sentinel().raw()) {
     SetStaticValue(Object::transition_sentinel());
-    const Object& value =
-        Object::Handle(Compiler::EvaluateStaticInitializer(*this));
+    const Object& value = Object::Handle(EvaluateInitializer());
     if (!value.IsNull() && value.IsError()) {
       SetStaticValue(Object::null_instance());
       return Error::Cast(value).raw();
@@ -8625,40 +8725,38 @@
   return Error::null();
 }
 
+RawObject* Field::EvaluateInitializer() const {
+  Thread* const thread = Thread::Current();
+  ASSERT(thread->IsMutatorThread());
+  NoOOBMessageScope no_msg_scope(thread);
+  NoReloadScope no_reload_scope(thread->isolate(), thread);
+  const Function& initializer = Function::Handle(EnsureInitializerFunction());
+  return DartEntry::InvokeFunction(initializer, Object::empty_array());
+}
+
 static intptr_t GetListLength(const Object& value) {
-  if (value.IsTypedData()) {
-    const TypedData& list = TypedData::Cast(value);
-    return list.Length();
+  if (value.IsTypedData() || value.IsTypedDataView() ||
+      value.IsExternalTypedData()) {
+    return TypedDataBase::Cast(value).Length();
   } else if (value.IsArray()) {
-    const Array& list = Array::Cast(value);
-    return list.Length();
+    return Array::Cast(value).Length();
   } else if (value.IsGrowableObjectArray()) {
     // List length is variable.
     return Field::kNoFixedLength;
-  } else if (value.IsExternalTypedData()) {
-    // TODO(johnmccutchan): Enable for external typed data.
-    return Field::kNoFixedLength;
-  } else if (RawObject::IsTypedDataViewClassId(value.GetClassId())) {
-    // TODO(johnmccutchan): Enable for typed data views.
-    return Field::kNoFixedLength;
   }
   return Field::kNoFixedLength;
 }
 
 static intptr_t GetListLengthOffset(intptr_t cid) {
-  if (RawObject::IsTypedDataClassId(cid)) {
+  if (RawObject::IsTypedDataClassId(cid) ||
+      RawObject::IsTypedDataViewClassId(cid) ||
+      RawObject::IsExternalTypedDataClassId(cid)) {
     return TypedData::length_offset();
   } else if (cid == kArrayCid || cid == kImmutableArrayCid) {
     return Array::length_offset();
   } else if (cid == kGrowableObjectArrayCid) {
     // List length is variable.
     return Field::kUnknownLengthOffset;
-  } else if (RawObject::IsExternalTypedDataClassId(cid)) {
-    // TODO(johnmccutchan): Enable for external typed data.
-    return Field::kUnknownLengthOffset;
-  } else if (RawObject::IsTypedDataViewClassId(cid)) {
-    // TODO(johnmccutchan): Enable for typed data views.
-    return Field::kUnknownLengthOffset;
   }
   return Field::kUnknownLengthOffset;
 }
@@ -9088,6 +9186,22 @@
   return raw_ptr()->source_;
 }
 
+bool Script::IsPartOfDartColonLibrary() const {
+  const String& script_url = String::Handle(url());
+  return (script_url.StartsWith(Symbols::DartScheme()) ||
+          script_url.StartsWith(Symbols::DartSchemePrivate()));
+}
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+void Script::LoadSourceFromKernel(const uint8_t* kernel_buffer,
+                                  intptr_t kernel_buffer_len) const {
+  String& uri = String::Handle(resolved_url());
+  String& source = String::Handle(kernel::KernelLoader::FindSourceForScript(
+      kernel_buffer, kernel_buffer_len, uri));
+  set_source(source);
+}
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
+
 void Script::set_compile_time_constants(const Array& value) const {
   StorePointer(&raw_ptr()->compile_time_constants_, value.raw());
 }
@@ -9124,7 +9238,6 @@
 #if !defined(DART_PRECOMPILED_RUNTIME)
     Smi& value = Smi::Handle(zone);
     intptr_t line_count = line_starts_data.Length();
-    ASSERT(line_count > 0);
     const Array& debug_positions_array = Array::Handle(debug_positions());
     intptr_t token_count = debug_positions_array.Length();
     int token_index = 0;
@@ -9755,7 +9868,7 @@
   GrowableHandlePtrArray<const String> pieces(zone, 3);
   pieces.Add(cname);
   pieces.Add(Symbols::At());
-  pieces.Add(String::Handle(field.name()));
+  pieces.Add(String::Handle(zone, field.name()));
   return Symbols::FromConcatAll(thread, pieces);
 }
 
@@ -9768,7 +9881,7 @@
   GrowableHandlePtrArray<const String> pieces(zone, 3);
   pieces.Add(cname);
   pieces.Add(Symbols::At());
-  pieces.Add(String::Handle(func.QualifiedScrubbedName()));
+  pieces.Add(String::Handle(zone, func.name()));
   return Symbols::FromConcatAll(thread, pieces);
 }
 
@@ -9782,14 +9895,18 @@
   GrowableHandlePtrArray<const String> pieces(zone, 3);
   pieces.Add(cname);
   pieces.Add(Symbols::At());
-  pieces.Add(String::Handle(param.name()));
+  pieces.Add(String::Handle(zone, param.name()));
   return Symbols::FromConcatAll(thread, pieces);
 }
 
 void Library::AddMetadata(const Object& owner,
                           const String& name,
                           TokenPosition token_pos,
-                          intptr_t kernel_offset) const {
+                          intptr_t kernel_offset,
+                          intptr_t bytecode_offset) const {
+#if defined(DART_PRECOMPILED_RUNTIME)
+  UNREACHABLE();
+#else
   Thread* thread = Thread::Current();
   ASSERT(thread->IsMutatorThread());
   Zone* zone = thread->zone();
@@ -9802,10 +9919,16 @@
   field.SetFieldType(Object::dynamic_type());
   field.set_is_reflectable(false);
   field.SetStaticValue(Array::empty_array(), true);
-  field.set_kernel_offset(kernel_offset);
+  if (bytecode_offset > 0) {
+    field.set_is_declared_in_bytecode(true);
+    field.set_bytecode_offset(bytecode_offset);
+  } else {
+    field.set_kernel_offset(kernel_offset);
+  }
   GrowableObjectArray& metadata =
       GrowableObjectArray::Handle(zone, this->metadata());
   metadata.Add(field, Heap::kOld);
+#endif  // defined(DART_PRECOMPILED_RUNTIME)
 }
 
 void Library::AddClassMetadata(const Class& cls,
@@ -9818,27 +9941,29 @@
   // a class's metadata is in scope of the library, not the class.
   AddMetadata(tl_owner,
               String::Handle(zone, MakeClassMetaName(thread, zone, cls)),
-              token_pos, kernel_offset);
+              token_pos, kernel_offset, 0);
 }
 
 void Library::AddFieldMetadata(const Field& field,
                                TokenPosition token_pos,
-                               intptr_t kernel_offset) const {
+                               intptr_t kernel_offset,
+                               intptr_t bytecode_offset) const {
   Thread* thread = Thread::Current();
   Zone* zone = thread->zone();
   AddMetadata(Object::Handle(zone, field.RawOwner()),
               String::Handle(zone, MakeFieldMetaName(thread, zone, field)),
-              token_pos, kernel_offset);
+              token_pos, kernel_offset, bytecode_offset);
 }
 
 void Library::AddFunctionMetadata(const Function& func,
                                   TokenPosition token_pos,
-                                  intptr_t kernel_offset) const {
+                                  intptr_t kernel_offset,
+                                  intptr_t bytecode_offset) const {
   Thread* thread = Thread::Current();
   Zone* zone = thread->zone();
   AddMetadata(Object::Handle(zone, func.RawOwner()),
               String::Handle(zone, MakeFunctionMetaName(thread, zone, func)),
-              token_pos, kernel_offset);
+              token_pos, kernel_offset, bytecode_offset);
 }
 
 void Library::AddTypeParameterMetadata(const TypeParameter& param,
@@ -9848,13 +9973,13 @@
   AddMetadata(
       Class::Handle(zone, param.parameterized_class()),
       String::Handle(zone, MakeTypeParameterMetaName(thread, zone, param)),
-      token_pos);
+      token_pos, 0, 0);
 }
 
 void Library::AddLibraryMetadata(const Object& tl_owner,
                                  TokenPosition token_pos,
                                  intptr_t kernel_offset) const {
-  AddMetadata(tl_owner, Symbols::TopLevel(), token_pos, kernel_offset);
+  AddMetadata(tl_owner, Symbols::TopLevel(), token_pos, kernel_offset, 0);
 }
 
 RawString* Library::MakeMetadataName(const Object& obj) const {
@@ -9898,8 +10023,13 @@
   const Field& from_field =
       Field::Handle(from_library.GetMetadataField(metaname));
   if (!from_field.IsNull()) {
-    AddFunctionMetadata(to_fun, from_field.token_pos(),
-                        from_field.kernel_offset());
+    if (from_field.is_declared_in_bytecode()) {
+      AddFunctionMetadata(to_fun, from_field.token_pos(), 0,
+                          from_field.bytecode_offset());
+    } else {
+      AddFunctionMetadata(to_fun, from_field.token_pos(),
+                          from_field.kernel_offset(), 0);
+    }
   }
 }
 
@@ -9920,11 +10050,12 @@
   Object& metadata = Object::Handle();
   metadata = field.StaticValue();
   if (field.StaticValue() == Object::empty_array().raw()) {
-    if (field.kernel_offset() > 0) {
+    if (field.is_declared_in_bytecode()) {
+      metadata = kernel::BytecodeReader::ReadAnnotation(field);
+    } else {
+      ASSERT(field.kernel_offset() > 0);
       metadata = kernel::EvaluateMetadata(
           field, /* is_annotations_offset = */ obj.IsLibrary());
-    } else {
-      UNREACHABLE();
     }
     if (metadata.IsArray()) {
       ASSERT(Array::Cast(metadata).raw() != Object::empty_array().raw());
@@ -10269,6 +10400,15 @@
   // We compute the list of loaded scripts lazily. The result is
   // cached in loaded_scripts_.
   if (loaded_scripts() == Array::null()) {
+#if !defined(DART_PRECOMPILED_RUNTIME)
+    // TODO(jensj): Once minimum kernel support is >= 25 this can be cleaned up.
+    // It really should just return the content of `owned_scripts`, and there
+    // should be no need to do the O(n) call to `AddScriptIfUnique` per script.
+    static_assert(
+        kernel::kMinSupportedKernelFormatVersion < 25,
+        "Once minimum kernel support is >= 25 this can be cleaned up.");
+#endif
+
     // Iterate over the library dictionary and collect all scripts.
     const GrowableObjectArray& scripts =
         GrowableObjectArray::Handle(GrowableObjectArray::New(8));
@@ -10291,7 +10431,7 @@
     }
 
     // Add all scripts from patch classes.
-    GrowableObjectArray& patches = GrowableObjectArray::Handle(patch_classes());
+    GrowableObjectArray& patches = GrowableObjectArray::Handle(owned_scripts());
     for (intptr_t i = 0; i < patches.Length(); i++) {
       entry = patches.At(i);
       if (entry.IsClass()) {
@@ -10342,10 +10482,12 @@
   const intptr_t num_scripts = scripts.Length();
   for (int i = 0; i < num_scripts; i++) {
     script ^= scripts.At(i);
-    if (!useResolvedUri) {
-      script_url = script.url();
-    } else {
+    if (useResolvedUri) {
+      // Use for urls with 'org-dartlang-sdk:' or 'file:' schemes
       script_url = script.resolved_url();
+    } else {
+      // Use for urls with 'dart:', 'package:', or 'file:' schemes
+      script_url = script.url();
     }
     const intptr_t start_idx = script_url.Length() - url_length;
     if ((start_idx == 0) && url.Equals(script_url)) {
@@ -10612,7 +10754,35 @@
 }
 
 void Library::DropDependenciesAndCaches() const {
-  StorePointer(&raw_ptr()->imports_, Object::empty_array().raw());
+  // We need to preserve the "dart-ext:" imports because they are used by
+  // Loader::ReloadNativeExtensions().
+  intptr_t native_import_count = 0;
+  Array& imports = Array::Handle(raw_ptr()->imports_);
+  Namespace& ns = Namespace::Handle();
+  Library& lib = Library::Handle();
+  String& url = String::Handle();
+  for (int i = 0; i < imports.Length(); ++i) {
+    ns = Namespace::RawCast(imports.At(i));
+    if (ns.IsNull()) continue;
+    lib = ns.library();
+    url = lib.url();
+    if (url.StartsWith(Symbols::DartExtensionScheme())) {
+      native_import_count++;
+    }
+  }
+  Array& new_imports =
+      Array::Handle(Array::New(native_import_count, Heap::kOld));
+  for (int i = 0, j = 0; i < imports.Length(); ++i) {
+    ns = Namespace::RawCast(imports.At(i));
+    if (ns.IsNull()) continue;
+    lib = ns.library();
+    url = lib.url();
+    if (url.StartsWith(Symbols::DartExtensionScheme())) {
+      new_imports.SetAt(j++, ns);
+    }
+  }
+
+  StorePointer(&raw_ptr()->imports_, new_imports.raw());
   StorePointer(&raw_ptr()->exports_, Object::empty_array().raw());
   StoreNonPointer(&raw_ptr()->num_imports_, 0);
   StorePointer(&raw_ptr()->resolved_names_, Array::null());
@@ -10717,7 +10887,7 @@
                       GrowableObjectArray::New(4, Heap::kOld));
   result.StorePointer(&result.raw_ptr()->toplevel_class_, Class::null());
   result.StorePointer(
-      &result.raw_ptr()->patch_classes_,
+      &result.raw_ptr()->owned_scripts_,
       GrowableObjectArray::New(Object::empty_array(), Heap::kOld));
   result.StorePointer(&result.raw_ptr()->imports_, Object::empty_array().raw());
   result.StorePointer(&result.raw_ptr()->exports_, Object::empty_array().raw());
@@ -10831,7 +11001,7 @@
     if (obj.IsFunction()) {
       getter = Function::Cast(obj).raw();
       if (check_is_entrypoint) {
-        CHECK_ERROR(getter.VerifyEntryPoint());
+        CHECK_ERROR(getter.VerifyCallEntryPoint());
       }
     } else {
       obj = LookupLocalOrReExportObject(getter_name);
@@ -10841,7 +11011,7 @@
       if (obj.IsFunction() && check_is_entrypoint) {
         if (!getter_name.Equals(String::Handle(String::New("main"))) ||
             raw() != Isolate::Current()->object_store()->root_library()) {
-          CHECK_ERROR(EntryPointClosurizationError(getter_name));
+          CHECK_ERROR(Function::Cast(obj).VerifyClosurizedEntryPoint());
         }
       }
       if (obj.IsFunction() && Function::Cast(obj).SafeToClosurize()) {
@@ -10912,7 +11082,7 @@
   }
 
   if (!setter.IsNull() && check_is_entrypoint) {
-    CHECK_ERROR(setter.VerifyEntryPoint());
+    CHECK_ERROR(setter.VerifyCallEntryPoint());
   }
 
   const int kNumArgs = 1;
@@ -10950,7 +11120,7 @@
   }
 
   if (!function.IsNull() && check_is_entrypoint) {
-    CHECK_ERROR(function.VerifyEntryPoint());
+    CHECK_ERROR(function.VerifyCallEntryPoint());
   }
 
   if (function.IsNull()) {
@@ -10959,7 +11129,7 @@
         function_name, false, respect_reflectable, check_is_entrypoint));
     if (getter_result.raw() != Object::sentinel().raw()) {
       if (check_is_entrypoint) {
-        CHECK_ERROR(EntryPointClosurizationError(function_name));
+        CHECK_ERROR(EntryPointFieldInvocationError(function_name));
       }
       // Make room for the closure (receiver) in arguments.
       intptr_t numArgs = args.Length();
@@ -11083,7 +11253,7 @@
         String::New("Kernel isolate returned ill-formed kernel.")));
   }
 
-  kernel::KernelLoader loader(kernel_pgm);
+  kernel::KernelLoader loader(kernel_pgm, /*uri_to_source_table=*/nullptr);
   const Object& result = Object::Handle(
       loader.LoadExpressionEvaluationFunction(library_url, klass));
 
@@ -12699,28 +12869,25 @@
   const RawLocalVarDescriptors::VarInfoKind kind = info.kind();
   const int32_t index = info.index();
   if (kind == RawLocalVarDescriptors::kContextLevel) {
-    return Utils::SNPrint(buffer, len,
-                          "%2" Pd
-                          " %-13s level=%-3d"
-                          " begin=%-3d end=%d\n",
+    return Utils::SNPrint(buffer, len, "%2" Pd
+                                       " %-13s level=%-3d"
+                                       " begin=%-3d end=%d\n",
                           i, LocalVarDescriptors::KindToCString(kind), index,
                           static_cast<int>(info.begin_pos.value()),
                           static_cast<int>(info.end_pos.value()));
   } else if (kind == RawLocalVarDescriptors::kContextVar) {
     return Utils::SNPrint(
-        buffer, len,
-        "%2" Pd
-        " %-13s level=%-3d index=%-3d"
-        " begin=%-3d end=%-3d name=%s\n",
+        buffer, len, "%2" Pd
+                     " %-13s level=%-3d index=%-3d"
+                     " begin=%-3d end=%-3d name=%s\n",
         i, LocalVarDescriptors::KindToCString(kind), info.scope_id, index,
         static_cast<int>(info.begin_pos.Pos()),
         static_cast<int>(info.end_pos.Pos()), var_name.ToCString());
   } else {
     return Utils::SNPrint(
-        buffer, len,
-        "%2" Pd
-        " %-13s scope=%-3d index=%-3d"
-        " begin=%-3d end=%-3d name=%s\n",
+        buffer, len, "%2" Pd
+                     " %-13s scope=%-3d index=%-3d"
+                     " begin=%-3d end=%-3d name=%s\n",
         i, LocalVarDescriptors::KindToCString(kind), info.scope_id, index,
         static_cast<int>(info.begin_pos.Pos()),
         static_cast<int>(info.end_pos.Pos()), var_name.ToCString());
@@ -13014,14 +13181,24 @@
 }
 
 #if !defined(DART_PRECOMPILED_RUNTIME)
-void ICData::SetStaticReceiverType(const AbstractType& type) const {
-  StorePointer(&raw_ptr()->static_receiver_type_, type.raw());
+void ICData::SetReceiversStaticType(const AbstractType& type) const {
+  StorePointer(&raw_ptr()->receivers_static_type_, type.raw());
+
+#if defined(TARGET_ARCH_X64)
+  if (!type.IsNull() && type.HasTypeClass() && (NumArgsTested() == 1) &&
+      type.IsInstantiated()) {
+    const Class& cls = Class::Handle(type.type_class());
+    if (cls.IsGeneric() && !cls.IsFutureOrClass()) {
+      set_tracking_exactness(true);
+    }
+  }
+#endif  // defined(TARGET_ARCH_X64)
 }
 #endif
 
 void ICData::ResetSwitchable(Zone* zone) const {
   ASSERT(NumArgsTested() == 1);
-  ASSERT(!IsTrackingExactness());
+  ASSERT(!is_tracking_exactness());
   set_entries(Array::Handle(zone, CachedEmptyICDataArray(1, false)));
 }
 
@@ -13166,7 +13343,7 @@
 }
 
 intptr_t ICData::TestEntryLength() const {
-  return TestEntryLengthFor(NumArgsTested(), IsTrackingExactness());
+  return TestEntryLengthFor(NumArgsTested(), is_tracking_exactness());
 }
 
 intptr_t ICData::Length() const {
@@ -13320,7 +13497,7 @@
 
 #if !defined(DART_PRECOMPILED_RUNTIME)
   if (smi_op_target.IsNull() &&
-      Function::IsDynamicInvocationForwaderName(name)) {
+      Function::IsDynamicInvocationForwarderName(name)) {
     const String& demangled =
         String::Handle(Function::DemangleDynamicInvocationForwarderName(name));
     smi_op_target = Resolver::ResolveDynamicAnyArgs(zone, smi_class, demangled);
@@ -13386,7 +13563,7 @@
 bool ICData::ValidateInterceptor(const Function& target) const {
 #if !defined(DART_PRECOMPILED_RUNTIME)
   const String& name = String::Handle(target_name());
-  if (Function::IsDynamicInvocationForwaderName(name)) {
+  if (Function::IsDynamicInvocationForwarderName(name)) {
     return Function::DemangleDynamicInvocationForwarderName(name) ==
            target.name();
   }
@@ -13403,7 +13580,7 @@
 void ICData::AddCheck(const GrowableArray<intptr_t>& class_ids,
                       const Function& target,
                       intptr_t count) const {
-  ASSERT(!IsTrackingExactness());
+  ASSERT(!is_tracking_exactness());
   ASSERT(!target.IsNull());
   ASSERT((target.name() == target_name()) || ValidateInterceptor(target));
   DEBUG_ASSERT(!HasCheck(class_ids));
@@ -13516,7 +13693,7 @@
   if (Isolate::Current()->compilation_allowed()) {
     data.SetAt(data_pos + 1, target);
     data.SetAt(data_pos + 2, Smi::Handle(Smi::New(count)));
-    if (IsTrackingExactness()) {
+    if (is_tracking_exactness()) {
       data.SetAt(data_pos + 3, Smi::Handle(Smi::New(exactness.Encode())));
     }
   } else {
@@ -13534,7 +13711,7 @@
 }
 
 StaticTypeExactnessState ICData::GetExactnessAt(intptr_t index) const {
-  if (!IsTrackingExactness()) {
+  if (!is_tracking_exactness()) {
     return StaticTypeExactnessState::NotTracking();
   }
   const Array& data = Array::Handle(entries());
@@ -13954,7 +14131,7 @@
                                  intptr_t deopt_id,
                                  intptr_t num_args_tested,
                                  RebindRule rebind_rule,
-                                 const AbstractType& static_receiver_type) {
+                                 const AbstractType& receivers_static_type) {
   ASSERT(!owner.IsNull());
   ASSERT(!target_name.IsNull());
   ASSERT(!arguments_descriptor.IsNull());
@@ -13975,7 +14152,7 @@
   result.set_state_bits(0);
   result.set_rebind_rule(rebind_rule);
   result.SetNumArgsTested(num_args_tested);
-  NOT_IN_PRECOMPILED(result.SetStaticReceiverType(static_receiver_type));
+  NOT_IN_PRECOMPILED(result.SetReceiversStaticType(receivers_static_type));
   return result.raw();
 }
 
@@ -14004,15 +14181,15 @@
                        intptr_t deopt_id,
                        intptr_t num_args_tested,
                        RebindRule rebind_rule,
-                       const AbstractType& static_receiver_type) {
+                       const AbstractType& receivers_static_type) {
   Zone* zone = Thread::Current()->zone();
   const ICData& result = ICData::Handle(
       zone,
       NewDescriptor(zone, owner, target_name, arguments_descriptor, deopt_id,
-                    num_args_tested, rebind_rule, static_receiver_type));
+                    num_args_tested, rebind_rule, receivers_static_type));
   result.set_entries(Array::Handle(
       zone,
-      CachedEmptyICDataArray(num_args_tested, result.IsTrackingExactness())));
+      CachedEmptyICDataArray(num_args_tested, result.is_tracking_exactness())));
   return result.raw();
 }
 
@@ -14022,7 +14199,7 @@
       Function::Handle(from.Owner()), String::Handle(from.target_name()),
       Array::Handle(from.arguments_descriptor()), from.deopt_id(),
       num_args_tested, from.rebind_rule(),
-      AbstractType::Handle(from.StaticReceiverType())));
+      AbstractType::Handle(from.receivers_static_type())));
   // Copy deoptimization reasons.
   result.SetDeoptReasons(from.DeoptReasons());
   return result.raw();
@@ -14030,12 +14207,13 @@
 
 RawICData* ICData::Clone(const ICData& from) {
   Zone* zone = Thread::Current()->zone();
-  const ICData& result = ICData::Handle(ICData::NewDescriptor(
-      zone, Function::Handle(zone, from.Owner()),
-      String::Handle(zone, from.target_name()),
-      Array::Handle(zone, from.arguments_descriptor()), from.deopt_id(),
-      from.NumArgsTested(), from.rebind_rule(),
-      AbstractType::Handle(from.StaticReceiverType())));
+  const ICData& result = ICData::Handle(
+      zone, ICData::NewDescriptor(
+                zone, Function::Handle(zone, from.Owner()),
+                String::Handle(zone, from.target_name()),
+                Array::Handle(zone, from.arguments_descriptor()),
+                from.deopt_id(), from.NumArgsTested(), from.rebind_rule(),
+                AbstractType::Handle(zone, from.receivers_static_type())));
   // Clone entry array.
   const Array& from_array = Array::Handle(zone, from.entries());
   const intptr_t len = from_array.Length();
@@ -14433,15 +14611,43 @@
 }
 #endif
 
-RawCode* Code::FinalizeCode(const char* name,
-                            FlowGraphCompiler* compiler,
+RawCode* Code::FinalizeCodeAndNotify(const Function& function,
+                                     FlowGraphCompiler* compiler,
+                                     compiler::Assembler* assembler,
+                                     PoolAttachment pool_attachment,
+                                     bool optimized,
+                                     CodeStatistics* stats) {
+  DEBUG_ASSERT(IsMutatorOrAtSafepoint());
+  const auto& code = Code::Handle(
+      FinalizeCode(compiler, assembler, pool_attachment, optimized, stats));
+  NotifyCodeObservers(function, code, optimized);
+  return code.raw();
+}
+
+RawCode* Code::FinalizeCodeAndNotify(const char* name,
+                                     FlowGraphCompiler* compiler,
+                                     compiler::Assembler* assembler,
+                                     PoolAttachment pool_attachment,
+                                     bool optimized,
+                                     CodeStatistics* stats) {
+  DEBUG_ASSERT(IsMutatorOrAtSafepoint());
+  const auto& code = Code::Handle(
+      FinalizeCode(compiler, assembler, pool_attachment, optimized, stats));
+  NotifyCodeObservers(name, code, optimized);
+  return code.raw();
+}
+
+RawCode* Code::FinalizeCode(FlowGraphCompiler* compiler,
                             Assembler* assembler,
                             PoolAttachment pool_attachment,
                             bool optimized,
                             CodeStatistics* stats /* = nullptr */) {
+  DEBUG_ASSERT(IsMutatorOrAtSafepoint());
   Isolate* isolate = Isolate::Current();
   if (!isolate->compilation_allowed()) {
-    FATAL1("Precompilation missed code %s\n", name);
+    FATAL(
+        "Compilation is not allowed (precompilation might have missed a "
+        "code\n");
   }
 
   ASSERT(assembler != NULL);
@@ -14464,19 +14670,20 @@
   Instructions& instrs = Instructions::ZoneHandle(Instructions::New(
       assembler->CodeSize(), assembler->has_single_entry_point(),
       compiler == nullptr ? 0 : compiler->UncheckedEntryOffset()));
-  // Important: if GC is triggerred at any point between Instructions::New
-  // and here it would write protect instructions object that we are trying
-  // to fill in.
+
   {
+    // Important: if GC is triggerred at any point between Instructions::New
+    // and here it would write protect instructions object that we are trying
+    // to fill in.
     NoSafepointScope no_safepoint;
+
     // Copy the instructions into the instruction area and apply all fixups.
     // Embedded pointers are still in handles at this point.
     MemoryRegion region(reinterpret_cast<void*>(instrs.PayloadStart()),
                         instrs.Size());
     assembler->FinalizeInstructions(region);
 
-    const ZoneGrowableArray<intptr_t>& pointer_offsets =
-        assembler->GetPointerOffsets();
+    const auto& pointer_offsets = assembler->GetPointerOffsets();
     ASSERT(pointer_offsets.length() == pointer_offset_count);
     ASSERT(code.pointer_offsets_length() == pointer_offsets.length());
 
@@ -14496,6 +14703,24 @@
                                object->raw());
     }
 
+    // Write protect instructions and, if supported by OS, use dual mapping
+    // for execution.
+    if (FLAG_write_protect_code) {
+      uword address = RawObject::ToAddr(instrs.raw());
+      // Check if a dual mapping exists.
+      instrs = Instructions::RawCast(HeapPage::ToExecutable(instrs.raw()));
+      uword exec_address = RawObject::ToAddr(instrs.raw());
+      if (exec_address != address) {
+        VirtualMemory::Protect(reinterpret_cast<void*>(address),
+                               instrs.raw()->HeapSize(),
+                               VirtualMemory::kReadOnly);
+        address = exec_address;
+      }
+      VirtualMemory::Protect(reinterpret_cast<void*>(address),
+                             instrs.raw()->HeapSize(),
+                             VirtualMemory::kReadExecute);
+    }
+
     // Hook up Code and Instructions objects.
     code.SetActiveInstructions(instrs);
     code.set_instructions(instrs);
@@ -14506,31 +14731,19 @@
       code.set_object_pool(object_pool->raw());
     }
 
-    if (FLAG_write_protect_code) {
-      uword address = RawObject::ToAddr(instrs.raw());
-      VirtualMemory::Protect(reinterpret_cast<void*>(address),
-                             instrs.raw()->HeapSize(),
-                             VirtualMemory::kReadExecute);
-    }
-  }
-  CPU::FlushICache(instrs.PayloadStart(), instrs.Size());
-
 #if defined(DART_PRECOMPILER)
-  if (stats != nullptr) {
-    stats->Finalize();
-    instrs.set_stats(stats);
-  }
+    if (stats != nullptr) {
+      stats->Finalize();
+      instrs.set_stats(stats);
+    }
 #endif
 
-#ifndef PRODUCT
-  const Code::Comments& comments = CreateCommentsFrom(assembler);
+    CPU::FlushICache(instrs.PayloadStart(), instrs.Size());
+  }
 
+#ifndef PRODUCT
   code.set_compile_timestamp(OS::GetCurrentMonotonicMicros());
-  CodeCommentsWrapper comments_wrapper(comments);
-  CodeObservers::NotifyAll(name, instrs.PayloadStart(),
-                           assembler->prologue_offset(), instrs.Size(),
-                           optimized, &comments_wrapper);
-  code.set_comments(comments);
+  code.set_comments(CreateCommentsFrom(assembler));
   if (assembler->prologue_offset() >= 0) {
     code.SetPrologueOffset(assembler->prologue_offset());
   } else {
@@ -14542,22 +14755,33 @@
   return code.raw();
 }
 
-RawCode* Code::FinalizeCode(const Function& function,
-                            FlowGraphCompiler* compiler,
-                            Assembler* assembler,
-                            PoolAttachment pool_attachment,
-                            bool optimized /* = false */,
-                            CodeStatistics* stats /* = nullptr */) {
-// Calling ToLibNamePrefixedQualifiedCString is very expensive,
-// try to avoid it.
-#ifndef PRODUCT
+void Code::NotifyCodeObservers(const Function& function,
+                               const Code& code,
+                               bool optimized) {
+#if !defined(PRODUCT)
+  ASSERT(!Thread::Current()->IsAtSafepoint());
+  // Calling ToLibNamePrefixedQualifiedCString is very expensive,
+  // try to avoid it.
   if (CodeObservers::AreActive()) {
-    return FinalizeCode(function.ToLibNamePrefixedQualifiedCString(), compiler,
-                        assembler, pool_attachment, optimized, stats);
+    const char* name = function.ToLibNamePrefixedQualifiedCString();
+    NotifyCodeObservers(name, code, optimized);
   }
-#endif  // !PRODUCT
-  return FinalizeCode("", compiler, assembler, pool_attachment, optimized,
-                      stats);
+#endif
+}
+
+void Code::NotifyCodeObservers(const char* name,
+                               const Code& code,
+                               bool optimized) {
+#if !defined(PRODUCT)
+  ASSERT(!Thread::Current()->IsAtSafepoint());
+  if (CodeObservers::AreActive()) {
+    const auto& instrs = Instructions::Handle(code.instructions());
+    CodeCommentsWrapper comments_wrapper(code.comments());
+    CodeObservers::NotifyAll(name, instrs.PayloadStart(),
+                             code.GetPrologueOffset(), instrs.Size(), optimized,
+                             &comments_wrapper);
+  }
+#endif
 }
 
 #endif  // !defined(DART_PRECOMPILED_RUNTIME)
@@ -14862,7 +15086,6 @@
 #endif  // !defined(PRODUCT) || defined(FORCE_INCLUDE_DISASSEMBLER)
 }
 
-#if !defined(DART_PRECOMPILED_RUNTIME)
 RawBytecode* Bytecode::New(uword instructions,
                            intptr_t instructions_size,
                            intptr_t instructions_offset,
@@ -14883,10 +15106,12 @@
   }
   return result.raw();
 }
-#endif
 
 RawExternalTypedData* Bytecode::GetBinary(Zone* zone) const {
   const Function& func = Function::Handle(zone, function());
+  if (func.IsNull()) {
+    return ExternalTypedData::null();
+  }
   const Script& script = Script::Handle(zone, func.script());
   const KernelProgramInfo& info =
       KernelProgramInfo::Handle(zone, script.kernel_program_info());
@@ -14922,6 +15147,14 @@
 }
 
 const char* Bytecode::Name() const {
+  if (raw() == Object::implicit_getter_bytecode().raw()) {
+    return "[Bytecode Stub] VMInternal_ImplicitGetter";
+  } else if (raw() == Object::implicit_setter_bytecode().raw()) {
+    return "[Bytecode Stub] VMInternal_ImplicitSetter";
+  } else if (raw() == Object::method_extractor_bytecode().raw()) {
+    return "[Bytecode Stub] VMInternal_MethodExtractor";
+  }
+
   Zone* zone = Thread::Current()->zone();
   const Function& fun = Function::Handle(zone, function());
   ASSERT(!fun.IsNull());
@@ -14931,6 +15164,14 @@
 }
 
 const char* Bytecode::QualifiedName() const {
+  if (raw() == Object::implicit_getter_bytecode().raw()) {
+    return "[Bytecode Stub] VMInternal_ImplicitGetter";
+  } else if (raw() == Object::implicit_setter_bytecode().raw()) {
+    return "[Bytecode Stub] VMInternal_ImplicitSetter";
+  } else if (raw() == Object::method_extractor_bytecode().raw()) {
+    return "[Bytecode Stub] VMInternal_MethodExtractor";
+  }
+
   Zone* zone = Thread::Current()->zone();
   const Function& fun = Function::Handle(zone, function());
   ASSERT(!fun.IsNull());
@@ -15682,7 +15923,7 @@
   Function& function = Function::Handle(
       zone, Resolver::ResolveDynamicAnyArgs(zone, klass, internal_getter_name));
 
-  if (check_is_entrypoint) {
+  if (!function.IsNull() && check_is_entrypoint) {
     // The getter must correspond to either an entry-point field or a getter
     // method explicitly marked.
     Field& field = Field::Handle(zone);
@@ -15691,8 +15932,8 @@
     }
     if (!field.IsNull()) {
       CHECK_ERROR(field.VerifyEntryPoint(EntryPointPragma::kGetterOnly));
-    } else if (!function.IsNull()) {
-      CHECK_ERROR(function.VerifyEntryPoint());
+    } else {
+      CHECK_ERROR(function.VerifyCallEntryPoint());
     }
   }
 
@@ -15701,7 +15942,7 @@
     function = Resolver::ResolveDynamicAnyArgs(zone, klass, getter_name);
 
     if (!function.IsNull() && check_is_entrypoint) {
-      CHECK_ERROR(EntryPointClosurizationError(getter_name));
+      CHECK_ERROR(function.VerifyClosurizedEntryPoint());
     }
 
     if (!function.IsNull() && function.SafeToClosurize()) {
@@ -15750,7 +15991,7 @@
     if (!field.IsNull()) {
       CHECK_ERROR(field.VerifyEntryPoint(EntryPointPragma::kSetterOnly));
     } else if (!setter.IsNull()) {
-      CHECK_ERROR(setter.VerifyEntryPoint());
+      CHECK_ERROR(setter.VerifyCallEntryPoint());
     }
   }
 
@@ -15778,7 +16019,7 @@
       zone, Resolver::ResolveDynamicAnyArgs(zone, klass, function_name));
 
   if (!function.IsNull() && check_is_entrypoint) {
-    CHECK_ERROR(function.VerifyEntryPoint());
+    CHECK_ERROR(function.VerifyCallEntryPoint());
   }
 
   // TODO(regis): Support invocation of generic functions with type arguments.
@@ -15798,7 +16039,7 @@
     function = Resolver::ResolveDynamicAnyArgs(zone, klass, getter_name);
     if (!function.IsNull()) {
       if (check_is_entrypoint) {
-        CHECK_ERROR(EntryPointClosurizationError(function_name));
+        CHECK_ERROR(EntryPointFieldInvocationError(function_name));
       }
       ASSERT(function.kind() != RawFunction::kMethodExtractor);
       // Invoke the getter.
@@ -15994,7 +16235,7 @@
       return result.raw();
     }
     if (IsNew()) {
-      ASSERT((isolate == Dart::vm_isolate()) || !InVMHeap());
+      ASSERT((isolate == Dart::vm_isolate()) || !InVMIsolateHeap());
       // Create a canonical object in old space.
       result ^= Object::Clone(*this, Heap::kOld);
     } else {
@@ -16294,10 +16535,10 @@
 }
 
 intptr_t Instance::ElementSizeFor(intptr_t cid) {
-  if (RawObject::IsExternalTypedDataClassId(cid)) {
-    return ExternalTypedData::ElementSizeInBytes(cid);
-  } else if (RawObject::IsTypedDataClassId(cid)) {
-    return TypedData::ElementSizeInBytes(cid);
+  if (RawObject::IsExternalTypedDataClassId(cid) ||
+      RawObject::IsTypedDataClassId(cid) ||
+      RawObject::IsTypedDataViewClassId(cid)) {
+    return TypedDataBase::ElementSizeInBytes(cid);
   }
   switch (cid) {
     case kArrayCid:
@@ -17339,7 +17580,7 @@
     ASSERT(!IsFunctionType());
     Type& type = Type::Handle(zone, cls.declaration_type());
     if (type.IsNull()) {
-      ASSERT(!cls.raw()->IsVMHeapObject() || (isolate == Dart::vm_isolate()));
+      ASSERT(!cls.raw()->InVMIsolateHeap() || (isolate == Dart::vm_isolate()));
       // Canonicalize the type arguments of the supertype, if any.
       TypeArguments& type_args = TypeArguments::Handle(zone, arguments());
       type_args = type_args.Canonicalize(trail);
@@ -17756,7 +17997,12 @@
 
 void TypeParameter::SetIsFinalized() const {
   ASSERT(!IsFinalized());
-  set_type_state(RawTypeParameter::kFinalizedUninstantiated);
+  set_flags(RawTypeParameter::FinalizedBit::update(true, raw_ptr()->flags_));
+}
+
+void TypeParameter::SetGenericCovariantImpl(bool value) const {
+  set_flags(RawTypeParameter::GenericCovariantImplBit::update(
+      value, raw_ptr()->flags_));
 }
 
 bool TypeParameter::IsInstantiated(Genericity genericity,
@@ -17926,6 +18172,7 @@
                                      intptr_t index,
                                      const String& name,
                                      const AbstractType& bound,
+                                     bool is_generic_covariant_impl,
                                      TokenPosition token_pos) {
   ASSERT(parameterized_class.IsNull() != parameterized_function.IsNull());
   Zone* Z = Thread::Current()->zone();
@@ -17935,10 +18182,10 @@
   result.set_index(index);
   result.set_name(name);
   result.set_bound(bound);
+  result.set_flags(0);
+  result.SetGenericCovariantImpl(is_generic_covariant_impl);
   result.SetHash(0);
   result.set_token_pos(token_pos);
-  result.StoreNonPointer(&result.raw_ptr()->type_state_,
-                         RawTypeParameter::kAllocated);
 
   result.SetTypeTestingStub(
       Code::Handle(Z, TypeTestingStubGenerator::DefaultCodeForType(result)));
@@ -17950,11 +18197,8 @@
   StoreNonPointer(&raw_ptr()->token_pos_, token_pos);
 }
 
-void TypeParameter::set_type_state(int8_t state) const {
-  ASSERT((state == RawTypeParameter::kAllocated) ||
-         (state == RawTypeParameter::kBeingFinalized) ||
-         (state == RawTypeParameter::kFinalizedUninstantiated));
-  StoreNonPointer(&raw_ptr()->type_state_, state);
+void TypeParameter::set_flags(uint8_t flags) const {
+  StoreNonPointer(&raw_ptr()->flags_, flags);
 }
 
 const char* TypeParameter::ToCString() const {
@@ -18861,6 +19105,25 @@
   return true;
 }
 
+bool String::EndsWith(const String& other) const {
+  if (other.IsNull()) {
+    return false;
+  }
+  const intptr_t len = this->Length();
+  const intptr_t other_len = other.Length();
+  const intptr_t offset = len - other_len;
+
+  if ((other_len == 0) || (other_len > len)) {
+    return false;
+  }
+  for (int i = offset; i < len; i++) {
+    if (this->CharAt(i) != other.CharAt(i - offset)) {
+      return false;
+    }
+  }
+  return true;
+}
+
 RawInstance* String::CheckAndCanonicalize(Thread* thread,
                                           const char** error_str) const {
   if (IsCanonical()) {
@@ -20111,7 +20374,7 @@
 RawArray* Array::New(intptr_t len, Heap::Space space) {
   ASSERT(Isolate::Current()->object_store()->array_class() != Class::null());
   RawArray* result = New(kClassId, len, space);
-  if (result->HeapSize() > Heap::kNewAllocatableSize) {
+  if (UseCardMarkingForAllocation(len)) {
     ASSERT(result->IsOldObject());
     result->SetCardRememberedBitUnsynchronized();
   }
@@ -20701,21 +20964,22 @@
   return OS::SCreate(Thread::Current()->zone(), "[%f, %f]", _x, _y);
 }
 
-const intptr_t TypedData::element_size_table[TypedData::kNumElementSizes] = {
-    1,   // kTypedDataInt8ArrayCid.
-    1,   // kTypedDataUint8ArrayCid.
-    1,   // kTypedDataUint8ClampedArrayCid.
-    2,   // kTypedDataInt16ArrayCid.
-    2,   // kTypedDataUint16ArrayCid.
-    4,   // kTypedDataInt32ArrayCid.
-    4,   // kTypedDataUint32ArrayCid.
-    8,   // kTypedDataInt64ArrayCid.
-    8,   // kTypedDataUint64ArrayCid.
-    4,   // kTypedDataFloat32ArrayCid.
-    8,   // kTypedDataFloat64ArrayCid.
-    16,  // kTypedDataFloat32x4ArrayCid.
-    16,  // kTypedDataInt32x4ArrayCid.
-    16,  // kTypedDataFloat64x2ArrayCid,
+const intptr_t
+    TypedDataBase::element_size_table[TypedDataBase::kNumElementSizes] = {
+        1,   // kTypedDataInt8ArrayCid.
+        1,   // kTypedDataUint8ArrayCid.
+        1,   // kTypedDataUint8ClampedArrayCid.
+        2,   // kTypedDataInt16ArrayCid.
+        2,   // kTypedDataUint16ArrayCid.
+        4,   // kTypedDataInt32ArrayCid.
+        4,   // kTypedDataUint32ArrayCid.
+        8,   // kTypedDataInt64ArrayCid.
+        8,   // kTypedDataUint64ArrayCid.
+        4,   // kTypedDataFloat32ArrayCid.
+        8,   // kTypedDataFloat64ArrayCid.
+        16,  // kTypedDataFloat32x4ArrayCid.
+        16,  // kTypedDataInt32x4ArrayCid.
+        16,  // kTypedDataFloat64x2ArrayCid,
 };
 
 bool TypedData::CanonicalizeEquals(const Instance& other) const {
@@ -20763,14 +21027,15 @@
   }
   TypedData& result = TypedData::Handle();
   {
-    const intptr_t lengthInBytes = len * ElementSizeInBytes(class_id);
+    const intptr_t length_in_bytes = len * ElementSizeInBytes(class_id);
     RawObject* raw = Object::Allocate(
-        class_id, TypedData::InstanceSize(lengthInBytes), space);
+        class_id, TypedData::InstanceSize(length_in_bytes), space);
     NoSafepointScope no_safepoint;
     result ^= raw;
     result.SetLength(len);
+    result.RecomputeDataField();
     if (len > 0) {
-      memset(result.DataAddr(0), 0, lengthInBytes);
+      memset(result.DataAddr(0), 0, length_in_bytes);
     }
   }
   return result.raw();
@@ -20813,12 +21078,45 @@
   return result.raw();
 }
 
+RawTypedDataView* TypedDataView::New(intptr_t class_id, Heap::Space space) {
+  auto& result = TypedDataView::Handle();
+  {
+    RawObject* raw =
+        Object::Allocate(class_id, TypedDataView::InstanceSize(), space);
+    NoSafepointScope no_safepoint;
+    result ^= raw;
+    result.Clear();
+  }
+  return result.raw();
+}
+
+RawTypedDataView* TypedDataView::New(intptr_t class_id,
+                                     const TypedDataBase& typed_data,
+                                     intptr_t offset_in_bytes,
+                                     intptr_t length,
+                                     Heap::Space space) {
+  auto& result = TypedDataView::Handle(TypedDataView::New(class_id, space));
+  result.InitializeWith(typed_data, offset_in_bytes, length);
+  return result.raw();
+}
+
+const char* TypedDataBase::ToCString() const {
+  // There are no instances of RawTypedDataBase.
+  UNREACHABLE();
+  return nullptr;
+}
+
+const char* TypedDataView::ToCString() const {
+  auto zone = Thread::Current()->zone();
+  return OS::SCreate(zone, "TypedDataView(cid: %" Pd ")", GetClassId());
+}
+
 const char* ExternalTypedData::ToCString() const {
   return "ExternalTypedData";
 }
 
 RawPointer* Pointer::New(const AbstractType& type_arg,
-                         uint8_t* c_memory_address,
+                         const Integer& c_memory_address,
                          intptr_t cid,
                          Heap::Space space) {
   Thread* thread = Thread::Current();
@@ -20843,8 +21141,10 @@
 const char* Pointer::ToCString() const {
   TypeArguments& type_args = TypeArguments::Handle(GetTypeArguments());
   String& type_args_name = String::Handle(type_args.UserVisibleName());
-  return OS::SCreate(Thread::Current()->zone(), "Pointer%s: address=%p",
-                     type_args_name.ToCString(), GetCMemoryAddress());
+  return OS::SCreate(Thread::Current()->zone(), "Pointer%s: address=0x%" Px,
+                     type_args_name.ToCString(),
+                     static_cast<intptr_t>(
+                         Integer::Handle(GetCMemoryAddress()).AsInt64Value()));
 }
 
 RawDynamicLibrary* DynamicLibrary::New(void* handle, Heap::Space space) {
@@ -20882,8 +21182,8 @@
 }
 
 const char* DynamicLibrary::ToCString() const {
-  return OS::SCreate(Thread::Current()->zone(), "DynamicLibrary: handle=%p",
-                     GetHandle());
+  return OS::SCreate(Thread::Current()->zone(), "DynamicLibrary: handle=0x%" Px,
+                     reinterpret_cast<uintptr_t>(GetHandle()));
 }
 
 RawCapability* Capability::New(uint64_t id, Heap::Space space) {
@@ -21391,6 +21691,10 @@
   StoreSmi(&raw_ptr()->num_bracket_expressions_, Smi::New(value));
 }
 
+void RegExp::set_capture_name_map(const Array& array) const {
+  StorePointer(&raw_ptr()->capture_name_map_, array.raw());
+}
+
 RawRegExp* RegExp::New(Heap::Space space) {
   RegExp& result = RegExp::Handle();
   {
@@ -21398,7 +21702,7 @@
         Object::Allocate(RegExp::kClassId, RegExp::InstanceSize(), space);
     NoSafepointScope no_safepoint;
     result ^= raw;
-    result.set_type(kUnitialized);
+    result.set_type(kUninitialized);
     result.set_flags(0);
     result.set_num_registers(-1);
   }
@@ -21681,15 +21985,19 @@
     if (pragma->raw() == Symbols::Set().raw()) {
       return EntryPointPragma::kSetterOnly;
     }
+    if (pragma->raw() == Symbols::Call().raw()) {
+      return EntryPointPragma::kCallOnly;
+    }
   }
   return EntryPointPragma::kNever;
 }
 
 DART_WARN_UNUSED_RESULT
-RawError* VerifyEntryPoint(const Library& lib,
-                           const Object& member,
-                           const Object& annotated,
-                           EntryPointPragma kind) {
+RawError* VerifyEntryPoint(
+    const Library& lib,
+    const Object& member,
+    const Object& annotated,
+    std::initializer_list<EntryPointPragma> allowed_kinds) {
 #if defined(DART_PRECOMPILED_RUNTIME)
   // Annotations are discarded in the AOT snapshot, so we can't determine
   // precisely if this member was marked as an entry-point. Instead, we use
@@ -21713,13 +22021,23 @@
   EntryPointPragma pragma =
       FindEntryPointPragma(Isolate::Current(), Array::Cast(metadata),
                            &Field::Handle(), &Object::Handle());
-  const bool is_marked_entrypoint =
-      pragma == kind || pragma == EntryPointPragma::kAlways;
+  bool is_marked_entrypoint = pragma == EntryPointPragma::kAlways;
+  if (!is_marked_entrypoint) {
+    for (const auto allowed_kind : allowed_kinds) {
+      if (pragma == allowed_kind) {
+        is_marked_entrypoint = true;
+        break;
+      }
+    }
+  }
 #endif
   if (!is_marked_entrypoint) {
     const char* member_cstring =
         member.IsFunction()
-            ? Function::Cast(member).ToLibNamePrefixedQualifiedCString()
+            ? OS::SCreate(
+                  Thread::Current()->zone(), "%s (kind %s)",
+                  Function::Cast(member).ToLibNamePrefixedQualifiedCString(),
+                  Function::KindToCString(Function::Cast(member).kind()))
             : member.ToCString();
     char const* error = OS::SCreate(
         Thread::Current()->zone(),
@@ -21735,12 +22053,12 @@
 }
 
 DART_WARN_UNUSED_RESULT
-RawError* EntryPointClosurizationError(const String& getter_name) {
+RawError* EntryPointFieldInvocationError(const String& getter_name) {
   if (!FLAG_verify_entry_points) return Error::null();
 
   char const* error = OS::SCreate(
       Thread::Current()->zone(),
-      "ERROR: Entry-points do not allow closurizing methods "
+      "ERROR: Entry-points do not allow invoking fields "
       "(failure to resolve '%s')\n"
       "ERROR: See "
       "https://github.com/dart-lang/sdk/blob/master/runtime/docs/compiler/"
@@ -21750,50 +22068,67 @@
   return ApiError::New(String::Handle(String::New(error)));
 }
 
-RawError* Function::VerifyEntryPoint() const {
+RawError* Function::VerifyCallEntryPoint() const {
   if (!FLAG_verify_entry_points) return Error::null();
 
   const Class& cls = Class::Handle(Owner());
   const Library& lib = Library::Handle(cls.library());
   switch (kind()) {
     case RawFunction::kRegularFunction:
-    case RawFunction::kGetterFunction:
     case RawFunction::kSetterFunction:
     case RawFunction::kConstructor:
       return dart::VerifyEntryPoint(lib, *this, *this,
-                                    EntryPointPragma::kAlways);
+                                    {EntryPointPragma::kCallOnly});
       break;
-    case RawFunction::kImplicitGetter: {
-      const Field& accessed = Field::Handle(accessor_field());
-      return dart::VerifyEntryPoint(lib, *this, accessed,
-                                    EntryPointPragma::kGetterOnly);
+    case RawFunction::kGetterFunction:
+      return dart::VerifyEntryPoint(
+          lib, *this, *this,
+          {EntryPointPragma::kCallOnly, EntryPointPragma::kGetterOnly});
       break;
-    }
-    case RawFunction::kImplicitSetter: {
-      const Field& accessed = Field::Handle(accessor_field());
-      return dart::VerifyEntryPoint(lib, *this, accessed,
-                                    EntryPointPragma::kSetterOnly);
+    case RawFunction::kImplicitGetter:
+      return dart::VerifyEntryPoint(lib, *this, Field::Handle(accessor_field()),
+                                    {EntryPointPragma::kGetterOnly});
       break;
-    }
+    case RawFunction::kImplicitSetter:
+      return dart::VerifyEntryPoint(lib, *this, Field::Handle(accessor_field()),
+                                    {EntryPointPragma::kSetterOnly});
+    case RawFunction::kMethodExtractor:
+      return Function::Handle(extracted_method_closure())
+          .VerifyClosurizedEntryPoint();
+      break;
     default:
-      return dart::VerifyEntryPoint(lib, *this, Object::Handle(),
-                                    EntryPointPragma::kAlways);
+      return dart::VerifyEntryPoint(lib, *this, Object::Handle(), {});
       break;
   }
 }
 
+RawError* Function::VerifyClosurizedEntryPoint() const {
+  if (!FLAG_verify_entry_points) return Error::null();
+
+  const Class& cls = Class::Handle(Owner());
+  const Library& lib = Library::Handle(cls.library());
+  switch (kind()) {
+    case RawFunction::kRegularFunction:
+    case RawFunction::kImplicitClosureFunction:
+      return dart::VerifyEntryPoint(lib, *this, *this,
+                                    {EntryPointPragma::kGetterOnly});
+    default:
+      UNREACHABLE();
+  }
+}
+
 RawError* Field::VerifyEntryPoint(EntryPointPragma pragma) const {
   if (!FLAG_verify_entry_points) return Error::null();
   const Class& cls = Class::Handle(Owner());
   const Library& lib = Library::Handle(cls.library());
-  return dart::VerifyEntryPoint(lib, *this, *this, pragma);
+  return dart::VerifyEntryPoint(lib, *this, *this, {pragma});
 }
 
 RawError* Class::VerifyEntryPoint() const {
   if (!FLAG_verify_entry_points) return Error::null();
   const Library& lib = Library::Handle(library());
   if (!lib.IsNull()) {
-    return dart::VerifyEntryPoint(lib, *this, *this, EntryPointPragma::kAlways);
+    return dart::VerifyEntryPoint(lib, *this, *this, {});
   } else {
     return Error::null();
   }
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index e426c9d0..b1a0d3b 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -166,10 +166,10 @@
                                                                                \
  private: /* NOLINT */                                                         \
   void* operator new(size_t size);                                             \
-  object(const object& value);                                                 \
-  void operator=(Raw##super* value);                                           \
-  void operator=(const object& value);                                         \
-  void operator=(const super& value);
+  object(const object& value) = delete;                                        \
+  void operator=(Raw##super* value) = delete;                                  \
+  void operator=(const object& value) = delete;                                \
+  void operator=(const super& value) = delete;
 
 // Conditionally include object_service.cc functionality in the vtable to avoid
 // link errors like the following:
@@ -307,9 +307,9 @@
   bool IsNew() const { return raw()->IsNewObject(); }
   bool IsOld() const { return raw()->IsOldObject(); }
 #if defined(DEBUG)
-  bool InVMHeap() const;
+  bool InVMIsolateHeap() const;
 #else
-  bool InVMHeap() const { return raw()->IsVMHeapObject(); }
+  bool InVMIsolateHeap() const { return raw()->InVMIsolateHeap(); }
 #endif  // DEBUG
 
   // Print the object on stdout for debugging.
@@ -396,6 +396,9 @@
   V(ExceptionHandlers, empty_exception_handlers)                               \
   V(Array, extractor_parameter_types)                                          \
   V(Array, extractor_parameter_names)                                          \
+  V(Bytecode, implicit_getter_bytecode)                                        \
+  V(Bytecode, implicit_setter_bytecode)                                        \
+  V(Bytecode, method_extractor_bytecode)                                       \
   V(Instance, sentinel)                                                        \
   V(Instance, transition_sentinel)                                             \
   V(Instance, unknown_constant)                                                \
@@ -637,10 +640,7 @@
     return -kWordSize;
   }
 
-  static void InitializeObject(uword address,
-                               intptr_t id,
-                               intptr_t size,
-                               bool is_vm_object);
+  static void InitializeObject(uword address, intptr_t id, intptr_t size);
 
   static void RegisterClass(const Class& cls,
                             const String& name,
@@ -1259,7 +1259,7 @@
   // Allocate the raw TypedData classes.
   static RawClass* NewTypedDataClass(intptr_t class_id);
 
-  // Allocate the raw TypedDataView classes.
+  // Allocate the raw TypedDataView/ByteDataView classes.
   static RawClass* NewTypedDataViewClass(intptr_t class_id);
 
   // Allocate the raw ExternalTypedData classes.
@@ -1442,6 +1442,7 @@
   friend class Instance;
   friend class Object;
   friend class Type;
+  friend class InterpreterHelpers;
   friend class Intrinsifier;
   friend class ClassFunctionVisitor;
 };
@@ -1589,15 +1590,20 @@
   bool IsImmutable() const;
 
 #if !defined(DART_PRECOMPILED_RUNTIME)
-  RawAbstractType* StaticReceiverType() const {
-    return raw_ptr()->static_receiver_type_;
+  RawAbstractType* receivers_static_type() const {
+    return raw_ptr()->receivers_static_type_;
   }
-  void SetStaticReceiverType(const AbstractType& type) const;
-  bool IsTrackingExactness() const {
-    return StaticReceiverType() != Object::null();
+  void SetReceiversStaticType(const AbstractType& type) const;
+  bool is_tracking_exactness() const {
+    return TrackingExactnessBit::decode(raw_ptr()->state_bits_);
+  }
+  void set_tracking_exactness(bool value) const {
+    StoreNonPointer(
+        &raw_ptr()->state_bits_,
+        TrackingExactnessBit::update(value, raw_ptr()->state_bits_));
   }
 #else
-  bool IsTrackingExactness() const { return false; }
+  bool is_tracking_exactness() const { return false; }
 #endif
 
   void Reset(Zone* zone) const;
@@ -1703,8 +1709,8 @@
   static intptr_t owner_offset() { return OFFSET_OF(RawICData, owner_); }
 
 #if !defined(DART_PRECOMPILED_RUNTIME)
-  static intptr_t static_receiver_type_offset() {
-    return OFFSET_OF(RawICData, static_receiver_type_);
+  static intptr_t receivers_static_type_offset() {
+    return OFFSET_OF(RawICData, receivers_static_type_);
   }
 #endif
 
@@ -1883,7 +1889,9 @@
   enum {
     kNumArgsTestedPos = 0,
     kNumArgsTestedSize = 2,
-    kDeoptReasonPos = kNumArgsTestedPos + kNumArgsTestedSize,
+    kTrackingExactnessPos = kNumArgsTestedPos + kNumArgsTestedSize,
+    kTrackingExactnessSize = 1,
+    kDeoptReasonPos = kTrackingExactnessPos + kTrackingExactnessSize,
     kDeoptReasonSize = kLastRecordedDeoptReason + 1,
     kRebindRulePos = kDeoptReasonPos + kDeoptReasonSize,
     kRebindRuleSize = 3
@@ -1895,6 +1903,10 @@
                                             uint32_t,
                                             kNumArgsTestedPos,
                                             kNumArgsTestedSize> {};
+  class TrackingExactnessBit : public BitField<uint32_t,
+                                               bool,
+                                               kTrackingExactnessPos,
+                                               kTrackingExactnessSize> {};
   class DeoptReasonBits : public BitField<uint32_t,
                                           uint32_t,
                                           ICData::kDeoptReasonPos,
@@ -1957,6 +1969,9 @@
 
 class Function : public Object {
  public:
+  // A value to prevent premature code collection. lg(32) = 5 major GCs.
+  static constexpr intptr_t kGraceUsageCounter = 32;
+
   RawString* name() const { return raw_ptr()->name_; }
   RawString* UserVisibleName() const;  // Same as scrubbed name.
   RawString* QualifiedScrubbedName() const {
@@ -1981,6 +1996,14 @@
   // Update the signature type (with a canonical version).
   void SetSignatureType(const Type& value) const;
 
+  // Set the "C signature" function for an FFI trampoline.
+  // Can only be used on FFI trampolines.
+  void SetFfiCSignature(const Function& sig) const;
+
+  // Retrieves the "C signature" function for an FFI trampoline.
+  // Can only be used on FFI trampolines.
+  RawFunction* FfiCSignature() const;
+
   // Return a new function with instantiated result and parameter types.
   RawFunction* InstantiateSignatureFrom(
       const TypeArguments& instantiator_type_arguments,
@@ -2188,7 +2211,7 @@
     return kind() == RawFunction::kInvokeFieldDispatcher;
   }
 
-  bool IsDynamicInvocationForwader() const {
+  bool IsDynamicInvocationForwarder() const {
     return kind() == RawFunction::kDynamicInvocationForwarder;
   }
 
@@ -2247,6 +2270,13 @@
   bool IsFactory() const {
     return (kind() == RawFunction::kConstructor) && is_static();
   }
+
+  // Whether this function can receive an invocation where the number and names
+  // of arguments have not been checked.
+  bool CanReceiveDynamicInvocation() const {
+    return IsClosureFunction() || IsFfiTrampoline();
+  }
+
   bool IsDynamicFunction(bool allow_abstract = false) const {
     if (is_static() || (!allow_abstract && is_abstract())) {
       return false;
@@ -2267,6 +2297,7 @@
       case RawFunction::kSignatureFunction:
       case RawFunction::kConstructor:
       case RawFunction::kImplicitStaticFinalGetter:
+      case RawFunction::kStaticFieldInitializer:
       case RawFunction::kIrregexpFunction:
         return false;
       default:
@@ -2285,6 +2316,7 @@
       case RawFunction::kImplicitGetter:
       case RawFunction::kImplicitSetter:
       case RawFunction::kImplicitStaticFinalGetter:
+      case RawFunction::kStaticFieldInitializer:
       case RawFunction::kIrregexpFunction:
         return true;
       case RawFunction::kClosureFunction:
@@ -2400,6 +2432,75 @@
 
 #undef DEFINE_GETTERS_AND_SETTERS
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
+  intptr_t binary_declaration_offset() const {
+    return RawFunction::BinaryDeclarationOffset::decode(
+        raw_ptr()->binary_declaration_);
+  }
+  void set_binary_declaration_offset(intptr_t value) const {
+    ASSERT(value >= 0);
+    StoreNonPointer(&raw_ptr()->binary_declaration_,
+                    RawFunction::BinaryDeclarationOffset::update(
+                        value, raw_ptr()->binary_declaration_));
+  }
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
+
+  intptr_t kernel_offset() const {
+#if defined(DART_PRECOMPILED_RUNTIME)
+    return 0;
+#else
+    ASSERT(!is_declared_in_bytecode());
+    return binary_declaration_offset();
+#endif
+  }
+
+  void set_kernel_offset(intptr_t value) const {
+#if defined(DART_PRECOMPILED_RUNTIME)
+    UNREACHABLE();
+#else
+    ASSERT(!is_declared_in_bytecode());
+    set_binary_declaration_offset(value);
+#endif
+  }
+
+  intptr_t bytecode_offset() const {
+#if defined(DART_PRECOMPILED_RUNTIME)
+    return 0;
+#else
+    ASSERT(is_declared_in_bytecode());
+    return binary_declaration_offset();
+#endif
+  }
+
+  void set_bytecode_offset(intptr_t value) const {
+#if defined(DART_PRECOMPILED_RUNTIME)
+    UNREACHABLE();
+#else
+    ASSERT(is_declared_in_bytecode());
+    set_binary_declaration_offset(value);
+#endif
+  }
+
+  bool is_declared_in_bytecode() const {
+#if defined(DART_PRECOMPILED_RUNTIME)
+    return false;
+#else
+    return RawFunction::IsDeclaredInBytecode::decode(
+        raw_ptr()->binary_declaration_);
+#endif
+  }
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+  void set_is_declared_in_bytecode(bool value) const {
+    StoreNonPointer(&raw_ptr()->binary_declaration_,
+                    RawFunction::IsDeclaredInBytecode::update(
+                        value, raw_ptr()->binary_declaration_));
+  }
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
+
+  void InheritBinaryDeclarationFrom(const Function& src) const;
+  void InheritBinaryDeclarationFrom(const Field& src) const;
+
   static const intptr_t kMaxInstructionCount = (1 << 16) - 1;
 
   void SetOptimizedInstructionCountClamped(uintptr_t value) const {
@@ -2423,6 +2524,21 @@
   bool IsOptimizable() const;
   void SetIsOptimizable(bool value) const;
 
+  // Whether this function must be optimized immediately and cannot be compiled
+  // with the unoptimizing compiler. Such a function must be sure to not
+  // deoptimize, since we won't generate deoptimization info or register
+  // dependencies. It will be compiled into optimized code immediately when it's
+  // run.
+  bool ForceOptimize() const {
+    return IsFfiTrampoline()
+    // On DBC we use native calls instead of IR for the view factories (see
+    // kernel_to_il.cc)
+#if !defined(TARGET_ARCH_DBC)
+           || IsTypedDataViewFactory()
+#endif
+        ;
+  }
+
   bool CanBeInlined() const;
 
   MethodRecognizer::Kind recognized_kind() const {
@@ -2479,6 +2595,7 @@
     switch (kind()) {
       case RawFunction::kImplicitGetter:
       case RawFunction::kImplicitSetter:
+      case RawFunction::kImplicitStaticFinalGetter:
       case RawFunction::kNoSuchMethodDispatcher:
       case RawFunction::kInvokeFieldDispatcher:
       case RawFunction::kDynamicInvocationForwarder:
@@ -2511,7 +2628,7 @@
   // Returns true if this function represents an implicit static field
   // initializer function.
   bool IsImplicitStaticFieldInitializer() const {
-    return kind() == RawFunction::kImplicitStaticFinalGetter;
+    return kind() == RawFunction::kStaticFieldInitializer;
   }
 
   // Returns true if this function represents a (possibly implicit) closure
@@ -2605,8 +2722,20 @@
     return modifier() != RawFunction::kNoModifier;
   }
 
+  bool IsTypedDataViewFactory() const {
+    if (is_native() && kind() == RawFunction::kConstructor) {
+      // This is a native factory constructor.
+      const Class& klass = Class::Handle(Owner());
+      return RawObject::IsTypedDataViewClassId(klass.id());
+    }
+    return false;
+  }
+
   DART_WARN_UNUSED_RESULT
-  RawError* VerifyEntryPoint() const;
+  RawError* VerifyCallEntryPoint() const;
+
+  DART_WARN_UNUSED_RESULT
+  RawError* VerifyClosurizedEntryPoint() const;
 
   static intptr_t InstanceSize() {
     return RoundedAllocationSize(sizeof(RawFunction));
@@ -2655,7 +2784,7 @@
   RawFunction* CreateMethodExtractor(const String& getter_name) const;
   RawFunction* GetMethodExtractor(const String& getter_name) const;
 
-  static bool IsDynamicInvocationForwaderName(const String& name);
+  static bool IsDynamicInvocationForwarderName(const String& name);
 
   static RawString* DemangleDynamicInvocationForwarderName(const String& name);
 
@@ -2667,6 +2796,8 @@
 
   RawFunction* GetDynamicInvocationForwarder(const String& mangled_name,
                                              bool allow_add = true) const;
+
+  RawFunction* GetTargetOfDynamicInvocationForwarder() const;
 #endif
 
   // Slow function, use in asserts to track changes in important library
@@ -2748,9 +2879,6 @@
   //          dispatchers is not visible. Synthetic code that can trigger
   //          exceptions such as the outer async functions that create Futures
   //          is visible.
-  // optimizable: Candidate for going through the optimizing compiler. False for
-  //              some functions known to be execute infrequently and functions
-  //              which have been de-optimized too many times.
   // instrinsic: Has a hand-written assembly prologue.
   // inlinable: Candidate for inlining. False for functions with features we
   //            don't support during inlining (e.g., optional parameters),
@@ -2772,7 +2900,6 @@
   V(Reflectable, is_reflectable)                                               \
   V(Visible, is_visible)                                                       \
   V(Debuggable, is_debuggable)                                                 \
-  V(Optimizable, is_optimizable)                                               \
   V(Inlinable, is_inlinable)                                                   \
   V(Intrinsic, is_intrinsic)                                                   \
   V(Native, is_native)                                                         \
@@ -2792,6 +2919,17 @@
   FOR_EACH_FUNCTION_KIND_BIT(DEFINE_ACCESSORS)
 #undef DEFINE_ACCESSORS
 
+  // optimizable: Candidate for going through the optimizing compiler. False for
+  //              some functions known to be execute infrequently and functions
+  //              which have been de-optimized too many times.
+  bool is_optimizable() const {
+    return RawFunction::OptimizableBit::decode(raw_ptr()->packed_fields_);
+  }
+  void set_is_optimizable(bool value) const {
+    set_packed_fields(
+        RawFunction::OptimizableBit::update(value, raw_ptr()->packed_fields_));
+  }
+
   // Indicates whether this function can be optimized on the background compiler
   // thread.
   bool is_background_optimizable() const {
@@ -2810,7 +2948,7 @@
 
   enum KindTagBits {
     kKindTagPos = 0,
-    kKindTagSize = 4,
+    kKindTagSize = 5,
     kRecognizedTagPos = kKindTagPos + kKindTagSize,
     kRecognizedTagSize = 9,
     kModifierPos = kRecognizedTagPos + kRecognizedTagSize,
@@ -2970,7 +3108,13 @@
   friend class HeapProfiler;
 };
 
-enum class EntryPointPragma { kAlways, kNever, kGetterOnly, kSetterOnly };
+enum class EntryPointPragma {
+  kAlways,
+  kNever,
+  kGetterOnly,
+  kSetterOnly,
+  kCallOnly
+};
 
 class FfiTrampolineData : public Object {
  public:
@@ -2983,6 +3127,9 @@
   RawType* signature_type() const { return raw_ptr()->signature_type_; }
   void set_signature_type(const Type& value) const;
 
+  RawFunction* c_signature() const { return raw_ptr()->c_signature_; }
+  void set_c_signature(const Function& value) const;
+
   static RawFfiTrampolineData* New();
 
   FINAL_HEAP_OBJECT_IMPLEMENTATION(FfiTrampolineData, Object);
@@ -3049,29 +3196,93 @@
     set_kind_bits(HasPragmaBit::update(value, raw_ptr()->kind_bits_));
   }
 
+  bool is_covariant() const {
+    return CovariantBit::decode(raw_ptr()->kind_bits_);
+  }
+  void set_is_covariant(bool value) const {
+    set_kind_bits(CovariantBit::update(value, raw_ptr()->kind_bits_));
+  }
+
+  bool is_generic_covariant_impl() const {
+    return GenericCovariantImplBit::decode(raw_ptr()->kind_bits_);
+  }
+  void set_is_generic_covariant_impl(bool value) const {
+    set_kind_bits(
+        GenericCovariantImplBit::update(value, raw_ptr()->kind_bits_));
+  }
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+  intptr_t binary_declaration_offset() const {
+    return RawField::BinaryDeclarationOffset::decode(
+        raw_ptr()->binary_declaration_);
+  }
+  void set_binary_declaration_offset(intptr_t value) const {
+    ASSERT(value >= 0);
+    StoreNonPointer(&raw_ptr()->binary_declaration_,
+                    RawField::BinaryDeclarationOffset::update(
+                        value, raw_ptr()->binary_declaration_));
+  }
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
+
   intptr_t kernel_offset() const {
 #if defined(DART_PRECOMPILED_RUNTIME)
     return 0;
 #else
-    return raw_ptr()->kernel_offset_;
+    ASSERT(!is_declared_in_bytecode());
+    return binary_declaration_offset();
 #endif
   }
 
-  void set_kernel_offset(intptr_t offset) const {
-#if !defined(DART_PRECOMPILED_RUNTIME)
-    StoreNonPointer(&raw_ptr()->kernel_offset_, offset);
+  void set_kernel_offset(intptr_t value) const {
+#if defined(DART_PRECOMPILED_RUNTIME)
+    UNREACHABLE();
+#else
+    ASSERT(!is_declared_in_bytecode());
+    set_binary_declaration_offset(value);
 #endif
   }
 
+  intptr_t bytecode_offset() const {
+#if defined(DART_PRECOMPILED_RUNTIME)
+    return 0;
+#else
+    ASSERT(is_declared_in_bytecode());
+    return binary_declaration_offset();
+#endif
+  }
+
+  void set_bytecode_offset(intptr_t value) const {
+#if defined(DART_PRECOMPILED_RUNTIME)
+    UNREACHABLE();
+#else
+    ASSERT(is_declared_in_bytecode());
+    set_binary_declaration_offset(value);
+#endif
+  }
+
+  bool is_declared_in_bytecode() const {
+#if defined(DART_PRECOMPILED_RUNTIME)
+    return false;
+#else
+    return RawField::IsDeclaredInBytecode::decode(
+        raw_ptr()->binary_declaration_);
+#endif
+  }
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+  void set_is_declared_in_bytecode(bool value) const {
+    StoreNonPointer(&raw_ptr()->binary_declaration_,
+                    RawField::IsDeclaredInBytecode::update(
+                        value, raw_ptr()->binary_declaration_));
+  }
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
+
+  void InheritBinaryDeclarationFrom(const Field& src) const;
+
   RawExternalTypedData* KernelData() const;
 
   intptr_t KernelDataProgramOffset() const;
 
-#if !defined(DART_PRECOMPILED_RUNTIME)
-  void GetCovarianceAttributes(bool* is_covariant,
-                               bool* is_generic_covariant) const;
-#endif
-
   inline intptr_t Offset() const;
   // Called during class finalization.
   inline void SetOffset(intptr_t offset_in_bytes) const;
@@ -3221,7 +3432,7 @@
   // Returns false if any value read from this field is guaranteed to be
   // not null.
   // Internally we is_nullable_ field contains either kNullCid (nullable) or
-  // any other value (non-nullable) instead of boolean. This is done to simplify
+  // kInvalidCid (non-nullable) instead of boolean. This is done to simplify
   // guarding sequence in the generated code.
   bool is_nullable() const { return raw_ptr()->is_nullable_ == kNullCid; }
   void set_is_nullable(bool val) const {
@@ -3257,11 +3468,18 @@
 
   bool IsUninitialized() const;
 
-  DART_WARN_UNUSED_RESULT RawError* EvaluateInitializer() const;
+  // Run initializer and set field value.
+  DART_WARN_UNUSED_RESULT RawError* Initialize() const;
 
-  RawFunction* Initializer() const { return raw_ptr()->initializer_; }
-  void SetInitializer(const Function& initializer) const;
-  bool HasInitializer() const;
+  // Run initializer only.
+  DART_WARN_UNUSED_RESULT RawObject* EvaluateInitializer() const;
+
+  RawFunction* EnsureInitializerFunction() const;
+  RawFunction* InitializerFunction() const {
+    return raw_ptr()->initializer_function_;
+  }
+  void SetInitializerFunction(const Function& initializer) const;
+  bool HasInitializerFunction() const;
 
   // For static fields only. Constructs a closure that gets/sets the
   // field value.
@@ -3280,8 +3498,10 @@
   static RawString* LookupSetterSymbol(const String& field_name);
   static RawString* NameFromGetter(const String& getter_name);
   static RawString* NameFromSetter(const String& setter_name);
+  static RawString* NameFromInit(const String& init_name);
   static bool IsGetterName(const String& function_name);
   static bool IsSetterName(const String& function_name);
+  static bool IsInitName(const String& function_name);
 
  private:
   static void InitializeNew(const Field& result,
@@ -3293,6 +3513,7 @@
                             const Object& owner,
                             TokenPosition token_pos,
                             TokenPosition end_token_pos);
+  friend class Interpreter;              // Access to bit field.
   friend class StoreInstanceFieldInstr;  // Generated code access to bit field.
 
   enum {
@@ -3305,6 +3526,8 @@
     kDoubleInitializedBit,
     kInitializerChangedAfterInitializatonBit,
     kHasPragmaBit,
+    kCovariantBit,
+    kGenericCovariantImplBit,
   };
   class ConstBit : public BitField<uint16_t, bool, kConstBit, 1> {};
   class StaticBit : public BitField<uint16_t, bool, kStaticBit, 1> {};
@@ -3322,6 +3545,9 @@
                         kInitializerChangedAfterInitializatonBit,
                         1> {};
   class HasPragmaBit : public BitField<uint16_t, bool, kHasPragmaBit, 1> {};
+  class CovariantBit : public BitField<uint16_t, bool, kCovariantBit, 1> {};
+  class GenericCovariantImplBit
+      : public BitField<uint16_t, bool, kGenericCovariantImplBit, 1> {};
 
   // Update guarded cid and guarded length for this field. Returns true, if
   // deoptimization of dependent code is required.
@@ -3376,6 +3602,8 @@
   RawString* resolved_url() const { return raw_ptr()->resolved_url_; }
   bool HasSource() const;
   RawString* Source() const;
+  bool IsPartOfDartColonLibrary() const;
+
   RawGrowableObjectArray* GenerateLineNumberArray() const;
   RawScript::Kind kind() const {
     return static_cast<RawScript::Kind>(raw_ptr()->kind_);
@@ -3452,6 +3680,11 @@
                         const String& source,
                         RawScript::Kind kind);
 
+#if !defined(DART_PRECOMPILED_RUNTIME)
+  void LoadSourceFromKernel(const uint8_t* kernel_buffer,
+                            intptr_t kernel_buffer_len) const;
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
+
  private:
   void set_resolved_url(const String& value) const;
   void set_source(const String& value) const;
@@ -3604,6 +3837,13 @@
   RawFunction* LookupFunctionAllowPrivate(const String& name) const;
   RawFunction* LookupLocalFunction(const String& name) const;
   RawLibraryPrefix* LookupLocalLibraryPrefix(const String& name) const;
+
+  // Look up a Script based on a url. If 'useResolvedUri' is not provided or is
+  // false, 'url' should have a 'dart:' scheme for Dart core libraries,
+  // a 'package:' scheme for packages, and 'file:' scheme otherwise.
+  //
+  // If 'useResolvedUri' is true, 'url' should have a 'org-dartlang-sdk:' scheme
+  // for Dart core libraries and a 'file:' scheme otherwise.
   RawScript* LookupScript(const String& url, bool useResolvedUri = false) const;
   RawArray* LoadedScripts() const;
 
@@ -3623,16 +3863,18 @@
   void AddClassMetadata(const Class& cls,
                         const Object& tl_owner,
                         TokenPosition token_pos,
-                        intptr_t kernel_offset = 0) const;
+                        intptr_t kernel_offset) const;
   void AddFieldMetadata(const Field& field,
                         TokenPosition token_pos,
-                        intptr_t kernel_offset = 0) const;
+                        intptr_t kernel_offset,
+                        intptr_t bytecode_offset) const;
   void AddFunctionMetadata(const Function& func,
                            TokenPosition token_pos,
-                           intptr_t kernel_offset = 0) const;
+                           intptr_t kernel_offset,
+                           intptr_t bytecode_offset) const;
   void AddLibraryMetadata(const Object& tl_owner,
                           TokenPosition token_pos,
-                          intptr_t kernel_offset = 0) const;
+                          intptr_t kernel_offset) const;
   void AddTypeParameterMetadata(const TypeParameter& param,
                                 TokenPosition token_pos) const;
   void CloneMetadataFrom(const Library& from_library,
@@ -3655,8 +3897,8 @@
   RawClass* toplevel_class() const { return raw_ptr()->toplevel_class_; }
   void set_toplevel_class(const Class& value) const;
 
-  RawGrowableObjectArray* patch_classes() const {
-    return raw_ptr()->patch_classes_;
+  RawGrowableObjectArray* owned_scripts() const {
+    return raw_ptr()->owned_scripts_;
   }
 
   // Library imports.
@@ -3844,7 +4086,8 @@
   void AddMetadata(const Object& owner,
                    const String& name,
                    TokenPosition token_pos,
-                   intptr_t kernel_offset = 0) const;
+                   intptr_t kernel_offset,
+                   intptr_t bytecode_offset) const;
 
   FINAL_HEAP_OBJECT_IMPLEMENTATION(Library, Object);
 
@@ -4636,6 +4879,7 @@
 
 class Code : public Object {
  public:
+  // When dual mapping, this returns the executable view.
   RawInstructions* active_instructions() const {
 #if defined(DART_PRECOMPILED_RUNTIME)
     UNREACHABLE();
@@ -4645,6 +4889,7 @@
 #endif
   }
 
+  // When dual mapping, these return the executable view.
   RawInstructions* instructions() const { return raw_ptr()->instructions_; }
   static RawInstructions* InstructionsOf(const RawCode* code) {
     return code->ptr()->instructions_;
@@ -4970,18 +5215,34 @@
   // then a new [ObjectPool] will be attached to the code object as well.
   // Otherwise the caller is responsible for doing this via
   // `Object::set_object_pool()`.
-  static RawCode* FinalizeCode(const Function& function,
-                               FlowGraphCompiler* compiler,
-                               compiler::Assembler* assembler,
-                               PoolAttachment pool_attachment,
-                               bool optimized = false,
-                               CodeStatistics* stats = nullptr);
-  static RawCode* FinalizeCode(const char* name,
-                               FlowGraphCompiler* compiler,
+  static RawCode* FinalizeCode(FlowGraphCompiler* compiler,
                                compiler::Assembler* assembler,
                                PoolAttachment pool_attachment,
                                bool optimized,
-                               CodeStatistics* stats = nullptr);
+                               CodeStatistics* stats);
+
+  // Notifies all active [CodeObserver]s.
+  static void NotifyCodeObservers(const Function& function,
+                                  const Code& code,
+                                  bool optimized);
+  static void NotifyCodeObservers(const char* name,
+                                  const Code& code,
+                                  bool optimized);
+
+  // Calls [FinalizeCode] and also notifies [CodeObserver]s.
+  static RawCode* FinalizeCodeAndNotify(const Function& function,
+                                        FlowGraphCompiler* compiler,
+                                        compiler::Assembler* assembler,
+                                        PoolAttachment pool_attachment,
+                                        bool optimized = false,
+                                        CodeStatistics* stats = nullptr);
+  static RawCode* FinalizeCodeAndNotify(const char* name,
+                                        FlowGraphCompiler* compiler,
+                                        compiler::Assembler* assembler,
+                                        PoolAttachment pool_attachment,
+                                        bool optimized = false,
+                                        CodeStatistics* stats = nullptr);
+
 #endif
   static RawCode* LookupCode(uword pc);
   static RawCode* LookupCodeInVmIsolate(uword pc);
@@ -5109,6 +5370,7 @@
 
   FINAL_HEAP_OBJECT_IMPLEMENTATION(Code, Object);
   friend class Class;
+  friend class CodeTestHelper;
   friend class SnapshotWriter;
   friend class StubCode;     // for set_object_pool
   friend class Precompiler;  // for set_object_pool
@@ -5168,12 +5430,10 @@
   static intptr_t InstanceSize() {
     return RoundedAllocationSize(sizeof(RawBytecode));
   }
-#if !defined(DART_PRECOMPILED_RUNTIME)
   static RawBytecode* New(uword instructions,
                           intptr_t instructions_size,
                           intptr_t instructions_offset,
                           const ObjectPool& object_pool);
-#endif
 
   RawExternalTypedData* GetBinary(Zone* zone) const;
 
@@ -5249,6 +5509,9 @@
   static intptr_t num_variables_offset() {
     return OFFSET_OF(RawContext, num_variables_);
   }
+  static intptr_t NumVariables(const RawContext* context) {
+    return context->ptr()->num_variables_;
+  }
 
   RawObject* At(intptr_t context_index) const {
     return *ObjectAddr(context_index);
@@ -6512,11 +6775,14 @@
 class TypeParameter : public AbstractType {
  public:
   virtual bool IsFinalized() const {
-    ASSERT(raw_ptr()->type_state_ != RawTypeParameter::kFinalizedInstantiated);
-    return raw_ptr()->type_state_ == RawTypeParameter::kFinalizedUninstantiated;
+    return RawTypeParameter::FinalizedBit::decode(raw_ptr()->flags_);
   }
   virtual void SetIsFinalized() const;
   virtual bool IsBeingFinalized() const { return false; }
+  bool IsGenericCovariantImpl() const {
+    return RawTypeParameter::GenericCovariantImplBit::decode(raw_ptr()->flags_);
+  }
+  void SetGenericCovariantImpl(bool value) const;
   virtual bool HasTypeClass() const { return false; }
   virtual classid_t type_class_id() const { return kIllegalCid; }
   classid_t parameterized_class_id() const;
@@ -6568,6 +6834,7 @@
                                intptr_t index,
                                const String& name,
                                const AbstractType& bound,
+                               bool is_generic_covariant_impl,
                                TokenPosition token_pos);
 
  private:
@@ -6578,7 +6845,7 @@
   void set_parameterized_function(const Function& value) const;
   void set_name(const String& value) const;
   void set_token_pos(TokenPosition token_pos) const;
-  void set_type_state(int8_t state) const;
+  void set_flags(uint8_t flags) const;
 
   static RawTypeParameter* New();
 
@@ -6688,7 +6955,7 @@
   static const intptr_t kMaxValue = kSmiMax;
   static const intptr_t kMinValue = kSmiMin;
 
-  intptr_t Value() const { return ValueFromRaw(raw_value()); }
+  intptr_t Value() const { return ValueFromRawSmi(raw()); }
 
   virtual bool Equals(const Instance& other) const;
   virtual bool IsZero() const { return Value() == 0; }
@@ -6705,9 +6972,10 @@
   static intptr_t InstanceSize() { return 0; }
 
   static RawSmi* New(intptr_t value) {
-    intptr_t raw_smi = (value << kSmiTagShift) | kSmiTag;
-    ASSERT(ValueFromRaw(raw_smi) == value);
-    return reinterpret_cast<RawSmi*>(raw_smi);
+    RawSmi* raw_smi =
+        reinterpret_cast<RawSmi*>((value << kSmiTagShift) | kSmiTag);
+    ASSERT(ValueFromRawSmi(raw_smi) == value);
+    return raw_smi;
   }
 
   static RawSmi* FromAlignedAddress(uword address) {
@@ -6718,7 +6986,7 @@
   static RawClass* Class();
 
   static intptr_t Value(const RawSmi* raw_smi) {
-    return ValueFromRaw(reinterpret_cast<uword>(raw_smi));
+    return ValueFromRawSmi(raw_smi);
   }
 
   static intptr_t RawValue(intptr_t value) {
@@ -6744,12 +7012,6 @@
     return -kWordSize;
   }
 
-  static intptr_t ValueFromRaw(uword raw_value) {
-    intptr_t value = raw_value;
-    ASSERT((value & kSmiTagMask) == kSmiTag);
-    return (value >> kSmiTagShift);
-  }
-
   static cpp_vtable handle_vtable_;
 
   Smi() : Integer() {}
@@ -6981,6 +7243,7 @@
   intptr_t CompareTo(const String& other) const;
 
   bool StartsWith(const String& other) const;
+  bool EndsWith(const String& other) const;
 
   // Strings are canonicalized using the symbol table.
   virtual RawInstance* CheckAndCanonicalize(Thread* thread,
@@ -7672,6 +7935,11 @@
   // architecture.
   static const intptr_t kHashBits = 30;
 
+  // Returns `true` if we use card marking for arrays of length [array_length].
+  static bool UseCardMarkingForAllocation(const intptr_t array_length) {
+    return Array::InstanceSize(array_length) > Heap::kNewAllocatableSize;
+  }
+
   intptr_t Length() const { return LengthOf(raw()); }
   static intptr_t LengthOf(const RawArray* array) {
     return Smi::Value(array->ptr()->length_);
@@ -8069,33 +8337,87 @@
   friend class Class;
 };
 
-class TypedData : public Instance {
+class TypedDataBase : public Instance {
  public:
-  // We use 30 bits for the hash code so hashes in a snapshot taken on a
-  // 64-bit architecture stay in Smi range when loaded on a 32-bit
-  // architecture.
-  static const intptr_t kHashBits = 30;
+  static intptr_t length_offset() {
+    return OFFSET_OF(RawTypedDataBase, length_);
+  }
+
+  static intptr_t data_field_offset() {
+    return OFFSET_OF(RawTypedDataBase, data_);
+  }
+
+  RawSmi* length() const { return raw_ptr()->length_; }
 
   intptr_t Length() const {
     ASSERT(!IsNull());
     return Smi::Value(raw_ptr()->length_);
   }
 
-  intptr_t ElementSizeInBytes() const {
-    intptr_t cid = raw()->GetClassId();
-    return ElementSizeInBytes(cid);
+  intptr_t LengthInBytes() const {
+    return ElementSizeInBytes(raw()->GetClassId()) * Length();
   }
 
   TypedDataElementType ElementType() const {
-    intptr_t cid = raw()->GetClassId();
-    return ElementType(cid);
+    return ElementType(raw()->GetClassId());
   }
 
-  intptr_t LengthInBytes() const {
-    intptr_t cid = raw()->GetClassId();
-    return (ElementSizeInBytes(cid) * Length());
+  intptr_t ElementSizeInBytes() const {
+    return element_size(ElementType(raw()->GetClassId()));
   }
 
+  static intptr_t ElementSizeInBytes(classid_t cid) {
+    return element_size(ElementType(cid));
+  }
+
+  static TypedDataElementType ElementType(classid_t cid) {
+    if (cid == kByteDataViewCid) {
+      return kUint8ArrayElement;
+    } else if (RawObject::IsTypedDataClassId(cid)) {
+      const intptr_t index =
+          (cid - kTypedDataInt8ArrayCid - kTypedDataCidRemainderInternal) / 3;
+      return static_cast<TypedDataElementType>(index);
+    } else if (RawObject::IsTypedDataViewClassId(cid)) {
+      const intptr_t index =
+          (cid - kTypedDataInt8ArrayCid - kTypedDataCidRemainderView) / 3;
+      return static_cast<TypedDataElementType>(index);
+    } else {
+      ASSERT(RawObject::IsExternalTypedDataClassId(cid));
+      const intptr_t index =
+          (cid - kTypedDataInt8ArrayCid - kTypedDataCidRemainderExternal) / 3;
+      return static_cast<TypedDataElementType>(index);
+    }
+  }
+
+ protected:
+  void SetLength(intptr_t value) const {
+    ASSERT(value <= Smi::kMaxValue);
+    StoreSmi(&raw_ptr()->length_, Smi::New(value));
+  }
+
+ private:
+  friend class Class;
+
+  static intptr_t element_size(intptr_t index) {
+    ASSERT(0 <= index && index < kNumElementSizes);
+    intptr_t size = element_size_table[index];
+    ASSERT(size != 0);
+    return size;
+  }
+  static const intptr_t kNumElementSizes =
+      (kTypedDataFloat64x2ArrayCid - kTypedDataInt8ArrayCid) / 3 + 1;
+  static const intptr_t element_size_table[kNumElementSizes];
+
+  HEAP_OBJECT_IMPLEMENTATION(TypedDataBase, Instance);
+};
+
+class TypedData : public TypedDataBase {
+ public:
+  // We use 30 bits for the hash code so hashes in a snapshot taken on a
+  // 64-bit architecture stay in Smi range when loaded on a 32-bit
+  // architecture.
+  static const intptr_t kHashBits = 30;
+
   void* DataAddr(intptr_t byte_offset) const {
     ASSERT((byte_offset == 0) ||
            ((byte_offset > 0) && (byte_offset < LengthInBytes())));
@@ -8134,15 +8456,11 @@
 
 #undef TYPED_GETTER_SETTER
 
-  static intptr_t length_offset() { return OFFSET_OF(RawTypedData, length_); }
-
-  static intptr_t data_offset() {
-    return OFFSET_OF_RETURNED_VALUE(RawTypedData, data);
-  }
+  static intptr_t data_offset() { return RawTypedData::payload_offset(); }
 
   static intptr_t InstanceSize() {
     ASSERT(sizeof(RawTypedData) ==
-           OFFSET_OF_RETURNED_VALUE(RawTypedData, data));
+           OFFSET_OF_RETURNED_VALUE(RawTypedData, internal_data));
     return 0;
   }
 
@@ -8151,16 +8469,6 @@
     return RoundedAllocationSize(sizeof(RawTypedData) + lengthInBytes);
   }
 
-  static intptr_t ElementSizeInBytes(intptr_t class_id) {
-    ASSERT(RawObject::IsTypedDataClassId(class_id));
-    return element_size(ElementType(class_id));
-  }
-
-  static TypedDataElementType ElementType(intptr_t class_id) {
-    ASSERT(RawObject::IsTypedDataClassId(class_id));
-    return static_cast<TypedDataElementType>(class_id - kTypedDataInt8ArrayCid);
-  }
-
   static intptr_t MaxElements(intptr_t class_id) {
     ASSERT(RawObject::IsTypedDataClassId(class_id));
     return (kSmiMax / ElementSizeInBytes(class_id));
@@ -8230,9 +8538,7 @@
   }
 
  protected:
-  void SetLength(intptr_t value) const {
-    StoreSmi(&raw_ptr()->length_, Smi::New(value));
-  }
+  void RecomputeDataField() { raw()->RecomputeDataField(); }
 
  private:
   // Provides const access to non-pointer, non-aligned data within the object.
@@ -8247,48 +8553,18 @@
                                               byte_offset);
   }
 
-  static intptr_t element_size(intptr_t index) {
-    ASSERT(0 <= index && index < kNumElementSizes);
-    intptr_t size = element_size_table[index];
-    ASSERT(size != 0);
-    return size;
-  }
-  static const intptr_t kNumElementSizes =
-      kTypedDataFloat64x2ArrayCid - kTypedDataInt8ArrayCid + 1;
-  static const intptr_t element_size_table[kNumElementSizes];
-
-  FINAL_HEAP_OBJECT_IMPLEMENTATION(TypedData, Instance);
+  FINAL_HEAP_OBJECT_IMPLEMENTATION(TypedData, TypedDataBase);
   friend class Class;
   friend class ExternalTypedData;
   friend class TypedDataView;
 };
 
-class ExternalTypedData : public Instance {
+class ExternalTypedData : public TypedDataBase {
  public:
   // Alignment of data when serializing ExternalTypedData in a clustered
   // snapshot. Should be independent of word size.
   static const int kDataSerializationAlignment = 8;
 
-  intptr_t Length() const {
-    ASSERT(!IsNull());
-    return Smi::Value(raw_ptr()->length_);
-  }
-
-  intptr_t ElementSizeInBytes() const {
-    intptr_t cid = raw()->GetClassId();
-    return ElementSizeInBytes(cid);
-  }
-
-  TypedDataElementType ElementType() const {
-    intptr_t cid = raw()->GetClassId();
-    return ElementType(cid);
-  }
-
-  intptr_t LengthInBytes() const {
-    intptr_t cid = raw()->GetClassId();
-    return (ElementSizeInBytes(cid) * Length());
-  }
-
   void* DataAddr(intptr_t byte_offset) const {
     ASSERT((byte_offset == 0) ||
            ((byte_offset > 0) && (byte_offset < LengthInBytes())));
@@ -8323,10 +8599,6 @@
       Dart_WeakPersistentHandleFinalizer callback,
       intptr_t external_size) const;
 
-  static intptr_t length_offset() {
-    return OFFSET_OF(RawExternalTypedData, length_);
-  }
-
   static intptr_t data_offset() {
     return OFFSET_OF(RawExternalTypedData, data_);
   }
@@ -8335,17 +8607,6 @@
     return RoundedAllocationSize(sizeof(RawExternalTypedData));
   }
 
-  static intptr_t ElementSizeInBytes(intptr_t class_id) {
-    ASSERT(RawObject::IsExternalTypedDataClassId(class_id));
-    return TypedData::element_size(ElementType(class_id));
-  }
-
-  static TypedDataElementType ElementType(intptr_t class_id) {
-    ASSERT(RawObject::IsExternalTypedDataClassId(class_id));
-    return static_cast<TypedDataElementType>(class_id -
-                                             kExternalTypedDataInt8ArrayCid);
-  }
-
   static intptr_t MaxElements(intptr_t class_id) {
     ASSERT(RawObject::IsExternalTypedDataClassId(class_id));
     return (kSmiMax / ElementSizeInBytes(class_id));
@@ -8364,6 +8625,7 @@
 
  protected:
   void SetLength(intptr_t value) const {
+    ASSERT(value <= Smi::kMaxValue);
     StoreSmi(&raw_ptr()->length_, Smi::New(value));
   }
 
@@ -8374,67 +8636,80 @@
   }
 
  private:
-  FINAL_HEAP_OBJECT_IMPLEMENTATION(ExternalTypedData, Instance);
+  FINAL_HEAP_OBJECT_IMPLEMENTATION(ExternalTypedData, TypedDataBase);
   friend class Class;
 };
 
-class TypedDataView : public AllStatic {
+class TypedDataView : public TypedDataBase {
  public:
-  static intptr_t ElementSizeInBytes(const Instance& view_obj) {
-    ASSERT(!view_obj.IsNull());
-    intptr_t cid = view_obj.raw()->GetClassId();
-    return ElementSizeInBytes(cid);
+  static RawTypedDataView* New(intptr_t class_id,
+                               Heap::Space space = Heap::kNew);
+  static RawTypedDataView* New(intptr_t class_id,
+                               const TypedDataBase& typed_data,
+                               intptr_t offset_in_bytes,
+                               intptr_t length,
+                               Heap::Space space = Heap::kNew);
+
+  static intptr_t InstanceSize() {
+    return RoundedAllocationSize(sizeof(RawTypedDataView));
   }
 
-  static RawInstance* Data(const Instance& view_obj) {
-    ASSERT(!view_obj.IsNull());
-    return *reinterpret_cast<RawInstance* const*>(view_obj.raw_ptr() +
-                                                  kDataOffset);
+  static RawInstance* Data(const TypedDataView& view) {
+    return view.typed_data();
   }
 
-  static RawSmi* OffsetInBytes(const Instance& view_obj) {
-    ASSERT(!view_obj.IsNull());
-    return *reinterpret_cast<RawSmi* const*>(view_obj.raw_ptr() +
-                                             kOffsetInBytesOffset);
+  static RawSmi* OffsetInBytes(const TypedDataView& view) {
+    return view.offset_in_bytes();
   }
 
-  static RawSmi* Length(const Instance& view_obj) {
-    ASSERT(!view_obj.IsNull());
-    return *reinterpret_cast<RawSmi* const*>(view_obj.raw_ptr() +
-                                             kLengthOffset);
-  }
-
-  static bool IsExternalTypedDataView(const Instance& view_obj) {
-    const Instance& data = Instance::Handle(Data(view_obj));
+  static bool IsExternalTypedDataView(const TypedDataView& view_obj) {
+    const auto& data = Instance::Handle(Data(view_obj));
     intptr_t cid = data.raw()->GetClassId();
     ASSERT(RawObject::IsTypedDataClassId(cid) ||
            RawObject::IsExternalTypedDataClassId(cid));
     return RawObject::IsExternalTypedDataClassId(cid);
   }
 
-  static intptr_t NumberOfFields() { return kLengthOffset; }
-
-  static intptr_t data_offset() { return kWordSize * kDataOffset; }
+  static intptr_t data_offset() {
+    return OFFSET_OF(RawTypedDataView, typed_data_);
+  }
 
   static intptr_t offset_in_bytes_offset() {
-    return kWordSize * kOffsetInBytesOffset;
+    return OFFSET_OF(RawTypedDataView, offset_in_bytes_);
   }
 
-  static intptr_t length_offset() { return kWordSize * kLengthOffset; }
+  RawInstance* typed_data() const { return raw_ptr()->typed_data_; }
 
-  static intptr_t ElementSizeInBytes(intptr_t class_id) {
-    ASSERT(RawObject::IsTypedDataViewClassId(class_id));
-    return (class_id == kByteDataViewCid)
-               ? 1
-               : TypedData::element_size(class_id - kTypedDataInt8ArrayViewCid);
+  void InitializeWith(const TypedDataBase& typed_data,
+                      intptr_t offset_in_bytes,
+                      intptr_t length) {
+    const classid_t cid = typed_data.GetClassId();
+    ASSERT(RawObject::IsTypedDataClassId(cid) ||
+           RawObject::IsExternalTypedDataClassId(cid));
+    StorePointer(&raw_ptr()->typed_data_, typed_data.raw());
+    StoreSmi(&raw_ptr()->length_, Smi::New(length));
+    StoreSmi(&raw_ptr()->offset_in_bytes_, Smi::New(offset_in_bytes));
+
+    // Update the inner pointer.
+    RecomputeDataField();
   }
 
+  RawSmi* offset_in_bytes() const { return raw_ptr()->offset_in_bytes_; }
+
  private:
-  enum {
-    kDataOffset = 1,
-    kOffsetInBytesOffset = 2,
-    kLengthOffset = 3,
-  };
+  void RecomputeDataField() { raw()->RecomputeDataField(); }
+
+  void Clear() {
+    StoreSmi(&raw_ptr()->length_, Smi::New(0));
+    StoreSmi(&raw_ptr()->offset_in_bytes_, Smi::New(0));
+    StoreNonPointer(&raw_ptr()->data_, nullptr);
+    StorePointer(&raw_ptr()->typed_data_,
+                 TypedDataBase::RawCast(Object::null()));
+  }
+
+  FINAL_HEAP_OBJECT_IMPLEMENTATION(TypedDataView, TypedDataBase);
+  friend class Class;
+  friend class TypedDataViewDeserializationCluster;
 };
 
 class ByteBuffer : public AllStatic {
@@ -8458,7 +8733,7 @@
 class Pointer : public Instance {
  public:
   static RawPointer* New(const AbstractType& type_arg,
-                         uint8_t* c_memory_address,
+                         const Integer& c_memory_address,
                          intptr_t class_id = kFfiPointerCid,
                          Heap::Space space = Heap::kNew);
 
@@ -8468,20 +8743,17 @@
 
   static bool IsPointer(const Instance& obj);
 
-  uint8_t* GetCMemoryAddress() const {
-    ASSERT(!IsNull());
-    return raw_ptr()->c_memory_address_;
-  }
+  RawInteger* GetCMemoryAddress() const { return raw_ptr()->c_memory_address_; }
 
-  void SetCMemoryAddress(uint8_t* value) const {
-    StoreNonPointer(&raw_ptr()->c_memory_address_, value);
+  void SetCMemoryAddress(const Integer& value) const {
+    StorePointer(&raw_ptr()->c_memory_address_, value.raw());
   }
 
   static intptr_t type_arguments_offset() {
     return OFFSET_OF(RawPointer, type_arguments_);
   }
 
-  static intptr_t address_offset() {
+  static intptr_t c_memory_address_offset() {
     return OFFSET_OF(RawPointer, c_memory_address_);
   }
 
@@ -8842,7 +9114,7 @@
   // kSimple: A simple pattern to match against, using string indexOf operation.
   // kComplex: A complex pattern to match.
   enum RegExType {
-    kUnitialized = 0,
+    kUninitialized = 0,
     kSimple = 1,
     kComplex = 2,
   };
@@ -8866,7 +9138,7 @@
   class TypeBits : public BitField<int8_t, RegExType, kTypePos, kTypeSize> {};
   class FlagsBits : public BitField<int8_t, intptr_t, kFlagsPos, kFlagsSize> {};
 
-  bool is_initialized() const { return (type() != kUnitialized); }
+  bool is_initialized() const { return (type() != kUninitialized); }
   bool is_simple() const { return (type() == kSimple); }
   bool is_complex() const { return (type() == kComplex); }
 
@@ -8880,6 +9152,7 @@
   RawSmi* num_bracket_expressions() const {
     return raw_ptr()->num_bracket_expressions_;
   }
+  RawArray* capture_name_map() const { return raw_ptr()->capture_name_map_; }
 
   RawTypedData* bytecode(bool is_one_byte, bool sticky) const {
     if (sticky) {
@@ -8936,6 +9209,7 @@
                     const TypedData& bytecode) const;
 
   void set_num_bracket_expressions(intptr_t value) const;
+  void set_capture_name_map(const Array& array) const;
   void set_is_global() const { set_flags(flags() | kGlobal); }
   void set_is_ignore_case() const { set_flags(flags() | kIgnoreCase); }
   void set_is_multi_line() const { set_flags(flags() | kMultiLine); }
@@ -9102,8 +9376,12 @@
     Isolate* isolate = Isolate::Current();
     Heap* isolate_heap = isolate->heap();
     Heap* vm_isolate_heap = Dart::vm_isolate()->heap();
-    ASSERT(isolate_heap->Contains(RawObject::ToAddr(raw_)) ||
-           vm_isolate_heap->Contains(RawObject::ToAddr(raw_)));
+    uword addr = RawObject::ToAddr(raw_);
+    if (!isolate_heap->Contains(addr) && !vm_isolate_heap->Contains(addr)) {
+      ASSERT(FLAG_write_protect_code);
+      addr = RawObject::ToAddr(HeapPage::ToWritable(raw_));
+      ASSERT(isolate_heap->Contains(addr) || vm_isolate_heap->Contains(addr));
+    }
   }
 #endif
 }
@@ -9316,7 +9594,6 @@
    public:
     TupleView(const Array& array, intptr_t index)
         : array_(array), index_(index) {
-      ASSERT(!array.IsNull());
     }
 
     template <EnumType kElement>
@@ -9364,6 +9641,7 @@
   };
 
   explicit ArrayOfTuplesView(const Array& array) : array_(array), index_(-1) {
+    ASSERT(!array.IsNull());
     ASSERT(array.Length() >= kStartOffset);
     ASSERT((array.Length() - kStartOffset) % EntrySize == kStartOffset);
   }
@@ -9414,7 +9692,7 @@
                                       Object* reusable_object_handle);
 
 DART_WARN_UNUSED_RESULT
-RawError* EntryPointClosurizationError(const String& getter_name);
+RawError* EntryPointFieldInvocationError(const String& getter_name);
 
 }  // namespace dart
 
diff --git a/runtime/vm/object_graph.cc b/runtime/vm/object_graph.cc
index 6b7cda3..32d9b09 100644
--- a/runtime/vm/object_graph.cc
+++ b/runtime/vm/object_graph.cc
@@ -38,13 +38,18 @@
         data_(kInitialCapacity) {}
 
   // Marks and pushes. Used to initialize this stack with roots.
+  // We can use ObjectIdTable normally used by serializers because it
+  // won't be in use while handling a service request (ObjectGraph's only use).
   virtual void VisitPointers(RawObject** first, RawObject** last) {
+    Heap* heap = isolate()->heap();
     for (RawObject** current = first; current <= last; ++current) {
-      if ((*current)->IsHeapObject() && !(*current)->IsGraphMarked()) {
+      if ((*current)->IsHeapObject() &&
+          !(*current)->InVMIsolateHeap() &&
+          heap->GetObjectId(*current) == 0) {  // not visited yet
         if (!include_vm_objects_ && !IsUserClass((*current)->GetClassId())) {
           continue;
         }
-        (*current)->SetGraphMarked();
+        heap->SetObjectId(*current, 1);
         Node node;
         node.ptr = current;
         node.obj = *current;
@@ -69,16 +74,15 @@
       sentinel.ptr = kSentinel;
       data_.Add(sentinel);
       StackIterator it(this, data_.length() - 2);
-      switch (visitor->VisitObject(&it)) {
-        case ObjectGraph::Visitor::kProceed:
-          obj->VisitPointers(this);
-          break;
-        case ObjectGraph::Visitor::kBacktrack:
-          break;
-        case ObjectGraph::Visitor::kAbort:
-          return;
+      Visitor::Direction direction = visitor->VisitObject(&it);
+      if (direction == ObjectGraph::Visitor::kAbort) {
+        break;
+      }
+      if (direction == ObjectGraph::Visitor::kProceed) {
+        obj->VisitPointers(this);
       }
     }
+    isolate()->heap()->ResetObjectIdTable();
   }
 
   bool include_vm_objects_;
@@ -146,25 +150,6 @@
   }
 }
 
-class Unmarker : public ObjectVisitor {
- public:
-  Unmarker() {}
-
-  void VisitObject(RawObject* obj) {
-    if (obj->IsGraphMarked()) {
-      obj->ClearGraphMarked();
-    }
-  }
-
-  static void UnmarkAll(Isolate* isolate) {
-    Unmarker unmarker;
-    isolate->heap()->VisitObjectsNoImagePages(&unmarker);
-  }
-
- private:
-  DISALLOW_COPY_AND_ASSIGN(Unmarker);
-};
-
 static void IterateUserFields(ObjectPointerVisitor* visitor) {
   Thread* thread = Thread::Current();
   // Scope to prevent handles create here from appearing as stack references.
@@ -211,7 +196,6 @@
   Stack stack(isolate());
   isolate()->VisitObjectPointers(&stack, ValidationPolicy::kDontValidateFrames);
   stack.TraverseGraph(visitor);
-  Unmarker::UnmarkAll(isolate());
 }
 
 void ObjectGraph::IterateUserObjects(ObjectGraph::Visitor* visitor) {
@@ -219,7 +203,6 @@
   IterateUserFields(&stack);
   stack.include_vm_objects_ = false;
   stack.TraverseGraph(visitor);
-  Unmarker::UnmarkAll(isolate());
 }
 
 void ObjectGraph::IterateObjectsFrom(const Object& root,
@@ -228,7 +211,6 @@
   RawObject* root_raw = root.raw();
   stack.VisitPointer(&root_raw);
   stack.TraverseGraph(visitor);
-  Unmarker::UnmarkAll(isolate());
 }
 
 class InstanceAccumulator : public ObjectVisitor {
@@ -259,7 +241,6 @@
   iteration.IterateObjectsNoImagePages(&accumulator);
 
   stack.TraverseGraph(visitor);
-  Unmarker::UnmarkAll(isolate());
 }
 
 class SizeVisitor : public ObjectGraph::Visitor {
@@ -532,7 +513,7 @@
   virtual void VisitPointers(RawObject** first, RawObject** last) {
     for (RawObject** current = first; current <= last; ++current) {
       RawObject* object = *current;
-      if (!object->IsHeapObject() || object->IsVMHeapObject()) {
+      if (!object->IsHeapObject() || object->InVMIsolateHeap()) {
         // Ignore smis and objects in the VM isolate for now.
         // TODO(koda): To track which field each pointer corresponds to,
         // we'll need to encode which fields were omitted here.
diff --git a/runtime/vm/object_id_ring_test.cc b/runtime/vm/object_id_ring_test.cc
index 23593a7..23d47a6 100644
--- a/runtime/vm/object_id_ring_test.cc
+++ b/runtime/vm/object_id_ring_test.cc
@@ -128,67 +128,70 @@
       "}\n";
   Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
   Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
+  Dart_Handle moved_handle;
   intptr_t list_length = 0;
   EXPECT_VALID(result);
   EXPECT(!Dart_IsNull(result));
   EXPECT(Dart_IsList(result));
   EXPECT_VALID(Dart_ListLength(result, &list_length));
   EXPECT_EQ(3, list_length);
+
   Isolate* isolate = thread->isolate();
   Heap* heap = isolate->heap();
   ObjectIdRing* ring = isolate->object_id_ring();
   ObjectIdRing::LookupResult kind = ObjectIdRing::kInvalid;
-  RawObject* raw_obj = Api::UnwrapHandle(result);
-  // Located in new heap.
-  EXPECT(raw_obj->IsNewObject());
-  EXPECT_NE(Object::null(), raw_obj);
-  intptr_t raw_obj_id1 = ring->GetIdForObject(raw_obj);
-  EXPECT_EQ(0, raw_obj_id1);
-  // Get id 0 again.
-  EXPECT_EQ(raw_obj_id1, ring->GetIdForObject(raw_obj, ObjectIdRing::kReuseId));
-  // Add to ring a second time.
-  intptr_t raw_obj_id2 = ring->GetIdForObject(raw_obj);
-  EXPECT_EQ(1, raw_obj_id2);
-  // Get id 0 again.
-  EXPECT_EQ(raw_obj_id1, ring->GetIdForObject(raw_obj, ObjectIdRing::kReuseId));
-  RawObject* raw_obj1 = ring->GetObjectForId(raw_obj_id1, &kind);
-  EXPECT_EQ(ObjectIdRing::kValid, kind);
-  RawObject* raw_obj2 = ring->GetObjectForId(raw_obj_id2, &kind);
-  EXPECT_EQ(ObjectIdRing::kValid, kind);
-  EXPECT_NE(Object::null(), raw_obj1);
-  EXPECT_NE(Object::null(), raw_obj2);
-  EXPECT_EQ(RawObject::ToAddr(raw_obj), RawObject::ToAddr(raw_obj1));
-  EXPECT_EQ(RawObject::ToAddr(raw_obj), RawObject::ToAddr(raw_obj2));
+
   {
-    TransitionNativeToVM transition(thread);
+    TransitionNativeToVM to_vm(thread);
+    RawObject* raw_obj = Api::UnwrapHandle(result);
+    // Located in new heap.
+    EXPECT(raw_obj->IsNewObject());
+    EXPECT_NE(Object::null(), raw_obj);
+    intptr_t raw_obj_id1 = ring->GetIdForObject(raw_obj);
+    EXPECT_EQ(0, raw_obj_id1);
+    // Get id 0 again.
+    EXPECT_EQ(raw_obj_id1,
+              ring->GetIdForObject(raw_obj, ObjectIdRing::kReuseId));
+    // Add to ring a second time.
+    intptr_t raw_obj_id2 = ring->GetIdForObject(raw_obj);
+    EXPECT_EQ(1, raw_obj_id2);
+    // Get id 0 again.
+    EXPECT_EQ(raw_obj_id1,
+              ring->GetIdForObject(raw_obj, ObjectIdRing::kReuseId));
+    RawObject* raw_obj1 = ring->GetObjectForId(raw_obj_id1, &kind);
+    EXPECT_EQ(ObjectIdRing::kValid, kind);
+    RawObject* raw_obj2 = ring->GetObjectForId(raw_obj_id2, &kind);
+    EXPECT_EQ(ObjectIdRing::kValid, kind);
+    EXPECT_NE(Object::null(), raw_obj1);
+    EXPECT_NE(Object::null(), raw_obj2);
+    EXPECT_EQ(RawObject::ToAddr(raw_obj), RawObject::ToAddr(raw_obj1));
+    EXPECT_EQ(RawObject::ToAddr(raw_obj), RawObject::ToAddr(raw_obj2));
     // Force a scavenge.
     heap->CollectGarbage(Heap::kNew);
-  }
-  RawObject* raw_object_moved1 = ring->GetObjectForId(raw_obj_id1, &kind);
-  EXPECT_EQ(ObjectIdRing::kValid, kind);
-  RawObject* raw_object_moved2 = ring->GetObjectForId(raw_obj_id2, &kind);
-  EXPECT_EQ(ObjectIdRing::kValid, kind);
-  EXPECT_NE(Object::null(), raw_object_moved1);
-  EXPECT_NE(Object::null(), raw_object_moved2);
-  EXPECT_EQ(RawObject::ToAddr(raw_object_moved1),
-            RawObject::ToAddr(raw_object_moved2));
-  // Test that objects have moved.
-  EXPECT_NE(RawObject::ToAddr(raw_obj1), RawObject::ToAddr(raw_object_moved1));
-  EXPECT_NE(RawObject::ToAddr(raw_obj2), RawObject::ToAddr(raw_object_moved2));
-  // Test that we still point at the same list.
-  Dart_Handle moved_handle;
-  {
-    TransitionNativeToVM transition(thread);
+    RawObject* raw_object_moved1 = ring->GetObjectForId(raw_obj_id1, &kind);
+    EXPECT_EQ(ObjectIdRing::kValid, kind);
+    RawObject* raw_object_moved2 = ring->GetObjectForId(raw_obj_id2, &kind);
+    EXPECT_EQ(ObjectIdRing::kValid, kind);
+    EXPECT_NE(Object::null(), raw_object_moved1);
+    EXPECT_NE(Object::null(), raw_object_moved2);
+    EXPECT_EQ(RawObject::ToAddr(raw_object_moved1),
+              RawObject::ToAddr(raw_object_moved2));
+    // Test that objects have moved.
+    EXPECT_NE(RawObject::ToAddr(raw_obj1),
+              RawObject::ToAddr(raw_object_moved1));
+    EXPECT_NE(RawObject::ToAddr(raw_obj2),
+              RawObject::ToAddr(raw_object_moved2));
+    // Test that we still point at the same list.
     moved_handle = Api::NewHandle(thread, raw_object_moved1);
+    // Test id reuse.
+    EXPECT_EQ(raw_obj_id1,
+              ring->GetIdForObject(raw_object_moved1, ObjectIdRing::kReuseId));
   }
   EXPECT_VALID(moved_handle);
   EXPECT(!Dart_IsNull(moved_handle));
   EXPECT(Dart_IsList(moved_handle));
   EXPECT_VALID(Dart_ListLength(moved_handle, &list_length));
   EXPECT_EQ(3, list_length);
-  // Test id reuse.
-  EXPECT_EQ(raw_obj_id1,
-            ring->GetIdForObject(raw_object_moved1, ObjectIdRing::kReuseId));
 }
 
 // Test that the ring table is updated with nulls when the old GC collects.
diff --git a/runtime/vm/object_reload.cc b/runtime/vm/object_reload.cc
index ffd3cb9..31eb620 100644
--- a/runtime/vm/object_reload.cc
+++ b/runtime/vm/object_reload.cc
@@ -45,7 +45,9 @@
   ASSERT(saved_ic_datalength > 0);
   const Array& edge_counters_array =
       Array::Handle(Array::RawCast(saved_ic_data.At(0)));
-  ASSERT(!edge_counters_array.IsNull());
+  if (edge_counters_array.IsNull()) {
+    return;
+  }
   // Fill edge counters array with zeros.
   const Smi& zero = Smi::Handle(Smi::New(0));
   for (intptr_t i = 0; i < edge_counters_array.Length(); i++) {
@@ -703,7 +705,7 @@
   RebindRule rule = rebind_rule();
   if (rule == kInstance) {
     const intptr_t num_args = NumArgsTested();
-    const bool tracking_exactness = IsTrackingExactness();
+    const bool tracking_exactness = is_tracking_exactness();
     const intptr_t len = Length();
     // We need at least one non-sentinel entry to require a check
     // for the smi fast path case.
diff --git a/runtime/vm/object_service.cc b/runtime/vm/object_service.cc
index 1562714..e0d65f9 100644
--- a/runtime/vm/object_service.cc
+++ b/runtime/vm/object_service.cc
@@ -332,7 +332,8 @@
                     static_cast<intptr_t>(deoptimization_counter()));
   if ((kind() == RawFunction::kImplicitGetter) ||
       (kind() == RawFunction::kImplicitSetter) ||
-      (kind() == RawFunction::kImplicitStaticFinalGetter)) {
+      (kind() == RawFunction::kImplicitStaticFinalGetter) ||
+      (kind() == RawFunction::kStaticFieldInitializer)) {
     const Field& field = Field::Handle(accessor_field());
     if (!field.IsNull()) {
       jsobj.AddProperty("_field", field);
@@ -1358,6 +1359,10 @@
   jsobj.AddProperty("valueAsString", ToCString());
 }
 
+void TypedDataBase::PrintJSONImpl(JSONStream* stream, bool ref) const {
+  UNREACHABLE();
+}
+
 void TypedData::PrintJSONImpl(JSONStream* stream, bool ref) const {
   JSONObject jsobj(stream);
   PrintSharedInstanceJSON(&jsobj, ref);
@@ -1389,6 +1394,10 @@
   }
 }
 
+void TypedDataView::PrintJSONImpl(JSONStream* stream, bool ref) const {
+  Instance::PrintJSONImpl(stream, ref);
+}
+
 void ExternalTypedData::PrintJSONImpl(JSONStream* stream, bool ref) const {
   JSONObject jsobj(stream);
   PrintSharedInstanceJSON(&jsobj, ref);
diff --git a/runtime/vm/object_store.cc b/runtime/vm/object_store.cc
index cecbe27..2d080e3 100644
--- a/runtime/vm/object_store.cc
+++ b/runtime/vm/object_store.cc
@@ -131,18 +131,23 @@
 }
 
 void ObjectStore::InitKnownObjects() {
+  Thread* thread = Thread::Current();
+  Zone* zone = thread->zone();
+  Class& cls = Class::Handle(zone);
+  const Library& collection_lib = Library::Handle(collection_library());
+  cls = collection_lib.LookupClassAllowPrivate(Symbols::_LinkedHashSet());
+  ASSERT(!cls.IsNull());
+  set_linked_hash_set_class(cls);
+
 #ifdef DART_PRECOMPILED_RUNTIME
   // These objects are only needed for code generation.
   return;
 #else
-  Thread* thread = Thread::Current();
-  Zone* zone = thread->zone();
   Isolate* isolate = thread->isolate();
   ASSERT(isolate != NULL && isolate->object_store() == this);
 
   const Library& async_lib = Library::Handle(async_library());
   ASSERT(!async_lib.IsNull());
-  Class& cls = Class::Handle(zone);
   cls = async_lib.LookupClass(Symbols::Future());
   ASSERT(!cls.IsNull());
   set_future_class(cls);
diff --git a/runtime/vm/object_store.h b/runtime/vm/object_store.h
index a4f0227..d3277a4 100644
--- a/runtime/vm/object_store.h
+++ b/runtime/vm/object_store.h
@@ -76,6 +76,7 @@
   RW(Class, immutable_array_class)                                             \
   RW(Class, growable_object_array_class)                                       \
   RW(Class, linked_hash_map_class)                                             \
+  RW(Class, linked_hash_set_class)                                             \
   RW(Class, float32x4_class)                                                   \
   RW(Class, int32x4_class)                                                     \
   RW(Class, float64x2_class)                                                   \
@@ -104,6 +105,7 @@
   RW(Array, libraries_map)                                                     \
   RW(GrowableObjectArray, closure_functions)                                   \
   RW(GrowableObjectArray, pending_classes)                                     \
+  RW(GrowableObjectArray, pending_unevaluated_const_fields)                    \
   R_(GrowableObjectArray, pending_deferred_loads)                              \
   R_(GrowableObjectArray, resume_capabilities)                                 \
   R_(GrowableObjectArray, exit_listeners)                                      \
diff --git a/runtime/vm/object_test.cc b/runtime/vm/object_test.cc
index cb5d990..4664ee7 100644
--- a/runtime/vm/object_test.cc
+++ b/runtime/vm/object_test.cc
@@ -23,6 +23,7 @@
 
 namespace dart {
 
+DECLARE_FLAG(bool, dual_map_code);
 DECLARE_FLAG(bool, write_protect_code);
 
 static RawClass* CreateDummyClass(const String& class_name,
@@ -2474,7 +2475,7 @@
   Assembler _assembler_(&object_pool_builder);
   GenerateIncrement(&_assembler_);
   const Function& function = Function::Handle(CreateFunction("Test_Code"));
-  Code& code = Code::Handle(Code::FinalizeCode(
+  Code& code = Code::Handle(Code::FinalizeCodeAndNotify(
       function, nullptr, &_assembler_, Code::PoolAttachment::kAttachPool));
   function.AttachCode(code);
   const Instructions& instructions = Instructions::Handle(code.instructions());
@@ -2496,7 +2497,7 @@
   Assembler _assembler_(&object_pool_builder);
   GenerateIncrement(&_assembler_);
   const Function& function = Function::Handle(CreateFunction("Test_Code"));
-  Code& code = Code::Handle(Code::FinalizeCode(
+  Code& code = Code::Handle(Code::FinalizeCodeAndNotify(
       function, nullptr, &_assembler_, Code::PoolAttachment::kAttachPool));
   function.AttachCode(code);
   Instructions& instructions = Instructions::Handle(code.instructions());
@@ -2507,8 +2508,56 @@
   if (!FLAG_write_protect_code) {
     // Since this test is expected to crash, crash if write protection of code
     // is switched off.
-    // TODO(regis, fschneider): Should this be FATAL() instead?
-    OS::DebugBreak();
+    FATAL("Test requires --write-protect-code; skip by forcing expected crash");
+  }
+  MallocHooks::set_stack_trace_collection_enabled(
+      stack_trace_collection_enabled);
+}
+
+class CodeTestHelper {
+ public:
+  static void SetInstructions(const Code& code,
+                              const Instructions& instructions) {
+    code.SetActiveInstructions(instructions);
+    code.set_instructions(instructions);
+  }
+};
+
+// Test for executability of generated instructions. The test crashes with a
+// segmentation fault when executing the writeable view.
+ISOLATE_UNIT_TEST_CASE(CodeExecutability) {
+  bool stack_trace_collection_enabled =
+      MallocHooks::stack_trace_collection_enabled();
+  MallocHooks::set_stack_trace_collection_enabled(false);
+  extern void GenerateIncrement(Assembler * assembler);
+  ObjectPoolBuilder object_pool_builder;
+  Assembler _assembler_(&object_pool_builder);
+  GenerateIncrement(&_assembler_);
+  const Function& function = Function::Handle(CreateFunction("Test_Code"));
+  Code& code = Code::Handle(Code::FinalizeCodeAndNotify(
+      function, nullptr, &_assembler_, Code::PoolAttachment::kAttachPool));
+  function.AttachCode(code);
+  Instructions& instructions = Instructions::Handle(code.instructions());
+  uword payload_start = instructions.PayloadStart();
+  EXPECT_EQ(instructions.raw(), Instructions::FromPayloadStart(payload_start));
+  // Execute the executable view of the instructions (default).
+  Object& result =
+      Object::Handle(DartEntry::InvokeFunction(function, Array::empty_array()));
+  EXPECT_EQ(1, Smi::Cast(result).Value());
+  // Switch to the writeable but non-executable view of the instructions.
+  instructions ^= HeapPage::ToWritable(instructions.raw());
+  payload_start = instructions.PayloadStart();
+  EXPECT_EQ(instructions.raw(), Instructions::FromPayloadStart(payload_start));
+  // Hook up Code and Instructions objects.
+  CodeTestHelper::SetInstructions(code, instructions);
+  function.AttachCode(code);
+  // Try executing the generated code, expected to crash.
+  result = DartEntry::InvokeFunction(function, Array::empty_array());
+  EXPECT_EQ(1, Smi::Cast(result).Value());
+  if (!FLAG_dual_map_code) {
+    // Since this test is expected to crash, crash if dual mapping of code
+    // is switched off.
+    FATAL("Test requires --dual-map-code; skip by forcing expected crash");
   }
   MallocHooks::set_stack_trace_collection_enabled(
       stack_trace_collection_enabled);
@@ -2524,7 +2573,7 @@
   GenerateEmbedStringInCode(&_assembler_, kHello);
   const Function& function =
       Function::Handle(CreateFunction("Test_EmbedStringInCode"));
-  const Code& code = Code::Handle(Code::FinalizeCode(
+  const Code& code = Code::Handle(Code::FinalizeCodeAndNotify(
       function, nullptr, &_assembler_, Code::PoolAttachment::kAttachPool));
   function.AttachCode(code);
   const Object& result =
@@ -2547,7 +2596,7 @@
   GenerateEmbedSmiInCode(&_assembler_, kSmiTestValue);
   const Function& function =
       Function::Handle(CreateFunction("Test_EmbedSmiInCode"));
-  const Code& code = Code::Handle(Code::FinalizeCode(
+  const Code& code = Code::Handle(Code::FinalizeCodeAndNotify(
       function, nullptr, &_assembler_, Code::PoolAttachment::kAttachPool));
   function.AttachCode(code);
   const Object& result =
@@ -2565,7 +2614,7 @@
   GenerateEmbedSmiInCode(&_assembler_, kSmiTestValue);
   const Function& function =
       Function::Handle(CreateFunction("Test_EmbedSmiIn64BitCode"));
-  const Code& code = Code::Handle(Code::FinalizeCode(
+  const Code& code = Code::Handle(Code::FinalizeCodeAndNotify(
       function, nullptr, &_assembler_, Code::PoolAttachment::kAttachPool));
   function.AttachCode(code);
   const Object& result =
@@ -2594,9 +2643,9 @@
   ObjectPoolBuilder object_pool_builder;
   Assembler _assembler_(&object_pool_builder);
   GenerateIncrement(&_assembler_);
-  Code& code = Code::Handle(
-      Code::FinalizeCode(Function::Handle(CreateFunction("Test_Code")), nullptr,
-                         &_assembler_, Code::PoolAttachment::kAttachPool));
+  Code& code = Code::Handle(Code::FinalizeCodeAndNotify(
+      Function::Handle(CreateFunction("Test_Code")), nullptr, &_assembler_,
+      Code::PoolAttachment::kAttachPool));
   code.set_exception_handlers(exception_handlers);
 
   // Verify the exception handler table entries by accessing them.
@@ -2636,9 +2685,9 @@
   ObjectPoolBuilder object_pool_builder;
   Assembler _assembler_(&object_pool_builder);
   GenerateIncrement(&_assembler_);
-  Code& code = Code::Handle(
-      Code::FinalizeCode(Function::Handle(CreateFunction("Test_Code")), nullptr,
-                         &_assembler_, Code::PoolAttachment::kAttachPool));
+  Code& code = Code::Handle(Code::FinalizeCodeAndNotify(
+      Function::Handle(CreateFunction("Test_Code")), nullptr, &_assembler_,
+      Code::PoolAttachment::kAttachPool));
   code.set_pc_descriptors(descriptors);
 
   // Verify the PcDescriptor entries by accessing them.
@@ -2699,9 +2748,9 @@
   ObjectPoolBuilder object_pool_builder;
   Assembler _assembler_(&object_pool_builder);
   GenerateIncrement(&_assembler_);
-  Code& code = Code::Handle(
-      Code::FinalizeCode(Function::Handle(CreateFunction("Test_Code")), nullptr,
-                         &_assembler_, Code::PoolAttachment::kAttachPool));
+  Code& code = Code::Handle(Code::FinalizeCodeAndNotify(
+      Function::Handle(CreateFunction("Test_Code")), nullptr, &_assembler_,
+      Code::PoolAttachment::kAttachPool));
   code.set_pc_descriptors(descriptors);
 
   // Verify the PcDescriptor entries by accessing them.
diff --git a/runtime/vm/os.h b/runtime/vm/os.h
index e987b5c..af98eb1 100644
--- a/runtime/vm/os.h
+++ b/runtime/vm/os.h
@@ -122,6 +122,9 @@
   // Cleanup the OS class.
   static void Cleanup();
 
+  // Only implemented on Windows, prevents cleanup code from running.
+  static void PrepareToAbort();
+
   DART_NORETURN static void Abort();
 
   DART_NORETURN static void Exit(int code);
diff --git a/runtime/vm/os_android.cc b/runtime/vm/os_android.cc
index 997578c..196620f 100644
--- a/runtime/vm/os_android.cc
+++ b/runtime/vm/os_android.cc
@@ -337,6 +337,8 @@
 
 void OS::Cleanup() {}
 
+void OS::PrepareToAbort() {}
+
 void OS::Abort() {
   abort();
 }
diff --git a/runtime/vm/os_fuchsia.cc b/runtime/vm/os_fuchsia.cc
index 6534a9b..df94ba9 100644
--- a/runtime/vm/os_fuchsia.cc
+++ b/runtime/vm/os_fuchsia.cc
@@ -8,17 +8,13 @@
 #include "vm/os.h"
 
 #include <errno.h>
-#include <lib/fdio/util.h>
+#include <fuchsia/timezone/cpp/fidl.h>
+#include <lib/sys/cpp/service_directory.h>
 #include <zircon/process.h>
 #include <zircon/syscalls.h>
 #include <zircon/syscalls/object.h>
 #include <zircon/types.h>
 
-#include <fuchsia/timezone/cpp/fidl.h>
-
-#include "lib/component/cpp/startup_context.h"
-#include "lib/svc/cpp/services.h"
-
 #include "platform/assert.h"
 #include "vm/zone.h"
 
@@ -65,15 +61,9 @@
 const char* OS::GetTimeZoneName(int64_t seconds_since_epoch) {
   // TODO(abarth): Handle time zone changes.
   static const auto* tz_name = new std::string([] {
-#ifdef USE_STD_FOR_NON_NULLABLE_FIDL_FIELDS
     std::string result;
     tz->GetTimezoneId(&result);
     return result;
-#else
-    fidl::StringPtr result;
-    tz->GetTimezoneId(&result);
-    return *result;
-#endif
   }());
   return tz_name->c_str();
 }
@@ -262,14 +252,14 @@
 }
 
 void OS::Init() {
-  auto environment_services = std::make_shared<component::Services>();
-  auto env_service_root = component::subtle::CreateStaticServiceRootHandle();
-  environment_services->Bind(std::move(env_service_root));
-  environment_services->ConnectToService(tz.NewRequest());
+  auto services = sys::ServiceDirectory::CreateFromNamespace();
+  services->Connect(tz.NewRequest());
 }
 
 void OS::Cleanup() {}
 
+void OS::PrepareToAbort() {}
+
 void OS::Abort() {
   abort();
 }
diff --git a/runtime/vm/os_linux.cc b/runtime/vm/os_linux.cc
index 1079bdb..bc254e4 100644
--- a/runtime/vm/os_linux.cc
+++ b/runtime/vm/os_linux.cc
@@ -558,9 +558,7 @@
   }
 }
 
-// TODO(regis, iposva): When this function is no longer called from the
-// CodeImmutability test in object_test.cc, it will be called only from the
-// simulator, which means that only the Intel implementation is needed.
+// TODO(regis): Function called only from the simulator.
 void OS::DebugBreak() {
   __builtin_trap();
 }
@@ -661,6 +659,8 @@
 
 void OS::Cleanup() {}
 
+void OS::PrepareToAbort() {}
+
 void OS::Abort() {
   abort();
 }
diff --git a/runtime/vm/os_macos.cc b/runtime/vm/os_macos.cc
index 16ce7e8..be6455d 100644
--- a/runtime/vm/os_macos.cc
+++ b/runtime/vm/os_macos.cc
@@ -323,6 +323,8 @@
 
 void OS::Cleanup() {}
 
+void OS::PrepareToAbort() {}
+
 void OS::Abort() {
   abort();
 }
diff --git a/runtime/vm/os_thread.cc b/runtime/vm/os_thread.cc
index fa5e8ea..2cfe8fb 100644
--- a/runtime/vm/os_thread.cc
+++ b/runtime/vm/os_thread.cc
@@ -40,6 +40,7 @@
       log_(new class Log()),
       stack_base_(0),
       stack_limit_(0),
+      stack_headroom_(0),
       thread_(NULL) {
   // Try to get accurate stack bounds from pthreads, etc.
   if (!GetCurrentStackBounds(&stack_limit_, &stack_base_)) {
@@ -47,11 +48,14 @@
     RefineStackBoundsFromSP(GetCurrentStackPointer());
   }
 
+  stack_headroom_ = CalculateHeadroom(stack_base_ - stack_limit_);
+
   ASSERT(stack_base_ != 0);
   ASSERT(stack_limit_ != 0);
   ASSERT(stack_base_ > stack_limit_);
   ASSERT(stack_base_ > GetCurrentStackPointer());
   ASSERT(stack_limit_ < GetCurrentStackPointer());
+  RELEASE_ASSERT(HasStackHeadroom());
 }
 
 OSThread* OSThread::CreateOSThread() {
diff --git a/runtime/vm/os_thread.h b/runtime/vm/os_thread.h
index a82ef6f..9a95345 100644
--- a/runtime/vm/os_thread.h
+++ b/runtime/vm/os_thread.h
@@ -100,9 +100,10 @@
 
   uword stack_base() const { return stack_base_; }
   uword stack_limit() const { return stack_limit_; }
-  uword overflow_stack_limit() const { return stack_limit_ + kStackSizeBuffer; }
+  uword overflow_stack_limit() const { return stack_limit_ + stack_headroom_; }
 
-  bool HasStackHeadroom(intptr_t headroom = kStackSizeBuffer) {
+  bool HasStackHeadroom() { return HasStackHeadroom(stack_headroom_); }
+  bool HasStackHeadroom(intptr_t headroom) {
     return GetCurrentStackPointer() > (stack_limit_ + headroom);
   }
 
@@ -165,8 +166,10 @@
   // TODO(5411455): Use flag to override default value and Validate the
   // stack size by querying OS.
   static uword GetSpecifiedStackSize() {
-    ASSERT(OSThread::kStackSizeBuffer < OSThread::GetMaxStackSize());
-    uword stack_size = OSThread::GetMaxStackSize() - OSThread::kStackSizeBuffer;
+    intptr_t headroom =
+        OSThread::CalculateHeadroom(OSThread::GetMaxStackSize());
+    ASSERT(headroom < OSThread::GetMaxStackSize());
+    uword stack_size = OSThread::GetMaxStackSize() - headroom;
     return stack_size;
   }
   static BaseThread* GetCurrentTLS() {
@@ -209,7 +212,8 @@
   static void DisableOSThreadCreation();
   static void EnableOSThreadCreation();
 
-  static const intptr_t kStackSizeBuffer = (16 * KB * kWordSize);
+  static const intptr_t kStackSizeBufferMax = (16 * KB * kWordSize);
+  static constexpr float kStackSizeBufferFraction = 0.5;
 
   static const ThreadId kInvalidThreadId;
   static const ThreadJoinId kInvalidThreadJoinId;
@@ -237,6 +241,11 @@
   static void RemoveThreadFromList(OSThread* thread);
   static OSThread* CreateAndSetUnknownThread();
 
+  static uword CalculateHeadroom(uword stack_size) {
+    uword headroom = kStackSizeBufferFraction * stack_size;
+    return (headroom > kStackSizeBufferMax) ? kStackSizeBufferMax : headroom;
+  }
+
   static ThreadLocalKey thread_key_;
 
   const ThreadId id_;
@@ -260,6 +269,7 @@
   Log* log_;
   uword stack_base_;
   uword stack_limit_;
+  uword stack_headroom_;
   ThreadState* thread_;
 
   // thread_list_lock_ cannot have a static lifetime because the order in which
diff --git a/runtime/vm/os_thread_android.cc b/runtime/vm/os_thread_android.cc
index e03d9b7..093795d 100644
--- a/runtime/vm/os_thread_android.cc
+++ b/runtime/vm/os_thread_android.cc
@@ -119,6 +119,9 @@
   uword parameter = data->parameter();
   delete data;
 
+  // Set the thread name.
+  pthread_setname_np(pthread_self(), name);
+
   // Create new OSThread object and set as TLS for new thread.
   OSThread* thread = OSThread::CreateOSThread();
   if (thread != NULL) {
diff --git a/runtime/vm/os_thread_fuchsia.cc b/runtime/vm/os_thread_fuchsia.cc
index b465e07..d6fd956 100644
--- a/runtime/vm/os_thread_fuchsia.cc
+++ b/runtime/vm/os_thread_fuchsia.cc
@@ -12,9 +12,7 @@
 #include <errno.h>  // NOLINT
 #include <zircon/status.h>
 #include <zircon/syscalls.h>
-#include <zircon/syscalls/object.h>
 #include <zircon/threads.h>
-#include <zircon/tls.h>
 #include <zircon/types.h>
 
 #include "platform/address_sanitizer.h"
diff --git a/runtime/vm/os_thread_linux.cc b/runtime/vm/os_thread_linux.cc
index 8c9fa0f..0003ee2 100644
--- a/runtime/vm/os_thread_linux.cc
+++ b/runtime/vm/os_thread_linux.cc
@@ -121,6 +121,9 @@
   uword parameter = data->parameter();
   delete data;
 
+  // Set the thread name.
+  pthread_setname_np(pthread_self(), name);
+
   // Create new OSThread object and set as TLS for new thread.
   OSThread* thread = OSThread::CreateOSThread();
   if (thread != NULL) {
diff --git a/runtime/vm/os_thread_macos.cc b/runtime/vm/os_thread_macos.cc
index 0fff6fd..eecfe67 100644
--- a/runtime/vm/os_thread_macos.cc
+++ b/runtime/vm/os_thread_macos.cc
@@ -97,6 +97,9 @@
   uword parameter = data->parameter();
   delete data;
 
+  // Set the thread name.
+  pthread_setname_np(name);
+
   // Create new OSThread object and set as TLS for new thread.
   OSThread* thread = OSThread::CreateOSThread();
   if (thread != NULL) {
diff --git a/runtime/vm/os_win.cc b/runtime/vm/os_win.cc
index 885009c..1ff4eb9 100644
--- a/runtime/vm/os_win.cc
+++ b/runtime/vm/os_win.cc
@@ -336,9 +336,13 @@
   // ThreadLocalData::Cleanup();
 }
 
-void OS::Abort() {
+void OS::PrepareToAbort() {
   // TODO(zra): Remove once VM shuts down cleanly.
   private_flag_windows_run_tls_destructors = false;
+}
+
+void OS::Abort() {
+  PrepareToAbort();
   abort();
 }
 
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index ad1c9b0..17a4a79 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -51,7 +51,6 @@
       code_(Code::Handle(zone(), function.unoptimized_code())),
       node_sequence_(NULL),
       regexp_compile_data_(NULL),
-      instantiator_(NULL),
       function_type_arguments_(NULL),
       parent_type_arguments_(NULL),
       current_context_var_(NULL),
@@ -66,7 +65,8 @@
       first_parameter_index_(),
       num_stack_locals_(0),
       have_seen_await_expr_(false),
-      kernel_scopes_(NULL) {
+      kernel_scopes_(NULL),
+      default_function_type_arguments_(TypeArguments::ZoneHandle(zone())) {
   ASSERT(function.IsZoneHandle());
   // Every function has a local variable for the current context.
   LocalVariable* temp = new (zone())
@@ -78,7 +78,8 @@
 
   const bool load_optional_arguments = function.HasOptionalParameters();
 
-  const bool check_arguments = function_.IsClosureFunction();
+  const bool check_arguments =
+      function_.IsClosureFunction() || function.IsFfiTrampoline();
 
   const bool need_argument_descriptor =
       load_optional_arguments || check_arguments || reify_generic_argument;
@@ -216,16 +217,20 @@
 
   raw_parameters_ = new (Z) ZoneGrowableArray<LocalVariable*>(Z, num_params);
   for (intptr_t param = 0; param < num_params; ++param) {
-    LocalVariable* raw_parameter = scope->VariableAt(param);
-    if (raw_parameter->is_captured()) {
+    LocalVariable* variable = ParameterVariable(param);
+    LocalVariable* raw_parameter = variable;
+    if (variable->is_captured()) {
       String& tmp = String::ZoneHandle(Z);
-      tmp = Symbols::FromConcat(T, Symbols::OriginalParam(),
-                                raw_parameter->name());
+      tmp = Symbols::FromConcat(T, Symbols::OriginalParam(), variable->name());
 
       RELEASE_ASSERT(scope->LocalLookupVariable(tmp) == NULL);
-      raw_parameter = new LocalVariable(raw_parameter->declaration_token_pos(),
-                                        raw_parameter->token_pos(), tmp,
-                                        raw_parameter->type());
+      raw_parameter =
+          new LocalVariable(variable->declaration_token_pos(),
+                            variable->token_pos(), tmp, variable->type());
+      if (variable->is_explicit_covariant_parameter()) {
+        raw_parameter->set_is_explicit_covariant_parameter();
+      }
+      raw_parameter->set_type_check_mode(variable->type_check_mode());
       if (function().HasOptionalParameters()) {
         bool ok = scope->AddVariable(raw_parameter);
         ASSERT(ok);
diff --git a/runtime/vm/parser.h b/runtime/vm/parser.h
index da1c949..efbb8f9 100644
--- a/runtime/vm/parser.h
+++ b/runtime/vm/parser.h
@@ -64,12 +64,6 @@
   }
   void SetRegExpCompileData(RegExpCompileData* regexp_compile_data);
 
-  LocalVariable* instantiator() const { return instantiator_; }
-  void set_instantiator(LocalVariable* instantiator) {
-    ASSERT(instantiator != NULL);
-    instantiator_ = instantiator;
-  }
-
   LocalVariable* function_type_arguments() const {
     return function_type_arguments_;
   }
@@ -90,7 +84,7 @@
 #if defined(DEBUG)
     if (list == NULL) return;
     for (intptr_t i = 0; i < list->length(); i++) {
-      ASSERT(list->At(i)->IsZoneHandle() || list->At(i)->InVMHeap());
+      ASSERT(list->At(i)->IsZoneHandle() || list->At(i)->InVMIsolateHeap());
     }
 #endif
   }
@@ -109,6 +103,17 @@
   bool has_arg_desc_var() const { return arg_desc_var_ != NULL; }
   LocalVariable* arg_desc_var() const { return arg_desc_var_; }
 
+  LocalVariable* receiver_var() const {
+    ASSERT(receiver_var_ != nullptr);
+    return receiver_var_;
+  }
+  void set_receiver_var(LocalVariable* value) {
+    ASSERT(receiver_var_ == nullptr);
+    ASSERT(value != nullptr);
+    receiver_var_ = value;
+  }
+  bool has_receiver_var() const { return receiver_var_ != nullptr; }
+
   LocalVariable* expression_temp_var() const {
     ASSERT(has_expression_temp_var());
     return expression_temp_var_;
@@ -167,13 +172,13 @@
   void record_await() { have_seen_await_expr_ = true; }
   bool have_seen_await() const { return have_seen_await_expr_; }
   bool is_forwarding_stub() const {
-    return forwarding_stub_super_target_ != -1;
+    return forwarding_stub_super_target_ != nullptr;
   }
-  kernel::NameIndex forwarding_stub_super_target() const {
+  const Function* forwarding_stub_super_target() const {
     return forwarding_stub_super_target_;
   }
-  void MarkForwardingStub(kernel::NameIndex target) {
-    forwarding_stub_super_target_ = target;
+  void MarkForwardingStub(const Function* forwarding_target) {
+    forwarding_stub_super_target_ = forwarding_target;
   }
 
   Thread* thread() const { return thread_; }
@@ -204,17 +209,31 @@
     return raw_parameters_->At(i);
   }
 
+  LocalVariable* ParameterVariable(intptr_t i) const {
+    ASSERT((i >= 0) && (i < function_.NumParameters()));
+    ASSERT(node_sequence() != nullptr && node_sequence()->scope() != nullptr);
+    return node_sequence()->scope()->VariableAt(i);
+  }
+
+  void SetDefaultFunctionTypeArguments(const TypeArguments& value) {
+    default_function_type_arguments_ = value.raw();
+  }
+
+  const TypeArguments& DefaultFunctionTypeArguments() const {
+    return default_function_type_arguments_;
+  }
+
  private:
   Thread* thread_;
   const Function& function_;
   Code& code_;
   SequenceNode* node_sequence_;
   RegExpCompileData* regexp_compile_data_;
-  LocalVariable* instantiator_;
   LocalVariable* function_type_arguments_;
   LocalVariable* parent_type_arguments_;
   LocalVariable* current_context_var_;
   LocalVariable* arg_desc_var_;
+  LocalVariable* receiver_var_ = nullptr;
   LocalVariable* expression_temp_var_;
   LocalVariable* entry_points_temp_var_;
   LocalVariable* finally_return_temp_var_;
@@ -229,9 +248,11 @@
   int num_stack_locals_;
   bool have_seen_await_expr_;
 
-  kernel::NameIndex forwarding_stub_super_target_;
+  const Function* forwarding_stub_super_target_ = nullptr;
   kernel::ScopeBuildingResult* kernel_scopes_;
 
+  TypeArguments& default_function_type_arguments_;
+
   friend class Parser;
   DISALLOW_COPY_AND_ASSIGN(ParsedFunction);
 };
diff --git a/runtime/vm/pointer_tagging.h b/runtime/vm/pointer_tagging.h
index 411b6b0..a4d6d9f 100644
--- a/runtime/vm/pointer_tagging.h
+++ b/runtime/vm/pointer_tagging.h
@@ -14,6 +14,8 @@
 
 namespace dart {
 
+class RawSmi;
+
 // Dart VM aligns all objects by 2 words in in the old space and misaligns them
 // in new space. This allows to distinguish new and old pointers by their bits.
 //
@@ -63,6 +65,12 @@
   kSmiTagShift = 1,
 };
 
+inline intptr_t ValueFromRawSmi(const RawSmi* raw_value) {
+  const intptr_t value = reinterpret_cast<intptr_t>(raw_value);
+  ASSERT((value & kSmiTagMask) == kSmiTag);
+  return (value >> kSmiTagShift);
+}
+
 }  // namespace dart
 
 #endif  // RUNTIME_VM_POINTER_TAGGING_H_
diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc
index 5ff50f6..7eed0f3 100644
--- a/runtime/vm/profiler.cc
+++ b/runtime/vm/profiler.cc
@@ -23,6 +23,7 @@
 #include "vm/signal_handler.h"
 #include "vm/simulator.h"
 #include "vm/stack_frame.h"
+#include "vm/version.h"
 
 namespace dart {
 
@@ -416,6 +417,7 @@
 
 static void DumpStackFrame(intptr_t frame_index,
                            uword pc,
+                           uword fp,
                            bool try_symbolize_dart_frames) {
   Thread* thread = Thread::Current();
   if ((thread != NULL) && !thread->IsAtSafepoint() &&
@@ -429,7 +431,8 @@
         code = Code::LookupCode(pc);  // In current isolate.
       }
       if (!code.IsNull()) {
-        OS::PrintErr("  [0x%" Pp "] %s\n", pc, code.QualifiedName());
+        OS::PrintErr("  pc 0x%" Pp " fp 0x%" Pp " %s\n", pc, fp,
+                     code.QualifiedName());
         return;
       }
     }
@@ -437,12 +440,24 @@
 
   uintptr_t start = 0;
   char* native_symbol_name = NativeSymbolResolver::LookupSymbolName(pc, &start);
-  if (native_symbol_name == NULL) {
-    OS::PrintErr("  [0x%" Pp "] Unknown symbol\n", pc);
-  } else {
-    OS::PrintErr("  [0x%" Pp "] %s\n", pc, native_symbol_name);
+  if (native_symbol_name != NULL) {
+    OS::PrintErr("  pc 0x%" Pp " fp 0x%" Pp " %s\n", pc, fp,
+                 native_symbol_name);
     NativeSymbolResolver::FreeSymbolName(native_symbol_name);
+    return;
   }
+
+  char* dso_name;
+  uword dso_base;
+  if (NativeSymbolResolver::LookupSharedObject(pc, &dso_base, &dso_name)) {
+    uword dso_offset = pc - dso_base;
+    OS::PrintErr("  pc 0x%" Pp " fp 0x%" Pp " %s+0x%" Px "\n", pc, fp, dso_name,
+                 dso_offset);
+    NativeSymbolResolver::FreeSymbolName(dso_name);
+    return;
+  }
+
+  OS::PrintErr("  pc 0x%" Pp " fp 0x%" Pp " Unknown symbol\n", pc, fp);
 }
 
 class ProfilerStackWalker : public ValueObject {
@@ -468,14 +483,14 @@
     }
   }
 
-  bool Append(uword pc) {
+  bool Append(uword pc, uword fp) {
     if (frames_skipped_ < skip_count_) {
       frames_skipped_++;
       return true;
     }
 
     if (sample_ == NULL) {
-      DumpStackFrame(frame_index_, pc, try_symbolize_dart_frames_);
+      DumpStackFrame(frame_index_, pc, fp, try_symbolize_dart_frames_);
       frame_index_++;
       total_frames_++;
       return true;
@@ -631,7 +646,7 @@
                                                    in_interpreted_frame));
       }
 
-      if (!Append(reinterpret_cast<uword>(pc_))) {
+      if (!Append(reinterpret_cast<uword>(pc_), reinterpret_cast<uword>(fp_))) {
         break;  // Sample is full.
       }
 
@@ -724,7 +739,7 @@
   void walk() {
     const uword kMaxStep = VirtualMemory::PageSize();
 
-    Append(original_pc_);
+    Append(original_pc_, original_fp_);
 
     uword* pc = reinterpret_cast<uword*>(original_pc_);
     uword* fp = reinterpret_cast<uword*>(original_fp_);
@@ -746,10 +761,6 @@
     }
 
     while (true) {
-      if (!Append(reinterpret_cast<uword>(pc))) {
-        return;
-      }
-
       pc = CallerPC(fp);
       previous_fp = fp;
       fp = CallerFP(fp);
@@ -793,6 +804,10 @@
 
       // Move the lower bound up.
       lower_bound_ = reinterpret_cast<uword>(fp);
+
+      if (!Append(reinterpret_cast<uword>(pc), reinterpret_cast<uword>(fp))) {
+        return;
+      }
     }
   }
 
@@ -1117,9 +1132,9 @@
   ASSERT(os_thread != NULL);
   Isolate* isolate = Isolate::Current();
   const char* name = isolate == NULL ? NULL : isolate->name();
-  OS::PrintErr("thread=%" Pd ", isolate=%s(%p)\n",
-               OSThread::ThreadIdToIntPtr(os_thread->trace_id()), name,
-               isolate);
+  OS::PrintErr(
+      "version=%s\nthread=%" Pd ", isolate=%s(%p)\n", Version::String(),
+      OSThread::ThreadIdToIntPtr(os_thread->trace_id()), name, isolate);
 
   if (!InitialRegisterCheck(pc, fp, sp)) {
     OS::PrintErr("Stack dump aborted because InitialRegisterCheck failed.\n");
@@ -1634,7 +1649,8 @@
       user_tag_(0),
       allocation_cid_(-1),
       truncated_(false),
-      timeline_trie_(NULL) {}
+      timeline_code_trie_(nullptr),
+      timeline_function_trie_(nullptr) {}
 
 void ProcessedSample::FixupCaller(const CodeLookupTable& clt,
                                   uword pc_marker,
diff --git a/runtime/vm/profiler.h b/runtime/vm/profiler.h
index cb891a5..d5122fc7d 100644
--- a/runtime/vm/profiler.h
+++ b/runtime/vm/profiler.h
@@ -80,8 +80,8 @@
   // SampleThread is called from inside the signal handler and hence it is very
   // critical that the implementation of SampleThread does not do any of the
   // following:
-  //   * Accessing TLS -- Because on Windows the callback will be running in a
-  //                      different thread.
+  //   * Accessing TLS -- Because on Windows and Fuchsia the callback will be
+  //                      running in a different thread.
   //   * Allocating memory -- Because this takes locks which may already be
   //                          held, resulting in a dead lock.
   //   * Taking a lock -- See above.
@@ -726,10 +726,18 @@
     first_frame_executing_ = first_frame_executing;
   }
 
-  ProfileTrieNode* timeline_trie() const { return timeline_trie_; }
-  void set_timeline_trie(ProfileTrieNode* trie) {
-    ASSERT(timeline_trie_ == NULL);
-    timeline_trie_ = trie;
+  ProfileTrieNode* timeline_code_trie() const { return timeline_code_trie_; }
+  void set_timeline_code_trie(ProfileTrieNode* trie) {
+    ASSERT(timeline_code_trie_ == NULL);
+    timeline_code_trie_ = trie;
+  }
+
+  ProfileTrieNode* timeline_function_trie() const {
+    return timeline_function_trie_;
+  }
+  void set_timeline_function_trie(ProfileTrieNode* trie) {
+    ASSERT(timeline_function_trie_ == NULL);
+    timeline_function_trie_ = trie;
   }
 
  private:
@@ -752,7 +760,8 @@
   bool first_frame_executing_;
   uword native_allocation_address_;
   uintptr_t native_allocation_size_bytes_;
-  ProfileTrieNode* timeline_trie_;
+  ProfileTrieNode* timeline_code_trie_;
+  ProfileTrieNode* timeline_function_trie_;
 
   friend class SampleBuffer;
   DISALLOW_COPY_AND_ASSIGN(ProcessedSample);
diff --git a/runtime/vm/profiler_service.cc b/runtime/vm/profiler_service.cc
index 4251002..a92e31e 100644
--- a/runtime/vm/profiler_service.cc
+++ b/runtime/vm/profiler_service.cc
@@ -4,6 +4,7 @@
 
 #include "vm/profiler_service.h"
 
+#include "platform/text_buffer.h"
 #include "vm/growable_array.h"
 #include "vm/hash_map.h"
 #include "vm/log.h"
@@ -14,6 +15,7 @@
 #include "vm/profiler.h"
 #include "vm/reusable_handles.h"
 #include "vm/scope_timer.h"
+#include "vm/timeline.h"
 
 namespace dart {
 
@@ -857,6 +859,7 @@
       exclusive_allocations_(0),
       inclusive_allocations_(0),
       children_(0),
+      parent_(NULL),
       frame_id_(-1) {
   ASSERT(table_index_ >= 0);
 }
@@ -909,6 +912,10 @@
     }
   }
 
+  const char* ToCString(Profile* profile) const {
+    return profile->GetCode(table_index())->name();
+  }
+
   ProfileCodeTrieNode* GetChild(intptr_t child_table_index) {
     const intptr_t length = NumChildren();
     intptr_t i = 0;
@@ -983,6 +990,11 @@
     }
   }
 
+  const char* ToCString(Profile* profile) const {
+    ProfileFunction* f = profile->GetFunction(table_index());
+    return f->Name();
+  }
+
   ProfileFunctionTrieNode* GetChild(intptr_t child_table_index) {
     const intptr_t length = NumChildren();
     intptr_t i = 0;
@@ -1443,6 +1455,8 @@
       if (!sample->first_frame_executing()) {
         current = AppendExitFrame(sample->vm_tag(), current, sample);
       }
+
+      sample->set_timeline_code_trie(current);
     }
   }
 
@@ -1537,7 +1551,7 @@
         current = AppendExitFrame(sample->vm_tag(), current, sample);
       }
 
-      sample->set_timeline_trie(current);
+      sample->set_timeline_function_trie(current);
     }
   }
 
@@ -2394,7 +2408,8 @@
 void Profile::PrintTimelineFrameJSON(JSONObject* frames,
                                      ProfileTrieNode* current,
                                      ProfileTrieNode* parent,
-                                     intptr_t* next_id) {
+                                     intptr_t* next_id,
+                                     bool code_trie) {
   ASSERT(current->frame_id() == -1);
   const intptr_t id = *next_id;
   *next_id = id + 1;
@@ -2409,8 +2424,13 @@
         zone_->PrintToString("%" Pd "-%" Pd, isolate_id, current->frame_id());
     JSONObject frame(frames, key);
     frame.AddProperty("category", "Dart");
-    ProfileFunction* func = GetFunction(current->table_index());
-    frame.AddProperty("name", func->Name());
+    if (code_trie) {
+      ProfileCode* code = GetCode(current->table_index());
+      frame.AddProperty("name", code->name());
+    } else {
+      ProfileFunction* func = GetFunction(current->table_index());
+      frame.AddProperty("name", func->Name());
+    }
     if ((parent != NULL) && (parent->frame_id() != kRootFrameId)) {
       ASSERT(parent->frame_id() != -1);
       frame.AddPropertyF("parent", "%" Pd "-%" Pd, isolate_id,
@@ -2420,20 +2440,25 @@
 
   for (intptr_t i = 0; i < current->NumChildren(); i++) {
     ProfileTrieNode* child = current->At(i);
-    PrintTimelineFrameJSON(frames, child, current, next_id);
+    PrintTimelineFrameJSON(frames, child, current, next_id, code_trie);
   }
 }
 
-void Profile::PrintTimelineJSON(JSONStream* stream) {
+void Profile::PrintTimelineJSON(JSONStream* stream, bool code_trie) {
   ScopeTimer sw("Profile::PrintTimelineJSON", FLAG_trace_profiler);
   JSONObject obj(stream);
   obj.AddProperty("type", "_CpuProfileTimeline");
   PrintHeaderJSON(&obj);
   {
     JSONObject frames(&obj, "stackFrames");
-    ProfileTrieNode* root = GetTrieRoot(kInclusiveFunction);
+    ProfileTrieNode* root;
+    if (code_trie) {
+      root = GetTrieRoot(kInclusiveCode);
+    } else {
+      root = GetTrieRoot(kInclusiveFunction);
+    }
     intptr_t next_id = kRootFrameId;
-    PrintTimelineFrameJSON(&frames, root, NULL, &next_id);
+    PrintTimelineFrameJSON(&frames, root, NULL, &next_id, code_trie);
   }
   {
     JSONArray events(&obj, "traceEvents");
@@ -2455,13 +2480,72 @@
         args.AddProperty("mode", "basic");
       }
 
-      ProfileTrieNode* trie = sample->timeline_trie();
+      ProfileTrieNode* trie;
+      if (code_trie) {
+        trie = sample->timeline_code_trie();
+      } else {
+        trie = sample->timeline_function_trie();
+      }
       ASSERT(trie->frame_id() != -1);
       event.AddPropertyF("sf", "%" Pd "-%" Pd, isolate_id, trie->frame_id());
     }
   }
 }
 
+void Profile::AddParentTriePointers(ProfileTrieNode* current,
+                                    ProfileTrieNode* parent,
+                                    bool code_trie) {
+  if (current == NULL) {
+    ProfileTrieNode* root;
+    if (code_trie) {
+      root = GetTrieRoot(kInclusiveCode);
+    } else {
+      root = GetTrieRoot(kInclusiveFunction);
+    }
+    AddParentTriePointers(root, NULL, code_trie);
+    return;
+  }
+
+  current->set_parent(parent);
+  for (int i = 0; i < current->NumChildren(); i++) {
+    AddParentTriePointers(current->At(i), current, code_trie);
+  }
+}
+
+void Profile::PrintBacktrace(ProfileTrieNode* node, TextBuffer* buf) {
+  ProfileTrieNode* current = node;
+  while (current != NULL) {
+    buf->AddString(current->ToCString(this));
+    buf->AddString("\n");
+    current = current->parent();
+  }
+}
+
+void Profile::AddToTimeline(bool code_trie) {
+  TimelineStream* stream = Timeline::GetProfilerStream();
+  if (stream == NULL) {
+    return;
+  }
+  AddParentTriePointers(NULL, NULL, code_trie);
+  for (intptr_t sample_index = 0; sample_index < samples_->length();
+       sample_index++) {
+    TextBuffer buf(256);
+    ProcessedSample* sample = samples_->At(sample_index);
+    if (code_trie) {
+      PrintBacktrace(sample->timeline_code_trie(), &buf);
+    } else {
+      PrintBacktrace(sample->timeline_function_trie(), &buf);
+    }
+    TimelineEvent* event = stream->StartEvent();
+    event->Instant("Dart CPU sample", sample->timestamp());
+    event->set_owns_label(false);
+    event->SetNumArguments(1);
+    event->SetArgument(0, "backtrace", buf.Steal());
+    event->Complete();
+    event = NULL;  // Complete() deletes the event.
+  }
+}
+
 ProfileFunction* Profile::FindFunction(const Function& function) {
   return (functions_ != NULL) ? functions_->Lookup(function) : NULL;
 }
@@ -2685,7 +2769,8 @@
                                     intptr_t extra_tags,
                                     SampleFilter* filter,
                                     SampleBuffer* sample_buffer,
-                                    bool as_timeline) {
+                                    PrintKind kind,
+                                    bool code_trie) {
   Isolate* isolate = thread->isolate();
   // Disable thread interrupts while processing the buffer.
   DisableThreadInterruptsScope dtis(thread);
@@ -2700,10 +2785,12 @@
     HANDLESCOPE(thread);
     Profile profile(isolate);
     profile.Build(thread, filter, sample_buffer, tag_order, extra_tags);
-    if (as_timeline) {
-      profile.PrintTimelineJSON(stream);
-    } else {
+    if (kind == kAsTimeline) {
+      profile.PrintTimelineJSON(stream, code_trie);
+    } else if (kind == kAsProfile) {
       profile.PrintProfileJSON(stream);
+    } else if (kind == kAsPlatformTimeline) {
+      profile.AddToTimeline(code_trie);
     }
   }
 }
@@ -2731,9 +2818,9 @@
   Isolate* isolate = thread->isolate();
   NoAllocationSampleFilter filter(isolate->main_port(), Thread::kMutatorTask,
                                   time_origin_micros, time_extent_micros);
-  const bool as_timeline = false;
+  bool code_trie = false;  // Doesn't matter for kAsProfile.
   PrintJSONImpl(thread, stream, tag_order, extra_tags, &filter,
-                Profiler::sample_buffer(), as_timeline);
+                Profiler::sample_buffer(), kAsProfile, code_trie);
 }
 
 class ClassAllocationSampleFilter : public SampleFilter {
@@ -2770,9 +2857,9 @@
   ClassAllocationSampleFilter filter(isolate->main_port(), cls,
                                      Thread::kMutatorTask, time_origin_micros,
                                      time_extent_micros);
-  const bool as_timeline = false;
+  bool code_trie = false;  // Doesn't matter for kAsProfile.
   PrintJSONImpl(thread, stream, tag_order, kNoExtraTags, &filter,
-                Profiler::sample_buffer(), as_timeline);
+                Profiler::sample_buffer(), kAsProfile, code_trie);
 }
 
 void ProfilerService::PrintNativeAllocationJSON(JSONStream* stream,
@@ -2781,15 +2868,16 @@
                                                 int64_t time_extent_micros) {
   Thread* thread = Thread::Current();
   NativeAllocationSampleFilter filter(time_origin_micros, time_extent_micros);
-  const bool as_timeline = false;
+  bool code_trie = false;  // Doesn't matter for kAsProfile.
   PrintJSONImpl(thread, stream, tag_order, kNoExtraTags, &filter,
-                Profiler::allocation_sample_buffer(), as_timeline);
+                Profiler::allocation_sample_buffer(), kAsProfile, code_trie);
 }
 
 void ProfilerService::PrintTimelineJSON(JSONStream* stream,
                                         Profile::TagOrder tag_order,
                                         int64_t time_origin_micros,
-                                        int64_t time_extent_micros) {
+                                        int64_t time_extent_micros,
+                                        bool code_trie) {
   Thread* thread = Thread::Current();
   Isolate* isolate = thread->isolate();
   const intptr_t thread_task_mask = Thread::kMutatorTask |
@@ -2797,9 +2885,24 @@
                                     Thread::kSweeperTask | Thread::kMarkerTask;
   NoAllocationSampleFilter filter(isolate->main_port(), thread_task_mask,
                                   time_origin_micros, time_extent_micros);
-  const bool as_timeline = true;
   PrintJSONImpl(thread, stream, tag_order, kNoExtraTags, &filter,
-                Profiler::sample_buffer(), as_timeline);
+                Profiler::sample_buffer(), kAsTimeline, code_trie);
+}
+
+void ProfilerService::AddToTimeline(Profile::TagOrder tag_order,
+                                    int64_t time_origin_micros,
+                                    int64_t time_extent_micros,
+                                    bool code_trie) {
+  JSONStream stream;
+  Thread* thread = Thread::Current();
+  Isolate* isolate = thread->isolate();
+  const intptr_t thread_task_mask = Thread::kMutatorTask |
+                                    Thread::kCompilerTask |
+                                    Thread::kSweeperTask | Thread::kMarkerTask;
+  NoAllocationSampleFilter filter(isolate->main_port(), thread_task_mask,
+                                  time_origin_micros, time_extent_micros);
+  PrintJSONImpl(thread, &stream, Profile::kNoTags, kNoExtraTags, &filter,
+                Profiler::sample_buffer(), kAsPlatformTimeline, code_trie);
 }
 
 void ProfilerService::ClearSamples() {
diff --git a/runtime/vm/profiler_service.h b/runtime/vm/profiler_service.h
index 6e7d660..55bc101 100644
--- a/runtime/vm/profiler_service.h
+++ b/runtime/vm/profiler_service.h
@@ -5,6 +5,7 @@
 #ifndef RUNTIME_VM_PROFILER_SERVICE_H_
 #define RUNTIME_VM_PROFILER_SERVICE_H_
 
+#include "platform/text_buffer.h"
 #include "vm/allocation.h"
 #include "vm/code_observers.h"
 #include "vm/globals.h"
@@ -32,6 +33,7 @@
 class SampleFilter;
 class ProcessedSample;
 class ProcessedSampleBuffer;
+class Profile;
 
 class ProfileFunctionSourcePosition {
  public:
@@ -294,6 +296,8 @@
 
   virtual void PrintToJSONArray(JSONArray* array) const = 0;
 
+  virtual const char* ToCString(Profile* profile) const = 0;
+
   // Index into function or code tables.
   intptr_t table_index() const { return table_index_; }
 
@@ -316,6 +320,9 @@
 
   ProfileTrieNode* At(intptr_t i) { return children_.At(i); }
 
+  ProfileTrieNode* parent() const { return parent_; }
+  void set_parent(ProfileTrieNode* p) { parent_ = p; }
+
   intptr_t IndexOf(ProfileTrieNode* node);
 
   intptr_t frame_id() const { return frame_id_; }
@@ -339,6 +346,7 @@
   intptr_t exclusive_allocations_;
   intptr_t inclusive_allocations_;
   ZoneGrowableArray<ProfileTrieNode*> children_;
+  ProfileTrieNode* parent_;
   intptr_t frame_id_;
 
   friend class ProfileBuilder;
@@ -386,16 +394,25 @@
   ProfileTrieNode* GetTrieRoot(TrieKind trie_kind);
 
   void PrintProfileJSON(JSONStream* stream);
-  void PrintTimelineJSON(JSONStream* stream);
+  void PrintTimelineJSON(JSONStream* stream, bool code_trie);
+
+  // Serializes sample backtraces into arguments on Instant events and adds them
+  // directly to the timeline.
+  void AddToTimeline(bool code_trie);
 
   ProfileFunction* FindFunction(const Function& function);
 
  private:
+  void AddParentTriePointers(ProfileTrieNode* current,
+                             ProfileTrieNode* parent,
+                             bool code_trie);
+  void PrintBacktrace(ProfileTrieNode* node, TextBuffer* buf);
   void PrintHeaderJSON(JSONObject* obj);
   void PrintTimelineFrameJSON(JSONObject* frames,
                               ProfileTrieNode* current,
                               ProfileTrieNode* parent,
-                              intptr_t* next_id);
+                              intptr_t* next_id,
+                              bool code_trie);
 
   Isolate* isolate_;
   Zone* zone_;
@@ -483,18 +500,31 @@
   static void PrintTimelineJSON(JSONStream* stream,
                                 Profile::TagOrder tag_order,
                                 int64_t time_origin_micros,
-                                int64_t time_extent_micros);
+                                int64_t time_extent_micros,
+                                bool code_trie);
+
+  static void AddToTimeline(Profile::TagOrder tag_order,
+                            int64_t time_origin_micros,
+                            int64_t time_extent_micros,
+                            bool code_trie);
 
   static void ClearSamples();
 
  private:
+  enum PrintKind {
+    kAsProfile,
+    kAsTimeline,
+    kAsPlatformTimeline,
+  };
+
   static void PrintJSONImpl(Thread* thread,
                             JSONStream* stream,
                             Profile::TagOrder tag_order,
                             intptr_t extra_tags,
                             SampleFilter* filter,
                             SampleBuffer* sample_buffer,
-                            bool as_timline);
+                            PrintKind kind,
+                            bool code_trie);
 };
 
 }  // namespace dart
diff --git a/runtime/vm/program_visitor.cc b/runtime/vm/program_visitor.cc
index 8260a86..bae18f7 100644
--- a/runtime/vm/program_visitor.cc
+++ b/runtime/vm/program_visitor.cc
@@ -34,7 +34,7 @@
       }
       visitor->Visit(cls);
     }
-    patches = lib.patch_classes();
+    patches = lib.owned_scripts();
     for (intptr_t j = 0; j < patches.Length(); j++) {
       entry = patches.At(j);
       if (entry.IsClass()) {
@@ -81,8 +81,8 @@
     fields_ = cls.fields();
     for (intptr_t j = 0; j < fields_.Length(); j++) {
       field_ ^= fields_.At(j);
-      if (field_.is_static() && field_.HasInitializer()) {
-        function_ ^= field_.Initializer();
+      if (field_.is_static() && field_.HasInitializerFunction()) {
+        function_ ^= field_.InitializerFunction();
         visitor_->Visit(function_);
       }
     }
@@ -320,7 +320,7 @@
 
     void Visit(const Function& function) {
       bytecode_ = function.bytecode();
-      if (!bytecode_.IsNull()) {
+      if (!bytecode_.IsNull() && !bytecode_.InVMIsolateHeap()) {
         pc_descriptor_ = bytecode_.pc_descriptors();
         if (!pc_descriptor_.IsNull()) {
           pc_descriptor_ = DedupPcDescriptor(pc_descriptor_);
@@ -653,7 +653,8 @@
         if (FLAG_precompiled_mode) {
           if (!function.IsSignatureFunction() &&
               !function.IsClosureFunction() &&
-              (function.name() != Symbols::Call().raw()) && !list_.InVMHeap()) {
+              (function.name() != Symbols::Call().raw()) &&
+              !list_.InVMIsolateHeap()) {
             // Parameter types not needed for function type tests.
             for (intptr_t i = 0; i < list_.Length(); i++) {
               list_.SetAt(i, Object::dynamic_type());
@@ -668,7 +669,8 @@
       if (!list_.IsNull()) {
         // Preserve parameter names in case of recompilation for the JIT.
         if (FLAG_precompiled_mode) {
-          if (!function.HasOptionalNamedParameters() && !list_.InVMHeap()) {
+          if (!function.HasOptionalNamedParameters() &&
+              !list_.InVMIsolateHeap()) {
             // Parameter names not needed for resolution.
             for (intptr_t i = 0; i < list_.Length(); i++) {
               list_.SetAt(i, Symbols::OptimizedOut());
@@ -681,7 +683,7 @@
     }
 
     RawArray* DedupList(const Array& list) {
-      if (list.InVMHeap()) {
+      if (list.InVMIsolateHeap()) {
         // Avoid using read-only VM objects for de-duplication.
         return list.raw();
       }
diff --git a/runtime/vm/raw_object.cc b/runtime/vm/raw_object.cc
index 7735f4d..78a9445 100644
--- a/runtime/vm/raw_object.cc
+++ b/runtime/vm/raw_object.cc
@@ -15,6 +15,10 @@
 
 namespace dart {
 
+bool RawObject::InVMIsolateHeap() const {
+  return Dart::vm_isolate()->heap()->Contains(ToAddr(this));
+}
+
 void RawObject::Validate(Isolate* isolate) const {
   if (Object::void_class_ == reinterpret_cast<RawClass*>(kHeapObjectTag)) {
     // Validation relies on properly initialized class classes. Skip if the
@@ -269,22 +273,25 @@
 #undef RAW_VISITPOINTERS
 #define RAW_VISITPOINTERS(clazz) case kExternalTypedData##clazz##Cid:
     CLASS_LIST_TYPED_DATA(RAW_VISITPOINTERS) {
-      RawExternalTypedData* raw_obj =
-          reinterpret_cast<RawExternalTypedData*>(this);
+      auto raw_obj = reinterpret_cast<RawExternalTypedData*>(this);
       size = RawExternalTypedData::VisitExternalTypedDataPointers(raw_obj,
                                                                   visitor);
       break;
     }
 #undef RAW_VISITPOINTERS
-#define RAW_VISITPOINTERS(clazz) case kTypedData##clazz##ViewCid:
-    CLASS_LIST_TYPED_DATA(RAW_VISITPOINTERS)
     case kByteDataViewCid:
+#define RAW_VISITPOINTERS(clazz) case kTypedData##clazz##ViewCid:
+      CLASS_LIST_TYPED_DATA(RAW_VISITPOINTERS) {
+        auto raw_obj = reinterpret_cast<RawTypedDataView*>(this);
+        size = RawTypedDataView::VisitTypedDataViewPointers(raw_obj, visitor);
+        break;
+      }
+#undef RAW_VISITPOINTERS
     case kByteBufferCid: {
       RawInstance* raw_obj = reinterpret_cast<RawInstance*>(this);
       size = RawInstance::VisitInstancePointers(raw_obj, visitor);
       break;
     }
-#undef RAW_VISITPOINTERS
     case kFfiPointerCid: {
       RawPointer* raw_obj = reinterpret_cast<RawPointer*>(this);
       size = RawPointer::VisitPointerPointers(raw_obj, visitor);
@@ -351,6 +358,22 @@
     return Type::InstanceSize();                                               \
   }
 
+// It calls the from() and to() methods on the raw object to get the first and
+// last cells that need visiting.
+//
+// Though as opposed to Similar to [REGULAR_VISITOR] this visitor will call the
+// specializd VisitTypedDataViewPointers
+#define TYPED_DATA_VIEW_VISITOR(Type)                                          \
+  intptr_t Raw##Type::Visit##Type##Pointers(Raw##Type* raw_obj,                \
+                                            ObjectPointerVisitor* visitor) {   \
+    /* Make sure that we got here with the tagged pointer as this. */          \
+    ASSERT(raw_obj->IsHeapObject());                                           \
+    ASSERT_UNCOMPRESSED(Type);                                                 \
+    visitor->VisitTypedDataViewPointers(raw_obj, raw_obj->from(),              \
+                                        raw_obj->to());                        \
+    return Type::InstanceSize();                                               \
+  }
+
 // For variable length objects. get_length is a code snippet that gets the
 // length of the object, which is passed to InstanceSize and the to() method.
 #define VARIABLE_VISITOR(Type, get_length)                                     \
@@ -427,6 +450,7 @@
 COMPRESSED_VISITOR(GrowableObjectArray)
 COMPRESSED_VISITOR(LinkedHashMap)
 COMPRESSED_VISITOR(ExternalTypedData)
+TYPED_DATA_VIEW_VISITOR(TypedDataView)
 REGULAR_VISITOR(ReceivePort)
 REGULAR_VISITOR(StackTrace)
 REGULAR_VISITOR(RegExp)
@@ -463,6 +487,7 @@
 VARIABLE_NULL_VISITOR(TwoByteString, Smi::Value(raw_obj->ptr()->length_))
 // Abstract types don't have their visitor called.
 UNREACHABLE_VISITOR(AbstractType)
+UNREACHABLE_VISITOR(TypedDataBase)
 UNREACHABLE_VISITOR(Error)
 UNREACHABLE_VISITOR(Number)
 UNREACHABLE_VISITOR(Integer)
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 3fecf1c..ffff441 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -121,10 +121,10 @@
     kOldBit = 3,                  // Incremental barrier source.
     kOldAndNotRememberedBit = 4,  // Generational barrier source.
     kCanonicalBit = 5,
-    kVMHeapObjectBit = 6,
-    kGraphMarkedBit = 7,  // ObjectGraph needs to mark through new space.
+    kReservedTagPos = 6,
+    kReservedTagSize = 2,
 
-    kSizeTagPos = 8,
+    kSizeTagPos = kReservedTagPos + kReservedTagSize,  // = 8
     kSizeTagSize = 8,
     kClassIdTagPos = kSizeTagPos + kSizeTagSize,  // = 16
     kClassIdTagSize = 16,
@@ -190,19 +190,17 @@
 
   class NewBit : public BitField<uint32_t, bool, kNewBit, 1> {};
 
-  class CanonicalObjectTag : public BitField<uint32_t, bool, kCanonicalBit, 1> {
-  };
-
-  class GraphMarkedBit : public BitField<uint32_t, bool, kGraphMarkedBit, 1> {};
-
-  class VMHeapObjectTag : public BitField<uint32_t, bool, kVMHeapObjectBit, 1> {
-  };
+  class CanonicalBit : public BitField<uint32_t, bool, kCanonicalBit, 1> {};
 
   class OldBit : public BitField<uint32_t, bool, kOldBit, 1> {};
 
   class OldAndNotRememberedBit
       : public BitField<uint32_t, bool, kOldAndNotRememberedBit, 1> {};
 
+  class ReservedBits
+      : public BitField<uint32_t, intptr_t, kReservedTagPos, kReservedTagSize> {
+  };
+
   bool IsWellFormed() const {
     uword value = reinterpret_cast<uword>(this);
     return (value & kSmiTagMask) == 0 ||
@@ -250,7 +248,8 @@
     return (addr & kObjectAlignmentMask) != kOldObjectBits;
   }
 
-  // Support for GC marking bit.
+  // Support for GC marking bit. Marked objects are either grey (not yet
+  // visited) or black (already visited).
   bool IsMarked() const {
     ASSERT(IsOldObject());
     return !OldAndNotMarkedBit::decode(ptr()->tags_);
@@ -278,28 +277,13 @@
     return TryClearTagBit<OldAndNotMarkedBit>();
   }
 
-  // Support for object tags.
-  bool IsCanonical() const { return CanonicalObjectTag::decode(ptr()->tags_); }
-  void SetCanonical() { UpdateTagBit<CanonicalObjectTag>(true); }
-  void ClearCanonical() { UpdateTagBit<CanonicalObjectTag>(false); }
-  bool IsVMHeapObject() const { return VMHeapObjectTag::decode(ptr()->tags_); }
-  void SetVMHeapObject() { UpdateTagBit<VMHeapObjectTag>(true); }
+  // Canonical objects have the property that two canonical objects are
+  // logically equal iff they are the same object (pointer equal).
+  bool IsCanonical() const { return CanonicalBit::decode(ptr()->tags_); }
+  void SetCanonical() { UpdateTagBit<CanonicalBit>(true); }
+  void ClearCanonical() { UpdateTagBit<CanonicalBit>(false); }
 
-  // Support for ObjectGraph marking bit.
-  bool IsGraphMarked() const {
-    if (IsVMHeapObject()) return true;
-    return GraphMarkedBit::decode(ptr()->tags_);
-  }
-  void SetGraphMarked() {
-    ASSERT(!IsVMHeapObject());
-    uint32_t tags = ptr()->tags_;
-    ptr()->tags_ = GraphMarkedBit::update(true, tags);
-  }
-  void ClearGraphMarked() {
-    ASSERT(!IsVMHeapObject());
-    uint32_t tags = ptr()->tags_;
-    ptr()->tags_ = GraphMarkedBit::update(false, tags);
-  }
+  bool InVMIsolateHeap() const;
 
   // Support for GC remembered bit.
   bool IsRemembered() const {
@@ -316,6 +300,13 @@
     UpdateTagBit<OldAndNotRememberedBit>(true);
   }
 
+  DART_FORCE_INLINE
+  void AddToRememberedSet(Thread* thread) {
+    ASSERT(!this->IsRemembered());
+    this->SetRememberedBit();
+    thread->StoreBufferAddObject(this);
+  }
+
   bool IsCardRemembered() const {
     return CardRememberedBit::decode(ptr()->tags_);
   }
@@ -456,12 +447,8 @@
     return reinterpret_cast<uword>(raw_obj->ptr());
   }
 
-  static bool IsVMHeapObject(intptr_t value) {
-    return VMHeapObjectTag::decode(value);
-  }
-
   static bool IsCanonical(intptr_t value) {
-    return CanonicalObjectTag::decode(value);
+    return CanonicalBit::decode(value);
   }
 
   // Class Id predicates.
@@ -578,9 +565,7 @@
       if (value->IsNewObject()) {
         // Generational barrier: record when a store creates an
         // old-and-not-remembered -> new reference.
-        ASSERT(!this->IsRemembered());
-        this->SetRememberedBit();
-        thread->StoreBufferAddObject(this);
+        AddToRememberedSet(thread);
       } else {
         // Incremental barrier: record when a store creates an
         // old -> old-and-not-marked reference.
@@ -702,6 +687,7 @@
   friend class RawInstance;
   friend class RawString;
   friend class RawTypedData;
+  friend class RawTypedDataView;
   friend class Scavenger;
   friend class ScavengerVisitor;
   friend class SizeExcludingClassVisitor;  // GetClassId
@@ -716,9 +702,10 @@
   friend class Deserializer;
   friend class SnapshotWriter;
   friend class String;
-  friend class Type;  // GetClassId
-  friend class TypedData;
-  friend class TypedDataView;
+  friend class Type;                    // GetClassId
+  friend class TypedDataBase;           // GetClassId
+  friend class TypedData;               // GetClassId
+  friend class TypedDataView;           // GetClassId
   friend class WeakProperty;            // StorePointer
   friend class Instance;                // StorePointer
   friend class StackFrame;              // GetCodeObject assertion.
@@ -864,6 +851,7 @@
     kImplicitSetter,             // represents an implicit setter for fields.
     kImplicitStaticFinalGetter,  // represents an implicit getter for static
                                  // final fields (incl. static const fields).
+    kStaticFieldInitializer,
     kMethodExtractor,  // converts method into implicit closure on the receiver.
     kNoSuchMethodDispatcher,  // invokes noSuchMethod.
     kInvokeFieldDispatcher,   // invokes a field as a closure.
@@ -907,7 +895,8 @@
   RawArray* parameter_types_;
   RawArray* parameter_names_;
   RawTypeArguments* type_parameters_;  // Array of TypeParameter.
-  RawObject* data_;  // Additional data specific to the function kind.
+  RawObject* data_;  // Additional data specific to the function kind. See
+                     // Function::set_data() for details.
   RawObject** to_snapshot(Snapshot::Kind kind) {
     switch (kind) {
       case Snapshot::kFullAOT:
@@ -947,6 +936,8 @@
                    bool,
                    PackedHasNamedOptionalParameters::kNextBit,
                    1>
+      OptimizableBit;
+  typedef BitField<uint32_t, bool, OptimizableBit::kNextBit, 1>
       BackgroundOptimizableBit;
   typedef BitField<uint32_t,
                    uint16_t,
@@ -963,7 +954,6 @@
                 "RawFunction::packed_fields_ bitfields don't align.");
 
 #define JIT_FUNCTION_COUNTERS(F)                                               \
-  F(intptr_t, intptr_t, kernel_offset)                                         \
   F(intptr_t, int32_t, usage_counter)                                          \
   F(intptr_t, uint16_t, optimized_instruction_count)                           \
   F(intptr_t, uint16_t, optimized_call_site_count)                             \
@@ -972,12 +962,15 @@
   F(int, int8_t, inlining_depth)
 
 #if !defined(DART_PRECOMPILED_RUNTIME)
+  typedef BitField<uint32_t, bool, 0, 1> IsDeclaredInBytecode;
+  typedef BitField<uint32_t, uint32_t, 1, 31> BinaryDeclarationOffset;
+  uint32_t binary_declaration_;
+
 #define DECLARE(return_type, type, name) type name##_;
-
   JIT_FUNCTION_COUNTERS(DECLARE)
-
 #undef DECLARE
-#endif
+
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
 };
 
 class RawClosureData : public RawObject {
@@ -1025,7 +1018,8 @@
 
   VISIT_FROM(RawObject*, signature_type_);
   RawType* signature_type_;
-  VISIT_TO(RawObject*, signature_type_);
+  RawFunction* c_signature_;
+  VISIT_TO(RawObject*, c_signature_);
 };
 
 class RawField : public RawObject {
@@ -1040,7 +1034,7 @@
     RawInstance* static_value_;  // Value for static fields.
     RawSmi* offset_;             // Offset in words for instance fields.
   } value_;
-  RawFunction* initializer_;  // Static initializer function.
+  RawFunction* initializer_function_;  // Static initializer function.
   // When generating APPJIT snapshots after running the application it is
   // necessary to save the initial value of static fields so that we can
   // restore the value back to the original initial value.
@@ -1056,7 +1050,7 @@
       case Snapshot::kFullJIT:
         return reinterpret_cast<RawObject**>(&ptr()->dependent_code_);
       case Snapshot::kFullAOT:
-        return reinterpret_cast<RawObject**>(&ptr()->initializer_);
+        return reinterpret_cast<RawObject**>(&ptr()->initializer_function_);
       case Snapshot::kMessage:
       case Snapshot::kNone:
       case Snapshot::kInvalid:
@@ -1075,8 +1069,14 @@
   TokenPosition end_token_pos_;
   classid_t guarded_cid_;
   classid_t is_nullable_;  // kNullCid if field can contain null value and
-                           // any other value otherwise.
-  NOT_IN_PRECOMPILED(intptr_t kernel_offset_);
+                           // kInvalidCid otherwise.
+
+#if !defined(DART_PRECOMPILED_RUNTIME)
+  typedef BitField<uint32_t, bool, 0, 1> IsDeclaredInBytecode;
+  typedef BitField<uint32_t, uint32_t, 1, 31> BinaryDeclarationOffset;
+  uint32_t binary_declaration_;
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
+
   // Offset to the guarded length field inside an instance of class matching
   // guarded_cid_. Stored corrected by -kHeapObjectTag to simplify code
   // generated on platforms with weak addressing modes (ARM).
@@ -1156,7 +1156,7 @@
   RawArray* dictionary_;              // Top-level names in this library.
   RawGrowableObjectArray* metadata_;  // Metadata on classes, methods etc.
   RawClass* toplevel_class_;          // Class containing top-level elements.
-  RawGrowableObjectArray* patch_classes_;
+  RawGrowableObjectArray* owned_scripts_;
   RawArray* imports_;        // List of Namespaces imported without prefix.
   RawArray* exports_;        // List of re-exported Namespaces.
   RawInstance* load_error_;  // Error iff load_state_ == kLoadError.
@@ -1704,10 +1704,8 @@
   RawArray* entries_;          // Contains class-ids, target and count.
   RawString* target_name_;     // Name of target function.
   RawArray* args_descriptor_;  // Arguments descriptor.
-  // Static type of the receiver. If it is set then we are performing
-  // exactness profiling for the receiver type. See StaticTypeExactnessState
-  // class for more information.
-  NOT_IN_PRECOMPILED(RawAbstractType* static_receiver_type_);
+  // Static type of the receiver, if instance call and available.
+  NOT_IN_PRECOMPILED(RawAbstractType* receivers_static_type_);
   RawObject* owner_;  // Parent/calling function or original IC of cloned IC.
   VISIT_TO(RawObject*, owner_);
   RawObject** to_snapshot(Snapshot::Kind kind) {
@@ -1912,6 +1910,15 @@
 };
 
 class RawTypeParameter : public RawAbstractType {
+ public:
+  enum {
+    kFinalizedBit = 0,
+    kGenericCovariantImplBit,
+  };
+  class FinalizedBit : public BitField<uint8_t, bool, kFinalizedBit, 1> {};
+  class GenericCovariantImplBit
+      : public BitField<uint8_t, bool, kGenericCovariantImplBit, 1> {};
+
  private:
   RAW_HEAP_OBJECT_IMPLEMENTATION(TypeParameter);
 
@@ -1924,7 +1931,7 @@
   classid_t parameterized_class_id_;
   TokenPosition token_pos_;
   int16_t index_;
-  int8_t type_state_;
+  uint8_t flags_;
 
   RawObject** to_snapshot(Snapshot::Kind kind) { return to(); }
 
@@ -2060,6 +2067,129 @@
   friend class String;
 };
 
+// Abstract base class for RawTypedData/RawExternalTypedData/RawTypedDataView.
+class RawTypedDataBase : public RawInstance {
+ protected:
+  // The contents of [data_] depends on what concrete subclass is used:
+  //
+  //  - RawTypedData: Start of the payload.
+  //  - RawExternalTypedData: Start of the C-heap payload.
+  //  - RawTypedDataView: The [data_] field of the backing store for the view
+  //    plus the [offset_in_bytes_] the view has.
+  //
+  // During allocation or snapshot reading the [data_] can be temporarily
+  // nullptr (which is the case for views which just got created but haven't
+  // gotten the backing store set).
+  uint8_t* data_;
+
+  // The length of the view in element sizes (obtainable via
+  // [TypedDataBase::ElementSizeInBytes]).
+  RawSmi* length_;
+
+ private:
+  friend class RawTypedDataView;
+  RAW_HEAP_OBJECT_IMPLEMENTATION(TypedDataBase);
+};
+
+class RawTypedData : public RawTypedDataBase {
+  RAW_HEAP_OBJECT_IMPLEMENTATION(TypedData);
+
+ public:
+  static intptr_t payload_offset() {
+    return OFFSET_OF_RETURNED_VALUE(RawTypedData, internal_data);
+  }
+
+  // Recompute [data_] pointer to internal data.
+  void RecomputeDataField() { ptr()->data_ = ptr()->internal_data(); }
+
+ protected:
+  VISIT_FROM(RawCompressed, length_)
+  VISIT_TO_LENGTH(RawCompressed, &ptr()->length_)
+
+  // Variable length data follows here.
+
+  uint8_t* internal_data() { OPEN_ARRAY_START(uint8_t, uint8_t); }
+  const uint8_t* internal_data() const { OPEN_ARRAY_START(uint8_t, uint8_t); }
+
+  uint8_t* data() {
+    ASSERT(data_ == internal_data());
+    return data_;
+  }
+  const uint8_t* data() const {
+    ASSERT(data_ == internal_data());
+    return data_;
+  }
+
+  friend class Api;
+  friend class Instance;
+  friend class NativeEntryData;
+  friend class Object;
+  friend class ObjectPool;
+  friend class ObjectPoolDeserializationCluster;
+  friend class ObjectPoolSerializationCluster;
+  friend class RawObjectPool;
+  friend class SnapshotReader;
+};
+
+// All _*ArrayView/_ByteDataView classes share the same layout.
+class RawTypedDataView : public RawTypedDataBase {
+  RAW_HEAP_OBJECT_IMPLEMENTATION(TypedDataView);
+
+ public:
+  // Recompute [data_] based on internal/external [typed_data_].
+  void RecomputeDataField() {
+    const intptr_t offset_in_bytes = ValueFromRawSmi(ptr()->offset_in_bytes_);
+    uint8_t* payload = ptr()->typed_data_->ptr()->data_;
+    ptr()->data_ = payload + offset_in_bytes;
+  }
+
+  // Recopute [data_] based on internal [typed_data_] - needs to be called by GC
+  // whenever the backing store moved.
+  //
+  // NOTICE: This method assumes [this] is the forwarded object and the
+  // [typed_data_] pointer points to the new backing store. The backing store's
+  // fields don't need to be valid - only it's address.
+  void RecomputeDataFieldForInternalTypedData() {
+    const intptr_t offset_in_bytes = ValueFromRawSmi(ptr()->offset_in_bytes_);
+    uint8_t* payload = reinterpret_cast<uint8_t*>(
+        RawObject::ToAddr(ptr()->typed_data_) + RawTypedData::payload_offset());
+    ptr()->data_ = payload + offset_in_bytes;
+  }
+
+  void ValidateInnerPointer() {
+    if (ptr()->typed_data_->GetClassId() == kNullCid) {
+      // The view object must have gotten just initialized.
+      if (ptr()->data_ != nullptr ||
+          ValueFromRawSmi(ptr()->offset_in_bytes_) != 0 ||
+          ValueFromRawSmi(ptr()->length_) != 0) {
+        FATAL("RawTypedDataView has invalid inner pointer.");
+      }
+    } else {
+      const intptr_t offset_in_bytes = ValueFromRawSmi(ptr()->offset_in_bytes_);
+      uint8_t* payload = ptr()->typed_data_->ptr()->data_;
+      if ((payload + offset_in_bytes) != ptr()->data_) {
+        FATAL("RawTypedDataView has invalid inner pointer.");
+      }
+    }
+  }
+
+ protected:
+  VISIT_FROM(RawObject*, length_)
+  RawTypedDataBase* typed_data_;
+  RawSmi* offset_in_bytes_;
+  VISIT_TO(RawObject*, offset_in_bytes_)
+  RawObject** to_snapshot(Snapshot::Kind kind) { return to(); }
+
+  friend class Api;
+  friend class Object;
+  friend class ObjectPoolDeserializationCluster;
+  friend class ObjectPoolSerializationCluster;
+  friend class RawObjectPool;
+  friend class GCCompactor;
+  friend class ScavengerVisitor;
+  friend class SnapshotReader;
+};
+
 class RawExternalOneByteString : public RawString {
   RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalOneByteString);
 
@@ -2204,38 +2334,13 @@
 #error Architecture is not 32-bit or 64-bit.
 #endif  // ARCH_IS_32_BIT
 
-class RawTypedData : public RawInstance {
-  RAW_HEAP_OBJECT_IMPLEMENTATION(TypedData);
-
- protected:
-  VISIT_FROM(RawCompressed, length_)
-  RawSmi* length_;
-  VISIT_TO_LENGTH(RawCompressed, &ptr()->length_)
-  // Variable length data follows here.
-  uint8_t* data() { OPEN_ARRAY_START(uint8_t, uint8_t); }
-  const uint8_t* data() const { OPEN_ARRAY_START(uint8_t, uint8_t); }
-
-  friend class Api;
-  friend class Instance;
-  friend class NativeEntryData;
-  friend class Object;
-  friend class ObjectPool;
-  friend class ObjectPoolDeserializationCluster;
-  friend class ObjectPoolSerializationCluster;
-  friend class RawObjectPool;
-  friend class SnapshotReader;
-};
-
-class RawExternalTypedData : public RawInstance {
+class RawExternalTypedData : public RawTypedDataBase {
   RAW_HEAP_OBJECT_IMPLEMENTATION(ExternalTypedData);
 
  protected:
   VISIT_FROM(RawCompressed, length_)
-  RawSmi* length_;
   VISIT_TO(RawCompressed, length_)
 
-  uint8_t* data_;
-
   friend class RawBytecode;
 };
 
@@ -2243,8 +2348,8 @@
   RAW_HEAP_OBJECT_IMPLEMENTATION(Pointer);
   VISIT_FROM(RawCompressed, type_arguments_)
   RawTypeArguments* type_arguments_;
-  VISIT_TO(RawCompressed, type_arguments_)
-  uint8_t* c_memory_address_;
+  RawInteger* c_memory_address_;
+  VISIT_TO(RawCompressed, c_memory_address_)
 
   friend class Pointer;
 };
@@ -2306,6 +2411,7 @@
 
   VISIT_FROM(RawObject*, num_bracket_expressions_)
   RawSmi* num_bracket_expressions_;
+  RawArray* capture_name_map_;
   RawString* pattern_;  // Pattern to be used for matching.
   union {
     RawFunction* function_;
@@ -2458,73 +2564,35 @@
 
 inline bool RawObject::IsTypedDataClassId(intptr_t index) {
   // Make sure this is updated when new TypedData types are added.
-  COMPILE_ASSERT(kTypedDataUint8ArrayCid == kTypedDataInt8ArrayCid + 1 &&
-                 kTypedDataUint8ClampedArrayCid == kTypedDataInt8ArrayCid + 2 &&
-                 kTypedDataInt16ArrayCid == kTypedDataInt8ArrayCid + 3 &&
-                 kTypedDataUint16ArrayCid == kTypedDataInt8ArrayCid + 4 &&
-                 kTypedDataInt32ArrayCid == kTypedDataInt8ArrayCid + 5 &&
-                 kTypedDataUint32ArrayCid == kTypedDataInt8ArrayCid + 6 &&
-                 kTypedDataInt64ArrayCid == kTypedDataInt8ArrayCid + 7 &&
-                 kTypedDataUint64ArrayCid == kTypedDataInt8ArrayCid + 8 &&
-                 kTypedDataFloat32ArrayCid == kTypedDataInt8ArrayCid + 9 &&
-                 kTypedDataFloat64ArrayCid == kTypedDataInt8ArrayCid + 10 &&
-                 kTypedDataFloat32x4ArrayCid == kTypedDataInt8ArrayCid + 11 &&
-                 kTypedDataInt32x4ArrayCid == kTypedDataInt8ArrayCid + 12 &&
-                 kTypedDataFloat64x2ArrayCid == kTypedDataInt8ArrayCid + 13 &&
-                 kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 14);
-  return (index >= kTypedDataInt8ArrayCid &&
-          index <= kTypedDataFloat64x2ArrayCid);
+  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 3 == kTypedDataUint8ArrayCid);
+
+  const bool is_typed_data_base =
+      index >= kTypedDataInt8ArrayCid && index < kByteDataViewCid;
+  return is_typed_data_base && ((index - kTypedDataInt8ArrayCid) % 3) ==
+                                   kTypedDataCidRemainderInternal;
 }
 
 inline bool RawObject::IsTypedDataViewClassId(intptr_t index) {
   // Make sure this is updated when new TypedData types are added.
-  COMPILE_ASSERT(
-      kTypedDataUint8ArrayViewCid == kTypedDataInt8ArrayViewCid + 1 &&
-      kTypedDataUint8ClampedArrayViewCid == kTypedDataInt8ArrayViewCid + 2 &&
-      kTypedDataInt16ArrayViewCid == kTypedDataInt8ArrayViewCid + 3 &&
-      kTypedDataUint16ArrayViewCid == kTypedDataInt8ArrayViewCid + 4 &&
-      kTypedDataInt32ArrayViewCid == kTypedDataInt8ArrayViewCid + 5 &&
-      kTypedDataUint32ArrayViewCid == kTypedDataInt8ArrayViewCid + 6 &&
-      kTypedDataInt64ArrayViewCid == kTypedDataInt8ArrayViewCid + 7 &&
-      kTypedDataUint64ArrayViewCid == kTypedDataInt8ArrayViewCid + 8 &&
-      kTypedDataFloat32ArrayViewCid == kTypedDataInt8ArrayViewCid + 9 &&
-      kTypedDataFloat64ArrayViewCid == kTypedDataInt8ArrayViewCid + 10 &&
-      kTypedDataFloat32x4ArrayViewCid == kTypedDataInt8ArrayViewCid + 11 &&
-      kTypedDataInt32x4ArrayViewCid == kTypedDataInt8ArrayViewCid + 12 &&
-      kTypedDataFloat64x2ArrayViewCid == kTypedDataInt8ArrayViewCid + 13 &&
-      kByteDataViewCid == kTypedDataInt8ArrayViewCid + 14 &&
-      kExternalTypedDataInt8ArrayCid == kTypedDataInt8ArrayViewCid + 15);
-  return (index >= kTypedDataInt8ArrayViewCid && index <= kByteDataViewCid);
+  COMPILE_ASSERT(kTypedDataInt8ArrayViewCid + 3 == kTypedDataUint8ArrayViewCid);
+
+  const bool is_typed_data_base =
+      index >= kTypedDataInt8ArrayCid && index < kByteDataViewCid;
+  const bool is_byte_data_view = index == kByteDataViewCid;
+  return is_byte_data_view ||
+         (is_typed_data_base &&
+          ((index - kTypedDataInt8ArrayCid) % 3) == kTypedDataCidRemainderView);
 }
 
 inline bool RawObject::IsExternalTypedDataClassId(intptr_t index) {
-  // Make sure this is updated when new ExternalTypedData types are added.
-  COMPILE_ASSERT(
-      (kExternalTypedDataUint8ArrayCid == kExternalTypedDataInt8ArrayCid + 1) &&
-      (kExternalTypedDataUint8ClampedArrayCid ==
-       kExternalTypedDataInt8ArrayCid + 2) &&
-      (kExternalTypedDataInt16ArrayCid == kExternalTypedDataInt8ArrayCid + 3) &&
-      (kExternalTypedDataUint16ArrayCid ==
-       kExternalTypedDataInt8ArrayCid + 4) &&
-      (kExternalTypedDataInt32ArrayCid == kExternalTypedDataInt8ArrayCid + 5) &&
-      (kExternalTypedDataUint32ArrayCid ==
-       kExternalTypedDataInt8ArrayCid + 6) &&
-      (kExternalTypedDataInt64ArrayCid == kExternalTypedDataInt8ArrayCid + 7) &&
-      (kExternalTypedDataUint64ArrayCid ==
-       kExternalTypedDataInt8ArrayCid + 8) &&
-      (kExternalTypedDataFloat32ArrayCid ==
-       kExternalTypedDataInt8ArrayCid + 9) &&
-      (kExternalTypedDataFloat64ArrayCid ==
-       kExternalTypedDataInt8ArrayCid + 10) &&
-      (kExternalTypedDataFloat32x4ArrayCid ==
-       kExternalTypedDataInt8ArrayCid + 11) &&
-      (kExternalTypedDataInt32x4ArrayCid ==
-       kExternalTypedDataInt8ArrayCid + 12) &&
-      (kExternalTypedDataFloat64x2ArrayCid ==
-       kExternalTypedDataInt8ArrayCid + 13) &&
-      (kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14));
-  return (index >= kExternalTypedDataInt8ArrayCid &&
-          index <= kExternalTypedDataFloat64x2ArrayCid);
+  // Make sure this is updated when new TypedData types are added.
+  COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid + 3 ==
+                 kExternalTypedDataUint8ArrayCid);
+
+  const bool is_typed_data_base =
+      index >= kTypedDataInt8ArrayCid && index < kByteDataViewCid;
+  return is_typed_data_base && ((index - kTypedDataInt8ArrayCid) % 3) ==
+                                   kTypedDataCidRemainderExternal;
 }
 
 inline bool RawObject::IsFfiNativeTypeTypeClassId(intptr_t index) {
@@ -2600,16 +2668,36 @@
 // is defined by the VM but are used in the VM code by computing the
 // implicit field offsets of the various fields in the dart object.
 inline bool RawObject::IsImplicitFieldClassId(intptr_t index) {
-  return (IsTypedDataViewClassId(index) || index == kByteBufferCid);
+  return index == kByteBufferCid;
 }
 
 inline intptr_t RawObject::NumberOfTypedDataClasses() {
   // Make sure this is updated when new TypedData types are added.
-  COMPILE_ASSERT(kTypedDataInt8ArrayViewCid == kTypedDataInt8ArrayCid + 14);
-  COMPILE_ASSERT(kExternalTypedDataInt8ArrayCid ==
-                 kTypedDataInt8ArrayViewCid + 15);
-  COMPILE_ASSERT(kByteBufferCid == kExternalTypedDataInt8ArrayCid + 14);
-  COMPILE_ASSERT(kNullCid == kByteBufferCid + 1);
+
+  // Ensure that each typed data type comes in internal/view/external variants
+  // next to each other.
+  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 1 == kTypedDataInt8ArrayViewCid);
+  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 2 == kExternalTypedDataInt8ArrayCid);
+
+  // Ensure the order of the typed data members in 3-step.
+  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 1 * 3 == kTypedDataUint8ArrayCid);
+  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 2 * 3 ==
+                 kTypedDataUint8ClampedArrayCid);
+  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 3 * 3 == kTypedDataInt16ArrayCid);
+  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 4 * 3 == kTypedDataUint16ArrayCid);
+  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 5 * 3 == kTypedDataInt32ArrayCid);
+  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 6 * 3 == kTypedDataUint32ArrayCid);
+  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 7 * 3 == kTypedDataInt64ArrayCid);
+  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 8 * 3 == kTypedDataUint64ArrayCid);
+  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 9 * 3 == kTypedDataFloat32ArrayCid);
+  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 10 * 3 == kTypedDataFloat64ArrayCid);
+  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 11 * 3 ==
+                 kTypedDataFloat32x4ArrayCid);
+  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 12 * 3 == kTypedDataInt32x4ArrayCid);
+  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 13 * 3 ==
+                 kTypedDataFloat64x2ArrayCid);
+  COMPILE_ASSERT(kTypedDataInt8ArrayCid + 14 * 3 == kByteDataViewCid);
+  COMPILE_ASSERT(kByteBufferCid + 1 == kNullCid);
   return (kNullCid - kTypedDataInt8ArrayCid);
 }
 
diff --git a/runtime/vm/raw_object_fields.cc b/runtime/vm/raw_object_fields.cc
index 7332edb..5728dad 100644
--- a/runtime/vm/raw_object_fields.cc
+++ b/runtime/vm/raw_object_fields.cc
@@ -56,7 +56,7 @@
   F(Field, guarded_list_length_)                                               \
   F(Field, dependent_code_)                                                    \
   F(Field, type_test_cache_)                                                   \
-  F(Field, initializer_)                                                       \
+  F(Field, initializer_function_)                                              \
   F(Script, url_)                                                              \
   F(Script, resolved_url_)                                                     \
   F(Script, compile_time_constants_)                                           \
@@ -71,7 +71,7 @@
   F(Library, dictionary_)                                                      \
   F(Library, metadata_)                                                        \
   F(Library, toplevel_class_)                                                  \
-  F(Library, patch_classes_)                                                   \
+  F(Library, owned_scripts_)                                                   \
   F(Library, imports_)                                                         \
   F(Library, exports_)                                                         \
   F(Library, load_error_)                                                      \
@@ -178,6 +178,7 @@
   F(StackTrace, code_array_)                                                   \
   F(StackTrace, pc_offset_array_)                                              \
   F(RegExp, num_bracket_expressions_)                                          \
+  F(RegExp, capture_name_map_)                                                 \
   F(RegExp, pattern_)                                                          \
   F(RegExp, external_one_byte_function_)                                       \
   F(RegExp, external_two_byte_function_)                                       \
diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc
index 2222f8d..20e3983 100644
--- a/runtime/vm/raw_object_snapshot.cc
+++ b/runtime/vm/raw_object_snapshot.cc
@@ -29,10 +29,8 @@
 // allocations may happen.
 #define READ_OBJECT_FIELDS(object, from, to, as_reference)                     \
   intptr_t num_flds = (to) - (from);                                           \
-  intptr_t from_offset = OFFSET_OF_FROM(object);                               \
   for (intptr_t i = 0; i <= num_flds; i++) {                                   \
-    (*reader->PassiveObjectHandle()) =                                         \
-        reader->ReadObjectImpl(as_reference, object_id, (i + from_offset));    \
+    (*reader->PassiveObjectHandle()) = reader->ReadObjectImpl(as_reference);   \
     object.StorePointer(((from) + i), reader->PassiveObjectHandle()->raw());   \
   }
 
@@ -96,16 +94,12 @@
   ASSERT(reader != NULL);
 
   // Determine if the type class of this type is in the full snapshot.
-  bool typeclass_is_in_fullsnapshot = reader->Read<bool>();
+  reader->Read<bool>();
 
   // Allocate type object.
   Type& type = Type::ZoneHandle(reader->zone(), Type::New());
   bool is_canonical = RawObject::IsCanonical(tags);
-  bool defer_canonicalization =
-      is_canonical &&
-      ((kind == Snapshot::kMessage) ||
-       (!Snapshot::IsFull(kind) && typeclass_is_in_fullsnapshot));
-  reader->AddBackRef(object_id, &type, kIsDeserialized, defer_canonicalization);
+  reader->AddBackRef(object_id, &type, kIsDeserialized);
 
   // Set all non object fields.
   type.set_token_pos(TokenPosition::SnapshotDecode(reader->Read<int32_t>()));
@@ -115,16 +109,15 @@
   reader->EnqueueTypePostprocessing(type);
 
   // Set all the object fields.
-  READ_OBJECT_FIELDS(type, type.raw()->from(), type.raw()->to(), kAsReference);
+  READ_OBJECT_FIELDS(type, type.raw()->from(), type.raw()->to(), as_reference);
 
   // Read in the type class.
   (*reader->ClassHandle()) =
-      Class::RawCast(reader->ReadObjectImpl(kAsReference));
+      Class::RawCast(reader->ReadObjectImpl(as_reference));
   type.set_type_class(*reader->ClassHandle());
 
-  // Set the canonical bit.
-  if (!defer_canonicalization && is_canonical) {
-    type.SetCanonical();
+  if (is_canonical) {
+    type ^= type.Canonicalize();
   }
 
   // Fill in the type testing stub.
@@ -177,11 +170,11 @@
 
   // Write out all the object pointer fields.
   ASSERT(ptr()->type_class_id_ != Object::null());
-  SnapshotWriterVisitor visitor(writer, kAsReference);
+  SnapshotWriterVisitor visitor(writer, as_reference);
   visitor.VisitPointers(from(), to());
 
   // Write out the type class.
-  writer->WriteObjectImpl(type_class, kAsReference);
+  writer->WriteObjectImpl(type_class, as_reference);
 }
 
 RawTypeRef* TypeRef::ReadFrom(SnapshotReader* reader,
@@ -244,7 +237,7 @@
   type_parameter.set_token_pos(
       TokenPosition::SnapshotDecode(reader->Read<int32_t>()));
   type_parameter.set_index(reader->Read<int16_t>());
-  type_parameter.set_type_state(reader->Read<int8_t>());
+  type_parameter.set_flags(reader->Read<uint8_t>());
 
   // Read the code object for the type testing stub and set its entrypoint.
   reader->EnqueueTypePostprocessing(type_parameter);
@@ -273,7 +266,7 @@
   ASSERT(writer != NULL);
 
   // Only finalized type parameters should be written to a snapshot.
-  ASSERT(ptr()->type_state_ == RawTypeParameter::kFinalizedUninstantiated);
+  ASSERT(FinalizedBit::decode(ptr()->flags_));
 
   // Write out the serialization header value for this object.
   writer->WriteInlinedObjectHeader(object_id);
@@ -285,7 +278,7 @@
   // Write out all the non object pointer fields.
   writer->Write<int32_t>(ptr()->token_pos_.SnapshotEncode());
   writer->Write<int16_t>(ptr()->index_);
-  writer->Write<int8_t>(ptr()->type_state_);
+  writer->Write<uint8_t>(ptr()->flags_);
 
   // Write out all the object pointer fields.
   SnapshotWriterVisitor visitor(writer, kAsReference);
@@ -310,26 +303,20 @@
   TypeArguments& type_arguments =
       TypeArguments::ZoneHandle(reader->zone(), TypeArguments::New(len));
   bool is_canonical = RawObject::IsCanonical(tags);
-  bool defer_canonicalization = is_canonical && (!Snapshot::IsFull(kind));
-  reader->AddBackRef(object_id, &type_arguments, kIsDeserialized,
-                     defer_canonicalization);
+  reader->AddBackRef(object_id, &type_arguments, kIsDeserialized);
 
   // Set the instantiations field, which is only read from a full snapshot.
   type_arguments.set_instantiations(Object::zero_array());
 
   // Now set all the type fields.
-  intptr_t offset =
-      type_arguments.TypeAddr(0) -
-      reinterpret_cast<RawAbstractType**>(type_arguments.raw()->ptr());
   for (intptr_t i = 0; i < len; i++) {
-    *reader->TypeHandle() ^=
-        reader->ReadObjectImpl(kAsReference, object_id, (i + offset));
+    *reader->TypeHandle() ^= reader->ReadObjectImpl(as_reference);
     type_arguments.SetTypeAt(i, *reader->TypeHandle());
   }
 
   // Set the canonical bit.
-  if (!defer_canonicalization && is_canonical) {
-    type_arguments.SetCanonical();
+  if (is_canonical) {
+    type_arguments ^= type_arguments.Canonicalize();
   }
 
   return type_arguments.raw();
@@ -368,10 +355,10 @@
       if (!writer->AllowObjectsInDartLibrary(type_class->ptr()->library_)) {
         writer->WriteVMIsolateObject(kDynamicType);
       } else {
-        writer->WriteObjectImpl(ptr()->types()[i], kAsReference);
+        writer->WriteObjectImpl(ptr()->types()[i], as_reference);
       }
     } else {
-      writer->WriteObjectImpl(ptr()->types()[i], kAsReference);
+      writer->WriteObjectImpl(ptr()->types()[i], as_reference);
     }
   }
 }
@@ -1490,10 +1477,7 @@
   reader->AddBackRef(object_id, &array, kIsDeserialized);
 
   // Read type arguments of growable array object.
-  const intptr_t typeargs_offset =
-      GrowableObjectArray::type_arguments_offset() / kWordSize;
-  *reader->TypeArgumentsHandle() ^=
-      reader->ReadObjectImpl(kAsInlinedObject, object_id, typeargs_offset);
+  *reader->TypeArgumentsHandle() ^= reader->ReadObjectImpl(kAsInlinedObject);
   array.StorePointer(&array.raw_ptr()->type_arguments_,
                      reader->TypeArgumentsHandle()->raw());
 
@@ -1544,10 +1528,7 @@
   reader->AddBackRef(object_id, &map, kIsDeserialized);
 
   // Read the type arguments.
-  const intptr_t typeargs_offset =
-      GrowableObjectArray::type_arguments_offset() / kWordSize;
-  *reader->TypeArgumentsHandle() ^=
-      reader->ReadObjectImpl(kAsInlinedObject, object_id, typeargs_offset);
+  *reader->TypeArgumentsHandle() ^= reader->ReadObjectImpl(kAsInlinedObject);
   map.SetTypeArguments(*reader->TypeArgumentsHandle());
 
   // Read the number of key/value pairs.
@@ -1740,6 +1721,22 @@
   writer->Write<double>(ptr()->value_[1]);
 }
 
+RawTypedDataBase* TypedDataBase::ReadFrom(SnapshotReader* reader,
+                                          intptr_t object_id,
+                                          intptr_t tags,
+                                          Snapshot::Kind kind,
+                                          bool as_reference) {
+  UNREACHABLE();  // TypedDataBase is an abstract class.
+  return NULL;
+}
+
+void RawTypedDataBase::WriteTo(SnapshotWriter* writer,
+                               intptr_t object_id,
+                               Snapshot::Kind kind,
+                               bool as_reference) {
+  UNREACHABLE();  // TypedDataBase is an abstract class.
+}
+
 RawTypedData* TypedData::ReadFrom(SnapshotReader* reader,
                                   intptr_t object_id,
                                   intptr_t tags,
@@ -1983,6 +1980,46 @@
       IsolateMessageTypedDataFinalizer);
 }
 
+void RawTypedDataView::WriteTo(SnapshotWriter* writer,
+                               intptr_t object_id,
+                               Snapshot::Kind kind,
+                               bool as_reference) {
+  // Views have always a backing store.
+  ASSERT(ptr()->typed_data_ != Object::null());
+
+  // Write out the serialization header value for this object.
+  writer->WriteInlinedObjectHeader(object_id);
+
+  // Write out the class and tags information.
+  writer->WriteIndexedObject(GetClassId());
+  writer->WriteTags(writer->GetObjectTags(this));
+
+  // Write members.
+  writer->Write<RawObject*>(ptr()->offset_in_bytes_);
+  writer->Write<RawObject*>(ptr()->length_);
+  writer->WriteObjectImpl(ptr()->typed_data_, as_reference);
+}
+
+RawTypedDataView* TypedDataView::ReadFrom(SnapshotReader* reader,
+                                          intptr_t object_id,
+                                          intptr_t tags,
+                                          Snapshot::Kind kind,
+                                          bool as_reference) {
+  auto& typed_data = *reader->TypedDataBaseHandle();
+  const classid_t cid = RawObject::ClassIdTag::decode(tags);
+
+  auto& view = *reader->TypedDataViewHandle();
+  view = TypedDataView::New(cid);
+  reader->AddBackRef(object_id, &view, kIsDeserialized);
+
+  const intptr_t offset_in_bytes = reader->ReadSmiValue();
+  const intptr_t length = reader->ReadSmiValue();
+  typed_data ^= reader->ReadObjectImpl(as_reference);
+  view.InitializeWith(typed_data, offset_in_bytes, length);
+
+  return view.raw();
+}
+
 RawPointer* Pointer::ReadFrom(SnapshotReader* reader,
                               intptr_t object_id,
                               intptr_t tags,
@@ -2129,8 +2166,12 @@
   // Read and Set all the other fields.
   regex.StoreSmi(&regex.raw_ptr()->num_bracket_expressions_,
                  reader->ReadAsSmi());
+
+  *reader->ArrayHandle() ^= reader->ReadObjectImpl(kAsInlinedObject);
+  regex.set_capture_name_map(*reader->ArrayHandle());
   *reader->StringHandle() ^= reader->ReadObjectImpl(kAsInlinedObject);
   regex.set_pattern(*reader->StringHandle());
+
   regex.StoreNonPointer(&regex.raw_ptr()->num_registers_,
                         reader->Read<int32_t>());
   regex.StoreNonPointer(&regex.raw_ptr()->type_flags_, reader->Read<int8_t>());
diff --git a/runtime/vm/regexp.cc b/runtime/vm/regexp.cc
index 909f00a..c2b4fe7 100644
--- a/runtime/vm/regexp.cc
+++ b/runtime/vm/regexp.cc
@@ -317,6 +317,8 @@
 
   inline bool ignore_case() { return ignore_case_; }
   inline bool one_byte() const { return is_one_byte_; }
+  bool read_backward() { return read_backward_; }
+  void set_read_backward(bool value) { read_backward_ = value; }
   FrequencyCollator* frequency_collator() { return &frequency_collator_; }
 
   intptr_t current_expansion_factor() { return current_expansion_factor_; }
@@ -337,6 +339,7 @@
   bool ignore_case_;
   bool is_one_byte_;
   bool reg_exp_too_big_;
+  bool read_backward_;
   intptr_t current_expansion_factor_;
   FrequencyCollator frequency_collator_;
   Zone* zone_;
@@ -368,6 +371,7 @@
       ignore_case_(ignore_case),
       is_one_byte_(is_one_byte),
       reg_exp_too_big_(false),
+      read_backward_(false),
       current_expansion_factor_(1),
       zone_(Thread::Current()->zone()) {
   accept_ = new (Z) EndNode(EndNode::ACCEPT, Z);
@@ -520,7 +524,8 @@
     intptr_t value = 0;
     bool absolute = false;
     bool clear = false;
-    intptr_t store_position = -1;
+    static const intptr_t kNoStore = kMinInt32;
+    intptr_t store_position = kNoStore;
     // This is a little tricky because we are scanning the actions in reverse
     // historical order (newest first).
     for (DeferredAction* action = actions_; action != NULL;
@@ -540,7 +545,7 @@
             // can set undo_action to ACTION_IGNORE if we know there is no
             // value to restore.
             undo_action = ACTION_RESTORE;
-            ASSERT(store_position == -1);
+            ASSERT(store_position == kNoStore);
             ASSERT(!clear);
             break;
           }
@@ -548,14 +553,14 @@
             if (!absolute) {
               value++;
             }
-            ASSERT(store_position == -1);
+            ASSERT(store_position == kNoStore);
             ASSERT(!clear);
             undo_action = ACTION_RESTORE;
             break;
           case ActionNode::STORE_POSITION: {
             Trace::DeferredCapture* pc =
                 static_cast<Trace::DeferredCapture*>(action);
-            if (!clear && store_position == -1) {
+            if (!clear && store_position == kNoStore) {
               store_position = pc->cp_offset();
             }
 
@@ -579,7 +584,7 @@
             // Since we're scanning in reverse order, if we've already
             // set the position we have to ignore historically earlier
             // clearing operations.
-            if (store_position == -1) {
+            if (store_position == kNoStore) {
               clear = true;
             }
             undo_action = ACTION_RESTORE;
@@ -602,7 +607,7 @@
     }
     // Perform the chronologically last action (or accumulated increment)
     // for the register.
-    if (store_position != -1) {
+    if (store_position != kNoStore) {
       assembler->WriteCurrentPositionToRegister(reg, store_position);
     } else if (clear) {
       assembler->ClearRegisters(reg, reg);
@@ -979,7 +984,7 @@
     }
     case 4:
       macro_assembler->CheckCharacter(chars[3], &ok);
-    // Fall through!
+      FALL_THROUGH;
     case 3:
       macro_assembler->CheckCharacter(chars[0], &ok);
       macro_assembler->CheckCharacter(chars[1], &ok);
@@ -1494,6 +1499,7 @@
 intptr_t BackReferenceNode::EatsAtLeast(intptr_t still_to_find,
                                         intptr_t budget,
                                         bool not_at_start) {
+  if (read_backward()) return 0;
   if (budget <= 0) return 0;
   return on_success()->EatsAtLeast(still_to_find, budget - 1, not_at_start);
 }
@@ -1501,6 +1507,7 @@
 intptr_t TextNode::EatsAtLeast(intptr_t still_to_find,
                                intptr_t budget,
                                bool not_at_start) {
+  if (read_backward()) return 0;
   intptr_t answer = Length();
   if (answer >= still_to_find) return answer;
   if (budget <= 0) return answer;
@@ -1509,9 +1516,9 @@
          on_success()->EatsAtLeast(still_to_find - answer, budget - 1, true);
 }
 
-intptr_t NegativeLookaheadChoiceNode::EatsAtLeast(intptr_t still_to_find,
-                                                  intptr_t budget,
-                                                  bool not_at_start) {
+intptr_t NegativeLookaroundChoiceNode::EatsAtLeast(intptr_t still_to_find,
+                                                   intptr_t budget,
+                                                   bool not_at_start) {
   if (budget <= 0) return 0;
   // Alternative 0 is the negative lookahead, alternative 1 is what comes
   // afterwards.
@@ -1519,7 +1526,7 @@
   return node->EatsAtLeast(still_to_find, budget - 1, not_at_start);
 }
 
-void NegativeLookaheadChoiceNode::GetQuickCheckDetails(
+void NegativeLookaroundChoiceNode::GetQuickCheckDetails(
     QuickCheckDetails* details,
     RegExpCompiler* compiler,
     intptr_t filled_in,
@@ -1682,6 +1689,9 @@
   ASSERT(details->characters() == 1 ||
          (__BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__));
 #endif
+  // Do not collect any quick check details if the text node reads backward,
+  // since it reads in the opposite direction than we use for quick checks.
+  if (read_backward()) return;
   ASSERT(characters_filled_in < details->characters());
   intptr_t characters = details->characters();
   intptr_t char_mask;
@@ -1838,8 +1848,9 @@
 }
 
 void QuickCheckDetails::Advance(intptr_t by, bool one_byte) {
-  ASSERT(by >= 0);
-  if (by >= characters_) {
+  if (by >= characters_ || by < 0) {
+    // check that by < 0 => characters_ == 0
+    ASSERT(by >= 0 || characters_ == 0);
     Clear();
     return;
   }
@@ -2060,8 +2071,8 @@
   return this;
 }
 
-RegExpNode* NegativeLookaheadChoiceNode::FilterOneByte(intptr_t depth,
-                                                       bool ignore_case) {
+RegExpNode* NegativeLookaroundChoiceNode::FilterOneByte(intptr_t depth,
+                                                        bool ignore_case) {
   if (info()->replacement_calculated) return replacement();
   if (depth < 0) return this;
   if (info()->visited) return this;
@@ -2294,9 +2305,9 @@
         return;
       }
       if (trace->at_start() == Trace::UNKNOWN) {
-        assembler->CheckNotAtStart(trace->backtrack());
+        assembler->CheckNotAtStart(trace->cp_offset(), trace->backtrack());
         Trace at_start_trace = *trace;
-        at_start_trace.set_at_start(true);
+        at_start_trace.set_at_start(Trace::TRUE_VALUE);
         on_success()->Emit(compiler, &at_start_trace);
         return;
       }
@@ -2365,9 +2376,10 @@
   BlockLabel* backtrack = trace->backtrack();
   QuickCheckDetails* quick_check = trace->quick_check_performed();
   intptr_t element_count = elms_->length();
+  intptr_t backward_offset = read_backward() ? -Length() : 0;
   for (intptr_t i = preloaded ? 0 : element_count - 1; i >= 0; i--) {
     TextElement elm = elms_->At(i);
-    intptr_t cp_offset = trace->cp_offset() + elm.cp_offset();
+    intptr_t cp_offset = trace->cp_offset() + elm.cp_offset() + backward_offset;
     if (elm.text_type() == TextElement::ATOM) {
       ZoneGrowableArray<uint16_t>* quarks = elm.atom()->data();
       for (intptr_t j = preloaded ? 0 : quarks->length() - 1; j >= 0; j--) {
@@ -2395,9 +2407,11 @@
             break;
         }
         if (emit_function != NULL) {
-          bool bound_checked = emit_function(
-              Z, compiler, quarks->At(j), backtrack, cp_offset + j,
-              *checked_up_to < cp_offset + j, preloaded);
+          const bool bounds_check =
+              *checked_up_to < (cp_offset + j) || read_backward();
+          bool bound_checked =
+              emit_function(Z, compiler, quarks->At(j), backtrack,
+                            cp_offset + j, bounds_check, preloaded);
           if (bound_checked) UpdateBoundsCheck(cp_offset + j, checked_up_to);
         }
       }
@@ -2407,8 +2421,9 @@
         if (first_element_checked && i == 0) continue;
         if (DeterminedAlready(quick_check, elm.cp_offset())) continue;
         RegExpCharacterClass* cc = elm.char_class();
+        bool bounds_check = *checked_up_to < cp_offset || read_backward();
         EmitCharClass(assembler, cc, one_byte, backtrack, cp_offset,
-                      *checked_up_to < cp_offset, preloaded, Z);
+                      bounds_check, preloaded, Z);
         UpdateBoundsCheck(cp_offset, checked_up_to);
       }
     }
@@ -2475,8 +2490,11 @@
   }
 
   Trace successor_trace(*trace);
-  successor_trace.set_at_start(false);
-  successor_trace.AdvanceCurrentPositionInTrace(Length(), compiler);
+  // If we advance backward, we may end up at the start.
+  successor_trace.AdvanceCurrentPositionInTrace(
+      read_backward() ? -Length() : Length(), compiler);
+  successor_trace.set_at_start(read_backward() ? Trace::UNKNOWN
+                                               : Trace::FALSE_VALUE);
   RecursionCheck rc(compiler);
   on_success()->Emit(compiler, &successor_trace);
 }
@@ -2487,7 +2505,6 @@
 
 void Trace::AdvanceCurrentPositionInTrace(intptr_t by,
                                           RegExpCompiler* compiler) {
-  ASSERT(by > 0);
   // We don't have an instruction for shifting the current character register
   // down or for using a shifted value for anything so lets just forget that
   // we preloaded any characters into it.
@@ -2530,6 +2547,7 @@
 
 RegExpNode* TextNode::GetSuccessorOfOmnivorousTextNode(
     RegExpCompiler* compiler) {
+  if (read_backward()) return nullptr;
   if (elms_->length() != 1) return NULL;
   TextElement elm = elms_->At(0);
   if (elm.text_type() != TextElement::CHAR_CLASS) return NULL;
@@ -2574,7 +2592,7 @@
     SeqRegExpNode* seq_node = static_cast<SeqRegExpNode*>(node);
     node = seq_node->on_success();
   }
-  return length;
+  return read_backward() ? -length : length;
 }
 
 void LoopChoiceNode::AddLoopAlternative(GuardedAlternative alt) {
@@ -3002,7 +3020,7 @@
 
 GreedyLoopState::GreedyLoopState(bool not_at_start) {
   counter_backtrack_trace_.set_backtrack(&label_);
-  if (not_at_start) counter_backtrack_trace_.set_at_start(false);
+  if (not_at_start) counter_backtrack_trace_.set_at_start(Trace::FALSE_VALUE);
 }
 
 void ChoiceNode::AssertGuardsMentionRegisters(Trace* trace) {
@@ -3115,7 +3133,7 @@
   macro_assembler->PushCurrentPosition();
   BlockLabel greedy_match_failed;
   Trace greedy_match_trace;
-  if (not_at_start()) greedy_match_trace.set_at_start(false);
+  if (not_at_start()) greedy_match_trace.set_at_start(Trace::FALSE_VALUE);
   greedy_match_trace.set_backtrack(&greedy_match_failed);
   BlockLabel loop_label;
   macro_assembler->BindBlock(&loop_label);
@@ -3446,10 +3464,15 @@
 
   ASSERT(start_reg_ + 1 == end_reg_);
   if (compiler->ignore_case()) {
-    assembler->CheckNotBackReferenceIgnoreCase(start_reg_, trace->backtrack());
+    assembler->CheckNotBackReferenceIgnoreCase(start_reg_, read_backward(),
+                                               trace->backtrack());
   } else {
-    assembler->CheckNotBackReference(start_reg_, trace->backtrack());
+    assembler->CheckNotBackReference(start_reg_, read_backward(),
+                                     trace->backtrack());
   }
+  // We are going to advance backward, so we may end up at the start.
+  if (read_backward()) trace->set_at_start(Trace::UNKNOWN);
+
   on_success()->Emit(compiler, trace);
 }
 
@@ -3694,7 +3717,7 @@
   ZoneGrowableArray<TextElement>* elms =
       new (OZ) ZoneGrowableArray<TextElement>(1);
   elms->Add(TextElement::Atom(this));
-  return new (OZ) TextNode(elms, on_success);
+  return new (OZ) TextNode(elms, compiler->read_backward(), on_success);
 }
 
 RegExpNode* RegExpText::ToNode(RegExpCompiler* compiler,
@@ -3704,7 +3727,7 @@
   for (intptr_t i = 0; i < elements()->length(); i++) {
     elms->Add(elements()->At(i));
   }
-  return new (OZ) TextNode(elms, on_success);
+  return new (OZ) TextNode(elms, compiler->read_backward(), on_success);
 }
 
 static bool CompareInverseRanges(ZoneGrowableArray<CharacterRange>* ranges,
@@ -3795,7 +3818,7 @@
 
 RegExpNode* RegExpCharacterClass::ToNode(RegExpCompiler* compiler,
                                          RegExpNode* on_success) {
-  return new (OZ) TextNode(this, on_success);
+  return new (OZ) TextNode(this, compiler->read_backward(), on_success);
 }
 
 RegExpNode* RegExpDisjunction::ToNode(RegExpCompiler* compiler,
@@ -3931,7 +3954,9 @@
                 GuardedAlternative(body->ToNode(compiler, answer)));
           }
           answer = alternation;
-          if (not_at_start) alternation->set_not_at_start();
+          if (not_at_start && !compiler->read_backward()) {
+            alternation->set_not_at_start();
+          }
         }
         return answer;
       }
@@ -3942,9 +3967,9 @@
   bool needs_counter = has_min || has_max;
   intptr_t reg_ctr = needs_counter ? compiler->AllocateRegister()
                                    : RegExpCompiler::kNoRegister;
-  LoopChoiceNode* center =
-      new (zone) LoopChoiceNode(body->min_match() == 0, zone);
-  if (not_at_start) center->set_not_at_start();
+  LoopChoiceNode* center = new (zone)
+      LoopChoiceNode(body->min_match() == 0, compiler->read_backward(), zone);
+  if (not_at_start && !compiler->read_backward()) center->set_not_at_start();
   RegExpNode* loop_return =
       needs_counter ? static_cast<RegExpNode*>(
                           ActionNode::IncrementRegister(reg_ctr, center))
@@ -4015,12 +4040,13 @@
           new ZoneGrowableArray<CharacterRange>(3);
       CharacterRange::AddClassEscape('n', newline_ranges);
       RegExpCharacterClass* newline_atom = new RegExpCharacterClass('n');
-      TextNode* newline_matcher = new TextNode(
-          newline_atom, ActionNode::PositiveSubmatchSuccess(
-                            stack_pointer_register, position_register,
-                            0,   // No captures inside.
-                            -1,  // Ignored if no captures.
-                            on_success));
+      TextNode* newline_matcher =
+          new TextNode(newline_atom, /*read_backwards=*/false,
+                       ActionNode::PositiveSubmatchSuccess(
+                           stack_pointer_register, position_register,
+                           0,   // No captures inside.
+                           -1,  // Ignored if no captures.
+                           on_success));
       // Create an end-of-input matcher.
       RegExpNode* end_of_line = ActionNode::BeginSubmatch(
           stack_pointer_register, position_register, newline_matcher);
@@ -4039,9 +4065,9 @@
 
 RegExpNode* RegExpBackReference::ToNode(RegExpCompiler* compiler,
                                         RegExpNode* on_success) {
-  return new (OZ)
-      BackReferenceNode(RegExpCapture::StartRegister(index()),
-                        RegExpCapture::EndRegister(index()), on_success);
+  return new (OZ) BackReferenceNode(RegExpCapture::StartRegister(index()),
+                                    RegExpCapture::EndRegister(index()),
+                                    compiler->read_backward(), on_success);
 }
 
 RegExpNode* RegExpEmpty::ToNode(RegExpCompiler* compiler,
@@ -4049,8 +4075,47 @@
   return on_success;
 }
 
-RegExpNode* RegExpLookahead::ToNode(RegExpCompiler* compiler,
-                                    RegExpNode* on_success) {
+RegExpLookaround::Builder::Builder(bool is_positive,
+                                   RegExpNode* on_success,
+                                   intptr_t stack_pointer_register,
+                                   intptr_t position_register,
+                                   intptr_t capture_register_count,
+                                   intptr_t capture_register_start)
+    : is_positive_(is_positive),
+      on_success_(on_success),
+      stack_pointer_register_(stack_pointer_register),
+      position_register_(position_register) {
+  if (is_positive_) {
+    on_match_success_ = ActionNode::PositiveSubmatchSuccess(
+        stack_pointer_register, position_register, capture_register_count,
+        capture_register_start, on_success);
+  } else {
+    on_match_success_ = new (OZ) NegativeSubmatchSuccess(
+        stack_pointer_register, position_register, capture_register_count,
+        capture_register_start, OZ);
+  }
+}
+
+RegExpNode* RegExpLookaround::Builder::ForMatch(RegExpNode* match) {
+  if (is_positive_) {
+    return ActionNode::BeginSubmatch(stack_pointer_register_,
+                                     position_register_, match);
+  } else {
+    Zone* zone = on_success_->zone();
+    // We use a ChoiceNode to represent the negative lookaround. The first
+    // alternative is the negative match. On success, the end node backtracks.
+    // On failure, the second alternative is tried and leads to success.
+    // NegativeLookaroundChoiceNode is a special ChoiceNode that ignores the
+    // first exit when calculating quick checks.
+    ChoiceNode* choice_node = new (zone) NegativeLookaroundChoiceNode(
+        GuardedAlternative(match), GuardedAlternative(on_success_), zone);
+    return ActionNode::BeginSubmatch(stack_pointer_register_,
+                                     position_register_, choice_node);
+  }
+}
+
+RegExpNode* RegExpLookaround::ToNode(RegExpCompiler* compiler,
+                                     RegExpNode* on_success) {
   intptr_t stack_pointer_register = compiler->AllocateRegister();
   intptr_t position_register = compiler->AllocateRegister();
 
@@ -4060,36 +4125,15 @@
   intptr_t register_start =
       register_of_first_capture + capture_from_ * registers_per_capture;
 
-  RegExpNode* success;
-  if (is_positive()) {
-    RegExpNode* node = ActionNode::BeginSubmatch(
-        stack_pointer_register, position_register,
-        body()->ToNode(compiler,
-                       ActionNode::PositiveSubmatchSuccess(
-                           stack_pointer_register, position_register,
-                           register_count, register_start, on_success)));
-    return node;
-  } else {
-    // We use a ChoiceNode for a negative lookahead because it has most of
-    // the characteristics we need.  It has the body of the lookahead as its
-    // first alternative and the expression after the lookahead of the second
-    // alternative.  If the first alternative succeeds then the
-    // NegativeSubmatchSuccess will unwind the stack including everything the
-    // choice node set up and backtrack.  If the first alternative fails then
-    // the second alternative is tried, which is exactly the desired result
-    // for a negative lookahead.  The NegativeLookaheadChoiceNode is a special
-    // ChoiceNode that knows to ignore the first exit when calculating quick
-    // checks.
-
-    GuardedAlternative body_alt(
-        body()->ToNode(compiler, success = new (OZ) NegativeSubmatchSuccess(
-                                     stack_pointer_register, position_register,
-                                     register_count, register_start, OZ)));
-    ChoiceNode* choice_node = new (OZ) NegativeLookaheadChoiceNode(
-        body_alt, GuardedAlternative(on_success), OZ);
-    return ActionNode::BeginSubmatch(stack_pointer_register, position_register,
-                                     choice_node);
-  }
+  RegExpNode* result;
+  bool was_reading_backward = compiler->read_backward();
+  compiler->set_read_backward(type() == LOOKBEHIND);
+  Builder builder(is_positive(), on_success, stack_pointer_register,
+                  position_register, register_count, register_start);
+  RegExpNode* match = body_->ToNode(compiler, builder.on_match_success());
+  result = builder.ForMatch(match);
+  compiler->set_read_backward(was_reading_backward);
+  return result;
 }
 
 RegExpNode* RegExpCapture::ToNode(RegExpCompiler* compiler,
@@ -4101,8 +4145,14 @@
                                   intptr_t index,
                                   RegExpCompiler* compiler,
                                   RegExpNode* on_success) {
+  ASSERT(body != nullptr);
   intptr_t start_reg = RegExpCapture::StartRegister(index);
   intptr_t end_reg = RegExpCapture::EndRegister(index);
+  if (compiler->read_backward()) {
+    intptr_t tmp = end_reg;
+    end_reg = start_reg;
+    start_reg = tmp;
+  }
   RegExpNode* store_end = ActionNode::StorePosition(end_reg, true, on_success);
   RegExpNode* body_node = body->ToNode(compiler, store_end);
   return ActionNode::StorePosition(start_reg, true, body_node);
@@ -4112,8 +4162,14 @@
                                       RegExpNode* on_success) {
   ZoneGrowableArray<RegExpTree*>* children = nodes();
   RegExpNode* current = on_success;
-  for (intptr_t i = children->length() - 1; i >= 0; i--) {
-    current = children->At(i)->ToNode(compiler, current);
+  if (compiler->read_backward()) {
+    for (intptr_t i = 0; i < children->length(); i++) {
+      current = children->At(i)->ToNode(compiler, current);
+    }
+  } else {
+    for (intptr_t i = children->length() - 1; i >= 0; i--) {
+      current = children->At(i)->ToNode(compiler, current);
+    }
   }
   return current;
 }
@@ -4686,8 +4742,9 @@
       // at the start of input.
       ChoiceNode* first_step_node = new (zone) ChoiceNode(2, zone);
       first_step_node->AddAlternative(GuardedAlternative(captured_body));
-      first_step_node->AddAlternative(GuardedAlternative(new (zone) TextNode(
-          new (zone) RegExpCharacterClass('*'), loop_node)));
+      first_step_node->AddAlternative(GuardedAlternative(
+          new (zone) TextNode(new (zone) RegExpCharacterClass('*'),
+                              /*read_backwards=*/false, loop_node)));
       node = first_step_node;
     } else {
       node = loop_node;
@@ -4789,8 +4846,9 @@
       // at the start of input.
       ChoiceNode* first_step_node = new (zone) ChoiceNode(2, zone);
       first_step_node->AddAlternative(GuardedAlternative(captured_body));
-      first_step_node->AddAlternative(GuardedAlternative(new (zone) TextNode(
-          new (zone) RegExpCharacterClass('*'), loop_node)));
+      first_step_node->AddAlternative(GuardedAlternative(
+          new (zone) TextNode(new (zone) RegExpCharacterClass('*'),
+                              /*read_backwards=*/false, loop_node)));
       node = first_step_node;
     } else {
       node = loop_node;
diff --git a/runtime/vm/regexp.h b/runtime/vm/regexp.h
index b263166..092a06a 100644
--- a/runtime/vm/regexp.h
+++ b/runtime/vm/regexp.h
@@ -121,7 +121,7 @@
   VISIT(Atom)                                                                  \
   VISIT(Quantifier)                                                            \
   VISIT(Capture)                                                               \
-  VISIT(Lookahead)                                                             \
+  VISIT(Lookaround)                                                            \
   VISIT(BackReference)                                                         \
   VISIT(Empty)                                                                 \
   VISIT(Text)
@@ -549,11 +549,16 @@
 
 class TextNode : public SeqRegExpNode {
  public:
-  TextNode(ZoneGrowableArray<TextElement>* elms, RegExpNode* on_success)
-      : SeqRegExpNode(on_success), elms_(elms) {}
-  TextNode(RegExpCharacterClass* that, RegExpNode* on_success)
+  TextNode(ZoneGrowableArray<TextElement>* elms,
+           bool read_backward,
+           RegExpNode* on_success)
+      : SeqRegExpNode(on_success), elms_(elms), read_backward_(read_backward) {}
+  TextNode(RegExpCharacterClass* that,
+           bool read_backward,
+           RegExpNode* on_success)
       : SeqRegExpNode(on_success),
-        elms_(new (zone()) ZoneGrowableArray<TextElement>(1)) {
+        elms_(new (zone()) ZoneGrowableArray<TextElement>(1)),
+        read_backward_(read_backward) {
     elms_->Add(TextElement::CharClass(that));
   }
   virtual void Accept(NodeVisitor* visitor);
@@ -566,6 +571,7 @@
                                     intptr_t characters_filled_in,
                                     bool not_at_start);
   ZoneGrowableArray<TextElement>* elements() { return elms_; }
+  bool read_backward() { return read_backward_; }
   void MakeCaseIndependent(bool is_one_byte);
   virtual intptr_t GreedyLoopTextLength();
   virtual RegExpNode* GetSuccessorOfOmnivorousTextNode(
@@ -596,6 +602,7 @@
                     intptr_t* checked_up_to);
   intptr_t Length();
   ZoneGrowableArray<TextElement>* elms_;
+  bool read_backward_;
 };
 
 class AssertionNode : public SeqRegExpNode {
@@ -652,11 +659,16 @@
  public:
   BackReferenceNode(intptr_t start_reg,
                     intptr_t end_reg,
+                    bool read_backward,
                     RegExpNode* on_success)
-      : SeqRegExpNode(on_success), start_reg_(start_reg), end_reg_(end_reg) {}
+      : SeqRegExpNode(on_success),
+        start_reg_(start_reg),
+        end_reg_(end_reg),
+        read_backward_(read_backward) {}
   virtual void Accept(NodeVisitor* visitor);
   intptr_t start_register() { return start_reg_; }
   intptr_t end_register() { return end_reg_; }
+  bool read_backward() { return read_backward_; }
   virtual void Emit(RegExpCompiler* compiler, Trace* trace);
   virtual intptr_t EatsAtLeast(intptr_t still_to_find,
                                intptr_t recursion_depth,
@@ -675,6 +687,7 @@
  private:
   intptr_t start_reg_;
   intptr_t end_reg_;
+  bool read_backward_;
 };
 
 class EndNode : public RegExpNode {
@@ -799,6 +812,7 @@
     return true;
   }
   virtual RegExpNode* FilterOneByte(intptr_t depth, bool ignore_case);
+  virtual bool read_backward() { return false; }
 
  protected:
   intptr_t GreedyLoopTextLengthForAlternative(GuardedAlternative* alternative);
@@ -840,11 +854,11 @@
   bool being_calculated_;
 };
 
-class NegativeLookaheadChoiceNode : public ChoiceNode {
+class NegativeLookaroundChoiceNode : public ChoiceNode {
  public:
-  explicit NegativeLookaheadChoiceNode(GuardedAlternative this_must_fail,
-                                       GuardedAlternative then_do_this,
-                                       Zone* zone)
+  explicit NegativeLookaroundChoiceNode(GuardedAlternative this_must_fail,
+                                        GuardedAlternative then_do_this,
+                                        Zone* zone)
       : ChoiceNode(2, zone) {
     AddAlternative(this_must_fail);
     AddAlternative(then_do_this);
@@ -877,11 +891,14 @@
 
 class LoopChoiceNode : public ChoiceNode {
  public:
-  explicit LoopChoiceNode(bool body_can_be_zero_length, Zone* zone)
+  explicit LoopChoiceNode(bool body_can_be_zero_length,
+                          bool read_backward,
+                          Zone* zone)
       : ChoiceNode(2, zone),
         loop_node_(NULL),
         continue_node_(NULL),
-        body_can_be_zero_length_(body_can_be_zero_length) {}
+        body_can_be_zero_length_(body_can_be_zero_length),
+        read_backward_(read_backward) {}
   void AddLoopAlternative(GuardedAlternative alt);
   void AddContinueAlternative(GuardedAlternative alt);
   virtual void Emit(RegExpCompiler* compiler, Trace* trace);
@@ -899,6 +916,7 @@
   RegExpNode* loop_node() { return loop_node_; }
   RegExpNode* continue_node() { return continue_node_; }
   bool body_can_be_zero_length() { return body_can_be_zero_length_; }
+  virtual bool read_backward() { return read_backward_; }
   virtual void Accept(NodeVisitor* visitor);
   virtual RegExpNode* FilterOneByte(intptr_t depth, bool ignore_case);
 
@@ -913,6 +931,7 @@
   RegExpNode* loop_node_;
   RegExpNode* continue_node_;
   bool body_can_be_zero_length_;
+  bool read_backward_;
 };
 
 // Improve the speed that we scan for an initial point where a non-anchored
@@ -1161,9 +1180,7 @@
            quick_check_performed_.characters() == 0 && at_start_ == UNKNOWN;
   }
   TriBool at_start() { return at_start_; }
-  void set_at_start(bool at_start) {
-    at_start_ = at_start ? TRUE_VALUE : FALSE_VALUE;
-  }
+  void set_at_start(TriBool at_start) { at_start_ = at_start; }
   BlockLabel* backtrack() { return backtrack_; }
   BlockLabel* loop_label() { return loop_label_; }
   RegExpNode* stop_node() { return stop_node_; }
@@ -1301,12 +1318,14 @@
         node(NULL),
         simple(true),
         contains_anchor(false),
+        capture_name_map(Array::Handle(Array::null())),
         error(String::Handle(String::null())),
         capture_count(0) {}
   RegExpTree* tree;
   RegExpNode* node;
   bool simple;
   bool contains_anchor;
+  Array& capture_name_map;
   String& error;
   intptr_t capture_count;
 };
diff --git a/runtime/vm/regexp_assembler.h b/runtime/vm/regexp_assembler.h
index 23d32c7..a7b087e 100644
--- a/runtime/vm/regexp_assembler.h
+++ b/runtime/vm/regexp_assembler.h
@@ -120,10 +120,13 @@
   virtual void CheckCharacterGT(uint16_t limit, BlockLabel* on_greater) = 0;
   virtual void CheckCharacterLT(uint16_t limit, BlockLabel* on_less) = 0;
   virtual void CheckGreedyLoop(BlockLabel* on_tos_equals_current_position) = 0;
-  virtual void CheckNotAtStart(BlockLabel* on_not_at_start) = 0;
+  virtual void CheckNotAtStart(intptr_t cp_offset,
+                               BlockLabel* on_not_at_start) = 0;
   virtual void CheckNotBackReference(intptr_t start_reg,
+                                     bool read_backward,
                                      BlockLabel* on_no_match) = 0;
   virtual void CheckNotBackReferenceIgnoreCase(intptr_t start_reg,
+                                               bool read_backward,
                                                BlockLabel* on_no_match) = 0;
   // Check the current character for a match with a literal character.  If we
   // fail to match then goto the on_failure label.  End of input always
diff --git a/runtime/vm/regexp_assembler_bytecode.cc b/runtime/vm/regexp_assembler_bytecode.cc
index f63bfec..8288e1b 100644
--- a/runtime/vm/regexp_assembler_bytecode.cc
+++ b/runtime/vm/regexp_assembler_bytecode.cc
@@ -246,8 +246,9 @@
 }
 
 void BytecodeRegExpMacroAssembler::CheckNotAtStart(
+    intptr_t cp_offset,
     BlockLabel* on_not_at_start) {
-  Emit(BC_CHECK_NOT_AT_START, 0);
+  Emit(BC_CHECK_NOT_AT_START, cp_offset);
   EmitOrLink(on_not_at_start);
 }
 
@@ -336,19 +337,24 @@
 
 void BytecodeRegExpMacroAssembler::CheckNotBackReference(
     intptr_t start_reg,
+    bool read_backward,
     BlockLabel* on_not_equal) {
   ASSERT(start_reg >= 0);
   ASSERT(start_reg <= kMaxRegister);
-  Emit(BC_CHECK_NOT_BACK_REF, start_reg);
+  Emit(read_backward ? BC_CHECK_NOT_BACK_REF_BACKWARD : BC_CHECK_NOT_BACK_REF,
+       start_reg);
   EmitOrLink(on_not_equal);
 }
 
 void BytecodeRegExpMacroAssembler::CheckNotBackReferenceIgnoreCase(
     intptr_t start_reg,
+    bool read_backward,
     BlockLabel* on_not_equal) {
   ASSERT(start_reg >= 0);
   ASSERT(start_reg <= kMaxRegister);
-  Emit(BC_CHECK_NOT_BACK_REF_NO_CASE, start_reg);
+  Emit(read_backward ? BC_CHECK_NOT_BACK_REF_NO_CASE_BACKWARD
+                     : BC_CHECK_NOT_BACK_REF_NO_CASE,
+       start_reg);
   EmitOrLink(on_not_equal);
 }
 
@@ -435,6 +441,7 @@
     RegExpParser::ParseRegExp(pattern, multiline, compile_data);
 
     regexp.set_num_bracket_expressions(compile_data->capture_count);
+    regexp.set_capture_name_map(compile_data->capture_name_map);
     if (compile_data->simple) {
       regexp.set_is_simple();
     } else {
diff --git a/runtime/vm/regexp_assembler_bytecode.h b/runtime/vm/regexp_assembler_bytecode.h
index 81e8d3d..3e17d49 100644
--- a/runtime/vm/regexp_assembler_bytecode.h
+++ b/runtime/vm/regexp_assembler_bytecode.h
@@ -62,7 +62,7 @@
   virtual void CheckCharacterLT(uint16_t limit, BlockLabel* on_less);
   virtual void CheckGreedyLoop(BlockLabel* on_tos_equals_current_position);
   virtual void CheckAtStart(BlockLabel* on_at_start);
-  virtual void CheckNotAtStart(BlockLabel* on_not_at_start);
+  virtual void CheckNotAtStart(intptr_t cp_offset, BlockLabel* on_not_at_start);
   virtual void CheckNotCharacter(unsigned c, BlockLabel* on_not_equal);
   virtual void CheckNotCharacterAfterAnd(unsigned c,
                                          unsigned mask,
@@ -79,8 +79,10 @@
                                         BlockLabel* on_not_in_range);
   virtual void CheckBitInTable(const TypedData& table, BlockLabel* on_bit_set);
   virtual void CheckNotBackReference(intptr_t start_reg,
+                                     bool read_backward,
                                      BlockLabel* on_no_match);
   virtual void CheckNotBackReferenceIgnoreCase(intptr_t start_reg,
+                                               bool read_backward,
                                                BlockLabel* on_no_match);
   virtual void IfRegisterLT(intptr_t register_index,
                             intptr_t comparand,
diff --git a/runtime/vm/regexp_assembler_ir.cc b/runtime/vm/regexp_assembler_ir.cc
index 888061d..f54d840 100644
--- a/runtime/vm/regexp_assembler_ir.cc
+++ b/runtime/vm/regexp_assembler_ir.cc
@@ -392,8 +392,7 @@
   DEBUG_ASSERT(Thread::Current()->TopErrorHandlerIsSetJump());
   if (word_character_field.IsUninitialized()) {
     ASSERT(!Compiler::IsBackgroundCompilation());
-    const Error& error =
-        Error::Handle(Z, word_character_field.EvaluateInitializer());
+    const Error& error = Error::Handle(Z, word_character_field.Initialize());
     if (!error.IsNull()) {
       Report::LongJump(error);
     }
@@ -770,38 +769,27 @@
 void IRRegExpMacroAssembler::CheckAtStart(BlockLabel* on_at_start) {
   TAG();
 
-  BlockLabel not_at_start;
-
-  // Did we start the match at the start of the string at all?
-  BranchOrBacktrack(
-      Comparison(kNE, LoadLocal(start_index_param_), Uint64Constant(0)),
-      &not_at_start);
-
-  // If we did, are we still at the start of the input, i.e. is
-  // (offset == string_length * -1)?
+  // Are we at the start of the input, i.e. is (offset == string_length * -1)?
   Definition* neg_len_def =
       InstanceCall(InstanceCallDescriptor::FromToken(Token::kNEGATE),
                    PushLocal(string_param_length_));
   Definition* offset_def = LoadLocal(current_position_);
   BranchOrBacktrack(Comparison(kEQ, neg_len_def, offset_def), on_at_start);
-
-  BindBlock(&not_at_start);
 }
 
-void IRRegExpMacroAssembler::CheckNotAtStart(BlockLabel* on_not_at_start) {
+// cp_offset => offset from the current (character) pointer
+// This offset may be negative due to traversing backwards during lookbehind.
+void IRRegExpMacroAssembler::CheckNotAtStart(intptr_t cp_offset,
+                                             BlockLabel* on_not_at_start) {
   TAG();
 
-  // Did we start the match at the start of the string at all?
-  BranchOrBacktrack(
-      Comparison(kNE, LoadLocal(start_index_param_), Uint64Constant(0)),
-      on_not_at_start);
-
-  // If we did, are we still at the start of the input, i.e. is
-  // (offset == string_length * -1)?
-  Definition* neg_len_def =
-      InstanceCall(InstanceCallDescriptor::FromToken(Token::kNEGATE),
-                   PushLocal(string_param_length_));
-  Definition* offset_def = LoadLocal(current_position_);
+  // Are we at the start of the input, i.e. is (offset == string_length * -1)?
+  auto offset_def =
+      PushArgument(Bind(Add(PushLocal(current_position_),
+                            PushArgument(Bind(Int64Constant(cp_offset))))));
+  auto neg_len_def = PushArgument(
+      Bind(InstanceCall(InstanceCallDescriptor::FromToken(Token::kNEGATE),
+                        PushLocal(string_param_length_))));
   BranchOrBacktrack(Comparison(kNE, neg_len_def, offset_def), on_not_at_start);
 }
 
@@ -832,6 +820,7 @@
 
 void IRRegExpMacroAssembler::CheckNotBackReferenceIgnoreCase(
     intptr_t start_reg,
+    bool read_backward,
     BlockLabel* on_no_match) {
   TAG();
   ASSERT(start_reg + 1 <= registers_count_);
@@ -857,20 +846,38 @@
       Comparison(kEQ, LoadLocal(capture_length_), Uint64Constant(0)),
       &fallthrough);
 
-  // Check that there are sufficient characters left in the input.
-  PushArgumentInstr* pos_push = PushLocal(current_position_);
-  PushArgumentInstr* len_push = PushLocal(capture_length_);
-  BranchOrBacktrack(
-      Comparison(kGT,
-                 InstanceCall(InstanceCallDescriptor::FromToken(Token::kADD),
-                              pos_push, len_push),
-                 Uint64Constant(0)),
-      on_no_match);
+  PushArgumentInstr* pos_push = nullptr;
+  PushArgumentInstr* len_push = nullptr;
+
+  if (!read_backward) {
+    // Check that there are sufficient characters left in the input.
+    pos_push = PushLocal(current_position_);
+    len_push = PushLocal(capture_length_);
+    BranchOrBacktrack(
+        Comparison(kGT,
+                   InstanceCall(InstanceCallDescriptor::FromToken(Token::kADD),
+                                pos_push, len_push),
+                   Uint64Constant(0)),
+        on_no_match);
+  }
 
   pos_push = PushLocal(current_position_);
   len_push = PushLocal(string_param_length_);
   StoreLocal(match_start_index_, Bind(Add(pos_push, len_push)));
 
+  if (read_backward) {
+    // First check that there are enough characters before this point in
+    // the string that we can match the backreference.
+    BranchOrBacktrack(Comparison(kLT, LoadLocal(match_start_index_),
+                                 LoadLocal(capture_length_)),
+                      on_no_match);
+
+    // The string to check is before the current position, not at it.
+    pos_push = PushLocal(match_start_index_);
+    len_push = PushLocal(capture_length_);
+    StoreLocal(match_start_index_, Bind(Sub(pos_push, len_push)));
+  }
+
   pos_push = PushArgument(LoadRegister(start_reg));
   len_push = PushLocal(string_param_length_);
   StoreLocal(capture_start_index_, Bind(Add(pos_push, len_push)));
@@ -970,15 +977,23 @@
 
   BindBlock(&success);
 
-  // Move current character position to position after match.
-  PushArgumentInstr* match_end_push = PushLocal(match_end_index_);
-  len_push = PushLocal(string_param_length_);
-  StoreLocal(current_position_, Bind(Sub(match_end_push, len_push)));
+  if (read_backward) {
+    // Move current character position to start of match.
+    pos_push = PushLocal(current_position_);
+    len_push = PushLocal(capture_length_);
+    StoreLocal(current_position_, Bind(Sub(pos_push, len_push)));
+  } else {
+    // Move current character position to position after match.
+    PushArgumentInstr* match_end_push = PushLocal(match_end_index_);
+    len_push = PushLocal(string_param_length_);
+    StoreLocal(current_position_, Bind(Sub(match_end_push, len_push)));
+  }
 
   BindBlock(&fallthrough);
 }
 
 void IRRegExpMacroAssembler::CheckNotBackReference(intptr_t start_reg,
+                                                   bool read_backward,
                                                    BlockLabel* on_no_match) {
   TAG();
   ASSERT(start_reg + 1 <= registers_count_);
@@ -1001,21 +1016,39 @@
       Comparison(kEQ, LoadLocal(capture_length_), Uint64Constant(0)),
       &fallthrough);
 
-  // Check that there are sufficient characters left in the input.
-  PushArgumentInstr* pos_push = PushLocal(current_position_);
-  PushArgumentInstr* len_push = PushLocal(capture_length_);
-  BranchOrBacktrack(
-      Comparison(kGT,
-                 InstanceCall(InstanceCallDescriptor::FromToken(Token::kADD),
-                              pos_push, len_push),
-                 Uint64Constant(0)),
-      on_no_match);
+  PushArgumentInstr* pos_push = nullptr;
+  PushArgumentInstr* len_push = nullptr;
+
+  if (!read_backward) {
+    // Check that there are sufficient characters left in the input.
+    pos_push = PushLocal(current_position_);
+    len_push = PushLocal(capture_length_);
+    BranchOrBacktrack(
+        Comparison(kGT,
+                   InstanceCall(InstanceCallDescriptor::FromToken(Token::kADD),
+                                pos_push, len_push),
+                   Uint64Constant(0)),
+        on_no_match);
+  }
 
   // Compute pointers to match string and capture string.
   pos_push = PushLocal(current_position_);
   len_push = PushLocal(string_param_length_);
   StoreLocal(match_start_index_, Bind(Add(pos_push, len_push)));
 
+  if (read_backward) {
+    // First check that there are enough characters before this point in
+    // the string that we can match the backreference.
+    BranchOrBacktrack(Comparison(kLT, LoadLocal(match_start_index_),
+                                 LoadLocal(capture_length_)),
+                      on_no_match);
+
+    // The string to check is before the current position, not at it.
+    pos_push = PushLocal(match_start_index_);
+    len_push = PushLocal(capture_length_);
+    StoreLocal(match_start_index_, Bind(Sub(pos_push, len_push)));
+  }
+
   pos_push = PushArgument(LoadRegister(start_reg));
   len_push = PushLocal(string_param_length_);
   StoreLocal(capture_start_index_, Bind(Add(pos_push, len_push)));
@@ -1050,10 +1083,17 @@
 
   BindBlock(&success);
 
-  // Move current character position to position after match.
-  PushArgumentInstr* match_end_push = PushLocal(match_end_index_);
-  len_push = PushLocal(string_param_length_);
-  StoreLocal(current_position_, Bind(Sub(match_end_push, len_push)));
+  if (read_backward) {
+    // Move current character position to start of match.
+    pos_push = PushLocal(current_position_);
+    len_push = PushLocal(capture_length_);
+    StoreLocal(current_position_, Bind(Sub(pos_push, len_push)));
+  } else {
+    // Move current character position to position after match.
+    PushArgumentInstr* match_end_push = PushLocal(match_end_index_);
+    len_push = PushLocal(string_param_length_);
+    StoreLocal(current_position_, Bind(Sub(match_end_push, len_push)));
+  }
 
   BindBlock(&fallthrough);
 }
@@ -1361,10 +1401,13 @@
                                                   bool check_bounds,
                                                   intptr_t characters) {
   TAG();
-  ASSERT(cp_offset >= -1);        // ^ and \b can look behind one character.
   ASSERT(cp_offset < (1 << 30));  // Be sane! (And ensure negation works)
   if (check_bounds) {
-    CheckPosition(cp_offset + characters - 1, on_end_of_input);
+    if (cp_offset >= 0) {
+      CheckPosition(cp_offset + characters - 1, on_end_of_input);
+    } else {
+      CheckPosition(cp_offset, on_end_of_input);
+    }
   }
   LoadCurrentCharacterUnchecked(cp_offset, characters);
 }
@@ -1594,13 +1637,24 @@
 void IRRegExpMacroAssembler::CheckPosition(intptr_t cp_offset,
                                            BlockLabel* on_outside_input) {
   TAG();
-  Definition* curpos_def = LoadLocal(current_position_);
-  Definition* cp_off_def = Int64Constant(-cp_offset);
+  if (cp_offset >= 0) {
+    Definition* curpos_def = LoadLocal(current_position_);
+    Definition* cp_off_def = Int64Constant(-cp_offset);
+    // If (current_position_ < -cp_offset), we are in bounds.
+    // Remember, current_position_ is a negative offset from the string end.
 
-  // If (current_position_ < -cp_offset), we are in bounds.
-  // Remember, current_position_ is a negative offset from the string end.
-
-  BranchOrBacktrack(Comparison(kGTE, curpos_def, cp_off_def), on_outside_input);
+    BranchOrBacktrack(Comparison(kGTE, curpos_def, cp_off_def),
+                      on_outside_input);
+  } else {
+    // We need to see if there's enough characters left in the string to go
+    // back cp_offset characters, so get the normalized position and then
+    // make sure that (normalized_position >= -cp_offset).
+    PushArgumentInstr* pos_push = PushLocal(current_position_);
+    PushArgumentInstr* len_push = PushLocal(string_param_length_);
+    BranchOrBacktrack(
+        Comparison(kLT, Add(pos_push, len_push), Uint64Constant(-cp_offset)),
+        on_outside_input);
+  }
 }
 
 void IRRegExpMacroAssembler::BranchOrBacktrack(ComparisonInstr* comparison,
@@ -1664,6 +1718,7 @@
   // not act as an OSR entry outside loops.
   AppendInstruction(new (Z) CheckStackOverflowInstr(
       TokenPosition::kNoSource,
+      /*stack_depth=*/0,
       /*loop_depth=*/1, GetNextDeoptId(),
       is_backtrack ? CheckStackOverflowInstr::kOsrAndPreemption
                    : CheckStackOverflowInstr::kOsrOnly));
diff --git a/runtime/vm/regexp_assembler_ir.h b/runtime/vm/regexp_assembler_ir.h
index 3652b72..c4f6e1f 100644
--- a/runtime/vm/regexp_assembler_ir.h
+++ b/runtime/vm/regexp_assembler_ir.h
@@ -61,10 +61,12 @@
   // A "greedy loop" is a loop that is both greedy and with a simple
   // body. It has a particularly simple implementation.
   virtual void CheckGreedyLoop(BlockLabel* on_tos_equals_current_position);
-  virtual void CheckNotAtStart(BlockLabel* on_not_at_start);
+  virtual void CheckNotAtStart(intptr_t cp_offset, BlockLabel* on_not_at_start);
   virtual void CheckNotBackReference(intptr_t start_reg,
+                                     bool read_backward,
                                      BlockLabel* on_no_match);
   virtual void CheckNotBackReferenceIgnoreCase(intptr_t start_reg,
+                                               bool read_backward,
                                                BlockLabel* on_no_match);
   virtual void CheckNotCharacter(uint32_t c, BlockLabel* on_not_equal);
   virtual void CheckNotCharacterAfterAnd(uint32_t c,
diff --git a/runtime/vm/regexp_ast.cc b/runtime/vm/regexp_ast.cc
index 5b51a6f..e096e2b 100644
--- a/runtime/vm/regexp_ast.cc
+++ b/runtime/vm/regexp_ast.cc
@@ -43,7 +43,7 @@
   return ListCaptureRegisters(alternatives());
 }
 
-Interval RegExpLookahead::CaptureRegisters() const {
+Interval RegExpLookaround::CaptureRegisters() const {
   return body()->CaptureRegisters();
 }
 
@@ -108,8 +108,8 @@
   return true;
 }
 
-bool RegExpLookahead::IsAnchoredAtStart() const {
-  return is_positive() && body()->IsAnchoredAtStart();
+bool RegExpLookaround::IsAnchoredAtStart() const {
+  return is_positive() && type() == LOOKAHEAD && body()->IsAnchoredAtStart();
 }
 
 bool RegExpCapture::IsAnchoredAtStart() const {
@@ -241,8 +241,11 @@
   return NULL;
 }
 
-void* RegExpUnparser::VisitLookahead(RegExpLookahead* that, void* data) {
-  OS::PrintErr("(-> %s", (that->is_positive() ? "+ " : "- "));
+void* RegExpUnparser::VisitLookaround(RegExpLookaround* that, void* data) {
+  OS::PrintErr("(");
+  OS::PrintErr("(%s %s",
+               (that->type() == RegExpLookaround::LOOKAHEAD ? "->" : "<-"),
+               (that->is_positive() ? "+ " : "- "));
   that->body()->Accept(this, data);
   OS::PrintErr(")");
   return NULL;
diff --git a/runtime/vm/regexp_ast.h b/runtime/vm/regexp_ast.h
index 438dc3c..17a175e 100644
--- a/runtime/vm/regexp_ast.h
+++ b/runtime/vm/regexp_ast.h
@@ -21,7 +21,7 @@
 class RegExpCompiler;
 class RegExpDisjunction;
 class RegExpEmpty;
-class RegExpLookahead;
+class RegExpLookaround;
 class RegExpQuantifier;
 class RegExpText;
 
@@ -277,8 +277,8 @@
 
 class RegExpCapture : public RegExpTree {
  public:
-  explicit RegExpCapture(RegExpTree* body, intptr_t index)
-      : body_(body), index_(index) {}
+  explicit RegExpCapture(intptr_t index)
+      : body_(nullptr), index_(index), name_(nullptr) {}
   virtual void* Accept(RegExpVisitor* visitor, void* data);
   virtual RegExpNode* ToNode(RegExpCompiler* compiler, RegExpNode* on_success);
   static RegExpNode* ToNode(RegExpTree* body,
@@ -293,31 +293,42 @@
   virtual intptr_t min_match() const { return body_->min_match(); }
   virtual intptr_t max_match() const { return body_->max_match(); }
   RegExpTree* body() const { return body_; }
+  // When a backreference is parsed before the corresponding capture group,
+  // which can happen because of lookbehind, we create the capture object when
+  // we create the backreference, and fill in the body later when the actual
+  // capture group is parsed.
+  void set_body(RegExpTree* body) { body_ = body; }
   intptr_t index() const { return index_; }
+  const ZoneGrowableArray<uint16_t>* name() { return name_; }
+  void set_name(const ZoneGrowableArray<uint16_t>* name) { name_ = name; }
   static intptr_t StartRegister(intptr_t index) { return index * 2; }
   static intptr_t EndRegister(intptr_t index) { return index * 2 + 1; }
 
  private:
   RegExpTree* body_;
   intptr_t index_;
+  const ZoneGrowableArray<uint16_t>* name_;
 };
 
-class RegExpLookahead : public RegExpTree {
+class RegExpLookaround : public RegExpTree {
  public:
-  RegExpLookahead(RegExpTree* body,
-                  bool is_positive,
-                  intptr_t capture_count,
-                  intptr_t capture_from)
+  enum Type { LOOKAHEAD, LOOKBEHIND };
+  RegExpLookaround(RegExpTree* body,
+                   bool is_positive,
+                   intptr_t capture_count,
+                   intptr_t capture_from,
+                   Type type)
       : body_(body),
         is_positive_(is_positive),
         capture_count_(capture_count),
-        capture_from_(capture_from) {}
+        capture_from_(capture_from),
+        type_(type) {}
 
   virtual void* Accept(RegExpVisitor* visitor, void* data);
   virtual RegExpNode* ToNode(RegExpCompiler* compiler, RegExpNode* on_success);
-  virtual RegExpLookahead* AsLookahead();
+  virtual RegExpLookaround* AsLookaround();
   virtual Interval CaptureRegisters() const;
-  virtual bool IsLookahead() const;
+  virtual bool IsLookaround() const;
   virtual bool IsAnchoredAtStart() const;
   virtual intptr_t min_match() const { return 0; }
   virtual intptr_t max_match() const { return 0; }
@@ -325,28 +336,61 @@
   bool is_positive() const { return is_positive_; }
   intptr_t capture_count() const { return capture_count_; }
   intptr_t capture_from() const { return capture_from_; }
+  Type type() const { return type_; }
+
+  // The RegExpLookaround::Builder class abstracts out the process of building
+  // the compiling a RegExpLookaround object by splitting it into two phases,
+  // represented by the provided methods.
+  class Builder : public ValueObject {
+   public:
+    Builder(bool is_positive,
+            RegExpNode* on_success,
+            intptr_t stack_pointer_register,
+            intptr_t position_register,
+            intptr_t capture_register_count = 0,
+            intptr_t capture_register_start = 0);
+    RegExpNode* on_match_success() { return on_match_success_; }
+    RegExpNode* ForMatch(RegExpNode* match);
+
+   private:
+    bool is_positive_;
+    RegExpNode* on_match_success_;
+    RegExpNode* on_success_;
+    intptr_t stack_pointer_register_;
+    intptr_t position_register_;
+  };
 
  private:
   RegExpTree* body_;
   bool is_positive_;
   intptr_t capture_count_;
   intptr_t capture_from_;
+  Type type_;
 };
 
 class RegExpBackReference : public RegExpTree {
  public:
-  explicit RegExpBackReference(RegExpCapture* capture) : capture_(capture) {}
+  RegExpBackReference() : capture_(nullptr), name_(nullptr) {}
+  explicit RegExpBackReference(RegExpCapture* capture)
+      : capture_(capture), name_(nullptr) {}
   virtual void* Accept(RegExpVisitor* visitor, void* data);
   virtual RegExpNode* ToNode(RegExpCompiler* compiler, RegExpNode* on_success);
   virtual RegExpBackReference* AsBackReference();
   virtual bool IsBackReference() const;
   virtual intptr_t min_match() const { return 0; }
-  virtual intptr_t max_match() const { return capture_->max_match(); }
+  // The back reference may be recursive, e.g. /(\2)(\1)/. To avoid infinite
+  // recursion, we give up and just assume arbitrary length, which matches v8's
+  // behavior.
+  virtual intptr_t max_match() const { return kInfinity; }
   intptr_t index() const { return capture_->index(); }
   RegExpCapture* capture() const { return capture_; }
+  void set_capture(RegExpCapture* capture) { capture_ = capture; }
+  const ZoneGrowableArray<uint16_t>* name() { return name_; }
+  void set_name(const ZoneGrowableArray<uint16_t>* name) { name_ = name; }
 
  private:
   RegExpCapture* capture_;
+  const ZoneGrowableArray<uint16_t>* name_;
 };
 
 class RegExpEmpty : public RegExpTree {
diff --git a/runtime/vm/regexp_bytecodes.h b/runtime/vm/regexp_bytecodes.h
index c2ef82b..858eef5 100644
--- a/runtime/vm/regexp_bytecodes.h
+++ b/runtime/vm/regexp_bytecodes.h
@@ -55,15 +55,17 @@
 V(CHECK_GT,          36, 8)   /* bc8 pad8 uc16 addr32                       */ \
 V(CHECK_NOT_BACK_REF, 37, 8)  /* bc8 reg_idx24 addr32                       */ \
 V(CHECK_NOT_BACK_REF_NO_CASE, 38, 8) /* bc8 reg_idx24 addr32                */ \
-V(CHECK_NOT_REGS_EQUAL, 39, 12) /* bc8 regidx24 reg_idx32 addr32            */ \
-V(CHECK_REGISTER_LT, 40, 12)  /* bc8 reg_idx24 value32 addr32               */ \
-V(CHECK_REGISTER_GE, 41, 12)  /* bc8 reg_idx24 value32 addr32               */ \
-V(CHECK_REGISTER_EQ_POS, 42, 8) /* bc8 reg_idx24 addr32                     */ \
-V(CHECK_AT_START,    43, 8)   /* bc8 pad24 addr32                           */ \
-V(CHECK_NOT_AT_START, 44, 8)  /* bc8 pad24 addr32                           */ \
-V(CHECK_GREEDY,      45, 8)   /* bc8 pad24 addr32                           */ \
-V(ADVANCE_CP_AND_GOTO, 46, 8) /* bc8 offset24 addr32                        */ \
-V(SET_CURRENT_POSITION_FROM_END, 47, 4) /* bc8 idx24                        */
+V(CHECK_NOT_BACK_REF_BACKWARD, 39, 8) /* bc8 reg_idx24 addr32               */ \
+V(CHECK_NOT_BACK_REF_NO_CASE_BACKWARD, 40, 8) /* bc8 reg_idx24 addr32       */ \
+V(CHECK_NOT_REGS_EQUAL, 41, 12) /* bc8 regidx24 reg_idx32 addr32            */ \
+V(CHECK_REGISTER_LT, 42, 12)  /* bc8 reg_idx24 value32 addr32               */ \
+V(CHECK_REGISTER_GE, 43, 12)  /* bc8 reg_idx24 value32 addr32               */ \
+V(CHECK_REGISTER_EQ_POS, 44, 8) /* bc8 reg_idx24 addr32                     */ \
+V(CHECK_AT_START,    45, 8)   /* bc8 pad24 addr32                           */ \
+V(CHECK_NOT_AT_START, 46, 8)  /* bc8 offset24 addr32                        */ \
+V(CHECK_GREEDY,      47, 8)   /* bc8 pad24 addr32                           */ \
+V(ADVANCE_CP_AND_GOTO, 48, 8) /* bc8 offset24 addr32                        */ \
+V(SET_CURRENT_POSITION_FROM_END, 49, 4) /* bc8 idx24                        */
 
 // clang-format on
 
diff --git a/runtime/vm/regexp_interpreter.cc b/runtime/vm/regexp_interpreter.cc
index c83f474..ecc7586 100644
--- a/runtime/vm/regexp_interpreter.cc
+++ b/runtime/vm/regexp_interpreter.cc
@@ -268,7 +268,7 @@
       break;
       BYTECODE(LOAD_CURRENT_CHAR) {
         int pos = current + (insn >> BYTECODE_SHIFT);
-        if (pos >= subject_length) {
+        if (pos < 0 || pos >= subject_length) {
           pc = code_base + Load32Aligned(pc + 4);
         } else {
           current_char = subject.CharAt(pos);
@@ -534,6 +534,55 @@
         }
         break;
       }
+      BYTECODE(CHECK_NOT_BACK_REF_BACKWARD) {
+        const int from = registers[insn >> BYTECODE_SHIFT];
+        const int len = registers[(insn >> BYTECODE_SHIFT) + 1] - from;
+        if (from < 0 || len <= 0) {
+          pc += BC_CHECK_NOT_BACK_REF_BACKWARD_LENGTH;
+          break;
+        }
+        if ((current - len) < 0) {
+          pc = code_base + Load32Aligned(pc + 4);
+          break;
+        } else {
+          // When looking behind, the string to match (if it is there) lies
+          // before the current position, so we will check the [len] characters
+          // before the current position, excluding the current position itself.
+          const int start = current - len;
+          int i;
+          for (i = 0; i < len; i++) {
+            if (subject.CharAt(from + i) != subject.CharAt(start + i)) {
+              pc = code_base + Load32Aligned(pc + 4);
+              break;
+            }
+          }
+          if (i < len) break;
+          current -= len;
+        }
+        pc += BC_CHECK_NOT_BACK_REF_BACKWARD_LENGTH;
+        break;
+      }
+      BYTECODE(CHECK_NOT_BACK_REF_NO_CASE_BACKWARD) {
+        int from = registers[insn >> BYTECODE_SHIFT];
+        int len = registers[(insn >> BYTECODE_SHIFT) + 1] - from;
+        if (from < 0 || len <= 0) {
+          pc += BC_CHECK_NOT_BACK_REF_NO_CASE_BACKWARD_LENGTH;
+          break;
+        }
+        if (current < len) {
+          pc = code_base + Load32Aligned(pc + 4);
+          break;
+        } else {
+          if (BackRefMatchesNoCase<Char>(&canonicalize, from, current - len,
+                                         len, subject)) {
+            current -= len;
+            pc += BC_CHECK_NOT_BACK_REF_NO_CASE_BACKWARD_LENGTH;
+          } else {
+            pc = code_base + Load32Aligned(pc + 4);
+          }
+        }
+        break;
+      }
       BYTECODE(CHECK_AT_START)
       if (current == 0) {
         pc = code_base + Load32Aligned(pc + 4);
@@ -541,13 +590,15 @@
         pc += BC_CHECK_AT_START_LENGTH;
       }
       break;
-      BYTECODE(CHECK_NOT_AT_START)
-      if (current == 0) {
-        pc += BC_CHECK_NOT_AT_START_LENGTH;
-      } else {
-        pc = code_base + Load32Aligned(pc + 4);
+      BYTECODE(CHECK_NOT_AT_START) {
+        const int32_t cp_offset = insn >> BYTECODE_SHIFT;
+        if (current + cp_offset == 0) {
+          pc += BC_CHECK_NOT_AT_START_LENGTH;
+        } else {
+          pc = code_base + Load32Aligned(pc + 4);
+        }
+        break;
       }
-      break;
       BYTECODE(SET_CURRENT_POSITION_FROM_END) {
         int by = static_cast<uint32_t>(insn) >> BYTECODE_SHIFT;
         if (subject_length - current > by) {
diff --git a/runtime/vm/regexp_parser.cc b/runtime/vm/regexp_parser.cc
index cbe851c..b70b945 100644
--- a/runtime/vm/regexp_parser.cc
+++ b/runtime/vm/regexp_parser.cc
@@ -129,13 +129,13 @@
   return new (Z) RegExpDisjunction(alternatives);
 }
 
-void RegExpBuilder::AddQuantifierToAtom(
+bool RegExpBuilder::AddQuantifierToAtom(
     intptr_t min,
     intptr_t max,
     RegExpQuantifier::QuantifierType quantifier_type) {
   if (pending_empty_) {
     pending_empty_ = false;
-    return;
+    return true;
   }
   RegExpTree* atom;
   if (characters_ != NULL) {
@@ -167,22 +167,28 @@
   } else if (terms_.length() > 0) {
     DEBUG_ASSERT(last_added_ == ADD_ATOM);
     atom = terms_.RemoveLast();
+    if (auto lookaround = atom->AsLookaround()) {
+      // Lookbehinds are not quantifiable.
+      if (lookaround->type() == RegExpLookaround::LOOKBEHIND) {
+        return false;
+      }
+    }
     if (atom->max_match() == 0) {
       // Guaranteed to only match an empty string.
       LAST(ADD_TERM);
       if (min == 0) {
-        return;
+        return true;
       }
       terms_.Add(atom);
-      return;
+      return true;
     }
   } else {
     // Only call immediately after adding an atom or character!
     UNREACHABLE();
-    return;
   }
   terms_.Add(new (Z) RegExpQuantifier(min, max, quantifier_type, atom));
   LAST(ADD_TERM);
+  return true;
 }
 
 // ----------------------------------------------------------------------------
@@ -190,16 +196,20 @@
 
 RegExpParser::RegExpParser(const String& in, String* error, bool multiline)
     : zone_(Thread::Current()->zone()),
-      captures_(NULL),
+      captures_(nullptr),
+      named_captures_(nullptr),
+      named_back_references_(nullptr),
       in_(in),
       current_(kEndMarker),
       next_pos_(0),
+      captures_started_(0),
       capture_count_(0),
       has_more_(true),
       multiline_(multiline),
       simple_(false),
       contains_anchor_(false),
-      is_scanned_for_captures_(false) {
+      is_scanned_for_captures_(false),
+      has_named_captures_(false) {
   Advance();
 }
 
@@ -254,6 +264,7 @@
 //   Disjunction
 RegExpTree* RegExpParser::ParsePattern() {
   RegExpTree* result = ParseDisjunction();
+  PatchNamedBackReferences();
   ASSERT(!has_more());
   // If the result of parsing is a literal string atom, and it has the
   // same length as the input, then the atom is identical to the input.
@@ -275,7 +286,8 @@
 //   Atom Quantifier
 RegExpTree* RegExpParser::ParseDisjunction() {
   // Used to store current state while parsing subexpressions.
-  RegExpParserState initial_state(NULL, INITIAL, 0, Z);
+  RegExpParserState initial_state(nullptr, INITIAL, RegExpLookaround::LOOKAHEAD,
+                                  0, nullptr, Z);
   RegExpParserState* stored_state = &initial_state;
   // Cache the builder in a local variable for quick access.
   RegExpBuilder* builder = initial_state.builder();
@@ -307,23 +319,28 @@
         intptr_t capture_index = stored_state->capture_index();
         SubexpressionType group_type = stored_state->group_type();
 
+        // Build result of subexpression.
+        if (group_type == CAPTURE) {
+          if (stored_state->IsNamedCapture()) {
+            CreateNamedCaptureAtIndex(stored_state->capture_name(),
+                                      capture_index);
+          }
+          RegExpCapture* capture = GetCapture(capture_index);
+          capture->set_body(body);
+          body = capture;
+        } else if (group_type != GROUPING) {
+          ASSERT(group_type == POSITIVE_LOOKAROUND ||
+                 group_type == NEGATIVE_LOOKAROUND);
+          bool is_positive = (group_type == POSITIVE_LOOKAROUND);
+          body = new (Z) RegExpLookaround(
+              body, is_positive, end_capture_index - capture_index,
+              capture_index, stored_state->lookaround_type());
+        }
+
         // Restore previous state.
         stored_state = stored_state->previous_state();
         builder = stored_state->builder();
 
-        // Build result of subexpression.
-        if (group_type == CAPTURE) {
-          RegExpCapture* capture = new (Z) RegExpCapture(body, capture_index);
-          (*captures_)[capture_index - 1] = capture;
-          body = capture;
-        } else if (group_type != GROUPING) {
-          ASSERT(group_type == POSITIVE_LOOKAHEAD ||
-                 group_type == NEGATIVE_LOOKAHEAD);
-          bool is_positive = (group_type == POSITIVE_LOOKAHEAD);
-          body = new (Z)
-              RegExpLookahead(body, is_positive,
-                              end_capture_index - capture_index, capture_index);
-        }
         builder->AddAtom(body);
         // For compatibility with JSC and ES3, we allow quantifiers after
         // lookaheads, and break in all cases.
@@ -370,37 +387,7 @@
         break;
       }
       case '(': {
-        SubexpressionType subexpr_type = CAPTURE;
-        Advance();
-        if (current() == '?') {
-          switch (Next()) {
-            case ':':
-              subexpr_type = GROUPING;
-              break;
-            case '=':
-              subexpr_type = POSITIVE_LOOKAHEAD;
-              break;
-            case '!':
-              subexpr_type = NEGATIVE_LOOKAHEAD;
-              break;
-            default:
-              ReportError("Invalid group");
-              UNREACHABLE();
-          }
-          Advance(2);
-        } else {
-          if (captures_ == NULL) {
-            captures_ = new ZoneGrowableArray<RegExpCapture*>(2);
-          }
-          if (captures_started() >= kMaxCaptures) {
-            ReportError("Too many captures");
-            UNREACHABLE();
-          }
-          captures_->Add(NULL);
-        }
-        // Store current state and begin new disjunction parsing.
-        stored_state = new RegExpParserState(stored_state, subexpr_type,
-                                             captures_started(), Z);
+        stored_state = ParseOpenParenthesis(stored_state);
         builder = stored_state->builder();
         continue;
       }
@@ -457,16 +444,18 @@
           case '9': {
             intptr_t index = 0;
             if (ParseBackReferenceIndex(&index)) {
-              RegExpCapture* capture = NULL;
-              if (captures_ != NULL && index <= captures_->length()) {
-                capture = captures_->At(index - 1);
-              }
-              if (capture == NULL) {
+              if (stored_state->IsInsideCaptureGroup(index)) {
+                // The back reference is inside the capture group it refers to.
+                // Nothing can possibly have been captured yet, so we use empty
+                // instead. This ensures that, when checking a back reference,
+                // the capture registers of the referenced capture are either
+                // both set or both cleared.
                 builder->AddEmpty();
-                break;
+              } else {
+                RegExpCapture* capture = GetCapture(index);
+                RegExpTree* atom = new RegExpBackReference(capture);
+                builder->AddAtom(atom);
               }
-              RegExpTree* atom = new RegExpBackReference(capture);
-              builder->AddAtom(atom);
               break;
             }
             uint32_t first_digit = Next();
@@ -476,8 +465,8 @@
               Advance(2);
               break;
             }
+            FALL_THROUGH;
           }
-          // FALLTHROUGH
           case '0': {
             Advance();
             uint32_t octal = ParseOctalLiteral();
@@ -544,6 +533,18 @@
             }
             break;
           }
+          case 'k':
+            // Either an identity escape or a named back-reference.  The two
+            // interpretations are mutually exclusive: '\k' is interpreted as
+            // an identity escape for non-Unicode patterns without named
+            // capture groups, and as the beginning of a named back-reference
+            // in all other cases.
+            if (HasNamedCaptures()) {
+              Advance(2);
+              ParseNamedBackReference(builder, stored_state);
+              break;
+            }
+            FALL_THROUGH;
           default:
             // Identity escape.
             builder->AddCharacter(Next());
@@ -557,8 +558,8 @@
           ReportError("Nothing to repeat");
           UNREACHABLE();
         }
+        FALL_THROUGH;
       }
-      /* Falls through */
       default:
         builder->AddCharacter(current());
         Advance();
@@ -610,7 +611,10 @@
       quantifier_type = RegExpQuantifier::POSSESSIVE;
       Advance();
     }
-    builder->AddQuantifierToAtom(min, max, quantifier_type);
+    if (!builder->AddQuantifierToAtom(min, max, quantifier_type)) {
+      ReportError("invalid quantifier.");
+      UNREACHABLE();
+    }
   }
 }
 
@@ -631,6 +635,68 @@
 }
 #endif
 
+RegExpParser::RegExpParserState* RegExpParser::ParseOpenParenthesis(
+    RegExpParserState* state) {
+  RegExpLookaround::Type lookaround_type = state->lookaround_type();
+  bool is_named_capture = false;
+  const RegExpCaptureName* capture_name = nullptr;
+  SubexpressionType subexpr_type = CAPTURE;
+  Advance();
+  if (current() == '?') {
+    switch (Next()) {
+      case ':':
+        Advance(2);
+        subexpr_type = GROUPING;
+        break;
+      case '=':
+        Advance(2);
+        lookaround_type = RegExpLookaround::LOOKAHEAD;
+        subexpr_type = POSITIVE_LOOKAROUND;
+        break;
+      case '!':
+        Advance(2);
+        lookaround_type = RegExpLookaround::LOOKAHEAD;
+        subexpr_type = NEGATIVE_LOOKAROUND;
+        break;
+      case '<':
+        Advance();
+        if (Next() == '=') {
+          Advance(2);
+          lookaround_type = RegExpLookaround::LOOKBEHIND;
+          subexpr_type = POSITIVE_LOOKAROUND;
+          break;
+        } else if (Next() == '!') {
+          Advance(2);
+          lookaround_type = RegExpLookaround::LOOKBEHIND;
+          subexpr_type = NEGATIVE_LOOKAROUND;
+          break;
+        }
+        is_named_capture = true;
+        has_named_captures_ = true;
+        Advance();
+        break;
+      default:
+        ReportError("Invalid group");
+        UNREACHABLE();
+    }
+  }
+
+  if (subexpr_type == CAPTURE) {
+    if (captures_started_ >= kMaxCaptures) {
+      ReportError("Too many captures");
+      UNREACHABLE();
+    }
+    captures_started_++;
+
+    if (is_named_capture) {
+      capture_name = ParseCaptureGroupName();
+    }
+  }
+  // Store current state and begin new disjunction parsing.
+  return new RegExpParserState(state, subexpr_type, lookaround_type,
+                               captures_started_, capture_name, Z);
+}
+
 // In order to know whether an escape is a backreference or not we have to scan
 // the entire regexp and find the number of capturing parentheses.  However we
 // don't want to scan the regexp twice unless it is necessary.  This mini-parser
@@ -638,6 +704,8 @@
 // noncapturing parentheses and can skip character classes and backslash-escaped
 // characters.
 void RegExpParser::ScanForCaptures() {
+  ASSERT(!is_scanned_for_captures_);
+  const intptr_t saved_position = position();
   // Start with captures started previous to current position
   intptr_t capture_count = captures_started();
   // Add count of captures after this position.
@@ -661,12 +729,31 @@
         break;
       }
       case '(':
-        if (current() != '?') capture_count++;
+        // At this point we could be in
+        // * a non-capturing group '(:',
+        // * a lookbehind assertion '(?<=' '(?<!'
+        // * or a named capture '(?<'.
+        //
+        // Of these, only named captures are capturing groups.
+        if (current() == '?') {
+          Advance();
+          if (current() != '<') break;
+
+          Advance();
+          if (current() == '=' || current() == '!') break;
+
+          // Found a possible named capture. It could turn out to be a syntax
+          // error (e.g. an unterminated or invalid name), but that distinction
+          // does not matter for our purposes.
+          has_named_captures_ = true;
+        }
+        capture_count++;
         break;
     }
   }
   capture_count_ = capture_count;
   is_scanned_for_captures_ = true;
+  Reset(saved_position);
 }
 
 static inline bool IsDecimalDigit(int32_t c) {
@@ -695,11 +782,7 @@
     }
   }
   if (value > captures_started()) {
-    if (!is_scanned_for_captures_) {
-      intptr_t saved_position = position();
-      ScanForCaptures();
-      Reset(saved_position);
-    }
+    if (!is_scanned_for_captures_) ScanForCaptures();
     if (value > capture_count_) {
       Reset(start);
       return false;
@@ -709,6 +792,216 @@
   return true;
 }
 
+namespace {
+
+inline constexpr bool IsIdentifierStart(uint16_t ch) {
+  return (ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z') || ch == '_' ||
+         ch == '$';
+}
+
+inline constexpr bool IsIdentifierPart(uint16_t ch) {
+  return IsIdentifierStart(ch) || (ch >= '0' && ch <= '9');
+}
+
+bool IsSameName(const RegExpCaptureName* name1,
+                const RegExpCaptureName* name2) {
+  if (name1->length() != name2->length()) return false;
+  for (intptr_t i = 0; i < name1->length(); i++) {
+    if (name1->At(i) != name2->At(i)) return false;
+  }
+  return true;
+}
+
+}  // end namespace
+
+const RegExpCaptureName* RegExpParser::ParseCaptureGroupName() {
+  auto name = new (Z) RegExpCaptureName();
+
+  bool at_start = true;
+  while (true) {
+    const uint16_t c = current();
+    Advance();
+
+    // The backslash char is misclassified as both ID_Start and ID_Continue.
+    if (c == '\\') {
+      ReportError("Invalid capture group name");
+      UNREACHABLE();
+    }
+
+    if (at_start) {
+      if (!IsIdentifierStart(c)) {
+        ReportError("Invalid capture group name");
+        UNREACHABLE();
+      }
+      name->Add(c);
+      at_start = false;
+    } else {
+      if (c == '>') {
+        break;
+      } else if (IsIdentifierPart(c)) {
+        name->Add(c);
+      } else {
+        ReportError("Invalid capture group name");
+        UNREACHABLE();
+      }
+    }
+  }
+
+  return name;
+}
+
+intptr_t RegExpParser::GetNamedCaptureIndex(const RegExpCaptureName* name) {
+  for (const auto& capture : *named_captures_) {
+    if (IsSameName(name, capture->name())) return capture->index();
+  }
+  return -1;
+}
+
+void RegExpParser::CreateNamedCaptureAtIndex(const RegExpCaptureName* name,
+                                             intptr_t index) {
+  ASSERT(0 < index && index <= captures_started_);
+  ASSERT(name != nullptr);
+
+  if (named_captures_ == nullptr) {
+    named_captures_ = new (Z) ZoneGrowableArray<RegExpCapture*>(1);
+  } else {
+    // Check for duplicates and bail if we find any. Currently O(n^2).
+    if (GetNamedCaptureIndex(name) >= 0) {
+      ReportError("Duplicate capture group name");
+      UNREACHABLE();
+    }
+  }
+
+  RegExpCapture* capture = GetCapture(index);
+  ASSERT(capture->name() == nullptr);
+
+  capture->set_name(name);
+  named_captures_->Add(capture);
+}
+
+bool RegExpParser::ParseNamedBackReference(RegExpBuilder* builder,
+                                           RegExpParserState* state) {
+  // The parser is assumed to be on the '<' in \k<name>.
+  if (current() != '<') {
+    ReportError("Invalid named reference");
+    UNREACHABLE();
+  }
+
+  Advance();
+  const RegExpCaptureName* name = ParseCaptureGroupName();
+  if (name == nullptr) {
+    return false;
+  }
+
+  if (state->IsInsideCaptureGroup(name)) {
+    builder->AddEmpty();
+  } else {
+    RegExpBackReference* atom = new (Z) RegExpBackReference();
+    atom->set_name(name);
+
+    builder->AddAtom(atom);
+
+    if (named_back_references_ == nullptr) {
+      named_back_references_ =
+          new (Z) ZoneGrowableArray<RegExpBackReference*>(1);
+    }
+    named_back_references_->Add(atom);
+  }
+
+  return true;
+}
+
+void RegExpParser::PatchNamedBackReferences() {
+  if (named_back_references_ == nullptr) return;
+
+  if (named_captures_ == nullptr) {
+    ReportError("Invalid named capture referenced");
+    return;
+  }
+
+  // Look up and patch the actual capture for each named back reference.
+  // Currently O(n^2), optimize if necessary.
+  for (intptr_t i = 0; i < named_back_references_->length(); i++) {
+    RegExpBackReference* ref = named_back_references_->At(i);
+    intptr_t index = GetNamedCaptureIndex(ref->name());
+
+    if (index < 0) {
+      ReportError("Invalid named capture referenced");
+      UNREACHABLE();
+    }
+    ref->set_capture(GetCapture(index));
+  }
+}
+
+RegExpCapture* RegExpParser::GetCapture(intptr_t index) {
+  // The index for the capture groups are one-based. Its index in the list is
+  // zero-based.
+  const intptr_t know_captures =
+      is_scanned_for_captures_ ? capture_count_ : captures_started_;
+  ASSERT(index <= know_captures);
+  if (captures_ == nullptr) {
+    captures_ = new (Z) ZoneGrowableArray<RegExpCapture*>(know_captures);
+  }
+  while (captures_->length() < know_captures) {
+    captures_->Add(new (Z) RegExpCapture(captures_->length() + 1));
+  }
+  return captures_->At(index - 1);
+}
+
+RawArray* RegExpParser::CreateCaptureNameMap() {
+  if (named_captures_ == nullptr || named_captures_->is_empty()) {
+    return Array::null();
+  }
+
+  const intptr_t len = named_captures_->length() * 2;
+
+  const Array& array = Array::Handle(Array::New(len));
+
+  auto& name = String::Handle();
+  auto& smi = Smi::Handle();
+  for (intptr_t i = 0; i < named_captures_->length(); i++) {
+    RegExpCapture* capture = named_captures_->At(i);
+    name =
+        String::FromUTF16(capture->name()->data(), capture->name()->length());
+    smi = Smi::New(capture->index());
+    array.SetAt(i * 2, name);
+    array.SetAt(i * 2 + 1, smi);
+  }
+
+  return array.raw();
+}
+
+bool RegExpParser::HasNamedCaptures() {
+  if (has_named_captures_ || is_scanned_for_captures_) {
+    return has_named_captures_;
+  }
+
+  ScanForCaptures();
+  ASSERT(is_scanned_for_captures_);
+  return has_named_captures_;
+}
+
+bool RegExpParser::RegExpParserState::IsInsideCaptureGroup(intptr_t index) {
+  for (RegExpParserState* s = this; s != nullptr; s = s->previous_state()) {
+    if (s->group_type() != CAPTURE) continue;
+    // Return true if we found the matching capture index.
+    if (index == s->capture_index()) return true;
+    // Abort if index is larger than what has been parsed up till this state.
+    if (index > s->capture_index()) return false;
+  }
+  return false;
+}
+
+bool RegExpParser::RegExpParserState::IsInsideCaptureGroup(
+    const RegExpCaptureName* name) {
+  ASSERT(name != nullptr);
+  for (RegExpParserState* s = this; s != nullptr; s = s->previous_state()) {
+    if (s->capture_name() == nullptr) continue;
+    if (IsSameName(s->capture_name(), name)) return true;
+  }
+  return false;
+}
+
 // QuantifierPrefix ::
 //   { DecimalDigits }
 //   { DecimalDigits , }
@@ -866,12 +1159,19 @@
       return '\\';
     }
     case '0':
+      FALL_THROUGH;
     case '1':
+      FALL_THROUGH;
     case '2':
+      FALL_THROUGH;
     case '3':
+      FALL_THROUGH;
     case '4':
+      FALL_THROUGH;
     case '5':
+      FALL_THROUGH;
     case '6':
+      FALL_THROUGH;
     case '7':
       // For compatibility, we interpret a decimal escape that isn't
       // a back reference (and therefore either \0 or not valid according
@@ -1025,6 +1325,7 @@
   intptr_t capture_count = parser.captures_started();
   result->simple = tree->IsAtom() && parser.simple() && capture_count == 0;
   result->contains_anchor = parser.contains_anchor();
+  result->capture_name_map = parser.CreateCaptureNameMap();
   result->capture_count = capture_count;
 }
 
diff --git a/runtime/vm/regexp_parser.h b/runtime/vm/regexp_parser.h
index 51e44c5..a2b626b 100644
--- a/runtime/vm/regexp_parser.h
+++ b/runtime/vm/regexp_parser.h
@@ -23,7 +23,10 @@
   void AddAtom(RegExpTree* tree);
   void AddAssertion(RegExpTree* tree);
   void NewAlternative();  // '|'
-  void AddQuantifierToAtom(intptr_t min,
+  // Attempt to add a quantifier to the last atom added. The return value
+  // denotes whether the attempt succeeded, since some atoms like lookbehind
+  // cannot be quantified.
+  bool AddQuantifierToAtom(intptr_t min,
                            intptr_t max,
                            RegExpQuantifier::QuantifierType type);
   RegExpTree* ToRegExp();
@@ -49,6 +52,8 @@
 #endif
 };
 
+using RegExpCaptureName = ZoneGrowableArray<uint16_t>;
+
 class RegExpParser : public ValueObject {
  public:
   RegExpParser(const String& in, String* error, bool multiline_mode);
@@ -93,9 +98,7 @@
   bool simple();
   bool contains_anchor() { return contains_anchor_; }
   void set_contains_anchor() { contains_anchor_ = true; }
-  intptr_t captures_started() {
-    return captures_ == NULL ? 0 : captures_->length();
-  }
+  intptr_t captures_started() { return captures_started_; }
   intptr_t position() { return next_pos_ - 1; }
 
   static const intptr_t kMaxCaptures = 1 << 16;
@@ -105,8 +108,8 @@
   enum SubexpressionType {
     INITIAL,
     CAPTURE,  // All positive values represent captures.
-    POSITIVE_LOOKAHEAD,
-    NEGATIVE_LOOKAHEAD,
+    POSITIVE_LOOKAROUND,
+    NEGATIVE_LOOKAROUND,
     GROUPING
   };
 
@@ -114,12 +117,16 @@
    public:
     RegExpParserState(RegExpParserState* previous_state,
                       SubexpressionType group_type,
+                      RegExpLookaround::Type lookaround_type,
                       intptr_t disjunction_capture_index,
+                      const RegExpCaptureName* capture_name,
                       Zone* zone)
         : previous_state_(previous_state),
           builder_(new (zone) RegExpBuilder()),
           group_type_(group_type),
-          disjunction_capture_index_(disjunction_capture_index) {}
+          lookaround_type_(lookaround_type),
+          disjunction_capture_index_(disjunction_capture_index),
+          capture_name_(capture_name) {}
     // Parser state of containing expression, if any.
     RegExpParserState* previous_state() { return previous_state_; }
     bool IsSubexpression() { return previous_state_ != NULL; }
@@ -127,10 +134,20 @@
     RegExpBuilder* builder() { return builder_; }
     // Type of regexp being parsed (parenthesized group or entire regexp).
     SubexpressionType group_type() { return group_type_; }
+    // Lookahead or lookbehind.
+    RegExpLookaround::Type lookaround_type() { return lookaround_type_; }
     // Index in captures array of first capture in this sub-expression, if any.
     // Also the capture index of this sub-expression itself, if group_type
     // is CAPTURE.
     intptr_t capture_index() { return disjunction_capture_index_; }
+    const RegExpCaptureName* capture_name() const { return capture_name_; }
+
+    bool IsNamedCapture() const { return capture_name_ != nullptr; }
+
+    // Check whether the parser is inside a capture group with the given index.
+    bool IsInsideCaptureGroup(intptr_t index);
+    // Check whether the parser is inside a capture group with the given name.
+    bool IsInsideCaptureGroup(const RegExpCaptureName* name);
 
    private:
     // Linked list implementation of stack of states.
@@ -139,10 +156,42 @@
     RegExpBuilder* builder_;
     // Stored disjunction type (capture, look-ahead or grouping), if any.
     SubexpressionType group_type_;
+    // Stored read direction.
+    const RegExpLookaround::Type lookaround_type_;
     // Stored disjunction's capture index (if any).
     intptr_t disjunction_capture_index_;
+    // Stored capture name (if any).
+    const RegExpCaptureName* const capture_name_;
   };
 
+  // Return the 1-indexed RegExpCapture object, allocate if necessary.
+  RegExpCapture* GetCapture(intptr_t index);
+
+  // Creates a new named capture at the specified index. Must be called exactly
+  // once for each named capture. Fails if a capture with the same name is
+  // encountered.
+  void CreateNamedCaptureAtIndex(const RegExpCaptureName* name, intptr_t index);
+
+  // Parses the name of a capture group (?<name>pattern). The name must adhere
+  // to IdentifierName in the ECMAScript standard.
+  const RegExpCaptureName* ParseCaptureGroupName();
+
+  bool ParseNamedBackReference(RegExpBuilder* builder,
+                               RegExpParserState* state);
+  RegExpParserState* ParseOpenParenthesis(RegExpParserState* state);
+  intptr_t GetNamedCaptureIndex(const RegExpCaptureName* name);
+
+  // After the initial parsing pass, patch corresponding RegExpCapture objects
+  // into all RegExpBackReferences. This is done after initial parsing in order
+  // to avoid complicating cases in which references come before the capture.
+  void PatchNamedBackReferences();
+
+  RawArray* CreateCaptureNameMap();
+
+  // Returns true iff the pattern contains named captures. May call
+  // ScanForCaptures to look ahead at the remaining pattern.
+  bool HasNamedCaptures();
+
   Zone* zone() { return zone_; }
 
   uint32_t current() { return current_; }
@@ -154,9 +203,12 @@
 
   Zone* zone_;
   ZoneGrowableArray<RegExpCapture*>* captures_;
+  ZoneGrowableArray<RegExpCapture*>* named_captures_;
+  ZoneGrowableArray<RegExpBackReference*>* named_back_references_;
   const String& in_;
   uint32_t current_;
   intptr_t next_pos_;
+  intptr_t captures_started_;
   // The capture count is only valid after we have scanned for captures.
   intptr_t capture_count_;
   bool has_more_;
@@ -164,6 +216,7 @@
   bool simple_;
   bool contains_anchor_;
   bool is_scanned_for_captures_;
+  bool has_named_captures_;
 };
 
 }  // namespace dart
diff --git a/runtime/vm/resolver.cc b/runtime/vm/resolver.cc
index bd13f8c..d7a9fc6 100644
--- a/runtime/vm/resolver.cc
+++ b/runtime/vm/resolver.cc
@@ -78,7 +78,7 @@
     demangled ^= Field::NameFromGetter(function_name);
   }
 
-  if (Function::IsDynamicInvocationForwaderName(function_name)) {
+  if (Function::IsDynamicInvocationForwarderName(function_name)) {
     demangled ^=
         Function::DemangleDynamicInvocationForwarderName(function_name);
 #ifdef DART_PRECOMPILED_RUNTIME
diff --git a/runtime/vm/runtime_entry.cc b/runtime/vm/runtime_entry.cc
index e707f06..da70f90 100644
--- a/runtime/vm/runtime_entry.cc
+++ b/runtime/vm/runtime_entry.cc
@@ -176,16 +176,18 @@
 
   const CodeSourceMap& map =
       CodeSourceMap::Handle(zone, code.code_source_map());
-  ASSERT(!map.IsNull());
+  String& member_name = String::Handle(zone);
+  if (!map.IsNull()) {
+    CodeSourceMapReader reader(map, Array::null_array(),
+                               Function::null_function());
+    const intptr_t name_index = reader.GetNullCheckNameIndexAt(pc_offset);
+    RELEASE_ASSERT(name_index >= 0);
 
-  CodeSourceMapReader reader(map, Array::null_array(),
-                             Function::null_function());
-  const intptr_t name_index = reader.GetNullCheckNameIndexAt(pc_offset);
-  RELEASE_ASSERT(name_index >= 0);
-
-  const ObjectPool& pool = ObjectPool::Handle(zone, code.GetObjectPool());
-  const String& member_name =
-      String::CheckedHandle(zone, pool.ObjectAt(name_index));
+    const ObjectPool& pool = ObjectPool::Handle(zone, code.GetObjectPool());
+    member_name ^= pool.ObjectAt(name_index);
+  } else {
+    member_name = Symbols::OptimizedOut().raw();
+  }
 
   NullErrorHelper(zone, member_name);
 }
@@ -217,19 +219,6 @@
   Exceptions::ThrowByType(Exceptions::kIntegerDivisionByZeroException, args);
 }
 
-static void EnsureNewOrRemembered(Isolate* isolate,
-                                  Thread* thread,
-                                  const Object& result) {
-  // For write barrier elimination, we need to ensure that the allocation ends
-  // up in the new space if Heap::IsGuaranteedNewSpaceAllocation is true for
-  // this size or else the object needs to go into the store buffer.
-  if (!isolate->heap()->new_space()->Contains(
-          reinterpret_cast<uword>(result.raw()))) {
-    result.raw()->SetRememberedBit();
-    thread->StoreBufferAddObject(result.raw());
-  }
-}
-
 // Allocation of a fixed length array of given element type.
 // This runtime entry is never called for allocating a List of a generic type,
 // because a prior run time call instantiates the element type if necessary.
@@ -248,7 +237,7 @@
   }
   if (length.IsSmi()) {
     const intptr_t len = Smi::Cast(length).Value();
-    if ((len >= 0) && (len <= Array::kMaxElements)) {
+    if (len >= 0 && len <= Array::kMaxElements) {
       const Array& array = Array::Handle(zone, Array::New(len, Heap::kNew));
       arguments.SetReturn(array);
       TypeArguments& element_type =
@@ -257,11 +246,8 @@
       // vector may be longer than 1 due to a type optimization reusing the type
       // argument vector of the instantiator.
       ASSERT(element_type.IsNull() ||
-             ((element_type.Length() >= 1) && element_type.IsInstantiated()));
+             (element_type.Length() >= 1 && element_type.IsInstantiated()));
       array.SetTypeArguments(element_type);  // May be null.
-      if (!array.raw()->IsCardRemembered()) {
-        EnsureNewOrRemembered(isolate, thread, array);
-      }
       return;
     }
   }
@@ -296,23 +282,68 @@
   if (cls.NumTypeArguments() == 0) {
     // No type arguments required for a non-parameterized type.
     ASSERT(Instance::CheckedHandle(zone, arguments.ArgAt(1)).IsNull());
-    return;
-  }
-  TypeArguments& type_arguments =
-      TypeArguments::CheckedHandle(zone, arguments.ArgAt(1));
-  // Unless null (for a raw type), the type argument vector may be longer than
-  // necessary due to a type optimization reusing the type argument vector of
-  // the instantiator.
-  ASSERT(type_arguments.IsNull() ||
-         (type_arguments.IsInstantiated() &&
-          (type_arguments.Length() >= cls.NumTypeArguments())));
-  instance.SetTypeArguments(type_arguments);
-
-  if (Heap::IsAllocatableInNewSpace(cls.instance_size())) {
-    EnsureNewOrRemembered(isolate, thread, instance);
+  } else {
+    const auto& type_arguments =
+        TypeArguments::CheckedHandle(zone, arguments.ArgAt(1));
+    // Unless null (for a raw type), the type argument vector may be longer than
+    // necessary due to a type optimization reusing the type argument vector of
+    // the instantiator.
+    ASSERT(type_arguments.IsNull() ||
+           (type_arguments.IsInstantiated() &&
+            (type_arguments.Length() >= cls.NumTypeArguments())));
+    instance.SetTypeArguments(type_arguments);
   }
 }
 
+DEFINE_LEAF_RUNTIME_ENTRY(RawObject*,
+                          AddAllocatedObjectToRememberedSet,
+                          2,
+                          RawObject* object,
+                          Thread* thread) {
+  // The allocation stubs in will call this leaf method for newly allocated
+  // old space objects.
+  RELEASE_ASSERT(object->IsOldObject() && !object->IsRemembered());
+
+  // If we eliminate a generational write barriers on allocations of an object
+  // we need to ensure it's either a new-space object or it has been added to
+  // the remebered set.
+  //
+  // NOTE: We use reinterpret_cast<>() instead of ::RawCast() to avoid handle
+  // allocations in debug mode. Handle allocations in leaf runtimes can cause
+  // memory leaks because they will allocate into a handle scope from the next
+  // outermost runtime code (to which the genenerated Dart code might not return
+  // in a long time).
+  bool add_to_remembered_set = true;
+  if (object->IsArray()) {
+    const intptr_t length =
+        Array::LengthOf(reinterpret_cast<RawArray*>(object));
+    add_to_remembered_set =
+        CreateArrayInstr::WillAllocateNewOrRemembered(length);
+  } else if (object->IsContext()) {
+    const intptr_t num_context_variables =
+        Context::NumVariables(reinterpret_cast<RawContext*>(object));
+    add_to_remembered_set =
+        AllocateContextInstr::WillAllocateNewOrRemembered(
+            num_context_variables) ||
+        AllocateUninitializedContextInstr::WillAllocateNewOrRemembered(
+            num_context_variables);
+  }
+
+  if (add_to_remembered_set) {
+    object->AddToRememberedSet(thread);
+  }
+
+  // For incremental write barrier elimination, we need to ensure that the
+  // allocation ends up in the new space or else the object needs to added
+  // to deferred marking stack so it will be [re]scanned.
+  if (thread->is_marking()) {
+    thread->DeferredMarkingStackAddObject(object);
+  }
+
+  return object;
+}
+END_LEAF_RUNTIME_ENTRY
+
 // Instantiate type.
 // Arg0: uninstantiated type.
 // Arg1: instantiator type arguments.
@@ -414,10 +445,6 @@
   const Context& context =
       Context::Handle(zone, Context::New(num_variables.Value()));
   arguments.SetReturn(context);
-  if (Heap::IsAllocatableInNewSpace(
-          Context::InstanceSize(num_variables.Value()))) {
-    EnsureNewOrRemembered(isolate, thread, context);
-  }
 }
 
 // Make a copy of the given context, including the values of the captured
@@ -437,28 +464,6 @@
   arguments.SetReturn(cloned_ctx);
 }
 
-// Extract a method by allocating and initializing a new Closure.
-// Arg0: receiver.
-// Arg1: method.
-// Return value: newly allocated Closure.
-DEFINE_RUNTIME_ENTRY(ExtractMethod, 2) {
-  ASSERT(FLAG_enable_interpreter);
-  const Instance& receiver = Instance::CheckedHandle(zone, arguments.ArgAt(0));
-  const Function& method = Function::CheckedHandle(zone, arguments.ArgAt(1));
-  const TypeArguments& instantiator_type_arguments =
-      method.HasInstantiatedSignature(kCurrentClass)
-          ? Object::null_type_arguments()
-          : TypeArguments::Handle(zone, receiver.GetTypeArguments());
-  ASSERT(method.HasInstantiatedSignature(kFunctions));
-  const Context& context = Context::Handle(zone, Context::New(1));
-  context.SetAt(0, receiver);
-  const Closure& closure = Closure::Handle(
-      zone,
-      Closure::New(instantiator_type_arguments, Object::null_type_arguments(),
-                   Object::empty_type_arguments(), method, context));
-  arguments.SetReturn(closure);
-}
-
 // Result of an invoke may be an unhandled exception, in which case we
 // rethrow it.
 static void ThrowIfError(const Object& result) {
@@ -495,16 +500,22 @@
 
 // Resolve 'call' function of receiver.
 // Arg0: receiver (not a closure).
+// Arg1: arguments descriptor
 // Return value: 'call' function'.
-DEFINE_RUNTIME_ENTRY(ResolveCallFunction, 1) {
+DEFINE_RUNTIME_ENTRY(ResolveCallFunction, 2) {
   ASSERT(FLAG_enable_interpreter);
   const Instance& receiver = Instance::CheckedHandle(zone, arguments.ArgAt(0));
+  const Array& descriptor = Array::CheckedHandle(zone, arguments.ArgAt(1));
+  ArgumentsDescriptor args_desc(descriptor);
   ASSERT(!receiver.IsClosure());  // Interpreter tests for closure.
   Class& cls = Class::Handle(zone, receiver.clazz());
   Function& call_function = Function::Handle(zone);
   do {
     call_function = cls.LookupDynamicFunction(Symbols::Call());
     if (!call_function.IsNull()) {
+      if (!call_function.AreValidArguments(args_desc, NULL)) {
+        call_function = Function::null();
+      }
       break;
     }
     cls = cls.SuperClass();
@@ -1033,7 +1044,7 @@
 
   // Handle noSuchMethod for dyn:methodName by getting a noSuchMethod dispatcher
   // (or a call-through getter for methodName).
-  if (Function::IsDynamicInvocationForwaderName(target_name)) {
+  if (Function::IsDynamicInvocationForwarderName(target_name)) {
     const String& demangled = String::Handle(
         Function::DemangleDynamicInvocationForwarderName(target_name));
     return InlineCacheMissHelper(receiver, args_descriptor, demangled);
@@ -1112,14 +1123,14 @@
     return target_function.raw();
   }
   if (args.length() == 1) {
-    if (ic_data.IsTrackingExactness()) {
+    if (ic_data.is_tracking_exactness()) {
 #if !defined(DART_PRECOMPILED_RUNTIME)
       const auto& receiver = *args[0];
       const auto state = receiver.IsNull()
                              ? StaticTypeExactnessState::NotExact()
                              : StaticTypeExactnessState::Compute(
                                    Type::Cast(AbstractType::Handle(
-                                       ic_data.StaticReceiverType())),
+                                       ic_data.receivers_static_type())),
                                    receiver);
       ic_data.AddReceiverCheck(
           receiver.GetClassId(), target_function,
@@ -1674,7 +1685,7 @@
     target_name = MegamorphicCache::Cast(ic_data_or_cache).target_name();
   }
 
-  if (Function::IsDynamicInvocationForwaderName(target_name)) {
+  if (Function::IsDynamicInvocationForwarderName(target_name)) {
     target_name = Function::DemangleDynamicInvocationForwarderName(target_name);
   }
 
@@ -1690,7 +1701,7 @@
   const Object& result = Object::Handle(                                       \
       zone, DartEntry::InvokeNoSuchMethod(                                     \
                 receiver, target_name, orig_arguments, orig_arguments_desc));  \
-  ThrowIfError(result);                                                    \
+  ThrowIfError(result);                                                        \
   arguments.SetReturn(result);
 
 #define CLOSURIZE(some_function)                                               \
@@ -1789,6 +1800,26 @@
   arguments.SetReturn(result);
 }
 
+// Invoke appropriate noSuchMethod function.
+// Arg0: receiver
+// Arg1: arguments descriptor array.
+// Arg2: arguments array.
+// Arg3: function name.
+DEFINE_RUNTIME_ENTRY(InvokeNoSuchMethod, 4) {
+  ASSERT(FLAG_enable_interpreter);
+  const Instance& receiver = Instance::CheckedHandle(zone, arguments.ArgAt(0));
+  const Array& orig_arguments_desc =
+      Array::CheckedHandle(zone, arguments.ArgAt(1));
+  const Array& orig_arguments = Array::CheckedHandle(zone, arguments.ArgAt(2));
+  const String& original_function_name =
+      String::CheckedHandle(zone, arguments.ArgAt(3));
+
+  const Object& result = Object::Handle(DartEntry::InvokeNoSuchMethod(
+      receiver, original_function_name, orig_arguments, orig_arguments_desc));
+  ThrowIfError(result);
+  arguments.SetReturn(result);
+}
+
 #if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
 // The following code is used to stress test
 //  - deoptimization
@@ -1797,6 +1828,11 @@
 //  - hot reload
 static void HandleStackOverflowTestCases(Thread* thread) {
   Isolate* isolate = thread->isolate();
+
+  if (FLAG_shared_slow_path_triggers_gc) {
+    isolate->heap()->CollectAllGarbage();
+  }
+
   bool do_deopt = false;
   bool do_stacktrace = false;
   bool do_reload = false;
@@ -1825,7 +1861,7 @@
     }
   }
   if ((FLAG_deoptimize_filter != NULL) || (FLAG_stacktrace_filter != NULL) ||
-      FLAG_reload_every_optimized) {
+      FLAG_reload_every) {
     DartFrameIterator iterator(thread,
                                StackFrameIterator::kNoCrossThreadIteration);
     StackFrame* frame = iterator.NextFrame();
@@ -2015,15 +2051,11 @@
   // persist.
   uword stack_overflow_flags = thread->GetAndClearStackOverflowFlags();
 
-  if (FLAG_shared_slow_path_triggers_gc) {
-    isolate->heap()->CollectAllGarbage();
-  }
-
   bool interpreter_stack_overflow = false;
 #if !defined(DART_PRECOMPILED_RUNTIME)
   if (FLAG_enable_interpreter) {
     // Do not allocate an interpreter, if none is allocated yet.
-    Interpreter* interpreter = Thread::Current()->interpreter();
+    Interpreter* interpreter = thread->interpreter();
     if (interpreter != NULL) {
       interpreter_stack_overflow =
           interpreter->get_sp() >= interpreter->overflow_stack_limit();
@@ -2093,6 +2125,9 @@
   if ((!optimizing_compilation) ||
       Compiler::CanOptimizeFunction(thread, function)) {
     if (FLAG_background_compilation) {
+      if (FLAG_enable_inlining_annotations) {
+        FATAL("Cannot enable inlining annotations and background compilation");
+      }
       Field& field = Field::Handle(zone, isolate->GetDeoptimizingBoxedField());
       while (!field.IsNull()) {
         if (FLAG_trace_optimization || FLAG_trace_field_guards) {
@@ -2103,25 +2138,21 @@
         // Get next field.
         field = isolate->GetDeoptimizingBoxedField();
       }
-    }
-    // TODO(srdjan): Fix background compilation of regular expressions.
-    if (FLAG_background_compilation) {
-      if (FLAG_enable_inlining_annotations) {
-        FATAL("Cannot enable inlining annotations and background compilation");
-      }
-      if (!BackgroundCompiler::IsDisabled(isolate) &&
+      if (!BackgroundCompiler::IsDisabled(isolate, optimizing_compilation) &&
           function.is_background_optimizable()) {
-        if (FLAG_background_compilation_stop_alot) {
-          BackgroundCompiler::Stop(isolate);
-        }
-        // Reduce the chance of triggering optimization while the function is
-        // being optimized in the background. INT_MIN should ensure that it
-        // takes long time to trigger optimization.
+        // Ensure background compiler is running, if not start it.
+        BackgroundCompiler::Start(isolate);
+        // Reduce the chance of triggering a compilation while the function is
+        // being compiled in the background. INT_MIN should ensure that it
+        // takes long time to trigger a compilation.
         // Note that the background compilation queue rejects duplicate entries.
         function.SetUsageCounter(INT_MIN);
-        BackgroundCompiler::Start(isolate);
-        isolate->background_compiler()->CompileOptimized(function);
-
+        if (optimizing_compilation) {
+          isolate->optimizing_background_compiler()->Compile(function);
+        } else {
+          ASSERT(FLAG_enable_interpreter);
+          isolate->background_compiler()->Compile(function);
+        }
         // Continue in the same code.
         arguments.SetReturn(function);
         return;
@@ -2565,7 +2596,7 @@
 
 DEFINE_RUNTIME_ENTRY(InitStaticField, 1) {
   const Field& field = Field::CheckedHandle(zone, arguments.ArgAt(0));
-  const Error& result = Error::Handle(zone, field.EvaluateInitializer());
+  const Error& result = Error::Handle(zone, field.Initialize());
   ThrowIfError(result);
 }
 
@@ -2660,7 +2691,13 @@
     reinterpret_cast<RuntimeFunction>(static_cast<UnaryMathCFunction>(&atan)));
 
 uword RuntimeEntry::InterpretCallEntry() {
-  return reinterpret_cast<uword>(RuntimeEntry::InterpretCall);
+  uword entry = reinterpret_cast<uword>(RuntimeEntry::InterpretCall);
+#if defined(USING_SIMULATOR) && !defined(TARGET_ARCH_DBC)
+  // DBC does not use redirections unlike other simulators.
+  entry = Simulator::RedirectExternalReference(entry,
+                                               Simulator::kLeafRuntimeCall, 5);
+#endif
+  return entry;
 }
 
 // Interpret a function call. Should be called only for non-jitted functions.
@@ -2691,12 +2728,11 @@
   RawObject* result = interpreter->Call(function, argdesc, argc, argv, thread);
   DEBUG_ASSERT(thread->top_exit_frame_info() == exit_fp);
   if (RawObject::IsErrorClassId(result->GetClassIdMayBeSmi())) {
-    // Must not allocate handles in the caller's zone.
-    StackZone stack_zone(thread);
+    // Must not leak handles in the caller's zone.
+    HANDLESCOPE(thread);
     // Protect the result in a handle before transitioning, which may trigger
     // GC.
-    const Error& error =
-        Error::Handle(stack_zone.GetZone(), static_cast<RawError*>(result));
+    const Error& error = Error::Handle(Error::RawCast(result));
     // Propagating an error may cause allocation. Check if we need to block for
     // a safepoint by switching to "in VM" execution state.
     TransitionGeneratedToVM transition(thread);
@@ -2706,4 +2742,20 @@
 #endif  // defined(DART_PRECOMPILED_RUNTIME)
 }
 
+extern "C" void DFLRT_EnterSafepoint(NativeArguments __unusable_) {
+  Thread* thread = Thread::Current();
+  ASSERT(thread->top_exit_frame_info() != 0);
+  ASSERT(thread->execution_state() == Thread::kThreadInNative);
+  thread->EnterSafepoint();
+}
+DEFINE_RAW_LEAF_RUNTIME_ENTRY(EnterSafepoint, 0, false, &DFLRT_EnterSafepoint);
+
+extern "C" void DFLRT_ExitSafepoint(NativeArguments __unusable_) {
+  Thread* thread = Thread::Current();
+  ASSERT(thread->top_exit_frame_info() != 0);
+  ASSERT(thread->execution_state() == Thread::kThreadInNative);
+  thread->ExitSafepoint();
+}
+DEFINE_RAW_LEAF_RUNTIME_ENTRY(ExitSafepoint, 0, false, &DFLRT_ExitSafepoint);
+
 }  // namespace dart
diff --git a/runtime/vm/runtime_entry_list.h b/runtime/vm/runtime_entry_list.h
index 4833b04..bb2eca9 100644
--- a/runtime/vm/runtime_entry_list.h
+++ b/runtime/vm/runtime_entry_list.h
@@ -15,7 +15,6 @@
   V(BreakpointRuntimeHandler)                                                  \
   V(SingleStepHandler)                                                         \
   V(CloneContext)                                                              \
-  V(ExtractMethod)                                                             \
   V(GetFieldForDispatch)                                                       \
   V(ResolveCallFunction)                                                       \
   V(FixCallersTarget)                                                          \
@@ -33,6 +32,7 @@
   V(InstantiateType)                                                           \
   V(InstantiateTypeArguments)                                                  \
   V(InvokeClosureNoSuchMethod)                                                 \
+  V(InvokeNoSuchMethod)                                                        \
   V(InvokeNoSuchMethodDispatcher)                                              \
   V(MegamorphicCacheMissHandler)                                               \
   V(OptimizeInvokedFunction)                                                   \
@@ -64,6 +64,8 @@
   V(void, StoreBufferBlockProcess, Thread*)                                    \
   V(void, MarkingStackBlockProcess, Thread*)                                   \
   V(void, RememberCard, RawObject*, RawObject**)                               \
+  V(RawObject*, AddAllocatedObjectToRememberedSet, RawObject* object,          \
+    Thread* thread)                                                            \
   V(double, LibcPow, double, double)                                           \
   V(double, DartModulo, double, double)                                        \
   V(double, LibcFloor, double)                                                 \
@@ -77,7 +79,10 @@
   V(double, LibcAsin, double)                                                  \
   V(double, LibcAtan, double)                                                  \
   V(double, LibcAtan2, double, double)                                         \
-  V(RawBool*, CaseInsensitiveCompareUC16, RawString*, RawSmi*, RawSmi*, RawSmi*)
+  V(RawBool*, CaseInsensitiveCompareUC16, RawString*, RawSmi*, RawSmi*,        \
+    RawSmi*)                                                                   \
+  V(void, EnterSafepoint)                                                      \
+  V(void, ExitSafepoint)
 
 }  // namespace dart
 
diff --git a/runtime/vm/scopes.cc b/runtime/vm/scopes.cc
index 91b3caa..dfdba67 100644
--- a/runtime/vm/scopes.cc
+++ b/runtime/vm/scopes.cc
@@ -28,7 +28,7 @@
       sibling_(NULL),
       function_level_(function_level),
       loop_level_(loop_level),
-      context_level_(LocalScope::kUnitializedContextLevel),
+      context_level_(LocalScope::kUninitializedContextLevel),
       begin_token_pos_(TokenPosition::kNoSourcePos),
       end_token_pos_(TokenPosition::kNoSourcePos),
       variables_(),
diff --git a/runtime/vm/scopes.h b/runtime/vm/scopes.h
index 38abf8f..70c6287 100644
--- a/runtime/vm/scopes.h
+++ b/runtime/vm/scopes.h
@@ -148,6 +148,7 @@
     return type_check_mode_ == kTypeCheckedByCaller;
   }
 
+  TypeCheckMode type_check_mode() const { return type_check_mode_; }
   void set_type_check_mode(TypeCheckMode mode) { type_check_mode_ = mode; }
 
   bool HasIndex() const { return index_.IsValid(); }
@@ -294,7 +295,7 @@
   // The context level is only set in a scope that is either the owner scope of
   // a captured variable or that is the owner scope of a context.
   bool HasContextLevel() const {
-    return context_level_ != kUnitializedContextLevel;
+    return context_level_ != kUninitializedContextLevel;
   }
   int context_level() const {
     ASSERT(HasContextLevel());
@@ -302,7 +303,7 @@
   }
   void set_context_level(int context_level) {
     ASSERT(!HasContextLevel());
-    ASSERT(context_level != kUnitializedContextLevel);
+    ASSERT(context_level != kUninitializedContextLevel);
     context_level_ = context_level;
   }
 
@@ -450,7 +451,7 @@
 
   NameReference* FindReference(const String& name) const;
 
-  static const int kUnitializedContextLevel = INT_MIN;
+  static const int kUninitializedContextLevel = INT_MIN;
   LocalScope* parent_;
   LocalScope* child_;
   LocalScope* sibling_;
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc
index 93fa9c6..e96f9a5 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -121,6 +121,9 @@
 StreamInfo Service::extension_stream("Extension");
 StreamInfo Service::timeline_stream("Timeline");
 
+const uint8_t* Service::dart_library_kernel_ = NULL;
+intptr_t Service::dart_library_kernel_len_ = 0;
+
 static StreamInfo* streams_[] = {
     &Service::vm_stream,      &Service::isolate_stream,
     &Service::debug_stream,   &Service::gc_stream,
@@ -170,13 +173,16 @@
   Object& object = Object::Handle();
   {
     Api::Scope api_scope(T);
-    TransitionVMToNative transition(T);
-    if (get_service_assets_callback_ == NULL) {
-      return Object::null();
-    }
-    Dart_Handle handle = get_service_assets_callback_();
-    if (Dart_IsError(handle)) {
-      Dart_PropagateError(handle);
+    Dart_Handle handle;
+    {
+      TransitionVMToNative transition(T);
+      if (get_service_assets_callback_ == NULL) {
+        return Object::null();
+      }
+      handle = get_service_assets_callback_();
+      if (Dart_IsError(handle)) {
+        Dart_PropagateError(handle);
+      }
     }
     object = Api::UnwrapHandle(handle);
   }
@@ -507,7 +513,7 @@
     return true;
   }
 
-  static intptr_t Parse(const char* value) {
+  static uintptr_t Parse(const char* value) {
     if (value == NULL) {
       return -1;
     }
@@ -955,6 +961,7 @@
   bool result;
   {
     TransitionVMToNative transition(thread);
+
     Dart_CObject cbytes;
     cbytes.type = Dart_CObject_kExternalTypedData;
     cbytes.value.as_external_typed_data.type = Dart_TypedData_kUint8;
@@ -974,6 +981,7 @@
     message.type = Dart_CObject_kArray;
     message.value.as_array.length = 2;
     message.value.as_array.values = elements;
+
     result = Dart_PostCObject(ServiceIsolate::Port(), &message);
   }
 
@@ -1111,6 +1119,22 @@
   ASSERT(kind != NULL);
   ASSERT(event != NULL);
 
+  if (FLAG_trace_service) {
+    if (isolate != NULL) {
+      OS::PrintErr(
+          "vm-service: Pushing ServiceEvent(isolate='%s', "
+          "isolateId='" ISOLATE_SERVICE_ID_FORMAT_STRING
+          "', kind='%s') to stream %s\n",
+          isolate->name(), static_cast<int64_t>(isolate->main_port()), kind,
+          stream_id);
+    } else {
+      OS::PrintErr(
+          "vm-service: Pushing ServiceEvent(isolate='<no current isolate>', "
+          "kind='%s') to stream %s\n",
+          kind, stream_id);
+    }
+  }
+
   // Message is of the format [<stream id>, <json string>].
   //
   // Build the event message in the C heap to avoid dart heap
@@ -1132,23 +1156,15 @@
   json_cobj.value.as_string = const_cast<char*>(event->ToCString());
   list_values[1] = &json_cobj;
 
-  if (FLAG_trace_service) {
-    if (isolate != NULL) {
-      OS::PrintErr(
-          "vm-service: Pushing ServiceEvent(isolate='%s', "
-          "isolateId='" ISOLATE_SERVICE_ID_FORMAT_STRING
-          "', kind='%s') to stream %s\n",
-          isolate->name(), static_cast<int64_t>(isolate->main_port()), kind,
-          stream_id);
-    } else {
-      OS::PrintErr(
-          "vm-service: Pushing ServiceEvent(isolate='<no current isolate>', "
-          "kind='%s') to stream %s\n",
-          kind, stream_id);
-    }
+  // In certain cases (e.g. in the implementation of Dart_IsolateMakeRunnable)
+  // we do not have a current isolate/thread.
+  auto thread = Thread::Current();
+  if (thread != nullptr) {
+    TransitionVMToNative transition(thread);
+    Dart_PostCObject(ServiceIsolate::Port(), &list_cobj);
+  } else {
+    Dart_PostCObject(ServiceIsolate::Port(), &list_cobj);
   }
-
-  Dart_PostCObject(ServiceIsolate::Port(), &list_cobj);
 }
 
 class EmbedderServiceHandler {
@@ -1318,6 +1334,12 @@
   return info.max_rss;
 }
 
+void Service::SetDartLibraryKernelForSources(const uint8_t* kernel_bytes,
+                                             intptr_t kernel_length) {
+  dart_library_kernel_ = kernel_bytes;
+  dart_library_kernel_len_ = kernel_length;
+}
+
 EmbedderServiceHandler* Service::FindRootEmbedderHandler(const char* name) {
   EmbedderServiceHandler* current = root_service_handler_head_;
   while (current != NULL) {
@@ -1355,6 +1377,16 @@
   return true;
 }
 
+static const MethodParameter* get_memory_usage_params[] = {
+    ISOLATE_PARAMETER,
+    NULL,
+};
+
+static bool GetMemoryUsage(Thread* thread, JSONStream* js) {
+  thread->isolate()->PrintMemoryUsageJSON(js);
+  return true;
+}
+
 static const MethodParameter* get_scripts_params[] = {
     RUNNABLE_ISOLATE_PARAMETER,
     NULL,
@@ -1456,7 +1488,8 @@
 }
 
 static const MethodParameter* get_stack_params[] = {
-    RUNNABLE_ISOLATE_PARAMETER, new BoolParameter("_full", false), NULL,
+    RUNNABLE_ISOLATE_PARAMETER,
+    NULL,
 };
 
 static bool GetStack(Thread* thread, JSONStream* js) {
@@ -1471,7 +1504,6 @@
   DebuggerStackTrace* awaiter_stack = isolate->debugger()->AwaiterStackTrace();
   // Do we want the complete script object and complete local variable objects?
   // This is true for dump requests.
-  const bool full = BoolParameter::Parse(js->LookupParam("_full"), false);
   JSONObject jsobj(js);
   jsobj.AddProperty("type", "Stack");
   {
@@ -1481,7 +1513,7 @@
     for (intptr_t i = 0; i < num_frames; i++) {
       ActivationFrame* frame = stack->FrameAt(i);
       JSONObject jsobj(&jsarr);
-      frame->PrintToJSONObject(&jsobj, full);
+      frame->PrintToJSONObject(&jsobj);
       jsobj.AddProperty("index", i);
     }
   }
@@ -1492,7 +1524,7 @@
     for (intptr_t i = 0; i < num_frames; i++) {
       ActivationFrame* frame = async_causal_stack->FrameAt(i);
       JSONObject jsobj(&jsarr);
-      frame->PrintToJSONObject(&jsobj, full);
+      frame->PrintToJSONObject(&jsobj);
       jsobj.AddProperty("index", i);
     }
   }
@@ -1503,7 +1535,7 @@
     for (intptr_t i = 0; i < num_frames; i++) {
       ActivationFrame* frame = awaiter_stack->FrameAt(i);
       JSONObject jsobj(&jsarr);
-      frame->PrintToJSONObject(&jsobj, full);
+      frame->PrintToJSONObject(&jsobj);
       jsobj.AddProperty("index", i);
     }
   }
@@ -1558,20 +1590,6 @@
   return HandleCommonEcho(&jsobj, js);
 }
 
-static bool DumpIdZone(Thread* thread, JSONStream* js) {
-  // TODO(johnmccutchan): Respect _idZone parameter passed to RPC. For now,
-  // always send the ObjectIdRing.
-  //
-  ObjectIdRing* ring = thread->isolate()->object_id_ring();
-  ASSERT(ring != NULL);
-  // When printing the ObjectIdRing, force object id reuse policy.
-  RingServiceIdZone reuse_zone;
-  reuse_zone.Init(ring, ObjectIdRing::kReuseId);
-  js->set_id_zone(&reuse_zone);
-  ring->PrintJSON(js);
-  return true;
-}
-
 static bool Echo(Thread* thread, JSONStream* js) {
   JSONObject jsobj(js);
   return HandleCommonEcho(&jsobj, js);
@@ -2343,6 +2361,11 @@
     return true;
   }
 
+  bool disable_breakpoints =
+      BoolParameter::Parse(js->LookupParam("disableBreakpoints"), false);
+  DisableBreakpointsScope db(thread->isolate()->debugger(),
+                             disable_breakpoints);
+
   Zone* zone = thread->zone();
   ObjectIdRing::LookupResult lookup_result;
   Object& receiver = Object::Handle(
@@ -2823,6 +2846,11 @@
   }
 
   Isolate* isolate = thread->isolate();
+
+  bool disable_breakpoints =
+      BoolParameter::Parse(js->LookupParam("disableBreakpoints"), false);
+  DisableBreakpointsScope db(isolate->debugger(), disable_breakpoints);
+
   DebuggerStackTrace* stack = isolate->debugger()->StackTrace();
   intptr_t frame_pos = UIntParameter::Parse(js->LookupParam("frameIndex"));
   if (frame_pos >= stack->Length()) {
@@ -3787,6 +3815,11 @@
     NULL,
 };
 
+static const MethodParameter* write_cpu_profile_timeline_params[] = {
+    RUNNABLE_ISOLATE_PARAMETER,
+    NULL,
+};
+
 // TODO(johnmccutchan): Rename this to GetCpuSamples.
 static bool GetCpuProfile(Thread* thread, JSONStream* js) {
   Profile::TagOrder tag_order =
@@ -3816,11 +3849,25 @@
   Profile::TagOrder tag_order =
       EnumMapper(js->LookupParam("tags"), tags_enum_names, tags_enum_values);
   int64_t time_origin_micros =
-      UIntParameter::Parse(js->LookupParam("timeOriginMicros"));
+      Int64Parameter::Parse(js->LookupParam("timeOriginMicros"));
   int64_t time_extent_micros =
-      UIntParameter::Parse(js->LookupParam("timeExtentMicros"));
+      Int64Parameter::Parse(js->LookupParam("timeExtentMicros"));
+  bool code_trie = BoolParameter::Parse(js->LookupParam("code"), false);
   ProfilerService::PrintTimelineJSON(js, tag_order, time_origin_micros,
-                                     time_extent_micros);
+                                     time_extent_micros, code_trie);
+  return true;
+}
+
+static bool WriteCpuProfileTimeline(Thread* thread, JSONStream* js) {
+  Profile::TagOrder tag_order =
+      EnumMapper(js->LookupParam("tags"), tags_enum_names, tags_enum_values);
+  int64_t time_origin_micros =
+      Int64Parameter::Parse(js->LookupParam("timeOriginMicros"));
+  int64_t time_extent_micros =
+      Int64Parameter::Parse(js->LookupParam("timeExtentMicros"));
+  bool code_trie = BoolParameter::Parse(js->LookupParam("code"), true);
+  ProfilerService::AddToTimeline(tag_order, time_origin_micros,
+                                 time_extent_micros, code_trie);
   return true;
 }
 
@@ -4312,9 +4359,22 @@
 
   // Handle heap objects.
   ObjectIdRing::LookupResult lookup_result;
-  const Object& obj =
-      Object::Handle(LookupHeapObject(thread, id, &lookup_result));
+  Object& obj = Object::Handle(LookupHeapObject(thread, id, &lookup_result));
   if (obj.raw() != Object::sentinel().raw()) {
+#if !defined(DART_PRECOMPILED_RUNTIME)
+    // If obj is a script from dart:* and doesn't have source loaded, try and
+    // load the source before sending the response.
+    if (obj.IsScript()) {
+      const Script& script = Script::Cast(obj);
+      if (!script.HasSource() && script.IsPartOfDartColonLibrary() &&
+          Service::HasDartLibraryKernelForSources()) {
+        const uint8_t* kernel_buffer = Service::dart_library_kernel();
+        const intptr_t kernel_buffer_len =
+            Service::dart_library_kernel_length();
+        script.LoadSourceFromKernel(kernel_buffer, kernel_buffer_len);
+      }
+    }
+#endif  // !defined(DART_PRECOMPILED_RUNTIME)
     // We found a heap object for this id.  Return it.
     obj.PrintJSON(js, false);
     return true;
@@ -4767,7 +4827,6 @@
 
 // clang-format off
 static const ServiceMethodDescriptor service_methods_[] = {
-  { "_dumpIdZone", DumpIdZone, NULL },
   { "_echo", Echo,
     NULL },
   { "_respondWithMalformedJson", RespondWithMalformedJson,
@@ -4809,6 +4868,8 @@
     get_cpu_profile_params },
   { "_getCpuProfileTimeline", GetCpuProfileTimeline,
     get_cpu_profile_timeline_params },
+  { "_writeCpuProfileTimeline", WriteCpuProfileTimeline,
+    write_cpu_profile_timeline_params },
   { "getFlagList", GetFlagList,
     get_flag_list_params },
   { "_getHeapMap", GetHeapMap,
@@ -4819,6 +4880,8 @@
     get_instances_params },
   { "getIsolate", GetIsolate,
     get_isolate_params },
+  { "getMemoryUsage", GetMemoryUsage,
+    get_memory_usage_params },
   { "_getIsolateMetric", GetIsolateMetric,
     get_isolate_metric_params },
   { "_getIsolateMetricList", GetIsolateMetricList,
diff --git a/runtime/vm/service.h b/runtime/vm/service.h
index 3e54a6c..4b05099 100644
--- a/runtime/vm/service.h
+++ b/runtime/vm/service.h
@@ -184,6 +184,18 @@
   static int64_t CurrentRSS();
   static int64_t MaxRSS();
 
+  static void SetDartLibraryKernelForSources(const uint8_t* kernel_bytes,
+                                             intptr_t kernel_length);
+  static bool HasDartLibraryKernelForSources() {
+    return (dart_library_kernel_ != NULL);
+  }
+
+  static const uint8_t* dart_library_kernel() { return dart_library_kernel_; }
+
+  static intptr_t dart_library_kernel_length() {
+    return dart_library_kernel_len_;
+  }
+
  private:
   static RawError* InvokeMethod(Isolate* isolate,
                                 const Array& message,
@@ -228,11 +240,8 @@
   static Dart_GetVMServiceAssetsArchive get_service_assets_callback_;
   static Dart_EmbedderInformationCallback embedder_information_callback_;
 
-  static bool needs_isolate_events_;
-  static bool needs_debug_events_;
-  static bool needs_gc_events_;
-  static bool needs_echo_events_;
-  static bool needs_graph_events_;
+  static const uint8_t* dart_library_kernel_;
+  static intptr_t dart_library_kernel_len_;
 };
 
 }  // namespace dart
diff --git a/runtime/vm/service/service.md b/runtime/vm/service/service.md
index f8d56fe..e3c2fd1 100644
--- a/runtime/vm/service/service.md
+++ b/runtime/vm/service/service.md
@@ -1,8 +1,8 @@
-# Dart VM Service Protocol 3.14
+# Dart VM Service Protocol 3.16
 
 > Please post feedback to the [observatory-discuss group][discuss-list]
 
-This document describes of _version 3.14_ of the Dart VM Service Protocol. This
+This document describes of _version 3.16_ of the Dart VM Service Protocol. This
 protocol is used to communicate with a running Dart Virtual Machine.
 
 To use the Service Protocol, start the VM with the *--observe* flag.
@@ -31,6 +31,7 @@
   - [evaluateInFrame](#evaluateinframe)
   - [getFlagList](#getflaglist)
   - [getIsolate](#getisolate)
+  - [getMemoryUsage](#getmemoryusage)
   - [getScripts](#getscripts)
   - [getObject](#getobject)
   - [getSourceReport](#getsourcereport)
@@ -75,6 +76,7 @@
   - [Library](#library)
   - [LibraryDependency](#librarydependency)
   - [MapAssociation](#mapassociation)
+  - [MemoryUsage](#memoryusage)
   - [Message](#message)
   - [Null](#null)
   - [Object](#object)
@@ -479,7 +481,8 @@
 @Instance|@Error|Sentinel invoke(string isolateId,
                                  string targetId,
                                  string selector,
-                                 string[] argumentIds)
+                                 string[] argumentIds,
+                                 bool disableBreakpoints [optional])
 ```
 
 The _invoke_ RPC is used to perform regular method invocation on some receiver,
@@ -491,6 +494,10 @@
 
 Each elements of _argumentId_ may refer to an [Instance](#instance).
 
+If _disableBreakpoints_ is provided and set to true, any breakpoints hit as a
+result of this invocation are ignored, including pauses resulting from a call
+to `debugger()` from `dart:developer`. Defaults to false if not provided.
+
 If _targetId_ or any element of _argumentIds_ is a temporary id which has
 expired, then the _Expired_ [Sentinel](#sentinel) is returned.
 
@@ -513,7 +520,8 @@
 @Instance|@Error|Sentinel evaluate(string isolateId,
                                    string targetId,
                                    string expression,
-                                   map<string,string> scope [optional])
+                                   map<string,string> scope [optional],
+                                   bool disableBreakpoints [optional])
 ```
 
 The _evaluate_ RPC is used to evaluate an expression in the context of
@@ -535,6 +543,9 @@
 targets respectively. This means bindings provided in _scope_ may shadow
 instance members, class members and top-level members.
 
+If _disableBreakpoints_ is provided and set to true, any breakpoints hit as a
+result of this evaluation are ignored. Defaults to false if not provided.
+
 If expression is failed to parse and compile, then [rpc error](#rpc-error) 113
 "Expression compilation error" is returned.
 
@@ -550,7 +561,8 @@
 @Instance|@Error|Sentinel evaluateInFrame(string isolateId,
                                           int frameIndex,
                                           string expression,
-                                          map<string,string> scope [optional])
+                                          map<string,string> scope [optional],
+                                          bool disableBreakpoints [optional])
 ```
 
 The _evaluateInFrame_ RPC is used to evaluate an expression in the
@@ -564,6 +576,9 @@
 provided in _scope_ may shadow instance members, class members, top-level
 members, parameters and locals.
 
+If _disableBreakpoints_ is provided and set to true, any breakpoints hit as a
+result of this evaluation are ignored. Defaults to false if not provided.
+
 If expression is failed to parse and compile, then [rpc error](#rpc-error) 113
 "Expression compilation error" is returned.
 
@@ -597,6 +612,20 @@
 
 See [Isolate](#isolate).
 
+### getMemoryUsage
+
+```
+MemoryUsage|Sentinel getMemoryUsage(string isolateId)
+```
+
+The _getMemoryUsage_ RPC is used to lookup an isolate's memory usage
+statistics by its _id_.
+
+If _isolateId_ refers to an isolate which has exited, then the
+_Collected_ [Sentinel](#sentinel) is returned.
+
+See [Isolate](#isolate).
+
 ### getScripts
 
 ```
@@ -1037,7 +1066,7 @@
 ### BoundVariable
 
 ```
-class BoundVariable {
+class BoundVariable extends Response {
   string name;
   @Instance|@TypeArguments|Sentinel value;
 
@@ -1279,7 +1308,7 @@
   // The isolate has encountered a Dart language error in the program.
   LanguageError,
 
-  // The isolate has encounted an internal error. These errors should be
+  // The isolate has encountered an internal error. These errors should be
   // reported as bugs.
   InternalError,
 
@@ -2194,6 +2223,31 @@
 }
 ```
 
+### MemoryUsage
+
+```
+class MemoryUsage extends Response {
+  // The amount of non-Dart memory that is retained by Dart objects. For
+  // example, memory associated with Dart objects through APIs such as
+  // Dart_NewWeakPersistentHandle and Dart_NewExternalTypedData.  This usage is
+  // only as accurate as the values supplied to these APIs from the VM embedder or
+  // native extensions. This external memory applies GC pressure, but is separate
+  // from heapUsage and heapCapacity.
+  int externalUsage;
+
+  // The total capacity of the heap in bytes. This is the amount of memory used
+  // by the Dart heap from the perspective of the operating system.
+  int heapCapacity;
+
+  // The current heap memory usage in bytes. Heap usage is always less than or
+  // equal to the heap capacity.
+  int heapUsage;
+}
+```
+
+An _MemoryUsage_ object provides heap usage information for a specific
+isolate at a given point in time.
+
 ### Message
 
 ```
@@ -2251,6 +2305,11 @@
   // A unique identifier for an Object. Passed to the
   // getObject RPC to load this Object.
   string id;
+
+  // Provided and set to true if the id of an Object is fixed. If true, the id
+  // of an Object is guaranteed not to change or expire. The object may, however,
+  // still be _Collected_.
+  bool fixedId [optional];
 }
 ```
 
@@ -2264,6 +2323,11 @@
   // Some objects may get a new id when they are reloaded.
   string id;
 
+  // Provided and set to true if the id of an Object is fixed. If true, the id
+  // of an Object is guaranteed not to change or expire. The object may, however,
+  // still be _Collected_.
+  bool fixedId [optional];
+
   // If an object is allocated in the Dart heap, it will have
   // a corresponding class object.
   //
@@ -2692,6 +2756,9 @@
 
 ```
 class VM extends Response {
+  // A name identifying this vm. Not guaranteed to be unique.
+  string name;
+
   // Word length on target architecture (e.g. 32, 64).
   int architectureBits;
 
@@ -2738,5 +2805,7 @@
 3.12 | Add 'getScripts' RPC and `ScriptList` object.
 3.13 | Class 'mixin' field now properly set for kernel transformed mixin applications.
 3.14 | Flag 'profile_period' can now be set at runtime, allowing for the profiler sample rate to be changed while the program is running.
+3.15 | Added `disableBreakpoints` parameter to `invoke`, `evaluate`, and `evaluateInFrame`.
+3.16 | Add 'getMemoryUsage' RPC and 'MemoryUsage' object.
 
 [discuss-list]: https://groups.google.com/a/dartlang.org/forum/#!forum/observatory-discuss
diff --git a/runtime/vm/service/service_dev.md b/runtime/vm/service/service_dev.md
index 945d4f9..dbfa952 100644
--- a/runtime/vm/service/service_dev.md
+++ b/runtime/vm/service/service_dev.md
@@ -1,8 +1,8 @@
-# Dart VM Service Protocol 3.15-dev
+# Dart VM Service Protocol 3.17-dev
 
 > Please post feedback to the [observatory-discuss group][discuss-list]
 
-This document describes of _version 3.15-dev_ of the Dart VM Service Protocol. This
+This document describes of _version 3.17-dev_ of the Dart VM Service Protocol. This
 protocol is used to communicate with a running Dart Virtual Machine.
 
 To use the Service Protocol, start the VM with the *--observe* flag.
@@ -31,7 +31,8 @@
   - [evaluateInFrame](#evaluateinframe)
   - [getFlagList](#getflaglist)
   - [getIsolate](#getisolate)
-  - [getScripts](#getisolatescripts)
+  - [getMemoryUsage](#getmemoryusage)
+  - [getScripts](#getscripts)
   - [getObject](#getobject)
   - [getSourceReport](#getsourcereport)
   - [getStack](#getstack)
@@ -75,6 +76,7 @@
   - [Library](#library)
   - [LibraryDependency](#librarydependency)
   - [MapAssociation](#mapassociation)
+  - [MemoryUsage](#memoryusage)
   - [Message](#message)
   - [Null](#null)
   - [Object](#object)
@@ -479,7 +481,8 @@
 @Instance|@Error|Sentinel invoke(string isolateId,
                                  string targetId,
                                  string selector,
-                                 string[] argumentIds)
+                                 string[] argumentIds,
+                                 bool disableBreakpoints [optional])
 ```
 
 The _invoke_ RPC is used to perform regular method invocation on some receiver,
@@ -491,6 +494,10 @@
 
 Each elements of _argumentId_ may refer to an [Instance](#instance).
 
+If _disableBreakpoints_ is provided and set to true, any breakpoints hit as a
+result of this invocation are ignored, including pauses resulting from a call
+to `debugger()` from `dart:developer`. Defaults to false if not provided.
+
 If _targetId_ or any element of _argumentIds_ is a temporary id which has
 expired, then the _Expired_ [Sentinel](#sentinel) is returned.
 
@@ -513,7 +520,8 @@
 @Instance|@Error|Sentinel evaluate(string isolateId,
                                    string targetId,
                                    string expression,
-                                   map<string,string> scope [optional])
+                                   map<string,string> scope [optional],
+                                   bool disableBreakpoints [optional])
 ```
 
 The _evaluate_ RPC is used to evaluate an expression in the context of
@@ -535,6 +543,9 @@
 targets respectively. This means bindings provided in _scope_ may shadow
 instance members, class members and top-level members.
 
+If _disableBreakpoints_ is provided and set to true, any breakpoints hit as a
+result of this evaluation are ignored. Defaults to false if not provided.
+
 If expression is failed to parse and compile, then [rpc error](#rpc-error) 113
 "Expression compilation error" is returned.
 
@@ -550,7 +561,8 @@
 @Instance|@Error|Sentinel evaluateInFrame(string isolateId,
                                           int frameIndex,
                                           string expression,
-                                          map<string,string> scope [optional])
+                                          map<string,string> scope [optional],
+                                          bool disableBreakpoints [optional])
 ```
 
 The _evaluateInFrame_ RPC is used to evaluate an expression in the
@@ -564,6 +576,9 @@
 provided in _scope_ may shadow instance members, class members, top-level
 members, parameters and locals.
 
+If _disableBreakpoints_ is provided and set to true, any breakpoints hit as a
+result of this evaluation are ignored. Defaults to false if not provided.
+
 If expression is failed to parse and compile, then [rpc error](#rpc-error) 113
 "Expression compilation error" is returned.
 
@@ -597,6 +612,20 @@
 
 See [Isolate](#isolate).
 
+### getMemoryUsage
+
+```
+MemoryUsage|Sentinel getMemoryUsage(string isolateId)
+```
+
+The _getMemoryUsage_ RPC is used to lookup an isolate's memory usage
+statistics by its _id_.
+
+If _isolateId_ refers to an isolate which has exited, then the
+_Collected_ [Sentinel](#sentinel) is returned.
+
+See [Isolate](#isolate).
+
 ### getScripts
 
 ```
@@ -905,7 +934,7 @@
 The _streamListen_ RPC subscribes to a stream in the VM. Once
 subscribed, the client will begin receiving events from the stream.
 
-If the client is not subscribed to the stream, the _103_ (Stream already
+If the client is already subscribed to the stream, the _103_ (Stream already
 subscribed) error code is returned.
 
 The _streamId_ parameter may have the following published values:
@@ -1037,7 +1066,7 @@
 ### BoundVariable
 
 ```
-class BoundVariable {
+class BoundVariable extends Response {
   string name;
   @Instance|@TypeArguments|Sentinel value;
 
@@ -1279,7 +1308,7 @@
   // The isolate has encountered a Dart language error in the program.
   LanguageError,
 
-  // The isolate has encounted an internal error. These errors should be
+  // The isolate has encountered an internal error. These errors should be
   // reported as bugs.
   InternalError,
 
@@ -2194,6 +2223,31 @@
 }
 ```
 
+### MemoryUsage
+
+```
+class MemoryUsage extends Response {
+  // The amount of non-Dart memory that is retained by Dart objects. For
+  // example, memory associated with Dart objects through APIs such as
+  // Dart_NewWeakPersistentHandle and Dart_NewExternalTypedData.  This usage is
+  // only as accurate as the values supplied to these APIs from the VM embedder or
+  // native extensions. This external memory applies GC pressure, but is separate
+  // from heapUsage and heapCapacity.
+  int externalUsage;
+
+  // The total capacity of the heap in bytes. This is the amount of memory used
+  // by the Dart heap from the perspective of the operating system.
+  int heapCapacity;
+
+  // The current heap memory usage in bytes. Heap usage is always less than or
+  // equal to the heap capacity.
+  int heapUsage;
+}
+```
+
+An _MemoryUsage_ object provides heap usage information for a specific
+isolate at a given point in time.
+
 ### Message
 
 ```
@@ -2251,6 +2305,11 @@
   // A unique identifier for an Object. Passed to the
   // getObject RPC to load this Object.
   string id;
+
+  // Provided and set to true if the id of an Object is fixed. If true, the id
+  // of an Object is guaranteed not to change or expire. The object may, however,
+  // still be _Collected_.
+  bool fixedId [optional];
 }
 ```
 
@@ -2264,6 +2323,11 @@
   // Some objects may get a new id when they are reloaded.
   string id;
 
+  // Provided and set to true if the id of an Object is fixed. If true, the id
+  // of an Object is guaranteed not to change or expire. The object may, however,
+  // still be _Collected_.
+  bool fixedId [optional];
+
   // If an object is allocated in the Dart heap, it will have
   // a corresponding class object.
   //
@@ -2692,6 +2756,9 @@
 
 ```
 class VM extends Response {
+  // A name identifying this vm. Not guaranteed to be unique.
+  string name;
+
   // Word length on target architecture (e.g. 32, 64).
   int architectureBits;
 
@@ -2738,5 +2805,7 @@
 3.12 | Add 'getScripts' RPC and `ScriptList` object.
 3.13 | Class 'mixin' field now properly set for kernel transformed mixin applications.
 3.14 | Flag 'profile_period' can now be set at runtime, allowing for the profiler sample rate to be changed while the program is running.
+3.15 | Added `disableBreakpoints` parameter to `invoke`, `evaluate`, and `evaluateInFrame`.
+3.16 | Add 'getMemoryUsage' RPC and 'MemoryUsage' object.
 
 [discuss-list]: https://groups.google.com/a/dartlang.org/forum/#!forum/observatory-discuss
diff --git a/runtime/vm/service_isolate.cc b/runtime/vm/service_isolate.cc
index 3f7c827..085b11a 100644
--- a/runtime/vm/service_isolate.cc
+++ b/runtime/vm/service_isolate.cc
@@ -72,15 +72,14 @@
   return list.raw();
 }
 
-const char* ServiceIsolate::kName = "vm-service";
+const char* ServiceIsolate::kName = DART_VM_SERVICE_ISOLATE_NAME;
+Dart_IsolateCreateCallback ServiceIsolate::create_callback_ = NULL;
+Monitor* ServiceIsolate::monitor_ = new Monitor();
+ServiceIsolate::State ServiceIsolate::state_ = ServiceIsolate::kStopped;
 Isolate* ServiceIsolate::isolate_ = NULL;
 Dart_Port ServiceIsolate::port_ = ILLEGAL_PORT;
 Dart_Port ServiceIsolate::load_port_ = ILLEGAL_PORT;
 Dart_Port ServiceIsolate::origin_ = ILLEGAL_PORT;
-Dart_IsolateCreateCallback ServiceIsolate::create_callback_ = NULL;
-Monitor* ServiceIsolate::monitor_ = new Monitor();
-bool ServiceIsolate::initializing_ = true;
-bool ServiceIsolate::shutting_down_ = false;
 char* ServiceIsolate::server_address_ = NULL;
 
 void ServiceIsolate::RequestServerInfo(const SendPort& sp) {
@@ -145,7 +144,7 @@
 Dart_Port ServiceIsolate::WaitForLoadPort() {
   VMTagScope tagScope(Thread::Current(), VMTag::kLoadWaitTagId);
   MonitorLocker ml(monitor_);
-  while (initializing_ && (load_port_ == ILLEGAL_PORT)) {
+  while (state_ == kStarting && (load_port_ == ILLEGAL_PORT)) {
     ml.Wait();
   }
   return load_port_;
@@ -207,7 +206,8 @@
   ASSERT(!list.IsNull());
   MessageWriter writer(false);
   if (FLAG_trace_service) {
-    OS::PrintErr("vm-service: Isolate %s %" Pd64 " registered.\n",
+    OS::PrintErr(DART_VM_SERVICE_ISOLATE_NAME ": Isolate %s %" Pd64
+                                              " registered.\n",
                  name.ToCString(), Dart_GetMainPortId());
   }
   return PortMap::PostMessage(
@@ -232,7 +232,8 @@
   ASSERT(!list.IsNull());
   MessageWriter writer(false);
   if (FLAG_trace_service) {
-    OS::PrintErr("vm-service: Isolate %s %" Pd64 " deregistered.\n",
+    OS::PrintErr(DART_VM_SERVICE_ISOLATE_NAME ": Isolate %s %" Pd64
+                                              " deregistered.\n",
                  name.ToCString(), Dart_GetMainPortId());
   }
   return PortMap::PostMessage(
@@ -244,7 +245,8 @@
     return;
   }
   if (FLAG_trace_service) {
-    OS::PrintErr("vm-service: sending service exit message.\n");
+    OS::PrintErr(DART_VM_SERVICE_ISOLATE_NAME
+                 ": sending service exit message.\n");
   }
 
   Dart_CObject code;
@@ -299,13 +301,22 @@
 
 void ServiceIsolate::FinishedExiting() {
   MonitorLocker ml(monitor_);
-  shutting_down_ = false;
+  ASSERT(state_ == kStarted || state_ == kStopping);
+  state_ = kStopped;
   ml.NotifyAll();
 }
 
 void ServiceIsolate::FinishedInitializing() {
   MonitorLocker ml(monitor_);
-  initializing_ = false;
+  ASSERT(state_ == kStarting);
+  state_ = kStarted;
+  ml.NotifyAll();
+}
+
+void ServiceIsolate::InitializingFailed() {
+  MonitorLocker ml(monitor_);
+  ASSERT(state_ == kStarting);
+  state_ = kStopped;
   ml.NotifyAll();
 }
 
@@ -326,15 +337,17 @@
     Dart_IsolateFlags api_flags;
     Isolate::FlagsInitialize(&api_flags);
 
-    isolate = reinterpret_cast<Isolate*>(create_callback(
-        ServiceIsolate::kName, NULL, NULL, NULL, &api_flags, NULL, &error));
+    isolate = reinterpret_cast<Isolate*>(
+        create_callback(ServiceIsolate::kName, ServiceIsolate::kName, NULL,
+                        NULL, &api_flags, NULL, &error));
     if (isolate == NULL) {
       if (FLAG_trace_service) {
-        OS::PrintErr("vm-service: Isolate creation error: %s\n", error);
+        OS::PrintErr(DART_VM_SERVICE_ISOLATE_NAME
+                     ": Isolate creation error: %s\n",
+                     error);
       }
       ServiceIsolate::SetServiceIsolate(NULL);
-      ServiceIsolate::FinishedInitializing();
-      ServiceIsolate::FinishedExiting();
+      ServiceIsolate::InitializingFailed();
       return;
     }
 
@@ -379,11 +392,13 @@
       Error& error = Error::Handle(Z);
       error = T->sticky_error();
       if (!error.IsNull() && !error.IsUnwindError()) {
-        OS::PrintErr("vm-service: Error: %s\n", error.ToErrorCString());
+        OS::PrintErr(DART_VM_SERVICE_ISOLATE_NAME ": Error: %s\n",
+                     error.ToErrorCString());
       }
       error = I->sticky_error();
       if (!error.IsNull() && !error.IsUnwindError()) {
-        OS::PrintErr("vm-service: Error: %s\n", error.ToErrorCString());
+        OS::PrintErr(DART_VM_SERVICE_ISOLATE_NAME ": Error: %s\n",
+                     error.ToErrorCString());
       }
       Dart::RunShutdownCallback();
     }
@@ -394,7 +409,7 @@
     // Shut the isolate down.
     Dart::ShutdownIsolate(I);
     if (FLAG_trace_service) {
-      OS::PrintErr("vm-service: Shutdown.\n");
+      OS::PrintErr(DART_VM_SERVICE_ISOLATE_NAME ": Shutdown.\n");
     }
     ServiceIsolate::FinishedExiting();
   }
@@ -409,7 +424,8 @@
         Library::Handle(Z, I->object_store()->root_library());
     if (root_library.IsNull()) {
       if (FLAG_trace_service) {
-        OS::PrintErr("vm-service: Embedder did not install a script.");
+        OS::PrintErr(DART_VM_SERVICE_ISOLATE_NAME
+                     ": Embedder did not install a script.");
       }
       // Service isolate is not supported by embedder.
       return false;
@@ -422,7 +438,8 @@
     if (entry.IsNull()) {
       // Service isolate is not supported by embedder.
       if (FLAG_trace_service) {
-        OS::PrintErr("vm-service: Embedder did not provide a main function.");
+        OS::PrintErr(DART_VM_SERVICE_ISOLATE_NAME
+                     ": Embedder did not provide a main function.");
       }
       return false;
     }
@@ -434,7 +451,8 @@
       // Service isolate did not initialize properly.
       if (FLAG_trace_service) {
         const Error& error = Error::Cast(result);
-        OS::PrintErr("vm-service: Calling main resulted in an error: %s",
+        OS::PrintErr(DART_VM_SERVICE_ISOLATE_NAME
+                     ": Calling main resulted in an error: %s",
                      error.ToErrorCString());
       }
       if (result.IsUnwindError()) {
@@ -450,42 +468,65 @@
 };
 
 void ServiceIsolate::Run() {
+  {
+    MonitorLocker ml(monitor_);
+    ASSERT(state_ == kStopped);
+    state_ = kStarting;
+    ml.NotifyAll();
+  }
   // Grab the isolate create callback here to avoid race conditions with tests
   // that change this after Dart_Initialize returns.
   create_callback_ = Isolate::CreateCallback();
   if (create_callback_ == NULL) {
-    ServiceIsolate::FinishedInitializing();
+    ServiceIsolate::InitializingFailed();
     return;
   }
-  Dart::thread_pool()->Run(new RunServiceTask());
+  bool task_started = Dart::thread_pool()->Run(new RunServiceTask());
+  ASSERT(task_started);
 }
 
 void ServiceIsolate::KillServiceIsolate() {
   {
     MonitorLocker ml(monitor_);
-    shutting_down_ = true;
+    if (state_ == kStopped) {
+      return;
+    }
+    ASSERT(state_ == kStarted);
+    state_ = kStopping;
+    ml.NotifyAll();
   }
   Isolate::KillIfExists(isolate_, Isolate::kInternalKillMsg);
   {
     MonitorLocker ml(monitor_);
-    while (shutting_down_) {
+    while (state_ == kStopping) {
       ml.Wait();
     }
+    ASSERT(state_ == kStopped);
   }
 }
 
 void ServiceIsolate::Shutdown() {
+  {
+    MonitorLocker ml(monitor_);
+    while (state_ == kStarting) {
+      ml.Wait();
+    }
+  }
+
   if (IsRunning()) {
     {
       MonitorLocker ml(monitor_);
-      shutting_down_ = true;
+      ASSERT(state_ == kStarted);
+      state_ = kStopping;
+      ml.NotifyAll();
     }
     SendServiceExitMessage();
     {
       MonitorLocker ml(monitor_);
-      while (shutting_down_ && (port_ != ILLEGAL_PORT)) {
+      while (state_ == kStopping) {
         ml.Wait();
       }
+      ASSERT(state_ == kStopped);
     }
   } else {
     if (isolate_ != NULL) {
diff --git a/runtime/vm/service_isolate.h b/runtime/vm/service_isolate.h
index e6ecc405f..ab08649 100644
--- a/runtime/vm/service_isolate.h
+++ b/runtime/vm/service_isolate.h
@@ -63,6 +63,7 @@
   static void SetLoadPort(Dart_Port port);
   static void FinishedExiting();
   static void FinishedInitializing();
+  static void InitializingFailed();
   static void MaybeMakeServiceIsolate(Isolate* isolate);
   static Dart_IsolateCreateCallback create_callback() {
     return create_callback_;
@@ -70,8 +71,13 @@
 
   static Dart_IsolateCreateCallback create_callback_;
   static Monitor* monitor_;
-  static bool initializing_;
-  static bool shutting_down_;
+  enum State {
+    kStopped,
+    kStarting,
+    kStarted,
+    kStopping,
+  };
+  static State state_;
   static Isolate* isolate_;
   static Dart_Port port_;
   static Dart_Port load_port_;
diff --git a/runtime/vm/service_test.cc b/runtime/vm/service_test.cc
index 03c96f2..aeb614e 100644
--- a/runtime/vm/service_test.cc
+++ b/runtime/vm/service_test.cc
@@ -243,11 +243,12 @@
     TransitionVMToNative transition(thread);
     lib = TestCase::LoadTestScript(kScript, NULL);
     EXPECT_VALID(lib);
-    vmlib ^= Api::UnwrapHandle(lib);
-    EXPECT(!vmlib.IsNull());
+    EXPECT(!Dart_IsNull(lib));
     Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
     EXPECT_VALID(result);
   }
+  vmlib ^= Api::UnwrapHandle(lib);
+  EXPECT(!vmlib.IsNull());
   const Class& class_a = Class::Handle(GetClass(vmlib, "A"));
   EXPECT(!class_a.IsNull());
   const Function& function_c = Function::Handle(GetFunction(class_a, "c"));
@@ -264,9 +265,9 @@
   ServiceTestMessageHandler handler;
   Dart_Port port_id = PortMap::CreatePort(&handler);
   Dart_Handle port = Api::NewHandle(thread, SendPort::New(port_id));
-  EXPECT_VALID(port);
   {
     TransitionVMToNative transition(thread);
+    EXPECT_VALID(port);
     EXPECT_VALID(Dart_SetField(lib, NewString("port"), port));
   }
 
@@ -367,11 +368,12 @@
     TransitionVMToNative transition(thread);
     lib = TestCase::LoadTestScript(kScript, NULL);
     EXPECT_VALID(lib);
-    vmlib ^= Api::UnwrapHandle(lib);
-    EXPECT(!vmlib.IsNull());
+    EXPECT(!Dart_IsNull(lib));
     Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
     EXPECT_VALID(result);
   }
+  vmlib ^= Api::UnwrapHandle(lib);
+  EXPECT(!vmlib.IsNull());
   const Class& class_a = Class::Handle(GetClass(vmlib, "A"));
   EXPECT(!class_a.IsNull());
   const Function& function_c = Function::Handle(GetFunction(class_a, "c"));
@@ -389,9 +391,9 @@
   ServiceTestMessageHandler handler;
   Dart_Port port_id = PortMap::CreatePort(&handler);
   Dart_Handle port = Api::NewHandle(thread, SendPort::New(port_id));
-  EXPECT_VALID(port);
   {
     TransitionVMToNative transition(thread);
+    EXPECT_VALID(port);
     EXPECT_VALID(Dart_SetField(lib, NewString("port"), port));
   }
 
@@ -437,11 +439,12 @@
     TransitionVMToNative transition(thread);
     lib = TestCase::LoadTestScript(kScript, NULL);
     EXPECT_VALID(lib);
-    vmlib ^= Api::UnwrapHandle(lib);
-    EXPECT(!vmlib.IsNull());
+    EXPECT(!Dart_IsNull(lib));
     Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
     EXPECT_VALID(result);
   }
+  vmlib ^= Api::UnwrapHandle(lib);
+  EXPECT(!vmlib.IsNull());
   const Class& class_a = Class::Handle(GetClass(vmlib, "A"));
   EXPECT(!class_a.IsNull());
   const Function& function_c = Function::Handle(GetFunction(class_a, "c"));
@@ -459,9 +462,9 @@
   ServiceTestMessageHandler handler;
   Dart_Port port_id = PortMap::CreatePort(&handler);
   Dart_Handle port = Api::NewHandle(thread, SendPort::New(port_id));
-  EXPECT_VALID(port);
   {
     TransitionVMToNative transition(thread);
+    EXPECT_VALID(port);
     EXPECT_VALID(Dart_SetField(lib, NewString("port"), port));
   }
 
@@ -522,9 +525,9 @@
   ServiceTestMessageHandler handler;
   Dart_Port port_id = PortMap::CreatePort(&handler);
   Dart_Handle port = Api::NewHandle(thread, SendPort::New(port_id));
-  EXPECT_VALID(port);
   {
     TransitionVMToNative transition(thread);
+    EXPECT_VALID(port);
     EXPECT_VALID(Dart_SetField(lib, NewString("port"), port));
   }
 
@@ -579,9 +582,9 @@
   ServiceTestMessageHandler handler;
   Dart_Port port_id = PortMap::CreatePort(&handler);
   Dart_Handle port = Api::NewHandle(thread, SendPort::New(port_id));
-  EXPECT_VALID(port);
   {
     TransitionVMToNative transition(thread);
+    EXPECT_VALID(port);
     EXPECT_VALID(Dart_SetField(lib, NewString("port"), port));
   }
 
@@ -668,9 +671,9 @@
   ServiceTestMessageHandler handler;
   Dart_Port port_id = PortMap::CreatePort(&handler);
   Dart_Handle port = Api::NewHandle(thread, SendPort::New(port_id));
-  EXPECT_VALID(port);
   {
     TransitionVMToNative transition(thread);
+    EXPECT_VALID(port);
     EXPECT_VALID(Dart_SetField(lib, NewString("port"), port));
   }
 
@@ -713,9 +716,9 @@
   ServiceTestMessageHandler handler;
   Dart_Port port_id = PortMap::CreatePort(&handler);
   Dart_Handle port = Api::NewHandle(thread, SendPort::New(port_id));
-  EXPECT_VALID(port);
   {
     TransitionVMToNative transition(thread);
+    EXPECT_VALID(port);
     EXPECT_VALID(Dart_SetField(lib, NewString("port"), port));
   }
 
@@ -770,9 +773,9 @@
   ServiceTestMessageHandler handler;
   Dart_Port port_id = PortMap::CreatePort(&handler);
   Dart_Handle port = Api::NewHandle(thread, SendPort::New(port_id));
-  EXPECT_VALID(port);
   {
     TransitionVMToNative transition(thread);
+    EXPECT_VALID(port);
     EXPECT_VALID(Dart_SetField(lib, NewString("port"), port));
   }
 
diff --git a/runtime/vm/simulator_arm.cc b/runtime/vm/simulator_arm.cc
index 1047955..2cd0745 100644
--- a/runtime/vm/simulator_arm.cc
+++ b/runtime/vm/simulator_arm.cc
@@ -15,7 +15,7 @@
 
 #include "vm/compiler/assembler/assembler.h"
 #include "vm/compiler/assembler/disassembler.h"
-#include "vm/constants_arm.h"
+#include "vm/constants.h"
 #include "vm/cpu.h"
 #include "vm/native_arguments.h"
 #include "vm/os_thread.h"
@@ -670,12 +670,12 @@
   // handling stack overflow exceptions. To be safe in potential
   // stack underflows we also add some underflow buffer space.
   stack_ =
-      new char[(OSThread::GetSpecifiedStackSize() + OSThread::kStackSizeBuffer +
-                kSimulatorStackUnderflowSize)];
+      new char[(OSThread::GetSpecifiedStackSize() +
+                OSThread::kStackSizeBufferMax + kSimulatorStackUnderflowSize)];
   // Low address.
   stack_limit_ = reinterpret_cast<uword>(stack_);
   // Limit for StackOverflowError.
-  overflow_stack_limit_ = stack_limit_ + OSThread::kStackSizeBuffer;
+  overflow_stack_limit_ = stack_limit_ + OSThread::kStackSizeBufferMax;
   // High address.
   stack_base_ = overflow_stack_limit_ + OSThread::GetSpecifiedStackSize();
 
@@ -1365,7 +1365,8 @@
 typedef int32_t (*SimulatorLeafRuntimeCall)(int32_t r0,
                                             int32_t r1,
                                             int32_t r2,
-                                            int32_t r3);
+                                            int32_t r3,
+                                            int32_t r4);
 
 // Calls to leaf float Dart runtime functions are based on this interface.
 typedef double (*SimulatorLeafFloatRuntimeCall)(double d0, double d1);
@@ -1401,14 +1402,15 @@
           set_register(R1, icount_);
         } else if (redirection->call_kind() == kLeafRuntimeCall) {
           ASSERT((0 <= redirection->argument_count()) &&
-                 (redirection->argument_count() <= 4));
+                 (redirection->argument_count() <= 5));
           int32_t r0 = get_register(R0);
           int32_t r1 = get_register(R1);
           int32_t r2 = get_register(R2);
           int32_t r3 = get_register(R3);
+          int32_t r4 = *reinterpret_cast<int32_t*>(get_register(SP));
           SimulatorLeafRuntimeCall target =
               reinterpret_cast<SimulatorLeafRuntimeCall>(external);
-          r0 = target(r0, r1, r2, r3);
+          r0 = target(r0, r1, r2, r3, r4);
           set_register(R0, r0);       // Set returned result from function.
           set_register(R1, icount_);  // Zap unused result register.
         } else if (redirection->call_kind() == kLeafFloatRuntimeCall) {
@@ -1584,8 +1586,8 @@
             // Registers rd, rn, rm, ra are encoded as rn, rm, rs, rd.
             // Format(instr, "mls'cond's 'rn, 'rm, 'rs, 'rd");
             rd_val = get_register(rd);
+            FALL_THROUGH;
           }
-          /* Falls through */
           case 0: {
             // Registers rd, rn, rm are encoded as rn, rm, rs.
             // Format(instr, "mul'cond's 'rn, 'rm, 'rs");
@@ -1642,7 +1644,7 @@
               // umaal is only in ARMv6 and above.
               UnimplementedInstruction(instr);
             }
-            /* Falls through */
+            FALL_THROUGH;
           case 5:
           // Registers rd_lo, rd_hi, rn, rm are encoded as rd, rn, rm, rs.
           // Format(instr, "umlal'cond's 'rd, 'rn, 'rm, 'rs");
diff --git a/runtime/vm/simulator_arm.h b/runtime/vm/simulator_arm.h
index 406f7ce..8f269b2 100644
--- a/runtime/vm/simulator_arm.h
+++ b/runtime/vm/simulator_arm.h
@@ -16,7 +16,7 @@
 #error Do not include simulator_arm.h directly; use simulator.h.
 #endif
 
-#include "vm/constants_arm.h"
+#include "vm/constants.h"
 
 namespace dart {
 
diff --git a/runtime/vm/simulator_arm64.cc b/runtime/vm/simulator_arm64.cc
index d7240cb..c835793 100644
--- a/runtime/vm/simulator_arm64.cc
+++ b/runtime/vm/simulator_arm64.cc
@@ -15,7 +15,7 @@
 
 #include "vm/compiler/assembler/assembler.h"
 #include "vm/compiler/assembler/disassembler.h"
-#include "vm/constants_arm64.h"
+#include "vm/constants.h"
 #include "vm/native_arguments.h"
 #include "vm/os_thread.h"
 #include "vm/stack_frame.h"
@@ -720,12 +720,12 @@
   // handling stack overflow exceptions. To be safe in potential
   // stack underflows we also add some underflow buffer space.
   stack_ =
-      new char[(OSThread::GetSpecifiedStackSize() + OSThread::kStackSizeBuffer +
-                kSimulatorStackUnderflowSize)];
+      new char[(OSThread::GetSpecifiedStackSize() +
+                OSThread::kStackSizeBufferMax + kSimulatorStackUnderflowSize)];
   // Low address.
   stack_limit_ = reinterpret_cast<uword>(stack_);
   // Limit for StackOverflowError.
-  overflow_stack_limit_ = stack_limit_ + OSThread::kStackSizeBuffer;
+  overflow_stack_limit_ = stack_limit_ + OSThread::kStackSizeBufferMax;
   // High address.
   stack_base_ = overflow_stack_limit_ + OSThread::GetSpecifiedStackSize();
 
diff --git a/runtime/vm/simulator_arm64.h b/runtime/vm/simulator_arm64.h
index 43ae2ea..8a48451 100644
--- a/runtime/vm/simulator_arm64.h
+++ b/runtime/vm/simulator_arm64.h
@@ -16,7 +16,7 @@
 #error Do not include simulator_arm64.h directly; use simulator.h.
 #endif
 
-#include "vm/constants_arm64.h"
+#include "vm/constants.h"
 
 namespace dart {
 
diff --git a/runtime/vm/simulator_dbc.cc b/runtime/vm/simulator_dbc.cc
index b059dae..18839b45 100644
--- a/runtime/vm/simulator_dbc.cc
+++ b/runtime/vm/simulator_dbc.cc
@@ -552,7 +552,7 @@
   // handling stack overflow exceptions. To be safe in potential
   // stack underflows we also add some underflow buffer space.
   stack_ = new uintptr_t[(OSThread::GetSpecifiedStackSize() +
-                          OSThread::kStackSizeBuffer +
+                          OSThread::kStackSizeBufferMax +
                           kSimulatorStackUnderflowSize) /
                          sizeof(uintptr_t)];
   // Low address.
@@ -560,7 +560,7 @@
   // Limit for StackOverflowError.
   overflow_stack_limit_ = stack_base_ + OSThread::GetSpecifiedStackSize();
   // High address.
-  stack_limit_ = overflow_stack_limit_ + OSThread::kStackSizeBuffer;
+  stack_limit_ = overflow_stack_limit_ + OSThread::kStackSizeBufferMax;
 
   last_setjmp_buffer_ = NULL;
 
@@ -810,7 +810,12 @@
                                 RawObject** SP) {
   RawObject** result = top;
   top[0] = 0;  // Clean up result slot.
-  RawObject** miss_handler_args = top + 1;
+
+  // Save arguments descriptor as it may be clobbered by running Dart code
+  // during the call to miss handler (class finalization).
+  top[1] = argdesc_;
+
+  RawObject** miss_handler_args = top + 2;
   for (intptr_t i = 0; i < checked_args; i++) {
     miss_handler_args[i] = args[i];
   }
@@ -833,6 +838,8 @@
   RawObject** exit_frame = miss_handler_args + miss_handler_argc;
   CallRuntime(thread, FP, exit_frame, pc, miss_handler_argc, miss_handler_args,
               result, reinterpret_cast<uword>(handler));
+
+  argdesc_ = Array::RawCast(top[1]);
 }
 
 DART_FORCE_INLINE void Simulator::InstanceCall1(Thread* thread,
@@ -1213,9 +1220,9 @@
                            const Array& arguments,
                            Thread* thread) {
   // Interpreter state (see constants_dbc.h for high-level overview).
-  uint32_t* pc;       // Program Counter: points to the next op to execute.
-  RawObject** FP;     // Frame Pointer.
-  RawObject** SP;     // Stack Pointer.
+  uint32_t* pc;    // Program Counter: points to the next op to execute.
+  RawObject** FP;  // Frame Pointer.
+  RawObject** SP;  // Stack Pointer.
 
   uint32_t op;  // Currently executing op.
   uint16_t rA;  // A component of the currently executing op.
@@ -1464,7 +1471,9 @@
 
   {
     BYTECODE(DebugStep, A);
-#ifndef PRODUCT
+#ifdef PRODUCT
+    FATAL("No debugging in PRODUCT mode");
+#else
     if (thread->isolate()->single_step()) {
       Exit(thread, FP, SP + 1, pc);
       NativeArguments args(thread, 0, NULL, NULL);
@@ -1476,7 +1485,9 @@
 
   {
     BYTECODE(DebugBreak, A);
-#if !defined(PRODUCT)
+#ifdef PRODUCT
+    FATAL("No debugging in PRODUCT mode");
+#else
     {
       const uint32_t original_bc =
           static_cast<uint32_t>(reinterpret_cast<uintptr_t>(
@@ -1489,9 +1500,6 @@
       INVOKE_RUNTIME(DRT_BreakpointRuntimeHandler, args)
       DISPATCH_OP(original_bc);
     }
-#else
-    // There should be no debug breaks in product mode.
-    UNREACHABLE();
 #endif
     DISPATCH();
   }
@@ -2346,9 +2354,8 @@
   {
     BYTECODE(StoreIndexedFloat32, A_B_C);
     uint8_t* data = SimulatorHelpers::GetTypedData(FP[rA], FP[rB]);
-    const uint64_t value = reinterpret_cast<uint64_t>(FP[rC]);
-    const uint32_t value32 = value;
-    *reinterpret_cast<uint32_t*>(data) = value32;
+    const float value = *reinterpret_cast<float*>(&FP[rC]);
+    *reinterpret_cast<float*>(data) = value;
     DISPATCH();
   }
 
@@ -2358,10 +2365,8 @@
     RawTypedData* array = reinterpret_cast<RawTypedData*>(FP[rA]);
     RawSmi* index = RAW_CAST(Smi, FP[rB]);
     ASSERT(SimulatorHelpers::CheckIndex(index, array->ptr()->length_));
-    const uint64_t value = reinterpret_cast<uint64_t>(FP[rC]);
-    const uint32_t value32 = value;
-    reinterpret_cast<uint32_t*>(array->ptr()->data())[Smi::Value(index)] =
-        value32;
+    const float value = *reinterpret_cast<float*>(&FP[rC]);
+    reinterpret_cast<float*>(array->ptr()->data())[Smi::Value(index)] = value;
     DISPATCH();
   }
 
@@ -2697,6 +2702,17 @@
   }
 
   {
+    BYTECODE(StoreUntagged, A_B_C);
+    const uint16_t offset_in_words = rB;
+    const uint16_t value_reg = rC;
+
+    RawInstance* instance = reinterpret_cast<RawInstance*>(FP[rA]);
+    word value = reinterpret_cast<word>(FP[value_reg]);
+    reinterpret_cast<word*>(instance->ptr())[offset_in_words] = value;
+    DISPATCH();
+  }
+
+  {
     BYTECODE(StoreFieldTOS, __D);
     const uint16_t offset_in_words = rD;
     RawInstance* instance = reinterpret_cast<RawInstance*>(SP[-1]);
@@ -3010,6 +3026,14 @@
   }
 
   {
+    BYTECODE(NullError, 0);
+    Exit(thread, FP, SP, pc);
+    NativeArguments native_args(thread, 0, SP, SP);
+    INVOKE_RUNTIME(DRT_NullError, native_args);
+    UNREACHABLE();
+  }
+
+  {
     BYTECODE(BadTypeError, 0);
     // Stack: instance, instantiator type args, function type args, type, name
     RawObject** args = SP - 4;
@@ -3640,6 +3664,22 @@
   }
 
   {
+    BYTECODE(IfEqNullTOS, 0);
+    if (SP[0] != null_value) {
+      pc++;
+    }
+    DISPATCH();
+  }
+
+  {
+    BYTECODE(IfNeNullTOS, 0);
+    if (SP[0] == null_value) {
+      pc++;
+    }
+    DISPATCH();
+  }
+
+  {
     BYTECODE(Jump, 0);
     const int32_t target = static_cast<int32_t>(op) >> 8;
     pc += (target - 1);
@@ -3692,7 +3732,7 @@
   }
 
   {
-    BYTECODE(StoreIndexedExternalUint8, A_B_C);
+    BYTECODE(StoreIndexedUntaggedUint8, A_B_C);
     uint8_t* array = reinterpret_cast<uint8_t*>(FP[rA]);
     RawSmi* index = RAW_CAST(Smi, FP[rB]);
     RawSmi* value = RAW_CAST(Smi, FP[rC]);
@@ -3701,6 +3741,33 @@
   }
 
   {
+    BYTECODE(StoreIndexedUntaggedUint32, A_B_C);
+    uint8_t* array = reinterpret_cast<uint8_t*>(FP[rA]);
+    RawSmi* index = RAW_CAST(Smi, FP[rB]);
+    const uint32_t value = *reinterpret_cast<uint32_t*>(&FP[rC]);
+    *reinterpret_cast<uint32_t*>(array + Smi::Value(index)) = value;
+    DISPATCH();
+  }
+
+  {
+    BYTECODE(StoreIndexedUntaggedFloat32, A_B_C);
+    uint8_t* array = reinterpret_cast<uint8_t*>(FP[rA]);
+    RawSmi* index = RAW_CAST(Smi, FP[rB]);
+    const float value = *reinterpret_cast<float*>(&FP[rC]);
+    *reinterpret_cast<float*>(array + Smi::Value(index)) = value;
+    DISPATCH();
+  }
+
+  {
+    BYTECODE(StoreIndexedUntaggedFloat64, A_B_C);
+    uint8_t* array = reinterpret_cast<uint8_t*>(FP[rA]);
+    RawSmi* index = RAW_CAST(Smi, FP[rB]);
+    const double value = *reinterpret_cast<double*>(&FP[rC]);
+    *reinterpret_cast<double*>(array + Smi::Value(index)) = value;
+    DISPATCH();
+  }
+
+  {
     BYTECODE(StoreIndexedOneByteString, A_B_C);
     RawOneByteString* array = RAW_CAST(OneByteString, FP[rA]);
     RawSmi* index = RAW_CAST(Smi, FP[rB]);
@@ -3830,7 +3897,7 @@
     BYTECODE(LoadIndexedUint32, A_B_C);
     const uint8_t* data = SimulatorHelpers::GetTypedData(FP[rB], FP[rC]);
     const uint32_t value = *reinterpret_cast<const uint32_t*>(data);
-    FP[rA] = reinterpret_cast<RawObject*>(value);
+    *reinterpret_cast<uint32_t*>(&FP[rA]) = value;
     DISPATCH();
   }
 
@@ -3838,23 +3905,60 @@
     BYTECODE(LoadIndexedInt32, A_B_C);
     const uint8_t* data = SimulatorHelpers::GetTypedData(FP[rB], FP[rC]);
     const int32_t value = *reinterpret_cast<const int32_t*>(data);
-    FP[rA] = reinterpret_cast<RawObject*>(value);
+    *reinterpret_cast<int32_t*>(&FP[rA]) = value;
     DISPATCH();
   }
 
   {
-    BYTECODE(LoadIndexedExternalUint8, A_B_C);
+    BYTECODE(LoadIndexedUntaggedInt8, A_B_C);
     uint8_t* data = reinterpret_cast<uint8_t*>(FP[rB]);
     RawSmi* index = RAW_CAST(Smi, FP[rC]);
-    FP[rA] = Smi::New(data[Smi::Value(index)]);
+    FP[rA] = Smi::New(*reinterpret_cast<int8_t*>(data + Smi::Value(index)));
     DISPATCH();
   }
 
   {
-    BYTECODE(LoadIndexedExternalInt8, A_B_C);
-    int8_t* data = reinterpret_cast<int8_t*>(FP[rB]);
+    BYTECODE(LoadIndexedUntaggedUint8, A_B_C);
+    uint8_t* data = reinterpret_cast<uint8_t*>(FP[rB]);
     RawSmi* index = RAW_CAST(Smi, FP[rC]);
-    FP[rA] = Smi::New(data[Smi::Value(index)]);
+    FP[rA] = Smi::New(*reinterpret_cast<uint8_t*>(data + Smi::Value(index)));
+    DISPATCH();
+  }
+
+  {
+    BYTECODE(LoadIndexedUntaggedInt32, A_B_C);
+    uint8_t* data = reinterpret_cast<uint8_t*>(FP[rB]);
+    RawSmi* index = RAW_CAST(Smi, FP[rC]);
+    const int32_t value = *reinterpret_cast<int32_t*>(data + Smi::Value(index));
+    *reinterpret_cast<int32_t*>(&FP[rA]) = value;
+    DISPATCH();
+  }
+
+  {
+    BYTECODE(LoadIndexedUntaggedUint32, A_B_C);
+    uint8_t* data = reinterpret_cast<uint8_t*>(FP[rB]);
+    RawSmi* index = RAW_CAST(Smi, FP[rC]);
+    const uint32_t value =
+        *reinterpret_cast<uint32_t*>(data + Smi::Value(index));
+    *reinterpret_cast<uint32_t*>(&FP[rA]) = value;
+    DISPATCH();
+  }
+
+  {
+    BYTECODE(LoadIndexedUntaggedFloat32, A_B_C);
+    uint8_t* data = reinterpret_cast<uint8_t*>(FP[rB]);
+    RawSmi* index = RAW_CAST(Smi, FP[rC]);
+    const float value = *reinterpret_cast<float*>(data + Smi::Value(index));
+    *reinterpret_cast<float*>(&FP[rA]) = value;
+    DISPATCH();
+  }
+
+  {
+    BYTECODE(LoadIndexedUntaggedFloat64, A_B_C);
+    uint8_t* data = reinterpret_cast<uint8_t*>(FP[rB]);
+    RawSmi* index = RAW_CAST(Smi, FP[rC]);
+    const double value = *reinterpret_cast<double*>(data + Smi::Value(index));
+    *reinterpret_cast<double*>(&FP[rA]) = value;
     DISPATCH();
   }
 
diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc
index c3d7c8e..c676560 100644
--- a/runtime/vm/snapshot.cc
+++ b/runtime/vm/snapshot.cc
@@ -37,15 +37,15 @@
           (class_id >= kNullCid && class_id <= kVoidCid));
 }
 
-static bool IsObjectStoreClassId(intptr_t class_id) {
-  // Check if this is a class which is stored in the object store.
+static bool IsBootstrapedClassId(intptr_t class_id) {
+  // Check if this is a class which is created during bootstrapping.
   return (class_id == kObjectCid ||
           (class_id >= kInstanceCid && class_id <= kUserTagCid) ||
           class_id == kArrayCid || class_id == kImmutableArrayCid ||
           RawObject::IsStringClassId(class_id) ||
           RawObject::IsTypedDataClassId(class_id) ||
           RawObject::IsExternalTypedDataClassId(class_id) ||
-          class_id == kNullCid);
+          RawObject::IsTypedDataViewClassId(class_id) || class_id == kNullCid);
 }
 
 static bool IsObjectStoreTypeId(intptr_t index) {
@@ -70,7 +70,6 @@
 
 static intptr_t ObjectIdFromClassId(intptr_t class_id) {
   ASSERT((class_id > kIllegalCid) && (class_id < kNumPredefinedCids));
-  ASSERT(!(RawObject::IsImplicitFieldClassId(class_id)));
   return (class_id + kClassIdsOffset);
 }
 
@@ -209,6 +208,7 @@
       old_space_(thread_->isolate()->heap()->old_space()),
       cls_(Class::Handle(zone_)),
       code_(Code::Handle(zone_)),
+      instance_(Instance::Handle(zone_)),
       instructions_(Instructions::Handle(zone_)),
       obj_(Object::Handle(zone_)),
       pobj_(PassiveObject::Handle(zone_)),
@@ -220,9 +220,14 @@
       type_arguments_(TypeArguments::Handle(zone_)),
       tokens_(GrowableObjectArray::Handle(zone_)),
       data_(ExternalTypedData::Handle(zone_)),
+      typed_data_base_(TypedDataBase::Handle(zone_)),
       typed_data_(TypedData::Handle(zone_)),
+      typed_data_view_(TypedDataView::Handle(zone_)),
       function_(Function::Handle(zone_)),
       error_(UnhandledException::Handle(zone_)),
+      set_class_(Class::ZoneHandle(
+          zone_,
+          thread_->isolate()->object_store()->linked_hash_set_class())),
       max_vm_isolate_object_id_(
           (Snapshot::IsFull(kind))
               ? Object::vm_isolate_snapshot_object_table().Length()
@@ -248,7 +253,6 @@
     }
     Object& result = Object::Handle(zone_);
     if (backward_references_->length() > 0) {
-      ProcessDeferredCanonicalizations();
       result = (*backward_references_)[0].reference()->raw();
     } else {
       result = obj.raw();
@@ -313,11 +317,11 @@
   ASSERT(!IsVMIsolateObject(class_header) ||
          !IsSingletonClassId(GetVMIsolateObjectId(class_header)));
   ASSERT((SerializedHeaderTag::decode(class_header) != kObjectId) ||
-         !IsObjectStoreClassId(SerializedHeaderData::decode(class_header)));
+         !IsBootstrapedClassId(SerializedHeaderData::decode(class_header)));
   Class& cls = Class::ZoneHandle(zone(), Class::null());
   AddBackRef(object_id, &cls, kIsDeserialized);
   // Read the library/class information and lookup the class.
-  str_ ^= ReadObjectImpl(class_header, kAsInlinedObject, kInvalidPatchIndex, 0);
+  str_ ^= ReadObjectImpl(class_header, kAsInlinedObject);
   library_ = Library::LookupLibrary(thread(), str_);
   if (library_.IsNull() || !library_.Loaded()) {
     SetReadException(
@@ -413,28 +417,22 @@
   return isolate() == Dart::vm_isolate();
 }
 
-RawObject* SnapshotReader::ReadObjectImpl(bool as_reference,
-                                          intptr_t patch_object_id,
-                                          intptr_t patch_offset) {
+RawObject* SnapshotReader::ReadObjectImpl(bool as_reference) {
   int64_t header_value = Read<int64_t>();
   if ((header_value & kSmiTagMask) == kSmiTag) {
     return NewInteger(header_value);
   }
   ASSERT((header_value <= kIntptrMax) && (header_value >= kIntptrMin));
-  return ReadObjectImpl(static_cast<intptr_t>(header_value), as_reference,
-                        patch_object_id, patch_offset);
+  return ReadObjectImpl(static_cast<intptr_t>(header_value), as_reference);
 }
 
 RawObject* SnapshotReader::ReadObjectImpl(intptr_t header_value,
-                                          bool as_reference,
-                                          intptr_t patch_object_id,
-                                          intptr_t patch_offset) {
+                                          bool as_reference) {
   if (IsVMIsolateObject(header_value)) {
     return ReadVMIsolateObject(header_value);
   }
   if (SerializedHeaderTag::decode(header_value) == kObjectId) {
-    return ReadIndexedObject(SerializedHeaderData::decode(header_value),
-                             patch_object_id, patch_offset);
+    return ReadIndexedObject(SerializedHeaderData::decode(header_value));
   }
   ASSERT(SerializedHeaderTag::decode(header_value) == kInlined);
   intptr_t object_id = SerializedHeaderData::decode(header_value);
@@ -483,6 +481,15 @@
       break;
     }
 #undef SNAPSHOT_READ
+#define SNAPSHOT_READ(clazz) case kTypedData##clazz##ViewCid:
+
+    case kByteDataViewCid:
+      CLASS_LIST_TYPED_DATA(SNAPSHOT_READ) {
+        tags = RawObject::ClassIdTag::update(class_id, tags);
+        pobj_ = TypedDataView::ReadFrom(this, object_id, tags, kind_, true);
+        break;
+      }
+#undef SNAPSHOT_READ
 #define SNAPSHOT_READ(clazz) case kFfi##clazz##Cid:
 
     CLASS_LIST_FFI(SNAPSHOT_READ) { UNREACHABLE(); }
@@ -491,12 +498,13 @@
       UNREACHABLE();
       break;
   }
-  if (!read_as_reference) {
-    AddPatchRecord(object_id, patch_object_id, patch_offset);
-  }
   return pobj_.raw();
 }
 
+void SnapshotReader::EnqueueRehashingOfSet(const Object& set) {
+  objects_to_rehash_.Add(set);
+}
+
 RawObject* SnapshotReader::ReadInstance(intptr_t object_id,
                                         intptr_t tags,
                                         bool as_reference) {
@@ -526,6 +534,9 @@
     ASSERT(!cls_.IsNull());
     instance_size = cls_.instance_size();
   }
+  if (cls_.id() == set_class_.id()) {
+    EnqueueRehashingOfSet(*result);
+  }
   if (!as_reference) {
     // Read all the individual fields for inlined objects.
     intptr_t next_field_offset = cls_.next_field_offset();
@@ -538,8 +549,7 @@
     intptr_t offset = Instance::NextFieldOffset();
     intptr_t result_cid = result->GetClassId();
     while (offset < next_field_offset) {
-      pobj_ =
-          ReadObjectImpl(read_as_reference, object_id, (offset / kWordSize));
+      pobj_ = ReadObjectImpl(read_as_reference);
       result->SetFieldAtOffset(offset, pobj_);
       if ((offset != type_argument_field_offset) &&
           (kind_ == Snapshot::kMessage) && isolate()->use_field_guards()) {
@@ -572,13 +582,12 @@
 
 void SnapshotReader::AddBackRef(intptr_t id,
                                 Object* obj,
-                                DeserializeState state,
-                                bool defer_canonicalization) {
+                                DeserializeState state) {
   intptr_t index = (id - kMaxPredefinedObjectIds);
   ASSERT(index >= max_vm_isolate_object_id_);
   index -= max_vm_isolate_object_id_;
   ASSERT(index == backward_references_->length());
-  BackRefNode node(obj, state, defer_canonicalization);
+  BackRefNode node(obj, state);
   backward_references_->Add(node);
 }
 
@@ -690,7 +699,7 @@
   }
   ASSERT(SerializedHeaderTag::decode(class_header) == kObjectId);
   intptr_t class_id = SerializedHeaderData::decode(class_header);
-  ASSERT(IsObjectStoreClassId(class_id) || IsSingletonClassId(class_id));
+  ASSERT(IsBootstrapedClassId(class_id) || IsSingletonClassId(class_id));
   return class_id;
 }
 
@@ -758,11 +767,9 @@
   return Symbols::GetPredefinedSymbol(object_id);  // return VM symbol.
 }
 
-RawObject* SnapshotReader::ReadIndexedObject(intptr_t object_id,
-                                             intptr_t patch_object_id,
-                                             intptr_t patch_offset) {
+RawObject* SnapshotReader::ReadIndexedObject(intptr_t object_id) {
   intptr_t class_id = ClassIdFromObjectId(object_id);
-  if (IsObjectStoreClassId(class_id)) {
+  if (IsBootstrapedClassId(class_id)) {
     return isolate()->class_table()->At(class_id);  // get singleton class.
   }
   if (IsObjectStoreTypeId(object_id)) {
@@ -773,85 +780,20 @@
   if (index < max_vm_isolate_object_id_) {
     return VmIsolateSnapshotObject(index);
   }
-  AddPatchRecord(object_id, patch_object_id, patch_offset);
   return GetBackRef(object_id)->raw();
 }
 
-void SnapshotReader::AddPatchRecord(intptr_t object_id,
-                                    intptr_t patch_object_id,
-                                    intptr_t patch_offset) {
-  if (patch_object_id != kInvalidPatchIndex) {
-    ASSERT(object_id >= kMaxPredefinedObjectIds);
-    intptr_t index = (object_id - kMaxPredefinedObjectIds);
-    ASSERT(index >= max_vm_isolate_object_id_);
-    index -= max_vm_isolate_object_id_;
-    ASSERT(index < backward_references_->length());
-    BackRefNode& ref = (*backward_references_)[index];
-    ref.AddPatchRecord(patch_object_id, patch_offset);
-  }
-}
-
-void SnapshotReader::ProcessDeferredCanonicalizations() {
-  Type& typeobj = Type::Handle();
-  TypeArguments& typeargs = TypeArguments::Handle();
-  Object& newobj = Object::Handle();
-  for (intptr_t i = 0; i < backward_references_->length(); i++) {
-    BackRefNode& backref = (*backward_references_)[i];
-    if (backref.defer_canonicalization()) {
-      Object* objref = backref.reference();
-      // Object should either be a type or a type argument.
-      if (objref->IsType()) {
-        typeobj ^= objref->raw();
-        newobj = typeobj.Canonicalize();
-      } else {
-        ASSERT(objref->IsTypeArguments());
-        typeargs ^= objref->raw();
-        newobj = typeargs.Canonicalize();
-      }
-      if (newobj.raw() != objref->raw()) {
-        ZoneGrowableArray<intptr_t>* patches = backref.patch_records();
-        ASSERT(newobj.IsNull() || newobj.IsCanonical());
-        // First we replace the back ref table with the canonical object.
-        *objref = newobj.raw();
-        if (patches != NULL) {
-          // Now go over all the patch records and patch the canonical object.
-          for (intptr_t j = 0; j < patches->length(); j += 2) {
-            NoSafepointScope no_safepoint;
-            intptr_t patch_object_id = (*patches)[j];
-            intptr_t patch_offset = (*patches)[j + 1];
-            Object* target = GetBackRef(patch_object_id);
-            // We should not backpatch an object that is canonical.
-            if (!target->IsCanonical()) {
-              RawObject** rawptr =
-                  reinterpret_cast<RawObject**>(target->raw()->ptr());
-              target->StorePointer((rawptr + patch_offset), newobj.raw());
-            }
-          }
-        }
-      } else {
-        ASSERT(objref->IsCanonical());
-      }
-    }
-  }
-}
-
 void SnapshotReader::ArrayReadFrom(intptr_t object_id,
                                    const Array& result,
                                    intptr_t len,
                                    intptr_t tags) {
   // Setup the object fields.
-  const intptr_t typeargs_offset =
-      GrowableObjectArray::type_arguments_offset() / kWordSize;
-  *TypeArgumentsHandle() ^=
-      ReadObjectImpl(kAsInlinedObject, object_id, typeargs_offset);
+  *TypeArgumentsHandle() ^= ReadObjectImpl(kAsInlinedObject);
   result.SetTypeArguments(*TypeArgumentsHandle());
 
   bool as_reference = RawObject::IsCanonical(tags) ? false : true;
-  intptr_t offset = result.raw_ptr()->data() -
-                    reinterpret_cast<RawObject**>(result.raw()->ptr());
   for (intptr_t i = 0; i < len; i++) {
-    *PassiveObjectHandle() =
-        ReadObjectImpl(as_reference, object_id, (i + offset));
+    *PassiveObjectHandle() = ReadObjectImpl(as_reference);
     result.SetAt(i, *PassiveObjectHandle());
   }
 }
@@ -1084,7 +1026,7 @@
 
   // Now check if it is an object from the VM isolate. These objects are shared
   // by all isolates.
-  if (rawobj->IsVMHeapObject() && HandleVMIsolateObject(rawobj)) {
+  if (rawobj->InVMIsolateHeap() && HandleVMIsolateObject(rawobj)) {
     return true;
   }
 
@@ -1094,7 +1036,7 @@
   if (cid == kClassCid) {
     RawClass* raw_class = reinterpret_cast<RawClass*>(rawobj);
     intptr_t class_id = raw_class->ptr()->id_;
-    if (IsObjectStoreClassId(class_id)) {
+    if (IsBootstrapedClassId(class_id)) {
       intptr_t object_id = ObjectIdFromClassId(class_id);
       WriteIndexedObject(object_id);
       return true;
@@ -1179,6 +1121,16 @@
       return;
     }
 #undef SNAPSHOT_WRITE
+#define SNAPSHOT_WRITE(clazz) case kTypedData##clazz##ViewCid:
+
+    case kByteDataViewCid:
+      CLASS_LIST_TYPED_DATA(SNAPSHOT_WRITE) {
+        auto* raw_obj = reinterpret_cast<RawTypedDataView*>(raw);
+        raw_obj->WriteTo(this, object_id, kind_, as_reference);
+        return;
+      }
+#undef SNAPSHOT_WRITE
+
 #define SNAPSHOT_WRITE(clazz) case kFfi##clazz##Cid:
 
     CLASS_LIST_FFI(SNAPSHOT_WRITE) { UNREACHABLE(); }
@@ -1240,7 +1192,7 @@
 void SnapshotWriter::WriteClassId(RawClass* cls) {
   ASSERT(!Snapshot::IsFull(kind_));
   int class_id = cls->ptr()->id_;
-  ASSERT(!IsSingletonClassId(class_id) && !IsObjectStoreClassId(class_id));
+  ASSERT(!IsSingletonClassId(class_id) && !IsBootstrapedClassId(class_id));
 
   // Write out the library url and class name.
   RawLibrary* library = cls->ptr()->library_;
diff --git a/runtime/vm/snapshot.h b/runtime/vm/snapshot.h
index 736329c..e4861cb 100644
--- a/runtime/vm/snapshot.h
+++ b/runtime/vm/snapshot.h
@@ -26,8 +26,10 @@
 class Closure;
 class Code;
 class ExternalTypedData;
+class TypedDataBase;
 class GrowableObjectArray;
 class Heap;
+class Instance;
 class Instructions;
 class LanguageError;
 class Library;
@@ -37,6 +39,7 @@
 class ObjectStore;
 class MegamorphicCache;
 class PageSpace;
+class TypedDataView;
 class RawApiError;
 class RawArray;
 class RawCapability;
@@ -86,6 +89,7 @@
 class RawType;
 class RawTypeArguments;
 class RawTypedData;
+class RawTypedDataView;
 class RawTypeParameter;
 class RawTypeRef;
 class RawUnhandledException;
@@ -98,8 +102,8 @@
 // Serialized object header encoding is as follows:
 // - Smi: the Smi value is written as is (last bit is not tagged).
 // - VM object (from VM isolate): (object id in vm isolate | 0x3)
-//   This valus is serialized as a negative number.
-//   (note VM objects are never serialized they are expected to be found
+//   This value is serialized as a negative number.
+//   (note VM objects are never serialized, they are expected to be found
 //    using ths unique ID assigned to them).
 // - Reference to object that has already been written: (object id | 0x3)
 //   This valus is serialized as a positive number.
@@ -270,42 +274,21 @@
 
 class BackRefNode : public ValueObject {
  public:
-  BackRefNode(Object* reference,
-              DeserializeState state,
-              bool defer_canonicalization)
-      : reference_(reference),
-        state_(state),
-        defer_canonicalization_(defer_canonicalization),
-        patch_records_(NULL) {}
+  BackRefNode(Object* reference, DeserializeState state)
+      : reference_(reference), state_(state) {}
   Object* reference() const { return reference_; }
   bool is_deserialized() const { return state_ == kIsDeserialized; }
   void set_state(DeserializeState state) { state_ = state; }
-  bool defer_canonicalization() const { return defer_canonicalization_; }
-  ZoneGrowableArray<intptr_t>* patch_records() const { return patch_records_; }
 
   BackRefNode& operator=(const BackRefNode& other) {
     reference_ = other.reference_;
     state_ = other.state_;
-    defer_canonicalization_ = other.defer_canonicalization_;
-    patch_records_ = other.patch_records_;
     return *this;
   }
 
-  void AddPatchRecord(intptr_t patch_object_id, intptr_t patch_offset) {
-    if (defer_canonicalization_) {
-      if (patch_records_ == NULL) {
-        patch_records_ = new ZoneGrowableArray<intptr_t>();
-      }
-      patch_records_->Add(patch_object_id);
-      patch_records_->Add(patch_offset);
-    }
-  }
-
  private:
   Object* reference_;
   DeserializeState state_;
-  bool defer_canonicalization_;
-  ZoneGrowableArray<intptr_t>* patch_records_;
 };
 
 // Reads a snapshot into objects.
@@ -321,13 +304,16 @@
   Array* ArrayHandle() { return &array_; }
   Class* ClassHandle() { return &cls_; }
   Code* CodeHandle() { return &code_; }
+  Instance* InstanceHandle() { return &instance_; }
   Instructions* InstructionsHandle() { return &instructions_; }
   String* StringHandle() { return &str_; }
   AbstractType* TypeHandle() { return &type_; }
   TypeArguments* TypeArgumentsHandle() { return &type_arguments_; }
   GrowableObjectArray* TokensHandle() { return &tokens_; }
   ExternalTypedData* DataHandle() { return &data_; }
+  TypedDataBase* TypedDataBaseHandle() { return &typed_data_base_; }
   TypedData* TypedDataHandle() { return &typed_data_; }
+  TypedDataView* TypedDataViewHandle() { return &typed_data_view_; }
   Function* FunctionHandle() { return &function_; }
   Snapshot::Kind kind() const { return kind_; }
 
@@ -335,10 +321,7 @@
   RawObject* ReadObject();
 
   // Add object to backward references.
-  void AddBackRef(intptr_t id,
-                  Object* obj,
-                  DeserializeState state,
-                  bool defer_canonicalization = false);
+  void AddBackRef(intptr_t id, Object* obj, DeserializeState state);
 
   // Get an object from the backward references list.
   Object* GetBackRef(intptr_t id);
@@ -367,19 +350,15 @@
   void RunDelayedTypePostprocessing();
 
   void EnqueueRehashingOfMap(const LinkedHashMap& map);
+  void EnqueueRehashingOfSet(const Object& set);
   RawObject* RunDelayedRehashingOfMaps();
 
   RawClass* ReadClassId(intptr_t object_id);
   RawObject* ReadStaticImplicitClosure(intptr_t object_id, intptr_t cls_header);
 
   // Implementation to read an object.
-  RawObject* ReadObjectImpl(bool as_reference,
-                            intptr_t patch_object_id = kInvalidPatchIndex,
-                            intptr_t patch_offset = 0);
-  RawObject* ReadObjectImpl(intptr_t header,
-                            bool as_reference,
-                            intptr_t patch_object_id,
-                            intptr_t patch_offset);
+  RawObject* ReadObjectImpl(bool as_reference);
+  RawObject* ReadObjectImpl(intptr_t header, bool as_reference);
 
   // Read a Dart Instance object.
   RawObject* ReadInstance(intptr_t object_id, intptr_t tags, bool as_reference);
@@ -389,18 +368,7 @@
 
   // Read an object that was serialized as an Id (singleton in object store,
   // or an object that was already serialized before).
-  RawObject* ReadIndexedObject(intptr_t object_id,
-                               intptr_t patch_object_id,
-                               intptr_t patch_offset);
-
-  // Add a patch record for the object so that objects whose canonicalization
-  // is deferred can be back patched after they are canonicalized.
-  void AddPatchRecord(intptr_t object_id,
-                      intptr_t patch_object_id,
-                      intptr_t patch_offset);
-
-  // Process all the deferred canonicalization entries and patch all references.
-  void ProcessDeferredCanonicalizations();
+  RawObject* ReadIndexedObject(intptr_t object_id);
 
   // Decode class id from the header field.
   intptr_t LookupInternalClass(intptr_t class_header);
@@ -425,6 +393,7 @@
   PageSpace* old_space_;           // Old space of the current isolate.
   Class& cls_;                     // Temporary Class handle.
   Code& code_;                     // Temporary Code handle.
+  Instance& instance_;             // Temporary Instance handle
   Instructions& instructions_;     // Temporary Instructions handle
   Object& obj_;                    // Temporary Object handle.
   PassiveObject& pobj_;            // Temporary PassiveObject handle.
@@ -436,9 +405,12 @@
   TypeArguments& type_arguments_;  // Temporary type argument handle.
   GrowableObjectArray& tokens_;    // Temporary tokens handle.
   ExternalTypedData& data_;        // Temporary stream data handle.
+  TypedDataBase& typed_data_base_;  // Temporary typed data base handle.
   TypedData& typed_data_;          // Temporary typed data handle.
+  TypedDataView& typed_data_view_;  // Temporary typed data view handle.
   Function& function_;             // Temporary function handle.
   UnhandledException& error_;      // Error handle.
+  const Class& set_class_;         // The LinkedHashSet class.
   intptr_t max_vm_isolate_object_id_;
   ZoneGrowableArray<BackRefNode>* backward_references_;
   GrowableObjectArray& types_to_postprocess_;
@@ -471,6 +443,7 @@
   friend class SignatureData;
   friend class SubtypeTestCache;
   friend class Type;
+  friend class TypedDataView;
   friend class TypeArguments;
   friend class TypeParameter;
   friend class TypeRef;
@@ -743,6 +716,7 @@
   friend class RawStackTrace;
   friend class RawSubtypeTestCache;
   friend class RawType;
+  friend class RawTypedDataView;
   friend class RawTypeRef;
   friend class RawTypeArguments;
   friend class RawTypeParameter;
diff --git a/runtime/vm/snapshot_test.cc b/runtime/vm/snapshot_test.cc
index 52bda42..04f4e6a 100644
--- a/runtime/vm/snapshot_test.cc
+++ b/runtime/vm/snapshot_test.cc
@@ -769,7 +769,11 @@
     StackZone zone(thread);
     HandleScope scope(thread);
 
-    EXPECT_VALID(Api::CheckAndFinalizePendingClasses(thread));
+    Dart_Handle result = Api::CheckAndFinalizePendingClasses(thread);
+    {
+      TransitionVMToNative to_native(thread);
+      EXPECT_VALID(result);
+    }
     timer1.Stop();
     OS::PrintErr("Without Snapshot: %" Pd64 "us\n", timer1.TotalElapsedTime());
 
@@ -800,72 +804,6 @@
   free(isolate_snapshot_data_buffer);
 }
 
-VM_UNIT_TEST_CASE(FullSnapshot1) {
-  // This buffer has to be static for this to compile with Visual Studio.
-  // If it is not static compilation of this file with Visual Studio takes
-  // more than 30 minutes!
-  static const char kFullSnapshotScriptChars[] = {
-#include "snapshot_test.dat"
-  };
-  const char* kScriptChars = kFullSnapshotScriptChars;
-
-  uint8_t* isolate_snapshot_data_buffer;
-
-  // Start an Isolate, load a script and create a full snapshot.
-  Timer timer1(true, "Snapshot_test");
-  timer1.Start();
-  {
-    TestIsolateScope __test_isolate__;
-
-    Thread* thread = Thread::Current();
-    StackZone zone(thread);
-    HandleScope scope(thread);
-
-    // Create a test library and Load up a test script in it.
-    Dart_Handle lib = TestCase::LoadTestScript(kScriptChars, NULL);
-    EXPECT_VALID(Api::CheckAndFinalizePendingClasses(thread));
-    timer1.Stop();
-    OS::PrintErr("Without Snapshot: %" Pd64 "us\n", timer1.TotalElapsedTime());
-
-    // Write snapshot with object content.
-    {
-      TransitionNativeToVM transition(thread);
-      FullSnapshotWriter writer(
-          Snapshot::kFull, NULL, &isolate_snapshot_data_buffer,
-          &malloc_allocator, NULL, /*image_writer*/ nullptr);
-      writer.WriteFullSnapshot();
-    }
-
-    // Invoke a function which returns an object.
-    Dart_Handle cls = Dart_GetClass(lib, NewString("FieldsTest"));
-    Dart_Handle result = Dart_Invoke(cls, NewString("testMain"), 0, NULL);
-    EXPECT_VALID(result);
-  }
-
-  // Now Create another isolate using the snapshot and execute a method
-  // from the script.
-  Timer timer2(true, "Snapshot_test");
-  timer2.Start();
-  TestCase::CreateTestIsolateFromSnapshot(isolate_snapshot_data_buffer);
-  {
-    Dart_EnterScope();  // Start a Dart API scope for invoking API functions.
-    timer2.Stop();
-    OS::PrintErr("From Snapshot: %" Pd64 "us\n", timer2.TotalElapsedTime());
-
-    // Invoke a function which returns an object.
-    Dart_Handle cls = Dart_GetClass(TestCase::lib(), NewString("FieldsTest"));
-    Dart_Handle result = Dart_Invoke(cls, NewString("testMain"), 0, NULL);
-    if (Dart_IsError(result)) {
-      // Print the error.  It is probably an unhandled exception.
-      fprintf(stderr, "%s\n", Dart_GetError(result));
-    }
-    EXPECT_VALID(result);
-    Dart_ExitScope();
-  }
-  Dart_ShutdownIsolate();
-  free(isolate_snapshot_data_buffer);
-}
-
 // Helper function to call a top level Dart function and serialize the result.
 static Message* GetSerialized(Dart_Handle lib, const char* dart_function) {
   Dart_Handle result;
diff --git a/runtime/vm/snapshot_test.dart b/runtime/vm/snapshot_test.dart
deleted file mode 100644
index a8e037d..0000000
--- a/runtime/vm/snapshot_test.dart
+++ /dev/null
@@ -1,1552 +0,0 @@
-// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:isolate';
-import 'dart:async';
-
-class Expect {
-  static void equals(x, y) {
-    if (x != y) throw new ArgumentError('not equal');
-  }
-}
-
-class Fields {
-  Fields(int i, int j)
-      : fld1 = i,
-        fld2 = j,
-        fld5 = true {}
-  int fld1;
-  final int fld2;
-  static int fld3;
-  static const int fld4 = 10;
-  bool fld5;
-}
-
-class FieldsTest {
-  static Fields testMain() {
-    Fields obj = new Fields(10, 20);
-    Expect.equals(10, obj.fld1);
-    Expect.equals(20, obj.fld2);
-    Expect.equals(10, Fields.fld4);
-    Expect.equals(true, obj.fld5);
-    return obj;
-  }
-}
-// Benchpress: A collection of micro-benchmarks.
-// Ported from internal v8 benchmark suite.
-
-class Error {
-  static void error(String msg) {
-    throw msg;
-  }
-}
-
-// F i b o n a c c i
-class Fibonacci {
-  static int fib(int n) {
-    if (n <= 1) return 1;
-    return fib(n - 1) + fib(n - 2);
-  }
-}
-
-class FibBenchmark extends BenchmarkBase {
-  const FibBenchmark() : super("Fibonacci");
-
-  void warmup() {
-    Fibonacci.fib(10);
-  }
-
-  void exercise() {
-    // This value has been copied from benchpress.js, so that we can compare
-    // performance.
-    var result = Fibonacci.fib(20);
-    if (result != 10946)
-      Error.error("Wrong result: $result. Should be: 10946.");
-  }
-
-  static void main() {
-    new FibBenchmark().report();
-  }
-}
-
-// L o o p
-class Loop {
-  static int loop(int outerIterations) {
-    int sum = 0;
-    for (int i = 0; i < outerIterations; i++) {
-      for (int j = 0; j < 100; j++) {
-        sum++;
-      }
-    }
-    return sum;
-  }
-}
-
-class LoopBenchmark extends BenchmarkBase {
-  const LoopBenchmark() : super("Loop");
-
-  void warmup() {
-    Loop.loop(10);
-  }
-
-  void exercise() {
-    // This value has been copied from benchpress.js, so that we can compare
-    // performance.
-    var result = Loop.loop(200);
-    if (result != 20000) Error.error("Wrong result: $result. Should be: 20000");
-  }
-
-  static void main() {
-    new LoopBenchmark().report();
-  }
-}
-
-// T o w e r s
-class TowersDisk {
-  final int size;
-  TowersDisk next;
-
-  TowersDisk(size)
-      : this.size = size,
-        next = null {}
-}
-
-class Towers {
-  List<TowersDisk> piles;
-  int movesDone;
-  Towers(int disks)
-      : piles = new List<TowersDisk>(3),
-        movesDone = 0 {
-    build(0, disks);
-  }
-
-  void build(int pile, int disks) {
-    for (var i = disks - 1; i >= 0; i--) {
-      push(pile, new TowersDisk(i));
-    }
-  }
-
-  void push(int pile, TowersDisk disk) {
-    TowersDisk top = piles[pile];
-    if ((top != null) && (disk.size >= top.size))
-      Error.error("Cannot put a big disk on a smaller disk.");
-    disk.next = top;
-    piles[pile] = disk;
-  }
-
-  TowersDisk pop(int pile) {
-    var top = piles[pile];
-    if (top == null)
-      Error.error("Attempting to remove a disk from an empty pile.");
-    piles[pile] = top.next;
-    top.next = null;
-    return top;
-  }
-
-  void moveTop(int from, int to) {
-    push(to, pop(from));
-    movesDone++;
-  }
-
-  void move(int from, int to, int disks) {
-    if (disks == 1) {
-      moveTop(from, to);
-    } else {
-      int other = 3 - from - to;
-      move(from, other, disks - 1);
-      moveTop(from, to);
-      move(other, to, disks - 1);
-    }
-  }
-}
-
-class TowersBenchmark extends BenchmarkBase {
-  const TowersBenchmark() : super("Towers");
-
-  void warmup() {
-    new Towers(6).move(0, 1, 6);
-  }
-
-  void exercise() {
-    // This value has been copied from benchpress.js, so that we can compare
-    // performance.
-    var towers = new Towers(13);
-    towers.move(0, 1, 13);
-    if (towers.movesDone != 8191) {
-      var moves = towers.movesDone;
-      Error.error("Error in result: $moves should be: 8191");
-    }
-  }
-
-  static void main() {
-    new TowersBenchmark().report();
-  }
-}
-
-// S i e v e
-class SieveBenchmark extends BenchmarkBase {
-  const SieveBenchmark() : super("Sieve");
-
-  static int sieve(int size) {
-    int primeCount = 0;
-    List<bool> flags = new List<bool>(size + 1);
-    for (int i = 1; i < size; i++) flags[i] = true;
-    for (int i = 2; i < size; i++) {
-      if (flags[i]) {
-        primeCount++;
-        for (int k = i + 1; k <= size; k += i) flags[k - 1] = false;
-      }
-    }
-    return primeCount;
-  }
-
-  void warmup() {
-    sieve(100);
-  }
-
-  void exercise() {
-    // This value has been copied from benchpress.js, so that we can compare
-    // performance.
-    int result = sieve(1000);
-    if (result != 168) Error.error("Wrong result: $result should be: 168");
-  }
-
-  static void main() {
-    new SieveBenchmark().report();
-  }
-}
-
-// P e r m u t e
-// The original benchmark uses one-based indexing. Even though arrays in JS and
-// lists in dart are zero-based, we stay with one-based indexing
-// (wasting one element).
-class Permute {
-  int permuteCount;
-  Permute() {}
-
-  void swap(int n, int k, List<int> list) {
-    int tmp = list[n];
-    list[n] = list[k];
-    list[k] = tmp;
-  }
-
-  void doPermute(int n, List<int> list) {
-    permuteCount++;
-    if (n != 1) {
-      doPermute(n - 1, list);
-      for (int k = n - 1; k >= 1; k--) {
-        swap(n, k, list);
-        doPermute(n - 1, list);
-        swap(n, k, list);
-      }
-    }
-  }
-
-  int permute(int size) {
-    permuteCount = 0;
-    List<int> list = new List<int>(size);
-    for (int i = 1; i < size; i++) list[i] = i - 1;
-    doPermute(size - 1, list);
-    return permuteCount;
-  }
-}
-
-class PermuteBenchmark extends BenchmarkBase {
-  const PermuteBenchmark() : super("Permute");
-
-  void warmup() {
-    new Permute().permute(4);
-  }
-
-  void exercise() {
-    // This value has been copied from benchpress.js, so that we can compare
-    // performance.
-    int result = new Permute().permute(8);
-    if (result != 8660) Error.error("Wrong result: $result should be: 8660");
-  }
-
-  static void main() {
-    new PermuteBenchmark().report();
-  }
-}
-
-// Q u e e n s
-// The original benchmark uses one-based indexing. Even though arrays in JS and
-// lists in dart are zero-based, we stay with one-based indexing
-// (wasting one element).
-class Queens {
-  static bool tryQueens(
-      int i, List<bool> a, List<bool> b, List<bool> c, List<int> x) {
-    int j = 0;
-    bool q = false;
-    while ((!q) && (j != 8)) {
-      j++;
-      q = false;
-      if (b[j] && a[i + j] && c[i - j + 7]) {
-        x[i] = j;
-        b[j] = false;
-        a[i + j] = false;
-        c[i - j + 7] = false;
-        if (i < 8) {
-          q = tryQueens(i + 1, a, b, c, x);
-          if (!q) {
-            b[j] = true;
-            a[i + j] = true;
-            c[i - j + 7] = true;
-          }
-        } else {
-          q = true;
-        }
-      }
-    }
-    return q;
-  }
-
-  static void queens() {
-    List<bool> a = new List<bool>(9);
-    List<bool> b = new List<bool>(17);
-    List<bool> c = new List<bool>(15);
-    List<int> x = new List<int>(9);
-    b[1] = false;
-    for (int i = -7; i <= 16; i++) {
-      if ((i >= 1) && (i <= 8)) a[i] = true;
-      if (i >= 2) b[i] = true;
-      if (i <= 7) c[i + 7] = true;
-    }
-
-    if (!tryQueens(1, b, a, c, x)) Error.error("Error in queens");
-  }
-}
-
-class QueensBenchmark extends BenchmarkBase {
-  const QueensBenchmark() : super("Queens");
-
-  void warmup() {
-    Queens.queens();
-  }
-
-  void exercise() {
-    Queens.queens();
-  }
-
-  static void main() {
-    new QueensBenchmark().report();
-  }
-}
-
-// R e c u r s e
-class Recurse {
-  static int recurse(int n) {
-    if (n <= 0) return 1;
-    recurse(n - 1);
-    return recurse(n - 1);
-  }
-}
-
-class RecurseBenchmark extends BenchmarkBase {
-  const RecurseBenchmark() : super("Recurse");
-
-  void warmup() {
-    Recurse.recurse(7);
-  }
-
-  void exercise() {
-    // This value has been copied from benchpress.js, so that we can compare
-    // performance.
-    Recurse.recurse(13);
-  }
-
-  static void main() {
-    new RecurseBenchmark().report();
-  }
-}
-
-// S u m
-class SumBenchmark extends BenchmarkBase {
-  const SumBenchmark() : super("Sum");
-
-  static int sum(int start, int end) {
-    var sum = 0;
-    for (var i = start; i <= end; i++) sum += i;
-    return sum;
-  }
-
-  void warmup() {
-    sum(1, 1000);
-  }
-
-  void exercise() {
-    // This value has been copied from benchpress.js, so that we can compare
-    // performance.
-    int result = sum(1, 10000);
-    if (result != 50005000)
-      Error.error("Wrong result: $result should be 50005000");
-  }
-
-  static void main() {
-    new SumBenchmark().report();
-  }
-}
-
-// H e l p e r   f u n c t i o n s   f o r   s o r t s
-class Random {
-  static const int INITIAL_SEED = 74755;
-  int seed;
-  Random() : seed = INITIAL_SEED {}
-
-  int random() {
-    seed = ((seed * 1309) + 13849) % 65536;
-    return seed;
-  }
-}
-
-//
-class SortData {
-  List<int> list;
-  int min;
-  int max;
-
-  SortData(int length) {
-    Random r = new Random();
-    list = new List<int>(length);
-    for (int i = 0; i < length; i++) list[i] = r.random();
-
-    int min, max;
-    min = max = list[0];
-    for (int i = 0; i < length; i++) {
-      int e = list[i];
-      if (e > max) max = e;
-      if (e < min) min = e;
-    }
-
-    this.min = min;
-    this.max = max;
-  }
-
-  void check() {
-    List<int> a = list;
-    int len = a.length;
-    if ((a[0] != min) || a[len - 1] != max) Error.error("List is not sorted");
-    for (var i = 1; i < len; i++) {
-      if (a[i - 1] > a[i]) Error.error("List is not sorted");
-    }
-  }
-}
-
-// B u b b l e S o r t
-class BubbleSort {
-  static void sort(List<int> a) {
-    int len = a.length;
-    for (int i = len - 2; i >= 0; i--) {
-      for (int j = 0; j <= i; j++) {
-        int c = a[j];
-        int n = a[j + 1];
-        if (c > n) {
-          a[j] = n;
-          a[j + 1] = c;
-        }
-      }
-    }
-  }
-}
-
-class BubbleSortBenchmark extends BenchmarkBase {
-  const BubbleSortBenchmark() : super("BubbleSort");
-
-  void warmup() {
-    SortData data = new SortData(30);
-    BubbleSort.sort(data.list);
-  }
-
-  void exercise() {
-    // This value has been copied from benchpress.js, so that we can compare
-    // performance.
-    SortData data = new SortData(130);
-    BubbleSort.sort(data.list);
-    data.check();
-  }
-
-  static void main() {
-    new BubbleSortBenchmark().report();
-  }
-}
-
-// Q u i c k S o r t
-class QuickSort {
-  static void sort(List<int> a, int low, int high) {
-    int pivot = a[(low + high) >> 1];
-    int i = low;
-    int j = high;
-    while (i <= j) {
-      while (a[i] < pivot) i++;
-      while (pivot < a[j]) j--;
-      if (i <= j) {
-        int tmp = a[i];
-        a[i] = a[j];
-        a[j] = tmp;
-        i++;
-        j--;
-      }
-    }
-
-    if (low < j) sort(a, low, j);
-    if (i < high) sort(a, i, high);
-  }
-}
-
-class QuickSortBenchmark extends BenchmarkBase {
-  const QuickSortBenchmark() : super("QuickSort");
-
-  void warmup() {
-    SortData data = new SortData(100);
-    QuickSort.sort(data.list, 0, data.list.length - 1);
-  }
-
-  void exercise() {
-    // This value has been copied from benchpress.js, so that we can compare
-    // performance.
-    SortData data = new SortData(800);
-    QuickSort.sort(data.list, 0, data.list.length - 1);
-    data.check();
-  }
-
-  static void main() {
-    new QuickSortBenchmark().report();
-  }
-}
-
-// T r e e S o r t
-class TreeNodePress {
-  int value;
-  TreeNodePress left;
-  TreeNodePress right;
-
-  TreeNodePress(int n) : value = n {}
-
-  void insert(int n) {
-    if (n < value) {
-      if (left == null)
-        left = new TreeNodePress(n);
-      else
-        left.insert(n);
-    } else {
-      if (right == null)
-        right = new TreeNodePress(n);
-      else
-        right.insert(n);
-    }
-  }
-
-  void check() {
-    TreeNodePress left = this.left;
-    TreeNodePress right = this.right;
-    int value = this.value;
-
-    return ((left == null) || ((left.value < value) && left.check())) &&
-        ((right == null) || ((right.value >= value) && right.check()));
-  }
-}
-
-class TreeSort {
-  static void sort(List<int> a) {
-    int len = a.length;
-    TreeNodePress tree = new TreeNodePress(a[0]);
-    for (var i = 1; i < len; i++) tree.insert(a[i]);
-    if (!tree.check()) Error.error("Invalid result, tree not sorted");
-  }
-}
-
-class TreeSortBenchmark extends BenchmarkBase {
-  const TreeSortBenchmark() : super("TreeSort");
-
-  void warmup() {
-    TreeSort.sort(new SortData(100).list);
-  }
-
-  void exercise() {
-    // This value has been copied from benchpress.js, so that we can compare
-    // performance.
-    TreeSort.sort(new SortData(1000).list);
-  }
-}
-
-// T a k
-class TakBenchmark extends BenchmarkBase {
-  const TakBenchmark() : super("Tak");
-
-  static void tak(int x, int y, int z) {
-    if (y >= x) return z;
-    return tak(tak(x - 1, y, z), tak(y - 1, z, x), tak(z - 1, x, y));
-  }
-
-  void warmup() {
-    tak(9, 6, 3);
-  }
-
-  void exercise() {
-    // This value has been copied from benchpress.js, so that we can compare
-    // performance.
-    tak(18, 12, 6);
-  }
-
-  static void main() {
-    new TakBenchmark().report();
-  }
-}
-
-// T a k l
-class ListElement {
-  final int length;
-  final ListElement next;
-
-  const ListElement(int length, ListElement next)
-      : this.length = length,
-        this.next = next;
-
-  static ListElement makeList(int length) {
-    if (length == 0) return null;
-    return new ListElement(length, makeList(length - 1));
-  }
-
-  static bool isShorter(ListElement x, ListElement y) {
-    ListElement xTail = x;
-    ListElement yTail = y;
-    while (yTail != null) {
-      if (xTail == null) return true;
-      xTail = xTail.next;
-      yTail = yTail.next;
-    }
-    return false;
-  }
-}
-
-class Takl {
-  static ListElement takl(ListElement x, ListElement y, ListElement z) {
-    if (ListElement.isShorter(y, x)) {
-      return takl(takl(x.next, y, z), takl(y.next, z, x), takl(z.next, x, y));
-    } else {
-      return z;
-    }
-  }
-}
-
-class TaklBenchmark extends BenchmarkBase {
-  const TaklBenchmark() : super("Takl");
-
-  void warmup() {
-    Takl.takl(ListElement.makeList(8), ListElement.makeList(4),
-        ListElement.makeList(3));
-  }
-
-  void exercise() {
-    // This value has been copied from benchpress.js, so that we can compare
-    // performance.
-    ListElement result = Takl.takl(ListElement.makeList(15),
-        ListElement.makeList(10), ListElement.makeList(6));
-    if (result.length != 10) {
-      int len = result.length;
-      Error.error("Wrong result: $len should be: 10");
-    }
-  }
-
-  static void main() {
-    new TaklBenchmark().report();
-  }
-}
-
-// M a i n
-
-class BenchPress {
-  static void mainWithArgs(List<String> args) {
-    List<BenchmarkBase> benchmarks = [
-      new BubbleSortBenchmark(),
-      new FibBenchmark(),
-      new LoopBenchmark(),
-      new PermuteBenchmark(),
-      new QueensBenchmark(),
-      new QuickSortBenchmark(),
-      new RecurseBenchmark(),
-      new SieveBenchmark(),
-      new SumBenchmark(),
-      new TakBenchmark(),
-      new TaklBenchmark(),
-      new TowersBenchmark(),
-      new TreeSortBenchmark(),
-    ];
-    if (args.length > 0) {
-      String benchName = args[0];
-      bool foundBenchmark = false;
-      benchmarks.forEach((bench) {
-        if (bench.name == benchName) {
-          foundBenchmark = true;
-          bench.report();
-        }
-      });
-      if (!foundBenchmark) {
-        Error.error("Benchmark not found: $benchName");
-      }
-      return;
-    }
-    double logMean = 0.0;
-    benchmarks.forEach((bench) {
-      double benchScore = bench.measure();
-      String name = bench.name;
-      print("$name: $benchScore");
-      logMean += Math.log(benchScore);
-    });
-    logMean = logMean / benchmarks.length;
-    double score = Math.pow(Math.E, logMean);
-    print("BenchPress (average): $score");
-  }
-
-  // TODO(floitsch): let main accept arguments from the command line.
-  static void main() {
-    mainWithArgs([]);
-  }
-}
-
-class BenchmarkBase {
-  final String name;
-
-  // Empty constructor.
-  const BenchmarkBase(String name) : this.name = name;
-
-  // The benchmark code.
-  // This function is not used, if both [warmup] and [exercise] are overwritten.
-  void run() {}
-
-  // Runs a short version of the benchmark. By default invokes [run] once.
-  void warmup() {
-    run();
-  }
-
-  // Exercises the benchmark. By default invokes [run] 10 times.
-  void exercise() {
-    for (int i = 0; i < 10; i++) {
-      run();
-    }
-  }
-
-  // Not measured setup code executed prior to the benchmark runs.
-  void setup() {}
-
-  // Not measures teardown code executed after the benchmark runs.
-  void teardown() {}
-
-  // Measures the score for this benchmark by executing it repeately until
-  // time minimum has been reached.
-  static double measureFor(Function f, int timeMinimum) {
-    int time = 0;
-    int iter = 0;
-    DateTime start = new DateTime.now();
-    while (time < timeMinimum) {
-      f();
-      time = (new DateTime.now().difference(start)).inMilliseconds;
-      iter++;
-    }
-    // Force double result by using a double constant.
-    return (1000.0 * iter) / time;
-  }
-
-  // Measures the score for the benchmark and returns it.
-  double measure() {
-    setup();
-    // Warmup for at least 100ms. Discard result.
-    measureFor(() {
-      this.warmup();
-    }, -100);
-    // Run the benchmark for at least 2000ms.
-    double result = measureFor(() {
-      this.exercise();
-    }, -2000);
-    teardown();
-    return result;
-  }
-
-  void report() {
-    double score = measure();
-    print("name: $score");
-  }
-}
-
-class Logger {
-  static print(object) {
-    printobject(object);
-  }
-
-  static printobject(obj) {}
-}
-
-//
-// Dromaeo ObjectString
-// Adapted from Mozilla JavaScript performance test suite.
-// Microtests of strings (concatenation, methods).
-
-class ObjectString extends BenchmarkBase {
-  const ObjectString() : super("Dromaeo.ObjectString");
-
-  static void main() {
-    new ObjectString().report();
-  }
-
-  static void print(String str) {
-    print(str);
-  }
-
-  String getRandomString(int characters) {
-    var result = "";
-    for (var i = 0; i < characters; i++) {
-      result +=
-          Strings.createFromCodePoints([(25 * Math.random()).toInt() + 97]);
-    }
-    result += result;
-    result += result;
-    return result;
-  }
-
-  void run() {
-    //JS Dromeaeo uses 16384
-    final ITERATE1 = 384;
-    //JS Dromeaeo uses 80000
-    final ITERATE2 = 80;
-    //JS Dromeaeo uses 5000
-    final ITERATE3 = 50;
-    //JS Dromeaeo uses 5000
-    final ITERATE4 = 1;
-    //JS Dromaeo uses 5000
-    final ITERATE5 = 1000;
-
-    var result;
-    var text = getRandomString(ITERATE1);
-
-    ConcatStringBenchmark.test(ITERATE2);
-    ConcatStringFromCharCodeBenchmark.test(ITERATE2);
-    StringSplitBenchmark.test(text);
-    StringSplitOnCharBenchmark.test(text);
-    text += text;
-    CharAtBenchmark.test(text, ITERATE3);
-    NumberBenchmark.test(text, ITERATE3);
-    CodeUnitAtBenchmark.test(text, ITERATE3);
-    IndexOfBenchmark.test(text, ITERATE3);
-    LastIndexOfBenchmark.test(text, ITERATE3);
-    SliceBenchmark.test(text, ITERATE4);
-    SubstrBenchmark.test(text, ITERATE4);
-    SubstringBenchmark.test(text, ITERATE4);
-    ToLowerCaseBenchmark.test(text, ITERATE5);
-    ToUpperCaseBenchmark.test(text, ITERATE5);
-    ComparingBenchmark.test(text, ITERATE5);
-  }
-}
-
-class ConcatStringBenchmark {
-  ConcatStringBenchmark() {}
-
-  static String test(var iterations) {
-    var str = "";
-    for (var i = 0; i < iterations; i++) {
-      str += "a";
-    }
-    return str;
-  }
-}
-
-class ConcatStringFromCharCodeBenchmark {
-  ConcatStringFromCharCodeBenchmark() {}
-
-  static String test(var iterations) {
-    var str = "";
-    for (var i = 0; i < (iterations / 2); i++) {
-      str += Strings.createFromCodePoints([97]);
-    }
-    return str;
-  }
-}
-
-class StringSplitBenchmark {
-  StringSplitBenchmark() {}
-
-  static List<String> test(String input) {
-    return input.split("");
-  }
-}
-
-class StringSplitOnCharBenchmark {
-  StringSplitOnCharBenchmark() {}
-
-  static List<String> test(String input) {
-    String multiple = input;
-    multiple += multiple;
-    multiple += multiple;
-    multiple += multiple;
-    multiple += multiple;
-    return multiple.split("a");
-  }
-}
-
-class CharAtBenchmark {
-  CharAtBenchmark() {}
-
-  static String test(String input, var iterations) {
-    var str;
-    for (var j = 0; j < iterations; j++) {
-      str = input[0];
-      str = input[input.length - 1];
-      str = input[150]; //set it to 15000
-      str = input[120]; //set it to 12000
-    }
-    return str;
-  }
-}
-
-class NumberBenchmark {
-  NumberBenchmark() {}
-
-  static String test(String input, var iterations) {
-    var str;
-    for (var j = 0; j < iterations; j++) {
-      str = input[0];
-      str = input[input.length - 1];
-      str = input[150]; //set it to 15000
-      str = input[100]; //set it to 10000
-      str = input[50]; //set it to 5000
-    }
-    return str;
-  }
-}
-
-class CodeUnitAtBenchmark {
-  CodeUnitAtBenchmark() {}
-
-  static String test(String input, var iterations) {
-    var str;
-    for (var j = 0; j < iterations; j++) {
-      str = input.codeUnitAt(0);
-      str = input.codeUnitAt(input.length - 1);
-      str = input.codeUnitAt(150); //set it to 15000
-      str = input.codeUnitAt(100); //set it to 10000
-      str = input.codeUnitAt(50); //set it to 5000
-    }
-    return str;
-  }
-}
-
-class IndexOfBenchmark {
-  IndexOfBenchmark() {}
-
-  static String test(String input, var iterations) {
-    var str;
-    for (var j = 0; j < iterations; j++) {
-      str = input.indexOf("a", 0);
-      str = input.indexOf("b", 0);
-      str = input.indexOf("c", 0);
-      str = input.indexOf("d", 0);
-    }
-    return str;
-  }
-}
-
-class LastIndexOfBenchmark {
-  LastIndexOfBenchmark() {}
-
-  static String test(String input, var iterations) {
-    var str;
-    for (var j = 0; j < iterations; j++) {
-      str = input.lastIndexOf("a", input.length - 1);
-      str = input.lastIndexOf("b", input.length - 1);
-      str = input.lastIndexOf("c", input.length - 1);
-      str = input.lastIndexOf("d", input.length - 1);
-    }
-    return str;
-  }
-}
-
-class SliceBenchmark {
-  SliceBenchmark() {}
-
-  static String test(String input, var iterations) {
-    var str;
-    for (var j = 0; j < iterations; j++) {
-      str = input.substring(0, input.length - 1);
-      str = input.substring(0, 5);
-      str = input.substring(input.length - 1, input.length - 1);
-      str = input.substring(input.length - 6, input.length - 1);
-      str = input.substring(150, 155); //set to 15000 and 15005
-      str = input.substring(120, input.length - 1); //set to 12000
-    }
-    return str;
-  }
-}
-
-class SubstrBenchmark {
-  SubstrBenchmark() {}
-
-  static String test(String input, var iterations) {
-    var str;
-    for (var j = 0; j < iterations; j++) {
-      str = input.substring(0, input.length - 1);
-      str = input.substring(0, 4);
-      str = input.substring(input.length - 1, input.length - 1);
-      str = input.substring(input.length - 6, input.length - 6);
-      str = input.substring(150, 154); //set to 15000 and 15005
-      str = input.substring(120, 124); //set to 12000
-    }
-    return str;
-  }
-}
-
-class SubstringBenchmark {
-  SubstringBenchmark() {}
-
-  static String test(String input, var iterations) {
-    var str;
-    for (var j = 0; j < iterations; j++) {
-      str = input.substring(0, input.length - 1);
-      str = input.substring(0, 4);
-      str = input.substring(input.length - 1, input.length - 1);
-      str = input.substring(input.length - 6, input.length - 2);
-      str = input.substring(150, 154); //set to 15000 and 15005
-      str = input.substring(120, input.length - 2); //set to 12000
-    }
-    return str;
-  }
-}
-
-class ToLowerCaseBenchmark {
-  ToLowerCaseBenchmark() {}
-
-  static String test(String input, var iterations) {
-    var str;
-    for (var j = 0; j < (iterations / 1000); j++) {
-      str = Ascii.toLowerCase(input);
-    }
-    return str;
-  }
-}
-
-class ToUpperCaseBenchmark {
-  ToUpperCaseBenchmark() {}
-
-  static String test(String input, var iterations) {
-    var str;
-    for (var j = 0; j < (iterations / 1000); j++) {
-      str = Ascii.toUpperCase(input);
-    }
-    return str;
-  }
-}
-
-class ComparingBenchmark {
-  ComparingBenchmark() {}
-
-  static bool test(String input, var iterations) {
-    var tmp = "a${input}a";
-    var tmp2 = "a${input}a";
-    var res;
-    for (var j = 0; j < (iterations / 1000); j++) {
-      res = (tmp.compareTo(tmp2) == 0);
-      res = (tmp.compareTo(tmp2) < 0);
-      res = (tmp.compareTo(tmp2) > 0);
-    }
-    return res;
-  }
-}
-
-// Benchmarks basic message communication between two isolates.
-
-class Benchmark1 {
-  static const MESSAGES = 10000;
-  static const INIT_MESSAGE = 0;
-  static const TERMINATION_MESSAGE = -1;
-  static const WARMUP_TIME = 1000;
-  static const RUN_TIME = 1000;
-  static const RUNS = 5;
-
-  static int run() {
-    return _run;
-  }
-
-  static void add_result(var opsms) {
-    _run++;
-    _opsms += opsms;
-  }
-
-  static void get_result() {
-    return _opsms / _run;
-  }
-
-  static void init() {
-    _run = 0;
-    _opsms = 0.0;
-  }
-
-  static void main() {
-    init();
-    PingPongGame pingPongGame = new PingPongGame();
-  }
-
-  static var _run;
-  static var _opsms;
-}
-
-class PingPongGame {
-  PingPongGame()
-      : _ping = new ReceivePort(),
-        _pingPort = _ping.toSendPort(),
-        _pong = null,
-        _warmedup = false,
-        _iterations = 0 {
-    SendPort _pong = spawnFunction(pong);
-    play();
-  }
-
-  void startRound() {
-    _iterations++;
-    _pong.send(Benchmark1.INIT_MESSAGE, _pingPort);
-  }
-
-  void evaluateRound() {
-    int time = (new DateTime.now().difference(_start)).inMilliseconds;
-    if (!_warmedup && time < Benchmark1.WARMUP_TIME) {
-      startRound();
-    } else if (!_warmedup) {
-      _warmedup = true;
-      _start = new DateTime.now();
-      _iterations = 0;
-      startRound();
-    } else if (_warmedup && time < Benchmark1.RUN_TIME) {
-      startRound();
-    } else {
-      shutdown();
-      Benchmark1.add_result((1.0 * _iterations * Benchmark1.MESSAGES) / time);
-      if (Benchmark1.run() < Benchmark1.RUNS) {
-        new PingPongGame();
-      } else {
-        print("PingPong: ", Benchmark1.get_result());
-      }
-    }
-  }
-
-  void play() {
-    _ping.receive((int message, SendPort replyTo) {
-      if (message < Benchmark1.MESSAGES) {
-        _pong.send(++message, null);
-      } else {
-        evaluateRound();
-      }
-    });
-    _start = new DateTime.now();
-    startRound();
-  }
-
-  void shutdown() {
-    _pong.send(Benchmark1.TERMINATION_MESSAGE, null);
-    _ping.close();
-  }
-
-  DateTime _start;
-  SendPort _pong;
-  SendPort _pingPort;
-  ReceivePort _ping;
-  bool _warmedup;
-  int _iterations;
-}
-
-void pong() {
-  port.receive((message, SendPort replyTo) {
-    if (message == Benchmark1.INIT_MESSAGE) {
-      replyTo.send(message, null);
-    } else if (message == Benchmark1.TERMINATION_MESSAGE) {
-      port.close();
-    } else {
-      replyTo.send(message, null);
-    }
-  });
-}
-
-class ManyGenericInstanceofTest {
-  static testMain() {
-    for (int i = 0; i < 5000; i++) {
-      GenericInstanceof.testMain();
-    }
-  }
-}
-
-// ---------------------------------------------------------------------------
-// THE REST OF THIS FILE COULD BE AUTOGENERATED
-// ---------------------------------------------------------------------------
-
-// ---------------------------------------------------------------------------
-// tests/isolate/spawn_test.dart
-// ---------------------------------------------------------------------------
-
-spawn_test_main() {
-  test("spawn a new isolate", () {
-    SendPort port = spawnFunction(entry);
-    port.call(42).then(expectAsync1((message) {
-      Expect.equals(42, message);
-    }));
-  });
-}
-
-void entry() {
-  port.receive((message, SendPort replyTo) {
-    Expect.equals(42, message);
-    replyTo.send(42, null);
-    port.close();
-  });
-}
-
-// ---------------------------------------------------------------------------
-// tests/isolate/isolate_negative_test.dart
-// ---------------------------------------------------------------------------
-
-void isolate_negative_entry() {
-  port.receive((ignored, replyTo) {
-    replyTo.send("foo", null);
-  });
-}
-
-isolate_negative_test_main() {
-  test("ensure isolate code is executed", () {
-    SendPort port = spawnFunction(isolate_negative_entry);
-    port.call("foo").then(expectAsync1((message) {
-      Expect.equals(true, "Expected fail"); // <=-------- Should fail here.
-    }));
-  });
-}
-
-// ---------------------------------------------------------------------------
-// tests/isolate/message_test.dart
-// ---------------------------------------------------------------------------
-
-// ---------------------------------------------------------------------------
-// Message passing test.
-// ---------------------------------------------------------------------------
-
-class MessageTest {
-  static const List list1 = const ["Hello", "World", "Hello", 0xfffffffffff];
-  static const List list2 = const [null, list1, list1, list1, list1];
-  static const List list3 = const [list2, 2.0, true, false, 0xfffffffffff];
-  static const Map map1 = const {
-    "a=1": 1,
-    "b=2": 2,
-    "c=3": 3,
-  };
-  static const Map map2 = const {
-    "list1": list1,
-    "list2": list2,
-    "list3": list3,
-  };
-  static const List list4 = const [map1, map2];
-  static const List elms = const [
-    list1,
-    list2,
-    list3,
-    list4,
-  ];
-
-  static void VerifyMap(Map expected, Map actual) {
-    Expect.equals(true, expected is Map);
-    Expect.equals(true, actual is Map);
-    Expect.equals(expected.length, actual.length);
-    testForEachMap(key, value) {
-      if (value is List) {
-        VerifyList(value, actual[key]);
-      } else {
-        Expect.equals(value, actual[key]);
-      }
-    }
-
-    expected.forEach(testForEachMap);
-  }
-
-  static void VerifyList(List expected, List actual) {
-    for (int i = 0; i < expected.length; i++) {
-      if (expected[i] is List) {
-        VerifyList(expected[i], actual[i]);
-      } else if (expected[i] is Map) {
-        VerifyMap(expected[i], actual[i]);
-      } else {
-        Expect.equals(expected[i], actual[i]);
-      }
-    }
-  }
-
-  static void VerifyObject(int index, var actual) {
-    var expected = elms[index];
-    Expect.equals(true, expected is List);
-    Expect.equals(true, actual is List);
-    Expect.equals(expected.length, actual.length);
-    VerifyList(expected, actual);
-  }
-}
-
-pingPong() {
-  int count = 0;
-  port.receive((var message, SendPort replyTo) {
-    if (message == -1) {
-      port.close();
-      replyTo.send(count, null);
-    } else {
-      // Check if the received object is correct.
-      if (count < MessageTest.elms.length) {
-        MessageTest.VerifyObject(count, message);
-      }
-      // Bounce the received object back so that the sender
-      // can make sure that the object matches.
-      replyTo.send(message, null);
-      count++;
-    }
-  });
-}
-
-message_test_main() {
-  test("send objects and receive them back", () {
-    SendPort remote = spawnFunction(pingPong);
-    // Send objects and receive them back.
-    for (int i = 0; i < MessageTest.elms.length; i++) {
-      var sentObject = MessageTest.elms[i];
-      remote.call(sentObject).then(expectAsync1((var receivedObject) {
-        MessageTest.VerifyObject(i, receivedObject);
-      }));
-    }
-
-    // Send recursive objects and receive them back.
-    List local_list1 = ["Hello", "World", "Hello", 0xffffffffff];
-    List local_list2 = [null, local_list1, local_list1];
-    List local_list3 = [local_list2, 2.0, true, false, 0xffffffffff];
-    List sendObject = new List(5);
-    sendObject[0] = local_list1;
-    sendObject[1] = sendObject;
-    sendObject[2] = local_list2;
-    sendObject[3] = sendObject;
-    sendObject[4] = local_list3;
-    remote.call(sendObject).then((var replyObject) {
-      Expect.equals(true, sendObject is List);
-      Expect.equals(true, replyObject is List);
-      Expect.equals(sendObject.length, replyObject.length);
-      Expect.equals(true, identical(replyObject[1], replyObject));
-      Expect.equals(true, identical(replyObject[3], replyObject));
-      Expect.equals(true, identical(replyObject[0], replyObject[2][1]));
-      Expect.equals(true, identical(replyObject[0], replyObject[2][2]));
-      Expect.equals(true, identical(replyObject[2], replyObject[4][0]));
-      Expect.equals(true, identical(replyObject[0][0], replyObject[0][2]));
-      // TODO(alexmarkov): Revise this comment.
-      // Bigint literals are not canonicalized so do a == check.
-      Expect.equals(true, replyObject[0][3] == replyObject[4][4]);
-    });
-
-    // Shutdown the MessageServer.
-    remote.call(-1).then(expectAsync1((int message) {
-      Expect.equals(MessageTest.elms.length + 1, message);
-    }));
-  });
-}
-
-// ---------------------------------------------------------------------------
-// tests/isolate/request_reply_test.dart
-// ---------------------------------------------------------------------------
-
-void request_reply_entry() {
-  port.receive((message, SendPort replyTo) {
-    replyTo.send(message + 87);
-    port.close();
-  });
-}
-
-void request_reply_main() {
-  test("call", () {
-    SendPort port = spawnFunction(request_reply_entry);
-    port.call(42).then(expectAsync1((message) {
-      Expect.equals(42 + 87, message);
-    }));
-  });
-
-  test("send", () {
-    SendPort port = spawnFunction(request_reply_entry);
-    ReceivePort reply = new ReceivePort();
-    port.send(99, reply.toSendPort());
-    reply.receive(expectAsync2((message, replyTo) {
-      Expect.equals(99 + 87, message);
-      reply.close();
-    }));
-  });
-}
-
-// ---------------------------------------------------------------------------
-// tests/isolate/count_test.dart
-// ---------------------------------------------------------------------------
-
-void countMessages() {
-  int count = 0;
-  port.receive((int message, SendPort replyTo) {
-    if (message == -1) {
-      Expect.equals(10, count);
-      replyTo.send(-1, null);
-      port.close();
-      return;
-    }
-    Expect.equals(count, message);
-    count++;
-    replyTo.send(message * 2, null);
-  });
-}
-
-void count_main() {
-  test("count 10 consecutive messages", () {
-    int count = 0;
-    SendPort remote = spawnFunction(countMessages);
-    ReceivePort local = new ReceivePort();
-    SendPort reply = local.toSendPort();
-
-    local.receive(expectAsync2((int message, SendPort replyTo) {
-      if (message == -1) {
-        Expect.equals(11, count);
-        local.close();
-        return;
-      }
-
-      Expect.equals((count - 1) * 2, message);
-      remote.send(count++, reply);
-      if (count == 10) {
-        remote.send(-1, reply);
-      }
-    }, 11));
-    remote.send(count++, reply);
-  });
-}
-
-// ---------------------------------------------------------------------------
-// tests/isolate/mandel_isolate_test.dart
-// ---------------------------------------------------------------------------
-
-const TERMINATION_MESSAGE = -1;
-const N = 100;
-const ISOLATES = 20;
-
-mandel_main() {
-  test("Render Mandelbrot in parallel", () {
-    final state = new MandelbrotState();
-    state._validated.future.then(expectAsync1((result) {
-      expect(result, isTrue);
-    }));
-    for (int i = 0; i < Math.min(ISOLATES, N); i++) state.startClient(i);
-  });
-}
-
-class MandelbrotState {
-  MandelbrotState() {
-    _result = new List<List<int>>(N);
-    _lineProcessedBy = new List<LineProcessorClient>(N);
-    _sent = 0;
-    _missing = N;
-    _validated = new Completer<bool>();
-  }
-
-  void startClient(int id) {
-    assert(_sent < N);
-    final client = new LineProcessorClient(this, id);
-    client.processLine(_sent++);
-  }
-
-  void notifyProcessedLine(LineProcessorClient client, int y, List<int> line) {
-    assert(_result[y] == null);
-    _result[y] = line;
-    _lineProcessedBy[y] = client;
-
-    if (_sent != N) {
-      client.processLine(_sent++);
-    } else {
-      client.shutdown();
-    }
-
-    // If all lines have been computed, validate the result.
-    if (--_missing == 0) {
-      _printResult();
-      _validateResult();
-    }
-  }
-
-  void _validateResult() {
-    // TODO(ngeoffray): Implement this.
-    _validated.complete(true);
-  }
-
-  void _printResult() {
-    var output = new StringBuffer();
-    for (int i = 0; i < _result.length; i++) {
-      List<int> line = _result[i];
-      for (int j = 0; j < line.length; j++) {
-        if (line[j] < 10) output.write("0");
-        output.write(line[j]);
-      }
-      output.write("\n");
-    }
-    // print(output);
-  }
-
-  List<List<int>> _result;
-  List<LineProcessorClient> _lineProcessedBy;
-  int _sent;
-  int _missing;
-  Completer<bool> _validated;
-}
-
-class LineProcessorClient {
-  LineProcessorClient(MandelbrotState this._state, int this._id) {
-    _port = spawnFunction(processLines);
-  }
-
-  void processLine(int y) {
-    _port.call(y).then((List<int> message) {
-      _state.notifyProcessedLine(this, y, message);
-    });
-  }
-
-  void shutdown() {
-    _port.send(TERMINATION_MESSAGE, null);
-  }
-
-  MandelbrotState _state;
-  int _id;
-  SendPort _port;
-}
-
-List<int> processLine(int y) {
-  double inverseN = 2.0 / N;
-  double Civ = y * inverseN - 1.0;
-  List<int> result = new List<int>(N);
-  for (int x = 0; x < N; x++) {
-    double Crv = x * inverseN - 1.5;
-
-    double Zrv = Crv;
-    double Ziv = Civ;
-
-    double Trv = Crv * Crv;
-    double Tiv = Civ * Civ;
-
-    int i = 49;
-    do {
-      Ziv = (Zrv * Ziv) + (Zrv * Ziv) + Civ;
-      Zrv = Trv - Tiv + Crv;
-
-      Trv = Zrv * Zrv;
-      Tiv = Ziv * Ziv;
-    } while (((Trv + Tiv) <= 4.0) && (--i > 0));
-
-    result[x] = i;
-  }
-  return result;
-}
-
-void processLines() {
-  port.receive((message, SendPort replyTo) {
-    if (message == TERMINATION_MESSAGE) {
-      assert(replyTo == null);
-      port.close();
-    } else {
-      replyTo.send(processLine(message), null);
-    }
-  });
-}
diff --git a/runtime/vm/snapshot_test_in.dat b/runtime/vm/snapshot_test_in.dat
deleted file mode 100644
index 43cfc18..0000000
--- a/runtime/vm/snapshot_test_in.dat
+++ /dev/null
@@ -1 +0,0 @@
-{{DART_SOURCE}}
diff --git a/runtime/vm/source_report.cc b/runtime/vm/source_report.cc
index a1e3da2..6cf4754 100644
--- a/runtime/vm/source_report.cc
+++ b/runtime/vm/source_report.cc
@@ -93,6 +93,7 @@
     case RawFunction::kClosureFunction:
     case RawFunction::kImplicitClosureFunction:
     case RawFunction::kImplicitStaticFinalGetter:
+    case RawFunction::kStaticFieldInitializer:
     case RawFunction::kGetterFunction:
     case RawFunction::kSetterFunction:
     case RawFunction::kConstructor:
@@ -491,18 +492,11 @@
 }
 
 void SourceReport::VisitField(JSONArray* jsarr, const Field& field) {
-  if (ShouldSkipField(field) || !field.has_initializer()) return;
-  const Function& func =
-      Function::Handle(zone(), GetInitializerFunction(field));
+  if (ShouldSkipField(field) || !field.HasInitializerFunction()) return;
+  const Function& func = Function::Handle(field.InitializerFunction());
   VisitFunction(jsarr, func);
 }
 
-RawFunction* SourceReport::GetInitializerFunction(const Field& field) {
-  Thread* const thread = Thread::Current();
-  // Create a function to evaluate the initializer
-  return kernel::CreateFieldInitializerFunction(thread, thread->zone(), field);
-}
-
 void SourceReport::VisitLibrary(JSONArray* jsarr, const Library& lib) {
   Class& cls = Class::Handle(zone());
   Array& functions = Array::Handle(zone());
diff --git a/runtime/vm/source_report.h b/runtime/vm/source_report.h
index 73a9c3d..0a3ddb1 100644
--- a/runtime/vm/source_report.h
+++ b/runtime/vm/source_report.h
@@ -86,7 +86,6 @@
   void VisitField(JSONArray* jsarr, const Field& field);
   void VisitLibrary(JSONArray* jsarr, const Library& lib);
   void VisitClosures(JSONArray* jsarr);
-  RawFunction* GetInitializerFunction(const Field& field);
   // An entry in the script table.
   struct ScriptTableEntry {
     ScriptTableEntry() : key(NULL), index(-1), script(NULL) {}
diff --git a/runtime/vm/source_report_test.cc b/runtime/vm/source_report_test.cc
index 5e37a9b..9b0070d 100644
--- a/runtime/vm/source_report_test.cc
+++ b/runtime/vm/source_report_test.cc
@@ -10,11 +10,15 @@
 
 #ifndef PRODUCT
 
-static RawObject* ExecuteScript(const char* script) {
+static RawObject* ExecuteScript(const char* script, bool allow_errors = false) {
   Dart_Handle lib;
   {
     TransitionVMToNative transition(Thread::Current());
-    lib = TestCase::LoadTestScript(script, NULL);
+    if (allow_errors) {
+      lib = TestCase::LoadTestScriptWithErrors(script, NULL);
+    } else {
+      lib = TestCase::LoadTestScript(script, NULL);
+    }
     EXPECT_VALID(lib);
     Dart_Handle result = Dart_Invoke(lib, NewString("main"), 0, NULL);
     EXPECT_VALID(result);
@@ -33,7 +37,6 @@
   ASSERT(!lib.IsNull());
   const Script& script =
       Script::Handle(lib.LookupScript(String::Handle(String::New("test-lib"))));
-
   SourceReport report(SourceReport::kCoverage);
   JSONStream js;
   report.PrintJSON(&js, script);
@@ -42,12 +45,12 @@
       "{\"type\":\"SourceReport\",\"ranges\":"
 
       // One compiled range, one hit at function declaration.
-      "[{\"scriptIndex\":0,\"startPos\":0,\"endPos\":5,\"compiled\":true,"
+      "[{\"scriptIndex\":0,\"startPos\":0,\"endPos\":9,\"compiled\":true,"
       "\"coverage\":{\"hits\":[0],\"misses\":[]}}],"
 
       // One script in the script table.
       "\"scripts\":[{\"type\":\"@Script\",\"fixedId\":true,\"id\":\"\","
-      "\"uri\":\"test-lib\",\"_kind\":\"script\"}]}",
+      "\"uri\":\"file:\\/\\/\\/test-lib\",\"_kind\":\"kernel\"}]}",
       buffer);
 }
 
@@ -79,19 +82,19 @@
       "{\"type\":\"SourceReport\",\"ranges\":["
 
       // One range compiled with one hit at function declaration (helper0).
-      "{\"scriptIndex\":0,\"startPos\":0,\"endPos\":4,\"compiled\":true,"
+      "{\"scriptIndex\":0,\"startPos\":0,\"endPos\":11,\"compiled\":true,"
       "\"coverage\":{\"hits\":[0],\"misses\":[]}},"
 
       // One range not compiled (helper1).
-      "{\"scriptIndex\":0,\"startPos\":6,\"endPos\":10,\"compiled\":false},"
+      "{\"scriptIndex\":0,\"startPos\":13,\"endPos\":24,\"compiled\":false},"
 
       // One range with two hits and a miss (main).
-      "{\"scriptIndex\":0,\"startPos\":12,\"endPos\":39,\"compiled\":true,"
-      "\"coverage\":{\"hits\":[12,23],\"misses\":[32]}}],"
+      "{\"scriptIndex\":0,\"startPos\":26,\"endPos\":94,\"compiled\":true,"
+      "\"coverage\":{\"hits\":[26,53],\"misses\":[79]}}],"
 
       // Only one script in the script table.
       "\"scripts\":[{\"type\":\"@Script\",\"fixedId\":true,\"id\":\"\","
-      "\"uri\":\"test-lib\",\"_kind\":\"script\"}]}",
+      "\"uri\":\"file:\\/\\/\\/test-lib\",\"_kind\":\"kernel\"}]}",
       buffer);
 }
 
@@ -119,24 +122,25 @@
   report.PrintJSON(&js, script);
   ElideJSONSubstring("classes", js.ToCString(), buffer);
   ElideJSONSubstring("libraries", buffer, buffer);
+
   EXPECT_STREQ(
       "{\"type\":\"SourceReport\",\"ranges\":["
 
       // One range compiled with one hit at function declaration (helper0).
-      "{\"scriptIndex\":0,\"startPos\":0,\"endPos\":4,\"compiled\":true,"
+      "{\"scriptIndex\":0,\"startPos\":0,\"endPos\":11,\"compiled\":true,"
       "\"coverage\":{\"hits\":[0],\"misses\":[]}},"
 
       // This range is compiled even though it wasn't called (helper1).
-      "{\"scriptIndex\":0,\"startPos\":6,\"endPos\":10,\"compiled\":true,"
-      "\"coverage\":{\"hits\":[],\"misses\":[6]}},"
+      "{\"scriptIndex\":0,\"startPos\":13,\"endPos\":24,\"compiled\":true,"
+      "\"coverage\":{\"hits\":[],\"misses\":[13]}},"
 
       // One range with two hits and a miss (main).
-      "{\"scriptIndex\":0,\"startPos\":12,\"endPos\":39,\"compiled\":true,"
-      "\"coverage\":{\"hits\":[12,23],\"misses\":[32]}}],"
+      "{\"scriptIndex\":0,\"startPos\":26,\"endPos\":94,\"compiled\":true,"
+      "\"coverage\":{\"hits\":[26,53],\"misses\":[79]}}],"
 
       // Only one script in the script table.
       "\"scripts\":[{\"type\":\"@Script\",\"fixedId\":true,\"id\":\"\","
-      "\"uri\":\"test-lib\",\"_kind\":\"script\"}]}",
+      "\"uri\":\"file:\\/\\/\\/test-lib\",\"_kind\":\"kernel\"}]}",
       buffer);
 }
 
@@ -166,19 +170,19 @@
       "{\"type\":\"SourceReport\",\"ranges\":["
 
       // UnusedClass is not compiled.
-      "{\"scriptIndex\":0,\"startPos\":6,\"endPos\":20,\"compiled\":false},"
+      "{\"scriptIndex\":0,\"startPos\":13,\"endPos\":55,\"compiled\":false},"
 
       // helper0 is compiled.
-      "{\"scriptIndex\":0,\"startPos\":0,\"endPos\":4,\"compiled\":true,"
+      "{\"scriptIndex\":0,\"startPos\":0,\"endPos\":11,\"compiled\":true,"
       "\"coverage\":{\"hits\":[0],\"misses\":[]}},"
 
       // One range with two hits (main).
-      "{\"scriptIndex\":0,\"startPos\":22,\"endPos\":32,\"compiled\":true,"
-      "\"coverage\":{\"hits\":[22,27],\"misses\":[]}}],"
+      "{\"scriptIndex\":0,\"startPos\":57,\"endPos\":79,\"compiled\":true,"
+      "\"coverage\":{\"hits\":[57,68],\"misses\":[]}}],"
 
       // Only one script in the script table.
       "\"scripts\":[{\"type\":\"@Script\",\"fixedId\":true,\"id\":\"\","
-      "\"uri\":\"test-lib\",\"_kind\":\"script\"}]}",
+      "\"uri\":\"file:\\/\\/\\/test-lib\",\"_kind\":\"kernel\"}]}",
       buffer);
 }
 
@@ -208,20 +212,20 @@
       "{\"type\":\"SourceReport\",\"ranges\":["
 
       // UnusedClass.helper1 is compiled.
-      "{\"scriptIndex\":0,\"startPos\":10,\"endPos\":18,\"compiled\":true,"
-      "\"coverage\":{\"hits\":[],\"misses\":[10,14]}},"
+      "{\"scriptIndex\":0,\"startPos\":30,\"endPos\":53,\"compiled\":true,"
+      "\"coverage\":{\"hits\":[],\"misses\":[30,42]}},"
 
       // helper0 is compiled.
-      "{\"scriptIndex\":0,\"startPos\":0,\"endPos\":4,\"compiled\":true,"
+      "{\"scriptIndex\":0,\"startPos\":0,\"endPos\":11,\"compiled\":true,"
       "\"coverage\":{\"hits\":[0],\"misses\":[]}},"
 
       // One range with two hits (main).
-      "{\"scriptIndex\":0,\"startPos\":22,\"endPos\":32,\"compiled\":true,"
-      "\"coverage\":{\"hits\":[22,27],\"misses\":[]}}],"
+      "{\"scriptIndex\":0,\"startPos\":57,\"endPos\":79,\"compiled\":true,"
+      "\"coverage\":{\"hits\":[57,68],\"misses\":[]}}],"
 
       // Only one script in the script table.
       "\"scripts\":[{\"type\":\"@Script\",\"fixedId\":true,\"id\":\"\","
-      "\"uri\":\"test-lib\",\"_kind\":\"script\"}]}",
+      "\"uri\":\"file:\\/\\/\\/test-lib\",\"_kind\":\"kernel\"}]}",
       buffer);
 }
 
@@ -237,7 +241,7 @@
       "}";
 
   Library& lib = Library::Handle();
-  lib ^= ExecuteScript(kScript);
+  lib ^= ExecuteScript(kScript, true);
   ASSERT(!lib.IsNull());
   const Script& script =
       Script::Handle(lib.LookupScript(String::Handle(String::New("test-lib"))));
@@ -251,23 +255,25 @@
       "{\"type\":\"SourceReport\",\"ranges\":["
 
       // UnusedClass has a syntax error.
-      "{\"scriptIndex\":0,\"startPos\":10,\"endPos\":18,\"compiled\":false,"
+      "{\"scriptIndex\":0,\"startPos\":30,\"endPos\":53,\"compiled\":false,"
       "\"error\":{\"type\":\"@Error\",\"_vmType\":\"LanguageError\","
       "\"kind\":\"LanguageError\",\"id\":\"objects\\/0\","
-      "\"message\":\"'test-lib': error: line 3 pos 26: unexpected token '}'\\n"
-      "  helper1() { helper0()+ }\\n                         ^\\n\"}},"
+      "\"message\":\"'file:\\/\\/\\/test-lib': error: "
+      "file:\\/\\/\\/test-lib:3:26: "
+      "Error: This couldn't be parsed.\\n"
+      "  helper1() { helper0()+ }\\n                         ^\"}},"
 
       // helper0 is compiled.
-      "{\"scriptIndex\":0,\"startPos\":0,\"endPos\":4,\"compiled\":true,"
+      "{\"scriptIndex\":0,\"startPos\":0,\"endPos\":11,\"compiled\":true,"
       "\"coverage\":{\"hits\":[0],\"misses\":[]}},"
 
       // One range with two hits (main).
-      "{\"scriptIndex\":0,\"startPos\":22,\"endPos\":32,\"compiled\":true,"
-      "\"coverage\":{\"hits\":[22,27],\"misses\":[]}}],"
+      "{\"scriptIndex\":0,\"startPos\":57,\"endPos\":79,\"compiled\":true,"
+      "\"coverage\":{\"hits\":[57,68],\"misses\":[]}}],"
 
       // Only one script in the script table.
       "\"scripts\":[{\"type\":\"@Script\",\"fixedId\":true,\"id\":\"\","
-      "\"uri\":\"test-lib\",\"_kind\":\"script\"}]}",
+      "\"uri\":\"file:\\/\\/\\/test-lib\",\"_kind\":\"kernel\"}]}",
       buffer);
 }
 
@@ -299,30 +305,31 @@
   report.PrintJSON(&js, script);
   ElideJSONSubstring("classes", js.ToCString(), buffer);
   ElideJSONSubstring("libraries", buffer, buffer);
+
   EXPECT_STREQ(
       "{\"type\":\"SourceReport\",\"ranges\":["
 
       // One range compiled with one hit (helper0).
-      "{\"scriptIndex\":0,\"startPos\":0,\"endPos\":22,\"compiled\":true,"
-      "\"coverage\":{\"hits\":[0,18],\"misses\":[]}},"
+      "{\"scriptIndex\":0,\"startPos\":0,\"endPos\":73,\"compiled\":true,"
+      "\"coverage\":{\"hits\":[0,69],\"misses\":[]}},"
 
       // One range not compiled (helper1).
-      "{\"scriptIndex\":0,\"startPos\":24,\"endPos\":28,\"compiled\":false},"
+      "{\"scriptIndex\":0,\"startPos\":75,\"endPos\":86,\"compiled\":false},"
 
       // One range with two hits and a miss (main).
-      "{\"scriptIndex\":0,\"startPos\":30,\"endPos\":57,\"compiled\":true,"
-      "\"coverage\":{\"hits\":[30,41],\"misses\":[50]}},"
+      "{\"scriptIndex\":0,\"startPos\":88,\"endPos\":156,\"compiled\":true,"
+      "\"coverage\":{\"hits\":[88,115],\"misses\":[141]}},"
 
       // Nested range compiled (nestedHelper0).
-      "{\"scriptIndex\":0,\"startPos\":5,\"endPos\":9,\"compiled\":true,"
-      "\"coverage\":{\"hits\":[5],\"misses\":[]}},"
+      "{\"scriptIndex\":0,\"startPos\":14,\"endPos\":31,\"compiled\":true,"
+      "\"coverage\":{\"hits\":[14],\"misses\":[]}},"
 
       // Nested range not compiled (nestedHelper1).
-      "{\"scriptIndex\":0,\"startPos\":11,\"endPos\":15,\"compiled\":false}],"
+      "{\"scriptIndex\":0,\"startPos\":35,\"endPos\":52,\"compiled\":false}],"
 
       // Only one script in the script table.
       "\"scripts\":[{\"type\":\"@Script\",\"fixedId\":true,\"id\":\"\","
-      "\"uri\":\"test-lib\",\"_kind\":\"script\"}]}",
+      "\"uri\":\"file:\\/\\/\\/test-lib\",\"_kind\":\"kernel\"}]}",
       buffer);
 }
 
@@ -357,23 +364,24 @@
   report.PrintJSON(&js, script, helper.token_pos(), helper.end_token_pos());
   ElideJSONSubstring("classes", js.ToCString(), buffer);
   ElideJSONSubstring("libraries", buffer, buffer);
+
   EXPECT_STREQ(
       "{\"type\":\"SourceReport\",\"ranges\":["
 
       // One range compiled with one hit (helper0).
-      "{\"scriptIndex\":0,\"startPos\":0,\"endPos\":22,\"compiled\":true,"
-      "\"coverage\":{\"hits\":[0,18],\"misses\":[]}},"
+      "{\"scriptIndex\":0,\"startPos\":0,\"endPos\":73,\"compiled\":true,"
+      "\"coverage\":{\"hits\":[0,69],\"misses\":[]}},"
 
       // Nested range compiled (nestedHelper0).
-      "{\"scriptIndex\":0,\"startPos\":5,\"endPos\":9,\"compiled\":true,"
-      "\"coverage\":{\"hits\":[5],\"misses\":[]}},"
+      "{\"scriptIndex\":0,\"startPos\":14,\"endPos\":31,\"compiled\":true,"
+      "\"coverage\":{\"hits\":[14],\"misses\":[]}},"
 
       // Nested range not compiled (nestedHelper1).
-      "{\"scriptIndex\":0,\"startPos\":11,\"endPos\":15,\"compiled\":false}],"
+      "{\"scriptIndex\":0,\"startPos\":35,\"endPos\":52,\"compiled\":false}],"
 
       // Only one script in the script table.
       "\"scripts\":[{\"type\":\"@Script\",\"fixedId\":true,\"id\":\"\","
-      "\"uri\":\"test-lib\",\"_kind\":\"script\"}]}",
+      "\"uri\":\"file:\\/\\/\\/test-lib\",\"_kind\":\"kernel\"}]}",
       buffer);
 }
 
@@ -406,8 +414,8 @@
 
   // Make sure that the main function was found.
   EXPECT_SUBSTRING(
-      "\"startPos\":12,\"endPos\":39,\"compiled\":true,"
-      "\"coverage\":{\"hits\":[12,23],\"misses\":[32]}",
+      "\"startPos\":26,\"endPos\":94,\"compiled\":true,"
+      "\"coverage\":{\"hits\":[26,53],\"misses\":[79]}",
       result);
 
   // More than one script is referenced in the report.
@@ -445,8 +453,8 @@
 
   // Make sure that the main function was found.
   EXPECT_SUBSTRING(
-      "\"startPos\":12,\"endPos\":39,\"compiled\":true,"
-      "\"coverage\":{\"hits\":[12,23],\"misses\":[32]}",
+      "\"startPos\":26,\"endPos\":94,\"compiled\":true,"
+      "\"coverage\":{\"hits\":[26,53],\"misses\":[79]}",
       result);
 
   // More than one script is referenced in the report.
@@ -479,25 +487,25 @@
       "{\"type\":\"SourceReport\",\"ranges\":["
 
       // One range compiled with no callsites (helper0).
-      "{\"scriptIndex\":0,\"startPos\":0,\"endPos\":4,\"compiled\":true,"
+      "{\"scriptIndex\":0,\"startPos\":0,\"endPos\":11,\"compiled\":true,"
       "\"callSites\":[]},"
 
       // One range not compiled (helper1).
-      "{\"scriptIndex\":0,\"startPos\":6,\"endPos\":10,\"compiled\":false},"
+      "{\"scriptIndex\":0,\"startPos\":13,\"endPos\":24,\"compiled\":false},"
 
       // One range compiled with one callsite (main).
-      "{\"scriptIndex\":0,\"startPos\":12,\"endPos\":22,\"compiled\":true,"
+      "{\"scriptIndex\":0,\"startPos\":26,\"endPos\":48,\"compiled\":true,"
       "\"callSites\":["
-      "{\"name\":\"helper0\",\"tokenPos\":17,\"cacheEntries\":["
+      "{\"name\":\"helper0\",\"tokenPos\":37,\"cacheEntries\":["
       "{\"target\":{\"type\":\"@Function\",\"fixedId\":true,\"id\":\"\","
       "\"name\":\"helper0\",\"owner\":{\"type\":\"@Library\",\"fixedId\":true,"
-      "\"id\":\"\",\"name\":\"\",\"uri\":\"test-lib\"},"
+      "\"id\":\"\",\"name\":\"\",\"uri\":\"file:\\/\\/\\/test-lib\"},"
       "\"_kind\":\"RegularFunction\",\"static\":true,\"const\":false,"
       "\"_intrinsic\":false,\"_native\":false},\"count\":1}]}]}],"
 
       // One script in the script table.
       "\"scripts\":[{\"type\":\"@Script\",\"fixedId\":true,\"id\":\"\","
-      "\"uri\":\"test-lib\",\"_kind\":\"script\"}]}",
+      "\"uri\":\"file:\\/\\/\\/test-lib\",\"_kind\":\"kernel\"}]}",
       buffer);
 }
 
@@ -538,10 +546,10 @@
       "{\"type\":\"SourceReport\",\"ranges\":["
 
       // One range...
-      "{\"scriptIndex\":0,\"startPos\":24,\"endPos\":37,\"compiled\":true,"
+      "{\"scriptIndex\":0,\"startPos\":60,\"endPos\":88,\"compiled\":true,"
 
       // With one call site...
-      "\"callSites\":[{\"name\":\"func\",\"tokenPos\":32,\"cacheEntries\":["
+      "\"callSites\":[{\"name\":\"dyn:func\",\"tokenPos\":80,\"cacheEntries\":["
 
       // First receiver: "Common", called twice.
       "{\"receiver\":{\"type\":\"@Class\",\"fixedId\":true,\"id\":\"\","
@@ -571,7 +579,7 @@
 
       // One script in the script table.
       "\"scripts\":[{\"type\":\"@Script\",\"fixedId\":true,\"id\":\"\","
-      "\"uri\":\"test-lib\",\"_kind\":\"script\"}]}",
+      "\"uri\":\"file:\\/\\/\\/test-lib\",\"_kind\":\"kernel\"}]}",
       buffer);
 }
 
@@ -599,27 +607,27 @@
       "{\"type\":\"SourceReport\",\"ranges\":["
 
       // One range compiled with no callsites (helper0).
-      "{\"scriptIndex\":0,\"startPos\":0,\"endPos\":4,\"compiled\":true,"
+      "{\"scriptIndex\":0,\"startPos\":0,\"endPos\":11,\"compiled\":true,"
       "\"callSites\":[],"
       "\"coverage\":{\"hits\":[0],\"misses\":[]}},"
 
       // One range not compiled (helper1).
-      "{\"scriptIndex\":0,\"startPos\":6,\"endPos\":10,\"compiled\":false},"
+      "{\"scriptIndex\":0,\"startPos\":13,\"endPos\":24,\"compiled\":false},"
 
       // One range compiled with one callsite (main).
-      "{\"scriptIndex\":0,\"startPos\":12,\"endPos\":22,\"compiled\":true,"
+      "{\"scriptIndex\":0,\"startPos\":26,\"endPos\":48,\"compiled\":true,"
       "\"callSites\":["
-      "{\"name\":\"helper0\",\"tokenPos\":17,\"cacheEntries\":["
+      "{\"name\":\"helper0\",\"tokenPos\":37,\"cacheEntries\":["
       "{\"target\":{\"type\":\"@Function\",\"fixedId\":true,\"id\":\"\","
       "\"name\":\"helper0\",\"owner\":{\"type\":\"@Library\",\"fixedId\":true,"
-      "\"id\":\"\",\"name\":\"\",\"uri\":\"test-lib\"},"
+      "\"id\":\"\",\"name\":\"\",\"uri\":\"file:\\/\\/\\/test-lib\"},"
       "\"_kind\":\"RegularFunction\",\"static\":true,\"const\":false,"
       "\"_intrinsic\":false,\"_native\":false},\"count\":1}]}],"
-      "\"coverage\":{\"hits\":[12,17],\"misses\":[]}}],"
+      "\"coverage\":{\"hits\":[26,37],\"misses\":[]}}],"
 
       // One script in the script table.
       "\"scripts\":[{\"type\":\"@Script\",\"fixedId\":true,\"id\":\"\","
-      "\"uri\":\"test-lib\",\"_kind\":\"script\"}]}",
+      "\"uri\":\"file:\\/\\/\\/test-lib\",\"_kind\":\"kernel\"}]}",
       buffer);
 }
 
@@ -651,19 +659,19 @@
       "{\"type\":\"SourceReport\",\"ranges\":["
 
       // helper0.
-      "{\"scriptIndex\":0,\"startPos\":0,\"endPos\":4,\"compiled\":true,"
-      "\"possibleBreakpoints\":[1,4]},"
+      "{\"scriptIndex\":0,\"startPos\":0,\"endPos\":11,\"compiled\":true,"
+      "\"possibleBreakpoints\":[7,11]},"
 
       // One range not compiled (helper1).
-      "{\"scriptIndex\":0,\"startPos\":6,\"endPos\":10,\"compiled\":false},"
+      "{\"scriptIndex\":0,\"startPos\":13,\"endPos\":24,\"compiled\":false},"
 
       // main.
-      "{\"scriptIndex\":0,\"startPos\":12,\"endPos\":39,\"compiled\":true,"
-      "\"possibleBreakpoints\":[13,23,32,39]}],"
+      "{\"scriptIndex\":0,\"startPos\":26,\"endPos\":94,\"compiled\":true,"
+      "\"possibleBreakpoints\":[30,53,79,94]}],"
 
       // Only one script in the script table.
       "\"scripts\":[{\"type\":\"@Script\",\"fixedId\":true,\"id\":\"\","
-      "\"uri\":\"test-lib\",\"_kind\":\"script\"}]}",
+      "\"uri\":\"file:\\/\\/\\/test-lib\",\"_kind\":\"kernel\"}]}",
       buffer);
 }
 
diff --git a/runtime/vm/stack_frame.cc b/runtime/vm/stack_frame.cc
index 0e98fc7..b1d4b79 100644
--- a/runtime/vm/stack_frame.cc
+++ b/runtime/vm/stack_frame.cc
@@ -29,6 +29,7 @@
     /*.first_object_from_fp = */ -1,
     /*.last_fixed_object_from_fp = */ -1,
     /*.param_end_from_fp = */ -1,
+    /*.last_param_from_entry_sp = */ -1,
     /*.first_local_from_fp = */ -1,
     /*.dart_fixed_frame_size = */ -1,
     /*.saved_caller_pp_from_fp = */ -1,
@@ -40,6 +41,7 @@
     /*.first_object_from_fp = */ kFirstObjectSlotFromFp,
     /*.last_fixed_object_from_fp = */ kLastFixedObjectSlotFromFp,
     /*.param_end_from_fp = */ kParamEndSlotFromFp,
+    /*.last_param_from_entry_sp = */ kLastParamSlotFromEntrySp,
     /*.first_local_from_fp = */ kFirstLocalSlotFromFp,
     /*.dart_fixed_frame_size = */ kDartFrameFixedSize,
     /*.saved_caller_pp_from_fp = */ kSavedCallerPpSlotFromFp,
@@ -51,6 +53,7 @@
     /*.last_fixed_object_from_fp = */ kLastFixedObjectSlotFromFp +
         2,  // No saved CODE, PP slots
     /*.param_end_from_fp = */ kParamEndSlotFromFp,
+    /*.last_param_from_entry_sp = */ kLastParamSlotFromEntrySp,
     /*.first_local_from_fp =*/kFirstLocalSlotFromFp +
         2,  // No saved CODE, PP slots.
     /*.dart_fixed_frame_size =*/kDartFrameFixedSize -
@@ -384,8 +387,17 @@
 #if !defined(TARGET_ARCH_DBC)
   // For normal unoptimized Dart frames and Stub frames each slot
   // between the first and last included are tagged objects.
-  RawObject** first = reinterpret_cast<RawObject**>(
-      is_interpreted() ? fp() + (kKBCFirstObjectSlotFromFp * kWordSize) : sp());
+  if (is_interpreted()) {
+    // Do not visit caller's pc or caller's fp.
+    RawObject** first =
+        reinterpret_cast<RawObject**>(fp()) + kKBCFirstObjectSlotFromFp;
+    RawObject** last =
+        reinterpret_cast<RawObject**>(fp()) + kKBCLastFixedObjectSlotFromFp;
+
+    visitor->VisitPointers(first, last);
+  }
+  RawObject** first =
+      reinterpret_cast<RawObject**>(is_interpreted() ? fp() : sp());
   RawObject** last = reinterpret_cast<RawObject**>(
       is_interpreted()
           ? sp()
@@ -402,9 +414,11 @@
 
 RawFunction* StackFrame::LookupDartFunction() const {
   if (is_interpreted()) {
-    const Bytecode& bytecode = Bytecode::Handle(LookupDartBytecode());
-    ASSERT(!bytecode.IsNull());
-    return bytecode.function();
+    RawObject* result = *(reinterpret_cast<RawFunction**>(
+        fp() + kKBCFunctionSlotFromFp * kWordSize));
+    ASSERT((result == Object::null()) ||
+           (result->GetClassId() == kFunctionCid));
+    return reinterpret_cast<RawFunction*>(result);
   }
   const Code& code = Code::Handle(LookupDartCode());
   if (!code.IsNull()) {
diff --git a/runtime/vm/stack_frame_arm.h b/runtime/vm/stack_frame_arm.h
index 1f27cf9..2b5dc3e 100644
--- a/runtime/vm/stack_frame_arm.h
+++ b/runtime/vm/stack_frame_arm.h
@@ -42,6 +42,7 @@
 static const int kSavedCallerPcSlotFromFp = 1;
 static const int kParamEndSlotFromFp = 1;  // One slot past last parameter.
 static const int kCallerSpSlotFromFp = 2;
+static const int kLastParamSlotFromEntrySp = 0;
 
 // Entry and exit frame layout.
 #if defined(TARGET_OS_MACOS) || defined(TARGET_OS_MACOS_IOS)
diff --git a/runtime/vm/stack_frame_arm64.h b/runtime/vm/stack_frame_arm64.h
index 70000da..3b8c726 100644
--- a/runtime/vm/stack_frame_arm64.h
+++ b/runtime/vm/stack_frame_arm64.h
@@ -42,6 +42,7 @@
 
 static const int kParamEndSlotFromFp = 1;  // One slot past last parameter.
 static const int kCallerSpSlotFromFp = 2;
+static const int kLastParamSlotFromEntrySp = 0;
 
 // Entry and exit frame layout.
 static const int kExitLinkSlotFromEntryFp = -22;
diff --git a/runtime/vm/stack_frame_dbc.h b/runtime/vm/stack_frame_dbc.h
index 475d9b7..632f68c 100644
--- a/runtime/vm/stack_frame_dbc.h
+++ b/runtime/vm/stack_frame_dbc.h
@@ -55,6 +55,7 @@
 // these indices during code generation in the backend.
 static const int kParamEndSlotFromFp = 4;  // One slot past last parameter.
 static const int kFirstLocalSlotFromFp = -1;
+static const int kLastParamSlotFromEntrySp = 0;  // Should not be used on DBC.
 
 DART_FORCE_INLINE static intptr_t LocalVarIndex(intptr_t fp_offset,
                                                 intptr_t var_index) {
diff --git a/runtime/vm/stack_frame_ia32.h b/runtime/vm/stack_frame_ia32.h
index 2cfd1c4..b770cf7 100644
--- a/runtime/vm/stack_frame_ia32.h
+++ b/runtime/vm/stack_frame_ia32.h
@@ -38,6 +38,7 @@
 static const int kSavedCallerPcSlotFromFp = 1;
 static const int kParamEndSlotFromFp = 1;  // One slot past last parameter.
 static const int kCallerSpSlotFromFp = 2;
+static const int kLastParamSlotFromEntrySp = 1;  // Skip return address.
 
 // No pool pointer on IA32 (indicated by aliasing saved fp).
 static const int kSavedCallerPpSlotFromFp = kSavedCallerFpSlotFromFp;
diff --git a/runtime/vm/stack_frame_kbc.h b/runtime/vm/stack_frame_kbc.h
index 8bfe809..3418eaa 100644
--- a/runtime/vm/stack_frame_kbc.h
+++ b/runtime/vm/stack_frame_kbc.h
@@ -22,8 +22,8 @@
 Current frame  | ...               T| <- SP of current frame
                | ...               T|
                | first local       T| <- FP of current frame
-               | caller's FP       *|
-               | caller's PC       *|
+               | caller's FP        |
+               | caller's PC        |
                | code object       T|    (current frame's code object)
                | function object   T|    (current frame's function object)
                +--------------------+
@@ -31,8 +31,6 @@
                |  ...               |
 
                T against a slot indicates it needs to be traversed during GC.
-               * against a slot indicates that it can be traversed during GC
-                 because it will look like a smi to the visitor.
 */
 
 static const int kKBCDartFrameFixedSize = 4;  // Function, Code, PC, FP
diff --git a/runtime/vm/stack_frame_x64.h b/runtime/vm/stack_frame_x64.h
index 84d9652..00d0059 100644
--- a/runtime/vm/stack_frame_x64.h
+++ b/runtime/vm/stack_frame_x64.h
@@ -43,6 +43,7 @@
 
 static const int kParamEndSlotFromFp = 1;  // One slot past last parameter.
 static const int kCallerSpSlotFromFp = 2;
+static const int kLastParamSlotFromEntrySp = 1;  // Skip return address.
 
 // Entry and exit frame layout.
 #if defined(_WIN64)
diff --git a/runtime/vm/static_type_exactness_state.h b/runtime/vm/static_type_exactness_state.h
index 1660eba..17e0089 100644
--- a/runtime/vm/static_type_exactness_state.h
+++ b/runtime/vm/static_type_exactness_state.h
@@ -93,7 +93,7 @@
     return StaticTypeExactnessState(kNotTracking);
   }
 
-  static inline StaticTypeExactnessState Unitialized() {
+  static inline StaticTypeExactnessState Uninitialized() {
     return StaticTypeExactnessState(kUninitialized);
   }
 
diff --git a/runtime/vm/stub_code.cc b/runtime/vm/stub_code.cc
index 9171436..637d16f 100644
--- a/runtime/vm/stub_code.cc
+++ b/runtime/vm/stub_code.cc
@@ -39,10 +39,6 @@
   UNREACHABLE();
 }
 
-void StubCode::Cleanup() {
-  // Stubs will be loaded from the snapshot.
-  UNREACHABLE();
-}
 #else
 
 #define STUB_CODE_GENERATE(name)                                               \
@@ -69,20 +65,12 @@
 #undef STUB_CODE_GENERATE
 #undef STUB_CODE_SET_OBJECT_POOL
 
-#define STUB_CODE_CLEANUP(name) entries_[k##name##Index] = nullptr;
-
-void StubCode::Cleanup() {
-  VM_STUB_CODE_LIST(STUB_CODE_CLEANUP);
-}
-
-#undef STUB_CODE_CLEANUP
-
 RawCode* StubCode::Generate(const char* name,
                             ObjectPoolBuilder* object_pool_builder,
                             void (*GenerateStub)(Assembler* assembler)) {
   Assembler assembler(object_pool_builder);
   GenerateStub(&assembler);
-  const Code& code = Code::Handle(Code::FinalizeCode(
+  const Code& code = Code::Handle(Code::FinalizeCodeAndNotify(
       name, nullptr, &assembler, Code::PoolAttachment::kNotAttachPool,
       /*optimized=*/false));
 #ifndef PRODUCT
@@ -102,6 +90,14 @@
 }
 #endif  // defined(DART_PRECOMPILED_RUNTIME)
 
+#define STUB_CODE_CLEANUP(name) entries_[k##name##Index] = nullptr;
+
+void StubCode::Cleanup() {
+  VM_STUB_CODE_LIST(STUB_CODE_CLEANUP);
+}
+
+#undef STUB_CODE_CLEANUP
+
 void StubCode::VisitObjectPointers(ObjectPointerVisitor* visitor) {}
 
 bool StubCode::HasBeenInitialized() {
@@ -116,7 +112,7 @@
   if (FLAG_enable_interpreter) {
     if (is_interpreted_frame) {
       // Recognize special marker set up by interpreter in entry frame.
-      return Interpreter::IsEntryFrameMarker(pc);
+      return Interpreter::IsEntryFrameMarker(reinterpret_cast<uint32_t*>(pc));
     }
     {
       uword entry = StubCode::InvokeDartCodeFromBytecode().EntryPoint();
@@ -185,8 +181,9 @@
     compiler::StubCodeCompiler::GenerateAllocationStubForClass(&assembler, cls);
 
     if (thread->IsMutatorThread()) {
-      stub ^= Code::FinalizeCode(name, nullptr, &assembler, pool_attachment,
-                                 /*optimized1*/ false);
+      stub ^= Code::FinalizeCodeAndNotify(name, nullptr, &assembler,
+                                          pool_attachment,
+                                          /*optimized1*/ false);
       // Check if background compilation thread has not already added the stub.
       if (cls.allocation_stub() == Code::null()) {
         stub.set_owner(cls);
@@ -210,11 +207,16 @@
         // Do not Garbage collect during this stage and instead allow the
         // heap to grow.
         NoHeapGrowthControlScope no_growth_control;
-        stub ^= Code::FinalizeCode(name, nullptr, &assembler, pool_attachment,
-                                   false /* optimized */);
+        stub ^= Code::FinalizeCode(nullptr, &assembler, pool_attachment,
+                                   /*optimized=*/false, /*stats=*/nullptr);
         stub.set_owner(cls);
         cls.set_allocation_stub(stub);
       }
+
+      // We notify code observers after finalizing the code in order to be
+      // outside a [SafepointOperationScope].
+      Code::NotifyCodeObservers(nullptr, stub, /*optimized=*/false);
+
       Isolate* isolate = thread->isolate();
       if (isolate->heap()->NeedsGarbageCollection()) {
         isolate->heap()->CollectMostGarbage();
@@ -260,7 +262,7 @@
       &assembler, closure_allocation_stub, context_allocation_stub);
 
   const char* name = "BuildMethodExtractor";
-  const Code& stub = Code::Handle(Code::FinalizeCode(
+  const Code& stub = Code::Handle(Code::FinalizeCodeAndNotify(
       name, nullptr, &assembler, Code::PoolAttachment::kNotAttachPool,
       /*optimized=*/false));
 
diff --git a/runtime/vm/stub_code_arm64_test.cc b/runtime/vm/stub_code_arm64_test.cc
index 5dbe70d..4e69a5a 100644
--- a/runtime/vm/stub_code_arm64_test.cc
+++ b/runtime/vm/stub_code_arm64_test.cc
@@ -58,9 +58,9 @@
   ObjectPoolBuilder object_pool_builder;
   Assembler assembler(&object_pool_builder);
   GenerateCallToCallRuntimeStub(&assembler, length);
-  const Code& code = Code::Handle(
-      Code::FinalizeCode(*CreateFunction("Test_CallRuntimeStubCode"), nullptr,
-                         &assembler, Code::PoolAttachment::kAttachPool));
+  const Code& code = Code::Handle(Code::FinalizeCodeAndNotify(
+      *CreateFunction("Test_CallRuntimeStubCode"), nullptr, &assembler,
+      Code::PoolAttachment::kAttachPool));
   const Function& function = RegisterFakeFunction(kName, code);
   Array& result = Array::Handle();
   result ^= DartEntry::InvokeFunction(function, Object::empty_array());
@@ -100,7 +100,7 @@
   Assembler assembler(&object_pool_builder);
   GenerateCallToCallLeafRuntimeStub(&assembler, str_value, lhs_index_value,
                                     rhs_index_value, length_value);
-  const Code& code = Code::Handle(Code::FinalizeCode(
+  const Code& code = Code::Handle(Code::FinalizeCodeAndNotify(
       *CreateFunction("Test_CallLeafRuntimeStubCode"), nullptr, &assembler,
       Code::PoolAttachment::kAttachPool));
   const Function& function = RegisterFakeFunction(kName, code);
diff --git a/runtime/vm/stub_code_arm_test.cc b/runtime/vm/stub_code_arm_test.cc
index 85224e3..2a66478 100644
--- a/runtime/vm/stub_code_arm_test.cc
+++ b/runtime/vm/stub_code_arm_test.cc
@@ -57,9 +57,9 @@
   ObjectPoolBuilder object_pool_builder;
   Assembler assembler(&object_pool_builder);
   GenerateCallToCallRuntimeStub(&assembler, length);
-  const Code& code = Code::Handle(
-      Code::FinalizeCode(*CreateFunction("Test_CallRuntimeStubCode"), nullptr,
-                         &assembler, Code::PoolAttachment::kAttachPool));
+  const Code& code = Code::Handle(Code::FinalizeCodeAndNotify(
+      *CreateFunction("Test_CallRuntimeStubCode"), nullptr, &assembler,
+      Code::PoolAttachment::kAttachPool));
   const Function& function = RegisterFakeFunction(kName, code);
   Array& result = Array::Handle();
   result ^= DartEntry::InvokeFunction(function, Object::empty_array());
@@ -98,7 +98,7 @@
   Assembler assembler(&object_pool_builder);
   GenerateCallToCallLeafRuntimeStub(&assembler, str_value, lhs_index_value,
                                     rhs_index_value, length_value);
-  const Code& code = Code::Handle(Code::FinalizeCode(
+  const Code& code = Code::Handle(Code::FinalizeCodeAndNotify(
       *CreateFunction("Test_CallLeafRuntimeStubCode"), nullptr, &assembler,
       Code::PoolAttachment::kAttachPool));
   const Function& function = RegisterFakeFunction(kName, code);
diff --git a/runtime/vm/stub_code_ia32_test.cc b/runtime/vm/stub_code_ia32_test.cc
index 94bac2e..a4f79fc 100644
--- a/runtime/vm/stub_code_ia32_test.cc
+++ b/runtime/vm/stub_code_ia32_test.cc
@@ -57,9 +57,9 @@
   const char* kName = "Test_CallRuntimeStubCode";
   Assembler assembler(nullptr);
   GenerateCallToCallRuntimeStub(&assembler, length);
-  const Code& code = Code::Handle(
-      Code::FinalizeCode(*CreateFunction("Test_CallRuntimeStubCode"), nullptr,
-                         &assembler, Code::PoolAttachment::kAttachPool));
+  const Code& code = Code::Handle(Code::FinalizeCodeAndNotify(
+      *CreateFunction("Test_CallRuntimeStubCode"), nullptr, &assembler,
+      Code::PoolAttachment::kAttachPool));
   const Function& function = RegisterFakeFunction(kName, code);
   Array& result = Array::Handle();
   result ^= DartEntry::InvokeFunction(function, Object::empty_array());
@@ -102,7 +102,7 @@
   Assembler assembler(nullptr);
   GenerateCallToCallLeafRuntimeStub(&assembler, str_value, lhs_index_value,
                                     rhs_index_value, length_value);
-  const Code& code = Code::Handle(Code::FinalizeCode(
+  const Code& code = Code::Handle(Code::FinalizeCodeAndNotify(
       *CreateFunction("Test_CallLeafRuntimeStubCode"), nullptr, &assembler,
       Code::PoolAttachment::kAttachPool));
   const Function& function = RegisterFakeFunction(kName, code);
diff --git a/runtime/vm/stub_code_list.h b/runtime/vm/stub_code_list.h
index ce9d729..602ec4d 100644
--- a/runtime/vm/stub_code_list.h
+++ b/runtime/vm/stub_code_list.h
@@ -75,7 +75,9 @@
   V(StackOverflowSharedWithFPURegs)                                            \
   V(StackOverflowSharedWithoutFPURegs)                                         \
   V(OneArgCheckInlineCacheWithExactnessCheck)                                  \
-  V(OneArgOptimizedCheckInlineCacheWithExactnessCheck)
+  V(OneArgOptimizedCheckInlineCacheWithExactnessCheck)                         \
+  V(EnterSafepoint)                                                            \
+  V(ExitSafepoint)
 
 #else
 #define VM_STUB_CODE_LIST(V)                                                   \
diff --git a/runtime/vm/stub_code_x64_test.cc b/runtime/vm/stub_code_x64_test.cc
index 53917bb..a71484a 100644
--- a/runtime/vm/stub_code_x64_test.cc
+++ b/runtime/vm/stub_code_x64_test.cc
@@ -58,9 +58,9 @@
   ObjectPoolBuilder object_pool_builder;
   Assembler assembler(&object_pool_builder);
   GenerateCallToCallRuntimeStub(&assembler, length);
-  const Code& code = Code::Handle(
-      Code::FinalizeCode(*CreateFunction("Test_CallRuntimeStubCode"), nullptr,
-                         &assembler, Code::PoolAttachment::kAttachPool));
+  const Code& code = Code::Handle(Code::FinalizeCodeAndNotify(
+      *CreateFunction("Test_CallRuntimeStubCode"), nullptr, &assembler,
+      Code::PoolAttachment::kAttachPool));
   const Function& function = RegisterFakeFunction(kName, code);
   Array& result = Array::Handle();
   result ^= DartEntry::InvokeFunction(function, Object::empty_array());
@@ -100,7 +100,7 @@
   Assembler assembler(&object_pool_builder);
   GenerateCallToCallLeafRuntimeStub(&assembler, str_value, lhs_index_value,
                                     rhs_index_value, length_value);
-  const Code& code = Code::Handle(Code::FinalizeCode(
+  const Code& code = Code::Handle(Code::FinalizeCodeAndNotify(
       *CreateFunction("Test_CallLeafRuntimeStubCode"), nullptr, &assembler,
       Code::PoolAttachment::kAttachPool));
   const Function& function = RegisterFakeFunction(kName, code);
diff --git a/runtime/vm/symbols.cc b/runtime/vm/symbols.cc
index b10f4e8..3a80632 100644
--- a/runtime/vm/symbols.cc
+++ b/runtime/vm/symbols.cc
@@ -303,48 +303,6 @@
   isolate->object_store()->set_symbol_table(array);
 }
 
-RawArray* Symbols::UnifiedSymbolTable() {
-  Thread* thread = Thread::Current();
-  Isolate* isolate = thread->isolate();
-  Zone* zone = thread->zone();
-
-  ASSERT(thread->IsMutatorThread());
-
-  SymbolTable vm_table(zone,
-                       Dart::vm_isolate()->object_store()->symbol_table());
-  SymbolTable table(zone, isolate->object_store()->symbol_table());
-  intptr_t unified_size = vm_table.NumOccupied() + table.NumOccupied();
-  SymbolTable unified_table(
-      zone, HashTables::New<SymbolTable>(unified_size, Heap::kOld));
-  String& symbol = String::Handle(zone);
-
-  SymbolTable::Iterator vm_iter(&vm_table);
-  while (vm_iter.MoveNext()) {
-    symbol ^= vm_table.GetKey(vm_iter.Current());
-    ASSERT(!symbol.IsNull());
-    bool present = unified_table.Insert(symbol);
-    ASSERT(!present);
-  }
-  vm_table.Release();
-
-  SymbolTable::Iterator iter(&table);
-  while (iter.MoveNext()) {
-    symbol ^= table.GetKey(iter.Current());
-    ASSERT(!symbol.IsNull());
-    bool present = unified_table.Insert(symbol);
-    ASSERT(!present);
-  }
-  table.Release();
-
-  // TODO(30378): The default load factor of 0.75 / 2 burns ~100KB, but
-  // increasing the load factor regresses Flutter's hot restart time.
-  // const double kMinLoad = 0.90;
-  // const double kMaxLoad = 0.90;
-  // HashTables::EnsureLoadFactor(kMinLoad, kMaxLoad, unified_table);
-
-  return unified_table.Release().raw();
-}
-
 void Symbols::Compact() {
   Thread* thread = Thread::Current();
   ASSERT(thread->isolate() != Dart::vm_isolate());
diff --git a/runtime/vm/symbols.h b/runtime/vm/symbols.h
index 68c0371..845d780 100644
--- a/runtime/vm/symbols.h
+++ b/runtime/vm/symbols.h
@@ -17,470 +17,474 @@
 
 // One-character symbols are added implicitly.
 #define PREDEFINED_SYMBOLS_LIST(V)                                             \
-  V(EqualOperator, "==")                                                       \
-  V(GreaterEqualOperator, ">=")                                                \
-  V(LessEqualOperator, "<=")                                                   \
-  V(LeftShiftOperator, "<<")                                                   \
-  V(RightShiftOperator, ">>")                                                  \
-  V(TruncDivOperator, "~/")                                                    \
-  V(UnaryMinus, "unary-")                                                      \
-  V(Identical, "identical")                                                    \
-  V(UnsafeCast, "unsafeCast")                                                  \
-  V(Length, "length")                                                          \
-  V(_setLength, "_setLength")                                                  \
-  V(IndexToken, "[]")                                                          \
-  V(AssignIndexToken, "[]=")                                                   \
-  V(TopLevel, "::")                                                            \
-  V(DefaultLabel, ":L")                                                        \
-  V(Other, "other")                                                            \
-  V(Call, "call")                                                              \
-  V(GetCall, "get:call")                                                       \
-  V(Current, "current")                                                        \
-  V(_current, "_current")                                                      \
-  V(MoveNext, "moveNext")                                                      \
-  V(_yieldEachIterable, "_yieldEachIterable")                                  \
-  V(Value, "value")                                                            \
-  V(_EnumHelper, "_EnumHelper")                                                \
-  V(_SyncIterable, "_SyncIterable")                                            \
-  V(_SyncIterableConstructor, "_SyncIterable.")                                \
-  V(_SyncIterator, "_SyncIterator")                                            \
-  V(IteratorParameter, ":iterator")                                            \
-  V(_AsyncStarStreamController, "_AsyncStarStreamController")                  \
-  V(_AsyncStarStreamControllerConstructor, "_AsyncStarStreamController.")      \
-  V(ColonController, ":controller")                                            \
-  V(ControllerStream, ":controller_stream")                                    \
-  V(Stream, "stream")                                                          \
-  V(_StreamImpl, "_StreamImpl")                                                \
-  V(isPaused, "isPaused")                                                      \
+  V(AbstractClassInstantiationError, "AbstractClassInstantiationError")        \
   V(AddError, "addError")                                                      \
   V(AddStream, "addStream")                                                    \
-  V(Cancel, "cancel")                                                          \
-  V(Close, "close")                                                            \
-  V(Values, "values")                                                          \
-  V(_EnumNames, "_enum_names")                                                 \
-  V(_DeletedEnumSentinel, "_deleted_enum_sentinel")                            \
-  V(_DeletedEnumPrefix, "Deleted enum value from ")                            \
-  V(ExprTemp, ":expr_temp")                                                    \
-  V(EntryPointsTemp, ":entry_points_temp")                                     \
-  V(FinallyRetVal, ":finally_ret_val")                                         \
+  V(AllocateInvocationMirror, "_allocateInvocationMirror")                     \
+  V(AllocateInvocationMirrorForClosure, "_allocateInvocationMirrorForClosure") \
   V(AnonymousClosure, "<anonymous closure>")                                   \
   V(AnonymousSignature, "<anonymous signature>")                               \
-  V(ImplicitClosure, "<implicit closure>")                                     \
-  V(ClosureParameter, ":closure")                                              \
-  V(TypeArgumentsParameter, ":type_arguments")                                 \
-  V(FunctionTypeArgumentsVar, ":function_type_arguments_var")                  \
-  V(AssertionError, "_AssertionError")                                         \
-  V(CastError, "_CastError")                                                   \
-  V(TypeError, "_TypeError")                                                   \
-  V(FallThroughError, "FallThroughError")                                      \
-  V(AbstractClassInstantiationError, "AbstractClassInstantiationError")        \
-  V(NoSuchMethodError, "NoSuchMethodError")                                    \
-  V(IntegerDivisionByZeroException, "IntegerDivisionByZeroException")          \
-  V(CyclicInitializationError, "CyclicInitializationError")                    \
-  V(_CompileTimeError, "_CompileTimeError")                                    \
-  V(ThrowNew, "_throwNew")                                                     \
-  V(ThrowNewInvocation, "_throwNewInvocation")                                 \
-  V(EvaluateAssertion, "_evaluateAssertion")                                   \
-  V(Symbol, "Symbol")                                                          \
-  V(SymbolCtor, "Symbol.")                                                     \
-  V(List, "List")                                                              \
-  V(ListLiteralFactory, "List._fromLiteral")                                   \
-  V(ListFactory, "List.")                                                      \
-  V(Map, "Map")                                                                \
-  V(MapLiteralFactory, "Map._fromLiteral")                                     \
-  V(ImmutableMap, "_ImmutableMap")                                             \
-  V(ImmutableMapConstructor, "_ImmutableMap._create")                          \
-  V(StringBase, "_StringBase")                                                 \
-  V(Interpolate, "_interpolate")                                               \
-  V(InterpolateSingle, "_interpolateSingle")                                   \
-  V(Iterator, "iterator")                                                      \
-  V(NoSuchMethod, "noSuchMethod")                                              \
+  V(ApiError, "ApiError")                                                      \
   V(ArgDescVar, ":arg_desc")                                                   \
-  V(CurrentContextVar, ":current_context_var")                                 \
-  V(SavedTryContextVar, ":saved_try_context_var")                              \
-  V(TryFinallyReturnValue, ":try_finally_return_value")                        \
-  V(ExceptionParameter, ":exception")                                          \
-  V(StackTraceParameter, ":stack_trace")                                       \
-  V(ExceptionVar, ":exception_var")                                            \
-  V(StackTraceVar, ":stack_trace_var")                                         \
-  V(SavedExceptionVar, ":saved_exception_var")                                 \
-  V(SavedStackTraceVar, ":saved_stack_trace_var")                              \
-  V(ListLiteralElement, "list literal element")                                \
-  V(ForInIter, ":for-in-iter")                                                 \
-  V(LoadLibrary, "loadLibrary")                                                \
-  V(_LibraryPrefix, "_LibraryPrefix")                                          \
-  V(On, "on")                                                                  \
-  V(Of, "of")                                                                  \
-  V(Show, "show")                                                              \
-  V(Hide, "hide")                                                              \
+  V(ArgumentError, "ArgumentError")                                            \
+  V(AssertionError, "_AssertionError")                                         \
+  V(AssignIndexToken, "[]=")                                                   \
   V(Async, "async")                                                            \
-  V(Sync, "sync")                                                              \
-  V(YieldKw, "yield")                                                          \
-  V(AsyncCompleter, ":async_completer")                                        \
-  V(AsyncOperation, ":async_op")                                               \
-  V(AsyncThenCallback, ":async_op_then")                                       \
+  V(AsyncAwaitHelper, "_awaitHelper")                                          \
   V(AsyncCatchErrorCallback, ":async_op_catch_error")                          \
-  V(AsyncOperationParam, ":async_result")                                      \
+  V(AsyncCatchHelper, "_asyncCatchHelper")                                     \
+  V(AsyncCompleter, ":async_completer")                                        \
+  V(AsyncErrorWrapperHelper, "_asyncErrorWrapperHelper")                       \
+  V(AsyncOperation, ":async_op")                                               \
   V(AsyncOperationErrorParam, ":async_error_param")                            \
+  V(AsyncOperationParam, ":async_result")                                      \
   V(AsyncOperationStackTraceParam, ":async_stack_trace_param")                 \
   V(AsyncSavedTryCtxVarPrefix, ":async_saved_try_ctx_var_")                    \
-  V(AsyncStackTraceVar, ":async_stack_trace")                                  \
-  V(ClearAsyncThreadStackTrace, "_clearAsyncThreadStackTrace")                 \
-  V(SetAsyncThreadStackTrace, "_setAsyncThreadStackTrace")                     \
-  V(AsyncCatchHelper, "_asyncCatchHelper")                                     \
-  V(_CompleteOnAsyncReturn, "_completeOnAsyncReturn")                          \
-  V(AsyncThenWrapperHelper, "_asyncThenWrapperHelper")                         \
-  V(AsyncErrorWrapperHelper, "_asyncErrorWrapperHelper")                       \
-  V(AsyncStarMoveNextHelper, "_asyncStarMoveNextHelper")                       \
   V(AsyncStackTraceHelper, "_asyncStackTraceHelper")                           \
-  V(AsyncAwaitHelper, "_awaitHelper")                                          \
+  V(AsyncStackTraceVar, ":async_stack_trace")                                  \
+  V(AsyncStarMoveNextHelper, "_asyncStarMoveNextHelper")                       \
+  V(AsyncThenCallback, ":async_op_then")                                       \
+  V(AsyncThenWrapperHelper, "_asyncThenWrapperHelper")                         \
   V(Await, "await")                                                            \
-  V(_Awaiter, "_awaiter")                                                      \
-  V(AwaitTempVarPrefix, ":await_temp_var_")                                    \
   V(AwaitContextVar, ":await_ctx_var")                                         \
   V(AwaitJumpVar, ":await_jump_var")                                           \
-  V(FutureImpl, "_Future")                                                     \
-  V(Future, "Future")                                                          \
-  V(FutureOr, "FutureOr")                                                      \
-  V(FutureMicrotask, "Future.microtask")                                       \
-  V(FutureValue, "Future.value")                                               \
-  V(FutureThen, "then")                                                        \
-  V(FutureCatchError, "catchError")                                            \
+  V(AwaitTempVarPrefix, ":await_temp_var_")                                    \
+  V(Bool, "bool")                                                              \
+  V(BooleanExpression, "boolean expression")                                   \
+  V(BoundsCheckForPartialInstantiation, "_boundsCheckForPartialInstantiation") \
+  V(ByteData, "ByteData")                                                      \
+  V(ByteDataDot, "ByteData.")                                                  \
+  V(ByteDataDot_view, "ByteData._view")                                        \
+  V(Bytecode, "Bytecode")                                                      \
+  V(Call, "call")                                                              \
+  V(Cancel, "cancel")                                                          \
+  V(CastError, "_CastError")                                                   \
+  V(Class, "Class")                                                            \
+  V(ClassID, "ClassID")                                                        \
+  V(ClearAsyncThreadStackTrace, "_clearAsyncThreadStackTrace")                 \
+  V(Close, "close")                                                            \
+  V(ClosureData, "ClosureData")                                                \
+  V(ClosureParameter, ":closure")                                              \
+  V(Code, "Code")                                                              \
+  V(CodeSourceMap, "CodeSourceMap")                                            \
+  V(ColonController, ":controller")                                            \
+  V(ColonMatcher, ":matcher")                                                  \
+  V(ColonStream, ":stream")                                                    \
+  V(CommaSpace, ", ")                                                          \
   V(Completer, "Completer")                                                    \
   V(CompleterComplete, "complete")                                             \
   V(CompleterCompleteError, "completeError")                                   \
+  V(CompleterFuture, "future")                                                 \
+  V(CompleterGetFuture, "get:future")                                          \
   V(CompleterSyncConstructor, "Completer.sync")                                \
+  V(ConstructorStacktracePrefix, "new ")                                       \
+  V(Context, "Context")                                                        \
+  V(ContextScope, "ContextScope")                                              \
+  V(ControllerStream, ":controller_stream")                                    \
+  V(Current, "current")                                                        \
+  V(CurrentContextVar, ":current_context_var")                                 \
+  V(CyclicInitializationError, "CyclicInitializationError")                    \
+  V(DartCollection, "dart:collection")                                         \
+  V(DartCore, "dart:core")                                                     \
+  V(DartDeveloper, "dart:developer")                                           \
+  V(DartDeveloperCausalAsyncStacks, "dart.developer.causal_async_stacks")      \
+  V(DartDeveloperTimeline, "dart.developer.timeline")                          \
+  V(DartExtensionScheme, "dart-ext:")                                          \
+  V(DartFfi, "dart:ffi")                                                       \
+  V(DartFfiLibName, "ffi")                                                     \
+  V(DartIOLibName, "dart.io")                                                  \
+  V(DartInternal, "dart:_internal")                                            \
+  V(DartInternalPackage, "package:dart_internal/")                             \
+  V(DartIsVM, "dart.isVM")                                                     \
+  V(DartIsolate, "dart:isolate")                                               \
+  V(DartLibrary, "dart.library.")                                              \
+  V(DartLibraryFfi, "dart.library.ffi")                                        \
+  V(DartLibraryMirrors, "dart.library.mirrors")                                \
+  V(DartMirrors, "dart:mirrors")                                               \
+  V(DartNativeWrappers, "dart:nativewrappers")                                 \
+  V(DartNativeWrappersLibName, "nativewrappers")                               \
+  V(DartScheme, "dart:")                                                       \
+  V(DartSchemePrivate, "dart:_")                                               \
+  V(DartTypedData, "dart:typed_data")                                          \
+  V(DartVMProduct, "dart.vm.product")                                          \
+  V(DartVMService, "dart:_vmservice")                                          \
+  V(DebugClassName, "#DebugClass")                                             \
+  V(DebugProcedureName, ":Eval")                                               \
+  V(Default, "Default")                                                        \
+  V(DefaultLabel, ":L")                                                        \
+  V(DeoptInfo, "DeoptInfo")                                                    \
+  V(DotCreate, "._create")                                                     \
+  V(DotRange, ".range")                                                        \
+  V(DotValue, ".value")                                                        \
+  V(DotWithType, "._withType")                                                 \
+  V(Double, "double")                                                          \
+  V(Dynamic, "dynamic")                                                        \
+  V(DynamicPrefix, "dyn:")                                                     \
+  V(EntryPointsTemp, ":entry_points_temp")                                     \
+  V(EqualOperator, "==")                                                       \
+  V(Error, "Error")                                                            \
+  V(EvalSourceUri, "evaluate:source")                                          \
+  V(EvaluateAssertion, "_evaluateAssertion")                                   \
+  V(ExceptionHandlers, "ExceptionHandlers")                                    \
+  V(ExceptionParameter, ":exception")                                          \
+  V(ExceptionVar, ":exception_var")                                            \
+  V(ExprTemp, ":expr_temp")                                                    \
+  V(ExternalName, "ExternalName")                                              \
+  V(ExternalOneByteString, "_ExternalOneByteString")                           \
+  V(ExternalTwoByteString, "_ExternalTwoByteString")                           \
+  V(FactoryResult, "factory result")                                           \
+  V(FallThroughError, "FallThroughError")                                      \
+  V(FfiDouble, "Double")                                                       \
+  V(FfiDynamicLibrary, "DynamicLibrary")                                       \
+  V(FfiFloat, "Float")                                                         \
+  V(FfiInt16, "Int16")                                                         \
+  V(FfiInt32, "Int32")                                                         \
+  V(FfiInt64, "Int64")                                                         \
+  V(FfiInt8, "Int8")                                                           \
+  V(FfiIntPtr, "IntPtr")                                                       \
+  V(FfiNativeFunction, "NativeFunction")                                       \
+  V(FfiNativeType, "NativeType")                                               \
+  V(FfiPointer, "Pointer")                                                     \
+  V(FfiTrampolineData, "FfiTrampolineData")                                    \
+  V(FfiUint16, "Uint16")                                                       \
+  V(FfiUint32, "Uint32")                                                       \
+  V(FfiUint64, "Uint64")                                                       \
+  V(FfiUint8, "Uint8")                                                         \
+  V(FfiVoid, "Void")                                                           \
+  V(Field, "Field")                                                            \
+  V(FinallyRetVal, ":finally_ret_val")                                         \
+  V(Float32List, "Float32List")                                                \
+  V(Float32x4, "Float32x4")                                                    \
+  V(Float32x4List, "Float32x4List")                                            \
+  V(Float64List, "Float64List")                                                \
+  V(Float64x2, "Float64x2")                                                    \
+  V(Float64x2List, "Float64x2List")                                            \
+  V(ForInIter, ":for-in-iter")                                                 \
+  V(FormatException, "FormatException")                                        \
+  V(ForwardingCorpse, "ForwardingCorpse")                                      \
+  V(FreeListElement, "FreeListElement")                                        \
+  V(Function, "Function")                                                      \
+  V(FunctionResult, "function result")                                         \
+  V(FunctionTypeArgumentsVar, ":function_type_arguments_var")                  \
+  V(Future, "Future")                                                          \
+  V(FutureCatchError, "catchError")                                            \
+  V(FutureImpl, "_Future")                                                     \
+  V(FutureMicrotask, "Future.microtask")                                       \
+  V(FutureOr, "FutureOr")                                                      \
+  V(FutureThen, "then")                                                        \
+  V(FutureValue, "Future.value")                                               \
+  V(Get, "get")                                                                \
+  V(GetCall, "get:call")                                                       \
+  V(GetRuntimeType, "get:runtimeType")                                         \
+  V(GetterPrefix, "get:")                                                      \
+  V(GreaterEqualOperator, ">=")                                                \
+  V(GrowRegExpStack, "_growRegExpStack")                                       \
+  V(HaveSameRuntimeType, "_haveSameRuntimeType")                               \
+  V(Hide, "hide")                                                              \
+  V(ICData, "ICData")                                                          \
+  V(Identical, "identical")                                                    \
+  V(ImmutableMap, "_ImmutableMap")                                             \
+  V(ImmutableMapConstructor, "_ImmutableMap._create")                          \
+  V(ImplicitClosure, "<implicit closure>")                                     \
+  V(InTypeCast, " in type cast")                                               \
+  V(Index, "index")                                                            \
+  V(IndexToken, "[]")                                                          \
+  V(InitPrefix, "init:")                                                       \
+  V(Instructions, "Instructions")                                              \
+  V(Int, "int")                                                                \
+  V(Int16List, "Int16List")                                                    \
+  V(Int32List, "Int32List")                                                    \
+  V(Int32x4, "Int32x4")                                                        \
+  V(Int32x4List, "Int32x4List")                                                \
+  V(Int64List, "Int64List")                                                    \
+  V(Int8List, "Int8List")                                                      \
+  V(IntegerDivisionByZeroException, "IntegerDivisionByZeroException")          \
+  V(Interpolate, "_interpolate")                                               \
+  V(InterpolateSingle, "_interpolateSingle")                                   \
+  V(InvocationMirror, "_InvocationMirror")                                     \
+  V(IsolateSpawnException, "IsolateSpawnException")                            \
+  V(Iterator, "iterator")                                                      \
+  V(IteratorParameter, ":iterator")                                            \
+  V(KernelProgramInfo, "KernelProgramInfo")                                    \
+  V(LanguageError, "LanguageError")                                            \
+  V(LeftShiftOperator, "<<")                                                   \
+  V(Length, "length")                                                          \
+  V(GetLength, "get:length")                                                   \
+  V(LessEqualOperator, "<=")                                                   \
+  V(LibraryClass, "Library")                                                   \
+  V(LibraryPrefix, "LibraryPrefix")                                            \
+  V(List, "List")                                                              \
+  V(ListFactory, "List.")                                                      \
+  V(ListLiteralElement, "list literal element")                                \
+  V(ListLiteralFactory, "List._fromLiteral")                                   \
+  V(LoadLibrary, "loadLibrary")                                                \
+  V(LocalVarDescriptors, "LocalVarDescriptors")                                \
+  V(Map, "Map")                                                                \
+  V(MapLiteralFactory, "Map._fromLiteral")                                     \
+  V(MegamorphicCache, "MegamorphicCache")                                      \
+  V(MegamorphicMiss, "megamorphic_miss")                                       \
+  V(MoveNext, "moveNext")                                                      \
+  V(Namespace, "Namespace")                                                    \
+  V(Native, "native")                                                          \
+  V(NoSuchMethod, "noSuchMethod")                                              \
+  V(NoSuchMethodError, "NoSuchMethodError")                                    \
+  V(NotInitialized, "<not initialized>")                                       \
+  V(NotNamed, "<not named>")                                                   \
+  V(Null, "Null")                                                              \
+  V(NullThrownError, "NullThrownError")                                        \
+  V(Number, "num")                                                             \
+  V(Object, "Object")                                                          \
+  V(ObjectPool, "ObjectPool")                                                  \
+  V(Of, "of")                                                                  \
+  V(On, "on")                                                                  \
+  V(OneByteString, "_OneByteString")                                           \
+  V(OptimizedOut, "<optimized out>")                                           \
+  V(OriginalParam, ":original:")                                               \
+  V(Other, "other")                                                            \
+  V(OutOfMemoryError, "OutOfMemoryError")                                      \
+  V(PackageScheme, "package:")                                                 \
+  V(Patch, "patch")                                                            \
+  V(PatchClass, "PatchClass")                                                  \
+  V(PcDescriptors, "PcDescriptors")                                            \
+  V(Pragma, "pragma")                                                          \
+  V(PrependTypeArguments, "_prependTypeArguments")                             \
+  V(QuoteIsNotASubtypeOf, "' is not a subtype of ")                            \
+  V(RParenArrow, ") => ")                                                      \
+  V(RangeError, "RangeError")                                                  \
+  V(RedirectionData, "RedirectionData")                                        \
+  V(RegExp, "RegExp")                                                          \
+  V(RightShiftOperator, ">>")                                                  \
+  V(SavedExceptionVar, ":saved_exception_var")                                 \
+  V(SavedStackTraceVar, ":saved_stack_trace_var")                              \
+  V(SavedTryContextVar, ":saved_try_context_var")                              \
+  V(Script, "Script")                                                          \
+  V(Set, "set")                                                                \
+  V(SetAsyncThreadStackTrace, "_setAsyncThreadStackTrace")                     \
+  V(SetterPrefix, "set:")                                                      \
+  V(Show, "show")                                                              \
+  V(SignatureData, "SignatureData")                                            \
+  V(SingleTargetCache, "SingleTargetCache")                                    \
+  V(SpaceExtendsSpace, " extends ")                                            \
+  V(SpaceIsFromSpace, " is from ")                                             \
+  V(SpaceOfSpace, " of ")                                                      \
+  V(SpaceWhereNewLine, " where\n")                                             \
+  V(StackMap, "StackMap")                                                      \
+  V(StackOverflowError, "StackOverflowError")                                  \
+  V(StackTraceParameter, ":stack_trace")                                       \
+  V(StackTraceVar, ":stack_trace_var")                                         \
+  V(Stream, "stream")                                                          \
+  V(StreamIterator, "StreamIterator")                                          \
+  V(StreamIteratorConstructor, "StreamIterator.")                              \
+  V(StringBase, "_StringBase")                                                 \
+  V(SubtypeTestCache, "SubtypeTestCache")                                      \
+  V(SwitchExpr, ":switch_expr")                                                \
+  V(Symbol, "Symbol")                                                          \
+  V(SymbolCtor, "Symbol.")                                                     \
+  V(Sync, "sync")                                                              \
+  V(TempParam, ":temp_param")                                                  \
+  V(ThrowNew, "_throwNew")                                                     \
+  V(ThrowNewInvocation, "_throwNewInvocation")                                 \
+  V(TopLevel, "::")                                                            \
+  V(TruncDivOperator, "~/")                                                    \
+  V(TryFinallyReturnValue, ":try_finally_return_value")                        \
+  V(TwoByteString, "_TwoByteString")                                           \
+  V(TwoNewlines, "\n\n")                                                       \
+  V(TwoSpaces, "  ")                                                           \
+  V(Type, "Type")                                                              \
+  V(TypeArguments, "TypeArguments")                                            \
+  V(TypeArgumentsParameter, ":type_arguments")                                 \
+  V(TypeError, "_TypeError")                                                   \
+  V(TypeQuote, "type '")                                                       \
+  V(Uint16List, "Uint16List")                                                  \
+  V(Uint32List, "Uint32List")                                                  \
+  V(Uint64List, "Uint64List")                                                  \
+  V(Uint8ClampedList, "Uint8ClampedList")                                      \
+  V(Uint8List, "Uint8List")                                                    \
+  V(UnaryMinus, "unary-")                                                      \
+  V(UnhandledException, "UnhandledException")                                  \
+  V(UnlinkedCall, "UnlinkedCall")                                              \
+  V(UnsafeCast, "unsafeCast")                                                  \
+  V(UnsupportedError, "UnsupportedError")                                      \
+  V(UnwindError, "UnwindError")                                                \
+  V(Value, "value")                                                            \
+  V(Values, "values")                                                          \
+  V(YieldKw, "yield")                                                          \
   V(_AsyncAwaitCompleter, "_AsyncAwaitCompleter")                              \
   V(_AsyncAwaitCompleterConstructor, "_AsyncAwaitCompleter.")                  \
   V(_AsyncAwaitCompleterStart, "_AsyncAwaitCompleter.start")                   \
   V(_AsyncAwaitStart, "start")                                                 \
-  V(CompleterFuture, "future")                                                 \
-  V(CompleterGetFuture, "get:future")                                          \
-  V(StreamIterator, "StreamIterator")                                          \
-  V(StreamIteratorConstructor, "StreamIterator.")                              \
-  V(Native, "native")                                                          \
-  V(Class, "Class")                                                            \
-  V(Null, "Null")                                                              \
-  V(null, "null")                                                              \
-  V(Dynamic, "dynamic")                                                        \
-  V(Type, "Type")                                                              \
-  V(_Type, "_Type")                                                            \
-  V(_TypeRef, "_TypeRef")                                                      \
-  V(_TypeParameter, "_TypeParameter")                                          \
-  V(TypeArguments, "TypeArguments")                                            \
-  V(Patch, "patch")                                                            \
-  V(Pragma, "pragma")                                                          \
-  V(PatchClass, "PatchClass")                                                  \
-  V(Function, "Function")                                                      \
+  V(_AsyncStarListenHelper, "_asyncStarListenHelper")                          \
+  V(_AsyncStarStreamController, "_AsyncStarStreamController")                  \
+  V(_AsyncStarStreamControllerConstructor, "_AsyncStarStreamController.")      \
+  V(_Awaiter, "_awaiter")                                                      \
+  V(_ByteBuffer, "_ByteBuffer")                                                \
+  V(_ByteBufferDot_New, "_ByteBuffer._New")                                    \
+  V(_ByteDataView, "_ByteDataView")                                            \
+  V(_CapabilityImpl, "_CapabilityImpl")                                        \
   V(_Closure, "_Closure")                                                      \
   V(_ClosureCall, "_Closure.call")                                             \
-  V(FunctionResult, "function result")                                         \
-  V(FactoryResult, "factory result")                                           \
-  V(ClosureData, "ClosureData")                                                \
-  V(SignatureData, "SignatureData")                                            \
-  V(RedirectionData, "RedirectionData")                                        \
-  V(FfiTrampolineData, "FfiTrampolineData")                                    \
-  V(Field, "Field")                                                            \
-  V(Script, "Script")                                                          \
-  V(LibraryClass, "Library")                                                   \
-  V(LibraryPrefix, "LibraryPrefix")                                            \
-  V(Namespace, "Namespace")                                                    \
-  V(KernelProgramInfo, "KernelProgramInfo")                                    \
-  V(Code, "Code")                                                              \
-  V(Bytecode, "Bytecode")                                                      \
-  V(Instructions, "Instructions")                                              \
-  V(ObjectPool, "ObjectPool")                                                  \
-  V(PcDescriptors, "PcDescriptors")                                            \
-  V(CodeSourceMap, "CodeSourceMap")                                            \
-  V(StackMap, "StackMap")                                                      \
-  V(LocalVarDescriptors, "LocalVarDescriptors")                                \
-  V(ExceptionHandlers, "ExceptionHandlers")                                    \
-  V(DeoptInfo, "DeoptInfo")                                                    \
-  V(Context, "Context")                                                        \
-  V(ContextScope, "ContextScope")                                              \
-  V(SingleTargetCache, "SingleTargetCache")                                    \
-  V(UnlinkedCall, "UnlinkedCall")                                              \
-  V(ICData, "ICData")                                                          \
-  V(MegamorphicCache, "MegamorphicCache")                                      \
-  V(SubtypeTestCache, "SubtypeTestCache")                                      \
-  V(Error, "Error")                                                            \
-  V(ApiError, "ApiError")                                                      \
-  V(LanguageError, "LanguageError")                                            \
-  V(UnhandledException, "UnhandledException")                                  \
-  V(UnwindError, "UnwindError")                                                \
-  V(_IntegerImplementation, "_IntegerImplementation")                          \
-  V(Number, "num")                                                             \
-  V(_Smi, "_Smi")                                                              \
-  V(_Mint, "_Mint")                                                            \
+  V(_CompileTimeError, "_CompileTimeError")                                    \
+  V(_CompleteOnAsyncReturn, "_completeOnAsyncReturn")                          \
+  V(_DeletedEnumPrefix, "Deleted enum value from ")                            \
+  V(_DeletedEnumSentinel, "_deleted_enum_sentinel")                            \
   V(_Double, "_Double")                                                        \
-  V(Bool, "bool")                                                              \
-  V(_List, "_List")                                                            \
-  V(_ListFactory, "_List.")                                                    \
+  V(_EnumHelper, "_EnumHelper")                                                \
+  V(_EnumNames, "_enum_names")                                                 \
+  V(_ExternalFloat32Array, "_ExternalFloat32Array")                            \
+  V(_ExternalFloat32x4Array, "_ExternalFloat32x4Array")                        \
+  V(_ExternalFloat64Array, "_ExternalFloat64Array")                            \
+  V(_ExternalFloat64x2Array, "_ExternalFloat64x2Array")                        \
+  V(_ExternalInt16Array, "_ExternalInt16Array")                                \
+  V(_ExternalInt32Array, "_ExternalInt32Array")                                \
+  V(_ExternalInt32x4Array, "_ExternalInt32x4Array")                            \
+  V(_ExternalInt64Array, "_ExternalInt64Array")                                \
+  V(_ExternalInt8Array, "_ExternalInt8Array")                                  \
+  V(_ExternalUint16Array, "_ExternalUint16Array")                              \
+  V(_ExternalUint32Array, "_ExternalUint32Array")                              \
+  V(_ExternalUint64Array, "_ExternalUint64Array")                              \
+  V(_ExternalUint8Array, "_ExternalUint8Array")                                \
+  V(_ExternalUint8ClampedArray, "_ExternalUint8ClampedArray")                  \
+  V(_Float32ArrayFactory, "Float32List.")                                      \
+  V(_Float32ArrayView, "_Float32ArrayView")                                    \
+  V(_Float32List, "_Float32List")                                              \
+  V(_Float32x4, "_Float32x4")                                                  \
+  V(_Float32x4ArrayFactory, "Float32x4List.")                                  \
+  V(_Float32x4ArrayView, "_Float32x4ArrayView")                                \
+  V(_Float32x4List, "_Float32x4List")                                          \
+  V(_Float64ArrayFactory, "Float64List.")                                      \
+  V(_Float64ArrayView, "_Float64ArrayView")                                    \
+  V(_Float64List, "_Float64List")                                              \
+  V(_Float64x2, "_Float64x2")                                                  \
+  V(_Float64x2ArrayFactory, "Float64x2List.")                                  \
+  V(_Float64x2ArrayView, "_Float64x2ArrayView")                                \
+  V(_Float64x2List, "_Float64x2List")                                          \
   V(_GrowableList, "_GrowableList")                                            \
   V(_GrowableListFactory, "_GrowableList.")                                    \
   V(_GrowableListWithData, "_GrowableList.withData")                           \
   V(_ImmutableList, "_ImmutableList")                                          \
-  V(_LinkedHashMap, "_InternalLinkedHashMap")                                  \
-  V(_rehashObjects, "_rehashObjects")                                          \
-  V(_String, "String")                                                         \
-  V(OneByteString, "_OneByteString")                                           \
-  V(TwoByteString, "_TwoByteString")                                           \
-  V(ExternalOneByteString, "_ExternalOneByteString")                           \
-  V(ExternalTwoByteString, "_ExternalTwoByteString")                           \
-  V(_CapabilityImpl, "_CapabilityImpl")                                        \
-  V(_RawReceivePortImpl, "_RawReceivePortImpl")                                \
-  V(_SendPortImpl, "_SendPortImpl")                                            \
-  V(_StackTrace, "_StackTrace")                                                \
-  V(_RegExp, "_RegExp")                                                        \
-  V(RegExp, "RegExp")                                                          \
-  V(ColonMatcher, ":matcher")                                                  \
-  V(ColonStream, ":stream")                                                    \
-  V(Object, "Object")                                                          \
-  V(Int, "int")                                                                \
-  V(Double, "double")                                                          \
-  V(Float32x4, "Float32x4")                                                    \
-  V(Float64x2, "Float64x2")                                                    \
-  V(Int32x4, "Int32x4")                                                        \
-  V(_Float32x4, "_Float32x4")                                                  \
-  V(_Float64x2, "_Float64x2")                                                  \
-  V(_Int32x4, "_Int32x4")                                                      \
-  V(Int8List, "Int8List")                                                      \
-  V(Uint8List, "Uint8List")                                                    \
-  V(Uint8ClampedList, "Uint8ClampedList")                                      \
-  V(Int16List, "Int16List")                                                    \
-  V(Uint16List, "Uint16List")                                                  \
-  V(Int32List, "Int32List")                                                    \
-  V(Uint32List, "Uint32List")                                                  \
-  V(Int64List, "Int64List")                                                    \
-  V(Uint64List, "Uint64List")                                                  \
-  V(Float32x4List, "Float32x4List")                                            \
-  V(Int32x4List, "Int32x4List")                                                \
-  V(Float64x2List, "Float64x2List")                                            \
-  V(Float32List, "Float32List")                                                \
-  V(Float64List, "Float64List")                                                \
-  V(_Int8List, "_Int8List")                                                    \
-  V(_Uint8List, "_Uint8List")                                                  \
-  V(_Uint8ClampedList, "_Uint8ClampedList")                                    \
-  V(_Int16List, "_Int16List")                                                  \
-  V(_Uint16List, "_Uint16List")                                                \
-  V(_Int32List, "_Int32List")                                                  \
-  V(_Uint32List, "_Uint32List")                                                \
-  V(_Int64List, "_Int64List")                                                  \
-  V(_Uint64List, "_Uint64List")                                                \
-  V(_Float32x4List, "_Float32x4List")                                          \
-  V(_Int32x4List, "_Int32x4List")                                              \
-  V(_Float64x2List, "_Float64x2List")                                          \
-  V(_Float32List, "_Float32List")                                              \
-  V(_Float64List, "_Float64List")                                              \
-  V(_Int8ArrayFactory, "Int8List.")                                            \
-  V(_Uint8ArrayFactory, "Uint8List.")                                          \
-  V(_Uint8ClampedArrayFactory, "Uint8ClampedList.")                            \
   V(_Int16ArrayFactory, "Int16List.")                                          \
-  V(_Uint16ArrayFactory, "Uint16List.")                                        \
-  V(_Int32ArrayFactory, "Int32List.")                                          \
-  V(_Uint32ArrayFactory, "Uint32List.")                                        \
-  V(_Int64ArrayFactory, "Int64List.")                                          \
-  V(_Uint64ArrayFactory, "Uint64List.")                                        \
-  V(_Float32x4ArrayFactory, "Float32x4List.")                                  \
-  V(_Int32x4ArrayFactory, "Int32x4List.")                                      \
-  V(_Float64x2ArrayFactory, "Float64x2List.")                                  \
-  V(_Float32ArrayFactory, "Float32List.")                                      \
-  V(_Float64ArrayFactory, "Float64List.")                                      \
-  V(_Int8ArrayView, "_Int8ArrayView")                                          \
-  V(_Uint8ArrayView, "_Uint8ArrayView")                                        \
-  V(_Uint8ClampedArrayView, "_Uint8ClampedArrayView")                          \
   V(_Int16ArrayView, "_Int16ArrayView")                                        \
-  V(_Uint16ArrayView, "_Uint16ArrayView")                                      \
+  V(_Int16List, "_Int16List")                                                  \
+  V(_Int32ArrayFactory, "Int32List.")                                          \
   V(_Int32ArrayView, "_Int32ArrayView")                                        \
-  V(_Uint32ArrayView, "_Uint32ArrayView")                                      \
-  V(_Int64ArrayView, "_Int64ArrayView")                                        \
-  V(_Uint64ArrayView, "_Uint64ArrayView")                                      \
-  V(_Float32ArrayView, "_Float32ArrayView")                                    \
-  V(_Float64ArrayView, "_Float64ArrayView")                                    \
-  V(_Float32x4ArrayView, "_Float32x4ArrayView")                                \
+  V(_Int32List, "_Int32List")                                                  \
+  V(_Int32x4, "_Int32x4")                                                      \
+  V(_Int32x4ArrayFactory, "Int32x4List.")                                      \
   V(_Int32x4ArrayView, "_Int32x4ArrayView")                                    \
-  V(_Float64x2ArrayView, "_Float64x2ArrayView")                                \
-  V(_ExternalInt8Array, "_ExternalInt8Array")                                  \
-  V(_ExternalUint8Array, "_ExternalUint8Array")                                \
-  V(_ExternalUint8ClampedArray, "_ExternalUint8ClampedArray")                  \
-  V(_ExternalInt16Array, "_ExternalInt16Array")                                \
-  V(_ExternalUint16Array, "_ExternalUint16Array")                              \
-  V(_ExternalInt32Array, "_ExternalInt32Array")                                \
-  V(_ExternalUint32Array, "_ExternalUint32Array")                              \
-  V(_ExternalInt64Array, "_ExternalInt64Array")                                \
-  V(_ExternalUint64Array, "_ExternalUint64Array")                              \
-  V(_ExternalFloat32x4Array, "_ExternalFloat32x4Array")                        \
-  V(_ExternalInt32x4Array, "_ExternalInt32x4Array")                            \
-  V(_ExternalFloat32Array, "_ExternalFloat32Array")                            \
-  V(_ExternalFloat64Array, "_ExternalFloat64Array")                            \
-  V(_ExternalFloat64x2Array, "_ExternalFloat64x2Array")                        \
-  V(ByteData, "ByteData")                                                      \
-  V(ByteDataDot, "ByteData.")                                                  \
-  V(ByteDataDot_view, "ByteData._view")                                        \
-  V(_ByteDataView, "_ByteDataView")                                            \
-  V(_ByteBuffer, "_ByteBuffer")                                                \
-  V(_ByteBufferDot_New, "_ByteBuffer._New")                                    \
-  V(_WeakProperty, "_WeakProperty")                                            \
-  V(_MirrorReference, "_MirrorReference")                                      \
-  V(FreeListElement, "FreeListElement")                                        \
-  V(ForwardingCorpse, "ForwardingCorpse")                                      \
-  V(InvocationMirror, "_InvocationMirror")                                     \
-  V(AllocateInvocationMirror, "_allocateInvocationMirror")                     \
-  V(AllocateInvocationMirrorForClosure, "_allocateInvocationMirrorForClosure") \
-  V(toString, "toString")                                                      \
-  V(_lookupHandler, "_lookupHandler")                                          \
-  V(_handleMessage, "_handleMessage")                                          \
-  V(DotCreate, "._create")                                                     \
-  V(DotWithType, "._withType")                                                 \
-  V(_get, "_get")                                                              \
-  V(RangeError, "RangeError")                                                  \
-  V(DotRange, ".range")                                                        \
-  V(ArgumentError, "ArgumentError")                                            \
-  V(DotValue, ".value")                                                        \
-  V(FormatException, "FormatException")                                        \
-  V(UnsupportedError, "UnsupportedError")                                      \
-  V(StackOverflowError, "StackOverflowError")                                  \
-  V(OutOfMemoryError, "OutOfMemoryError")                                      \
-  V(NullThrownError, "NullThrownError")                                        \
-  V(IsolateSpawnException, "IsolateSpawnException")                            \
-  V(BooleanExpression, "boolean expression")                                   \
-  V(MegamorphicMiss, "megamorphic_miss")                                       \
-  V(CommaSpace, ", ")                                                          \
-  V(RParenArrow, ") => ")                                                      \
-  V(SpaceExtendsSpace, " extends ")                                            \
-  V(SpaceWhereNewLine, " where\n")                                             \
-  V(SpaceIsFromSpace, " is from ")                                             \
-  V(InTypeCast, " in type cast")                                               \
-  V(TypeQuote, "type '")                                                       \
-  V(QuoteIsNotASubtypeOf, "' is not a subtype of ")                            \
-  V(SpaceOfSpace, " of ")                                                      \
-  V(SwitchExpr, ":switch_expr")                                                \
-  V(TwoNewlines, "\n\n")                                                       \
-  V(TwoSpaces, "  ")                                                           \
-  V(_instanceOf, "_instanceOf")                                                \
-  V(_simpleInstanceOf, "_simpleInstanceOf")                                    \
-  V(_simpleInstanceOfTrue, "_simpleInstanceOfTrue")                            \
-  V(_simpleInstanceOfFalse, "_simpleInstanceOfFalse")                          \
-  V(GetterPrefix, "get:")                                                      \
-  V(SetterPrefix, "set:")                                                      \
-  V(InitPrefix, "init:")                                                       \
-  V(DynamicPrefix, "dyn:")                                                     \
-  V(Index, "index")                                                            \
-  V(DartScheme, "dart:")                                                       \
-  V(DartSchemePrivate, "dart:_")                                               \
-  V(DartInternalPackage, "package:dart_internal/")                             \
-  V(DartNativeWrappers, "dart:nativewrappers")                                 \
-  V(DartNativeWrappersLibName, "nativewrappers")                               \
-  V(DartCore, "dart:core")                                                     \
-  V(DartCollection, "dart:collection")                                         \
-  V(DartDeveloper, "dart:developer")                                           \
-  V(DartFfi, "dart:ffi")                                                       \
-  V(DartFfiLibName, "ffi")                                                     \
-  V(DartInternal, "dart:_internal")                                            \
-  V(DartIsolate, "dart:isolate")                                               \
-  V(DartMirrors, "dart:mirrors")                                               \
-  V(DartTypedData, "dart:typed_data")                                          \
-  V(DartVMService, "dart:_vmservice")                                          \
-  V(DartIOLibName, "dart.io")                                                  \
-  V(DartVMProduct, "dart.vm.product")                                          \
-  V(DartDeveloperTimeline, "dart.developer.timeline")                          \
-  V(EvalSourceUri, "evaluate:source")                                          \
-  V(ExternalName, "ExternalName")                                              \
-  V(_Random, "_Random")                                                        \
-  V(_state, "_state")                                                          \
-  V(_stackTrace, "_stackTrace")                                                \
-  V(_SpecialTypeMirror, "_SpecialTypeMirror")                                  \
+  V(_Int32x4List, "_Int32x4List")                                              \
+  V(_Int64ArrayFactory, "Int64List.")                                          \
+  V(_Int64ArrayView, "_Int64ArrayView")                                        \
+  V(_Int64List, "_Int64List")                                                  \
+  V(_Int8ArrayFactory, "Int8List.")                                            \
+  V(_Int8ArrayView, "_Int8ArrayView")                                          \
+  V(_Int8List, "_Int8List")                                                    \
+  V(_IntegerImplementation, "_IntegerImplementation")                          \
+  V(_LibraryPrefix, "_LibraryPrefix")                                          \
+  V(_LinkedHashMap, "_InternalLinkedHashMap")                                  \
+  V(_LinkedHashSet, "_CompactLinkedHashSet")                                   \
+  V(_List, "_List")                                                            \
+  V(_ListFactory, "_List.")                                                    \
   V(_LocalClassMirror, "_LocalClassMirror")                                    \
-  V(_LocalFunctionTypeMirror, "_LocalFunctionTypeMirror")                      \
-  V(_LocalLibraryMirror, "_LocalLibraryMirror")                                \
-  V(_LocalLibraryDependencyMirror, "_LocalLibraryDependencyMirror")            \
   V(_LocalCombinatorMirror, "_LocalCombinatorMirror")                          \
-  V(_LocalMethodMirror, "_LocalMethodMirror")                                  \
-  V(_LocalVariableMirror, "_LocalVariableMirror")                              \
-  V(_LocalParameterMirror, "_LocalParameterMirror")                            \
+  V(_LocalFunctionTypeMirror, "_LocalFunctionTypeMirror")                      \
   V(_LocalIsolateMirror, "_LocalIsolateMirror")                                \
+  V(_LocalLibraryDependencyMirror, "_LocalLibraryDependencyMirror")            \
+  V(_LocalLibraryMirror, "_LocalLibraryMirror")                                \
+  V(_LocalMethodMirror, "_LocalMethodMirror")                                  \
   V(_LocalMirrorSystem, "_LocalMirrorSystem")                                  \
-  V(_LocalTypedefMirror, "_LocalTypedefMirror")                                \
+  V(_LocalParameterMirror, "_LocalParameterMirror")                            \
   V(_LocalTypeVariableMirror, "_LocalTypeVariableMirror")                      \
+  V(_LocalTypedefMirror, "_LocalTypedefMirror")                                \
+  V(_LocalVariableMirror, "_LocalVariableMirror")                              \
+  V(_Mint, "_Mint")                                                            \
+  V(_MirrorReference, "_MirrorReference")                                      \
+  V(_Random, "_Random")                                                        \
+  V(_RawReceivePortImpl, "_RawReceivePortImpl")                                \
+  V(_RegExp, "_RegExp")                                                        \
+  V(_SendPortImpl, "_SendPortImpl")                                            \
+  V(_Smi, "_Smi")                                                              \
   V(_SourceLocation, "_SourceLocation")                                        \
-  V(hashCode, "get:hashCode")                                                  \
-  V(identityHashCode, "identityHashCode")                                      \
-  V(OptimizedOut, "<optimized out>")                                           \
-  V(NotInitialized, "<not initialized>")                                       \
-  V(NotNamed, "<not named>")                                                   \
-  V(OriginalParam, ":original:")                                               \
-  V(TempParam, ":temp_param")                                                  \
+  V(_SpecialTypeMirror, "_SpecialTypeMirror")                                  \
+  V(_StackTrace, "_StackTrace")                                                \
+  V(_StreamImpl, "_StreamImpl")                                                \
+  V(_String, "String")                                                         \
+  V(_SyncIterable, "_SyncIterable")                                            \
+  V(_SyncIterableConstructor, "_SyncIterable.")                                \
+  V(_SyncIterator, "_SyncIterator")                                            \
+  V(_Type, "_Type")                                                            \
+  V(_TypeParameter, "_TypeParameter")                                          \
+  V(_TypeRef, "_TypeRef")                                                      \
+  V(_Uint16ArrayFactory, "Uint16List.")                                        \
+  V(_Uint16ArrayView, "_Uint16ArrayView")                                      \
+  V(_Uint16List, "_Uint16List")                                                \
+  V(_Uint32ArrayFactory, "Uint32List.")                                        \
+  V(_Uint32ArrayView, "_Uint32ArrayView")                                      \
+  V(_Uint32List, "_Uint32List")                                                \
+  V(_Uint64ArrayFactory, "Uint64List.")                                        \
+  V(_Uint64ArrayView, "_Uint64ArrayView")                                      \
+  V(_Uint64List, "_Uint64List")                                                \
+  V(_Uint8ArrayFactory, "Uint8List.")                                          \
+  V(_Uint8ArrayView, "_Uint8ArrayView")                                        \
+  V(_Uint8ClampedArrayFactory, "Uint8ClampedList.")                            \
+  V(_Uint8ClampedArrayView, "_Uint8ClampedArrayView")                          \
+  V(_Uint8ClampedList, "_Uint8ClampedList")                                    \
+  V(_Uint8List, "_Uint8List")                                                  \
   V(_UserTag, "_UserTag")                                                      \
-  V(Default, "Default")                                                        \
-  V(ClassID, "ClassID")                                                        \
-  V(getID, "getID")                                                            \
-  V(DartIsVM, "dart.isVM")                                                     \
-  V(stack, ":stack")                                                           \
-  V(stack_pointer, ":stack_pointer")                                           \
-  V(current_character, ":current_character")                                   \
-  V(current_position, ":current_position")                                     \
-  V(string_param_length, ":string_param_length")                               \
-  V(capture_length, ":capture_length")                                         \
-  V(word_character_map, ":word_character_map")                                 \
-  V(match_start_index, ":match_start_index")                                   \
-  V(capture_start_index, ":capture_start_index")                               \
-  V(match_end_index, ":match_end_index")                                       \
-  V(char_in_capture, ":char_in_capture")                                       \
-  V(char_in_match, ":char_in_match")                                           \
-  V(index_temp, ":index_temp")                                                 \
-  V(result, ":result")                                                         \
-  V(position_registers, ":position_registers")                                 \
-  V(string_param, ":string_param")                                             \
-  V(start_index_param, ":start_index_param")                                   \
-  V(clear, "clear")                                                            \
-  V(_wordCharacterMap, "_wordCharacterMap")                                    \
-  V(print, "print")                                                            \
-  V(last, "last")                                                              \
-  V(removeLast, "removeLast")                                                  \
-  V(add, "add")                                                                \
-  V(ConstructorStacktracePrefix, "new ")                                       \
-  V(_runExtension, "_runExtension")                                            \
-  V(_runPendingImmediateCallback, "_runPendingImmediateCallback")              \
-  V(_ensureScheduleImmediate, "_ensureScheduleImmediate")                      \
-  V(DartLibrary, "dart.library.")                                              \
-  V(DartLibraryMirrors, "dart.library.mirrors")                                \
-  V(DartLibraryFfi, "dart.library.ffi")                                        \
-  V(_name, "_name")                                                            \
-  V(name, "name")                                                              \
-  V(options, "options")                                                        \
+  V(_WeakProperty, "_WeakProperty")                                            \
   V(_classRangeCheck, "_classRangeCheck")                                      \
   V(_classRangeCheckNegative, "_classRangeCheckNegative")                      \
-  V(GetRuntimeType, "get:runtimeType")                                         \
-  V(HaveSameRuntimeType, "_haveSameRuntimeType")                               \
-  V(PrependTypeArguments, "_prependTypeArguments")                             \
-  V(DartDeveloperCausalAsyncStacks, "dart.developer.causal_async_stacks")      \
-  V(_AsyncStarListenHelper, "_asyncStarListenHelper")                          \
-  V(GrowRegExpStack, "_growRegExpStack")                                       \
-  V(DebugProcedureName, ":Eval")                                               \
-  V(DebugClassName, "#DebugClass")                                             \
+  V(_current, "_current")                                                      \
+  V(_ensureScheduleImmediate, "_ensureScheduleImmediate")                      \
+  V(_get, "_get")                                                              \
+  V(_handleMessage, "_handleMessage")                                          \
+  V(_instanceOf, "_instanceOf")                                                \
+  V(_lookupHandler, "_lookupHandler")                                          \
+  V(_name, "_name")                                                            \
+  V(_rehashObjects, "_rehashObjects")                                          \
+  V(_runExtension, "_runExtension")                                            \
+  V(_runPendingImmediateCallback, "_runPendingImmediateCallback")              \
+  V(_setLength, "_setLength")                                                  \
+  V(_simpleInstanceOf, "_simpleInstanceOf")                                    \
+  V(_simpleInstanceOfFalse, "_simpleInstanceOfFalse")                          \
+  V(_simpleInstanceOfTrue, "_simpleInstanceOfTrue")                            \
+  V(_stackTrace, "_stackTrace")                                                \
+  V(_state, "_state")                                                          \
+  V(_wordCharacterMap, "_wordCharacterMap")                                    \
+  V(_yieldEachIterable, "_yieldEachIterable")                                  \
+  V(add, "add")                                                                \
+  V(capture_length, ":capture_length")                                         \
+  V(capture_start_index, ":capture_start_index")                               \
+  V(char_in_capture, ":char_in_capture")                                       \
+  V(char_in_match, ":char_in_match")                                           \
+  V(clear, "clear")                                                            \
+  V(current_character, ":current_character")                                   \
+  V(current_position, ":current_position")                                     \
+  V(getID, "getID")                                                            \
+  V(hashCode, "get:hashCode")                                                  \
+  V(identityHashCode, "identityHashCode")                                      \
+  V(index_temp, ":index_temp")                                                 \
+  V(isPaused, "isPaused")                                                      \
+  V(last, "last")                                                              \
+  V(match_end_index, ":match_end_index")                                       \
+  V(match_start_index, ":match_start_index")                                   \
+  V(name, "name")                                                              \
+  V(null, "null")                                                              \
+  V(options, "options")                                                        \
+  V(position_registers, ":position_registers")                                 \
+  V(print, "print")                                                            \
+  V(removeLast, "removeLast")                                                  \
+  V(result, ":result")                                                         \
+  V(stack, ":stack")                                                           \
+  V(stack_pointer, ":stack_pointer")                                           \
+  V(start_index_param, ":start_index_param")                                   \
+  V(string_param, ":string_param")                                             \
+  V(string_param_length, ":string_param_length")                               \
+  V(toString, "toString")                                                      \
   V(vm_entry_point, "vm:entry-point")                                          \
-  V(vm_non_nullable_result_type, "vm:non-nullable-result-type")                \
   V(vm_exact_result_type, "vm:exact-result-type")                              \
-  V(Get, "get")                                                                \
-  V(Set, "set")                                                                \
+  V(vm_non_nullable_result_type, "vm:non-nullable-result-type")                \
   V(vm_trace_entrypoints, "vm:testing.unsafe.trace-entrypoints-fn")            \
-  V(BoundsCheckForPartialInstantiation, "_boundsCheckForPartialInstantiation") \
-  V(FfiPointer, "Pointer")                                                     \
-  V(FfiNativeFunction, "NativeFunction")                                       \
-  V(FfiInt8, "Int8")                                                           \
-  V(FfiInt16, "Int16")                                                         \
-  V(FfiInt32, "Int32")                                                         \
-  V(FfiInt64, "Int64")                                                         \
-  V(FfiUint8, "Uint8")                                                         \
-  V(FfiUint16, "Uint16")                                                       \
-  V(FfiUint32, "Uint32")                                                       \
-  V(FfiUint64, "Uint64")                                                       \
-  V(FfiIntPtr, "IntPtr")                                                       \
-  V(FfiFloat, "Float")                                                         \
-  V(FfiDouble, "Double")                                                       \
-  V(FfiVoid, "Void")                                                           \
-  V(FfiNativeType, "NativeType")                                               \
-  V(FfiDynamicLibrary, "DynamicLibrary")
+  V(word_character_map, ":word_character_map")
 
 // Contains a list of frequently used strings in a canonicalized form. This
 // list is kept in the vm_isolate in order to share the copy across isolates
@@ -627,8 +631,6 @@
   // Initialize and setup a symbol table for the isolate.
   static void SetupSymbolTable(Isolate* isolate);
 
-  static RawArray* UnifiedSymbolTable();
-
   // Treat the symbol table as weak and collect garbage.
   static void Compact();
 
diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc
index 866af84..e4b6658 100644
--- a/runtime/vm/thread.cc
+++ b/runtime/vm/thread.cc
@@ -74,7 +74,10 @@
       unboxed_int64_runtime_arg_(0),
       active_exception_(Object::null()),
       active_stacktrace_(Object::null()),
+      global_object_pool_(ObjectPool::null()),
       resume_pc_(0),
+      execution_state_(kThreadInNative),
+      safepoint_state_(0),
       task_kind_(kUnknownTask),
       dart_stream_(NULL),
       thread_lock_(new Monitor()),
@@ -96,10 +99,9 @@
       pending_functions_(GrowableObjectArray::null()),
       sticky_error_(Error::null()),
       REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_INITIALIZERS)
-          REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_INIT) safepoint_state_(0),
-      execution_state_(kThreadInNative),
+          REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_SCOPE_INIT)
 #if defined(USING_SAFE_STACK)
-      saved_safestack_limit_(0),
+              saved_safestack_limit_(0),
 #endif
 #if !defined(DART_PRECOMPILED_RUNTIME)
       interpreter_(nullptr),
@@ -383,6 +385,7 @@
     thread->DeferredMarkingStackRelease();
   }
   thread->StoreBufferRelease();
+  thread->heap()->AbandonRemainingTLAB(thread);
   Isolate* isolate = thread->isolate();
   ASSERT(isolate != NULL);
   const bool kIsNotMutatorThread = false;
@@ -404,7 +407,7 @@
   // The thread setting the stack limit is not necessarily the thread which
   // the stack limit is being set on.
   MonitorLocker ml(thread_lock_);
-  if (stack_limit_ == saved_stack_limit_) {
+  if (!HasScheduledInterrupts()) {
     // No interrupt pending, set stack_limit_ too.
     stack_limit_ = limit;
   }
@@ -662,6 +665,7 @@
   reusable_handles_.VisitObjectPointers(visitor);
 
   visitor->VisitPointer(reinterpret_cast<RawObject**>(&pending_functions_));
+  visitor->VisitPointer(reinterpret_cast<RawObject**>(&global_object_pool_));
   visitor->VisitPointer(reinterpret_cast<RawObject**>(&active_exception_));
   visitor->VisitPointer(reinterpret_cast<RawObject**>(&active_stacktrace_));
   visitor->VisitPointer(reinterpret_cast<RawObject**>(&sticky_error_));
@@ -739,7 +743,7 @@
   // [object] is in fact a [Code] object.
   if (object.IsCode()) {
 #define COMPUTE_OFFSET(type_name, member_name, expr, default_init_value)       \
-  ASSERT((expr)->IsVMHeapObject());                                            \
+  ASSERT((expr)->InVMIsolateHeap());                                           \
   if (object.raw() == expr) {                                                  \
     return Thread::member_name##offset();                                      \
   }
@@ -750,7 +754,6 @@
   // For non [Code] objects we check if the object equals to any of the cached
   // non-stub entries.
 #define COMPUTE_OFFSET(type_name, member_name, expr, default_init_value)       \
-  ASSERT((expr)->IsVMHeapObject());                                            \
   if (object.raw() == expr) {                                                  \
     return Thread::member_name##offset();                                      \
   }
diff --git a/runtime/vm/thread.h b/runtime/vm/thread.h
index 1c89d5d..f5b7c97 100644
--- a/runtime/vm/thread.h
+++ b/runtime/vm/thread.h
@@ -19,6 +19,7 @@
 #include "vm/handles.h"
 #include "vm/heap/pointer_block.h"
 #include "vm/os_thread.h"
+#include "vm/random.h"
 #include "vm/runtime_entry_list.h"
 #include "vm/thread_stack_resource.h"
 #include "vm/thread_state.h"
@@ -120,15 +121,16 @@
     StubCode::DeoptimizeLazyFromThrow().raw(), NULL)                           \
   V(RawCode*, slow_type_test_stub_, StubCode::SlowTypeTest().raw(), NULL)      \
   V(RawCode*, lazy_specialize_type_test_stub_,                                 \
-    StubCode::LazySpecializeTypeTest().raw(), NULL)
+    StubCode::LazySpecializeTypeTest().raw(), NULL)                            \
+  V(RawCode*, enter_safepoint_stub_, StubCode::EnterSafepoint().raw(), NULL)   \
+  V(RawCode*, exit_safepoint_stub_, StubCode::ExitSafepoint().raw(), NULL)
 
 #endif
 
 #define CACHED_NON_VM_STUB_LIST(V)                                             \
   V(RawObject*, object_null_, Object::null(), NULL)                            \
   V(RawBool*, bool_true_, Object::bool_true().raw(), NULL)                     \
-  V(RawBool*, bool_false_, Object::bool_false().raw(), NULL)                   \
-  V(RawObjectPool*, global_object_pool_, ObjectPool::null(), NULL)
+  V(RawBool*, bool_false_, Object::bool_false().raw(), NULL)
 
 // List of VM-global objects/addresses cached in each Thread object.
 // Important: constant false must immediately follow constant true.
@@ -307,6 +309,10 @@
   }
 #endif
 
+  static intptr_t safepoint_state_offset() {
+    return OFFSET_OF(Thread, safepoint_state_);
+  }
+
   TaskKind task_kind() const { return task_kind_; }
 
   // Retrieves and clears the stack overflow flags.  These are set by
@@ -567,6 +573,10 @@
   RawGrowableObjectArray* pending_functions();
   void clear_pending_functions();
 
+  static intptr_t global_object_pool_offset() {
+    return OFFSET_OF(Thread, global_object_pool_);
+  }
+
   RawObject* active_exception() const { return active_exception_; }
   void set_active_exception(const Object& value);
   static intptr_t active_exception_offset() {
@@ -669,8 +679,8 @@
     do {
       old_state = safepoint_state_;
       new_state = SafepointRequestedField::update(value, old_state);
-    } while (AtomicOperations::CompareAndSwapUint32(
-                 &safepoint_state_, old_state, new_state) != old_state);
+    } while (AtomicOperations::CompareAndSwapWord(&safepoint_state_, old_state,
+                                                  new_state) != old_state);
     return old_state;
   }
   static bool IsBlockedForSafepoint(uint32_t state) {
@@ -702,7 +712,10 @@
     return static_cast<ExecutionState>(execution_state_);
   }
   void set_execution_state(ExecutionState state) {
-    execution_state_ = static_cast<uint32_t>(state);
+    execution_state_ = static_cast<uword>(state);
+  }
+  static intptr_t execution_state_offset() {
+    return OFFSET_OF(Thread, execution_state_);
   }
 
   virtual bool MayAllocateHandles() {
@@ -710,10 +723,13 @@
            (execution_state() == kThreadInGenerated);
   }
 
+  static uword safepoint_state_unacquired() { return SetAtSafepoint(false, 0); }
+  static uword safepoint_state_acquired() { return SetAtSafepoint(true, 0); }
+
   bool TryEnterSafepoint() {
     uint32_t new_state = SetAtSafepoint(true, 0);
-    if (AtomicOperations::CompareAndSwapUint32(&safepoint_state_, 0,
-                                               new_state) != 0) {
+    if (AtomicOperations::CompareAndSwapWord(&safepoint_state_, 0, new_state) !=
+        0) {
       return false;
     }
     return true;
@@ -731,8 +747,8 @@
 
   bool TryExitSafepoint() {
     uint32_t old_state = SetAtSafepoint(true, 0);
-    if (AtomicOperations::CompareAndSwapUint32(&safepoint_state_, old_state,
-                                               0) != old_state) {
+    if (AtomicOperations::CompareAndSwapWord(&safepoint_state_, old_state, 0) !=
+        old_state) {
       return false;
     }
     return true;
@@ -768,6 +784,8 @@
 
   void InitVMConstants();
 
+  uint64_t GetRandomUInt64() { return thread_random_.NextUInt64(); }
+
 #ifndef PRODUCT
   void PrintJSON(JSONStream* stream) const;
 #endif
@@ -796,11 +814,11 @@
   Heap* heap_;
   uword top_;
   uword end_;
-  uword top_exit_frame_info_;
+  uword volatile top_exit_frame_info_;
   StoreBufferBlock* store_buffer_block_;
   MarkingStackBlock* marking_stack_block_;
   MarkingStackBlock* deferred_marking_stack_block_;
-  uword vm_tag_;
+  uword volatile vm_tag_;
   RawStackTrace* async_stack_trace_;
   // Memory location dedicated for passing unboxed int64 values from
   // generated code to runtime.
@@ -830,7 +848,10 @@
   // JumpToExceptionHandler state:
   RawObject* active_exception_;
   RawObject* active_stacktrace_;
+  RawObjectPool* global_object_pool_;
   uword resume_pc_;
+  uword execution_state_;
+  uword safepoint_state_;
 
   // ---- End accessed from generated code. ----
 
@@ -864,6 +885,8 @@
 
   RawError* sticky_error_;
 
+  Random thread_random_;
+
 // Reusable handles support.
 #define REUSABLE_HANDLE_FIELDS(object) object* object##_handle_;
   REUSABLE_HANDLE_LIST(REUSABLE_HANDLE_FIELDS)
@@ -880,8 +903,6 @@
   class SafepointRequestedField : public BitField<uint32_t, bool, 1, 1> {};
   class BlockedForSafepointField : public BitField<uint32_t, bool, 2, 1> {};
   class BypassSafepointsField : public BitField<uint32_t, bool, 3, 1> {};
-  uint32_t safepoint_state_;
-  uint32_t execution_state_;
 
 #if defined(USING_SAFE_STACK)
   uword saved_safestack_limit_;
diff --git a/runtime/vm/thread_interrupter.cc b/runtime/vm/thread_interrupter.cc
index ebb07bd..a7becbe 100644
--- a/runtime/vm/thread_interrupter.cc
+++ b/runtime/vm/thread_interrupter.cc
@@ -116,6 +116,10 @@
 
 // Delay between interrupts.
 void ThreadInterrupter::SetInterruptPeriod(intptr_t period) {
+  if (!initialized_) {
+    // Profiler may not be enabled.
+    return;
+  }
   MonitorLocker ml(monitor_);
   if (shutdown_) {
     return;
diff --git a/runtime/vm/thread_test.cc b/runtime/vm/thread_test.cc
index 7eeb900..9a42800 100644
--- a/runtime/vm/thread_test.cc
+++ b/runtime/vm/thread_test.cc
@@ -910,4 +910,56 @@
   }
 }
 
+class AllocateGlobsOfMemoryTask : public ThreadPool::Task {
+ public:
+  AllocateGlobsOfMemoryTask(Isolate* isolate, Monitor* done_monitor, bool* done)
+      : isolate_(isolate), done_monitor_(done_monitor), done_(done) {}
+
+  virtual void Run() {
+    Thread::EnterIsolateAsHelper(isolate_, Thread::kUnknownTask);
+    {
+      Thread* thread = Thread::Current();
+      StackZone stack_zone(thread);
+      Zone* zone = stack_zone.GetZone();
+      HANDLESCOPE(thread);
+      int count = 100 * 1000;
+      while (count-- > 0) {
+        String::Handle(zone, String::New("abc"));
+      }
+    }
+    Thread::ExitIsolateAsHelper();
+    // Tell main thread that we are ready.
+    {
+      MonitorLocker ml(done_monitor_);
+      ASSERT(!*done_);
+      *done_ = true;
+      ml.Notify();
+    }
+  }
+
+ private:
+  Isolate* isolate_;
+  Monitor* done_monitor_;
+  bool* done_;
+};
+
+ISOLATE_UNIT_TEST_CASE(ExerciseTLABs) {
+  const int NUMBER_TEST_THREADS = 10;
+  Monitor done_monitor[NUMBER_TEST_THREADS];
+  bool done[NUMBER_TEST_THREADS];
+  Isolate* isolate = thread->isolate();
+  for (int i = 0; i < NUMBER_TEST_THREADS; i++) {
+    done[i] = false;
+    Dart::thread_pool()->Run(
+        new AllocateGlobsOfMemoryTask(isolate, &done_monitor[i], &done[i]));
+  }
+
+  for (int i = 0; i < NUMBER_TEST_THREADS; i++) {
+    MonitorLocker ml(&done_monitor[i]);
+    while (!done[i]) {
+      ml.WaitWithSafepointCheck(thread);
+    }
+  }
+}
+
 }  // namespace dart
diff --git a/runtime/vm/timeline.cc b/runtime/vm/timeline.cc
index 1f96aac..158c1c3 100644
--- a/runtime/vm/timeline.cc
+++ b/runtime/vm/timeline.cc
@@ -205,8 +205,8 @@
   ASSERT(recorder_ != NULL);
   enabled_streams_ = GetEnabledByDefaultTimelineStreams();
 // Global overrides.
-#define TIMELINE_STREAM_FLAG_DEFAULT(name, not_used)                           \
-  stream_##name##_.Init(#name, HasStream(enabled_streams_, #name));
+#define TIMELINE_STREAM_FLAG_DEFAULT(name, fuchsia_name)                       \
+  stream_##name##_.set_enabled(HasStream(enabled_streams_, #name));
   TIMELINE_STREAM_LIST(TIMELINE_STREAM_FLAG_DEFAULT)
 #undef TIMELINE_STREAM_FLAG_DEFAULT
 }
@@ -221,7 +221,7 @@
 #endif
 
 // Disable global streams.
-#define TIMELINE_STREAM_DISABLE(name, not_used)                                \
+#define TIMELINE_STREAM_DISABLE(name, fuchsia_name)                            \
   Timeline::stream_##name##_.set_enabled(false);
   TIMELINE_STREAM_LIST(TIMELINE_STREAM_DISABLE)
 #undef TIMELINE_STREAM_DISABLE
@@ -270,13 +270,13 @@
   }
   {
     JSONArray availableStreams(&obj, "availableStreams");
-#define ADD_STREAM_NAME(name, not_used) availableStreams.AddValue(#name);
+#define ADD_STREAM_NAME(name, fuchsia_name) availableStreams.AddValue(#name);
     TIMELINE_STREAM_LIST(ADD_STREAM_NAME);
 #undef ADD_STREAM_NAME
   }
   {
     JSONArray recordedStreams(&obj, "recordedStreams");
-#define ADD_RECORDED_STREAM_NAME(name, not_used)                               \
+#define ADD_RECORDED_STREAM_NAME(name, fuchsia_name)                           \
   if (stream_##name##_.enabled()) {                                            \
     recordedStreams.AddValue(#name);                                           \
   }
@@ -377,8 +377,8 @@
 TimelineEventRecorder* Timeline::recorder_ = NULL;
 MallocGrowableArray<char*>* Timeline::enabled_streams_ = NULL;
 
-#define TIMELINE_STREAM_DEFINE(name, enabled_by_default)                       \
-  TimelineStream Timeline::stream_##name##_;
+#define TIMELINE_STREAM_DEFINE(name, fuchsia_name)                             \
+  TimelineStream Timeline::stream_##name##_(#name, fuchsia_name, false);
 TIMELINE_STREAM_LIST(TIMELINE_STREAM_DEFINE)
 #undef TIMELINE_STREAM_DEFINE
 
@@ -389,7 +389,7 @@
       thread_timestamp1_(-1),
       state_(0),
       label_(NULL),
-      category_(""),
+      stream_(NULL),
       thread_(OSThread::kInvalidThreadId),
       isolate_id_(ILLEGAL_PORT) {}
 
@@ -404,7 +404,7 @@
   state_ = 0;
   thread_ = OSThread::kInvalidThreadId;
   isolate_id_ = ILLEGAL_PORT;
-  category_ = "";
+  stream_ = NULL;
   label_ = NULL;
   arguments_.Free();
   set_event_type(kNone);
@@ -546,14 +546,6 @@
   }
 }
 
-void TimelineEvent::StreamInit(TimelineStream* stream) {
-  if (stream != NULL) {
-    category_ = stream->name();
-  } else {
-    category_ = "";
-  }
-}
-
 void TimelineEvent::Init(EventType event_type, const char* label) {
   ASSERT(label != NULL);
   state_ = 0;
@@ -607,7 +599,7 @@
   int64_t pid = OS::ProcessId();
   int64_t tid = OSThread::ThreadIdToIntPtr(thread_);
   obj.AddProperty("name", label_);
-  obj.AddProperty("cat", category_);
+  obj.AddProperty("cat", stream_ != NULL ? stream_->name() : NULL);
   obj.AddProperty64("tid", tid);
   obj.AddProperty64("pid", pid);
   obj.AddPropertyTimeMicros("ts", TimeOrigin());
@@ -738,11 +730,16 @@
   return thread_timestamp1_ - thread_timestamp0_;
 }
 
-TimelineStream::TimelineStream() : name_(NULL), enabled_(false) {}
-
-void TimelineStream::Init(const char* name, bool enabled) {
-  name_ = name;
-  enabled_ = enabled;
+TimelineStream::TimelineStream(const char* name,
+                               const char* fuchsia_name,
+                               bool enabled)
+    : name_(name),
+      fuchsia_name_(fuchsia_name),
+#if defined(HOST_OS_FUCHSIA)
+      enabled_(true) {  // For generated code.
+#else
+      enabled_(enabled) {
+#endif
 }
 
 TimelineEvent* TimelineStream::StartEvent() {
@@ -1111,10 +1108,13 @@
 
 int64_t TimelineEventRecorder::GetNextAsyncId() {
   // TODO(johnmccutchan): Gracefully handle wrap around.
-  // TODO(rmacnak): Use TRACE_NONCE() on Fuchsia?
+#if defined(HOST_OS_FUCHSIA)
+  return trace_generate_nonce();
+#else
   uint32_t next =
       static_cast<uint32_t>(AtomicOperations::FetchAndIncrement(&async_id_));
   return static_cast<int64_t>(next);
+#endif
 }
 
 void TimelineEventRecorder::FinishBlock(TimelineEventBlock* block) {
diff --git a/runtime/vm/timeline.h b/runtime/vm/timeline.h
index 0f50fbd..37e5af9 100644
--- a/runtime/vm/timeline.h
+++ b/runtime/vm/timeline.h
@@ -9,10 +9,16 @@
 
 #include "vm/allocation.h"
 #include "vm/bitfield.h"
+#include "vm/globals.h"
 #include "vm/growable_array.h"
 #include "vm/os.h"
 #include "vm/os_thread.h"
 
+#if defined(HOST_OS_FUCHSIA)
+#include <trace-engine/context.h>
+#include <trace-engine/instrumentation.h>
+#endif
+
 namespace dart {
 
 class JSONArray;
@@ -30,29 +36,35 @@
 class VirtualMemory;
 class Zone;
 
-// (name, enabled by default for isolate).
+// (name, fuchsia_name).
 #define TIMELINE_STREAM_LIST(V)                                                \
-  V(API, false)                                                                \
-  V(Compiler, false)                                                           \
-  V(CompilerVerbose, false)                                                    \
-  V(Dart, false)                                                               \
-  V(Debugger, false)                                                           \
-  V(Embedder, false)                                                           \
-  V(GC, false)                                                                 \
-  V(Isolate, false)                                                            \
-  V(VM, false)
+  V(API, "dart:api")                                                           \
+  V(Compiler, "dart:compiler")                                                 \
+  V(CompilerVerbose, "dart:compiler.verbose")                                  \
+  V(Dart, "dart:dart")                                                         \
+  V(Debugger, "dart:debugger")                                                 \
+  V(Embedder, "dart:embedder")                                                 \
+  V(GC, "dart:gc")                                                             \
+  V(Isolate, "dart:isolate")                                                   \
+  V(Profiler, "dart:profiler")                                                 \
+  V(VM, "dart:vm")
 
 // A stream of timeline events. A stream has a name and can be enabled or
 // disabled (globally and per isolate).
 class TimelineStream {
  public:
-  TimelineStream();
-
-  void Init(const char* name, bool enabled);
+  TimelineStream(const char* name, const char* fuchsia_name, bool enabled);
 
   const char* name() const { return name_; }
+  const char* fuchsia_name() const { return fuchsia_name_; }
 
-  bool enabled() const { return enabled_ != 0; }
+  bool enabled() {
+#if defined(HOST_OS_FUCHSIA)
+    return trace_is_category_enabled(fuchsia_name_);
+#else
+    return enabled_ != 0;
+#endif
+  }
 
   void set_enabled(bool enabled) { enabled_ = enabled ? 1 : 0; }
 
@@ -66,12 +78,21 @@
     return OFFSET_OF(TimelineStream, enabled_);
   }
 
+#if defined(HOST_OS_FUCHSIA)
+  trace_site_t* trace_site() { return &trace_site_; }
+#endif
+
  private:
-  const char* name_;
+  const char* const name_;
+  const char* const fuchsia_name_;
 
   // This field is accessed by generated code (intrinsic) and expects to see
   // 0 or 1. If this becomes a BitField, the generated code must be updated.
   uintptr_t enabled_;
+
+#if defined(HOST_OS_FUCHSIA)
+  trace_site_t trace_site_ = {};
+#endif
 };
 
 class Timeline : public AllStatic {
@@ -95,12 +116,12 @@
   static void PrintFlagsToJSON(JSONStream* json);
 #endif
 
-#define TIMELINE_STREAM_ACCESSOR(name, not_used)                               \
+#define TIMELINE_STREAM_ACCESSOR(name, fuchsia_name)                           \
   static TimelineStream* Get##name##Stream() { return &stream_##name##_; }
   TIMELINE_STREAM_LIST(TIMELINE_STREAM_ACCESSOR)
 #undef TIMELINE_STREAM_ACCESSOR
 
-#define TIMELINE_STREAM_FLAGS(name, not_used)                                  \
+#define TIMELINE_STREAM_FLAGS(name, fuchsia_name)                              \
   static void SetStream##name##Enabled(bool enabled) {                         \
     stream_##name##_.set_enabled(enabled);                                     \
   }
@@ -111,8 +132,7 @@
   static TimelineEventRecorder* recorder_;
   static MallocGrowableArray<char*>* enabled_streams_;
 
-#define TIMELINE_STREAM_DECLARE(name, not_used)                                \
-  static bool stream_##name##_enabled_;                                        \
+#define TIMELINE_STREAM_DECLARE(name, fuchsia_name)                            \
   static TimelineStream stream_##name##_;
   TIMELINE_STREAM_LIST(TIMELINE_STREAM_DECLARE)
 #undef TIMELINE_STREAM_DECLARE
@@ -358,7 +378,7 @@
   intptr_t arguments_length() const { return arguments_.length(); }
 
  private:
-  void StreamInit(TimelineStream* stream);
+  void StreamInit(TimelineStream* stream) { stream_ = stream; }
   void Init(EventType event_type, const char* label);
 
   void set_event_type(EventType event_type) {
@@ -415,7 +435,7 @@
   TimelineEventArguments arguments_;
   uword state_;
   const char* label_;
-  const char* category_;
+  TimelineStream* stream_;
   ThreadId thread_;
   Dart_Port isolate_id_;
 
@@ -437,8 +457,7 @@
   TimelineDurationScope tds(thread, Timeline::GetCompilerStream(), name);      \
   if (tds.enabled()) {                                                         \
     tds.SetNumArguments(1);                                                    \
-    tds.CopyArgument(0, "function",                                            \
-                     function.ToLibNamePrefixedQualifiedCString());            \
+    tds.CopyArgument(0, "function", function.ToQualifiedCString());            \
   }
 
 #define TIMELINE_FUNCTION_GC_DURATION(thread, name)                            \
diff --git a/runtime/vm/timeline_android.cc b/runtime/vm/timeline_android.cc
index 5ca038b..6e5190a 100644
--- a/runtime/vm/timeline_android.cc
+++ b/runtime/vm/timeline_android.cc
@@ -51,16 +51,19 @@
     case TimelineEvent::kBegin: {
       length = Utils::SNPrint(buffer, buffer_size, "B|%" Pd64 "|%s", pid,
                               event->label());
-    } break;
+      break;
+    }
     case TimelineEvent::kEnd: {
       length = Utils::SNPrint(buffer, buffer_size, "E");
-    } break;
+      break;
+    }
     case TimelineEvent::kCounter: {
       if (event->arguments_length() > 0) {
         // We only report the first counter value.
         length = Utils::SNPrint(buffer, buffer_size, "C|%" Pd64 "|%s|%s", pid,
                                 event->label(), event->arguments()[0].value);
       }
+      break;
     }
     default:
       // Ignore event types that we cannot serialize to the Systrace format.
diff --git a/runtime/vm/timeline_fuchsia.cc b/runtime/vm/timeline_fuchsia.cc
index 9c0dab4..0110166 100644
--- a/runtime/vm/timeline_fuchsia.cc
+++ b/runtime/vm/timeline_fuchsia.cc
@@ -19,9 +19,10 @@
   if (event == NULL) {
     return;
   }
+  TimelineStream* stream = event->stream_;
   trace_string_ref_t category;
-  trace_context_t* context =
-      trace_acquire_context_for_category("dart", &category);
+  trace_context_t* context = trace_acquire_context_for_category_cached(
+      stream->fuchsia_name(), stream->trace_site(), &category);
   if (context == NULL) {
     return;
   }
diff --git a/runtime/vm/timeline_linux.cc b/runtime/vm/timeline_linux.cc
index 05ddb69..dc45ffb 100644
--- a/runtime/vm/timeline_linux.cc
+++ b/runtime/vm/timeline_linux.cc
@@ -28,9 +28,9 @@
   const char* kSystraceDebugPath = "/sys/kernel/debug/tracing/trace_marker";
   const char* kSystracePath = "/sys/kernel/tracing/trace_marker";
 
-  int fd = TEMP_FAILURE_RETRY(::open(kSystraceDebugPath, O_WRONLY));
+  int fd = TEMP_FAILURE_RETRY(::open(kSystracePath, O_WRONLY));
   if (fd < 0) {
-    fd = TEMP_FAILURE_RETRY(::open(kSystracePath, O_WRONLY));
+    fd = TEMP_FAILURE_RETRY(::open(kSystraceDebugPath, O_WRONLY));
   }
 
   if (fd < 0 && FLAG_trace_timeline) {
@@ -61,16 +61,19 @@
     case TimelineEvent::kBegin: {
       length = Utils::SNPrint(buffer, buffer_size, "B|%" Pd64 "|%s", pid,
                               event->label());
-    } break;
+      break;
+    }
     case TimelineEvent::kEnd: {
       length = Utils::SNPrint(buffer, buffer_size, "E");
-    } break;
+      break;
+    }
     case TimelineEvent::kCounter: {
       if (event->arguments_length() > 0) {
         // We only report the first counter value.
         length = Utils::SNPrint(buffer, buffer_size, "C|%" Pd64 "|%s|%s", pid,
                                 event->label(), event->arguments()[0].value);
       }
+      break;
     }
     default:
       // Ignore event types that we cannot serialize to the Systrace format.
diff --git a/runtime/vm/timeline_test.cc b/runtime/vm/timeline_test.cc
index 6e59425..eaf09f6 100644
--- a/runtime/vm/timeline_test.cc
+++ b/runtime/vm/timeline_test.cc
@@ -100,8 +100,7 @@
 
 TEST_CASE(TimelineEventIsValid) {
   // Create a test stream.
-  TimelineStream stream;
-  stream.Init("testStream", true);
+  TimelineStream stream("testStream", "testStream", true);
 
   TimelineEvent event;
   TimelineTestHelper::SetStream(&event, &stream);
@@ -120,8 +119,7 @@
 
 TEST_CASE(TimelineEventDuration) {
   // Create a test stream.
-  TimelineStream stream;
-  stream.Init("testStream", true);
+  TimelineStream stream("testStream", "testStream", true);
 
   // Create a test event.
   TimelineEvent event;
@@ -136,8 +134,7 @@
 
 TEST_CASE(TimelineEventDurationPrintJSON) {
   // Create a test stream.
-  TimelineStream stream;
-  stream.Init("testStream", true);
+  TimelineStream stream("testStream", "testStream", true);
 
   // Create a test event.
   TimelineEvent event;
@@ -167,8 +164,7 @@
   char buffer[kBufferLength];
 
   // Create a test stream.
-  TimelineStream stream;
-  stream.Init("testStream", true);
+  TimelineStream stream("testStream", "testStream", true);
 
   // Create a test event.
   TimelineEvent event;
@@ -212,8 +208,7 @@
 
 TEST_CASE(TimelineEventArguments) {
   // Create a test stream.
-  TimelineStream stream;
-  stream.Init("testStream", true);
+  TimelineStream stream("testStream", "testStream", true);
 
   // Create a test event.
   TimelineEvent event;
@@ -233,8 +228,7 @@
 
 TEST_CASE(TimelineEventArgumentsPrintJSON) {
   // Create a test stream.
-  TimelineStream stream;
-  stream.Init("testStream", true);
+  TimelineStream stream("testStream", "testStream", true);
 
   // Create a test event.
   TimelineEvent event;
@@ -296,8 +290,7 @@
   }
 
   // Create a test stream.
-  TimelineStream stream;
-  stream.Init("testStream", true);
+  TimelineStream stream("testStream", "testStream", true);
 
   TimelineEvent* event = NULL;
 
@@ -468,8 +461,7 @@
 }
 
 TEST_CASE(TimelineRingRecorderJSONOrder) {
-  TimelineStream stream;
-  stream.Init("testStream", true);
+  TimelineStream stream("testStream", "testStream", true);
 
   TimelineEventRingRecorder* recorder =
       new TimelineEventRingRecorder(TimelineEventBlock::kBlockSize * 2);
diff --git a/runtime/vm/type_testing_stubs.cc b/runtime/vm/type_testing_stubs.cc
index 4b37b7f..f55e2d9 100644
--- a/runtime/vm/type_testing_stubs.cc
+++ b/runtime/vm/type_testing_stubs.cc
@@ -195,7 +195,7 @@
   const auto pool_attachment = FLAG_use_bare_instructions
                                    ? Code::PoolAttachment::kNotAttachPool
                                    : Code::PoolAttachment::kAttachPool;
-  const Code& code = Code::Handle(Code::FinalizeCode(
+  const Code& code = Code::Handle(Code::FinalizeCodeAndNotify(
       name, nullptr, &assembler, pool_attachment, false /* optimized */));
   code.set_owner(type);
 #ifndef PRODUCT
@@ -246,7 +246,10 @@
 
   // Check the cid ranges which are a subtype of [type].
   if (hi->CanUseSubtypeRangeCheckFor(type)) {
-    const CidRangeVector& ranges = hi->SubtypeRangesForClass(type_class);
+    const CidRangeVector& ranges =
+        hi->SubtypeRangesForClass(type_class,
+                                  /*include_abstract=*/false,
+                                  /*exclude_null=*/false);
 
     const Type& int_type = Type::Handle(Type::IntType());
     const bool smi_is_ok = int_type.IsSubtypeOf(type, Heap::kNew);
@@ -410,7 +413,9 @@
     } else {
       const Class& type_class = Class::Handle(type_arg.type_class());
       const CidRangeVector& ranges =
-          hi->SubtypeRangesForClass(type_class, /*include_abstract=*/true);
+          hi->SubtypeRangesForClass(type_class,
+                                    /*include_abstract=*/true,
+                                    /*exclude_null=*/false);
 
       Label is_subtype;
       __ SmiUntag(class_id_reg);
diff --git a/runtime/vm/unicode.cc b/runtime/vm/unicode.cc
index a3b4fb9..90379d1 100644
--- a/runtime/vm/unicode.cc
+++ b/runtime/vm/unicode.cc
@@ -344,6 +344,7 @@
       return false;  // Invalid input.
     }
     if (is_supplementary) {
+      if (j == (len - 1)) return false;  // Output overflow.
       Utf16::Encode(ch, &dst[j]);
       j = j + 1;
     } else {
diff --git a/runtime/vm/unit_test.cc b/runtime/vm/unit_test.cc
index 50e55a0..23b42ee 100644
--- a/runtime/vm/unit_test.cc
+++ b/runtime/vm/unit_test.cc
@@ -411,7 +411,7 @@
   const char* resolved_url_chars = url_chars;
   if (IsPackageSchemeURL(url_chars)) {
     resolved_url = ResolvePackageUri(url_chars);
-    DART_CHECK_VALID(resolved_url);
+    EXPECT_VALID(resolved_url);
     if (Dart_IsError(Dart_StringToCString(resolved_url, &resolved_url_chars))) {
       return Dart_NewApiError("unable to convert resolved uri to string");
     }
@@ -429,8 +429,10 @@
   }
 }
 
-static intptr_t BuildSourceFilesArray(Dart_SourceFile** sourcefiles,
-                                      const char* script) {
+static intptr_t BuildSourceFilesArray(
+    Dart_SourceFile** sourcefiles,
+    const char* script,
+    const char* script_url = RESOLVED_USER_TEST_URI) {
   ASSERT(sourcefiles != NULL);
   ASSERT(script != NULL);
 
@@ -440,7 +442,7 @@
   }
 
   *sourcefiles = new Dart_SourceFile[num_test_libs + 1];
-  (*sourcefiles)[0].uri = RESOLVED_USER_TEST_URI;
+  (*sourcefiles)[0].uri = script_url;
   (*sourcefiles)[0].source = script;
   for (intptr_t i = 0; i < num_test_libs; ++i) {
     (*sourcefiles)[i + 1].uri = test_libs_->At(i).url;
@@ -469,7 +471,7 @@
     }
 #endif  // ifndef PRODUCT
     Dart_SourceFile* sourcefiles = NULL;
-    intptr_t num_sources = BuildSourceFilesArray(&sourcefiles, script);
+    intptr_t num_sources = BuildSourceFilesArray(&sourcefiles, script, lib_url);
     Dart_Handle result =
         LoadTestScriptWithDFE(num_sources, sourcefiles, resolver,
                               finalize_classes, true, allow_compile_errors);
@@ -501,9 +503,9 @@
 
     // TODO(32618): Kernel doesn't correctly represent the root library.
     lib = Dart_LookupLibrary(Dart_NewStringFromCString(sourcefiles[0].uri));
-    DART_CHECK_VALID(lib);
+    EXPECT_VALID(lib);
     Dart_Handle result = Dart_SetRootLibrary(lib);
-    DART_CHECK_VALID(result);
+    EXPECT_VALID(result);
 
     Dart_SetNativeResolver(lib, resolver, NULL);
     return lib;
@@ -534,7 +536,7 @@
 
   Dart_Handle lib =
       Dart_LoadLibraryFromKernel(kernel_buffer, kernel_buffer_size);
-  DART_CHECK_VALID(lib);
+  EXPECT_VALID(lib);
 
   // Ensure kernel buffer isn't leaked after test is run.
   AddToKernelBuffers(kernel_buffer);
@@ -542,15 +544,15 @@
   // BOGUS: Kernel doesn't correctly represent the root library.
   lib = Dart_LookupLibrary(Dart_NewStringFromCString(
       entry_script_uri != NULL ? entry_script_uri : sourcefiles[0].uri));
-  DART_CHECK_VALID(lib);
+  EXPECT_VALID(lib);
   result = Dart_SetRootLibrary(lib);
-  DART_CHECK_VALID(result);
+  EXPECT_VALID(result);
 
   result = Dart_SetNativeResolver(lib, resolver, NULL);
-  DART_CHECK_VALID(result);
+  EXPECT_VALID(result);
   if (finalize) {
     result = Dart_FinalizeLoading(false);
-    DART_CHECK_VALID(result);
+    EXPECT_VALID(result);
   }
   return lib;
 }
@@ -641,7 +643,7 @@
 Dart_Handle TestCase::lib() {
   Dart_Handle url = NewString(TestCase::url());
   Dart_Handle lib = Dart_LookupLibrary(url);
-  DART_CHECK_VALID(lib);
+  EXPECT_VALID(lib);
   ASSERT(Dart_IsLibrary(lib));
   return lib;
 }
@@ -708,8 +710,8 @@
   Function& function = Function::ZoneHandle(
       Function::New(function_name, RawFunction::kRegularFunction, true, false,
                     false, false, false, cls, TokenPosition::kMinSource));
-  code_ = Code::FinalizeCode(function, nullptr, assembler_,
-                             Code::PoolAttachment::kAttachPool);
+  code_ = Code::FinalizeCodeAndNotify(function, nullptr, assembler_,
+                                      Code::PoolAttachment::kAttachPool);
   code_.set_owner(function);
   code_.set_exception_handlers(Object::empty_exception_handlers());
 #ifndef PRODUCT
diff --git a/runtime/vm/unit_test.h b/runtime/vm/unit_test.h
index e8f1391..c4855d2 100644
--- a/runtime/vm/unit_test.h
+++ b/runtime/vm/unit_test.h
@@ -303,15 +303,16 @@
                                         bool allow_compile_errors = false,
                                         const char* multiroot_filepaths = NULL,
                                         const char* multiroot_scheme = NULL);
-  static Dart_Handle LoadTestScript(const char* script,
-                                    Dart_NativeEntryResolver resolver,
-                                    const char* lib_uri = USER_TEST_URI,
-                                    bool finalize = true,
-                                    bool allow_compile_errors = false);
+  static Dart_Handle LoadTestScript(
+      const char* script,
+      Dart_NativeEntryResolver resolver,
+      const char* lib_uri = RESOLVED_USER_TEST_URI,
+      bool finalize = true,
+      bool allow_compile_errors = false);
   static Dart_Handle LoadTestScriptWithErrors(
       const char* script,
       Dart_NativeEntryResolver resolver = NULL,
-      const char* lib_uri = USER_TEST_URI,
+      const char* lib_uri = RESOLVED_USER_TEST_URI,
       bool finalize = true);
   static Dart_Handle LoadTestLibrary(const char* lib_uri,
                                      const char* script,
diff --git a/runtime/vm/version.h b/runtime/vm/version.h
index 5f08dd3..fdc6bb0 100644
--- a/runtime/vm/version.h
+++ b/runtime/vm/version.h
@@ -14,6 +14,8 @@
   static const char* String();
   static const char* SnapshotString();
   static const char* CommitString();
+  static int CurrentAbiVersion();
+  static int OldestSupportedAbiVersion();
 
  private:
   static const char* str_;
diff --git a/runtime/vm/version_in.cc b/runtime/vm/version_in.cc
index 3a7d9c81..ae3cff7 100644
--- a/runtime/vm/version_in.cc
+++ b/runtime/vm/version_in.cc
@@ -5,6 +5,7 @@
 #include "vm/version.h"
 
 #include "vm/cpu.h"
+#include "vm/flags.h"
 #include "vm/os.h"
 
 namespace dart {
@@ -29,6 +30,14 @@
   return commit_;
 }
 
+int Version::CurrentAbiVersion() {
+  return {{ABI_VERSION}};
+}
+
+int Version::OldestSupportedAbiVersion() {
+  return {{OLDEST_SUPPORTED_ABI_VERSION}};
+}
+
 const char* Version::snapshot_hash_ = "{{SNAPSHOT_HASH}}";
 const char* Version::str_ = "{{VERSION_STR}} ({{COMMIT_TIME}})";
 const char* Version::commit_ = "{{VERSION_STR}}";
diff --git a/runtime/vm/virtual_memory.cc b/runtime/vm/virtual_memory.cc
index 6d73ba0..48ba867 100644
--- a/runtime/vm/virtual_memory.cc
+++ b/runtime/vm/virtual_memory.cc
@@ -17,12 +17,18 @@
 void VirtualMemory::Truncate(intptr_t new_size) {
   ASSERT(Utils::IsAligned(new_size, PageSize()));
   ASSERT(new_size <= size());
-  if (reserved_.size() == region_.size()) { // Don't create holes in reservation.
+  if (reserved_.size() ==
+      region_.size()) {  // Don't create holes in reservation.
     FreeSubSegment(reinterpret_cast<void*>(start() + new_size),
                    size() - new_size);
     reserved_.set_size(new_size);
+    if (AliasOffset() != 0) {
+      FreeSubSegment(reinterpret_cast<void*>(alias_.start() + new_size),
+                     alias_.size() - new_size);
+    }
   }
   region_.Subregion(region_, 0, new_size);
+  alias_.Subregion(alias_, 0, new_size);
 }
 
 VirtualMemory* VirtualMemory::ForImagePage(void* pointer, uword size) {
@@ -31,7 +37,7 @@
   MemoryRegion region(pointer, size);
   MemoryRegion reserved(0, 0);  // NULL reservation indicates VM should not
                                 // attempt to free this memory.
-  VirtualMemory* memory = new VirtualMemory(region, reserved);
+  VirtualMemory* memory = new VirtualMemory(region, region, reserved);
   ASSERT(!memory->vm_owns_region());
   return memory;
 }
diff --git a/runtime/vm/virtual_memory.h b/runtime/vm/virtual_memory.h
index 6d74541..496e63c 100644
--- a/runtime/vm/virtual_memory.h
+++ b/runtime/vm/virtual_memory.h
@@ -28,10 +28,14 @@
   uword end() const { return region_.end(); }
   void* address() const { return region_.pointer(); }
   intptr_t size() const { return region_.size(); }
+  intptr_t AliasOffset() const { return alias_.start() - region_.start(); }
 
   static void Init();
 
   bool Contains(uword addr) const { return region_.Contains(addr); }
+  bool ContainsAlias(uword addr) const {
+    return (AliasOffset() != 0) && alias_.Contains(addr);
+  }
 
   // Changes the protection of the virtual memory area.
   static void Protect(void* address, intptr_t size, Protection mode);
@@ -72,14 +76,22 @@
   // can give back the virtual memory to the system. Returns true on success.
   static void FreeSubSegment(void* address, intptr_t size);
 
-  // This constructor is only used internally when reserving new virtual spaces.
-  // It does not reserve any virtual address space on its own.
+  // These constructors are only used internally when reserving new virtual
+  // spaces. They do not reserve any virtual address space on their own.
   VirtualMemory(const MemoryRegion& region,
+                const MemoryRegion& alias,
                 const MemoryRegion& reserved)
-      : region_(region), reserved_(reserved) {}
+      : region_(region), alias_(alias), reserved_(reserved) {}
+
+  VirtualMemory(const MemoryRegion& region, const MemoryRegion& reserved)
+      : region_(region), alias_(region), reserved_(reserved) {}
 
   MemoryRegion region_;
 
+  // Optional secondary mapping of region_ to a virtual space with different
+  // protection, e.g. allowing code execution.
+  MemoryRegion alias_;
+
   // The underlying reservation not yet given back to the OS.
   // Its address might disagree with region_ due to aligned allocations.
   // Its size might disagree with region_ due to Truncate.
@@ -87,6 +99,10 @@
 
   static uword page_size_;
 
+#if defined(HOST_OS_FUCHSIA)
+  static uword base_;  // Cached base of root vmar.
+#endif
+
   DISALLOW_IMPLICIT_CONSTRUCTORS(VirtualMemory);
 };
 
diff --git a/runtime/vm/virtual_memory_fuchsia.cc b/runtime/vm/virtual_memory_fuchsia.cc
index 63c47ae..3f934fd 100644
--- a/runtime/vm/virtual_memory_fuchsia.cc
+++ b/runtime/vm/virtual_memory_fuchsia.cc
@@ -35,15 +35,29 @@
 
 namespace dart {
 
+DECLARE_FLAG(bool, dual_map_code);
 DECLARE_FLAG(bool, write_protect_code);
 
 uword VirtualMemory::page_size_ = 0;
+uword VirtualMemory::base_ = 0;
 
 void VirtualMemory::Init() {
   page_size_ = getpagesize();
+
+  // Cache the base of zx_vmar_root_self() which is used to align mappings.
+  zx_info_vmar_t buf[1];
+  size_t actual;
+  size_t avail;
+  zx_status_t status =
+      zx_object_get_info(zx_vmar_root_self(), ZX_INFO_VMAR, buf,
+                         sizeof(zx_info_vmar_t), &actual, &avail);
+  if (status != ZX_OK) {
+    FATAL1("zx_object_get_info failed: %s\n", zx_status_get_string(status));
+  }
+  base_ = buf[0].base;
 }
 
-static void unmap(zx_handle_t vmar, uword start, uword end) {
+static void Unmap(zx_handle_t vmar, uword start, uword end) {
   ASSERT(start <= end);
   const uword size = end - start;
   if (size == 0) {
@@ -56,28 +70,70 @@
   }
 }
 
+static void* MapAligned(zx_handle_t vmar,
+                        zx_handle_t vmo,
+                        zx_vm_option_t options,
+                        uword size,
+                        uword alignment,
+                        uword vmar_base,
+                        uword padded_size) {
+  // Allocate a larger mapping than needed in order to find a suitable aligned
+  // mapping within it.
+  uword base;
+  zx_status_t status =
+      zx_vmar_map(vmar, options, 0, vmo, 0u, padded_size, &base);
+  LOG_INFO("zx_vmar_map(%u, 0x%lx, 0x%lx)\n", options, base, padded_size);
+  if (status != ZX_OK) {
+    LOG_ERR("zx_vmar_map(%u, 0x%lx, 0x%lx) failed: %s\n", options, base,
+            padded_size, zx_status_get_string(status));
+    return NULL;
+  }
+
+  // Allocate a smaller aligned mapping inside the larger mapping.
+  const uword orig_base = base;
+  const uword aligned_base = Utils::RoundUp(base, alignment);
+  const zx_vm_option_t overwrite_options = options | ZX_VM_SPECIFIC_OVERWRITE;
+  status = zx_vmar_map(vmar, overwrite_options, aligned_base - vmar_base, vmo,
+                       0u, size, &base);
+  LOG_INFO("zx_vmar_map(%u, 0x%lx, 0x%lx)\n", overwrite_options,
+           aligned_base - vmar_base, size);
+
+  if (status != ZX_OK) {
+    LOG_ERR("zx_vmar_map(%u, 0x%lx, 0x%lx) failed: %s\n", overwrite_options,
+            aligned_base - vmar_base, size, zx_status_get_string(status));
+    return NULL;
+  }
+  ASSERT(base == aligned_base);
+
+  // Unmap the unused prefix and suffix.
+  Unmap(vmar, orig_base, base);
+  Unmap(vmar, base + size, orig_base + padded_size);
+
+  return reinterpret_cast<void*>(base);
+}
+
 VirtualMemory* VirtualMemory::AllocateAligned(intptr_t size,
                                               intptr_t alignment,
                                               bool is_executable,
                                               const char* name) {
-  // When FLAG_write_protect_code is active, the VM allocates code
-  // memory with !is_executable, and later changes to executable via
-  // VirtualMemory::Protect, which requires ZX_RIGHT_EXECUTE on the
-  // underlying VMO. Conservatively assume all memory needs to be
-  // executable in this mode.
-  // TODO(mdempsky): Make into parameter.
-  const bool can_prot_exec = FLAG_write_protect_code;
+  // When FLAG_write_protect_code is active, code memory (indicated by
+  // is_executable = true) is allocated as non-executable and later
+  // changed to executable via VirtualMemory::Protect, which requires
+  // ZX_RIGHT_EXECUTE on the underlying VMO.
+  // In addition, dual mapping of the same underlying code memory is provided.
+  const bool dual_mapping =
+      is_executable && FLAG_write_protect_code && FLAG_dual_map_code;
 
   ASSERT(Utils::IsAligned(size, page_size_));
   ASSERT(Utils::IsPowerOfTwo(alignment));
   ASSERT(Utils::IsAligned(alignment, page_size_));
-  const intptr_t allocated_size = size + alignment - page_size_;
+  const intptr_t padded_size = size + alignment - page_size_;
 
   zx_handle_t vmar = zx_vmar_root_self();
   zx_handle_t vmo = ZX_HANDLE_INVALID;
-  zx_status_t status = zx_vmo_create(allocated_size, 0u, &vmo);
+  zx_status_t status = zx_vmo_create(size, 0u, &vmo);
   if (status != ZX_OK) {
-    LOG_ERR("zx_vmo_create(%ld) failed: %s\n", size,
+    LOG_ERR("zx_vmo_create(0x%lx) failed: %s\n", size,
             zx_status_get_string(status));
     return NULL;
   }
@@ -86,9 +142,9 @@
     zx_object_set_property(vmo, ZX_PROP_NAME, name, strlen(name));
   }
 
-  if (is_executable || can_prot_exec) {
+  if (is_executable) {
     // Add ZX_RIGHT_EXECUTE permission to VMO, so it can be mapped
-    // into memory as executable.
+    // into memory as executable (now or later).
     status = zx_vmo_replace_as_executable(vmo, ZX_HANDLE_INVALID, &vmo);
     if (status != ZX_OK) {
       LOG_ERR("zx_vmo_replace_as_executable() failed: %s\n",
@@ -97,39 +153,59 @@
     }
   }
 
-  const zx_vm_option_t options = ZX_VM_PERM_READ | ZX_VM_PERM_WRITE |
-                                 (is_executable ? ZX_VM_PERM_EXECUTE : 0);
-  uword base;
-  status = zx_vmar_map(vmar, options, 0u, vmo, 0u, allocated_size, &base);
-  zx_handle_close(vmo);
-  if (status != ZX_OK) {
-    LOG_ERR("zx_vmar_map(%u, %ld) failed: %s\n", flags, size,
-            zx_status_get_string(status));
+  const zx_vm_option_t region_options =
+      ZX_VM_PERM_READ | ZX_VM_PERM_WRITE |
+      ((is_executable && !FLAG_write_protect_code) ? ZX_VM_PERM_EXECUTE : 0);
+  void* region_ptr = MapAligned(vmar, vmo, region_options, size, alignment,
+                                base_, padded_size);
+  if (region_ptr == NULL) {
     return NULL;
   }
+  MemoryRegion region(region_ptr, size);
 
-  const uword aligned_base = Utils::RoundUp(base, alignment);
+  VirtualMemory* result;
 
-  unmap(vmar, base, aligned_base);
-  unmap(vmar, aligned_base + size, base + allocated_size);
-
-  MemoryRegion region(reinterpret_cast<void*>(aligned_base), size);
-  return new VirtualMemory(region, region);
+  if (dual_mapping) {
+    // ZX_VM_PERM_EXECUTE is added later via VirtualMemory::Protect.
+    const zx_vm_option_t alias_options = ZX_VM_PERM_READ;
+    void* alias_ptr = MapAligned(vmar, vmo, alias_options, size, alignment,
+                                 base_, padded_size);
+    if (alias_ptr == NULL) {
+      const uword region_base = reinterpret_cast<uword>(region_ptr);
+      Unmap(vmar, region_base, region_base + size);
+      return NULL;
+    }
+    ASSERT(region_ptr != alias_ptr);
+    MemoryRegion alias(alias_ptr, size);
+    result = new VirtualMemory(region, alias, region);
+  } else {
+    result = new VirtualMemory(region, region, region);
+  }
+  zx_handle_close(vmo);
+  return result;
 }
 
 VirtualMemory::~VirtualMemory() {
   // Reserved region may be empty due to VirtualMemory::Truncate.
   if (vm_owns_region() && reserved_.size() != 0) {
-    unmap(zx_vmar_root_self(), reserved_.start(), reserved_.end());
-    LOG_INFO("zx_vmar_unmap(%lx, %lx) success\n", reserved_.start(),
+    Unmap(zx_vmar_root_self(), reserved_.start(), reserved_.end());
+    LOG_INFO("zx_vmar_unmap(0x%lx, 0x%lx) success\n", reserved_.start(),
              reserved_.size());
+
+    const intptr_t alias_offset = AliasOffset();
+    if (alias_offset != 0) {
+      Unmap(zx_vmar_root_self(), reserved_.start() + alias_offset,
+            reserved_.end() + alias_offset);
+      LOG_INFO("zx_vmar_unmap(0x%lx, 0x%lx) success\n",
+               reserved_.start() + alias_offset, reserved_.size());
+    }
   }
 }
 
 void VirtualMemory::FreeSubSegment(void* address, intptr_t size) {
   const uword start = reinterpret_cast<uword>(address);
-  unmap(zx_vmar_root_self(), start, start + size);
-  LOG_INFO("zx_vmar_unmap(%p, %lx) success\n", address, size);
+  Unmap(zx_vmar_root_self(), start, start + size);
+  LOG_INFO("zx_vmar_unmap(0x%p, 0x%lx) success\n", address, size);
 }
 
 void VirtualMemory::Protect(void* address, intptr_t size, Protection mode) {
@@ -161,12 +237,12 @@
   }
   zx_status_t status = zx_vmar_protect(zx_vmar_root_self(), prot, page_address,
                                        end_address - page_address);
+  LOG_INFO("zx_vmar_protect(%u, 0x%lx, 0x%lx)\n", prot, page_address,
+           end_address - page_address);
   if (status != ZX_OK) {
-    FATAL3("zx_vmar_protect(%lx, %lx) failed: %s\n", page_address,
+    FATAL3("zx_vmar_protect(0x%lx, 0x%lx) failed: %s\n", page_address,
            end_address - page_address, zx_status_get_string(status));
   }
-  LOG_INFO("zx_vmar_protect(%lx, %lx, %x) success\n", page_address,
-           end_address - page_address, prot);
 }
 
 }  // namespace dart
diff --git a/runtime/vm/virtual_memory_posix.cc b/runtime/vm/virtual_memory_posix.cc
index 31c7f15..fb1fff2 100644
--- a/runtime/vm/virtual_memory_posix.cc
+++ b/runtime/vm/virtual_memory_posix.cc
@@ -8,14 +8,23 @@
 #include "vm/virtual_memory.h"
 
 #include <errno.h>
+#include <fcntl.h>
 #include <sys/mman.h>
+#include <sys/stat.h>
+#include <sys/syscall.h>
 #include <unistd.h>
 
 #include "platform/assert.h"
 #include "platform/utils.h"
-
 #include "vm/isolate.h"
 
+// #define VIRTUAL_MEMORY_LOGGING 1
+#if defined(VIRTUAL_MEMORY_LOGGING)
+#define LOG_INFO(msg, ...) OS::PrintErr(msg, ##__VA_ARGS__)
+#else
+#define LOG_INFO(msg, ...)
+#endif  // defined(VIRTUAL_MEMORY_LOGGING)
+
 namespace dart {
 
 // standard MAP_FAILED causes "error: use of old-style cast" as it
@@ -23,10 +32,38 @@
 #undef MAP_FAILED
 #define MAP_FAILED reinterpret_cast<void*>(-1)
 
+DECLARE_FLAG(bool, dual_map_code);
+DECLARE_FLAG(bool, write_protect_code);
+
 uword VirtualMemory::page_size_ = 0;
 
 void VirtualMemory::Init() {
   page_size_ = getpagesize();
+
+#if defined(DUAL_MAPPING_SUPPORTED)
+  // Detect dual mapping exec permission limitation on some platforms,
+  // such as on docker containers, and disable dual mapping in this case.
+  // Also detect for missing support of memfd_create syscall.
+  if (FLAG_dual_map_code) {
+    intptr_t size = page_size_;
+    intptr_t alignment = 256 * 1024;  // e.g. heap page size.
+    VirtualMemory* vm = AllocateAligned(size, alignment, true, NULL);
+    if (vm == NULL) {
+      LOG_INFO("memfd_create not supported; disabling dual mapping of code.\n");
+      FLAG_dual_map_code = false;
+      return;
+    }
+    void* region = reinterpret_cast<void*>(vm->region_.start());
+    void* alias = reinterpret_cast<void*>(vm->alias_.start());
+    if (region == alias ||
+        mprotect(region, size, PROT_READ) != 0 ||  // Remove PROT_WRITE.
+        mprotect(alias, size, PROT_READ | PROT_EXEC) != 0) {  // Add PROT_EXEC.
+      LOG_INFO("mprotect fails; disabling dual mapping of code.\n");
+      FLAG_dual_map_code = false;
+    }
+    delete vm;
+  }
+#endif  // defined(DUAL_MAPPING_SUPPORTED)
 }
 
 static void unmap(uword start, uword end) {
@@ -45,17 +82,114 @@
   }
 }
 
+#if defined(DUAL_MAPPING_SUPPORTED)
+// Do not leak file descriptors to child processes.
+#if !defined(MFD_CLOEXEC)
+#define MFD_CLOEXEC 0x0001U
+#endif
+
+// Wrapper to call memfd_create syscall.
+static inline int memfd_create(const char* name, unsigned int flags) {
+#if !defined(__NR_memfd_create)
+  errno = ENOSYS;
+  return -1;
+#else
+  return syscall(__NR_memfd_create, name, flags);
+#endif
+}
+
+static void* MapAligned(int fd,
+                        int prot,
+                        intptr_t size,
+                        intptr_t alignment,
+                        intptr_t allocated_size) {
+  void* address =
+      mmap(NULL, allocated_size, PROT_NONE, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+  LOG_INFO("mmap(NULL, 0x%" Px ", PROT_NONE, ...): %p\n", allocated_size,
+           address);
+  if (address == MAP_FAILED) {
+    return NULL;
+  }
+
+  const uword base = reinterpret_cast<uword>(address);
+  const uword aligned_base = Utils::RoundUp(base, alignment);
+
+  // Guarantee the alignment by mapping at a fixed address inside the above
+  // mapping. Overlapping region will be automatically discarded in the above
+  // mapping. Manually discard non-overlapping regions.
+  address = mmap(reinterpret_cast<void*>(aligned_base), size, prot,
+                 MAP_SHARED | MAP_FIXED, fd, 0);
+  LOG_INFO("mmap(0x%" Px ", 0x%" Px ", %u, ...): %p\n", aligned_base, size,
+           prot, address);
+  if (address == MAP_FAILED) {
+    unmap(base, base + allocated_size);
+    return NULL;
+  }
+  ASSERT(address == reinterpret_cast<void*>(aligned_base));
+  unmap(base, aligned_base);
+  unmap(aligned_base + size, base + allocated_size);
+  return address;
+}
+#endif  // defined(DUAL_MAPPING_SUPPORTED)
+
 VirtualMemory* VirtualMemory::AllocateAligned(intptr_t size,
                                               intptr_t alignment,
                                               bool is_executable,
                                               const char* name) {
+#if defined(TARGET_ARCH_DBC)
+  RELEASE_ASSERT(!is_executable);
+#endif
+
+  // When FLAG_write_protect_code is active, code memory (indicated by
+  // is_executable = true) is allocated as non-executable and later
+  // changed to executable via VirtualMemory::Protect.
   ASSERT(Utils::IsAligned(size, page_size_));
   ASSERT(Utils::IsPowerOfTwo(alignment));
   ASSERT(Utils::IsAligned(alignment, page_size_));
   const intptr_t allocated_size = size + alignment - page_size_;
-  const int prot = PROT_READ | PROT_WRITE | (is_executable ? PROT_EXEC : 0);
+#if defined(DUAL_MAPPING_SUPPORTED)
+  int fd = -1;
+  const bool dual_mapping =
+      is_executable && FLAG_write_protect_code && FLAG_dual_map_code;
+  if (dual_mapping) {
+    fd = memfd_create("dart_vm", MFD_CLOEXEC);
+    if (fd == -1) {
+      return NULL;
+    }
+    if (ftruncate(fd, size) == -1) {
+      close(fd);
+      return NULL;
+    }
+    const int region_prot = PROT_READ | PROT_WRITE;
+    void* region_ptr =
+        MapAligned(fd, region_prot, size, alignment, allocated_size);
+    if (region_ptr == NULL) {
+      close(fd);
+      return NULL;
+    }
+    MemoryRegion region(region_ptr, size);
+    // PROT_EXEC is added later via VirtualMemory::Protect.
+    const int alias_prot = PROT_READ;
+    void* alias_ptr =
+        MapAligned(fd, alias_prot, size, alignment, allocated_size);
+    close(fd);
+    if (alias_ptr == NULL) {
+      const uword region_base = reinterpret_cast<uword>(region_ptr);
+      unmap(region_base, region_base + size);
+      return NULL;
+    }
+    ASSERT(region_ptr != alias_ptr);
+    MemoryRegion alias(alias_ptr, size);
+    return new VirtualMemory(region, alias, region);
+  }
+#endif  // defined(DUAL_MAPPING_SUPPORTED)
+  const int prot =
+      PROT_READ | PROT_WRITE |
+      ((is_executable && !FLAG_write_protect_code) ? PROT_EXEC : 0);
   void* address =
-      mmap(NULL, allocated_size, prot, MAP_PRIVATE | MAP_ANON, -1, 0);
+      mmap(NULL, allocated_size, prot, MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+  LOG_INFO("mmap(NULL, 0x%" Px ", %u, ...): %p\n", allocated_size, prot,
+           address);
   if (address == MAP_FAILED) {
     return NULL;
   }
@@ -73,6 +207,10 @@
 VirtualMemory::~VirtualMemory() {
   if (vm_owns_region()) {
     unmap(reserved_.start(), reserved_.end());
+    const intptr_t alias_offset = AliasOffset();
+    if (alias_offset != 0) {
+      unmap(reserved_.start() + alias_offset, reserved_.end() + alias_offset);
+    }
   }
 }
 
@@ -83,6 +221,9 @@
 }
 
 void VirtualMemory::Protect(void* address, intptr_t size, Protection mode) {
+#if defined(TARGET_ARCH_DBC)
+  RELEASE_ASSERT((mode != kReadExecute) && (mode != kReadWriteExecute));
+#endif
 #if defined(DEBUG)
   Thread* thread = Thread::Current();
   ASSERT((thread == nullptr) || thread->IsMutatorThread() ||
@@ -114,11 +255,15 @@
     int error = errno;
     const int kBufferSize = 1024;
     char error_buf[kBufferSize];
+    LOG_INFO("mprotect(0x%" Px ", 0x%" Px ", %u) failed\n", page_address,
+             end_address - page_address, prot);
     FATAL2("mprotect error: %d (%s)", error,
            Utils::StrError(error, error_buf, kBufferSize));
   }
+  LOG_INFO("mprotect(0x%" Px ", 0x%" Px ", %u) ok\n", page_address,
+           end_address - page_address, prot);
 }
 
 }  // namespace dart
 
-#endif  // defined(HOST_OS_ANDROID) || defined(HOST_OS_LINUX) || defined(HOST_OS_MACOS)
+#endif  // defined(HOST_OS_ANDROID ... HOST_OS_LINUX ... HOST_OS_MACOS)
diff --git a/runtime/vm/virtual_memory_win.cc b/runtime/vm/virtual_memory_win.cc
index 9c917b3..3ec743f0 100644
--- a/runtime/vm/virtual_memory_win.cc
+++ b/runtime/vm/virtual_memory_win.cc
@@ -14,6 +14,8 @@
 
 namespace dart {
 
+DECLARE_FLAG(bool, write_protect_code);
+
 uword VirtualMemory::page_size_ = 0;
 
 void VirtualMemory::Init() {
@@ -26,11 +28,16 @@
                                               intptr_t alignment,
                                               bool is_executable,
                                               const char* name) {
+  // When FLAG_write_protect_code is active, code memory (indicated by
+  // is_executable = true) is allocated as non-executable and later
+  // changed to executable via VirtualMemory::Protect.
   ASSERT(Utils::IsAligned(size, page_size_));
   ASSERT(Utils::IsPowerOfTwo(alignment));
   ASSERT(Utils::IsAligned(alignment, page_size_));
   intptr_t reserved_size = size + alignment - page_size_;
-  int prot = is_executable ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE;
+  int prot = (is_executable && !FLAG_write_protect_code)
+                 ? PAGE_EXECUTE_READWRITE
+                 : PAGE_READWRITE;
   void* address = VirtualAlloc(NULL, reserved_size, MEM_RESERVE, prot);
   if (address == NULL) {
     return NULL;
diff --git a/runtime/vm/visitor.h b/runtime/vm/visitor.h
index 69ea746..4eac814 100644
--- a/runtime/vm/visitor.h
+++ b/runtime/vm/visitor.h
@@ -15,6 +15,7 @@
 class Isolate;
 class RawObject;
 class RawFunction;
+class RawTypedDataView;
 
 // An object pointer visitor interface.
 class ObjectPointerVisitor {
@@ -24,6 +25,15 @@
 
   Isolate* isolate() const { return isolate_; }
 
+  // Visit pointers inside the given typed data [view].
+  //
+  // Range of pointers to visit 'first' <= pointer <= 'last'.
+  virtual void VisitTypedDataViewPointers(RawTypedDataView* view,
+                                          RawObject** first,
+                                          RawObject** last) {
+    VisitPointers(first, last);
+  }
+
   // Range of pointers to visit 'first' <= pointer <= 'last'.
   virtual void VisitPointers(RawObject** first, RawObject** last) = 0;
 
@@ -56,27 +66,6 @@
   DISALLOW_COPY_AND_ASSIGN(ObjectVisitor);
 };
 
-class ExtensibleObjectVisitor : public ObjectVisitor {
- public:
-  explicit ExtensibleObjectVisitor(GrowableArray<ObjectVisitor*>* visitors)
-      : visitors_(visitors) {}
-
-  virtual ~ExtensibleObjectVisitor() {}
-
-  virtual void VisitObject(RawObject* obj) {
-    for (intptr_t i = 0; i < visitors_->length(); i++) {
-      visitors_->At(i)->VisitObject(obj);
-    }
-  }
-
-  void Add(ObjectVisitor* visitor) { visitors_->Add(visitor); }
-
- private:
-  GrowableArray<ObjectVisitor*>* visitors_;
-
-  DISALLOW_COPY_AND_ASSIGN(ExtensibleObjectVisitor);
-};
-
 // An object finder visitor interface.
 class FindObjectVisitor {
  public:
diff --git a/runtime/vm/vm_sources.gni b/runtime/vm/vm_sources.gni
index 198d04e..586cc38 100644
--- a/runtime/vm/vm_sources.gni
+++ b/runtime/vm/vm_sources.gni
@@ -42,9 +42,12 @@
   "code_patcher_x64.cc",
   "compilation_trace.cc",
   "compilation_trace.h",
+  "constants_arm.cc",
   "constants_arm.h",
+  "constants_arm64.cc",
   "constants_arm64.h",
   "constants_dbc.h",
+  "constants_ia32.cc",
   "constants_ia32.h",
   "constants_kbc.h",
   "constants_x64.cc",
@@ -92,7 +95,6 @@
   "dwarf.h",
   "exceptions.cc",
   "exceptions.h",
-  "ffi_trampoline_stubs_x64.cc",
   "finalizable_data.h",
   "fixed_cache.h",
   "flag_list.h",
@@ -152,7 +154,6 @@
   "malloc_hooks_arm.cc",
   "malloc_hooks_arm64.cc",
   "malloc_hooks_ia32.cc",
-  "malloc_hooks_jemalloc.cc",
   "malloc_hooks_tcmalloc.cc",
   "malloc_hooks_unsupported.cc",
   "malloc_hooks_x64.cc",
@@ -374,6 +375,7 @@
   "bitfield_test.cc",
   "bitmap_test.cc",
   "boolfield_test.cc",
+  "catch_entry_moves_test.cc",
   "class_finalizer_test.cc",
   "code_descriptors_test.cc",
   "code_patcher_arm64_test.cc",
diff --git a/runtime/vm/zone.cc b/runtime/vm/zone.cc
index 8227e48..2d95479 100644
--- a/runtime/vm/zone.cc
+++ b/runtime/vm/zone.cc
@@ -11,6 +11,7 @@
 #include "vm/handles_impl.h"
 #include "vm/heap/heap.h"
 #include "vm/os.h"
+#include "vm/virtual_memory.h"
 
 namespace dart {
 
@@ -21,25 +22,28 @@
  public:
   Segment* next() const { return next_; }
   intptr_t size() const { return size_; }
+  VirtualMemory* memory() const { return memory_; }
 
   uword start() { return address(sizeof(Segment)); }
   uword end() { return address(size_); }
 
   // Allocate or delete individual segments.
   static Segment* New(intptr_t size, Segment* next);
+  static Segment* NewLarge(intptr_t size, Segment* next);
   static void DeleteSegmentList(Segment* segment);
+  static void DeleteLargeSegmentList(Segment* segment);
   static void IncrementMemoryCapacity(uintptr_t size);
   static void DecrementMemoryCapacity(uintptr_t size);
 
  private:
   Segment* next_;
   intptr_t size_;
+  VirtualMemory* memory_;
+  void* alignment_;
 
   // Computes the address of the nth byte in this segment.
   uword address(int n) { return reinterpret_cast<uword>(this) + n; }
 
-  static void Delete(Segment* segment) { free(segment); }
-
   DISALLOW_IMPLICIT_CONSTRUCTORS(Segment);
 };
 
@@ -49,13 +53,36 @@
   if (result == NULL) {
     OUT_OF_MEMORY();
   }
-  ASSERT(Utils::IsAligned(result->start(), Zone::kAlignment));
 #ifdef DEBUG
   // Zap the entire allocated segment (including the header).
   memset(result, kZapUninitializedByte, size);
 #endif
   result->next_ = next;
   result->size_ = size;
+  result->memory_ = nullptr;
+  result->alignment_ = nullptr;  // Avoid unused variable warnings.
+  IncrementMemoryCapacity(size);
+  return result;
+}
+
+Zone::Segment* Zone::Segment::NewLarge(intptr_t size, Zone::Segment* next) {
+  size = Utils::RoundUp(size, VirtualMemory::PageSize());
+  VirtualMemory* memory = VirtualMemory::Allocate(size, false, "dart-zone");
+  if (memory == NULL) {
+    OUT_OF_MEMORY();
+  }
+  Segment* result = reinterpret_cast<Segment*>(memory->start());
+#ifdef DEBUG
+  // Zap the entire allocated segment (including the header).
+  memset(result, kZapUninitializedByte, size);
+#endif
+  result->next_ = next;
+  result->size_ = size;
+  result->memory_ = memory;
+  result->alignment_ = nullptr;  // Avoid unused variable warnings.
+
+  LSAN_REGISTER_ROOT_REGION(result, sizeof(*result));
+
   IncrementMemoryCapacity(size);
   return result;
 }
@@ -69,7 +96,23 @@
     // Zap the entire current segment (including the header).
     memset(current, kZapDeletedByte, current->size());
 #endif
-    Segment::Delete(current);
+    free(current);
+    current = next;
+  }
+}
+
+void Zone::Segment::DeleteLargeSegmentList(Segment* head) {
+  Segment* current = head;
+  while (current != NULL) {
+    DecrementMemoryCapacity(current->size());
+    Segment* next = current->next();
+    VirtualMemory* memory = current->memory();
+#ifdef DEBUG
+    // Zap the entire current segment (including the header).
+    memset(current, kZapDeletedByte, current->size());
+#endif
+    LSAN_UNREGISTER_ROOT_REGION(current, sizeof(*current));
+    delete memory;
     current = next;
   }
 }
@@ -129,7 +172,7 @@
     Segment::DeleteSegmentList(head_);
   }
   if (large_segments_ != NULL) {
-    Segment::DeleteSegmentList(large_segments_);
+    Segment::DeleteLargeSegmentList(large_segments_);
   }
 // Reset zone state.
 #ifdef DEBUG
@@ -214,9 +257,9 @@
   ASSERT(free_size < size);
 
   // Create a new large segment and chain it up.
-  ASSERT(Utils::IsAligned(sizeof(Segment), kAlignment));
-  size += sizeof(Segment);  // Account for book keeping fields in size.
-  large_segments_ = Segment::New(size, large_segments_);
+  // Account for book keeping fields in size.
+  size += Utils::RoundUp(sizeof(Segment), kAlignment);
+  large_segments_ = Segment::NewLarge(size, large_segments_);
 
   uword result = Utils::RoundUp(large_segments_->start(), kAlignment);
   return result;
diff --git a/runtime/vm/zone_test.cc b/runtime/vm/zone_test.cc
index 5f8f783..a12b5ff 100644
--- a/runtime/vm/zone_test.cc
+++ b/runtime/vm/zone_test.cc
@@ -176,4 +176,66 @@
   EXPECT_EQ(0UL, ApiNativeScope::current_memory_usage());
 }
 
+#if !defined(PRODUCT)
+// Allow for pooling in the malloc implementation.
+static const int64_t kRssSlack = 20 * MB;
+#endif  // !defined(PRODUCT)
+
+// clang-format off
+static const size_t kSizes[] = {
+  64 * KB,
+  64 * KB + 2 * kWordSize,
+  64 * KB - 2 * kWordSize,
+  128 * KB,
+  128 * KB + 2 * kWordSize,
+  128 * KB - 2 * kWordSize,
+  256 * KB,
+  256 * KB + 2 * kWordSize,
+  256 * KB - 2 * kWordSize,
+  512 * KB,
+  512 * KB + 2 * kWordSize,
+  512 * KB - 2 * kWordSize,
+};
+// clang-format on
+
+TEST_CASE(StressMallocDirectly) {
+#if !defined(PRODUCT)
+  int64_t start_rss = Service::CurrentRSS();
+#endif  // !defined(PRODUCT)
+
+  void* allocations[ARRAY_SIZE(kSizes)];
+  for (size_t i = 0; i < ((3u * GB) / (512u * KB)); i++) {
+    for (size_t j = 0; j < ARRAY_SIZE(kSizes); j++) {
+      allocations[j] = malloc(kSizes[j]);
+    }
+    for (size_t j = 0; j < ARRAY_SIZE(kSizes); j++) {
+      free(allocations[j]);
+    }
+  }
+
+#if !defined(PRODUCT)
+  int64_t stop_rss = Service::CurrentRSS();
+  EXPECT_LT(stop_rss, start_rss + kRssSlack);
+#endif  // !defined(PRODUCT)
+}
+
+TEST_CASE(StressMallocThroughZones) {
+#if !defined(PRODUCT)
+  int64_t start_rss = Service::CurrentRSS();
+#endif  // !defined(PRODUCT)
+
+  for (size_t i = 0; i < ((3u * GB) / (512u * KB)); i++) {
+    StackZone stack_zone(Thread::Current());
+    Zone* zone = stack_zone.GetZone();
+    for (size_t j = 0; j < ARRAY_SIZE(kSizes); j++) {
+      zone->Alloc<uint8_t>(kSizes[j]);
+    }
+  }
+
+#if !defined(PRODUCT)
+  int64_t stop_rss = Service::CurrentRSS();
+  EXPECT_LT(stop_rss, start_rss + kRssSlack);
+#endif  // !defined(PRODUCT)
+}
+
 }  // namespace dart
diff --git a/runtime/vm/zone_text_buffer.cc b/runtime/vm/zone_text_buffer.cc
index 5754b11..8d3032b 100644
--- a/runtime/vm/zone_text_buffer.cc
+++ b/runtime/vm/zone_text_buffer.cc
@@ -50,12 +50,7 @@
 void ZoneTextBuffer::EnsureCapacity(intptr_t len) {
   intptr_t remaining = capacity_ - length_;
   if (remaining <= len) {
-    const int kBufferSpareCapacity = 64;  // Somewhat arbitrary.
-    // TODO(turnidge): do we need to guard against overflow or other
-    // security issues here? Text buffers are used by the debugger
-    // to send user-controlled data (e.g. values of string variables) to
-    // the debugger front-end.
-    intptr_t new_capacity = capacity_ + len + kBufferSpareCapacity;
+    intptr_t new_capacity = capacity_ + Utils::Maximum(capacity_, len);
     buffer_ = zone_->Realloc<char>(buffer_, capacity_, new_capacity);
     capacity_ = new_capacity;
   }
diff --git a/samples/ffi/dylib_utils.dart b/samples/ffi/dylib_utils.dart
new file mode 100644
index 0000000..1c924d4
--- /dev/null
+++ b/samples/ffi/dylib_utils.dart
@@ -0,0 +1,19 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:ffi' as ffi;
+import 'dart:io' show Platform;
+
+String _platformPath(String name, {String path}) {
+  if (path == null) path = "";
+  if (Platform.isLinux) return path + "lib" + name + ".so";
+  if (Platform.isMacOS) return path + "lib" + name + ".dylib";
+  if (Platform.isWindows) return path + name + ".dll";
+  throw Exception("Platform not implemented");
+}
+
+ffi.DynamicLibrary dlopenPlatformSpecific(String name, {String path}) {
+  String fullPath = _platformPath(name, path: path);
+  return ffi.DynamicLibrary.open(fullPath);
+}
diff --git a/samples/ffi/sample_ffi_dynamic_library.dart b/samples/ffi/sample_ffi_dynamic_library.dart
index cf83400..234e3d0 100644
--- a/samples/ffi/sample_ffi_dynamic_library.dart
+++ b/samples/ffi/sample_ffi_dynamic_library.dart
@@ -4,12 +4,14 @@
 
 import 'dart:ffi' as ffi;
 
+import 'dylib_utils.dart';
+
 typedef NativeDoubleUnOp = ffi.Double Function(ffi.Double);
 
 typedef DoubleUnOp = double Function(double);
 
 main(List<String> arguments) {
-  ffi.DynamicLibrary l = ffi.DynamicLibrary.open("ffi_test_dynamic_library");
+  ffi.DynamicLibrary l = dlopenPlatformSpecific("ffi_test_dynamic_library");
   print(l);
   print(l.runtimeType);
 
diff --git a/samples/ffi/sample_ffi_functions.dart b/samples/ffi/sample_ffi_functions.dart
index 62b5718..4a3cf98 100644
--- a/samples/ffi/sample_ffi_functions.dart
+++ b/samples/ffi/sample_ffi_functions.dart
@@ -4,6 +4,8 @@
 
 import 'dart:ffi' as ffi;
 
+import 'dylib_utils.dart';
+
 typedef NativeUnaryOp = ffi.Int32 Function(ffi.Int32);
 typedef NativeBinaryOp = ffi.Int32 Function(ffi.Int32, ffi.Int32);
 typedef UnaryOp = int Function(int);
@@ -93,7 +95,7 @@
   print('start main');
 
   ffi.DynamicLibrary ffiTestFunctions =
-      ffi.DynamicLibrary.open("ffi_test_functions");
+      dlopenPlatformSpecific("ffi_test_functions");
 
   {
     // int32 bin op
diff --git a/samples/ffi/sample_ffi_functions_callbacks.dart b/samples/ffi/sample_ffi_functions_callbacks.dart
index ddd6840..8549377 100644
--- a/samples/ffi/sample_ffi_functions_callbacks.dart
+++ b/samples/ffi/sample_ffi_functions_callbacks.dart
@@ -4,6 +4,8 @@
 
 import 'dart:ffi' as ffi;
 
+import 'dylib_utils.dart';
+
 import 'coordinate.dart';
 
 typedef NativeCoordinateOp = Coordinate Function(Coordinate);
@@ -33,7 +35,7 @@
   print('start main');
 
   ffi.DynamicLibrary ffiTestFunctions =
-      ffi.DynamicLibrary.open("ffi_test_functions");
+      dlopenPlatformSpecific("ffi_test_functions");
 
   {
     // pass a c pointer to a c function as an argument to a c function
diff --git a/samples/ffi/sample_ffi_functions_structs.dart b/samples/ffi/sample_ffi_functions_structs.dart
index ba076e0..d2b1e41 100644
--- a/samples/ffi/sample_ffi_functions_structs.dart
+++ b/samples/ffi/sample_ffi_functions_structs.dart
@@ -4,6 +4,8 @@
 
 import 'dart:ffi' as ffi;
 
+import 'dylib_utils.dart';
+
 import 'coordinate.dart';
 
 typedef NativeCoordinateOp = Coordinate Function(Coordinate);
@@ -12,7 +14,7 @@
   print('start main');
 
   ffi.DynamicLibrary ffiTestFunctions =
-      ffi.DynamicLibrary.open("ffi_test_functions");
+      dlopenPlatformSpecific("ffi_test_functions");
 
   {
     // pass a struct to a c function and get a struct as return value
diff --git a/samples/ffi/sqlite/.gitignore b/samples/ffi/sqlite/.gitignore
new file mode 100644
index 0000000..7a6bc2e
--- /dev/null
+++ b/samples/ffi/sqlite/.gitignore
@@ -0,0 +1,7 @@
+.dart_tool
+.gdb_history
+.packages
+.vscode
+pubspec.lock
+test.db
+test.db-journal
\ No newline at end of file
diff --git a/samples/ffi/sqlite/README.md b/samples/ffi/sqlite/README.md
new file mode 100644
index 0000000..85a26dd
--- /dev/null
+++ b/samples/ffi/sqlite/README.md
@@ -0,0 +1,41 @@
+# Sample code dart:ffi
+
+This is an illustrative sample for how to use `dart:ffi`.
+
+
+## Building and Running this Sample
+
+Building and running this sample is done through pub.
+Running `pub get` and `pub run example/main` should produce the following output.
+
+```sh
+$ pub get
+Resolving dependencies... (6.8s)
++ analyzer 0.35.4
+...
++ yaml 2.1.15
+Downloading analyzer 0.35.4...
+Downloading kernel 0.3.14...
+Downloading front_end 0.1.14...
+Changed 47 dependencies!
+Precompiling executables... (18.0s)
+Precompiled test:test.
+
+```
+
+```
+$ pub run example/main
+1 Chocolade chip cookie Chocolade cookie foo
+2 Ginger cookie null 42
+3 Cinnamon roll null null
+1 Chocolade chip cookie Chocolade cookie foo
+2 Ginger cookie null 42
+expected exception on accessing result data after close: The result has already been closed.
+expected this query to fail: no such column: non_existing_column (Code 1: SQL logic error)
+```
+
+## Tutorial
+
+A tutorial walking through the code is available in [docs/sqlite-tutorial.md](docs/sqlite-tutorial.md).
+For information on how to use this package within a Flutter app, see [docs/android.md].
+(Note: iOS is not yet supported).
diff --git a/samples/ffi/sqlite/docs/android.md b/samples/ffi/sqlite/docs/android.md
new file mode 100644
index 0000000..07f3e47
--- /dev/null
+++ b/samples/ffi/sqlite/docs/android.md
@@ -0,0 +1,53 @@
+**This documentation is for demonstration/testing purposes only!**
+
+# Using FFI with Flutter
+
+## Android
+
+Before using the FFI on Android, you need to procure an Android-compatible build of the native library you want to link against.
+It's important that the shared object(s) be compatible with ABI version you wish to target (or else, that you have multiple builds for different ABIs).
+See [https://developer.android.com/ndk/guides/abis] for more details on Android ABIs.
+Within Flutter, the target ABI is controlled by the `--target-platform` parameter to the `flutter` command.
+
+The workflow for packaging a native library will depend significantly on the library itself, but to illustrate the challenges at play, we'll demonstrate how to build the SQLite library from source to use with the FFI on an Android device.
+
+### Building SQLite for Android
+
+Every Android device ships with a copy of the SQLite library (`/system/lib/libsqlite.so`).
+Unfortunately, this library cannot be loaded directly by apps (see [https://developer.android.com/about/versions/nougat/android-7.0-changes#ndk]).
+It is accessible only through Java.
+Instead, we can build SQLite directly with the NDK.
+
+First, download the SQLite "amalgamation" source from [https://www.sqlite.org/download.html].
+For the sake of brevity, we'll assume the file has been saved as `sqlite-amalgamation-XXXXXXX.zip`, the Android SDK (with NDK extension) is available in `~/Android`, and we're on a Linux workstation.
+
+```sh
+unzip sqlite-amalgamation-XXXXXXX.zip
+cd sqlite-amalgamation-XXXXXXX
+~/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android24-clang -c sqlite3.c -o sqlite3.o
+~/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android-ld -shared sqlite3.o -o libsqlite3.so
+```
+
+Note the use of the `aarch64` prefix to the compiler: this indicates that we're building a shared object for the `arm64-v8a` ABI.
+This will be important later.
+
+### Update Gradle script
+
+Next we need to instruct Gradle to package this library with the app, so it will be available to load off the Android device at runtime.
+Create a folder `native-libraries` in the root folder of the app, and update the `android/app/build.gradle` file:
+
+```groovy
+android {
+    // ...
+    sourceSets {
+        main {
+            jniLibs.srcDir '${project.projectDir.path}/../../native-libraries'
+        }
+    }
+}
+```
+
+Within the `native-libraries` folder, the libraries are organized by ABI.
+Therefore, we must copy the compiled `libsqlite3.so` into `native-libraries/arm64-v8a/libsqlite3.so`.
+If multiple sub-directories are present, the libraries from the sub-directory corresponding to the target ABI will be available in the application's linking path, so the library can be loaded with `ffi.DynamicLibrary.open("libsqlite3.so")` in Dart.
+Finally, pass `--target-platform=android-arm64` to the `flutter` command when running or building the app since `libsqlite3.so` was compiled for the `arm64-v8a` ABI.
diff --git a/samples/ffi/sqlite/docs/lib/scenario-default.svg b/samples/ffi/sqlite/docs/lib/scenario-default.svg
new file mode 100644
index 0000000..6ffa8a3
--- /dev/null
+++ b/samples/ffi/sqlite/docs/lib/scenario-default.svg
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xl="http://www.w3.org/1999/xlink" viewBox="27.846457 27.846457 426.19686 227.77166" width="426.19686" height="227.77166">
+  <defs>
+    <font-face font-family="Helvetica Neue" font-size="16" panose-1="2 0 5 3 0 0 0 2 0 4" units-per-em="1000" underline-position="-100" underline-thickness="50" slope="0" x-height="517" cap-height="714" ascent="951.9958" descent="-212.99744" font-weight="400">
+      <font-face-src>
+        <font-face-name name="HelveticaNeue"/>
+      </font-face-src>
+    </font-face>
+    <font-face font-family="Helvetica Neue" font-size="10" panose-1="2 0 5 3 0 0 0 2 0 4" units-per-em="1000" underline-position="-100" underline-thickness="50" slope="0" x-height="517" cap-height="714" ascent="951.9958" descent="-212.99744" font-weight="400">
+      <font-face-src>
+        <font-face-name name="HelveticaNeue"/>
+      </font-face-src>
+    </font-face>
+  </defs>
+  <metadata> Produced by OmniGraffle 7.9.4 
+    <dc:date>2019-03-13 09:56:08 +0000</dc:date>
+  </metadata>
+  <g id="Canvas_1" fill="none" fill-opacity="1" stroke="none" stroke-dasharray="none" stroke-opacity="1">
+    <title>Canvas 1</title>
+    <rect fill="white" x="27.846457" y="27.846457" width="426.19686" height="227.77166"/>
+    <g id="Canvas_1: Layer 1">
+      <title>Layer 1</title>
+      <g id="Graphic_3">
+        <rect x="28.346457" y="85.03937" width="85.03937" height="141.73229" fill="white"/>
+        <rect x="28.346457" y="85.03937" width="85.03937" height="141.73229" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(33.346457 110.00952)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="14.703685" y="15">Flutter </tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="22.847685" y="33.448">App</tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="8.031685" y="69.896">(Imports </tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="4.775685" y="88.34399">package)</tspan>
+        </text>
+      </g>
+      <g id="Graphic_5">
+        <rect x="368.50395" y="85.03937" width="85.03937" height="141.73229" fill="white"/>
+        <rect x="368.50395" y="85.03937" width="85.03937" height="141.73229" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(373.50395 137.45752)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="14.855685" y="15">Native </tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="12.927685" y="33.448">Library</tspan>
+        </text>
+      </g>
+      <g id="Graphic_6">
+        <rect x="311.81103" y="85.03937" width="56.692915" height="141.73229" fill="white"/>
+        <rect x="311.81103" y="85.03937" width="56.692915" height="141.73229" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(316.81103 146.68152)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x=".5064575" y="15">dart:ffi</tspan>
+        </text>
+      </g>
+      <g id="Graphic_7">
+        <rect x="113.38583" y="85.03937" width="56.692915" height="141.73229" fill="white"/>
+        <rect x="113.38583" y="85.03937" width="56.692915" height="141.73229" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(118.38583 119.20552)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="3.9014575" y="10">Package </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="15.571457" y="22.28">API</tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="1.8614575" y="46.56">(Does not </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="7.0514575" y="58.839996">expose </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="7.7764575" y="71.119995">dart:ffi)</tspan>
+        </text>
+      </g>
+      <g id="Graphic_8">
+        <rect x="28.346457" y="226.77166" width="311.81103" height="28.346457" fill="white"/>
+        <rect x="28.346457" y="226.77166" width="311.81103" height="28.346457" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(33.346457 231.7209)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="135.79352" y="15">Dart</tspan>
+        </text>
+      </g>
+      <g id="Graphic_9">
+        <rect x="340.1575" y="226.77166" width="113.38583" height="28.346457" fill="white"/>
+        <rect x="340.1575" y="226.77166" width="113.38583" height="28.346457" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(345.1575 231.7209)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="23.428915" y="15">C / C++</tspan>
+        </text>
+      </g>
+      <g id="Graphic_10">
+        <rect x="28.346457" y="28.346457" width="85.03937" height="56.692915" fill="white"/>
+        <rect x="28.346457" y="28.346457" width="85.03937" height="56.692915" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(33.346457 38.244917)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="22.847685" y="15">App </tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="1.2236848" y="33.448">Developer</tspan>
+        </text>
+      </g>
+      <g id="Graphic_11">
+        <rect x="113.38583" y="28.346457" width="198.4252" height="56.692915" fill="white"/>
+        <rect x="113.38583" y="28.346457" width="198.4252" height="56.692915" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(118.38583 38.244917)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="63.1006" y="15">Package</tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="57.9166" y="33.448">Developer</tspan>
+        </text>
+      </g>
+      <g id="Graphic_12">
+        <rect x="311.81103" y="28.346457" width="56.692915" height="56.692915" fill="white"/>
+        <rect x="311.81103" y="28.346457" width="56.692915" height="56.692915" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(316.81103 29.020918)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="8.234457" y="15">Dart </tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="11.490457" y="33.448">VM </tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="4.2264575" y="51.895996">Team</tspan>
+        </text>
+      </g>
+      <g id="Graphic_13">
+        <rect x="255.11812" y="85.03937" width="56.692915" height="141.73229" fill="white"/>
+        <rect x="255.11812" y="85.03937" width="56.692915" height="141.73229" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(260.11812 149.76552)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="3.8064575" y="10">Bindings</tspan>
+        </text>
+      </g>
+      <g id="Graphic_14">
+        <rect x="368.50395" y="28.346457" width="85.03937" height="56.692915" fill="white"/>
+        <rect x="368.50395" y="28.346457" width="85.03937" height="56.692915" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(373.50395 29.020918)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="14.855686" y="15">Native </tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="12.927686" y="33.448">Library </tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="1.2236862" y="51.895996">Developer</tspan>
+        </text>
+      </g>
+      <g id="Graphic_15">
+        <rect x="170.07874" y="85.03937" width="85.03937" height="141.73229" fill="white"/>
+        <rect x="170.07874" y="85.03937" width="85.03937" height="141.73229" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(175.07874 106.92552)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="18.074685" y="10">Package </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="2.8746848" y="22.28">Implementation</tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="9.559685" y="46.56">(Code which </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="7.259685" y="58.839996">converts C++ </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x=".1996848" y="71.119995">abstractions into </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="28.074685" y="83.39999">Dart </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="8.629685" y="95.67999">abstractions)</tspan>
+        </text>
+      </g>
+    </g>
+  </g>
+</svg>
diff --git a/samples/ffi/sqlite/docs/lib/scenario-full.svg b/samples/ffi/sqlite/docs/lib/scenario-full.svg
new file mode 100644
index 0000000..4ae18c5
--- /dev/null
+++ b/samples/ffi/sqlite/docs/lib/scenario-full.svg
@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xl="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="27.846457 27.846457 511.23623 227.77166" width="511.23623" height="227.77166">
+  <defs>
+    <font-face font-family="Helvetica Neue" font-size="16" panose-1="2 0 5 3 0 0 0 2 0 4" units-per-em="1000" underline-position="-100" underline-thickness="50" slope="0" x-height="517" cap-height="714" ascent="951.9958" descent="-212.99744" font-weight="400">
+      <font-face-src>
+        <font-face-name name="HelveticaNeue"/>
+      </font-face-src>
+    </font-face>
+    <font-face font-family="Helvetica Neue" font-size="10" panose-1="2 0 5 3 0 0 0 2 0 4" units-per-em="1000" underline-position="-100" underline-thickness="50" slope="0" x-height="517" cap-height="714" ascent="951.9958" descent="-212.99744" font-weight="400">
+      <font-face-src>
+        <font-face-name name="HelveticaNeue"/>
+      </font-face-src>
+    </font-face>
+  </defs>
+  <metadata> Produced by OmniGraffle 7.9.4 
+    <dc:date>2019-03-13 09:53:08 +0000</dc:date>
+  </metadata>
+  <g id="Canvas_1" stroke-opacity="1" stroke="none" stroke-dasharray="none" fill-opacity="1" fill="none">
+    <title>Canvas 1</title>
+    <rect fill="white" x="27.846457" y="27.846457" width="511.23623" height="227.77166"/>
+    <g id="Canvas_1: Layer 1">
+      <title>Layer 1</title>
+      <g id="Graphic_3">
+        <rect x="28.346457" y="85.03937" width="85.03937" height="141.73229" fill="white"/>
+        <rect x="28.346457" y="85.03937" width="85.03937" height="141.73229" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(33.346457 110.00952)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="14.703685" y="15">Flutter </tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="22.847685" y="33.448">App</tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="8.031685" y="69.896">(Imports </tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="4.775685" y="88.34399">package)</tspan>
+        </text>
+      </g>
+      <g id="Graphic_5">
+        <rect x="453.5433" y="85.03937" width="85.03937" height="141.73229" fill="white"/>
+        <rect x="453.5433" y="85.03937" width="85.03937" height="141.73229" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(458.5433 137.45752)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="14.855685" y="15">Native </tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="12.927685" y="33.448">Library</tspan>
+        </text>
+      </g>
+      <g id="Graphic_6">
+        <rect x="311.81103" y="85.03937" width="56.692915" height="141.73229" fill="white"/>
+        <rect x="311.81103" y="85.03937" width="56.692915" height="141.73229" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(316.81103 146.68152)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x=".5064575" y="15">dart:ffi</tspan>
+        </text>
+      </g>
+      <g id="Graphic_7">
+        <rect x="113.38583" y="85.03937" width="56.692915" height="141.73229" fill="white"/>
+        <rect x="113.38583" y="85.03937" width="56.692915" height="141.73229" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(118.38583 119.20552)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="3.9014575" y="10">Package </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="15.571457" y="22.28">API</tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="1.8614575" y="46.56">(Does not </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="7.0514575" y="58.839996">expose </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="7.7764575" y="71.119995">dart:ffi)</tspan>
+        </text>
+      </g>
+      <g id="Graphic_8">
+        <rect x="28.346457" y="226.77166" width="311.81103" height="28.346457" fill="white"/>
+        <rect x="28.346457" y="226.77166" width="311.81103" height="28.346457" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(33.346457 231.7209)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="135.79352" y="15">Dart</tspan>
+        </text>
+      </g>
+      <g id="Graphic_9">
+        <rect x="340.1575" y="226.77166" width="198.4252" height="28.346457" fill="white"/>
+        <rect x="340.1575" y="226.77166" width="198.4252" height="28.346457" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(345.1575 231.7209)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="65.9486" y="15">C / C++</tspan>
+        </text>
+      </g>
+      <g id="Graphic_10">
+        <rect x="28.346457" y="28.346457" width="85.03937" height="56.692915" fill="white"/>
+        <rect x="28.346457" y="28.346457" width="85.03937" height="56.692915" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(33.346457 38.244917)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="22.847685" y="15">App </tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="1.2236848" y="33.448">Developer</tspan>
+        </text>
+      </g>
+      <g id="Graphic_11">
+        <rect x="113.38583" y="28.346457" width="198.4252" height="56.692915" fill="white"/>
+        <rect x="113.38583" y="28.346457" width="198.4252" height="56.692915" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(118.38583 38.244917)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="63.1006" y="15">Package</tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="57.9166" y="33.448">Developer</tspan>
+        </text>
+      </g>
+      <g id="Graphic_12">
+        <rect x="311.81103" y="28.346457" width="56.692915" height="56.692915" fill="white"/>
+        <rect x="311.81103" y="28.346457" width="56.692915" height="56.692915" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(316.81103 29.020918)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="8.234457" y="15">Dart </tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="11.490457" y="33.448">VM </tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="4.2264575" y="51.895996">Team</tspan>
+        </text>
+      </g>
+      <g id="Graphic_13">
+        <rect x="255.11812" y="85.03937" width="56.692915" height="141.73229" fill="white"/>
+        <rect x="255.11812" y="85.03937" width="56.692915" height="141.73229" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(260.11812 149.76552)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="3.8064575" y="10">Bindings</tspan>
+        </text>
+      </g>
+      <g id="Graphic_14">
+        <rect x="453.5433" y="28.346457" width="85.03937" height="56.692915" fill="white"/>
+        <rect x="453.5433" y="28.346457" width="85.03937" height="56.692915" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(458.5433 29.020918)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="14.855686" y="15">Native </tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="12.927686" y="33.448">Library </tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="1.2236862" y="51.895996">Developer</tspan>
+        </text>
+      </g>
+      <g id="Graphic_15">
+        <rect x="170.07874" y="85.03937" width="85.03937" height="141.73229" fill="white"/>
+        <rect x="170.07874" y="85.03937" width="85.03937" height="141.73229" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(175.07874 106.92552)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="18.074685" y="10">Package </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="2.8746848" y="22.28">Implementation</tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="9.559685" y="46.56">(Code which </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="7.259685" y="58.839996">converts C++ </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x=".1996848" y="71.119995">abstractions into </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="28.074685" y="83.39999">Dart </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="8.629685" y="95.67999">abstractions)</tspan>
+        </text>
+      </g>
+      <g id="Graphic_16">
+        <rect x="368.50395" y="28.346457" width="85.03937" height="56.692915" fill="white"/>
+        <rect x="368.50395" y="28.346457" width="85.03937" height="56.692915" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(373.50395 38.244917)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="6.407685" y="15">Package </tspan>
+          <tspan font-family="Helvetica Neue" font-size="16" font-weight="400" fill="black" x="1.2236848" y="33.448">Developer</tspan>
+        </text>
+      </g>
+      <g id="Graphic_17">
+        <rect x="368.50395" y="85.03937" width="85.03937" height="141.73229" fill="white"/>
+        <rect x="368.50395" y="85.03937" width="85.03937" height="141.73229" stroke="black" stroke-linecap="round" stroke-linejoin="round" stroke-width="1"/>
+        <text transform="translate(373.50395 119.20552)" fill="black">
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="14.554685" y="10">Glue code</tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="9.559685" y="34.28">(Code which </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="8.719685" y="46.56">takes care of </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x="5.194685" y="58.839996">things such as </tspan>
+          <tspan font-family="Helvetica Neue" font-size="10" font-weight="400" fill="black" x=".7796848" y="71.119995">C++ exceptions)</tspan>
+        </text>
+      </g>
+    </g>
+  </g>
+</svg>
diff --git a/samples/ffi/sqlite/docs/sqlite-tutorial.md b/samples/ffi/sqlite/docs/sqlite-tutorial.md
new file mode 100644
index 0000000..7f7aa22
--- /dev/null
+++ b/samples/ffi/sqlite/docs/sqlite-tutorial.md
@@ -0,0 +1,234 @@
+# dart:ffi SQLite mini tutorial
+
+In this mini tutorial we learn how to bind SQLite, a native library, in Dart using Dart's new foreign function interface `dart:ffi`.
+We build a package which provides a Dartlike SQLite API using objects and `Iterator`s.
+Inside the package we write Dart code which directly invokes C functions and manipulates C memory.
+
+## Binding C Functions to Dart
+
+The first step is to load a Native Library:
+
+```dart
+import "dart:ffi";
+
+DynamicLibrary sqlite = dlopenPlatformSpecific("sqlite3");
+```
+
+In a `DynamicLibrary` we can `lookup` functions.
+Let's lookup the function `sqlite3_prepare_v2` in the SQLite library.
+That function has the following signature in the library header file.
+
+```c++
+SQLITE_API int sqlite3_prepare_v2(
+  sqlite3 *db,            /* Database handle */
+  const char *zSql,       /* SQL statement, UTF-8 encoded */
+  int nByte,              /* Maximum length of zSql in bytes. */
+  sqlite3_stmt **ppStmt,  /* OUT: Statement handle */
+  const char **pzTail     /* OUT: Pointer to unused portion of zSql */
+);
+```
+
+In order to lookup a function, we need a _C signature_ and a _Dart signature_.
+
+```dart
+typedef sqlite3_prepare_v2_native_t = Int32 Function(
+    DatabasePointer database,
+    CString query,
+    Int32 nbytes,
+    Pointer<StatementPointer> statementOut,
+    Pointer<CString> tail);
+
+typedef Sqlite3_prepare_v2_t = int Function(
+    DatabasePointer database,
+    CString query,
+    int nbytes,
+    Pointer<StatementPointer> statementOut,
+    Pointer<CString> tail);
+```
+
+With these two signatures we can `lookup` the C function and expose it as a Dart function with `asFunction`.
+
+```dart
+Sqlite3_prepare_v2_t sqlite3_prepare_v2 = sqlite
+    .lookup<NativeFunction<sqlite3_prepare_v2_native_t>>("sqlite3_prepare_v2")
+    .asFunction();
+```
+
+Browse the code: [platform specific dynamic library loading](../lib/src/ffi/dylib_utils.dart), [C signatures](../lib/src/bindings/signatures.dart), [Dart signatures and bindings](../lib/src/bindings/bindings.dart), and [dart:ffi dynamic library interface](../../../../sdk/lib/ffi/dynamic_library.dart).
+
+## Managing C Memory
+
+In order to call `sqlite3_prepare_v2` to prepare a SQLite statement before executing, we need to be able to pass C pointers to C functions.
+
+Database and Statement pointers are opaque pointers in the SQLite C API.
+We specify these as classes extending `Pointer<Void>`.
+
+```dart
+class DatabasePointer extends Pointer<Void> {}
+class StatementPointer extends Pointer<Void> {}
+```
+
+Strings in C are pointers to character arrays.
+
+```dart
+class CString extends Pointer<Int8> {}
+```
+
+Pointers to C integers, floats, an doubles can be read from and written through to `dart:ffi`.
+However, before we can write to C memory from dart, we need to `allocate` some memory.
+
+```dart
+Pointer<Int8> p = allocate(); // Infers type argument allocate<Int8>(), and allocates 1 byte.
+p.store(123);                 // Stores a Dart int into this C int8.
+int v = p.load();             // Infers type argument p.load<int>(), and loads a value from C memory.
+```
+
+Note that you can only load a Dart `int` from a C `Int8`.
+Trying to load a Dart `double` will result in a runtime exception.
+
+We've almost modeled C Strings.
+The last thing we need is to use this `Pointer` as an array.
+We can do this by using `elementAt`.
+
+```dart
+CString string = allocate(count: 4).cast(); // Allocates 4 bytes and casts it to a string.
+string.store(73);                           // Stores 'F' at index 0.
+string.elementAt(1).store(73);              // Stores 'F' at index 1.
+string.elementAt(2).store(70);              // Stores 'I' at index 2.
+string.elementAt(3).store(0);               // Null terminates the string.
+```
+
+We wrap the above logic of allocating strings in the constructor `CString.allocate`.
+
+Now we have all ingredients to call `sqlite3_prepare_v2`.
+
+```dart
+Pointer<StatementPointer> statementOut = allocate();
+CString queryC = CString.allocate(query);
+int resultCode = sqlite3_prepare_v2(
+    _database, queryC, -1, statementOut, fromAddress(0));
+```
+
+With `dart:ffi` we are responsible for freeing C memory that we allocate.
+So after calling `sqlite3_prepare_v2` we read out the statement pointer, and free the statement pointer pointer and `CString` which held the query string.
+
+```
+StatementPointer statement = statementOut.load();
+statementOut.free();
+queryC.free();
+```
+
+Browse the code: [CString class](../lib/src/ffi/cstring.dart), [code calling sqlite3_prepare_v2](../lib/src/database.dart#57), and [dart:ffi pointer interface](../../../../sdk/lib/ffi/ffi.dart).
+
+## Dart API
+
+We would like to present the users of our package with an object oriented API - not exposing any `dart:ffi` objects to them.
+
+The SQLite C API returns a cursor to the first row of a result after executing a query.
+We can read out the columns of this row and move the cursor to the next row.
+The most natural way to expose this in Dart is through an `Iterable`.
+We provide our package users with the following API.
+
+```dart
+class Result implements Iterable<Row> {}
+
+class Row {
+  dynamic readColumnByIndex(int columnIndex) {}
+  dynamic readColumn(String columnName) {}
+}
+```
+
+However, this interface does not completely match the semantics of the C API.
+When we start reading the next `Row`, we do no longer have access to the previous `Row`.
+We can model this by letting a `Row` keep track if its current or not.
+
+```dart
+class Row {
+  bool _isCurrentRow = true;
+
+  dynamic readColumnByIndex(int columnIndex) {
+    if (!_isCurrentRow) {
+      throw Exception(
+          "This row is not the current row, reading data from the non-current"
+          " row is not supported by sqlite.");
+    }
+    // ...  
+    }
+}
+```
+
+A second mismatch between Dart and C is that in C we have to manually release resources.
+After executing a query and reading its results we need to call `sqlite3_finalize(statement)`.
+
+We can take two approaches here, either we structure the API in such a way that users of our package (implicitly) release resources, or we use finalizers to release resources.
+In this tutorial we take the first approach.
+
+If our users iterate over all `Row`s, we can implicitly finalize the statement after they are done with the last row.
+However, if they decide they do not want to iterate over the whole result, they need to explicitly state this.
+In this tutorial, we use the `ClosableIterator` abstraction for `Iterators` with backing resources that need to be `close`d.
+
+```dart
+Result result = d.query("""
+  select id, name
+  from Cookies
+  ;""");
+for (Row r in result) {
+  String name = r.readColumn("name");
+  print(name);
+}
+// Implicitly closes the iterator.
+
+result = d.query("""
+  select id, name
+  from Cookies
+  ;""");
+for (Row r in result) {
+  int id = r.readColumn("id");
+  if (id == 1) {
+    result.close(); // Explicitly closes the iterator, releasing underlying resources.
+    break;
+  }
+}
+```
+
+Browse the code: [Database, Result, Row](../lib/src/database.dart), and [CloseableIterator](../lib/src/collections/closable_iterator.dart).
+
+## Architecture Overview
+
+The following diagram summarized what we have implemented as _package developers_ in this tutorial.
+
+![architecture](lib/scenario-default.svg)
+
+As the package developers wrapping an existing native library, we have only written Dart code - not any C/C++ code.
+We specified bindings to the native library.
+We have provided our package users with an object oriented API without exposing any `dart:ffi` objects.
+And finally, we have implemented the package API by calling the C API.
+
+## Current dart:ffi Development Status
+
+In this minitutorial we used these `dart:ffi` features:
+
+* Loading dynamic libararies and looking up C functions in these dynamic libraries.
+* Calling C functions, with `dart:ffi` automatically marshalling arguments and return value.
+* Manipulating C memory through `Pointer`s with `allocate`, `free`, `load`, `store`, and `elementAt`.
+
+Features which we did not use in this tutorial:
+
+* `@struct` on subtypes of `Pointer` to define a struct with fields. (However, this feature is likely to change in the future.)
+
+Features which `dart:ffi` does not support yet:
+
+* Callbacks from C back into Dart.
+* Finalizers
+* C++ Exceptions (Not on roadmap yet.)
+
+Platform limitations:
+
+* `dart:ffi` is only enabled on 64 bit Windows, Linux, and MacOS. (Arm64 and 32 bit Intel are under review.)
+* `dart:ffi` only works in JIT mode, not in AOT.
+
+It is possible to work around some of the current limitations by adding a C/C++ layer.
+For example we could catch C++ exceptions in a C++ layer, and rethrow them in Dart.
+The architecture diagram would change to the following in that case.
+
+![architecture2](lib/scenario-full.svg)
\ No newline at end of file
diff --git a/samples/ffi/sqlite/example/main.dart b/samples/ffi/sqlite/example/main.dart
new file mode 100644
index 0000000..f54e7d3
--- /dev/null
+++ b/samples/ffi/sqlite/example/main.dart
@@ -0,0 +1,84 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:test/test.dart";
+
+import "../lib/sqlite.dart";
+
+void main() {
+  Database d = Database("test.db");
+  d.execute("drop table if exists Cookies;");
+  d.execute("""
+      create table Cookies (
+        id integer primary key,
+        name text not null,
+        alternative_name text
+      );""");
+  d.execute("""
+      insert into Cookies (id, name, alternative_name)
+      values
+        (1,'Chocolade chip cookie', 'Chocolade cookie'),
+        (2,'Ginger cookie', null),
+        (3,'Cinnamon roll', null)
+      ;""");
+  Result result = d.query("""
+      select
+        id,
+        name,
+        alternative_name,
+        case
+          when id=1 then 'foo'
+          when id=2 then 42
+          when id=3 then null
+        end as multi_typed_column
+      from Cookies
+      ;""");
+  for (Row r in result) {
+    int id = r.readColumnAsInt("id");
+    String name = r.readColumnByIndex(1);
+    String alternativeName = r.readColumn("alternative_name");
+    dynamic multiTypedValue = r.readColumn("multi_typed_column");
+    print("$id $name $alternativeName $multiTypedValue");
+  }
+  result = d.query("""
+      select
+        id,
+        name,
+        alternative_name,
+        case
+          when id=1 then 'foo'
+          when id=2 then 42
+          when id=3 then null
+        end as multi_typed_column
+      from Cookies
+      ;""");
+  for (Row r in result) {
+    int id = r.readColumnAsInt("id");
+    String name = r.readColumnByIndex(1);
+    String alternativeName = r.readColumn("alternative_name");
+    dynamic multiTypedValue = r.readColumn("multi_typed_column");
+    print("$id $name $alternativeName $multiTypedValue");
+    if (id == 2) {
+      result.close();
+      break;
+    }
+  }
+  try {
+    result.iterator.moveNext();
+  } on SQLiteException catch (e) {
+    print("expected exception on accessing result data after close: $e");
+  }
+  try {
+    d.query("""
+      select
+        id,
+        non_existing_column
+      from Cookies
+      ;""");
+  } on SQLiteException catch (e) {
+    print("expected this query to fail: $e");
+  }
+  d.execute("drop table Cookies;");
+  d.close();
+}
diff --git a/samples/ffi/sqlite/lib/sqlite.dart b/samples/ffi/sqlite/lib/sqlite.dart
new file mode 100644
index 0000000..d6bac5b
--- /dev/null
+++ b/samples/ffi/sqlite/lib/sqlite.dart
@@ -0,0 +1,10 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// A synchronous SQLite wrapper.
+///
+/// Written using dart:ffi.
+library sqlite;
+
+export "src/database.dart";
diff --git a/samples/ffi/sqlite/lib/src/bindings/bindings.dart b/samples/ffi/sqlite/lib/src/bindings/bindings.dart
new file mode 100644
index 0000000..613dbad
--- /dev/null
+++ b/samples/ffi/sqlite/lib/src/bindings/bindings.dart
@@ -0,0 +1,392 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "dart:ffi";
+
+import "../ffi/cstring.dart";
+import "../ffi/dylib_utils.dart";
+
+import "signatures.dart";
+import "types.dart";
+
+class _SQLiteBindings {
+  DynamicLibrary sqlite;
+
+  /// Opening A New Database Connection
+  ///
+  /// ^These routines open an SQLite database file as specified by the
+  /// filename argument. ^The filename argument is interpreted as UTF-8 for
+  /// sqlite3_open() and sqlite3_open_v2() and as UTF-16 in the native byte
+  /// order for sqlite3_open16(). ^(A database connection handle is usually
+  /// returned in *ppDb, even if an error occurs.  The only exception is that
+  /// if SQLite is unable to allocate memory to hold the sqlite3 object,
+  /// a NULL will be written into *ppDb instead of a pointer to the sqlite3
+  /// object.)^ ^(If the database is opened (and/or created) successfully, then
+  /// [SQLITE_OK] is returned.  Otherwise an error code is returned.)^ ^The
+  /// [sqlite3_errmsg] or sqlite3_errmsg16() routines can be used to obtain
+  /// an English language description of the error following a failure of any
+  /// of the sqlite3_open() routines.
+  int Function(CString filename, Pointer<DatabasePointer> databaseOut,
+      int flags, CString vfs) sqlite3_open_v2;
+
+  int Function(DatabasePointer database) sqlite3_close_v2;
+
+  /// Compiling An SQL Statement
+  ///
+  /// To execute an SQL query, it must first be compiled into a byte-code
+  /// program using one of these routines.
+  ///
+  /// The first argument, "db", is a database connection obtained from a
+  /// prior successful call to sqlite3_open, [sqlite3_open_v2] or
+  /// sqlite3_open16.  The database connection must not have been closed.
+  ///
+  /// The second argument, "zSql", is the statement to be compiled, encoded
+  /// as either UTF-8 or UTF-16.  The sqlite3_prepare() and sqlite3_prepare_v2()
+  /// interfaces use UTF-8, and sqlite3_prepare16() and sqlite3_prepare16_v2()
+  /// use UTF-16.
+  ///
+  /// ^If the nByte argument is less than zero, then zSql is read up to the
+  /// first zero terminator. ^If nByte is non-negative, then it is the maximum
+  /// number of  bytes read from zSql.  ^When nByte is non-negative, the
+  /// zSql string ends at either the first '\000' or '\u0000' character or
+  /// the nByte-th byte, whichever comes first. If the caller knows
+  /// that the supplied string is nul-terminated, then there is a small
+  /// performance advantage to be gained by passing an nByte parameter that
+  /// is equal to the number of bytes in the input string <i>including</i>
+  /// the nul-terminator bytes.
+  ///
+  /// ^If pzTail is not NULL then *pzTail is made to point to the first byte
+  /// past the end of the first SQL statement in zSql.  These routines only
+  /// compile the first statement in zSql, so *pzTail is left pointing to
+  /// what remains uncompiled.
+  ///
+  /// ^*ppStmt is left pointing to a compiled prepared statement that can be
+  /// executed using sqlite3_step.  ^If there is an error, *ppStmt is set
+  /// to NULL.  ^If the input text contains no SQL (if the input is an empty
+  /// string or a comment) then *ppStmt is set to NULL.
+  /// The calling procedure is responsible for deleting the compiled
+  /// SQL statement using [sqlite3_finalize] after it has finished with it.
+  /// ppStmt may not be NULL.
+  ///
+  /// ^On success, the sqlite3_prepare family of routines return [SQLITE_OK];
+  /// otherwise an error code is returned.
+  ///
+  /// The sqlite3_prepare_v2() and sqlite3_prepare16_v2() interfaces are
+  /// recommended for all new programs. The two older interfaces are retained
+  /// for backwards compatibility, but their use is discouraged.
+  /// ^In the "v2" interfaces, the prepared statement
+  /// that is returned (the sqlite3_stmt object) contains a copy of the
+  /// original SQL text. This causes the [sqlite3_step] interface to
+  /// behave differently in three ways:
+  int Function(
+      DatabasePointer database,
+      CString query,
+      int nbytes,
+      Pointer<StatementPointer> statementOut,
+      Pointer<CString> tail) sqlite3_prepare_v2;
+
+  /// Evaluate An SQL Statement
+  ///
+  /// After a prepared statement has been prepared using either
+  /// [sqlite3_prepare_v2] or sqlite3_prepare16_v2() or one of the legacy
+  /// interfaces sqlite3_prepare() or sqlite3_prepare16(), this function
+  /// must be called one or more times to evaluate the statement.
+  ///
+  /// The details of the behavior of the sqlite3_step() interface depend
+  /// on whether the statement was prepared using the newer "v2" interface
+  /// [sqlite3_prepare_v2] and sqlite3_prepare16_v2() or the older legacy
+  /// interface sqlite3_prepare() and sqlite3_prepare16().  The use of the
+  /// new "v2" interface is recommended for new applications but the legacy
+  /// interface will continue to be supported.
+  ///
+  /// ^In the legacy interface, the return value will be either [SQLITE_BUSY],
+  /// [SQLITE_DONE], [SQLITE_ROW], [SQLITE_ERROR], or [SQLITE_MISUSE].
+  /// ^With the "v2" interface, any of the other [result codes] or
+  /// [extended result codes] might be returned as well.
+  ///
+  /// ^[SQLITE_BUSY] means that the database engine was unable to acquire the
+  /// database locks it needs to do its job.  ^If the statement is a [COMMIT]
+  /// or occurs outside of an explicit transaction, then you can retry the
+  /// statement.  If the statement is not a [COMMIT] and occurs within an
+  /// explicit transaction then you should rollback the transaction before
+  /// continuing.
+  ///
+  /// ^[SQLITE_DONE] means that the statement has finished executing
+  /// successfully.  sqlite3_step() should not be called again on this virtual
+  /// machine without first calling [sqlite3_reset()] to reset the virtual
+  /// machine back to its initial state.
+  ///
+  /// ^If the SQL statement being executed returns any data, then [SQLITE_ROW]
+  /// is returned each time a new row of data is ready for processing by the
+  /// caller. The values may be accessed using the [column access functions].
+  /// sqlite3_step() is called again to retrieve the next row of data.
+  ///
+  /// ^[SQLITE_ERROR] means that a run-time error (such as a constraint
+  /// violation) has occurred.  sqlite3_step() should not be called again on
+  /// the VM. More information may be found by calling [sqlite3_errmsg()].
+  /// ^With the legacy interface, a more specific error code (for example,
+  /// [SQLITE_INTERRUPT], [SQLITE_SCHEMA], [SQLITE_CORRUPT], and so forth)
+  /// can be obtained by calling [sqlite3_reset()] on the
+  /// prepared statement.  ^In the "v2" interface,
+  /// the more specific error code is returned directly by sqlite3_step().
+  ///
+  /// [SQLITE_MISUSE] means that the this routine was called inappropriately.
+  /// Perhaps it was called on a prepared statement that has
+  /// already been [sqlite3_finalize | finalized] or on one that had
+  /// previously returned [SQLITE_ERROR] or [SQLITE_DONE].  Or it could
+  /// be the case that the same database connection is being used by two or
+  /// more threads at the same moment in time.
+  ///
+  /// For all versions of SQLite up to and including 3.6.23.1, a call to
+  /// [sqlite3_reset] was required after sqlite3_step() returned anything
+  /// other than [Errors.SQLITE_ROW] before any subsequent invocation of
+  /// sqlite3_step().  Failure to reset the prepared statement using
+  /// [sqlite3_reset()] would result in an [Errors.SQLITE_MISUSE] return from
+  /// sqlite3_step().  But after version 3.6.23.1, sqlite3_step() began
+  /// calling [sqlite3_reset] automatically in this circumstance rather
+  /// than returning [Errors.SQLITE_MISUSE]. This is not considered a
+  /// compatibility break because any application that ever receives an
+  /// [Errors.SQLITE_MISUSE] error is broken by definition.  The
+  /// [SQLITE_OMIT_AUTORESET] compile-time option
+  /// can be used to restore the legacy behavior.
+  ///
+  /// <b>Goofy Interface Alert:</b> In the legacy interface, the sqlite3_step()
+  /// API always returns a generic error code, [SQLITE_ERROR], following any
+  /// error other than [SQLITE_BUSY] and [SQLITE_MISUSE].  You must call
+  /// [sqlite3_reset()] or [sqlite3_finalize()] in order to find one of the
+  /// specific [error codes] that better describes the error.
+  /// We admit that this is a goofy design.  The problem has been fixed
+  /// with the "v2" interface.  If you prepare all of your SQL statements
+  /// using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead
+  /// of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces,
+  /// then the more specific [error codes] are returned directly
+  /// by sqlite3_step().  The use of the "v2" interface is recommended.
+  int Function(StatementPointer statement) sqlite3_step;
+
+  /// CAPI3REF: Reset A Prepared Statement Object
+  ///
+  /// The sqlite3_reset() function is called to reset a prepared statement
+  /// object back to its initial state, ready to be re-executed.
+  /// ^Any SQL statement variables that had values bound to them using
+  /// the sqlite3_bind_blob | sqlite3_bind_*() API retain their values.
+  /// Use sqlite3_clear_bindings() to reset the bindings.
+  ///
+  /// ^The [sqlite3_reset] interface resets the prepared statement S
+  /// back to the beginning of its program.
+  ///
+  /// ^If the most recent call to [sqlite3_step] for the
+  /// prepared statement S returned [Errors.SQLITE_ROW] or [Errors.SQLITE_DONE],
+  /// or if [sqlite3_step] has never before been called on S,
+  /// then [sqlite3_reset] returns [Errors.SQLITE_OK].
+  ///
+  /// ^If the most recent call to [sqlite3_step(S)] for the
+  /// prepared statement S indicated an error, then
+  /// [sqlite3_reset] returns an appropriate [Errors].
+  ///
+  /// ^The [sqlite3_reset] interface does not change the values
+  int Function(StatementPointer statement) sqlite3_reset;
+
+  /// Destroy A Prepared Statement Object
+  ///
+  /// ^The sqlite3_finalize() function is called to delete a prepared statement.
+  /// ^If the most recent evaluation of the statement encountered no errors
+  /// or if the statement is never been evaluated, then sqlite3_finalize()
+  /// returns SQLITE_OK.  ^If the most recent evaluation of statement S failed,
+  /// then sqlite3_finalize(S) returns the appropriate error code or extended
+  /// error code.
+  ///
+  /// ^The sqlite3_finalize(S) routine can be called at any point during
+  /// the life cycle of prepared statement S:
+  /// before statement S is ever evaluated, after
+  /// one or more calls to [sqlite3_reset], or after any call
+  /// to [sqlite3_step] regardless of whether or not the statement has
+  /// completed execution.
+  ///
+  /// ^Invoking sqlite3_finalize() on a NULL pointer is a harmless no-op.
+  ///
+  /// The application must finalize every prepared statement in order to avoid
+  /// resource leaks.  It is a grievous error for the application to try to use
+  /// a prepared statement after it has been finalized.  Any use of a prepared
+  /// statement after it has been finalized can result in undefined and
+  /// undesirable behavior such as segfaults and heap corruption.
+  int Function(StatementPointer statement) sqlite3_finalize;
+
+  /// Number Of Columns In A Result Set
+  ///
+  /// ^Return the number of columns in the result set returned by the
+  /// prepared statement. ^This routine returns 0 if pStmt is an SQL
+  /// statement that does not return data (for example an [UPDATE]).
+  int Function(StatementPointer statement) sqlite3_column_count;
+
+  /// Column Names In A Result Set
+  ///
+  /// ^These routines return the name assigned to a particular column
+  /// in the result set of a SELECT statement.  ^The sqlite3_column_name()
+  /// interface returns a pointer to a zero-terminated UTF-8 string
+  /// and sqlite3_column_name16() returns a pointer to a zero-terminated
+  /// UTF-16 string.  ^The first parameter is the prepared statement
+  /// that implements the SELECT statement. ^The second parameter is the
+  /// column number.  ^The leftmost column is number 0.
+  ///
+  /// ^The returned string pointer is valid until either the prepared statement
+  /// is destroyed by [sqlite3_finalize] or until the statement is automatically
+  /// reprepared by the first call to [sqlite3_step] for a particular run
+  /// or until the next call to
+  /// sqlite3_column_name() or sqlite3_column_name16() on the same column.
+  ///
+  /// ^If sqlite3_malloc() fails during the processing of either routine
+  /// (for example during a conversion from UTF-8 to UTF-16) then a
+  /// NULL pointer is returned.
+  ///
+  /// ^The name of a result column is the value of the "AS" clause for
+  /// that column, if there is an AS clause.  If there is no AS clause
+  /// then the name of the column is unspecified and may change from
+  CString Function(StatementPointer statement, int columnIndex)
+      sqlite3_column_name;
+
+  /// CAPI3REF: Declared Datatype Of A Query Result
+  ///
+  /// ^(The first parameter is a prepared statement.
+  /// If this statement is a SELECT statement and the Nth column of the
+  /// returned result set of that SELECT is a table column (not an
+  /// expression or subquery) then the declared type of the table
+  /// column is returned.)^  ^If the Nth column of the result set is an
+  /// expression or subquery, then a NULL pointer is returned.
+  /// ^The returned string is always UTF-8 encoded.
+  ///
+  /// ^(For example, given the database schema:
+  ///
+  /// CREATE TABLE t1(c1 VARIANT);
+  ///
+  /// and the following statement to be compiled:
+  ///
+  /// SELECT c1 + 1, c1 FROM t1;
+  ///
+  /// this routine would return the string "VARIANT" for the second result
+  /// column (i==1), and a NULL pointer for the first result column (i==0).)^
+  ///
+  /// ^SQLite uses dynamic run-time typing.  ^So just because a column
+  /// is declared to contain a particular type does not mean that the
+  /// data stored in that column is of the declared type.  SQLite is
+  /// strongly typed, but the typing is dynamic not static.  ^Type
+  /// is associated with individual values, not with the containers
+  /// used to hold those values.
+  CString Function(StatementPointer statement, int columnIndex)
+      sqlite3_column_decltype;
+
+  int Function(StatementPointer statement, int columnIndex) sqlite3_column_type;
+
+  ValuePointer Function(StatementPointer statement, int columnIndex)
+      sqlite3_column_value;
+
+  double Function(StatementPointer statement, int columnIndex)
+      sqlite3_column_double;
+
+  int Function(StatementPointer statement, int columnIndex) sqlite3_column_int;
+
+  CString Function(StatementPointer statement, int columnIndex)
+      sqlite3_column_text;
+
+  /// The sqlite3_errstr() interface returns the English-language text that
+  /// describes the result code, as UTF-8. Memory to hold the error message
+  /// string is managed internally and must not be freed by the application.
+  CString Function(int code) sqlite3_errstr;
+
+  /// Error Codes And Messages
+  ///
+  /// ^The sqlite3_errcode() interface returns the numeric [result code] or
+  /// [extended result code] for the most recent failed sqlite3_* API call
+  /// associated with a [database connection]. If a prior API call failed
+  /// but the most recent API call succeeded, the return value from
+  /// sqlite3_errcode() is undefined.  ^The sqlite3_extended_errcode()
+  /// interface is the same except that it always returns the
+  /// [extended result code] even when extended result codes are
+  /// disabled.
+  ///
+  /// ^The sqlite3_errmsg() and sqlite3_errmsg16() return English-language
+  /// text that describes the error, as either UTF-8 or UTF-16 respectively.
+  /// ^(Memory to hold the error message string is managed internally.
+  /// The application does not need to worry about freeing the result.
+  /// However, the error string might be overwritten or deallocated by
+  /// subsequent calls to other SQLite interface functions.)^
+  ///
+  /// When the serialized [threading mode] is in use, it might be the
+  /// case that a second error occurs on a separate thread in between
+  /// the time of the first error and the call to these interfaces.
+  /// When that happens, the second error will be reported since these
+  /// interfaces always report the most recent result.  To avoid
+  /// this, each thread can obtain exclusive use of the [database connection] D
+  /// by invoking [sqlite3_mutex_enter]([sqlite3_db_mutex](D)) before beginning
+  /// to use D and invoking [sqlite3_mutex_leave]([sqlite3_db_mutex](D)) after
+  /// all calls to the interfaces listed here are completed.
+  ///
+  /// If an interface fails with SQLITE_MISUSE, that means the interface
+  /// was invoked incorrectly by the application.  In that case, the
+  /// error code and message may or may not be set.
+  CString Function(DatabasePointer database) sqlite3_errmsg;
+
+  _SQLiteBindings() {
+    sqlite = dlopenPlatformSpecific("sqlite3");
+    sqlite3_open_v2 = sqlite
+        .lookup<NativeFunction<sqlite3_open_v2_native_t>>("sqlite3_open_v2")
+        .asFunction();
+    sqlite3_close_v2 = sqlite
+        .lookup<NativeFunction<sqlite3_close_v2_native_t>>("sqlite3_close_v2")
+        .asFunction();
+    sqlite3_prepare_v2 = sqlite
+        .lookup<NativeFunction<sqlite3_prepare_v2_native_t>>(
+            "sqlite3_prepare_v2")
+        .asFunction();
+    sqlite3_step = sqlite
+        .lookup<NativeFunction<sqlite3_step_native_t>>("sqlite3_step")
+        .asFunction();
+    sqlite3_reset = sqlite
+        .lookup<NativeFunction<sqlite3_reset_native_t>>("sqlite3_reset")
+        .asFunction();
+    sqlite3_finalize = sqlite
+        .lookup<NativeFunction<sqlite3_finalize_native_t>>("sqlite3_finalize")
+        .asFunction();
+    sqlite3_errstr = sqlite
+        .lookup<NativeFunction<sqlite3_errstr_native_t>>("sqlite3_errstr")
+        .asFunction();
+    sqlite3_errmsg = sqlite
+        .lookup<NativeFunction<sqlite3_errmsg_native_t>>("sqlite3_errmsg")
+        .asFunction();
+    sqlite3_column_count = sqlite
+        .lookup<NativeFunction<sqlite3_column_count_native_t>>(
+            "sqlite3_column_count")
+        .asFunction();
+    sqlite3_column_name = sqlite
+        .lookup<NativeFunction<sqlite3_column_name_native_t>>(
+            "sqlite3_column_name")
+        .asFunction();
+    sqlite3_column_decltype = sqlite
+        .lookup<NativeFunction<sqlite3_column_decltype_native_t>>(
+            "sqlite3_column_decltype")
+        .asFunction();
+    sqlite3_column_type = sqlite
+        .lookup<NativeFunction<sqlite3_column_type_native_t>>(
+            "sqlite3_column_type")
+        .asFunction();
+    sqlite3_column_value = sqlite
+        .lookup<NativeFunction<sqlite3_column_value_native_t>>(
+            "sqlite3_column_value")
+        .asFunction();
+    sqlite3_column_double = sqlite
+        .lookup<NativeFunction<sqlite3_column_double_native_t>>(
+            "sqlite3_column_double")
+        .asFunction();
+    sqlite3_column_int = sqlite
+        .lookup<NativeFunction<sqlite3_column_int_native_t>>(
+            "sqlite3_column_int")
+        .asFunction();
+    sqlite3_column_text = sqlite
+        .lookup<NativeFunction<sqlite3_column_text_native_t>>(
+            "sqlite3_column_text")
+        .asFunction();
+  }
+}
+
+_SQLiteBindings _cachedBindings;
+_SQLiteBindings get bindings => _cachedBindings ??= _SQLiteBindings();
diff --git a/samples/ffi/sqlite/lib/src/bindings/constants.dart b/samples/ffi/sqlite/lib/src/bindings/constants.dart
new file mode 100644
index 0000000..71aa82e
--- /dev/null
+++ b/samples/ffi/sqlite/lib/src/bindings/constants.dart
@@ -0,0 +1,182 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// Result Codes
+///
+/// Many SQLite functions return an integer result code from the set shown
+/// here in order to indicates success or failure.
+///
+/// New error codes may be added in future versions of SQLite.
+///
+/// See also: SQLITE_IOERR_READ | extended result codes,
+/// sqlite3_vtab_on_conflict() SQLITE_ROLLBACK | result codes.
+class Errors {
+  /// Successful result
+  static const int SQLITE_OK = 0;
+
+  /// Generic error
+  static const int SQLITE_ERROR = 1;
+
+  /// Internal logic error in SQLite
+  static const int SQLITE_INTERNAL = 2;
+
+  /// Access permission denied
+  static const int SQLITE_PERM = 3;
+
+  /// Callback routine requested an abort
+  static const int SQLITE_ABORT = 4;
+
+  /// The database file is locked
+  static const int SQLITE_BUSY = 5;
+
+  /// A table in the database is locked
+  static const int SQLITE_LOCKED = 6;
+
+  /// A malloc() failed
+  static const int SQLITE_NOMEM = 7;
+
+  /// Attempt to write a readonly database
+  static const int SQLITE_READONLY = 8;
+
+  /// Operation terminated by sqlite3_interrupt()
+  static const int SQLITE_INTERRUPT = 9;
+
+  /// Some kind of disk I/O error occurred
+  static const int SQLITE_IOERR = 10;
+
+  /// The database disk image is malformed
+  static const int SQLITE_CORRUPT = 11;
+
+  /// Unknown opcode in sqlite3_file_control()
+  static const int SQLITE_NOTFOUND = 12;
+
+  /// Insertion failed because database is full
+  static const int SQLITE_FULL = 13;
+
+  /// Unable to open the database file
+  static const int SQLITE_CANTOPEN = 14;
+
+  /// Database lock protocol error
+  static const int SQLITE_PROTOCOL = 15;
+
+  /// Internal use only
+  static const int SQLITE_EMPTY = 16;
+
+  /// The database schema changed
+  static const int SQLITE_SCHEMA = 17;
+
+  /// String or BLOB exceeds size limit
+  static const int SQLITE_TOOBIG = 18;
+
+  /// Abort due to constraint violation
+  static const int SQLITE_CONSTRAINT = 19;
+
+  /// Data type mismatch
+  static const int SQLITE_MISMATCH = 20;
+
+  /// Library used incorrectly
+  static const int SQLITE_MISUSE = 21;
+
+  /// Uses OS features not supported on host
+  static const int SQLITE_NOLFS = 22;
+
+  /// Authorization denied
+  static const int SQLITE_AUTH = 23;
+
+  /// Not used
+  static const int SQLITE_FORMAT = 24;
+
+  /// 2nd parameter to sqlite3_bind out of range
+  static const int SQLITE_RANGE = 25;
+
+  /// File opened that is not a database file
+  static const int SQLITE_NOTADB = 26;
+
+  /// Notifications from sqlite3_log()
+  static const int SQLITE_NOTICE = 27;
+
+  /// Warnings from sqlite3_log()
+  static const int SQLITE_WARNING = 28;
+
+  /// sqlite3_step() has another row ready
+  static const int SQLITE_ROW = 100;
+
+  /// sqlite3_step() has finished executing
+  static const int SQLITE_DONE = 101;
+}
+
+/// Flags For File Open Operations
+///
+/// These bit values are intended for use in the
+/// 3rd parameter to the [sqlite3_open_v2()] interface and
+/// in the 4th parameter to the [sqlite3_vfs.xOpen] method.
+class Flags {
+  /// Ok for sqlite3_open_v2()
+  static const int SQLITE_OPEN_READONLY = 0x00000001;
+
+  /// Ok for sqlite3_open_v2()
+  static const int SQLITE_OPEN_READWRITE = 0x00000002;
+
+  /// Ok for sqlite3_open_v2()
+  static const int SQLITE_OPEN_CREATE = 0x00000004;
+
+  /// VFS only
+  static const int SQLITE_OPEN_DELETEONCLOSE = 0x00000008;
+
+  /// VFS only
+  static const int SQLITE_OPEN_EXCLUSIVE = 0x00000010;
+
+  /// VFS only
+  static const int SQLITE_OPEN_AUTOPROXY = 0x00000020;
+
+  /// Ok for sqlite3_open_v2()
+  static const int SQLITE_OPEN_URI = 0x00000040;
+
+  /// Ok for sqlite3_open_v2()
+  static const int SQLITE_OPEN_MEMORY = 0x00000080;
+
+  /// VFS only
+  static const int SQLITE_OPEN_MAIN_DB = 0x00000100;
+
+  /// VFS only
+  static const int SQLITE_OPEN_TEMP_DB = 0x00000200;
+
+  /// VFS only
+  static const int SQLITE_OPEN_TRANSIENT_DB = 0x00000400;
+
+  /// VFS only
+  static const int SQLITE_OPEN_MAIN_JOURNAL = 0x00000800;
+
+  /// VFS only
+  static const int SQLITE_OPEN_TEMP_JOURNAL = 0x00001000;
+
+  /// VFS only
+  static const int SQLITE_OPEN_SUBJOURNAL = 0x00002000;
+
+  /// VFS only
+  static const int SQLITE_OPEN_MASTER_JOURNAL = 0x00004000;
+
+  /// Ok for sqlite3_open_v2()
+  static const int SQLITE_OPEN_NOMUTEX = 0x00008000;
+
+  /// Ok for sqlite3_open_v2()
+  static const int SQLITE_OPEN_FULLMUTEX = 0x00010000;
+
+  /// Ok for sqlite3_open_v2()
+  static const int SQLITE_OPEN_SHAREDCACHE = 0x00020000;
+
+  /// Ok for sqlite3_open_v2()
+  static const int SQLITE_OPEN_PRIVATECACHE = 0x00040000;
+
+  /// VFS only
+  static const int SQLITE_OPEN_WAL = 0x00080000;
+}
+
+class Types {
+  static const int SQLITE_INTEGER = 1;
+  static const int SQLITE_FLOAT = 2;
+  static const int SQLITE_TEXT = 3;
+  static const int SQLITE_BLOB = 4;
+  static const int SQLITE_NULL = 5;
+}
diff --git a/samples/ffi/sqlite/lib/src/bindings/signatures.dart b/samples/ffi/sqlite/lib/src/bindings/signatures.dart
new file mode 100644
index 0000000..bb1b1e9
--- /dev/null
+++ b/samples/ffi/sqlite/lib/src/bindings/signatures.dart
@@ -0,0 +1,55 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "dart:ffi";
+
+import "../ffi/cstring.dart";
+
+import "types.dart";
+
+typedef sqlite3_open_v2_native_t = Int32 Function(
+    CString filename, Pointer<DatabasePointer> ppDb, Int32 flags, CString vfs);
+
+typedef sqlite3_close_v2_native_t = Int32 Function(DatabasePointer database);
+
+typedef sqlite3_prepare_v2_native_t = Int32 Function(
+    DatabasePointer database,
+    CString query,
+    Int32 nbytes,
+    Pointer<StatementPointer> statementOut,
+    Pointer<CString> tail);
+
+typedef sqlite3_step_native_t = Int32 Function(StatementPointer statement);
+
+typedef sqlite3_reset_native_t = Int32 Function(StatementPointer statement);
+
+typedef sqlite3_finalize_native_t = Int32 Function(StatementPointer statement);
+
+typedef sqlite3_errstr_native_t = CString Function(Int32 error);
+
+typedef sqlite3_errmsg_native_t = CString Function(DatabasePointer database);
+
+typedef sqlite3_column_count_native_t = Int32 Function(
+    StatementPointer statement);
+
+typedef sqlite3_column_name_native_t = CString Function(
+    StatementPointer statement, Int32 columnIndex);
+
+typedef sqlite3_column_decltype_native_t = CString Function(
+    StatementPointer statement, Int32 columnIndex);
+
+typedef sqlite3_column_type_native_t = Int32 Function(
+    StatementPointer statement, Int32 columnIndex);
+
+typedef sqlite3_column_value_native_t = ValuePointer Function(
+    StatementPointer statement, Int32 columnIndex);
+
+typedef sqlite3_column_double_native_t = Double Function(
+    StatementPointer statement, Int32 columnIndex);
+
+typedef sqlite3_column_int_native_t = Int32 Function(
+    StatementPointer statement, Int32 columnIndex);
+
+typedef sqlite3_column_text_native_t = CString Function(
+    StatementPointer statement, Int32 columnIndex);
diff --git a/samples/ffi/sqlite/lib/src/bindings/types.dart b/samples/ffi/sqlite/lib/src/bindings/types.dart
new file mode 100644
index 0000000..b843d74
--- /dev/null
+++ b/samples/ffi/sqlite/lib/src/bindings/types.dart
@@ -0,0 +1,77 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "dart:ffi";
+
+import "../ffi/cstring.dart";
+
+/// Database Connection Handle
+///
+/// Each open SQLite database is represented by a pointer to an instance of
+/// the opaque structure named "sqlite3".  It is useful to think of an sqlite3
+/// pointer as an object.  The [sqlite3_open()], [sqlite3_open16()], and
+/// [sqlite3_open_v2()] interfaces are its constructors, and [sqlite3_close()]
+/// is its destructor.  There are many other interfaces (such as
+/// [sqlite3_prepare_v2()], [sqlite3_create_function()], and
+/// [sqlite3_busy_timeout()] to name but three) that are methods on an
+class DatabasePointer extends Pointer<Void> {}
+
+/// SQL Statement Object
+///
+/// An instance of this object represents a single SQL statement.
+/// This object is variously known as a "prepared statement" or a
+/// "compiled SQL statement" or simply as a "statement".
+///
+/// The life of a statement object goes something like this:
+///
+/// <ol>
+/// <li> Create the object using [sqlite3_prepare_v2()] or a related
+///      function.
+/// <li> Bind values to [host parameters] using the sqlite3_bind_*()
+///      interfaces.
+/// <li> Run the SQL by calling [sqlite3_step()] one or more times.
+/// <li> Reset the statement using [sqlite3_reset()] then go back
+///      to step 2.  Do this zero or more times.
+/// <li> Destroy the object using [sqlite3_finalize()].
+/// </ol>
+///
+/// Refer to documentation on individual methods above for additional
+/// information.
+class StatementPointer extends Pointer<Void> {}
+
+/// Dynamically Typed Value Object
+///
+/// SQLite uses the sqlite3_value object to represent all values
+/// that can be stored in a database table. SQLite uses dynamic typing
+/// for the values it stores.  ^Values stored in sqlite3_value objects
+/// can be integers, floating point values, strings, BLOBs, or NULL.
+///
+/// An sqlite3_value object may be either "protected" or "unprotected".
+/// Some interfaces require a protected sqlite3_value.  Other interfaces
+/// will accept either a protected or an unprotected sqlite3_value.
+/// Every interface that accepts sqlite3_value arguments specifies
+/// whether or not it requires a protected sqlite3_value.
+///
+/// The terms "protected" and "unprotected" refer to whether or not
+/// a mutex is held.  An internal mutex is held for a protected
+/// sqlite3_value object but no mutex is held for an unprotected
+/// sqlite3_value object.  If SQLite is compiled to be single-threaded
+/// (with [SQLITE_THREADSAFE=0] and with [sqlite3_threadsafe()] returning 0)
+/// or if SQLite is run in one of reduced mutex modes
+/// [SQLITE_CONFIG_SINGLETHREAD] or [SQLITE_CONFIG_MULTITHREAD]
+/// then there is no distinction between protected and unprotected
+/// sqlite3_value objects and they can be used interchangeably.  However,
+/// for maximum code portability it is recommended that applications
+/// still make the distinction between protected and unprotected
+/// sqlite3_value objects even when not strictly required.
+///
+/// ^The sqlite3_value objects that are passed as parameters into the
+/// implementation of [application-defined SQL functions] are protected.
+/// ^The sqlite3_value object returned by
+/// [sqlite3_column_value()] is unprotected.
+/// Unprotected sqlite3_value objects may only be used with
+/// [sqlite3_result_value()] and [sqlite3_bind_value()].
+/// The [sqlite3_value_blob | sqlite3_value_type()] family of
+/// interfaces require protected sqlite3_value objects.
+class ValuePointer extends Pointer<Void> {}
diff --git a/samples/ffi/sqlite/lib/src/collections/closable_iterator.dart b/samples/ffi/sqlite/lib/src/collections/closable_iterator.dart
new file mode 100644
index 0000000..a86a58b
--- /dev/null
+++ b/samples/ffi/sqlite/lib/src/collections/closable_iterator.dart
@@ -0,0 +1,29 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// This iterator should be [close]d after use.
+///
+/// [ClosableIterator]s often use resources which should be freed after use.
+/// The consumer of the iterator can either manually [close] the iterator, or
+/// consume all elements on which the iterator will automatically be closed.
+abstract class ClosableIterator<T> extends Iterator<T> {
+  /// Close this iterator.
+  void close();
+
+  /// Moves to the next element and [close]s the iterator if it was the last
+  /// element.
+  bool moveNext();
+}
+
+/// This iterable's iterator should be [close]d after use.
+///
+/// Companion class of [ClosableIterator].
+abstract class ClosableIterable<T> extends Iterable<T> {
+  /// Close this iterables iterator.
+  void close();
+
+  /// Returns a [ClosableIterator] that allows iterating the elements of this
+  /// [ClosableIterable].
+  ClosableIterator<T> get iterator;
+}
diff --git a/samples/ffi/sqlite/lib/src/database.dart b/samples/ffi/sqlite/lib/src/database.dart
new file mode 100644
index 0000000..a20b7fc
--- /dev/null
+++ b/samples/ffi/sqlite/lib/src/database.dart
@@ -0,0 +1,307 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "dart:collection";
+import "dart:ffi";
+
+import "bindings/bindings.dart";
+import "bindings/types.dart";
+import "bindings/constants.dart";
+import "collections/closable_iterator.dart";
+import "ffi/cstring.dart";
+
+/// [Database] represents an open connection to a SQLite database.
+///
+/// All functions against a database may throw [SQLiteError].
+///
+/// This database interacts with SQLite synchonously.
+class Database {
+  DatabasePointer _database;
+  bool _open = false;
+
+  /// Open a database located at the file [path].
+  Database(String path,
+      [int flags = Flags.SQLITE_OPEN_READWRITE | Flags.SQLITE_OPEN_CREATE]) {
+    Pointer<DatabasePointer> dbOut = allocate();
+    CString pathC = CString.allocate(path);
+    final int resultCode =
+        bindings.sqlite3_open_v2(pathC, dbOut, flags, fromAddress(0));
+    _database = dbOut.load();
+    dbOut.free();
+    pathC.free();
+
+    if (resultCode == Errors.SQLITE_OK) {
+      _open = true;
+    } else {
+      // Even if "open" fails, sqlite3 will still create a database object. We
+      // can just destroy it.
+      SQLiteException exception = _loadError(resultCode);
+      close();
+      throw exception;
+    }
+  }
+
+  /// Close the database.
+  ///
+  /// This should only be called once on a database unless an exception is
+  /// thrown. It should be called at least once to finalize the database and
+  /// avoid resource leaks.
+  void close() {
+    assert(_open);
+    final int resultCode = bindings.sqlite3_close_v2(_database);
+    if (resultCode == Errors.SQLITE_OK) {
+      _open = false;
+    } else {
+      throw _loadError(resultCode);
+    }
+  }
+
+  /// Execute a query, discarding any returned rows.
+  void execute(String query) {
+    Pointer<StatementPointer> statementOut = allocate();
+    CString queryC = CString.allocate(query);
+    int resultCode = bindings.sqlite3_prepare_v2(
+        _database, queryC, -1, statementOut, fromAddress(0));
+    StatementPointer statement = statementOut.load();
+    statementOut.free();
+    queryC.free();
+
+    while (resultCode == Errors.SQLITE_ROW || resultCode == Errors.SQLITE_OK) {
+      resultCode = bindings.sqlite3_step(statement);
+    }
+    bindings.sqlite3_finalize(statement);
+    if (resultCode != Errors.SQLITE_DONE) {
+      throw _loadError(resultCode);
+    }
+  }
+
+  /// Evaluate a query and return the resulting rows as an iterable.
+  Result query(String query) {
+    Pointer<StatementPointer> statementOut = allocate();
+    CString queryC = CString.allocate(query);
+    int resultCode = bindings.sqlite3_prepare_v2(
+        _database, queryC, -1, statementOut, fromAddress(0));
+    StatementPointer statement = statementOut.load();
+    statementOut.free();
+    queryC.free();
+
+    if (resultCode != Errors.SQLITE_OK) {
+      bindings.sqlite3_finalize(statement);
+      throw _loadError(resultCode);
+    }
+
+    Map<String, int> columnIndices = {};
+    int columnCount = bindings.sqlite3_column_count(statement);
+    for (int i = 0; i < columnCount; i++) {
+      String columnName =
+          CString.fromUtf8(bindings.sqlite3_column_name(statement, i));
+      columnIndices[columnName] = i;
+    }
+
+    return Result._(this, statement, columnIndices);
+  }
+
+  SQLiteException _loadError([int errorCode]) {
+    String errorMessage = CString.fromUtf8(bindings.sqlite3_errmsg(_database));
+    if (errorCode == null) {
+      return SQLiteException(errorMessage);
+    }
+    String errorCodeExplanation =
+        CString.fromUtf8(bindings.sqlite3_errstr(errorCode));
+    return SQLiteException(
+        "$errorMessage (Code $errorCode: $errorCodeExplanation)");
+  }
+}
+
+/// [Result] represents a [Database.query]'s result and provides an [Iterable]
+/// interface for the results to be consumed.
+///
+/// Please note that this iterator should be [close]d manually if not all [Row]s
+/// are consumed.
+class Result extends IterableBase<Row> implements ClosableIterable<Row> {
+  final Database _database;
+  final ClosableIterator<Row> _iterator;
+  final StatementPointer _statement;
+  final Map<String, int> _columnIndices;
+
+  Row _currentRow = null;
+
+  Result._(
+    this._database,
+    this._statement,
+    this._columnIndices,
+  ) : _iterator = _ResultIterator(_statement, _columnIndices) {}
+
+  void close() => _iterator.close();
+
+  ClosableIterator<Row> get iterator => _iterator;
+}
+
+class _ResultIterator implements ClosableIterator<Row> {
+  final StatementPointer _statement;
+  final Map<String, int> _columnIndices;
+
+  Row _currentRow = null;
+  bool _closed = false;
+
+  _ResultIterator(this._statement, this._columnIndices) {}
+
+  bool moveNext() {
+    if (_closed) {
+      throw SQLiteException("The result has already been closed.");
+    }
+    _currentRow?._setNotCurrent();
+    int stepResult = bindings.sqlite3_step(_statement);
+    if (stepResult == Errors.SQLITE_ROW) {
+      _currentRow = Row._(_statement, _columnIndices);
+      return true;
+    } else {
+      close();
+      return false;
+    }
+  }
+
+  Row get current {
+    if (_closed) {
+      throw SQLiteException("The result has already been closed.");
+    }
+    return _currentRow;
+  }
+
+  void close() {
+    _currentRow?._setNotCurrent();
+    _closed = true;
+    bindings.sqlite3_finalize(_statement);
+  }
+}
+
+class Row {
+  final StatementPointer _statement;
+  final Map<String, int> _columnIndices;
+
+  bool _isCurrentRow = true;
+
+  Row._(this._statement, this._columnIndices) {}
+
+  /// Reads column [columnName].
+  ///
+  /// By default it returns a dynamically typed value. If [convert] is set to
+  /// [Convert.StaticType] the value is converted to the static type computed
+  /// for the column by the query compiler.
+  dynamic readColumn(String columnName,
+      {Convert convert = Convert.DynamicType}) {
+    return readColumnByIndex(_columnIndices[columnName], convert: convert);
+  }
+
+  /// Reads column [columnName].
+  ///
+  /// By default it returns a dynamically typed value. If [convert] is set to
+  /// [Convert.StaticType] the value is converted to the static type computed
+  /// for the column by the query compiler.
+  dynamic readColumnByIndex(int columnIndex,
+      {Convert convert = Convert.DynamicType}) {
+    _checkIsCurrentRow();
+
+    Type dynamicType;
+    if (convert == Convert.DynamicType) {
+      dynamicType =
+          _typeFromCode(bindings.sqlite3_column_type(_statement, columnIndex));
+    } else {
+      dynamicType = _typeFromText(CString.fromUtf8(
+          bindings.sqlite3_column_decltype(_statement, columnIndex)));
+    }
+
+    switch (dynamicType) {
+      case Type.Integer:
+        return readColumnByIndexAsInt(columnIndex);
+      case Type.Text:
+        return readColumnByIndexAsText(columnIndex);
+      case Type.Null:
+        return null;
+        break;
+      default:
+    }
+  }
+
+  /// Reads column [columnName] and converts to [Type.Integer] if not an
+  /// integer.
+  int readColumnAsInt(String columnName) {
+    return readColumnByIndexAsInt(_columnIndices[columnName]);
+  }
+
+  /// Reads column [columnIndex] and converts to [Type.Integer] if not an
+  /// integer.
+  int readColumnByIndexAsInt(int columnIndex) {
+    _checkIsCurrentRow();
+    return bindings.sqlite3_column_int(_statement, columnIndex);
+  }
+
+  /// Reads column [columnName] and converts to [Type.Text] if not text.
+  String readColumnAsText(String columnName) {
+    return readColumnByIndexAsText(_columnIndices[columnName]);
+  }
+
+  /// Reads column [columnIndex] and converts to [Type.Text] if not text.
+  String readColumnByIndexAsText(int columnIndex) {
+    _checkIsCurrentRow();
+    return CString.fromUtf8(
+        bindings.sqlite3_column_text(_statement, columnIndex));
+  }
+
+  void _checkIsCurrentRow() {
+    if (!_isCurrentRow) {
+      throw Exception(
+          "This row is not the current row, reading data from the non-current"
+          " row is not supported by sqlite.");
+    }
+  }
+
+  void _setNotCurrent() {
+    _isCurrentRow = false;
+  }
+}
+
+Type _typeFromCode(int code) {
+  switch (code) {
+    case Types.SQLITE_INTEGER:
+      return Type.Integer;
+    case Types.SQLITE_FLOAT:
+      return Type.Float;
+    case Types.SQLITE_TEXT:
+      return Type.Text;
+    case Types.SQLITE_BLOB:
+      return Type.Blob;
+    case Types.SQLITE_NULL:
+      return Type.Null;
+  }
+  throw Exception("Unknown type [$code]");
+}
+
+Type _typeFromText(String textRepresentation) {
+  switch (textRepresentation) {
+    case "integer":
+      return Type.Integer;
+    case "float":
+      return Type.Float;
+    case "text":
+      return Type.Text;
+    case "blob":
+      return Type.Blob;
+    case "null":
+      return Type.Null;
+  }
+  if (textRepresentation == null) return Type.Null;
+  throw Exception("Unknown type [$textRepresentation]");
+}
+
+enum Type { Integer, Float, Text, Blob, Null }
+
+enum Convert { DynamicType, StaticType }
+
+class SQLiteException {
+  final String message;
+  SQLiteException(this.message);
+
+  String toString() => message;
+}
diff --git a/samples/ffi/sqlite/lib/src/ffi/arena.dart b/samples/ffi/sqlite/lib/src/ffi/arena.dart
new file mode 100644
index 0000000..2e19d55
--- /dev/null
+++ b/samples/ffi/sqlite/lib/src/ffi/arena.dart
@@ -0,0 +1,57 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "dart:async";
+import "dart:ffi";
+
+/// [Arena] manages allocated C memory.
+///
+/// Arenas are zoned.
+class Arena {
+  Arena();
+
+  List<Pointer<Void>> _allocations = [];
+
+  /// Bound the lifetime of [ptr] to this [Arena].
+  T scoped<T extends Pointer>(T ptr) {
+    _allocations.add(ptr.cast());
+    return ptr;
+  }
+
+  /// Frees all memory pointed to by [Pointer]s in this arena.
+  void finalize() {
+    for (final ptr in _allocations) {
+      ptr.free();
+    }
+  }
+
+  /// The last [Arena] in the zone.
+  factory Arena.current() {
+    return Zone.current[#_currentArena];
+  }
+}
+
+/// Bound the lifetime of [ptr] to the current [Arena].
+T scoped<T extends Pointer>(T ptr) => Arena.current().scoped(ptr);
+
+class RethrownError {
+  dynamic original;
+  StackTrace originalStackTrace;
+  RethrownError(this.original, this.originalStackTrace);
+  toString() => """RethrownError(${original})
+${originalStackTrace}""";
+}
+
+/// Runs the [body] in an [Arena] freeing all memory which is [scoped] during
+/// execution of [body] at the end of the execution.
+R runArena<R>(R Function(Arena) body) {
+  Arena arena = Arena();
+  try {
+    return runZoned(() => body(arena),
+        zoneValues: {#_currentArena: arena},
+        onError: (error, st) => throw RethrownError(error, st));
+  } finally {
+    arena.finalize();
+  }
+}
diff --git a/samples/ffi/sqlite/lib/src/ffi/cstring.dart b/samples/ffi/sqlite/lib/src/ffi/cstring.dart
new file mode 100644
index 0000000..5b07085
--- /dev/null
+++ b/samples/ffi/sqlite/lib/src/ffi/cstring.dart
@@ -0,0 +1,43 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "dart:convert";
+import "dart:ffi";
+
+import "arena.dart";
+
+/// Represents a String in C memory, managed by an [Arena].
+class CString extends Pointer<Int8> {
+  /// Allocates a [CString] in the current [Arena] and populates it with
+  /// [dartStr].
+  factory CString(String dartStr) => CString.inArena(Arena.current(), dartStr);
+
+  /// Allocates a [CString] in [arena] and populates it with [dartStr].
+  factory CString.inArena(Arena arena, String dartStr) =>
+      arena.scoped(CString.allocate(dartStr));
+
+  /// Allocate a [CString] not managed in and populates it with [dartStr].
+  ///
+  /// This [CString] is not managed by an [Arena]. Please ensure to [free] the
+  /// memory manually!
+  factory CString.allocate(String dartStr) {
+    List<int> units = Utf8Encoder().convert(dartStr);
+    Pointer<Int8> str = allocate(count: units.length + 1);
+    for (int i = 0; i < units.length; ++i) {
+      str.elementAt(i).store(units[i]);
+    }
+    str.elementAt(units.length).store(0);
+    return str.cast();
+  }
+
+  /// Read the string for C memory into Dart.
+  static String fromUtf8(CString str) {
+    if (str == null) return null;
+    int len = 0;
+    while (str.elementAt(++len).load<int>() != 0);
+    List<int> units = List(len);
+    for (int i = 0; i < len; ++i) units[i] = str.elementAt(i).load();
+    return Utf8Decoder().convert(units);
+  }
+}
diff --git a/samples/ffi/sqlite/lib/src/ffi/dylib_utils.dart b/samples/ffi/sqlite/lib/src/ffi/dylib_utils.dart
new file mode 100644
index 0000000..fb8153a
--- /dev/null
+++ b/samples/ffi/sqlite/lib/src/ffi/dylib_utils.dart
@@ -0,0 +1,20 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:ffi' as ffi;
+import 'dart:io' show Platform;
+
+String _platformPath(String name, {String path}) {
+  if (path == null) path = "";
+  if (Platform.isLinux || Platform.isAndroid)
+    return path + "lib" + name + ".so";
+  if (Platform.isMacOS) return path + "lib" + name + ".dylib";
+  if (Platform.isWindows) return path + name + ".dll";
+  throw Exception("Platform not implemented");
+}
+
+ffi.DynamicLibrary dlopenPlatformSpecific(String name, {String path}) {
+  String fullPath = _platformPath(name, path: path);
+  return ffi.DynamicLibrary.open(fullPath);
+}
diff --git a/samples/ffi/sqlite/pubspec.yaml b/samples/ffi/sqlite/pubspec.yaml
new file mode 100644
index 0000000..8b0136c
--- /dev/null
+++ b/samples/ffi/sqlite/pubspec.yaml
@@ -0,0 +1,9 @@
+name: sqlite3
+version: 0.0.1
+description: >-
+  Sqlite3 wrapper. Demo for dart:ffi.
+author: Daco Harkes <dacoharkes@google.com>, Samir Jindel <sjindel@google.com>
+environment:
+  sdk: '>=2.1.0 <3.0.0'
+dev_dependencies:
+  test: ^1.5.3
\ No newline at end of file
diff --git a/samples/ffi/sqlite/test/sqlite_test.dart b/samples/ffi/sqlite/test/sqlite_test.dart
new file mode 100644
index 0000000..95bbc6c
--- /dev/null
+++ b/samples/ffi/sqlite/test/sqlite_test.dart
@@ -0,0 +1,164 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// VMOptions=--optimization-counter-threshold=5
+
+import "package:test/test.dart";
+
+import '../lib/sqlite.dart';
+
+void main() {
+  test("sqlite integration test", () {
+    Database d = Database("test.db");
+    d.execute("drop table if exists Cookies;");
+    d.execute("""
+      create table Cookies (
+        id integer primary key,
+        name text not null,
+        alternative_name text
+      );""");
+    d.execute("""
+      insert into Cookies (id, name, alternative_name)
+      values
+        (1,'Chocolade chip cookie', 'Chocolade cookie'),
+        (2,'Ginger cookie', null),
+        (3,'Cinnamon roll', null)
+      ;""");
+    Result result = d.query("""
+      select
+        id,
+        name,
+        alternative_name,
+        case
+          when id=1 then 'foo'
+          when id=2 then 42
+          when id=3 then null
+        end as multi_typed_column
+      from Cookies
+      ;""");
+    for (Row r in result) {
+      int id = r.readColumnAsInt("id");
+      expect(true, 1 <= id && id <= 3);
+      String name = r.readColumnByIndex(1);
+      expect(true, name is String);
+      String alternativeName = r.readColumn("alternative_name");
+      expect(true, alternativeName is String || alternativeName == null);
+      dynamic multiTypedValue = r.readColumn("multi_typed_column");
+      expect(
+          true,
+          multiTypedValue == 42 ||
+              multiTypedValue == 'foo' ||
+              multiTypedValue == null);
+      print("$id $name $alternativeName $multiTypedValue");
+    }
+    result = d.query("""
+      select
+        id,
+        name,
+        alternative_name,
+        case
+          when id=1 then 'foo'
+          when id=2 then 42
+          when id=3 then null
+        end as multi_typed_column
+      from Cookies
+      ;""");
+    for (Row r in result) {
+      int id = r.readColumnAsInt("id");
+      expect(true, 1 <= id && id <= 3);
+      String name = r.readColumnByIndex(1);
+      expect(true, name is String);
+      String alternativeName = r.readColumn("alternative_name");
+      expect(true, alternativeName is String || alternativeName == null);
+      dynamic multiTypedValue = r.readColumn("multi_typed_column");
+      expect(
+          true,
+          multiTypedValue == 42 ||
+              multiTypedValue == 'foo' ||
+              multiTypedValue == null);
+      print("$id $name $alternativeName $multiTypedValue");
+      if (id == 2) {
+        result.close();
+        break;
+      }
+    }
+    try {
+      result.iterator.moveNext();
+    } on SQLiteException catch (e) {
+      print("expected exception on accessing result data after close: $e");
+    }
+    try {
+      d.query("""
+      select
+        id,
+        non_existing_column
+      from Cookies
+      ;""");
+    } on SQLiteException catch (e) {
+      print("expected this query to fail: $e");
+    }
+    d.execute("drop table Cookies;");
+    d.close();
+  });
+
+  test("concurrent db open and queries", () {
+    Database d = Database("test.db");
+    Database d2 = Database("test.db");
+    d.execute("drop table if exists Cookies;");
+    d.execute("""
+      create table Cookies (
+        id integer primary key,
+        name text not null,
+        alternative_name text
+      );""");
+    d.execute("""
+      insert into Cookies (id, name, alternative_name)
+      values
+        (1,'Chocolade chip cookie', 'Chocolade cookie'),
+        (2,'Ginger cookie', null),
+        (3,'Cinnamon roll', null)
+      ;""");
+    Result r = d.query("select * from Cookies;");
+    Result r2 = d2.query("select * from Cookies;");
+    r.iterator..moveNext();
+    r2.iterator..moveNext();
+    r.iterator..moveNext();
+    Result r3 = d2.query("select * from Cookies;");
+    r3.iterator..moveNext();
+    expect(2, r.iterator.current.readColumn("id"));
+    expect(1, r2.iterator.current.readColumn("id"));
+    expect(1, r3.iterator.current.readColumn("id"));
+    r.close();
+    r2.close();
+    r3.close();
+    d.close();
+    d2.close();
+  });
+
+  test("stress test", () {
+    Database d = Database("test.db");
+    d.execute("drop table if exists Cookies;");
+    d.execute("""
+      create table Cookies (
+        id integer primary key,
+        name text not null,
+        alternative_name text
+      );""");
+    int repeats = 100;
+    for (int i = 0; i < repeats; i++) {
+      d.execute("""
+      insert into Cookies (name, alternative_name)
+      values
+        ('Chocolade chip cookie', 'Chocolade cookie'),
+        ('Ginger cookie', null),
+        ('Cinnamon roll', null)
+      ;""");
+    }
+    Result r = d.query("select count(*) from Cookies;");
+    int count = r.first.readColumnByIndexAsInt(0);
+    expect(count, 3 * repeats);
+    r.close();
+    d.close();
+  });
+}
diff --git a/samples/sample_extension/sample_asynchronous_extension.dart b/samples/sample_extension/sample_asynchronous_extension.dart
index 69af1e5..6b81369 100644
--- a/samples/sample_extension/sample_asynchronous_extension.dart
+++ b/samples/sample_extension/sample_asynchronous_extension.dart
@@ -13,7 +13,7 @@
   static SendPort _port;
 
   Future<List<int>> randomArray(int seed, int length) {
-    var completer = new Completer();
+    var completer = new Completer<List<int>>();
     var replyPort = new RawReceivePort();
     var args = new List(3);
     args[0] = seed;
diff --git a/samples/sample_extension/sample_extension.cc b/samples/sample_extension/sample_extension.cc
index 5af3f74..f183d36 100644
--- a/samples/sample_extension/sample_extension.cc
+++ b/samples/sample_extension/sample_extension.cc
@@ -102,7 +102,11 @@
         result.value.as_typed_data.type = Dart_TypedData_kUint8;
         result.value.as_typed_data.values = values;
         result.value.as_typed_data.length = length;
-        Dart_PostCObject(reply_port_id, &result);
+        if (Dart_PostCObject(reply_port_id, &result)) {
+          Dart_CObject error;
+          error.type = Dart_CObject_kNull;
+          Dart_PostCObject(reply_port_id, &error);
+        }
         free(values);
         // It is OK that result is destroyed when function exits.
         // Dart_PostCObject has copied its data.
@@ -110,9 +114,8 @@
       }
     }
   }
-  Dart_CObject result;
-  result.type = Dart_CObject_kNull;
-  Dart_PostCObject(reply_port_id, &result);
+  fprintf(stderr, "Invalid message received, cannot proceed. Aborting the process.\n");
+  abort();
 }
 
 
diff --git a/samples/samples.status b/samples/samples.status
index 3af1d7e..09ae4a3 100644
--- a/samples/samples.status
+++ b/samples/samples.status
@@ -8,9 +8,6 @@
 [ $builder_tag == optimization_counter_threshold ]
 sample_extension/test/sample_extension_app_snapshot_test: SkipByDesign # This test is too slow for testing with low optimization counter threshold.
 
-[ $compiler == app_jit ]
-sample_extension/test/sample_extension_app_snapshot_test: RuntimeError
-
 [ $compiler == precompiler ]
 sample_extension/test/*: Skip # These tests attempt to spawn another script using the precompiled runtime.
 
@@ -26,9 +23,9 @@
 [ !$preview_dart_2 && ($runtime == dart_precompiled || $runtime == vm) ]
 *: SkipByDesign # Deprecating all Dart1 modes of execution
 
-[ $compiler == app_jitk || $compiler == dartk || $compiler == dartkb || $compiler == dartkp ]
-sample_extension/test/sample_extension_app_snapshot_test: RuntimeError
-sample_extension/test/sample_extension_test: RuntimeError
+[ $compiler == app_jitk || $compiler == dartkb || $compiler == dartkp ]
+sample_extension/test/sample_extension_app_snapshot_test: SkipByDesign
+sample_extension/test/sample_extension_test: SkipByDesign
 
 # Skip tests that use dart:io
 [ $runtime == d8 || $browser ]
@@ -36,3 +33,6 @@
 
 [ $hot_reload || $hot_reload_rollback ]
 sample_extension/test/sample_extension_app_snapshot_test: SkipByDesign # Cannot reload with URI pointing to app snapshot.
+
+[ $arch != x64 || $system != linux || $compiler != dartk || $hot_reload || $hot_reload_rollback ]
+ffi/sqlite/test/sqlite_test: Skip  # FFI not supported or libsqlite3.so not available.
diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn
index 3f48b0a..78cd365 100644
--- a/sdk/BUILD.gn
+++ b/sdk/BUILD.gn
@@ -20,8 +20,10 @@
   # Build a SDK with less stuff. It excludes dart2js, ddc, and web libraries.
   dart_platform_sdk = true
 
-  # Path to stripped dart binary relative to build output directory.
+  # Path to stripped dart binaries relative to build output directory.
   dart_stripped_binary = "dart"
+  dartaotruntime_stripped_binary = "dartaotruntime"
+  gen_snapshot_stripped_binary = "gen_snapshot"
 }
 
 # The directory layout of the SDK is as follows:
@@ -30,11 +32,14 @@
 # ....bin/
 # ......dart or dart.exe (executable)
 # ......dart.lib (import library for VM native extensions on Windows)
+# ......dartaotruntime or dartaotruntime.exe (executable)
 # ......dartdoc
 # ......dartfmt
+# ......dart2aot
 # ......dart2js
 # ......dartanalyzer
 # ......dartdevc
+# ......utils/gen_snapshot or utils/gen_snapshot.exe (executable)
 # ......pub
 # ......snapshots/
 # ........analysis_server.dart.snapshot
@@ -43,6 +48,7 @@
 # ........dartdoc.dart.snapshot
 # ........dartfmt.dart.snapshot
 # ........dartdevc.dart.snapshot
+# ........gen_kernel.dart.snapshot
 # ........kernel_worker.dart.snapshot
 # ........pub.dart.snapshot
 #.........resources/
@@ -341,6 +347,75 @@
   }
 }
 
+copy("copy_dartaotruntime") {
+  deps = [
+    "../runtime/bin:dartaotruntime",
+  ]
+  dartaotruntime_out = get_label_info("../runtime/bin:dartaotruntime", "root_out_dir")
+  if (is_win) {
+    sources = [
+      "$dartaotruntime_out/dartaotruntime.exe",
+    ]
+  } else {
+    sources = [
+      "$dartaotruntime_out/$dartaotruntime_stripped_binary",
+    ]
+  }
+  if (is_win) {
+    sources += [ "$dartaotruntime_out/dartaotruntime.lib" ]
+  }
+  outputs = [
+    "$root_out_dir/dart-sdk/bin/{{source_file_part}}",
+  ]
+}
+
+copy("copy_gen_snapshot") {
+  deps = [
+    "../runtime/bin:gen_snapshot",
+  ]
+  gen_snapshot_out = get_label_info("../runtime/bin:gen_snapshot", "root_out_dir")
+  if (is_win) {
+    sources = [
+      "$gen_snapshot_out/gen_snapshot.exe",
+    ]
+  } else {
+    sources = [
+      "$gen_snapshot_out/$gen_snapshot_stripped_binary",
+    ]
+  }
+  if (is_win) {
+    sources += [ "$gen_snapshot_out/gen_snapshot.lib" ]
+  }
+  outputs = [
+    "$root_out_dir/dart-sdk/bin/utils/{{source_file_part}}",
+  ]
+}
+
+copy("copy_dart2aot") {
+  ext = ""
+  if (is_win) {
+    ext = ".bat"
+  }
+  sources = [
+    "bin/dart2aot$ext",
+  ]
+  outputs = [
+    "$root_out_dir/dart-sdk/bin/{{source_file_part}}",
+  ]
+}
+
+copy("copy_gen_kernel_snapshot") {
+  deps = [
+    "../utils/gen_kernel",
+  ]
+  sources = [
+    "$root_gen_dir/gen_kernel.dart.snapshot",
+  ]
+  outputs = [
+    "$root_out_dir/dart-sdk/bin/snapshots/{{source_file_part}}",
+  ]
+}
+
 # A template for copying the things in _platform_sdk_scripts and
 # _full_sdk_scripts into bin/
 template("copy_sdk_script") {
@@ -495,6 +570,16 @@
   ]
 }
 
+copy("copy_abi_dill_files") {
+  visibility = [ ":create_common_sdk" ]
+  sources = [
+    "../tools/abiversions",
+  ]
+  outputs = [
+    "$root_out_dir/dart-sdk/lib/_internal/abiversions",
+  ]
+}
+
 copy("copy_dart2js_dill_files") {
   visibility = [ ":create_full_sdk" ]
   deps = [
@@ -889,6 +974,7 @@
 group("create_common_sdk") {
   visibility = [ ":create_sdk" ]
   public_deps = [
+    ":copy_abi_dill_files",
     ":copy_analysis_summaries",
     ":copy_api_readme",
     ":copy_dart",
diff --git a/sdk/bin/dart2aot b/sdk/bin/dart2aot
new file mode 100755
index 0000000..9390db6
--- /dev/null
+++ b/sdk/bin/dart2aot
@@ -0,0 +1,111 @@
+#!/usr/bin/env bash
+# Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE file.
+
+# Script for generating AOT snapshot in two steps:
+# - Compilation to kernel with additional AOT specific transformations.
+# - Compilation of kernel into snapshot using gen_snapshot.
+
+# Parse incoming arguments and extract the value of --packages option if any
+# was passed. Split options (--xyz) and non-options into two separate arrays.
+# All options will be passed to gen_snapshot, while --packages will be
+# passed to the CFE (Common Front-End).
+
+set -e
+
+OPTIONS=()
+GEN_KERNEL_OPTIONS=()
+PACKAGES=
+BUILD_ELF=0
+
+ARGV=()
+for arg in "$@"; do
+  case $arg in
+    --packages=*)
+    PACKAGES="$arg"
+    ;;
+    --enable-asserts)
+    GEN_KERNEL_OPTIONS+=("$arg")
+    OPTIONS+=("$arg")
+    ;;
+    --tfa | \
+    --no-tfa | \
+    -D* )
+    GEN_KERNEL_OPTIONS+=("$arg")
+    ;;
+    --build-elf)
+    BUILD_ELF=1
+    ;;
+    --*)
+    OPTIONS+=("$arg")
+    ;;
+    *)
+    ARGV+=("$arg")
+    ;;
+  esac
+done
+
+if [ "${#ARGV[@]}" -ne 2 ]; then
+    echo "Usage: $0 [options] <dart-source-file> <dart-aot-file>"
+    echo ""
+    echo "Dart AOT (ahead-of-time) compile Dart source code into native machine code."
+    exit 1
+fi
+
+SOURCE_FILE="${ARGV[0]}"
+SNAPSHOT_FILE="${ARGV[1]}"
+
+if [ $BUILD_ELF -eq 1 ]; then
+  GEN_SNAPSHOT_OPTION="--snapshot-kind=app-aot-assembly"
+  GEN_SNAPSHOT_FILENAME="--assembly=${SNAPSHOT_FILE}.S"
+else
+  GEN_SNAPSHOT_OPTION="--snapshot-kind=app-aot-blobs"
+  GEN_SNAPSHOT_FILENAME="--blobs_container_filename=${SNAPSHOT_FILE}"
+fi
+
+function follow_links() {
+  file="$1"
+  while [ -h "$file" ]; do
+    # On Mac OS, readlink -f doesn't work.
+    file="$(readlink "$file")"
+  done
+  echo "$file"
+}
+
+# Unlike $0, $BASH_SOURCE points to the absolute path of this file.
+PROG_NAME="$(follow_links "$BASH_SOURCE")"
+
+# Handle the case where dart-sdk/bin has been symlinked to.
+BIN_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)"
+
+SDK_DIR="$(cd "${BIN_DIR}/.." ; pwd -P)"
+
+DART="$BIN_DIR/dart"
+GEN_SNAPSHOT="$BIN_DIR/utils/gen_snapshot"
+
+SNAPSHOT_DIR="$BIN_DIR/snapshots"
+SNAPSHOT="$SNAPSHOT_DIR/gen_kernel.dart.snapshot"
+
+# Step 1: Generate Kernel binary from the input Dart source.
+"$DART"                                                                        \
+     "${SNAPSHOT}"                                                             \
+     --platform "${SDK_DIR}/lib/_internal/vm_platform_strong.dill"             \
+     --aot                                                                     \
+     -Ddart.vm.product=true                                                    \
+     "${GEN_KERNEL_OPTIONS[@]}"                                                \
+     $PACKAGES                                                                 \
+     -o "$SNAPSHOT_FILE.dill"                                                  \
+     "$SOURCE_FILE"
+
+# Step 2: Generate snapshot from the Kernel binary.
+"$GEN_SNAPSHOT"                                                                \
+     "$GEN_SNAPSHOT_OPTION"                                                    \
+     "$GEN_SNAPSHOT_FILENAME"                                                  \
+     "${OPTIONS[@]}"                                                           \
+     "$SNAPSHOT_FILE.dill"
+
+# Step 3: Assemble the assembly file into an ELF object.
+if [ $BUILD_ELF -eq 1 ]; then
+    gcc -shared -o "$SNAPSHOT_FILE" "${SNAPSHOT_FILE}.S"
+fi
diff --git a/sdk/bin/dart2aot.bat b/sdk/bin/dart2aot.bat
new file mode 100644
index 0000000..321e867
--- /dev/null
+++ b/sdk/bin/dart2aot.bat
@@ -0,0 +1,58 @@
+@echo off
+REM Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+REM for details. All rights reserved. Use of this source code is governed by a
+REM BSD-style license that can be found in the LICENSE file.
+
+setlocal
+rem Handle the case where dart-sdk/bin has been symlinked to.
+set DIR_NAME_WITH_SLASH=%~dp0
+set DIR_NAME=%DIR_NAME_WITH_SLASH:~0,-1%%
+call :follow_links "%DIR_NAME%", RETURNED_BIN_DIR
+rem Get rid of surrounding quotes.
+for %%i in ("%RETURNED_BIN_DIR%") do set BIN_DIR=%%~fi
+
+rem Get absolute full name for SDK_DIR.
+for %%i in ("%BIN_DIR%\..\") do set SDK_DIR=%%~fi
+
+rem Remove trailing backslash if there is one
+IF %SDK_DIR:~-1%==\ set SDK_DIR=%SDK_DIR:~0,-1%
+
+rem Get absolute full name for DART_ROOT.
+for %%i in ("%SDK_DIR%\..\") do set DART_ROOT=%%~fi
+
+rem Remove trailing backslash if there is one
+if %DART_ROOT:~-1%==\ set DART_ROOT=%DART_ROOT:~0,-1%
+
+set DART=%BIN_DIR%\dart.exe
+set GEN_KERNEL=%BIN_DIR%\snapshots\gen_kernel.dart.snapshot
+set VM_PLATFORM_STRONG=%SDK_DIR%\lib\_internal\vm_platform_strong.dill
+set GEN_SNAPSHOT=%BIN_DIR%\utils\gen_snapshot.exe
+
+set SOURCE_FILE=%1
+set SNAPSHOT_FILE=%2
+set GEN_SNAPSHOT_OPTION=--snapshot-kind=app-aot-blobs
+set GEN_SNAPSHOT_FILENAME=--blobs_container_filename=%SNAPSHOT_FILE%
+
+REM Step 1: Generate Kernel binary from the input Dart source.
+%DART% %GEN_KERNEL% --platform %VM_PLATFORM_STRONG% --aot -Ddart.vm.product=true -o %SNAPSHOT_FILE%.dill %SOURCE_FILE%
+
+REM Step 2: Generate snapshot from the Kernel binary.
+%GEN_SNAPSHOT% %GEN_SNAPSHOT_OPTION% %GEN_SNAPSHOT_FILENAME% %SNAPSHOT_FILE%.dill
+
+endlocal
+
+exit /b %errorlevel%
+
+:follow_links
+setlocal
+for %%i in (%1) do set result=%%~fi
+set current=
+for /f "usebackq tokens=2 delims=[]" %%i in (`dir /a:l "%~dp1" 2^>nul ^
+                                             ^| %SystemRoot%\System32\find.exe ">     %~n1 [" 2^>nul`) do (
+  set current=%%i
+)
+if not "%current%"=="" call :follow_links "%current%", result
+endlocal & set %~2=%result%
+goto :eof
+
+:end
diff --git a/sdk/lib/_internal/js_runtime/lib/annotations.dart b/sdk/lib/_internal/js_runtime/lib/annotations.dart
index 390024a..f53c5f3 100644
--- a/sdk/lib/_internal/js_runtime/lib/annotations.dart
+++ b/sdk/lib/_internal/js_runtime/lib/annotations.dart
@@ -4,31 +4,6 @@
 
 part of _js_helper;
 
-/// Tells the optimizing compiler that the annotated method has no
-/// side-effects. Allocations don't count as side-effects, since they can be
-/// dropped without changing the semantics of the program.
-///
-/// Requires @NoInline() to function correctly.
-class NoSideEffects {
-  const NoSideEffects();
-}
-
-/// Tells the optimizing compiler that the annotated method cannot throw.
-/// Requires @NoInline() to function correctly.
-class NoThrows {
-  const NoThrows();
-}
-
-/// Tells the optimizing compiler to not inline the annotated method.
-class NoInline {
-  const NoInline();
-}
-
-/// Tells the optimizing compiler to always inline the annotated method.
-class ForceInline {
-  const ForceInline();
-}
-
 /// Marks a class as native and defines its JavaScript name(s).
 class Native {
   final String name;
diff --git a/sdk/lib/_internal/js_runtime/lib/collection_patch.dart b/sdk/lib/_internal/js_runtime/lib/collection_patch.dart
index fc7a3bf..300d490 100644
--- a/sdk/lib/_internal/js_runtime/lib/collection_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/collection_patch.dart
@@ -7,6 +7,7 @@
 import 'dart:_js_helper'
     show
         fillLiteralMap,
+        fillLiteralSet,
         InternalMap,
         NoInline,
         NoSideEffects,
@@ -533,29 +534,29 @@
   factory LinkedHashMap.identity() = _LinkedIdentityHashMap<K, V>.es6;
 
   // Private factory constructor called by generated code for map literals.
-  @NoInline()
+  @pragma('dart2js:noInline')
   factory LinkedHashMap._literal(List keyValuePairs) {
     return fillLiteralMap(keyValuePairs, new JsLinkedHashMap<K, V>.es6());
   }
 
   // Private factory constructor called by generated code for map literals.
-  @NoThrows()
-  @NoInline()
-  @NoSideEffects()
+  @pragma('dart2js:noThrows')
+  @pragma('dart2js:noInline')
+  @pragma('dart2js:noSideEffects')
   factory LinkedHashMap._empty() {
     return new JsLinkedHashMap<K, V>.es6();
   }
 
   // Private factory static function called by generated code for map literals.
   // This version is for map literals without type parameters.
-  @NoThrows()
-  @NoInline()
-  @NoSideEffects()
+  @pragma('dart2js:noThrows')
+  @pragma('dart2js:noInline')
+  @pragma('dart2js:noSideEffects')
   static _makeEmpty() => new JsLinkedHashMap();
 
   // Private factory static function called by generated code for map literals.
   // This version is for map literals without type parameters.
-  @NoInline()
+  @pragma('dart2js:noInline')
   static _makeLiteral(keyValuePairs) =>
       fillLiteralMap(keyValuePairs, new JsLinkedHashMap());
 }
@@ -1239,6 +1240,30 @@
 
   @patch
   factory LinkedHashSet.identity() = _LinkedIdentityHashSet<E>;
+
+  // Private factory constructor called by generated code for set literals.
+  @pragma('dart2js:noThrows')
+  @pragma('dart2js:noInline')
+  @pragma('dart2js:noSideEffects')
+  factory LinkedHashSet._empty() => new _LinkedHashSet<E>();
+
+  // Private factory constructor called by generated code for set literals.
+  @pragma('dart2js:noInline')
+  factory LinkedHashSet._literal(List values) =>
+      fillLiteralSet(values, new _LinkedHashSet<E>());
+
+  // Private factory static function called by generated code for set literals.
+  // This version is for set literals without type parameters.
+  @pragma('dart2js:noThrows')
+  @pragma('dart2js:noInline')
+  @pragma('dart2js:noSideEffects')
+  static _makeEmpty() => new _LinkedHashSet();
+
+  // Private factory static function called by generated code for set literals.
+  // This version is for set literals without type parameters.
+  @pragma('dart2js:noInline')
+  static _makeLiteral(List values) =>
+      fillLiteralSet(values, new _LinkedHashSet());
 }
 
 class _LinkedHashSet<E> extends _SetBase<E> implements LinkedHashSet<E> {
diff --git a/sdk/lib/_internal/js_runtime/lib/convert_patch.dart b/sdk/lib/_internal/js_runtime/lib/convert_patch.dart
index a8dcc31..fa6a0b0 100644
--- a/sdk/lib/_internal/js_runtime/lib/convert_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/convert_patch.dart
@@ -367,7 +367,7 @@
 /// The sink only creates one object, but its input can be chunked.
 // TODO(floitsch): don't accumulate everything before starting to decode.
 class _JsonDecoderSink extends _StringSinkConversionSink {
-  final _Reviver _reviver;
+  final Function(Object key, Object value) _reviver;
   final Sink<Object> _sink;
 
   _JsonDecoderSink(this._reviver, this._sink) : super(new StringBuffer(''));
diff --git a/sdk/lib/_internal/js_runtime/lib/core_patch.dart b/sdk/lib/_internal/js_runtime/lib/core_patch.dart
index 27d7d25..e31fe29 100644
--- a/sdk/lib/_internal/js_runtime/lib/core_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/core_patch.dart
@@ -391,6 +391,22 @@
 
   @patch
   static int _now() => Primitives.timerTicks();
+
+  @patch
+  int get elapsedMicroseconds {
+    int ticks = elapsedTicks;
+    if (_frequency == 1000000) return ticks;
+    assert(_frequency == 1000);
+    return ticks * 1000;
+  }
+
+  @patch
+  int get elapsedMilliseconds {
+    int ticks = elapsedTicks;
+    if (_frequency == 1000) return ticks;
+    assert(_frequency == 1000000);
+    return ticks ~/ 1000;
+  }
 }
 
 // Patch for List implementation.
@@ -509,7 +525,7 @@
 
 @patch
 class RegExp {
-  @NoInline()
+  @pragma('dart2js:noInline')
   @patch
   factory RegExp(String source,
           {bool multiLine: false, bool caseSensitive: true}) =>
@@ -521,7 +537,8 @@
 }
 
 // Patch for 'identical' function.
-@NoInline() // No inlining since we recognize the call in optimizer.
+@pragma(
+    'dart2js: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);
@@ -731,7 +748,7 @@
 @patch
 class StackTrace {
   @patch
-  @NoInline()
+  @pragma('dart2js:noInline')
   static StackTrace get current {
     if (_hasErrorStackProperty) {
       return getTraceFromException(JS('', 'new Error()'));
@@ -1309,7 +1326,7 @@
   /// Shifts the digits of [xDigits] into the right place in [resultDigits].
   ///
   /// `resultDigits[ds..xUsed+ds] = xDigits[0..xUsed-1] << (n % _DIGIT_BITS)`
-  ///   where `ds = ceil(n / _DIGIT_BITS)`
+  ///   where `ds = n ~/ _DIGIT_BITS`
   ///
   /// Does *not* clear digits below ds.
   static void _lsh(
@@ -2645,7 +2662,9 @@
     var resultBits = new Uint8List(8);
 
     var length = _digitBits * (_used - 1) + _digits[_used - 1].bitLength;
-    if (length - 53 > maxDoubleExponent) return double.infinity;
+    if (length > maxDoubleExponent + 53) {
+      return _isNegative ? double.negativeInfinity : double.infinity;
+    }
 
     // The most significant bit is for the sign.
     if (_isNegative) resultBits[7] = 0x80;
diff --git a/sdk/lib/_internal/js_runtime/lib/developer_patch.dart b/sdk/lib/_internal/js_runtime/lib/developer_patch.dart
index a1ae56c..0ff0f66 100644
--- a/sdk/lib/_internal/js_runtime/lib/developer_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/developer_patch.dart
@@ -10,7 +10,7 @@
 import 'dart:isolate';
 
 @patch
-@ForceInline()
+@pragma('dart2js:tryInline')
 bool debugger({bool when: true, String message}) {
   if (when) {
     JS('', 'debugger');
diff --git a/sdk/lib/_internal/js_runtime/lib/interceptors.dart b/sdk/lib/_internal/js_runtime/lib/interceptors.dart
index 3344d39..b676c1b 100644
--- a/sdk/lib/_internal/js_runtime/lib/interceptors.dart
+++ b/sdk/lib/_internal/js_runtime/lib/interceptors.dart
@@ -84,7 +84,7 @@
 
 // Avoid inlining this method because inlining gives us multiple allocation
 // points for records which is bad because it leads to polymorphic access.
-@NoInline()
+@pragma('dart2js:noInline')
 makeDispatchRecord(interceptor, proto, extension, indexability) {
   // Dispatch records are stored in the prototype chain, and in some cases, on
   // instances.
diff --git a/sdk/lib/_internal/js_runtime/lib/internal_patch.dart b/sdk/lib/_internal/js_runtime/lib/internal_patch.dart
index 9f82ae4..77884e2 100644
--- a/sdk/lib/_internal/js_runtime/lib/internal_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/internal_patch.dart
@@ -49,7 +49,7 @@
 }
 
 @patch
-@NoInline()
+@pragma('dart2js:noInline')
 Object extractTypeArguments<T>(T instance, Function extract) {
   // This function is recognized and replaced with calls to js_runtime.
 
diff --git a/sdk/lib/_internal/js_runtime/lib/isolate_patch.dart b/sdk/lib/_internal/js_runtime/lib/isolate_patch.dart
index 78cbf61..56bab4c 100644
--- a/sdk/lib/_internal/js_runtime/lib/isolate_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/isolate_patch.dart
@@ -16,6 +16,11 @@
   }
 
   @patch
+  String get debugName {
+    throw new UnsupportedError("Isolate.debugName");
+  }
+
+  @patch
   static Future<Uri> get packageRoot {
     throw new UnsupportedError("Isolate.packageRoot");
   }
diff --git a/sdk/lib/_internal/js_runtime/lib/js_helper.dart b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
index 0befba60..7205568 100644
--- a/sdk/lib/_internal/js_runtime/lib/js_helper.dart
+++ b/sdk/lib/_internal/js_runtime/lib/js_helper.dart
@@ -45,7 +45,11 @@
 import 'dart:_interceptors';
 import 'dart:_internal' as _symbol_dev;
 import 'dart:_internal'
-    show EfficientLengthIterable, MappedIterable, IterableElementError;
+    show
+        EfficientLengthIterable,
+        MappedIterable,
+        IterableElementError,
+        SubListIterable;
 
 import 'dart:_native_typed_data';
 
@@ -70,7 +74,7 @@
 
 /// Extracts the JavaScript-constructor name from the given isCheckProperty.
 // TODO(floitsch): move this to foreign_helper.dart or similar.
-@ForceInline()
+@pragma('dart2js:tryInline')
 String isCheckPropertyToJsConstructorName(String isCheckProperty) {
   return JS_BUILTIN('returns:String;depends:none;effects:none',
       JsBuiltin.isCheckPropertyToJsConstructorName, isCheckProperty);
@@ -78,7 +82,7 @@
 
 /// Returns true if the given [type] is a function type object.
 // TODO(floitsch): move this to foreign_helper.dart or similar.
-@ForceInline()
+@pragma('dart2js:tryInline')
 bool isDartFunctionType(Object type) {
   // Function type test is using the `in` operator which doesn't work on
   // primitive types.
@@ -89,7 +93,7 @@
 
 /// Returns true if the given [type] is a FutureOr type object.
 // TODO(floitsch): move this to foreign_helper.dart or similar.
-@ForceInline()
+@pragma('dart2js:tryInline')
 bool isDartFutureOrType(Object type) {
   // FutureOr test is using the `in` operator which doesn't work on primitive
   // types.
@@ -98,7 +102,7 @@
       'returns:bool;effects:none;depends:none', JsBuiltin.isFutureOrType, type);
 }
 
-@ForceInline()
+@pragma('dart2js:tryInline')
 bool isDartVoidTypeRti(Object type) {
   return JS_BUILTIN(
       'returns:bool;effects:none;depends:none', JsBuiltin.isVoidType, type);
@@ -107,7 +111,7 @@
 /// Retrieves the class name from type information stored on the constructor of
 /// [type].
 // TODO(floitsch): move this to foreign_helper.dart or similar.
-@ForceInline()
+@pragma('dart2js:tryInline')
 String rawRtiToJsConstructorName(Object rti) {
   return JS_BUILTIN('String', JsBuiltin.rawRtiToJsConstructorName, rti);
 }
@@ -135,7 +139,7 @@
 // TODO(floitsch): move this to foreign_helper.dart or similar.
 // TODO(floitsch): we should call getInterceptor ourselves, but currently
 //    getInterceptor is not GVNed.
-@ForceInline()
+@pragma('dart2js:tryInline')
 Object getRawRuntimeType(Object o) {
   return JS_BUILTIN('', JsBuiltin.rawRuntimeType, o);
 }
@@ -144,7 +148,7 @@
 ///
 /// The argument [other] is the name of the other type, as computed by
 /// [runtimeTypeToString].
-@ForceInline()
+@pragma('dart2js:tryInline')
 bool builtinIsSubtype(type, String other) {
   return JS_BUILTIN('returns:bool;effects:none;depends:none',
       JsBuiltin.isSubtype, other, type);
@@ -152,7 +156,7 @@
 
 /// Returns true if the given [type] is _the_ `Function` type.
 // TODO(floitsch): move this to foreign_helper.dart or similar.
-@ForceInline()
+@pragma('dart2js:tryInline')
 bool isDartFunctionTypeRti(Object type) {
   return JS_BUILTIN(
       'returns:bool;effects:none;depends:none',
@@ -162,7 +166,7 @@
 }
 
 /// Returns true if the given [type] is _the_ `Null` type.
-@ForceInline()
+@pragma('dart2js:tryInline')
 bool isNullType(Object type) {
   return JS_BUILTIN(
       'returns:bool;effects:none;depends:none',
@@ -173,13 +177,13 @@
 
 /// Returns whether the given type is the dynamic type.
 // TODO(floitsch): move this to foreign_helper.dart or similar.
-@ForceInline()
+@pragma('dart2js:tryInline')
 bool isDartDynamicTypeRti(type) {
   return JS_BUILTIN(
       'returns:bool;effects:none;depends:none', JsBuiltin.isDynamicType, type);
 }
 
-@ForceInline()
+@pragma('dart2js:tryInline')
 bool isDartJsInteropTypeArgumentRti(type) {
   return JS_BUILTIN('returns:bool;effects:none;depends:none',
       JsBuiltin.isJsInteropTypeArgument, type);
@@ -187,7 +191,7 @@
 
 /// Returns whether the given type is _the_ Dart Object type.
 // TODO(floitsch): move this to foreign_helper.dart or similar.
-@ForceInline()
+@pragma('dart2js:tryInline')
 bool isDartObjectTypeRti(type) {
   return JS_BUILTIN(
       'returns:bool;effects:none;depends:none',
@@ -198,7 +202,7 @@
 
 /// Returns whether the given type is _the_ null type.
 // TODO(floitsch): move this to foreign_helper.dart or similar.
-@ForceInline()
+@pragma('dart2js:tryInline')
 bool isNullTypeRti(type) {
   return JS_BUILTIN(
       'returns:bool;effects:none;depends:none',
@@ -209,7 +213,7 @@
 
 /// Returns the metadata of the given [index].
 // TODO(floitsch): move this to foreign_helper.dart or similar.
-@ForceInline()
+@pragma('dart2js:tryInline')
 getMetadata(int index) {
   return JS_BUILTIN(
       'returns:var;effects:none;depends:none', JsBuiltin.getMetadata, index);
@@ -217,7 +221,7 @@
 
 /// Returns the type of the given [index].
 // TODO(floitsch): move this to foreign_helper.dart or similar.
-@ForceInline()
+@pragma('dart2js:tryInline')
 getType(int index) {
   return JS_BUILTIN(
       'returns:var;effects:none;depends:none', JsBuiltin.getType, index);
@@ -281,7 +285,7 @@
 /// By default, whenever a method is invoked for the first time, it prints an id
 /// and the method name to the console. This can be overriden by adding a top
 /// level `dartCallInstrumentation` hook in JavaScript.
-@NoInline()
+@pragma('dart2js:noInline')
 void traceHelper(dynamic /*int*/ id, dynamic /*String*/ qualifiedName) {
   // Note: this method is written mostly in JavaScript to prevent a stack
   // overflow. In particular, we use dynamic argument types because with with
@@ -503,7 +507,7 @@
   /// Returns the type of [object] as a string (including type arguments).
   ///
   /// In minified mode, uses the unminified names if available.
-  @NoInline()
+  @pragma('dart2js:noInline')
   static String objectTypeName(Object object) {
     String className = _objectClassName(object);
     String arguments = joinArguments(getRuntimeTypeInfo(object), 0);
@@ -582,7 +586,7 @@
     return "Instance of '$name'";
   }
 
-  static num dateNow() => JS('int', r'Date.now()');
+  static int dateNow() => JS('int', r'Date.now()');
 
   static void initTicker() {
     if (timerFrequency != null) return;
@@ -799,7 +803,7 @@
   // that the result is really an integer, because the JavaScript implementation
   // may return -0.0 instead of 0.
   //
-  // They are marked as @NoThrows() because `receiver` comes from a receiver of
+  // They are marked as @pragma('dart2js:noThrows') because `receiver` comes from a receiver of
   // a method on DateTime (i.e. is not `null`).
 
   // TODO(sra): These methods are GVN-able. dart2js should implement an
@@ -809,63 +813,63 @@
   // year). Is it possible to factor them so that the `Date` is visible and can
   // be GVN-ed without a lot of code bloat?
 
-  @NoSideEffects()
-  @NoThrows()
-  @NoInline()
+  @pragma('dart2js:noSideEffects')
+  @pragma('dart2js:noThrows')
+  @pragma('dart2js:noInline')
   static getYear(DateTime receiver) {
     return (receiver.isUtc)
         ? JS('int', r'(#.getUTCFullYear() + 0)', lazyAsJsDate(receiver))
         : JS('int', r'(#.getFullYear() + 0)', lazyAsJsDate(receiver));
   }
 
-  @NoSideEffects()
-  @NoThrows()
-  @NoInline()
+  @pragma('dart2js:noSideEffects')
+  @pragma('dart2js:noThrows')
+  @pragma('dart2js:noInline')
   static getMonth(DateTime receiver) {
     return (receiver.isUtc)
         ? JS('JSUInt31', r'#.getUTCMonth() + 1', lazyAsJsDate(receiver))
         : JS('JSUInt31', r'#.getMonth() + 1', lazyAsJsDate(receiver));
   }
 
-  @NoSideEffects()
-  @NoThrows()
-  @NoInline()
+  @pragma('dart2js:noSideEffects')
+  @pragma('dart2js:noThrows')
+  @pragma('dart2js:noInline')
   static getDay(DateTime receiver) {
     return (receiver.isUtc)
         ? JS('JSUInt31', r'(#.getUTCDate() + 0)', lazyAsJsDate(receiver))
         : JS('JSUInt31', r'(#.getDate() + 0)', lazyAsJsDate(receiver));
   }
 
-  @NoSideEffects()
-  @NoThrows()
-  @NoInline()
+  @pragma('dart2js:noSideEffects')
+  @pragma('dart2js:noThrows')
+  @pragma('dart2js:noInline')
   static getHours(DateTime receiver) {
     return (receiver.isUtc)
         ? JS('JSUInt31', r'(#.getUTCHours() + 0)', lazyAsJsDate(receiver))
         : JS('JSUInt31', r'(#.getHours() + 0)', lazyAsJsDate(receiver));
   }
 
-  @NoSideEffects()
-  @NoThrows()
-  @NoInline()
+  @pragma('dart2js:noSideEffects')
+  @pragma('dart2js:noThrows')
+  @pragma('dart2js:noInline')
   static getMinutes(DateTime receiver) {
     return (receiver.isUtc)
         ? JS('JSUInt31', r'(#.getUTCMinutes() + 0)', lazyAsJsDate(receiver))
         : JS('JSUInt31', r'(#.getMinutes() + 0)', lazyAsJsDate(receiver));
   }
 
-  @NoSideEffects()
-  @NoThrows()
-  @NoInline()
+  @pragma('dart2js:noSideEffects')
+  @pragma('dart2js:noThrows')
+  @pragma('dart2js:noInline')
   static getSeconds(DateTime receiver) {
     return (receiver.isUtc)
         ? JS('JSUInt31', r'(#.getUTCSeconds() + 0)', lazyAsJsDate(receiver))
         : JS('JSUInt31', r'(#.getSeconds() + 0)', lazyAsJsDate(receiver));
   }
 
-  @NoSideEffects()
-  @NoThrows()
-  @NoInline()
+  @pragma('dart2js:noSideEffects')
+  @pragma('dart2js:noThrows')
+  @pragma('dart2js:noInline')
   static getMilliseconds(DateTime receiver) {
     return (receiver.isUtc)
         ? JS(
@@ -873,9 +877,9 @@
         : JS('JSUInt31', r'(#.getMilliseconds() + 0)', lazyAsJsDate(receiver));
   }
 
-  @NoSideEffects()
-  @NoThrows()
-  @NoInline()
+  @pragma('dart2js:noSideEffects')
+  @pragma('dart2js:noThrows')
+  @pragma('dart2js:noInline')
   static getWeekday(DateTime receiver) {
     int weekday = (receiver.isUtc)
         ? JS('int', r'#.getUTCDay() + 0', lazyAsJsDate(receiver))
@@ -1168,7 +1172,7 @@
 /// Called by generated code to throw an illegal-argument exception,
 /// for example, if a non-integer index is given to an optimized
 /// indexed access.
-@NoInline()
+@pragma('dart2js:noInline')
 iae(argument) {
   throw argumentErrorValue(argument);
 }
@@ -1178,7 +1182,7 @@
 /// also be called when the index is not an integer, in which case it throws an
 /// illegal-argument exception instead, like [iae], or when the receiver is
 /// null.
-@NoInline()
+@pragma('dart2js:noInline')
 ioore(receiver, index) {
   if (receiver == null) receiver.length; // Force a NoSuchMethodError.
   throw diagnoseIndexError(receiver, index);
@@ -1186,7 +1190,7 @@
 
 /// Diagnoses an indexing error. Returns the ArgumentError or RangeError that
 /// describes the problem.
-@NoInline()
+@pragma('dart2js:noInline')
 Error diagnoseIndexError(indexable, index) {
   if (index is! int) return new ArgumentError.value(index, 'index');
   int length = indexable.length;
@@ -1201,7 +1205,7 @@
 
 /// Diagnoses a range error. Returns the ArgumentError or RangeError that
 /// describes the problem.
-@NoInline()
+@pragma('dart2js:noInline')
 Error diagnoseRangeError(start, end, length) {
   if (start is! int) {
     return new ArgumentError.value(start, 'start');
@@ -1225,7 +1229,7 @@
     JS('int', r'#.lastIndexOf(#, #)', receiver, element, start);
 
 /// 'factory' for constructing ArgumentError.value to keep the call sites small.
-@NoInline()
+@pragma('dart2js:noInline')
 ArgumentError argumentErrorValue(object) {
   return new ArgumentError.value(object);
 }
@@ -1235,7 +1239,7 @@
   return object;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 num checkNum(value) {
   if (value is! num) throw argumentErrorValue(value);
   return value;
@@ -1260,7 +1264,7 @@
 ///
 /// The code in [unwrapException] deals with getting the original Dart
 /// object out of the wrapper again.
-@NoInline()
+@pragma('dart2js:noInline')
 wrapException(ex) {
   if (ex == null) ex = new NullThrownError();
   var wrapper = JS('', 'new Error()');
@@ -1319,19 +1323,19 @@
 //
 //     a.length == startLength || throwConcurrentModificationError(a)
 //
-// TODO(sra): We would like to annotate this as @NoSideEffects() so that loops
+// TODO(sra): We would like to annotate this as @pragma('dart2js:noSideEffects') so that loops
 // with no other effects can recognize that the array length does not
 // change. However, in the usual case where the loop does have other effects,
 // that causes the length in the loop condition to be phi(startLength,a.length),
 // which causes confusion in range analysis and the insertion of a bounds check.
-@NoInline()
+@pragma('dart2js:noInline')
 checkConcurrentModificationError(sameLength, collection) {
   if (true != sameLength) {
     throwConcurrentModificationError(collection);
   }
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 throwConcurrentModificationError(collection) {
   throw new ConcurrentModificationError(collection);
 }
@@ -1923,6 +1927,17 @@
   return result;
 }
 
+/// Called by generated code to build a set literal.
+fillLiteralSet(values, Set result) {
+  // TODO(johnniwinther): Use JSArray to optimize this code instead of calling
+  // [getLength] and [getIndex].
+  int length = getLength(values);
+  for (int index = 0; index < length; index++) {
+    result.add(getIndex(values, index));
+  }
+  return result;
+}
+
 invokeClosure(Function closure, int numberOfArguments, var arg1, var arg2,
     var arg3, var arg4) {
   switch (numberOfArguments) {
@@ -2511,12 +2526,12 @@
         "${Primitives.objectToHumanReadableString(receiver)}";
   }
 
-  @NoInline()
+  @pragma('dart2js:noInline')
   static selfOf(BoundClosure closure) => closure._self;
 
   static targetOf(BoundClosure closure) => closure._target;
 
-  @NoInline()
+  @pragma('dart2js:noInline')
   static receiverOf(BoundClosure closure) => closure._receiver;
 
   static nameOf(BoundClosure closure) => closure._name;
@@ -2539,8 +2554,8 @@
     return receiverFieldNameCache;
   }
 
-  @NoInline()
-  @NoSideEffects()
+  @pragma('dart2js:noInline')
+  @pragma('dart2js:noSideEffects')
   static String computeFieldNamed(String fieldName) {
     var template = new BoundClosure('self', 'target', 'receiver', 'name');
     var names = JSArray.markFixedList(
@@ -2648,11 +2663,9 @@
 /// and casts. We specialize each primitive type (eg int, bool), and use the
 /// compiler's convention to do is-checks on regular objects.
 boolConversionCheck(value) {
-  if (value is bool) return value;
-  // One of the following checks will always fail.
-  boolTypeCheck(value);
-  assert(value != null);
-  return false;
+  // The value from kernel should always be true, false, or null.
+  if (value == null) assertThrow('boolean expression must not be null');
+  return value;
 }
 
 stringTypeCheck(value) {
@@ -2932,7 +2945,7 @@
 
 futureOrCast(o, futureOrRti) => subtypeOfRuntimeTypeCast(o, futureOrRti);
 
-@NoInline()
+@pragma('dart2js:noInline')
 void checkDeferredIsLoaded(String loadId, String uri) {
   if (!_loadedLibraries.contains(loadId)) {
     throw new DeferredNotLoadedError(uri);
@@ -3010,7 +3023,7 @@
 
 /// Helper function for implementing asserts without messages.
 /// The compiler treats this specially.
-@NoInline()
+@pragma('dart2js:noInline')
 void assertHelper(condition) {
   if (assertTest(condition)) throw new AssertionError();
 }
@@ -3391,7 +3404,7 @@
   String toString() => 'Assertion failed: Reached dead code';
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 void assertUnreachable() {
   throw new _UnreachableError();
 }
diff --git a/sdk/lib/_internal/js_runtime/lib/js_names.dart b/sdk/lib/_internal/js_runtime/lib/js_names.dart
index 572d354..1f1fec4 100644
--- a/sdk/lib/_internal/js_runtime/lib/js_names.dart
+++ b/sdk/lib/_internal/js_runtime/lib/js_names.dart
@@ -133,7 +133,7 @@
   }
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 List extractKeys(victim) {
   var result = JS('', '# ? Object.keys(#) : []', victim, victim);
   return new JSArray.markFixed(result);
diff --git a/sdk/lib/_internal/js_runtime/lib/js_number.dart b/sdk/lib/_internal/js_runtime/lib/js_number.dart
index 1c030f3..8e5dde1 100644
--- a/sdk/lib/_internal/js_runtime/lib/js_number.dart
+++ b/sdk/lib/_internal/js_runtime/lib/js_number.dart
@@ -40,20 +40,27 @@
 
   bool get isNegative => (this == 0) ? (1 / this) < 0 : this < 0;
 
-  bool get isNaN => JS('bool', r'isNaN(#)', this);
+  bool get isNaN => JS(
+      'returns:bool;effects:none;depends:none;throws:never;gvn:true',
+      r'isNaN(#)',
+      this);
 
   bool get isInfinite {
     return JS('bool', r'# == (1/0)', this) || JS('bool', r'# == (-1/0)', this);
   }
 
-  bool get isFinite => JS('bool', r'isFinite(#)', this);
+  bool get isFinite => JS(
+      'returns:bool;effects:none;depends:none;throws:never;gvn:true',
+      r'isFinite(#)',
+      this);
 
   JSNumber remainder(num b) {
     if (b is! num) throw argumentErrorValue(b);
     return JS('num', r'# % #', this, b);
   }
 
-  @NoInline() // Use invoke_dynamic_specializer instead of inlining.
+  // Use invoke_dynamic_specializer instead of inlining.
+  @pragma('dart2js:noInline')
   JSNumber abs() => JS(
       'returns:num;effects:none;depends:none;throws:never;gvn:true',
       r'Math.abs(#)',
@@ -452,7 +459,8 @@
   const JSInt();
 
   @override
-  @NoInline() // Use invoke_dynamic_specializer instead of inlining.
+  // Use invoke_dynamic_specializer instead of inlining.
+  @pragma('dart2js:noInline')
   JSInt abs() => JS(
       'returns:int;effects:none;depends:none;throws:never;gvn:true',
       r'Math.abs(#)',
diff --git a/sdk/lib/_internal/js_runtime/lib/js_rti.dart b/sdk/lib/_internal/js_runtime/lib/js_rti.dart
index bdef059..e4b0f9d 100644
--- a/sdk/lib/_internal/js_runtime/lib/js_rti.dart
+++ b/sdk/lib/_internal/js_runtime/lib/js_rti.dart
@@ -92,7 +92,7 @@
 /// type.
 // Don't inline.  Let the JS engine inline this.  The call expression is much
 // more compact that the inlined expansion.
-@NoInline()
+@pragma('dart2js:noInline')
 Object setRuntimeTypeInfo(Object target, var rti) {
   assert(rti == null || isJsArray(rti));
   String rtiName = JS_GET_NAME(JsGetName.RTI_NAME);
@@ -121,9 +121,9 @@
 /// [substitutionName].
 ///
 /// Called from generated code.
-@NoThrows()
-@NoSideEffects()
-@NoInline()
+@pragma('dart2js:noThrows')
+@pragma('dart2js:noSideEffects')
+@pragma('dart2js:noInline')
 getRuntimeTypeArgumentIntercepted(
     interceptor, Object target, String substitutionName, int index) {
   var arguments =
@@ -135,9 +135,9 @@
 /// [substitutionName].
 ///
 /// Called from generated code.
-@NoThrows()
-@NoSideEffects()
-@NoInline()
+@pragma('dart2js:noThrows')
+@pragma('dart2js:noSideEffects')
+@pragma('dart2js:noInline')
 getRuntimeTypeArgument(Object target, String substitutionName, int index) {
   var arguments = getRuntimeTypeArguments(target, target, substitutionName);
   return arguments == null ? null : getIndex(arguments, index);
@@ -146,9 +146,9 @@
 /// Returns the [index]th type argument of [target].
 ///
 /// Called from generated code.
-@NoThrows()
-@NoSideEffects()
-@NoInline()
+@pragma('dart2js:noThrows')
+@pragma('dart2js:noSideEffects')
+@pragma('dart2js:noInline')
 getTypeArgumentByIndex(Object target, int index) {
   var rti = getRuntimeTypeInfo(target);
   return rti == null ? null : getIndex(rti, index);
@@ -169,7 +169,7 @@
 /// Returns a human-readable representation of the type representation [rti].
 ///
 /// Called from generated code.
-@NoInline()
+@pragma('dart2js:noInline')
 String runtimeTypeToString(var rti) {
   return _runtimeTypeToString(rti, null);
 }
@@ -541,7 +541,7 @@
 
 /// Returns `true` if the runtime type representation [type] is a top type.
 /// That is, either `dynamic`, `void` or `Object`.
-@ForceInline()
+@pragma('dart2js:tryInline')
 bool isTopType(var type) {
   return isDartDynamicTypeRti(type) ||
       isDartVoidTypeRti(type) ||
@@ -551,7 +551,7 @@
 
 /// Returns `true` if the runtime type representation [type] is a supertype of
 /// [Null].
-@ForceInline()
+@pragma('dart2js:tryInline')
 bool isSupertypeOfNull(var type) {
   return isSupertypeOfNullBase(type) || isSupertypeOfNullRecursive(type);
 }
@@ -561,7 +561,7 @@
 ///
 /// This method doesn't handle `FutureOr<Null>`. This is handle by
 /// [isSupertypeOfNullRecursive] because it requires a recursive check.
-@ForceInline()
+@pragma('dart2js:tryInline')
 bool isSupertypeOfNullBase(var type) {
   return isDartDynamicTypeRti(type) ||
       isDartObjectTypeRti(type) ||
@@ -593,7 +593,7 @@
 /// [type].
 ///
 /// For instance `num` of `FutureOr<num>`.
-@ForceInline()
+@pragma('dart2js:tryInline')
 Object getFutureOrArgument(var type) {
   assert(isDartFutureOrType(type));
   var typeArgumentTag = JS_GET_NAME(JsGetName.FUTURE_OR_TYPE_ARGUMENT_TAG);
@@ -917,7 +917,7 @@
 /// type parameters matching the number of types in [parameters].
 ///
 /// Called from generated code.
-@NoInline()
+@pragma('dart2js:noInline')
 instantiatedGenericFunctionType(genericFunctionRti, parameters) {
   if (genericFunctionRti == null) return null;
 
diff --git a/sdk/lib/_internal/js_runtime/lib/js_string.dart b/sdk/lib/_internal/js_runtime/lib/js_string.dart
index baa47b6..39370d7 100644
--- a/sdk/lib/_internal/js_runtime/lib/js_string.dart
+++ b/sdk/lib/_internal/js_runtime/lib/js_string.dart
@@ -11,7 +11,7 @@
 class JSString extends Interceptor implements String, JSIndexable {
   const JSString();
 
-  @NoInline()
+  @pragma('dart2js:noInline')
   int codeUnitAt(int index) {
     if (index is! int) throw diagnoseIndexError(this, index);
     if (index < 0) throw diagnoseIndexError(this, index);
@@ -59,8 +59,7 @@
   }
 
   String replaceAll(Pattern from, String to) {
-    checkString(to);
-    return stringReplaceAllUnchecked(this, from, to);
+    return stringReplaceAllUnchecked(this, from, checkString(to));
   }
 
   String replaceAllMapped(Pattern from, String convert(Match match)) {
diff --git a/sdk/lib/_internal/js_runtime/lib/linked_hash_map.dart b/sdk/lib/_internal/js_runtime/lib/linked_hash_map.dart
index 46f945b..42ad0c4 100644
--- a/sdk/lib/_internal/js_runtime/lib/linked_hash_map.dart
+++ b/sdk/lib/_internal/js_runtime/lib/linked_hash_map.dart
@@ -43,7 +43,7 @@
   JsLinkedHashMap();
 
   /// If ES6 Maps are available returns a linked hash-map backed by an ES6 Map.
-  @ForceInline()
+  @pragma('dart2js:tryInline')
   factory JsLinkedHashMap.es6() {
     return (_USE_ES6_MAPS && JsLinkedHashMap._supportsEs6Maps)
         ? new Es6LinkedHashMap<K, V>()
@@ -173,15 +173,18 @@
   V internalRemove(Object key) {
     var rest = _rest;
     if (rest == null) return null;
-    var bucket = _getBucket(rest, key);
+    var hash = internalComputeHashCode(key);
+    var bucket = _getTableBucket(rest, hash);
     int index = internalFindBucketIndex(bucket, key);
     if (index < 0) return null;
     // Use splice to remove the [cell] element at the index and
     // unlink the cell before returning its value.
     LinkedHashMapCell cell = JS('var', '#.splice(#, 1)[0]', bucket, index);
     _unlinkCell(cell);
-    // TODO(kasperl): Consider getting rid of the bucket list when
-    // the length reaches zero.
+    // Remove empty bucket list to avoid memory leak.
+    if (JS('int', '#.length', bucket) == 0) {
+      _deleteTableEntry(rest, hash);
+    }
     return JS('', '#', cell.hashMapCellValue);
   }
 
diff --git a/sdk/lib/_internal/js_runtime/lib/math_patch.dart b/sdk/lib/_internal/js_runtime/lib/math_patch.dart
index a3d3fc9..677953e 100644
--- a/sdk/lib/_internal/js_runtime/lib/math_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/math_patch.dart
@@ -63,14 +63,14 @@
 
 @patch
 class Random {
-  static final _secureRandom = new _JSSecureRandom();
+  static Random _secureRandom;
 
   @patch
   factory Random([int seed]) =>
       (seed == null) ? const _JSRandom() : new _Random(seed);
 
   @patch
-  factory Random.secure() => _secureRandom;
+  factory Random.secure() => _secureRandom ??= _JSSecureRandom();
 }
 
 class _JSRandom implements Random {
diff --git a/sdk/lib/_internal/js_runtime/lib/native_helper.dart b/sdk/lib/_internal/js_runtime/lib/native_helper.dart
index 59a3719..04e1e46 100644
--- a/sdk/lib/_internal/js_runtime/lib/native_helper.dart
+++ b/sdk/lib/_internal/js_runtime/lib/native_helper.dart
@@ -143,7 +143,7 @@
 ///
 /// A dispatch record is cached according to the specification of the dispatch
 /// tag for [obj].
-@NoInline()
+@pragma('dart2js:noInline')
 lookupAndCacheInterceptor(obj) {
   assert(!isDartObject(obj));
   String tag = getTagFunction(obj);
@@ -264,14 +264,14 @@
 
 var initNativeDispatchFlag; // null or true
 
-@NoInline()
+@pragma('dart2js:noInline')
 void initNativeDispatch() {
   if (true == initNativeDispatchFlag) return;
   initNativeDispatchFlag = true;
   initNativeDispatchContinue();
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 void initNativeDispatchContinue() {
   dispatchRecordsForInstanceTags = JS('', 'Object.create(null)');
   interceptorsForUncacheableTags = JS('', 'Object.create(null)');
diff --git a/sdk/lib/_internal/js_runtime/lib/regexp_helper.dart b/sdk/lib/_internal/js_runtime/lib/regexp_helper.dart
index 77f746b..51b4bfb 100644
--- a/sdk/lib/_internal/js_runtime/lib/regexp_helper.dart
+++ b/sdk/lib/_internal/js_runtime/lib/regexp_helper.dart
@@ -155,10 +155,13 @@
   bool get isCaseSensitive => _isCaseSensitive;
 }
 
-class _MatchImplementation implements Match {
+class _MatchImplementation implements RegExpMatch {
   final Pattern pattern;
   // Contains a JS RegExp match object.
   // It is an Array of String values with extra 'index' and 'input' properties.
+  // If there were named capture groups, there will also be an extra 'groups'
+  // property containing an object with capture group names as keys and
+  // matched strings as values.
   // We didn't force it to be JSArray<String>, so it is JSArray<dynamic>, but
   // containing String or `undefined` values.
   final JSArray _match;
@@ -193,6 +196,27 @@
     }
     return out;
   }
+
+  String namedGroup(String name) {
+    var groups = JS('Object', '#.groups', _match);
+    if (groups != null) {
+      var result = JS('String|Null', '#[#]', groups, name);
+      if (result != null || JS('bool', '# in #', name, groups)) {
+        return result;
+      }
+    }
+    throw ArgumentError.value(name, "name", "Not a capture group name");
+  }
+
+  Iterable<String> get groupNames {
+    var groups = JS('Object', '#.groups', _match);
+    if (groups != null) {
+      var keys = new JSArray<String>.markGrowable(
+          JS('returns:JSExtendableArray;new:true', 'Object.keys(#)', groups));
+      return SubListIterable(keys, 0, null);
+    }
+    return Iterable.empty();
+  }
 }
 
 class _AllMatchesIterable extends IterableBase<Match> {
diff --git a/sdk/lib/_internal/js_runtime/lib/string_helper.dart b/sdk/lib/_internal/js_runtime/lib/string_helper.dart
index 0180369..ea5374e 100644
--- a/sdk/lib/_internal/js_runtime/lib/string_helper.dart
+++ b/sdk/lib/_internal/js_runtime/lib/string_helper.dart
@@ -117,12 +117,23 @@
   }
 }
 
-stringReplaceJS(receiver, replacer, replacement) {
-  // The JavaScript String.replace method recognizes replacement
-  // patterns in the replacement string. Dart does not have that
-  // behavior.
-  replacement = JS('String', r'#.replace(/\$/g, "$$$$")', replacement);
-  return JS('String', r'#.replace(#, #)', receiver, replacer, replacement);
+String stringReplaceJS(String receiver, jsRegExp, String replacement) {
+  return JS('String', r'#.replace(#, #)', receiver, jsRegExp,
+      escapeReplacement(replacement));
+}
+
+String escapeReplacement(String replacement) {
+  // The JavaScript `String.prototype.replace` method recognizes replacement
+  // patterns in the replacement string. Dart does not have that behavior, so
+  // the replacement patterns need to be escaped.
+
+  // `String.prototype.replace` tends to be slower when there are replacement
+  // patterns, and the escaping itself uses replacement patterns, so it is
+  // worthwhile checking for `$` first.
+  if (stringContainsStringUnchecked(replacement, r'$', 0)) {
+    return JS('String', r'#.replace(/\$/g, "$$$$")', replacement);
+  }
+  return replacement;
 }
 
 stringReplaceFirstRE(receiver, regexp, replacement, startIndex) {
@@ -136,38 +147,73 @@
 /// Returns a string for a RegExp pattern that matches [string]. This is done by
 /// escaping all RegExp metacharacters.
 quoteStringForRegExp(string) {
-  return JS('String', r'#.replace(/[[\]{}()*+?.\\^$|]/g, "\\$&")', string);
+  // We test and replace essentially the same RegExp because replacement when
+  // there are replacement patterns is slow enough to be worth avoiding.
+  if (JS('bool', r'/[[\]{}()*+?.\\^$|]/.test(#)', string)) {
+    return JS('String', r'#.replace(/[[\]{}()*+?.\\^$|]/g, "\\$&")', string);
+  }
+  return string;
 }
 
 stringReplaceAllUnchecked(receiver, pattern, replacement) {
   checkString(replacement);
   if (pattern is String) {
-    if (pattern == "") {
-      if (receiver == "") {
-        return JS('String', '#', replacement); // help type inference.
-      } else {
-        StringBuffer result = new StringBuffer('');
-        int length = receiver.length;
-        result.write(replacement);
-        for (int i = 0; i < length; i++) {
-          result.write(receiver[i]);
-          result.write(replacement);
-        }
-        return result.toString();
-      }
-    } else {
-      var quoted = quoteStringForRegExp(pattern);
-      var replacer = JS('', "new RegExp(#, 'g')", quoted);
-      return stringReplaceJS(receiver, replacer, replacement);
-    }
-  } else if (pattern is JSSyntaxRegExp) {
+    return stringReplaceAllUncheckedString(receiver, pattern, replacement);
+  }
+
+  if (pattern is JSSyntaxRegExp) {
     var re = regExpGetGlobalNative(pattern);
     return stringReplaceJS(receiver, re, replacement);
-  } else {
-    checkNull(pattern);
-    // TODO(floitsch): implement generic String.replace (with patterns).
-    throw "String.replaceAll(Pattern) UNIMPLEMENTED";
   }
+
+  checkNull(pattern);
+  // TODO(floitsch): implement generic String.replace (with patterns).
+  throw "String.replaceAll(Pattern) UNIMPLEMENTED";
+}
+
+/// Replaces all non-overlapping occurences of [pattern] in [receiver] with
+/// [replacement].  This should be replace with
+/// (String.prototype.replaceAll)[https://github.com/tc39/proposal-string-replace-all]
+/// when available.
+String stringReplaceAllUncheckedString(
+    String receiver, String pattern, String replacement) {
+  if (pattern == "") {
+    if (receiver == "") {
+      return JS('String', '#', replacement); // help type inference.
+    }
+    StringBuffer result = new StringBuffer('');
+    int length = receiver.length;
+    result.write(replacement);
+    for (int i = 0; i < length; i++) {
+      result.write(receiver[i]);
+      result.write(replacement);
+    }
+    return result.toString();
+  }
+
+  if (!const bool.fromEnvironment(
+      'dart2js.testing.String.replaceAll.force.regexp')) {
+    // First check for no match.
+    int index = stringIndexOfStringUnchecked(receiver, pattern, 0);
+    if (index < 0) return receiver;
+
+    // The fastest approach in general is to replace with a global RegExp, but
+    // this requires the receiver string to be long enough to amortize the cost
+    // of creating the RegExp, and the replacement to have no '$' patterns,
+    // which tend to make `String.prototype.replace` much slower. In these
+    // cases, using split-join usually wins.
+    if (receiver.length < 500 ||
+        stringContainsStringUnchecked(replacement, r'$', 0)) {
+      return stringReplaceAllUsingSplitJoin(receiver, pattern, replacement);
+    }
+  }
+  var quoted = quoteStringForRegExp(pattern);
+  var replacer = JS('', "new RegExp(#, 'g')", quoted);
+  return stringReplaceJS(receiver, replacer, replacement);
+}
+
+String stringReplaceAllUsingSplitJoin(receiver, pattern, replacement) {
+  return JS('String', '#.split(#).join(#)', receiver, pattern, replacement);
 }
 
 String _matchString(Match match) => match[0];
diff --git a/sdk/lib/async/stream.dart b/sdk/lib/async/stream.dart
index cb021aa..c29609d 100644
--- a/sdk/lib/async/stream.dart
+++ b/sdk/lib/async/stream.dart
@@ -746,21 +746,23 @@
     StringBuffer buffer = new StringBuffer();
     StreamSubscription subscription;
     bool first = true;
-    subscription = this.listen((T element) {
-      if (!first) {
-        buffer.write(separator);
-      }
-      first = false;
-      try {
-        buffer.write(element);
-      } catch (e, s) {
-        _cancelAndErrorWithReplacement(subscription, result, e, s);
-      }
-    }, onError: (e) {
-      result._completeError(e);
-    }, onDone: () {
-      result._complete(buffer.toString());
-    }, cancelOnError: true);
+    subscription = this.listen(
+        (T element) {
+          if (!first) {
+            buffer.write(separator);
+          }
+          first = false;
+          try {
+            buffer.write(element);
+          } catch (e, s) {
+            _cancelAndErrorWithReplacement(subscription, result, e, s);
+          }
+        },
+        onError: result._completeError,
+        onDone: () {
+          result._complete(buffer.toString());
+        },
+        cancelOnError: true);
     return result;
   }
 
diff --git a/sdk/lib/collection/collection.dart b/sdk/lib/collection/collection.dart
index 7c667ec..b050a48 100644
--- a/sdk/lib/collection/collection.dart
+++ b/sdk/lib/collection/collection.dart
@@ -2,15 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/**
- * Classes and utilities that supplement the collection support in dart:core.
- *
- * To use this library in your code:
- *
- *     import 'dart:collection';
- *
- * {@category Core}
- */
+/// Classes and utilities that supplement the collection support in dart:core.
+///
+/// To use this library in your code:
+///
+///     import 'dart:collection';
+///
+/// {@category Core}
 library dart.collection;
 
 import 'dart:_internal' hide Symbol;
diff --git a/sdk/lib/collection/collections.dart b/sdk/lib/collection/collections.dart
index d02257b..9b43996 100644
--- a/sdk/lib/collection/collections.dart
+++ b/sdk/lib/collection/collections.dart
@@ -4,24 +4,20 @@
 
 part of dart.collection;
 
-/**
- * An unmodifiable [List] view of another List.
- *
- * The source of the elements may be a [List] or any [Iterable] with
- * efficient [Iterable.length] and [Iterable.elementAt].
- */
+/// An unmodifiable [List] view of another List.
+///
+/// The source of the elements may be a [List] or any [Iterable] with
+/// efficient [Iterable.length] and [Iterable.elementAt].
 class UnmodifiableListView<E> extends UnmodifiableListBase<E> {
   final Iterable<E> _source;
 
-  /**
-   * Creates an unmodifiable list backed by [source].
-   *
-   * The [source] of the elements may be a [List] or any [Iterable] with
-   * efficient [Iterable.length] and [Iterable.elementAt].
-   */
+  /// Creates an unmodifiable list backed by [source].
+  ///
+  /// The [source] of the elements may be a [List] or any [Iterable] with
+  /// efficient [Iterable.length] and [Iterable.elementAt].
   UnmodifiableListView(Iterable<E> source) : _source = source;
 
-  List<R> cast<R>() => new UnmodifiableListView(_source.cast<R>());
+  List<R> cast<R>() => UnmodifiableListView(_source.cast<R>());
   int get length => _source.length;
 
   E operator [](int index) => _source.elementAt(index);
diff --git a/sdk/lib/collection/hash_map.dart b/sdk/lib/collection/hash_map.dart
index 728ff9e6..525f43a 100644
--- a/sdk/lib/collection/hash_map.dart
+++ b/sdk/lib/collection/hash_map.dart
@@ -4,165 +4,152 @@
 
 part of dart.collection;
 
-/** Default function for equality comparison in customized HashMaps */
+/// Default function for equality comparison in customized HashMaps
 bool _defaultEquals(a, b) => a == b;
-/** Default function for hash-code computation in customized HashMaps */
+
+/// Default function for hash-code computation in customized HashMaps
 int _defaultHashCode(a) => a.hashCode;
 
-/** Type of custom equality function */
-typedef bool _Equality<K>(K a, K b);
-/** Type of custom hash code function. */
-typedef int _Hasher<K>(K object);
+/// Type of custom equality function
+typedef _Equality<K> = bool Function(K a, K b);
 
-/**
- * A hash-table based implementation of [Map].
- *
- * The keys of a `HashMap` must have consistent [Object.==]
- * and [Object.hashCode] implementations. This means that the `==` operator
- * must define a stable equivalence relation on the keys (reflexive,
- * symmetric, transitive, and consistent over time), and that `hashCode`
- * must be the same for objects that are considered equal by `==`.
- *
- * The map allows `null` as a key.
- *
- * Iterating the map's keys, values or entries (through [forEach])
- * may happen in any order.
- * The iteration order only changes when the map is modified.
- * Values are iterated in the same order as their associated keys,
- * so iterating the [keys] and [values] in parallel
- * will give matching key and value pairs.
- */
+/// Type of custom hash code function.
+typedef _Hasher<K> = int Function(K object);
+
+/// A hash-table based implementation of [Map].
+///
+/// The keys of a `HashMap` must have consistent [Object.==]
+/// and [Object.hashCode] implementations. This means that the `==` operator
+/// must define a stable equivalence relation on the keys (reflexive,
+/// symmetric, transitive, and consistent over time), and that `hashCode`
+/// must be the same for objects that are considered equal by `==`.
+///
+/// The map allows `null` as a key.
+///
+/// Iterating the map's keys, values or entries (through [forEach])
+/// may happen in any order.
+/// The iteration order only changes when the map is modified.
+/// Values are iterated in the same order as their associated keys,
+/// so iterating the [keys] and [values] in parallel
+/// will give matching key and value pairs.
 abstract class HashMap<K, V> implements Map<K, V> {
-  /**
-   * Creates an unordered hash-table based [Map].
-   *
-   * The created map is not ordered in any way. When iterating the keys or
-   * values, the iteration order is unspecified except that it will stay the
-   * same as long as the map isn't changed.
-   *
-   * If [equals] is provided, it is used to compare the keys in the table with
-   * new keys. If [equals] is omitted, the key's own [Object.==] is used
-   * instead.
-   *
-   * Similar, if [hashCode] is provided, it is used to produce a hash value
-   * for keys in order to place them in the hash table. If it is omitted, the
-   * key's own [Object.hashCode] is used.
-   *
-   * If using methods like [operator []], [remove] and [containsKey] together
-   * with a custom equality and hashcode, an extra `isValidKey` function
-   * can be supplied. This function is called before calling [equals] or
-   * [hashCode] with an argument that may not be a [K] instance, and if the
-   * call returns false, the key is assumed to not be in the set.
-   * The [isValidKey] function defaults to just testing if the object is a
-   * [K] instance.
-   *
-   * Example:
-   *
-   *     new HashMap<int,int>(equals: (int a, int b) => (b - a) % 5 == 0,
-   *                          hashCode: (int e) => e % 5)
-   *
-   * This example map does not need an `isValidKey` function to be passed.
-   * The default function accepts only `int` values, which can safely be
-   * passed to both the `equals` and `hashCode` functions.
-   *
-   * If neither `equals`, `hashCode`, nor `isValidKey` is provided,
-   * the default `isValidKey` instead accepts all keys.
-   * The default equality and hashcode operations are assumed to work on all
-   * objects.
-   *
-   * Likewise, if `equals` is [identical], `hashCode` is [identityHashCode]
-   * and `isValidKey` is omitted, the resulting map is identity based,
-   * and the `isValidKey` defaults to accepting all keys.
-   * Such a map can be created directly using [HashMap.identity].
-   *
-   * The used `equals` and `hashCode` method should always be consistent,
-   * so that if `equals(a, b)` then `hashCode(a) == hashCode(b)`. The hash
-   * of an object, or what it compares equal to, should not change while the
-   * object is a key in the map. If it does change, the result is unpredictable.
-   *
-   * If you supply one of [equals] and [hashCode],
-   * you should generally also to supply the other.
-   */
+  /// Creates an unordered hash-table based [Map].
+  ///
+  /// The created map is not ordered in any way. When iterating the keys or
+  /// values, the iteration order is unspecified except that it will stay the
+  /// same as long as the map isn't changed.
+  ///
+  /// If [equals] is provided, it is used to compare the keys in the table with
+  /// new keys. If [equals] is omitted, the key's own [Object.==] is used
+  /// instead.
+  ///
+  /// Similar, if [hashCode] is provided, it is used to produce a hash value
+  /// for keys in order to place them in the hash table. If it is omitted, the
+  /// key's own [Object.hashCode] is used.
+  ///
+  /// If using methods like [operator []], [remove] and [containsKey] together
+  /// with a custom equality and hashcode, an extra `isValidKey` function
+  /// can be supplied. This function is called before calling [equals] or
+  /// [hashCode] with an argument that may not be a [K] instance, and if the
+  /// call returns false, the key is assumed to not be in the set.
+  /// The [isValidKey] function defaults to just testing if the object is a
+  /// [K] instance.
+  ///
+  /// Example:
+  ///
+  ///     new HashMap<int,int>(equals: (int a, int b) => (b - a) % 5 == 0,
+  ///                          hashCode: (int e) => e % 5)
+  ///
+  /// This example map does not need an `isValidKey` function to be passed.
+  /// The default function accepts only `int` values, which can safely be
+  /// passed to both the `equals` and `hashCode` functions.
+  ///
+  /// If neither `equals`, `hashCode`, nor `isValidKey` is provided,
+  /// the default `isValidKey` instead accepts all keys.
+  /// The default equality and hashcode operations are assumed to work on all
+  /// objects.
+  ///
+  /// Likewise, if `equals` is [identical], `hashCode` is [identityHashCode]
+  /// and `isValidKey` is omitted, the resulting map is identity based,
+  /// and the `isValidKey` defaults to accepting all keys.
+  /// Such a map can be created directly using [HashMap.identity].
+  ///
+  /// The used `equals` and `hashCode` method should always be consistent,
+  /// so that if `equals(a, b)` then `hashCode(a) == hashCode(b)`. The hash
+  /// of an object, or what it compares equal to, should not change while the
+  /// object is a key in the map. If it does change, the result is
+  /// unpredictable.
+  ///
+  /// If you supply one of [equals] and [hashCode],
+  /// you should generally also to supply the other.
   external factory HashMap(
       {bool equals(K key1, K key2),
       int hashCode(K key),
       bool isValidKey(potentialKey)});
 
-  /**
-   * Creates an unordered identity-based map.
-   *
-   * Effectively a shorthand for:
-   *
-   *     new HashMap<K, V>(equals: identical,
-   *                       hashCode: identityHashCode)
-   */
+  /// Creates an unordered identity-based map.
+  ///
+  /// Effectively a shorthand for:
+  ///
+  ///     new HashMap<K, V>(equals: identical,
+  ///                       hashCode: identityHashCode)
   external factory HashMap.identity();
 
-  /**
-   * Creates a [HashMap] that contains all key/value pairs of [other].
-   *
-   * The keys must all be instances of [K] and the values of [V].
-   * The [other] map itself can have any type.
-   */
+  /// Creates a [HashMap] that contains all key/value pairs of [other].
+  ///
+  /// The keys must all be instances of [K] and the values of [V].
+  /// The [other] map itself can have any type.
   factory HashMap.from(Map other) {
-    Map<K, V> result = new HashMap<K, V>();
+    Map<K, V> result = HashMap<K, V>();
     other.forEach((k, v) {
       result[k] = v;
     });
     return result;
   }
 
-  /**
-   * Creates a [HashMap] that contains all key/value pairs of [other].
-   */
-  factory HashMap.of(Map<K, V> other) => new HashMap<K, V>()..addAll(other);
+  /// Creates a [HashMap] that contains all key/value pairs of [other].
+  factory HashMap.of(Map<K, V> other) => HashMap<K, V>()..addAll(other);
 
-  /**
-   * Creates a [HashMap] where the keys and values are computed from the
-   * [iterable].
-   *
-   * For each element of the [iterable] this constructor computes a key/value
-   * pair, by applying [key] and [value] respectively.
-   *
-   * The keys of the key/value pairs do not need to be unique. The last
-   * occurrence of a key will simply overwrite any previous value.
-   *
-   * If no values are specified for [key] and [value] the default is the
-   * identity function.
-   */
+  /// Creates a [HashMap] where the keys and values are computed from the
+  /// [iterable].
+  ///
+  /// For each element of the [iterable] this constructor computes a key/value
+  /// pair, by applying [key] and [value] respectively.
+  ///
+  /// The keys of the key/value pairs do not need to be unique. The last
+  /// occurrence of a key will simply overwrite any previous value.
+  ///
+  /// If no values are specified for [key] and [value] the default is the
+  /// identity function.
   factory HashMap.fromIterable(Iterable iterable,
       {K key(element), V value(element)}) {
-    Map<K, V> map = new HashMap<K, V>();
+    Map<K, V> map = HashMap<K, V>();
     MapBase._fillMapWithMappedIterable(map, iterable, key, value);
     return map;
   }
 
-  /**
-   * Creates a [HashMap] associating the given [keys] to [values].
-   *
-   * This constructor iterates over [keys] and [values] and maps each element of
-   * [keys] to the corresponding element of [values].
-   *
-   * If [keys] contains the same object multiple times, the last occurrence
-   * overwrites the previous value.
-   *
-   * It is an error if the two [Iterable]s don't have the same length.
-   */
+  /// Creates a [HashMap] associating the given [keys] to [values].
+  ///
+  /// This constructor iterates over [keys] and [values] and maps each element
+  /// of [keys] to the corresponding element of [values].
+  ///
+  /// If [keys] contains the same object multiple times, the last occurrence
+  /// overwrites the previous value.
+  ///
+  /// It is an error if the two [Iterable]s don't have the same length.
   factory HashMap.fromIterables(Iterable<K> keys, Iterable<V> values) {
-    Map<K, V> map = new HashMap<K, V>();
+    Map<K, V> map = HashMap<K, V>();
     MapBase._fillMapWithIterables(map, keys, values);
     return map;
   }
 
-  /**
-   * Creates a [HashMap] containing the entries of [entries].
-   *
-   * Returns a new `HashMap<K, V>` where all entries of [entries]
-   * have been added in iteration order.
-   *
-   * If multiple [entries] have the same key,
-   * later occurrences overwrite the earlier ones.
-   */
+  /// Creates a [HashMap] containing the entries of [entries].
+  ///
+  /// Returns a new `HashMap<K, V>` where all entries of [entries]
+  /// have been added in iteration order.
+  ///
+  /// If multiple [entries] have the same key,
+  /// later occurrences overwrite the earlier ones.
   @Since("2.1")
   factory HashMap.fromEntries(Iterable<MapEntry<K, V>> entries) =>
       HashMap<K, V>()..addEntries(entries);
diff --git a/sdk/lib/collection/hash_set.dart b/sdk/lib/collection/hash_set.dart
index d93e550..3fd00fe 100644
--- a/sdk/lib/collection/hash_set.dart
+++ b/sdk/lib/collection/hash_set.dart
@@ -4,125 +4,112 @@
 
 part of dart.collection;
 
-/**
- * An unordered hash-table based [Set] implementation.
- *
- * The elements of a `HashSet` must have consistent equality
- * and hashCode implementations. This means that the equals operation
- * must define a stable equivalence relation on the elements (reflexive,
- * symmetric, transitive, and consistent over time), and that the hashCode
- * must consistent with equality, so that the same for objects that are
- * considered equal.
- *
- * The set allows `null` as an element.
- *
- * Most simple operations on `HashSet` are done in (potentially amortized)
- * constant time: [add], [contains], [remove], and [length], provided the hash
- * codes of objects are well distributed.
- *
- * The iteration order of the set is not specified and depends on
- * the hashcodes of the provided elements. However, the order is stable:
- * multiple iterations over the same set produce the same order, as long as
- * the set is not modified.
- */
+/// An unordered hash-table based [Set] implementation.
+///
+/// The elements of a `HashSet` must have consistent equality
+/// and hashCode implementations. This means that the equals operation
+/// must define a stable equivalence relation on the elements (reflexive,
+/// symmetric, transitive, and consistent over time), and that the hashCode
+/// must consistent with equality, so that the same for objects that are
+/// considered equal.
+///
+/// The set allows `null` as an element.
+///
+/// Most simple operations on `HashSet` are done in (potentially amortized)
+/// constant time: [add], [contains], [remove], and [length], provided the hash
+/// codes of objects are well distributed.
+///
+/// The iteration order of the set is not specified and depends on
+/// the hashcodes of the provided elements. However, the order is stable:
+/// multiple iterations over the same set produce the same order, as long as
+/// the set is not modified.
 abstract class HashSet<E> implements Set<E> {
-  /**
-   * Create a hash set using the provided [equals] as equality.
-   *
-   * The provided [equals] must define a stable equivalence relation, and
-   * [hashCode] must be consistent with [equals]. If the [equals] or [hashCode]
-   * methods won't work on all objects, but only on some instances of E, the
-   * [isValidKey] predicate can be used to restrict the keys that the functions
-   * are applied to.
-   * Any key for which [isValidKey] returns false is automatically assumed
-   * to not be in the set when asking `contains`.
-   *
-   * If [equals] or [hashCode] are omitted, the set uses
-   * the elements' intrinsic [Object.==] and [Object.hashCode].
-   *
-   * If you supply one of [equals] and [hashCode],
-   * you should generally also to supply the other.
-   *
-   * If the supplied `equals` or `hashCode` functions won't work on all [E]
-   * objects, and the map will be used in a setting where a non-`E` object
-   * is passed to, e.g., `contains`, then the [isValidKey] function should
-   * also be supplied.
-   *
-   * If [isValidKey] is omitted, it defaults to testing if the object is an
-   * [E] instance. That means that:
-   *
-   *     new HashSet<int>(equals: (int e1, int e2) => (e1 - e2) % 5 == 0,
-   *                      hashCode: (int e) => e % 5)
-   *
-   * does not need an `isValidKey` argument, because it defaults to only
-   * accepting `int` values which are accepted by both `equals` and `hashCode`.
-   *
-   * If neither `equals`, `hashCode`, nor `isValidKey` is provided,
-   * the default `isValidKey` instead accepts all values.
-   * The default equality and hashcode operations are assumed to work on all
-   * objects.
-   *
-   * Likewise, if `equals` is [identical], `hashCode` is [identityHashCode]
-   * and `isValidKey` is omitted, the resulting set is identity based,
-   * and the `isValidKey` defaults to accepting all keys.
-   * Such a map can be created directly using [HashSet.identity].
-   */
+  /// Create a hash set using the provided [equals] as equality.
+  ///
+  /// The provided [equals] must define a stable equivalence relation, and
+  /// [hashCode] must be consistent with [equals]. If the [equals] or [hashCode]
+  /// methods won't work on all objects, but only on some instances of E, the
+  /// [isValidKey] predicate can be used to restrict the keys that the functions
+  /// are applied to.
+  /// Any key for which [isValidKey] returns false is automatically assumed
+  /// to not be in the set when asking `contains`.
+  ///
+  /// If [equals] or [hashCode] are omitted, the set uses
+  /// the elements' intrinsic [Object.==] and [Object.hashCode].
+  ///
+  /// If you supply one of [equals] and [hashCode],
+  /// you should generally also to supply the other.
+  ///
+  /// If the supplied `equals` or `hashCode` functions won't work on all [E]
+  /// objects, and the map will be used in a setting where a non-`E` object
+  /// is passed to, e.g., `contains`, then the [isValidKey] function should
+  /// also be supplied.
+  ///
+  /// If [isValidKey] is omitted, it defaults to testing if the object is an
+  /// [E] instance. That means that:
+  ///
+  ///     new HashSet<int>(equals: (int e1, int e2) => (e1 - e2) % 5 == 0,
+  ///                      hashCode: (int e) => e % 5)
+  ///
+  /// does not need an `isValidKey` argument, because it defaults to only
+  /// accepting `int` values which are accepted by both `equals` and `hashCode`.
+  ///
+  /// If neither `equals`, `hashCode`, nor `isValidKey` is provided,
+  /// the default `isValidKey` instead accepts all values.
+  /// The default equality and hashcode operations are assumed to work on all
+  /// objects.
+  ///
+  /// Likewise, if `equals` is [identical], `hashCode` is [identityHashCode]
+  /// and `isValidKey` is omitted, the resulting set is identity based,
+  /// and the `isValidKey` defaults to accepting all keys.
+  /// Such a map can be created directly using [HashSet.identity].
   external factory HashSet(
       {bool equals(E e1, E e2),
       int hashCode(E e),
       bool isValidKey(potentialKey)});
 
-  /**
-   * Creates an unordered identity-based set.
-   *
-   * Effectively a shorthand for:
-   *
-   *     new HashSet<E>(equals: identical,
-   *                    hashCode: identityHashCode)
-   */
+  /// Creates an unordered identity-based set.
+  ///
+  /// Effectively a shorthand for:
+  ///
+  ///     new HashSet<E>(equals: identical,
+  ///                    hashCode: identityHashCode)
   external factory HashSet.identity();
 
-  /**
-   * Create a hash set containing all [elements].
-   *
-   * Creates a hash set as by `new HashSet<E>()` and adds all given [elements]
-   * to the set. The elements are added in order. If [elements] contains
-   * two entries that are equal, but not identical, then the first one is
-   * the one in the resulting set.
-   *
-   * All the [elements] should be instances of [E].
-   * The `elements` iterable itself may have any element type, so this
-   * constructor can be used to down-cast a `Set`, for example as:
-   * ```dart
-   * Set<SuperType> superSet = ...;
-   * Set<SubType> subSet =
-   *     new HashSet<SubType>.from(superSet.whereType<SubType>());
-   * ```
-   */
+  /// Create a hash set containing all [elements].
+  ///
+  /// Creates a hash set as by `new HashSet<E>()` and adds all given [elements]
+  /// to the set. The elements are added in order. If [elements] contains
+  /// two entries that are equal, but not identical, then the first one is
+  /// the one in the resulting set.
+  ///
+  /// All the [elements] should be instances of [E].
+  /// The `elements` iterable itself may have any element type, so this
+  /// constructor can be used to down-cast a `Set`, for example as:
+  /// ```dart
+  /// Set<SuperType> superSet = ...;
+  /// Set<SubType> subSet =
+  ///     new HashSet<SubType>.from(superSet.whereType<SubType>());
+  /// ```
   factory HashSet.from(Iterable elements) {
-    HashSet<E> result = new HashSet<E>();
+    HashSet<E> result = HashSet<E>();
     for (final e in elements) {
       result.add(e);
     }
     return result;
   }
 
-  /**
-   * Create a hash set containing all [elements].
-   *
-   * Creates a hash set as by `new HashSet<E>()` and adds all given [elements]
-   * to the set. The elements are added in order. If [elements] contains
-   * two entries that are equal, but not identical, then the first one is
-   * the one in the resulting set.
-   */
-  factory HashSet.of(Iterable<E> elements) =>
-      new HashSet<E>()..addAll(elements);
+  /// Create a hash set containing all [elements].
+  ///
+  /// Creates a hash set as by `new HashSet<E>()` and adds all given [elements]
+  /// to the set. The elements are added in order. If [elements] contains
+  /// two entries that are equal, but not identical, then the first one is
+  /// the one in the resulting set.
+  factory HashSet.of(Iterable<E> elements) => HashSet<E>()..addAll(elements);
 
-  /**
-   * Provides an iterator that iterates over the elements of this set.
-   *
-   * The order of iteration is unspecified,
-   * but consistent between changes to the set.
-   */
+  /// Provides an iterator that iterates over the elements of this set.
+  ///
+  /// The order of iteration is unspecified,
+  /// but consistent between changes to the set.
   Iterator<E> get iterator;
 }
diff --git a/sdk/lib/collection/iterable.dart b/sdk/lib/collection/iterable.dart
index b7b5497..14e7226 100644
--- a/sdk/lib/collection/iterable.dart
+++ b/sdk/lib/collection/iterable.dart
@@ -4,11 +4,9 @@
 
 part of dart.collection;
 
-/**
- * This [Iterable] mixin implements all [Iterable] members except `iterator`.
- *
- * All other methods are implemented in terms of `iterator`.
- */
+/// This [Iterable] mixin implements all [Iterable] members except `iterator`.
+///
+/// All other methods are implemented in terms of `iterator`.
 abstract class IterableMixin<E> implements Iterable<E> {
   // This class has methods copied verbatim into:
   // - IterableBase
@@ -16,23 +14,23 @@
   // If changing a method here, also change the other copies.
 
   Iterable<R> cast<R>() => Iterable.castFrom<E, R>(this);
-  Iterable<T> map<T>(T f(E element)) => new MappedIterable<E, T>(this, f);
+  Iterable<T> map<T>(T f(E element)) => MappedIterable<E, T>(this, f);
 
-  Iterable<E> where(bool f(E element)) => new WhereIterable<E>(this, f);
+  Iterable<E> where(bool f(E element)) => WhereIterable<E>(this, f);
 
-  Iterable<T> whereType<T>() => new WhereTypeIterable<T>(this);
+  Iterable<T> whereType<T>() => WhereTypeIterable<T>(this);
 
   Iterable<T> expand<T>(Iterable<T> f(E element)) =>
-      new ExpandIterable<E, T>(this, f);
+      ExpandIterable<E, T>(this, f);
 
   Iterable<E> followedBy(Iterable<E> other) {
     // Type workaround because IterableMixin<E> doesn't promote
     // to EfficientLengthIterable<E>.
     Iterable<E> self = this;
     if (self is EfficientLengthIterable<E>) {
-      return new FollowedByIterable<E>.firstEfficient(self, other);
+      return FollowedByIterable<E>.firstEfficient(self, other);
     }
-    return new FollowedByIterable<E>(this, other);
+    return FollowedByIterable<E>(this, other);
   }
 
   bool contains(Object element) {
@@ -74,7 +72,7 @@
   String join([String separator = ""]) {
     Iterator<E> iterator = this.iterator;
     if (!iterator.moveNext()) return "";
-    StringBuffer buffer = new StringBuffer();
+    StringBuffer buffer = StringBuffer();
     if (separator == null || separator == "") {
       do {
         buffer.write("${iterator.current}");
@@ -96,10 +94,10 @@
     return false;
   }
 
-  List<E> toList({bool growable: true}) =>
-      new List<E>.from(this, growable: growable);
+  List<E> toList({bool growable = true}) =>
+      List<E>.from(this, growable: growable);
 
-  Set<E> toSet() => new Set<E>.from(this);
+  Set<E> toSet() => Set<E>.from(this);
 
   int get length {
     assert(this is! EfficientLengthIterable);
@@ -116,19 +114,19 @@
   bool get isNotEmpty => !isEmpty;
 
   Iterable<E> take(int count) {
-    return new TakeIterable<E>(this, count);
+    return TakeIterable<E>(this, count);
   }
 
   Iterable<E> takeWhile(bool test(E value)) {
-    return new TakeWhileIterable<E>(this, test);
+    return TakeWhileIterable<E>(this, test);
   }
 
   Iterable<E> skip(int count) {
-    return new SkipIterable<E>(this, count);
+    return SkipIterable<E>(this, count);
   }
 
   Iterable<E> skipWhile(bool test(E value)) {
-    return new SkipWhileIterable<E>(this, test);
+    return SkipWhileIterable<E>(this, test);
   }
 
   E get first {
@@ -206,29 +204,25 @@
       if (index == elementIndex) return element;
       elementIndex++;
     }
-    throw new RangeError.index(index, this, "index", null, elementIndex);
+    throw RangeError.index(index, this, "index", null, elementIndex);
   }
 
   String toString() => IterableBase.iterableToShortString(this, '(', ')');
 }
 
-/**
- * Base class for implementing [Iterable].
- *
- * This class implements all methods of [Iterable], except [Iterable.iterator],
- * in terms of `iterator`.
- */
+/// Base class for implementing [Iterable].
+///
+/// This class implements all methods of [Iterable], except [Iterable.iterator],
+/// in terms of `iterator`.
 abstract class IterableBase<E> extends Iterable<E> {
   const IterableBase();
 
-  /**
-   * Convert an `Iterable` to a string like [IterableBase.toString].
-   *
-   * Allows using other delimiters than '(' and ')'.
-   *
-   * Handles circular references where converting one of the elements
-   * to a string ends up converting [iterable] to a string again.
-   */
+  /// Convert an `Iterable` to a string like [IterableBase.toString].
+  ///
+  /// Allows using other delimiters than '(' and ')'.
+  ///
+  /// Handles circular references where converting one of the elements
+  /// to a string ends up converting [iterable] to a string again.
   static String iterableToShortString(Iterable iterable,
       [String leftDelimiter = '(', String rightDelimiter = ')']) {
     if (_isToStringVisiting(iterable)) {
@@ -246,30 +240,28 @@
       assert(identical(_toStringVisiting.last, iterable));
       _toStringVisiting.removeLast();
     }
-    return (new StringBuffer(leftDelimiter)
+    return (StringBuffer(leftDelimiter)
           ..writeAll(parts, ", ")
           ..write(rightDelimiter))
         .toString();
   }
 
-  /**
-   * Converts an `Iterable` to a string.
-   *
-   * Converts each elements to a string, and separates the results by ", ".
-   * Then wraps the result in [leftDelimiter] and [rightDelimiter].
-   *
-   * Unlike [iterableToShortString], this conversion doesn't omit any
-   * elements or puts any limit on the size of the result.
-   *
-   * Handles circular references where converting one of the elements
-   * to a string ends up converting [iterable] to a string again.
-   */
+  /// Converts an `Iterable` to a string.
+  ///
+  /// Converts each elements to a string, and separates the results by ", ".
+  /// Then wraps the result in [leftDelimiter] and [rightDelimiter].
+  ///
+  /// Unlike [iterableToShortString], this conversion doesn't omit any
+  /// elements or puts any limit on the size of the result.
+  ///
+  /// Handles circular references where converting one of the elements
+  /// to a string ends up converting [iterable] to a string again.
   static String iterableToFullString(Iterable iterable,
       [String leftDelimiter = '(', String rightDelimiter = ')']) {
     if (_isToStringVisiting(iterable)) {
       return "$leftDelimiter...$rightDelimiter";
     }
-    StringBuffer buffer = new StringBuffer(leftDelimiter);
+    StringBuffer buffer = StringBuffer(leftDelimiter);
     _toStringVisiting.add(iterable);
     try {
       buffer.writeAll(iterable, ", ");
@@ -282,10 +274,10 @@
   }
 }
 
-/** A collection used to identify cyclic lists during toString() calls. */
+/// A collection used to identify cyclic lists during toString() calls.
 final List _toStringVisiting = [];
 
-/** Check if we are currently visiting `o` in a toString call. */
+/// Check if we are currently visiting `o` in a toString call.
 bool _isToStringVisiting(Object o) {
   for (int i = 0; i < _toStringVisiting.length; i++) {
     if (identical(o, _toStringVisiting[i])) return true;
@@ -293,9 +285,7 @@
   return false;
 }
 
-/**
- * Convert elements of [iterable] to strings and store them in [parts].
- */
+/// Convert elements of [iterable] to strings and store them in [parts].
 void _iterablePartsToStrings(Iterable iterable, List<String> parts) {
   /*
    * This is the complicated part of [iterableToShortString].
diff --git a/sdk/lib/collection/iterator.dart b/sdk/lib/collection/iterator.dart
index f870711..671f0ee 100644
--- a/sdk/lib/collection/iterator.dart
+++ b/sdk/lib/collection/iterator.dart
@@ -4,12 +4,10 @@
 
 part of dart.collection;
 
-/**
- * The [HasNextIterator] class wraps an [Iterator] and provides methods to
- * iterate over an object using `hasNext` and `next`.
- *
- * An [HasNextIterator] does not implement the [Iterator] interface.
- */
+/// The [HasNextIterator] class wraps an [Iterator] and provides methods to
+/// iterate over an object using `hasNext` and `next`.
+///
+/// An [HasNextIterator] does not implement the [Iterator] interface.
 class HasNextIterator<E> {
   static const int _HAS_NEXT_AND_NEXT_IN_CURRENT = 0;
   static const int _NO_NEXT = 1;
@@ -28,7 +26,7 @@
   E next() {
     // Call to hasNext is necessary to make sure we are positioned at the first
     // element when we start iterating.
-    if (!hasNext) throw new StateError("No more elements");
+    if (!hasNext) throw StateError("No more elements");
     assert(_state == _HAS_NEXT_AND_NEXT_IN_CURRENT);
     E result = _iterator.current;
     _move();
diff --git a/sdk/lib/collection/linked_hash_map.dart b/sdk/lib/collection/linked_hash_map.dart
index 91f95ad..e3a650d 100644
--- a/sdk/lib/collection/linked_hash_map.dart
+++ b/sdk/lib/collection/linked_hash_map.dart
@@ -4,153 +4,137 @@
 
 part of dart.collection;
 
-/**
- * A hash-table based implementation of [Map].
- *
- * The insertion order of keys is remembered,
- * and keys are iterated in the order they were inserted into the map.
- * Values are iterated in their corresponding key's order.
- * Changing a key's value, when the key is already in the map,
- * does not change the iteration order,
- * but removing the key and adding it again
- * will make it be last in the iteration order.
- *
- * The keys of a `LinkedHashMap` must have consistent [Object.==]
- * and [Object.hashCode] implementations. This means that the `==` operator
- * must define a stable equivalence relation on the keys (reflexive,
- * symmetric, transitive, and consistent over time), and that `hashCode`
- * must be the same for objects that are considered equal by `==`.
- *
- * The map allows `null` as a key.
- */
+/// A hash-table based implementation of [Map].
+///
+/// The insertion order of keys is remembered,
+/// and keys are iterated in the order they were inserted into the map.
+/// Values are iterated in their corresponding key's order.
+/// Changing a key's value, when the key is already in the map,
+/// does not change the iteration order,
+/// but removing the key and adding it again
+/// will make it be last in the iteration order.
+///
+/// The keys of a `LinkedHashMap` must have consistent [Object.==]
+/// and [Object.hashCode] implementations. This means that the `==` operator
+/// must define a stable equivalence relation on the keys (reflexive,
+/// symmetric, transitive, and consistent over time), and that `hashCode`
+/// must be the same for objects that are considered equal by `==`.
+///
+/// The map allows `null` as a key.
 abstract class LinkedHashMap<K, V> implements Map<K, V> {
-  /**
-   * Creates an insertion-ordered hash-table based [Map].
-   *
-   * If [equals] is provided, it is used to compare the keys in the table with
-   * new keys. If [equals] is omitted, the key's own [Object.==] is used
-   * instead.
-   *
-   * Similar, if [hashCode] is provided, it is used to produce a hash value
-   * for keys in order to place them in the hash table. If it is omitted, the
-   * key's own [Object.hashCode] is used.
-   *
-   * If using methods like [operator []], [remove] and [containsKey] together
-   * with a custom equality and hashcode, an extra `isValidKey` function
-   * can be supplied. This function is called before calling [equals] or
-   * [hashCode] with an argument that may not be a [K] instance, and if the
-   * call returns false, the key is assumed to not be in the set.
-   * The [isValidKey] function defaults to just testing if the object is a
-   * [K] instance.
-   *
-   * Example:
-   *
-   *     new LinkedHashMap<int,int>(equals: (int a, int b) => (b - a) % 5 == 0,
-   *                                hashCode: (int e) => e % 5)
-   *
-   * This example map does not need an `isValidKey` function to be passed.
-   * The default function accepts only `int` values, which can safely be
-   * passed to both the `equals` and `hashCode` functions.
-   *
-   * If neither `equals`, `hashCode`, nor `isValidKey` is provided,
-   * the default `isValidKey` instead accepts all keys.
-   * The default equality and hashcode operations are assumed to work on all
-   * objects.
-   *
-   * Likewise, if `equals` is [identical], `hashCode` is [identityHashCode]
-   * and `isValidKey` is omitted, the resulting map is identity based,
-   * and the `isValidKey` defaults to accepting all keys.
-   * Such a map can be created directly using [LinkedHashMap.identity].
-   *
-   * The used `equals` and `hashCode` method should always be consistent,
-   * so that if `equals(a, b)` then `hashCode(a) == hashCode(b)`. The hash
-   * of an object, or what it compares equal to, should not change while the
-   * object is in the table. If it does change, the result is unpredictable.
-   *
-   * If you supply one of [equals] and [hashCode],
-   * you should generally also to supply the other.
-   */
+  /// Creates an insertion-ordered hash-table based [Map].
+  ///
+  /// If [equals] is provided, it is used to compare the keys in the table with
+  /// new keys. If [equals] is omitted, the key's own [Object.==] is used
+  /// instead.
+  ///
+  /// Similar, if [hashCode] is provided, it is used to produce a hash value
+  /// for keys in order to place them in the hash table. If it is omitted, the
+  /// key's own [Object.hashCode] is used.
+  ///
+  /// If using methods like [operator []], [remove] and [containsKey] together
+  /// with a custom equality and hashcode, an extra `isValidKey` function
+  /// can be supplied. This function is called before calling [equals] or
+  /// [hashCode] with an argument that may not be a [K] instance, and if the
+  /// call returns false, the key is assumed to not be in the set.
+  /// The [isValidKey] function defaults to just testing if the object is a
+  /// [K] instance.
+  ///
+  /// Example:
+  ///
+  ///     new LinkedHashMap<int,int>(equals: (int a, int b) => (b - a) % 5 == 0,
+  ///                                hashCode: (int e) => e % 5)
+  ///
+  /// This example map does not need an `isValidKey` function to be passed.
+  /// The default function accepts only `int` values, which can safely be
+  /// passed to both the `equals` and `hashCode` functions.
+  ///
+  /// If neither `equals`, `hashCode`, nor `isValidKey` is provided,
+  /// the default `isValidKey` instead accepts all keys.
+  /// The default equality and hashcode operations are assumed to work on all
+  /// objects.
+  ///
+  /// Likewise, if `equals` is [identical], `hashCode` is [identityHashCode]
+  /// and `isValidKey` is omitted, the resulting map is identity based,
+  /// and the `isValidKey` defaults to accepting all keys.
+  /// Such a map can be created directly using [LinkedHashMap.identity].
+  ///
+  /// The used `equals` and `hashCode` method should always be consistent,
+  /// so that if `equals(a, b)` then `hashCode(a) == hashCode(b)`. The hash
+  /// of an object, or what it compares equal to, should not change while the
+  /// object is in the table. If it does change, the result is unpredictable.
+  ///
+  /// If you supply one of [equals] and [hashCode],
+  /// you should generally also to supply the other.
   external factory LinkedHashMap(
       {bool equals(K key1, K key2),
       int hashCode(K key),
       bool isValidKey(potentialKey)});
 
-  /**
-   * Creates an insertion-ordered identity-based map.
-   *
-   * Effectively a shorthand for:
-   *
-   *     new LinkedHashMap<K, V>(equals: identical,
-   *                             hashCode: identityHashCode)
-   */
+  /// Creates an insertion-ordered identity-based map.
+  ///
+  /// Effectively a shorthand for:
+  ///
+  ///     new LinkedHashMap<K, V>(equals: identical,
+  ///                             hashCode: identityHashCode)
   external factory LinkedHashMap.identity();
 
-  /**
-   * Creates a [LinkedHashMap] that contains all key value pairs of [other].
-   *
-   * The keys must all be instances of [K] and the values to [V].
-   * The [other] map itself can have any type.
-   */
+  /// Creates a [LinkedHashMap] that contains all key value pairs of [other].
+  ///
+  /// The keys must all be instances of [K] and the values to [V].
+  /// The [other] map itself can have any type.
   factory LinkedHashMap.from(Map other) {
-    LinkedHashMap<K, V> result = new LinkedHashMap<K, V>();
+    LinkedHashMap<K, V> result = LinkedHashMap<K, V>();
     other.forEach((k, v) {
       result[k] = v;
     });
     return result;
   }
 
-  /**
-   * Creates a [LinkedHashMap] that contains all key value pairs of [other].
-   */
+  /// Creates a [LinkedHashMap] that contains all key value pairs of [other].
   factory LinkedHashMap.of(Map<K, V> other) =>
-      new LinkedHashMap<K, V>()..addAll(other);
+      LinkedHashMap<K, V>()..addAll(other);
 
-  /**
-   * Creates a [LinkedHashMap] where the keys and values are computed from the
-   * [iterable].
-   *
-   * For each element of the [iterable] this constructor computes a key/value
-   * pair, by applying [key] and [value] respectively.
-   *
-   * The keys of the key/value pairs do not need to be unique. The last
-   * occurrence of a key will simply overwrite any previous value.
-   *
-   * If no values are specified for [key] and [value] the default is the
-   * identity function.
-   */
+  /// Creates a [LinkedHashMap] where the keys and values are computed from the
+  /// [iterable].
+  ///
+  /// For each element of the [iterable] this constructor computes a key/value
+  /// pair, by applying [key] and [value] respectively.
+  ///
+  /// The keys of the key/value pairs do not need to be unique. The last
+  /// occurrence of a key will simply overwrite any previous value.
+  ///
+  /// If no values are specified for [key] and [value] the default is the
+  /// identity function.
   factory LinkedHashMap.fromIterable(Iterable iterable,
       {K key(element), V value(element)}) {
-    LinkedHashMap<K, V> map = new LinkedHashMap<K, V>();
+    LinkedHashMap<K, V> map = LinkedHashMap<K, V>();
     MapBase._fillMapWithMappedIterable(map, iterable, key, value);
     return map;
   }
 
-  /**
-   * Creates a [LinkedHashMap] associating the given [keys] to [values].
-   *
-   * This constructor iterates over [keys] and [values] and maps each element of
-   * [keys] to the corresponding element of [values].
-   *
-   * If [keys] contains the same object multiple times, the last occurrence
-   * overwrites the previous value.
-   *
-   * It is an error if the two [Iterable]s don't have the same length.
-   */
+  /// Creates a [LinkedHashMap] associating the given [keys] to [values].
+  ///
+  /// This constructor iterates over [keys] and [values] and maps each element of
+  /// [keys] to the corresponding element of [values].
+  ///
+  /// If [keys] contains the same object multiple times, the last occurrence
+  /// overwrites the previous value.
+  ///
+  /// It is an error if the two [Iterable]s don't have the same length.
   factory LinkedHashMap.fromIterables(Iterable<K> keys, Iterable<V> values) {
-    LinkedHashMap<K, V> map = new LinkedHashMap<K, V>();
+    LinkedHashMap<K, V> map = LinkedHashMap<K, V>();
     MapBase._fillMapWithIterables(map, keys, values);
     return map;
   }
 
-  /**
-   * Creates a [LinkedHashMap] containing the entries of [entries].
-   *
-   * Returns a new `LinkedHashMap<K, V>` where all entries of [entries]
-   * have been added in iteration order.
-   *
-   * If multiple [entries] have the same key,
-   * later occurrences overwrite the earlier ones.
-   */
+  /// Creates a [LinkedHashMap] containing the entries of [entries].
+  ///
+  /// Returns a new `LinkedHashMap<K, V>` where all entries of [entries]
+  /// have been added in iteration order.
+  ///
+  /// If multiple [entries] have the same key,
+  /// later occurrences overwrite the earlier ones.
   @Since("2.1")
   factory LinkedHashMap.fromEntries(Iterable<MapEntry<K, V>> entries) =>
       <K, V>{}..addEntries(entries);
diff --git a/sdk/lib/collection/linked_hash_set.dart b/sdk/lib/collection/linked_hash_set.dart
index 2fff2ec..a058b5e 100644
--- a/sdk/lib/collection/linked_hash_set.dart
+++ b/sdk/lib/collection/linked_hash_set.dart
@@ -4,131 +4,117 @@
 
 part of dart.collection;
 
-/**
- * A [LinkedHashSet] is a hash-table based [Set] implementation.
- *
- * The `LinkedHashSet` also keep track of the order that elements were inserted
- * in, and iteration happens in first-to-last insertion order.
- *
- * The elements of a `LinkedHashSet` must have consistent [Object.==]
- * and [Object.hashCode] implementations. This means that the `==` operator
- * must define a stable equivalence relation on the elements (reflexive,
- * symmetric, transitive, and consistent over time), and that `hashCode`
- * must be the same for objects that are considered equal by `==`.
- *
- * The set allows `null` as an element.
- *
- * Iteration of elements is done in element insertion order.
- * An element that was added after another will occur later in the iteration.
- * Adding an element that is already in the set
- * does not change its position in the iteration order,
- * but removing an element and adding it again,
- * will make it the last element of an iteration.
- *
- * Most simple operations on `HashSet` are done in (potentially amortized)
- * constant time: [add], [contains], [remove], and [length], provided the hash
- * codes of objects are well distributed..
- */
+/// A [LinkedHashSet] is a hash-table based [Set] implementation.
+///
+/// The `LinkedHashSet` also keep track of the order that elements were inserted
+/// in, and iteration happens in first-to-last insertion order.
+///
+/// The elements of a `LinkedHashSet` must have consistent [Object.==]
+/// and [Object.hashCode] implementations. This means that the `==` operator
+/// must define a stable equivalence relation on the elements (reflexive,
+/// symmetric, transitive, and consistent over time), and that `hashCode`
+/// must be the same for objects that are considered equal by `==`.
+///
+/// The set allows `null` as an element.
+///
+/// Iteration of elements is done in element insertion order.
+/// An element that was added after another will occur later in the iteration.
+/// Adding an element that is already in the set
+/// does not change its position in the iteration order,
+/// but removing an element and adding it again,
+/// will make it the last element of an iteration.
+///
+/// Most simple operations on `HashSet` are done in (potentially amortized)
+/// constant time: [add], [contains], [remove], and [length], provided the hash
+/// codes of objects are well distributed..
 abstract class LinkedHashSet<E> implements Set<E> {
-  /**
-   * Create an insertion-ordered hash set using the provided
-   * [equals] and [hashCode].
-   *
-   * The provided [equals] must define a stable equivalence relation, and
-   * [hashCode] must be consistent with [equals]. If the [equals] or [hashCode]
-   * methods won't work on all objects, but only on some instances of E, the
-   * [isValidKey] predicate can be used to restrict the keys that the functions
-   * are applied to.
-   * Any key for which [isValidKey] returns false is automatically assumed
-   * to not be in the set when asking `contains`.
-   *
-   * If [equals] or [hashCode] are omitted, the set uses
-   * the elements' intrinsic [Object.==] and [Object.hashCode],
-   * and [isValidKey] is ignored since these operations are assumed
-   * to work on all objects.
-   *
-   * If you supply one of [equals] and [hashCode],
-   * you should generally also to supply the other.
-   *
-   * If the supplied `equals` or `hashCode` functions won't work on all [E]
-   * objects, and the map will be used in a setting where a non-`E` object
-   * is passed to, e.g., `contains`, then the [isValidKey] function should
-   * also be supplied.
-   *
-   * If [isValidKey] is omitted, it defaults to testing if the object is an
-   * [E] instance. That means that:
-   *
-   *     new LinkedHashSet<int>(equals: (int e1, int e2) => (e1 - e2) % 5 == 0,
-   *                            hashCode: (int e) => e % 5)
-   *
-   * does not need an `isValidKey` argument, because it defaults to only
-   * accepting `int` values which are accepted by both `equals` and `hashCode`.
-   *
-   * If neither `equals`, `hashCode`, nor `isValidKey` is provided,
-   * the default `isValidKey` instead accepts all values.
-   * The default equality and hashcode operations are assumed to work on all
-   * objects.
-   *
-   * Likewise, if `equals` is [identical], `hashCode` is [identityHashCode]
-   * and `isValidKey` is omitted, the resulting set is identity based,
-   * and the `isValidKey` defaults to accepting all keys.
-   * Such a map can be created directly using [LinkedHashSet.identity].
-   */
+  /// Create an insertion-ordered hash set using the provided
+  /// [equals] and [hashCode].
+  ///
+  /// The provided [equals] must define a stable equivalence relation, and
+  /// [hashCode] must be consistent with [equals]. If the [equals] or [hashCode]
+  /// methods won't work on all objects, but only on some instances of E, the
+  /// [isValidKey] predicate can be used to restrict the keys that the functions
+  /// are applied to.
+  /// Any key for which [isValidKey] returns false is automatically assumed
+  /// to not be in the set when asking `contains`.
+  ///
+  /// If [equals] or [hashCode] are omitted, the set uses
+  /// the elements' intrinsic [Object.==] and [Object.hashCode],
+  /// and [isValidKey] is ignored since these operations are assumed
+  /// to work on all objects.
+  ///
+  /// If you supply one of [equals] and [hashCode],
+  /// you should generally also to supply the other.
+  ///
+  /// If the supplied `equals` or `hashCode` functions won't work on all [E]
+  /// objects, and the map will be used in a setting where a non-`E` object
+  /// is passed to, e.g., `contains`, then the [isValidKey] function should
+  /// also be supplied.
+  ///
+  /// If [isValidKey] is omitted, it defaults to testing if the object is an
+  /// [E] instance. That means that:
+  ///
+  ///     new LinkedHashSet<int>(equals: (int e1, int e2) => (e1 - e2) % 5 == 0,
+  ///                            hashCode: (int e) => e % 5)
+  ///
+  /// does not need an `isValidKey` argument, because it defaults to only
+  /// accepting `int` values which are accepted by both `equals` and `hashCode`.
+  ///
+  /// If neither `equals`, `hashCode`, nor `isValidKey` is provided,
+  /// the default `isValidKey` instead accepts all values.
+  /// The default equality and hashcode operations are assumed to work on all
+  /// objects.
+  ///
+  /// Likewise, if `equals` is [identical], `hashCode` is [identityHashCode]
+  /// and `isValidKey` is omitted, the resulting set is identity based,
+  /// and the `isValidKey` defaults to accepting all keys.
+  /// Such a map can be created directly using [LinkedHashSet.identity].
   external factory LinkedHashSet(
       {bool equals(E e1, E e2),
       int hashCode(E e),
       bool isValidKey(potentialKey)});
 
-  /**
-   * Creates an insertion-ordered identity-based set.
-   *
-   * Effectively a shorthand for:
-   *
-   *     new LinkedHashSet<E>(equals: identical,
-   *                          hashCode: identityHashCode)
-   */
+  /// Creates an insertion-ordered identity-based set.
+  ///
+  /// Effectively a shorthand for:
+  ///
+  ///     new LinkedHashSet<E>(equals: identical,
+  ///                          hashCode: identityHashCode)
   external factory LinkedHashSet.identity();
 
-  /**
-   * Create a linked hash set containing all [elements].
-   *
-   * Creates a linked hash set as by `new LinkedHashSet<E>()` and adds each
-   * element of `elements` to this set in the order they are iterated.
-   *
-   * All the [elements] should be instances of [E].
-   * The `elements` iterable itself may have any element type,
-   * so this constructor can be used to down-cast a `Set`, for example as:
-   *
-   *     Set<SuperType> superSet = ...;
-   *     Iterable<SuperType> tmp = superSet.where((e) => e is SubType);
-   *     Set<SubType> subSet = new LinkedHashSet<SubType>.from(tmp);
-   */
+  /// Create a linked hash set containing all [elements].
+  ///
+  /// Creates a linked hash set as by `new LinkedHashSet<E>()` and adds each
+  /// element of `elements` to this set in the order they are iterated.
+  ///
+  /// All the [elements] should be instances of [E].
+  /// The `elements` iterable itself may have any element type,
+  /// so this constructor can be used to down-cast a `Set`, for example as:
+  ///
+  ///     Set<SuperType> superSet = ...;
+  ///     Iterable<SuperType> tmp = superSet.where((e) => e is SubType);
+  ///     Set<SubType> subSet = new LinkedHashSet<SubType>.from(tmp);
   factory LinkedHashSet.from(Iterable elements) {
-    LinkedHashSet<E> result = new LinkedHashSet<E>();
+    LinkedHashSet<E> result = LinkedHashSet<E>();
     for (final element in elements) {
       result.add(element);
     }
     return result;
   }
 
-  /**
-   * Create a linked hash set from [elements].
-   *
-   * Creates a linked hash set as by `new LinkedHashSet<E>()` and adds each
-   * element of `elements` to this set in the order they are iterated.
-   */
+  /// Create a linked hash set from [elements].
+  ///
+  /// Creates a linked hash set as by `new LinkedHashSet<E>()` and adds each
+  /// element of `elements` to this set in the order they are iterated.
   factory LinkedHashSet.of(Iterable<E> elements) =>
-      new LinkedHashSet<E>()..addAll(elements);
+      LinkedHashSet<E>()..addAll(elements);
 
-  /**
-   * Executes a function on each element of the set.
-   *
-   * The elements are iterated in insertion order.
-   */
+  /// Executes a function on each element of the set.
+  ///
+  /// The elements are iterated in insertion order.
   void forEach(void action(E element));
 
-  /**
-   * Provides an iterator that iterates over the elements in insertion order.
-   */
+  /// Provides an iterator that iterates over the elements in insertion order.
   Iterator<E> get iterator;
 }
diff --git a/sdk/lib/collection/linked_list.dart b/sdk/lib/collection/linked_list.dart
index 4ba329c..91461cb 100644
--- a/sdk/lib/collection/linked_list.dart
+++ b/sdk/lib/collection/linked_list.dart
@@ -4,82 +4,68 @@
 
 part of dart.collection;
 
-/**
- * A specialized double-linked list of elements that extends [LinkedListEntry].
- *
- * This is not a generic data structure. It only accepts elements that extend
- * the [LinkedListEntry] class. See the [Queue] implementations for
- * generic collections that allow constant time adding and removing at the ends.
- *
- * This is not a [List] implementation. Despite its name, this class does not
- * implement the [List] interface. It does not allow constant time lookup by
- * index.
- *
- * Because the elements themselves contain the links of this linked list,
- * each element can be in only one list at a time. To add an element to another
- * list, it must first be removed from its current list (if any).
- *
- * In return, each element knows its own place in the linked list, as well as
- * which list it is in. This allows constant time [LinkedListEntry.insertAfter],
- * [LinkedListEntry.insertBefore] and [LinkedListEntry.unlink] operations
- * when all you have is the element.
- *
- * A `LinkedList` also allows constant time adding and removing at either end,
- * and a constant time length getter.
- */
+/// A specialized double-linked list of elements that extends [LinkedListEntry].
+///
+/// This is not a generic data structure. It only accepts elements that extend
+/// the [LinkedListEntry] class. See the [Queue] implementations for generic
+/// collections that allow constant time adding and removing at the ends.
+///
+/// This is not a [List] implementation. Despite its name, this class does not
+/// implement the [List] interface. It does not allow constant time lookup by
+/// index.
+///
+/// Because the elements themselves contain the links of this linked list,
+/// each element can be in only one list at a time. To add an element to another
+/// list, it must first be removed from its current list (if any).
+///
+/// In return, each element knows its own place in the linked list, as well as
+/// which list it is in. This allows constant time
+/// [LinkedListEntry.insertAfter], [LinkedListEntry.insertBefore] and
+/// [LinkedListEntry.unlink] operations when all you have is the element.
+///
+/// A `LinkedList` also allows constant time adding and removing at either end,
+/// and a constant time length getter.
 class LinkedList<E extends LinkedListEntry<E>> extends Iterable<E> {
   int _modificationCount = 0;
   int _length = 0;
   E _first;
 
-  /**
-   * Construct a new empty linked list.
-   */
+  /// Construct a new empty linked list.
   LinkedList();
 
-  /**
-   * Add [entry] to the beginning of the linked list.
-   */
+  /// Add [entry] to the beginning of the linked list.
   void addFirst(E entry) {
     _insertBefore(_first, entry, updateFirst: true);
     _first = entry;
   }
 
-  /**
-   * Add [entry] to the end of the linked list.
-   */
+  /// Add [entry] to the end of the linked list.
   void add(E entry) {
     _insertBefore(_first, entry, updateFirst: false);
   }
 
-  /**
-   * Add [entries] to the end of the linked list.
-   */
+  /// Add [entries] to the end of the linked list.
   void addAll(Iterable<E> entries) {
     entries.forEach(add);
   }
 
-  /**
-   * Remove [entry] from the linked list.
-   *
-   * Returns false and does nothing if [entry] is not in this linked list.
-   *
-   * This is equivalent to calling `entry.unlink()` if the entry is in this
-   * list.
-   */
+  /// Remove [entry] from the linked list.
+  ///
+  /// Returns false and does nothing if [entry] is not in this linked list.
+  ///
+  /// This is equivalent to calling `entry.unlink()` if the entry is in this
+  /// list.
   bool remove(E entry) {
     if (entry._list != this) return false;
     _unlink(entry); // Unlink will decrement length.
     return true;
   }
 
-  Iterator<E> get iterator => new _LinkedListIterator<E>(this);
+  Iterator<E> get iterator => _LinkedListIterator<E>(this);
 
   int get length => _length;
 
-  /**
-   * Remove all elements from this linked list.
-   */
+  /// Remove all elements from this linked list.
   void clear() {
     _modificationCount++;
     if (isEmpty) return;
@@ -97,33 +83,31 @@
 
   E get first {
     if (isEmpty) {
-      throw new StateError('No such element');
+      throw StateError('No such element');
     }
     return _first;
   }
 
   E get last {
     if (isEmpty) {
-      throw new StateError('No such element');
+      throw StateError('No such element');
     }
     return _first._previous;
   }
 
   E get single {
     if (isEmpty) {
-      throw new StateError('No such element');
+      throw StateError('No such element');
     }
     if (_length > 1) {
-      throw new StateError('Too many elements');
+      throw StateError('Too many elements');
     }
     return _first;
   }
 
-  /**
-   * Call [action] with each entry in this linked list.
-   *
-   * It's an error if [action] modify the linked list.
-   */
+  /// Call [action] with each entry in this linked list.
+  ///
+  /// It's an error if [action] modify the linked list.
   void forEach(void action(E entry)) {
     int modificationCount = _modificationCount;
     if (isEmpty) return;
@@ -132,7 +116,7 @@
     do {
       action(current);
       if (modificationCount != _modificationCount) {
-        throw new ConcurrentModificationError(this);
+        throw ConcurrentModificationError(this);
       }
       current = current._next;
     } while (!identical(current, _first));
@@ -146,7 +130,7 @@
   /// updates the [_first] field to point to the [newEntry] as first entry.
   void _insertBefore(E entry, E newEntry, {bool updateFirst}) {
     if (newEntry.list != null) {
-      throw new StateError('LinkedListEntry is already in a LinkedList');
+      throw StateError('LinkedListEntry is already in a LinkedList');
     }
     _modificationCount++;
 
@@ -201,7 +185,7 @@
 
   bool moveNext() {
     if (_modificationCount != _list._modificationCount) {
-      throw new ConcurrentModificationError(this);
+      throw ConcurrentModificationError(this);
     }
     if (_list.isEmpty || (_visitedFirst && identical(_next, _list.first))) {
       _current = null;
@@ -214,79 +198,65 @@
   }
 }
 
-/**
- * An object that can be an element in a [LinkedList].
- *
- * All elements of a `LinkedList` must extend this class.
- * The class provides the internal links that link elements together
- * in the `LinkedList`, and a reference to the linked list itself
- * that an element is currently part of.
- *
- * An entry can be in at most one linked list at a time.
- * While an entry is in a linked list, the [list] property points to that
- * linked list, and otherwise the `list` property is `null`.
- *
- * When created, an entry is not in any linked list.
- */
+/// An object that can be an element in a [LinkedList].
+///
+/// All elements of a `LinkedList` must extend this class.
+/// The class provides the internal links that link elements together
+/// in the `LinkedList`, and a reference to the linked list itself
+/// that an element is currently part of.
+///
+/// An entry can be in at most one linked list at a time.
+/// While an entry is in a linked list, the [list] property points to that
+/// linked list, and otherwise the `list` property is `null`.
+///
+/// When created, an entry is not in any linked list.
 abstract class LinkedListEntry<E extends LinkedListEntry<E>> {
   LinkedList<E> _list;
   E _next;
   E _previous;
 
-  /**
-   * Get the linked list containing this element.
-   *
-   * Returns `null` if this entry is not currently in any list.
-   */
+  /// Get the linked list containing this element.
+  ///
+  /// Returns `null` if this entry is not currently in any list.
   LinkedList<E> get list => _list;
 
-  /**
-   * Unlink the element from its linked list.
-   *
-   * The entry must currently be in a linked list when this method is called.
-   */
+  /// Unlink the element from its linked list.
+  ///
+  /// The entry must currently be in a linked list when this method is called.
   void unlink() {
     _list._unlink(this);
   }
 
-  /**
-   * Return the successor of this element in its linked list.
-   *
-   * Returns `null` if there is no successor in the linked list, or if this
-   * entry is not currently in any list.
-   */
+  /// Return the successor of this element in its linked list.
+  ///
+  /// Returns `null` if there is no successor in the linked list, or if this
+  /// entry is not currently in any list.
   E get next {
     if (_list == null || identical(_list.first, _next)) return null;
     return _next;
   }
 
-  /**
-   * Return the predecessor of this element in its linked list.
-   *
-   * Returns `null` if there is no predecessor in the linked list, or if this
-   * entry is not currently in any list.
-   */
+  /// Return the predecessor of this element in its linked list.
+  ///
+  /// Returns `null` if there is no predecessor in the linked list, or if this
+  /// entry is not currently in any list.
   E get previous {
     if (_list == null || identical(this, _list.first)) return null;
     return _previous;
   }
 
-  /**
-   * Insert an element after this element in this element's linked list.
-   *
-   * This entry must be in a linked list when this method is called.
-   * The [entry] must not be in a linked list.
-   */
+  /// Insert an element after this element in this element's linked list.
+  ///
+  /// This entry must be in a linked list when this method is called.
+  /// The [entry] must not be in a linked list.
   void insertAfter(E entry) {
     _list._insertBefore(_next, entry, updateFirst: false);
   }
 
-  /**
-   * Insert an element before this element in this element's linked list.
-   *
-   * This entry must be in a linked list when this method is called.
-   * The [entry] must not be in a linked list.
-   */
+  /// Insert an element before this element in this element's linked list.
+  ///
+  /// This entry must be in a linked list when this method is called.
+  /// The [entry] must not be in a linked list.
   void insertBefore(E entry) {
     _list._insertBefore(this, entry, updateFirst: true);
   }
diff --git a/sdk/lib/collection/list.dart b/sdk/lib/collection/list.dart
index 0c01350..77ce66a 100644
--- a/sdk/lib/collection/list.dart
+++ b/sdk/lib/collection/list.dart
@@ -4,70 +4,65 @@
 
 part of dart.collection;
 
-/**
- * Abstract implementation of a list.
- *
- * `ListBase` can be used as a base class for implementing the `List` interface.
- *
- * All operations are defined in terms of `length`, `operator[]`,
- * `operator[]=` and `length=`, which need to be implemented.
- *
- * *NOTICE*: Forwarding just these four operations to a normal growable [List]
- * (as created by `new List()`) will give very bad performance for `add` and
- * `addAll` operations of `ListBase`. These operations are implemented by
- * increasing the length of the list by one for each `add` operation, and
- * repeatedly increasing the length of a growable list is not efficient.
- * To avoid this, either override 'add' and 'addAll' to also forward directly
- * to the growable list, or, preferably, use `DelegatingList` from
- * "package:collection/wrappers.dart" instead.
- */
+/// Abstract implementation of a list.
+///
+/// `ListBase` can be used as a base class for implementing the `List`
+/// interface.
+///
+/// All operations are defined in terms of `length`, `operator[]`,
+/// `operator[]=` and `length=`, which need to be implemented.
+///
+/// *NOTICE*: Forwarding just these four operations to a normal growable [List]
+/// (as created by `new List()`) will give very bad performance for `add` and
+/// `addAll` operations of `ListBase`. These operations are implemented by
+/// increasing the length of the list by one for each `add` operation, and
+/// repeatedly increasing the length of a growable list is not efficient.
+/// To avoid this, either override 'add' and 'addAll' to also forward directly
+/// to the growable list, or, preferably, use `DelegatingList` from
+/// "package:collection/wrappers.dart" instead.
 abstract class ListBase<E> extends Object with ListMixin<E> {
-  /**
-   * Convert a `List` to a string as `[each, element, as, string]`.
-   *
-   * Handles circular references where converting one of the elements
-   * to a string ends up converting [list] to a string again.
-   */
+  /// Convert a `List` to a string as `[each, element, as, string]`.
+  ///
+  /// Handles circular references where converting one of the elements
+  /// to a string ends up converting [list] to a string again.
   static String listToString(List list) =>
       IterableBase.iterableToFullString(list, '[', ']');
 }
 
-/**
- * Base implementation of a [List] class.
- *
- * `ListMixin` can be used as a mixin to make a class implement
- * the `List` interface.
- *
- * This implements all read operations using only the `length` and
- * `operator[]` members. It implements write operations using those and
- * `length=` and `operator[]=`
- *
- * *NOTICE*: Forwarding just these four operations to a normal growable [List]
- * (as created by `new List()`) will give very bad performance for `add` and
- * `addAll` operations of `ListBase`. These operations are implemented by
- * increasing the length of the list by one for each `add` operation, and
- * repeatedly increasing the length of a growable list is not efficient.
- * To avoid this, either override 'add' and 'addAll' to also forward directly
- * to the growable list, or, if possible, use `DelegatingList` from
- * "package:collection/wrappers.dart" instead.
- */
+/// Base implementation of a [List] class.
+///
+/// `ListMixin` can be used as a mixin to make a class implement
+/// the `List` interface.
+///
+/// This implements all read operations using only the `length` and
+/// `operator[]` members. It implements write operations using those and
+/// `length=` and `operator[]=`
+///
+/// *NOTICE*: Forwarding just these four operations to a normal growable [List]
+/// (as created by `new List()`) will give very bad performance for `add` and
+/// `addAll` operations of `ListBase`. These operations are implemented by
+/// increasing the length of the list by one for each `add` operation, and
+/// repeatedly increasing the length of a growable list is not efficient.
+/// To avoid this, either override 'add' and 'addAll' to also forward directly
+/// to the growable list, or, if possible, use `DelegatingList` from
+/// "package:collection/wrappers.dart" instead.
 abstract class ListMixin<E> implements List<E> {
   // Iterable interface.
   // TODO(lrn): When we get composable mixins, reuse IterableMixin instead
   // of redaclating everything.
-  Iterator<E> get iterator => new ListIterator<E>(this);
+  Iterator<E> get iterator => ListIterator<E>(this);
 
   E elementAt(int index) => this[index];
 
   Iterable<E> followedBy(Iterable<E> other) =>
-      new FollowedByIterable<E>.firstEfficient(this, other);
+      FollowedByIterable<E>.firstEfficient(this, other);
 
   void forEach(void action(E element)) {
     int length = this.length;
     for (int i = 0; i < length; i++) {
       action(this[i]);
       if (length != this.length) {
-        throw new ConcurrentModificationError(this);
+        throw ConcurrentModificationError(this);
       }
     }
   }
@@ -107,7 +102,7 @@
     for (int i = 0; i < length; i++) {
       if (this[i] == element) return true;
       if (length != this.length) {
-        throw new ConcurrentModificationError(this);
+        throw ConcurrentModificationError(this);
       }
     }
     return false;
@@ -118,7 +113,7 @@
     for (int i = 0; i < length; i++) {
       if (!test(this[i])) return false;
       if (length != this.length) {
-        throw new ConcurrentModificationError(this);
+        throw ConcurrentModificationError(this);
       }
     }
     return true;
@@ -129,7 +124,7 @@
     for (int i = 0; i < length; i++) {
       if (test(this[i])) return true;
       if (length != this.length) {
-        throw new ConcurrentModificationError(this);
+        throw ConcurrentModificationError(this);
       }
     }
     return false;
@@ -141,7 +136,7 @@
       E element = this[i];
       if (test(element)) return element;
       if (length != this.length) {
-        throw new ConcurrentModificationError(this);
+        throw ConcurrentModificationError(this);
       }
     }
     if (orElse != null) return orElse();
@@ -154,7 +149,7 @@
       E element = this[i];
       if (test(element)) return element;
       if (length != this.length) {
-        throw new ConcurrentModificationError(this);
+        throw ConcurrentModificationError(this);
       }
     }
     if (orElse != null) return orElse();
@@ -175,7 +170,7 @@
         match = element;
       }
       if (length != this.length) {
-        throw new ConcurrentModificationError(this);
+        throw ConcurrentModificationError(this);
       }
     }
     if (matchFound) return match;
@@ -185,18 +180,18 @@
 
   String join([String separator = ""]) {
     if (length == 0) return "";
-    StringBuffer buffer = new StringBuffer()..writeAll(this, separator);
+    StringBuffer buffer = StringBuffer()..writeAll(this, separator);
     return buffer.toString();
   }
 
-  Iterable<E> where(bool test(E element)) => new WhereIterable<E>(this, test);
+  Iterable<E> where(bool test(E element)) => WhereIterable<E>(this, test);
 
-  Iterable<T> whereType<T>() => new WhereTypeIterable<T>(this);
+  Iterable<T> whereType<T>() => WhereTypeIterable<T>(this);
 
-  Iterable<T> map<T>(T f(E element)) => new MappedListIterable<E, T>(this, f);
+  Iterable<T> map<T>(T f(E element)) => MappedListIterable<E, T>(this, f);
 
   Iterable<T> expand<T>(Iterable<T> f(E element)) =>
-      new ExpandIterable<E, T>(this, f);
+      ExpandIterable<E, T>(this, f);
 
   E reduce(E combine(E previousValue, E element)) {
     int length = this.length;
@@ -205,7 +200,7 @@
     for (int i = 1; i < length; i++) {
       value = combine(value, this[i]);
       if (length != this.length) {
-        throw new ConcurrentModificationError(this);
+        throw ConcurrentModificationError(this);
       }
     }
     return value;
@@ -217,30 +212,30 @@
     for (int i = 0; i < length; i++) {
       value = combine(value, this[i]);
       if (length != this.length) {
-        throw new ConcurrentModificationError(this);
+        throw ConcurrentModificationError(this);
       }
     }
     return value;
   }
 
-  Iterable<E> skip(int count) => new SubListIterable<E>(this, count, null);
+  Iterable<E> skip(int count) => SubListIterable<E>(this, count, null);
 
   Iterable<E> skipWhile(bool test(E element)) {
-    return new SkipWhileIterable<E>(this, test);
+    return SkipWhileIterable<E>(this, test);
   }
 
-  Iterable<E> take(int count) => new SubListIterable<E>(this, 0, count);
+  Iterable<E> take(int count) => SubListIterable<E>(this, 0, count);
 
   Iterable<E> takeWhile(bool test(E element)) {
-    return new TakeWhileIterable<E>(this, test);
+    return TakeWhileIterable<E>(this, test);
   }
 
-  List<E> toList({bool growable: true}) {
+  List<E> toList({bool growable = true}) {
     List<E> result;
     if (growable) {
       result = <E>[]..length = length;
     } else {
-      result = new List<E>(length);
+      result = List<E>(length);
     }
     for (int i = 0; i < length; i++) {
       result[i] = this[i];
@@ -249,7 +244,7 @@
   }
 
   Set<E> toSet() {
-    Set<E> result = new Set<E>();
+    Set<E> result = Set<E>();
     for (int i = 0; i < length; i++) {
       result.add(this[i]);
     }
@@ -264,7 +259,7 @@
   void addAll(Iterable<E> iterable) {
     int i = this.length;
     for (E element in iterable) {
-      assert(this.length == i || (throw new ConcurrentModificationError(this)));
+      assert(this.length == i || (throw ConcurrentModificationError(this)));
       this.length = i + 1;
       this[i] = element;
       i++;
@@ -312,7 +307,7 @@
         retained.add(element);
       }
       if (length != this.length) {
-        throw new ConcurrentModificationError(this);
+        throw ConcurrentModificationError(this);
       }
     }
     if (retained.length != this.length) {
@@ -346,7 +341,7 @@
   }
 
   void shuffle([Random random]) {
-    random ??= new Random();
+    random ??= Random();
     int length = this.length;
     while (length > 1) {
       int pos = random.nextInt(length);
@@ -358,7 +353,7 @@
   }
 
   Map<int, E> asMap() {
-    return new ListMapView<E>(this);
+    return ListMapView<E>(this);
   }
 
   List<E> operator +(List<E> other) {
@@ -382,7 +377,7 @@
 
   Iterable<E> getRange(int start, int end) {
     RangeError.checkValidRange(start, end, this.length);
-    return new SubListIterable<E>(this, start, end);
+    return SubListIterable<E>(this, start, end);
   }
 
   void removeRange(int start, int end) {
@@ -517,7 +512,7 @@
       // If the iterable's length is linked to this list's length somehow,
       // we can't insert one in the other.
       this.length -= insertionLength;
-      throw new ConcurrentModificationError(iterable);
+      throw ConcurrentModificationError(iterable);
     }
     setRange(index + insertionLength, this.length, this, index);
     setAll(index, iterable);
@@ -533,7 +528,7 @@
     }
   }
 
-  Iterable<E> get reversed => new ReversedListIterable<E>(this);
+  Iterable<E> get reversed => ReversedListIterable<E>(this);
 
   String toString() => IterableBase.iterableToFullString(this, '[', ']');
 }
diff --git a/sdk/lib/collection/maps.dart b/sdk/lib/collection/maps.dart
index f54404f..8159342 100644
--- a/sdk/lib/collection/maps.dart
+++ b/sdk/lib/collection/maps.dart
@@ -4,22 +4,20 @@
 
 part of dart.collection;
 
-/**
- * Base class for implementing a [Map].
- *
- * This class has a basic implementation of all but five of the members of
- * [Map].
- * A basic `Map` class can be implemented by extending this class and
- * implementing `keys`, `operator[]`, `operator[]=`, `remove` and `clear`.
- * The remaining operations are implemented in terms of these five.
- *
- * The `keys` iterable should have efficient [Iterable.length] and
- * [Iterable.contains] operations, and it should catch concurrent modifications
- * of the keys while iterating.
- *
- * A more efficient implementation is usually possible by overriding
- * some of the other members as well.
- */
+/// Base class for implementing a [Map].
+///
+/// This class has a basic implementation of all but five of the members of
+/// [Map].
+/// A basic `Map` class can be implemented by extending this class and
+/// implementing `keys`, `operator[]`, `operator[]=`, `remove` and `clear`.
+/// The remaining operations are implemented in terms of these five.
+///
+/// The `keys` iterable should have efficient [Iterable.length] and
+/// [Iterable.contains] operations, and it should catch concurrent modifications
+/// of the keys while iterating.
+///
+/// A more efficient implementation is usually possible by overriding
+/// some of the other members as well.
 abstract class MapBase<K, V> extends MapMixin<K, V> {
   static String mapToString(Map m) {
     // Reuses the list in IterableBase for detecting toString cycles.
@@ -27,7 +25,7 @@
       return '{...}';
     }
 
-    var result = new StringBuffer();
+    var result = StringBuffer();
     try {
       _toStringVisiting.add(m);
       result.write('{');
@@ -52,12 +50,10 @@
 
   static _id(x) => x;
 
-  /**
-   * Fills a [Map] with key/value pairs computed from [iterable].
-   *
-   * This method is used by [Map] classes in the named constructor
-   * `fromIterable`.
-   */
+  /// Fills a [Map] with key/value pairs computed from [iterable].
+  ///
+  /// This method is used by [Map] classes in the named constructor
+  /// `fromIterable`.
   static void _fillMapWithMappedIterable(
       Map map, Iterable iterable, key(element), value(element)) {
     key ??= _id;
@@ -68,12 +64,10 @@
     }
   }
 
-  /**
-   * Fills a map by associating the [keys] to [values].
-   *
-   * This method is used by [Map] classes in the named constructor
-   * `fromIterables`.
-   */
+  /// Fills a map by associating the [keys] to [values].
+  ///
+  /// This method is used by [Map] classes in the named constructor
+  /// `fromIterables`.
   static void _fillMapWithIterables(Map map, Iterable keys, Iterable values) {
     Iterator keyIterator = keys.iterator;
     Iterator valueIterator = values.iterator;
@@ -88,27 +82,25 @@
     }
 
     if (hasNextKey || hasNextValue) {
-      throw new ArgumentError("Iterables do not have same length.");
+      throw ArgumentError("Iterables do not have same length.");
     }
   }
 }
 
-/**
- * Mixin implementing a [Map].
- *
- * This mixin has a basic implementation of all but five of the members of
- * [Map].
- * A basic `Map` class can be implemented by mixin in this class and
- * implementing `keys`, `operator[]`, `operator[]=`, `remove` and `clear`.
- * The remaining operations are implemented in terms of these five.
- *
- * The `keys` iterable should have efficient [Iterable.length] and
- * [Iterable.contains] operations, and it should catch concurrent modifications
- * of the keys while iterating.
- *
- * A more efficient implementation is usually possible by overriding
- * some of the other members as well.
- */
+/// Mixin implementing a [Map].
+///
+/// This mixin has a basic implementation of all but five of the members of
+/// [Map].
+/// A basic `Map` class can be implemented by mixin in this class and
+/// implementing `keys`, `operator[]`, `operator[]=`, `remove` and `clear`.
+/// The remaining operations are implemented in terms of these five.
+///
+/// The `keys` iterable should have efficient [Iterable.length] and
+/// [Iterable.contains] operations, and it should catch concurrent modifications
+/// of the keys while iterating.
+///
+/// A more efficient implementation is usually possible by overriding
+/// some of the other members as well.
 abstract class MapMixin<K, V> implements Map<K, V> {
   Iterable<K> get keys;
   V operator [](Object key);
@@ -152,7 +144,7 @@
     if (ifAbsent != null) {
       return this[key] = ifAbsent();
     }
-    throw new ArgumentError.value(key, "key", "Key not in map.");
+    throw ArgumentError.value(key, "key", "Key not in map.");
   }
 
   void updateAll(V update(K key, V value)) {
@@ -162,7 +154,7 @@
   }
 
   Iterable<MapEntry<K, V>> get entries {
-    return keys.map((K key) => new MapEntry<K, V>(key, this[key]));
+    return keys.map((K key) => MapEntry<K, V>(key, this[key]));
   }
 
   Map<K2, V2> map<K2, V2>(MapEntry<K2, V2> transform(K key, V value)) {
@@ -194,39 +186,35 @@
   int get length => keys.length;
   bool get isEmpty => keys.isEmpty;
   bool get isNotEmpty => keys.isNotEmpty;
-  Iterable<V> get values => new _MapBaseValueIterable<K, V>(this);
+  Iterable<V> get values => _MapBaseValueIterable<K, V>(this);
   String toString() => MapBase.mapToString(this);
 }
 
-/**
- * Basic implementation of an unmodifiable [Map].
- *
- * This class has a basic implementation of all but two of the members of
- * an umodifiable [Map].
- * A simple unmodifiable `Map` class can be implemented by extending this
- * class and implementing `keys` and `operator[]`.
- *
- * Modifying operations throw when used.
- * The remaining non-modifying operations are implemented in terms of `keys`
- * and `operator[]`.
- *
- * The `keys` iterable should have efficient [Iterable.length] and
- * [Iterable.contains] operations, and it should catch concurrent modifications
- * of the keys while iterating.
- *
- * A more efficient implementation is usually possible by overriding
- * some of the other members as well.
- */
+/// Basic implementation of an unmodifiable [Map].
+///
+/// This class has a basic implementation of all but two of the members of
+/// an umodifiable [Map].
+/// A simple unmodifiable `Map` class can be implemented by extending this
+/// class and implementing `keys` and `operator[]`.
+///
+/// Modifying operations throw when used.
+/// The remaining non-modifying operations are implemented in terms of `keys`
+/// and `operator[]`.
+///
+/// The `keys` iterable should have efficient [Iterable.length] and
+/// [Iterable.contains] operations, and it should catch concurrent modifications
+/// of the keys while iterating.
+///
+/// A more efficient implementation is usually possible by overriding
+/// some of the other members as well.
 abstract class UnmodifiableMapBase<K, V> = MapBase<K, V>
     with _UnmodifiableMapMixin<K, V>;
 
-/**
- * Implementation of [Map.values] based on the map and its [Map.keys] iterable.
- *
- * Iterable that iterates over the values of a `Map`.
- * It accesses the values by iterating over the keys of the map, and using the
- * map's `operator[]` to lookup the keys.
- */
+/// Implementation of [Map.values] based on the map and its [Map.keys] iterable.
+///
+/// Iterable that iterates over the values of a `Map`.
+/// It accesses the values by iterating over the keys of the map, and using the
+/// map's `operator[]` to lookup the keys.
 class _MapBaseValueIterable<K, V> extends EfficientLengthIterable<V> {
   final Map<K, V> _map;
   _MapBaseValueIterable(this._map);
@@ -238,15 +226,13 @@
   V get single => _map[_map.keys.single];
   V get last => _map[_map.keys.last];
 
-  Iterator<V> get iterator => new _MapBaseValueIterator<K, V>(_map);
+  Iterator<V> get iterator => _MapBaseValueIterator<K, V>(_map);
 }
 
-/**
- * Iterator created by [_MapBaseValueIterable].
- *
- * Iterates over the values of a map by iterating its keys and lookup up the
- * values.
- */
+/// Iterator created by [_MapBaseValueIterable].
+///
+/// Iterates over the values of a map by iterating its keys and lookup up the
+/// values.
 class _MapBaseValueIterator<K, V> implements Iterator<V> {
   final Iterator<K> _keys;
   final Map<K, V> _map;
@@ -268,64 +254,62 @@
   V get current => _current;
 }
 
-/**
- * Mixin that overrides mutating map operations with implementations that throw.
- */
+/// Mixin that overrides mutating map operations with implementations that
+/// throw.
 abstract class _UnmodifiableMapMixin<K, V> implements Map<K, V> {
-  /** This operation is not supported by an unmodifiable map. */
+  /// This operation is not supported by an unmodifiable map.
   void operator []=(K key, V value) {
-    throw new UnsupportedError("Cannot modify unmodifiable map");
+    throw UnsupportedError("Cannot modify unmodifiable map");
   }
 
-  /** This operation is not supported by an unmodifiable map. */
+  /// This operation is not supported by an unmodifiable map.
   void addAll(Map<K, V> other) {
-    throw new UnsupportedError("Cannot modify unmodifiable map");
+    throw UnsupportedError("Cannot modify unmodifiable map");
   }
 
-  /** This operation is not supported by an unmodifiable map. */
+  /// This operation is not supported by an unmodifiable map.
   void addEntries(Iterable<MapEntry<K, V>> entries) {
-    throw new UnsupportedError("Cannot modify unmodifiable map");
+    throw UnsupportedError("Cannot modify unmodifiable map");
   }
 
-  /** This operation is not supported by an unmodifiable map. */
+  /// This operation is not supported by an unmodifiable map.
   void clear() {
-    throw new UnsupportedError("Cannot modify unmodifiable map");
+    throw UnsupportedError("Cannot modify unmodifiable map");
   }
 
-  /** This operation is not supported by an unmodifiable map. */
+  /// This operation is not supported by an unmodifiable map.
   V remove(Object key) {
-    throw new UnsupportedError("Cannot modify unmodifiable map");
+    throw UnsupportedError("Cannot modify unmodifiable map");
   }
 
-  /** This operation is not supported by an unmodifiable map. */
+  /// This operation is not supported by an unmodifiable map.
   void removeWhere(bool test(K key, V value)) {
-    throw new UnsupportedError("Cannot modify unmodifiable map");
+    throw UnsupportedError("Cannot modify unmodifiable map");
   }
 
-  /** This operation is not supported by an unmodifiable map. */
+  /// This operation is not supported by an unmodifiable map.
   V putIfAbsent(K key, V ifAbsent()) {
-    throw new UnsupportedError("Cannot modify unmodifiable map");
+    throw UnsupportedError("Cannot modify unmodifiable map");
   }
 
-  /** This operation is not supported by an unmodifiable map. */
+  /// This operation is not supported by an unmodifiable map.
   V update(K key, V update(V value), {V ifAbsent()}) {
-    throw new UnsupportedError("Cannot modify unmodifiable map");
+    throw UnsupportedError("Cannot modify unmodifiable map");
   }
 
-  /** This operation is not supported by an unmodifiable map. */
+  /// This operation is not supported by an unmodifiable map.
   void updateAll(V update(K key, V value)) {
-    throw new UnsupportedError("Cannot modify unmodifiable map");
+    throw UnsupportedError("Cannot modify unmodifiable map");
   }
 }
 
-/**
- * Wrapper around a class that implements [Map] that only exposes `Map` members.
- *
- * A simple wrapper that delegates all `Map` members to the map provided in the
- * constructor.
- *
- * Base for delegating map implementations like [UnmodifiableMapView].
- */
+/// Wrapper around a class that implements [Map] that only exposes `Map`
+/// members.
+///
+/// A simple wrapper that delegates all `Map` members to the map provided in the
+/// constructor.
+///
+/// Base for delegating map implementations like [UnmodifiableMapView].
 class MapView<K, V> implements Map<K, V> {
   final Map<K, V> _map;
   const MapView(Map<K, V> map) : _map = map;
@@ -380,17 +364,15 @@
   }
 }
 
-/**
- * View of a [Map] that disallow modifying the map.
- *
- * A wrapper around a `Map` that forwards all members to the map provided in
- * the constructor, except for operations that modify the map.
- * Modifying operations throw instead.
- */
+/// View of a [Map] that disallow modifying the map.
+///
+/// A wrapper around a `Map` that forwards all members to the map provided in
+/// the constructor, except for operations that modify the map.
+/// Modifying operations throw instead.
 class UnmodifiableMapView<K, V> extends MapView<K, V>
     with _UnmodifiableMapMixin<K, V> {
   UnmodifiableMapView(Map<K, V> map) : super(map);
 
   Map<RK, RV> cast<RK, RV>() =>
-      new UnmodifiableMapView<RK, RV>(_map.cast<RK, RV>());
+      UnmodifiableMapView<RK, RV>(_map.cast<RK, RV>());
 }
diff --git a/sdk/lib/collection/queue.dart b/sdk/lib/collection/queue.dart
index 7f82357..62994b9 100644
--- a/sdk/lib/collection/queue.dart
+++ b/sdk/lib/collection/queue.dart
@@ -4,140 +4,108 @@
 
 part of dart.collection;
 
-/**
- * A [Queue] is a collection that can be manipulated at both ends. One
- * can iterate over the elements of a queue through [forEach] or with
- * an [Iterator].
- *
- * It is generally not allowed to modify the queue (add or remove entries) while
- * an operation on the queue is being performed, for example during a call to
- * [forEach].
- * Modifying the queue while it is being iterated will most likely break the
- * iteration.
- * This goes both for using the [iterator] directly, or for iterating an
- * `Iterable` returned by a method like [map] or [where].
- */
+/// A [Queue] is a collection that can be manipulated at both ends. One
+/// can iterate over the elements of a queue through [forEach] or with
+/// an [Iterator].
+///
+/// It is generally not allowed to modify the queue (add or remove entries)
+/// while an operation on the queue is being performed, for example during a
+/// call to [forEach].
+/// Modifying the queue while it is being iterated will most likely break the
+/// iteration.
+/// This goes both for using the [iterator] directly, or for iterating an
+/// `Iterable` returned by a method like [map] or [where].
 abstract class Queue<E> implements EfficientLengthIterable<E> {
-  /**
-   * Creates a queue.
-   */
+  /// Creates a queue.
   factory Queue() = ListQueue<E>;
 
-  /**
-   * Creates a queue containing all [elements].
-   *
-   * The element order in the queue is as if the elements were added using
-   * [addLast] in the order provided by [elements.iterator].
-   *
-   * All the [elements] should be instances of [E].
-   * The `elements` iterable itself may have any element type, so this
-   * constructor can be used to down-cast a `Queue`, for example as:
-   * ```dart
-   * Queue<SuperType> superQueue = ...;
-   * Queue<SubType> subQueue =
-   *     new Queue<SubType>.from(superSet.whereType<SubType>());
-   * ```
-   */
+  /// Creates a queue containing all [elements].
+  ///
+  /// The element order in the queue is as if the elements were added using
+  /// [addLast] in the order provided by [elements.iterator].
+  ///
+  /// All the [elements] should be instances of [E].
+  /// The `elements` iterable itself may have any element type, so this
+  /// constructor can be used to down-cast a `Queue`, for example as:
+  /// ```dart
+  /// Queue<SuperType> superQueue = ...;
+  /// Queue<SubType> subQueue =
+  ///     new Queue<SubType>.from(superSet.whereType<SubType>());
+  /// ```
   factory Queue.from(Iterable elements) = ListQueue<E>.from;
 
-  /**
-   * Creates a queue from [elements].
-   *
-   * The element order in the queue is as if the elements were added using
-   * [addLast] in the order provided by [elements.iterator].
-   */
+  /// Creates a queue from [elements].
+  ///
+  /// The element order in the queue is as if the elements were added using
+  /// [addLast] in the order provided by [elements.iterator].
   factory Queue.of(Iterable<E> elements) = ListQueue<E>.of;
 
-  /**
-   * Adapts [source] to be a `Queue<T>`.
-   *
-   * Any time the queue would produce an element that is not a [T],
-   * the element access will throw.
-   *
-   * Any time a [T] value is attempted stored into the adapted queue,
-   * the store will throw unless the value is also an instance of [S].
-   *
-   * If all accessed elements of [source] are actually instances of [T],
-   * and if all elements stored into the returned queue are actually instance
-   * of [S],
-   * then the returned queue can be used as a `Queue<T>`.
-   */
-  static Queue<T> castFrom<S, T>(Queue<S> source) =>
-      new CastQueue<S, T>(source);
+  /// Adapts [source] to be a `Queue<T>`.
+  ///
+  /// Any time the queue would produce an element that is not a [T],
+  /// the element access will throw.
+  ///
+  /// Any time a [T] value is attempted stored into the adapted queue,
+  /// the store will throw unless the value is also an instance of [S].
+  ///
+  /// If all accessed elements of [source] are actually instances of [T],
+  /// and if all elements stored into the returned queue are actually instance
+  /// of [S],
+  /// then the returned queue can be used as a `Queue<T>`.
+  static Queue<T> castFrom<S, T>(Queue<S> source) => CastQueue<S, T>(source);
 
-  /**
-   * Provides a view of this queue as a queue of [R] instances, if necessary.
-   *
-   * If this queue contains only instances of [R], all read operations
-   * will work correctly. If any operation tries to access an element
-   * that is not an instance of [R], the access will throw instead.
-   *
-   * Elements added to the queue (e.g., by using [addFirst] or [addAll])
-   * must be instance of [R] to be valid arguments to the adding function,
-   * and they must be instances of [E] as well to be accepted by
-   * this queue as well.
-   */
+  /// Provides a view of this queue as a queue of [R] instances, if necessary.
+  ///
+  /// If this queue contains only instances of [R], all read operations
+  /// will work correctly. If any operation tries to access an element
+  /// that is not an instance of [R], the access will throw instead.
+  ///
+  /// Elements added to the queue (e.g., by using [addFirst] or [addAll])
+  /// must be instance of [R] to be valid arguments to the adding function,
+  /// and they must be instances of [E] as well to be accepted by
+  /// this queue as well.
   Queue<R> cast<R>();
-  /**
-   * Removes and returns the first element of this queue.
-   *
-   * The queue must not be empty when this method is called.
-   */
+
+  /// Removes and returns the first element of this queue.
+  ///
+  /// The queue must not be empty when this method is called.
   E removeFirst();
 
-  /**
-   * Removes and returns the last element of the queue.
-   *
-   * The queue must not be empty when this method is called.
-   */
+  /// Removes and returns the last element of the queue.
+  ///
+  /// The queue must not be empty when this method is called.
   E removeLast();
 
-  /**
-   * Adds [value] at the beginning of the queue.
-   */
+  /// Adds [value] at the beginning of the queue.
   void addFirst(E value);
 
-  /**
-   * Adds [value] at the end of the queue.
-   */
+  /// Adds [value] at the end of the queue.
   void addLast(E value);
 
-  /**
-   * Adds [value] at the end of the queue.
-   */
+  /// Adds [value] at the end of the queue.
   void add(E value);
 
-  /**
-   * Remove a single instance of [value] from the queue.
-   *
-   * Returns `true` if a value was removed, or `false` if the queue
-   * contained no element equal to [value].
-   */
+  /// Remove a single instance of [value] from the queue.
+  ///
+  /// Returns `true` if a value was removed, or `false` if the queue
+  /// contained no element equal to [value].
   bool remove(Object value);
 
-  /**
-   * Adds all elements of [iterable] at the end of the queue. The
-   * length of the queue is extended by the length of [iterable].
-   */
+  /// Adds all elements of [iterable] at the end of the queue. The
+  /// length of the queue is extended by the length of [iterable].
   void addAll(Iterable<E> iterable);
 
-  /**
-   * Removes all elements matched by [test] from the queue.
-   *
-   * The `test` function must not throw or modify the queue.
-   */
+  /// Removes all elements matched by [test] from the queue.
+  ///
+  /// The `test` function must not throw or modify the queue.
   void removeWhere(bool test(E element));
 
-  /**
-   * Removes all elements not matched by [test] from the queue.
-   *
-   * The `test` function must not throw or modify the queue.
-   */
+  /// Removes all elements not matched by [test] from the queue.
+  ///
+  /// The `test` function must not throw or modify the queue.
   void retainWhere(bool test(E element));
 
-  /**
-   * Removes all elements in the queue. The size of the queue becomes zero.
-   */
+  /// Removes all elements in the queue. The size of the queue becomes zero.
   void clear();
 }
 
@@ -160,10 +128,8 @@
   }
 }
 
-/**
- * An entry in a doubly linked list. It contains a pointer to the next
- * entry, the previous entry, and the boxed element.
- */
+/// An entry in a doubly linked list. It contains a pointer to the next
+/// entry, the previous entry, and the boxed element.
 class DoubleLinkedQueueEntry<E> extends _DoubleLink<DoubleLinkedQueueEntry<E>> {
   /// The element in the queue.
   E element;
@@ -172,12 +138,12 @@
 
   /// Appends the given [e] as entry just after this entry.
   void append(E e) {
-    new DoubleLinkedQueueEntry<E>(e)._link(this, _nextLink);
+    DoubleLinkedQueueEntry<E>(e)._link(this, _nextLink);
   }
 
   /// Prepends the given [e] as entry just before this entry.
   void prepend(E e) {
-    new DoubleLinkedQueueEntry<E>(e)._link(_previousLink, this);
+    DoubleLinkedQueueEntry<E>(e)._link(_previousLink, this);
   }
 
   E remove() {
@@ -192,14 +158,12 @@
   DoubleLinkedQueueEntry<E> nextEntry() => _nextLink;
 }
 
-/**
- * Interface for the link classes used by [DoubleLinkedQueue].
- *
- * Both the [_DoubleLinkedQueueElement] and [_DoubleLinkedQueueSentinel]
- * implement this interface.
- * The entry contains a link back to the queue, so calling `append`
- * or `prepend` can correctly update the element count.
- */
+/// Interface for the link classes used by [DoubleLinkedQueue].
+///
+/// Both the [_DoubleLinkedQueueElement] and [_DoubleLinkedQueueSentinel]
+/// implement this interface.
+/// The entry contains a link back to the queue, so calling `append`
+/// or `prepend` can correctly update the element count.
 abstract class _DoubleLinkedQueueEntry<E> extends DoubleLinkedQueueEntry<E> {
   DoubleLinkedQueue<E> _queue;
   _DoubleLinkedQueueEntry(E element, this._queue) : super(element);
@@ -207,11 +171,11 @@
   DoubleLinkedQueueEntry<E> _asNonSentinelEntry();
 
   void _append(E e) {
-    new _DoubleLinkedQueueElement<E>(e, _queue)._link(this, _nextLink);
+    _DoubleLinkedQueueElement<E>(e, _queue)._link(this, _nextLink);
   }
 
   void _prepend(E e) {
-    new _DoubleLinkedQueueElement<E>(e, _queue)._link(_previousLink, this);
+    _DoubleLinkedQueueElement<E>(e, _queue)._link(_previousLink, this);
   }
 
   E _remove();
@@ -229,12 +193,10 @@
   }
 }
 
-/**
- * The actual entry type used by the [DoubleLinkedQueue].
- *
- * The entry contains a reference to the queue, allowing
- * [append]/[prepend] to update the list length.
- */
+/// The actual entry type used by the [DoubleLinkedQueue].
+///
+/// The entry contains a reference to the queue, allowing
+/// [append]/[prepend] to update the list length.
 class _DoubleLinkedQueueElement<E> extends _DoubleLinkedQueueEntry<E> {
   _DoubleLinkedQueueElement(E element, DoubleLinkedQueue<E> queue)
       : super(element, queue);
@@ -265,14 +227,12 @@
   }
 }
 
-/**
- * A sentinel in a double linked list is used to manipulate the list
- * at both ends.
- * A double linked list has exactly one sentinel,
- * which is the only entry when the list is constructed.
- * Initially, a sentinel has its next and previous entry point to itself.
- * A sentinel does not box any user element.
- */
+/// A sentinel in a double linked list is used to manipulate the list
+/// at both ends.
+/// A double linked list has exactly one sentinel,
+/// which is the only entry when the list is constructed.
+/// Initially, a sentinel has its next and previous entry point to itself.
+/// A sentinel does not box any user element.
 class _DoubleLinkedQueueSentinel<E> extends _DoubleLinkedQueueEntry<E> {
   _DoubleLinkedQueueSentinel(DoubleLinkedQueue<E> queue) : super(null, queue) {
     _previousLink = this;
@@ -283,61 +243,55 @@
     return null;
   }
 
-  /** Hit by, e.g., [DoubleLinkedQueue.removeFirst] if the queue is empty. */
+  /// Hit by, e.g., [DoubleLinkedQueue.removeFirst] if the queue is empty.
   E _remove() {
     throw IterableElementError.noElement();
   }
 
-  /** Hit by, e.g., [DoubleLinkedQueue.first] if the queue is empty. */
+  /// Hit by, e.g., [DoubleLinkedQueue.first] if the queue is empty.
   E get _element {
     throw IterableElementError.noElement();
   }
 }
 
-/**
- * A [Queue] implementation based on a double-linked list.
- *
- * Allows constant time add, remove-at-ends and peek operations.
- */
+/// A [Queue] implementation based on a double-linked list.
+///
+/// Allows constant time add, remove-at-ends and peek operations.
 class DoubleLinkedQueue<E> extends Iterable<E> implements Queue<E> {
   _DoubleLinkedQueueSentinel<E> _sentinel;
   int _elementCount = 0;
 
   DoubleLinkedQueue() {
-    _sentinel = new _DoubleLinkedQueueSentinel<E>(this);
+    _sentinel = _DoubleLinkedQueueSentinel<E>(this);
   }
 
-  /**
-   * Creates a double-linked queue containing all [elements].
-   *
-   * The element order in the queue is as if the elements were added using
-   * [addLast] in the order provided by [elements.iterator].
-   *
-   * All the [elements] should be instances of [E].
-   * The `elements` iterable itself may have any element type, so this
-   * constructor can be used to down-cast a `Queue`, for example as:
-   * ```dart
-   * Queue<SuperType> superQueue = ...;
-   * Queue<SubType> subQueue =
-   *     new DoubleLinkedQueue<SubType>.from(superQueue.whereType<SubType>());
-   * ```
-   */
+  /// Creates a double-linked queue containing all [elements].
+  ///
+  /// The element order in the queue is as if the elements were added using
+  /// [addLast] in the order provided by [elements.iterator].
+  ///
+  /// All the [elements] should be instances of [E].
+  /// The `elements` iterable itself may have any element type, so this
+  /// constructor can be used to down-cast a `Queue`, for example as:
+  /// ```dart
+  /// Queue<SuperType> superQueue = ...;
+  /// Queue<SubType> subQueue =
+  ///     new DoubleLinkedQueue<SubType>.from(superQueue.whereType<SubType>());
+  /// ```
   factory DoubleLinkedQueue.from(Iterable elements) {
-    Queue<E> list = new DoubleLinkedQueue<E>();
+    Queue<E> list = DoubleLinkedQueue<E>();
     for (final e in elements) {
       list.addLast(e);
     }
     return list;
   }
 
-  /**
-   * Creates a double-linked queue from [elements].
-   *
-   * The element order in the queue is as if the elements were added using
-   * [addLast] in the order provided by [elements.iterator].
-   */
+  /// Creates a double-linked queue from [elements].
+  ///
+  /// The element order in the queue is as if the elements were added using
+  /// [addLast] in the order provided by [elements.iterator].
   factory DoubleLinkedQueue.of(Iterable<E> elements) =>
-      new DoubleLinkedQueue<E>()..addAll(elements);
+      DoubleLinkedQueue<E>()..addAll(elements);
 
   Queue<R> cast<R>() => Queue.castFrom<E, R>(this);
   int get length => _elementCount;
@@ -384,7 +338,7 @@
       bool equals = (entry._element == o);
       if (!identical(this, entry._queue)) {
         // Entry must still be in the queue.
-        throw new ConcurrentModificationError(this);
+        throw ConcurrentModificationError(this);
       }
       if (equals) {
         entry._remove();
@@ -402,7 +356,7 @@
       bool matches = test(entry._element);
       if (!identical(this, entry._queue)) {
         // Entry must still be in the queue.
-        throw new ConcurrentModificationError(this);
+        throw ConcurrentModificationError(this);
       }
       _DoubleLinkedQueueEntry<E> next = entry._nextLink; // Cannot be null.
       if (identical(removeMatching, matches)) {
@@ -441,30 +395,26 @@
     throw IterableElementError.tooMany();
   }
 
-  /**
-   * The entry object of the first element in the queue.
-   *
-   * Each element of the queue has an associated [DoubleLinkedQueueEntry].
-   * Returns the entry object corresponding to the first element of the queue.
-   *
-   * The entry objects can also be accessed using [lastEntry],
-   * and they can be iterated using [DoubleLinkedQueueEntry.nextEntry()] and
-   * [DoubleLinkedQueueEntry.previousEntry()].
-   */
+  /// The entry object of the first element in the queue.
+  ///
+  /// Each element of the queue has an associated [DoubleLinkedQueueEntry].
+  /// Returns the entry object corresponding to the first element of the queue.
+  ///
+  /// The entry objects can also be accessed using [lastEntry],
+  /// and they can be iterated using [DoubleLinkedQueueEntry.nextEntry()] and
+  /// [DoubleLinkedQueueEntry.previousEntry()].
   DoubleLinkedQueueEntry<E> firstEntry() {
     return _sentinel.nextEntry();
   }
 
-  /**
-   * The entry object of the last element in the queue.
-   *
-   * Each element of the queue has an associated [DoubleLinkedQueueEntry].
-   * Returns the entry object corresponding to the last element of the queue.
-   *
-   * The entry objects can also be accessed using [firstEntry],
-   * and they can be iterated using [DoubleLinkedQueueEntry.nextEntry()] and
-   * [DoubleLinkedQueueEntry.previousEntry()].
-   */
+  /// The entry object of the last element in the queue.
+  ///
+  /// Each element of the queue has an associated [DoubleLinkedQueueEntry].
+  /// Returns the entry object corresponding to the last element of the queue.
+  ///
+  /// The entry objects can also be accessed using [firstEntry],
+  /// and they can be iterated using [DoubleLinkedQueueEntry.nextEntry()] and
+  /// [DoubleLinkedQueueEntry.previousEntry()].
   DoubleLinkedQueueEntry<E> lastEntry() {
     return _sentinel.previousEntry();
   }
@@ -479,24 +429,22 @@
     _elementCount = 0;
   }
 
-  /**
-   * Calls [action] for each entry object of this double-linked queue.
-   *
-   * Each element of the queue has an associated [DoubleLinkedQueueEntry].
-   * This method iterates the entry objects from first to last and calls
-   * [action] with each object in turn.
-   *
-   * The entry objects can also be accessed using [firstEntry] and [lastEntry],
-   * and iterated using [DoubleLinkedQueueEntry.nextEntry()] and
-   * [DoubleLinkedQueueEntry.previousEntry()].
-   *
-   * The [action] function can use methods on [DoubleLinkedQueueEntry] to remove
-   * the entry or it can insert elements before or after then entry.
-   * If the current entry is removed, iteration continues with the entry that
-   * was following the current entry when [action] was called. Any elements
-   * inserted after the current element before it is removed will not be
-   * visited by the iteration.
-   */
+  /// Calls [action] for each entry object of this double-linked queue.
+  ///
+  /// Each element of the queue has an associated [DoubleLinkedQueueEntry].
+  /// This method iterates the entry objects from first to last and calls
+  /// [action] with each object in turn.
+  ///
+  /// The entry objects can also be accessed using [firstEntry] and [lastEntry],
+  /// and iterated using [DoubleLinkedQueueEntry.nextEntry()] and
+  /// [DoubleLinkedQueueEntry.previousEntry()].
+  ///
+  /// The [action] function can use methods on [DoubleLinkedQueueEntry] to
+  /// remove the entry or it can insert elements before or after then entry.
+  /// If the current entry is removed, iteration continues with the entry that
+  /// was following the current entry when [action] was called. Any elements
+  /// inserted after the current element before it is removed will not be
+  /// visited by the iteration.
   void forEachEntry(void action(DoubleLinkedQueueEntry<E> element)) {
     _DoubleLinkedQueueEntry<E> entry = _sentinel._nextLink;
     while (!identical(entry, _sentinel)) {
@@ -510,14 +458,14 @@
       if (identical(this, entry._queue)) {
         next = entry._nextLink;
       } else if (!identical(this, next._queue)) {
-        throw new ConcurrentModificationError(this);
+        throw ConcurrentModificationError(this);
       }
       entry = next;
     }
   }
 
   _DoubleLinkedQueueIterator<E> get iterator {
-    return new _DoubleLinkedQueueIterator<E>(_sentinel);
+    return _DoubleLinkedQueueIterator<E>(_sentinel);
   }
 
   String toString() => IterableBase.iterableToFullString(this, '{', '}');
@@ -541,7 +489,7 @@
     }
     _DoubleLinkedQueueElement<E> elementEntry = _nextEntry;
     if (!identical(_sentinel._queue, elementEntry._queue)) {
-      throw new ConcurrentModificationError(_sentinel._queue);
+      throw ConcurrentModificationError(_sentinel._queue);
     }
     _current = elementEntry._element;
     _nextEntry = elementEntry._nextLink;
@@ -551,15 +499,13 @@
   E get current => _current;
 }
 
-/**
- * List based [Queue].
- *
- * Keeps a cyclic buffer of elements, and grows to a larger buffer when
- * it fills up. This guarantees constant time peek and remove operations, and
- * amortized constant time add operations.
- *
- * The structure is efficient for any queue or stack usage.
- */
+/// List based [Queue].
+///
+/// Keeps a cyclic buffer of elements, and grows to a larger buffer when
+/// it fills up. This guarantees constant time peek and remove operations, and
+/// amortized constant time add operations.
+///
+/// The structure is efficient for any queue or stack usage.
 class ListQueue<E> extends ListIterable<E> implements Queue<E> {
   static const int _INITIAL_CAPACITY = 8;
   List<E> _table;
@@ -567,12 +513,10 @@
   int _tail;
   int _modificationCount = 0;
 
-  /**
-   * Create an empty queue.
-   *
-   * If [initialCapacity] is given, prepare the queue for at least that many
-   * elements.
-   */
+  /// Create an empty queue.
+  ///
+  /// If [initialCapacity] is given, prepare the queue for at least that many
+  /// elements.
   ListQueue([int initialCapacity])
       : _head = 0,
         _tail = 0 {
@@ -582,28 +526,26 @@
       initialCapacity = _nextPowerOf2(initialCapacity);
     }
     assert(_isPowerOf2(initialCapacity));
-    _table = new List<E>(initialCapacity);
+    _table = List<E>(initialCapacity);
   }
 
-  /**
-   * Create a `ListQueue` containing all [elements].
-   *
-   * The elements are added to the queue, as by [addLast], in the order given by
-   * `elements.iterator`.
-   *
-   * All the [elements] should be instances of [E].
-   * The `elements` iterable itself may have any element type, so this
-   * constructor can be used to down-cast a `Queue`, for example as:
-   * ```dart
-   * Queue<SuperType> superQueue = ...;
-   * Queue<SubType> subQueue =
-   *     new ListQueue<SubType>.from(superQueue.whereType<SubType>());
-   * ```
-   */
+  /// Create a `ListQueue` containing all [elements].
+  ///
+  /// The elements are added to the queue, as by [addLast], in the order given
+  /// by `elements.iterator`.
+  ///
+  /// All the [elements] should be instances of [E].
+  /// The `elements` iterable itself may have any element type, so this
+  /// constructor can be used to down-cast a `Queue`, for example as:
+  /// ```dart
+  /// Queue<SuperType> superQueue = ...;
+  /// Queue<SubType> subQueue =
+  ///     new ListQueue<SubType>.from(superQueue.whereType<SubType>());
+  /// ```
   factory ListQueue.from(Iterable elements) {
     if (elements is List) {
       int length = elements.length;
-      ListQueue<E> queue = new ListQueue<E>(length + 1);
+      ListQueue<E> queue = ListQueue<E>(length + 1);
       assert(queue._table.length > length);
       for (int i = 0; i < length; i++) {
         queue._table[i] = elements[i];
@@ -615,7 +557,7 @@
       if (elements is EfficientLengthIterable) {
         capacity = elements.length;
       }
-      ListQueue<E> result = new ListQueue<E>(capacity);
+      ListQueue<E> result = ListQueue<E>(capacity);
       for (final element in elements) {
         result.addLast(element);
       }
@@ -623,19 +565,17 @@
     }
   }
 
-  /**
-   * Create a `ListQueue` from [elements].
-   *
-   * The elements are added to the queue, as by [addLast], in the order given by
-   * `elements.iterator`.
-   */
+  /// Create a `ListQueue` from [elements].
+  ///
+  /// The elements are added to the queue, as by [addLast], in the order given
+  /// by `elements.iterator`.
   factory ListQueue.of(Iterable<E> elements) =>
-      new ListQueue<E>()..addAll(elements);
+      ListQueue<E>()..addAll(elements);
 
   // Iterable interface.
 
   Queue<R> cast<R>() => Queue.castFrom<E, R>(this);
-  Iterator<E> get iterator => new _ListQueueIterator<E>(this);
+  Iterator<E> get iterator => _ListQueueIterator<E>(this);
 
   void forEach(void f(E element)) {
     int modificationCount = _modificationCount;
@@ -670,12 +610,12 @@
     return _table[(_head + index) & (_table.length - 1)];
   }
 
-  List<E> toList({bool growable: true}) {
+  List<E> toList({bool growable = true}) {
     List<E> list;
     if (growable) {
       list = <E>[]..length = length;
     } else {
-      list = new List<E>(length);
+      list = List<E>(length);
     }
     _writeToList(list);
     return list;
@@ -744,22 +684,18 @@
     }
   }
 
-  /**
-   * Remove all elements matched by [test].
-   *
-   * This method is inefficient since it works by repeatedly removing single
-   * elements, each of which can take linear time.
-   */
+  /// Remove all elements matched by [test].
+  ///
+  /// This method is inefficient since it works by repeatedly removing single
+  /// elements, each of which can take linear time.
   void removeWhere(bool test(E element)) {
     _filterWhere(test, true);
   }
 
-  /**
-   * Remove all elements not matched by [test].
-   *
-   * This method is inefficient since it works by repeatedly removing single
-   * elements, each of which can take linear time.
-   */
+  /// Remove all elements not matched by [test].
+  ///
+  /// This method is inefficient since it works by repeatedly removing single
+  /// elements, each of which can take linear time.
   void retainWhere(bool test(E element)) {
     _filterWhere(test, false);
   }
@@ -809,20 +745,16 @@
 
   // Internal helper functions.
 
-  /**
-   * Whether [number] is a power of two.
-   *
-   * Only works for positive numbers.
-   */
+  /// Whether [number] is a power of two.
+  ///
+  /// Only works for positive numbers.
   static bool _isPowerOf2(int number) => (number & (number - 1)) == 0;
 
-  /**
-   * Rounds [number] up to the nearest power of 2.
-   *
-   * If [number] is a power of 2 already, it is returned.
-   *
-   * Only works for positive numbers.
-   */
+  /// Rounds [number] up to the nearest power of 2.
+  ///
+  /// If [number] is a power of 2 already, it is returned.
+  ///
+  /// Only works for positive numbers.
   static int _nextPowerOf2(int number) {
     assert(number > 0);
     number = (number << 1) - 1;
@@ -833,14 +765,14 @@
     }
   }
 
-  /** Check if the queue has been modified during iteration. */
+  /// Check if the queue has been modified during iteration.
   void _checkModification(int expectedModificationCount) {
     if (expectedModificationCount != _modificationCount) {
-      throw new ConcurrentModificationError(this);
+      throw ConcurrentModificationError(this);
     }
   }
 
-  /** Adds element at end of queue. Used by both [add] and [addAll]. */
+  /// Adds element at end of queue. Used by both [add] and [addAll].
   void _add(E element) {
     _table[_tail] = element;
     _tail = (_tail + 1) & (_table.length - 1);
@@ -848,16 +780,14 @@
     _modificationCount++;
   }
 
-  /**
-   * Removes the element at [offset] into [_table].
-   *
-   * Removal is performed by linearly moving elements either before or after
-   * [offset] by one position.
-   *
-   * Returns the new offset of the following element. This may be the same
-   * offset or the following offset depending on how elements are moved
-   * to fill the hole.
-   */
+  /// Removes the element at [offset] into [_table].
+  ///
+  /// Removal is performed by linearly moving elements either before or after
+  /// [offset] by one position.
+  ///
+  /// Returns the new offset of the following element. This may be the same
+  /// offset or the following offset depending on how elements are moved
+  /// to fill the hole.
   int _remove(int offset) {
     int mask = _table.length - 1;
     int startDistance = (offset - _head) & mask;
@@ -886,11 +816,9 @@
     }
   }
 
-  /**
-   * Grow the table when full.
-   */
+  /// Grow the table when full.
   void _grow() {
-    List<E> newTable = new List<E>(_table.length * 2);
+    List<E> newTable = List<E>(_table.length * 2);
     int split = _table.length - _head;
     newTable.setRange(0, split, _table, _head);
     newTable.setRange(split, split + _head, _table, 0);
@@ -913,7 +841,7 @@
     }
   }
 
-  /** Grows the table even if it is not full. */
+  /// Grows the table even if it is not full.
   void _preGrow(int newElementCount) {
     assert(newElementCount >= length);
 
@@ -921,18 +849,16 @@
     // expansion.
     newElementCount += newElementCount >> 1;
     int newCapacity = _nextPowerOf2(newElementCount);
-    List<E> newTable = new List<E>(newCapacity);
+    List<E> newTable = List<E>(newCapacity);
     _tail = _writeToList(newTable);
     _table = newTable;
     _head = 0;
   }
 }
 
-/**
- * Iterator for a [ListQueue].
- *
- * Considers any add or remove operation a concurrent modification.
- */
+/// Iterator for a [ListQueue].
+///
+/// Considers any add or remove operation a concurrent modification.
 class _ListQueueIterator<E> implements Iterator<E> {
   final ListQueue<E> _queue;
   final int _end;
diff --git a/sdk/lib/collection/set.dart b/sdk/lib/collection/set.dart
index 4f21b77..7508b23 100644
--- a/sdk/lib/collection/set.dart
+++ b/sdk/lib/collection/set.dart
@@ -2,28 +2,24 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/**
- * Base implementations of [Set].
- */
+/// Base implementations of [Set].
 part of dart.collection;
 
-/**
- * Mixin implementation of [Set].
- *
- * This class provides a base implementation of a `Set` that depends only
- * on the abstract members: [add], [contains], [lookup], [remove],
- * [iterator], [length] and [toSet].
- *
- * Some of the methods assume that `toSet` creates a modifiable set.
- * If using this mixin for an unmodifiable set,
- * where `toSet` should return an unmodifiable set,
- * it's necessary to reimplement
- * [retainAll], [union], [intersection] and [difference].
- *
- * Implementations of `Set` using this mixin should consider also implementing
- * `clear` in constant time. The default implementation works by removing every
- * element.
- */
+/// Mixin implementation of [Set].
+///
+/// This class provides a base implementation of a `Set` that depends only
+/// on the abstract members: [add], [contains], [lookup], [remove],
+/// [iterator], [length] and [toSet].
+///
+/// Some of the methods assume that `toSet` creates a modifiable set.
+/// If using this mixin for an unmodifiable set,
+/// where `toSet` should return an unmodifiable set,
+/// it's necessary to reimplement
+/// [retainAll], [union], [intersection] and [difference].
+///
+/// Implementations of `Set` using this mixin should consider also implementing
+/// `clear` in constant time. The default implementation works by removing every
+/// element.
 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
@@ -49,9 +45,9 @@
 
   Set<R> cast<R>() => Set.castFrom<E, R>(this);
   Iterable<E> followedBy(Iterable<E> other) =>
-      new FollowedByIterable<E>.firstEfficient(this, other);
+      FollowedByIterable<E>.firstEfficient(this, other);
 
-  Iterable<T> whereType<T>() => new WhereTypeIterable<T>(this);
+  Iterable<T> whereType<T>() => WhereTypeIterable<T>(this);
 
   void clear() {
     removeAll(toList());
@@ -118,15 +114,15 @@
     return result;
   }
 
-  List<E> toList({bool growable: true}) {
-    List<E> result = growable ? (<E>[]..length = length) : new List<E>(length);
+  List<E> toList({bool growable = true}) {
+    List<E> result = growable ? (<E>[]..length = length) : List<E>(length);
     int i = 0;
     for (E element in this) result[i++] = element;
     return result;
   }
 
   Iterable<T> map<T>(T f(E element)) =>
-      new EfficientLengthMappedIterable<E, T>(this, f);
+      EfficientLengthMappedIterable<E, T>(this, f);
 
   E get single {
     if (length > 1) throw IterableElementError.tooMany();
@@ -141,10 +137,10 @@
   // Copied from IterableMixin.
   // Should be inherited if we had multi-level mixins.
 
-  Iterable<E> where(bool f(E element)) => new WhereIterable<E>(this, f);
+  Iterable<E> where(bool f(E element)) => WhereIterable<E>(this, f);
 
   Iterable<T> expand<T>(Iterable<T> f(E element)) =>
-      new ExpandIterable<E, T>(this, f);
+      ExpandIterable<E, T>(this, f);
 
   void forEach(void f(E element)) {
     for (E element in this) f(element);
@@ -178,7 +174,7 @@
   String join([String separator = ""]) {
     Iterator<E> iterator = this.iterator;
     if (!iterator.moveNext()) return "";
-    StringBuffer buffer = new StringBuffer();
+    StringBuffer buffer = StringBuffer();
     if (separator == null || separator == "") {
       do {
         buffer.write(iterator.current);
@@ -201,19 +197,19 @@
   }
 
   Iterable<E> take(int n) {
-    return new TakeIterable<E>(this, n);
+    return TakeIterable<E>(this, n);
   }
 
   Iterable<E> takeWhile(bool test(E value)) {
-    return new TakeWhileIterable<E>(this, test);
+    return TakeWhileIterable<E>(this, test);
   }
 
   Iterable<E> skip(int n) {
-    return new SkipIterable<E>(this, n);
+    return SkipIterable<E>(this, n);
   }
 
   Iterable<E> skipWhile(bool test(E value)) {
-    return new SkipWhileIterable<E>(this, test);
+    return SkipWhileIterable<E>(this, test);
   }
 
   E get first {
@@ -283,39 +279,35 @@
       if (index == elementIndex) return element;
       elementIndex++;
     }
-    throw new RangeError.index(index, this, "index", null, elementIndex);
+    throw RangeError.index(index, this, "index", null, elementIndex);
   }
 }
 
-/**
- * Base implementation of [Set].
- *
- * This class provides a base implementation of a `Set` that depends only
- * on the abstract members: [add], [contains], [lookup], [remove],
- * [iterator], [length] and [toSet].
- *
- * Some of the methods assume that `toSet` creates a modifiable set.
- * If using this base class for an unmodifiable set,
- * where `toSet` should return an unmodifiable set,
- * it's necessary to reimplement
- * [retainAll], [union], [intersection] and [difference].
- *
- * Implementations of `Set` using this base should consider also implementing
- * `clear` in constant time. The default implementation works by removing every
- * element.
- */
+/// Base implementation of [Set].
+///
+/// This class provides a base implementation of a `Set` that depends only
+/// on the abstract members: [add], [contains], [lookup], [remove],
+/// [iterator], [length] and [toSet].
+///
+/// Some of the methods assume that `toSet` creates a modifiable set.
+/// If using this base class for an unmodifiable set,
+/// where `toSet` should return an unmodifiable set,
+/// it's necessary to reimplement
+/// [retainAll], [union], [intersection] and [difference].
+///
+/// Implementations of `Set` using this base should consider also implementing
+/// `clear` in constant time. The default implementation works by removing every
+/// element.
 abstract class SetBase<E> extends Object with SetMixin<E> {
-  /**
-   * Convert a `Set` to a string as `{each, element, as, string}`.
-   *
-   * Handles circular references where converting one of the elements
-   * to a string ends up converting [set] to a string again.
-   */
+  /// Convert a `Set` to a string as `{each, element, as, string}`.
+  ///
+  /// Handles circular references where converting one of the elements
+  /// to a string ends up converting [set] to a string again.
   static String setToString(Set set) =>
       IterableBase.iterableToFullString(set, '{', '}');
 }
 
-/** Common internal implementation of some [Set] methods. */
+/// Common internal implementation of some [Set] methods.
 // TODO(35548): Make this mix-in SetMixin, by adding `with SetMixin<E>`
 // and removing the copied members below,
 // when analyzer supports const constructors for mixin applications.
@@ -358,9 +350,9 @@
   bool get isNotEmpty => length != 0;
 
   Iterable<E> followedBy(Iterable<E> other) =>
-      new FollowedByIterable<E>.firstEfficient(this, other);
+      FollowedByIterable<E>.firstEfficient(this, other);
 
-  Iterable<T> whereType<T>() => new WhereTypeIterable<T>(this);
+  Iterable<T> whereType<T>() => WhereTypeIterable<T>(this);
 
   void clear() {
     removeAll(toList());
@@ -411,15 +403,15 @@
     return toSet()..addAll(other);
   }
 
-  List<E> toList({bool growable: true}) {
-    List<E> result = growable ? (<E>[]..length = length) : new List<E>(length);
+  List<E> toList({bool growable = true}) {
+    List<E> result = growable ? (<E>[]..length = length) : List<E>(length);
     int i = 0;
     for (E element in this) result[i++] = element;
     return result;
   }
 
   Iterable<T> map<T>(T f(E element)) =>
-      new EfficientLengthMappedIterable<E, T>(this, f);
+      EfficientLengthMappedIterable<E, T>(this, f);
 
   E get single {
     if (length > 1) throw IterableElementError.tooMany();
@@ -431,10 +423,10 @@
 
   String toString() => IterableBase.iterableToFullString(this, '{', '}');
 
-  Iterable<E> where(bool f(E element)) => new WhereIterable<E>(this, f);
+  Iterable<E> where(bool f(E element)) => WhereIterable<E>(this, f);
 
   Iterable<T> expand<T>(Iterable<T> f(E element)) =>
-      new ExpandIterable<E, T>(this, f);
+      ExpandIterable<E, T>(this, f);
 
   void forEach(void f(E element)) {
     for (E element in this) f(element);
@@ -468,7 +460,7 @@
   String join([String separator = ""]) {
     Iterator<E> iterator = this.iterator;
     if (!iterator.moveNext()) return "";
-    StringBuffer buffer = new StringBuffer();
+    StringBuffer buffer = StringBuffer();
     if (separator == null || separator == "") {
       do {
         buffer.write(iterator.current);
@@ -491,19 +483,19 @@
   }
 
   Iterable<E> take(int n) {
-    return new TakeIterable<E>(this, n);
+    return TakeIterable<E>(this, n);
   }
 
   Iterable<E> takeWhile(bool test(E value)) {
-    return new TakeWhileIterable<E>(this, test);
+    return TakeWhileIterable<E>(this, test);
   }
 
   Iterable<E> skip(int n) {
-    return new SkipIterable<E>(this, n);
+    return SkipIterable<E>(this, n);
   }
 
   Iterable<E> skipWhile(bool test(E value)) {
-    return new SkipWhileIterable<E>(this, test);
+    return SkipWhileIterable<E>(this, test);
   }
 
   E get first {
@@ -573,11 +565,11 @@
       if (index == elementIndex) return element;
       elementIndex++;
     }
-    throw new RangeError.index(index, this, "index", null, elementIndex);
+    throw RangeError.index(index, this, "index", null, elementIndex);
   }
 }
 
-/** Class used to implement const sets. */
+/// Class used to implement const sets.
 class _UnmodifiableSet<E> extends _SetBase<E> {
   final Map<E, Null> _map;
 
diff --git a/sdk/lib/collection/splay_tree.dart b/sdk/lib/collection/splay_tree.dart
index 9856d55..5f71934 100644
--- a/sdk/lib/collection/splay_tree.dart
+++ b/sdk/lib/collection/splay_tree.dart
@@ -4,12 +4,10 @@
 
 part of dart.collection;
 
-typedef bool _Predicate<T>(T value);
+typedef _Predicate<T> = bool Function(T value);
 
-/**
- * A node in a splay tree. It holds the sorting key and the left
- * and right children in the tree.
- */
+/// A node in a splay tree. It holds the sorting key and the left
+/// and right children in the tree.
 class _SplayTreeNode<K> {
   final K key;
   _SplayTreeNode<K> left;
@@ -18,24 +16,20 @@
   _SplayTreeNode(this.key);
 }
 
-/**
- * A node in a splay tree based map.
- *
- * A [_SplayTreeNode] that also contains a value
- */
+/// A node in a splay tree based map.
+///
+/// A [_SplayTreeNode] that also contains a value
 class _SplayTreeMapNode<K, V> extends _SplayTreeNode<K> {
   V value;
   _SplayTreeMapNode(K key, this.value) : super(key);
 }
 
-/**
- * A splay tree is a self-balancing binary search tree.
- *
- * It has the additional property that recently accessed elements
- * are quick to access again.
- * It performs basic operations such as insertion, look-up and
- * removal, in O(log(n)) amortized time.
- */
+/// A splay tree is a self-balancing binary search tree.
+///
+/// It has the additional property that recently accessed elements
+/// are quick to access again.
+/// It performs basic operations such as insertion, look-up and
+/// removal, in O(log(n)) amortized time.
 abstract class _SplayTree<K, Node extends _SplayTreeNode<K>> {
   // The root node of the splay tree. It will contain either the last
   // element inserted or the last element looked up.
@@ -49,40 +43,34 @@
   // Number of elements in the splay tree.
   int _count = 0;
 
-  /**
-   * Counter incremented whenever the keys in the map changes.
-   *
-   * Used to detect concurrent modifications.
-   */
+  /// Counter incremented whenever the keys in the map changes.
+  ///
+  /// Used to detect concurrent modifications.
   int _modificationCount = 0;
 
-  /**
-   * Counter incremented whenever the tree structure changes.
-   *
-   * Used to detect that an in-place traversal cannot use
-   * cached information that relies on the tree structure.
-   */
+  /// Counter incremented whenever the tree structure changes.
+  ///
+  /// Used to detect that an in-place traversal cannot use
+  /// cached information that relies on the tree structure.
   int _splayCount = 0;
 
-  /** The comparator that is used for this splay tree. */
+  /// The comparator that is used for this splay tree.
   Comparator<K> get _comparator;
 
-  /** The predicate to determine that a given object is a valid key. */
+  /// The predicate to determine that a given object is a valid key.
   _Predicate get _validKey;
 
-  /** Comparison used to compare keys. */
+  /// Comparison used to compare keys.
   int _compare(K key1, K key2);
 
-  /**
-   * Perform the splay operation for the given key. Moves the node with
-   * the given key to the top of the tree.  If no node has the given
-   * key, the last node on the search path is moved to the top of the
-   * tree. This is the simplified top-down splaying algorithm from:
-   * "Self-adjusting Binary Search Trees" by Sleator and Tarjan.
-   *
-   * Returns the result of comparing the new root of the tree to [key].
-   * Returns -1 if the table is empty.
-   */
+  /// Perform the splay operation for the given key. Moves the node with
+  /// the given key to the top of the tree.  If no node has the given
+  /// key, the last node on the search path is moved to the top of the
+  /// tree. This is the simplified top-down splaying algorithm from:
+  /// "Self-adjusting Binary Search Trees" by Sleator and Tarjan.
+  ///
+  /// Returns the result of comparing the new root of the tree to [key].
+  /// Returns -1 if the table is empty.
   int _splay(K key) {
     if (_root == null) return -1;
 
@@ -177,12 +165,10 @@
     return result;
   }
 
-  /**
-   * Adds a new root node with the given [key] or [value].
-   *
-   * The [comp] value is the result of comparing the existing root's key
-   * with key.
-   */
+  /// Adds a new root node with the given [key] or [value].
+  ///
+  /// The [comp] value is the result of comparing the existing root's key
+  /// with key.
   void _addNewRoot(Node node, int comp) {
     _count++;
     _modificationCount++;
@@ -239,34 +225,31 @@
   return _dynamicCompare;
 }
 
-/**
- * A [Map] of objects that can be ordered relative to each other.
- *
- * The map is based on a self-balancing binary tree. It allows most operations
- * in amortized logarithmic time.
- *
- * Keys of the map are compared using the `compare` function passed in
- * the constructor, both for ordering and for equality.
- * If the map contains only the key `a`, then `map.containsKey(b)`
- * will return `true` if and only if `compare(a, b) == 0`,
- * and the value of `a == b` is not even checked.
- * If the compare function is omitted, the objects are assumed to be
- * [Comparable], and are compared using their [Comparable.compareTo] method.
- * Non-comparable objects (including `null`) will not work as keys
- * in that case.
- *
- * To allow calling [operator []], [remove] or [containsKey] with objects
- * that are not supported by the `compare` function, an extra `isValidKey`
- * predicate function can be supplied. This function is tested before
- * using the `compare` function on an argument value that may not be a [K]
- * value. If omitted, the `isValidKey` function defaults to testing if the
- * value is a [K].
- */
+/// A [Map] of objects that can be ordered relative to each other.
+///
+/// The map is based on a self-balancing binary tree. It allows most operations
+/// in amortized logarithmic time.
+///
+/// Keys of the map are compared using the `compare` function passed in
+/// the constructor, both for ordering and for equality.
+/// If the map contains only the key `a`, then `map.containsKey(b)`
+/// will return `true` if and only if `compare(a, b) == 0`,
+/// and the value of `a == b` is not even checked.
+/// If the compare function is omitted, the objects are assumed to be
+/// [Comparable], and are compared using their [Comparable.compareTo] method.
+/// Non-comparable objects (including `null`) will not work as keys
+/// in that case.
+///
+/// To allow calling [operator []], [remove] or [containsKey] with objects
+/// that are not supported by the `compare` function, an extra `isValidKey`
+/// predicate function can be supplied. This function is tested before
+/// using the `compare` function on an argument value that may not be a [K]
+/// value. If omitted, the `isValidKey` function defaults to testing if the
+/// value is a [K].
 class SplayTreeMap<K, V> extends _SplayTree<K, _SplayTreeMapNode<K, V>>
     with MapMixin<K, V> {
   _SplayTreeMapNode<K, V> _root;
-  final _SplayTreeMapNode<K, V> _dummy =
-      new _SplayTreeMapNode<K, V>(null, null);
+  final _SplayTreeMapNode<K, V> _dummy = _SplayTreeMapNode<K, V>(null, null);
 
   Comparator<K> _comparator;
   _Predicate _validKey;
@@ -275,65 +258,57 @@
       : _comparator = compare ?? _defaultCompare<K>(),
         _validKey = isValidKey ?? ((v) => v is K);
 
-  /**
-   * Creates a [SplayTreeMap] that contains all key/value pairs of [other].
-   *
-   * The keys must all be instances of [K] and the values of [V].
-   * The [other] map itself can have any type.
-   */
+  /// Creates a [SplayTreeMap] that contains all key/value pairs of [other].
+  ///
+  /// The keys must all be instances of [K] and the values of [V].
+  /// The [other] map itself can have any type.
   factory SplayTreeMap.from(Map other,
       [int compare(K key1, K key2), bool isValidKey(potentialKey)]) {
-    SplayTreeMap<K, V> result = new SplayTreeMap<K, V>(compare, isValidKey);
+    SplayTreeMap<K, V> result = SplayTreeMap<K, V>(compare, isValidKey);
     other.forEach((k, v) {
       result[k] = v;
     });
     return result;
   }
 
-  /**
-   * Creates a [SplayTreeMap] that contains all key/value pairs of [other].
-   */
+  /// Creates a [SplayTreeMap] that contains all key/value pairs of [other].
   factory SplayTreeMap.of(Map<K, V> other,
           [int compare(K key1, K key2), bool isValidKey(potentialKey)]) =>
-      new SplayTreeMap<K, V>(compare, isValidKey)..addAll(other);
+      SplayTreeMap<K, V>(compare, isValidKey)..addAll(other);
 
-  /**
-   * Creates a [SplayTreeMap] where the keys and values are computed from the
-   * [iterable].
-   *
-   * For each element of the [iterable] this constructor computes a key/value
-   * pair, by applying [key] and [value] respectively.
-   *
-   * The keys of the key/value pairs do not need to be unique. The last
-   * occurrence of a key will simply overwrite any previous value.
-   *
-   * If no functions are specified for [key] and [value] the default is to
-   * use the iterable value itself.
-   */
+  /// Creates a [SplayTreeMap] where the keys and values are computed from the
+  /// [iterable].
+  ///
+  /// For each element of the [iterable] this constructor computes a key/value
+  /// pair, by applying [key] and [value] respectively.
+  ///
+  /// The keys of the key/value pairs do not need to be unique. The last
+  /// occurrence of a key will simply overwrite any previous value.
+  ///
+  /// If no functions are specified for [key] and [value] the default is to
+  /// use the iterable value itself.
   factory SplayTreeMap.fromIterable(Iterable iterable,
       {K key(element),
       V value(element),
       int compare(K key1, K key2),
       bool isValidKey(potentialKey)}) {
-    SplayTreeMap<K, V> map = new SplayTreeMap<K, V>(compare, isValidKey);
+    SplayTreeMap<K, V> map = SplayTreeMap<K, V>(compare, isValidKey);
     MapBase._fillMapWithMappedIterable(map, iterable, key, value);
     return map;
   }
 
-  /**
-   * Creates a [SplayTreeMap] associating the given [keys] to [values].
-   *
-   * This constructor iterates over [keys] and [values] and maps each element of
-   * [keys] to the corresponding element of [values].
-   *
-   * If [keys] contains the same object multiple times, the last occurrence
-   * overwrites the previous value.
-   *
-   * It is an error if the two [Iterable]s don't have the same length.
-   */
+  /// Creates a [SplayTreeMap] associating the given [keys] to [values].
+  ///
+  /// This constructor iterates over [keys] and [values] and maps each element
+  /// of [keys] to the corresponding element of [values].
+  ///
+  /// If [keys] contains the same object multiple times, the last occurrence
+  /// overwrites the previous value.
+  ///
+  /// It is an error if the two [Iterable]s don't have the same length.
   factory SplayTreeMap.fromIterables(Iterable<K> keys, Iterable<V> values,
       [int compare(K key1, K key2), bool isValidKey(potentialKey)]) {
-    SplayTreeMap<K, V> map = new SplayTreeMap<K, V>(compare, isValidKey);
+    SplayTreeMap<K, V> map = SplayTreeMap<K, V>(compare, isValidKey);
     MapBase._fillMapWithIterables(map, keys, values);
     return map;
   }
@@ -361,7 +336,7 @@
   }
 
   void operator []=(K key, V value) {
-    if (key == null) throw new ArgumentError(key);
+    if (key == null) throw ArgumentError(key);
     // Splay on the key to move the last node on the search path for
     // the key to the root of the tree.
     int comp = _splay(key);
@@ -369,11 +344,11 @@
       _root.value = value;
       return;
     }
-    _addNewRoot(new _SplayTreeMapNode(key, value), comp);
+    _addNewRoot(_SplayTreeMapNode(key, value), comp);
   }
 
   V putIfAbsent(K key, V ifAbsent()) {
-    if (key == null) throw new ArgumentError(key);
+    if (key == null) throw ArgumentError(key);
     int comp = _splay(key);
     if (comp == 0) {
       return _root.value;
@@ -382,14 +357,14 @@
     int splayCount = _splayCount;
     V value = ifAbsent();
     if (modificationCount != _modificationCount) {
-      throw new ConcurrentModificationError(this);
+      throw ConcurrentModificationError(this);
     }
     if (splayCount != _splayCount) {
       comp = _splay(key);
       // Key is still not there, otherwise _modificationCount would be changed.
       assert(comp != 0);
     }
-    _addNewRoot(new _SplayTreeMapNode(key, value), comp);
+    _addNewRoot(_SplayTreeMapNode(key, value), comp);
     return value;
   }
 
@@ -406,7 +381,7 @@
   bool get isNotEmpty => !isEmpty;
 
   void forEach(void f(K key, V value)) {
-    Iterator<_SplayTreeNode<K>> nodes = new _SplayTreeNodeIterator<K>(this);
+    Iterator<_SplayTreeNode<K>> nodes = _SplayTreeNodeIterator<K>(this);
     while (nodes.moveNext()) {
       _SplayTreeMapNode<K, V> node = nodes.current;
       f(node.key, node.value);
@@ -431,7 +406,7 @@
       while (node != null) {
         if (node.value == value) return true;
         if (initialSplayCount != _splayCount) {
-          throw new ConcurrentModificationError(this);
+          throw ConcurrentModificationError(this);
         }
         if (node.right != null && visit(node.right)) return true;
         node = node.left;
@@ -442,32 +417,26 @@
     return visit(_root);
   }
 
-  Iterable<K> get keys => new _SplayTreeKeyIterable<K>(this);
+  Iterable<K> get keys => _SplayTreeKeyIterable<K>(this);
 
-  Iterable<V> get values => new _SplayTreeValueIterable<K, V>(this);
+  Iterable<V> get values => _SplayTreeValueIterable<K, V>(this);
 
-  /**
-   * Get the first key in the map. Returns [:null:] if the map is empty.
-   */
+  /// Get the first key in the map. Returns [:null:] if the map is empty.
   K firstKey() {
     if (_root == null) return null;
     return _first.key;
   }
 
-  /**
-   * Get the last key in the map. Returns [:null:] if the map is empty.
-   */
+  /// Get the last key in the map. Returns [:null:] if the map is empty.
   K lastKey() {
     if (_root == null) return null;
     return _last.key;
   }
 
-  /**
-   * Get the last key in the map that is strictly smaller than [key]. Returns
-   * [:null:] if no key was not found.
-   */
+  /// Get the last key in the map that is strictly smaller than [key]. Returns
+  /// [:null:] if no key was not found.
   K lastKeyBefore(K key) {
-    if (key == null) throw new ArgumentError(key);
+    if (key == null) throw ArgumentError(key);
     if (_root == null) return null;
     int comp = _splay(key);
     if (comp < 0) return _root.key;
@@ -479,12 +448,10 @@
     return node.key;
   }
 
-  /**
-   * Get the first key in the map that is strictly larger than [key]. Returns
-   * [:null:] if no key was not found.
-   */
+  /// Get the first key in the map that is strictly larger than [key]. Returns
+  /// [:null:] if no key was not found.
   K firstKeyAfter(K key) {
-    if (key == null) throw new ArgumentError(key);
+    if (key == null) throw ArgumentError(key);
     if (_root == null) return null;
     int comp = _splay(key);
     if (comp > 0) return _root.key;
@@ -499,37 +466,32 @@
 
 abstract class _SplayTreeIterator<K, T> implements Iterator<T> {
   final _SplayTree<K, _SplayTreeNode<K>> _tree;
-  /**
-   * Worklist of nodes to visit.
-   *
-   * These nodes have been passed over on the way down in a
-   * depth-first left-to-right traversal. Visiting each node,
-   * and their right subtrees will visit the remainder of
-   * the nodes of a full traversal.
-   *
-   * Only valid as long as the original tree isn't reordered.
-   */
+
+  /// Worklist of nodes to visit.
+  ///
+  /// These nodes have been passed over on the way down in a
+  /// depth-first left-to-right traversal. Visiting each node,
+  /// and their right subtrees will visit the remainder of
+  /// the nodes of a full traversal.
+  ///
+  /// Only valid as long as the original tree isn't reordered.
   final List<_SplayTreeNode<K>> _workList = <_SplayTreeNode<K>>[];
 
-  /**
-   * Original modification counter of [_tree].
-   *
-   * Incremented on [_tree] when a key is added or removed.
-   * If it changes, iteration is aborted.
-   *
-   * Not final because some iterators may modify the tree knowingly,
-   * and they update the modification count in that case.
-   */
+  /// Original modification counter of [_tree].
+  ///
+  /// Incremented on [_tree] when a key is added or removed.
+  /// If it changes, iteration is aborted.
+  ///
+  /// Not final because some iterators may modify the tree knowingly,
+  /// and they update the modification count in that case.
   int _modificationCount;
 
-  /**
-   * Count of splay operations on [_tree] when [_workList] was built.
-   *
-   * If the splay count on [_tree] increases, [_workList] becomes invalid.
-   */
+  /// Count of splay operations on [_tree] when [_workList] was built.
+  ///
+  /// If the splay count on [_tree] increases, [_workList] becomes invalid.
   int _splayCount;
 
-  /** Current node. */
+  /// Current node.
   _SplayTreeNode<K> _currentNode;
 
   _SplayTreeIterator(_SplayTree<K, _SplayTreeNode<K>> tree)
@@ -565,14 +527,12 @@
     }
   }
 
-  /**
-   * Called when the tree structure of the tree has changed.
-   *
-   * This can be caused by a splay operation.
-   * If the key-set changes, iteration is aborted before getting
-   * here, so we know that the keys are the same as before, it's
-   * only the tree that has been reordered.
-   */
+  /// Called when the tree structure of the tree has changed.
+  ///
+  /// This can be caused by a splay operation.
+  /// If the key-set changes, iteration is aborted before getting
+  /// here, so we know that the keys are the same as before, it's
+  /// only the tree that has been reordered.
   void _rebuildWorkList(_SplayTreeNode<K> currentNode) {
     assert(_workList.isNotEmpty);
     _workList.clear();
@@ -587,7 +547,7 @@
 
   bool moveNext() {
     if (_modificationCount != _tree._modificationCount) {
-      throw new ConcurrentModificationError(_tree);
+      throw ConcurrentModificationError(_tree);
     }
     // Picks the next element in the worklist as current.
     // Updates the worklist with the left-most path of the current node's
@@ -614,11 +574,10 @@
   _SplayTreeKeyIterable(this._tree);
   int get length => _tree._count;
   bool get isEmpty => _tree._count == 0;
-  Iterator<K> get iterator => new _SplayTreeKeyIterator<K>(_tree);
+  Iterator<K> get iterator => _SplayTreeKeyIterator<K>(_tree);
 
   Set<K> toSet() {
-    SplayTreeSet<K> set =
-        new SplayTreeSet<K>(_tree._comparator, _tree._validKey);
+    SplayTreeSet<K> set = SplayTreeSet<K>(_tree._comparator, _tree._validKey);
     set._count = _tree._count;
     set._root = set._copyNode(_tree._root);
     return set;
@@ -630,7 +589,7 @@
   _SplayTreeValueIterable(this._map);
   int get length => _map._count;
   bool get isEmpty => _map._count == 0;
-  Iterator<V> get iterator => new _SplayTreeValueIterator<K, V>(_map);
+  Iterator<V> get iterator => _SplayTreeValueIterator<K, V>(_map);
 }
 
 class _SplayTreeKeyIterator<K> extends _SplayTreeIterator<K, K> {
@@ -655,76 +614,70 @@
   _SplayTreeNode<K> _getValue(_SplayTreeNode<K> node) => node;
 }
 
-/**
- * A [Set] of objects that can be ordered relative to each other.
- *
- * The set is based on a self-balancing binary tree. It allows most operations
- * in amortized logarithmic time.
- *
- * Elements of the set are compared using the `compare` function passed in
- * the constructor, both for ordering and for equality.
- * If the set contains only an object `a`, then `set.contains(b)`
- * will return `true` if and only if `compare(a, b) == 0`,
- * and the value of `a == b` is not even checked.
- * If the compare function is omitted, the objects are assumed to be
- * [Comparable], and are compared using their [Comparable.compareTo] method.
- * Non-comparable objects (including `null`) will not work as an element
- * in that case.
- */
+/// A [Set] of objects that can be ordered relative to each other.
+///
+/// The set is based on a self-balancing binary tree. It allows most operations
+/// in amortized logarithmic time.
+///
+/// Elements of the set are compared using the `compare` function passed in
+/// the constructor, both for ordering and for equality.
+/// If the set contains only an object `a`, then `set.contains(b)`
+/// will return `true` if and only if `compare(a, b) == 0`,
+/// and the value of `a == b` is not even checked.
+/// If the compare function is omitted, the objects are assumed to be
+/// [Comparable], and are compared using their [Comparable.compareTo] method.
+/// Non-comparable objects (including `null`) will not work as an element
+/// in that case.
 class SplayTreeSet<E> extends _SplayTree<E, _SplayTreeNode<E>>
     with IterableMixin<E>, SetMixin<E> {
   _SplayTreeNode<E> _root;
-  final _SplayTreeNode<E> _dummy = new _SplayTreeNode<E>(null);
+  final _SplayTreeNode<E> _dummy = _SplayTreeNode<E>(null);
 
   Comparator<E> _comparator;
   _Predicate _validKey;
 
-  /**
-   * Create a new [SplayTreeSet] with the given compare function.
-   *
-   * If the [compare] function is omitted, it defaults to [Comparable.compare],
-   * and the elements must be comparable.
-   *
-   * A provided `compare` function may not work on all objects. It may not even
-   * work on all `E` instances.
-   *
-   * For operations that add elements to the set, the user is supposed to not
-   * pass in objects that doesn't work with the compare function.
-   *
-   * The methods [contains], [remove], [lookup], [removeAll] or [retainAll]
-   * are typed to accept any object(s), and the [isValidKey] test can used to
-   * filter those objects before handing them to the `compare` function.
-   *
-   * If [isValidKey] is provided, only values satisfying `isValidKey(other)`
-   * are compared using the `compare` method in the methods mentioned above.
-   * If the `isValidKey` function returns false for an object, it is assumed to
-   * not be in the set.
-   *
-   * If omitted, the `isValidKey` function defaults to checking against the
-   * type parameter: `other is E`.
-   */
+  /// Create a new [SplayTreeSet] with the given compare function.
+  ///
+  /// If the [compare] function is omitted, it defaults to [Comparable.compare],
+  /// and the elements must be comparable.
+  ///
+  /// A provided `compare` function may not work on all objects. It may not even
+  /// work on all `E` instances.
+  ///
+  /// For operations that add elements to the set, the user is supposed to not
+  /// pass in objects that doesn't work with the compare function.
+  ///
+  /// The methods [contains], [remove], [lookup], [removeAll] or [retainAll]
+  /// are typed to accept any object(s), and the [isValidKey] test can used to
+  /// filter those objects before handing them to the `compare` function.
+  ///
+  /// If [isValidKey] is provided, only values satisfying `isValidKey(other)`
+  /// are compared using the `compare` method in the methods mentioned above.
+  /// If the `isValidKey` function returns false for an object, it is assumed to
+  /// not be in the set.
+  ///
+  /// If omitted, the `isValidKey` function defaults to checking against the
+  /// type parameter: `other is E`.
   SplayTreeSet([int compare(E key1, E key2), bool isValidKey(potentialKey)])
       : _comparator = compare ?? _defaultCompare<E>(),
         _validKey = isValidKey ?? ((v) => v is E);
 
-  /**
-   * Creates a [SplayTreeSet] that contains all [elements].
-   *
-   * The set works as if created by `new SplayTreeSet<E>(compare, isValidKey)`.
-   *
-   * All the [elements] should be instances of [E] and valid arguments to
-   * [compare].
-   * The `elements` iterable itself may have any element type, so this
-   * constructor can be used to down-cast a `Set`, for example as:
-   * ```dart
-   * Set<SuperType> superSet = ...;
-   * Set<SubType> subSet =
-   *     new SplayTreeSet<SubType>.from(superSet.whereType<SubType>());
-   * ```
-   */
+  /// Creates a [SplayTreeSet] that contains all [elements].
+  ///
+  /// The set works as if created by `new SplayTreeSet<E>(compare, isValidKey)`.
+  ///
+  /// All the [elements] should be instances of [E] and valid arguments to
+  /// [compare].
+  /// The `elements` iterable itself may have any element type, so this
+  /// constructor can be used to down-cast a `Set`, for example as:
+  /// ```dart
+  /// Set<SuperType> superSet = ...;
+  /// Set<SubType> subSet =
+  ///     new SplayTreeSet<SubType>.from(superSet.whereType<SubType>());
+  /// ```
   factory SplayTreeSet.from(Iterable elements,
       [int compare(E key1, E key2), bool isValidKey(potentialKey)]) {
-    SplayTreeSet<E> result = new SplayTreeSet<E>(compare, isValidKey);
+    SplayTreeSet<E> result = SplayTreeSet<E>(compare, isValidKey);
     for (final element in elements) {
       E e = element;
       result.add(e);
@@ -732,26 +685,24 @@
     return result;
   }
 
-  /**
-   * Creates a [SplayTreeSet] from [elements].
-   *
-   * The set works as if created by `new SplayTreeSet<E>(compare, isValidKey)`.
-   *
-   * All the [elements] should be valid as arguments to the [compare] function.
-   */
+  /// Creates a [SplayTreeSet] from [elements].
+  ///
+  /// The set works as if created by `new SplayTreeSet<E>(compare, isValidKey)`.
+  ///
+  /// All the [elements] should be valid as arguments to the [compare] function.
   factory SplayTreeSet.of(Iterable<E> elements,
           [int compare(E key1, E key2), bool isValidKey(potentialKey)]) =>
-      new SplayTreeSet(compare, isValidKey)..addAll(elements);
+      SplayTreeSet(compare, isValidKey)..addAll(elements);
 
   Set<T> _newSet<T>() =>
-      new SplayTreeSet<T>((T a, T b) => _comparator(a as E, b as E), _validKey);
+      SplayTreeSet<T>((T a, T b) => _comparator(a as E, b as E), _validKey);
 
   Set<R> cast<R>() => Set.castFrom<E, R>(this, newSet: _newSet);
   int _compare(E e1, E e2) => _comparator(e1, e2);
 
   // From Iterable.
 
-  Iterator<E> get iterator => new _SplayTreeKeyIterator<E>(this);
+  Iterator<E> get iterator => _SplayTreeKeyIterator<E>(this);
 
   int get length => _count;
   bool get isEmpty => _root == null;
@@ -781,7 +732,7 @@
   bool add(E element) {
     int compare = _splay(element);
     if (compare == 0) return false;
-    _addNewRoot(new _SplayTreeNode(element), compare);
+    _addNewRoot(_SplayTreeNode(element), compare);
     return true;
   }
 
@@ -794,7 +745,7 @@
     for (E element in elements) {
       int compare = _splay(element);
       if (compare != 0) {
-        _addNewRoot(new _SplayTreeNode(element), compare);
+        _addNewRoot(_SplayTreeNode(element), compare);
       }
     }
   }
@@ -807,12 +758,12 @@
 
   void retainAll(Iterable<Object> elements) {
     // Build a set with the same sense of equality as this set.
-    SplayTreeSet<E> retainSet = new SplayTreeSet<E>(_comparator, _validKey);
+    SplayTreeSet<E> retainSet = SplayTreeSet<E>(_comparator, _validKey);
     int modificationCount = _modificationCount;
     for (Object object in elements) {
       if (modificationCount != _modificationCount) {
         // The iterator should not have side effects.
-        throw new ConcurrentModificationError(this);
+        throw ConcurrentModificationError(this);
       }
       // Equivalent to this.contains(object).
       if (_validKey(object) && _splay(object) == 0) {
@@ -835,7 +786,7 @@
   }
 
   Set<E> intersection(Set<Object> other) {
-    Set<E> result = new SplayTreeSet<E>(_comparator, _validKey);
+    Set<E> result = SplayTreeSet<E>(_comparator, _validKey);
     for (E element in this) {
       if (other.contains(element)) result.add(element);
     }
@@ -843,7 +794,7 @@
   }
 
   Set<E> difference(Set<Object> other) {
-    Set<E> result = new SplayTreeSet<E>(_comparator, _validKey);
+    Set<E> result = SplayTreeSet<E>(_comparator, _validKey);
     for (E element in this) {
       if (!other.contains(element)) result.add(element);
     }
@@ -855,7 +806,7 @@
   }
 
   SplayTreeSet<E> _clone() {
-    var set = new SplayTreeSet<E>(_comparator, _validKey);
+    var set = SplayTreeSet<E>(_comparator, _validKey);
     set._count = _count;
     set._root = _copyNode(_root);
     return set;
@@ -865,7 +816,7 @@
   // Works on _SplayTreeMapNode as well, but only copies the keys,
   _SplayTreeNode<E> _copyNode(_SplayTreeNode<E> node) {
     if (node == null) return null;
-    return new _SplayTreeNode<E>(node.key)
+    return _SplayTreeNode<E>(node.key)
       ..left = _copyNode(node.left)
       ..right = _copyNode(node.right);
   }
diff --git a/sdk/lib/convert/base64.dart b/sdk/lib/convert/base64.dart
index 1b31387..ce522be 100644
--- a/sdk/lib/convert/base64.dart
+++ b/sdk/lib/convert/base64.dart
@@ -15,6 +15,9 @@
 ///     var encoded = base64.encode([0x62, 0x6c, 0xc3, 0xa5, 0x62, 0xc3, 0xa6,
 ///                                  0x72, 0x67, 0x72, 0xc3, 0xb8, 0x64]);
 ///     var decoded = base64.decode("YmzDpWLDpnJncsO4ZAo=");
+///
+/// The top-level [base64Encode] and [base64Decode] functions may be used
+/// instead if a local variable shadows the [base64] constant.
 const Base64Codec base64 = Base64Codec();
 
 /// A [base64url](https://tools.ietf.org/html/rfc4648) encoder and decoder.
@@ -32,7 +35,8 @@
 
 /// Encodes [bytes] using [base64](https://tools.ietf.org/html/rfc4648) encoding.
 ///
-/// Shorthand for [base64.encode].
+/// Shorthand for [base64.encode]. Useful if a local variable shadows the global
+/// [base64] constant.
 String base64Encode(List<int> bytes) => base64.encode(bytes);
 
 /// Encodes [bytes] using [base64url](https://tools.ietf.org/html/rfc4648) encoding.
@@ -42,7 +46,8 @@
 
 /// Decodes [base64](https://tools.ietf.org/html/rfc4648) or [base64url](https://tools.ietf.org/html/rfc4648) encoded bytes.
 ///
-/// Shorthand for [base64.decode].
+/// Shorthand for [base64.decode]. Useful if a local variable shadows the
+/// global [base64] constant.
 Uint8List base64Decode(String source) => base64.decode(source);
 
 // Constants used in more than one class.
diff --git a/sdk/lib/convert/byte_conversion.dart b/sdk/lib/convert/byte_conversion.dart
index 1071b90..3d52d78 100644
--- a/sdk/lib/convert/byte_conversion.dart
+++ b/sdk/lib/convert/byte_conversion.dart
@@ -70,7 +70,7 @@
 class _ByteCallbackSink extends ByteConversionSinkBase {
   static const _INITIAL_BUFFER_SIZE = 1024;
 
-  final _ChunkedConversionCallback<List<int>> _callback;
+  final void Function(List<int>) _callback;
   List<int> _buffer = Uint8List(_INITIAL_BUFFER_SIZE);
   int _bufferIndex = 0;
 
diff --git a/sdk/lib/convert/chunked_conversion.dart b/sdk/lib/convert/chunked_conversion.dart
index 6a9479a..e946f97 100644
--- a/sdk/lib/convert/chunked_conversion.dart
+++ b/sdk/lib/convert/chunked_conversion.dart
@@ -4,8 +4,6 @@
 
 part of dart.convert;
 
-typedef void _ChunkedConversionCallback<T>(T accumulated);
-
 /// A [ChunkedConversionSink] is used to transmit data more efficiently between
 /// two converters during chunked conversions.
 ///
@@ -37,7 +35,7 @@
 ///
 /// This class can be used to terminate a chunked conversion.
 class _SimpleCallbackSink<T> extends ChunkedConversionSink<T> {
-  final _ChunkedConversionCallback<List<T>> _callback;
+  final void Function(List<T>) _callback;
   final List<T> _accumulated = <T>[];
 
   _SimpleCallbackSink(this._callback);
diff --git a/sdk/lib/convert/json.dart b/sdk/lib/convert/json.dart
index 35bc351..5746e52 100644
--- a/sdk/lib/convert/json.dart
+++ b/sdk/lib/convert/json.dart
@@ -59,6 +59,9 @@
 ///
 ///     var encoded = json.encode([1, 2, { "a": null }]);
 ///     var decoded = json.decode('["foo", { "bar": 499 }]');
+///
+/// The top-level [jsonEncode] and [jsonDecode] functions may be used instead if
+/// a local variable shadows the [json] constant.
 const JsonCodec json = JsonCodec();
 
 /// Converts [value] to a JSON string.
@@ -71,7 +74,8 @@
 /// If [toEncodable] is omitted, it defaults to a function that returns the
 /// result of calling `.toJson()` on the unencodable object.
 ///
-/// Shorthand for [json.encode].
+/// Shorthand for [json.encode]. Useful if a local variable shadows the global
+/// [json] constant.
 String jsonEncode(Object object, {Object toEncodable(Object nonEncodable)}) =>
     json.encode(object, toEncodable: toEncodable);
 
@@ -84,13 +88,11 @@
 ///
 /// The default [reviver] (when not provided) is the identity function.
 ///
-/// Shorthand for [json.decode].
+/// Shorthand for [json.decode]. Useful if a local variable shadows the global
+/// [json] constant.
 dynamic jsonDecode(String source, {Object reviver(Object key, Object value)}) =>
     json.decode(source, reviver: reviver);
 
-typedef _Reviver(Object key, Object value);
-typedef _ToEncodable(var o);
-
 /// A [JsonCodec] encodes JSON objects to strings and decodes strings to
 /// JSON objects.
 ///
@@ -99,8 +101,8 @@
 ///     var encoded = json.encode([1, 2, { "a": null }]);
 ///     var decoded = json.decode('["foo", { "bar": 499 }]');
 class JsonCodec extends Codec<Object, String> {
-  final _Reviver _reviver;
-  final _ToEncodable _toEncodable;
+  final Function(Object key, Object value) _reviver;
+  final Function(dynamic) _toEncodable;
 
   /// Creates a `JsonCodec` with the given reviver and encoding function.
   ///
@@ -188,7 +190,7 @@
 
   /// Function called on non-encodable objects to return a replacement
   /// encodable object that will be encoded in the orignal's place.
-  final _ToEncodable _toEncodable;
+  final Function(dynamic) _toEncodable;
 
   /// Creates a JSON encoder.
   ///
@@ -303,7 +305,7 @@
   final List<int> _indent;
 
   /// Function called with each un-encodable object encountered.
-  final _ToEncodable _toEncodable;
+  final Function(dynamic) _toEncodable;
 
   /// UTF-8 buffer size.
   final int _bufferSize;
@@ -408,7 +410,7 @@
 /// The sink only accepts one value, but will produce output in a chunked way.
 class _JsonEncoderSink extends ChunkedConversionSink<Object> {
   final String _indent;
-  final _ToEncodable _toEncodable;
+  final Function(dynamic) _toEncodable;
   final StringConversionSink _sink;
   bool _isDone = false;
 
@@ -437,7 +439,7 @@
   /// The byte sink receiveing the encoded chunks.
   final ByteConversionSink _sink;
   final List<int> _indent;
-  final _ToEncodable _toEncodable;
+  final Function(dynamic) _toEncodable;
   final int _bufferSize;
   bool _isDone = false;
   _JsonUtf8EncoderSink(
@@ -468,7 +470,7 @@
 
 /// This class parses JSON strings and builds the corresponding objects.
 class JsonDecoder extends Converter<String, Object> {
-  final _Reviver _reviver;
+  final Function(Object key, Object value) _reviver;
 
   /// Constructs a new JsonDecoder.
   ///
@@ -531,7 +533,7 @@
   final List _seen = [];
 
   /// Function called for each un-encodable object encountered.
-  final _ToEncodable _toEncodable;
+  final Function(dynamic) _toEncodable;
 
   _JsonStringifier(toEncodable(o))
       : _toEncodable = toEncodable ?? _defaultToEncodable;
@@ -863,15 +865,13 @@
   }
 }
 
-typedef void _AddChunk(Uint8List list, int start, int end);
-
 /// Specialization of [_JsonStringifier] that writes the JSON as UTF-8.
 ///
 /// The JSON text is UTF-8 encoded and written to [Uint8List] buffers.
 /// The buffers are then passed back to a user provided callback method.
 class _JsonUtf8Stringifier extends _JsonStringifier {
   final int bufferSize;
-  final _AddChunk addChunk;
+  final void Function(Uint8List list, int start, int end) addChunk;
   Uint8List buffer;
   int index = 0;
 
diff --git a/sdk/lib/convert/string_conversion.dart b/sdk/lib/convert/string_conversion.dart
index 6c2d31f..81e5621 100644
--- a/sdk/lib/convert/string_conversion.dart
+++ b/sdk/lib/convert/string_conversion.dart
@@ -63,12 +63,10 @@
   void close();
 }
 
-typedef void _StringSinkCloseCallback();
-
 /// This class wraps an existing [StringSink] and invokes a
 /// closure when [close] is invoked.
 class _ClosableStringSink implements ClosableStringSink {
-  final _StringSinkCloseCallback _callback;
+  final void Function() _callback;
   final StringSink _sink;
 
   _ClosableStringSink(this._sink, this._callback);
@@ -210,7 +208,7 @@
 ///
 /// This class can be used to terminate a chunked conversion.
 class _StringCallbackSink extends _StringSinkConversionSink<StringBuffer> {
-  final _ChunkedConversionCallback<String> _callback;
+  final void Function(String) _callback;
   _StringCallbackSink(this._callback) : super(StringBuffer());
 
   void close() {
diff --git a/sdk/lib/convert/utf.dart b/sdk/lib/convert/utf.dart
index eb92e2b..66c9cac 100644
--- a/sdk/lib/convert/utf.dart
+++ b/sdk/lib/convert/utf.dart
@@ -306,8 +306,24 @@
 
     var length = codeUnits.length;
     end = RangeError.checkValidRange(start, end, length);
-    var buffer = StringBuffer();
+
+    // Fast case for ASCII strings avoids StringBuffer/_Utf8Decoder.
+    int oneBytes = _scanOneByteCharacters(codeUnits, start, end);
+    StringBuffer buffer;
+    bool isFirstCharacter = true;
+    if (oneBytes > 0) {
+      var firstPart = String.fromCharCodes(codeUnits, start, start + oneBytes);
+      start += oneBytes;
+      if (start == end) {
+        return firstPart;
+      }
+      buffer = StringBuffer(firstPart);
+      isFirstCharacter = false;
+    }
+
+    buffer ??= StringBuffer();
     var decoder = _Utf8Decoder(buffer, _allowMalformed);
+    decoder._isFirstCharacter = isFirstCharacter;
     decoder.convert(codeUnits, start, end);
     decoder.flush(codeUnits, end);
     return buffer.toString();
@@ -412,12 +428,6 @@
     _expectedUnits = 0;
     _extraUnits = 0;
 
-    void addSingleBytes(int from, int to) {
-      assert(from >= startIndex && from <= endIndex);
-      assert(to >= startIndex && to <= endIndex);
-      _stringSink.write(String.fromCharCodes(codeUnits, from, to));
-    }
-
     var i = startIndex;
     loop:
     while (true) {
@@ -477,7 +487,9 @@
         var oneBytes = _scanOneByteCharacters(codeUnits, i, endIndex);
         if (oneBytes > 0) {
           _isFirstCharacter = false;
-          addSingleBytes(i, i + oneBytes);
+          assert(i + oneBytes <= endIndex);
+          _stringSink.write(String.fromCharCodes(codeUnits, i, i + oneBytes));
+
           i += oneBytes;
           if (i == endIndex) break;
         }
diff --git a/sdk/lib/core/annotations.dart b/sdk/lib/core/annotations.dart
index 4034456..2d30f1c 100644
--- a/sdk/lib/core/annotations.dart
+++ b/sdk/lib/core/annotations.dart
@@ -80,7 +80,7 @@
 /**
  * Marks a feature as [Deprecated] until the next release.
  */
-const Deprecated deprecated = const Deprecated("next release");
+const Deprecated deprecated = Deprecated("next release");
 
 class _Override {
   const _Override();
@@ -111,7 +111,7 @@
  * For example, the annotation is intentionally not used in the Dart platform
  * libraries, since they only depend on themselves.
  */
-const Object override = const _Override();
+const Object override = _Override();
 
 /**
  * An annotation class that was used during development of Dart 2.
@@ -184,7 +184,7 @@
  * types.
  */
 @deprecated
-const Object proxy = const _Proxy();
+const Object proxy = _Proxy();
 
 /**
  * A hint to tools.
diff --git a/sdk/lib/core/bool.dart b/sdk/lib/core/bool.dart
index e3014bb..5ed1065 100644
--- a/sdk/lib/core/bool.dart
+++ b/sdk/lib/core/bool.dart
@@ -47,7 +47,7 @@
   //ignore: const_constructor_with_body
   //ignore: const_factory
   external const factory bool.fromEnvironment(String name,
-      {bool defaultValue: false});
+      {bool defaultValue = false});
 
   external int get hashCode;
 
diff --git a/sdk/lib/core/comparable.dart b/sdk/lib/core/comparable.dart
index bbb334f..835aa34 100644
--- a/sdk/lib/core/comparable.dart
+++ b/sdk/lib/core/comparable.dart
@@ -18,7 +18,7 @@
  * * zero if [a] is equal to [b], and
  * * a positive integer if [a] is greater than [b].
  */
-typedef int Comparator<T>(T a, T b);
+typedef Comparator<T> = int Function(T a, T b);
 
 /**
  * Interface used by types that have an intrinsic ordering.
diff --git a/sdk/lib/core/date_time.dart b/sdk/lib/core/date_time.dart
index b24c0ea..00ea5a4 100644
--- a/sdk/lib/core/date_time.dart
+++ b/sdk/lib/core/date_time.dart
@@ -223,7 +223,8 @@
   /**
    * Constructs a new [DateTime] instance based on [formattedString].
    *
-   * Throws a [FormatException] if the input cannot be parsed.
+   * The [formattedString] must not be `null`.
+   * Throws a [FormatException] if the input string cannot be parsed.
    *
    * The function parses a subset of ISO 8601
    * which includes the subset accepted by RFC 3339.
@@ -328,14 +329,20 @@
       int value = _brokenDownDateToValue(years, month, day, hour, minute,
           second, millisecond, microsecond, isUtc);
       if (value == null) {
-        throw new FormatException("Time out of range", formattedString);
+        throw FormatException("Time out of range", formattedString);
       }
-      return new DateTime._withValue(value, isUtc: isUtc);
+      return DateTime._withValue(value, isUtc: isUtc);
     } else {
-      throw new FormatException("Invalid date format", formattedString);
+      throw FormatException("Invalid date format", formattedString);
     }
   }
 
+  /**
+   * Constructs a new [DateTime] instance based on [formattedString].
+   *
+   * Works like [parse] except that this function returns `null`
+   * where [parse] would throw a [FormatException].
+   */
   static DateTime tryParse(String formattedString) {
     // TODO: Optimize to avoid throwing.
     try {
@@ -358,7 +365,7 @@
    * time zone (local or UTC).
    */
   external DateTime.fromMillisecondsSinceEpoch(int millisecondsSinceEpoch,
-      {bool isUtc: false});
+      {bool isUtc = false});
 
   /**
    * Constructs a new [DateTime] instance
@@ -371,7 +378,7 @@
    * time zone (local or UTC).
    */
   external DateTime.fromMicrosecondsSinceEpoch(int microsecondsSinceEpoch,
-      {bool isUtc: false});
+      {bool isUtc = false});
 
   /**
    * Constructs a new [DateTime] instance with the given value.
@@ -382,11 +389,11 @@
     if (millisecondsSinceEpoch.abs() > _maxMillisecondsSinceEpoch ||
         (millisecondsSinceEpoch.abs() == _maxMillisecondsSinceEpoch &&
             microsecond != 0)) {
-      throw new ArgumentError(
+      throw ArgumentError(
           "DateTime is outside valid range: $millisecondsSinceEpoch");
     }
     if (isUtc == null) {
-      throw new ArgumentError("'isUtc' flag may not be 'null'");
+      throw ArgumentError("'isUtc' flag may not be 'null'");
     }
   }
 
@@ -498,7 +505,7 @@
    */
   DateTime toLocal() {
     if (isUtc) {
-      return new DateTime._withValue(_value, isUtc: false);
+      return DateTime._withValue(_value, isUtc: false);
     }
     return this;
   }
@@ -516,7 +523,7 @@
    */
   DateTime toUtc() {
     if (isUtc) return this;
-    return new DateTime._withValue(_value, isUtc: true);
+    return DateTime._withValue(_value, isUtc: true);
   }
 
   static String _fourDigits(int n) {
@@ -859,7 +866,7 @@
    * timezone ::= 'z' | 'Z' | sign digit{2} timezonemins_opt
    * timezonemins_opt ::= <empty> | colon_opt digit{2}
    */
-  static final RegExp _parseFormat = new RegExp(
+  static final RegExp _parseFormat = RegExp(
       r'^([+-]?\d{4,6})-?(\d\d)-?(\d\d)' // Day part.
       r'(?:[ T](\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,6}))?)?)?' // Time part.
       r'( ?[zZ]| ?([-+])(\d\d)(?::?(\d\d))?)?)?$'); // Timezone part.
diff --git a/sdk/lib/core/double.dart b/sdk/lib/core/double.dart
index 167e18d..61191ec 100644
--- a/sdk/lib/core/double.dart
+++ b/sdk/lib/core/double.dart
@@ -178,17 +178,17 @@
    * optionally followed by a decimal point and optionally more digits. The
    * (optional) exponent part consists of the character "e" or "E", an optional
    * sign, and one or more digits.
+   * The [source] must not be `null`.
    *
    * Leading and trailing whitespace is ignored.
    *
-   * If the [source] is not a valid double literal, the [onError]
+   * If the [source] string is not a valid double literal, the [onError]
    * is called with the [source] as argument, and its return value is
    * used instead. If no `onError` is provided, a [FormatException]
    * is thrown instead.
    *
    * The [onError] function is only invoked if [source] is a [String] with an
-   * invalid format. It is not invoked if the [source] is invalid for some
-   * other reason, for example by being `null`.
+   * invalid format. It is not invoked if [source] is `null`.
    *
    * Examples of accepted strings:
    *
@@ -212,7 +212,7 @@
    * Parse [source] as an double literal and return its value.
    *
    * Like [parse] except that this function returns `null` for invalid inputs
-   * instead of throwing.
+   * instead of throwing, and the [source] must still not be `null`.
    */
   external static double tryParse(String source);
 }
diff --git a/sdk/lib/core/duration.dart b/sdk/lib/core/duration.dart
index 52bfc29..914f05a 100644
--- a/sdk/lib/core/duration.dart
+++ b/sdk/lib/core/duration.dart
@@ -73,7 +73,7 @@
 
   static const int minutesPerDay = minutesPerHour * hoursPerDay;
 
-  static const Duration zero = const Duration(seconds: 0);
+  static const Duration zero = Duration(seconds: 0);
 
   /*
    * The value of this Duration object in microseconds.
@@ -91,12 +91,12 @@
    * All arguments are 0 by default.
    */
   const Duration(
-      {int days: 0,
-      int hours: 0,
-      int minutes: 0,
-      int seconds: 0,
-      int milliseconds: 0,
-      int microseconds: 0})
+      {int days = 0,
+      int hours = 0,
+      int minutes = 0,
+      int seconds = 0,
+      int milliseconds = 0,
+      int microseconds = 0})
       : this._microseconds(microsecondsPerDay * days +
             microsecondsPerHour * hours +
             microsecondsPerMinute * minutes +
@@ -113,7 +113,7 @@
    * returns the sum as a new Duration object.
    */
   Duration operator +(Duration other) {
-    return new Duration._microseconds(_duration + other._duration);
+    return Duration._microseconds(_duration + other._duration);
   }
 
   /**
@@ -121,7 +121,7 @@
    * returns the difference as a new Duration object.
    */
   Duration operator -(Duration other) {
-    return new Duration._microseconds(_duration - other._duration);
+    return Duration._microseconds(_duration - other._duration);
   }
 
   /**
@@ -132,7 +132,7 @@
    * 53 bits, precision is lost because of double-precision arithmetic.
    */
   Duration operator *(num factor) {
-    return new Duration._microseconds((_duration * factor).round());
+    return Duration._microseconds((_duration * factor).round());
   }
 
   /**
@@ -144,8 +144,8 @@
   Duration operator ~/(int quotient) {
     // By doing the check here instead of relying on "~/" below we get the
     // exception even with dart2js.
-    if (quotient == 0) throw new IntegerDivisionByZeroException();
-    return new Duration._microseconds(_duration ~/ quotient);
+    if (quotient == 0) throw IntegerDivisionByZeroException();
+    return Duration._microseconds(_duration ~/ quotient);
   }
 
   /**
@@ -280,7 +280,7 @@
    * The returned `Duration` has the same length as this one, but is always
    * positive.
    */
-  Duration abs() => new Duration._microseconds(_duration.abs());
+  Duration abs() => Duration._microseconds(_duration.abs());
 
   /**
    * Returns a new `Duration` representing this `Duration` negated.
@@ -289,5 +289,5 @@
    * opposite sign of this one.
    */
   // Using subtraction helps dart2js avoid negative zeros.
-  Duration operator -() => new Duration._microseconds(0 - _duration);
+  Duration operator -() => Duration._microseconds(0 - _duration);
 }
diff --git a/sdk/lib/core/errors.dart b/sdk/lib/core/errors.dart
index 1bd829d..53f3d35 100644
--- a/sdk/lib/core/errors.dart
+++ b/sdk/lib/core/errors.dart
@@ -278,7 +278,7 @@
   static void checkValueInInterval(int value, int minValue, int maxValue,
       [String name, String message]) {
     if (value < minValue || value > maxValue) {
-      throw new RangeError.range(value, minValue, maxValue, name, message);
+      throw RangeError.range(value, minValue, maxValue, name, message);
     }
   }
 
@@ -299,7 +299,7 @@
     // Comparing with `0` as receiver produces better dart2js type inference.
     if (0 > index || index >= length) {
       name ??= "index";
-      throw new RangeError.index(index, indexable, name, message, length);
+      throw RangeError.index(index, indexable, name, message, length);
     }
   }
 
@@ -325,12 +325,12 @@
     // Ditto `start > end` below.
     if (0 > start || start > length) {
       startName ??= "start";
-      throw new RangeError.range(start, 0, length, startName, message);
+      throw RangeError.range(start, 0, length, startName, message);
     }
     if (end != null) {
       if (start > end || end > length) {
         endName ??= "end";
-        throw new RangeError.range(end, start, length, endName, message);
+        throw RangeError.range(end, start, length, endName, message);
       }
       return end;
     }
@@ -343,7 +343,7 @@
    * Throws if the value is negative.
    */
   static void checkNotNegative(int value, [String name, String message]) {
-    if (value < 0) throw new RangeError.range(value, 0, null, name, message);
+    if (value < 0) throw RangeError.range(value, 0, null, name, message);
   }
 
   String get _errorName => "RangeError";
diff --git a/sdk/lib/core/exceptions.dart b/sdk/lib/core/exceptions.dart
index 103940c..2e137e5 100644
--- a/sdk/lib/core/exceptions.dart
+++ b/sdk/lib/core/exceptions.dart
@@ -18,7 +18,7 @@
  * until the actual exceptions used by a library are done.
  */
 abstract class Exception {
-  factory Exception([var message]) => new _Exception(message);
+  factory Exception([var message]) => _Exception(message);
 }
 
 /** Default implementation of [Exception] which carries a message. */
diff --git a/sdk/lib/core/int.dart b/sdk/lib/core/int.dart
index 69b3eae..2c4a3ca 100644
--- a/sdk/lib/core/int.dart
+++ b/sdk/lib/core/int.dart
@@ -278,7 +278,7 @@
   double truncateToDouble();
 
   /**
-   * Returns a String-representation of this integer.
+   * Returns a string representation of this integer.
    *
    * The returned string is parsable by [parse].
    * For any `int` `i`, it is guaranteed that
@@ -299,8 +299,9 @@
   /**
    * Parse [source] as a, possibly signed, integer literal and return its value.
    *
-   * The [source] must be either a non-empty sequence of base-[radix] digits,
+   * The [source] must be a non-empty sequence of base-[radix] digits,
    * optionally prefixed with a minus or plus sign ('-' or '+').
+   * It must not be `null`.
    *
    * The [radix] must be in the range 2..36. The digits used are
    * first the decimal digits 0..9, and then the letters 'a'..'z' with
@@ -319,7 +320,7 @@
    * For any int `n` and valid radix `r`, it is guaranteed that
    * `n == int.parse(n.toRadixString(r), radix: r)`.
    *
-   * If the [source] does not contain a valid integer literal,
+   * If the [source] string does not contain a valid integer literal,
    * optionally prefixed by a sign, a [FormatException] is thrown
    * (unless the deprecated [onError] parameter is used, see below).
    *
@@ -335,7 +336,7 @@
    * Instead of `int.parse(string, onError: (string) => ...)`,
    * you should use `int.tryParse(string) ?? (...)`.
    *
-   * When source is not valid and [onError] is provided,
+   * When the source string is not valid and [onError] is provided,
    * whenever a [FormatException] would be thrown,
    * [onError] is instead called with [source] as argument,
    * and the result of that call is returned by [parse].
@@ -347,7 +348,8 @@
    * Parse [source] as a, possibly signed, integer literal and return its value.
    *
    * Like [parse] except that this function returns `null` where a
-   * similar call to [parse] would throw a [FormatException].
+   * similar call to [parse] would throw a [FormatException],
+   * and the [source] must still not be `null`.
    */
   external static int tryParse(String source, {int radix});
 }
diff --git a/sdk/lib/core/invocation.dart b/sdk/lib/core/invocation.dart
index 3cae040..e9ea57e 100644
--- a/sdk/lib/core/invocation.dart
+++ b/sdk/lib/core/invocation.dart
@@ -23,8 +23,7 @@
   factory Invocation.method(
           Symbol memberName, Iterable<Object> positionalArguments,
           [Map<Symbol, Object> namedArguments]) =>
-      new _Invocation.method(
-          memberName, null, positionalArguments, namedArguments);
+      _Invocation.method(memberName, null, positionalArguments, namedArguments);
 
   /**
    * Creates an invocation corresponding to a generic method invocation.
@@ -38,7 +37,7 @@
   factory Invocation.genericMethod(Symbol memberName,
           Iterable<Type> typeArguments, Iterable<Object> positionalArguments,
           [Map<Symbol, Object> namedArguments]) =>
-      new _Invocation.method(
+      _Invocation.method(
           memberName, typeArguments, positionalArguments, namedArguments);
 
   /**
@@ -123,7 +122,7 @@
         _positional = _makeUnmodifiable<Object>(positional) ?? const <Object>[],
         _named = (named == null || named.isEmpty)
             ? const <Symbol, Object>{}
-            : new Map<Symbol, Object>.unmodifiable(named);
+            : Map<Symbol, Object>.unmodifiable(named);
 
   _Invocation.getter(this.memberName)
       : typeArguments = const <Type>[],
@@ -132,7 +131,7 @@
 
   _Invocation.setter(this.memberName, Object argument)
       : typeArguments = const <Type>[],
-        _positional = new List<Object>.unmodifiable([argument]),
+        _positional = List<Object>.unmodifiable([argument]),
         _named = null;
 
   List<dynamic> get positionalArguments => _positional ?? const <Object>[];
@@ -149,7 +148,7 @@
     if (types == null) return const <Type>[];
     for (int i = 0; i < types.length; i++) {
       if (types[i] == null) {
-        throw new ArgumentError(
+        throw ArgumentError(
             "Type arguments must be non-null, was null at index $i.");
       }
     }
@@ -158,6 +157,6 @@
 
   static List<T> _makeUnmodifiable<T>(Iterable<T> elements) {
     if (elements == null) return null;
-    return new List<T>.unmodifiable(elements);
+    return List<T>.unmodifiable(elements);
   }
 }
diff --git a/sdk/lib/core/iterable.dart b/sdk/lib/core/iterable.dart
index 3436b58..0744937 100644
--- a/sdk/lib/core/iterable.dart
+++ b/sdk/lib/core/iterable.dart
@@ -93,15 +93,15 @@
    *
    * If [generator] is omitted, it defaults to an identity function
    * on integers `(int x) => x`, so it may only be omitted if the type
-   * parameter allows integer values. That is, if [E] is one of
-   * `int`, `num`, `Object` or `dynamic`.
+   * parameter allows integer values. That is, if [E] is a super-type
+   * of [int].
    *
    * As an `Iterable`, `new Iterable.generate(n, generator))` is equivalent to
    * `const [0, ..., n - 1].map(generator)`.
    */
   factory Iterable.generate(int count, [E generator(int index)]) {
-    if (count <= 0) return new EmptyIterable<E>();
-    return new _GeneratorIterable<E>(count, generator);
+    if (count <= 0) return EmptyIterable<E>();
+    return _GeneratorIterable<E>(count, generator);
   }
 
   /**
@@ -121,7 +121,7 @@
    * are accessed, then the resulting iterable can be used as an `Iterable<T>`.
    */
   static Iterable<T> castFrom<S, T>(Iterable<S> source) =>
-      new CastIterable<S, T>(source);
+      CastIterable<S, T>(source);
 
   /**
    * Returns a new `Iterator` that allows iterating the elements of this
@@ -173,9 +173,9 @@
    */
   Iterable<E> followedBy(Iterable<E> other) {
     if (this is EfficientLengthIterable<E>) {
-      return new FollowedByIterable<E>.firstEfficient(this, other);
+      return FollowedByIterable<E>.firstEfficient(this, other);
     }
-    return new FollowedByIterable<E>(this, other);
+    return FollowedByIterable<E>(this, other);
   }
 
   /**
@@ -192,7 +192,7 @@
    * on any element where the result isn't needed.
    * For example, [elementAt] may call `f` only once.
    */
-  Iterable<T> map<T>(T f(E e)) => new MappedIterable<E, T>(this, f);
+  Iterable<T> map<T>(T f(E e)) => MappedIterable<E, T>(this, f);
 
   /**
    * Returns a new lazy [Iterable] with all elements that satisfy the
@@ -208,7 +208,7 @@
    * the returned [Iterable] may invoke the supplied
    * function [test] multiple times on the same element.
    */
-  Iterable<E> where(bool test(E element)) => new WhereIterable<E>(this, test);
+  Iterable<E> where(bool test(E element)) => WhereIterable<E>(this, test);
 
   /**
    * Returns a new lazy [Iterable] with all elements that have type [T].
@@ -221,7 +221,7 @@
    * the returned [Iterable] may yield different results,
    * if the underlying elements change between iterations.
    */
-  Iterable<T> whereType<T>() => new WhereTypeIterable<T>(this);
+  Iterable<T> whereType<T>() => WhereTypeIterable<T>(this);
 
   /**
    * Expands each element of this [Iterable] into zero or more elements.
@@ -244,7 +244,7 @@
    *
    */
   Iterable<T> expand<T>(Iterable<T> f(E element)) =>
-      new ExpandIterable<E, T>(this, f);
+      ExpandIterable<E, T>(this, f);
 
   /**
    * Returns true if the collection contains an element equal to [element].
@@ -360,7 +360,7 @@
   String join([String separator = ""]) {
     Iterator<E> iterator = this.iterator;
     if (!iterator.moveNext()) return "";
-    StringBuffer buffer = new StringBuffer();
+    StringBuffer buffer = StringBuffer();
     if (separator == null || separator == "") {
       do {
         buffer.write("${iterator.current}");
@@ -394,8 +394,8 @@
    * The elements are in iteration order.
    * The list is fixed-length if [growable] is false.
    */
-  List<E> toList({bool growable: true}) {
-    return new List<E>.from(this, growable: growable);
+  List<E> toList({bool growable = true}) {
+    return List<E>.from(this, growable: growable);
   }
 
   /**
@@ -407,7 +407,7 @@
    * The order of the elements in the set is not guaranteed to be the same
    * as for the iterable.
    */
-  Set<E> toSet() => new Set<E>.from(this);
+  Set<E> toSet() => Set<E>.from(this);
 
   /**
    * Returns the number of elements in [this].
@@ -452,7 +452,7 @@
    * The `count` must not be negative.
    */
   Iterable<E> take(int count) {
-    return new TakeIterable<E>(this, count);
+    return TakeIterable<E>(this, count);
   }
 
   /**
@@ -466,7 +466,7 @@
    * the returned iterable stops (its `moveNext()` returns false).
    */
   Iterable<E> takeWhile(bool test(E value)) {
-    return new TakeWhileIterable<E>(this, test);
+    return TakeWhileIterable<E>(this, test);
   }
 
   /**
@@ -486,7 +486,7 @@
    * The [count] must not be negative.
    */
   Iterable<E> skip(int count) {
-    return new SkipIterable<E>(this, count);
+    return SkipIterable<E>(this, count);
   }
 
   /**
@@ -502,7 +502,7 @@
    * starting with the first element for which `test(element)` returns `false`.
    */
   Iterable<E> skipWhile(bool test(E value)) {
-    return new SkipWhileIterable<E>(this, test);
+    return SkipWhileIterable<E>(this, test);
   }
 
   /**
@@ -645,7 +645,7 @@
       if (index == elementIndex) return element;
       elementIndex++;
     }
-    throw new RangeError.index(index, this, "index", null, elementIndex);
+    throw RangeError.index(index, this, "index", null, elementIndex);
   }
 
   /**
@@ -667,7 +667,7 @@
   String toString() => IterableBase.iterableToShortString(this, '(', ')');
 }
 
-typedef E _Generator<E>(int index);
+typedef _Generator<E> = E Function(int index);
 
 class _GeneratorIterable<E> extends ListIterable<E> {
   /// The length of the generated iterable.
diff --git a/sdk/lib/core/list.dart b/sdk/lib/core/list.dart
index 66de4e5..fff3d7a 100644
--- a/sdk/lib/core/list.dart
+++ b/sdk/lib/core/list.dart
@@ -108,7 +108,7 @@
    * print(unique); // => [[499], [], []]
    * ```
    */
-  external factory List.filled(int length, E fill, {bool growable: false});
+  external factory List.filled(int length, E fill, {bool growable = false});
 
   /**
    * Creates a list containing all [elements].
@@ -127,7 +127,7 @@
    * This constructor creates a growable list when [growable] is true;
    * otherwise, it returns a fixed-length list.
    */
-  external factory List.from(Iterable elements, {bool growable: true});
+  external factory List.from(Iterable elements, {bool growable = true});
 
   /**
    * Creates a list from [elements].
@@ -137,8 +137,8 @@
    * This constructor creates a growable list when [growable] is true;
    * otherwise, it returns a fixed-length list.
    */
-  factory List.of(Iterable<E> elements, {bool growable: true}) =>
-      new List<E>.from(elements, growable: growable);
+  factory List.of(Iterable<E> elements, {bool growable = true}) =>
+      List<E>.from(elements, growable: growable);
 
   /**
    * Generates a list of values.
@@ -152,12 +152,12 @@
    * The created list is fixed-length unless [growable] is true.
    */
   factory List.generate(int length, E generator(int index),
-      {bool growable: true}) {
+      {bool growable = true}) {
     List<E> result;
     if (growable) {
       result = <E>[]..length = length;
     } else {
-      result = new List<E>(length);
+      result = List<E>(length);
     }
     for (int i = 0; i < length; i++) {
       result[i] = generator(i);
@@ -190,7 +190,7 @@
    * of [S],
    * then the returned list can be used as a `List<T>`.
    */
-  static List<T> castFrom<S, T>(List<S> source) => new CastList<S, T>(source);
+  static List<T> castFrom<S, T>(List<S> source) => CastList<S, T>(source);
 
   /**
    * Copy a range of one list into another list.
@@ -214,7 +214,7 @@
     end = RangeError.checkValidRange(start, end, source.length);
     int length = end - start;
     if (target.length < at + length) {
-      throw new ArgumentError.value(target, "target",
+      throw ArgumentError.value(target, "target",
           "Not big enough to hold $length elements at position $at");
     }
     if (!identical(source, target) || start >= at) {
@@ -247,7 +247,7 @@
     int targetLength = target.length;
     for (var element in source) {
       if (index == targetLength) {
-        throw new IndexError(targetLength, target);
+        throw IndexError(targetLength, target);
       }
       target[index] = element;
       index++;
diff --git a/sdk/lib/core/map.dart b/sdk/lib/core/map.dart
index 0c2f586..f914fe1 100644
--- a/sdk/lib/core/map.dart
+++ b/sdk/lib/core/map.dart
@@ -170,7 +170,7 @@
    * then the returned map can be used as a `Map<K2, V2>`.
    */
   static Map<K2, V2> castFrom<K, V, K2, V2>(Map<K, V> source) =>
-      new CastMap<K, V, K2, V2>(source);
+      CastMap<K, V, K2, V2>(source);
 
   /**
    * Creates a new map and adds all entries.
diff --git a/sdk/lib/core/null.dart b/sdk/lib/core/null.dart
index 212fb47..af7d86d 100644
--- a/sdk/lib/core/null.dart
+++ b/sdk/lib/core/null.dart
@@ -14,7 +14,7 @@
 @pragma("vm:entry-point")
 class Null {
   factory Null._uninstantiable() {
-    throw new UnsupportedError('class Null cannot be instantiated');
+    throw UnsupportedError('class Null cannot be instantiated');
   }
 
   external int get hashCode;
diff --git a/sdk/lib/core/num.dart b/sdk/lib/core/num.dart
index afad926..e04112c 100644
--- a/sdk/lib/core/num.dart
+++ b/sdk/lib/core/num.dart
@@ -100,6 +100,7 @@
    * print(double.infinity < double.nan);  // => false
    * print(double.nan < double.infinity);  // => false
    * print(double.nan == double.infinity);  // => false
+   * ```
    */
   int compareTo(num other);
 
@@ -470,7 +471,7 @@
   static num parse(String input, [@deprecated num onError(String input)]) {
     num result = tryParse(input);
     if (result != null) return result;
-    if (onError == null) throw new FormatException(input);
+    if (onError == null) throw FormatException(input);
     return onError(input);
   }
 
diff --git a/sdk/lib/core/regexp.dart b/sdk/lib/core/regexp.dart
index 9164fb9..c0bd153 100644
--- a/sdk/lib/core/regexp.dart
+++ b/sdk/lib/core/regexp.dart
@@ -60,7 +60,7 @@
    * interpolation is required.
    */
   external factory RegExp(String source,
-      {bool multiLine: false, bool caseSensitive: true});
+      {bool multiLine = false, bool caseSensitive = true});
 
   /**
    * Returns a regular expression that matches [text].
@@ -121,3 +121,30 @@
    */
   bool get isCaseSensitive;
 }
+
+/**
+ * A regular expression match.
+ *
+ * Regular expression matches are [Match]es, but also include the ability
+ * to retrieve the names for any named capture groups and to retrieve
+ * matches for named capture groups by name instead of their index.
+ */
+abstract class RegExpMatch implements Match {
+  /**
+   * The string matched by the group named [name].
+   *
+   * Returns the string matched by the capture group named [name], or
+   * `null` if no string was matched by that capture group as part of
+   * this match.
+   *
+   * The [name] must be the name of a named capture group in the regular
+   * expression creating this match (that is, the name must be in
+   * [groupNames]).
+   */
+  String namedGroup(String name);
+
+  /**
+   * The names of the captured groups in the match.
+   */
+  Iterable<String> get groupNames;
+}
diff --git a/sdk/lib/core/set.dart b/sdk/lib/core/set.dart
index 7b477df..e57d974 100644
--- a/sdk/lib/core/set.dart
+++ b/sdk/lib/core/set.dart
@@ -111,7 +111,7 @@
    * then the returned set can be used as a `Set<T>`.
    */
   static Set<T> castFrom<S, T>(Set<S> source, {Set<R> Function<R>() newSet}) =>
-      new CastSet<S, T>(source, newSet);
+      CastSet<S, T>(source, newSet);
 
   /**
    * Provides a view of this set as a set of [R] instances.
diff --git a/sdk/lib/core/stopwatch.dart b/sdk/lib/core/stopwatch.dart
index d32e1c2..45d71ca 100644
--- a/sdk/lib/core/stopwatch.dart
+++ b/sdk/lib/core/stopwatch.dart
@@ -9,7 +9,9 @@
  */
 class Stopwatch {
   /**
-   * Cached frequency of the system. Must be initialized in [_initTicker];
+   * Cached frequency of the system in Hz (ticks per second).
+   *
+   * Must be initialized in [_initTicker];
    */
   static int _frequency;
 
@@ -94,22 +96,18 @@
    * The [elapsedTicks] counter converted to a [Duration].
    */
   Duration get elapsed {
-    return new Duration(microseconds: elapsedMicroseconds);
+    return Duration(microseconds: elapsedMicroseconds);
   }
 
   /**
    * The [elapsedTicks] counter converted to microseconds.
    */
-  int get elapsedMicroseconds {
-    return (elapsedTicks * 1000000) ~/ frequency;
-  }
+  external int get elapsedMicroseconds;
 
   /**
    * The [elapsedTicks] counter converted to milliseconds.
    */
-  int get elapsedMilliseconds {
-    return (elapsedTicks * 1000) ~/ frequency;
-  }
+  external int get elapsedMilliseconds;
 
   /**
    * Whether the [Stopwatch] is currently running.
diff --git a/sdk/lib/core/string.dart b/sdk/lib/core/string.dart
index 0c81f28..c611bd5 100644
--- a/sdk/lib/core/string.dart
+++ b/sdk/lib/core/string.dart
@@ -639,11 +639,11 @@
   final String string;
   Runes(this.string);
 
-  RuneIterator get iterator => new RuneIterator(string);
+  RuneIterator get iterator => RuneIterator(string);
 
   int get last {
     if (string.length == 0) {
-      throw new StateError('No elements.');
+      throw StateError('No elements.');
     }
     int length = string.length;
     int code = string.codeUnitAt(length - 1);
@@ -716,7 +716,7 @@
         index < string.length &&
         _isLeadSurrogate(string.codeUnitAt(index - 1)) &&
         _isTrailSurrogate(string.codeUnitAt(index))) {
-      throw new ArgumentError('Index inside surrogate pair: $index');
+      throw ArgumentError('Index inside surrogate pair: $index');
     }
   }
 
diff --git a/sdk/lib/core/symbol.dart b/sdk/lib/core/symbol.dart
index 459aad3..a46ec97 100644
--- a/sdk/lib/core/symbol.dart
+++ b/sdk/lib/core/symbol.dart
@@ -7,7 +7,7 @@
 /// Opaque name used by mirrors, invocations and [Function.apply].
 abstract class Symbol {
   /** The symbol corresponding to the name of the unary minus operator. */
-  static const Symbol unaryMinus = const Symbol("unary-");
+  static const Symbol unaryMinus = Symbol("unary-");
 
   /**
    * The empty symbol.
@@ -15,7 +15,7 @@
    * The empty symbol is the name of libraries with no library declaration,
    * and the base-name of the unnamed constructor.
    */
-  static const Symbol empty = const Symbol("");
+  static const Symbol empty = Symbol("");
 
   /**
    * Constructs a new [Symbol] representing the provided name.
@@ -68,7 +68,7 @@
    * a private symbol literal like `#_foo`.
    * ```dart
    * const Symbol("_foo") // Invalid
-   * ``
+   * ```
    *
    * The created instance overrides [Object.==].
    *
diff --git a/sdk/lib/core/uri.dart b/sdk/lib/core/uri.dart
index 2d59ad4..2c7d918 100644
--- a/sdk/lib/core/uri.dart
+++ b/sdk/lib/core/uri.dart
@@ -300,8 +300,8 @@
       {String mimeType,
       Encoding encoding,
       Map<String, String> parameters,
-      bool base64: false}) {
-    UriData data = new UriData.fromString(content,
+      bool base64 = false}) {
+    UriData data = UriData.fromString(content,
         mimeType: mimeType,
         encoding: encoding,
         parameters: parameters,
@@ -326,10 +326,10 @@
    * encoded.
    */
   factory Uri.dataFromBytes(List<int> bytes,
-      {mimeType: "application/octet-stream",
+      {mimeType = "application/octet-stream",
       Map<String, String> parameters,
-      percentEncoded: false}) {
-    UriData data = new UriData.fromBytes(bytes,
+      percentEncoded = false}) {
+    UriData data = UriData.fromBytes(bytes,
         mimeType: mimeType,
         parameters: parameters,
         percentEncoded: percentEncoded);
@@ -725,10 +725,11 @@
   /**
    * Creates a new `Uri` object by parsing a URI string.
    *
-   * If [start] and [end] are provided, only the substring from `start`
-   * to `end` is parsed as a URI.
+   * If [start] and [end] are provided, they must specify a valid substring
+   * of [uri], and only the substring from `start` to `end` is parsed as a URI.
    *
-   * If the string is not valid as a URI or URI reference,
+   * The [uri] must not be `null`.
+   * If the [uri] string is not valid as a URI or URI reference,
    * a [FormatException] is thrown.
    */
   static Uri parse(String uri, [int start = 0, int end]) {
@@ -803,7 +804,7 @@
     // The following index-normalization belongs with the scanning, but is
     // easier to do here because we already have extracted variables from the
     // indices list.
-    var indices = new List<int>(8);
+    var indices = List<int>(8);
 
     // Set default values for each position.
     // The value will either be correct in some cases where it isn't set
@@ -1011,21 +1012,22 @@
         queryStart -= start;
         fragmentStart -= start;
       }
-      return new _SimpleUri(uri, schemeEnd, hostStart, portStart, pathStart,
+      return _SimpleUri(uri, schemeEnd, hostStart, portStart, pathStart,
           queryStart, fragmentStart, scheme);
     }
 
-    return new _Uri.notSimple(uri, start, end, schemeEnd, hostStart, portStart,
+    return _Uri.notSimple(uri, start, end, schemeEnd, hostStart, portStart,
         pathStart, queryStart, fragmentStart, scheme);
   }
 
   /**
    * Creates a new `Uri` object by parsing a URI string.
    *
-   * If [start] and [end] are provided, only the substring from `start`
-   * to `end` is parsed as a URI.
+   * If [start] and [end] are provided, they must specify a valid substring
+   * of [uri], and only the substring from `start` to `end` is parsed as a URI.
+   * The [uri] must not be `null`.
    *
-   * Returns `null` if the string is not valid as a URI or URI reference.
+   * Returns `null` if the [uri] string is not valid as a URI or URI reference.
    */
   static Uri tryParse(String uri, [int start = 0, int end]) {
     // TODO: Optimize to avoid throwing-and-recatching.
@@ -1094,7 +1096,7 @@
    * details.
    */
   static String encodeQueryComponent(String component,
-      {Encoding encoding: utf8}) {
+      {Encoding encoding = utf8}) {
     return _Uri._uriEncode(_Uri._unreservedTable, component, encoding, true);
   }
 
@@ -1125,7 +1127,7 @@
    * UTF-8.
    */
   static String decodeQueryComponent(String encodedComponent,
-      {Encoding encoding: utf8}) {
+      {Encoding encoding = utf8}) {
     return _Uri._uriDecode(
         encodedComponent, 0, encodedComponent.length, encoding, true);
   }
@@ -1169,7 +1171,7 @@
    * is UTF-8.
    */
   static Map<String, String> splitQueryString(String query,
-      {Encoding encoding: utf8}) {
+      {Encoding encoding = utf8}) {
     return query.split("&").fold({}, (map, element) {
       int index = element.indexOf("=");
       if (index == -1) {
@@ -1199,10 +1201,10 @@
   /// Implementation of [parseIPv4Address] that can work on a substring.
   static List<int> _parseIPv4Address(String host, int start, int end) {
     void error(String msg, int position) {
-      throw new FormatException('Illegal IPv4 address, $msg', host, position);
+      throw FormatException('Illegal IPv4 address, $msg', host, position);
     }
 
-    var result = new Uint8List(4);
+    var result = Uint8List(4);
     int partIndex = 0;
     int partStart = start;
     for (int i = start; i < end; i++) {
@@ -1266,7 +1268,7 @@
 
     // Helper function for reporting a badly formatted IPv6 address.
     void error(String msg, [position]) {
-      throw new FormatException('Illegal IPv6 address, $msg', host, position);
+      throw FormatException('Illegal IPv6 address, $msg', host, position);
     }
 
     // Parse a hex block.
@@ -1337,7 +1339,7 @@
     } else if (parts.length != 8) {
       error('an address without a wildcard must contain exactly 8 parts');
     }
-    List<int> bytes = new Uint8List(16);
+    List<int> bytes = Uint8List(16);
     for (int i = 0, index = 0; i < parts.length; i++) {
       int value = parts[i];
       if (value == -1) {
@@ -1474,7 +1476,7 @@
       if (portStart + 1 < pathStart) {
         // Should throw because invalid.
         port = int.parse(uri.substring(portStart + 1, pathStart), onError: (_) {
-          throw new FormatException("Invalid port", uri, portStart + 1);
+          throw FormatException("Invalid port", uri, portStart + 1);
         });
         port = _makePort(port, scheme);
       }
@@ -1489,8 +1491,7 @@
     if (fragmentStart < end) {
       fragment = _makeFragment(uri, fragmentStart + 1, end);
     }
-    return new _Uri._internal(
-        scheme, userInfo, host, port, path, query, fragment);
+    return _Uri._internal(scheme, userInfo, host, port, path, query, fragment);
   }
 
   /// Implementation of [Uri.Uri].
@@ -1528,8 +1529,7 @@
     if (host == null && path.startsWith("//")) {
       host = "";
     }
-    return new _Uri._internal(
-        scheme, userInfo, host, port, path, query, fragment);
+    return _Uri._internal(scheme, userInfo, host, port, path, query, fragment);
   }
 
   /// Implementation of [Uri.http].
@@ -1546,7 +1546,7 @@
 
   String get authority {
     if (!hasAuthority) return "";
-    var sb = new StringBuffer();
+    var sb = StringBuffer();
     _writeAuthority(sb);
     return sb.toString();
   }
@@ -1617,7 +1617,7 @@
 
   // Report a parse failure.
   static void _fail(String uri, int index, String message) {
-    throw new FormatException(message, uri, index);
+    throw FormatException(message, uri, index);
   }
 
   static Uri _makeHttpUri(String scheme, String authority, String unencodedPath,
@@ -1647,15 +1647,14 @@
           if (authority.codeUnitAt(hostEnd) == _RIGHT_BRACKET) break;
         }
         if (hostEnd == authority.length) {
-          throw new FormatException(
+          throw FormatException(
               "Invalid IPv6 host entry.", authority, hostStart);
         }
         Uri.parseIPv6Address(authority, hostStart + 1, hostEnd);
         hostEnd++; // Skip the closing bracket.
         if (hostEnd != authority.length &&
             authority.codeUnitAt(hostEnd) != _COLON) {
-          throw new FormatException(
-              "Invalid end of authority", authority, hostEnd);
+          throw FormatException("Invalid end of authority", authority, hostEnd);
         }
       }
       // Split host and port.
@@ -1670,7 +1669,7 @@
       }
       host = authority.substring(hostStart, hostEnd);
     }
-    return new Uri(
+    return Uri(
         scheme: scheme,
         userInfo: userInfo,
         host: host,
@@ -1701,9 +1700,9 @@
     segments.forEach((segment) {
       if (segment.contains("/")) {
         if (argumentError) {
-          throw new ArgumentError("Illegal path character $segment");
+          throw ArgumentError("Illegal path character $segment");
         } else {
-          throw new UnsupportedError("Illegal path character $segment");
+          throw UnsupportedError("Illegal path character $segment");
         }
       }
     });
@@ -1713,11 +1712,11 @@
       List<String> segments, bool argumentError,
       [int firstSegment = 0]) {
     for (var segment in segments.skip(firstSegment)) {
-      if (segment.contains(new RegExp(r'["*/:<>?\\|]'))) {
+      if (segment.contains(RegExp(r'["*/:<>?\\|]'))) {
         if (argumentError) {
-          throw new ArgumentError("Illegal character in path");
+          throw ArgumentError("Illegal character in path");
         } else {
-          throw new UnsupportedError("Illegal character in path: $segment");
+          throw UnsupportedError("Illegal character in path: $segment");
         }
       }
     }
@@ -1729,11 +1728,11 @@
       return;
     }
     if (argumentError) {
-      throw new ArgumentError(
-          "Illegal drive letter " + new String.fromCharCode(charCode));
+      throw ArgumentError(
+          "Illegal drive letter " + String.fromCharCode(charCode));
     } else {
-      throw new UnsupportedError(
-          "Illegal drive letter " + new String.fromCharCode(charCode));
+      throw UnsupportedError(
+          "Illegal drive letter " + String.fromCharCode(charCode));
     }
   }
 
@@ -1745,10 +1744,10 @@
     }
     if (path.startsWith(sep)) {
       // Absolute file:// URI.
-      return new Uri(scheme: "file", pathSegments: segments);
+      return Uri(scheme: "file", pathSegments: segments);
     } else {
       // Relative URI.
-      return new Uri(pathSegments: segments);
+      return Uri(pathSegments: segments);
     }
   }
 
@@ -1761,7 +1760,7 @@
         if (path.length < 3 ||
             path.codeUnitAt(1) != _COLON ||
             path.codeUnitAt(2) != _BACKSLASH) {
-          throw new ArgumentError(
+          throw ArgumentError(
               r"Windows paths with \\?\ prefix must be absolute");
         }
       }
@@ -1772,8 +1771,7 @@
     if (path.length > 1 && path.codeUnitAt(1) == _COLON) {
       _checkWindowsDriveLetter(path.codeUnitAt(0), true);
       if (path.length == 2 || path.codeUnitAt(2) != _BACKSLASH) {
-        throw new ArgumentError(
-            "Windows paths with drive letter must be absolute");
+        throw ArgumentError("Windows paths with drive letter must be absolute");
       }
       // Absolute file://C:/ URI.
       var pathSegments = path.split(sep);
@@ -1781,7 +1779,7 @@
         pathSegments.add(""); // Extra separator at end.
       }
       _checkWindowsPathReservedCharacters(pathSegments, true, 1);
-      return new Uri(scheme: "file", pathSegments: pathSegments);
+      return Uri(scheme: "file", pathSegments: pathSegments);
     }
 
     if (path.startsWith(sep)) {
@@ -1796,8 +1794,7 @@
         if (slashTerminated && pathSegments.last.isNotEmpty) {
           pathSegments.add(""); // Extra separator at end.
         }
-        return new Uri(
-            scheme: "file", host: hostPart, pathSegments: pathSegments);
+        return Uri(scheme: "file", host: hostPart, pathSegments: pathSegments);
       } else {
         // Absolute file:// URI.
         var pathSegments = path.split(sep);
@@ -1805,7 +1802,7 @@
           pathSegments.add(""); // Extra separator at end.
         }
         _checkWindowsPathReservedCharacters(pathSegments, true);
-        return new Uri(scheme: "file", pathSegments: pathSegments);
+        return Uri(scheme: "file", pathSegments: pathSegments);
       }
     } else {
       // Relative URI.
@@ -1816,7 +1813,7 @@
           pathSegments.last.isNotEmpty) {
         pathSegments.add(""); // Extra separator at end.
       }
-      return new Uri(pathSegments: pathSegments);
+      return Uri(pathSegments: pathSegments);
     }
   }
 
@@ -1887,14 +1884,12 @@
       fragment = this._fragment;
     }
 
-    return new _Uri._internal(
-        scheme, userInfo, host, port, path, query, fragment);
+    return _Uri._internal(scheme, userInfo, host, port, path, query, fragment);
   }
 
   Uri removeFragment() {
     if (!this.hasFragment) return this;
-    return new _Uri._internal(
-        scheme, _userInfo, _host, _port, path, _query, null);
+    return _Uri._internal(scheme, _userInfo, _host, _port, path, _query, null);
   }
 
   List<String> get pathSegments {
@@ -1907,7 +1902,7 @@
     }
     result = (pathToSplit == "")
         ? const <String>[]
-        : new List<String>.unmodifiable(
+        : List<String>.unmodifiable(
             pathToSplit.split("/").map(Uri.decodeComponent));
     _pathSegments = result;
     return result;
@@ -1915,7 +1910,7 @@
 
   Map<String, String> get queryParameters {
     _queryParameters ??=
-        new UnmodifiableMapView<String, String>(Uri.splitQueryString(query));
+        UnmodifiableMapView<String, String>(Uri.splitQueryString(query));
     return _queryParameters;
   }
 
@@ -1924,10 +1919,10 @@
       Map queryParameterLists = _splitQueryStringAll(query);
       for (var key in queryParameterLists.keys) {
         queryParameterLists[key] =
-            new List<String>.unmodifiable(queryParameterLists[key]);
+            List<String>.unmodifiable(queryParameterLists[key]);
       }
       _queryParameterLists =
-          new Map<String, List<String>>.unmodifiable(queryParameterLists);
+          Map<String, List<String>>.unmodifiable(queryParameterLists);
     }
     return _queryParameterLists;
   }
@@ -2007,7 +2002,7 @@
           index += 3;
           continue;
         }
-        buffer ??= new StringBuffer();
+        buffer ??= StringBuffer();
         String slice = host.substring(sectionStart, index);
         if (!isNormalized) slice = slice.toLowerCase();
         buffer.write(slice);
@@ -2025,7 +2020,7 @@
       } else if (_isRegNameChar(char)) {
         if (isNormalized && _UPPER_CASE_A <= char && _UPPER_CASE_Z >= char) {
           // Put initial slice in buffer and continue in non-normalized mode
-          buffer ??= new StringBuffer();
+          buffer ??= StringBuffer();
           if (sectionStart < index) {
             buffer.write(host.substring(sectionStart, index));
             sectionStart = index;
@@ -2044,7 +2039,7 @@
             sourceLength = 2;
           }
         }
-        buffer ??= new StringBuffer();
+        buffer ??= StringBuffer();
         String slice = host.substring(sectionStart, index);
         if (!isNormalized) slice = slice.toLowerCase();
         buffer.write(slice);
@@ -2110,7 +2105,7 @@
     bool ensureLeadingSlash = isFile || hasAuthority;
     if (path == null && pathSegments == null) return isFile ? "/" : "";
     if (path != null && pathSegments != null) {
-      throw new ArgumentError('Both path and pathSegments specified');
+      throw ArgumentError('Both path and pathSegments specified');
     }
     String result;
     if (path != null) {
@@ -2146,14 +2141,14 @@
       Map<String, dynamic /*String|Iterable<String>*/ > queryParameters) {
     if (query != null) {
       if (queryParameters != null) {
-        throw new ArgumentError('Both query and queryParameters specified');
+        throw ArgumentError('Both query and queryParameters specified');
       }
       return _normalizeOrSubstring(query, start, end, _queryCharTable,
           escapeDelimiters: true);
     }
     if (queryParameters == null) return null;
 
-    var result = new StringBuffer();
+    var result = StringBuffer();
     var separator = "";
 
     void writeParameter(String key, String value) {
@@ -2215,7 +2210,7 @@
       if (lowerCase && _UPPER_CASE_A <= value && _UPPER_CASE_Z >= value) {
         value |= 0x20;
       }
-      return new String.fromCharCode(value);
+      return String.fromCharCode(value);
     }
     if (firstDigit >= _LOWER_CASE_A || secondDigit >= _LOWER_CASE_A) {
       // Either digit is lower case.
@@ -2231,7 +2226,7 @@
     List<int> codeUnits;
     if (char < 0x80) {
       // ASCII, a single percent encoded sequence.
-      codeUnits = new List(3);
+      codeUnits = List(3);
       codeUnits[0] = _PERCENT;
       codeUnits[1] = _hexDigits.codeUnitAt(char >> 4);
       codeUnits[2] = _hexDigits.codeUnitAt(char & 0xf);
@@ -2247,7 +2242,7 @@
           flag = 0xf0;
         }
       }
-      codeUnits = new List(3 * encodedBytes);
+      codeUnits = List(3 * encodedBytes);
       int index = 0;
       while (--encodedBytes >= 0) {
         int byte = ((char >> (6 * encodedBytes)) & 0x3f) | flag;
@@ -2258,7 +2253,7 @@
         flag = 0x80; // Following bytes have only high bit set.
       }
     }
-    return new String.fromCharCodes(codeUnits);
+    return String.fromCharCodes(codeUnits);
   }
 
   /**
@@ -2331,7 +2326,7 @@
           }
           replacement = _escapeChar(char);
         }
-        buffer ??= new StringBuffer();
+        buffer ??= StringBuffer();
         buffer.write(component.substring(sectionStart, index));
         buffer.write(replacement);
         index += sourceLength;
@@ -2576,8 +2571,8 @@
       }
     }
     String fragment = reference.hasFragment ? reference.fragment : null;
-    return new _Uri._internal(targetScheme, targetUserInfo, targetHost,
-        targetPort, targetPath, targetQuery, fragment);
+    return _Uri._internal(targetScheme, targetUserInfo, targetHost, targetPort,
+        targetPath, targetQuery, fragment);
   }
 
   bool get hasScheme => scheme.isNotEmpty;
@@ -2596,14 +2591,14 @@
 
   String get origin {
     if (scheme == "") {
-      throw new StateError("Cannot use origin without a scheme: $this");
+      throw StateError("Cannot use origin without a scheme: $this");
     }
     if (scheme != "http" && scheme != "https") {
-      throw new StateError(
+      throw StateError(
           "Origin is only applicable schemes http and https: $this");
     }
     if (_host == null || _host == "") {
-      throw new StateError(
+      throw StateError(
           "A $scheme: URI should have a non-empty host name: $this");
     }
     if (_port == null) return "$scheme://$_host";
@@ -2612,15 +2607,14 @@
 
   String toFilePath({bool windows}) {
     if (scheme != "" && scheme != "file") {
-      throw new UnsupportedError(
-          "Cannot extract a file path from a $scheme URI");
+      throw UnsupportedError("Cannot extract a file path from a $scheme URI");
     }
     if (query != "") {
-      throw new UnsupportedError(
+      throw UnsupportedError(
           "Cannot extract a file path from a URI with a query component");
     }
     if (fragment != "") {
-      throw new UnsupportedError(
+      throw UnsupportedError(
           "Cannot extract a file path from a URI with a fragment component");
     }
     windows ??= _isWindows;
@@ -2629,14 +2623,14 @@
 
   String _toFilePath() {
     if (hasAuthority && host != "") {
-      throw new UnsupportedError(
+      throw UnsupportedError(
           "Cannot extract a non-Windows file path from a file URI "
           "with an authority");
     }
     // Use path segments to have any escapes unescaped.
     var pathSegments = this.pathSegments;
     _checkNonWindowsPathReservedCharacters(pathSegments, false);
-    var result = new StringBuffer();
+    var result = StringBuffer();
     if (hasAbsolutePath) result.write("/");
     result.writeAll(pathSegments, "/");
     return result.toString();
@@ -2654,7 +2648,7 @@
     } else {
       _checkWindowsPathReservedCharacters(segments, false, 0);
     }
-    var result = new StringBuffer();
+    var result = StringBuffer();
     if (uri.hasAbsolutePath && !hasDriveLetter) result.write(r"\");
     if (uri.hasAuthority) {
       var host = uri.host;
@@ -2693,7 +2687,7 @@
    * The [UriData] object can be used to access the media type and data
    * of a `data:` URI.
    */
-  UriData get data => (scheme == "data") ? new UriData.fromUri(this) : null;
+  UriData get data => (scheme == "data") ? UriData.fromUri(this) : null;
 
   String toString() {
     return _text ??= _initializeText();
@@ -2701,7 +2695,7 @@
 
   String _initializeText() {
     assert(_text == null);
-    StringBuffer sb = new StringBuffer();
+    StringBuffer sb = StringBuffer();
     if (scheme.isNotEmpty) sb..write(scheme)..write(":");
     if (hasAuthority || (scheme == "file")) {
       // File URIS always have the authority, even if it is empty.
@@ -2737,7 +2731,7 @@
   static List<String> _createList() => <String>[];
 
   static Map<String, List<String>> _splitQueryStringAll(String query,
-      {Encoding encoding: utf8}) {
+      {Encoding encoding = utf8}) {
     var result = <String, List<String>>{};
     int i = 0;
     int start = 0;
@@ -2791,7 +2785,7 @@
         if (0x61 <= charCode && charCode <= 0x66) {
           byte = byte * 16 + charCode - 0x57;
         } else {
-          throw new ArgumentError("Invalid URL encoding");
+          throw ArgumentError("Invalid URL encoding");
         }
       }
     }
@@ -2835,15 +2829,15 @@
         bytes = text.substring(start, end).codeUnits;
       }
     } else {
-      bytes = new List();
+      bytes = List();
       for (int i = start; i < end; i++) {
         var codeUnit = text.codeUnitAt(i);
         if (codeUnit > 127) {
-          throw new ArgumentError("Illegal percent encoding in URI");
+          throw ArgumentError("Illegal percent encoding in URI");
         }
         if (codeUnit == _PERCENT) {
           if (i + 3 > text.length) {
-            throw new ArgumentError('Truncated URI');
+            throw ArgumentError('Truncated URI');
           }
           bytes.add(_hexCharPairToByte(text, i + 1));
           i += 2;
@@ -2872,7 +2866,7 @@
   // be escaped or not.
 
   // The unreserved characters of RFC 3986.
-  static const _unreservedTable = const <int>[
+  static const _unreservedTable = <int>[
     //                     LSB            MSB
     //                      |              |
     0x0000, // 0x00 - 0x0f  0000000000000000
@@ -2892,7 +2886,7 @@
   ];
 
   // The unreserved characters of RFC 2396.
-  static const _unreserved2396Table = const <int>[
+  static const _unreserved2396Table = <int>[
     //                     LSB            MSB
     //                      |              |
     0x0000, // 0x00 - 0x0f  0000000000000000
@@ -2912,7 +2906,7 @@
   ];
 
   // Table of reserved characters specified by ECMAScript 5.
-  static const _encodeFullTable = const <int>[
+  static const _encodeFullTable = <int>[
     //                     LSB            MSB
     //                      |              |
     0x0000, // 0x00 - 0x0f  0000000000000000
@@ -2932,7 +2926,7 @@
   ];
 
   // Characters allowed in the scheme.
-  static const _schemeTable = const <int>[
+  static const _schemeTable = <int>[
     //                     LSB            MSB
     //                      |              |
     0x0000, // 0x00 - 0x0f  0000000000000000
@@ -2952,7 +2946,7 @@
   ];
 
   // Characters allowed in scheme except for upper case letters.
-  static const _schemeLowerTable = const <int>[
+  static const _schemeLowerTable = <int>[
     //                     LSB            MSB
     //                      |              |
     0x0000, // 0x00 - 0x0f  0000000000000000
@@ -2976,7 +2970,7 @@
   //         / "*" / "+" / "," / ";" / "="
   // RFC 3986 section 2.3.
   // unreserved  = ALPHA / DIGIT / "-" / "." / "_" / "~"
-  static const _subDelimitersTable = const <int>[
+  static const _subDelimitersTable = <int>[
     //                     LSB            MSB
     //                      |              |
     0x0000, // 0x00 - 0x0f  0000000000000000
@@ -2998,7 +2992,7 @@
   // General delimiter characters, RFC 3986 section 2.2.
   // gen-delims  = ":" / "/" / "?" / "#" / "[" / "]" / "@"
   //
-  static const _genDelimitersTable = const <int>[
+  static const _genDelimitersTable = <int>[
     //                     LSB            MSB
     //                      |              |
     0x0000, // 0x00 - 0x0f  0000000000000000
@@ -3020,7 +3014,7 @@
   // Characters allowed in the userinfo as of RFC 3986.
   // RFC 3986 Appendix A
   // userinfo = *( unreserved / pct-encoded / sub-delims / ':')
-  static const _userinfoTable = const <int>[
+  static const _userinfoTable = <int>[
     //                     LSB            MSB
     //                      |              |
     0x0000, // 0x00 - 0x0f  0000000000000000
@@ -3042,7 +3036,7 @@
   // Characters allowed in the reg-name as of RFC 3986.
   // RFC 3986 Appendix A
   // reg-name = *( unreserved / pct-encoded / sub-delims )
-  static const _regNameTable = const <int>[
+  static const _regNameTable = <int>[
     //                     LSB            MSB
     //                      |              |
     0x0000, // 0x00 - 0x0f  0000000000000000
@@ -3064,7 +3058,7 @@
   // Characters allowed in the path as of RFC 3986.
   // RFC 3986 section 3.3.
   // pchar = unreserved / pct-encoded / sub-delims / ":" / "@"
-  static const _pathCharTable = const <int>[
+  static const _pathCharTable = <int>[
     //                     LSB            MSB
     //                      |              |
     0x0000, // 0x00 - 0x0f  0000000000000000
@@ -3085,7 +3079,7 @@
 
   // Characters allowed in the path as of RFC 3986.
   // RFC 3986 section 3.3 *and* slash.
-  static const _pathCharOrSlashTable = const [
+  static const _pathCharOrSlashTable = [
     //                     LSB            MSB
     //                      |              |
     0x0000, // 0x00 - 0x0f  0000000000000000
@@ -3108,7 +3102,7 @@
   // Characters allowed in the query as of RFC 3986.
   // RFC 3986 section 3.4.
   // query = *( pchar / "/" / "?" )
-  static const _queryCharTable = const [
+  static const _queryCharTable = [
     //                     LSB            MSB
     //                      |              |
     0x0000, // 0x00 - 0x0f  0000000000000000
@@ -3195,8 +3189,8 @@
       {String mimeType,
       Encoding encoding,
       Map<String, String> parameters,
-      bool base64: false}) {
-    StringBuffer buffer = new StringBuffer();
+      bool base64 = false}) {
+    StringBuffer buffer = StringBuffer();
     List<int> indices = [_noScheme];
     String charsetName;
     String encodingName;
@@ -3220,7 +3214,7 @@
       buffer.write(',');
       _uriEncodeBytes(_uricTable, encoding.encode(content), buffer);
     }
-    return new UriData._(buffer.toString(), indices, null);
+    return UriData._(buffer.toString(), indices, null);
   }
 
   /**
@@ -3230,10 +3224,10 @@
    * be more efficient if the [uri] itself isn't used.
    */
   factory UriData.fromBytes(List<int> bytes,
-      {mimeType: "application/octet-stream",
+      {mimeType = "application/octet-stream",
       Map<String, String> parameters,
-      percentEncoded: false}) {
-    StringBuffer buffer = new StringBuffer();
+      percentEncoded = false}) {
+    StringBuffer buffer = StringBuffer();
     List<int> indices = [_noScheme];
     _writeUri(mimeType, null, parameters, buffer, indices);
     indices.add(buffer.length);
@@ -3244,12 +3238,11 @@
       buffer.write(';base64,');
       indices.add(buffer.length - 1);
       _base64.encoder
-          .startChunkedConversion(
-              new StringConversionSink.fromStringSink(buffer))
+          .startChunkedConversion(StringConversionSink.fromStringSink(buffer))
           .addSlice(bytes, 0, bytes.length, true);
     }
 
-    return new UriData._(buffer.toString(), indices, null);
+    return UriData._(buffer.toString(), indices, null);
   }
 
   /**
@@ -3261,14 +3254,13 @@
    */
   factory UriData.fromUri(Uri uri) {
     if (uri.scheme != "data") {
-      throw new ArgumentError.value(uri, "uri", "Scheme must be 'data'");
+      throw ArgumentError.value(uri, "uri", "Scheme must be 'data'");
     }
     if (uri.hasAuthority) {
-      throw new ArgumentError.value(
-          uri, "uri", "Data uri must not have authority");
+      throw ArgumentError.value(uri, "uri", "Data uri must not have authority");
     }
     if (uri.hasFragment) {
-      throw new ArgumentError.value(
+      throw ArgumentError.value(
           uri, "uri", "Data uri must not have a fragment part");
     }
     if (!uri.hasQuery) {
@@ -3296,8 +3288,7 @@
     } else {
       int slashIndex = _validateMimeType(mimeType);
       if (slashIndex < 0) {
-        throw new ArgumentError.value(
-            mimeType, "mimeType", "Invalid MIME type");
+        throw ArgumentError.value(mimeType, "mimeType", "Invalid MIME type");
       }
       buffer.write(_Uri._uriEncode(
           _tokenCharTable, mimeType.substring(0, slashIndex), utf8, false));
@@ -3314,10 +3305,10 @@
     }
     parameters?.forEach((key, value) {
       if (key.isEmpty) {
-        throw new ArgumentError.value("", "Parameter names must not be empty");
+        throw ArgumentError.value("", "Parameter names must not be empty");
       }
       if (value.isEmpty) {
-        throw new ArgumentError.value(
+        throw ArgumentError.value(
             "", "Parameter values must not be empty", 'parameters["$key"]');
       }
       if (indices != null) indices.add(buffer.length);
@@ -3394,7 +3385,7 @@
         return _parse(uri.substring(5), 0, null);
       }
     }
-    throw new FormatException("Does not start with 'data:'", uri, 0);
+    throw FormatException("Does not start with 'data:'", uri, 0);
   }
 
   /**
@@ -3417,7 +3408,7 @@
     }
     path = _Uri._normalizeOrSubstring(
         _text, colonIndex + 1, end, _Uri._pathCharOrSlashTable);
-    _uriCache = new _DataUri(this, path, query);
+    _uriCache = _DataUri(this, path, query);
     return _uriCache;
   }
 
@@ -3517,7 +3508,7 @@
       }
     }
     // Fill result array.
-    Uint8List result = new Uint8List(length);
+    Uint8List result = Uint8List(length);
     if (length == text.length) {
       result.setRange(0, length, text.codeUnits, start);
       return result;
@@ -3536,7 +3527,7 @@
             continue;
           }
         }
-        throw new FormatException("Invalid percent escape", text, i);
+        throw FormatException("Invalid percent escape", text, i);
       }
     }
     assert(index == result.length);
@@ -3562,7 +3553,7 @@
       var charset = this.charset; // Returns "US-ASCII" if not present.
       encoding = Encoding.getByName(charset);
       if (encoding == null) {
-        throw new UnsupportedError("Unknown charset: $charset");
+        throw UnsupportedError("Unknown charset: $charset");
       }
     }
     String text = _text;
@@ -3622,13 +3613,13 @@
           slashIndex = i;
           continue;
         }
-        throw new FormatException("Invalid MIME type", text, i);
+        throw FormatException("Invalid MIME type", text, i);
       }
     }
     if (slashIndex < 0 && i > start) {
       // An empty MIME type is allowed, but if non-empty it must contain
       // exactly one slash.
-      throw new FormatException("Invalid MIME type", text, i);
+      throw FormatException("Invalid MIME type", text, i);
     }
     while (char != comma) {
       // Parse parameters and/or "base64".
@@ -3651,7 +3642,7 @@
         if (char != comma ||
             i != lastSeparator + 7 /* "base64,".length */ ||
             !text.startsWith("base64", lastSeparator + 1)) {
-          throw new FormatException("Expecting '='", text, i);
+          throw FormatException("Expecting '='", text, i);
         }
         break;
       }
@@ -3670,7 +3661,7 @@
         text = text.replaceRange(i + 1, text.length, data);
       }
     }
-    return new UriData._(text, indices, sourceUri);
+    return UriData._(text, indices, sourceUri);
   }
 
   /**
@@ -3699,7 +3690,7 @@
       for (int i = 0; i < bytes.length; i++) {
         var byte = bytes[i];
         if (byte < 0 || byte > 255) {
-          throw new ArgumentError.value(byte, "non-byte value");
+          throw ArgumentError.value(byte, "non-byte value");
         }
       }
     }
@@ -3715,7 +3706,7 @@
   // '(', ')', '<', '>', '@', ',', ';', ':', '\', '"', '/', '[, ']', '?', '='.
   //
   // In a data URI, we also need to escape '%' and '#' characters.
-  static const _tokenCharTable = const [
+  static const _tokenCharTable = [
     //                     LSB             MSB
     //                      |               |
     0x0000, // 0x00 - 0x0f  00000000 00000000
@@ -3745,7 +3736,7 @@
   static const _uricTable = _Uri._queryCharTable;
 
   // Characters allowed in base-64 encoding (alphanumeric, '/', '+' and '=').
-  static const _base64Table = const [
+  static const _base64Table = [
     //                     LSB             MSB
     //                      |               |
     0x0000, // 0x00 - 0x0f  00000000 00000000
@@ -3946,8 +3937,7 @@
   // excluding escapes.
   const pchar = "$unreserved$subDelims";
 
-  var tables =
-      new List<Uint8List>.generate(stateCount, (_) => new Uint8List(96));
+  var tables = List<Uint8List>.generate(stateCount, (_) => Uint8List(96));
 
   // Helper function which initialize the table for [state] with a default
   // transition and returns the table.
@@ -4249,14 +4239,14 @@
     // Check original behavior - W3C spec is wonky!
     bool isHttp = _isHttp;
     if (_schemeEnd < 0) {
-      throw new StateError("Cannot use origin without a scheme: $this");
+      throw StateError("Cannot use origin without a scheme: $this");
     }
     if (!isHttp && !_isHttps) {
-      throw new StateError(
+      throw StateError(
           "Origin is only applicable to schemes http and https: $this");
     }
     if (_hostStart == _portStart) {
-      throw new StateError(
+      throw StateError(
           "A $scheme: URI should have a non-empty host name: $this");
     }
     if (_hostStart == _schemeEnd + 3) {
@@ -4281,12 +4271,12 @@
       }
     }
     parts.add(_uri.substring(start, end));
-    return new List<String>.unmodifiable(parts);
+    return List<String>.unmodifiable(parts);
   }
 
   Map<String, String> get queryParameters {
     if (!hasQuery) return const <String, String>{};
-    return new UnmodifiableMapView<String, String>(Uri.splitQueryString(query));
+    return UnmodifiableMapView<String, String>(Uri.splitQueryString(query));
   }
 
   Map<String, List<String>> get queryParametersAll {
@@ -4294,9 +4284,9 @@
     Map queryParameterLists = _Uri._splitQueryStringAll(query);
     for (var key in queryParameterLists.keys) {
       queryParameterLists[key] =
-          new List<String>.unmodifiable(queryParameterLists[key]);
+          List<String>.unmodifiable(queryParameterLists[key]);
     }
-    return new Map<String, List<String>>.unmodifiable(queryParameterLists);
+    return Map<String, List<String>>.unmodifiable(queryParameterLists);
   }
 
   bool _isPort(String port) {
@@ -4309,15 +4299,8 @@
 
   Uri removeFragment() {
     if (!hasFragment) return this;
-    return new _SimpleUri(
-        _uri.substring(0, _fragmentStart),
-        _schemeEnd,
-        _hostStart,
-        _portStart,
-        _pathStart,
-        _queryStart,
-        _fragmentStart,
-        _schemeCache);
+    return _SimpleUri(_uri.substring(0, _fragmentStart), _schemeEnd, _hostStart,
+        _portStart, _pathStart, _queryStart, _fragmentStart, _schemeCache);
   }
 
   Uri replace(
@@ -4387,8 +4370,7 @@
       fragment = _uri.substring(_fragmentStart + 1);
     }
 
-    return new _Uri._internal(
-        scheme, userInfo, host, port, path, query, fragment);
+    return _Uri._internal(scheme, userInfo, host, port, path, query, fragment);
   }
 
   Uri resolve(String reference) {
@@ -4423,7 +4405,7 @@
         var delta = base._schemeEnd + 1;
         var newUri = base._uri.substring(0, base._schemeEnd + 1) +
             ref._uri.substring(ref._schemeEnd + 1);
-        return new _SimpleUri(
+        return _SimpleUri(
             newUri,
             base._schemeEnd,
             ref._hostStart + delta,
@@ -4442,7 +4424,7 @@
         int delta = base._queryStart - ref._queryStart;
         var newUri = base._uri.substring(0, base._queryStart) +
             ref._uri.substring(ref._queryStart);
-        return new _SimpleUri(
+        return _SimpleUri(
             newUri,
             base._schemeEnd,
             base._hostStart,
@@ -4456,7 +4438,7 @@
         int delta = base._fragmentStart - ref._fragmentStart;
         var newUri = base._uri.substring(0, base._fragmentStart) +
             ref._uri.substring(ref._fragmentStart);
-        return new _SimpleUri(
+        return _SimpleUri(
             newUri,
             base._schemeEnd,
             base._hostStart,
@@ -4472,7 +4454,7 @@
       var delta = base._pathStart - ref._pathStart;
       var newUri = base._uri.substring(0, base._pathStart) +
           ref._uri.substring(ref._pathStart);
-      return new _SimpleUri(
+      return _SimpleUri(
           newUri,
           base._schemeEnd,
           base._hostStart,
@@ -4492,7 +4474,7 @@
       var delta = base._pathStart - refStart + 1;
       var newUri = "${base._uri.substring(0, base._pathStart)}/"
           "${ref._uri.substring(refStart)}";
-      return new _SimpleUri(
+      return _SimpleUri(
           newUri,
           base._schemeEnd,
           base._hostStart,
@@ -4571,7 +4553,7 @@
     var newUri = "${base._uri.substring(0, baseEnd)}$insert"
         "${ref._uri.substring(refStart)}";
 
-    return new _SimpleUri(
+    return _SimpleUri(
         newUri,
         base._schemeEnd,
         base._hostStart,
@@ -4584,15 +4566,14 @@
 
   String toFilePath({bool windows}) {
     if (_schemeEnd >= 0 && !_isFile) {
-      throw new UnsupportedError(
-          "Cannot extract a file path from a $scheme URI");
+      throw UnsupportedError("Cannot extract a file path from a $scheme URI");
     }
     if (_queryStart < _uri.length) {
       if (_queryStart < _fragmentStart) {
-        throw new UnsupportedError(
+        throw UnsupportedError(
             "Cannot extract a file path from a URI with a query component");
       }
-      throw new UnsupportedError(
+      throw UnsupportedError(
           "Cannot extract a file path from a URI with a fragment component");
     }
     windows ??= _Uri._isWindows;
@@ -4602,7 +4583,7 @@
   String _toFilePath() {
     if (_hostStart < _portStart) {
       // Has authority and non-empty host.
-      throw new UnsupportedError(
+      throw UnsupportedError(
           "Cannot extract a non-Windows file path from a file URI "
           "with an authority");
     }
@@ -4622,7 +4603,7 @@
   }
 
   Uri _toNonSimple() {
-    return new _Uri._internal(
+    return _Uri._internal(
         this.scheme,
         this.userInfo,
         this.hasAuthority ? this.host : null,
diff --git a/sdk/lib/developer/developer.dart b/sdk/lib/developer/developer.dart
index 6c3fa82..c446fdf 100644
--- a/sdk/lib/developer/developer.dart
+++ b/sdk/lib/developer/developer.dart
@@ -30,7 +30,7 @@
 /// Returns the value of [when]. Some debuggers may display [message].
 ///
 /// NOTE: When invoked, the isolate will not return until a debugger
-/// continues execution. When running in the Dart VM the behaviour is the same
+/// continues execution. When running in the Dart VM, the behaviour is the same
 /// regardless of whether or not a debugger is connected. When compiled to
 /// JavaScript, this uses the "debugger" statement, and behaves exactly as
 /// that does.
diff --git a/sdk/lib/developer/timeline.dart b/sdk/lib/developer/timeline.dart
index b3075bf..b18ed93 100644
--- a/sdk/lib/developer/timeline.dart
+++ b/sdk/lib/developer/timeline.dart
@@ -259,14 +259,14 @@
 
   // Emit the start event.
   void _start() {
-    _reportTaskEvent(_getTraceClock(), _taskId, 'b', category, name,
-        _argumentsAsJson(_arguments));
+    _reportTaskEvent(
+        _getTraceClock(), _taskId, 'b', category, name, _argumentsAsJson(null));
   }
 
   // Emit the finish event.
   void _finish() {
-    _reportTaskEvent(
-        _getTraceClock(), _taskId, 'e', category, name, _argumentsAsJson(null));
+    _reportTaskEvent(_getTraceClock(), _taskId, 'e', category, name,
+        _argumentsAsJson(_arguments));
   }
 }
 
diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart
index 51d104c..656fa6b 100644
--- a/sdk/lib/html/dart2js/html_dart2js.dart
+++ b/sdk/lib/html/dart2js/html_dart2js.dart
@@ -9805,7 +9805,7 @@
         tag, {'prototype': customElementClass, 'extends': extendsTag});
   }
 
-  @ForceInline() // Almost all call sites have one argument.
+  @pragma('dart2js:tryInline') // Almost all call sites have one argument.
   Element createElement(String tagName, [String typeExtension]) {
     return (typeExtension == null)
         ? _createElement_2(tagName)
@@ -10086,6 +10086,15 @@
   static const String TIMEOUT = 'TimeoutError';
   static const String INVALID_NODE_TYPE = 'InvalidNodeTypeError';
   static const String DATA_CLONE = 'DataCloneError';
+  static const String ENCODING = 'EncodingError';
+  static const String NOT_READABLE = 'NotReadableError';
+  static const String UNKNOWN = 'UnknownError';
+  static const String CONSTRAINT = 'ConstraintError';
+  static const String TRANSACTION_INACTIVE = 'TransactionInactiveError';
+  static const String READ_ONLY = 'ReadOnlyError';
+  static const String VERSION = 'VersionError';
+  static const String OPERATION = 'OperationError';
+  static const String NOT_ALLOWED = 'NotAllowedError';
   // Is TypeError class derived from DomException but name is 'TypeError'
   static const String TYPE_ERROR = 'TypeError';
 
@@ -14869,7 +14878,7 @@
       _convertNativeToDart_EventTarget(this._get_currentTarget);
   @JSName('currentTarget')
   @Creates('Null')
-  @Returns('EventTarget|=Object')
+  @Returns('EventTarget|=Object|Null')
   final dynamic _get_currentTarget;
 
   final bool defaultPrevented;
@@ -21153,7 +21162,7 @@
       _convertNativeToDart_EventTarget(this._get_relatedTarget);
   @JSName('relatedTarget')
   @Creates('Node')
-  @Returns('EventTarget|=Object')
+  @Returns('EventTarget|=Object|Null')
   final dynamic _get_relatedTarget;
 
   @JSName('screenX')
@@ -22977,7 +22986,8 @@
   CanvasGradient createLinearGradient(num x0, num y0, num x1, num y1) native;
 
   CanvasPattern createPattern(
-      /*CanvasImageSource*/ image, String repetitionType) native;
+      /*CanvasImageSource*/ image,
+      String repetitionType) native;
 
   CanvasGradient createRadialGradient(
       num x0, num y0, num r0, num x1, num y1, num r1) native;
@@ -23353,7 +23363,8 @@
   CanvasGradient createLinearGradient(num x0, num y0, num x1, num y1) native;
 
   CanvasPattern createPattern(
-      /*CanvasImageSource*/ image, String repetitionType) native;
+      /*CanvasImageSource*/ image,
+      String repetitionType) native;
 
   CanvasGradient createRadialGradient(
       num x0, num y0, num r0, num x1, num y1, num r1) native;
@@ -35215,7 +35226,7 @@
     return value is String && _classListContains(_classListOf(_element), value);
   }
 
-  @ForceInline()
+  @pragma('dart2js:tryInline')
   static bool _add(Element _element, String value) {
     DomTokenList list = _classListOf(_element);
     // Compute returned result independently of action upon the set.
@@ -35224,7 +35235,7 @@
     return added;
   }
 
-  @ForceInline()
+  @pragma('dart2js:tryInline')
   static bool _remove(Element _element, String value) {
     DomTokenList list = _classListOf(_element);
     bool removed = _classListContainsBeforeAddOrRemove(list, value);
@@ -35560,7 +35571,7 @@
 
   // TODO(9757): Inlining should be smart and inline only when inlining would
   // enable scalar replacement of an immediately allocated receiver.
-  @ForceInline()
+  @pragma('dart2js:tryInline')
   StreamSubscription<T> listen(void onData(T event),
       {Function onError, void onDone(), bool cancelOnError}) {
     return new _EventStreamSubscription<T>(
diff --git a/sdk/lib/io/stdio.dart b/sdk/lib/io/stdio.dart
index 1c1ce97..4086f08 100644
--- a/sdk/lib/io/stdio.dart
+++ b/sdk/lib/io/stdio.dart
@@ -394,7 +394,7 @@
 int _stdoutFD = 1;
 int _stderrFD = 2;
 
-@pragma('vm:entry-point')
+@pragma('vm:entry-point', 'call')
 void _setStdioFDs(int stdin, int stdout, int stderr) {
   _stdinFD = stdin;
   _stdoutFD = stdout;
diff --git a/sdk/lib/isolate/isolate.dart b/sdk/lib/isolate/isolate.dart
index 6e43fb7..5c5883d 100644
--- a/sdk/lib/isolate/isolate.dart
+++ b/sdk/lib/isolate/isolate.dart
@@ -40,7 +40,7 @@
  *
  * An `Isolate` object is a reference to an isolate, usually different from
  * the current isolate.
- * It represents, and can be used control, the other isolate.
+ * It represents, and can be used to control, the other isolate.
  *
  * When spawning a new isolate, the spawning isolate receives an `Isolate`
  * object representing the new isolate when the spawn operation succeeds.
@@ -112,6 +112,20 @@
   final Capability terminateCapability;
 
   /**
+   * The name of the [Isolate] displayed for debug purposes.
+   *
+   * This can be set using the `debugName` parameter in [spawn] and [spawnUri].
+   *
+   * This name does not uniquely identify an isolate. Multiple isolates in the
+   * same process may have the same `debugName`.
+   *
+   * For a given isolate, this value will be the same as the values returned by
+   * `Dart_DebugName` in the C embedding API and the `debugName` property in
+   * [IsolateMirror].
+   */
+  external String get debugName;
+
+  /**
    * Create a new [Isolate] object with a restricted set of capabilities.
    *
    * The port should be a control port for an isolate, as taken from
@@ -215,6 +229,9 @@
    * corresponding parameter and was processed before the isolate starts
    * running.
    *
+   * If [debugName] is provided, the spawned [Isolate] will be identifiable by
+   * this name in debuggers and logging.
+   *
    * If [errorsAreFatal] is omitted, the platform may choose a default behavior
    * or inherit the current isolate's behavior.
    *
@@ -231,7 +248,8 @@
       {bool paused: false,
       bool errorsAreFatal,
       SendPort onExit,
-      SendPort onError});
+      SendPort onError,
+      String debugName});
 
   /**
    * Creates and spawns an isolate that runs the code from the library with
@@ -299,6 +317,9 @@
    * WARNING: The [environment] parameter is not implemented on all
    * platforms yet.
    *
+   * If [debugName] is provided, the spawned [Isolate] will be identifiable by
+   * this name in debuggers and logging.
+   *
    * Returns a future that will complete with an [Isolate] instance if the
    * spawning succeeded. It will complete with an error otherwise.
    */
@@ -315,7 +336,8 @@
       @Deprecated('The packages/ dir is not supported in Dart 2')
           Uri packageRoot,
       Uri packageConfig,
-      bool automaticPackageResolution: false});
+      bool automaticPackageResolution: false,
+      String debugName});
 
   /**
    * Requests the isolate to pause.
diff --git a/sdk/lib/js/dart2js/js_dart2js.dart b/sdk/lib/js/dart2js/js_dart2js.dart
index 5f39637..535227b 100644
--- a/sdk/lib/js/dart2js/js_dart2js.dart
+++ b/sdk/lib/js/dart2js/js_dart2js.dart
@@ -432,7 +432,7 @@
 
   // Methods required by ListMixin
 
-  E operator [](index) {
+  E operator [](dynamic index) {
     // TODO(justinfagnani): fix the semantics for non-ints
     // dartbug.com/14605
     if (index is num && index == index.toInt()) {
@@ -441,7 +441,7 @@
     return super[index];
   }
 
-  void operator []=(index, E value) {
+  void operator []=(dynamic index, E value) {
     // TODO(justinfagnani): fix the semantics for non-ints
     // dartbug.com/14605
     if (index is num && index == index.toInt()) {
diff --git a/sdk/lib/math/jenkins_smi_hash.dart b/sdk/lib/math/jenkins_smi_hash.dart
index 1fc7dda..d756b37 100644
--- a/sdk/lib/math/jenkins_smi_hash.dart
+++ b/sdk/lib/math/jenkins_smi_hash.dart
@@ -3,22 +3,20 @@
 // BSD-style license that can be found in the LICENSE file.
 part of dart.math;
 
-/**
- * This is the [Jenkins hash function][1] but using masking to keep
- * values in SMI range.
- *
- * [1]: http://en.wikipedia.org/wiki/Jenkins_hash_function
- *
- * Use:
- * Hash each value with the hash of the previous value, then get the final
- * hash by calling finish.
- *
- *     var hash = 0;
- *     for (var value in values) {
- *       hash = JenkinsSmiHash.combine(hash, value.hashCode);
- *     }
- *     hash = JenkinsSmiHash.finish(hash);
- */
+/// This is the [Jenkins hash function][1] but using masking to keep
+/// values in SMI range.
+///
+/// [1]: http://en.wikipedia.org/wiki/Jenkins_hash_function
+///
+/// Use:
+/// Hash each value with the hash of the previous value, then get the final
+/// hash by calling finish.
+///
+///     var hash = 0;
+///     for (var value in values) {
+///       hash = JenkinsSmiHash.combine(hash, value.hashCode);
+///     }
+///     hash = JenkinsSmiHash.finish(hash);
 class _JenkinsSmiHash {
   // TODO(11617): This class should be optimized and standardized elsewhere.
 
diff --git a/sdk/lib/math/math.dart b/sdk/lib/math/math.dart
index f33a7a8..548fb59 100644
--- a/sdk/lib/math/math.dart
+++ b/sdk/lib/math/math.dart
@@ -2,15 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/**
- * Mathematical constants and functions, plus a random number generator.
- *
- * To use this library in your code:
- *
- *     import 'dart:math';
- *
- * {@category Core}
- */
+/// Mathematical constants and functions, plus a random number generator.
+///
+/// To use this library in your code:
+///
+///     import 'dart:math';
+///
+/// {@category Core}
 library dart.math;
 
 part "jenkins_smi_hash.dart";
@@ -18,204 +16,164 @@
 part "random.dart";
 part "rectangle.dart";
 
-/**
- * Base of the natural logarithms.
- *
- * Typically written as "e".
- */
+/// Base of the natural logarithms.
+///
+/// Typically written as "e".
 const double e = 2.718281828459045;
 
-/**
- * Natural logarithm of 10.
- *
- * The natural logarithm of 10 is the number such that `pow(E, LN10) == 10`.
- * This value is not exact, but it is the closest representable double to the
- * exact mathematical value.
- */
+/// Natural logarithm of 10.
+///
+/// The natural logarithm of 10 is the number such that `pow(E, LN10) == 10`.
+/// This value is not exact, but it is the closest representable double to the
+/// exact mathematical value.
 const double ln10 = 2.302585092994046;
 
-/**
- * Natural logarithm of 2.
- *
- * The natural logarithm of 2 is the number such that `pow(E, LN2) == 2`.
- * This value is not exact, but it is the closest representable double to the
- * exact mathematical value.
- */
+/// Natural logarithm of 2.
+///
+/// The natural logarithm of 2 is the number such that `pow(E, LN2) == 2`.
+/// This value is not exact, but it is the closest representable double to the
+/// exact mathematical value.
 const double ln2 = 0.6931471805599453;
 
-/**
- * Base-2 logarithm of [e].
- */
+/// Base-2 logarithm of [e].
 const double log2e = 1.4426950408889634;
 
-/**
- * Base-10 logarithm of [e].
- */
+/// Base-10 logarithm of [e].
 const double log10e = 0.4342944819032518;
 
-/**
- * The PI constant.
- */
+/// The PI constant.
 const double pi = 3.1415926535897932;
 
-/**
- * Square root of 1/2.
- */
+/// Square root of 1/2.
 const double sqrt1_2 = 0.7071067811865476;
 
-/**
- * Square root of 2.
- */
+/// Square root of 2.
 const double sqrt2 = 1.4142135623730951;
 
-/**
-  * Returns the lesser of two numbers.
-  *
-  * Returns NaN if either argument is NaN.
-  * The lesser of `-0.0` and `0.0` is `-0.0`.
-  * If the arguments are otherwise equal (including int and doubles with the
-  * same mathematical value) then it is unspecified which of the two arguments
-  * is returned.
-  */
+/// Returns the lesser of two numbers.
+///
+/// Returns NaN if either argument is NaN.
+/// The lesser of `-0.0` and `0.0` is `-0.0`.
+/// If the arguments are otherwise equal (including int and doubles with the
+/// same mathematical value) then it is unspecified which of the two arguments
+/// is returned.
 external T min<T extends num>(T a, T b);
 
-/**
-  * Returns the larger of two numbers.
-  *
-  * Returns NaN if either argument is NaN.
-  * The larger of `-0.0` and `0.0` is `0.0`. If the arguments are
-  * otherwise equal (including int and doubles with the same mathematical value)
-  * then it is unspecified which of the two arguments is returned.
-  */
+/// Returns the larger of two numbers.
+///
+/// Returns NaN if either argument is NaN.
+/// The larger of `-0.0` and `0.0` is `0.0`. If the arguments are
+/// otherwise equal (including int and doubles with the same mathematical value)
+/// then it is unspecified which of the two arguments is returned.
 external T max<T extends num>(T a, T b);
 
-/**
- * A variant of [atan].
- *
- * Converts both arguments to [double]s.
- *
- * Returns the angle in radians between the positive x-axis
- * and the vector ([b],[a]).
- * The result is in the range -PI..PI.
- *
- * If [b] is positive, this is the same as `atan(b/a)`.
- *
- * The result is negative when [a] is negative (including when [a] is the
- * double -0.0).
- *
- * If [a] is equal to zero, the vector ([b],[a]) is considered parallel to
- * the x-axis, even if [b] is also equal to zero. The sign of [b] determines
- * the direction of the vector along the x-axis.
- *
- * Returns NaN if either argument is NaN.
- */
+/// A variant of [atan].
+///
+/// Converts both arguments to [double]s.
+///
+/// Returns the angle in radians between the positive x-axis
+/// and the vector ([b],[a]).
+/// The result is in the range -PI..PI.
+///
+/// If [b] is positive, this is the same as `atan(b/a)`.
+///
+/// The result is negative when [a] is negative (including when [a] is the
+/// double -0.0).
+///
+/// If [a] is equal to zero, the vector ([b],[a]) is considered parallel to
+/// the x-axis, even if [b] is also equal to zero. The sign of [b] determines
+/// the direction of the vector along the x-axis.
+///
+/// Returns NaN if either argument is NaN.
 external double atan2(num a, num b);
 
-/**
- * Returns [x] to the power of [exponent].
- *
- * If [x] is an [int] and [exponent] is a non-negative [int], the result is
- * an [int], otherwise both arguments are converted to doubles first, and the
- * result is a [double].
- *
- * For integers, the power is always equal to the mathematical result of `x` to
- * the power `exponent`, only limited by the available memory.
- *
- * For doubles, `pow(x, y)` handles edge cases as follows:
- *
- * - if `y` is zero (0.0 or -0.0), the result is always 1.0.
- * - if `x` is 1.0, the result is always 1.0.
- * - otherwise, if either `x` or `y` is NaN then the result is NaN.
- * - if `x` is negative (but not -0.0) and `y` is a finite non-integer, the
- *   result is NaN.
- * - if `x` is Infinity and `y` is negative, the result is 0.0.
- * - if `x` is Infinity and `y` is positive, the result is Infinity.
- * - if `x` is 0.0 and `y` is negative, the result is Infinity.
- * - if `x` is 0.0 and `y` is positive, the result is 0.0.
- * - if `x` is -Infinity or -0.0 and `y` is an odd integer, then the result is
- *   `-pow(-x ,y)`.
- * - if `x` is -Infinity or -0.0 and `y` is not an odd integer, then the result
- *   is the same as `pow(-x , y)`.
- * - if `y` is Infinity and the absolute value of `x` is less than 1, the
- *   result is 0.0.
- * - if `y` is Infinity and `x` is -1, the result is 1.0.
- * - if `y` is Infinity and the absolute value of `x` is greater than 1,
- *   the result is Infinity.
- * - if `y` is -Infinity, the result is `1/pow(x, Infinity)`.
- *
- * This corresponds to the `pow` function defined in the IEEE Standard 754-2008.
- *
- * Notice that the result may overflow. If integers are represented as 64-bit
- * numbers, an integer result may be truncated, and a double result may overflow 
- * to positive or negative [double.infinity].
- */
+/// Returns [x] to the power of [exponent].
+///
+/// If [x] is an [int] and [exponent] is a non-negative [int], the result is
+/// an [int], otherwise both arguments are converted to doubles first, and the
+/// result is a [double].
+///
+/// For integers, the power is always equal to the mathematical result of `x` to
+/// the power `exponent`, only limited by the available memory.
+///
+/// For doubles, `pow(x, y)` handles edge cases as follows:
+///
+/// - if `y` is zero (0.0 or -0.0), the result is always 1.0.
+/// - if `x` is 1.0, the result is always 1.0.
+/// - otherwise, if either `x` or `y` is NaN then the result is NaN.
+/// - if `x` is negative (but not -0.0) and `y` is a finite non-integer, the
+///   result is NaN.
+/// - if `x` is Infinity and `y` is negative, the result is 0.0.
+/// - if `x` is Infinity and `y` is positive, the result is Infinity.
+/// - if `x` is 0.0 and `y` is negative, the result is Infinity.
+/// - if `x` is 0.0 and `y` is positive, the result is 0.0.
+/// - if `x` is -Infinity or -0.0 and `y` is an odd integer, then the result is
+///   `-pow(-x ,y)`.
+/// - if `x` is -Infinity or -0.0 and `y` is not an odd integer, then the result
+///   is the same as `pow(-x , y)`.
+/// - if `y` is Infinity and the absolute value of `x` is less than 1, the
+///   result is 0.0.
+/// - if `y` is Infinity and `x` is -1, the result is 1.0.
+/// - if `y` is Infinity and the absolute value of `x` is greater than 1,
+///   the result is Infinity.
+/// - if `y` is -Infinity, the result is `1/pow(x, Infinity)`.
+///
+/// This corresponds to the `pow` function defined in the IEEE Standard
+/// 754-2008.
+///
+/// Notice that the result may overflow. If integers are represented as 64-bit
+/// numbers, an integer result may be truncated, and a double result may
+/// overflow to positive or negative [double.infinity].
 external num pow(num x, num exponent);
 
-/**
- * Converts [radians] to a [double] and returns the sine of the value.
- *
- * If [radians] is not a finite number, the result is NaN.
- */
+/// Converts [radians] to a [double] and returns the sine of the value.
+///
+/// If [radians] is not a finite number, the result is NaN.
 external double sin(num radians);
 
-/**
- * Converts [radians] to a [double] and returns the cosine of the value.
- *
- * If [radians] is not a finite number, the result is NaN.
- */
+/// Converts [radians] to a [double] and returns the cosine of the value.
+///
+/// If [radians] is not a finite number, the result is NaN.
 external double cos(num radians);
 
-/**
- * Converts [radians] to a [double] and returns the tangent of the value.
- *
- * The tangent function is equivalent to `sin(radians)/cos(radians)` and may be
- * infinite (positive or negative) when `cos(radians)` is equal to zero.
- * If [radians] is not a finite number, the result is NaN.
- */
+/// Converts [radians] to a [double] and returns the tangent of the value.
+///
+/// The tangent function is equivalent to `sin(radians)/cos(radians)` and may be
+/// infinite (positive or negative) when `cos(radians)` is equal to zero.
+/// If [radians] is not a finite number, the result is NaN.
 external double tan(num radians);
 
-/**
- * Converts [x] to a [double] and returns its arc cosine in radians.
- *
- * Returns a value in the range 0..PI, or NaN if [x] is outside
- * the range -1..1.
- */
+/// Converts [x] to a [double] and returns its arc cosine in radians.
+///
+/// Returns a value in the range 0..PI, or NaN if [x] is outside
+/// the range -1..1.
 external double acos(num x);
 
-/**
- * Converts [x] to a [double] and returns its arc sine in radians.
- *
- * Returns a value in the range -PI/2..PI/2, or NaN if [x] is outside
- * the range -1..1.
- */
+/// Converts [x] to a [double] and returns its arc sine in radians.
+///
+/// Returns a value in the range -PI/2..PI/2, or NaN if [x] is outside
+/// the range -1..1.
 external double asin(num x);
 
-/**
- * Converts [x] to a [double] and returns its arc tangent in radians.
- *
- * Returns a value in the range -PI/2..PI/2, or NaN if [x] is NaN.
- */
+/// Converts [x] to a [double] and returns its arc tangent in radians.
+///
+/// Returns a value in the range -PI/2..PI/2, or NaN if [x] is NaN.
 external double atan(num x);
 
-/**
- * Converts [x] to a [double] and returns the positive square root of the value.
- *
- * Returns -0.0 if [x] is -0.0, and NaN if [x] is otherwise negative or NaN.
- */
+/// Converts [x] to a [double] and returns the positive square root of the
+/// value.
+///
+/// Returns -0.0 if [x] is -0.0, and NaN if [x] is otherwise negative or NaN.
 external double sqrt(num x);
 
-/**
- * Converts [x] to a [double] and returns the natural exponent, [e],
- * to the power [x].
- *
- * Returns NaN if [x] is NaN.
- */
+/// Converts [x] to a [double] and returns the natural exponent, [e],
+/// to the power [x].
+///
+/// Returns NaN if [x] is NaN.
 external double exp(num x);
 
-/**
- * Converts [x] to a [double] and returns the natural logarithm of the value.
- *
- * Returns negative infinity if [x] is equal to zero.
- * Returns NaN if [x] is NaN or less than zero.
- */
+/// Converts [x] to a [double] and returns the natural logarithm of the value.
+///
+/// Returns negative infinity if [x] is equal to zero.
+/// Returns NaN if [x] is NaN or less than zero.
 external double log(num x);
diff --git a/sdk/lib/math/point.dart b/sdk/lib/math/point.dart
index f627dcf..1015e7b 100644
--- a/sdk/lib/math/point.dart
+++ b/sdk/lib/math/point.dart
@@ -3,9 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 part of dart.math;
 
-/**
- * A utility class for representing two-dimensional positions.
- */
+/// A utility class for representing two-dimensional positions.
 class Point<T extends num> {
   final T x;
   final T y;
@@ -16,13 +14,11 @@
 
   String toString() => 'Point($x, $y)';
 
-  /**
-   * A `Point` is only equal to another `Point` with the same coordinates.
-   *
-   * This point is equal to `other` if, and only if,
-   * `other` is a `Point` with
-   * [x] equal to `other.x` and [y] equal to `other.y`.
-   */
+  /// A `Point` is only equal to another `Point` with the same coordinates.
+  ///
+  /// This point is equal to `other` if, and only if,
+  /// `other` is a `Point` with
+  /// [x] equal to `other.x` and [y] equal to `other.y`.
   bool operator ==(dynamic other) =>
       // Cannot change parameter type to `Object` in case some class
       // inherits the type and uses their argument dynamically.
@@ -30,58 +26,46 @@
 
   int get hashCode => _JenkinsSmiHash.hash2(x.hashCode, y.hashCode);
 
-  /**
-   * Add [other] to `this`, as if both points were vectors.
-   *
-   * Returns the resulting "vector" as a Point.
-   */
+  /// Add [other] to `this`, as if both points were vectors.
+  ///
+  /// Returns the resulting "vector" as a Point.
   Point<T> operator +(Point<T> other) {
-    return new Point<T>(x + other.x, y + other.y);
+    return Point<T>(x + other.x, y + other.y);
   }
 
-  /**
-   * Subtract [other] from `this`, as if both points were vectors.
-   *
-   * Returns the resulting "vector" as a Point.
-   */
+  /// Subtract [other] from `this`, as if both points were vectors.
+  ///
+  /// Returns the resulting "vector" as a Point.
   Point<T> operator -(Point<T> other) {
-    return new Point<T>(x - other.x, y - other.y);
+    return Point<T>(x - other.x, y - other.y);
   }
 
-  /**
-   * Scale this point by [factor] as if it were a vector.
-   *
-   * *Important* *Note*: This function accepts a `num` as its argument only so
-   * that you can scale Point<double> objects by an `int` factor. Because the
-   * star operator always returns the same type of Point that originally called
-   * it, passing in a double [factor] on a `Point<int>` _causes_ _a_
-   * _runtime_ _error_ in checked mode.
-   */
+  /// Scale this point by [factor] as if it were a vector.
+  ///
+  /// *Important* *Note*: This function accepts a `num` as its argument only so
+  /// that you can scale Point<double> objects by an `int` factor. Because the
+  /// star operator always returns the same type of Point that originally called
+  /// it, passing in a double [factor] on a `Point<int>` _causes_ _a_
+  /// _runtime_ _error_ in checked mode.
   Point<T> operator *(num /*T|int*/ factor) {
-    return new Point<T>((x * factor), (y * factor));
+    return Point<T>((x * factor), (y * factor));
   }
 
-  /**
-   * Get the straight line (Euclidean) distance between the origin (0, 0) and
-   * this point.
-   */
+  /// Get the straight line (Euclidean) distance between the origin (0, 0) and
+  /// this point.
   double get magnitude => sqrt(x * x + y * y);
 
-  /**
-   * Returns the distance between `this` and [other].
-   */
+  /// Returns the distance between `this` and [other].
   double distanceTo(Point<T> other) {
     var dx = x - other.x;
     var dy = y - other.y;
     return sqrt(dx * dx + dy * dy);
   }
 
-  /**
-   * Returns the squared distance between `this` and [other].
-   *
-   * Squared distances can be used for comparisons when the actual value is not
-   * required.
-   */
+  /// Returns the squared distance between `this` and [other].
+  ///
+  /// Squared distances can be used for comparisons when the actual value is not
+  /// required.
   T squaredDistanceTo(Point<T> other) {
     var dx = x - other.x;
     var dy = y - other.y;
diff --git a/sdk/lib/math/random.dart b/sdk/lib/math/random.dart
index 99906cd..80e588b 100644
--- a/sdk/lib/math/random.dart
+++ b/sdk/lib/math/random.dart
@@ -11,40 +11,30 @@
 ///
 /// Use the [Random.secure]() constructor for cryptographic purposes.
 abstract class Random {
-  /**
-   * Creates a random number generator.
-   *
-   * The optional parameter [seed] is used to initialize the
-   * internal state of the generator. The implementation of the
-   * random stream can change between releases of the library.
-   */
+  /// Creates a random number generator.
+  ///
+  /// The optional parameter [seed] is used to initialize the
+  /// internal state of the generator. The implementation of the
+  /// random stream can change between releases of the library.
   external factory Random([int seed]);
 
-  /**
-   * Creates a cryptographically secure random number generator.
-   *
-   * If the program cannot provide a cryptographically secure
-   * source of random numbers, it throws an [UnsupportedError].
-   */
+  /// Creates a cryptographically secure random number generator.
+  ///
+  /// If the program cannot provide a cryptographically secure
+  /// source of random numbers, it throws an [UnsupportedError].
   external factory Random.secure();
 
-  /**
-   * Generates a non-negative random integer uniformly distributed in the range
-   * from 0, inclusive, to [max], exclusive.
-   *
-   * Implementation note: The default implementation supports [max] values
-   * between 1 and (1<<32) inclusive.
-   */
+  /// Generates a non-negative random integer uniformly distributed in the range
+  /// from 0, inclusive, to [max], exclusive.
+  ///
+  /// Implementation note: The default implementation supports [max] values
+  /// between 1 and (1<<32) inclusive.
   int nextInt(int max);
 
-  /**
-   * Generates a non-negative random floating point value uniformly distributed
-   * in the range from 0.0, inclusive, to 1.0, exclusive.
-   */
+  /// Generates a non-negative random floating point value uniformly distributed
+  /// in the range from 0.0, inclusive, to 1.0, exclusive.
   double nextDouble();
 
-  /**
-   * Generates a random boolean value.
-   */
+  /// Generates a random boolean value.
   bool nextBool();
 }
diff --git a/sdk/lib/math/rectangle.dart b/sdk/lib/math/rectangle.dart
index 88e0eda..6e72036 100644
--- a/sdk/lib/math/rectangle.dart
+++ b/sdk/lib/math/rectangle.dart
@@ -3,35 +3,37 @@
 // BSD-style license that can be found in the LICENSE file.
 part of dart.math;
 
-/**
- * A base class for representing two-dimensional axis-aligned rectangles.
- *
- * This rectangle uses a left-handed Cartesian coordinate system, with x
- * directed to the right and y directed down, as per the convention in 2D
- * computer graphics.
- *
- * See also:
- *    [W3C Coordinate Systems Specification](http://www.w3.org/TR/SVG/coords.html#InitialCoordinateSystem).
- *
- * 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 precision of the coordinates).
- */
+/// A base class for representing two-dimensional axis-aligned rectangles.
+///
+/// This rectangle uses a left-handed Cartesian coordinate system, with x
+/// directed to the right and y directed down, as per the convention in 2D
+/// computer graphics.
+///
+/// See also:
+///    [W3C Coordinate Systems Specification](http://www.w3.org/TR/SVG/coords.html#InitialCoordinateSystem).
+///
+/// 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 precision of the coordinates).
 abstract class _RectangleBase<T extends num> {
   const _RectangleBase();
 
-  /** The x-coordinate of the left edge. */
+  /// The x-coordinate of the left edge.
   T get left;
-  /** The y-coordinate of the top edge. */
+
+  /// The y-coordinate of the top edge.
   T get top;
-  /** The width of the rectangle. */
+
+  /// The width of the rectangle.
   T get width;
-  /** The height of the rectangle. */
+
+  /// The height of the rectangle.
   T get height;
 
-  /** The x-coordinate of the right edge. */
+  /// The x-coordinate of the right edge.
   T get right => left + width;
-  /** The y-coordinate of the bottom edge. */
+
+  /// The y-coordinate of the bottom edge.
   T get bottom => top + height;
 
   String toString() {
@@ -50,15 +52,13 @@
   int get hashCode => _JenkinsSmiHash.hash4(
       left.hashCode, top.hashCode, right.hashCode, bottom.hashCode);
 
-  /**
-   * Computes the intersection of `this` and [other].
-   *
-   * The intersection of two axis-aligned rectangles, if any, is always another
-   * axis-aligned rectangle.
-   *
-   * Returns the intersection of this and `other`, or `null` if they don't
-   * intersect.
-   */
+  /// Computes the intersection of `this` and [other].
+  ///
+  /// The intersection of two axis-aligned rectangles, if any, is always another
+  /// axis-aligned rectangle.
+  ///
+  /// Returns the intersection of this and `other`, or `null` if they don't
+  /// intersect.
   Rectangle<T> intersection(Rectangle<T> other) {
     var x0 = max(left, other.left);
     var x1 = min(left + width, other.left + other.width);
@@ -68,15 +68,13 @@
       var y1 = min(top + height, other.top + other.height);
 
       if (y0 <= y1) {
-        return new Rectangle<T>(x0, y0, x1 - x0, y1 - y0);
+        return Rectangle<T>(x0, y0, x1 - x0, y1 - y0);
       }
     }
     return null;
   }
 
-  /**
-   * Returns true if `this` intersects [other].
-   */
+  /// Returns true if `this` intersects [other].
   bool intersects(Rectangle<num> other) {
     return (left <= other.left + other.width &&
         other.left <= left + width &&
@@ -84,9 +82,7 @@
         other.top <= top + height);
   }
 
-  /**
-   * Returns a new rectangle which completely contains `this` and [other].
-   */
+  /// Returns a new rectangle which completely contains `this` and [other].
   Rectangle<T> boundingBox(Rectangle<T> other) {
     var right = max(this.left + this.width, other.left + other.width);
     var bottom = max(this.top + this.height, other.top + other.height);
@@ -94,12 +90,10 @@
     var left = min(this.left, other.left);
     var top = min(this.top, other.top);
 
-    return new Rectangle<T>(left, top, right - left, bottom - top);
+    return Rectangle<T>(left, top, right - left, bottom - top);
   }
 
-  /**
-   * Tests whether `this` entirely contains [another].
-   */
+  /// Tests whether `this` entirely contains [another].
   bool containsRectangle(Rectangle<num> another) {
     return left <= another.left &&
         left + width >= another.left + another.width &&
@@ -107,9 +101,7 @@
         top + height >= another.top + another.height;
   }
 
-  /**
-   * Tests whether [another] is inside or along the edges of `this`.
-   */
+  /// Tests whether [another] is inside or along the edges of `this`.
   bool containsPoint(Point<num> another) {
     return another.x >= left &&
         another.x <= left + width &&
@@ -117,158 +109,138 @@
         another.y <= top + height;
   }
 
-  Point<T> get topLeft => new Point<T>(this.left, this.top);
-  Point<T> get topRight => new Point<T>(this.left + this.width, this.top);
+  Point<T> get topLeft => Point<T>(this.left, this.top);
+  Point<T> get topRight => Point<T>(this.left + this.width, this.top);
   Point<T> get bottomRight =>
-      new Point<T>(this.left + this.width, this.top + this.height);
-  Point<T> get bottomLeft => new Point<T>(this.left, this.top + this.height);
+      Point<T>(this.left + this.width, this.top + this.height);
+  Point<T> get bottomLeft => Point<T>(this.left, this.top + this.height);
 }
 
-/**
- * A class for representing two-dimensional rectangles whose properties are
- * immutable.
- */
+/// A class for representing two-dimensional rectangles whose properties are
+/// immutable.
 class Rectangle<T extends num> extends _RectangleBase<T> {
   final T left;
   final T top;
   final T width;
   final T height;
 
-  /**
-   * Create a rectangle spanned by `(left, top)` and `(left+width, top+height)`.
-   *
-   * The rectangle contains the points
-   * with x-coordinate between `left` and `left + width`, and
-   * with y-coordinate between `top` and `top + height`, both inclusive.
-   *
-   * The `width` and `height` should be non-negative.
-   * If `width` or `height` are negative, they are clamped to zero.
-   *
-   * If `width` and `height` are zero, the "rectangle" comprises only the single
-   * point `(left, top)`.
-   */
+  /// Create a rectangle spanned by `(left, top)` and
+  /// `(left+width, top+height)`.
+  ///
+  /// The rectangle contains the points
+  /// with x-coordinate between `left` and `left + width`, and
+  /// with y-coordinate between `top` and `top + height`, both inclusive.
+  ///
+  /// The `width` and `height` should be non-negative.
+  /// If `width` or `height` are negative, they are clamped to zero.
+  ///
+  /// If `width` and `height` are zero, the "rectangle" comprises only the
+  /// single point `(left, top)`.
   const Rectangle(this.left, this.top, T width, T height)
       : this.width = (width < 0) ? -width * 0 : width, // Inline _clampToZero.
         this.height = (height < 0) ? -height * 0 : height;
 
-  /**
-   * Create a rectangle spanned by the points [a] and [b];
-   *
-   * The rectangle contains the points
-   * with x-coordinate between `a.x` and `b.x`, and
-   * with y-coordinate between `a.y` and `b.y`, both inclusive.
-   *
-   * If the distance between `a.x` and `b.x` is not representable
-   * (which can happen if one or both is a double),
-   * the actual right edge might be slightly off from `max(a.x, b.x)`.
-   * Similar for the y-coordinates and the bottom edge.
-   */
+  /// Create a rectangle spanned by the points [a] and [b];
+  ///
+  /// The rectangle contains the points
+  /// with x-coordinate between `a.x` and `b.x`, and
+  /// with y-coordinate between `a.y` and `b.y`, both inclusive.
+  ///
+  /// If the distance between `a.x` and `b.x` is not representable
+  /// (which can happen if one or both is a double),
+  /// the actual right edge might be slightly off from `max(a.x, b.x)`.
+  /// Similar for the y-coordinates and the bottom edge.
   factory Rectangle.fromPoints(Point<T> a, Point<T> b) {
     T left = min(a.x, b.x);
     T width = max(a.x, b.x) - left;
     T top = min(a.y, b.y);
     T height = max(a.y, b.y) - top;
-    return new Rectangle<T>(left, top, width, height);
+    return Rectangle<T>(left, top, width, height);
   }
 }
 
-/**
- * A class for representing two-dimensional axis-aligned rectangles with mutable
- * properties.
- */
+/// A class for representing two-dimensional axis-aligned rectangles with
+/// mutable properties.
 class MutableRectangle<T extends num> extends _RectangleBase<T>
     implements Rectangle<T> {
-  /**
-   * The x-coordinate of the left edge.
-   *
-   * Setting the value will move the rectangle without changing its width.
-   */
+  /// The x-coordinate of the left edge.
+  ///
+  /// Setting the value will move the rectangle without changing its width.
   T left;
-  /**
-   * The y-coordinate of the left edge.
-   *
-   * Setting the value will move the rectangle without changing its height.
-   */
+
+  /// The y-coordinate of the left edge.
+  ///
+  /// Setting the value will move the rectangle without changing its height.
   T top;
   T _width;
   T _height;
 
-  /**
-   * Create a mutable rectangle spanned by `(left, top)` and
-   * `(left+width, top+height)`.
-   *
-   * The rectangle contains the points
-   * with x-coordinate between `left` and `left + width`, and
-   * with y-coordinate between `top` and `top + height`, both inclusive.
-   *
-   * The `width` and `height` should be non-negative.
-   * If `width` or `height` are negative, they are clamped to zero.
-   *
-   * If `width` and `height` are zero, the "rectangle" comprises only the single
-   * point `(left, top)`.
-   */
+  /// Create a mutable rectangle spanned by `(left, top)` and
+  /// `(left+width, top+height)`.
+  ///
+  /// The rectangle contains the points
+  /// with x-coordinate between `left` and `left + width`, and
+  /// with y-coordinate between `top` and `top + height`, both inclusive.
+  ///
+  /// The `width` and `height` should be non-negative.
+  /// If `width` or `height` are negative, they are clamped to zero.
+  ///
+  /// If `width` and `height` are zero, the "rectangle" comprises only the
+  /// single point `(left, top)`.
   MutableRectangle(this.left, this.top, T width, T height)
       : this._width = (width < 0) ? _clampToZero<T>(width) : width,
         this._height = (height < 0) ? _clampToZero<T>(height) : height;
 
-  /**
-   * Create a mutable rectangle spanned by the points [a] and [b];
-   *
-   * The rectangle contains the points
-   * with x-coordinate between `a.x` and `b.x`, and
-   * with y-coordinate between `a.y` and `b.y`, both inclusive.
-   *
-   * If the distance between `a.x` and `b.x` is not representable
-   * (which can happen if one or both is a double),
-   * the actual right edge might be slightly off from `max(a.x, b.x)`.
-   * Similar for the y-coordinates and the bottom edge.
-   */
+  /// Create a mutable rectangle spanned by the points [a] and [b];
+  ///
+  /// The rectangle contains the points
+  /// with x-coordinate between `a.x` and `b.x`, and
+  /// with y-coordinate between `a.y` and `b.y`, both inclusive.
+  ///
+  /// If the distance between `a.x` and `b.x` is not representable
+  /// (which can happen if one or both is a double),
+  /// the actual right edge might be slightly off from `max(a.x, b.x)`.
+  /// Similar for the y-coordinates and the bottom edge.
   factory MutableRectangle.fromPoints(Point<T> a, Point<T> b) {
     T left = min(a.x, b.x);
     T width = max(a.x, b.x) - left;
     T top = min(a.y, b.y);
     T height = max(a.y, b.y) - top;
-    return new MutableRectangle<T>(left, top, width, height);
+    return MutableRectangle<T>(left, top, width, height);
   }
 
   T get width => _width;
 
-  /**
-   * Sets the width of the rectangle.
-   *
-   * The width must be non-negative.
-   * If a negative width is supplied, it is clamped to zero.
-   *
-   * Setting the value will change the right edge of the rectangle,
-   * but will not change [left].
-   */
-  void set width(T width) {
+  /// Sets the width of the rectangle.
+  ///
+  /// The width must be non-negative.
+  /// If a negative width is supplied, it is clamped to zero.
+  ///
+  /// Setting the value will change the right edge of the rectangle,
+  /// but will not change [left].
+  set width(T width) {
     if (width < 0) width = _clampToZero<T>(width);
     _width = width;
   }
 
   T get height => _height;
 
-  /**
-   * Sets the height of the rectangle.
-   *
-   * The height must be non-negative.
-   * If a negative height is supplied, it is clamped to zero.
-   *
-   * Setting the value will change the bottom edge of the rectangle,
-   * but will not change [top].
-   */
-  void set height(T height) {
+  /// Sets the height of the rectangle.
+  ///
+  /// The height must be non-negative.
+  /// If a negative height is supplied, it is clamped to zero.
+  ///
+  /// Setting the value will change the bottom edge of the rectangle,
+  /// but will not change [top].
+  set height(T height) {
     if (height < 0) height = _clampToZero<T>(height);
     _height = height;
   }
 }
 
-/**
- * Converts a negative [int] or [double] to a zero-value of the same type.
- *
- * Returns `0` if value is int, `0.0` if value is double.
- */
+/// Converts a negative [int] or [double] to a zero-value of the same type.
+///
+/// Returns `0` if value is int, `0.0` if value is double.
 T _clampToZero<T extends num>(T value) {
   assert(value < 0);
   return -value * 0;
diff --git a/sdk/lib/vmservice/running_isolates.dart b/sdk/lib/vmservice/running_isolates.dart
index 5e7b6dd..24b155c 100644
--- a/sdk/lib/vmservice/running_isolates.dart
+++ b/sdk/lib/vmservice/running_isolates.dart
@@ -185,6 +185,7 @@
       Map<String, dynamic> params = _setupParams();
       params['isolateId'] = _message.params['isolateId'];
       params['kernelBytes'] = kernelBase64;
+      params['disableBreakpoints'] = _message.params['disableBreakpoints'];
       Map runParams = {
         'method': '_evaluateCompiledExpression',
         'id': _message.serial,
diff --git a/sdk/lib/vmservice/vmservice.dart b/sdk/lib/vmservice/vmservice.dart
index 2cccb59..4237f28 100644
--- a/sdk/lib/vmservice/vmservice.dart
+++ b/sdk/lib/vmservice/vmservice.dart
@@ -41,9 +41,6 @@
 // The randomly generated auth token used to access the VM service.
 final String serviceAuthToken = _makeAuthToken();
 
-// TODO(johnmccutchan): Enable the auth token and drop the origin check.
-final bool useAuthToken = const bool.fromEnvironment('DART_SERVICE_USE_AUTH');
-
 // This is for use by the embedder. It is a map from the isolateId to
 // anything implementing IsolateEmbedderData. When an isolate goes away,
 // the cleanup method will be invoked after being removed from the map.
@@ -596,62 +593,6 @@
     return encodeSuccess(message);
   }
 
-  Future<String> _getCrashDump(Message message) async {
-    var client = message.client;
-    final perIsolateRequests = [
-      // ?isolateId=<isolate id> will be appended to each of these requests.
-      // Isolate information.
-      Uri.parse('getIsolate'),
-      // State of heap.
-      Uri.parse('_getAllocationProfile'),
-      // Call stack + local variables.
-      Uri.parse('getStack?_full=true'),
-    ];
-
-    // Snapshot of running isolates.
-    var isolates = runningIsolates.isolates.values.toList();
-
-    // Collect the mapping from request uris to responses.
-    var responses = {};
-
-    // Request VM.
-    var getVM = Uri.parse('getVM');
-    var getVmResponse =
-        (await new Message.fromUri(client, getVM).sendToVM()).decodeJson();
-    responses[getVM.toString()] = getVmResponse['result'];
-
-    // Request command line flags.
-    var getFlagList = Uri.parse('getFlagList');
-    var getFlagListResponse =
-        (await new Message.fromUri(client, getFlagList).sendToVM())
-            .decodeJson();
-    responses[getFlagList.toString()] = getFlagListResponse['result'];
-
-    // Make requests to each isolate.
-    for (var isolate in isolates) {
-      for (var request in perIsolateRequests) {
-        var message = new Message.forIsolate(client, request, isolate);
-        // Decode the JSON and and insert it into the map. The map key
-        // is the request Uri.
-        var response = (await isolate.routeRequest(this, message)).decodeJson();
-        responses[message.toUri().toString()] = response['result'];
-      }
-      // Dump the object id ring requests.
-      var message =
-          new Message.forIsolate(client, Uri.parse('_dumpIdZone'), isolate);
-      var response = (await isolate.routeRequest(this, message)).decodeJson();
-      // Insert getObject requests into responses map.
-      for (var object in response['result']['objects']) {
-        final requestUri =
-            'getObject&isolateId=${isolate.serviceId}?objectId=${object["id"]}';
-        responses[requestUri] = object;
-      }
-    }
-
-    // Encode the entire crash dump.
-    return encodeResult(message, responses);
-  }
-
   Future<Response> routeRequest(VMService _, Message message) async {
     return new Response.from(await _routeRequestImpl(message));
   }
@@ -661,10 +602,6 @@
       if (message.completed) {
         return await message.response;
       }
-      // TODO(turnidge): Update to json rpc.  BEFORE SUBMIT.
-      if (message.method == '_getCrashDump') {
-        return await _getCrashDump(message);
-      }
       if (message.method == 'streamListen') {
         return await _streamListen(message);
       }
@@ -702,7 +639,7 @@
   }
 }
 
-@pragma("vm:entry-point")
+@pragma("vm:entry-point", "call")
 RawReceivePort boot() {
   // Return the port we expect isolate control messages on.
   return isolateControlPort;
diff --git a/tests/co19_2/co19_2-analyzer.status b/tests/co19_2/co19_2-analyzer.status
index 108c0ed..3126f6a 100644
--- a/tests/co19_2/co19_2-analyzer.status
+++ b/tests/co19_2/co19_2-analyzer.status
@@ -10,6 +10,9 @@
 Language/Classes/Abstract_Instance_Members/override_default_value_t05: MissingCompileTimeError # https://github.com/dart-lang/co19/issues/234
 Language/Classes/Getters/type_object_t01: CompileTimeError # Issue 33995
 Language/Classes/Getters/type_object_t02: CompileTimeError # Issue 33995
+Language/Classes/Instance_Methods/Operators/allowed_names_t01: CompileTimeError # triple shift
+Language/Classes/Instance_Methods/Operators/allowed_names_t23: CompileTimeError # triple shift
+Language/Classes/Instance_Methods/Operators/arity_1_t19: CompileTimeError # triple shift
 Language/Classes/Instance_Methods/override_different_default_values_t01: MissingCompileTimeError # https://github.com/dart-lang/co19/issues/234
 Language/Classes/Instance_Methods/override_different_default_values_t02: MissingCompileTimeError # https://github.com/dart-lang/co19/issues/234
 Language/Classes/Static_Methods/same_name_method_and_setter_t01: CompileTimeError # Invalid test, see #33237
@@ -17,8 +20,17 @@
 Language/Enums/syntax_t08: CompileTimeError # Issue 33995
 Language/Enums/syntax_t09: CompileTimeError # Issue 33995
 Language/Errors_and_Warnings/static_warning_t01: CompileTimeError # issue #34319
+Language/Expressions/Assignment/Compound_Assignment/expression_assignment_t12: CompileTimeError # triple shift
+Language/Expressions/Assignment/Compound_Assignment/indexed_expression_assignment_t12: CompileTimeError # triple shift
+Language/Expressions/Assignment/Compound_Assignment/null_aware_compound_assignment_static_t12: CompileTimeError # triple shift
+Language/Expressions/Assignment/Compound_Assignment/null_aware_compound_assignment_t12: CompileTimeError # triple shift
+Language/Expressions/Assignment/Compound_Assignment/setter_assignment_t12: CompileTimeError # triple shift
+Language/Expressions/Assignment/Compound_Assignment/variable_assignment_t12: CompileTimeError # triple shift
+Language/Expressions/Bitwise_Expressions/syntax_t01: CompileTimeError # triple shift
+Language/Expressions/Constants/bitwise_operators_t01: CompileTimeError # triple shift
 Language/Expressions/Constants/constant_list_t02: MissingCompileTimeError # Please triage this failure
 Language/Expressions/Constants/constant_map_t02: MissingCompileTimeError # Please triage this failure
+Language/Expressions/Equality/syntax_t01: CompileTimeError # triple shift
 Language/Expressions/Function_Invocation/Unqualified_Invocation/function_expr_invocation_t05: CompileTimeError # Please triage this failure
 Language/Expressions/Function_Invocation/async_cleanup_t01: CompileTimeError # Issue 33995
 Language/Expressions/Function_Invocation/async_cleanup_t02: CompileTimeError # Issue 33995
@@ -33,11 +45,24 @@
 Language/Expressions/Instance_Creation/Const/parameterized_type_t01: CompileTimeError # Please triage this failure
 Language/Expressions/Instance_Creation/Const/parameterized_type_t02: CompileTimeError # Please triage this failure
 Language/Expressions/Instance_Creation/New/syntax_t04: MissingCompileTimeError # Please triage this failure
+Language/Expressions/Instance_Creation/New/type_t08: CompileTimeError
+Language/Expressions/Instance_Creation/New/type_t09: CompileTimeError
 Language/Expressions/Lists/constant_list_t01: CompileTimeError # Please triage this failure
+Language/Expressions/Lists/syntax_t01: CompileTimeError # triple shift
 Language/Expressions/Maps/constant_map_t02: MissingCompileTimeError # Please triage this failure
 Language/Expressions/Maps/constant_map_type_t01: CompileTimeError # Please triage this failure
+Language/Expressions/Maps/syntax_t01: CompileTimeError # triple shift
+Language/Expressions/Relational_Expressions/syntax_t01: CompileTimeError # triple shift
+Language/Expressions/Shift/allowed_characters_t02: CompileTimeError # triple shift
+Language/Expressions/Shift/integer_t03: CompileTimeError # triple shift
+Language/Expressions/Shift/syntax_t01: CompileTimeError # triple shift
+Language/Expressions/Shift/syntax_t15: CompileTimeError # triple shift
+Language/Expressions/Strings/String_Interpolation/syntax_t01: CompileTimeError # triple shift
+Language/Expressions/Symbols/syntax_t02: CompileTimeError # triple shift
+Language/Expressions/parentheses_t01: CompileTimeError # triple shift
 Language/Functions/generator_return_type_t02: MissingCompileTimeError # Issue 32192
 Language/Functions/generator_return_type_t06: MissingCompileTimeError # Issue 32192
+Language/Functions/syntax_t03: CompileTimeError # triple shift
 Language/Generics/scope_t03: CompileTimeError # Please triage this failure
 Language/Generics/syntax_t02: CompileTimeError # Please triage this failure
 Language/Generics/syntax_t03: Crash # Issue 29388
@@ -60,6 +85,9 @@
 Language/Mixins/declaring_constructor_t05: MissingCompileTimeError # Issue 24767
 Language/Mixins/declaring_constructor_t06: MissingCompileTimeError # Issue 24767
 Language/Overview/Privacy/private_and_public_t11: CompileTimeError
+Language/Reference/Operator_Precedence/precedence_01_assignment_t14: CompileTimeError # triple shift
+Language/Reference/Operator_Precedence/precedence_12_Shift_t04: CompileTimeError # triple shift
+Language/Reference/Operator_Precedence/precedence_t05: CompileTimeError # triple shift
 Language/Statements/Continue/async_loops_t01: CompileTimeError # Issue 33995
 Language/Statements/Continue/async_loops_t02: CompileTimeError # Issue 33995
 Language/Statements/Continue/async_loops_t03: CompileTimeError # Issue 33995
@@ -72,6 +100,7 @@
 Language/Statements/Continue/async_loops_t10: CompileTimeError # Issue 33995
 Language/Statements/Continue/control_transfer_t08: CompileTimeError # Issue 33995
 Language/Statements/Continue/control_transfer_t09: CompileTimeError # Issue 33995
+Language/Statements/Expression_Statements/syntax_t06: CompileTimeError # triple shift
 Language/Statements/Return/many_return_statements_t01: CompileTimeError # co19 issue 157
 Language/Statements/Return/many_return_statements_t02: CompileTimeError # issue #34319
 Language/Statements/Return/no_expression_function_t01: CompileTimeError # issue #34319
diff --git a/tests/co19_2/co19_2-dart2js.status b/tests/co19_2/co19_2-dart2js.status
index a4d8adc..c4f2692 100644
--- a/tests/co19_2/co19_2-dart2js.status
+++ b/tests/co19_2/co19_2-dart2js.status
@@ -2,11 +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.
 
-[ $compiler == dart2js ]
-Language/Expressions/Spawning_an_Isolate/new_isolate_t01: SkipByDesign
-LibTest/io/*: SkipByDesign # dart:io not supported.
-LibTest/isolate/*: SkipByDesign # dart:isolate not supported.
-
 [ $builder_tag != run_webgl_tests && $compiler == dart2js ]
 LayoutTests/fast/canvas/webgl*: Skip # Only run WebGL on special builders, issue 29961
 
@@ -15,6 +10,11 @@
 LibTest/html/*: SkipByDesign # d8 is not a browser
 WebPlatformTest/*: SkipByDesign # d8 is not a browser
 
+[ $compiler == dart2js || $compiler == dartdevc || $compiler == dartdevk ]
+Language/Expressions/Spawning_an_Isolate/new_isolate_t01: SkipByDesign
+LibTest/io/*: SkipByDesign # dart:io not supported.
+LibTest/isolate/*: SkipByDesign # dart:isolate not supported.
+
 [ $compiler == dartdevc || $compiler == dartdevk ]
 Language/Classes/Constructors/Generative_Constructors/formal_parameter_t07: Skip # Times out
 Language/Classes/Constructors/Generative_Constructors/fresh_instance_t01: Skip # Times out
diff --git a/tests/co19_2/co19_2-kernel.status b/tests/co19_2/co19_2-kernel.status
index 717b34e4..e637ca2 100644
--- a/tests/co19_2/co19_2-kernel.status
+++ b/tests/co19_2/co19_2-kernel.status
@@ -3,12 +3,10 @@
 # BSD-style license that can be found in the LICENSE file.
 
 [ $compiler == dartk ]
-LanguageFeatures/Set-literals/semantics_A05_t02: RuntimeError
 LanguageFeatures/Set-literals/syntax_compatibility_A01_t02: RuntimeError
 
 [ $compiler == dartkp ]
 Language/Expressions/Instance_Creation/New/evaluation_t20: RuntimeError
-Language/Functions/Formal_Parameters/Optional_Formals/default_value_t02: DartkCrash
 Language/Libraries_and_Scripts/Imports/deferred_import_t01: RuntimeError
 Language/Metadata/before_factory_t01: RuntimeError
 Language/Metadata/before_library_t01: RuntimeError
@@ -18,19 +16,6 @@
 Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_t09: RuntimeError
 Language/Types/Interface_Types/subtype_t03: RuntimeError
 Language/Types/Interface_Types/subtype_t26: RuntimeError
-LanguageFeatures/Constant_update2018/CastOperator_A03_t01/none: RuntimeError
-LanguageFeatures/Constant_update2018/CastOperator_A03_t03/none: RuntimeError
-LanguageFeatures/Constant_update2018/EqualityOperator_A01_t01: RuntimeError
-LanguageFeatures/Constant_update2018/EqualityOperator_A01_t02: RuntimeError
-LanguageFeatures/Constant_update2018/NewOperators_A02_t03/none: RuntimeError
-LanguageFeatures/Constant_update2018/NewOperators_A02_t06/none: RuntimeError
-LanguageFeatures/Constant_update2018/NewOperators_A02_t09/none: RuntimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A03_t02: RuntimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A03_t03: CompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A03_t04: RuntimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A03_t05/none: RuntimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A03_t06/none: RuntimeError
-LanguageFeatures/Set-literals/semantics_A05_t02: RuntimeError
 LanguageFeatures/Set-literals/syntax_compatibility_A01_t02: RuntimeError
 LanguageFeatures/Subtyping/static/generated/left_bottom_global_variable_A02_t01: DartkCrash
 LanguageFeatures/Subtyping/static/generated/left_promoted_variable_global_variable_A02_t01: DartkCrash
@@ -70,10 +55,22 @@
 LibTest/isolate/ReceivePort/lastWhere_A01_t01: RuntimeError
 
 [ $compiler == fasta ]
+Language/Expressions/Assignment/Compound_Assignment/expression_assignment_t12: CompileTimeError
+Language/Expressions/Assignment/Compound_Assignment/indexed_expression_assignment_t12: CompileTimeError
+Language/Expressions/Assignment/Compound_Assignment/null_aware_compound_assignment_static_t12: CompileTimeError
+Language/Expressions/Assignment/Compound_Assignment/null_aware_compound_assignment_t12: CompileTimeError
+Language/Expressions/Assignment/Compound_Assignment/setter_assignment_t12: CompileTimeError
+Language/Expressions/Assignment/Compound_Assignment/variable_assignment_t12: CompileTimeError
 Language/Statements/For/syntax_t13: Crash # Assertion error: kernel_shadow_ast.dart: 'receiver == null': is not true.
 Language/Statements/For/syntax_t20: Crash # Assertion error: kernel_shadow_ast.dart: 'receiver == null': is not true.
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A03_t03: Crash
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A03_t04: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t04/none: CompileTimeError
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t06/none: Crash
+LanguageFeatures/Set-literals/type_inference_A04_t02/02: MissingCompileTimeError
+LanguageFeatures/Set-literals/type_inference_A04_t02/03: MissingCompileTimeError
+LanguageFeatures/Set-literals/type_inference_A06_t02/03: MissingCompileTimeError
+LanguageFeatures/Set-literals/type_inference_A06_t02/04: MissingCompileTimeError
+LanguageFeatures/Set-literals/type_inference_A06_t02/05: MissingCompileTimeError
+LanguageFeatures/Set-literals/type_inference_A06_t02/06: MissingCompileTimeError
 
 [ $runtime == vm ]
 LibTest/collection/ListBase/ListBase_class_A01_t02: Pass, Slow # Does many calls
@@ -93,17 +90,13 @@
 LibTest/io/RawDatagramSocket/where_A01_t01: Pass, Fail # Issue https://github.com/dart-lang/co19/issues/170
 
 [ $fasta ]
-Language/Classes/Abstract_Instance_Members/override_default_value_t01: MissingCompileTimeError # Issue 34190
-Language/Classes/Abstract_Instance_Members/override_default_value_t02: MissingCompileTimeError # Issue 34190
-Language/Classes/Abstract_Instance_Members/override_default_value_t03: MissingCompileTimeError # Issue 34190
-Language/Classes/Abstract_Instance_Members/override_default_value_t04: MissingCompileTimeError # Issue 34190
-Language/Classes/Abstract_Instance_Members/override_default_value_t05: MissingCompileTimeError # Issue 34190
 Language/Classes/Constructors/Generative_Constructors/initializers_t15: CompileTimeError
 Language/Classes/Getters/type_object_t01: CompileTimeError
 Language/Classes/Getters/type_object_t02: CompileTimeError
+Language/Classes/Instance_Methods/Operators/allowed_names_t01: Skip # triple-shift flag
+Language/Classes/Instance_Methods/Operators/allowed_names_t23: Skip # triple-shift flag
+Language/Classes/Instance_Methods/Operators/arity_1_t19: Skip # triple-shift flag
 Language/Classes/Instance_Methods/Operators/return_type_t01: MissingCompileTimeError
-Language/Classes/Instance_Methods/override_different_default_values_t01: MissingCompileTimeError # Issue 34190
-Language/Classes/Instance_Methods/override_different_default_values_t02: MissingCompileTimeError # Issue 34190
 Language/Classes/Setters/return_type_not_void_t01: MissingCompileTimeError
 Language/Classes/Setters/same_name_getter_different_type_t01: MissingCompileTimeError
 Language/Classes/Setters/syntax_t04: MissingCompileTimeError
@@ -115,6 +108,12 @@
 Language/Enums/syntax_t08: CompileTimeError
 Language/Enums/syntax_t09: CompileTimeError
 Language/Expressions/Assignable_Expressions/syntax_t01: CompileTimeError
+Language/Expressions/Assignment/Compound_Assignment/expression_assignment_t12: Skip # triple-shift flag
+Language/Expressions/Assignment/Compound_Assignment/indexed_expression_assignment_t12: Skip # triple-shift flag
+Language/Expressions/Assignment/Compound_Assignment/null_aware_compound_assignment_static_t12: Skip # triple-shift flag
+Language/Expressions/Assignment/Compound_Assignment/null_aware_compound_assignment_t12: Skip # triple-shift flag
+Language/Expressions/Assignment/Compound_Assignment/setter_assignment_t12: Skip # triple-shift flag
+Language/Expressions/Assignment/Compound_Assignment/variable_assignment_t12: Skip # triple-shift flag
 Language/Expressions/Assignment/expression_assignment_failed_t02: CompileTimeError
 Language/Expressions/Assignment/static_type_t02: CompileTimeError
 Language/Expressions/Assignment/static_type_t03: CompileTimeError
@@ -123,12 +122,15 @@
 Language/Expressions/Assignment/super_assignment_static_warning_t03: CompileTimeError
 Language/Expressions/Assignment/super_assignment_t06: CompileTimeError
 Language/Expressions/Assignment/super_assignment_value_t02: CompileTimeError
-Language/Expressions/Bitwise_Expressions/syntax_t01: CompileTimeError
+Language/Expressions/Bitwise_Expressions/syntax_t01: Skip # triple-shift flag
+Language/Expressions/Constants/bitwise_operators_t01: Skip # triple-shift flag
+Language/Expressions/Constants/bitwise_operators_t07: Skip # triple-shift flag
+Language/Expressions/Constants/bitwise_operators_t08: Skip # triple-shift flag
 Language/Expressions/Constants/constant_list_t02: MissingCompileTimeError # Legal because of implicit const
 Language/Expressions/Constants/constant_map_t02: MissingCompileTimeError # Legal because of implicit const
 Language/Expressions/Constants/depending_on_itself_t03: MissingCompileTimeError # Issue 34189
 Language/Expressions/Constants/equals_expression_t03: MissingCompileTimeError # Issue 34192
-Language/Expressions/Equality/syntax_t01: CompileTimeError
+Language/Expressions/Equality/syntax_t01: Skip # triple-shift flag
 Language/Expressions/Function_Expressions/syntax_t05: CompileTimeError
 Language/Expressions/Function_Invocation/async_cleanup_t01: CompileTimeError
 Language/Expressions/Function_Invocation/async_cleanup_t02: CompileTimeError
@@ -142,11 +144,16 @@
 Language/Expressions/Instance_Creation/Const/parameterized_type_t01: CompileTimeError
 Language/Expressions/Instance_Creation/Const/parameterized_type_t02: CompileTimeError
 Language/Expressions/Instance_Creation/New/syntax_t04: MissingCompileTimeError # Legal because of implicit new
+Language/Expressions/Instance_Creation/New/type_t08: CompileTimeError
+Language/Expressions/Instance_Creation/New/type_t09: CompileTimeError
 Language/Expressions/Lists/constant_list_t01: CompileTimeError
+Language/Expressions/Lists/syntax_t01: Skip # triple-shift flag
 Language/Expressions/Maps/constant_map_t02: MissingCompileTimeError
 Language/Expressions/Maps/constant_map_type_t01: CompileTimeError
-Language/Expressions/Maps/equal_keys_t01: MissingCompileTimeError
+Language/Expressions/Maps/equal_keys_t01/01: MissingCompileTimeError
+Language/Expressions/Maps/equal_keys_t01/02: MissingCompileTimeError
 Language/Expressions/Maps/key_value_equals_operator_t01: MissingCompileTimeError # Issue 32557
+Language/Expressions/Maps/syntax_t01: Skip # triple-shift flag
 Language/Expressions/Method_Invocation/Ordinary_Invocation/accessible_instance_member_t04: CompileTimeError
 Language/Expressions/Method_Invocation/Super_Invocation/getter_lookup_failed_t02: CompileTimeError
 Language/Expressions/Multiplicative_Expressions/syntax_t01: CompileTimeError
@@ -158,23 +165,78 @@
 Language/Expressions/Property_Extraction/Super_Getter_Access_and_Method_Closurization/no_such_method_t01: CompileTimeError
 Language/Expressions/Property_Extraction/Super_Getter_Access_and_Method_Closurization/no_such_method_t02: CompileTimeError
 Language/Expressions/Property_Extraction/Super_Getter_Access_and_Method_Closurization/static_type_t03: CompileTimeError
-Language/Expressions/Relational_Expressions/syntax_t01: CompileTimeError
-Language/Expressions/Shift/syntax_t01: CompileTimeError
+Language/Expressions/Relational_Expressions/syntax_t01: Skip # triple-shift experiment flag
+Language/Expressions/Shift/allowed_characters_t02: Skip # triple-shift flag
+Language/Expressions/Shift/equivalent_super_t02: Skip # triple-shift flag
+Language/Expressions/Shift/equivalent_t02: Skip # triple-shift flag
+Language/Expressions/Shift/integer_t03: Skip # triple-shift flag
+Language/Expressions/Shift/integer_t04/01: Crash
+Language/Expressions/Shift/integer_t04/02: Crash
+Language/Expressions/Shift/integer_t04/03: Crash
+Language/Expressions/Shift/integer_t04/04: Crash
+Language/Expressions/Shift/integer_t04/05: Crash
+Language/Expressions/Shift/integer_t04/06: Crash
+Language/Expressions/Shift/integer_t04/07: Crash
+Language/Expressions/Shift/integer_t04/none: Crash
+Language/Expressions/Shift/syntax_t01: Skip # triple-shift experiment flag
+Language/Expressions/Shift/syntax_t15: Skip # triple-shift experiment flag
+Language/Expressions/Shift/syntax_t17: Skip # triple-shift experiment flag
+Language/Expressions/Shift/syntax_t18: Skip # triple-shift experiment flag
+Language/Expressions/Shift/syntax_t19: Skip # triple-shift experiment flag
+Language/Expressions/Shift/syntax_t21: Skip # triple-shift experiment flag
+Language/Expressions/Shift/syntax_t22: Skip # triple-shift experiment flag
+Language/Expressions/Shift/syntax_t23: Skip # triple-shift experiment flag
+Language/Expressions/Shift/syntax_t24: Skip # triple-shift experiment flag
+Language/Expressions/Shift/syntax_t25: Skip # triple-shift experiment flag
+Language/Expressions/Shift/syntax_t26: Skip # triple-shift experiment flag
+Language/Expressions/Shift/syntax_t27: Skip # triple-shift experiment flag
+Language/Expressions/Strings/String_Interpolation/syntax_t01: Skip # triple-shift experiment flag
+Language/Expressions/Symbols/syntax_t02: Skip # triple-shift experiment flag
 Language/Expressions/Unary_Expressions/syntax_t10: CompileTimeError
 Language/Expressions/Unary_Expressions/syntax_t27: CompileTimeError
-Language/Functions/Formal_Parameters/Optional_Formals/default_value_t01: MissingCompileTimeError # 32912
-Language/Functions/Formal_Parameters/Optional_Formals/default_value_t02: MissingCompileTimeError # 32912
-Language/Generics/syntax_t02: CompileTimeError
-Language/Generics/syntax_t03: CompileTimeError
+Language/Expressions/parentheses_t01: Skip # triple-shift experiment flag
+Language/Functions/syntax_t03: Skip # triple-shift experiment flag
+Language/Generics/syntax_t20: CompileTimeError
+Language/Generics/syntax_t22: CompileTimeError
+Language/Generics/syntax_t23: CompileTimeError
+Language/Generics/syntax_t24: CompileTimeError
+Language/Generics/syntax_t25: CompileTimeError
+Language/Generics/syntax_t27/none: CompileTimeError
+Language/Generics/typedef_A01_t01: CompileTimeError
+Language/Generics/typedef_A01_t06/none: CompileTimeError
+Language/Generics/typedef_A01_t07: CompileTimeError
+Language/Generics/typedef_A01_t08: CompileTimeError
+Language/Generics/typedef_A01_t10: CompileTimeError
 Language/Libraries_and_Scripts/Imports/library_name_t01: MissingCompileTimeError # Expects an error, but this is a warning in Dart 2
-Language/Mixins/Mixin_Application/deferred_t01: MissingCompileTimeError # Issue 30273
+Language/Mixins/Mixin_Application/abstract_t09: Crash
+Language/Mixins/Mixin_Application/abstract_t10: Crash
+Language/Mixins/Mixin_Application/abstract_t11: Crash
+Language/Mixins/Mixin_Application/abstract_t12: Crash
+Language/Mixins/Mixin_Application/abstract_t13: Crash
+Language/Mixins/Mixin_Application/deferred_t03: Crash
+Language/Mixins/Mixin_Application/implicit_constructor_t03: Crash
+Language/Mixins/Mixin_Application/implicit_constructor_t04: Crash
+Language/Mixins/Mixin_Application/initializers_t04: Crash
+Language/Mixins/Mixin_Application/initializers_t05: Crash
+Language/Mixins/Mixin_Application/initializers_t06: Crash
+Language/Mixins/Mixin_Application/interfaces_t06: Crash
+Language/Mixins/Mixin_Application/interfaces_t07: Crash
 Language/Mixins/Mixin_Application/static_warning_t01: MissingCompileTimeError # Mixin super equirement
-Language/Mixins/Mixin_Application/superclass_t01: MissingCompileTimeError
-Language/Mixins/Mixin_Application/superclass_t02: MissingCompileTimeError
-Language/Mixins/Mixin_Application/superinterfaces_t07: MissingCompileTimeError
+Language/Mixins/Mixin_Application/superclass_t03: Crash
+Language/Mixins/Mixin_Application/superclass_t04: Crash
+Language/Mixins/Mixin_Application/superinterfaces_t10: Crash
+Language/Mixins/Mixin_Application/superinterfaces_t11: Crash
+Language/Mixins/Mixin_Application/superinterfaces_t12: CompileTimeError
+Language/Mixins/Mixin_Application/superinterfaces_t13: Crash
+Language/Mixins/Mixin_Application/superinterfaces_t14: Crash
+Language/Mixins/Mixin_Application/syntax_t26: Crash
+Language/Mixins/Mixin_Application/warning_t04: Crash
 Language/Mixins/declaring_constructor_t05: MissingCompileTimeError # Mixin constructor
 Language/Mixins/declaring_constructor_t06: MissingCompileTimeError # Mixin constructor
 Language/Overview/Privacy/private_and_public_t11: CompileTimeError
+Language/Reference/Operator_Precedence/precedence_01_assignment_t14: Skip # triple-shift experimental flag
+Language/Reference/Operator_Precedence/precedence_12_Shift_t04: Skip # triple-shift experimental flag
+Language/Reference/Operator_Precedence/precedence_t05: Skip # triple-shift experimental flag
 Language/Statements/Continue/async_loops_t01: CompileTimeError
 Language/Statements/Continue/async_loops_t02: CompileTimeError
 Language/Statements/Continue/async_loops_t03: CompileTimeError
@@ -188,80 +250,60 @@
 Language/Statements/Continue/control_transfer_t08: CompileTimeError
 Language/Statements/Continue/control_transfer_t09: CompileTimeError
 Language/Statements/Continue/label_t07: MissingCompileTimeError # Issue 34206
+Language/Statements/Expression_Statements/syntax_t06: Skip # triple-shift experimental flag
 Language/Statements/Try/catch_scope_t01: CompileTimeError
 Language/Types/Interface_Types/subtype_t30: CompileTimeError
-LanguageFeatures/Constant_update2018/CastOperator_A01_t01: CompileTimeError
-LanguageFeatures/Constant_update2018/CastOperator_A02_t01: CompileTimeError
-LanguageFeatures/Constant_update2018/CastOperator_A02_t02: CompileTimeError
-LanguageFeatures/Constant_update2018/CastOperator_A03_t02/none: CompileTimeError
-LanguageFeatures/Constant_update2018/CastOperator_A04_t01/none: CompileTimeError
-LanguageFeatures/Constant_update2018/CastOperator_A04_t02/none: CompileTimeError
-LanguageFeatures/Constant_update2018/EqualityOperator_A01_t03/none: CompileTimeError
-LanguageFeatures/Constant_update2018/EqualityOperator_A01_t04/none: CompileTimeError
-LanguageFeatures/Constant_update2018/NewOperators_A01_t01: CompileTimeError
-LanguageFeatures/Constant_update2018/NewOperators_A01_t02: CompileTimeError
-LanguageFeatures/Constant_update2018/NewOperators_A02_t01: CompileTimeError
-LanguageFeatures/Constant_update2018/NewOperators_A02_t02: CompileTimeError
-LanguageFeatures/Constant_update2018/NewOperators_A02_t04: CompileTimeError
-LanguageFeatures/Constant_update2018/NewOperators_A02_t05: CompileTimeError
-LanguageFeatures/Constant_update2018/NewOperators_A02_t07: CompileTimeError
-LanguageFeatures/Constant_update2018/NewOperators_A02_t08: CompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A01_t01: CompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A01_t02/none: CompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A01_t03: CompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A01_t05/none: CompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A02_t01: CompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A02_t02/none: CompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A02_t03: CompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A02_t05/none: CompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A03_t01: CompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A04_t01: CompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A04_t02: CompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A04_t03/none: CompileTimeError
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A04_t04/none: CompileTimeError
-LanguageFeatures/Constant_update2018/TypeTestOperator_A01_t01: CompileTimeError
-LanguageFeatures/Constant_update2018/TypeTestOperator_A01_t02: CompileTimeError
-LanguageFeatures/Constant_update2018/TypeTestOperator_A02_t01: CompileTimeError
-LanguageFeatures/Constant_update2018/TypeTestOperator_A02_t02: CompileTimeError
-LanguageFeatures/Constant_update2018/TypeTestOperator_A03_t01/none: CompileTimeError
-LanguageFeatures/Constant_update2018/TypeTestOperator_A03_t02/none: CompileTimeError
-LanguageFeatures/Constant_update2018/TypeTestOperator_A03_t03/none: CompileTimeError
-LanguageFeatures/Constant_update2018/TypeTestOperator_A03_t04/none: CompileTimeError
-LanguageFeatures/Constant_update2018/TypeTestOperator_A04_t01/none: CompileTimeError
-LanguageFeatures/Constant_update2018/TypeTestOperator_A04_t02/none: CompileTimeError
-LanguageFeatures/Control-flow-collections/scoping_A01_t01: CompileTimeError, Crash, Pass # This feature is not implemented yet
-LanguageFeatures/Control-flow-collections/scoping_A02_t01: CompileTimeError, Crash, Pass # This feature is not implemented yet
-LanguageFeatures/Control-flow-collections/static_errors_A01_t01: CompileTimeError, Crash, Pass # This feature is not implemented yet
-LanguageFeatures/Control-flow-collections/static_errors_A02_t01: CompileTimeError, Crash, Pass # This feature is not implemented yet
-LanguageFeatures/Control-flow-collections/static_errors_A03_t01: CompileTimeError, Crash, Pass # This feature is not implemented yet
-LanguageFeatures/Control-flow-collections/static_errors_A04_t01: CompileTimeError, Crash, Pass # This feature is not implemented yet
-LanguageFeatures/Control-flow-collections/static_errors_A05_t01: CompileTimeError, Crash, Pass # This feature is not implemented yet
-LanguageFeatures/Control-flow-collections/static_errors_A06_t01: CompileTimeError, Crash, Pass # This feature is not implemented yet
-LanguageFeatures/Control-flow-collections/static_errors_A07_t01: CompileTimeError, Crash, Pass # This feature is not implemented yet
-LanguageFeatures/Control-flow-collections/static_errors_A08_t01: CompileTimeError, Crash, Pass # This feature is not implemented yet
-LanguageFeatures/Control-flow-collections/static_errors_A09_t01: CompileTimeError, Crash, Pass # This feature is not implemented yet
-LanguageFeatures/Control-flow-collections/static_errors_A10_t01: CompileTimeError, Crash, Pass # This feature is not implemented yet
-LanguageFeatures/Control-flow-collections/static_errors_A11_t01: CompileTimeError, Crash, Pass # This feature is not implemented yet
-LanguageFeatures/Control-flow-collections/static_semantics_A01_t01: CompileTimeError, Crash, Pass # This feature is not implemented yet
-LanguageFeatures/Control-flow-collections/static_semantics_A01_t02: CompileTimeError, Crash, Pass # This feature is not implemented yet
-LanguageFeatures/Control-flow-collections/static_semantics_A02_t01: CompileTimeError, Crash, Pass # This feature is not implemented yet
-LanguageFeatures/Control-flow-collections/static_semantics_A02_t02: CompileTimeError, Crash, Pass # This feature is not implemented yet
-LanguageFeatures/Control-flow-collections/syntax_A01_t01: CompileTimeError, Crash, Pass # This feature is not implemented yet
-LanguageFeatures/Control-flow-collections/syntax_A01_t02: CompileTimeError, Crash, Pass # This feature is not implemented yet
-LanguageFeatures/Control-flow-collections/syntax_A01_t03: CompileTimeError, Crash, Pass # This feature is not implemented yet
-LanguageFeatures/Control-flow-collections/syntax_A02_t01: CompileTimeError, Crash, Pass # This feature is not implemented yet
-LanguageFeatures/Control-flow-collections/syntax_A02_t02: CompileTimeError, Crash, Pass # This feature is not implemented yet
-LanguageFeatures/Control-flow-collections/syntax_A03_t01: CompileTimeError, Crash, Pass # This feature is not implemented yet
-LanguageFeatures/Control-flow-collections/type_inference_A01_t01: CompileTimeError, Crash, Pass # This feature is not implemented yet
-LanguageFeatures/Control-flow-collections/type_inference_A02_t01: CompileTimeError, Crash, Pass # This feature is not implemented yet
-LanguageFeatures/Control-flow-collections/type_inference_A03_t01: CompileTimeError, Crash, Pass # This feature is not implemented yet
-LanguageFeatures/Control-flow-collections/type_inference_A04_t01: CompileTimeError, Crash, Pass # This feature is not implemented yet
-LanguageFeatures/Control-flow-collections/type_inference_A05_t01: CompileTimeError, Crash, Pass # This feature is not implemented yet
-LanguageFeatures/Control-flow-collections/type_inference_A06_t01: CompileTimeError, Crash, Pass # This feature is not implemented yet
-LanguageFeatures/Control-flow-collections/type_inference_A07_t01: CompileTimeError, Crash, Pass # This feature is not implemented yet
-LanguageFeatures/Control-flow-collections/type_inference_A08_t01: CompileTimeError, Crash, Pass # This feature is not implemented yet
-LanguageFeatures/Control-flow-collections/type_promotion_A01_t01: CompileTimeError, Crash, Pass # This feature is not implemented yet
-LanguageFeatures/Control-flow-collections/type_promotion_A01_t02: CompileTimeError, Crash, Pass # This feature is not implemented yet
+Language/Types/Type_Aliases/scope_t01: CompileTimeError
+Language/Types/Type_Aliases/scope_t02/none: CompileTimeError
+Language/Types/Type_Aliases/scope_t03: CompileTimeError
+Language/Types/Type_Aliases/scope_t04/none: CompileTimeError
+Language/Types/Type_Aliases/syntax_t01: CompileTimeError
+Language/Types/Type_Aliases/syntax_t02: CompileTimeError
+Language/Types/Type_Aliases/syntax_t03: CompileTimeError
+Language/Types/Type_Aliases/syntax_t04: CompileTimeError
+Language/Types/Type_Aliases/syntax_t20: CompileTimeError
+Language/Types/Type_Aliases/syntax_t21: CompileTimeError
+LanguageFeatures/Constant-update-2018/EqualityOperator_A01_t09: MissingCompileTimeError
+LanguageFeatures/Constant-update-2018/EqualityOperator_A01_t10: MissingCompileTimeError
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t01: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t02: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t03/01: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t03/02: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t03/03: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t03/04: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t03/05: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t03/06: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t03/none: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t04/01: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t04/02: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t04/03: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t04/04: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t04/none: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t05/01: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t05/02: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t05/03: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t05/04: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t05/05: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t05/06: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t05/none: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t06/01: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t06/02: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t06/03: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t06/04: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t06/05: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t07/01: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t07/02: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t07/03: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t07/04: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t07/05: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t07/06: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t07/none: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t08/01: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t08/02: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t08/03: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t08/04: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t08/05: Crash
+LanguageFeatures/Constant-update-2018/NewOperators_A01_t08/none: Crash
 LanguageFeatures/Instantiate-to-bound/class/dynamic/class_FutureOr_l1_t01: Crash
 LanguageFeatures/Instantiate-to-bound/class/dynamic/class_FutureOr_l1_t02: CompileTimeError
 LanguageFeatures/Instantiate-to-bound/class/dynamic/class_FutureOr_l1_t03: Crash
@@ -285,6 +327,10 @@
 LanguageFeatures/Instantiate-to-bound/class/static/class_l1_t04/none: CompileTimeError
 LanguageFeatures/Instantiate-to-bound/class/static/class_l2_t03/none: CompileTimeError
 LanguageFeatures/Instantiate-to-bound/class/static/class_l2_t04/none: CompileTimeError
+LanguageFeatures/Instantiate-to-bound/class/static/class_l2_t08/01: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/class/static/class_l2_t08/02: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/class/static/class_l2_t08/03: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/class/static/class_l2_t08/04: MissingCompileTimeError
 LanguageFeatures/Instantiate-to-bound/class/static/class_l3_t02/none: CompileTimeError
 LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l1_t02/none: CompileTimeError
 LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l1_t03/01: MissingCompileTimeError
@@ -347,6 +393,7 @@
 LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t04/05: MissingCompileTimeError
 LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t04/06: MissingCompileTimeError
 LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t04/07: MissingCompileTimeError
+LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t05/01: MissingCompileTimeError
 LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t07/none: CompileTimeError
 LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t08/01: MissingCompileTimeError
 LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_l1_t09/01: MissingCompileTimeError
@@ -516,9 +563,14 @@
 LanguageFeatures/Set-literals/constant_set_literals_A02_t03/01: MissingCompileTimeError
 LanguageFeatures/Set-literals/constant_set_literals_A02_t03/02: MissingCompileTimeError
 LanguageFeatures/Set-literals/constant_set_literals_A02_t03/03: MissingCompileTimeError
-LanguageFeatures/Set-literals/exact_types_of_literals_A01_t03: CompileTimeError
-LanguageFeatures/Set-literals/semantics_A05_t01: CompileTimeError
-LanguageFeatures/Set-literals/set_literals_A04_t01: CompileTimeError
+LanguageFeatures/Set-literals/disambiguating_A02_t02: CompileTimeError
+LanguageFeatures/Set-literals/disambiguating_A02_t03: Crash
+LanguageFeatures/Set-literals/exact_types_of_literals_A01_t03: RuntimeError
+LanguageFeatures/Set-literals/type_inference_A07_t01: CompileTimeError
+LanguageFeatures/Set-literals/type_inference_A08_t01: CompileTimeError
+LanguageFeatures/Set-literals/type_inference_A09_t01: CompileTimeError
+LanguageFeatures/Set-literals/type_inference_A10_t01: CompileTimeError
+LanguageFeatures/Set-literals/type_inference_A10_t02: CompileTimeError
 LanguageFeatures/Simple-bounds/dynamic/class_FutureOr_l1_t02: CompileTimeError
 LanguageFeatures/Simple-bounds/static/class_FutureOr_l1_t02/none: CompileTimeError
 LanguageFeatures/Simple-bounds/static/typedef_FutureOr_l1_t02/none: CompileTimeError
@@ -527,6 +579,20 @@
 LanguageFeatures/Simple-bounds/static/typedef_typedef_l1_t04/01: MissingCompileTimeError
 LanguageFeatures/Simple-bounds/static/typedef_typedef_l1_t04/02: MissingCompileTimeError
 LanguageFeatures/Simple-bounds/static/typedef_typedef_l1_t10: CompileTimeError
+LanguageFeatures/Spread-collections/ConstSpreads_A09_t09/04: MissingCompileTimeError
+LanguageFeatures/Spread-collections/ConstSpreads_A10_t09/04: MissingCompileTimeError
+LanguageFeatures/Spread-collections/TypeInference_A01_t03/06: MissingCompileTimeError
+LanguageFeatures/Spread-collections/TypeInference_A01_t03/07: MissingCompileTimeError
+LanguageFeatures/Spread-collections/TypeInference_A01_t03/08: MissingCompileTimeError
+LanguageFeatures/Spread-collections/TypeInference_A01_t03/09: MissingCompileTimeError
+LanguageFeatures/Spread-collections/TypeInference_A01_t04/06: MissingCompileTimeError
+LanguageFeatures/Spread-collections/TypeInference_A01_t04/07: MissingCompileTimeError
+LanguageFeatures/Spread-collections/TypeInference_A01_t04/08: MissingCompileTimeError
+LanguageFeatures/Spread-collections/TypeInference_A01_t04/09: MissingCompileTimeError
+LanguageFeatures/Spread-collections/TypeInference_A03_t02/06: MissingCompileTimeError
+LanguageFeatures/Spread-collections/TypeInference_A03_t02/07: MissingCompileTimeError
+LanguageFeatures/Spread-collections/TypeInference_A03_t02/08: MissingCompileTimeError
+LanguageFeatures/Spread-collections/TypeInference_A03_t02/09: MissingCompileTimeError
 LanguageFeatures/Super-mixins/covariance_t03: MissingCompileTimeError # Issue 35111
 LanguageFeatures/Super-mixins/covariance_t06: MissingCompileTimeError # Issue 35111
 LanguageFeatures/Super-mixins/covariance_t07: MissingCompileTimeError # Issue 35111
@@ -539,12 +605,6 @@
 LanguageFeatures/regression/34803_t02: Crash
 
 [ $arch == simdbc64 && $compiler == dartk ]
-LanguageFeatures/Constant_update2018/NewOperators_A02_t01: Pass
-LanguageFeatures/Constant_update2018/NewOperators_A02_t02: Pass
-LanguageFeatures/Constant_update2018/NewOperators_A02_t04: Pass
-LanguageFeatures/Constant_update2018/NewOperators_A02_t05: Pass
-LanguageFeatures/Constant_update2018/NewOperators_A02_t07: Pass
-LanguageFeatures/Constant_update2018/NewOperators_A02_t08: Pass
 LibTest/collection/ListBase/ListBase_class_A01_t02: Crash # Issue http://dartbug.com/35242
 LibTest/collection/ListMixin/ListMixin_class_A01_t02: Crash # Issue http://dartbug.com/35242
 LibTest/core/List/List_class_A01_t02: Crash # Issue http://dartbug.com/35242
@@ -561,7 +621,6 @@
 LibTest/io/Stdout/writeCharCode_A01_t03: Timeout, Pass
 
 [ $arch == simdbc64 && ($compiler == dartk || $compiler == dartkb) ]
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A03_t03: CompileTimeError
 LibTest/collection/ListBase/ListBase_class_A01_t02: Timeout, Pass # https://github.com/dart-lang/sdk/issues/35316 as well?
 LibTest/collection/ListMixin/ListMixin_class_A01_t02: Timeout, Pass # https://github.com/dart-lang/sdk/issues/35316 as well?
 LibTest/io/Link/renameSync_A02_t01: RuntimeError, Pass
@@ -626,12 +685,7 @@
 LibTest/isolate/Isolate/ping_A03_t02: RuntimeError, Pass
 LibTest/isolate/Isolate/removeErrorListener_A02_t01: Crash, Pass
 
-[ $arch != simdbc64 && $runtime == vm && ($compiler == dartk || $compiler == dartkb) ]
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A03_t03: CompileTimeError
-
 [ $compiler != dart2js && $runtime != vm && $fasta ]
-Language/Classes/Constructors/Constant_Constructors/initializer_not_a_constant_t01: MissingCompileTimeError # Issue 34191
-Language/Classes/Constructors/Constant_Constructors/initializer_not_a_constant_t02: MissingCompileTimeError # Issue 34191
 Language/Classes/Constructors/Constant_Constructors/invalid_constant_initializer_t02: MissingCompileTimeError # Issue 34192
 Language/Expressions/Constants/exception_t01: MissingCompileTimeError # Issue 31936
 Language/Expressions/Constants/exception_t03: MissingCompileTimeError # Issue 31936
@@ -642,7 +696,6 @@
 Language/Metadata/compilation_t03: MissingCompileTimeError # Issue 34205
 
 [ $compiler != dart2js && $fasta ]
-Language/Classes/Constructors/Constant_Constructors/initializer_not_a_constant_t03: MissingCompileTimeError # Issue 34191
 Language/Expressions/Constants/literal_string_t02: MissingCompileTimeError # Issue 34192
 Language/Statements/Switch/equal_operator_t01: MissingCompileTimeError # Issue 32557
 Language/Statements/Switch/equal_operator_t02: MissingCompileTimeError # Issue 32557
@@ -841,33 +894,6 @@
 Language/Expressions/Logical_Boolean_Expressions/syntax_t01: RuntimeError
 Language/Statements/Assert/execution_t08: RuntimeError
 Language/Types/Function_Types/call_t01: RuntimeError
-LanguageFeatures/Constant_update2018/CastOperator_A01_t01: DartkCrash
-LanguageFeatures/Constant_update2018/CastOperator_A02_t01: DartkCrash
-LanguageFeatures/Constant_update2018/CastOperator_A02_t02: DartkCrash
-LanguageFeatures/Constant_update2018/CastOperator_A03_t01/02: Pass
-LanguageFeatures/Constant_update2018/CastOperator_A03_t01/03: Pass
-LanguageFeatures/Constant_update2018/CastOperator_A04_t01: Pass
-LanguageFeatures/Constant_update2018/EqualityOperator_A01_t03: Pass
-LanguageFeatures/Constant_update2018/EqualityOperator_A01_t04: Pass
-LanguageFeatures/Constant_update2018/NewOperators_A01_t01: DartkCrash
-LanguageFeatures/Constant_update2018/NewOperators_A01_t02: DartkCrash
-LanguageFeatures/Constant_update2018/NewOperators_A02_t01: Fail
-LanguageFeatures/Constant_update2018/NewOperators_A02_t02: DartkCrash
-LanguageFeatures/Constant_update2018/NewOperators_A02_t04: Fail
-LanguageFeatures/Constant_update2018/NewOperators_A02_t05: DartkCrash
-LanguageFeatures/Constant_update2018/NewOperators_A02_t07: Fail
-LanguageFeatures/Constant_update2018/NewOperators_A02_t08: DartkCrash
-LanguageFeatures/Constant_update2018/ShortCircuitOperators_A03_t05: Pass
-LanguageFeatures/Constant_update2018/TypeTestOperator_A01_t01: DartkCrash
-LanguageFeatures/Constant_update2018/TypeTestOperator_A01_t02: DartkCrash
-LanguageFeatures/Constant_update2018/TypeTestOperator_A02_t01: DartkCrash
-LanguageFeatures/Constant_update2018/TypeTestOperator_A02_t02: DartkCrash
-LanguageFeatures/Constant_update2018/TypeTestOperator_A03_t01: Pass
-LanguageFeatures/Constant_update2018/TypeTestOperator_A03_t02: Pass
-LanguageFeatures/Constant_update2018/TypeTestOperator_A03_t03/01: Pass
-LanguageFeatures/Constant_update2018/TypeTestOperator_A03_t04/01: Pass
-LanguageFeatures/Constant_update2018/TypeTestOperator_A04_t01: Pass
-LanguageFeatures/Constant_update2018/TypeTestOperator_A04_t02: Pass
 LanguageFeatures/Instantiate-to-bound/class/dynamic/class_typedef_l2_t06: RuntimeError
 LanguageFeatures/Instantiate-to-bound/class/static/class_FutureOr_l1_t04/none: CompileTimeError
 LanguageFeatures/Instantiate-to-bound/class/static/class_typedef_l1_t04/none: CompileTimeError
@@ -1006,8 +1032,6 @@
 Language/Statements/Do/execution_t06: RuntimeError
 Language/Statements/For/For_Loop/execution_t11: RuntimeError
 Language/Statements/While/execution_t02: RuntimeError
-Language/Types/Type_Declarations/Typedef/self_reference_t08: DartkCrash
-Language/Types/Type_Declarations/Typedef/self_reference_t09: DartkCrash
 LibTest/collection/LinkedList/add_A01_t01: RuntimeError
 LibTest/collection/LinkedList/forEach_A01_t01: RuntimeError
 LibTest/collection/LinkedList/map_A01_t01: RuntimeError
@@ -1156,8 +1180,6 @@
 Language/Expressions/Strings/adjacent_strings_t02: RuntimeError
 Language/Expressions/Type_Cast/syntax_t01: RuntimeError
 Language/Functions/External_Functions/not_connected_to_a_body_t01: RuntimeError
-Language/Generics/syntax_t02: DartkCrash
-Language/Generics/syntax_t03: DartkCrash
 Language/Libraries_and_Scripts/Imports/deferred_import_t01: RuntimeError
 Language/Libraries_and_Scripts/Parts/compilation_t03: RuntimeError
 Language/Libraries_and_Scripts/Parts/compilation_t05: RuntimeError
@@ -1195,7 +1217,6 @@
 Language/Types/Interface_Types/subtype_t22: RuntimeError
 Language/Types/Interface_Types/subtype_t23: RuntimeError
 Language/Types/Interface_Types/subtype_t26: RuntimeError
-Language/Types/Type_Declarations/Typedef/dynamic_param_type_t02: RuntimeError
 Language/Variables/constant_initialization_t03: RuntimeError
 Language/Variables/constant_variable_t09: RuntimeError
 LanguageFeatures/Instantiate-to-bound/class/dynamic/class_typedef_l1_t02: RuntimeError
diff --git a/tests/compiler/dart2js/allocator_analysis/kallocator_analysis_test.dart b/tests/compiler/dart2js/allocator_analysis/kallocator_analysis_test.dart
deleted file mode 100644
index a4b8e88..0000000
--- a/tests/compiler/dart2js/allocator_analysis/kallocator_analysis_test.dart
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-import 'dart:io';
-import 'package:async_helper/async_helper.dart';
-import 'package:compiler/src/compiler.dart';
-import 'package:compiler/src/constants/values.dart';
-import 'package:compiler/src/elements/entities.dart';
-import 'package:compiler/src/ir/util.dart';
-import 'package:compiler/src/js_backend/allocator_analysis.dart';
-import 'package:compiler/src/kernel/kernel_strategy.dart';
-import 'package:compiler/src/util/features.dart';
-import 'package:kernel/ast.dart' as ir;
-import '../equivalence/id_equivalence.dart';
-import '../equivalence/id_equivalence_helper.dart';
-
-main(List<String> args) {
-  asyncTest(() async {
-    Directory dataDir = new Directory.fromUri(Platform.script.resolve('kdata'));
-    await checkTests(dataDir, const KAllocatorAnalysisDataComputer(),
-        args: args, testOmit: false, testFrontend: true);
-  });
-}
-
-class Tags {
-  static const String initialValue = 'initial';
-}
-
-class KAllocatorAnalysisDataComputer extends DataComputer<Features> {
-  const KAllocatorAnalysisDataComputer();
-
-  @override
-  void computeMemberData(Compiler compiler, MemberEntity member,
-      Map<Id, ActualData<Features>> actualMap,
-      {bool verbose: false}) {
-    if (member.isField) {
-      KernelFrontEndStrategy frontendStrategy = compiler.frontendStrategy;
-      KAllocatorAnalysis allocatorAnalysis =
-          compiler.backend.allocatorResolutionAnalysisForTesting;
-      ir.Member node = frontendStrategy.elementMap.getMemberNode(member);
-      ConstantValue initialValue =
-          allocatorAnalysis.getFixedInitializerForTesting(member);
-      Features features = new Features();
-      if (initialValue != null) {
-        features[Tags.initialValue] = initialValue.toStructuredText();
-      }
-      Id id = computeEntityId(node);
-      actualMap[id] = new ActualData<Features>(
-          id, features, computeSourceSpanFromTreeNode(node), member);
-    }
-  }
-
-  @override
-  DataInterpreter<Features> get dataValidator =>
-      const FeaturesDataInterpreter();
-}
diff --git a/tests/compiler/dart2js/allocator_analysis/kdata/simple_initializers.dart b/tests/compiler/dart2js/allocator_analysis/kdata/simple_initializers.dart
deleted file mode 100644
index be12d6c..0000000
--- a/tests/compiler/dart2js/allocator_analysis/kdata/simple_initializers.dart
+++ /dev/null
@@ -1,110 +0,0 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-main() {
-  new Class1();
-  new Class2();
-}
-
-const bool const1 = true;
-
-class Class1 {
-  /*element: Class1.field0:initial=NullConstant*/
-  var field0;
-
-  /*element: Class1.field1:initial=NullConstant*/
-  var field1 = null;
-
-  /*element: Class1.field2:initial=BoolConstant(true)*/
-  var field2 = true;
-
-  /*element: Class1.field3:initial=BoolConstant(false)*/
-  var field3 = false;
-
-  /*element: Class1.field4:initial=IntConstant(0)*/
-  var field4 = 0;
-
-  /*element: Class1.field5:initial=IntConstant(1)*/
-  var field5 = 1;
-
-  /*element: Class1.field6:initial=StringConstant("")*/
-  var field6 = '';
-
-  /*element: Class1.field7:initial=StringConstant("foo")*/
-  var field7 = 'foo';
-
-  /*element: Class1.field8:*/
-  var field8 = 0.5;
-
-  /*element: Class1.field9:*/
-  var field9 = const [];
-
-  /*element: Class1.field10:*/
-  var field10 = const {};
-
-  /*element: Class1.field11:*/
-  var field11 = #foo;
-
-  /*element: Class1.field12:*/
-  var field12 = 2 + 3;
-
-  /*element: Class1.field13:*/
-  var field13 = const1;
-}
-
-class Class2 {
-  /*element: Class2.field1:*/
-  var field1;
-
-  /*element: Class2.field2:*/
-  var field2;
-
-  /*element: Class2.field3:*/
-  var field3;
-
-  /*element: Class2.field4:*/
-  var field4;
-
-  /*element: Class2.field5:*/
-  var field5;
-
-  /*element: Class2.field6:*/
-  var field6;
-
-  /*element: Class2.field7:*/
-  var field7;
-
-  /*element: Class2.field8:*/
-  var field8;
-
-  /*element: Class2.field9:*/
-  var field9;
-
-  /*element: Class2.field10:*/
-  var field10;
-
-  /*element: Class2.field11:*/
-  var field11;
-
-  /*element: Class2.field12:*/
-  var field12;
-
-  /*element: Class2.field13:*/
-  var field13;
-
-  Class2()
-      : field1 = null,
-        field2 = true,
-        field3 = false,
-        field4 = 0,
-        field5 = 1,
-        field6 = '',
-        field7 = 'foo',
-        field8 = 0.5,
-        field9 = const [],
-        field10 = const {},
-        field11 = #foo,
-        field12 = 2 + 3,
-        field13 = const1;
-}
diff --git a/tests/compiler/dart2js/analyses/analysis_helper.dart b/tests/compiler/dart2js/analyses/analysis_helper.dart
index 715352e..1628c6b 100644
--- a/tests/compiler/dart2js/analyses/analysis_helper.dart
+++ b/tests/compiler/dart2js/analyses/analysis_helper.dart
@@ -15,11 +15,13 @@
 import 'package:compiler/src/ir/scope.dart';
 import 'package:compiler/src/ir/static_type.dart';
 import 'package:compiler/src/ir/util.dart';
+import 'package:compiler/src/kernel/dart2js_target.dart';
 import 'package:compiler/src/kernel/loader.dart';
 import 'package:compiler/src/util/uri_extras.dart';
 import 'package:expect/expect.dart';
 import 'package:front_end/src/api_unstable/dart2js.dart' as ir
     show RedirectingFactoryBody;
+import 'package:front_end/src/api_prototype/constant_evaluator.dart' as ir;
 import 'package:kernel/ast.dart' as ir;
 import 'package:kernel/class_hierarchy.dart' as ir;
 import 'package:kernel/core_types.dart' as ir;
@@ -69,13 +71,23 @@
 }
 
 class StaticTypeVisitorBase extends StaticTypeVisitor {
+  @override
   VariableScopeModel variableScopeModel;
 
+  ir.ConstantEvaluator _constantEvaluator;
+
   StaticTypeVisitorBase(
       ir.Component component, ir.ClassHierarchy classHierarchy)
       : super(
             new ir.TypeEnvironment(new ir.CoreTypes(component), classHierarchy),
-            classHierarchy);
+            classHierarchy) {
+    _constantEvaluator = new ir.ConstantEvaluator(
+        const Dart2jsConstantsBackend(),
+        const {},
+        typeEnvironment,
+        false,
+        const ir.SimpleErrorReporter());
+  }
 
   @override
   bool get useAsserts => false;
@@ -95,7 +107,8 @@
       // Skip synthetic .dill members.
       return;
     }
-    variableScopeModel = ScopeModel.computeScopeModel(node)?.variableScopeModel;
+    variableScopeModel =
+        new ScopeModel.from(node, _constantEvaluator).variableScopeModel;
     super.visitProcedure(node);
     variableScopeModel = null;
   }
@@ -106,7 +119,8 @@
       // Skip synthetic .dill members.
       return;
     }
-    variableScopeModel = ScopeModel.computeScopeModel(node)?.variableScopeModel;
+    variableScopeModel =
+        new ScopeModel.from(node, _constantEvaluator).variableScopeModel;
     super.visitField(node);
     variableScopeModel = null;
   }
@@ -117,7 +131,8 @@
       // Skip synthetic .dill members.
       return;
     }
-    variableScopeModel = ScopeModel.computeScopeModel(node)?.variableScopeModel;
+    variableScopeModel =
+        new ScopeModel.from(node, _constantEvaluator).variableScopeModel;
     super.visitConstructor(node);
     variableScopeModel = null;
   }
@@ -291,6 +306,7 @@
     }
   }
 
+  @override
   ir.DartType visitNode(ir.Node node) {
     ir.DartType staticType = node?.accept(this);
     assert(
diff --git a/tests/compiler/dart2js/analyses/api_allowed.json b/tests/compiler/dart2js/analyses/api_allowed.json
index 3139ef5..a7a08a3 100644
--- a/tests/compiler/dart2js/analyses/api_allowed.json
+++ b/tests/compiler/dart2js/analyses/api_allowed.json
@@ -28,8 +28,8 @@
     "Dynamic invocation of '_js_helper::_execGlobal'.": 1,
     "Dynamic access of 'start'.": 1,
     "Dynamic access of 'end'.": 1,
-    "Dynamic access of 'length'.": 4,
-    "Dynamic invocation of '[]'.": 2,
+    "Dynamic access of 'length'.": 3,
+    "Dynamic invocation of '[]'.": 1,
     "Dynamic invocation of 'call'.": 13,
     "Dynamic invocation of 'codeUnitAt'.": 2,
     "Dynamic access of 'iterator'.": 2,
@@ -244,4 +244,4 @@
     "Dynamic access of 'port'.": 1,
     "Dynamic invocation of 'dart._http::_toJSON'.": 1
   }
-}
\ No newline at end of file
+}
diff --git a/tests/compiler/dart2js/analyses/dart2js_allowed.json b/tests/compiler/dart2js/analyses/dart2js_allowed.json
index 5f6fdad..de743f0 100644
--- a/tests/compiler/dart2js/analyses/dart2js_allowed.json
+++ b/tests/compiler/dart2js/analyses/dart2js_allowed.json
@@ -90,6 +90,13 @@
     "Dynamic access of 'allocationNode'.": 1,
     "Dynamic access of 'allocationElement'.": 1
   },
+  "pkg/compiler/lib/src/inferrer/typemasks/set_type_mask.dart": {
+    "Dynamic access of 'isNullable'.": 2,
+    "Dynamic access of 'isEmptyOrNull'.": 1,
+    "Dynamic access of 'isSet'.": 1,
+    "Dynamic access of 'elementType'.": 2,
+    "Dynamic access of 'forwardTo'.": 1
+  },
   "pkg/compiler/lib/src/inferrer/typemasks/type_mask.dart": {
     "Dynamic access of 'isForwarding'.": 1,
     "Dynamic access of 'forwardTo'.": 1
@@ -139,17 +146,36 @@
     "Dynamic invocation of '+'.": 2,
     "Dynamic invocation of '-'.": 1
   },
-  "pkg/compiler/lib/src/js_backend/constant_system_javascript.dart": {
-    "Dynamic invocation of 'remainder'.": 1
+  "pkg/compiler/lib/src/constants/constant_system.dart": {
+    "Dynamic invocation of '&'.": 1,
+    "Dynamic invocation of '|'.": 1,
+    "Dynamic invocation of '^'.": 1,
+    "Dynamic invocation of '<<'.": 1,
+    "Dynamic invocation of '>>'.": 1,
+    "Dynamic invocation of '-'.": 1,
+    "Dynamic invocation of '*'.": 1,
+    "Dynamic invocation of '%'.": 1,
+    "Dynamic invocation of 'remainder'.": 1,
+    "Dynamic invocation of '~/'.": 1,
+    "Dynamic invocation of '/'.": 1,
+    "Dynamic invocation of '+'.": 1,
+    "Dynamic invocation of '<'.": 1,
+    "Dynamic invocation of '<='.": 1,
+    "Dynamic invocation of '>'.": 1,
+    "Dynamic invocation of '>='.": 1,
+    "Dynamic invocation of 'codeUnitAt'.": 1
   },
   "pkg/compiler/lib/src/serialization/binary_sink.dart": {
     "Dynamic access of 'index'.": 1
   },
   "third_party/pkg/dart2js_info/lib/json_info_codec.dart": {
-    "Dynamic invocation of '[]'.": 13,
-    "Dynamic invocation of 'forEach'.": 3,
+    "Dynamic invocation of '[]'.": 11,
+    "Dynamic invocation of 'forEach'.": 2,
     "Dynamic invocation of 'map'.": 2,
-    "Dynamic access of 'length'.": 1
+    "Dynamic invocation of 'compareTo'.": 1
+  },
+  "third_party/pkg/dart2js_info/lib/binary_serialization.dart": {
+    "Dynamic invocation of 'cast'.": 1
   },
   "pkg/compiler/lib/src/util/enumset.dart": {
     "Dynamic access of 'index'.": 4
@@ -190,33 +216,13 @@
     "Dynamic access of 'usedBy'.": 2,
     "Dynamic access of 'inputs'.": 1
   },
-  "pkg/compiler/lib/src/constant_system_dart.dart": {
-    "Dynamic invocation of '|'.": 1,
-    "Dynamic invocation of '&'.": 1,
-    "Dynamic invocation of '^'.": 1,
-    "Dynamic invocation of '<<'.": 1,
-    "Dynamic invocation of '>>'.": 1,
-    "Dynamic invocation of '-'.": 1,
-    "Dynamic invocation of '*'.": 1,
-    "Dynamic invocation of '%'.": 1,
-    "Dynamic invocation of 'remainder'.": 1,
-    "Dynamic invocation of '~/'.": 1,
-    "Dynamic invocation of '/'.": 1,
-    "Dynamic invocation of '+'.": 1,
-    "Dynamic invocation of '<'.": 1,
-    "Dynamic invocation of '<='.": 1,
-    "Dynamic invocation of '>'.": 1,
-    "Dynamic invocation of '>='.": 1,
-    "Dynamic invocation of 'codeUnitAt'.": 1
-  },
-  "third_party/pkg/dart2js_info/lib/src/measurements.dart": {
-    "Dynamic access of 'name'.": 1,
-    "Dynamic invocation of 'call'.": 1
-  },
   "third_party/pkg/dart2js_info/lib/src/util.dart": {
     "Dynamic access of 'name'.": 1,
     "Dynamic invocation of '-'.": 1
   },
+  "third_party/pkg/dart2js_info/lib/src/binary/sink.dart": {
+    "Dynamic access of 'index'.": 1
+  },
   "pkg/js_ast/lib/src/builder.dart": {
     "Dynamic invocation of 'call'.": 2
   },
@@ -278,4 +284,4 @@
     "Dynamic access of 'superclass'.": 1,
     "Dynamic access of 'needsTearOff'.": 1
   }
-}
+}
\ No newline at end of file
diff --git a/tests/compiler/dart2js/analysis_options.yaml b/tests/compiler/dart2js/analysis_options.yaml
index 40dc4a9..efa1621 100644
--- a/tests/compiler/dart2js/analysis_options.yaml
+++ b/tests/compiler/dart2js/analysis_options.yaml
@@ -3,13 +3,15 @@
 # BSD-style license that can be found in the LICENSE file.
 
 analyzer:
-  language:
-    enableSuperMixins: false
-
   errors:
     todo: ignore
     deprecated_member_use: ignore
 
   exclude:
-    - data/*
-    - sourcemaps/data/*
+    - '**/data/*'
+    - '**/model_data/*'
+    - 'deferred_loading/libs/*'
+
+linter:
+  rules:
+    - annotate_overrides
diff --git a/tests/compiler/dart2js/closure/closure_test.dart b/tests/compiler/dart2js/closure/closure_test.dart
index 26d0d92..da6b882 100644
--- a/tests/compiler/dart2js/closure/closure_test.dart
+++ b/tests/compiler/dart2js/closure/closure_test.dart
@@ -95,6 +95,7 @@
           ? closureRepresentationInfoStack.head
           : null;
 
+  @override
   visitFunctionExpression(ir.FunctionExpression node) {
     ClosureRepresentationInfo info = closureDataLookup.getClosureInfo(node);
     pushMember(info.callMethod);
@@ -104,6 +105,7 @@
     popMember();
   }
 
+  @override
   visitFunctionDeclaration(ir.FunctionDeclaration node) {
     ClosureRepresentationInfo info = closureDataLookup.getClosureInfo(node);
     pushMember(info.callMethod);
@@ -113,18 +115,21 @@
     popMember();
   }
 
+  @override
   visitForStatement(ir.ForStatement node) {
     pushLoopNode(node);
     super.visitForStatement(node);
     popLoop();
   }
 
+  @override
   visitWhileStatement(ir.WhileStatement node) {
     pushLoopNode(node);
     super.visitWhileStatement(node);
     popLoop();
   }
 
+  @override
   visitForInStatement(ir.ForInStatement node) {
     pushLoopNode(node);
     super.visitForInStatement(node);
diff --git a/tests/compiler/dart2js/closure/data/list_literal_class.dart b/tests/compiler/dart2js/closure/data/list_literal_class.dart
index 433ef26..4384e6b 100644
--- a/tests/compiler/dart2js/closure/data/list_literal_class.dart
+++ b/tests/compiler/dart2js/closure/data/list_literal_class.dart
@@ -7,14 +7,14 @@
 /*element: A.:hasThis*/
 class A<T> {
   /*element: A.method:hasThis*/
-  @NoInline()
+  @pragma('dart2js:noInline')
   method() {
     /*fields=[this],free=[this],hasThis*/ dynamic local() => <T>[];
     return local;
   }
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o is List<int>;
 
 main() {
diff --git a/tests/compiler/dart2js/closure/data/list_literal_method.dart b/tests/compiler/dart2js/closure/data/list_literal_method.dart
index 754fe55..03a05c8 100644
--- a/tests/compiler/dart2js/closure/data/list_literal_method.dart
+++ b/tests/compiler/dart2js/closure/data/list_literal_method.dart
@@ -4,13 +4,13 @@
 
 import 'package:expect/expect.dart';
 
-@NoInline()
+@pragma('dart2js:noInline')
 method<T>() {
   /*fields=[T],free=[T]*/ dynamic local() => <T>[];
   return local;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o is List<int>;
 
 main() {
diff --git a/tests/compiler/dart2js/closure/data/list_literal_untested_class.dart b/tests/compiler/dart2js/closure/data/list_literal_untested_class.dart
index e394d32..997fd78 100644
--- a/tests/compiler/dart2js/closure/data/list_literal_untested_class.dart
+++ b/tests/compiler/dart2js/closure/data/list_literal_untested_class.dart
@@ -7,7 +7,7 @@
 /*element: A.:hasThis*/
 class A<T> {
   /*element: A.method:hasThis*/
-  @NoInline()
+  @pragma('dart2js:noInline')
   method() {
     /*omit.hasThis*/
     /*strong.fields=[this],free=[this],hasThis*/
@@ -16,7 +16,7 @@
   }
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o == null;
 
 main() {
diff --git a/tests/compiler/dart2js/closure/data/list_literal_untested_method.dart b/tests/compiler/dart2js/closure/data/list_literal_untested_method.dart
index e6a6e1a..87a5673 100644
--- a/tests/compiler/dart2js/closure/data/list_literal_untested_method.dart
+++ b/tests/compiler/dart2js/closure/data/list_literal_untested_method.dart
@@ -4,7 +4,7 @@
 
 import 'package:expect/expect.dart';
 
-@NoInline()
+@pragma('dart2js:noInline')
 method<T>() {
   /*omit.*/
   /*strong.fields=[T],free=[T]*/
@@ -12,7 +12,7 @@
   return local;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o == null;
 
 main() {
diff --git a/tests/compiler/dart2js/closure/data/map_literal_class.dart b/tests/compiler/dart2js/closure/data/map_literal_class.dart
index 08cfea6..975b5ee 100644
--- a/tests/compiler/dart2js/closure/data/map_literal_class.dart
+++ b/tests/compiler/dart2js/closure/data/map_literal_class.dart
@@ -7,14 +7,14 @@
 /*element: A.:hasThis*/
 class A<T> {
   /*element: A.method:hasThis*/
-  @NoInline()
+  @pragma('dart2js:noInline')
   method() {
     /*fields=[this],free=[this],hasThis*/ dynamic local() => <T, int>{};
     return local;
   }
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o is Map<int, int>;
 
 main() {
diff --git a/tests/compiler/dart2js/closure/data/map_literal_method.dart b/tests/compiler/dart2js/closure/data/map_literal_method.dart
index 0347de4..51f99a9 100644
--- a/tests/compiler/dart2js/closure/data/map_literal_method.dart
+++ b/tests/compiler/dart2js/closure/data/map_literal_method.dart
@@ -4,13 +4,13 @@
 
 import 'package:expect/expect.dart';
 
-@NoInline()
+@pragma('dart2js:noInline')
 method<T>() {
   /*fields=[T],free=[T]*/ dynamic local() => <T, int>{};
   return local;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o is Map<int, int>;
 
 main() {
diff --git a/tests/compiler/dart2js/closure/data/map_literal_untested_class.dart b/tests/compiler/dart2js/closure/data/map_literal_untested_class.dart
index fe4e3ae..7161fd6 100644
--- a/tests/compiler/dart2js/closure/data/map_literal_untested_class.dart
+++ b/tests/compiler/dart2js/closure/data/map_literal_untested_class.dart
@@ -7,7 +7,7 @@
 /*element: A.:hasThis*/
 class A<T> {
   /*element: A.method:hasThis*/
-  @NoInline()
+  @pragma('dart2js:noInline')
   method() {
     /*omit.hasThis*/
     /*strong.fields=[this],free=[this],hasThis*/
@@ -16,7 +16,7 @@
   }
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o == null;
 
 main() {
diff --git a/tests/compiler/dart2js/closure/data/map_literal_untested_method.dart b/tests/compiler/dart2js/closure/data/map_literal_untested_method.dart
index d6c830b..27c33a2 100644
--- a/tests/compiler/dart2js/closure/data/map_literal_untested_method.dart
+++ b/tests/compiler/dart2js/closure/data/map_literal_untested_method.dart
@@ -4,7 +4,7 @@
 
 import 'package:expect/expect.dart';
 
-@NoInline()
+@pragma('dart2js:noInline')
 method<T>() {
   /*omit.*/
   /*strong.fields=[T],free=[T]*/
@@ -12,7 +12,7 @@
   return local;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o == null;
 
 main() {
diff --git a/tests/compiler/dart2js/codegen/array_static_intercept_test.dart b/tests/compiler/dart2js/codegen/array_static_intercept_test.dart
index 3dc7b76..ee3c87a 100644
--- a/tests/compiler/dart2js/codegen/array_static_intercept_test.dart
+++ b/tests/compiler/dart2js/codegen/array_static_intercept_test.dart
@@ -7,7 +7,7 @@
 import '../helpers/compiler_helper.dart';
 
 const String TEST_ONE = r"""
-foo(a) {
+foo(List<int> a) {
   a.add(42);
   a.removeLast();
   return a.length;
@@ -15,17 +15,12 @@
 """;
 
 main() {
-  test() async {
+  asyncTest(() async {
     await compile(TEST_ONE, entry: 'foo', check: (String generated) {
       Expect.isTrue(generated.contains(r'.add$1('));
       Expect.isTrue(generated.contains(r'.removeLast$0('));
       Expect.isTrue(generated.contains(r'.length'),
           "Unexpected code to contain '.length':\n$generated");
     });
-  }
-
-  asyncTest(() async {
-    print('--test from kernel------------------------------------------------');
-    await test();
   });
 }
diff --git a/tests/compiler/dart2js/codegen/expect_annotations2_test.dart b/tests/compiler/dart2js/codegen/expect_annotations2_test.dart
index 5b0ba5c..fad77c6 100644
--- a/tests/compiler/dart2js/codegen/expect_annotations2_test.dart
+++ b/tests/compiler/dart2js/codegen/expect_annotations2_test.dart
@@ -5,25 +5,27 @@
 import "package:expect/expect.dart";
 import "package:async_helper/async_helper.dart";
 import 'package:compiler/compiler_new.dart';
+import 'package:compiler/src/commandline_options.dart';
 import '../helpers/memory_compiler.dart';
 
 const MEMORY_SOURCE_FILES = const {
   'main.dart': '''
         import 'package:expect/expect.dart';
 
-        @NoInline()
+        @pragma('dart2js:noInline')
         foo(y) => 49912344 + y;
 
         class A {
+          @pragma('dart2js:noElision')
           var field;
 
-          @NoInline()
+          @pragma('dart2js:noInline')
           A([this.field = 4711]);
 
-          @NoInline()
+          @pragma('dart2js:noInline')
           static bar(x) => x + 123455;
 
-          @NoInline()
+          @pragma('dart2js:noInline')
           gee(x, y) => x + y + 81234512;
         }
 
@@ -39,7 +41,9 @@
   runTest() async {
     OutputCollector collector = new OutputCollector();
     await runCompiler(
-        memorySourceFiles: MEMORY_SOURCE_FILES, outputProvider: collector);
+        memorySourceFiles: MEMORY_SOURCE_FILES,
+        outputProvider: collector,
+        options: [Flags.testMode]);
     // Simply check that the constants of the small functions are still in the
     // output, and that we don't see the result of constant folding.
     String jsOutput = collector.getOutput('', OutputType.js);
diff --git a/tests/compiler/dart2js/codegen/expect_annotations_test.dart b/tests/compiler/dart2js/codegen/expect_annotations_test.dart
index f4e5903..d38eba7 100644
--- a/tests/compiler/dart2js/codegen/expect_annotations_test.dart
+++ b/tests/compiler/dart2js/codegen/expect_annotations_test.dart
@@ -5,6 +5,7 @@
 import 'package:expect/expect.dart';
 import 'package:async_helper/async_helper.dart';
 import 'package:compiler/src/compiler.dart';
+import 'package:compiler/src/commandline_options.dart';
 import 'package:compiler/src/elements/entities.dart';
 import 'package:compiler/src/inferrer/typemasks/masks.dart';
 import 'package:compiler/src/inferrer/types.dart';
@@ -18,10 +19,10 @@
 
 int method(String arg) => arg.length;
 
-@AssumeDynamic()
+@pragma('dart2js:assumeDynamic')
 int methodAssumeDynamic(String arg) => arg.length;
 
-@NoInline()
+@pragma('dart2js:noInline')
 int methodNoInline(String arg) => arg.length;
 
 void main(List<String> args) {
@@ -39,15 +40,11 @@
 }
 
 runTest() async {
-  CompilationResult result =
-      await runCompiler(memorySourceFiles: MEMORY_SOURCE_FILES);
+  CompilationResult result = await runCompiler(
+      memorySourceFiles: MEMORY_SOURCE_FILES, options: [Flags.testMode]);
   Compiler compiler = result.compiler;
   JClosedWorld closedWorld = compiler.backendClosedWorldForTesting;
   Expect.isFalse(compiler.compilationFailed, 'Unsuccessful compilation');
-  Expect.isNotNull(closedWorld.commonElements.expectNoInlineClass,
-      'NoInlineClass is unresolved.');
-  Expect.isNotNull(closedWorld.commonElements.expectAssumeDynamicClass,
-      'AssumeDynamicClass is unresolved.');
 
   void testTypeMatch(FunctionEntity function, TypeMask expectedParameterType,
       TypeMask expectedReturnType, GlobalTypeInferenceResults results) {
@@ -76,11 +73,12 @@
     Expect.equals(
         expectNoInline,
         closedWorld.annotationsData.hasNoInline(method),
-        "Unexpected annotation of @NoInline() on '$method'.");
+        "Unexpected annotation of @pragma('dart2js:noInline') on '$method'.");
     Expect.equals(
         expectAssumeDynamic,
         closedWorld.annotationsData.hasAssumeDynamic(method),
-        "Unexpected annotation of @AssumeDynamic() on '$method'.");
+        "Unexpected annotation of @pragma('dart2js:assumeDynamic') on "
+        "'$method'.");
     GlobalTypeInferenceResults results =
         compiler.globalInference.resultsForTesting;
     if (expectAssumeDynamic) {
diff --git a/tests/compiler/dart2js/codegen/gvn_test.dart b/tests/compiler/dart2js/codegen/gvn_test.dart
index 678d9fc..f8ce1a1 100644
--- a/tests/compiler/dart2js/codegen/gvn_test.dart
+++ b/tests/compiler/dart2js/codegen/gvn_test.dart
@@ -46,13 +46,17 @@
 // Check that [HCheck] instructions do not prevent GVN.
 const String TEST_FIVE = r"""
 class A {
-  var foo = 21;
+  final int foo;
+  A(this.foo);
 }
 
 class B {}
 
 main() {
-  dynamic a = [new B(), new A()][0];
+  helper([new A(32), new A(21), new B(), null][0]);
+}
+
+helper(A a) {
   var b = a.foo;
   var c = a.foo;
   if (a is B) {
@@ -65,6 +69,7 @@
 // Check that a gvn'able instruction in the loop header gets hoisted.
 const String TEST_SIX = r"""
 class A {
+  @pragma('dart2js:noElision')
   final field = 54;
 }
 
@@ -106,7 +111,7 @@
 """;
 
 main() {
-  runTests() async {
+  asyncTest(() async {
     await compile(TEST_ONE, entry: 'foo', check: (String generated) {
       RegExp regexp = RegExp(r"1 \+ [a-z]+");
       checkNumberOfMatches(regexp.allMatches(generated).iterator, 1);
@@ -122,8 +127,9 @@
     });
 
     await compileAll(TEST_FIVE).then((generated) {
+      checkNumberOfMatches(RegExp(r"\.foo;").allMatches(generated).iterator, 1);
       checkNumberOfMatches(
-          RegExp(r"get\$foo\(").allMatches(generated).iterator, 1);
+          RegExp(r"get\$foo\(").allMatches(generated).iterator, 0);
     });
     await compileAll(TEST_SIX).then((generated) {
       Expect.isTrue(generated.contains('for (t1 = a.field === 54; t1;)'));
@@ -134,10 +140,5 @@
     await compileAll(TEST_EIGHT).then((generated) {
       Expect.isTrue(generated.contains('for (; i < t1; ++i)'));
     });
-  }
-
-  asyncTest(() async {
-    print('--test from kernel------------------------------------------------');
-    await runTests();
   });
 }
diff --git a/tests/compiler/dart2js/codegen/interceptor_test.dart b/tests/compiler/dart2js/codegen/interceptor_test.dart
index e77058e..cba680f 100644
--- a/tests/compiler/dart2js/codegen/interceptor_test.dart
+++ b/tests/compiler/dart2js/codegen/interceptor_test.dart
@@ -16,6 +16,7 @@
 
 const String TEST_TWO = r"""
   class A {
+    @pragma('dart2js:noElision')
     var length;
   }
   foo(a) {
@@ -37,11 +38,13 @@
     // intercepted, is turned into a regular getter call or field
     // access.
     await compile(TEST_TWO, entry: 'foo', check: (String generated) {
-      Expect.isFalse(generated.contains(r'a.get$length()'));
+      Expect.isFalse(generated.contains(r'a.get$length()'),
+          'a.get\$length() not expected in\n$generated');
+      Expect.isTrue(generated.contains(new RegExp(r'[$A-Z]+\.A\$\(\)\.length')),
+          '.length expected in\n$generated');
       Expect.isTrue(
-          generated.contains(new RegExp(r'[$A-Z]+\.A\$\(\)\.length')));
-      Expect.isTrue(
-          generated.contains(new RegExp(r'[$A-Z]+\.get\$length\$as\(a\)')));
+          generated.contains(new RegExp(r'[$A-Z]+\.get\$length\$as\(a\)')),
+          '*.get\$length expected in\n$generated');
     });
   }
 
diff --git a/tests/compiler/dart2js/codegen/jsarray_indexof_test.dart b/tests/compiler/dart2js/codegen/jsarray_indexof_test.dart
index e105f5f..8b98f7d 100644
--- a/tests/compiler/dart2js/codegen/jsarray_indexof_test.dart
+++ b/tests/compiler/dart2js/codegen/jsarray_indexof_test.dart
@@ -22,7 +22,7 @@
 const String source = '''
 import 'package:expect/expect.dart';
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o, a) => o.indexOf(a);
 main() {
   test([1, 2, 3], 2);
diff --git a/tests/compiler/dart2js/codegen/load_elimination_test.dart b/tests/compiler/dart2js/codegen/load_elimination_test.dart
index fa16f0f..822a582 100644
--- a/tests/compiler/dart2js/codegen/load_elimination_test.dart
+++ b/tests/compiler/dart2js/codegen/load_elimination_test.dart
@@ -209,9 +209,11 @@
 
 const String TEST_17 = """
 var a;
+int x = 0;
 
 main() {
-  if (main()) {
+  (print)(x++);
+  if (x == 0) {
     a = true;
   } else {
     a = false;
@@ -235,7 +237,7 @@
 
 main() {
   runTests() async {
-    test(String code, String expected) async {
+    test(String code, Pattern expected) async {
       String generated = await compile(code,
           disableInlining: false, disableTypeInference: false);
       Expect.isTrue(
@@ -250,7 +252,7 @@
     await test(TEST_4, 'return t1 + t1');
     await test(TEST_5, 'return 84');
     await test(TEST_6, 'return 84');
-    await test(TEST_7, 'return 32');
+    await test(TEST_7, RegExp('return( .* =)? 32'));
     await test(TEST_8, 'return a.a');
     await test(TEST_9, 'return a.a');
     await test(TEST_10, 'return 2');
@@ -260,7 +262,8 @@
     await test(TEST_14, 'return t1[0]');
     await test(TEST_15, 'return 42');
     await test(TEST_16, 'return \$.a');
-    await test(TEST_17, 'return t1');
+    await test(TEST_17,
+        RegExp(r'return (t1|\$\.x === 0 \? \$\.a = true : \$\.a = false);'));
     await test(TEST_18, 'return t1');
   }
 
diff --git a/tests/compiler/dart2js/codegen/model_data/capture.dart b/tests/compiler/dart2js/codegen/model_data/capture.dart
index ca9279e..5e44fb0 100644
--- a/tests/compiler/dart2js/codegen/model_data/capture.dart
+++ b/tests/compiler/dart2js/codegen/model_data/capture.dart
@@ -4,7 +4,7 @@
 
 /*element: method1:params=0*/
 @pragma('dart2js:noInline')
-method1([a]) => /*params=0*/ () => a;
+method1([a]) => /*access=[a],params=0*/ () => a;
 
 class Class {
   /*element: Class.f:emitted*/
@@ -13,14 +13,14 @@
 
   /*element: Class.capture:params=0*/
   @pragma('dart2js:noInline')
-  Class.capture([a]) : f = (/*params=0*/ () => a);
+  Class.capture([a]) : f = (/*access=[a],params=0*/ () => a);
 
   // TODO(johnniwinther): Remove the redundant assignment of elided boxed
   // parameters.
   /*element: Class.box:assign=[a,a],params=0*/
   @pragma('dart2js:noInline')
   Class.box([a])
-      : f = (/*assign=[a],params=0*/ () {
+      : f = (/*access=[_box_0],assign=[a],params=0*/ () {
           a = 42;
         });
 
@@ -30,12 +30,12 @@
 class Subclass extends Class {
   /*element: Subclass.capture:params=0*/
   @pragma('dart2js:noInline')
-  Subclass.capture([a]) : super.internal(/*params=0*/ () => a);
+  Subclass.capture([a]) : super.internal(/*access=[a],params=0*/ () => a);
 
   /*element: Subclass.box:assign=[a,a],params=0*/
   @pragma('dart2js:noInline')
   Subclass.box([a])
-      : super.internal(/*assign=[a],params=0*/ () {
+      : super.internal(/*access=[_box_0],assign=[a],params=0*/ () {
           a = 42;
         });
 }
diff --git a/tests/compiler/dart2js/codegen/model_data/constant_folding.dart b/tests/compiler/dart2js/codegen/model_data/constant_folding.dart
new file mode 100644
index 0000000..e93751d
--- /dev/null
+++ b/tests/compiler/dart2js/codegen/model_data/constant_folding.dart
@@ -0,0 +1,70 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Derived from dart2js_extra/constant_folding_test
+
+import "package:expect/expect.dart";
+
+/*element: main:calls=[checkAll$1(1),checkAll$1(1),checkAll$1(1),checkAll$1(1),checkAll$1(1),checkAll$1(1),checkAll$1(1)],params=0*/
+void main() {
+  const BitNot(42, 4294967253).check();
+  const BitNot(4294967253, 42).check();
+  const BitNot(-42, 41).check();
+  const BitNot(-1, 0).check();
+  const BitNot(0, 0xFFFFFFFF).check();
+  const BitNot(4294967295, 0).check();
+  const BitNot(0x12121212121212, 0xEDEDEDED).check();
+}
+
+/*element: jsEquals:calls=[Expect_equals(3),Expect_equals(3),get$isNegative(1),get$isNegative(1),toString$0(1),toString$0(1)],params=3*/
+void jsEquals(expected, actual, [String reason = null]) {
+  if (expected is num && actual is num) {
+    if (expected.isNaN && actual.isNaN) return;
+  }
+
+  Expect.equals(expected, actual, reason);
+
+  if (expected == 0 && actual == 0) {
+    Expect.equals(
+        expected.isNegative,
+        actual.isNegative,
+        (reason == null ? "" : "$reason ") +
+            "${expected.toString()} and "
+            "${actual.toString()} have different signs.");
+  }
+}
+
+abstract class TestOp {
+  final expected;
+
+  final result;
+
+  const TestOp(this.expected, this.result);
+
+  /*element: TestOp.checkAll:access=[arg,expected,result],calls=[jsEquals(3),jsEquals(3),jsEquals(3)],params=1*/
+  @pragma('dart2js:noInline')
+  checkAll(evalResult) {
+    jsEquals(expected, result,
+        "Frontend constant evaluation does not yield expected value.");
+    jsEquals(expected, evalResult,
+        "Backend constant evaluation does not yield expected value.");
+    jsEquals(expected, eval(), "eval() does not yield expected value.");
+  }
+
+  eval();
+}
+
+class BitNot extends TestOp {
+  /*element: BitNot.arg:emitted*/
+  final arg;
+
+  const BitNot(this.arg, expected) : super(expected, ~arg);
+
+  @pragma('dart2js:tryInline')
+  check() => checkAll(eval());
+
+  @override
+  @pragma('dart2js:tryInline')
+  eval() => ~arg;
+}
diff --git a/tests/compiler/dart2js/codegen/model_data/constructors.dart b/tests/compiler/dart2js/codegen/model_data/constructors.dart
index 69be657..e7c0d8c 100644
--- a/tests/compiler/dart2js/codegen/model_data/constructors.dart
+++ b/tests/compiler/dart2js/codegen/model_data/constructors.dart
@@ -78,6 +78,16 @@
   /*element: Class.constructor7c:params=2*/
   @pragma('dart2js:noInline')
   Class.constructor7c(a, {b, c}) {}
+
+  /*element: Class.constructor8a:params=2*/
+  @pragma('dart2js:noInline')
+  @pragma('dart2js:noElision')
+  Class.constructor8a([a, b]) {}
+
+  /*element: Class.constructor8b:params=2*/
+  @pragma('dart2js:noInline')
+  @pragma('dart2js:noElision')
+  Class.constructor8b({a, b}) {}
 }
 
 /*element: main:
@@ -104,7 +114,9 @@
   Class$constructor6c(3),
   Class$constructor7a(1),
   Class$constructor7b(2),
-  Class$constructor7c(2)],
+  Class$constructor7c(2),
+  Class$constructor8a(2),
+  Class$constructor8b(2)],
  params=0
 */
 main() {
@@ -137,4 +149,7 @@
   new Class.constructor7a(null);
   new Class.constructor7b(null, b: null);
   new Class.constructor7c(null, c: null);
+
+  new Class.constructor8a();
+  new Class.constructor8b();
 }
diff --git a/tests/compiler/dart2js/codegen/model_data/dynamic_get.dart b/tests/compiler/dart2js/codegen/model_data/dynamic_get.dart
index f519f30..81c7601 100644
--- a/tests/compiler/dart2js/codegen/model_data/dynamic_get.dart
+++ b/tests/compiler/dart2js/codegen/model_data/dynamic_get.dart
@@ -14,10 +14,11 @@
 
 class Class1a {
   /*element: Class1a.field1:emitted*/
+  @pragma('dart2js:noElision')
   int field1;
 }
 
-/*element: method1:params=1*/
+/*element: method1:access=[field1],params=1*/
 @pragma('dart2js:noInline')
 method1(dynamic c) {
   return c.field1;
@@ -25,10 +26,11 @@
 
 class Class2a<T> {
   /*element: Class2a.field2:emitted*/
+  @pragma('dart2js:noElision')
   T field2;
 }
 
-/*element: method2:params=1*/
+/*element: method2:access=[field2],params=1*/
 @pragma('dart2js:noInline')
 method2(dynamic c) {
   return c.field2;
@@ -36,11 +38,13 @@
 
 class Class3a {
   /*element: Class3a.field3:emitted,get=simple*/
+  @pragma('dart2js:noElision')
   int field3;
 }
 
 class Class3b {
   /*element: Class3b.field3:emitted,get=simple*/
+  @pragma('dart2js:noElision')
   int field3;
 }
 
@@ -52,11 +56,13 @@
 
 class Class4a {
   /*element: Class4a.field4:emitted,get=simple*/
+  @pragma('dart2js:noElision')
   int field4;
 }
 
 class Class4b implements Class4a {
   /*element: Class4b.field4:emitted,get=simple*/
+  @pragma('dart2js:noElision')
   int field4;
 }
 
diff --git a/tests/compiler/dart2js/codegen/model_data/dynamic_set.dart b/tests/compiler/dart2js/codegen/model_data/dynamic_set.dart
index 8df2ee2..7694ba4 100644
--- a/tests/compiler/dart2js/codegen/model_data/dynamic_set.dart
+++ b/tests/compiler/dart2js/codegen/model_data/dynamic_set.dart
@@ -4,47 +4,55 @@
 
 /*element: main:calls=*,params=0*/
 main() {
-  method1(new Class1a());
-  method2(new Class2a<int>());
-  method3(new Class3a());
-  method3(new Class3b());
-  method4(new Class4a());
-  method4(new Class4b());
+  method1(new Class1a()..field1);
+  method2(new Class2a<int>()..field2);
+  method3(new Class3a()..field3);
+  method3(new Class3b()..field3);
+  method4(new Class4a()..field4);
+  method4(new Class4b()..field4);
 }
 
 class Class1a {
-  /*element: Class1a.field1:elided*/
+  /*element: Class1a.field1:emitted*/
   int field1;
 }
 
-/*element: method1:params=1*/
+/*element: method1:assign=[field1],params=1*/
 @pragma('dart2js:noInline')
 method1(dynamic c) {
   c.field1 = 42;
 }
 
 class Class2a<T> {
-  /*strong.element: Class2a.field2:checked,elided*/
-  /*omit.element: Class2a.field2:elided*/
+  /*strong.element: Class2a.field2:checked,emitted*/
+  /*omit.element: Class2a.field2:emitted*/
+  /*strongConst.element: Class2a.field2:checked,emitted*/
+  /*omitConst.element: Class2a.field2:emitted*/
   T field2;
 }
 
 /*strong.element: method2:calls=[set$field2(1)],params=1*/
-/*omit.element: method2:params=1*/
+/*omit.element: method2:assign=[field2],params=1*/
+/*strongConst.element: method2:calls=[set$field2(1)],params=1*/
+/*omitConst.element: method2:assign=[field2],params=1*/
 @pragma('dart2js:noInline')
 method2(dynamic c) {
   c.field2 = 42;
 }
 
 class Class3a {
-  /*strong.element: Class3a.field3:checked,elided*/
-  /*omit.element: Class3a.field3:elided,set=simple*/
+  /*strong.element: Class3a.field3:checked,emitted*/
+  /*omit.element: Class3a.field3:emitted,set=simple*/
+  /*strongConst.element: Class3a.field3:checked,emitted*/
+  /*omitConst.element: Class3a.field3:emitted,set=simple*/
   int field3;
 }
 
 class Class3b {
-  /*strong.element: Class3b.field3:checked,elided*/
-  /*omit.element: Class3b.field3:elided,set=simple*/
+  /*strong.element: Class3b.field3:checked,emitted*/
+  /*omit.element: Class3b.field3:emitted,set=simple*/
+  /*strongConst.element: Class3b.field3:checked,emitted*/
+  /*omitConst.element: Class3b.field3:emitted,set=simple*/
   int field3;
 }
 
@@ -55,14 +63,19 @@
 }
 
 class Class4a {
-  /*strong.element: Class4a.field4:checked,elided*/
-  /*omit.element: Class4a.field4:elided,set=simple*/
+  /*strong.element: Class4a.field4:checked,emitted*/
+  /*omit.element: Class4a.field4:emitted,set=simple*/
+  /*strongConst.element: Class4a.field4:checked,emitted*/
+  /*omitConst.element: Class4a.field4:emitted,set=simple*/
   int field4;
 }
 
 class Class4b implements Class4a {
-  /*strong.element: Class4b.field4:checked,elided*/
-  /*omit.element: Class4b.field4:elided,set=simple*/
+  /*strong.element: Class4b.field4:checked,emitted*/
+  /*omit.element: Class4b.field4:emitted,set=simple*/
+  /*strongConst.element: Class4b.field4:checked,emitted*/
+  /*omitConst.element: Class4b.field4:emitted,set=simple*/
+  @override
   int field4;
 }
 
diff --git a/tests/compiler/dart2js/codegen/model_data/dynamic_set_unread.dart b/tests/compiler/dart2js/codegen/model_data/dynamic_set_unread.dart
new file mode 100644
index 0000000..84e646c
--- /dev/null
+++ b/tests/compiler/dart2js/codegen/model_data/dynamic_set_unread.dart
@@ -0,0 +1,86 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/*element: main:calls=*,params=0*/
+main() {
+  method1(new Class1a());
+  method2(new Class2a<int>());
+  method3(new Class3a());
+  method3(new Class3b());
+  method4(new Class4a());
+  method4(new Class4b());
+}
+
+class Class1a {
+  /*element: Class1a.field1:elided*/
+  int field1;
+}
+
+/*element: method1:params=1*/
+@pragma('dart2js:noInline')
+method1(dynamic c) {
+  c.field1 = 42;
+}
+
+class Class2a<T> {
+  /*strong.element: Class2a.field2:checked,elided*/
+  /*omit.element: Class2a.field2:elided*/
+  /*strongConst.element: Class2a.field2:checked,elided*/
+  /*omitConst.element: Class2a.field2:elided*/
+  T field2;
+}
+
+/*strong.element: method2:calls=[set$field2(1)],params=1*/
+/*omit.element: method2:params=1*/
+/*strongConst.element: method2:calls=[set$field2(1)],params=1*/
+/*omitConst.element: method2:params=1*/
+@pragma('dart2js:noInline')
+method2(dynamic c) {
+  c.field2 = 42;
+}
+
+class Class3a {
+  /*strong.element: Class3a.field3:checked,elided*/
+  /*omit.element: Class3a.field3:elided,set=simple*/
+  /*strongConst.element: Class3a.field3:checked,elided*/
+  /*omitConst.element: Class3a.field3:elided,set=simple*/
+  int field3;
+}
+
+class Class3b {
+  /*strong.element: Class3b.field3:checked,elided*/
+  /*omit.element: Class3b.field3:elided,set=simple*/
+  /*strongConst.element: Class3b.field3:checked,elided*/
+  /*omitConst.element: Class3b.field3:elided,set=simple*/
+  int field3;
+}
+
+/*element: method3:calls=[set$field3(1)],params=1*/
+@pragma('dart2js:noInline')
+method3(dynamic c) {
+  c.field3 = 42;
+}
+
+class Class4a {
+  /*strong.element: Class4a.field4:checked,elided*/
+  /*omit.element: Class4a.field4:elided,set=simple*/
+  /*strongConst.element: Class4a.field4:checked,elided*/
+  /*omitConst.element: Class4a.field4:elided,set=simple*/
+  int field4;
+}
+
+class Class4b implements Class4a {
+  /*strong.element: Class4b.field4:checked,elided*/
+  /*omit.element: Class4b.field4:elided,set=simple*/
+  /*strongConst.element: Class4b.field4:checked,elided*/
+  /*omitConst.element: Class4b.field4:elided,set=simple*/
+  @override
+  int field4;
+}
+
+/*element: method4:calls=[set$field4(1)],params=1*/
+@pragma('dart2js:noInline')
+method4(Class4a c) {
+  c.field4 = 42;
+}
diff --git a/tests/compiler/dart2js/codegen/model_data/effectively_constant_fields.dart b/tests/compiler/dart2js/codegen/model_data/effectively_constant_fields.dart
new file mode 100644
index 0000000..f1e788e
--- /dev/null
+++ b/tests/compiler/dart2js/codegen/model_data/effectively_constant_fields.dart
@@ -0,0 +1,110 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:expect/expect.dart';
+
+/*element: _field4:params=0*/
+_field4() => 4;
+
+class Class1 {
+  /*element: Class1.field1:elided*/
+  var field1 = 0;
+
+  /*element: Class1.field2:emitted*/
+  @pragma('dart2js:noElision')
+  var field2 = 1;
+
+  /*element: Class1.field3:elided,get=simple*/
+  var field3 = 2;
+
+  /*element: Class1.field4:elided*/
+  var field4 = _field4;
+}
+
+/*element: method1:params=1*/
+@pragma('dart2js:noInline')
+method1(Class1 c) {
+  return c.field1;
+}
+
+/*element: method2:access=[field2],params=1*/
+@pragma('dart2js:noInline')
+method2(Class1 c) {
+  return c.field2;
+}
+
+class Class2 {
+  /*element: Class2.field3:elided,get=simple*/
+  final field3 = 3;
+}
+
+/*element: method3:calls=[get$field3(0)],params=1*/
+@pragma('dart2js:noInline')
+method3(c) {
+  return c.field3;
+}
+
+class Class3 extends Class1 {
+  /*element: Class3.method4:params=0*/
+  @pragma('dart2js:noInline')
+  method4() {
+    return super.field1;
+  }
+}
+
+class Class4 extends Class1 {
+  /*element: Class4.method5:calls=[_field4(0)],params=0*/
+  @pragma('dart2js:noInline')
+  method5() {
+    return super.field4();
+  }
+}
+
+/*element: method6:access=[toString],params=1*/
+@pragma('dart2js:noInline')
+method6(Class1 c) {
+  return c.field1;
+}
+
+/*element: method7:access=[toString],calls=[_field4(0)],params=1*/
+@pragma('dart2js:noInline')
+method7(Class1 c) {
+  return c.field4();
+}
+
+var field8;
+
+/*element: method8:!access,params=0*/
+@pragma('dart2js:noInline')
+method8() => field8;
+
+var field9 = 10;
+
+/*element: method9:!access,params=0*/
+@pragma('dart2js:noInline')
+method9() => field9;
+
+/*element: field10:emitted,lazy*/
+var field10 = method9() + 10;
+
+/*element: method10:calls=[$get$field10(0)],params=0*/
+@pragma('dart2js:noInline')
+method10() => field10;
+
+/*element: main:calls=*,params=0*/
+main() {
+  Expect.equals(0, method1(new Class1()));
+  Expect.equals(1, method2(new Class1()));
+  Expect.equals(2, method3(new Class1()));
+  Expect.equals(3, method3(new Class2()));
+  Expect.equals(0, new Class3().method4());
+  Expect.equals(4, new Class4().method5());
+  Expect.equals(0, method6(new Class1()));
+  Expect.throws(/*calls=[method6(1)],params=0*/ () => method6(null));
+  Expect.equals(4, method7(new Class1()));
+  Expect.throws(/*calls=[method7(1)],params=0*/ () => method7(null));
+  Expect.equals(null, method8());
+  Expect.equals(10, method9());
+  Expect.equals(20, method10());
+}
diff --git a/tests/compiler/dart2js/codegen/model_data/effectively_constant_state.dart b/tests/compiler/dart2js/codegen/model_data/effectively_constant_state.dart
new file mode 100644
index 0000000..fc33c4b
--- /dev/null
+++ b/tests/compiler/dart2js/codegen/model_data/effectively_constant_state.dart
@@ -0,0 +1,92 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+enum Enum {
+  a,
+  b,
+  c,
+}
+
+/*element: tester1:params=0*/
+@pragma('dart2js:noInline')
+tester1() {}
+
+/*element: tester2:params=0*/
+@pragma('dart2js:noInline')
+tester2() {}
+
+/*element: tester3:params=0*/
+@pragma('dart2js:noInline')
+tester3() {}
+
+class Class {
+  /*element: Class.state1:elided*/
+  final int state1;
+
+  /*element: Class.state2:elided*/
+  final Enum state2;
+
+  Class({this.state1: 1, this.state2: Enum.c});
+
+  /*element: Class.method1a:calls=[tester2(0)],params=0*/
+  @pragma('dart2js:noInline')
+  method1a() {
+    if (state1 == 0) {
+      return tester1();
+    } else if (state1 == 1) {
+      return tester2();
+    } else if (state1 == 2) {
+      return tester3();
+    }
+  }
+
+  // TODO(johnniwinther): Inline switch cases with constant expressions.
+  /*element: Class.method1b:calls=[tester2(0)],params=0,switch*/
+  @pragma('dart2js:noInline')
+  method1b() {
+    switch (state1) {
+      case 0:
+        return tester1();
+      case 1:
+        return tester2();
+      case 2:
+        return tester3();
+    }
+  }
+
+  /*element: Class.method2a:calls=[tester3(0)],params=0*/
+  @pragma('dart2js:noInline')
+  method2a() {
+    if (state2 == Enum.a) {
+      return tester1();
+    } else if (state2 == Enum.b) {
+      return tester2();
+    } else if (state2 == Enum.c) {
+      return tester3();
+    }
+  }
+
+  /*element: Class.method2b:calls=[tester1(0),tester2(0),tester3(0)],params=0,switch*/
+  @pragma('dart2js:noInline')
+  method2b() {
+    // TODO(johnniwinther): Eliminate dead code in enum switch.
+    switch (state2) {
+      case Enum.a:
+        return tester1();
+      case Enum.b:
+        return tester2();
+      case Enum.c:
+        return tester3();
+    }
+  }
+}
+
+/*element: main:calls=*,params=0*/
+main() {
+  var c = new Class();
+  c.method1a();
+  c.method1b();
+  c.method2a();
+  c.method2b();
+}
diff --git a/tests/compiler/dart2js/codegen/model_data/field_set.dart b/tests/compiler/dart2js/codegen/model_data/field_set.dart
index 6c23abe..2c68409 100644
--- a/tests/compiler/dart2js/codegen/model_data/field_set.dart
+++ b/tests/compiler/dart2js/codegen/model_data/field_set.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.
 
-/*element: main:calls=*,params=0*/
+/*element: main:access=*,calls=*,params=0*/
 main() {
   method1(new Class1a());
   method2(new Class2a());
diff --git a/tests/compiler/dart2js/codegen/model_data/fields.dart b/tests/compiler/dart2js/codegen/model_data/fields.dart
index 62c3b52..7815fbe 100644
--- a/tests/compiler/dart2js/codegen/model_data/fields.dart
+++ b/tests/compiler/dart2js/codegen/model_data/fields.dart
@@ -32,6 +32,7 @@
 
 class Class {
   /*element: Class.field1a:emitted*/
+  @pragma('dart2js:noElision')
   var field1a;
 
   /*element: Class.field1b:elided*/
diff --git a/tests/compiler/dart2js/codegen/model_data/instance_method_parameters.dart b/tests/compiler/dart2js/codegen/model_data/instance_method_parameters.dart
index a861c04..aced524 100644
--- a/tests/compiler/dart2js/codegen/model_data/instance_method_parameters.dart
+++ b/tests/compiler/dart2js/codegen/model_data/instance_method_parameters.dart
@@ -83,6 +83,16 @@
   @pragma('dart2js:noInline')
   method8c(a, {b, c}) {}
 
+  /*element: Class.method9a:params=2,stubs=[method9a$0:method9a$2(2)]*/
+  @pragma('dart2js:noInline')
+  @pragma('dart2js:noElision')
+  method9a([a, b]) {}
+
+  /*element: Class.method9b:params=2,stubs=[method9b$0:method9b$2$a$b(2)]*/
+  @pragma('dart2js:noInline')
+  @pragma('dart2js:noElision')
+  method9b({a, b}) {}
+
   /*element: Class.test:calls=*,params=0*/
   @pragma('dart2js:noInline')
   test() {
@@ -117,6 +127,9 @@
     method8a(null);
     method8b(null, b: null);
     method8c(null, c: null);
+
+    method9a();
+    method9b();
   }
 }
 
diff --git a/tests/compiler/dart2js/codegen/model_data/native_unused_parameters.dart b/tests/compiler/dart2js/codegen/model_data/native_unused_parameters.dart
index 36197db..9317686 100644
--- a/tests/compiler/dart2js/codegen/model_data/native_unused_parameters.dart
+++ b/tests/compiler/dart2js/codegen/model_data/native_unused_parameters.dart
@@ -5,7 +5,7 @@
 // ignore: import_internal_library
 import 'dart:_js_helper';
 
-/*element: Class.:params=1*/
+/*element: Class.:access=[toString],params=1*/
 @Native('Class')
 class Class {
   /*element: Class.method1:calls=[method1()],params=1*/
diff --git a/tests/compiler/dart2js/codegen/model_data/regress_36222.dart b/tests/compiler/dart2js/codegen/model_data/regress_36222.dart
new file mode 100644
index 0000000..8ab6ea3
--- /dev/null
+++ b/tests/compiler/dart2js/codegen/model_data/regress_36222.dart
@@ -0,0 +1,27 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+typedef int BinaryFunc(int x, int y);
+
+class A {
+  const A({this.foo = A.defaultFoo});
+
+  /*element: A.defaultFoo:params=2*/
+  static int defaultFoo(int x, int y) {
+    return x + y;
+  }
+
+  /*element: A.foo:elided,stubCalls=[foo$2:call$2(arg0,arg1),foo$2:main_A_defaultFoo$closure(0)]*/
+  final BinaryFunc foo;
+}
+
+/*element: test:calls=[foo$2(2)],params=1*/
+@pragma('dart2js:assumeDynamic')
+@pragma('dart2js:noInline')
+test(dynamic a) => a.foo(1, 2);
+
+/*element: main:calls=[test(1)],params=0*/
+main() {
+  test(new A());
+}
diff --git a/tests/compiler/dart2js/codegen/model_data/static_method_parameters.dart b/tests/compiler/dart2js/codegen/model_data/static_method_parameters.dart
index 5fb0bfd..b95aa11 100644
--- a/tests/compiler/dart2js/codegen/model_data/static_method_parameters.dart
+++ b/tests/compiler/dart2js/codegen/model_data/static_method_parameters.dart
@@ -82,6 +82,16 @@
 @pragma('dart2js:noInline')
 method8c(a, {b, c}) {}
 
+/*element: method9a:params=2*/
+@pragma('dart2js:noInline')
+@pragma('dart2js:noElision')
+method9a([a, b]) {}
+
+/*element: method9b:params=2*/
+@pragma('dart2js:noInline')
+@pragma('dart2js:noElision')
+method9b({a, b}) {}
+
 /*element: main:
  calls=[
   method1(0),
@@ -107,7 +117,9 @@
   method7c(3),
   method8a(1),
   method8b(2),
-  method8c(2)],
+  method8c(2),
+  method9a(2),
+  method9b(2)],
  params=0
 */
 main() {
@@ -142,4 +154,7 @@
   method8a(null);
   method8b(null, b: null);
   method8c(null, c: null);
+
+  method9a();
+  method9b();
 }
diff --git a/tests/compiler/dart2js/codegen/model_data/static_tearoff.dart b/tests/compiler/dart2js/codegen/model_data/static_tearoff.dart
new file mode 100644
index 0000000..75fa653
--- /dev/null
+++ b/tests/compiler/dart2js/codegen/model_data/static_tearoff.dart
@@ -0,0 +1,32 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class I1 {}
+
+class I2 {}
+
+class A implements I1, I2 {}
+
+class B implements I1, I2 {}
+
+/*element: foo:params=1*/
+@pragma('dart2js:noInline')
+void foo(I1 x) {}
+
+/*element: bar:params=1*/
+@pragma('dart2js:noInline')
+void bar(I2 x) {}
+
+/*strong.element: main:calls=[call$1(new F.A()),call$1(new F.B()),foo(1),foo(1),main__bar$closure(0),main__bar$closure(0)],params=0*/
+/*omit.element: main:calls=[call$1(new F.A()),call$1(new F.B()),foo(1),foo(1),main__bar$closure(0),main__bar$closure(0)],params=0*/
+/*strongConst.element: main:calls=[bar(1),bar(1),foo(1),foo(1)],params=0*/
+/*omitConst.element: main:calls=[bar(1),bar(1),foo(1),foo(1)],params=0*/
+main() {
+  dynamic f = bar;
+
+  foo(new A());
+  foo(new B());
+  f(new A());
+  f(new B());
+}
diff --git a/tests/compiler/dart2js/codegen/model_test.dart b/tests/compiler/dart2js/codegen/model_test.dart
index e00c78d..61f5c27 100644
--- a/tests/compiler/dart2js/codegen/model_test.dart
+++ b/tests/compiler/dart2js/codegen/model_test.dart
@@ -25,7 +25,8 @@
   asyncTest(() async {
     Directory dataDir =
         new Directory.fromUri(Platform.script.resolve('model_data'));
-    await checkTests(dataDir, const ModelDataComputer(), args: args);
+    await checkTests(dataDir, const ModelDataComputer(),
+        args: args, testCFEConstants: true);
   });
 }
 
@@ -59,10 +60,14 @@
   static const String parameterCount = 'params';
   static const String call = 'calls';
   static const String parameterStub = 'stubs';
+  static const String callStubCall = 'stubCalls';
+  static const String callStubAccesses = 'stubAccesses';
   static const String isEmitted = 'emitted';
   static const String isElided = 'elided';
   static const String assignment = 'assign';
   static const String isLazy = 'lazy';
+  static const String propertyAccess = 'access';
+  static const String switchCase = 'switch';
 }
 
 /// AST visitor for computing inference data for a member.
@@ -81,6 +86,75 @@
       : _programLookup = new ProgramLookup(compiler),
         super(reporter, actualMap);
 
+  void registerCalls(Features features, String tag, js.Node node,
+      {String prefix = '', Set<js.PropertyAccess> handledAccesses}) {
+    forEachNode(node, onCall: (js.Call node) {
+      js.Node target = node.target;
+      if (target is js.PropertyAccess) {
+        js.Node selector = target.selector;
+        bool fixedNameCall = false;
+        String name;
+        if (selector is js.Name) {
+          name = selector.key;
+          fixedNameCall = selector is StringBackedName;
+        } else if (selector is js.LiteralString) {
+          /// Call to fixed backend name, so we include the argument
+          /// values to test encoding of optional parameters in native
+          /// methods.
+          name = selector.value.substring(1, selector.value.length - 1);
+          fixedNameCall = true;
+        }
+        if (name != null) {
+          if (fixedNameCall) {
+            String arguments = node.arguments.map(js.nodeToString).join(',');
+            features.addElement(tag, '${prefix}${name}(${arguments})');
+          } else {
+            features.addElement(
+                tag, '${prefix}${name}(${node.arguments.length})');
+          }
+          handledAccesses?.add(target);
+        }
+      }
+    });
+  }
+
+  void registerAccesses(Features features, String tag, js.Node code,
+      {String prefix = '', Set<js.PropertyAccess> handledAccesses}) {
+    forEachNode(code, onPropertyAccess: (js.PropertyAccess node) {
+      if (handledAccesses?.contains(node) ?? false) {
+        return;
+      }
+
+      js.Node receiver = node.receiver;
+      String receiverName;
+      if (receiver is js.VariableUse) {
+        receiverName = receiver.name;
+        if (receiverName == receiverName.toUpperCase() &&
+            receiverName != r'$') {
+          // Skip holder access.
+          receiverName = null;
+        }
+      } else if (receiver is js.This) {
+        receiverName = 'this';
+      }
+
+      js.Node selector = node.selector;
+      String name;
+      if (selector is js.Name) {
+        name = selector.key;
+      } else if (selector is js.LiteralString) {
+        /// Call to fixed backend name, so we include the argument
+        /// values to test encoding of optional parameters in native
+        /// methods.
+        name = selector.value.substring(1, selector.value.length - 1);
+      }
+
+      if (receiverName != null && name != null) {
+        features.addElement(tag, '${prefix}${name}');
+      }
+    });
+  }
+
   Features getMemberValue(MemberEntity member) {
     if (member is FieldEntity) {
       Field field = _programLookup.getField(member);
@@ -113,6 +187,16 @@
         registerFlags(Tags.getterFlags, field.getterFlags);
         registerFlags(Tags.setterFlags, field.setterFlags);
 
+        Class cls = _programLookup.getClass(member.enclosingClass);
+        for (StubMethod stub in cls.callStubs) {
+          if (stub.element == member) {
+            registerCalls(features, Tags.callStubCall, stub.code,
+                prefix: '${stub.name.key}:');
+            registerAccesses(features, Tags.callStubAccesses, stub.code,
+                prefix: '${stub.name.key}:');
+          }
+        }
+
         return features;
       }
       StaticField staticField = _programLookup.getStaticField(member);
@@ -133,43 +217,17 @@
           features[Tags.parameterCount] = '${code.params.length}';
         }
 
-        void registerCalls(String tag, js.Node node, [String prefix = '']) {
-          forEachNode(node, onCall: (js.Call node) {
-            js.Node target = node.target;
-            if (target is js.PropertyAccess) {
-              js.Node selector = target.selector;
-              bool fixedNameCall = false;
-              String name;
-              if (selector is js.Name) {
-                name = selector.key;
-                fixedNameCall = selector is StringBackedName;
-              } else if (selector is js.LiteralString) {
-                /// Call to fixed backend name, so we include the argument
-                /// values to test encoding of optional parameters in native
-                /// methods.
-                name = selector.value.substring(1, selector.value.length - 1);
-                fixedNameCall = true;
-              }
-              if (name != null) {
-                if (fixedNameCall) {
-                  String arguments =
-                      node.arguments.map(js.nodeToString).join(',');
-                  features.addElement(tag, '${prefix}${name}(${arguments})');
-                } else {
-                  features.addElement(
-                      tag, '${prefix}${name}(${node.arguments.length})');
-                }
-              }
-            }
-          });
-        }
+        Set<js.PropertyAccess> handledAccesses = new Set();
 
-        registerCalls(Tags.call, code);
+        registerCalls(features, Tags.call, code,
+            handledAccesses: handledAccesses);
         if (method is DartMethod) {
           for (ParameterStubMethod stub in method.parameterStubs) {
-            registerCalls(Tags.parameterStub, stub.code, '${stub.name.key}:');
+            registerCalls(features, Tags.parameterStub, stub.code,
+                prefix: '${stub.name.key}:', handledAccesses: handledAccesses);
           }
         }
+
         forEachNode(code, onAssignment: (js.Assignment node) {
           js.Expression leftHandSide = node.leftHandSide;
           if (leftHandSide is js.PropertyAccess) {
@@ -182,9 +240,18 @@
             }
             if (name != null) {
               features.addElement(Tags.assignment, '${name}');
+              handledAccesses.add(leftHandSide);
             }
           }
         });
+
+        registerAccesses(features, Tags.propertyAccess, code,
+            handledAccesses: handledAccesses);
+
+        forEachNode(code, onSwitch: (js.Switch node) {
+          features.add(Tags.switchCase);
+        });
+
         return features;
       }
     }
diff --git a/tests/compiler/dart2js/codegen/strength_eq_test.dart b/tests/compiler/dart2js/codegen/strength_eq_test.dart
index e0c1090d..196776b 100644
--- a/tests/compiler/dart2js/codegen/strength_eq_test.dart
+++ b/tests/compiler/dart2js/codegen/strength_eq_test.dart
@@ -8,31 +8,27 @@
 
 const String CODE = """
 class A {
-  var link;
+  var _link;
+  get link => _link;
 }
 foo(x) {
   if (new DateTime.now().millisecondsSinceEpoch == 42) return null;
   var a = new A();
   if (new DateTime.now().millisecondsSinceEpoch == 42) return a;
-  a.link = a;
+  a._link = a;
   return a;
 }
 main() {
-  var x = foo(0);
+  A x = foo(0);
   return x == x.link;
 }
 """;
 
 main() {
-  runTest() async {
+  asyncTest(() async {
     // The `==` is strengthened to a HIdentity instruction. The HIdentity
     // follows `x.link`, so x cannot be `null`.
     var compare = new RegExp(r'x === x\.get\$link\(\)');
     await compileAndMatch(CODE, 'main', compare);
-  }
-
-  asyncTest(() async {
-    print('--test from kernel------------------------------------------------');
-    await runTest();
   });
 }
diff --git a/tests/compiler/dart2js/codegen/value_range2_test.dart b/tests/compiler/dart2js/codegen/value_range2_test.dart
index aacfc98..d8738ea 100644
--- a/tests/compiler/dart2js/codegen/value_range2_test.dart
+++ b/tests/compiler/dart2js/codegen/value_range2_test.dart
@@ -6,9 +6,8 @@
 import "package:compiler/src/inferrer/abstract_value_domain.dart";
 import "package:compiler/src/ssa/nodes.dart";
 import "package:compiler/src/ssa/value_range_analyzer.dart";
-import "package:compiler/src/js_backend/constant_system_javascript.dart";
 
-ValueRangeInfo info = new ValueRangeInfo(JavaScriptConstantSystem.only);
+ValueRangeInfo info = new ValueRangeInfo();
 
 class AbstractValueDomainMock implements AbstractValueDomain {
   const AbstractValueDomainMock();
diff --git a/tests/compiler/dart2js/deferred/constant_emission_test_helper.dart b/tests/compiler/dart2js/deferred/constant_emission_test_helper.dart
new file mode 100644
index 0000000..e8a0a7c
--- /dev/null
+++ b/tests/compiler/dart2js/deferred/constant_emission_test_helper.dart
@@ -0,0 +1,93 @@
+// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test that the additional runtime type support is output to the right
+// Files when using deferred loading.
+
+import 'package:compiler/compiler_new.dart';
+import 'package:compiler/src/commandline_options.dart';
+import 'package:compiler/src/compiler.dart';
+import 'package:compiler/src/constants/values.dart';
+import 'package:compiler/src/deferred_load.dart';
+import 'package:compiler/src/elements/entities.dart';
+import 'package:compiler/src/js_emitter/model.dart';
+import 'package:compiler/src/util/util.dart';
+import 'package:expect/expect.dart';
+import '../helpers/memory_compiler.dart';
+import '../helpers/output_collector.dart';
+import '../helpers/program_lookup.dart';
+
+class OutputUnitDescriptor {
+  final String uri;
+  final String member;
+  final String name;
+
+  const OutputUnitDescriptor(this.uri, this.member, this.name);
+}
+
+run(Map<String, String> sourceFiles, List<OutputUnitDescriptor> outputUnits,
+    Map<String, Set<String>> expectedOutputUnits,
+    {bool useCFEConstants: false}) async {
+  OutputCollector collector = new OutputCollector();
+  CompilationResult result = await runCompiler(
+      memorySourceFiles: sourceFiles,
+      outputProvider: collector,
+      options: useCFEConstants
+          ? ['${Flags.enableLanguageExperiments}=constant-update-2018']
+          : ['${Flags.enableLanguageExperiments}=no-constant-update-2018']);
+  Compiler compiler = result.compiler;
+  ProgramLookup lookup = new ProgramLookup(compiler);
+  var closedWorld = compiler.backendClosedWorldForTesting;
+  var elementEnvironment = closedWorld.elementEnvironment;
+
+  LibraryEntity lookupLibrary(name) {
+    return elementEnvironment.lookupLibrary(Uri.parse(name));
+  }
+
+  OutputUnit Function(MemberEntity) outputUnitForMember =
+      closedWorld.outputUnitData.outputUnitForMember;
+
+  Map<String, Fragment> fragments = {};
+  fragments['main'] = lookup.program.mainFragment;
+
+  for (OutputUnitDescriptor descriptor in outputUnits) {
+    LibraryEntity library = lookupLibrary(descriptor.uri);
+    MemberEntity member =
+        elementEnvironment.lookupLibraryMember(library, descriptor.member);
+    OutputUnit outputUnit = outputUnitForMember(member);
+    fragments[descriptor.name] = lookup.getFragment(outputUnit);
+  }
+
+  Map<String, Set<String>> actualOutputUnits = {};
+
+  bool errorsFound = false;
+
+  void processFragment(String fragmentName, Fragment fragment) {
+    for (Constant constant in fragment.constants) {
+      String text = constant.value.toStructuredText();
+      Set<String> expectedConstantUnit = expectedOutputUnits[text];
+      if (expectedConstantUnit == null) {
+        if (constant.value is DeferredGlobalConstantValue) {
+          print('ERROR: No expectancy for $constant found in $fragmentName');
+          errorsFound = true;
+        }
+      } else {
+        (actualOutputUnits[text] ??= <String>{}).add(fragmentName);
+      }
+    }
+  }
+
+  fragments.forEach(processFragment);
+
+  expectedOutputUnits.forEach((String constant, Set<String> expectedSet) {
+    Set<String> actualSet = actualOutputUnits[constant] ?? const <String>{};
+    if (!equalSets(expectedSet, actualSet)) {
+      print("ERROR: Constant $constant found in $actualSet, expected "
+          "$expectedSet");
+      errorsFound = true;
+    }
+  });
+
+  Expect.isFalse(errorsFound, "Errors found.");
+}
diff --git a/tests/compiler/dart2js/deferred/deferred_constant3_test.dart b/tests/compiler/dart2js/deferred/deferred_constant3_test.dart
new file mode 100644
index 0000000..239e4b0
--- /dev/null
+++ b/tests/compiler/dart2js/deferred/deferred_constant3_test.dart
@@ -0,0 +1,95 @@
+// Copyright (c) 2014, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test that the additional runtime type support is output to the right
+// Files when using deferred loading.
+
+import 'package:async_helper/async_helper.dart';
+import 'constant_emission_test_helper.dart';
+
+void main() {
+  runTest({bool useCFEConstants: false}) async {
+    Map<String, Set<String>> expectedOutputUnits = {
+      'ConstructedConstant(C(x=IntConstant(1)))': {'main'},
+      'DeferredGlobalConstant(ConstructedConstant(C(x=IntConstant(1))))':
+          // With CFE constants, the references are inlined, so the constant
+          // only occurs in main.
+          useCFEConstants ? {} : {'lib2'},
+      'ConstructedConstant(C(x=IntConstant(2)))': {'lib1'},
+      'DeferredGlobalConstant(ConstructedConstant(C(x=IntConstant(2))))': {
+        'lib1'
+      },
+      'ConstructedConstant(C(x=IntConstant(3)))': {'lib1'},
+      'ConstructedConstant(C(x=IntConstant(4)))': {'lib2'},
+      'DeferredGlobalConstant(ConstructedConstant(C(x=IntConstant(4))))': {
+        'lib2'
+      },
+      'ConstructedConstant(C(x=IntConstant(5)))': {'lib2'},
+    };
+    await run(
+        MEMORY_SOURCE_FILES,
+        const [
+          OutputUnitDescriptor('memory:lib1.dart', 'm1', 'lib1'),
+          OutputUnitDescriptor('memory:lib2.dart', 'm2', 'lib2'),
+        ],
+        expectedOutputUnits,
+        useCFEConstants: useCFEConstants);
+  }
+
+  asyncTest(() async {
+    print('--test from kernel------------------------------------------------');
+    await runTest();
+    print('--test from kernel with CFE constants-----------------------------');
+    await runTest(useCFEConstants: true);
+  });
+}
+
+// Make sure that deferred constants are not inlined into the main hunk.
+const Map<String, String> MEMORY_SOURCE_FILES = const {
+  "main.dart": r"""
+import 'c.dart';
+import 'lib1.dart' deferred as l1;
+
+const c1 = const C(1);
+
+main() async {
+  print(c1.x);
+  await l1.loadLibrary();
+  l1.m1();
+  print(l1.c2);
+}
+""",
+  "lib1.dart": """
+import 'c.dart';
+import 'lib2.dart' deferred as l2;
+
+const c2 = const C(2);
+const c3 = const C(3);
+
+m1() async {
+  print(c2);
+  print(c3);
+  await l2.loadLibrary();
+  l2.m2();
+  print(l2.c3);
+  print(l2.c4);
+}
+""",
+  "lib2.dart": """
+import 'c.dart';
+
+const c3 = const C(1);
+const c4 = const C(4);
+const c5 = const C(5);
+
+m2() async {
+  print(c3);
+  print(c4);
+  print(c5);
+}
+""",
+  "c.dart": """
+class C { const C(this.x); final x; }
+""",
+};
diff --git a/tests/compiler/dart2js/deferred/dont_inline_deferred_constants_test.dart b/tests/compiler/dart2js/deferred/dont_inline_deferred_constants_test.dart
index 5c72752..5afdd4e 100644
--- a/tests/compiler/dart2js/deferred/dont_inline_deferred_constants_test.dart
+++ b/tests/compiler/dart2js/deferred/dont_inline_deferred_constants_test.dart
@@ -6,86 +6,53 @@
 // Files when using deferred loading.
 
 import 'package:async_helper/async_helper.dart';
-import 'package:compiler/compiler_new.dart';
-import 'package:compiler/src/compiler.dart';
-import 'package:expect/expect.dart';
-import '../helpers/memory_compiler.dart';
-import '../helpers/output_collector.dart';
+import 'constant_emission_test_helper.dart';
 
 void main() {
-  runTest() async {
-    OutputCollector collector = new OutputCollector();
-    CompilationResult result = await runCompiler(
-        memorySourceFiles: MEMORY_SOURCE_FILES, outputProvider: collector);
-    Compiler compiler = result.compiler;
-    var closedWorld = compiler.backendClosedWorldForTesting;
-    var elementEnvironment = closedWorld.elementEnvironment;
-
-    lookupLibrary(name) {
-      return elementEnvironment.lookupLibrary(Uri.parse(name));
-    }
-
-    var outputUnitForMember = closedWorld.outputUnitData.outputUnitForMember;
-
-    dynamic lib1 = lookupLibrary("memory:lib1.dart");
-    var foo1 = elementEnvironment.lookupLibraryMember(lib1, "foo");
-    var ou_lib1 = outputUnitForMember(foo1);
-
-    dynamic lib2 = lookupLibrary("memory:lib2.dart");
-    var foo2 = elementEnvironment.lookupLibraryMember(lib2, "foo");
-    var ou_lib2 = outputUnitForMember(foo2);
-
-    dynamic mainApp = elementEnvironment.mainLibrary;
-    var fooMain = elementEnvironment.lookupLibraryMember(mainApp, "foo");
-    var ou_lib1_lib2 = outputUnitForMember(fooMain);
-
-    String mainOutput = collector.getOutput("", OutputType.js);
-    String lib1Output =
-        collector.getOutput("out_${ou_lib1.name}", OutputType.jsPart);
-    String lib2Output =
-        collector.getOutput("out_${ou_lib2.name}", OutputType.jsPart);
-    String lib12Output =
-        collector.getOutput("out_${ou_lib1_lib2.name}", OutputType.jsPart);
-    // Test that the deferred constants are not inlined into the main file.
-    RegExp re1 = new RegExp(r"= .string1");
-    RegExp re2 = new RegExp(r"= .string2");
-    RegExp re3 = new RegExp(r"= 1010");
-    Expect.isTrue(re1.hasMatch(lib1Output));
-    Expect.isTrue(re2.hasMatch(lib1Output));
-    Expect.isTrue(re3.hasMatch(lib1Output));
-    Expect.isFalse(re1.hasMatch(mainOutput));
-    Expect.isFalse(re2.hasMatch(mainOutput));
-    Expect.isFalse(re3.hasMatch(mainOutput));
-    // Test that the non-deferred constant is inlined.
-    Expect.isTrue(new RegExp(r"print\(.string3.\)").hasMatch(mainOutput));
-    Expect.isFalse(new RegExp(r"= .string3").hasMatch(mainOutput));
-    Expect.isTrue(new RegExp(r"print\(.string4.\)").hasMatch(mainOutput));
-
-    // C(1) is shared between main, lib1 and lib2. Test that lib1 and lib2 each
-    // has a reference to it. It is defined in the main output file.
-    Expect.isTrue(new RegExp(r"C.C_1 =").hasMatch(mainOutput));
-    Expect.isFalse(new RegExp(r"= C.C_1").hasMatch(mainOutput));
-
-    Expect.isTrue(new RegExp(r"= C.C_1").hasMatch(lib1Output));
-    Expect.isTrue(new RegExp(r"= C.C_1").hasMatch(lib2Output));
-
-    // C(2) is shared between lib1 and lib2, each of them has their own
-    // reference to it.
-    Expect.isFalse(new RegExp(r"= C.C_2").hasMatch(mainOutput));
-
-    Expect.isTrue(new RegExp(r"= C.C_2").hasMatch(lib1Output));
-    Expect.isTrue(new RegExp(r"= C.C_2").hasMatch(lib2Output));
-    Expect.isTrue(new RegExp(r"C.C_2 =").hasMatch(lib12Output));
-
-    // "string4" is shared between lib1 and lib2, but it can be inlined.
-    Expect.isTrue(new RegExp(r"= .string4").hasMatch(lib1Output));
-    Expect.isTrue(new RegExp(r"= .string4").hasMatch(lib2Output));
-    Expect.isFalse(new RegExp(r"= .string4").hasMatch(lib12Output));
+  runTest({bool useCFEConstants: false}) async {
+    Map<String, Set<String>> expectedOutputUnits = {
+      // Test that the deferred constants are not inlined into the main file.
+      'DeferredGlobalConstant(IntConstant(1010))': {'lib1'},
+      'DeferredGlobalConstant(StringConstant("string1"))': {'lib1'},
+      'DeferredGlobalConstant(StringConstant("string2"))': {'lib1'},
+      // "string4" is shared between lib1 and lib2, but it can be inlined.
+      'DeferredGlobalConstant(StringConstant("string4"))':
+          // TODO(johnniwinther): Should we inline CFE constants within deferred
+          // library boundaries?
+          useCFEConstants ? {'lib12'} : {'lib1', 'lib2'},
+      // C(1) is shared between main, lib1 and lib2. Test that lib1 and lib2
+      // each has a reference to it. It is defined in the main output file.
+      'ConstructedConstant(C(p=IntConstant(1)))': {'main'},
+      'DeferredGlobalConstant(ConstructedConstant(C(p=IntConstant(1))))':
+          // With CFE constants, the references are inlined, so the constant
+          // only occurs in main.
+          useCFEConstants ? {} : {'lib1', 'lib2'},
+      // C(2) is shared between lib1 and lib2, each of them has their own
+      // reference to it.
+      'ConstructedConstant(C(p=IntConstant(2)))': {'lib12'},
+      'DeferredGlobalConstant(ConstructedConstant(C(p=IntConstant(2))))':
+          // With CFE constants, the references are inlined, so the constant
+          // occurs in lib12.
+          useCFEConstants ? {'lib12'} : {'lib1', 'lib2'},
+      // Test that the non-deferred constant is inlined.
+      'ConstructedConstant(C(p=IntConstant(5)))': {'main'},
+    };
+    await run(
+        MEMORY_SOURCE_FILES,
+        const [
+          OutputUnitDescriptor('memory:lib1.dart', 'foo', 'lib1'),
+          OutputUnitDescriptor('memory:lib2.dart', 'foo', 'lib2'),
+          OutputUnitDescriptor('memory:main.dart', 'foo', 'lib12')
+        ],
+        expectedOutputUnits,
+        useCFEConstants: useCFEConstants);
   }
 
   asyncTest(() async {
     print('--test from kernel------------------------------------------------');
     await runTest();
+    print('--test from kernel with CFE constants-----------------------------');
+    await runTest(useCFEConstants: true);
   });
 }
 
@@ -124,6 +91,7 @@
       print(lib1.C6);
       print(lib2.C6);
       print("string4");
+      print(const C(5));
       print(const C(1));
     });
   });
diff --git a/tests/compiler/dart2js/deferred/dont_inline_deferred_globals_test.dart b/tests/compiler/dart2js/deferred/dont_inline_deferred_globals_test.dart
index 4d24307..3c0ac93 100644
--- a/tests/compiler/dart2js/deferred/dont_inline_deferred_globals_test.dart
+++ b/tests/compiler/dart2js/deferred/dont_inline_deferred_globals_test.dart
@@ -6,46 +6,30 @@
 // Files when using deferred loading.
 
 import 'package:async_helper/async_helper.dart';
-import 'package:compiler/compiler_new.dart';
-import 'package:compiler/src/compiler.dart';
-import 'package:expect/expect.dart';
-import '../helpers/memory_compiler.dart';
-import '../helpers/output_collector.dart';
+import 'constant_emission_test_helper.dart';
 
 void main() {
-  runTest() async {
-    OutputCollector collector = new OutputCollector();
-    CompilationResult result = await runCompiler(
-        memorySourceFiles: MEMORY_SOURCE_FILES, outputProvider: collector);
-    Compiler compiler = result.compiler;
-    var closedWorld = compiler.backendClosedWorldForTesting;
-    var elementEnvironment = closedWorld.elementEnvironment;
+  runTest({bool useCFEConstants: false}) async {
+    Map<String, Set<String>> expectedOutputUnits = {
+      // Test that the deferred globals are not inlined into the main file.
+      'ConstructedConstant(C(field=StringConstant("string1")))': {'lib1'},
+      'ConstructedConstant(C(field=StringConstant("string2")))': {'lib1'},
+      'DeferredGlobalConstant(ConstructedConstant(C(field=StringConstant("string1"))))':
+          {'lib1'},
+    };
 
-    lookupLibrary(name) {
-      return elementEnvironment.lookupLibrary(Uri.parse(name));
-    }
-
-    var outputUnitForMember = closedWorld.outputUnitData.outputUnitForMember;
-
-    dynamic lib1 = lookupLibrary("memory:lib1.dart");
-    var foo1 = elementEnvironment.lookupLibraryMember(lib1, "finalVar");
-    var ou_lib1 = outputUnitForMember(foo1);
-
-    String mainOutput = collector.getOutput("", OutputType.js);
-    String lib1Output =
-        collector.getOutput("out_${ou_lib1.name}", OutputType.jsPart);
-    // Test that the deferred globals are not inlined into the main file.
-    RegExp re1 = new RegExp(r"= .string1");
-    RegExp re2 = new RegExp(r"= .string2");
-    Expect.isTrue(re1.hasMatch(lib1Output));
-    Expect.isTrue(re2.hasMatch(lib1Output));
-    Expect.isFalse(re1.hasMatch(mainOutput));
-    Expect.isFalse(re2.hasMatch(mainOutput));
+    await run(
+        MEMORY_SOURCE_FILES,
+        const [OutputUnitDescriptor('memory:lib1.dart', 'finalVar', 'lib1')],
+        expectedOutputUnits,
+        useCFEConstants: useCFEConstants);
   }
 
   asyncTest(() async {
     print('--test from kernel------------------------------------------------');
     await runTest();
+    print('--test from kernel with CFE constants-----------------------------');
+    await runTest(useCFEConstants: true);
   });
 }
 
@@ -67,7 +51,13 @@
 """,
   "lib1.dart": """
 import "main.dart" as main;
-final finalVar = "string1";
-var globalVar = "string2";
+
+class C {
+  final field;
+  const C(this.field);
+}
+
+final finalVar = const C("string1");
+dynamic globalVar = const C("string2");
 """
 };
diff --git a/tests/compiler/dart2js/deferred/follow_constant_dependencies_test.dart b/tests/compiler/dart2js/deferred/follow_constant_dependencies_test.dart
index ede4245..21bb4bc 100644
--- a/tests/compiler/dart2js/deferred/follow_constant_dependencies_test.dart
+++ b/tests/compiler/dart2js/deferred/follow_constant_dependencies_test.dart
@@ -5,15 +5,20 @@
 // Test that constants depended on by other constants are correctly deferred.
 
 import 'package:async_helper/async_helper.dart';
+import 'package:compiler/src/commandline_options.dart';
 import 'package:compiler/src/compiler.dart';
 import 'package:compiler/src/constants/values.dart';
 import 'package:expect/expect.dart';
 import '../helpers/memory_compiler.dart';
 
 void main() {
-  runTest() async {
-    CompilationResult result =
-        await runCompiler(memorySourceFiles: MEMORY_SOURCE_FILES);
+  runTest({bool useCFEConstants: false}) async {
+    CompilationResult result = await runCompiler(
+        memorySourceFiles: MEMORY_SOURCE_FILES,
+        options: useCFEConstants
+            ? ['${Flags.enableLanguageExperiments}=constant-update-2018']
+            : ['${Flags.enableLanguageExperiments}=no-constant-update-2018']);
+
     Compiler compiler = result.compiler;
     var closedWorld = compiler.backendClosedWorldForTesting;
     var outputUnitForConstant =
@@ -47,6 +52,8 @@
   asyncTest(() async {
     print('--test from kernel------------------------------------------------');
     await runTest();
+    print('--test from kernel with CFE constants-----------------------------');
+    await runTest(useCFEConstants: true);
   });
 }
 
diff --git a/tests/compiler/dart2js/deferred/not_in_main_test.dart b/tests/compiler/dart2js/deferred/not_in_main_test.dart
index 79f52b4..85d14e7 100644
--- a/tests/compiler/dart2js/deferred/not_in_main_test.dart
+++ b/tests/compiler/dart2js/deferred/not_in_main_test.dart
@@ -7,19 +7,29 @@
 // much be included in the initial download (loaded eagerly).
 
 import 'package:async_helper/async_helper.dart';
+import 'package:compiler/src/commandline_options.dart';
 import 'package:compiler/src/compiler.dart';
 import 'package:expect/expect.dart';
 import '../helpers/memory_compiler.dart';
 
 void main() {
   asyncTest(() async {
+    print('--test from kernel------------------------------------------------');
     await deferredTest1();
     await deferredTest2();
+    print('--test from kernel with CFE constants-----------------------------');
+    await deferredTest1(useCFEConstants: true);
+    await deferredTest2(useCFEConstants: true);
   });
 }
 
-deferredTest1() async {
-  CompilationResult result = await runCompiler(memorySourceFiles: TEST1);
+deferredTest1({bool useCFEConstants: false}) async {
+  CompilationResult result = await runCompiler(
+      memorySourceFiles: TEST1,
+      options: useCFEConstants
+          ? ['${Flags.enableLanguageExperiments}=constant-update-2018']
+          : ['${Flags.enableLanguageExperiments}=no-constant-update-2018']);
+
   Compiler compiler = result.compiler;
   var closedWorld = compiler.backendClosedWorldForTesting;
   var env = closedWorld.elementEnvironment;
@@ -34,8 +44,13 @@
   Expect.notEquals(mainOutputUnit, outputUnitForMember(foo2));
 }
 
-deferredTest2() async {
-  CompilationResult result = await runCompiler(memorySourceFiles: TEST2);
+deferredTest2({bool useCFEConstants: false}) async {
+  CompilationResult result = await runCompiler(
+      memorySourceFiles: TEST2,
+      options: useCFEConstants
+          ? ['${Flags.enableLanguageExperiments}=constant-update-2018']
+          : ['${Flags.enableLanguageExperiments}=no-constant-update-2018']);
+
   Compiler compiler = result.compiler;
   var closedWorld = compiler.backendClosedWorldForTesting;
   var env = closedWorld.elementEnvironment;
diff --git a/tests/compiler/dart2js/deferred_loading/data/basic_deferred.dart b/tests/compiler/dart2js/deferred_loading/data/basic_deferred.dart
index 2c0951c..c10e7bd 100644
--- a/tests/compiler/dart2js/deferred_loading/data/basic_deferred.dart
+++ b/tests/compiler/dart2js/deferred_loading/data/basic_deferred.dart
@@ -1,9 +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 '../libs/basic_deferred_lib.dart' deferred as lib;
 
-/*element: main:OutputUnit(main, {})*/
+/*strong.element: main:OutputUnit(main, {})*/
+/*strongConst.element: main:
+ OutputUnit(main, {}),
+ constants=[FunctionConstant(funky)=OutputUnit(1, {lib})]
+*/
 main() => lib.loadLibrary().then(/*OutputUnit(main, {})*/ (_) {
       (lib.funky)();
     });
diff --git a/tests/compiler/dart2js/deferred_loading/data/deferred_constant1.dart b/tests/compiler/dart2js/deferred_loading/data/deferred_constant1.dart
index 99f8444..ccada1f 100644
--- a/tests/compiler/dart2js/deferred_loading/data/deferred_constant1.dart
+++ b/tests/compiler/dart2js/deferred_loading/data/deferred_constant1.dart
@@ -5,16 +5,25 @@
 import '../libs/deferred_constant1_lib1.dart';
 import '../libs/deferred_constant1_lib2.dart' deferred as lib2;
 
-/*element: main:OutputUnit(main, {})*/
+/*strong.element: main:OutputUnit(main, {})*/
+/*strongConst.element: main:
+ OutputUnit(main, {}),
+ constants=[
+  ConstructedConstant(C(value=ConstructedConstant(C(value=IntConstant(7)))))=OutputUnit(1, {lib2}),
+  ConstructedConstant(C(value=IntConstant(1)))=OutputUnit(main, {}),
+  ConstructedConstant(C(value=IntConstant(2)))=OutputUnit(1, {lib2}),
+  ConstructedConstant(C(value=IntConstant(4)))=OutputUnit(main, {}),
+  ConstructedConstant(C(value=IntConstant(5)))=OutputUnit(main, {})]
+*/
 main() async {
   C1.value;
   print(const C(4));
   /*OutputUnit(main, {})*/ () => print(const C(5));
   await lib2.loadLibrary();
-  lib2.C2.value;
-  lib2.C3.value;
-  lib2.C4.value;
-  lib2.C5.value;
-  lib2.C6;
-  lib2.C7.value;
+  print(lib2.C2.value);
+  print(lib2.C3.value);
+  print(lib2.C4.value);
+  print(lib2.C5.value);
+  print(lib2.C6);
+  print(lib2.C7.value);
 }
diff --git a/tests/compiler/dart2js/deferred_loading/data/deferred_constant2.dart b/tests/compiler/dart2js/deferred_loading/data/deferred_constant2.dart
index f8821ae..5a08d48 100644
--- a/tests/compiler/dart2js/deferred_loading/data/deferred_constant2.dart
+++ b/tests/compiler/dart2js/deferred_loading/data/deferred_constant2.dart
@@ -6,7 +6,12 @@
 
 import '../libs/deferred_constant2_lib.dart' deferred as lib;
 
-/*element: main:OutputUnit(main, {})*/
+/*strong.element: main:OutputUnit(main, {})*/
+/*strongConst.element: main:
+ OutputUnit(main, {}),
+ constants=[
+  ConstructedConstant(Constant(value=IntConstant(499)))=OutputUnit(1, {lib})]
+*/
 main() {
   lib.loadLibrary().then(/*OutputUnit(main, {})*/ (_) {
     Expect.equals(499, lib.C1.value);
diff --git a/tests/compiler/dart2js/deferred_loading/data/deferred_constant3.dart b/tests/compiler/dart2js/deferred_loading/data/deferred_constant3.dart
new file mode 100644
index 0000000..27c1129
--- /dev/null
+++ b/tests/compiler/dart2js/deferred_loading/data/deferred_constant3.dart
@@ -0,0 +1,23 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import '../libs/deferred_constant3_shared.dart';
+import '../libs/deferred_constant3_lib1.dart' deferred as l1;
+
+/*strong.element: c1:OutputUnit(main, {})*/
+const c1 = /*strong.OutputUnit(main, {})*/ const C(1);
+
+/*strong.element: main:OutputUnit(main, {})*/
+/*strongConst.element: main:
+ OutputUnit(main, {}),
+ constants=[
+  ConstructedConstant(C(x=IntConstant(1)))=OutputUnit(main, {}),
+  ConstructedConstant(C(x=IntConstant(2)))=OutputUnit(1, {l1})]
+*/
+main() async {
+  print(c1.x);
+  await l1.loadLibrary();
+  l1.m1();
+  print(l1.c2);
+}
diff --git a/tests/compiler/dart2js/deferred_loading/data/deferred_function.dart b/tests/compiler/dart2js/deferred_loading/data/deferred_function.dart
index 6f809df..89cedc8 100644
--- a/tests/compiler/dart2js/deferred_loading/data/deferred_function.dart
+++ b/tests/compiler/dart2js/deferred_loading/data/deferred_function.dart
@@ -7,7 +7,11 @@
 
 import '../libs/deferred_function_lib.dart' deferred as lib;
 
-/*element: readFoo:OutputUnit(main, {})*/
+/*strong.element: readFoo:OutputUnit(main, {})*/
+/*strongConst.element: readFoo:
+ OutputUnit(main, {}),
+ constants=[FunctionConstant(foo)=OutputUnit(1, {lib})]
+*/
 readFoo() {
   return lib.foo;
 }
diff --git a/tests/compiler/dart2js/deferred_loading/data/deferred_typed_map.dart b/tests/compiler/dart2js/deferred_loading/data/deferred_typed_map.dart
index 0015e60..2aca8d8 100644
--- a/tests/compiler/dart2js/deferred_loading/data/deferred_typed_map.dart
+++ b/tests/compiler/dart2js/deferred_loading/data/deferred_typed_map.dart
@@ -4,7 +4,12 @@
 
 import '../libs/deferred_typed_map_lib1.dart' deferred as lib;
 
-/*element: main:OutputUnit(main, {})*/
+/*strong.element: main:OutputUnit(main, {})*/
+/*strongConst.element: main:
+ OutputUnit(main, {}),
+ constants=[
+  MapConstant(<int, dynamic Function({M b})>{IntConstant(1): FunctionConstant(f1), IntConstant(2): FunctionConstant(f2)})=OutputUnit(1, {lib})]
+*/
 main() async {
   await lib.loadLibrary();
   print(lib.table[1]);
diff --git a/tests/compiler/dart2js/deferred_loading/data/deferred_typedef.dart b/tests/compiler/dart2js/deferred_loading/data/deferred_typedef.dart
index 892f55e..90343e4 100644
--- a/tests/compiler/dart2js/deferred_loading/data/deferred_typedef.dart
+++ b/tests/compiler/dart2js/deferred_loading/data/deferred_typedef.dart
@@ -4,7 +4,13 @@
 
 import '../libs/deferred_typedef_lib1.dart' deferred as lib1;
 
-/*element: main:OutputUnit(main, {})*/
+/*strong.element: main:OutputUnit(main, {})*/
+/*strongConst.element: main:
+ OutputUnit(main, {}),
+ constants=[
+  ConstructedConstant(C(a=TypeConstant(void Function()),b=FunctionConstant(topLevelMethod)))=OutputUnit(1, {lib1}),
+  TypeConstant(void Function())=OutputUnit(1, {lib1})]
+*/
 main() async {
   await lib1.loadLibrary();
   print(lib1.cA);
diff --git a/tests/compiler/dart2js/deferred_loading/data/future_or.dart b/tests/compiler/dart2js/deferred_loading/data/future_or.dart
new file mode 100644
index 0000000..5927f8b
--- /dev/null
+++ b/tests/compiler/dart2js/deferred_loading/data/future_or.dart
@@ -0,0 +1,18 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+import '../libs/future_or_lib1.dart' deferred as lib1;
+import '../libs/future_or_lib2.dart' as lib2;
+
+/*strong.element: main:OutputUnit(main, {})*/
+/*strongConst.element: main:
+ OutputUnit(main, {}),
+ constants=[ConstructedConstant(A())=OutputUnit(1, {lib1})]
+*/
+main() async {
+  await lib1.loadLibrary();
+  lib1.field is FutureOr<lib2.A>;
+  lib1.field.method();
+}
diff --git a/tests/compiler/dart2js/deferred_loading/data/type_arguments.dart b/tests/compiler/dart2js/deferred_loading/data/type_arguments.dart
new file mode 100644
index 0000000..14f63696
--- /dev/null
+++ b/tests/compiler/dart2js/deferred_loading/data/type_arguments.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import '../libs/type_arguments_lib1.dart' deferred as lib1;
+import '../libs/type_arguments_lib2.dart' as lib2;
+import '../libs/type_arguments_lib3.dart' deferred as lib3;
+
+/*strong.element: main:OutputUnit(main, {})*/
+/*strongConst.element: main:
+ OutputUnit(main, {}),
+ constants=[
+  ConstructedConstant(A<B>())=OutputUnit(1, {lib1}),
+  ConstructedConstant(A<F>())=OutputUnit(1, {lib1}),
+  ConstructedConstant(C<D>())=OutputUnit(main, {}),
+  ConstructedConstant(E<F>())=OutputUnit(3, {lib3})]
+*/
+main() async {
+  await lib1.loadLibrary();
+  lib1.field1;
+  lib1.field2;
+  lib2.field;
+  lib3.field;
+}
diff --git a/tests/compiler/dart2js/deferred_loading/deferred_loading_test.dart b/tests/compiler/dart2js/deferred_loading/deferred_loading_test.dart
index ea3fd84..e79853c 100644
--- a/tests/compiler/dart2js/deferred_loading/deferred_loading_test.dart
+++ b/tests/compiler/dart2js/deferred_loading/deferred_loading_test.dart
@@ -36,7 +36,7 @@
         options: compilerOptions,
         args: args, setUpFunction: () {
       importPrefixes.clear();
-    });
+    }, testOmit: false, testCFEConstants: true);
   });
 }
 
@@ -128,6 +128,8 @@
   final OutputUnitData _data;
   final ClosureData _closureDataLookup;
 
+  Set<String> _constants = {};
+
   OutputUnitIrComputer(
       DiagnosticReporter reporter,
       Map<Id, ActualData<String>> actualMap,
@@ -137,8 +139,14 @@
       this._closureDataLookup)
       : super(reporter, actualMap);
 
-  String getMemberValue(MemberEntity member) {
-    return outputUnitString(_data.outputUnitForMember(member));
+  String getMemberValue(MemberEntity member, Set<String> constants) {
+    StringBuffer sb = new StringBuffer();
+    sb.write(outputUnitString(_data.outputUnitForMember(member)));
+    if (constants.isNotEmpty) {
+      List<String> text = constants.toList()..sort();
+      sb.write(',constants=[${text.join(',')}]');
+    }
+    return sb.toString();
   }
 
   @override
@@ -166,14 +174,26 @@
       }
     }
 
-    return getMemberValue(_elementMap.getMember(node));
+    String value = getMemberValue(_elementMap.getMember(node), _constants);
+    _constants = {};
+    return value;
+  }
+
+  @override
+  visitConstantExpression(ir.ConstantExpression node) {
+    ConstantValue constant = _elementMap.getConstantValue(node);
+    if (!constant.isPrimitive) {
+      _constants.add('${constant.toStructuredText()}='
+          '${outputUnitString(_data.outputUnitForConstant(constant))}');
+    }
+    return super.visitConstantExpression(node);
   }
 
   @override
   String computeNodeValue(Id id, ir.TreeNode node) {
     if (node is ir.FunctionExpression || node is ir.FunctionDeclaration) {
       ClosureRepresentationInfo info = _closureDataLookup.getClosureInfo(node);
-      return getMemberValue(info.callMethod);
+      return getMemberValue(info.callMethod, const {});
     }
     return null;
   }
diff --git a/tests/compiler/dart2js/deferred_loading/libs/basic_deferred_lib.dart b/tests/compiler/dart2js/deferred_loading/libs/basic_deferred_lib.dart
index bbd9bae..0091deb 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/basic_deferred_lib.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/basic_deferred_lib.dart
@@ -5,7 +5,11 @@
 /*element: defaultArg:OutputUnit(1, {lib})*/
 defaultArg() => "";
 
-/*element: funky:OutputUnit(1, {lib})*/
+/*strong.element: funky:OutputUnit(1, {lib})*/
+/*strongConst.element: funky:
+ OutputUnit(1, {lib}),
+ constants=[FunctionConstant(defaultArg)=OutputUnit(1, {lib})]
+*/
 funky([x = defaultArg]) => x();
 
 final int notUsed = 3;
diff --git a/tests/compiler/dart2js/deferred_loading/libs/deferred_constant1_lib3.dart b/tests/compiler/dart2js/deferred_loading/libs/deferred_constant1_lib3.dart
index 3935220..c304f13 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/deferred_constant1_lib3.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/deferred_constant1_lib3.dart
@@ -8,7 +8,7 @@
 class C {
   /*element: C.value:OutputUnit(main, {})*/
   final value;
-  /*element: C.:OutputUnit(main, {})*/
+  /*strong.element: C.:OutputUnit(main, {})*/
   const C(this.value);
 }
 
@@ -16,40 +16,40 @@
 /// Constant used from main: not deferred.
 /// ---------------------------------------------------------------------------
 
-/*element: C1:OutputUnit(main, {})*/
-const C1 = /*OutputUnit(main, {})*/ const C(1);
+/*strong.element: C1:OutputUnit(main, {})*/
+const C1 = /*strong.OutputUnit(main, {})*/ const C(1);
 
 /// ---------------------------------------------------------------------------
 /// Constant completely deferred.
 /// ---------------------------------------------------------------------------
 
-/*element: C2:OutputUnit(1, {lib2})*/
-const C2 = /*OutputUnit(1, {lib2})*/ const C(2);
+/*strong.element: C2:OutputUnit(1, {lib2})*/
+const C2 = /*strong.OutputUnit(1, {lib2})*/ const C(2);
 
 /// ---------------------------------------------------------------------------
 /// Constant fields not used from main, but the constant value are: so the field
 /// and the constants are in different output units.
 /// ---------------------------------------------------------------------------
 
-/*element: C3:OutputUnit(1, {lib2})*/
-const C3 = /*OutputUnit(main, {})*/ const C(1);
+/*strong.element: C3:OutputUnit(1, {lib2})*/
+const C3 = /*strong.OutputUnit(main, {})*/ const C(1);
 
-/*element: C4:OutputUnit(1, {lib2})*/
-const C4 = /*OutputUnit(main, {})*/ const C(4);
+/*strong.element: C4:OutputUnit(1, {lib2})*/
+const C4 = /*strong.OutputUnit(main, {})*/ const C(4);
 
 /// ---------------------------------------------------------------------------
 /// Constant value used form a closure within main.
 /// ---------------------------------------------------------------------------
 
-/*element: C5:OutputUnit(1, {lib2})*/
-const C5 = /*OutputUnit(main, {})*/ const C(5);
+/*strong.element: C5:OutputUnit(1, {lib2})*/
+const C5 = /*strong.OutputUnit(main, {})*/ const C(5);
 
 /// ---------------------------------------------------------------------------
 /// Deferred constants, used after a deferred load.
 /// ---------------------------------------------------------------------------
 
-/*element: C6:OutputUnit(1, {lib2})*/
+/*strong.element: C6:OutputUnit(1, {lib2})*/
 const C6 = "string6";
 
-/*element: C7:OutputUnit(1, {lib2})*/
-const C7 = /*OutputUnit(1, {lib2})*/ const C(const C(7));
+/*strong.element: C7:OutputUnit(1, {lib2})*/
+const C7 = /*strong.OutputUnit(1, {lib2})*/ const C(const C(7));
diff --git a/tests/compiler/dart2js/deferred_loading/libs/deferred_constant2_lib.dart b/tests/compiler/dart2js/deferred_loading/libs/deferred_constant2_lib.dart
index 33b5017..12221777 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/deferred_constant2_lib.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/deferred_constant2_lib.dart
@@ -8,7 +8,7 @@
 class Constant {
   /*element: Constant.value:OutputUnit(1, {lib})*/
   final value;
-  /*element: Constant.:OutputUnit(1, {lib})*/
+  /*strong.element: Constant.:OutputUnit(1, {lib})*/
   const Constant(this.value);
 
   /*element: Constant.==:OutputUnit(1, {lib})*/
@@ -17,5 +17,5 @@
   get hashCode => 0;
 }
 
-/*element: C1:OutputUnit(1, {lib})*/
-const C1 = /*OutputUnit(1, {lib})*/ const Constant(499);
+/*strong.element: C1:OutputUnit(1, {lib})*/
+const C1 = /*strong.OutputUnit(1, {lib})*/ const Constant(499);
diff --git a/tests/compiler/dart2js/deferred_loading/libs/deferred_constant3_lib1.dart b/tests/compiler/dart2js/deferred_loading/libs/deferred_constant3_lib1.dart
new file mode 100644
index 0000000..ad37207
--- /dev/null
+++ b/tests/compiler/dart2js/deferred_loading/libs/deferred_constant3_lib1.dart
@@ -0,0 +1,30 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'deferred_constant3_shared.dart';
+import 'deferred_constant3_lib2.dart' deferred as l2;
+
+/*strong.element: c2:OutputUnit(1, {l1})*/
+const c2 = /*strong.OutputUnit(1, {l1})*/ const C(2);
+
+/*strong.element: c3:OutputUnit(1, {l1})*/
+const c3 = /*strong.OutputUnit(1, {l1})*/ const C(3);
+
+/*strong.element: m1:OutputUnit(1, {l1})*/
+/*strongConst.element: m1:
+ OutputUnit(1, {l1}),
+ constants=[
+  ConstructedConstant(C(x=IntConstant(1)))=OutputUnit(main, {}),
+  ConstructedConstant(C(x=IntConstant(2)))=OutputUnit(1, {l1}),
+  ConstructedConstant(C(x=IntConstant(3)))=OutputUnit(1, {l1}),
+  ConstructedConstant(C(x=IntConstant(4)))=OutputUnit(2, {l2})]
+*/
+m1() async {
+  print(c2);
+  print(c3);
+  await l2.loadLibrary();
+  l2.m2();
+  print(l2.c3);
+  print(l2.c4);
+}
diff --git a/tests/compiler/dart2js/deferred_loading/libs/deferred_constant3_lib2.dart b/tests/compiler/dart2js/deferred_loading/libs/deferred_constant3_lib2.dart
new file mode 100644
index 0000000..b834b48
--- /dev/null
+++ b/tests/compiler/dart2js/deferred_loading/libs/deferred_constant3_lib2.dart
@@ -0,0 +1,28 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'deferred_constant3_shared.dart';
+
+/*strong.element: c3:OutputUnit(2, {l2})*/
+const c3 = /*strong.OutputUnit(main, {})*/ const C(1);
+
+/*strong.element: c4:OutputUnit(2, {l2})*/
+const c4 = /*strong.OutputUnit(2, {l2})*/ const C(4);
+
+/*strong.element: c5:OutputUnit(2, {l2})*/
+const c5 = /*strong.OutputUnit(2, {l2})*/ const C(5);
+
+/*strong.element: m2:OutputUnit(2, {l2})*/
+/*strongConst.element: m2:
+ OutputUnit(2, {l2}),
+ constants=[
+  ConstructedConstant(C(x=IntConstant(1)))=OutputUnit(main, {}),
+  ConstructedConstant(C(x=IntConstant(4)))=OutputUnit(2, {l2}),
+  ConstructedConstant(C(x=IntConstant(5)))=OutputUnit(2, {l2})]
+*/
+m2() async {
+  print(c3);
+  print(c4);
+  print(c5);
+}
diff --git a/tests/compiler/dart2js/deferred_loading/libs/deferred_constant3_shared.dart b/tests/compiler/dart2js/deferred_loading/libs/deferred_constant3_shared.dart
new file mode 100644
index 0000000..d4480d1
--- /dev/null
+++ b/tests/compiler/dart2js/deferred_loading/libs/deferred_constant3_shared.dart
@@ -0,0 +1,12 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/*class: C:OutputUnit(main, {})*/
+class C {
+  /*strong.element: C.:OutputUnit(main, {})*/
+  const C(this.x);
+
+  /*element: C.x:OutputUnit(main, {})*/
+  final x;
+}
diff --git a/tests/compiler/dart2js/deferred_loading/libs/deferred_typed_map_lib1.dart b/tests/compiler/dart2js/deferred_loading/libs/deferred_typed_map_lib1.dart
index e5b0dc7..cec8198 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/deferred_typed_map_lib1.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/deferred_typed_map_lib1.dart
@@ -7,9 +7,9 @@
 
 typedef dynamic FF({M b});
 
-/*element: table:OutputUnit(1, {lib})*/
+/*strong.element: table:OutputUnit(1, {lib})*/
 const table =
-/*OutputUnit(1, {lib})*/
+/*strong.OutputUnit(1, {lib})*/
     const <int, FF>{1: f1, 2: f2};
 
 /*element: f1:OutputUnit(1, {lib})*/
diff --git a/tests/compiler/dart2js/deferred_loading/libs/deferred_typedef_lib1.dart b/tests/compiler/dart2js/deferred_loading/libs/deferred_typedef_lib1.dart
index 9d6d26a..e8b71f2 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/deferred_typedef_lib1.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/deferred_typedef_lib1.dart
@@ -12,7 +12,7 @@
   /*element: C.b:OutputUnit(1, {lib1})*/
   final b;
 
-  /*element: C.:OutputUnit(1, {lib1})*/
+  /*strong.element: C.:OutputUnit(1, {lib1})*/
   const C(this.a, this.b);
 }
 
@@ -23,8 +23,8 @@
 /*element: topLevelMethod:OutputUnit(1, {lib1})*/
 topLevelMethod() {}
 
-/*element: cA:OutputUnit(1, {lib1})*/
-const cA = /*OutputUnit(1, {lib1})*/ const C(MyF1, topLevelMethod);
+/*strong.element: cA:OutputUnit(1, {lib1})*/
+const cA = /*strong.OutputUnit(1, {lib1})*/ const C(MyF1, topLevelMethod);
 
-/*element: cB:OutputUnit(1, {lib1})*/
-const cB = /*OutputUnit(1, {lib1})*/ MyF2;
+/*strong.element: cB:OutputUnit(1, {lib1})*/
+const cB = /*strong.OutputUnit(1, {lib1})*/ MyF2;
diff --git a/tests/compiler/dart2js/deferred_loading/libs/dont_inline_deferred_constants_lib1.dart b/tests/compiler/dart2js/deferred_loading/libs/dont_inline_deferred_constants_lib1.dart
index 80c37a0..545c685 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/dont_inline_deferred_constants_lib1.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/dont_inline_deferred_constants_lib1.dart
@@ -5,35 +5,35 @@
 import "dont_inline_deferred_constants_main.dart" show C;
 import "dont_inline_deferred_constants_main.dart" as main;
 
-/*element: C1:OutputUnit(1, {lib1})*/
+/*strong.element: C1:OutputUnit(1, {lib1})*/
 const C1 = "string1";
 
-/*element: C1b:OutputUnit(1, {lib1})*/
-const C1b = /*OutputUnit(1, {lib1})*/ const C("string1");
+/*strong.element: C1b:OutputUnit(1, {lib1})*/
+const C1b = /*strong.OutputUnit(1, {lib1})*/ const C("string1");
 
-/*element: C2:OutputUnit(1, {lib1})*/
+/*strong.element: C2:OutputUnit(1, {lib1})*/
 const C2 = 1010;
 
-/*element: C2b:OutputUnit(1, {lib1})*/
-const C2b = /*OutputUnit(1, {lib1})*/ const C(1010);
+/*strong.element: C2b:OutputUnit(1, {lib1})*/
+const C2b = /*strong.OutputUnit(1, {lib1})*/ const C(1010);
 
 /*class: D:OutputUnit(main, {})*/
 class D {
-  /*element: D.C3:OutputUnit(1, {lib1})*/
+  /*strong.element: D.C3:OutputUnit(1, {lib1})*/
   static const C3 = "string2";
 
-  /*element: D.C3b:OutputUnit(1, {lib1})*/
-  static const C3b = /*OutputUnit(1, {lib1})*/ const C("string2");
+  /*strong.element: D.C3b:OutputUnit(1, {lib1})*/
+  static const C3b = /*strong.OutputUnit(1, {lib1})*/ const C("string2");
 }
 
-/*element: C4:OutputUnit(1, {lib1})*/
+/*strong.element: C4:OutputUnit(1, {lib1})*/
 const C4 = "string4";
 
-/*element: C5:OutputUnit(1, {lib1})*/
-const C5 = /*OutputUnit(main, {})*/ const C(1);
+/*strong.element: C5:OutputUnit(1, {lib1})*/
+const C5 = /*strong.OutputUnit(main, {})*/ const C(1);
 
-/*element: C6:OutputUnit(1, {lib1})*/
-const C6 = /*OutputUnit(2, {lib1, lib2})*/ const C(2);
+/*strong.element: C6:OutputUnit(1, {lib1})*/
+const C6 = /*strong.OutputUnit(2, {lib1, lib2})*/ const C(2);
 
 /*element: foo:OutputUnit(1, {lib1})*/
 foo() {
diff --git a/tests/compiler/dart2js/deferred_loading/libs/dont_inline_deferred_constants_lib2.dart b/tests/compiler/dart2js/deferred_loading/libs/dont_inline_deferred_constants_lib2.dart
index c1d65c5..79948c6 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/dont_inline_deferred_constants_lib2.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/dont_inline_deferred_constants_lib2.dart
@@ -5,14 +5,14 @@
 import "dont_inline_deferred_constants_main.dart" show C;
 import "dont_inline_deferred_constants_main.dart" as main;
 
-/*element: C4:OutputUnit(3, {lib2})*/
+/*strong.element: C4:OutputUnit(3, {lib2})*/
 const C4 = "string4";
 
-/*element: C5:OutputUnit(3, {lib2})*/
-const C5 = /*OutputUnit(main, {})*/ const C(1);
+/*strong.element: C5:OutputUnit(3, {lib2})*/
+const C5 = /*strong.OutputUnit(main, {})*/ const C(1);
 
-/*element: C6:OutputUnit(3, {lib2})*/
-const C6 = /*OutputUnit(2, {lib1, lib2})*/ const C(2);
+/*strong.element: C6:OutputUnit(3, {lib2})*/
+const C6 = /*strong.OutputUnit(2, {lib1, lib2})*/ const C(2);
 
 /*element: foo:OutputUnit(3, {lib2})*/
 foo() {
diff --git a/tests/compiler/dart2js/deferred_loading/libs/dont_inline_deferred_constants_main.dart b/tests/compiler/dart2js/deferred_loading/libs/dont_inline_deferred_constants_main.dart
index a8f56bd..ae08f33 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/dont_inline_deferred_constants_main.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/dont_inline_deferred_constants_main.dart
@@ -5,7 +5,7 @@
 import 'dont_inline_deferred_constants_lib1.dart' deferred as lib1;
 import 'dont_inline_deferred_constants_lib2.dart' deferred as lib2;
 
-/*element: c:OutputUnit(main, {})*/
+/*strong.element: c:OutputUnit(main, {})*/
 const c = "string3";
 
 /*class: C:OutputUnit(main, {})*/
@@ -13,14 +13,23 @@
   /*element: C.p:OutputUnit(main, {})*/
   final p;
 
-  /*element: C.:OutputUnit(main, {})*/
+  /*strong.element: C.:OutputUnit(main, {})*/
   const C(this.p);
 }
 
 /*element: foo:OutputUnit(2, {lib1, lib2})*/
 foo() => print("main");
 
-/*element: main:OutputUnit(main, {})*/
+/*strong.element: main:OutputUnit(main, {})*/
+/*strongConst.element: main:
+ OutputUnit(main, {}),
+ constants=[
+  ConstructedConstant(C(p=IntConstant(1)))=OutputUnit(main, {}),
+  ConstructedConstant(C(p=IntConstant(1010)))=OutputUnit(1, {lib1}),
+  ConstructedConstant(C(p=IntConstant(2)))=OutputUnit(2, {lib1, lib2}),
+  ConstructedConstant(C(p=StringConstant("string1")))=OutputUnit(1, {lib1}),
+  ConstructedConstant(C(p=StringConstant("string2")))=OutputUnit(1, {lib1})]
+*/
 void main() {
   lib1.loadLibrary().then(/*OutputUnit(main, {})*/ (_) {
     lib2.loadLibrary().then(/*OutputUnit(main, {})*/ (_) {
diff --git a/tests/compiler/dart2js/deferred_loading/libs/future_or_lib1.dart b/tests/compiler/dart2js/deferred_loading/libs/future_or_lib1.dart
new file mode 100644
index 0000000..a5bf524
--- /dev/null
+++ b/tests/compiler/dart2js/deferred_loading/libs/future_or_lib1.dart
@@ -0,0 +1,8 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'future_or_lib2.dart';
+
+/*strong.element: field:OutputUnit(1, {lib1})*/
+const dynamic field = /*strong.OutputUnit(1, {lib1})*/ const A();
diff --git a/tests/compiler/dart2js/deferred_loading/libs/future_or_lib2.dart b/tests/compiler/dart2js/deferred_loading/libs/future_or_lib2.dart
new file mode 100644
index 0000000..3c7fcbc
--- /dev/null
+++ b/tests/compiler/dart2js/deferred_loading/libs/future_or_lib2.dart
@@ -0,0 +1,12 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/*class: A:OutputUnit(main, {})*/
+class A {
+  /*strong.element: A.:OutputUnit(1, {lib1})*/
+  const A();
+
+  /*element: A.method:OutputUnit(main, {})*/
+  method() {}
+}
diff --git a/tests/compiler/dart2js/deferred_loading/libs/instantiation0_strong_lib1.dart b/tests/compiler/dart2js/deferred_loading/libs/instantiation0_strong_lib1.dart
index fbcd7c2..67ababf 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/instantiation0_strong_lib1.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/instantiation0_strong_lib1.dart
@@ -7,7 +7,11 @@
 
 typedef dynamic G<T>(T v);
 
-/*element: m:OutputUnit(1, {b})*/
+/*strong.element: m:OutputUnit(1, {b})*/
+/*strongConst.element: m:
+ OutputUnit(1, {b}),
+ constants=[InstantiationConstant([int],FunctionConstant(getFoo))=OutputUnit(1, {b})]
+*/
 m(int x, {G<int> f: getFoo}) {
   print(f(x));
 }
diff --git a/tests/compiler/dart2js/deferred_loading/libs/instantiation1_strong_lib1.dart b/tests/compiler/dart2js/deferred_loading/libs/instantiation1_strong_lib1.dart
index fbcd7c2..0124514 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/instantiation1_strong_lib1.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/instantiation1_strong_lib1.dart
@@ -7,7 +7,12 @@
 
 typedef dynamic G<T>(T v);
 
-/*element: m:OutputUnit(1, {b})*/
+/*strong.element: m:OutputUnit(1, {b})*/
+/*strongConst.element: m:
+ OutputUnit(1, {b}),
+ constants=[
+  InstantiationConstant([int],FunctionConstant(getFoo))=OutputUnit(1, {b})]
+*/
 m(int x, {G<int> f: getFoo}) {
   print(f(x));
 }
diff --git a/tests/compiler/dart2js/deferred_loading/libs/instantiation1_strong_lib2.dart b/tests/compiler/dart2js/deferred_loading/libs/instantiation1_strong_lib2.dart
index ceeda93..4f60650 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/instantiation1_strong_lib2.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/instantiation1_strong_lib2.dart
@@ -7,7 +7,12 @@
 
 typedef dynamic G<T, S>(T v, S w);
 
-/*element: m:OutputUnit(3, {c})*/
+/*strong.element: m:OutputUnit(3, {c})*/
+/*strongConst.element: m:
+ OutputUnit(3, {c}),
+ constants=[
+  InstantiationConstant([int, int],FunctionConstant(getFoo))=OutputUnit(3, {c})]
+*/
 m(int x, int y, {G<int, int> f: getFoo}) {
   print(f(x, y));
 }
diff --git a/tests/compiler/dart2js/deferred_loading/libs/instantiation2_strong_lib1.dart b/tests/compiler/dart2js/deferred_loading/libs/instantiation2_strong_lib1.dart
index dde24fe..4a7f401 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/instantiation2_strong_lib1.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/instantiation2_strong_lib1.dart
@@ -7,7 +7,12 @@
 
 typedef dynamic G<T>(T v);
 
-/*element: m:OutputUnit(2, {b})*/
+/*strong.element: m:OutputUnit(2, {b})*/
+/*strongConst.element: m:
+ OutputUnit(2, {b}),
+ constants=[
+  InstantiationConstant([int],FunctionConstant(getFoo))=OutputUnit(2, {b})]
+*/
 m(int x, {G<int> f: getFoo}) {
   print(f(x));
 }
diff --git a/tests/compiler/dart2js/deferred_loading/libs/instantiation2_strong_lib2.dart b/tests/compiler/dart2js/deferred_loading/libs/instantiation2_strong_lib2.dart
index 3dbce0d..6b47d58 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/instantiation2_strong_lib2.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/instantiation2_strong_lib2.dart
@@ -7,7 +7,12 @@
 
 typedef dynamic G<T>(T v);
 
-/*element: m:OutputUnit(3, {c})*/
+/*strong.element: m:OutputUnit(3, {c})*/
+/*strongConst.element: m:
+ OutputUnit(3, {c}),
+ constants=[
+  InstantiationConstant([int],FunctionConstant(getFoo))=OutputUnit(3, {c})]
+*/
 m(int x, {G<int> f: getFoo}) {
   print(f(x));
 }
diff --git a/tests/compiler/dart2js/deferred_loading/libs/instantiation3_strong_lib1.dart b/tests/compiler/dart2js/deferred_loading/libs/instantiation3_strong_lib1.dart
index a8d70d0..89af87b 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/instantiation3_strong_lib1.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/instantiation3_strong_lib1.dart
@@ -7,7 +7,11 @@
 
 typedef dynamic G<T>(T v);
 
-/*element: m:OutputUnit(1, {b})*/
+/*strong.element: m:OutputUnit(1, {b})*/
+/*strongConst.element: m:
+ OutputUnit(1, {b}),
+ constants=[FunctionConstant(getFoo)=OutputUnit(1, {b})]
+*/
 m(int x, {G<int> f}) {
   f ??= getFoo;
   print(f(x));
diff --git a/tests/compiler/dart2js/deferred_loading/libs/instantiation4_strong_lib1.dart b/tests/compiler/dart2js/deferred_loading/libs/instantiation4_strong_lib1.dart
index a8d70d0..89af87b 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/instantiation4_strong_lib1.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/instantiation4_strong_lib1.dart
@@ -7,7 +7,11 @@
 
 typedef dynamic G<T>(T v);
 
-/*element: m:OutputUnit(1, {b})*/
+/*strong.element: m:OutputUnit(1, {b})*/
+/*strongConst.element: m:
+ OutputUnit(1, {b}),
+ constants=[FunctionConstant(getFoo)=OutputUnit(1, {b})]
+*/
 m(int x, {G<int> f}) {
   f ??= getFoo;
   print(f(x));
diff --git a/tests/compiler/dart2js/deferred_loading/libs/instantiation4_strong_lib2.dart b/tests/compiler/dart2js/deferred_loading/libs/instantiation4_strong_lib2.dart
index d70d8a9..3d0891b 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/instantiation4_strong_lib2.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/instantiation4_strong_lib2.dart
@@ -7,7 +7,11 @@
 
 typedef dynamic G<T, S>(T v, S w);
 
-/*element: m:OutputUnit(3, {c})*/
+/*strong.element: m:OutputUnit(3, {c})*/
+/*strongConst.element: m:
+ OutputUnit(3, {c}),
+ constants=[FunctionConstant(getFoo)=OutputUnit(3, {c})]
+*/
 m(int x, int y, {G<int, int> f}) {
   f ??= getFoo;
   print(f(x, y));
diff --git a/tests/compiler/dart2js/deferred_loading/libs/instantiation5_strong_lib1.dart b/tests/compiler/dart2js/deferred_loading/libs/instantiation5_strong_lib1.dart
index 43ca63d..dd75082 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/instantiation5_strong_lib1.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/instantiation5_strong_lib1.dart
@@ -7,7 +7,11 @@
 
 typedef dynamic G<T>(T v);
 
-/*element: m:OutputUnit(2, {b})*/
+/*strong.element: m:OutputUnit(2, {b})*/
+/*strongConst.element: m:
+ OutputUnit(2, {b}),
+ constants=[FunctionConstant(getFoo)=OutputUnit(2, {b})]
+*/
 m(int x, {G<int> f}) {
   f ??= getFoo;
   print(f(x));
diff --git a/tests/compiler/dart2js/deferred_loading/libs/instantiation5_strong_lib2.dart b/tests/compiler/dart2js/deferred_loading/libs/instantiation5_strong_lib2.dart
index 31a0995..17a6fdc 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/instantiation5_strong_lib2.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/instantiation5_strong_lib2.dart
@@ -7,7 +7,11 @@
 
 typedef dynamic G<T>(T v);
 
-/*element: m:OutputUnit(3, {c})*/
+/*strong.element: m:OutputUnit(3, {c})*/
+/*strongConst.element: m:
+ OutputUnit(3, {c}),
+ constants=[FunctionConstant(getFoo)=OutputUnit(3, {c})]
+*/
 m(int x, {G<int> f}) {
   f ??= getFoo;
   print(f(x));
diff --git a/tests/compiler/dart2js/deferred_loading/libs/shared_constant_a.dart b/tests/compiler/dart2js/deferred_loading/libs/shared_constant_a.dart
index 8821616..dc47eae 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/shared_constant_a.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/shared_constant_a.dart
@@ -4,7 +4,11 @@
 
 import 'shared_constant_shared.dart' deferred as s1;
 
-/*element: doA:OutputUnit(main, {})*/
+/*strong.element: doA:OutputUnit(main, {})*/
+/*strongConst.element: doA:
+ OutputUnit(main, {}),
+ constants=[ConstructedConstant(C())=OutputUnit(1, {s1, s2})]
+*/
 doA() async {
   await s1.loadLibrary();
   return s1.constant;
diff --git a/tests/compiler/dart2js/deferred_loading/libs/shared_constant_b.dart b/tests/compiler/dart2js/deferred_loading/libs/shared_constant_b.dart
index 3e87532..8ec4363 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/shared_constant_b.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/shared_constant_b.dart
@@ -4,7 +4,11 @@
 
 import 'shared_constant_shared.dart' deferred as s2;
 
-/*element: doB:OutputUnit(main, {})*/
+/*strong.element: doB:OutputUnit(main, {})*/
+/*strongConst.element: doB:
+ OutputUnit(main, {}),
+ constants=[ConstructedConstant(C())=OutputUnit(1, {s1, s2})]
+*/
 doB() async {
   await s2.loadLibrary();
   return s2.constant;
diff --git a/tests/compiler/dart2js/deferred_loading/libs/shared_constant_c.dart b/tests/compiler/dart2js/deferred_loading/libs/shared_constant_c.dart
index b6ce057..5c7759a 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/shared_constant_c.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/shared_constant_c.dart
@@ -4,7 +4,7 @@
 
 /*class: C:OutputUnit(1, {s1, s2})*/
 class C {
-  /*element: C.:OutputUnit(1, {s1, s2})*/
+  /*strong.element: C.:OutputUnit(1, {s1, s2})*/
   const C();
 
   /*element: C.method:OutputUnit(1, {s1, s2})*/
diff --git a/tests/compiler/dart2js/deferred_loading/libs/shared_constant_shared.dart b/tests/compiler/dart2js/deferred_loading/libs/shared_constant_shared.dart
index c309a75..b29aeba 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/shared_constant_shared.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/shared_constant_shared.dart
@@ -4,6 +4,6 @@
 
 import 'shared_constant_c.dart';
 
-/*element: constant:OutputUnit(1, {s1, s2})*/
+/*strong.element: constant:OutputUnit(1, {s1, s2})*/
 const constant =
-    /*OutputUnit(1, {s1, s2})*/ const C();
+    /*strong.OutputUnit(1, {s1, s2})*/ const C();
diff --git a/tests/compiler/dart2js/deferred_loading/libs/static_separate_lib1.dart b/tests/compiler/dart2js/deferred_loading/libs/static_separate_lib1.dart
index d95536e..18f9ec3 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/static_separate_lib1.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/static_separate_lib1.dart
@@ -9,11 +9,15 @@
   /*element: ConstClass.x:OutputUnit(2, {lib1, lib2})*/
   final x;
 
-  /*element: ConstClass.:OutputUnit(2, {lib1, lib2})*/
+  /*strong.element: ConstClass.:OutputUnit(2, {lib1, lib2})*/
   const ConstClass(this.x);
 }
 
-/*element: x:OutputUnit(2, {lib1, lib2})*/
+/*strong.element: x:OutputUnit(2, {lib1, lib2})*/
+/*strongConst.element: x:
+ OutputUnit(2, {lib1, lib2}),
+ constants=[ConstructedConstant(ConstClass(x=ConstructedConstant(ConstClass(x=IntConstant(1)))))=OutputUnit(2, {lib1, lib2})]
+*/
 var x = const ConstClass(const ConstClass(1));
 
 /*class: C:OutputUnit(1, {lib1})*/
@@ -36,7 +40,11 @@
 
 /*class: C1:OutputUnit(main, {})*/
 class C1 {
-  /*element: C1.foo:OutputUnit(3, {lib2})*/
+  /*strong.element: C1.foo:OutputUnit(3, {lib2})*/
+  /*strongConst.element: C1.foo:
+   OutputUnit(3, {lib2}),
+   constants=[MapConstant({})=OutputUnit(3, {lib2})]
+  */
   static var foo = const {};
   var bar = const {};
 }
@@ -55,10 +63,18 @@
 
 /*class: C3:OutputUnit(1, {lib1})*/
 class C3 {
-  /*element: C3.foo:OutputUnit(3, {lib2})*/
+  /*strong.element: C3.foo:OutputUnit(3, {lib2})*/
+  /*strongConst.element: C3.foo:
+   OutputUnit(3, {lib2}),
+   constants=[ConstructedConstant(ConstClass(x=ConstructedConstant(ConstClass(x=IntConstant(1)))))=OutputUnit(2, {lib1, lib2})]
+  */
   static final foo = const ConstClass(const ConstClass(1));
 
-  /*element: C3.bar:OutputUnit(1, {lib1})*/
+  /*strong.element: C3.bar:OutputUnit(1, {lib1})*/
+  /*strongConst.element: C3.bar:
+   OutputUnit(1, {lib1}),
+   constants=[ConstructedConstant(ConstClass(x=ConstructedConstant(ConstClass(x=IntConstant(1)))))=OutputUnit(2, {lib1, lib2})]
+  */
   final bar = const ConstClass(const ConstClass(1));
 
   /*element: C3.:OutputUnit(1, {lib1})*/
@@ -79,8 +95,8 @@
 
 /*class: C5:OutputUnit(1, {lib1})*/
 class C5 {
-  /*element: C5.foo:OutputUnit(3, {lib2})*/
-  static const foo = /*OutputUnit(3, {lib2})*/ const [
+  /*strong.element: C5.foo:OutputUnit(3, {lib2})*/
+  static const foo = /*strong.OutputUnit(3, {lib2})*/ const [
     const {1: 3}
   ];
 
diff --git a/tests/compiler/dart2js/deferred_loading/libs/static_separate_lib2.dart b/tests/compiler/dart2js/deferred_loading/libs/static_separate_lib2.dart
index 4358474..bb0ca27 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/static_separate_lib2.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/static_separate_lib2.dart
@@ -7,7 +7,13 @@
 import "package:expect/expect.dart";
 import "static_separate_lib1.dart";
 
-/*element: foo:OutputUnit(3, {lib2})*/
+/*strong.element: foo:OutputUnit(3, {lib2})*/
+/*strongConst.element: foo:
+ OutputUnit(3, {lib2}),
+ constants=[
+  ListConstant(<Map<int,int>>[MapConstant(<int, int>{IntConstant(1): IntConstant(3)})])=OutputUnit(3, {lib2}),
+  MapConstant(<int, int>{IntConstant(1): IntConstant(3)})=OutputUnit(3, {lib2})]
+*/
 foo() {
   Expect.equals(1, C.foo());
   Expect.mapEquals({}, C1.foo);
diff --git a/tests/compiler/dart2js/deferred_loading/libs/type_argument_dependency_lib2.dart b/tests/compiler/dart2js/deferred_loading/libs/type_argument_dependency_lib2.dart
index 81e799e..4ed198d 100644
--- a/tests/compiler/dart2js/deferred_loading/libs/type_argument_dependency_lib2.dart
+++ b/tests/compiler/dart2js/deferred_loading/libs/type_argument_dependency_lib2.dart
@@ -2,8 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/*strong.class: A:OutputUnit(main, {})*/
-/*omit.class: A:OutputUnit(main, {})*/
+/*class: A:OutputUnit(main, {})*/
 class A {
   /*element: A.:OutputUnit(1, {c})*/
   A();
diff --git a/tests/compiler/dart2js/deferred_loading/libs/type_arguments_lib1.dart b/tests/compiler/dart2js/deferred_loading/libs/type_arguments_lib1.dart
new file mode 100644
index 0000000..b66d8d2
--- /dev/null
+++ b/tests/compiler/dart2js/deferred_loading/libs/type_arguments_lib1.dart
@@ -0,0 +1,20 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'type_arguments_lib3.dart';
+
+/*class: A:OutputUnit(1, {lib1})*/
+class A<T> {
+  /*strong.element: A.:OutputUnit(1, {lib1})*/
+  const A();
+}
+
+/*class: B:OutputUnit(1, {lib1})*/
+class B {}
+
+/*strong.element: field1:OutputUnit(1, {lib1})*/
+const dynamic field1 = /*strong.OutputUnit(1, {lib1})*/ const A<B>();
+
+/*strong.element: field2:OutputUnit(1, {lib1})*/
+const dynamic field2 = /*strong.OutputUnit(1, {lib1})*/ const A<F>();
diff --git a/tests/compiler/dart2js/deferred_loading/libs/type_arguments_lib2.dart b/tests/compiler/dart2js/deferred_loading/libs/type_arguments_lib2.dart
new file mode 100644
index 0000000..12b8c62
--- /dev/null
+++ b/tests/compiler/dart2js/deferred_loading/libs/type_arguments_lib2.dart
@@ -0,0 +1,15 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/*class: C:OutputUnit(main, {})*/
+class C<T> {
+  /*strong.element: C.:OutputUnit(main, {})*/
+  const C();
+}
+
+/*class: D:OutputUnit(main, {})*/
+class D {}
+
+/*strong.element: field:OutputUnit(main, {})*/
+const dynamic field = /*strong.OutputUnit(main, {})*/ const C<D>();
diff --git a/tests/compiler/dart2js/deferred_loading/libs/type_arguments_lib3.dart b/tests/compiler/dart2js/deferred_loading/libs/type_arguments_lib3.dart
new file mode 100644
index 0000000..c280a53
--- /dev/null
+++ b/tests/compiler/dart2js/deferred_loading/libs/type_arguments_lib3.dart
@@ -0,0 +1,15 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/*class: E:OutputUnit(3, {lib3})*/
+class E<T> {
+  /*strong.element: E.:OutputUnit(3, {lib3})*/
+  const E();
+}
+
+/*class: F:OutputUnit(2, {lib1, lib3})*/
+class F {}
+
+/*strong.element: field:OutputUnit(3, {lib3})*/
+const dynamic field = /*strong.OutputUnit(3, {lib3})*/ const E<F>();
diff --git a/tests/compiler/dart2js/end_to_end/bad_output_io_test.dart b/tests/compiler/dart2js/end_to_end/bad_output_io_test.dart
index b386ea1..ba55341 100644
--- a/tests/compiler/dart2js/end_to_end/bad_output_io_test.dart
+++ b/tests/compiler/dart2js/end_to_end/bad_output_io_test.dart
@@ -29,21 +29,33 @@
 
 class CollectingFormattingDiagnosticHandler
     implements FormattingDiagnosticHandler {
+  @override
   final provider = null;
+  @override
   bool showWarnings = true;
+  @override
   bool showHints = true;
+  @override
   bool verbose = true;
+  @override
   bool isAborting = false;
+  @override
   bool enableColors = false;
+  @override
   bool throwOnError = false;
+  @override
   bool autoReadFileUri = false;
+  @override
   var lastKind = null;
 
+  @override
   final int FATAL = 0;
+  @override
   final int INFO = 1;
 
   final messages = [];
 
+  @override
   void info(var message, [kind = Diagnostic.VERBOSE_INFO]) {
     messages.add([message, kind]);
   }
@@ -58,12 +70,15 @@
     report(null, uri, begin, end, message, kind);
   }
 
+  @override
   String prefixMessage(String message, Diagnostic kind) {
     return message;
   }
 
+  @override
   int fatalCount;
 
+  @override
   int throwOnErrorCount;
 }
 
diff --git a/tests/compiler/dart2js/end_to_end/data/hello_world.dart b/tests/compiler/dart2js/end_to_end/data/hello_world.dart
new file mode 100644
index 0000000..3e3c4d4
--- /dev/null
+++ b/tests/compiler/dart2js/end_to_end/data/hello_world.dart
@@ -0,0 +1,7 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+main() {
+  print("Hello World!");
+}
diff --git a/tests/compiler/dart2js/end_to_end/dump_info2_test.dart b/tests/compiler/dart2js/end_to_end/dump_info2_test.dart
index 4f99c8e..7d27bf0 100644
--- a/tests/compiler/dart2js/end_to_end/dump_info2_test.dart
+++ b/tests/compiler/dart2js/end_to_end/dump_info2_test.dart
@@ -2,9 +2,12 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// Test that parameters keep their names in the output.
-
 import 'dart:convert';
+
+import 'package:compiler/compiler_new.dart';
+import 'package:dart2js_info/info.dart';
+import 'package:dart2js_info/json_info_codec.dart';
+import 'package:dart2js_info/binary_serialization.dart' as binary;
 import 'package:async_helper/async_helper.dart';
 import 'package:compiler/src/commandline_options.dart';
 import 'package:expect/expect.dart';
@@ -96,92 +99,82 @@
    main() => funcA();
 """;
 
-typedef void JsonTaking(Map<String, dynamic> json);
+typedef InfoCheck = void Function(AllInfo);
 
-jsonTest(String program, JsonTaking testFn) async {
+infoTest(String program, bool useBinary, InfoCheck check) async {
   var options = ['--out=out.js', Flags.dumpInfo];
+  // Note: we always pass '--dump-info' because the memory-compiler does not
+  // have the logic in dart2js.dart to imply dump-info when --dump-info=binary
+  // is provided.
+  if (useBinary) options.add("${Flags.dumpInfo}=binary");
+  var collector = new OutputCollector();
   var result = await runCompiler(
-      memorySourceFiles: {'main.dart': program}, options: options);
+      memorySourceFiles: {'main.dart': program},
+      options: options,
+      outputProvider: collector);
   var compiler = result.compiler;
   Expect.isFalse(compiler.compilationFailed);
-  var dumpTask = compiler.dumpInfoTask;
-
-  StringBuffer sb = new StringBuffer();
-  dumpTask.dumpInfoJson(sb, compiler.backendClosedWorldForTesting);
-  String jsonString = sb.toString();
-  Map<String, dynamic> map = json.decode(jsonString);
-
-  testFn(map);
+  AllInfo info;
+  if (useBinary) {
+    var sink = collector.binaryOutputMap[Uri.parse('out.js.info.data')];
+    info = binary.decode(sink.list);
+  } else {
+    info = new AllInfoJsonCodec().decode(
+        json.decode(collector.getOutput("out.js", OutputType.dumpInfo)));
+  }
+  check(info);
 }
 
 main() {
   asyncTest(() async {
     print('--test from kernel------------------------------------------------');
-    await runTests();
+    await runTests(useBinary: false);
+    await runTests(useBinary: true);
   });
 }
 
-runTests() async {
-  await jsonTest(TEST_BASIC, (map) {
-    Expect.isTrue(map['elements'].isNotEmpty);
-    Expect.isTrue(map['elements']['function'].isNotEmpty);
-    Expect.isTrue(map['elements']['library'].isNotEmpty);
-    Expect.isTrue(map['elements']['library'].values.any((lib) {
-      return lib['name'] == "main";
+runTests({bool useBinary: false}) async {
+  await infoTest(TEST_BASIC, useBinary, (info) {
+    Expect.isTrue(info.functions.isNotEmpty);
+    Expect.isTrue(info.libraries.isNotEmpty);
+    Expect.isTrue(info.libraries.any((lib) => lib.name == "main"));
+    Expect.isTrue(info.classes.any((c) => c.name == 'c'));
+    Expect.isTrue(info.functions.any((f) => f.name == 'f'));
+  });
+
+  await infoTest(TEST_CLOSURES, useBinary, (info) {
+    Expect.isTrue(info.functions.any((fn) {
+      return fn.name == 'bar' && fn.closures.length == 11;
     }));
-    Expect.isTrue(map['elements']['class'].values.any((clazz) {
-      return clazz['name'] == "c";
-    }));
-    Expect.isTrue(map['elements']['function'].values.any((fun) {
-      return fun['name'] == 'f';
+    Expect.isTrue(info.functions.any((fn) {
+      return fn.name == 'foo' && fn.closures.length == 10;
     }));
   });
 
-  await jsonTest(TEST_CLOSURES, (map) {
-    var functions = map['elements']['function'].values;
-    Expect.isTrue(functions.any((fn) {
-      return fn['name'] == 'bar' && fn['children'].length == 11;
-    }));
-    Expect.isTrue(functions.any((fn) {
-      return fn['name'] == 'foo' && fn['children'].length == 10;
+  await infoTest(TEST_STATICS, useBinary, (info) {
+    Expect.isTrue(info.functions.any((fn) => fn.name == 'does_something'));
+    Expect.isTrue(info.classes.any((cls) {
+      return cls.name == 'ContainsStatics' && cls.functions.length >= 1;
     }));
   });
 
-  await jsonTest(TEST_STATICS, (map) {
-    var functions = map['elements']['function'].values;
-    var classes = map['elements']['class'].values;
-    Expect.isTrue(functions.any((fn) {
-      return fn['name'] == 'does_something';
+  await infoTest(TEST_INLINED_1, useBinary, (info) {
+    Expect.isTrue(info.functions.any((fn) {
+      return fn.name == 'double' && fn.inlinedCount == 1;
     }));
-    Expect.isTrue(classes.any((cls) {
-      return cls['name'] == 'ContainsStatics' && cls['children'].length >= 1;
+    Expect.isTrue(info.classes.any((cls) {
+      return cls.name == 'Doubler' && cls.functions.length >= 1;
     }));
   });
 
-  await jsonTest(TEST_INLINED_1, (map) {
-    var functions = map['elements']['function'].values;
-    var classes = map['elements']['class'].values;
-    Expect.isTrue(functions.any((fn) {
-      return fn['name'] == 'double' && fn['inlinedCount'] == 1;
-    }));
-    Expect.isTrue(classes.any((cls) {
-      return cls['name'] == 'Doubler' && cls['children'].length >= 1;
-    }));
-  });
-
-  await jsonTest(TEST_INLINED_2, (map) {
-    var functions = map['elements']['function'].values;
-    var deps = map['holding'];
-    var main_ = functions.firstWhere((v) => v['name'] == 'main');
-    var fn1 = functions.firstWhere((v) => v['name'] == 'funcA');
-    var fn2 = functions.firstWhere((v) => v['name'] == 'funcB');
+  await infoTest(TEST_INLINED_2, useBinary, (info) {
+    var main_ = info.functions.firstWhere((v) => v.name == 'main');
+    var fn1 = info.functions.firstWhere((v) => v.name == 'funcA');
+    var fn2 = info.functions.firstWhere((v) => v.name == 'funcB');
     Expect.isTrue(main_ != null);
     Expect.isTrue(fn1 != null);
     Expect.isTrue(fn2 != null);
-    Expect.isTrue(deps.containsKey(main_['id']));
-    Expect.isTrue(deps.containsKey(fn1['id']));
-    Expect.isTrue(deps.containsKey(fn2['id']));
-    Expect.isTrue(deps[main_['id']].any((dep) => dep['id'] == fn1['id']));
-    Expect.isTrue(deps[fn1['id']].any((dep) => dep['id'] == fn2['id']));
+    Expect.isTrue(main_.uses.any((dep) => dep.target == fn1));
+    Expect.isTrue(fn1.uses.any((dep) => dep.target == fn2));
   });
 }
diff --git a/tests/compiler/dart2js/end_to_end/dump_info_test.dart b/tests/compiler/dart2js/end_to_end/dump_info_test.dart
index ba7fd8a..19a4cfe 100644
--- a/tests/compiler/dart2js/end_to_end/dump_info_test.dart
+++ b/tests/compiler/dart2js/end_to_end/dump_info_test.dart
@@ -30,8 +30,10 @@
   Directory tmpDir = Directory.systemTemp.createTempSync('dump_info_test_');
   Directory out1 = new Directory.fromUri(tmpDir.uri.resolve('without'));
   out1.createSync();
-  Directory out2 = new Directory.fromUri(tmpDir.uri.resolve('with'));
+  Directory out2 = new Directory.fromUri(tmpDir.uri.resolve('json'));
   out2.createSync();
+  Directory out3 = new Directory.fromUri(tmpDir.uri.resolve('binary'));
+  out3.createSync();
   Directory appDir =
       new Directory.fromUri(Uri.base.resolve('samples-dev/swarm'));
 
@@ -52,7 +54,7 @@
         .readAsStringSync();
 
     command =
-        dart2JsCommand(['--out=with/out.js', 'swarm.dart', '--dump-info']);
+        dart2JsCommand(['--out=json/out.js', 'swarm.dart', '--dump-info']);
     print('Run $command');
     result = Process.runSync(Platform.resolvedExecutable, command,
         workingDirectory: tmpDir.path);
@@ -63,10 +65,28 @@
     print(result.stderr);
     Expect.equals(0, result.exitCode);
     String output2 =
-        new File.fromUri(tmpDir.uri.resolve('with/out.js')).readAsStringSync();
+        new File.fromUri(tmpDir.uri.resolve('json/out.js')).readAsStringSync();
 
     print('Compare outputs...');
     Expect.equals(output1, output2);
+
+    command = dart2JsCommand(
+        ['--out=binary/out.js', 'swarm.dart', '--dump-info=binary']);
+    print('Run $command');
+    result = Process.runSync(Platform.resolvedExecutable, command,
+        workingDirectory: tmpDir.path);
+    print('exit code: ${result.exitCode}');
+    print('stdout:');
+    print(result.stdout);
+    print('stderr:');
+    print(result.stderr);
+    Expect.equals(0, result.exitCode);
+    String output3 = new File.fromUri(tmpDir.uri.resolve('binary/out.js'))
+        .readAsStringSync();
+
+    print('Compare outputs...');
+    Expect.equals(output1, output3);
+
     print('Done');
   } finally {
     print("Deleting '${tmpDir.path}'.");
diff --git a/tests/compiler/dart2js/end_to_end/exit_code_test.dart b/tests/compiler/dart2js/end_to_end/exit_code_test.dart
index c891f34..aea5404 100644
--- a/tests/compiler/dart2js/end_to_end/exit_code_test.dart
+++ b/tests/compiler/dart2js/end_to_end/exit_code_test.dart
@@ -32,6 +32,7 @@
   final String testMarker;
   final String testType;
   final Function onTest;
+  @override
   TestDiagnosticReporter reporter;
 
   TestCompiler(
@@ -54,6 +55,7 @@
     return new TestBackend(this);
   }
 
+  @override
   Future<bool> run(Uri uri) {
     test('Compiler.run');
     return super.run(uri);
@@ -98,6 +100,7 @@
 }
 
 class TestBackend extends JavaScriptBackend {
+  @override
   final TestCompiler compiler;
   TestBackend(TestCompiler compiler)
       : this.compiler = compiler,
@@ -116,6 +119,7 @@
 
 class TestDiagnosticReporter extends DiagnosticReporterWrapper {
   TestCompiler compiler;
+  @override
   DiagnosticReporter reporter;
 
   @override
diff --git a/tests/compiler/dart2js/end_to_end/library_env_test.dart b/tests/compiler/dart2js/end_to_end/library_env_test.dart
index e215c89..45421c4 100644
--- a/tests/compiler/dart2js/end_to_end/library_env_test.dart
+++ b/tests/compiler/dart2js/end_to_end/library_env_test.dart
@@ -49,6 +49,7 @@
 class DummyCompilerInput implements CompilerInput {
   const DummyCompilerInput();
 
+  @override
   Future<Input> readFromUri(Uri uri,
       {InputKind inputKind: InputKind.UTF8}) async {
     if (uri.path.endsWith("libraries.json")) {
@@ -62,6 +63,7 @@
 class DummyCompilerDiagnostics implements CompilerDiagnostics {
   const DummyCompilerDiagnostics();
 
+  @override
   report(code, uri, begin, end, text, kind) {
     throw "should not be needed";
   }
diff --git a/tests/compiler/dart2js/end_to_end/modular_loader_test.dart b/tests/compiler/dart2js/end_to_end/modular_loader_test.dart
new file mode 100644
index 0000000..b1a1d98
--- /dev/null
+++ b/tests/compiler/dart2js/end_to_end/modular_loader_test.dart
@@ -0,0 +1,136 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import '../helpers/memory_compiler.dart';
+import 'package:async_helper/async_helper.dart';
+import 'package:compiler/src/apiimpl.dart' show CompilerImpl;
+import 'package:compiler/src/common_elements.dart';
+import 'package:compiler/src/elements/entities.dart'
+    show LibraryEntity, ClassEntity;
+import 'package:compiler/src/kernel/dart2js_target.dart';
+import 'package:compiler/src/kernel/loader.dart';
+import 'package:expect/expect.dart';
+import 'package:front_end/src/api_prototype/front_end.dart';
+import 'package:front_end/src/api_prototype/memory_file_system.dart';
+import 'package:front_end/src/api_prototype/standard_file_system.dart';
+import 'package:front_end/src/compute_platform_binaries_location.dart'
+    show computePlatformBinariesLocation;
+import 'package:front_end/src/fasta/kernel/utils.dart' show serializeComponent;
+import 'package:kernel/ast.dart';
+import 'package:kernel/target/targets.dart' show TargetFlags;
+
+/// Test that the compiler can load kernel in modular fragments.
+main() {
+  asyncTest(() async {
+    var aDill = await compileUnit(['a0.dart'], {'a0.dart': sourceA});
+    var bDill = await compileUnit(
+        ['b1.dart'], {'b1.dart': sourceB, 'a.dill': aDill},
+        deps: ['a.dill']);
+    var cDill = await compileUnit(
+        ['c2.dart'], {'c2.dart': sourceC, 'a.dill': aDill, 'b.dill': bDill},
+        deps: ['a.dill', 'b.dill']);
+
+    DiagnosticCollector diagnostics = new DiagnosticCollector();
+    OutputCollector output = new OutputCollector();
+    Uri entryPoint = Uri.parse('memory:c.dill');
+    CompilerImpl compiler = compilerFor(
+        entryPoint: entryPoint,
+        options: ['--dill-dependencies=memory:a.dill,memory:b.dill'],
+        memorySourceFiles: {'a.dill': aDill, 'b.dill': bDill, 'c.dill': cDill},
+        diagnosticHandler: diagnostics,
+        outputProvider: output);
+    await compiler.setupSdk();
+    KernelResult result = await compiler.kernelLoader.load(entryPoint);
+    compiler.frontendStrategy.registerLoadedLibraries(result);
+
+    Expect.equals(0, diagnostics.errors.length);
+    Expect.equals(0, diagnostics.warnings.length);
+
+    ElementEnvironment environment =
+        compiler.frontendStrategy.elementEnvironment;
+    LibraryEntity library = environment.lookupLibrary(toTestUri('b1.dart'));
+    Expect.isNotNull(library);
+    ClassEntity clss = environment.lookupClass(library, 'B1');
+    Expect.isNotNull(clss);
+    var member = environment.lookupClassMember(clss, 'foo');
+    Expect.isNotNull(member);
+  });
+}
+
+/// Generate a component for a modular complation unit.
+Future<List<int>> compileUnit(List<String> inputs, Map<String, dynamic> sources,
+    {List<String> deps: const []}) async {
+  var fs = new MemoryFileSystem(_defaultDir);
+  sources.forEach((name, data) {
+    var entity = fs.entityForUri(toTestUri(name));
+    if (data is String) {
+      entity.writeAsStringSync(data);
+    } else {
+      entity.writeAsBytesSync(data);
+    }
+  });
+  List<Uri> linkedDependencies = [
+    computePlatformBinariesLocation().resolve("dart2js_platform.dill"),
+  ]..addAll(deps.map(toTestUri));
+  fs.entityForUri(toTestUri('.packages')).writeAsStringSync('');
+  var options = new CompilerOptions()
+    ..target = new Dart2jsTarget("dart2js", new TargetFlags())
+    ..fileSystem = new TestFileSystem(fs)
+    ..linkedDependencies = linkedDependencies
+    ..packagesFileUri = toTestUri('.packages');
+  var inputUris = inputs.map(toTestUri).toList();
+  var inputUriSet = inputUris.toSet();
+  var component = await kernelForComponent(inputUris, options);
+  for (var lib in component.libraries) {
+    if (!inputUriSet.contains(lib.importUri)) {
+      component.root.getChildFromUri(lib.importUri).bindTo(lib.reference);
+      lib.computeCanonicalNames();
+    }
+  }
+  return serializeComponent(component,
+      filter: (Library lib) => inputUriSet.contains(lib.importUri));
+}
+
+Uri _defaultDir = Uri.parse('org-dartlang-test:///');
+
+Uri toTestUri(String relativePath) => _defaultDir.resolve(relativePath);
+
+class TestFileSystem implements FileSystem {
+  final MemoryFileSystem memory;
+  final FileSystem physical = StandardFileSystem.instance;
+
+  TestFileSystem(this.memory);
+
+  @override
+  FileSystemEntity entityForUri(Uri uri) {
+    if (uri.scheme == 'file') return physical.entityForUri(uri);
+    return memory.entityForUri(uri);
+  }
+}
+
+const sourceA = '''
+class A0 {
+  StringBuffer buffer = new StringBuffer();
+}
+''';
+
+const sourceB = '''
+import 'a0.dart';
+
+class B1 extends A0 {
+  A0 get foo => null;
+}
+
+A0 createA0() => new A0();
+''';
+
+const sourceC = '''
+import 'b1.dart';
+
+class C2 extends B1 {
+  final foo = createA0();
+}
+
+main() => print(new C2().foo.buffer.toString());
+''';
diff --git a/tests/compiler/dart2js/end_to_end/no_platform_test.dart b/tests/compiler/dart2js/end_to_end/no_platform_test.dart
new file mode 100644
index 0000000..c6c11da
--- /dev/null
+++ b/tests/compiler/dart2js/end_to_end/no_platform_test.dart
@@ -0,0 +1,42 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:async_helper/async_helper.dart';
+import 'package:expect/expect.dart';
+import 'package:compiler/src/kernel/dart2js_target.dart' show Dart2jsTarget;
+import 'package:kernel/ast.dart' as ir;
+import 'package:kernel/core_types.dart' as ir;
+import 'package:kernel/target/targets.dart' hide DiagnosticReporter;
+import 'package:front_end/src/api_prototype/standard_file_system.dart' as fe;
+import 'package:front_end/src/api_unstable/dart2js.dart' as fe;
+
+main() {
+  runTest(Map<fe.ExperimentalFlag, bool> experimentalFlags) async {
+    fe.InitializedCompilerState initializedCompilerState =
+        fe.initializeCompiler(
+            null,
+            new Dart2jsTarget('dart2js', new TargetFlags()),
+            Uri.base
+                .resolve('sdk/lib/libraries.json'), // librariesSpecificationUri
+            [], // linkedDependencies
+            Uri.base.resolve('.packages'), // packagesFileUri
+            experimentalFlags: experimentalFlags,
+            verify: true);
+    ir.Component component = await fe.compile(
+        initializedCompilerState, false, fe.StandardFileSystem.instance,
+        (fe.DiagnosticMessage message) {
+      message.plainTextFormatted.forEach(print);
+      Expect.notEquals(fe.Severity.error, message.severity);
+    },
+        Uri.base.resolve(
+            'tests/compiler/dart2js/end_to_end/data/hello_world.dart'));
+    Expect.isNotNull(new ir.CoreTypes(component).futureClass);
+  }
+
+  asyncTest(() async {
+    await runTest(const {});
+    await runTest(const {fe.ExperimentalFlag.constantUpdate2018: true});
+    await runTest(const {fe.ExperimentalFlag.spreadCollections: true});
+  });
+}
diff --git a/tests/compiler/dart2js/end_to_end/user_crash_test.dart b/tests/compiler/dart2js/end_to_end/user_crash_test.dart
index a17fbf2..1f21642 100644
--- a/tests/compiler/dart2js/end_to_end/user_crash_test.dart
+++ b/tests/compiler/dart2js/end_to_end/user_crash_test.dart
@@ -96,7 +96,9 @@
 }
 
 class CrashingMap implements Map<String, String> {
+  @override
   operator [](_) => throw EXCEPTION;
 
+  @override
   noSuchMethod(_) => null;
 }
diff --git a/tests/compiler/dart2js/equivalence/check_helpers.dart b/tests/compiler/dart2js/equivalence/check_helpers.dart
index cef161e..2465a58 100644
--- a/tests/compiler/dart2js/equivalence/check_helpers.dart
+++ b/tests/compiler/dart2js/equivalence/check_helpers.dart
@@ -53,6 +53,7 @@
     return ' $indent';
   }
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     printOn(sb, '');
diff --git a/tests/compiler/dart2js/equivalence/id_equivalence.dart b/tests/compiler/dart2js/equivalence/id_equivalence.dart
index 4d76541..c6beb4da 100644
--- a/tests/compiler/dart2js/equivalence/id_equivalence.dart
+++ b/tests/compiler/dart2js/equivalence/id_equivalence.dart
@@ -34,14 +34,17 @@
 
   const IdValue(this.id, this.value);
 
+  @override
   int get hashCode => id.hashCode * 13 + value.hashCode * 17;
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! IdValue) return false;
     return id == other.id && value == other.value;
   }
 
+  @override
   String toString() => idToString(id, value);
 
   static String idToString(Id id, String value) {
@@ -131,6 +134,7 @@
 class ElementId implements Id {
   final String className;
   final String memberName;
+  @override
   final bool isGlobal;
 
   factory ElementId(String text, {bool isGlobal: false}) {
@@ -145,44 +149,55 @@
 
   ElementId.internal(this.memberName, {this.className, this.isGlobal: false});
 
+  @override
   int get hashCode => className.hashCode * 13 + memberName.hashCode * 17;
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! ElementId) return false;
     return className == other.className && memberName == other.memberName;
   }
 
+  @override
   IdKind get kind => IdKind.element;
 
   String get name => className != null ? '$className.$memberName' : memberName;
 
+  @override
   String get descriptor => 'member $name';
 
+  @override
   String toString() => 'element:$name';
 }
 
 /// Id for a class.
 class ClassId implements Id {
   final String className;
+  @override
   final bool isGlobal;
 
   ClassId(this.className, {this.isGlobal: false});
 
+  @override
   int get hashCode => className.hashCode * 13;
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! ClassId) return false;
     return className == other.className;
   }
 
+  @override
   IdKind get kind => IdKind.cls;
 
   String get name => className;
 
+  @override
   String get descriptor => 'class $name';
 
+  @override
   String toString() => 'class:$name';
 }
 
@@ -190,22 +205,28 @@
 // TODO(johnniwinther): Create an [NodeId]-based equivalence with the kernel IR.
 class NodeId implements Id {
   final int value;
+  @override
   final IdKind kind;
 
   const NodeId(this.value, this.kind);
 
+  @override
   bool get isGlobal => false;
 
+  @override
   int get hashCode => value.hashCode * 13 + kind.hashCode * 17;
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! NodeId) return false;
     return value == other.value && kind == other.kind;
   }
 
+  @override
   String get descriptor => 'offset $value ($kind)';
 
+  @override
   String toString() => '$kind:$value';
 }
 
@@ -230,6 +251,7 @@
     return 'object `${'$object'.replaceAll('\n', '')}` (${object.runtimeType})';
   }
 
+  @override
   String toString() =>
       'ActualData(id=$id,value=$value,sourceSpan=$sourceSpan,object=$objectText)';
 }
@@ -272,7 +294,9 @@
 /// Abstract IR visitor for computing data corresponding to a node or element,
 /// and record it with a generic [Id]
 abstract class IrDataExtractor<T> extends ir.Visitor with DataRegistry<T> {
+  @override
   final DiagnosticReporter reporter;
+  @override
   final Map<Id, ActualData<T>> actualMap;
 
   /// Implement this to compute the data corresponding to [member].
@@ -352,15 +376,18 @@
     root.accept(this);
   }
 
+  @override
   defaultNode(ir.Node node) {
     node.visitChildren(this);
   }
 
+  @override
   defaultMember(ir.Member node) {
-    computeForMember(node);
     super.defaultMember(node);
+    computeForMember(node);
   }
 
+  @override
   visitMethodInvocation(ir.MethodInvocation node) {
     ir.TreeNode receiver = node.receiver;
     if (receiver is ir.VariableGet &&
@@ -384,15 +411,18 @@
     }
   }
 
+  @override
   visitLoadLibrary(ir.LoadLibrary node) {
     computeForNode(node, createInvokeId(node));
   }
 
+  @override
   visitPropertyGet(ir.PropertyGet node) {
     computeForNode(node, computeDefaultNodeId(node));
     super.visitPropertyGet(node);
   }
 
+  @override
   visitVariableDeclaration(ir.VariableDeclaration node) {
     if (node.name != null && node.parent is! ir.FunctionDeclaration) {
       // Skip synthetic variables and function declaration variables.
@@ -401,16 +431,19 @@
     super.visitVariableDeclaration(node);
   }
 
+  @override
   visitFunctionDeclaration(ir.FunctionDeclaration node) {
     computeForNode(node, computeDefaultNodeId(node));
     super.visitFunctionDeclaration(node);
   }
 
+  @override
   visitFunctionExpression(ir.FunctionExpression node) {
     computeForNode(node, computeDefaultNodeId(node));
     super.visitFunctionExpression(node);
   }
 
+  @override
   visitVariableGet(ir.VariableGet node) {
     if (node.variable.name != null && !node.variable.isFieldFormal) {
       // Skip use of synthetic variables.
@@ -419,11 +452,13 @@
     super.visitVariableGet(node);
   }
 
+  @override
   visitPropertySet(ir.PropertySet node) {
     computeForNode(node, createUpdateId(node));
     super.visitPropertySet(node);
   }
 
+  @override
   visitVariableSet(ir.VariableSet node) {
     if (node.variable.name != null) {
       // Skip use of synthetic variables.
@@ -432,16 +467,19 @@
     super.visitVariableSet(node);
   }
 
+  @override
   visitDoStatement(ir.DoStatement node) {
     computeForNode(node, createLoopId(node));
     super.visitDoStatement(node);
   }
 
+  @override
   visitForStatement(ir.ForStatement node) {
     computeForNode(node, createLoopId(node));
     super.visitForStatement(node);
   }
 
+  @override
   visitForInStatement(ir.ForInStatement node) {
     computeForNode(node, createLoopId(node));
     computeForNode(node, createIteratorId(node));
@@ -450,11 +488,13 @@
     super.visitForInStatement(node);
   }
 
+  @override
   visitWhileStatement(ir.WhileStatement node) {
     computeForNode(node, createLoopId(node));
     super.visitWhileStatement(node);
   }
 
+  @override
   visitLabeledStatement(ir.LabeledStatement node) {
     if (!JumpVisitor.canBeBreakTarget(node.body) &&
         !JumpVisitor.canBeContinueTarget(node.parent)) {
@@ -463,16 +503,19 @@
     super.visitLabeledStatement(node);
   }
 
+  @override
   visitBreakStatement(ir.BreakStatement node) {
     computeForNode(node, createGotoId(node));
     super.visitBreakStatement(node);
   }
 
+  @override
   visitSwitchStatement(ir.SwitchStatement node) {
     computeForNode(node, createSwitchId(node));
     super.visitSwitchStatement(node);
   }
 
+  @override
   visitSwitchCase(ir.SwitchCase node) {
     if (node.expressionOffsets.isNotEmpty) {
       computeForNode(node, createSwitchCaseId(node));
@@ -480,6 +523,7 @@
     super.visitSwitchCase(node);
   }
 
+  @override
   visitContinueSwitchStatement(ir.ContinueSwitchStatement node) {
     computeForNode(node, createGotoId(node));
     super.visitContinueSwitchStatement(node);
diff --git a/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart b/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart
index 5369eb2..75f2163 100644
--- a/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart
+++ b/tests/compiler/dart2js/equivalence/id_equivalence_helper.dart
@@ -129,15 +129,12 @@
       .reportErrorMessage(spannable, MessageKind.GENERIC, {'text': message});
 }
 
-/// Display name used for compilation using the new common frontend.
-const String kernelName = 'kernel';
-
 /// Display name used for strong mode compilation using the new common frontend.
 const String strongName = 'strong mode';
 
 /// Display name used for strong mode compilation without implicit checks using
 /// the new common frontend.
-const String trustName = 'strong mode without implicit checks';
+const String omitName = 'strong mode without implicit checks';
 
 /// Compute actual data for all members defined in the program with the
 /// [entryPoint] and [memorySourceFiles].
@@ -190,7 +187,7 @@
     return actualMaps.putIfAbsent(uri, () => <Id, ActualData<T>>{});
   }
 
-  void processMember(MemberEntity member, Map<Id, ActualData> actualMap) {
+  void processMember(MemberEntity member, Map<Id, ActualData<T>> actualMap) {
     if (member.isAbstract) {
       return;
     }
@@ -319,7 +316,7 @@
   Map<int, List<String>> computeAnnotations(Uri uri) {
     Map<Id, ActualData<T>> thisMap = actualMaps[uri];
     Map<int, List<String>> annotations = <int, List<String>>{};
-    thisMap.forEach((Id id, ActualData data1) {
+    thisMap.forEach((Id id, ActualData<T> data1) {
       String value1 = '${data1.value}';
       annotations
           .putIfAbsent(data1.offset, () => [])
@@ -332,8 +329,8 @@
       Map<Id, ActualData<T>> thisMap, Map<Id, ActualData<T>> otherMap, Uri uri,
       {bool includeMatches: false}) {
     Map<int, List<String>> annotations = <int, List<String>>{};
-    thisMap.forEach((Id id, ActualData data1) {
-      ActualData data2 = otherMap[id];
+    thisMap.forEach((Id id, ActualData<T> data1) {
+      ActualData<T> data2 = otherMap[id];
       String value1 = '${data1.value}';
       if (data1.value != data2?.value) {
         String value2 = '${data2?.value ?? '---'}';
@@ -346,7 +343,7 @@
             .add(colorizeMatch(value1));
       }
     });
-    otherMap.forEach((Id id, ActualData data2) {
+    otherMap.forEach((Id id, ActualData<T> data2) {
       if (!thisMap.containsKey(id)) {
         String value1 = '---';
         String value2 = '${data2.value}';
@@ -398,11 +395,11 @@
   Compiler get compiler => _compiledData.compiler;
   ElementEnvironment get elementEnvironment => _compiledData.elementEnvironment;
   Uri get mainUri => _compiledData.mainUri;
-  MemberAnnotations<ActualData> get actualMaps => _actualMaps;
+  MemberAnnotations<ActualData<T>> get actualMaps => _actualMaps;
 
   String actualCode(Uri uri) {
     Map<int, List<String>> annotations = <int, List<String>>{};
-    actualMaps[uri].forEach((Id id, ActualData data) {
+    actualMaps[uri].forEach((Id id, ActualData<T> data) {
       annotations
           .putIfAbsent(data.sourceSpan.begin, () => [])
           .add('${data.value}');
@@ -412,7 +409,7 @@
 
   String diffCode(Uri uri, DataInterpreter<T> dataValidator) {
     Map<int, List<String>> annotations = <int, List<String>>{};
-    actualMaps[uri].forEach((Id id, ActualData data) {
+    actualMaps[uri].forEach((Id id, ActualData<T> data) {
       IdValue expectedValue = expectedMaps[uri][id];
       T actualValue = data.value;
       String unexpectedMessage =
@@ -421,21 +418,25 @@
         String expected = expectedValue?.toString() ?? '';
         String actual = dataValidator.getText(actualValue);
         int offset = getOffsetFromId(id, uri);
-        String value1 = '${expected}';
-        String value2 = IdValue.idToString(id, '${actual}');
-        annotations
-            .putIfAbsent(offset, () => [])
-            .add(colorizeDiff(value1, ' | ', value2));
+        if (offset != null) {
+          String value1 = '${expected}';
+          String value2 = IdValue.idToString(id, '${actual}');
+          annotations
+              .putIfAbsent(offset, () => [])
+              .add(colorizeDiff(value1, ' | ', value2));
+        }
       }
     });
     expectedMaps[uri].forEach((Id id, IdValue expected) {
       if (!actualMaps[uri].containsKey(id)) {
         int offset = getOffsetFromId(id, uri);
-        String value1 = '${expected}';
-        String value2 = '---';
-        annotations
-            .putIfAbsent(offset, () => [])
-            .add(colorizeDiff(value1, ' | ', value2));
+        if (offset != null) {
+          String value1 = '${expected}';
+          String value2 = '---';
+          annotations
+              .putIfAbsent(offset, () => [])
+              .add(colorizeDiff(value1, ' | ', value2));
+        }
       }
     });
     return withAnnotations(code[uri].sourceCode, annotations);
@@ -444,7 +445,7 @@
   int getOffsetFromId(Id id, Uri uri) {
     return compiler.reporter
         .spanFromSpannable(computeSpannable(elementEnvironment, uri, id))
-        .begin;
+        ?.begin;
   }
 }
 
@@ -476,6 +477,7 @@
     return _computedDataForEachFile[file];
   }
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write('MemberAnnotations(');
@@ -529,6 +531,7 @@
     int shards: 1,
     int shardIndex: 0,
     bool testOmit: true,
+    bool testCFEConstants: false,
     void onTest(Uri uri)}) async {
   dataComputer.setup();
 
@@ -578,6 +581,8 @@
     Map<String, MemberAnnotations<IdValue>> expectedMaps = {
       strongMarker: new MemberAnnotations<IdValue>(),
       omitMarker: new MemberAnnotations<IdValue>(),
+      strongConstMarker: new MemberAnnotations<IdValue>(),
+      omitConstMarker: new MemberAnnotations<IdValue>(),
     };
     computeExpectedMap(entryPoint, code[entryPoint], expectedMaps);
     Map<String, String> memorySourceFiles = {
@@ -606,51 +611,79 @@
 
     if (setUpFunction != null) setUpFunction();
 
-    if (skipForStrong.contains(name)) {
-      print('--skipped for kernel (strong mode)----------------------------');
-    } else {
-      print('--from kernel (strong mode)-----------------------------------');
-      List<String> options = new List<String>.from(testOptions);
-      MemberAnnotations<IdValue> annotations = expectedMaps[strongMarker];
-      CompiledData<T> compiledData2 = await computeData(
-          entryPoint, memorySourceFiles, dataComputer,
-          options: options,
-          verbose: verbose,
-          printCode: printCode,
-          testFrontend: testFrontend,
-          forUserLibrariesOnly: forUserLibrariesOnly,
-          globalIds: annotations.globalData.keys);
-      if (await checkCode(strongName, entity.uri, code, annotations,
-          compiledData2, dataComputer.dataValidator,
-          filterActualData: filterActualData,
-          fatalErrors: !testAfterFailures)) {
-        hasFailures = true;
-      }
-    }
-    if (testOmit) {
+    Future runTests({bool useCFEConstants: false}) async {
       if (skipForStrong.contains(name)) {
-        print('--skipped for kernel (strong mode, omit-implicit-checks)------');
+        print('--skipped for kernel (strong mode)----------------------------');
       } else {
-        print('--from kernel (strong mode, omit-implicit-checks)-------------');
-        List<String> options = [
-          Flags.omitImplicitChecks,
-          Flags.laxRuntimeTypeToString
-        ]..addAll(testOptions);
-        MemberAnnotations<IdValue> annotations = expectedMaps[omitMarker];
+        print('--from kernel (strong mode)-----------------------------------');
+        List<String> options = new List<String>.from(testOptions);
+        String marker = strongMarker;
+        if (useCFEConstants) {
+          marker = strongConstMarker;
+          options
+              .add('${Flags.enableLanguageExperiments}=constant-update-2018');
+        } else {
+          options.add(
+              '${Flags.enableLanguageExperiments}=no-constant-update-2018');
+        }
+        MemberAnnotations<IdValue> annotations = expectedMaps[marker];
         CompiledData<T> compiledData2 = await computeData(
             entryPoint, memorySourceFiles, dataComputer,
             options: options,
             verbose: verbose,
+            printCode: printCode,
             testFrontend: testFrontend,
             forUserLibrariesOnly: forUserLibrariesOnly,
             globalIds: annotations.globalData.keys);
-        if (await checkCode(trustName, entity.uri, code, annotations,
+        if (await checkCode(strongName, entity.uri, code, annotations,
             compiledData2, dataComputer.dataValidator,
             filterActualData: filterActualData,
             fatalErrors: !testAfterFailures)) {
           hasFailures = true;
         }
       }
+      if (testOmit) {
+        if (skipForStrong.contains(name)) {
+          print(
+              '--skipped for kernel (strong mode, omit-implicit-checks)------');
+        } else {
+          print(
+              '--from kernel (strong mode, omit-implicit-checks)-------------');
+          List<String> options = [
+            Flags.omitImplicitChecks,
+            Flags.laxRuntimeTypeToString
+          ]..addAll(testOptions);
+          String marker = omitMarker;
+          if (useCFEConstants) {
+            marker = omitConstMarker;
+            options
+                .add('${Flags.enableLanguageExperiments}=constant-update-2018');
+          } else {
+            options.add(
+                '${Flags.enableLanguageExperiments}=no-constant-update-2018');
+          }
+          MemberAnnotations<IdValue> annotations = expectedMaps[marker];
+          CompiledData<T> compiledData2 = await computeData(
+              entryPoint, memorySourceFiles, dataComputer,
+              options: options,
+              verbose: verbose,
+              testFrontend: testFrontend,
+              forUserLibrariesOnly: forUserLibrariesOnly,
+              globalIds: annotations.globalData.keys);
+          if (await checkCode(omitName, entity.uri, code, annotations,
+              compiledData2, dataComputer.dataValidator,
+              filterActualData: filterActualData,
+              fatalErrors: !testAfterFailures)) {
+            hasFailures = true;
+          }
+        }
+      }
+    }
+
+    await runTests();
+    if (testCFEConstants) {
+      print('--use cfe constants---------------------------------------------');
+      await runTests(useCFEConstants: true);
     }
   }
   Expect.isFalse(hasFailures, 'Errors found.');
@@ -712,9 +745,18 @@
       Features expectedFeatures = Features.fromText(expectedData);
       Set<String> validatedFeatures = new Set<String>();
       expectedFeatures.forEach((String key, Object expectedValue) {
+        bool expectMatch = true;
+        if (key.startsWith('!')) {
+          key = key.substring(1);
+          expectMatch = false;
+        }
         validatedFeatures.add(key);
         Object actualValue = actualFeatures[key];
-        if (!actualFeatures.containsKey(key)) {
+        if (!expectMatch) {
+          if (actualFeatures.containsKey(key)) {
+            errorsFound.add('Unexpected data found for $key=$actualValue');
+          }
+        } else if (!actualFeatures.containsKey(key)) {
           errorsFound.add('No data found for $key');
         } else if (expectedValue == '') {
           if (actualValue != '') {
@@ -856,13 +898,14 @@
     }
   }
 
-  data.actualMaps.forEach((Uri uri, Map<Id, ActualData> actualMap) {
+  data.actualMaps.forEach((Uri uri, Map<Id, ActualData<T>> actualMap) {
     checkActualMap(actualMap, data.expectedMaps[uri], uri);
   });
   checkActualMap(data.actualMaps.globalData, data.expectedMaps.globalData);
 
   Set<Id> missingIds = new Set<Id>();
-  void checkMissing(Map<Id, IdValue> expectedMap, Map<Id, ActualData> actualMap,
+  void checkMissing(
+      Map<Id, IdValue> expectedMap, Map<Id, ActualData<T>> actualMap,
       [Uri uri]) {
     expectedMap.forEach((Id id, IdValue expected) {
       if (!actualMap.containsKey(id)) {
@@ -915,10 +958,11 @@
     }
     LibraryEntity library = elementEnvironment.lookupLibrary(mainUri);
     if (id.className != null) {
-      ClassEntity cls =
-          elementEnvironment.lookupClass(library, id.className, required: true);
+      ClassEntity cls = elementEnvironment.lookupClass(library, id.className);
       if (cls == null) {
-        throw new ArgumentError("No class '${id.className}' in $mainUri.");
+        // Constant expression in CFE might remove inlined parts of sources.
+        print("No class '${id.className}' in $mainUri.");
+        return NO_LOCATION_SPANNABLE;
       }
       MemberEntity member = elementEnvironment
           .lookupClassMember(cls, memberName, setter: isSetter);
@@ -926,7 +970,9 @@
         ConstructorEntity constructor =
             elementEnvironment.lookupConstructor(cls, memberName);
         if (constructor == null) {
-          throw new ArgumentError("No class member '${memberName}' in $cls.");
+          // Constant expression in CFE might remove inlined parts of sources.
+          print("No class member '${memberName}' in $cls.");
+          return NO_LOCATION_SPANNABLE;
         }
         return constructor;
       }
@@ -935,16 +981,19 @@
       MemberEntity member = elementEnvironment
           .lookupLibraryMember(library, memberName, setter: isSetter);
       if (member == null) {
-        throw new ArgumentError("No member '${memberName}' in $mainUri.");
+        // Constant expression in CFE might remove inlined parts of sources.
+        print("No member '${memberName}' in $mainUri.");
+        return NO_LOCATION_SPANNABLE;
       }
       return member;
     }
   } else if (id is ClassId) {
     LibraryEntity library = elementEnvironment.lookupLibrary(mainUri);
-    ClassEntity cls =
-        elementEnvironment.lookupClass(library, id.className, required: true);
+    ClassEntity cls = elementEnvironment.lookupClass(library, id.className);
     if (cls == null) {
-      throw new ArgumentError("No class '${id.className}' in $mainUri.");
+      // Constant expression in CFE might remove inlined parts of sources.
+      print("No class '${id.className}' in $mainUri.");
+      return NO_LOCATION_SPANNABLE;
     }
     return cls;
   }
@@ -953,6 +1002,8 @@
 
 const String strongMarker = 'strong.';
 const String omitMarker = 'omit.';
+const String strongConstMarker = 'strongConst.';
+const String omitConstMarker = 'omitConst.';
 
 /// Compute three [MemberAnnotations] objects from [code] specifying the
 /// expected annotations we anticipate encountering; one corresponding to the
@@ -969,7 +1020,7 @@
 /// annotations without prefixes.
 void computeExpectedMap(Uri sourceUri, AnnotatedCode code,
     Map<String, MemberAnnotations<IdValue>> maps) {
-  List<String> mapKeys = [strongMarker, omitMarker];
+  List<String> mapKeys = maps.keys.toList();
   Map<String, AnnotatedCode> split = splitByPrefixes(code, mapKeys);
 
   split.forEach((String marker, AnnotatedCode code) {
diff --git a/tests/compiler/dart2js/equivalence/show_helper.dart b/tests/compiler/dart2js/equivalence/show_helper.dart
index 0e1c800..c1bbe3f 100644
--- a/tests/compiler/dart2js/equivalence/show_helper.dart
+++ b/tests/compiler/dart2js/equivalence/show_helper.dart
@@ -23,7 +23,7 @@
   return argParser;
 }
 
-show(ArgResults argResults, DataComputer dataComputer,
+show<T>(ArgResults argResults, DataComputer<T> dataComputer,
     {bool testFrontend: false, List<String> options: const <String>[]}) async {
   dataComputer.setup();
 
@@ -48,7 +48,8 @@
   if (omitImplicitChecks) {
     options.add(Flags.omitImplicitChecks);
   }
-  CompiledData data = await computeData(entryPoint, const {}, dataComputer,
+  CompiledData<T> data = await computeData<T>(
+      entryPoint, const {}, dataComputer,
       options: options,
       testFrontend: testFrontend,
       forUserLibrariesOnly: false,
diff --git a/tests/compiler/dart2js/field_analysis/jdata/constant_fields.dart b/tests/compiler/dart2js/field_analysis/jdata/constant_fields.dart
new file mode 100644
index 0000000..d85a4a0
--- /dev/null
+++ b/tests/compiler/dart2js/field_analysis/jdata/constant_fields.dart
@@ -0,0 +1,30 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+main() {
+  print(const Class1().field1);
+  print(const Class2(field2: true).field2);
+  print(const Class3().field3);
+  print(const Class3(field3: true).field3);
+}
+
+class Class1 {
+  /*element: Class1.field1:constant=BoolConstant(false)*/
+  final bool field1;
+
+  const Class1({this.field1: false});
+}
+
+class Class2 {
+  /*strongConst.element: Class2.field2:constant=BoolConstant(true)*/
+  final bool field2;
+
+  const Class2({this.field2: false});
+}
+
+class Class3 {
+  final bool field3;
+
+  const Class3({this.field3: false});
+}
diff --git a/tests/compiler/dart2js/field_analysis/jdata/dynamic_set.dart b/tests/compiler/dart2js/field_analysis/jdata/dynamic_set.dart
new file mode 100644
index 0000000..b228203
--- /dev/null
+++ b/tests/compiler/dart2js/field_analysis/jdata/dynamic_set.dart
@@ -0,0 +1,63 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+main() {
+  method1(new Class1a());
+  method2(new Class2a<int>());
+  method3(new Class3a());
+  method3(new Class3b());
+  method4(new Class4a());
+  method4(new Class4b());
+}
+
+class Class1a {
+  /*element: Class1a.field1:elided*/
+  int field1;
+}
+
+@pragma('dart2js:noInline')
+method1(dynamic c) {
+  c.field1 = 42;
+}
+
+class Class2a<T> {
+  /*element: Class2a.field2:elided*/
+  T field2;
+}
+
+@pragma('dart2js:noInline')
+method2(dynamic c) {
+  c.field2 = 42;
+}
+
+class Class3a {
+  /*element: Class3a.field3:elided*/
+  int field3;
+}
+
+class Class3b {
+  /*element: Class3b.field3:elided*/
+  int field3;
+}
+
+@pragma('dart2js:noInline')
+method3(dynamic c) {
+  c.field3 = 42;
+}
+
+class Class4a {
+  /*element: Class4a.field4:elided*/
+  int field4;
+}
+
+class Class4b implements Class4a {
+  /*element: Class4b.field4:elided*/
+  @override
+  int field4;
+}
+
+@pragma('dart2js:noInline')
+method4(Class4a c) {
+  c.field4 = 42;
+}
diff --git a/tests/compiler/dart2js/field_analysis/jdata/effectively_constant_state.dart b/tests/compiler/dart2js/field_analysis/jdata/effectively_constant_state.dart
new file mode 100644
index 0000000..27a4a61
--- /dev/null
+++ b/tests/compiler/dart2js/field_analysis/jdata/effectively_constant_state.dart
@@ -0,0 +1,87 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+enum Enum {
+  /*strong.element: Enum.a:constant=ConstructedConstant(Enum(_name=StringConstant("Enum.a"),index=IntConstant(0)))*/
+  a,
+
+  /*strong.element: Enum.b:constant=ConstructedConstant(Enum(_name=StringConstant("Enum.b"),index=IntConstant(1)))*/
+  b,
+
+  /*strong.element: Enum.c:constant=ConstructedConstant(Enum(_name=StringConstant("Enum.c"),index=IntConstant(2)))*/
+  c,
+}
+
+@pragma('dart2js:noInline')
+tester1() {}
+
+@pragma('dart2js:noInline')
+tester2() {}
+
+@pragma('dart2js:noInline')
+tester3() {}
+
+class Class {
+  /*element: Class.state1:constant=IntConstant(1)*/
+  final int state1;
+
+  /*element: Class.state2:constant=ConstructedConstant(Enum(_name=StringConstant("Enum.c"),index=IntConstant(2)))*/
+  final Enum state2;
+
+  Class({this.state1: 1, this.state2: Enum.c});
+
+  @pragma('dart2js:noInline')
+  method1a() {
+    if (state1 == 0) {
+      return tester1();
+    } else if (state1 == 1) {
+      return tester2();
+    } else if (state1 == 2) {
+      return tester3();
+    }
+  }
+
+  @pragma('dart2js:noInline')
+  method1b() {
+    switch (state1) {
+      case 0:
+        return tester1();
+      case 1:
+        return tester2();
+      case 2:
+        return tester3();
+    }
+  }
+
+  @pragma('dart2js:noInline')
+  method2a() {
+    if (state2 == Enum.a) {
+      return tester1();
+    } else if (state2 == Enum.b) {
+      return tester2();
+    } else if (state2 == Enum.c) {
+      return tester3();
+    }
+  }
+
+  @pragma('dart2js:noInline')
+  method2b() {
+    switch (state2) {
+      case Enum.a:
+        return tester1();
+      case Enum.b:
+        return tester2();
+      case Enum.c:
+        return tester3();
+    }
+  }
+}
+
+main() {
+  var c = new Class();
+  c.method1a();
+  c.method1b();
+  c.method2a();
+  c.method2b();
+}
diff --git a/tests/compiler/dart2js/field_analysis/jdata/multi_initializers.dart b/tests/compiler/dart2js/field_analysis/jdata/multi_initializers.dart
new file mode 100644
index 0000000..d6120a4
--- /dev/null
+++ b/tests/compiler/dart2js/field_analysis/jdata/multi_initializers.dart
@@ -0,0 +1,58 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+main() {
+  var c = new Class1.a();
+  c.field3a = null;
+  c.field4a = null;
+  c.field5a = null;
+  new Class1.b();
+
+  print(c.field1);
+  print(c.field2);
+  print(c.field3a);
+  print(c.field3b);
+  print(c.field4a);
+  print(c.field4b);
+  print(c.field5a);
+  print(c.field5b);
+}
+
+class Class1 {
+  var field1 = 0;
+  var field2;
+
+  /*element: Class1.field3a:allocator,initial=IntConstant(3)*/
+  var field3a;
+
+  /*element: Class1.field3b:constant=IntConstant(3)*/
+  var field3b;
+
+  /*element: Class1.field4a:allocator,initial=IntConstant(4)*/
+  var field4a = 4;
+
+  /*element: Class1.field4b:constant=IntConstant(4)*/
+  var field4b = 4;
+
+  /*element: Class1.field5a:allocator,initial=IntConstant(5)*/
+  var field5a = 5;
+
+  /*element: Class1.field5b:constant=IntConstant(5)*/
+  var field5b = 5;
+
+  Class1.a()
+      : field1 = 1,
+        field2 = 1,
+        field3a = 3,
+        field3b = 3,
+        field5a = 5,
+        field5b = 5;
+
+  Class1.b()
+      : field2 = 2,
+        field3a = 3,
+        field3b = 3,
+        field5a = 5,
+        field5b = 5;
+}
diff --git a/tests/compiler/dart2js/field_analysis/jdata/optional_parameters.dart b/tests/compiler/dart2js/field_analysis/jdata/optional_parameters.dart
new file mode 100644
index 0000000..715a521
--- /dev/null
+++ b/tests/compiler/dart2js/field_analysis/jdata/optional_parameters.dart
@@ -0,0 +1,87 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+main() {
+  var c1a = new Class1a(0);
+  new Class1a(0, 1);
+  c1a.field1 = null;
+  c1a.field2 = null;
+  c1a.field3 = null;
+  print(c1a.field1);
+  print(c1a.field2);
+  print(c1a.field3);
+
+  var c1b = new Class1b(0);
+  new Class1b(0, 1);
+  print(c1b.field1);
+  print(c1b.field2);
+  print(c1b.field3);
+
+  var c2a = new Class2a(0);
+  new Class2a(0, field2: 1);
+  c2a.field1 = null;
+  c2a.field2 = null;
+  c2a.field3 = null;
+  print(c2a.field1);
+  print(c2a.field2);
+  print(c2a.field3);
+
+  var c2b = new Class2b(0);
+  new Class2b(0, field2: 1);
+  print(c2b.field1);
+  print(c2b.field2);
+  print(c2b.field3);
+}
+
+class Class1a {
+  /*element: Class1a.field1:*/
+  var field1;
+
+  /*element: Class1a.field2:*/
+  var field2;
+
+  /*element: Class1a.field3:allocator,initial=IntConstant(3)*/
+  var field3;
+
+  Class1a(this.field1, [this.field2 = 2, this.field3 = 3]);
+}
+
+class Class1b {
+  /*element: Class1b.field1:*/
+  var field1;
+
+  /*element: Class1b.field2:*/
+  var field2;
+
+  /*element: Class1b.field3:constant=IntConstant(3)*/
+  var field3;
+
+  Class1b(this.field1, [this.field2 = 2, this.field3 = 3]);
+}
+
+class Class2a {
+  /*element: Class2a.field1:*/
+  var field1;
+
+  /*element: Class2a.field2:*/
+  var field2;
+
+  /*element: Class2a.field3:allocator,initial=IntConstant(3)*/
+  var field3;
+
+  Class2a(this.field1, {this.field2 = 2, this.field3 = 3});
+}
+
+class Class2b {
+  /*element: Class2b.field1:*/
+  var field1;
+
+  /*element: Class2b.field2:*/
+  var field2;
+
+  /*element: Class2b.field3:constant=IntConstant(3)*/
+  var field3;
+
+  Class2b(this.field1, {this.field2 = 2, this.field3 = 3});
+}
diff --git a/tests/compiler/dart2js/field_analysis/jdata/regress_36222.dart b/tests/compiler/dart2js/field_analysis/jdata/regress_36222.dart
new file mode 100644
index 0000000..d798780
--- /dev/null
+++ b/tests/compiler/dart2js/field_analysis/jdata/regress_36222.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+typedef int BinaryFunc(int x, int y);
+
+class A {
+  const A({this.foo = A.defaultFoo});
+
+  static int defaultFoo(int x, int y) {
+    return x + y;
+  }
+
+  /*element: A.foo:constant=FunctionConstant(A.defaultFoo)*/
+  final BinaryFunc foo;
+}
+
+@pragma('dart2js:assumeDynamic')
+@pragma('dart2js:noInline')
+test(dynamic a) => a.foo(1, 2);
+
+main() {
+  test(new A());
+}
diff --git a/tests/compiler/dart2js/field_analysis/jdata/simple_initializers.dart b/tests/compiler/dart2js/field_analysis/jdata/simple_initializers.dart
new file mode 100644
index 0000000..a04f242
--- /dev/null
+++ b/tests/compiler/dart2js/field_analysis/jdata/simple_initializers.dart
@@ -0,0 +1,339 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+main() {
+  use1(new Class1());
+  use2(new Class2());
+}
+
+@pragma('dart2js:noInline')
+use(Object o) {
+  print(o);
+}
+
+@pragma('dart2js:noInline')
+use1(Class1 c1) {
+  c1.field0a = null;
+  c1.field1a = null;
+  c1.field2a = null;
+  c1.field3a = null;
+  c1.field4a = null;
+  c1.field5a = null;
+  c1.field6a = null;
+  c1.field7a = null;
+  c1.field8a = null;
+  c1.field9a = null;
+  c1.field9c = null;
+  c1.field10a = null;
+  c1.field10c = null;
+  c1.field11a = null;
+  c1.field12a = null;
+  c1.field13a = null;
+  use(c1.field0a);
+  use(c1.field0b);
+  use(c1.field1a);
+  use(c1.field1b);
+  use(c1.field2a);
+  use(c1.field2b);
+  use(c1.field3a);
+  use(c1.field3b);
+  use(c1.field4a);
+  use(c1.field4b);
+  use(c1.field5a);
+  use(c1.field5b);
+  use(c1.field6a);
+  use(c1.field6b);
+  use(c1.field7a);
+  use(c1.field7b);
+  use(c1.field8a);
+  use(c1.field8b);
+  use(c1.field9a);
+  use(c1.field9b);
+  use(c1.field9c);
+  use(c1.field9d);
+  use(c1.field10a);
+  use(c1.field10b);
+  use(c1.field10c);
+  use(c1.field10d);
+  use(c1.field11a);
+  use(c1.field11b);
+  use(c1.field12a);
+  use(c1.field12b);
+  use(c1.field13a);
+  use(c1.field13b);
+}
+
+@pragma('dart2js:noInline')
+use2(Class2 c2) {
+  c2.field1a = null;
+  c2.field2a = null;
+  c2.field3a = null;
+  c2.field4a = null;
+  c2.field5a = null;
+  c2.field6a = null;
+  c2.field7a = null;
+  c2.field8a = null;
+  c2.field9a = null;
+  c2.field9c = null;
+  c2.field10a = null;
+  c2.field10c = null;
+  c2.field11a = null;
+  c2.field12a = null;
+  c2.field13a = null;
+  use(c2.field1a);
+  use(c2.field1b);
+  use(c2.field2a);
+  use(c2.field2b);
+  use(c2.field3a);
+  use(c2.field3b);
+  use(c2.field4a);
+  use(c2.field4b);
+  use(c2.field5a);
+  use(c2.field5b);
+  use(c2.field6a);
+  use(c2.field6b);
+  use(c2.field7a);
+  use(c2.field7b);
+  use(c2.field8a);
+  use(c2.field8b);
+  use(c2.field9a);
+  use(c2.field9b);
+  use(c2.field9c);
+  use(c2.field9d);
+  use(c2.field10a);
+  use(c2.field10b);
+  use(c2.field10c);
+  use(c2.field10d);
+  use(c2.field11a);
+  use(c2.field11b);
+  use(c2.field12a);
+  use(c2.field12b);
+  use(c2.field13a);
+  use(c2.field13b);
+}
+
+/*strong.element: const1:constant=BoolConstant(true)*/
+const bool const1 = true;
+
+class Class1 {
+  /*element: Class1.field0a:allocator,initial=NullConstant*/
+  var field0a;
+
+  /*element: Class1.field0b:constant=NullConstant*/
+  var field0b;
+
+  /*element: Class1.field1a:allocator,initial=NullConstant*/
+  var field1a = null;
+
+  /*element: Class1.field1b:constant=NullConstant*/
+  var field1b = null;
+
+  /*element: Class1.field2a:allocator,initial=BoolConstant(true)*/
+  var field2a = true;
+
+  /*element: Class1.field2b:constant=BoolConstant(true)*/
+  var field2b = true;
+
+  /*element: Class1.field3a:allocator,initial=BoolConstant(false)*/
+  var field3a = false;
+
+  /*element: Class1.field3b:constant=BoolConstant(false)*/
+  var field3b = false;
+
+  /*element: Class1.field4a:allocator,initial=IntConstant(0)*/
+  var field4a = 0;
+
+  /*element: Class1.field4b:constant=IntConstant(0)*/
+  var field4b = 0;
+
+  /*element: Class1.field5a:allocator,initial=IntConstant(1)*/
+  var field5a = 1;
+
+  /*element: Class1.field5b:constant=IntConstant(1)*/
+  var field5b = 1;
+
+  /*element: Class1.field6a:allocator,initial=StringConstant("")*/
+  var field6a = '';
+
+  /*element: Class1.field6b:constant=StringConstant("")*/
+  var field6b = '';
+
+  /*element: Class1.field7a:allocator,initial=StringConstant("foo")*/
+  var field7a = 'foo';
+
+  /*element: Class1.field7b:constant=StringConstant("foo")*/
+  var field7b = 'foo';
+
+  /*element: Class1.field8a:initial=DoubleConstant(0.5)*/
+  var field8a = 0.5;
+
+  /*element: Class1.field8b:constant=DoubleConstant(0.5)*/
+  var field8b = 0.5;
+
+  /*element: Class1.field9a:initial=ListConstant([])*/
+  var field9a = const [];
+
+  /*element: Class1.field9b:constant=ListConstant([])*/
+  var field9b = const [];
+
+  /*element: Class1.field9c:initial=ListConstant(<int>[IntConstant(0), IntConstant(1)])*/
+  var field9c = const [0, 1];
+
+  /*element: Class1.field9d:constant=ListConstant(<int>[IntConstant(0), IntConstant(1), IntConstant(2)])*/
+  var field9d = const [0, 1, 2];
+
+  /*element: Class1.field10a:initial=MapConstant({})*/
+  var field10a = const {};
+
+  /*element: Class1.field10b:constant=MapConstant({})*/
+  var field10b = const {};
+
+  /*element: Class1.field10c:initial=MapConstant(<int, int>{IntConstant(0): IntConstant(1), IntConstant(2): IntConstant(3)})*/
+  var field10c = const {0: 1, 2: 3};
+
+  /*element: Class1.field10d:constant=MapConstant(<int, int>{IntConstant(0): IntConstant(1), IntConstant(2): IntConstant(3), IntConstant(4): IntConstant(5)})*/
+  var field10d = const {0: 1, 2: 3, 4: 5};
+
+  /*element: Class1.field11a:initial=ConstructedConstant(Symbol(_name=StringConstant("foo")))*/
+  var field11a = #foo;
+
+  /*element: Class1.field11b:constant=ConstructedConstant(Symbol(_name=StringConstant("foo")))*/
+  var field11b = #foo;
+
+  /*element: Class1.field12a:allocator,initial=IntConstant(5)*/
+  var field12a = 2 + 3;
+
+  /*element: Class1.field12b:constant=IntConstant(5)*/
+  var field12b = 2 + 3;
+
+  /*element: Class1.field13a:allocator,initial=BoolConstant(true)*/
+  var field13a = const1;
+
+  /*element: Class1.field13b:constant=BoolConstant(true)*/
+  var field13b = const1;
+}
+
+class Class2 {
+  /*element: Class2.field1a:allocator,initial=NullConstant*/
+  var field1a;
+
+  /*element: Class2.field1b:constant=NullConstant*/
+  var field1b;
+
+  /*element: Class2.field2a:allocator,initial=BoolConstant(true)*/
+  var field2a;
+
+  /*element: Class2.field2b:constant=BoolConstant(true)*/
+  var field2b;
+
+  /*element: Class2.field3a:allocator,initial=BoolConstant(false)*/
+  var field3a;
+
+  /*element: Class2.field3b:constant=BoolConstant(false)*/
+  var field3b;
+
+  /*element: Class2.field4a:allocator,initial=IntConstant(0)*/
+  var field4a;
+
+  /*element: Class2.field4b:constant=IntConstant(0)*/
+  var field4b;
+
+  /*element: Class2.field5a:allocator,initial=IntConstant(1)*/
+  var field5a;
+
+  /*element: Class2.field5b:constant=IntConstant(1)*/
+  var field5b;
+
+  /*element: Class2.field6a:allocator,initial=StringConstant("")*/
+  var field6a;
+
+  /*element: Class2.field6b:constant=StringConstant("")*/
+  var field6b;
+
+  /*element: Class2.field7a:allocator,initial=StringConstant("foo")*/
+  var field7a;
+
+  /*element: Class2.field7b:constant=StringConstant("foo")*/
+  var field7b;
+
+  /*element: Class2.field8a:initial=DoubleConstant(0.5)*/
+  var field8a;
+
+  /*element: Class2.field8b:constant=DoubleConstant(0.5)*/
+  var field8b;
+
+  /*element: Class2.field9a:initial=ListConstant([])*/
+  var field9a;
+
+  /*element: Class2.field9b:constant=ListConstant([])*/
+  var field9b;
+
+  /*element: Class2.field9c:initial=ListConstant(<int>[IntConstant(0), IntConstant(1)])*/
+  var field9c;
+
+  /*element: Class2.field9d:constant=ListConstant(<int>[IntConstant(0), IntConstant(1), IntConstant(2)])*/
+  var field9d;
+
+  /*element: Class2.field10a:initial=MapConstant({})*/
+  var field10a;
+
+  /*element: Class2.field10b:constant=MapConstant({})*/
+  var field10b;
+
+  /*element: Class2.field10c:initial=MapConstant(<int, int>{IntConstant(0): IntConstant(1), IntConstant(2): IntConstant(3)})*/
+  var field10c;
+
+  /*element: Class2.field10d:constant=MapConstant(<int, int>{IntConstant(0): IntConstant(1), IntConstant(2): IntConstant(3), IntConstant(4): IntConstant(5)})*/
+  var field10d;
+
+  /*element: Class2.field11a:initial=ConstructedConstant(Symbol(_name=StringConstant("foo")))*/
+  var field11a;
+
+  /*element: Class2.field11b:constant=ConstructedConstant(Symbol(_name=StringConstant("foo")))*/
+  var field11b;
+
+  /*element: Class2.field12a:allocator,initial=IntConstant(5)*/
+  var field12a;
+
+  /*element: Class2.field12b:constant=IntConstant(5)*/
+  var field12b;
+
+  /*element: Class2.field13a:allocator,initial=BoolConstant(true)*/
+  var field13a;
+
+  /*element: Class2.field13b:constant=BoolConstant(true)*/
+  var field13b;
+
+  Class2()
+      : field1a = null,
+        field1b = null,
+        field2a = true,
+        field2b = true,
+        field3a = false,
+        field3b = false,
+        field4a = 0,
+        field4b = 0,
+        field5a = 1,
+        field5b = 1,
+        field6a = '',
+        field6b = '',
+        field7a = 'foo',
+        field7b = 'foo',
+        field8a = 0.5,
+        field8b = 0.5,
+        field9a = const [],
+        field9b = const [],
+        field9c = const [0, 1],
+        field9d = const [0, 1, 2],
+        field10a = const {},
+        field10b = const {},
+        field10c = const {0: 1, 2: 3},
+        field10d = const {0: 1, 2: 3, 4: 5},
+        field11a = #foo,
+        field11b = #foo,
+        field12a = 2 + 3,
+        field12b = 2 + 3,
+        field13a = const1,
+        field13b = const1;
+}
diff --git a/tests/compiler/dart2js/field_analysis/jdata/static_initializers.dart b/tests/compiler/dart2js/field_analysis/jdata/static_initializers.dart
new file mode 100644
index 0000000..deb273c
--- /dev/null
+++ b/tests/compiler/dart2js/field_analysis/jdata/static_initializers.dart
@@ -0,0 +1,219 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+main() {
+  print(field1a);
+  print(field1b);
+  field1c = null;
+  print(field1c);
+
+  print(field2a);
+  print(field2b);
+  field2c = null;
+  print(field2c);
+
+  print(field3a);
+  print(field3b);
+  field3c = null;
+  print(field3c);
+  print(field3d);
+  print(field3e);
+  print(field3f);
+  print(field3g);
+  print(field3h);
+
+  print(field4a);
+  print(field4b);
+  print(field4c);
+
+  print(field5a);
+  print(field5b);
+  print(field5c);
+
+  print(field6a);
+  print(field6b);
+  print(field6c);
+
+  print(field7a);
+  print(field7b);
+  print(field7c);
+  print(field7d);
+  print(field7e);
+
+  print(field8a);
+  print(field8b);
+  print(field8c);
+  print(field8d);
+
+  print(field9a);
+  print(field9b);
+  print(field9c);
+  print(field9d);
+  field9e = null;
+  print(field9e);
+  print(field9f);
+  print(field9g);
+  print(field9h);
+  print(field9i);
+
+  print(field10a);
+  print(field10b);
+}
+
+method() {}
+
+class Class {
+  const Class.generative();
+
+  const factory Class.fact() = Class.generative;
+}
+
+/*element: field1a:constant=IntConstant(0)*/
+final field1a = 0;
+
+/*element: field1b:constant=IntConstant(0)*/
+var field1b = 0;
+
+/*element: field1c:initial=IntConstant(0)*/
+var field1c = 0;
+
+/*element: field2a:constant=ListConstant([])*/
+final field2a = const [];
+
+/*element: field2b:constant=ListConstant([])*/
+var field2b = const [];
+
+/*element: field2c:initial=ListConstant([])*/
+var field2c = const [];
+
+/*element: field3a:eager,final*/
+final field3a = [];
+
+/*element: field3b:eager,final*/
+var field3b = [];
+
+/*element: field3c:eager*/
+var field3c = [];
+
+/*element: field3d:eager,final*/
+var field3d = [1, 2, 3];
+
+/*element: field3e:eager,final*/
+var field3e = [
+  1,
+  2,
+  [
+    3,
+    4,
+    [5, 6, method]
+  ]
+];
+
+/*element: field3f:final,lazy*/
+var field3f = [
+  1,
+  2,
+  [
+    3,
+    4,
+    [5, 6, method()]
+  ]
+];
+
+/*element: field3g:final,lazy*/
+var field3g = [method()];
+
+// TODO(johnniwinther): Recognize this as of eager complexity.
+/*element: field3h:final,lazy*/
+var field3h = [1 + 3];
+
+/*element: field4a:constant=IntConstant(5)*/
+final field4a = 2 + 3;
+
+/*element: field4b:constant=IntConstant(5)*/
+var field4b = 2 + 3;
+
+/*strong.element: field4c:constant=IntConstant(5)*/
+const field4c = 2 + 3;
+
+/*element: field5a:constant=FunctionConstant(method)*/
+final field5a = method;
+
+/*element: field5b:constant=FunctionConstant(method)*/
+var field5b = method;
+
+/*strong.element: field5c:constant=FunctionConstant(method)*/
+const field5c = method;
+
+/*element: field6a:constant=ConstructedConstant(Class())*/
+var field6a = const Class.generative();
+
+/*element: field6b:constant=ConstructedConstant(Class())*/
+var field6b = const Class.fact();
+
+/*element: field6c:final,lazy*/
+var field6c = method();
+
+/*element: field7a:eager,final*/
+var field7a = {};
+
+/*element: field7b:eager,final*/
+var field7b = {0: 1};
+
+/*element: field7c:eager,final*/
+var field7c = {0: method};
+
+/*element: field7d:final,lazy*/
+var field7d = {0: method()};
+
+/*element: field7e:final,lazy*/
+var field7e = {method(): 0};
+
+/*element: field8a:eager,final*/
+var field8a = {};
+
+/*element: field8b:eager,final*/
+var field8b = {0};
+
+/*element: field8c:eager,final*/
+var field8c = {method};
+
+/*element: field8d:final,lazy*/
+var field8d = {method()};
+
+/*element: field9g:eager=[field9d],final,index=1*/
+var field9g = field9d;
+
+/*element: field9a:eager,final*/
+var field9a = [];
+
+/*element: field9c:eager=[field9b],final,index=3*/
+var field9c = [field9b];
+
+/*element: field9b:eager=[field9a],final,index=2*/
+var field9b = field9a;
+
+// Because [field9g] is declared first and it depends upon [field9d], [field9d]
+// must be created before [field9g] and thus has a lower index than, say,
+// [field9b].
+/*element: field9d:eager=[field9a],final,index=0*/
+var field9d = [field9a];
+
+/*element: field9e:eager*/
+var field9e = [];
+
+/*element: field9f:final,lazy*/
+var field9f = field9e;
+
+/*element: field9h:constant=ListConstant([])*/
+var field9h = const [];
+
+/*element: field9i:eager,final*/
+var field9i = [field9h];
+
+/*element: field10a:final,lazy*/
+int field10a = field10b;
+
+/*element: field10b:final,lazy*/
+int field10b = field10a;
diff --git a/tests/compiler/dart2js/field_analysis/jdata/unused_constructors.dart b/tests/compiler/dart2js/field_analysis/jdata/unused_constructors.dart
new file mode 100644
index 0000000..219c643
--- /dev/null
+++ b/tests/compiler/dart2js/field_analysis/jdata/unused_constructors.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class Class1 {
+  /*element: Class1.field:constant=IntConstant(87)*/
+  final int field;
+
+  Class1.constructor1({this.field = 42});
+  Class1.constructor2({this.field = 87});
+  Class1.constructor3({this.field = 123});
+}
+
+class Class2 {
+  final int field;
+
+  const Class2([this.field]);
+}
+
+main() {
+  print(new Class1.constructor2().field);
+  print(const Class2(42).field);
+  print(new Class2().field);
+}
diff --git a/tests/compiler/dart2js/field_analysis/jfield_analysis_test.dart b/tests/compiler/dart2js/field_analysis/jfield_analysis_test.dart
new file mode 100644
index 0000000..a28477b
--- /dev/null
+++ b/tests/compiler/dart2js/field_analysis/jfield_analysis_test.dart
@@ -0,0 +1,89 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:io';
+import 'package:async_helper/async_helper.dart';
+import 'package:compiler/src/compiler.dart';
+import 'package:compiler/src/elements/entities.dart';
+import 'package:compiler/src/ir/util.dart';
+import 'package:compiler/src/js_backend/field_analysis.dart';
+import 'package:compiler/src/js_model/js_world.dart';
+import 'package:compiler/src/util/features.dart';
+import 'package:kernel/ast.dart' as ir;
+import '../equivalence/id_equivalence.dart';
+import '../equivalence/id_equivalence_helper.dart';
+
+main(List<String> args) {
+  asyncTest(() async {
+    Directory dataDir = new Directory.fromUri(Platform.script.resolve('jdata'));
+    await checkTests(dataDir, const JAllocatorAnalysisDataComputer(),
+        args: args, testOmit: false, testCFEConstants: true);
+  });
+}
+
+class Tags {
+  static const String isInitializedInAllocator = 'allocator';
+  static const String initialValue = 'initial';
+  static const String constantValue = 'constant';
+  static const String isEager = 'eager';
+  static const String eagerCreationIndex = 'index';
+  static const String isLazy = 'lazy';
+  static const String isEffectivelyFinal = 'final';
+  static const String isElided = 'elided';
+}
+
+class JAllocatorAnalysisDataComputer extends DataComputer<Features> {
+  const JAllocatorAnalysisDataComputer();
+
+  @override
+  void computeMemberData(Compiler compiler, MemberEntity member,
+      Map<Id, ActualData<Features>> actualMap,
+      {bool verbose: false}) {
+    if (member.isField) {
+      JsClosedWorld closedWorld = compiler.backendClosedWorldForTesting;
+      JFieldAnalysis fieldAnalysis = closedWorld.fieldAnalysis;
+      ir.Member node = closedWorld.elementMap.getMemberDefinition(member).node;
+      Features features = new Features();
+      FieldAnalysisData fieldData = fieldAnalysis.getFieldData(member);
+      if (fieldData.isElided && !fieldData.isEffectivelyConstant) {
+        features.add(Tags.isElided);
+      }
+      if (fieldData.isInitializedInAllocator) {
+        features.add(Tags.isInitializedInAllocator);
+      }
+      if (fieldData.isEffectivelyConstant) {
+        features[Tags.constantValue] =
+            fieldData.constantValue.toStructuredText();
+      } else if (fieldData.initialValue != null) {
+        features[Tags.initialValue] = fieldData.initialValue.toStructuredText();
+      } else if (fieldData.isEager) {
+        if (fieldData.eagerCreationIndex != null) {
+          features[Tags.eagerCreationIndex] =
+              fieldData.eagerCreationIndex.toString();
+        }
+        if (fieldData.eagerFieldDependenciesForTesting != null) {
+          for (FieldEntity field
+              in fieldData.eagerFieldDependenciesForTesting) {
+            features.addElement(Tags.isEager, field.name);
+          }
+        } else {
+          features.add(Tags.isEager);
+        }
+      }
+      if (!member.isInstanceMember && fieldData.isLazy) {
+        features.add(Tags.isLazy);
+      }
+      if (fieldData.isEffectivelyFinal && !fieldData.isEffectivelyConstant) {
+        features.add(Tags.isEffectivelyFinal);
+      }
+      Id id = computeEntityId(node);
+      actualMap[id] = new ActualData<Features>(
+          id, features, computeSourceSpanFromTreeNode(node), member);
+    }
+  }
+
+  @override
+  DataInterpreter<Features> get dataValidator =>
+      const FeaturesDataInterpreter();
+}
diff --git a/tests/compiler/dart2js/field_analysis/kdata/constant_fields.dart b/tests/compiler/dart2js/field_analysis/kdata/constant_fields.dart
new file mode 100644
index 0000000..df9b18b
--- /dev/null
+++ b/tests/compiler/dart2js/field_analysis/kdata/constant_fields.dart
@@ -0,0 +1,31 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+main() {
+  print(const Class1().field1);
+  print(const Class2(field2: true).field2);
+  print(const Class3().field3);
+  print(const Class3(field3: true).field3);
+}
+
+class Class1 {
+  /*element: Class1.field1:Class1.=field1:BoolConstant(false),initial=NullConstant*/
+  final bool field1;
+
+  const Class1({this.field1: false});
+}
+
+class Class2 {
+  /*element: Class2.field2:Class2.=field2:BoolConstant(false),initial=NullConstant*/
+  final bool field2;
+
+  const Class2({this.field2: false});
+}
+
+class Class3 {
+  /*element: Class3.field3:Class3.=field3:BoolConstant(false),initial=NullConstant*/
+  final bool field3;
+
+  const Class3({this.field3: false});
+}
diff --git a/tests/compiler/dart2js/field_analysis/kdata/multi_initializers.dart b/tests/compiler/dart2js/field_analysis/kdata/multi_initializers.dart
new file mode 100644
index 0000000..0d7200d
--- /dev/null
+++ b/tests/compiler/dart2js/field_analysis/kdata/multi_initializers.dart
@@ -0,0 +1,51 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+main() {
+  new Class1.a();
+  new Class1.b();
+}
+
+class Class1 {
+  /*element: Class1.field1:
+    Class1.a=IntConstant(1),
+    initial=IntConstant(0)
+   */
+  var field1 = 0;
+
+  /*element: Class1.field2:
+   Class1.a=IntConstant(1),
+   Class1.b=IntConstant(2),
+   initial=NullConstant
+  */
+  var field2;
+
+  /*element: Class1.field3:
+   Class1.a=IntConstant(3),
+   Class1.b=IntConstant(3),
+   initial=NullConstant
+  */
+  var field3;
+
+  /*element: Class1.field4:initial=IntConstant(4)*/
+  var field4 = 4;
+
+  /*element: Class1.field5:
+   Class1.a=IntConstant(5),
+   Class1.b=IntConstant(5),
+   initial=IntConstant(5)
+  */
+  var field5 = 5;
+
+  Class1.a()
+      : field1 = 1,
+        field2 = 1,
+        field3 = 3,
+        field5 = 5;
+
+  Class1.b()
+      : field2 = 2,
+        field3 = 3,
+        field5 = 5;
+}
diff --git a/tests/compiler/dart2js/field_analysis/kdata/optional_parameters.dart b/tests/compiler/dart2js/field_analysis/kdata/optional_parameters.dart
new file mode 100644
index 0000000..1dbbde0
--- /dev/null
+++ b/tests/compiler/dart2js/field_analysis/kdata/optional_parameters.dart
@@ -0,0 +1,54 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+main() {
+  new Class1(0);
+  new Class1(0, 1);
+  new Class2(0);
+  new Class2(0, field2: 1);
+}
+
+class Class1 {
+  /*element: Class1.field1:
+   Class1.=?,
+   initial=NullConstant
+  */
+  var field1;
+
+  /*element: Class1.field2:
+   Class1.=1:IntConstant(2),
+   initial=NullConstant
+  */
+  var field2;
+
+  /*element: Class1.field3:
+   Class1.=2:IntConstant(3),
+   initial=NullConstant
+  */
+  var field3;
+
+  Class1(this.field1, [this.field2 = 2, this.field3 = 3]);
+}
+
+class Class2 {
+  /*element: Class2.field1:
+   Class2.=?,
+   initial=NullConstant
+  */
+  var field1;
+
+  /*element: Class2.field2:
+   Class2.=field2:IntConstant(2),
+   initial=NullConstant
+  */
+  var field2;
+
+  /*element: Class2.field3:
+   Class2.=field3:IntConstant(3),
+   initial=NullConstant
+  */
+  var field3;
+
+  Class2(this.field1, {this.field2 = 2, this.field3 = 3});
+}
diff --git a/tests/compiler/dart2js/field_analysis/kdata/regress_36222.dart b/tests/compiler/dart2js/field_analysis/kdata/regress_36222.dart
new file mode 100644
index 0000000..6794ac8
--- /dev/null
+++ b/tests/compiler/dart2js/field_analysis/kdata/regress_36222.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+typedef int BinaryFunc(int x, int y);
+
+class A {
+  const A({this.foo = A.defaultFoo});
+
+  static int defaultFoo(int x, int y) {
+    return x + y;
+  }
+
+  /*element: A.foo:A.=foo:FunctionConstant(A.defaultFoo),initial=NullConstant*/
+  final BinaryFunc foo;
+}
+
+@pragma('dart2js:assumeDynamic')
+@pragma('dart2js:noInline')
+test(dynamic a) => a.foo(1, 2);
+
+main() {
+  test(new A());
+}
diff --git a/tests/compiler/dart2js/field_analysis/kdata/side_effects.dart b/tests/compiler/dart2js/field_analysis/kdata/side_effects.dart
new file mode 100644
index 0000000..e65028c
--- /dev/null
+++ b/tests/compiler/dart2js/field_analysis/kdata/side_effects.dart
@@ -0,0 +1,17 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+main() {
+  new Class1();
+}
+
+method1() => 1;
+
+class Class1 {
+  var field1 = method1();
+  var field2 = throw 'foo';
+  var field3 = method1();
+
+  Class1() : field3 = null;
+}
diff --git a/tests/compiler/dart2js/field_analysis/kdata/simple_initializers.dart b/tests/compiler/dart2js/field_analysis/kdata/simple_initializers.dart
new file mode 100644
index 0000000..f6bff5f
--- /dev/null
+++ b/tests/compiler/dart2js/field_analysis/kdata/simple_initializers.dart
@@ -0,0 +1,118 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+main() {
+  new Class1();
+  new Class2();
+}
+
+/*strong.element: const1:complexity=constant,initial=BoolConstant(true)*/
+const bool const1 = true;
+
+class Class1 {
+  /*element: Class1.field0:initial=NullConstant*/
+  var field0;
+
+  /*element: Class1.field1:initial=NullConstant*/
+  var field1 = null;
+
+  /*element: Class1.field2:initial=BoolConstant(true)*/
+  var field2 = true;
+
+  /*element: Class1.field3:initial=BoolConstant(false)*/
+  var field3 = false;
+
+  /*element: Class1.field4:initial=IntConstant(0)*/
+  var field4 = 0;
+
+  /*element: Class1.field5:initial=IntConstant(1)*/
+  var field5 = 1;
+
+  /*element: Class1.field6:initial=StringConstant("")*/
+  var field6 = '';
+
+  /*element: Class1.field7:initial=StringConstant("foo")*/
+  var field7 = 'foo';
+
+  /*element: Class1.field8:initial=DoubleConstant(0.5)*/
+  var field8 = 0.5;
+
+  /*element: Class1.field9:initial=ListConstant([])*/
+  var field9 = const [];
+
+  /*element: Class1.field10:initial=MapConstant({})*/
+  var field10 = const {};
+
+  /*element: Class1.field11:initial=ConstructedConstant(Symbol(_name=StringConstant("foo")))*/
+  var field11 = #foo;
+
+  /*element: Class1.field12:initial=IntConstant(5)*/
+  var field12 = 2 + 3;
+
+  /*element: Class1.field13:initial=BoolConstant(true)*/
+  var field13 = const1;
+
+  /*element: Class1.field14:*/
+  var field14 = const1 is int;
+}
+
+class Class2 {
+  /*element: Class2.field1:Class2.=NullConstant,initial=NullConstant*/
+  var field1;
+
+  /*element: Class2.field2:Class2.=BoolConstant(true),initial=NullConstant*/
+  var field2;
+
+  /*element: Class2.field3:Class2.=BoolConstant(false),initial=NullConstant*/
+  var field3;
+
+  /*element: Class2.field4:Class2.=IntConstant(0),initial=NullConstant*/
+  var field4;
+
+  /*element: Class2.field5:Class2.=IntConstant(1),initial=NullConstant*/
+  var field5;
+
+  /*element: Class2.field6:Class2.=StringConstant(""),initial=NullConstant*/
+  var field6;
+
+  /*element: Class2.field7:Class2.=StringConstant("foo"),initial=NullConstant*/
+  var field7;
+
+  /*element: Class2.field8:Class2.=DoubleConstant(0.5),initial=NullConstant*/
+  var field8;
+
+  /*element: Class2.field9:Class2.=ListConstant([]),initial=NullConstant*/
+  var field9;
+
+  /*element: Class2.field10:Class2.=MapConstant({}),initial=NullConstant*/
+  var field10;
+
+  /*element: Class2.field11:Class2.=ConstructedConstant(Symbol(_name=StringConstant("foo"))),initial=NullConstant*/
+  var field11;
+
+  /*element: Class2.field12:Class2.=IntConstant(5),initial=NullConstant*/
+  var field12;
+
+  /*element: Class2.field13:Class2.=BoolConstant(true),initial=NullConstant*/
+  var field13;
+
+  /*element: Class2.field14:Class2.=?,initial=NullConstant*/
+  var field14;
+
+  Class2()
+      : field1 = null,
+        field2 = true,
+        field3 = false,
+        field4 = 0,
+        field5 = 1,
+        field6 = '',
+        field7 = 'foo',
+        field8 = 0.5,
+        field9 = const [],
+        field10 = const {},
+        field11 = #foo,
+        field12 = 2 + 3,
+        field13 = const1,
+        field14 = const1 is int;
+}
diff --git a/tests/compiler/dart2js/field_analysis/kdata/static_initializers.dart b/tests/compiler/dart2js/field_analysis/kdata/static_initializers.dart
new file mode 100644
index 0000000..4096f9e
--- /dev/null
+++ b/tests/compiler/dart2js/field_analysis/kdata/static_initializers.dart
@@ -0,0 +1,189 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+main() {
+  print(field1a);
+  print(field1b);
+  print(field1c);
+
+  print(field2a);
+  print(field2b);
+  print(field2c);
+
+  print(field3a);
+  print(field3b);
+  print(field3c);
+  print(field3d);
+  print(field3e);
+  print(field3f);
+  print(field3g);
+  print(field3h);
+
+  print(field4a);
+  print(field4b);
+  print(field4c);
+
+  print(field5a);
+  print(field5b);
+  print(field5c);
+
+  print(field6a);
+  print(field6b);
+  print(field6c);
+
+  print(field7a);
+  print(field7b);
+  print(field7c);
+  print(field7d);
+  print(field7e);
+
+  print(field8a);
+  print(field8b);
+  print(field8c);
+  print(field8d);
+
+  print(field9a);
+  print(field9b);
+  print(field9c);
+
+  print(field10a);
+  print(field10b);
+}
+
+method() {}
+
+class Class {
+  const Class.generative();
+
+  const factory Class.fact() = Class.generative;
+}
+
+/*element: field1a:complexity=constant,initial=IntConstant(0)*/
+final field1a = 0;
+
+/*element: field1b:complexity=constant,initial=IntConstant(0)*/
+var field1b = 0;
+
+/*strong.element: field1c:complexity=constant,initial=IntConstant(0)*/
+const field1c = 0;
+
+/*element: field2a:complexity=constant,initial=ListConstant([])*/
+final field2a = const [];
+
+/*element: field2b:complexity=constant,initial=ListConstant([])*/
+var field2b = const [];
+
+/*strong.element: field2c:complexity=constant,initial=ListConstant([])*/
+const field2c = const [];
+
+/*element: field3a:complexity=eager*/
+final field3a = [];
+
+/*element: field3b:complexity=eager*/
+var field3b = [];
+
+/*element: field3c:complexity=eager*/
+var field3c = [];
+
+/*element: field3d:complexity=eager*/
+var field3d = [1, 2, 3];
+
+/*element: field3e:complexity=eager*/
+var field3e = [
+  1,
+  2,
+  [
+    3,
+    4,
+    [5, 6, method]
+  ]
+];
+
+/*element: field3f:complexity=lazy*/
+var field3f = [
+  1,
+  2,
+  [
+    3,
+    4,
+    [5, 6, method()]
+  ]
+];
+
+/*element: field3g:complexity=lazy*/
+var field3g = [method()];
+
+// TODO(johnniwinther): Recognize this as of eager complexity.
+/*element: field3h:complexity=lazy*/
+var field3h = [1 + 3];
+
+// TODO(johnniwinther): Recognize `field4*` as of constant complexity.
+/*element: field4a:complexity=lazy,initial=IntConstant(5)*/
+final field4a = 2 + 3;
+
+/*element: field4b:complexity=lazy,initial=IntConstant(5)*/
+var field4b = 2 + 3;
+
+/*strong.element: field4c:complexity=lazy,initial=IntConstant(5)*/
+const field4c = 2 + 3;
+
+/*element: field5a:complexity=constant,initial=FunctionConstant(method)*/
+final field5a = method;
+
+/*element: field5b:complexity=constant,initial=FunctionConstant(method)*/
+var field5b = method;
+
+/*strong.element: field5c:complexity=constant,initial=FunctionConstant(method)*/
+const field5c = method;
+
+/*element: field6a:complexity=constant,initial=ConstructedConstant(Class())*/
+var field6a = const Class.generative();
+
+/*element: field6b:complexity=constant,initial=ConstructedConstant(Class())*/
+var field6b = const Class.fact();
+
+/*element: field6c:complexity=lazy*/
+var field6c = method();
+
+/*element: field7a:complexity=eager*/
+var field7a = {};
+
+/*element: field7b:complexity=eager*/
+var field7b = {0: 1};
+
+/*element: field7c:complexity=eager*/
+var field7c = {0: method};
+
+/*element: field7d:complexity=lazy*/
+var field7d = {0: method()};
+
+/*element: field7e:complexity=lazy*/
+var field7e = {method(): 0};
+
+/*element: field8a:complexity=eager*/
+var field8a = {};
+
+/*element: field8b:complexity=eager*/
+var field8b = {0};
+
+/*element: field8c:complexity=eager*/
+var field8c = {method};
+
+/*element: field8d:complexity=lazy*/
+var field8d = {method()};
+
+/*element: field9a:complexity=eager*/
+var field9a = [];
+
+/*element: field9b:complexity=eager&fields=[field9a]*/
+var field9b = field9a;
+
+/*element: field9c:complexity=eager&fields=[field9b]*/
+var field9c = [field9b];
+
+/*element: field10a:complexity=eager&fields=[field10b]*/
+int field10a = field10b;
+
+/*element: field10b:complexity=eager&fields=[field10a]*/
+int field10b = field10a;
diff --git a/tests/compiler/dart2js/field_analysis/kfield_analysis_test.dart b/tests/compiler/dart2js/field_analysis/kfield_analysis_test.dart
new file mode 100644
index 0000000..559810d
--- /dev/null
+++ b/tests/compiler/dart2js/field_analysis/kfield_analysis_test.dart
@@ -0,0 +1,76 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:io';
+import 'package:async_helper/async_helper.dart';
+import 'package:compiler/src/compiler.dart';
+import 'package:compiler/src/elements/entities.dart';
+import 'package:compiler/src/ir/util.dart';
+import 'package:compiler/src/js_backend/field_analysis.dart';
+import 'package:compiler/src/kernel/kernel_strategy.dart';
+import 'package:compiler/src/util/features.dart';
+import 'package:kernel/ast.dart' as ir;
+import '../equivalence/id_equivalence.dart';
+import '../equivalence/id_equivalence_helper.dart';
+
+main(List<String> args) {
+  asyncTest(() async {
+    Directory dataDir = new Directory.fromUri(Platform.script.resolve('kdata'));
+    await checkTests(dataDir, const KAllocatorAnalysisDataComputer(),
+        args: args,
+        testOmit: false,
+        testFrontend: true,
+        testCFEConstants: true);
+  });
+}
+
+class Tags {
+  static const String initialValue = 'initial';
+  static const String complexity = 'complexity';
+}
+
+class KAllocatorAnalysisDataComputer extends DataComputer<Features> {
+  const KAllocatorAnalysisDataComputer();
+
+  @override
+  void computeMemberData(Compiler compiler, MemberEntity member,
+      Map<Id, ActualData<Features>> actualMap,
+      {bool verbose: false}) {
+    if (member.isField) {
+      KernelFrontEndStrategy frontendStrategy = compiler.frontendStrategy;
+      KFieldAnalysis allocatorAnalysis =
+          compiler.backend.fieldAnalysisForTesting;
+      ir.Member node = frontendStrategy.elementMap.getMemberNode(member);
+      Features features = new Features();
+      if (member.isInstanceMember) {
+        AllocatorData data =
+            allocatorAnalysis.getAllocatorDataForTesting(member);
+        if (data != null) {
+          if (data.initialValue != null) {
+            features[Tags.initialValue] = data.initialValue.toStructuredText();
+          }
+          data.initializers.forEach((constructor, value) {
+            features['${constructor.enclosingClass.name}.${constructor.name}'] =
+                value?.shortText;
+          });
+        }
+      } else {
+        StaticFieldData staticFieldData =
+            allocatorAnalysis.getStaticFieldDataForTesting(member);
+        if (staticFieldData.initialValue != null) {
+          features[Tags.initialValue] =
+              staticFieldData.initialValue.toStructuredText();
+        }
+        features[Tags.complexity] = staticFieldData.complexity.shortText;
+      }
+      Id id = computeEntityId(node);
+      actualMap[id] = new ActualData<Features>(
+          id, features, computeSourceSpanFromTreeNode(node), member);
+    }
+  }
+
+  @override
+  DataInterpreter<Features> get dataValidator =>
+      const FeaturesDataInterpreter();
+}
diff --git a/tests/compiler/dart2js/generic_methods/generic_method_test.dart b/tests/compiler/dart2js/generic_methods/generic_method_test.dart
index bc93229..65b2146 100644
--- a/tests/compiler/dart2js/generic_methods/generic_method_test.dart
+++ b/tests/compiler/dart2js/generic_methods/generic_method_test.dart
@@ -13,9 +13,7 @@
 import '../helpers/d8_helper.dart';
 
 const String SOURCE = r'''
-import 'package:meta/dart2js.dart';
-
-@noInline
+@pragma('dart2js:noInline')
 method1<T>(T t) {
   print('method1:');
   print('$t is $T = ${t is T}');
@@ -23,7 +21,7 @@
   print('');
 }
 
-@noInline
+@pragma('dart2js:noInline')
 method2<T, S>(S s, T t) {
   print('method2:');
   print('$t is $T = ${t is T}');
@@ -33,7 +31,7 @@
   print('');
 }
 
-@tryInline
+@pragma('dart2js:tryInline')
 method3<T, S>(T t, S s) {
   print('method3:');
   print('$t is $T = ${t is T}');
@@ -65,7 +63,7 @@
 }
 
 class Class2 {
-  @tryInline
+  @pragma('dart2js:tryInline')
   method5<T>(T t) {
     print('Class2.method5:');
     print('$t is $T = ${t is T}');
@@ -73,7 +71,7 @@
     print('');
   }
 
-  @noInline
+  @pragma('dart2js:noInline')
   method6(o) {
     print('Class2.method6:');
     print('$o is int = ${o is int}');
@@ -83,7 +81,7 @@
 }
 
 class Class3 {
-  @noInline
+  @pragma('dart2js:noInline')
   method6<T>(T t) {
     print('Class3.method6:');
     print('$t is $T = ${t is T}');
diff --git a/tests/compiler/dart2js/generic_methods/instantiation_stub_test.dart b/tests/compiler/dart2js/generic_methods/instantiation_stub_test.dart
index 802c06d..850e1ff 100644
--- a/tests/compiler/dart2js/generic_methods/instantiation_stub_test.dart
+++ b/tests/compiler/dart2js/generic_methods/instantiation_stub_test.dart
@@ -13,33 +13,31 @@
 import '../helpers/memory_compiler.dart';
 
 const String code = '''
-import 'package:meta/dart2js.dart';
-
 // This needs one-arg instantiation.
-@noInline
+@pragma('dart2js:noInline')
 T f1a<T>(T t) => t;
 
 // This needs no instantiation because it is not closurized.
-@noInline
+@pragma('dart2js:noInline')
 T f1b<T>(T t1, T t2) => t1;
 
 class Class {
   // This needs two-arg instantiation.
-  @noInline
+  @pragma('dart2js:noInline')
   bool f2a<T, S>(T t, S s) => t == s;
 
   // This needs no instantiation because it is not closurized.
-  @noInline
+  @pragma('dart2js:noInline')
   bool f2b<T, S>(T t, S s1, S s2) => t == s1;
 }
 
-@noInline
+@pragma('dart2js:noInline')
 int method1(int i, int Function(int) f) => f(i);
 
-@noInline
+@pragma('dart2js:noInline')
 bool method2(int a, int b, bool Function(int, int) f) => f(a, b);
 
-@noInline
+@pragma('dart2js:noInline')
 int method3(int a, int b, int c, int Function(int, int, int) f) => f(a, b, c);
 
 main() {
diff --git a/tests/compiler/dart2js/generic_methods/world_test.dart b/tests/compiler/dart2js/generic_methods/world_test.dart
index 13c9a72..dc793c1 100644
--- a/tests/compiler/dart2js/generic_methods/world_test.dart
+++ b/tests/compiler/dart2js/generic_methods/world_test.dart
@@ -11,47 +11,45 @@
 import '../helpers/memory_compiler.dart';
 
 const String code = r'''
-import 'package:meta/dart2js.dart';
-
 class Class1 {
-  @noInline
+  @pragma('dart2js:noInline')
   method1<T>() {}
 
-  @noInline
+  @pragma('dart2js:noInline')
   method2<T>() => T;
 
-  @noInline
+  @pragma('dart2js:noInline')
   method3<T>() => T;
 
-  @noInline
+  @pragma('dart2js:noInline')
   method4<T>() => T;
 
-  @noInline
+  @pragma('dart2js:noInline')
   method5<T>() => T;
 
-  @noInline
+  @pragma('dart2js:noInline')
   method6<T>() {}
 }
 
 class Class2 {}
 
 class Class3 implements Class1 {
-  @noInline
+  @pragma('dart2js:noInline')
   method1<T>() {}
 
-  @noInline
+  @pragma('dart2js:noInline')
   method2<T>() {}
 
-  @noInline
+  @pragma('dart2js:noInline')
   method3<T>() {}
 
-  @noInline
+  @pragma('dart2js:noInline')
   method4<T>() {}
 
-  @noInline
+  @pragma('dart2js:noInline')
   method5<T>() {}
 
-  @noInline
+  @pragma('dart2js:noInline')
   method6<T>() {}
 }
 
diff --git a/tests/compiler/dart2js/helpers/d8_helper.dart b/tests/compiler/dart2js/helpers/d8_helper.dart
index 612f617..10c6444 100644
--- a/tests/compiler/dart2js/helpers/d8_helper.dart
+++ b/tests/compiler/dart2js/helpers/d8_helper.dart
@@ -68,7 +68,7 @@
   if (printSteps) print('d8 output:');
   if (printSteps) print(out);
   if (expectedOutput != null) {
-    Expect.equals(0, runResult.exitCode);
+    Expect.equals(0, runResult.exitCode, "Unexpected exit code.");
     Expect.stringEquals(expectedOutput.trim(),
         runResult.stdout.replaceAll('\r\n', '\n').trim());
   }
diff --git a/tests/compiler/dart2js/helpers/diagnostic_helper.dart b/tests/compiler/dart2js/helpers/diagnostic_helper.dart
index e5d433d..d45306a 100644
--- a/tests/compiler/dart2js/helpers/diagnostic_helper.dart
+++ b/tests/compiler/dart2js/helpers/diagnostic_helper.dart
@@ -25,6 +25,7 @@
 
   MessageKind get messageKind => message?.kind;
 
+  @override
   String toString() {
     return '${message != null ? message.kind : ''}'
         ':$uri:$begin:$end:$text:$kind';
diff --git a/tests/compiler/dart2js/helpers/memory_compiler.dart b/tests/compiler/dart2js/helpers/memory_compiler.dart
index ce4eda7..4f7b01f 100644
--- a/tests/compiler/dart2js/helpers/memory_compiler.dart
+++ b/tests/compiler/dart2js/helpers/memory_compiler.dart
@@ -15,8 +15,6 @@
 import 'package:compiler/src/options.dart' show CompilerOptions;
 
 import 'package:front_end/src/api_unstable/dart2js.dart' as fe;
-import 'package:front_end/src/compute_platform_binaries_location.dart'
-    show computePlatformBinariesLocation;
 
 import 'memory_source_file_helper.dart';
 
@@ -111,7 +109,6 @@
     Uri packageConfig}) {
   retainDataForTesting = true;
   librariesSpecificationUri ??= Uri.base.resolve('sdk/lib/libraries.json');
-  Uri platformBinaries = computePlatformBinariesLocation();
 
   if (packageRoot == null && packageConfig == null) {
     if (Platform.packageConfig != null) {
@@ -134,8 +131,7 @@
   }
 
   CompilerOptions compilerOptions = CompilerOptions.parse(options,
-      librariesSpecificationUri: librariesSpecificationUri,
-      platformBinaries: platformBinaries)
+      librariesSpecificationUri: librariesSpecificationUri)
     ..entryPoint = entryPoint
     ..packageRoot = packageRoot
     ..environment = {}
diff --git a/tests/compiler/dart2js/helpers/output_collector.dart b/tests/compiler/dart2js/helpers/output_collector.dart
index e9ff37b..30b62be 100644
--- a/tests/compiler/dart2js/helpers/output_collector.dart
+++ b/tests/compiler/dart2js/helpers/output_collector.dart
@@ -12,15 +12,18 @@
   StringBuffer sb = new StringBuffer();
   String text;
 
+  @override
   void add(String event) {
     sb.write(event);
   }
 
+  @override
   void close() {
     text = sb.toString();
     sb = null;
   }
 
+  @override
   String toString() {
     return text ?? sb.toString();
   }
@@ -33,12 +36,15 @@
 
   BufferedBinaryOutputSink(this.uri);
 
+  @override
   void write(List<int> buffer, [int start = 0, int end]) {
     list.addAll(buffer.sublist(start, end));
   }
 
+  @override
   void close() {}
 
+  @override
   String toString() {
     return 'BufferedBinaryOutputSink($uri)';
   }
@@ -79,6 +85,7 @@
     }
   }
 
+  @override
   BinaryOutputSink createBinarySink(Uri uri) {
     return binaryOutputMap.putIfAbsent(
         uri, () => new BufferedBinaryOutputSink(uri));
diff --git a/tests/compiler/dart2js/helpers/program_lookup.dart b/tests/compiler/dart2js/helpers/program_lookup.dart
index cac728c..f4ce6d9e 100644
--- a/tests/compiler/dart2js/helpers/program_lookup.dart
+++ b/tests/compiler/dart2js/helpers/program_lookup.dart
@@ -5,6 +5,7 @@
 import 'package:expect/expect.dart';
 import 'package:compiler/src/common_elements.dart';
 import 'package:compiler/src/compiler.dart';
+import 'package:compiler/src/deferred_load.dart';
 import 'package:compiler/src/elements/entities.dart';
 import 'package:compiler/src/js_backend/namer.dart';
 import 'package:compiler/src/js_emitter/model.dart';
@@ -45,6 +46,15 @@
       : this.program = compiler.backend.emitter.emitter.programForTesting,
         this.namer = compiler.backend.namer;
 
+  Fragment getFragment(OutputUnit outputUnit) {
+    for (Fragment fragment in program.fragments) {
+      if (fragment.outputUnit == outputUnit) {
+        return fragment;
+      }
+    }
+    return null;
+  }
+
   Map<LibraryEntity, LibraryData> libraryMap;
 
   LibraryData getLibraryData(LibraryEntity element) {
@@ -176,6 +186,7 @@
     return _staticFieldMap[field];
   }
 
+  @override
   String toString() => 'LibraryData(library=$library,_classMap=$_classMap,'
       '_methodMap=$_methodMap,_fieldMap=$_fieldMap)';
 }
@@ -220,6 +231,7 @@
     return _checkedSetterMap[field];
   }
 
+  @override
   String toString() => 'ClassData(cls=$cls,'
       '_methodMap=$_methodMap,_fieldMap=$_fieldMap)';
 }
@@ -227,11 +239,13 @@
 void forEachNode(js.Node root,
     {void Function(js.Call) onCall,
     void Function(js.PropertyAccess) onPropertyAccess,
-    void Function(js.Assignment) onAssignment}) {
+    void Function(js.Assignment) onAssignment,
+    void Function(js.Switch) onSwitch}) {
   CallbackVisitor visitor = new CallbackVisitor(
       onCall: onCall,
       onPropertyAccess: onPropertyAccess,
-      onAssignment: onAssignment);
+      onAssignment: onAssignment,
+      onSwitch: onSwitch);
   root.accept(visitor);
 }
 
@@ -239,8 +253,10 @@
   final void Function(js.Call) onCall;
   final void Function(js.PropertyAccess) onPropertyAccess;
   final void Function(js.Assignment) onAssignment;
+  final void Function(js.Switch) onSwitch;
 
-  CallbackVisitor({this.onCall, this.onPropertyAccess, this.onAssignment});
+  CallbackVisitor(
+      {this.onCall, this.onPropertyAccess, this.onAssignment, this.onSwitch});
 
   @override
   visitCall(js.Call node) {
@@ -259,4 +275,10 @@
     if (onAssignment != null) onAssignment(node);
     return super.visitAssignment(node);
   }
+
+  @override
+  visitSwitch(js.Switch node) {
+    if (onSwitch != null) onSwitch(node);
+    return super.visitSwitch(node);
+  }
 }
diff --git a/tests/compiler/dart2js/helpers/stats_test.dart b/tests/compiler/dart2js/helpers/stats_test.dart
index 5271e12..9254ee9 100644
--- a/tests/compiler/dart2js/helpers/stats_test.dart
+++ b/tests/compiler/dart2js/helpers/stats_test.dart
@@ -8,10 +8,12 @@
 class CollectingOutput implements StatsOutput {
   final StringBuffer sb = new StringBuffer();
 
+  @override
   void println(String text) {
     sb.write('$text\n');
   }
 
+  @override
   String toString() => sb.toString();
 }
 
diff --git a/tests/compiler/dart2js/helpers/type_test_helper.dart b/tests/compiler/dart2js/helpers/type_test_helper.dart
index c4304da..cda6070 100644
--- a/tests/compiler/dart2js/helpers/type_test_helper.dart
+++ b/tests/compiler/dart2js/helpers/type_test_helper.dart
@@ -190,6 +190,7 @@
 
   const FunctionTypeData(this.returnType, this.name, this.parameters);
 
+  @override
   String toString() => '$returnType $name$parameters';
 }
 
diff --git a/tests/compiler/dart2js/impact/data/async.dart b/tests/compiler/dart2js/impact/data/async.dart
index b8cb04a..69792ef 100644
--- a/tests/compiler/dart2js/impact/data/async.dart
+++ b/tests/compiler/dart2js/impact/data/async.dart
@@ -64,7 +64,7 @@
 */
 testAsyncStar() async* {}
 
-/*strong.element: testLocalSyncStar:
+/*element: testLocalSyncStar:
  static=[
   _IterationMarker.endOfIteration(0),
   _IterationMarker.uncaughtError(1),
@@ -88,7 +88,7 @@
   return local;
 }
 
-/*strong.element: testLocalAsync:
+/*element: testLocalAsync:
  static=[
   StreamIterator.(1),
   _asyncAwait(2),
@@ -115,7 +115,7 @@
   return local;
 }
 
-/*strong.element: testLocalAsyncStar:
+/*element: testLocalAsyncStar:
  static=[
   StreamIterator.(1),
   _IterationMarker.yieldSingle(1),
@@ -142,7 +142,7 @@
   return local;
 }
 
-/*strong.element: testAnonymousSyncStar:
+/*element: testAnonymousSyncStar:
  static=[
   _IterationMarker.endOfIteration(0),
   _IterationMarker.uncaughtError(1),
@@ -165,7 +165,7 @@
   return () sync* {};
 }
 
-/*strong.element: testAnonymousAsync:
+/*element: testAnonymousAsync:
  static=[
   StreamIterator.(1),
   _asyncAwait(2),
@@ -191,7 +191,7 @@
   return () async {};
 }
 
-/*strong.element: testAnonymousAsyncStar:
+/*element: testAnonymousAsyncStar:
  static=[
   StreamIterator.(1),
   _IterationMarker.yieldSingle(1),
@@ -217,7 +217,7 @@
   return () async* {};
 }
 
-/*strong.element: testAsyncForIn:
+/*element: testAsyncForIn:
  dynamic=[
   cancel(0),
   current,
@@ -241,7 +241,7 @@
   await for (var e in o) {}
 }
 
-/*strong.element: testAsyncForInTyped:
+/*element: testAsyncForInTyped:
  dynamic=[
   cancel(0),
   current,
diff --git a/tests/compiler/dart2js/impact/data/classes.dart b/tests/compiler/dart2js/impact/data/classes.dart
index ca5fc71..5a067d6 100644
--- a/tests/compiler/dart2js/impact/data/classes.dart
+++ b/tests/compiler/dart2js/impact/data/classes.dart
@@ -137,7 +137,7 @@
 testForwardingConstructor() => new ForwardingConstructorClass(null);
 
 class ForwardingConstructorTypedSuperClass {
-  /*strong.element: ForwardingConstructorTypedSuperClass.:
+  /*element: ForwardingConstructorTypedSuperClass.:
    static=[Object.(0)],
    type=[inst:JSBool,param:int]
   */
@@ -154,7 +154,7 @@
 testForwardingConstructorTyped() => new ForwardingConstructorTypedClass(null);
 
 class ForwardingConstructorGenericSuperClass<T> {
-  /*strong.element: ForwardingConstructorGenericSuperClass.:
+  /*element: ForwardingConstructorGenericSuperClass.:
    static=[
     Object.(0),
     checkSubtype(4),
@@ -206,10 +206,24 @@
   A
 }
 
-/*element: testEnum:static=[Enum.A]*/
+/*strong.element: testEnum:static=[Enum.A]*/
+/*strongConst.element: testEnum:
+ static=[
+  Enum._name=StringConstant("Enum.A"),
+  Enum.index=IntConstant(0)],
+ type=[
+  const:Enum,
+  inst:JSDouble,
+  inst:JSInt,
+  inst:JSNumber,
+  inst:JSPositiveInt,
+  inst:JSString,
+  inst:JSUInt31,
+  inst:JSUInt32]
+*/
 testEnum() => Enum.A;
 
-/*strong.element: staticGenericMethod:
+/*element: staticGenericMethod:
  static=[
   checkSubtype(4),
   checkSubtypeOfRuntimeType(2),
@@ -231,7 +245,7 @@
 */
 List<T> staticGenericMethod<T>(T arg) => [arg];
 
-/*strong.element: testStaticGenericMethod:
+/*element: testStaticGenericMethod:
   static=[staticGenericMethod<bool>(1)],
   type=[inst:JSBool]
 */
@@ -239,7 +253,7 @@
   staticGenericMethod<bool>(true);
 }
 
-/*strong.element: testInstanceGenericMethod:
+/*element: testInstanceGenericMethod:
  dynamic=[exact:GenericClass.genericMethod<bool>(1)],
  static=[
   GenericClass.generative(0),
@@ -255,7 +269,7 @@
   // ignore: UNUSED_FIELD
   final _field;
 
-  /*strong.element: AbstractClass.:type=[inst:JSNull]*/
+  /*element: AbstractClass.:type=[inst:JSNull]*/
   factory AbstractClass() => null;
 }
 
@@ -292,7 +306,7 @@
 class GenericClass<X, Y> {
   const GenericClass.generative();
 
-  /*strong.element: GenericClass.genericMethod:
+  /*element: GenericClass.genericMethod:
    static=[
     checkSubtype(4),
     checkSubtypeOfRuntimeType(2),
diff --git a/tests/compiler/dart2js/impact/data/constants.dart b/tests/compiler/dart2js/impact/data/constants.dart
new file mode 100644
index 0000000..12db520
--- /dev/null
+++ b/tests/compiler/dart2js/impact/data/constants.dart
@@ -0,0 +1,264 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import '../libs/constants_lib.dart';
+import '../libs/constants_lib.dart' deferred as defer;
+
+/*element: main:static=**/
+main() {
+  nullLiteral();
+  boolLiteral();
+  intLiteral();
+  doubleLiteral();
+  stringLiteral();
+  symbolLiteral();
+  listLiteral();
+  mapLiteral();
+  stringMapLiteral();
+  setLiteral();
+  instanceConstant();
+  typeLiteral();
+  instantiation();
+  topLevelTearOff();
+  staticTearOff();
+
+  nullLiteralRef();
+  boolLiteralRef();
+  intLiteralRef();
+  doubleLiteralRef();
+  stringLiteralRef();
+  symbolLiteralRef();
+  listLiteralRef();
+  mapLiteralRef();
+  stringMapLiteralRef();
+  setLiteralRef();
+  instanceConstantRef();
+  typeLiteralRef();
+  instantiationRef();
+  topLevelTearOffRef();
+  staticTearOffRef();
+
+  nullLiteralDeferred();
+  boolLiteralDeferred();
+  intLiteralDeferred();
+  doubleLiteralDeferred();
+  stringLiteralDeferred();
+  symbolLiteralDeferred();
+  listLiteralDeferred();
+  mapLiteralDeferred();
+  stringMapLiteralDeferred();
+  setLiteralDeferred();
+  instanceConstantDeferred();
+  typeLiteralDeferred();
+  instantiationDeferred();
+  topLevelTearOffDeferred();
+  staticTearOffDeferred();
+}
+
+/*element: nullLiteral:type=[inst:JSNull]*/
+nullLiteral() {
+  const dynamic local = null;
+  return local;
+}
+
+/*element: boolLiteral:type=[inst:JSBool]*/
+boolLiteral() {
+  const dynamic local = true;
+  return local;
+}
+
+/*element: intLiteral:type=[inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSUInt31,inst:JSUInt32]*/
+intLiteral() {
+  const dynamic local = 42;
+  return local;
+}
+
+/*element: doubleLiteral:type=[inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSUInt31,inst:JSUInt32]*/
+doubleLiteral() {
+  const dynamic local = 0.5;
+  return local;
+}
+
+/*element: stringLiteral:type=[inst:JSString]*/
+stringLiteral() {
+  const dynamic local = "foo";
+  return local;
+}
+
+/*element: symbolLiteral:static=[Symbol.(1)],type=[inst:Symbol]*/
+symbolLiteral() => #foo;
+
+/*element: listLiteral:type=[inst:JSBool,inst:List<bool>]*/
+listLiteral() => const [true, false];
+
+/*element: mapLiteral:type=[inst:ConstantMap<dynamic,dynamic>,inst:ConstantProtoMap<dynamic,dynamic>,inst:ConstantStringMap<dynamic,dynamic>,inst:GeneralConstantMap<dynamic,dynamic>,inst:JSBool]*/
+mapLiteral() => const {true: false};
+
+/*element: stringMapLiteral:type=[inst:ConstantMap<dynamic,dynamic>,inst:ConstantProtoMap<dynamic,dynamic>,inst:ConstantStringMap<dynamic,dynamic>,inst:GeneralConstantMap<dynamic,dynamic>,inst:JSBool,inst:JSString]*/
+stringMapLiteral() => const {'foo': false};
+
+/*element: setLiteral:type=[inst:ConstantMap<dynamic,dynamic>,inst:ConstantProtoMap<dynamic,dynamic>,inst:ConstantStringMap<dynamic,dynamic>,inst:GeneralConstantMap<dynamic,dynamic>,inst:JSBool,inst:_UnmodifiableSet<dynamic>]*/
+setLiteral() => const {true, false};
+
+/*strong.element: instanceConstant:static=[Class.(2)],type=[inst:JSBool]*/
+/*strongConst.element: instanceConstant:
+ static=[Class.field2=BoolConstant(false),SuperClass.field1=BoolConstant(true)],
+ type=[const:Class,inst:JSBool]
+*/
+instanceConstant() => const Class(true, false);
+
+/*element: typeLiteral:static=[createRuntimeType(1)],type=[inst:Type,inst:TypeImpl,lit:String]*/
+typeLiteral() {
+  const dynamic local = String;
+  return local;
+}
+
+/*element: instantiation:static=[extractFunctionTypeObjectFromInternal(1),id,instantiate1(1),instantiatedGenericFunctionType(2)],type=[inst:Instantiation1<dynamic>]*/
+instantiation() {
+  const int Function(int) local = id;
+  return local;
+}
+
+/*element: topLevelTearOff:static=[topLevelMethod]*/
+topLevelTearOff() {
+  const dynamic local = topLevelMethod;
+  return local;
+}
+
+/*element: staticTearOff:static=[Class.staticMethodField]*/
+staticTearOff() {
+  const dynamic local = Class.staticMethodField;
+  return local;
+}
+
+/*strong.element: nullLiteralRef:static=[nullLiteralField]*/
+/*strongConst.element: nullLiteralRef:type=[inst:JSNull]*/
+nullLiteralRef() => nullLiteralField;
+
+/*strong.element: boolLiteralRef:static=[boolLiteralField]*/
+/*strongConst.element: boolLiteralRef:type=[inst:JSBool]*/
+boolLiteralRef() => boolLiteralField;
+
+/*strong.element: intLiteralRef:static=[intLiteralField]*/
+/*strongConst.element: intLiteralRef:type=[inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSUInt31,inst:JSUInt32]*/
+intLiteralRef() => intLiteralField;
+
+/*strong.element: doubleLiteralRef:static=[doubleLiteralField]*/
+/*strongConst.element: doubleLiteralRef:type=[inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSUInt31,inst:JSUInt32]*/
+doubleLiteralRef() => doubleLiteralField;
+
+/*strong.element: stringLiteralRef:static=[stringLiteralField]*/
+/*strongConst.element: stringLiteralRef:type=[inst:JSString]*/
+stringLiteralRef() => stringLiteralField;
+
+/*strong.element: symbolLiteralRef:static=[symbolLiteralField]*/
+/*strongConst.element: symbolLiteralRef:static=[Symbol.(1)],type=[inst:Symbol]*/
+symbolLiteralRef() => symbolLiteralField;
+
+/*strong.element: listLiteralRef:static=[listLiteralField]*/
+/*strongConst.element: listLiteralRef:type=[inst:JSBool,inst:List<bool>]*/
+listLiteralRef() => listLiteralField;
+
+/*strong.element: mapLiteralRef:static=[mapLiteralField]*/
+/*strongConst.element: mapLiteralRef:type=[inst:ConstantMap<dynamic,dynamic>,inst:ConstantProtoMap<dynamic,dynamic>,inst:ConstantStringMap<dynamic,dynamic>,inst:GeneralConstantMap<dynamic,dynamic>,inst:JSBool]*/
+mapLiteralRef() => mapLiteralField;
+
+/*strong.element: stringMapLiteralRef:static=[stringMapLiteralField]*/
+/*strongConst.element: stringMapLiteralRef:type=[inst:ConstantMap<dynamic,dynamic>,inst:ConstantProtoMap<dynamic,dynamic>,inst:ConstantStringMap<dynamic,dynamic>,inst:GeneralConstantMap<dynamic,dynamic>,inst:JSBool,inst:JSString]*/
+stringMapLiteralRef() => stringMapLiteralField;
+
+/*strong.element: setLiteralRef:static=[setLiteralField]*/
+/*strongConst.element: setLiteralRef:type=[inst:ConstantMap<dynamic,dynamic>,inst:ConstantProtoMap<dynamic,dynamic>,inst:ConstantStringMap<dynamic,dynamic>,inst:GeneralConstantMap<dynamic,dynamic>,inst:JSBool,inst:_UnmodifiableSet<dynamic>]*/
+setLiteralRef() => setLiteralField;
+
+/*strong.element: instanceConstantRef:static=[instanceConstantField]*/
+/*strongConst.element: instanceConstantRef:
+ static=[Class.field2=BoolConstant(false),SuperClass.field1=BoolConstant(true)],
+ type=[const:Class,inst:JSBool]
+*/
+instanceConstantRef() => instanceConstantField;
+
+/*strong.element: typeLiteralRef:static=[typeLiteralField]*/
+/*strongConst.element: typeLiteralRef:static=[createRuntimeType(1)],type=[inst:Type,inst:TypeImpl,lit:String]*/
+typeLiteralRef() => typeLiteralField;
+
+/*strong.element: instantiationRef:static=[instantiationField]*/
+/*strongConst.element: instantiationRef:static=[extractFunctionTypeObjectFromInternal(1),id,instantiate1(1),instantiatedGenericFunctionType(2)],type=[inst:Instantiation1<dynamic>]*/
+instantiationRef() => instantiationField;
+
+/*strong.element: topLevelTearOffRef:static=[topLevelTearOffField]*/
+/*strongConst.element: topLevelTearOffRef:static=[topLevelMethod]*/
+topLevelTearOffRef() => topLevelTearOffField;
+
+/*strong.element: staticTearOffRef:static=[staticTearOffField]*/
+/*strongConst.element: staticTearOffRef:static=[Class.staticMethodField]*/
+staticTearOffRef() => staticTearOffField;
+
+/*strong.element: nullLiteralDeferred:static=[nullLiteralField{defer}]*/
+/*strongConst.element: nullLiteralDeferred:type=[inst:JSNull]*/
+nullLiteralDeferred() => defer.nullLiteralField;
+
+/*strong.element: boolLiteralDeferred:static=[boolLiteralField{defer}]*/
+/*strongConst.element: boolLiteralDeferred:type=[inst:JSBool]*/
+boolLiteralDeferred() => defer.boolLiteralField;
+
+/*strong.element: intLiteralDeferred:static=[intLiteralField{defer}]*/
+/*strongConst.element: intLiteralDeferred:type=[inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSUInt31,inst:JSUInt32]*/
+intLiteralDeferred() => defer.intLiteralField;
+
+/*strong.element: doubleLiteralDeferred:static=[doubleLiteralField{defer}]*/
+/*strongConst.element: doubleLiteralDeferred:type=[inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSUInt31,inst:JSUInt32]*/
+doubleLiteralDeferred() => defer.doubleLiteralField;
+
+/*strong.element: stringLiteralDeferred:static=[stringLiteralField{defer}]*/
+/*strongConst.element: stringLiteralDeferred:type=[inst:JSString]*/
+stringLiteralDeferred() => defer.stringLiteralField;
+
+/*strong.element: symbolLiteralDeferred:static=[symbolLiteralField{defer}]*/
+// TODO(johnniwinther): Should we record that this is deferred?
+/*strongConst.element: symbolLiteralDeferred:static=[Symbol.(1)],type=[inst:Symbol]*/
+symbolLiteralDeferred() => defer.symbolLiteralField;
+
+/*strong.element: listLiteralDeferred:static=[listLiteralField{defer}]*/
+// TODO(johnniwinther): Should we record that this is deferred?
+/*strongConst.element: listLiteralDeferred:type=[inst:JSBool,inst:List<bool>]*/
+listLiteralDeferred() => defer.listLiteralField;
+
+/*strong.element: mapLiteralDeferred:static=[mapLiteralField{defer}]*/
+// TODO(johnniwinther): Should we record that this is deferred?
+/*strongConst.element: mapLiteralDeferred:type=[inst:ConstantMap<dynamic,dynamic>,inst:ConstantProtoMap<dynamic,dynamic>,inst:ConstantStringMap<dynamic,dynamic>,inst:GeneralConstantMap<dynamic,dynamic>,inst:JSBool]*/
+mapLiteralDeferred() => defer.mapLiteralField;
+
+/*strong.element: stringMapLiteralDeferred:static=[stringMapLiteralField{defer}]*/
+// TODO(johnniwinther): Should we record that this is deferred?
+/*strongConst.element: stringMapLiteralDeferred:type=[inst:ConstantMap<dynamic,dynamic>,inst:ConstantProtoMap<dynamic,dynamic>,inst:ConstantStringMap<dynamic,dynamic>,inst:GeneralConstantMap<dynamic,dynamic>,inst:JSBool,inst:JSString]*/
+stringMapLiteralDeferred() => defer.stringMapLiteralField;
+
+/*strong.element: setLiteralDeferred:static=[setLiteralField{defer}]*/
+// TODO(johnniwinther): Should we record that this is deferred?
+/*strongConst.element: setLiteralDeferred:type=[inst:ConstantMap<dynamic,dynamic>,inst:ConstantProtoMap<dynamic,dynamic>,inst:ConstantStringMap<dynamic,dynamic>,inst:GeneralConstantMap<dynamic,dynamic>,inst:JSBool,inst:_UnmodifiableSet<dynamic>]*/
+setLiteralDeferred() => defer.setLiteralField;
+
+/*strong.element: instanceConstantDeferred:static=[instanceConstantField{defer}]*/
+/*strongConst.element: instanceConstantDeferred:
+ static=[Class.field2=BoolConstant(false),SuperClass.field1=BoolConstant(true)],
+ type=[const:Class{defer},inst:JSBool]
+*/
+instanceConstantDeferred() => defer.instanceConstantField;
+
+/*strong.element: typeLiteralDeferred:static=[typeLiteralField{defer}]*/
+/*strongConst.element: typeLiteralDeferred:static=[createRuntimeType(1)],type=[inst:Type,inst:TypeImpl,lit:String{defer}]*/
+typeLiteralDeferred() => defer.typeLiteralField;
+
+/*strong.element: instantiationDeferred:static=[instantiationField{defer}]*/
+/*strongConst.element: instantiationDeferred:static=[extractFunctionTypeObjectFromInternal(1),id{defer},instantiate1(1),instantiatedGenericFunctionType(2)],type=[inst:Instantiation1<dynamic>]*/
+instantiationDeferred() => defer.instantiationField;
+
+/*strong.element: topLevelTearOffDeferred:static=[topLevelTearOffField{defer}]*/
+/*strongConst.element: topLevelTearOffDeferred:static=[topLevelMethod{defer}]*/
+topLevelTearOffDeferred() => defer.topLevelTearOffField;
+
+/*strong.element: staticTearOffDeferred:static=[staticTearOffField{defer}]*/
+/*strongConst.element: staticTearOffDeferred:static=[Class.staticMethodField{defer}]*/
+staticTearOffDeferred() => defer.staticTearOffField;
diff --git a/tests/compiler/dart2js/impact/data/constructors.dart b/tests/compiler/dart2js/impact/data/constructors.dart
index 60fb2ae..6f98595 100644
--- a/tests/compiler/dart2js/impact/data/constructors.dart
+++ b/tests/compiler/dart2js/impact/data/constructors.dart
@@ -104,22 +104,26 @@
   new GenericClass<dynamic, dynamic>.redirect();
 }
 
-/*element: testConstRedirectingFactoryInvoke:static=[Class.generative(0)]*/
+/*strong.element: testConstRedirectingFactoryInvoke:static=[Class.generative(0)]*/
+/*strongConst.element: testConstRedirectingFactoryInvoke:type=[const:Class]*/
 testConstRedirectingFactoryInvoke() {
   const Class.redirect();
 }
 
-/*element: testConstRedirectingFactoryInvokeGeneric:static=[GenericClass.generative(0),assertIsSubtype(5),throwTypeError(1)]*/
+/*strong.element: testConstRedirectingFactoryInvokeGeneric:static=[GenericClass.generative(0),assertIsSubtype(5),throwTypeError(1)]*/
+/*strongConst.element: testConstRedirectingFactoryInvokeGeneric:type=[const:GenericClass<int,String>]*/
 testConstRedirectingFactoryInvokeGeneric() {
   const GenericClass<int, String>.redirect();
 }
 
-/*element: testConstRedirectingFactoryInvokeGenericRaw:static=[GenericClass.generative(0)]*/
+/*strong.element: testConstRedirectingFactoryInvokeGenericRaw:static=[GenericClass.generative(0)]*/
+/*strongConst.element: testConstRedirectingFactoryInvokeGenericRaw:type=[const:GenericClass<dynamic,dynamic>]*/
 testConstRedirectingFactoryInvokeGenericRaw() {
   const GenericClass.redirect();
 }
 
-/*element: testConstRedirectingFactoryInvokeGenericDynamic:static=[GenericClass.generative(0)]*/
+/*strong.element: testConstRedirectingFactoryInvokeGenericDynamic:static=[GenericClass.generative(0)]*/
+/*strongConst.element: testConstRedirectingFactoryInvokeGenericDynamic:type=[const:GenericClass<dynamic,dynamic>]*/
 testConstRedirectingFactoryInvokeGenericDynamic() {
   const GenericClass<dynamic, dynamic>.redirect();
 }
@@ -131,7 +135,7 @@
 testImplicitConstructor() => new ClassImplicitConstructor();
 
 class ClassFactoryConstructor {
-  /*strong.element: ClassFactoryConstructor.:type=[inst:JSNull]*/
+  /*element: ClassFactoryConstructor.:type=[inst:JSNull]*/
   factory ClassFactoryConstructor() => null;
 }
 
@@ -142,7 +146,7 @@
   /*element: Class.generative:static=[Object.(0)]*/
   const Class.generative();
 
-  /*strong.element: Class.fact:type=[inst:JSNull]*/
+  /*element: Class.fact:type=[inst:JSNull]*/
   factory Class.fact() => null;
 
   const factory Class.redirect() = Class.generative;
@@ -152,7 +156,7 @@
   /*element: GenericClass.generative:static=[Object.(0)]*/
   const GenericClass.generative();
 
-  /*strong.element: GenericClass.fact:type=[inst:JSBool,inst:JSNull,param:Object]*/
+  /*element: GenericClass.fact:type=[inst:JSBool,inst:JSNull,param:Object]*/
   factory GenericClass.fact() => null;
 
   const factory GenericClass.redirect() = GenericClass<X, Y>.generative;
diff --git a/tests/compiler/dart2js/impact/data/initializers.dart b/tests/compiler/dart2js/impact/data/initializers.dart
index d8e2fd5..3f954f9 100644
--- a/tests/compiler/dart2js/impact/data/initializers.dart
+++ b/tests/compiler/dart2js/impact/data/initializers.dart
@@ -29,9 +29,11 @@
 }
 
 /*strong.element: testDefaultValuesPositional:type=[inst:JSBool,param:bool]*/
+/*strongConst.element: testDefaultValuesPositional:type=[inst:JSBool,param:bool]*/
 testDefaultValuesPositional([bool value = false]) {}
 
 /*strong.element: testDefaultValuesNamed:type=[inst:JSBool,param:bool]*/
+/*strongConst.element: testDefaultValuesNamed:type=[inst:JSBool,param:bool]*/
 testDefaultValuesNamed({bool value: false}) {}
 
 class ClassFieldInitializer1 {
@@ -84,7 +86,7 @@
 
 /*element: ClassInstanceFieldWithInitializer.:static=[Object.(0)]*/
 class ClassInstanceFieldWithInitializer {
-  /*strong.element: ClassInstanceFieldWithInitializer.field:type=[inst:JSBool,param:bool]*/
+  /*element: ClassInstanceFieldWithInitializer.field:type=[inst:JSBool,param:bool]*/
   var field = false;
 }
 
@@ -93,7 +95,7 @@
 
 /*element: ClassInstanceFieldTyped.:static=[Object.(0)]*/
 class ClassInstanceFieldTyped {
-  /*strong.element: ClassInstanceFieldTyped.field:type=[inst:JSBool,inst:JSNull,param:int]*/
+  /*element: ClassInstanceFieldTyped.field:type=[inst:JSBool,inst:JSNull,param:int]*/
   int field;
 }
 
@@ -120,7 +122,7 @@
 testSuperInitializer() => new ClassSuperInitializer();
 
 class ClassGeneric<T> {
-  /*strong.element: ClassGeneric.:
+  /*element: ClassGeneric.:
    static=[
     Object.(0),
     checkSubtype(4),
diff --git a/tests/compiler/dart2js/impact/data/injected_cast.dart b/tests/compiler/dart2js/impact/data/injected_cast.dart
new file mode 100644
index 0000000..526414c
--- /dev/null
+++ b/tests/compiler/dart2js/impact/data/injected_cast.dart
@@ -0,0 +1,220 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class A {}
+
+class B {}
+
+class C {}
+
+class D {}
+
+class E {}
+
+/*element: Class1.:static=[Object.(0)]*/
+class Class1 {
+  /*element: Class1.field1:type=[inst:JSBool,inst:JSNull,param:A]*/
+  A field1;
+}
+
+/*element: method1:
+ dynamic=[Class1.field1=],
+ type=[
+  impl:A,
+  inst:JSBool,
+  is:Class1]
+*/
+method1(dynamic o, dynamic value) {
+  if (o is! Class1) return;
+  o.field1 = value;
+}
+
+/*element: Class2.:static=[Object.(0)]*/
+class Class2<T> {
+  /*element: Class2.field2:
+   static=*,
+   type=[inst:*,param:Class2.T]
+   */
+  T field2;
+}
+
+/*element: method2:
+ dynamic=[Class2.field2=],
+ static=*,
+ type=[
+  impl:A,
+  inst:*,
+  is:Class2<A>]
+*/
+method2(dynamic o, dynamic value) {
+  if (o is! Class2<A>) return;
+  o.field2 = value;
+}
+
+/*element: Class3.:static=[Object.(0)]*/
+class Class3 {
+  /*element: Class3.method3:type=[inst:JSBool,inst:JSNull,param:A,param:B,param:C]*/
+  method3(A a, [B b, C c]) {}
+}
+
+/*element: method3:
+ dynamic=[Class3.method3(3)],
+ type=[
+  impl:A,
+  impl:C,
+  inst:JSBool,
+  is:Class3,
+  param:B]
+*/
+method3(dynamic o, dynamic a, B b, dynamic c) {
+  if (o is! Class3) return;
+  o.method3(a, b, c);
+}
+
+/*element: Class4.:static=[Object.(0)]*/
+class Class4 {
+  /*element: Class4.method4:
+   type=[inst:JSBool,inst:JSNull,param:A,param:B,param:C]
+  */
+  method4(A a, {B b, C c}) {}
+}
+
+/*element: method4:
+ dynamic=[Class4.method4(1,b,c)],
+ type=[
+  impl:A,
+  impl:C,
+  inst:JSBool,
+  is:Class4,
+  param:B]
+*/
+method4(dynamic o, dynamic a, B b, dynamic c) {
+  if (o is! Class4) return;
+  o.method4(a, c: c, b: b);
+}
+
+/*element: Class5.:static=[Object.(0)]*/
+class Class5<T1, T2> {
+  /*element: Class5.method5:
+   static=*,
+   type=[
+    inst:*,
+    param:C,
+    param:Class5.T1,
+    param:Class5.T2,
+    param:Object,
+    param:method5.S1,
+    param:method5.S2]
+  */
+  method5<S1, S2>(T1 a, [T2 b, C c, S1 d, S2 e]) {}
+}
+
+/*element: method5:
+ dynamic=[Class5.method5<D,E>(5)],
+ static=*,
+ type=[
+  impl:A,
+  impl:D,
+  inst:*,
+  is:Class5<A,B>,
+  param:B,
+  param:C,
+  param:E]
+*/
+method5(dynamic o, dynamic a, B b, C c, dynamic d, E e) {
+  if (o is! Class5<A, B>) return;
+  o.method5<D, E>(a, b, c, d, e);
+}
+
+/*element: Class6.:static=[Object.(0)]*/
+class Class6<T1, T2> {
+  /*element: Class6.method6:
+   static=*,
+   type=[
+    inst:*,
+    param:C,
+    param:Class6.T1,
+    param:Class6.T2,
+    param:Object,
+    param:method6.S1,
+    param:method6.S2]
+  */
+  method6<S1, S2>(T1 a, {T2 b, C c, S1 d, S2 e}) {}
+}
+
+/*element: method6:
+ dynamic=[Class6.method6<D,E>(1,b,c,d,e)],
+ static=*,
+ type=[
+  impl:A,
+  impl:D,
+  inst:*,
+  is:Class6<A,B>,
+  param:B,
+  param:C,
+  param:E]
+*/
+method6(dynamic o, dynamic a, B b, C c, dynamic d, E e) {
+  if (o is! Class6<A, B>) return;
+  o.method6<D, E>(a, d: d, b: b, e: e, c: c);
+}
+
+/*element: Class7.:static=[Object.(0)]*/
+class Class7 {
+  /*element: Class7.f:type=[inst:JSNull]*/
+  A Function(A) get f => null;
+}
+
+/*element: method7:
+ dynamic=[Class7.f(1),call(1)],
+ type=[impl:A,inst:JSBool,is:Class7]
+*/
+method7(dynamic o, dynamic a) {
+  if (o is! Class7) return;
+  o.f(a);
+}
+
+/*element: F.:static=[Object.(0)]*/
+class F<T> {
+  /*element: F.method:static=*,type=[inst:*,param:List<F.T>]*/
+  T method(List<T> list) => null;
+
+  /*element: F.field:static=*,type=[inst:*,param:F.T]*/
+  T field;
+}
+
+/*element: G.:static=[F.(0)]*/
+class G extends F<int> {}
+
+/*element: method8:
+ dynamic=[G.method(1)],
+ static=*,
+ type=[impl:List<int>,inst:*,is:G,param:Iterable<int>]
+*/
+method8(dynamic g, Iterable<int> iterable) {
+  if (g is! G) return null;
+  return g.method(iterable);
+}
+
+/*element: method9:
+ dynamic=[G.field=],
+ type=[impl:int,inst:JSBool,inst:JSNull,is:G,param:num]
+*/
+method9(dynamic g, num value) {
+  if (g is! G) return null;
+  return g.field = value;
+}
+
+/*element: main:**/
+main() {
+  method1(new Class1(), null);
+  method2(new Class2<A>(), null);
+  method3(new Class3(), null, null, null);
+  method4(new Class4(), null, null, null);
+  method5(new Class5<A, B>(), null, null, null, null, null);
+  method6(new Class6<A, B>(), null, null, null, null, null);
+  method7(new Class7(), null);
+  method8(new G(), null);
+  method9(new G(), null);
+}
diff --git a/tests/compiler/dart2js/impact/data/invokes.dart b/tests/compiler/dart2js/impact/data/invokes.dart
index aa2b472..8a2c534 100644
--- a/tests/compiler/dart2js/impact/data/invokes.dart
+++ b/tests/compiler/dart2js/impact/data/invokes.dart
@@ -115,10 +115,10 @@
   topLevelFunction3(15, c: 16, b: 17);
 }
 
-/*strong.element: topLevelFunction1Typed:type=[inst:JSBool,param:int]*/
+/*element: topLevelFunction1Typed:type=[inst:JSBool,param:int]*/
 void topLevelFunction1Typed(int a) {}
 
-/*strong.element: topLevelFunction2Typed:
+/*element: topLevelFunction2Typed:
  type=[
   inst:JSBool,
   inst:JSNull,
@@ -128,7 +128,7 @@
 */
 int topLevelFunction2Typed(String a, [num b, double c]) => null;
 
-/*strong.element: topLevelFunction3Typed:
+/*element: topLevelFunction3Typed:
  static=[
   checkSubtype(4),
   getRuntimeTypeArgument(3),
@@ -152,7 +152,7 @@
   return null;
 }
 
-/*strong.element: testTopLevelInvokeTyped:
+/*element: testTopLevelInvokeTyped:
  static=[
   topLevelFunction1Typed(1),
   topLevelFunction2Typed(1),
@@ -188,7 +188,7 @@
   topLevelFunction3Typed(false, c: {'16': false}, b: [17]);
 }
 
-/*strong.element: topLevelFunctionTyped1:
+/*element: topLevelFunctionTyped1:
  static=[
   checkSubtype(4),
   getRuntimeTypeArgument(3),
@@ -207,7 +207,7 @@
 */
 topLevelFunctionTyped1(void a(num b)) {}
 
-/*strong.element: topLevelFunctionTyped2:
+/*element: topLevelFunctionTyped2:
  static=[
   checkSubtype(4),
   getRuntimeTypeArgument(3),
@@ -226,7 +226,7 @@
 */
 topLevelFunctionTyped2(void a(num b, [String c])) {}
 
-/*strong.element: topLevelFunctionTyped3:
+/*element: topLevelFunctionTyped3:
  static=[
   checkSubtype(4),
   getRuntimeTypeArgument(3),
@@ -245,7 +245,7 @@
 */
 topLevelFunctionTyped3(void a(num b, {String c, int d})) {}
 
-/*strong.element: topLevelFunctionTyped4:
+/*element: topLevelFunctionTyped4:
  static=[
   checkSubtype(4),
   getRuntimeTypeArgument(3),
@@ -288,7 +288,7 @@
 /*element: testTopLevelGetterGet:static=[topLevelGetter]*/
 testTopLevelGetterGet() => topLevelGetter;
 
-/*strong.element: topLevelGetterTyped:type=[inst:JSNull]*/
+/*element: topLevelGetterTyped:type=[inst:JSNull]*/
 int get topLevelGetterTyped => null;
 
 /*element: testTopLevelGetterGetTyped:static=[topLevelGetterTyped]*/
@@ -300,7 +300,7 @@
 /*element: testTopLevelSetterSet:static=[set:topLevelSetter],type=[inst:JSNull]*/
 testTopLevelSetterSet() => topLevelSetter = null;
 
-/*strong.element: topLevelSetterTyped=:type=[inst:JSBool,param:int]*/
+/*element: topLevelSetterTyped=:type=[inst:JSBool,param:int]*/
 void set topLevelSetterTyped(int value) {}
 
 /*element: testTopLevelSetterSetTyped:static=[set:topLevelSetterTyped],type=[inst:JSNull]*/
@@ -318,10 +318,11 @@
 /*element: testTopLevelFieldLazy:static=[topLevelFieldLazy]*/
 testTopLevelFieldLazy() => topLevelFieldLazy;
 
-/*element: topLevelFieldConst:type=[inst:JSNull]*/
+/*strong.element: topLevelFieldConst:type=[inst:JSNull]*/
 const topLevelFieldConst = null;
 
-/*element: testTopLevelFieldConst:static=[topLevelFieldConst]*/
+/*strong.element: testTopLevelFieldConst:static=[topLevelFieldConst]*/
+/*strongConst.element: testTopLevelFieldConst:type=[inst:JSNull]*/
 testTopLevelFieldConst() => topLevelFieldConst;
 
 /*element: topLevelFieldFinal:static=[throwCyclicInit(1),topLevelFunction1(1)],type=[inst:JSNull]*/
@@ -330,25 +331,25 @@
 /*element: testTopLevelFieldFinal:static=[topLevelFieldFinal]*/
 testTopLevelFieldFinal() => topLevelFieldFinal;
 
-/*strong.element: topLevelFieldTyped:type=[inst:JSBool,inst:JSNull,param:int]*/
+/*element: topLevelFieldTyped:type=[inst:JSBool,inst:JSNull,param:int]*/
 int topLevelFieldTyped;
 
 /*element: testTopLevelFieldTyped:static=[topLevelFieldTyped]*/
 testTopLevelFieldTyped() => topLevelFieldTyped;
 
-/*strong.element: topLevelFieldGeneric1:type=[inst:JSBool,inst:JSNull,param:GenericClass<dynamic,dynamic>]*/
+/*element: topLevelFieldGeneric1:type=[inst:JSBool,inst:JSNull,param:GenericClass<dynamic,dynamic>]*/
 GenericClass topLevelFieldGeneric1;
 
 /*element: testTopLevelFieldGeneric1:static=[topLevelFieldGeneric1]*/
 testTopLevelFieldGeneric1() => topLevelFieldGeneric1;
 
-/*strong.element: topLevelFieldGeneric2:type=[inst:JSBool,inst:JSNull,param:GenericClass<dynamic,dynamic>]*/
+/*element: topLevelFieldGeneric2:type=[inst:JSBool,inst:JSNull,param:GenericClass<dynamic,dynamic>]*/
 GenericClass<dynamic, dynamic> topLevelFieldGeneric2;
 
 /*element: testTopLevelFieldGeneric2:static=[topLevelFieldGeneric2]*/
 testTopLevelFieldGeneric2() => topLevelFieldGeneric2;
 
-/*strong.element: topLevelFieldGeneric3:
+/*element: topLevelFieldGeneric3:
  static=[
   checkSubtype(4),
   getRuntimeTypeArgument(3),
@@ -456,7 +457,7 @@
   var l = 42;
 }
 
-/*strong.element: testLocalWithInitializerTyped:
+/*element: testLocalWithInitializerTyped:
  type=[
   inst:JSDouble,
   inst:JSInt,
@@ -470,7 +471,7 @@
   int l = 42;
 }
 
-/*strong.element: testLocalFunction:
+/*element: testLocalFunction:
  static=[
   computeSignature(3),
   def:localFunction,
@@ -490,7 +491,7 @@
   localFunction() {}
 }
 
-/*strong.element: testLocalFunctionTyped:
+/*element: testLocalFunctionTyped:
  static=[
   computeSignature(3),
   def:localFunction,
@@ -511,7 +512,7 @@
   int localFunction(String a) => null;
 }
 
-/*strong.element: testLocalFunctionInvoke:
+/*element: testLocalFunctionInvoke:
  dynamic=[call(0)],
  static=[computeSignature(3),
   def:localFunction,
@@ -530,7 +531,7 @@
   localFunction();
 }
 
-/*strong.element: testLocalFunctionGet:static=[computeSignature(3),
+/*element: testLocalFunctionGet:static=[computeSignature(3),
   def:localFunction,
   getRuntimeTypeArguments(3),
   getRuntimeTypeInfo(1),
@@ -546,7 +547,7 @@
   localFunction;
 }
 
-/*strong.element: testClosure:static=[computeSignature(3),
+/*element: testClosure:static=[computeSignature(3),
   def:<anonymous>,
   getRuntimeTypeArguments(3),
   getRuntimeTypeInfo(1),
@@ -561,7 +562,7 @@
   () {};
 }
 
-/*strong.element: testClosureInvoke:
+/*element: testClosureInvoke:
  dynamic=[call(0)],
  static=[computeSignature(3),
   def:<anonymous>,
diff --git a/tests/compiler/dart2js/impact/data/jsinterop.dart b/tests/compiler/dart2js/impact/data/jsinterop.dart
index 8e77d6ac..4eccd23 100644
--- a/tests/compiler/dart2js/impact/data/jsinterop.dart
+++ b/tests/compiler/dart2js/impact/data/jsinterop.dart
@@ -7,14 +7,19 @@
 
 import 'package:js/js.dart';
 
-/*element: main:static=[testJsInteropClass(0),testJsInteropMethod(0),testOptionalGenericFunctionTypeArgument(0)]*/
+/*element: main:
+ static=[
+  testJsInteropClass(0),
+  testJsInteropMethod(0),
+  testOptionalGenericFunctionTypeArgument(0)]
+*/
 main() {
   testOptionalGenericFunctionTypeArgument();
   testJsInteropMethod();
   testJsInteropClass();
 }
 
-/*strong.element: testJsInteropMethod:*/
+/*element: testJsInteropMethod:*/
 @JS()
 external int testJsInteropMethod();
 
@@ -23,7 +28,7 @@
   /*element: JsInteropClass.:static=[JavaScriptObject.(0)]*/
   external JsInteropClass();
 
-  /*strong.element: JsInteropClass.method:
+  /*element: JsInteropClass.method:
    type=[
     native:ApplicationCacheErrorEvent,
     native:DomError,
@@ -43,7 +48,7 @@
   external double method();
 }
 
-/*strong.element: testJsInteropClass:
+/*element: testJsInteropClass:
  dynamic=[JavaScriptObject.method(0)],
  static=[JsInteropClass.(0)]
 */
@@ -54,7 +59,7 @@
 /*element: GenericClass.:static=[JavaScriptObject.(0)]*/
 @JS()
 class GenericClass<T> {
-  /*strong.element: GenericClass.method:
+  /*element: GenericClass.method:
    static=[
     checkSubtype(4),
     getRuntimeTypeArgument(3),
@@ -75,7 +80,7 @@
   external GenericClass method([Callback<T> callback]);
 }
 
-/*strong.element: testOptionalGenericFunctionTypeArgument:
+/*element: testOptionalGenericFunctionTypeArgument:
  dynamic=[JavaScriptObject.method(0)],
  static=[GenericClass.(0)]
 */
diff --git a/tests/compiler/dart2js/impact/data/literals.dart b/tests/compiler/dart2js/impact/data/literals.dart
index 925896a0..c0e5f7d 100644
--- a/tests/compiler/dart2js/impact/data/literals.dart
+++ b/tests/compiler/dart2js/impact/data/literals.dart
@@ -86,10 +86,11 @@
 */
 testStringInterpolation() => '${true}';
 
-/*element: testStringInterpolationConst:
+/*strong.element: testStringInterpolationConst:
  dynamic=[toString(0)],
  static=[S(1)],type=[inst:JSBool,inst:JSString]
 */
+/*strongConst.element: testStringInterpolationConst:type=[inst:JSString]*/
 testStringInterpolationConst() {
   const b = '${true}';
   return b;
@@ -105,10 +106,11 @@
 /*element: testSymbol:static=[Symbol.(1)],type=[inst:Symbol]*/
 testSymbol() => #main;
 
-/*element: testConstSymbol:
+/*strong.element: testConstSymbol:
  static=[Symbol.(1),Symbol.(1),Symbol.validated(1)],
  type=[inst:JSString,inst:Symbol]
 */
+/*strongConst.element: testConstSymbol:static=[Symbol.(1)],type=[inst:Symbol]*/
 testConstSymbol() => const Symbol('main');
 
 /*strong.element: complexSymbolField1:
@@ -190,13 +192,15 @@
  static=[Symbol.(1),Symbol.(1),Symbol.validated(1),complexSymbolField],
  type=[impl:String,inst:JSBool,inst:Symbol]
 */
+/*strongConst.element: testComplexConstSymbol:static=[Symbol.(1)],type=[inst:Symbol]*/
 testComplexConstSymbol() => const Symbol(complexSymbolField);
 
-/*element: testIfNullConstSymbol:
+/*strong.element: testIfNullConstSymbol:
  dynamic=[Null.==],
  static=[Symbol.(1),Symbol.(1),Symbol.validated(1)],
  type=[inst:JSNull,inst:JSString,inst:Symbol]
 */
+/*strongConst.element: testIfNullConstSymbol:static=[Symbol.(1)],type=[inst:Symbol]*/
 testIfNullConstSymbol() => const Symbol(null ?? 'foo');
 
 /*element: testTypeLiteral:
@@ -205,7 +209,8 @@
 */
 testTypeLiteral() => Object;
 
-/*element: testBoolFromEnvironment:static=[bool.fromEnvironment(1)],type=[inst:JSString]*/
+/*strong.element: testBoolFromEnvironment:static=[bool.fromEnvironment(1)],type=[inst:JSString]*/
+/*strongConst.element: testBoolFromEnvironment:type=[inst:JSBool]*/
 testBoolFromEnvironment() => const bool.fromEnvironment('FOO');
 
 /*element: testEmptyListLiteral:type=[inst:List<dynamic>]*/
@@ -214,13 +219,13 @@
 /*element: testEmptyListLiteralDynamic:type=[inst:List<dynamic>]*/
 testEmptyListLiteralDynamic() => <dynamic>[];
 
-/*strong.element: testEmptyListLiteralTyped:type=[inst:List<String>]*/
+/*element: testEmptyListLiteralTyped:type=[inst:List<String>]*/
 testEmptyListLiteralTyped() => <String>[];
 
 /*element: testEmptyListLiteralConstant:type=[inst:List<dynamic>]*/
 testEmptyListLiteralConstant() => const [];
 
-/*strong.element: testNonEmptyListLiteral:type=[inst:JSBool,inst:List<bool>]*/
+/*element: testNonEmptyListLiteral:type=[inst:JSBool,inst:List<bool>]*/
 testNonEmptyListLiteral() => [true];
 
 /*element: testEmptyMapLiteral:type=[inst:Map<dynamic,dynamic>]*/
@@ -229,7 +234,7 @@
 /*element: testEmptyMapLiteralDynamic:type=[inst:Map<dynamic,dynamic>]*/
 testEmptyMapLiteralDynamic() => <dynamic, dynamic>{};
 
-/*strong.element: testEmptyMapLiteralTyped:type=[inst:Map<String,int>]*/
+/*element: testEmptyMapLiteralTyped:type=[inst:Map<String,int>]*/
 testEmptyMapLiteralTyped() => <String, int>{};
 
 /*element: testEmptyMapLiteralConstant:
@@ -237,13 +242,14 @@
  inst:ConstantMap<dynamic,dynamic>,
  inst:ConstantProtoMap<dynamic,dynamic>,
  inst:ConstantStringMap<dynamic,dynamic>,
- inst:GeneralConstantMap<dynamic,dynamic>]*/
+ inst:GeneralConstantMap<dynamic,dynamic>]
+*/
 testEmptyMapLiteralConstant() => const {};
 
-/*strong.element: testNonEmptyMapLiteral:type=[inst:JSBool,inst:JSNull,inst:Map<Null,bool>]*/
+/*element: testNonEmptyMapLiteral:type=[inst:JSBool,inst:JSNull,inst:Map<Null,bool>]*/
 testNonEmptyMapLiteral() => {null: true};
 
 class GenericClass<X, Y> {
-  /*element: GenericClass.generative:static=[Object.(0)]*/
+  /*strong.element: GenericClass.generative:static=[Object.(0)]*/
   const GenericClass.generative();
 }
diff --git a/tests/compiler/dart2js/impact/data/native.dart b/tests/compiler/dart2js/impact/data/native.dart
index b314794..2f9884d 100644
--- a/tests/compiler/dart2js/impact/data/native.dart
+++ b/tests/compiler/dart2js/impact/data/native.dart
@@ -22,7 +22,7 @@
   testNativeMethodReturns();
 }
 
-/*strong.element: testJSCall:
+/*element: testJSCall:
  static=[JS<dynamic>(3)],
  type=[inst:JSNull,inst:JSString,native:bool,native:int]
 */
@@ -56,7 +56,7 @@
 
 @Native("NativeClass")
 class NativeClass {
-  /*strong.element: NativeClass.field:
+  /*element: NativeClass.field:
    type=[
     inst:JSBool,
     inst:JSNull,
@@ -76,7 +76,7 @@
   }
 }
 
-/*strong.element: testNativeField:
+/*element: testNativeField:
  dynamic=[NativeClass.field],
  static=[defineProperty(3)],
  type=[inst:JSBool,param:NativeClass]
diff --git a/tests/compiler/dart2js/impact/data/statements.dart b/tests/compiler/dart2js/impact/data/statements.dart
index 4603006..3b5e240 100644
--- a/tests/compiler/dart2js/impact/data/statements.dart
+++ b/tests/compiler/dart2js/impact/data/statements.dart
@@ -65,7 +65,7 @@
     return 1;
 }
 
-/*strong.element: testForIn:
+/*element: testForIn:
  dynamic=[
   current,
   iterator,
@@ -82,7 +82,7 @@
   for (var e in o) {}
 }
 
-/*strong.element: testForInTyped:
+/*element: testForInTyped:
  dynamic=[
   current,
   iterator,
diff --git a/tests/compiler/dart2js/impact/impact_test.dart b/tests/compiler/dart2js/impact/impact_test.dart
index 2dc7d40..27f2ea9 100644
--- a/tests/compiler/dart2js/impact/impact_test.dart
+++ b/tests/compiler/dart2js/impact/impact_test.dart
@@ -9,7 +9,6 @@
 import 'package:compiler/src/elements/entities.dart';
 import 'package:compiler/src/ir/util.dart';
 import 'package:compiler/src/kernel/kernel_strategy.dart';
-import 'package:compiler/src/kernel/element_map_impl.dart';
 import 'package:compiler/src/universe/feature.dart';
 import 'package:compiler/src/universe/use.dart';
 import 'package:compiler/src/universe/world_impact.dart';
@@ -21,17 +20,26 @@
 main(List<String> args) {
   asyncTest(() async {
     Directory dataDir = new Directory.fromUri(Platform.script.resolve('data'));
+    Directory libDirectory =
+        new Directory.fromUri(Platform.script.resolve('libs'));
     print('Testing direct computation of ResolutionImpact');
     print('==================================================================');
     useImpactDataForTesting = false;
     await checkTests(dataDir, const ImpactDataComputer(),
-        args: args, testOmit: false, testFrontend: true);
+        libDirectory: libDirectory,
+        args: args,
+        testOmit: false,
+        testFrontend: true);
 
     print('Testing computation of ResolutionImpact through ImpactData');
     print('==================================================================');
     useImpactDataForTesting = true;
     await checkTests(dataDir, const ImpactDataComputer(),
-        args: args, testOmit: false, testFrontend: true);
+        libDirectory: libDirectory,
+        args: args,
+        testOmit: false,
+        testFrontend: true,
+        testCFEConstants: true);
   });
 }
 
diff --git a/tests/compiler/dart2js/impact/libs/constants_lib.dart b/tests/compiler/dart2js/impact/libs/constants_lib.dart
new file mode 100644
index 0000000..051cbea
--- /dev/null
+++ b/tests/compiler/dart2js/impact/libs/constants_lib.dart
@@ -0,0 +1,94 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/*strong.element: nullLiteralField:type=[inst:JSNull]*/
+const dynamic nullLiteralField = null;
+
+/*strong.element: boolLiteralField:type=[inst:JSBool]*/
+const dynamic boolLiteralField = true;
+
+/*strong.element: intLiteralField:type=[inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSUInt31,inst:JSUInt32]*/
+const dynamic intLiteralField = 42;
+
+/*strong.element: doubleLiteralField:type=[inst:JSDouble,inst:JSInt,inst:JSNumber,inst:JSPositiveInt,inst:JSUInt31,inst:JSUInt32]*/
+const dynamic doubleLiteralField = 0.5;
+
+/*strong.element: stringLiteralField:type=[inst:JSString]*/
+const dynamic stringLiteralField = "foo";
+
+/*strong.element: symbolLiteralField:static=[Symbol.(1)],type=[inst:Symbol]*/
+const dynamic symbolLiteralField = #foo;
+
+/*strong.element: listLiteralField:type=[inst:JSBool,inst:List<bool>]*/
+const dynamic listLiteralField = [true, false];
+
+/*strong.element: mapLiteralField:type=[inst:ConstantMap<dynamic,dynamic>,inst:ConstantProtoMap<dynamic,dynamic>,inst:ConstantStringMap<dynamic,dynamic>,inst:GeneralConstantMap<dynamic,dynamic>,inst:JSBool]*/
+const dynamic mapLiteralField = {true: false};
+
+/*strong.element: stringMapLiteralField:type=[inst:ConstantMap<dynamic,dynamic>,inst:ConstantProtoMap<dynamic,dynamic>,inst:ConstantStringMap<dynamic,dynamic>,inst:GeneralConstantMap<dynamic,dynamic>,inst:JSBool,inst:JSString]*/
+const dynamic stringMapLiteralField = {'foo': false};
+
+/*strong.element: setLiteralField:type=[inst:ConstantMap<dynamic,dynamic>,inst:ConstantProtoMap<dynamic,dynamic>,inst:ConstantStringMap<dynamic,dynamic>,inst:GeneralConstantMap<dynamic,dynamic>,inst:JSBool,inst:_UnmodifiableSet<dynamic>]*/
+const dynamic setLiteralField = {true, false};
+
+class SuperClass {
+  /*element: SuperClass.field1:type=[inst:JSNull]*/
+  final field1;
+
+  /*strong.element: SuperClass.:static=[Object.(0),init:SuperClass.field1]*/
+  const SuperClass(this.field1);
+}
+
+class Class extends SuperClass {
+  /*element: Class.field2:type=[inst:JSNull]*/
+  final field2;
+
+  /*strong.element: Class.:static=[SuperClass.(1),init:Class.field2]*/
+  const Class(field1, this.field2) : super(field1);
+
+  static staticMethodField() {}
+}
+
+/*strong.element: instanceConstantField:static=[Class.(2)],type=[inst:JSBool,param:Class]*/
+const instanceConstantField = const Class(true, false);
+
+/*strong.element: typeLiteralField:static=[createRuntimeType(1)],type=[inst:JSBool,inst:Type,inst:TypeImpl,lit:String,param:Type]*/
+const typeLiteralField = String;
+
+/*element: id:static=[checkSubtype(4),checkSubtypeOfRuntimeType(2),getRuntimeTypeArgument(3),getRuntimeTypeArgumentIntercepted(4),getRuntimeTypeInfo(1),getTypeArgumentByIndex(2),setRuntimeTypeInfo(2)],type=[inst:JSArray<dynamic>,inst:JSBool,inst:JSExtendableArray<dynamic>,inst:JSFixedArray<dynamic>,inst:JSMutableArray<dynamic>,inst:JSUnmodifiableArray<dynamic>,param:Object,param:id.T]*/
+T id<T>(T t) => t;
+
+/*strong.element: _instantiation:
+ static=[
+  checkSubtype(4),
+  extractFunctionTypeObjectFromInternal(1),
+  getRuntimeTypeArgument(3),
+  getRuntimeTypeArgumentIntercepted(4),
+  getRuntimeTypeInfo(1),
+  getTypeArgumentByIndex(2),
+  id,instantiate1(1),
+  instantiatedGenericFunctionType(2),
+  setRuntimeTypeInfo(2)],
+ type=[
+  inst:Instantiation1<dynamic>,
+  inst:JSArray<dynamic>,
+  inst:JSBool,
+  inst:JSExtendableArray<dynamic>,
+  inst:JSFixedArray<dynamic>,
+  inst:JSMutableArray<dynamic>,
+  inst:JSUnmodifiableArray<dynamic>,
+  param:int Function(int)]
+*/
+const int Function(int) _instantiation = id;
+
+/*strong.element: instantiationField:static=[_instantiation]*/
+const dynamic instantiationField = _instantiation;
+
+topLevelMethod() {}
+
+/*strong.element: topLevelTearOffField:static=[topLevelMethod]*/
+const dynamic topLevelTearOffField = topLevelMethod;
+
+/*strong.element: staticTearOffField:static=[Class.staticMethodField]*/
+const dynamic staticTearOffField = Class.staticMethodField;
diff --git a/tests/compiler/dart2js/inference/data/call_method_function_typed_value.dart b/tests/compiler/dart2js/inference/data/call_method_function_typed_value.dart
index a70e567..9fc9e74 100644
--- a/tests/compiler/dart2js/inference/data/call_method_function_typed_value.dart
+++ b/tests/compiler/dart2js/inference/data/call_method_function_typed_value.dart
@@ -11,6 +11,8 @@
         int
             /*strong.[null|subclass=Object]*/
             /*omit.[null|subclass=JSInt]*/
+            /*strongConst.[null|subclass=Object]*/
+            /*omitConst.[null|subclass=JSInt]*/
             i) =>
     2 /*invoke: [exact=JSUInt31]*/ * i;
 
diff --git a/tests/compiler/dart2js/inference/data/catch.dart b/tests/compiler/dart2js/inference/data/catch.dart
index d468579..46a150a 100644
--- a/tests/compiler/dart2js/inference/data/catch.dart
+++ b/tests/compiler/dart2js/inference/data/catch.dart
@@ -13,9 +13,9 @@
 /// Untyped catch clause.
 ////////////////////////////////////////////////////////////////////////////////
 
-/*element: catchUntyped:[null|subclass=Object]*/
+/*element: catchUntyped:[subclass=Object]*/
 catchUntyped() {
-  var local;
+  dynamic local = 0;
   try {} catch (e) {
     local = e;
   }
diff --git a/tests/compiler/dart2js/inference/data/closure_tracer_28919.dart b/tests/compiler/dart2js/inference/data/closure_tracer_28919.dart
index 7f88ade..6bc222f 100644
--- a/tests/compiler/dart2js/inference/data/closure_tracer_28919.dart
+++ b/tests/compiler/dart2js/inference/data/closure_tracer_28919.dart
@@ -57,6 +57,8 @@
         /*[null]*/ (int
             /*strong.[null|subclass=Object]*/
             /*omit.[null|subclass=JSInt]*/
+            /*strongConst.[null|subclass=Object]*/
+            /*omitConst.[null|subclass=JSInt]*/
             x) {
       res = x;
       sum = x /*invoke: [null|subclass=JSInt]*/ + i;
diff --git a/tests/compiler/dart2js/inference/data/const_closure.dart b/tests/compiler/dart2js/inference/data/const_closure.dart
index 137c2b7..8425f4d 100644
--- a/tests/compiler/dart2js/inference/data/const_closure.dart
+++ b/tests/compiler/dart2js/inference/data/const_closure.dart
@@ -13,10 +13,12 @@
   return a;
 }
 
-/*element: foo1:[subclass=Closure]*/
+/*strong.element: foo1:[subclass=Closure]*/
+/*omit.element: foo1:[subclass=Closure]*/
 const foo1 = method1;
 
-/*element: foo2:[subclass=Closure]*/
+/*strong.element: foo2:[subclass=Closure]*/
+/*omit.element: foo2:[subclass=Closure]*/
 const foo2 = method2;
 
 /*element: returnInt1:[null|subclass=Object]*/
diff --git a/tests/compiler/dart2js/inference/data/const_closure2.dart b/tests/compiler/dart2js/inference/data/const_closure2.dart
index 26b76ff..207a431 100644
--- a/tests/compiler/dart2js/inference/data/const_closure2.dart
+++ b/tests/compiler/dart2js/inference/data/const_closure2.dart
@@ -8,7 +8,8 @@
   return a;
 }
 
-/*element: foo:[subclass=Closure]*/
+/*strong.element: foo:[subclass=Closure]*/
+/*omit.element: foo:[subclass=Closure]*/
 const foo = method;
 
 /*element: returnNum:[null|subclass=Object]*/
diff --git a/tests/compiler/dart2js/inference/data/const_closure3.dart b/tests/compiler/dart2js/inference/data/const_closure3.dart
index 74b97a0..79a36f0 100644
--- a/tests/compiler/dart2js/inference/data/const_closure3.dart
+++ b/tests/compiler/dart2js/inference/data/const_closure3.dart
@@ -8,7 +8,8 @@
   return a;
 }
 
-/*element: foo:[subclass=Closure]*/
+/*strong.element: foo:[subclass=Closure]*/
+/*omit.element: foo:[subclass=Closure]*/
 const foo = method;
 
 /*element: returnInt:[null|subclass=Object]*/
diff --git a/tests/compiler/dart2js/inference/data/const_closure4.dart b/tests/compiler/dart2js/inference/data/const_closure4.dart
index 26b76ff..207a431 100644
--- a/tests/compiler/dart2js/inference/data/const_closure4.dart
+++ b/tests/compiler/dart2js/inference/data/const_closure4.dart
@@ -8,7 +8,8 @@
   return a;
 }
 
-/*element: foo:[subclass=Closure]*/
+/*strong.element: foo:[subclass=Closure]*/
+/*omit.element: foo:[subclass=Closure]*/
 const foo = method;
 
 /*element: returnNum:[null|subclass=Object]*/
diff --git a/tests/compiler/dart2js/inference/data/const_closure5.dart b/tests/compiler/dart2js/inference/data/const_closure5.dart
index 3055295..89a3abf 100644
--- a/tests/compiler/dart2js/inference/data/const_closure5.dart
+++ b/tests/compiler/dart2js/inference/data/const_closure5.dart
@@ -8,7 +8,8 @@
   return a;
 }
 
-/*element: foo:[subclass=Closure]*/
+/*strong.element: foo:[subclass=Closure]*/
+/*omit.element: foo:[subclass=Closure]*/
 const foo = method;
 
 /*element: returnInt:[null|subclass=Object]*/
diff --git a/tests/compiler/dart2js/inference/data/enum.dart b/tests/compiler/dart2js/inference/data/enum.dart
index 1fc823b..79b6d84 100644
--- a/tests/compiler/dart2js/inference/data/enum.dart
+++ b/tests/compiler/dart2js/inference/data/enum.dart
@@ -16,7 +16,8 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 enum Enum1 {
-  /*element: Enum1.a:[exact=Enum1]*/
+  /*strong.element: Enum1.a:[exact=Enum1]*/
+  /*omit.element: Enum1.a:[exact=Enum1]*/
   a,
 }
 
@@ -28,7 +29,8 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 enum Enum2 {
-  /*element: Enum2.a:[exact=Enum2]*/
+  /*strong.element: Enum2.a:[exact=Enum2]*/
+  /*omit.element: Enum2.a:[exact=Enum2]*/
   a,
 }
 
@@ -40,9 +42,11 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 enum Enum3 {
-  /*element: Enum3.a:[exact=Enum3]*/
+  /*strong.element: Enum3.a:[exact=Enum3]*/
+  /*omit.element: Enum3.a:[exact=Enum3]*/
   a,
-  /*element: Enum3.b:[exact=Enum3]*/
+  /*strong.element: Enum3.b:[exact=Enum3]*/
+  /*omit.element: Enum3.b:[exact=Enum3]*/
   b,
 }
 
@@ -54,7 +58,8 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 enum Enum4 {
-  /*element: Enum4.a:[exact=Enum4]*/
+  /*strong.element: Enum4.a:[exact=Enum4]*/
+  /*omit.element: Enum4.a:[exact=Enum4]*/
   a,
 }
 
@@ -68,9 +73,11 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 enum Enum5 {
-  /*element: Enum5.a:[exact=Enum5]*/
+  /*strong.element: Enum5.a:[exact=Enum5]*/
+  /*omit.element: Enum5.a:[exact=Enum5]*/
   a,
-  /*element: Enum5.b:[exact=Enum5]*/
+  /*strong.element: Enum5.b:[exact=Enum5]*/
+  /*omit.element: Enum5.b:[exact=Enum5]*/
   b,
 }
 
diff --git a/tests/compiler/dart2js/inference/data/for_in.dart b/tests/compiler/dart2js/inference/data/for_in.dart
index 231c016..c622275 100644
--- a/tests/compiler/dart2js/inference/data/for_in.dart
+++ b/tests/compiler/dart2js/inference/data/for_in.dart
@@ -7,11 +7,7 @@
   forInDirect();
   forInReturn();
   forInReturnMulti();
-  forInReturnRefined();
-  forInReturnRefinedDynamic();
-  testInForIn();
-  operatorInForIn();
-  updateInForIn();
+  forInReturnNonNull();
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -66,12 +62,12 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-// Sequentially refine element and return it from a for-in loop on known list
-// type.
+// Sequentially refine that an element is not null and return it from a for-in
+// loop on known list type.
 ////////////////////////////////////////////////////////////////////////////////
 
-/*element: forInReturnRefined:[null|subclass=JSInt]*/
-forInReturnRefined() {
+/*element: forInReturnNonNull:[subclass=JSInt]*/
+forInReturnNonNull() {
   /*iterator: Container([exact=JSExtendableArray], element: [exact=JSUInt31], length: 3)*/
   /*current: [exact=ArrayIterator]*/
   /*moveNext: [exact=ArrayIterator]*/
@@ -82,113 +78,5 @@
     a. /*[subclass=JSInt]*/ isEven;
     return a;
   }
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// Sequentially refine element and return it from a for-in loop on known list
-// type with a dynamic variable.
-////////////////////////////////////////////////////////////////////////////////
-
-/*element: forInReturnRefinedDynamic:[null|subclass=JSInt]*/
-forInReturnRefinedDynamic() {
-  /*iterator: Container([exact=JSExtendableArray], element: [exact=JSUInt31], length: 3)*/
-  /*current: [exact=ArrayIterator]*/
-  /*moveNext: [exact=ArrayIterator]*/
-  for (dynamic a in [1, 2, 3]) {
-    // TODO(johnniwinther): We should know the type of [a] here.
-    a.isEven;
-    a. /*[subclass=JSInt]*/ isEven;
-    return a;
-  }
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// Refine element through test and return it from a for-in loop on known list
-// type.
-////////////////////////////////////////////////////////////////////////////////
-
-/*element: Class1.:[exact=Class1]*/
-class Class1 {
-  /*element: Class1.field1:[exact=JSUInt31]*/
-  var field1 = 42;
-}
-
-/*element: _testInForIn:[null|exact=Class1]*/
-_testInForIn(
-    /*Container([exact=JSExtendableArray], element: [exact=Class1], length: 2)*/ list) {
-  /*iterator: Container([exact=JSExtendableArray], element: [exact=Class1], length: 2)*/
-  /*current: [exact=ArrayIterator]*/
-  /*moveNext: [exact=ArrayIterator]*/
-  for (var t in list) {
-    if (t.field1) {
-      return t;
-    }
-  }
-}
-
-/*element: testInForIn:[null]*/
-testInForIn() {
-  _testInForIn([new Class1(), new Class1()]);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// Refine element through operator and return it from a for-in loop on known
-// list type.
-////////////////////////////////////////////////////////////////////////////////
-
-/*element: Class2.:[exact=Class2]*/
-class Class2 {
-  /*element: Class2.field2a:[exact=JSUInt31]*/
-  var field2a = 42;
-  /*element: Class2.field2b:[exact=JSUInt31]*/
-  var field2b = 42;
-}
-
-/*element: _operatorInForIn:[null|exact=Class2]*/
-_operatorInForIn(
-    /*Container([exact=JSExtendableArray], element: [exact=Class2], length: 2)*/ list) {
-  /*iterator: Container([exact=JSExtendableArray], element: [exact=Class2], length: 2)*/
-  /*current: [exact=ArrayIterator]*/
-  /*moveNext: [exact=ArrayIterator]*/
-  for (var t in list) {
-    if (t.field2a /*invoke: [exact=JSUInt31]*/ <
-        t. /*[exact=Class2]*/ field2b) {
-      return t;
-    }
-  }
-}
-
-/*element: operatorInForIn:[null]*/
-operatorInForIn() {
-  _operatorInForIn([new Class2(), new Class2()]);
-}
-
-////////////////////////////////////////////////////////////////////////////////
-// Refine element through operator and return it from a for-in loop on known
-// list type.
-////////////////////////////////////////////////////////////////////////////////
-
-/*element: Class3.:[exact=Class3]*/
-class Class3 {
-  /*element: Class3.field3a:[exact=JSUInt31]*/
-  var field3a = 42;
-  /*element: Class3.field3b:[exact=JSUInt31]*/
-  var field3b = 42;
-}
-
-/*element: _updateInForIn:[null]*/
-_updateInForIn(
-    /*Container([exact=JSExtendableArray], element: [exact=Class3], length: 2)*/ list) {
-  /*iterator: Container([exact=JSExtendableArray], element: [exact=Class3], length: 2)*/
-  /*current: [exact=ArrayIterator]*/
-  /*moveNext: [exact=ArrayIterator]*/
-  for (var t in list) {
-    t.field3b = t.field3a;
-    t. /*update: [exact=Class3]*/ field3a = 87;
-  }
-}
-
-/*element: updateInForIn:[null]*/
-updateInForIn() {
-  _updateInForIn([new Class3(), new Class3()]);
+  return 0;
 }
diff --git a/tests/compiler/dart2js/inference/data/general.dart b/tests/compiler/dart2js/inference/data/general.dart
index f4e11b1..a00c12b 100644
--- a/tests/compiler/dart2js/inference/data/general.dart
+++ b/tests/compiler/dart2js/inference/data/general.dart
@@ -384,7 +384,7 @@
   var c;
   L1:
   if (a /*invoke: Value([exact=JSBool], value: true)*/ > 1) {
-    if (a /*invoke: [empty]*/ == 2) {
+    if (a /*invoke: Value([exact=JSBool], value: true)*/ == 2) {
       break L1;
     }
     c = 42;
@@ -581,7 +581,7 @@
   return a;
 }
 
-/*element: testSpecialization1:[subclass=JSNumber]*/
+/*element: testSpecialization1:[subclass=Object]*/
 testSpecialization1() {
   var a = topLevelGetter();
   a - 42;
@@ -621,7 +621,7 @@
   return a;
 }
 
-/*element: testReturnNull3:[null|subclass=Object]*/
+/*element: testReturnNull3:[subclass=Object]*/
 testReturnNull3(/*[null|subclass=Object]*/ a) {
   if (a == null) return 42;
   return a;
@@ -641,7 +641,7 @@
   return a;
 }
 
-/*element: testReturnNull6:[null|subclass=Object]*/
+/*element: testReturnNull6:[subclass=Object]*/
 testReturnNull6() {
   var a = topLevelGetter();
   if (a == null) return 42;
diff --git a/tests/compiler/dart2js/inference/data/global_field_closure.dart b/tests/compiler/dart2js/inference/data/global_field_closure.dart
index d2fd3bc..d40bfaab 100644
--- a/tests/compiler/dart2js/inference/data/global_field_closure.dart
+++ b/tests/compiler/dart2js/inference/data/global_field_closure.dart
@@ -13,10 +13,16 @@
   return a;
 }
 
-/*element: foo1:[null|subclass=Closure]*/
+/*strong.element: foo1:[null|subclass=Closure]*/
+/*omit.element: foo1:[null|subclass=Closure]*/
+/*strongConst.element: foo1:[subclass=Closure]*/
+/*omitConst.element: foo1:[subclass=Closure]*/
 var foo1 = method1;
 
-/*element: foo2:[null|subclass=Closure]*/
+/*strong.element: foo2:[null|subclass=Closure]*/
+/*omit.element: foo2:[null|subclass=Closure]*/
+/*strongConst.element: foo2:[subclass=Closure]*/
+/*omitConst.element: foo2:[subclass=Closure]*/
 var foo2 = method2;
 
 /*element: returnInt1:[null|subclass=Object]*/
diff --git a/tests/compiler/dart2js/inference/data/global_field_closure2.dart b/tests/compiler/dart2js/inference/data/global_field_closure2.dart
index 765913e..f4199e9 100644
--- a/tests/compiler/dart2js/inference/data/global_field_closure2.dart
+++ b/tests/compiler/dart2js/inference/data/global_field_closure2.dart
@@ -8,7 +8,10 @@
   return a;
 }
 
-/*element: foo:[null|subclass=Closure]*/
+/*strong.element: foo:[null|subclass=Closure]*/
+/*omit.element: foo:[null|subclass=Closure]*/
+/*strongConst.element: foo:[subclass=Closure]*/
+/*omitConst.element: foo:[subclass=Closure]*/
 var foo = method;
 
 /*element: returnInt:[null|subclass=Object]*/
diff --git a/tests/compiler/dart2js/inference/data/list.dart b/tests/compiler/dart2js/inference/data/list.dart
index 6592f98..967ed10 100644
--- a/tests/compiler/dart2js/inference/data/list.dart
+++ b/tests/compiler/dart2js/inference/data/list.dart
@@ -21,6 +21,7 @@
   newFloat64List();
   newInt16List();
   newInt32List();
+  newInt32List2();
   newInt8List();
   newUint16List();
   newUint32List();
@@ -77,10 +78,23 @@
 /*element: _field1:[exact=JSUInt31]*/
 var _field1 = 10;
 
-/*element: newInt32List:Container([exact=NativeInt32List], element: [subclass=JSInt], length: null)*/
+/*element: newInt32List:Container([exact=NativeInt32List], element: [subclass=JSInt], length: 10)*/
 newInt32List() => new Int32List(_field1);
 
 ////////////////////////////////////////////////////////////////////////////////
+// Create a Int32List using a changed non-final top-level field as length.
+////////////////////////////////////////////////////////////////////////////////
+
+/*element: _field1b:[subclass=JSPositiveInt]*/
+var _field1b = 10;
+
+/*element: newInt32List2:Container([exact=NativeInt32List], element: [subclass=JSInt], length: null)*/
+newInt32List2() {
+  _field1b /*invoke: [subclass=JSPositiveInt]*/ ++;
+  return new Int32List(_field1b);
+}
+
+////////////////////////////////////////////////////////////////////////////////
 // Create a Int8List using a final top-level field as length.
 ////////////////////////////////////////////////////////////////////////////////
 
@@ -94,7 +108,8 @@
 // Create a Uint16List using a const top-level field as length.
 ////////////////////////////////////////////////////////////////////////////////
 
-/*element: _field3:[exact=JSUInt31]*/
+/*strong.element: _field3:[exact=JSUInt31]*/
+/*omit.element: _field3:[exact=JSUInt31]*/
 const _field3 = 12;
 
 /*element: newUint16List:Container([exact=NativeUint16List], element: [exact=JSUInt31], length: 12)*/
@@ -120,7 +135,8 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 abstract class Class1 {
-  /*element: Class1.field:[exact=JSUInt31]*/
+  /*strong.element: Class1.field:[exact=JSUInt31]*/
+  /*omit.element: Class1.field:[exact=JSUInt31]*/
   static const field = 15;
 }
 
diff --git a/tests/compiler/dart2js/inference/data/map_tracer_const.dart b/tests/compiler/dart2js/inference/data/map_tracer_const.dart
index ab50dff..3ee2393 100644
--- a/tests/compiler/dart2js/inference/data/map_tracer_const.dart
+++ b/tests/compiler/dart2js/inference/data/map_tracer_const.dart
@@ -7,12 +7,15 @@
     int
         /*strong.Union([exact=JSDouble], [exact=JSUInt31])*/
         /*omit.[exact=JSUInt31]*/
+        /*strongConst.Union([exact=JSDouble], [exact=JSUInt31])*/
+        /*omitConst.[exact=JSUInt31]*/
         x) {
   return x;
 }
 
 class A {
-  /*element: A.DEFAULT:Dictionary([subclass=ConstantMap], key: Value([exact=JSString], value: "fun"), value: [null|subclass=Closure], map: {fun: [subclass=Closure]})*/
+  /*strong.element: A.DEFAULT:Dictionary([subclass=ConstantMap], key: Value([exact=JSString], value: "fun"), value: [null|subclass=Closure], map: {fun: [subclass=Closure]})*/
+  /*omit.element: A.DEFAULT:Dictionary([subclass=ConstantMap], key: Value([exact=JSString], value: "fun"), value: [null|subclass=Closure], map: {fun: [subclass=Closure]})*/
   static const DEFAULT = const {'fun': closure};
 
   /*element: A.map:Dictionary([subclass=ConstantMap], key: Value([exact=JSString], value: "fun"), value: [null|subclass=Closure], map: {fun: [subclass=Closure]})*/
diff --git a/tests/compiler/dart2js/inference/data/map_tracer_keys.dart b/tests/compiler/dart2js/inference/data/map_tracer_keys.dart
index af96537..576a02a 100644
--- a/tests/compiler/dart2js/inference/data/map_tracer_keys.dart
+++ b/tests/compiler/dart2js/inference/data/map_tracer_keys.dart
@@ -58,16 +58,16 @@
 test2() {
   dynamic theMap = {'a': 2.2, 'b': 3.3, 'c': 4.4};
   theMap
-      /*update: Map([subclass=JsLinkedHashMap], key: Union([exact=JSExtendableArray], [exact=JSString]), value: [null|exact=JSDouble])*/
+      /*update: Map([subclass=JsLinkedHashMap], key: [exact=JSString], value: [null|exact=JSDouble])*/
       [aList2] = 5.5;
   /*iterator: [exact=LinkedHashMapKeyIterable]*/
   /*current: [exact=LinkedHashMapKeyIterator]*/
   /*moveNext: [exact=LinkedHashMapKeyIterator]*/
   for (var key in theMap.
-      /*Map([subclass=JsLinkedHashMap], key: Union([exact=JSExtendableArray], [exact=JSString]), value: [null|exact=JSDouble])*/
+      /*Map([subclass=JsLinkedHashMap], key: [exact=JSString], value: [null|exact=JSDouble])*/
       keys) {
     aDouble2 = theMap
-        /*Map([subclass=JsLinkedHashMap], key: Union([exact=JSExtendableArray], [exact=JSString]), value: [null|exact=JSDouble])*/
+        /*Map([subclass=JsLinkedHashMap], key: [exact=JSString], value: [null|exact=JSDouble])*/
         [key];
   }
   // We have to reference it somewhere, so that it always gets resolved.
diff --git a/tests/compiler/dart2js/inference/data/no_such_method.dart b/tests/compiler/dart2js/inference/data/no_such_method.dart
index 16f5358..2803433 100644
--- a/tests/compiler/dart2js/inference/data/no_such_method.dart
+++ b/tests/compiler/dart2js/inference/data/no_such_method.dart
@@ -17,6 +17,8 @@
           Invocation
               /*strong.[null|subclass=Object]*/
               /*omit.[null|exact=JSInvocationMirror]*/
+              /*strongConst.[null|subclass=Object]*/
+              /*omitConst.[null|exact=JSInvocationMirror]*/
               _) =>
       42;
 
@@ -41,6 +43,8 @@
           Invocation
               /*strong.[null|subclass=Object]*/
               /*omit.[null|exact=JSInvocationMirror]*/
+              /*strongConst.[null|subclass=Object]*/
+              /*omitConst.[null|exact=JSInvocationMirror]*/
               _) =>
       42;
 
@@ -65,6 +69,8 @@
       Invocation
           /*strong.[null|subclass=Object]*/
           /*omit.[null|exact=JSInvocationMirror]*/
+          /*strongConst.[null|subclass=Object]*/
+          /*omitConst.[null|exact=JSInvocationMirror]*/
           invocation) {
     return invocation
         .
@@ -101,6 +107,8 @@
       Invocation
           /*strong.[null|subclass=Object]*/
           /*omit.[null|exact=JSInvocationMirror]*/
+          /*strongConst.[null|subclass=Object]*/
+          /*omitConst.[null|exact=JSInvocationMirror]*/
           invocation) {
     this. /*update: [exact=Class4]*/ field = invocation
         .
diff --git a/tests/compiler/dart2js/inference/data/no_such_method1.dart b/tests/compiler/dart2js/inference/data/no_such_method1.dart
index 2e9aadb..eeaed0e 100644
--- a/tests/compiler/dart2js/inference/data/no_such_method1.dart
+++ b/tests/compiler/dart2js/inference/data/no_such_method1.dart
@@ -8,6 +8,8 @@
   noSuchMethod(
           /*strong.[null|subclass=Object]*/
           /*omit.[null|exact=JSInvocationMirror]*/
+          /*strongConst.[null|subclass=Object]*/
+          /*omitConst.[null|exact=JSInvocationMirror]*/
           im) =>
       42;
 }
diff --git a/tests/compiler/dart2js/inference/data/no_such_method2.dart b/tests/compiler/dart2js/inference/data/no_such_method2.dart
index 2f0741b..3bce145 100644
--- a/tests/compiler/dart2js/inference/data/no_such_method2.dart
+++ b/tests/compiler/dart2js/inference/data/no_such_method2.dart
@@ -8,6 +8,8 @@
   noSuchMethod(
           /*strong.[null|subclass=Object]*/
           /*omit.[null|exact=JSInvocationMirror]*/
+          /*strongConst.[null|subclass=Object]*/
+          /*omitConst.[null|exact=JSInvocationMirror]*/
           im) =>
       42;
 }
@@ -33,6 +35,8 @@
   noSuchMethod(
           /*strong.[null|subclass=Object]*/
           /*omit.[null|exact=JSInvocationMirror]*/
+          /*strongConst.[null|subclass=Object]*/
+          /*omitConst.[null|exact=JSInvocationMirror]*/
           im) =>
       42.5;
 }
diff --git a/tests/compiler/dart2js/inference/data/no_such_method3.dart b/tests/compiler/dart2js/inference/data/no_such_method3.dart
index c89382c..07c56bd 100644
--- a/tests/compiler/dart2js/inference/data/no_such_method3.dart
+++ b/tests/compiler/dart2js/inference/data/no_such_method3.dart
@@ -10,6 +10,8 @@
   noSuchMethod(
           /*strong.[null|subclass=Object]*/
           /*omit.[null|exact=JSInvocationMirror]*/
+          /*strongConst.[null|subclass=Object]*/
+          /*omitConst.[null|exact=JSInvocationMirror]*/
           im) =>
       throw 'foo';
 }
diff --git a/tests/compiler/dart2js/inference/data/optimizer_hints.dart b/tests/compiler/dart2js/inference/data/optimizer_hints.dart
index 4346d19..919332e 100644
--- a/tests/compiler/dart2js/inference/data/optimizer_hints.dart
+++ b/tests/compiler/dart2js/inference/data/optimizer_hints.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 'package:expect/expect.dart';
-
 /*element: main:[null]*/
 main() {
   assumeDynamic();
@@ -21,7 +19,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 /*element: _assumeDynamic:[null|subclass=Object]*/
-@AssumeDynamic()
+@pragma('dart2js:assumeDynamic')
 _assumeDynamic(/*[null|subclass=Object]*/ o) => o;
 
 /*element: assumeDynamic:[null]*/
diff --git a/tests/compiler/dart2js/inference/data/parameters_trust.dart b/tests/compiler/dart2js/inference/data/parameters_trust.dart
index fae5e390..27b45a3 100644
--- a/tests/compiler/dart2js/inference/data/parameters_trust.dart
+++ b/tests/compiler/dart2js/inference/data/parameters_trust.dart
@@ -18,6 +18,8 @@
     int
         /*strong.Union([exact=JSString], [exact=JSUInt31])*/
         /*omit.[exact=JSUInt31]*/
+        /*strongConst.Union([exact=JSString], [exact=JSUInt31])*/
+        /*omitConst.[exact=JSUInt31]*/
         i) {
   return i;
 }
diff --git a/tests/compiler/dart2js/inference/data/postfix_prefix.dart b/tests/compiler/dart2js/inference/data/postfix_prefix.dart
index 9ede9a2..92a47c2 100644
--- a/tests/compiler/dart2js/inference/data/postfix_prefix.dart
+++ b/tests/compiler/dart2js/inference/data/postfix_prefix.dart
@@ -18,7 +18,7 @@
   /*element: A.[]=:[null]*/
   operator []=(/*[empty]*/ index, /*[subclass=JSNumber]*/ value) {}
 
-  /*element: A.returnDynamic1:[exact=JSUInt31]*/
+  /*element: A.returnDynamic1:Union([exact=JSString], [exact=JSUInt31])*/
   returnDynamic1() => /*[subclass=A]*/ /*update: [subclass=A]*/ foo
       /*invoke: Union([exact=JSString], [exact=JSUInt31])*/ --;
 
@@ -30,7 +30,7 @@
   returnNum2() => /*[subclass=A]*/ /*update: [subclass=A]*/ foo
       /*invoke: Union([exact=JSString], [exact=JSUInt31])*/ -= 42;
 
-  /*element: A.returnDynamic2:[exact=JSUInt31]*/
+  /*element: A.returnDynamic2:Union([exact=JSString], [exact=JSUInt31])*/
   returnDynamic2() => this
           /*[subclass=A]*/ /*update: [subclass=A]*/ [index]
       /*invoke: Union([exact=JSString], [exact=JSUInt31])*/ --;
@@ -44,12 +44,10 @@
           /*[subclass=A]*/ /*update: [subclass=A]*/ [index]
       /*invoke: Union([exact=JSString], [exact=JSUInt31])*/ -= 42;
 
-  // TODO(johnniwinther): Investigate why implementations differ on update.
   /*element: A.returnEmpty3:[empty]*/
   returnEmpty3() {
     dynamic a = this;
-    return a. /*[subclass=A]*/
-            /*update: [empty]*/
+    return a. /*[subclass=A]*/ /*update: [subclass=A]*/
             bar
         /*invoke: [empty]*/ --;
   }
@@ -76,7 +74,7 @@
   /*element: B.[]:[exact=JSUInt31]*/
   operator [](/*[empty]*/ index) => 42;
 
-  /*element: B.returnString1:[empty]*/
+  /*element: B.returnString1:Value([exact=JSString], value: "string")*/
   returnString1() =>
       super.foo /*invoke: Value([exact=JSString], value: "string")*/ --;
 
@@ -89,7 +87,7 @@
   returnDynamic2() =>
       super.foo /*invoke: Value([exact=JSString], value: "string")*/ -= 42;
 
-  /*element: B.returnString2:[empty]*/
+  /*element: B.returnString2:Value([exact=JSString], value: "string")*/
   returnString2() => super[index]
       /*invoke: Value([exact=JSString], value: "string")*/ --;
 
diff --git a/tests/compiler/dart2js/inference/data/refine_captured_locals.dart b/tests/compiler/dart2js/inference/data/refine_captured_locals.dart
index f1695af..f11fc71 100644
--- a/tests/compiler/dart2js/inference/data/refine_captured_locals.dart
+++ b/tests/compiler/dart2js/inference/data/refine_captured_locals.dart
@@ -20,12 +20,9 @@
   method1() {}
 }
 
-/*element: Class2.:[exact=Class2]*/
-class Class2 {}
-
 /*element: _refineBeforeCapture:[exact=Class1]*/
-_refineBeforeCapture(/*Union([exact=Class1], [exact=Class2])*/ o) {
-  o. /*invoke: Union([exact=Class1], [exact=Class2])*/ method1();
+_refineBeforeCapture(/*[null|exact=Class1]*/ o) {
+  o. /*invoke: [null|exact=Class1]*/ method1();
   o. /*invoke: [exact=Class1]*/ method1();
 
   /*[exact=Class1]*/ localFunction() => o;
@@ -35,7 +32,7 @@
 /*element: refineBeforeCapture:[null]*/
 refineBeforeCapture() {
   _refineBeforeCapture(new Class1());
-  _refineBeforeCapture(new Class2());
+  _refineBeforeCapture(null);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/tests/compiler/dart2js/inference/data/refine_locals.dart b/tests/compiler/dart2js/inference/data/refine_locals.dart
index 8711587..b14eede 100644
--- a/tests/compiler/dart2js/inference/data/refine_locals.dart
+++ b/tests/compiler/dart2js/inference/data/refine_locals.dart
@@ -9,7 +9,7 @@
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-// Refine the type of a non-captured local variable through a sequence of
+// Refine nullability of a non-captured local variable through a sequence of
 // accesses and updates.
 ////////////////////////////////////////////////////////////////////////////////
 
@@ -31,141 +31,87 @@
   method0() {}
   /*element: Class2.method2:[null]*/
   method2() {}
-  /*element: Class2.field0:[null|exact=JSUInt31]*/
+  /*element: Class2.field0:[null]*/
   var field0;
-  /*element: Class2.field2:[null|exact=JSUInt31]*/
+  /*element: Class2.field2:[null]*/
   var field2;
 }
 
-/*element: _refineToClass1Invoke:[empty]*/
-_refineToClass1Invoke(/*Union([exact=Class1], [exact=Class2])*/ o) {
+/*element: _refineUnion:Union([exact=Class1], [exact=Class2])*/
+_refineUnion(/*Union([null|exact=Class1], [null|exact=Class2])*/ o) {
+  o. /*invoke: Union([null|exact=Class1], [null|exact=Class2])*/ method0();
   o. /*invoke: Union([exact=Class1], [exact=Class2])*/ method1();
-  o. /*invoke: [exact=Class1]*/ method0();
-  o. /*invoke: [exact=Class1]*/ method2();
-  return o;
-}
-
-/*element: _refineToClass2Invoke:[empty]*/
-_refineToClass2Invoke(/*Union([exact=Class1], [exact=Class2])*/ o) {
   o. /*invoke: Union([exact=Class1], [exact=Class2])*/ method2();
-  o. /*invoke: [exact=Class2]*/ method0();
-  o. /*invoke: [exact=Class2]*/ method1();
   return o;
 }
 
-/*element: _refineToEmptyInvoke:[empty]*/
-_refineToEmptyInvoke(/*Union([exact=Class1], [exact=Class2])*/ o) {
-  o. /*invoke: Union([exact=Class1], [exact=Class2])*/ method1();
-  o. /*invoke: [exact=Class1]*/ method2();
-  o. /*invoke: [empty]*/ method0();
+/*element: _refineFromMethod:[exact=Class1]*/
+_refineFromMethod(/*[null|exact=Class1]*/ o) {
+  o. /*invoke: [null|exact=Class1]*/ method0();
+  o. /*invoke: [exact=Class1]*/ method1();
   return o;
 }
 
-/*element: _refineToClass1Get:[empty]*/
-_refineToClass1Get(/*Union([exact=Class1], [exact=Class2])*/ o) {
-  o. /*Union([exact=Class1], [exact=Class2])*/ field0;
-  o. /*Union([exact=Class1], [exact=Class2])*/ field1;
-  o. /*[exact=Class1]*/ field2;
+/*element: _refineFromGetter:[exact=Class2]*/
+_refineFromGetter(/*[null|exact=Class2]*/ o) {
+  o. /*[null|exact=Class2]*/ field0;
+  o. /*[exact=Class2]*/ field2;
   return o;
 }
 
-/*element: _refineToClass2Get:[empty]*/
-_refineToClass2Get(/*Union([exact=Class1], [exact=Class2])*/ o) {
-  o. /*Union([exact=Class1], [exact=Class2])*/ field0;
-  o. /*Union([exact=Class1], [exact=Class2])*/ field2;
-  o. /*[exact=Class2]*/ field1;
+/*element: _refineFromSetter:[exact=Class1]*/
+_refineFromSetter(/*[null|exact=Class1]*/ o) {
+  o. /*update: [null|exact=Class1]*/ field0 = 0;
+  o. /*update: [exact=Class1]*/ field1 = 0;
   return o;
 }
 
-/*element: _refineToEmptyGet:[empty]*/
-_refineToEmptyGet(/*Union([exact=Class1], [exact=Class2])*/ o) {
-  o. /*Union([exact=Class1], [exact=Class2])*/ field1;
-  o. /*[exact=Class1]*/ field2;
-  o. /*[empty]*/ field0;
-  return o;
-}
-
-/*element: _refineToClass1Set:[empty]*/
-_refineToClass1Set(/*Union([exact=Class1], [exact=Class2])*/ o) {
-  o. /*update: Union([exact=Class1], [exact=Class2])*/ field0 = 0;
-  o. /*update: Union([exact=Class1], [exact=Class2])*/ field1 = 0;
-  o. /*update: [exact=Class1]*/ field2 = 0;
-  return o;
-}
-
-/*element: _refineToClass2Set:[empty]*/
-_refineToClass2Set(/*Union([exact=Class1], [exact=Class2])*/ o) {
-  o. /*update: Union([exact=Class1], [exact=Class2])*/ field0 = 0;
-  o. /*update: Union([exact=Class1], [exact=Class2])*/ field2 = 0;
-  o. /*update: [exact=Class2]*/ field1 = 0;
-  return o;
-}
-
-/*element: _refineToEmptySet:[empty]*/
-_refineToEmptySet(/*Union([exact=Class1], [exact=Class2])*/ o) {
-  o. /*update: Union([exact=Class1], [exact=Class2])*/ field1 = 0;
-  o. /*update: [exact=Class1]*/ field2 = 0;
-  o. /*update: [empty]*/ field0 = 0;
-  return o;
-}
-
-/*element: _refineToClass1InvokeIfNotNull:[null]*/
-_refineToClass1InvokeIfNotNull(
-    /*Union([exact=Class2], [null|exact=Class1])*/ o) {
+/*element: _noRefinementNullAware:[null|exact=Class1]*/
+_noRefinementNullAware(/*[null|exact=Class1]*/ o) {
   o
       ?.
-      /*invoke: Union([exact=Class1], [exact=Class2])*/
+      /*invoke: [exact=Class1]*/
       method1();
-  o
-      ?.
-      /*invoke: [exact=Class1]*/
-      method0();
-  o
-      ?.
-      /*invoke: [exact=Class1]*/
-      method2();
   return o;
 }
 
-/*element: _noRefinementToClass1InvokeSet:Union([exact=Class2], [null|exact=Class1])*/
-_noRefinementToClass1InvokeSet(
-    /*Union([exact=Class2], [null|exact=Class1])*/ o) {
-  (o = o). /*invoke: Union([exact=Class2], [null|exact=Class1])*/ method1();
-  (o = o). /*invoke: Union([exact=Class2], [null|exact=Class1])*/ method0();
-  (o = o). /*invoke: Union([exact=Class2], [null|exact=Class1])*/ method2();
+/*element: _noRefinementNullSelectors:[exact=Class2]*/
+_noRefinementNullSelectors(/*[null|exact=Class2]*/ o) {
+  o /*invoke: [null|exact=Class2]*/ == 2;
+  o. /*[null|exact=Class2]*/ hashCode;
+  o. /*[null|exact=Class2]*/ runtimeType;
+  o. /*[null|exact=Class2]*/ toString;
+  o. /*[null|exact=Class2]*/ noSuchMethod;
+  o. /*invoke: [null|exact=Class2]*/ toString();
+  o. /*invoke: [null|exact=Class2]*/ noSuchMethod(null); // assumed to throw.
+  o. /*[exact=Class2]*/ toString;
   return o;
 }
 
+/*element: _noRefinementUpdatedVariable:[null|exact=Class1]*/
+_noRefinementUpdatedVariable(/*[null|exact=Class1]*/ o) {
+  (o = o). /*invoke: [null|exact=Class1]*/ method1();
+  (o = o). /*invoke: [null|exact=Class1]*/ method0();
+  return o;
+}
+
+/*element: _condition:Value([exact=JSBool], value: false)*/
+@pragma('dart2js:assumeDynamic')
+get _condition => false;
+
 /*element: refineToClass:[null]*/
 refineToClass() {
-  _refineToClass1Invoke(new Class1());
-  _refineToClass1Invoke(new Class2());
-  _refineToClass2Invoke(new Class1());
-  _refineToClass2Invoke(new Class2());
-  _refineToEmptyInvoke(new Class1());
-  _refineToEmptyInvoke(new Class2());
+  var nullOrClass1 = _condition ? null : new Class1();
+  var nullOrClass2 = _condition ? null : new Class2();
+  _refineUnion(nullOrClass1);
+  _refineUnion(nullOrClass2);
 
-  _refineToClass1Get(new Class1());
-  _refineToClass1Get(new Class2());
-  _refineToClass2Get(new Class1());
-  _refineToClass2Get(new Class2());
-  _refineToEmptyGet(new Class1());
-  _refineToEmptyGet(new Class2());
-
-  _refineToClass1Set(new Class1());
-  _refineToClass1Set(new Class2());
-  _refineToClass2Set(new Class1());
-  _refineToClass2Set(new Class2());
-  _refineToEmptySet(new Class1());
-  _refineToEmptySet(new Class2());
-
-  _refineToClass1InvokeIfNotNull(null);
-  _refineToClass1InvokeIfNotNull(new Class1());
-  _refineToClass1InvokeIfNotNull(new Class2());
-
-  _noRefinementToClass1InvokeSet(null);
-  _noRefinementToClass1InvokeSet(new Class1());
-  _noRefinementToClass1InvokeSet(new Class2());
+  _refineFromMethod(nullOrClass1);
+  _refineFromGetter(nullOrClass2);
+  _refineFromSetter(nullOrClass1);
+  _noRefinementNullAware(nullOrClass1);
+  _noRefinementNullSelectors(nullOrClass2);
+  _noRefinementUpdatedVariable(nullOrClass1);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
diff --git a/tests/compiler/dart2js/inference/data/refine_order.dart b/tests/compiler/dart2js/inference/data/refine_order.dart
index c511c73..9bfe307 100644
--- a/tests/compiler/dart2js/inference/data/refine_order.dart
+++ b/tests/compiler/dart2js/inference/data/refine_order.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 'package:expect/expect.dart';
-
 /*element: Class.:[exact=Class]*/
 class Class {
   /*element: Class.field:[exact=JSUInt31]*/
@@ -34,10 +32,10 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 /*element: statementOrderFieldAccess:[null]*/
-@AssumeDynamic()
+@pragma('dart2js:assumeDynamic')
 statementOrderFieldAccess(/*[null|subclass=Object]*/ o) {
   o.field;
-  o. /*[exact=Class]*/ field;
+  o. /*[subclass=Object]*/ field;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -45,10 +43,10 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 /*element: statementOrderFieldUpdate:[null]*/
-@AssumeDynamic()
+@pragma('dart2js:assumeDynamic')
 statementOrderFieldUpdate(/*[null|subclass=Object]*/ o) {
   o.field = 42;
-  o. /*update: [exact=Class]*/ field = 42;
+  o. /*update: [subclass=Object]*/ field = 42;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -56,10 +54,10 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 /*element: statementOrderInvocation:[null]*/
-@AssumeDynamic()
+@pragma('dart2js:assumeDynamic')
 statementOrderInvocation(/*[null|subclass=Object]*/ o) {
   o.method(null);
-  o. /*invoke: [exact=Class]*/ method(null);
+  o. /*invoke: [subclass=Object]*/ method(null);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -67,11 +65,11 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 /*element: receiverVsArgument:[null]*/
-@AssumeDynamic()
+@pragma('dart2js:assumeDynamic')
 receiverVsArgument(/*[null|subclass=Object]*/ o) {
   // TODO(johnniwinther): The arguments should refine the receiver.
   o.method(o.field);
-  o. /*[exact=Class]*/ field;
+  o. /*[subclass=Object]*/ field;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -79,11 +77,11 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 /*element: argumentsOrder:[null]*/
-@AssumeDynamic()
+@pragma('dart2js:assumeDynamic')
 argumentsOrder(/*[null|subclass=Object]*/ o) {
   // TODO(johnniwinther): The arguments should refine the receiver.
-  o.method(o.field, o. /*[exact=Class]*/ field);
-  o. /*[exact=Class]*/ field;
+  o.method(o.field, o. /*[subclass=Object]*/ field);
+  o. /*[subclass=Object]*/ field;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -91,10 +89,10 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 /*element: operatorOrder:[null]*/
-@AssumeDynamic()
+@pragma('dart2js:assumeDynamic')
 operatorOrder(/*[null|subclass=Object]*/ o) {
-  o.field /*invoke: [exact=JSUInt31]*/ < o. /*[exact=Class]*/ field;
-  o. /*[exact=Class]*/ field;
+  o.field /*invoke: [exact=JSUInt31]*/ < o. /*[subclass=Object]*/ field;
+  o. /*[subclass=Object]*/ field;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -102,12 +100,12 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 /*element: updateVsRhs:[null]*/
-@AssumeDynamic()
+@pragma('dart2js:assumeDynamic')
 updateVsRhs(/*[null|subclass=Object]*/ o) {
   // TODO(johnniwinther): The right-hand side should refine the left-hand side
   // receiver.
   o.field = o.field;
-  o. /*[exact=Class]*/ field;
+  o. /*[subclass=Object]*/ field;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -115,10 +113,10 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 /*element: logicalOr:[null]*/
-@AssumeDynamic()
+@pragma('dart2js:assumeDynamic')
 logicalOr(/*[null|subclass=Object]*/ o) {
-  o.field || o. /*[exact=Class]*/ field;
-  o. /*[exact=Class]*/ field;
+  o.field || o. /*[subclass=Object]*/ field;
+  o. /*[subclass=Object]*/ field;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -126,10 +124,10 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 /*element: conditionalCondition:[null]*/
-@AssumeDynamic()
+@pragma('dart2js:assumeDynamic')
 conditionalCondition(/*[null|subclass=Object]*/ o) {
-  o.field ? o. /*[exact=Class]*/ field : o. /*[exact=Class]*/ field;
-  o. /*[exact=Class]*/ field;
+  o.field ? o. /*[subclass=Object]*/ field : o. /*[subclass=Object]*/ field;
+  o. /*[subclass=Object]*/ field;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -137,11 +135,11 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 /*element: conditionalBothBranches:[null]*/
-@AssumeDynamic()
+@pragma('dart2js:assumeDynamic')
 conditionalBothBranches(/*[null|subclass=Object]*/ o) {
   // ignore: DEAD_CODE
   true ? o.field : o.field;
-  o. /*[exact=Class]*/ field;
+  o. /*[subclass=Object]*/ field;
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -149,10 +147,10 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 /*element: conditionalOneBranchOnly:[null]*/
-@AssumeDynamic()
+@pragma('dart2js:assumeDynamic')
 conditionalOneBranchOnly(/*[null|subclass=Object]*/ o) {
   // ignore: DEAD_CODE
   true ? o.field : null;
   o.field;
-  o. /*[exact=Class]*/ field;
+  o. /*[subclass=Object]*/ field;
 }
diff --git a/tests/compiler/dart2js/inference/data/static.dart b/tests/compiler/dart2js/inference/data/static.dart
index 04fa7c3..4b65a4c 100644
--- a/tests/compiler/dart2js/inference/data/static.dart
+++ b/tests/compiler/dart2js/inference/data/static.dart
@@ -189,7 +189,10 @@
 /*element: _method1:[exact=JSUInt31]*/
 _method1() => 42;
 
-/*element: _field2:[null|subclass=Closure]*/
+/*strong.element: _field2:[null|subclass=Closure]*/
+/*omit.element: _field2:[null|subclass=Closure]*/
+/*strongConst.element: _field2:[subclass=Closure]*/
+/*omitConst.element: _field2:[subclass=Closure]*/
 dynamic _field2 = _method1;
 
 /*element: invokeStaticFieldTearOff:[null|subclass=Object]*/
@@ -202,7 +205,10 @@
 /*element: _method5:Value([exact=JSString], value: "")*/
 String _method5() => '';
 
-/*element: _field5:[null|subclass=Closure]*/
+/*strong.element: _field5:[null|subclass=Closure]*/
+/*omit.element: _field5:[null|subclass=Closure]*/
+/*strongConst.element: _field5:[subclass=Closure]*/
+/*omitConst.element: _field5:[subclass=Closure]*/
 String Function() _field5 = _method5;
 
 /*element: invokeStaticTypedFieldTearOff:[null|exact=JSString]*/
@@ -216,7 +222,10 @@
 /*element: _method2:[exact=JSUInt31]*/
 _method2(/*[exact=JSUInt31]*/ o) => 42;
 
-/*element: _field3:[null|subclass=Closure]*/
+/*strong.element: _field3:[null|subclass=Closure]*/
+/*omit.element: _field3:[null|subclass=Closure]*/
+/*strongConst.element: _field3:[subclass=Closure]*/
+/*omitConst.element: _field3:[subclass=Closure]*/
 dynamic _field3 = _method2;
 
 /*element: invokeStaticFieldTearOffParameters:[null|subclass=Object]*/
@@ -242,10 +251,16 @@
 /*element: _method6:[exact=JSUInt31]*/
 int _method6() => 0;
 
-/*element: _field7:[null|subclass=Closure]*/
+/*strong.element: _field7:[null|subclass=Closure]*/
+/*omit.element: _field7:[null|subclass=Closure]*/
+/*strongConst.element: _field7:[subclass=Closure]*/
+/*omitConst.element: _field7:[subclass=Closure]*/
 int Function() _field7 = _method6;
 
-/*element: _getter3:[null|subclass=Closure]*/
+/*strong.element: _getter3:[null|subclass=Closure]*/
+/*omit.element: _getter3:[null|subclass=Closure]*/
+/*strongConst.element: _getter3:[subclass=Closure]*/
+/*omitConst.element: _getter3:[subclass=Closure]*/
 int Function() get _getter3 => _field7;
 
 /*element: invokeStaticTypedGetterTearOff:[null|subclass=JSInt]*/
@@ -284,7 +299,10 @@
 /// arguments.
 ////////////////////////////////////////////////////////////////////////////////
 
-/*element: _field4:[null|subclass=Closure]*/
+/*strong.element: _field4:[null|subclass=Closure]*/
+/*omit.element: _field4:[null|subclass=Closure]*/
+/*strongConst.element: _field4:[subclass=Closure]*/
+/*omitConst.element: _field4:[subclass=Closure]*/
 T Function<T>(T) _field4 = _method4;
 
 /*element: invokeStaticGenericField1:[null|subclass=JSInt]*/
diff --git a/tests/compiler/dart2js/inference/inference_data/cannot_throw.dart b/tests/compiler/dart2js/inference/inference_data/cannot_throw.dart
index 4d24402..b91c000 100644
--- a/tests/compiler/dart2js/inference/inference_data/cannot_throw.dart
+++ b/tests/compiler/dart2js/inference/inference_data/cannot_throw.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// ignore: import_internal_library
-import 'dart:_js_helper';
-
 main() {
   noThrows();
   noInline();
@@ -13,13 +10,14 @@
 
 // We trust the annotation.
 /*element: noThrows:no-throw*/
-@NoThrows()
-@NoInline() // Required for the @NoThrows() annotation.
+@pragma('dart2js:noThrows')
+@pragma(
+    'dart2js:noInline') // Required for the @pragma('dart2js:noThrows') annotation.
 noThrows() => throw '';
 
-// Check that the @NoInline() annotation has no impact on its own.
+// Check that the @pragma('dart2js:noInline') annotation has no impact on its own.
 /*element: noInline:*/
-@NoInline()
+@pragma('dart2js:noInline')
 noInline() {}
 
 // TODO(johnniwinther): Should we infer this?
diff --git a/tests/compiler/dart2js/inference/inference_test_helper.dart b/tests/compiler/dart2js/inference/inference_test_helper.dart
index 5b5eb7f..9259adb 100644
--- a/tests/compiler/dart2js/inference/inference_test_helper.dart
+++ b/tests/compiler/dart2js/inference/inference_test_helper.dart
@@ -35,6 +35,7 @@
         forUserLibrariesOnly: true,
         args: args,
         options: [stopAfterTypeInference],
+        testCFEConstants: true,
         skipForStrong: skipForStrong,
         shardIndex: shardIndex ?? 0,
         shards: shardIndex != null ? 2 : 1);
diff --git a/tests/compiler/dart2js/inference/libs/mixin_constructor_default_parameter_values_lib.dart b/tests/compiler/dart2js/inference/libs/mixin_constructor_default_parameter_values_lib.dart
index a105fa0..8ae50e9 100644
--- a/tests/compiler/dart2js/inference/libs/mixin_constructor_default_parameter_values_lib.dart
+++ b/tests/compiler/dart2js/inference/libs/mixin_constructor_default_parameter_values_lib.dart
@@ -6,6 +6,7 @@
   /*element: _SECRET.:[exact=_SECRET]*/
   const _SECRET();
   /*element: _SECRET.toString:Value([exact=JSString], value: "SECRET!")*/
+  @override
   String toString() => "SECRET!";
 }
 
@@ -29,5 +30,6 @@
         this.y = b;
 
   /*element: C.toString:[exact=JSString]*/
+  @override
   String toString() => "C(${/*[exact=D]*/ x},${/*[exact=D]*/ y})";
 }
diff --git a/tests/compiler/dart2js/inference/show.dart b/tests/compiler/dart2js/inference/show.dart
index d6ff3d4..725f6dc 100644
--- a/tests/compiler/dart2js/inference/show.dart
+++ b/tests/compiler/dart2js/inference/show.dart
@@ -18,7 +18,7 @@
   argParser.addFlag('callers', defaultsTo: false);
   ArgResults results = argParser.parse(args);
 
-  DataComputer dataComputer;
+  DataComputer<String> dataComputer;
   if (results['side-effects']) {
     dataComputer = const SideEffectsDataComputer();
   }
@@ -27,5 +27,6 @@
   } else {
     dataComputer = const TypeMaskDataComputer();
   }
-  await show(results, dataComputer, options: [/*stopAfterTypeInference*/]);
+  await show<String>(results, dataComputer,
+      options: [/*stopAfterTypeInference*/]);
 }
diff --git a/tests/compiler/dart2js/inference/side_effects/annotations.dart b/tests/compiler/dart2js/inference/side_effects/annotations.dart
index b8c9841..4337cf8 100644
--- a/tests/compiler/dart2js/inference/side_effects/annotations.dart
+++ b/tests/compiler/dart2js/inference/side_effects/annotations.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/// ignore: IMPORT_INTERNAL_LIBRARY
-import 'dart:_js_helper';
-
 /// Static field used in tests below.
 var field;
 
@@ -13,11 +10,12 @@
 /*element: readStaticField:SideEffects(reads static; writes nothing)*/
 readStaticField() => field;
 
-/// Read a static field. If not for the `@NoSideEffects()` annotation this would
-/// add dependency of static properties to the side effects of the method.
+/// Read a static field. If not for the `@pragma('dart2js:noSideEffects')`
+/// annotation this would add dependency of static properties to the side
+/// effects of the method.
 /*element: readStaticFieldAnnotated:SideEffects(reads nothing; writes nothing)*/
-@NoInline()
-@NoSideEffects()
+@pragma('dart2js:noInline')
+@pragma('dart2js:noSideEffects')
 readStaticFieldAnnotated() => field;
 
 /*element: main:SideEffects(reads static; writes nothing)*/
diff --git a/tests/compiler/dart2js/inference/side_effects_test.dart b/tests/compiler/dart2js/inference/side_effects_test.dart
index 0e2e5cb..ec23f4e 100644
--- a/tests/compiler/dart2js/inference/side_effects_test.dart
+++ b/tests/compiler/dart2js/inference/side_effects_test.dart
@@ -32,8 +32,8 @@
   ///
   /// Fills [actualMap] with the data.
   @override
-  void computeMemberData(
-      Compiler compiler, MemberEntity member, Map<Id, ActualData> actualMap,
+  void computeMemberData(Compiler compiler, MemberEntity member,
+      Map<Id, ActualData<String>> actualMap,
       {bool verbose: false}) {
     JsClosedWorld closedWorld = compiler.backendClosedWorldForTesting;
     JsToElementMap elementMap = closedWorld.elementMap;
diff --git a/tests/compiler/dart2js/inference/type_combination_test.dart b/tests/compiler/dart2js/inference/type_combination_test.dart
index cddae20..cc65647 100644
--- a/tests/compiler/dart2js/inference/type_combination_test.dart
+++ b/tests/compiler/dart2js/inference/type_combination_test.dart
@@ -54,7 +54,9 @@
   final first;
   final second;
   Pair(this.first, this.second);
+  @override
   int get hashCode => first.hashCode * 47 + second.hashCode;
+  @override
   bool operator ==(other) =>
       other is Pair &&
       identical(first, other.first) &&
diff --git a/tests/compiler/dart2js/inlining/data/conditional.dart b/tests/compiler/dart2js/inlining/data/conditional.dart
index 2cb4977..c8aa00f 100644
--- a/tests/compiler/dart2js/inlining/data/conditional.dart
+++ b/tests/compiler/dart2js/inlining/data/conditional.dart
@@ -5,9 +5,6 @@
 // Tests for the heuristics on conditional expression whose condition is a
 // parameter for which the max, instead of the sum, of the branch sizes is used.
 
-// ignore: IMPORT_INTERNAL_LIBRARY
-import 'dart:_js_helper';
-
 /*element: main:[]*/
 main() {
   conditionalField();
@@ -32,7 +29,7 @@
 }
 
 /*element: conditionalField:[]*/
-@NoInline()
+@pragma('dart2js:noInline')
 conditionalField() {
   _field1 = false;
   _conditionalField();
@@ -56,7 +53,7 @@
 }
 
 /*element: conditionalParameter:[]*/
-@NoInline()
+@pragma('dart2js:noInline')
 conditionalParameter() {
   _conditionalParameter(true);
   _conditionalParameter(false);
diff --git a/tests/compiler/dart2js/inlining/data/constructor.dart b/tests/compiler/dart2js/inlining/data/constructor.dart
index d65c500..bdd20c6 100644
--- a/tests/compiler/dart2js/inlining/data/constructor.dart
+++ b/tests/compiler/dart2js/inlining/data/constructor.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/// ignore: IMPORT_INTERNAL_LIBRARY
-import 'dart:_js_helper';
-
 /*element: main:[]*/
 main() {
   forceInlineConstructor();
@@ -19,12 +16,12 @@
 
 class Class1 {
   /*element: Class1.:[forceInlineConstructor:Class1]*/
-  @ForceInline()
+  @pragma('dart2js:tryInline')
   Class1();
 }
 
 /*element: forceInlineConstructor:[]*/
-@NoInline()
+@pragma('dart2js:noInline')
 forceInlineConstructor() {
   new Class1();
 }
@@ -35,14 +32,14 @@
 
 class Class2 {
   /*element: Class2.:[forceInlineConstructorBody+,forceInlineConstructorBody:Class2]*/
-  @ForceInline()
+  @pragma('dart2js:tryInline')
   Class2() {
     print('foo');
   }
 }
 
 /*element: forceInlineConstructorBody:[]*/
-@NoInline()
+@pragma('dart2js:noInline')
 forceInlineConstructorBody() {
   new Class2();
 }
@@ -53,12 +50,12 @@
 
 class Class3<T> {
   /*element: Class3.:[forceInlineGenericConstructor:Class3<int>]*/
-  @ForceInline()
+  @pragma('dart2js:tryInline')
   Class3();
 }
 
 /*element: forceInlineGenericConstructor:[]*/
-@NoInline()
+@pragma('dart2js:noInline')
 forceInlineGenericConstructor() {
   new Class3<int>();
 }
@@ -69,18 +66,18 @@
 
 class Class4a<T> implements Class4b<T> {
   /*element: Class4a.:[forceInlineGenericFactory:Class4a<int>]*/
-  @ForceInline()
+  @pragma('dart2js:tryInline')
   Class4a();
 }
 
 class Class4b<T> {
   /*element: Class4b.:[forceInlineGenericFactory:Class4b<int>]*/
-  @ForceInline()
+  @pragma('dart2js:tryInline')
   factory Class4b() => new Class4a<T>();
 }
 
 /*element: forceInlineGenericFactory:[]*/
-@NoInline()
+@pragma('dart2js:noInline')
 forceInlineGenericFactory() {
   new Class4b<int>();
 }
diff --git a/tests/compiler/dart2js/inlining/data/dynamic.dart b/tests/compiler/dart2js/inlining/data/dynamic.dart
index 99d6861..60bcb05 100644
--- a/tests/compiler/dart2js/inlining/data/dynamic.dart
+++ b/tests/compiler/dart2js/inlining/data/dynamic.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/// ignore: IMPORT_INTERNAL_LIBRARY
-import 'dart:_js_helper';
-
 /*element: main:[]*/
 main() {
   forceInlineDynamic();
@@ -17,16 +14,16 @@
 
 class Class1 {
   /*element: Class1.:[]*/
-  @NoInline()
+  @pragma('dart2js:noInline')
   Class1();
 
   /*element: Class1.method:[forceInlineDynamic]*/
-  @ForceInline()
+  @pragma('dart2js:tryInline')
   method() {}
 }
 
 /*element: forceInlineDynamic:[]*/
-@NoInline()
+@pragma('dart2js:noInline')
 forceInlineDynamic() {
   new Class1().method();
 }
@@ -37,16 +34,16 @@
 
 class Class2 {
   /*element: Class2.:[]*/
-  @NoInline()
+  @pragma('dart2js:noInline')
   Class2();
 
   /*element: Class2.method:[forceInlineOptional]*/
-  @ForceInline()
+  @pragma('dart2js:tryInline')
   method([x]) {}
 }
 
 /*element: forceInlineOptional:[]*/
-@NoInline()
+@pragma('dart2js:noInline')
 forceInlineOptional() {
   new Class2().method();
 }
diff --git a/tests/compiler/dart2js/inlining/data/external.dart b/tests/compiler/dart2js/inlining/data/external.dart
index 9204a33..b656ff4 100644
--- a/tests/compiler/dart2js/inlining/data/external.dart
+++ b/tests/compiler/dart2js/inlining/data/external.dart
@@ -2,8 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/// ignore: IMPORT_INTERNAL_LIBRARY
-import 'dart:_js_helper';
+@JS()
+library lib;
+
+import 'package:js/js.dart';
 
 /*element: main:[]*/
 main() {
@@ -11,10 +13,11 @@
 }
 
 /*element: externalFunction:[]*/
-@NoInline()
+@pragma('dart2js:noInline')
 externalFunction() {
   _externalFunction();
 }
 
 /*element: _externalFunction:[]*/
+@JS('externalFunction')
 external _externalFunction();
diff --git a/tests/compiler/dart2js/inlining/data/force_inline.dart b/tests/compiler/dart2js/inlining/data/force_inline.dart
index 3932fa2..c7e0cf0 100644
--- a/tests/compiler/dart2js/inlining/data/force_inline.dart
+++ b/tests/compiler/dart2js/inlining/data/force_inline.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/// ignore: IMPORT_INTERNAL_LIBRARY
-import 'dart:_js_helper';
-
 /*element: main:[]*/
 main() {
   forceInlineOnce();
@@ -19,11 +16,11 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 /*element: _forceInlineOnce:[forceInlineOnce]*/
-@ForceInline()
+@pragma('dart2js:tryInline')
 _forceInlineOnce() {}
 
 /*element: forceInlineOnce:[]*/
-@NoInline()
+@pragma('dart2js:noInline')
 forceInlineOnce() {
   _forceInlineOnce();
 }
@@ -33,17 +30,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 /*element: _forceInlineTwice:[forceInlineTwice1,forceInlineTwice2]*/
-@ForceInline()
+@pragma('dart2js:tryInline')
 _forceInlineTwice() {}
 
 /*element: forceInlineTwice1:[]*/
-@NoInline()
+@pragma('dart2js:noInline')
 forceInlineTwice1() {
   _forceInlineTwice();
 }
 
 /*element: forceInlineTwice2:[]*/
-@NoInline()
+@pragma('dart2js:noInline')
 forceInlineTwice2() {
   _forceInlineTwice();
 }
@@ -53,17 +50,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 /*element: _forceInlineNested1:[forceInlineNested]*/
-@ForceInline()
+@pragma('dart2js:tryInline')
 _forceInlineNested1() {}
 
 /*element: _forceInlineNested2:[forceInlineNested]*/
-@ForceInline()
+@pragma('dart2js:tryInline')
 _forceInlineNested2() {
   _forceInlineNested1();
 }
 
 /*element: forceInlineNested:[]*/
-@NoInline()
+@pragma('dart2js:noInline')
 forceInlineNested() {
   _forceInlineNested2();
 }
@@ -73,11 +70,11 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 /*element: _forceInlineOptional:[forceInlineOptional]*/
-@ForceInline()
+@pragma('dart2js:tryInline')
 _forceInlineOptional([x]) {}
 
 /*element: forceInlineOptional:[]*/
-@NoInline()
+@pragma('dart2js:noInline')
 forceInlineOptional() {
   _forceInlineOptional();
 }
diff --git a/tests/compiler/dart2js/inlining/data/force_inline_loops.dart b/tests/compiler/dart2js/inlining/data/force_inline_loops.dart
index b2f73fe..7927b0e 100644
--- a/tests/compiler/dart2js/inlining/data/force_inline_loops.dart
+++ b/tests/compiler/dart2js/inlining/data/force_inline_loops.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/// ignore: IMPORT_INTERNAL_LIBRARY
-import 'dart:_js_helper';
-
 /*element: main:[]*/
 main() {
   forceInlineLoops();
@@ -14,7 +11,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 /*element: _forLoop:loop,[forceInlineLoops]*/
-@ForceInline()
+@pragma('dart2js:tryInline')
 _forLoop() {
   for (int i = 0; i < 10; i++) {
     print(i);
@@ -22,7 +19,7 @@
 }
 
 /*element: _forInLoop:loop,[forceInlineLoops]*/
-@ForceInline()
+@pragma('dart2js:tryInline')
 _forInLoop() {
   for (var e in [0, 1, 2]) {
     print(e);
@@ -30,7 +27,7 @@
 }
 
 /*element: _whileLoop:loop,[forceInlineLoops]*/
-@ForceInline()
+@pragma('dart2js:tryInline')
 _whileLoop() {
   int i = 0;
   while (i < 10) {
@@ -40,7 +37,7 @@
 }
 
 /*element: _doLoop:loop,[forceInlineLoops]*/
-@ForceInline()
+@pragma('dart2js:tryInline')
 _doLoop() {
   int i = 0;
   do {
@@ -50,7 +47,7 @@
 }
 
 /*element: _hardLoop:loop,(allowLoops)code after return*/
-@ForceInline()
+@pragma('dart2js:tryInline')
 _hardLoop() {
   for (int i = 0; i < 10; i++) {
     if (i % 2 == 0) return 2;
@@ -60,7 +57,7 @@
 }
 
 /*element: forceInlineLoops:[]*/
-@NoInline()
+@pragma('dart2js:noInline')
 forceInlineLoops() {
   _forLoop();
   _forInLoop();
diff --git a/tests/compiler/dart2js/inlining/data/heuristics.dart b/tests/compiler/dart2js/inlining/data/heuristics.dart
index 6433d50..cd0bae7 100644
--- a/tests/compiler/dart2js/inlining/data/heuristics.dart
+++ b/tests/compiler/dart2js/inlining/data/heuristics.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/// ignore: IMPORT_INTERNAL_LIBRARY
-import 'dart:_js_helper';
-
 /*element: main:[]*/
 main() {
   outsideLoopNoArgsCalledOnce();
@@ -36,7 +33,7 @@
 }
 
 /*element: outsideLoopNoArgsCalledOnce:[]*/
-@NoInline()
+@pragma('dart2js:noInline')
 outsideLoopNoArgsCalledOnce() {
   _outsideLoopNoArgsCalledOnce();
 }
@@ -68,7 +65,7 @@
 }
 
 /*element: outsideLoopNoArgsCalledTwice:[]*/
-@NoInline()
+@pragma('dart2js:noInline')
 outsideLoopNoArgsCalledTwice() {
   _outsideLoopNoArgs1();
   _outsideLoopNoArgs1();
@@ -106,7 +103,7 @@
 }
 
 /*element: outsideLoopOneArgCalledOnce:[]*/
-@NoInline()
+@pragma('dart2js:noInline')
 outsideLoopOneArgCalledOnce() {
   _outsideLoopOneArgCalledOnce(0);
 }
@@ -142,7 +139,7 @@
 }
 
 /*element: outsideLoopOneArgCalledTwice:[]*/
-@NoInline()
+@pragma('dart2js:noInline')
 outsideLoopOneArgCalledTwice() {
   _outsideLoopOneArg1(0);
   _outsideLoopOneArg1(0);
@@ -174,7 +171,7 @@
 }
 
 /*element: insideLoopNoArgsCalledOnce:loop*/
-@NoInline()
+@pragma('dart2js:noInline')
 insideLoopNoArgsCalledOnce() {
   // ignore: UNUSED_LOCAL_VARIABLE
   for (var e in [1, 2, 3, 4]) {
@@ -223,7 +220,7 @@
 }
 
 /*element: insideLoopNoArgsCalledTwice:loop*/
-@NoInline()
+@pragma('dart2js:noInline')
 insideLoopNoArgsCalledTwice() {
   // ignore: UNUSED_LOCAL_VARIABLE
   for (var e in [1, 2, 3, 4]) {
@@ -264,7 +261,7 @@
 }
 
 /*element: insideLoopOneArgCalledOnce:loop*/
-@NoInline()
+@pragma('dart2js:noInline')
 insideLoopOneArgCalledOnce() {
   for (var e in [1, 2, 3, 4]) {
     _insideLoopOneArgCalledOnce(e);
@@ -314,7 +311,7 @@
 }
 
 /*element: insideLoopOneArgCalledTwice:loop*/
-@NoInline()
+@pragma('dart2js:noInline')
 insideLoopOneArgCalledTwice() {
   for (var e in [1, 2, 3, 4]) {
     _insideLoopOneArg1(e);
diff --git a/tests/compiler/dart2js/inlining/data/map.dart b/tests/compiler/dart2js/inlining/data/map.dart
index 8206a6b..1d4589e 100644
--- a/tests/compiler/dart2js/inlining/data/map.dart
+++ b/tests/compiler/dart2js/inlining/data/map.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/// ignore: IMPORT_INTERNAL_LIBRARY
-import 'dart:_js_helper';
-
 /*element: main:[]*/
 main() {
   passMapToNull();
@@ -16,7 +13,7 @@
 }
 
 /*element: passMapToNull:[]*/
-@NoInline()
+@pragma('dart2js:noInline')
 passMapToNull() {
   _passMapToNull(null);
 }
diff --git a/tests/compiler/dart2js/inlining/data/meta.dart b/tests/compiler/dart2js/inlining/data/meta.dart
index 7c445de..6dc7f22 100644
--- a/tests/compiler/dart2js/inlining/data/meta.dart
+++ b/tests/compiler/dart2js/inlining/data/meta.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 'package:meta/dart2js.dart';
-
 /*element: main:[]*/
 main() {
   tryInlineOnce();
@@ -16,11 +14,11 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 /*element: _tryInlineOnce:[tryInlineOnce]*/
-@tryInline
+@pragma('dart2js:tryInline')
 _tryInlineOnce() {}
 
 /*element: tryInlineOnce:[]*/
-@noInline
+@pragma('dart2js:noInline')
 tryInlineOnce() {
   _tryInlineOnce();
 }
@@ -30,17 +28,17 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 /*element: _tryInlineTwice:[tryInlineTwice1,tryInlineTwice2]*/
-@tryInline
+@pragma('dart2js:tryInline')
 _tryInlineTwice() {}
 
 /*element: tryInlineTwice1:[]*/
-@noInline
+@pragma('dart2js:noInline')
 tryInlineTwice1() {
   _tryInlineTwice();
 }
 
 /*element: tryInlineTwice2:[]*/
-@noInline
+@pragma('dart2js:noInline')
 tryInlineTwice2() {
   _tryInlineTwice();
 }
diff --git a/tests/compiler/dart2js/inlining/data/native.dart b/tests/compiler/dart2js/inlining/data/native.dart
index 1c907e1..6492328 100644
--- a/tests/compiler/dart2js/inlining/data/native.dart
+++ b/tests/compiler/dart2js/inlining/data/native.dart
@@ -4,9 +4,6 @@
 
 import 'dart:html';
 
-/// ignore: IMPORT_INTERNAL_LIBRARY
-import 'dart:_js_helper';
-
 /*element: main:[]*/
 main() {
   document.createElement(CustomElement.tag);
@@ -22,13 +19,13 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 /*element: newCustom:[]*/
-@NoInline()
+@pragma('dart2js:noInline')
 newCustom() {
   new CustomElement();
 }
 
 /*element: newCustomCreated:[]*/
-@NoInline()
+@pragma('dart2js:noInline')
 newCustomCreated() {
   new CustomElement.created();
 }
@@ -51,13 +48,13 @@
 ////////////////////////////////////////////////////////////////////////////////
 
 /*element: newNormal:[]*/
-@NoInline()
+@pragma('dart2js:noInline')
 newNormal() {
   new NormalElement();
 }
 
 /*element: newNormalCreated:[]*/
-@NoInline()
+@pragma('dart2js:noInline')
 newNormalCreated() {
   new NormalElement.created();
 }
diff --git a/tests/compiler/dart2js/inlining/data/nested.dart b/tests/compiler/dart2js/inlining/data/nested.dart
index 6357ede..e85ab5c 100644
--- a/tests/compiler/dart2js/inlining/data/nested.dart
+++ b/tests/compiler/dart2js/inlining/data/nested.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/// ignore: IMPORT_INTERNAL_LIBRARY
-import 'dart:_js_helper';
-
 /*element: main:[]*/
 main() {
   nestedGenericInlining();
@@ -17,11 +14,11 @@
 
 class Class1<T> {
   /*element: Class1.:[nestedGenericInlining:Class1<int>]*/
-  @ForceInline()
+  @pragma('dart2js:tryInline')
   Class1();
 
   /*element: Class1.method:[nestedGenericInlining]*/
-  @ForceInline()
+  @pragma('dart2js:tryInline')
   method() {
     new Class2<List<T>>().method();
   }
@@ -31,16 +28,16 @@
   // TODO(johnniwinther): Should the type have been Class<List<int>>?
   // Similarly below.
   /*element: Class2.:[nestedGenericInlining:Class2<List<Class1.T>>]*/
-  @ForceInline()
+  @pragma('dart2js:tryInline')
   Class2();
 
   /*element: Class2.method:[nestedGenericInlining]*/
-  @ForceInline()
+  @pragma('dart2js:tryInline')
   method() {}
 }
 
 /*element: nestedGenericInlining:[]*/
-@NoInline()
+@pragma('dart2js:noInline')
 nestedGenericInlining() {
   new Class1<int>().method();
 }
@@ -51,11 +48,11 @@
 
 class Class3a<T> implements Class3b<T> {
   /*element: Class3a.:[nestedGenericFactoryInlining:Class3a<int>]*/
-  @ForceInline()
+  @pragma('dart2js:tryInline')
   Class3a();
 
   /*element: Class3a.method:[nestedGenericFactoryInlining]*/
-  @ForceInline()
+  @pragma('dart2js:tryInline')
   method() {
     new Class4b<List<T>>().method();
   }
@@ -63,7 +60,7 @@
 
 abstract class Class3b<T> {
   /*element: Class3b.:[nestedGenericFactoryInlining:Class3b<int>]*/
-  @ForceInline()
+  @pragma('dart2js:tryInline')
   factory Class3b() => new Class3a<T>();
 
   method();
@@ -71,24 +68,24 @@
 
 class Class4a<T> implements Class4b<T> {
   /*element: Class4a.:[nestedGenericFactoryInlining:Class4a<Class4b.T>]*/
-  @ForceInline()
+  @pragma('dart2js:tryInline')
   Class4a();
 
   /*element: Class4a.method:[nestedGenericFactoryInlining]*/
-  @ForceInline()
+  @pragma('dart2js:tryInline')
   method() {}
 }
 
 abstract class Class4b<T> {
   /*element: Class4b.:[nestedGenericFactoryInlining:Class4b<List<Class3a.T>>]*/
-  @ForceInline()
+  @pragma('dart2js:tryInline')
   factory Class4b() => new Class4a<T>();
 
   method();
 }
 
 /*element: nestedGenericFactoryInlining:[]*/
-@NoInline()
+@pragma('dart2js:noInline')
 nestedGenericFactoryInlining() {
   new Class3b<int>().method();
 }
diff --git a/tests/compiler/dart2js/inlining/data/setter.dart b/tests/compiler/dart2js/inlining/data/setter.dart
index 50f6ec9..346568f 100644
--- a/tests/compiler/dart2js/inlining/data/setter.dart
+++ b/tests/compiler/dart2js/inlining/data/setter.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// ignore: IMPORT_INTERNAL_LIBRARY
-import 'dart:_js_helper';
-
 /*element: main:[]*/
 main() {
   inlineSetter();
@@ -13,7 +10,7 @@
 class Class1 {
   var field;
 /*element: Class1.:[]*/
-  @NoInline()
+  @pragma('dart2js:noInline')
   Class1();
   /*element: Class1.setter=:[inlineSetter]*/
   set setter(value) {
@@ -22,7 +19,7 @@
 }
 
 /*element: inlineSetter:[]*/
-@NoInline()
+@pragma('dart2js:noInline')
 inlineSetter() {
   Class1 c = new Class1();
   c.setter = 42;
diff --git a/tests/compiler/dart2js/inlining/data/switch.dart b/tests/compiler/dart2js/inlining/data/switch.dart
index 09577d7..cf9d938 100644
--- a/tests/compiler/dart2js/inlining/data/switch.dart
+++ b/tests/compiler/dart2js/inlining/data/switch.dart
@@ -2,16 +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.
 
-/// ignore: IMPORT_INTERNAL_LIBRARY
-import 'dart:_js_helper';
-
 /*element: main:[]*/
 main() {
   switchThrowing();
 }
 
 /*element: switchThrowing:[]*/
-@NoInline()
+@pragma('dart2js:noInline')
 switchThrowing() {
   switch (0) {
     case 0:
diff --git a/tests/compiler/dart2js/inlining/data/too_difficult.dart b/tests/compiler/dart2js/inlining/data/too_difficult.dart
index 446f66d..4a0b262 100644
--- a/tests/compiler/dart2js/inlining/data/too_difficult.dart
+++ b/tests/compiler/dart2js/inlining/data/too_difficult.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/// ignore: IMPORT_INTERNAL_LIBRARY
-import 'dart:_js_helper';
-
 /*element: main:[]*/
 main() {
   asyncMethod();
@@ -39,7 +36,7 @@
 }
 
 /*element: multipleReturns:[]*/
-@NoInline()
+@pragma('dart2js:noInline')
 multipleReturns() {
   _multipleReturns(true);
   _multipleReturns(false);
@@ -52,7 +49,7 @@
 }
 
 /*element: codeAfterReturn:[]*/
-@NoInline()
+@pragma('dart2js:noInline')
 codeAfterReturn() {
   _codeAfterReturn(true);
   _codeAfterReturn(false);
@@ -67,7 +64,7 @@
 }
 
 /*element: multipleThrows:[]*/
-@NoInline()
+@pragma('dart2js:noInline')
 multipleThrows() {
   _multipleThrows(true);
   _multipleThrows(false);
@@ -82,7 +79,7 @@
 }
 
 /*element: returnAndThrow:[]*/
-@NoInline()
+@pragma('dart2js:noInline')
 returnAndThrow() {
   _returnAndThrow(true);
   _returnAndThrow(false);
@@ -177,7 +174,7 @@
 }
 
 /*element: closureInInitializer:[]*/
-@NoInline()
+@pragma('dart2js:noInline')
 closureInInitializer() {
   new Class1();
 }
diff --git a/tests/compiler/dart2js/inlining/data/type_variables.dart b/tests/compiler/dart2js/inlining/data/type_variables.dart
index 8c9366d..4641443 100644
--- a/tests/compiler/dart2js/inlining/data/type_variables.dart
+++ b/tests/compiler/dart2js/inlining/data/type_variables.dart
@@ -2,9 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-/// ignore: IMPORT_INTERNAL_LIBRARY
-import 'dart:_js_helper';
-
 /*element: main:[]*/
 main() {
   inlineTypeTests();
@@ -22,7 +19,7 @@
 _inlineTypeTests(o) => o.field is dynamic Function(int);
 
 /*element: inlineTypeTests:[]*/
-@NoInline()
+@pragma('dart2js:noInline')
 void inlineTypeTests() {
   _inlineTypeTests(new Mixin1<int>());
   _inlineTypeTests(new Class1<int>());
diff --git a/tests/compiler/dart2js/inlining/meta_annotations2_test.dart b/tests/compiler/dart2js/inlining/meta_annotations2_test.dart
index 27e0277..d809601 100644
--- a/tests/compiler/dart2js/inlining/meta_annotations2_test.dart
+++ b/tests/compiler/dart2js/inlining/meta_annotations2_test.dart
@@ -7,6 +7,7 @@
 import "package:expect/expect.dart";
 import "package:async_helper/async_helper.dart";
 import 'package:compiler/compiler_new.dart';
+import 'package:compiler/src/commandline_options.dart';
 import '../helpers/memory_compiler.dart';
 
 const MEMORY_SOURCE_FILES = const {
@@ -17,6 +18,7 @@
         foo(y) => 49912344 + y;
 
         class A {
+          @pragma('dart2js:noElision')
           var field;
 
           @noInline
@@ -41,7 +43,9 @@
   runTests() async {
     OutputCollector collector = new OutputCollector();
     await runCompiler(
-        memorySourceFiles: MEMORY_SOURCE_FILES, outputProvider: collector);
+        memorySourceFiles: MEMORY_SOURCE_FILES,
+        outputProvider: collector,
+        options: [Flags.testMode]);
     // Simply check that the constants of the small functions are still in the
     // output, and that we don't see the result of constant folding.
     String jsOutput = collector.getOutput('', OutputType.js);
diff --git a/tests/compiler/dart2js/inlining/meta_annotations_test.dart b/tests/compiler/dart2js/inlining/meta_annotations_test.dart
index 8904107..8711d00 100644
--- a/tests/compiler/dart2js/inlining/meta_annotations_test.dart
+++ b/tests/compiler/dart2js/inlining/meta_annotations_test.dart
@@ -50,11 +50,11 @@
       Expect.equals(
           expectNoInline,
           closedWorld.annotationsData.hasNoInline(method),
-          "Unexpected annotation of @noInline on '$method'.");
+          "Unexpected annotation of @pragma('dart2js:noInline') on '$method'.");
       Expect.equals(
           expectTryInline,
           closedWorld.annotationsData.hasTryInline(method),
-          "Unexpected annotation of @tryInline on '$method'.");
+          "Unexpected annotation of @pragma('dart2js:tryInline') on '$method'.");
     }
 
     test('method');
diff --git a/tests/compiler/dart2js/js/js_spec_string_test.dart b/tests/compiler/dart2js/js/js_spec_string_test.dart
index 0dc8344..193a39f 100644
--- a/tests/compiler/dart2js/js/js_spec_string_test.dart
+++ b/tests/compiler/dart2js/js/js_spec_string_test.dart
@@ -15,11 +15,13 @@
 
 class Listener extends DiagnosticReporter {
   String errorMessage;
+  @override
   internalError(spannable, message) {
     errorMessage = message;
     throw "error";
   }
 
+  @override
   reportError(message, [infos = const <DiagnosticMessage>[]]) {
     errorMessage =
         '${message.message.arguments}'; // E.g.  "{text: Duplicate tag 'new'.}"
@@ -33,6 +35,7 @@
         MessageTemplate.TEMPLATES[messageKind].message(arguments));
   }
 
+  @override
   noSuchMethod(_) => null;
 }
 
diff --git a/tests/compiler/dart2js/jumps/jump_test.dart b/tests/compiler/dart2js/jumps/jump_test.dart
index 4d954d7..5ea39a1 100644
--- a/tests/compiler/dart2js/jumps/jump_test.dart
+++ b/tests/compiler/dart2js/jumps/jump_test.dart
@@ -56,6 +56,7 @@
 
   TargetData(this.index, this.id, this.sourceSpan, this.target);
 
+  @override
   String toString() => 'TargetData(index=$index,id=$id,'
       'sourceSpan=$sourceSpan,target=$target)';
 }
@@ -67,6 +68,7 @@
 
   GotoData(this.id, this.sourceSpan, this.target);
 
+  @override
   String toString() => 'GotoData(id=$id,sourceSpan=$sourceSpan,target=$target)';
 }
 
@@ -113,6 +115,7 @@
     });
   }
 
+  @override
   void run(ir.Node root) {
     super.run(root);
     processData();
@@ -136,30 +139,35 @@
     }
   }
 
+  @override
   visitForStatement(ir.ForStatement node) {
     addTargetData(
         node, createLoopId(node), _localsMap.getJumpTargetForFor(node));
     super.visitForStatement(node);
   }
 
+  @override
   visitForInStatement(ir.ForInStatement node) {
     addTargetData(
         node, createLoopId(node), _localsMap.getJumpTargetForForIn(node));
     super.visitForInStatement(node);
   }
 
+  @override
   visitWhileStatement(ir.WhileStatement node) {
     addTargetData(
         node, createLoopId(node), _localsMap.getJumpTargetForWhile(node));
     super.visitWhileStatement(node);
   }
 
+  @override
   visitDoStatement(ir.DoStatement node) {
     addTargetData(
         node, createLoopId(node), _localsMap.getJumpTargetForDo(node));
     super.visitDoStatement(node);
   }
 
+  @override
   visitBreakStatement(ir.BreakStatement node) {
     JumpTarget target = _localsMap.getJumpTargetForBreak(node);
     assert(target != null, 'No target for $node.');
@@ -180,18 +188,21 @@
     super.visitLabeledStatement(node);
   }
 
+  @override
   visitSwitchStatement(ir.SwitchStatement node) {
     addTargetData(
         node, createSwitchId(node), _localsMap.getJumpTargetForSwitch(node));
     super.visitSwitchStatement(node);
   }
 
+  @override
   visitSwitchCase(ir.SwitchCase node) {
     addTargetData(node, createSwitchCaseId(node),
         _localsMap.getJumpTargetForSwitchCase(node));
     super.visitSwitchCase(node);
   }
 
+  @override
   visitContinueSwitchStatement(ir.ContinueSwitchStatement node) {
     JumpTarget target = _localsMap.getJumpTargetForContinueSwitch(node);
     assert(target != null, 'No target for $node.');
diff --git a/tests/compiler/dart2js/member_usage/data/constant_folding.dart b/tests/compiler/dart2js/member_usage/data/constant_folding.dart
new file mode 100644
index 0000000..4fa09bb
--- /dev/null
+++ b/tests/compiler/dart2js/member_usage/data/constant_folding.dart
@@ -0,0 +1,76 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Derived from dart2js_extra/constant_folding_test
+
+import "package:expect/expect.dart";
+
+/*element: main:invoke*/
+void main() {
+  const BitNot(42, 4294967253).check();
+  const BitNot(4294967253, 42).check();
+  const BitNot(-42, 41).check();
+  const BitNot(-1, 0).check();
+  const BitNot(0, 0xFFFFFFFF).check();
+  const BitNot(4294967295, 0).check();
+  const BitNot(0x12121212121212, 0xEDEDEDED).check();
+}
+
+/*element: jsEquals:invoke*/
+void jsEquals(expected, actual, [String reason = null]) {
+  if (expected is num && actual is num) {
+    if (expected.isNaN && actual.isNaN) return;
+  }
+
+  Expect.equals(expected, actual, reason);
+
+  if (expected == 0 && actual == 0) {
+    Expect.equals(
+        expected.isNegative,
+        actual.isNegative,
+        (reason == null ? "" : "$reason ") +
+            "${expected.toString()} and "
+            "${actual.toString()} have different signs.");
+  }
+}
+
+abstract class TestOp {
+  /*element: TestOp.expected:init,read*/
+  final expected;
+
+  /*element: TestOp.result:init,read*/
+  final result;
+
+  /*strong.element: TestOp.:invoke*/
+  const TestOp(this.expected, this.result);
+
+  /*element: TestOp.checkAll:invoke*/
+  @pragma('dart2js:noInline')
+  checkAll(evalResult) {
+    jsEquals(expected, result,
+        "Frontend constant evaluation does not yield expected value.");
+    jsEquals(expected, evalResult,
+        "Backend constant evaluation does not yield expected value.");
+    jsEquals(expected, eval(), "eval() does not yield expected value.");
+  }
+
+  eval();
+}
+
+class BitNot extends TestOp {
+  /*element: BitNot.arg:init,read*/
+  final arg;
+
+  /*strong.element: BitNot.:invoke*/
+  const BitNot(this.arg, expected) : super(expected, ~arg);
+
+  /*element: BitNot.check:invoke*/
+  @pragma('dart2js:tryInline')
+  check() => checkAll(eval());
+
+  /*element: BitNot.eval:invoke*/
+  @override
+  @pragma('dart2js:tryInline')
+  eval() => ~arg;
+}
diff --git a/tests/compiler/dart2js/member_usage/data/constructors.dart b/tests/compiler/dart2js/member_usage/data/constructors.dart
index fe9889d..c53d93c 100644
--- a/tests/compiler/dart2js/member_usage/data/constructors.dart
+++ b/tests/compiler/dart2js/member_usage/data/constructors.dart
@@ -59,6 +59,14 @@
 
   /*element: Class.constructor7c:invoke=(1,c)*/
   Class.constructor7c(a, {b, c}) {}
+
+  /*element: Class.constructor8a:invoke=(0)*/
+  @pragma('dart2js:noElision')
+  Class.constructor8a([a, b]) {}
+
+  /*element: Class.constructor8b:invoke=(0)*/
+  @pragma('dart2js:noElision')
+  Class.constructor8b({a, b}) {}
 }
 
 /*element: main:invoke*/
@@ -92,4 +100,7 @@
   new Class.constructor7a(null);
   new Class.constructor7b(null, b: null);
   new Class.constructor7c(null, c: null);
+
+  new Class.constructor8a();
+  new Class.constructor8b();
 }
diff --git a/tests/compiler/dart2js/member_usage/data/instance_method_parameters.dart b/tests/compiler/dart2js/member_usage/data/instance_method_parameters.dart
index 28754c5..44aa24e 100644
--- a/tests/compiler/dart2js/member_usage/data/instance_method_parameters.dart
+++ b/tests/compiler/dart2js/member_usage/data/instance_method_parameters.dart
@@ -85,6 +85,14 @@
   /*element: Class.method8d:invoke,read*/
   method8d(a, {b, c}) {}
 
+  /*element: Class.method9a:invoke=(0)*/
+  @pragma('dart2js:noElision')
+  method9a([a, b]) {}
+
+  /*element: Class.method9b:invoke=(0)*/
+  @pragma('dart2js:noElision')
+  method9b({a, b}) {}
+
   /*element: Class.test:invoke*/
   test() {
     method1();
@@ -125,6 +133,9 @@
     method8b(null, b: null);
     method8c(null, c: null);
     method8d;
+
+    method9a();
+    method9b();
   }
 }
 
diff --git a/tests/compiler/dart2js/member_usage/data/static_method_parameters.dart b/tests/compiler/dart2js/member_usage/data/static_method_parameters.dart
index bb133a2..936c819 100644
--- a/tests/compiler/dart2js/member_usage/data/static_method_parameters.dart
+++ b/tests/compiler/dart2js/member_usage/data/static_method_parameters.dart
@@ -83,6 +83,14 @@
 /*element: method8d:invoke,read*/
 method8d(a, {b, c}) {}
 
+/*element: method9a:invoke=(0)*/
+@pragma('dart2js:noElision')
+method9a([a, b]) {}
+
+/*element: method9b:invoke=(0)*/
+@pragma('dart2js:noElision')
+method9b({a, b}) {}
+
 /*element: main:invoke*/
 main() {
   method1();
@@ -123,4 +131,7 @@
   method8b(null, b: null);
   method8c(null, c: null);
   method8d;
+
+  method9a();
+  method9b();
 }
diff --git a/tests/compiler/dart2js/member_usage/member_usage_test.dart b/tests/compiler/dart2js/member_usage/member_usage_test.dart
index b7e95ee..9767dc5 100644
--- a/tests/compiler/dart2js/member_usage/member_usage_test.dart
+++ b/tests/compiler/dart2js/member_usage/member_usage_test.dart
@@ -23,12 +23,18 @@
     print(' Test with enqueuer checks');
     print('------------------------------------------------------------------');
     await checkTests(dataDir, const ClosedWorldDataComputer(false),
-        args: args, testOmit: false, testFrontend: true);
+        args: args,
+        testOmit: false,
+        testFrontend: true,
+        testCFEConstants: true);
     print('------------------------------------------------------------------');
     print(' Test without enqueuer checks');
     print('------------------------------------------------------------------');
     await checkTests(dataDir, const ClosedWorldDataComputer(true),
-        args: args, testOmit: false, testFrontend: true);
+        args: args,
+        testOmit: false,
+        testFrontend: true,
+        testCFEConstants: true);
   });
 }
 
diff --git a/tests/compiler/dart2js/model/cfe_annotations_test.dart b/tests/compiler/dart2js/model/cfe_annotations_test.dart
new file mode 100644
index 0000000..d1ea655
--- /dev/null
+++ b/tests/compiler/dart2js/model/cfe_annotations_test.dart
@@ -0,0 +1,462 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:args/args.dart';
+import 'package:async_helper/async_helper.dart';
+import 'package:compiler/src/commandline_options.dart';
+import 'package:compiler/src/compiler.dart';
+import 'package:compiler/src/elements/entities.dart';
+import 'package:compiler/src/ir/annotations.dart';
+import 'package:compiler/src/js_backend/native_data.dart';
+import 'package:compiler/src/kernel/kernel_strategy.dart';
+import 'package:compiler/src/kernel/element_map_impl.dart';
+import 'package:expect/expect.dart';
+import 'package:kernel/ast.dart' as ir;
+
+import '../helpers/args_helper.dart';
+import '../helpers/memory_compiler.dart';
+
+const String pathPrefix = 'sdk/tests/compiler/dart2js_native/';
+
+const Map<String, String> source = {
+  '$pathPrefix/main.dart': '''
+
+library lib;
+
+import 'package:meta/dart2js.dart';
+
+import 'jslib1.dart';
+import 'jslib2.dart';
+import 'nativelib.dart';
+
+@pragma('dart2js:noInline')
+method1() {}
+
+@noInline
+method2() {}
+
+@pragma('dart2js:tryInline')
+method3() {}
+
+@tryInline
+method4() {}
+
+main() {
+  method1();
+  method2();
+  method3();
+  method4();
+  new JsClass1()..jsMethod1()..jsMethod2();
+  new JsClass2();
+  jsMethod3();
+  new NativeClass1()..nativeMethod()..nativeField;
+  new NativeClass2()..nativeField;
+  new NativeClass3()..nativeMethod()..nativeGetter;
+  nativeMethod();
+}
+''',
+  '$pathPrefix/jslib1.dart': '''
+
+@JS('lib1')
+library lib1;
+
+import 'package:js/js.dart';
+
+@JS('JsInteropClass1')
+class JsClass1 {
+  @JS('jsInteropMethod1')
+  external jsMethod1();
+  
+  external jsMethod2();
+}
+
+''',
+  '$pathPrefix/jslib2.dart': '''
+
+@JS()
+library lib2;
+
+import 'package:js/js.dart';
+
+@JS()
+@anonymous
+class JsClass2 {
+}
+
+@JS('jsInteropMethod3')
+external jsMethod3();
+
+external jsMethod4();
+''',
+  '$pathPrefix/nativelib.dart': '''
+library lib3; 
+ 
+import 'dart:_js_helper';
+
+@Native('Class1')
+class NativeClass1 {
+  @JSName('field1')
+  var nativeField;
+  
+  @JSName('method1')
+  nativeMethod() native;
+}
+
+@Native('Class2,!nonleaf')
+class NativeClass2 {
+  @JSName('field2')
+  var nativeField;
+}
+
+@Native('Class3a,Class3b')
+class NativeClass3 {
+  
+  @JSName('method2')
+  get nativeGetter native;
+
+  @Creates('String')
+  @Returns('int')
+  nativeMethod() native;
+}
+
+@JSName('method3')
+nativeMethod() native;
+''',
+};
+
+const Map<String, String> expectedNativeClassNames = {
+  '$pathPrefix/nativelib.dart::NativeClass1': 'Class1',
+  '$pathPrefix/nativelib.dart::NativeClass2': 'Class2,!nonleaf',
+  '$pathPrefix/nativelib.dart::NativeClass3': 'Class3a,Class3b',
+};
+
+const Map<String, String> expectedNativeMemberNames = {
+  '$pathPrefix/nativelib.dart::NativeClass1::nativeField': 'field1',
+  '$pathPrefix/nativelib.dart::NativeClass1::nativeMethod': 'method1',
+  '$pathPrefix/nativelib.dart::NativeClass2::nativeField': 'field2',
+  '$pathPrefix/nativelib.dart::NativeClass3::nativeGetter': 'method2',
+  '$pathPrefix/nativelib.dart::nativeMethod': 'method3',
+};
+
+const Map<String, String> expectedCreates = {
+  '$pathPrefix/nativelib.dart::NativeClass3::nativeMethod': 'String',
+};
+
+const Map<String, String> expectedReturns = {
+  '$pathPrefix/nativelib.dart::NativeClass3::nativeMethod': 'int',
+};
+
+const Map<String, String> expectedJsInteropLibraryNames = {
+  '$pathPrefix/jslib1.dart': 'lib1',
+  '$pathPrefix/jslib2.dart': '',
+};
+
+const Map<String, String> expectedJsInteropClassNames = {
+  '$pathPrefix/jslib1.dart::JsClass1': 'JsInteropClass1',
+  '$pathPrefix/jslib2.dart::JsClass2': '',
+};
+
+const Map<String, String> expectedJsInteropMemberNames = {
+  '$pathPrefix/jslib1.dart::JsClass1::jsMethod1': 'jsInteropMethod1',
+  '$pathPrefix/jslib2.dart::jsMethod3': 'jsInteropMethod3',
+};
+
+const Set<String> expectedAnonymousJsInteropClasses = {
+  '$pathPrefix/jslib2.dart::JsClass2',
+};
+
+const Set<String> expectedNoInlineMethods = {
+  '$pathPrefix/main.dart::method1',
+  '$pathPrefix/main.dart::method2',
+};
+
+const Set<String> expectedTryInlineMethods = {
+  '$pathPrefix/main.dart::method3',
+  '$pathPrefix/main.dart::method4',
+};
+
+main(List<String> args) {
+  ArgParser argParser = createArgParser();
+
+  asyncTest(() async {
+    ArgResults argResults = argParser.parse(args);
+    Uri librariesSpecificationUri = getLibrariesSpec(argResults);
+    Uri packageConfig = getPackages(argResults);
+    List<String> options = getOptions(argResults);
+
+    runTest({bool useIr}) async {
+      CompilationResult result = await runCompiler(
+          entryPoint: Uri.parse('memory:$pathPrefix/main.dart'),
+          memorySourceFiles: source,
+          packageConfig: packageConfig,
+          librariesSpecificationUri: librariesSpecificationUri,
+          options: (useIr
+              ? ['${Flags.enableLanguageExperiments}=constant-update-2018']
+              : [])
+            ..addAll(options));
+      Expect.isTrue(result.isSuccess);
+      Compiler compiler = result.compiler;
+      KernelFrontEndStrategy frontendStrategy = compiler.frontendStrategy;
+      KernelToElementMapImpl elementMap = frontendStrategy.elementMap;
+      ir.Component component = elementMap.env.mainComponent;
+      IrAnnotationData annotationData =
+          frontendStrategy.irAnnotationDataForTesting;
+
+      void testAll(NativeData nativeData) {
+        void testMember(String idPrefix, ir.Member member,
+            {bool implicitJsInteropMember, bool implicitNativeMember}) {
+          String memberId = '$idPrefix::${member.name.name}';
+          MemberEntity memberEntity = elementMap.getMember(member);
+
+          String expectedJsInteropMemberName =
+              expectedJsInteropMemberNames[memberId];
+          String expectedNativeMemberName = expectedNativeMemberNames[memberId];
+          Set<String> expectedPragmaNames = {};
+          if (expectedNoInlineMethods.contains(memberId)) {
+            expectedPragmaNames.add('dart2js:noInline');
+          }
+          if (expectedTryInlineMethods.contains(memberId)) {
+            expectedPragmaNames.add('dart2js:tryInline');
+          }
+
+          String expectedCreatesText = expectedCreates[memberId];
+          String expectedReturnsText = expectedReturns[memberId];
+
+          if (useIr) {
+            Expect.equals(
+                expectedJsInteropMemberName,
+                annotationData.getJsInteropMemberName(member),
+                "Unexpected js interop member name from IR for $member, "
+                "id: $memberId");
+
+            Expect.equals(
+                expectedNativeMemberName,
+                annotationData.getNativeMemberName(member),
+                "Unexpected js interop member name from IR for $member, "
+                "id: $memberId");
+
+            List<PragmaAnnotationData> pragmaAnnotations =
+                annotationData.getMemberPragmaAnnotationData(member);
+            Set<String> pragmaNames =
+                pragmaAnnotations.map((d) => d.name).toSet();
+            Expect.setEquals(expectedPragmaNames, pragmaNames,
+                "Unexpected pragmas from IR for $member, " "id: $memberId");
+
+            List<String> createsAnnotations =
+                annotationData.getCreatesAnnotations(member);
+            Expect.equals(
+                expectedCreatesText,
+                createsAnnotations.isEmpty
+                    ? null
+                    : createsAnnotations.join(','),
+                "Unexpected create annotations from IR for $member, "
+                "id: $memberId");
+
+            List<String> returnsAnnotations =
+                annotationData.getReturnsAnnotations(member);
+            Expect.equals(
+                expectedReturnsText,
+                returnsAnnotations.isEmpty
+                    ? null
+                    : returnsAnnotations.join(','),
+                "Unexpected returns annotations from IR for $member, "
+                "id: $memberId");
+          }
+
+          bool isJsInteropMember =
+              (implicitJsInteropMember && member.isExternal) ||
+                  expectedJsInteropMemberName != null;
+          Expect.equals(
+              isJsInteropMember,
+              nativeData.isJsInteropMember(memberEntity),
+              "Unexpected js interop member result from native data for $member, "
+              "id: $memberId");
+          Expect.equals(
+              isJsInteropMember
+                  ? expectedJsInteropMemberName ?? memberEntity.name
+                  : null,
+              nativeData.getJsInteropMemberName(memberEntity),
+              "Unexpected js interop member name from native data for $member, "
+              "id: $memberId");
+
+          bool isNativeMember =
+              implicitNativeMember || expectedNativeMemberName != null;
+          Expect.equals(
+              isNativeMember || isJsInteropMember,
+              nativeData.isNativeMember(memberEntity),
+              "Unexpected native member result from native data for $member, "
+              "id: $memberId");
+          Expect.equals(
+              isNativeMember
+                  ? expectedNativeMemberName ?? memberEntity.name
+                  : (isJsInteropMember
+                      ? expectedJsInteropMemberName ?? memberEntity.name
+                      : null),
+              nativeData.getFixedBackendName(memberEntity),
+              "Unexpected fixed backend name from native data for $member, "
+              "id: $memberId");
+
+          if (expectedCreatesText != null) {
+            String createsText;
+            if (memberEntity.isField) {
+              createsText = nativeData
+                  .getNativeFieldLoadBehavior(memberEntity)
+                  .typesInstantiated
+                  .join(',');
+            } else {
+              createsText = nativeData
+                  .getNativeMethodBehavior(memberEntity)
+                  .typesInstantiated
+                  .join(',');
+            }
+            Expect.equals(
+                expectedCreatesText,
+                createsText,
+                "Unexpected create annotations from native data for $member, "
+                "id: $memberId");
+          }
+
+          if (expectedReturnsText != null) {
+            String returnsText;
+            if (memberEntity.isField) {
+              returnsText = nativeData
+                  .getNativeFieldLoadBehavior(memberEntity)
+                  .typesReturned
+                  .join(',');
+            } else {
+              returnsText = nativeData
+                  .getNativeMethodBehavior(memberEntity)
+                  .typesReturned
+                  .join(',');
+            }
+            Expect.equals(
+                expectedReturnsText,
+                returnsText,
+                "Unexpected returns annotations from native data for $member, "
+                "id: $memberId");
+          }
+
+          List<PragmaAnnotationData> pragmaAnnotations = frontendStrategy
+              .modularStrategyForTesting
+              .getPragmaAnnotationData(member);
+          Set<String> pragmaNames =
+              pragmaAnnotations.map((d) => d.name).toSet();
+          Expect.setEquals(
+              expectedPragmaNames,
+              pragmaNames,
+              "Unexpected pragmas from modular strategy for $member, "
+              "id: $memberId");
+        }
+
+        for (ir.Library library in component.libraries) {
+          if (library.importUri.scheme == 'memory') {
+            String libraryId = library.importUri.path;
+            LibraryEntity libraryEntity = elementMap.getLibrary(library);
+
+            String expectedJsInteropLibraryName =
+                expectedJsInteropLibraryNames[libraryId];
+            if (useIr) {
+              Expect.equals(
+                  expectedJsInteropLibraryName,
+                  annotationData.getJsInteropLibraryName(library),
+                  "Unexpected js library name from IR for $library");
+            }
+            Expect.equals(
+                expectedJsInteropLibraryName != null,
+                nativeData.isJsInteropLibrary(libraryEntity),
+                "Unexpected js library result from native data for $library");
+            Expect.equals(
+                expectedJsInteropLibraryName,
+                nativeData.getJsInteropLibraryName(libraryEntity),
+                "Unexpected js library name from native data for $library");
+
+            for (ir.Class cls in library.classes) {
+              String clsId = '$libraryId::${cls.name}';
+              ClassEntity classEntity = elementMap.getClass(cls);
+
+              String expectedNativeClassName = expectedNativeClassNames[clsId];
+              if (useIr) {
+                Expect.equals(
+                    expectedNativeClassName,
+                    annotationData.getNativeClassName(cls),
+                    "Unexpected native class name from IR for $cls");
+              }
+              bool isNativeClass = nativeData.isNativeClass(classEntity) &&
+                  !nativeData.isJsInteropClass(classEntity);
+              String nativeDataClassName;
+              if (isNativeClass) {
+                nativeDataClassName =
+                    nativeData.getNativeTagsOfClass(classEntity).join(',');
+                if (nativeData.hasNativeTagsForcedNonLeaf(classEntity)) {
+                  nativeDataClassName += ',!nonleaf';
+                }
+              }
+              Expect.equals(expectedNativeClassName != null, isNativeClass,
+                  "Unexpected native class result from native data for $cls");
+
+              Expect.equals(expectedNativeClassName, nativeDataClassName,
+                  "Unexpected native class name from native data for $cls");
+
+              String expectedJsInteropClassName =
+                  expectedJsInteropClassNames[clsId];
+              if (useIr) {
+                Expect.equals(
+                    expectedJsInteropClassName,
+                    annotationData.getJsInteropClassName(cls),
+                    "Unexpected js class name from IR for $cls");
+              }
+              Expect.equals(
+                  expectedJsInteropClassName != null,
+                  nativeData.isJsInteropClass(classEntity),
+                  "Unexpected js class result from native data for $cls");
+              Expect.equals(
+                  expectedJsInteropClassName,
+                  nativeData.getJsInteropClassName(classEntity),
+                  "Unexpected js class name from native data for $cls");
+
+              bool expectedAnonymousJsInteropClass =
+                  expectedAnonymousJsInteropClasses.contains(clsId);
+              if (useIr) {
+                Expect.equals(
+                    expectedAnonymousJsInteropClass,
+                    annotationData.isAnonymousJsInteropClass(cls),
+                    "Unexpected js anonymous class result from IR for $cls");
+              }
+              Expect.equals(
+                  expectedAnonymousJsInteropClass,
+                  nativeData.isAnonymousJsInteropClass(classEntity),
+                  "Unexpected js anonymousclass result from native data for "
+                  "$cls");
+
+              for (ir.Member member in cls.members) {
+                testMember(clsId, member,
+                    implicitJsInteropMember:
+                        nativeData.isJsInteropClass(classEntity),
+                    implicitNativeMember: member is! ir.Constructor &&
+                        nativeData.isNativeClass(classEntity) &&
+                        !nativeData.isJsInteropClass(classEntity));
+              }
+            }
+            for (ir.Member member in library.members) {
+              testMember(libraryId, member,
+                  implicitJsInteropMember: expectedJsInteropLibraryName != null,
+                  implicitNativeMember: false);
+            }
+          }
+        }
+      }
+
+      testAll(compiler.resolutionWorldBuilder.closedWorldForTesting.nativeData);
+      if (useIr) {
+        testAll(new NativeDataImpl.fromIr(elementMap, annotationData));
+      }
+    }
+
+    print('test annotations from K-model');
+    await runTest(useIr: false);
+
+    print('test annotations from IR');
+    await runTest(useIr: true);
+  });
+}
diff --git a/tests/compiler/dart2js/model/cfe_constant_evaluation_test.dart b/tests/compiler/dart2js/model/cfe_constant_evaluation_test.dart
new file mode 100644
index 0000000..52f93c0
--- /dev/null
+++ b/tests/compiler/dart2js/model/cfe_constant_evaluation_test.dart
@@ -0,0 +1,588 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library dart2js.constants.expressions.evaluate_test;
+
+import 'dart:async';
+import 'package:async_helper/async_helper.dart';
+import 'package:expect/expect.dart';
+import 'package:compiler/src/commandline_options.dart';
+import 'package:compiler/src/common_elements.dart';
+import 'package:compiler/src/compiler.dart';
+import 'package:compiler/src/constants/values.dart';
+import 'package:compiler/src/elements/entities.dart';
+import 'package:compiler/src/elements/indexed.dart';
+import 'package:compiler/src/ir/constants.dart';
+import 'package:compiler/src/ir/visitors.dart';
+import 'package:compiler/src/kernel/kernel_strategy.dart';
+import 'package:compiler/src/kernel/element_map_impl.dart';
+import 'package:front_end/src/api_unstable/dart2js.dart' as ir;
+import 'package:kernel/ast.dart' as ir;
+import '../helpers/memory_compiler.dart';
+
+class TestData {
+  final String name;
+
+  /// Declarations needed for the [constants].
+  final String declarations;
+
+  /// Tested constants.
+  final List<ConstantData> constants;
+
+  const TestData(this.name, this.declarations, this.constants);
+}
+
+class ConstantData {
+  /// Source code for the constant expression.
+  final String code;
+
+  /// Constant value as structured text for the empty environment or a map from
+  /// environment to either the expected constant value as structured text or
+  /// a [ConstantResult].
+  final expectedResults;
+
+  /// A [String] or a list of [String]s containing the code names for the error
+  /// messages expected as the result of evaluating the constant under the empty
+  /// environment.
+  final expectedErrors;
+
+  const ConstantData(this.code, this.expectedResults, {this.expectedErrors});
+}
+
+const List<TestData> DATA = const [
+  const TestData('simple', '', const [
+    const ConstantData('null', 'NullConstant'),
+    const ConstantData('false', 'BoolConstant(false)'),
+    const ConstantData('true', 'BoolConstant(true)'),
+    const ConstantData('0', 'IntConstant(0)'),
+    const ConstantData('0.0', 'IntConstant(0)'),
+    const ConstantData('"foo"', 'StringConstant("foo")'),
+    const ConstantData('1 + 2', 'IntConstant(3)'),
+    const ConstantData('-(1)', 'IntConstant(-1)'),
+    const ConstantData('1 == 2', 'BoolConstant(false)'),
+    const ConstantData('1 != 2', 'BoolConstant(true)'),
+    const ConstantData('1 / 0', 'DoubleConstant(Infinity)'),
+    const ConstantData('0 / 0', 'DoubleConstant(NaN)'),
+    const ConstantData('1 << 0', 'IntConstant(1)'),
+    const ConstantData('1 >> 0', 'IntConstant(1)'),
+    const ConstantData('"foo".length', 'IntConstant(3)'),
+    const ConstantData('identical(0, 1)', 'BoolConstant(false)'),
+    const ConstantData('"a" "b"', 'StringConstant("ab")'),
+    const ConstantData(r'"${null}"', 'StringConstant("null")'),
+    const ConstantData('identical', 'FunctionConstant(identical)'),
+    const ConstantData('true ? 0 : 1', 'IntConstant(0)'),
+    const ConstantData('proxy', 'ConstructedConstant(_Proxy())'),
+    const ConstantData('const [] == null', 'BoolConstant(false)'),
+    const ConstantData('proxy == null', 'BoolConstant(false)'),
+    const ConstantData('proxy != null', 'BoolConstant(true)'),
+    const ConstantData('null == proxy', 'BoolConstant(false)'),
+    const ConstantData('null != proxy', 'BoolConstant(true)'),
+    const ConstantData('true == proxy', 'BoolConstant(false)'),
+    const ConstantData('true != proxy', 'BoolConstant(true)'),
+    const ConstantData('0 == proxy', 'BoolConstant(false)'),
+    const ConstantData('0 != proxy', 'BoolConstant(true)'),
+    const ConstantData('0.5 == proxy', 'BoolConstant(false)'),
+    const ConstantData('0.5 != proxy', 'BoolConstant(true)'),
+    const ConstantData('"" == proxy', 'BoolConstant(false)'),
+    const ConstantData('"" != proxy', 'BoolConstant(true)'),
+    const ConstantData('Object', 'TypeConstant(Object)'),
+    const ConstantData('null ?? 0', 'IntConstant(0)'),
+    const ConstantData(
+        'const [0, 1]', 'ListConstant(<int>[IntConstant(0), IntConstant(1)])'),
+    const ConstantData('const <int>[0, 1]',
+        'ListConstant(<int>[IntConstant(0), IntConstant(1)])'),
+    const ConstantData(
+        'const {0, 1}', 'SetConstant(<int>{IntConstant(0), IntConstant(1)})'),
+    const ConstantData('const <int>{0, 1}',
+        'SetConstant(<int>{IntConstant(0), IntConstant(1)})'),
+    const ConstantData(
+        'const {0: 1, 2: 3}',
+        'MapConstant(<int, int>{IntConstant(0): IntConstant(1), '
+            'IntConstant(2): IntConstant(3)})'),
+    const ConstantData(
+        'const <int, int>{0: 1, 2: 3}',
+        'MapConstant(<int, int>{IntConstant(0): IntConstant(1), '
+            'IntConstant(2): IntConstant(3)})'),
+    const ConstantData('const <int, int>{0: 1, 0: 2}', 'NonConstant',
+        expectedErrors: 'ConstEvalDuplicateKey'),
+    const ConstantData(
+        'const bool.fromEnvironment("foo", defaultValue: false)',
+        const <Map<String, String>, String>{
+          const {}: 'BoolConstant(false)',
+          const {'foo': 'true'}: 'BoolConstant(true)'
+        }),
+    const ConstantData(
+        'const int.fromEnvironment("foo", defaultValue: 42)',
+        const <Map<String, String>, String>{
+          const {}: 'IntConstant(42)',
+          const {'foo': '87'}: 'IntConstant(87)'
+        }),
+    const ConstantData(
+        'const String.fromEnvironment("foo", defaultValue: "bar")',
+        const <Map<String, String>, String>{
+          const {}: 'StringConstant("bar")',
+          const {'foo': 'foo'}: 'StringConstant("foo")'
+        }),
+  ]),
+  const TestData('env', '''
+const a = const bool.fromEnvironment("foo", defaultValue: true);
+const b = const int.fromEnvironment("bar", defaultValue: 42);
+
+class A {
+  const A();
+}
+class B {
+  final field1;
+  const B(this.field1);
+}
+class C extends B {
+  final field2;
+  const C({field1: 42, this.field2: false}) : super(field1);
+  const C.named([field = false]) : this(field1: field, field2: field);
+}
+class D extends C {
+  final field3 = 99;
+  const D(a, b) : super(field2: a, field1: b);
+}
+''', const [
+    const ConstantData('const Object()', 'ConstructedConstant(Object())'),
+    const ConstantData('const A()', 'ConstructedConstant(A())'),
+    const ConstantData(
+        'const B(0)', 'ConstructedConstant(B(field1=IntConstant(0)))'),
+    const ConstantData('const B(const A())',
+        'ConstructedConstant(B(field1=ConstructedConstant(A())))'),
+    const ConstantData(
+        'const C()',
+        'ConstructedConstant(C(field1=IntConstant(42),'
+            'field2=BoolConstant(false)))'),
+    const ConstantData(
+        'const C(field1: 87)',
+        'ConstructedConstant(C(field1=IntConstant(87),'
+            'field2=BoolConstant(false)))'),
+    const ConstantData(
+        'const C(field2: true)',
+        'ConstructedConstant(C(field1=IntConstant(42),'
+            'field2=BoolConstant(true)))'),
+    const ConstantData(
+        'const C.named()',
+        'ConstructedConstant(C(field1=BoolConstant(false),'
+            'field2=BoolConstant(false)))'),
+    const ConstantData(
+        'const C.named(87)',
+        'ConstructedConstant(C(field1=IntConstant(87),'
+            'field2=IntConstant(87)))'),
+    const ConstantData(
+        'const C(field1: a, field2: b)', const <Map<String, String>, String>{
+      const {}: 'ConstructedConstant(C(field1=BoolConstant(true),'
+          'field2=IntConstant(42)))',
+      const {'foo': 'false', 'bar': '87'}:
+          'ConstructedConstant(C(field1=BoolConstant(false),'
+              'field2=IntConstant(87)))',
+    }),
+    const ConstantData(
+        'const D(42, 87)',
+        'ConstructedConstant(D(field1=IntConstant(87),'
+            'field2=IntConstant(42),'
+            'field3=IntConstant(99)))'),
+  ]),
+  const TestData('redirect', '''
+class A<T> implements B<Null> {
+  final field1;
+  const A({this.field1:42});
+}
+class B<S> implements C<Null> {
+  const factory B({field1}) = A<B<S>>;
+  const factory B.named() = A<S>;
+}
+class C<U> {
+  const factory C({field1}) = A<B<double>>;
+}
+''', const [
+    const ConstantData(
+        'const A()', 'ConstructedConstant(A<dynamic>(field1=IntConstant(42)))'),
+    const ConstantData('const A<int>(field1: 87)',
+        'ConstructedConstant(A<int>(field1=IntConstant(87)))'),
+    const ConstantData('const B()',
+        'ConstructedConstant(A<B<dynamic>>(field1=IntConstant(42)))'),
+    const ConstantData('const B<int>()',
+        'ConstructedConstant(A<B<int>>(field1=IntConstant(42)))'),
+    const ConstantData('const B<int>(field1: 87)',
+        'ConstructedConstant(A<B<int>>(field1=IntConstant(87)))'),
+    const ConstantData('const C<int>(field1: 87)',
+        'ConstructedConstant(A<B<double>>(field1=IntConstant(87)))'),
+    const ConstantData('const B<int>.named()',
+        'ConstructedConstant(A<int>(field1=IntConstant(42)))'),
+  ]),
+  const TestData('env2', '''
+const c = const int.fromEnvironment("foo", defaultValue: 5);
+const d = const int.fromEnvironment("bar", defaultValue: 10);
+
+class A {
+  final field;
+  const A(a, b) : field = a + b;
+}
+
+class B extends A {
+  const B(a) : super(a, a * 2);
+}
+''', const [
+    const ConstantData('const A(c, d)', const <Map<String, String>, String>{
+      const {}: 'ConstructedConstant(A(field=IntConstant(15)))',
+      const {'foo': '7', 'bar': '11'}:
+          'ConstructedConstant(A(field=IntConstant(18)))',
+    }),
+    const ConstantData('const B(d)', const <Map<String, String>, String>{
+      const {}: 'ConstructedConstant(B(field=IntConstant(30)))',
+      const {'bar': '42'}: 'ConstructedConstant(B(field=IntConstant(126)))',
+    }),
+  ]),
+  const TestData('construct', '''
+ class A {
+   final x;
+   final y;
+   final z;
+   final t;
+   final u = 42;
+   const A(this.z, tt) : y = 499, t = tt, x = 3;
+   const A.named(z, this.t) : y = 400 + z, this.z = z, x = 3;
+   const A.named2(t, z, y, x) : x = t, y = z, z = y, t = x;
+ }
+ ''', const [
+    const ConstantData(
+        'const A.named(99, 100)',
+        'ConstructedConstant(A('
+            't=IntConstant(100),'
+            'u=IntConstant(42),'
+            'x=IntConstant(3),'
+            'y=IntConstant(499),'
+            'z=IntConstant(99)))'),
+    const ConstantData(
+        'const A(99, 100)',
+        'ConstructedConstant(A('
+            't=IntConstant(100),'
+            'u=IntConstant(42),'
+            'x=IntConstant(3),'
+            'y=IntConstant(499),'
+            'z=IntConstant(99)))'),
+  ]),
+  const TestData('errors', r'''
+ const dynamic null_ = const bool.fromEnvironment('x') ? null : null;
+ const dynamic zero = const bool.fromEnvironment('x') ? null : 0;
+ const dynamic minus_one = const bool.fromEnvironment('x') ? null : -1;
+ const dynamic false_ = const bool.fromEnvironment('x') ? null : false;
+ const dynamic integer = const int.fromEnvironment("foo", defaultValue: 5);
+ const dynamic string = const String.fromEnvironment("bar", defaultValue: "baz");
+ const dynamic boolean = const bool.fromEnvironment("baz", defaultValue: false);
+ const dynamic not_string =
+    const bool.fromEnvironment("not_string", defaultValue: false) ? '' : 0;
+ class Class1 {
+    final field;
+    const Class1() : field = not_string.length;
+ }
+ class Class2 implements Class3 {
+    const Class2() : assert(false_);
+    const Class2.redirect() : this();
+ }
+ class Class3 {
+    const Class3() : assert(false_, "Message");
+    const factory Class3.fact() = Class2;
+ }
+ class Class4 extends Class2 {
+    const Class4();
+ }
+ class Class5 {
+    const Class5(a) : assert(a > 0, "$a <= 0");
+ }
+ class Class6 extends Class5 {
+    const Class6(a) : super(a - 1);
+ }
+ class Class7 {
+    const Class7();
+ }
+ class Class8 {
+    final field;
+    const Class8(this.field);
+ }
+ class Class9 {
+    final field = null_;
+    const Class9();
+ }
+ class Class10 {
+    final int field = string;
+    const Class10();
+ }
+ ''', const [
+    const ConstantData(
+        r'"$integer $string $boolean"', 'StringConstant("5 baz false")'),
+    const ConstantData('integer ? true : false', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidType'),
+    const ConstantData(r'"${proxy}"', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidStringInterpolationOperand'),
+    const ConstantData('0 + string', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidType'),
+    const ConstantData('string + 0', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidBinaryOperandType'),
+    const ConstantData('boolean + string', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidMethodInvocation'),
+    const ConstantData('boolean + false', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidMethodInvocation'),
+    const ConstantData('0 * string', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidType'),
+    const ConstantData('0 % string', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidType'),
+    const ConstantData('0 << string', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidType'),
+    const ConstantData('1 ~/ zero', 'NonConstant',
+        expectedErrors: 'ConstEvalZeroDivisor'),
+    const ConstantData('1 % zero', 'NonConstant',
+        expectedErrors: 'ConstEvalZeroDivisor'),
+    const ConstantData('1 << minus_one', 'NonConstant',
+        expectedErrors: 'ConstEvalNegativeShift'),
+    const ConstantData('1 >> minus_one', 'NonConstant',
+        expectedErrors: 'ConstEvalNegativeShift'),
+    const ConstantData('const bool.fromEnvironment(integer)', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidType'),
+    const ConstantData(
+        'const bool.fromEnvironment("baz", defaultValue: integer)',
+        'NonConstant',
+        expectedErrors: 'ConstEvalInvalidType'),
+    const ConstantData('const int.fromEnvironment(integer)', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidType'),
+    const ConstantData(
+        'const int.fromEnvironment("baz", defaultValue: string)', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidType'),
+    const ConstantData('const String.fromEnvironment(integer)', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidType'),
+    const ConstantData(
+        'const String.fromEnvironment("baz", defaultValue: integer)',
+        'NonConstant',
+        expectedErrors: 'ConstEvalInvalidType'),
+    const ConstantData('false || integer', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidType'),
+    const ConstantData('integer || true', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidType'),
+    const ConstantData('integer && true', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidType'),
+    const ConstantData('!integer', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidType'),
+    const ConstantData('!string', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidType'),
+    const ConstantData('-(string)', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidMethodInvocation'),
+    const ConstantData('not_string.length', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidPropertyGet'),
+    const ConstantData('const Class1()', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidPropertyGet'),
+    const ConstantData('const Class2()', 'NonConstant',
+        expectedErrors: 'ConstEvalFailedAssertion'),
+    const ConstantData('const Class2.redirect()', 'NonConstant',
+        expectedErrors: 'ConstEvalFailedAssertion'),
+    const ConstantData('const Class3()', 'NonConstant',
+        expectedErrors: 'ConstEvalFailedAssertionWithMessage'),
+    const ConstantData('const Class3.fact()', 'NonConstant',
+        expectedErrors: 'ConstEvalFailedAssertion'),
+    const ConstantData('const Class4()', 'NonConstant',
+        expectedErrors: 'ConstEvalFailedAssertion'),
+    const ConstantData('const Class5(0)', 'NonConstant',
+        expectedErrors: 'ConstEvalFailedAssertionWithMessage'),
+    const ConstantData('const Class5(1)', 'ConstructedConstant(Class5())'),
+    const ConstantData('const Class6(1)', 'NonConstant',
+        expectedErrors: 'ConstEvalFailedAssertionWithMessage'),
+    const ConstantData('const Class6(2)', 'ConstructedConstant(Class6())'),
+    const ConstantData('const Class7()', 'ConstructedConstant(Class7())'),
+    const ConstantData('const Class7() == const Class7()', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidEqualsOperandType'),
+    const ConstantData('const Class7() != const Class7()', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidEqualsOperandType'),
+    const ConstantData('const Class8(not_string.length)', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidPropertyGet'),
+    const ConstantData(
+        'const Class9()', 'ConstructedConstant(Class9(field=NullConstant))'),
+    const ConstantData('const Class10()', 'NonConstant',
+        expectedErrors: 'ConstEvalInvalidType'),
+  ]),
+  const TestData('assert', '''
+    const true_ = const bool.fromEnvironment('x') ? null : true;
+    class A {
+      const A() : assert(true);
+    }
+    class B {
+      const B() : assert(true, "Message");
+    }
+    class C {
+      final a;
+      const C(this.a);
+    }
+    class D extends C {
+      final b;
+      const D(c) : b = c + 2, super(c + 1);
+    }
+    class E {
+      const E() : assert(true_);
+    }
+  ''', const [
+    const ConstantData(r'const A()', 'ConstructedConstant(A())'),
+    const ConstantData(r'const B()', 'ConstructedConstant(B())'),
+    const ConstantData(r'const D(0)',
+        'ConstructedConstant(D(a=IntConstant(1),b=IntConstant(2)))'),
+    const ConstantData(r'const E()', 'ConstructedConstant(E())'),
+  ]),
+  const TestData('instantiations', '''
+T identity<T>(T t) => t;
+class C<T> {
+  final T defaultValue;
+  final T Function(T t) identityFunction;
+
+  const C(this.defaultValue, this.identityFunction);
+}
+  ''', const <ConstantData>[
+    const ConstantData('identity', 'FunctionConstant(identity)'),
+    const ConstantData(
+        'const C<int>(0, identity)',
+        'ConstructedConstant(C<int>(defaultValue=IntConstant(0),'
+            'identityFunction=InstantiationConstant([int],'
+            'FunctionConstant(identity))))'),
+    const ConstantData(
+        'const C<double>(0.5, identity)',
+        'ConstructedConstant(C<double>(defaultValue=DoubleConstant(0.5),'
+            'identityFunction=InstantiationConstant([double],'
+            'FunctionConstant(identity))))'),
+  ]),
+  const TestData('generic class', '''
+class C<T> {
+  const C.generative();
+  const C.redirect() : this.generative();
+}
+  ''', const <ConstantData>[
+    const ConstantData(
+        'const C<int>.generative()', 'ConstructedConstant(C<int>())'),
+    const ConstantData(
+        'const C<int>.redirect()', 'ConstructedConstant(C<int>())'),
+  ]),
+  const TestData('instance', '''
+const dynamic zero_ = const bool.fromEnvironment("x") ? null : 0;
+class Class9 {
+  final field = zero_;
+  const Class9();
+}
+''', const <ConstantData>[
+    const ConstantData(
+        'const Class9()', 'ConstructedConstant(Class9(field=IntConstant(0)))'),
+  ]),
+];
+
+main(List<String> args) {
+  asyncTest(() async {
+    for (TestData data in DATA) {
+      if (args.isNotEmpty && !args.contains(data.name)) continue;
+      await testData(data);
+    }
+  });
+}
+
+Future testData(TestData data) async {
+  StringBuffer sb = new StringBuffer();
+  sb.writeln('${data.declarations}');
+  Map<String, ConstantData> constants = {};
+  List<String> names = <String>[];
+  data.constants.forEach((ConstantData constantData) {
+    String name = 'c${constants.length}';
+    names.add(name);
+    // Encode the constants as part of a from-environment conditional to force
+    // CFE to create unevaluated constants.
+    sb.writeln('const $name = const bool.fromEnvironment("x") ? '
+        'null : ${constantData.code};');
+    constants[name] = constantData;
+  });
+  sb.writeln('main() {');
+  for (String name in names) {
+    sb.writeln('  print($name);');
+  }
+  sb.writeln('}');
+  String source = sb.toString();
+  print("--source '${data.name}'---------------------------------------------");
+  print(source);
+
+  Future runTest() async {
+    CompilationResult result = await runCompiler(memorySourceFiles: {
+      'main.dart': source
+    }, options: [
+      Flags.enableAsserts,
+    ]);
+    Compiler compiler = result.compiler;
+    KernelFrontEndStrategy frontEndStrategy = compiler.frontendStrategy;
+    KernelToElementMapImpl elementMap = frontEndStrategy.elementMap;
+    KElementEnvironment elementEnvironment =
+        compiler.frontendStrategy.elementEnvironment;
+    LibraryEntity library = elementEnvironment.mainLibrary;
+    constants.forEach((String name, ConstantData data) {
+      IndexedField field =
+          elementEnvironment.lookupLibraryMember(library, name);
+      compiler.reporter.withCurrentElement(field, () {
+        var expectedResults = data.expectedResults;
+        if (expectedResults is String) {
+          expectedResults = <Map<String, String>, String>{
+            const <String, String>{}: expectedResults
+          };
+        }
+        ir.Field node = elementMap.getMemberNode(field);
+        ir.ConstantExpression initializer = node.initializer;
+        print('-- testing $field = ${data.code} --');
+        expectedResults
+            .forEach((Map<String, String> environment, String expectedText) {
+          List<String> errors = [];
+          Dart2jsConstantEvaluator evaluator =
+              new Dart2jsConstantEvaluator(elementMap.typeEnvironment,
+                  (ir.LocatedMessage message, List<ir.LocatedMessage> context) {
+            // TODO(johnniwinther): Assert that `message.uri != null`. Currently
+            // all unevaluated constants have no uri.
+            errors.add(message.code.name);
+            reportLocatedMessage(elementMap.reporter, message, context);
+          },
+                  enableAsserts: true,
+                  environment: environment,
+                  supportReevaluationForTesting: true);
+          ir.Constant evaluatedConstant = evaluator.evaluate(initializer);
+
+          ConstantValue value = evaluatedConstant is! ir.UnevaluatedConstant
+              ? evaluatedConstant.accept(new ConstantValuefier(elementMap))
+              : new NonConstantValue();
+
+          Expect.isNotNull(
+              value,
+              "Expected non-null value from evaluation of "
+              "`${data.code}`.");
+
+          String valueText = value.toStructuredText();
+          Expect.equals(
+              expectedText,
+              valueText,
+              "Unexpected value '${valueText}' for field $field = "
+              "`${data.code}` in env $environment, "
+              "expected '${expectedText}'.");
+
+          var expectedErrors = data.expectedErrors;
+          if (expectedErrors != null) {
+            if (expectedErrors is! List) {
+              expectedErrors = [expectedErrors];
+            }
+            Expect.listEquals(
+                expectedErrors,
+                errors,
+                "Error mismatch for `$field = ${data.code}`:\n"
+                "Expected: ${data.expectedErrors},\n"
+                "Found: ${errors}.");
+          } else {
+            Expect.isTrue(
+                errors.isEmpty,
+                "Unexpected errors for `$field = ${data.code}`:\n"
+                "Found: ${errors}.");
+          }
+        });
+      });
+    });
+  }
+
+  await runTest();
+}
diff --git a/tests/compiler/dart2js/model/cfe_constant_test.dart b/tests/compiler/dart2js/model/cfe_constant_test.dart
new file mode 100644
index 0000000..1a7dd18
--- /dev/null
+++ b/tests/compiler/dart2js/model/cfe_constant_test.dart
@@ -0,0 +1,29 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:args/args.dart';
+import 'package:async_helper/async_helper.dart';
+import 'package:compiler/src/commandline_options.dart';
+
+import '../helpers/args_helper.dart';
+import '../helpers/memory_compiler.dart';
+
+main(List<String> args) {
+  ArgParser argParser = createArgParser();
+
+  asyncTest(() async {
+    ArgResults argResults = argParser.parse(args);
+    Uri entryPoint = getEntryPoint(argResults) ??
+        Uri.base.resolve('samples-dev/swarm/swarm.dart');
+    Uri librariesSpecificationUri = getLibrariesSpec(argResults);
+    Uri packageConfig = getPackages(argResults);
+    List<String> options = getOptions(argResults);
+    await runCompiler(
+        entryPoint: entryPoint,
+        packageConfig: packageConfig,
+        librariesSpecificationUri: librariesSpecificationUri,
+        options: ['${Flags.enableLanguageExperiments}=constant-update-2018']
+          ..addAll(options));
+  });
+}
diff --git a/tests/compiler/dart2js/model/constant_expression_evaluate_test.dart b/tests/compiler/dart2js/model/constant_expression_evaluate_test.dart
deleted file mode 100644
index c35cadf..0000000
--- a/tests/compiler/dart2js/model/constant_expression_evaluate_test.dart
+++ /dev/null
@@ -1,688 +0,0 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library dart2js.constants.expressions.evaluate_test;
-
-import 'dart:async';
-import 'package:async_helper/async_helper.dart';
-import 'package:expect/expect.dart';
-import 'package:compiler/src/common.dart';
-import 'package:compiler/src/common_elements.dart';
-import 'package:compiler/src/compiler.dart';
-import 'package:compiler/src/constants/constructors.dart';
-import 'package:compiler/src/constants/evaluation.dart';
-import 'package:compiler/src/constants/expressions.dart';
-import 'package:compiler/src/constants/values.dart';
-import 'package:compiler/src/constant_system_dart.dart';
-import 'package:compiler/src/diagnostics/messages.dart';
-import 'package:compiler/src/elements/entities.dart';
-import 'package:compiler/src/elements/types.dart';
-import 'package:compiler/src/kernel/kernel_strategy.dart';
-import 'package:compiler/src/kernel/element_map_impl.dart';
-import '../helpers/memory_compiler.dart';
-
-class TestData {
-  final String name;
-
-  /// Declarations needed for the [constants].
-  final String declarations;
-
-  /// Tested constants.
-  final List<ConstantData> constants;
-
-  const TestData(this.name, this.declarations, this.constants);
-}
-
-class ConstantData {
-  /// Source code for the constant expression.
-  final String code;
-
-  /// Constant value as structured text for the empty environment or a map from
-  /// environment to either the expected constant value as structured text or
-  /// a [ConstantResult].
-  final expectedResults;
-
-  /// A [MessageKind] or a list of [MessageKind]s containing the error messages
-  /// expected as the result of evaluating the constant under the empty
-  /// environment.
-  final expectedErrors;
-
-  const ConstantData(this.code, this.expectedResults, {this.expectedErrors});
-}
-
-class EvaluationError {
-  final MessageKind kind;
-  final Map arguments;
-
-  EvaluationError(this.kind, this.arguments);
-}
-
-class MemoryEnvironment implements EvaluationEnvironment {
-  final EvaluationEnvironment _environment;
-  final Map<String, String> env;
-  final List<EvaluationError> errors = <EvaluationError>[];
-
-  MemoryEnvironment(this._environment, [this.env = const <String, String>{}]);
-
-  bool get checkCasts => true;
-
-  bool get immediateUnderSetLiteral => _environment.immediateUnderSetLiteral;
-
-  @override
-  String readFromEnvironment(String name) => env[name];
-
-  @override
-  InterfaceType substByContext(InterfaceType base, InterfaceType target) {
-    return _environment.substByContext(base, target);
-  }
-
-  @override
-  DartType getTypeInContext(DartType type) =>
-      _environment.getTypeInContext(type);
-
-  @override
-  ConstantConstructor getConstructorConstant(ConstructorEntity constructor) {
-    return _environment.getConstructorConstant(constructor);
-  }
-
-  @override
-  ConstantExpression getFieldConstant(FieldEntity field) {
-    return _environment.getFieldConstant(field);
-  }
-
-  @override
-  ConstantExpression getLocalConstant(Local local) {
-    return _environment.getLocalConstant(local);
-  }
-
-  @override
-  CommonElements get commonElements => _environment.commonElements;
-
-  @override
-  DartTypes get types => _environment.types;
-
-  @override
-  InterfaceType get enclosingConstructedType =>
-      _environment.enclosingConstructedType;
-
-  @override
-  void reportWarning(
-      ConstantExpression expression, MessageKind kind, Map arguments) {
-    errors.add(new EvaluationError(kind, arguments));
-    _environment.reportWarning(expression, kind, arguments);
-  }
-
-  @override
-  void reportError(
-      ConstantExpression expression, MessageKind kind, Map arguments) {
-    errors.add(new EvaluationError(kind, arguments));
-    _environment.reportError(expression, kind, arguments);
-  }
-
-  @override
-  ConstantValue evaluateConstructor(ConstructorEntity constructor,
-      InterfaceType type, ConstantValue evaluate()) {
-    return _environment.evaluateConstructor(constructor, type, evaluate);
-  }
-
-  @override
-  ConstantValue evaluateField(FieldEntity field, ConstantValue evaluate()) {
-    return _environment.evaluateField(field, evaluate);
-  }
-
-  @override
-  ConstantValue evaluateMapBody(ConstantValue evaluate()) {
-    return _environment.evaluateMapBody(evaluate);
-  }
-
-  @override
-  bool get enableAssertions => true;
-}
-
-const List<TestData> DATA = const [
-  const TestData('simple', '', const [
-    const ConstantData('null', 'NullConstant'),
-    const ConstantData('false', 'BoolConstant(false)'),
-    const ConstantData('true', 'BoolConstant(true)'),
-    const ConstantData('0', 'IntConstant(0)'),
-    const ConstantData('0.0', 'DoubleConstant(0.0)'),
-    const ConstantData('"foo"', 'StringConstant("foo")'),
-    const ConstantData('1 + 2', 'IntConstant(3)'),
-    const ConstantData('-(1)', 'IntConstant(-1)'),
-    const ConstantData('1 == 2', 'BoolConstant(false)'),
-    const ConstantData('1 != 2', 'BoolConstant(true)'),
-    const ConstantData('1 / 0', 'DoubleConstant(Infinity)'),
-    const ConstantData('0 / 0', 'DoubleConstant(NaN)'),
-    const ConstantData('1 << 0', 'IntConstant(1)'),
-    const ConstantData('1 >> 0', 'IntConstant(1)'),
-    const ConstantData('"foo".length', 'IntConstant(3)'),
-    const ConstantData('identical(0, 1)', 'BoolConstant(false)'),
-    const ConstantData('"a" "b"', 'StringConstant("ab")'),
-    const ConstantData(r'"${null}"', 'StringConstant("null")'),
-    const ConstantData('identical', 'FunctionConstant(identical)'),
-    const ConstantData('true ? 0 : 1', 'IntConstant(0)'),
-    const ConstantData('proxy', 'ConstructedConstant(_Proxy())'),
-    const ConstantData('const [] == null', 'BoolConstant(false)'),
-    const ConstantData('proxy == null', 'BoolConstant(false)'),
-    const ConstantData('Object', 'TypeConstant(Object)'),
-    const ConstantData('null ?? 0', 'IntConstant(0)'),
-    const ConstantData(
-        'const [0, 1]', 'ListConstant(<int>[IntConstant(0), IntConstant(1)])'),
-    const ConstantData('const <int>[0, 1]',
-        'ListConstant(<int>[IntConstant(0), IntConstant(1)])'),
-    const ConstantData(
-        'const {0: 1, 2: 3}',
-        'MapConstant(<int, int>{IntConstant(0): IntConstant(1), '
-        'IntConstant(2): IntConstant(3)})'),
-    const ConstantData(
-        'const <int, int>{0: 1, 2: 3}',
-        'MapConstant(<int, int>{IntConstant(0): IntConstant(1), '
-        'IntConstant(2): IntConstant(3)})'),
-    const ConstantData('const <int, int>{0: 1, 0: 2}',
-        'MapConstant(<int, int>{IntConstant(0): IntConstant(2)})',
-        expectedErrors: MessageKind.EQUAL_MAP_ENTRY_KEY),
-    const ConstantData(
-        'const bool.fromEnvironment("foo", defaultValue: false)',
-        const <Map<String, String>, String>{
-          const {}: 'BoolConstant(false)',
-          const {'foo': 'true'}: 'BoolConstant(true)'
-        }),
-    const ConstantData(
-        'const int.fromEnvironment("foo", defaultValue: 42)',
-        const <Map<String, String>, String>{
-          const {}: 'IntConstant(42)',
-          const {'foo': '87'}: 'IntConstant(87)'
-        }),
-    const ConstantData(
-        'const String.fromEnvironment("foo", defaultValue: "bar")',
-        const <Map<String, String>, String>{
-          const {}: 'StringConstant("bar")',
-          const {'foo': 'foo'}: 'StringConstant("foo")'
-        }),
-  ]),
-  const TestData('env', '''
-const a = const bool.fromEnvironment("foo", defaultValue: true);
-const b = const int.fromEnvironment("bar", defaultValue: 42);
-
-class A {
-  const A();
-}
-class B {
-  final field1;
-  const B(this.field1);
-}
-class C extends B {
-  final field2;
-  const C({field1: 42, this.field2: false}) : super(field1);
-  const C.named([field = false]) : this(field1: field, field2: field);
-}
-class D extends C {
-  final field3 = 99;
-  const D(a, b) : super(field2: a, field1: b);
-}
-''', const [
-    const ConstantData('const Object()', 'ConstructedConstant(Object())'),
-    const ConstantData('const A()', 'ConstructedConstant(A())'),
-    const ConstantData(
-        'const B(0)', 'ConstructedConstant(B(field1=IntConstant(0)))'),
-    const ConstantData('const B(const A())',
-        'ConstructedConstant(B(field1=ConstructedConstant(A())))'),
-    const ConstantData(
-        'const C()',
-        'ConstructedConstant(C(field1=IntConstant(42),'
-        'field2=BoolConstant(false)))'),
-    const ConstantData(
-        'const C(field1: 87)',
-        'ConstructedConstant(C(field1=IntConstant(87),'
-        'field2=BoolConstant(false)))'),
-    const ConstantData(
-        'const C(field2: true)',
-        'ConstructedConstant(C(field1=IntConstant(42),'
-        'field2=BoolConstant(true)))'),
-    const ConstantData(
-        'const C.named()',
-        'ConstructedConstant(C(field1=BoolConstant(false),'
-        'field2=BoolConstant(false)))'),
-    const ConstantData(
-        'const C.named(87)',
-        'ConstructedConstant(C(field1=IntConstant(87),'
-        'field2=IntConstant(87)))'),
-    const ConstantData(
-        'const C(field1: a, field2: b)', const <Map<String, String>, String>{
-      const {}: 'ConstructedConstant(C(field1=BoolConstant(true),'
-          'field2=IntConstant(42)))',
-      const {'foo': 'false', 'bar': '87'}:
-          'ConstructedConstant(C(field1=BoolConstant(false),'
-          'field2=IntConstant(87)))',
-    }),
-    const ConstantData(
-        'const D(42, 87)',
-        'ConstructedConstant(D(field1=IntConstant(87),'
-        'field2=IntConstant(42),'
-        'field3=IntConstant(99)))'),
-  ]),
-  const TestData('redirect', '''
-class A<T> implements B<Null> {
-  final field1;
-  const A({this.field1:42});
-}
-class B<S> implements C<Null> {
-  const factory B({field1}) = A<B<S>>;
-  const factory B.named() = A<S>;
-}
-class C<U> {
-  const factory C({field1}) = A<B<double>>;
-}
-''', const [
-    const ConstantData(
-        'const A()', 'ConstructedConstant(A<dynamic>(field1=IntConstant(42)))'),
-    const ConstantData('const A<int>(field1: 87)',
-        'ConstructedConstant(A<int>(field1=IntConstant(87)))'),
-    const ConstantData('const B()',
-        'ConstructedConstant(A<B<dynamic>>(field1=IntConstant(42)))'),
-    const ConstantData('const B<int>()',
-        'ConstructedConstant(A<B<int>>(field1=IntConstant(42)))'),
-    const ConstantData('const B<int>(field1: 87)',
-        'ConstructedConstant(A<B<int>>(field1=IntConstant(87)))'),
-    const ConstantData('const C<int>(field1: 87)',
-        'ConstructedConstant(A<B<double>>(field1=IntConstant(87)))'),
-    const ConstantData('const B<int>.named()',
-        'ConstructedConstant(A<int>(field1=IntConstant(42)))'),
-  ]),
-  const TestData('env2', '''
-const c = const int.fromEnvironment("foo", defaultValue: 5);
-const d = const int.fromEnvironment("bar", defaultValue: 10);
-
-class A {
-  final field;
-  const A(a, b) : field = a + b;
-}
-
-class B extends A {
-  const B(a) : super(a, a * 2);
-}
-''', const [
-    const ConstantData('const A(c, d)', const <Map<String, String>, String>{
-      const {}: 'ConstructedConstant(A(field=IntConstant(15)))',
-      const {'foo': '7', 'bar': '11'}:
-          'ConstructedConstant(A(field=IntConstant(18)))',
-    }),
-    const ConstantData('const B(d)', const <Map<String, String>, String>{
-      const {}: 'ConstructedConstant(B(field=IntConstant(30)))',
-      const {'bar': '42'}: 'ConstructedConstant(B(field=IntConstant(126)))',
-    }),
-  ]),
-  const TestData('construct', '''
- class A {
-   final x;
-   final y;
-   final z;
-   final t;
-   final u = 42;
-   const A(this.z, tt) : y = 499, t = tt, x = 3;
-   const A.named(z, this.t) : y = 400 + z, this.z = z, x = 3;
-   const A.named2(t, z, y, x) : x = t, y = z, z = y, t = x;
- }
- ''', const [
-    const ConstantData(
-        'const A.named(99, 100)',
-        'ConstructedConstant(A('
-        't=IntConstant(100),'
-        'u=IntConstant(42),'
-        'x=IntConstant(3),'
-        'y=IntConstant(499),'
-        'z=IntConstant(99)))'),
-    const ConstantData(
-        'const A(99, 100)',
-        'ConstructedConstant(A('
-        't=IntConstant(100),'
-        'u=IntConstant(42),'
-        'x=IntConstant(3),'
-        'y=IntConstant(499),'
-        'z=IntConstant(99)))'),
-  ]),
-  const TestData('errors', r'''
- const integer = const int.fromEnvironment("foo", defaultValue: 5);
- const string = const String.fromEnvironment("bar", defaultValue: "baz");
- const boolean = const bool.fromEnvironment("baz", defaultValue: false);
- const not_string =
-    const bool.fromEnvironment("not_string", defaultValue: false) ? '' : 0;
- get getter => 0;
- class Class1 {
-    final field;
-    const Class1() : field = not_string.length;
- }
- class Class2 implements Class3 {
-    const Class2() : assert(false);
-    const Class2.redirect() : this();
- }
- class Class3 {
-    const Class3() : assert(false, "Message");
-    const factory Class3.fact() = Class2;
- }
- class Class4 extends Class2 {
-    const Class4();
- }
- class Class5 {
-    const Class5(a) : assert(a > 0, "$a <= 0");
- }
- class Class6 extends Class5 {
-    const Class6(a) : super(a - 1);
- }
- class Class7 {
-    const Class7();
- }
- ''', const [
-    const ConstantData(
-        r'"$integer $string $boolean"', 'StringConstant("5 baz false")'),
-    const ConstantData('0 ? true : false', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_CONSTANT_CONDITIONAL_TYPE),
-    const ConstantData('integer ? true : false', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_CONSTANT_CONDITIONAL_TYPE),
-    const ConstantData(r'"${const []}"', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_CONSTANT_INTERPOLATION_TYPE),
-    const ConstantData(r'"${proxy}"', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_CONSTANT_INTERPOLATION_TYPE),
-    const ConstantData(r'"${proxy}${const []}"', 'NonConstant',
-        expectedErrors: const [
-          MessageKind.INVALID_CONSTANT_INTERPOLATION_TYPE,
-          MessageKind.INVALID_CONSTANT_INTERPOLATION_TYPE
-        ]),
-    const ConstantData(r'"${"${proxy}"}${const []}"', 'NonConstant',
-        expectedErrors: const [
-          MessageKind.INVALID_CONSTANT_INTERPOLATION_TYPE,
-          MessageKind.INVALID_CONSTANT_INTERPOLATION_TYPE
-        ]),
-    const ConstantData('0 + ""', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_CONSTANT_NUM_ADD_TYPE),
-    const ConstantData('0 + string', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_CONSTANT_NUM_ADD_TYPE),
-    const ConstantData('"" + 0', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_CONSTANT_STRING_ADD_TYPE),
-    const ConstantData('string + 0', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_CONSTANT_STRING_ADD_TYPE),
-    const ConstantData('true + ""', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_CONSTANT_STRING_ADD_TYPE),
-    const ConstantData('boolean + string', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_CONSTANT_STRING_ADD_TYPE),
-    const ConstantData('true + false', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_CONSTANT_ADD_TYPES),
-    const ConstantData('boolean + false', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_CONSTANT_ADD_TYPES),
-    const ConstantData('0 * ""', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_CONSTANT_BINARY_NUM_TYPE),
-    const ConstantData('0 * string', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_CONSTANT_BINARY_NUM_TYPE),
-    const ConstantData('0 % ""', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_CONSTANT_BINARY_NUM_TYPE),
-    const ConstantData('0 % string', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_CONSTANT_BINARY_NUM_TYPE),
-    const ConstantData('0 << ""', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_CONSTANT_BINARY_INT_TYPE),
-    const ConstantData('0 << string', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_CONSTANT_BINARY_INT_TYPE),
-    const ConstantData('1 ~/ 0', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_CONSTANT_DIV),
-    const ConstantData('1 ~/ 0.0', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_CONSTANT_DIV),
-    const ConstantData('1 % 0', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_CONSTANT_DIV),
-    const ConstantData('1 % 0.0', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_CONSTANT_DIV),
-    const ConstantData('1 << -1', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_CONSTANT_SHIFT),
-    const ConstantData('1 >> -1', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_CONSTANT_SHIFT),
-    const ConstantData('null[0]', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_CONSTANT_INDEX),
-    const ConstantData('const bool.fromEnvironment(0)', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_FROM_ENVIRONMENT_NAME_TYPE),
-    const ConstantData('const bool.fromEnvironment(integer)', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_FROM_ENVIRONMENT_NAME_TYPE),
-    const ConstantData(
-        'const bool.fromEnvironment("baz", defaultValue: 0)', 'NonConstant',
-        expectedErrors:
-            MessageKind.INVALID_BOOL_FROM_ENVIRONMENT_DEFAULT_VALUE_TYPE),
-    const ConstantData(
-        'const bool.fromEnvironment("baz", defaultValue: integer)',
-        'NonConstant',
-        expectedErrors:
-            MessageKind.INVALID_BOOL_FROM_ENVIRONMENT_DEFAULT_VALUE_TYPE),
-    const ConstantData('const int.fromEnvironment(0)', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_FROM_ENVIRONMENT_NAME_TYPE),
-    const ConstantData('const int.fromEnvironment(integer)', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_FROM_ENVIRONMENT_NAME_TYPE),
-    const ConstantData(
-        'const int.fromEnvironment("baz", defaultValue: "")', 'NonConstant',
-        expectedErrors:
-            MessageKind.INVALID_INT_FROM_ENVIRONMENT_DEFAULT_VALUE_TYPE),
-    const ConstantData(
-        'const int.fromEnvironment("baz", defaultValue: string)', 'NonConstant',
-        expectedErrors:
-            MessageKind.INVALID_INT_FROM_ENVIRONMENT_DEFAULT_VALUE_TYPE),
-    const ConstantData('const String.fromEnvironment(0)', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_FROM_ENVIRONMENT_NAME_TYPE),
-    const ConstantData('const String.fromEnvironment(integer)', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_FROM_ENVIRONMENT_NAME_TYPE),
-    const ConstantData(
-        'const String.fromEnvironment("baz", defaultValue: 0)', 'NonConstant',
-        expectedErrors:
-            MessageKind.INVALID_STRING_FROM_ENVIRONMENT_DEFAULT_VALUE_TYPE),
-    const ConstantData(
-        'const String.fromEnvironment("baz", defaultValue: integer)',
-        'NonConstant',
-        expectedErrors:
-            MessageKind.INVALID_STRING_FROM_ENVIRONMENT_DEFAULT_VALUE_TYPE),
-    const ConstantData('true || 0', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_LOGICAL_OR_OPERAND_TYPE),
-    const ConstantData('0 || true', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_LOGICAL_OR_OPERAND_TYPE),
-    const ConstantData('true || integer', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_LOGICAL_OR_OPERAND_TYPE),
-    const ConstantData('integer || true', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_LOGICAL_OR_OPERAND_TYPE),
-    const ConstantData('true && 0', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_LOGICAL_AND_OPERAND_TYPE),
-    const ConstantData('0 && true', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_LOGICAL_AND_OPERAND_TYPE),
-    const ConstantData('integer && true', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_LOGICAL_AND_OPERAND_TYPE),
-    const ConstantData('!0', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_CONSTANT_NOT_TYPE),
-    const ConstantData('!string', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_CONSTANT_NOT_TYPE),
-    const ConstantData('-("")', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_CONSTANT_NEGATE_TYPE),
-    const ConstantData('-(string)', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_CONSTANT_NEGATE_TYPE),
-    const ConstantData('not_string.length', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_CONSTANT_STRING_LENGTH_TYPE),
-    const ConstantData('const Class1()', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_CONSTANT_STRING_LENGTH_TYPE),
-    const ConstantData('getter', 'NonConstant'),
-    const ConstantData('const Class2()', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_ASSERT_VALUE),
-    const ConstantData('const Class2.redirect()', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_ASSERT_VALUE),
-    const ConstantData('const Class3()', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_ASSERT_VALUE_MESSAGE),
-    const ConstantData('const Class3.fact()', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_ASSERT_VALUE),
-    const ConstantData('const Class4()', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_ASSERT_VALUE),
-    const ConstantData('const Class5(0)', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_ASSERT_VALUE_MESSAGE),
-    const ConstantData('const Class5(1)', 'ConstructedConstant(Class5())'),
-    const ConstantData('const Class6(1)', 'NonConstant',
-        expectedErrors: MessageKind.INVALID_ASSERT_VALUE_MESSAGE),
-    const ConstantData('const Class6(2)', 'ConstructedConstant(Class6())'),
-    const ConstantData('const Class7()', 'ConstructedConstant(Class7())'),
-    const ConstantData('const Class7() == const Class7()', 'NonConstant',
-        expectedErrors: const [
-          MessageKind.INVALID_CONSTANT_BINARY_PRIMITIVE_TYPE,
-          MessageKind.INVALID_CONSTANT_BINARY_PRIMITIVE_TYPE
-        ]),
-  ]),
-  const TestData('assert', '''
-    class A {
-      const A() : assert(true);
-    }
-    class B {
-      const B() : assert(true, "Message");
-    }
-    class C {
-      final a;
-      const C(this.a);
-    }
-    class D extends C {
-      final b;
-      const D(c) : b = c + 2, super(c + 1);
-    }
-  ''', const [
-    const ConstantData(r'const A()', 'ConstructedConstant(A())'),
-    const ConstantData(r'const B()', 'ConstructedConstant(B())'),
-    const ConstantData(r'const D(0)',
-        'ConstructedConstant(D(a=IntConstant(1),b=IntConstant(2)))'),
-  ]),
-  const TestData('instantiations', '''
-T identity<T>(T t) => t;
-class C<T> {
-  final T defaultValue;
-  final T Function(T t) identityFunction;
-
-  const C(this.defaultValue, this.identityFunction);
-}
-  ''', const <ConstantData>[
-    const ConstantData('identity', 'FunctionConstant(identity)'),
-    const ConstantData(
-        'const C<int>(0, identity)',
-        'ConstructedConstant(C<int>(defaultValue=IntConstant(0),'
-        'identityFunction=InstantiationConstant([int],'
-        'FunctionConstant(identity))))'),
-    const ConstantData(
-        'const C<double>(0.5, identity)',
-        'ConstructedConstant(C<double>(defaultValue=DoubleConstant(0.5),'
-        'identityFunction=InstantiationConstant([double],'
-        'FunctionConstant(identity))))'),
-  ]),
-  const TestData('generic class', '''
-class C<T> {
-  const C.generative();
-  const C.redirect() : this.generative();
-}
-  ''', const <ConstantData>[
-    const ConstantData(
-        'const C<int>.generative()', 'ConstructedConstant(C<int>())'),
-    const ConstantData(
-        'const C<int>.redirect()', 'ConstructedConstant(C<int>())'),
-  ])
-];
-
-main(List<String> args) {
-  asyncTest(() async {
-    for (TestData data in DATA) {
-      if (args.isNotEmpty && !args.contains(data.name)) continue;
-      await testData(data);
-    }
-  });
-}
-
-Future testData(TestData data) async {
-  StringBuffer sb = new StringBuffer();
-  sb.writeln('${data.declarations}');
-  Map<String, ConstantData> constants = {};
-  List<String> names = <String>[];
-  data.constants.forEach((ConstantData constantData) {
-    String name = 'c${constants.length}';
-    names.add(name);
-    sb.writeln('const $name = ${constantData.code};');
-    constants[name] = constantData;
-  });
-  sb.writeln('main() {');
-  for (String name in names) {
-    sb.writeln('  print($name);');
-  }
-  sb.writeln('}');
-  String source = sb.toString();
-  print("--source '${data.name}'---------------------------------------------");
-  print(source);
-
-  Future runTest(
-      EvaluationEnvironment getEnvironment(
-          Compiler compiler, FieldEntity field)) async {
-    CompilationResult result =
-        await runCompiler(memorySourceFiles: {'main.dart': source});
-    Compiler compiler = result.compiler;
-    KElementEnvironment elementEnvironment =
-        compiler.frontendStrategy.elementEnvironment;
-    LibraryEntity library = elementEnvironment.mainLibrary;
-    constants.forEach((String name, ConstantData data) {
-      FieldEntity field = elementEnvironment.lookupLibraryMember(library, name);
-      compiler.reporter.withCurrentElement(field, () {
-        ConstantExpression constant =
-            elementEnvironment.getFieldConstantForTesting(field);
-
-        var expectedResults = data.expectedResults;
-        if (expectedResults is String) {
-          expectedResults = <Map<String, String>, String>{
-            const <String, String>{}: expectedResults
-          };
-        }
-        expectedResults.forEach((Map<String, String> env, String expectedText) {
-          MemoryEnvironment environment =
-              new MemoryEnvironment(getEnvironment(compiler, field), env);
-          ConstantValue value =
-              constant.evaluate(environment, DART_CONSTANT_SYSTEM);
-
-          Expect.isNotNull(
-              value,
-              "Expected non-null value from evaluation of "
-              "`${constant.toStructuredText()}`.");
-
-          String valueText = value.toStructuredText();
-          Expect.equals(
-              expectedText,
-              valueText,
-              "Unexpected value '${valueText}' for field $field = "
-              "`${constant.toDartText()}`, expected '${expectedText}'.");
-
-          List<MessageKind> errors =
-              environment.errors.map((m) => m.kind).toList();
-          var expectedErrors = data.expectedErrors;
-          if (expectedErrors != null) {
-            if (expectedErrors is! List) {
-              expectedErrors = [expectedErrors];
-            }
-            Expect.listEquals(
-                expectedErrors,
-                errors,
-                "Error mismatch for `$field = ${constant.toDartText()}`:\n"
-                "Expected: ${data.expectedErrors},\n"
-                "Found: ${errors}.");
-          } else {
-            Expect.isTrue(
-                errors.isEmpty,
-                "Unexpected errors for `$field = ${constant.toDartText()}`:\n"
-                "Found: ${errors}.");
-          }
-        });
-      });
-    });
-  }
-
-  const skipStrongList = const [
-    // TODO(johnniwinther): Investigate why different errors are reported in
-    // strong mode.
-    'errors',
-  ];
-
-  if (!skipStrongList.contains(data.name)) {
-    await runTest((Compiler compiler, FieldEntity field) {
-      KernelFrontEndStrategy frontendStrategy = compiler.frontendStrategy;
-      KernelToElementMapImpl elementMap = frontendStrategy.elementMap;
-      return new KernelEvaluationEnvironment(elementMap, null, field,
-          constantRequired: field.isConst);
-    });
-  }
-}
diff --git a/tests/compiler/dart2js/model/constant_expression_test.dart b/tests/compiler/dart2js/model/constant_expression_test.dart
deleted file mode 100644
index dee8ee5..0000000
--- a/tests/compiler/dart2js/model/constant_expression_test.dart
+++ /dev/null
@@ -1,397 +0,0 @@
-// Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-library constant_expression_test;
-
-import 'dart:async';
-import 'package:async_helper/async_helper.dart';
-import 'package:expect/expect.dart';
-import 'package:compiler/src/common_elements.dart' show KElementEnvironment;
-import 'package:compiler/src/compiler.dart';
-import 'package:compiler/src/constants/expressions.dart';
-import 'package:compiler/src/kernel/element_map_impl.dart';
-import 'package:compiler/src/elements/entities.dart';
-import '../helpers/memory_compiler.dart';
-import 'constant_expression_evaluate_test.dart' show MemoryEnvironment;
-
-class TestData {
-  /// Declarations needed for the [constants].
-  final String declarations;
-
-  /// Tested constants.
-  final List<ConstantData> constants;
-
-  const TestData(this.declarations, this.constants);
-}
-
-class ConstantData {
-  /// Source code for the constant expression.
-  final String code;
-
-  /// The expected constant expression kind.
-  final ConstantExpressionKind kind;
-
-  /// ConstantExpression.getText() result if different from [code].
-  final String text;
-
-  /// The expected instance type for ConstructedConstantExpression.
-  final String type;
-
-  /// The expected instance fields for ConstructedConstantExpression.
-  final Map<String, String> fields;
-
-  const ConstantData(String code, this.kind,
-      {String text, this.type, this.fields})
-      : this.code = code,
-        this.text = text ?? code;
-}
-
-const List<TestData> DATA = const [
-  const TestData('''
-class Class<T, S> {
-  final a;
-  final b;
-  final c;
-  const Class(this.a, {this.b, this.c: true});
-  const Class.named([this.a, this.b = 0, this.c = 2]);
-
-  static const staticConstant = 0;
-  static staticFunction() {}
-}
-const t = true;
-const f = false;
-const toplevelConstant = 0;
-toplevelFunction() {}
-''', const [
-    const ConstantData('null', ConstantExpressionKind.NULL),
-    const ConstantData('false', ConstantExpressionKind.BOOL),
-    const ConstantData('true', ConstantExpressionKind.BOOL),
-    const ConstantData('0', ConstantExpressionKind.INT),
-    const ConstantData('0.0', ConstantExpressionKind.DOUBLE),
-    const ConstantData('"foo"', ConstantExpressionKind.STRING),
-    const ConstantData('1 + 2', ConstantExpressionKind.BINARY),
-    const ConstantData('1 == 2', ConstantExpressionKind.BINARY),
-    const ConstantData('1 != 2', ConstantExpressionKind.UNARY,
-        // a != b is encoded as !(a == b) by CFE.
-        text: '!(1 == 2)'),
-    const ConstantData('1 ?? 2', ConstantExpressionKind.BINARY),
-    const ConstantData('-(1)', ConstantExpressionKind.UNARY, text: '-1'),
-    const ConstantData('"foo".length', ConstantExpressionKind.STRING_LENGTH),
-    const ConstantData('identical(0, 1)', ConstantExpressionKind.IDENTICAL),
-    const ConstantData('"a" "b"', ConstantExpressionKind.CONCATENATE,
-        text: '"ab"'),
-    const ConstantData('identical', ConstantExpressionKind.FUNCTION),
-    const ConstantData('true ? 0 : 1', ConstantExpressionKind.CONDITIONAL),
-    const ConstantData('proxy', ConstantExpressionKind.FIELD),
-    const ConstantData('Object', ConstantExpressionKind.TYPE),
-    const ConstantData('#name', ConstantExpressionKind.SYMBOL),
-    const ConstantData('const []', ConstantExpressionKind.LIST),
-    const ConstantData('const [0, 1]', ConstantExpressionKind.LIST,
-        text: 'const <int>[0, 1]'),
-    const ConstantData('const <int>[0, 1]', ConstantExpressionKind.LIST),
-    const ConstantData('const <dynamic>[0, 1]', ConstantExpressionKind.LIST,
-        text: 'const [0, 1]'),
-    const ConstantData('const {}', ConstantExpressionKind.MAP),
-    const ConstantData('const {0: 1, 2: 3}', ConstantExpressionKind.MAP,
-        text: 'const <int, int>{0: 1, 2: 3}'),
-    const ConstantData(
-        'const <int, int>{0: 1, 2: 3}', ConstantExpressionKind.MAP),
-    const ConstantData(
-        'const <String, int>{"0": 1, "2": 3}', ConstantExpressionKind.MAP),
-    const ConstantData(
-        'const <String, dynamic>{"0": 1, "2": 3}', ConstantExpressionKind.MAP),
-    const ConstantData(
-        'const <dynamic, dynamic>{"0": 1, "2": 3}', ConstantExpressionKind.MAP,
-        text: 'const {"0": 1, "2": 3}'),
-    const ConstantData('const bool.fromEnvironment("foo", defaultValue: false)',
-        ConstantExpressionKind.BOOL_FROM_ENVIRONMENT),
-    const ConstantData('const int.fromEnvironment("foo", defaultValue: 42)',
-        ConstantExpressionKind.INT_FROM_ENVIRONMENT),
-    const ConstantData(
-        'const String.fromEnvironment("foo", defaultValue: "bar")',
-        ConstantExpressionKind.STRING_FROM_ENVIRONMENT),
-    const ConstantData('const Class(0)', ConstantExpressionKind.CONSTRUCTED),
-    const ConstantData(
-        'const Class(0, b: 1)', ConstantExpressionKind.CONSTRUCTED),
-    const ConstantData(
-        'const Class(0, c: 2)', ConstantExpressionKind.CONSTRUCTED),
-    const ConstantData(
-        'const Class(0, b: 3, c: 4)', ConstantExpressionKind.CONSTRUCTED),
-    const ConstantData(
-        'const Class.named()', ConstantExpressionKind.CONSTRUCTED),
-    const ConstantData(
-        'const Class.named(0)', ConstantExpressionKind.CONSTRUCTED),
-    const ConstantData(
-        'const Class.named(0, 1)', ConstantExpressionKind.CONSTRUCTED),
-    const ConstantData(
-        'const Class.named(0, 1, 2)', ConstantExpressionKind.CONSTRUCTED),
-    const ConstantData(
-        'const Class<String, int>(0)', ConstantExpressionKind.CONSTRUCTED),
-    const ConstantData(
-        'const Class<String, dynamic>(0)', ConstantExpressionKind.CONSTRUCTED),
-    const ConstantData(
-        'const Class<dynamic, String>(0)', ConstantExpressionKind.CONSTRUCTED),
-    const ConstantData(
-        'const Class<dynamic, dynamic>(0)', ConstantExpressionKind.CONSTRUCTED,
-        text: 'const Class(0)'),
-    const ConstantData('toplevelConstant', ConstantExpressionKind.FIELD),
-    const ConstantData('toplevelFunction', ConstantExpressionKind.FUNCTION),
-    const ConstantData('Class.staticConstant', ConstantExpressionKind.FIELD),
-    const ConstantData('Class.staticFunction', ConstantExpressionKind.FUNCTION),
-    const ConstantData('1 + 2', ConstantExpressionKind.BINARY),
-    const ConstantData('1 + 2 + 3', ConstantExpressionKind.BINARY),
-    const ConstantData('1 + -2', ConstantExpressionKind.BINARY),
-    const ConstantData('-1 + 2', ConstantExpressionKind.BINARY),
-    const ConstantData('(1 + 2) + 3', ConstantExpressionKind.BINARY,
-        text: '1 + 2 + 3'),
-    const ConstantData('1 + (2 + 3)', ConstantExpressionKind.BINARY,
-        text: '1 + 2 + 3'),
-    const ConstantData('1 * 2', ConstantExpressionKind.BINARY),
-    const ConstantData('1 * 2 + 3', ConstantExpressionKind.BINARY),
-    const ConstantData('1 * (2 + 3)', ConstantExpressionKind.BINARY),
-    const ConstantData('1 + 2 * 3', ConstantExpressionKind.BINARY),
-    const ConstantData('(1 + 2) * 3', ConstantExpressionKind.BINARY),
-    const ConstantData(
-        'false || identical(0, 1)', ConstantExpressionKind.BINARY),
-    const ConstantData('!identical(0, 1)', ConstantExpressionKind.UNARY),
-    const ConstantData(
-        '!identical(0, 1) || false', ConstantExpressionKind.BINARY),
-    const ConstantData(
-        '!(identical(0, 1) || false)', ConstantExpressionKind.UNARY),
-    const ConstantData('identical(0, 1) ? 3 * 4 + 5 : 6 + 7 * 8',
-        ConstantExpressionKind.CONDITIONAL),
-    const ConstantData('t ? f ? 0 : 1 : 2', ConstantExpressionKind.CONDITIONAL),
-    const ConstantData(
-        '(t ? t : f) ? f ? 0 : 1 : 2', ConstantExpressionKind.CONDITIONAL),
-    const ConstantData(
-        't ? t : f ? f ? 0 : 1 : 2', ConstantExpressionKind.CONDITIONAL),
-    const ConstantData(
-        't ? t ? t : t : t ? t : t', ConstantExpressionKind.CONDITIONAL),
-    const ConstantData(
-        't ? (t ? t : t) : (t ? t : t)', ConstantExpressionKind.CONDITIONAL,
-        text: 't ? t ? t : t : t ? t : t'),
-    const ConstantData(
-        'const [const <dynamic, dynamic>{0: true, "1": "c" "d"}, '
-        'const Class(const Class<dynamic, dynamic>(toplevelConstant))]',
-        ConstantExpressionKind.LIST,
-        text: 'const <Object>[const {0: true, "1": "cd"}, '
-            'const Class(const Class(toplevelConstant))]'),
-  ]),
-  const TestData('''
-class A {
-  const A();
-}
-class B {
-  final field1;
-  const B(this.field1);
-}
-class C extends B {
-  final field2;
-  const C({field1: 42, this.field2: false}) : super(field1);
-  const C.named([field = false]) : this(field1: field, field2: field);
-}
-''', const [
-    const ConstantData('const Object()', ConstantExpressionKind.CONSTRUCTED,
-        type: 'Object', fields: const {}),
-    const ConstantData('const A()', ConstantExpressionKind.CONSTRUCTED,
-        type: 'A', fields: const {}),
-    const ConstantData('const B(0)', ConstantExpressionKind.CONSTRUCTED,
-        type: 'B', fields: const {'field(B#field1)': '0'}),
-    const ConstantData('const B(const A())', ConstantExpressionKind.CONSTRUCTED,
-        type: 'B', fields: const {'field(B#field1)': 'const A()'}),
-    const ConstantData('const C()', ConstantExpressionKind.CONSTRUCTED,
-        type: 'C',
-        fields: const {
-          'field(B#field1)': '42',
-          'field(C#field2)': 'false',
-        }),
-    const ConstantData(
-        'const C(field1: 87)', ConstantExpressionKind.CONSTRUCTED,
-        type: 'C',
-        fields: const {
-          'field(B#field1)': '87',
-          'field(C#field2)': 'false',
-        }),
-    const ConstantData(
-        'const C(field2: true)', ConstantExpressionKind.CONSTRUCTED,
-        type: 'C',
-        fields: const {
-          'field(B#field1)': '42',
-          'field(C#field2)': 'true',
-        }),
-    const ConstantData('const C.named()', ConstantExpressionKind.CONSTRUCTED,
-        type: 'C',
-        fields: const {
-          'field(B#field1)': 'false',
-          'field(C#field2)': 'false',
-        }),
-    const ConstantData('const C.named(87)', ConstantExpressionKind.CONSTRUCTED,
-        type: 'C',
-        fields: const {
-          'field(B#field1)': '87',
-          'field(C#field2)': '87',
-        }),
-  ]),
-  const TestData('''
-class A<T> implements B<Null> {
-  final field1;
-  const A({this.field1:42});
-}
-class B<S> implements C<Null> {
-  const factory B({field1}) = A<B<S>>;
-  const factory B.named() = A<S>;
-}
-class C<U> {
-  const factory C({field1}) = A<B<double>>;
-}
-''', const [
-    const ConstantData('const A()', ConstantExpressionKind.CONSTRUCTED,
-        type: 'A<dynamic>', fields: const {'field(A#field1)': '42'}),
-    const ConstantData(
-        'const A<int>(field1: 87)', ConstantExpressionKind.CONSTRUCTED,
-        type: 'A<int>', fields: const {'field(A#field1)': '87'}),
-    const ConstantData('const B()', ConstantExpressionKind.CONSTRUCTED,
-        type: 'A<B<dynamic>>',
-        fields: const {
-          'field(A#field1)': '42',
-        },
-        // Redirecting factories are replaced by their effective targets by CFE.
-        text: 'const A<B<dynamic>>()'),
-    const ConstantData('const B<int>()', ConstantExpressionKind.CONSTRUCTED,
-        type: 'A<B<int>>',
-        fields: const {
-          'field(A#field1)': '42',
-        },
-        // Redirecting factories are replaced by their effective targets by CFE.
-        text: 'const A<B<int>>()'),
-    const ConstantData(
-        'const B<int>(field1: 87)', ConstantExpressionKind.CONSTRUCTED,
-        type: 'A<B<int>>',
-        fields: const {
-          'field(A#field1)': '87',
-        },
-        // Redirecting factories are replaced by their effective targets by CFE.
-        text: 'const A<B<int>>(field1: 87)'),
-    const ConstantData(
-        'const C<int>(field1: 87)', ConstantExpressionKind.CONSTRUCTED,
-        type: 'A<B<double>>',
-        fields: const {
-          'field(A#field1)': '87',
-        },
-        // Redirecting factories are replaced by their effective targets by CFE.
-        text: 'const A<B<double>>(field1: 87)'),
-    const ConstantData(
-        'const B<int>.named()', ConstantExpressionKind.CONSTRUCTED,
-        type: 'A<int>',
-        fields: const {
-          'field(A#field1)': '42',
-        },
-        // Redirecting factories are replaced by their effective targets by CFE.
-        text: 'const A<int>()'),
-  ]),
-  const TestData('''
-T identity<T>(T t) => t;
-class C<T> {
-  final T defaultValue;
-  final T Function(T t) identityFunction;
-
-  const C(this.defaultValue, this.identityFunction);
-}
-  ''', const <ConstantData>[
-    const ConstantData('identity', ConstantExpressionKind.FUNCTION),
-    const ConstantData(
-        'const C<int>(0, identity)', ConstantExpressionKind.CONSTRUCTED,
-        type: 'C<int>', text: 'const C<int>(0, <int>(identity))'),
-    const ConstantData(
-        'const C<double>(0.5, identity)', ConstantExpressionKind.CONSTRUCTED,
-        type: 'C<double>', text: 'const C<double>(0.5, <double>(identity))'),
-  ])
-];
-
-main() {
-  asyncTest(() async {
-    await runTest();
-  });
-}
-
-Future runTest() async {
-  for (TestData data in DATA) {
-    await testData(data);
-  }
-}
-
-Future testData(TestData data) async {
-  StringBuffer sb = new StringBuffer();
-  sb.writeln('${data.declarations}');
-  Map<String, ConstantData> constants = {};
-  List<String> names = <String>[];
-  data.constants.forEach((ConstantData constantData) {
-    String name = 'c${constants.length}';
-    names.add(name);
-    sb.writeln('const $name = ${constantData.code};');
-    constants[name] = constantData;
-  });
-  sb.writeln('main() {');
-  for (String name in names) {
-    sb.writeln('  print($name);');
-  }
-  sb.writeln('}');
-  String source = sb.toString();
-  CompilationResult result =
-      await runCompiler(memorySourceFiles: {'main.dart': source});
-  Compiler compiler = result.compiler;
-  KElementEnvironment elementEnvironment =
-      compiler.frontendStrategy.elementEnvironment;
-
-  MemoryEnvironment environment = new MemoryEnvironment(
-      new KernelEvaluationEnvironment(
-          (compiler.frontendStrategy as dynamic).elementMap,
-          compiler.environment,
-          null));
-  dynamic library = elementEnvironment.mainLibrary;
-  constants.forEach((String name, ConstantData data) {
-    FieldEntity field = elementEnvironment.lookupLibraryMember(library, name);
-    dynamic constant = elementEnvironment.getFieldConstantForTesting(field);
-    Expect.equals(
-        data.kind,
-        constant.kind,
-        "Unexpected kind '${constant.kind}' for constant "
-        "`${constant.toDartText()}`, expected '${data.kind}'.");
-    String text = data.text;
-    Expect.equals(
-        text,
-        constant.toDartText(),
-        "Unexpected text '${constant.toDartText()}' for constant, "
-        "expected '${text}'.");
-    if (data.type != null) {
-      String instanceType =
-          constant.computeInstanceType(environment).toString();
-      Expect.equals(
-          data.type,
-          instanceType,
-          "Unexpected type '$instanceType' for constant "
-          "`${constant.toDartText()}`, expected '${data.type}'.");
-    }
-    if (data.fields != null) {
-      Map instanceFields = constant.computeInstanceData(environment).fieldMap;
-      Expect.equals(
-          data.fields.length,
-          instanceFields.length,
-          "Unexpected field count ${instanceFields.length} for constant "
-          "`${constant.toDartText()}`, expected '${data.fields.length}'.");
-      instanceFields.forEach((field, expression) {
-        String name = '$field';
-        Expect.isTrue(name.startsWith('k:'));
-        name = name.substring(2).replaceAll('.', "#");
-        String expression = instanceFields[field].toDartText();
-        String expected = data.fields[name];
-        Expect.equals(
-            expected,
-            expression,
-            "Unexpected field expression ${expression} for field '$name' in "
-            "constant `${constant.toDartText()}`, expected '${expected}'.");
-      });
-    }
-  });
-}
diff --git a/tests/compiler/dart2js/model/enqueuer_test.dart b/tests/compiler/dart2js/model/enqueuer_test.dart
index 8a8a6a6..3417206 100644
--- a/tests/compiler/dart2js/model/enqueuer_test.dart
+++ b/tests/compiler/dart2js/model/enqueuer_test.dart
@@ -71,6 +71,7 @@
   const Impact.invoke(this.clsName, this.memberName)
       : this.kind = ImpactKind.invoke;
 
+  @override
   String toString() =>
       'Impact(kind=$kind,clsName=$clsName,memberName=$memberName)';
 }
diff --git a/tests/compiler/dart2js/model/native_test.dart b/tests/compiler/dart2js/model/native_test.dart
index 3e7284b..6ae4e32 100644
--- a/tests/compiler/dart2js/model/native_test.dart
+++ b/tests/compiler/dart2js/model/native_test.dart
@@ -139,7 +139,71 @@
       '53',
       '54',
     ]);
-    // TODO(johnniwinther): Add similar test for native declarations.
+
+    await runTest('tests/compiler/dart2js_native/native_test.dart',
+        'tests/compiler/dart2js_native/', {
+      'Class': Kind.regular,
+      'NativeClass': Kind.native,
+      'topLevelField': Kind.regular,
+      'topLevelGetter': Kind.regular,
+      'topLevelSetter': Kind.regular,
+      'topLevelFunction': Kind.regular,
+      'nativeTopLevelGetter': Kind.native,
+      'nativeTopLevelSetter': Kind.native,
+      'nativeTopLevelFunction': Kind.native,
+      'Class.generative': Kind.regular,
+      'Class.fact': Kind.regular,
+      'Class.instanceField': Kind.regular,
+      'Class.instanceGetter': Kind.regular,
+      'Class.instanceSetter': Kind.regular,
+      'Class.instanceMethod': Kind.regular,
+      'Class.staticField': Kind.regular,
+      'Class.staticGetter': Kind.regular,
+      'Class.staticSetter': Kind.regular,
+      'Class.staticMethod': Kind.regular,
+      'Class.nativeInstanceGetter': Kind.native,
+      'Class.nativeInstanceSetter': Kind.native,
+      'Class.nativeInstanceMethod': Kind.native,
+      'NativeClass.generative': Kind.regular,
+      'NativeClass.fact': Kind.regular,
+      'NativeClass.nativeGenerative': Kind.native,
+      'NativeClass.nativeFact': Kind.native,
+      'NativeClass.instanceField': Kind.native,
+      'NativeClass.instanceGetter': Kind.regular,
+      'NativeClass.instanceSetter': Kind.regular,
+      'NativeClass.instanceMethod': Kind.regular,
+      'NativeClass.staticField': Kind.regular,
+      'NativeClass.staticGetter': Kind.regular,
+      'NativeClass.staticSetter': Kind.regular,
+      'NativeClass.staticMethod': Kind.regular,
+      'NativeClass.nativeInstanceGetter': Kind.native,
+      'NativeClass.nativeInstanceSetter': Kind.native,
+      'NativeClass.nativeInstanceMethod': Kind.native,
+      'NativeClass.nativeStaticGetter': Kind.native,
+      'NativeClass.nativeStaticSetter': Kind.native,
+      'NativeClass.nativeStaticMethod': Kind.native,
+    },
+        skipList: [
+          // External constructors in non-native class
+          //'08',
+          //'09',
+          // External instance members in non-native class
+          //'22',
+          //'23',
+          //'24',
+          // External static members in non-native class
+          //'25',
+          //'26',
+          //'27',
+          // External instance members in native class
+          //'36',
+          //'37',
+          //'38',
+          // External static members in native class
+          //'39',
+          //'40',
+          //'41',
+        ]);
   });
 }
 
@@ -290,6 +354,7 @@
     return sb.toString();
   }
 
+  @override
   String toString() {
     return lines.values.join('\n');
   }
diff --git a/tests/compiler/dart2js/model/no_such_method_enabled_test.dart b/tests/compiler/dart2js/model/no_such_method_enabled_test.dart
index 6410edf..58d85b9 100644
--- a/tests/compiler/dart2js/model/no_such_method_enabled_test.dart
+++ b/tests/compiler/dart2js/model/no_such_method_enabled_test.dart
@@ -3,6 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:async_helper/async_helper.dart';
+import 'package:compiler/src/commandline_options.dart';
 import 'package:compiler/src/common_elements.dart';
 import 'package:compiler/src/compiler.dart';
 import 'package:compiler/src/elements/entities.dart';
@@ -234,12 +235,15 @@
 ];
 
 main() {
-  runTests() async {
+  runTests({bool useCFEConstants: false}) async {
     for (NoSuchMethodTest test in TESTS) {
       print('---- testing -------------------------------------------------');
       print(test.code);
-      CompilationResult result =
-          await runCompiler(memorySourceFiles: {'main.dart': test.code});
+      CompilationResult result = await runCompiler(
+          memorySourceFiles: {'main.dart': test.code},
+          options: useCFEConstants
+              ? ['${Flags.enableLanguageExperiments}=constant-update-2018']
+              : []);
       Expect.isTrue(result.isSuccess);
       Compiler compiler = result.compiler;
       checkTest(compiler, test);
@@ -249,6 +253,8 @@
   asyncTest(() async {
     print('--test from kernel------------------------------------------------');
     await runTests();
+    print('--test from kernel with CFE constants-----------------------------');
+    await runTests(useCFEConstants: true);
   });
 }
 
diff --git a/tests/compiler/dart2js/model/strong_mode_impact_test.dart b/tests/compiler/dart2js/model/strong_mode_impact_test.dart
index 1b2f5ad..eec9e9d 100644
--- a/tests/compiler/dart2js/model/strong_mode_impact_test.dart
+++ b/tests/compiler/dart2js/model/strong_mode_impact_test.dart
@@ -136,6 +136,7 @@
       this.implicitCasts: const <String>[],
       this.parameterChecks: const <String>[]});
 
+  @override
   String toString() {
     StringBuffer sb = new StringBuffer();
     sb.write('Impact(');
diff --git a/tests/compiler/dart2js/optimization/data/arithmetic_simplification.dart b/tests/compiler/dart2js/optimization/data/arithmetic_simplification.dart
index c479a96..6d5ccef 100644
--- a/tests/compiler/dart2js/optimization/data/arithmetic_simplification.dart
+++ b/tests/compiler/dart2js/optimization/data/arithmetic_simplification.dart
@@ -4,9 +4,7 @@
 
 // Test constant folding on numbers.
 
-import 'package:expect/expect.dart';
-
-@AssumeDynamic()
+@pragma('dart2js:assumeDynamic')
 @pragma('dart2js:noInline')
 int confuse(int x) => x;
 
diff --git a/tests/compiler/dart2js/optimization/data/effectively_constant_fields.dart b/tests/compiler/dart2js/optimization/data/effectively_constant_fields.dart
new file mode 100644
index 0000000..70578fc
--- /dev/null
+++ b/tests/compiler/dart2js/optimization/data/effectively_constant_fields.dart
@@ -0,0 +1,83 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:expect/expect.dart';
+
+class Class1 {
+  var field1 = 0;
+
+  @pragma('dart2js:noElision')
+  var field2 = 0;
+
+  var field3 = 0;
+}
+
+/*element: method1:
+ ConstantFieldGet=[name=Class1.field1&value=IntConstant(0)],
+ FieldGet=[]
+*/
+@pragma('dart2js:noInline')
+method1(Class1 c) {
+  return c.field1;
+}
+
+/*element: method2:FieldGet=[name=Class1.field2]*/
+@pragma('dart2js:noInline')
+method2(Class1 c) {
+  return c.field2;
+}
+
+class Class2 {
+  var field3 = 0;
+}
+
+@pragma('dart2js:noInline')
+method3(c) {
+  return c.field3;
+}
+
+int _field4() => 0;
+
+class Class3 {
+  int Function() field4 = _field4;
+}
+
+/*element: method4:
+ ConstantFieldCall=[name=Class3.field4&value=FunctionConstant(_field4)],
+ FieldCall=[]
+*/
+@pragma('dart2js:noInline')
+method4(Class3 c) {
+  return c.field4();
+}
+
+/*element: method6:
+ ConstantFieldGet=[name=Class1.field1&value=IntConstant(0)],
+ FieldGet=[name=<null-guard>]
+*/
+@pragma('dart2js:noInline')
+method6(Class1 c) {
+  return c.field1;
+}
+
+/*element: method7:
+ ConstantFieldCall=[name=Class3.field4&value=FunctionConstant(_field4)],
+ FieldCall=[name=<null-guard>]
+*/
+@pragma('dart2js:noInline')
+method7(Class3 c) {
+  return c.field4();
+}
+
+main() {
+  Expect.equals(0, method1(new Class1()));
+  Expect.equals(0, method2(new Class1()));
+  Expect.equals(0, method3(new Class1()));
+  Expect.equals(0, method3(new Class2()));
+  Expect.equals(0, method4(new Class3()));
+  Expect.equals(0, method6(new Class1()));
+  Expect.throws(() => method6(null));
+  Expect.equals(4, method7(new Class3()));
+  Expect.throws(() => method7(null));
+}
diff --git a/tests/compiler/dart2js/optimization/data/field_get.dart b/tests/compiler/dart2js/optimization/data/field_get.dart
index 349edca..e9101e5 100644
--- a/tests/compiler/dart2js/optimization/data/field_get.dart
+++ b/tests/compiler/dart2js/optimization/data/field_get.dart
@@ -10,9 +10,11 @@
   method3(new Class3b());
   method4(new Class4a());
   method4(new Class4b());
+  method5(new Class5a());
 }
 
 class Class1a {
+  @pragma('dart2js:noElision')
   int field1;
 }
 
@@ -23,6 +25,7 @@
 }
 
 class Class2a {
+  @pragma('dart2js:noElision')
   int field2;
 }
 
@@ -60,3 +63,14 @@
 method4(Class4a c) {
   return c.field4;
 }
+
+class Class5a {
+  @pragma('dart2js:noElision')
+  int Function() field5;
+}
+
+/*element: method5:FieldCall=[name=Class5a.field5]*/
+@pragma('dart2js:noInline')
+method5(Class5a c) {
+  return c.field5();
+}
diff --git a/tests/compiler/dart2js/optimization/data/index.dart b/tests/compiler/dart2js/optimization/data/index.dart
index 12586ad..b6dd480 100644
--- a/tests/compiler/dart2js/optimization/data/index.dart
+++ b/tests/compiler/dart2js/optimization/data/index.dart
@@ -40,6 +40,7 @@
 /*strong.element: mutableDynamicListDynamicIndex:Specializer=[!Index]*/
 /*omit.element: mutableDynamicListDynamicIndex:Specializer=[Index]*/
 @pragma('dart2js:noInline')
+@pragma('dart2js:disableFinal')
 mutableDynamicListDynamicIndex(dynamic index) {
   dynamic list = [0];
   return list[index];
diff --git a/tests/compiler/dart2js/rti/data/call_typed.dart b/tests/compiler/dart2js/rti/data/call_typed.dart
index 9731508..7de1bdc 100644
--- a/tests/compiler/dart2js/rti/data/call_typed.dart
+++ b/tests/compiler/dart2js/rti/data/call_typed.dart
@@ -3,13 +3,12 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:expect/expect.dart';
-import 'package:meta/dart2js.dart';
 
 class A {
   call(int i) {}
 }
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is Function(int);
 
 main() {
diff --git a/tests/compiler/dart2js/rti/data/call_typed_generic.dart b/tests/compiler/dart2js/rti/data/call_typed_generic.dart
index f7f5de4..972f65f 100644
--- a/tests/compiler/dart2js/rti/data/call_typed_generic.dart
+++ b/tests/compiler/dart2js/rti/data/call_typed_generic.dart
@@ -3,7 +3,6 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:expect/expect.dart';
-import 'package:meta/dart2js.dart';
 
 /*strong.class: A:direct,explicit=[A.T],needsArgs*/
 /*omit.class: A:*/
@@ -13,7 +12,7 @@
   call(T t) {}
 }
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is Function(int);
 
 main() {
diff --git a/tests/compiler/dart2js/rti/data/closure_generic_unneeded.dart b/tests/compiler/dart2js/rti/data/closure_generic_unneeded.dart
index 1e461ee..ec6a531 100644
--- a/tests/compiler/dart2js/rti/data/closure_generic_unneeded.dart
+++ b/tests/compiler/dart2js/rti/data/closure_generic_unneeded.dart
@@ -2,18 +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.
 
-import 'package:expect/expect.dart';
-
 /*omit.class: A:*/
 /*strong.class: A:direct,explicit=[A.T],needsArgs*/
 class A<T> {
-  @NoInline()
+  @pragma('dart2js:noInline')
   m() {
     return /**/ (T t, String s) {};
   }
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o is void Function(int);
 
 main() {
diff --git a/tests/compiler/dart2js/rti/data/closure_unneeded.dart b/tests/compiler/dart2js/rti/data/closure_unneeded.dart
index 1e461ee..ec6a531 100644
--- a/tests/compiler/dart2js/rti/data/closure_unneeded.dart
+++ b/tests/compiler/dart2js/rti/data/closure_unneeded.dart
@@ -2,18 +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.
 
-import 'package:expect/expect.dart';
-
 /*omit.class: A:*/
 /*strong.class: A:direct,explicit=[A.T],needsArgs*/
 class A<T> {
-  @NoInline()
+  @pragma('dart2js:noInline')
   m() {
     return /**/ (T t, String s) {};
   }
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o is void Function(int);
 
 main() {
diff --git a/tests/compiler/dart2js/rti/data/generic_class_is.dart b/tests/compiler/dart2js/rti/data/generic_class_is.dart
index acfcaac..fce7f39 100644
--- a/tests/compiler/dart2js/rti/data/generic_class_is.dart
+++ b/tests/compiler/dart2js/rti/data/generic_class_is.dart
@@ -2,14 +2,12 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:meta/dart2js.dart';
-
 /*class: A:implicit=[A]*/
 class A {}
 
 /*class: B:direct,explicit=[B.T],needsArgs*/
 class B<T> {
-  @noInline
+  @pragma('dart2js:noInline')
   method(T t) => t is T;
 }
 
diff --git a/tests/compiler/dart2js/rti/data/generic_class_is2.dart b/tests/compiler/dart2js/rti/data/generic_class_is2.dart
index 8f6cc6c..7c15011 100644
--- a/tests/compiler/dart2js/rti/data/generic_class_is2.dart
+++ b/tests/compiler/dart2js/rti/data/generic_class_is2.dart
@@ -3,7 +3,6 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:expect/expect.dart';
-import 'package:meta/dart2js.dart';
 
 /*class: A:implicit=[List<A<C2>>,List<A<C>>]*/
 class A<T> {}
@@ -14,7 +13,7 @@
 
 /*class: B:direct,explicit=[B.T],needsArgs*/
 class B<T> {
-  @noInline
+  @pragma('dart2js:noInline')
   method(var t) => t is T;
 }
 
diff --git a/tests/compiler/dart2js/rti/data/generic_instanceof4.dart b/tests/compiler/dart2js/rti/data/generic_instanceof4.dart
index 16b3327..84470da 100644
--- a/tests/compiler/dart2js/rti/data/generic_instanceof4.dart
+++ b/tests/compiler/dart2js/rti/data/generic_instanceof4.dart
@@ -2,11 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:meta/dart2js.dart';
-
 /*class: A:deps=[B],direct,explicit=[A.T],needsArgs*/
 class A<T> {
-  @noInline
+  @pragma('dart2js:noInline')
   foo(x) {
     return x is T;
   }
@@ -17,7 +15,7 @@
 
 /*class: B:implicit=[B.T],indirect,needsArgs*/
 class B<T> implements BB {
-  @noInline
+  @pragma('dart2js:noInline')
   foo() {
     return new A<T>().foo(new B());
   }
diff --git a/tests/compiler/dart2js/rti/data/generic_instanceof4_unused.dart b/tests/compiler/dart2js/rti/data/generic_instanceof4_unused.dart
index 836e001..7efc3c1 100644
--- a/tests/compiler/dart2js/rti/data/generic_instanceof4_unused.dart
+++ b/tests/compiler/dart2js/rti/data/generic_instanceof4_unused.dart
@@ -2,11 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:meta/dart2js.dart';
-
 /*class: A:deps=[B],direct,explicit=[A.T],needsArgs*/
 class A<T> {
-  @noInline
+  @pragma('dart2js:noInline')
   foo(x) {
     return x is T;
   }
@@ -18,7 +16,7 @@
 
 /*class: B:implicit=[B.T],indirect,needsArgs*/
 class B<T> implements BB {
-  @noInline
+  @pragma('dart2js:noInline')
   foo() {
     return new A<T>().foo(new B());
   }
diff --git a/tests/compiler/dart2js/rti/data/generic_method1.dart b/tests/compiler/dart2js/rti/data/generic_method1.dart
index 651976b..da2373a 100644
--- a/tests/compiler/dart2js/rti/data/generic_method1.dart
+++ b/tests/compiler/dart2js/rti/data/generic_method1.dart
@@ -2,12 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:meta/dart2js.dart';
 import "package:expect/expect.dart";
 
 /*class: A:deps=[method2],direct,explicit=[A.T],needsArgs*/
 class A<T> {
-  @noInline
+  @pragma('dart2js:noInline')
   foo(x) {
     return x is T;
   }
@@ -17,19 +16,19 @@
 class BB {}
 
 /*element: method2:deps=[B],implicit=[method2.T],indirect,needsArgs*/
-@noInline
+@pragma('dart2js:noInline')
 method2<T>() => new A<T>();
 
 /*class: B:deps=[method1],implicit=[B.T],indirect,needsArgs*/
 class B<T> implements BB {
-  @noInline
+  @pragma('dart2js:noInline')
   foo() {
     return method2<T>().foo(new B());
   }
 }
 
 /*element: method1:implicit=[method1.T],indirect,needsArgs*/
-@noInline
+@pragma('dart2js:noInline')
 method1<T>() {
   return new B<T>().foo();
 }
diff --git a/tests/compiler/dart2js/rti/data/generic_method2.dart b/tests/compiler/dart2js/rti/data/generic_method2.dart
index 27a1d49..6ddb5c0 100644
--- a/tests/compiler/dart2js/rti/data/generic_method2.dart
+++ b/tests/compiler/dart2js/rti/data/generic_method2.dart
@@ -2,12 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:meta/dart2js.dart';
 import "package:expect/expect.dart";
 
 /*class: A:deps=[B],direct,explicit=[A.T],needsArgs*/
 class A<T> {
-  @noInline
+  @pragma('dart2js:noInline')
   foo(x) {
     return x is T;
   }
@@ -18,14 +17,14 @@
 
 /*class: B:deps=[method1],implicit=[B.T],indirect,needsArgs*/
 class B<T> implements BB {
-  @noInline
+  @pragma('dart2js:noInline')
   foo() {
     return new A<T>().foo(new B());
   }
 }
 
 /*element: method1:implicit=[method1.T],indirect,needsArgs*/
-@noInline
+@pragma('dart2js:noInline')
 method1<T>() {
   return new B<T>().foo();
 }
diff --git a/tests/compiler/dart2js/rti/data/generic_method3.dart b/tests/compiler/dart2js/rti/data/generic_method3.dart
index 46ecef3c..a00bee3 100644
--- a/tests/compiler/dart2js/rti/data/generic_method3.dart
+++ b/tests/compiler/dart2js/rti/data/generic_method3.dart
@@ -2,12 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:meta/dart2js.dart';
 import "package:expect/expect.dart";
 
 /*class: A:deps=[method2],direct,explicit=[A.T],needsArgs*/
 class A<T> {
-  @noInline
+  @pragma('dart2js:noInline')
   foo(x) {
     return x is T;
   }
@@ -17,12 +16,12 @@
 class BB {}
 
 /*element: method2:deps=[B],implicit=[method2.T],indirect,needsArgs*/
-@noInline
+@pragma('dart2js:noInline')
 method2<T>() => new A<T>();
 
 /*class: B:implicit=[B.T],indirect,needsArgs*/
 class B<T> implements BB {
-  @noInline
+  @pragma('dart2js:noInline')
   foo() {
     return method2<T>().foo(new B());
   }
diff --git a/tests/compiler/dart2js/rti/data/generic_method4.dart b/tests/compiler/dart2js/rti/data/generic_method4.dart
index 048ce79..342fcdd 100644
--- a/tests/compiler/dart2js/rti/data/generic_method4.dart
+++ b/tests/compiler/dart2js/rti/data/generic_method4.dart
@@ -2,12 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:meta/dart2js.dart';
 import "package:expect/expect.dart";
 
 /*class: A:deps=[C.method2],direct,explicit=[A.T],needsArgs*/
 class A<T> {
-  @noInline
+  @pragma('dart2js:noInline')
   foo(x) {
     return x is T;
   }
@@ -18,7 +17,7 @@
 
 /*class: B:deps=[C.method1],implicit=[B.T],indirect,needsArgs*/
 class B<T> implements BB {
-  @noInline
+  @pragma('dart2js:noInline')
   foo(c) {
     return c.method2<T>().foo(new B());
   }
@@ -26,13 +25,13 @@
 
 class C {
   /*element: C.method1:implicit=[method1.T],indirect,needsArgs,selectors=[Selector(call, method1, arity=0, types=1)]*/
-  @noInline
+  @pragma('dart2js:noInline')
   method1<T>() {
     return new B<T>().foo(this);
   }
 
   /*element: C.method2:deps=[B],implicit=[method2.T],indirect,needsArgs,selectors=[Selector(call, method2, arity=0, types=1)]*/
-  @noInline
+  @pragma('dart2js:noInline')
   method2<T>() => new A<T>();
 }
 
diff --git a/tests/compiler/dart2js/rti/data/local_function_generic.dart b/tests/compiler/dart2js/rti/data/local_function_generic.dart
index 6963dd7..10e9a2f 100644
--- a/tests/compiler/dart2js/rti/data/local_function_generic.dart
+++ b/tests/compiler/dart2js/rti/data/local_function_generic.dart
@@ -11,7 +11,7 @@
   return local;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o is S Function<S>(S);
 
 main() {
diff --git a/tests/compiler/dart2js/rti/data/local_function_list_literal.dart b/tests/compiler/dart2js/rti/data/local_function_list_literal.dart
index d58058e..7cbb508 100644
--- a/tests/compiler/dart2js/rti/data/local_function_list_literal.dart
+++ b/tests/compiler/dart2js/rti/data/local_function_list_literal.dart
@@ -9,12 +9,12 @@
 
 /*strong.element: method:implicit=[method.T],indirect,needsArgs*/
 /*omit.element: method:needsArgs*/
-@NoInline()
+@pragma('dart2js:noInline')
 method<T>() {
   return () => <T>[];
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o is List<int>;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/data/local_function_map_literal.dart b/tests/compiler/dart2js/rti/data/local_function_map_literal.dart
index ebdd352..4084c3c 100644
--- a/tests/compiler/dart2js/rti/data/local_function_map_literal.dart
+++ b/tests/compiler/dart2js/rti/data/local_function_map_literal.dart
@@ -9,12 +9,12 @@
 
 /*strong.element: method:implicit=[method.T],indirect,needsArgs*/
 /*omit.element: method:needsArgs*/
-@NoInline()
+@pragma('dart2js:noInline')
 method<T>() {
   return () => <T, int>{};
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o is Map<int, int>;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/data/local_function_signature2.dart b/tests/compiler/dart2js/rti/data/local_function_signature2.dart
index afb9150..ce0306e 100644
--- a/tests/compiler/dart2js/rti/data/local_function_signature2.dart
+++ b/tests/compiler/dart2js/rti/data/local_function_signature2.dart
@@ -96,7 +96,7 @@
   return local;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o is num Function(num);
 
 main() {
diff --git a/tests/compiler/dart2js/rti/data/local_function_signatures.dart b/tests/compiler/dart2js/rti/data/local_function_signatures.dart
index 27ed472..705a077 100644
--- a/tests/compiler/dart2js/rti/data/local_function_signatures.dart
+++ b/tests/compiler/dart2js/rti/data/local_function_signatures.dart
@@ -52,7 +52,7 @@
   }
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o is num Function(num);
 
 main() {
diff --git a/tests/compiler/dart2js/rti/data/local_function_signatures_generic.dart b/tests/compiler/dart2js/rti/data/local_function_signatures_generic.dart
index 8d4dd9b..92252a3 100644
--- a/tests/compiler/dart2js/rti/data/local_function_signatures_generic.dart
+++ b/tests/compiler/dart2js/rti/data/local_function_signatures_generic.dart
@@ -115,7 +115,7 @@
   return local;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o is num Function(num);
 
 main() {
diff --git a/tests/compiler/dart2js/rti/data/method_signatures.dart b/tests/compiler/dart2js/rti/data/method_signatures.dart
index 83bca5c..5a4b083 100644
--- a/tests/compiler/dart2js/rti/data/method_signatures.dart
+++ b/tests/compiler/dart2js/rti/data/method_signatures.dart
@@ -45,7 +45,7 @@
 /*element: method9:*/
 Object method9(num n) => null;
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o is num Function(num);
 
 main() {
diff --git a/tests/compiler/dart2js/rti/data/method_signatures_generic.dart b/tests/compiler/dart2js/rti/data/method_signatures_generic.dart
index afca40f5..1c1cb02 100644
--- a/tests/compiler/dart2js/rti/data/method_signatures_generic.dart
+++ b/tests/compiler/dart2js/rti/data/method_signatures_generic.dart
@@ -43,7 +43,7 @@
 /*omit.element: method9:*/
 num method9<T>(num n, T t) => null;
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o is num Function(num);
 
 forceInstantiation(num Function(num) f) => f;
diff --git a/tests/compiler/dart2js/rti/data/no_such_method1.dart b/tests/compiler/dart2js/rti/data/no_such_method1.dart
index 22f13c2..f2e93f1 100644
--- a/tests/compiler/dart2js/rti/data/no_such_method1.dart
+++ b/tests/compiler/dart2js/rti/data/no_such_method1.dart
@@ -2,14 +2,12 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:expect/expect.dart';
-
 class C {
   /*element: C.noSuchMethod:needsArgs,selectors=[Selector(call, call, arity=0, types=2),Selector(call, foo, arity=0, types=2)]*/
   noSuchMethod(i) => i.typeArguments;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(dynamic x) {
   print(x.foo<int, String>());
 }
diff --git a/tests/compiler/dart2js/rti/data/no_such_method2.dart b/tests/compiler/dart2js/rti/data/no_such_method2.dart
index fc60960..55434cd 100644
--- a/tests/compiler/dart2js/rti/data/no_such_method2.dart
+++ b/tests/compiler/dart2js/rti/data/no_such_method2.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 'package:expect/expect.dart';
-
 class C {
   /*element: C.noSuchMethod:needsArgs,selectors=[Selector(call, call, arity=0, types=2),Selector(call, foo, arity=0, types=2)]*/
   noSuchMethod(i) => i.typeArguments;
@@ -14,7 +12,7 @@
   foo<U, V>() => [U, V];
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(dynamic x) {
   print(x.foo<int, String>());
 }
diff --git a/tests/compiler/dart2js/rti/data/no_such_method3.dart b/tests/compiler/dart2js/rti/data/no_such_method3.dart
index 98883aa..d10adf2 100644
--- a/tests/compiler/dart2js/rti/data/no_such_method3.dart
+++ b/tests/compiler/dart2js/rti/data/no_such_method3.dart
@@ -2,14 +2,12 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:expect/expect.dart';
-
 class C {
   /*element: C.noSuchMethod:*/
   noSuchMethod(i) => null;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(dynamic x) {
   print(x.foo<int, String>());
 }
diff --git a/tests/compiler/dart2js/rti/emission/arguments.dart b/tests/compiler/dart2js/rti/emission/arguments.dart
index 30b4f2e..04e10ed 100644
--- a/tests/compiler/dart2js/rti/emission/arguments.dart
+++ b/tests/compiler/dart2js/rti/emission/arguments.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 'package:meta/dart2js.dart';
-
 /*class: A:checkedTypeArgument,checks=[],typeArgument*/
 class A {}
 
@@ -13,7 +11,7 @@
 /*class: C:checkedInstance,checks=[],instance*/
 class C<T> {}
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is C<A>;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/call.dart b/tests/compiler/dart2js/rti/emission/call.dart
index 51f2ee76..44f562a 100644
--- a/tests/compiler/dart2js/rti/emission/call.dart
+++ b/tests/compiler/dart2js/rti/emission/call.dart
@@ -3,14 +3,13 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:expect/expect.dart';
-import 'package:meta/dart2js.dart';
 
 /*class: A:checks=[],instance*/
 class A {
   call() {}
 }
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is Function;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/call_typed.dart b/tests/compiler/dart2js/rti/emission/call_typed.dart
index 3f70832..9688991 100644
--- a/tests/compiler/dart2js/rti/emission/call_typed.dart
+++ b/tests/compiler/dart2js/rti/emission/call_typed.dart
@@ -3,14 +3,13 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:expect/expect.dart';
-import 'package:meta/dart2js.dart';
 
 /*class: A:checks=[],instance*/
 class A {
   call(int i) {}
 }
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is Function(int);
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/call_typed_generic.dart b/tests/compiler/dart2js/rti/emission/call_typed_generic.dart
index ff62703..1d3bfea 100644
--- a/tests/compiler/dart2js/rti/emission/call_typed_generic.dart
+++ b/tests/compiler/dart2js/rti/emission/call_typed_generic.dart
@@ -3,14 +3,13 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:expect/expect.dart';
-import 'package:meta/dart2js.dart';
 
 /*class: A:checks=[],instance*/
 class A<T> {
   call(T t) {}
 }
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is Function(int);
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/closure_function.dart b/tests/compiler/dart2js/rti/emission/closure_function.dart
index b09023f..86101d9 100644
--- a/tests/compiler/dart2js/rti/emission/closure_function.dart
+++ b/tests/compiler/dart2js/rti/emission/closure_function.dart
@@ -2,9 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:meta/dart2js.dart';
-
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is Function;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/closure_function_type.dart b/tests/compiler/dart2js/rti/emission/closure_function_type.dart
index aed5de1..374d99e 100644
--- a/tests/compiler/dart2js/rti/emission/closure_function_type.dart
+++ b/tests/compiler/dart2js/rti/emission/closure_function_type.dart
@@ -2,9 +2,7 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:meta/dart2js.dart';
-
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is Function();
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/closure_signature.dart b/tests/compiler/dart2js/rti/emission/closure_signature.dart
index aedf5f6..8a4589a 100644
--- a/tests/compiler/dart2js/rti/emission/closure_signature.dart
+++ b/tests/compiler/dart2js/rti/emission/closure_signature.dart
@@ -2,22 +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.
 
-import 'package:expect/expect.dart';
-
 /*class: A:checks=[],instance*/
 class A<T> {
-  @NoInline()
+  @pragma('dart2js:noInline')
   m() {
     return /*checks=[$signature],instance*/ (T t) {};
   }
 
-  @NoInline()
+  @pragma('dart2js:noInline')
   f() {
     return /*checks=[$signature],instance*/ (int t) {};
   }
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o is void Function(int);
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/closure_signature_unneeded.dart b/tests/compiler/dart2js/rti/emission/closure_signature_unneeded.dart
index df19f23..c292b18 100644
--- a/tests/compiler/dart2js/rti/emission/closure_signature_unneeded.dart
+++ b/tests/compiler/dart2js/rti/emission/closure_signature_unneeded.dart
@@ -2,11 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:expect/expect.dart';
-
 /*class: A:checks=[],instance*/
 class A<T> {
-  @NoInline()
+  @pragma('dart2js:noInline')
   m() {
     // TODO(johnniwinther): The signature is not needed since the type isn't a
     // potential subtype of the checked function types.
@@ -18,7 +16,7 @@
   }
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o is void Function(int);
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/constructor_argument_static.dart b/tests/compiler/dart2js/rti/emission/constructor_argument_static.dart
index e59af18..97c2abe 100644
--- a/tests/compiler/dart2js/rti/emission/constructor_argument_static.dart
+++ b/tests/compiler/dart2js/rti/emission/constructor_argument_static.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 'package:meta/dart2js.dart';
-
 /*strong.class: A1:checkedInstance,checks=[],instance*/
 /*omit.class: A1:checks=[],instance*/
 class A1 {}
@@ -17,7 +15,7 @@
 /*class: Test1:checks=[],instance*/
 class Test1 {
   A1 x;
-  @noInline
+  @pragma('dart2js:noInline')
   Test1(this.x);
 }
 
@@ -31,7 +29,7 @@
 
 /*class: Test2:checks=[],indirectInstance*/
 abstract class Test2 {
-  @noInline
+  @pragma('dart2js:noInline')
   Test2(A2 x) {
     print(x);
   }
diff --git a/tests/compiler/dart2js/rti/emission/dynamic_instance.dart b/tests/compiler/dart2js/rti/emission/dynamic_instance.dart
index d6b0a9a..3f455c0 100644
--- a/tests/compiler/dart2js/rti/emission/dynamic_instance.dart
+++ b/tests/compiler/dart2js/rti/emission/dynamic_instance.dart
@@ -3,24 +3,23 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:expect/expect.dart';
-import 'package:meta/dart2js.dart';
 
 /*class: B:checkedInstance,checks=[],typeArgument*/
 class B {}
 
 /*class: C:checks=[],instance*/
 class C {
-  @noInline
+  @pragma('dart2js:noInline')
   method1<T>(o) => method2<T>(o);
 
-  @noInline
+  @pragma('dart2js:noInline')
   method2<T>(o) => o is T;
 }
 
 /*class: D:checks=[$isB],instance*/
 class D implements B {}
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => new C().method1<B>(o);
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/dynamic_type_argument.dart b/tests/compiler/dart2js/rti/emission/dynamic_type_argument.dart
index aa1aa80..c3270bb 100644
--- a/tests/compiler/dart2js/rti/emission/dynamic_type_argument.dart
+++ b/tests/compiler/dart2js/rti/emission/dynamic_type_argument.dart
@@ -3,7 +3,6 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:expect/expect.dart';
-import 'package:meta/dart2js.dart';
 
 /*class: A:checkedInstance,checks=[],instance*/
 class A<T> {}
@@ -13,10 +12,10 @@
 
 /*class: C:checks=[],instance*/
 class C {
-  @noInline
+  @pragma('dart2js:noInline')
   method1<T>() => method2<T>();
 
-  @noInline
+  @pragma('dart2js:noInline')
   method2<T>() => new A<T>();
 }
 
@@ -26,7 +25,7 @@
 /*class: E:checks=[],typeArgument*/
 class E {}
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is A<B>;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/fixed_type_argument.dart b/tests/compiler/dart2js/rti/emission/fixed_type_argument.dart
new file mode 100644
index 0000000..3db4d67
--- /dev/null
+++ b/tests/compiler/dart2js/rti/emission/fixed_type_argument.dart
@@ -0,0 +1,29 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/*strong.class: A:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
+/*omit.class: A:checkedTypeArgument,checks=[],typeArgument*/
+class A {}
+
+/*strong.class: B:checkedInstance,checks=[$isA],typeArgument*/
+/*omit.class: B:checks=[$isA],typeArgument*/
+class B implements A {}
+
+/*class: C:checks=[],indirectInstance*/
+class C<T> {
+  @pragma('dart2js:noInline')
+  method(void Function(T) f) {}
+}
+
+/*strong.class: D:checks=[$asC],instance*/
+/*omit.class: D:checks=[],instance*/
+class D extends C<B> {}
+
+main() {
+  C<A> c = new D();
+  c.method(
+      /*strong.checks=[$signature],instance*/
+      /*omit.checks=[],instance*/
+      (A a) {});
+}
diff --git a/tests/compiler/dart2js/rti/emission/fixed_type_argument_implements.dart b/tests/compiler/dart2js/rti/emission/fixed_type_argument_implements.dart
new file mode 100644
index 0000000..0b22968
--- /dev/null
+++ b/tests/compiler/dart2js/rti/emission/fixed_type_argument_implements.dart
@@ -0,0 +1,29 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test that we emit the relation between B and A even when B is only live
+// as a type argument through the supertype of D.
+
+/*strong.class: A:checkedTypeArgument,checks=[],typeArgument*/
+class A {}
+
+/*strong.class: B:checks=[$isA],typeArgument*/
+/*omit.class: B:checks=[],typeArgument*/
+class B implements A {}
+
+/*strong.class: C:checkedInstance*/
+/*omit.class: C:*/
+class C<T> {}
+
+/*strong.class: D:checks=[$asC,$isC],instance*/
+/*omit.class: D:checks=[],instance*/
+class D implements C<B> {}
+
+main() {
+  C<A> c = new D();
+  test(c);
+}
+
+@pragma('dart2js:noInline')
+void test(C<A> c) {}
diff --git a/tests/compiler/dart2js/rti/emission/function_type_argument.dart b/tests/compiler/dart2js/rti/emission/function_type_argument.dart
index cac5f11..3b1ae5d 100644
--- a/tests/compiler/dart2js/rti/emission/function_type_argument.dart
+++ b/tests/compiler/dart2js/rti/emission/function_type_argument.dart
@@ -3,7 +3,6 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:expect/expect.dart';
-import 'package:meta/dart2js.dart';
 
 /*strong.class: C:checkedInstance,checks=[],instance,typeArgument*/
 /*omit.class: C:checks=[],instance,typeArgument*/
@@ -17,10 +16,10 @@
   call(double i) {}
 }
 
-@noInline
+@pragma('dart2js:noInline')
 test1(o) => o is Function(int);
 
-@noInline
+@pragma('dart2js:noInline')
 test2(o) => o is List<Function(int)>;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/function_typed_arguments.dart b/tests/compiler/dart2js/rti/emission/function_typed_arguments.dart
new file mode 100644
index 0000000..a434694
--- /dev/null
+++ b/tests/compiler/dart2js/rti/emission/function_typed_arguments.dart
@@ -0,0 +1,113 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:expect/expect.dart';
+
+/*class: A:checkedInstance,checks=[],instance*/
+class A<T> {}
+
+main() {
+  test1();
+  test2();
+  test3();
+  test4();
+  test5();
+  test6();
+}
+
+/*class: B1:checkedTypeArgument,checks=[],typeArgument*/
+class B1<T> {}
+
+/*class: C1:checkedTypeArgument,checks=[$asB1],typeArgument*/
+class C1 extends B1<int> {}
+
+@pragma('dart2js:noInline')
+test1() {
+  Expect.isTrue(_test1(new A<void Function(C1)>()));
+  Expect.isTrue(_test1(new A<void Function(B1<int>)>()));
+  Expect.isFalse(_test1(new A<void Function(B1<String>)>()));
+}
+
+@pragma('dart2js:noInline')
+_test1(f) => f is A<void Function(C1)>;
+
+/*class: B2:checks=[],typeArgument*/
+class B2<T> {}
+
+/*class: C2:checkedTypeArgument,checks=[],typeArgument*/
+class C2 extends B2<int> {}
+
+@pragma('dart2js:noInline')
+test2() {
+  Expect.isTrue(_test2(new A<C2 Function()>()));
+  Expect.isFalse(_test2(new A<B2<int> Function()>()));
+  Expect.isFalse(_test2(new A<B2<String> Function()>()));
+}
+
+@pragma('dart2js:noInline')
+_test2(f) => f is A<C2 Function()>;
+
+/*class: B3:checkedTypeArgument,checks=[],typeArgument*/
+class B3<T> {}
+
+/*class: C3:checkedTypeArgument,checks=[$asB3],typeArgument*/
+class C3 extends B3<int> {}
+
+@pragma('dart2js:noInline')
+test3() {
+  Expect.isFalse(_test3(new A<void Function(C3)>()));
+  Expect.isTrue(_test3(new A<void Function(B3<int>)>()));
+  Expect.isFalse(_test3(new A<void Function(B3<String>)>()));
+}
+
+@pragma('dart2js:noInline')
+_test3(f) => f is A<void Function(B3<int>)>;
+
+/*class: B4:checkedTypeArgument,checks=[],typeArgument*/
+class B4<T> {}
+
+/*class: C4:checks=[$asB4],typeArgument*/
+class C4 extends B4<int> {}
+
+@pragma('dart4js:noInline')
+test4() {
+  Expect.isTrue(_test4(new A<C4 Function()>()));
+  Expect.isTrue(_test4(new A<B4<int> Function()>()));
+  Expect.isFalse(_test4(new A<B4<String> Function()>()));
+}
+
+@pragma('dart4js:noInline')
+_test4(f) => f is A<B4<int> Function()>;
+
+/*class: B5:checkedTypeArgument,checks=[],typeArgument*/
+class B5<T> {}
+
+/*class: C5:checkedTypeArgument,checks=[$asB5],typeArgument*/
+class C5 extends B5<int> {}
+
+@pragma('dart2js:noInline')
+test5() {
+  Expect.isTrue(_test5(new A<void Function(C5 Function())>()));
+  Expect.isTrue(_test5(new A<void Function(B5<int> Function())>()));
+  Expect.isFalse(_test5(new A<void Function(B5<String> Function())>()));
+}
+
+@pragma('dart2js:noInline')
+_test5(f) => f is A<void Function(C5 Function())>;
+
+/*class: B6:checks=[],typeArgument*/
+class B6<T> {}
+
+/*class: C6:checkedTypeArgument,checks=[],typeArgument*/
+class C6 extends B6<int> {}
+
+@pragma('dart2js:noInline')
+test6() {
+  Expect.isTrue(_test6(new A<void Function(void Function(C6))>()));
+  Expect.isFalse(_test6(new A<void Function(void Function(B6<int>))>()));
+  Expect.isFalse(_test6(new A<void Function(void Function(B6<String>))>()));
+}
+
+@pragma('dart2js:noInline')
+_test6(f) => f is A<void Function(void Function(C6))>;
diff --git a/tests/compiler/dart2js/rti/emission/future_or.dart b/tests/compiler/dart2js/rti/emission/future_or.dart
index e7a0cf8..4e5bf95 100644
--- a/tests/compiler/dart2js/rti/emission/future_or.dart
+++ b/tests/compiler/dart2js/rti/emission/future_or.dart
@@ -37,7 +37,7 @@
   Future<S> then<S>(FutureOr<S> onValue(T value), {Function onError}) => null;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o is FutureOr<A>;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/future_or_as_type_argument.dart b/tests/compiler/dart2js/rti/emission/future_or_as_type_argument.dart
index c1ca45b..402f2bc 100644
--- a/tests/compiler/dart2js/rti/emission/future_or_as_type_argument.dart
+++ b/tests/compiler/dart2js/rti/emission/future_or_as_type_argument.dart
@@ -3,7 +3,6 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'dart:async';
-import 'package:expect/expect.dart';
 
 /*class: global#Future:checks=[],typeArgument*/
 
@@ -16,7 +15,7 @@
 /*class: C:checks=[],typeArgument*/
 class C {}
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o as A<FutureOr<B>>;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/future_or_future_or.dart b/tests/compiler/dart2js/rti/emission/future_or_future_or.dart
index c667d0d..dfd18b3 100644
--- a/tests/compiler/dart2js/rti/emission/future_or_future_or.dart
+++ b/tests/compiler/dart2js/rti/emission/future_or_future_or.dart
@@ -13,7 +13,7 @@
 /*class: B:checks=[],instance*/
 class B {}
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o is FutureOr<FutureOr<A>>;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/future_or_future_or_generic.dart b/tests/compiler/dart2js/rti/emission/future_or_future_or_generic.dart
index 41a9baf..5a6b425 100644
--- a/tests/compiler/dart2js/rti/emission/future_or_future_or_generic.dart
+++ b/tests/compiler/dart2js/rti/emission/future_or_future_or_generic.dart
@@ -9,7 +9,7 @@
 
 /*class: A:checks=[],instance*/
 class A<T> {
-  @NoInline()
+  @pragma('dart2js:noInline')
   m(o) => o is FutureOr<B<T>>;
 }
 
diff --git a/tests/compiler/dart2js/rti/emission/future_or_generic.dart b/tests/compiler/dart2js/rti/emission/future_or_generic.dart
index 114f59e..b97e5e2 100644
--- a/tests/compiler/dart2js/rti/emission/future_or_generic.dart
+++ b/tests/compiler/dart2js/rti/emission/future_or_generic.dart
@@ -9,7 +9,7 @@
 
 /*class: A:checks=[],instance*/
 class A<T> {
-  @NoInline()
+  @pragma('dart2js:noInline')
   m(o) => o is FutureOr<T>;
 }
 
diff --git a/tests/compiler/dart2js/rti/emission/future_or_generic2.dart b/tests/compiler/dart2js/rti/emission/future_or_generic2.dart
index efbac15..68eca4a 100644
--- a/tests/compiler/dart2js/rti/emission/future_or_generic2.dart
+++ b/tests/compiler/dart2js/rti/emission/future_or_generic2.dart
@@ -9,7 +9,7 @@
 
 /*class: A:checks=[],instance*/
 class A<T> {
-  @NoInline()
+  @pragma('dart2js:noInline')
   m(o) => o is FutureOr<B<T>>;
 }
 
diff --git a/tests/compiler/dart2js/rti/emission/future_or_type_argument.dart b/tests/compiler/dart2js/rti/emission/future_or_type_argument.dart
index ac9a440..374a758 100644
--- a/tests/compiler/dart2js/rti/emission/future_or_type_argument.dart
+++ b/tests/compiler/dart2js/rti/emission/future_or_type_argument.dart
@@ -16,7 +16,7 @@
 /*class: C:checks=[],typeArgument*/
 class C {}
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o is A<FutureOr<B>>;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/generic_instanceof4.dart b/tests/compiler/dart2js/rti/emission/generic_instanceof4.dart
index 46cc720..6d2b263 100644
--- a/tests/compiler/dart2js/rti/emission/generic_instanceof4.dart
+++ b/tests/compiler/dart2js/rti/emission/generic_instanceof4.dart
@@ -2,11 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:meta/dart2js.dart';
-
 /*class: A:checks=[],instance*/
 class A<T> {
-  @noInline
+  @pragma('dart2js:noInline')
   foo(x) {
     return x is T;
   }
@@ -17,7 +15,7 @@
 
 /*class: B:checks=[$isBB],instance*/
 class B<T> implements BB {
-  @noInline
+  @pragma('dart2js:noInline')
   foo() {
     return new A<T>().foo(new B());
   }
diff --git a/tests/compiler/dart2js/rti/emission/generic_methods_dynamic_02.dart b/tests/compiler/dart2js/rti/emission/generic_methods_dynamic_02.dart
index e091714..947dcca 100644
--- a/tests/compiler/dart2js/rti/emission/generic_methods_dynamic_02.dart
+++ b/tests/compiler/dart2js/rti/emission/generic_methods_dynamic_02.dart
@@ -20,6 +20,7 @@
   List<T> bar<T>(Iterable<T> t) => <T>[t.first];
 }
 
+@pragma('dart2js:disableFinal')
 main() {
   B b = new B();
   C c = new C();
diff --git a/tests/compiler/dart2js/rti/emission/inherited_is.dart b/tests/compiler/dart2js/rti/emission/inherited_is.dart
index 1472e8a..e240c7d 100644
--- a/tests/compiler/dart2js/rti/emission/inherited_is.dart
+++ b/tests/compiler/dart2js/rti/emission/inherited_is.dart
@@ -3,7 +3,6 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:expect/expect.dart';
-import 'package:meta/dart2js.dart';
 
 /*class: A:checkedInstance*/
 class A {}
@@ -17,7 +16,7 @@
 /*class: D:checks=[],instance*/
 class D extends C {}
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is A;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/inherited_is2.dart b/tests/compiler/dart2js/rti/emission/inherited_is2.dart
index 93e5330..95c1993 100644
--- a/tests/compiler/dart2js/rti/emission/inherited_is2.dart
+++ b/tests/compiler/dart2js/rti/emission/inherited_is2.dart
@@ -3,7 +3,6 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:expect/expect.dart';
-import 'package:meta/dart2js.dart';
 
 /*class: A:checkedInstance*/
 class A {}
@@ -17,7 +16,7 @@
 /*class: D:checks=[],instance*/
 class D extends C {}
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is A;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/jsinterop.dart b/tests/compiler/dart2js/rti/emission/jsinterop.dart
index 97b0ca6..b677aba 100644
--- a/tests/compiler/dart2js/rti/emission/jsinterop.dart
+++ b/tests/compiler/dart2js/rti/emission/jsinterop.dart
@@ -8,7 +8,6 @@
 /*class: global#JavaScriptObject:checks=[$isA,$isC],instance*/
 
 import 'package:js/js.dart';
-import 'package:expect/expect.dart';
 
 /*class: A:checkedInstance,checks=[],instance*/
 @JS()
@@ -46,7 +45,7 @@
   F();
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o is A || o is C || o is E;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/list.dart b/tests/compiler/dart2js/rti/emission/list.dart
index fa99c20..fbe0937 100644
--- a/tests/compiler/dart2js/rti/emission/list.dart
+++ b/tests/compiler/dart2js/rti/emission/list.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 'package:meta/dart2js.dart';
-
 /*strong.class: global#JSArray:checkedInstance,checks=[$isIterable,$isList],instance*/
 /*omit.class: global#JSArray:checkedInstance,checks=[$isIterable],instance*/
 
@@ -17,7 +15,7 @@
 /*omit.class: B:checks=[],typeArgument*/
 class B {}
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is Iterable<A>;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/local_function_list_literal.dart b/tests/compiler/dart2js/rti/emission/local_function_list_literal.dart
index e4ded08..c62e2c8 100644
--- a/tests/compiler/dart2js/rti/emission/local_function_list_literal.dart
+++ b/tests/compiler/dart2js/rti/emission/local_function_list_literal.dart
@@ -7,12 +7,12 @@
 /*strong.class: global#JSArray:checkedInstance,checks=[$isIterable,$isList],instance*/
 /*omit.class: global#JSArray:checkedInstance,checks=[$isList],instance*/
 
-@NoInline()
+@pragma('dart2js:noInline')
 method<T>() {
   return /*checks=[],instance*/ () => <T>[];
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o is List<int>;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/local_function_map_literal.dart b/tests/compiler/dart2js/rti/emission/local_function_map_literal.dart
index fefa55b..080f72b 100644
--- a/tests/compiler/dart2js/rti/emission/local_function_map_literal.dart
+++ b/tests/compiler/dart2js/rti/emission/local_function_map_literal.dart
@@ -6,14 +6,14 @@
 
 /*class: global#JsLinkedHashMap:checks=[],instance*/
 
-@NoInline()
+@pragma('dart2js:noInline')
 method<T>() {
   return
       /*checks=[],instance*/
       () => <T, int>{};
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o is Map<int, int>;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/mixin_mixin4.dart b/tests/compiler/dart2js/rti/emission/mixin_mixin4.dart
index 4b56c06..1b9f2bf 100644
--- a/tests/compiler/dart2js/rti/emission/mixin_mixin4.dart
+++ b/tests/compiler/dart2js/rti/emission/mixin_mixin4.dart
@@ -26,7 +26,7 @@
 /*class: C:checks=[$asA,$asI,$asJ,$asM,$asS,$isA,$isI,$isJ],instance*/
 class C<T, K> = S<T> with A<T, List<K>> implements J<K>;
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(c) {
   Expect.equals("Map<int, List<bool>>", c.t().toString());
   Expect.isTrue(c is I<List<bool>>);
diff --git a/tests/compiler/dart2js/rti/emission/mixin_subtype.dart b/tests/compiler/dart2js/rti/emission/mixin_subtype.dart
index 57bbcd0..fbc9b85 100644
--- a/tests/compiler/dart2js/rti/emission/mixin_subtype.dart
+++ b/tests/compiler/dart2js/rti/emission/mixin_subtype.dart
@@ -80,7 +80,7 @@
 /*class: GD:checkedInstance,checks=[$asGI,$asGJ,$isGI,$isGJ,$isGM],typeArgument*/
 class GD<T> = GC<T> with GM<T>;
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) {}
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/mixin_type_arguments.dart b/tests/compiler/dart2js/rti/emission/mixin_type_arguments.dart
index cc6f668..9644a40 100644
--- a/tests/compiler/dart2js/rti/emission/mixin_type_arguments.dart
+++ b/tests/compiler/dart2js/rti/emission/mixin_type_arguments.dart
@@ -4,19 +4,19 @@
 
 import 'package:expect/expect.dart' show Expect;
 
-/*class: A:checks=[]*/
+/*class: A:checks=[],typeArgument*/
 class A {}
 
-/*class: B:checks=[]*/
+/*class: B:checks=[],typeArgument*/
 class B {}
 
-/*class: C:checks=[]*/
+/*class: C:checks=[],typeArgument*/
 class C {}
 
-/*class: D:checks=[]*/
+/*class: D:checks=[],typeArgument*/
 class D {}
 
-/*class: E:checks=[]*/
+/*class: E:checks=[],typeArgument*/
 class E {}
 
 /*class: F:checks=[],typeArgument*/
diff --git a/tests/compiler/dart2js/rti/emission/native.dart b/tests/compiler/dart2js/rti/emission/native.dart
index edcf75a..02698ba 100644
--- a/tests/compiler/dart2js/rti/emission/native.dart
+++ b/tests/compiler/dart2js/rti/emission/native.dart
@@ -16,13 +16,13 @@
 @Native('QQQQ')
 class Q {}
 
-@NoInline()
+@pragma('dart2js:noInline')
 makeP() => JS('returns:;creates:Purple', 'null');
 
-@NoInline()
+@pragma('dart2js:noInline')
 makeQ() => JS('Q', 'null');
 
-@NoInline()
+@pragma('dart2js:noInline')
 testNative() {
   var x = makeP();
   Expect.isTrue(x is Purple);
diff --git a/tests/compiler/dart2js/rti/emission/regress_18713.dart b/tests/compiler/dart2js/rti/emission/regress_18713.dart
index 9b7ac50..53b012a 100644
--- a/tests/compiler/dart2js/rti/emission/regress_18713.dart
+++ b/tests/compiler/dart2js/rti/emission/regress_18713.dart
@@ -19,8 +19,8 @@
 /*class: TS:checks=[$asS0,$asT],instance*/
 class TS<A, B> = T<A> with S<B>;
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 dyn(x) => x;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/replaced_type_variable.dart b/tests/compiler/dart2js/rti/emission/replaced_type_variable.dart
index 5b22b5f..091258b 100644
--- a/tests/compiler/dart2js/rti/emission/replaced_type_variable.dart
+++ b/tests/compiler/dart2js/rti/emission/replaced_type_variable.dart
@@ -15,7 +15,7 @@
 /*class: A:checks=[],typeArgument*/
 class A {}
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => Expect.notEquals('dynamic', '$o');
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/self.dart b/tests/compiler/dart2js/rti/emission/self.dart
index 2777989..7c91d8d 100644
--- a/tests/compiler/dart2js/rti/emission/self.dart
+++ b/tests/compiler/dart2js/rti/emission/self.dart
@@ -2,12 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:meta/dart2js.dart';
-
 /*class: C:checkedInstance,checks=[],instance,typeLiteral*/
 class C {}
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is C;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/self_generic.dart b/tests/compiler/dart2js/rti/emission/self_generic.dart
index ca5bc11..0d45939 100644
--- a/tests/compiler/dart2js/rti/emission/self_generic.dart
+++ b/tests/compiler/dart2js/rti/emission/self_generic.dart
@@ -2,12 +2,10 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:meta/dart2js.dart';
-
 /*class: C:checkedInstance,checks=[],instance*/
 class C<T> {}
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is C<String>;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/static_argument.dart b/tests/compiler/dart2js/rti/emission/static_argument.dart
index 4df0ab4..0e738ce 100644
--- a/tests/compiler/dart2js/rti/emission/static_argument.dart
+++ b/tests/compiler/dart2js/rti/emission/static_argument.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 'package:meta/dart2js.dart';
-
 /*strong.class: I1:checkedInstance*/
 /*omit.class: I1:*/
 class I1 {}
@@ -22,10 +20,10 @@
 /*omit.class: B:checks=[$isI2],instance*/
 class B implements I1, I2 {}
 
-@noInline
+@pragma('dart2js:noInline')
 void foo(I1 x) {}
 
-@noInline
+@pragma('dart2js:noInline')
 void bar(I2 x) {}
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/superclass.dart b/tests/compiler/dart2js/rti/emission/superclass.dart
index 8c70ab7..d383f65 100644
--- a/tests/compiler/dart2js/rti/emission/superclass.dart
+++ b/tests/compiler/dart2js/rti/emission/superclass.dart
@@ -2,15 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:meta/dart2js.dart';
-
 /*class: B:checkedInstance,checks=[],indirectInstance,typeLiteral*/
 class B {}
 
 /*class: C:checks=[],instance*/
 class C extends B {}
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is B;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/superclass_as.dart b/tests/compiler/dart2js/rti/emission/superclass_as.dart
index 5f9a9e1..d9685dd 100644
--- a/tests/compiler/dart2js/rti/emission/superclass_as.dart
+++ b/tests/compiler/dart2js/rti/emission/superclass_as.dart
@@ -3,21 +3,20 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:expect/expect.dart';
-import 'package:meta/dart2js.dart';
 
 /*class: A:checkedInstance,checks=[],instance*/
 class A<T> {}
 
 /*class: B:checks=[],indirectInstance*/
 class B<T, S> {
-  @noInline
+  @pragma('dart2js:noInline')
   method() => new A<S>();
 }
 
 /*class: C:checks=[$asB],instance*/
 class C<T> extends B<T, T> {}
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is A<int>;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/superclass_complex.dart b/tests/compiler/dart2js/rti/emission/superclass_complex.dart
index 5b7fa34..37c4e22 100644
--- a/tests/compiler/dart2js/rti/emission/superclass_complex.dart
+++ b/tests/compiler/dart2js/rti/emission/superclass_complex.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 'package:meta/dart2js.dart';
-
 /*class: A:checkedTypeArgument,checks=[],typeArgument*/
 class A<T> {}
 
@@ -13,7 +11,7 @@
 /*class: C:checks=[$asB],instance*/
 class C<T> extends B<A<T>> {}
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is B<A<String>>;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/superclass_fixed.dart b/tests/compiler/dart2js/rti/emission/superclass_fixed.dart
index bc445f7..2330a1e 100644
--- a/tests/compiler/dart2js/rti/emission/superclass_fixed.dart
+++ b/tests/compiler/dart2js/rti/emission/superclass_fixed.dart
@@ -2,15 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:meta/dart2js.dart';
-
 /*class: B:checkedInstance,checks=[],indirectInstance*/
 class B<T> {}
 
 /*class: C:checks=[$asB],instance*/
 class C extends B<String> {}
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is B<String>;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/superclass_supertype.dart b/tests/compiler/dart2js/rti/emission/superclass_supertype.dart
index 614192e..c9ffe06 100644
--- a/tests/compiler/dart2js/rti/emission/superclass_supertype.dart
+++ b/tests/compiler/dart2js/rti/emission/superclass_supertype.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 'package:meta/dart2js.dart';
-
 /*class: A:checks=[],indirectInstance*/
 class A {}
 
@@ -13,7 +11,7 @@
 /*class: C:checks=[$isB],instance*/
 class C extends A implements B {}
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is B;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/superclass_supertype_complex.dart b/tests/compiler/dart2js/rti/emission/superclass_supertype_complex.dart
index 32201f8..2a6c7f4 100644
--- a/tests/compiler/dart2js/rti/emission/superclass_supertype_complex.dart
+++ b/tests/compiler/dart2js/rti/emission/superclass_supertype_complex.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 'package:meta/dart2js.dart';
-
 /*class: A:checkedTypeArgument,checks=[],typeArgument*/
 class A<T> {}
 
@@ -16,7 +14,7 @@
 /*class: D:checks=[$asB,$isB],instance*/
 class D<T> extends C<T> implements B<A<T>> {}
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is B<A<String>>;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/superclass_supertype_fixed.dart b/tests/compiler/dart2js/rti/emission/superclass_supertype_fixed.dart
index 2408c8c..7c660cc 100644
--- a/tests/compiler/dart2js/rti/emission/superclass_supertype_fixed.dart
+++ b/tests/compiler/dart2js/rti/emission/superclass_supertype_fixed.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 'package:meta/dart2js.dart';
-
 /*class: A:checks=[],indirectInstance*/
 class A {}
 
@@ -13,7 +11,7 @@
 /*class: C:checks=[$asB,$isB],instance*/
 class C extends A implements B<String> {}
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is B<String>;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/superclass_supertype_trivial.dart b/tests/compiler/dart2js/rti/emission/superclass_supertype_trivial.dart
index 8a7e8fd..9affb57 100644
--- a/tests/compiler/dart2js/rti/emission/superclass_supertype_trivial.dart
+++ b/tests/compiler/dart2js/rti/emission/superclass_supertype_trivial.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 'package:meta/dart2js.dart';
-
 /*class: A:checks=[],indirectInstance*/
 class A<T> {}
 
@@ -13,7 +11,7 @@
 /*class: C:checks=[$isB],instance*/
 class C<T> extends A<T> implements B<T> {}
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is B<String>;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/superclass_trivial.dart b/tests/compiler/dart2js/rti/emission/superclass_trivial.dart
index a9a6ec8..d89f74f 100644
--- a/tests/compiler/dart2js/rti/emission/superclass_trivial.dart
+++ b/tests/compiler/dart2js/rti/emission/superclass_trivial.dart
@@ -2,15 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:meta/dart2js.dart';
-
 /*class: B:checkedInstance,checks=[],indirectInstance*/
 class B<T> {}
 
 /*class: C:checks=[],instance*/
 class C<T> extends B<T> {}
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is B<String>;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/superclasses_non_trivial.dart b/tests/compiler/dart2js/rti/emission/superclasses_non_trivial.dart
index 2f6ccb0..5105e9c 100644
--- a/tests/compiler/dart2js/rti/emission/superclasses_non_trivial.dart
+++ b/tests/compiler/dart2js/rti/emission/superclasses_non_trivial.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 'package:meta/dart2js.dart';
-
 /*class: A:checkedInstance,checks=[],indirectInstance*/
 class A<T> {}
 
@@ -13,7 +11,7 @@
 /*class: C:checks=[],instance*/
 class C<S, T> extends B<S, T> {} // Non-trivial substitution of A
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is A<String>;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/superclasses_trivial.dart b/tests/compiler/dart2js/rti/emission/superclasses_trivial.dart
index 5023aad..da3622c 100644
--- a/tests/compiler/dart2js/rti/emission/superclasses_trivial.dart
+++ b/tests/compiler/dart2js/rti/emission/superclasses_trivial.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 'package:meta/dart2js.dart';
-
 /*class: A:checkedInstance,checks=[],indirectInstance*/
 class A<T> {}
 
@@ -13,7 +11,7 @@
 /*class: C:checks=[$asA,$asB],instance*/
 class C<T> extends B<T, T> {} // Trivial substitution of A
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is A<String>;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/supertype.dart b/tests/compiler/dart2js/rti/emission/supertype.dart
index 92bae3f..9eb815b 100644
--- a/tests/compiler/dart2js/rti/emission/supertype.dart
+++ b/tests/compiler/dart2js/rti/emission/supertype.dart
@@ -2,15 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:meta/dart2js.dart';
-
 /*class: B:checkedInstance*/
 class B {}
 
 /*class: C:checks=[$isB],instance*/
 class C implements B {}
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is B;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/supertype_complex.dart b/tests/compiler/dart2js/rti/emission/supertype_complex.dart
index 5ca3b0f..34104d8 100644
--- a/tests/compiler/dart2js/rti/emission/supertype_complex.dart
+++ b/tests/compiler/dart2js/rti/emission/supertype_complex.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 'package:meta/dart2js.dart';
-
 /*class: A:checkedTypeArgument,checks=[],typeArgument*/
 class A<T> {}
 
@@ -13,7 +11,7 @@
 /*class: C:checks=[$asB,$isB],instance*/
 class C<T> implements B<A<T>> {}
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is B<A<String>>;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/supertype_fixed.dart b/tests/compiler/dart2js/rti/emission/supertype_fixed.dart
index 2b14e4c..8866c90 100644
--- a/tests/compiler/dart2js/rti/emission/supertype_fixed.dart
+++ b/tests/compiler/dart2js/rti/emission/supertype_fixed.dart
@@ -2,15 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:meta/dart2js.dart';
-
 /*class: B:checkedInstance*/
 class B<T> {}
 
 /*class: C:checks=[$asB,$isB],instance*/
 class C implements B<String> {}
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is B<String>;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/supertype_trivial.dart b/tests/compiler/dart2js/rti/emission/supertype_trivial.dart
index 40f9e29..6f44e13 100644
--- a/tests/compiler/dart2js/rti/emission/supertype_trivial.dart
+++ b/tests/compiler/dart2js/rti/emission/supertype_trivial.dart
@@ -2,15 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:meta/dart2js.dart';
-
 /*class: B:checkedInstance*/
 class B<T> {}
 
 /*class: C:checks=[$isB],instance*/
 class C<T> implements B<T> {}
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is B<String>;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/supertypes_extends.dart b/tests/compiler/dart2js/rti/emission/supertypes_extends.dart
index f00142c..2629ef4 100644
--- a/tests/compiler/dart2js/rti/emission/supertypes_extends.dart
+++ b/tests/compiler/dart2js/rti/emission/supertypes_extends.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 'package:meta/dart2js.dart';
-
 /*class: A:checkedInstance*/
 class A {}
 
@@ -13,7 +11,7 @@
 /*class: C:checks=[],instance*/
 class C extends B {} // Implements A through `extends B`.
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is A;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/supertypes_extends2.dart b/tests/compiler/dart2js/rti/emission/supertypes_extends2.dart
index dc3de4e..0c59cc3 100644
--- a/tests/compiler/dart2js/rti/emission/supertypes_extends2.dart
+++ b/tests/compiler/dart2js/rti/emission/supertypes_extends2.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 'package:meta/dart2js.dart';
-
 /*class: A:checkedInstance*/
 class A {}
 
@@ -13,7 +11,7 @@
 /*class: C:checks=[],instance*/
 class C extends B {} // Implements A through `extends B`.
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is A;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/supertypes_extends3.dart b/tests/compiler/dart2js/rti/emission/supertypes_extends3.dart
index 4f56646..77dc0cb 100644
--- a/tests/compiler/dart2js/rti/emission/supertypes_extends3.dart
+++ b/tests/compiler/dart2js/rti/emission/supertypes_extends3.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 'package:meta/dart2js.dart';
-
 /*class: A:checkedInstance*/
 class A {}
 
@@ -16,7 +14,7 @@
 /*class: D:checks=[],instance*/
 class D extends C {} // Implements A through `extends C`.
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is A;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/supertypes_implements.dart b/tests/compiler/dart2js/rti/emission/supertypes_implements.dart
index c5a92b4..f481105 100644
--- a/tests/compiler/dart2js/rti/emission/supertypes_implements.dart
+++ b/tests/compiler/dart2js/rti/emission/supertypes_implements.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 'package:meta/dart2js.dart';
-
 /*class: A:checkedInstance*/
 class A {}
 
@@ -13,7 +11,7 @@
 /*class: C:checks=[$isA],instance*/
 class C implements B {} // Implements A through `implements B`.
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is A;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/supertypes_non_trivial.dart b/tests/compiler/dart2js/rti/emission/supertypes_non_trivial.dart
index c7be77c..ad90ae4 100644
--- a/tests/compiler/dart2js/rti/emission/supertypes_non_trivial.dart
+++ b/tests/compiler/dart2js/rti/emission/supertypes_non_trivial.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 'package:meta/dart2js.dart';
-
 /*class: A:checkedInstance,checks=[],indirectInstance*/
 class A<T> {}
 
@@ -13,7 +11,7 @@
 /*class: C:checks=[$asA,$isA],instance*/
 class C<S, T> implements B<S, T> {} // Non-trivial substitution of A
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is A<String>;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/supertypes_trivial.dart b/tests/compiler/dart2js/rti/emission/supertypes_trivial.dart
index 2a5e744..31ac65a 100644
--- a/tests/compiler/dart2js/rti/emission/supertypes_trivial.dart
+++ b/tests/compiler/dart2js/rti/emission/supertypes_trivial.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 'package:meta/dart2js.dart';
-
 /*class: A:checkedInstance,checks=[],indirectInstance*/
 class A<T> {}
 
@@ -13,7 +11,7 @@
 /*class: C:checks=[$isA],instance*/
 class C<T> implements B<T, T> {} // Trivial substitution of A
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is A<String>;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/tear_off_types.dart b/tests/compiler/dart2js/rti/emission/tear_off_types.dart
new file mode 100644
index 0000000..86d41eb
--- /dev/null
+++ b/tests/compiler/dart2js/rti/emission/tear_off_types.dart
@@ -0,0 +1,159 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:expect/expect.dart';
+
+main() {
+  test1();
+  test2();
+  test3();
+  test4();
+  test5();
+  test6();
+  test7();
+}
+
+/*class: A1:checkedTypeArgument,checks=[],typeArgument*/
+class A1<T> {}
+
+/*class: B1:checks=[$asA1],typeArgument*/
+class B1 extends A1<int> {}
+
+@pragma('dart2js:noInline')
+test1() {
+  Expect.isTrue(_test1(method1a));
+  Expect.isTrue(_test1(method1b));
+  Expect.isFalse(_test1(method1c));
+}
+
+B1 method1a() => null;
+A1<int> method1b() => null;
+A1<String> method1c() => null;
+
+@pragma('dart2js:noInline')
+bool _test1(f) => f is A1<int> Function();
+
+/*strong.class: A2:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
+/*omit.class: A2:checkedTypeArgument,checks=[],typeArgument*/
+class A2<T> {}
+
+/*strong.class: B2:checkedInstance,checkedTypeArgument,checks=[$asA2],typeArgument*/
+/*omit.class: B2:checkedTypeArgument,checks=[$asA2],typeArgument*/
+class B2 extends A2<int> {}
+
+@pragma('dart2js:noInline')
+test2() {
+  Expect.isFalse(_test2(method2a));
+  Expect.isTrue(_test2(method2b));
+  Expect.isFalse(_test2(method2c));
+}
+
+void method2a(B2 b) {}
+void method2b(A2<int> a) {}
+void method2c(A2<String> a) {}
+
+@pragma('dart2js:noInline')
+bool _test2(f) => f is void Function(A2<int>);
+
+/*strong.class: A3:checkedInstance,checkedTypeArgument,checks=[],typeArgument*/
+/*omit.class: A3:checkedTypeArgument,checks=[],typeArgument*/
+class A3<T> {}
+
+/*strong.class: B3:checkedInstance,checkedTypeArgument,checks=[$asA3],typeArgument*/
+/*omit.class: B3:checkedTypeArgument,checks=[$asA3],typeArgument*/
+class B3 extends A3<int> {}
+
+@pragma('dart3js:noInline')
+test3() {
+  Expect.isTrue(_test3(method3a));
+  Expect.isTrue(_test3(method3b));
+  Expect.isFalse(_test3(method3c));
+}
+
+void method3a(B3 b) {}
+void method3b(A3<int> a) {}
+void method3c(A3<String> a) {}
+
+@pragma('dart3js:noInline')
+_test3(f) => f is void Function(B3);
+
+/*class: A4:checks=[],typeArgument*/
+class A4<T> {}
+
+/*class: B4:checkedTypeArgument,checks=[],typeArgument*/
+class B4 extends A4<int> {}
+
+@pragma('dart4js:noInline')
+test4() {
+  Expect.isTrue(_test4(method4a));
+  Expect.isFalse(_test4(method4b));
+  Expect.isFalse(_test4(method4c));
+}
+
+B4 method4a() => null;
+A4<int> method4b() => null;
+A4<String> method4c() => null;
+
+@pragma('dart4js:noInline')
+_test4(f) => f is B4 Function();
+
+/*class: A5:checkedTypeArgument,checks=[],typeArgument*/
+class A5<T> {}
+
+/*class: B5:checks=[$asA5],typeArgument*/
+class B5 extends A5<int> {}
+
+@pragma('dart2js:noInline')
+test5() {
+  Expect.isTrue(_test5(method5a));
+  Expect.isTrue(_test5(method5b));
+  Expect.isFalse(_test5(method5c));
+}
+
+void method5a(void Function(B5) f) => null;
+void method5b(void Function(A5<int>) f) => null;
+void method5c(void Function(A5<String>) f) => null;
+
+@pragma('dart2js:noInline')
+bool _test5(f) => f is void Function(void Function(A5<int>));
+
+/*class: A6:checkedTypeArgument,checks=[],typeArgument*/
+class A6<T> {}
+
+/*class: B6:checkedTypeArgument,checks=[$asA6],typeArgument*/
+class B6 extends A6<int> {}
+
+@pragma('dart6js:noInline')
+test6() {
+  Expect.isTrue(_test6(method6a));
+  Expect.isTrue(_test6(method6b));
+  Expect.isFalse(_test6(method6c));
+}
+
+void Function(B6) method6a() => null;
+void Function(A6<int>) method6b() => null;
+void Function(A6<String>) method6c() => null;
+
+@pragma('dart6js:noInline')
+_test6(f) => f is void Function(B6) Function();
+
+/*class: A7:checks=[],typeArgument*/
+class A7<T> {}
+
+/*class: B7:checkedTypeArgument,checks=[],typeArgument*/
+class B7 extends A7<int> {}
+
+@pragma('dart7js:noInline')
+test7() {
+  Expect.isTrue(_test7(method7a));
+  Expect.isFalse(_test7(method7b));
+  Expect.isFalse(_test7(method7c));
+}
+
+void method7a(void Function(B7) f) => null;
+void method7b(void Function(A7<int>) f) => null;
+void method7c(void Function(A7<String>) f) => null;
+
+@pragma('dart7js:noInline')
+_test7(f) => f is void Function(void Function(B7));
diff --git a/tests/compiler/dart2js/rti/emission/type_argument_dynamic.dart b/tests/compiler/dart2js/rti/emission/type_argument_dynamic.dart
index a3d12e2..1d38ef6 100644
--- a/tests/compiler/dart2js/rti/emission/type_argument_dynamic.dart
+++ b/tests/compiler/dart2js/rti/emission/type_argument_dynamic.dart
@@ -3,7 +3,6 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:expect/expect.dart';
-import 'package:meta/dart2js.dart';
 
 /*class: A:checkedTypeArgument,checks=[],typeArgument*/
 class A {}
@@ -19,17 +18,17 @@
 
 /*class: E:checks=[],instance*/
 class E {
-  @noInline
+  @pragma('dart2js:noInline')
   m<T>() => new C<T>();
 }
 
 /*class: F:checks=[],instance*/
 class F {
-  @noInline
+  @pragma('dart2js:noInline')
   m<T>() => false;
 }
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is C<A>;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/emission/type_argument_static.dart b/tests/compiler/dart2js/rti/emission/type_argument_static.dart
index 05ba49e..f1c6b64 100644
--- a/tests/compiler/dart2js/rti/emission/type_argument_static.dart
+++ b/tests/compiler/dart2js/rti/emission/type_argument_static.dart
@@ -3,7 +3,6 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:expect/expect.dart';
-import 'package:meta/dart2js.dart';
 
 /*class: A:checkedTypeArgument,checks=[],typeArgument*/
 class A {}
@@ -17,10 +16,10 @@
 /*class: D:checks=[],typeArgument*/
 class D {}
 
-@noInline
+@pragma('dart2js:noInline')
 m<T>() => new C<T>();
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is C<A>;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/factory_call_test.dart b/tests/compiler/dart2js/rti/factory_call_test.dart
index 9430101..5526cc0 100644
--- a/tests/compiler/dart2js/rti/factory_call_test.dart
+++ b/tests/compiler/dart2js/rti/factory_call_test.dart
@@ -15,20 +15,18 @@
 import '../helpers/memory_compiler.dart';
 
 const String code = '''
-import 'package:meta/dart2js.dart';
-
 class A<T> {
   final field;
 
-  @noInline
+  @pragma('dart2js:noInline')
   factory A.fact(t) => new A(t);
 
-  @noInline
+  @pragma('dart2js:noInline')
   A(t) : field = t is T;
 }
 
 // A call to A.fact.
-@noInline
+@pragma('dart2js:noInline')
 callAfact() => new A<int>.fact(0).runtimeType;
 
 main() {
diff --git a/tests/compiler/dart2js/rti/instance_call_test.dart b/tests/compiler/dart2js/rti/instance_call_test.dart
index d219c0f..3b0c102 100644
--- a/tests/compiler/dart2js/rti/instance_call_test.dart
+++ b/tests/compiler/dart2js/rti/instance_call_test.dart
@@ -19,65 +19,63 @@
 import '../helpers/memory_compiler.dart';
 
 const String code = '''
-import 'package:meta/dart2js.dart';
-
 class A {
   // Both method1 implementations need type arguments.
-  @noInline
+  @pragma('dart2js:noInline')
   method1<T>(T t) => t is T;
 
   // One of the method2 implementations need type arguments.
-  @noInline
+  @pragma('dart2js:noInline')
   method2<T>(T t) => t is T;
 
   // None of the method3 implementations need type arguments.
-  @noInline
+  @pragma('dart2js:noInline')
   method3<T>(T t) => false;
 }
 
 class B {
-  @noInline
+  @pragma('dart2js:noInline')
   method1<T>(T t) => t is T;
-  @noInline
+  @pragma('dart2js:noInline')
   method2<T>(T t) => true;
-  @noInline
+  @pragma('dart2js:noInline')
   method3<T>(T t) => true;
 }
 
 // A call to either A.method1 or B.method1.
-@noInline
+@pragma('dart2js:noInline')
 call1(c) => c.method1<int>(0);
 
 // A call to A.method1.
-@noInline
+@pragma('dart2js:noInline')
 call1a() => new A().method1<int>(0);
 
 // A call to B.method1.
-@noInline
+@pragma('dart2js:noInline')
 call1b() => new B().method1<int>(0);
 
 // A call to either A.method2 or B.method2.
-@noInline
+@pragma('dart2js:noInline')
 call2(c) => c.method2<int>(0);
 
 // A call to A.method2.
-@noInline
+@pragma('dart2js:noInline')
 call2a() => new A().method2<int>(0);
 
 // A call to B.method2.
-@noInline
+@pragma('dart2js:noInline')
 call2b() => new B().method2<int>(0);
 
 // A call to either A.method3 or B.method3.
-@noInline
+@pragma('dart2js:noInline')
 call3(c) => c.method3<int>(0);
 
 // A call to A.method3.
-@noInline
+@pragma('dart2js:noInline')
 call3a() => new A().method3<int>(0);
 
 // A call to B.method3.
-@noInline
+@pragma('dart2js:noInline')
 call3b() => new B().method3<int>(0);
 
 main() {
diff --git a/tests/compiler/dart2js/rti/rti_emission_test.dart b/tests/compiler/dart2js/rti/rti_emission_test.dart
index 5b7e145..0e580ca 100644
--- a/tests/compiler/dart2js/rti/rti_emission_test.dart
+++ b/tests/compiler/dart2js/rti/rti_emission_test.dart
@@ -125,12 +125,15 @@
 
 class RtiClassEmissionIrComputer extends DataRegistry<String>
     with ComputeValueMixin {
+  @override
   final Compiler compiler;
   final JsToElementMap _elementMap;
+  @override
   final Map<Id, ActualData<String>> actualMap;
 
   RtiClassEmissionIrComputer(this.compiler, this._elementMap, this.actualMap);
 
+  @override
   DiagnosticReporter get reporter => compiler.reporter;
 
   void computeClassValue(ClassEntity cls) {
@@ -145,6 +148,7 @@
     with ComputeValueMixin {
   final JsToElementMap _elementMap;
   final ClosureData _closureDataLookup;
+  @override
   final Compiler compiler;
 
   RtiMemberEmissionIrComputer(
diff --git a/tests/compiler/dart2js/rti/rti_need_test_helper.dart b/tests/compiler/dart2js/rti/rti_need_test_helper.dart
index f601ebc..4c54942 100644
--- a/tests/compiler/dart2js/rti/rti_need_test_helper.dart
+++ b/tests/compiler/dart2js/rti/rti_need_test_helper.dart
@@ -318,12 +318,15 @@
 
 class RtiClassNeedIrComputer extends DataRegistry<String>
     with ComputeValueMixin, IrMixin {
+  @override
   final Compiler compiler;
   final JsToElementMap _elementMap;
+  @override
   final Map<Id, ActualData<String>> actualMap;
 
   RtiClassNeedIrComputer(this.compiler, this._elementMap, this.actualMap);
 
+  @override
   DiagnosticReporter get reporter => compiler.reporter;
 
   void computeClassValue(ClassEntity cls) {
@@ -339,6 +342,7 @@
     with ComputeValueMixin, IrMixin {
   final JsToElementMap _elementMap;
   final ClosureData _closureDataLookup;
+  @override
   final Compiler compiler;
 
   RtiMemberNeedIrComputer(
diff --git a/tests/compiler/dart2js/serialization/data/const_literals.dart b/tests/compiler/dart2js/serialization/data/const_literals.dart
new file mode 100644
index 0000000..fb8128a
--- /dev/null
+++ b/tests/compiler/dart2js/serialization/data/const_literals.dart
@@ -0,0 +1,18 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+main() {
+  mapConstLiteral();
+  dictionaryConstLiteral();
+  listConstLiteral();
+  setConstLiteral();
+}
+
+mapConstLiteral() => const {0: 1};
+
+dictionaryConstLiteral() => const {'foo': 'bar'};
+
+listConstLiteral() => const ['foo', 'bar'];
+
+setConstLiteral() => const {'foo', 'bar'};
diff --git a/tests/compiler/dart2js/serialization/data/jsinterop.dart b/tests/compiler/dart2js/serialization/data/jsinterop.dart
index 6996587..208b2a9 100644
--- a/tests/compiler/dart2js/serialization/data/jsinterop.dart
+++ b/tests/compiler/dart2js/serialization/data/jsinterop.dart
@@ -6,7 +6,6 @@
 library lib;
 
 import 'package:js/js.dart';
-import 'package:meta/dart2js.dart';
 
 @JS()
 @anonymous
@@ -20,7 +19,7 @@
   method();
 }
 
-@tryInline
+@pragma('dart2js:tryInline')
 method() {
   new GenericClass().setter = 42;
 }
diff --git a/tests/compiler/dart2js/serialization/serialization_test.dart b/tests/compiler/dart2js/serialization/serialization_test.dart
index 6c5a1cb..496787d 100644
--- a/tests/compiler/dart2js/serialization/serialization_test.dart
+++ b/tests/compiler/dart2js/serialization/serialization_test.dart
@@ -13,12 +13,16 @@
   asyncTest(() async {
     Directory dataDir = new Directory.fromUri(Platform.script.resolve('data'));
     Directory libDir = new Directory.fromUri(Platform.script.resolve('libs'));
+    print('--testing without CFE constants-----------------------------------');
     await checkTests(dataDir, options: [], args: args, libDirectory: libDir);
+    print('--testing with CFE constants--------------------------------------');
+    await checkTests(dataDir,
+        options: [], args: args, libDirectory: libDir, testCFEConstants: true);
   });
 }
 
 Future checkTests(Directory dataDir,
-    {bool testStrongMode: true,
+    {bool testCFEConstants: false,
     List<String> options: const <String>[],
     List<String> args: const <String>[],
     Directory libDirectory: null,
@@ -50,6 +54,10 @@
     if (shouldContinue) continued = true;
     testCount++;
     List<String> testOptions = options.toList();
+    if (testCFEConstants) {
+      testOptions
+          .add('${Flags.enableLanguageExperiments}=constant-update-2018');
+    }
     testOptions.add(Flags.dumpInfo);
     testOptions.add('--out=out.js');
     if (onTest != null) {
diff --git a/tests/compiler/dart2js/sourcemaps/helpers/colors.dart b/tests/compiler/dart2js/sourcemaps/helpers/colors.dart
index 4595382..f3d435d 100644
--- a/tests/compiler/dart2js/sourcemaps/helpers/colors.dart
+++ b/tests/compiler/dart2js/sourcemaps/helpers/colors.dart
@@ -22,6 +22,7 @@
   /// all in range 0..1.
   const RGB(this.r, this.g, this.b);
 
+  @override
   String get toCss {
     StringBuffer sb = new StringBuffer();
     sb.write('#');
@@ -41,6 +42,7 @@
     return sb.toString();
   }
 
+  @override
   String toString() => 'rgb($r,$g,$b)';
 }
 
@@ -49,6 +51,7 @@
 
   const RGBA(double r, double g, double b, this.a) : super(r, g, b);
 
+  @override
   String get toCss {
     StringBuffer sb = new StringBuffer();
 
@@ -84,6 +87,7 @@
   /// saturation [s] in range 0..1, and value [v] in range 0..1.
   const HSV(this.h, this.s, this.v);
 
+  @override
   String get toCss => toRGB(this).toCss;
 
   static RGB toRGB(HSV hsv) {
@@ -116,5 +120,6 @@
     }
   }
 
+  @override
   String toString() => 'hsv($h,$s,$v)';
 }
diff --git a/tests/compiler/dart2js/sourcemaps/helpers/diff.dart b/tests/compiler/dart2js/sourcemaps/helpers/diff.dart
index 7be8f761..012679e 100644
--- a/tests/compiler/dart2js/sourcemaps/helpers/diff.dart
+++ b/tests/compiler/dart2js/sourcemaps/helpers/diff.dart
@@ -24,14 +24,17 @@
 
   const DiffColumn(this.type, [this.index]);
 
+  @override
   int get hashCode => type.hashCode * 19 + index.hashCode * 23;
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! DiffColumn) return false;
     return type == other.type && index == other.index;
   }
 
+  @override
   String toString() => '$type${index != null ? index : ''}';
 }
 
@@ -46,6 +49,7 @@
 
   PartsColumnBlock(this.parts);
 
+  @override
   void printHtmlOn(StringBuffer htmlBuffer, HtmlPrintContext context) {
     if (parts.isNotEmpty) {
       for (HtmlPart part in parts) {
@@ -62,6 +66,7 @@
 
   CodeLinesColumnBlock(this.jsCodeLines, this.jsToDartMap);
 
+  @override
   void printHtmlOn(StringBuffer htmlBuffer, HtmlPrintContext context) {
     if (jsCodeLines.isNotEmpty) {
       htmlBuffer.write('<table style="width:100%">');
diff --git a/tests/compiler/dart2js/sourcemaps/helpers/html_parts.dart b/tests/compiler/dart2js/sourcemaps/helpers/html_parts.dart
index 77dd7cf..ad951bc 100644
--- a/tests/compiler/dart2js/sourcemaps/helpers/html_parts.dart
+++ b/tests/compiler/dart2js/sourcemaps/helpers/html_parts.dart
@@ -36,8 +36,10 @@
   const AnnotationData(
       {this.tag: 'a', this.properties: const <String, String>{}});
 
+  @override
   int get hashCode => tag.hashCode * 13 + properties.hashCode * 19;
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! AnnotationData) return false;
@@ -171,6 +173,7 @@
 
   const ConstHtmlPart(this.html);
 
+  @override
   HtmlPartKind get kind => HtmlPartKind.CONST;
 
   @override
@@ -178,6 +181,7 @@
     buffer.write(html);
   }
 
+  @override
   toJson(JsonStrategy strategy) {
     return {'kind': kind.index, 'html': html};
   }
@@ -190,8 +194,10 @@
 class NewLine implements HtmlPart {
   const NewLine();
 
+  @override
   HtmlPartKind get kind => HtmlPartKind.NEWLINE;
 
+  @override
   void printHtmlOn(StringBuffer buffer, HtmlPrintContext context) {
     if (context.usePre) {
       buffer.write('\n');
@@ -200,6 +206,7 @@
     }
   }
 
+  @override
   toJson(JsonStrategy strategy) {
     return {'kind': kind.index};
   }
@@ -210,13 +217,16 @@
 
   const HtmlText(this.text);
 
+  @override
   HtmlPartKind get kind => HtmlPartKind.TEXT;
 
+  @override
   void printHtmlOn(StringBuffer buffer, HtmlPrintContext context) {
     String escaped = escape(text);
     buffer.write(escaped);
   }
 
+  @override
   toJson(JsonStrategy strategy) {
     return {'kind': kind.index, 'text': text};
   }
@@ -235,6 +245,7 @@
       {this.properties: const <String, String>{},
       this.content: const <HtmlPart>[]});
 
+  @override
   HtmlPartKind get kind => HtmlPartKind.TAG;
 
   @override
@@ -252,6 +263,7 @@
     buffer.write('</$tag>');
   }
 
+  @override
   toJson(JsonStrategy strategy) {
     return {
       'kind': kind.index,
@@ -271,6 +283,7 @@
 class HtmlLine implements HtmlPart {
   final List<HtmlPart> htmlParts = <HtmlPart>[];
 
+  @override
   HtmlPartKind get kind => HtmlPartKind.LINE;
 
   @override
@@ -280,6 +293,7 @@
     }
   }
 
+  @override
   Map toJson(JsonStrategy strategy) {
     return {
       'kind': kind.index,
@@ -370,6 +384,7 @@
 
   LineNumber(this.lineNo, this.lineAnnotation);
 
+  @override
   HtmlPartKind get kind => HtmlPartKind.LINE_NUMBER;
 
   @override
@@ -407,6 +422,7 @@
 
   CodeLine(this.lineNo, this.offset, {this.uri});
 
+  @override
   HtmlPartKind get kind => HtmlPartKind.CODE;
 
   String get code {
@@ -432,6 +448,7 @@
     }
   }
 
+  @override
   Map toJson(JsonStrategy strategy) {
     return {
       'kind': kind.index,
diff --git a/tests/compiler/dart2js/sourcemaps/helpers/js_tracer.dart b/tests/compiler/dart2js/sourcemaps/helpers/js_tracer.dart
index bc504c76..aa234a1 100644
--- a/tests/compiler/dart2js/sourcemaps/helpers/js_tracer.dart
+++ b/tests/compiler/dart2js/sourcemaps/helpers/js_tracer.dart
@@ -33,6 +33,7 @@
 
   StepTraceListener(this.graph);
 
+  @override
   SourceInformationReader get reader => const SourceInformationReader();
 
   @override
@@ -114,6 +115,7 @@
     steppableMap[node] = step;
   }
 
+  @override
   void pushBranch(BranchKind kind, [value]) {
     var branch;
     switch (kind) {
@@ -136,6 +138,7 @@
     graph.pushBranch(branch);
   }
 
+  @override
   void popBranch() {
     graph.popBranch();
   }
diff --git a/tests/compiler/dart2js/sourcemaps/helpers/output_structure.dart b/tests/compiler/dart2js/sourcemaps/helpers/output_structure.dart
index f12212a..ddfd8c9 100644
--- a/tests/compiler/dart2js/sourcemaps/helpers/output_structure.dart
+++ b/tests/compiler/dart2js/sourcemaps/helpers/output_structure.dart
@@ -86,40 +86,50 @@
 abstract class BaseOutputVisitor<R, A> extends OutputVisitor<R, A> {
   R visitEntity(OutputEntity entity, A arg) => null;
 
+  @override
   R visitStructure(OutputStructure entity, A arg) => visitEntity(entity, arg);
+  @override
   R visitLibrary(LibraryBlock entity, A arg) => visitEntity(entity, arg);
+  @override
   R visitClass(LibraryClass entity, A arg) => visitEntity(entity, arg);
 
   R visitMember(BasicEntity entity, A arg) => visitEntity(entity, arg);
 
   R visitTopLevelMember(BasicEntity entity, A arg) => visitMember(entity, arg);
 
+  @override
   R visitTopLevelFunction(TopLevelFunction entity, A arg) {
     return visitTopLevelMember(entity, arg);
   }
 
+  @override
   R visitTopLevelValue(TopLevelValue entity, A arg) {
     return visitTopLevelMember(entity, arg);
   }
 
   R visitClassMember(BasicEntity entity, A arg) => visitMember(entity, arg);
 
+  @override
   R visitMemberObject(MemberObject entity, A arg) {
     return visitClassMember(entity, arg);
   }
 
+  @override
   R visitMemberFunction(MemberFunction entity, A arg) {
     return visitClassMember(entity, arg);
   }
 
+  @override
   R visitMemberValue(MemberValue entity, A arg) {
     return visitClassMember(entity, arg);
   }
 
+  @override
   R visitStatics(Statics entity, A arg) {
     return visitClassMember(entity, arg);
   }
 
+  @override
   R visitStaticFunction(StaticFunction entity, A arg) {
     return visitClassMember(entity, arg);
   }
@@ -130,6 +140,7 @@
   final List<CodeLine> lines;
   final int headerEnd;
   final int footerStart;
+  @override
   final List<LibraryBlock> children;
 
   OutputStructure(this.lines, this.headerEnd, this.footerStart, this.children);
@@ -137,14 +148,19 @@
   @override
   EntityKind get kind => EntityKind.STRUCTURE;
 
+  @override
   Interval get interval => new Interval(0, lines.length);
 
+  @override
   Interval get header => new Interval(0, headerEnd);
 
+  @override
   Interval get footer => new Interval(footerStart, lines.length);
 
+  @override
   bool get canHaveChildren => true;
 
+  @override
   OutputEntity getEntityForLine(int line) {
     if (line < headerEnd || line >= footerStart) {
       return this;
@@ -221,6 +237,7 @@
     return new OutputStructure(lines, headerEnd, footerStart, libraryBlocks);
   }
 
+  @override
   accept(OutputVisitor visitor, arg) => visitor.visitStructure(this, arg);
 
   @override
@@ -252,6 +269,7 @@
 
   AbstractEntity(this.name, this.from);
 
+  @override
   Interval get interval => new Interval(from, to);
 
   @override
@@ -328,6 +346,7 @@
 
 /// A block defining the content of a Dart library.
 class LibraryBlock extends AbstractEntity {
+  @override
   List<BasicEntity> children = <BasicEntity>[];
   int get headerEnd => from + 2;
   int get footerStart => to /* - 1*/;
@@ -337,10 +356,13 @@
   @override
   EntityKind get kind => EntityKind.LIBRARY;
 
+  @override
   Interval get header => new Interval(from, headerEnd);
 
+  @override
   Interval get footer => new Interval(footerStart, to);
 
+  @override
   bool get canHaveChildren => true;
 
   void preprocess(List<CodeLine> lines) {
@@ -383,8 +405,10 @@
     }
   }
 
+  @override
   accept(OutputVisitor visitor, arg) => visitor.visitLibrary(this, arg);
 
+  @override
   OutputEntity getEntityForLine(int line) {
     if (line < headerEnd || line >= footerStart) {
       return this;
@@ -402,10 +426,13 @@
 abstract class BasicEntity extends AbstractEntity {
   BasicEntity(String name, int from) : super(name, from);
 
+  @override
   Interval get header => new Interval(from, to);
 
+  @override
   Interval get footer => new Interval(to, to);
 
+  @override
   List<OutputEntity> get children => const <OutputEntity>[];
 
   void preprocess(List<CodeLine> lines) {}
@@ -425,6 +452,7 @@
   @override
   EntityKind get kind => EntityKind.TOP_LEVEL_FUNCTION;
 
+  @override
   accept(OutputVisitor visitor, arg) {
     return visitor.visitTopLevelFunction(this, arg);
   }
@@ -436,6 +464,7 @@
   @override
   EntityKind get kind => EntityKind.TOP_LEVEL_VALUE;
 
+  @override
   accept(OutputVisitor visitor, arg) {
     return visitor.visitTopLevelValue(this, arg);
   }
@@ -443,6 +472,7 @@
 
 /// A block defining a Dart class.
 class LibraryClass extends BasicEntity {
+  @override
   List<BasicEntity> children = <BasicEntity>[];
   int get headerEnd => from + 1;
   int get footerStart => to - 1;
@@ -452,12 +482,16 @@
   @override
   EntityKind get kind => EntityKind.CLASS;
 
+  @override
   Interval get header => new Interval(from, headerEnd);
 
+  @override
   Interval get footer => new Interval(footerStart, to);
 
+  @override
   bool get canHaveChildren => true;
 
+  @override
   void preprocess(List<CodeLine> lines) {
     int index = headerEnd;
     BasicEntity current;
@@ -503,8 +537,10 @@
     }
   }
 
+  @override
   accept(OutputVisitor visitor, arg) => visitor.visitClass(this, arg);
 
+  @override
   OutputEntity getEntityForLine(int line) {
     if (line < headerEnd || line >= footerStart) {
       return this;
@@ -520,6 +556,7 @@
 
 /// A block defining static members of a Dart class.
 class Statics extends BasicEntity {
+  @override
   List<BasicEntity> children = <BasicEntity>[];
   int get headerEnd => from + 1;
   int get footerStart => to - 1;
@@ -529,12 +566,16 @@
   @override
   EntityKind get kind => EntityKind.STATICS;
 
+  @override
   Interval get header => new Interval(from, headerEnd);
 
+  @override
   Interval get footer => new Interval(footerStart, to);
 
+  @override
   bool get canHaveChildren => true;
 
+  @override
   void preprocess(List<CodeLine> lines) {
     int index = headerEnd;
     BasicEntity current;
@@ -561,8 +602,10 @@
     }
   }
 
+  @override
   accept(OutputVisitor visitor, arg) => visitor.visitStatics(this, arg);
 
+  @override
   OutputEntity getEntityForLine(int line) {
     if (line < headerEnd || line >= footerStart) {
       return this;
@@ -582,6 +625,7 @@
   @override
   EntityKind get kind => EntityKind.MEMBER_FUNCTION;
 
+  @override
   accept(OutputVisitor visitor, arg) => visitor.visitMemberFunction(this, arg);
 }
 
@@ -591,6 +635,7 @@
   @override
   EntityKind get kind => EntityKind.MEMBER_OBJECT;
 
+  @override
   accept(OutputVisitor visitor, arg) => visitor.visitMemberObject(this, arg);
 }
 
@@ -600,6 +645,7 @@
   @override
   EntityKind get kind => EntityKind.MEMBER_VALUE;
 
+  @override
   accept(OutputVisitor visitor, arg) => visitor.visitMemberValue(this, arg);
 }
 
@@ -609,6 +655,7 @@
   @override
   EntityKind get kind => EntityKind.STATIC_FUNCTION;
 
+  @override
   accept(OutputVisitor visitor, arg) => visitor.visitStaticFunction(this, arg);
 }
 
@@ -634,6 +681,7 @@
     return from - windowSize <= index && index < to + windowSize;
   }
 
+  @override
   String toString() => '[$from,$to[';
 }
 
@@ -652,6 +700,7 @@
     assert(uri != null);
   }
 
+  @override
   String toString() => '$uri:$name:$offset';
 
   Map toJson(JsonStrategy strategy) {
@@ -681,6 +730,7 @@
 
   CodeSource(this.kind, this.uri, this.name, this.begin, this.end);
 
+  @override
   int get hashCode {
     return kind.hashCode * 13 +
         uri.hashCode * 17 +
@@ -688,6 +738,7 @@
         begin.hashCode * 23;
   }
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! CodeSource) return false;
@@ -697,6 +748,7 @@
         begin == other.begin;
   }
 
+  @override
   String toString() => '${toJson()}';
 
   Map toJson() {
diff --git a/tests/compiler/dart2js/sourcemaps/helpers/source_map_validator_helper.dart b/tests/compiler/dart2js/sourcemaps/helpers/source_map_validator_helper.dart
index a0b6a5a..aab0969 100644
--- a/tests/compiler/dart2js/sourcemaps/helpers/source_map_validator_helper.dart
+++ b/tests/compiler/dart2js/sourcemaps/helpers/source_map_validator_helper.dart
@@ -304,6 +304,7 @@
     return line < other.line || line == other.line && column <= other.column;
   }
 
+  @override
   String toString() => '[${line + 1},${column + 1}]';
 }
 
@@ -317,5 +318,6 @@
     return begin <= other && other <= end;
   }
 
+  @override
   String toString() => '$begin-$end';
 }
diff --git a/tests/compiler/dart2js/sourcemaps/helpers/sourcemap_helper.dart b/tests/compiler/dart2js/sourcemaps/helpers/sourcemap_helper.dart
index 8826468..f38c7a6 100644
--- a/tests/compiler/dart2js/sourcemaps/helpers/sourcemap_helper.dart
+++ b/tests/compiler/dart2js/sourcemaps/helpers/sourcemap_helper.dart
@@ -277,6 +277,7 @@
 
   FindVisitor(this.soughtNode);
 
+  @override
   visitNode(js.Node node) {
     if (node == soughtNode) {
       found = true;
@@ -437,6 +438,7 @@
             element != null ? computeElementNameForSourceMaps(element) : '',
         this.element = element;
 
+  @override
   String toString() {
     return '$name:$element';
   }
@@ -473,8 +475,10 @@
   @override
   void registerPop(int codeOffset, {bool isEmpty: false}) {}
 
+  @override
   Iterable<js.Node> get nodes => _nodeMap.keys;
 
+  @override
   Map<int, List<SourceLocation>> operator [](js.Node node) {
     return _nodeMap[node];
   }
@@ -486,8 +490,10 @@
 
   _FilteredLocationMap(this._nodes, this.map);
 
+  @override
   Iterable<js.Node> get nodes => map.nodes.where((n) => _nodes.contains(n));
 
+  @override
   Map<int, List<SourceLocation>> operator [](js.Node node) {
     return map[node];
   }
@@ -522,6 +528,7 @@
 
   /// Called when [node] defines a step of the given [kind] at the given
   /// [offset] when the generated JavaScript code.
+  @override
   void onStep(js.Node node, Offset offset, StepKind kind) {
     if (kind == StepKind.ACCESS) return;
     register(kind, node);
@@ -588,6 +595,7 @@
       this.dartCode,
       {this.isMissing: false});
 
+  @override
   String toString() {
     return 'CodePoint[kind=$kind,js=$jsCode,dart=$dartCode,'
         'location=$sourceLocation]';
@@ -601,6 +609,7 @@
 
   IOSourceFileManager(this.base);
 
+  @override
   SourceFile getSourceFile(var uri) {
     Uri absoluteUri;
     if (uri is Uri) {
diff --git a/tests/compiler/dart2js/sourcemaps/helpers/sourcemap_html_helper.dart b/tests/compiler/dart2js/sourcemaps/helpers/sourcemap_html_helper.dart
index e4b8c95..57869ca 100644
--- a/tests/compiler/dart2js/sourcemaps/helpers/sourcemap_html_helper.dart
+++ b/tests/compiler/dart2js/sourcemaps/helpers/sourcemap_html_helper.dart
@@ -80,6 +80,7 @@
   SourceMapHtmlInfo(
       this.sourceMapInfo, this.codeProcessor, this.sourceLocationCollection);
 
+  @override
   String toString() {
     return sourceMapInfo.toString();
   }
@@ -117,6 +118,7 @@
 }
 
 class CustomColorScheme implements CssColorScheme {
+  @override
   final bool showLocationAsSpan;
   final Function single;
   final Function multi;
@@ -126,8 +128,10 @@
       String this.single(int id),
       String this.multi(List<int> ids)});
 
+  @override
   String singleLocationToCssColor(int id) => single != null ? single(id) : null;
 
+  @override
   String multiLocationToCssColor(List<int> ids) =>
       multi != null ? multi(ids) : null;
 }
@@ -135,12 +139,15 @@
 class PatternCssColorScheme implements CssColorScheme {
   const PatternCssColorScheme();
 
+  @override
   bool get showLocationAsSpan => true;
 
+  @override
   String singleLocationToCssColor(int index) {
     return "background:${toPattern(index)};";
   }
 
+  @override
   String multiLocationToCssColor(List<int> indices) {
     StringBuffer sb = new StringBuffer();
     double delta = 100.0 / (indices.length);
@@ -163,12 +170,15 @@
 class SingleColorScheme implements CssColorScheme {
   const SingleColorScheme();
 
+  @override
   bool get showLocationAsSpan => false;
 
+  @override
   String singleLocationToCssColor(int index) {
     return "background:${toColorCss(index)};";
   }
 
+  @override
   String multiLocationToCssColor(List<int> indices) {
     StringBuffer sb = new StringBuffer();
     double delta = 100.0 / (indices.length);
diff --git a/tests/compiler/dart2js/sourcemaps/helpers/trace_graph.dart b/tests/compiler/dart2js/sourcemaps/helpers/trace_graph.dart
index feceab2..d4481f8 100644
--- a/tests/compiler/dart2js/sourcemaps/helpers/trace_graph.dart
+++ b/tests/compiler/dart2js/sourcemaps/helpers/trace_graph.dart
@@ -62,5 +62,6 @@
   TraceStep(this.kind, this.id, this.node, this.offset, this.text,
       [this.sourceLocation]);
 
+  @override
   String toString() => '<span style="background:${toColorCss(id)}">$id</span>';
 }
diff --git a/tests/compiler/dart2js/sourcemaps/mapping_test.dart b/tests/compiler/dart2js/sourcemaps/mapping_test.dart
index a69f0a6..6c933ee 100644
--- a/tests/compiler/dart2js/sourcemaps/mapping_test.dart
+++ b/tests/compiler/dart2js/sourcemaps/mapping_test.dart
@@ -34,7 +34,7 @@
   @{main}test();
 @{main}}
 
-@NoInline()
+@pragma('dart2js:noInline')
 @{test}test() {
 @{test}}
 ''',
@@ -171,9 +171,11 @@
 
   SourceLocation(this.methodName, this.lineNo, this.columnNo);
 
+  @override
   int get hashCode =>
       methodName.hashCode * 13 + lineNo.hashCode * 17 + columnNo.hashCode * 19;
 
+  @override
   bool operator ==(other) {
     if (identical(this, other)) return true;
     if (other is! SourceLocation) return false;
@@ -182,5 +184,6 @@
         columnNo == other.columnNo;
   }
 
+  @override
   String toString() => '$methodName:$lineNo:$columnNo';
 }
diff --git a/tests/compiler/dart2js/sourcemaps/minified/is_not_a_function.dart b/tests/compiler/dart2js/sourcemaps/minified/is_not_a_function.dart
index fb87279..92087cd 100644
--- a/tests/compiler/dart2js/sourcemaps/minified/is_not_a_function.dart
+++ b/tests/compiler/dart2js/sourcemaps/minified/is_not_a_function.dart
@@ -9,15 +9,13 @@
 // Kind of minified name: instance
 // Expected deobfuscated name: m1
 
-import 'package:expect/expect.dart';
-
 main() {
   dynamic x = confuse(new B());
   x.m1();
 }
 
-@AssumeDynamic()
-@NoInline()
+@pragma('dart2js:assumeDynamic')
+@pragma('dart2js:noInline')
 confuse(x) => x;
 
 class B {
diff --git a/tests/compiler/dart2js/sourcemaps/minified/no_such_method.dart b/tests/compiler/dart2js/sourcemaps/minified/no_such_method.dart
index 70de964..88383df 100644
--- a/tests/compiler/dart2js/sourcemaps/minified/no_such_method.dart
+++ b/tests/compiler/dart2js/sourcemaps/minified/no_such_method.dart
@@ -6,19 +6,18 @@
 // Kind of minified name: instance
 // Expected deobfuscated name: m1
 
-import 'package:expect/expect.dart';
-
 main() {
   confuse(new A());
   dynamic x = confuse(new B());
   x.m1();
 }
 
-@AssumeDynamic()
-@NoInline()
+@pragma('dart2js:assumeDynamic')
+@pragma('dart2js:noInline')
 confuse(x) => x;
 
 class A {
+  @override
   noSuchMethod(i) => null;
 }
 
diff --git a/tests/compiler/dart2js/sourcemaps/minified/no_such_method2.dart b/tests/compiler/dart2js/sourcemaps/minified/no_such_method2.dart
index eb38df3..c169326 100644
--- a/tests/compiler/dart2js/sourcemaps/minified/no_such_method2.dart
+++ b/tests/compiler/dart2js/sourcemaps/minified/no_such_method2.dart
@@ -6,19 +6,18 @@
 // Kind of minified name: global
 // Expected deobfuscated name: B
 
-import 'package:expect/expect.dart';
-
 main() {
   confuse(new A());
   dynamic x = confuse(new B());
   x.m1();
 }
 
-@AssumeDynamic()
-@NoInline()
+@pragma('dart2js:assumeDynamic')
+@pragma('dart2js:noInline')
 confuse(x) => x;
 
 class A {
+  @override
   noSuchMethod(i) => null;
 }
 
diff --git a/tests/compiler/dart2js/sourcemaps/minified/no_such_method3.dart b/tests/compiler/dart2js/sourcemaps/minified/no_such_method3.dart
index f28344a..5ba0000 100644
--- a/tests/compiler/dart2js/sourcemaps/minified/no_such_method3.dart
+++ b/tests/compiler/dart2js/sourcemaps/minified/no_such_method3.dart
@@ -6,8 +6,6 @@
 // Kind of minified name: instance
 // Expected deobfuscated name: g1
 
-import 'package:expect/expect.dart';
-
 main() {
   try {
     confuse(new A());
@@ -18,8 +16,8 @@
   }
 }
 
-@AssumeDynamic()
-@NoInline()
+@pragma('dart2js:assumeDynamic')
+@pragma('dart2js:noInline')
 confuse(x) => x;
 
 class A {
diff --git a/tests/compiler/dart2js/sourcemaps/minified/no_such_method4.dart b/tests/compiler/dart2js/sourcemaps/minified/no_such_method4.dart
index a8949f0..9a4fdf6 100644
--- a/tests/compiler/dart2js/sourcemaps/minified/no_such_method4.dart
+++ b/tests/compiler/dart2js/sourcemaps/minified/no_such_method4.dart
@@ -6,8 +6,6 @@
 // Kind of minified name: instance
 // Expected deobfuscated name: g1=
 
-import 'package:expect/expect.dart';
-
 main() {
   try {
     confuse(new A());
@@ -18,8 +16,8 @@
   }
 }
 
-@AssumeDynamic()
-@NoInline()
+@pragma('dart2js:assumeDynamic')
+@pragma('dart2js:noInline')
 confuse(x) => x;
 
 class A {
diff --git a/tests/compiler/dart2js/sourcemaps/minified_names_test.dart b/tests/compiler/dart2js/sourcemaps/minified_names_test.dart
index 70a764f..8761edc 100644
--- a/tests/compiler/dart2js/sourcemaps/minified_names_test.dart
+++ b/tests/compiler/dart2js/sourcemaps/minified_names_test.dart
@@ -94,7 +94,7 @@
   print('-- ${minified ? 'minified' : 'not-minified'}:');
   D8Result result = await runWithD8(
       memorySourceFiles: {'main.dart': test.code},
-      options: minified ? [Flags.minify] : []);
+      options: minified ? [Flags.minify, Flags.testMode] : [Flags.testMode]);
   String stdout = result.runResult.stdout;
   String error = _extractError(stdout);
   print('   error: $error');
diff --git a/tests/compiler/dart2js/sourcemaps/stacktrace/deep_inlining.dart b/tests/compiler/dart2js/sourcemaps/stacktrace/deep_inlining.dart
index bef5cfa..1b30119 100644
--- a/tests/compiler/dart2js/sourcemaps/stacktrace/deep_inlining.dart
+++ b/tests/compiler/dart2js/sourcemaps/stacktrace/deep_inlining.dart
@@ -1,8 +1,10 @@
-import 'package:expect/expect.dart';
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
 
 class MyClass {}
 
-@NoInline()
+@pragma('dart2js:noInline')
 method3() {
   /*4:method3*/ throw new MyClass();
 }
diff --git a/tests/compiler/dart2js/sourcemaps/stacktrace/null_instance_field.dart b/tests/compiler/dart2js/sourcemaps/stacktrace/null_instance_field.dart
index a909569..b9a347f 100644
--- a/tests/compiler/dart2js/sourcemaps/stacktrace/null_instance_field.dart
+++ b/tests/compiler/dart2js/sourcemaps/stacktrace/null_instance_field.dart
@@ -2,17 +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.
 
-import 'package:expect/expect.dart';
-
 main() {
   /*1:main*/ test(new Class());
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(c) {
   c. /*2:test*/ field.method();
 }
 
 class Class {
+  @pragma('dart2js:noElision')
   var field;
 }
diff --git a/tests/compiler/dart2js/sourcemaps/stacktrace/null_instance_field_elided.dart b/tests/compiler/dart2js/sourcemaps/stacktrace/null_instance_field_elided.dart
new file mode 100644
index 0000000..768d1f0
--- /dev/null
+++ b/tests/compiler/dart2js/sourcemaps/stacktrace/null_instance_field_elided.dart
@@ -0,0 +1,16 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+main() {
+  /*1:main*/ test(new Class());
+}
+
+@pragma('dart2js:noInline')
+test(c) {
+  c.field. /*2:test*/ method();
+}
+
+class Class {
+  var field;
+}
diff --git a/tests/compiler/dart2js/sourcemaps/stacktrace/null_interceptor_field.dart b/tests/compiler/dart2js/sourcemaps/stacktrace/null_interceptor_field.dart
index 011af16..08a8072 100644
--- a/tests/compiler/dart2js/sourcemaps/stacktrace/null_interceptor_field.dart
+++ b/tests/compiler/dart2js/sourcemaps/stacktrace/null_interceptor_field.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 'package:expect/expect.dart';
-
 class MyType {
   get length => 3; // ensures we build an interceptor for `.length`
 }
@@ -16,5 +14,5 @@
   confuse(null). /*1:main*/ length; // called through the interceptor
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 confuse(x) => x;
diff --git a/tests/compiler/dart2js/sourcemaps/stacktrace/parameters.dart b/tests/compiler/dart2js/sourcemaps/stacktrace/parameters.dart
index 4170f29..4321fea 100644
--- a/tests/compiler/dart2js/sourcemaps/stacktrace/parameters.dart
+++ b/tests/compiler/dart2js/sourcemaps/stacktrace/parameters.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 'package:meta/dart2js.dart';
-
 main() {
   var c = new Class();
   c. /*1:main*/ instancePositional1(0);
@@ -19,55 +17,55 @@
 }
 
 class Class {
-  @noInline
+  @pragma('dart2js:noInline')
   /*2:Class.instancePositional1[function-entry$1]*/ instancePositional1(a,
       [b = 42, c = 87]) {
     print('instancePositional1($a,$b,$c)');
     /*3:Class.instancePositional1*/ instancePositional2(1, 2);
   }
 
-  @noInline
+  @pragma('dart2js:noInline')
   /*4:Class.instancePositional2[function-entry$2]*/ instancePositional2(a,
       [b = 42, c = 87]) {
     print('instancePositional2($a,$b,$c)');
     /*5:Class.instancePositional2*/ instancePositional3(3, 4, 5);
   }
 
-  @noInline
+  @pragma('dart2js:noInline')
   instancePositional3(a, [b = 42, c = 87]) {
     print('instancePositional3($a,$b,$c)');
     /*6:Class.instancePositional3*/ instanceNamed1(0);
   }
 
-  @noInline
+  @pragma('dart2js:noInline')
   /*7:Class.instanceNamed1[function-entry$1]*/ instanceNamed1(a,
       {b: 42, c: 87, d: 735}) {
     print('instanceNamed1($a,b:$b,c:$c,d:$d)');
     /*8:Class.instanceNamed1*/ instanceNamed2(1, b: 2);
   }
 
-  @noInline
+  @pragma('dart2js:noInline')
   /*9:Class.instanceNamed2[function-entry$1$b]*/ instanceNamed2(a,
       {b: 42, c: 87, d: 735}) {
     print('instanceNamed2($a,b:$b,c:$c,d:$d)');
     /*10:Class.instanceNamed2*/ instanceNamed3(3, c: 123);
   }
 
-  @noInline
+  @pragma('dart2js:noInline')
   /*11:Class.instanceNamed3[function-entry$1$c]*/ instanceNamed3(a,
       {b: 42, c: 87, d: 735}) {
     print('instanceNamed3($a,b:$b,c:$c,d:$d)');
     /*12:Class.instanceNamed3*/ instanceNamed4(4, c: 45, b: 76);
   }
 
-  @noInline
+  @pragma('dart2js:noInline')
   /*13:Class.instanceNamed4[function-entry$1$b$c]*/ instanceNamed4(a,
       {b: 42, c: 87, d: 735}) {
     print('instanceNamed4($a,b:$b,c:$c,d:$d)');
     /*14:Class.instanceNamed4*/ instanceNamed5(5, c: 6, b: 7, d: 8);
   }
 
-  @noInline
+  @pragma('dart2js:noInline')
   instanceNamed5(a, {b: 42, c: 87, d: 735}) {
     print('instanceNamed5($a,b:$b,c:$c,d:$d)');
     /*18:Class.instanceNamed5[function-entry$0].local*/ local([e = 42]) {
diff --git a/tests/compiler/dart2js/sourcemaps/stacktrace/parameters_elided.dart b/tests/compiler/dart2js/sourcemaps/stacktrace/parameters_elided.dart
index cb0bade..b8cbd75 100644
--- a/tests/compiler/dart2js/sourcemaps/stacktrace/parameters_elided.dart
+++ b/tests/compiler/dart2js/sourcemaps/stacktrace/parameters_elided.dart
@@ -2,57 +2,55 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:meta/dart2js.dart';
-
 main() {
   var c = new Class();
   c. /*1:main*/ instancePositional1(0);
 }
 
 class Class {
-  @noInline
+  @pragma('dart2js:noInline')
   instancePositional1(a, [b = 42, c = 87]) {
     print('instancePositional1($a,$b,$c)');
     /*2:Class.instancePositional1*/ instancePositional2(1, 2);
   }
 
-  @noInline
+  @pragma('dart2js:noInline')
   instancePositional2(a, [b = 42, c = 87]) {
     print('instancePositional2($a,$b,$c)');
     /*3:Class.instancePositional2*/ instancePositional3(3, 4, 5);
   }
 
-  @noInline
+  @pragma('dart2js:noInline')
   instancePositional3(a, [b = 42, c = 87]) {
     print('instancePositional3($a,$b,$c)');
     /*4:Class.instancePositional3*/ instanceNamed1(0);
   }
 
-  @noInline
+  @pragma('dart2js:noInline')
   instanceNamed1(a, {b: 42, c: 87, d: 735}) {
     print('instanceNamed1($a,b:$b,c:$c,d:$d)');
     /*5:Class.instanceNamed1*/ instanceNamed2(1, b: 2);
   }
 
-  @noInline
+  @pragma('dart2js:noInline')
   instanceNamed2(a, {b: 42, c: 87, d: 735}) {
     print('instanceNamed2($a,b:$b,c:$c,d:$d)');
     /*6:Class.instanceNamed2*/ instanceNamed3(3, c: 123);
   }
 
-  @noInline
+  @pragma('dart2js:noInline')
   instanceNamed3(a, {b: 42, c: 87, d: 735}) {
     print('instanceNamed3($a,b:$b,c:$c,d:$d)');
     /*7:Class.instanceNamed3*/ instanceNamed4(4, c: 45, b: 76);
   }
 
-  @noInline
+  @pragma('dart2js:noInline')
   instanceNamed4(a, {b: 42, c: 87, d: 735}) {
     print('instanceNamed4($a,b:$b,c:$c,d:$d)');
     /*8:Class.instanceNamed4*/ instanceNamed5(5, c: 6, b: 7, d: 8);
   }
 
-  @noInline
+  @pragma('dart2js:noInline')
   instanceNamed5(a, {b: 42, c: 87, d: 735}) {
     print('instanceNamed5($a,b:$b,c:$c,d:$d)');
     /*12:Class.instanceNamed5[function-entry$0].local*/ local([e = 42]) {
diff --git a/tests/compiler/dart2js/sourcemaps/stacktrace/rethrow.dart b/tests/compiler/dart2js/sourcemaps/stacktrace/rethrow.dart
index 81d809b..d1edabc 100644
--- a/tests/compiler/dart2js/sourcemaps/stacktrace/rethrow.dart
+++ b/tests/compiler/dart2js/sourcemaps/stacktrace/rethrow.dart
@@ -2,13 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:expect/expect.dart';
-
 main() {
   /*1:main*/ test();
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test() {
   try {
     /*2:test*/ throw '>ExceptionMarker<';
diff --git a/tests/compiler/dart2js/sourcemaps/stacktrace/sync_throw_in_async.dart b/tests/compiler/dart2js/sourcemaps/stacktrace/sync_throw_in_async.dart
index 13e5ecd..3c17f40 100644
--- a/tests/compiler/dart2js/sourcemaps/stacktrace/sync_throw_in_async.dart
+++ b/tests/compiler/dart2js/sourcemaps/stacktrace/sync_throw_in_async.dart
@@ -2,14 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:expect/expect.dart';
-
 main() {
   // This call is on the stack when the error is thrown.
   /*1:main*/ test();
 }
 
-@NoInline()
-test() async /*2:test*/ {
+// TODO(34942): Step 2 should point to the body block.
+@pragma('dart2js:noInline')
+test /*2:test*/ () async {
   /*4:test*/ throw '>ExceptionMarker<';
 }
diff --git a/tests/compiler/dart2js/sourcemaps/stacktrace/sync_throw_in_awaited_async.dart b/tests/compiler/dart2js/sourcemaps/stacktrace/sync_throw_in_awaited_async.dart
index 49c7a18..46ec972 100644
--- a/tests/compiler/dart2js/sourcemaps/stacktrace/sync_throw_in_awaited_async.dart
+++ b/tests/compiler/dart2js/sourcemaps/stacktrace/sync_throw_in_awaited_async.dart
@@ -2,20 +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.
 
-import 'package:expect/expect.dart';
-
 main() {
   // This call is on the stack when the error is thrown.
   /*1:main*/ test1();
 }
 
-@NoInline()
-test1() async /*3:test1*/ {
+// TODO(34942): Step 3 should point to the body block.
+@pragma('dart2js:noInline')
+test1 /*3:test1*/ () async {
   // This call is on the stack when the error is thrown.
   await /*5:test1*/ test2();
 }
 
-@NoInline()
-test2() async /*7:test2*/ {
+// TODO(34942): Step 7 should point to the body block.
+@pragma('dart2js:noInline')
+test2 /*7:test2*/ () async {
   /*9:test2*/ throw '>ExceptionMarker<';
 }
diff --git a/tests/compiler/dart2js/sourcemaps/stacktrace/sync_throw_in_constructor_from_async.dart b/tests/compiler/dart2js/sourcemaps/stacktrace/sync_throw_in_constructor_from_async.dart
index 610895a..be6c6b18 100644
--- a/tests/compiler/dart2js/sourcemaps/stacktrace/sync_throw_in_constructor_from_async.dart
+++ b/tests/compiler/dart2js/sourcemaps/stacktrace/sync_throw_in_constructor_from_async.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 'package:expect/expect.dart';
-
 main() {
   /*1:main*/ test();
 }
@@ -16,7 +14,7 @@
 }
 
 class Class {
-  @NoInline()
+  @pragma('dart2js:noInline')
   Class() {
     /*6:Class*/ throw '>ExceptionMarker<';
   }
diff --git a/tests/compiler/dart2js/sourcemaps/stacktrace/sync_throw_in_top_level_method_from_async.dart b/tests/compiler/dart2js/sourcemaps/stacktrace/sync_throw_in_top_level_method_from_async.dart
index 7ea1cf9..1ed8fd4 100644
--- a/tests/compiler/dart2js/sourcemaps/stacktrace/sync_throw_in_top_level_method_from_async.dart
+++ b/tests/compiler/dart2js/sourcemaps/stacktrace/sync_throw_in_top_level_method_from_async.dart
@@ -2,18 +2,17 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:expect/expect.dart';
-
 main() {
   /*1:main*/ test1();
 }
 
-@NoInline()
-test1() async /*2:test1*/ {
+// TODO(34942): Step 2 should point to the body block.
+@pragma('dart2js:noInline')
+test1 /*2:test1*/ () async {
   /*9:test1*/ test2();
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test2() {
   /*10:test2*/ throw '>ExceptionMarker<';
 }
diff --git a/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_async.dart b/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_async.dart
index dba9a31..fe10b93 100644
--- a/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_async.dart
+++ b/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_async.dart
@@ -2,14 +2,12 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:expect/expect.dart';
-
 main() {
   // This call is no longer on the stack when the error is thrown.
   /*:main*/ test();
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test() async {
   await null;
   /*9:test*/ throw '>ExceptionMarker<';
diff --git a/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_awaited_async.dart b/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_awaited_async.dart
index 522bcf7..b9762fd 100644
--- a/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_awaited_async.dart
+++ b/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_awaited_async.dart
@@ -2,19 +2,17 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:expect/expect.dart';
-
 main() {
   test1();
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test1() async {
   // This call is no longer on the stack when the error is thrown.
   await /*:test1*/ test2();
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test2() async {
   await null;
   /*1:test2*/ throw '>ExceptionMarker<';
diff --git a/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_constructor.dart b/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_constructor.dart
index 6d7a7f2..6912e7c 100644
--- a/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_constructor.dart
+++ b/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_constructor.dart
@@ -2,15 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:expect/expect.dart';
-
 main() {
   // ignore: UNUSED_LOCAL_VARIABLE
   var c = new /*1:main*/ Class();
 }
 
 class Class {
-  @NoInline()
+  @pragma('dart2js:noInline')
   Class() {
     /*3:Class*/ throw '>ExceptionMarker<';
   }
diff --git a/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_constructor_from_async.dart b/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_constructor_from_async.dart
index 7d78c18..ae6b2aa 100644
--- a/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_constructor_from_async.dart
+++ b/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_constructor_from_async.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 'package:expect/expect.dart';
-
 main() {
   // This call is no longer on the stack when the error is thrown.
   /*:main*/ test();
@@ -16,7 +14,7 @@
 }
 
 class Class {
-  @NoInline()
+  @pragma('dart2js:noInline')
   Class() {
     /*2:Class*/ throw '>ExceptionMarker<';
   }
diff --git a/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_instance_method.dart b/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_instance_method.dart
index ab73200..1accc99 100644
--- a/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_instance_method.dart
+++ b/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_instance_method.dart
@@ -2,15 +2,13 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:expect/expect.dart';
-
 main() {
   var c = new Class();
   c. /*1:main*/ test();
 }
 
 class Class {
-  @NoInline()
+  @pragma('dart2js:noInline')
   test() {
     /*2:Class.test*/ throw '>ExceptionMarker<';
   }
diff --git a/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_static_method.dart b/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_static_method.dart
index 8f73a1c..a86c5df 100644
--- a/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_static_method.dart
+++ b/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_static_method.dart
@@ -2,14 +2,12 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:expect/expect.dart';
-
 main() {
   Class. /*1:main*/ test();
 }
 
 class Class {
-  @NoInline()
+  @pragma('dart2js:noInline')
   static test() {
     /*2:Class.test*/ throw '>ExceptionMarker<';
   }
diff --git a/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_top_level_method.dart b/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_top_level_method.dart
index e1f29fb..e740ca8 100644
--- a/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_top_level_method.dart
+++ b/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_top_level_method.dart
@@ -2,13 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:expect/expect.dart';
-
 main() {
   /*1:main*/ test();
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test() {
   /*2:test*/ throw '>ExceptionMarker<';
 }
diff --git a/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_top_level_method_from_async.dart b/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_top_level_method_from_async.dart
index c172214..5b315c6 100644
--- a/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_top_level_method_from_async.dart
+++ b/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_top_level_method_from_async.dart
@@ -2,19 +2,17 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:expect/expect.dart';
-
 main() {
   test1();
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test1() async {
   await null;
   /*1:test1*/ test2();
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test2() {
   /*2:test2*/ throw '>ExceptionMarker<';
 }
diff --git a/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_try_catch.dart b/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_try_catch.dart
index 9cb808c..59ff684 100644
--- a/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_try_catch.dart
+++ b/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_try_catch.dart
@@ -2,13 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:expect/expect.dart';
-
 main() {
   /*1:main*/ test();
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test() {
   try {
     /*2:test*/ throw '>ExceptionMarker<';
diff --git a/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_try_finally.dart b/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_try_finally.dart
index 7ebaf9a..c802027 100644
--- a/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_try_finally.dart
+++ b/tests/compiler/dart2js/sourcemaps/stacktrace/throw_in_try_finally.dart
@@ -2,13 +2,11 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:expect/expect.dart';
-
 main() {
   /*1:main*/ test();
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test() {
   try {
     /*2:test*/ throw '>ExceptionMarker<';
diff --git a/tests/compiler/dart2js/sourcemaps/stacktrace_test.dart b/tests/compiler/dart2js/sourcemaps/stacktrace_test.dart
index 5d4d3b7..b3ca79e 100644
--- a/tests/compiler/dart2js/sourcemaps/stacktrace_test.dart
+++ b/tests/compiler/dart2js/sourcemaps/stacktrace_test.dart
@@ -8,6 +8,7 @@
 import 'package:args/args.dart';
 import 'package:async_helper/async_helper.dart';
 import 'package:compiler/compiler_new.dart';
+import 'package:compiler/src/commandline_options.dart';
 import 'package:compiler/src/dart2js.dart' as entry;
 
 import 'package:sourcemap_testing/src/stacktrace_helper.dart';
@@ -62,6 +63,13 @@
       writeJs: writeJs,
       verbose: verbose,
       inlineData: inlineData);
+  print('---from kernel with CFE constants-----------------------------------');
+  await runTest(test, kernelMarker,
+      printJs: printJs,
+      writeJs: writeJs,
+      verbose: verbose,
+      inlineData: inlineData,
+      options: ['${Flags.enableLanguageExperiments}=constant-update-2018']);
 }
 
 Future runTest(Test test, String config,
@@ -83,6 +91,7 @@
       '-o$output',
       '--libraries-spec=sdk/lib/libraries.json',
       '--packages=${Platform.packageConfig}',
+      Flags.testMode,
       input,
     ]..addAll(options);
     print("Compiling dart2js ${arguments.join(' ')}");
diff --git a/tests/compiler/dart2js/sourcemaps/tools/diff_view.dart b/tests/compiler/dart2js/sourcemaps/tools/diff_view.dart
index ea6456b..2701c10 100644
--- a/tests/compiler/dart2js/sourcemaps/tools/diff_view.dart
+++ b/tests/compiler/dart2js/sourcemaps/tools/diff_view.dart
@@ -124,6 +124,7 @@
 class CodeLineAnnotationJsonStrategy implements JsonStrategy {
   const CodeLineAnnotationJsonStrategy();
 
+  @override
   Map encodeAnnotation(Annotation annotation) {
     CodeLineAnnotation data = annotation.data;
     return {
@@ -134,6 +135,7 @@
     };
   }
 
+  @override
   Annotation decodeAnnotation(Map json) {
     return new Annotation(json['id'], json['codeOffset'], json['title'],
         data: CodeLineAnnotation.fromJson(json['data'], this));
diff --git a/tests/compiler/dart2js/sourcemaps/tools/source_mapping_test_viewer.dart b/tests/compiler/dart2js/sourcemaps/tools/source_mapping_test_viewer.dart
index f6e7687..ac18b0b 100644
--- a/tests/compiler/dart2js/sourcemaps/tools/source_mapping_test_viewer.dart
+++ b/tests/compiler/dart2js/sourcemaps/tools/source_mapping_test_viewer.dart
@@ -92,7 +92,9 @@
 }
 
 class OutputConfigurations implements Configurations {
+  @override
   final Iterable<String> configs;
+  @override
   final Iterable<String> files;
   final Map<Pair, String> pathMap = {};
   final Map<Pair, Uri> uriMap = {};
@@ -156,6 +158,7 @@
 
   Measurement(this.config, this.filename, this.missing, this.count);
 
+  @override
   String toString() {
     double percentage = 100 * missing / count;
     return "Config '${config}', file: '${filename}': "
diff --git a/tests/compiler/dart2js/static_type/data/null_access.dart b/tests/compiler/dart2js/static_type/data/null_access.dart
new file mode 100644
index 0000000..de65e93
--- /dev/null
+++ b/tests/compiler/dart2js/static_type/data/null_access.dart
@@ -0,0 +1,44 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+main() {
+  test1();
+  test2();
+  test3();
+}
+
+class Class1 {
+  const Class1();
+
+  void method1() {}
+}
+
+test1() {
+  const Class1 c = null;
+  return /*Null*/ c. /*invoke: void*/ method1();
+}
+
+class Class2<T> {
+  const Class2();
+
+  T method2() => null;
+}
+
+test2() {
+  const Class2<int> c = null;
+  // TODO(johnniwinther): Track the unreachable code properly.
+  return /*Null*/ c. /*invoke: <bottom>*/ method2();
+}
+
+class Class3<T> {
+  const Class3();
+
+  Class3<T> method3() => null;
+}
+
+test3() {
+  const Class3<int> c = null;
+  // TODO(johnniwinther): Track the unreachable code properly.
+  return /*Null*/ c. /*invoke: Class3<<bottom>>*/ method3();
+}
diff --git a/tests/compiler/dart2js_extra/22776_test.dart b/tests/compiler/dart2js_extra/22776_test.dart
index 8c355f9..80dbffd1 100644
--- a/tests/compiler/dart2js_extra/22776_test.dart
+++ b/tests/compiler/dart2js_extra/22776_test.dart
@@ -17,6 +17,6 @@
   }
 }
 
-@AssumeDynamic()
-@NoInline()
+@pragma('dart2js:assumeDynamic')
+@pragma('dart2js:noInline')
 id(x) => x;
diff --git a/tests/compiler/dart2js_extra/23404_test.dart b/tests/compiler/dart2js_extra/23404_test.dart
index 65dd8fb..d3b9f46 100644
--- a/tests/compiler/dart2js_extra/23404_test.dart
+++ b/tests/compiler/dart2js_extra/23404_test.dart
@@ -11,8 +11,8 @@
 foo([a = '\u00a0']) => a;
 bar() => '';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(x) => x;
 
 main() {
diff --git a/tests/compiler/dart2js_extra/23432_test.dart b/tests/compiler/dart2js_extra/23432_test.dart
index 2333edb..bbb32ff 100644
--- a/tests/compiler/dart2js_extra/23432_test.dart
+++ b/tests/compiler/dart2js_extra/23432_test.dart
@@ -15,8 +15,8 @@
   }
 }
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 get NEVER => false;
 
 main() {
diff --git a/tests/compiler/dart2js_extra/23828_test.dart b/tests/compiler/dart2js_extra/23828_test.dart
index 53c2221..be5edd5 100644
--- a/tests/compiler/dart2js_extra/23828_test.dart
+++ b/tests/compiler/dart2js_extra/23828_test.dart
@@ -6,8 +6,8 @@
 // Used to fail when methods contain a name starting with `get`
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(x) => x;
 
 class MA {
diff --git a/tests/compiler/dart2js_extra/27199_test.dart b/tests/compiler/dart2js_extra/27199_test.dart
index d4150bf..b2d2fd5 100644
--- a/tests/compiler/dart2js_extra/27199_test.dart
+++ b/tests/compiler/dart2js_extra/27199_test.dart
@@ -16,8 +16,8 @@
   Map<String, ItemListFilter<T>> f = {};
 }
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(x) => x;
 
 main() {
diff --git a/tests/compiler/dart2js_extra/27323_test.dart b/tests/compiler/dart2js_extra/27323_test.dart
index 8e2a919..c8439ec 100644
--- a/tests/compiler/dart2js_extra/27323_test.dart
+++ b/tests/compiler/dart2js_extra/27323_test.dart
@@ -14,7 +14,7 @@
   foo<U, V>() => [U, V];
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(dynamic x) {
   dynamic typeArguments = x.foo<int, String>();
   Expect.equals(int, typeArguments[0]);
diff --git a/tests/compiler/dart2js_extra/28749_test.dart b/tests/compiler/dart2js_extra/28749_test.dart
index 1795ea6..0735aa7 100644
--- a/tests/compiler/dart2js_extra/28749_test.dart
+++ b/tests/compiler/dart2js_extra/28749_test.dart
@@ -19,12 +19,12 @@
 
 class B<W> {
   final field = new Wrap<ConvertFactory<W>>();
-  @NoInline()
+  @pragma('dart2js:noInline')
   B();
 }
 
 class Wrap<X> {
-  @NoInline()
+  @pragma('dart2js:noInline')
   Wrap();
 }
 
diff --git a/tests/compiler/dart2js_extra/33572_test.dart b/tests/compiler/dart2js_extra/33572_test.dart
index b8d475f..2721bf7 100644
--- a/tests/compiler/dart2js_extra/33572_test.dart
+++ b/tests/compiler/dart2js_extra/33572_test.dart
@@ -5,7 +5,6 @@
 // Regression test for issue 32853.
 
 import "package:expect/expect.dart";
-import "package:meta/dart2js.dart" show noInline;
 
 class A {
   final x = null;
@@ -20,7 +19,7 @@
   test(a2, null, 2);
 }
 
-@noInline
+@pragma('dart2js:noInline')
 test(a, expectedX, expectedY) {
   Expect.equals(expectedX, a.x);
   Expect.equals(expectedY, a.y);
diff --git a/tests/compiler/dart2js_extra/34156_test.dart b/tests/compiler/dart2js_extra/34156_test.dart
index c579faf..f4dbb81 100644
--- a/tests/compiler/dart2js_extra/34156_test.dart
+++ b/tests/compiler/dart2js_extra/34156_test.dart
@@ -2,10 +2,9 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'package:meta/dart2js.dart' as dart2js;
 import 'package:expect/expect.dart';
 
-@dart2js.tryInline
+@pragma('dart2js:tryInline')
 // This function should not be inlined. Multiple returns and try-catch cannot
 // currently be inlined correctly.
 method() {
diff --git a/tests/compiler/dart2js_extra/34701_test.dart b/tests/compiler/dart2js_extra/34701_test.dart
index 5612791..708024f 100644
--- a/tests/compiler/dart2js_extra/34701_test.dart
+++ b/tests/compiler/dart2js_extra/34701_test.dart
@@ -8,22 +8,21 @@
 
 import 'dart:async';
 import 'package:expect/expect.dart';
-import 'package:meta/dart2js.dart';
 
 class A {
-  @noInline //# 01: ok
+  @pragma('dart2js:noInline') //# 01: ok
   Future<T> _foo<T>(FutureOr<T> Function() f) async {
     return await f();
   }
 
-  @noInline //# 01: continued
+  @pragma('dart2js:noInline') //# 01: continued
   Future<String> get m async => _foo(() => "a");
 }
 
 class M {}
 
 class B extends A with M {
-  @noInline //# 01: continued
+  @pragma('dart2js:noInline') //# 01: continued
   Future<T> _foo<T>(FutureOr<T> Function() f) => super._foo(f);
 }
 
diff --git a/tests/compiler/dart2js_extra/35853_test.dart b/tests/compiler/dart2js_extra/35853_test.dart
new file mode 100644
index 0000000..3fe033ac
--- /dev/null
+++ b/tests/compiler/dart2js_extra/35853_test.dart
@@ -0,0 +1,34 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:expect/expect.dart';
+
+typedef F1 = int Function(int);
+typedef F2 = int Function(int);
+typedef F3 = int Function(double);
+
+@pragma('dart2js:noInline')
+id(x) => x;
+
+main() {
+  var f1 = F1;
+  var f2 = F2;
+  var f3 = F3;
+  Expect.isTrue(f1 == f2);
+  var result12 = identical(f1, f2);
+  Expect.isFalse(f1 == f3);
+  Expect.isFalse(identical(f1, f3));
+  Expect.isFalse(f2 == f3);
+  Expect.isFalse(identical(f2, f3));
+
+  var g1 = id(F1);
+  var g2 = id(F2);
+  var g3 = id(F3);
+  Expect.isTrue(g1 == g2);
+  Expect.equals(result12, identical(g1, g2));
+  Expect.isFalse(g1 == g3);
+  Expect.isFalse(identical(g1, g3));
+  Expect.isFalse(g2 == g3);
+  Expect.isFalse(identical(g2, g3));
+}
diff --git a/tests/compiler/dart2js_extra/35965a_test.dart b/tests/compiler/dart2js_extra/35965a_test.dart
new file mode 100644
index 0000000..56a3d7a
--- /dev/null
+++ b/tests/compiler/dart2js_extra/35965a_test.dart
@@ -0,0 +1,62 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Regression test for issue 35965.
+//
+// The combination of generator bodies on mixin methods with super-calls caused
+// various kinds of broken generated JavaScript.
+//
+//  - The generator body name had unescaped '&' symbols from the Kernel
+//    synthesized super-mixin-application class.
+//  - The super-mixin-application class was missing the generator body because
+//    it did not expect injected members.
+
+import 'dart:async';
+
+abstract class II {
+  bar();
+}
+
+mixin M on II {
+  // The parameter type check causes the generator to have a body.
+  //
+  // The super call causes the body to be on the super mixin application.
+  //
+  // The super call causes the body to have a name depending on the super mixin
+  // application name.
+  Future<T> foo<T>(T a) async {
+    super.bar();
+    return a;
+  }
+
+  // The parameter type check causes the generator to have a body.
+  //
+  // The super call causes 'fred' to be on the super mixin application.
+  //
+  // The super call causes the closure's call method's generator to have a name
+  // depending on the super mixin application name.
+  fred<T>() => (T a) async {
+        super.bar();
+        return a;
+      };
+}
+
+class BB implements II {
+  bar() {
+    print('BB.bar');
+  }
+}
+
+class UU extends BB with M {}
+
+main() async {
+  print('hello');
+  var uu = UU();
+
+  print(await uu.foo<int>(1));
+  print(await uu.foo<String>("one"));
+
+  print(await uu.fred<int>()(1));
+  print(await uu.fred<String>()("uno"));
+}
diff --git a/tests/compiler/dart2js_extra/assert_with_message_test.dart b/tests/compiler/dart2js_extra/assert_with_message_test.dart
index e860713..993ab11 100644
--- a/tests/compiler/dart2js_extra/assert_with_message_test.dart
+++ b/tests/compiler/dart2js_extra/assert_with_message_test.dart
@@ -4,8 +4,8 @@
 
 import "package:expect/expect.dart";
 
-@AssumeDynamic()
-@NoInline()
+@pragma('dart2js:assumeDynamic')
+@pragma('dart2js:noInline')
 confuse(x) => x;
 
 testFalse(name, fault) {
diff --git a/tests/compiler/dart2js_extra/big_allocation_expression_test.dart b/tests/compiler/dart2js_extra/big_allocation_expression_test.dart
index 4c59f6d..30653a3 100644
--- a/tests/compiler/dart2js_extra/big_allocation_expression_test.dart
+++ b/tests/compiler/dart2js_extra/big_allocation_expression_test.dart
@@ -12,7 +12,7 @@
 
   factory A(a, x) = A.q;
 
-  // @NoInline()  // This annotation causes the test to compile on SSA backend.
+  // @pragma('dart2js:noInline')  // This annotation causes the test to compile on SSA backend.
   A.q(this.a, x) : b = x == null ? null : new W(x);
 }
 
diff --git a/tests/compiler/dart2js_extra/boolean_conversion_test.dart b/tests/compiler/dart2js_extra/boolean_conversion_test.dart
new file mode 100644
index 0000000..46a8994
--- /dev/null
+++ b/tests/compiler/dart2js_extra/boolean_conversion_test.dart
@@ -0,0 +1,104 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=control-flow-collections
+// dart2jsOptions=--omit-implicit-checks
+
+// Note: --omit-implicit-checks causes Expect.isNull to misbehave, so we use
+// Expect.equals(null, ...) instead.
+
+import 'package:expect/expect.dart';
+
+void main() {
+  conditionalTest();
+  orTest();
+  andTest();
+  ifTest();
+  forTest();
+  whileTest();
+  doTest();
+  notTest();
+  ifElementTest();
+  forElementTest();
+}
+
+void conditionalTest() {
+  bool x = null;
+  Expect.isFalse(x ? true : false);
+}
+
+void orTest() {
+  bool x = null;
+  Expect.equals(null, x || x);
+  Expect.isFalse(x || false);
+  Expect.isTrue(x || true);
+  Expect.equals(null, false || x);
+  Expect.isTrue(true || x);
+}
+
+void andTest() {
+  bool x = null;
+  Expect.isFalse(x && x);
+  Expect.isFalse(x && false);
+  Expect.isFalse(x && true);
+  Expect.isFalse(false && x);
+  Expect.equals(null, true && x);
+}
+
+void ifTest() {
+  bool x = null;
+  Expect.isFalse(() {
+    if (x) {
+      return true;
+    } else {
+      return false;
+    }
+  }());
+}
+
+void forTest() {
+  bool x = null;
+  Expect.isFalse(() {
+    for (; x;) {
+      return true;
+    }
+    return false;
+  }());
+}
+
+void whileTest() {
+  bool x = null;
+  Expect.isFalse(() {
+    while (x) {
+      return true;
+    }
+    return false;
+  }());
+}
+
+void doTest() {
+  bool x = null;
+  Expect.equals(1, () {
+    int n = 0;
+    do {
+      n++;
+    } while (x);
+    return n;
+  }());
+}
+
+void notTest() {
+  bool x = null;
+  Expect.isTrue(!x);
+}
+
+void ifElementTest() {
+  bool x = null;
+  Expect.listEquals([], [if (x) 1]);
+}
+
+void forElementTest() {
+  bool x = null;
+  Expect.listEquals([], [for (var i = 0; x; i++) i]);
+}
diff --git a/tests/compiler/dart2js_extra/bounds_check1a_test.dart b/tests/compiler/dart2js_extra/bounds_check1a_test.dart
index 20136a7..b42ca0d 100644
--- a/tests/compiler/dart2js_extra/bounds_check1a_test.dart
+++ b/tests/compiler/dart2js_extra/bounds_check1a_test.dart
@@ -12,6 +12,6 @@
 }
 
 class Class {
-  @NoInline()
+  @pragma('dart2js:noInline')
   method<T extends num>() => null;
 }
diff --git a/tests/compiler/dart2js_extra/bounds_check2a_test.dart b/tests/compiler/dart2js_extra/bounds_check2a_test.dart
index 74bc928..654c71b 100644
--- a/tests/compiler/dart2js_extra/bounds_check2a_test.dart
+++ b/tests/compiler/dart2js_extra/bounds_check2a_test.dart
@@ -12,6 +12,6 @@
 }
 
 class Class<T> {
-  @NoInline()
+  @pragma('dart2js:noInline')
   method<S extends T>() => null;
 }
diff --git a/tests/compiler/dart2js_extra/bounds_check3a_test.dart b/tests/compiler/dart2js_extra/bounds_check3a_test.dart
index 103ab95..482b8ed 100644
--- a/tests/compiler/dart2js_extra/bounds_check3a_test.dart
+++ b/tests/compiler/dart2js_extra/bounds_check3a_test.dart
@@ -12,6 +12,6 @@
 }
 
 class Class {
-  @NoInline()
+  @pragma('dart2js:noInline')
   method<S extends num>() => S;
 }
diff --git a/tests/compiler/dart2js_extra/bounds_check4a_test.dart b/tests/compiler/dart2js_extra/bounds_check4a_test.dart
index f230b2f..49e8d42 100644
--- a/tests/compiler/dart2js_extra/bounds_check4a_test.dart
+++ b/tests/compiler/dart2js_extra/bounds_check4a_test.dart
@@ -12,6 +12,6 @@
 }
 
 class Class<T> {
-  @NoInline()
+  @pragma('dart2js:noInline')
   method<S extends T>() => S;
 }
diff --git a/tests/compiler/dart2js_extra/call_is_function_test.dart b/tests/compiler/dart2js_extra/call_is_function_test.dart
index 8bafb85..8907cad 100644
--- a/tests/compiler/dart2js_extra/call_is_function_test.dart
+++ b/tests/compiler/dart2js_extra/call_is_function_test.dart
@@ -3,13 +3,12 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:expect/expect.dart';
-import 'package:meta/dart2js.dart';
 
 class A {
   call() {}
 }
 
-@noInline
+@pragma('dart2js:noInline')
 test(o) => o is Function;
 
 main() {
diff --git a/tests/compiler/dart2js_extra/call_signature_test.dart b/tests/compiler/dart2js_extra/call_signature_test.dart
index d33feed..20978d5 100644
--- a/tests/compiler/dart2js_extra/call_signature_test.dart
+++ b/tests/compiler/dart2js_extra/call_signature_test.dart
@@ -13,11 +13,11 @@
 }
 
 class B<T> {
-  @NoInline()
+  @pragma('dart2js:noInline')
   m(f) => f is Function(T);
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 create() => new B<A<int>>();
 
 main() {
diff --git a/tests/compiler/dart2js_extra/cfe_instance_constant_test.dart b/tests/compiler/dart2js_extra/cfe_instance_constant_test.dart
new file mode 100644
index 0000000..6fbd051
--- /dev/null
+++ b/tests/compiler/dart2js_extra/cfe_instance_constant_test.dart
@@ -0,0 +1,23 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// dart2jsOptions=--enable-experiment=constant-update-2018
+
+// Regression test for CFE constant evaluation. The evaluation of [Class9.field]
+// assumed that its initializer did not hold an unevaluated constant.
+
+import 'package:expect/expect.dart';
+
+const dynamic zero_ = const bool.fromEnvironment("x") ? null : 0;
+
+class Class9 {
+  final field = zero_;
+  const Class9();
+}
+
+const c0 = const bool.fromEnvironment("x") ? null : const Class9();
+
+main() {
+  Expect.equals(0, c0.field);
+}
diff --git a/tests/compiler/dart2js_extra/checked_setter_test.dart b/tests/compiler/dart2js_extra/checked_setter_test.dart
index 2846015..60ca4fa 100644
--- a/tests/compiler/dart2js_extra/checked_setter_test.dart
+++ b/tests/compiler/dart2js_extra/checked_setter_test.dart
@@ -12,7 +12,7 @@
   int field;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 assign(d) {
   d.field = 0;
 }
diff --git a/tests/compiler/dart2js_extra/closure_signature_unneeded_test.dart b/tests/compiler/dart2js_extra/closure_signature_unneeded_test.dart
index 7712dad..88534c7 100644
--- a/tests/compiler/dart2js_extra/closure_signature_unneeded_test.dart
+++ b/tests/compiler/dart2js_extra/closure_signature_unneeded_test.dart
@@ -5,13 +5,13 @@
 import 'package:expect/expect.dart';
 
 class A<T> {
-  @NoInline()
+  @pragma('dart2js:noInline')
   m() {
     return (T t, String s) {};
   }
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o is void Function(int);
 
 main() {
diff --git a/tests/compiler/dart2js_extra/conditional_send_test.dart b/tests/compiler/dart2js_extra/conditional_send_test.dart
index b064f2e..d1a27c1 100644
--- a/tests/compiler/dart2js_extra/conditional_send_test.dart
+++ b/tests/compiler/dart2js_extra/conditional_send_test.dart
@@ -5,8 +5,8 @@
 // SharedOptions=--enable-null-aware-operators
 import "package:expect/expect.dart";
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(x) => x;
 
 class A {
diff --git a/tests/compiler/dart2js_extra/consistent_add_error_test.dart b/tests/compiler/dart2js_extra/consistent_add_error_test.dart
index 79f18f9..fd5840f 100644
--- a/tests/compiler/dart2js_extra/consistent_add_error_test.dart
+++ b/tests/compiler/dart2js_extra/consistent_add_error_test.dart
@@ -6,8 +6,8 @@
 
 // Test that optimized '+' and slow path '+' produce the same error.
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(x) => x;
 
 void check2(String name, name1, f1, name2, f2) {
diff --git a/tests/compiler/dart2js_extra/consistent_codeUnitAt_error_test.dart b/tests/compiler/dart2js_extra/consistent_codeUnitAt_error_test.dart
index d76bd71..536279b 100644
--- a/tests/compiler/dart2js_extra/consistent_codeUnitAt_error_test.dart
+++ b/tests/compiler/dart2js_extra/consistent_codeUnitAt_error_test.dart
@@ -7,8 +7,8 @@
 // Test that optimized codeUnitAt and slow path codeUnitAt produce the same
 // error.
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(x) => x;
 
 void check2(String name, name1, f1, name2, f2) {
diff --git a/tests/compiler/dart2js_extra/consistent_index_error_array_test.dart b/tests/compiler/dart2js_extra/consistent_index_error_array_test.dart
index 0a3b726..6afa8a9 100644
--- a/tests/compiler/dart2js_extra/consistent_index_error_array_test.dart
+++ b/tests/compiler/dart2js_extra/consistent_index_error_array_test.dart
@@ -7,8 +7,8 @@
 
 // Test that optimized indexing and slow path indexing produce the same error.
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(x) => x;
 
 class TooHigh {
diff --git a/tests/compiler/dart2js_extra/consistent_index_error_string_test.dart b/tests/compiler/dart2js_extra/consistent_index_error_string_test.dart
index 898933f..45155ff 100644
--- a/tests/compiler/dart2js_extra/consistent_index_error_string_test.dart
+++ b/tests/compiler/dart2js_extra/consistent_index_error_string_test.dart
@@ -7,8 +7,8 @@
 
 // Test that optimized indexing and slow path indexing produce the same error.
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(x) => x;
 
 class TooHigh {
diff --git a/tests/compiler/dart2js_extra/consistent_index_error_typed_list_test.dart b/tests/compiler/dart2js_extra/consistent_index_error_typed_list_test.dart
index b086cfa..bf198c6 100644
--- a/tests/compiler/dart2js_extra/consistent_index_error_typed_list_test.dart
+++ b/tests/compiler/dart2js_extra/consistent_index_error_typed_list_test.dart
@@ -7,8 +7,8 @@
 
 // Test that optimized indexing and slow path indexing produce the same error.
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(x) => x;
 
 class TooHigh {
diff --git a/tests/compiler/dart2js_extra/consistent_null_add_error_test.dart b/tests/compiler/dart2js_extra/consistent_null_add_error_test.dart
index 5417ee0..64ad07d 100644
--- a/tests/compiler/dart2js_extra/consistent_null_add_error_test.dart
+++ b/tests/compiler/dart2js_extra/consistent_null_add_error_test.dart
@@ -8,8 +8,8 @@
 //
 // They don't, sometimes we generate null.$add, sometimes JSNull_methods.$add.
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(x) => x;
 
 void check2(String name, name1, f1, name2, f2) {
diff --git a/tests/compiler/dart2js_extra/consistent_subtract_error_test.dart b/tests/compiler/dart2js_extra/consistent_subtract_error_test.dart
index 2c839f7..a847937 100644
--- a/tests/compiler/dart2js_extra/consistent_subtract_error_test.dart
+++ b/tests/compiler/dart2js_extra/consistent_subtract_error_test.dart
@@ -8,8 +8,8 @@
 
 // Test that optimized '-' and slow path '-' produce the same error.
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(x) => x;
 
 void check2(String name, name1, f1, name2, f2) {
diff --git a/tests/compiler/dart2js_extra/constant_folding_test.dart b/tests/compiler/dart2js_extra/constant_folding_test.dart
new file mode 100644
index 0000000..393994a
--- /dev/null
+++ b/tests/compiler/dart2js_extra/constant_folding_test.dart
@@ -0,0 +1,1284 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:expect/expect.dart";
+
+// SharedOptions=--enable-experiment=constant-update-2018
+
+void main() {
+  const BitNot(42, 4294967253).check();
+  const BitNot(4294967253, 42).check();
+  const BitNot(-42, 41).check();
+  const BitNot(-1, 0).check();
+  const BitNot(0, 0xFFFFFFFF).check();
+  const BitNot(4294967295, 0).check();
+  const BitNot(0x12121212121212, 0xEDEDEDED).check();
+  const BitNot(0x7fffffff00000000, 0xffffffff).check();
+  const BitNot(0x8000000000000000, 0xffffffff).check();
+
+  const Negate(0, -0).check();
+  const Negate(-0, 0).check();
+  const Negate(0.0, -0.0).check();
+  const Negate(-0.0, 0.0).check();
+  const Negate(-0.0, 0).check();
+  const Negate(-0, 0.0).check();
+  const Negate(0, -0.0).check();
+  const Negate(0.0, -0).check();
+  const Negate(1, -1).check();
+  const Negate(-1, 1).check();
+  const Negate(1.0, -1.0).check();
+  const Negate(-1.0, 1.0).check();
+  const Negate(3.14, -3.14).check();
+  const Negate(-3.14, 3.14).check();
+  const Negate(4294967295, -4294967295).check();
+  const Negate(-4294967295, 4294967295).check();
+  const Negate(4294967295.5, -4294967295.5).check();
+  const Negate(-4294967295.5, 4294967295.5).check();
+  const Negate(4294967296, -4294967296).check();
+  const Negate(-4294967296, 4294967296).check();
+  const Negate(4294967296.5, -4294967296.5).check();
+  const Negate(-4294967296.5, 4294967296.5).check();
+  const Negate(9007199254740991, -9007199254740991).check();
+  const Negate(-9007199254740991, 9007199254740991).check();
+  const Negate(9007199254740991.5, -9007199254740991.5).check();
+  const Negate(-9007199254740991.5, 9007199254740991.5).check();
+  const Negate(9007199254740992, -9007199254740992).check();
+  const Negate(-9007199254740992, 9007199254740992).check();
+  const Negate(9007199254740992.5, -9007199254740992.5).check();
+  const Negate(-9007199254740992.5, 9007199254740992.5).check();
+  const Negate(double.infinity, double.negativeInfinity).check();
+  const Negate(double.negativeInfinity, double.infinity).check();
+  const Negate(double.maxFinite, -double.maxFinite).check();
+  const Negate(-double.maxFinite, double.maxFinite).check();
+  const Negate(double.minPositive, -double.minPositive).check();
+  const Negate(-double.minPositive, double.minPositive).check();
+  const Negate(double.nan, double.nan).check();
+  const Negate(0x7fffffff00000000, -0x7fffffff00000000).check();
+  const Negate(-0x7fffffff00000000, 0x7fffffff00000000).check();
+  const Negate(0x8000000000000000, -0x8000000000000000).check();
+  const Negate(-0x8000000000000000, 0x8000000000000000).check();
+
+  const Not(true, false).check();
+  const Not(false, true).check();
+
+  const BitAnd(314159, 271828, 262404).check();
+  const BitAnd(271828, 314159, 262404).check();
+  const BitAnd(0, 0, 0).check();
+  const BitAnd(-1, 0, 0).check();
+  const BitAnd(-1, 314159, 314159).check();
+  const BitAnd(-1, 0xFFFFFFFF, 0xFFFFFFFF).check();
+  const BitAnd(0xff, -4, 0xfc).check();
+  const BitAnd(0, 0xFFFFFFFF, 0).check();
+  const BitAnd(0xFFFFFFFF, 0, 0).check();
+  const BitAnd(0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF).check();
+  const BitAnd(0x123456789ABC, 0xEEEEEEEEEEEE, 0x46688AAC).check();
+  const BitAnd(0x7fffffff00008000, 0x8000000000008000, 0x8000).check();
+  const BitAnd(0x8000000000008000, 0x7fffffff00008000, 0x8000).check();
+  const BitAnd(true, true, true).check();
+  const BitAnd(true, false, false).check();
+  const BitAnd(false, true, false).check();
+  const BitAnd(false, false, false).check();
+
+  const BitOr(314159, 271828, 323583).check();
+  const BitOr(271828, 314159, 323583).check();
+  const BitOr(0, 0, 0).check();
+  const BitOr(-8, 0, 0xFFFFFFF8).check();
+  const BitOr(-8, 271828, 0xFFFFFFFC).check();
+  const BitOr(-8, 0xFFFFFFFF, 0xFFFFFFFF).check();
+  const BitOr(0x1, -4, 0xFFFFFFFD).check();
+  const BitOr(0, 0xFFFFFFFF, 0xFFFFFFFF).check();
+  const BitOr(0xFFFFFFFF, 0, 0xFFFFFFFF).check();
+  const BitOr(0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF).check();
+  const BitOr(0x123456789ABC, 0x111111111111, 0x57799BBD).check();
+  const BitOr(0x7000000080000000, 0x8000000000008000, 0x80008000).check();
+  const BitOr(0x8000000000008000, 0x7000000080000000, 0x80008000).check();
+  const BitOr(true, true, true).check();
+  const BitOr(true, false, true).check();
+  const BitOr(false, true, true).check();
+  const BitOr(false, false, false).check();
+
+  const BitXor(314159, 271828, 61179).check();
+  const BitXor(271828, 314159, 61179).check();
+  const BitXor(0, 0, 0).check();
+  const BitXor(-1, 0, 0xFFFFFFFF).check();
+  const BitXor(-256, 1, 0xFFFFFF01).check();
+  const BitXor(-256, -255, 1).check();
+  const BitXor(0, 0xFFFFFFFF, 0xFFFFFFFF).check();
+  const BitXor(0xFFFFFFFF, 0, 0xFFFFFFFF).check();
+  const BitXor(0xFFFFFFFF, 0xFFFFFFFF, 0).check();
+  const BitXor(0x123456789ABC, 0x111111111111, 0x47698BAD).check();
+  const BitXor(0x7000000012340000, 0x8000000011110000, 0x03250000).check();
+  const BitXor(0x8000000011110000, 0x7000000012340000, 0x03250000).check();
+  const BitXor(true, true, false).check();
+  const BitXor(true, false, true).check();
+  const BitXor(false, true, true).check();
+  const BitXor(false, false, false).check();
+
+  const ShiftLeft(42, 0, 42).check();
+  const ShiftLeft(42, 5, 1344).check();
+  const ShiftLeft(1, 31, 0x80000000).check();
+  const ShiftLeft(1, 32, 0).check();
+  const ShiftLeft(1, 100, 0).check();
+  const ShiftLeft(0, 0, 0).check();
+  const ShiftLeft(0, 5, 0).check();
+  const ShiftLeft(0, 31, 0).check();
+  const ShiftLeft(0, 32, 0).check();
+  const ShiftLeft(0, 100, 0).check();
+  const ShiftLeft(-1, 0, 0xFFFFFFFF).check();
+  const ShiftLeft(-1, 5, 0xFFFFFFE0).check();
+  const ShiftLeft(-1, 31, 0x80000000).check();
+  const ShiftLeft(-1, 32, 0).check();
+  const ShiftLeft(-1, 100, 0).check();
+  const ShiftLeft(0x7000000000008000, 0, 0x8000).check();
+  const ShiftLeft(0x7000000000008000, 1, 0x10000).check();
+  const ShiftLeft(0x7000000000008000, 16, 0x80000000).check();
+  const ShiftLeft(0x7000000000008000, 17, 0x0).check();
+  const ShiftLeft(0x8000000000008000, 0, 0x8000).check();
+  const ShiftLeft(0x8000000000008000, 1, 0x10000).check();
+  const ShiftLeft(0x8000000000008000, 16, 0x80000000).check();
+  const ShiftLeft(0x8000000000008000, 17, 0x0).check();
+
+  const ShiftRight(8675309, 0, 8675309).check();
+  const ShiftRight(8675309, 5, 271103).check();
+  const ShiftRight(0xFEDCBA98, 0, 0xFEDCBA98).check();
+  const ShiftRight(0xFEDCBA98, 5, 0x07F6E5D4).check();
+  const ShiftRight(0xFEDCBA98, 31, 1).check();
+  const ShiftRight(0xFEDCBA98, 32, 0).check();
+  const ShiftRight(0xFEDCBA98, 100, 0).check();
+  const ShiftRight(0xFFFFFEDCBA98, 0, 0xFEDCBA98).check();
+  const ShiftRight(0xFFFFFEDCBA98, 5, 0x07F6E5D4).check();
+  const ShiftRight(0xFFFFFEDCBA98, 31, 1).check();
+  const ShiftRight(0xFFFFFEDCBA98, 32, 0).check();
+  const ShiftRight(0xFFFFFEDCBA98, 100, 0).check();
+  const ShiftRight(-1, 0, 0xFFFFFFFF).check();
+  const ShiftRight(-1, 5, 0xFFFFFFFF).check();
+  const ShiftRight(-1, 31, 0xFFFFFFFF).check();
+  const ShiftRight(-1, 32, 0xFFFFFFFF).check();
+  const ShiftRight(-1, 100, 0xFFFFFFFF).check();
+  const ShiftRight(-1073741824, 0, 0xC0000000).check();
+  const ShiftRight(-1073741824, 5, 0xFE000000).check();
+  const ShiftRight(-1073741824, 31, 0xFFFFFFFF).check();
+  const ShiftRight(-1073741824, 32, 0xFFFFFFFF).check();
+  const ShiftRight(-1073741824, 100, 0xFFFFFFFF).check();
+  const ShiftRight(0x7000000000008000, 0, 0x8000).check();
+  const ShiftRight(0x7000000000008000, 1, 0x4000).check();
+  const ShiftRight(0x7000000000008000, 15, 0x1).check();
+  const ShiftRight(0x7000000000008000, 16, 0).check();
+  const ShiftRight(0x8000000000008000, 0, 0x8000).check();
+  const ShiftRight(0x8000000000008000, 1, 0x4000).check();
+  const ShiftRight(0x8000000000008000, 15, 0x1).check();
+  const ShiftRight(0x8000000000008000, 16, 0).check();
+
+  const BooleanAnd(true, true, true).check();
+  const BooleanAnd(true, false, false).check();
+  const BooleanAnd(false, true, false).check();
+  const BooleanAnd(false, false, false).check();
+  const BooleanAnd(false, null, false).check();
+
+  const BooleanOr(true, true, true).check();
+  const BooleanOr(true, false, true).check();
+  const BooleanOr(false, true, true).check();
+  const BooleanOr(false, false, false).check();
+  const BooleanOr(true, null, true).check();
+
+  const Subtract(314159, 271828, 42331).check();
+  const Subtract(271828, 314159, -42331).check();
+  const Subtract(0, 0, 0).check();
+  const Subtract(0, 42, -42).check();
+  const Subtract(0, -42, 42).check();
+  const Subtract(42, 0, 42).check();
+  const Subtract(42, 42, 0).check();
+  const Subtract(42, -42, 84).check();
+  const Subtract(-42, 0, -42).check();
+  const Subtract(-42, 42, -84).check();
+  const Subtract(-42, -42, 0).check();
+  const Subtract(4294967295, -1, 4294967296).check();
+  const Subtract(4294967296, -1, 4294967297).check();
+  const Subtract(9007199254740991, -1, 9007199254740992).check();
+  const Subtract(9007199254740992, -1, 9007199254740992).check();
+  const Subtract(9007199254740992, -100, 9007199254741092).check();
+  const Subtract(-4294967295, 1, -4294967296).check();
+  const Subtract(-4294967296, 1, -4294967297).check();
+  const Subtract(-9007199254740991, 1, -9007199254740992).check();
+  const Subtract(-9007199254740992, 1, -9007199254740992).check();
+  const Subtract(-9007199254740992, 100, -9007199254741092).check();
+  const Subtract(
+          0x7fffffff00000000, -0x7fffffff00000000, 2 * 0x7fffffff00000000)
+      .check();
+  const Subtract(4.2, 1.5, 2.7).check();
+  const Subtract(1.5, 4.2, -2.7).check();
+  const Subtract(1.5, 0, 1.5).check();
+  const Subtract(0, 1.5, -1.5).check();
+  const Subtract(1.5, 1.5, 0.0).check();
+  const Subtract(-1.5, -1.5, 0.0).check();
+  const Subtract(0.0, 0.0, 0.0).check();
+  const Subtract(0.0, -0.0, 0.0).check();
+  const Subtract(-0.0, 0.0, -0.0).check();
+  const Subtract(-0.0, -0.0, 0.0).check();
+  const Subtract(double.maxFinite, -double.maxFinite, double.infinity).check();
+  const Subtract(-double.maxFinite, double.maxFinite, double.negativeInfinity)
+      .check();
+  const Subtract(1.5, double.nan, double.nan).check();
+  const Subtract(double.nan, 1.5, double.nan).check();
+  const Subtract(double.nan, double.nan, double.nan).check();
+  const Subtract(double.nan, double.infinity, double.nan).check();
+  const Subtract(double.nan, double.negativeInfinity, double.nan).check();
+  const Subtract(double.infinity, double.nan, double.nan).check();
+  const Subtract(double.negativeInfinity, double.nan, double.nan).check();
+  const Subtract(double.infinity, double.maxFinite, double.infinity).check();
+  const Subtract(double.infinity, -double.maxFinite, double.infinity).check();
+  const Subtract(
+          double.negativeInfinity, double.maxFinite, double.negativeInfinity)
+      .check();
+  const Subtract(
+          double.negativeInfinity, -double.maxFinite, double.negativeInfinity)
+      .check();
+  const Subtract(1.5, double.infinity, double.negativeInfinity).check();
+  const Subtract(1.5, double.negativeInfinity, double.infinity).check();
+  const Subtract(double.infinity, double.infinity, double.nan).check();
+  const Subtract(double.infinity, double.negativeInfinity, double.infinity)
+      .check();
+  const Subtract(
+          double.negativeInfinity, double.infinity, double.negativeInfinity)
+      .check();
+  const Subtract(double.negativeInfinity, double.negativeInfinity, double.nan)
+      .check();
+  const Subtract(double.minPositive, double.minPositive, 0.0).check();
+  const Subtract(-double.minPositive, -double.minPositive, 0.0).check();
+
+  const Multiply(6, 7, 42).check();
+  const Multiply(-6, 7, -42).check();
+  const Multiply(6, -7, -42).check();
+  const Multiply(-6, -7, 42).check();
+  const Multiply(0, 0, 0).check();
+  const Multiply(0, 7, 0).check();
+  const Multiply(6, 0, 0).check();
+  const Multiply(65536, 65536, 4294967296).check();
+  const Multiply(4294967296, -1, -4294967296).check();
+  const Multiply(-1, 4294967296, -4294967296).check();
+  const Multiply(134217728, 134217728, 18014398509481984).check();
+  const Multiply(18014398509481984, -1, -18014398509481984).check();
+  const Multiply(-1, 18014398509481984, -18014398509481984).check();
+  const Multiply(9000000000000000, 9000000000000000, 8.1e31).check();
+  const Multiply(0x7fff000000000000, 0x8000000000000000, 8.506799558180535e37)
+      .check();
+  const Multiply(0x8000000000000000, 1.2, 11068046444225730000.0).check();
+  const Multiply(3.14, 2.72, 8.5408).check();
+  const Multiply(-3.14, 2.72, -8.5408).check();
+  const Multiply(3.14, -2.72, -8.5408).check();
+  const Multiply(-3.14, -2.72, 8.5408).check();
+  const Multiply(3.14, 0, 0.0).check();
+  const Multiply(0, 2.72, 0.0).check();
+  const Multiply(0.0, 0.0, 0.0).check();
+  const Multiply(0.0, -0.0, -0.0).check();
+  const Multiply(-0.0, 0.0, -0.0).check();
+  const Multiply(-0.0, -0.0, 0.0).check();
+  const Multiply(double.maxFinite, double.maxFinite, double.infinity).check();
+  const Multiply(double.maxFinite, -double.maxFinite, double.negativeInfinity)
+      .check();
+  const Multiply(-double.maxFinite, double.maxFinite, double.negativeInfinity)
+      .check();
+  const Multiply(-double.maxFinite, -double.maxFinite, double.infinity).check();
+  const Multiply(0, double.nan, double.nan).check();
+  const Multiply(double.nan, 0, double.nan).check();
+  const Multiply(double.nan, double.nan, double.nan).check();
+  const Multiply(0, double.infinity, double.nan).check();
+  const Multiply(double.infinity, 0, double.nan).check();
+  const Multiply(0, double.negativeInfinity, double.nan).check();
+  const Multiply(double.negativeInfinity, 0, double.nan).check();
+  const Multiply(-0.0, double.infinity, double.nan).check();
+  const Multiply(double.infinity, -0.0, double.nan).check();
+  const Multiply(-0.0, double.negativeInfinity, double.nan).check();
+  const Multiply(double.negativeInfinity, -0.0, double.nan).check();
+  const Multiply(double.infinity, double.infinity, double.infinity).check();
+  const Multiply(
+          double.infinity, double.negativeInfinity, double.negativeInfinity)
+      .check();
+  const Multiply(
+          double.negativeInfinity, double.infinity, double.negativeInfinity)
+      .check();
+  const Multiply(
+          double.negativeInfinity, double.negativeInfinity, double.infinity)
+      .check();
+  const Multiply(double.minPositive, 0.5, 0.0).check();
+  const Multiply(double.minPositive, -0.5, -0.0).check();
+  const Multiply(-double.minPositive, 0.5, -0.0).check();
+  const Multiply(-double.minPositive, -0.5, 0.0).check();
+  const Multiply(1e-300, -1e-300, -0.0).check();
+  const Multiply(double.minPositive, double.infinity, double.infinity).check();
+  const Multiply(
+          double.minPositive, double.negativeInfinity, double.negativeInfinity)
+      .check();
+  const Multiply(double.minPositive, double.maxFinite, 8.881784197001251e-16)
+      .check();
+
+  const Modulo(27, 314159, 27).check();
+  const Modulo(27, 1, 0).check();
+  const Modulo(27, -1, 0).check();
+  const Modulo(-27, 1, 0).check();
+  const Modulo(-27, -1, 0).check();
+  const Modulo(314159, 27, 14).check();
+  const Modulo(314159, -27, 14).check();
+  const Modulo(-314159, 27, 13).check();
+  const Modulo(-314159, -27, 13).check();
+  const Modulo(4294967295, 4294967296, 4294967295).check();
+  const Modulo(4294967295, -4294967296, 4294967295).check();
+  const Modulo(-4294967295, 4294967296, 1).check();
+  const Modulo(-4294967295, -4294967296, 1).check();
+  const Modulo(9007199254740991, 9007199254740992, 9007199254740991).check();
+  const Modulo(9007199254740991, -9007199254740992, 9007199254740991).check();
+  const Modulo(-9007199254740991, 9007199254740992, 1).check();
+  const Modulo(-9007199254740991, -9007199254740992, 1).check();
+  const Modulo(2.71828, 3.14159, 2.71828).check();
+  const Modulo(2.71828, 1, 0.71828).check();
+  const Modulo(2.71828, -1, 0.71828).check();
+  const Modulo(-2.71828, 1, 0.28171999999999997).check();
+  const Modulo(-2.71828, -1, 0.28171999999999997).check();
+  const Modulo(27.1828, 3.14159, 2.0500800000000012).check();
+  const Modulo(27.1828, -3.14159, 2.0500800000000012).check();
+  const Modulo(-27.1828, 3.14159, 1.0915099999999986).check();
+  const Modulo(-27.1828, -3.14159, 1.0915099999999986).check();
+  const Modulo(42, double.nan, double.nan).check();
+  const Modulo(double.nan, 42, double.nan).check();
+  const Modulo(0, double.nan, double.nan).check();
+  const Modulo(double.nan, double.nan, double.nan).check();
+  const Modulo(double.infinity, double.nan, double.nan).check();
+  const Modulo(double.nan, double.infinity, double.nan).check();
+  const Modulo(0.0, double.infinity, 0).check();
+  const Modulo(-0.0, double.infinity, 0).check();
+  const Modulo(0.0, double.negativeInfinity, 0).check();
+  const Modulo(-0.0, double.negativeInfinity, 0).check();
+  const Modulo(42, double.infinity, 42).check();
+  const Modulo(-42, double.infinity, double.infinity).check();
+  const Modulo(42, double.negativeInfinity, 42).check();
+  const Modulo(-42, double.negativeInfinity, double.infinity).check();
+  const Modulo(double.infinity, 42, double.nan).check();
+  const Modulo(double.infinity, -42, double.nan).check();
+  const Modulo(double.negativeInfinity, 42, double.nan).check();
+  const Modulo(double.negativeInfinity, -42, double.nan).check();
+  const Modulo(double.infinity, double.infinity, double.nan).check();
+  const Modulo(double.negativeInfinity, double.infinity, double.nan).check();
+  const Modulo(double.infinity, double.negativeInfinity, double.nan).check();
+  const Modulo(double.negativeInfinity, double.negativeInfinity, double.nan)
+      .check();
+
+  const TruncatingDivide(27, 314159, 0).check();
+  const TruncatingDivide(27, 1, 27).check();
+  const TruncatingDivide(27, -1, -27).check();
+  const TruncatingDivide(-27, 1, -27).check();
+  const TruncatingDivide(-27, -1, 27).check();
+  const TruncatingDivide(314159, 27, 11635).check();
+  const TruncatingDivide(314159, -27, -11635).check();
+  const TruncatingDivide(-314159, 27, -11635).check();
+  const TruncatingDivide(-314159, -27, 11635).check();
+  const TruncatingDivide(4294967295, 4294967296, 0).check();
+  const TruncatingDivide(4294967295, -4294967296, 0).check();
+  const TruncatingDivide(-4294967295, 4294967296, 0).check();
+  const TruncatingDivide(-4294967295, -4294967296, 0).check();
+  const TruncatingDivide(9007199254740991, 9007199254740992, 0).check();
+  const TruncatingDivide(9007199254740991, -9007199254740992, 0).check();
+  const TruncatingDivide(-9007199254740991, 9007199254740992, 0).check();
+  const TruncatingDivide(-9007199254740991, -9007199254740992, 0).check();
+  const TruncatingDivide(4294967295, 0.5, 8589934590).check();
+  const TruncatingDivide(4294967295, -0.5, -8589934590).check();
+  const TruncatingDivide(-4294967295, 0.5, -8589934590).check();
+  const TruncatingDivide(-4294967295, -0.5, 8589934590).check();
+  const TruncatingDivide(9007199254740991, 0.5, 18014398509481982).check();
+  const TruncatingDivide(9007199254740991, -0.5, -18014398509481982).check();
+  const TruncatingDivide(-9007199254740991, 0.5, -18014398509481982).check();
+  const TruncatingDivide(-9007199254740991, -0.5, 18014398509481982).check();
+  const TruncatingDivide(0x8000000000000000, -1, -0x8000000000000000).check();
+  const TruncatingDivide(2.71828, 3.14159, 0).check();
+  const TruncatingDivide(2.71828, 1, 2).check();
+  const TruncatingDivide(2.71828, -1, -2).check();
+  const TruncatingDivide(-2.71828, 1, -2).check();
+  const TruncatingDivide(-2.71828, -1, 2).check();
+  const TruncatingDivide(27.1828, 3.14159, 8).check();
+  const TruncatingDivide(27.1828, -3.14159, -8).check();
+  const TruncatingDivide(-27.1828, 3.14159, -8).check();
+  const TruncatingDivide(-27.1828, -3.14159, 8).check();
+  const TruncatingDivide(0.0, double.infinity, 0).check();
+  const TruncatingDivide(-0.0, double.infinity, 0).check();
+  const TruncatingDivide(0.0, double.negativeInfinity, 0).check();
+  const TruncatingDivide(-0.0, double.negativeInfinity, 0).check();
+  const TruncatingDivide(42, double.infinity, 0).check();
+  const TruncatingDivide(-42, double.infinity, 0).check();
+  const TruncatingDivide(42, double.negativeInfinity, 0).check();
+  const TruncatingDivide(-42, double.negativeInfinity, 0).check();
+
+  const Divide(27, 3, 9).check();
+  const Divide(27, 1, 27).check();
+  const Divide(27, -1, -27).check();
+  const Divide(-27, 1, -27).check();
+  const Divide(-27, -1, 27).check();
+  const Divide(0, 1, 0).check();
+  const Divide(0, -1, -0.0).check();
+  const Divide(-0.0, 1, -0.0).check();
+  const Divide(-0.0, -1, 0).check();
+  const Divide(314159, 27, 11635.518518518518).check();
+  const Divide(314159, -27, -11635.518518518518).check();
+  const Divide(-314159, 27, -11635.518518518518).check();
+  const Divide(-314159, -27, 11635.518518518518).check();
+  const Divide(4294967295, 4294967296, 0.9999999997671694).check();
+  const Divide(4294967295, -4294967296, -0.9999999997671694).check();
+  const Divide(-4294967295, 4294967296, -0.9999999997671694).check();
+  const Divide(-4294967295, -4294967296, 0.9999999997671694).check();
+  const Divide(9007199254740991, 9007199254740992, 0.9999999999999999).check();
+  const Divide(9007199254740991, -9007199254740992, -0.9999999999999999)
+      .check();
+  const Divide(-9007199254740991, 9007199254740992, -0.9999999999999999)
+      .check();
+  const Divide(-9007199254740991, -9007199254740992, 0.9999999999999999)
+      .check();
+  const Divide(4294967296, 4294967295, 1.0000000002328306).check();
+  const Divide(4294967296, -4294967295, -1.0000000002328306).check();
+  const Divide(-4294967296, 4294967295, -1.0000000002328306).check();
+  const Divide(-4294967296, -4294967295, 1.0000000002328306).check();
+  const Divide(9007199254740992, 9007199254740991, 1.0000000000000002).check();
+  const Divide(9007199254740992, -9007199254740991, -1.0000000000000002)
+      .check();
+  const Divide(-9007199254740992, 9007199254740991, -1.0000000000000002)
+      .check();
+  const Divide(-9007199254740992, -9007199254740991, 1.0000000000000002)
+      .check();
+  const Divide(4294967295, 0.5, 8589934590).check();
+  const Divide(4294967295, -0.5, -8589934590).check();
+  const Divide(-4294967295, 0.5, -8589934590).check();
+  const Divide(-4294967295, -0.5, 8589934590).check();
+  const Divide(9007199254740991, 0.5, 18014398509481982).check();
+  const Divide(9007199254740991, -0.5, -18014398509481982).check();
+  const Divide(-9007199254740991, 0.5, -18014398509481982).check();
+  const Divide(-9007199254740991, -0.5, 18014398509481982).check();
+  const Divide(2.71828, 3.14159, 0.8652561282662601).check();
+  const Divide(2.71828, 1, 2.71828).check();
+  const Divide(2.71828, -1, -2.71828).check();
+  const Divide(-2.71828, 1, -2.71828).check();
+  const Divide(-2.71828, -1, 2.71828).check();
+  const Divide(27.1828, 3.14159, 8.652561282662601).check();
+  const Divide(27.1828, -3.14159, -8.652561282662601).check();
+  const Divide(-27.1828, 3.14159, -8.652561282662601).check();
+  const Divide(-27.1828, -3.14159, 8.652561282662601).check();
+  const Divide(1, 0, double.infinity).check();
+  const Divide(1, -0.0, double.negativeInfinity).check();
+  const Divide(-1, 0, double.negativeInfinity).check();
+  const Divide(-1, -0.0, double.infinity).check();
+  const Divide(0, 0, double.nan).check();
+  const Divide(0, -0.0, double.nan).check();
+  const Divide(-0.0, 0, double.nan).check();
+  const Divide(-0.0, -0.0, double.nan).check();
+  const Divide(double.infinity, 0, double.infinity).check();
+  const Divide(double.infinity, -0.0, double.negativeInfinity).check();
+  const Divide(double.negativeInfinity, 0, double.negativeInfinity).check();
+  const Divide(double.negativeInfinity, -0.0, double.infinity).check();
+  const Divide(double.nan, 0, double.nan).check();
+  const Divide(double.nan, -0.0, double.nan).check();
+  const Divide(double.nan, 1, double.nan).check();
+  const Divide(1, double.nan, double.nan).check();
+  const Divide(0, double.nan, double.nan).check();
+  const Divide(double.nan, double.nan, double.nan).check();
+  const Divide(double.nan, double.infinity, double.nan).check();
+  const Divide(double.infinity, double.nan, double.nan).check();
+  const Divide(double.negativeInfinity, double.nan, double.nan).check();
+  const Divide(double.infinity, 1, double.infinity).check();
+  const Divide(double.infinity, -1, double.negativeInfinity).check();
+  const Divide(double.negativeInfinity, 1, double.negativeInfinity).check();
+  const Divide(double.negativeInfinity, -1, double.infinity).check();
+  const Divide(0, double.infinity, 0).check();
+  const Divide(0, double.negativeInfinity, -0.0).check();
+  const Divide(-0.0, double.infinity, -0.0).check();
+  const Divide(-0.0, double.negativeInfinity, 0).check();
+  const Divide(1, double.infinity, 0).check();
+  const Divide(1, double.negativeInfinity, -0.0).check();
+  const Divide(-1, double.infinity, -0.0).check();
+  const Divide(-1, double.negativeInfinity, 0).check();
+  const Divide(double.infinity, double.infinity, double.nan).check();
+  const Divide(double.minPositive, double.maxFinite, 0).check();
+  const Divide(double.minPositive, -double.maxFinite, -0.0).check();
+  const Divide(-double.minPositive, double.maxFinite, -0.0).check();
+  const Divide(-double.minPositive, -double.maxFinite, 0).check();
+  const Divide(double.maxFinite, double.minPositive, double.infinity).check();
+  const Divide(double.maxFinite, -double.minPositive, double.negativeInfinity)
+      .check();
+  const Divide(-double.maxFinite, double.minPositive, double.negativeInfinity)
+      .check();
+  const Divide(-double.maxFinite, -double.minPositive, double.infinity).check();
+
+  const Add("", "", "").check();
+  const Add("foo", "", "foo").check();
+  const Add("", "bar", "bar").check();
+  const Add("foo", "bar", "foobar").check();
+  const Add(314159, 271828, 585987).check();
+  const Add(314159, -271828, 42331).check();
+  const Add(-314159, 271828, -42331).check();
+  const Add(-314159, -271828, -585987).check();
+  const Add(0, 0, 0).check();
+  const Add(0, 42, 42).check();
+  const Add(0, -42, -42).check();
+  const Add(42, 0, 42).check();
+  const Add(42, 42, 84).check();
+  const Add(42, -42, 0).check();
+  const Add(-42, 0, -42).check();
+  const Add(-42, 42, 0).check();
+  const Add(-42, -42, -84).check();
+  const Add(4294967295, 1, 4294967296).check();
+  const Add(4294967296, 1, 4294967297).check();
+  const Add(9007199254740991, 1, 9007199254740992).check();
+  const Add(9007199254740992, 1, 9007199254740992).check();
+  const Add(9007199254740992, 100, 9007199254741092).check();
+  const Add(-4294967295, -1, -4294967296).check();
+  const Add(-4294967296, -1, -4294967297).check();
+  const Add(-9007199254740991, -1, -9007199254740992).check();
+  const Add(-9007199254740992, -1, -9007199254740992).check();
+  const Add(-9007199254740992, -100, -9007199254741092).check();
+  const Add(4.2, 1.5, 5.7).check();
+  const Add(4.2, -1.5, 2.7).check();
+  const Add(-4.2, 1.5, -2.7).check();
+  const Add(-4.2, -1.5, -5.7).check();
+  const Add(1.5, 0, 1.5).check();
+  const Add(0, 1.5, 1.5).check();
+  const Add(1.5, -1.5, 0.0).check();
+  const Add(-1.5, 1.5, 0.0).check();
+  const Add(0.0, 0.0, 0.0).check();
+  const Add(0.0, -0.0, 0.0).check();
+  const Add(-0.0, 0.0, 0.0).check();
+  const Add(-0.0, -0.0, -0.0).check();
+  const Add(double.maxFinite, double.maxFinite, double.infinity).check();
+  const Add(-double.maxFinite, -double.maxFinite, double.negativeInfinity)
+      .check();
+  const Add(1.5, double.nan, double.nan).check();
+  const Add(double.nan, 1.5, double.nan).check();
+  const Add(double.nan, double.nan, double.nan).check();
+  const Add(double.nan, double.infinity, double.nan).check();
+  const Add(double.nan, double.negativeInfinity, double.nan).check();
+  const Add(double.infinity, double.nan, double.nan).check();
+  const Add(double.negativeInfinity, double.nan, double.nan).check();
+  const Add(double.infinity, -double.maxFinite, double.infinity).check();
+  const Add(double.infinity, double.maxFinite, double.infinity).check();
+  const Add(double.negativeInfinity, -double.maxFinite, double.negativeInfinity)
+      .check();
+  const Add(double.negativeInfinity, double.maxFinite, double.negativeInfinity)
+      .check();
+  const Add(1.5, double.negativeInfinity, double.negativeInfinity).check();
+  const Add(1.5, double.infinity, double.infinity).check();
+  const Add(double.infinity, double.infinity, double.infinity).check();
+  const Add(double.infinity, double.negativeInfinity, double.nan).check();
+  const Add(double.negativeInfinity, double.infinity, double.nan).check();
+  const Add(double.negativeInfinity, double.negativeInfinity,
+          double.negativeInfinity)
+      .check();
+  const Add(double.minPositive, -double.minPositive, 0.0).check();
+  const Add(-double.minPositive, double.minPositive, 0.0).check();
+
+  const Less(double.nan, double.nan, false).check();
+  const Less(double.nan, double.infinity, false).check();
+  const Less(double.infinity, double.nan, false).check();
+  const Less(double.nan, double.maxFinite, false).check();
+  const Less(double.maxFinite, double.nan, false).check();
+  const Less(double.nan, -double.maxFinite, false).check();
+  const Less(-double.maxFinite, double.nan, false).check();
+  const Less(double.nan, double.negativeInfinity, false).check();
+  const Less(double.negativeInfinity, double.nan, false).check();
+  const Less(double.negativeInfinity, double.negativeInfinity, false).check();
+  const Less(double.negativeInfinity, -double.maxFinite, true).check();
+  const Less(-double.maxFinite, double.negativeInfinity, false).check();
+  const Less(-double.maxFinite, -double.maxFinite, false).check();
+  const Less(-double.maxFinite, -9007199254740992, true).check();
+  const Less(-9007199254740992, -double.maxFinite, false).check();
+  const Less(-9007199254740992, -9007199254740992, false).check();
+  const Less(-9007199254740992, -4294967296, true).check();
+  const Less(-4294967296, -9007199254740992, false).check();
+  const Less(-4294967296, -4294967296, false).check();
+  const Less(-4294967296, -42, true).check();
+  const Less(-42, -4294967296, false).check();
+  const Less(-42, -42, false).check();
+  const Less(-42, -42.0, false).check();
+  const Less(-42.0, -42, false).check();
+  const Less(-42.0, -42.0, false).check();
+  const Less(-42, -3.14, true).check();
+  const Less(-3.14, -42, false).check();
+  const Less(-3.14, -3.14, false).check();
+  const Less(-3.14, -double.minPositive, true).check();
+  const Less(-double.minPositive, -3.14, false).check();
+  const Less(-double.minPositive, -double.minPositive, false).check();
+  const Less(-double.minPositive, -0.0, true).check();
+  const Less(-0.0, -double.minPositive, false).check();
+  const Less(-0.0, -0.0, false).check();
+  const Less(0, 0, false).check();
+  const Less(0.0, 0.0, false).check();
+  const Less(-0.0, 0, false).check();
+  const Less(0, -0.0, false).check();
+  const Less(-0.0, 0.0, false).check();
+  const Less(0.0, -0.0, false).check();
+  const Less(0, 0.0, false).check();
+  const Less(0.0, 0, false).check();
+  const Less(0.0, double.minPositive, true).check();
+  const Less(double.minPositive, 0.0, false).check();
+  const Less(double.minPositive, double.minPositive, false).check();
+  const Less(double.minPositive, 3.14, true).check();
+  const Less(3.14, double.minPositive, false).check();
+  const Less(3.14, 3.14, false).check();
+  const Less(3.14, 42, true).check();
+  const Less(42, 3.14, false).check();
+  const Less(42.0, 42.0, false).check();
+  const Less(42, 42.0, false).check();
+  const Less(42.0, 42, false).check();
+  const Less(42, 42, false).check();
+  const Less(42, 4294967296, true).check();
+  const Less(4294967296, 42, false).check();
+  const Less(4294967296, 4294967296, false).check();
+  const Less(4294967296, 9007199254740992, true).check();
+  const Less(9007199254740992, 4294967296, false).check();
+  const Less(9007199254740992, 9007199254740992, false).check();
+  const Less(9007199254740992, double.maxFinite, true).check();
+  const Less(double.maxFinite, 9007199254740992, false).check();
+  const Less(double.maxFinite, double.maxFinite, false).check();
+  const Less(double.maxFinite, double.infinity, true).check();
+  const Less(double.infinity, double.maxFinite, false).check();
+  const Less(double.infinity, double.infinity, false).check();
+  const Less(0x7fffffff00000000, 0x8000000000000000, true).check();
+  const Less(0x8000000000000000, 0x7fffffff00000000, false).check();
+
+  const LessEqual(double.nan, double.nan, false).check();
+  const LessEqual(double.nan, double.infinity, false).check();
+  const LessEqual(double.infinity, double.nan, false).check();
+  const LessEqual(double.nan, double.maxFinite, false).check();
+  const LessEqual(double.maxFinite, double.nan, false).check();
+  const LessEqual(double.nan, -double.maxFinite, false).check();
+  const LessEqual(-double.maxFinite, double.nan, false).check();
+  const LessEqual(double.nan, double.negativeInfinity, false).check();
+  const LessEqual(double.negativeInfinity, double.nan, false).check();
+  const LessEqual(double.negativeInfinity, double.negativeInfinity, true)
+      .check();
+  const LessEqual(double.negativeInfinity, -double.maxFinite, true).check();
+  const LessEqual(-double.maxFinite, double.negativeInfinity, false).check();
+  const LessEqual(-double.maxFinite, -double.maxFinite, true).check();
+  const LessEqual(-double.maxFinite, -9007199254740992, true).check();
+  const LessEqual(-9007199254740992, -double.maxFinite, false).check();
+  const LessEqual(-9007199254740992, -9007199254740992, true).check();
+  const LessEqual(-9007199254740992, -4294967296, true).check();
+  const LessEqual(-4294967296, -9007199254740992, false).check();
+  const LessEqual(-4294967296, -4294967296, true).check();
+  const LessEqual(-4294967296, -42, true).check();
+  const LessEqual(-42, -4294967296, false).check();
+  const LessEqual(-42, -42, true).check();
+  const LessEqual(-42, -42.0, true).check();
+  const LessEqual(-42.0, -42, true).check();
+  const LessEqual(-42.0, -42.0, true).check();
+  const LessEqual(-42, -3.14, true).check();
+  const LessEqual(-3.14, -42, false).check();
+  const LessEqual(-3.14, -3.14, true).check();
+  const LessEqual(-3.14, -double.minPositive, true).check();
+  const LessEqual(-double.minPositive, -3.14, false).check();
+  const LessEqual(-double.minPositive, -double.minPositive, true).check();
+  const LessEqual(-double.minPositive, -0.0, true).check();
+  const LessEqual(-0.0, -double.minPositive, false).check();
+  const LessEqual(-0.0, -0.0, true).check();
+  const LessEqual(0, 0, true).check();
+  const LessEqual(0.0, 0.0, true).check();
+  const LessEqual(-0.0, 0, true).check();
+  const LessEqual(0, -0.0, true).check();
+  const LessEqual(-0.0, 0.0, true).check();
+  const LessEqual(0.0, -0.0, true).check();
+  const LessEqual(0, 0.0, true).check();
+  const LessEqual(0.0, 0, true).check();
+  const LessEqual(0.0, double.minPositive, true).check();
+  const LessEqual(double.minPositive, 0.0, false).check();
+  const LessEqual(double.minPositive, double.minPositive, true).check();
+  const LessEqual(double.minPositive, 3.14, true).check();
+  const LessEqual(3.14, double.minPositive, false).check();
+  const LessEqual(3.14, 3.14, true).check();
+  const LessEqual(3.14, 42, true).check();
+  const LessEqual(42, 3.14, false).check();
+  const LessEqual(42.0, 42.0, true).check();
+  const LessEqual(42, 42.0, true).check();
+  const LessEqual(42.0, 42, true).check();
+  const LessEqual(42, 42, true).check();
+  const LessEqual(42, 4294967296, true).check();
+  const LessEqual(4294967296, 42, false).check();
+  const LessEqual(4294967296, 4294967296, true).check();
+  const LessEqual(4294967296, 9007199254740992, true).check();
+  const LessEqual(9007199254740992, 4294967296, false).check();
+  const LessEqual(9007199254740992, 9007199254740992, true).check();
+  const LessEqual(9007199254740992, double.maxFinite, true).check();
+  const LessEqual(double.maxFinite, 9007199254740992, false).check();
+  const LessEqual(double.maxFinite, double.maxFinite, true).check();
+  const LessEqual(double.maxFinite, double.infinity, true).check();
+  const LessEqual(double.infinity, double.maxFinite, false).check();
+  const LessEqual(double.infinity, double.infinity, true).check();
+  const LessEqual(0x7fffffff00000000, 0x8000000000000000, true).check();
+  const LessEqual(0x8000000000000000, 0x7fffffff00000000, false).check();
+
+  const Greater(double.nan, double.nan, false).check();
+  const Greater(double.nan, double.infinity, false).check();
+  const Greater(double.infinity, double.nan, false).check();
+  const Greater(double.nan, double.maxFinite, false).check();
+  const Greater(double.maxFinite, double.nan, false).check();
+  const Greater(double.nan, -double.maxFinite, false).check();
+  const Greater(-double.maxFinite, double.nan, false).check();
+  const Greater(double.nan, double.negativeInfinity, false).check();
+  const Greater(double.negativeInfinity, double.nan, false).check();
+  const Greater(double.negativeInfinity, double.negativeInfinity, false)
+      .check();
+  const Greater(double.negativeInfinity, -double.maxFinite, false).check();
+  const Greater(-double.maxFinite, double.negativeInfinity, true).check();
+  const Greater(-double.maxFinite, -double.maxFinite, false).check();
+  const Greater(-double.maxFinite, -9007199254740992, false).check();
+  const Greater(-9007199254740992, -double.maxFinite, true).check();
+  const Greater(-9007199254740992, -9007199254740992, false).check();
+  const Greater(-9007199254740992, -4294967296, false).check();
+  const Greater(-4294967296, -9007199254740992, true).check();
+  const Greater(-4294967296, -4294967296, false).check();
+  const Greater(-4294967296, -42, false).check();
+  const Greater(-42, -4294967296, true).check();
+  const Greater(-42, -42, false).check();
+  const Greater(-42, -42.0, false).check();
+  const Greater(-42.0, -42, false).check();
+  const Greater(-42.0, -42.0, false).check();
+  const Greater(-42, -3.14, false).check();
+  const Greater(-3.14, -42, true).check();
+  const Greater(-3.14, -3.14, false).check();
+  const Greater(-3.14, -double.minPositive, false).check();
+  const Greater(-double.minPositive, -3.14, true).check();
+  const Greater(-double.minPositive, -double.minPositive, false).check();
+  const Greater(-double.minPositive, -0.0, false).check();
+  const Greater(-0.0, -double.minPositive, true).check();
+  const Greater(-0.0, -0.0, false).check();
+  const Greater(0, 0, false).check();
+  const Greater(0.0, 0.0, false).check();
+  const Greater(-0.0, 0, false).check();
+  const Greater(0, -0.0, false).check();
+  const Greater(-0.0, 0.0, false).check();
+  const Greater(0.0, -0.0, false).check();
+  const Greater(0, 0.0, false).check();
+  const Greater(0.0, 0, false).check();
+  const Greater(0.0, double.minPositive, false).check();
+  const Greater(double.minPositive, 0.0, true).check();
+  const Greater(double.minPositive, double.minPositive, false).check();
+  const Greater(double.minPositive, 3.14, false).check();
+  const Greater(3.14, double.minPositive, true).check();
+  const Greater(3.14, 3.14, false).check();
+  const Greater(3.14, 42, false).check();
+  const Greater(42, 3.14, true).check();
+  const Greater(42.0, 42.0, false).check();
+  const Greater(42, 42.0, false).check();
+  const Greater(42.0, 42, false).check();
+  const Greater(42, 42, false).check();
+  const Greater(42, 4294967296, false).check();
+  const Greater(4294967296, 42, true).check();
+  const Greater(4294967296, 4294967296, false).check();
+  const Greater(4294967296, 9007199254740992, false).check();
+  const Greater(9007199254740992, 4294967296, true).check();
+  const Greater(9007199254740992, 9007199254740992, false).check();
+  const Greater(9007199254740992, double.maxFinite, false).check();
+  const Greater(double.maxFinite, 9007199254740992, true).check();
+  const Greater(double.maxFinite, double.maxFinite, false).check();
+  const Greater(double.maxFinite, double.infinity, false).check();
+  const Greater(double.infinity, double.maxFinite, true).check();
+  const Greater(double.infinity, double.infinity, false).check();
+  const Greater(0x7fffffff00000000, 0x8000000000000000, false).check();
+  const Greater(0x8000000000000000, 0x7fffffff00000000, true).check();
+
+  const GreaterEqual(double.nan, double.nan, false).check();
+  const GreaterEqual(double.nan, double.infinity, false).check();
+  const GreaterEqual(double.infinity, double.nan, false).check();
+  const GreaterEqual(double.nan, double.maxFinite, false).check();
+  const GreaterEqual(double.maxFinite, double.nan, false).check();
+  const GreaterEqual(double.nan, -double.maxFinite, false).check();
+  const GreaterEqual(-double.maxFinite, double.nan, false).check();
+  const GreaterEqual(double.nan, double.negativeInfinity, false).check();
+  const GreaterEqual(double.negativeInfinity, double.nan, false).check();
+  const GreaterEqual(double.negativeInfinity, double.negativeInfinity, true)
+      .check();
+  const GreaterEqual(double.negativeInfinity, -double.maxFinite, false).check();
+  const GreaterEqual(-double.maxFinite, double.negativeInfinity, true).check();
+  const GreaterEqual(-double.maxFinite, -double.maxFinite, true).check();
+  const GreaterEqual(-double.maxFinite, -9007199254740992, false).check();
+  const GreaterEqual(-9007199254740992, -double.maxFinite, true).check();
+  const GreaterEqual(-9007199254740992, -9007199254740992, true).check();
+  const GreaterEqual(-9007199254740992, -4294967296, false).check();
+  const GreaterEqual(-4294967296, -9007199254740992, true).check();
+  const GreaterEqual(-4294967296, -4294967296, true).check();
+  const GreaterEqual(-4294967296, -42, false).check();
+  const GreaterEqual(-42, -4294967296, true).check();
+  const GreaterEqual(-42, -42, true).check();
+  const GreaterEqual(-42, -42.0, true).check();
+  const GreaterEqual(-42.0, -42, true).check();
+  const GreaterEqual(-42.0, -42.0, true).check();
+  const GreaterEqual(-42, -3.14, false).check();
+  const GreaterEqual(-3.14, -42, true).check();
+  const GreaterEqual(-3.14, -3.14, true).check();
+  const GreaterEqual(-3.14, -double.minPositive, false).check();
+  const GreaterEqual(-double.minPositive, -3.14, true).check();
+  const GreaterEqual(-double.minPositive, -double.minPositive, true).check();
+  const GreaterEqual(-double.minPositive, -0.0, false).check();
+  const GreaterEqual(-0.0, -double.minPositive, true).check();
+  const GreaterEqual(-0.0, -0.0, true).check();
+  const GreaterEqual(0, 0, true).check();
+  const GreaterEqual(0.0, 0.0, true).check();
+  const GreaterEqual(-0.0, 0, true).check();
+  const GreaterEqual(0, -0.0, true).check();
+  const GreaterEqual(-0.0, 0.0, true).check();
+  const GreaterEqual(0.0, -0.0, true).check();
+  const GreaterEqual(0, 0.0, true).check();
+  const GreaterEqual(0.0, 0, true).check();
+  const GreaterEqual(0.0, double.minPositive, false).check();
+  const GreaterEqual(double.minPositive, 0.0, true).check();
+  const GreaterEqual(double.minPositive, double.minPositive, true).check();
+  const GreaterEqual(double.minPositive, 3.14, false).check();
+  const GreaterEqual(3.14, double.minPositive, true).check();
+  const GreaterEqual(3.14, 3.14, true).check();
+  const GreaterEqual(3.14, 42, false).check();
+  const GreaterEqual(42, 3.14, true).check();
+  const GreaterEqual(42.0, 42.0, true).check();
+  const GreaterEqual(42, 42.0, true).check();
+  const GreaterEqual(42.0, 42, true).check();
+  const GreaterEqual(42, 42, true).check();
+  const GreaterEqual(42, 4294967296, false).check();
+  const GreaterEqual(4294967296, 42, true).check();
+  const GreaterEqual(4294967296, 4294967296, true).check();
+  const GreaterEqual(4294967296, 9007199254740992, false).check();
+  const GreaterEqual(9007199254740992, 4294967296, true).check();
+  const GreaterEqual(9007199254740992, 9007199254740992, true).check();
+  const GreaterEqual(9007199254740992, double.maxFinite, false).check();
+  const GreaterEqual(double.maxFinite, 9007199254740992, true).check();
+  const GreaterEqual(double.maxFinite, double.maxFinite, true).check();
+  const GreaterEqual(double.maxFinite, double.infinity, false).check();
+  const GreaterEqual(double.infinity, double.maxFinite, true).check();
+  const GreaterEqual(double.infinity, double.infinity, true).check();
+  const GreaterEqual(0x7fffffff00000000, 0x8000000000000000, false).check();
+  const GreaterEqual(0x8000000000000000, 0x7fffffff00000000, true).check();
+
+  const Equals(null, null, true).check();
+  const Equals(null, "", false).check();
+  const Equals("", null, false).check();
+  const Equals("", "", true).check();
+  const Equals(true, true, true).check();
+  const Equals(false, false, true).check();
+  const Equals(true, false, false).check();
+  const Equals(false, true, false).check();
+  const Equals(0, false, false).check();
+  const Equals(true, 1, false).check();
+  const Equals(double.nan, double.nan, false).check();
+  const Equals(0, 0, true).check();
+  const Equals(0.0, 0.0, true).check();
+  const Equals(-0.0, -0.0, true).check();
+  const Equals(0, 0.0, true).check();
+  const Equals(0.0, 0, true).check();
+  const Equals(0, -0.0, true).check();
+  const Equals(-0.0, 0, true).check();
+  const Equals(0.0, -0.0, true).check();
+  const Equals(-0.0, 0.0, true).check();
+  const Equals(1, 1, true).check();
+  const Equals(1.0, 1.0, true).check();
+  const Equals(1, 1.0, true).check();
+  const Equals(1.0, 1, true).check();
+  const Equals(double.infinity, double.infinity, true).check();
+  const Equals(double.infinity, double.negativeInfinity, false).check();
+  const Equals(double.negativeInfinity, double.infinity, false).check();
+  const Equals(double.negativeInfinity, double.negativeInfinity, true).check();
+  const Equals(0x8000000000000000, 0x8000000000000000, true).check();
+  const Equals(0x8000000000000000, -9223372036854775808, false).check();
+
+  const Identity(null, null, true).check();
+  const Identity(null, "", false).check();
+  const Identity("", null, false).check();
+  const Identity("", "", true).check();
+  const Identity(true, true, true).check();
+  const Identity(false, false, true).check();
+  const Identity(true, false, false).check();
+  const Identity(false, true, false).check();
+  const Identity(0, false, false).check();
+  const Identity(true, 1, false).check();
+  const Identity(double.nan, double.nan, false).check();
+  const Identity(0, 0, true).check();
+  const Identity(0.0, 0.0, true).check();
+  const Identity(-0.0, -0.0, true).check();
+  const Identity(0, 0.0, true).check();
+  const Identity(0.0, 0, true).check();
+  const Identity(0, -0.0, true).check();
+  const Identity(-0.0, 0, true).check();
+  const Identity(0.0, -0.0, true).check();
+  const Identity(-0.0, 0.0, true).check();
+  const Identity(1, 1, true).check();
+  const Identity(1.0, 1.0, true).check();
+  const Identity(1, 1.0, true).check();
+  const Identity(1.0, 1, true).check();
+  const Identity(double.infinity, double.infinity, true).check();
+  const Identity(double.infinity, double.negativeInfinity, false).check();
+  const Identity(double.negativeInfinity, double.infinity, false).check();
+  const Identity(double.negativeInfinity, double.negativeInfinity, true)
+      .check();
+  const Identity(0x8000000000000000, 0x8000000000000000, true).check();
+  const Identity(0x8000000000000000, -9223372036854775808, false).check();
+
+  const IfNull(null, null, null).check();
+  const IfNull(null, 1, 1).check();
+  const IfNull("foo", 1, "foo").check();
+  const IfNull("foo", null, "foo").check();
+}
+
+/// Wraps [Expect.equals] to accommodate JS equality semantics.
+///
+/// Naively using [Expect.equals] causes JS values to be compared with `===`.
+/// This can yield some unintended results:
+///
+/// * Since `NaN === NaN` is `false`, [Expect.equals] will throw even if both
+///   values are `NaN`. Therefore, we check for `NaN` specifically.
+/// * Since `0.0 === -0.0` is `true`, [Expect.equals] will fail to throw if one
+///   constant evaluation results in `0` or `0.0` and the other results in
+///   `-0.0`. Therefore, we additionally check that both values have the same
+///   sign in this case.
+void jsEquals(expected, actual, [String reason = null]) {
+  if (expected is num && actual is num) {
+    if (expected.isNaN && actual.isNaN) return;
+  }
+
+  Expect.equals(expected, actual, reason);
+
+  if (expected == 0 && actual == 0) {
+    Expect.equals(
+        expected.isNegative,
+        actual.isNegative,
+        (reason == null ? "" : "$reason ") +
+            "${expected.toString()} and "
+            "${actual.toString()} have different signs.");
+  }
+}
+
+abstract class TestOp {
+  final expected;
+  final result;
+
+  const TestOp(this.expected, this.result);
+
+  @pragma('dart2js:noInline')
+  checkAll(evalResult) {
+    jsEquals(expected, result,
+        "Frontend constant evaluation does not yield expected value.");
+    jsEquals(expected, evalResult,
+        "Backend constant evaluation does not yield expected value.");
+    jsEquals(expected, eval(), "eval() does not yield expected value.");
+  }
+
+  eval();
+}
+
+class BitNot extends TestOp {
+  final arg;
+
+  const BitNot(this.arg, expected) : super(expected, ~arg);
+
+  @pragma('dart2js:tryInline')
+  check() => checkAll(eval());
+
+  @override
+  @pragma('dart2js:tryInline')
+  eval() => ~arg;
+}
+
+class Negate extends TestOp {
+  final arg;
+
+  const Negate(this.arg, expected) : super(expected, -arg);
+
+  @pragma('dart2js:tryInline')
+  check() => checkAll(eval());
+
+  @override
+  @pragma('dart2js:tryInline')
+  eval() => -arg;
+}
+
+class Not extends TestOp {
+  final arg;
+
+  const Not(this.arg, expected) : super(expected, !arg);
+
+  @pragma('dart2js:tryInline')
+  check() => checkAll(eval());
+
+  @override
+  @pragma('dart2js:tryInline')
+  eval() => !arg;
+}
+
+class BitAnd extends TestOp {
+  final arg1;
+  final arg2;
+
+  const BitAnd(this.arg1, this.arg2, expected) : super(expected, arg1 & arg2);
+
+  @pragma('dart2js:tryInline')
+  check() => checkAll(eval());
+
+  @override
+  @pragma('dart2js:tryInline')
+  eval() => arg1 & arg2;
+}
+
+class BitOr extends TestOp {
+  final arg1;
+  final arg2;
+
+  const BitOr(this.arg1, this.arg2, expected) : super(expected, arg1 | arg2);
+
+  @pragma('dart2js:tryInline')
+  check() => checkAll(eval());
+
+  @override
+  @pragma('dart2js:tryInline')
+  eval() => arg1 | arg2;
+}
+
+class BitXor extends TestOp {
+  final arg1;
+  final arg2;
+
+  const BitXor(this.arg1, this.arg2, expected) : super(expected, arg1 ^ arg2);
+
+  @pragma('dart2js:tryInline')
+  check() => checkAll(eval());
+
+  @override
+  @pragma('dart2js:tryInline')
+  eval() => arg1 ^ arg2;
+}
+
+class ShiftLeft extends TestOp {
+  final arg1;
+  final arg2;
+
+  const ShiftLeft(this.arg1, this.arg2, expected)
+      : super(expected, arg1 << arg2);
+
+  @pragma('dart2js:tryInline')
+  check() => checkAll(eval());
+
+  @override
+  @pragma('dart2js:tryInline')
+  eval() => arg1 << arg2;
+}
+
+class ShiftRight extends TestOp {
+  final arg1;
+  final arg2;
+
+  const ShiftRight(this.arg1, this.arg2, expected)
+      : super(expected, arg1 >> arg2);
+
+  @pragma('dart2js:tryInline')
+  check() => checkAll(eval());
+
+  @override
+  @pragma('dart2js:tryInline')
+  eval() => arg1 >> arg2;
+}
+
+class BooleanAnd extends TestOp {
+  final arg1;
+  final arg2;
+
+  const BooleanAnd(this.arg1, this.arg2, expected)
+      : super(expected, arg1 && arg2);
+
+  @pragma('dart2js:tryInline')
+  check() => checkAll(eval());
+
+  @override
+  @pragma('dart2js:tryInline')
+  eval() => arg1 && arg2;
+}
+
+class BooleanOr extends TestOp {
+  final arg1;
+  final arg2;
+
+  const BooleanOr(this.arg1, this.arg2, expected)
+      : super(expected, arg1 || arg2);
+
+  @pragma('dart2js:tryInline')
+  check() => checkAll(eval());
+
+  @override
+  @pragma('dart2js:tryInline')
+  eval() => arg1 || arg2;
+}
+
+class Subtract extends TestOp {
+  final arg1;
+  final arg2;
+
+  const Subtract(this.arg1, this.arg2, expected) : super(expected, arg1 - arg2);
+
+  @pragma('dart2js:tryInline')
+  check() => checkAll(eval());
+
+  @override
+  @pragma('dart2js:tryInline')
+  eval() => arg1 - arg2;
+}
+
+class Multiply extends TestOp {
+  final arg1;
+  final arg2;
+
+  const Multiply(this.arg1, this.arg2, expected) : super(expected, arg1 * arg2);
+
+  @pragma('dart2js:tryInline')
+  check() => checkAll(eval());
+
+  @override
+  @pragma('dart2js:tryInline')
+  eval() => arg1 * arg2;
+}
+
+class Modulo extends TestOp {
+  final arg1;
+  final arg2;
+
+  const Modulo(this.arg1, this.arg2, expected) : super(expected, arg1 % arg2);
+
+  @pragma('dart2js:tryInline')
+  check() => checkAll(eval());
+
+  @override
+  @pragma('dart2js:tryInline')
+  eval() => arg1 % arg2;
+}
+
+class TruncatingDivide extends TestOp {
+  final arg1;
+  final arg2;
+
+  const TruncatingDivide(this.arg1, this.arg2, expected)
+      : super(expected, arg1 ~/ arg2);
+
+  @pragma('dart2js:tryInline')
+  check() => checkAll(eval());
+
+  @override
+  @pragma('dart2js:tryInline')
+  eval() => arg1 ~/ arg2;
+}
+
+class Divide extends TestOp {
+  final arg1;
+  final arg2;
+
+  const Divide(this.arg1, this.arg2, expected) : super(expected, arg1 / arg2);
+
+  @pragma('dart2js:tryInline')
+  check() => checkAll(eval());
+
+  @override
+  @pragma('dart2js:tryInline')
+  eval() => arg1 / arg2;
+}
+
+class Add extends TestOp {
+  final arg1;
+  final arg2;
+
+  const Add(this.arg1, this.arg2, expected) : super(expected, arg1 + arg2);
+
+  @pragma('dart2js:tryInline')
+  check() => checkAll(eval());
+
+  @pragma('dart2js:tryInline')
+  eval() => arg1 + arg2;
+}
+
+class Less extends TestOp {
+  final arg1;
+  final arg2;
+
+  const Less(this.arg1, this.arg2, expected) : super(expected, arg1 < arg2);
+
+  @pragma('dart2js:tryInline')
+  check() => checkAll(eval());
+
+  @pragma('dart2js:tryInline')
+  eval() => arg1 < arg2;
+}
+
+class LessEqual extends TestOp {
+  final arg1;
+  final arg2;
+
+  const LessEqual(this.arg1, this.arg2, expected)
+      : super(expected, arg1 <= arg2);
+
+  @pragma('dart2js:tryInline')
+  check() => checkAll(eval());
+
+  @pragma('dart2js:tryInline')
+  eval() => arg1 <= arg2;
+}
+
+class Greater extends TestOp {
+  final arg1;
+  final arg2;
+
+  const Greater(this.arg1, this.arg2, expected) : super(expected, arg1 > arg2);
+
+  @pragma('dart2js:tryInline')
+  check() => checkAll(eval());
+
+  @pragma('dart2js:tryInline')
+  eval() => arg1 > arg2;
+}
+
+class GreaterEqual extends TestOp {
+  final arg1;
+  final arg2;
+
+  const GreaterEqual(this.arg1, this.arg2, expected)
+      : super(expected, arg1 >= arg2);
+
+  @pragma('dart2js:tryInline')
+  check() => checkAll(eval());
+
+  @pragma('dart2js:tryInline')
+  eval() => arg1 >= arg2;
+}
+
+class Equals extends TestOp {
+  final arg1;
+  final arg2;
+
+  const Equals(this.arg1, this.arg2, expected) : super(expected, arg1 == arg2);
+
+  @pragma('dart2js:tryInline')
+  check() => checkAll(eval());
+
+  @pragma('dart2js:tryInline')
+  eval() => arg1 == arg2;
+}
+
+class Identity extends TestOp {
+  final arg1;
+  final arg2;
+
+  const Identity(this.arg1, this.arg2, expected)
+      : super(expected, identical(arg1, arg2));
+
+  @pragma('dart2js:tryInline')
+  check() => checkAll(eval());
+
+  @pragma('dart2js:tryInline')
+  eval() => identical(arg1, arg2);
+}
+
+class IfNull extends TestOp {
+  final arg1;
+  final arg2;
+
+  const IfNull(this.arg1, this.arg2, expected) : super(expected, arg1 ?? arg2);
+
+  @pragma('dart2js:tryInline')
+  check() => checkAll(eval());
+
+  @pragma('dart2js:tryInline')
+  eval() => arg1 ?? arg2;
+}
diff --git a/tests/compiler/dart2js_extra/deferred/interface_type_variable_test.dart b/tests/compiler/dart2js_extra/deferred/interface_type_variable_test.dart
index df522df..db4b4f2 100644
--- a/tests/compiler/dart2js_extra/deferred/interface_type_variable_test.dart
+++ b/tests/compiler/dart2js_extra/deferred/interface_type_variable_test.dart
@@ -16,5 +16,5 @@
   });
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 dontInline(x) => x;
diff --git a/tests/compiler/dart2js_extra/deferred/type_literal_test.dart b/tests/compiler/dart2js_extra/deferred/type_literal_test.dart
index d578d8d..25e2c32 100644
--- a/tests/compiler/dart2js_extra/deferred/type_literal_test.dart
+++ b/tests/compiler/dart2js_extra/deferred/type_literal_test.dart
@@ -17,5 +17,5 @@
   Expect.isFalse(confuse(a.A) == confuse(a.B));
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 confuse(x) => x;
diff --git a/tests/compiler/dart2js_extra/deferred/typedef_test.dart b/tests/compiler/dart2js_extra/deferred/typedef_test.dart
index 1ad34a3..fa4cc1f 100644
--- a/tests/compiler/dart2js_extra/deferred/typedef_test.dart
+++ b/tests/compiler/dart2js_extra/deferred/typedef_test.dart
@@ -19,5 +19,5 @@
   Expect.isFalse(confuse(a.C) == confuse(a.D));
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 confuse(x) => x;
diff --git a/tests/compiler/dart2js_extra/deferred/uninstantiated_type_variable_test.dart b/tests/compiler/dart2js_extra/deferred/uninstantiated_type_variable_test.dart
index 17f6045..3bd8b77 100644
--- a/tests/compiler/dart2js_extra/deferred/uninstantiated_type_variable_test.dart
+++ b/tests/compiler/dart2js_extra/deferred/uninstantiated_type_variable_test.dart
@@ -16,5 +16,5 @@
   });
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 dontInline(x) => x;
diff --git a/tests/compiler/dart2js_extra/deferred_inheritance_test.dart b/tests/compiler/dart2js_extra/deferred_inheritance_test.dart
index ff7005c..2443682 100644
--- a/tests/compiler/dart2js_extra/deferred_inheritance_test.dart
+++ b/tests/compiler/dart2js_extra/deferred_inheritance_test.dart
@@ -18,8 +18,8 @@
 /// If the check `y is A` is generated as `y.$isA` then the issue is not
 /// exposed. We use `AssumeDynamic` to ensure that we generate as `y instanceof
 /// A` in JS.
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 check(y) => Expect.isTrue(y is A);
 
 main() {
diff --git a/tests/compiler/dart2js_extra/dynamic_invocation_test.dart b/tests/compiler/dart2js_extra/dynamic_invocation_test.dart
index e36f6b0..28bfdb3 100644
--- a/tests/compiler/dart2js_extra/dynamic_invocation_test.dart
+++ b/tests/compiler/dart2js_extra/dynamic_invocation_test.dart
@@ -17,7 +17,7 @@
   dynamic f2 = new C2();
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 id(o) => o;
 
 main() {
diff --git a/tests/compiler/dart2js_extra/effectively_constant_fields_test.dart b/tests/compiler/dart2js_extra/effectively_constant_fields_test.dart
new file mode 100644
index 0000000..6c9c18b
--- /dev/null
+++ b/tests/compiler/dart2js_extra/effectively_constant_fields_test.dart
@@ -0,0 +1,74 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:expect/expect.dart';
+
+_field4() => 4;
+
+class Class1 {
+  var field1 = 0;
+
+  @pragma('dart2js:noElision')
+  var field2 = 1;
+
+  var field3 = 2;
+
+  var field4 = _field4;
+}
+
+@pragma('dart2js:noInline')
+method1(Class1 c) {
+  return c.field1;
+}
+
+@pragma('dart2js:noInline')
+method2(Class1 c) {
+  return c.field2;
+}
+
+class Class2 {
+  var field3 = 3;
+}
+
+@pragma('dart2js:noInline')
+method3(c) {
+  return c.field3;
+}
+
+class Class3 extends Class1 {
+  @pragma('dart2js:noInline')
+  method4() {
+    return super.field1;
+  }
+}
+
+class Class4 extends Class1 {
+  @pragma('dart2js:noInline')
+  method5() {
+    return super.field4();
+  }
+}
+
+@pragma('dart2js:noInline')
+method6(Class1 c) {
+  return c.field1;
+}
+
+@pragma('dart2js:noInline')
+method7(Class1 c) {
+  return c.field4();
+}
+
+main() {
+  Expect.equals(0, method1(new Class1()));
+  Expect.equals(1, method2(new Class1()));
+  Expect.equals(2, method3(new Class1()));
+  Expect.equals(3, method3(new Class2()));
+  Expect.equals(0, new Class3().method4());
+  Expect.equals(4, new Class4().method5());
+  Expect.equals(0, method6(new Class1()));
+  Expect.throws(() => method6(null));
+  Expect.equals(4, method7(new Class1()));
+  Expect.throws(() => method7(null));
+}
diff --git a/tests/compiler/dart2js_extra/effectively_constant_instance_field_test.dart b/tests/compiler/dart2js_extra/effectively_constant_instance_field_test.dart
new file mode 100644
index 0000000..94020a2
--- /dev/null
+++ b/tests/compiler/dart2js_extra/effectively_constant_instance_field_test.dart
@@ -0,0 +1,27 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// dart2jsOptions=--omit-implicit-checks
+
+import 'package:expect/expect.dart';
+
+class C {
+  const C();
+}
+
+class A {
+  var field = const C();
+}
+
+class B {
+  var field;
+}
+
+@pragma('dart2js:noInline')
+test(o) => o.field;
+
+main() {
+  Expect.isNotNull(test(new A()));
+  Expect.isNull(test(new B()));
+}
diff --git a/tests/compiler/dart2js_extra/fixed_type_argument_implements_test.dart b/tests/compiler/dart2js_extra/fixed_type_argument_implements_test.dart
new file mode 100644
index 0000000..f0c397e
--- /dev/null
+++ b/tests/compiler/dart2js_extra/fixed_type_argument_implements_test.dart
@@ -0,0 +1,22 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test that we emit the relation between B and A even when B is only live
+// as a type argument through the supertype of D.
+
+class A {}
+
+class B implements A {}
+
+class C<T> {}
+
+class D implements C<B> {}
+
+main() {
+  C<A> c = new D();
+  test(c);
+}
+
+@pragma('dart2js:noInline')
+void test(C<A> c) {}
diff --git a/tests/compiler/dart2js_extra/fixed_type_argument_test.dart b/tests/compiler/dart2js_extra/fixed_type_argument_test.dart
new file mode 100644
index 0000000..74ac892
--- /dev/null
+++ b/tests/compiler/dart2js_extra/fixed_type_argument_test.dart
@@ -0,0 +1,22 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test that we emit the relation between B and A even when B is only live
+// as a type argument through the superclass of D.
+
+class A {}
+
+class B implements A {}
+
+class C<T> {
+  @pragma('dart2js:noInline')
+  method(void Function(T) f) {}
+}
+
+class D extends C<B> {}
+
+main() {
+  C<A> c = new D();
+  c.method((A a) {});
+}
diff --git a/tests/compiler/dart2js_extra/function_typed_arguments_test.dart b/tests/compiler/dart2js_extra/function_typed_arguments_test.dart
new file mode 100644
index 0000000..f18daee
--- /dev/null
+++ b/tests/compiler/dart2js_extra/function_typed_arguments_test.dart
@@ -0,0 +1,104 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// dart2jsOptions=--omit-implicit-checks
+
+// Test type tests of function types used a type argument.
+
+import 'package:expect/expect.dart';
+
+class A<T> {}
+
+main() {
+  test1();
+  test2();
+  test3();
+  test4();
+  test5();
+  test6();
+}
+
+class B1<T> {}
+
+class C1 extends B1<int> {}
+
+@pragma('dart2js:noInline')
+test1() {
+  Expect.isTrue(_test1(new A<void Function(C1)>()));
+  Expect.isTrue(_test1(new A<void Function(B1<int>)>())); //# 01: ok
+  Expect.isFalse(_test1(new A<void Function(B1<String>)>()));
+}
+
+@pragma('dart2js:noInline')
+_test1(f) => f is A<void Function(C1)>;
+
+class B2<T> {}
+
+class C2 extends B2<int> {}
+
+@pragma('dart2js:noInline')
+test2() {
+  Expect.isTrue(_test2(new A<C2 Function()>()));
+  Expect.isFalse(_test2(new A<B2<int> Function()>()));
+  Expect.isFalse(_test2(new A<B2<String> Function()>()));
+}
+
+@pragma('dart2js:noInline')
+_test2(f) => f is A<C2 Function()>;
+
+class B3<T> {}
+
+class C3 extends B3<int> {}
+
+@pragma('dart2js:noInline')
+test3() {
+  Expect.isFalse(_test3(new A<void Function(C3)>()));
+  Expect.isTrue(_test3(new A<void Function(B3<int>)>()));
+  Expect.isFalse(_test3(new A<void Function(B3<String>)>()));
+}
+
+@pragma('dart2js:noInline')
+_test3(f) => f is A<void Function(B3<int>)>;
+
+class B4<T> {}
+
+class C4 extends B4<int> {}
+
+@pragma('dart4js:noInline')
+test4() {
+  Expect.isTrue(_test4(new A<C4 Function()>()));
+  Expect.isTrue(_test4(new A<B4<int> Function()>()));
+  Expect.isFalse(_test4(new A<B4<String> Function()>()));
+}
+
+@pragma('dart4js:noInline')
+_test4(f) => f is A<B4<int> Function()>;
+
+class B5<T> {}
+
+class C5 extends B5<int> {}
+
+@pragma('dart2js:noInline')
+test5() {
+  Expect.isTrue(_test5(new A<void Function(C5 Function())>()));
+  Expect.isTrue(_test5(new A<void Function(B5<int> Function())>())); //# 02: ok
+  Expect.isFalse(_test5(new A<void Function(B5<String> Function())>()));
+}
+
+@pragma('dart2js:noInline')
+_test5(f) => f is A<void Function(C5 Function())>;
+
+class B6<T> {}
+
+class C6 extends B6<int> {}
+
+@pragma('dart2js:noInline')
+test6() {
+  Expect.isTrue(_test6(new A<void Function(void Function(C6))>()));
+  Expect.isFalse(_test6(new A<void Function(void Function(B6<int>))>()));
+  Expect.isFalse(_test6(new A<void Function(void Function(B6<String>))>()));
+}
+
+@pragma('dart2js:noInline')
+_test6(f) => f is A<void Function(void Function(C6))>;
diff --git a/tests/compiler/dart2js_extra/generic_class_is_test.dart b/tests/compiler/dart2js_extra/generic_class_is_test.dart
index d97cb7c..6026b8d 100644
--- a/tests/compiler/dart2js_extra/generic_class_is_test.dart
+++ b/tests/compiler/dart2js_extra/generic_class_is_test.dart
@@ -3,14 +3,13 @@
 // BSD-style license that can be found in the LICENSE file.
 
 import 'package:expect/expect.dart';
-import 'package:meta/dart2js.dart';
 
 class A<T> {}
 
 class A1 implements A<C1> {}
 
 class B<T> {
-  @noInline
+  @pragma('dart2js:noInline')
   method(var t) => t is T;
 }
 
diff --git a/tests/compiler/dart2js_extra/generic_in_mixin_field_test.dart b/tests/compiler/dart2js_extra/generic_in_mixin_field_test.dart
index cb5e219..6018432 100644
--- a/tests/compiler/dart2js_extra/generic_in_mixin_field_test.dart
+++ b/tests/compiler/dart2js_extra/generic_in_mixin_field_test.dart
@@ -19,7 +19,7 @@
 
 class Class extends SuperClass<int> {}
 
-@NoInline()
+@pragma('dart2js:noInline')
 createClass() => new Class();
 
 main() {
diff --git a/tests/compiler/dart2js_extra/generic_in_redirect_test.dart b/tests/compiler/dart2js_extra/generic_in_redirect_test.dart
index 6da3750..35e4564 100644
--- a/tests/compiler/dart2js_extra/generic_in_redirect_test.dart
+++ b/tests/compiler/dart2js_extra/generic_in_redirect_test.dart
@@ -22,7 +22,7 @@
 
 class Class extends SuperClass<int> {}
 
-@NoInline()
+@pragma('dart2js:noInline')
 createClass() => new Class();
 
 main() {
diff --git a/tests/compiler/dart2js_extra/generic_in_super_test.dart b/tests/compiler/dart2js_extra/generic_in_super_test.dart
index a4f52d4..79bc8c9 100644
--- a/tests/compiler/dart2js_extra/generic_in_super_test.dart
+++ b/tests/compiler/dart2js_extra/generic_in_super_test.dart
@@ -23,7 +23,7 @@
 
 class Class extends SuperClass<int> {}
 
-@NoInline()
+@pragma('dart2js:noInline')
 createClass() => new Class();
 
 main() {
diff --git a/tests/compiler/dart2js_extra/generic_method_dynamic_is_test.dart b/tests/compiler/dart2js_extra/generic_method_dynamic_is_test.dart
index 4f3a720..ff95b2b 100644
--- a/tests/compiler/dart2js_extra/generic_method_dynamic_is_test.dart
+++ b/tests/compiler/dart2js_extra/generic_method_dynamic_is_test.dart
@@ -13,16 +13,16 @@
 class D {}
 
 class E {
-  @NoInline()
+  @pragma('dart2js:noInline')
   m<T>() => new C<T>();
 }
 
 class F {
-  @NoInline()
+  @pragma('dart2js:noInline')
   m<T>() => false;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o is C<A>;
 
 main() {
diff --git a/tests/compiler/dart2js_extra/generic_method_static_is_test.dart b/tests/compiler/dart2js_extra/generic_method_static_is_test.dart
index 946fa1c..c05be8c 100644
--- a/tests/compiler/dart2js_extra/generic_method_static_is_test.dart
+++ b/tests/compiler/dart2js_extra/generic_method_static_is_test.dart
@@ -12,10 +12,10 @@
 
 class D {}
 
-@NoInline()
+@pragma('dart2js:noInline')
 m<T>() => new C<T>();
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o is C<A>;
 
 main() {
diff --git a/tests/compiler/dart2js_extra/hash_code_test.dart b/tests/compiler/dart2js_extra/hash_code_test.dart
index 8de6313..cb6789c 100644
--- a/tests/compiler/dart2js_extra/hash_code_test.dart
+++ b/tests/compiler/dart2js_extra/hash_code_test.dart
@@ -7,8 +7,8 @@
 // dart2js specific test to make sure hashCode on intercepted types behaves as
 // intended.
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(x) => x;
 
 class Hasher {
diff --git a/tests/compiler/dart2js_extra/if_null_test.dart b/tests/compiler/dart2js_extra/if_null_test.dart
index ed3f23a5..8b16c6b 100644
--- a/tests/compiler/dart2js_extra/if_null_test.dart
+++ b/tests/compiler/dart2js_extra/if_null_test.dart
@@ -4,8 +4,8 @@
 
 import "package:expect/expect.dart";
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(x) => x;
 
 main(args) {
diff --git a/tests/compiler/dart2js_extra/injected_cast_test.dart b/tests/compiler/dart2js_extra/injected_cast_test.dart
new file mode 100644
index 0000000..3ab671c
--- /dev/null
+++ b/tests/compiler/dart2js_extra/injected_cast_test.dart
@@ -0,0 +1,46 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:expect/expect.dart';
+
+var field;
+
+class Class {
+  @pragma('dart2js:noInline')
+  method(int i, int j, int k) {}
+}
+
+@pragma('dart2js:noInline')
+test1(dynamic c, num n) {
+  if (c is Class) {
+    c.method(field = 41, n, field = 42);
+  }
+}
+
+@pragma('dart2js:noInline')
+test2(dynamic c, num n) {
+  if (c is! Class) return;
+  c.method(field = 86, n, field = 87);
+}
+
+main() {
+  try {
+    test1(new Class(), 0.5);
+    field = 123;
+    field = 123;
+  } catch (e) {}
+  // CFE inserts the implicit cast directly on the argument expression, making
+  // it fail before later arguments are evaluated.
+  Expect.equals(41, field);
+
+  try {
+    test2(new Class(), 0.5);
+    field = 321;
+    field = 321;
+  } catch (e) {}
+  // dart2js inserts implicit casts, but does so after evaluating all arguments
+  // to ensure semantics match what it would be like to check the types when
+  // entering the callee.
+  Expect.equals(87, field);
+}
diff --git a/tests/compiler/dart2js_extra/instantiation_stub_test.dart b/tests/compiler/dart2js_extra/instantiation_stub_test.dart
index d62266f..23003bc 100644
--- a/tests/compiler/dart2js_extra/instantiation_stub_test.dart
+++ b/tests/compiler/dart2js_extra/instantiation_stub_test.dart
@@ -7,30 +7,30 @@
 import 'package:expect/expect.dart';
 
 // This needs one-arg instantiation.
-@NoInline()
+@pragma('dart2js:noInline')
 T f1a<T>(T t) => t;
 
 // This needs no instantiation because it is not closurized.
-@NoInline()
+@pragma('dart2js:noInline')
 T f1b<T>(T t1, T t2) => t1;
 
 class Class {
   // This needs two-arg instantiation.
-  @NoInline()
+  @pragma('dart2js:noInline')
   bool f2a<T, S>(T t, S s) => t == s;
 
   // This needs no instantiation because it is not closurized.
-  @NoInline()
+  @pragma('dart2js:noInline')
   bool f2b<T, S>(T t, S s1, S s2) => t == s1;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 int method1(int i, int Function(int) f) => f(i);
 
-@NoInline()
+@pragma('dart2js:noInline')
 bool method2(int a, int b, bool Function(int, int) f) => f(a, b);
 
-@NoInline()
+@pragma('dart2js:noInline')
 int method3(int a, int b, int c, int Function(int, int, int) f) => f(a, b, c);
 
 main() {
diff --git a/tests/compiler/dart2js_extra/interceptor_named_arguments_test.dart b/tests/compiler/dart2js_extra/interceptor_named_arguments_test.dart
index 32e9282..407ac93 100644
--- a/tests/compiler/dart2js_extra/interceptor_named_arguments_test.dart
+++ b/tests/compiler/dart2js_extra/interceptor_named_arguments_test.dart
@@ -19,27 +19,27 @@
   }
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 bool wontTell(bool x) => x;
 
 // Ensure that we use the interceptor only once per context so that we
 // actually get a one-shot interceptor. This is a little brittle...
-@NoInline()
+@pragma('dart2js:noInline')
 testA(thing) {
   Expect.equals(0, thing.createFragment(null));
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 testB(thing) {
   Expect.equals(2, thing.createFragment(null, validator: 1));
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 testC(thing) {
   Expect.equals(1, thing.createFragment(null, treeSanitizer: 1));
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 testD(thing) {
   Expect.equals(3, thing.createFragment(null, validator: 1, treeSanitizer: 1));
 }
diff --git a/tests/compiler/dart2js_extra/issue36562_test.dart b/tests/compiler/dart2js_extra/issue36562_test.dart
new file mode 100644
index 0000000..cd43f16
--- /dev/null
+++ b/tests/compiler/dart2js_extra/issue36562_test.dart
@@ -0,0 +1,12 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+const int x = 0;
+
+const List<int> l = const [
+  1,
+  -x,
+];
+
+main() => print(l);
diff --git a/tests/compiler/dart2js_extra/js_array_index_error_test.dart b/tests/compiler/dart2js_extra/js_array_index_error_test.dart
index be5e310..8af893a 100644
--- a/tests/compiler/dart2js_extra/js_array_index_error_test.dart
+++ b/tests/compiler/dart2js_extra/js_array_index_error_test.dart
@@ -7,8 +7,8 @@
 
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(x) => x;
 
 Error getError(action(), name, part) {
diff --git a/tests/compiler/dart2js_extra/js_array_removeLast_error_test.dart b/tests/compiler/dart2js_extra/js_array_removeLast_error_test.dart
index bca0eab..5241f55 100644
--- a/tests/compiler/dart2js_extra/js_array_removeLast_error_test.dart
+++ b/tests/compiler/dart2js_extra/js_array_removeLast_error_test.dart
@@ -7,8 +7,8 @@
 
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(x) => x;
 
 Error getError(action()) {
diff --git a/tests/compiler/dart2js_extra/local_function_generic_strong_test.dart b/tests/compiler/dart2js_extra/local_function_generic_strong_test.dart
index c7d3ec5..b622a6a 100644
--- a/tests/compiler/dart2js_extra/local_function_generic_strong_test.dart
+++ b/tests/compiler/dart2js_extra/local_function_generic_strong_test.dart
@@ -11,7 +11,7 @@
   return local;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o is S Function<S>(S);
 
 main() {
diff --git a/tests/compiler/dart2js_extra/local_function_signatures_strong_test.dart b/tests/compiler/dart2js_extra/local_function_signatures_strong_test.dart
index d6f4f31..f1df515 100644
--- a/tests/compiler/dart2js_extra/local_function_signatures_strong_test.dart
+++ b/tests/compiler/dart2js_extra/local_function_signatures_strong_test.dart
@@ -92,7 +92,7 @@
   return local;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o is num Function(num);
 
 main() {
diff --git a/tests/compiler/dart2js_extra/local_function_signatures_test.dart b/tests/compiler/dart2js_extra/local_function_signatures_test.dart
index 76ce246e..11bfb83 100644
--- a/tests/compiler/dart2js_extra/local_function_signatures_test.dart
+++ b/tests/compiler/dart2js_extra/local_function_signatures_test.dart
@@ -44,7 +44,7 @@
   }
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o is num Function(num);
 
 main() {
diff --git a/tests/compiler/dart2js_extra/local_signature_test.dart b/tests/compiler/dart2js_extra/local_signature_test.dart
index 8d39233..eac7ab0 100644
--- a/tests/compiler/dart2js_extra/local_signature_test.dart
+++ b/tests/compiler/dart2js_extra/local_signature_test.dart
@@ -4,14 +4,14 @@
 
 import 'package:expect/expect.dart';
 
-@NoInline()
+@pragma('dart2js:noInline')
 test1(o) => o is Function(int);
 
-@NoInline()
+@pragma('dart2js:noInline')
 test2(o) => o is Function<T>(T);
 
 class C<S> {
-  @NoInline()
+  @pragma('dart2js:noInline')
   test(bool expected) {
     local1(int i) {}
     local2<T>(T t) {}
diff --git a/tests/compiler/dart2js_extra/method_signatures_strong_test.dart b/tests/compiler/dart2js_extra/method_signatures_strong_test.dart
index d23ed34..3e3f256 100644
--- a/tests/compiler/dart2js_extra/method_signatures_strong_test.dart
+++ b/tests/compiler/dart2js_extra/method_signatures_strong_test.dart
@@ -32,7 +32,7 @@
 
 num method9<T>(num n, T t) => null;
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o is num Function(num);
 
 forceInstantiation(num Function(num) f) => f;
diff --git a/tests/compiler/dart2js_extra/method_signatures_test.dart b/tests/compiler/dart2js_extra/method_signatures_test.dart
index 569b329..79d0c7f 100644
--- a/tests/compiler/dart2js_extra/method_signatures_test.dart
+++ b/tests/compiler/dart2js_extra/method_signatures_test.dart
@@ -32,7 +32,7 @@
 
 Object method9(num n) => null;
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o is num Function(num);
 
 main() {
diff --git a/tests/compiler/dart2js_extra/minus_zero_test.dart b/tests/compiler/dart2js_extra/minus_zero_test.dart
index 3b52434..bc3c0b6 100644
--- a/tests/compiler/dart2js_extra/minus_zero_test.dart
+++ b/tests/compiler/dart2js_extra/minus_zero_test.dart
@@ -6,7 +6,7 @@
 
 import "package:expect/expect.dart";
 
-@NoInline()
+@pragma('dart2js:noInline')
 num minusZero() => -0;
 
 void main() {
diff --git a/tests/compiler/dart2js_extra/mixin_subtype_test.dart b/tests/compiler/dart2js_extra/mixin_subtype_test.dart
index c96789a..287776c 100644
--- a/tests/compiler/dart2js_extra/mixin_subtype_test.dart
+++ b/tests/compiler/dart2js_extra/mixin_subtype_test.dart
@@ -36,7 +36,7 @@
 
 class E5 extends D5 {}
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) {}
 
 main() {
@@ -50,4 +50,4 @@
   Expect.subtype<D4, M4>();
   Expect.subtype<D5, M5>();
   Expect.subtype<E5, M5>();
-}
\ No newline at end of file
+}
diff --git a/tests/compiler/dart2js_extra/named_mixin_runtime_type_test.dart b/tests/compiler/dart2js_extra/named_mixin_runtime_type_test.dart
index ec4adf2..9059803 100644
--- a/tests/compiler/dart2js_extra/named_mixin_runtime_type_test.dart
+++ b/tests/compiler/dart2js_extra/named_mixin_runtime_type_test.dart
@@ -10,7 +10,7 @@
 
 class C = B with A;
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => o.runtimeType;
 
 main() {
diff --git a/tests/compiler/dart2js_extra/no_such_method_strong11_test.dart b/tests/compiler/dart2js_extra/no_such_method_strong11_test.dart
index bc0a85c..ad09aef 100644
--- a/tests/compiler/dart2js_extra/no_such_method_strong11_test.dart
+++ b/tests/compiler/dart2js_extra/no_such_method_strong11_test.dart
@@ -36,6 +36,6 @@
   Expect.equals(-1, (a._m4)());
 }
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(x) => x;
diff --git a/tests/compiler/dart2js_extra/null_stacktrace_test.dart b/tests/compiler/dart2js_extra/null_stacktrace_test.dart
new file mode 100644
index 0000000..6e95443
--- /dev/null
+++ b/tests/compiler/dart2js_extra/null_stacktrace_test.dart
@@ -0,0 +1,42 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+/// Regression test: stack trace can be null when using async-await.
+import 'dart:async';
+
+import 'package:expect/expect.dart';
+
+main() async {
+  C value = await test();
+  Expect.equals("[[null]]", "$value");
+}
+
+Future<C> test() async {
+  try {
+    await throwInFuture();
+    return C(StackTrace.fromString("no-throw"));
+  } on MyException catch (e, s) {
+    return C(s); // Note: s is null
+  }
+}
+
+Future<int> throwInFuture() {
+  var completer = new Completer<int>();
+  var future = completer.future;
+  new Future(() {}).then((_) {
+    StackTrace.fromString("hi");
+    completer.completeError(new MyException());
+  });
+  return future;
+}
+
+class MyException {}
+
+class C {
+  final StackTrace _s; // Global inference used to infer this field as non-null
+  C(this._s);
+
+  @override
+  String toString() => '[[$_s]]';
+}
diff --git a/tests/compiler/dart2js_extra/operator_test.dart b/tests/compiler/dart2js_extra/operator_test.dart
index 0f757c2..65edd95 100644
--- a/tests/compiler/dart2js_extra/operator_test.dart
+++ b/tests/compiler/dart2js_extra/operator_test.dart
@@ -4,18 +4,18 @@
 
 import "package:expect/expect.dart";
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(x) => x;
 
-@NoInline()
+@pragma('dart2js:noInline')
 asNum(x) {
   var result = confuse(x);
   if (result is num) return result;
   throw new ArgumentError.value(x);
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 uint31(x) {
   var result = confuse(x);
   if (x is int) {
@@ -25,7 +25,7 @@
   throw new ArgumentError('Not uint31: $x');
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 uint32(x) {
   var result = confuse(x);
   if (x is int) {
@@ -35,67 +35,67 @@
   throw new ArgumentError('Not uint32: $x');
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 int zero() {
   return 0;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 int one() {
   return 1;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 int minus1() {
   return 0 - 1;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 int minus2() {
   return 0 - 2;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 int two() {
   return 2;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 int three() {
   return 3;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 int five() {
   return 5;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 int minus5() {
   return 0 - 5;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 int ninetyNine() {
   return 99;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 int four99() {
   return 499;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 int four99times99() {
   return 499 * 99;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 int four99times99plus1() {
   return 499 * 99 + 1;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 void addTest() {
   var m1 = 0 - 1;
   Expect.equals(0, 0 + 0);
@@ -111,7 +111,7 @@
   Expect.equals(2, one() + one());
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 void subTest() {
   var m1 = 0 - 1;
   Expect.equals(0, 0 - 0);
@@ -123,7 +123,7 @@
   Expect.equals(0, one() - one());
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 void mulTest() {
   var m1 = 0 - 1;
   Expect.equals(0, 0 * 0);
@@ -135,7 +135,7 @@
   Expect.equals(49401, four99() * 99);
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 void divTest() {
   var m1 = 0.0 - 1.0;
   var m2 = 0 - 2;
@@ -158,7 +158,7 @@
   Expect.equals(1.5, confuse(150) / confuse(100));
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 void tdivTest() {
   var m1 = 0 - 1;
   var m2 = 0 - 2;
@@ -232,7 +232,7 @@
   Expect.throws(() => double.nan ~/ 2);
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 void modTest() {
   var m5 = 0 - 5;
   var m3 = 0 - 3;
@@ -250,7 +250,7 @@
   Expect.equals(2, five() % m3);
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 void remainderTest() {
   var m5 = 0 - 5;
   Expect.equals(2, confuse(5).remainder(3));
@@ -279,7 +279,7 @@
   Expect.equals(2, five().remainder(-3));
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 void shlTest() {
   Expect.equals(2, 1 << 1);
   Expect.equals(8, 1 << 3);
@@ -298,7 +298,7 @@
   Expect.equals(24, 3 << asNum(3));
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 void shrTest() {
   Expect.equals(1, 2 >> 1);
   Expect.equals(1, 8 >> 3);
@@ -318,7 +318,7 @@
   Expect.equals(0, asNum(0xffffffff) >> 32);
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 void andTest() {
   Expect.equals(2, 10 & 3);
   Expect.equals(7, 15 & 7);
@@ -332,7 +332,7 @@
   Expect.equals(0, asNum(0x7ffffffe) & asNum(1));
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 void orTest() {
   Expect.equals(11, 10 | 3);
   Expect.equals(15, 15 | 7);
@@ -346,7 +346,7 @@
   Expect.equals(10, asNum(10) | 10);
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 void xorTest() {
   Expect.equals(9, 10 ^ 3);
   Expect.equals(8, 15 ^ 7);
@@ -358,12 +358,12 @@
   Expect.equals(6, minus5() ^ -3);
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 void notTest() {
   Expect.equals(4, ~minus5());
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 void negateTest() {
   Expect.equals(minus5(), -5);
   Expect.equals(-5, -five());
@@ -377,7 +377,7 @@
   Expect.equals(3, -asNum(-3));
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 void equalsTest() {
   // Equality of normal numbers is already well tested with "Expect.equals".
   Expect.equals(true, true == true);
@@ -421,7 +421,7 @@
   Expect.equals(false, null == falseValue);
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 void lessTest() {
   var m1 = minus1();
   Expect.equals(true, 1 < 2);
@@ -449,7 +449,7 @@
   Expect.equals(false, minus1() < minus1());
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 void lessEqualTest() {
   var m1 = minus1();
   Expect.equals(true, 1 <= 2);
@@ -485,7 +485,7 @@
   Expect.equals(true, minus1() <= minus1());
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 void greaterTest() {
   var m1 = minus1();
   Expect.equals(false, 1 > 2);
@@ -513,7 +513,7 @@
   Expect.equals(false, minus1() > minus1());
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 void greaterEqualTest() {
   var m1 = minus1();
   Expect.equals(false, 1 >= 2);
diff --git a/tests/compiler/dart2js_extra/regress_36222_test.dart b/tests/compiler/dart2js_extra/regress_36222_test.dart
new file mode 100644
index 0000000..f030833
--- /dev/null
+++ b/tests/compiler/dart2js_extra/regress_36222_test.dart
@@ -0,0 +1,23 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+typedef int BinaryFunc(int x, int y);
+
+class A {
+  const A({this.foo = A.defaultFoo});
+
+  static int defaultFoo(int x, int y) {
+    return x + y;
+  }
+
+  final BinaryFunc foo;
+}
+
+@pragma('dart2js:assumeDynamic')
+@pragma('dart2js:noInline')
+test(dynamic a) => a.foo(1, 2);
+
+main() {
+  test(new A());
+}
diff --git a/tests/compiler/dart2js_extra/replaced_type_variable_test.dart b/tests/compiler/dart2js_extra/replaced_type_variable_test.dart
index f530000..e95ea81 100644
--- a/tests/compiler/dart2js_extra/replaced_type_variable_test.dart
+++ b/tests/compiler/dart2js_extra/replaced_type_variable_test.dart
@@ -13,7 +13,7 @@
 
 class A {}
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(o) => Expect.notEquals('dynamic', '$o');
 
 main() {
diff --git a/tests/compiler/dart2js_extra/round_constant_folding_test.dart b/tests/compiler/dart2js_extra/round_constant_folding_test.dart
index d07788e..9c0a1fe 100644
--- a/tests/compiler/dart2js_extra/round_constant_folding_test.dart
+++ b/tests/compiler/dart2js_extra/round_constant_folding_test.dart
@@ -65,7 +65,8 @@
 const int NI7 = -PI7;
 
 /// Ensures that the behaviour of `action()` is the same as `value.round()`.
-@NoInline() // To ensure 'value.round()' has a non-constant receiver.
+@pragma(
+    'dart2js:noInline') // To ensure 'value.round()' has a non-constant receiver.
 check(value, action) {
   var result1, result2;
   try {
@@ -90,7 +91,7 @@
   }
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 void unusedCall(num x) {
   x.round(); // This call should not be removed since it might throw.
 }
diff --git a/tests/compiler/dart2js_extra/supermixin/supermixin17_test.dart b/tests/compiler/dart2js_extra/supermixin/supermixin17_test.dart
index 2358d45..14aa9e3 100644
--- a/tests/compiler/dart2js_extra/supermixin/supermixin17_test.dart
+++ b/tests/compiler/dart2js_extra/supermixin/supermixin17_test.dart
@@ -5,23 +5,21 @@
 import 'package:expect/expect.dart';
 
 class S {}
+
 class M {}
 
 class SuperC = S with M;
 
-class SuperA {
-}
+class SuperA {}
 
-class SuperB extends SuperA implements SuperC {
-}
+class SuperB extends SuperA implements SuperC {}
 
-mixin Mixin on SuperC, SuperA {
-}
+mixin Mixin on SuperC, SuperA {}
 
 class Class extends SuperB with Mixin {}
 
-@AssumeDynamic()
-@NoInline()
+@pragma('dart2js:assumeDynamic')
+@pragma('dart2js:noInline')
 test(c) {
   Expect.isTrue(c is Mixin, "Unexpected result for $c is Mixin");
   Expect.isTrue(c is SuperC, "Unexpected result for $c is SuperC");
diff --git a/tests/compiler/dart2js_extra/supermixin/supermixin18_test.dart b/tests/compiler/dart2js_extra/supermixin/supermixin18_test.dart
index c0082fa..d29409c 100644
--- a/tests/compiler/dart2js_extra/supermixin/supermixin18_test.dart
+++ b/tests/compiler/dart2js_extra/supermixin/supermixin18_test.dart
@@ -5,23 +5,21 @@
 import 'package:expect/expect.dart';
 
 class S {}
+
 class M {}
 
 class SuperC = S with M;
 
-class SuperA {
-}
+class SuperA {}
 
-class SuperB extends SuperA implements SuperC {
-}
+class SuperB extends SuperA implements SuperC {}
 
-mixin Mixin on SuperA, SuperC {
-}
+mixin Mixin on SuperA, SuperC {}
 
 class Class extends SuperB with Mixin {}
 
-@AssumeDynamic()
-@NoInline()
+@pragma('dart2js:assumeDynamic')
+@pragma('dart2js:noInline')
 test(c) {
   Expect.isTrue(c is Mixin, "Unexpected result for $c is Mixin");
   Expect.isTrue(c is SuperC, "Unexpected result for $c is SuperC");
diff --git a/tests/compiler/dart2js_extra/switch_test.dart b/tests/compiler/dart2js_extra/switch_test.dart
index 7fbc9d0..9e5eef1 100644
--- a/tests/compiler/dart2js_extra/switch_test.dart
+++ b/tests/compiler/dart2js_extra/switch_test.dart
@@ -60,7 +60,7 @@
 
 var x = 0;
 
-@NoInline()
+@pragma('dart2js:noInline')
 switcher3(val) {
   switch (val) {
     case 1:
diff --git a/tests/compiler/dart2js_extra/tear_off_types_test.dart b/tests/compiler/dart2js_extra/tear_off_types_test.dart
new file mode 100644
index 0000000..d7f6c41
--- /dev/null
+++ b/tests/compiler/dart2js_extra/tear_off_types_test.dart
@@ -0,0 +1,143 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// dart2jsOptions=--omit-implicit-checks
+
+import 'package:expect/expect.dart';
+
+main() {
+  test1();
+  test2();
+  test3();
+  test4();
+  test5();
+  test6();
+  test7();
+}
+
+class A1<T> {}
+
+class B1 extends A1<int> {}
+
+@pragma('dart2js:noInline')
+test1() {
+  Expect.isTrue(_test1(method1a));
+  Expect.isTrue(_test1(method1b));
+  Expect.isFalse(_test1(method1c));
+}
+
+B1 method1a() => null;
+A1<int> method1b() => null;
+A1<String> method1c() => null;
+
+@pragma('dart2js:noInline')
+bool _test1(f) => f is A1<int> Function();
+
+class A2<T> {}
+
+class B2 extends A2<int> {}
+
+@pragma('dart2js:noInline')
+test2() {
+  Expect.isFalse(_test2(method2a));
+  Expect.isTrue(_test2(method2b));
+  Expect.isFalse(_test2(method2c));
+}
+
+void method2a(B2 b) {}
+void method2b(A2<int> a) {}
+void method2c(A2<String> a) {}
+
+@pragma('dart2js:noInline')
+bool _test2(f) => f is void Function(A2<int>);
+
+class A3<T> {}
+
+class B3 extends A3<int> {}
+
+@pragma('dart3js:noInline')
+test3() {
+  Expect.isTrue(_test3(method3a));
+  Expect.isTrue(_test3(method3b));
+  Expect.isFalse(_test3(method3c));
+}
+
+void method3a(B3 b) {}
+void method3b(A3<int> a) {}
+void method3c(A3<String> a) {}
+
+@pragma('dart3js:noInline')
+_test3(f) => f is void Function(B3);
+
+class A4<T> {}
+
+class B4 extends A4<int> {}
+
+@pragma('dart4js:noInline')
+test4() {
+  Expect.isTrue(_test4(method4a));
+  Expect.isFalse(_test4(method4b));
+  Expect.isFalse(_test4(method4c));
+}
+
+B4 method4a() => null;
+A4<int> method4b() => null;
+A4<String> method4c() => null;
+
+@pragma('dart4js:noInline')
+_test4(f) => f is B4 Function();
+
+class A5<T> {}
+
+class B5 extends A5<int> {}
+
+@pragma('dart2js:noInline')
+test5() {
+  Expect.isTrue(_test5(method5a));
+  Expect.isTrue(_test5(method5b));
+  Expect.isFalse(_test5(method5c));
+}
+
+void method5a(void Function(B5) f) => null;
+void method5b(void Function(A5<int>) f) => null;
+void method5c(void Function(A5<String>) f) => null;
+
+@pragma('dart2js:noInline')
+bool _test5(f) => f is void Function(void Function(A5<int>));
+
+class A6<T> {}
+
+class B6 extends A6<int> {}
+
+@pragma('dart6js:noInline')
+test6() {
+  Expect.isTrue(_test6(method6a));
+  Expect.isTrue(_test6(method6b));
+  Expect.isFalse(_test6(method6c));
+}
+
+void Function(B6) method6a() => null;
+void Function(A6<int>) method6b() => null;
+void Function(A6<String>) method6c() => null;
+
+@pragma('dart6js:noInline')
+_test6(f) => f is void Function(B6) Function();
+
+class A7<T> {}
+
+class B7 extends A7<int> {}
+
+@pragma('dart7js:noInline')
+test7() {
+  Expect.isTrue(_test7(method7a));
+  Expect.isFalse(_test7(method7b));
+  Expect.isFalse(_test7(method7c));
+}
+
+void method7a(void Function(B7) f) => null;
+void method7b(void Function(A7<int>) f) => null;
+void method7c(void Function(A7<String>) f) => null;
+
+@pragma('dart7js:noInline')
+_test7(f) => f is void Function(void Function(B7));
diff --git a/tests/compiler/dart2js_extra/truncation_errors_test.dart b/tests/compiler/dart2js_extra/truncation_errors_test.dart
index 2ede4b4..92532f2 100644
--- a/tests/compiler/dart2js_extra/truncation_errors_test.dart
+++ b/tests/compiler/dart2js_extra/truncation_errors_test.dart
@@ -7,8 +7,8 @@
 
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(x) => x;
 
 void find1(expected, thunk) {
@@ -20,8 +20,8 @@
     exceptionText = '$e';
   }
   if (exceptionText == null) {
-    Expect
-        .fail('Expected exception containing "$expected", returned: $returned');
+    Expect.fail(
+        'Expected exception containing "$expected", returned: $returned');
   }
   Expect.isTrue(exceptionText.contains(expected),
       'Expected "$expected" in "$exceptionText"');
diff --git a/tests/compiler/dart2js_extra/useful_error_message_1_test.dart b/tests/compiler/dart2js_extra/useful_error_message_1_test.dart
index 69e2a26..7fbaa6b 100644
--- a/tests/compiler/dart2js_extra/useful_error_message_1_test.dart
+++ b/tests/compiler/dart2js_extra/useful_error_message_1_test.dart
@@ -7,8 +7,8 @@
 
 import "package:expect/expect.dart";
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(x) => x;
 
 class CCCC {
diff --git a/tests/compiler/dart2js_native/js_constant_test.dart b/tests/compiler/dart2js_native/js_constant_test.dart
index bc9837e..40ce27c 100644
--- a/tests/compiler/dart2js_native/js_constant_test.dart
+++ b/tests/compiler/dart2js_native/js_constant_test.dart
@@ -17,7 +17,7 @@
 // `"5"`, then converts it to a number for negation, giving a number result
 // instead of a string result.
 
-@NoInline()
+@pragma('dart2js:noInline')
 checkString(r) {
   Expect.isTrue(
       r is String, 'Expected string, found ${r} of type ${r.runtimeType}');
diff --git a/tests/compiler/dart2js_native/load_elim_refinement_test.dart b/tests/compiler/dart2js_native/load_elim_refinement_test.dart
index d7a090f..ee9dfee 100644
--- a/tests/compiler/dart2js_native/load_elim_refinement_test.dart
+++ b/tests/compiler/dart2js_native/load_elim_refinement_test.dart
@@ -12,7 +12,7 @@
   int b;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 escape(v) {
   g = v;
 }
diff --git a/tests/compiler/dart2js_native/native_method_inlining_test.dart b/tests/compiler/dart2js_native/native_method_inlining_test.dart
index 9d7ddc9..ba0ee3b 100644
--- a/tests/compiler/dart2js_native/native_method_inlining_test.dart
+++ b/tests/compiler/dart2js_native/native_method_inlining_test.dart
@@ -23,7 +23,7 @@
   @pragma('dart2js:noElision')
   static var g;
 
-  @NoInline()
+  @pragma('dart2js:noInline')
   method1(a) {
     g = '(Method1Tag)'; // Tag to identify compiled JavaScript method.
     A x = makeA();
@@ -34,7 +34,7 @@
     return x.foo(3, 10, 30);
   }
 
-  @NoInline()
+  @pragma('dart2js:noInline')
   method2() {
     g = '(Method2Tag)';
     A x = makeA();
@@ -43,7 +43,7 @@
     return r1 + r2;
   }
 
-  @NoInline()
+  @pragma('dart2js:noInline')
   method3() {
     g = '(Method3Tag)';
     A x = makeA();
diff --git a/tests/compiler/dart2js_native/native_mixin_field2_test.dart b/tests/compiler/dart2js_native/native_mixin_field2_test.dart
index 408bdb6..4612391 100644
--- a/tests/compiler/dart2js_native/native_mixin_field2_test.dart
+++ b/tests/compiler/dart2js_native/native_mixin_field2_test.dart
@@ -52,7 +52,7 @@
 })()""");
 }
 
-@AssumeDynamic()
+@pragma('dart2js:assumeDynamic')
 confuse(x) => x;
 
 main() {
diff --git a/tests/compiler/dart2js_native/native_null_frog_test.dart b/tests/compiler/dart2js_native/native_null_frog_test.dart
index dad284a..0abdd35 100644
--- a/tests/compiler/dart2js_native/native_null_frog_test.dart
+++ b/tests/compiler/dart2js_native/native_null_frog_test.dart
@@ -29,7 +29,7 @@
 })()""");
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 staticTests() {
   A a = makeA();
   Expect.equals(null, a.returnNull());
@@ -43,7 +43,7 @@
   Expect.equals(0, a.returnZero());
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 dynamicTests() {
   A a = makeA();
   Expect.equals(null, confuse(a).returnNull());
diff --git a/tests/compiler/dart2js_native/native_test.dart b/tests/compiler/dart2js_native/native_test.dart
new file mode 100644
index 0000000..0eb52d6
--- /dev/null
+++ b/tests/compiler/dart2js_native/native_test.dart
@@ -0,0 +1,211 @@
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test for positive and negative uses of named declarations. This file is
+// also used in tests/compiler/dart2js/model/native_test.dart.
+
+import 'dart:_js_helper';
+
+var topLevelField;
+
+get topLevelGetter => null;
+
+set topLevelSetter(_) {}
+
+topLevelFunction() {}
+
+// NON_NATIVE_EXTERNAL               //# 01: compile-time error
+external get externalTopLevelGetter; //# 01: continued
+
+// NON_NATIVE_EXTERNAL                  //# 02: compile-time error
+external set externalTopLevelSetter(_); //# 02: continued
+
+// NON_NATIVE_EXTERNAL               //# 03: compile-time error
+external externalTopLevelFunction(); //# 03: continued
+
+get nativeTopLevelGetter native;
+
+set nativeTopLevelSetter(_) native;
+
+nativeTopLevelFunction() native;
+
+class Class {
+  Class.generative();
+  factory Class.fact() => null;
+
+  // NON_NATIVE_EXTERNAL               //# 08: compile-time error
+  external Class.externalGenerative(); //# 08: continued
+
+  // NON_NATIVE_EXTERNAL                 //# 09: compile-time error
+  external factory Class.externalFact(); //# 09: continued
+
+  // NATIVE_NON_INSTANCE_IN_NON_NATIVE_CLASS //# 10: compile-time error
+  Class.nativeGenerative() native; //# 10: continued
+
+  // NATIVE_NON_INSTANCE_IN_NON_NATIVE_CLASS //# 11: compile-time error
+  factory Class.nativeFact() native; //# 11: continued
+
+  var instanceField;
+  get instanceGetter => null;
+  set instanceSetter(_) {}
+  instanceMethod() {}
+
+  static var staticField;
+  static get staticGetter => null;
+  static set staticSetter(_) {}
+  static staticMethod() {}
+
+  // NON_NATIVE_EXTERNAL               //# 22: compile-time error
+  external get externalInstanceGetter; //# 22: continued
+
+  // NON_NATIVE_EXTERNAL                  //# 23: compile-time error
+  external set externalInstanceSetter(_); //# 23: continued
+
+  // NON_NATIVE_EXTERNAL             //# 24: compile-time error
+  external externalInstanceMethod(); //# 24: continued
+
+  // NON_NATIVE_EXTERNAL                    //# 25: compile-time error
+  external static get externalStaticGetter; //# 25: continued
+
+  // NON_NATIVE_EXTERNAL                       //# 26: compile-time error
+  external static set externalStaticSetter(_); //# 26: continued
+
+  // NON_NATIVE_EXTERNAL                  //# 27: compile-time error
+  external static externalStaticMethod(); //# 27: continued
+
+  get nativeInstanceGetter native;
+  set nativeInstanceSetter(_) native;
+  nativeInstanceMethod() native;
+
+  // NATIVE_NON_INSTANCE_IN_NON_NATIVE_CLASS //# 28: compile-time error
+  static get nativeStaticGetter native; //# 28: continued
+
+  // NATIVE_NON_INSTANCE_IN_NON_NATIVE_CLASS //# 29: compile-time error
+  static set nativeStaticSetter(_) native; //# 29: continued
+
+  // NATIVE_NON_INSTANCE_IN_NON_NATIVE_CLASS //# 30: compile-time error
+  static nativeStaticMethod() native; //# 30: continued
+}
+
+@Native('d')
+class NativeClass {
+  NativeClass.generative();
+
+  factory NativeClass.fact() => null;
+
+  // NON_NATIVE_EXTERNAL                     //# 31: compile-time error
+  external NativeClass.externalGenerative(); //# 31: continued
+  // NON_NATIVE_EXTERNAL                       //# 32: compile-time error
+  external factory NativeClass.externalFact(); //# 32: continued
+
+  NativeClass.nativeGenerative() native;
+  factory NativeClass.nativeFact() native;
+
+  var instanceField;
+  get instanceGetter => null;
+  set instanceSetter(_) {}
+  instanceMethod() {}
+
+  static var staticField;
+  static get staticGetter => null;
+  static set staticSetter(_) {}
+  static staticMethod() {}
+
+  var instanceNamedField;
+
+  // NON_NATIVE_EXTERNAL               //# 36: compile-time error
+  external get externalInstanceGetter; //# 36: continued
+
+  // NON_NATIVE_EXTERNAL                  //# 37: compile-time error
+  external set externalInstanceSetter(_); //# 37: continued
+
+  // NON_NATIVE_EXTERNAL             //# 38: compile-time error
+  external externalInstanceMethod(); //# 38: continued
+
+  // NON_NATIVE_EXTERNAL                    //# 39: compile-time error
+  external static get externalStaticGetter; //# 39: continued
+
+  // NON_NATIVE_EXTERNAL                       //# 40: compile-time error
+  external static set externalStaticSetter(_); //# 40: continued
+
+  // NON_NATIVE_EXTERNAL                  //# 41: compile-time error
+  external static externalStaticMethod(); //# 41: continued
+
+  get nativeInstanceGetter native;
+  set nativeInstanceSetter(_) native;
+  nativeInstanceMethod() native;
+
+  static get nativeStaticGetter native;
+  static set nativeStaticSetter(_) native;
+  static nativeStaticMethod() native;
+}
+
+main() {
+  if (true) return;
+
+  topLevelField;
+  topLevelGetter;
+  topLevelSetter = null;
+  topLevelFunction();
+  externalTopLevelGetter; //# 01: continued
+  externalTopLevelSetter = null; //# 02: continued
+  externalTopLevelFunction(); //# 03: continued
+  nativeTopLevelGetter;
+  nativeTopLevelSetter = null;
+  nativeTopLevelFunction();
+
+  var c1 = new Class.generative();
+  new Class.fact();
+  new Class.externalGenerative(); //# 08: continued
+  new Class.externalFact(); //# 09: continued
+  new Class.nativeGenerative(); //# 10: continued
+  new Class.nativeFact(); //# 11: continued
+  c1.instanceField;
+  c1.instanceGetter;
+  c1.instanceSetter = null;
+  c1.instanceMethod();
+  Class.staticField;
+  Class.staticGetter;
+  Class.staticSetter = null;
+  Class.staticMethod();
+  c1.externalInstanceGetter; //# 22: continued
+  c1.externalInstanceSetter = null; //# 23: continued
+  c1.externalInstanceMethod(); //# 24: continued
+  Class.externalStaticGetter; //# 25: continued
+  Class.externalStaticSetter = null; //# 26: continued
+  Class.externalStaticMethod(); //# 27: continued
+  c1.nativeInstanceGetter;
+  c1.nativeInstanceSetter = null;
+  c1.nativeInstanceMethod();
+  Class.nativeStaticGetter; //# 28: continued
+  Class.nativeStaticSetter = null; //# 29: continued
+  Class.nativeStaticMethod(); //# 30: continued
+
+  var c2 = new NativeClass.generative();
+  new NativeClass.fact();
+  new NativeClass.externalGenerative(); //# 31: continued
+  new NativeClass.externalFact(); //# 32: continued
+  new NativeClass.nativeGenerative();
+  new NativeClass.nativeFact();
+  c2.instanceField;
+  c2.instanceGetter;
+  c2.instanceSetter = null;
+  c2.instanceMethod();
+  NativeClass.staticField;
+  NativeClass.staticGetter;
+  NativeClass.staticSetter = null;
+  NativeClass.staticMethod();
+  c2.externalInstanceGetter; //# 36: continued
+  c2.externalInstanceSetter = null; //# 37: continued
+  c2.externalInstanceMethod(); //# 38: continued
+  NativeClass.externalStaticGetter; //# 39: continued
+  NativeClass.externalStaticSetter = null; //# 40: continued
+  NativeClass.externalStaticMethod(); //# 41: continued
+  c2.nativeInstanceGetter;
+  c2.nativeInstanceSetter = null;
+  c2.nativeInstanceMethod();
+  NativeClass.nativeStaticGetter;
+  NativeClass.nativeStaticSetter = null;
+  NativeClass.nativeStaticMethod();
+}
diff --git a/tests/compiler/dart2js_native/native_testing.dart b/tests/compiler/dart2js_native/native_testing.dart
index 6fb363f..5dcaa24 100644
--- a/tests/compiler/dart2js_native/native_testing.dart
+++ b/tests/compiler/dart2js_native/native_testing.dart
@@ -43,6 +43,6 @@
 ''');
 }
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(x) => x;
diff --git a/tests/compiler/dart2js_native/optimization_hints_test.dart b/tests/compiler/dart2js_native/optimization_hints_test.dart
index f62324e..45ee3ad 100644
--- a/tests/compiler/dart2js_native/optimization_hints_test.dart
+++ b/tests/compiler/dart2js_native/optimization_hints_test.dart
@@ -2,8 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-import 'dart:_js_helper' as js;
-
 import 'dart:_foreign_helper' show JS;
 
 import 'package:expect/expect.dart';
@@ -15,8 +13,8 @@
   c.c_field = x;
 }
 
-@js.NoSideEffects()
-@js.NoInline()
+@pragma('dart2js:noSideEffects')
+@pragma('dart2js:noInline')
 bar(d) {
   x = "in bar function";
   d.d_field = x;
@@ -32,14 +30,14 @@
   m() => d_field;
 }
 
-@js.NoSideEffects()
-@js.NoInline()
-@js.NoThrows()
+@pragma('dart2js:noSideEffects')
+@pragma('dart2js:noInline')
+@pragma('dart2js:noThrows')
 baz() {
   throw 'in baz function';
 }
 
-@js.NoInline()
+@pragma('dart2js:noInline')
 geeNoInline() {
   // Use `gee` several times, so `gee` isn't used only once (and thus inlinable
   // independently of its size).
@@ -85,7 +83,7 @@
   gee();
 }
 
-@js.ForceInline()
+@pragma('dart2js:tryInline')
 // Big function that would normally not be inlinable.
 gee([c]) {
   if (c != null) {
@@ -191,7 +189,7 @@
   check(JS('', 'arguments.callee'));
 }
 
-@js.NoInline()
+@pragma('dart2js:noInline')
 check(func) {
   JS('', 'String("in check function")');
   var source = JS('String', 'String(#)', func);
@@ -217,7 +215,7 @@
   JS('', 'String("in simple function")');
 }
 
-@js.NoInline()
+@pragma('dart2js:noInline')
 noinline() {
   JS('', 'String("in noinline function")');
 }
diff --git a/tests/corelib_2/apply_test.dart b/tests/corelib_2/apply_test.dart
index 01f2e1c..25b9ead 100644
--- a/tests/corelib_2/apply_test.dart
+++ b/tests/corelib_2/apply_test.dart
@@ -25,8 +25,8 @@
   int call(int x, int y) => x + y;
 }
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(x) => x;
 
 main() {
diff --git a/tests/corelib_2/bigint_from_test.dart b/tests/corelib_2/bigint_from_test.dart
index c25e457..feb47eb 100644
--- a/tests/corelib_2/bigint_from_test.dart
+++ b/tests/corelib_2/bigint_from_test.dart
@@ -2,6 +2,12 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+// Testing Bigints with and without intrinsics.
+// VMOptions=--intrinsify --no-enable-asserts
+// VMOptions=--intrinsify --enable-asserts
+// VMOptions=--no-intrinsify --enable-asserts
+// VMOptions=--optimization-counter-threshold=5 --no-background-compilation
+
 import "package:expect/expect.dart";
 
 import 'dart:math' show pow;
diff --git a/tests/corelib_2/bigint_js_test.dart b/tests/corelib_2/bigint_js_test.dart
index 7b982b7..ebebc25d 100644
--- a/tests/corelib_2/bigint_js_test.dart
+++ b/tests/corelib_2/bigint_js_test.dart
@@ -2,6 +2,12 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
+// Testing Bigints with and without intrinsics.
+// VMOptions=--intrinsify --no-enable-asserts
+// VMOptions=--intrinsify --enable-asserts
+// VMOptions=--no-intrinsify --enable-asserts
+// VMOptions=--optimization-counter-threshold=5 --no-background-compilation
+
 // Test for JavaScript specific BigInt behaviour. Any JavaScript number (double)
 // that is an integral value is a Dart 'int' value, so any BigInt that has a
 // value that is exactly a double integral value should return `true` for
diff --git a/tests/corelib_2/bigint_parse_radix_test.dart b/tests/corelib_2/bigint_parse_radix_test.dart
index ad94bbf..ad7468c 100644
--- a/tests/corelib_2/bigint_parse_radix_test.dart
+++ b/tests/corelib_2/bigint_parse_radix_test.dart
@@ -3,9 +3,10 @@
 // BSD-style license that can be found in the LICENSE file.
 
 // Testing Bigints with and without intrinsics.
-// VMOptions=
-// VMOptions=--no_intrinsify
-// VMOptions=--optimization_counter_threshold=10 --no-background_compilation
+// VMOptions=--intrinsify --no-enable-asserts
+// VMOptions=--intrinsify --enable-asserts
+// VMOptions=--no-intrinsify --enable-asserts
+// VMOptions=--optimization-counter-threshold=5 --no-background-compilation
 
 import "package:expect/expect.dart";
 
diff --git a/tests/corelib_2/bigint_test.dart b/tests/corelib_2/bigint_test.dart
index 7ad5309..01dea1f 100644
--- a/tests/corelib_2/bigint_test.dart
+++ b/tests/corelib_2/bigint_test.dart
@@ -3,9 +3,10 @@
 // BSD-style license that can be found in the LICENSE file.
 
 // Testing Bigints with and without intrinsics.
-// VMOptions=
-// VMOptions=--no_intrinsify
-// VMOptions=--optimization_counter_threshold=5 --no-background_compilation
+// VMOptions=--intrinsify --no-enable-asserts
+// VMOptions=--intrinsify --enable-asserts
+// VMOptions=--no-intrinsify --enable-asserts
+// VMOptions=--optimization-counter-threshold=5 --no-background-compilation
 
 import "package:expect/expect.dart";
 
@@ -1064,5 +1065,9 @@
     var b = BigInt.parse("10000000000000000001"); /// 27: ok
     Expect.equals(false, a.hashCode == b.hashCode); /// 27: ok
     Expect.equals(true, a.hashCode == (b - BigInt.one).hashCode); /// 27: ok
+
+    // Regression test for http://dartbug.com/36105
+    var overbig = -BigInt.from(10).pow(309);
+    Expect.equals(overbig.toDouble(), double.negativeInfinity);
   }
 }
diff --git a/tests/corelib_2/corelib_2.status b/tests/corelib_2/corelib_2.status
index eed9d49..45e2873 100644
--- a/tests/corelib_2/corelib_2.status
+++ b/tests/corelib_2/corelib_2.status
@@ -56,6 +56,7 @@
 bool_from_environment2_test/03: MissingCompileTimeError
 int_modulo_arith_test/modPow: RuntimeError
 int_modulo_arith_test/none: RuntimeError
+regexp/lookbehind_test/01: Skip # Flaky in uncatchable way.  Issue 36280
 string_from_environment3_test/03: MissingCompileTimeError
 
 [ $compiler == fasta ]
diff --git a/tests/corelib_2/map_set_undefined_test.dart b/tests/corelib_2/map_set_undefined_test.dart
new file mode 100644
index 0000000..08f42bc
--- /dev/null
+++ b/tests/corelib_2/map_set_undefined_test.dart
@@ -0,0 +1,57 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:collection';
+import 'package:expect/expect.dart';
+
+main() {
+  // Regression test for https://github.com/dart-lang/sdk/issues/36052.
+  // JS compilers shouldn't produce `undefined` when a Map/Set key is not found.
+  testMap({});
+  testMap(Map.identity());
+  testMap(LinkedHashMap(
+      equals: (x, y) => x == y,
+      hashCode: (x) => x.hashCode,
+      isValidKey: (_) => true));
+
+  testSet(Set());
+  testSet(Set.identity());
+  testSet(LinkedHashSet(
+      equals: (x, y) => x == y,
+      hashCode: (x) => x.hashCode,
+      isValidKey: (_) => true));
+}
+
+testMap(Map<Object, Object> map) {
+  var t = map.runtimeType.toString();
+  var s = ' (length ${map.length})';
+  checkUndefined('$t.[]$s', map['hi']);
+  checkUndefined('$t.putIfAbsent$s', map.putIfAbsent('hi', () {}));
+  checkUndefined('$t.remove$s', map.remove('hi'));
+  if (map.isEmpty) {
+    map['hello'] = 'there';
+    testMap(map);
+  }
+}
+
+testSet(Set<Object> set) {
+  var t = set.runtimeType.toString();
+  var s = ' (length ${set.length})';
+  checkUndefined('$t.lookup$s', set.lookup('hi'));
+  if (set.isEmpty) {
+    set.add('hello');
+    testSet(set);
+  }
+}
+
+/// Fails if [x] incorrectly uses the default argument instead of being `null`
+/// (i.e. because `x` is undefined).
+checkUndefined(String method, [Object x = 'error']) {
+  // TODO(jmesserly): this check is specific to implementation details of DDC's
+  // current calling conventions. These conventions may change.
+  // Ideally we'd have an `undefined` constant in "package:js" and use that
+  // here instead.
+  Expect.isNull(x,
+      'error in $method: result treated as missing argument (JS undefined?)');
+}
diff --git a/tests/corelib_2/map_test.dart b/tests/corelib_2/map_test.dart
index 5c9e9a4..88d6e92 100644
--- a/tests/corelib_2/map_test.dart
+++ b/tests/corelib_2/map_test.dart
@@ -1043,4 +1043,5 @@
   checkUnmodifiable(const {1: 1});
   checkUnmodifiable(Map.unmodifiable({1: 1}));
   checkUnmodifiable(UnmodifiableMapView({1: 1}));
+  checkUnmodifiable(const MapView({1: 1}));
 }
diff --git a/tests/corelib_2/regexp/jemalloc_leak_backtracking_stack_test.dart b/tests/corelib_2/regexp/jemalloc_leak_backtracking_stack_test.dart
new file mode 100644
index 0000000..18c4621
--- /dev/null
+++ b/tests/corelib_2/regexp/jemalloc_leak_backtracking_stack_test.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Regression test for https://github.com/flutter/flutter/issues/29007
+
+String escape(String string) {
+  var regex = new RegExp("(\\?|\\\$|\\*|\\(|\\)|\\[)|\\+|\\.|\\\\");
+  return string.replaceAllMapped(
+      regex, (Match m) => "\\" + string.substring(m.start, m.end));
+}
+
+main() {
+  var text = """
+Yet but three? Come one more.
+Two of both kinds make up four.
+""";
+  var accumulate = 0;
+  for (var i = 0; i < 65536; i++) {
+    accumulate += escape(text).length;
+  }
+
+  print(accumulate);
+}
diff --git a/tests/corelib_2/regexp/lookbehind_test.dart b/tests/corelib_2/regexp/lookbehind_test.dart
new file mode 100644
index 0000000..5ccdcdb
--- /dev/null
+++ b/tests/corelib_2/regexp/lookbehind_test.dart
@@ -0,0 +1,440 @@
+// Copyright (c) 2019, the Dart project authors. All rights reserved.
+// Copyright 2015 the V8 project authors. All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+//       copyright notice, this list of conditions and the following
+//       disclaimer in the documentation and/or other materials provided
+//       with the distribution.
+//     * Neither the name of Google Inc. nor the names of its
+//       contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import 'package:expect/expect.dart';
+
+import 'v8_regexp_utils.dart';
+
+void main() {
+  // Tests captures in positive and negative look-behind in regular expressions.
+
+  void testRE(RegExp re, String input, bool expectedResult) {
+    if (expectedResult) {
+      assertTrue(re.hasMatch(input));
+    } else {
+      assertFalse(re.hasMatch(input));
+    }
+  }
+
+  void execRE(RegExp re, String input, List<String> expectedResult) {
+    assertTrue(re.hasMatch(input));
+    shouldBe(re.firstMatch(input), expectedResult);
+  }
+
+  void multiRE(RegExp re, String input, List<List<String>> expectedResult) {
+    assertTrue(re.hasMatch(input));
+    final matches = re.allMatches(input);
+    assertEquals(matches.length, expectedResult.length);
+    for (var i = 0; i < matches.length; i++) {
+      shouldBe(matches.elementAt(i), expectedResult[i]);
+    }
+  }
+
+  // Simple fixed-length matches.
+
+  var re = new RegExp(r"^.(?<=a)");
+  execRE(re, "a", ["a"]);
+  testRE(re, "b", false);
+
+  re = new RegExp(r"^f..(?<=.oo)");
+  execRE(re, "foo1", ["foo"]);
+
+  re = new RegExp(r"^f\w\w(?<=\woo)");
+  execRE(re, "foo2", ["foo"]);
+  testRE(re, "boo", false);
+  testRE(re, "fao", false);
+  testRE(re, "foa", false);
+
+  re = new RegExp(r"(?<=abc)\w\w\w");
+  execRE(re, "abcdef", ["def"]);
+
+  re = new RegExp(r"(?<=a.c)\w\w\w");
+  execRE(re, "abcdef", ["def"]);
+
+  re = new RegExp(r"(?<=a\wc)\w\w\w");
+  execRE(re, "abcdef", ["def"]);
+
+  re = new RegExp(r"(?<=a[a-z])\w\w\w");
+  execRE(re, "abcdef", ["cde"]);
+
+  re = new RegExp(r"(?<=a[a-z][a-z])\w\w\w");
+  execRE(re, "abcdef", ["def"]);
+
+  re = new RegExp(r"(?<=a[a-z]{2})\w\w\w");
+  execRE(re, "abcdef", ["def"]);
+
+  re = new RegExp(r"(?<=a{1})\w\w\w");
+  execRE(re, "abcdef", ["bcd"]);
+
+  re = new RegExp(r"(?<=a{1}b{1})\w\w\w");
+  execRE(re, "abcdef", ["cde"]);
+
+  re = new RegExp(r"(?<=a{1}[a-z]{2})\w\w\w");
+  execRE(re, "abcdef", ["def"]);
+
+  // Variable-length matches.
+
+  re = new RegExp(r"(?<=[a|b|c]*)[^a|b|c]{3}");
+  execRE(re, "abcdef", ["def"]);
+
+  re = new RegExp(r"(?<=\w*)[^a|b|c]{3}");
+  execRE(re, "abcdef", ["def"]);
+
+  re = new RegExp(r"(?<=b|c)\w");
+  multiRE(re, "abcdef", [
+    ["c"],
+    ["d"]
+  ]);
+
+  re = new RegExp(r"(?<=[b-e])\w{2}");
+  multiRE(re, "abcdef", [
+    ["cd"],
+    ["ef"]
+  ]);
+
+  // Start of line matches.
+
+  re = new RegExp(r"(?<=^abc)def");
+  execRE(re, "abcdef", ["def"]);
+
+  re = new RegExp(r"(?<=^[a-c]{3})def");
+  execRE(re, "abcdef", ["def"]);
+
+  re = new RegExp(r"(?<=^[a-c]{3})def", multiLine: true);
+  execRE(re, "xyz\nabcdef", ["def"]);
+
+  re = new RegExp(r"(?<=^)\w+", multiLine: true);
+  multiRE(re, "ab\ncd\nefg", [
+    ["ab"],
+    ["cd"],
+    ["efg"]
+  ]);
+
+  re = new RegExp(r"\w+(?<=$)", multiLine: true);
+  multiRE(re, "ab\ncd\nefg", [
+    ["ab"],
+    ["cd"],
+    ["efg"]
+  ]);
+
+  re = new RegExp(r"(?<=^)\w+(?<=$)", multiLine: true);
+  multiRE(re, "ab\ncd\nefg", [
+    ["ab"],
+    ["cd"],
+    ["efg"]
+  ]);
+
+  re = new RegExp(r"(?<=^[^a-c]{3})def");
+  testRE(re, "abcdef", false);
+
+  re = new RegExp(r"^foooo(?<=^o+)$");
+  testRE(re, "foooo", false);
+
+  re = new RegExp(r"^foooo(?<=^o*)$");
+  testRE(re, "foooo", false);
+
+  re = new RegExp(r"^foo(?<=^fo+)$");
+  execRE(re, "foo", ["foo"]);
+
+  re = new RegExp(r"^foooo(?<=^fo*)");
+  execRE(re, "foooo", ["foooo"]);
+
+  re = new RegExp(r"^(f)oo(?<=^\1o+)$");
+  testRE(re, "foo", true);
+  execRE(re, "foo", ["foo", "f"]);
+
+  re = new RegExp(r"^(f)oo(?<=^\1o+)$", caseSensitive: false);
+  execRE(re, "foo", ["foo", "f"]);
+
+  re = new RegExp(r"^(f)oo(?<=^\1o+).$", caseSensitive: false);
+  execRE(re, "foo\u1234", ["foo\u1234", "f"]);
+
+  re = new RegExp(r"(?<=^\w+)def");
+  execRE(re, "abcdefdef", ["def"]);
+  multiRE(re, "abcdefdef", [
+    ["def"],
+    ["def"]
+  ]);
+
+  // Word boundary matches.
+
+  re = new RegExp(r"(?<=\b)[d-f]{3}");
+  execRE(re, "abc def", ["def"]);
+
+  re = new RegExp(r"(?<=\B)\w{3}");
+  execRE(re, "ab cdef", ["def"]);
+
+  re = new RegExp(r"(?<=\B)(?<=c(?<=\w))\w{3}");
+  execRE(re, "ab cdef", ["def"]);
+
+  re = new RegExp(r"(?<=\b)[d-f]{3}");
+  testRE(re, "abcdef", false);
+
+  // Negative lookbehind.
+
+  re = new RegExp(r"(?<!abc)\w\w\w");
+  execRE(re, "abcdef", ["abc"]);
+
+  re = new RegExp(r"(?<!a.c)\w\w\w");
+  execRE(re, "abcdef", ["abc"]);
+
+  re = new RegExp(r"(?<!a\wc)\w\w\w");
+  execRE(re, "abcdef", ["abc"]);
+
+  re = new RegExp(r"(?<!a[a-z])\w\w\w");
+  execRE(re, "abcdef", ["abc"]);
+
+  re = new RegExp(r"(?<!a[a-z]{2})\w\w\w");
+  execRE(re, "abcdef", ["abc"]);
+
+  re = new RegExp(r"(?<!abc)def");
+  testRE(re, "abcdef", false);
+
+  re = new RegExp(r"(?<!a.c)def");
+  testRE(re, "abcdef", false);
+
+  re = new RegExp(r"(?<!a\wc)def");
+  testRE(re, "abcdef", false);
+
+  re = new RegExp(r"(?<!a[a-z][a-z])def");
+  testRE(re, "abcdef", false);
+
+  re = new RegExp(r"(?<!a[a-z]{2})def");
+  testRE(re, "abcdef", false);
+
+  re = new RegExp(r"(?<!a{1}b{1})cde");
+  testRE(re, "abcdef", false);
+
+  re = new RegExp(r"(?<!a{1}[a-z]{2})def");
+  testRE(re, "abcdef", false);
+
+  // Capturing matches.
+  re = new RegExp(r"(?<=(c))def");
+  execRE(re, "abcdef", ["def", "c"]);
+
+  re = new RegExp(r"(?<=(\w{2}))def");
+  execRE(re, "abcdef", ["def", "bc"]);
+
+  re = new RegExp(r"(?<=(\w(\w)))def");
+  execRE(re, "abcdef", ["def", "bc", "c"]);
+
+  re = new RegExp(r"(?<=(\w){3})def");
+  execRE(re, "abcdef", ["def", "a"]);
+
+  re = new RegExp(r"(?<=(bc)|(cd)).");
+  execRE(re, "abcdef", ["d", "bc", null]);
+
+  re = new RegExp(r"(?<=([ab]{1,2})\D|(abc))\w");
+  execRE(re, "abcdef", ["c", "a", null]);
+
+  re = new RegExp(r"\D(?<=([ab]+))(\w)");
+  execRE(re, "abcdef", ["ab", "a", "b"]);
+
+  // Captures inside negative lookbehind. (They never capture.)
+  re = new RegExp(r"(?<!(^|[ab]))\w{2}");
+  execRE(re, "abcdef", ["de", null]);
+
+  // Nested lookaround.
+  re = new RegExp(r"(?<=ab(?=c)\wd)\w\w");
+  execRE(re, "abcdef", ["ef"]);
+
+  re = new RegExp(r"(?<=a(?=([^a]{2})d)\w{3})\w\w");
+  execRE(re, "abcdef", ["ef", "bc"]);
+
+  re = new RegExp(r"(?<=a(?=([bc]{2}(?<!a{2}))d)\w{3})\w\w");
+  execRE(re, "abcdef", ["ef", "bc"]);
+
+  re = new RegExp(r"(?<=a(?=([bc]{2}(?<!a*))d)\w{3})\w\w/");
+  testRE(re, "abcdef", false);
+
+  re = new RegExp(r"^faaao?(?<=^f[oa]+(?=o))");
+  execRE(re, "faaao", ["faaa"]);
+
+  // Back references.
+  re = new RegExp(r"(.)(?<=(\1\1))");
+  execRE(re, "abb", ["b", "b", "bb"]);
+
+  re = new RegExp(r"(.)(?<=(\1\1))", caseSensitive: false);
+  execRE(re, "abB", ["B", "B", "bB"]);
+
+  re = new RegExp(r"((\w)\w)(?<=\1\2\1)", caseSensitive: false);
+  execRE(re, "aabAaBa", ["aB", "aB", "a"]);
+
+  re = new RegExp(r"(\w(\w))(?<=\1\2\1)", caseSensitive: false);
+  execRE(re, "aabAaBa", ["Ba", "Ba", "a"]);
+
+  re = new RegExp(r"(?=(\w))(?<=(\1)).", caseSensitive: false);
+  execRE(re, "abaBbAa", ["b", "b", "B"]);
+
+  re = new RegExp(r"(?<=(.))(\w+)(?=\1)");
+  execRE(re, "  'foo'  ", ["foo", "'", "foo"]);
+  execRE(re, "  \"foo\"  ", ["foo", "\"", "foo"]);
+  testRE(re, "  .foo\"  ", false);
+
+  re = new RegExp(r"(.)(?<=\1\1\1)");
+  testRE(re, "ab", false);
+  testRE(re, "abb", false);
+  execRE(re, "abbb", ["b", "b"]);
+
+  re = new RegExp(r"(..)(?<=\1\1\1)");
+  testRE(re, "ab", false);
+  testRE(re, "abb", false);
+  testRE(re, "aabb", false);
+  testRE(re, "abab", false);
+  testRE(re, "fabxbab", false);
+  testRE(re, "faxabab", false);
+  execRE(re, "fababab", ["ab", "ab"]);
+
+  // Back references to captures inside the lookbehind.
+  re = new RegExp(r"(?<=\1(\w))d", caseSensitive: false);
+  execRE(re, "abcCd", ["d", "C"]);
+
+  re = new RegExp(r"(?<=\1([abx]))d");
+  execRE(re, "abxxd", ["d", "x"]);
+
+  re = new RegExp(r"(?<=\1(\w+))c");
+  execRE(re, "ababc", ["c", "ab"]);
+  execRE(re, "ababbc", ["c", "b"]);
+  testRE(re, "ababdc", false);
+
+  re = new RegExp(r"(?<=(\w+)\1)c");
+  execRE(re, "ababc", ["c", "abab"]);
+
+  // Alternations are tried left to right,
+  // and we do not backtrack into a lookbehind.
+  re = new RegExp(r".*(?<=(..|...|....))(.*)");
+  execRE(re, "xabcd", ["xabcd", "cd", ""]);
+
+  re = new RegExp(r".*(?<=(xx|...|....))(.*)");
+  execRE(re, "xabcd", ["xabcd", "bcd", ""]);
+
+  re = new RegExp(r".*(?<=(xx|...))(.*)");
+  execRE(re, "xxabcd", ["xxabcd", "bcd", ""]);
+
+  re = new RegExp(r".*(?<=(xx|xxx))(.*)");
+  execRE(re, "xxabcd", ["xxabcd", "xx", "abcd"]);
+
+  // We do not backtrack into a lookbehind.
+  // The lookbehind captures "abc" so that \1 does not match. We do not backtrack
+  // to capture only "bc" in the lookbehind.
+  re = new RegExp(r"(?<=([abc]+)).\1");
+  testRE(re, "abcdbc", false);
+
+  // Greedy loop.
+  re = new RegExp(r"(?<=(b+))c");
+  execRE(re, "abbbbbbc", ["c", "bbbbbb"]);
+
+  re = new RegExp(r"(?<=(b\d+))c");
+  execRE(re, "ab1234c", ["c", "b1234"]);
+
+  re = new RegExp(r"(?<=((?:b\d{2})+))c");
+  execRE(re, "ab12b23b34c", ["c", "b12b23b34"]);
+
+  // Sticky
+  re = new RegExp(r"(?<=^(\w+))def");
+  multiRE(re, "abcdefdef", [
+    ["def", "abc"],
+    ["def", "abcdef"]
+  ]);
+
+  re = new RegExp(r"\Bdef");
+  multiRE(re, "abcdefdef", [
+    ["def"],
+    ["def"]
+  ]);
+
+  // Misc
+  re = new RegExp(r"(?<=$abc)def");
+  testRE(re, "abcdef", false);
+
+  re = new RegExp(r"^foo(?<=foo)$");
+  execRE(re, "foo", ["foo"]);
+
+  re = new RegExp(r"^f.o(?<=foo)$");
+  execRE(re, "foo", ["foo"]);
+
+  re = new RegExp(r"^f.o(?<=foo)$");
+  testRE(re, "fno", false);
+
+  re = new RegExp(r"^foo(?<!foo)$");
+  testRE(re, "foo", false);
+
+  re = new RegExp(r"^f.o(?<!foo)$");
+  testRE(re, "foo", false);
+  execRE(re, "fno", ["fno"]);
+
+  re = new RegExp(r"^foooo(?<=fo+)$");
+  execRE(re, "foooo", ["foooo"]);
+
+  re = new RegExp(r"^foooo(?<=fo*)$");
+  execRE(re, "foooo", ["foooo"]);
+
+  re = new RegExp(r"(abc\1)");
+  execRE(re, "abc", ["abc", "abc"]);
+  execRE(re, "abc\u1234", ["abc", "abc"]);
+
+  re = new RegExp(r"(abc\1)", caseSensitive: false);
+  execRE(re, "abc", ["abc", "abc"]);
+  execRE(re, "abc\u1234", ["abc", "abc"]);
+
+  final oob_subject = "abcdefghijklmnabcdefghijklmn".substring(14);
+  re = new RegExp(r"(?=(abcdefghijklmn))(?<=\1)a", caseSensitive: false);
+  testRE(re, oob_subject, false);
+
+  re = new RegExp(r"(?=(abcdefghijklmn))(?<=\1)a");
+  testRE(re, oob_subject, false);
+
+  re = new RegExp(r"(?=(abcdefg))(?<=\1)");
+  testRE(re, "abcdefgabcdefg".substring(1), false);
+
+  // Mutual recursive capture/back references
+  re = new RegExp(r"(?<=a(.\2)b(\1)).{4}");
+  execRE(re, "aabcacbc", ["cacb", "a", ""]);
+
+  re = new RegExp(r"(?<=a(\2)b(..\1))b");
+  execRE(re, "aacbacb", ["b", "ac", "ac"]);
+
+  re = new RegExp(r"(?<=(?:\1b)(aa)).");
+  execRE(re, "aabaax", ["x", "aa"]);
+
+  re = new RegExp(r"(?<=(?:\1|b)(aa)).");
+  execRE(re, "aaaax", ["x", "aa"]);
+
+  // Restricted syntax in Annex B 1.4.
+  // The check for quantifiers on lookbehinds was added later than the
+  // original feature in v8, so we may need to approve failures here
+  // separately from the rest of the file.
+  assertThrows(() => new RegExp(r"(?<=.)*")); //# 01: ok
+  assertThrows(() => new RegExp(r"(?<=.)?")); //# 01: ok
+  assertThrows(() => new RegExp(r"(?<=.)+")); //# 01: ok
+
+  // No unicode flag (yet), so can't test these.
+  // See https://github.com/dart-lang/sdk/issues/36170.
+  // assertThrows("/(?<=.)*/u", SyntaxError);
+  // assertThrows("/(?<=.){1,2}/u", SyntaxError);
+}
diff --git a/tests/corelib_2/regexp/named-captures_test.dart b/tests/corelib_2/regexp/named-captures_test.dart
new file mode 100644
index 0000000..aff61b8
--- /dev/null
+++ b/tests/corelib_2/regexp/named-captures_test.dart
@@ -0,0 +1,107 @@
+// Copyright (c) 2019, the Dart project authors. All rights reserved.
+// Copyright 2017 the V8 project authors. All rights reserved.
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+//     * Redistributions of source code must retain the above copyright
+//       notice, this list of conditions and the following disclaimer.
+//     * Redistributions in binary form must reproduce the above
+//       copyright notice, this list of conditions and the following
+//       disclaimer in the documentation and/or other materials provided
+//       with the distribution.
+//     * Neither the name of Google Inc. nor the names of its
+//       contributors may be used to endorse or promote products derived
+//       from this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+import 'package:expect/expect.dart';
+
+import 'v8_regexp_utils.dart';
+
+void main() {
+  void testRE(RegExp re, String input, bool expectedResult) {
+    if (expectedResult) {
+      assertTrue(re.hasMatch(input));
+    } else {
+      assertFalse(re.hasMatch(input));
+    }
+  }
+
+  void execRE(RegExp re, String input, List<String> expectedResult) {
+    assertTrue(re.hasMatch(input));
+    shouldBe(re.firstMatch(input), expectedResult);
+  }
+
+  void namedRE(RegExp re, String input, Map<String, String> expectedResults) {
+    assertTrue(re.hasMatch(input));
+    var match = re.firstMatch(input) as RegExpMatch;
+    for (var s in expectedResults.keys) {
+      assertEquals(match.namedGroup(s), expectedResults[s]);
+    }
+  }
+
+  void hasNames(RegExp re, String input, List<String> expectedResults) {
+    assertTrue(re.hasMatch(input));
+    var match = re.firstMatch(input) as RegExpMatch;
+    for (var s in match.groupNames) {
+      assertTrue(expectedResults.contains(s));
+    }
+  }
+
+  // Behavior in non-unicode mode.
+  assertThrows(() => RegExp(r"(?<>a)"));
+  assertThrows(() => RegExp(r"(?<aa)"));
+  assertThrows(() => RegExp(r"(?<42a>a)"));
+  assertThrows(() => RegExp(r"(?<:a>a)"));
+  assertThrows(() => RegExp(r"(?<a:>a)"));
+  assertThrows(() => RegExp(r"(?<a>a)(?<a>a)"));
+  assertThrows(() => RegExp(r"(?<a>a)(?<b>b)(?<a>a)"));
+  assertTrue(RegExp(r"\k<a>").hasMatch("k<a>"));
+  assertTrue(RegExp(r"\k<4>").hasMatch("k<4>"));
+  assertTrue(RegExp(r"\k<a").hasMatch("k<a"));
+  assertTrue(RegExp(r"\k").hasMatch("k"));
+  assertThrows(() => RegExp(r"(?<a>.)\k"));
+  assertThrows(() => RegExp(r"(?<a>.)\k<a"));
+  assertThrows(() => RegExp(r"(?<a>.)\k<b>"));
+  assertThrows(() => RegExp(r"(?<a>a)\k<ab>"));
+  assertThrows(() => RegExp(r"(?<ab>a)\k<a>"));
+  assertThrows(() => RegExp(r"\k<a>(?<ab>a)"));
+  assertThrows(() => RegExp(r"\k<a(?<a>a)"));
+  assertTrue(RegExp(r"(?<a>\a)").hasMatch("a"));
+
+  var re = RegExp(r"\k<a>");
+  execRE(re, "xxxk<a>xxx", ["k<a>"]);
+
+  re = RegExp(r"\k<a");
+  execRE(re, "xxxk<a>xxx", ["k<a"]);
+
+  re = RegExp(r"(?<a>.)(?<b>.)(?<c>.)\k<c>\k<b>\k<a>");
+  execRE(re, "abccba", ["abccba", "a", "b", "c"]);
+  namedRE(re, "abccba", {"a": "a", "b": "b", "c": "c"});
+  hasNames(re, "abccba", ["a", "b", "c"]);
+
+  // A couple of corner cases around '\k' as named back-references vs. identity
+  // escapes.
+  assertTrue(RegExp(r"\k<a>(?<=>)a").hasMatch("k<a>a"));
+  assertTrue(RegExp(r"\k<a>(?<!a)a").hasMatch("k<a>a"));
+  assertTrue(RegExp(r"\k<a>(<a>x)").hasMatch("k<a><a>x"));
+  assertTrue(RegExp(r"\k<a>(?<a>x)").hasMatch("x"));
+  assertThrows(() => RegExp(r"\k<a>(?<b>x)"));
+  assertThrows(() => RegExp(r"\k<a(?<a>.)"));
+  assertThrows(() => RegExp(r"\k(?<a>.)"));
+
+  // TODO(sstrickl): Add more tests when unicode flag support is in.
+  // https://github.com/dart-lang/sdk/issues/36170
+}
diff --git a/tests/corelib_2/string_operations_with_null_test.dart b/tests/corelib_2/string_operations_with_null_test.dart
index 2712709..8c07025 100644
--- a/tests/corelib_2/string_operations_with_null_test.dart
+++ b/tests/corelib_2/string_operations_with_null_test.dart
@@ -4,8 +4,8 @@
 
 import "package:expect/expect.dart";
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 returnStringOrNull() {
   return new DateTime.now().millisecondsSinceEpoch == 0 ? 'foo' : null;
 }
diff --git a/tests/corelib_2/string_replace_all_2_test.dart b/tests/corelib_2/string_replace_all_2_test.dart
new file mode 100644
index 0000000..39d196a
--- /dev/null
+++ b/tests/corelib_2/string_replace_all_2_test.dart
@@ -0,0 +1,11 @@
+// Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// dart2jsOptions=-Ddart2js.testing.String.replaceAll.force.regexp=true
+
+import "string_replace_all_test.dart" as base;
+
+main() {
+  base.main();
+}
diff --git a/tests/standalone_2/ffi/coordinate.dart b/tests/ffi/coordinate.dart
similarity index 100%
rename from tests/standalone_2/ffi/coordinate.dart
rename to tests/ffi/coordinate.dart
diff --git a/tests/standalone_2/ffi/coordinate_bare.dart b/tests/ffi/coordinate_bare.dart
similarity index 100%
rename from tests/standalone_2/ffi/coordinate_bare.dart
rename to tests/ffi/coordinate_bare.dart
diff --git a/tests/standalone_2/ffi/coordinate_manual.dart b/tests/ffi/coordinate_manual.dart
similarity index 100%
rename from tests/standalone_2/ffi/coordinate_manual.dart
rename to tests/ffi/coordinate_manual.dart
diff --git a/tests/standalone_2/ffi/cstring.dart b/tests/ffi/cstring.dart
similarity index 100%
rename from tests/standalone_2/ffi/cstring.dart
rename to tests/ffi/cstring.dart
diff --git a/tests/standalone_2/ffi/data_not_asan_test.dart b/tests/ffi/data_not_asan_test.dart
similarity index 100%
rename from tests/standalone_2/ffi/data_not_asan_test.dart
rename to tests/ffi/data_not_asan_test.dart
diff --git a/tests/ffi/data_test.dart b/tests/ffi/data_test.dart
new file mode 100644
index 0000000..4cdc79b
--- /dev/null
+++ b/tests/ffi/data_test.dart
@@ -0,0 +1,494 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// Dart test program for testing dart:ffi primitive data pointers.
+
+library FfiTest;
+
+import 'dart:ffi' as ffi;
+
+import "package:expect/expect.dart";
+
+void main() {
+  testPointerBasic();
+  testPointerFromPointer();
+  testPointerPointerArithmetic();
+  testPointerPointerArithmeticSizes();
+  testPointerAllocateNonPositive();
+  testPointerCast();
+  testCastGeneric();
+  testCastGeneric2();
+  testCastNativeType();
+  testCondensedNumbersInt8();
+  testCondensedNumbersFloat();
+  testRangeInt8();
+  testRangeUint8();
+  testRangeInt16();
+  testRangeUint16();
+  testRangeInt32();
+  testRangeUint32();
+  testRangeInt64();
+  testRangeUint64();
+  testRangeIntPtr();
+  testFloat();
+  testDouble();
+  testVoid();
+  testPointerPointer();
+  testPointerPointerNull();
+  testPointerStoreNull();
+  testSizeOf();
+  testPointerChain(100);
+  testTypeTest();
+  testToString();
+  testEquality();
+  testAllocateGeneric();
+  testAllocateVoid();
+  testAllocateNativeFunction();
+  testAllocateNativeType();
+  testSizeOfGeneric();
+  testSizeOfVoid();
+  testSizeOfNativeFunction();
+  testSizeOfNativeType();
+  testFreeZeroOut();
+}
+
+void testPointerBasic() {
+  ffi.Pointer<ffi.Int64> p = ffi.allocate();
+  p.store(42);
+  Expect.equals(42, p.load<int>());
+  p.free();
+}
+
+void testPointerFromPointer() {
+  ffi.Pointer<ffi.Int64> p = ffi.allocate();
+  p.store(1337);
+  int ptr = p.address;
+  ffi.Pointer<ffi.Int64> p2 = ffi.fromAddress(ptr);
+  Expect.equals(1337, p2.load<int>());
+  p.free();
+}
+
+void testPointerPointerArithmetic() {
+  ffi.Pointer<ffi.Int64> p = ffi.allocate(count: 2);
+  ffi.Pointer<ffi.Int64> p2 = p.elementAt(1);
+  p2.store(100);
+  ffi.Pointer<ffi.Int64> p3 = p.offsetBy(8);
+  Expect.equals(100, p3.load<int>());
+  p.free();
+}
+
+void testPointerPointerArithmeticSizes() {
+  ffi.Pointer<ffi.Int64> p = ffi.allocate(count: 2);
+  ffi.Pointer<ffi.Int64> p2 = p.elementAt(1);
+  int addr = p.address;
+  Expect.equals(addr + 8, p2.address);
+  p.free();
+
+  ffi.Pointer<ffi.Int32> p3 = ffi.allocate(count: 2);
+  ffi.Pointer<ffi.Int32> p4 = p3.elementAt(1);
+  addr = p3.address;
+  Expect.equals(addr + 4, p4.address);
+  p3.free();
+}
+
+void testPointerAllocateNonPositive() {
+  Expect.throws(() => ffi.allocate<ffi.Int8>(count: 0));
+  Expect.throws(() => ffi.allocate<ffi.Int8>(count: -1));
+}
+
+void testPointerCast() {
+  ffi.Pointer<ffi.Int64> p = ffi.allocate();
+  ffi.Pointer<ffi.Int32> p2 = p.cast(); // gets the correct type args back
+  p.free();
+}
+
+void testCastGeneric() {
+  ffi.Pointer<T> generic<T extends ffi.NativeType>(ffi.Pointer<ffi.Int16> p) {
+    return p.cast();
+  }
+
+  ffi.Pointer<ffi.Int16> p = ffi.allocate();
+  ffi.Pointer<ffi.Int64> p2 = generic(p);
+  p.free();
+}
+
+void testCastGeneric2() {
+  ffi.Pointer<ffi.Int64> generic<T extends ffi.NativeType>(ffi.Pointer<T> p) {
+    return p.cast();
+  }
+
+  ffi.Pointer<ffi.Int16> p = ffi.allocate();
+  ffi.Pointer<ffi.Int64> p2 = generic(p);
+  p.free();
+}
+
+void testCastNativeType() {
+  ffi.Pointer<ffi.Int64> p = ffi.allocate();
+  Expect.throws(() {
+    p.cast<ffi.Pointer>();
+  });
+  p.free();
+}
+
+void testCondensedNumbersInt8() {
+  ffi.Pointer<ffi.Int8> p = ffi.allocate(count: 8);
+  for (var i in [0, 1, 2, 3, 4, 5, 6, 7]) {
+    p.elementAt(i).store(i * 3);
+  }
+  for (var i in [0, 1, 2, 3, 4, 5, 6, 7]) {
+    Expect.equals(i * 3, p.elementAt(i).load<int>());
+  }
+  p.free();
+}
+
+void testCondensedNumbersFloat() {
+  ffi.Pointer<ffi.Float> p = ffi.allocate(count: 8);
+  for (var i in [0, 1, 2, 3, 4, 5, 6, 7]) {
+    p.elementAt(i).store(1.511366173271439e-13);
+  }
+  for (var i in [0, 1, 2, 3, 4, 5, 6, 7]) {
+    Expect.equals(1.511366173271439e-13, p.elementAt(i).load<double>());
+  }
+  p.free();
+}
+
+void testRangeInt8() {
+  ffi.Pointer<ffi.Int8> p = ffi.allocate();
+  p.store(127);
+  Expect.equals(127, p.load<int>());
+  p.store(-128);
+  Expect.equals(-128, p.load<int>());
+
+  Expect.equals(0x0000000000000080, 128);
+  Expect.equals(0xFFFFFFFFFFFFFF80, -128);
+  p.store(128);
+  Expect.equals(-128, p.load<int>()); // truncated and sign extended
+
+  Expect.equals(0xFFFFFFFFFFFFFF7F, -129);
+  Expect.equals(0x000000000000007F, 127);
+  p.store(-129);
+  Expect.equals(127, p.load<int>()); // truncated
+  p.free();
+}
+
+void testRangeUint8() {
+  ffi.Pointer<ffi.Uint8> p = ffi.allocate();
+  p.store(255);
+  Expect.equals(255, p.load<int>());
+  p.store(0);
+  Expect.equals(0, p.load<int>());
+
+  Expect.equals(0x0000000000000000, 0);
+  Expect.equals(0x0000000000000100, 256);
+  p.store(256);
+  Expect.equals(0, p.load<int>()); // truncated
+
+  Expect.equals(0xFFFFFFFFFFFFFFFF, -1);
+  Expect.equals(0x00000000000000FF, 255);
+  p.store(-1);
+  Expect.equals(255, p.load<int>()); // truncated
+  p.free();
+}
+
+void testRangeInt16() {
+  ffi.Pointer<ffi.Int16> p = ffi.allocate();
+  p.store(0x7FFF);
+  Expect.equals(0x7FFF, p.load<int>());
+  p.store(-0x8000);
+  Expect.equals(-0x8000, p.load<int>());
+  p.store(0x8000);
+  Expect.equals(
+      0xFFFFFFFFFFFF8000, p.load<int>()); // truncated and sign extended
+  p.store(-0x8001);
+  Expect.equals(0x7FFF, p.load<int>()); // truncated
+  p.free();
+}
+
+void testRangeUint16() {
+  ffi.Pointer<ffi.Uint16> p = ffi.allocate();
+  p.store(0xFFFF);
+  Expect.equals(0xFFFF, p.load<int>());
+  p.store(0);
+  Expect.equals(0, p.load<int>());
+  p.store(0x10000);
+  Expect.equals(0, p.load<int>()); // truncated
+  p.store(-1);
+  Expect.equals(0xFFFF, p.load<int>()); // truncated
+  p.free();
+}
+
+void testRangeInt32() {
+  ffi.Pointer<ffi.Int32> p = ffi.allocate();
+  p.store(0x7FFFFFFF);
+  Expect.equals(0x7FFFFFFF, p.load<int>());
+  p.store(-0x80000000);
+  Expect.equals(-0x80000000, p.load<int>());
+  p.store(0x80000000);
+  Expect.equals(
+      0xFFFFFFFF80000000, p.load<int>()); // truncated and sign extended
+  p.store(-0x80000001);
+  Expect.equals(0x7FFFFFFF, p.load<int>()); // truncated
+  p.free();
+}
+
+void testRangeUint32() {
+  ffi.Pointer<ffi.Uint32> p = ffi.allocate();
+  p.store(0xFFFFFFFF);
+  Expect.equals(0xFFFFFFFF, p.load<int>());
+  p.store(0);
+  Expect.equals(0, p.load<int>());
+  p.store(0x100000000);
+  Expect.equals(0, p.load<int>()); // truncated
+  p.store(-1);
+  Expect.equals(0xFFFFFFFF, p.load<int>()); // truncated
+  p.free();
+}
+
+void testRangeInt64() {
+  ffi.Pointer<ffi.Int64> p = ffi.allocate();
+  p.store(0x7FFFFFFFFFFFFFFF); // 2 ^ 63 - 1
+  Expect.equals(0x7FFFFFFFFFFFFFFF, p.load<int>());
+  p.store(-0x8000000000000000); // -2 ^ 63
+  Expect.equals(-0x8000000000000000, p.load<int>());
+  p.free();
+}
+
+void testRangeUint64() {
+  ffi.Pointer<ffi.Uint64> p = ffi.allocate();
+  p.store(0x7FFFFFFFFFFFFFFF); // 2 ^ 63 - 1
+  Expect.equals(0x7FFFFFFFFFFFFFFF, p.load<int>());
+  p.store(-0x8000000000000000); // -2 ^ 63 interpreted as 2 ^ 63
+  Expect.equals(-0x8000000000000000, p.load<int>());
+
+  // Dart allows interpreting bits both signed and unsigned
+  Expect.equals(0xFFFFFFFFFFFFFFFF, -1);
+  p.store(-1); // -1 interpreted as 2 ^ 64 - 1
+  Expect.equals(-1, p.load<int>());
+  Expect.equals(0xFFFFFFFFFFFFFFFF, p.load<int>());
+  p.free();
+}
+
+void testRangeIntPtr() {
+  ffi.Pointer<ffi.IntPtr> p = ffi.allocate();
+  int pAddr = p.address;
+  p.store(pAddr); // its own address should fit
+  p.store(0x7FFFFFFF); // and 32 bit addresses should fit
+  Expect.equals(0x7FFFFFFF, p.load<int>());
+  p.store(-0x80000000);
+  Expect.equals(-0x80000000, p.load<int>());
+  p.free();
+}
+
+void testFloat() {
+  ffi.Pointer<ffi.Float> p = ffi.allocate();
+  p.store(1.511366173271439e-13);
+  Expect.equals(1.511366173271439e-13, p.load<double>());
+  p.store(1.4260258159703532e-105); // float does not have enough precision
+  Expect.notEquals(1.4260258159703532e-105, p.load<double>());
+  p.free();
+}
+
+void testDouble() {
+  ffi.Pointer<ffi.Double> p = ffi.allocate();
+  p.store(1.4260258159703532e-105);
+  Expect.equals(1.4260258159703532e-105, p.load<double>());
+  p.free();
+}
+
+void testVoid() {
+  ffi.Pointer<ffi.IntPtr> p1 = ffi.allocate();
+  ffi.Pointer<ffi.Void> p2 = p1.cast(); // make this dart pointer opaque
+  p2.address; // we can print the address
+  p2.free();
+}
+
+void testPointerPointer() {
+  ffi.Pointer<ffi.Int16> p = ffi.allocate();
+  p.store(17);
+  ffi.Pointer<ffi.Pointer<ffi.Int16>> p2 = ffi.allocate();
+  p2.store(p);
+  Expect.equals(17, p2.load<ffi.Pointer<ffi.Int16>>().load<int>());
+  p2.free();
+  p.free();
+}
+
+void testPointerPointerNull() {
+  ffi.Pointer<ffi.Pointer<ffi.Int8>> pointerToPointer = ffi.allocate();
+  ffi.Pointer<ffi.Int8> value = null;
+  pointerToPointer.store(value);
+  value = pointerToPointer.load();
+  Expect.isNull(value);
+  value = ffi.allocate();
+  pointerToPointer.store(value);
+  value = pointerToPointer.load();
+  Expect.isNotNull(value);
+  value.free();
+  value = null;
+  pointerToPointer.store(value);
+  value = pointerToPointer.load();
+  Expect.isNull(value);
+  pointerToPointer.free();
+}
+
+void testPointerStoreNull() {
+  int i = null;
+  ffi.Pointer<ffi.Int8> p = ffi.allocate();
+  Expect.throws(() => p.store(i));
+  p.free();
+  double d = null;
+  ffi.Pointer<ffi.Float> p2 = ffi.allocate();
+  Expect.throws(() => p2.store(d));
+  p2.free();
+}
+
+void testSizeOf() {
+  Expect.equals(1, ffi.sizeOf<ffi.Int8>());
+  Expect.equals(2, ffi.sizeOf<ffi.Int16>());
+  Expect.equals(4, ffi.sizeOf<ffi.Int32>());
+  Expect.equals(8, ffi.sizeOf<ffi.Int64>());
+  Expect.equals(1, ffi.sizeOf<ffi.Uint8>());
+  Expect.equals(2, ffi.sizeOf<ffi.Uint16>());
+  Expect.equals(4, ffi.sizeOf<ffi.Uint32>());
+  Expect.equals(8, ffi.sizeOf<ffi.Uint64>());
+  Expect.equals(
+      true, 4 == ffi.sizeOf<ffi.IntPtr>() || 8 == ffi.sizeOf<ffi.IntPtr>());
+  Expect.equals(4, ffi.sizeOf<ffi.Float>());
+  Expect.equals(8, ffi.sizeOf<ffi.Double>());
+}
+
+// note: stack overflows at around 15k calls
+void testPointerChain(int length) {
+  void createChain(ffi.Pointer<ffi.IntPtr> head, int length, int value) {
+    if (length == 0) {
+      head.store(value);
+      return;
+    }
+    ffi.Pointer<ffi.IntPtr> next = ffi.allocate();
+    head.store(next.address);
+    createChain(next, length - 1, value);
+  }
+
+  int getChainValue(ffi.Pointer<ffi.IntPtr> head, int length) {
+    if (length == 0) {
+      return head.load();
+    }
+    ffi.Pointer<ffi.IntPtr> next = ffi.fromAddress(head.load());
+    return getChainValue(next, length - 1);
+  }
+
+  void freeChain(ffi.Pointer<ffi.IntPtr> head, int length) {
+    ffi.Pointer<ffi.IntPtr> next = ffi.fromAddress(head.load());
+    head.free();
+    if (length == 0) {
+      return;
+    }
+    freeChain(next, length - 1);
+  }
+
+  ffi.Pointer<ffi.IntPtr> head = ffi.allocate();
+  createChain(head, length, 512);
+  int tailValue = getChainValue(head, length);
+  Expect.equals(512, tailValue);
+  freeChain(head, length);
+}
+
+void testTypeTest() {
+  ffi.Pointer<ffi.Int8> p = ffi.allocate();
+  Expect.isTrue(p is ffi.Pointer);
+  p.free();
+}
+
+void testToString() {
+  ffi.Pointer<ffi.Int16> p = ffi.allocate();
+  Expect.stringEquals(
+      "Pointer<Int16>: address=0x", p.toString().substring(0, 26));
+  p.free();
+  ffi.Pointer<ffi.Int64> p2 = ffi.fromAddress(0x123abc);
+  Expect.stringEquals("Pointer<Int64>: address=0x123abc", p2.toString());
+}
+
+void testEquality() {
+  ffi.Pointer<ffi.Int8> p = ffi.fromAddress(12345678);
+  ffi.Pointer<ffi.Int8> p2 = ffi.fromAddress(12345678);
+  Expect.equals(p, p2);
+  Expect.equals(p.hashCode, p2.hashCode);
+  ffi.Pointer<ffi.Int16> p3 = p.cast();
+  Expect.equals(p, p3);
+  Expect.equals(p.hashCode, p3.hashCode);
+  Expect.notEquals(p, null);
+  Expect.notEquals(null, p);
+  ffi.Pointer<ffi.Int8> p4 = p.offsetBy(1337);
+  Expect.notEquals(p, p4);
+}
+
+typedef Int8UnOp = ffi.Int8 Function(ffi.Int8);
+
+void testAllocateGeneric() {
+  ffi.Pointer<T> generic<T extends ffi.NativeType>() {
+    ffi.Pointer<T> pointer;
+    pointer = ffi.allocate();
+    return pointer;
+  }
+
+  ffi.Pointer p = generic<ffi.Int64>();
+  p.free();
+}
+
+void testAllocateVoid() {
+  Expect.throws(() {
+    ffi.Pointer<ffi.Void> p = ffi.allocate();
+  });
+}
+
+void testAllocateNativeFunction() {
+  Expect.throws(() {
+    ffi.Pointer<ffi.NativeFunction<Int8UnOp>> p = ffi.allocate();
+  });
+}
+
+void testAllocateNativeType() {
+  Expect.throws(() {
+    ffi.allocate();
+  });
+}
+
+void testSizeOfGeneric() {
+  int generic<T extends ffi.Pointer>() {
+    int size;
+    size = ffi.sizeOf<T>();
+    return size;
+  }
+
+  int size = generic<ffi.Pointer<ffi.Int64>>();
+  Expect.isTrue(size == 8 || size == 4);
+}
+
+void testSizeOfVoid() {
+  Expect.throws(() {
+    ffi.sizeOf<ffi.Void>();
+  });
+}
+
+void testSizeOfNativeFunction() {
+  Expect.throws(() {
+    ffi.sizeOf<ffi.NativeFunction<Int8UnOp>>();
+  });
+}
+
+void testSizeOfNativeType() {
+  Expect.throws(() {
+    ffi.sizeOf();
+  });
+}
+
+void testFreeZeroOut() {
+  // at least one of these pointers should have address != 0 on all platforms
+  ffi.Pointer<ffi.Int8> p1 = ffi.allocate();
+  ffi.Pointer<ffi.Int8> p2 = ffi.allocate();
+  Expect.notEquals(0, p1.address & p2.address);
+  p1.free();
+  p2.free();
+  Expect.equals(0, p1.address);
+  Expect.equals(0, p2.address);
+}
diff --git a/tests/ffi/dylib_utils.dart b/tests/ffi/dylib_utils.dart
new file mode 100644
index 0000000..fb8153a
--- /dev/null
+++ b/tests/ffi/dylib_utils.dart
@@ -0,0 +1,20 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:ffi' as ffi;
+import 'dart:io' show Platform;
+
+String _platformPath(String name, {String path}) {
+  if (path == null) path = "";
+  if (Platform.isLinux || Platform.isAndroid)
+    return path + "lib" + name + ".so";
+  if (Platform.isMacOS) return path + "lib" + name + ".dylib";
+  if (Platform.isWindows) return path + name + ".dll";
+  throw Exception("Platform not implemented");
+}
+
+ffi.DynamicLibrary dlopenPlatformSpecific(String name, {String path}) {
+  String fullPath = _platformPath(name, path: path);
+  return ffi.DynamicLibrary.open(fullPath);
+}
diff --git a/tests/ffi/dynamic_library_test.dart b/tests/ffi/dynamic_library_test.dart
new file mode 100644
index 0000000..3282f4c
--- /dev/null
+++ b/tests/ffi/dynamic_library_test.dart
@@ -0,0 +1,67 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// Dart test program for testing dart:ffi dynamic library loading.
+//
+// SharedObjects=ffi_test_dynamic_library ffi_test_functions
+
+library FfiTest;
+
+import 'dart:ffi' as ffi;
+
+import 'dylib_utils.dart';
+
+import 'package:expect/expect.dart';
+
+void main() {
+  testOpen();
+  testOpenError();
+  testLookup();
+  testLookupError();
+  testToString();
+  testEquality();
+}
+
+void testOpen() {
+  ffi.DynamicLibrary l = dlopenPlatformSpecific("ffi_test_dynamic_library");
+  Expect.notEquals(null, l);
+}
+
+void testOpenError() {
+  Expect.throws(
+      () => dlopenPlatformSpecific("doesnotexistforsurelibrary123409876"));
+}
+
+typedef NativeDoubleUnOp = ffi.Double Function(ffi.Double);
+
+typedef DoubleUnOp = double Function(double);
+
+void testLookup() {
+  ffi.DynamicLibrary l = dlopenPlatformSpecific("ffi_test_dynamic_library");
+  var timesFour = l.lookupFunction<NativeDoubleUnOp, DoubleUnOp>("timesFour");
+  Expect.approxEquals(12.0, timesFour(3));
+}
+
+void testLookupError() {
+  ffi.DynamicLibrary l = dlopenPlatformSpecific("ffi_test_dynamic_library");
+  Expect.throws(() => l.lookupFunction<NativeDoubleUnOp, DoubleUnOp>(
+      "functionnamethatdoesnotexistforsure749237593845"));
+}
+
+void testToString() {
+  ffi.DynamicLibrary l = dlopenPlatformSpecific("ffi_test_dynamic_library");
+  Expect.stringEquals(
+      "DynamicLibrary: handle=0x", l.toString().substring(0, 25));
+}
+
+void testEquality() {
+  ffi.DynamicLibrary l = dlopenPlatformSpecific("ffi_test_dynamic_library");
+  ffi.DynamicLibrary l2 = dlopenPlatformSpecific("ffi_test_dynamic_library");
+  Expect.equals(l, l2);
+  Expect.equals(l.hashCode, l2.hashCode);
+  Expect.notEquals(l, null);
+  Expect.notEquals(null, l);
+  ffi.DynamicLibrary l3 = dlopenPlatformSpecific("ffi_test_functions");
+  Expect.notEquals(l, l3);
+}
diff --git a/tests/ffi/enable_ffi_test.dart b/tests/ffi/enable_ffi_test.dart
new file mode 100644
index 0000000..1ccb5ec
--- /dev/null
+++ b/tests/ffi/enable_ffi_test.dart
@@ -0,0 +1,20 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// Dart test program for testing the --enable-ffi=false flag.
+//
+// VMOptions=--enable-ffi=false
+
+library FfiTest;
+
+import 'dart:ffi' as ffi; //# 01: compile-time error
+
+import "package:expect/expect.dart";
+
+void main() {
+  ffi.Pointer<ffi.Int64> p = ffi.allocate(); //# 01: compile-time error, runtime error
+  p.store(42); //# 01: compile-time error, runtime error
+  Expect.equals(42, p.load<int>()); //# 01: compile-time error, runtime error
+  p.free(); //# 01: compile-time error, runtime error
+}
diff --git a/tests/ffi/enable_structs_test.dart b/tests/ffi/enable_structs_test.dart
new file mode 100644
index 0000000..ed8655b
--- /dev/null
+++ b/tests/ffi/enable_structs_test.dart
@@ -0,0 +1,25 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// Dart test program for testing that structs are locked out on 32-bit platforms.
+
+library FfiTest;
+
+import 'dart:ffi' as ffi;
+
+import "package:expect/expect.dart";
+
+@ffi.struct
+class C extends ffi.Pointer<ffi.Void> {
+  @ffi.IntPtr()
+  int x;
+  external static int sizeOf();
+}
+
+void main() {
+  final C c = ffi.fromAddress<C>(1);
+  Expect.throws<UnimplementedError>(() => c.x);
+  Expect.throws<UnimplementedError>(() => c.x = 0);
+  Expect.throws<UnimplementedError>(() => C.sizeOf());
+}
diff --git a/tests/ffi/ffi.status b/tests/ffi/ffi.status
new file mode 100644
index 0000000..5b0ab46
--- /dev/null
+++ b/tests/ffi/ffi.status
@@ -0,0 +1,38 @@
+# Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE file.
+
+[ $runtime != dart_precompiled && $runtime != vm ]
+*: SkipByDesign # FFI is a VM-only feature. (This test suite is part of the default set.)
+
+[ $builder_tag == asan ]
+data_not_asan_test: SkipByDesign # This test tries to allocate too much memory on purpose.
+
+# dartbug.com/35768: Structs not supported on 32-bit.
+[ $arch == ia32 || $arch == arm ]
+function_structs_test: Skip
+function_callbacks_test: Skip
+structs_test: Skip
+
+# dartbug.com/35934
+[ $compiler == app_jitk ]
+dynamic_library_test: Skip
+function_callbacks_test: Skip
+function_structs_test: Skip
+function_test: Skip
+negative_function_test: Skip
+
+[ $arch == x64 || $arch == arm64 ]
+enable_structs_test: SkipByDesign  # Tests that structs don't work on 32-bit systems.
+
+[ $runtime == dart_precompiled ]
+*: Skip # AOT is not yet supported: dartbug.com/35765
+
+[ $arch == simdbc64 || $arch == simarm || $arch == simarm64 ]
+*: Skip # FFI not yet supported on DBC or other simulated architectures.
+
+[ $system != android && $system != linux && $system != macos && $system != windows ]
+*: Skip # FFI not yet supported on other OSes.
+
+[ $system != android && $arch == arm ]
+*: Skip # "hardfp" calling convention is not yet supported (iOS is also supported but not tested): dartbug.com/36309
diff --git a/tests/ffi/function_callbacks_test.dart b/tests/ffi/function_callbacks_test.dart
new file mode 100644
index 0000000..0ad50a9
--- /dev/null
+++ b/tests/ffi/function_callbacks_test.dart
@@ -0,0 +1,78 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// Dart test program for testing dart:ffi function pointers with callbacks.
+//
+// SharedObjects=ffi_test_functions
+
+library FfiTest;
+
+import 'dart:ffi' as ffi;
+
+import 'dylib_utils.dart';
+
+import "package:expect/expect.dart";
+
+import 'coordinate.dart';
+
+typedef NativeCoordinateOp = Coordinate Function(Coordinate);
+
+typedef CoordinateTrice = Coordinate Function(
+    ffi.Pointer<ffi.NativeFunction<NativeCoordinateOp>>, Coordinate);
+
+void main() {
+  testFunctionWithFunctionPointer();
+  testNativeFunctionWithFunctionPointer();
+}
+
+ffi.DynamicLibrary ffiTestFunctions =
+    dlopenPlatformSpecific("ffi_test_functions");
+
+/// pass a pointer to a c function as an argument to a c function
+void testFunctionWithFunctionPointer() {
+  ffi.Pointer<ffi.NativeFunction<NativeCoordinateOp>>
+      transposeCoordinatePointer =
+      ffiTestFunctions.lookup("TransposeCoordinate");
+
+  ffi.Pointer<ffi.NativeFunction<CoordinateTrice>> p2 =
+      ffiTestFunctions.lookup("CoordinateUnOpTrice");
+  CoordinateTrice coordinateUnOpTrice = p2.asFunction();
+
+  Coordinate c1 = Coordinate(10.0, 20.0, null);
+  c1.next = c1;
+
+  Coordinate result = coordinateUnOpTrice(transposeCoordinatePointer, c1);
+
+  print(result.runtimeType);
+  print(result.x);
+  print(result.y);
+
+  c1.free();
+}
+
+typedef BinaryOp = int Function(int, int);
+
+typedef NativeIntptrBinOp = ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr);
+
+typedef NativeIntptrBinOpLookup
+    = ffi.Pointer<ffi.NativeFunction<NativeIntptrBinOp>> Function();
+
+void testNativeFunctionWithFunctionPointer() {
+  ffi.Pointer<ffi.NativeFunction<NativeIntptrBinOpLookup>> p1 =
+      ffiTestFunctions.lookup("IntptrAdditionClosure");
+  NativeIntptrBinOpLookup intptrAdditionClosure = p1.asFunction();
+
+  ffi.Pointer<ffi.NativeFunction<NativeIntptrBinOp>> intptrAdditionPointer =
+      intptrAdditionClosure();
+  BinaryOp intptrAddition = intptrAdditionPointer.asFunction();
+  Expect.equals(37, intptrAddition(10, 27));
+}
+
+int myPlus(int a, int b) => a + b;
+
+typedef NativeApplyTo42And74Type = ffi.IntPtr Function(
+    ffi.Pointer<ffi.NativeFunction<NativeIntptrBinOp>>);
+
+typedef ApplyTo42And74Type = int Function(
+    ffi.Pointer<ffi.NativeFunction<NativeIntptrBinOp>>);
diff --git a/tests/ffi/function_stress_test.dart b/tests/ffi/function_stress_test.dart
new file mode 100644
index 0000000..92e807c
--- /dev/null
+++ b/tests/ffi/function_stress_test.dart
@@ -0,0 +1,143 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// VMOptions=--deterministic --optimization-counter-threshold=500 --verbose-gc
+// VMOptions=--deterministic --optimization-counter-threshold=-1 --verbose-gc
+//
+// Dart test program for stress-testing boxing and GC in return paths from FFI
+// trampolines.
+//
+// NOTE: This test does not produce useful stderr when it fails because the
+// stderr is redirected to a file for reflection.
+//
+// SharedObjects=ffi_test_functions
+
+import 'dart:ffi' as ffi;
+import 'dylib_utils.dart';
+import "package:expect/expect.dart";
+import 'gc_helper.dart';
+
+test(GCWatcher watcher, Function testee,
+    {bool mustTriggerGC: true, bool batched: false}) async {
+  // Warmup.
+  for (int i = 0; i < 1000; ++i) {
+    batched ? testee(1) : testee();
+  }
+  int size = await watcher.size();
+  for (int i = 0; i < 1000000;) {
+    if (batched) {
+      testee(1000);
+      i += 1000;
+    } else {
+      testee();
+      i++;
+    }
+  }
+  int new_size = await watcher.size();
+  if (mustTriggerGC) {
+    print("Expect $new_size > $size.");
+    Expect.isTrue(new_size > size);
+  }
+}
+
+main() async {
+  final watcher = GCWatcher.ifAvailable();
+  try {
+    await test(watcher, testBoxInt64);
+    // On 64-bit platforms this won't trigger GC because the result fits into a
+    // Smi.
+    await test(watcher, testBoxInt32, mustTriggerGC: false);
+    await test(watcher, testBoxDouble);
+    await test(watcher, testBoxPointer);
+    await test(watcher, testAllocateMints, batched: true);
+    await test(watcher, testAllocationsInDart, batched: true);
+  } finally {
+    watcher.dispose();
+  }
+}
+
+ffi.DynamicLibrary ffiTestFunctions =
+    dlopenPlatformSpecific("ffi_test_functions");
+
+typedef NativeNullaryOp64 = ffi.Int64 Function();
+typedef NativeNullaryOp32 = ffi.Int32 Function();
+typedef NativeNullaryOpDouble = ffi.Double Function();
+typedef NativeNullaryOpPtr = ffi.Pointer<ffi.Void> Function();
+typedef NativeUnaryOp = ffi.Void Function(ffi.Uint64);
+typedef NullaryOp = int Function();
+typedef NullaryOpDbl = double Function();
+typedef NullaryOpPtr = ffi.Pointer<ffi.Void> Function();
+typedef UnaryOp = void Function(int);
+
+//// These functions return values that require boxing into different types.
+
+final minInt64 =
+    ffiTestFunctions.lookupFunction<NativeNullaryOp64, NullaryOp>("MinInt64");
+
+// Forces boxing into Mint on all platforms.
+void testBoxInt64() {
+  Expect.equals(0x8000000000000000, minInt64());
+}
+
+NullaryOp minInt32 =
+    ffiTestFunctions.lookupFunction<NativeNullaryOp32, NullaryOp>("MinInt32");
+
+// Forces boxing into Mint on 32-bit platforms only.
+void testBoxInt32() {
+  Expect.equals(-0x80000000, minInt32());
+}
+
+final smallDouble = ffiTestFunctions
+    .lookupFunction<NativeNullaryOpDouble, NullaryOpDbl>("SmallDouble");
+
+// Forces boxing into Double.
+void testBoxDouble() {
+  Expect.equals(0x80000000 * -1.0, smallDouble());
+}
+
+final largePointer = ffiTestFunctions
+    .lookupFunction<NativeNullaryOpPtr, NullaryOpPtr>("LargePointer");
+
+// Forces boxing into ffi.Pointer and ffi.Mint.
+void testBoxPointer() {
+  ffi.Pointer pointer = largePointer();
+  if (pointer != null) {
+    if (ffi.sizeOf<ffi.Pointer>() == 4) {
+      Expect.equals(0x82000000, pointer.address);
+    } else {
+      Expect.equals(0x8100000082000000, pointer.address);
+    }
+  }
+}
+
+final allocateMint =
+    ffiTestFunctions.lookupFunction<NativeUnaryOp, UnaryOp>("AllocateMints");
+
+// Test GC in the FFI call path by calling a C function which allocates through
+// the Dart API.
+void testAllocateMints(int batchSize) {
+  allocateMint(batchSize);
+}
+
+class C {
+  final int i;
+  C(this.i);
+}
+
+C c = null;
+@pragma("vm:entry-point", "call")
+void testAllocationsInDartHelper(int count) {
+  for (int i = 0; i < count; ++i) {
+    c = C(i);
+  }
+}
+
+final allocateThroughDart = ffiTestFunctions
+    .lookupFunction<NativeUnaryOp, UnaryOp>("AllocateThroughDart");
+
+// Test GC in the FFI call path by calling a C function which allocates by
+// calling back into Dart ('testAllocationsInDartHelper').
+void testAllocationsInDart(int batchSize) {
+  allocateThroughDart(batchSize * 10);
+}
diff --git a/tests/ffi/function_structs_test.dart b/tests/ffi/function_structs_test.dart
new file mode 100644
index 0000000..6f1f906
--- /dev/null
+++ b/tests/ffi/function_structs_test.dart
@@ -0,0 +1,120 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// Dart test program for testing dart:ffi function pointers with struct
+// arguments.
+//
+// SharedObjects=ffi_test_functions
+
+library FfiTest;
+
+import 'dart:ffi' as ffi;
+
+import 'dylib_utils.dart';
+
+import "package:expect/expect.dart";
+
+import 'coordinate.dart';
+import 'very_large_struct.dart';
+
+typedef NativeCoordinateOp = Coordinate Function(Coordinate);
+
+void main() {
+  testFunctionWithStruct();
+  testFunctionWithStructArray();
+  testFunctionWithVeryLargeStruct();
+}
+
+ffi.DynamicLibrary ffiTestFunctions =
+    dlopenPlatformSpecific("ffi_test_functions");
+
+/// pass a struct to a c function and get a struct as return value
+void testFunctionWithStruct() {
+  ffi.Pointer<ffi.NativeFunction<NativeCoordinateOp>> p1 =
+      ffiTestFunctions.lookup("TransposeCoordinate");
+  NativeCoordinateOp f1 = p1.asFunction();
+
+  Coordinate c1 = Coordinate(10.0, 20.0, null);
+  Coordinate c2 = Coordinate(42.0, 84.0, c1);
+  c1.next = c2;
+
+  Coordinate result = f1(c1);
+
+  Expect.approxEquals(20.0, c1.x);
+  Expect.approxEquals(30.0, c1.y);
+
+  Expect.approxEquals(42.0, result.x);
+  Expect.approxEquals(84.0, result.y);
+
+  c1.free();
+  c2.free();
+}
+
+/// pass an array of structs to a c funtion
+void testFunctionWithStructArray() {
+  ffi.Pointer<ffi.NativeFunction<NativeCoordinateOp>> p1 =
+      ffiTestFunctions.lookup("CoordinateElemAt1");
+  NativeCoordinateOp f1 = p1.asFunction();
+
+  Coordinate c1 = Coordinate.allocate(count: 3);
+  Coordinate c2 = c1.elementAt(1);
+  Coordinate c3 = c1.elementAt(2);
+  c1.x = 10.0;
+  c1.y = 10.0;
+  c1.next = c3;
+  c2.x = 20.0;
+  c2.y = 20.0;
+  c2.next = c1;
+  c3.x = 30.0;
+  c3.y = 30.0;
+  c3.next = c2;
+
+  Coordinate result = f1(c1);
+  Expect.approxEquals(20.0, result.x);
+  Expect.approxEquals(20.0, result.y);
+
+  c1.free();
+}
+
+typedef VeryLargeStructSum = int Function(VeryLargeStruct);
+typedef NativeVeryLargeStructSum = ffi.Int64 Function(VeryLargeStruct);
+
+void testFunctionWithVeryLargeStruct() {
+  ffi.Pointer<ffi.NativeFunction<NativeVeryLargeStructSum>> p1 =
+      ffiTestFunctions.lookup("SumVeryLargeStruct");
+  VeryLargeStructSum f = p1.asFunction();
+
+  VeryLargeStruct vls1 = VeryLargeStruct.allocate(count: 2);
+  VeryLargeStruct vls2 = vls1.elementAt(1);
+  List<VeryLargeStruct> structs = [vls1, vls2];
+  for (VeryLargeStruct struct in structs) {
+    struct.a = 1;
+    struct.b = 2;
+    struct.c = 4;
+    struct.d = 8;
+    struct.e = 16;
+    struct.f = 32;
+    struct.g = 64;
+    struct.h = 128;
+    struct.i = 256;
+    struct.j = 512;
+    struct.k = 1024;
+    struct.smallLastField = 1;
+  }
+  vls1.parent = vls2;
+  vls1.numChidlren = 2;
+  vls1.children = vls1;
+  vls2.parent = vls2;
+  vls2.parent = null;
+  vls2.numChidlren = 0;
+  vls2.children = null;
+
+  int result = f(vls1);
+  Expect.equals(2051, result);
+
+  result = f(vls2);
+  Expect.equals(2048, result);
+
+  vls1.free();
+}
diff --git a/tests/ffi/function_test.dart b/tests/ffi/function_test.dart
new file mode 100644
index 0000000..07f8fc2
--- /dev/null
+++ b/tests/ffi/function_test.dart
@@ -0,0 +1,408 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// Dart test program for testing dart:ffi function pointers.
+//
+// VMOptions=
+// VMOptions=--deterministic --optimization-counter-threshold=10
+// SharedObjects=ffi_test_functions
+
+library FfiTest;
+
+import 'dart:ffi' as ffi;
+
+import 'dylib_utils.dart';
+
+import "package:expect/expect.dart";
+
+void main() {
+  for (int i = 0; i < 100; ++i) {
+    testNativeFunctionFromCast();
+    testNativeFunctionFromLookup();
+    test64bitInterpretations();
+    testExtension();
+    testTruncation();
+    testNativeFunctionDoubles();
+    testNativeFunctionFloats();
+    testNativeFunctionManyArguments1();
+    testNativeFunctionManyArguments2();
+    testNativeFunctionManyArguments3();
+    testNativeFunctionPointer();
+    testNullInt();
+    testNullDouble();
+    testNullManyArgs();
+    testNullPointers();
+    testFloatRounding();
+    testVoidReturn();
+    testNoArgs();
+  }
+}
+
+ffi.DynamicLibrary ffiTestFunctions =
+    dlopenPlatformSpecific("ffi_test_functions");
+
+typedef NativeBinaryOp = ffi.Int32 Function(ffi.Int32, ffi.Int32);
+typedef UnaryOp = int Function(int);
+typedef BinaryOp = int Function(int, int);
+typedef GenericBinaryOp<T> = int Function(int, T);
+
+void testNativeFunctionFromCast() {
+  ffi.Pointer<ffi.IntPtr> p1 = ffi.allocate();
+  ffi.Pointer<ffi.NativeFunction<NativeBinaryOp>> p2 = p1.cast();
+  p2.asFunction<BinaryOp>();
+  p2.asFunction<GenericBinaryOp<int>>();
+  p1.free();
+}
+
+typedef NativeQuadOpSigned = ffi.Int64 Function(
+    ffi.Int8, ffi.Int16, ffi.Int32, ffi.Int64);
+typedef QuadOp = int Function(int, int, int, int);
+typedef NativeQuadOpUnsigned = ffi.Uint64 Function(
+    ffi.Uint8, ffi.Uint16, ffi.Uint32, ffi.Uint64);
+
+BinaryOp sumPlus42 =
+    ffiTestFunctions.lookupFunction<NativeBinaryOp, BinaryOp>("SumPlus42");
+
+QuadOp intComputation = ffiTestFunctions
+    .lookupFunction<NativeQuadOpSigned, QuadOp>("IntComputation");
+
+void testNativeFunctionFromLookup() {
+  Expect.equals(49, sumPlus42(3, 4));
+
+  Expect.equals(625, intComputation(125, 250, 500, 1000));
+
+  Expect.equals(
+      0x7FFFFFFFFFFFFFFF, intComputation(0, 0, 0, 0x7FFFFFFFFFFFFFFF));
+  Expect.equals(
+      -0x8000000000000000, intComputation(0, 0, 0, -0x8000000000000000));
+}
+
+typedef NativeReturnMaxUint8 = ffi.Uint8 Function();
+int Function() returnMaxUint8 = ffiTestFunctions
+    .lookup("ReturnMaxUint8")
+    .cast<ffi.Pointer<ffi.NativeFunction<NativeReturnMaxUint8>>>()
+    .asFunction();
+
+typedef NativeReturnMaxUint16 = ffi.Uint16 Function();
+int Function() returnMaxUint16 = ffiTestFunctions
+    .lookup("ReturnMaxUint16")
+    .cast<ffi.Pointer<ffi.NativeFunction<NativeReturnMaxUint16>>>()
+    .asFunction();
+
+typedef NativeReturnMaxUint32 = ffi.Uint32 Function();
+int Function() returnMaxUint32 = ffiTestFunctions
+    .lookup("ReturnMaxUint32")
+    .cast<ffi.Pointer<ffi.NativeFunction<NativeReturnMaxUint32>>>()
+    .asFunction();
+
+typedef NativeReturnMinInt8 = ffi.Int8 Function();
+int Function() returnMinInt8 = ffiTestFunctions
+    .lookup("ReturnMinInt8")
+    .cast<ffi.Pointer<ffi.NativeFunction<NativeReturnMinInt8>>>()
+    .asFunction();
+
+typedef NativeReturnMinInt16 = ffi.Int16 Function();
+int Function() returnMinInt16 = ffiTestFunctions
+    .lookup("ReturnMinInt16")
+    .cast<ffi.Pointer<ffi.NativeFunction<NativeReturnMinInt16>>>()
+    .asFunction();
+
+typedef NativeReturnMinInt32 = ffi.Int32 Function();
+int Function() returnMinInt32 = ffiTestFunctions
+    .lookup("ReturnMinInt32")
+    .cast<ffi.Pointer<ffi.NativeFunction<NativeReturnMinInt32>>>()
+    .asFunction();
+
+typedef NativeTakeMaxUint8 = ffi.IntPtr Function(ffi.Uint8);
+int Function(int) takeMaxUint8 = ffiTestFunctions
+    .lookup("TakeMaxUint8")
+    .cast<ffi.Pointer<ffi.NativeFunction<NativeTakeMaxUint8>>>()
+    .asFunction();
+
+typedef NativeTakeMaxUint16 = ffi.IntPtr Function(ffi.Uint16);
+int Function(int) takeMaxUint16 = ffiTestFunctions
+    .lookup("TakeMaxUint16")
+    .cast<ffi.Pointer<ffi.NativeFunction<NativeTakeMaxUint16>>>()
+    .asFunction();
+
+typedef NativeTakeMaxUint32 = ffi.IntPtr Function(ffi.Uint32);
+int Function(int) takeMaxUint32 = ffiTestFunctions
+    .lookup("TakeMaxUint32")
+    .cast<ffi.Pointer<ffi.NativeFunction<NativeTakeMaxUint32>>>()
+    .asFunction();
+
+typedef NativeTakeMinInt8 = ffi.IntPtr Function(ffi.Int8);
+int Function(int) takeMinInt8 = ffiTestFunctions
+    .lookup("TakeMinInt8")
+    .cast<ffi.Pointer<ffi.NativeFunction<NativeTakeMinInt8>>>()
+    .asFunction();
+
+typedef NativeTakeMinInt16 = ffi.IntPtr Function(ffi.Int16);
+int Function(int) takeMinInt16 = ffiTestFunctions
+    .lookup("TakeMinInt16")
+    .cast<ffi.Pointer<ffi.NativeFunction<NativeTakeMinInt16>>>()
+    .asFunction();
+
+typedef NativeTakeMinInt32 = ffi.IntPtr Function(ffi.Int32);
+int Function(int) takeMinInt32 = ffiTestFunctions
+    .lookup("TakeMinInt32")
+    .cast<ffi.Pointer<ffi.NativeFunction<NativeTakeMinInt32>>>()
+    .asFunction();
+
+void testExtension() {
+  Expect.equals(returnMaxUint8(), 0xff);
+  Expect.equals(returnMaxUint16(), 0xffff);
+  Expect.equals(returnMaxUint32(), 0xffffffff);
+  Expect.equals(returnMinInt8(), -0x80);
+  Expect.equals(returnMinInt16(), -0x8000);
+  Expect.equals(returnMinInt32(), -0x80000000);
+
+  Expect.equals(takeMaxUint8(0xff), 1);
+  Expect.equals(takeMaxUint16(0xffff), 1);
+  Expect.equals(takeMaxUint32(0xffffffff), 1);
+  Expect.equals(takeMinInt8(0x80), 1);
+  Expect.equals(takeMinInt16(0x8000), 1);
+  Expect.equals(takeMinInt32(0x80000000), 1);
+}
+
+QuadOp uintComputation = ffiTestFunctions
+    .lookupFunction<NativeQuadOpUnsigned, QuadOp>("UintComputation");
+
+void test64bitInterpretations() {
+  // 2 ^ 63 - 1
+  Expect.equals(
+      0x7FFFFFFFFFFFFFFF, uintComputation(0, 0, 0, 0x7FFFFFFFFFFFFFFF));
+  // -2 ^ 63 interpreted as 2 ^ 63
+  Expect.equals(
+      -0x8000000000000000, uintComputation(0, 0, 0, -0x8000000000000000));
+  // -1 interpreted as 2 ^ 64 - 1
+  Expect.equals(-1, uintComputation(0, 0, 0, -1));
+}
+
+typedef NativeSenaryOp = ffi.Int64 Function(
+    ffi.Int8, ffi.Int16, ffi.Int32, ffi.Uint8, ffi.Uint16, ffi.Uint32);
+typedef SenaryOp = int Function(int, int, int, int, int, int);
+
+SenaryOp sumSmallNumbers = ffiTestFunctions
+    .lookupFunction<NativeSenaryOp, SenaryOp>("SumSmallNumbers");
+
+void testTruncation() {
+  sumSmallNumbers(128, 0, 0, 0, 0, 0);
+  sumSmallNumbers(-129, 0, 0, 0, 0, 0);
+  sumSmallNumbers(0, 0, 0, 256, 0, 0);
+  sumSmallNumbers(0, 0, 0, -1, 0, 0);
+
+  sumSmallNumbers(0, 0x8000, 0, 0, 0, 0);
+  sumSmallNumbers(0, 0xFFFFFFFFFFFF7FFF, 0, 0, 0, 0);
+  sumSmallNumbers(0, 0, 0, 0, 0x10000, 0);
+  sumSmallNumbers(0, 0, 0, 0, -1, 0);
+
+  Expect.equals(0xFFFFFFFF80000000, sumSmallNumbers(0, 0, 0x80000000, 0, 0, 0));
+  Expect.equals(
+      0x000000007FFFFFFF, sumSmallNumbers(0, 0, 0xFFFFFFFF7FFFFFFF, 0, 0, 0));
+  Expect.equals(0, sumSmallNumbers(0, 0, 0, 0, 0, 0x100000000));
+  Expect.equals(0xFFFFFFFF, sumSmallNumbers(0, 0, 0, 0, 0, -1));
+}
+
+typedef NativeDoubleUnaryOp = ffi.Double Function(ffi.Double);
+typedef DoubleUnaryOp = double Function(double);
+
+DoubleUnaryOp times1_337Double = ffiTestFunctions
+    .lookupFunction<NativeDoubleUnaryOp, DoubleUnaryOp>("Times1_337Double");
+
+void testNativeFunctionDoubles() {
+  Expect.approxEquals(2.0 * 1.337, times1_337Double(2.0));
+}
+
+typedef NativeFloatUnaryOp = ffi.Float Function(ffi.Float);
+
+DoubleUnaryOp times1_337Float = ffiTestFunctions
+    .lookupFunction<NativeFloatUnaryOp, DoubleUnaryOp>("Times1_337Float");
+
+void testNativeFunctionFloats() {
+  Expect.approxEquals(1337.0, times1_337Float(1000.0));
+}
+
+typedef NativeOctenaryOp = ffi.IntPtr Function(
+    ffi.IntPtr,
+    ffi.IntPtr,
+    ffi.IntPtr,
+    ffi.IntPtr,
+    ffi.IntPtr,
+    ffi.IntPtr,
+    ffi.IntPtr,
+    ffi.IntPtr,
+    ffi.IntPtr,
+    ffi.IntPtr);
+typedef OctenaryOp = int Function(
+    int, int, int, int, int, int, int, int, int, int);
+
+OctenaryOp sumManyInts = ffiTestFunctions
+    .lookupFunction<NativeOctenaryOp, OctenaryOp>("SumManyInts");
+
+void testNativeFunctionManyArguments1() {
+  Expect.equals(55, sumManyInts(1, 2, 3, 4, 5, 6, 7, 8, 9, 10));
+}
+
+typedef NativeDoubleOctenaryOp = ffi.Double Function(
+    ffi.Double,
+    ffi.Double,
+    ffi.Double,
+    ffi.Double,
+    ffi.Double,
+    ffi.Double,
+    ffi.Double,
+    ffi.Double,
+    ffi.Double,
+    ffi.Double);
+typedef DoubleOctenaryOp = double Function(double, double, double, double,
+    double, double, double, double, double, double);
+
+DoubleOctenaryOp sumManyDoubles = ffiTestFunctions
+    .lookupFunction<NativeDoubleOctenaryOp, DoubleOctenaryOp>("SumManyDoubles");
+
+void testNativeFunctionManyArguments2() {
+  Expect.approxEquals(
+      55.0, sumManyDoubles(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0));
+}
+
+typedef NativeVigesimalOp = ffi.Double Function(
+    ffi.IntPtr,
+    ffi.Float,
+    ffi.IntPtr,
+    ffi.Double,
+    ffi.IntPtr,
+    ffi.Float,
+    ffi.IntPtr,
+    ffi.Double,
+    ffi.IntPtr,
+    ffi.Float,
+    ffi.IntPtr,
+    ffi.Double,
+    ffi.IntPtr,
+    ffi.Float,
+    ffi.IntPtr,
+    ffi.Double,
+    ffi.IntPtr,
+    ffi.Float,
+    ffi.IntPtr,
+    ffi.Double);
+typedef VigesimalOp = double Function(
+    int,
+    double,
+    int,
+    double,
+    int,
+    double,
+    int,
+    double,
+    int,
+    double,
+    int,
+    double,
+    int,
+    double,
+    int,
+    double,
+    int,
+    double,
+    int,
+    double);
+
+VigesimalOp sumManyNumbers = ffiTestFunctions
+    .lookupFunction<NativeVigesimalOp, VigesimalOp>("SumManyNumbers");
+
+void testNativeFunctionManyArguments3() {
+  Expect.approxEquals(
+      210.0,
+      sumManyNumbers(1, 2.0, 3, 4.0, 5, 6.0, 7, 8.0, 9, 10.0, 11, 12.0, 13,
+          14.0, 15, 16.0, 17, 18.0, 19, 20.0));
+}
+
+typedef Int64PointerUnOp = ffi.Pointer<ffi.Int64> Function(
+    ffi.Pointer<ffi.Int64>);
+
+Int64PointerUnOp assign1337Index1 = ffiTestFunctions
+    .lookupFunction<Int64PointerUnOp, Int64PointerUnOp>("Assign1337Index1");
+
+void testNativeFunctionPointer() {
+  ffi.Pointer<ffi.Int64> p2 = ffi.allocate(count: 2);
+  p2.store(42);
+  p2.elementAt(1).store(1000);
+  ffi.Pointer<ffi.Int64> result = assign1337Index1(p2);
+  Expect.equals(1337, result.load<int>());
+  Expect.equals(1337, p2.elementAt(1).load<int>());
+  Expect.equals(p2.elementAt(1).address, result.address);
+  p2.free();
+}
+
+void testNullInt() {
+  BinaryOp sumPlus42 =
+      ffiTestFunctions.lookupFunction<NativeBinaryOp, BinaryOp>("SumPlus42");
+
+  Expect.throws(() => sumPlus42(43, null));
+}
+
+void testNullDouble() {
+  Expect.throws(() => times1_337Double(null));
+}
+
+void testNullManyArgs() {
+  Expect.throws(() => sumManyNumbers(1, 2.0, 3, 4.0, 5, 6.0, 7, 8.0, 9, 10.0,
+      11, 12.0, 13, 14.0, 15, 16.0, 17, 18.0, null, 20.0));
+}
+
+Int64PointerUnOp nullableInt64ElemAt1 = ffiTestFunctions
+    .lookupFunction<Int64PointerUnOp, Int64PointerUnOp>("NullableInt64ElemAt1");
+
+void testNullPointers() {
+  ffi.Pointer<ffi.Int64> result = nullableInt64ElemAt1(null);
+  Expect.isNull(result);
+
+  ffi.Pointer<ffi.Int64> p2 = ffi.allocate(count: 2);
+  result = nullableInt64ElemAt1(p2);
+  Expect.isNotNull(result);
+  p2.free();
+}
+
+typedef NativeFloatPointerToBool = ffi.Uint8 Function(ffi.Pointer<ffi.Float>);
+typedef FloatPointerToBool = int Function(ffi.Pointer<ffi.Float>);
+
+FloatPointerToBool isRoughly1337 = ffiTestFunctions.lookupFunction<
+    NativeFloatPointerToBool, FloatPointerToBool>("IsRoughly1337");
+
+void testFloatRounding() {
+  ffi.Pointer<ffi.Float> p2 = ffi.allocate();
+  p2.store(1337.0);
+
+  int result = isRoughly1337(p2);
+  Expect.equals(1, result);
+
+  p2.free();
+}
+
+typedef NativeFloatToVoid = ffi.Void Function(ffi.Float);
+typedef DoubleToVoid = void Function(double);
+
+DoubleToVoid devNullFloat = ffiTestFunctions
+    .lookupFunction<NativeFloatToVoid, DoubleToVoid>("DevNullFloat");
+
+void testVoidReturn() {
+  devNullFloat(1337.0);
+
+  dynamic loseSignature = devNullFloat;
+  dynamic result = loseSignature(1337.0);
+  Expect.isNull(result);
+}
+
+typedef NativeVoidToFloat = ffi.Float Function();
+typedef VoidToDouble = double Function();
+
+VoidToDouble inventFloatValue = ffiTestFunctions
+    .lookupFunction<NativeVoidToFloat, VoidToDouble>("InventFloatValue");
+
+void testNoArgs() {
+  double result = inventFloatValue();
+  Expect.approxEquals(1337.0, result);
+}
diff --git a/tests/ffi/gc_helper.dart b/tests/ffi/gc_helper.dart
new file mode 100644
index 0000000..abe0454
--- /dev/null
+++ b/tests/ffi/gc_helper.dart
@@ -0,0 +1,54 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:io';
+import 'dylib_utils.dart';
+import 'dart:ffi';
+import 'dart:io' show Platform;
+
+DynamicLibrary ffiTestFunctions = dlopenPlatformSpecific("ffi_test_functions");
+
+const bool isProduct = const bool.fromEnvironment("dart.vm.product");
+
+abstract class GCWatcher {
+  factory GCWatcher() => _GCWatcherImpl();
+  factory GCWatcher.dummy() => _MockGCWatcher();
+  factory GCWatcher.ifAvailable() =>
+      (Platform.isWindows || Platform.isAndroid || isProduct)
+          ? GCWatcher.dummy()
+          : GCWatcher();
+
+  Future<int> size();
+  void dispose();
+}
+
+// Requires --verbose-gc.
+class _GCWatcherImpl implements GCWatcher {
+  int _suffix;
+
+  Future<int> size() async {
+    return await File("/tmp/captured_stderr_$_suffix").length();
+  }
+
+  _GCWatcherImpl() {
+    print("Starting...");
+    _suffix = ffiTestFunctions
+        .lookupFunction<Int32 Function(), int Function()>("RedirectStderr")();
+  }
+
+  dispose() {
+    try {
+      File("/tmp/captured_stderr_$_suffix").deleteSync();
+    } catch (e) {
+      print("deleting file failed");
+    }
+  }
+}
+
+class _MockGCWatcher implements GCWatcher {
+  int _ctr = 0;
+
+  Future<int> size() async => ++_ctr;
+  dispose() {}
+}
diff --git a/tests/ffi/negative_function_test.dart b/tests/ffi/negative_function_test.dart
new file mode 100644
index 0000000..f851728
--- /dev/null
+++ b/tests/ffi/negative_function_test.dart
@@ -0,0 +1,63 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// Dart test program for testing error handling with dart:ffi functions.
+//
+// SharedObjects=ffi_test_functions
+
+import 'dart:ffi' as ffi;
+import 'dylib_utils.dart';
+import "package:expect/expect.dart";
+
+main() {
+  testWrongArity();
+  testWrongTypes();
+}
+
+ffi.DynamicLibrary ffiTestFunctions =
+    dlopenPlatformSpecific("ffi_test_functions");
+
+typedef NativeBinaryOp = ffi.Int32 Function(ffi.Int32, ffi.Int32);
+typedef BinaryOp = int Function(int, int);
+
+typedef NativeUnaryOp = ffi.Int64 Function(ffi.Pointer<ffi.Int64>);
+typedef UnaryOp = int Function(ffi.Pointer<ffi.Int64>);
+
+void testWrongArity() {
+  {
+    dynamic sumPlus42 =
+        ffiTestFunctions.lookupFunction<NativeBinaryOp, BinaryOp>("SumPlus42");
+    Expect.throwsNoSuchMethodError(() => sumPlus42(10));
+    Expect.throwsNoSuchMethodError(() => sumPlus42(10, 11, 12));
+    Expect.throwsNoSuchMethodError(() => sumPlus42(10, 11, 12, y: 13));
+  }
+
+  {
+    Function sumPlus42 =
+        ffiTestFunctions.lookupFunction<NativeBinaryOp, BinaryOp>("SumPlus42");
+    Expect.throwsNoSuchMethodError(() => sumPlus42(10));
+    Expect.throwsNoSuchMethodError(() => sumPlus42(10, 11, 12));
+    Expect.throwsNoSuchMethodError(() => sumPlus42(10, 11, 12, y: 13));
+  }
+}
+
+void testWrongTypes() {
+  {
+    dynamic sumPlus42 =
+        ffiTestFunctions.lookupFunction<NativeBinaryOp, BinaryOp>("SumPlus42");
+    Expect.throwsTypeError(() => sumPlus42("abc", "def"));
+  }
+
+  {
+    Function sumPlus42 =
+        ffiTestFunctions.lookupFunction<NativeBinaryOp, BinaryOp>("SumPlus42");
+    Expect.throwsTypeError(() => sumPlus42("abc", "def"));
+  }
+
+  {
+    dynamic pointerOp = ffiTestFunctions
+        .lookupFunction<NativeUnaryOp, UnaryOp>("Assign1337Index1");
+    Expect.throwsTypeError(() => pointerOp(0));
+  }
+}
diff --git a/tests/ffi/static_checks_test.dart b/tests/ffi/static_checks_test.dart
new file mode 100644
index 0000000..e0ab94c
--- /dev/null
+++ b/tests/ffi/static_checks_test.dart
@@ -0,0 +1,369 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// Dart test program for testing dart:ffi extra checks
+//
+// SharedObjects=ffi_test_dynamic_library
+
+library FfiTest;
+
+import 'dart:ffi' as ffi;
+
+import 'dylib_utils.dart';
+
+void main() {
+  testGetGeneric();
+  testGetGeneric2();
+  testGetVoid();
+  testGetNativeFunction();
+  testGetNativeType();
+  testGetTypeMismatch();
+  testSetGeneric();
+  testSetGeneric2();
+  testSetVoid();
+  testSetNativeFunction();
+  testSetNativeType();
+  testSetTypeMismatch();
+  testAsFunctionGeneric();
+  testAsFunctionGeneric2();
+  testAsFunctionWrongNativeFunctionSignature();
+  testAsFunctionTypeMismatch();
+  testFromFunctionGeneric();
+  testFromFunctionGeneric2();
+  testFromFunctionWrongNativeFunctionSignature();
+  testFromFunctionTypeMismatch();
+  testFromFunctionClosure();
+  testFromFunctionTearOff();
+  testLookupFunctionGeneric();
+  testLookupFunctionGeneric2();
+  testLookupFunctionWrongNativeFunctionSignature();
+  testLookupFunctionTypeMismatch();
+  testNativeFunctionSignatureInvalidReturn();
+  testNativeFunctionSignatureInvalidParam();
+  testNativeFunctionSignatureInvalidOptionalNamed();
+  testNativeFunctionSignatureInvalidOptionalPositional();
+}
+
+typedef Int8UnOp = ffi.Int8 Function(ffi.Int8);
+typedef IntUnOp = int Function(int);
+
+void testGetGeneric() {
+  int generic(ffi.Pointer p) {
+    int result;
+    result = p.load<int>(); //# 20: compile-time error
+    return result;
+  }
+
+  ffi.Pointer<ffi.Int8> p = ffi.allocate();
+  p.store(123);
+  ffi.Pointer loseType = p;
+  generic(loseType);
+  p.free();
+}
+
+void testGetGeneric2() {
+  T generic<T extends Object>() {
+    ffi.Pointer<ffi.Int8> p = ffi.allocate();
+    p.store(123);
+    T result;
+    result = p.load<T>(); //# 21: compile-time error
+    p.free();
+    return result;
+  }
+
+  generic<int>();
+}
+
+void testGetVoid() {
+  ffi.Pointer<ffi.IntPtr> p1 = ffi.allocate();
+  ffi.Pointer<ffi.Void> p2 = p1.cast();
+
+  p2.load<int>(); //# 22: compile-time error
+
+  p1.free();
+}
+
+void testGetNativeFunction() {
+  ffi.Pointer<ffi.NativeFunction<Int8UnOp>> p = ffi.fromAddress(1337);
+  IntUnOp f = p.load(); //# 23: compile-time error
+}
+
+void testGetNativeType() {
+  // Is it possible to obtain a ffi.Pointer<ffi.NativeType> at all?
+}
+
+void testGetTypeMismatch() {
+  ffi.Pointer<ffi.Pointer<ffi.Int16>> p = ffi.allocate();
+  ffi.Pointer<ffi.Int16> typedNull = null;
+  p.store(typedNull);
+
+  // this fails to compile due to type mismatch
+  ffi.Pointer<ffi.Int8> p2 = p.load(); //# 25: compile-time error
+
+  p.free();
+}
+
+void testSetGeneric() {
+  void generic(ffi.Pointer p) {
+    p.store(123); //# 26: compile-time error
+  }
+
+  ffi.Pointer<ffi.Int8> p = ffi.allocate();
+  p.store(123);
+  ffi.Pointer loseType = p;
+  generic(loseType);
+  p.free();
+}
+
+void testSetGeneric2() {
+  void generic<T extends Object>(T arg) {
+    ffi.Pointer<ffi.Int8> p = ffi.allocate();
+    p.store(arg); //# 27: compile-time error
+    p.free();
+  }
+
+  generic<int>(123);
+}
+
+void testSetVoid() {
+  ffi.Pointer<ffi.IntPtr> p1 = ffi.allocate();
+  ffi.Pointer<ffi.Void> p2 = p1.cast();
+
+  p2.store(1234); //# 28: compile-time error
+
+  p1.free();
+}
+
+void testSetNativeFunction() {
+  ffi.Pointer<ffi.NativeFunction<Int8UnOp>> p = ffi.fromAddress(1337);
+  IntUnOp f = (a) => a + 1;
+  p.store(f); //# 29: compile-time error
+}
+
+void testSetNativeType() {
+  // Is it possible to obtain a ffi.Pointer<ffi.NativeType> at all?
+}
+
+void testSetTypeMismatch() {
+  // the pointer to pointer types must match up
+  ffi.Pointer<ffi.Int8> pHelper = ffi.allocate();
+  pHelper.store(123);
+
+  ffi.Pointer<ffi.Pointer<ffi.Int16>> p = ffi.allocate();
+
+  // this fails to compile due to type mismatch
+  p.store(pHelper); //# 40: compile-time error
+
+  pHelper.free();
+  p.free();
+}
+
+void testAsFunctionGeneric() {
+  T generic<T extends Function>() {
+    ffi.Pointer<ffi.NativeFunction<Int8UnOp>> p = ffi.fromAddress(1337);
+    Function f;
+    f = p.asFunction<T>(); //# 11: compile-time error
+    return f;
+  }
+
+  generic<IntUnOp>();
+}
+
+void testAsFunctionGeneric2() {
+  generic(ffi.Pointer<ffi.NativeFunction> p) {
+    Function f;
+    f = p.asFunction<IntUnOp>(); //# 12: compile-time error
+    return f;
+  }
+
+  ffi.Pointer<ffi.NativeFunction<Int8UnOp>> p = ffi.fromAddress(1337);
+  generic(p);
+}
+
+void testAsFunctionWrongNativeFunctionSignature() {
+  ffi.Pointer<ffi.NativeFunction<IntUnOp>> p;
+  Function f = p.asFunction<IntUnOp>(); //# 13: compile-time error
+}
+
+typedef IntBinOp = int Function(int, int);
+
+void testAsFunctionTypeMismatch() {
+  ffi.Pointer<ffi.NativeFunction<Int8UnOp>> p = ffi.fromAddress(1337);
+  IntBinOp f = p.asFunction(); //# 14: compile-time error
+}
+
+typedef NativeDoubleUnOp = ffi.Double Function(ffi.Double);
+typedef DoubleUnOp = double Function(double);
+
+double myTimesThree(double d) => d * 3;
+
+int myTimesFour(int i) => i * 4;
+
+void testFromFunctionGeneric() {
+  ffi.Pointer<ffi.NativeFunction> generic<T extends Function>(T f) {
+    ffi.Pointer<ffi.NativeFunction<NativeDoubleUnOp>> result;
+    result = ffi.fromFunction(f); //# 70: compile-time error
+    return result;
+  }
+
+  generic(myTimesThree);
+}
+
+void testFromFunctionGeneric2() {
+  ffi.Pointer<ffi.NativeFunction<T>> generic<T extends Function>() {
+    ffi.Pointer<ffi.NativeFunction<T>> result;
+    result = ffi.fromFunction(myTimesThree); //# 71: compile-time error
+    return result;
+  }
+
+  generic<NativeDoubleUnOp>();
+}
+
+void testFromFunctionWrongNativeFunctionSignature() {
+  ffi.fromFunction<IntUnOp>(myTimesFour); //# 72: compile-time error
+}
+
+void testFromFunctionTypeMismatch() {
+  ffi.Pointer<ffi.NativeFunction<NativeDoubleUnOp>> p;
+  p = ffi.fromFunction(myTimesFour); //# 73: compile-time error
+}
+
+void testFromFunctionClosure() {
+  DoubleUnOp someClosure = (double z) => z / 27.0;
+  ffi.Pointer<ffi.NativeFunction<NativeDoubleUnOp>> p;
+  p = ffi.fromFunction(someClosure); //# 74: compile-time error
+}
+
+class X {
+  double tearoff(double d) => d / 27.0;
+}
+
+DoubleUnOp fld = null;
+
+void testFromFunctionTearOff() {
+  fld = X().tearoff;
+  ffi.Pointer<ffi.NativeFunction<NativeDoubleUnOp>> p;
+  p = ffi.fromFunction(fld); //# 75: compile-time error
+}
+
+void testLookupFunctionGeneric() {
+  Function generic<T extends Function>() {
+    ffi.DynamicLibrary l = dlopenPlatformSpecific("ffi_test_dynamic_library");
+    Function result;
+    result = l.lookupFunction<T, DoubleUnOp>("cos"); //# 15: compile-time error
+    return result;
+  }
+
+  generic<NativeDoubleUnOp>();
+}
+
+void testLookupFunctionGeneric2() {
+  Function generic<T extends Function>() {
+    ffi.DynamicLibrary l = dlopenPlatformSpecific("ffi_test_dynamic_library");
+    Function result;
+    result = //# 16: compile-time error
+        l.lookupFunction<NativeDoubleUnOp, T>("cos"); //# 16: compile-time error
+    return result;
+  }
+
+  generic<DoubleUnOp>();
+}
+
+void testLookupFunctionWrongNativeFunctionSignature() {
+  ffi.DynamicLibrary l = dlopenPlatformSpecific("ffi_test_dynamic_library");
+  l.lookupFunction<IntUnOp, IntUnOp>("cos"); //# 17: compile-time error
+}
+
+void testLookupFunctionTypeMismatch() {
+  ffi.DynamicLibrary l = dlopenPlatformSpecific("ffi_test_dynamic_library");
+  l.lookupFunction<NativeDoubleUnOp, IntUnOp>("cos"); //# 18: compile-time error
+}
+
+// TODO(dacoharkes): make the next 4 test compile errors
+typedef Invalid1 = int Function(ffi.Int8);
+typedef Invalid2 = ffi.Int8 Function(int);
+typedef Invalid3 = ffi.Int8 Function({ffi.Int8 named});
+typedef Invalid4 = ffi.Int8 Function([ffi.Int8 positional]);
+
+void testNativeFunctionSignatureInvalidReturn() {
+  // ffi.Pointer<ffi.NativeFunction<Invalid1>> p = ffi.fromAddress(999);
+}
+
+void testNativeFunctionSignatureInvalidParam() {
+  // ffi.Pointer<ffi.NativeFunction<Invalid2>> p = ffi.fromAddress(999);
+}
+
+void testNativeFunctionSignatureInvalidOptionalNamed() {
+  // ffi.Pointer<ffi.NativeFunction<Invalid3>> p = ffi.fromAddress(999);
+}
+
+void testNativeFunctionSignatureInvalidOptionalPositional() {
+  // ffi.Pointer<ffi.NativeFunction<Invalid4>> p = ffi.fromAddress(999);
+}
+
+// error on missing field annotation
+@ffi.struct
+class TestStruct extends ffi.Pointer<ffi.Void> {
+  @ffi.Double()
+  double x;
+
+  double y; //# 50: compile-time error
+}
+
+// error on missing struct annotation
+class TestStruct2 extends ffi.Pointer<ffi.Void> {
+  @ffi.Double() //# 51: compile-time error
+  double x; //# 51: compile-time error
+}
+
+// error on missing annotation on subtype
+@ffi.struct
+class TestStruct3 extends TestStruct {
+  double z; //# 52: compile-time error
+}
+
+// error on double annotation
+@ffi.struct
+class TestStruct4 extends ffi.Pointer<ffi.Void> {
+  @ffi.Double()
+  @ffi.Double() //# 53: compile-time error
+  double z;
+}
+
+// error on annotation not matching up
+@ffi.struct
+class TestStruct5 extends ffi.Pointer<ffi.Void> {
+  @ffi.Int64() //# 54: compile-time error
+  double z; //# 54: compile-time error
+}
+
+// error on annotation not matching up
+@ffi.struct
+class TestStruct6 extends ffi.Pointer<ffi.Void> {
+  @ffi.Void() //# 55: compile-time error
+  double z; //# 55: compile-time error
+}
+
+// error on annotation not matching up
+@ffi.struct
+class TestStruct7 extends ffi.Pointer<ffi.Void> {
+  @ffi.NativeType() //# 56: compile-time error
+  double z; //# 56: compile-time error
+}
+
+// error on field initializer on field
+@ffi.struct
+class TestStruct8 extends ffi.Pointer<ffi.Void> {
+  @ffi.Double() //# 57: compile-time error
+  double z = 10.0; //# 57: compile-time error
+}
+
+// error on field initializer in constructor
+@ffi.struct
+class TestStruct9 extends ffi.Pointer<ffi.Void> {
+  @ffi.Double()
+  double z;
+
+  TestStruct9() : z = 0.0 {} //# 58: compile-time error
+}
diff --git a/tests/standalone_2/ffi/structs_test.dart b/tests/ffi/structs_test.dart
similarity index 100%
rename from tests/standalone_2/ffi/structs_test.dart
rename to tests/ffi/structs_test.dart
diff --git a/tests/ffi/subtype_test.dart b/tests/ffi/subtype_test.dart
new file mode 100644
index 0000000..22dbe13
--- /dev/null
+++ b/tests/ffi/subtype_test.dart
@@ -0,0 +1,52 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// Dart test program for testing dart:ffi Pointer subtypes.
+//
+// VMOptions=--verbose-gc
+
+library FfiTest;
+
+import 'dart:ffi' as ffi;
+
+import "package:expect/expect.dart";
+
+import 'gc_helper.dart';
+import 'cstring.dart';
+
+void main() async {
+  testAllocate();
+  testSizeOf();
+  await testGC();
+}
+
+class X {
+  X(this.i);
+  int i;
+}
+
+dynamic foo;
+dynamic bar;
+
+void testAllocate() {
+  CString cs = CString.toUtf8("hello world!");
+  Expect.equals("hello world!", cs.fromUtf8());
+  cs.free();
+}
+
+Future<void> testGC() async {
+  CString cs = ffi.fromAddress<CString>(11);
+  bar = cs;
+  foo = "";
+  final watcher = GCWatcher.ifAvailable();
+  int counts = await watcher.size();
+  for (int i = 0; i < 1000000; ++i) {
+    foo = new X(i);
+  }
+  Expect.isTrue(await watcher.size() > counts);
+}
+
+void testSizeOf() {
+  Expect.equals(true, 4 == ffi.sizeOf<CString>() || 8 == ffi.sizeOf<CString>());
+}
diff --git a/tests/standalone_2/ffi/very_large_struct.dart b/tests/ffi/very_large_struct.dart
similarity index 100%
rename from tests/standalone_2/ffi/very_large_struct.dart
rename to tests/ffi/very_large_struct.dart
diff --git a/tests/language_2/abstract_equal_test.dart b/tests/language_2/abstract_equal_test.dart
new file mode 100644
index 0000000..2ff5b59
--- /dev/null
+++ b/tests/language_2/abstract_equal_test.dart
@@ -0,0 +1,34 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=constant-update-2018
+
+class A {
+  bool operator ==(other);
+  const A();
+}
+
+class B implements A {
+  const B();
+}
+
+class C extends A {
+  const C();
+}
+
+class Invalid {
+  bool operator ==(other) => false;
+  const Invalid();
+}
+
+class D implements Invalid {
+  const D();
+}
+
+main() {
+  print(const {A(): 1});
+  print(const {B(): 2});
+  print(const {C(): 3});
+  print(const {D(): 4});
+}
diff --git a/tests/language_2/and_operation_on_non_integer_operand_test.dart b/tests/language_2/and_operation_on_non_integer_operand_test.dart
index 43f1d50..36b4a04 100644
--- a/tests/language_2/and_operation_on_non_integer_operand_test.dart
+++ b/tests/language_2/and_operation_on_non_integer_operand_test.dart
@@ -11,8 +11,8 @@
   NotAnInt operator &(b) => this;
 }
 
-@AssumeDynamic()
-@NoInline()
+@pragma('dart2js:assumeDynamic')
+@pragma('dart2js:noInline')
 id(x) => x;
 
 main() {
diff --git a/tests/language_2/async_and_or_test.dart b/tests/language_2/async_and_or_test.dart
index 6241a70..b412c17 100644
--- a/tests/language_2/async_and_or_test.dart
+++ b/tests/language_2/async_and_or_test.dart
@@ -5,8 +5,8 @@
 import "package:expect/expect.dart";
 import "package:async_helper/async_helper.dart";
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(x) {
   return x;
 }
@@ -42,8 +42,8 @@
 
 test2() async {
   await testEvaluation(() async {
-    Expect
-        .isFalse(await confuse(traceA(false)) && await confuse(traceB(false)));
+    Expect.isFalse(
+        await confuse(traceA(false)) && await confuse(traceB(false)));
     Expect.equals("a", trace);
   });
   await testEvaluation(() async {
@@ -60,8 +60,8 @@
   });
 
   await testEvaluation(() async {
-    Expect
-        .isFalse(await confuse(traceA(false)) || await confuse(traceB(false)));
+    Expect.isFalse(
+        await confuse(traceA(false)) || await confuse(traceB(false)));
     Expect.equals("ab", trace);
   });
   await testEvaluation(() async {
diff --git a/tests/language_2/async_star/async_star_invalid_test.dart b/tests/language_2/async_star/async_star_invalid_test.dart
index 529cf25..0c5199f 100644
--- a/tests/language_2/async_star/async_star_invalid_test.dart
+++ b/tests/language_2/async_star/async_star_invalid_test.dart
@@ -14,8 +14,8 @@
   asyncStart();
   Stream<String> f() async* {
     // Invalid syntax.
-    yield ("a", "b"); //# 01: compile-time error
-    yield yield "twice"; //# 02: compile-time error
+    yield ("a", "b"); //# 01: syntax error
+    yield yield "twice"; //# 02: syntax error
 
     // Valid but curious syntax.
     yield throw "throw"; //# 03: runtime error
diff --git a/tests/language_2/async_this_bound_test.dart b/tests/language_2/async_this_bound_test.dart
index fdbfa6c..50d31a4 100644
--- a/tests/language_2/async_this_bound_test.dart
+++ b/tests/language_2/async_this_bound_test.dart
@@ -8,7 +8,7 @@
 class A {
   int a = -1;
 
-  @NoInline()
+  @pragma('dart2js:noInline')
   foo(ignored, val) {
     Expect.equals(val, this.a);
   }
@@ -21,8 +21,8 @@
   a.foo(await false, 0);
 }
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(x) => x;
 
 class B {
diff --git a/tests/language_2/bool_condition_check_test.dart b/tests/language_2/bool_condition_check_test.dart
index 4e7b2fa..cb51127 100644
--- a/tests/language_2/bool_condition_check_test.dart
+++ b/tests/language_2/bool_condition_check_test.dart
@@ -7,7 +7,7 @@
 
 import 'package:expect/expect.dart';
 
-@NoInline()
+@pragma('dart2js:noInline')
 String check({bool a, bool b}) {
   String aString = a ? 'a' : '';
   String bString = b ? 'b' : '';
diff --git a/tests/language_2/cascaded_forwarding_stubs_test.dart b/tests/language_2/cascaded_forwarding_stubs_test.dart
index 1af182b..a10cc2e 100644
--- a/tests/language_2/cascaded_forwarding_stubs_test.dart
+++ b/tests/language_2/cascaded_forwarding_stubs_test.dart
@@ -24,7 +24,9 @@
 }
 
 // E contains a forwarding stub for f which ensures that `y` is type checked.
-class E extends D implements I2 {}
+class E extends D implements I2 {
+  void f(B x, B y);
+}
 
 main() {
   E e = new E();
diff --git a/tests/language_2/catch_liveness_test.dart b/tests/language_2/catch_liveness_test.dart
index 59e13a7..df9a3dd 100644
--- a/tests/language_2/catch_liveness_test.dart
+++ b/tests/language_2/catch_liveness_test.dart
@@ -4,12 +4,12 @@
 
 import "package:expect/expect.dart";
 
-@AssumeDynamic()
-@NoInline()
+@pragma('dart2js:assumeDynamic')
+@pragma('dart2js:noInline')
 foo() => 1;
 
-@AssumeDynamic()
-@NoInline()
+@pragma('dart2js:assumeDynamic')
+@pragma('dart2js:noInline')
 throwException() => throw 'x';
 
 main() {
diff --git a/tests/language_2/const_constructor_super2_test.dart b/tests/language_2/const_constructor_super2_test.dart
index 6ec4fa3..f922769 100644
--- a/tests/language_2/const_constructor_super2_test.dart
+++ b/tests/language_2/const_constructor_super2_test.dart
@@ -16,10 +16,10 @@
   const B(a, this.b) : super(a);
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 foo() => const B(1, 2);
 
-@NoInline()
+@pragma('dart2js:noInline')
 bar() => const B(2, 2);
 
 void main() {
diff --git a/tests/language_2/const_factory_with_body_test.dart b/tests/language_2/const_factory_with_body_test.dart
index 709b8d5..eb6cdbf 100644
--- a/tests/language_2/const_factory_with_body_test.dart
+++ b/tests/language_2/const_factory_with_body_test.dart
@@ -5,7 +5,7 @@
 // Tests that a "const factory" with body produces a compile-time error.
 
 class ConstFactoryWithBody {
-  const factory ConstFactoryWithBody.one() { } //# 01: syntax error
+  const factory ConstFactoryWithBody.one() { } //# 01: compile-time error
 }
 
 main() {
diff --git a/tests/language_2/const_inference_test.dart b/tests/language_2/const_inference_test.dart
new file mode 100644
index 0000000..2e556bf
--- /dev/null
+++ b/tests/language_2/const_inference_test.dart
@@ -0,0 +1,140 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:expect/expect.dart";
+
+R constFunction<T, R>(T _) => null;
+
+C<T> getC<T>() => const C(constFunction);
+
+List<T> getList<T>() => const [];
+
+Set<T> getSet<T>() => const {};
+
+Map<K, V> getMap<K, V>() => const {};
+
+R Function(T) getFunction<T, R>() {
+  List<R Function(T)> list = const [constFunction];
+  return list[0];
+}
+
+C<T> getImplicitConstC<T>() {
+  List<C<T>> list = const [C(constFunction)];
+  return list[0];
+}
+
+List<T> getImplicitConstList<T>() {
+  List<List<T>> list = const [[]];
+  return list[0];
+}
+
+Set<T> getImplicitConstSet<T>() {
+  List<Set<T>> list = const [{}];
+  return list[0];
+}
+
+Map<K, V> getImplicitConstMap<K, V>() {
+  List<Map<K, V>> list = const [{}];
+  return list[0];
+}
+
+class C<T> {
+  final Object fn;
+  const C(T Function(T) this.fn);
+}
+
+void expectOfType<T>(Object obj) {
+  // An exact type test would be better, but since `Null` is a subtype of all
+  // types that can be written in Dart 2.0, it should not matter in practice.
+  //
+  // (`obj.runtimeType == T` does not work for List/Map/Sets because the runtime
+  // type is an implementation-specific subtype of those interfaces.)
+  Expect.isTrue(obj is T, "`$obj` should be of type `$T`");
+}
+
+testClassInstance() {
+  expectOfType<C<Null>>(getC<int>());
+  expectOfType<C<Null>>(getC<String>());
+  expectOfType<C<Null>>(getC());
+}
+
+testImplicitConstClassInstance() {
+  expectOfType<C<Null>>(getImplicitConstC<int>());
+  expectOfType<C<Null>>(getImplicitConstC<String>());
+  expectOfType<C<Null>>(getImplicitConstC());
+}
+
+testDownwardsClassInference() {
+  expectOfType<Null Function(Null)>(getC<int>().fn);
+  expectOfType<Null Function(Null)>(getC<String>().fn);
+  expectOfType<Null Function(Null)>(getC().fn);
+}
+
+testList() {
+  expectOfType<List<Null>>(getList<int>());
+  expectOfType<List<Null>>(getList<String>());
+  expectOfType<List<Null>>(getList());
+}
+
+testImplicitConstList() {
+  expectOfType<List<Null>>(getImplicitConstList<int>());
+  expectOfType<List<Null>>(getImplicitConstList<String>());
+  expectOfType<List<Null>>(getImplicitConstList());
+}
+
+testImplicitConstSet() {
+  expectOfType<Set<Null>>(getImplicitConstSet<int>());
+  expectOfType<Set<Null>>(getImplicitConstSet<String>());
+  expectOfType<Set<Null>>(getImplicitConstSet());
+}
+
+testSet() {
+  expectOfType<Set<Null>>(getSet<int>());
+  expectOfType<Set<Null>>(getSet<String>());
+  expectOfType<Set<Null>>(getSet());
+}
+
+testMap() {
+  expectOfType<Map<Null, Null>>(getMap<int, int>());
+  expectOfType<Map<Null, Null>>(getMap<int, String>());
+  expectOfType<Map<Null, Null>>(getMap<String, int>());
+  expectOfType<Map<Null, Null>>(getMap<String, String>());
+  expectOfType<Map<Null, Null>>(getMap<Null, Null>());
+  expectOfType<Map<Null, Null>>(getMap());
+}
+
+testImplicitConstMap() {
+  expectOfType<Map<Null, Null>>(getImplicitConstMap<int, int>());
+  expectOfType<Map<Null, Null>>(getImplicitConstMap<int, String>());
+  expectOfType<Map<Null, Null>>(getImplicitConstMap<String, int>());
+  expectOfType<Map<Null, Null>>(getImplicitConstMap<String, String>());
+  expectOfType<Map<Null, Null>>(getImplicitConstMap<Null, Null>());
+  expectOfType<Map<Null, Null>>(getImplicitConstMap());
+}
+
+testFunction() {
+  expectOfType<Null Function(Object)>(getFunction<int, int>());
+  expectOfType<Null Function(Object)>(getFunction<int, String>());
+  expectOfType<Null Function(Object)>(getFunction<String, int>());
+  expectOfType<Null Function(Object)>(getFunction<String, String>());
+  expectOfType<Null Function(Object)>(getFunction<Null, Null>());
+  expectOfType<Null Function(Object)>(getFunction());
+}
+
+/// Tests that type inference for constants does not reference the type
+/// parameter. Instead, free type parameters should substituted to obtain the
+/// least closure (e.g. `List<T>` becomes `List<Null>` and `R Function(T)`
+/// becomes `Null Function(Object)`).
+main() {
+  testClassInstance();
+  testImplicitConstClassInstance();
+  testDownwardsClassInference();
+  testList();
+  testImplicitConstList();
+  testSet();
+  testImplicitConstSet();
+  testMap();
+  testImplicitConstMap();
+  testFunction();
+}
diff --git a/tests/language_2/const_list_test.dart b/tests/language_2/const_list_test.dart
index b848c9e..cdc0fb3 100644
--- a/tests/language_2/const_list_test.dart
+++ b/tests/language_2/const_list_test.dart
@@ -16,32 +16,32 @@
       growableList.add(i);
       growableList2.add(i);
     }
-    Expect.equals(true, growableList == growableList);
-    Expect.equals(false, growableList == growableList2);
-    Expect.equals(true, fixedList == fixedList);
-    Expect.equals(false, fixedList == fixedList2);
-    Expect.equals(false, fixedList == growableList);
+    Expect.equals(growableList, growableList);
+    Expect.notEquals(growableList, growableList2);
+    Expect.equals(fixedList, fixedList);
+    Expect.notEquals(fixedList, fixedList2);
+    Expect.notEquals(fixedList, growableList);
     growableList.add(4);
-    Expect.equals(false, fixedList == growableList);
+    Expect.notEquals(fixedList, growableList);
     Expect.equals(4, growableList.removeLast());
-    Expect.equals(false, fixedList == growableList);
+    Expect.notEquals(fixedList, growableList);
     fixedList[3] = 0;
-    Expect.equals(false, fixedList == growableList);
+    Expect.notEquals(fixedList, growableList);
   }
 
   static testLiterals() {
     dynamic a = [1, 2, 3.1];
     dynamic b = [1, 2, 3.1];
-    Expect.equals(false, a == b);
+    Expect.notEquals(a, b);
     a = const [1, 2, 3.1];
     b = const [1, 2, 3.1];
-    Expect.equals(true, a == b);
+    Expect.identical(a, b);
     a = const <num>[1, 2, 3.1];
     b = const [1, 2, 3.1];
-    Expect.equals(false, a == b);
+    Expect.identical(a, b);
     a = const <dynamic>[1, 2, 3.1];
     b = const [1, 2, 3.1];
-    Expect.equals(true, a == b);
+    Expect.notEquals(a, b);
   }
 }
 
diff --git a/tests/language_2/constants_2018/const_type_test.dart b/tests/language_2/constants_2018/const_type_test.dart
new file mode 100644
index 0000000..14a9bf9
--- /dev/null
+++ b/tests/language_2/constants_2018/const_type_test.dart
@@ -0,0 +1,102 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=constant-update-2018
+
+// Tests that types do matter when an expression is evaluated as constant.
+
+main() {
+  const C c = C();
+  const T.test01(c); //# 01: compile-time error
+  const T.test02(c, c); //# 02: compile-time error
+  const T.test03(c, c); //# 03: compile-time error
+  const T.test04(c, c); //# 04: compile-time error
+  const T.test05(c, c); //# 05: compile-time error
+  const T.test06(c, c); //# 06: compile-time error
+  const T.test07(c, c); //# 07: compile-time error
+  const T.test08(c, c); //# 08: compile-time error
+  const T.test09(c, c); //# 09: compile-time error
+  const T.test10(c, c); //# 10: compile-time error
+  const T.test11(c, c); //# 11: compile-time error
+  const T.test12(c, c); //# 12: compile-time error
+  const T.test13(c, c); //# 13: compile-time error
+  const T.test14(c); //# 14: compile-time error
+  const T.test15(c, c); //# 15: compile-time error
+  const T.test16(c, c); //# 16: compile-time error
+  const T.test17(c, c); //# 17: compile-time error
+  const T.test18(c, c); //# 18: compile-time error
+  const T.test19(c); //# 19: compile-time error
+
+  const v01 = false ? c : -c; //# 20: compile-time error
+  const v02 = false ? c : c + c; //# 21: compile-time error
+  const v03 = false ? c : c - c; //# 22: compile-time error
+  const v04 = false ? c : c * c; //# 23: compile-time error
+  const v05 = false ? c : c / c; //# 24: compile-time error
+  const v06 = false ? c : c ~/ c; //# 25: compile-time error
+  const v07 = false ? c : c % c; //# 26: compile-time error
+  const v08 = false ? c : c << c; //# 27: compile-time error
+  const v09 = false ? c : c >> c; //# 28: compile-time error
+  const v10 = false ? c : c >>> c; //# 29: compile-time error
+  const v11 = false ? c : c & c; //# 30: compile-time error
+  const v12 = false ? c : c | c; //# 31: compile-time error
+  const v13 = false ? c : c ^ c; //# 32: compile-time error
+  const v14 = false ? c : ~c; //# 33: compile-time error
+  const v15 = false ? c : c < c; //# 34: compile-time error
+  const v16 = false ? c : c > c; //# 35: compile-time error
+  const v17 = false ? c : c <= c; //# 36: compile-time error
+  const v18 = false ? c : c >= c; //# 37: compile-time error
+  const v19 = false ? c : c.length; //# 38: compile-time error
+}
+
+// Each expression in the forwarding generative constructors must be
+// potentially constant. They are only checked for being actually
+// constant when the constructor is invoked.
+class T {
+  const T(C o);
+  const T.test01(C x) : this(-x);
+  const T.test02(C x, C y) : this(x + y);
+  const T.test03(C x, C y) : this(x - y);
+  const T.test04(C x, C y) : this(x * y);
+  const T.test05(C x, C y) : this(x / y);
+  const T.test06(C x, C y) : this(x ~/ y);
+  const T.test07(C x, C y) : this(x % y);
+  const T.test08(C x, C y) : this(x << y);
+  const T.test09(C x, C y) : this(x >> y);
+  const T.test10(C x, C y) : this(x >>> y); //# 10: continued
+  const T.test11(C x, C y) : this(x & y);
+  const T.test12(C x, C y) : this(x | y);
+  const T.test13(C x, C y) : this(x ^ y);
+  const T.test14(C x) : this(~x);
+  const T.test15(C x, C y) : this(x < y);
+  const T.test16(C x, C y) : this(x > y);
+  const T.test17(C x, C y) : this(x <= y);
+  const T.test18(C x, C y) : this(x >= y);
+  const T.test19(C x) : this(x.length);
+}
+
+class C {
+  const C();
+  C operator -() => this;
+  C operator +(C other) => this;
+  C operator -(C other) => this;
+  C operator *(C other) => this;
+  C operator /(C other) => this;
+  C operator ~/(C other) => this;
+  C operator %(C other) => this;
+  C operator <<(C other) => this;
+  C operator >>(C other) => this;
+  // Remove the multi-test markers and one of the lines below,
+  // when `>>>` is implemented.
+  C operator >>>(C other) => this;  //# 10: continued
+  C operator >>>(C other) => this;  //# 29: continued
+  C operator &(C other) => this;
+  C operator |(C other) => this;
+  C operator ^(C other) => this;
+  C operator ~() => this;
+  C operator <(C other) => this;
+  C operator >(C other) => this;
+  C operator <=(C other) => this;
+  C operator >=(C other) => this;
+  C get length => this;
+}
\ No newline at end of file
diff --git a/tests/language_2/constants_2018/constant_type_literal_test.dart b/tests/language_2/constants_2018/constant_type_literal_test.dart
new file mode 100644
index 0000000..33cf4a9
--- /dev/null
+++ b/tests/language_2/constants_2018/constant_type_literal_test.dart
@@ -0,0 +1,39 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=constant-update-2018
+
+// Tests that non-deferred type literals are constant expressions.
+
+import "dart:core";
+import "dart:core" as core;
+// No reloading support for deferred loading.
+// See https://github.com/dart-lang/sdk/issues/33118,
+import "dart:core" deferred as dcore; //# 01: crash on reload
+
+// Declares F function type alias, M mixin and C class.
+import "constant_type_literal_types.dart";
+import "constant_type_literal_types.dart" as p;
+// No reloading support for deferred loading.
+// See https://github.com/dart-lang/sdk/issues/33118,
+import "constant_type_literal_types.dart" deferred as d; //# 02: crash on reload
+
+main() {
+  const Test(int, core.int);
+  const Test(C, p.C);
+  const Test(M, p.M);
+  const Test(F, p.F);
+  const c1 = //
+      dcore. //# 01: compile-time error
+          int;
+  const Test(c1, int);
+  const c2 = //
+      d. //# 02: compile-time error
+          C;
+  const Test(c2, C);
+}
+
+class Test {
+  const Test(Type t1, Type t2) : assert(identical(t1, t2));
+}
diff --git a/tests/language_2/constants_2018/constant_type_literal_types.dart b/tests/language_2/constants_2018/constant_type_literal_types.dart
new file mode 100644
index 0000000..d3f5f2c
--- /dev/null
+++ b/tests/language_2/constants_2018/constant_type_literal_types.dart
@@ -0,0 +1,12 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Helper file for constant_type_literal_test.dart.
+// Tests that non-deferred type literals are constant expressions.
+
+typedef F = void Function();
+
+class C {}
+
+mixin M {}
diff --git a/tests/language_2/constants_2018/constant_types_test.dart b/tests/language_2/constants_2018/constant_types_test.dart
new file mode 100644
index 0000000..5262729
--- /dev/null
+++ b/tests/language_2/constants_2018/constant_types_test.dart
@@ -0,0 +1,49 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=constant-update-2018
+
+// Tests that only constant types are allowed in some positions,
+// not type parameters.
+
+import "package:expect/expect.dart";
+
+class T<X> {
+  final Object value;
+  const T.test1()
+      : value = const //
+            <X> //# 01: compile-time error
+            [];
+  const T.test2(Object o)
+      : value = o //
+            as X //# 02: compile-time error
+  ;
+  const T.test3(Object o)
+      : value = o //
+            is X //# 03: compile-time error
+  ;
+  const T.test4()
+      : value = null //
+            ?? X //# 04: compile-time error
+  ;
+}
+
+class T2 {
+  final Object value;
+  const T2.test1() : value = const <int>[];
+  const T2.test2(Object o) : value = o as int;
+  const T2.test3(Object o) : value = o is int;
+  const T2.test4() : value = int;
+}
+
+main() {
+  // The errors in class T are errors independently of whether the
+  // constructor is invoked or not.
+
+  // Constant type expressions are allowed.
+  Expect.equals(const <int>[], const T2.test1().value);
+  Expect.equals(2, const T2.test2(2).value);
+  Expect.isTrue(const T2.test3(2).value);
+  Expect.equals(int, const T2.test4().value);
+}
diff --git a/tests/language_2/constants_2018/equals_test.dart b/tests/language_2/constants_2018/equals_test.dart
new file mode 100644
index 0000000..fbbc876
--- /dev/null
+++ b/tests/language_2/constants_2018/equals_test.dart
@@ -0,0 +1,65 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=constant-update-2018
+
+// Tests that equality is allowed for receivers of specific types.
+
+import "package:expect/expect.dart";
+
+main() {
+  const c = C(); // Does not override operator==.
+  const d = D(); // Overrides operator==.
+
+  // Allowed if receiver is int, double, String, bool or Null, ...
+  Expect.isTrue(const T.eq(1, 1).value);
+  Expect.isTrue(const T.eq(1.5, 1.5).value);
+  Expect.isTrue(const T.eq("", "").value);
+  Expect.isTrue(const T.eq(true, true).value);
+  Expect.isTrue(const T.eq(null, null).value);
+
+  Expect.isFalse(const T.eq(1, c).value);
+  Expect.isFalse(const T.eq(1.5, c).value);
+  Expect.isFalse(const T.eq("", c).value);
+  Expect.isFalse(const T.eq(true, c).value);
+  Expect.isFalse(const T.eq(null, c).value);
+
+  Expect.isFalse(const T.eq(1, d).value);
+  Expect.isFalse(const T.eq(1.5, d).value);
+  Expect.isFalse(const T.eq("", d).value);
+  Expect.isFalse(const T.eq(true, d).value);
+  Expect.isFalse(const T.eq(null, d).value);
+
+  // ... or if second operand is Null.
+  Expect.isFalse(const T.eq(1, null).value);
+  Expect.isFalse(const T.eq(1.5, null).value);
+  Expect.isFalse(const T.eq("", null).value);
+  Expect.isFalse(const T.eq(false, null).value);
+  Expect.isFalse(const T.eq(c, null).value);
+  Expect.isFalse(const T.eq(d, null).value);
+
+  // Otherwise not allowed.
+  const T.eq(c, c); //# 01: compile-time error
+  const T.eq(c, 1); //# 02: compile-time error
+  const T.eq(c, ""); //# 03: compile-time error
+  const T.eq(E.value1, E.value2); //# 04: compile-time error
+}
+
+class T {
+  final Object value;
+  const T.eq(Object o1, Object o2) : value = o1 == o2;
+}
+
+/// Class that does not override operator==.
+class C {
+  const C();
+}
+
+/// Class that overrides operator==.
+class D {
+  const D();
+  bool operator ==(Object other) => identical(this, other);
+}
+
+enum E { value1, value2 }
diff --git a/tests/language_2/constants_2018/potential_const_dynamic_test.dart b/tests/language_2/constants_2018/potential_const_dynamic_test.dart
new file mode 100644
index 0000000..d16f5e4
--- /dev/null
+++ b/tests/language_2/constants_2018/potential_const_dynamic_test.dart
@@ -0,0 +1,78 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=constant-update-2018
+
+// Tests that a dynamic type does not affect whether an expression is
+// potentially constant, the actual type of the value of an experssion
+// only matters if the expression is evaluated as a constant.
+
+main() {
+  Object c = C();
+  T.test01(c);
+  T.test02(c, c);
+  T.test03(c, c);
+  T.test04(c, c);
+  T.test05(c, c);
+  T.test06(c, c);
+  T.test07(c, c);
+  T.test08(c, c);
+  T.test09(c, c);
+  T.test10(c, c); //# sh3: ok
+  T.test11(c, c);
+  T.test12(c, c);
+  T .test13(c, c);
+  T.test14(c);
+  T.test15(c, c);
+  T.test16(c, c);
+  T.test17(c, c);
+  T.test18(c, c);
+  T.test19(c);
+}
+
+class T {
+  const T(Object o);
+  const T.test01(dynamic x) : this(-x);
+  const T.test02(dynamic x, dynamic y) : this(x + y);
+  const T.test03(dynamic x, dynamic y) : this(x - y);
+  const T.test04(dynamic x, dynamic y) : this(x * y);
+  const T.test05(dynamic x, dynamic y) : this(x / y);
+  const T.test06(dynamic x, dynamic y) : this(x ~/ y);
+  const T.test07(dynamic x, dynamic y) : this(x % y);
+  const T.test08(dynamic x, dynamic y) : this(x << y);
+  const T.test09(dynamic x, dynamic y) : this(x >> y);
+  const T.test10(dynamic x, dynamic y) : this(x >>> y); //# sh3: continued
+  const T.test11(dynamic x, dynamic y) : this(x & y);
+  const T.test12(dynamic x, dynamic y) : this(x | y);
+  const T.test13(dynamic x, dynamic y) : this(x ^ y);
+  const T.test14(dynamic x) : this(~x);
+  const T.test15(dynamic x, dynamic y) : this(x < y);
+  const T.test16(dynamic x, dynamic y) : this(x > y);
+  const T.test17(dynamic x, dynamic y) : this(x <= y);
+  const T.test18(dynamic x, dynamic y) : this(x >= y);
+  const T.test19(dynamic x) : this(x.length);
+}
+
+class C {
+  const C();
+  dynamic operator -() => this;
+  dynamic operator +(dynamic other) => this;
+  dynamic operator -(dynamic other) => this;
+  dynamic operator *(dynamic other) => this;
+  dynamic operator /(dynamic other) => this;
+  dynamic operator ~/(dynamic other) => this;
+  dynamic operator %(dynamic other) => this;
+  dynamic operator <<(dynamic other) => this;
+  dynamic operator >>(dynamic other) => this;
+  dynamic operator >>>(dynamic other) => this; //# sh3: continued
+  dynamic operator &(dynamic other) => this;
+  dynamic operator |(dynamic other) => this;
+  dynamic operator ^(dynamic other) => this;
+  dynamic operator ~() => this;
+  dynamic operator <(dynamic other) => this;
+  dynamic operator >(dynamic other) => this;
+  dynamic operator <=(dynamic other) => this;
+  dynamic operator >=(dynamic other) => this;
+  dynamic get length => this;
+}
\ No newline at end of file
diff --git a/tests/language_2/constants_2018/potential_const_shortcircuit_test.dart b/tests/language_2/constants_2018/potential_const_shortcircuit_test.dart
new file mode 100644
index 0000000..680ffee
--- /dev/null
+++ b/tests/language_2/constants_2018/potential_const_shortcircuit_test.dart
@@ -0,0 +1,59 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=constant-update-2018
+
+// Tests that short-circuit operators do not care about the unevaluated part.
+
+import "package:expect/expect.dart";
+
+main() {
+  const C c = C();
+  // Short-circuited operations.
+  // Non-taken branch of ?:.
+  const c1 = true ? c : c + c;
+  const c2 = false ? c + c : c;
+  // Non-taken part of &&, ||, ??.
+  const c3 = (c != null) || c < c;
+  const c4 = (c == null) && c < c;
+  const c5 = c ?? c + c;
+  Expect.identical(c, c1);
+  Expect.identical(c, c2);
+  Expect.isTrue(c3);
+  Expect.isFalse(c4);
+  Expect.identical(c, c5);
+  // Nested short-circuiting.
+  const c6 = true ? c == null && c + c : c < c;
+  Expect.isFalse(c6);
+
+  // Concrete use-case.
+  Expect.equals(1, const T.length("a").value);
+  Expect.equals(0, const T.length("").value);
+  Expect.equals(0, const T.length(null).value);
+  Expect.equals(1, T.length([1]).value);
+  Expect.equals(0, T.length([]).value);
+  Expect.equals(0, T.length(null).value);
+
+  Expect.equals(1, const T.asserts("a").value);
+  Expect.equals(0, const T.asserts("").value);
+  Expect.equals(0, const T.asserts(null).value);
+  Expect.equals(1, T.asserts([1]).value);
+  Expect.equals(0, T.asserts([]).value);
+  Expect.equals(0, T.asserts(null).value);
+}
+
+class T {
+  final Object value;
+  const T(this.value);
+  const T.length(dynamic l) : value = (l == null ? 0 : l.length);
+  const T.asserts(dynamic l)
+      : assert(l == null || l.length < 2),
+        value = (l ?? "").length;
+}
+
+class C {
+  const C();
+  dynamic operator +(dynamic other) => throw "Never";
+  bool operator <(dynamic other) => throw "Never";
+}
diff --git a/tests/language_2/constants_2018/potential_const_type_test.dart b/tests/language_2/constants_2018/potential_const_type_test.dart
new file mode 100644
index 0000000..6438e8b
--- /dev/null
+++ b/tests/language_2/constants_2018/potential_const_type_test.dart
@@ -0,0 +1,97 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=constant-update-2018
+
+// Tests that types do not affect whether an expression is potentially
+// constant, they only matter if the expression is evaluated as a constant.
+
+main() {
+  const C c = C();
+  T.test01(c);
+  T.test02(c, c);
+  T.test03(c, c);
+  T.test04(c, c);
+  T.test05(c, c);
+  T.test06(c, c);
+  T.test07(c, c);
+  T.test08(c, c);
+  T.test09(c, c);
+  T.test10(c, c); //# sh3: ok
+  T.test11(c, c);
+  T.test12(c, c);
+  T.test13(c, c);
+  T.test14(c);
+  T.test15(c, c);
+  T.test16(c, c);
+  T.test17(c, c);
+  T.test18(c, c);
+  T.test19(c);
+
+  const v01 = true ? c : -c;
+  const v02 = true ? c : c + c;
+  const v03 = true ? c : c - c;
+  const v04 = true ? c : c * c;
+  const v05 = true ? c : c / c;
+  const v06 = true ? c : c ~/ c;
+  const v07 = true ? c : c % c;
+  const v08 = true ? c : c << c;
+  const v09 = true ? c : c >> c;
+  const v10 = true ? c : c >>> c; //# sh3: continued
+  const v11 = true ? c : c & c;
+  const v12 = true ? c : c | c;
+  const v13 = true ? c : c ^ c;
+  const v14 = true ? c : ~c;
+  const v15 = true ? c : c < c;
+  const v16 = true ? c : c > c;
+  const v17 = true ? c : c <= c;
+  const v18 = true ? c : c >= c;
+  const v19 = true ? c : c.length;
+}
+
+class T {
+  const T(C o);
+  const T.test01(C x) : this(-x);
+  const T.test02(C x, C y) : this(x + y);
+  const T.test03(C x, C y) : this(x - y);
+  const T.test04(C x, C y) : this(x * y);
+  const T.test05(C x, C y) : this(x / y);
+  const T.test06(C x, C y) : this(x ~/ y);
+  const T.test07(C x, C y) : this(x % y);
+  const T.test08(C x, C y) : this(x << y);
+  const T.test09(C x, C y) : this(x >> y);
+  const T.test10(C x, C y) : this(x >>> y); //# sh3: continued
+  const T.test11(C x, C y) : this(x & y);
+  const T.test12(C x, C y) : this(x | y);
+  const T.test13(C x, C y) : this(x ^ y);
+  const T.test14(C x) : this(~x);
+  const T.test15(C x, C y) : this(x < y);
+  const T.test16(C x, C y) : this(x > y);
+  const T.test17(C x, C y) : this(x <= y);
+  const T.test18(C x, C y) : this(x >= y);
+  const T.test19(C x) : this(x.length);
+}
+
+class C {
+  const C();
+  C operator -() => this;
+  C operator +(C other) => this;
+  C operator -(C other) => this;
+  C operator *(C other) => this;
+  C operator /(C other) => this;
+  C operator ~/(C other) => this;
+  C operator %(C other) => this;
+  C operator <<(C other) => this;
+  C operator >>(C other) => this;
+  C operator >>>(C other) => this; //# sh3: continued
+  C operator &(C other) => this;
+  C operator |(C other) => this;
+  C operator ^(C other) => this;
+  C operator ~() => this;
+  C operator <(C other) => this;
+  C operator >(C other) => this;
+  C operator <=(C other) => this;
+  C operator >=(C other) => this;
+  C get length => this;
+}
\ No newline at end of file
diff --git a/tests/language_2/constants_2018/type_cast_test.dart b/tests/language_2/constants_2018/type_cast_test.dart
new file mode 100644
index 0000000..3171204
--- /dev/null
+++ b/tests/language_2/constants_2018/type_cast_test.dart
@@ -0,0 +1,32 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=constant-update-2018
+
+// Tests that type casts (as) are allowed.
+
+main() {
+  const t1 = T.implicit(Sub());
+  const t2 = T.explicit(Sub());
+  const t3 = T.implicit(null);
+  const t4 = T.explicit(null);
+
+  // Inline.
+  const Object o = "";
+  const len = (o as String).length;
+}
+
+class Super {
+  const Super();
+}
+
+class Sub extends Super {
+  const Sub();
+}
+
+class T {
+  final Sub value;
+  const T.implicit(Super s) : value = s;
+  const T.explicit(Super s) : value = s as Sub;
+}
diff --git a/tests/language_2/constants_2018/type_check_test.dart b/tests/language_2/constants_2018/type_check_test.dart
new file mode 100644
index 0000000..c5ca055
--- /dev/null
+++ b/tests/language_2/constants_2018/type_check_test.dart
@@ -0,0 +1,43 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=constant-update-2018
+
+// Tests that type checks (is) are allowed.
+
+import "package:expect/expect.dart";
+
+main() {
+  const c = C();
+  const l = [1];
+  const s = "a";
+
+  Expect.equals(1, const T.length(s, 42).value);
+  Expect.equals(42, const T.length(l, 42).value);
+  Expect.equals(1, const T.length2(s, 42).value);
+  Expect.equals(42, const T.length2(l, 42).value);
+
+  Expect.equals(3, const T.sum(1, 2).value);
+  Expect.equals(3.7, const T.sum(1.5, 2.2).value);
+  Expect.equals("abc", const T.sum("a", "bc").value);
+  Expect.equals("a", const T.sum("a", 2).value);
+}
+
+class T {
+  final Object value;
+  const T.length(dynamic l, int defaultValue)
+      : value = l is String ? l.length : defaultValue;
+  const T.length2(dynamic l, int defaultValue)
+      : value = l is! String ? defaultValue : l.length;
+  const T.sum(dynamic o1, dynamic o2)
+      : value = ((o1 is num) & (o2 is num)) | ((o1 is String) & (o2 is String))
+            ? o1 + o2
+            : o1;
+}
+
+class C {
+  const C();
+  dynamic operator +(dynamic other) => throw "Never";
+  bool operator <(dynamic other) => throw "Never";
+}
diff --git a/tests/language_2/constructor12_test.dart b/tests/language_2/constructor12_test.dart
index 81b2525..397cb19 100644
--- a/tests/language_2/constructor12_test.dart
+++ b/tests/language_2/constructor12_test.dart
@@ -33,8 +33,8 @@
   bar() => captured2();
 }
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(x) => x;
 
 main() {
diff --git a/tests/language_2/constructor_reference_test.dart b/tests/language_2/constructor_reference_test.dart
index 1dae4a2..173320c 100644
--- a/tests/language_2/constructor_reference_test.dart
+++ b/tests/language_2/constructor_reference_test.dart
@@ -14,27 +14,27 @@
   new Foo.bar.baz(); //# 03: compile-time error
   new Foo<int>(); //# 04: ok
   new Foo<int>.bar(); //# 05: ok
-  new Foo<int>.bar.baz(); //# 06: compile-time error
+  new Foo<int>.bar.baz(); //# 06: syntax error
   new Foo.bar<int>(); //# 07: compile-time error
   new Foo.bar<int>.baz(); //# 08: compile-time error
-  new Foo.bar.baz<int>(); //# 09: compile-time error
+  new Foo.bar.baz<int>(); //# 09: syntax error
 
   const Foo(); //# 11: ok
   const Foo.bar(); //# 12: ok
   const Foo.bar.baz(); //# 13: compile-time error
   const Foo<int>(); //# 14: ok
   const Foo<int>.bar(); //# 15: ok
-  const Foo<int>.bar.baz(); //# 16: compile-time error
+  const Foo<int>.bar.baz(); //# 16: syntax error
   const Foo.bar<int>(); //# 17: compile-time error
   const Foo.bar<int>.baz(); //# 18: compile-time error
-  const Foo.bar.baz<int>(); //# 19: compile-time error
+  const Foo.bar.baz<int>(); //# 19: syntax error
 
   Foo(); //# 21: ok
   Foo.bar(); //# 22: ok
   Foo.bar.baz(); //# 23: compile-time error
   Foo<int>(); //# 24: ok
   Foo<int>.bar(); //# 25: ok
-  Foo<int>.bar.baz(); //# 26: compile-time error
+  Foo<int>.bar.baz(); //# 26: syntax error
   Foo.bar<int>(); //# 27: compile-time error
   Foo.bar<int>.baz(); //# 28: compile-time error
   Foo.bar.baz<int>(); //# 29: compile-time error
diff --git a/tests/language_2/constructor_with_type_parameters_test.dart b/tests/language_2/constructor_with_type_parameters_test.dart
index 203e2ce..8df1733 100644
--- a/tests/language_2/constructor_with_type_parameters_test.dart
+++ b/tests/language_2/constructor_with_type_parameters_test.dart
@@ -6,23 +6,23 @@
   Bar() {} //# 01: ok
   Bar.boo() {} //# 02: ok
   Bar<E>() {} //# 03: compile-time error
-  Bar<E>.boo() {} //# 04: compile-time error
-  Bar.boo<E>() {} //# 05: compile-time error
-  Bar.boo<E>.baz() {} //# 06: compile-time error
+  Bar<E>.boo() {} //# 04: syntax error
+  Bar.boo<E>() {} //# 05: syntax error
+  Bar.boo<E>.baz() {} //# 06: syntax error
 
   Bar(); //# 07: ok
   Bar.boo(); //# 08: ok
   Bar<E>(); //# 09: compile-time error
-  Bar<E>.boo(); //# 10: compile-time error
-  Bar.boo<E>(); //# 11: compile-time error
-  Bar.boo<E>.baz(); //# 12: compile-time error
+  Bar<E>.boo(); //# 10: syntax error
+  Bar.boo<E>(); //# 11: syntax error
+  Bar.boo<E>.baz(); //# 12: syntax error
 
   const Bar(); //# 13: ok
   const Bar.boo(); //# 14: ok
-  const Bar<E>(); //# 15: compile-time error
-  const Bar<E>.boo(); //# 16: compile-time error
-  const Bar.boo<E>(); //# 17: compile-time error
-  const Bar.boo<E>.baz(); //# 18: compile-time error
+  const Bar<E>(); //# 15: syntax error
+  const Bar<E>.boo(); //# 16: syntax error
+  const Bar.boo<E>(); //# 17: syntax error
+  const Bar.boo<E>.baz(); //# 18: syntax error
 }
 
 main() {}
diff --git a/tests/language_2/control_flow_collections/await_for_inference_test.dart b/tests/language_2/control_flow_collections/await_for_inference_test.dart
new file mode 100644
index 0000000..6987f58
--- /dev/null
+++ b/tests/language_2/control_flow_collections/await_for_inference_test.dart
@@ -0,0 +1,112 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
+
+// Test how await for interacts with inference.
+import "package:async_helper/async_helper.dart";
+import 'package:expect/expect.dart';
+
+import 'utils.dart';
+
+Stream<int> stream() => Stream.fromIterable([1]);
+
+void main() {
+  asyncTest(() async {
+    await testBottomUpInference();
+    await testLoopVariableInference();
+    await testTopDownInference();
+  });
+}
+
+Future<void> testBottomUpInference() async {
+  // Lists.
+  Expect.type<List<int>>([await for (var i in stream()) 1]);
+  Expect.type<List<int>>(
+      [await for (var i in stream()) 1, await for (var i in stream()) 2]);
+  Expect.type<List<num>>(
+      [await for (var i in stream()) 1, await for (var i in stream()) 0.2]);
+  Expect.type<List<int>>([await for (var i in stream()) 1, 2]);
+  Expect.type<List<num>>([await for (var i in stream()) 1, 0.2]);
+  Expect.type<List<dynamic>>([await for (var i in stream()) ...[]]);
+  Expect.type<List<int>>([await for (var i in stream()) ...<int>[]]);
+
+  // Maps.
+  Expect.type<Map<int, int>>({await for (var i in stream()) 1: 1});
+  Expect.type<Map<int, int>>(
+      {await for (var i in stream()) 1: 1, await for (var i in stream()) 2: 2});
+  Expect.type<Map<num, num>>({
+    await for (var i in stream()) 1: 0.1,
+    await for (var i in stream()) 0.2: 2
+  });
+  Expect.type<Map<int, int>>({await for (var i in stream()) 1: 1, 2: 2});
+  Expect.type<Map<num, num>>({await for (var i in stream()) 1: 0.1, 0.2: 2});
+  Expect.type<Map<dynamic, dynamic>>({await for (var i in stream()) ...{}});
+  Expect.type<Map<int, int>>({await for (var i in stream()) ...<int, int>{}});
+
+  // Sets.
+  Expect.type<Set<int>>({await for (var i in stream()) 1});
+  Expect.type<Set<int>>(
+      {await for (var i in stream()) 1, await for (var i in stream()) 2});
+  Expect.type<Set<num>>(
+      {await for (var i in stream()) 1, await for (var i in stream()) 0.2});
+  Expect.type<Set<int>>({await for (var i in stream()) 1, 2});
+  Expect.type<Set<num>>({await for (var i in stream()) 1, 0.2});
+  Expect.type<Set<dynamic>>({await for (var i in stream()) ...[]});
+  Expect.type<Set<int>>({await for (var i in stream()) ...<int>[]});
+
+  // If a nested iterable's type is dynamic, the element type is dynamic.
+  Expect.type<List<dynamic>>(
+      [1, await for (var i in stream()) ...([] as dynamic)]);
+  Expect.type<Set<dynamic>>(
+      {1, await for (var i in stream()) ...([] as dynamic)});
+
+  // If a nested maps's type is dynamic, the key and value types are dynamic.
+  Expect.type<Map<dynamic, dynamic>>(
+      {1: 1, await for (var i in stream()) ...({} as dynamic)});
+}
+
+Future<void> testLoopVariableInference() async {
+  // Infers loop variable from stream.
+  Expect.type<List<int>>([await for (var i in stream()) i]);
+  Expect.type<List<String>>(
+      [await for (var i in stream()) i.toRadixString(10)]);
+
+  // Loop variable type is pushed into stream.
+  Expect.listEquals(<int>[1], [await for (int i in expectIntStream([1])) i]);
+}
+
+Future<void> testTopDownInference() async {
+  // Lists.
+
+  // The context element type is pushed into the body.
+  Expect.listEquals(<int>[1],
+      <int>[await for (var i in stream()) expectInt(1)]);
+
+  // Bottom up-inference from elements is not pushed back down into the body.
+  Expect.listEquals(<int>[1, 2],
+      [1, await for (var i in stream()) expectDynamic(2)]);
+
+  // Maps.
+
+  // The context element type is pushed into the body.
+  Expect.mapEquals(<int, String>{1: "s"}, <int, String>{
+    await for (var i in stream()) expectInt(1): expectString("s")
+  });
+
+  // Bottom up-inference from elements is not pushed back down into the body.
+  Expect.mapEquals(<int, String>{1: "s", 2: "t"}, {
+    1: "s",
+    await for (var i in stream()) expectDynamic(2): expectDynamic("t")
+  });
+
+  // Sets.
+
+  // The context element type is pushed into the body.
+  Expect.setEquals(<int>{1}, <int>{await for (var i in stream()) expectInt(1)});
+
+  // Bottom up-inference from elements is not pushed back down into the body.
+  Expect.setEquals(<int>{1, 2},
+      {1, await for (var i in stream()) expectDynamic(2)});
+}
diff --git a/tests/language_2/control_flow_collections/await_for_null_test.dart b/tests/language_2/control_flow_collections/await_for_null_test.dart
new file mode 100644
index 0000000..7e2fc5e
--- /dev/null
+++ b/tests/language_2/control_flow_collections/await_for_null_test.dart
@@ -0,0 +1,21 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
+
+// Test that a null stream expression procudes a runtime error.
+import 'package:async_helper/async_helper.dart';
+
+void main() {
+  asyncTest(() async {
+    // Null stream.
+    Stream<int> nullStream = null;
+    asyncExpectThrows<NoSuchMethodError>(
+        () async => <int>[await for (var i in nullStream) 1]);
+    asyncExpectThrows<NoSuchMethodError>(
+        () async => <int, int>{await for (var i in nullStream) 1: 1});
+    asyncExpectThrows<NoSuchMethodError>(
+        () async => <int>{await for (var i in nullStream) 1});
+  });
+}
diff --git a/tests/language_2/control_flow_collections/await_for_syntax_error_test.dart b/tests/language_2/control_flow_collections/await_for_syntax_error_test.dart
new file mode 100644
index 0000000..f5e30ce
--- /dev/null
+++ b/tests/language_2/control_flow_collections/await_for_syntax_error_test.dart
@@ -0,0 +1,18 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=control-flow-collections
+
+void main() {
+  // Use await for in non-async function.
+  var _ = [await for (var i in Stream<int>.empty()) i]; //# 01: compile-time error
+
+  () async {
+    // Use await for variable out of scope.
+    var _ = [await for (var i in Stream<int>.empty()) 1, i]; //# 02: compile-time error
+
+    // Use await for variable in own initializer.
+    var _ = [await for (var i in Stream<Object>.fromIterable([i])) 1]; //# 03: compile-time error
+  }();
+}
diff --git a/tests/language_2/control_flow_collections/await_for_test.dart b/tests/language_2/control_flow_collections/await_for_test.dart
new file mode 100644
index 0000000..c838c49
--- /dev/null
+++ b/tests/language_2/control_flow_collections/await_for_test.dart
@@ -0,0 +1,270 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
+
+import 'package:async_helper/async_helper.dart';
+import 'package:expect/expect.dart';
+
+import 'utils.dart';
+
+final list = [1, 2, 3, 4];
+final map = {1: 1, 2: 2, 3: 3, 4: 4};
+final set = {1, 2, 3, 4};
+
+Stream<int> stream(List<int> values) => Stream.fromIterable(values);
+Stream<num> numStream(List<num> values) => Stream.fromIterable(values);
+
+void main() {
+  asyncTest(() async {
+    await testList();
+    await testMap();
+    await testSet();
+    await testDuplicateKeys();
+    await testKeyOrder();
+    await testRuntimeErrors();
+  });
+}
+
+Future<void> testList() async {
+  // Only await for.
+  Expect.listEquals(list, <int>[await for (var i in stream(list)) i]);
+
+  // Await for at beginning.
+  Expect.listEquals(list, <int>[await for (var i in stream([1, 2])) i, 3, 4]);
+
+  // Await for in middle.
+  Expect.listEquals(list, <int>[1, await for (var i in stream([2, 3])) i, 4]);
+
+  // Await for at end.
+  Expect.listEquals(list, <int>[1, 2, await for (var i in stream([3, 4])) i]);
+
+  // Empty await for.
+  Expect.listEquals(list,
+      <int>[1, 2, await for (var i in stream([])) i, 3, 4]);
+
+  // Multiple await fors.
+  Expect.listEquals(list, <int>[
+    await for (var i in stream([1])) i,
+    2,
+    await for (var i in stream([3, 4])) i
+  ]);
+
+  // Spread inside await for.
+  Expect.listEquals(list,
+      <int>[await for (var i in stream([0, 2])) ...<int>[1 + i, 2 + i]]);
+
+  // If inside await for.
+  Expect.listEquals(list,
+      <int>[await for (var i in stream([1, 9, 2, 3, 9, 4])) if (i != 9) i]);
+
+  // Else inside await for.
+  Expect.listEquals(list,
+      <int>[await for (var i in stream([1, -2, 3, -4])) if (i < 0) -i else i]);
+
+  // For inside await for.
+  Expect.listEquals(list, <int>[
+    await for (var i in stream([0, 2])) for (var j = 1; j <= 2; j++) i + j
+  ]);
+
+  // Does not flatten nested collection literal.
+  Expect.listEquals([1], [await for (var i in stream([1])) [i]].first);
+  Expect.mapEquals({1: 1}, [await for (var i in stream([1])) {i: i}].first);
+  Expect.setEquals({1}, [await for (var i in stream([1])) {i}].first);
+
+  // Downcast stream.
+  Object obj = stream([1, 2, 3, 4]);
+  Expect.listEquals(list, <int>[await for (var n in obj) n]);
+
+  // Downcast variable.
+  Expect.listEquals(list,
+      <int>[await for (int n in numStream([1, 2, 3, 4])) n]);
+
+  // Downcast element.
+  Expect.listEquals(list,
+      <int>[await for (num n in numStream([1, 2, 3, 4])) n]);
+}
+
+Future<void> testMap() async {
+  // Only for.
+  Expect.mapEquals(map, <int, int>{await for (var i in stream(list)) i: i});
+
+  // Await for at beginning.
+  Expect.mapEquals(map,
+      <int, int>{await for (var i in stream([1, 2])) i: i, 3: 3, 4: 4});
+
+  // Await for in middle.
+  Expect.mapEquals(map,
+      <int, int>{1: 1, await for (var i in stream([2, 3])) i: i, 4: 4});
+
+  // Await for at end.
+  Expect.mapEquals(map,
+      <int, int>{1: 1, 2: 2, await for (var i in stream([3, 4])) i: i});
+
+  // Empty await for.
+  Expect.mapEquals(map, <int, int>{
+    1: 1,
+    await for (var i in stream([])) i: i,
+    2: 2,
+    3: 3,
+    4: 4
+  });
+
+  // Multiple await fors.
+  Expect.mapEquals(map, <int, int>{
+    await for (var i in stream([1])) i: i,
+    2: 2,
+    await for (var i in stream([3, 4])) i: i
+  });
+
+  // Spread inside await for.
+  Expect.mapEquals(map, <int, int>{
+    await for (var i in stream([0, 2]))
+      ...<int, int>{1 + i: 1 + i, 2 + i: 2 + i}
+  });
+
+  // If inside await for.
+  Expect.mapEquals(map, <int, int>{
+    await for (var i in stream([1, 9, 2, 3, 9, 4])) if (i != 9) i: i
+  });
+
+  // Else inside await for.
+  Expect.mapEquals(map, <int, int>{
+    await for (var i in stream([1, -2, 3, -4])) if (i < 0) -i: -i else i: i
+  });
+
+  // For inside await for.
+  Expect.mapEquals(map, <int, int>{
+    await for (var i in stream([0, 2]))
+      for (var j = 1; j <= 2; j++) i + j: i + j
+  });
+
+  // Downcast stream.
+  Object obj = stream([1, 2, 3, 4]);
+  Expect.mapEquals(map, <int, int>{await for (var n in obj) n: n});
+
+  // Downcast variable.
+  Expect.mapEquals(map,
+      <int, int>{await for (int n in numStream([1, 2, 3, 4])) n: n});
+
+  // Downcast element.
+  Expect.mapEquals(map,
+      <int, int>{await for (num n in numStream([1, 2, 3, 4])) n: n});
+}
+
+Future<void> testSet() async {
+  // Only await for.
+  Expect.setEquals(set, <int>{await for (var i in stream(list)) i});
+
+  // Await for at beginning.
+  Expect.setEquals(set, <int>{await for (var i in stream([1, 2])) i, 3, 4});
+
+  // Await for in middle.
+  Expect.setEquals(set, <int>{1, await for (var i in stream([2, 3])) i, 4});
+
+  // Await for at end.
+  Expect.setEquals(set, <int>{1, 2, await for (var i in stream([3, 4])) i});
+
+  // Empty await for.
+  Expect.setEquals(set,
+      <int>{1, await for (var i in stream([])) i, 2, 3, 4});
+
+  // Multiple await fors.
+  Expect.setEquals(set, <int>{
+    await for (var i in stream([1])) i,
+    2,
+    await for (var i in stream([3, 4])) i
+  });
+
+  // Spread inside await for.
+  Expect.setEquals(set,
+      <int>{await for (var i in stream([0, 2])) ...<int>[1 + i, 2 + i]});
+
+  // If inside await for.
+  Expect.setEquals(set,
+      <int>{await for (var i in stream([1, 9, 2, 3, 9, 4])) if (i != 9) i});
+
+  // Else inside await for.
+  Expect.setEquals(set,
+      <int>{await for (var i in stream([1, -2, 3, -4])) if (i < 0) -i else i});
+
+  // For inside await for.
+  Expect.setEquals(set, <int>{
+    await for (var i in stream([0, 2])) for (var j = 1; j <= 2; j++) i + j
+  });
+
+  // Does not flatten nested collection literal.
+  Expect.listEquals([1], {await for (var i in stream([1])) [i]}.first);
+  Expect.mapEquals({1: 1}, {await for (var i in stream([1])) {i: i}}.first);
+  Expect.setEquals({1}, {await for (var i in stream([1])) {i}}.first);
+
+  // Downcast stream.
+  Object obj = stream([1, 2, 3, 4]);
+  Expect.setEquals(set, <int>{await for (var n in obj) n});
+
+  // Downcast variable.
+  Expect.setEquals(set, <int>{await for (int n in numStream([1, 2, 3, 4])) n});
+
+  // Downcast element.
+  Expect.setEquals(set, <int>{await for (num n in numStream([1, 2, 3, 4])) n});
+}
+
+Future<void> testDuplicateKeys() async {
+  Expect.mapEquals(map, <int, int>{
+    1: 1,
+    await for (var i in stream([1, 2, 3])) i: i,
+    await for (var i in stream([2, 3])) i: i,
+    3: 3,
+    4: 4
+  });
+  Expect.setEquals(set, <int>{
+    1,
+    await for (var i in stream([1, 2, 3])) i,
+    await for (var i in stream([2, 3])) i,
+    3,
+    4
+  });
+}
+
+Future<void> testKeyOrder() async {
+  // First equal key wins.
+  var e1a = Equality(1, "a");
+  var e1b = Equality(1, "b");
+  var e2a = Equality(2, "a");
+  var e2b = Equality(2, "b");
+  var keys = [e1b, e2a, e2b];
+  var values = [2, 3, 4];
+
+  var map = <Equality, int>{
+    e1a: 1,
+    await for (var i in stream([0, 1, 2])) keys[i]: values[i]
+  };
+  Expect.equals("1:a,2:a", map.keys.join(","));
+  Expect.equals("2,4", map.values.join(","));
+
+  var set = <Equality>{e1a, await for (var i in stream([0, 1, 2])) keys[i]};
+  Expect.equals("1:a,2:a", set.join(","));
+}
+
+Future<void> testRuntimeErrors() async {
+  // Cast variable.
+  dynamic nonStream = 3;
+  asyncExpectThrows<TypeError>(
+      () async => <int>[await for (int i in nonStream) 1]);
+  asyncExpectThrows<TypeError>(
+      () async => <int, int>{await for (int i in nonStream) 1: 1});
+  asyncExpectThrows<TypeError>(
+      () async => <int>{await for (int i in nonStream) 1});
+
+  // Wrong element type.
+  dynamic nonInt = "string";
+  asyncExpectThrows<TypeError>(
+      () async => <int>[await for (var i in stream([1])) nonInt]);
+  asyncExpectThrows<TypeError>(
+      () async => <int, int>{await for (var i in stream([1])) nonInt: 1});
+  asyncExpectThrows<TypeError>(
+      () async => <int, int>{await for (var i in stream([1])) 1: nonInt});
+  asyncExpectThrows<TypeError>(
+      () async => <int>{await for (var i in stream([1])) nonInt});
+}
diff --git a/tests/language_2/control_flow_collections/await_for_type_error_test.dart b/tests/language_2/control_flow_collections/await_for_type_error_test.dart
new file mode 100644
index 0000000..8cc87da
--- /dev/null
+++ b/tests/language_2/control_flow_collections/await_for_type_error_test.dart
@@ -0,0 +1,27 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=control-flow-collections
+
+void main() {
+  () async {
+    // Non-Stream type.
+    int nonStream = 3;
+    var _ = <int>[await for (var i in nonStream) 1]; //# 01: compile-time error
+    var _ = <int, int>{await for (var i in nonStream) 1: 1}; //# 02: compile-time error
+    var _ = <int>{await for (var i in nonStream) 1}; //# 03: compile-time error
+
+    // Wrong element type.
+    Stream<String> s = Stream.fromIterable(["s"]);
+    var _ = <int>[await for (int i in s) 1]; //# 07: compile-time error
+    var _ = <int, int>{await for (int i in s) 1: 1}; //# 08: compile-time error
+    var _ = <int>{await for (int i in s) 1}; //# 09: compile-time error
+
+    // Wrong body element type.
+    var _ = <int>[await for (var i in s) "s"]; //# 10: compile-time error
+    var _ = <int, int>{await for (var i in s) "s": 1}; //# 11: compile-time error
+    var _ = <int, int>{await for (var i in s) 1: "s"}; //# 12: compile-time error
+    var _ = <int>{await for (var i in s) "s"}; //# 13: compile-time error
+  }();
+}
diff --git a/tests/language_2/control_flow_collections/experimental_flag_test.dart b/tests/language_2/control_flow_collections/experimental_flag_test.dart
deleted file mode 100644
index aa3d8a1..0000000
--- a/tests/language_2/control_flow_collections/experimental_flag_test.dart
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Check that control flow is not enabled without the experimental flag.
-
-// Do enable set literals, just not the new syntax in them.
-// SharedOptions=--enable-experiment=set-literals
-
-// TODO(rnystrom): Remove this test when the feature is enabled without a flag.
-
-void main() {
-  var _ = <int>[if (true) 1]; //# 01: compile-time error
-  var _ = <int, int>{if (true) 1: 1}; //# 02: compile-time error
-  var _ = <int>{if (true) 1}; //# 03: compile-time error
-
-  var _ = <int>[if (true) 1 else 2]; //# 04: compile-time error
-  var _ = <int, int>{if (true) 1: 1 else 2: 2}; //# 05: compile-time error
-  var _ = <int>{if (true) 1 else 2}; //# 06: compile-time error
-
-  var _ = <int>[for (var i in []) 1]; //# 07: compile-time error
-  var _ = <int, int>{for (var i in []) 1: 1}; //# 08: compile-time error
-  var _ = <int>{for (var i in []) 1}; //# 09: compile-time error
-
-  var _ = <int>[for (; false;) 1]; //# 10: compile-time error
-  var _ = <int, int>{for (; false;) 1: 1}; //# 11: compile-time error
-  var _ = <int>{for (; false;) 1}; //# 12: compile-time error
-
-  () async {
-    var _ = <int>[await for (var i in []) 1]; //# 13: compile-time error
-    var _ = <int, int>{await  for (var i in []) 1: 1}; //# 14: compile-time error
-    var _ = <int>{await for (var i in []) 1}; //# 15: compile-time error
-  }();
-}
diff --git a/tests/language_2/control_flow_collections/for_await_test.dart b/tests/language_2/control_flow_collections/for_await_test.dart
new file mode 100644
index 0000000..55d24ae
--- /dev/null
+++ b/tests/language_2/control_flow_collections/for_await_test.dart
@@ -0,0 +1,107 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=control-flow-collections
+
+import "package:async_helper/async_helper.dart";
+import 'package:expect/expect.dart';
+
+final list = [1, 2, 3];
+final map = {1: 1, 2: 2, 3: 3};
+final set = {1, 2, 3};
+
+void main() {
+  asyncTest(() async {
+    await testList();
+    await testMap();
+    await testSet();
+  });
+}
+
+Future<void> testList() async {
+  var future123 = Future.value([1, 2, 3]);
+  var future1 = Future.value(1);
+
+  // Await in iterable.
+  Expect.listEquals(list, [for (var i in await future123) i]);
+
+  // Await in for-in body.
+  Expect.listEquals(list, [for (var i in [1, 2, 3]) await Future.value(i)]);
+
+  // Await in initializer.
+  Expect.listEquals(list, [for (var i = await future1; i < 4; i++) i]);
+
+  // Await in condition.
+  Expect.listEquals(list,
+      [for (var i = 1; await Future.value(i < 4); i++) i]);
+
+  // Await in increment.
+  Expect.listEquals(list,
+      [for (var i = 1; i < 4; await Future(() => i++)) i]);
+
+  // Await in for body.
+  Expect.listEquals(list,
+      [for (var i = 1; i < 4; i++) await Future.value(i)]);
+}
+
+Future<void> testMap() async {
+  var future123 = Future.value([1, 2, 3]);
+  var future1 = Future.value(1);
+
+  // Await in iterable.
+  Expect.mapEquals(map, {for (var i in await future123) i: i});
+
+  // Await in for-in body key.
+  Expect.mapEquals(map,
+      {for (var i in [1, 2, 3]) await Future.value(i): i});
+
+  // Await in for-in body value.
+  Expect.mapEquals(map,
+      {for (var i in [1, 2, 3]) i: await Future.value(i)});
+
+  // Await in initializer.
+  Expect.mapEquals(map, {for (var i = await future1; i < 4; i++) i: i});
+
+  // Await in condition.
+  Expect.mapEquals(map,
+      {for (var i = 1; await Future.value(i < 4); i++) i: i});
+
+  // Await in increment.
+  Expect.mapEquals(map,
+      {for (var i = 1; i < 4; await Future(() => i++)) i: i});
+
+  // Await in for body key.
+  Expect.mapEquals(map,
+      {for (var i = 1; i < 4; i++) await Future.value(i): i});
+
+  // Await in for body value.
+  Expect.mapEquals(map,
+      {for (var i = 1; i < 4; i++) i: await Future.value(i)});
+}
+
+Future<void> testSet() async {
+  var future123 = Future.value([1, 2, 3]);
+  var future1 = Future.value(1);
+
+  // Await in iterable.
+  Expect.setEquals(set, {for (var i in await future123) i});
+
+  // Await in for-in body.
+  Expect.setEquals(set, {for (var i in [1, 2, 3]) await Future.value(i)});
+
+  // Await in initializer.
+  Expect.setEquals(set, {for (var i = await future1; i < 4; i++) i});
+
+  // Await in condition.
+  Expect.setEquals(set,
+      {for (var i = 1; await Future.value(i < 4); i++) i});
+
+  // Await in increment.
+  Expect.setEquals(set,
+      {for (var i = 1; i < 4; await Future(() => i++)) i});
+
+  // Await in for body.
+  Expect.setEquals(set,
+      {for (var i = 1; i < 4; i++) await Future.value(i)});
+}
diff --git a/tests/language_2/control_flow_collections/for_const_error_test.dart b/tests/language_2/control_flow_collections/for_const_error_test.dart
new file mode 100644
index 0000000..626c7a8
--- /dev/null
+++ b/tests/language_2/control_flow_collections/for_const_error_test.dart
@@ -0,0 +1,22 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=control-flow-collections
+
+void main() {
+  // For cannot be used in a const collection.
+  const _ = [for (var i in []) 1]; //# 00: compile-time error
+  const _ = {for (var i in []) 1: 1}; //# 01: compile-time error
+  const _ = {for (var i in []) 1}; //# 02: compile-time error
+
+  const _ = [for (; false;) 1]; //# 03: compile-time error
+  const _ = {for (; false;) 1: 1}; //# 04: compile-time error
+  const _ = {for (; false;) 1}; //# 05: compile-time error
+
+  () async {
+    const _ = <int>[await for (var i in []) 1]; //# 06: compile-time error
+    const _ = <int, int>{await for (var i in []) 1: 1}; //# 07: compile-time error
+    const _ = <int>{await for (var i in []) 1}; //# 08: compile-time error
+  }();
+}
diff --git a/tests/language_2/control_flow_collections/for_const_test.dart b/tests/language_2/control_flow_collections/for_const_test.dart
deleted file mode 100644
index 022ec24..0000000
--- a/tests/language_2/control_flow_collections/for_const_test.dart
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// SharedOptions=--enable-experiment=set-literals,control-flow-collections
-
-void main() {
-  // For cannot be used in a const collection.
-  const _ = [for (var i in []) 1]; //# 00: compile-time error
-  const _ = {for (var i in []) 1: 1}; //# 01: compile-time error
-  const _ = {for (var i in []) 1}; //# 02: compile-time error
-
-  const _ = [for (; false;) 1]; //# 03: compile-time error
-  const _ = {for (; false;) 1: 1}; //# 04: compile-time error
-  const _ = {for (; false;) 1}; //# 05: compile-time error
-
-  () async {
-    const _ = <int>[await for (var i in []) 1]; //# 06: compile-time error
-    const _ = <int, int>{await  for (var i in []) 1: 1}; //# 07: compile-time error
-    const _ = <int>{await for (var i in []) 1}; //# 08: compile-time error
-  }();
-}
diff --git a/tests/language_2/control_flow_collections/for_inference_test.dart b/tests/language_2/control_flow_collections/for_inference_test.dart
index 1834edb..9479dd6 100644
--- a/tests/language_2/control_flow_collections/for_inference_test.dart
+++ b/tests/language_2/control_flow_collections/for_inference_test.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.
 
-// SharedOptions=--enable-experiment=set-literals,control-flow-collections,spread-collections
+// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
 
 // Test how control flow interacts with inference.
 import 'package:expect/expect.dart';
@@ -40,8 +40,8 @@
   Expect.type<Set<num>>({for (; false;) 1, for (; false;) 0.2});
   Expect.type<Set<int>>({for (; false;) 1, 2});
   Expect.type<Set<num>>({for (; false;) 1, 0.2});
-  Expect.type<Set<dynamic>>({if (true) ...[]});
-  Expect.type<Set<int>>({if (true) ...<int>[]});
+  Expect.type<Set<dynamic>>({for (; false;) ...[]});
+  Expect.type<Set<int>>({for (; false;) ...<int>[]});
 
   // If a nested iterable's type is dynamic, the element type is dynamic.
   Expect.type<List<dynamic>>([for (; false;) ...([] as dynamic)]);
@@ -60,37 +60,42 @@
   Expect.type<List<int>>([for (var i = 1; i < 2; i++) i]);
   Expect.type<List<String>>([for (var i = 1; i < 2; i++) i.toRadixString(10)]);
 
-  // Loop variable type is not pushed into iterable.
-  Expect.listEquals(<int>[1], [for (int i in expectDynamic([1]))]);
+  // Loop variable type is pushed into sequence.
+  Expect.listEquals(<int>[1], [for (int i in expectIntIterable([1])) i]);
 
   // Loop variable type is pushed into initializer.
-  Expect.listEquals(<int>[1], [for (int i = expectInt(1), i < 2; i++) i]);
+  Expect.listEquals(<int>[1], [for (int i = expectInt(1); i < 2; i++) i]);
 }
 
 void testTopDownInference() {
   // Lists.
 
   // The context element type is pushed into the body.
-  Expect.listEquals(<int>[1], <int>[for (; false;) expectInt(1)]);
+  Expect.listEquals(<int>[1], <int>[for (var i = 0; i < 1; i++) expectInt(1)]);
 
   // Bottom up-inference from elements is not pushed back down into the body.
-  Expect.listEquals(<int>[1, 2], [1, for (; false;) expectDynamic(2)]);
+  Expect.listEquals(<int>[1, 2],
+      [1, for (var i = 0; i < 1; i++) expectDynamic(2)]);
 
   // Maps.
 
   // The context element type is pushed into the body.
-  Expect.mapEquals(<int, String>{1: "s"},
-      <int, String>{for (; false;) expectInt(1): expectString("s")});
+  Expect.mapEquals(<int, String>{1: "s"}, <int, String>{
+    for (var i = 0; i < 1; i++) expectInt(1): expectString("s")
+  });
 
   // Bottom up-inference from elements is not pushed back down into the body.
-  Expect.mapEquals(<int, String>{1: "s", 2: "t"},
-      {1: "s", for (; false;) expectDynamic(2): expectDynamic("t")});
+  Expect.mapEquals(<int, String>{1: "s", 2: "t"}, {
+    1: "s",
+    for (var i = 0; i < 1; i++) expectDynamic(2): expectDynamic("t")
+  });
 
   // Sets.
 
   // The context element type is pushed into the body.
-  Expect.setEquals(<int>{1}, <int>{for (; false;) expectInt(1)});
+  Expect.setEquals(<int>{1}, <int>{for (var i = 0; i < 1; i++) expectInt(1)});
 
   // Bottom up-inference from elements is not pushed back down into the body.
-  Expect.setEquals(<int>{1, 2}, {1, for (; false;) expectDynamic(2)});
+  Expect.setEquals(<int>{1, 2},
+      {1, for (var i = 0; i < 1; i++) expectDynamic(2)});
 }
diff --git a/tests/language_2/control_flow_collections/for_non_bool_condition_test.dart b/tests/language_2/control_flow_collections/for_non_bool_condition_test.dart
new file mode 100644
index 0000000..74b00df
--- /dev/null
+++ b/tests/language_2/control_flow_collections/for_non_bool_condition_test.dart
@@ -0,0 +1,15 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
+
+import 'package:expect/expect.dart';
+
+void main() {
+  // Non-bool condition expression.
+  dynamic nonBool = 3;
+  Expect.throwsTypeError(() => <int>[for (; nonBool;) 1]);
+  Expect.throwsTypeError(() => <int, int>{for (; nonBool;) 1: 1});
+  Expect.throwsTypeError(() => <int>{for (; nonBool;) 1});
+}
diff --git a/tests/language_2/control_flow_collections/for_null_condition_test.dart b/tests/language_2/control_flow_collections/for_null_condition_test.dart
new file mode 100644
index 0000000..2f9a6c0
--- /dev/null
+++ b/tests/language_2/control_flow_collections/for_null_condition_test.dart
@@ -0,0 +1,15 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
+
+import 'package:expect/expect.dart';
+
+void main() {
+  // Null condition expression.
+  bool nullBool = null;
+  Expect.throwsAssertionError(() => <int>[for (; nullBool;) 1]);
+  Expect.throwsAssertionError(() => <int, int>{for (; nullBool;) 1: 1});
+  Expect.throwsAssertionError(() => <int>{for (; nullBool;) 1});
+}
diff --git a/tests/language_2/control_flow_collections/for_runtime_error_test.dart b/tests/language_2/control_flow_collections/for_runtime_error_test.dart
new file mode 100644
index 0000000..b8fa267
--- /dev/null
+++ b/tests/language_2/control_flow_collections/for_runtime_error_test.dart
@@ -0,0 +1,29 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
+
+import 'package:expect/expect.dart';
+
+void main() {
+  // Cast for variable.
+  dynamic nonInt = "string";
+  Expect.throwsTypeError(() => <int>[for (int i = nonInt; false;) 1]);
+  Expect.throwsTypeError(() => <int, int>{for (int i = nonInt; false;) 1: 1});
+  Expect.throwsTypeError(() => <int>{for (int i = nonInt; false;) 1});
+
+  // Cast for-in variable.
+  dynamic nonIterable = 3;
+  Expect.throwsTypeError(() => <int>[for (int i in nonIterable) 1]);
+  Expect.throwsTypeError(() => <int, int>{for (int i in nonIterable) 1: 1});
+  Expect.throwsTypeError(() => <int>{for (int i in nonIterable) 1});
+
+  // Wrong element type.
+  Expect.throwsTypeError(() => <int>[for (var i = 0; i < 1; i++) nonInt]);
+  Expect.throwsTypeError(
+      () => <int, int>{for (var i = 0; i < 1; i++) nonInt: 1});
+  Expect.throwsTypeError(
+      () => <int, int>{for (var i = 0; i < 1; i++) 1: nonInt});
+  Expect.throwsTypeError(() => <int>{for (var i = 0; i < 1; i++) nonInt});
+}
diff --git a/tests/language_2/control_flow_collections/for_test.dart b/tests/language_2/control_flow_collections/for_test.dart
index 108b82f..a264cb6 100644
--- a/tests/language_2/control_flow_collections/for_test.dart
+++ b/tests/language_2/control_flow_collections/for_test.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.
 
-// SharedOptions=--enable-experiment=set-literals,control-flow-collections,spread-collections
+// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
 
 import 'package:expect/expect.dart';
 
@@ -59,9 +59,13 @@
       <int>[for (var i in <int>[0, 2]) for (var j = 1; j <= 2; j++) i + j]);
 
   // Does not flatten nested collection literal.
-  Expect.listEquals([1], [for (var i = 1; i < 2; i++) [i]].first;
-  Expect.mapEquals({1: 1}, [for (var i = 1; i < 2; i++) {i: i}].first;
-  Expect.setEquals({1}, [for (var i = 1; i < 2; i++) {i}].first;
+  Expect.listEquals([1], [for (var i = 1; i < 2; i++) [i]].first);
+  Expect.mapEquals({1: 1}, [for (var i = 1; i < 2; i++) {i: i}].first);
+  Expect.setEquals({1}, [for (var i = 1; i < 2; i++) {i}].first);
+
+  // Downcast iterable.
+  Object obj = <int>[1, 2, 3, 4];
+  Expect.listEquals(list, <int>[for (var n in obj) n]);
 
   // Downcast variable.
   Expect.listEquals(list, <int>[for (int n in <num>[1, 2, 3, 4]) n]);
@@ -109,7 +113,7 @@
 
   // Spread inside for.
   Expect.mapEquals(map, <int, int>{
-    for (var i in <int>[0, 2]) ...<int>{1 + i: 1 + i, 2 + i: 2 + i}
+    for (var i in <int>[0, 2]) ...<int, int>{1 + i: 1 + i, 2 + i: 2 + i}
   });
 
   // If inside for.
@@ -118,13 +122,17 @@
 
   // Else inside for.
   Expect.mapEquals(map,
-      <int, int>{for (var i in <int>[1, -2, 3, -4]) if (i < 0) -i else i: i});
+      <int, int>{for (var i in <int>[1, -2, 3, -4]) if (i < 0) -i: -i else i: i});
 
   // For inside for.
   Expect.mapEquals(map, <int, int>{
     for (var i in <int>[0, 2]) for (var j = 1; j <= 2; j++) i + j: i + j
   });
 
+  // Downcast iterable.
+  Object obj = <int>[1, 2, 3, 4];
+  Expect.mapEquals(map, <int, int>{for (var n in obj) n: n});
+
   // Downcast variable.
   Expect.mapEquals(map, <int, int>{for (int n in <num>[1, 2, 3, 4]) n: n});
 
@@ -132,9 +140,9 @@
   Expect.mapEquals(map, <int, int>{for (num n in <num>[1, 2, 3, 4]) n: n});
 
   // Downcast condition.
-  Expect.mapEquals([1],
+  Expect.mapEquals({1 : 1},
       <int, int>{for (var i = 1; (i < 2) as dynamic; i++) i: i});
-  Expect.mapEquals([1],
+  Expect.mapEquals({1 : 1},
       <int, int>{for (var i = 1; (i < 2) as Object; i++) i: i});
 }
 
@@ -176,9 +184,13 @@
       <int>{for (var i in <int>[0, 2]) for (var j = 1; j <= 2; j++) i + j});
 
   // Does not flatten nested collection literal.
-  Expect.listEquals([1], {for (var i = 1; i < 2; i++) [i]}.first;
-  Expect.mapEquals({1: 1}, {for (var i = 1; i < 2; i++) {i: i}}.first;
-  Expect.setEquals({1}, }for (var i = 1; i < 2; i++) {i}}.first;
+  Expect.listEquals([1], {for (var i = 1; i < 2; i++) [i]}.first);
+  Expect.mapEquals({1: 1}, {for (var i = 1; i < 2; i++) {i: i}}.first);
+  Expect.setEquals({1}, {for (var i = 1; i < 2; i++) {i}}.first);
+
+  // Downcast iterable.
+  Object obj = <int>[1, 2, 3, 4];
+  Expect.setEquals(set, <int>{for (var n in obj) n});
 
   // Downcast variable.
   Expect.setEquals(set, <int>{for (int n in <num>[1, 2, 3, 4]) n});
@@ -196,13 +208,15 @@
     1: 1,
     for (var i in <int>[1, 2, 3]) i: i,
     for (var i = 2; i <= 3; i++) i: i,
-    3: 3
+    3: 3,
+    4: 4
   });
   Expect.setEquals(set, <int>{
     1,
     for (var i in <int>[1, 2, 3]) i,
     for (var i = 2; i <= 3; i++) i,
-    3
+    3,
+    4
   });
 }
 
@@ -220,48 +234,17 @@
     for (var i = 0; i < keys.length; i++) keys[i]: values[i]
   };
   Expect.equals("1:a,2:a", map.keys.join(","));
+  Expect.equals("2,4", map.values.join(","));
 
   var set = <Equality>{e1a, for (var i = 0; i < keys.length; i++) keys[i]};
   Expect.equals("1:a,2:a", set.join(","));
 }
 
 void testRuntimeErrors() {
-  // Non-bool condition expression.
-  dynamic nonBool = 3;
-  Expect.throwsCastError(() => <int>[for (; nonBool;) 1]);
-  Expect.throwsCastError(() => <int, int>{for (; nonBool;) 1: 1});
-  Expect.throwsCastError(() => <int>{for (; nonBool;) 1});
-
-  // Null condition expression.
-  bool nullBool = null;
-  Expect.throwsAssertionError(() => <int>[for (; nullBool;) 1]);
-  Expect.throwsAssertionError(() => <int, int>{for (; nullBool;) 1: 1});
-  Expect.throwsAssertionError(() => <int>{for (; nullBool;) 1});
-
-  // Cast for variable.
-  dynamic nonInt = "string";
-  Expect.throwsCastError(() => <int>[for (int i = nonInt; false;) 1]);
-  Expect.throwsCastError(() => <int, int>{for (int i = nonInt; false;) 1: 1});
-  Expect.throwsCastError(() => <int>{for (int i = nonInt; false;) 1});
-
-  // Cast for-in variable.
-  dynamic nonIterable = 3;
-  Expect.throwsCastError(() => <int>[for (int i in nonIterable) 1]);
-  Expect.throwsCastError(() => <int, int>{for (int i in nonIterable) 1: 1});
-  Expect.throwsCastError(() => <int>{for (int i in nonIterable) 1});
-
   // Null iterable.
   Iterable<int> nullIterable = null;
   Expect.throwsNoSuchMethodError(() => <int>[for (var i in nullIterable) 1]);
   Expect.throwsNoSuchMethodError(
       () => <int, int>{for (var i in nullIterable) 1: 1});
   Expect.throwsNoSuchMethodError(() => <int>{for (var i in nullIterable) 1});
-
-  // Wrong element type.
-  Expect.throwsCastError(() => <int>[for (var i = 0; i < 1; i++) nonInt]);
-  Expect.throwsCastError(
-      () => <int, int>{for (var i = 0; i < 1; i++) nonInt: 1});
-  Expect.throwsCastError(
-      () => <int, int>{for (var i = 0; i < 1; i++) 1: nonInt});
-  Expect.throwsCastError(() => <int>{for (var i = 0; i < 1; i++) nonInt});
 }
diff --git a/tests/language_2/control_flow_collections/for_variable_test.dart b/tests/language_2/control_flow_collections/for_variable_test.dart
index 732e2ca..f866daf 100644
--- a/tests/language_2/control_flow_collections/for_variable_test.dart
+++ b/tests/language_2/control_flow_collections/for_variable_test.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.
 
-// SharedOptions=--enable-experiment=set-literals,control-flow-collections,spread-collections
+// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
 
 /// Tests for how variables and scoping work with for elements.
 import 'package:expect/expect.dart';
@@ -39,17 +39,17 @@
   Expect.equals(1, list[1]());
 
   // Close over variable in condition expression.
-  list = [for (var i = 0; capture(() => i++) < 2;) i];
+  var list2 = [for (var i = 0; capture(() => i++) < 2;) i];
   Expect.equals(1, closures[0]());
   Expect.equals(2, closures[1]());
-  Expect.listEquals([1, 2], list);
+  Expect.listEquals([1, 2], list2);
   reset();
 
   // Close over variable in increment expression.
-  list = [for (var i = 0; i < 2; capture(() => i++)) i];
+  var list3 = [for (var i = 0; i < 2; capture(() => i++)) i];
   Expect.equals(1, closures[0]());
   Expect.equals(2, closures[1]());
-  Expect.listEquals([0, 1], list);
+  Expect.listEquals([0, 1], list3);
   reset();
 }
 
diff --git a/tests/language_2/control_flow_collections/if_await_test.dart b/tests/language_2/control_flow_collections/if_await_test.dart
new file mode 100644
index 0000000..2db3f62
--- /dev/null
+++ b/tests/language_2/control_flow_collections/if_await_test.dart
@@ -0,0 +1,95 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=control-flow-collections
+
+import "package:async_helper/async_helper.dart";
+import 'package:expect/expect.dart';
+
+final list = [1, 2, 3];
+final map = {1: 1, 2: 2, 3: 3};
+final set = {1, 2, 3};
+
+void main() {
+  asyncTest(() async {
+    await testList();
+    await testMap();
+    await testSet();
+  });
+}
+
+Future<void> testList() async {
+  var futureTrue = Future.value(true);
+  var future2 = Future.value(2);
+  var future9 = Future.value(9);
+
+  // Await in condition.
+  Expect.listEquals(list, [1, if (await futureTrue) 2, 3]);
+
+  // Await in then branch.
+  Expect.listEquals(list, [1, if (true) await future2, 3]);
+
+  // Await in else branch.
+  Expect.listEquals(list, [1, if (false) 9 else await future2, 3]);
+
+  // Await in untaken then branch.
+  Expect.listEquals(list, [1, 2, if (false) await future9, 3]);
+
+  // Await in untaken else branch.
+  Expect.listEquals(list, [1, if (true) 2 else await future9, 3]);
+}
+
+Future<void> testMap() async {
+  var futureTrue = Future.value(true);
+  var future2 = Future.value(2);
+  var future9 = Future.value(9);
+
+  // Await in condition.
+  Expect.mapEquals(map, {1: 1, if (await futureTrue) 2: 2, 3: 3});
+
+  // Await in then branch key.
+  Expect.mapEquals(map, {1: 1, if (true) await future2: 2, 3: 3});
+
+  // Await in then branch value.
+  Expect.mapEquals(map, {1: 1, if (true) 2: await future2, 3: 3});
+
+  // Await in else branch key.
+  Expect.mapEquals(map, {1: 1, if (false) 9: 9 else await future2: 2, 3: 3});
+
+  // Await in else branch value.
+  Expect.mapEquals(map, {1: 1, if (false) 9: 9 else 2: await future2, 3: 3});
+
+  // Await in untaken then branch key.
+  Expect.mapEquals(map, {1: 1, 2: 2, if (false) await future9: 9, 3: 3});
+
+  // Await in untaken then branch value.
+  Expect.mapEquals(map, {1: 1, 2: 2, if (false) 9: await future9, 3: 3});
+
+  // Await in untaken else branch key.
+  Expect.mapEquals(map, {1: 1, if (true) 2: 2 else await future9: 9, 3: 3});
+
+  // Await in untaken else branch value.
+  Expect.mapEquals(map, {1: 1, if (true) 2: 2 else 9: await future9, 3: 3});
+}
+
+Future<void> testSet() async {
+  var futureTrue = Future.value(true);
+  var future2 = Future.value(2);
+  var future9 = Future.value(9);
+
+  // Await in condition.
+  Expect.setEquals(set, {1, if (await futureTrue) 2, 3});
+
+  // Await in then branch.
+  Expect.setEquals(set, {1, if (true) await future2, 3});
+
+  // Await in else branch.
+  Expect.setEquals(set, {1, if (false) 9 else await future2, 3});
+
+  // Await in untaken then branch.
+  Expect.setEquals(set, {1, 2, if (false) await future9, 3});
+
+  // Await in untaken else branch.
+  Expect.setEquals(set, {1, if (true) 2 else await future9, 3});
+}
diff --git a/tests/language_2/control_flow_collections/if_const_error_test.dart b/tests/language_2/control_flow_collections/if_const_error_test.dart
index 4e100a6..f3645f2 100644
--- a/tests/language_2/control_flow_collections/if_const_error_test.dart
+++ b/tests/language_2/control_flow_collections/if_const_error_test.dart
@@ -2,138 +2,14 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// SharedOptions=--enable-experiment=set-literals,control-flow-collections
-
-import 'dart:collection';
-
-import 'package:expect/expect.dart';
-
-import 'utils.dart';
-
-final nonConstBool = true;
-final nonConstInt = 3;
-
-const dynamic nonBool = 3;
-const dynamic nonInt = "s";
+// SharedOptions=--enable-experiment=control-flow-collections
 
 void main() {
-  testList();
-  testMap();
-  testSet();
-  testShortCircuit();
-}
-
-void testList() {
-  // Condition must be constant.
-  const _ = <int>[if (nonConstBool) 1]; //# 01: compile-time error
-
-  // Condition must be Boolean.
-  const _ = <int>[if (nonBool) 1]; //# 02: compile-time error
-
-  // Then element must be constant, whether or not branch is taken.
-  const _ = <int>[if (true) nonConstInt]; //# 03: compile-time error
-  const _ = <int>[if (false) nonConstInt]; //# 04: compile-time error
-
-  // Else element must be constant, whether or not branch is taken.
-  const _ = <int>[if (true) 1 else nonConstInt]; //# 05: compile-time error
-  const _ = <int>[if (false) 1 else nonConstInt]; //# 06: compile-time error
-
-  // Then element must have right type if branch is chosen.
-  const _ = <int>[if (true) nonInt]; //# 07: compile-time error
-
-  // Else element must have right type if branch is chosen.
-  const _ = <int>[if (false) 9 else nonInt]; //# 08: compile-time error
-}
-
-void testMap() {
-  // Condition must be constant.
-  const _ = <int, int>{if (nonConstBool) 1: 1}; //# 09: compile-time error
-
-  // Condition must be Boolean.
-  const _ = <int, int>{if (nonBool) 1: 1}; //# 10: compile-time error
-
-  // Then key element must be constant, whether or not branch is taken.
-  const _ = <int, int>{if (true) nonConstInt: 1}; //# 11: compile-time error
-  const _ = <int, int>{if (false) nonConstInt: 1}; //# 12: compile-time error
-
-  // Then value element must be constant, whether or not branch is taken.
-  const _ = <int, int>{if (true) 1: nonConstInt}; //# 13: compile-time error
-  const _ = <int, int>{if (false) 1: nonConstInt}; //# 14: compile-time error
-
-  // Else key element must be constant, whether or not branch is taken.
-  const _ = <int, int>{if (true) 1 else nonConstInt: 1}; //# 15: compile-time error
-  const _ = <int, int>{if (false) 1 else nonConstInt: 1}; //# 16: compile-time error
-
-  // Else value element must be constant, whether or not branch is taken.
-  const _ = <int, int>{if (true) 1 else 1: nonConstInt}; //# 17: compile-time error
-  const _ = <int, int>{if (false) 1 else 1: nonConstInt}; //# 18: compile-time error
-
-  // Then key element must have right type if branch is chosen.
-  const _ = <int, int>{if (true) nonInt: 1}; //# 19: compile-time error
-
-  // Then value element must have right type if branch is chosen.
-  const _ = <int, int>{if (true) 1: nonInt}; //# 20: compile-time error
-
-  // Else key element must have right type if branch is chosen.
-  const _ = <int, int>{if (false) 9 else nonInt: 1}; //# 21: compile-time error
-
-  // Else value element must have right type if branch is chosen.
-  const _ = <int, int>{if (false) 9 else 1: nonInt}; //# 22: compile-time error
-
-  // Key cannot override operator.==().
-  const obj = 0.1;
-  const _ = {if (true) 0.1: 1}; //# 23: compile-time error
-  const _ = {if (true) Duration(seconds: 0): 1}; //# 24: compile-time error
-  const _ = {if (true) obj: 1}; //# 25: compile-time error
-
-  // Cannot have key collision when branch is chosen.
-  const _ = <int, int>{1: 1, if (true) 1: 1}; //# 25: compile-time error
-  const _ = <int, int>{if (true) 1: 1, if (true) 1: 1}; //# 26: compile-time error
-}
-
-void testSet() {
-  // Condition must be constant.
-  const _ = <int>{if (nonConstBool) 1}; //# 27: compile-time error
-
-  // Condition must be Boolean.
-  const _ = <int>{if (nonBool) 1}; //# 28: compile-time error
-
-  // Then element must be constant, whether or not branch is taken.
-  const _ = <int>{if (true) nonConstInt}; //# 29: compile-time error
-  const _ = <int>{if (false) nonConstInt}; //# 30: compile-time error
-
-  // Else element must be constant, whether or not branch is taken.
-  const _ = <int>{if (true) 1 else nonConstInt}; //# 31: compile-time error
-  const _ = <int>{if (false) 1 else nonConstInt}; //# 32: compile-time error
-
-  // Then element must have right type if branch is chosen.
-  const _ = <int>{if (true) nonInt}; //# 33: compile-time error
-
-  // Else element must have right type if branch is chosen.
-  const _ = <int>{if (false) 9 else nonInt}; //# 34: compile-time error
-
-  // Cannot override operator.==().
-  const obj = 0.1;
-  const _ = {if (true) 0.1}; //# 35: compile-time error
-  const _ = {if (true) Duration(seconds: 0)}; //# 36: compile-time error
-  const _ = {if (true) obj}; //# 37: compile-time error
-
-  // Cannot have collision when branch is chosen.
-  const _ = <int>{1, if (true) 1}; //# 38: compile-time error
-  const _ = <int>{if (true) 1, if (true) 1}; //# 39: compile-time error
-}
-
-void testShortCircuit() {
-  // A const expression that throws causes a compile error if it occurs inside
-  // the chosen branch of an if.
-
-  // Store null in a dynamically-typed constant to avoid the type error on "+".
-  const dynamic nil = null;
-
-  // With no else.
-  const _ = [if (true) nil + 1]); //# 40: compile-time error
-
-  // With else.
-  const _ = [if (true) nil + 1 else 1]); //# 41: compile-time error
-  const _ = [if (false) 1 else nil + 1]); //# 42: compile-time error
+  // If cannot be used in a const collection.
+  const _ = [if (true) 1]; //# 00: compile-time error
+  const _ = [if (false) 1 else 2]; //# 01: compile-time error
+  const _ = {if (true) 1}; //# 02: compile-time error
+  const _ = {if (false) 1 else 2}; //# 03: compile-time error
+  const _ = {if (true) 1: 1}; //# 04: compile-time error
+  const _ = {if (false) 1: 1 else 2: 2}; //# 05: compile-time error
 }
diff --git a/tests/language_2/control_flow_collections/if_const_test.dart b/tests/language_2/control_flow_collections/if_const_test.dart
deleted file mode 100644
index 8ccac19..0000000
--- a/tests/language_2/control_flow_collections/if_const_test.dart
+++ /dev/null
@@ -1,262 +0,0 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// SharedOptions=--enable-experiment=set-literals,control-flow-collections,spread-collections
-
-import 'package:expect/expect.dart';
-
-import 'utils.dart';
-
-// Typed as dynamic to also test spreading a value of type dynamic.
-const dynamic list = [1, 2, 3];
-const dynamic map = {1: 1, 2: 2, 3: 3};
-const dynamic set = {1, 2, 3};
-
-const dynamic dynamicTrue = true;
-const Object objectTrue = true;
-
-void main() {
-  testList();
-  testMap();
-  testSet();
-  testShortCircuit();
-  testDuplicateKeys();
-  testKeyOrder();
-}
-
-void testList() {
-  // Then if true.
-  Expect.identical(list, const <int>[1, if (true) 2, 3]);
-
-  // Nothing if false and no else.
-  Expect.identical(list, const <int>[1, if (false) 9, 2, 3]);
-
-  // Else if false.
-  Expect.identical(list, const <int>[1, if (false) 9 else 2, 3]);
-
-  // Only if.
-  Expect.identical(const [1], const <int>[if (true) 1]);
-
-  // If at beginning.
-  Expect.identical(list, const <int>[if (true) 1, 2, 3]);
-
-  // If in middle.
-  Expect.identical(list, const <int>[1, if (true) 2, 3]);
-
-  // If at end.
-  Expect.identical(list, const <int>[1, 2, if (true) 3]);
-
-  // Multiple ifs.
-  Expect.identical(list,
-      const <int>[if (true) 1, if (false) 9, 2, if (true) 3]);
-
-  // Cast condition.
-  Expect.identical(const [1], const <int>[if (dynamicTrue) 1]);
-  Expect.identical(const [1], const <int>[if (objectTrue) 1]);
-
-  // Does not flatten nested collection literal.
-  Expect.identical(const [1], const [if (true) [1]].first;
-  Expect.identical(const {1: 1}, const [if (true) {1: 1}].first;
-  Expect.identical(const {1}, const [if (true) {1}].first;
-
-  // Nested spread.
-  Expect.identical(list,
-      const <int>[if (true) ...<int>[1, 2], if (false) 9 else ...<int>[3]]);
-
-  // Nested if in then.
-  Expect.identical(const [1],
-      const <int>[if (true) if (true) 1, if (true) if (false) 9]);
-
-  // Nested if in else.
-  Expect.identical(const [1], const <int>[if (false) 9 else if (true) 1]);
-
-  // Nested for in then.
-  Expect.identical(list, const <int>[if (true) for (var i in list) i]);
-
-  // Nested for in else.
-  Expect.identical(list, const <int>[if (false) 9 for (var i in list) i]);
-}
-
-void testMap() {
-  // Then if true.
-  Expect.identical(map, const <int, int>{1: 1, if (true) 2: 2, 3: 3});
-
-  // Nothing if false and no else.
-  Expect.identical(map, const <int, int>{1: 1, if (false) 9: 9, 2: 2, 3: 3});
-
-  // Else if false.
-  Expect.identical(map,
-      const <int, int>{1: 1, if (false) 9: 9 else 2: 2, 3: 3});
-
-  // Only if.
-  Expect.identical(const {1: 1}, const <int, int>{if (true) 1: 1});
-
-  // If at beginning.
-  Expect.identical(map, const <int, int>{if (true) 1: 1, 2: 2, 3: 3});
-
-  // If in middle.
-  Expect.identical(map, const <int, int>{1: 1, if (true) 2: 2, 3: 3});
-
-  // If at end.
-  Expect.identical(map, const <int, int>{1: 1, 2: 2, if (true) 3: 3});
-
-  // Multiple ifs.
-  Expect.identical(map,
-      const <int, int>{if (true) 1: 1, if (false) 9: 9, 2: 2, if (true) 3: 3});
-
-  // Cast condition.
-  Expect.identical(const {1: 1}, const <int, int>{if (dynamicTrue) 1: 1});
-  Expect.identical(const {1: 1}, const <int, int>{if (objectTrue) 1: 1});
-
-  // Nested spread.
-  Expect.identical(map, const <int, int>{
-    if (true) ...<int, int>{1: 1, 2: 2},
-    if (false) 9: 9 else ...<int, int>{3: 3}
-  });
-
-  // Nested if in then.
-  Expect.identical(const {1: 1},
-      const <int, int>{if (true) if (true) 1: 1, if (true) if (false) 9: 9});
-
-  // Nested if in else.
-  Expect.identical(const {1: 1},
-      const <int, int>{if (false) 9: 9 else if (true) 1: 1});
-
-  // Nested for in then.
-  Expect.identical(map, const <int, int>{if (true) for (var i in list) i: i});
-
-  // Nested for in else.
-  Expect.identical(map,
-      const <int, int>{if (false) 9: 9 for (var i in list) i: i});
-}
-
-void testSet() {
-  // Then if true.
-  Expect.identical(set, const <int>{1, if (true) 2, 3});
-
-  // Nothing if false and no else.
-  Expect.identical(set, const <int>{1, if (false) 9, 2, 3});
-
-  // Else if false.
-  Expect.identical(set, const <int>{1, if (false) 9 else 2, 3});
-
-  // Only if.
-  Expect.identical({1}, const <int>{if (true) 1});
-
-  // If at beginning.
-  Expect.identical(set, const <int>{if (true) 1, 2, 3});
-
-  // If in middle.
-  Expect.identical(set, const <int>{1, if (true) 2, 3});
-
-  // If at end.
-  Expect.identical(set, const <int>{1, 2, if (true) 3});
-
-  // Multiple ifs.
-  Expect.identical(set,
-      const <int>{if (true) 1, if (false) 9, 2, if (true) 3});
-
-  // Cast condition.
-  Expect.identical(const <int>{1}, const <int>{if (dynamicTrue) 1});
-  Expect.identical(const <int>{1}, const <int>{if (objectTrue) 1});
-
-  // Does not flatten nested collection literal.
-  Expect.identical(const <int>[1], const <int>{if (true) [1]}.first;
-  Expect.identical(const <int, int>{1: 1}, const <int>{if (true) {1: 1}}.first;
-  Expect.identical(const <int>{1}, const <int>{if (true) {1}}.first;
-
-  // Nested spread.
-  Expect.identical(set,
-      const <int>{if (true) ...<int>[1, 2], if (false) 9 else ...<int>[3]});
-
-  // Nested if in then.
-  Expect.identical(const <int>{1},
-      const <int>{if (true) if (true) 1, if (true) if (false) 9});
-
-  // Nested if in else.
-  Expect.identical(const <int>{1}, const <int>{if (false) 9 else if (true) 1});
-
-  // Nested for in then.
-  Expect.identical(set, const <int>{if (true) for (var i in list) i});
-
-  // Nested for in else.
-  Expect.identical(set, const <int>{if (false) 9 for (var i in list) i});
-}
-
-void testShortCircuit() {
-  // A const expression that throws does not cause a compile error if it occurs
-  // inside an unchosen branch of an if.
-
-  // Store null in a dynamically-typed constant to avoid the type error on "+".
-  const dynamic nil = null;
-
-  Expect.identical(const <int>[1],
-      const <int>[if (true) 1, if (false) nil + 1]);
-  Expect.identical(const <int>[1, 2],
-      const <int>[if (true) 1 else nil + 1, if (false) nil + 1 else 2]);
-
-  Expect.identical(const <int, int>{1: 1}, const <int, int>{
-    if (true) 1: 1,
-    if (false) nil + 1: 9,
-    if (false) 9: nil + 1
-  });
-  Expect.identical(const <int, int>{1: 1, 2: 2}, const <int>{
-    if (true) 1: 1 else nil + 1: 9,
-    if (false) 9: nil + 1 else 2: 2
-  });
-
-  Expect.identical(const <int>{1},
-      const <int>{if (true) 1, if (false) nil + 1});
-  Expect.identical(const <int>{1, 2},
-      const <int>{if (true) 1 else nil + 1, if (false) nil + 1 else 2});
-
-  // A const expression whose value isn't the right type does not cause a
-  // compile error if it occurs inside an unchosen branch.
-  const dynamic nonInt = "s";
-
-  Expect.identical(const <int>[1], const <int>[if (true) 1, if (false) nonInt]);
-  Expect.identical(const <int>[1, 2],
-      const <int>[if (true) 1 else nonInt, if (false) nonInt else 2]);
-
-  Expect.identical(const <int>{1: 1}, const <int, int>{
-    if (true) 1: 1,
-    if (false) nonInt: 9,
-    if (false) 9: nonInt
-  });
-  Expect.identical(const <int, int>{1: 1, 2: 2}, const <int, int>{
-    if (true) 1: 1 else nonInt: 9,
-    if (false) 9: nonInt else 2: 2
-  });
-
-  Expect.identical(const <int>{1}, const <int>{if (true) 1, if (false) nonInt};
-  Expect.identical(const <int>{1, 2},
-      const <int>{if (true) 1 else nonInt, if (false) nonInt else 2});
-}
-
-void testDuplicateKeys() {
-  // Duplicate keys from unchosen branches are not an error.
-  Expect.mapEquals(map, <int, int>{
-    1: 1,
-    if (false) 1: 1,
-    if (true) 2: 2 else 3: 3,
-    3: 3
-  });
-
-  Expect.setEquals(set, const <int>{1, if (false) 1, if (true) 2 else 3, 3});
-}
-
-void testKeyOrder() {
-  // Canonicalization isn't affected by which elements are conditional.
-  Expect.identical(map,
-      const <int, int>{1: 1, if (true) 2: 2, if (false) 9: 9, 3: 3});
-  Expect.identical(map,
-      const <int, int>{if (false) 9: 9 else 1: 1, 2: 2, if (true) 3: 3});
-
-  Expect.identical(set, const <int>{1, if (true) 2, if (false) 9, 3});
-  Expect.identical(set, const <int>{if (false) 9 else 1, 2, if (true) 3});
-
-  // Ordering does affect canonicalization.
-  Expect.notIdentical(map, const <int, int>{1: 1, if (true) 3: 3, 2: 2});
-  Expect.notIdentical(set, const <int>{1, if (true) 3, 2});
-}
diff --git a/tests/language_2/control_flow_collections/if_inference_test.dart b/tests/language_2/control_flow_collections/if_inference_test.dart
index adc6e65..0c73618 100644
--- a/tests/language_2/control_flow_collections/if_inference_test.dart
+++ b/tests/language_2/control_flow_collections/if_inference_test.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.
 
-// SharedOptions=--enable-experiment=set-literals,control-flow-collections,spread-collections
+// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
 
 // Test how control flow interacts with inference.
 import 'package:expect/expect.dart';
diff --git a/tests/language_2/control_flow_collections/if_null_condition_test.dart b/tests/language_2/control_flow_collections/if_null_condition_test.dart
new file mode 100644
index 0000000..c5a1e96
--- /dev/null
+++ b/tests/language_2/control_flow_collections/if_null_condition_test.dart
@@ -0,0 +1,14 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=control-flow-collections
+
+import 'package:expect/expect.dart';
+
+void main() {
+  bool nullBool = null;
+  Expect.throwsAssertionError(() => <int>[if (nullBool) 1]);
+  Expect.throwsAssertionError(() => <int, int>{if (nullBool) 1: 1});
+  Expect.throwsAssertionError(() => <int>{if (nullBool) 1});
+}
diff --git a/tests/language_2/control_flow_collections/if_promotion_test.dart b/tests/language_2/control_flow_collections/if_promotion_test.dart
new file mode 100644
index 0000000..5622a47
--- /dev/null
+++ b/tests/language_2/control_flow_collections/if_promotion_test.dart
@@ -0,0 +1,57 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=control-flow-collections
+
+class A {
+  var a = "a";
+}
+
+class B extends A {
+  var b = "b";
+}
+
+class C extends B {
+  var c = "c";
+}
+
+void main() {
+  A a = A();
+  print(a.a);
+  print(a.b); //# 01: compile-time error
+
+  var list = [
+    a.a,
+    a.b, //# 02: compile-time error
+    a.c, //# 03: compile-time error
+
+    if (a is B) [
+      a.a,
+      a.b,
+      a.c, //# 04: compile-time error
+
+      if (a is C) [
+        a.a,
+        a.b,
+        a.c,
+      ] else [
+        a.a,
+        a.b,
+        a.c, //# 05: compile-time error
+      ],
+
+      a.a,
+      a.b,
+      a.c, //# 06: compile-time error
+    ] else [
+      a.a,
+      a.b, //# 07: compile-time error
+      a.c, //# 08: compile-time error
+    ],
+
+    a.a,
+    a.b, //# 09: compile-time error
+    a.c, //# 10: compile-time error
+  ];
+}
diff --git a/tests/language_2/control_flow_collections/if_runtime_error_test.dart b/tests/language_2/control_flow_collections/if_runtime_error_test.dart
new file mode 100644
index 0000000..8e48bea
--- /dev/null
+++ b/tests/language_2/control_flow_collections/if_runtime_error_test.dart
@@ -0,0 +1,14 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
+
+import 'package:expect/expect.dart';
+
+void main() {
+  dynamic nonBool = 3;
+  Expect.throwsTypeError(() => <int>[if (nonBool) 1]);
+  Expect.throwsTypeError(() => <int, int>{if (nonBool) 1: 1});
+  Expect.throwsTypeError(() => <int>{if (nonBool) 1});
+}
diff --git a/tests/language_2/control_flow_collections/if_test.dart b/tests/language_2/control_flow_collections/if_test.dart
index 8aa7ba5..c835dd6 100644
--- a/tests/language_2/control_flow_collections/if_test.dart
+++ b/tests/language_2/control_flow_collections/if_test.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.
 
-// SharedOptions=--enable-experiment=set-literals,control-flow-collections,spread-collections
+// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
 
 import 'package:expect/expect.dart';
 
@@ -19,7 +19,6 @@
   testShortCircuit();
   testDuplicateKeys();
   testKeyOrder();
-  testRuntimeFailures();
 }
 
 void testList() {
@@ -53,9 +52,9 @@
   Expect.listEquals(<int>[1], <int>[if (true as Object) 1]);
 
   // Does not flatten nested collection literal.
-  Expect.listEquals([1], [if (true) [1]].first;
-  Expect.mapEquals({1: 1}, [if (true) {1: 1}].first;
-  Expect.setEquals({1}, [if (true) {1}].first;
+  Expect.listEquals([1], [if (true) [1]].first);
+  Expect.mapEquals({1: 1}, [if (true) {1: 1}].first);
+  Expect.setEquals({1}, [if (true) {1}].first);
 
   // Nested spread.
   Expect.listEquals(list,
@@ -71,7 +70,7 @@
   Expect.listEquals(list, <int>[if (true) for (var i in list) i]);
 
   // Nested for in else.
-  Expect.listEquals(list, <int>[if (false) 9 for (var i in list) i]);
+  Expect.listEquals(list, <int>[if (false) 9 else for (var i in list) i]);
 }
 
 void testMap() {
@@ -122,7 +121,7 @@
   Expect.mapEquals(map, <int, int>{if (true) for (var i in list) i: i});
 
   // Nested for in else.
-  Expect.mapEquals(map, <int, int>{if (false) 9: 9 for (var i in list) i: i});
+  Expect.mapEquals(map, <int, int>{if (false) 9: 9 else for (var i in list) i: i});
 }
 
 void testSet() {
@@ -156,9 +155,9 @@
   Expect.setEquals({1}, <int>{if (true as Object) 1});
 
   // Does not flatten nested collection literal.
-  Expect.listEquals([1], {if (true) [1]}.first;
-  Expect.mapEquals({1: 1}, {if (true) {1: 1}}.first;
-  Expect.setEquals({1}, {if (true) {1}}.first;
+  Expect.listEquals([1], {if (true) [1]}.first);
+  Expect.mapEquals({1: 1}, {if (true) {1: 1}}.first);
+  Expect.setEquals({1}, {if (true) {1}}.first);
 
   // Nested spread.
   Expect.setEquals(set,
@@ -174,7 +173,7 @@
   Expect.setEquals(set, <int>{if (true) for (var i in list) i});
 
   // Nested for in else.
-  Expect.setEquals(set, <int>{if (false) 9 for (var i in list) i});
+  Expect.setEquals(set, <int>{if (false) 9 else for (var i in list) i});
 }
 
 void testShortCircuit() {
@@ -229,15 +228,3 @@
   };
   Expect.equals("1:a,2:a", set.join(","));
 }
-
-void testRuntimeFailures() {
-  dynamic nonBool = 3;
-  Expect.throwsCastError(() => <int>[if (nonBool) 1]);
-  Expect.throwsCastError(() => <int, int>{if (nonBool) 1: 1});
-  Expect.throwsCastError(() => <int>{if (nonBool) 1});
-
-  bool nullBool = null;
-  Expect.throwsAssertionError(() => <int>[if (nullBool) 1]);
-  Expect.throwsAssertionError(() => <int, int>{if (nullBool) 1: 1});
-  Expect.throwsAssertionError(() => <int>{if (nullBool) 1});
-}
diff --git a/tests/language_2/control_flow_collections/map_set_ambiguity_error_test.dart b/tests/language_2/control_flow_collections/map_set_ambiguity_error_test.dart
index 5296956..452ac9b 100644
--- a/tests/language_2/control_flow_collections/map_set_ambiguity_error_test.dart
+++ b/tests/language_2/control_flow_collections/map_set_ambiguity_error_test.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.
 
-// SharedOptions=--enable-experiment=set-literals,control-flow-collections,spread-collections
+// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
 
 // Test cases where the syntax is ambiguous between maps and sets when control
 // flow elements contain spreads.
diff --git a/tests/language_2/control_flow_collections/map_set_ambiguity_test.dart b/tests/language_2/control_flow_collections/map_set_ambiguity_test.dart
index abd6f58..6ce77de 100644
--- a/tests/language_2/control_flow_collections/map_set_ambiguity_test.dart
+++ b/tests/language_2/control_flow_collections/map_set_ambiguity_test.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.
 
-// SharedOptions=--enable-experiment=set-literals,control-flow-collections,spread-collections
+// SharedOptions=--enable-experiment=control-flow-collections,spread-collections
 
 // Test cases where the syntax is ambiguous between maps and sets because of
 // spreads inside control flow.
@@ -18,7 +18,8 @@
 void testBottomUpInference() {
   Map<int, int> map = {};
   Set<int> set = Set();
-  dynamic dyn = map;
+  dynamic dynMap = map;
+  dynamic dynSet = set;
   Iterable<int> iterable = [];
   CustomSet customSet = CustomSet();
   CustomMap customMap = CustomMap();
@@ -30,25 +31,25 @@
   // expect___Of<...>({if (true) ...dyn});
   expectSetOf<int>({if (true) ...iterable});
   expectSetOf<int>({if (true) ...customSet});
-  expectMapOf<int, int>({if (true) ...customMap});
+  expectMapOf<int, String>({if (true) ...customMap});
 
   expectMapOf<int, int>({if (true) ...map else ...map});
   // expect___Of<...>({if (true) ...map else ...set});
-  expectMapOf<dynamic, dynamic>({if (true) ...map else ...dyn});
+  expectMapOf<dynamic, dynamic>({if (true) ...map else ...dynMap});
   // expect___Of<...>({if (true) ...map else ...iterable});
   // expect___Of<...>({if (true) ...map else ...customSet});
-  expectMapOf<int, int>({if (true) ...map else ...customMap});
+  expectMapOf<int, Object>({if (true) ...map else ...customMap});
 
   expectSetOf<int>({if (true) ...set else ...set});
-  expectSetOf<dynamic>({if (true) ...set else ...dyn});
+  expectSetOf<dynamic>({if (true) ...set else ...dynSet});
   expectSetOf<int>({if (true) ...set else ...iterable});
   expectSetOf<int>({if (true) ...set else ...customSet});
   // expect___Of<...>({if (true) ...set else ...customMap});
 
   // expect___Of<...>({if (true) ...dyn else ...dyn});
-  expectSetOf<dynamic>({if (true) ...dyn else ...iterable});
-  expectSetOf<dynamic>({if (true) ...dyn else ...customSet});
-  expectMapOf<dynamic, dynamic>({if (true) ...dyn else ...customMap});
+  expectSetOf<dynamic>({if (true) ...dynSet else ...iterable});
+  expectSetOf<dynamic>({if (true) ...dynSet else ...customSet});
+  expectMapOf<dynamic, dynamic>({if (true) ...dynMap else ...customMap});
 
   expectSetOf<int>({if (true) ...iterable else ...iterable});
   expectSetOf<int>({if (true) ...iterable else ...customSet});
@@ -57,7 +58,7 @@
   expectSetOf<int>({if (true) ...customSet else ...customSet});
   // expect___Of<...>({if (true) ...customSet else ...customMap});
 
-  expectMapOf<int, int>({if (true) ...customMap else ...customMap});
+  expectMapOf<int, String>({if (true) ...customMap else ...customMap});
 
   // Note: The commented out cases are the error cases. They are shown here for
   // completeness and tested in map_set_ambiguity_error_test.dart.
@@ -66,30 +67,30 @@
   // expect___Of<...>({for (; false;) ...dyn});
   expectSetOf<int>({for (; false;) ...iterable});
   expectSetOf<int>({for (; false;) ...customSet});
-  expectMapOf<int, int>({for (; false;) ...customMap});
+  expectMapOf<int, String>({for (; false;) ...customMap});
 
   expectMapOf<int, int>({for (; false;) ...map, for (; false;) ...map});
   // expect___Of<...>({for (; false;) ...map, for (; false;) ...set});
   expectMapOf<dynamic, dynamic>(
-      {for (; false;) ...map, for (; false;) ...dyn});
+      {for (; false;) ...map, for (; false;) ...dynMap});
   // expect___Of<...>({for (; false;) ...map, for (; false;) ...iterable});
   // expect___Of<...>({for (; false;) ...map, for (; false;) ...customSet});
-  expectMapOf<int, int>(
+  expectMapOf<int, Object>(
       {for (; false;) ...map, for (; false;) ...customMap});
 
   expectSetOf<int>({for (; false;) ...set, for (; false;) ...set});
-  expectSetOf<dynamic>({for (; false;) ...set, for (; false;) ...dyn});
+  expectSetOf<dynamic>({for (; false;) ...set, for (; false;) ...dynSet});
   expectSetOf<int>({for (; false;) ...set, for (; false;) ...iterable});
   expectSetOf<int>({for (; false;) ...set, for (; false;) ...customSet});
   // expect___Of<...>({for (; false;) ...set, for (; false;) ...customMap});
 
   // expect___Of<...>({for (; false;) ...dyn, for (; false;) ...dyn});
   expectSetOf<dynamic>(
-      {for (; false;) ...dyn, for (; false;) ...iterable});
+      {for (; false;) ...dynSet, for (; false;) ...iterable});
   expectSetOf<dynamic>(
-      {for (; false;) ...dyn, for (; false;) ...customSet});
+      {for (; false;) ...dynSet, for (; false;) ...customSet});
   expectMapOf<dynamic, dynamic>(
-      {for (; false;) ...dyn, for (; false;) ...customMap});
+      {for (; false;) ...dynMap, for (; false;) ...customMap});
 
   expectSetOf<int>(
       {for (; false;) ...iterable, for (; false;) ...iterable});
@@ -103,7 +104,7 @@
   // expect___Of<...>(
   //     {for (; false;) ...customSet, for (; false;) ...customMap});
 
-  expectMapOf<int, int>(
+  expectMapOf<int, String>(
       {for (; false;) ...customMap, for (; false;) ...customMap});
 }
 
diff --git a/tests/language_2/control_flow_collections/syntax_error_test.dart b/tests/language_2/control_flow_collections/syntax_error_test.dart
index 6e070df..e0f0ba8 100644
--- a/tests/language_2/control_flow_collections/syntax_error_test.dart
+++ b/tests/language_2/control_flow_collections/syntax_error_test.dart
@@ -6,33 +6,33 @@
 
 void main() {
   // No then element.
-  var _ = [if (true)]; //# 00: compile-time error
+  var _ = [if (true)]; //# 00: syntax error
 
   // No then element with else.
-  var _ = [if (true) else 0]; //# 01: compile-time error
+  var _ = [if (true) else 0]; //# 01: syntax error
 
   // No else element.
-  var _ = [if (true) 0 else]; //# 02: compile-time error
+  var _ = [if (true) 0 else]; //# 02: syntax error
 
   // Spread if.
-  var _ = [...if (true) 0]; //# 03: compile-time error
+  var _ = [...if (true) 0]; //# 03: syntax error
 
   // Spread for.
-  var _ = [...for (; false;) 0]; //# 04: compile-time error
+  var _ = [...for (; false;) 0]; //# 04: syntax error
 
   // Use if in map entry.
-  var _ = {if (true) 1: 1: 2}; //# 05: compile-time error
-  var _ = {1: if (true) 2: 2}; //# 06: compile-time error
+  var _ = {if (true) 1: 1: 2}; //# 05: syntax error
+  var _ = {1: if (true) 2: 2}; //# 06: syntax error
 
   // Use for in map entry.
-  var _ = {for (; false;) 1: 1: 2}; //# 07: compile-time error
-  var _ = {1: for (; false;) 2: 2}; //# 08: compile-time error
+  var _ = {for (; false;) 1: 1: 2}; //# 07: syntax error
+  var _ = {1: for (; false;) 2: 2}; //# 08: syntax error
 
   // Use for variable out of scope.
   var _ = [for (var i = 0; false;) 1, i]; //# 09: compile-time error
 
   // Use for-in variable out of scope.
-  var _ = [for (var i in [1]; false;) 1, i]; //# 10: compile-time error
+  var _ = [for (var i in [1]; false;) 1, i]; //# 10: syntax error
 
   // Use for variable in own initializer.
   var _ = [for (var i = i; false;) 1]; //# 11: compile-time error
diff --git a/tests/language_2/control_flow_collections/syntax_test.dart b/tests/language_2/control_flow_collections/syntax_test.dart
index 48206cd2..0810aec 100644
--- a/tests/language_2/control_flow_collections/syntax_test.dart
+++ b/tests/language_2/control_flow_collections/syntax_test.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.
 
-// SharedOptions=--enable-experiment=set-literals,control-flow-collections
+// SharedOptions=--enable-experiment=control-flow-collections
 
 // Tests syntax edge cases.
 import 'package:expect/expect.dart';
@@ -24,9 +24,9 @@
   Expect.setEquals({1}, {1, for (; false;) 2,});
 
   // Dangling else.
-  Expect.listEquals([1], [if (true) if (false) else 1]);
-  Expect.listEquals([1], [if (true) if (false) else 1 else 2]);
-  Expect.listEquals([2], [if (false) if (false) else 1 else 2]);
+  Expect.listEquals([1], [if (true) if (false) 0 else 1]);
+  Expect.listEquals([1], [if (true) if (false) 0 else 1 else 2]);
+  Expect.listEquals([2], [if (false) if (false) 0 else 1 else 2]);
 
   // Precedence of then.
   Expect.listEquals([1, 2, 3], [1, if (true) true ? 2 : 0, 3]);
@@ -35,12 +35,12 @@
 
   // Precedence of else.
   Expect.listEquals([1, 2, 3], [1, if (false) 0 else true ? 2 : 0, 3]);
-  var a = 0;
+  a = 0;
   Expect.listEquals([1, 2, 3], [1, if (false) 0 else a = 2, 3]);
 
   // Precedence of for.
   Expect.listEquals([1, 2, 3],
       [1, for (var i = 0; i < 1; i++) true ? 2 : 0, 3]);
-  var a = 0;
+  a = 0;
   Expect.listEquals([1, 2, 3], [1, for (var i = 0; i < 1; i++) a = 2, 3]);
 }
diff --git a/tests/language_2/control_flow_collections/type_error_test.dart b/tests/language_2/control_flow_collections/type_error_test.dart
index ace6588..91e0ebb 100644
--- a/tests/language_2/control_flow_collections/type_error_test.dart
+++ b/tests/language_2/control_flow_collections/type_error_test.dart
@@ -2,47 +2,51 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// SharedOptions=--enable-experiment=set-literals,control-flow-collections
+// SharedOptions=--enable-experiment=control-flow-collections
 
 void main() {
-  Object obj = true;
-
   // Non-Boolean if condition.
   var _ = <int>[if (1) 2]; //# 00: compile-time error
   var _ = <int, int>{if (1) 2: 2}; //# 01: compile-time error
   var _ = <int>{if (1) 2}; //# 02: compile-time error
 
   // Wrong then element type.
-  var _ = <int>[if (true) "s"]; //# 06: compile-time error
-  var _ = <int, int>{if (true) "s": 1}; //# 07: compile-time error
-  var _ = <int, int>{if (true) 1: "s"}; //# 08: compile-time error
-  var _ = <int>{if (true) "s"}; //# 09: compile-time error
+  var _ = <int>[if (true) "s"]; //# 04: compile-time error
+  var _ = <int, int>{if (true) "s": 1}; //# 05: compile-time error
+  var _ = <int, int>{if (true) 1: "s"}; //# 06: compile-time error
+  var _ = <int>{if (true) "s"}; //# 07: compile-time error
 
   // Wrong else element type.
-  var _ = <int>[if (false) 1 else "s"]; //# 10: compile-time error
-  var _ = <int, int>{if (false) 1: 1 else "s": 2}; //# 11: compile-time error
-  var _ = <int, int>{if (false) 1: 1 else 2: "s"}; //# 12: compile-time error
-  var _ = <int>{if (false) 1 else "s"}; //# 13: compile-time error
+  var _ = <int>[if (false) 1 else "s"]; //# 08: compile-time error
+  var _ = <int, int>{if (false) 1: 1 else "s": 2}; //# 09: compile-time error
+  var _ = <int, int>{if (false) 1: 1 else 2: "s"}; //# 10: compile-time error
+  var _ = <int>{if (false) 1 else "s"}; //# 11: compile-time error
 
   // Non-Boolean for condition.
-  var _ = <int>[for (; 1;) 2]; //# 14: compile-time error
-  var _ = <int, int>{for (; 1;) 2: 2}; //# 15: compile-time error
-  var _ = <int>{for (; 1;) 2}; //# 16: compile-time error
+  var _ = <int>[for (; 1;) 2]; //# 12: compile-time error
+  var _ = <int, int>{for (; 1;) 2: 2}; //# 13: compile-time error
+  var _ = <int>{for (; 1;) 2}; //# 14: compile-time error
 
   // Wrong for-in element type.
   List<String> s = ["s"];
-  var _ = <int>[for (int i in s) 1]; //# 20: compile-time error
-  var _ = <int, int>[for (int i in s) 1: 1]; //# 21: compile-time error
-  var _ = <int>{for (int i in s) 1}; //# 22: compile-time error
+  var _ = <int>[for (int i in s) 1]; //# 15: compile-time error
+  var _ = <int, int>{for (int i in s) 1: 1}; //# 16: compile-time error
+  var _ = <int>{for (int i in s) 1}; //# 17: compile-time error
 
   // Wrong for declaration element type.
-  var _ = <int>[for (int i = "s";;) 1]; //# 23: compile-time error
-  var _ = <int, int>[for (int i = "s";;) 1: 1]; //# 24: compile-time error
-  var _ = <int>{for (int i = "s";;) 1}; //# 25: compile-time error
+  var _ = <int>[for (int i = "s"; false;) 1]; //# 18: compile-time error
+  var _ = <int, int>{for (int i = "s"; false;) 1: 1}; //# 19: compile-time error
+  var _ = <int>{for (int i = "s"; false;) 1}; //# 20: compile-time error
 
   // Wrong for body element type.
-  var _ = <int>[for (; false;) "s"]; //# 26: compile-time error
-  var _ = <int, int>{for (; false;) "s": 1}; //# 27: compile-time error
-  var _ = <int, int>{for (; false;) 1: "s"}; //# 28: compile-time error
-  var _ = <int>{for (; false;) "s"}; //# 29: compile-time error
+  var _ = <int>[for (; false;) "s"]; //# 21: compile-time error
+  var _ = <int, int>{for (; false;) "s": 1}; //# 22: compile-time error
+  var _ = <int, int>{for (; false;) 1: "s"}; //# 23: compile-time error
+  var _ = <int>{for (; false;) "s"}; //# 24: compile-time error
+
+  // Non-iterable sequence type.
+  int nonIterable = 3;
+  var _ = <int>[for (int i in nonIterable) 1]; //# 25: compile-time error
+  var _ = <int, int>{for (int i in nonIterable) 1: 1}; //# 26: compile-time error
+  var _ = <int>{for (int i in nonIterable) 1}; //# 27: compile-time error
 }
diff --git a/tests/language_2/control_flow_collections/utils.dart b/tests/language_2/control_flow_collections/utils.dart
index 9684b3d..e2d6ade 100644
--- a/tests/language_2/control_flow_collections/utils.dart
+++ b/tests/language_2/control_flow_collections/utils.dart
@@ -34,27 +34,37 @@
 }
 
 T expectDynamic<T>(dynamic value) {
-  Expect.identical(dynamic, T);
+  Expect.equals(dynamic, T);
   return value;
 }
 
 T expectInt<T>(dynamic value) {
-  Expect.identical(int, T);
+  Expect.equals(int, T);
   return value;
 }
 
 T expectString<T>(dynamic value) {
-  Expect.identical(String, T);
+  Expect.equals(String, T);
+  return value;
+}
+
+Iterable<T> expectIntIterable<T>(dynamic value) {
+  Expect.equals(int, T);
   return value;
 }
 
 Set<T> expectIntSet<T>() {
-  Expect.identical(int, T);
+  Expect.equals(int, T);
   return Set();
 }
 
+Stream<T> expectIntStream<T>(dynamic elements) {
+  Expect.equals(int, T);
+  return Stream<T>.fromIterable(elements);
+}
+
 Set<T> expectDynamicSet<T>() {
-  Expect.identical(dynamic, T);
+  Expect.equals(dynamic, T);
   return Set();
 }
 
diff --git a/tests/language_2/covariant_return_type_test.dart b/tests/language_2/covariant_return_type_test.dart
new file mode 100644
index 0000000..121c3bb
--- /dev/null
+++ b/tests/language_2/covariant_return_type_test.dart
@@ -0,0 +1,59 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:expect/expect.dart';
+
+void main() {
+  Expect.throwsTypeError(() {
+    List<int> l = [1, 2, 3].where((x) => x.isEven).map((x) => x + 1);
+  }, 'Iterable<int> should fail implicit cast to List<int>');
+
+  Iterable<int> l = [1, 2, 3].where((x) => x.isEven).map((x) => x + 1);
+  Expect.isFalse(l is List<int>, 'Iterable<int> is not a subtype of List<int>');
+
+  C<Object> c = C<Object>(1);
+  Iterable<bool Function(Object)> myList = c.f(); // works
+
+  Expect.throwsTypeError(() {
+    C<Object> c = C<Object>(1);
+    List<bool Function(Object)> myList = c.f();
+  }, "f() returns an Iterable, not a List");
+
+  Expect.throwsTypeError(() {
+    C<Object> c = C<int>(1);
+    List<bool Function(Object)> myList = c.f();
+  }, "f() returns an Iterable, not a List");
+
+  Expect.throwsTypeError(() {
+    C<Object> c = C<int>(1);
+    Iterable<bool Function(Object)> myList = c.f();
+  }, "f() returns functions accepting int, not Object");
+
+  {
+    C<Iterable<Object>> c = D<Object>([1]);
+    Iterable<bool Function(Iterable<Object>)> myList = c.f();
+  }
+
+  Expect.throwsTypeError(() {
+    C<Iterable<Object>> c = D<Object>([1]);
+    List<bool Function(Iterable<Object>)> myList = c.f();
+  }, "D.f() returns an Iterable, not a List");
+
+  Expect.throwsTypeError(() {
+    C<Iterable<Object>> c = D<int>([1]);
+    Iterable<bool Function(Iterable<Object>)> myList = c.f();
+  }, "D.f() returns functions accepting Iterable<int>, not Iterable<Object>");
+}
+
+class C<T> {
+  final T t;
+  C(this.t);
+  Iterable<bool Function(T)> f() sync* {
+    yield (T x) => x == t;
+  }
+}
+
+class D<S> extends C<Iterable<S>> {
+  D(Iterable<S> s) : super(s);
+}
diff --git a/tests/language_2/dead_field_access_test.dart b/tests/language_2/dead_field_access_test.dart
index e3fc11b..cacaa34 100644
--- a/tests/language_2/dead_field_access_test.dart
+++ b/tests/language_2/dead_field_access_test.dart
@@ -8,7 +8,7 @@
   var field = 10;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 getField(x) {
   x.field;
   return 34;
diff --git a/tests/language_2/emit_const_fields_test.dart b/tests/language_2/emit_const_fields_test.dart
index 1a3d7a5..8264c50 100644
--- a/tests/language_2/emit_const_fields_test.dart
+++ b/tests/language_2/emit_const_fields_test.dart
@@ -17,5 +17,5 @@
 
 main() {
   Expect.isTrue(42 == Guide.LTUAE);
-  Expect.isTrue("1978-03-08" == Guide.EARTH["Status"][1]);
+  Expect.isTrue("1978-03-08" == (Guide.EARTH["Status"] as List)[1]);
 }
diff --git a/tests/language_2/factory3_test.dart b/tests/language_2/factory3_test.dart
index ad7f97c..fe15ad9 100644
--- a/tests/language_2/factory3_test.dart
+++ b/tests/language_2/factory3_test.dart
@@ -1,7 +1,6 @@
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--enable_checked_mode
 
 import "dart:collection";
 
diff --git a/tests/language_2/factory_with_type_parameters_test.dart b/tests/language_2/factory_with_type_parameters_test.dart
index 5ebba7d..e0c1583 100644
--- a/tests/language_2/factory_with_type_parameters_test.dart
+++ b/tests/language_2/factory_with_type_parameters_test.dart
@@ -6,18 +6,18 @@
   Foo._();
 
   factory Foo
-             <X> //# 01: compile-time error
-             <X extends T> //# 02: compile-time error
+             <X> //# 01: syntax error
+             <X extends T> //# 02: syntax error
              () => new Bar<T>();
 
   factory Foo
-             <X> //# 03: compile-time error
-             <X extends T> //# 04: compile-time error
+             <X> //# 03: syntax error
+             <X extends T> //# 04: syntax error
              .far
-                 <X> //# 05: compile-time error
-                 <X extends T> //# 06: compile-time error
-                 <X>.fip //# 07: compile-time error
-                 <X extends T>.fip //# 08: compile-time error
+                 <X> //# 05: syntax error
+                 <X extends T> //# 06: syntax error
+                 <X>.fip //# 07: syntax error
+                 <X extends T>.fip //# 08: syntax error
                  () => new Bar<T>();
 }
 
diff --git a/tests/language_2/field_increment_bailout_test.dart b/tests/language_2/field_increment_bailout_test.dart
index cddb38c..1ee4e5a 100644
--- a/tests/language_2/field_increment_bailout_test.dart
+++ b/tests/language_2/field_increment_bailout_test.dart
@@ -45,8 +45,8 @@
 }
 
 // Use confuse to defeat type inferencing.
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(x) {
   return x;
 }
diff --git a/tests/language_2/field_wierd_name_test.dart b/tests/language_2/field_wierd_name_test.dart
index bb0ca00..d76eaa8 100644
--- a/tests/language_2/field_wierd_name_test.dart
+++ b/tests/language_2/field_wierd_name_test.dart
@@ -41,7 +41,7 @@
   var f50 = ++ii, f51 = ++ii, f52 = ++ii, f53 = ++ii, f54 = ++ii;
   var f55 = ++ii, f56 = ++ii, f57 = ++ii, f58 = ++ii, f59 = ++ii;
 
-  @NoInline()
+  @pragma('dart2js:noInline')
   Thing(this._, this.$_);
   toString() {
     if (depth > 0) return 'recursion!';
diff --git a/tests/language_2/function_call_generic_test.dart b/tests/language_2/function_call_generic_test.dart
index db40488..3653c7a 100644
--- a/tests/language_2/function_call_generic_test.dart
+++ b/tests/language_2/function_call_generic_test.dart
@@ -5,14 +5,14 @@
 
 import "package:expect/expect.dart";
 
-@NoInline()
+@pragma('dart2js:noInline')
 List staticFn<T>([T a1, T a2, T a3, T a4, T a5]) => [T, a1, a2, a3, a4, a5];
 
 class C {
-  @NoInline()
+  @pragma('dart2js:noInline')
   List memberFn<T>([T a1, T a2, T a3, T a4, T a5]) => [T, a1, a2, a3, a4, a5];
 
-  @NoInline()
+  @pragma('dart2js:noInline')
   // 'map' is implemented by native iterables. On dart2js, 'map' has interceptor
   // calling convention.
   List map<T>([T a1, T a2, T a3, T a4, T a5]) => [T, a1, a2, a3, a4, a5];
diff --git a/tests/language_2/function_propagation_test.dart b/tests/language_2/function_propagation_test.dart
index 83e37d6..9c6f7e6 100644
--- a/tests/language_2/function_propagation_test.dart
+++ b/tests/language_2/function_propagation_test.dart
@@ -12,14 +12,12 @@
 
 main() {
   var a = new A();
-  Expect.isFalse(a is A);
-
-  var a2 = new A();
-  Expect.isFalse(a is F);
+  Expect.type<A>(a);
+  Expect.notType<F>(a);
 
   Function a3 = new A();
-  Expect.isFalse(a3 is A);
+  Expect.notType<A>(a3);
 
   F a4 = new A();
-  Expect.isFalse(a4 is A);
+  Expect.notType<A>(a4);
 }
diff --git a/tests/language_2/function_subtype_inline2_test.dart b/tests/language_2/function_subtype_inline2_test.dart
index 3a67be1..147bd4a 100644
--- a/tests/language_2/function_subtype_inline2_test.dart
+++ b/tests/language_2/function_subtype_inline2_test.dart
@@ -27,8 +27,8 @@
 
 int m1() => null;
 String m2() => null;
-m3() => null;
-m4(int i) => null;
+Null m3() => null;
+Null m4(int i) => null;
 
 main() {
   test((m) => new C.c1(m), 'c1');
diff --git a/tests/language_2/function_subtype_typearg5_test.dart b/tests/language_2/function_subtype_typearg5_test.dart
index 018d592..bd6e2bd 100644
--- a/tests/language_2/function_subtype_typearg5_test.dart
+++ b/tests/language_2/function_subtype_typearg5_test.dart
@@ -13,8 +13,8 @@
 
 typedef Set<A> FS<A>(Set<A> arg1, Set<A> arg2);
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 dyn(x) => x;
 
 class CheckEnv<X, Y> {
diff --git a/tests/language_2/function_type/function_type0_test.dart b/tests/language_2/function_type/function_type0_test.dart
index f01e020..9bcf990 100644
--- a/tests/language_2/function_type/function_type0_test.dart
+++ b/tests/language_2/function_type/function_type0_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(int x);
@@ -243,8 +243,8 @@
     }
 
     Expect.isTrue(m2 is F2<T>);
-    Expect
-        .isTrue(m2 is core.List<core.int> Function(int y, {List<Function> x}));
+    Expect.isTrue(
+        m2 is core.List<core.int> Function(int y, {List<Function> x}));
     Expect.isTrue(confuse(m2) is F2<T>);
     // In checked mode, verifies the type.
     x2 = m2;
@@ -486,8 +486,8 @@
     }
 
     Expect.isTrue(m11 is F11<T>);
-    Expect
-        .isTrue(m11 is List<Function> Function(int y, [List<T> x]) Function());
+    Expect.isTrue(
+        m11 is List<Function> Function(int y, [List<T> x]) Function());
     Expect.isTrue(confuse(m11) is F11<T>);
     // In checked mode, verifies the type.
     x11 = m11;
@@ -536,8 +536,8 @@
     }
 
     Expect.isTrue(m12 is F12<T>);
-    Expect
-        .isTrue(m12 is core.List<core.int> Function([Function x1]) Function());
+    Expect.isTrue(
+        m12 is core.List<core.int> Function([Function x1]) Function());
     Expect.isTrue(confuse(m12) is F12<T>);
     // In checked mode, verifies the type.
     x12 = m12;
diff --git a/tests/language_2/function_type/function_type10_test.dart b/tests/language_2/function_type/function_type10_test.dart
index 692f44a..9ec7737 100644
--- a/tests/language_2/function_type/function_type10_test.dart
+++ b/tests/language_2/function_type/function_type10_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(int y, {int x});
@@ -339,8 +339,8 @@
     }
 
     Expect.isTrue(m5 is F5<T>);
-    Expect
-        .isTrue(m5 is int Function(Function x) Function<B extends core.int>());
+    Expect.isTrue(
+        m5 is int Function(Function x) Function<B extends core.int>());
     Expect.isTrue(confuse(m5) is F5<T>);
     // In checked mode, verifies the type.
     x5 = m5;
diff --git a/tests/language_2/function_type/function_type11_test.dart b/tests/language_2/function_type/function_type11_test.dart
index 7a8216c..202a918 100644
--- a/tests/language_2/function_type/function_type11_test.dart
+++ b/tests/language_2/function_type/function_type11_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(Function x);
@@ -430,8 +430,8 @@
     }
 
     Expect.isTrue(m9 is F9<T>);
-    Expect
-        .isTrue(m9 is Function Function() Function<B extends core.int>(int x));
+    Expect.isTrue(
+        m9 is Function Function() Function<B extends core.int>(int x));
     Expect.isTrue(confuse(m9) is F9<T>);
     // In checked mode, verifies the type.
     x9 = m9;
@@ -914,8 +914,8 @@
     }
 
     Expect.isTrue(m23 is F23<T>);
-    Expect
-        .isTrue(m23 is void Function<A>() Function<B extends core.int>(int x));
+    Expect.isTrue(
+        m23 is void Function<A>() Function<B extends core.int>(int x));
     Expect.isTrue(confuse(m23) is F23<T>);
     // In checked mode, verifies the type.
     x23 = m23;
diff --git a/tests/language_2/function_type/function_type12_test.dart b/tests/language_2/function_type/function_type12_test.dart
index 2973ab9..c5eecf5 100644
--- a/tests/language_2/function_type/function_type12_test.dart
+++ b/tests/language_2/function_type/function_type12_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function([Function x]);
@@ -411,8 +411,8 @@
     }
 
     Expect.isTrue(m8 is F8<T>);
-    Expect
-        .isTrue(m8 is Function Function(int x0, {List<Function> x}) Function());
+    Expect.isTrue(
+        m8 is Function Function(int x0, {List<Function> x}) Function());
     Expect.isTrue(confuse(m8) is F8<T>);
     // In checked mode, verifies the type.
     x8 = m8;
diff --git a/tests/language_2/function_type/function_type13_test.dart b/tests/language_2/function_type/function_type13_test.dart
index c35cbcd..e97c219 100644
--- a/tests/language_2/function_type/function_type13_test.dart
+++ b/tests/language_2/function_type/function_type13_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(int x0, [Function x]);
@@ -536,8 +536,8 @@
     }
 
     Expect.isTrue(m13 is F13<T>);
-    Expect
-        .isTrue(m13 is core.List<core.int> Function(List<T> x) Function(int x));
+    Expect.isTrue(
+        m13 is core.List<core.int> Function(List<T> x) Function(int x));
     Expect.isTrue(confuse(m13) is F13<T>);
     // In checked mode, verifies the type.
     x13 = m13;
@@ -586,8 +586,8 @@
     }
 
     Expect.isTrue(m14 is F14<T>);
-    Expect
-        .isTrue(m14 is List<T> Function(int x1, [Function x]) Function(int x));
+    Expect.isTrue(
+        m14 is List<T> Function(int x1, [Function x]) Function(int x));
     Expect.isTrue(confuse(m14) is F14<T>);
     // In checked mode, verifies the type.
     x14 = m14;
diff --git a/tests/language_2/function_type/function_type14_test.dart b/tests/language_2/function_type/function_type14_test.dart
index 9ad9bc7..0e5cb1a 100644
--- a/tests/language_2/function_type/function_type14_test.dart
+++ b/tests/language_2/function_type/function_type14_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(int y, [Function x]);
diff --git a/tests/language_2/function_type/function_type15_test.dart b/tests/language_2/function_type/function_type15_test.dart
index 1436768..b1c26fa 100644
--- a/tests/language_2/function_type/function_type15_test.dart
+++ b/tests/language_2/function_type/function_type15_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(Function x0);
diff --git a/tests/language_2/function_type/function_type16_test.dart b/tests/language_2/function_type/function_type16_test.dart
index ed1bbf9..fb657f2 100644
--- a/tests/language_2/function_type/function_type16_test.dart
+++ b/tests/language_2/function_type/function_type16_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function([Function x1]);
@@ -386,8 +386,8 @@
     }
 
     Expect.isTrue(m8 is F8<T>);
-    Expect
-        .isTrue(m8 is Function Function(int y, {List<Function> x}) Function());
+    Expect.isTrue(
+        m8 is Function Function(int y, {List<Function> x}) Function());
     Expect.isTrue(confuse(m8) is F8<T>);
     // In checked mode, verifies the type.
     x8 = m8;
@@ -459,8 +459,8 @@
     }
 
     Expect.isTrue(m11 is F11<T>);
-    Expect
-        .isTrue(m11 is List<Function> Function(int x, [List<T> x2]) Function());
+    Expect.isTrue(
+        m11 is List<Function> Function(int x, [List<T> x2]) Function());
     Expect.isTrue(confuse(m11) is F11<T>);
     // In checked mode, verifies the type.
     x11 = m11;
diff --git a/tests/language_2/function_type/function_type17_test.dart b/tests/language_2/function_type/function_type17_test.dart
index 348c477..058d1c1 100644
--- a/tests/language_2/function_type/function_type17_test.dart
+++ b/tests/language_2/function_type/function_type17_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(int x1, [Function x2]);
diff --git a/tests/language_2/function_type/function_type18_test.dart b/tests/language_2/function_type/function_type18_test.dart
index 235f27a..e336db6 100644
--- a/tests/language_2/function_type/function_type18_test.dart
+++ b/tests/language_2/function_type/function_type18_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(int x, [Function x2]);
diff --git a/tests/language_2/function_type/function_type19_test.dart b/tests/language_2/function_type/function_type19_test.dart
index d2e9c6a..2639304 100644
--- a/tests/language_2/function_type/function_type19_test.dart
+++ b/tests/language_2/function_type/function_type19_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function({Function x});
diff --git a/tests/language_2/function_type/function_type1_test.dart b/tests/language_2/function_type/function_type1_test.dart
index ce7c93f..7d3515a 100644
--- a/tests/language_2/function_type/function_type1_test.dart
+++ b/tests/language_2/function_type/function_type1_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function([int x]);
@@ -856,8 +856,8 @@
     }
 
     Expect.isTrue(m21 is F21<T>);
-    Expect
-        .isTrue(m21 is List<Function> Function<A>(Function x) Function(int x));
+    Expect.isTrue(
+        m21 is List<Function> Function<A>(Function x) Function(int x));
     Expect.isTrue(confuse(m21) is F21<T>);
     // In checked mode, verifies the type.
     x21 = m21;
@@ -905,8 +905,8 @@
     }
 
     Expect.isTrue(m23 is F23<T>);
-    Expect
-        .isTrue(m23 is void Function<A>(core.List<core.int> x) Function(int x));
+    Expect.isTrue(
+        m23 is void Function<A>(core.List<core.int> x) Function(int x));
     Expect.isTrue(confuse(m23) is F23<T>);
     // In checked mode, verifies the type.
     x23 = m23;
diff --git a/tests/language_2/function_type/function_type20_test.dart b/tests/language_2/function_type/function_type20_test.dart
index 309f554..446bf0a 100644
--- a/tests/language_2/function_type/function_type20_test.dart
+++ b/tests/language_2/function_type/function_type20_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(int x0, {Function x});
@@ -460,8 +460,8 @@
     }
 
     Expect.isTrue(m10 is F10<T>);
-    Expect
-        .isTrue(m10 is List<Function> Function([List<Function> x1]) Function());
+    Expect.isTrue(
+        m10 is List<Function> Function([List<Function> x1]) Function());
     Expect.isTrue(confuse(m10) is F10<T>);
     // In checked mode, verifies the type.
     x10 = m10;
diff --git a/tests/language_2/function_type/function_type21_test.dart b/tests/language_2/function_type/function_type21_test.dart
index 8032999..0e9eed4 100644
--- a/tests/language_2/function_type/function_type21_test.dart
+++ b/tests/language_2/function_type/function_type21_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(int y, {Function x});
@@ -390,8 +390,8 @@
     }
 
     Expect.isTrue(m8 is F8<T>);
-    Expect
-        .isTrue(m8 is Function Function(core.List<core.int> x) Function(int x));
+    Expect.isTrue(
+        m8 is Function Function(core.List<core.int> x) Function(int x));
     Expect.isTrue(confuse(m8) is F8<T>);
     // In checked mode, verifies the type.
     x8 = m8;
@@ -415,8 +415,8 @@
     }
 
     Expect.isTrue(m9 is F9<T>);
-    Expect
-        .isTrue(m9 is List<Function> Function(int x1, [int x]) Function(int x));
+    Expect.isTrue(
+        m9 is List<Function> Function(int x1, [int x]) Function(int x));
     Expect.isTrue(confuse(m9) is F9<T>);
     // In checked mode, verifies the type.
     x9 = m9;
diff --git a/tests/language_2/function_type/function_type22_test.dart b/tests/language_2/function_type/function_type22_test.dart
index 48b6b51..a746455 100644
--- a/tests/language_2/function_type/function_type22_test.dart
+++ b/tests/language_2/function_type/function_type22_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(List<Function> x);
diff --git a/tests/language_2/function_type/function_type23_test.dart b/tests/language_2/function_type/function_type23_test.dart
index 5a15edd..da420f9 100644
--- a/tests/language_2/function_type/function_type23_test.dart
+++ b/tests/language_2/function_type/function_type23_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function([List<Function> x]);
diff --git a/tests/language_2/function_type/function_type24_test.dart b/tests/language_2/function_type/function_type24_test.dart
index a45e071..ab89f88 100644
--- a/tests/language_2/function_type/function_type24_test.dart
+++ b/tests/language_2/function_type/function_type24_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(int x0, [List<Function> x]);
@@ -389,8 +389,8 @@
     }
 
     Expect.isTrue(m6 is F6<T>);
-    Expect
-        .isTrue(m6 is int Function(int x, [core.List<core.int> x2]) Function());
+    Expect.isTrue(
+        m6 is int Function(int x, [core.List<core.int> x2]) Function());
     Expect.isTrue(confuse(m6) is F6<T>);
     // In checked mode, verifies the type.
     x6 = m6;
@@ -511,8 +511,8 @@
     }
 
     Expect.isTrue(m11 is F11<T>);
-    Expect
-        .isTrue(m11 is List<Function> Function(int x0, {List<T> x}) Function());
+    Expect.isTrue(
+        m11 is List<Function> Function(int x0, {List<T> x}) Function());
     Expect.isTrue(confuse(m11) is F11<T>);
     // In checked mode, verifies the type.
     x11 = m11;
diff --git a/tests/language_2/function_type/function_type25_test.dart b/tests/language_2/function_type/function_type25_test.dart
index 7d2110e..dfa26f3 100644
--- a/tests/language_2/function_type/function_type25_test.dart
+++ b/tests/language_2/function_type/function_type25_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(int y, [List<Function> x]);
@@ -465,8 +465,8 @@
     }
 
     Expect.isTrue(m9 is F9<T>);
-    Expect
-        .isTrue(m9 is List<Function> Function(int y, [int x]) Function(int x));
+    Expect.isTrue(
+        m9 is List<Function> Function(int y, [int x]) Function(int x));
     Expect.isTrue(confuse(m9) is F9<T>);
     // In checked mode, verifies the type.
     x9 = m9;
diff --git a/tests/language_2/function_type/function_type26_test.dart b/tests/language_2/function_type/function_type26_test.dart
index 548f4b7..5d6141a 100644
--- a/tests/language_2/function_type/function_type26_test.dart
+++ b/tests/language_2/function_type/function_type26_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(List<Function> x0);
@@ -392,8 +392,8 @@
     }
 
     Expect.isTrue(m5 is F5<T>);
-    Expect
-        .isTrue(m5 is int Function(Function x1) Function<B extends core.int>());
+    Expect.isTrue(
+        m5 is int Function(Function x1) Function<B extends core.int>());
     Expect.isTrue(confuse(m5) is F5<T>);
     // In checked mode, verifies the type.
     x5 = m5;
@@ -774,8 +774,8 @@
     }
 
     Expect.isTrue(m16 is F16<T>);
-    Expect
-        .isTrue(m16 is Function(int y, {int x}) Function<B extends core.int>());
+    Expect.isTrue(
+        m16 is Function(int y, {int x}) Function<B extends core.int>());
     Expect.isTrue(confuse(m16) is F16<T>);
     // In checked mode, verifies the type.
     x16 = m16;
diff --git a/tests/language_2/function_type/function_type27_test.dart b/tests/language_2/function_type/function_type27_test.dart
index 47e2080..79a07bd7 100644
--- a/tests/language_2/function_type/function_type27_test.dart
+++ b/tests/language_2/function_type/function_type27_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function([List<Function> x1]);
diff --git a/tests/language_2/function_type/function_type28_test.dart b/tests/language_2/function_type/function_type28_test.dart
index eb9f027..f40ad19 100644
--- a/tests/language_2/function_type/function_type28_test.dart
+++ b/tests/language_2/function_type/function_type28_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(int x1, [List<Function> x2]);
@@ -510,8 +510,8 @@
     }
 
     Expect.isTrue(m11 is F11<T>);
-    Expect
-        .isTrue(m11 is List<Function> Function(int y, {List<T> x}) Function());
+    Expect.isTrue(
+        m11 is List<Function> Function(int y, {List<T> x}) Function());
     Expect.isTrue(confuse(m11) is F11<T>);
     // In checked mode, verifies the type.
     x11 = m11;
diff --git a/tests/language_2/function_type/function_type29_test.dart b/tests/language_2/function_type/function_type29_test.dart
index 0409edc..dfc8fdf 100644
--- a/tests/language_2/function_type/function_type29_test.dart
+++ b/tests/language_2/function_type/function_type29_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(int x, [List<Function> x2]);
@@ -639,8 +639,8 @@
     }
 
     Expect.isTrue(m14 is F14<T>);
-    Expect
-        .isTrue(m14 is List<T> Function(int x2, [Function x3]) Function(int x));
+    Expect.isTrue(
+        m14 is List<T> Function(int x2, [Function x3]) Function(int x));
     Expect.isTrue(confuse(m14) is F14<T>);
     // In checked mode, verifies the type.
     x14 = m14;
@@ -860,8 +860,8 @@
     }
 
     Expect.isTrue(m21 is F21<T>);
-    Expect
-        .isTrue(m21 is core.List<core.int> Function<A>(int x) Function(int x));
+    Expect.isTrue(
+        m21 is core.List<core.int> Function<A>(int x) Function(int x));
     Expect.isTrue(confuse(m21) is F21<T>);
     // In checked mode, verifies the type.
     x21 = m21;
diff --git a/tests/language_2/function_type/function_type2_test.dart b/tests/language_2/function_type/function_type2_test.dart
index 037aea9c..bb0b4f0 100644
--- a/tests/language_2/function_type/function_type2_test.dart
+++ b/tests/language_2/function_type/function_type2_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(int x0, [int x]);
diff --git a/tests/language_2/function_type/function_type30_test.dart b/tests/language_2/function_type/function_type30_test.dart
index 2566334..5662b44 100644
--- a/tests/language_2/function_type/function_type30_test.dart
+++ b/tests/language_2/function_type/function_type30_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function({List<Function> x});
@@ -818,8 +818,8 @@
     }
 
     Expect.isTrue(m18 is F18<T>);
-    Expect
-        .isTrue(m18 is void Function([int x1]) Function<B extends core.int>());
+    Expect.isTrue(
+        m18 is void Function([int x1]) Function<B extends core.int>());
     Expect.isTrue(confuse(m18) is F18<T>);
     // In checked mode, verifies the type.
     x18 = m18;
diff --git a/tests/language_2/function_type/function_type31_test.dart b/tests/language_2/function_type/function_type31_test.dart
index 316fa98..29248f9 100644
--- a/tests/language_2/function_type/function_type31_test.dart
+++ b/tests/language_2/function_type/function_type31_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(int x0, {List<Function> x});
diff --git a/tests/language_2/function_type/function_type32_test.dart b/tests/language_2/function_type/function_type32_test.dart
index d2ded1b..0186636 100644
--- a/tests/language_2/function_type/function_type32_test.dart
+++ b/tests/language_2/function_type/function_type32_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(int y, {List<Function> x});
@@ -364,8 +364,8 @@
     }
 
     Expect.isTrue(m6 is F6<T>);
-    Expect
-        .isTrue(m6 is int Function(int x0, {core.List<core.int> x}) Function());
+    Expect.isTrue(
+        m6 is int Function(int x0, {core.List<core.int> x}) Function());
     Expect.isTrue(confuse(m6) is F6<T>);
     // In checked mode, verifies the type.
     x6 = m6;
@@ -462,8 +462,8 @@
     }
 
     Expect.isTrue(m10 is F10<T>);
-    Expect
-        .isTrue(m10 is List<Function> Function({List<Function> x}) Function());
+    Expect.isTrue(
+        m10 is List<Function> Function({List<Function> x}) Function());
     Expect.isTrue(confuse(m10) is F10<T>);
     // In checked mode, verifies the type.
     x10 = m10;
@@ -804,8 +804,8 @@
     }
 
     Expect.isTrue(m21 is F21<T>);
-    Expect
-        .isTrue(m21 is core.List<core.int> Function<A>(Function x) Function());
+    Expect.isTrue(
+        m21 is core.List<core.int> Function<A>(Function x) Function());
     Expect.isTrue(confuse(m21) is F21<T>);
     // In checked mode, verifies the type.
     x21 = m21;
diff --git a/tests/language_2/function_type/function_type33_test.dart b/tests/language_2/function_type/function_type33_test.dart
index b3f0e95..78c3361 100644
--- a/tests/language_2/function_type/function_type33_test.dart
+++ b/tests/language_2/function_type/function_type33_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(core.List<core.int> x);
@@ -590,8 +590,8 @@
     }
 
     Expect.isTrue(m14 is F14<T>);
-    Expect
-        .isTrue(m14 is List<T> Function(int x, [Function x1]) Function(int x));
+    Expect.isTrue(
+        m14 is List<T> Function(int x, [Function x1]) Function(int x));
     Expect.isTrue(confuse(m14) is F14<T>);
     // In checked mode, verifies the type.
     x14 = m14;
diff --git a/tests/language_2/function_type/function_type34_test.dart b/tests/language_2/function_type/function_type34_test.dart
index 21b2d9e..0a8f873 100644
--- a/tests/language_2/function_type/function_type34_test.dart
+++ b/tests/language_2/function_type/function_type34_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function([core.List<core.int> x]);
diff --git a/tests/language_2/function_type/function_type35_test.dart b/tests/language_2/function_type/function_type35_test.dart
index 3bf2ee8..9894b76 100644
--- a/tests/language_2/function_type/function_type35_test.dart
+++ b/tests/language_2/function_type/function_type35_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(int x0, [core.List<core.int> x]);
diff --git a/tests/language_2/function_type/function_type36_test.dart b/tests/language_2/function_type/function_type36_test.dart
index 5ff2a9e..fda0c2d 100644
--- a/tests/language_2/function_type/function_type36_test.dart
+++ b/tests/language_2/function_type/function_type36_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(int y, [core.List<core.int> x]);
@@ -364,8 +364,8 @@
     }
 
     Expect.isTrue(m6 is F6<T>);
-    Expect
-        .isTrue(m6 is int Function(int y, {core.List<core.int> x}) Function());
+    Expect.isTrue(
+        m6 is int Function(int y, {core.List<core.int> x}) Function());
     Expect.isTrue(confuse(m6) is F6<T>);
     // In checked mode, verifies the type.
     x6 = m6;
diff --git a/tests/language_2/function_type/function_type37_test.dart b/tests/language_2/function_type/function_type37_test.dart
index b95aab2..cb342f4 100644
--- a/tests/language_2/function_type/function_type37_test.dart
+++ b/tests/language_2/function_type/function_type37_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(core.List<core.int> x0);
@@ -833,8 +833,8 @@
     }
 
     Expect.isTrue(m23 is F23<T>);
-    Expect
-        .isTrue(m23 is void Function(B x) Function<B extends core.int>(int x));
+    Expect.isTrue(
+        m23 is void Function(B x) Function<B extends core.int>(int x));
     Expect.isTrue(confuse(m23) is F23<T>);
     // In checked mode, verifies the type.
     x23 = m23;
diff --git a/tests/language_2/function_type/function_type38_test.dart b/tests/language_2/function_type/function_type38_test.dart
index 3b516f4..b21a02f 100644
--- a/tests/language_2/function_type/function_type38_test.dart
+++ b/tests/language_2/function_type/function_type38_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function([core.List<core.int> x1]);
diff --git a/tests/language_2/function_type/function_type39_test.dart b/tests/language_2/function_type/function_type39_test.dart
index e2e783b..b42345c 100644
--- a/tests/language_2/function_type/function_type39_test.dart
+++ b/tests/language_2/function_type/function_type39_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(int x1, [core.List<core.int> x2]);
diff --git a/tests/language_2/function_type/function_type3_test.dart b/tests/language_2/function_type/function_type3_test.dart
index dcf1fbd..5a6511e 100644
--- a/tests/language_2/function_type/function_type3_test.dart
+++ b/tests/language_2/function_type/function_type3_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(int y, [int x]);
diff --git a/tests/language_2/function_type/function_type40_test.dart b/tests/language_2/function_type/function_type40_test.dart
index d2b20de..e19b28b 100644
--- a/tests/language_2/function_type/function_type40_test.dart
+++ b/tests/language_2/function_type/function_type40_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(int x, [core.List<core.int> x2]);
diff --git a/tests/language_2/function_type/function_type41_test.dart b/tests/language_2/function_type/function_type41_test.dart
index 16ee14a..e7cacec 100644
--- a/tests/language_2/function_type/function_type41_test.dart
+++ b/tests/language_2/function_type/function_type41_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function({core.List<core.int> x});
@@ -391,8 +391,8 @@
     }
 
     Expect.isTrue(m7 is F7<T>);
-    Expect
-        .isTrue(m7 is Function Function(int x1, [Function x]) Function(int x));
+    Expect.isTrue(
+        m7 is Function Function(int x1, [Function x]) Function(int x));
     Expect.isTrue(confuse(m7) is F7<T>);
     // In checked mode, verifies the type.
     x7 = m7;
@@ -441,8 +441,8 @@
     }
 
     Expect.isTrue(m9 is F9<T>);
-    Expect
-        .isTrue(m9 is List<Function> Function(int x, [int x1]) Function(int x));
+    Expect.isTrue(
+        m9 is List<Function> Function(int x, [int x1]) Function(int x));
     Expect.isTrue(confuse(m9) is F9<T>);
     // In checked mode, verifies the type.
     x9 = m9;
@@ -590,8 +590,8 @@
     }
 
     Expect.isTrue(m14 is F14<T>);
-    Expect
-        .isTrue(m14 is List<T> Function(int x1, {Function x}) Function(int x));
+    Expect.isTrue(
+        m14 is List<T> Function(int x1, {Function x}) Function(int x));
     Expect.isTrue(confuse(m14) is F14<T>);
     // In checked mode, verifies the type.
     x14 = m14;
diff --git a/tests/language_2/function_type/function_type42_test.dart b/tests/language_2/function_type/function_type42_test.dart
index ad22438..be92a16 100644
--- a/tests/language_2/function_type/function_type42_test.dart
+++ b/tests/language_2/function_type/function_type42_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(int x0, {core.List<core.int> x});
@@ -867,8 +867,8 @@
     }
 
     Expect.isTrue(m22 is F22<T>);
-    Expect
-        .isTrue(m22 is A Function<A>(List<T> x) Function<B extends core.int>());
+    Expect.isTrue(
+        m22 is A Function<A>(List<T> x) Function<B extends core.int>());
     Expect.isTrue(confuse(m22) is F22<T>);
     // In checked mode, verifies the type.
     x22 = m22;
diff --git a/tests/language_2/function_type/function_type43_test.dart b/tests/language_2/function_type/function_type43_test.dart
index 021372b..31f94f2 100644
--- a/tests/language_2/function_type/function_type43_test.dart
+++ b/tests/language_2/function_type/function_type43_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(int y, {core.List<core.int> x});
diff --git a/tests/language_2/function_type/function_type44_test.dart b/tests/language_2/function_type/function_type44_test.dart
index 868ce4f..2af4fd2 100644
--- a/tests/language_2/function_type/function_type44_test.dart
+++ b/tests/language_2/function_type/function_type44_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(List<T> x);
diff --git a/tests/language_2/function_type/function_type45_test.dart b/tests/language_2/function_type/function_type45_test.dart
index 0a91c9c..70af4a7 100644
--- a/tests/language_2/function_type/function_type45_test.dart
+++ b/tests/language_2/function_type/function_type45_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function([List<T> x]);
@@ -784,8 +784,8 @@
     }
 
     Expect.isTrue(m19 is F19<T>);
-    Expect
-        .isTrue(m19 is void Function([core.List<core.int> x]) Function(int x));
+    Expect.isTrue(
+        m19 is void Function([core.List<core.int> x]) Function(int x));
     Expect.isTrue(confuse(m19) is F19<T>);
     // In checked mode, verifies the type.
     x19 = m19;
@@ -809,8 +809,8 @@
     }
 
     Expect.isTrue(m20 is F20<T>);
-    Expect
-        .isTrue(m20 is int Function<A>(core.List<core.int> x) Function(int x));
+    Expect.isTrue(
+        m20 is int Function<A>(core.List<core.int> x) Function(int x));
     Expect.isTrue(confuse(m20) is F20<T>);
     // In checked mode, verifies the type.
     x20 = m20;
diff --git a/tests/language_2/function_type/function_type46_test.dart b/tests/language_2/function_type/function_type46_test.dart
index e04969b..60760e3 100644
--- a/tests/language_2/function_type/function_type46_test.dart
+++ b/tests/language_2/function_type/function_type46_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(int x0, [List<T> x]);
@@ -388,8 +388,8 @@
     }
 
     Expect.isTrue(m6 is F6<T>);
-    Expect
-        .isTrue(m6 is int Function([List<T> x]) Function<B extends core.int>());
+    Expect.isTrue(
+        m6 is int Function([List<T> x]) Function<B extends core.int>());
     Expect.isTrue(confuse(m6) is F6<T>);
     // In checked mode, verifies the type.
     x6 = m6;
diff --git a/tests/language_2/function_type/function_type47_test.dart b/tests/language_2/function_type/function_type47_test.dart
index 2f45775..999e76c 100644
--- a/tests/language_2/function_type/function_type47_test.dart
+++ b/tests/language_2/function_type/function_type47_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(int y, [List<T> x]);
@@ -263,8 +263,8 @@
     }
 
     Expect.isTrue(m1 is F1<T>);
-    Expect
-        .isTrue(m1 is List<Function> Function(int x0, [core.List<core.int> x]));
+    Expect.isTrue(
+        m1 is List<Function> Function(int x0, [core.List<core.int> x]));
     Expect.isTrue(confuse(m1) is F1<T>);
     // In checked mode, verifies the type.
     x1 = m1;
diff --git a/tests/language_2/function_type/function_type48_test.dart b/tests/language_2/function_type/function_type48_test.dart
index 93da37a..da44e79 100644
--- a/tests/language_2/function_type/function_type48_test.dart
+++ b/tests/language_2/function_type/function_type48_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(List<T> x0);
@@ -219,8 +219,8 @@
     }
 
     Expect.isTrue(m1 is F1<T>);
-    Expect
-        .isTrue(m1 is List<Function> Function(int y, [core.List<core.int> x]));
+    Expect.isTrue(
+        m1 is List<Function> Function(int y, [core.List<core.int> x]));
     Expect.isTrue(confuse(m1) is F1<T>);
     // In checked mode, verifies the type.
     x1 = m1;
@@ -512,8 +512,8 @@
     }
 
     Expect.isTrue(m11 is F11<T>);
-    Expect
-        .isTrue(m11 is core.List<core.int> Function(int y, [int x]) Function());
+    Expect.isTrue(
+        m11 is core.List<core.int> Function(int y, [int x]) Function());
     Expect.isTrue(confuse(m11) is F11<T>);
     // In checked mode, verifies the type.
     x11 = m11;
diff --git a/tests/language_2/function_type/function_type49_test.dart b/tests/language_2/function_type/function_type49_test.dart
index 191da6a..8e7e84b 100644
--- a/tests/language_2/function_type/function_type49_test.dart
+++ b/tests/language_2/function_type/function_type49_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function([List<T> x1]);
@@ -465,8 +465,8 @@
     }
 
     Expect.isTrue(m9 is F9<T>);
-    Expect
-        .isTrue(m9 is List<Function> Function(int x1, {int x}) Function(int x));
+    Expect.isTrue(
+        m9 is List<Function> Function(int x1, {int x}) Function(int x));
     Expect.isTrue(confuse(m9) is F9<T>);
     // In checked mode, verifies the type.
     x9 = m9;
diff --git a/tests/language_2/function_type/function_type4_test.dart b/tests/language_2/function_type/function_type4_test.dart
index a5b8533..6eafe68 100644
--- a/tests/language_2/function_type/function_type4_test.dart
+++ b/tests/language_2/function_type/function_type4_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(int x0);
@@ -365,8 +365,8 @@
     }
 
     Expect.isTrue(m6 is F6<T>);
-    Expect
-        .isTrue(m6 is int Function(int x0, [core.List<core.int> x]) Function());
+    Expect.isTrue(
+        m6 is int Function(int x0, [core.List<core.int> x]) Function());
     Expect.isTrue(confuse(m6) is F6<T>);
     // In checked mode, verifies the type.
     x6 = m6;
@@ -414,8 +414,8 @@
     }
 
     Expect.isTrue(m8 is F8<T>);
-    Expect
-        .isTrue(m8 is Function Function(int x, [List<Function> x2]) Function());
+    Expect.isTrue(
+        m8 is Function Function(int x, [List<Function> x2]) Function());
     Expect.isTrue(confuse(m8) is F8<T>);
     // In checked mode, verifies the type.
     x8 = m8;
@@ -488,8 +488,8 @@
     }
 
     Expect.isTrue(m10 is F10<T>);
-    Expect
-        .isTrue(m10 is List<Function> Function([List<Function> x]) Function());
+    Expect.isTrue(
+        m10 is List<Function> Function([List<Function> x]) Function());
     Expect.isTrue(confuse(m10) is F10<T>);
     // In checked mode, verifies the type.
     x10 = m10;
@@ -858,8 +858,8 @@
     }
 
     Expect.isTrue(m21 is F21<T>);
-    Expect
-        .isTrue(m21 is List<Function> Function<A>(List<Function> x) Function());
+    Expect.isTrue(
+        m21 is List<Function> Function<A>(List<Function> x) Function());
     Expect.isTrue(confuse(m21) is F21<T>);
     // In checked mode, verifies the type.
     x21 = m21;
diff --git a/tests/language_2/function_type/function_type50_test.dart b/tests/language_2/function_type/function_type50_test.dart
index e1b7cb3..ca0d344 100644
--- a/tests/language_2/function_type/function_type50_test.dart
+++ b/tests/language_2/function_type/function_type50_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(int x1, [List<T> x2]);
@@ -745,8 +745,8 @@
     }
 
     Expect.isTrue(m16 is F16<T>);
-    Expect
-        .isTrue(m16 is Function([Function x1]) Function<B extends core.int>());
+    Expect.isTrue(
+        m16 is Function([Function x1]) Function<B extends core.int>());
     Expect.isTrue(confuse(m16) is F16<T>);
     // In checked mode, verifies the type.
     x16 = m16;
diff --git a/tests/language_2/function_type/function_type51_test.dart b/tests/language_2/function_type/function_type51_test.dart
index 2067e2c..e642bb5 100644
--- a/tests/language_2/function_type/function_type51_test.dart
+++ b/tests/language_2/function_type/function_type51_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(int x, [List<T> x2]);
@@ -936,8 +936,8 @@
     }
 
     Expect.isTrue(m22 is F22<T>);
-    Expect
-        .isTrue(m22 is A Function<A>(A x) Function<B extends core.int>(int x));
+    Expect.isTrue(
+        m22 is A Function<A>(A x) Function<B extends core.int>(int x));
     Expect.isTrue(confuse(m22) is F22<T>);
     // In checked mode, verifies the type.
     x22 = m22;
diff --git a/tests/language_2/function_type/function_type52_test.dart b/tests/language_2/function_type/function_type52_test.dart
index d03a4db..3df824e 100644
--- a/tests/language_2/function_type/function_type52_test.dart
+++ b/tests/language_2/function_type/function_type52_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function({List<T> x});
@@ -215,8 +215,8 @@
     }
 
     Expect.isTrue(m1 is F1<T>);
-    Expect
-        .isTrue(m1 is List<Function> Function(int x, [core.List<core.int> x2]));
+    Expect.isTrue(
+        m1 is List<Function> Function(int x, [core.List<core.int> x2]));
     Expect.isTrue(confuse(m1) is F1<T>);
     // In checked mode, verifies the type.
     x1 = m1;
diff --git a/tests/language_2/function_type/function_type53_test.dart b/tests/language_2/function_type/function_type53_test.dart
index 6545f70..fc6c8ca 100644
--- a/tests/language_2/function_type/function_type53_test.dart
+++ b/tests/language_2/function_type/function_type53_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(int x0, {List<T> x});
@@ -459,8 +459,8 @@
     }
 
     Expect.isTrue(m9 is F9<T>);
-    Expect
-        .isTrue(m9 is List<Function> Function(int y, {int x}) Function(int x));
+    Expect.isTrue(
+        m9 is List<Function> Function(int y, {int x}) Function(int x));
     Expect.isTrue(confuse(m9) is F9<T>);
     // In checked mode, verifies the type.
     x9 = m9;
diff --git a/tests/language_2/function_type/function_type54_test.dart b/tests/language_2/function_type/function_type54_test.dart
index 30f30c3..a940fdc 100644
--- a/tests/language_2/function_type/function_type54_test.dart
+++ b/tests/language_2/function_type/function_type54_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(int y, {List<T> x});
@@ -234,8 +234,8 @@
     }
 
     Expect.isTrue(m1 is F1<T>);
-    Expect
-        .isTrue(m1 is List<Function> Function(int x0, {core.List<core.int> x}));
+    Expect.isTrue(
+        m1 is List<Function> Function(int x0, {core.List<core.int> x}));
     Expect.isTrue(confuse(m1) is F1<T>);
     // In checked mode, verifies the type.
     x1 = m1;
@@ -888,8 +888,8 @@
     }
 
     Expect.isTrue(m22 is F22<T>);
-    Expect
-        .isTrue(m22 is A Function<A>(List<A> x) Function<B extends core.int>());
+    Expect.isTrue(
+        m22 is A Function<A>(List<A> x) Function<B extends core.int>());
     Expect.isTrue(confuse(m22) is F22<T>);
     // In checked mode, verifies the type.
     x22 = m22;
diff --git a/tests/language_2/function_type/function_type55_test.dart b/tests/language_2/function_type/function_type55_test.dart
index 6589938..333f42b 100644
--- a/tests/language_2/function_type/function_type55_test.dart
+++ b/tests/language_2/function_type/function_type55_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function();
@@ -225,8 +225,8 @@
     }
 
     Expect.isTrue(m1 is F1<T>);
-    Expect
-        .isTrue(m1 is List<Function> Function(int y, {core.List<core.int> x}));
+    Expect.isTrue(
+        m1 is List<Function> Function(int y, {core.List<core.int> x}));
     Expect.isTrue(confuse(m1) is F1<T>);
     // In checked mode, verifies the type.
     x1 = m1;
diff --git a/tests/language_2/function_type/function_type56_test.dart b/tests/language_2/function_type/function_type56_test.dart
index 521eded..622b5d5 100644
--- a/tests/language_2/function_type/function_type56_test.dart
+++ b/tests/language_2/function_type/function_type56_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function(int x);
@@ -579,8 +579,8 @@
     }
 
     Expect.isTrue(m14 is F14<T>);
-    Expect
-        .isTrue(m14 is List<T> Function(int x0, [List<Function> x]) Function());
+    Expect.isTrue(
+        m14 is List<T> Function(int x0, [List<Function> x]) Function());
     Expect.isTrue(confuse(m14) is F14<T>);
     // In checked mode, verifies the type.
     x14 = m14;
diff --git a/tests/language_2/function_type/function_type57_test.dart b/tests/language_2/function_type/function_type57_test.dart
index d25f4ce..ecf15d4 100644
--- a/tests/language_2/function_type/function_type57_test.dart
+++ b/tests/language_2/function_type/function_type57_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function([int x]);
@@ -410,8 +410,8 @@
     }
 
     Expect.isTrue(m7 is F7<T>);
-    Expect
-        .isTrue(m7 is Function Function(int x2, [Function x3]) Function(int x));
+    Expect.isTrue(
+        m7 is Function Function(int x2, [Function x3]) Function(int x));
     Expect.isTrue(confuse(m7) is F7<T>);
     // In checked mode, verifies the type.
     x7 = m7;
@@ -509,8 +509,8 @@
     }
 
     Expect.isTrue(m11 is F11<T>);
-    Expect
-        .isTrue(m11 is core.List<core.int> Function([int x1]) Function(int x));
+    Expect.isTrue(
+        m11 is core.List<core.int> Function([int x1]) Function(int x));
     Expect.isTrue(confuse(m11) is F11<T>);
     // In checked mode, verifies the type.
     x11 = m11;
diff --git a/tests/language_2/function_type/function_type58_test.dart b/tests/language_2/function_type/function_type58_test.dart
index d1a1628..52ceae9 100644
--- a/tests/language_2/function_type/function_type58_test.dart
+++ b/tests/language_2/function_type/function_type58_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function(int x0, [int x]);
@@ -381,8 +381,8 @@
     }
 
     Expect.isTrue(m6 is F6<T>);
-    Expect
-        .isTrue(m6 is int Function(List<T> x1) Function<B extends core.int>());
+    Expect.isTrue(
+        m6 is int Function(List<T> x1) Function<B extends core.int>());
     Expect.isTrue(confuse(m6) is F6<T>);
     // In checked mode, verifies the type.
     x6 = m6;
diff --git a/tests/language_2/function_type/function_type59_test.dart b/tests/language_2/function_type/function_type59_test.dart
index c3f76a6..4431f9b 100644
--- a/tests/language_2/function_type/function_type59_test.dart
+++ b/tests/language_2/function_type/function_type59_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function(int y, [int x]);
diff --git a/tests/language_2/function_type/function_type5_test.dart b/tests/language_2/function_type/function_type5_test.dart
index 2a671da..b159028 100644
--- a/tests/language_2/function_type/function_type5_test.dart
+++ b/tests/language_2/function_type/function_type5_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function([int x1]);
diff --git a/tests/language_2/function_type/function_type60_test.dart b/tests/language_2/function_type/function_type60_test.dart
index 1a897b2..dae537b 100644
--- a/tests/language_2/function_type/function_type60_test.dart
+++ b/tests/language_2/function_type/function_type60_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function(int x0);
@@ -630,8 +630,8 @@
     }
 
     Expect.isTrue(m14 is F14<T>);
-    Expect
-        .isTrue(m14 is List<T> Function(int y, [List<Function> x]) Function());
+    Expect.isTrue(
+        m14 is List<T> Function(int y, [List<Function> x]) Function());
     Expect.isTrue(confuse(m14) is F14<T>);
     // In checked mode, verifies the type.
     x14 = m14;
diff --git a/tests/language_2/function_type/function_type61_test.dart b/tests/language_2/function_type/function_type61_test.dart
index 67ca834..3cee969 100644
--- a/tests/language_2/function_type/function_type61_test.dart
+++ b/tests/language_2/function_type/function_type61_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function([int x1]);
@@ -337,8 +337,8 @@
     }
 
     Expect.isTrue(m5 is F5<T>);
-    Expect
-        .isTrue(m5 is int Function(int x1, [List<Function> x]) Function(int x));
+    Expect.isTrue(
+        m5 is int Function(int x1, [List<Function> x]) Function(int x));
     Expect.isTrue(confuse(m5) is F5<T>);
     // In checked mode, verifies the type.
     x5 = m5;
@@ -411,8 +411,8 @@
     }
 
     Expect.isTrue(m7 is F7<T>);
-    Expect
-        .isTrue(m7 is Function Function(int x, [Function x1]) Function(int x));
+    Expect.isTrue(
+        m7 is Function Function(int x, [Function x1]) Function(int x));
     Expect.isTrue(confuse(m7) is F7<T>);
     // In checked mode, verifies the type.
     x7 = m7;
@@ -661,8 +661,8 @@
     }
 
     Expect.isTrue(m15 is F15<T>);
-    Expect
-        .isTrue(m15 is List<T> Function(int x2, [List<T> x3]) Function(int x));
+    Expect.isTrue(
+        m15 is List<T> Function(int x2, [List<T> x3]) Function(int x));
     Expect.isTrue(confuse(m15) is F15<T>);
     // In checked mode, verifies the type.
     x15 = m15;
@@ -808,8 +808,8 @@
     }
 
     Expect.isTrue(m19 is F19<T>);
-    Expect
-        .isTrue(m19 is void Function([core.List<core.int> x1]) Function(int x));
+    Expect.isTrue(
+        m19 is void Function([core.List<core.int> x1]) Function(int x));
     Expect.isTrue(confuse(m19) is F19<T>);
     // In checked mode, verifies the type.
     x19 = m19;
diff --git a/tests/language_2/function_type/function_type62_test.dart b/tests/language_2/function_type/function_type62_test.dart
index 423b84d..ac4114d 100644
--- a/tests/language_2/function_type/function_type62_test.dart
+++ b/tests/language_2/function_type/function_type62_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function(int x1, [int x2]);
@@ -588,8 +588,8 @@
     }
 
     Expect.isTrue(m13 is F13<T>);
-    Expect
-        .isTrue(m13 is List<T> Function(int x) Function<B extends core.int>());
+    Expect.isTrue(
+        m13 is List<T> Function(int x) Function<B extends core.int>());
     Expect.isTrue(confuse(m13) is F13<T>);
     // In checked mode, verifies the type.
     x13 = m13;
diff --git a/tests/language_2/function_type/function_type63_test.dart b/tests/language_2/function_type/function_type63_test.dart
index 5c8ee24..ff72ac9 100644
--- a/tests/language_2/function_type/function_type63_test.dart
+++ b/tests/language_2/function_type/function_type63_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function(int x, [int x2]);
@@ -783,8 +783,8 @@
     }
 
     Expect.isTrue(m17 is F17<T>);
-    Expect
-        .isTrue(m17 is Function(List<T> x) Function<B extends core.int>(int x));
+    Expect.isTrue(
+        m17 is Function(List<T> x) Function<B extends core.int>(int x));
     Expect.isTrue(confuse(m17) is F17<T>);
     // In checked mode, verifies the type.
     x17 = m17;
diff --git a/tests/language_2/function_type/function_type64_test.dart b/tests/language_2/function_type/function_type64_test.dart
index 9922617..e0a1c6d 100644
--- a/tests/language_2/function_type/function_type64_test.dart
+++ b/tests/language_2/function_type/function_type64_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function({int x});
@@ -481,8 +481,8 @@
     }
 
     Expect.isTrue(m9 is F9<T>);
-    Expect
-        .isTrue(m9 is List<Function> Function(int x0, [Function x]) Function());
+    Expect.isTrue(
+        m9 is List<Function> Function(int x0, [Function x]) Function());
     Expect.isTrue(confuse(m9) is F9<T>);
     // In checked mode, verifies the type.
     x9 = m9;
diff --git a/tests/language_2/function_type/function_type65_test.dart b/tests/language_2/function_type/function_type65_test.dart
index e197529..e479189 100644
--- a/tests/language_2/function_type/function_type65_test.dart
+++ b/tests/language_2/function_type/function_type65_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function(int x0, {int x});
@@ -337,8 +337,8 @@
     }
 
     Expect.isTrue(m5 is F5<T>);
-    Expect
-        .isTrue(m5 is int Function(int y, [List<Function> x]) Function(int x));
+    Expect.isTrue(
+        m5 is int Function(int y, [List<Function> x]) Function(int x));
     Expect.isTrue(confuse(m5) is F5<T>);
     // In checked mode, verifies the type.
     x5 = m5;
diff --git a/tests/language_2/function_type/function_type66_test.dart b/tests/language_2/function_type/function_type66_test.dart
index 7be4bf1..c168c04 100644
--- a/tests/language_2/function_type/function_type66_test.dart
+++ b/tests/language_2/function_type/function_type66_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function(int y, {int x});
diff --git a/tests/language_2/function_type/function_type67_test.dart b/tests/language_2/function_type/function_type67_test.dart
index e41b790..9ca375d 100644
--- a/tests/language_2/function_type/function_type67_test.dart
+++ b/tests/language_2/function_type/function_type67_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function(Function x);
@@ -324,8 +324,8 @@
     }
 
     Expect.isTrue(m4 is F4<T>);
-    Expect
-        .isTrue(m4 is int Function(int x) Function<B extends core.int>(int x));
+    Expect.isTrue(
+        m4 is int Function(int x) Function<B extends core.int>(int x));
     Expect.isTrue(confuse(m4) is F4<T>);
     // In checked mode, verifies the type.
     x4 = m4;
diff --git a/tests/language_2/function_type/function_type68_test.dart b/tests/language_2/function_type/function_type68_test.dart
index 5b5d226..feaab1f 100644
--- a/tests/language_2/function_type/function_type68_test.dart
+++ b/tests/language_2/function_type/function_type68_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function([Function x]);
@@ -456,8 +456,8 @@
     }
 
     Expect.isTrue(m9 is F9<T>);
-    Expect
-        .isTrue(m9 is List<Function> Function(int y, [Function x]) Function());
+    Expect.isTrue(
+        m9 is List<Function> Function(int y, [Function x]) Function());
     Expect.isTrue(confuse(m9) is F9<T>);
     // In checked mode, verifies the type.
     x9 = m9;
diff --git a/tests/language_2/function_type/function_type69_test.dart b/tests/language_2/function_type/function_type69_test.dart
index f2c3970..da77405 100644
--- a/tests/language_2/function_type/function_type69_test.dart
+++ b/tests/language_2/function_type/function_type69_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function(int x0, [Function x]);
@@ -384,8 +384,8 @@
     }
 
     Expect.isTrue(m7 is F7<T>);
-    Expect
-        .isTrue(m7 is Function Function(int x1, {Function x}) Function(int x));
+    Expect.isTrue(
+        m7 is Function Function(int x1, {Function x}) Function(int x));
     Expect.isTrue(confuse(m7) is F7<T>);
     // In checked mode, verifies the type.
     x7 = m7;
diff --git a/tests/language_2/function_type/function_type6_test.dart b/tests/language_2/function_type/function_type6_test.dart
index 5ba38fb..8695a26 100644
--- a/tests/language_2/function_type/function_type6_test.dart
+++ b/tests/language_2/function_type/function_type6_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(int x1, [int x2]);
@@ -392,8 +392,8 @@
     }
 
     Expect.isTrue(m7 is F7<T>);
-    Expect
-        .isTrue(m7 is Function Function(int x1) Function<B extends core.int>());
+    Expect.isTrue(
+        m7 is Function Function(int x1) Function<B extends core.int>());
     Expect.isTrue(confuse(m7) is F7<T>);
     // In checked mode, verifies the type.
     x7 = m7;
diff --git a/tests/language_2/function_type/function_type70_test.dart b/tests/language_2/function_type/function_type70_test.dart
index 26e4754..369e679 100644
--- a/tests/language_2/function_type/function_type70_test.dart
+++ b/tests/language_2/function_type/function_type70_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function(int y, [Function x]);
diff --git a/tests/language_2/function_type/function_type71_test.dart b/tests/language_2/function_type/function_type71_test.dart
index 5d00eef..85e3986 100644
--- a/tests/language_2/function_type/function_type71_test.dart
+++ b/tests/language_2/function_type/function_type71_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function(Function x0);
diff --git a/tests/language_2/function_type/function_type72_test.dart b/tests/language_2/function_type/function_type72_test.dart
index 11f438d..1f67b50 100644
--- a/tests/language_2/function_type/function_type72_test.dart
+++ b/tests/language_2/function_type/function_type72_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function([Function x1]);
diff --git a/tests/language_2/function_type/function_type73_test.dart b/tests/language_2/function_type/function_type73_test.dart
index dbe71fb..de51f95 100644
--- a/tests/language_2/function_type/function_type73_test.dart
+++ b/tests/language_2/function_type/function_type73_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function(int x1, [Function x2]);
@@ -803,8 +803,8 @@
     }
 
     Expect.isTrue(m19 is F19<T>);
-    Expect
-        .isTrue(m19 is void Function({core.List<core.int> x}) Function(int x));
+    Expect.isTrue(
+        m19 is void Function({core.List<core.int> x}) Function(int x));
     Expect.isTrue(confuse(m19) is F19<T>);
     // In checked mode, verifies the type.
     x19 = m19;
@@ -828,8 +828,8 @@
     }
 
     Expect.isTrue(m20 is F20<T>);
-    Expect
-        .isTrue(m20 is Function Function<A>(List<Function> x) Function(int x));
+    Expect.isTrue(
+        m20 is Function Function<A>(List<Function> x) Function(int x));
     Expect.isTrue(confuse(m20) is F20<T>);
     // In checked mode, verifies the type.
     x20 = m20;
diff --git a/tests/language_2/function_type/function_type74_test.dart b/tests/language_2/function_type/function_type74_test.dart
index 500cd21..d6b9dee 100644
--- a/tests/language_2/function_type/function_type74_test.dart
+++ b/tests/language_2/function_type/function_type74_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function(int x, [Function x2]);
@@ -359,8 +359,8 @@
     }
 
     Expect.isTrue(m6 is F6<T>);
-    Expect
-        .isTrue(m6 is int Function({List<T> x}) Function<B extends core.int>());
+    Expect.isTrue(
+        m6 is int Function({List<T> x}) Function<B extends core.int>());
     Expect.isTrue(confuse(m6) is F6<T>);
     // In checked mode, verifies the type.
     x6 = m6;
diff --git a/tests/language_2/function_type/function_type75_test.dart b/tests/language_2/function_type/function_type75_test.dart
index 2ea274d..2e277f9 100644
--- a/tests/language_2/function_type/function_type75_test.dart
+++ b/tests/language_2/function_type/function_type75_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function({Function x});
diff --git a/tests/language_2/function_type/function_type76_test.dart b/tests/language_2/function_type/function_type76_test.dart
index 6ee0cf4..b5df005 100644
--- a/tests/language_2/function_type/function_type76_test.dart
+++ b/tests/language_2/function_type/function_type76_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function(int x0, {Function x});
@@ -505,8 +505,8 @@
     }
 
     Expect.isTrue(m11 is F11<T>);
-    Expect
-        .isTrue(m11 is core.List<core.int> Function(int y, {int x}) Function());
+    Expect.isTrue(
+        m11 is core.List<core.int> Function(int y, {int x}) Function());
     Expect.isTrue(confuse(m11) is F11<T>);
     // In checked mode, verifies the type.
     x11 = m11;
@@ -606,8 +606,8 @@
     }
 
     Expect.isTrue(m14 is F14<T>);
-    Expect
-        .isTrue(m14 is List<T> Function(int x, [List<Function> x2]) Function());
+    Expect.isTrue(
+        m14 is List<T> Function(int x, [List<Function> x2]) Function());
     Expect.isTrue(confuse(m14) is F14<T>);
     // In checked mode, verifies the type.
     x14 = m14;
@@ -827,8 +827,8 @@
     }
 
     Expect.isTrue(m20 is F20<T>);
-    Expect
-        .isTrue(m20 is Function Function<A>(core.List<core.int> x) Function());
+    Expect.isTrue(
+        m20 is Function Function<A>(core.List<core.int> x) Function());
     Expect.isTrue(confuse(m20) is F20<T>);
     // In checked mode, verifies the type.
     x20 = m20;
diff --git a/tests/language_2/function_type/function_type77_test.dart b/tests/language_2/function_type/function_type77_test.dart
index 52cee15..6ffd0bd 100644
--- a/tests/language_2/function_type/function_type77_test.dart
+++ b/tests/language_2/function_type/function_type77_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function(int y, {Function x});
diff --git a/tests/language_2/function_type/function_type78_test.dart b/tests/language_2/function_type/function_type78_test.dart
index 57d57ee..2d78785 100644
--- a/tests/language_2/function_type/function_type78_test.dart
+++ b/tests/language_2/function_type/function_type78_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function(List<Function> x);
@@ -592,8 +592,8 @@
     }
 
     Expect.isTrue(m13 is F13<T>);
-    Expect
-        .isTrue(m13 is List<T> Function(int x1) Function<B extends core.int>());
+    Expect.isTrue(
+        m13 is List<T> Function(int x1) Function<B extends core.int>());
     Expect.isTrue(confuse(m13) is F13<T>);
     // In checked mode, verifies the type.
     x13 = m13;
diff --git a/tests/language_2/function_type/function_type79_test.dart b/tests/language_2/function_type/function_type79_test.dart
index 2207d49..3fb7995 100644
--- a/tests/language_2/function_type/function_type79_test.dart
+++ b/tests/language_2/function_type/function_type79_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function([List<Function> x]);
diff --git a/tests/language_2/function_type/function_type7_test.dart b/tests/language_2/function_type/function_type7_test.dart
index 0e12135..5a56e1e 100644
--- a/tests/language_2/function_type/function_type7_test.dart
+++ b/tests/language_2/function_type/function_type7_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(int x, [int x2]);
@@ -742,8 +742,8 @@
     }
 
     Expect.isTrue(m16 is F16<T>);
-    Expect
-        .isTrue(m16 is Function([int x1]) Function<B extends core.int>(int x));
+    Expect.isTrue(
+        m16 is Function([int x1]) Function<B extends core.int>(int x));
     Expect.isTrue(confuse(m16) is F16<T>);
     // In checked mode, verifies the type.
     x16 = m16;
diff --git a/tests/language_2/function_type/function_type80_test.dart b/tests/language_2/function_type/function_type80_test.dart
index 91485c1..631c3ec 100644
--- a/tests/language_2/function_type/function_type80_test.dart
+++ b/tests/language_2/function_type/function_type80_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function(int x0, [List<Function> x]);
diff --git a/tests/language_2/function_type/function_type81_test.dart b/tests/language_2/function_type/function_type81_test.dart
index 05c8007..5803180 100644
--- a/tests/language_2/function_type/function_type81_test.dart
+++ b/tests/language_2/function_type/function_type81_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function(int y, [List<Function> x]);
@@ -313,8 +313,8 @@
     }
 
     Expect.isTrue(m5 is F5<T>);
-    Expect
-        .isTrue(m5 is int Function(int x, [List<Function> x1]) Function(int x));
+    Expect.isTrue(
+        m5 is int Function(int x, [List<Function> x1]) Function(int x));
     Expect.isTrue(confuse(m5) is F5<T>);
     // In checked mode, verifies the type.
     x5 = m5;
diff --git a/tests/language_2/function_type/function_type82_test.dart b/tests/language_2/function_type/function_type82_test.dart
index 71bcf1f..3b37480 100644
--- a/tests/language_2/function_type/function_type82_test.dart
+++ b/tests/language_2/function_type/function_type82_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function(List<Function> x0);
@@ -957,8 +957,8 @@
     }
 
     Expect.isTrue(m22 is F22<T>);
-    Expect
-        .isTrue(m22 is List<A> Function<A>(A x) Function<B extends core.int>());
+    Expect.isTrue(
+        m22 is List<A> Function<A>(A x) Function<B extends core.int>());
     Expect.isTrue(confuse(m22) is F22<T>);
     // In checked mode, verifies the type.
     x22 = m22;
diff --git a/tests/language_2/function_type/function_type83_test.dart b/tests/language_2/function_type/function_type83_test.dart
index 20cc30b..7713741 100644
--- a/tests/language_2/function_type/function_type83_test.dart
+++ b/tests/language_2/function_type/function_type83_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function([List<Function> x1]);
@@ -316,8 +316,8 @@
     }
 
     Expect.isTrue(m4 is F4<T>);
-    Expect
-        .isTrue(m4 is int Function(int x1) Function<B extends core.int>(int x));
+    Expect.isTrue(
+        m4 is int Function(int x1) Function<B extends core.int>(int x));
     Expect.isTrue(confuse(m4) is F4<T>);
     // In checked mode, verifies the type.
     x4 = m4;
@@ -700,8 +700,8 @@
     }
 
     Expect.isTrue(m15 is F15<T>);
-    Expect
-        .isTrue(m15 is List<T> Function() Function<B extends core.int>(int x));
+    Expect.isTrue(
+        m15 is List<T> Function() Function<B extends core.int>(int x));
     Expect.isTrue(confuse(m15) is F15<T>);
     // In checked mode, verifies the type.
     x15 = m15;
diff --git a/tests/language_2/function_type/function_type84_test.dart b/tests/language_2/function_type/function_type84_test.dart
index ee8f633..12f5a59 100644
--- a/tests/language_2/function_type/function_type84_test.dart
+++ b/tests/language_2/function_type/function_type84_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function(int x1, [List<Function> x2]);
@@ -359,8 +359,8 @@
     }
 
     Expect.isTrue(m7 is F7<T>);
-    Expect
-        .isTrue(m7 is Function Function(int x0, [List<Function> x]) Function());
+    Expect.isTrue(
+        m7 is Function Function(int x0, [List<Function> x]) Function());
     Expect.isTrue(confuse(m7) is F7<T>);
     // In checked mode, verifies the type.
     x7 = m7;
@@ -433,8 +433,8 @@
     }
 
     Expect.isTrue(m9 is F9<T>);
-    Expect
-        .isTrue(m9 is List<Function> Function(int x, [Function x2]) Function());
+    Expect.isTrue(
+        m9 is List<Function> Function(int x, [Function x2]) Function());
     Expect.isTrue(confuse(m9) is F9<T>);
     // In checked mode, verifies the type.
     x9 = m9;
@@ -581,8 +581,8 @@
     }
 
     Expect.isTrue(m14 is F14<T>);
-    Expect
-        .isTrue(m14 is List<T> Function(int x0, {List<Function> x}) Function());
+    Expect.isTrue(
+        m14 is List<T> Function(int x0, {List<Function> x}) Function());
     Expect.isTrue(confuse(m14) is F14<T>);
     // In checked mode, verifies the type.
     x14 = m14;
diff --git a/tests/language_2/function_type/function_type85_test.dart b/tests/language_2/function_type/function_type85_test.dart
index 1147e0b..34a5836 100644
--- a/tests/language_2/function_type/function_type85_test.dart
+++ b/tests/language_2/function_type/function_type85_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function(int x, [List<Function> x2]);
diff --git a/tests/language_2/function_type/function_type86_test.dart b/tests/language_2/function_type/function_type86_test.dart
index a7f7436..62da594 100644
--- a/tests/language_2/function_type/function_type86_test.dart
+++ b/tests/language_2/function_type/function_type86_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function({List<Function> x});
@@ -784,8 +784,8 @@
     }
 
     Expect.isTrue(m19 is F19<T>);
-    Expect
-        .isTrue(m19 is void Function(List<T> x) Function<B extends core.int>());
+    Expect.isTrue(
+        m19 is void Function(List<T> x) Function<B extends core.int>());
     Expect.isTrue(confuse(m19) is F19<T>);
     // In checked mode, verifies the type.
     x19 = m19;
@@ -858,8 +858,8 @@
     }
 
     Expect.isTrue(m21 is F21<T>);
-    Expect
-        .isTrue(m21 is List<T> Function<A>(A x) Function<B extends core.int>());
+    Expect.isTrue(
+        m21 is List<T> Function<A>(A x) Function<B extends core.int>());
     Expect.isTrue(confuse(m21) is F21<T>);
     // In checked mode, verifies the type.
     x21 = m21;
diff --git a/tests/language_2/function_type/function_type87_test.dart b/tests/language_2/function_type/function_type87_test.dart
index 048c79f..b422aab 100644
--- a/tests/language_2/function_type/function_type87_test.dart
+++ b/tests/language_2/function_type/function_type87_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function(int x0, {List<Function> x});
diff --git a/tests/language_2/function_type/function_type88_test.dart b/tests/language_2/function_type/function_type88_test.dart
index e693d08..ef7b6ed 100644
--- a/tests/language_2/function_type/function_type88_test.dart
+++ b/tests/language_2/function_type/function_type88_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function(int y, {List<Function> x});
@@ -358,8 +358,8 @@
     }
 
     Expect.isTrue(m7 is F7<T>);
-    Expect
-        .isTrue(m7 is Function Function(int y, [List<Function> x]) Function());
+    Expect.isTrue(
+        m7 is Function Function(int y, [List<Function> x]) Function());
     Expect.isTrue(confuse(m7) is F7<T>);
     // In checked mode, verifies the type.
     x7 = m7;
@@ -604,8 +604,8 @@
     }
 
     Expect.isTrue(m14 is F14<T>);
-    Expect
-        .isTrue(m14 is List<T> Function(int y, {List<Function> x}) Function());
+    Expect.isTrue(
+        m14 is List<T> Function(int y, {List<Function> x}) Function());
     Expect.isTrue(confuse(m14) is F14<T>);
     // In checked mode, verifies the type.
     x14 = m14;
diff --git a/tests/language_2/function_type/function_type89_test.dart b/tests/language_2/function_type/function_type89_test.dart
index 94124a3..0db0109 100644
--- a/tests/language_2/function_type/function_type89_test.dart
+++ b/tests/language_2/function_type/function_type89_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function(core.List<core.int> x);
@@ -311,8 +311,8 @@
     }
 
     Expect.isTrue(m5 is F5<T>);
-    Expect
-        .isTrue(m5 is int Function(int x1, {List<Function> x}) Function(int x));
+    Expect.isTrue(
+        m5 is int Function(int x1, {List<Function> x}) Function(int x));
     Expect.isTrue(confuse(m5) is F5<T>);
     // In checked mode, verifies the type.
     x5 = m5;
@@ -385,8 +385,8 @@
     }
 
     Expect.isTrue(m8 is F8<T>);
-    Expect
-        .isTrue(m8 is Function Function(int x2, [List<T> x3]) Function(int x));
+    Expect.isTrue(
+        m8 is Function Function(int x2, [List<T> x3]) Function(int x));
     Expect.isTrue(confuse(m8) is F8<T>);
     // In checked mode, verifies the type.
     x8 = m8;
diff --git a/tests/language_2/function_type/function_type8_test.dart b/tests/language_2/function_type/function_type8_test.dart
index 3a41b6a..09a6382 100644
--- a/tests/language_2/function_type/function_type8_test.dart
+++ b/tests/language_2/function_type/function_type8_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function({int x});
@@ -340,8 +340,8 @@
     }
 
     Expect.isTrue(m6 is F6<T>);
-    Expect
-        .isTrue(m6 is int Function(int y, [core.List<core.int> x]) Function());
+    Expect.isTrue(
+        m6 is int Function(int y, [core.List<core.int> x]) Function());
     Expect.isTrue(confuse(m6) is F6<T>);
     // In checked mode, verifies the type.
     x6 = m6;
diff --git a/tests/language_2/function_type/function_type90_test.dart b/tests/language_2/function_type/function_type90_test.dart
index 72730b2..0e79526 100644
--- a/tests/language_2/function_type/function_type90_test.dart
+++ b/tests/language_2/function_type/function_type90_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function([core.List<core.int> x]);
@@ -353,8 +353,8 @@
     }
 
     Expect.isTrue(m6 is F6<T>);
-    Expect
-        .isTrue(m6 is Function Function(int x) Function<B extends core.int>());
+    Expect.isTrue(
+        m6 is Function Function(int x) Function<B extends core.int>());
     Expect.isTrue(confuse(m6) is F6<T>);
     // In checked mode, verifies the type.
     x6 = m6;
@@ -931,8 +931,8 @@
     }
 
     Expect.isTrue(m22 is F22<T>);
-    Expect
-        .isTrue(m22 is void Function<A>(int x) Function<B extends core.int>());
+    Expect.isTrue(
+        m22 is void Function<A>(int x) Function<B extends core.int>());
     Expect.isTrue(confuse(m22) is F22<T>);
     // In checked mode, verifies the type.
     x22 = m22;
diff --git a/tests/language_2/function_type/function_type91_test.dart b/tests/language_2/function_type/function_type91_test.dart
index ee66322..3470fb1 100644
--- a/tests/language_2/function_type/function_type91_test.dart
+++ b/tests/language_2/function_type/function_type91_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function(int x0, [core.List<core.int> x]);
diff --git a/tests/language_2/function_type/function_type92_test.dart b/tests/language_2/function_type/function_type92_test.dart
index 5803358..81c3b6e 100644
--- a/tests/language_2/function_type/function_type92_test.dart
+++ b/tests/language_2/function_type/function_type92_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function(int y, [core.List<core.int> x]);
@@ -189,8 +189,8 @@
     }
 
     Expect.isTrue(m1 is F1<T>);
-    Expect
-        .isTrue(m1 is core.List<core.int> Function(int x0, [List<Function> x]));
+    Expect.isTrue(
+        m1 is core.List<core.int> Function(int x0, [List<Function> x]));
     Expect.isTrue(confuse(m1) is F1<T>);
     // In checked mode, verifies the type.
     x1 = m1;
@@ -407,8 +407,8 @@
     }
 
     Expect.isTrue(m9 is F9<T>);
-    Expect
-        .isTrue(m9 is List<Function> Function(int x0, {Function x}) Function());
+    Expect.isTrue(
+        m9 is List<Function> Function(int x0, {Function x}) Function());
     Expect.isTrue(confuse(m9) is F9<T>);
     // In checked mode, verifies the type.
     x9 = m9;
diff --git a/tests/language_2/function_type/function_type93_test.dart b/tests/language_2/function_type/function_type93_test.dart
index 52f9134..88541fd 100644
--- a/tests/language_2/function_type/function_type93_test.dart
+++ b/tests/language_2/function_type/function_type93_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function(core.List<core.int> x0);
@@ -193,8 +193,8 @@
     }
 
     Expect.isTrue(m1 is F1<T>);
-    Expect
-        .isTrue(m1 is core.List<core.int> Function(int y, [List<Function> x]));
+    Expect.isTrue(
+        m1 is core.List<core.int> Function(int y, [List<Function> x]));
     Expect.isTrue(confuse(m1) is F1<T>);
     // In checked mode, verifies the type.
     x1 = m1;
@@ -290,8 +290,8 @@
     }
 
     Expect.isTrue(m5 is F5<T>);
-    Expect
-        .isTrue(m5 is int Function(int y, {List<Function> x}) Function(int x));
+    Expect.isTrue(
+        m5 is int Function(int y, {List<Function> x}) Function(int x));
     Expect.isTrue(confuse(m5) is F5<T>);
     // In checked mode, verifies the type.
     x5 = m5;
@@ -587,8 +587,8 @@
     }
 
     Expect.isTrue(m14 is F14<T>);
-    Expect
-        .isTrue(m14 is List<T> Function(core.List<core.int> x) Function(int x));
+    Expect.isTrue(
+        m14 is List<T> Function(core.List<core.int> x) Function(int x));
     Expect.isTrue(confuse(m14) is F14<T>);
     // In checked mode, verifies the type.
     x14 = m14;
diff --git a/tests/language_2/function_type/function_type94_test.dart b/tests/language_2/function_type/function_type94_test.dart
index 3deba73..e7ebcdf 100644
--- a/tests/language_2/function_type/function_type94_test.dart
+++ b/tests/language_2/function_type/function_type94_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function([core.List<core.int> x1]);
diff --git a/tests/language_2/function_type/function_type95_test.dart b/tests/language_2/function_type/function_type95_test.dart
index d2d8fda..16b9e08 100644
--- a/tests/language_2/function_type/function_type95_test.dart
+++ b/tests/language_2/function_type/function_type95_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function(int x1, [core.List<core.int> x2]);
@@ -872,8 +872,8 @@
     }
 
     Expect.isTrue(m21 is F21<T>);
-    Expect
-        .isTrue(m21 is Function<A>(int x) Function<B extends core.int>(int x));
+    Expect.isTrue(
+        m21 is Function<A>(int x) Function<B extends core.int>(int x));
     Expect.isTrue(confuse(m21) is F21<T>);
     // In checked mode, verifies the type.
     x21 = m21;
diff --git a/tests/language_2/function_type/function_type96_test.dart b/tests/language_2/function_type/function_type96_test.dart
index 4c668a1..65abf5d 100644
--- a/tests/language_2/function_type/function_type96_test.dart
+++ b/tests/language_2/function_type/function_type96_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function(int x, [core.List<core.int> x2]);
@@ -432,8 +432,8 @@
     }
 
     Expect.isTrue(m9 is F9<T>);
-    Expect
-        .isTrue(m9 is List<Function> Function(int y, {Function x}) Function());
+    Expect.isTrue(
+        m9 is List<Function> Function(int y, {Function x}) Function());
     Expect.isTrue(confuse(m9) is F9<T>);
     // In checked mode, verifies the type.
     x9 = m9;
@@ -457,8 +457,8 @@
     }
 
     Expect.isTrue(m10 is F10<T>);
-    Expect
-        .isTrue(m10 is List<Function> Function(int x0, [List<T> x]) Function());
+    Expect.isTrue(
+        m10 is List<Function> Function(int x0, [List<T> x]) Function());
     Expect.isTrue(confuse(m10) is F10<T>);
     // In checked mode, verifies the type.
     x10 = m10;
diff --git a/tests/language_2/function_type/function_type97_test.dart b/tests/language_2/function_type/function_type97_test.dart
index eaa3458..78df65f 100644
--- a/tests/language_2/function_type/function_type97_test.dart
+++ b/tests/language_2/function_type/function_type97_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function({core.List<core.int> x});
@@ -192,8 +192,8 @@
     }
 
     Expect.isTrue(m1 is F1<T>);
-    Expect
-        .isTrue(m1 is core.List<core.int> Function(int x, [List<Function> x2]));
+    Expect.isTrue(
+        m1 is core.List<core.int> Function(int x, [List<Function> x2]));
     Expect.isTrue(confuse(m1) is F1<T>);
     // In checked mode, verifies the type.
     x1 = m1;
diff --git a/tests/language_2/function_type/function_type98_test.dart b/tests/language_2/function_type/function_type98_test.dart
index b89edcb..1ea40a6 100644
--- a/tests/language_2/function_type/function_type98_test.dart
+++ b/tests/language_2/function_type/function_type98_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function(int x0, {core.List<core.int> x});
@@ -660,8 +660,8 @@
     }
 
     Expect.isTrue(m15 is F15<T>);
-    Expect
-        .isTrue(m15 is Function(int y, [int x]) Function<B extends core.int>());
+    Expect.isTrue(
+        m15 is Function(int y, [int x]) Function<B extends core.int>());
     Expect.isTrue(confuse(m15) is F15<T>);
     // In checked mode, verifies the type.
     x15 = m15;
@@ -860,8 +860,8 @@
     }
 
     Expect.isTrue(m21 is F21<T>);
-    Expect
-        .isTrue(m21 is Function<A>(Function x) Function<B extends core.int>());
+    Expect.isTrue(
+        m21 is Function<A>(Function x) Function<B extends core.int>());
     Expect.isTrue(confuse(m21) is F21<T>);
     // In checked mode, verifies the type.
     x21 = m21;
diff --git a/tests/language_2/function_type/function_type99_test.dart b/tests/language_2/function_type/function_type99_test.dart
index 924fbfe..3404851 100644
--- a/tests/language_2/function_type/function_type99_test.dart
+++ b/tests/language_2/function_type/function_type99_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = Function Function(int y, {core.List<core.int> x});
@@ -219,8 +219,8 @@
     }
 
     Expect.isTrue(m1 is F1<T>);
-    Expect
-        .isTrue(m1 is core.List<core.int> Function(int x0, {List<Function> x}));
+    Expect.isTrue(
+        m1 is core.List<core.int> Function(int x0, {List<Function> x}));
     Expect.isTrue(confuse(m1) is F1<T>);
     // In checked mode, verifies the type.
     x1 = m1;
diff --git a/tests/language_2/function_type/function_type9_test.dart b/tests/language_2/function_type/function_type9_test.dart
index ae7be56..bfcd9fa 100644
--- a/tests/language_2/function_type/function_type9_test.dart
+++ b/tests/language_2/function_type/function_type9_test.dart
@@ -15,8 +15,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 
 typedef F0<T> = int Function(int x0, {int x});
diff --git a/tests/language_2/function_type/test_generator.dart b/tests/language_2/function_type/test_generator.dart
index 0389209..74b1884 100644
--- a/tests/language_2/function_type/test_generator.dart
+++ b/tests/language_2/function_type/test_generator.dart
@@ -571,8 +571,8 @@
 import 'dart:core' as core;
 import 'package:expect/expect.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(f) => f;
 """;
 
diff --git a/tests/language_2/function_type3_test.dart b/tests/language_2/function_type3_test.dart
index 6c10c9f..75322bc 100644
--- a/tests/language_2/function_type3_test.dart
+++ b/tests/language_2/function_type3_test.dart
@@ -5,10 +5,10 @@
 import "package:expect/expect.dart";
 
 class A<T> {
-  @NoInline()
+  @pragma('dart2js:noInline')
   A();
 
-  @NoInline()
+  @pragma('dart2js:noInline')
   foo() => new B<T>();
 }
 
diff --git a/tests/language_2/function_type_in_constant_test.dart b/tests/language_2/function_type_in_constant_test.dart
index dac6dc7..53aed9c 100644
--- a/tests/language_2/function_type_in_constant_test.dart
+++ b/tests/language_2/function_type_in_constant_test.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.
 
-/// Test that consts can be created with inlined function types as type 
+/// Test that consts can be created with inlined function types as type
 /// arguments.
 
 import 'package:expect/expect.dart';
@@ -11,14 +11,19 @@
   const A();
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 test(a, b) {
   Expect.notEquals(a, b);
 }
 
-
 main() {
-  test(const A<int Function()>(), const A<String Function()>()); /// 01: ok
-  test(const A<int>(), const A<String Function()>()); /// 02: ok
-  test(const A<int Function()>(), const A<String>()); /// 03: ok
+  test(const A<int Function()>(), const A<String Function()>());
+
+  /// 01: ok
+  test(const A<int>(), const A<String Function()>());
+
+  /// 02: ok
+  test(const A<int Function()>(), const A<String>());
+
+  /// 03: ok
 }
diff --git a/tests/language_2/generic_methods_generic_function_result_test.dart b/tests/language_2/generic_methods_generic_function_result_test.dart
index cc583fe9..3a391ec 100644
--- a/tests/language_2/generic_methods_generic_function_result_test.dart
+++ b/tests/language_2/generic_methods_generic_function_result_test.dart
@@ -2,8 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// VMOptions=--error-on-bad-type
-
 // Verify that function type parameter S can be resolved in bar's result type.
 // Verify that generic function types are not allowed as type arguments.
 
diff --git a/tests/language_2/generic_methods_type_expression_test.dart b/tests/language_2/generic_methods_type_expression_test.dart
index c83b20a..80d4376 100644
--- a/tests/language_2/generic_methods_type_expression_test.dart
+++ b/tests/language_2/generic_methods_type_expression_test.dart
@@ -29,7 +29,7 @@
 bool f9<T>(Object o) => o is Map<T, String>;
 
 class IsMap<A> {
-  @NoInline()
+  @pragma('dart2js:noInline')
   bool check<B>(o) => o is Map<A, B>;
 }
 
diff --git a/tests/language_2/hello_dart_test.dart b/tests/language_2/hello_dart_test.dart
index 0af0005..d53705b 100644
--- a/tests/language_2/hello_dart_test.dart
+++ b/tests/language_2/hello_dart_test.dart
@@ -3,7 +3,7 @@
 // BSD-style license that can be found in the LICENSE file.
 // Simple test program invoked with an option to eagerly
 // compile all code that is loaded in the isolate.
-// VMOptions=--compile_all --error-on-bad-type
+// VMOptions=--compile_all
 
 class HelloDartTest {
   static testMain() {
diff --git a/tests/language_2/implicit_super_constructor_call_test.dart b/tests/language_2/implicit_super_constructor_call_test.dart
index c1d25d3..fca1a62 100644
--- a/tests/language_2/implicit_super_constructor_call_test.dart
+++ b/tests/language_2/implicit_super_constructor_call_test.dart
@@ -9,7 +9,7 @@
 class A {
   final x;
 
-  @NoInline()
+  @pragma('dart2js:noInline')
   A({this.x: "foo"}) {
     Expect.equals("foo", x.toString());
   }
diff --git a/tests/language_2/inv_cse_licm.dart b/tests/language_2/inv_cse_licm.dart
new file mode 100644
index 0000000..6bb89445
--- /dev/null
+++ b/tests/language_2/inv_cse_licm.dart
@@ -0,0 +1,501 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// VMOptions=--deterministic --enable-inlining-annotations --optimization_counter_threshold=10
+
+import 'dart:typed_data';
+import "package:expect/expect.dart";
+
+const String NeverInline = 'NeverInline';
+
+// Tests a few situations in which invariant instructions
+// can be subject to CSE and LICM.
+
+@NeverInline
+int cse1(Int32List a, int n) {
+  int x = a[0];
+  for (int i = 0; i < n; i++) {
+    // The a[0] null check, bounds check, and the actual load can be
+    // CSEed with the instructions above even if loop is not taken.
+    x += a[0] * a[i];
+  }
+  return x;
+}
+
+@NeverInline
+int cse2(Int32List a, int n) {
+  int x = a[0];
+  for (int i = 0; i < n; i++) {
+    // The a[0] null check, bounds check, but not the actual load can be
+    // CSEed with the instructions above, since the value of the load
+    // changes in the loop.
+    a[i] = a[0] + 1;
+  }
+  return x;
+}
+
+@NeverInline
+int licm1(Int32List a, int n) {
+  int x = 0;
+  for (int i = 0; i < n; i++) {
+    // The a[0] null check, bounds check, and the actual load cannot
+    // be LICMed, since the loop may be non-taken.
+    x += a[0] * a[i];
+  }
+  return x;
+}
+
+@NeverInline
+int licm2(Int32List a) {
+  int x = 0;
+  for (int i = 0; i < 16; i++) {
+    // The a[0] null check, bounds check, and the actual load can be
+    // LICMed, since the loop is always-taken.
+    x += a[0] * a[i];
+  }
+  return x;
+}
+
+@NeverInline
+int licm3(Int32List a, bool cond) {
+  int x = 0;
+  for (int i = 0; i < 16; i++) {
+    // The a[0] null check, bounds check, and the actual load cannot
+    // be LICMed, since the condition may be non-taken (and we don't
+    // hoist invariant conditions).
+    if (cond) x += a[0] * a[i];
+  }
+  return x;
+}
+
+@NeverInline
+int licm3_brk(Int32List a, bool cond) {
+  int x = 0;
+  for (int i = 0; i < 16; i++) {
+    // The a[0] null check, bounds check, and the actual load cannot
+    // be LICMed, since the condition may be taken (and we don't
+    // hoist invariant conditions).
+    if (cond) break;
+    x += a[0] * a[i];
+  }
+  return x;
+}
+
+int global;
+
+@NeverInline
+int licm4(Int32List a) {
+  int x = 0;
+  for (int i = 0; i < 16; i++) {
+    // The a[0] null check, bounds check, and the actual load cannot
+    // be LICMed, since something visible happens before an exception
+    // may be thrown.
+    global++;
+    x += a[0] * a[i];
+  }
+  return x;
+}
+
+@NeverInline
+int licm5(Int32List a) {
+  int x = 0;
+  // Anything in the loop header can be LICMed.
+  for (int i = 0; i < a[1]; i++) {
+    x++;
+  }
+  return x;
+}
+
+@NeverInline
+int licm6(Int32List a, int n) {
+  int x = 0;
+  int i = 0;
+  do {
+    // The a[0] null check, bounds check, and the actual load can be
+    // LICMed, since this "header" is always-taken.
+    x += a[0] * a[i++];
+  } while (i < n);
+  return x;
+}
+
+@NeverInline
+int licm7(Int32List a, int n) {
+  int x = 0;
+  int i = 0;
+  while (true) {
+    // The a[0] null check, bounds check, and the actual load can be
+    // LICMed, since this "header" is always-taken.
+    x += a[0] * a[i++];
+    if (i >= n) break;
+  }
+  return x;
+}
+
+@NeverInline
+int licm8(Int32List a, int n) {
+  int x = 0;
+  int i = 0;
+  while (true) {
+    if (i >= n) break;
+    // No LICM at this point, loop body may not be taken.
+    x += a[0] * a[i++];
+  }
+  return x;
+}
+
+@NeverInline
+int licm9(Int32List a) {
+  int x = 0;
+  int i = 0;
+  while (true) {
+    if (i >= 16) break;
+    // The a[0] null check, bounds check, and the actual load can be
+    // LICMed, since the loop is always-taken.
+    x += a[0] * a[i++];
+  }
+  return x;
+}
+
+@NeverInline
+int licm10(Int32List a, bool cond) {
+  int x = 0;
+  int i = 0;
+  while (true) {
+    if (i >= 16) break;
+    // The a[0] null check, bounds check, and the actual load cannot
+    // be LICMed, since the condition may be non-taken (and we don't
+    // hoist invariant conditions).
+    if (cond) x += a[0] * a[i];
+    i++;
+  }
+  return x;
+}
+
+@NeverInline
+int licm10_brk(Int32List a, bool cond) {
+  int x = 0;
+  int i = 0;
+  while (true) {
+    if (i >= 16) break;
+    // The a[0] null check, bounds check, and the actual load cannot
+    // be LICMed, since the condition may be taken (and we don't
+    // hoist invariant conditions).
+    if (cond) break;
+    x += a[0] * a[i++];
+  }
+  return x;
+}
+
+@NeverInline
+int licm11(Int32List a) {
+  int x = 0;
+  while (true) {
+    // Anything in the loop header can be LICMed.
+    if (x > a[1]) break;
+    x++;
+  }
+  return x;
+}
+
+@NeverInline
+int foo() {
+  return global--;
+}
+
+@NeverInline
+int licm12(Int32List a) {
+  int x = 0;
+  int i = 0;
+  // Side-effect loop bound.
+  for (int i = 0; i < foo(); i++) {
+    x += a[0] * a[i++];
+  }
+  return x;
+}
+
+doTests() {
+  var x = new Int32List(0);
+  var a = new Int32List(16);
+  for (int i = 0; i < 16; i++) {
+    a[i] = i + 1;
+  }
+
+  Expect.throws(() {
+    cse1(null, 0);
+  }, (e) {
+    return e is NoSuchMethodError;
+  });
+  Expect.throws(() {
+    cse1(null, 1);
+  }, (e) {
+    return e is NoSuchMethodError;
+  });
+  Expect.throws(() {
+    cse1(x, 0);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.throws(() {
+    cse1(x, 1);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.equals(1, cse1(a, 0));
+  Expect.equals(137, cse1(a, 16));
+
+  Expect.throws(() {
+    cse2(null, 0);
+  }, (e) {
+    return e is NoSuchMethodError;
+  });
+  Expect.throws(() {
+    cse2(null, 1);
+  }, (e) {
+    return e is NoSuchMethodError;
+  });
+  Expect.throws(() {
+    cse2(x, 0);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.throws(() {
+    cse2(x, 1);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.equals(1, cse2(a, 0));
+  Expect.equals(1, cse2(a, 16));
+  Expect.equals(2, a[0]);
+  for (int i = 1; i < 16; i++) {
+    Expect.equals(3, a[i]);
+  }
+
+  Expect.equals(0, licm1(null, 0));
+  Expect.throws(() {
+    licm1(null, 1);
+  }, (e) {
+    return e is NoSuchMethodError;
+  });
+  Expect.equals(0, licm1(x, 0));
+  Expect.throws(() {
+    licm1(x, 1);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.equals(0, licm1(a, 0));
+  Expect.equals(94, licm1(a, 16));
+
+  Expect.throws(() {
+    licm2(null);
+  }, (e) {
+    return e is NoSuchMethodError;
+  });
+  Expect.throws(() {
+    licm2(x);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.equals(94, licm2(a));
+
+  Expect.equals(0, licm3(null, false));
+  Expect.throws(() {
+    licm3(null, true);
+  }, (e) {
+    return e is NoSuchMethodError;
+  });
+  Expect.equals(0, licm3(x, false));
+  Expect.throws(() {
+    licm3(x, true);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.equals(0, licm3(a, false));
+  Expect.equals(94, licm3(a, true));
+
+  Expect.equals(0, licm3_brk(null, true));
+  Expect.throws(() {
+    licm3_brk(null, false);
+  }, (e) {
+    return e is NoSuchMethodError;
+  });
+  Expect.equals(0, licm3_brk(x, true));
+  Expect.throws(() {
+    licm3_brk(x, false);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.equals(0, licm3_brk(a, true));
+  Expect.equals(94, licm3_brk(a, false));
+
+  global = 0;
+  Expect.throws(() {
+    licm4(null);
+  }, (e) {
+    return e is NoSuchMethodError;
+  });
+  Expect.equals(1, global);
+  Expect.throws(() {
+    licm4(x);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.equals(2, global);
+  Expect.equals(94, licm4(a));
+  Expect.equals(18, global);
+
+  Expect.throws(() {
+    licm5(null);
+  }, (e) {
+    return e is NoSuchMethodError;
+  });
+  Expect.throws(() {
+    licm5(x);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.equals(3, licm5(a));
+
+  Expect.throws(() {
+    licm6(null, 0);
+  }, (e) {
+    return e is NoSuchMethodError;
+  });
+  Expect.throws(() {
+    licm6(null, 1);
+  }, (e) {
+    return e is NoSuchMethodError;
+  });
+  Expect.throws(() {
+    licm6(x, 0);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.throws(() {
+    licm6(x, 1);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.equals(4, licm6(a, 0));
+  Expect.equals(94, licm6(a, 16));
+
+  Expect.throws(() {
+    licm7(null, 0);
+  }, (e) {
+    return e is NoSuchMethodError;
+  });
+  Expect.throws(() {
+    licm7(null, 1);
+  }, (e) {
+    return e is NoSuchMethodError;
+  });
+  Expect.throws(() {
+    licm7(x, 0);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.throws(() {
+    licm7(x, 1);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.equals(4, licm7(a, 0));
+  Expect.equals(94, licm7(a, 16));
+
+  Expect.equals(0, licm8(null, 0));
+  Expect.throws(() {
+    licm8(null, 1);
+  }, (e) {
+    return e is NoSuchMethodError;
+  });
+  Expect.equals(0, licm8(x, 0));
+  Expect.throws(() {
+    licm8(x, 1);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.equals(0, licm8(a, 0));
+  Expect.equals(94, licm8(a, 16));
+
+  Expect.throws(() {
+    licm9(null);
+  }, (e) {
+    return e is NoSuchMethodError;
+  });
+  Expect.throws(() {
+    licm9(x);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.equals(94, licm9(a));
+
+  Expect.equals(0, licm10(null, false));
+  Expect.throws(() {
+    licm10(null, true);
+  }, (e) {
+    return e is NoSuchMethodError;
+  });
+  Expect.equals(0, licm10(x, false));
+  Expect.throws(() {
+    licm10(x, true);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.equals(0, licm10(a, false));
+  Expect.equals(94, licm10(a, true));
+
+  Expect.equals(0, licm10_brk(null, true));
+  Expect.throws(() {
+    licm10_brk(null, false);
+  }, (e) {
+    return e is NoSuchMethodError;
+  });
+  Expect.equals(0, licm10_brk(x, true));
+  Expect.throws(() {
+    licm10_brk(x, false);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.equals(0, licm10_brk(a, true));
+  Expect.equals(94, licm10_brk(a, false));
+
+  Expect.throws(() {
+    licm11(null);
+  }, (e) {
+    return e is NoSuchMethodError;
+  });
+  Expect.throws(() {
+    licm11(x);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.equals(4, licm11(a));
+
+  global = 0;
+  Expect.equals(0, licm12(null));
+  Expect.equals(-1, global);
+  Expect.equals(0, licm12(x));
+  Expect.equals(-2, global);
+  global = 16;
+  Expect.throws(() {
+    licm12(null);
+  }, (e) {
+    return e is NoSuchMethodError;
+  });
+  Expect.equals(15, global);
+  Expect.throws(() {
+    licm12(x);
+  }, (e) {
+    return e is RangeError;
+  });
+  Expect.equals(14, global);
+  Expect.equals(28, licm12(a));
+  Expect.equals(8, global);
+}
+
+main() {
+  // Repeat to enter JIT (when applicable).
+  for (int i = 0; i < 20; i++) {
+    doTests();
+  }
+}
diff --git a/tests/language_2/invalid_assignment_to_postfix_increment_test.dart b/tests/language_2/invalid_assignment_to_postfix_increment_test.dart
index 329ea3c..eda617b 100644
--- a/tests/language_2/invalid_assignment_to_postfix_increment_test.dart
+++ b/tests/language_2/invalid_assignment_to_postfix_increment_test.dart
@@ -3,9 +3,9 @@
 // BSD-style license that can be found in the LICENSE file.
 
 void f(int x, int y) {
-  x++ = y; //# 01: compile-time error
-  x++ += y; //# 02: compile-time error
-  x++ ??= y; //# 03: compile-time error
+  x++ = y; //# 01: syntax error
+  x++ += y; //# 02: syntax error
+  x++ ??= y; //# 03: syntax error
 }
 
 main() {
diff --git a/tests/language_2/issue21957_test.dart b/tests/language_2/issue21957_double_test.dart
similarity index 100%
rename from tests/language_2/issue21957_test.dart
rename to tests/language_2/issue21957_double_test.dart
diff --git a/tests/language_2/issue21957_float32x4_test.dart b/tests/language_2/issue21957_float32x4_test.dart
new file mode 100644
index 0000000..f364261
--- /dev/null
+++ b/tests/language_2/issue21957_float32x4_test.dart
@@ -0,0 +1,18 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Check slow path for PotentialUnboxedStore.
+// VMOptions=--optimization_counter_threshold=-1
+
+import "dart:typed_data";
+
+main() {
+  for (int i = 0; i < 1000000; i++) {
+    new A();
+  }
+}
+
+class A {
+  var a = new Float32x4(1.0, 2.0, 3.0, 4.0);
+}
diff --git a/tests/language_2/issue21957_float64x2_test.dart b/tests/language_2/issue21957_float64x2_test.dart
new file mode 100644
index 0000000..5b51722
--- /dev/null
+++ b/tests/language_2/issue21957_float64x2_test.dart
@@ -0,0 +1,18 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Check slow path for PotentialUnboxedStore.
+// VMOptions=--optimization_counter_threshold=-1
+
+import "dart:typed_data";
+
+main() {
+  for (int i = 0; i < 1000000; i++) {
+    new A();
+  }
+}
+
+class A {
+  var a = new Float64x2(1.0, 2.0);
+}
diff --git a/tests/language_2/issue34147_test.dart b/tests/language_2/issue34147_test.dart
new file mode 100644
index 0000000..69ac743
--- /dev/null
+++ b/tests/language_2/issue34147_test.dart
@@ -0,0 +1,72 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'package:expect/expect.dart';
+
+void main() {
+  conditionalTest();
+  orTest();
+  andTest();
+  ifTest();
+  forTest();
+  whileTest();
+  doTest();
+  notTest();
+}
+
+void conditionalTest() {
+  bool x = null;
+  Expect.throwsAssertionError(() => x ? 1 : 0);
+}
+
+void orTest() {
+  bool x = null;
+  Expect.throwsAssertionError(() => x || x);
+  Expect.throwsAssertionError(() => x || false);
+  Expect.throwsAssertionError(() => x || true);
+  Expect.throwsAssertionError(() => false || x);
+  Expect.isTrue(true || x);
+}
+
+void andTest() {
+  bool x = null;
+  Expect.throwsAssertionError(() => x && x);
+  Expect.throwsAssertionError(() => x && false);
+  Expect.throwsAssertionError(() => x && true);
+  Expect.isFalse(false && x);
+  Expect.throwsAssertionError(() => true && x);
+}
+
+void ifTest() {
+  bool x = null;
+  Expect.throwsAssertionError(() {
+    if (x) {}
+  });
+}
+
+void forTest() {
+  bool x = null;
+  Expect.throwsAssertionError(() {
+    for (; x;) {}
+  });
+}
+
+void whileTest() {
+  bool x = null;
+  Expect.throwsAssertionError(() {
+    while (x) {}
+  });
+}
+
+void doTest() {
+  bool x = null;
+  Expect.throwsAssertionError(() {
+    do {} while (x);
+  });
+}
+
+void notTest() {
+  bool x = null;
+  Expect.throwsAssertionError(() => !x);
+}
diff --git a/tests/language_2/label8_test.dart b/tests/language_2/label8_test.dart
index 751d35b..866fcc7 100644
--- a/tests/language_2/label8_test.dart
+++ b/tests/language_2/label8_test.dart
@@ -6,7 +6,7 @@
   int i;
   // Grammar doesn't allow label on block for switch statement.
   switch(i)
-    L: //# 01: compile-time error
+    L: //# 01: syntax error
   {
     case 111:
       while (false) {
diff --git a/tests/language_2/language_2.status b/tests/language_2/language_2.status
index 4f4d666..2f8711e 100644
--- a/tests/language_2/language_2.status
+++ b/tests/language_2/language_2.status
@@ -21,7 +21,7 @@
 mixin_class_from_core_library_test: Fail # Issue 34488
 nested_generic_closure_test: Fail # Issue 28515
 
-[ $compiler != compare_analyzer_cfe ]
+[ $compiler != compare_analyzer_cfe && $compiler != spec_parser ]
 mixin_constructor_forwarding/const_constructor_test/none: CompileTimeError # Issue 32223
 mixin_constructor_forwarding/const_constructor_with_field_test/none: CompileTimeError # Issue 32223
 mixin_constructor_forwarding/optional_named_parameters_test/none: CompileTimeError # Issue 31543
@@ -53,6 +53,12 @@
 stacktrace_demangle_ctors_test: SkipByDesign # Names are not scrubbed.
 type_checks_in_factory_method_test: SkipByDesign # Requires checked mode.
 
+[ $runtime == vm ]
+spread_collections/const_error_test/05: Crash
+spread_collections/const_error_test/06: Crash
+spread_collections/const_error_test/07: Crash
+spread_collections/const_error_test/08: Crash
+
 [ $fasta ]
 partial_instantiation_static_bounds_check_test/01: MissingCompileTimeError # Issue 34327
 partial_instantiation_static_bounds_check_test/02: MissingCompileTimeError # Issue 34327
@@ -61,10 +67,7 @@
 [ $compiler != app_jitk && $compiler != dartk && $compiler != dartkb && $compiler != dartkp && $mode == debug && $runtime == vm ]
 built_in_identifier_type_annotation_test/set: Crash # Not supported by legacy VM front-end.
 
-[ $compiler != compare_analyzer_cfe && $compiler != dart2analyzer && $compiler != dart2js && $compiler != dartdevc && !$fasta && $strong ]
-type_promotion_functions_test: CompileTimeError # Issue 30895: This test requires a complete rewrite for 2.0.
-
-[ $compiler != compare_analyzer_cfe && $compiler != dart2js && !$fasta && $strong ]
+[ $compiler != compare_analyzer_cfe && $compiler != dart2js && $compiler != spec_parser && !$fasta && $strong ]
 compile_time_constant_static5_test/11: CompileTimeError # Issue 30546
 compile_time_constant_static5_test/16: CompileTimeError # Issue 30546
 compile_time_constant_static5_test/21: CompileTimeError # Issue 30546
@@ -76,8 +79,6 @@
 # errors aren't detected by fasta, but reported by back ends as compile-time
 # errors.
 [ $compiler != dart2analyzer && $compiler != dart2js && $runtime != dart_precompiled && $runtime != vm && $fasta ]
-function_type_parameter2_negative_test: Fail
-function_type_parameter_negative_test: Fail
 implicit_creation/implicit_const_not_default_values_test/e12: MissingCompileTimeError
 implicit_creation/implicit_const_not_default_values_test/e15: MissingCompileTimeError
 implicit_creation/implicit_const_not_default_values_test/e18: MissingCompileTimeError
diff --git a/tests/language_2/language_2_analyzer.status b/tests/language_2/language_2_analyzer.status
index 2ceb689..2a073ac 100644
--- a/tests/language_2/language_2_analyzer.status
+++ b/tests/language_2/language_2_analyzer.status
@@ -17,7 +17,6 @@
 const_cast2_test/none: CompileTimeError # failing-by-design: Not a const expression, see Issue #34334
 covariant_subtyping_with_mixin_test: CompileTimeError # Issue 34329
 dynamic_prefix_core_test/01: MissingCompileTimeError # failing-by-design: #34339
-emit_const_fields_test: CompileTimeError # failing-by-design: #34340
 enum_syntax_test/05: Fail # Issue 34341
 enum_syntax_test/06: Fail # Issue 34341
 f_bounded_quantification2_test: CompileTimeError # Issue 34583
@@ -101,15 +100,6 @@
 try_catch_on_syntax_test/10: MissingCompileTimeError
 try_catch_on_syntax_test/11: MissingCompileTimeError
 type_inference_inconsistent_inheritance_test: MissingCompileTimeError
-type_promotion_functions_test/02: CompileTimeError
-type_promotion_functions_test/03: CompileTimeError
-type_promotion_functions_test/04: CompileTimeError
-type_promotion_functions_test/09: CompileTimeError
-type_promotion_functions_test/11: CompileTimeError
-type_promotion_functions_test/12: CompileTimeError
-type_promotion_functions_test/13: CompileTimeError
-type_promotion_functions_test/14: CompileTimeError
-type_promotion_functions_test/none: CompileTimeError
 type_variable_static_context_negative_test: Fail # Issue 12161
 vm/debug_break_enabled_vm_test: Skip
 vm/debug_break_vm_test/*: Skip
diff --git a/tests/language_2/language_2_dart2js.status b/tests/language_2/language_2_dart2js.status
index 9bfaf74..7f34dad 100644
--- a/tests/language_2/language_2_dart2js.status
+++ b/tests/language_2/language_2_dart2js.status
@@ -67,6 +67,9 @@
 [ $compiler != dart2js ]
 minify_closure_variable_collision_test: SkipByDesign # Regression test for dart2js
 
+[ $builder_tag == dart2js_production && $compiler == dart2js ]
+control_flow_collections/for_non_bool_condition_test: Crash # Issue 36442
+
 [ $compiler == dart2js && $runtime == chrome ]
 field_override_optimization_test: RuntimeError
 
@@ -477,7 +480,6 @@
 deferred_redirecting_factory_test: RuntimeError
 double_int_to_string_test: RuntimeError, OK # non JS number semantics
 dynamic_prefix_core_test/none: CompileTimeError
-emit_const_fields_test: CompileTimeError
 enum_mirror_test: RuntimeError
 example_constructor_test: RuntimeError
 expect_test: RuntimeError, OK # Issue 13080
@@ -589,15 +591,6 @@
 truncdiv_test: RuntimeError # non JS number semantics - Issue 15246
 type_error_test: RuntimeError
 type_literal_test: RuntimeError
-type_promotion_functions_test/02: CompileTimeError
-type_promotion_functions_test/03: CompileTimeError
-type_promotion_functions_test/04: CompileTimeError
-type_promotion_functions_test/09: CompileTimeError
-type_promotion_functions_test/11: CompileTimeError
-type_promotion_functions_test/12: CompileTimeError
-type_promotion_functions_test/13: CompileTimeError
-type_promotion_functions_test/14: CompileTimeError
-type_promotion_functions_test/none: CompileTimeError
 type_promotion_more_specific_test/04: CompileTimeError
 
 [ $compiler == dart2js && !$strong ]
diff --git a/tests/language_2/language_2_dartdevc.status b/tests/language_2/language_2_dartdevc.status
index 310f9a1..63b4104 100644
--- a/tests/language_2/language_2_dartdevc.status
+++ b/tests/language_2/language_2_dartdevc.status
@@ -35,7 +35,6 @@
 deferred_load_library_wrong_args_test/01: MissingRuntimeError, RuntimeError # Issue 29920
 double_identical_test: RuntimeError # Negative and positive zero are distinct, but not in ddc
 dynamic_prefix_core_test/01: MissingCompileTimeError
-emit_const_fields_test: CompileTimeError
 enum_syntax_test/05: MissingCompileTimeError
 enum_syntax_test/06: MissingCompileTimeError
 execute_finally6_test: RuntimeError # Issue 29920
@@ -107,6 +106,7 @@
 mixin_super_use_test: CompileTimeError # Issue 34806
 mock_writable_final_private_field_test: CompileTimeError # Issue 30848
 nested_generic_closure_test: CompileTimeError
+nnbd/*: Skip
 override_inheritance_field_test/42: CompileTimeError
 part_of_multiple_libs_test/01: MissingCompileTimeError
 part_refers_to_core_library_test/01: Crash
@@ -137,15 +137,6 @@
 try_catch_on_syntax_test/10: MissingCompileTimeError
 try_catch_on_syntax_test/11: MissingCompileTimeError
 type_inference_inconsistent_inheritance_test: MissingCompileTimeError
-type_promotion_functions_test/02: CompileTimeError # Issue 30895
-type_promotion_functions_test/03: CompileTimeError # Issue 30895
-type_promotion_functions_test/04: CompileTimeError # Issue 30895
-type_promotion_functions_test/09: CompileTimeError # Issue 30895
-type_promotion_functions_test/11: CompileTimeError # Issue 30895
-type_promotion_functions_test/12: CompileTimeError # Issue 30895
-type_promotion_functions_test/13: CompileTimeError # Issue 30895
-type_promotion_functions_test/14: CompileTimeError # Issue 30895
-type_promotion_functions_test/none: CompileTimeError # Issue 30895
 void/return_future_future_or_void_async_error1_test/none: CompileTimeError # issue #34319
 void/return_future_or_future_or_void_sync_error2_test/none: CompileTimeError # issue #34319
 void/return_future_or_void_sync_error4_test/none: CompileTimeError # issue #34319
@@ -177,7 +168,6 @@
 config_import_test: RuntimeError
 const_cast1_test/02: MissingCompileTimeError
 const_constructor3_test/04: MissingCompileTimeError
-const_constructor_nonconst_field_test/01: MissingCompileTimeError
 const_constructor_nonconst_param_test/01: MissingCompileTimeError
 const_dynamic_type_literal_test/02: MissingCompileTimeError
 const_map2_test/00: MissingCompileTimeError
@@ -189,12 +179,9 @@
 deferred_load_library_wrong_args_test/01: CompileTimeError
 double_identical_test: RuntimeError # Negative and positive zero are distinct, but not in ddk
 dynamic_prefix_core_test/none: CompileTimeError
-emit_const_fields_test: CompileTimeError # Issue 31533
 external_test/21: CompileTimeError
 external_test/24: CompileTimeError
 function_propagation_test: RuntimeError
-function_type_parameter2_negative_test: Fail
-function_type_parameter_negative_test: Fail
 generic_function_bounds_test: RuntimeError
 generic_no_such_method_dispatcher_simple_test: CompileTimeError # Warning: Superclass has no method named 'foo'.
 generic_no_such_method_dispatcher_test: CompileTimeError # Issue 31533
@@ -285,15 +272,6 @@
 syncstar_yield_test/capturing: RuntimeError
 syncstar_yield_test/copyParameters: RuntimeError # Expect.equals(expected: <2>, actual: <3>) fails.
 try_catch_test/01: MissingCompileTimeError
-type_promotion_functions_test/02: CompileTimeError # Issue 31537
-type_promotion_functions_test/03: CompileTimeError # Issue 31537
-type_promotion_functions_test/04: CompileTimeError # Issue 31537
-type_promotion_functions_test/09: CompileTimeError # Issue 31537
-type_promotion_functions_test/11: CompileTimeError # Issue 31537
-type_promotion_functions_test/12: CompileTimeError # Issue 31537
-type_promotion_functions_test/13: CompileTimeError # Issue 31537
-type_promotion_functions_test/14: CompileTimeError # Issue 31537
-type_promotion_functions_test/none: CompileTimeError # Issue 31537
 type_promotion_logical_and_test/01: MissingCompileTimeError
 type_promotion_more_specific_test/04: CompileTimeError # Issue 31533
 
@@ -404,6 +382,7 @@
 stacktrace_test: RuntimeError # Issue 29920; Expect.isTrue(false) fails.
 string_literals_test: RuntimeError # Expect.equals(expected: <\x00\x0A\x0D\x7F\xFF\u{FFFF}\u{D800}\u{DC00}\u{DBFF}\u{DFFF}>, actual: <\x00\x0A\x0D\x7F\xFF\u{FFFF}\u{FFFD}\u{FFFD}\u{FFFD}\u{FFFD}\u{FFFD}\u{FFFD}\u{FFFD}\u{FFFD}\u{FFFD}\u{FFFD}\u{FFFD}\u{FFFD}>) fails.
 super_test: RuntimeError # Expect.equals(expected: <0>, actual: <2>) fails.
+superinterface_variance/*: Skip # Issue dart-lang/language#113
 switch_label2_test: RuntimeError # Issue 29920; UnimplementedError: node <ShadowContinueSwitchStatement> see https://github.com/dart-lang/sdk/issues/29352 `continue #L1;
 switch_label_test: RuntimeError # Issue 29920; UnimplementedError: node <ShadowContinueSwitchStatement> see https://github.com/dart-lang/sdk/issues/29352 `continue #L1;
 switch_try_catch_test: RuntimeError # Issue 29920; Expect.throws: Unexpected 'UnimplementedError: node <ShadowContinueSwitchStatement> see https://github.com/dart-lang/sdk/issues/29352 `continue #L1;
diff --git a/tests/language_2/language_2_kernel.status b/tests/language_2/language_2_kernel.status
index 5b34f04..f5b2b09 100644
--- a/tests/language_2/language_2_kernel.status
+++ b/tests/language_2/language_2_kernel.status
@@ -37,16 +37,6 @@
 const_nested_test: RuntimeError
 const_string_test: RuntimeError
 constructor12_test: RuntimeError
-control_flow_collections/for_inference_test: DartkCrash
-control_flow_collections/for_test: DartkCrash
-control_flow_collections/for_variable_test: DartkCrash
-control_flow_collections/if_const_test: DartkCrash
-control_flow_collections/if_inference_test: CompileTimeError
-control_flow_collections/if_test: DartkCrash
-control_flow_collections/map_set_ambiguity_test: CompileTimeError
-control_flow_collections/syntax_error_test/09: DartkCrash
-control_flow_collections/syntax_error_test/10: DartkCrash
-control_flow_collections/syntax_test: CompileTimeError
 covariant_subtyping_test: RuntimeError
 ct_const_test: RuntimeError
 cyclic_type2_test: CompileTimeError
@@ -58,7 +48,6 @@
 deferred_redirecting_factory_test: RuntimeError
 deferred_static_seperate_test: RuntimeError
 dynamic_prefix_core_test/none: CompileTimeError
-emit_const_fields_test: CompileTimeError
 example_constructor_test: RuntimeError
 external_test/10: MissingRuntimeError
 external_test/13: MissingRuntimeError
@@ -133,26 +122,12 @@
 regress_29025_test: CompileTimeError
 regress_29405_test: CompileTimeError
 regress_30339_test: CompileTimeError
-spread_collections/const_test: CompileTimeError
-spread_collections/inference_test: CompileTimeError
-spread_collections/map_set_ambiguity_test: CompileTimeError
-spread_collections/spread_test: CompileTimeError
-spread_collections/syntax_test: CompileTimeError
 string_interpolation_and_buffer_test: RuntimeError
 super_bound_closure_test/none: CompileTimeError
 super_test: RuntimeError
 type_alias_equality_test/03: RuntimeError # Issue 32783
 type_alias_equality_test/04: RuntimeError # Issue 32783
 type_error_test: RuntimeError
-type_promotion_functions_test/02: CompileTimeError
-type_promotion_functions_test/03: CompileTimeError
-type_promotion_functions_test/04: CompileTimeError
-type_promotion_functions_test/09: CompileTimeError
-type_promotion_functions_test/11: CompileTimeError
-type_promotion_functions_test/12: CompileTimeError
-type_promotion_functions_test/13: CompileTimeError
-type_promotion_functions_test/14: CompileTimeError
-type_promotion_functions_test/none: CompileTimeError
 type_promotion_more_specific_test/04: CompileTimeError
 vm/bool_check_stack_traces_test/02: RuntimeError # Issue 33584
 vm/regress_27671_test: SkipByDesign # Relies on string comparison of exception message which may return '<optimized out>'
@@ -164,21 +139,8 @@
 private_method_tearoff_test: RuntimeError
 
 [ $compiler == dartkp ]
-control_flow_collections/for_inference_test: CompileTimeError
-control_flow_collections/for_test: CompileTimeError
-control_flow_collections/for_variable_test: CompileTimeError
-control_flow_collections/if_const_test: CompileTimeError
-control_flow_collections/if_inference_test: CompileTimeError
-control_flow_collections/if_test: CompileTimeError
-control_flow_collections/map_set_ambiguity_test: CompileTimeError
-control_flow_collections/syntax_test: CompileTimeError
 covariant_subtyping_test: RuntimeError
 generic_no_such_method_dispatcher_test: RuntimeError # Issue 31424
-spread_collections/const_test: CompileTimeError
-spread_collections/inference_test: CompileTimeError
-spread_collections/map_set_ambiguity_test: CompileTimeError
-spread_collections/spread_test: CompileTimeError
-spread_collections/syntax_test: CompileTimeError
 web_int_literals_test/*: SkipByDesign # Test applies only to JavaScript targets
 
 [ $compiler == fasta ]
@@ -198,16 +160,6 @@
 const_constructor_nonconst_param_test/01: MissingCompileTimeError
 constructor5_test: CompileTimeError # Verification error
 constructor6_test: CompileTimeError # Verification error
-control_flow_collections/for_inference_test: Crash
-control_flow_collections/for_test: Crash
-control_flow_collections/for_variable_test: Crash
-control_flow_collections/if_const_test: Crash
-control_flow_collections/if_inference_test: CompileTimeError
-control_flow_collections/if_test: Crash
-control_flow_collections/map_set_ambiguity_test: CompileTimeError
-control_flow_collections/syntax_error_test/09: Crash
-control_flow_collections/syntax_error_test/10: Crash
-control_flow_collections/syntax_test: CompileTimeError
 implicit_creation/implicit_const_not_default_values_test/e1: MissingCompileTimeError
 implicit_creation/implicit_const_not_default_values_test/e10: MissingCompileTimeError
 implicit_creation/implicit_const_not_default_values_test/e11: MissingCompileTimeError
@@ -229,11 +181,6 @@
 implicit_creation/implicit_const_not_default_values_test/e7: MissingCompileTimeError
 implicit_creation/implicit_const_not_default_values_test/e8: MissingCompileTimeError
 mixin_method_override_test/G4: Crash # Assertion error: mixin_full_resolution.dart': 'src.typeParameters.length == dst.typeParameters.length': is not true.
-spread_collections/const_test: CompileTimeError
-spread_collections/inference_test: CompileTimeError
-spread_collections/map_set_ambiguity_test: CompileTimeError
-spread_collections/spread_test: CompileTimeError
-spread_collections/syntax_test: CompileTimeError
 vm/regress_33469_test/01: MissingCompileTimeError
 vm/regress_33469_test/02: MissingCompileTimeError
 vm/regress_33469_test/03: MissingCompileTimeError
@@ -247,6 +194,8 @@
 async_return_types_test/nestedFuture: MissingCompileTimeError # Issue 33068
 const_cast2_test/01: CompileTimeError # Issue 32517
 const_cast2_test/none: CompileTimeError # Issue 32517
+constants_2018/potential_const_dynamic_test/sh3: CompileTimeError # New test introduced in https://dart-review.googlesource.com/c/sdk/+/97510
+constants_2018/potential_const_type_test/sh3: CompileTimeError # New test introduced in https://dart-review.googlesource.com/c/sdk/+/97510
 deferred_inheritance_constraints_test/extends: MissingCompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 30273.
 deferred_inheritance_constraints_test/implements: MissingCompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 30273.
 deferred_inheritance_constraints_test/mixin: MissingCompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 30273.
@@ -267,6 +216,8 @@
 mixin_declaration/mixin_declaration_superinvocation_application_test/07: MissingCompileTimeError
 mixin_declaration/mixin_declaration_superinvocation_application_test/08: MissingCompileTimeError
 mixin_method_override_test/G5: Crash # Issue 34354
+nnbd/*: Skip
+override_inheritance_field_test/42: MissingCompileTimeError
 regress_22976_test/*: CompileTimeError # Issue 31935
 set_literals/invalid_set_literal_test/08: MissingCompileTimeError # Requires constant evaluation
 set_literals/invalid_set_literal_test/09: MissingCompileTimeError # Requires constant evaluation
@@ -277,6 +228,156 @@
 set_literals/invalid_set_literal_test/32: MissingCompileTimeError # Requires constant evaluation
 set_literals/invalid_set_literal_test/33: MissingCompileTimeError # Requires constant evaluation
 set_literals/invalid_set_literal_test/34: MissingCompileTimeError # Requires constant evaluation
+superinterface_variance/abstract_class_error_test/01: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/02: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/04: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/05: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/06: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/07: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/08: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/10: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/11: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/12: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/13: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/14: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/16: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/17: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/18: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/19: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/20: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/22: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/23: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/24: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/26: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/27: Crash # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/29: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/30: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/31: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/32: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/34: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/35: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_class_error_test/36: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/01: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/02: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/04: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/05: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/06: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/07: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/08: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/10: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/11: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/12: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/13: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/14: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/16: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/17: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/18: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/19: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/20: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/22: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/23: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/24: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/25: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/26: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/28: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/29: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/30: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/31: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/32: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/34: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/35: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/abstract_mixin_application_error_test/36: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/01: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/02: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/04: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/05: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/06: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/07: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/08: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/10: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/11: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/12: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/13: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/14: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/16: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/17: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/18: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/19: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/20: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/22: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/23: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/24: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/26: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/27: Crash # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/29: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/30: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/31: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/32: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/34: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/35: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_class_error_test/36: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/01: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/02: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/04: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/05: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/06: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/07: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/08: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/10: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/11: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/12: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/13: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/14: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/16: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/17: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/18: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/19: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/20: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/22: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/23: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/24: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/25: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/26: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/28: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/29: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/30: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/31: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/32: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/34: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/35: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/concrete_mixin_application_error_test/36: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/covariance_test: CompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/01: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/02: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/04: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/05: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/06: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/13: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/14: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/16: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/17: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/18: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/19: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/20: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/22: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/23: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/24: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/27: Crash # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/31: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/32: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/34: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/35: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/36: MissingCompileTimeError # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/37: Crash # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/38: Crash # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/40: Crash # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/41: Crash # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/42: Crash # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/43: Crash # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/44: Crash # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/46: Crash # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/47: Crash # Issue dart-lang/language#113
+superinterface_variance/mixin_error_test/48: Crash # Issue dart-lang/language#113
 syntax_test/28: MissingCompileTimeError # Issue 29763 - low priority
 syntax_test/29: MissingCompileTimeError # Issue 29763 - low priority
 syntax_test/30: MissingCompileTimeError # Issue 29763 - low priority
@@ -290,38 +391,6 @@
 vm/debug_break_enabled_vm_test/none: CompileTimeError # KernelVM bug: Bad test using extended break syntax.
 vm/regress_27201_test: CompileTimeError # Fasta/KernelVM bug: Deferred loading kernel issue 30273.
 
-[ $arch != simarm && $arch != simarm64 && $arch != simdbc64 && $compiler == dartk ]
-control_flow_collections/for_inference_test: DartkCrash
-control_flow_collections/for_test: DartkCrash
-control_flow_collections/for_variable_test: DartkCrash
-control_flow_collections/if_const_test: DartkCrash
-control_flow_collections/if_inference_test: CompileTimeError
-control_flow_collections/if_test: DartkCrash
-control_flow_collections/map_set_ambiguity_test: CompileTimeError
-control_flow_collections/syntax_error_test/09: DartkCrash
-control_flow_collections/syntax_error_test/10: DartkCrash
-control_flow_collections/syntax_test: CompileTimeError
-spread_collections/const_test: CompileTimeError
-spread_collections/inference_test: CompileTimeError
-spread_collections/map_set_ambiguity_test: CompileTimeError
-spread_collections/spread_test: CompileTimeError
-spread_collections/syntax_test: CompileTimeError
-
-[ $arch == simdbc64 && $compiler == dartk ]
-control_flow_collections/for_inference_test: CompileTimeError
-control_flow_collections/for_test: CompileTimeError
-control_flow_collections/for_variable_test: CompileTimeError
-control_flow_collections/if_const_test: CompileTimeError
-control_flow_collections/if_inference_test: CompileTimeError
-control_flow_collections/if_test: CompileTimeError
-control_flow_collections/map_set_ambiguity_test: CompileTimeError
-control_flow_collections/syntax_test: CompileTimeError
-spread_collections/const_test: CompileTimeError
-spread_collections/inference_test: CompileTimeError
-spread_collections/map_set_ambiguity_test: CompileTimeError
-spread_collections/spread_test: CompileTimeError
-spread_collections/syntax_test: CompileTimeError
-
 [ $builder_tag == obfuscated && $compiler == dartkp ]
 generic_function_dcall_test/01: SkipByDesign # Prints type names
 invocation_mirror_test: RuntimeError # Issue 34911
@@ -356,7 +425,6 @@
 compile_time_constant_c_test/02: MissingCompileTimeError
 compile_time_constant_o_test/01: MissingCompileTimeError # Issue 32983
 compile_time_constant_o_test/02: MissingCompileTimeError # Issue 32983
-const_constructor_nonconst_field_test/01: MissingCompileTimeError
 const_dynamic_type_literal_test/02: MissingCompileTimeError # Issue 32983
 const_syntax_test/05: MissingCompileTimeError
 identical_const_test/01: MissingCompileTimeError # Issue 32983
@@ -415,44 +483,14 @@
 assertion_initializer_const_error2_test/cc09: MissingCompileTimeError # Not reporting failed assert() at compile time.
 assertion_initializer_const_error2_test/cc10: MissingCompileTimeError # Not reporting failed assert() at compile time.
 
-[ $compiler == dartk && ($arch == simarm || $arch == simarm64) ]
-control_flow_collections/for_inference_test: CompileTimeError
-control_flow_collections/for_test: CompileTimeError
-control_flow_collections/for_variable_test: CompileTimeError
-control_flow_collections/if_const_test: CompileTimeError
-control_flow_collections/if_inference_test: CompileTimeError
-control_flow_collections/if_test: CompileTimeError
-control_flow_collections/map_set_ambiguity_test: CompileTimeError
-control_flow_collections/syntax_error_test/09: Pass
-control_flow_collections/syntax_error_test/10: Pass
-control_flow_collections/syntax_test: CompileTimeError
-spread_collections/const_test: CompileTimeError
-spread_collections/inference_test: CompileTimeError
-spread_collections/map_set_ambiguity_test: CompileTimeError
-spread_collections/spread_test: CompileTimeError
-spread_collections/syntax_test: CompileTimeError
-
 [ $compiler == dartkb && $runtime == vm && $strong ]
 async_star_test/03: Pass, RuntimeError # Please triage
 async_star_test/04: Pass, RuntimeError # Please triage
 compile_time_constant_o_test/01: Pass
 compile_time_constant_o_test/02: Pass
 const_dynamic_type_literal_test/02: Pass
-control_flow_collections/for_inference_test: CompileTimeError
-control_flow_collections/for_test: CompileTimeError
-control_flow_collections/for_variable_test: CompileTimeError
-control_flow_collections/if_const_test: CompileTimeError
-control_flow_collections/if_inference_test: CompileTimeError
-control_flow_collections/if_test: CompileTimeError
-control_flow_collections/map_set_ambiguity_test: CompileTimeError
-control_flow_collections/syntax_test: CompileTimeError
 map_literal3_test/01: Pass
 map_literal3_test/02: Pass
-spread_collections/const_test: CompileTimeError
-spread_collections/inference_test: CompileTimeError
-spread_collections/map_set_ambiguity_test: CompileTimeError
-spread_collections/spread_test: CompileTimeError
-spread_collections/syntax_test: CompileTimeError
 vm/bool_check_stack_traces_test/02: Pass
 vm/causal_async_exception_stack2_test: RuntimeError # Please triage
 vm/causal_async_exception_stack_test: RuntimeError # Please triage
@@ -463,11 +501,6 @@
 
 [ $compiler == dartkp && $mode == debug && $runtime == dart_precompiled && $strong ]
 external_test/13: Crash
-type_promotion_functions_test/05: Pass
-type_promotion_functions_test/06: Pass
-type_promotion_functions_test/07: Pass
-type_promotion_functions_test/08: Pass
-type_promotion_functions_test/10: Pass
 vm/precompiled_static_initializer_test: Pass, Slow
 
 [ $compiler == dartkp && $mode == product && $runtime == dart_precompiled && $strong ]
@@ -620,7 +653,6 @@
 deferred_static_seperate_test: RuntimeError # KernelVM bug: Deferred loading kernel issue 30273.
 deopt_inlined_function_lazy_test: Skip # Incompatible flag: --deoptimize-alot
 dynamic_prefix_core_test/none: CompileTimeError
-emit_const_fields_test: CompileTimeError # Issue 31533
 enum_mirror_test: SkipByDesign
 example_constructor_test: Fail, OK
 export_ambiguous_main_test: Skip # Issue 29895 Fail Issue 14763
@@ -639,9 +671,9 @@
 function_subtype_inline2_test: RuntimeError
 generic_instanceof2_test: RuntimeError
 generic_is_check_test: RuntimeError
-generic_methods_recursive_bound_test/03: Crash, Pass
-generic_methods_recursive_bound_test/03: MissingRuntimeError
 generic_methods_recursive_bound_test/03: Pass
+generic_methods_recursive_bound_test/03: MissingRuntimeError
+generic_methods_recursive_bound_test/03: Crash, Pass
 generic_methods_reuse_type_variables_test: Pass
 generic_no_such_method_dispatcher_simple_test: CompileTimeError # Issue 31533
 generic_no_such_method_dispatcher_test: CompileTimeError # Issue 31533
@@ -726,15 +758,6 @@
 super_bound_closure_test/none: CompileTimeError # Issue 31533
 super_test: Fail, OK
 syntax_test/00: MissingCompileTimeError
-type_promotion_functions_test/02: CompileTimeError # Issue 31537
-type_promotion_functions_test/03: CompileTimeError # Issue 31537
-type_promotion_functions_test/04: CompileTimeError # Issue 31537
-type_promotion_functions_test/09: CompileTimeError # Issue 31537
-type_promotion_functions_test/11: CompileTimeError # Issue 31537
-type_promotion_functions_test/12: CompileTimeError # Issue 31537
-type_promotion_functions_test/13: CompileTimeError # Issue 31537
-type_promotion_functions_test/14: CompileTimeError # Issue 31537
-type_promotion_functions_test/none: CompileTimeError # Issue 31537
 type_promotion_logical_and_test/01: MissingCompileTimeError
 type_promotion_more_specific_test/04: CompileTimeError # Issue 31533
 vm/causal_async_exception_stack2_test: SkipByDesign
@@ -786,7 +809,6 @@
 constants_test/05: MissingCompileTimeError
 deferred_load_library_wrong_args_test/01: CompileTimeError
 dynamic_prefix_core_test/none: CompileTimeError
-emit_const_fields_test: CompileTimeError
 external_test/21: CompileTimeError
 external_test/24: CompileTimeError
 generic_no_such_method_dispatcher_simple_test: CompileTimeError
@@ -845,15 +867,6 @@
 setter_no_getter_test/01: CompileTimeError
 super_bound_closure_test/none: CompileTimeError
 try_catch_test/01: MissingCompileTimeError
-type_promotion_functions_test/02: CompileTimeError
-type_promotion_functions_test/03: CompileTimeError
-type_promotion_functions_test/04: CompileTimeError
-type_promotion_functions_test/09: CompileTimeError
-type_promotion_functions_test/11: CompileTimeError
-type_promotion_functions_test/12: CompileTimeError
-type_promotion_functions_test/13: CompileTimeError
-type_promotion_functions_test/14: CompileTimeError
-type_promotion_functions_test/none: CompileTimeError
 type_promotion_more_specific_test/04: CompileTimeError
 
 [ $compiler == fasta && !$strong ]
@@ -1185,7 +1198,6 @@
 deferred_static_seperate_test: RuntimeError # KernelVM bug: Deferred loading kernel issue 30273.
 disassemble_test: Pass, Slow, Crash # dartbug.com/34971
 dynamic_prefix_core_test/none: CompileTimeError
-emit_const_fields_test: CompileTimeError # Issue 31533
 example_constructor_test: Fail, OK
 external_test/10: MissingRuntimeError # KernelVM bug: Unbound external.
 external_test/13: MissingRuntimeError # KernelVM bug: Unbound external.
@@ -1245,15 +1257,6 @@
 super_bound_closure_test/none: CompileTimeError # Issue 31533
 super_call4_test/01: MissingCompileTimeError
 super_test: Fail, OK
-type_promotion_functions_test/02: CompileTimeError # Issue 31537
-type_promotion_functions_test/03: CompileTimeError # Issue 31537
-type_promotion_functions_test/04: CompileTimeError # Issue 31537
-type_promotion_functions_test/09: CompileTimeError # Issue 31537
-type_promotion_functions_test/11: CompileTimeError # Issue 31537
-type_promotion_functions_test/12: CompileTimeError # Issue 31537
-type_promotion_functions_test/13: CompileTimeError # Issue 31537
-type_promotion_functions_test/14: CompileTimeError # Issue 31537
-type_promotion_functions_test/none: CompileTimeError # Issue 31537
 type_promotion_logical_and_test/01: MissingCompileTimeError
 type_promotion_more_specific_test/04: CompileTimeError # Issue 31533
 vm/bool_check_stack_traces_test/02: RuntimeError # Issue 33584
@@ -1980,12 +1983,6 @@
 type_inference_accessor_ref_test/06: MissingCompileTimeError
 type_inference_circularity_test: MissingCompileTimeError
 type_inference_inconsistent_inheritance_test: MissingCompileTimeError
-type_promotion_functions_test/01: MissingCompileTimeError
-type_promotion_functions_test/05: MissingCompileTimeError
-type_promotion_functions_test/06: MissingCompileTimeError
-type_promotion_functions_test/07: MissingCompileTimeError
-type_promotion_functions_test/08: MissingCompileTimeError
-type_promotion_functions_test/10: MissingCompileTimeError
 type_promotion_parameter_test/01: MissingCompileTimeError
 type_promotion_parameter_test/02: MissingCompileTimeError
 type_promotion_parameter_test/03: MissingCompileTimeError
diff --git a/tests/language_2/language_2_spec_parser.status b/tests/language_2/language_2_spec_parser.status
index 3692117..c8867ce 100644
--- a/tests/language_2/language_2_spec_parser.status
+++ b/tests/language_2/language_2_spec_parser.status
@@ -10,6 +10,8 @@
 config_import_corelib_test: Fail # Uses conditional import.
 config_import_test: Fail # Uses conditional import.
 const_native_factory_test: Skip # Uses `native`.
+deep_nesting_expression_test: Skip # JVM stack overflow.
+deep_nesting_statement_test: Skip # JVM stack overflow.
 double_invalid_test: Skip # Contains illegaly formatted double.
 external_test/21: Fail # Test expects `runtime error`, it is a syntax error.
 getter_declaration_negative_test: Fail # Negative, uses getter with parameter.
@@ -24,6 +26,7 @@
 is_not_class4_negative_test: Fail # Negative, uses `a is A is A`.
 issue1578_negative_test: Fail # Negative, is line noise.
 issue_1751477_test: Skip # Times out: 9 levels, exponential blowup => 430 secs.
+large_class_declaration_test: Skip # JVM stack overflow.
 list_literal2_negative_test: Skip # Negative, not syntax.
 list_literal_negative_test: Fail # Negative, uses `new List<int>[1, 2]`.
 map_literal2_negative_test: Skip # Negative, not syntax.
diff --git a/tests/language_2/language_2_vm.status b/tests/language_2/language_2_vm.status
index 68980e7..fef4d22 100644
--- a/tests/language_2/language_2_vm.status
+++ b/tests/language_2/language_2_vm.status
@@ -30,3 +30,6 @@
 
 [ !$strong && ($runtime == dart_precompiled || $runtime == vm) ]
 *: SkipByDesign # tests/language has the non-strong mode versions of these tests.
+
+[ $runtime == dart_precompiled || $runtime == vm ]
+superinterface_variance/*: Skip # Issue dart-lang/language#113
diff --git a/tests/language_2/larger_implicit_getter_test.dart b/tests/language_2/larger_implicit_getter_test.dart
index b28c1e0..cfadc00 100644
--- a/tests/language_2/larger_implicit_getter_test.dart
+++ b/tests/language_2/larger_implicit_getter_test.dart
@@ -4091,8 +4091,8 @@
   [2364.4759911280776, 3842.7700224365044]
 ];
 
-@AssumeDynamic()
-@NoInline()
+@pragma('dart2js:assumeDynamic')
+@pragma('dart2js:noInline')
 confuse(x) => x;
 
 main() {
diff --git a/tests/language_2/mixin_proto_test.dart b/tests/language_2/mixin_proto_test.dart
index b508718..b8b19f1 100644
--- a/tests/language_2/mixin_proto_test.dart
+++ b/tests/language_2/mixin_proto_test.dart
@@ -26,8 +26,8 @@
   bar() => 499;
 }
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(x) => x;
 
 main() {
diff --git a/tests/language_2/nnbd/static_errors/nullable_supertype_test.dart b/tests/language_2/nnbd/static_errors/nullable_supertype_test.dart
new file mode 100644
index 0000000..711fefd
--- /dev/null
+++ b/tests/language_2/nnbd/static_errors/nullable_supertype_test.dart
@@ -0,0 +1,19 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=non-nullable
+
+// Test that it is an error to use a nullable type as a supertype.
+import 'package:expect/expect.dart';
+import 'dart:core';
+import 'dart:core' as core;
+
+main() {}
+
+class A {}
+class B extends A? {} //# 01: compile-time error
+class B implements A? {} //# 02: compile-time error
+class B with A? {} //# 03: compile-time error
+mixin B on A? {} //# 04: compile-time error
+mixin B implements A? {} //# 05: compile-time error
diff --git a/tests/language_2/nnbd/syntax/null_assertion_ambiguous_test.dart b/tests/language_2/nnbd/syntax/null_assertion_ambiguous_test.dart
new file mode 100644
index 0000000..b2955e9
--- /dev/null
+++ b/tests/language_2/nnbd/syntax/null_assertion_ambiguous_test.dart
@@ -0,0 +1,86 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=non-nullable
+import 'package:expect/expect.dart';
+
+class C {
+  C operator*(int? other) => this;
+  Object? operator-() => null;
+}
+
+// Test ambiguous cases of trailing "!" syntax.  Where possible, we verify that
+// both the compiler and the runtime resolve the ambiguity correctly.
+main() async {
+  Object? a = null;
+
+  // `throw a!` means `throw (a!)`, not `(throw a)!`.  Since it's a compile-time
+  // error for a thrown expression to be potentially nullable, this is
+  // sufficient to verify that the compiler has resolved the ambiguity
+  // correctly.  Unforunately there's no good way to test the runtime behavior
+  // because `throw a` wouldn't complete anyway.
+  Expect.throws(() {
+      throw a!;
+  });
+
+  // `() => a!` means `() => (a!)`, not `(() => a)!`.  We check the compile-time
+  // behavior by trying to assign to a function returning non-null.  We check
+  // the runtime behavior by ensuring that a call to the closure causes an
+  // exception in the correct circumstances.
+  var x1 = () => a!;
+  Object Function() x2 = x1;
+  Expect.throws(() {
+      x1();
+  });
+
+  // `x = a!` means `x = (a!)`, not `(x = a)!`.  We check the compile-time
+  // behavior by trying to assign to a non-nullable variable.  We check the
+  // runtime behavior by verifying that the exception is thrown before an
+  // assignment occurs.
+  Object x3;
+  Expect.throws(() {
+      x3 = a!;
+  });
+  Object? x4 = 0;
+  Expect.throws(() {
+      x4 = a!;
+  });
+  Expect.equals(x4, 0);
+
+  // `true ? null : a!` means `true ? null : (a!)`, not `(true ? null : a)!`.
+  // We check the compile-time behavior by checking that the inferred type of
+  // the expression is nullable.  We check the runtime behavior by verifying
+  // that a null value can propagate from the true branch of the conditional.
+  var x5 = true ? null : a!;
+  x5 = null;
+
+  // `x * i!` means `x * (i!)`, not `(x * i)!`.  We check the compile-time
+  // behavior by checking that the multiplication is accepted even though i is
+  // nullable.  We check the runtime behavior by using an object whose operator*
+  // ignores its argument, and verify that the appropriate exception is still
+  // thrown.
+  var x6 = 2;
+  int? i = 2;
+  x6 * i!;
+  var x7 = new C();
+  Expect.throws(() {
+      x7 * i!;
+  });
+
+  // `-x!` means `-(x!)`, not `(-x)!`.  We check the compile-time behavior by
+  // checking that the negation is accepted even though x is nullable.  We check
+  // the runtime behavior by using an object whose operator- returns null.
+  int? x8 = 2;
+  -x8!;
+  var x9 = new C();
+  -x9!;
+
+  // `await x!` means `await (x!)`, not `(await x)!`.  We check the compile-time
+  // behavior by checking that the inferred type of the expression is nullable.
+  // We check the runtime behavior by ensuring that the future completes to a
+  // null value, and this does not produce an exception.
+  var x10 = new Future<Object?>.value(null);
+  var x11 = await x10!;
+  x11 = null;
+}
diff --git a/tests/language_2/nnbd/syntax/null_assertion_test.dart b/tests/language_2/nnbd/syntax/null_assertion_test.dart
new file mode 100644
index 0000000..4b27e00
--- /dev/null
+++ b/tests/language_2/nnbd/syntax/null_assertion_test.dart
@@ -0,0 +1,75 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=non-nullable
+
+// Test that the trailing "!" is accepted after a sampling of expression
+// syntaxes.  Verify that the compiler understands the resulting type to be
+// non-nullable by constructing a list containing the expression, and assigning
+// it to List<Object>.  Where possible, verify that the runtime implements the
+// proper null-check semantics by verifying that the presence of `null` causes
+// an exception to be thrown.
+import 'package:expect/expect.dart';
+
+class C {
+  const C();
+
+  Object? get x => null;
+
+  void f() {}
+}
+
+Object? f() => null;
+
+main() {
+  List<Object> listOfObject;
+
+  var x1 = [0!];
+  listOfObject = x1;
+
+  var x2 = [true!];
+  listOfObject = x2;
+
+  var x3 = ["foo"!];
+  listOfObject = x3;
+
+  var x4 = [#foo!];
+  listOfObject = x4;
+
+  var x5 = [[1]!];
+  listOfObject = x5;
+
+  var x6 = [{1:2}!];
+  listOfObject = x6;
+
+  var x7 = [{1}!];
+  listOfObject = x7;
+
+  var x8 = [new C()!];
+  listOfObject = x8;
+
+  var x9 = [const C()!];
+  listOfObject = x9;
+
+  Expect.throws(() {
+      var x10 = [f()!];
+      listOfObject = x10;
+  });
+
+  C c = new C();
+  Expect.throws(() {
+      var x11 = [c.x!];
+      listOfObject = x11;
+  });
+
+  var g = f;
+  Expect.throws(() {
+      var x12 = [g()!];
+      listOfObject = x12;
+  });
+
+  int i = 0;
+  var x13 = [i++!];
+  listOfObject = x13;
+}
diff --git a/tests/language_2/nnbd/syntax/nullable_type_ambiguous_test.dart b/tests/language_2/nnbd/syntax/nullable_type_ambiguous_test.dart
new file mode 100644
index 0000000..e6f6ad6
--- /dev/null
+++ b/tests/language_2/nnbd/syntax/nullable_type_ambiguous_test.dart
@@ -0,0 +1,30 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=non-nullable
+import 'package:expect/expect.dart';
+
+class C {
+  bool operator *(Type t) => true;
+}
+
+main() {
+  // { a as bool ? - 3 : 3 } is parsed as a set literal { (a as bool) ? - 3 : 3 }.
+  dynamic a = true;
+  var x1 = {a as bool ? -3 : 3};
+  Expect.isTrue(x1 is Set<dynamic>);
+  Set<dynamic> y1 = x1;
+
+  // { a is int ? -3 : 3 } is parsed as a set literal { (a is int) ? -3 : 3 }.
+  a = 0;
+  var x2 = {a is int ? -3 : 3};
+  Expect.isTrue(x2 is Set<dynamic>);
+  Set<dynamic> y2 = x2;
+
+  // { a * int ? -3 : 3 } is parsed as a set literal { (a * int) ? -3 : 3 }.
+  a = C();
+  var x3 = {a * int ? -3 : 3};
+  Expect.isTrue(x3 is Set<dynamic>);
+  Set<dynamic> y3 = x3;
+}
diff --git a/tests/language_2/nnbd/syntax/nullable_type_error_test.dart b/tests/language_2/nnbd/syntax/nullable_type_error_test.dart
new file mode 100644
index 0000000..3cd9b8f
--- /dev/null
+++ b/tests/language_2/nnbd/syntax/nullable_type_error_test.dart
@@ -0,0 +1,23 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=non-nullable
+import 'dart:core';
+import 'dart:core' as core;
+
+void f() {}
+
+main() {
+  // The grammar for types does not allow multiple successive ? operators on a
+  // type.  Note: we test both with and without a space between `?`s because the
+  // scanner treats `??` as a single token.
+  int?? x1 = 0; //# 01: compile-time error
+  core.int?? x2 = 0; //# 02: compile-time error
+  List<int>?? x3 = <int>[]; //# 03: compile-time error
+  void Function()?? x4 = f; //# 04: compile-time error
+  int? ? x5 = 0; //# 05: compile-time error
+  core.int? ? x6 = 0; //# 06: compile-time error
+  List<int>? ? x7 = <int>[]; //# 07: compile-time error
+  void Function()? ? x4 = f; //# 08: compile-time error
+}
diff --git a/tests/language_2/nnbd/syntax/nullable_type_test.dart b/tests/language_2/nnbd/syntax/nullable_type_test.dart
new file mode 100644
index 0000000..8ed8fc3
--- /dev/null
+++ b/tests/language_2/nnbd/syntax/nullable_type_test.dart
@@ -0,0 +1,31 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=non-nullable
+
+// Test that the trailing "?" is accepted after all type syntaxes.  Verify that
+// the compiler understands the resulting type to be nullable by trying to
+// construct a list containing `null`.  Verify that the runtime understands the
+// resulting type to be nullable by checking the reified list type.
+import 'package:expect/expect.dart';
+import 'dart:core';
+import 'dart:core' as core;
+
+main() {
+  var x1 = <int?>[null];
+  Expect.type<List<int?>>(x1);
+  Expect.notType<List<int>>(x1);
+
+  var x2 = <core.int?>[null];
+  Expect.type<List<int?>>(x2);
+  Expect.notType<List<int>>(x2);
+
+  var x3 = <List<int>?>[null];
+  Expect.type<List<List<int>?>>(x3);
+  Expect.notType<List<List<int>>>(x3);
+
+  var x4 = <void Function()?>[null];
+  Expect.type<List<void Function()?>>(x4);
+  Expect.notType<List<void Function()>>(x4);
+}
diff --git a/tests/language_2/operations_on_non_num_operand_test.dart b/tests/language_2/operations_on_non_num_operand_test.dart
index 7a5060f..8a98bb3 100644
--- a/tests/language_2/operations_on_non_num_operand_test.dart
+++ b/tests/language_2/operations_on_non_num_operand_test.dart
@@ -10,8 +10,8 @@
 
 import "package:expect/expect.dart";
 
-@AssumeDynamic()
-@NoInline()
+@pragma('dart2js:assumeDynamic')
+@pragma('dart2js:noInline')
 confuse(x) => x;
 
 class Thing1 {
@@ -36,39 +36,39 @@
 }
 
 class Thing2 {
-  @NoInline()
+  @pragma('dart2js:noInline')
   operator &(b) => this;
-  @NoInline()
+  @pragma('dart2js:noInline')
   operator |(b) => this;
-  @NoInline()
+  @pragma('dart2js:noInline')
   operator ^(b) => this;
-  @NoInline()
+  @pragma('dart2js:noInline')
   operator <<(b) => this;
-  @NoInline()
+  @pragma('dart2js:noInline')
   operator >>(b) => this;
 
-  @NoInline()
+  @pragma('dart2js:noInline')
   operator +(b) => this;
-  @NoInline()
+  @pragma('dart2js:noInline')
   operator -(b) => this;
-  @NoInline()
+  @pragma('dart2js:noInline')
   operator *(b) => this;
-  @NoInline()
+  @pragma('dart2js:noInline')
   operator /(b) => this;
-  @NoInline()
+  @pragma('dart2js:noInline')
   operator ~/(b) => this;
-  @NoInline()
+  @pragma('dart2js:noInline')
   operator %(b) => this;
-  @NoInline()
+  @pragma('dart2js:noInline')
   remainder(b) => this;
 
-  @NoInline()
+  @pragma('dart2js:noInline')
   operator <(b) => this;
-  @NoInline()
+  @pragma('dart2js:noInline')
   operator <=(b) => this;
-  @NoInline()
+  @pragma('dart2js:noInline')
   operator >(b) => this;
-  @NoInline()
+  @pragma('dart2js:noInline')
   operator >=(b) => this;
 }
 
diff --git a/tests/language_2/override_inheritance_field_test.dart b/tests/language_2/override_inheritance_field_test.dart
index b752b5d..d9430e1 100644
--- a/tests/language_2/override_inheritance_field_test.dart
+++ b/tests/language_2/override_inheritance_field_test.dart
@@ -27,7 +27,7 @@
   set setter11(int _) => null; //# 31: compile-time error
 
   @virtual int field1; //# 41: ok
-  num field2; //# 42: ok
+  num field2; //# 42: compile-time error
   int field3; //# 43: compile-time error
   int field4; //# 44: compile-time error
   int field5; //# 45: compile-time error
diff --git a/tests/language_2/prefix_invalid_name_test.dart b/tests/language_2/prefix_invalid_name_test.dart
index 6b10189..4d9b406 100644
--- a/tests/language_2/prefix_invalid_name_test.dart
+++ b/tests/language_2/prefix_invalid_name_test.dart
@@ -4,7 +4,7 @@
 
 // Prefix must be a valid identifier.
 import "library1.dart"
-    as lib1.invalid //# 01: compile-time error
+    as lib1.invalid //# 01: syntax error
     ;
 
 main() {}
diff --git a/tests/language_2/regress_18713_test.dart b/tests/language_2/regress_18713_test.dart
index ebf484a..01f51d8 100644
--- a/tests/language_2/regress_18713_test.dart
+++ b/tests/language_2/regress_18713_test.dart
@@ -16,8 +16,8 @@
 
 class TS<A, B> = T<A> with S<B>;
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 dyn(x) => x;
 
 main() {
diff --git a/tests/language_2/regress_25389_test.dart b/tests/language_2/regress_25389_test.dart
index f15bb0c..ad76eda 100644
--- a/tests/language_2/regress_25389_test.dart
+++ b/tests/language_2/regress_25389_test.dart
@@ -1,7 +1,6 @@
 // Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--error-on-bad-type
 
 library regress_25389;
 
diff --git a/tests/language_2/regress_25609_test.dart b/tests/language_2/regress_25609_test.dart
index 67b783c..2cd030a 100644
--- a/tests/language_2/regress_25609_test.dart
+++ b/tests/language_2/regress_25609_test.dart
@@ -2,8 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// VMOptions=--error-on-bad-type
-
 import 'regress_25609_lib1.dart';
 
 Foo baz() => null;
diff --git a/tests/language_2/regress_36084_test.dart b/tests/language_2/regress_36084_test.dart
new file mode 100644
index 0000000..d16706e
--- /dev/null
+++ b/tests/language_2/regress_36084_test.dart
@@ -0,0 +1,62 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import "package:expect/expect.dart";
+
+class A {
+  void call(int a, [int b]) {}
+}
+
+class A1 {
+  void call(int a, [int b]) {}
+  int noSuchMethod(Invocation invocation) {
+    return 42;
+  }
+}
+
+class A2 {
+  // Same as A1 but without a call method.
+  int noSuchMethod(Invocation invocation) {
+    return 42;
+  }
+}
+
+class B {
+  dynamic foo;
+  dynamic get bar => foo;
+}
+
+class B1 {
+  dynamic foo;
+  dynamic get bar => foo;
+
+  int noSuchMethod(Invocation invocation) {
+    Expect.fail('B1.noSuchMethod should not be called.');
+  }
+}
+
+main() {
+  B b = new B();
+  b.foo = new A();
+  Expect.throwsNoSuchMethodError(() => b.foo(1, 2, 3));
+  Expect.throwsNoSuchMethodError(() => b.bar(1, 2, 3));
+  b.foo = new A1();
+  Expect.equals(42, b.foo(1, 2, 3));
+  Expect.equals(42, b.bar(1, 2, 3));
+  b.foo = new A2();
+  Expect.equals(42, b.foo(1, 2, 3));
+  Expect.equals(42, b.bar(1, 2, 3));
+
+  // Same test but with B1, which has its own `noSuchMethod()` handler.
+  B1 b1 = new B1();
+  b1.foo = new A();
+  Expect.throwsNoSuchMethodError(() => b1.foo(1, 2, 3));
+  Expect.throwsNoSuchMethodError(() => b1.bar(1, 2, 3));
+  b1.foo = new A1();
+  Expect.equals(42, b1.foo(1, 2, 3));
+  Expect.equals(42, b1.bar(1, 2, 3));
+  b1.foo = new A2();
+  Expect.equals(42, b1.foo(1, 2, 3));
+  Expect.equals(42, b1.bar(1, 2, 3));
+}
diff --git a/tests/language_2/set_literal_in_initializer_test.dart b/tests/language_2/set_literal_in_initializer_test.dart
new file mode 100644
index 0000000..04cc2d8
--- /dev/null
+++ b/tests/language_2/set_literal_in_initializer_test.dart
@@ -0,0 +1,16 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+class Bag {
+  final Set<Object> things;
+  Bag({Set<Object> things}) : this.things = things ?? <Object>{};
+  Bag.full({Set<Object> this.things = const {"cat"}});
+}
+
+main() {
+  new Bag();
+  new Bag(things: {});
+  new Bag.full();
+  new Bag.full(things: {});
+}
diff --git a/tests/language_2/set_literals/const_set_literal_test.dart b/tests/language_2/set_literals/const_set_literal_test.dart
index 0e59037..7b3cce2 100644
--- a/tests/language_2/set_literals/const_set_literal_test.dart
+++ b/tests/language_2/set_literals/const_set_literal_test.dart
@@ -2,8 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// SharedOptions=--enable-experiment=set-literals
-
 import 'dart:async';
 
 import "package:expect/expect.dart";
diff --git a/tests/language_2/set_literals/invalid_set_literal_test.dart b/tests/language_2/set_literals/invalid_set_literal_test.dart
index 2b6a790..5a891e0 100644
--- a/tests/language_2/set_literals/invalid_set_literal_test.dart
+++ b/tests/language_2/set_literals/invalid_set_literal_test.dart
@@ -2,8 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// SharedOptions=--enable-experiment=set-literals
-
 import "dart:collection" show HashSet, LinkedHashSet;
 
 import "package:expect/expect.dart";
@@ -22,9 +20,9 @@
       = const {Duration(seconds: 0)} // Overrides ==. //# 08: compile-time error
       = const {4.2} // Overrides ==. //# 09: compile-time error
       = const {d} // Overrides ==. //# 10: compile-time error
-      = {,} //# 11: compile-time error
-      = {1,,} //# 12: compile-time error
-      = {1,,1} //# 13: compile-time error
+      = {,} //# 11: syntax error
+      = {1,,} //# 12: syntax error
+      = {1,,1} //# 13: syntax error
       ;
   Expect.isNull(o); // Should be unreachable with a value.
 
diff --git a/tests/language_2/set_literals/set_literal_test.dart b/tests/language_2/set_literals/set_literal_test.dart
index cc17fae..3cb57c0 100644
--- a/tests/language_2/set_literals/set_literal_test.dart
+++ b/tests/language_2/set_literals/set_literal_test.dart
@@ -2,8 +2,6 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// SharedOptions=--enable-experiment=set-literals
-
 import 'dart:async';
 import "dart:collection" show LinkedHashSet;
 
diff --git a/tests/language_2/set_literals_in_annotations_test.dart b/tests/language_2/set_literals_in_annotations_test.dart
new file mode 100644
index 0000000..5dca8c3
--- /dev/null
+++ b/tests/language_2/set_literals_in_annotations_test.dart
@@ -0,0 +1,38 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+@Meta({})
+import 'dart:core';
+
+@Meta({})
+void f(@Meta({}) int foo) {}
+
+@Meta({})
+class A<@Meta({}) T> {
+  @Meta({})
+  String x, y;
+
+  @Meta({})
+  A();
+
+  @Meta({})
+  void m() {
+    @Meta({})
+    int z;
+  }
+}
+
+@Meta({})
+enum E {
+  @Meta({})
+  v
+}
+
+class Meta {
+  final Set<int> value;
+
+  const Meta(this.value);
+}
+
+main() {}
diff --git a/tests/language_2/spread_collections/await_test.dart b/tests/language_2/spread_collections/await_test.dart
new file mode 100644
index 0000000..886a94a
--- /dev/null
+++ b/tests/language_2/spread_collections/await_test.dart
@@ -0,0 +1,57 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=spread-collections
+
+import "package:async_helper/async_helper.dart";
+import 'package:expect/expect.dart';
+
+final list = [1, 2, 3, 4, 5];
+final map = {1: 1, 2: 2, 3: 3, 4: 4, 5: 5};
+final set = {1, 2, 3, 4, 5};
+
+void main() {
+  asyncTest(() async {
+    await testList();
+    await testMap();
+    await testSet();
+  });
+}
+
+Future<void> testList() async {
+  var future12 = Future.value([1, 2]);
+  var future45 = Future.value([4, 5]);
+  var futureNull = Future.value(null);
+
+  // Await in spread.
+  Expect.listEquals(list, [...await future12, 3, ...await future45]);
+
+  // Await in null-aware spread.
+  Expect.listEquals(list, [...?await future12, 3, ...?await futureNull, 4, 5]);
+}
+
+Future<void> testMap() async {
+  var future12 = Future.value({1: 1, 2: 2});
+  var future45 = Future.value({4: 4, 5: 5});
+  var futureNull = Future.value(null);
+
+  // Await in spread.
+  Expect.mapEquals(map, {...await future12, 3: 3, ...await future45});
+
+  // Await in null-aware spread.
+  Expect.mapEquals(map,
+      {...?await future12, 3: 3, ...?await futureNull, 4: 4, 5: 5});
+}
+
+Future<void> testSet() async {
+  var future12 = Future.value([1, 2]);
+  var future45 = Future.value([4, 5]);
+  var futureNull = Future.value(null);
+
+  // Await in spread.
+  Expect.setEquals(set, {...await future12, 3, ...await future45});
+
+  // Await in null-aware spread.
+  Expect.setEquals(set, {...?await future12, 3, ...?await futureNull, 4, 5});
+}
diff --git a/tests/language_2/spread_collections/const_error_test.dart b/tests/language_2/spread_collections/const_error_test.dart
index 7ea27a5..c186f13 100644
--- a/tests/language_2/spread_collections/const_error_test.dart
+++ b/tests/language_2/spread_collections/const_error_test.dart
@@ -2,67 +2,24 @@
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
 
-// SharedOptions=--enable-experiment=set-literals,spread-collections
-
-import 'dart:collection';
+// SharedOptions=--enable-experiment=spread-collections
 
 import 'package:expect/expect.dart';
-import 'helper_classes.dart';
 
-var nonConstList = <int>[];
-var nonConstMap = <int, String>{};
-const dynamic nonIterable = 3;
-const dynamic nonMap = 3;
+const constList = [1, 2, 3, 4];
+const constSet = {1, 2, 3, 4};
+const constMap = {1: 1, 2: 2, 3: 3, 4: 4};
 
 void main() {
-  testList();
-  testMap();
-  testSet();
-}
+  var list = [1, 2, 3];
+  var set = {1, 2, 3};
+  var map = {1:1, 2:2, 3:3};
 
-void testList() {
-  // Must be constant.
-  const _ = <int>[...nonConstList]; //# 01: compile-time error
-
-  // Must be iterable.
-  const _ = <int>[...nonIterable]; //# 02: compile-time error
-
-  // Cannot be custom iterable type.
-  const _ = <int>[...ConstIterable()]; //# 03: compile-time error
-}
-
-void testMap() {
-  // Must be constant.
-  const _ = <int, String>{...nonConstMap}; //# 04: compile-time error
-
-  // Must be map.
-  const _ = <int, String>{...nonMap}; //# 05: compile-time error
-
-  // Cannot be custom map type.
-  const _ = <int, String>{...ConstMap()}; //# 06: compile-time error
-
-  // Cannot have key collision.
-  const _ = <int, String>{1: "s", ...{1: "t"}}; //# 07: compile-time error
-  const _ = <int, String>{...{1: "s"}, ...{1: "t"}}; //# 08: compile-time error
-}
-
-void testSet() {
-  // Must be constant.
-  const _ = <int>{...nonConstList}; //# 09: compile-time error
-
-  // Must be iterable.
-  const _ = <int>{...nonIterable}; //# 10: compile-time error
-
-  // Cannot be custom iterable type.
-  const _ = <int>{...ConstIterable()}; //# 11: compile-time error
-
-  // Cannot override operator.==().
-  const obj = 0.1;
-  const _ = {...[0.1]}; //# 12: compile-time error
-  const _ = {...[Duration(seconds: 0)]}; //# 13: compile-time error
-  const _ = {...[obj]}; //# 14: compile-time error
-
-  // Cannot have collision.
-  const _ = {1, ...[1]}; //# 15: compile-time error
-  const _ = {...[1], ...[1]}; //# 16: compile-time error
+  // Spread cannot be used in a const collection.
+  const _ = [...list]; //# 00: compile-time error
+  const _ = [...constList]; //# 01: compile-time error
+  const _ = {...set}; //# 02: compile-time error
+  const _ = {...constSet}; //# 03: compile-time error
+  const _ = {...map}; //# 04: compile-time error
+  const _ = {...constMap}; //# 05: compile-time error
 }
diff --git a/tests/language_2/spread_collections/const_test.dart b/tests/language_2/spread_collections/const_test.dart
deleted file mode 100644
index 7ae1df2..0000000
--- a/tests/language_2/spread_collections/const_test.dart
+++ /dev/null
@@ -1,181 +0,0 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// SharedOptions=--enable-experiment=set-literals,spread-collections
-
-import 'package:expect/expect.dart';
-
-// Typed as dynamic to also test spreading a value of type dynamic.
-const dynamic list = [1, 2, 3, 4];
-const dynamic map = {1: 1, 2: 2, 3: 3, 4: 4};
-const dynamic set = {1, 2, 3, 4};
-
-void main() {
-  testList();
-  testMap();
-  testSet();
-  testKeyOrder();
-}
-
-void testList() {
-  // Only spread.
-  Expect.identical(list, const <int>[...list]);
-  Expect.identical(list, const <int>[...set]);
-
-  // Spread at beginning.
-  Expect.identical(list, const <int>[...<int>[1, 2], 3, 4]);
-
-  // Spread in middle.
-  Expect.identical(list, const <int>[1, ...<int>[2, 3], 4]);
-
-  // Spread at end.
-  Expect.identical(list, const <int>[1, 2, ...<int>[3, 4]]);
-
-  // Empty spreads.
-  Expect.identical(list,
-      const <int>[...<int>[], 1, 2, ...<int>[], 3, 4, ...<int>[]]);
-
-  // Multiple spreads.
-  Expect.identical(list,
-      const <int>[...<int>[1], 2, ...<int>[3, 4]]);
-
-  // Nested spreads.
-  Expect.identical(list,
-      const <int>[...<int>[...<int>[1, 2], ...<int>[3, 4]]]);
-
-  // Null-aware.
-  Expect.identical(list,
-      const <int>[1, ...?<int>[2, 3], ...?(null), ...?<int>[4]]);
-
-  // Does not deep flatten.
-  Expect.identical(
-      const <int>[1, 2, <int>[3], 4], const <int>[1, ...<int>[2, <int>[3], 4]]);
-
-  // Establishes const context.
-  Expect.identical(const <Symbol>[Symbol("sym")],
-      const <Symbol>[...<Symbol>[Symbol("sym")]]);
-}
-
-void testMap() {
-  // Only spread.
-  Expect.identical(map, const <int, int>{...map});
-
-  // Spread at beginning.
-  Expect.identical(map,
-      const <int, int>{...<int, int>{1: 1, 2: 2}, 3: 3, 4: 4});
-
-  // Spread in middle.
-  Expect.identical(map,
-      const <int, int>{1: 1, ...<int, int>{2: 2, 3: 3}, 4: 4});
-
-  // Spread at end.
-  Expect.identical(map,
-      const <int, int>{1: 1, 2: 2, ...<int, int>{3: 3, 4: 4}});
-
-  // Empty spreads.
-  Expect.identical(map, const <int, int>{
-    ...<int, int>{},
-    1: 1,
-    2: 2,
-    ...<int, int>{},
-    3: 3,
-    4: 4,
-    ...<int, int>{}
-  });
-
-  // Multiple spreads.
-  Expect.identical(map,
-      const <int, int>{...<int, int>{1: 1}, 2: 2, ...<int, int>{3: 3, 4: 4}});
-
-  // Nested spreads.
-  Expect.identical(map, const <int, int>{
-    ...<int, int>{
-      ...<int, int>{1: 1, 2: 2},
-      ...<int, int>{3: 3, 4: 4}
-    }
-  });
-
-  // Null-aware.
-  Expect.identical(map, const <int, int>{
-    1: 1,
-    ...?<int, int>{2: 2, 3: 3},
-    ...?(null),
-    ...?<int, int>{4: 4}
-  });
-
-  // Does not deep flatten.
-  Expect.identical(const <int, Object>{
-    1: 1,
-    2: 2,
-    3: <int, int>{3: 3},
-    4: 4
-  }, const <int, Object>{
-    1: 1,
-    ...<int, Object>{
-      2: 2,
-      3: <int, int>{3: 3},
-      4: 4
-    }
-  });
-
-  // Establishes const context.
-  Expect.identical(const <Symbol, Symbol>{
-    Symbol("sym"): Symbol("bol")
-  }, const <Symbol, Symbol>{
-    ...<Symbol, Symbol>{Symbol("sym"): Symbol("bol")}
-  });
-}
-
-void testSet() {
-  // Only spread.
-  Expect.identical(set, const <int>{...set});
-  Expect.identical(set, const <int>{...list});
-
-  // Spread at beginning.
-  Expect.identical(set, const <int>{...<int>[1, 2], 3, 4});
-
-  // Spread in middle.
-  Expect.identical(set, const <int>{1, ...<int>[2, 3], 4});
-
-  // Spread at end.
-  Expect.identical(set, const <int>{1, 2, ...<int>[3, 4]});
-
-  // Empty spreads.
-  Expect.identical(set,
-      const <int>{...<int>[], 1, 2, ...<int>[], 3, 4, ...<int>[]});
-
-  // Multiple spreads.
-  Expect.identical(set, const <int>{...<int>[1], 2, ...<int>[3, 4]});
-
-  // Nested spreads.
-  Expect.identical(set, const <int>{...<int>{...<int>[1, 2], ...<int>[3, 4]}});
-
-  // Null-aware.
-  Expect.identical(set,
-      const <int>{1, ...?<int>[2, 3], ...?(null), ...?<int>[4]});
-
-  // Does not deep flatten.
-  Expect.identical(const <Object>{1, 2, <int>{3}, 4},
-      const <Object>{1, ...<Object>{2, <int>{3}, 4}});
-
-  // Establishes const context.
-  Expect.identical(const <Symbol>{Symbol("sym")},
-      const <Symbol>{...<Symbol>{Symbol("sym")}});
-}
-
-void testKeyOrder() {
-  // Canonicalization isn't affected by which elements are spread.
-  Expect.identical(map,
-      const <int, int>{1: 1, ...<int, int>{2: 2, 3: 3}, 4: 4});
-  Expect.identical(map,
-      const <int, int>{1: 1, ...<int, int>{2: 2}, 3: 3, ...<int, int>{4: 4}});
-
-  Expect.identical(set, const <int>{1, ...<int>{2, 3}, 4});
-  Expect.identical(set, const <int>{1, ...<int>{2}, 3, ...<int>{4}});
-
-  // Ordering does affect canonicalization.
-  Expect.notIdentical(const <int, int>{1: 1, 2: 2, 3: 3},
-      const <int, int>{1: 1, ...<int, int>{3: 3, 2: 2}});
-  Expect.notIdentical(const <int>{1, 2, 3}, const <int>{1, ...<int>{3, 2}});
-}
diff --git a/tests/language_2/spread_collections/experimental_flag_test.dart b/tests/language_2/spread_collections/experimental_flag_test.dart
deleted file mode 100644
index a1c8bf7..0000000
--- a/tests/language_2/spread_collections/experimental_flag_test.dart
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Check that spread collections are not enabled without the experimental flag.
-
-// Do enable sets, just not spread inside them.
-// SharedOptions=--enable-experiment=set-literals
-
-// TODO(rnystrom): Remove this test when the feature is enabled without a flag.
-
-void main() {
-  var _ = <int>[...<int>[1]]; //# 01: compile-time error
-  var _ = <int, int>{...<int, int>{1: 1}}; //# 02: compile-time error
-  var _ = <int>{...<int>{1}}; //# 03: compile-time error
-  var _ = <int>[...?null]; //# 04: compile-time error
-  var _ = <int, int>{...?null}; //# 05: compile-time error
-  var _ = <int>{...?null}; //# 06: compile-time error
-}
diff --git a/tests/language_2/spread_collections/inference_test.dart b/tests/language_2/spread_collections/inference_test.dart
index 0b3d4e5..e3c429f 100644
--- a/tests/language_2/spread_collections/inference_test.dart
+++ b/tests/language_2/spread_collections/inference_test.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.
 
-// SharedOptions=--enable-experiment=set-literals,spread-collections
+// SharedOptions=--enable-experiment=spread-collections
 
 // Test how spread interacts with inference.
 import 'package:expect/expect.dart';
@@ -60,12 +60,12 @@
 void testTopDownInference() {
   // Lists.
   Iterable<T> expectIntIterable<T>() {
-    Expect.identical(int, T);
+    Expect.equals(int, T);
     return [];
   }
 
   Iterable<T> expectDynamicIterable<T>() {
-    Expect.identical(dynamic, T);
+    Expect.equals(dynamic, T);
     return [];
   }
 
@@ -78,14 +78,14 @@
 
   // Maps.
   Map<K, V> expectIntStringMap<K, V>() {
-    Expect.identical(int, K);
-    Expect.identical(String, V);
+    Expect.equals(int, K);
+    Expect.equals(String, V);
     return {};
   }
 
   Map<K, V> expectDynamicDynamicMap<K, V>() {
-    Expect.identical(dynamic, K);
-    Expect.identical(dynamic, V);
+    Expect.equals(dynamic, K);
+    Expect.equals(dynamic, V);
     return {};
   }
 
@@ -99,12 +99,12 @@
 
   // Sets.
   Set<T> expectIntSet<T>() {
-    Expect.identical(int, T);
+    Expect.equals(int, T);
     return Set();
   }
 
   Set<T> expectDynamicSet<T>() {
-    Expect.identical(dynamic, T);
+    Expect.equals(dynamic, T);
     return Set();
   }
 
@@ -113,5 +113,5 @@
   Expect.setEquals(<int>{}, <int>{...expectIntSet()});
 
   // Bottom up-inference from elements is not pushed back down into spread.
-  Expect.setEquals(<int>{}, {1, ...expectDynamicSet()});
+  Expect.setEquals(<int>{1}, {1, ...expectDynamicSet()});
 }
diff --git a/tests/language_2/spread_collections/map_set_ambiguity_error_test.dart b/tests/language_2/spread_collections/map_set_ambiguity_error_test.dart
index ab9b822..5f6576d 100644
--- a/tests/language_2/spread_collections/map_set_ambiguity_error_test.dart
+++ b/tests/language_2/spread_collections/map_set_ambiguity_error_test.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.
 
-// SharedOptions=--enable-experiment=set-literals,spread-collections
+// SharedOptions=--enable-experiment=spread-collections
 
 // Test cases where the syntax is ambiguous between maps and sets.
 import 'dart:collection';
diff --git a/tests/language_2/spread_collections/map_set_ambiguity_test.dart b/tests/language_2/spread_collections/map_set_ambiguity_test.dart
index 48ce5a7..9b3d537 100644
--- a/tests/language_2/spread_collections/map_set_ambiguity_test.dart
+++ b/tests/language_2/spread_collections/map_set_ambiguity_test.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.
 
-// SharedOptions=--enable-experiment=set-literals,spread-collections
+// SharedOptions=--enable-experiment=spread-collections
 
 // Test cases where the syntax is ambiguous between maps and sets.
 import 'dart:collection';
@@ -19,7 +19,8 @@
 void testBottomUpInference() {
   Map<int, int> map = {};
   Set<int> set = Set();
-  dynamic dyn = map;
+  dynamic dynMap = map;
+  dynamic dynSet = set;
   Iterable<int> iterable = [];
   CustomSet customSet = CustomSet();
   CustomMap customMap = CustomMap();
@@ -31,25 +32,25 @@
   // Expect.type<...>({...dyn});
   Expect.type<Set<int>>({...iterable});
   Expect.type<Set<int>>({...customSet});
-  Expect.type<Map<int, int>>({...customMap});
+  Expect.type<Map<int, String>>({...customMap});
 
   Expect.type<Map<int, int>>({...map, ...map});
   // Expect.type<...>({...map, ...set});
-  Expect.type<Map<dynamic, dynamic>>({...map, ...dyn});
+  Expect.type<Map<dynamic, dynamic>>({...map, ...dynMap});
   // Expect.type<...>({...map, ...iterable});
   // Expect.type<...>({...map, ...customSet});
-  Expect.type<Map<int, int>>({...map, ...customMap});
+  Expect.type<Map<int, Object>>({...map, ...customMap});
 
   Expect.type<Set<int>>({...set, ...set});
-  Expect.type<Set<dynamic>>({...set, ...dyn});
+  Expect.type<Set<dynamic>>({...set, ...dynSet});
   Expect.type<Set<int>>({...set, ...iterable});
   Expect.type<Set<int>>({...set, ...customSet});
   // Expect.type<...>({...set, ...customMap});
 
   // Expect.type<...>({...dyn, ...dyn});
-  Expect.type<Set<dynamic>>({...dyn, ...iterable});
-  Expect.type<Set<dynamic>>({...dyn, ...customSet});
-  Expect.type<Map<dynamic, dynamic>>({...dyn, ...customMap});
+  Expect.type<Set<dynamic>>({...dynSet, ...iterable});
+  Expect.type<Set<dynamic>>({...dynSet, ...customSet});
+  Expect.type<Map<dynamic, dynamic>>({...dynMap, ...customMap});
 
   Expect.type<Set<int>>({...iterable, ...iterable});
   Expect.type<Set<int>>({...iterable, ...customSet});
@@ -58,7 +59,7 @@
   Expect.type<Set<int>>({...customSet, ...customSet});
   // Expect.type<...>({...customSet, ...customMap});
 
-  Expect.type<Map<int, int>>({...customMap, ...customMap});
+  Expect.type<Map<int, String>>({...customMap, ...customMap});
 }
 
 void testTopDownInference() {
diff --git a/tests/language_2/spread_collections/runtime_error_test.dart b/tests/language_2/spread_collections/runtime_error_test.dart
new file mode 100644
index 0000000..ad74289
--- /dev/null
+++ b/tests/language_2/spread_collections/runtime_error_test.dart
@@ -0,0 +1,36 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=spread-collections
+
+import 'package:expect/expect.dart';
+
+// Typed as dynamic to also test spreading a value of type dynamic.
+final dynamic list = [1, 2, 3, 4];
+final dynamic map = {1: 1, 2: 2, 3: 3, 4: 4};
+final dynamic set = {1, 2, 3, 4};
+
+void main() {
+  dynamic nonIterable = 3;
+  Expect.throwsTypeError(() => <int>[...nonIterable]);
+  Expect.throwsTypeError(() => <int>{...nonIterable});
+
+  dynamic nonMap = 3;
+  Expect.throwsTypeError(() => <int, int>{...nonMap});
+
+  dynamic wrongIterableType = <String>["s"];
+  Expect.throwsTypeError(() => <int>[...wrongIterableType]);
+  Expect.throwsTypeError(() => <int>{...wrongIterableType});
+
+  dynamic wrongKeyType = <String, int>{"s": 1};
+  dynamic wrongValueType = <int, String>{1: "s"};
+  Expect.throwsTypeError(() => <int, int>{...wrongKeyType});
+  Expect.throwsTypeError(() => <int, int>{...wrongValueType});
+
+  // Mismatched collection types.
+  Expect.throwsTypeError(() => <int>[...map]);
+  Expect.throwsTypeError(() => <int, int>{...list});
+  Expect.throwsTypeError(() => <int, int>{...set});
+  Expect.throwsTypeError(() => <int>{...map});
+}
diff --git a/tests/language_2/spread_collections/spread_test.dart b/tests/language_2/spread_collections/spread_test.dart
index aab98da..7bc721d 100644
--- a/tests/language_2/spread_collections/spread_test.dart
+++ b/tests/language_2/spread_collections/spread_test.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.
 
-// SharedOptions=--enable-experiment=set-literals,spread-collections
+// SharedOptions=--enable-experiment=spread-collections
 
 import 'package:expect/expect.dart';
 
@@ -19,7 +19,6 @@
   testSet();
   testDuplicateKeys();
   testKeyOrder();
-  testCastFailures();
 }
 
 void testList() {
@@ -51,7 +50,8 @@
   // Does not deep flatten.
   var innerList = <int>[3];
   Expect.listEquals(
-      <int>[1, 2, innerList, 4], <int>[1, ...<int>[2, innerList, 4]]);
+      <Object>[1, 2, innerList, 4],
+      <Object>[1, ...<Object>[2, innerList, 4]]);
 
   // Downcast element.
   Expect.listEquals(list, <int>[...<num>[1, 2, 3, 4]]);
@@ -196,27 +196,3 @@
   set = <Equality>{log(e1a), ...<Equality>[log(e1b), log(e2a), log(e2b)]};
   Expect.equals("1:a,1:b,2:a,2:b", transcript.join(","));
 }
-
-void testCastFailures() {
-  dynamic nonIterable = 3;
-  Expect.throwsCastError(() => <int>[...nonIterable]);
-  Expect.throwsCastError(() => <int>{...nonIterable});
-
-  dynamic nonMap = 3;
-  Expect.throwsCastError(() => <int, int>{...nonMap});
-
-  dynamic wrongIterableType = <String>["s"];
-  Expect.throwsCastError(() => <int>[...wrongIterableType]);
-  Expect.throwsCastError(() => <int>{...wrongIterableType});
-
-  dynamic wrongKeyType = <String, int>{"s": 1};
-  dynamic wrongValueType = <int, String>{1: "s"};
-  Expect.throwsCastError(() => <int, int>{...wrongKeyType});
-  Expect.throwsCastError(() => <int, int>{...wrongValueType});
-
-  // Mismatched collection types.
-  Expect.throwsCastError(() => <int>[...map]);
-  Expect.throwsCastError(() => <int, int>{...list});
-  Expect.throwsCastError(() => <int, int>{...set});
-  Expect.throwsCastError(() => <int>{...map});
-}
diff --git a/tests/language_2/spread_collections/syntax_error_test.dart b/tests/language_2/spread_collections/syntax_error_test.dart
index 9f38d74..05261cd 100644
--- a/tests/language_2/spread_collections/syntax_error_test.dart
+++ b/tests/language_2/spread_collections/syntax_error_test.dart
@@ -2,21 +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.
 
-// SharedOptions=--enable-experiment=set-literals,spread-collections
+// SharedOptions=--enable-experiment=spread-collections
 
 void main() {
   // Spread nothing.
-  var _ = [...]; //# 00: compile-time error
-  var _ = [...?]; //# 01: compile-time error
-  var _ = [...,]; //# 02: compile-time error
+  var _ = [...]; //# 00: syntax error
+  var _ = [...?]; //# 01: syntax error
+  var _ = [...,]; //# 02: syntax error
 
   // Use `...` in map entry.
-  var _ = {"a": ...{}}; //# 03: compile-time error
-  var _ = {...{}: "b"}; //# 04: compile-time error
-  var _ = {"a": ...?{}}; //# 05: compile-time error
-  var _ = {...?{}: "b"}; //# 06: compile-time error
+  var _ = {"a": ...{}}; //# 03: syntax error
+  var _ = {...{}: "b"}; //# 04: syntax error
+  var _ = {"a": ...?{}}; //# 05: syntax error
+  var _ = {...?{}: "b"}; //# 06: syntax error
 
   // Treats `...?` as single token.
-  var _ = [... ?null]; //# 07: compile-time error
-  var _ = {1: 2, ... ?null}; //# 08: compile-time error
+  var _ = [... ?null]; //# 07: syntax error
+  var _ = {1: 2, ... ?null}; //# 08: syntax error
 }
diff --git a/tests/language_2/spread_collections/syntax_test.dart b/tests/language_2/spread_collections/syntax_test.dart
index c46b589..7100394 100644
--- a/tests/language_2/spread_collections/syntax_test.dart
+++ b/tests/language_2/spread_collections/syntax_test.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.
 
-// SharedOptions=--enable-experiment=set-literals,spread-collections
+// SharedOptions=--enable-experiment=spread-collections
 
 // Tests syntax edge cases.
 import 'package:expect/expect.dart';
diff --git a/tests/language_2/spread_collections/type_error_test.dart b/tests/language_2/spread_collections/type_error_test.dart
index 06f1cab..68cf98c 100644
--- a/tests/language_2/spread_collections/type_error_test.dart
+++ b/tests/language_2/spread_collections/type_error_test.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.
 
-// SharedOptions=--enable-experiment=set-literals,spread-collections
+// SharedOptions=--enable-experiment=spread-collections
 
 void main() {
   // Spread non-iterable or non-map.
diff --git a/tests/language_2/super_mixin_test.dart b/tests/language_2/super_mixin_test.dart
index 154d3e5..e76a282 100644
--- a/tests/language_2/super_mixin_test.dart
+++ b/tests/language_2/super_mixin_test.dart
@@ -8,7 +8,7 @@
 import 'package:expect/expect.dart';
 
 class Mixin {
-  @NoInline()
+  @pragma('dart2js:noInline')
   get getter => 42;
 }
 
diff --git a/tests/language_2/super_test.dart b/tests/language_2/super_test.dart
index 7394989..f96f4fe 100644
--- a/tests/language_2/super_test.dart
+++ b/tests/language_2/super_test.dart
@@ -17,10 +17,10 @@
   Expect.equals(3, sub.u);
 
   sub = new Sub.stat();
-  Expect.equals(0, sub.x);
-  Expect.equals(1, sub.y);
-  Expect.equals(2, sub.v);
-  Expect.equals(3, sub.w);
+  Expect.equals(2, sub.x);
+  Expect.equals(3, sub.y);
+  Expect.equals(0, sub.v);
+  Expect.equals(1, sub.w);
   Expect.equals(4, sub.z);
   Expect.equals(5, sub.u);
 }
diff --git a/tests/language_2/superinterface_variance/abstract_class_error_test.dart b/tests/language_2/superinterface_variance/abstract_class_error_test.dart
new file mode 100644
index 0000000..47367d1
--- /dev/null
+++ b/tests/language_2/superinterface_variance/abstract_class_error_test.dart
@@ -0,0 +1,132 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+typedef F1<X> = void Function(X);
+typedef F2<X> = X Function(X);
+typedef F3<X> = void Function<Y extends X>();
+typedef F4<X> = X Function(X Function(void));
+typedef F5<X, Y> = Y Function(X);
+typedef F6<X, Y> = X Function(Y);
+
+class A<X> {}
+
+abstract class B<X> extends A<A<F1<X>>> {} //# 01: compile-time error
+
+abstract class B<X> extends A<A<F2<X>>> {} //# 02: compile-time error
+
+abstract class B<X> extends A<A<F3<X>>> {} //# 03: compile-time error
+
+abstract class B<X> extends A<A<F4<X>>> {} //# 04: compile-time error
+
+abstract class B<X, Y> extends A<A<F5<X, Y>>> {} //# 05: compile-time error
+
+abstract class B<X, Y> extends A<A<F6<X, Y>>> {} //# 06: compile-time error
+
+abstract class B<X> extends Object //# 07: compile-time error
+    with //# 07: continued
+        A<A<F1<X>>> {} //# 07: continued
+
+abstract class B<X> extends Object //# 08: compile-time error
+    with //# 08: continued
+        A<A<F2<X>>> {} //# 08: continued
+
+abstract class B<X> extends Object //# 09: compile-time error
+    with //# 09: continued
+        A<A<F3<X>>> {} //# 09: continued
+
+abstract class B<X> extends Object //# 10: compile-time error
+    with //# 10: continued
+        A<A<F4<X>>> {} //# 10: continued
+
+abstract class B<X, Y> extends Object //# 11: compile-time error
+    with //# 11: continued
+        A<A<F5<X, Y>>> {} //# 11: continued
+
+abstract class B<X, Y> extends Object //# 12: compile-time error
+    with //# 12: continued
+        A<A<F6<X, Y>>> {} //# 12: continued
+
+abstract class B<X> implements A<A<F1<X>>> {} //# 13: compile-time error
+
+abstract class B<X> implements A<A<F2<X>>> {} //# 14: compile-time error
+
+abstract class B<X> implements A<A<F3<X>>> {} //# 15: compile-time error
+
+abstract class B<X> implements A<A<F4<X>>> {} //# 16: compile-time error
+
+abstract class B<X, Y> implements A<A<F5<X, Y>>> {} //# 17: compile-time error
+
+abstract class B<X, Y> implements A<A<F6<X, Y>>> {} //# 18: compile-time error
+
+abstract class B<X> extends A<A<void Function(X)>> {} //# 19: compile-time error
+
+abstract class B<X> extends A<A<X Function(X)>> {} //# 20: compile-time error
+
+// Two errors here: Invariance in superinterface and
+// generic function type used as actual type argument.
+abstract class B<X> extends //# 21: compile-time error
+    A<A<void Function<Y extends X>()>> {} //# 21: continued
+
+abstract class B<X> extends //# 22: compile-time error
+    A<A<X Function(X Function(void))>> {} //# 22: continued
+
+abstract class B<X, Y> extends A<A<Y Function(X)>> {} //# 23: compile-time error
+
+abstract class B<X, Y> extends A<A<X Function(Y)>> {} //# 24: compile-time error
+
+abstract class B<X> extends Object //# 25: compile-time error
+    with //# 25: continued
+        A<A<void Function(X)>> {} //# 25: continued
+
+abstract class B<X> extends Object //# 26: compile-time error
+    with //# 26: continued
+        A<A<X Function(X)>> {} //# 26: continued
+
+// Two errors here: Invariance in superinterface and
+// generic function type used as actual type argument.
+abstract class B<X> extends Object //# 27: compile-time error
+    with //# 27: continued
+        A<A<void Function<Y extends X>()>> {} //# 27: continued
+
+abstract class B<X> extends Object //# 28: compile-time error
+    with //# 28: continued
+        A<A<X Function(X Function(void))>> {} //# 28: continued
+
+abstract class B<X, Y> extends Object //# 29: compile-time error
+    with //# 29: continued
+        A<A<Y Function(X)>> {} //# 29: continued
+
+abstract class B<X, Y> extends Object //# 30: compile-time error
+    with //# 30: continued
+        A<A<X Function(Y)>> {} //# 30: continued
+
+abstract class B<X> //# 31: compile-time error
+    implements //# 31: continued
+        A<A<void Function(X)>> {} //# 31: continued
+
+abstract class B<X> //# 32: compile-time error
+    implements //# 32: continued
+        A<A<X Function(X)>> {} //# 32: continued
+
+// Two errors here: Invariance in superinterface and
+// generic function type used as actual type argument.
+abstract class B<X> //# 33: compile-time error
+    implements //# 33: continued
+        A<A<void Function<Y extends X>()>> {} //# 33: continued
+
+abstract class B<X> //# 34: compile-time error
+    implements //# 34: continued
+        A<A<X Function(X Function(void))>> {} //# 34: continued
+
+abstract class B<X, Y> //# 35: compile-time error
+    implements //# 35: continued
+        A<A<Y Function(X)>> {} //# 35: continued
+
+abstract class B<X, Y> //# 36: compile-time error
+    implements //# 36: continued
+        A<A<X Function(Y)>> {} //# 36: continued
+
+main() {
+  A();
+}
diff --git a/tests/language_2/superinterface_variance/abstract_mixin_application_error_test.dart b/tests/language_2/superinterface_variance/abstract_mixin_application_error_test.dart
new file mode 100644
index 0000000..0362eab
--- /dev/null
+++ b/tests/language_2/superinterface_variance/abstract_mixin_application_error_test.dart
@@ -0,0 +1,161 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+typedef F1<X> = void Function(X);
+typedef F2<X> = X Function(X);
+typedef F3<X> = void Function<Y extends X>();
+typedef F4<X> = X Function(X Function(void));
+typedef F5<X, Y> = Y Function(X);
+typedef F6<X, Y> = X Function(Y);
+
+class A<X> {}
+
+mixin B {}
+
+class C0 = Object with B;
+
+abstract class C<X> = A<F1<X>> with B; //# 01: compile-time error
+
+abstract class C<X> = A<F2<X>> with B; //# 02: compile-time error
+
+abstract class C<X> = A<F3<X>> with B; //# 03: compile-time error
+
+abstract class C<X> = A<F4<X>> with B; //# 04: compile-time error
+
+abstract class C<X, Y> = A<F5<X, Y>> with B; //# 05: compile-time error
+
+abstract class C<X, Y> = A<F6<X, Y>> with B; //# 06: compile-time error
+
+abstract class C<X> = Object with A<F1<X>>; //# 07: compile-time error
+
+abstract class C<X> = Object with A<F2<X>>; //# 08: compile-time error
+
+abstract class C<X> = Object with A<F3<X>>; //# 09: compile-time error
+
+abstract class C<X> = Object with A<F4<X>>; //# 10: compile-time error
+
+abstract class C<X, Y> = Object with A<F5<X, Y>>; //# 11: compile-time error
+
+abstract class C<X, Y> = Object with A<F6<X, Y>>; //# 12: compile-time error
+
+abstract class C<X> = Object //# 13: compile-time error
+    with //# 13: continued
+        B //# 13: continued
+    implements //# 13: continued
+        A<F1<X>>; //# 13: continued
+
+abstract class C<X> = Object //# 14: compile-time error
+    with //# 14: continued
+        B //# 14: continued
+    implements //# 14: continued
+        A<F2<X>>; //# 14: continued
+
+abstract class C<X> = Object //# 15: compile-time error
+    with //# 15: continued
+        B //# 15: continued
+    implements //# 15: continued
+        A<F3<X>>; //# 15: continued
+
+abstract class C<X> = Object //# 16: compile-time error
+    with //# 16: continued
+        B //# 16: continued
+    implements //# 16: continued
+        A<F4<X>>; //# 16: continued
+
+abstract class C<X, Y> = Object //# 17: compile-time error
+    with //# 17: continued
+        B //# 17: continued
+    implements //# 17: continued
+        A<F5<X, Y>>; //# 17: continued
+
+abstract class C<X, Y> = Object //# 18: compile-time error
+    with //# 18: continued
+        B //# 18: continued
+    implements //# 18: continued
+        A<F6<X, Y>>; //# 18: continued
+
+abstract class C<X> = A<void Function(X)> with B; //# 19: compile-time error
+
+abstract class C<X> = A<X Function(X)> with B; //# 20: compile-time error
+
+// Two errors here: Invariance in superinterface and
+// generic function type used as actual type argument.
+abstract class C<X> = A<void Function<Y extends X>()> //# 21: compile-time error
+    with //# 21: continued
+        B; //# 21: continued
+
+abstract class C<X> = A<X Function(X Function(void))> //# 22: compile-time error
+    with //# 22: continued
+        B; //# 22: continued
+
+abstract class C<X, Y> = A<Y Function(X)> with B; //# 23: compile-time error
+
+abstract class C<X, Y> = A<X Function(Y)> with B; //# 24: compile-time error
+
+abstract class C<X> = Object //# 25: compile-time error
+    with //# 25: continued
+        A<void Function(X)>; //# 25: continued
+
+abstract class C<X> = Object with A<X Function(X)>; //# 26: compile-time error
+
+// Two errors here: Invariance in superinterface and
+// generic function type used as actual type argument.
+abstract class C<X> = Object //# 27: compile-time error
+    with //# 27: continued
+        A<void Function<Y extends X>()>; //# 27: continued
+
+abstract class C<X> = Object //# 28: compile-time error
+    with //# 28: continued
+        A<X Function(X Function(void))>; //# 28: continued
+
+abstract class C<X, Y> = Object //# 29: compile-time error
+    with //# 29: continued
+        A<Y Function(X)>; //# 29: continued
+
+abstract class C<X, Y> = Object //# 30: compile-time error
+    with //# 30: continued
+        A<X Function(Y)>; //# 30: continued
+
+abstract class C<X> = Object //# 31: compile-time error
+    with //# 31: continued
+        B //# 31: continued
+    implements //# 31: continued
+        A<void Function(X)>; //# 31: continued
+
+abstract class C<X> = Object //# 32: compile-time error
+    with //# 32: continued
+        B //# 32: continued
+    implements //# 32: continued
+        A<X Function(X)>; //# 32: continued
+
+// Two errors here: Invariance in superinterface and
+// generic function type used as actual type argument.
+abstract class C<X> = Object //# 33: compile-time error
+    with //# 33: continued
+        B //# 33: continued
+    implements //# 33: continued
+        A<void Function<Y extends X>()>; //# 33: continued
+
+abstract class C<X> = Object //# 34: compile-time error
+    with //# 34: continued
+        B //# 34: continued
+    implements //# 34: continued
+        A<X Function(X Function(void))>; //# 34: continued
+
+abstract class C<X, Y> = Object //# 35: compile-time error
+    with //# 35: continued
+        B //# 35: continued
+    implements //# 35: continued
+        A<Y Function(X)>; //# 35: continued
+
+abstract class C<X, Y> = Object //# 36: compile-time error
+    with //# 36: continued
+        B //# 36: continued
+    implements //# 36: continued
+        A<X Function(Y)>; //# 36: continued
+
+main() {
+  A();
+  C0();
+}
diff --git a/tests/language_2/superinterface_variance/concrete_class_error_test.dart b/tests/language_2/superinterface_variance/concrete_class_error_test.dart
new file mode 100644
index 0000000..3d8ac1e
--- /dev/null
+++ b/tests/language_2/superinterface_variance/concrete_class_error_test.dart
@@ -0,0 +1,102 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+typedef F1<X> = void Function(X);
+typedef F2<X> = X Function(X);
+typedef F3<X> = void Function<Y extends X>();
+typedef F4<X> = X Function(X Function(void));
+typedef F5<X, Y> = Y Function(X);
+typedef F6<X, Y> = X Function(Y);
+
+class A<X> {}
+
+class B<X> extends A<F1<X>> {} //# 01: compile-time error
+
+class B<X> extends A<F2<X>> {} //# 02: compile-time error
+
+class B<X> extends A<F3<X>> {} //# 03: compile-time error
+
+class B<X> extends A<F4<X>> {} //# 04: compile-time error
+
+class B<X, Y> extends A<F5<X, Y>> {} //# 05: compile-time error
+
+class B<X, Y> extends A<F6<X, Y>> {} //# 06: compile-time error
+
+class B<X> extends Object with A<F1<X>> {} //# 07: compile-time error
+
+class B<X> extends Object with A<F2<X>> {} //# 08: compile-time error
+
+class B<X> extends Object with A<F3<X>> {} //# 09: compile-time error
+
+class B<X> extends Object with A<F4<X>> {} //# 10: compile-time error
+
+class B<X, Y> extends Object with A<F5<X, Y>> {} //# 11: compile-time error
+
+class B<X, Y> extends Object with A<F6<X, Y>> {} //# 12: compile-time error
+
+class B<X> implements A<F1<X>> {} //# 13: compile-time error
+
+class B<X> implements A<F2<X>> {} //# 14: compile-time error
+
+class B<X> implements A<F3<X>> {} //# 15: compile-time error
+
+class B<X> implements A<F4<X>> {} //# 16: compile-time error
+
+class B<X, Y> implements A<F5<X, Y>> {} //# 17: compile-time error
+
+class B<X, Y> implements A<F6<X, Y>> {} //# 18: compile-time error
+
+class B<X> extends A<void Function(X)> {} //# 19: compile-time error
+
+class B<X> extends A<X Function(X)> {} //# 20: compile-time error
+
+// Two errors here: Invariance in superinterface and
+// generic function type used as actual type argument.
+class B<X> extends A<void Function<Y extends X>()> {} //# 21: compile-time error
+
+class B<X> extends A<X Function(X Function(void))> {} //# 22: compile-time error
+
+class B<X, Y> extends A<Y Function(X)> {} //# 23: compile-time error
+
+class B<X, Y> extends A<X Function(Y)> {} //# 24: compile-time error
+
+class B<X> extends Object with A<void Function(X)> {} //# 25: compile-time error
+
+class B<X> extends Object with A<X Function(X)> {} //# 26: compile-time error
+
+// Two errors here: Invariance in superinterface and
+// generic function type used as actual type argument.
+class B<X> extends Object //# 27: compile-time error
+    with //# 27: continued
+        A<void Function<Y extends X>()> {} //# 27: continued
+
+class B<X> extends Object //# 28: compile-time error
+    with //# 28: continued
+        A<X Function(X Function(void))> {} //# 28: continued
+
+class B<X, Y> extends Object with A<Y Function(X)> {} //# 29: compile-time error
+
+class B<X, Y> extends Object with A<X Function(Y)> {} //# 30: compile-time error
+
+class B<X> implements A<void Function(X)> {} //# 31: compile-time error
+
+class B<X> implements A<X Function(X)> {} //# 32: compile-time error
+
+// Two errors here: Invariance in superinterface and
+// generic function type used as actual type argument.
+class B<X> //# 33: compile-time error
+    implements //# 33: continued
+        A<void Function<Y extends X>()> {} //# 33: continued
+
+class B<X> //# 34: compile-time error
+    implements //# 34: continued
+        A<X Function(X Function(void))> {} //# 34: continued
+
+class B<X, Y> implements A<Y Function(X)> {} //# 35: compile-time error
+
+class B<X, Y> implements A<X Function(Y)> {} //# 36: compile-time error
+
+main() {
+  A();
+}
diff --git a/tests/language_2/superinterface_variance/concrete_mixin_application_error_test.dart b/tests/language_2/superinterface_variance/concrete_mixin_application_error_test.dart
new file mode 100644
index 0000000..b9b658d
--- /dev/null
+++ b/tests/language_2/superinterface_variance/concrete_mixin_application_error_test.dart
@@ -0,0 +1,127 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+typedef F1<X> = void Function(X);
+typedef F2<X> = X Function(X);
+typedef F3<X> = void Function<Y extends X>();
+typedef F4<X> = X Function(X Function(void));
+typedef F5<X, Y> = Y Function(X);
+typedef F6<X, Y> = X Function(Y);
+
+class A<X> {}
+
+mixin B {}
+
+class C0 = Object with B;
+
+class C<X> = A<F1<X>> with B; //# 01: compile-time error
+
+class C<X> = A<F2<X>> with B; //# 02: compile-time error
+
+class C<X> = A<F3<X>> with B; //# 03: compile-time error
+
+class C<X> = A<F4<X>> with B; //# 04: compile-time error
+
+class C<X, Y> = A<F5<X, Y>> with B; //# 05: compile-time error
+
+class C<X, Y> = A<F6<X, Y>> with B; //# 06: compile-time error
+
+class C<X> = Object with A<F1<X>>; //# 07: compile-time error
+
+class C<X> = Object with A<F2<X>>; //# 08: compile-time error
+
+class C<X> = Object with A<F3<X>>; //# 09: compile-time error
+
+class C<X> = Object with A<F4<X>>; //# 10: compile-time error
+
+class C<X, Y> = Object with A<F5<X, Y>>; //# 11: compile-time error
+
+class C<X, Y> = Object with A<F6<X, Y>>; //# 12: compile-time error
+
+class C<X> = Object with B implements A<F1<X>>; //# 13: compile-time error
+
+class C<X> = Object with B implements A<F2<X>>; //# 14: compile-time error
+
+class C<X> = Object with B implements A<F3<X>>; //# 15: compile-time error
+
+class C<X> = Object with B implements A<F4<X>>; //# 16: compile-time error
+
+class C<X, Y> = Object with B implements A<F5<X, Y>>; //# 17: compile-time error
+
+class C<X, Y> = Object with B implements A<F6<X, Y>>; //# 18: compile-time error
+
+class C<X> = A<void Function(X)> with B; //# 19: compile-time error
+
+class C<X> = A<X Function(X)> with B; //# 20: compile-time error
+
+// Two errors here: Invariance in superinterface and
+// generic function type used as actual type argument.
+class C<X> = A<void Function<Y extends X>()> with B; //# 21: compile-time error
+
+class C<X> = A<X Function(X Function(void))> with B; //# 22: compile-time error
+
+class C<X, Y> = A<Y Function(X)> with B; //# 23: compile-time error
+
+class C<X, Y> = A<X Function(Y)> with B; //# 24: compile-time error
+
+class C<X> = Object with A<void Function(X)>; //# 25: compile-time error
+
+class C<X> = Object with A<X Function(X)>; //# 26: compile-time error
+
+// Two errors here: Invariance in superinterface and
+// generic function type used as actual type argument.
+class C<X> = Object //# 27: compile-time error
+    with //# 27: continued
+        A<void Function<Y extends X>()>; //# 27: continued
+
+class C<X> = Object //# 28: compile-time error
+    with //# 28: continued
+        A<X Function(X Function(void))>; //# 28: continued
+
+class C<X, Y> = Object with A<Y Function(X)>; //# 29: compile-time error
+
+class C<X, Y> = Object with A<X Function(Y)>; //# 30: compile-time error
+
+class C<X> = Object //# 31: compile-time error
+    with //# 31: continued
+        B //# 31: continued
+    implements //# 31: continued
+        A<void Function(X)>; //# 31: continued
+
+class C<X> = Object //# 32: compile-time error
+    with //# 32: continued
+        B //# 32: continued
+    implements //# 32: continued
+        A<X Function(X)>; //# 32: continued
+
+// Two errors here: Invariance in superinterface and
+// generic function type used as actual type argument.
+class C<X> = Object //# 33: compile-time error
+    with //# 33: continued
+        B //# 33: continued
+    implements //# 33: continued
+        A<void Function<Y extends X>()>; //# 33: continued
+
+class C<X> = Object //# 34: compile-time error
+    with //# 34: continued
+        B //# 34: continued
+    implements //# 34: continued
+        A<X Function(X Function(void))>; //# 34: continued
+
+class C<X, Y> = Object //# 35: compile-time error
+    with //# 35: continued
+        B //# 35: continued
+    implements //# 35: continued
+        A<Y Function(X)>; //# 35: continued
+
+class C<X, Y> = Object //# 36: compile-time error
+    with //# 36: continued
+        B //# 36: continued
+    implements //# 36: continued
+        A<X Function(Y)>; //# 36: continued
+
+main() {
+  A();
+  C0();
+}
diff --git a/tests/language_2/superinterface_variance/covariance_test.dart b/tests/language_2/superinterface_variance/covariance_test.dart
new file mode 100644
index 0000000..11bb198
--- /dev/null
+++ b/tests/language_2/superinterface_variance/covariance_test.dart
@@ -0,0 +1,87 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+typedef F<X> = X Function();
+typedef G<X> = void Function(void Function(X));
+
+class A<X> {}
+
+class B01<X> extends A<F<X>> {}
+
+class B02<X> extends A<G<X>> {}
+
+class B03<X> extends A<X Function()> {}
+
+class B04<X> extends A<void Function(void Function(X))> {}
+
+class B05<X> extends Object with A<F<X>> {}
+
+class B06<X> extends Object with A<G<X>> {}
+
+class B07<X> extends Object with A<X Function()> {}
+
+class B08<X> extends Object with A<void Function(void Function(X))> {}
+
+class B09<X> implements A<F<X>> {}
+
+class B10<X> implements A<G<X>> {}
+
+class B11<X> implements A<X Function()> {}
+
+class B12<X> implements A<void Function(void Function(X))> {}
+
+abstract class B13<X> extends A<A<F<X>>> {}
+
+abstract class B14<X> extends A<A<G<X>>> {}
+
+abstract class B15<X> extends A<A<X Function()>> {}
+
+abstract class B16<X> extends A<A<void Function(void Function(X))>> {}
+
+abstract class B17<X> extends Object with A<A<F<X>>> {}
+
+abstract class B18<X> extends Object with A<A<G<X>>> {}
+
+abstract class B19<X> extends Object with A<A<X Function()>> {}
+
+abstract class B20<X> extends Object
+    with A<A<void Function(void Function(X))>> {}
+
+abstract class B21<X> implements A<A<F<X>>> {}
+
+abstract class B22<X> implements A<A<G<X>>> {}
+
+abstract class B23<X> implements A<A<X Function()>> {}
+
+abstract class B24<X> implements A<A<void Function(void Function(X))>> {}
+
+main() {
+  A();
+
+  B01();
+  B02();
+  B03();
+  B04();
+  B05();
+  B06();
+  B07();
+  B08();
+  B09();
+  B10();
+  B11();
+  B12();
+
+  B13 b13;
+  B14 b14;
+  B15 b15;
+  B16 b16;
+  B17 b17;
+  B18 b18;
+  B19 b19;
+  B20 b20;
+  B21 b21;
+  B22 b22;
+  B23 b23;
+  B24 b24;
+}
diff --git a/tests/language_2/superinterface_variance/mixin_error_test.dart b/tests/language_2/superinterface_variance/mixin_error_test.dart
new file mode 100644
index 0000000..14963f3
--- /dev/null
+++ b/tests/language_2/superinterface_variance/mixin_error_test.dart
@@ -0,0 +1,162 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+typedef F1<X> = void Function(X);
+typedef F2<X> = X Function(X);
+typedef F3<X> = void Function<Y extends X>();
+typedef F4<X> = X Function(X Function(void));
+typedef F5<X, Y> = Y Function(X);
+typedef F6<X, Y> = X Function(Y);
+
+class A<X> {}
+
+mixin B<X> on A<F1<X>> {} //# 01: compile-time error
+
+mixin B<X> on A<F2<X>> {} //# 02: compile-time error
+
+mixin B<X> on A<F3<X>> {} //# 03: compile-time error
+
+mixin B<X> on A<F4<X>> {} //# 04: compile-time error
+
+mixin B<X, Y> on A<F5<X, Y>> {} //# 05: compile-time error
+
+mixin B<X, Y> on A<F6<X, Y>> {} //# 06: compile-time error
+
+mixin B<X> on Object, A<F1<X>> {} //# 07: compile-time error
+
+mixin B<X> on Object, A<F2<X>> {} //# 08: compile-time error
+
+mixin B<X> on Object, A<F3<X>> {} //# 09: compile-time error
+
+mixin B<X> on Object, A<F4<X>> {} //# 10: compile-time error
+
+mixin B<X, Y> on Object, A<F5<X, Y>> {} //# 11: compile-time error
+
+mixin B<X, Y> on Object, A<F6<X, Y>> {} //# 12: compile-time error
+
+mixin B<X> implements A<F1<X>> {} //# 13: compile-time error
+
+mixin B<X> implements A<F2<X>> {} //# 14: compile-time error
+
+mixin B<X> implements A<F3<X>> {} //# 15: compile-time error
+
+mixin B<X> implements A<F4<X>> {} //# 16: compile-time error
+
+mixin B<X, Y> implements A<F5<X, Y>> {} //# 17: compile-time error
+
+mixin B<X, Y> implements A<F6<X, Y>> {} //# 18: compile-time error
+
+mixin B<X> on A<void Function(X)> {} //# 19: compile-time error
+
+mixin B<X> on A<X Function(X)> {} //# 20: compile-time error
+
+// Two errors here: Invariance in `on` clause and
+// generic function type used as actual type argument.
+mixin B<X> on A<void Function<Y extends X>()> {} //# 21: compile-time error
+
+mixin B<X> on A<X Function(X Function(void))> {} //# 22: compile-time error
+
+mixin B<X, Y> on A<Y Function(X)> {} //# 23: compile-time error
+
+mixin B<X, Y> on A<X Function(Y)> {} //# 24: compile-time error
+
+mixin B<X> on Object, A<void Function(X)> {} //# 25: compile-time error
+
+mixin B<X> on Object, A<X Function(X)> {} //# 26: compile-time error
+
+// Two errors here: Invariance in `on` clause and
+// generic function type used as actual type argument.
+mixin B<X> //# 27: compile-time error
+    on //# 27: continued
+        Object, //# 27: continued
+        A<void Function<Y extends X>()> {} //# 27: continued
+
+mixin B<X> //# 28: compile-time error
+    on //# 28: continued
+        Object, //# 28: continued
+        A<X Function(X Function(void))> {} //# 28: continued
+
+mixin B<X, Y> on Object, A<Y Function(X)> {} //# 29: compile-time error
+
+mixin B<X, Y> on Object, A<X Function(Y)> {} //# 30: compile-time error
+
+mixin B<X> implements A<void Function(X)> {} //# 31: compile-time error
+
+mixin B<X> implements A<X Function(X)> {} //# 32: compile-time error
+
+// Two errors here: Invariance in superinterface and
+// generic function type used as actual type argument.
+mixin B<X> //# 33: compile-time error
+    implements //# 33: continued
+        A<void Function<Y extends X>()> {} //# 33: continued
+
+mixin B<X> //# 34: compile-time error
+    implements //# 34: continued
+        A<X Function(X Function(void))> {} //# 34: continued
+
+mixin B<X, Y> implements A<Y Function(X)> {} //# 35: compile-time error
+
+mixin B<X, Y> implements A<X Function(Y)> {} //# 36: compile-time error
+
+// A superinterface variance error can arise for an inferred type. For
+// instance, mixin inference and instantiation to bound transforms `B` to
+// `B<X, F1<X>>` in subtest 37.
+
+class C<X> extends A<X> with B {} //# 37: compile-time error
+
+mixin B<X, Y extends F1<X>> on A<X> {} //# 37: continued
+
+class C<X> extends A<X> with B {} //# 38: compile-time error
+
+mixin B<X, Y extends F2<X>> on A<X> {} //# 38: continued
+
+class C<X> extends A<X> with B {} //# 39: compile-time error
+
+mixin B<X, Y extends F3<X>> on A<X> {} //# 39: continued
+
+class C<X> extends A<X> with B {} //# 40: compile-time error
+
+mixin B<X, Y extends F4<X>> on A<X> {} //# 40: continued
+
+class C<X> extends A<X> with B {} //# 41: compile-time error
+
+mixin B<X, Y extends F5<X, Y>> on A<X> {} //# 41: continued
+
+// Different kind of error here: I2b binds `Y` to `Null` which yields the
+// correct super-bounded type `B<X, F6<X, Null>>`. But it is still an error
+// for `C`, because a superinterface cannot be a super-bounded type.
+class C<X> extends A<X> with B {} //# 42: compile-time error
+
+mixin B<X, Y extends F6<X, Y>> on A<X> {} //# 42: continued
+
+class C<X> extends A<X> with B {} //# 43: compile-time error
+
+mixin B<X, Y extends void Function(X)> on A<X> {} //# 43: continued
+
+class C<X> extends A<X> with B {} //# 44: compile-time error
+
+mixin B<X, Y extends X Function(X)> on A<X> {} //# 44: continued
+
+// Two errors here: Invariance in inferred superinterface of `C` and
+// generic function type used as bound.
+class C<X> extends A<X> with B {} //# 45: compile-time error
+
+mixin B<X, Y extends void Function<Z extends X>()> on A<X> {} //# 45: continued
+
+class C<X> extends A<X> with B {} //# 46: compile-time error
+
+mixin B<X, Y extends X Function(X Function(void))> on A<X> {} //# 46: continued
+
+class C<X> extends A<X> with B {} //# 47: compile-time error
+
+mixin B<X, Y extends Y Function(X)> on A<X> {} //# 47: continued
+
+// Similar to subtest 42.
+class C<X> extends A<X> with B {} //# 48: compile-time error
+
+mixin B<X, Y extends X Function(Y)> on A<X> {} //# 48: continued
+
+main() {
+  A();
+}
diff --git a/tests/language_2/type_checks_in_factory_method_test.dart b/tests/language_2/type_checks_in_factory_method_test.dart
index 687264e..f0d116d 100644
--- a/tests/language_2/type_checks_in_factory_method_test.dart
+++ b/tests/language_2/type_checks_in_factory_method_test.dart
@@ -1,7 +1,6 @@
 // Copyright (c) 2012, the Dart project authors.  Please see the AUTHORS file
 // for details. All rights reserved. Use of this source code is governed by a
 // BSD-style license that can be found in the LICENSE file.
-// VMOptions=--enable_checked_mode
 // Tests the type checking when passing code into closure from inside a factory method
 
 import "package:expect/expect.dart";
diff --git a/tests/language_2/type_promotion_functions_test.dart b/tests/language_2/type_promotion_functions_test.dart
index 62a21c8..841d119 100644
--- a/tests/language_2/type_promotion_functions_test.dart
+++ b/tests/language_2/type_promotion_functions_test.dart
@@ -10,17 +10,21 @@
 
 class C {}
 
-// We have the following more specific (<<) relations between these typedefs:
+// Subtype relations:
 //
-//  FuncDynToDyn << FuncAtoDyn
-//  FuncDynToDyn << FuncDynToA << FuncDynToVoid
+//   FuncDynToA    == A       Function(dynamic) <:
+//   FuncDynToDyn  == dynamic Function(dynamic) <:> // "void == dynamic"
+//   FuncDynToVoid == void    Function(dynamic) <:
+//   FuncAtoDyn    == dynamic Function(A).
+//
+// Declarations ordered by "super before sub", as is common for classes:
 
 typedef FuncAtoDyn(A a);
-typedef FuncDynToDyn(x);
 typedef void FuncDynToVoid(x);
+typedef FuncDynToDyn(x);
 typedef A FuncDynToA(x);
 
-func(x) => x;
+A func(x) => null;
 
 A a;
 B b;
@@ -40,10 +44,10 @@
   c = funcAtoDyn(new C()); //# 01: compile-time error
 
   if (funcAtoDyn is FuncDynToDyn) {
-    // No promotion: FuncDynToDyn !<< FuncAtoDyn.
+    // Promotion: FuncDynToDyn <: FuncAtoDyn.
     a = funcAtoDyn(new A());
     b = funcAtoDyn(new B());
-    c = funcAtoDyn(new C()); //# 11: static type warning
+    c = funcAtoDyn(new C());
   }
 }
 
@@ -54,21 +58,23 @@
   c = funcDynToDyn(new C());
 
   if (funcDynToDyn is FuncAtoDyn) {
-    // Promotion: FuncAtoDyn << FuncDynToDyn.
+    // No promotion: FuncAtoDyn <\: FuncDynToDyn.
     a = funcDynToDyn(new A());
     b = funcDynToDyn(new B());
-    c = funcDynToDyn(new C()); //# 09: static type warning
+    c = funcDynToDyn(new C());
   }
 
   if (funcDynToDyn is FuncDynToVoid) {
-    // Promotion: FuncDynToVoid << FuncDynToDyn.
-    a = funcDynToDyn(new A()); //# 12: static type warning
-    b = funcDynToDyn(new B()); //# 13: static type warning
-    c = funcDynToDyn(new C()); //# 14: static type warning
+    // Promotion: FuncDynToVoid <: FuncDynToDyn.
+    funcDynToDyn(new A());
+    funcDynToDyn(new B());
+    funcDynToDyn(new C());
+    // Returned value has type `void`, usage is restricted.
+    Object o = funcDynToDyn(null); //# 12: compile-time error
   }
 
   if (funcDynToDyn is FuncDynToA) {
-    // Promotion: FuncDynToA << FuncDynToDyn.
+    // Promotion: FuncDynToA <: FuncDynToDyn.
     a = funcDynToDyn(new A());
     b = funcDynToDyn(new B());
     c = funcDynToDyn(new C()); //# 10: compile-time error
@@ -77,19 +83,19 @@
 
 testFuncDynToVoid() {
   FuncDynToVoid funcDynToVoid = func;
-  a = funcDynToVoid(new A()); //# 02: static type warning
-  b = funcDynToVoid(new B()); //# 03: static type warning
-  c = funcDynToVoid(new C()); //# 04: static type warning
+  a = funcDynToVoid(new A()); //# 02: compile-time error
+  b = funcDynToVoid(new B()); //# 03: compile-time error
+  c = funcDynToVoid(new C()); //# 04: compile-time error
 
   if (funcDynToVoid is FuncDynToDyn) {
-    // Promotion: FuncDynToDyn << FuncDynToVoid.
+    // Promotion: FuncDynToDyn <:> FuncDynToVoid.
     a = funcDynToVoid(new A());
     b = funcDynToVoid(new B());
     c = funcDynToVoid(new C());
   }
 
   if (funcDynToVoid is FuncDynToA) {
-    // Promotion: FuncDynToA << FuncDynToVoid.
+    // Promotion: FuncDynToA <: FuncDynToVoid.
     a = funcDynToVoid(new A());
     b = funcDynToVoid(new B());
     c = funcDynToVoid(new C()); //# 05: compile-time error
@@ -103,14 +109,14 @@
   c = funcDynToA(new C()); //# 06: compile-time error
 
   if (funcDynToA is FuncDynToDyn) {
-    // No promotion: FuncDynToDyn !<< FuncDynToA.
+    // No promotion: FuncDynToDyn <\: FuncDynToA.
     a = funcDynToA(new A());
     b = funcDynToA(new B());
     c = funcDynToA(new C()); //# 08: compile-time error
   }
 
   if (funcDynToA is FuncDynToVoid) {
-    // No promotion: FuncDynToVoid !<< FuncDynToA.
+    // No promotion: FuncDynToVoid <\: FuncDynToA.
     a = funcDynToA(new A());
     b = funcDynToA(new B());
     c = funcDynToA(new C()); //# 07: compile-time error
diff --git a/tests/language_2/unevaluated_field.dart b/tests/language_2/unevaluated_field.dart
new file mode 100644
index 0000000..d674af5
--- /dev/null
+++ b/tests/language_2/unevaluated_field.dart
@@ -0,0 +1,23 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=constant-update-2018
+
+// Test that environment constants in field initializers work properly.
+
+import "package:expect/expect.dart";
+
+const int gx = const int.fromEnvironment("x");
+
+class A {
+  final int x = gx;
+  final int y = const int.fromEnvironment("y");
+  const A();
+}
+
+main() {
+  const a = const A();
+  Expect.isTrue(a.x == null || a.x != null);
+  Expect.isTrue(a.y == null || a.y != null);
+}
diff --git a/tests/language_2/vm/osr_nonempty_stack_test.dart b/tests/language_2/vm/osr_nonempty_stack_test.dart
new file mode 100644
index 0000000..20af5d6
--- /dev/null
+++ b/tests/language_2/vm/osr_nonempty_stack_test.dart
@@ -0,0 +1,141 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// SharedOptions=--enable-experiment=spread-collections,control-flow-collections,constant-update-2018
+
+// Test with OSR on non-empty stack (block expression).
+
+import 'dart:core';
+import "package:expect/expect.dart";
+
+const String NeverInline = 'NeverInline';
+
+class Z {
+  @NeverInline
+  check(int a, int b, String c, List<int> d) {
+    Expect.equals(a, 42);
+    Expect.equals(b, global_bazz);
+    Expect.equals(c, 'abc');
+    return d;
+  }
+}
+
+Z z = new Z();
+int global_bazz = 123;
+int global_more_bazz = 456;
+
+@NeverInline
+int bazz() {
+  return ++global_bazz;
+}
+
+@NeverInline
+int more_bazz() {
+  return ++global_more_bazz;
+}
+
+@NeverInline
+int bar(int i) {
+  return i - 1;
+}
+
+@NeverInline
+List<int> spread(int v, List<int> x) {
+  return [v, ...x];
+}
+
+// Long running control-flow collection (block expression),
+// leaves the stack non-empty during a potential OSR.
+@NeverInline
+List<int> test1(int n) {
+  return spread(more_bazz(), [for (int i = 0; i < n; i++) i]);
+}
+
+// Long running control-flow collection (block expression) inside outer
+// loop, leaves the stack non-empty during a potential OSR.
+List<int> test2(int n) {
+  List<int> x = [];
+  for (int k = 0; k < 10; k++) {
+    x += spread(more_bazz(), [for (int i = 0; i < n; i++) i]);
+  }
+  return x;
+}
+
+// Long running control-flow collection (block expression) inside two
+// outer loops, leaves the stack non-empty during a potential OSR.
+List<int> test3(int n) {
+  List<int> x = [];
+  for (int k = 0; k < 4; k++) {
+    for (int j = 0; j < 4; j++) {
+      x += spread(more_bazz(), [for (int i = 0; i < n; i++) i]);
+    }
+  }
+  return x;
+}
+
+// Long running control-flow collection (block expression),
+// leaves the stack non-empty during a potential OSR.
+@NeverInline
+List<int> test4(int n) {
+  var x = [10] +
+      z.check(42, bazz(), 'abc',
+          [more_bazz(), for (int i = 0; i < n; i++) bar(2 * i)]);
+  return x;
+}
+
+// Long running control-flow collection (block expression) inside outer
+// loop, also leaves the stack non-empty during a potential OSR.
+@NeverInline
+List<int> test5(int m, int n) {
+  List<int> x = [];
+  for (int k = 0; k < m; k++) {
+    x += [10] +
+        z.check(42, bazz(), 'abc',
+            [more_bazz(), for (int i = 0; i < n; i++) bar(2 * i)]);
+  }
+  return x;
+}
+
+main() {
+  int n = 100000;
+  int g = 457;
+
+  var a = test1(n);
+  Expect.equals(a.length, n + 1);
+  for (int k = 0; k < n + 1; k++) {
+    int expect = (k == 0) ? g++ : k - 1;
+    Expect.equals(a[k], expect);
+  }
+
+  var b = test2(n);
+  Expect.equals(b.length, 10 * (n + 1));
+  for (int i = 0, k = 0; i < 10 * (n + 1); i++) {
+    int expect = (k == 0) ? g++ : k - 1;
+    Expect.equals(b[i], expect);
+    if (++k == (n + 1)) k = 0;
+  }
+
+  var c = test3(n);
+  Expect.equals(c.length, 16 * (n + 1));
+  for (int i = 0, k = 0; i < 16 * (n + 1); i++) {
+    int expect = (k == 0) ? g++ : k - 1;
+    Expect.equals(c[i], expect);
+    if (++k == (n + 1)) k = 0;
+  }
+
+  var d = test4(n);
+  Expect.equals(d.length, n + 2);
+  for (int k = 0; k < n + 2; k++) {
+    int expect = k <= 1 ? ((k == 0) ? 10 : g++) : -5 + 2 * k;
+    Expect.equals(d[k], expect);
+  }
+
+  var e = test5(10, n);
+  Expect.equals(e.length, 10 * (n + 2));
+  for (int i = 0, k = 0; i < 10 * (n + 2); i++) {
+    int expect = k <= 1 ? ((k == 0) ? 10 : g++) : -5 + 2 * k;
+    Expect.equals(e[i], expect);
+    if (++k == (n + 2)) k = 0;
+  }
+}
diff --git a/tests/language_2/vm/regress_flutter_28260_test.dart b/tests/language_2/vm/regress_flutter_28260_test.dart
new file mode 100644
index 0000000..830cae5
--- /dev/null
+++ b/tests/language_2/vm/regress_flutter_28260_test.dart
@@ -0,0 +1,24 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// VMOptions=--deterministic --optimization_counter_threshold=10
+
+// Bug cid ranges (https://github.com/flutter/flutter/issues/28260).
+
+import 'dart:typed_data';
+
+import "package:expect/expect.dart";
+
+foo() {
+  ByteBuffer a = null;
+  var dataMap = Map<String, dynamic>();
+  dataMap['data'] = a;
+  return (dataMap['data'] is ByteBuffer);
+}
+
+void main() {
+  for (int i = 0; i < 20; i++) {
+    Expect.equals(false, foo());
+  }
+}
diff --git a/tests/language_2/vm/regression_36076_test.dart b/tests/language_2/vm/regression_36076_test.dart
new file mode 100755
index 0000000..962a5cb
--- /dev/null
+++ b/tests/language_2/vm/regression_36076_test.dart
@@ -0,0 +1,41 @@
+// Bug found by DartFuzz (stripped down version):
+// https://github.com/dart-lang/sdk/issues/36076
+
+// Code does not do anything, but broke kernel binary flow graph builder.
+
+foo() {
+  try {
+    for (var x in [1, 2]) {
+      return;
+    }
+  } finally {
+    for (var x in [3]) {
+      break;
+    }
+  }
+}
+
+bar() {
+  try {} catch (e) {
+    try {} catch (e) {
+      for (var x in [1, 2]) {
+        if (x == 1) break;
+        return;
+      }
+      try {
+        try {} catch (e) {
+          return;
+        }
+      } catch (e) {}
+    } finally {
+      try {} catch (e) {
+        return;
+      }
+    }
+  } finally {}
+}
+
+main() {
+  foo();
+  bar();
+}
diff --git a/tests/language_2/vm/regression_36587_test.dart b/tests/language_2/vm/regression_36587_test.dart
new file mode 100644
index 0000000..a014641
--- /dev/null
+++ b/tests/language_2/vm/regression_36587_test.dart
@@ -0,0 +1,105 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Regression test extracted from a large DartFuzz-generated test.
+// https://github.com/dart-lang/sdk/issues/36587
+
+import "package:expect/expect.dart";
+
+import 'dart:async';
+import 'dart:cli';
+import 'dart:collection';
+import 'dart:convert';
+import 'dart:core';
+import 'dart:io';
+import 'dart:isolate';
+import 'dart:math';
+import 'dart:typed_data';
+
+Set<int> var0 = {-62, -13, 2147483648, -10, -9223372028264841217, -54, 47};
+Set<int> var1 = {-59};
+bool var2 = false;
+bool var3 = true;
+int var4 = 58;
+double var5 = 0.004032426761438224;
+String var6 = 'u6X2';
+List<int> var7 = [56, -95, 6442450944, -31, 82];
+Set<int> var8 = {9223372036854775807, 4294967297};
+Map<int, String> var9 = {
+  6: 'Ei(ZR',
+  75: 'O0A-',
+  99: 't',
+  49: 'Qu',
+  20: 'FujA\u2665',
+  47: ''
+};
+
+String foo2() {
+  var8 ??= Set.identity();
+  switch ((--var4)) {
+    case 3826530052:
+      {
+        {
+          int loc0 = 0;
+          do {
+            try {
+              throw {64: var6};
+            } catch (e) {
+              if ((!(var3))) {
+                break;
+              } else {
+                try {
+                  var8 = ((false ? FileSystemEntity.isWatchSupported : var3)
+                      ? {Int32x4.wxxx, var4, -43, Float32x4.wzxz}
+                      : {
+                          (var4++),
+                          (var7[(false ? -87 : (++loc0))] %
+                              (var7[((++loc0) * var4)] ~/ 73))
+                        });
+                  var0 = ((((-((((true ? var2 : false) ? (!(var3)) : true)
+                                  ? var5
+                                  : (0.38834735336907733 ??
+                                      0.8105736840461367)))) +
+                              (0.3752597438445757).abs()))
+                          .isFinite
+                      ? {
+                          (true ? 65 : (var3 ? (loc0--) : var4)),
+                          var7[Float32x4.xxxx]
+                        }
+                      : Set.identity());
+                  var1 = ((true
+                          ? ({var7[var7[-9223372032559808513]]}).toSet()
+                          : (Set.identity()).difference(var8)) ??
+                      var8);
+                  var9[Float32x4.zxyz] = '';
+                } catch (e) {
+                  loc0 ~/= ((var3 != var3)
+                      ? (~((false ? (-(loc0)) : Int32x4.wzwx)))
+                      : var4);
+                } finally {
+                  var1 = var8;
+                  var5 ??= 0.6273822429057158;
+                  throw [
+                    (loc0++),
+                    2147483647,
+                    (var4--),
+                    (-(ZLibOption.defaultWindowBits)),
+                    (~((loc0--))),
+                    (var4++)
+                  ];
+                }
+              }
+              break;
+            }
+          } while (++loc0 < 74);
+        }
+      }
+  }
+}
+
+main() {
+  Expect.equals(58, var4);
+  foo2();
+  Expect.equals(57, var4);
+}
diff --git a/tests/language_2/void/void_check_test.dart b/tests/language_2/void/void_check_test.dart
index 2e42a25..8c10f70 100644
--- a/tests/language_2/void/void_check_test.dart
+++ b/tests/language_2/void/void_check_test.dart
@@ -23,7 +23,7 @@
 // Makes the typing cleaner: the return type here is `dynamic` and we are
 // guaranteed that there won't be any warnings.
 // Dart2js can still infer the type by itself.
-@NoInline()
+@pragma('dart2js:noInline')
 callFoo(A a) => a.foo();
 
 main() {
diff --git a/tests/lib_2/html/cross_domain_iframe_script.html b/tests/lib_2/html/cross_domain_iframe_script.html
index 9b8ce84..41e2ea4 100644
--- a/tests/lib_2/html/cross_domain_iframe_script.html
+++ b/tests/lib_2/html/cross_domain_iframe_script.html
@@ -8,7 +8,7 @@
 
   <body>
     <script type="application/javascript"
-            src="/root_dart/tests/html/cross_domain_iframe_script.js">
+            src="/root_dart/tests/lib_2/html/cross_domain_iframe_script.js">
     </script>
   </body>
 </html>
diff --git a/tests/lib_2/html/custom/mirrors_2_test.dart b/tests/lib_2/html/custom/mirrors_2_test.dart
index 6fa8ab3..f92022e 100644
--- a/tests/lib_2/html/custom/mirrors_2_test.dart
+++ b/tests/lib_2/html/custom/mirrors_2_test.dart
@@ -45,7 +45,7 @@
 
   A.created() : super.created() {
     // This function must not be inlined otherwise there is no reference to the
-    // interceptor constant. The `@NoInline()` annotation does not seem reliable
+    // interceptor constant. The `@pragma('dart2js:noInline')` annotation does not seem reliable
     // on generative constructor bodies.
     try {
       uninlinedMethod();
@@ -57,7 +57,7 @@
       uninlinedMethod();
     }
   }
-  @NoInline()
+  @pragma('dart2js:noInline')
   uninlinedMethod() {}
 
   token() => 'AA';
diff --git a/tests/lib_2/html/debugger_test.dart b/tests/lib_2/html/debugger_test.dart
index 8207b59..cbe043a 100644
--- a/tests/lib_2/html/debugger_test.dart
+++ b/tests/lib_2/html/debugger_test.dart
@@ -157,9 +157,10 @@
   // The verify golden match test cases does the final comparison of golden
   // to expected output.
   addGolden(String name, value) {
+    var text = format(value);
     actual.write('Test: $name\n'
         'Value:\n'
-        '${format(value)}\n'
+        '$text\n'
         '-----------------------------------\n');
   }
 
@@ -279,7 +280,7 @@
 
   group('Module formatting', () {
     var moduleNames = _debugger.getModuleNames();
-    var testModuleName = "tests_lib_2_html_debugger_test/debugger_test";
+    var testModuleName = "debugger_test";
     expect(moduleNames.contains(testModuleName), isTrue);
 
     addAllNestedFormatterGoldens(
@@ -301,7 +302,8 @@
 
   group('Class formatting', () {
     addNestedFormatterGoldens('TestClass', new TestClass(17));
-    addNestedFormatterGoldens('MouseEvent', new MouseEvent("click"));
+    // TODO(jmesserly): this includes a timeStamp, so it varies each run.
+    //addNestedFormatterGoldens('MouseEvent', new MouseEvent("click"));
     // This is a good class to test as it has statics and a deep inheritance hierarchy
     addNestedFormatterGoldens('HttpRequest', new HttpRequest());
   });
@@ -329,10 +331,8 @@
           'the diff using your favorite diff tool to make sure the custom '
           'formatting output has not regressed.';
       print(helpMessage);
-      print(actualStr);
       // Copy text to clipboard on page click. We can't copy to the clipboard
       // without a click due to Chrome security.
-      var body = document.body;
       TextAreaElement textField = new Element.tag('textarea');
       textField.maxLength = 100000000;
       textField.text = actualStr;
diff --git a/tests/lib_2/html/debugger_test_golden.txt b/tests/lib_2/html/debugger_test_golden.txt
index 5894108..1c9ec45 100644
--- a/tests/lib_2/html/debugger_test_golden.txt
+++ b/tests/lib_2/html/debugger_test_golden.txt
@@ -3,9 +3,9 @@
 [
     "span",
     {
-        "style": "background-color: #d9edf7;"
+        "style": "background-color: #d9edf7;color: black"
     },
-    "JSArray<String> length 3"
+    "List<String> length 3"
 ]
 -----------------------------------
 Test: List<String> formatting body
@@ -26,7 +26,7 @@
             [
                 "span",
                 {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                    "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
                 },
                 "0: "
             ],
@@ -50,7 +50,7 @@
             [
                 "span",
                 {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                    "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
                 },
                 "1: "
             ],
@@ -74,7 +74,7 @@
             [
                 "span",
                 {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                    "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
                 },
                 "2: "
             ],
@@ -95,7 +95,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "[[class]]: "
         ],
@@ -122,9 +122,9 @@
 [
     "span",
     {
-        "style": "background-color: #d9edf7;"
+        "style": "background-color: #d9edf7;color: black"
     },
-    "JSArray<Object> length 3"
+    "List<Object> length 3"
 ]
 -----------------------------------
 Test: List<Object> instance body
@@ -145,7 +145,7 @@
             [
                 "span",
                 {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                    "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
                 },
                 "0: "
             ],
@@ -169,7 +169,7 @@
             [
                 "span",
                 {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                    "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
                 },
                 "1: "
             ],
@@ -193,7 +193,7 @@
             [
                 "span",
                 {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                    "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
                 },
                 "2: "
             ],
@@ -214,7 +214,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "[[class]]: "
         ],
@@ -241,9 +241,9 @@
 [
     "span",
     {
-        "style": "background-color: #d9edf7;"
+        "style": "background-color: #d9edf7;color: black"
     },
-    "JSArray<Object> implements List<Object>, JSIndexable<Object>"
+    "List<Object> implements List<Object>, JSIndexable<Object>"
 ]
 -----------------------------------
 Test: List<Object> definition formatting body
@@ -266,79 +266,6 @@
                 {
                     "style": ""
                 },
-                "[[Static members]]"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "markFixedList: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "markUnmodifiableList: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": ""
-                },
                 "[[Instance Methods]]"
             ]
         ]
@@ -351,7 +278,35 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "+: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "add: "
         ],
@@ -379,7 +334,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "addAll: "
         ],
@@ -407,7 +362,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "any: "
         ],
@@ -435,7 +390,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "asMap: "
         ],
@@ -463,7 +418,35 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "cast: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "checkGrowable: "
         ],
@@ -491,7 +474,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "checkMutable: "
         ],
@@ -519,7 +502,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "clear: "
         ],
@@ -547,7 +530,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "contains: "
         ],
@@ -575,7 +558,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "elementAt: "
         ],
@@ -603,7 +586,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "every: "
         ],
@@ -631,7 +614,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "expand: "
         ],
@@ -659,7 +642,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "fillRange: "
         ],
@@ -687,7 +670,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "firstWhere: "
         ],
@@ -715,7 +698,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "fold: "
         ],
@@ -743,7 +726,35 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "followedBy: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "forEach: "
         ],
@@ -771,7 +782,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "getRange: "
         ],
@@ -799,7 +810,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "indexOf: "
         ],
@@ -827,7 +838,35 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "indexWhere: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "insert: "
         ],
@@ -855,7 +894,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "insertAll: "
         ],
@@ -883,7 +922,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "join: "
         ],
@@ -911,7 +950,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "lastIndexOf: "
         ],
@@ -939,7 +978,35 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "lastIndexWhere: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "lastWhere: "
         ],
@@ -967,7 +1034,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "map: "
         ],
@@ -995,7 +1062,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "reduce: "
         ],
@@ -1023,7 +1090,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "remove: "
         ],
@@ -1051,7 +1118,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "removeAt: "
         ],
@@ -1079,7 +1146,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "removeLast: "
         ],
@@ -1107,7 +1174,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "removeRange: "
         ],
@@ -1135,7 +1202,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "removeWhere: "
         ],
@@ -1163,7 +1230,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "replaceRange: "
         ],
@@ -1191,7 +1258,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "retainWhere: "
         ],
@@ -1219,7 +1286,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "setAll: "
         ],
@@ -1247,7 +1314,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "setRange: "
         ],
@@ -1275,7 +1342,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "shuffle: "
         ],
@@ -1303,7 +1370,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "singleWhere: "
         ],
@@ -1331,7 +1398,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "skip: "
         ],
@@ -1359,7 +1426,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "skipWhile: "
         ],
@@ -1387,7 +1454,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "sort: "
         ],
@@ -1415,7 +1482,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "sublist: "
         ],
@@ -1443,7 +1510,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "take: "
         ],
@@ -1471,7 +1538,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "takeWhile: "
         ],
@@ -1499,7 +1566,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "toList: "
         ],
@@ -1527,7 +1594,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "toSet: "
         ],
@@ -1555,7 +1622,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "toString: "
         ],
@@ -1583,7 +1650,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "where: "
         ],
@@ -1611,7 +1678,35 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "whereType: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "_equals: "
         ],
@@ -1639,7 +1734,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "_get: "
         ],
@@ -1667,7 +1762,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "_removeWhere: "
         ],
@@ -1695,7 +1790,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "_set: "
         ],
@@ -1723,7 +1818,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "[[base class]]: "
         ],
@@ -1750,9 +1845,9 @@
 [
     "span",
     {
-        "style": "background-color: #d9edf7;"
+        "style": "background-color: #d9edf7;color: black"
     },
-    "JSArray<int> length 200"
+    "List<int> length 200"
 ]
 -----------------------------------
 Test: List<int> large instance body
@@ -1812,7 +1907,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "[[class]]: "
         ],
@@ -1839,9 +1934,9 @@
 [
     "span",
     {
-        "style": "background-color: #d9edf7;"
+        "style": "background-color: #d9edf7;color: black"
     },
-    "JSArray<int> implements List<int>, JSIndexable<int>"
+    "List<int> implements List<int>, JSIndexable<int>"
 ]
 -----------------------------------
 Test: List<int> large definition formatting body
@@ -1864,79 +1959,6 @@
                 {
                     "style": ""
                 },
-                "[[Static members]]"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "markFixedList: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "markUnmodifiableList: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": ""
-                },
                 "[[Instance Methods]]"
             ]
         ]
@@ -1949,7 +1971,35 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "+: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "add: "
         ],
@@ -1977,7 +2027,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "addAll: "
         ],
@@ -2005,7 +2055,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "any: "
         ],
@@ -2033,7 +2083,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "asMap: "
         ],
@@ -2061,7 +2111,35 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "cast: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "checkGrowable: "
         ],
@@ -2089,7 +2167,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "checkMutable: "
         ],
@@ -2117,7 +2195,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "clear: "
         ],
@@ -2145,7 +2223,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "contains: "
         ],
@@ -2173,7 +2251,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "elementAt: "
         ],
@@ -2201,7 +2279,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "every: "
         ],
@@ -2229,7 +2307,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "expand: "
         ],
@@ -2257,7 +2335,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "fillRange: "
         ],
@@ -2285,7 +2363,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "firstWhere: "
         ],
@@ -2313,7 +2391,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "fold: "
         ],
@@ -2341,7 +2419,35 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "followedBy: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "forEach: "
         ],
@@ -2369,7 +2475,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "getRange: "
         ],
@@ -2397,7 +2503,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "indexOf: "
         ],
@@ -2425,7 +2531,35 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "indexWhere: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "insert: "
         ],
@@ -2453,7 +2587,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "insertAll: "
         ],
@@ -2481,7 +2615,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "join: "
         ],
@@ -2509,7 +2643,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "lastIndexOf: "
         ],
@@ -2537,7 +2671,35 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "lastIndexWhere: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "lastWhere: "
         ],
@@ -2565,7 +2727,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "map: "
         ],
@@ -2593,7 +2755,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "reduce: "
         ],
@@ -2621,7 +2783,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "remove: "
         ],
@@ -2649,7 +2811,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "removeAt: "
         ],
@@ -2677,7 +2839,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "removeLast: "
         ],
@@ -2705,7 +2867,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "removeRange: "
         ],
@@ -2733,7 +2895,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "removeWhere: "
         ],
@@ -2761,7 +2923,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "replaceRange: "
         ],
@@ -2789,7 +2951,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "retainWhere: "
         ],
@@ -2817,7 +2979,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "setAll: "
         ],
@@ -2845,7 +3007,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "setRange: "
         ],
@@ -2873,7 +3035,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "shuffle: "
         ],
@@ -2901,7 +3063,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "singleWhere: "
         ],
@@ -2929,7 +3091,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "skip: "
         ],
@@ -2957,7 +3119,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "skipWhile: "
         ],
@@ -2985,7 +3147,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "sort: "
         ],
@@ -3013,7 +3175,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "sublist: "
         ],
@@ -3041,7 +3203,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "take: "
         ],
@@ -3069,7 +3231,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "takeWhile: "
         ],
@@ -3097,7 +3259,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "toList: "
         ],
@@ -3125,7 +3287,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "toSet: "
         ],
@@ -3153,7 +3315,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "toString: "
         ],
@@ -3181,7 +3343,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "where: "
         ],
@@ -3209,7 +3371,35 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "whereType: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "_equals: "
         ],
@@ -3237,7 +3427,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "_get: "
         ],
@@ -3265,7 +3455,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "_removeWhere: "
         ],
@@ -3293,7 +3483,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "_set: "
         ],
@@ -3321,7 +3511,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "[[base class]]: "
         ],
@@ -3348,7 +3538,7 @@
 [
     "span",
     {
-        "style": "background-color: #d9edf7;"
+        "style": "background-color: #d9edf7;color: black"
     },
     "MappedListIterable<String, String> length 3"
 ]
@@ -3371,7 +3561,7 @@
             [
                 "span",
                 {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                    "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
                 },
                 "0: "
             ],
@@ -3395,7 +3585,7 @@
             [
                 "span",
                 {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                    "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
                 },
                 "1: "
             ],
@@ -3419,7 +3609,7 @@
             [
                 "span",
                 {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                    "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
                 },
                 "2: "
             ],
@@ -3440,7 +3630,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "[[class]]: "
         ],
@@ -3467,7 +3657,7 @@
 [
     "span",
     {
-        "style": "background-color: #d9edf7;"
+        "style": "background-color: #d9edf7;color: black"
     },
     "MappedListIterable<String, String>"
 ]
@@ -3504,7 +3694,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "elementAt: "
         ],
@@ -3532,7 +3722,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "[[base class]]: "
         ],
@@ -3559,9 +3749,9 @@
 [
     "span",
     {
-        "style": "background-color: #d9edf7;"
+        "style": "background-color: #d9edf7;color: black"
     },
-    "_HashSet length 3"
+    "_HashSet<dynamic> length 3"
 ]
 -----------------------------------
 Test: Set instance body
@@ -3582,7 +3772,7 @@
             [
                 "span",
                 {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                    "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
                 },
                 "0: "
             ],
@@ -3606,7 +3796,7 @@
             [
                 "span",
                 {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                    "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
                 },
                 "1: "
             ],
@@ -3630,7 +3820,7 @@
             [
                 "span",
                 {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                    "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
                 },
                 "2: "
             ],
@@ -3651,7 +3841,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "[[class]]: "
         ],
@@ -3678,9 +3868,9 @@
 [
     "span",
     {
-        "style": "background-color: #d9edf7;"
+        "style": "background-color: #d9edf7;color: black"
     },
-    "_HashSet implements LinkedHashSet"
+    "_HashSet<dynamic> implements HashSet<dynamic>, LinkedHashSet<dynamic>"
 ]
 -----------------------------------
 Test: Set definition formatting body
@@ -3703,51 +3893,6 @@
                 {
                     "style": ""
                 },
-                "[[Static members]]"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "setToString: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": ""
-                },
                 "[[Instance Methods]]"
             ]
         ]
@@ -3760,7 +3905,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "add: "
         ],
@@ -3788,7 +3933,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "addAll: "
         ],
@@ -3816,7 +3961,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "contains: "
         ],
@@ -3844,7 +3989,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "lookup: "
         ],
@@ -3872,7 +4017,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "remove: "
         ],
@@ -3900,7 +4045,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "_newSet: "
         ],
@@ -3928,7 +4073,35 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "_newSimilarSet: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "[[base class]]: "
         ],
@@ -3955,7 +4128,7 @@
 [
     "span",
     {
-        "style": "background-color: #d9edf7;"
+        "style": "background-color: #d9edf7;color: black"
     },
     "IdentityMap<String, int> length 3"
 ]
@@ -3975,7 +4148,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "0: "
         ],
@@ -4003,7 +4176,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "1: "
         ],
@@ -4031,7 +4204,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "2: "
         ],
@@ -4059,7 +4232,35 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "[[instance members]]: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "asObject"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "[[class]]: "
         ],
@@ -4086,9 +4287,9 @@
 [
     "span",
     {
-        "style": "background-color: #d9edf7;"
+        "style": "background-color: #d9edf7;color: black"
     },
-    "LinkedMap length 3"
+    "LinkedMap<dynamic, dynamic> length 3"
 ]
 -----------------------------------
 Test: Map<dynamic, dynamic> instance body
@@ -4106,7 +4307,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "0: "
         ],
@@ -4134,7 +4335,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "1: "
         ],
@@ -4162,7 +4363,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "2: "
         ],
@@ -4190,7 +4391,35 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "[[instance members]]: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "asObject"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "[[class]]: "
         ],
@@ -4217,9 +4446,9 @@
 [
     "span",
     {
-        "style": "background-color: #d9edf7;"
+        "style": "background-color: #d9edf7;color: black"
     },
-    "LinkedMap"
+    "LinkedMap<dynamic, dynamic>"
 ]
 -----------------------------------
 Test: Map<dynamic, dynamic> definition formatting body
@@ -4254,7 +4483,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "addAll: "
         ],
@@ -4282,7 +4511,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "clear: "
         ],
@@ -4310,63 +4539,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "containsKey: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "containsValue: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "putIfAbsent: "
         ],
@@ -4394,7 +4567,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "remove: "
         ],
@@ -4422,35 +4595,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "toString: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "_get: "
         ],
@@ -4478,7 +4623,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "_set: "
         ],
@@ -4506,7 +4651,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "[[base class]]: "
         ],
@@ -4533,9 +4678,9 @@
 [
     "span",
     {
-        "style": "background-color: #d9edf7;"
+        "style": "background-color: #d9edf7;color: black"
     },
-    "(int, int) -> int"
+    "(int, int) => int"
 ]
 -----------------------------------
 Test: Function formatting body
@@ -4556,7 +4701,7 @@
             [
                 "span",
                 {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                    "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
                 },
                 "signature: "
             ],
@@ -4565,7 +4710,7 @@
                 {
                     "style": "margin-left: 13px"
                 },
-                "(int, int) -> int"
+                "(int, int) => int"
             ]
         ]
     ],
@@ -4577,7 +4722,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "JavaScript Function: "
         ],
@@ -4604,9 +4749,9 @@
 [
     "span",
     {
-        "style": "background-color: #d9edf7;"
+        "style": "background-color: #d9edf7;color: black"
     },
-    "(String, (Event) -> bool) -> dynamic"
+    "(String, (Event$) => bool) => Null"
 ]
 -----------------------------------
 Test: Function with functon arguments formatting body
@@ -4627,7 +4772,7 @@
             [
                 "span",
                 {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                    "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
                 },
                 "signature: "
             ],
@@ -4636,7 +4781,7 @@
                 {
                     "style": "margin-left: 13px"
                 },
-                "(String, (Event) -> bool) -> dynamic"
+                "(String, (Event$) => bool) => Null"
             ]
         ]
     ],
@@ -4648,7 +4793,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "JavaScript Function: "
         ],
@@ -4679,7 +4824,7 @@
 [
     "span",
     {
-        "style": "background-color: #d9edf7;"
+        "style": "background-color: #d9edf7;color: black"
     },
     "TestClass"
 ]
@@ -4698,9 +4843,9 @@
 [
     "span",
     {
-        "style": "background-color: #d9edf7;"
+        "style": "background-color: #d9edf7;color: black"
     },
-    "Object"
+    "Instance of 'Object'"
 ]
 -----------------------------------
 Test: Object formatting body
@@ -4718,7 +4863,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "runtimeType: "
         ],
@@ -4746,7 +4891,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "[[class]]: "
         ],
@@ -4773,7 +4918,7 @@
 [
     "span",
     {
-        "style": "background-color: #d9edf7;"
+        "style": "background-color: #d9edf7;color: black"
     },
     "TestClass"
 ]
@@ -4792,7 +4937,7 @@
 [
     "span",
     {
-        "style": "background-color: #d9edf7;"
+        "style": "background-color: #d9edf7;color: black"
     },
     "HttpRequest"
 ]
@@ -4811,9 +4956,9 @@
 [
     "span",
     {
-        "style": "background-color: #d9edf7;"
+        "style": "background-color: #d9edf7;color: black"
     },
-    "Library Module: tests_lib_2_html_debugger_test/debugger_test"
+    "Library Module: debugger_test"
 ]
 -----------------------------------
 Test: Test library Module body
@@ -4851,7 +4996,7 @@
 [
     "span",
     {
-        "style": "background-color: #d9edf7;"
+        "style": "background-color: #d9edf7;color: black"
     },
     "<FILE>"
 ]
@@ -4871,7 +5016,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "TestClass: "
         ],
@@ -4899,9 +5044,9 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
-            "TestGenericClass: "
+            "TestGenericClass<dynamic, dynamic>: "
         ],
         [
             "span",
@@ -4927,7 +5072,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "devtoolsFormatters: "
         ],
@@ -4955,7 +5100,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "replacer: "
         ],
@@ -4983,7 +5128,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "format: "
         ],
@@ -5011,7 +5156,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "FormattedObject: "
         ],
@@ -5039,7 +5184,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "extractNestedFormattedObjects: "
         ],
@@ -5067,7 +5212,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "main: "
         ],
@@ -5094,7 +5239,7 @@
 [
     "span",
     {
-        "style": "background-color: #d9edf7;"
+        "style": "background-color: #d9edf7;color: black"
     },
     "StackTrace"
 ]
@@ -5104,7 +5249,7 @@
 [
     "ol",
     {
-        "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;color: rgb(196, 26, 22);"
+        "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;background-color: thistle;color: rgb(196, 26, 22);"
     },
     [
         "li",
@@ -5119,7 +5264,7 @@
                 {
                     "style": ""
                 },
-                "Error"
+                "Error: Instance of 'Error'"
             ]
         ]
     ],
@@ -5385,9 +5530,9 @@
 [
     "span",
     {
-        "style": "background-color: #d9edf7;"
+        "style": "background-color: #d9edf7;color: black"
     },
-    "TestClass"
+    "Instance of 'TestClass'"
 ]
 -----------------------------------
 Test: TestClass instance body
@@ -5408,7 +5553,7 @@
             [
                 "span",
                 {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                    "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
                 },
                 "date: "
             ],
@@ -5432,7 +5577,7 @@
             [
                 "span",
                 {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                    "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
                 },
                 "name: "
             ],
@@ -5452,2548 +5597,8 @@
         },
         [
             "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "someInt: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "42"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "someObject: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "someString: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "Hello world"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "[[class]]: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "asClass"
-                    }
-                }
-            ]
-        ]
-    ]
-]
------------------------------------
-Test: TestClass definition formatting header
-Value:
-[
-    "span",
-    {
-        "style": "background-color: #d9edf7;"
-    },
-    "TestClass"
-]
------------------------------------
-Test: TestClass definition formatting body
-Value:
-[
-    "ol",
-    {
-        "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;"
-    },
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": ""
-                },
-                "[[Static members]]"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "exampleStaticMethod: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": ""
-                },
-                "[[Instance Methods]]"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "addOne: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "last: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "nameAndDate: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "returnObject: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "[[base class]]: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "asClass"
-                    }
-                }
-            ]
-        ]
-    ]
-]
------------------------------------
-Test: MouseEvent instance header
-Value:
-[
-    "span",
-    {
-        "style": "background-color: #d9edf7;"
-    },
-    "MouseEvent"
-]
------------------------------------
-Test: MouseEvent instance body
-Value:
-[
-    "ol",
-    {
-        "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;"
-    },
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "altKey: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "false"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "bubbles: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "true"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "button: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "0"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "buttons: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "0"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "cancelable: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "true"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "client: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "ctrlKey: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "false"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "dataTransfer: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "null"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "defaultPrevented: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "false"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "detail: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "0"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "eventPhase: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "0"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "fromElement: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "isTrusted: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "false"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "layer: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "metaKey: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "false"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "movement: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "offset: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "<Exception thrown> Unsupported operation: offsetX is only supported on elements"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "page: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "path: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "region: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "null"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "relatedTarget: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "scoped: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "null"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "screen: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "shiftKey: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "false"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "sourceCapabilities: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "timeStamp: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "5099.7300000000005"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "toElement: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "type: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "click"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "_clientX: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "0"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "_clientY: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "0"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "_get_currentTarget: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "_get_relatedTarget: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "_get_target: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "_get_view: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "_layerX: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "0"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "_layerY: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "0"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "_movementX: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "0"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "_movementY: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "0"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "_pageX: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "0"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "_pageY: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "0"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "_screenX: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "0"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "_screenY: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "0"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "_selector: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "null"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "_which: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "1"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "[[class]]: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "asClass"
-                    }
-                }
-            ]
-        ]
-    ]
-]
------------------------------------
-Test: MouseEvent definition formatting header
-Value:
-[
-    "span",
-    {
-        "style": "background-color: #d9edf7;"
-    },
-    "MouseEvent"
-]
------------------------------------
-Test: MouseEvent definition formatting body
-Value:
-[
-    "ol",
-    {
-        "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;"
-    },
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": ""
-                },
-                "[[Static members]]"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "_create_1: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "_create_2: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": ""
-                },
-                "[[Instance Methods]]"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "getModifierState: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "_initMouseEvent: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "_initMouseEvent_1: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "[[base class]]: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "asClass"
-                    }
-                }
-            ]
-        ]
-    ]
-]
------------------------------------
-Test: HttpRequest instance header
-Value:
-[
-    "span",
-    {
-        "style": "background-color: #d9edf7;"
-    },
-    "HttpRequest"
-]
------------------------------------
-Test: HttpRequest instance body
-Value:
-[
-    "ol",
-    {
-        "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;"
-    },
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "onReadyStateChange: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "readyState: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "0"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "response: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                ""
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "responseHeaders: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "responseText: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                ""
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "responseType: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                ""
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "responseUrl: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                ""
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "responseXml: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "status: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "0"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "statusText: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                ""
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "timeout: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "0"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "upload: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "withCredentials: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                "false"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
-                },
-                "_get_response: "
-            ],
-            [
-                "span",
-                {
-                    "style": "margin-left: 13px"
-                },
-                ""
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "[[class]]: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "asClass"
-                    }
-                }
-            ]
-        ]
-    ]
-]
------------------------------------
-Test: HttpRequest definition formatting header
-Value:
-[
-    "span",
-    {
-        "style": "background-color: #d9edf7;"
-    },
-    "HttpRequest"
-]
------------------------------------
-Test: HttpRequest definition formatting body
-Value:
-[
-    "ol",
-    {
-        "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;"
-    },
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": ""
-                },
-                "[[Static members]]"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "getString: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "postFormData: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "request: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "requestCrossOrigin: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "_create_1: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {},
-            [
-                "span",
-                {
-                    "style": ""
-                },
-                "[[Instance Methods]]"
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "abort: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "getAllResponseHeaders: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "getResponseHeader: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "open: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "overrideMimeType: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "send: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "setRequestHeader: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "[[base class]]: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "asClass"
-                    }
-                }
-            ]
-        ]
-    ]
-]
------------------------------------
-Test: TestGenericClass instance header
-Value:
-[
-    "span",
-    {
-        "style": "background-color: #d9edf7;"
-    },
-    "TestGenericClass<int, List>"
-]
------------------------------------
-Test: TestGenericClass instance body
-Value:
-[
-    "ol",
-    {
-        "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;"
-    },
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "runtimeType: "
         ],
@@ -8024,7 +5629,1217 @@
             [
                 "span",
                 {
-                    "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                    "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+                },
+                "someInt: "
+            ],
+            [
+                "span",
+                {
+                    "style": "margin-left: 13px"
+                },
+                "42"
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "someObject: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {},
+            [
+                "span",
+                {
+                    "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+                },
+                "someString: "
+            ],
+            [
+                "span",
+                {
+                    "style": "margin-left: 13px"
+                },
+                "Hello world"
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "[[class]]: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "asClass"
+                    }
+                }
+            ]
+        ]
+    ]
+]
+-----------------------------------
+Test: TestClass definition formatting header
+Value:
+[
+    "span",
+    {
+        "style": "background-color: #d9edf7;color: black"
+    },
+    "TestClass"
+]
+-----------------------------------
+Test: TestClass definition formatting body
+Value:
+[
+    "ol",
+    {
+        "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;"
+    },
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {},
+            [
+                "span",
+                {
+                    "style": ""
+                },
+                "[[Instance Methods]]"
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "addOne: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "last: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "nameAndDate: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "returnObject: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "[[base class]]: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "asClass"
+                    }
+                }
+            ]
+        ]
+    ]
+]
+-----------------------------------
+Test: HttpRequest instance header
+Value:
+[
+    "span",
+    {
+        "style": "background-color: #d9edf7;color: black"
+    },
+    "[object XMLHttpRequest]"
+]
+-----------------------------------
+Test: HttpRequest instance body
+Value:
+[
+    "ol",
+    {
+        "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;"
+    },
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {},
+            [
+                "span",
+                {
+                    "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+                },
+                "readyState: "
+            ],
+            [
+                "span",
+                {
+                    "style": "margin-left: 13px"
+                },
+                "0"
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {},
+            [
+                "span",
+                {
+                    "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+                },
+                "responseText: "
+            ],
+            [
+                "span",
+                {
+                    "style": "margin-left: 13px"
+                },
+                ""
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {},
+            [
+                "span",
+                {
+                    "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+                },
+                "responseType: "
+            ],
+            [
+                "span",
+                {
+                    "style": "margin-left: 13px"
+                },
+                ""
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {},
+            [
+                "span",
+                {
+                    "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+                },
+                "responseUrl: "
+            ],
+            [
+                "span",
+                {
+                    "style": "margin-left: 13px"
+                },
+                ""
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "responseXml: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {},
+            [
+                "span",
+                {
+                    "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+                },
+                "status: "
+            ],
+            [
+                "span",
+                {
+                    "style": "margin-left: 13px"
+                },
+                "0"
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {},
+            [
+                "span",
+                {
+                    "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+                },
+                "statusText: "
+            ],
+            [
+                "span",
+                {
+                    "style": "margin-left: 13px"
+                },
+                ""
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {},
+            [
+                "span",
+                {
+                    "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+                },
+                "timeout: "
+            ],
+            [
+                "span",
+                {
+                    "style": "margin-left: 13px"
+                },
+                "0"
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "upload: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {},
+            [
+                "span",
+                {
+                    "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+                },
+                "withCredentials: "
+            ],
+            [
+                "span",
+                {
+                    "style": "margin-left: 13px"
+                },
+                "false"
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {},
+            [
+                "span",
+                {
+                    "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+                },
+                "_get_response: "
+            ],
+            [
+                "span",
+                {
+                    "style": "margin-left: 13px"
+                },
+                ""
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "on: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "onAbort: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "onError: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "onLoad: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "onLoadEnd: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "onLoadStart: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "onProgress: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "onReadyStateChange: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "onTimeout: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {},
+            [
+                "span",
+                {
+                    "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+                },
+                "response: "
+            ],
+            [
+                "span",
+                {
+                    "style": "margin-left: 13px"
+                },
+                ""
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "responseHeaders: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "runtimeType: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "[[class]]: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "asClass"
+                    }
+                }
+            ]
+        ]
+    ]
+]
+-----------------------------------
+Test: HttpRequest definition formatting header
+Value:
+[
+    "span",
+    {
+        "style": "background-color: #d9edf7;color: black"
+    },
+    "HttpRequest"
+]
+-----------------------------------
+Test: HttpRequest definition formatting body
+Value:
+[
+    "ol",
+    {
+        "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;"
+    },
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {},
+            [
+                "span",
+                {
+                    "style": ""
+                },
+                "[[Instance Methods]]"
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "abort: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "getAllResponseHeaders: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "getResponseHeader: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "open: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "overrideMimeType: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "send: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "setRequestHeader: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "[[base class]]: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "asClass"
+                    }
+                }
+            ]
+        ]
+    ]
+]
+-----------------------------------
+Test: TestGenericClass instance header
+Value:
+[
+    "span",
+    {
+        "style": "background-color: #d9edf7;color: black"
+    },
+    "Instance of 'TestGenericClass<int, List<dynamic>>'"
+]
+-----------------------------------
+Test: TestGenericClass instance body
+Value:
+[
+    "ol",
+    {
+        "style": "list-style-type: none;padding-left: 0px;margin-top: 0px;margin-bottom: 0px;margin-left: 12px;"
+    },
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {},
+            [
+                "span",
+                {
+                    "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
                 },
                 "x: "
             ],
@@ -8045,7 +6860,35 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "runtimeType: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "[[class]]: "
         ],
@@ -8072,9 +6915,9 @@
 [
     "span",
     {
-        "style": "background-color: #d9edf7;"
+        "style": "background-color: #d9edf7;color: black"
     },
-    "TestGenericClass<int, List>"
+    "TestGenericClass<int, List<dynamic>>"
 ]
 -----------------------------------
 Test: TestGenericClass definition formatting body
@@ -8109,7 +6952,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "noSuchMethod: "
         ],
@@ -8137,7 +6980,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "toString: "
         ],
@@ -8165,7 +7008,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "_equals: "
         ],
@@ -8193,7 +7036,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "[[base class]]: "
         ],
@@ -8220,9 +7063,9 @@
 [
     "span",
     {
-        "style": "background-color: #d9edf7;"
+        "style": "background-color: #d9edf7;color: black"
     },
-    "TestGenericClass<JSObject<ExampleJSClass>, int>"
+    "Instance of 'TestGenericClass<JSObject<ExampleJSClass>, int>'"
 ]
 -----------------------------------
 Test: TestGenericClassJSInterop instance body
@@ -8240,35 +7083,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
-            },
-            "runtimeType: "
-        ],
-        [
-            "span",
-            {
-                "style": "margin-left: 13px"
-            },
-            [
-                "object",
-                {
-                    "object": "<OBJECT>",
-                    "config": {
-                        "name": "none"
-                    }
-                }
-            ]
-        ]
-    ],
-    [
-        "li",
-        {
-            "style": "padding-left: 13px;"
-        },
-        [
-            "span",
-            {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "x: "
         ],
@@ -8296,7 +7111,35 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
+            },
+            "runtimeType: "
+        ],
+        [
+            "span",
+            {
+                "style": "margin-left: 13px"
+            },
+            [
+                "object",
+                {
+                    "object": "<OBJECT>",
+                    "config": {
+                        "name": "none"
+                    }
+                }
+            ]
+        ]
+    ],
+    [
+        "li",
+        {
+            "style": "padding-left: 13px;"
+        },
+        [
+            "span",
+            {
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "[[class]]: "
         ],
@@ -8323,7 +7166,7 @@
 [
     "span",
     {
-        "style": "background-color: #d9edf7;"
+        "style": "background-color: #d9edf7;color: black"
     },
     "TestGenericClass<JSObject<ExampleJSClass>, int>"
 ]
@@ -8360,7 +7203,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "noSuchMethod: "
         ],
@@ -8388,7 +7231,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "toString: "
         ],
@@ -8416,7 +7259,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "_equals: "
         ],
@@ -8444,7 +7287,7 @@
         [
             "span",
             {
-                "style": "color: rgb(136, 19, 145); margin-right: -13px"
+                "style": "background-color: thistle; color: rgb(136, 19, 145); margin-right: -13px"
             },
             "[[base class]]: "
         ],
@@ -8465,4 +7308,4 @@
         ]
     ]
 ]
------------------------------------
+-----------------------------------
\ No newline at end of file
diff --git a/tests/lib_2/html/js_dispatch_property_test.dart b/tests/lib_2/html/js_dispatch_property_test.dart
index 27030b0..3a75f8e 100644
--- a/tests/lib_2/html/js_dispatch_property_test.dart
+++ b/tests/lib_2/html/js_dispatch_property_test.dart
@@ -11,8 +11,8 @@
 
 import 'js_dispatch_property_test_lib.dart';
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(x) => x;
 
 main() {
diff --git a/tests/lib_2/html/js_interop_constructor_name_div_test.dart b/tests/lib_2/html/js_interop_constructor_name_div_test.dart
index dfdbfac..869ff73 100644
--- a/tests/lib_2/html/js_interop_constructor_name_div_test.dart
+++ b/tests/lib_2/html/js_interop_constructor_name_div_test.dart
@@ -21,8 +21,8 @@
   external String bar();
 }
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(x) => x;
 
 main() {
diff --git a/tests/lib_2/html/js_interop_constructor_name_error1_test.dart b/tests/lib_2/html/js_interop_constructor_name_error1_test.dart
index b534222..9057129 100644
--- a/tests/lib_2/html/js_interop_constructor_name_error1_test.dart
+++ b/tests/lib_2/html/js_interop_constructor_name_error1_test.dart
@@ -21,8 +21,8 @@
   external String bar();
 }
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(x) => x;
 
 main() {
diff --git a/tests/lib_2/html/js_interop_constructor_name_error2_test.dart b/tests/lib_2/html/js_interop_constructor_name_error2_test.dart
index 00c8fd6..6340f63 100644
--- a/tests/lib_2/html/js_interop_constructor_name_error2_test.dart
+++ b/tests/lib_2/html/js_interop_constructor_name_error2_test.dart
@@ -21,8 +21,8 @@
   external String bar();
 }
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(x) => x;
 
 main() {
diff --git a/tests/lib_2/html/js_interop_constructor_name_method_test.dart b/tests/lib_2/html/js_interop_constructor_name_method_test.dart
index 2e5b3ce..f96895a 100644
--- a/tests/lib_2/html/js_interop_constructor_name_method_test.dart
+++ b/tests/lib_2/html/js_interop_constructor_name_method_test.dart
@@ -21,8 +21,8 @@
   external String bar();
 }
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(x) => x;
 
 main() {
diff --git a/tests/lib_2/html/js_typed_interop_callable_object_test.dart b/tests/lib_2/html/js_typed_interop_callable_object_test.dart
index 5abcb3b..49f58c4 100644
--- a/tests/lib_2/html/js_typed_interop_callable_object_test.dart
+++ b/tests/lib_2/html/js_typed_interop_callable_object_test.dart
@@ -13,8 +13,8 @@
 
 // This is a regression test for https://github.com/dart-lang/sdk/issues/25658
 
-@NoInline()
-@AssumeDynamic()
+@pragma('dart2js:noInline')
+@pragma('dart2js:assumeDynamic')
 confuse(x) => x;
 
 _injectJs() {
diff --git a/tests/lib_2/html/js_typed_interop_type1_test.dart b/tests/lib_2/html/js_typed_interop_type1_test.dart
index 6c0db32..e10aea3 100644
--- a/tests/lib_2/html/js_typed_interop_type1_test.dart
+++ b/tests/lib_2/html/js_typed_interop_type1_test.dart
@@ -18,12 +18,12 @@
   F(this.foo);
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 testA(A o) {
   return o.foo;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 testF(F o) {
   return o.foo;
 }
diff --git a/tests/lib_2/html/js_typed_interop_type2_test.dart b/tests/lib_2/html/js_typed_interop_type2_test.dart
index 8e02b1c..aa6f3bf 100644
--- a/tests/lib_2/html/js_typed_interop_type2_test.dart
+++ b/tests/lib_2/html/js_typed_interop_type2_test.dart
@@ -27,12 +27,12 @@
   F(this.foo);
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 testC(C o) {
   return o.foo;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 testF(F o) {
   return o.foo;
 }
diff --git a/tests/lib_2/html/js_typed_interop_type3_test.dart b/tests/lib_2/html/js_typed_interop_type3_test.dart
index 79c1930..1188571 100644
--- a/tests/lib_2/html/js_typed_interop_type3_test.dart
+++ b/tests/lib_2/html/js_typed_interop_type3_test.dart
@@ -34,22 +34,22 @@
   F(this.foo);
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 testA(A o) {
   return o.foo;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 testC(C o) {
   return o.foo;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 testD(D o) {
   return o.foo;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 testF(F o) {
   return o.foo;
 }
diff --git a/tests/lib_2/html/js_typed_interop_type_test.dart b/tests/lib_2/html/js_typed_interop_type_test.dart
index cbeae32..dab7187 100644
--- a/tests/lib_2/html/js_typed_interop_type_test.dart
+++ b/tests/lib_2/html/js_typed_interop_type_test.dart
@@ -51,32 +51,32 @@
   F(this.foo);
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 testA(A o) {
   return o.foo;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 testB(B o) {
   return o.foo;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 testC(C o) {
   return o.foo;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 testD(D o) {
   return o.foo;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 testE(E o) {
   return o.foo;
 }
 
-@NoInline()
+@pragma('dart2js:noInline')
 testF(F o) {
   return o.foo;
 }
diff --git a/tests/lib_2/html/websql_test.dart b/tests/lib_2/html/websql_test.dart
index 1d52d5d..07f9ff2 100644
--- a/tests/lib_2/html/websql_test.dart
+++ b/tests/lib_2/html/websql_test.dart
@@ -4,9 +4,7 @@
 import 'dart:html';
 import 'dart:web_sql';
 
-import 'package:unittest/unittest.dart';
-import 'package:unittest/html_config.dart';
-import 'package:async_helper/async_helper.dart';
+import 'package:expect/async_minitest.dart';
 
 Future<SqlResultSet> createTable(
     SqlTransaction transaction, String tableName, String columnName) async {
@@ -52,8 +50,6 @@
 }
 
 main() async {
-  useHtmlConfiguration();
-
   await setup();
 
   group('Database', () {
diff --git a/tests/lib_2/isolate/issue_21398_child_isolate1.dart b/tests/lib_2/isolate/issue_21398_child_isolate1.dart
index 1a720bd..9911733 100644
--- a/tests/lib_2/isolate/issue_21398_child_isolate1.dart
+++ b/tests/lib_2/isolate/issue_21398_child_isolate1.dart
@@ -6,7 +6,7 @@
 import "package:expect/expect.dart";
 
 main(List<String> args, message) {
-  var sendPort1 = args[0] as SendPort;
-  var sendPort2 = args[1] as SendPort;
+  var sendPort1 = message[0] as SendPort;
+  var sendPort2 = message[1] as SendPort;
   sendPort2.send(sendPort1);
 }
diff --git a/tests/lib_2/isolate/issue_21398_parent_isolate1_test.dart b/tests/lib_2/isolate/issue_21398_parent_isolate1_test.dart
index 5681cf3..9da9678 100644
--- a/tests/lib_2/isolate/issue_21398_parent_isolate1_test.dart
+++ b/tests/lib_2/isolate/issue_21398_parent_isolate1_test.dart
@@ -72,8 +72,8 @@
             // sendports over to the other.
             Isolate.spawnUri(
                 Uri.parse('issue_21398_child_isolate1.dart'),
-                [spawnFunctionIsolate1SendPort, spawnFunctionIsolate2SendPort],
-                "no-msg");
+                null,
+                [spawnFunctionIsolate1SendPort, spawnFunctionIsolate2SendPort]);
           }, onError: (e) => print('$e'));
         });
       } else if (msg == "done") {
@@ -133,8 +133,8 @@
             // sendports over to the other.
             Isolate.spawnUri(
                 Uri.parse('issue_21398_child_isolate1.dart'),
-                [spawnFunctionIsolateSendPort, spawnUriIsolateSendPort],
-                "no-msg");
+                null,
+                [spawnFunctionIsolateSendPort, spawnUriIsolateSendPort]);
           }, onError: (e) => print('$e'));
         });
       } else if (msg == "done") {
diff --git a/tests/lib_2/isolate/issue_22778_test.dart b/tests/lib_2/isolate/issue_22778_test.dart
index ed6b5c6..51f5a19 100644
--- a/tests/lib_2/isolate/issue_22778_test.dart
+++ b/tests/lib_2/isolate/issue_22778_test.dart
@@ -13,5 +13,5 @@
     Expect.isTrue(v[0] == v[1]);
     r.close();
   };
-  r.sendPort.send([func, func]);
+  r.sendPort.send(<Function>[func, func]);
 }
diff --git a/tests/lib_2/isolate/issue_35626_test.dart b/tests/lib_2/isolate/issue_35626_test.dart
new file mode 100644
index 0000000..2873d83
--- /dev/null
+++ b/tests/lib_2/isolate/issue_35626_test.dart
@@ -0,0 +1,33 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Tests that sets of enums can be set through ports.
+// https://github.com/dart-lang/sdk/issues/35626
+
+library spawn_tests;
+
+import "dart:io";
+import "dart:isolate";
+import "package:expect/expect.dart";
+
+enum MyEnum { foo, bar, baz }
+
+void sendSetOfEnums(SendPort port) {
+  Set<MyEnum> remoteSet = Set()..add(MyEnum.bar);
+  port.send(remoteSet);
+}
+
+void main() async {
+  Set<MyEnum> localSet = Set()..add(MyEnum.foo)..add(MyEnum.bar);
+  localSet.lookup(MyEnum.foo);
+
+  final port = ReceivePort();
+  await Isolate.spawn(sendSetOfEnums, port.sendPort);
+  Set<MyEnum> remoteSet = await port.first;
+
+  print(localSet);
+  print(remoteSet);
+  Expect.setEquals([MyEnum.bar], localSet.intersection(remoteSet));
+  Expect.setEquals([MyEnum.bar], remoteSet.intersection(localSet));
+}
diff --git a/tests/lib_2/isolate/kill_self_synchronously_test.dart b/tests/lib_2/isolate/kill_self_synchronously_test.dart
index c3b5486..1a40a01 100644
--- a/tests/lib_2/isolate/kill_self_synchronously_test.dart
+++ b/tests/lib_2/isolate/kill_self_synchronously_test.dart
@@ -13,7 +13,7 @@
     throw "QQQ Should not be reached";
   } else {
     var exec = Platform.resolvedExecutable;
-    var args = new List();
+    var args = new List<String>();
     args.addAll(Platform.executableArguments);
     args.add(Platform.script.toFilePath());
     args.add("--child");
diff --git a/tests/lib_2/isolate/message_const_type_arguments_1_test.dart b/tests/lib_2/isolate/message_const_type_arguments_1_test.dart
new file mode 100644
index 0000000..48d2af1
--- /dev/null
+++ b/tests/lib_2/isolate/message_const_type_arguments_1_test.dart
@@ -0,0 +1,407 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// https://github.com/dart-lang/sdk/issues/35778
+
+import "dart:async";
+import "dart:isolate";
+import "dart:typed_data";
+import "package:expect/expect.dart";
+
+void child(replyPort) {
+  print("Child start");
+
+  replyPort.send(const <List>[]);
+  replyPort.send(const <Map>[]);
+  replyPort.send(const <Null>[]);
+  replyPort.send(const <Object>[]);
+  replyPort.send(const <String>[]);
+  replyPort.send(const <bool>[]);
+  replyPort.send(const <double>[]);
+  replyPort.send(const <int>[]);
+  replyPort.send(const <num>[]);
+
+  replyPort.send(const <List, List>{});
+  replyPort.send(const <List, Map>{});
+  replyPort.send(const <List, Null>{});
+  replyPort.send(const <List, Object>{});
+  replyPort.send(const <List, String>{});
+  replyPort.send(const <List, bool>{});
+  replyPort.send(const <List, double>{});
+  replyPort.send(const <List, int>{});
+  replyPort.send(const <List, num>{});
+
+  replyPort.send(const <Map, List>{});
+  replyPort.send(const <Map, Map>{});
+  replyPort.send(const <Map, Null>{});
+  replyPort.send(const <Map, Object>{});
+  replyPort.send(const <Map, String>{});
+  replyPort.send(const <Map, bool>{});
+  replyPort.send(const <Map, double>{});
+  replyPort.send(const <Map, int>{});
+  replyPort.send(const <Map, num>{});
+
+  replyPort.send(const <Null, List>{});
+  replyPort.send(const <Null, Map>{});
+  replyPort.send(const <Null, Null>{});
+  replyPort.send(const <Null, Object>{});
+  replyPort.send(const <Null, String>{});
+  replyPort.send(const <Null, bool>{});
+  replyPort.send(const <Null, double>{});
+  replyPort.send(const <Null, int>{});
+  replyPort.send(const <Null, num>{});
+
+  replyPort.send(const <Object, List>{});
+  replyPort.send(const <Object, Map>{});
+  replyPort.send(const <Object, Null>{});
+  replyPort.send(const <Object, Object>{});
+  replyPort.send(const <Object, String>{});
+  replyPort.send(const <Object, bool>{});
+  replyPort.send(const <Object, double>{});
+  replyPort.send(const <Object, int>{});
+  replyPort.send(const <Object, num>{});
+
+  replyPort.send(const <String, List>{});
+  replyPort.send(const <String, Map>{});
+  replyPort.send(const <String, Null>{});
+  replyPort.send(const <String, Object>{});
+  replyPort.send(const <String, String>{});
+  replyPort.send(const <String, bool>{});
+  replyPort.send(const <String, double>{});
+  replyPort.send(const <String, int>{});
+  replyPort.send(const <String, num>{});
+
+  replyPort.send(const <bool, List>{});
+  replyPort.send(const <bool, Map>{});
+  replyPort.send(const <bool, Null>{});
+  replyPort.send(const <bool, Object>{});
+  replyPort.send(const <bool, String>{});
+  replyPort.send(const <bool, bool>{});
+  replyPort.send(const <bool, double>{});
+  replyPort.send(const <bool, int>{});
+  replyPort.send(const <bool, num>{});
+
+  replyPort.send(const <double, List>{});
+  replyPort.send(const <double, Map>{});
+  replyPort.send(const <double, Null>{});
+  replyPort.send(const <double, Object>{});
+  replyPort.send(const <double, String>{});
+  replyPort.send(const <double, bool>{});
+  replyPort.send(const <double, double>{});
+  replyPort.send(const <double, int>{});
+  replyPort.send(const <double, num>{});
+
+  replyPort.send(const <int, List>{});
+  replyPort.send(const <int, Map>{});
+  replyPort.send(const <int, Null>{});
+  replyPort.send(const <int, Object>{});
+  replyPort.send(const <int, String>{});
+  replyPort.send(const <int, bool>{});
+  replyPort.send(const <int, double>{});
+  replyPort.send(const <int, int>{});
+  replyPort.send(const <int, num>{});
+
+  replyPort.send(const <num, List>{});
+  replyPort.send(const <num, Map>{});
+  replyPort.send(const <num, Null>{});
+  replyPort.send(const <num, Object>{});
+  replyPort.send(const <num, String>{});
+  replyPort.send(const <num, bool>{});
+  replyPort.send(const <num, double>{});
+  replyPort.send(const <num, int>{});
+  replyPort.send(const <num, num>{});
+
+  print("Child done");
+}
+
+Future<void> main(List<String> args) async {
+  print("Parent start");
+
+  ReceivePort port = new ReceivePort();
+  Isolate.spawn(child, port.sendPort);
+  StreamIterator<dynamic> incoming = new StreamIterator<dynamic>(port);
+
+  Expect.isTrue(await incoming.moveNext());
+  dynamic x = incoming.current;
+  Expect.isTrue(x is List<List>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is List<Map>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is List<Null>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is List<Object>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is List<String>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is List<bool>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is List<double>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is List<int>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is List<num>);
+
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<List, List>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<List, Map>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<List, Null>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<List, Object>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<List, String>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<List, bool>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<List, double>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<List, int>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<List, num>);
+
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<Map, List>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<Map, Map>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<Map, Null>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<Map, Object>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<Map, String>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<Map, bool>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<Map, double>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<Map, int>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<Map, num>);
+
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<Null, List>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<Null, Map>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<Null, Null>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<Null, Object>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<Null, String>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<Null, bool>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<Null, double>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<Null, int>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<Null, num>);
+
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<Object, List>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<Object, Map>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<Object, Null>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<Object, Object>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<Object, String>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<Object, bool>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<Object, double>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<Object, int>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<Object, num>);
+
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<String, List>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<String, Map>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<String, Null>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<String, Object>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<String, String>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<String, bool>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<String, double>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<String, int>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<String, num>);
+
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<bool, List>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<bool, Map>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<bool, Null>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<bool, Object>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<bool, String>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<bool, bool>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<bool, double>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<bool, int>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<bool, num>);
+
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<double, List>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<double, Map>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<double, Null>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<double, Object>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<double, String>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<double, bool>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<double, double>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<double, int>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<double, num>);
+
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<int, List>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<int, Map>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<int, Null>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<int, Object>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<int, String>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<int, bool>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<int, double>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<int, int>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<int, num>);
+
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<num, List>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<num, Map>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<num, Null>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<num, Object>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<num, String>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<num, bool>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<num, double>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<num, int>);
+  Expect.isTrue(await incoming.moveNext());
+  x = incoming.current;
+  Expect.isTrue(x is Map<num, num>);
+
+  port.close();
+  print("Parent done");
+}
diff --git a/tests/lib_2/isolate/message_const_type_arguments_2_test.dart b/tests/lib_2/isolate/message_const_type_arguments_2_test.dart
new file mode 100644
index 0000000..681b1c7
--- /dev/null
+++ b/tests/lib_2/isolate/message_const_type_arguments_2_test.dart
@@ -0,0 +1,317 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// https://github.com/dart-lang/sdk/issues/35778
+
+import "dart:async";
+import "dart:isolate";
+import "dart:typed_data";
+import "package:expect/expect.dart";
+
+void child(replyPort) {
+  print("Child start");
+
+  replyPort.send(const <List>[]);
+  replyPort.send(const <Map>[]);
+  replyPort.send(const <Null>[]);
+  replyPort.send(const <Object>[]);
+  replyPort.send(const <String>[]);
+  replyPort.send(const <bool>[]);
+  replyPort.send(const <double>[]);
+  replyPort.send(const <int>[]);
+  replyPort.send(const <num>[]);
+
+  replyPort.send(const <List, List>{});
+  replyPort.send(const <List, Map>{});
+  replyPort.send(const <List, Null>{});
+  replyPort.send(const <List, Object>{});
+  replyPort.send(const <List, String>{});
+  replyPort.send(const <List, bool>{});
+  replyPort.send(const <List, double>{});
+  replyPort.send(const <List, int>{});
+  replyPort.send(const <List, num>{});
+
+  replyPort.send(const <Map, List>{});
+  replyPort.send(const <Map, Map>{});
+  replyPort.send(const <Map, Null>{});
+  replyPort.send(const <Map, Object>{});
+  replyPort.send(const <Map, String>{});
+  replyPort.send(const <Map, bool>{});
+  replyPort.send(const <Map, double>{});
+  replyPort.send(const <Map, int>{});
+  replyPort.send(const <Map, num>{});
+
+  replyPort.send(const <Null, List>{});
+  replyPort.send(const <Null, Map>{});
+  replyPort.send(const <Null, Null>{});
+  replyPort.send(const <Null, Object>{});
+  replyPort.send(const <Null, String>{});
+  replyPort.send(const <Null, bool>{});
+  replyPort.send(const <Null, double>{});
+  replyPort.send(const <Null, int>{});
+  replyPort.send(const <Null, num>{});
+
+  replyPort.send(const <Object, List>{});
+  replyPort.send(const <Object, Map>{});
+  replyPort.send(const <Object, Null>{});
+  replyPort.send(const <Object, Object>{});
+  replyPort.send(const <Object, String>{});
+  replyPort.send(const <Object, bool>{});
+  replyPort.send(const <Object, double>{});
+  replyPort.send(const <Object, int>{});
+  replyPort.send(const <Object, num>{});
+
+  replyPort.send(const <String, List>{});
+  replyPort.send(const <String, Map>{});
+  replyPort.send(const <String, Null>{});
+  replyPort.send(const <String, Object>{});
+  replyPort.send(const <String, String>{});
+  replyPort.send(const <String, bool>{});
+  replyPort.send(const <String, double>{});
+  replyPort.send(const <String, int>{});
+  replyPort.send(const <String, num>{});
+
+  replyPort.send(const <bool, List>{});
+  replyPort.send(const <bool, Map>{});
+  replyPort.send(const <bool, Null>{});
+  replyPort.send(const <bool, Object>{});
+  replyPort.send(const <bool, String>{});
+  replyPort.send(const <bool, bool>{});
+  replyPort.send(const <bool, double>{});
+  replyPort.send(const <bool, int>{});
+  replyPort.send(const <bool, num>{});
+
+  replyPort.send(const <double, List>{});
+  replyPort.send(const <double, Map>{});
+  replyPort.send(const <double, Null>{});
+  replyPort.send(const <double, Object>{});
+  replyPort.send(const <double, String>{});
+  replyPort.send(const <double, bool>{});
+  replyPort.send(const <double, double>{});
+  replyPort.send(const <double, int>{});
+  replyPort.send(const <double, num>{});
+
+  replyPort.send(const <int, List>{});
+  replyPort.send(const <int, Map>{});
+  replyPort.send(const <int, Null>{});
+  replyPort.send(const <int, Object>{});
+  replyPort.send(const <int, String>{});
+  replyPort.send(const <int, bool>{});
+  replyPort.send(const <int, double>{});
+  replyPort.send(const <int, int>{});
+  replyPort.send(const <int, num>{});
+
+  replyPort.send(const <num, List>{});
+  replyPort.send(const <num, Map>{});
+  replyPort.send(const <num, Null>{});
+  replyPort.send(const <num, Object>{});
+  replyPort.send(const <num, String>{});
+  replyPort.send(const <num, bool>{});
+  replyPort.send(const <num, double>{});
+  replyPort.send(const <num, int>{});
+  replyPort.send(const <num, num>{});
+
+  print("Child done");
+}
+
+Future<void> main(List<String> args) async {
+  print("Parent start");
+
+  ReceivePort port = new ReceivePort();
+  Isolate.spawn(child, port.sendPort);
+  StreamIterator<dynamic> incoming = new StreamIterator<dynamic>(port);
+
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <List>[]));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <Map>[]));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <Null>[]));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <Object>[]));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <String>[]));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <bool>[]));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <double>[]));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <int>[]));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <num>[]));
+
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <List, List>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <List, Map>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <List, Null>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <List, Object>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <List, String>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <List, bool>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <List, double>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <List, int>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <List, num>{}));
+
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <Map, List>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <Map, Map>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <Map, Null>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <Map, Object>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <Map, String>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <Map, bool>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <Map, double>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <Map, int>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <Map, num>{}));
+
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <Null, List>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <Null, Map>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <Null, Null>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <Null, Object>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <Null, String>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <Null, bool>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <Null, double>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <Null, int>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <Null, num>{}));
+
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <Object, List>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <Object, Map>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <Object, Null>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <Object, Object>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <Object, String>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <Object, bool>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <Object, double>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <Object, int>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <Object, num>{}));
+
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <String, List>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <String, Map>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <String, Null>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <String, Object>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <String, String>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <String, bool>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <String, double>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <String, int>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <String, num>{}));
+
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <bool, List>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <bool, Map>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <bool, Null>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <bool, Object>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <bool, String>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <bool, bool>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <bool, double>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <bool, int>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <bool, num>{}));
+
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <double, List>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <double, Map>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <double, Null>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <double, Object>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <double, String>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <double, bool>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <double, double>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <double, int>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <double, num>{}));
+
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <int, List>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <int, Map>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <int, Null>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <int, Object>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <int, String>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <int, bool>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <int, double>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <int, int>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <int, num>{}));
+
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <num, List>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <num, Map>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <num, Null>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <num, Object>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <num, String>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <num, bool>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <num, double>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <num, int>{}));
+  Expect.isTrue(await incoming.moveNext());
+  Expect.isTrue(identical(incoming.current, const <num, num>{}));
+
+  port.close();
+  print("Parent done");
+}
diff --git a/tests/lib_2/isolate/message_test.dart b/tests/lib_2/isolate/message_test.dart
index fb1314b..70eafff 100644
--- a/tests/lib_2/isolate/message_test.dart
+++ b/tests/lib_2/isolate/message_test.dart
@@ -108,11 +108,11 @@
   test("send objects and receive them back", () {
     ReceivePort port = new ReceivePort();
     Isolate.spawn(pingPong, port.sendPort);
-    port.first.then(expectAsync((remote) {
+    port.first.then(expectAsync1((remote) {
       // Send objects and receive them back.
       for (int i = 0; i < MessageTest.elms.length; i++) {
         var sentObject = MessageTest.elms[i];
-        remoteCall(remote, sentObject).then(expectAsync((var receivedObject) {
+        remoteCall(remote, sentObject).then(expectAsync1((receivedObject) {
           MessageTest.VerifyObject(i, receivedObject);
         }));
       }
@@ -141,7 +141,7 @@
       });
 
       // Shutdown the MessageServer.
-      remoteCall(remote, -1).then(expectAsync((int message) {
+      remoteCall(remote, -1).then(expectAsync1((message) {
         expect(message, MessageTest.elms.length + 1);
       }));
     }));
diff --git a/tests/lib_2/isolate/mint_maker_test.dart b/tests/lib_2/isolate/mint_maker_test.dart
index e9f5f5b..198e3cc 100644
--- a/tests/lib_2/isolate/mint_maker_test.dart
+++ b/tests/lib_2/isolate/mint_maker_test.dart
@@ -155,7 +155,7 @@
 }
 
 _checkBalance(PurseWrapper wrapper, expected) {
-  wrapper.queryBalance(expectAsync((int balance) {
+  wrapper.queryBalance(expectAsync1((balance) {
     expect(balance, equals(expected));
   }));
 }
@@ -163,11 +163,11 @@
 void main([args, port]) {
   if (testRemote(main, port)) return;
   test("creating purse, deposit, and query balance", () {
-    MintMakerWrapper.create().then(expectAsync((mintMaker) {
-      mintMaker.makeMint(expectAsync((MintWrapper mint) {
-        mint.createPurse(100, expectAsync((PurseWrapper purse) {
+    MintMakerWrapper.create().then(expectAsync1((mintMaker) {
+      mintMaker.makeMint(expectAsync1((mint) {
+        mint.createPurse(100, expectAsync1((purse) {
           _checkBalance(purse, 100);
-          purse.sproutPurse(expectAsync((PurseWrapper sprouted) {
+          purse.sproutPurse(expectAsync1((sprouted) {
             _checkBalance(sprouted, 0);
             _checkBalance(purse, 100);
 
diff --git a/tests/lib_2/isolate/spawn_function_test.dart b/tests/lib_2/isolate/spawn_function_test.dart
index eba1bfa..7a2a193 100644
--- a/tests/lib_2/isolate/spawn_function_test.dart
+++ b/tests/lib_2/isolate/spawn_function_test.dart
@@ -17,12 +17,15 @@
 
 void main([args, port]) {
   if (testRemote(main, port)) return;
-  test('message - reply chain', () {
+  test('message - reply chain', () async {
     ReceivePort port = new ReceivePort();
-    Isolate.spawn(child, ['hi', port.sendPort]);
     port.listen(expectAsync((msg) {
       port.close();
       expect(msg, equals('re: hi'));
     }));
+    const String debugName = 'spawnedIsolate';
+    final i =
+        await Isolate.spawn(child, ['hi', port.sendPort], debugName: debugName);
+    expect(i.debugName, debugName);
   });
 }
diff --git a/tests/lib_2/isolate/spawn_uri_test.dart b/tests/lib_2/isolate/spawn_uri_test.dart
index 650bafa..a4d89c3 100644
--- a/tests/lib_2/isolate/spawn_uri_test.dart
+++ b/tests/lib_2/isolate/spawn_uri_test.dart
@@ -12,14 +12,17 @@
 import 'package:expect/async_minitest.dart';
 
 main() {
-  test('isolate fromUri - send and reply', () {
+  test('isolate fromUri - send and reply', () async {
     ReceivePort port = new ReceivePort();
     port.listen(expectAsync((msg) {
       expect(msg, equals('re: hi'));
       port.close();
     }));
 
-    Isolate.spawnUri(
-        Uri.parse('spawn_uri_child_isolate.dart'), ['hi'], port.sendPort);
+    const String debugName = 'spawnedIsolate';
+    final i = await Isolate.spawnUri(
+        Uri.parse('spawn_uri_child_isolate.dart'), ['hi'], port.sendPort,
+        debugName: debugName);
+    expect(i.debugName, debugName);
   });
 }
diff --git a/tests/lib_2/js/array_test.dart b/tests/lib_2/js/array_test.dart
new file mode 100644
index 0000000..30bae97
--- /dev/null
+++ b/tests/lib_2/js/array_test.dart
@@ -0,0 +1,40 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+@JS()
+library array_test;
+
+import 'package:expect/expect.dart';
+import 'package:js/js.dart';
+import 'package:js/js_util.dart' as js;
+
+main() {
+  testArrayConstructor();
+}
+
+/// Test that we can access .constructor() on a JS Array instance, regardless
+/// of the reified generic type.
+///
+/// Regression test for https://github.com/dart-lang/sdk/issues/36372
+testArrayConstructor() {
+  var list = <int>[1, 2, 3];
+  testArray = list;
+
+  // Call the consturctor with `new`.
+  var array = js.callConstructor(js.getProperty(testArray, 'constructor'), []);
+  var list2 = array as List;
+  Expect.listEquals(list2, []);
+  Expect.notEquals(list, list2, '$list2 should be a new list');
+
+  // We could return a reified type here, but currently does not to match
+  // dart2js, and because the Array is being returned to JS.
+  Expect.isFalse(list2 is List<int>,
+      '$list2 should not have a reified generic type (it was allocated by JS)');
+
+  list2.addAll([1, 2, 3]);
+  Expect.listEquals(list, list2);
+}
+
+external Object get testArray;
+external set testArray(value);
diff --git a/tests/lib_2/lib_2_kernel.status b/tests/lib_2/lib_2_kernel.status
index 01b0058..04313d4 100644
--- a/tests/lib_2/lib_2_kernel.status
+++ b/tests/lib_2/lib_2_kernel.status
@@ -14,13 +14,10 @@
 async/slow_consumer2_test: RuntimeError
 async/stream_distinct_test: RuntimeError
 async/timer_not_available_test: RuntimeError
-isolate/issue_21398_parent_isolate1_test: RuntimeError
-isolate/issue_22778_test: Crash
-isolate/kill_self_synchronously_test: RuntimeError
-isolate/message_test: RuntimeError
-isolate/mint_maker_test: RuntimeError
 isolate/ping_pause_test: Skip # Timeout
-isolate/spawn_function_custom_class_test: Skip # Timeout
+
+[ $compiler == dartkb ]
+mirrors/*: Skip # Mirrors are not yet supported in bytecode modes.
 
 [ $compiler == fasta ]
 html/*: Skip # TODO(ahe): Make dart:html available.
@@ -29,16 +26,12 @@
 
 [ $fasta ]
 async/future_or_type_test: CompileTimeError # Issue 34626
-mirrors/deferred_constraints_constants_test/default_argument2: MissingCompileTimeError
 mirrors/generic_f_bounded_mixin_application_test: CompileTimeError # Issue 34613
 mirrors/metadata_allowed_values_test/13: MissingCompileTimeError
 mirrors/metadata_allowed_values_test/14: MissingCompileTimeError
 mirrors/redirecting_factory_test/01: CompileTimeError # Issue 34714
 mirrors/redirecting_factory_test/none: CompileTimeError # Issue 34714
 
-[ $arch == simarm64 && $strong && ($compiler == dartk || $compiler == dartkb) ]
-isolate/mint_maker_test: Timeout # Please triage.
-
 [ $arch == simdbc64 && $mode == debug && $runtime == vm && $strong && ($compiler == dartk || $compiler == dartkb) ]
 isolate/isolate_complex_messages_test: Crash # http://dartbug.com/33128
 
@@ -55,7 +48,8 @@
 mirrors/invocation_fuzz_test: Skip # Because it times out, issue 29439.
 
 [ $arch == x64 && ($hot_reload || $hot_reload_rollback) ]
-isolate/int32_length_overflow_test: Timeout  # Issue 35733
+convert/base64_test/01: Pass, Crash # http://dartbug.com/35948
+isolate/int32_length_overflow_test: Timeout # Issue 35733
 
 [ $builder_tag == obfuscated && $compiler == dartkp ]
 collection/list_test: RuntimeError # Issue 34911
@@ -68,9 +62,6 @@
 mirrors/invocation_fuzz_test/smi: Crash, RuntimeError, Fail, Pass # Crashes on opt counter builder (#31838)
 mirrors/invocation_fuzz_test/string: Pass, Crash, RuntimeError # Flaky on vm-kernel-optcounter-threshold-linux-release-x64, bug #31838
 
-[ $compiler == app_jitk && $mode == product ]
-isolate/spawn_function_custom_class_test: Skip # Timeout
-
 [ $compiler == app_jitk && ($mode == product || $mode == release) ]
 isolate/spawn_uri_nested_vm_test: Skip # Timeout, Issue 33385
 
@@ -103,11 +94,7 @@
 isolate/deferred_in_isolate2_test: Skip # Times out. Deferred loading kernel issue 28335.
 isolate/deferred_in_isolate_test: Skip # Times out. Deferred loading kernel issue 28335.
 isolate/issue_21398_parent_isolate2_test/01: Skip # Times out. Deferred loading kernel issue 28335.
-isolate/issue_22778_test: Crash
-isolate/kill_self_synchronously_test: RuntimeError
-isolate/ping_pause_test: Crash
 isolate/ping_pause_test: Pass, Timeout
-isolate/spawn_function_custom_class_test: Pass, Timeout
 isolate/spawn_uri_nested_vm_test: Pass, Timeout
 mirrors/*: SkipByDesign # Mirrors are not supported in AOT mode.
 
@@ -142,12 +129,8 @@
 html/*: SkipByDesign # dart:html not supported on VM.
 isolate/deferred_in_isolate2_test: Skip # Times out. Deferred loading kernel issue 28335.
 isolate/deferred_in_isolate_test: Skip # Times out. Deferred loading kernel issue 28335.
-isolate/issue_21398_parent_isolate1_test: RuntimeError, Crash # Issue 31402 (List literal), Issue 35374.
 isolate/issue_21398_parent_isolate2_test/01: Skip # Times out. Deferred loading kernel issue 28335.
-isolate/message_test: CompileTimeError # Issue 31402 (Invocation arguments)
-isolate/mint_maker_test: CompileTimeError # Issue 31402 (Invocation arguments)
 isolate/ping_pause_test: Pass, Timeout
-isolate/spawn_function_custom_class_test: Pass, Crash, Timeout # Crashes with --no-enable-malloc-hooks vm option
 isolate/spawn_uri_nested_vm_test: Pass, Timeout
 isolate/static_function_test: Skip # Times out. Issue 31855. CompileTimeError. Issue 31402
 mirrors/apply3_test: RuntimeError
@@ -232,9 +215,6 @@
 mirrors/typedef_test: RuntimeError
 mirrors/typevariable_mirror_metadata_test: RuntimeError
 
-[ $system == windows && ($compiler == dartk || $compiler == dartkb) ]
-isolate/ping_pause_test: Skip # Issues 32137 and 32138
-
 [ $fasta && !$strong ]
 isolate/isolate_import_test/01: MissingCompileTimeError
 isolate/isolate_stress_test: CompileTimeError
@@ -254,9 +234,6 @@
 typed_data/int32x4_static_test/01: MissingCompileTimeError
 typed_data/int32x4_static_test/02: MissingCompileTimeError
 
-[ $hot_reload && ($compiler == dartk || $compiler == dartkb) ]
-isolate/issue_6610_test: RuntimeError, Crash # Sources are looked up on every reload request.
-
 [ $hot_reload_rollback && ($compiler == dartk || $compiler == dartkb) ]
 isolate/illegal_msg_function_test: Skip # Timeout
 isolate/pause_test: Skip # Timeout
@@ -272,16 +249,11 @@
 [ $strong && ($compiler == dartk || $compiler == dartkb) ]
 async/slow_consumer2_test: RuntimeError # Issue 31402 (Invocation arguments)
 async/stream_distinct_test: RuntimeError
-isolate/issue_22778_test: Crash
-isolate/kill_self_synchronously_test: RuntimeError
-isolate/message_test: RuntimeError
-isolate/mint_maker_test: RuntimeError
 isolate/ping_pause_test: RuntimeError
 isolate/request_reply_test: Pass, Timeout
 isolate/stacktrace_message_test: RuntimeError
 mirrors/constructor_optional_args_test: RuntimeError
 mirrors/constructors_test: RuntimeError
-mirrors/deferred_constraints_constants_test/default_argument2: Pass
 mirrors/fake_function_with_call_test: RuntimeError
 mirrors/instance_members_easier_test: RuntimeError
 mirrors/instance_members_test: RuntimeError
@@ -308,3 +280,9 @@
 html/*: SkipByDesign
 isolate/browser/*: SkipByDesign
 js/*: SkipByDesign
+
+[ $compiler == dartk || $compiler == dartkb ]
+isolate/ping_pause_test: Skip # Issues 32137 and 32138
+
+[ $hot_reload || $hot_reload_rollback ]
+isolate/issue_6610_test: Skip # Sources are looked up on every reload request.
diff --git a/tests/lib_2/math/random_secure_unsupported_test.dart b/tests/lib_2/math/random_secure_unsupported_test.dart
new file mode 100644
index 0000000..7e8744c
--- /dev/null
+++ b/tests/lib_2/math/random_secure_unsupported_test.dart
@@ -0,0 +1,27 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Test that `Random.secure()` throws `UnsupportedError` each time it fails.
+
+import "package:expect/expect.dart";
+import 'dart:math';
+
+main() {
+  var result1 = getRandom();
+  var result2 = getRandom();
+
+  Expect.isNotNull(result1);
+  Expect.isNotNull(result2); // This fired for http://dartbug.com/36206
+
+  Expect.equals(result1 is Random, result2 is Random);
+  Expect.equals(result1 is UnsupportedError, result2 is UnsupportedError);
+}
+
+dynamic getRandom() {
+  try {
+    return Random.secure();
+  } catch (e) {
+    return e;
+  }
+}
diff --git a/tests/lib_2/mirrors/regress_34982_test.dart b/tests/lib_2/mirrors/regress_34982_test.dart
new file mode 100644
index 0000000..184eb17
--- /dev/null
+++ b/tests/lib_2/mirrors/regress_34982_test.dart
@@ -0,0 +1,26 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Regression test for http://dartbug.com/34982
+import 'dart:mirrors';
+import 'package:expect/expect.dart';
+
+abstract class A {
+  int c();
+}
+
+class B implements A {
+  dynamic noSuchMethod(Invocation invocation) {}
+}
+
+void main() {
+  MethodMirror method1 = reflectClass(B).declarations[#c];
+  Expect.isTrue(method1.isSynthetic);
+
+  MethodMirror method2 = reflectClass(B).declarations[#noSuchMethod];
+  Expect.isFalse(method2.isSynthetic);
+
+  MethodMirror method3 = reflectClass(A).declarations[#c];
+  Expect.isFalse(method3.isSynthetic);
+}
diff --git a/tests/lib_2/typed_data/native_interceptor_no_own_method_to_intercept_test.dart b/tests/lib_2/typed_data/native_interceptor_no_own_method_to_intercept_test.dart
index 4b5d31c..6828d6a 100644
--- a/tests/lib_2/typed_data/native_interceptor_no_own_method_to_intercept_test.dart
+++ b/tests/lib_2/typed_data/native_interceptor_no_own_method_to_intercept_test.dart
@@ -5,7 +5,7 @@
 import "package:expect/expect.dart";
 import 'dart:typed_data';
 
-@NoInline()
+@pragma('dart2js:noInline')
 use(s) => s;
 
 main() {
diff --git a/tests/lib_2/typed_data/typed_data_list_test.dart b/tests/lib_2/typed_data/typed_data_list_test.dart
index 09fb066..890f274 100644
--- a/tests/lib_2/typed_data/typed_data_list_test.dart
+++ b/tests/lib_2/typed_data/typed_data_list_test.dart
@@ -5,8 +5,8 @@
 import 'dart:typed_data';
 import 'package:expect/expect.dart';
 
-@AssumeDynamic()
-@NoInline()
+@pragma('dart2js:assumeDynamic')
+@pragma('dart2js:noInline')
 confuse(x) => x;
 
 void testListFunctions<T extends num>(
diff --git a/tests/standalone/io/process_environment_lib.dart b/tests/standalone/io/process_environment_lib.dart
new file mode 100644
index 0000000..7446236
--- /dev/null
+++ b/tests/standalone/io/process_environment_lib.dart
@@ -0,0 +1,9 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:io';
+
+void main() {
+  print(Platform.environment);
+}
diff --git a/tests/standalone/io/process_environment_test.dart b/tests/standalone/io/process_environment_test.dart
new file mode 100644
index 0000000..1a6767d
--- /dev/null
+++ b/tests/standalone/io/process_environment_test.dart
@@ -0,0 +1,62 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:convert';
+import 'dart:io';
+import 'package:expect/expect.dart';
+import 'package:path/path.dart' as path;
+
+const String childFile = 'process_environment_lib.dart';
+const String fakeKey = 'Artificial';
+const String fakeValue = 'fakepath';
+
+void main() async {
+  Map<String, String> environ = Platform.environment;
+  String baseDirectory = path.dirname(Platform.script.path);
+  //DETACHED PROCESS WITHOUT includeParentEnvironment
+  var WithoutEnviron = await Process.start(
+      Platform.executable, [path.join(baseDirectory, childFile)],
+      mode: ProcessStartMode.detachedWithStdio,
+      includeParentEnvironment: false,
+      environment: <String, String>{fakeKey: fakeValue});
+
+  Map<String, String> notInclude = new Map();
+  await for (final line in WithoutEnviron.stdout
+      .transform(systemEncoding.decoder)
+      .transform(LineSplitter())) {
+    notInclude = RestoreToMap(line);
+  }
+
+  //Ensure the child process has the passed environment
+  Expect.isTrue(notInclude.length >= 1);
+  Expect.isTrue(notInclude.keys.contains(fakeKey));
+
+  //DETACHED PROCESS WITH includeParentEnvironment
+  var WithEnviron = await Process.start(
+      Platform.executable, [path.join(baseDirectory, childFile)],
+      mode: ProcessStartMode.detachedWithStdio,
+      includeParentEnvironment: true,
+      environment: <String, String>{fakeKey: fakeValue});
+
+  Map<String, String> include = new Map();
+  await for (final line in WithEnviron.stdout
+      .transform(systemEncoding.decoder)
+      .transform(LineSplitter())) {
+    include = RestoreToMap(line);
+  }
+
+  //Parent environment and one fake path
+  Expect.isTrue(include.length == environ.length + 1);
+  Expect.isTrue(include[fakeKey] == fakeValue);
+}
+
+Map<String, String> RestoreToMap(String s) {
+  s = s.substring(1, s.length - 1);
+  Map<String, String> result = new Map();
+  for (String line in s.split(", ")) {
+    var i = line.indexOf(": ");
+    result.putIfAbsent(line.substring(0, i), () => line.substring(i + 2));
+  }
+  return result;
+}
diff --git a/tests/standalone_2/entrypoints_verification_test.dart b/tests/standalone_2/entrypoints_verification_test.dart
new file mode 100644
index 0000000..048f1f3
--- /dev/null
+++ b/tests/standalone_2/entrypoints_verification_test.dart
@@ -0,0 +1,107 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+//
+// VMOptions=--verify-entry-points=true
+
+import 'dart:io';
+import 'dart:convert';
+import 'dart:math';
+import 'package:path/path.dart';
+import 'package:expect/expect.dart';
+import 'dart-ext:entrypoints_verification_test_extension';
+
+void RunTest() native "RunTest";
+
+main() {
+  RunTest();
+
+  new C();
+  new D();
+}
+
+class C {}
+
+@pragma("vm:entry-point")
+class D {
+  D();
+
+  @pragma("vm:entry-point")
+  D.defined();
+
+  @pragma("vm:entry-point")
+  factory D.fact() => E.ctor();
+
+  void fn0() {}
+
+  @pragma("vm:entry-point")
+  void fn1() {}
+
+  @pragma("vm:entry-point", "get")
+  void fn1_get() {}
+
+  @pragma("vm:entry-point", "call")
+  void fn1_call() {}
+
+  static void fn2() {}
+
+  @pragma("vm:entry-point")
+  static void fn3() {}
+
+  @pragma("vm:entry-point", "call")
+  static void fn3_call() {}
+
+  @pragma("vm:entry-point", "get")
+  static void fn3_get() {}
+
+  void Function() fld0;
+
+  @pragma("vm:entry-point")
+  void Function() fld1;
+
+  @pragma("vm:entry-point", "get")
+  void Function() fld2;
+
+  @pragma("vm:entry-point", "set")
+  void Function() fld3;
+}
+
+void fn0() {}
+
+@pragma("vm:entry-point")
+void fn1() {}
+
+@pragma("vm:entry-point", "get")
+void fn1_get() {}
+
+@pragma("vm:entry-point", "call")
+void fn1_call() {}
+
+class E extends D {
+  E.ctor();
+}
+
+@pragma("vm:entry-point")
+class F {
+  static void Function() fld0;
+
+  @pragma("vm:entry-point")
+  static void Function() fld1;
+
+  @pragma("vm:entry-point", "get")
+  static void Function() fld2;
+
+  @pragma("vm:entry-point", "set")
+  static void Function() fld3;
+}
+
+void Function() fld0;
+
+@pragma("vm:entry-point")
+void Function() fld1;
+
+@pragma("vm:entry-point", "get")
+void Function() fld2;
+
+@pragma("vm:entry-point", "set")
+void Function() fld3;
diff --git a/tests/standalone_2/ffi/data_test.dart b/tests/standalone_2/ffi/data_test.dart
deleted file mode 100644
index 26edd6f..0000000
--- a/tests/standalone_2/ffi/data_test.dart
+++ /dev/null
@@ -1,492 +0,0 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-//
-// Dart test program for testing dart:ffi primitive data pointers.
-
-library FfiTest;
-
-import 'dart:ffi' as ffi;
-
-import "package:expect/expect.dart";
-
-void main() {
-  testPointerBasic();
-  testPointerFromPointer();
-  testPointerPointerArithmetic();
-  testPointerPointerArithmeticSizes();
-  testPointerAllocateNonPositive();
-  testPointerCast();
-  testCastGeneric();
-  testCastGeneric2();
-  testCastNativeType();
-  testCondensedNumbersInt8();
-  testCondensedNumbersFloat();
-  testRangeInt8();
-  testRangeUint8();
-  testRangeInt16();
-  testRangeUint16();
-  testRangeInt32();
-  testRangeUint32();
-  testRangeInt64();
-  testRangeUint64();
-  testRangeIntPtr();
-  testFloat();
-  testDouble();
-  testVoid();
-  testPointerPointer();
-  testPointerPointerNull();
-  testPointerStoreNull();
-  testSizeOf();
-  testPointerChain(100);
-  testTypeTest();
-  testToString();
-  testEquality();
-  testAllocateGeneric();
-  testAllocateVoid();
-  testAllocateNativeFunction();
-  testAllocateNativeType();
-  testSizeOfGeneric();
-  testSizeOfVoid();
-  testSizeOfNativeFunction();
-  testSizeOfNativeType();
-  testFreeZeroOut();
-}
-
-void testPointerBasic() {
-  ffi.Pointer<ffi.Int64> p = ffi.allocate();
-  p.store(42);
-  Expect.equals(42, p.load<int>());
-  p.free();
-}
-
-void testPointerFromPointer() {
-  ffi.Pointer<ffi.Int64> p = ffi.allocate();
-  p.store(1337);
-  int ptr = p.address;
-  ffi.Pointer<ffi.Int64> p2 = ffi.fromAddress(ptr);
-  Expect.equals(1337, p2.load<int>());
-  p.free();
-}
-
-void testPointerPointerArithmetic() {
-  ffi.Pointer<ffi.Int64> p = ffi.allocate(count: 2);
-  ffi.Pointer<ffi.Int64> p2 = p.elementAt(1);
-  p2.store(100);
-  ffi.Pointer<ffi.Int64> p3 = p.offsetBy(8);
-  Expect.equals(100, p3.load<int>());
-  p.free();
-}
-
-void testPointerPointerArithmeticSizes() {
-  ffi.Pointer<ffi.Int64> p = ffi.allocate(count: 2);
-  ffi.Pointer<ffi.Int64> p2 = p.elementAt(1);
-  int addr = p.address;
-  Expect.equals(addr + 8, p2.address);
-  p.free();
-
-  ffi.Pointer<ffi.Int32> p3 = ffi.allocate(count: 2);
-  ffi.Pointer<ffi.Int32> p4 = p3.elementAt(1);
-  addr = p3.address;
-  Expect.equals(addr + 4, p4.address);
-  p3.free();
-}
-
-void testPointerAllocateNonPositive() {
-  Expect.throws(() => ffi.allocate<ffi.Int8>(count: 0));
-  Expect.throws(() => ffi.allocate<ffi.Int8>(count: -1));
-}
-
-void testPointerCast() {
-  ffi.Pointer<ffi.Int64> p = ffi.allocate();
-  ffi.Pointer<ffi.Int32> p2 = p.cast(); // gets the correct type args back
-  p.free();
-}
-
-void testCastGeneric() {
-  ffi.Pointer<T> generic<T extends ffi.NativeType>(ffi.Pointer<ffi.Int16> p) {
-    return p.cast();
-  }
-
-  ffi.Pointer<ffi.Int16> p = ffi.allocate();
-  ffi.Pointer<ffi.Int64> p2 = generic(p);
-  p.free();
-}
-
-void testCastGeneric2() {
-  ffi.Pointer<ffi.Int64> generic<T extends ffi.NativeType>(ffi.Pointer<T> p) {
-    return p.cast();
-  }
-
-  ffi.Pointer<ffi.Int16> p = ffi.allocate();
-  ffi.Pointer<ffi.Int64> p2 = generic(p);
-  p.free();
-}
-
-void testCastNativeType() {
-  ffi.Pointer<ffi.Int64> p = ffi.allocate();
-  Expect.throws(() {
-    p.cast<ffi.Pointer>();
-  });
-  p.free();
-}
-
-void testCondensedNumbersInt8() {
-  ffi.Pointer<ffi.Int8> p = ffi.allocate(count: 8);
-  for (var i in [0, 1, 2, 3, 4, 5, 6, 7]) {
-    p.elementAt(i).store(i * 3);
-  }
-  for (var i in [0, 1, 2, 3, 4, 5, 6, 7]) {
-    Expect.equals(i * 3, p.elementAt(i).load<int>());
-  }
-  p.free();
-}
-
-void testCondensedNumbersFloat() {
-  ffi.Pointer<ffi.Float> p = ffi.allocate(count: 8);
-  for (var i in [0, 1, 2, 3, 4, 5, 6, 7]) {
-    p.elementAt(i).store(1.511366173271439e-13);
-  }
-  for (var i in [0, 1, 2, 3, 4, 5, 6, 7]) {
-    Expect.equals(1.511366173271439e-13, p.elementAt(i).load<double>());
-  }
-  p.free();
-}
-
-void testRangeInt8() {
-  ffi.Pointer<ffi.Int8> p = ffi.allocate();
-  p.store(127);
-  Expect.equals(127, p.load<int>());
-  p.store(-128);
-  Expect.equals(-128, p.load<int>());
-
-  Expect.equals(0x0000000000000080, 128);
-  Expect.equals(0xFFFFFFFFFFFFFF80, -128);
-  p.store(128);
-  Expect.equals(-128, p.load<int>()); // truncated and sign extended
-
-  Expect.equals(0xFFFFFFFFFFFFFF7F, -129);
-  Expect.equals(0x000000000000007F, 127);
-  p.store(-129);
-  Expect.equals(127, p.load<int>()); // truncated
-  p.free();
-}
-
-void testRangeUint8() {
-  ffi.Pointer<ffi.Uint8> p = ffi.allocate();
-  p.store(255);
-  Expect.equals(255, p.load<int>());
-  p.store(0);
-  Expect.equals(0, p.load<int>());
-
-  Expect.equals(0x0000000000000000, 0);
-  Expect.equals(0x0000000000000100, 256);
-  p.store(256);
-  Expect.equals(0, p.load<int>()); // truncated
-
-  Expect.equals(0xFFFFFFFFFFFFFFFF, -1);
-  Expect.equals(0x00000000000000FF, 255);
-  p.store(-1);
-  Expect.equals(255, p.load<int>()); // truncated
-  p.free();
-}
-
-void testRangeInt16() {
-  ffi.Pointer<ffi.Int16> p = ffi.allocate();
-  p.store(0x7FFF);
-  Expect.equals(0x7FFF, p.load<int>());
-  p.store(-0x8000);
-  Expect.equals(-0x8000, p.load<int>());
-  p.store(0x8000);
-  Expect.equals(
-      0xFFFFFFFFFFFF8000, p.load<int>()); // truncated and sign extended
-  p.store(-0x8001);
-  Expect.equals(0x7FFF, p.load<int>()); // truncated
-  p.free();
-}
-
-void testRangeUint16() {
-  ffi.Pointer<ffi.Uint16> p = ffi.allocate();
-  p.store(0xFFFF);
-  Expect.equals(0xFFFF, p.load<int>());
-  p.store(0);
-  Expect.equals(0, p.load<int>());
-  p.store(0x10000);
-  Expect.equals(0, p.load<int>()); // truncated
-  p.store(-1);
-  Expect.equals(0xFFFF, p.load<int>()); // truncated
-  p.free();
-}
-
-void testRangeInt32() {
-  ffi.Pointer<ffi.Int32> p = ffi.allocate();
-  p.store(0x7FFFFFFF);
-  Expect.equals(0x7FFFFFFF, p.load<int>());
-  p.store(-0x80000000);
-  Expect.equals(-0x80000000, p.load<int>());
-  p.store(0x80000000);
-  Expect.equals(
-      0xFFFFFFFF80000000, p.load<int>()); // truncated and sign extended
-  p.store(-0x80000001);
-  Expect.equals(0x7FFFFFFF, p.load<int>()); // truncated
-  p.free();
-}
-
-void testRangeUint32() {
-  ffi.Pointer<ffi.Uint32> p = ffi.allocate();
-  p.store(0xFFFFFFFF);
-  Expect.equals(0xFFFFFFFF, p.load<int>());
-  p.store(0);
-  Expect.equals(0, p.load<int>());
-  p.store(0x100000000);
-  Expect.equals(0, p.load<int>()); // truncated
-  p.store(-1);
-  Expect.equals(0xFFFFFFFF, p.load<int>()); // truncated
-  p.free();
-}
-
-void testRangeInt64() {
-  ffi.Pointer<ffi.Int64> p = ffi.allocate();
-  p.store(0x7FFFFFFFFFFFFFFF); // 2 ^ 63 - 1
-  Expect.equals(0x7FFFFFFFFFFFFFFF, p.load<int>());
-  p.store(-0x8000000000000000); // -2 ^ 63
-  Expect.equals(-0x8000000000000000, p.load<int>());
-  p.free();
-}
-
-void testRangeUint64() {
-  ffi.Pointer<ffi.Uint64> p = ffi.allocate();
-  p.store(0x7FFFFFFFFFFFFFFF); // 2 ^ 63 - 1
-  Expect.equals(0x7FFFFFFFFFFFFFFF, p.load<int>());
-  p.store(-0x8000000000000000); // -2 ^ 63 interpreted as 2 ^ 63
-  Expect.equals(-0x8000000000000000, p.load<int>());
-
-  // Dart allows interpreting bits both signed and unsigned
-  Expect.equals(0xFFFFFFFFFFFFFFFF, -1);
-  p.store(-1); // -1 interpreted as 2 ^ 64 - 1
-  Expect.equals(-1, p.load<int>());
-  Expect.equals(0xFFFFFFFFFFFFFFFF, p.load<int>());
-  p.free();
-}
-
-void testRangeIntPtr() {
-  ffi.Pointer<ffi.IntPtr> p = ffi.allocate();
-  int pAddr = p.address;
-  p.store(pAddr); // its own address should fit
-  p.store(0x7FFFFFFF); // and 32 bit addresses should fit
-  Expect.equals(0x7FFFFFFF, p.load<int>());
-  p.store(-0x80000000);
-  Expect.equals(-0x80000000, p.load<int>());
-  p.free();
-}
-
-void testFloat() {
-  ffi.Pointer<ffi.Float> p = ffi.allocate();
-  p.store(1.511366173271439e-13);
-  Expect.equals(1.511366173271439e-13, p.load<double>());
-  p.store(1.4260258159703532e-105); // float does not have enough precision
-  Expect.notEquals(1.4260258159703532e-105, p.load<double>());
-  p.free();
-}
-
-void testDouble() {
-  ffi.Pointer<ffi.Double> p = ffi.allocate();
-  p.store(1.4260258159703532e-105);
-  Expect.equals(1.4260258159703532e-105, p.load<double>());
-  p.free();
-}
-
-void testVoid() {
-  ffi.Pointer<ffi.IntPtr> p1 = ffi.allocate();
-  ffi.Pointer<ffi.Void> p2 = p1.cast(); // make this dart pointer opaque
-  p2.address; // we can print the address
-  p2.free();
-}
-
-void testPointerPointer() {
-  ffi.Pointer<ffi.Int16> p = ffi.allocate();
-  p.store(17);
-  ffi.Pointer<ffi.Pointer<ffi.Int16>> p2 = ffi.allocate();
-  p2.store(p);
-  Expect.equals(17, p2.load<ffi.Pointer<ffi.Int16>>().load<int>());
-  p2.free();
-  p.free();
-}
-
-void testPointerPointerNull() {
-  ffi.Pointer<ffi.Pointer<ffi.Int8>> pointerToPointer = ffi.allocate();
-  ffi.Pointer<ffi.Int8> value = null;
-  pointerToPointer.store(value);
-  value = pointerToPointer.load();
-  Expect.isNull(value);
-  value = ffi.allocate();
-  pointerToPointer.store(value);
-  value = pointerToPointer.load();
-  Expect.isNotNull(value);
-  value.free();
-  value = null;
-  pointerToPointer.store(value);
-  value = pointerToPointer.load();
-  Expect.isNull(value);
-  pointerToPointer.free();
-}
-
-void testPointerStoreNull() {
-  int i = null;
-  ffi.Pointer<ffi.Int8> p = ffi.allocate();
-  Expect.throws(() => p.store(i));
-  p.free();
-  double d = null;
-  ffi.Pointer<ffi.Float> p2 = ffi.allocate();
-  Expect.throws(() => p2.store(d));
-  p2.free();
-}
-
-void testSizeOf() {
-  Expect.equals(1, ffi.sizeOf<ffi.Int8>());
-  Expect.equals(2, ffi.sizeOf<ffi.Int16>());
-  Expect.equals(4, ffi.sizeOf<ffi.Int32>());
-  Expect.equals(8, ffi.sizeOf<ffi.Int64>());
-  Expect.equals(1, ffi.sizeOf<ffi.Uint8>());
-  Expect.equals(2, ffi.sizeOf<ffi.Uint16>());
-  Expect.equals(4, ffi.sizeOf<ffi.Uint32>());
-  Expect.equals(8, ffi.sizeOf<ffi.Uint64>());
-  Expect.equals(
-      true, 4 == ffi.sizeOf<ffi.IntPtr>() || 8 == ffi.sizeOf<ffi.IntPtr>());
-  Expect.equals(4, ffi.sizeOf<ffi.Float>());
-  Expect.equals(8, ffi.sizeOf<ffi.Double>());
-}
-
-// note: stack overflows at around 15k calls
-void testPointerChain(int length) {
-  void createChain(ffi.Pointer<ffi.IntPtr> head, int length, int value) {
-    if (length == 0) {
-      head.store(value);
-      return;
-    }
-    ffi.Pointer<ffi.IntPtr> next = ffi.allocate();
-    head.store(next.address);
-    createChain(next, length - 1, value);
-  }
-
-  int getChainValue(ffi.Pointer<ffi.IntPtr> head, int length) {
-    if (length == 0) {
-      return head.load();
-    }
-    ffi.Pointer<ffi.IntPtr> next = ffi.fromAddress(head.load());
-    return getChainValue(next, length - 1);
-  }
-
-  void freeChain(ffi.Pointer<ffi.IntPtr> head, int length) {
-    ffi.Pointer<ffi.IntPtr> next = ffi.fromAddress(head.load());
-    head.free();
-    if (length == 0) {
-      return;
-    }
-    freeChain(next, length - 1);
-  }
-
-  ffi.Pointer<ffi.IntPtr> head = ffi.allocate();
-  createChain(head, length, 512);
-  int tailValue = getChainValue(head, length);
-  Expect.equals(512, tailValue);
-  freeChain(head, length);
-}
-
-void testTypeTest() {
-  ffi.Pointer<ffi.Int8> p = ffi.allocate();
-  Expect.isTrue(p is ffi.Pointer);
-  p.free();
-}
-
-void testToString() {
-  ffi.Pointer<ffi.Int16> p = ffi.allocate();
-  Expect.stringEquals(
-      "Pointer<Int16>: address=0x", p.toString().substring(0, 26));
-  p.free();
-}
-
-void testEquality() {
-  ffi.Pointer<ffi.Int8> p = ffi.fromAddress(12345678);
-  ffi.Pointer<ffi.Int8> p2 = ffi.fromAddress(12345678);
-  Expect.equals(p, p2);
-  Expect.equals(p.hashCode, p2.hashCode);
-  ffi.Pointer<ffi.Int16> p3 = p.cast();
-  Expect.equals(p, p3);
-  Expect.equals(p.hashCode, p3.hashCode);
-  Expect.notEquals(p, null);
-  Expect.notEquals(null, p);
-  ffi.Pointer<ffi.Int8> p4 = p.offsetBy(1337);
-  Expect.notEquals(p, p4);
-}
-
-typedef Int8UnOp = ffi.Int8 Function(ffi.Int8);
-
-void testAllocateGeneric() {
-  ffi.Pointer<T> generic<T extends ffi.NativeType>() {
-    ffi.Pointer<T> pointer;
-    pointer = ffi.allocate();
-    return pointer;
-  }
-
-  ffi.Pointer p = generic<ffi.Int64>();
-  p.free();
-}
-
-void testAllocateVoid() {
-  Expect.throws(() {
-    ffi.Pointer<ffi.Void> p = ffi.allocate();
-  });
-}
-
-void testAllocateNativeFunction() {
-  Expect.throws(() {
-    ffi.Pointer<ffi.NativeFunction<Int8UnOp>> p = ffi.allocate();
-  });
-}
-
-void testAllocateNativeType() {
-  Expect.throws(() {
-    ffi.allocate();
-  });
-}
-
-void testSizeOfGeneric() {
-  int generic<T extends ffi.Pointer>() {
-    int size;
-    size = ffi.sizeOf<T>();
-    return size;
-  }
-
-  int size = generic<ffi.Pointer<ffi.Int64>>();
-  Expect.equals(8, size);
-}
-
-void testSizeOfVoid() {
-  Expect.throws(() {
-    ffi.sizeOf<ffi.Void>();
-  });
-}
-
-void testSizeOfNativeFunction() {
-  Expect.throws(() {
-    ffi.sizeOf<ffi.NativeFunction<Int8UnOp>>();
-  });
-}
-
-void testSizeOfNativeType() {
-  Expect.throws(() {
-    ffi.sizeOf();
-  });
-}
-
-void testFreeZeroOut() {
-  // at least one of these pointers should have address != 0 on all platforms
-  ffi.Pointer<ffi.Int8> p1 = ffi.allocate();
-  ffi.Pointer<ffi.Int8> p2 = ffi.allocate();
-  Expect.notEquals(0, p1.address & p2.address);
-  p1.free();
-  p2.free();
-  Expect.equals(0, p1.address);
-  Expect.equals(0, p2.address);
-}
diff --git a/tests/standalone_2/ffi/dynamic_library_test.dart b/tests/standalone_2/ffi/dynamic_library_test.dart
deleted file mode 100644
index 1c3c45d..0000000
--- a/tests/standalone_2/ffi/dynamic_library_test.dart
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-//
-// Dart test program for testing dart:ffi dynamic library loading.
-
-library FfiTest;
-
-import 'dart:ffi' as ffi;
-
-import 'package:expect/expect.dart';
-
-void main() {
-  testOpen();
-  testOpenError();
-  testLookup();
-  testLookupError();
-  testToString();
-  testEquality();
-}
-
-void testOpen() {
-  ffi.DynamicLibrary l = ffi.DynamicLibrary.open("ffi_test_dynamic_library");
-  Expect.notEquals(null, l);
-}
-
-void testOpenError() {
-  Expect.throws(
-      () => ffi.DynamicLibrary.open("doesnotexistforsurelibrary123409876"));
-}
-
-typedef NativeDoubleUnOp = ffi.Double Function(ffi.Double);
-
-typedef DoubleUnOp = double Function(double);
-
-void testLookup() {
-  ffi.DynamicLibrary l = ffi.DynamicLibrary.open("ffi_test_dynamic_library");
-  var timesFour = l.lookupFunction<NativeDoubleUnOp, DoubleUnOp>("timesFour");
-  Expect.approxEquals(12.0, timesFour(3));
-}
-
-void testLookupError() {
-  ffi.DynamicLibrary l = ffi.DynamicLibrary.open("ffi_test_dynamic_library");
-  Expect.throws(() => l.lookupFunction<NativeDoubleUnOp, DoubleUnOp>(
-      "functionnamethatdoesnotexistforsure749237593845"));
-}
-
-void testToString() {
-  ffi.DynamicLibrary l = ffi.DynamicLibrary.open("ffi_test_dynamic_library");
-  Expect.stringEquals(
-      "DynamicLibrary: handle=0x", l.toString().substring(0, 25));
-}
-
-void testEquality() {
-  ffi.DynamicLibrary l = ffi.DynamicLibrary.open("ffi_test_dynamic_library");
-  ffi.DynamicLibrary l2 = ffi.DynamicLibrary.open("ffi_test_dynamic_library");
-  Expect.equals(l, l2);
-  Expect.equals(l.hashCode, l2.hashCode);
-  Expect.notEquals(l, null);
-  Expect.notEquals(null, l);
-  ffi.DynamicLibrary l3 = ffi.DynamicLibrary.open("ffi_test_functions");
-  Expect.notEquals(l, l3);
-}
diff --git a/tests/standalone_2/ffi/enable_ffi_test.dart b/tests/standalone_2/ffi/enable_ffi_test.dart
deleted file mode 100644
index 5396312..0000000
--- a/tests/standalone_2/ffi/enable_ffi_test.dart
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-//
-// Dart test program for testing the --enable-ffi=false flag.
-//
-// VMOptions=--enable-ffi=false
-
-library FfiTest;
-
-import 'dart:ffi' as ffi;
-
-import "package:expect/expect.dart";
-
-void main() {
-  ffi.Pointer<ffi.Int64> p = ffi.allocate();
-  p.store(42);
-  Expect.equals(42, p.load<int>());
-  p.free();
-}
diff --git a/tests/standalone_2/ffi/function_callbacks_test.dart b/tests/standalone_2/ffi/function_callbacks_test.dart
deleted file mode 100644
index 2f3212b..0000000
--- a/tests/standalone_2/ffi/function_callbacks_test.dart
+++ /dev/null
@@ -1,90 +0,0 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-//
-// Dart test program for testing dart:ffi function pointers with callbacks.
-
-library FfiTest;
-
-import 'dart:ffi' as ffi;
-
-import "package:expect/expect.dart";
-
-import 'coordinate.dart';
-
-typedef NativeCoordinateOp = Coordinate Function(Coordinate);
-
-typedef CoordinateTrice = Coordinate Function(
-    ffi.Pointer<ffi.NativeFunction<NativeCoordinateOp>>, Coordinate);
-
-void main() {
-  testFunctionWithFunctionPointer();
-  testNativeFunctionWithFunctionPointer();
-  testFromFunction();
-}
-
-ffi.DynamicLibrary ffiTestFunctions =
-    ffi.DynamicLibrary.open("ffi_test_functions");
-
-/// pass a pointer to a c function as an argument to a c function
-void testFunctionWithFunctionPointer() {
-  ffi.Pointer<ffi.NativeFunction<NativeCoordinateOp>>
-      transposeCoordinatePointer =
-      ffiTestFunctions.lookup("TransposeCoordinate");
-
-  ffi.Pointer<ffi.NativeFunction<CoordinateTrice>> p2 =
-      ffiTestFunctions.lookup("CoordinateUnOpTrice");
-  CoordinateTrice coordinateUnOpTrice = p2.asFunction();
-
-  Coordinate c1 = Coordinate(10.0, 20.0, null);
-  c1.next = c1;
-
-  Coordinate result = coordinateUnOpTrice(transposeCoordinatePointer, c1);
-
-  print(result.runtimeType);
-  print(result.x);
-  print(result.y);
-
-  c1.free();
-}
-
-typedef BinaryOp = int Function(int, int);
-
-typedef NativeIntptrBinOp = ffi.IntPtr Function(ffi.IntPtr, ffi.IntPtr);
-
-typedef NativeIntptrBinOpLookup
-    = ffi.Pointer<ffi.NativeFunction<NativeIntptrBinOp>> Function();
-
-void testNativeFunctionWithFunctionPointer() {
-  ffi.Pointer<ffi.NativeFunction<NativeIntptrBinOpLookup>> p1 =
-      ffiTestFunctions.lookup("IntptrAdditionClosure");
-  NativeIntptrBinOpLookup intptrAdditionClosure = p1.asFunction();
-
-  ffi.Pointer<ffi.NativeFunction<NativeIntptrBinOp>> intptrAdditionPointer =
-      intptrAdditionClosure();
-  BinaryOp intptrAddition = intptrAdditionPointer.asFunction();
-  Expect.equals(37, intptrAddition(10, 27));
-}
-
-int myPlus(int a, int b) => a + b;
-
-typedef NativeApplyTo42And74Type = ffi.IntPtr Function(
-    ffi.Pointer<ffi.NativeFunction<NativeIntptrBinOp>>);
-
-typedef ApplyTo42And74Type = int Function(
-    ffi.Pointer<ffi.NativeFunction<NativeIntptrBinOp>>);
-
-void testFromFunction() {
-  ffi.Pointer<ffi.NativeFunction<NativeIntptrBinOp>> pointer =
-      ffi.fromFunction(myPlus);
-  Expect.isNotNull(pointer);
-
-  ffi.Pointer<ffi.NativeFunction<NativeApplyTo42And74Type>> p17 =
-      ffiTestFunctions.lookup("ApplyTo42And74");
-  ApplyTo42And74Type applyTo42And74 = p17.asFunction();
-
-  // TODO(dacoharkes): implement this
-
-  // int result = applyTo42And74(pointer);
-  // print(result);
-}
diff --git a/tests/standalone_2/ffi/function_structs_test.dart b/tests/standalone_2/ffi/function_structs_test.dart
deleted file mode 100644
index 6f74a90..0000000
--- a/tests/standalone_2/ffi/function_structs_test.dart
+++ /dev/null
@@ -1,116 +0,0 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-//
-// Dart test program for testing dart:ffi function pointers with struct
-// arguments.
-
-library FfiTest;
-
-import 'dart:ffi' as ffi;
-
-import "package:expect/expect.dart";
-
-import 'coordinate.dart';
-import 'very_large_struct.dart';
-
-typedef NativeCoordinateOp = Coordinate Function(Coordinate);
-
-void main() {
-  testFunctionWithStruct();
-  testFunctionWithStructArray();
-  testFunctionWithVeryLargeStruct();
-}
-
-ffi.DynamicLibrary ffiTestFunctions =
-    ffi.DynamicLibrary.open("ffi_test_functions");
-
-/// pass a struct to a c function and get a struct as return value
-void testFunctionWithStruct() {
-  ffi.Pointer<ffi.NativeFunction<NativeCoordinateOp>> p1 =
-      ffiTestFunctions.lookup("TransposeCoordinate");
-  NativeCoordinateOp f1 = p1.asFunction();
-
-  Coordinate c1 = Coordinate(10.0, 20.0, null);
-  Coordinate c2 = Coordinate(42.0, 84.0, c1);
-  c1.next = c2;
-
-  Coordinate result = f1(c1);
-
-  Expect.approxEquals(20.0, c1.x);
-  Expect.approxEquals(30.0, c1.y);
-
-  Expect.approxEquals(42.0, result.x);
-  Expect.approxEquals(84.0, result.y);
-
-  c1.free();
-  c2.free();
-}
-
-/// pass an array of structs to a c funtion
-void testFunctionWithStructArray() {
-  ffi.Pointer<ffi.NativeFunction<NativeCoordinateOp>> p1 =
-      ffiTestFunctions.lookup("CoordinateElemAt1");
-  NativeCoordinateOp f1 = p1.asFunction();
-
-  Coordinate c1 = Coordinate.allocate(count: 3);
-  Coordinate c2 = c1.elementAt(1);
-  Coordinate c3 = c1.elementAt(2);
-  c1.x = 10.0;
-  c1.y = 10.0;
-  c1.next = c3;
-  c2.x = 20.0;
-  c2.y = 20.0;
-  c2.next = c1;
-  c3.x = 30.0;
-  c3.y = 30.0;
-  c3.next = c2;
-
-  Coordinate result = f1(c1);
-  Expect.approxEquals(20.0, result.x);
-  Expect.approxEquals(20.0, result.y);
-
-  c1.free();
-}
-
-typedef VeryLargeStructSum = int Function(VeryLargeStruct);
-typedef NativeVeryLargeStructSum = ffi.Int64 Function(VeryLargeStruct);
-
-void testFunctionWithVeryLargeStruct() {
-  ffi.Pointer<ffi.NativeFunction<NativeVeryLargeStructSum>> p1 =
-      ffiTestFunctions.lookup("SumVeryLargeStruct");
-  VeryLargeStructSum f = p1.asFunction();
-
-  VeryLargeStruct vls1 = VeryLargeStruct.allocate(count: 2);
-  VeryLargeStruct vls2 = vls1.elementAt(1);
-  List<VeryLargeStruct> structs = [vls1, vls2];
-  for (VeryLargeStruct struct in structs) {
-    struct.a = 1;
-    struct.b = 2;
-    struct.c = 4;
-    struct.d = 8;
-    struct.e = 16;
-    struct.f = 32;
-    struct.g = 64;
-    struct.h = 128;
-    struct.i = 256;
-    struct.j = 512;
-    struct.k = 1024;
-    struct.smallLastField = 1;
-  }
-  vls1.parent = vls2;
-  vls1.numChidlren = 2;
-  vls1.children = vls1;
-  vls2.parent = vls2;
-  vls2.parent = null;
-  vls2.numChidlren = 0;
-  vls2.children = null;
-
-  int result = f(vls1);
-  Expect.equals(2051, result);
-
-  result = f(vls2);
-  Expect.equals(2048, result);
-
-  vls1.free();
-}
diff --git a/tests/standalone_2/ffi/function_test.dart b/tests/standalone_2/ffi/function_test.dart
deleted file mode 100644
index bed0264..0000000
--- a/tests/standalone_2/ffi/function_test.dart
+++ /dev/null
@@ -1,284 +0,0 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-//
-// Dart test program for testing dart:ffi function pointers.
-
-library FfiTest;
-
-import 'dart:ffi' as ffi;
-
-import "package:expect/expect.dart";
-
-void main() {
-  testNativeFunctionFromCast();
-  testNativeFunctionFromLookup();
-  test64bitInterpretations();
-  testTruncation();
-  testNativeFunctionDoubles();
-  testNativeFunctionFloats();
-  testNativeFunctionManyArguments1();
-  testNativeFunctionManyArguments2();
-  testNativeFunctionManyArguments3();
-  testNativeFunctionPointer();
-  testNullInt();
-  testNullDouble();
-  testNullManyArgs();
-  testNullPointers();
-  testFloatRounding();
-}
-
-ffi.DynamicLibrary ffiTestFunctions =
-    ffi.DynamicLibrary.open("ffi_test_functions");
-
-typedef NativeBinaryOp = ffi.Int32 Function(ffi.Int32, ffi.Int32);
-typedef UnaryOp = int Function(int);
-typedef BinaryOp = int Function(int, int);
-typedef GenericBinaryOp<T> = int Function(int, T);
-
-void testNativeFunctionFromCast() {
-  ffi.Pointer<ffi.IntPtr> p1 = ffi.allocate();
-  ffi.Pointer<ffi.NativeFunction<NativeBinaryOp>> p2 = p1.cast();
-  BinaryOp f = p2.asFunction<BinaryOp>();
-  BinaryOp f2 = p2.asFunction<GenericBinaryOp<int>>();
-  p1.free();
-}
-
-typedef NativeQuadOpSigned = ffi.Int64 Function(
-    ffi.Int64, ffi.Int32, ffi.Int16, ffi.Int8);
-typedef QuadOp = int Function(int, int, int, int);
-typedef NativeQuadOpUnsigned = ffi.Uint64 Function(
-    ffi.Uint64, ffi.Uint32, ffi.Uint16, ffi.Uint8);
-
-void testNativeFunctionFromLookup() {
-  BinaryOp sumPlus42 =
-      ffiTestFunctions.lookupFunction<NativeBinaryOp, BinaryOp>("SumPlus42");
-  Expect.equals(49, sumPlus42(3, 4));
-
-  QuadOp intComputation = ffiTestFunctions
-      .lookupFunction<NativeQuadOpSigned, QuadOp>("IntComputation");
-  Expect.equals(625, intComputation(125, 250, 500, 1000));
-
-  Expect.equals(
-      0x7FFFFFFFFFFFFFFF, intComputation(0, 0, 0, 0x7FFFFFFFFFFFFFFF));
-  Expect.equals(
-      -0x8000000000000000, intComputation(0, 0, 0, -0x8000000000000000));
-}
-
-void test64bitInterpretations() {
-  QuadOp uintComputation = ffiTestFunctions
-      .lookupFunction<NativeQuadOpUnsigned, QuadOp>("UintComputation");
-
-  // 2 ^ 63 - 1
-  Expect.equals(
-      0x7FFFFFFFFFFFFFFF, uintComputation(0, 0, 0, 0x7FFFFFFFFFFFFFFF));
-  // -2 ^ 63 interpreted as 2 ^ 63
-  Expect.equals(
-      -0x8000000000000000, uintComputation(0, 0, 0, -0x8000000000000000));
-  // -1 interpreted as 2 ^ 64 - 1
-  Expect.equals(-1, uintComputation(0, 0, 0, -1));
-}
-
-typedef NativeSenaryOp = ffi.Int64 Function(
-    ffi.Int8, ffi.Int16, ffi.Int32, ffi.Uint8, ffi.Uint16, ffi.Uint32);
-typedef SenaryOp = int Function(int, int, int, int, int, int);
-
-void testTruncation() {
-  SenaryOp sumSmallNumbers = ffiTestFunctions
-      .lookupFunction<NativeSenaryOp, SenaryOp>("SumSmallNumbers");
-
-  // TODO(dacoharkes): implement truncation and sign extension in trampolines
-  // for values smaller than 32 bits.
-  sumSmallNumbers(128, 0, 0, 0, 0, 0);
-  sumSmallNumbers(-129, 0, 0, 0, 0, 0);
-  sumSmallNumbers(0, 0, 0, 256, 0, 0);
-  sumSmallNumbers(0, 0, 0, -1, 0, 0);
-
-  sumSmallNumbers(0, 0x8000, 0, 0, 0, 0);
-  sumSmallNumbers(0, 0xFFFFFFFFFFFF7FFF, 0, 0, 0, 0);
-  sumSmallNumbers(0, 0, 0, 0, 0x10000, 0);
-  sumSmallNumbers(0, 0, 0, 0, -1, 0);
-
-  Expect.equals(0xFFFFFFFF80000000, sumSmallNumbers(0, 0, 0x80000000, 0, 0, 0));
-  Expect.equals(
-      0x000000007FFFFFFF, sumSmallNumbers(0, 0, 0xFFFFFFFF7FFFFFFF, 0, 0, 0));
-  Expect.equals(0, sumSmallNumbers(0, 0, 0, 0, 0, 0x100000000));
-  Expect.equals(0xFFFFFFFF, sumSmallNumbers(0, 0, 0, 0, 0, -1));
-}
-
-typedef NativeDoubleUnaryOp = ffi.Double Function(ffi.Double);
-typedef DoubleUnaryOp = double Function(double);
-
-void testNativeFunctionDoubles() {
-  DoubleUnaryOp times1_337Double = ffiTestFunctions
-      .lookupFunction<NativeDoubleUnaryOp, DoubleUnaryOp>("Times1_337Double");
-  Expect.approxEquals(2.0 * 1.337, times1_337Double(2.0));
-}
-
-typedef NativeFloatUnaryOp = ffi.Float Function(ffi.Float);
-
-void testNativeFunctionFloats() {
-  DoubleUnaryOp times1_337Float = ffiTestFunctions
-      .lookupFunction<NativeFloatUnaryOp, DoubleUnaryOp>("Times1_337Float");
-  Expect.approxEquals(1337.0, times1_337Float(1000.0));
-}
-
-typedef NativeOctenaryOp = ffi.IntPtr Function(
-    ffi.IntPtr,
-    ffi.IntPtr,
-    ffi.IntPtr,
-    ffi.IntPtr,
-    ffi.IntPtr,
-    ffi.IntPtr,
-    ffi.IntPtr,
-    ffi.IntPtr,
-    ffi.IntPtr,
-    ffi.IntPtr);
-typedef OctenaryOp = int Function(
-    int, int, int, int, int, int, int, int, int, int);
-
-void testNativeFunctionManyArguments1() {
-  OctenaryOp sumManyInts = ffiTestFunctions
-      .lookupFunction<NativeOctenaryOp, OctenaryOp>("SumManyInts");
-  Expect.equals(55, sumManyInts(1, 2, 3, 4, 5, 6, 7, 8, 9, 10));
-}
-
-typedef NativeDoubleOctenaryOp = ffi.Double Function(
-    ffi.Double,
-    ffi.Double,
-    ffi.Double,
-    ffi.Double,
-    ffi.Double,
-    ffi.Double,
-    ffi.Double,
-    ffi.Double,
-    ffi.Double,
-    ffi.Double);
-typedef DoubleOctenaryOp = double Function(double, double, double, double,
-    double, double, double, double, double, double);
-
-void testNativeFunctionManyArguments2() {
-  DoubleOctenaryOp sumManyDoubles =
-      ffiTestFunctions.lookupFunction<NativeDoubleOctenaryOp, DoubleOctenaryOp>(
-          "SumManyDoubles");
-  Expect.approxEquals(
-      55.0, sumManyDoubles(1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0));
-}
-
-typedef NativeVigesimalOp = ffi.Double Function(
-    ffi.IntPtr,
-    ffi.Float,
-    ffi.IntPtr,
-    ffi.Double,
-    ffi.IntPtr,
-    ffi.Float,
-    ffi.IntPtr,
-    ffi.Double,
-    ffi.IntPtr,
-    ffi.Float,
-    ffi.IntPtr,
-    ffi.Double,
-    ffi.IntPtr,
-    ffi.Float,
-    ffi.IntPtr,
-    ffi.Double,
-    ffi.IntPtr,
-    ffi.Float,
-    ffi.IntPtr,
-    ffi.Double);
-typedef VigesimalOp = double Function(
-    int,
-    double,
-    int,
-    double,
-    int,
-    double,
-    int,
-    double,
-    int,
-    double,
-    int,
-    double,
-    int,
-    double,
-    int,
-    double,
-    int,
-    double,
-    int,
-    double);
-
-void testNativeFunctionManyArguments3() {
-  VigesimalOp sumManyNumbers = ffiTestFunctions
-      .lookupFunction<NativeVigesimalOp, VigesimalOp>("SumManyNumbers");
-  Expect.approxEquals(
-      210.0,
-      sumManyNumbers(1, 2.0, 3, 4.0, 5, 6.0, 7, 8.0, 9, 10.0, 11, 12.0, 13,
-          14.0, 15, 16.0, 17, 18.0, 19, 20.0));
-}
-
-typedef Int64PointerUnOp = ffi.Pointer<ffi.Int64> Function(
-    ffi.Pointer<ffi.Int64>);
-
-void testNativeFunctionPointer() {
-  Int64PointerUnOp assign1337Index1 = ffiTestFunctions
-      .lookupFunction<Int64PointerUnOp, Int64PointerUnOp>("Assign1337Index1");
-  ffi.Pointer<ffi.Int64> p2 = ffi.allocate(count: 2);
-  p2.store(42);
-  p2.elementAt(1).store(1000);
-  ffi.Pointer<ffi.Int64> result = assign1337Index1(p2);
-  Expect.equals(1337, result.load<int>());
-  Expect.equals(1337, p2.elementAt(1).load<int>());
-  Expect.equals(p2.elementAt(1).address, result.address);
-  p2.free();
-}
-
-void testNullInt() {
-  BinaryOp sumPlus42 =
-      ffiTestFunctions.lookupFunction<NativeBinaryOp, BinaryOp>("SumPlus42");
-
-  Expect.throws(() => sumPlus42(43, null));
-}
-
-void testNullDouble() {
-  DoubleUnaryOp times1_337Double = ffiTestFunctions
-      .lookupFunction<NativeDoubleUnaryOp, DoubleUnaryOp>("Times1_337Double");
-  Expect.throws(() => times1_337Double(null));
-}
-
-void testNullManyArgs() {
-  VigesimalOp sumManyNumbers = ffiTestFunctions
-      .lookupFunction<NativeVigesimalOp, VigesimalOp>("SumManyNumbers");
-  Expect.throws(() => sumManyNumbers(1, 2.0, 3, 4.0, 5, 6.0, 7, 8.0, 9, 10.0,
-      11, 12.0, 13, 14.0, 15, 16.0, 17, 18.0, null, 20.0));
-}
-
-void testNullPointers() {
-  Int64PointerUnOp nullableInt64ElemAt1 =
-      ffiTestFunctions.lookupFunction<Int64PointerUnOp, Int64PointerUnOp>(
-          "NullableInt64ElemAt1");
-
-  ffi.Pointer<ffi.Int64> result = nullableInt64ElemAt1(null);
-  Expect.isNull(result);
-
-  ffi.Pointer<ffi.Int64> p2 = ffi.allocate(count: 2);
-  result = nullableInt64ElemAt1(p2);
-  Expect.isNotNull(result);
-  p2.free();
-}
-
-typedef NativeFloatPointerToBool = ffi.Uint8 Function(ffi.Pointer<ffi.Float>);
-typedef FloatPointerToBool = int Function(ffi.Pointer<ffi.Float>);
-
-void testFloatRounding() {
-  FloatPointerToBool isRoughly1337 = ffiTestFunctions.lookupFunction<
-      NativeFloatPointerToBool, FloatPointerToBool>("IsRoughly1337");
-
-  ffi.Pointer<ffi.Float> p2 = ffi.allocate();
-  p2.store(1337.0);
-
-  int result = isRoughly1337(p2);
-  Expect.equals(1, result);
-
-  p2.free();
-}
diff --git a/tests/standalone_2/ffi/static_checks_test.dart b/tests/standalone_2/ffi/static_checks_test.dart
deleted file mode 100644
index 422fc6f..0000000
--- a/tests/standalone_2/ffi/static_checks_test.dart
+++ /dev/null
@@ -1,365 +0,0 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-//
-// Dart test program for testing dart:ffi extra checks
-
-library FfiTest;
-
-import 'dart:ffi' as ffi;
-
-void main() {
-  testGetGeneric();
-  testGetGeneric2();
-  testGetVoid();
-  testGetNativeFunction();
-  testGetNativeType();
-  testGetTypeMismatch();
-  testSetGeneric();
-  testSetGeneric2();
-  testSetVoid();
-  testSetNativeFunction();
-  testSetNativeType();
-  testSetTypeMismatch();
-  testAsFunctionGeneric();
-  testAsFunctionGeneric2();
-  testAsFunctionWrongNativeFunctionSignature();
-  testAsFunctionTypeMismatch();
-  testFromFunctionGeneric();
-  testFromFunctionGeneric2();
-  testFromFunctionWrongNativeFunctionSignature();
-  testFromFunctionTypeMismatch();
-  testFromFunctionClosure();
-  testFromFunctionTearOff();
-  testLookupFunctionGeneric();
-  testLookupFunctionGeneric2();
-  testLookupFunctionWrongNativeFunctionSignature();
-  testLookupFunctionTypeMismatch();
-  testNativeFunctionSignatureInvalidReturn();
-  testNativeFunctionSignatureInvalidParam();
-  testNativeFunctionSignatureInvalidOptionalNamed();
-  testNativeFunctionSignatureInvalidOptionalPositional();
-}
-
-typedef Int8UnOp = ffi.Int8 Function(ffi.Int8);
-typedef IntUnOp = int Function(int);
-
-void testGetGeneric() {
-  int generic(ffi.Pointer p) {
-    int result;
-    result = p.load<int>(); //# 20: compile-time error
-    return result;
-  }
-
-  ffi.Pointer<ffi.Int8> p = ffi.allocate();
-  p.store(123);
-  ffi.Pointer loseType = p;
-  generic(loseType);
-  p.free();
-}
-
-void testGetGeneric2() {
-  T generic<T extends Object>() {
-    ffi.Pointer<ffi.Int8> p = ffi.allocate();
-    p.store(123);
-    T result;
-    result = p.load<T>(); //# 21: compile-time error
-    p.free();
-    return result;
-  }
-
-  generic<int>();
-}
-
-void testGetVoid() {
-  ffi.Pointer<ffi.IntPtr> p1 = ffi.allocate();
-  ffi.Pointer<ffi.Void> p2 = p1.cast();
-
-  p2.load<int>(); //# 22: compile-time error
-
-  p1.free();
-}
-
-void testGetNativeFunction() {
-  ffi.Pointer<ffi.NativeFunction<Int8UnOp>> p = ffi.fromAddress(1337);
-  IntUnOp f = p.load(); //# 23: compile-time error
-}
-
-void testGetNativeType() {
-  // Is it possible to obtain a ffi.Pointer<ffi.NativeType> at all?
-}
-
-void testGetTypeMismatch() {
-  ffi.Pointer<ffi.Pointer<ffi.Int16>> p = ffi.allocate();
-  ffi.Pointer<ffi.Int16> typedNull = null;
-  p.store(typedNull);
-
-  // this fails to compile due to type mismatch
-  ffi.Pointer<ffi.Int8> p2 = p.load(); //# 25: compile-time error
-
-  p.free();
-}
-
-void testSetGeneric() {
-  void generic(ffi.Pointer p) {
-    p.store(123); //# 26: compile-time error
-  }
-
-  ffi.Pointer<ffi.Int8> p = ffi.allocate();
-  p.store(123);
-  ffi.Pointer loseType = p;
-  generic(loseType);
-  p.free();
-}
-
-void testSetGeneric2() {
-  void generic<T extends Object>(T arg) {
-    ffi.Pointer<ffi.Int8> p = ffi.allocate();
-    p.store(arg); //# 27: compile-time error
-    p.free();
-  }
-
-  generic<int>(123);
-}
-
-void testSetVoid() {
-  ffi.Pointer<ffi.IntPtr> p1 = ffi.allocate();
-  ffi.Pointer<ffi.Void> p2 = p1.cast();
-
-  p2.store(1234); //# 28: compile-time error
-
-  p1.free();
-}
-
-void testSetNativeFunction() {
-  ffi.Pointer<ffi.NativeFunction<Int8UnOp>> p = ffi.fromAddress(1337);
-  IntUnOp f = (a) => a + 1;
-  p.store(f); //# 29: compile-time error
-}
-
-void testSetNativeType() {
-  // Is it possible to obtain a ffi.Pointer<ffi.NativeType> at all?
-}
-
-void testSetTypeMismatch() {
-  // the pointer to pointer types must match up
-  ffi.Pointer<ffi.Int8> pHelper = ffi.allocate();
-  pHelper.store(123);
-
-  ffi.Pointer<ffi.Pointer<ffi.Int16>> p = ffi.allocate();
-
-  // this fails to compile due to type mismatch
-  p.store(pHelper); //# 40: compile-time error
-
-  pHelper.free();
-  p.free();
-}
-
-void testAsFunctionGeneric() {
-  T generic<T extends Function>() {
-    ffi.Pointer<ffi.NativeFunction<Int8UnOp>> p = ffi.fromAddress(1337);
-    Function f;
-    f = p.asFunction<T>(); //# 11: compile-time error
-    return f;
-  }
-
-  generic<IntUnOp>();
-}
-
-void testAsFunctionGeneric2() {
-  generic(ffi.Pointer<ffi.NativeFunction> p) {
-    Function f;
-    f = p.asFunction<IntUnOp>(); //# 12: compile-time error
-    return f;
-  }
-
-  ffi.Pointer<ffi.NativeFunction<Int8UnOp>> p = ffi.fromAddress(1337);
-  generic(p);
-}
-
-void testAsFunctionWrongNativeFunctionSignature() {
-  ffi.Pointer<ffi.NativeFunction<IntUnOp>> p;
-  Function f = p.asFunction<IntUnOp>(); //# 13: compile-time error
-}
-
-typedef IntBinOp = int Function(int, int);
-
-void testAsFunctionTypeMismatch() {
-  ffi.Pointer<ffi.NativeFunction<Int8UnOp>> p = ffi.fromAddress(1337);
-  IntBinOp f = p.asFunction(); //# 14: compile-time error
-}
-
-typedef NativeDoubleUnOp = ffi.Double Function(ffi.Double);
-typedef DoubleUnOp = double Function(double);
-
-double myTimesThree(double d) => d * 3;
-
-int myTimesFour(int i) => i * 4;
-
-void testFromFunctionGeneric() {
-  ffi.Pointer<ffi.NativeFunction> generic<T extends Function>(T f) {
-    ffi.Pointer<ffi.NativeFunction<NativeDoubleUnOp>> result;
-    result = ffi.fromFunction(f); //# 70: compile-time error
-    return result;
-  }
-
-  generic(myTimesThree);
-}
-
-void testFromFunctionGeneric2() {
-  ffi.Pointer<ffi.NativeFunction<T>> generic<T extends Function>() {
-    ffi.Pointer<ffi.NativeFunction<T>> result;
-    result = ffi.fromFunction(myTimesThree); //# 71: compile-time error
-    return result;
-  }
-
-  generic<NativeDoubleUnOp>();
-}
-
-void testFromFunctionWrongNativeFunctionSignature() {
-  ffi.fromFunction<IntUnOp>(myTimesFour); //# 72: compile-time error
-}
-
-void testFromFunctionTypeMismatch() {
-  ffi.Pointer<ffi.NativeFunction<NativeDoubleUnOp>> p;
-  p = ffi.fromFunction(myTimesFour); //# 73: compile-time error
-}
-
-void testFromFunctionClosure() {
-  DoubleUnOp someClosure = (double z) => z / 27.0;
-  ffi.Pointer<ffi.NativeFunction<NativeDoubleUnOp>> p;
-  p = ffi.fromFunction(someClosure); //# 74: compile-time error
-}
-
-class X {
-  double tearoff(double d) => d / 27.0;
-}
-
-DoubleUnOp fld = null;
-
-void testFromFunctionTearOff() {
-  fld = X().tearoff;
-  ffi.Pointer<ffi.NativeFunction<NativeDoubleUnOp>> p;
-  p = ffi.fromFunction(fld); //# 75: compile-time error
-}
-
-void testLookupFunctionGeneric() {
-  Function generic<T extends Function>() {
-    ffi.DynamicLibrary l = ffi.DynamicLibrary.open("ffi_test_dynamic_library");
-    Function result;
-    result = l.lookupFunction<T, DoubleUnOp>("cos"); //# 15: compile-time error
-    return result;
-  }
-
-  generic<NativeDoubleUnOp>();
-}
-
-void testLookupFunctionGeneric2() {
-  Function generic<T extends Function>() {
-    ffi.DynamicLibrary l = ffi.DynamicLibrary.open("ffi_test_dynamic_library");
-    Function result;
-    result = //# 16: compile-time error
-        l.lookupFunction<NativeDoubleUnOp, T>("cos"); //# 16: compile-time error
-    return result;
-  }
-
-  generic<DoubleUnOp>();
-}
-
-void testLookupFunctionWrongNativeFunctionSignature() {
-  ffi.DynamicLibrary l = ffi.DynamicLibrary.open("ffi_test_dynamic_library");
-  l.lookupFunction<IntUnOp, IntUnOp>("cos"); //# 17: compile-time error
-}
-
-void testLookupFunctionTypeMismatch() {
-  ffi.DynamicLibrary l = ffi.DynamicLibrary.open("ffi_test_dynamic_library");
-  l.lookupFunction<NativeDoubleUnOp, IntUnOp>("cos"); //# 18: compile-time error
-}
-
-// TODO(dacoharkes): make the next 4 test compile errors
-typedef Invalid1 = int Function(ffi.Int8);
-typedef Invalid2 = ffi.Int8 Function(int);
-typedef Invalid3 = ffi.Int8 Function({ffi.Int8 named});
-typedef Invalid4 = ffi.Int8 Function([ffi.Int8 positional]);
-
-void testNativeFunctionSignatureInvalidReturn() {
-  // ffi.Pointer<ffi.NativeFunction<Invalid1>> p = ffi.fromAddress(999);
-}
-
-void testNativeFunctionSignatureInvalidParam() {
-  // ffi.Pointer<ffi.NativeFunction<Invalid2>> p = ffi.fromAddress(999);
-}
-
-void testNativeFunctionSignatureInvalidOptionalNamed() {
-  // ffi.Pointer<ffi.NativeFunction<Invalid3>> p = ffi.fromAddress(999);
-}
-
-void testNativeFunctionSignatureInvalidOptionalPositional() {
-  // ffi.Pointer<ffi.NativeFunction<Invalid4>> p = ffi.fromAddress(999);
-}
-
-// error on missing field annotation
-@ffi.struct
-class TestStruct extends ffi.Pointer<ffi.Void> {
-  @ffi.Double()
-  double x;
-
-  double y; //# 50: compile-time error
-}
-
-// error on missing struct annotation
-class TestStruct2 extends ffi.Pointer<ffi.Void> {
-  @ffi.Double() //# 51: compile-time error
-  double x; //# 51: compile-time error
-}
-
-// error on missing annotation on subtype
-@ffi.struct
-class TestStruct3 extends TestStruct {
-  double z; //# 52: compile-time error
-}
-
-// error on double annotation
-@ffi.struct
-class TestStruct4 extends ffi.Pointer<ffi.Void> {
-  @ffi.Double()
-  @ffi.Double() //# 53: compile-time error
-  double z;
-}
-
-// error on annotation not matching up
-@ffi.struct
-class TestStruct5 extends ffi.Pointer<ffi.Void> {
-  @ffi.Int64() //# 54: compile-time error
-  double z; //# 54: compile-time error
-}
-
-// error on annotation not matching up
-@ffi.struct
-class TestStruct6 extends ffi.Pointer<ffi.Void> {
-  @ffi.Void() //# 55: compile-time error
-  double z; //# 55: compile-time error
-}
-
-// error on annotation not matching up
-@ffi.struct
-class TestStruct7 extends ffi.Pointer<ffi.Void> {
-  @ffi.NativeType() //# 56: compile-time error
-  double z; //# 56: compile-time error
-}
-
-// error on field initializer on field
-@ffi.struct
-class TestStruct8 extends ffi.Pointer<ffi.Void> {
-  @ffi.Double() //# 57: compile-time error
-  double z = 10.0; //# 57: compile-time error
-}
-
-// error on field initializer in constructor
-@ffi.struct
-class TestStruct9 extends ffi.Pointer<ffi.Void> {
-  @ffi.Double()
-  double z;
-
-  TestStruct9() : z = 0.0 {} //# 58: compile-time error
-}
diff --git a/tests/standalone_2/ffi/subtype_test.dart b/tests/standalone_2/ffi/subtype_test.dart
deleted file mode 100644
index fd04b50..0000000
--- a/tests/standalone_2/ffi/subtype_test.dart
+++ /dev/null
@@ -1,19 +0,0 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-//
-// Dart test program for testing dart:ffi Pointer subtypes.
-
-library FfiTest;
-
-import "package:expect/expect.dart";
-
-import 'cstring.dart';
-
-void main() {
-  CString cs = CString.toUtf8("hello world!");
-
-  Expect.equals("hello world!", cs.fromUtf8());
-
-  cs.free();
-}
diff --git a/tests/standalone_2/fragmentation_typed_data_test.dart b/tests/standalone_2/fragmentation_typed_data_test.dart
new file mode 100644
index 0000000..470aaad
--- /dev/null
+++ b/tests/standalone_2/fragmentation_typed_data_test.dart
@@ -0,0 +1,33 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// See fragmentation_test.dart for more information.
+//
+// VMOptions=--no_concurrent_mark --no_concurrent_sweep
+// VMOptions=--no_concurrent_mark --concurrent_sweep
+// VMOptions=--no_concurrent_mark --use_compactor
+// VMOptions=--no_concurrent_mark --use_compactor --force_evacuation
+// VMOptions=--concurrent_mark --no_concurrent_sweep
+// VMOptions=--concurrent_mark --concurrent_sweep
+// VMOptions=--concurrent_mark --use_compactor
+// VMOptions=--concurrent_mark --use_compactor --force_evacuation
+
+import 'dart:typed_data';
+
+main() {
+  final List<List> arrays = [];
+  // Fill up heap with alternate large-small items.
+  for (int i = 0; i < 500000; i++) {
+    arrays.add(new Uint32List(260));
+    arrays.add(new Uint32List(1));
+  }
+  // Clear the large items so the heap has large gaps.
+  for (int i = 0; i < arrays.length; i += 2) {
+    arrays[i] = null;
+  }
+  // Allocate a lot of large items which don't fit in the gaps created above.
+  for (int i = 0; i < 600000; i++) {
+    arrays.add(new Uint32List(300));
+  }
+}
diff --git a/tests/standalone_2/http_launch_test.dart b/tests/standalone_2/http_launch_test.dart
index 9717974..cb97f84 100644
--- a/tests/standalone_2/http_launch_test.dart
+++ b/tests/standalone_2/http_launch_test.dart
@@ -24,6 +24,9 @@
 import 'package:expect/expect.dart';
 
 String pathToExecutable = Platform.executable;
+List<String> executableArguments = Platform.executableArguments
+    .where((arg) => !arg.startsWith('--packages='))
+    .toList();
 Uri pathOfData = Platform.script.resolve('http_launch_data/');
 int port;
 
@@ -50,16 +53,29 @@
 serverRunning(HttpServer server) {
   port = server.port;
   server.listen(handleRequest);
-  Future<ProcessResult> no_http_run = Process.run(pathToExecutable,
-      [pathOfData.resolve('http_launch_main.dart').toFilePath()]);
-  Future<ProcessResult> http_run = Process
-      .run(pathToExecutable, ['http://127.0.0.1:$port/http_launch_main.dart']);
-  Future<ProcessResult> http_pkg_root_run = Process.run(pathToExecutable, [
-    '--package-root=http://127.0.0.1:$port/the_packages/',
-    'http://127.0.0.1:$port/http_launch_main.dart'
-  ]);
-  Future<ProcessResult> isolate_run = Process.run(pathToExecutable,
-      ['http://127.0.0.1:$port/http_spawn_main.dart', '$port']);
+  Future<ProcessResult> no_http_run = Process.run(
+      pathToExecutable,
+      []
+        ..addAll(executableArguments)
+        ..add(pathOfData.resolve('http_launch_main.dart').toFilePath()));
+  Future<ProcessResult> http_run = Process.run(
+      pathToExecutable,
+      []
+        ..addAll(executableArguments)
+        ..add('http://127.0.0.1:$port/http_launch_main.dart'));
+  Future<ProcessResult> http_pkg_root_run = Process.run(
+      pathToExecutable,
+      []
+        ..addAll(executableArguments)
+        ..addAll([
+          '--package-root=http://127.0.0.1:$port/the_packages/',
+          'http://127.0.0.1:$port/http_launch_main.dart'
+        ]));
+  Future<ProcessResult> isolate_run = Process.run(
+      pathToExecutable,
+      []
+        ..addAll(executableArguments)
+        ..addAll(['http://127.0.0.1:$port/http_spawn_main.dart', '$port']));
   Future<List<ProcessResult>> results =
       Future.wait([no_http_run, http_run, http_pkg_root_run, isolate_run]);
   results.then((results) {
diff --git a/tests/standalone_2/io/addlatexhash_test.dart b/tests/standalone_2/io/addlatexhash_test.dart
index 6465852..fe8c166 100755
--- a/tests/standalone_2/io/addlatexhash_test.dart
+++ b/tests/standalone_2/io/addlatexhash_test.dart
@@ -92,7 +92,7 @@
 
   // actions to take
   runAddHash() {
-    var args = packageOptions();
+    var args = <String>[]..addAll(Platform.executableArguments);
     args.addAll([
       path.join(dartRootPath, "tools", "addlatexhash.dart"),
       tmpPar8timesPath,
diff --git a/tests/standalone_2/io/dart_std_io_pipe_test.dart b/tests/standalone_2/io/dart_std_io_pipe_test.dart
index 474e5a8..82ffa31 100644
--- a/tests/standalone_2/io/dart_std_io_pipe_test.dart
+++ b/tests/standalone_2/io/dart_std_io_pipe_test.dart
@@ -39,7 +39,7 @@
   String redirectOutFile = "${dir.path}/redirect";
   String executable = Platform.executable;
   List<String> args = [
-    executable,
+    ([executable]..addAll(Platform.executableArguments)).join(' '),
     dartScript,
     type,
     pipeOutFile,
diff --git a/tests/standalone_2/io/entrypoints_verification_test.dart b/tests/standalone_2/io/entrypoints_verification_test.dart
deleted file mode 100644
index cf12ac1..0000000
--- a/tests/standalone_2/io/entrypoints_verification_test.dart
+++ /dev/null
@@ -1,89 +0,0 @@
-// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-//
-// VMOptions=--verify-entry-points=true
-
-import 'dart:io';
-import 'dart:convert';
-import 'dart:math';
-import 'package:path/path.dart';
-import 'package:expect/expect.dart';
-import 'dart-ext:entrypoints_verification_test_extension';
-
-void RunTest() native "RunTest";
-
-main() {
-  RunTest();
-
-  new C();
-  new D();
-}
-
-class C {}
-
-@pragma("vm:entry-point")
-class D {
-  D();
-
-  @pragma("vm:entry-point")
-  D.defined();
-
-  @pragma("vm:entry-point")
-  factory D.fact() => E.ctor();
-
-  void fn0() {}
-
-  @pragma("vm:entry-point")
-  void fn1() {}
-
-  static void fn2() {}
-
-  @pragma("vm:entry-point")
-  static void fn3() {}
-
-  void Function() fld0;
-
-  @pragma("vm:entry-point")
-  void Function() fld1;
-
-  @pragma("vm:entry-point", "get")
-  void Function() fld2;
-
-  @pragma("vm:entry-point", "set")
-  void Function() fld3;
-}
-
-void fn0() {}
-
-@pragma("vm:entry-point")
-void fn1() {}
-
-class E extends D {
-  E.ctor();
-}
-
-@pragma("vm:entry-point")
-class F {
-  static void Function() fld0;
-
-  @pragma("vm:entry-point")
-  static void Function() fld1;
-
-  @pragma("vm:entry-point", "get")
-  static void Function() fld2;
-
-  @pragma("vm:entry-point", "set")
-  static void Function() fld3;
-}
-
-void Function() fld0;
-
-@pragma("vm:entry-point")
-void Function() fld1;
-
-@pragma("vm:entry-point", "get")
-void Function() fld2;
-
-@pragma("vm:entry-point", "set")
-void Function() fld3;
diff --git a/tests/standalone_2/io/file_read_special_device_test.dart b/tests/standalone_2/io/file_read_special_device_test.dart
index ca6b870..fcfd9cb 100644
--- a/tests/standalone_2/io/file_read_special_device_test.dart
+++ b/tests/standalone_2/io/file_read_special_device_test.dart
@@ -12,7 +12,10 @@
   script = Platform.script.resolve(script).toFilePath();
   var executable = Platform.executable;
   var file = script; // Use script as file.
-  Process.start("bash", ["-c", "$executable $script < $file"]).then((process) {
+  Process.start("bash", [
+    "-c",
+    "$executable ${Platform.executableArguments.join(' ')} $script < $file"
+  ]).then((process) {
     process.exitCode.then((exitCode) {
       Expect.equals(0, exitCode);
     });
diff --git a/tests/standalone_2/io/http_client_stays_alive_test.dart b/tests/standalone_2/io/http_client_stays_alive_test.dart
index 8666bb8..37af33a 100644
--- a/tests/standalone_2/io/http_client_stays_alive_test.dart
+++ b/tests/standalone_2/io/http_client_stays_alive_test.dart
@@ -20,16 +20,6 @@
 const SECONDS = 4;
 const SLACK = 60;
 
-List<String> packageOptions() {
-  if (Platform.packageRoot != null) {
-    return <String>['--package-root=${Platform.packageRoot}'];
-  } else if (Platform.packageConfig != null) {
-    return <String>['--packages=${Platform.packageConfig}'];
-  } else {
-    return <String>[];
-  }
-}
-
 void runServerProcess() {
   asyncStart();
   HttpServer.bind('127.0.0.1', 0).then((server) {
@@ -47,7 +37,10 @@
     var script = Platform.script
         .resolve('http_client_stays_alive_test.dart')
         .toFilePath();
-    var arguments = packageOptions()..add(script)..add(url);
+    var arguments = <String>[]
+      ..addAll(Platform.executableArguments)
+      ..add(script)
+      ..add(url);
     Process.run(Platform.executable, arguments).then((res) {
       subscription.cancel();
       if (res.exitCode != 0) {
diff --git a/tests/standalone_2/io/http_server_close_response_after_error_test.dart b/tests/standalone_2/io/http_server_close_response_after_error_test.dart
index 9230177..eb45423a 100644
--- a/tests/standalone_2/io/http_server_close_response_after_error_test.dart
+++ b/tests/standalone_2/io/http_server_close_response_after_error_test.dart
@@ -20,10 +20,15 @@
         request.response.close();
       });
     });
-    Process.run(Platform.executable, [
-      Platform.script.resolve(CLIENT_SCRIPT).toString(),
-      server.port.toString()
-    ]).then((result) {
+    Process.run(
+            Platform.executable,
+            []
+              ..addAll(Platform.executableArguments)
+              ..addAll([
+                Platform.script.resolve(CLIENT_SCRIPT).toString(),
+                server.port.toString()
+              ]))
+        .then((result) {
       if (result.exitCode != 0) throw "Bad exit code";
       server.close();
     });
diff --git a/tests/standalone_2/io/https_unauthorized_test.dart b/tests/standalone_2/io/https_unauthorized_test.dart
index 2952afd..ea172be 100644
--- a/tests/standalone_2/io/https_unauthorized_test.dart
+++ b/tests/standalone_2/io/https_unauthorized_test.dart
@@ -31,8 +31,7 @@
   ..setTrustedCertificates(localFile('certificates/trusted_certs.pem'));
 
 Future<HttpServer> runServer() {
-  return HttpServer
-      .bindSecure(HOST_NAME, 0, untrustedServerContext, backlog: 5)
+  return HttpServer.bindSecure(HOST_NAME, 0, untrustedServerContext, backlog: 5)
       .then((server) {
     server.listen((HttpRequest request) {
       request.listen((_) {}, onDone: () {
@@ -48,9 +47,12 @@
 void main() {
   var clientScript = localFile('https_unauthorized_client.dart');
   Future clientProcess(int port) {
-    return Process
-        .run(Platform.executable, [clientScript, port.toString()]).then(
-            (ProcessResult result) {
+    return Process.run(
+            Platform.executable,
+            []
+              ..addAll(Platform.executableArguments)
+              ..addAll([clientScript, port.toString()]))
+        .then((ProcessResult result) {
       if (result.exitCode != 0 || !result.stdout.contains('SUCCESS')) {
         print("Client failed");
         print("  stdout:");
diff --git a/tests/standalone_2/io/named_pipe_script_test.dart b/tests/standalone_2/io/named_pipe_script_test.dart
index 8232581..932b46c 100644
--- a/tests/standalone_2/io/named_pipe_script_test.dart
+++ b/tests/standalone_2/io/named_pipe_script_test.dart
@@ -30,7 +30,11 @@
   }
 
   StringBuffer output = new StringBuffer();
-  Process process = await Process.start(Platform.executable, [stdinPipePath]);
+  Process process = await Process.start(
+      Platform.executable,
+      []
+        ..addAll(Platform.executableArguments)
+        ..add(stdinPipePath));
   bool stdinWriteFailed = false;
   process.stdout.transform(utf8.decoder).listen(output.write);
   process.stderr.transform(utf8.decoder).listen((data) {
diff --git a/tests/standalone_2/io/namespace_test.dart b/tests/standalone_2/io/namespace_test.dart
index 73ab607..601278f 100644
--- a/tests/standalone_2/io/namespace_test.dart
+++ b/tests/standalone_2/io/namespace_test.dart
@@ -180,16 +180,6 @@
   Expect.equals(FileSystemEntityType.directory, dirstat.type);
 }
 
-List<String> packageOptions() {
-  if (Platform.packageRoot != null) {
-    return <String>["--package-root=${Platform.packageRoot}"];
-  } else if (Platform.packageConfig != null) {
-    return <String>["--packages=${Platform.packageConfig}"];
-  } else {
-    return <String>[];
-  }
-}
-
 void setupTest() {
   // Create a namespace in /tmp.
   Directory namespace = Directory.systemTemp.createTempSync("namespace");
@@ -202,7 +192,7 @@
       ..writeAsStringSync(file1str);
 
     // Run the test and capture stdout.
-    var args = packageOptions();
+    var args = <String>[]..addAll(Platform.executableArguments);
     args.addAll([
       "--namespace=${namespace.path}",
       Platform.script.toFilePath(),
diff --git a/tests/standalone_2/io/print_sync_test.dart b/tests/standalone_2/io/print_sync_test.dart
index c195431..c23df59 100644
--- a/tests/standalone_2/io/print_sync_test.dart
+++ b/tests/standalone_2/io/print_sync_test.dart
@@ -11,9 +11,13 @@
 
 void main() {
   asyncStart();
-  Process.run(Platform.executable, [
-    Platform.script.resolve('print_sync_script.dart').toFilePath()
-  ]).then((out) {
+  Process.run(
+          Platform.executable,
+          []
+            ..addAll(Platform.executableArguments)
+            ..add(
+                Platform.script.resolve('print_sync_script.dart').toFilePath()))
+      .then((out) {
     asyncEnd();
     Expect.equals(1002, out.stdout.split('\n').length);
   });
diff --git a/tests/standalone_2/io/process_check_arguments_test.dart b/tests/standalone_2/io/process_check_arguments_test.dart
index d0e2c9b..c79c00e 100644
--- a/tests/standalone_2/io/process_check_arguments_test.dart
+++ b/tests/standalone_2/io/process_check_arguments_test.dart
@@ -7,7 +7,8 @@
 import "process_test_util.dart";
 
 test(args) {
-  var future = Process.start(Platform.executable, args);
+  var future = Process.start(Platform.executable,
+      []..addAll(Platform.executableArguments)..addAll(args));
   future.then((process) {
     process.exitCode.then((exitCode) {
       Expect.equals(0, exitCode);
diff --git a/tests/standalone_2/io/process_detached_test.dart b/tests/standalone_2/io/process_detached_test.dart
index ee093b3..b6b59e7 100644
--- a/tests/standalone_2/io/process_detached_test.dart
+++ b/tests/standalone_2/io/process_detached_test.dart
@@ -18,7 +18,11 @@
   asyncStart();
   var script =
       Platform.script.resolve('process_detached_script.dart').toFilePath();
-  var future = Process.start(Platform.executable, [script],
+  var future = Process.start(
+      Platform.executable,
+      []
+        ..addAll(Platform.executableArguments)
+        ..add(script),
       mode: ProcessStartMode.detached);
   future.then((process) {
     Expect.isNotNull(process.pid);
@@ -37,7 +41,8 @@
   asyncStart();
   var script =
       Platform.script.resolve('process_detached_script.dart').toFilePath();
-  var future = Process.start(Platform.executable, [script, 'echo'],
+  var future = Process.start(Platform.executable,
+      []..addAll(Platform.executableArguments)..addAll([script, 'echo']),
       mode: ProcessStartMode.detachedWithStdio);
   future.then((process) {
     Expect.isNotNull(process.pid);
diff --git a/tests/standalone_2/io/process_environment_test.dart b/tests/standalone_2/io/process_environment_test.dart
index dd656b2..ca56130 100644
--- a/tests/standalone_2/io/process_environment_test.dart
+++ b/tests/standalone_2/io/process_environment_test.dart
@@ -16,8 +16,8 @@
   if (!new File(printEnv).existsSync()) {
     printEnv = '../$printEnv';
   }
-  Process
-      .run(dartExecutable, [printEnv, name],
+  Process.run(dartExecutable,
+          []..addAll(Platform.executableArguments)..addAll([printEnv, name]),
           environment: environment, includeParentEnvironment: includeParent)
       .then((result) {
     if (result.exitCode != 0) {
diff --git a/tests/standalone_2/io/process_inherit_stdio_script.dart b/tests/standalone_2/io/process_inherit_stdio_script.dart
index 0fa1e0b..c771dab 100644
--- a/tests/standalone_2/io/process_inherit_stdio_script.dart
+++ b/tests/standalone_2/io/process_inherit_stdio_script.dart
@@ -17,7 +17,11 @@
   asyncStart();
   var script =
       Platform.script.resolve('process_inherit_stdio_script.dart').toFilePath();
-  var future = Process.start(Platform.executable, [script, "--child", "foo"],
+  var future = Process.start(
+      Platform.executable,
+      []
+        ..addAll(Platform.executableArguments)
+        ..addAll([script, "--child", "foo"]),
       mode: ProcessStartMode.inheritStdio);
   future.then((process) {
     process.exitCode.then((c) {
diff --git a/tests/standalone_2/io/process_inherit_stdio_test.dart b/tests/standalone_2/io/process_inherit_stdio_test.dart
index 090132a..964440f 100644
--- a/tests/standalone_2/io/process_inherit_stdio_test.dart
+++ b/tests/standalone_2/io/process_inherit_stdio_test.dart
@@ -22,7 +22,8 @@
   // of the process spawned here, we should see it.
   var script =
       Platform.script.resolve('process_inherit_stdio_script.dart').toFilePath();
-  var future = Process.start(Platform.executable, [script, "foo"]);
+  var future = Process.start(Platform.executable,
+      []..addAll(Platform.executableArguments)..addAll([script, "foo"]));
   Completer<String> s = new Completer();
   future.then((process) {
     StringBuffer buf = new StringBuffer();
diff --git a/tests/standalone_2/io/process_non_ascii_test.dart b/tests/standalone_2/io/process_non_ascii_test.dart
index 0f1a592..fd08f06 100644
--- a/tests/standalone_2/io/process_non_ascii_test.dart
+++ b/tests/standalone_2/io/process_non_ascii_test.dart
@@ -28,7 +28,11 @@
   var script = nonAsciiFile.path;
   // Note: we prevent this child process from using Crashpad handler because
   // this introduces an issue with deleting the temporary directory.
-  Process.run(executable, [script],
+  Process.run(
+      executable,
+      []
+        ..addAll(Platform.executableArguments)
+        ..add(script),
       workingDirectory: nonAsciiDir.path,
       environment: {'DART_CRASHPAD_HANDLER': ''}).then((result) {
     Expect.equals(0, result.exitCode);
diff --git a/tests/standalone_2/io/process_run_output_test.dart b/tests/standalone_2/io/process_run_output_test.dart
index e5466c2..11b111a 100644
--- a/tests/standalone_2/io/process_run_output_test.dart
+++ b/tests/standalone_2/io/process_run_output_test.dart
@@ -35,20 +35,18 @@
     enc = null;
   }
 
+  var args = <String>[]
+    ..addAll(Platform.executableArguments)
+    ..addAll([scriptFile, encoding, stream]);
+
   if (stream == 'stdout') {
-    Process
-        .run(Platform.executable, [scriptFile, encoding, stream],
-            stdoutEncoding: enc)
-        .then((result) {
+    Process.run(Platform.executable, args, stdoutEncoding: enc).then((result) {
       Expect.equals(result.exitCode, 0);
       Expect.equals(result.stderr, '');
       checkOutput(encoding, result.stdout);
     });
   } else {
-    Process
-        .run(Platform.executable, [scriptFile, encoding, stream],
-            stderrEncoding: enc)
-        .then((result) {
+    Process.run(Platform.executable, args, stderrEncoding: enc).then((result) {
       Expect.equals(result.exitCode, 0);
       Expect.equals(result.stdout, '');
       checkOutput(encoding, result.stderr);
diff --git a/tests/standalone_2/io/process_set_exit_code_test.dart b/tests/standalone_2/io/process_set_exit_code_test.dart
index e8d9e45..b8c7e12 100644
--- a/tests/standalone_2/io/process_set_exit_code_test.dart
+++ b/tests/standalone_2/io/process_set_exit_code_test.dart
@@ -16,7 +16,12 @@
   var executable = Platform.executable;
   var exitCodeScript =
       Platform.script.resolve('process_set_exit_code_script.dart').toFilePath();
-  Process.run(executable, [exitCodeScript]).then((result) {
+  Process.run(
+          executable,
+          []
+            ..addAll(Platform.executableArguments)
+            ..add(exitCodeScript))
+      .then((result) {
     Expect.equals("standard out", result.stdout);
     Expect.equals("standard error", result.stderr);
     Expect.equals(25, result.exitCode);
diff --git a/tests/standalone_2/io/process_shell_test.dart b/tests/standalone_2/io/process_shell_test.dart
index e9113d8..5c766b0 100644
--- a/tests/standalone_2/io/process_shell_test.dart
+++ b/tests/standalone_2/io/process_shell_test.dart
@@ -14,8 +14,13 @@
   test(args) {
     asyncStart();
     var script = Platform.script.resolve("process_echo_util.dart").toFilePath();
-    Process
-        .run(Platform.executable, [script]..addAll(args), runInShell: true)
+    Process.run(
+            Platform.executable,
+            []
+              ..addAll(Platform.executableArguments)
+              ..add(script)
+              ..addAll(args),
+            runInShell: true)
         .then((process_result) {
       var result;
       if (Platform.operatingSystem == "windows") {
diff --git a/tests/standalone_2/io/process_stderr_test.dart b/tests/standalone_2/io/process_stderr_test.dart
index 3ea157a..0492fe2 100644
--- a/tests/standalone_2/io/process_stderr_test.dart
+++ b/tests/standalone_2/io/process_stderr_test.dart
@@ -67,5 +67,11 @@
         new File("../tests/standalone_2/io/process_std_io_script.dart");
   }
   Expect.isTrue(scriptFile.existsSync());
-  test(Process.start(Platform.executable, [scriptFile.path, "1"]), 0);
+  test(
+      Process.start(
+          Platform.executable,
+          []
+            ..addAll(Platform.executableArguments)
+            ..addAll([scriptFile.path, "1"])),
+      0);
 }
diff --git a/tests/standalone_2/io/process_stdin_transform_unsubscribe_test.dart b/tests/standalone_2/io/process_stdin_transform_unsubscribe_test.dart
index f52f9e0..fa36a06 100644
--- a/tests/standalone_2/io/process_stdin_transform_unsubscribe_test.dart
+++ b/tests/standalone_2/io/process_stdin_transform_unsubscribe_test.dart
@@ -38,5 +38,11 @@
     scriptFile = new File("../tests/standalone_2/io/$scriptName");
   }
   Expect.isTrue(scriptFile.existsSync());
-  test(Process.start(Platform.executable, [scriptFile.path]), 0);
+  test(
+      Process.start(
+          Platform.executable,
+          []
+            ..addAll(Platform.executableArguments)
+            ..add(scriptFile.path)),
+      0);
 }
diff --git a/tests/standalone_2/io/process_stdout_test.dart b/tests/standalone_2/io/process_stdout_test.dart
index d492996..7d3bc7f 100644
--- a/tests/standalone_2/io/process_stdout_test.dart
+++ b/tests/standalone_2/io/process_stdout_test.dart
@@ -65,5 +65,11 @@
         new File("../tests/standalone_2/io/process_std_io_script.dart");
   }
   Expect.isTrue(scriptFile.existsSync());
-  test(Process.start(Platform.executable, [scriptFile.path, "0"]), 0);
+  test(
+      Process.start(
+          Platform.executable,
+          []
+            ..addAll(Platform.executableArguments)
+            ..addAll([scriptFile.path, "0"])),
+      0);
 }
diff --git a/tests/standalone_2/io/process_sync_test.dart b/tests/standalone_2/io/process_sync_test.dart
index e4fc82a..1d91dfc 100644
--- a/tests/standalone_2/io/process_sync_test.dart
+++ b/tests/standalone_2/io/process_sync_test.dart
@@ -13,13 +13,15 @@
   // Get the Dart script file that generates output.
   var scriptFile = new File(
       Platform.script.resolve("process_sync_script.dart").toFilePath());
-  var args = [
-    scriptFile.path,
-    blockCount.toString(),
-    stdoutBlockSize.toString(),
-    stderrBlockSize.toString(),
-    exitCode.toString()
-  ];
+  var args = <String>[]
+    ..addAll(Platform.executableArguments)
+    ..addAll([
+      scriptFile.path,
+      blockCount.toString(),
+      stdoutBlockSize.toString(),
+      stderrBlockSize.toString(),
+      exitCode.toString()
+    ]);
   ProcessResult syncResult = Process.runSync(Platform.executable, args);
   Expect.equals(blockCount * stdoutBlockSize, syncResult.stdout.length);
   Expect.equals(blockCount * stderrBlockSize, syncResult.stderr.length);
diff --git a/tests/standalone_2/io/regress_7191_test.dart b/tests/standalone_2/io/regress_7191_test.dart
index a68a800..8477956 100644
--- a/tests/standalone_2/io/regress_7191_test.dart
+++ b/tests/standalone_2/io/regress_7191_test.dart
@@ -21,7 +21,12 @@
   asyncStart();
   var executable = Platform.executable;
   var script = Platform.script.resolve('regress_7191_script.dart').toFilePath();
-  Process.start(executable, [script]).then((process) {
+  Process.start(
+          executable,
+          []
+            ..addAll(Platform.executableArguments)
+            ..add(script))
+      .then((process) {
     process.stdin.add([0]);
     process.stdout.listen((_) {}, onDone: () {
       process.stdin.add([0]);
diff --git a/tests/standalone_2/io/regress_7679_test.dart b/tests/standalone_2/io/regress_7679_test.dart
index 3577a8b..720e607 100644
--- a/tests/standalone_2/io/regress_7679_test.dart
+++ b/tests/standalone_2/io/regress_7679_test.dart
@@ -37,7 +37,11 @@
   String executable = new File(Platform.executable).resolveSymbolicLinksSync();
   // Note: we prevent this child process from using Crashpad handler because
   // this introduces an issue with deleting the temporary directory.
-  Process.run(executable, ['script.dart'],
+  Process.run(
+      executable,
+      []
+        ..addAll(Platform.executableArguments)
+        ..add('script.dart'),
       workingDirectory: temp.path,
       environment: {'DART_CRASHPAD_HANDLER': ''}).then((result) {
     temp.deleteSync(recursive: true);
diff --git a/tests/standalone_2/io/secure_socket_renegotiate_test.dart b/tests/standalone_2/io/secure_socket_renegotiate_test.dart
index e527da9..d10e743 100644
--- a/tests/standalone_2/io/secure_socket_renegotiate_test.dart
+++ b/tests/standalone_2/io/secure_socket_renegotiate_test.dart
@@ -4,6 +4,7 @@
 //
 // OtherResources=certificates/server_chain.pem
 // OtherResources=certificates/server_key.pem
+// OtherResources=secure_socket_renegotiate_client.dart
 
 // This test verifies that client certificates work, if the client and server
 // are in separate processes, and that connection renegotiation works, and
@@ -66,10 +67,10 @@
 void main() {
   runServer().then((SecureServerSocket server) {
     var clientScript =
-        Platform.script.toFilePath().replaceFirst("_test.dart", "_client.dart");
-    Expect.isTrue(clientScript.endsWith("_client.dart"));
+        Platform.script.resolve('secure_socket_renegotiate_client.dart').toFilePath();
     Process
-        .run(Platform.executable, [clientScript, server.port.toString()]).then(
+        .run(Platform.executable,
+        []..addAll(Platform.executableArguments)..addAll([clientScript, server.port.toString()])).then(
             (ProcessResult result) {
       if (result.exitCode != 0) {
         print("Client failed, stdout:");
diff --git a/tests/standalone_2/io/signals_test.dart b/tests/standalone_2/io/signals_test.dart
index 79e0ddf..13e0448 100644
--- a/tests/standalone_2/io/signals_test.dart
+++ b/tests/standalone_2/io/signals_test.dart
@@ -16,11 +16,16 @@
   if (usr1Send == null) usr1Send = usr1Expect;
   if (usr2Send == null) usr2Send = usr2Expect;
   asyncStart();
-  Process.start(Platform.executable, [
-    Platform.script.resolve('signals_test_script.dart').toFilePath(),
-    usr1Expect.toString(),
-    usr2Expect.toString()
-  ]).then((process) {
+  Process.start(
+          Platform.executable,
+          []
+            ..addAll(Platform.executableArguments)
+            ..addAll([
+              Platform.script.resolve('signals_test_script.dart').toFilePath(),
+              usr1Expect.toString(),
+              usr2Expect.toString()
+            ]))
+      .then((process) {
     process.stdin.close();
     process.stderr.drain();
     int v = 0;
@@ -45,10 +50,15 @@
 
 void testSignal(ProcessSignal signal) {
   asyncStart();
-  Process.start(Platform.executable, [
-    Platform.script.resolve('signal_test_script.dart').toFilePath(),
-    signal.toString()
-  ]).then((process) {
+  Process.start(
+          Platform.executable,
+          []
+            ..addAll(Platform.executableArguments)
+            ..addAll([
+              Platform.script.resolve('signal_test_script.dart').toFilePath(),
+              signal.toString()
+            ]))
+      .then((process) {
     process.stdin.close();
     process.stderr.drain();
 
@@ -71,10 +81,13 @@
 void testMultipleSignals(List<ProcessSignal> signals) {
   for (var signal in signals) {
     asyncStart();
-    Process
-        .start(
+    Process.start(
             Platform.executable,
-            [Platform.script.resolve('signal_test_script.dart').toFilePath()]
+            []
+              ..addAll(Platform.executableArguments)
+              ..add(Platform.script
+                  .resolve('signal_test_script.dart')
+                  .toFilePath())
               ..addAll(signals.map((s) => s.toString())))
         .then((process) {
       process.stdin.close();
diff --git a/tests/standalone_2/io/skipping_dart2js_compilations_test.dart b/tests/standalone_2/io/skipping_dart2js_compilations_test.dart
index 96649d1..4ddd934 100644
--- a/tests/standalone_2/io/skipping_dart2js_compilations_test.dart
+++ b/tests/standalone_2/io/skipping_dart2js_compilations_test.dart
@@ -148,7 +148,10 @@
       .resolve('skipping_dart2js_compilations_helper.dart')
       .toFilePath();
   var executable = Platform.executable;
-  var arguments = [createFileScript, fileUtils.scriptOutputPath.toNativePath()];
+  var arguments = <String>[]
+    ..addAll(Platform.executableArguments)
+    ..add(createFileScript)
+    ..add(fileUtils.scriptOutputPath.toNativePath());
   var bootstrapDeps = [Uri.parse("file://${fileUtils.testSnapshotFilePath}")];
   return Command.compilation('dart2js', fileUtils.testJsFilePath.toNativePath(),
       bootstrapDeps, executable, arguments, {},
diff --git a/tests/standalone_2/io/stdin_sync_test.dart b/tests/standalone_2/io/stdin_sync_test.dart
index 431f735..30f1e33 100644
--- a/tests/standalone_2/io/stdin_sync_test.dart
+++ b/tests/standalone_2/io/stdin_sync_test.dart
@@ -13,8 +13,12 @@
 void testReadByte() {
   void test(String line, List<String> expected) {
     var script = Platform.script.resolve("stdin_sync_script.dart").toFilePath();
-    Process
-        .start(Platform.executable, [script]..addAll(expected.map(json.encode)))
+    Process.start(
+            Platform.executable,
+            []
+              ..addAll(Platform.executableArguments)
+              ..add(script)
+              ..addAll(expected.map(json.encode)))
         .then((process) {
       process.stdin.write(line);
       process.stdin.flush().then((_) => process.stdin.close());
diff --git a/tests/standalone_2/io/stdio_implicit_close_test.dart b/tests/standalone_2/io/stdio_implicit_close_test.dart
index 0df0e04..f283417 100644
--- a/tests/standalone_2/io/stdio_implicit_close_test.dart
+++ b/tests/standalone_2/io/stdio_implicit_close_test.dart
@@ -13,15 +13,14 @@
   var scriptFile = "stdio_implicit_close_script.dart";
   var script = Platform.script.resolve(scriptFile).toFilePath();
 
-  var arguments = [
-    script,
-  ];
+  var arguments = <String>[]
+    ..addAll(Platform.executableArguments)
+    ..add(script);
   if (closeStdout) arguments.add("stdout");
   if (closeStderr) arguments.add("stderr");
 
   asyncStart();
-  Process
-      .run(Platform.executable, arguments,
+  Process.run(Platform.executable, arguments,
           stdoutEncoding: ascii, stderrEncoding: ascii)
       .then((result) {
     print(result.stdout);
diff --git a/tests/standalone_2/io/stdio_nonblocking_test.dart b/tests/standalone_2/io/stdio_nonblocking_test.dart
index b344a0c..1eab14e 100644
--- a/tests/standalone_2/io/stdio_nonblocking_test.dart
+++ b/tests/standalone_2/io/stdio_nonblocking_test.dart
@@ -12,9 +12,13 @@
 void main() {
   var script =
       Platform.script.resolve("stdio_nonblocking_script.dart").toFilePath();
-  Process
-      .run(Platform.executable, [script],
-          stdoutEncoding: ascii, stderrEncoding: ascii)
+  Process.run(
+          Platform.executable,
+          []
+            ..addAll(Platform.executableArguments)
+            ..add(script),
+          stdoutEncoding: ascii,
+          stderrEncoding: ascii)
       .then((result) {
     print(result.stdout);
     print(result.stderr);
diff --git a/tests/standalone_2/standalone_2.status b/tests/standalone_2/standalone_2.status
index cf60651..74d303c 100644
--- a/tests/standalone_2/standalone_2.status
+++ b/tests/standalone_2/standalone_2.status
@@ -86,7 +86,7 @@
 no_assert_test: Fail, OK # This is testing a vm flag.
 
 [ $mode == product && $runtime == dart_precompiled ]
-dwarf_stack_trace_test: Pass, RuntimeError
+dwarf_stack_trace_test: SkipByDesign # Due to instruction canonicalization we can end up having the wrong names in stack traces.
 
 [ $mode == release && $runtime == vm && $system == macos ]
 io/named_pipe_script_test: Pass, RuntimeError # Issue 28737
diff --git a/tests/standalone_2/standalone_2_kernel.status b/tests/standalone_2/standalone_2_kernel.status
index 7b2cfd6..ceb859a 100644
--- a/tests/standalone_2/standalone_2_kernel.status
+++ b/tests/standalone_2/standalone_2_kernel.status
@@ -39,8 +39,12 @@
 io/platform_resolved_executable_test/04: RuntimeError
 
 [ $compiler == dartkp ]
+io/arguments_test: Fail # Test harness passes runtime arguments to the compiler
 io/test_runner_test: SkipByDesign # Is not relevant for AOT.
 
+[ $system == android ]
+entrypoints_verification_test: Skip # Requires shared objects which the test script doesn't "adb push".
+
 [ $fasta ]
 deferred_transitive_import_error_test: CompileTimeError
 package/package1_test: CompileTimeError
@@ -222,10 +226,9 @@
 io/pipe_server_test: Skip # Timeout
 io/socket_close_test: Skip # Timeout
 io/socket_many_connections_test: Skip # Timeout
-io/test_extension_fail_test: RuntimeError
-io/test_extension_test: RuntimeError
 io/web_socket_compression_test: Skip # Timeout
 io/web_socket_test: Skip # Timeout
 
-[ $hot_reload || $hot_reload_rollback || $compiler != dartk && $compiler != dartkb ]
-io/entrypoints_verification_test: Skip # Test runs in JIT mode only
+
+[ $compiler != dartk && $compiler != dartkb && $compiler != dartkp || $compiler == dartkp && $system == windows ]
+entrypoints_verification_test: SkipByDesign # Requires VM to run. Cannot run in precompiled Windows because the DLL is linked against dart.exe instead of dart_precompiled_runtime.exe.
diff --git a/tests/standalone_2/standalone_2_vm.status b/tests/standalone_2/standalone_2_vm.status
index c59b66f..bc23a30 100644
--- a/tests/standalone_2/standalone_2_vm.status
+++ b/tests/standalone_2/standalone_2_vm.status
@@ -6,9 +6,6 @@
 link_natives_lazily_test: SkipByDesign # Not supported.
 no_allow_absolute_addresses_test: SkipByDesign # Not supported.
 
-[ $builder_tag == asan ]
-ffi/data_not_asan_test: Skip # this test tries to allocate too much memory on purpose
-
 [ $compiler == app_jit ]
 full_coverage_test: Skip # Platform.executable
 io/code_collection_test: Skip # Platform.executable
@@ -25,18 +22,7 @@
 io/test_runner_test: RuntimeError # Issue 33168
 regress_26031_test: Skip # Platform.resolvedExecutable
 
-[ $compiler == app_jitk ]
-ffi/dynamic_library_test: Skip # https://github.com/dart-lang/sdk/issues/35934
-ffi/function_callbacks_test: Skip # https://github.com/dart-lang/sdk/issues/35934
-ffi/function_structs_test: Skip # https://github.com/dart-lang/sdk/issues/35934
-ffi/function_test: Skip # https://github.com/dart-lang/sdk/issues/35934
-
-[ $runtime == dart_precompiled ]
-ffi: RuntimeError # https://github.com/dart-lang/sdk/issues/35765
-ffi/static_checks_test: Skip # https://github.com/dart-lang/sdk/issues/35765
-
 [ $runtime == vm ]
-ffi/enable_ffi_test: Fail # test designed to fail: --enable-ffi=false with import dart:ffi
 io/test_runner_test: Skip # Spawns a process which runs in Dart2 mode.
 
 [ $system == android ]
@@ -87,15 +73,9 @@
 [ $arch == x64 && $compiler == dartkb && $runtime == vm && $system == linux ]
 io/stdout_stderr_non_blocking_test: Pass, Timeout # Issue 35192
 
-[ $arch == x64 && $mode == debug && $system == linux && $hot_reload ]
-ffi/subtype_test: Skip # https://github.com/dart-lang/sdk/issues/35933
-
 [ $compiler != dart2analyzer && $system == windows ]
 io/platform_resolved_executable_test/06: RuntimeError # Issue 23641
 
-[ $compiler == dartkb && $mode == debug ]
-ffi/subtype_test: Skip # https://github.com/dart-lang/sdk/issues/35935
-
 [ $mode == release && $runtime == vm && $system == linux && ($arch == simdbc64 || $arch == x64) ]
 io/http_bind_test: Pass, Timeout # Issue 35192
 
@@ -109,9 +89,6 @@
 [ $runtime == dart_precompiled && $system == linux && ($arch == simarm || $arch == simarm64 || $arch == x64) ]
 io/stdout_stderr_non_blocking_test: Pass, Timeout # Issue 35192
 
-[ $runtime != dart_precompiled && $runtime != vm ]
-ffi: SkipByDesign # ffi is only supported on vm
-
 [ $runtime == vm && !$checked && !$strong ]
 io/file_constructor_test: RuntimeError
 
@@ -134,6 +111,3 @@
 full_coverage_test: Skip # TODO(vegorov) SIMDBC interpreter doesn't support coverage yet.
 link_natives_lazily_test: SkipByDesign # SIMDBC interpreter doesn't support lazy linking of natives.
 no_lazy_dispatchers_test: SkipByDesign # SIMDBC interpreter doesn't support --no_lazy_dispatchers
-
-[ $arch != x64 || $system != linux && $system != macos ]
-ffi: Skip # ffi not yet supported on other systems than linux/macos 64
diff --git a/third_party/.gitignore b/third_party/.gitignore
index 836a11d..28a6f8a 100644
--- a/third_party/.gitignore
+++ b/third_party/.gitignore
@@ -12,6 +12,5 @@
 !clang.tar.gz.sha1
 !unittest.tar.gz.sha1
 !update.sh
-!/googletest
 # but ignore a subfolder of tcmalloc (some client ignores /tcmalloc/.gitignore)
 /tcmalloc/gperftools
diff --git a/third_party/d8/README.google b/third_party/d8/README.google
index 9b592e1..303e812 100644
--- a/third_party/d8/README.google
+++ b/third_party/d8/README.google
@@ -1,9 +1,9 @@
 Name: V8 command line javascript shell.
 Short Name: d8
-URL: https://chromium.googlesource.com/v8/v8/+/refs/tags/6.9.427.23
-Version: 6.9.427.23
-Revision: 40b7c570a56b1134ff5083d8311e69ad8bf8fbd7
-Date: September 14 2018
+URL: https://chromium.googlesource.com/v8/v8/+/refs/tags/7.5.149
+Version: 7.5.149
+Revision: 804cfc5fb2ab8c49facc7a5f486c1555c2cbad63
+Date: March 31 2019
 License: BSD
 
 Description:
diff --git a/third_party/d8/update.sh b/third_party/d8/update.sh
index 3236046..bb5e2d3 100755
--- a/third_party/d8/update.sh
+++ b/third_party/d8/update.sh
@@ -26,7 +26,7 @@
 for i in "${!arch[@]}"
 do
   filename="v8-${arch[$i]}-rel-$version.zip"
-  gsutil cp "gs://chromium-v8/official/$major.$minor/$filename" .
+  gsutil cp "gs://chromium-v8/official/canary/$filename" .
   mkdir -p d8/${path[$i]}
   unzip -q $filename -d d8/${path[$i]}
   rm $filename
diff --git a/tools/FAKE_COMMITS b/tools/FAKE_COMMITS
index c11b0c2..32518f9 100644
--- a/tools/FAKE_COMMITS
+++ b/tools/FAKE_COMMITS
@@ -28,3 +28,4 @@
 Analyzer branch commits:
 Force build on new analyzer-branch linux build with new workflow
 Trigger bots
+Switch benchmark builders to Ubuntu 16.04
diff --git a/tools/VERSION b/tools/VERSION
index 11a8a37..f29e6db 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -23,9 +23,17 @@
 #  * Making cherry-picks to stable channel
 #     - increase PATCH by 1
 #
+#  * Making a change to the ABI:
+#     - increase ABI_VERSION by 1
+#
+#  * Deprecating an old ABI version:
+#     - increase OLDEST_SUPPORTED_ABI_VERSION to the version that is supported.
+#
 CHANNEL stable
 MAJOR 2
-MINOR 2
+MINOR 3
 PATCH 0
 PRERELEASE 0
 PRERELEASE_PATCH 0
+ABI_VERSION 4
+OLDEST_SUPPORTED_ABI_VERSION 1
diff --git a/tools/abiversions/.gitignore b/tools/abiversions/.gitignore
new file mode 100644
index 0000000..3e2c1ba
--- /dev/null
+++ b/tools/abiversions/.gitignore
@@ -0,0 +1,4 @@
+# This directory is populated by gclient sync. But we still need the directory
+# to be checked in, and git doesn't track empty directories, hence this file.
+*
+!.gitignore
diff --git a/tools/addlatexhash.dart b/tools/addlatexhash.dart
index 21f8d52..c1cbddc 100755
--- a/tools/addlatexhash.dart
+++ b/tools/addlatexhash.dart
@@ -22,11 +22,11 @@
 // NB: This utility assumes UN*X style line endings, \n, in the LaTeX
 // source file received as input; it will not work with other styles.
 
+import 'dart:convert';
 import 'dart:io';
 
-import 'package:crypto/crypto.dart';
 import 'package:convert/convert.dart';
-import 'package:utf/utf.dart';
+import 'package:crypto/crypto.dart';
 
 // ----------------------------------------------------------------------
 // Normalization of the text: removal or normalization of parts that
@@ -491,7 +491,7 @@
   final gatheredLine = gatherLines(lines, startIndex, nextIndex);
   final simplifiedLine = simplifyLine(gatheredLine);
   listSink.write("  % $simplifiedLine\n");
-  var digest = sha1.convert(encodeUtf8(simplifiedLine));
+  var digest = sha1.convert(utf8.encode(simplifiedLine));
   return digest.bytes;
 }
 
diff --git a/tools/approve_results.dart b/tools/approve_results.dart
index 4962072..5912f3b 100755
--- a/tools/approve_results.dart
+++ b/tools/approve_results.dart
@@ -8,6 +8,7 @@
 /// green.
 
 import 'dart:async';
+import 'dart:collection';
 import 'dart:convert';
 import 'dart:io';
 import 'dart:math';
@@ -17,6 +18,37 @@
 
 import 'bots/results.dart';
 
+/// Returns whether two decoded JSON objects are identical.
+bool isIdenticalJson(dynamic a, dynamic b) {
+  if (a is Map<String, dynamic> && b is Map<String, dynamic>) {
+    if (a.length != b.length) return false;
+    for (final key in a.keys) {
+      if (!b.containsKey(key)) return false;
+      if (!isIdenticalJson(a[key], b[key])) return false;
+    }
+    return true;
+  } else if (a is List<dynamic> && b is List<dynamic>) {
+    if (a.length != b.length) return false;
+    for (int i = 0; i < a.length; i++) {
+      if (!isIdenticalJson(a[i], b[i])) return false;
+    }
+    return true;
+  } else {
+    return a == b;
+  }
+}
+
+/// Returns whether two sets of approvals are identical.
+bool isIdenticalApprovals(
+    Map<String, Map<String, dynamic>> a, Map<String, Map<String, dynamic>> b) {
+  if (a.length != b.length) return false;
+  for (final key in a.keys) {
+    if (!b.containsKey(key)) return false;
+    if (!isIdenticalJson(a[key], b[key])) return false;
+  }
+  return true;
+}
+
 /// The bot names and named configurations are highly redundant if both are
 /// listed. This function returns a simplified named configuration that doesn't
 /// contain any aspects that's part of the bots name. This is used to get a more
@@ -29,16 +61,16 @@
       .join("-");
 }
 
-/// Represents a test on a bot with the current result, the current approved
-/// result, and flakiness data.
+/// Represents a test on a bot with the baseline results (if tryrun), the
+/// current result, the current approved result, and flakiness data.
 class Test implements Comparable {
   final String bot;
-  final String name;
+  final Map<String, dynamic> baselineData;
   final Map<String, dynamic> resultData;
   final Map<String, dynamic> approvedResultData;
   final Map<String, dynamic> flakinessData;
 
-  Test(this.bot, this.name, this.resultData, this.approvedResultData,
+  Test(this.bot, this.baselineData, this.resultData, this.approvedResultData,
       this.flakinessData);
 
   int compareTo(Object other) {
@@ -53,13 +85,18 @@
     return 0;
   }
 
-  String get configuration => resultData["configuration"];
-  String get result => resultData["result"];
-  String get expected => resultData["expected"];
-  bool get matches => resultData["matches"];
-  String get approvedResult =>
-      approvedResultData != null ? approvedResultData["result"] : null;
-  bool get isApproved => result == approvedResult;
+  Map<String, dynamic> get _sharedData =>
+      resultData ?? baselineData ?? approvedResultData;
+  String get name => _sharedData["name"];
+  String get configuration => _sharedData["configuration"];
+  String get key => "$configuration:$name";
+  String get expected => _sharedData["expected"];
+  String get result => (resultData ?? const {})["result"];
+  bool get matches => _sharedData["matches"];
+  String get baselineResult => (baselineData ?? const {})["result"];
+  String get approvedResult => (approvedResultData ?? const {})["result"];
+  bool get isDifferent => result != null && result != baselineResult;
+  bool get isApproved => result == null || result == approvedResult;
   List<String> get flakyModes =>
       flakinessData != null ? flakinessData["outcomes"].cast<String>() : null;
   bool get isFlake => flakinessData != null && flakyModes.contains(result);
@@ -73,30 +110,66 @@
         ? loadResultsMap(path)
         : <String, Map<String, dynamic>>{};
 
+/// Exception for when the results for a builder can't be found.
+class NoResultsException implements Exception {
+  final String message;
+  final String buildUrl;
+
+  NoResultsException(this.message, this.buildUrl);
+
+  String toString() => message;
+}
+
 /// Loads a log from logdog.
 Future<String> loadLog(String id, String step) async {
+  final buildUrl = "https://ci.chromium.org/b/$id";
   final logUrl = Uri.parse("https://logs.chromium.org/"
       "logs/dart/buildbucket/cr-buildbucket.appspot.com/"
       "$id/+/steps/$step?format=raw");
   final client = new HttpClient();
-  final request =
-      await client.getUrl(logUrl).timeout(const Duration(seconds: 60));
-  final response = await request.close().timeout(const Duration(seconds: 60));
-  if (response.statusCode != HttpStatus.ok) {
-    throw new Exception("The log at $logUrl doesn't exist");
+  try {
+    final request =
+        await client.getUrl(logUrl).timeout(const Duration(seconds: 60));
+    final response = await request.close().timeout(const Duration(seconds: 60));
+    if (response.statusCode == HttpStatus.notFound) {
+      await response.drain();
+      throw new NoResultsException(
+          "The log at $logUrl doesn't exist: ${response.statusCode}", buildUrl);
+    }
+    if (response.statusCode != HttpStatus.ok) {
+      await response.drain();
+      throw new Exception("Failed to download $logUrl: ${response.statusCode}");
+    }
+    final contents = (await response
+            .transform(new Utf8Decoder())
+            .timeout(const Duration(seconds: 60))
+            .toList())
+        .join("");
+    return contents;
+  } finally {
+    client.close();
   }
-  final contents = (await response
-          .transform(new Utf8Decoder())
-          .timeout(const Duration(seconds: 60))
-          .toList())
-      .join("");
-  client.close();
-  return contents;
+}
+
+/// TODO(https://github.com/dart-lang/sdk/issues/36015): The step name changed
+/// incompatibly, allow both temporarily to reduce the user breakage. Remove
+/// this 2019-03-25.
+Future<String> todoFallbackLoadLog(
+    String id, String primary, String secondary) async {
+  try {
+    return await loadLog(id, primary);
+  } catch (e) {
+    if (e.toString().startsWith("Exception: The log at ") &&
+        e.toString().endsWith(" doesn't exist")) {
+      return await loadLog(id, secondary);
+    }
+    rethrow;
+  }
 }
 
 /// Loads the results from the bot.
 Future<List<Test>> loadResultsFromBot(String bot, ArgResults options,
-    Map<String, dynamic> changelistBuild) async {
+    String changeId, Map<String, dynamic> changelistBuild) async {
   if (options["verbose"]) {
     print("Loading $bot...");
   }
@@ -106,8 +179,14 @@
     // The 'latest' file contains the name of the latest build that we
     // should download. When preapproving a changelist, we instead find out
     // which build the commit queue was rebased on.
-    final build = (changelistBuild != null
-            ? await loadLog(changelistBuild["id"],
+    /// TODO(https://github.com/dart-lang/sdk/issues/36015): The step name
+    /// changed incompatibly, allow both temporarily to reduce the user
+    /// breakage. Remove this 2019-03-25.
+    final build = (changeId != null
+            ? await todoFallbackLoadLog(
+                changelistBuild["id"],
+                "download_previous_results/0/steps/gsutil_find_latest_build/0/logs/"
+                "raw_io.output_text_latest_/0",
                 "gsutil_find_latest_build/0/logs/raw_io.output_text_latest_/0")
             : await readFile(bot, "latest"))
         .trim();
@@ -121,7 +200,7 @@
           "$approvedResultsStoragePath/$bot/approved_results.json",
           "${tmpdir.path}/approved_results.json"),
       new Future(() async {
-        if (changelistBuild != null) {
+        if (changeId != null) {
           tryResults.addAll(parseResultsMap(await loadLog(
               changelistBuild["id"], "test_results/0/logs/results.json/0")));
         }
@@ -150,71 +229,32 @@
     final approvedResults =
         await loadResultsMapIfExists("${tmpdir.path}/approved_results.json");
 
+    // TODO: Remove 2019-04-08: Discard any invalid pre-approvals made with a
+    // version of approve_results between 065910f0 and a13ac1b4. Pre-approving
+    // a new test could add pre-approvals with null configuration and null name.
+    approvedResults.remove("null:null");
+
     // Construct an object for every test containing its current result,
     // what the last approved result was, and whether it's flaky.
     final tests = <Test>[];
-    for (final key in results.keys) {
-      final result = results[key];
+    final testResults = changeId != null ? tryResults : results;
+    for (final key in testResults.keys) {
+      final baselineResult = changeId != null ? results[key] : null;
+      final testResult = testResults[key];
       final approvedResult = approvedResults[key];
       final flakiness = flaky[key];
-      // If preapproving results, allow new non-matching results that are
-      // different from the baseline. The approved results will be the current
-      // approved results, plus the difference between the tryrun's baseline and
-      // the tryrun's results.
-      if (tryResults.containsKey(key)) {
-        final tryResult = tryResults[key];
-        final wasFlake = flakiness != null &&
-            (flakiness["outcomes"] as List<dynamic>)
-                .contains(tryResult["result"]);
-        // Pick the try run result if the try result was not a flake and it's a
-        // non-matching result that's different than the approved result. If
-        // there is no approved result yet, use the latest result from the
-        // builder instead.
-        final baseResult = approvedResult ?? result;
-        if (!wasFlake &&
-            !tryResult["matches"] &&
-            tryResult["result"] != result["result"]) {
-          // The approved_results.json format currently does not natively
-          // support preapproval, so preapproving turning one failure into
-          // another will turn the builder in question red until the CL lands.
-          if (!baseResult["matches"] &&
-              tryResult["result"] != baseResult["result"]) {
-            print("Warning: Preapproving changed failure modes will turn the "
-                "CI red until the CL is submitted: $bot: $key: "
-                "${baseResult["result"]} -> ${tryResult["result"]}");
-          }
-          result.clear();
-          result.addAll(tryResult);
-        } else {
-          if (approvedResult != null) {
-            result.clear();
-            result.addAll(approvedResult);
-          }
-        }
-      } else if (tryResults.isNotEmpty && approvedResult != null) {
-        result.clear();
-        result.addAll(approvedResult);
-      }
-      final name = result["name"];
-      final test = new Test(bot, name, result, approvedResult, flakiness);
-      final dropApproval =
-          test.matches ? options["failures-only"] : options["successes-only"];
-      if (dropApproval && !test.isApproved) {
-        if (approvedResult == null) continue;
-        result.clear();
-        result.addAll(approvedResult);
-      }
+      final test =
+          new Test(bot, baselineResult, testResult, approvedResult, flakiness);
       tests.add(test);
     }
-    // If preapproving and the CL has introduced new tests, add the new tests
-    // as well to the approved data.
-    final newTestKeys = new Set<String>.from(tryResults.keys)
-        .difference(new Set<String>.from(results.keys));
-    for (final key in newTestKeys) {
-      final result = tryResults[key];
+    // Add in approvals whose test was no longer in the results.
+    for (final key in approvedResults.keys) {
+      if (testResults.containsKey(key)) continue;
+      final baselineResult = changeId != null ? results[key] : null;
+      final approvedResult = approvedResults[key];
       final flakiness = flaky[key];
-      final name = result["name"];
-      final test = new Test(bot, name, result, null, flakiness);
+      final test =
+          new Test(bot, baselineResult, null, approvedResult, flakiness);
       tests.add(test);
     }
     if (options["verbose"]) {
@@ -227,6 +267,33 @@
   }
 }
 
+Future<Map<String, dynamic>> loadJsonPrefixedAPI(String url) async {
+  final client = new HttpClient();
+  try {
+    final request = await client
+        .getUrl(Uri.parse(url))
+        .timeout(const Duration(seconds: 30));
+    final response = await request.close().timeout(const Duration(seconds: 30));
+    if (response.statusCode != HttpStatus.ok) {
+      throw new Exception("Failed to request $url: ${response.statusCode}");
+    }
+    final text = await response
+        .transform(utf8.decoder)
+        .join()
+        .timeout(const Duration(seconds: 30));
+    return jsonDecode(text.substring(5 /* ")]}'\n" */));
+  } finally {
+    client.close();
+  }
+}
+
+Future<Map<String, dynamic>> loadChangelistDetails(
+    String gerritHost, String changeId) async {
+  // ?O=516714 requests the revisions field.
+  final url = "https://$gerritHost/changes/$changeId/detail?O=516714";
+  return await loadJsonPrefixedAPI(url);
+}
+
 main(List<String> args) async {
   final parser = new ArgParser();
   parser.addFlag("automated-approver",
@@ -269,6 +336,8 @@
 List tests whose results are different from the previously approved results, and
 ask whether to update the currently approved results, turning the bots green.
 
+See the documentation at https://goto.google.com/dart-status-file-free-workflow
+
 The options are as follows:
 
 ${parser.usage}""");
@@ -281,6 +350,12 @@
     return;
   }
 
+  if (options.rest.isNotEmpty) {
+    stderr.writeln("Unexpected extra argument: ${options.rest.first}");
+    exitCode = 1;
+    return;
+  }
+
   // Locate gsutil.py.
   gsutilPy =
       Platform.script.resolve("../third_party/gsutil/gsutil.py").toFilePath();
@@ -331,9 +406,11 @@
 
   // Determine which builders have run for the changelist.
   final changelistBuilds = <String, Map<String, dynamic>>{};
-  if (options["preapprove"] != null) {
+  final isPreapproval = options["preapprove"] != null;
+  String changeId;
+  if (isPreapproval) {
     if (options["verbose"]) {
-      print("Loading list of try runs...");
+      print("Loading changelist details...");
     }
     final gerritHost = "dart-review.googlesource.com";
     final gerritProject = "sdk";
@@ -345,16 +422,30 @@
       return;
     }
     final components = gerrit.substring(prefix.length).split("/");
-    if (components.length != 2 ||
-        int.tryParse(components[0]) == null ||
-        int.tryParse(components[1]) == null) {
+    if (!((components.length == 1 && int.tryParse(components[0]) != null) ||
+        (components.length == 2 &&
+            int.tryParse(components[0]) != null &&
+            int.tryParse(components[1]) != null))) {
       stderr.writeln("error: $gerrit must be in the form of "
-          "$prefix<changelist>/<patchset>");
+          "$prefix<changelist> or $prefix<changelist>/<patchset>");
       exitCode = 1;
       return;
     }
     final changelist = int.parse(components[0]);
-    final patchset = int.parse(components[1]);
+    final details =
+        await loadChangelistDetails(gerritHost, changelist.toString());
+    changeId = details["change_id"];
+    final patchset = 2 <= components.length
+        ? int.parse(components[1])
+        : details["revisions"][details["current_revision"]]["_number"];
+    if (2 <= components.length) {
+      print("Using Change-Id $changeId patchset $patchset");
+    } else {
+      print("Using Change-Id $changeId with the latest patchset $patchset");
+    }
+    if (options["verbose"]) {
+      print("Loading list of try runs...");
+    }
     final buildset = "buildset:patch/gerrit/$gerritHost/$changelist/$patchset";
     final url = Uri.parse(
         "https://cr-buildbucket.appspot.com/_ah/api/buildbucket/v1/search"
@@ -463,10 +554,20 @@
   // Load all the latest results for the selected bots, as well as flakiness
   // data, and the set of currently approved results. Each bot's latest build
   // is downloaded in parallel to make this phase faster.
-  final testListFutures = <Future>[];
+  final testListFutures = <Future<List<Test>>>[];
+  final noResultsBuilds = new SplayTreeMap<String, String>();
   for (final String bot in bots) {
-    testListFutures
-        .add(loadResultsFromBot(bot, options, changelistBuilds[bot]));
+    testListFutures.add(new Future(() async {
+      try {
+        return await loadResultsFromBot(
+            bot, options, changeId, changelistBuilds[bot]);
+      } on NoResultsException catch (e) {
+        print(
+            "Error: Failed to find results for $bot build <${e.buildUrl}>: $e");
+        noResultsBuilds[bot] = e.buildUrl;
+        return <Test>[];
+      }
+    }));
   }
 
   // Collect all the tests from the synchronous downloads.
@@ -478,19 +579,28 @@
   print("");
 
   // Compute statistics and the set of interesting tests.
-  final flakyTestsCount = tests.where((test) => test.isFlake).length;
-  final failingTestsCount =
-      tests.where((test) => !test.isFlake && !test.matches).length;
-  final unapprovedTests =
-      tests.where((test) => !test.isFlake && !test.isApproved).toList();
-  final fixedTests = unapprovedTests.where((test) => test.matches).toList();
-  final brokenTests = unapprovedTests.where((test) => !test.matches).toList();
+  final flakyTestsCount =
+      tests.where((test) => test.resultData != null && test.isFlake).length;
+  final failingTestsCount = tests
+      .where(
+          (test) => test.resultData != null && !test.isFlake && !test.matches)
+      .length;
+  final differentTests = tests
+      .where((test) =>
+          (isPreapproval ? test.isDifferent : !test.isApproved) &&
+          !test.isFlake)
+      .toList();
+  final selectedTests = differentTests
+      .where((test) => !(test.matches
+          ? options["failures-only"]
+          : options["successes-only"]))
+      .toList();
+  final fixedTests = selectedTests.where((test) => test.matches).toList();
+  final brokenTests = selectedTests.where((test) => !test.matches).toList();
 
   // Find out which bots have multiple configurations.
-  final outcomes = new Set<String>();
   final configurationsForBots = <String, Set<String>>{};
   for (final test in tests) {
-    outcomes.add(test.result);
     var configurationSet = configurationsForBots[test.bot];
     if (configurationSet == null) {
       configurationsForBots[test.bot] = configurationSet = new Set<String>();
@@ -517,7 +627,7 @@
   int longestTest = "TEST".length;
   int longestResult = "RESULT".length;
   int longestExpected = "EXPECTED".length;
-  for (final test in unapprovedTests) {
+  for (final test in selectedTests) {
     unapprovedBots.add(test.bot);
     final botDisplayName = getBotDisplayName(test.bot, test.configuration);
     longestBot = max(longestBot, botDisplayName.length);
@@ -601,6 +711,17 @@
   statistic(brokenTests.length, tests.length,
       "tests were broken since last approval");
 
+  // Warn about any builders where results weren't available.
+  if (noResultsBuilds.isNotEmpty) {
+    print("");
+    noResultsBuilds.forEach((String builder, String buildUrl) {
+      print("Warning: No results were found for $builder: <$buildUrl>");
+    });
+    print("Warning: Builders without results are usually due to infrastructure "
+        "issues, please have a closer look at the affected builders and try "
+        "the build again.");
+  }
+
   // Stop if there's nothing to do.
   if (unapprovedBots.isEmpty) {
     print("\nEvery test result has already been approved.");
@@ -609,10 +730,10 @@
 
   // Stop if this is a dry run.
   if (options["no"]) {
-    if (unapprovedTests.length == 1) {
+    if (selectedTests.length == 1) {
       print("1 test has a changed result and needs approval");
     } else {
-      print("${unapprovedTests.length} "
+      print("${selectedTests.length} "
           "tests have changed results and need approval");
     }
     return;
@@ -624,16 +745,15 @@
     print("Note: It is assumed bugs have been filed about the above failures "
         "before they are approved here.");
     if (brokenTests.isNotEmpty) {
-      final botPlural = bots.length == 1 ? "bot" : "bots";
+      final builderPlural = bots.length == 1 ? "builder" : "builders";
+      final tryBuilders = isPreapproval ? "try$builderPlural" : builderPlural;
+      final tryCommit = isPreapproval ? "tryrun" : "commit";
       print("Note: Approving the failures will turn the "
-          "$botPlural green on the next commit.");
-    }
-    if (options["preapprove"] != null) {
-      print("Warning: Preapproval is currently not sticky and somebody else "
-          "approving before your CL has landed will undo your preapproval.");
+          "$tryBuilders green on the next $tryCommit.");
     }
     while (true) {
-      stdout.write("Do you want to approve? (yes/no) [yes] ");
+      final approve = isPreapproval ? "pre-approve" : "approve";
+      stdout.write("Do you want to $approve? (yes/no) [yes] ");
       final line = stdin.readLineSync();
       // End of file condition is considered no.
       if (line == null) {
@@ -666,47 +786,199 @@
     exitCode = 1;
     return;
   }
-  final now = new DateTime.now().toUtc().toIso8601String();
+  final nowDate = new DateTime.now().toUtc();
+  final now = nowDate.toIso8601String();
 
-  // Update approved_results.json for each bot with unapproved changes.
+  // Deep clones a decoded json object.
+  dynamic deepClone(dynamic object) {
+    if (object is Map<String, dynamic>) {
+      final result = <String, dynamic>{};
+      for (final key in object.keys) {
+        result[key] = deepClone(object[key]);
+      }
+      return result;
+    } else if (object is List<dynamic>) {
+      final result = <dynamic>[];
+      for (final value in object) {
+        result.add(deepClone(value));
+      }
+      return result;
+    } else {
+      return object;
+    }
+  }
+
+  // Build the new approval data with the changes in test results applied.
+  final newApprovalsForBuilders = <String, Map<String, Map<String, dynamic>>>{};
+
+  if (isPreapproval) {
+    // Import all the existing approval data, keeping tests that don't exist
+    // anymore.
+    for (final test in tests) {
+      if (test.approvedResultData == null) continue;
+      final approvalData = deepClone(test.approvedResultData);
+      // TODO(https://github.com/dart-lang/sdk/issues/36279): Remove needless
+      // fields that shouldn't be in the approvals data. Remove this 2019-04-03.
+      approvalData.remove("bot_name");
+      approvalData.remove("builder_name");
+      approvalData.remove("build_number");
+      approvalData.remove("changed");
+      approvalData.remove("commit_hash");
+      approvalData.remove("commit_time");
+      approvalData.remove("commit_hash");
+      approvalData.remove("flaky");
+      approvalData.remove("previous_build_number");
+      approvalData.remove("previous_commit_hash");
+      approvalData.remove("previous_commit_time");
+      approvalData.remove("previous_flaky");
+      approvalData.remove("previous_result");
+      approvalData.remove("time_ms");
+      // Discard all the existing pre-approvals for this changelist.
+      final preapprovals =
+          approvalData.putIfAbsent("preapprovals", () => <String, dynamic>{});
+      preapprovals.remove(changeId);
+      final newApprovals = newApprovalsForBuilders.putIfAbsent(
+          test.bot, () => new SplayTreeMap<String, Map<String, dynamic>>());
+      newApprovals[test.key] = approvalData;
+    }
+
+    // Pre-approve all the regressions (no need to pre-approve fixed tests).
+    for (final test in brokenTests) {
+      final newApprovals = newApprovalsForBuilders.putIfAbsent(
+          test.bot, () => new SplayTreeMap<String, Map<String, dynamic>>());
+      final approvalData =
+          newApprovals.putIfAbsent(test.key, () => <String, dynamic>{});
+      approvalData["name"] = test.name;
+      approvalData["configuration"] = test.configuration;
+      approvalData["suite"] = test.resultData["suite"];
+      approvalData["test_name"] = test.resultData["test_name"];
+      final preapprovals =
+          approvalData.putIfAbsent("preapprovals", () => <String, dynamic>{});
+      final preapproval =
+          preapprovals.putIfAbsent(changeId, () => <String, dynamic>{});
+      preapproval["from"] = test.approvedResult;
+      preapproval["result"] = test.result;
+      preapproval["matches"] = test.matches;
+      preapproval["expected"] = test.expected;
+      preapproval["preapprover"] = username;
+      preapproval["preapproved_at"] = now;
+      preapproval["expires"] =
+          nowDate.add(const Duration(days: 30)).toIso8601String();
+    }
+  } else {
+    // Import all the existing approval data for tests, removing tests that
+    // don't exist anymore unless they have pre-approvals.
+    for (final test in tests) {
+      if (test.approvedResultData == null) continue;
+      if (test.result == null &&
+          (test.approvedResultData["preapprovals"] ?? <dynamic>[]).isEmpty) {
+        continue;
+      }
+      final approvalData = deepClone(test.approvedResultData);
+      // TODO(https://github.com/dart-lang/sdk/issues/36279): Remove needless
+      // fields that shouldn't be in the approvals data. Remove this 2019-04-03.
+      approvalData.remove("bot_name");
+      approvalData.remove("builder_name");
+      approvalData.remove("build_number");
+      approvalData.remove("changed");
+      approvalData.remove("commit_hash");
+      approvalData.remove("commit_time");
+      approvalData.remove("commit_hash");
+      approvalData.remove("flaky");
+      approvalData.remove("previous_build_number");
+      approvalData.remove("previous_commit_hash");
+      approvalData.remove("previous_commit_time");
+      approvalData.remove("previous_flaky");
+      approvalData.remove("previous_result");
+      approvalData.remove("time_ms");
+      approvalData.putIfAbsent("preapprovals", () => <String, dynamic>{});
+      final newApprovals = newApprovalsForBuilders.putIfAbsent(
+          test.bot, () => new SplayTreeMap<String, Map<String, dynamic>>());
+      newApprovals[test.key] = approvalData;
+    }
+
+    // Approve the changes in test results.
+    for (final test in selectedTests) {
+      final newApprovals = newApprovalsForBuilders.putIfAbsent(
+          test.bot, () => new SplayTreeMap<String, Map<String, dynamic>>());
+      final approvalData =
+          newApprovals.putIfAbsent(test.key, () => <String, dynamic>{});
+      approvalData["name"] = test.name;
+      approvalData["configuration"] = test.configuration;
+      approvalData["suite"] = test.resultData["suite"];
+      approvalData["test_name"] = test.resultData["test_name"];
+      approvalData["result"] = test.result;
+      approvalData["expected"] = test.expected;
+      approvalData["matches"] = test.matches;
+      approvalData["approver"] = username;
+      approvalData["approved_at"] = now;
+      approvalData.putIfAbsent("preapprovals", () => <String, dynamic>{});
+    }
+  }
+
+  // Reconstruct the old approvals so we can double check there was no race
+  // condition when uploading.
+  final oldApprovalsForBuilders = <String, Map<String, Map<String, dynamic>>>{};
+  for (final test in tests) {
+    if (test.approvedResultData == null) continue;
+    final oldApprovals = oldApprovalsForBuilders.putIfAbsent(
+        test.bot, () => new SplayTreeMap<String, Map<String, dynamic>>());
+    oldApprovals[test.key] = test.approvedResultData;
+  }
+  for (final builder in newApprovalsForBuilders.keys) {
+    oldApprovalsForBuilders.putIfAbsent(
+        builder, () => <String, Map<String, dynamic>>{});
+  }
+
+  // Update approved_results.json for each builder with unapproved changes.
   final outDirectory =
       await Directory.systemTemp.createTemp("approved_results.");
+  bool raceCondition = false;
   try {
-    final testsForBots = <String, List<Test>>{};
-    for (final test in tests) {
-      if (!testsForBots.containsKey(test.bot)) {
-        testsForBots[test.bot] = <Test>[test];
-      } else {
-        testsForBots[test.bot].add(test);
-      }
-    }
     print("Uploading approved results...");
     final futures = <Future>[];
-    for (final String bot in unapprovedBots) {
-      Map<String, dynamic> approveData(Test test) {
-        if (test.isApproved) {
-          return test.approvedResultData;
-        } else {
-          final data = new Map<String, dynamic>.from(test.resultData);
-          data["approver"] = username;
-          data["approved_at"] = now;
-          return data;
-        }
-      }
-
-      final dataList = testsForBots[bot].map(approveData).toList();
-      final localPath = "${outDirectory.path}/$bot.json";
+    for (final String builder in newApprovalsForBuilders.keys) {
+      final approvals = newApprovalsForBuilders[builder].values;
+      final localPath = "${outDirectory.path}/$builder.json";
       await new File(localPath).writeAsString(
-          dataList.map((data) => jsonEncode(data) + "\n").join(""));
+          approvals.map((approval) => jsonEncode(approval) + "\n").join(""));
       final remotePath =
-          "$approvedResultsStoragePath/$bot/approved_results.json";
-      futures.add(cpGsutil(localPath, remotePath)
-          .then((_) => print("Uploaded approved results for $bot")));
+          "$approvedResultsStoragePath/$builder/approved_results.json";
+      futures.add(new Future(() async {
+        if (!options["yes"]) {
+          if (options["verbose"]) {
+            print("Checking for race condition on $builder...");
+          }
+          final oldApprovedResults = oldApprovalsForBuilders[builder];
+          final oldApprovalPath = "${outDirectory.path}/$builder.json.old";
+          await cpGsutil(remotePath, oldApprovalPath);
+          final checkApprovedResults =
+              await loadResultsMapIfExists(oldApprovalPath);
+          if (!isIdenticalApprovals(oldApprovedResults, checkApprovedResults)) {
+            print("error: Race condition: "
+                "$builder approvals have changed, please try again.");
+            raceCondition = true;
+            return;
+          }
+        }
+        if (options["verbose"]) {
+          print("Uploading approved results for $builder...");
+        }
+        await cpGsutil(localPath, remotePath);
+        print("Uploaded approved results for $builder");
+      }));
     }
     await Future.wait(futures);
+    if (raceCondition) {
+      exitCode = 1;
+      print("error: Somebody else has approved, please try again");
+      return;
+    }
     if (brokenTests.isNotEmpty) {
-      print(
-          "Successfully approved results, the next commit will turn bots green");
+      final approved = isPreapproval ? "pre-approved" : "approved";
+      final commit = isPreapproval ? "tryrun" : "commit";
+      print("Successfully $approved results, the next $commit "
+          "will turn builders green");
     } else {
       print("Successfully approved results");
     }
diff --git a/tools/bots/apply_preapprovals.dart b/tools/bots/apply_preapprovals.dart
new file mode 100755
index 0000000..3b2bcef
--- /dev/null
+++ b/tools/bots/apply_preapprovals.dart
@@ -0,0 +1,247 @@
+#!/usr/bin/env dart
+// Copyright (c) 2018, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Applies pending pre-approvals for any changelists that have landed according
+// to the git history of HEAD.
+
+import 'dart:convert';
+import 'dart:io';
+
+import 'package:args/args.dart';
+
+import 'results.dart';
+
+main(List<String> args) async {
+  final parser = new ArgParser();
+  parser.addFlag("dry",
+      abbr: "n",
+      help: "Don't write out the updated approvals.",
+      negatable: false);
+  parser.addMultiOption("apply-changelist",
+      abbr: "A",
+      help: "Apply this changelist even if it hasn't landed",
+      splitCommas: false);
+  parser.addFlag("help", help: "Show the program usage.", negatable: false);
+  parser.addOption("upload",
+      abbr: "u",
+      help: "Upload the updated results to this cloud storage location");
+
+  final options = parser.parse(args);
+  if (options["help"]) {
+    print("""
+Usage: apply_preapprovals.dart [OPTION]... APPROVALS
+Applies pending pre-approvals for any changelists that have landed according to
+the git history of HEAD.
+
+The options are as follows:
+
+${parser.usage}""");
+    return;
+  }
+
+  final parameters = options.rest;
+  if (parameters.length != 1) {
+    print("error: Expected one parameter");
+    exitCode = 2;
+    return;
+  }
+
+  // Locate gsutil.py.
+  gsutilPy = Platform.script
+      .resolve("../../third_party/gsutil/gsutil.py")
+      .toFilePath();
+
+  final approvalsPath = parameters[0];
+  final approvals = await loadResultsMap(approvalsPath);
+
+  // Find the changelists with pre-approvals.
+  final allChangelists = <String>{};
+  for (final key in approvals.keys) {
+    final record = approvals[key];
+    final preapprovals =
+        record.putIfAbsent("preapprovals", () => <String, dynamic>{});
+    allChangelists.addAll(preapprovals.keys);
+  }
+  if (allChangelists.isEmpty) {
+    print("No pre-approvals are pending");
+  }
+
+  // Find the order the pre-approved changelists landed in.
+  final joinedChangelistsPattern = allChangelists.join("\\|");
+  final pattern = "^Change-Id: \\($joinedChangelistsPattern\\)\$";
+  final arguments = [
+    "rev-list",
+    "--pretty=medium",
+    "--grep=$pattern",
+    "--reverse",
+    "HEAD"
+  ];
+  final processOutput = await Process.run("git", arguments, runInShell: true);
+  if (processOutput.exitCode != 0) {
+    throw new Exception("Failed to run git $arguments\n"
+        "exitCode: ${processOutput.exitCode}\n"
+        "stdout: ${processOutput.stdout}\n"
+        "stderr: ${processOutput.stderr}");
+  }
+  final landedChangelists = <String>[];
+  final commitOfChangelist = <String, String>{};
+  String currentCommit;
+  for (final line in LineSplitter.split(processOutput.stdout)) {
+    if (line.startsWith("commit ")) {
+      currentCommit = line.substring("commit ".length);
+    } else if (line.startsWith("    Change-Id: ")) {
+      final changeId = line.substring("    Change-Id: ".length);
+      if (allChangelists.contains(changeId)) {
+        landedChangelists.add(changeId);
+        commitOfChangelist[changeId] = currentCommit;
+      }
+    }
+  }
+  if (processOutput.stdout != "") {
+    print(processOutput.stdout);
+  }
+
+  // Report the status of each of the pre-approved changelists.
+  final unlandedChangelists =
+      allChangelists.difference(landedChangelists.toSet());
+  for (final changelist in unlandedChangelists) {
+    final changelistUrl = "https://dart-review.googlesource.com/q/$changelist";
+    print("Pending: Changelist $changelistUrl hasn't landed yet");
+  }
+  if (allChangelists.isNotEmpty && landedChangelists.isEmpty) {
+    print("No pre-approved changelists have landed.");
+  }
+  for (final changelist in landedChangelists) {
+    final changelistUrl = "https://dart-review.googlesource.com/q/$changelist";
+    final commit = commitOfChangelist[changelist];
+    print("Landed: Changelist $changelistUrl landed in commit $commit");
+  }
+  for (final changelist in options["apply-changelist"]) {
+    final changelistUrl = "https://dart-review.googlesource.com/q/$changelist";
+    print("Force applying: Pretending $changelistUrl has landed");
+    landedChangelists.add(changelist);
+  }
+
+  // Apply the pre-approvals for landed changes.
+  bool updated = false;
+  final conflictsForKey = <String, List<String>>{};
+  final changelistsWithMergeConflicts = <String>{};
+  int totalNumberOfPreapprovals = 0;
+  int totalNumberOfMergeConflicts = 0;
+  for (final changelist in landedChangelists) {
+    final changelistUrl = "https://dart-review.googlesource.com/q/$changelist";
+    final commit = commitOfChangelist[changelist];
+    print("\nApplying pre-approvals for changelist "
+        "$changelistUrl landed in commit $commit");
+    int numberOfPreapprovals = 0;
+    int numberOfMergeConflicts = 0;
+    for (final key in approvals.keys) {
+      final record = approvals[key];
+      final preapprovals = record["preapprovals"];
+      final preapproval = preapprovals.remove(changelist);
+      if (preapproval == null) continue;
+      updated = true;
+      final conflicts = conflictsForKey.putIfAbsent(key, () => <String>[]);
+      if (record["result"] == preapproval["from"]) {
+        print("$changelist: $key: "
+            "${record["result"]} -> ${preapproval["result"]}");
+        conflicts.add("$changelist/$commit had changed approval from "
+            "${record["result"]} to ${preapproval["result"]}");
+        record["result"] = preapproval["result"];
+        record["matches"] = preapproval["matches"];
+        record["expected"] = preapproval["expected"];
+        record["approver"] = preapproval["preapprover"];
+        record["approved_at"] = preapproval["preapproved_at"];
+        numberOfPreapprovals++;
+        totalNumberOfPreapprovals++;
+      } else {
+        print("$changelist: $key: MERGE CONFLICT:");
+        for (final conflict in conflicts) {
+          print(" * $conflict");
+        }
+        print(" * MERGE CONFLICT: Cannot change approval from "
+            "${preapproval["from"]} to ${preapproval["result"]} "
+            "because it's currently ${record["result"]}");
+        changelistsWithMergeConflicts.add(changelist);
+        numberOfMergeConflicts++;
+        totalNumberOfMergeConflicts++;
+      }
+    }
+    if (0 < numberOfPreapprovals) {
+      print("$numberOfPreapprovals "
+          "pre-approvals applied from $changelistUrl commit $commit");
+    }
+    if (0 < numberOfMergeConflicts) {
+      print("Warning: $numberOfMergeConflicts "
+          "merge conflicts in pre-approvals for $changelistUrl commit $commit");
+    }
+  }
+
+  // Expire old pre-approvals.
+  final now = new DateTime.now().toUtc();
+  final expiredChangelists = <String>{};
+  for (final record in approvals.values) {
+    final preapprovals = record["preapprovals"];
+    final changelists = preapprovals.keys.toList();
+    for (final changelist in changelists) {
+      final preapproval = preapprovals[changelist];
+      final expires = DateTime.parse(preapproval["expires"]);
+      if (expires.isBefore(now)) {
+        updated = true;
+        preapprovals.remove(changelist);
+        expiredChangelists.add(changelist);
+      }
+    }
+  }
+  if (expiredChangelists.isNotEmpty) {
+    print("");
+  }
+  for (final changelist in expiredChangelists) {
+    final changelistUrl = "https://dart-review.googlesource.com/q/$changelist";
+    print("Expired: Pre-approvals for changelist $changelistUrl have expired");
+  }
+
+  // Format a final report.
+  print("");
+  final landedChangelistsCount = landedChangelists.length;
+  if (0 < landedChangelistsCount) {
+    print("$landedChangelistsCount changelists have landed");
+  }
+  final expiredChangelistsCount = expiredChangelists.length;
+  if (0 < expiredChangelistsCount) {
+    print("$expiredChangelistsCount changelists have expired");
+  }
+  final unlandedChangelistsCount =
+      unlandedChangelists.length - expiredChangelistsCount;
+  if (0 < unlandedChangelistsCount) {
+    print("$unlandedChangelistsCount changelists are pending");
+  }
+  if (0 < totalNumberOfPreapprovals) {
+    print("$totalNumberOfPreapprovals pre-approvals applied");
+  }
+  if (0 < totalNumberOfPreapprovals) {
+    print("Warning: $totalNumberOfMergeConflicts "
+        "pre-approvals had merge conflicts");
+  }
+
+  // Save the updated approvals and upload them to cloud storage.
+  print("");
+  if (!updated) {
+    print("Approvals are unchanged");
+    return;
+  }
+  if (options["dry"]) {
+    print("Dry run, not saving the updated approvals");
+    return;
+  }
+  await new File(approvalsPath).writeAsString(
+      approvals.values.map((data) => jsonEncode(data) + "\n").join(""));
+  print("Wrote updated approvals to $approvalsPath");
+  if (options["upload"] != null) {
+    print("Uploading updated approvals to ${options["upload"]}...");
+    await cpGsutil(approvalsPath, options["upload"]);
+    print("Uploaded updated approvals to ${options["upload"]}");
+  }
+}
diff --git a/tools/bots/compare_results.dart b/tools/bots/compare_results.dart
index c3820a0..792a473 100755
--- a/tools/bots/compare_results.dart
+++ b/tools/bots/compare_results.dart
@@ -273,7 +273,7 @@
         ? new Result.fromMap(mapBefore, flakinessData[name])
         : null;
     final resultAfter = new Result.fromMap(mapAfter, flakinessData[name]);
-    final resultApproved = mapApproved != null
+    final resultApproved = mapApproved != null && mapApproved["result"] != null
         ? new Result.fromMap(mapApproved, flakinessData[name])
         : null;
     final event = new Event(resultBefore, resultAfter, resultApproved);
diff --git a/tools/bots/dart_sdk.py b/tools/bots/dart_sdk.py
index be81900..301f269 100755
--- a/tools/bots/dart_sdk.py
+++ b/tools/bots/dart_sdk.py
@@ -27,16 +27,6 @@
  else:
    return ['ia32', 'x64']
 
-def BuildSDK():
-  with bot.BuildStep('Build SDK'):
-    if BUILD_OS == 'linux':
-      sysroot_env = dict(os.environ)
-      sysroot_env['DART_USE_WHEEZY'] = '1'
-      Run([sys.executable, './tools/generate_buildfiles.py'], env=sysroot_env)
-    for arch in BuildArchitectures():
-      Run([sys.executable, './tools/build.py', '--mode=release',
-           '--arch=' + arch, 'create_sdk'])
-
 def BuildDartdocAPIDocs(dirname):
   dart_sdk = os.path.join(bot_utils.DART_DIR,
                           utils.GetBuildRoot(BUILD_OS, 'release',
@@ -76,10 +66,19 @@
       sdk_path = os.path.join(bot_utils.DART_DIR,
                               utils.GetBuildRoot(BUILD_OS, 'release', arch),
                               'dart-sdk')
+      product_sdk_path = os.path.join(bot_utils.DART_DIR,
+                              utils.GetBuildRoot(BUILD_OS, 'product', arch),
+                              'dart-sdk')
       sdk_zip = os.path.join(bot_utils.DART_DIR,
                              utils.GetBuildRoot(BUILD_OS, 'release', arch),
                              'dartsdk-%s-%s.zip' % (BUILD_OS, arch))
       FileDelete(sdk_zip)
+      # We don't support precompilation on ia32.
+      if arch != 'ia32':
+        # Patch in all the PRODUCT built AOT binaries.
+        CopyBetween(product_sdk_path, sdk_path, 'bin', 'utils', GuessExtension('gen_snapshot'))
+        CopyBetween(product_sdk_path, sdk_path, 'bin', GuessExtension('dartaotruntime'))
+      # Zip it up.
       CreateZip(sdk_path, sdk_zip)
       DartArchiveUploadSDKs(BUILD_OS, arch, sdk_zip)
 
@@ -102,11 +101,6 @@
     gs_path = namer.unstripped_filepath(revision, BUILD_OS, arch)
     DartArchiveFile(binary, gs_path)
 
-def CreateUploadSDK():
-  BuildSDK()
-  CreateUploadSDKZips()
-  DartArchiveUnstrippedBinaries()
-
 def CreateUploadAPIDocs():
   dartdoc_dir = os.path.join(bot_utils.DART_DIR,
                              utils.GetBuildRoot(BUILD_OS, 'release',
@@ -116,7 +110,7 @@
                              utils.GetBuildRoot(BUILD_OS, 'release',
                                                 BUILD_ARCHITECTURE),
                              'dartdocs-api.zip')
-  if CHANNEL == 'try':
+  if CHANNEL == bot_utils.Channel.TRY:
     BuildDartdocAPIDocs(dartdoc_dir)
   else:
     UploadApiLatestFile()
@@ -201,6 +195,21 @@
   if os.path.exists(f):
     os.remove(f)
 
+def CopyBetween(src_path, dst_path, *relatives):
+  try:
+    os.makedirs(os.path.join(dst_path, *relatives[:-1]))
+  except OSError:
+    # This is fine.
+    pass
+  shutil.copy2(
+      os.path.join(src_path, *relatives),
+      os.path.join(dst_path, *relatives[:-1]))
+
+def GuessExtension(binary):
+  if 'win' in BUILD_OS:
+    return binary + '.exe'
+  return binary
+
 def DartArchiveFile(local_path, remote_path, checksum_files=False):
   gsutil = bot_utils.GSUtil()
   gsutil.upload(local_path, remote_path, public=True)
@@ -226,11 +235,8 @@
   if len(sys.argv) > 1 and sys.argv[1] == 'api_docs':
     if BUILD_OS == 'linux':
       CreateUploadAPIDocs()
-  else:
-    # We always clobber the bot, to make sure releases are build from scratch
-    force = CHANNEL != bot_utils.Channel.BLEEDING_EDGE
-    bot.Clobber(force=force)
-
-    CreateUploadSDK()
+  elif CHANNEL != bot_utils.Channel.TRY:
+    CreateUploadSDKZips()
+    DartArchiveUnstrippedBinaries()
     if BUILD_OS == 'linux':
       CreateUploadVersionFile()
diff --git a/tools/bots/extend_results.dart b/tools/bots/extend_results.dart
new file mode 100644
index 0000000..ac69dd9
--- /dev/null
+++ b/tools/bots/extend_results.dart
@@ -0,0 +1,55 @@
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+// Add fields with data about the test run and the commit tested, and
+// with the result on the last build tested, to the test results file.
+
+import 'dart:convert';
+import 'dart:io';
+
+import 'results.dart';
+
+main(List<String> args) async {
+  final resultsPath = args[0];
+  final priorResultsPath = args[1];
+  final flakyPath = args[2];
+  final priorFlakyPath = args[3];
+  final builderName = args[4];
+  final buildNumber = args[5];
+  final commitTime = int.parse(args[6]);
+  final commitHash = args[7];
+  final newResultsPath = args[8];
+  // Load the input and the flakiness data if specified.
+  final results = await loadResultsMap(resultsPath);
+  final priorResults = await loadResultsMap(priorResultsPath);
+  final flakes = await loadResultsMap(flakyPath);
+  final priorFlakes = await loadResultsMap(priorFlakyPath);
+
+  for (final String key in results.keys) {
+    final Map<String, dynamic> result = results[key];
+    final Map<String, dynamic> priorResult = priorResults[key];
+    final Map<String, dynamic> flaky = flakes[key];
+    final Map<String, dynamic> priorFlaky = priorFlakes[key];
+    result['commit_hash'] = commitHash;
+    result['commit_time'] = commitTime;
+    result['build_number'] = buildNumber;
+    result['builder_name'] = builderName;
+    result['flaky'] = (flaky != null);
+    result['previous_flaky'] = (priorFlaky != null);
+    if (priorResult != null) {
+      result['previous_result'] = priorResult['result'];
+      result['previous_commit_hash'] = priorResult['commit_hash'];
+      result['previous_commit_time'] = priorResult['commit_time'];
+      result['previous_build_number'] = priorResult['build_number'];
+    }
+    result['changed'] = (result['result'] != result['previous_result'] ||
+        result['flaky'] != result['previous_flaky']);
+  }
+  final sink = new File(newResultsPath).openWrite();
+  final sorted = results.keys.toList()..sort();
+  for (final key in sorted) {
+    sink.writeln(jsonEncode(results[key]));
+  }
+  sink.close();
+}
diff --git a/tools/bots/flutter/compile_flutter.sh b/tools/bots/flutter/compile_flutter.sh
new file mode 100755
index 0000000..1c81fba
--- /dev/null
+++ b/tools/bots/flutter/compile_flutter.sh
@@ -0,0 +1,49 @@
+#!/usr/bin/env bash
+# Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE file.
+
+# Compile flutter tests with a locally built SDK.
+
+set -e
+
+checkout=$(pwd)
+dart=$checkout/out/ReleaseX64/dart-sdk/bin/dart
+sdk=$checkout/out/ReleaseX64/dart-sdk
+tmpdir=$(mktemp -d)
+cleanup() {
+  rm -rf "$tmpdir"
+}
+trap cleanup EXIT HUP INT QUIT TERM PIPE
+pushd "$tmpdir"
+
+git clone -vv https://chromium.googlesource.com/external/github.com/flutter/flutter
+
+pushd flutter
+bin/flutter config --no-analytics
+pinned_dart_sdk=$(cat bin/cache/dart-sdk/revision)
+patch=$checkout/tools/patches/flutter-engine/${pinned_dart_sdk}.flutter.patch
+if [ -e "$patch" ]; then
+  git apply $patch
+fi
+bin/flutter update-packages
+popd
+
+# Directly in temp directory again.
+mkdir engine
+pushd engine
+git clone -vv --depth 1 https://chromium.googlesource.com/external/github.com/flutter/engine flutter
+mkdir third_party
+pushd third_party
+ln -s $checkout dart
+popd
+popd
+
+mkdir flutter_patched_sdk
+
+$checkout/tools/sdks/dart-sdk/bin/dart --packages=$checkout/.packages $checkout/pkg/front_end/tool/_fasta/compile_platform.dart dart:core --single-root-scheme=org-dartlang-sdk --single-root-base=$checkout/ org-dartlang-sdk:///sdk/lib/libraries.json vm_outline_strong.dill vm_platform_strong.dill vm_outline_strong.dill
+$checkout/tools/sdks/dart-sdk/bin/dart --packages=$checkout/.packages $checkout/pkg/front_end/tool/_fasta/compile_platform.dart --target=flutter dart:core --single-root-scheme=org-dartlang-sdk --single-root-base=engine org-dartlang-sdk:///flutter/lib/snapshot/libraries.json vm_outline_strong.dill flutter_patched_sdk/platform_strong.dill flutter_patched_sdk/outline_strong.dill
+
+popd
+
+$dart --enable-asserts pkg/vm/test/frontend_server_flutter.dart --flutterDir=$tmpdir/flutter --flutterPlatformDir=$tmpdir/flutter_patched_sdk
diff --git a/tools/bots/linux_distribution_support.py b/tools/bots/linux_distribution_support.py
index 7e86e8c..28c26c7 100644
--- a/tools/bots/linux_distribution_support.py
+++ b/tools/bots/linux_distribution_support.py
@@ -35,33 +35,14 @@
     return None
   return bot.BuildInfo('none', 'none', 'release', 'linux')
 
-def ArchiveArtifacts(tarfile, builddir, channel):
-  namer = bot_utils.GCSNamer(channel=channel)
-  gsutil = bot_utils.GSUtil()
-  revision = utils.GetArchiveVersion()
-  # Archive the src tar to the src dir
-  remote_tarfile = '/'.join([namer.src_directory(revision),
-                             os.path.basename(tarfile)])
-  gsutil.upload(tarfile, remote_tarfile, public=True)
-  # Archive all files except the tar file to the linux packages dir
-  for entry in os.listdir(builddir):
-    full_path = os.path.join(builddir, entry)
-    # We expect a flat structure, not subdirectories
-    assert(os.path.isfile(full_path))
-    if full_path != tarfile:
-      package_dir = namer.linux_packages_directory(revision)
-      remote_file = '/'.join([package_dir,
-                              os.path.basename(entry)])
-      gsutil.upload(full_path, remote_file, public=True)
-
 def InstallFromDep(builddir):
   for entry in os.listdir(builddir):
     if entry.endswith("_amd64.deb"):
       path = os.path.join(builddir, entry)
-      Run(['sudo', 'dpkg', '-i', path])
+      Run(['dpkg', '-i', path])
 
 def UninstallDart():
-  Run(['sudo', 'dpkg', '-r', 'dart'])
+  Run(['dpkg', '-r', 'dart'])
 
 def CreateDartTestFile(tempdir):
   filename = os.path.join(tempdir, 'test.dart')
@@ -162,13 +143,6 @@
     UninstallDart()
     TestInstallation(assume_installed=False)
 
-  with bot.BuildStep('Upload artifacts'):
-    bot_name, _ = bot.GetBotName()
-    channel = bot_utils.GetChannelFromName(bot_name)
-    if channel != bot_utils.Channel.BLEEDING_EDGE:
-     ArchiveArtifacts(tarfile, builddir, channel)
-    else:
-      print 'Not uploading artifacts on bleeding edge'
 
 if __name__ == '__main__':
   # We pass in None for build_step to avoid building the sdk.
diff --git a/tools/bots/results.dart b/tools/bots/results.dart
index 549cafe..65ae36f 100644
--- a/tools/bots/results.dart
+++ b/tools/bots/results.dart
@@ -30,10 +30,16 @@
         processResult.stderr.contains("One or more URLs matched no objects")) {
       return null;
     }
-    throw new Exception("Failed to run: python $gsutilPy $arguments\n"
+    String error = "Failed to run: python $gsutilPy $arguments\n"
         "exitCode: ${processResult.exitCode}\n"
         "stdout:\n${processResult.stdout}\n"
-        "stderr:\n${processResult.stderr}");
+        "stderr:\n${processResult.stderr}";
+    if (processResult.exitCode == 1 &&
+        processResult.stderr.contains("401 Anonymous caller")) {
+      error =
+          "\n\nYou need to authenticate by running:\npython $gsutilPy config\n";
+    }
+    throw new Exception(error);
   }
   return processResult.stdout;
 }
diff --git a/tools/bots/test_matrix.json b/tools/bots/test_matrix.json
index 863c5af..3cd4ed0 100644
--- a/tools/bots/test_matrix.json
+++ b/tools/bots/test_matrix.json
@@ -3,6 +3,10 @@
     "chrome": "65",
     "firefox": "61"
   },
+  "branches": [
+    "analyzer-stable",
+    "master"
+  ],
   "filesets": {
     "analyzer_unit_tests": [
       ".packages",
@@ -38,6 +42,7 @@
       "tests/search/",
       "tests/standalone/",
       "tests/standalone_2/",
+      "tests/ffi/",
       "third_party/d8/",
       "third_party/observatory_pub_packages/packages/web_components/",
       "third_party/pkg/",
@@ -76,6 +81,7 @@
       "tests/search/",
       "tests/standalone/",
       "tests/standalone_2/",
+      "tests/ffi/",
       "third_party/d8/",
       "third_party/pkg/",
       "third_party/pkg_tested/",
@@ -122,18 +128,27 @@
     ],
     "vm-kernel": [
       "out/DebugIA32/",
+      "out/DebugX64/",
       "out/DebugSIMARM/",
       "out/DebugSIMARM64/",
       "out/DebugSIMDBC64/",
-      "out/DebugX64/",
-      "out/ProductX64/",
-      "out/ReleaseAndroidARM/",
+      "out/DebugAndroidARM/",
+      "out/DebugAndroidARM64/",
       "out/ReleaseIA32/",
+      "out/ReleaseX64/",
       "out/ReleaseSIMARM/",
       "out/ReleaseSIMARM64/",
-      "out/ReleaseXARM64/",
       "out/ReleaseSIMDBC64/",
-      "out/ReleaseX64/",
+      "out/ReleaseAndroidARM/",
+      "out/ReleaseAndroidARM64/",
+      "out/ReleaseXARM64/",
+      "out/ProductIA32/",
+      "out/ProductX64/",
+      "out/ProductSIMARM/",
+      "out/ProductSIMARM64/",
+      "out/ProductSIMDBC64/",
+      "out/ProductAndroidARM/",
+      "out/ProductAndroidARM64/",
       "xcodebuild/DebugIA32/",
       "xcodebuild/DebugSIMDBC64/",
       "xcodebuild/DebugX64/",
@@ -164,6 +179,7 @@
       "tests/search/",
       "tests/standalone/",
       "tests/standalone_2/",
+      "tests/ffi/",
       "pkg/async_helper/",
       "pkg/build_integration/",
       "pkg/dart_internal/",
@@ -191,7 +207,7 @@
         "timeout": 240,
         "use-sdk": true
     }},
-    "unittest-asserts-(release|debug)-(linux|mac|win)": {
+    "unittest-asserts-(debug|product|release)-(linux|mac|win)": {
       "options": {
         "compiler": "dartk",
         "enable-asserts": true,
@@ -207,7 +223,7 @@
         "runtime": "vm",
         "timeout": 240
     }},
-    "unittest-analyzer_use_fasta-linux": {
+    "unittest-analyzer_use_fasta-(linux|mac|win)": {
       "options": {
         "compiler": "none",
         "runtime": "vm",
@@ -216,7 +232,7 @@
         "vm-options": ["-DuseFastaParser=true"],
         "builder-tag": "analyzer_use_fasta"
     }},
-    "dartk-asan-linux-release-(ia32|x64)": {
+    "dartk-asan-(linux|mac|win)-(debug|product|release)-(ia32|x64)": {
       "options": {
         "builder-tag": "asan",
         "timeout": 240
@@ -237,96 +253,105 @@
       "options": {
         "use-sdk": true
     }},
-    "dart2js-minified-csp-linux-chrome": {
+    "dart2js-minified-csp-(linux|mac|win)-chrome": {
       "options": {
         "minified": true,
         "csp": true,
         "use-sdk": true
     }},
-    "dart2js-minified-linux-d8": {
+    "dart2js-minified-(linux|mac|win)-d8": {
       "options": {
         "minified": true,
         "use-sdk": true
     }},
-    "dart2js-hostasserts-linux-ia32-d8": {
+    "dart2js-production-(linux|mac|win)-d8": {
+      "options": {
+        "builder-tag": "dart2js_production",
+        "use-sdk": true,
+        "dart2js-options": ["-O3"]
+    }},
+    "dart2js-hostasserts-(linux|mac|win)-(ia32|x64)-d8": {
       "options": {
         "host-checked": true
     }},
-    "dartkp-android-release-arm": {
+    "dartkp-android-(debug|product|release)-arm": {
       "options": {
         "use-blobs": true
     }},
-    "dartkp-linux-release-(simarm|simarm64)": {
+    "dartk-android-(debug|product|release)-(arm|arm64)": {},
+    "dartkp-linux-(debug|product|release)-(simarm|simarm64)": {
       "options": {
         "use-blobs": true
     }},
-    "dartkp-(win|mac)-release-simarm64": {
+    "dartkp-(win|mac)-(debug|product|release)-(simarm|simarm64)": {
       "options": {
         "use-blobs": true
     }},
-    "dartkp-win-release-x64": {
+    "dartkp-win-(product|release)-x64": {
       "options": {
         "use-blobs": true
     }},
-    "dartkp-linux-(product|release)-x64": { },
-    "dartkp-obfuscate-linux-release-x64": {
+    "dartkp-win-debug-x64": {
+      "options": {
+        "use-blobs": true,
+        "vm-options": ["--no-enable-malloc-hooks"]
+    }},
+    "dartkp-(linux|mac)-(product|release)-x64": { },
+    "dartkp-obfuscate-(linux|mac|win)-(debug|product|release)-x64": {
       "options": {
         "builder-tag": "obfuscated",
         "vm-options": ["--obfuscate"]
     }},
-    "dartkp-linux-debug-x64": {
+    "dartkp-(linux|mac)-debug-x64": {
       "options": {
         "vm-options": ["--no-enable-malloc-hooks"]
     }},
-    "dartkp-no-bare-linux-(debug|release)-x64": {
+    "dartkp-no-bare-(linux|mac|win)-(debug|product|release)-x64": {
       "options": {
         "vm-options": ["--no-enable-malloc-hooks", "--no-use-bare-instructions"]
     }},
-    "dartkp-no-bare-linux-(debug|release)-(simarm|simarm64)": {
+    "dartkp-no-bare-(linux|mac|win)-(debug|product|release)-(simarm|simarm64)": {
       "options": {
         "vm-options": ["--no-enable-malloc-hooks", "--no-use-bare-instructions"],
         "use-blobs": true
     }},
-    "dartk-(linux|mac)-(debug|release)-(ia32|x64)": { },
-    "dartk-checked-linux-release-x64": {
+    "dartk-(linux|mac|win)-(debug|product|release)-(ia32|x64)": { },
+    "dartk-checked-(linux|mac|win)-(debug|product|release)-(ia32|x64)": {
       "options": {
-        "checked": true
+	"enable-asserts": true
     }},
-    "dartk-win-(debug|release)-(ia32|x64)": { },
-    "dartk-(linux|mac|win)-product-x64": { },
-    "dartk-(linux|mac)-(debug|release)-simdbc64": { },
-    "dartk-linux-release-(arm64|simarm|simarm64)": { },
-    "dartk-optcounter-linux-release-(ia32|x64)": {
+    "dartk-(linux|mac|win)-(debug|product|release)-(arm64|simarm|simarm64|simdbc64)": { },
+    "dartk-optcounter-(linux|mac|win)-(debug|product|release)-(ia32|x64)": {
       "options": {
         "builder-tag": "optimization_counter_threshold",
-        "vm-options": ["--optimization-counter-threshold=5"]
+        "vm-options": ["--optimization-counter-threshold=5", "--random-seed=__RANDOM__"]
     }},
-    "dartk-reload-linux-(debug|release)-x64": {
+    "dartk-reload-(linux|mac|win)-(debug|product|release)-(ia32|x64)": {
       "options": {
         "hot-reload": true
     }},
-    "dartk-reload-mac-(debug|release)-simdbc64": {
+    "dartk-reload-mac-(debug|product|release)-simdbc64": {
       "options": {
         "hot-reload": true
     }},
-    "dartk-reload-rollback-linux-(debug|release)-x64": {
+    "dartk-reload-rollback-(linux|mac|win)-(debug|product|release)-(ia32|x64)": {
       "options": {
         "hot-reload-rollback": true
     }},
-    "app_jitk-linux-(debug|product|release)-x64": { },
-    "dartkb-interpret-linux-(debug|release)-x64": {
+    "app_jitk-(linux|mac|win)-(debug|product|release)-(ia32|x64)": { },
+    "dartkb-interpret-(linux|mac|win)-(debug|product|release)-(ia32|x64|arm|arm64|simarm|simarm64)": {
       "options": {
         "vm-options": ["--enable_interpreter", "--compilation-counter-threshold=-1"]
     }},
-    "dartkb-mixed-linux-(debug|release)-x64": {
+    "dartkb-mixed-(linux|mac|win)-(debug|product|release)-(ia32|x64|arm|arm64|simarm|simarm64)": {
       "options": {
         "vm-options": ["--enable_interpreter"]
     }},
-    "dartkb-compile-linux-(debug|release)-x64": {
+    "dartkb-compile-(linux|mac|win)-(debug|product|release)-(ia32|x64|arm|arm64|simarm|simarm64)": {
       "options": {
         "vm-options": ["--use_bytecode_compiler"]
     }},
-    "(dartdevc|dartdevk)-checked-(linux|mac|win)-release-chrome": {
+    "(dartdevc|dartdevk)-checked-(linux|mac|win)-(debug|product|release)-chrome": {
       "options": {
         "checked": true,
         "use-sdk": true
@@ -388,7 +413,11 @@
     {
       "builders": [
         "vm-dartkb-linux-debug-x64",
-        "vm-dartkb-linux-release-x64"
+        "vm-dartkb-linux-release-x64",
+        "vm-dartkb-linux-product-x64",
+        "vm-dartkb-linux-debug-simarm64",
+        "vm-dartkb-linux-release-simarm64",
+        "vm-dartkb-linux-product-simarm64"
       ],
       "meta": {
         "description": "This configuration is used by the vm kbc builders."
@@ -398,8 +427,8 @@
           "name": "configure dart",
           "script": "tools/gn.py",
           "arguments": [
-            "--mode=debug,release",
-            "--arch=x64",
+            "--mode=${mode}",
+            "--arch=${arch}",
             "--bytecode"
           ]
         },
@@ -413,11 +442,7 @@
         {
           "name": "vm mixed mode tests",
           "arguments": [
-            "-ndartkb-mixed-linux-${mode}-x64",
-            "language_2",
-            "corelib_2",
-            "lib_2",
-            "standalone_2"
+            "-ndartkb-mixed-linux-${mode}-${arch}"
           ],
           "fileset": "vm-kernel",
           "shards": 10
@@ -425,11 +450,7 @@
         {
           "name": "vm bytecode compiler tests",
           "arguments": [
-            "-ndartkb-compile-linux-${mode}-x64",
-            "language_2",
-            "corelib_2",
-            "lib_2",
-            "standalone_2"
+            "-ndartkb-compile-linux-${mode}-${arch}"
           ],
           "fileset": "vm-kernel",
           "shards": 10
@@ -437,11 +458,7 @@
         {
           "name": "vm interpreter tests",
           "arguments": [
-            "-ndartkb-interpret-linux-${mode}-x64",
-            "language_2",
-            "corelib_2",
-            "lib_2",
-            "standalone_2"
+            "-ndartkb-interpret-linux-${mode}-${arch}"
           ],
           "fileset": "vm-kernel",
           "shards": 10
@@ -505,6 +522,38 @@
     },
     {
       "builders": [
+        "vm-ffi-android-debug-arm64",
+        "vm-ffi-android-debug-arm",
+        "vm-ffi-android-release-arm64",
+        "vm-ffi-android-release-arm",
+        "vm-ffi-android-product-arm64",
+        "vm-ffi-android-product-arm"
+      ],
+      "meta": {
+        "description": "This configuration is used for running FFI tests in JIT-mode on Android."
+      },
+      "steps": [
+        {
+          "name": "build dart",
+          "script": "tools/build.py",
+          "arguments": [
+            "runtime_kernel",
+            "--os=android"
+          ]
+        },
+        {
+          "name": "ffi tests",
+          "arguments": [
+            "-ndartk-android-${mode}-${arch}",
+            "ffi"
+          ],
+          "fileset": "vm-kernel",
+          "shards": 1
+        }
+      ]
+    },
+    {
+      "builders": [
         "vm-kernel-precomp-linux-debug-x64",
         "vm-kernel-precomp-linux-product-x64",
         "vm-kernel-precomp-linux-release-simarm",
@@ -610,7 +659,7 @@
           "arguments": [
             "-ndartk-asan-linux-release-${arch}"],
           "environment": {
-            "ASAN_OPTIONS": "handle_segv=0:detect_stack_use_after_return=0",
+            "ASAN_OPTIONS": "handle_segv=0:detect_stack_use_after_return=0:disable_coredump=0",
             "ASAN_SYMBOLIZER_PATH": "buildtools/linux-x64/clang/bin/llvm-symbolizer"
           }
         }
@@ -749,7 +798,9 @@
         {
           "name": "vm tests",
           "arguments": [
-            "-napp_jitk-linux-${mode}-x64"]
+            "-napp_jitk-linux-${mode}-x64"],
+          "shards": 6,
+          "fileset": "vm-kernel"
         }
       ]
     },
@@ -834,6 +885,14 @@
             "pkg/dev_compiler/test/sourcemap/stacktrace_ddk_suite.dart",
             "-rnone"
           ]
+        },
+        {
+          "name": "ddc worker tests",
+          "script": "out/ReleaseX64/dart",
+          "arguments": [
+            "pkg/dev_compiler/test/worker/worker_test.dart",
+            "-rnone"
+          ]
         }
       ]
     },
@@ -899,6 +958,14 @@
             "pkg/dev_compiler/test/sourcemap/stacktrace_ddk_suite.dart",
             "-rnone"
           ]
+        },
+        {
+          "name": "ddc worker tests",
+          "script": "xcodebuild/ReleaseX64/dart",
+          "arguments": [
+            "pkg/dev_compiler/test/worker/worker_test.dart",
+            "-rnone"
+          ]
         }
       ]
     },
@@ -1175,6 +1242,25 @@
             "dart2js_extra",
             "dart2js_native"
           ]
+        },
+        {
+          "name": "dart2js production tests",
+          "arguments": [
+            "-ndart2js-production-linux-d8",
+            "--dart2js-batch",
+            "--exclude_suite=observatory_ui"
+          ],
+          "shards": 6,
+          "fileset": "dart2js"
+        },
+        {
+          "name": "dart2js production extra tests",
+          "arguments": [
+            "-ndart2js-production-linux-d8",
+            "--dart2js-batch",
+            "dart2js_extra",
+            "dart2js_native"
+          ]
         }
       ]
     },
@@ -1239,47 +1325,100 @@
       "steps": [
         {
           "name": "build dart",
-          "script": "tools/bots/dart_sdk.py",
-          "arguments": [],
-          "environment": {"BUILDBOT_BUILDERNAME": "dart-sdk-linux"}
-
+          "script": "tools/build.py",
+          "arguments": ["--arch=ia32,x64,arm,arm64",
+                        "--mode=release", "create_sdk"]
+        },
+        {
+          "name": "build gen_kernel.dart.snapshot and dart2aot",
+          "script": "tools/build.py",
+          "arguments": ["--arch=x64,arm,arm64", "--mode=release",
+                        "copy_gen_kernel_snapshot", "copy_dart2aot"]
+        },
+        {
+          "name": "build gen_snapshot and dartaotruntime",
+          "script": "tools/build.py",
+          "arguments": ["--arch=x64,arm,arm64", "--mode=product",
+                        "copy_gen_snapshot", "copy_dartaotruntime"]
+        },
+        {
+          "name": "upload sdk",
+          "script": "tools/bots/dart_sdk.py"
         },
         {
           "name": "build api docs",
           "script": "tools/bots/dart_sdk.py",
-          "arguments": [ "api_docs" ],
-          "environment": {"BUILDBOT_BUILDERNAME": "dart-sdk-linux"}
-
+          "arguments": [ "api_docs" ]
+        },
+        {
+          "name": "upload abi dills",
+          "script": "tools/upload_abi_dills.sh",
+          "arguments": [
+            "tools/VERSION",
+            "out/ReleaseX64"
+          ]
         }
       ]
     },
     {
-      "builders": ["dart-sdk-mac"],
+      "builders": ["dart-sdk-mac",
+                   "dart-sdk-win"],
       "meta": {
-        "description": "This configuration is used by the sdk-builder for mac."
+        "description": "This configuration is used by the sdk-builders for MacOS and Windows."
       },
       "steps": [
         {
           "name": "build dart",
-          "script": "tools/bots/dart_sdk.py",
-          "arguments": [],
-          "environment": {"BUILDBOT_BUILDERNAME": "dart-sdk-mac"}
-
+          "script": "tools/build.py",
+          "arguments": ["--arch=ia32,x64",
+                        "--mode=release", "create_sdk"]
+        },
+        {
+          "name": "build gen_kernel.dart.snapshot and dart2aot",
+          "script": "tools/build.py",
+          "arguments": ["--arch=x64", "--mode=release",
+                        "copy_gen_kernel_snapshot", "copy_dart2aot"]
+        },
+        {
+          "name": "build gen_snapshot and dartaotruntime",
+          "script": "tools/build.py",
+          "arguments": ["--arch=x64", "--mode=product",
+                        "copy_gen_snapshot", "copy_dartaotruntime"]
+        },
+        {
+          "name": "upload sdk",
+          "script": "tools/bots/dart_sdk.py"
         }
       ]
     },
     {
-      "builders": ["dart-sdk-win"],
+      "builders": ["debianpackage-linux"],
       "meta": {
-        "description": "This configuration is used by the sdk-builder for windows."
+        "description": "This configuration is used by the debianpackage-builder."
       },
       "steps": [
         {
-          "name": "build dart",
-          "script": "tools/bots/dart_sdk.py",
-          "arguments": [],
-          "environment": {"BUILDBOT_BUILDERNAME": "dart-sdk-win"}
-
+          "name": "build debian package",
+          "script": "tools/run_debian_build.sh",
+          "arguments": []
+        },
+        {
+          "name": "upload debian packages",
+          "script": "tools/bots/upload_debian_packages.py",
+          "arguments": []
+        }
+      ]
+    },
+    {
+      "builders": ["versionchecker-linux"],
+      "meta": {
+        "description": "This configuration is used by the versionchecker-builder."
+      },
+      "steps": [
+        {
+          "name": "check version",
+          "script": "tools/bots/version_checker.py",
+          "arguments": []
         }
       ]
     },
@@ -1348,7 +1487,7 @@
         {
           "name": "analyze tests co19_2",
           "arguments": [
-            "-nanalyzer-${system}",
+            "-nanalyzer-asserts-${system}",
             "co19_2"
           ]
         }
@@ -1535,7 +1674,7 @@
           "name": "package unit tests",
           "arguments": [
             "-nunittest-asserts-${mode}-${system}",
-            "pkg"
+            "pkg/pkg/(?!front_end/|kernel/)"
           ]
         },
         {
@@ -1569,7 +1708,7 @@
           "name": "package unit tests",
           "arguments": [
             "-nunittest-asserts-${mode}-${system}",
-            "pkg"
+            "pkg/pkg/(?!front_end/|kernel/)"
           ]
         },
         {
@@ -1601,14 +1740,23 @@
           "arguments": ["noop"]
         },
         {
-          "name": "remove out directory to do a clean build",
+          "name": "remove out directory to do a clean linux-ia32 build",
           "script": "tools/bots/try_benchmarks.sh",
           "arguments": ["clean"]
         },
         {
           "name": "build linux-ia32 for benchmarking",
+          "script": "tools/build.py",
+          "arguments": [
+            "--mode=release",
+            "--arch=ia32",
+            "create_sdk",
+            "runtime"]
+        },
+        {
+          "name": "archive linux-ia32 for benchmarking",
           "script": "tools/bots/try_benchmarks.sh",
-          "arguments": ["linux-ia32-build"]
+          "arguments": ["linux-ia32-archive"]
         },
         {
           "name": "try linux-ia32 benchmarking",
@@ -1616,14 +1764,69 @@
           "arguments": ["linux-ia32-benchmark"]
         },
         {
-          "name": "build linux-x64 for benchmarking",
+          "name": "remove out directory to do a clean linux-x64 build",
           "script": "tools/bots/try_benchmarks.sh",
-          "arguments": ["linux-x64-build"]
+          "arguments": ["clean"]
+        },
+        {
+          "name": "build linux-x64 for benchmarking",
+          "script": "tools/build.py",
+          "arguments": [
+            "--mode=release",
+            "--arch=x64",
+            "create_sdk",
+            "runtime",
+            "gen_snapshot",
+            "dart_precompiled_runtime"]
+        },
+        {
+          "name": "build linux-x64 simdbc for benchmarking",
+          "script": "tools/build.py",
+          "arguments": ["--mode=release", "--arch=simdbc64", "runtime"]
+        },
+        {
+          "name": "archive linux-x64 for benchmarking",
+          "script": "tools/bots/try_benchmarks.sh",
+          "arguments": ["linux-x64-archive"]
         },
         {
           "name": "try linux-x64 benchmarking",
           "script": "tools/bots/try_benchmarks.sh",
           "arguments": ["linux-x64-benchmark"]
+        },
+        {
+          "name": "remove out directory to do a clean linux-x64-bytecode build",
+          "script": "tools/bots/try_benchmarks.sh",
+          "arguments": ["clean"]
+        },
+        {
+          "name": "generate ninja for linux-x64-bytecode",
+          "script": "tools/gn.py",
+          "arguments": [
+            "--mode=release",
+            "--arch=x64",
+            "--bytecode"]
+        },
+        {
+          "name": "build linux-x64-bytecode for benchmarking",
+          "script": "tools/build.py",
+          "arguments": [
+            "--mode=release",
+            "--arch=x64",
+            "create_sdk",
+            "runtime",
+            "gen_snapshot",
+            "dart_precompiled_runtime"]
+        },
+        {
+          "name": "archive linux-x64-bytecode for benchmarking",
+          "script": "tools/bots/try_benchmarks.sh",
+          "arguments": ["linux-x64-bytecode-archive"]
+        },
+        {
+          "name": "try linux-x64-bytecode benchmarking",
+          "script": "tools/bots/try_benchmarks.sh",
+          "arguments": ["linux-x64-bytecode-benchmark"]
         }
       ]
     },
@@ -1652,6 +1855,30 @@
       ]
     },
     {
+      "builders": [
+        "flutter-frontend"
+      ],
+      "meta": {
+        "description": "This configuration is used for running frontend tests on flutter code."
+      },
+      "steps": [
+        {
+          "name": "build dart",
+          "script": "tools/build.py",
+          "arguments": [
+            "--mode=release",
+            "--arch=x64",
+            "create_sdk"
+          ]
+        },
+        {
+
+          "name": "compile flutter tests",
+          "script": "tools/bots/flutter/compile_flutter.sh"
+        }
+      ]
+    },
+    {
       "builders": ["fuzz-linux"],
       "meta": {
         "description": "This configuration is used for fuzz testing."
diff --git a/tools/bots/try_benchmarks.sh b/tools/bots/try_benchmarks.sh
index 59a7971..a501a0d 100755
--- a/tools/bots/try_benchmarks.sh
+++ b/tools/bots/try_benchmarks.sh
@@ -13,16 +13,23 @@
 owner=sortie
 
 if [ $# -lt 1 ]; then
-  echo "Usage: $0 COMMAND ..."
-  echo
-  echo "Where COMMAND is one of:"
-  echo
-  echo "    noop - Just print description."
-  echo "    clean - Remove out/ directory."
-  echo "    linux-ia32-build - Build linux-ia32 for benchmarking."
-  echo "    linux-ia32-benchmark - Try linux-ia32 benchmarking."
-  echo "    linux-x64-build - Build linux-x64 for benchmarking."
-  echo "    linux-x64-benchmark - Try linux-x64 benchmarking."
+cat << EOF
+Usage: $0 COMMAND ..."
+
+Where COMMAND is one of:"
+
+    noop - Just print description.
+    clean - Remove out/ directory.
+    linux-ia32-build - Build linux-ia32 for benchmarking.
+    linux-ia32-archive - Archive linux-ia32.
+    linux-ia32-benchmark - Try linux-ia32 benchmarking.
+    linux-x64-build - Build linux-x64 for benchmarking.
+    linux-x64-archive - Archive linux-x64.
+    linux-x64-benchmark - Try linux-x64 benchmarking.
+    linux-x64-bytecode-build - Build linux-x64 with bytecode for benchmarking.
+    linux-x64-bytecode-archive - Archive linux-x64 with bytecode.
+    linux-x64-bytecode-benchmark - Try linux-x64 with bytecode benchmarking.
+EOF
   exit 1
 fi
 
@@ -64,13 +71,16 @@
     :
   elif [ "$command" = clean ]; then
     rm -rf out
+    rm -rf tmp
     rm -f linux-ia32.tar.gz
     rm -f linux-ia32_profile.tar.gz
     rm -f linux-x64.tar.gz
     rm -f linux-x64_profile.tar.gz
   elif [ "$command" = linux-ia32-build ]; then
+    # NOTE: These are duplicated in tools/bots/test_matrix.json, keep in sync.
     ./tools/build.py --mode=release --arch=ia32 create_sdk
     ./tools/build.py --mode=release --arch=ia32 runtime
+  elif [ "$command" = linux-ia32-archive ]; then
     tar -czf linux-ia32_profile.tar.gz \
       --exclude .git \
       --exclude .gitignore \
@@ -208,12 +218,24 @@
     out/ReleaseIA32/run_vm_tests GenKernelKernelLoadKernel
     cd ..
     rm -rf tmp
-  elif [ "$command" = linux-x64-build ]; then
+  elif [ "$command" = linux-x64-build ] ||
+       [ "$command" = linux-x64-bytecode-build ]; then
+    # NOTE: These are duplicated in tools/bots/test_matrix.json, keep in sync.
+    if [ "$command" = linux-x64-bytecode-build ]; then
+      # Beware: Don't mix --bytecode with a non-bytecode out/.
+      ./tools/gn.py --mode=release --arch=x64 --bytecode
+    fi
     ./tools/build.py --mode=release --arch=x64 create_sdk
     ./tools/build.py --mode=release --arch=x64 runtime
     ./tools/build.py --mode=release --arch=x64 gen_snapshot
     ./tools/build.py --mode=release --arch=x64 dart_precompiled_runtime
     ./tools/build.py --mode=release --arch=simdbc64 runtime
+  elif [ "$command" = linux-x64-archive ] ||
+       [ "$command" = linux-x64-bytecode-archive ]; then
+    simdbc_dart=out/ReleaseSIMDBC64/dart
+    if [ "$command" = linux-x64-bytecode-archive ]; then
+      simdbc_dart=
+    fi
     tar -czf linux-x64_profile.tar.gz \
       --exclude .git \
       --exclude .gitignore \
@@ -223,7 +245,7 @@
       out/ReleaseX64/vm_outline_strong.dill \
       out/ReleaseX64/vm_platform_strong.dill \
       out/ReleaseX64/dart-sdk \
-      out/ReleaseSIMDBC64/dart \
+      $simdbc_dart \
       out/ReleaseX64/dart \
       out/ReleaseX64/gen_snapshot \
       out/ReleaseX64/gen_kernel_bytecode.dill \
@@ -324,7 +346,7 @@
       out/ReleaseX64/vm_outline_strong.dill \
       out/ReleaseX64/vm_platform_strong.dill \
       out/ReleaseX64/dart-sdk \
-      out/ReleaseSIMDBC64/dart \
+      $simdbc_dart \
       out/ReleaseX64/dart \
       out/ReleaseX64/gen_snapshot \
       out/ReleaseX64/gen_kernel_bytecode.dill \
@@ -340,7 +362,8 @@
       runtime/bin \
       runtime/lib \
       || (rm -f linux-x64.tar.gz; exit 1)
-  elif [ "$command" = linux-x64-benchmark ]; then
+  elif [ "$command" = linux-x64-benchmark ] ||
+       [ "$command" = linux-x64-bytecode-benchmark ]; then
     rm -rf tmp
     mkdir tmp
     cd tmp
@@ -353,7 +376,14 @@
     out/ReleaseX64/dart --profile-period=10000 --packages=.packages hello.dart
     DART_CONFIGURATION=ReleaseX64 pkg/vm/tool/precompiler2 --packages=.packages hello.dart blob.bin
     DART_CONFIGURATION=ReleaseX64 pkg/vm/tool/dart_precompiled_runtime2 --profile-period=10000 blob.bin
-    out/ReleaseSIMDBC64/dart --profile-period=10000 --packages=.packages hello.dart
+    out/ReleaseX64/dart --profile-period=10000 --packages=.packages --optimization-counter-threshold=-1 hello.dart
+    out/ReleaseX64/dart --profile-period=10000 --packages=.packages --enable-interpreter hello.dart
+    out/ReleaseX64/dart --profile-period=10000 --packages=.packages --enable-interpreter --compilation-counter-threshold=-1 hello.dart
+    out/ReleaseX64/dart --profile-period=10000 --packages=.packages --use-bytecode-compiler hello.dart
+    out/ReleaseX64/dart --profile-period=10000 --packages=.packages --use-bytecode-compiler --optimization-counter-threshold=-1 hello.dart
+    if [ "$command" = linux-x64-benchmark ]; then
+      out/ReleaseSIMDBC64/dart --profile-period=10000 --packages=.packages hello.dart
+    fi
     out/ReleaseX64/dart pkg/front_end/tool/perf.dart parse hello.dart
     out/ReleaseX64/dart pkg/front_end/tool/perf.dart scan hello.dart
     out/ReleaseX64/dart pkg/front_end/tool/fasta_perf.dart --legacy kernel_gen_e2e hello.dart
diff --git a/tools/bots/update_flakiness.dart b/tools/bots/update_flakiness.dart
index c1572e7..abf1aa8 100755
--- a/tools/bots/update_flakiness.dart
+++ b/tools/bots/update_flakiness.dart
@@ -50,6 +50,7 @@
       final Map<String, dynamic> testData = data.putIfAbsent(key, newMap);
       testData["configuration"] = configuration;
       testData["name"] = name;
+      testData["expected"] = resultObject["expected"];
       final outcomes = testData.putIfAbsent("outcomes", () => []);
       final time = DateTime.now().toIso8601String();
       if (!outcomes.contains(result)) {
@@ -71,6 +72,15 @@
       firstSeen.putIfAbsent(result, () => time);
       final lastSeen = testData.putIfAbsent("last_seen", newMap);
       lastSeen[result] = time;
+      final matches = testData.putIfAbsent("matches", newMap);
+      // TODO: Temporarily fill in the matches field for all other outcomes.
+      // Remove this when all the builders have run at least once.
+      for (final outcome in occurrences.keys) {
+        matches[outcome] = resultObject["expected"] == "Fail"
+            ? ["Fail", "CompileTimeError", "RuntimeError"].contains(outcome)
+            : resultObject["expected"] == outcome;
+      }
+      matches[result] = resultObject["matches"];
 
       if (options["build-id"] != null) {
         final buildIds = testData.putIfAbsent("build_ids", newMap);
@@ -92,6 +102,11 @@
   for (final key in keys) {
     final testData = data[key];
     if (testData["outcomes"].length < 2) continue;
+    // TODO: Temporarily discard entries for old tests that don't run. Remove
+    // this when all the builders have run at least once.
+    if (!testData.containsKey("matches")) {
+      continue;
+    }
     // Forgive tests that have become deterministic again. If they flake less
     // than once in a 100 (p<1%), then if they flake again, the probability of
     // them getting past 5 runs of deflaking is 1%^5 = 0.00000001%.
diff --git a/tools/bots/upload_debian_packages.py b/tools/bots/upload_debian_packages.py
new file mode 100755
index 0000000..04750c0
--- /dev/null
+++ b/tools/bots/upload_debian_packages.py
@@ -0,0 +1,53 @@
+#!/usr/bin/python
+
+# Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE file.
+
+
+import os
+
+
+import bot
+import bot_utils
+
+
+utils = bot_utils.GetUtils()
+
+
+HOST_OS = utils.GuessOS()
+
+
+def ArchiveArtifacts(tarfile, builddir, channel):
+  namer = bot_utils.GCSNamer(channel=channel)
+  gsutil = bot_utils.GSUtil()
+  revision = utils.GetArchiveVersion()
+  # Archive the src tar to the src dir
+  remote_tarfile = '/'.join([namer.src_directory(revision),
+                             os.path.basename(tarfile)])
+  gsutil.upload(tarfile, remote_tarfile, public=True)
+  # Archive all files except the tar file to the linux packages dir
+  for entry in os.listdir(builddir):
+    full_path = os.path.join(builddir, entry)
+    # We expect a flat structure, not subdirectories
+    assert(os.path.isfile(full_path))
+    if full_path != tarfile:
+      package_dir = namer.linux_packages_directory(revision)
+      remote_file = '/'.join([package_dir,
+                              os.path.basename(entry)])
+      gsutil.upload(full_path, remote_file, public=True)
+
+
+if __name__ == '__main__':
+  bot_name, _ = bot.GetBotName()
+  channel = bot_utils.GetChannelFromName(bot_name)
+  if channel != bot_utils.Channel.BLEEDING_EDGE:
+    builddir = os.path.join(bot_utils.DART_DIR,
+                            utils.GetBuildDir(HOST_OS),
+                            'src_and_installation')
+    version = utils.GetVersion()
+    tarfilename = 'dart-%s.tar.gz' % version
+    tarfile = os.path.join(builddir, tarfilename)
+    ArchiveArtifacts(tarfile, builddir, channel)
+  else:
+    print 'Not uploading artifacts on bleeding edge'
diff --git a/tools/diff_results.dart b/tools/diff_results.dart
new file mode 100644
index 0000000..c0107d3
--- /dev/null
+++ b/tools/diff_results.dart
@@ -0,0 +1,401 @@
+#!/usr/bin/env dart
+// Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:async';
+import 'dart:io';
+import 'dart:convert';
+
+import 'package:args/args.dart';
+import 'package:glob/glob.dart';
+
+final parser = ArgParser()
+  ..addMultiOption('bot',
+      abbr: 'b',
+      help: 'Select the bots matching the glob pattern [option is repeatable]',
+      splitCommas: false)
+  ..addFlag('verbose', abbr: 'v', help: 'Verbose output.', negatable: false)
+  ..addFlag('help', help: 'Show the program usage.', negatable: false);
+
+void printUsage() {
+  print("""
+Usage: ${Platform.executable} ${Platform.script} [OLDER_COMMIT] [NEWER_COMMIT]
+
+The options are as follows:
+
+${parser.usage}""");
+}
+
+bool verbose;
+
+main(List<String> args) async {
+  final options = parser.parse(args);
+  if (options["help"]) {
+    printUsage();
+    return;
+  }
+
+  final commits = options.rest;
+  if (commits.length < 2) {
+    print('Need to supply at least two commits.');
+    printUsage();
+    exitCode = 1;
+    return;
+  }
+  verbose = options['verbose'] ?? false;
+
+  final globs = List<Glob>.from(options["bot"].map((pattern) => Glob(pattern)));
+  final vmBuilders = loadVmBuildersFromTestMatrix(globs);
+
+  final futures = <Future<List<Result>>>[];
+  for (final commit in commits) {
+    final DateTime date = await getDateOfCommit(commit);
+    futures.add(getResults(commit, date, vmBuilders));
+  }
+
+  final results = await Future.wait(futures);
+  for (int i = 0; i < results.length - 1; i++) {
+    final commitB = commits[i];
+    final commitA = commits[i + 1];
+
+    print('\nResult changes between $commitB -> $commitA:');
+    final commonGroups =
+        buildCommonGroups(commitA, commitB, results[i], results[i + 1]);
+    for (final commonGroup in commonGroups) {
+      final builders = commonGroup.builders;
+
+      print('');
+      for (final group in commonGroup.groups) {
+        final diff = group.diffs.first;
+        print('${group.test} ${diff.before} -> ${diff.after}');
+      }
+      for (final b in extractBuilderPattern(builders)) {
+        print('   on $b');
+      }
+    }
+  }
+}
+
+Future<DateTime> getDateOfCommit(String commit) async {
+  final result = await Process.run(
+      'git', ['show', '-s', '--format=%cd', '--date=iso-strict', commit]);
+  if (result.exitCode != 0) {
+    print('Could not determine date of commit $commit. Git reported:\n');
+    print(result.stdout);
+    print(result.stderr);
+    exit(1);
+  }
+  return DateTime.parse(result.stdout.trim());
+}
+
+Future<List<Result>> getResults(
+    String commit, DateTime dateC, Set<String> builders) async {
+  final DateTime date0 = dateC.add(const Duration(hours: 24));
+  final DateTime date2 = dateC.subtract(const Duration(hours: 24));
+  final query = '''
+      SELECT commit_time, builder_name, build_number, name, result, expected FROM `dart-ci.results.results`
+      WHERE commit_hash="$commit"
+        AND matches=false
+        AND (_PARTITIONDATE = "${formatDate(date0)}" OR
+             _PARTITIONDATE = "${formatDate(dateC)}" OR
+             _PARTITIONDATE = "${formatDate(date2)}" )
+        AND (STARTS_WITH(builder_name, "vm-") OR
+             STARTS_WITH(builder_name, "app-") OR
+             STARTS_WITH(builder_name, "cross-"))
+        AND ((flaky is NULL) OR flaky=false)
+        ORDER BY name''';
+
+  final arguments = <String>[
+    'query',
+    '--format=prettyjson',
+    '--project_id=dart-ci',
+    '--nouse_legacy_sql',
+    '-n',
+    '1000000',
+    query,
+  ];
+  if (verbose) {
+    print('Executing query:\n    bq ${arguments.join(' ')}');
+  }
+
+  final result = await Process.run('bq', arguments);
+  if (result.exitCode == 0) {
+    File('$commit.json').writeAsStringSync(result.stdout);
+    final resultsForCommit = json.decode(result.stdout);
+
+    final results = <Result>[];
+    for (final Map<String, dynamic> result in resultsForCommit) {
+      final builderName = result['builder_name'];
+      if (!builders.contains(builderName)) {
+        continue;
+      }
+
+      final failure = Result(commit, builderName, result['build_number'],
+          result['name'], result['expected'], result['result']);
+      results.add(failure);
+    }
+
+    results.sort((Result a, Result b) {
+      final c = a.name.compareTo(b.name);
+      if (c != 0) return c;
+      return a.builderName.compareTo(b.builderName);
+    });
+
+    return results;
+  } else {
+    print('Running the following query failed:\nbq ${arguments.join(' ')}');
+    print('Exit code: ${result.exitCode}');
+    final stdout = result.stdout.trim();
+    if (stdout.length > 0) {
+      print('Stdout:\n$stdout');
+    }
+    final stderr = result.stderr.trim();
+    if (stderr.length > 0) {
+      print('Stderr:\n$stderr');
+    }
+    return <Result>[];
+  }
+}
+
+List<CommonGroup> buildCommonGroups(String commitA, String commitB,
+    List<Result> commitResults, List<Result> commitResultsBefore) {
+  // If a test has same outcome across many vm builders
+  final diffs = <Diff>[];
+  int i = 0;
+  int j = 0;
+  while (i < commitResultsBefore.length && j < commitResults.length) {
+    final a = commitResultsBefore[i];
+    final b = commitResults[j];
+
+    // Is a smaller than b, then we had a failure before and no longer one.
+    if (a.name.compareTo(b.name) < 0 ||
+        (a.name.compareTo(b.name) == 0 &&
+            a.builderName.compareTo(b.builderName) < 0)) {
+      diffs.add(Diff(a, null));
+      i++;
+      continue;
+    }
+
+    // Is b smaller than a, then we had no failure before but have one now.
+    if (b.name.compareTo(a.name) < 0 ||
+        (b.name.compareTo(a.name) == 0 &&
+            b.builderName.compareTo(a.builderName) < 0)) {
+      diffs.add(Diff(null, b));
+      j++;
+      continue;
+    }
+
+    // Else we must have the same name and builder.
+    if (a.name != b.name || a.builderName != b.builderName) throw 'BUG';
+
+    if (a.expected != b.expected || a.result != b.result) {
+      diffs.add(Diff(a, b));
+    }
+    i++;
+    j++;
+  }
+
+  while (i < commitResultsBefore.length) {
+    final a = commitResultsBefore[i++];
+    diffs.add(Diff(a, null));
+  }
+
+  while (j < commitResults.length) {
+    final b = commitResults[j++];
+    diffs.add(Diff(null, b));
+  }
+
+  // If a test has same outcome across many vm builders
+  final groups = <GroupedDiff>[];
+  int h = 0;
+  while (h < diffs.length) {
+    final d = diffs[h++];
+    final builders = Set<String>()..add(d.builder);
+    final gropupDiffs = <Diff>[d];
+
+    while (h < diffs.length) {
+      final nd = diffs[h];
+      if (d.test == nd.test) {
+        if (d.sameExpectationDifferenceAs(nd)) {
+          builders.add(nd.builder);
+          gropupDiffs.add(nd);
+          h++;
+          continue;
+        }
+      }
+      break;
+    }
+
+    groups.add(GroupedDiff(d.test, builders.toList()..sort(), gropupDiffs));
+  }
+
+  final commonGroups = <String, List<GroupedDiff>>{};
+  for (final group in groups) {
+    final key = group.builders.join(' ');
+    commonGroups.putIfAbsent(key, () => <GroupedDiff>[]).add(group);
+  }
+
+  final commonGroupList = commonGroups.values
+      .map((list) => CommonGroup(list.first.builders, list))
+      .toList();
+  commonGroupList
+      .sort((a, b) => a.builders.length.compareTo(b.builders.length));
+  return commonGroupList;
+}
+
+class CommonGroup {
+  final List<String> builders;
+  final List<GroupedDiff> groups;
+  CommonGroup(this.builders, this.groups);
+}
+
+class GroupedDiff {
+  final String test;
+  final List<String> builders;
+  final List<Diff> diffs;
+
+  GroupedDiff(this.test, this.builders, this.diffs);
+}
+
+class Diff {
+  final Result before;
+  final Result after;
+
+  Diff(this.before, this.after);
+
+  String get test => before?.name ?? after?.name;
+  String get builder => before?.builderName ?? after?.builderName;
+
+  bool sameExpectationDifferenceAs(Diff other) {
+    if ((before == null) != (other.before == null)) return false;
+    if ((after == null) != (other.after == null)) return false;
+
+    if (before != null) {
+      if (!before.sameResult(other.before)) return false;
+    }
+    if (after != null) {
+      if (!after.sameResult(other.after)) return false;
+    }
+    return true;
+  }
+}
+
+class Result {
+  final String commit;
+  final String builderName;
+  final String buildNumber;
+  final String name;
+  final String expected;
+  final String result;
+
+  Result(this.commit, this.builderName, this.buildNumber, this.name,
+      this.expected, this.result);
+
+  String toString() => '(expected: $expected, actual: $result)';
+
+  bool sameResult(Result other) {
+    return name == other.name &&
+        expected == other.expected &&
+        result == other.result;
+  }
+
+  bool equals(other) {
+    if (other is Result) {
+      if (name != other.name) return false;
+      if (builderName != other.builderName) return false;
+    }
+    return false;
+  }
+
+  int get hashCode => name.hashCode ^ builderName.hashCode;
+}
+
+String currentDate() {
+  final timestamp = DateTime.now().toUtc().toIso8601String();
+  return timestamp.substring(0, timestamp.indexOf('T'));
+}
+
+Set<String> loadVmBuildersFromTestMatrix(List<Glob> globs) {
+  final contents = File('tools/bots/test_matrix.json').readAsStringSync();
+  final testMatrix = json.decode(contents);
+
+  final vmBuilders = Set<String>();
+  for (final config in testMatrix['builder_configurations']) {
+    for (final builder in config['builders']) {
+      if (builder.startsWith('vm-') || builder.startsWith('app-')) {
+        vmBuilders.add(builder);
+      }
+    }
+  }
+
+  // This one is in the test_matrix.json but we don't run it on CI.
+  vmBuilders.remove('vm-kernel-asan-linux-release-ia32');
+
+  if (!globs.isEmpty) {
+    vmBuilders.removeWhere((String builder) {
+      return !globs.any((Glob glob) => glob.matches(builder));
+    });
+  }
+
+  return vmBuilders;
+}
+
+List<String> extractBuilderPattern(List<String> builders) {
+  final all = Set<String>.from(builders);
+
+  String reduce(String builder, List<String> posibilities) {
+    for (final pos in posibilities) {
+      if (builder.contains(pos)) {
+        final existing = <String>[];
+        final available = <String>[];
+        for (final pos2 in posibilities) {
+          final builder2 = builder.replaceFirst(pos, pos2);
+          if (all.contains(builder2)) {
+            existing.add(builder2);
+            available.add(pos2);
+          }
+        }
+        if (existing.length > 1) {
+          all.removeAll(existing);
+          final replacement =
+              builder.replaceFirst(pos, '{${available.join(',')}}');
+          all.add(replacement);
+          return replacement;
+        }
+      }
+    }
+    return builder;
+  }
+
+  for (String builder in builders) {
+    if (all.contains(builder)) {
+      builder = reduce(builder, const ['debug', 'release', 'product']);
+    }
+  }
+  for (String builder in all.toList()) {
+    if (all.contains(builder)) {
+      builder = reduce(builder, const ['mac', 'linux', 'win']);
+    }
+  }
+
+  for (String builder in all.toList()) {
+    if (all.contains(builder)) {
+      builder = reduce(builder, const [
+        'ia32',
+        'x64',
+        'simarm',
+        'simarm64',
+        'arm',
+        'arm64',
+        'simdbc64'
+      ]);
+    }
+  }
+  return all.toList()..sort();
+}
+
+String formatDate(DateTime date) {
+  final s = date.toIso8601String();
+  return s.substring(0, s.indexOf('T'));
+}
diff --git a/tools/dom/scripts/dartmetadata.py b/tools/dom/scripts/dartmetadata.py
index cb81c49..a5a92f1 100644
--- a/tools/dom/scripts/dartmetadata.py
+++ b/tools/dom/scripts/dartmetadata.py
@@ -157,7 +157,7 @@
     # addEventListener on the target, so we avoid
     'Event.currentTarget': [
       "@Creates('Null')",
-      "@Returns('EventTarget|=Object')",
+      "@Returns('EventTarget|=Object|Null')",
     ],
 
     # Only nodes in the DOM bubble and have target !== currentTarget.
@@ -324,7 +324,7 @@
 
     'MouseEvent.relatedTarget': [
       "@Creates('Node')",
-      "@Returns('EventTarget|=Object')",
+      "@Returns('EventTarget|=Object|Null')",
     ],
 
     'Notification.data': [
diff --git a/tools/dom/src/EventStreamProvider.dart b/tools/dom/src/EventStreamProvider.dart
index 1732c71..23fd771 100644
--- a/tools/dom/src/EventStreamProvider.dart
+++ b/tools/dom/src/EventStreamProvider.dart
@@ -141,7 +141,7 @@
 
   // TODO(9757): Inlining should be smart and inline only when inlining would
   // enable scalar replacement of an immediately allocated receiver.
-  @ForceInline()
+  @pragma('dart2js:tryInline')
   StreamSubscription<T> listen(void onData(T event),
       {Function onError, void onDone(), bool cancelOnError}) {
     return new _EventStreamSubscription<T>(
diff --git a/tools/dom/src/dart2js_CssClassSet.dart b/tools/dom/src/dart2js_CssClassSet.dart
index 098d28f..5ae6795 100644
--- a/tools/dom/src/dart2js_CssClassSet.dart
+++ b/tools/dom/src/dart2js_CssClassSet.dart
@@ -140,7 +140,7 @@
     return value is String && _classListContains(_classListOf(_element), value);
   }
 
-  @ForceInline()
+  @pragma('dart2js:tryInline')
   static bool _add(Element _element, String value) {
     DomTokenList list = _classListOf(_element);
     // Compute returned result independently of action upon the set.
@@ -149,7 +149,7 @@
     return added;
   }
 
-  @ForceInline()
+  @pragma('dart2js:tryInline')
   static bool _remove(Element _element, String value) {
     DomTokenList list = _classListOf(_element);
     bool removed = _classListContainsBeforeAddOrRemove(list, value);
diff --git a/tools/dom/templates/html/impl/impl_DOMException.darttemplate b/tools/dom/templates/html/impl/impl_DOMException.darttemplate
index 4eddc81..cf127fa 100644
--- a/tools/dom/templates/html/impl/impl_DOMException.darttemplate
+++ b/tools/dom/templates/html/impl/impl_DOMException.darttemplate
@@ -27,6 +27,15 @@
   static const String TIMEOUT = 'TimeoutError';
   static const String INVALID_NODE_TYPE = 'InvalidNodeTypeError';
   static const String DATA_CLONE = 'DataCloneError';
+  static const String ENCODING = 'EncodingError';
+  static const String NOT_READABLE = 'NotReadableError';
+  static const String UNKNOWN = 'UnknownError';
+  static const String CONSTRAINT = 'ConstraintError';
+  static const String TRANSACTION_INACTIVE = 'TransactionInactiveError';
+  static const String READ_ONLY = 'ReadOnlyError';
+  static const String VERSION = 'VersionError';
+  static const String OPERATION = 'OperationError';
+  static const String NOT_ALLOWED = 'NotAllowedError';
   // Is TypeError class derived from DomException but name is 'TypeError'
   static const String TYPE_ERROR = 'TypeError';
 
diff --git a/tools/dom/templates/html/impl/impl_Document.darttemplate b/tools/dom/templates/html/impl/impl_Document.darttemplate
index 838507e..193a66e 100644
--- a/tools/dom/templates/html/impl/impl_Document.darttemplate
+++ b/tools/dom/templates/html/impl/impl_Document.darttemplate
@@ -41,7 +41,7 @@
         registerElement2(tag, {'prototype': customElementClass, 'extends': extendsTag});
   }
 
-  @ForceInline() // Almost all call sites have one argument.
+  @pragma('dart2js:tryInline') // Almost all call sites have one argument.
   Element createElement(String tagName, [String typeExtension]) {
     return (typeExtension == null)
         ? _createElement_2(tagName)
diff --git a/tools/download_abi_dills.py b/tools/download_abi_dills.py
new file mode 100644
index 0000000..51dd8c1
--- /dev/null
+++ b/tools/download_abi_dills.py
@@ -0,0 +1,48 @@
+# Downloads dill files from CIPD for each supported ABI version.
+
+import os
+import subprocess
+import sys
+import utils
+
+
+def procWait(p):
+  while p.returncode is None:
+    p.communicate()
+    p.poll()
+  return p.returncode
+
+
+def findAbiVersion(version):
+  cmd = ['cipd', 'instances', 'dart/abiversions/%d' % version]
+  p = subprocess.Popen(cmd,
+                       stdout = subprocess.PIPE,
+                       stderr = subprocess.PIPE,
+                       shell = utils.IsWindows(),
+                       cwd = utils.DART_DIR)
+  return procWait(p) == 0
+
+
+def main():
+  abi_version = int(utils.GetAbiVersion())
+  oldest_abi_version = int(utils.GetOldestSupportedAbiVersion())
+  cmd = ['cipd', 'ensure', '-root', 'tools/abiversions', '-ensure-file', '-']
+  ensure_file = ''
+  for i in xrange(oldest_abi_version, abi_version + 1):
+    if findAbiVersion(i):
+      ensure_file += '@Subdir %d\ndart/abiversions/%d latest\n\n' % (i, i)
+  if not ensure_file:
+    return 0
+  p = subprocess.Popen(cmd,
+                       stdin = subprocess.PIPE,
+                       stdout = subprocess.PIPE,
+                       stderr = subprocess.PIPE,
+                       shell = utils.IsWindows(),
+                       cwd = utils.DART_DIR)
+  p.communicate(ensure_file)
+  p.stdin.close()
+  return procWait(p)
+
+
+if __name__ == '__main__':
+  sys.exit(main())
diff --git a/tools/gardening/bin/results_list.dart b/tools/gardening/bin/results_list.dart
index 2e9322c..e0baa1b 100644
--- a/tools/gardening/bin/results_list.dart
+++ b/tools/gardening/bin/results_list.dart
@@ -17,9 +17,6 @@
   argParser.addOption("compiler", allowed: Compiler.names);
   argParser.addFlag("csp", negatable: false);
   argParser.addFlag("fasta", negatable: false);
-  argParser.addFlag("dart2js-with-kernel", negatable: false);
-  argParser.addFlag("dart2js-old-frontend", negatable: false);
-  argParser.addFlag("dart2js-with-kernel-in-ssa", negatable: false);
   argParser.addFlag("enable-asserts", negatable: false);
   argParser.addFlag("fast-startup", negatable: false);
   argParser.addFlag("host-checked", negatable: false);
@@ -54,8 +51,6 @@
       argResults["builder-tag"],
       argResults["fast-startup"],
       0,
-      argResults["dart2js-with-kernel"],
-      argResults["dart2js-old-frontend"],
       argResults["enable-asserts"],
       argResults["hot-reload"],
       argResults["hot-reload-rollback"],
diff --git a/tools/gardening/lib/src/results/configuration_environment.dart b/tools/gardening/lib/src/results/configuration_environment.dart
index 53da74d..9f35774 100644
--- a/tools/gardening/lib/src/results/configuration_environment.dart
+++ b/tools/gardening/lib/src/results/configuration_environment.dart
@@ -27,8 +27,6 @@
   "checked": new _Variable.bool((c) => c.checked),
   "compiler": new _Variable((c) => c.compiler, Compiler.names),
   "csp": new _Variable.bool((c) => c.csp),
-  "dart2js_with_kernel": new _Variable.bool((c) => c.dart2JsWithKernel),
-  "dart2js_old_frontend": new _Variable.bool((c) => c.dart2JsOldFrontend),
   "fasta": new _Variable.bool((c) => c.fasta),
   "fast_startup": new _Variable.bool((c) => c.fastStartup),
   "enable_asserts": new _Variable.bool((c) => c.enableAsserts),
diff --git a/tools/gardening/lib/src/results/result_json_models.dart b/tools/gardening/lib/src/results/result_json_models.dart
index 954b1c52..7a55a89 100644
--- a/tools/gardening/lib/src/results/result_json_models.dart
+++ b/tools/gardening/lib/src/results/result_json_models.dart
@@ -23,8 +23,6 @@
   final String builderTag;
   final bool fastStartup;
   final int timeout;
-  final bool dart2JsWithKernel;
-  final bool dart2JsOldFrontend;
   final bool enableAsserts;
   final bool hotReload;
   final bool hotReloadRollback;
@@ -48,8 +46,6 @@
       this.builderTag,
       this.fastStartup,
       this.timeout,
-      this.dart2JsWithKernel,
-      this.dart2JsOldFrontend,
       this.enableAsserts,
       this.hotReload,
       this.hotReloadRollback,
@@ -75,8 +71,6 @@
         json["builder_tag"],
         json["fast_startup"],
         json["timeout"],
-        json["dart2js_with_kernel"] ?? false,
-        json["dart2js_old_frontend"] ?? false,
         json["enable_asserts"] ?? false,
         json["hot_reload"] ?? false,
         json["hot_reload_rollback"] ?? false,
@@ -103,8 +97,6 @@
       _boolToArg("use-sdk", useSdk),
       _stringToArg("builder-tag", builderTag),
       _boolToArg("fast-startup", fastStartup),
-      _boolToArg("dart2js-with-kernel", dart2JsWithKernel),
-      _boolToArg("dart2js-old-frontend", dart2JsOldFrontend),
       _boolToArg("enable-asserts", enableAsserts),
       _boolToArg("hot-reload", hotReload),
       _boolToArg("hot-reload-rollback", hotReloadRollback),
@@ -119,7 +111,7 @@
   String toCsvString() {
     return "$mode;$arch;$compiler;$runtime;$checked;$strong;$hostChecked;"
         "$minified;$csp;$fasta;$system;$vmOptions;$useSdk;$builderTag;$fastStartup;"
-        "$dart2JsWithKernel;$dart2JsOldFrontend;$enableAsserts;$hotReload;"
+        "$enableAsserts;$hotReload;"
         "$hotReloadRollback;$noPreviewDart2;$selectors";
   }
 
diff --git a/tools/gn.py b/tools/gn.py
index bc05a61..fbd1814 100755
--- a/tools/gn.py
+++ b/tools/gn.py
@@ -245,6 +245,8 @@
   if not args.platform_sdk and not gn_args['target_cpu'].startswith('arm'):
     gn_args['dart_platform_sdk'] = args.platform_sdk
   gn_args['dart_stripped_binary'] = 'exe.stripped/dart'
+  gn_args['dartaotruntime_stripped_binary'] = 'exe.stripped/dartaotruntime'
+  gn_args['gen_snapshot_stripped_binary'] = 'exe.stripped/gen_snapshot'
 
   # Setup the user-defined sysroot.
   if UseSysroot(args, gn_args):
diff --git a/tools/infra/config/OWNERS b/tools/infra/config/OWNERS
deleted file mode 100644
index 90c8c15..0000000
--- a/tools/infra/config/OWNERS
+++ /dev/null
@@ -1,6 +0,0 @@
-agable@google.com
-athom@google.com
-iannucci@google.com
-kustermann@google.com
-tandrii@google.com
-whesse@google.com
diff --git a/tools/infra/config/README.md b/tools/infra/config/README.md
deleted file mode 100644
index a46a2e7..0000000
--- a/tools/infra/config/README.md
+++ /dev/null
@@ -1 +0,0 @@
-This directory contains configuration files for chrome infrastructure services.
diff --git a/tools/infra/config/cq.cfg b/tools/infra/config/cq.cfg
deleted file mode 100644
index dd1680c..0000000
--- a/tools/infra/config/cq.cfg
+++ /dev/null
@@ -1,42 +0,0 @@
-# See http://luci-config.appspot.com/schemas/projects/refs:cq.cfg for the
-# documentation of this file format.
-version: 1
-cq_status_url: "https://chromium-cq-status.appspot.com"
-git_repo_url: "https://dart.googlesource.com/sdk.git"
-max_commit_burst: 2
-gerrit {}
-verifiers {
-  gerrit_cq_ability {
-     committer_list: "project-dart-committers"
-     dry_run_access_list: "project-dart-tryjob-access"
-     allow_submit_with_open_deps: true
-  }
-  tree_status {
-    tree_status_url: "https://dart-status.appspot.com"
-  }
-  try_job {
-    buckets {
-      name: "luci.dart.try"
-      builders { name: "analyzer-analysis-server-linux-try" }
-      builders { name: "analyzer-linux-release-try" }
-      builders { name: "benchmark-linux-try" }
-      builders { name: "dart-sdk-windows-try" }
-      builders { name: "dart2js-strong-linux-x64-chrome-try" }
-      builders { name: "dart2js-minified-strong-linux-x64-d8-try" }
-      builders { name: "dart2js-strong-hostasserts-linux-ia32-d8-try" }
-      builders { name: "dart2js-unit-linux-x64-release-try" }
-      builders { name: "ddc-linux-release-chrome-try" }
-      builders { name: "front-end-linux-release-x64-try" }
-      builders { name: "gclient-try" }
-      builders { name: "pkg-linux-release-try" }
-      builders { name: "vm-canary-linux-debug-try" }
-      builders { name: "vm-kernel-linux-release-simdbc64-try" }
-      builders { name: "vm-kernel-linux-release-x64-try" }
-      builders { name: "vm-kernel-mac-release-x64-try" experiment_percentage: 5 }
-      builders { name: "vm-kernel-linux-product-x64-try" }
-    }
-    try_job_retry_config {
-      try_job_retry_quota: 0
-    }
-  }
-}
diff --git a/tools/make_version.py b/tools/make_version.py
index 634586a..d63dfa8 100755
--- a/tools/make_version.py
+++ b/tools/make_version.py
@@ -77,6 +77,11 @@
     version_time = "Unknown timestamp"
   version_cc_text = version_cc_text.replace("{{COMMIT_TIME}}",
                                             version_time)
+  abi_version = utils.GetAbiVersion()
+  version_cc_text = version_cc_text.replace("{{ABI_VERSION}}", abi_version)
+  oldest_supported_abi_version = utils.GetOldestSupportedAbiVersion()
+  version_cc_text = version_cc_text.replace("{{OLDEST_SUPPORTED_ABI_VERSION}}",
+                                            oldest_supported_abi_version)
   snapshot_hash = MakeSnapshotHashString()
   version_cc_text = version_cc_text.replace("{{SNAPSHOT_HASH}}",
                                             snapshot_hash)
diff --git a/tools/patches/flutter-engine/760a9690c22ec3f3d163173737f9949f97e6e02a.patch b/tools/patches/flutter-engine/760a9690c22ec3f3d163173737f9949f97e6e02a.patch
deleted file mode 100644
index baa7cc7..0000000
--- a/tools/patches/flutter-engine/760a9690c22ec3f3d163173737f9949f97e6e02a.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-diff --git a/frontend_server/lib/server.dart b/frontend_server/lib/server.dart
-index 804c5699e..572087e9d 100644
---- a/frontend_server/lib/server.dart
-+++ b/frontend_server/lib/server.dart
-@@ -39,6 +39,11 @@ class _FlutterFrontendCompiler implements frontend.CompilerInterface{
-     _compiler.acceptLastDelta();
-   }
- 
-+  @override
-+  Future<Null> rejectLastDelta() async {
-+    return _compiler.rejectLastDelta();
-+  }
-+
-   @override
-   void invalidate(Uri uri) {
-     _compiler.invalidate(uri);
diff --git a/tools/patches/flutter-engine/apply.sh b/tools/patches/flutter-engine/apply.sh
index d1105a5..9c2bd33 100755
--- a/tools/patches/flutter-engine/apply.sh
+++ b/tools/patches/flutter-engine/apply.sh
@@ -53,7 +53,7 @@
   # DEPS file might have been patched with new version of packages that
   # Dart SDK depends on. Get information about dependencies from the
   # DEPS file and forcefully update checkouts of those dependencies.
-  gclient revinfo | grep 'src/third_party/dart/' | while read -r line; do
+  gclient.py revinfo | grep 'src/third_party/dart/' | while read -r line; do
     # revinfo would produce lines in the following format:
     #     path: git-url@tag-or-hash
     # Where no spaces occur inside path, git-url or tag-or-hash.
@@ -82,5 +82,5 @@
     fi
     popd > /dev/null
   done
-  gclient runhooks
+  gclient.py runhooks
 fi
diff --git a/tools/patches/flutter-engine/b99bcfd3099f0d32e39287160a9539e878cb0b68.patch b/tools/patches/flutter-engine/b99bcfd3099f0d32e39287160a9539e878cb0b68.patch
deleted file mode 100644
index 840c4ac..0000000
--- a/tools/patches/flutter-engine/b99bcfd3099f0d32e39287160a9539e878cb0b68.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-diff --git a/runtime/BUILD.gn b/runtime/BUILD.gn
-index bf4b8e6fb8..1fa0d73af6 100644
---- a/runtime/BUILD.gn
-+++ b/runtime/BUILD.gn
-@@ -6,41 +6,6 @@ import("//third_party/dart/runtime/bin/vmservice/vmservice_sources.gni")
- import("$flutter_root/common/config.gni")
- import("$flutter_root/testing/testing.gni")
- 
--action("gen_embedded_resources_cc") {
--  script = "//third_party/dart/runtime/tools/create_resources.py"
--  output_file = "$target_gen_dir/embedded_resources.cc"
--  outputs = [
--    output_file,
--  ]
--
--  inputs = rebase_path(vmservice_sources,
--                       "",
--                       "//third_party/dart/runtime/bin/vmservice")
--
--  args = [
--           "--output",
--           rebase_path(output_file),
--           "--outer_namespace",
--           "flutter",
--           "--inner_namespace",
--           "runtime",
--           "--table_name",
--           "flutter_embedded_service_isolate",
--           "--root_prefix",
--           rebase_path("//third_party/dart/runtime/bin/"),
--         ] + rebase_path(inputs)
--}
--
--source_set("embedded_resources_cc") {
--  sources = [
--    "$target_gen_dir/embedded_resources.cc",
--  ]
--  deps = [
--    ":gen_embedded_resources_cc",
--  ]
--  public_configs = [ "$flutter_root:config" ]
--}
--
- source_set("test_font") {
-   sources = [
-     "test_font_data.cc",
-@@ -84,7 +49,6 @@ source_set("runtime") {
-   ]
- 
-   deps = [
--    ":embedded_resources_cc",
-     ":test_font",
-     "$flutter_root/assets",
-     "$flutter_root/common",
diff --git a/tools/patches/flutter-engine/cc63d6e647df1cfd34a54adb63aba7f937ce6f6b.patch b/tools/patches/flutter-engine/cc63d6e647df1cfd34a54adb63aba7f937ce6f6b.patch
new file mode 100644
index 0000000..5e81c49
--- /dev/null
+++ b/tools/patches/flutter-engine/cc63d6e647df1cfd34a54adb63aba7f937ce6f6b.patch
@@ -0,0 +1,31 @@
+diff --git a/DEPS b/DEPS
+index d7973695e..1113c3101 100644
+--- a/DEPS
++++ b/DEPS
+@@ -52,7 +52,7 @@ vars = {
+   'dart_dartdoc_tag': 'v0.28.2',
+   'dart_fixnum_tag': '0.10.9',
+   'dart_glob_tag': '1.1.7',
+-  'dart_html_tag': '0.13.4+1',
++  'dart_html_tag': '0.14.0',
+   'dart_http_multi_server_tag': '2.0.5',
+   'dart_http_parser_tag': '3.1.3',
+   'dart_http_retry_tag': '0.1.1',
+@@ -94,7 +94,6 @@ vars = {
+   'dart_test_tag': '1.3.4',
+   'dart_typed_data_tag': '1.1.6',
+   'dart_usage_tag': '3.4.0',
+-  'dart_utf_tag': '0.9.0+5',
+   'dart_watcher_rev': '0.9.7+12',
+   'dart_web_socket_channel_tag': '1.0.9',
+   'dart_yaml_tag': '2.1.15',
+@@ -341,9 +340,6 @@ deps = {
+   'src/third_party/dart/third_party/pkg/test':
+    Var('dart_git') + '/test.git' + '@' + Var('dart_test_tag'),
+ 
+-  'src/third_party/dart/third_party/pkg/utf':
+-   Var('dart_git') + '/utf.git' + '@' + Var('dart_utf_tag'),
+-
+   'src/third_party/dart/third_party/pkg/usage':
+    Var('dart_git') + '/usage.git' + '@' + Var('dart_usage_tag'),
+ 
diff --git a/tools/patches/flutter-engine/d1817ddc91fd3aea061647b2e21860c47a5a5180.flutter.patch b/tools/patches/flutter-engine/d1817ddc91fd3aea061647b2e21860c47a5a5180.flutter.patch
deleted file mode 100644
index c4dca25..0000000
--- a/tools/patches/flutter-engine/d1817ddc91fd3aea061647b2e21860c47a5a5180.flutter.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/analysis_options.yaml b/analysis_options.yaml
-index 68eea153ee0..65056568003 100644
---- a/analysis_options.yaml
-+++ b/analysis_options.yaml
-@@ -28,6 +28,8 @@ analyzer:
-     missing_return: warning
-     # allow having TODOs in the code
-     todo: ignore
-+    #
-+    sdk_version_async_exported_from_core: ignore
-   exclude:
-     - 'bin/cache/**'
-     # the following two are relative to the stocks example and the flutter package respectively
diff --git a/tools/patches/flutter-engine/ecd7a88606a4bf896316f56f1b0db6f5469c2623.patch b/tools/patches/flutter-engine/ecd7a88606a4bf896316f56f1b0db6f5469c2623.patch
deleted file mode 100644
index 60a8135..0000000
--- a/tools/patches/flutter-engine/ecd7a88606a4bf896316f56f1b0db6f5469c2623.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-diff --git a/lib/snapshot/libraries.json b/lib/snapshot/libraries.json
-index a59ae6c66..99ef4cd77 100644
---- a/lib/snapshot/libraries.json
-+++ b/lib/snapshot/libraries.json
-@@ -57,6 +57,14 @@
-         ],
-         "uri": "../../../third_party/dart/sdk/lib/collection/collection.dart"
-       },
-+      "ffi": {
-+        "patches": [
-+          "../../../third_party/dart/runtime/lib/ffi_dynamic_library_patch.dart",
-+          "../../../third_party/dart/runtime/lib/ffi_native_type_patch.dart",
-+          "../../../third_party/dart/runtime/lib/ffi_patch.dart"
-+        ],
-+        "uri": "../../../third_party/dart/sdk/lib/ffi/ffi.dart"
-+      },
-       "typed_data": {
-         "patches": "../../../third_party/dart/runtime/lib/typed_data_patch.dart",
-         "uri": "../../../third_party/dart/sdk/lib/typed_data/typed_data.dart"
-diff --git a/lib/snapshot/libraries.yaml b/lib/snapshot/libraries.yaml
-index 26c327705..c4244eaff 100644
---- a/lib/snapshot/libraries.yaml
-+++ b/lib/snapshot/libraries.yaml
-@@ -84,6 +84,13 @@ flutter:
-         - "../../../third_party/dart/runtime/lib/profiler.dart"
-         - "../../../third_party/dart/runtime/lib/timeline.dart"
- 
-+    ffi:
-+      uri: "../../../third_party/dart/sdk/lib/ffi/ffi.dart"
-+      patches:
-+        - "../../../third_party/dart/runtime/lib/ffi_dynamic_library_patch.dart"
-+        - "../../../third_party/dart/runtime/lib/ffi_native_type_patch.dart"
-+        - "../../../third_party/dart/runtime/lib/ffi_patch.dart"
-+
-     _http:
-       uri: "../../../third_party/dart/sdk/lib/_http/http.dart"
- 
diff --git a/tools/patches/flutter-engine/f9ebf2129732fd2b606286fdf58e500384b8a0bc.flutter.patch b/tools/patches/flutter-engine/f9ebf2129732fd2b606286fdf58e500384b8a0bc.flutter.patch
deleted file mode 100644
index eeb725b..0000000
--- a/tools/patches/flutter-engine/f9ebf2129732fd2b606286fdf58e500384b8a0bc.flutter.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-diff --git a/dev/devicelab/pubspec.yaml b/dev/devicelab/pubspec.yaml
-index 9dee6de4a..806398855 100644
---- a/dev/devicelab/pubspec.yaml
-+++ b/dev/devicelab/pubspec.yaml
-@@ -5,7 +5,7 @@ homepage: https://github.com/flutter/flutter
-
- environment:
-   # The pub client defaults to an <2.0.0 sdk constraint which we need to explicitly overwrite.
--  sdk: ">=2.0.0-dev.68.0 <3.0.0"
-+  sdk: ">=2.1.0-dev.5.0 <3.0.0"
-
- dependencies:
-   args: 1.5.1
-diff --git a/packages/flutter/pubspec.yaml b/packages/flutter/pubspec.yaml
-index 81564e6a2..9f85ed7ab 100644
---- a/packages/flutter/pubspec.yaml
-+++ b/packages/flutter/pubspec.yaml
-@@ -5,7 +5,7 @@ homepage: http://flutter.io
-
- environment:
-   # The pub client defaults to an <2.0.0 sdk constraint which we need to explicitly overwrite.
--  sdk: ">=2.0.0-dev.68.0 <3.0.0"
-+  sdk: ">=2.1.0-dev.5.0 <3.0.0"
-
- dependencies:
-   # To update these, use "flutter update-packages --force-upgrade".
-diff --git a/packages/flutter_test/pubspec.yaml b/packages/flutter_test/pubspec.yaml
-index aa930cbdf..531d24b71 100644
---- a/packages/flutter_test/pubspec.yaml
-+++ b/packages/flutter_test/pubspec.yaml
-@@ -2,7 +2,7 @@ name: flutter_test
-
- environment:
-   # The pub client defaults to an <2.0.0 sdk constraint which we need to explicitly overwrite.
--  sdk: ">=2.0.0-dev.68.0 <3.0.0"
-+  sdk: ">=2.1.0-dev.5.0 <3.0.0"
-
- dependencies:
-   # To update these, use "flutter update-packages --force-upgrade".
-diff --git a/packages/flutter_tools/pubspec.yaml b/packages/flutter_tools/pubspec.yaml
-index 5f89d0f18..a869162b0 100644
---- a/packages/flutter_tools/pubspec.yaml
-+++ b/packages/flutter_tools/pubspec.yaml
-@@ -5,7 +5,7 @@ author: Flutter Authors <flutter-dev@googlegroups.com>
-
- environment:
-   # The pub client defaults to an <2.0.0 sdk constraint which we need to explicitly overwrite.
--  sdk: ">=2.0.0-dev.68.0 <3.0.0"
-+  sdk: ">=2.1.0-dev.5.0 <3.0.0"
-
- dependencies:
-   # To update these, use "flutter update-packages --force-upgrade".
diff --git a/tools/patches/flutter-engine/f9ebf2129732fd2b606286fdf58e500384b8a0bc.patch b/tools/patches/flutter-engine/f9ebf2129732fd2b606286fdf58e500384b8a0bc.patch
deleted file mode 100644
index f0f9e8c..0000000
--- a/tools/patches/flutter-engine/f9ebf2129732fd2b606286fdf58e500384b8a0bc.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-diff --git a/DEPS b/DEPS
-index 2f5a8532b..c4cb5da32 100644
---- a/DEPS
-+++ b/DEPS
-@@ -47,7 +47,7 @@ vars = {
-   'dart_convert_tag': '2.0.2',
-   'dart_crypto_tag': '2.0.6',
-   'dart_csslib_tag': '0.14.4+1',
--  'dart_dart2js_info_tag': '0.5.13',
-+  'dart_dart2js_info_tag': '0.5.15',
-   'dart_dart_style_tag': '1.2.0',
-   'dart_dartdoc_tag': 'v0.24.1',
-   'dart_fixnum_tag': '0.10.8',
-@@ -60,7 +60,7 @@ vars = {
-   'dart_http_throttle_tag': '1.0.2',
-   'dart_intl_tag': '0.15.7',
-   'dart_json_rpc_2_tag': '2.0.9',
--  'dart_linter_tag': '0.1.71',
-+  'dart_linter_tag': '0.1.75',
-   'dart_logging_tag': '0.11.3+2',
-   'dart_markdown_tag': '2.0.2',
-   'dart_matcher_tag': '0.12.3',
-diff --git a/lib/snapshot/BUILD.gn b/lib/snapshot/BUILD.gn
-index ef06063a2..4db8600ea 100644
---- a/lib/snapshot/BUILD.gn
-+++ b/lib/snapshot/BUILD.gn
-@@ -53,9 +53,6 @@ compiled_action("generate_snapshot_bin") {
-   ]
- 
-   args = [
--    "--strong",
--    "--sync-async",
--    "--reify-generic-functions",
-     "--snapshot_kind=core",
-     "--enable_mirrors=false",
-     "--vm_snapshot_data=" + rebase_path(vm_snapshot_data),
diff --git a/tools/patches/flutter-engine/fdfe40ea95d4e91dc9fc0d6e0a1f5215ab7c4b40.flutter.patch b/tools/patches/flutter-engine/fdfe40ea95d4e91dc9fc0d6e0a1f5215ab7c4b40.flutter.patch
deleted file mode 100644
index e0d443e..0000000
--- a/tools/patches/flutter-engine/fdfe40ea95d4e91dc9fc0d6e0a1f5215ab7c4b40.flutter.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/analysis_options.yaml b/analysis_options.yaml
-index 0f3f70d3c..97e5a6453 100644
---- a/analysis_options.yaml
-+++ b/analysis_options.yaml
-@@ -120,7 +120,6 @@ linter:
-     # - parameter_assignments # we do this commonly
-     - prefer_adjacent_string_concatenation
-     - prefer_asserts_in_initializer_lists
--    - prefer_collection_literals
-     - prefer_conditional_assignment
-     - prefer_const_constructors
-     - prefer_const_constructors_in_immutables
diff --git a/tools/patches/flutter-flutter/15f2b92cce916982b7dd8ce658bbf2a465c06ba4.patch b/tools/patches/flutter-flutter/15f2b92cce916982b7dd8ce658bbf2a465c06ba4.patch
deleted file mode 100644
index 00aee00..0000000
--- a/tools/patches/flutter-flutter/15f2b92cce916982b7dd8ce658bbf2a465c06ba4.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-diff --git a/packages/flutter/lib/src/painting/text_style.dart b/packages/flutter/lib/src/painting/text_style.dart
-index 821cb475b..c85da65b7 100644
---- a/packages/flutter/lib/src/painting/text_style.dart
-+++ b/packages/flutter/lib/src/painting/text_style.dart
-@@ -822,7 +822,7 @@ class TextStyle extends Diagnosticable {
-       fontStyle: fontStyle,
-       fontFamily: fontFamily,
-       fontSize: (fontSize ?? _defaultFontSize) * textScaleFactor,
--      lineHeight: height,
-+      height: height,
-       maxLines: maxLines,
-       ellipsis: ellipsis,
-       locale: locale,
-diff --git a/packages/flutter/lib/src/rendering/error.dart b/packages/flutter/lib/src/rendering/error.dart
-index 03ab64749..a8552b37b 100644
---- a/packages/flutter/lib/src/rendering/error.dart
-+++ b/packages/flutter/lib/src/rendering/error.dart
-@@ -95,7 +95,7 @@ class RenderErrorBox extends RenderBox {
- 
-   /// The paragraph style to use when painting [RenderErrorBox] objects.
-   static ui.ParagraphStyle paragraphStyle = ui.ParagraphStyle(
--    lineHeight: 1.0,
-+    height: 1.0,
-   );
- 
-   @override
-diff --git a/packages/flutter/test/painting/text_style_test.dart b/packages/flutter/test/painting/text_style_test.dart
-index 4d65194e9..f26570aec 100644
---- a/packages/flutter/test/painting/text_style_test.dart
-+++ b/packages/flutter/test/painting/text_style_test.dart
-@@ -169,22 +169,22 @@ void main() {
-     expect(ts2.toString(), 'TextStyle(color: Color(0xff00ff00), decoration: unspecified, decorationColor: unspecified, decorationStyle: unspecified, fontWeight: FontWeight.w800, fontStyle: unspecified, textBaseline: unspecified, fontFamily: unspecified, fontFamilyFallback: unspecified, fontSize: 10.0, letterSpacing: unspecified, wordSpacing: unspecified, height: 100.0x, locale: unspecified, background: unspecified, foreground: unspecified, shadows: unspecified)');
- 
-     final ui.ParagraphStyle ps2 = s2.getParagraphStyle(textAlign: TextAlign.center);
--    expect(ps2, equals(ui.ParagraphStyle(textAlign: TextAlign.center, fontWeight: FontWeight.w800, fontSize: 10.0, lineHeight: 100.0)));
--    expect(ps2.toString(), 'ParagraphStyle(textAlign: TextAlign.center, textDirection: unspecified, fontWeight: FontWeight.w800, fontStyle: unspecified, maxLines: unspecified, fontFamily: unspecified, fontSize: 10.0, lineHeight: 100.0x, ellipsis: unspecified, locale: unspecified)');
-+    expect(ps2, equals(ui.ParagraphStyle(textAlign: TextAlign.center, fontWeight: FontWeight.w800, fontSize: 10.0, height: 100.0)));
-+    expect(ps2.toString(), 'ParagraphStyle(textAlign: TextAlign.center, textDirection: unspecified, fontWeight: FontWeight.w800, fontStyle: unspecified, maxLines: unspecified, fontFamily: unspecified, fontSize: 10.0, height: 100.0x, ellipsis: unspecified, locale: unspecified)');
-     final ui.ParagraphStyle ps5 = s5.getParagraphStyle();
--    expect(ps5, equals(ui.ParagraphStyle(fontWeight: FontWeight.w700, fontSize: 12.0, lineHeight: 123.0)));
--    expect(ps5.toString(), 'ParagraphStyle(textAlign: unspecified, textDirection: unspecified, fontWeight: FontWeight.w700, fontStyle: unspecified, maxLines: unspecified, fontFamily: unspecified, fontSize: 12.0, lineHeight: 123.0x, ellipsis: unspecified, locale: unspecified)');
-+    expect(ps5, equals(ui.ParagraphStyle(fontWeight: FontWeight.w700, fontSize: 12.0, height: 123.0)));
-+    expect(ps5.toString(), 'ParagraphStyle(textAlign: unspecified, textDirection: unspecified, fontWeight: FontWeight.w700, fontStyle: unspecified, maxLines: unspecified, fontFamily: unspecified, fontSize: 12.0, height: 123.0x, ellipsis: unspecified, locale: unspecified)');
-   });
- 
- 
-   test('TextStyle with text direction', () {
-     final ui.ParagraphStyle ps6 = const TextStyle().getParagraphStyle(textDirection: TextDirection.ltr);
-     expect(ps6, equals(ui.ParagraphStyle(textDirection: TextDirection.ltr, fontSize: 14.0)));
--    expect(ps6.toString(), 'ParagraphStyle(textAlign: unspecified, textDirection: TextDirection.ltr, fontWeight: unspecified, fontStyle: unspecified, maxLines: unspecified, fontFamily: unspecified, fontSize: 14.0, lineHeight: unspecified, ellipsis: unspecified, locale: unspecified)');
-+    expect(ps6.toString(), 'ParagraphStyle(textAlign: unspecified, textDirection: TextDirection.ltr, fontWeight: unspecified, fontStyle: unspecified, maxLines: unspecified, fontFamily: unspecified, fontSize: 14.0, height: unspecified, ellipsis: unspecified, locale: unspecified)');
- 
-     final ui.ParagraphStyle ps7 = const TextStyle().getParagraphStyle(textDirection: TextDirection.rtl);
-     expect(ps7, equals(ui.ParagraphStyle(textDirection: TextDirection.rtl, fontSize: 14.0)));
--    expect(ps7.toString(), 'ParagraphStyle(textAlign: unspecified, textDirection: TextDirection.rtl, fontWeight: unspecified, fontStyle: unspecified, maxLines: unspecified, fontFamily: unspecified, fontSize: 14.0, lineHeight: unspecified, ellipsis: unspecified, locale: unspecified)');
-+    expect(ps7.toString(), 'ParagraphStyle(textAlign: unspecified, textDirection: TextDirection.rtl, fontWeight: unspecified, fontStyle: unspecified, maxLines: unspecified, fontFamily: unspecified, fontSize: 14.0, height: unspecified, ellipsis: unspecified, locale: unspecified)');
-   });
- 
-   test('TextStyle using package font', () {
diff --git a/tools/patches/flutter-flutter/3c118b6c3b42c89f4ef18fce4b27e328f2fd754d.patch b/tools/patches/flutter-flutter/3c118b6c3b42c89f4ef18fce4b27e328f2fd754d.patch
deleted file mode 100644
index acde0c1..0000000
--- a/tools/patches/flutter-flutter/3c118b6c3b42c89f4ef18fce4b27e328f2fd754d.patch
+++ /dev/null
@@ -1,446 +0,0 @@
-diff --git a/packages/flutter/test/widgets/text_golden_test.dart b/packages/flutter/test/widgets/text_golden_test.dart
-index 4adb60968..fe08d98e4 100644
---- a/packages/flutter/test/widgets/text_golden_test.dart
-+++ b/packages/flutter/test/widgets/text_golden_test.dart
-@@ -1,440 +1 @@
--// Copyright 2018 The Chromium Authors. All rights reserved.
--// Use of this source code is governed by a BSD-style license that can be
--// found in the LICENSE file.
--
--import 'dart:io' show Platform;
--
--import 'package:flutter_test/flutter_test.dart';
--import 'package:flutter/material.dart';
--import 'package:flutter/widgets.dart';
--
--void main() {
--  testWidgets('Centered text', (WidgetTester tester) async {
--    await tester.pumpWidget(
--      Center(
--        child: RepaintBoundary(
--          child: Container(
--            width: 200.0,
--            height: 100.0,
--            decoration: const BoxDecoration(
--              color: Color(0xff00ff00),
--            ),
--            child: const Text('Hello',
--              textDirection: TextDirection.ltr,
--              textAlign: TextAlign.center,
--              style: TextStyle(color: Color(0xffff0000)),
--            ),
--          ),
--        ),
--      ),
--    );
--
--    await expectLater(
--      find.byType(Container),
--      matchesGoldenFile('text_golden.Centered.png'),
--    );
--
--    await tester.pumpWidget(
--      Center(
--        child: RepaintBoundary(
--          child: Container(
--            width: 200.0,
--            height: 100.0,
--            decoration: const BoxDecoration(
--              color: Color(0xff00ff00),
--            ),
--            child: const Text('Hello world how are you today',
--              textDirection: TextDirection.ltr,
--              textAlign: TextAlign.center,
--              style: TextStyle(color: Color(0xffff0000)),
--            ),
--          ),
--        ),
--      ),
--    );
--
--    await expectLater(
--      find.byType(Container),
--      matchesGoldenFile('text_golden.Centered.wrap.png'),
--    );
--  }, skip: !Platform.isLinux);
--
--
--  testWidgets('Text Foreground', (WidgetTester tester) async {
--    const Color black = Color(0xFF000000);
--    const Color red = Color(0xFFFF0000);
--    const Color blue = Color(0xFF0000FF);
--    final Shader linearGradient = const LinearGradient(
--      colors: <Color>[red, blue],
--    ).createShader(Rect.fromLTWH(0.0, 0.0, 50.0, 20.0));
--
--    await tester.pumpWidget(
--      Align(
--        alignment: Alignment.topLeft,
--        child: RepaintBoundary(
--          child: Text('Hello',
--            textDirection: TextDirection.ltr,
--            style: TextStyle(
--              foreground: Paint()
--                ..color = black
--                ..shader = linearGradient
--            ),
--          ),
--        ),
--      ),
--    );
--
--    await expectLater(
--      find.byType(RepaintBoundary),
--      matchesGoldenFile('text_golden.Foreground.gradient.png'),
--    );
--
--    await tester.pumpWidget(
--      Align(
--        alignment: Alignment.topLeft,
--        child: RepaintBoundary(
--          child: Text('Hello',
--            textDirection: TextDirection.ltr,
--            style: TextStyle(
--              foreground: Paint()
--                ..color = black
--                ..style = PaintingStyle.stroke
--                ..strokeWidth = 2.0
--            ),
--          ),
--        ),
--      ),
--    );
--
--    await expectLater(
--      find.byType(RepaintBoundary),
--      matchesGoldenFile('text_golden.Foreground.stroke.png'),
--    );
--
--    await tester.pumpWidget(
--      Align(
--        alignment: Alignment.topLeft,
--        child: RepaintBoundary(
--          child: Text('Hello',
--            textDirection: TextDirection.ltr,
--            style: TextStyle(
--              foreground: Paint()
--                ..color = black
--                ..style = PaintingStyle.stroke
--                ..strokeWidth = 2.0
--                ..shader = linearGradient
--            ),
--          ),
--        ),
--      ),
--    );
--
--    await expectLater(
--      find.byType(RepaintBoundary),
--      matchesGoldenFile('text_golden.Foreground.stroke_and_gradient.png'),
--    );
--  }, skip: !Platform.isLinux);
--
--  // TODO(garyq): This test requires an update when the background
--  // drawing from the beginning of the line bug is fixed. The current
--  // tested version is not completely correct.
--  testWidgets('Text Background', (WidgetTester tester) async {
--    const Color red = Colors.red;
--    const Color blue = Colors.blue;
--    const Color translucentGreen = Color(0x5000F000);
--    const Color translucentDarkRed = Color(0x500F0000);
--    await tester.pumpWidget(
--      Align(
--        alignment: Alignment.topLeft,
--        child: RepaintBoundary(
--          child: Container(
--            width: 200.0,
--            height: 100.0,
--            decoration: const BoxDecoration(
--              color: Colors.green,
--            ),
--            child: RichText(
--              textDirection: TextDirection.ltr,
--              text: TextSpan(
--                text: 'text1 ',
--                style: TextStyle(
--                  color: translucentGreen,
--                  background: Paint()
--                    ..color = red.withOpacity(0.5)
--                ),
--                children: <TextSpan>[
--                  TextSpan(
--                    text: 'text2',
--                    style: TextStyle(
--                      color: translucentDarkRed,
--                      background: Paint()
--                        ..color = blue.withOpacity(0.5)
--                    )
--                  ),
--                ],
--              ),
--            ),
--          ),
--        ),
--      ),
--    );
--
--    await expectLater(
--      find.byType(RepaintBoundary),
--      matchesGoldenFile('text_golden.Background.png'),
--    );
--  }, skip: !Platform.isLinux);
--
--  testWidgets('Text Fade', (WidgetTester tester) async {
--    await tester.pumpWidget(
--        MaterialApp(
--          home: Scaffold(
--            backgroundColor: Colors.transparent,
--            body: RepaintBoundary(
--              child: Center(
--                child: Container(
--                  width: 200.0,
--                  height: 200.0,
--                  color: Colors.green,
--                  child: Center(
--                    child: Container(
--                      width: 100.0,
--                      color: Colors.blue,
--                      child: const Text(
--                        'Pp PPp PPPp PPPPp PPPPpp PPPPppp PPPPppppp ',
--                        style: TextStyle(color: Colors.black),
--                        maxLines: 3,
--                        overflow: TextOverflow.fade,
--                      ),
--                    ),
--                  ),
--                ),
--              ),
--            ),
--          )
--        )
--    );
--
--    await expectLater(
--      find.byType(RepaintBoundary).first,
--      matchesGoldenFile('text_golden.Fade.1.png'),
--    );
--  }, skip: !Platform.isLinux);
--
--  testWidgets('Default Strut text', (WidgetTester tester) async {
--    await tester.pumpWidget(
--      Center(
--        child: RepaintBoundary(
--          child: Container(
--            width: 200.0,
--            height: 100.0,
--            decoration: const BoxDecoration(
--              color: Color(0xff00ff00),
--            ),
--            child: const Text('Hello\nLine 2\nLine 3',
--              textDirection: TextDirection.ltr,
--              style: TextStyle(),
--              strutStyle: StrutStyle(),
--            ),
--          ),
--        ),
--      ),
--    );
--    await expectLater(
--      find.byType(Container),
--      matchesGoldenFile('text_golden.StrutDefault.png'),
--    );
--  }, skip: !Platform.isLinux);
--
--  testWidgets('Strut text 1', (WidgetTester tester) async {
--    await tester.pumpWidget(
--      Center(
--        child: RepaintBoundary(
--          child: Container(
--            width: 200.0,
--            height: 100.0,
--            decoration: const BoxDecoration(
--              color: Color(0xff00ff00),
--            ),
--            child: const Text('Hello\nLine2\nLine3',
--              textDirection: TextDirection.ltr,
--              style: TextStyle(),
--              strutStyle: StrutStyle(
--                height: 1.5,
--              ),
--            ),
--          ),
--        ),
--      ),
--    );
--    await expectLater(
--      find.byType(Container),
--      matchesGoldenFile('text_golden.Strut.1.png'),
--    );
--  }, skip: !Platform.isLinux);
--
--  testWidgets('Strut text 2', (WidgetTester tester) async {
--    await tester.pumpWidget(
--      Center(
--        child: RepaintBoundary(
--          child: Container(
--            width: 200.0,
--            height: 100.0,
--            decoration: const BoxDecoration(
--              color: Color(0xff00ff00),
--            ),
--            child: const Text('Hello\nLine 2\nLine 3',
--              textDirection: TextDirection.ltr,
--              style: TextStyle(),
--              strutStyle: StrutStyle(
--                height: 1.5,
--                fontSize: 14,
--              ),
--            ),
--          ),
--        ),
--      ),
--    );
--    await expectLater(
--      find.byType(Container),
--      matchesGoldenFile('text_golden.Strut.2.png'),
--    );
--  }, skip: !Platform.isLinux);
--
--  testWidgets('Strut text rich', (WidgetTester tester) async {
--    await tester.pumpWidget(
--      Center(
--        child: RepaintBoundary(
--          child: Container(
--            width: 200.0,
--            height: 150.0,
--            decoration: const BoxDecoration(
--              color: Color(0xff00ff00),
--            ),
--            child: const Text.rich(
--              TextSpan(
--                text: 'Hello\n',
--                style: TextStyle(
--                  color: Colors.red,
--                  fontSize: 30
--                ),
--                children: <TextSpan>[
--                  TextSpan(
--                    text: 'Second line!\n',
--                    style: TextStyle(
--                      fontSize: 5,
--                      color: Colors.blue,
--                    ),
--                  ),
--                  TextSpan(
--                    text: 'Third line!\n',
--                    style: TextStyle(
--                      fontSize: 25,
--                      color: Colors.white,
--                    ),
--                  ),
--                ],
--              ),
--              textDirection: TextDirection.ltr,
--              strutStyle: StrutStyle(
--                fontSize: 14,
--                height: 1.1,
--                leading: 0.1,
--              ),
--            ),
--          ),
--        ),
--      ),
--    );
--    await expectLater(
--      find.byType(Container),
--      matchesGoldenFile('text_golden.Strut.3.png'),
--    );
--  }, skip: !Platform.isLinux);
--
--  testWidgets('Strut text font fallback', (WidgetTester tester) async {
--    // Font Fallback
--    await tester.pumpWidget(
--      Center(
--        child: RepaintBoundary(
--          child: Container(
--            width: 200.0,
--            height: 100.0,
--            decoration: const BoxDecoration(
--              color: Color(0xff00ff00),
--            ),
--            child: const Text('Hello\nLine 2\nLine 3',
--              textDirection: TextDirection.ltr,
--              style: TextStyle(),
--              strutStyle: StrutStyle(
--                fontFamily: 'FakeFont 1',
--                fontFamilyFallback: <String>[
--                  'FakeFont 2',
--                  'EvilFont 3',
--                  'Nice Font 4',
--                  'ahem'
--                ],
--                fontSize: 14,
--              ),
--            ),
--          ),
--        ),
--      ),
--    );
--    await expectLater(
--      find.byType(Container),
--      matchesGoldenFile('text_golden.Strut.4.png'),
--    );
--  }, skip: !Platform.isLinux);
--
--  testWidgets('Strut text rich forceStrutHeight', (WidgetTester tester) async {
--    await tester.pumpWidget(
--      Center(
--        child: RepaintBoundary(
--          child: Container(
--            width: 200.0,
--            height: 100.0,
--            decoration: const BoxDecoration(
--              color: Color(0xff00ff00),
--            ),
--            child: const Text.rich(
--              TextSpan(
--                text: 'Hello\n',
--                style: TextStyle(
--                  color: Colors.red,
--                  fontSize: 30
--                ),
--                children: <TextSpan>[
--                  TextSpan(
--                    text: 'Second line!\n',
--                    style: TextStyle(
--                      fontSize: 9,
--                      color: Colors.blue,
--                    ),
--                  ),
--                  TextSpan(
--                    text: 'Third line!\n',
--                    style: TextStyle(
--                      fontSize: 27,
--                      color: Colors.white,
--                    ),
--                  ),
--                ],
--              ),
--              textDirection: TextDirection.ltr,
--              strutStyle: StrutStyle(
--                fontSize: 14,
--                height: 1.1,
--                forceStrutHeight: true,
--              ),
--            ),
--          ),
--        ),
--      ),
--    );
--    await expectLater(
--      find.byType(Container),
--      matchesGoldenFile('text_golden.StrutForce.1.png'),
--    );
--  }, skip: !Platform.isLinux);
--}
-+void main() { }
diff --git a/tools/promote.py b/tools/promote.py
index f113581..8033ab9 100644
--- a/tools/promote.py
+++ b/tools/promote.py
@@ -104,6 +104,11 @@
         raise Exception(
             "InternalError: Sanity check failed on GS URI: %s" % gs_path)
 
+    def exists(gs_path):
+      (_, _, exit_code) = Gsutil(['ls', gs_path], throw_on_error=False)
+      # gsutil will exit 0 if the "directory" exists
+      return exit_code == 0
+
     # Google cloud storage has read-after-write, read-after-update,
     # and read-after-delete consistency, but not list after delete consistency.
     # Because gsutil uses list to figure out if it should do the unix styly
@@ -111,19 +116,17 @@
     # still being there (after it has been deleted) gsutil will copy
     # into the directory instead of to the directory.
     def wait_for_delete_to_be_consistent_with_list(gs_path):
-      while True:
-        if DRY_RUN:
-          break
-        (_, _, exit_code) = Gsutil(['ls', gs_path], throw_on_error=False)
-        # gsutil will exit 1 if the "directory" does not exist
-        if exit_code != 0:
-          break
+      if DRY_RUN:
+        return
+      while exists(gs_path):
         time.sleep(1)
 
     def remove_gs_directory(gs_path):
       safety_check_on_gs_path(gs_path, to_revision, channel)
-      Gsutil(['-m', 'rm', '-R', '-f', gs_path])
-      wait_for_delete_to_be_consistent_with_list(gs_path)
+      # Only delete existing directories
+      if exists(gs_path):
+        Gsutil(['-m', 'rm', '-R', '-f', gs_path])
+        wait_for_delete_to_be_consistent_with_list(gs_path)
 
     # Copy sdk directory.
     from_loc = raw_namer.sdk_directory(revision)
diff --git a/tools/run_debian_build.sh b/tools/run_debian_build.sh
new file mode 100755
index 0000000..e0d54a1
--- /dev/null
+++ b/tools/run_debian_build.sh
@@ -0,0 +1,15 @@
+#!/usr/bin/env bash
+# Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE file.
+set -x
+
+ninja=$(which ninja)
+depot_tools=$(dirname $ninja)
+cmd="sed -i /jessie-updates/d /etc/apt/sources.list\
+    && apt-get update && apt-get -y install build-essential debhelper git python\
+    && PATH=\"$depot_tools:\$PATH\"\
+    python tools/bots/linux_distribution_support.py"
+image="launcher.gcr.io/google/debian8:latest"
+docker run -e BUILDBOT_BUILDERNAME -v $depot_tools:$depot_tools\
+    -v `pwd`:`pwd` -w `pwd` -i --rm $image bash -c "$cmd"
diff --git a/tools/spec_parse.py b/tools/spec_parse.py
index 79ba306..ba87ff8 100755
--- a/tools/spec_parse.py
+++ b/tools/spec_parse.py
@@ -4,14 +4,14 @@
 # for details. All rights reserved. Use of this source code is governed by a
 # BSD-style license that can be found in the LICENSE file.
 
-# This script runs the parser which is generated using ANTLR 3 from
+# This script runs the parser which is generated using ANTLR 4 from
 # docs/language/Dart.g. It relies on a certain environment and is hence
 # usable locally where this environment can be obtained, but it may not be
 # possible to run it, e.g., on build bots. The requirements are as follows:
 #
 #   - `make parser` in spec_parser has been executed successfully.
 #   - A suitable JVM is in the PATH and may be executed as 'java'.
-#   - the ANTLR3 jar is available as /usr/share/java/antlr3-runtime.jar.
+#   - the ANTLR3 jar is available as /usr/share/java/antlr4-runtime.jar.
 
 import os
 import string
@@ -32,7 +32,7 @@
   tools_dir = os.path.dirname(os.path.realpath(__file__))
   spec_parser_dir = os.path.join(tools_dir, 'spec_parser')
   spec_parser_file = os.path.join(spec_parser_dir, 'SpecParser.class')
-  antlr_jar = '/usr/share/java/antlr3-runtime.jar'
+  antlr_jar = '/usr/share/java/antlr4-runtime.jar'
   class_path = string.join([spec_parser_dir, antlr_jar], ':')
   command = ['java', '-cp', class_path, 'SpecParser'] + args
 
diff --git a/tools/spec_parser/.gitignore b/tools/spec_parser/.gitignore
index 5810652..8f983c7 100644
--- a/tools/spec_parser/.gitignore
+++ b/tools/spec_parser/.gitignore
@@ -1,5 +1,6 @@
 *Lexer.java
 *Parser.java
+*Listener.java
 *.tokens
 *.class
 *.dot
diff --git a/tools/spec_parser/Dart.g b/tools/spec_parser/Dart.g
new file mode 100644
index 0000000..0a95229
--- /dev/null
+++ b/tools/spec_parser/Dart.g
@@ -0,0 +1,1729 @@
+// 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.
+
+// CHANGES:
+//
+// v0.4 Added support for 'unified collections' (spreads and control flow
+// in collection literals).
+//
+// v0.3 Updated to use ANTLR v4 rather than antlr3.
+//
+// v0.2 Changed top level variable declarations to avoid redundant and
+// misleading occurrence of (FINAL|CONST).
+//
+// v0.1 First version available in the SDK github repository. Covers the
+// Dart language as specified in the language specification based on the
+// many grammar rule snippets. That grammar was then adjusted to remove
+// known issues (e.g., misplaced metadata) and to resolve ambiguities.
+
+grammar Dart;
+
+@parser::header{
+import java.util.Stack;
+}
+
+@lexer::header{
+import java.util.Stack;
+}
+
+@parser::members {
+  static String filePath = null;
+  static boolean errorHasOccurred = false;
+
+  /// Must be invoked before the first error is reported for a library.
+  /// Will print the name of the library and indicate that it has errors.
+  static void prepareForErrors() {
+    errorHasOccurred = true;
+    System.err.println("Syntax error in " + filePath + ":");
+  }
+
+  /// Parse library, return true if success, false if errors occurred.
+  public boolean parseLibrary(String filePath) throws RecognitionException {
+    this.filePath = filePath;
+    errorHasOccurred = false;
+    libraryDefinition();
+    return !errorHasOccurred;
+  }
+
+  // Enable the parser to treat ASYNC/AWAIT/YIELD as keywords in the body of an
+  // `async`, `async*`, or `sync*` function. Access via methods below.
+  private Stack<Boolean> asyncEtcAreKeywords = new Stack<Boolean>();
+  { asyncEtcAreKeywords.push(false); }
+
+  // Use this to indicate that we are now entering an `async`, `async*`,
+  // or `sync*` function.
+  void startAsyncFunction() { asyncEtcAreKeywords.push(true); }
+
+  // Use this to indicate that we are now entering a function which is
+  // neither `async`, `async*`, nor `sync*`.
+  void startNonAsyncFunction() { asyncEtcAreKeywords.push(false); }
+
+  // Use this to indicate that we are now leaving any funciton.
+  void endFunction() { asyncEtcAreKeywords.pop(); }
+
+  // Whether we can recognize ASYNC/AWAIT/YIELD as an identifier/typeIdentifier.
+  boolean asyncEtcPredicate(int tokenId) {
+    if (tokenId == ASYNC || tokenId == AWAIT || tokenId == YIELD) {
+      return !asyncEtcAreKeywords.peek();
+    }
+    return false;
+  }
+}
+
+@lexer::members{
+  public static final int BRACE_NORMAL = 1;
+  public static final int BRACE_SINGLE = 2;
+  public static final int BRACE_DOUBLE = 3;
+  public static final int BRACE_THREE_SINGLE = 4;
+  public static final int BRACE_THREE_DOUBLE = 5;
+
+  // Enable the parser to handle string interpolations via brace matching.
+  // The top of the `braceLevels` stack describes the most recent unmatched
+  // '{'. This is needed in order to enable/disable certain lexer rules.
+  //
+  //   NORMAL: Most recent unmatched '{' was not string literal related.
+  //   SINGLE: Most recent unmatched '{' was `'...${`.
+  //   DOUBLE: Most recent unmatched '{' was `"...${`.
+  //   THREE_SINGLE: Most recent unmatched '{' was `'''...${`.
+  //   THREE_DOUBLE: Most recent unmatched '{' was `"""...${`.
+  //
+  // Access via functions below.
+  private Stack<Integer> braceLevels = new Stack<Integer>();
+
+  // Whether we are currently in a string literal context, and which one.
+  boolean currentBraceLevel(int braceLevel) {
+    if (braceLevels.empty()) return false;
+    return braceLevels.peek() == braceLevel;
+  }
+
+  // Use this to indicate that we are now entering a specific '{...}'.
+  // Call it after accepting the '{'.
+  void enterBrace() {
+    braceLevels.push(BRACE_NORMAL);
+  }
+  void enterBraceSingleQuote() {
+    braceLevels.push(BRACE_SINGLE);
+  }
+  void enterBraceDoubleQuote() {
+    braceLevels.push(BRACE_DOUBLE);
+  }
+  void enterBraceThreeSingleQuotes() {
+    braceLevels.push(BRACE_THREE_SINGLE);
+  }
+  void enterBraceThreeDoubleQuotes() {
+    braceLevels.push(BRACE_THREE_DOUBLE);
+  }
+
+  // Use this to indicate that we are now exiting a specific '{...}',
+  // no matter which kind. Call it before accepting the '}'.
+  void exitBrace() {
+      // We might raise a parse error here if the stack is empty, but the
+      // parsing rules should ensure that we get a parse error anyway, and
+      // it is not a big problem for the spec parser even if it misinterprets
+      // the brace structure of some programs with syntax errors.
+      if (!braceLevels.empty()) braceLevels.pop();
+  }
+}
+
+// ---------------------------------------- Grammar rules.
+
+libraryDefinition
+    :    FEFF? SCRIPT_TAG?
+         libraryName?
+         importOrExport*
+         partDirective*
+         (metadata topLevelDefinition)*
+         EOF
+    ;
+
+topLevelDefinition
+    :    classDeclaration
+    |    mixinDeclaration
+    |    enumType
+    |    typeAlias
+    |    EXTERNAL functionSignature ';'
+    |    EXTERNAL getterSignature ';'
+    |    EXTERNAL setterSignature ';'
+    |    getterSignature functionBody
+    |    setterSignature functionBody
+    |    functionSignature functionBody
+    |    (FINAL | CONST) type? staticFinalDeclarationList ';'
+    |    topLevelVariableDeclaration ';'
+    ;
+
+topLevelVariableDeclaration
+    :    varOrType identifier ('=' expression)? (',' initializedIdentifier)*
+    ;
+
+declaredIdentifier
+    :    COVARIANT? finalConstVarOrType identifier
+    ;
+
+finalConstVarOrType
+    :    FINAL type?
+    |    CONST type?
+    |    varOrType
+    ;
+
+varOrType
+    :    VAR
+    |    type
+    ;
+
+initializedIdentifier
+    :    identifier ('=' expression)?
+    ;
+
+initializedIdentifierList
+    :    initializedIdentifier (',' initializedIdentifier)*
+    ;
+
+functionSignature
+    :    type? identifierNotFUNCTION formalParameterPart
+    ;
+
+functionBodyPrefix
+    :    ASYNC? '=>'
+    |    (ASYNC | ASYNC '*' | SYNC '*')? LBRACE
+    ;
+
+functionBody
+    :    '=>' { startNonAsyncFunction(); } expression { endFunction(); } ';'
+    |    { startNonAsyncFunction(); } block { endFunction(); }
+    |    ASYNC '=>'
+         { startAsyncFunction(); } expression { endFunction(); } ';'
+    |    (ASYNC | ASYNC '*' | SYNC '*')
+         { startAsyncFunction(); } block { endFunction(); }
+    ;
+
+block
+    :    LBRACE statements RBRACE
+    ;
+
+formalParameterPart
+    :    typeParameters? formalParameterList
+    ;
+
+formalParameterList
+    :    '(' ')'
+    |    '(' normalFormalParameters (','? | ',' optionalFormalParameters) ')'
+    |    '(' optionalFormalParameters ')'
+    ;
+
+normalFormalParameters
+    :    normalFormalParameter (',' normalFormalParameter)*
+    ;
+
+optionalFormalParameters
+    :    optionalPositionalFormalParameters
+    |    namedFormalParameters
+    ;
+
+optionalPositionalFormalParameters
+    :    '[' defaultFormalParameter (',' defaultFormalParameter)* ','? ']'
+    ;
+
+namedFormalParameters
+    :    LBRACE defaultNamedParameter (',' defaultNamedParameter)* ','? RBRACE
+    ;
+
+normalFormalParameter
+    :    metadata normalFormalParameterNoMetadata
+    ;
+
+normalFormalParameterNoMetadata
+    :    functionFormalParameter
+    |    fieldFormalParameter
+    |    simpleFormalParameter
+    ;
+
+// NB: It is an anomaly that a functionFormalParameter cannot be FINAL.
+functionFormalParameter
+    :    COVARIANT? type? identifierNotFUNCTION formalParameterPart
+    ;
+
+simpleFormalParameter
+    :    declaredIdentifier
+    |    COVARIANT? identifier
+    ;
+
+// NB: It is an anomaly that VAR can be a return type (`var this.x()`).
+fieldFormalParameter
+    :    finalConstVarOrType? THIS '.' identifier formalParameterPart?
+    ;
+
+defaultFormalParameter
+    :    normalFormalParameter ('=' expression)?
+    ;
+
+defaultNamedParameter
+    :    normalFormalParameter ((':' | '=') expression)?
+    ;
+
+typeApplication
+    :    typeIdentifier typeParameters?
+    ;
+
+classDeclaration
+    :    ABSTRACT? CLASS typeApplication (superclass mixins?)? interfaces?
+         LBRACE (metadata classMemberDefinition)* RBRACE
+    |    ABSTRACT? CLASS mixinApplicationClass
+    ;
+
+mixinDeclaration
+    :    MIXIN typeIdentifier typeParameters?
+         (ON typeNotVoidNotFunctionList)? interfaces?
+         LBRACE (metadata mixinMemberDefinition)* RBRACE
+    ;
+
+mixins
+    :    WITH typeNotVoidNotFunctionList
+    ;
+
+classMemberDefinition
+    :    methodSignature functionBody
+    |    declaration ';'
+    ;
+
+// TODO: We will probably want to make this more strict.
+mixinMemberDefinition
+    :    classMemberDefinition
+    ;
+
+methodSignature
+    :    constructorSignature initializers
+    |    factoryConstructorSignature
+    |    STATIC? functionSignature
+    |    STATIC? getterSignature
+    |    STATIC? setterSignature
+    |    operatorSignature
+    |    constructorSignature
+    ;
+
+// https://github.com/dart-lang/sdk/issues/29501 reports on the problem which
+// was solved by adding a case for redirectingFactoryConstructorSignature.
+// TODO(eernst): Close that issue when this is integrated into the spec.
+
+// https://github.com/dart-lang/sdk/issues/29502 reports on the problem that
+// than external const factory constructor declaration cannot be derived by
+// the spec grammar (and also not by this grammar). The following fixes were
+// introduced for that: Added the 'factoryConstructorSignature' case below in
+// 'declaration'; also added 'CONST?' in the 'factoryConstructorSignature'
+// rule, such that const factories in general are allowed.
+// TODO(eernst): Close that issue when this is integrated into the spec.
+
+// TODO(eernst): Note that `EXTERNAL? STATIC? functionSignature` includes
+// `STATIC functionSignature`, but a static function cannot be abstract.
+// We might want to make that a syntax error rather than a static semantic
+// check.
+
+declaration
+    :    EXTERNAL factoryConstructorSignature
+    |    EXTERNAL constantConstructorSignature
+    |    EXTERNAL constructorSignature
+    |    (EXTERNAL STATIC?)? getterSignature
+    |    (EXTERNAL STATIC?)? setterSignature
+    |    EXTERNAL? operatorSignature
+    |    STATIC (FINAL | CONST) type? staticFinalDeclarationList
+    |    FINAL type? initializedIdentifierList
+    |    (STATIC | COVARIANT)? (VAR | type) initializedIdentifierList
+    |    EXTERNAL? STATIC? functionSignature
+    |    redirectingFactoryConstructorSignature
+    |    constantConstructorSignature (redirection | initializers)?
+    |    constructorSignature (redirection | initializers)?
+    ;
+
+staticFinalDeclarationList
+    :    staticFinalDeclaration (',' staticFinalDeclaration)*
+    ;
+
+staticFinalDeclaration
+    :    identifier '=' expression
+    ;
+
+operatorSignature
+    :    type? OPERATOR operator formalParameterList
+    ;
+
+operator
+    :    '~'
+    |    binaryOperator
+    |    '[' ']'
+    |    '[' ']' '='
+    ;
+
+binaryOperator
+    :    multiplicativeOperator
+    |    additiveOperator
+    |    shiftOperator
+    |    relationalOperator
+    |    '=='
+    |    bitwiseOperator
+    ;
+
+getterSignature
+    :    type? GET identifier
+    ;
+
+setterSignature
+    :    type? SET identifier formalParameterList
+    ;
+
+constructorSignature
+    :    constructorName formalParameterList
+    ;
+
+constructorName
+    :    typeIdentifier ('.' identifier)?
+    ;
+
+redirection
+    :    ':' THIS ('.' identifier)? arguments
+    ;
+
+initializers
+    :    ':' superCallOrFieldInitializer (',' superCallOrFieldInitializer)*
+    ;
+
+superCallOrFieldInitializer
+    :    SUPER arguments
+    |    SUPER '.' identifier arguments
+    |    fieldInitializer
+    |    assertClause
+    ;
+
+fieldInitializer
+    :    (THIS '.')? identifier '=' conditionalExpression cascadeSection*
+    ;
+
+factoryConstructorSignature
+    :    CONST? FACTORY constructorName formalParameterList
+    ;
+
+redirectingFactoryConstructorSignature
+    :    CONST? FACTORY constructorName formalParameterList '='
+         constructorDesignation
+    ;
+
+constantConstructorSignature
+    :    CONST constructorName formalParameterList
+    ;
+
+superclass
+    :    EXTENDS typeNotVoidNotFunction
+    ;
+
+interfaces
+    :    IMPLEMENTS typeNotVoidNotFunctionList
+    ;
+
+mixinApplicationClass
+    :    typeApplication '=' mixinApplication ';'
+    ;
+
+mixinApplication
+    :    typeNotVoidNotFunction mixins interfaces?
+    ;
+
+enumType
+    :    ENUM typeIdentifier LBRACE enumEntry (',' enumEntry)* (',')? RBRACE
+    ;
+
+enumEntry
+    :    metadata identifier
+    ;
+
+typeParameter
+    :    metadata typeIdentifier (EXTENDS typeNotVoid)?
+    ;
+
+typeParameters
+    :    '<' typeParameter (',' typeParameter)* '>'
+    ;
+
+metadata
+    :    ('@' metadatum)*
+    ;
+
+metadatum
+    :    constructorDesignation arguments
+    |    qualified
+    ;
+
+expression
+    :    functionExpression
+    |    throwExpression
+    |    assignableExpression assignmentOperator expression
+    |    conditionalExpression cascadeSection*
+    ;
+
+expressionWithoutCascade
+    :    functionExpressionWithoutCascade
+    |    throwExpressionWithoutCascade
+    |    assignableExpression assignmentOperator expressionWithoutCascade
+    |    conditionalExpression
+    ;
+
+expressionList
+    :    expression (',' expression)*
+    ;
+
+primary
+    :    thisExpression
+    |    SUPER unconditionalAssignableSelector
+    |    constObjectExpression
+    |    newExpression
+    |    functionPrimary
+    |    '(' expression ')'
+    |    literal
+    |    identifier
+    ;
+
+literal
+    :    nullLiteral
+    |    booleanLiteral
+    |    numericLiteral
+    |    stringLiteral
+    |    symbolLiteral
+    |    setOrMapLiteral
+    |    listLiteral
+    ;
+
+nullLiteral
+    :    NULL
+    ;
+
+numericLiteral
+    :    NUMBER
+    |    HEX_NUMBER
+    ;
+
+booleanLiteral
+    :    TRUE
+    |    FALSE
+    ;
+
+stringLiteral
+    :    (multiLineString | singleLineString)+
+    ;
+
+stringLiteralWithoutInterpolation
+    :    singleLineStringWithoutInterpolation+
+    ;
+
+setOrMapLiteral
+    : CONST? typeArguments? LBRACE elements? RBRACE
+    ;
+
+listLiteral
+    : CONST? typeArguments? '[' elements? ']'
+    ;
+
+elements
+    : element (',' element)* ','?
+    ;
+
+element
+    : expressionElement
+    | mapEntry
+    | spreadElement
+    | ifElement
+    | forElement
+    ;
+
+expressionElement
+    : expression
+    ;
+
+mapEntry
+    : expression ':' expression
+    ;
+
+spreadElement
+    : ('...' | '...?') expression
+    ;
+
+ifElement
+    : IF '(' expression ')' element ('else' element)?
+    ;
+
+forElement
+    : AWAIT? FOR '(' forLoopParts ')' element
+    ;
+
+throwExpression
+    :    THROW expression
+    ;
+
+throwExpressionWithoutCascade
+    :    THROW expressionWithoutCascade
+    ;
+
+functionExpression
+    :    formalParameterPart functionExpressionBody
+    ;
+
+functionExpressionBody
+    :    '=>' { startNonAsyncFunction(); } expression { endFunction(); }
+    |    ASYNC '=>' { startAsyncFunction(); } expression { endFunction(); }
+    ;
+
+functionExpressionBodyPrefix
+    :    ASYNC? '=>'
+    ;
+
+functionExpressionWithoutCascade
+    :    formalParameterPart functionExpressionWithoutCascadeBody
+    ;
+
+functionExpressionWithoutCascadeBody
+    :    '=>' { startNonAsyncFunction(); }
+         expressionWithoutCascade { endFunction(); }
+    |    ASYNC '=>' { startAsyncFunction(); }
+         expressionWithoutCascade { endFunction(); }
+    ;
+
+functionPrimary
+    :    formalParameterPart functionPrimaryBody
+    ;
+
+functionPrimaryBody
+    :    { startNonAsyncFunction(); } block { endFunction(); }
+    |    (ASYNC | ASYNC '*' | SYNC '*')
+         { startAsyncFunction(); } block { endFunction(); }
+    ;
+
+functionPrimaryBodyPrefix
+    : (ASYNC | ASYNC '*' | SYNC '*')? LBRACE
+    ;
+
+thisExpression
+    :    THIS
+    ;
+
+newExpression
+    :    NEW constructorDesignation arguments
+    ;
+
+constObjectExpression
+    :    CONST constructorDesignation arguments
+    ;
+
+arguments
+    :    '(' (argumentList ','?)? ')'
+    ;
+
+argumentList
+    :    namedArgument (',' namedArgument)*
+    |    expressionList (',' namedArgument)*
+    ;
+
+namedArgument
+    :    label expression
+    ;
+
+cascadeSection
+    :    '..'
+         (cascadeSelector argumentPart*)
+         (assignableSelector argumentPart*)*
+         (assignmentOperator expressionWithoutCascade)?
+    ;
+
+cascadeSelector
+    :    '[' expression ']'
+    |    identifier
+    ;
+
+assignmentOperator
+    :    '='
+    |    compoundAssignmentOperator
+    ;
+
+compoundAssignmentOperator
+    :    '*='
+    |    '/='
+    |    '~/='
+    |    '%='
+    |    '+='
+    |    '-='
+    |    '<<='
+    |    '>' '>' '='
+    |    '&='
+    |    '^='
+    |    '|='
+    |    '??='
+    ;
+
+conditionalExpression
+    :    ifNullExpression
+         ('?' expressionWithoutCascade ':' expressionWithoutCascade)?
+    ;
+
+ifNullExpression
+    :    logicalOrExpression ('??' logicalOrExpression)*
+    ;
+
+logicalOrExpression
+    :    logicalAndExpression ('||' logicalAndExpression)*
+    ;
+
+logicalAndExpression
+    :    equalityExpression ('&&' equalityExpression)*
+    ;
+
+equalityExpression
+    :    relationalExpression (equalityOperator relationalExpression)?
+    |    SUPER equalityOperator relationalExpression
+    ;
+
+equalityOperator
+    :    '=='
+    |    '!='
+    ;
+
+relationalExpression
+    :    bitwiseOrExpression
+         (typeTest | typeCast | relationalOperator bitwiseOrExpression)?
+    |    SUPER relationalOperator bitwiseOrExpression
+    ;
+
+relationalOperator
+    :    '>' '='
+    |    '>'
+    |    '<='
+    |    '<'
+    ;
+
+bitwiseOrExpression
+    :    bitwiseXorExpression ('|' bitwiseXorExpression)*
+    |    SUPER ('|' bitwiseXorExpression)+
+    ;
+
+bitwiseXorExpression
+    :    bitwiseAndExpression ('^' bitwiseAndExpression)*
+    |    SUPER ('^' bitwiseAndExpression)+
+    ;
+
+bitwiseAndExpression
+    :    shiftExpression ('&' shiftExpression)*
+    |    SUPER ('&' shiftExpression)+
+    ;
+
+bitwiseOperator
+    :    '&'
+    |    '^'
+    |    '|'
+    ;
+
+shiftExpression
+    :    additiveExpression (shiftOperator additiveExpression)*
+    |    SUPER (shiftOperator additiveExpression)+
+    ;
+
+shiftOperator
+    :    '<<'
+    |    '>' '>'
+    ;
+
+additiveExpression
+    :    multiplicativeExpression (additiveOperator multiplicativeExpression)*
+    |    SUPER (additiveOperator multiplicativeExpression)+
+    ;
+
+additiveOperator
+    :    '+'
+    |    '-'
+    ;
+
+multiplicativeExpression
+    :    unaryExpression (multiplicativeOperator unaryExpression)*
+    |    SUPER (multiplicativeOperator unaryExpression)+
+    ;
+
+multiplicativeOperator
+    :    '*'
+    |    '/'
+    |    '%'
+    |    '~/'
+    ;
+
+unaryExpression
+    :    prefixOperator unaryExpression
+    |    awaitExpression
+    |    postfixExpression
+    |    (minusOperator | tildeOperator) SUPER
+    |    incrementOperator assignableExpression
+    ;
+
+prefixOperator
+    :    minusOperator
+    |    negationOperator
+    |    tildeOperator
+    ;
+
+minusOperator
+    :    '-'
+    ;
+
+negationOperator
+    :    '!'
+    ;
+
+tildeOperator
+    :    '~'
+    ;
+
+awaitExpression
+    :    AWAIT unaryExpression
+    ;
+
+// The `(selector)` predicate ensures that the parser commits to the longest
+// possible chain of selectors, e.g., `a<b,c>(d)` as a call rather than as a
+// sequence of two relational expressions.
+
+postfixExpression
+    :    assignableExpression postfixOperator
+    |    constructorInvocation selector*
+    |    primary selector*
+    ;
+
+constructorInvocation
+    :    typeName typeArguments '.' identifier arguments
+    ;
+
+postfixOperator
+    :    incrementOperator
+    ;
+
+selector
+    :    assignableSelector
+    |    argumentPart
+    ;
+
+argumentPart
+    :    typeArguments? arguments
+    ;
+
+incrementOperator
+    :    '++'
+    |    '--'
+    ;
+
+// The `(assignableSelectorPart)` predicate ensures that the parser
+// commits to the longest possible chain, e.g., `a<b,c>(d).e` as one rather
+// than two expressions. The first `identifier` alternative handles all
+// the simple cases; the final `identifier` alternative at the end catches
+// the case where we have `identifier '<'` and the '<' is used as a
+// relationalOperator, not the beginning of typeArguments.
+
+assignableExpression
+    :    SUPER unconditionalAssignableSelector
+    |    constructorInvocation assignableSelectorPart+
+    |    identifier
+    |    primary assignableSelectorPart+
+    |    identifier
+    ;
+
+assignableSelectorPart
+    :    argumentPart* assignableSelector
+    ;
+
+unconditionalAssignableSelector
+    :    '[' expression ']'
+    |    '.' identifier
+    ;
+
+assignableSelector
+    :    unconditionalAssignableSelector
+    |    '?.' identifier
+    ;
+
+identifierNotFUNCTION
+    :    IDENTIFIER
+    |    ABSTRACT // Built-in identifier.
+    |    AS // Built-in identifier.
+    |    COVARIANT // Built-in identifier.
+    |    DEFERRED // Built-in identifier.
+    |    DYNAMIC // Built-in identifier.
+    |    EXPORT // Built-in identifier.
+    |    EXTERNAL // Built-in identifier.
+    |    FACTORY // Built-in identifier.
+    |    GET // Built-in identifier.
+    |    IMPLEMENTS // Built-in identifier.
+    |    IMPORT // Built-in identifier.
+    |    INTERFACE // Built-in identifier.
+    |    LIBRARY // Built-in identifier.
+    |    MIXIN // Built-in identifier.
+    |    OPERATOR // Built-in identifier.
+    |    PART // Built-in identifier.
+    |    SET // Built-in identifier.
+    |    STATIC // Built-in identifier.
+    |    TYPEDEF // Built-in identifier.
+    |    HIDE // Not a built-in identifier.
+    |    OF // Not a built-in identifier.
+    |    ON // Not a built-in identifier.
+    |    SHOW // Not a built-in identifier.
+    |    SYNC // Not a built-in identifier.
+    |    { asyncEtcPredicate(getCurrentToken().getType()) }? (ASYNC|AWAIT|YIELD)
+    ;
+
+identifier
+    :    identifierNotFUNCTION
+    |    FUNCTION // Built-in identifier that can be used as a type.
+    ;
+
+qualified
+    :    typeIdentifier
+    |    typeIdentifier '.' identifier
+    |    typeIdentifier '.' typeIdentifier '.' identifier
+    ;
+
+typeIdentifier
+    :    IDENTIFIER
+    |    DYNAMIC // Built-in identifier that can be used as a type.
+    |    HIDE // Not a built-in identifier.
+    |    OF // Not a built-in identifier.
+    |    ON // Not a built-in identifier.
+    |    SHOW // Not a built-in identifier.
+    |    SYNC // Not a built-in identifier.
+    |    { asyncEtcPredicate(getCurrentToken().getType()) }? (ASYNC|AWAIT|YIELD)
+    ;
+
+typeTest
+    :    isOperator typeNotVoid
+    ;
+
+isOperator
+    :    IS '!'?
+    ;
+
+typeCast
+    :    asOperator typeNotVoid
+    ;
+
+asOperator
+    :    AS
+    ;
+
+statements
+    :    statement*
+    ;
+
+statement
+    :    label* nonLabelledStatement
+    ;
+
+// Exception in the language specification: An expressionStatement cannot
+// start with LBRACE. We force anything that starts with LBRACE to be a block,
+// which will prevent an expressionStatement from starting with LBRACE, and
+// which will not interfere with the recognition of any other case. If we
+// add another statement which can start with LBRACE we must adjust this
+// check.
+nonLabelledStatement
+    :    block
+    |    localVariableDeclaration
+    |    forStatement
+    |    whileStatement
+    |    doStatement
+    |    switchStatement
+    |    ifStatement
+    |    rethrowStatement
+    |    tryStatement
+    |    breakStatement
+    |    continueStatement
+    |    returnStatement
+    |    localFunctionDeclaration
+    |    assertStatement
+    |    yieldStatement
+    |    yieldEachStatement
+    |    expressionStatement
+    ;
+
+expressionStatement
+    :    expression? ';'
+    ;
+
+localVariableDeclaration
+    :    metadata initializedVariableDeclaration ';'
+    ;
+
+initializedVariableDeclaration
+    :    declaredIdentifier ('=' expression)? (',' initializedIdentifier)*
+    ;
+
+localFunctionDeclaration
+    :    metadata functionSignature functionBody
+    ;
+
+ifStatement
+    :    IF '(' expression ')' statement (ELSE statement | ())
+    ;
+
+forStatement
+    :    AWAIT? FOR '(' forLoopParts ')' statement
+    ;
+
+forLoopParts
+    :    metadata declaredIdentifier IN expression
+    |    metadata identifier IN expression
+    |    forInitializerStatement expression? ';' expressionList?
+    ;
+
+// The localVariableDeclaration cannot be CONST, but that can
+// be enforced in a later phase, and the grammar allows it.
+forInitializerStatement
+    :    localVariableDeclaration
+    |    expression? ';'
+    ;
+
+whileStatement
+    :    WHILE '(' expression ')' statement
+    ;
+
+doStatement
+    :    DO statement WHILE '(' expression ')' ';'
+    ;
+
+switchStatement
+    :    SWITCH '(' expression ')' LBRACE switchCase* defaultCase? RBRACE
+    ;
+
+switchCase
+    :    label* CASE expression ':' statements
+    ;
+
+defaultCase
+    :    label* DEFAULT ':' statements
+    ;
+
+rethrowStatement
+    :    RETHROW ';'
+    ;
+
+tryStatement
+    :    TRY block (onParts finallyPart? | finallyPart)
+    ;
+
+onPart
+    :    catchPart block
+    |    ON typeNotVoid catchPart? block
+    ;
+
+onParts
+    :    onPart onParts
+    |    onPart
+    ;
+
+catchPart
+    :    CATCH '(' identifier (',' identifier)? ')'
+    ;
+
+finallyPart
+    :    FINALLY block
+    ;
+
+returnStatement
+    :    RETURN expression? ';'
+    ;
+
+label
+    :    identifier ':'
+    ;
+
+breakStatement
+    :    BREAK identifier? ';'
+    ;
+
+continueStatement
+    :    CONTINUE identifier? ';'
+    ;
+
+yieldStatement
+    :    YIELD expression ';'
+    ;
+
+yieldEachStatement
+    :    YIELD '*' expression ';'
+    ;
+
+assertStatement
+    :    assertClause ';'
+    ;
+
+assertClause
+    :    ASSERT '(' expression (',' expression)? ','? ')'
+    ;
+
+libraryName
+    :    metadata LIBRARY identifier ('.' identifier)* ';'
+    ;
+
+importOrExport
+    :    libraryImport
+    |    libraryExport
+    ;
+
+libraryImport
+    :    metadata importSpecification
+    ;
+
+importSpecification
+    :    IMPORT uri (AS identifier)? combinator* ';'
+    |    IMPORT uri DEFERRED AS identifier combinator* ';'
+    ;
+
+combinator
+    :    SHOW identifierList
+    |    HIDE identifierList
+    ;
+
+identifierList
+    :    identifier (',' identifier)*
+    ;
+
+libraryExport
+    :    metadata EXPORT uri combinator* ';'
+    ;
+
+partDirective
+    :    metadata PART uri ';'
+    ;
+
+partHeader
+    :    metadata PART OF identifier ('.' identifier)* ';'
+    ;
+
+partDeclaration
+    :    partHeader topLevelDefinition* EOF
+    ;
+
+uri
+    :    stringLiteralWithoutInterpolation
+    ;
+
+type
+    :    functionTypeTails
+    |    typeNotFunction functionTypeTails
+    |    typeNotFunction
+    ;
+
+typeNotFunction
+    :    typeNotVoidNotFunction
+    |    VOID
+    ;
+
+typeNotVoid
+    :    functionType
+    |    typeNotVoidNotFunction
+    ;
+
+typeNotVoidNotFunction
+    :    typeName typeArguments?
+    |    FUNCTION
+    ;
+
+typeName
+    :    typeIdentifier ('.' typeIdentifier)?
+    ;
+
+typeArguments
+    :    '<' typeList '>'
+    ;
+
+typeList
+    :    type (',' type)*
+    ;
+
+typeNotVoidNotFunctionList
+    :    typeNotVoidNotFunction (',' typeNotVoidNotFunction)*
+    ;
+
+typeAlias
+    :    TYPEDEF typeIdentifier typeParameters? '=' functionType ';'
+    |    TYPEDEF functionTypeAlias
+    ;
+
+functionTypeAlias
+    :    functionPrefix formalParameterPart ';'
+    ;
+
+functionPrefix
+    :    type identifier
+    |    identifier
+    ;
+
+functionTypeTail
+    :    FUNCTION typeParameters? parameterTypeList
+    ;
+
+functionTypeTails
+    :    functionTypeTail functionTypeTails
+    |    functionTypeTail
+    ;
+
+functionType
+    :    functionTypeTails
+    |    typeNotFunction functionTypeTails
+    ;
+
+parameterTypeList
+    :    '(' ')'
+    |    '(' normalParameterTypes ',' optionalParameterTypes ')'
+    |    '(' normalParameterTypes ','? ')'
+    |    '(' optionalParameterTypes ')'
+    ;
+
+normalParameterTypes
+    :    normalParameterType (',' normalParameterType)*
+    ;
+
+normalParameterType
+    :    typedIdentifier
+    |    type
+    ;
+
+optionalParameterTypes
+    :    optionalPositionalParameterTypes
+    |    namedParameterTypes
+    ;
+
+optionalPositionalParameterTypes
+    :    '[' normalParameterTypes ','? ']'
+    ;
+
+namedParameterTypes
+    :    LBRACE typedIdentifier (',' typedIdentifier)* ','? RBRACE
+    ;
+
+typedIdentifier
+    :    type identifier
+    ;
+
+constructorDesignation
+    :    qualified
+    |    typeName typeArguments ('.' identifier)?
+    ;
+
+symbolLiteral
+    :    '#' (operator | (identifier ('.' identifier)*))
+    ;
+
+singleLineStringWithoutInterpolation
+    :    RAW_SINGLE_LINE_STRING
+    |    SINGLE_LINE_STRING_DQ_BEGIN_END
+    |    SINGLE_LINE_STRING_SQ_BEGIN_END
+    ;
+
+singleLineString
+    :    RAW_SINGLE_LINE_STRING
+    |    SINGLE_LINE_STRING_SQ_BEGIN_END
+    |    SINGLE_LINE_STRING_SQ_BEGIN_MID expression
+         (SINGLE_LINE_STRING_SQ_MID_MID expression)*
+         SINGLE_LINE_STRING_SQ_MID_END
+    |    SINGLE_LINE_STRING_DQ_BEGIN_END
+    |    SINGLE_LINE_STRING_DQ_BEGIN_MID expression
+         (SINGLE_LINE_STRING_DQ_MID_MID expression)*
+         SINGLE_LINE_STRING_DQ_MID_END
+    ;
+
+multiLineString
+    :    RAW_MULTI_LINE_STRING
+    |    MULTI_LINE_STRING_SQ_BEGIN_END
+    |    MULTI_LINE_STRING_SQ_BEGIN_MID expression
+         (MULTI_LINE_STRING_SQ_MID_MID expression)*
+         MULTI_LINE_STRING_SQ_MID_END
+    |    MULTI_LINE_STRING_DQ_BEGIN_END
+    |    MULTI_LINE_STRING_DQ_BEGIN_MID expression
+         (MULTI_LINE_STRING_DQ_MID_MID expression)*
+         MULTI_LINE_STRING_DQ_MID_END
+    ;
+
+// ---------------------------------------- Lexer rules.
+
+fragment
+LETTER
+    :    'a' .. 'z'
+    |    'A' .. 'Z'
+    ;
+
+fragment
+DIGIT
+    :    '0' .. '9'
+    ;
+
+fragment
+EXPONENT
+    :    ('e' | 'E') ('+' | '-')? DIGIT+
+    ;
+
+fragment
+HEX_DIGIT
+    :    ('a' | 'b' | 'c' | 'd' | 'e' | 'f')
+    |    ('A' | 'B' | 'C' | 'D' | 'E' | 'F')
+    |    DIGIT
+    ;
+
+FINAL
+    :    'final'
+    ;
+
+CONST
+    :    'const'
+    ;
+
+VAR
+    :    'var'
+    ;
+
+VOID
+    :    'void'
+    ;
+
+ASYNC
+    :    'async'
+    ;
+
+THIS
+    :    'this'
+    ;
+
+ABSTRACT
+    :    'abstract'
+    ;
+
+AS
+    :    'as'
+    ;
+
+SYNC
+    :    'sync'
+    ;
+
+CLASS
+    :    'class'
+    ;
+
+WITH
+    :    'with'
+    ;
+
+STATIC
+    :    'static'
+    ;
+
+DYNAMIC
+    :    'dynamic'
+    ;
+
+EXTERNAL
+    :    'external'
+    ;
+
+GET
+    :    'get'
+    ;
+
+SET
+    :    'set'
+    ;
+
+OPERATOR
+    :    'operator'
+    ;
+
+SUPER
+    :    'super'
+    ;
+
+FACTORY
+    :    'factory'
+    ;
+
+EXTENDS
+    :    'extends'
+    ;
+
+IMPLEMENTS
+    :    'implements'
+    ;
+
+ENUM
+    :    'enum'
+    ;
+
+NULL
+    :    'null'
+    ;
+
+TRUE
+    :    'true'
+    ;
+
+FALSE
+    :    'false'
+    ;
+
+THROW
+    :    'throw'
+    ;
+
+NEW
+    :    'new'
+    ;
+
+AWAIT
+    :    'await'
+    ;
+
+DEFERRED
+    :    'deferred'
+    ;
+
+EXPORT
+    :    'export'
+    ;
+
+IMPORT
+    :    'import'
+    ;
+
+INTERFACE
+    :    'interface'
+    ;
+
+LIBRARY
+    :    'library'
+    ;
+
+MIXIN
+    :    'mixin'
+    ;
+
+PART
+    :    'part'
+    ;
+
+TYPEDEF
+    :    'typedef'
+    ;
+
+IS
+    :    'is'
+    ;
+
+IF
+    :    'if'
+    ;
+
+ELSE
+    :    'else'
+    ;
+
+WHILE
+    :    'while'
+    ;
+
+FOR
+    :    'for'
+    ;
+
+IN
+    :    'in'
+    ;
+
+DO
+    :    'do'
+    ;
+
+SWITCH
+    :    'switch'
+    ;
+
+CASE
+    :    'case'
+    ;
+
+DEFAULT
+    :    'default'
+    ;
+
+RETHROW
+    :    'rethrow'
+    ;
+
+TRY
+    :    'try'
+    ;
+
+ON
+    :    'on'
+    ;
+
+CATCH
+    :    'catch'
+    ;
+
+FINALLY
+    :    'finally'
+    ;
+
+RETURN
+    :    'return'
+    ;
+
+BREAK
+    :    'break'
+    ;
+
+CONTINUE
+    :    'continue'
+    ;
+
+YIELD
+    :    'yield'
+    ;
+
+SHOW
+    :    'show'
+    ;
+
+HIDE
+    :    'hide'
+    ;
+
+OF
+    :    'of'
+    ;
+
+ASSERT
+    :    'assert'
+    ;
+
+COVARIANT
+    :    'covariant'
+    ;
+
+FUNCTION
+    :    'Function'
+    ;
+
+NUMBER
+    :    DIGIT+ '.' DIGIT+ EXPONENT?
+    |    DIGIT+ EXPONENT?
+    |    '.' DIGIT+ EXPONENT?
+    ;
+
+HEX_NUMBER
+    :    '0x' HEX_DIGIT+
+    |    '0X' HEX_DIGIT+
+    ;
+
+RAW_SINGLE_LINE_STRING
+    :    'r' '\'' (~('\'' | '\r' | '\n'))* '\''
+    |    'r' '"' (~('"' | '\r' | '\n'))* '"'
+    ;
+
+RAW_MULTI_LINE_STRING
+    :    'r' '"""' (.)*? '"""'
+    |    'r' '\'\'\'' (.)*? '\'\'\''
+    ;
+
+fragment
+SIMPLE_STRING_INTERPOLATION
+    :    '$' IDENTIFIER_NO_DOLLAR
+    ;
+
+fragment
+STRING_CONTENT_SQ
+    :    ~('\\' | '\'' | '$' |  '\r' | '\n')
+    |    '\\' ~( '\r' | '\n')
+    |    SIMPLE_STRING_INTERPOLATION
+    ;
+
+SINGLE_LINE_STRING_SQ_BEGIN_END
+    :    '\'' STRING_CONTENT_SQ* '\''
+    ;
+
+SINGLE_LINE_STRING_SQ_BEGIN_MID
+    :    '\'' STRING_CONTENT_SQ* '${' { enterBraceSingleQuote(); }
+    ;
+
+SINGLE_LINE_STRING_SQ_MID_MID
+    :    { currentBraceLevel(BRACE_SINGLE) }?
+         { exitBrace(); } '}' STRING_CONTENT_SQ* '${'
+         { enterBraceSingleQuote(); }
+    ;
+
+SINGLE_LINE_STRING_SQ_MID_END
+    :    { currentBraceLevel(BRACE_SINGLE) }?
+         { exitBrace(); } '}' STRING_CONTENT_SQ* '\''
+    ;
+
+fragment
+STRING_CONTENT_DQ
+    :    ~('\\' | '"' | '$' | '\r' | '\n')
+    |    '\\' ~('\r' | '\n')
+    |    SIMPLE_STRING_INTERPOLATION
+    ;
+
+SINGLE_LINE_STRING_DQ_BEGIN_END
+    :    '"' STRING_CONTENT_DQ* '"'
+    ;
+
+SINGLE_LINE_STRING_DQ_BEGIN_MID
+    :    '"' STRING_CONTENT_DQ* '${' { enterBraceDoubleQuote(); }
+    ;
+
+SINGLE_LINE_STRING_DQ_MID_MID
+    :    { currentBraceLevel(BRACE_DOUBLE) }?
+         { exitBrace(); } '}' STRING_CONTENT_DQ* '${'
+         { enterBraceDoubleQuote(); }
+    ;
+
+SINGLE_LINE_STRING_DQ_MID_END
+    :    { currentBraceLevel(BRACE_DOUBLE) }?
+         { exitBrace(); } '}' STRING_CONTENT_DQ* '"'
+    ;
+
+fragment
+QUOTES_SQ
+    :
+    |    '\''
+    |    '\'\''
+    ;
+
+// Read string contents, which may be almost anything, but stop when seeing
+// '\'\'\'' and when seeing '${'. We do this by allowing all other
+// possibilities including escapes, simple interpolation, and fewer than
+// three '\''.
+fragment
+STRING_CONTENT_TSQ
+    :    QUOTES_SQ
+         (~('\\' | '$' | '\'') | '\\' . | SIMPLE_STRING_INTERPOLATION)
+    ;
+
+MULTI_LINE_STRING_SQ_BEGIN_END
+    :    '\'\'\'' STRING_CONTENT_TSQ* '\'\'\''
+    ;
+
+MULTI_LINE_STRING_SQ_BEGIN_MID
+    :    '\'\'\'' STRING_CONTENT_TSQ* QUOTES_SQ '${'
+         { enterBraceThreeSingleQuotes(); }
+    ;
+
+MULTI_LINE_STRING_SQ_MID_MID
+    :    { currentBraceLevel(BRACE_THREE_SINGLE) }?
+         { exitBrace(); } '}' STRING_CONTENT_TSQ* QUOTES_SQ '${'
+         { enterBraceThreeSingleQuotes(); }
+    ;
+
+MULTI_LINE_STRING_SQ_MID_END
+    :    { currentBraceLevel(BRACE_THREE_SINGLE) }?
+         { exitBrace(); } '}' STRING_CONTENT_TSQ* '\'\'\''
+    ;
+
+fragment
+QUOTES_DQ
+    :
+    |    '"'
+    |    '""'
+    ;
+
+// Read string contents, which may be almost anything, but stop when seeing
+// '"""' and when seeing '${'. We do this by allowing all other possibilities
+// including escapes, simple interpolation, and fewer-than-three '"'.
+fragment
+STRING_CONTENT_TDQ
+    :    QUOTES_DQ
+         (~('\\' | '$' | '"') | '\\' . | SIMPLE_STRING_INTERPOLATION)
+    ;
+
+MULTI_LINE_STRING_DQ_BEGIN_END
+    :    '"""' STRING_CONTENT_TDQ* '"""'
+    ;
+
+MULTI_LINE_STRING_DQ_BEGIN_MID
+    :    '"""' STRING_CONTENT_TDQ* QUOTES_DQ '${'
+         { enterBraceThreeDoubleQuotes(); }
+    ;
+
+MULTI_LINE_STRING_DQ_MID_MID
+    :    { currentBraceLevel(BRACE_THREE_DOUBLE) }?
+         { exitBrace(); } '}' STRING_CONTENT_TDQ* QUOTES_DQ '${'
+         { enterBraceThreeDoubleQuotes(); }
+    ;
+
+MULTI_LINE_STRING_DQ_MID_END
+    :    { currentBraceLevel(BRACE_THREE_DOUBLE) }?
+         { exitBrace(); } '}' STRING_CONTENT_TDQ* '"""'
+    ;
+
+LBRACE
+    :    '{' { enterBrace(); }
+    ;
+
+RBRACE
+    :    { currentBraceLevel(BRACE_NORMAL) }? { exitBrace(); } '}'
+    ;
+
+fragment
+IDENTIFIER_START_NO_DOLLAR
+    :    LETTER
+    |    '_'
+    ;
+
+fragment
+IDENTIFIER_PART_NO_DOLLAR
+    :    IDENTIFIER_START_NO_DOLLAR
+    |    DIGIT
+    ;
+
+fragment
+IDENTIFIER_NO_DOLLAR
+    :    IDENTIFIER_START_NO_DOLLAR IDENTIFIER_PART_NO_DOLLAR*
+    ;
+
+fragment
+IDENTIFIER_START
+    :    IDENTIFIER_START_NO_DOLLAR
+    |    '$'
+    ;
+
+fragment
+IDENTIFIER_PART
+    :    IDENTIFIER_START
+    |    DIGIT
+    ;
+
+SCRIPT_TAG
+    :    '#!' (~('\r' | '\n'))* NEWLINE
+    ;
+
+IDENTIFIER
+    :    IDENTIFIER_START IDENTIFIER_PART*
+    ;
+
+SINGLE_LINE_COMMENT
+    :    '//' (~('\r' | '\n'))* NEWLINE?
+         { skip(); }
+    ;
+
+MULTI_LINE_COMMENT
+    :    '/*' (MULTI_LINE_COMMENT | .)*? '*/'
+         { skip(); }
+    ;
+
+fragment
+NEWLINE
+    :    ('\r' | '\n' | '\r\n')
+    ;
+
+FEFF
+    :    '\uFEFF'
+    ;
+
+WS
+    :    (' ' | '\t' | '\r' | '\n')+
+         { skip(); }
+    ;
diff --git a/tools/spec_parser/Makefile b/tools/spec_parser/Makefile
index f91e7d3..fe0f239 100644
--- a/tools/spec_parser/Makefile
+++ b/tools/spec_parser/Makefile
@@ -6,29 +6,28 @@
 JAVA_PATH=/usr/lib/jvm/java-7-openjdk-amd64/bin
 JAVA=$(JAVA_PATH)/java
 JAVAC=javac
-ANTLR_JAR=/usr/share/java/antlr3-runtime.jar
-ANTLR_FILES=DartLexer.java DartParser.java Dart.tokens
-ANTLR_CMD=PATH=$(JAVA_PATH):$(PATH) antlr3 -dfa -fo . $<
-JAVA_FILES=DartLexer.java DartParser.java
-CLASS_FILES=SpecParser.class SpecParserRunner.class DartLexer.class DartParser.class
+ANTLR_JAR=/usr/share/java/antlr4-runtime.jar
+ANTLR_FILES=DartLexer.java DartParser.java DartLexer.tokens
+ANTLR_CMD=PATH=$(JAVA_PATH):$(PATH) antlr4 $<
+GENERATED_JAVA_FILES=DartLexer.java DartParser.java
 
 .PHONY: default parser clean touch parse_hello
 
-default: $(JAVA_FILES)
+default: $(GENERATED_JAVA_FILES) compile
 
-parser: SpecParser.class
+compile: SpecParser.class
 
 SpecParser.class: $(ANTLR_FILES) SpecParser.java
 	$(JAVAC) -cp .:$(ANTLR_JAR) SpecParser.java
 
-%Lexer.java: ../../docs/language/%.g Makefile ; $(ANTLR_CMD)
+%Lexer.java: %.g Makefile ; $(ANTLR_CMD)
 
-%Parser.java: ../../docs/language/%.g Makefile ; $(ANTLR_CMD)
+%Parser.java: %.g Makefile ; $(ANTLR_CMD)
 
-%.tokens: ../../docs/language/%.g Makefile ; $(ANTLR_CMD)
+%.tokens: %.g Makefile ; $(ANTLR_CMD)
 
 clean:
-	rm -f $(CLASS_FILES) $(ANTLR_FILES)
+	rm -f *.class $(ANTLR_FILES)
 
 touch:
 	touch $(GRAMMAR)
diff --git a/tools/spec_parser/SpecParser.java b/tools/spec_parser/SpecParser.java
index 0f6ba68..cc9d1ea 100644
--- a/tools/spec_parser/SpecParser.java
+++ b/tools/spec_parser/SpecParser.java
@@ -4,13 +4,52 @@
 
 import java.io.*;
 import java.util.*;
-import org.antlr.runtime.*;
+import org.antlr.v4.runtime.*;
+import org.antlr.v4.runtime.dfa.*;
+import org.antlr.v4.runtime.atn.*;
 
 class ParsingResult {
   public int numberOfFileArguments;
   public int numberOfFailures;
 }
 
+class DartErrorListener implements ANTLRErrorListener {
+  public void reportAmbiguity(
+      Parser recognizer,
+      DFA dfa,
+      int startIndex,
+      int stopIndex,
+      boolean exact,
+      BitSet ambigAlts,
+      ATNConfigSet configs) {}
+
+  public void reportAttemptingFullContext(
+      Parser recognizer,
+      DFA dfa,
+      int startIndex,
+      int stopIndex,
+      BitSet conflictingAlts,
+      ATNConfigSet configs) {}
+
+  public void reportContextSensitivity(
+      Parser recognizer,
+      DFA dfa,
+      int startIndex,
+      int stopIndex,
+      int prediction,
+      ATNConfigSet configs) {}
+
+  public void syntaxError(
+      Recognizer<?,?> recognizer,
+      Object offendingSymbol,
+      int line,
+      int charPositionInLine,
+      String msg,
+      RecognitionException e) {
+    if (!DartParser.errorHasOccurred) DartParser.prepareForErrors();
+  }
+}
+
 /// Class for `main` which will parse files given as command line arguments.
 public class SpecParser {
   private static void normalExit() {
@@ -83,8 +122,11 @@
         continue;
       }
       if (verbose) System.err.println("Parsing file: " + filePath);
-      DartParser parser = new DartParser(new CommonTokenStream(
-          new DartLexer(new ANTLRFileStream(filePath))));
+      DartLexer lexer = new DartLexer(new ANTLRFileStream(filePath));
+      DartParser parser = new DartParser(new CommonTokenStream(lexer));
+      ANTLRErrorListener errorListener = new DartErrorListener();
+      lexer.addErrorListener(errorListener);
+      parser.addErrorListener(errorListener);
       if (!parser.parseLibrary(filePath)) result.numberOfFailures++;
     }
     return result;
diff --git a/tools/test.dart b/tools/test.dart
index ebe3add..ae5213c 100755
--- a/tools/test.dart
+++ b/tools/test.dart
@@ -6,6 +6,7 @@
 // Run tests like on the given builder.
 
 import 'dart:async';
+import 'dart:collection';
 import 'dart:convert';
 import 'dart:io';
 
@@ -132,6 +133,86 @@
   return string;
 }
 
+/// Finds the branch of a builder given the list of branches.
+String branchOfBuilder(String builder, List<String> branches) {
+  return branches.where((branch) => branch != "master").firstWhere(
+      (branch) => builder.endsWith("-$branch"),
+      orElse: () => "master");
+}
+
+/// Finds the named configuration to test according to the test matrix
+/// information and the command line options.
+bool resolveNamedConfiguration(
+    List<String> branches,
+    List<dynamic> buildersConfigurations,
+    String requestedBranch,
+    String requestedNamedConfiguration,
+    String requestedBuilder,
+    Set<String> outputNamedConfiguration,
+    Set<String> outputBuilders) {
+  bool foundBuilder = false;
+  for (final builderConfiguration in buildersConfigurations) {
+    for (final builder in builderConfiguration["builders"]) {
+      if (requestedBuilder != null && builder != requestedBuilder) {
+        continue;
+      }
+      final branch = branchOfBuilder(builder, branches);
+      if (branch != requestedBranch) {
+        if (requestedBuilder == null) {
+          continue;
+        }
+        stderr.writeln("error: Builder $requestedBuilder is on branch $branch "
+            "rather than $requestedBranch");
+        stderr.writeln("error: To compare with that branch, use: -B $branch");
+        return false;
+      }
+      foundBuilder = true;
+      final steps = (builderConfiguration["steps"] as List).cast<Map>();
+      final testSteps = steps
+          .where((step) =>
+              !step.containsKey("script") || step["script"] == "tools/test.py")
+          .toList();
+      for (final step in testSteps) {
+        final arguments = step["arguments"]
+            .map((argument) => expandVariables(argument, builder))
+            .toList();
+        final namedConfiguration = arguments
+            .firstWhere((argument) => (argument as String).startsWith("-n"))
+            .substring(2);
+        if (requestedNamedConfiguration == null ||
+            requestedNamedConfiguration == namedConfiguration) {
+          outputNamedConfiguration.add(namedConfiguration);
+          outputBuilders.add(builder);
+        }
+      }
+    }
+  }
+  if (requestedBuilder != null && !foundBuilder) {
+    stderr.writeln("error: Builder $requestedBuilder doesn't exist");
+    return false;
+  }
+  if (requestedBuilder != null &&
+      requestedNamedConfiguration == null &&
+      outputNamedConfiguration.isEmpty) {
+    stderr.writeln("error: Builder $requestedBuilder isn't testing any named "
+        "configurations");
+    return false;
+  }
+  if (requestedBuilder != null &&
+      requestedNamedConfiguration != null &&
+      outputNamedConfiguration.isEmpty) {
+    stderr.writeln("error: The builder $requestedBuilder isn't testing the "
+        "named configuration $requestedNamedConfiguration");
+    return false;
+  }
+  if (requestedNamedConfiguration != null && outputBuilders.isEmpty) {
+    stderr.writeln("error: The named configuration "
+        "$requestedNamedConfiguration isn't tested on any builders");
+    return false;
+  }
+  return true;
+}
+
 /// Locates the merge base between head and the [branch] on the given [remote].
 /// If a particular [commit] was requested, use that.
 Future<String> findMergeBase(
@@ -150,9 +231,26 @@
   return LineSplitter.split(result.stdout).first;
 }
 
+/// Exception thrown when looking up the build for a commit failed.
+class CommitNotBuiltException implements Exception {
+  final String reason;
+
+  CommitNotBuiltException(this.reason);
+
+  String toString() => reason;
+}
+
+/// The result after searching for a build of a commit.
+class BuildSearchResult {
+  final int build;
+  final String commit;
+
+  BuildSearchResult(this.build, this.commit);
+}
+
 /// Locates the build number of the [commit] on the [builder], or throws an
 /// exception if the builder hasn't built the commit.
-Future<int> buildNumberOfCommit(String builder, String commit) async {
+Future<BuildSearchResult> searchForBuild(String builder, String commit) async {
   final requestUrl = Uri.parse(
       "https://cr-buildbucket.appspot.com/_ah/api/buildbucket/v1/search"
       "?bucket=luci.dart.ci.sandbox"
@@ -169,7 +267,8 @@
   client.close();
   final builds = object["builds"];
   if (builds == null || builds.isEmpty) {
-    throw new Exception("Builder $builder hasn't built commit $commit");
+    throw new CommitNotBuiltException(
+        "Builder $builder hasn't built commit $commit");
   }
   final build = builds.last;
   final tags = (build["tags"] as List).cast<String>();
@@ -177,9 +276,44 @@
       tags.firstWhere((tag) => tag.startsWith("build_address:"));
   final buildAddress = buildAddressTag.substring("build_address:".length);
   if (build["status"] != "COMPLETED") {
-    throw new Exception("Build $buildAddress isn't completed yet");
+    throw new CommitNotBuiltException(
+        "Build $buildAddress isn't completed yet");
   }
-  return int.parse(buildAddress.split("/").last);
+  return new BuildSearchResult(int.parse(buildAddress.split("/").last), commit);
+}
+
+Future<BuildSearchResult> searchForApproximateBuild(
+    String builder, String commit) async {
+  try {
+    return await searchForBuild(builder, commit);
+  } on CommitNotBuiltException catch (e) {
+    print("Warning: $e, searching for an inexact previous build...");
+    final int limit = 25;
+    final arguments = [
+      "rev-list",
+      "$commit~$limit..$commit~1",
+      "--first-parent",
+      "--topo-order"
+    ];
+    final processResult = await Process.run("git", arguments, runInShell: true);
+    if (processResult.exitCode != 0) {
+      throw new Exception("Failed to list potential commits: git $arguments\n"
+          "exitCode: ${processResult.exitCode}\n"
+          "stdout: ${processResult.stdout}\n"
+          "stdout: ${processResult.stderr}\n");
+    }
+    for (final fallbackCommit in LineSplitter.split(processResult.stdout)) {
+      try {
+        return await searchForBuild(builder, fallbackCommit);
+      } catch (e) {
+        print(
+            "Warning: Searching for inexact baseline build: $e, continuing...");
+      }
+    }
+    throw new CommitNotBuiltException(
+        "Failed to locate approximate baseline results for "
+        "$commit in past $limit commits");
+  }
 }
 
 void main(List<String> args) async {
@@ -191,6 +325,18 @@
       help: "Select the builders building this branch",
       defaultsTo: "master");
   parser.addOption("commit", abbr: "C", help: "Compare with this commit");
+  parser.addFlag("list-configurations",
+      help: "Output list of configurations.", negatable: false);
+  parser.addOption("named-configuration",
+      abbr: "n",
+      help: "The named test configuration that supplies the\nvalues for all "
+          "test options, specifying how tests\nshould be run.");
+  parser.addOption("local-configuration",
+      abbr: "N",
+      help: "Use a different named configuration for local\ntesting than the "
+          "named configuration the baseline\nresults were downloaded for. The "
+          "results may be\ninexact if the baseline configuration is "
+          "different.");
   parser.addOption("remote",
       abbr: "R",
       help: "Compare with this remote and git branch",
@@ -198,151 +344,220 @@
   parser.addFlag("help", help: "Show the program usage.", negatable: false);
 
   final options = parser.parse(args);
-  if (options["help"] || options["builder"] == null) {
+  if (options["help"] ||
+      (options["builder"] == null &&
+          options["named-configuration"] == null &&
+          !options["list-configurations"])) {
     print("""
-Usage: test.dart -b [BUILDER] [OPTION]...
-Run tests and compare with the results on the given builder.
+Usage: test.dart -b [BUILDER] -n [CONFIGURATION] [OPTION]... [--]
+                 [TEST.PY OPTION]... [SELECTOR]...
+
+Run tests and compare with the results on the given builder. Either the -n or
+the -b option, or both, must be used. Any options following -- and non-option
+arguments will be forwarded to test.py invocations. The results for the specified
+named configuration will be downloaded from the specified builder. If only a
+named configuration is specified, the results are downloaded from the
+appropriate builders. If only a builder is specified, the default named
+configuration is used if the builder only has a single named configuration.
+Otherwise the available named configurations are listed.
+
+See the documentation at https://goto.google.com/dart-status-file-free-workflow
 
 ${parser.usage}""");
     return;
   }
 
+  if (options["list-configurations"]) {
+    final process = await Process.start(
+        "python", ["tools/test.py", "--list-configurations"],
+        mode: ProcessStartMode.inheritStdio, runInShell: Platform.isWindows);
+    exitCode = await process.exitCode;
+    return;
+  }
+
   // Locate gsutil.py.
   gsutilPy =
       Platform.script.resolve("../third_party/gsutil/gsutil.py").toFilePath();
 
-  final builder = options["builder"];
+  // Load the test matrix.
+  final scriptPath = Platform.script.toFilePath();
+  final testMatrixPath =
+      scriptPath.substring(0, scriptPath.length - "test.dart".length) +
+          "bots/test_matrix.json";
+  final testMatrix = jsonDecode(await new File(testMatrixPath).readAsString());
+  final branches = (testMatrix["branches"] as List).cast<String>();
+  final buildersConfigurations =
+      testMatrix["builder_configurations"] as List<dynamic>;
+
+  // Determine what named configuration to run and which builders to download
+  // existing results from.
+  final namedConfigurations = new SplayTreeSet<String>();
+  final builders = new SplayTreeSet<String>();
+  if (!resolveNamedConfiguration(
+      branches,
+      buildersConfigurations,
+      options["branch"],
+      options["named-configuration"],
+      options["builder"],
+      namedConfigurations,
+      builders)) {
+    exitCode = 1;
+    return;
+  }
+  if (2 <= namedConfigurations.length) {
+    final builder = builders.single;
+    stderr.writeln(
+        "error: The builder $builder is testing multiple named configurations");
+    stderr.writeln(
+        "error: Please select the desired named configuration using -n:");
+    for (final namedConfiguration in namedConfigurations) {
+      stderr.writeln("  -n $namedConfiguration");
+    }
+    exitCode = 1;
+    return;
+  }
+  final namedConfiguration = namedConfigurations.single;
+  final localConfiguration =
+      options["local-configuration"] ?? namedConfiguration;
+  for (final builder in builders) {
+    if (localConfiguration != namedConfiguration) {
+      print("Testing the named configuration $localConfiguration "
+          "compared with builder $builder's configuration $namedConfiguration");
+    } else {
+      print("Testing the named configuration $localConfiguration "
+          "compared with builder $builder");
+    }
+  }
 
   // Find out where the current HEAD branched.
   final commit = await findMergeBase(
       options["commit"], options["remote"], options["branch"]);
   print("Base commit is $commit");
 
-  // Use the buildbucket API to search for builds of the right rcommit.
-  print("Finding build to compare with...");
-  final buildNumber = await buildNumberOfCommit(builder, commit);
-  print("Comparing with build $buildNumber on $builder");
-
+  // Store the downloaded results and our test results in a temporary directory.
   final outDirectory = await Directory.systemTemp.createTemp("test.dart.");
   try {
-    // Download the previous results and flakiness info from cloud storage.
-    print("Downloading previous results...");
-    await cpGsutil(
-        buildFileCloudPath(builder, buildNumber.toString(), "results.json"),
-        "${outDirectory.path}/previous.json");
-    await cpGsutil(
-        buildFileCloudPath(builder, buildNumber.toString(), "flaky.json"),
-        "${outDirectory.path}/flaky.json");
-    print("Downloaded previous results");
+    final mergedResults = <String, Map<String, dynamic>>{};
+    final mergedFlaky = <String, Map<String, dynamic>>{};
 
-    // Load the test matrix.
-    final scriptPath = Platform.script.toFilePath();
-    final testMatrixPath =
-        scriptPath.substring(0, scriptPath.length - "test.dart".length) +
-            "bots/test_matrix.json";
-    final testMatrix =
-        jsonDecode(await new File(testMatrixPath).readAsString());
-
-    // Find the appropriate test.py steps.
-    final buildersConfigurations = testMatrix["builder_configurations"];
-    final builderConfiguration = buildersConfigurations.firstWhere(
-        (builderConfiguration) =>
-            (builderConfiguration["builders"] as List).contains(builder));
-    final steps = (builderConfiguration["steps"] as List).cast<Map>();
-    final testSteps = steps
-        .where((step) =>
-            !step.containsKey("script") || step["script"] == "tools/test.py")
-        .toList();
-
-    // Run each step like the builder would, deflaking tests that need it.
-    final stepResultsPaths = <String>[];
-    final stepLogsPaths = <String>[];
-    for (int stepIndex = 0; stepIndex < testSteps.length; stepIndex++) {
-      // Run the test step.
-      final testStep = testSteps[stepIndex];
-      final stepName = testStep["name"];
-      final stepDirectory = new Directory("${outDirectory.path}/$stepIndex");
-      await stepDirectory.create();
-      final stepArguments = testStep["arguments"]
-          .map((argument) => expandVariables(argument, builder))
-          .toList()
-          .cast<String>();
-      final fullArguments = <String>[]
-        ..addAll(stepArguments)
-        ..addAll([
-          "--output-directory=${stepDirectory.path}",
-          "--clean-exit",
-          "--silent-failures",
-          "--write-results",
-          "--write-logs",
-        ])
-        ..addAll(options.rest);
-      print("".padLeft(80, "="));
-      print("$stepName: Running tests");
-      print("".padLeft(80, "="));
-      await runProcessInheritStdio(
-          "python", ["tools/test.py"]..addAll(fullArguments),
-          runInShell: Platform.isWindows);
-      stepResultsPaths.add("${stepDirectory.path}/results.json");
-      stepLogsPaths.add("${stepDirectory.path}/logs.json");
-      // Find the list of tests to deflake.
-      final deflakeListOutput = await runProcess(Platform.resolvedExecutable, [
-        "tools/bots/compare_results.dart",
-        "--changed",
-        "--failing",
-        "--passing",
-        "--flakiness-data=${outDirectory.path}/flaky.json",
-        "${outDirectory.path}/previous.json",
-        "${stepDirectory.path}/results.json",
-      ]);
-      final deflakeListPath = "${stepDirectory.path}/deflake.list";
-      final deflakeListFile = new File(deflakeListPath);
-      await deflakeListFile.writeAsString(deflakeListOutput.stdout);
-      // Deflake the changed tests.
-      final deflakingResultsPaths = <String>[];
-      for (int i = 1;
-          deflakeListOutput.stdout != "" && i <= deflakingCount;
-          i++) {
-        print("".padLeft(80, "="));
-        print("$stepName: Running deflaking iteration $i");
-        print("".padLeft(80, "="));
-        final deflakeDirectory = new Directory("${stepDirectory.path}/$i");
-        await deflakeDirectory.create();
-        final deflakeArguments = <String>[]
-          ..addAll(stepArguments)
-          ..addAll([
-            "--output-directory=${deflakeDirectory.path}",
-            "--clean-exit",
-            "--silent-failures",
-            "--write-results",
-            "--test-list=$deflakeListPath",
-          ])
-          ..addAll(options.rest);
-        await runProcessInheritStdio(
-            "python", ["tools/test.py"]..addAll(deflakeArguments),
-            runInShell: Platform.isWindows);
-        deflakingResultsPaths.add("${deflakeDirectory.path}/results.json");
+    // Use the buildbucket API to search for builds of the right commit.
+    final inexactBuilds = new SplayTreeMap<String, String>();
+    for (final builder in builders) {
+      // Download the previous results and flakiness info from cloud storage.
+      print("Finding build on builder $builder to compare with...");
+      final buildSearchResult =
+          await searchForApproximateBuild(builder, commit);
+      if (buildSearchResult.commit != commit) {
+        print("Warning: Using commit ${buildSearchResult.commit} "
+            "as baseline instead of $commit for $builder");
+        inexactBuilds[builder] = buildSearchResult.commit;
       }
-      // Update the flakiness information based on what we've learned.
-      print("$stepName: Updating flakiness information");
-      await runProcess(
-          Platform.resolvedExecutable,
-          [
-            "tools/bots/update_flakiness.dart",
-            "--input=${outDirectory.path}/flaky.json",
-            "--output=${outDirectory.path}/flaky.json",
-            "${stepDirectory.path}/results.json",
-          ]..addAll(deflakingResultsPaths));
+      final buildNumber = buildSearchResult.build;
+      print("Downloading results from builder $builder build $buildNumber...");
+      await cpGsutil(
+          buildFileCloudPath(builder, buildNumber.toString(), "results.json"),
+          "${outDirectory.path}/previous.json");
+      await cpGsutil(
+          buildFileCloudPath(builder, buildNumber.toString(), "flaky.json"),
+          "${outDirectory.path}/flaky.json");
+      print("Downloaded baseline results from builder $builder");
+      // Merge the results for the builders.
+      if (2 <= builders.length) {
+        mergedResults
+            .addAll(await loadResultsMap("${outDirectory.path}/previous.json"));
+        mergedFlaky
+            .addAll(await loadResultsMap("${outDirectory.path}/flaky.json"));
+      }
     }
-    // Collect all the results from all the steps.
-    await new File("${outDirectory.path}/results.json").writeAsString(
-        stepResultsPaths
-            .map((path) => new File(path).readAsStringSync())
-            .join(""));
-    // Collect all the logs from all the steps.
-    await new File("${outDirectory.path}/logs.json").writeAsString(stepLogsPaths
-        .map((path) => new File(path).readAsStringSync())
-        .join(""));
+
+    // Write out the merged results for the builders.
+    if (2 <= builders.length) {
+      await new File("${outDirectory.path}/previous.json").writeAsString(
+          mergedResults.values.map((data) => jsonEncode(data) + "\n").join(""));
+      await new File("${outDirectory.path}/flaky.json").writeAsString(
+          mergedFlaky.values.map((data) => jsonEncode(data) + "\n").join(""));
+    }
+
+    // Override the named configuration in the baseline data if needed.
+    if (namedConfiguration != localConfiguration) {
+      for (final path in [
+        "${outDirectory.path}/previous.json",
+        "${outDirectory.path}/flaky.json"
+      ]) {
+        final results = await loadResultsMap(path);
+        final records = results.values
+            .where((r) => r["configuration"] == namedConfiguration)
+            .toList()
+              ..forEach((r) => r["configuration"] = localConfiguration);
+        await new File(path).writeAsString(
+            records.map((data) => jsonEncode(data) + "\n").join(""));
+      }
+    }
+
+    // Run the tests.
+    final arguments = [
+      "--named-configuration=$localConfiguration",
+      "--output-directory=${outDirectory.path}",
+      "--clean-exit",
+      "--silent-failures",
+      "--write-results",
+      "--write-logs",
+    ]..addAll(options.rest);
+    print("".padLeft(80, "="));
+    print("Running tests");
+    print("".padLeft(80, "="));
+    await runProcessInheritStdio("python", ["tools/test.py"]..addAll(arguments),
+        runInShell: Platform.isWindows);
+
+    // Find the list of tests to deflake.
+    final deflakeListOutput = await runProcess(Platform.resolvedExecutable, [
+      "tools/bots/compare_results.dart",
+      "--changed",
+      "--failing",
+      "--passing",
+      "--flakiness-data=${outDirectory.path}/flaky.json",
+      "${outDirectory.path}/previous.json",
+      "${outDirectory.path}/results.json",
+    ]);
+    final deflakeListPath = "${outDirectory.path}/deflake.list";
+    final deflakeListFile = new File(deflakeListPath);
+    await deflakeListFile.writeAsString(deflakeListOutput.stdout);
+
+    // Deflake the changed tests.
+    final deflakingResultsPaths = <String>[];
+    for (int i = 1;
+        deflakeListOutput.stdout != "" && i <= deflakingCount;
+        i++) {
+      print("".padLeft(80, "="));
+      print("Running deflaking iteration $i");
+      print("".padLeft(80, "="));
+      final deflakeDirectory = new Directory("${outDirectory.path}/$i");
+      await deflakeDirectory.create();
+      final deflakeArguments = <String>[
+        "--named-configuration=$localConfiguration",
+        "--output-directory=${deflakeDirectory.path}",
+        "--clean-exit",
+        "--silent-failures",
+        "--write-results",
+        "--test-list=$deflakeListPath",
+      ]..addAll(options.rest);
+      await runProcessInheritStdio(
+          "python", ["tools/test.py"]..addAll(deflakeArguments),
+          runInShell: Platform.isWindows);
+      deflakingResultsPaths.add("${deflakeDirectory.path}/results.json");
+    }
+
+    // Update the flakiness information based on what we've learned.
+    print("Updating flakiness information...");
+    await runProcess(
+        Platform.resolvedExecutable,
+        [
+          "tools/bots/update_flakiness.dart",
+          "--input=${outDirectory.path}/flaky.json",
+          "--output=${outDirectory.path}/flaky.json",
+          "${outDirectory.path}/results.json",
+        ]..addAll(deflakingResultsPaths));
+
     // Write out the final comparison.
     print("".padLeft(80, "="));
     print("Test Results");
@@ -364,6 +579,12 @@
     } else {
       stdout.write(compareOutput.stdout);
     }
+    if (inexactBuilds.isNotEmpty) {
+      print("");
+      inexactBuilds.forEach((String builder, String inexactCommit) => print(
+          "Warning: Results may be inexact because commit ${inexactCommit} "
+          "was used as the baseline for $builder instead of $commit"));
+    }
   } finally {
     await outDirectory.delete(recursive: true);
   }
diff --git a/tools/testing/dart/browser_test.dart b/tools/testing/dart/browser_test.dart
index 1faea9e..b7f51ca 100644
--- a/tools/testing/dart/browser_test.dart
+++ b/tools/testing/dart/browser_test.dart
@@ -200,7 +200,7 @@
   };
 
   let pendingCallbacks = 0;
-  let waitForDone = false;
+  let waitForDone = false, isDone = false;
 
   sdk.dart.addAsyncCallback = function() {
     pendingCallbacks++;
@@ -214,14 +214,30 @@
 
   sdk.dart.removeAsyncCallback = function() {
     if (--pendingCallbacks <= 0) {
-      // We might be done with async callbacks. Schedule a microtask to check.
-      Promise.resolve().then(function() {
-        if (pendingCallbacks <= 0) dartPrint('unittest-suite-done');
-      });
+      // We might be done with async callbacks. Schedule a task to check.
+      // Note: can't use a Promise here, because the unhandled rejection event
+      // is fired as a task, rather than a microtask. `setTimeout` will create a
+      // task, giving an unhandled promise reject time to fire before this does.
+      setTimeout(() => {
+        if (pendingCallbacks <= 0 && !isDone) {
+          isDone = true;
+          dartPrint('unittest-suite-done');
+        }
+      }, 0);
     }
   };
-  
-  dartMainRunner($testId.$testId.main);
+
+  dartMainRunner(function testMainWrapper() {
+    // Some callbacks are not scheduled with timers/microtasks, so they don't
+    // go through our async tracking (e.g. DOM events). For those tests, check
+    // if the result of calling `main()` is a Future, and if so, wait for it.
+    let result = $testId.$testId.main();
+    if (sdk.async.Future.is(result)) {
+      sdk.dart.addAsyncCallback();
+      result.whenComplete(sdk.dart.removeAsyncCallback);
+    }
+    return result;
+  });
 });
 </script>
 </body>
diff --git a/tools/testing/dart/command.dart b/tools/testing/dart/command.dart
index b91201d..d89b964 100644
--- a/tools/testing/dart/command.dart
+++ b/tools/testing/dart/command.dart
@@ -41,9 +41,10 @@
       List<Uri> bootstrapDependencies,
       String executable,
       List<String> arguments,
-      Map<String, String> environment) {
+      Map<String, String> environment,
+      List<String> batchArgs) {
     return new VMKernelCompilationCommand._(outputFile, neverSkipCompilation,
-        bootstrapDependencies, executable, arguments, environment);
+        bootstrapDependencies, executable, arguments, environment, batchArgs);
   }
 
   static Command analysis(String executable, List<String> arguments,
@@ -81,6 +82,12 @@
         precompiledRunner, processTest, testDirectory, arguments, useBlobs);
   }
 
+  static Command adbDartk(String precompiledRunner, String processTest,
+      String script, List<String> arguments, List<String> extraLibraries) {
+    return new AdbDartkCommand._(
+        precompiledRunner, processTest, script, arguments, extraLibraries);
+  }
+
   static Command jsCommandLine(
       String displayName, String executable, List<String> arguments,
       [Map<String, String> environment]) {
@@ -413,6 +420,8 @@
 }
 
 class VMKernelCompilationCommand extends CompilationCommand {
+  final List<String> batchArgs;
+
   VMKernelCompilationCommand._(
       String outputFile,
       bool alwaysCompile,
@@ -420,17 +429,29 @@
       String executable,
       List<String> arguments,
       Map<String, String> environmentOverrides,
+      this.batchArgs,
       {int index = 0})
-      : super._('vm_compile_to_kernel', outputFile, alwaysCompile,
+      : super._('vm_compile_to_kernel $batchArgs', outputFile, alwaysCompile,
             bootstrapDependencies, executable, arguments, environmentOverrides,
             index: index);
 
   VMKernelCompilationCommand indexedCopy(int index) =>
-      VMKernelCompilationCommand._(_outputFile, _alwaysCompile,
-          _bootstrapDependencies, executable, arguments, environmentOverrides,
+      VMKernelCompilationCommand._(
+          _outputFile,
+          _alwaysCompile,
+          _bootstrapDependencies,
+          executable,
+          arguments,
+          environmentOverrides,
+          batchArgs,
           index: index);
 
   int get maxNumRetries => 1;
+
+  @override
+  List<String> get batchArguments {
+    return batchArgs;
+  }
 }
 
 /// This is just a Pair(String, Map) class with hashCode and operator ==
@@ -604,6 +625,40 @@
       'to an attached device. Uses (and requires) adb.';
 }
 
+class AdbDartkCommand extends Command {
+  final String buildPath;
+  final String processTestFilename;
+  final String kernelFile;
+  final List<String> arguments;
+  final List<String> extraLibraries;
+
+  AdbDartkCommand._(this.buildPath, this.processTestFilename, this.kernelFile,
+      this.arguments, this.extraLibraries,
+      {int index = 0})
+      : super._("adb_precompilation", index: index);
+
+  AdbDartkCommand indexedCopy(int index) => AdbDartkCommand._(
+      buildPath, processTestFilename, kernelFile, arguments, extraLibraries,
+      index: index);
+  _buildHashCode(HashCodeBuilder builder) {
+    super._buildHashCode(builder);
+    builder.add(buildPath);
+    builder.add(kernelFile);
+    builder.add(arguments);
+    builder.add(extraLibraries);
+  }
+
+  bool _equal(AdbDartkCommand other) =>
+      super._equal(other) &&
+      buildPath == other.buildPath &&
+      arguments == other.arguments &&
+      extraLibraries == other.extraLibraries &&
+      kernelFile == other.kernelFile;
+
+  String toString() => 'Steps to push Dart VM and Dill file '
+      'to an attached device. Uses (and requires) adb.';
+}
+
 class JSCommandlineCommand extends ProcessCommand {
   JSCommandlineCommand._(
       String displayName, String executable, List<String> arguments,
diff --git a/tools/testing/dart/compiler_configuration.dart b/tools/testing/dart/compiler_configuration.dart
index 54dcc46..9edb9fb 100644
--- a/tools/testing/dart/compiler_configuration.dart
+++ b/tools/testing/dart/compiler_configuration.dart
@@ -81,7 +81,8 @@
       case Compiler.dartk:
         if (configuration.architecture == Architecture.simdbc64 ||
             configuration.architecture == Architecture.simarm ||
-            configuration.architecture == Architecture.simarm64) {
+            configuration.architecture == Architecture.simarm64 ||
+            configuration.system == System.android) {
           return new VMKernelCompilerConfiguration(configuration);
         }
         return new NoneCompilerConfiguration(configuration);
@@ -108,7 +109,14 @@
   CompilerConfiguration._subclass(this._configuration);
 
   /// A multiplier used to give tests longer time to run.
-  int get timeoutMultiplier => 1;
+  int get timeoutMultiplier {
+    if (_configuration.configuration.vmOptions
+        .any((s) => s.contains("optimization-counter-threshold"))) {
+      return 2;
+    } else {
+      return 1;
+    }
+  }
 
   // TODO(ahe): It shouldn't be necessary to pass [buildDir] to any of these
   // functions. It is fixed for a given configuration.
@@ -143,10 +151,13 @@
   List<String> computeCompilerArguments(
       List<String> vmOptions,
       List<String> sharedOptions,
+      List<String> dartOptions,
       List<String> dart2jsOptions,
       List<String> ddcOptions,
       List<String> args) {
-    return sharedOptions.toList()..addAll(args);
+    return sharedOptions.toList()
+      ..addAll(_configuration.sharedOptions)
+      ..addAll(args);
   }
 
   List<String> computeRuntimeArguments(
@@ -154,6 +165,7 @@
       TestInformation info,
       List<String> vmOptions,
       List<String> sharedOptions,
+      List<String> dartOptions,
       List<String> originalArguments,
       CommandArtifact artifact) {
     return [artifact.filename];
@@ -172,24 +184,14 @@
       TestInformation info,
       List<String> vmOptions,
       List<String> sharedOptions,
+      List<String> dartOptions,
       List<String> originalArguments,
       CommandArtifact artifact) {
     var args = <String>[];
-    if (previewDart2) {
-      if (_isDebug) {
-        // Temporarily disable background compilation to avoid flaky crashes
-        // (see http://dartbug.com/30016 for details).
-        args.add('--no-background-compilation');
-      }
-      if (_isChecked) {
-        args.add('--enable_asserts');
-      }
-    } else {
-      args.add('--no-preview-dart-2');
-      if (_isChecked) {
-        args.add('--enable_asserts');
-        args.add('--enable_type_checks');
-      }
+    if (_isDebug) {
+      // Temporarily disable background compilation to avoid flaky crashes
+      // (see http://dartbug.com/30016 for details).
+      args.add('--no-background-compilation');
     }
     if (_useEnableAsserts) {
       args.add('--enable_asserts');
@@ -202,7 +204,9 @@
     return args
       ..addAll(vmOptions)
       ..addAll(sharedOptions)
-      ..addAll(originalArguments);
+      ..addAll(_configuration.sharedOptions)
+      ..addAll(originalArguments)
+      ..addAll(dartOptions);
   }
 }
 
@@ -239,10 +243,14 @@
   List<String> computeCompilerArguments(
       List<String> vmOptions,
       List<String> sharedOptions,
+      List<String> dartOptions,
       List<String> dart2jsOptions,
       List<String> ddcOptions,
       List<String> args) {
-    return sharedOptions.toList()..addAll(vmOptions)..addAll(args);
+    return sharedOptions.toList()
+      ..addAll(_configuration.sharedOptions)
+      ..addAll(vmOptions)
+      ..addAll(args);
   }
 
   List<String> computeRuntimeArguments(
@@ -250,10 +258,11 @@
       TestInformation info,
       List<String> vmOptions,
       List<String> sharedOptions,
+      List<String> dartOptions,
       List<String> originalArguments,
       CommandArtifact artifact) {
     var args = <String>[];
-    if (_isChecked || _useEnableAsserts) {
+    if (_useEnableAsserts) {
       args.add('--enable_asserts');
     }
     if (_configuration.hotReload) {
@@ -261,10 +270,18 @@
     } else if (_configuration.hotReloadRollback) {
       args.add('--hot-reload-rollback-test-mode');
     }
+    var filename = artifact.filename;
+    if (runtimeConfiguration is DartkAdbRuntimeConfiguration) {
+      // On Android the Dill file will be pushed to a different directory on the
+      // device. Use that one instead.
+      filename = "${DartkAdbRuntimeConfiguration.DeviceTestDir}/out.dill";
+    }
     return args
       ..addAll(vmOptions)
       ..addAll(sharedOptions)
-      ..addAll(_replaceDartFiles(originalArguments, artifact.filename));
+      ..addAll(_configuration.sharedOptions)
+      ..addAll(_replaceDartFiles(originalArguments, filename))
+      ..addAll(dartOptions);
   }
 }
 
@@ -348,10 +365,19 @@
   }
 
   List<String> computeCompilerArguments(
-      vmOptions, sharedOptions, dart2jsOptions, ddcOptions, args) {
+      List<String> vmOptions,
+      List<String> sharedOptions,
+      List<String> dartOptions,
+      List<String> dart2jsOptions,
+      List<String> ddcOptions,
+      List<String> args) {
     // The result will be passed as an input to [extractArguments]
     // (i.e. the arguments to the [PipelineCommand]).
-    return <String>[]..addAll(vmOptions)..addAll(sharedOptions)..addAll(args);
+    return <String>[]
+      ..addAll(vmOptions)
+      ..addAll(sharedOptions)
+      ..addAll(_configuration.sharedOptions)
+      ..addAll(args);
   }
 
   List<String> computeRuntimeArguments(
@@ -359,6 +385,7 @@
       TestInformation info,
       List<String> vmOptions,
       List<String> sharedOptions,
+      List<String> dartOptions,
       List<String> originalArguments,
       CommandArtifact artifact) {
     CompilerConfiguration lastCompilerConfiguration =
@@ -368,6 +395,7 @@
         info,
         vmOptions,
         sharedOptions,
+        dartOptions,
         originalArguments,
         artifact);
   }
@@ -443,11 +471,13 @@
   List<String> computeCompilerArguments(
       List<String> vmOptions,
       List<String> sharedOptions,
+      List<String> dartOptions,
       List<String> dart2jsOptions,
       List<String> ddcOptions,
       List<String> args) {
     return <String>[]
       ..addAll(sharedOptions)
+      ..addAll(_configuration.sharedOptions)
       ..addAll(dart2jsOptions)
       ..addAll(args);
   }
@@ -467,6 +497,7 @@
       TestInformation info,
       List<String> vmOptions,
       List<String> sharedOptions,
+      List<String> dartOptions,
       List<String> originalArguments,
       CommandArtifact artifact) {
     Uri sdk = _useSdk
@@ -493,10 +524,13 @@
   List<String> computeCompilerArguments(
       List<String> vmOptions,
       List<String> sharedOptions,
+      List<String> dartOptions,
       List<String> dart2jsOptions,
       List<String> ddcOptions,
       List<String> args) {
-    var result = sharedOptions.toList()..addAll(ddcOptions);
+    var result = sharedOptions.toList()
+      ..addAll(_configuration.sharedOptions)
+      ..addAll(ddcOptions);
     // The file being compiled is the last argument.
     result.add(args.last);
 
@@ -505,10 +539,23 @@
 
   Command createCommand(String inputFile, String outputFile,
       List<String> sharedOptions, Map<String, String> environment) {
-    // TODO(jmesserly): restore testing on this once we have everyone migrated
-    // to DDC's Kernel backend. At that point we'd like to migrate from Analyzer
-    // summaries to Kernel IL.
-    final useDillFormat = false;
+    /// This can be disabled to test DDC's hybrid mode (automatically converting
+    /// Analyzer summaries to Kernel files).
+    ///
+    /// The current DDC configurations are:
+    ///
+    /// - using Analyzer ASTs and Analyzer summaries: the current default
+    ///   configuration; used in internal builds.
+    /// - using Kernel trees and Kernel IL files: the new default for external
+    ///   users (e.g. Flutter Web), and in the future, the only DDC mode.
+    /// - using Kernel trees, but Analyzer summaries (converted automatically):
+    ///   this was intended to help migrate internal users, but is currently
+    ///   unused.
+    ///
+    /// The first two are tested on the bots and are called "dartdevc" and
+    /// "dartdevk" respectively. This flag switches "dartdevk" to use either
+    /// Kernel IL files, or the Analyzer summaries.
+    final useDillFormat = useKernel;
 
     var args = <String>[];
     if (useKernel) {
@@ -528,6 +575,7 @@
       args.addAll(["--dart-sdk-summary", sdkSummary]);
     }
     args.addAll(sharedOptions);
+    args.addAll(_configuration.sharedOptions);
     if (!useKernel) {
       // TODO(jmesserly): library-root needs to be removed.
       args.addAll(
@@ -606,7 +654,7 @@
   int get timeoutMultiplier {
     var multiplier = 2;
     if (_isDebug) multiplier *= 4;
-    if (_isChecked) multiplier *= 2;
+    if (_useEnableAsserts) multiplier *= 2;
     return multiplier;
   }
 
@@ -614,15 +662,13 @@
       List<String> arguments, Map<String, String> environmentOverrides) {
     var commands = <Command>[];
 
-    if (previewDart2) {
-      commands.add(computeCompileToKernelCommand(
-          tempDir, arguments, environmentOverrides));
-    }
+    commands.add(computeCompileToKernelCommand(
+        tempDir, arguments, environmentOverrides));
 
     commands.add(
         computeDartBootstrapCommand(tempDir, arguments, environmentOverrides));
 
-    if (previewDart2 && !_configuration.keepGeneratedFiles) {
+    if (!_configuration.keepGeneratedFiles) {
       commands.add(computeRemoveKernelFileCommand(
           tempDir, arguments, environmentOverrides));
     }
@@ -694,12 +740,7 @@
       args.add('--obfuscate');
     }
 
-    if (previewDart2) {
-      args.addAll(_replaceDartFiles(arguments, tempKernelFile(tempDir)));
-    } else {
-      args.add('--no-preview-dart-2');
-      args.addAll(arguments);
-    }
+    args.addAll(_replaceDartFiles(arguments, tempKernelFile(tempDir)));
 
     return Command.compilation('precompiler', tempDir, bootstrapDependencies(),
         exec, args, environmentOverrides,
@@ -797,17 +838,18 @@
   List<String> computeCompilerArguments(
       List<String> vmOptions,
       List<String> sharedOptions,
+      List<String> dartOptions,
       List<String> dart2jsOptions,
       List<String> ddcOptions,
       List<String> originalArguments) {
     List<String> args = [];
-    if (_isChecked) {
+    if (_useEnableAsserts) {
       args.add('--enable_asserts');
-      args.add('--enable_type_checks');
     }
     return args
       ..addAll(filterVmOptions(vmOptions))
       ..addAll(sharedOptions)
+      ..addAll(_configuration.sharedOptions)
       ..addAll(originalArguments);
   }
 
@@ -816,20 +858,10 @@
       TestInformation info,
       List<String> vmOptions,
       List<String> sharedOptions,
+      List<String> dartOptions,
       List<String> originalArguments,
       CommandArtifact artifact) {
     var args = <String>[];
-    if (previewDart2) {
-      if (_isChecked) {
-        args.add('--enable_asserts');
-      }
-    } else {
-      args.add('--no-preview-dart-2');
-      if (_isChecked) {
-        args.add('--enable_asserts');
-        args.add('--enable_type_checks');
-      }
-    }
     if (_useEnableAsserts) {
       args.add('--enable_asserts');
     }
@@ -845,7 +877,9 @@
     return args
       ..addAll(vmOptions)
       ..addAll(sharedOptions)
-      ..addAll(originalArguments);
+      ..addAll(_configuration.sharedOptions)
+      ..addAll(originalArguments)
+      ..addAll(dartOptions);
   }
 }
 
@@ -859,7 +893,7 @@
   int get timeoutMultiplier {
     var multiplier = 1;
     if (_isDebug) multiplier *= 2;
-    if (_isChecked) multiplier *= 2;
+    if (_useEnableAsserts) multiplier *= 2;
     return multiplier;
   }
 
@@ -877,9 +911,6 @@
     var exec = "${_configuration.buildDirectory}/dart";
     var snapshot = "$tempDir/out.jitsnapshot";
     var args = ["--snapshot=$snapshot", "--snapshot-kind=app-jit"];
-    if (!previewDart2) {
-      args.add("--no-preview-dart-2");
-    }
     args.addAll(arguments);
 
     return Command.compilation('app_jit', tempDir, bootstrapDependencies(),
@@ -888,16 +919,22 @@
   }
 
   List<String> computeCompilerArguments(
-      vmOptions, sharedOptions, dart2jsOptions, ddcOptions, originalArguments) {
+      List<String> vmOptions,
+      List<String> sharedOptions,
+      List<String> dartOptions,
+      List<String> dart2jsOptions,
+      List<String> ddcOptions,
+      List<String> originalArguments) {
     var args = <String>[];
-    if (_isChecked) {
+    if (_useEnableAsserts) {
       args.add('--enable_asserts');
-      args.add('--enable_type_checks');
     }
     return args
       ..addAll(vmOptions)
       ..addAll(sharedOptions)
-      ..addAll(originalArguments);
+      ..addAll(_configuration.sharedOptions)
+      ..addAll(originalArguments)
+      ..addAll(dartOptions);
   }
 
   List<String> computeRuntimeArguments(
@@ -905,28 +942,19 @@
       TestInformation info,
       List<String> vmOptions,
       List<String> sharedOptions,
+      List<String> dartOptions,
       List<String> originalArguments,
       CommandArtifact artifact) {
     var args = <String>[];
-    if (previewDart2) {
-      if (_isChecked) {
-        args.add('--enable_asserts');
-      }
-    } else {
-      args.add("--no-preview-dart-2");
-      if (_isChecked) {
-        args.add('--enable_asserts');
-        args.add('--enable_type_checks');
-      }
-    }
     if (_useEnableAsserts) {
       args.add('--enable_asserts');
     }
-    args
+    return args
       ..addAll(vmOptions)
       ..addAll(sharedOptions)
-      ..addAll(_replaceDartFiles(originalArguments, artifact.filename));
-    return args;
+      ..addAll(_configuration.sharedOptions)
+      ..addAll(_replaceDartFiles(originalArguments, artifact.filename))
+      ..addAll(dartOptions);
   }
 }
 
@@ -979,6 +1007,7 @@
       TestInformation info,
       List<String> vmOptions,
       List<String> sharedOptions,
+      List<String> dartOptions,
       List<String> originalArguments,
       CommandArtifact artifact) {
     return <String>[];
@@ -1019,6 +1048,7 @@
       TestInformation info,
       List<String> vmOptions,
       List<String> sharedOptions,
+      List<String> dartOptions,
       List<String> originalArguments,
       CommandArtifact artifact) {
     return <String>[];
@@ -1047,6 +1077,7 @@
       TestInformation info,
       List<String> vmOptions,
       List<String> sharedOptions,
+      List<String> dartOptions,
       List<String> originalArguments,
       CommandArtifact artifact) {
     return <String>[];
@@ -1063,8 +1094,6 @@
 
   bool get _isAot;
 
-  bool get _isChecked;
-
   bool get _useEnableAsserts;
 
   String get executableScriptSuffix;
@@ -1079,11 +1108,18 @@
     final pkgVmDir = Platform.script.resolve('../../../pkg/vm').toFilePath();
     final genKernel = '${pkgVmDir}/tool/gen_kernel${executableScriptSuffix}';
 
-    final kernelBinariesFolder = _useSdk
-        ? '${_configuration.buildDirectory}/dart-sdk/lib/_internal'
-        : '${_configuration.buildDirectory}';
+    final String useAbiVersion = arguments.firstWhere(
+        (arg) => arg.startsWith('--use-abi-version='),
+        orElse: () => null);
 
-    // Always use strong platform as preview_dart_2 implies strong.
+    var kernelBinariesFolder = '${_configuration.buildDirectory}';
+    if (useAbiVersion != null) {
+      var version = useAbiVersion.split('=')[1];
+      kernelBinariesFolder += '/dart-sdk/lib/_internal/abiversions/$version';
+    } else if (_useSdk) {
+      kernelBinariesFolder += '/dart-sdk/lib/_internal';
+    }
+
     final vmPlatform = '$kernelBinariesFolder/vm_platform_strong.dill';
 
     final dillFile = tempKernelFile(tempDir);
@@ -1095,6 +1131,11 @@
       dillFile,
     ];
 
+    final batchArgs = <String>[];
+    if (useAbiVersion != null) {
+      batchArgs.add(useAbiVersion);
+    }
+
     args.add(arguments.where((name) => name.endsWith('.dart')).single);
     args.addAll(arguments.where((name) =>
         name.startsWith('-D') ||
@@ -1105,7 +1146,7 @@
         !arguments.any((String arg) => noCausalAsyncStacksRegExp.hasMatch(arg));
     args.add('-Ddart.developer.causal_async_stacks=$causalAsyncStacks');
 
-    if (_isChecked || _useEnableAsserts) {
+    if (_useEnableAsserts) {
       args.add('--enable_asserts');
     }
 
@@ -1116,7 +1157,7 @@
     }
 
     return Command.vmKernelCompilation(dillFile, true, bootstrapDependencies(),
-        genKernel, args, environmentOverrides);
+        genKernel, args, environmentOverrides, batchArgs);
   }
 }
 
@@ -1196,10 +1237,12 @@
   List<String> computeCompilerArguments(
       List<String> vmOptions,
       List<String> sharedOptions,
+      List<String> dartOptions,
       List<String> dart2jsOptions,
       List<String> ddcOptions,
       List<String> args) {
     List<String> arguments = new List<String>.from(sharedOptions);
+    arguments.addAll(_configuration.sharedOptions);
     for (String argument in args) {
       if (argument == "--ignore-unrecognized-flags") continue;
       arguments.add(argument);
@@ -1219,6 +1262,7 @@
       TestInformation info,
       List<String> vmOptions,
       List<String> sharedOptions,
+      List<String> dartOptions,
       List<String> originalArguments,
       CommandArtifact artifact) {
     if (runtimeConfiguration is! NoneRuntimeConfiguration) {
diff --git a/tools/testing/dart/configuration.dart b/tools/testing/dart/configuration.dart
index 526edff..85a0433 100644
--- a/tools/testing/dart/configuration.dart
+++ b/tools/testing/dart/configuration.dart
@@ -59,7 +59,7 @@
       this.testDriverErrorPort,
       this.localIP,
       this.keepGeneratedFiles,
-      this.dart2jsOptions,
+      this.sharedOptions,
       String packages,
       this.packageRoot,
       this.suiteDirectory,
@@ -116,8 +116,6 @@
   bool get useBlobs => configuration.useBlobs;
   bool get useSdk => configuration.useSdk;
   bool get useEnableAsserts => configuration.enableAsserts;
-  bool get useDart2JSWithKernel => configuration.useDart2JSWithKernel;
-  bool get useDart2JSOldFrontend => configuration.useDart2JSOldFrontEnd;
 
   // Various file paths.
 
@@ -142,11 +140,14 @@
   final bool keepGeneratedFiles;
 
   /// Extra dart2js options passed to the testing script.
-  final List<String> dart2jsOptions;
+  List<String> get dart2jsOptions => configuration.dart2jsOptions;
 
   /// Extra VM options passed to the testing script.
   List<String> get vmOptions => configuration.vmOptions;
 
+  /// Extra general options passed to the testing script.
+  final List<String> sharedOptions;
+
   String _packages;
 
   String get packages {
@@ -183,9 +184,9 @@
       Compiler.dartkb,
       Compiler.dartkp,
       Compiler.fasta,
+      Compiler.dart2js,
     ];
-    return fastaCompilers.contains(compiler) ||
-        (compiler == Compiler.dart2js && !useDart2JSOldFrontend);
+    return fastaCompilers.contains(compiler);
   }
 
   /// The base directory named for this configuration, like:
@@ -232,19 +233,11 @@
       return const ["--ignore-unrecognized-flags"];
     }
 
-    var args = ['--generate-code-with-compile-time-errors', '--test-mode'];
-    if (isChecked) args.add('--enable-checked-mode');
-
-    if (!runtime.isBrowser) {
-      args.add("--allow-mock-compilation");
-      args.add("--categories=all");
-    }
+    var args = ['--test-mode'];
 
     if (isMinified) args.add("--minify");
     if (isCsp) args.add("--csp");
     if (useEnableAsserts) args.add("--enable-asserts");
-    if (useDart2JSWithKernel) args.add("--use-kernel");
-    if (useDart2JSOldFrontend) args.add("--use-old-frontend");
     return args;
   }
 
@@ -442,6 +435,7 @@
         'csp': isCsp,
         'system': system.name,
         'vm_options': vmOptions,
+        'dart2js_options': dart2jsOptions,
         'fasta': usesFasta,
         'use_sdk': useSdk,
         'builder_tag': builderTag,
@@ -449,8 +443,6 @@
         'no_preview_dart_2': noPreviewDart2,
         'use_cfe': useAnalyzerCfe,
         'analyzer_use_fasta_parser': useAnalyzerFastaParser,
-        'dart2js_with_kernel': useDart2JSWithKernel,
-        'dart2js_old_frontend': useDart2JSOldFrontend,
         'enable_asserts': useEnableAsserts,
         'hot_reload': hotReload,
         'hot_reload_rollback': hotReloadRollback,
diff --git a/tools/testing/dart/environment.dart b/tools/testing/dart/environment.dart
index 720c72d..5245977 100644
--- a/tools/testing/dart/environment.dart
+++ b/tools/testing/dart/environment.dart
@@ -21,8 +21,6 @@
   "checked": new _Variable.bool((c) => c.isChecked),
   "compiler": new _Variable((c) => c.compiler.name, Compiler.names),
   "csp": new _Variable.bool((c) => c.isCsp),
-  "dart2js_with_kernel": new _Variable.bool((c) => c.useDart2JSWithKernel),
-  "dart2js_old_frontend": new _Variable.bool((c) => c.useDart2JSOldFrontend),
   "enable_asserts": new _Variable.bool((c) => c.useEnableAsserts),
   "fasta": new _Variable.bool((c) => c.usesFasta),
   "host_checked": new _Variable.bool((c) => c.isHostChecked),
diff --git a/tools/testing/dart/multitest.dart b/tools/testing/dart/multitest.dart
index 319c4b8..902dd9e 100644
--- a/tools/testing/dart/multitest.dart
+++ b/tools/testing/dart/multitest.dart
@@ -130,8 +130,8 @@
             outcomes[annotation.key].add(nextOutcome);
           } else {
             DebugLogger.warning(
-                "Warning: Invalid expectation '$nextOutcome' on line "
-                "$lineCount:\n${annotation.rest} ");
+                "${filePath.toNativePath()}: Invalid expectation "
+                "'$nextOutcome' on line $lineCount: $line");
           }
         }
       }
@@ -152,7 +152,8 @@
       .where((test) => test != 'none' && outcomes[test].isEmpty)
       .toList();
   for (var test in invalidTests) {
-    DebugLogger.warning("Warning: Test $test has no valid expectation.\n"
+    DebugLogger.warning(
+        "${filePath.toNativePath()}: Test $test has no valid expectation. "
         "Expected one of: ${_multitestOutcomes.toString()}");
 
     outcomes.remove(test);
@@ -200,9 +201,11 @@
       TestUtils.mkdirRecursive(targetDir, importDir);
     }
 
-    // Copy file.
-    futureCopies.add(TestUtils.copyFile(
-        sourceDir.join(importPath), targetDir.join(importPath)));
+    // Copy file. Because some test suites may be read-only, we don't
+    // want to copy the permissions, so we create the copy by writing.
+    final source = File(sourceDir.join(importPath).toNativePath()).openRead();
+    final target = File(targetDir.join(importPath).toNativePath()).openWrite();
+    futureCopies.add(source.pipe(target));
   }
 
   // Wait until all imports are copied before scheduling test cases.
@@ -301,7 +304,9 @@
         // This is just for safety reasons, we don't want to unintentionally
         // clobber files relative to the destination dir when copying them
         // over.
-        print("Relative import in multitest containing '..' is not allowed.");
+        DebugLogger.error("${filePath.toNativePath()}: "
+            "Relative import in multitest containing '..' is not allowed.");
+        DebugLogger.close();
         exit(1);
       }
 
diff --git a/tools/testing/dart/options.dart b/tools/testing/dart/options.dart
index 8593b59..67f5b27 100644
--- a/tools/testing/dart/options.dart
+++ b/tools/testing/dart/options.dart
@@ -25,7 +25,8 @@
   'analyze_library',
   'service',
   'kernel',
-  'observatory_ui'
+  'observatory_ui',
+  'ffi'
 ];
 
 /// Specifies a single command line option.
@@ -150,7 +151,6 @@
 test options, specifying how tests should be run.''',
         abbr: 'n',
         hide: true),
-    new _Option.bool('checked', 'Run tests in checked mode.'),
     new _Option.bool('strong', 'Deprecated, no-op.', hide: true),
     // TODO(sigmund): rename flag once we migrate all dart2js bots to the test
     // matrix.
@@ -174,13 +174,6 @@
         'Pass the --use-fasta-parser flag to analyzer',
         hide: true),
 
-    // TODO(sigmund): replace dart2js_with_kernel with preview-dart-2.
-    new _Option.bool(
-        'dart2js_with_kernel', 'Pass the --use-kernel flag to dart2js.',
-        hide: true),
-    new _Option.bool(
-        'dart2js_old_frontend', 'Pass the --use-old-frontend flag to dart2js.',
-        hide: true),
     new _Option.bool('hot_reload', 'Run hot reload stress tests.', hide: true),
     new _Option.bool(
         'hot_reload_rollback', 'Run hot reload rollback stress tests.',
@@ -219,6 +212,7 @@
     new _Option.bool('no-tree-shake', 'Disable kernel IR tree shaking.',
         hide: true),
     new _Option.bool('list', 'List tests only, do not run them.'),
+    new _Option.bool('list-configurations', 'Output list of configurations.'),
     new _Option.bool('list_status_files',
         'List status files for test-suites. Do not run any test suites.',
         hide: true),
@@ -303,6 +297,7 @@
     new _Option(
         'dart2js_options', 'Extra options for dart2js compilation step.',
         hide: true),
+    new _Option('shared_options', 'Extra shared options.', hide: true),
     new _Option(
         'suite_dir', 'Additional directory to add to the testing matrix.',
         hide: true),
@@ -344,6 +339,7 @@
     'local_ip',
     'output_directory',
     'progress',
+    'repeat',
     'report',
     'safari',
     'shard',
@@ -351,6 +347,7 @@
     'silent_failures',
     'step_name',
     'tasks',
+    'tests',
     'time',
     'verbose',
     'write_debug_log',
@@ -380,6 +377,17 @@
           verbose: arguments.contains("--verbose") || arguments.contains("-v"));
       return null;
     }
+    if (arguments.contains("--list-configurations")) {
+      final testMatrixFile = "tools/bots/test_matrix.json";
+      TestMatrix testMatrix = TestMatrix.fromPath(testMatrixFile);
+      for (final configuration in testMatrix.configurations
+          .map((configuration) => configuration.name)
+          .toList()
+            ..sort()) {
+        print(configuration);
+      }
+      return null;
+    }
     // Dart1 mode has been deprecated.
     if (arguments.contains("--no-preview-dart-2")) {
       return null;
@@ -606,6 +614,7 @@
 
     var dart2jsOptions = listOption("dart2js_options");
     var vmOptions = listOption("vm_options");
+    var sharedOptions = listOption("shared_options");
 
     // JSON reporting implies listing and reporting.
     if (data['report_in_json'] as bool) {
@@ -679,15 +688,13 @@
                         data["analyzer_use_fasta_parser"] as bool,
                     useBlobs: data["use_blobs"] as bool,
                     useSdk: data["use_sdk"] as bool,
-                    useDart2JSWithKernel: data["dart2js_with_kernel"] as bool,
-                    useDart2JSOldFrontEnd: data["dart2js_old_frontend"] as bool,
                     useHotReload: data["hot_reload"] as bool,
                     useHotReloadRollback: data["hot_reload_rollback"] as bool,
-                    isChecked: data["checked"] as bool,
                     isHostChecked: data["host_checked"] as bool,
                     isCsp: data["csp"] as bool,
                     isMinified: data["minified"] as bool,
                     vmOptions: vmOptions,
+                    dart2jsOptions: dart2jsOptions,
                     builderTag: data["builder_tag"] as String,
                     previewDart2: true);
             var configuration = new TestConfiguration(
@@ -730,7 +737,7 @@
                     data['test_server_cross_origin_port'] as int,
                 testDriverErrorPort: data["test_driver_error_port"] as int,
                 localIP: data["local_ip"] as String,
-                dart2jsOptions: dart2jsOptions,
+                sharedOptions: sharedOptions,
                 packages: data["packages"] as String,
                 packageRoot: data["package_root"] as String,
                 suiteDirectory: data["suite_dir"] as String,
@@ -747,11 +754,6 @@
         }
       }
     }
-
-    if (result.length > 1 && data["named_configuration"] != null) {
-      _fail("Named configuration cannot be used with multiple values for "
-          "arch, compiler, mode, or runtime");
-    }
     return result;
   }
 
diff --git a/tools/testing/dart/runtime_configuration.dart b/tools/testing/dart/runtime_configuration.dart
index af21399..c523839 100644
--- a/tools/testing/dart/runtime_configuration.dart
+++ b/tools/testing/dart/runtime_configuration.dart
@@ -42,6 +42,9 @@
         return new NoneRuntimeConfiguration();
 
       case Runtime.vm:
+        if (configuration.system == System.android) {
+          return new DartkAdbRuntimeConfiguration();
+        }
         return new StandaloneDartRuntimeConfiguration();
 
       case Runtime.dartPrecompiled:
@@ -79,6 +82,7 @@
       CommandArtifact artifact,
       List<String> arguments,
       Map<String, String> environmentOverrides,
+      List<String> extraLibs,
       bool isCrashExpected) {
     // TODO(ahe): Make this method abstract.
     throw "Unimplemented runtime '$runtimeType'";
@@ -98,6 +102,7 @@
       CommandArtifact artifact,
       List<String> arguments,
       Map<String, String> environmentOverrides,
+      List<String> extraLibs,
       bool isCrashExpected) {
     return <Command>[];
   }
@@ -125,6 +130,7 @@
       CommandArtifact artifact,
       List<String> arguments,
       Map<String, String> environmentOverrides,
+      List<String> extraLibs,
       bool isCrashExpected) {
     // TODO(ahe): Avoid duplication of this method between d8 and jsshell.
     checkArtifact(artifact);
@@ -148,6 +154,7 @@
       CommandArtifact artifact,
       List<String> arguments,
       Map<String, String> environmentOverrides,
+      List<String> extraLibs,
       bool isCrashExpected) {
     checkArtifact(artifact);
     return [
@@ -207,6 +214,7 @@
       CommandArtifact artifact,
       List<String> arguments,
       Map<String, String> environmentOverrides,
+      List<String> extraLibs,
       bool isCrashExpected) {
     String script = artifact.filename;
     String type = artifact.mimeType;
@@ -237,6 +245,7 @@
       CommandArtifact artifact,
       List<String> arguments,
       Map<String, String> environmentOverrides,
+      List<String> extraLibs,
       bool isCrashExpected) {
     String script = artifact.filename;
     String type = artifact.mimeType;
@@ -251,6 +260,31 @@
   }
 }
 
+class DartkAdbRuntimeConfiguration extends DartVmRuntimeConfiguration {
+  static const String DeviceDir = '/data/local/tmp/testing';
+  static const String DeviceTestDir = '/data/local/tmp/testing/test';
+
+  List<Command> computeRuntimeCommands(
+      TestSuite suite,
+      CommandArtifact artifact,
+      List<String> arguments,
+      Map<String, String> environmentOverrides,
+      List<String> extraLibs,
+      bool isCrashExpected) {
+    final String script = artifact.filename;
+    final String type = artifact.mimeType;
+    if (script != null && type != 'application/kernel-ir-fully-linked') {
+      throw "dart cannot run files of type '$type'.";
+    }
+
+    final String buildPath = suite.buildDir;
+    final String processTest = suite.processTestBinaryFileName;
+    return [
+      Command.adbDartk(buildPath, processTest, script, arguments, extraLibs)
+    ];
+  }
+}
+
 class DartPrecompiledAdbRuntimeConfiguration
     extends DartVmRuntimeConfiguration {
   static const String DeviceDir = '/data/local/tmp/precompilation-testing';
@@ -265,6 +299,7 @@
       CommandArtifact artifact,
       List<String> arguments,
       Map<String, String> environmentOverrides,
+      List<String> extraLibs,
       bool isCrashExpected) {
     String script = artifact.filename;
     String type = artifact.mimeType;
@@ -302,6 +337,7 @@
       CommandArtifact artifact,
       List<String> arguments,
       Map<String, String> environmentOverrides,
+      List<String> extraLibs,
       bool isCrashExpected) {
     String executable = suite.dartVmBinaryFileName;
     return selfCheckers
@@ -324,6 +360,7 @@
       CommandArtifact artifact,
       List<String> arguments,
       Map<String, String> environmentOverrides,
+      List<String> extraLibs,
       bool isCrashExpected) {
     throw "Unimplemented runtime '$runtimeType'";
   }
diff --git a/tools/testing/dart/test_configurations.dart b/tools/testing/dart/test_configurations.dart
index d20f969..32b9559 100644
--- a/tools/testing/dart/test_configurations.dart
+++ b/tools/testing/dart/test_configurations.dart
@@ -41,6 +41,7 @@
   new Path('tests/lib_2'),
   new Path('tests/standalone'),
   new Path('tests/standalone_2'),
+  new Path('tests/ffi'),
   new Path('utils/tests/peg'),
 ];
 
@@ -235,8 +236,7 @@
   // make a pool of all available adb devices.
   AdbDevicePool adbDevicePool;
   var needsAdbDevicePool = configurations.any((conf) {
-    return conf.runtime == Runtime.dartPrecompiled &&
-        conf.system == System.android;
+    return conf.system == System.android;
   });
   if (needsAdbDevicePool) {
     adbDevicePool = await AdbDevicePool.create();
diff --git a/tools/testing/dart/test_controller.js b/tools/testing/dart/test_controller.js
index 8a82fce..8515ddf 100644
--- a/tools/testing/dart/test_controller.js
+++ b/tools/testing/dart/test_controller.js
@@ -103,6 +103,17 @@
   notifyDone('FAIL');
 };
 
+window.onunhandledrejection = function (e) {
+  var reason = e.reason != null ? e.reason.stack : null;
+  var message = ('window.onunhandledrejection called: \n\n' + reason + '\n\n');
+  if (testExpectsGlobalError) {
+    testSuppressedGlobalErrors.push({message: message});
+    return;
+  }
+  recordEvent('window_onerror', message);
+  notifyDone('FAIL');
+};
+
 var waitForDone = false;
 
 var driverWindowCached = false;
diff --git a/tools/testing/dart/test_progress.dart b/tools/testing/dart/test_progress.dart
index 29117e8..25dd879 100644
--- a/tools/testing/dart/test_progress.dart
+++ b/tools/testing/dart/test_progress.dart
@@ -128,6 +128,9 @@
         test.result == Expectation.crash &&
         test.lastCommandExecuted is ProcessCommand &&
         test.lastCommandOutput.hasCoreDump) {
+      final mode = test.configuration.mode.name;
+      final arch = test.configuration.architecture.name;
+
       var pid = "${test.lastCommandOutput.pid}";
       var lastCommand = test.lastCommandExecuted as ProcessCommand;
 
@@ -139,13 +142,11 @@
       // To simplify the archiving code we simply copy binaries into current
       // folder next to core dumps and name them
       // `binary.${mode}_${arch}_${binary_name}`.
-      var binName = lastCommand.executable;
-      var binFile = new File(binName);
-      var binBaseName = new Path(binName).filename;
+      final binName = lastCommand.executable;
+      final binFile = new File(binName);
+      final binBaseName = new Path(binName).filename;
       if (!archivedBinaries.containsKey(binName) && binFile.existsSync()) {
-        var mode = test.configuration.mode.name;
-        var arch = test.configuration.architecture.name;
-        var archived = "binary.${mode}_${arch}_${binBaseName}";
+        final archived = "binary.${mode}_${arch}_${binBaseName}";
         TestUtils.copyFile(new Path(binName), new Path(archived));
         // On Windows also copy PDB file for the binary.
         if (Platform.isWindows) {
@@ -157,14 +158,31 @@
         archivedBinaries[binName] = archived;
       }
 
-      if (archivedBinaries.containsKey(binName)) {
+      final kernelServiceBaseName = 'kernel-service.dart.snapshot';
+      final kernelService =
+          new File('${binFile.parent.path}/$kernelServiceBaseName');
+      if (!archivedBinaries.containsKey(kernelService) &&
+          kernelService.existsSync()) {
+        final archived = "binary.${mode}_${arch}_${kernelServiceBaseName}";
+        TestUtils.copyFile(new Path(kernelService.path), new Path(archived));
+        archivedBinaries[kernelServiceBaseName] = archived;
+      }
+
+      final binaryPath = archivedBinaries[binName];
+      if (binaryPath != null) {
+        final binaries = <String>[binaryPath];
+        final kernelServiceBinaryPath = archivedBinaries[kernelServiceBaseName];
+        if (kernelServiceBinaryPath != null) {
+          binaries.add(kernelServiceBinaryPath);
+        }
+
         // We have found and copied the binary.
         RandomAccessFile unexpectedCrashesFile;
         try {
           unexpectedCrashesFile =
               new File('unexpected-crashes').openSync(mode: FileMode.append);
           unexpectedCrashesFile.writeStringSync(
-              "${test.displayName},${pid},${archivedBinaries[binName]}\n");
+              "${test.displayName},${pid},${binaries.join(',')}\n");
         } catch (e) {
           print('Failed to add crash to unexpected-crashes list: ${e}');
         } finally {
diff --git a/tools/testing/dart/test_runner.dart b/tools/testing/dart/test_runner.dart
index 1b1d03a..6deb34a 100644
--- a/tools/testing/dart/test_runner.dart
+++ b/tools/testing/dart/test_runner.dart
@@ -1217,13 +1217,20 @@
           .runCommand(command.displayName, command, timeout, command.arguments);
     } else if (command is ScriptCommand) {
       return command.run();
-    } else if (command is AdbPrecompilationCommand) {
+    } else if (command is AdbPrecompilationCommand ||
+        command is AdbDartkCommand) {
       assert(adbDevicePool != null);
-      return adbDevicePool.acquireDevice().then((AdbDevice device) {
-        return _runAdbPrecompilationCommand(device, command, timeout)
-            .whenComplete(() {
-          adbDevicePool.releaseDevice(device);
-        });
+      return adbDevicePool.acquireDevice().then((AdbDevice device) async {
+        try {
+          if (command is AdbPrecompilationCommand) {
+            return await _runAdbPrecompilationCommand(device, command, timeout);
+          } else {
+            return await _runAdbDartkCommand(
+                device, command as AdbDartkCommand, timeout);
+          }
+        } finally {
+          await adbDevicePool.releaseDevice(device);
+        }
       });
     } else if (command is VmBatchCommand) {
       var name = command.displayName;
@@ -1313,6 +1320,70 @@
         utf8.encode('$writer'), [], stopwatch.elapsed, false);
   }
 
+  Future<CommandOutput> _runAdbDartkCommand(
+      AdbDevice device, AdbDartkCommand command, int timeout) async {
+    final String buildPath = command.buildPath;
+    final String processTest = command.processTestFilename;
+    final String hostKernelFile = command.kernelFile;
+    final List<String> arguments = command.arguments;
+    final String devicedir = DartkAdbRuntimeConfiguration.DeviceDir;
+    final String deviceTestDir = DartkAdbRuntimeConfiguration.DeviceTestDir;
+
+    final timeoutDuration = new Duration(seconds: timeout);
+
+    final steps = <StepFunction>[];
+
+    steps.add(() => device.runAdbShellCommand(['rm', '-Rf', deviceTestDir]));
+    steps.add(() => device.runAdbShellCommand(['mkdir', '-p', deviceTestDir]));
+    steps.add(
+        () => device.pushCachedData("${buildPath}/dart", '$devicedir/dart'));
+    steps.add(() => device
+        .runAdbCommand(['push', hostKernelFile, '$deviceTestDir/out.dill']));
+
+    for (final String lib in command.extraLibraries) {
+      final String libname = "lib${lib}.so";
+      steps.add(() => device.runAdbCommand(
+          ['push', '${buildPath}/$libname', '$deviceTestDir/$libname']));
+    }
+
+    steps.add(() => device.runAdbShellCommand(
+        [
+          'export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:$deviceTestDir;'
+              '$devicedir/dart',
+        ]..addAll(arguments),
+        timeout: timeoutDuration));
+
+    final stopwatch = new Stopwatch()..start();
+    final writer = new StringBuffer();
+
+    await device.waitForBootCompleted();
+    await device.waitForDevice();
+
+    AdbCommandResult result;
+    for (var i = 0; i < steps.length; i++) {
+      var step = steps[i];
+      var commandStopwatch = new Stopwatch()..start();
+      result = await step();
+
+      writer.writeln("Executing ${result.command}");
+      if (result.stdout.length > 0) {
+        writer.writeln("Stdout:\n${result.stdout.trim()}");
+      }
+      if (result.stderr.length > 0) {
+        writer.writeln("Stderr:\n${result.stderr.trim()}");
+      }
+      writer.writeln("ExitCode: ${result.exitCode}");
+      writer.writeln("Time: ${commandStopwatch.elapsed}");
+      writer.writeln("");
+
+      // If one command fails, we stop processing the others and return
+      // immediately.
+      if (result.exitCode != 0) break;
+    }
+    return createCommandOutput(command, result.exitCode, result.timedOut,
+        utf8.encode('$writer'), [], stopwatch.elapsed, false);
+  }
+
   BatchRunnerProcess _getBatchRunner(String identifier) {
     // Start batch processes if needed
     var runners = _batchProcesses[identifier];
diff --git a/tools/testing/dart/test_suite.dart b/tools/testing/dart/test_suite.dart
index 2bf1708..b3ad21d 100644
--- a/tools/testing/dart/test_suite.dart
+++ b/tools/testing/dart/test_suite.dart
@@ -14,6 +14,7 @@
  */
 import 'dart:async';
 import 'dart:io';
+import 'dart:math';
 
 import "package:status_file/expectation.dart";
 
@@ -468,9 +469,10 @@
 
     var args = configuration.standardOptions.toList();
     if (configuration.compilerConfiguration.previewDart2) {
-      final dfePath = new Path("$buildDir/gen/kernel-service.dart.snapshot")
-          .absolute
-          .toNativePath();
+      final filename = configuration.architecture == Architecture.x64
+          ? '$buildDir/gen/kernel-service.dart.snapshot'
+          : '$buildDir/gen/kernel_service.dill';
+      final dfePath = new Path(filename).absolute.toNativePath();
       // '--dfe' has to be the first argument for run_vm_test to pick it up.
       args.insert(0, '--dfe=$dfePath');
     }
@@ -565,10 +567,14 @@
           _testListPossibleFilenames
               .add(suiteDir.append('$s.dart').toNativePath());
           // If the test is a multitest, the filename doesn't include the label.
-          if (s.lastIndexOf('/') != -1) {
-            s = s.substring(0, s.lastIndexOf('/'));
-            _testListPossibleFilenames
-                .add(suiteDir.append('$s.dart').toNativePath());
+          // Also if it has multiple VMOptions.  If both, remove two labels.
+          for (var i in [1, 2]) {
+            // Twice
+            if (s.lastIndexOf('/') != -1) {
+              s = s.substring(0, s.lastIndexOf('/'));
+              _testListPossibleFilenames
+                  .add(suiteDir.append('$s.dart').toNativePath());
+            }
           }
         }
       }
@@ -804,7 +810,11 @@
       var isCrashExpected = expectations.contains(Expectation.crash);
       var commands = makeCommands(info, vmOptionsVariant, allVmOptions,
           commonArguments, isCrashExpected);
-      enqueueNewTestCase(testName, commands, expectations, info);
+      var variantTestName = testName;
+      if (vmOptionsList.length > 1) {
+        variantTestName = "$testName/$vmOptionsVariant";
+      }
+      enqueueNewTestCase(variantTestName, commands, expectations, info);
     }
   }
 
@@ -813,14 +823,23 @@
     var commands = <Command>[];
     var compilerConfiguration = configuration.compilerConfiguration;
     var sharedOptions = info.optionsFromFile['sharedOptions'] as List<String>;
+    var dartOptions = info.optionsFromFile['dartOptions'] as List<String>;
     var dart2jsOptions = info.optionsFromFile['dart2jsOptions'] as List<String>;
     var ddcOptions = info.optionsFromFile['ddcOptions'] as List<String>;
 
+    var isMultitest = info.optionsFromFile["isMultitest"] as bool;
+    assert(!isMultitest || dartOptions.isEmpty);
+
     var compileTimeArguments = <String>[];
     String tempDir;
     if (compilerConfiguration.hasCompiler) {
       compileTimeArguments = compilerConfiguration.computeCompilerArguments(
-          vmOptions, sharedOptions, dart2jsOptions, ddcOptions, args);
+          vmOptions,
+          sharedOptions,
+          dartOptions,
+          dart2jsOptions,
+          ddcOptions,
+          args);
       // Avoid doing this for analyzer.
       var path = info.filePath;
       if (vmOptionsVariant != 0) {
@@ -854,12 +873,18 @@
       return commands;
     }
 
+    vmOptions = vmOptions
+        .map((s) =>
+            s.replaceAll("__RANDOM__", "${Random().nextInt(0x7fffffff)}"))
+        .toList();
+
     List<String> runtimeArguments =
         compilerConfiguration.computeRuntimeArguments(
             configuration.runtimeConfiguration,
             info,
             vmOptions,
             sharedOptions,
+            dartOptions,
             args,
             compilationArtifact);
 
@@ -870,8 +895,13 @@
     }
 
     return commands
-      ..addAll(configuration.runtimeConfiguration.computeRuntimeCommands(this,
-          compilationArtifact, runtimeArguments, environment, isCrashExpected));
+      ..addAll(configuration.runtimeConfiguration.computeRuntimeCommands(
+          this,
+          compilationArtifact,
+          runtimeArguments,
+          environment,
+          info.optionsFromFile["sharedObjects"] as List<String>,
+          isCrashExpected));
   }
 
   CreateTest makeTestCaseCreator(Map<String, dynamic> optionsFromFile) {
@@ -1126,18 +1156,7 @@
       }
     }
 
-    var isMultitest = optionsFromFile["isMultitest"] as bool;
-    var dartOptions = optionsFromFile["dartOptions"] as List<String>;
-
-    assert(!isMultitest || dartOptions == null);
     args.add(filePath.toNativePath());
-    if (dartOptions != null) {
-      // TODO(ahe): Because we add [dartOptions] here,
-      // [CompilerConfiguration.computeCompilerArguments] has to discard them
-      // later. Perhaps it would be simpler to pass [dartOptions] to
-      // [CompilerConfiguration.computeRuntimeArguments].
-      args.addAll(dartOptions);
-    }
 
     return args;
   }
@@ -1198,6 +1217,11 @@
    *   .html instead of .dart exists, the test was intended to be a web test
    *   and no wrapping is necessary.
    *
+   *     // SharedObjects=foobar
+   *
+   *   - This test requires libfoobar.so, libfoobar.dylib or foobar.dll to be
+   *   in the system linker path of the VM.
+   *
    *   - 'test.dart' assumes tests fail if
    *   the process returns a non-zero exit code (in the case of web tests, we
    *   check for PASS/FAIL indications in the test output).
@@ -1213,6 +1237,7 @@
     RegExp environmentRegExp = new RegExp(r"// Environment=(.*)");
     RegExp otherScriptsRegExp = new RegExp(r"// OtherScripts=(.*)");
     RegExp otherResourcesRegExp = new RegExp(r"// OtherResources=(.*)");
+    RegExp sharedObjectsRegExp = new RegExp(r"// SharedObjects=(.*)");
     RegExp packageRootRegExp = new RegExp(r"// PackageRoot=(.*)");
     RegExp packagesRegExp = new RegExp(r"// Packages=(.*)");
     RegExp isolateStubsRegExp = new RegExp(r"// IsolateStubs=(.*)");
@@ -1315,6 +1340,12 @@
       otherResources.addAll(wordSplit(match[1]));
     }
 
+    var sharedObjects = <String>[];
+    matches = sharedObjectsRegExp.allMatches(contents);
+    for (var match in matches) {
+      sharedObjects.addAll(wordSplit(match[1]));
+    }
+
     var isMultitest = multiTestRegExp.hasMatch(contents);
     var isMultiHtmlTest = multiHtmlTestRegExp.hasMatch(contents);
     var isolateMatch = isolateStubsRegExp.firstMatch(contents);
@@ -1362,7 +1393,7 @@
       "sharedOptions": sharedOptions ?? <String>[],
       "dart2jsOptions": dart2jsOptions ?? <String>[],
       "ddcOptions": ddcOptions ?? <String>[],
-      "dartOptions": dartOptions,
+      "dartOptions": dartOptions ?? <String>[],
       "environment": environment,
       "packageRoot": packageRoot,
       "packages": packages,
@@ -1372,6 +1403,7 @@
       "hasStaticWarning": hasStaticWarning,
       "otherScripts": otherScripts,
       "otherResources": otherResources,
+      "sharedObjects": sharedObjects,
       "isMultitest": isMultitest,
       "isMultiHtmlTest": isMultiHtmlTest,
       "subtestNames": subtestNames,
@@ -1385,7 +1417,7 @@
       "vmOptions": const [const <String>[]],
       "sharedOptions": const <String>[],
       "dart2jsOptions": const <String>[],
-      "dartOptions": null,
+      "dartOptions": const <String>[],
       "packageRoot": null,
       "packages": null,
       "hasSyntaxError": false,
diff --git a/tools/upload_abi_dills.sh b/tools/upload_abi_dills.sh
new file mode 100755
index 0000000..dad280a
--- /dev/null
+++ b/tools/upload_abi_dills.sh
@@ -0,0 +1,61 @@
+#!/usr/bin/env bash
+
+# Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE file.
+
+# Uploads the following dill files to CIPD, indexed by the current ABI version:
+#   $build_dir/vm_platform_strong.dill
+#   $build_dir/gen/kernel_service.dill
+#   $build_dir/gen_kernel_bytecode.dill
+# This script is a no-op unless $BUILDBOT_BUILDERNAME is "dart-sdk-linux-be".
+# It's also a no-op if dill files were already uploaded today.
+set -e
+set -x
+
+if [ -z "$2" ]; then
+  echo "Usage: upload_abi_dills.sh version_file build_dir"
+  exit 1
+fi
+
+if [ "$BUILDBOT_BUILDERNAME" != "dart-sdk-linux-be" ]; then
+  echo "This script only works on the dart-sdk-linux-be buildbot"
+  exit 0
+fi
+
+abi_version=$(sed -n "s/^ABI_VERSION \([0-9]*\)$/\1/p" "$1")
+git_revision=$(git rev-parse HEAD)
+current_date=$(date +%F)
+search_results=$(cipd search \
+  "dart/abiversions/$abi_version" \
+  -tag "date:$current_date" | grep "Instances:" || echo "")
+
+if [ ! -z "$search_results" ]; then
+  exit 0
+fi
+
+sdk_dir=$(pwd)
+tmpdir=$(mktemp -d)
+chmod 755 $tmpdir
+cleanup() {
+  rm -rf "$tmpdir"
+}
+trap cleanup EXIT HUP INT QUIT TERM PIPE
+pushd "$tmpdir"
+
+mkdir abiversions
+cp "$sdk_dir/$2/vm_platform_strong.dill" "abiversions/vm_platform_strong.dill"
+cp "$sdk_dir/$2/gen/kernel_service.dill" "abiversions/kernel_service.dill"
+cp "$sdk_dir/$2/gen_kernel_bytecode.dill" "abiversions/gen_kernel_bytecode.dill"
+
+cipd create \
+  -name dart/abiversions/$abi_version \
+  -in abiversions \
+  -install-mode copy \
+  -tag version:$abi_version \
+  -tag date:$current_date \
+  -tag git_revision:$git_revision \
+  -ref latest \
+  -ref version_$abi_version
+
+popd
diff --git a/tools/utils.py b/tools/utils.py
index ac9dcbf..32d843e 100644
--- a/tools/utils.py
+++ b/tools/utils.py
@@ -43,13 +43,15 @@
 
 class Version(object):
   def __init__(self, channel, major, minor, patch, prerelease,
-               prerelease_patch):
+               prerelease_patch, abi_version, oldest_supported_abi_version):
     self.channel = channel
     self.major = major
     self.minor = minor
     self.patch = patch
     self.prerelease = prerelease
     self.prerelease_patch = prerelease_patch
+    self.abi_version = abi_version
+    self.oldest_supported_abi_version = oldest_supported_abi_version
 
 
 # Try to guess the host operating system.
@@ -385,6 +387,16 @@
   return os.environ.get(key, '')
 
 
+def GetAbiVersion():
+  version = ReadVersionFile()
+  return version.abi_version
+
+
+def GetOldestSupportedAbiVersion():
+  version = ReadVersionFile()
+  return version.oldest_supported_abi_version
+
+
 def ReadVersionFile():
   def match_against(pattern, file_content):
     match = re.search(pattern, file_content, flags=re.MULTILINE)
@@ -406,10 +418,15 @@
   patch = match_against('^PATCH (\d+)$', content)
   prerelease = match_against('^PRERELEASE (\d+)$', content)
   prerelease_patch = match_against('^PRERELEASE_PATCH (\d+)$', content)
+  abi_version = match_against('^ABI_VERSION (\d+)$', content)
+  oldest_supported_abi_version = match_against(
+      '^OLDEST_SUPPORTED_ABI_VERSION (\d+)$', content)
 
-  if channel and major and minor and prerelease and prerelease_patch:
+  if channel and major and minor and prerelease and prerelease_patch and \
+      abi_version and oldest_supported_abi_version:
     return Version(
-        channel, major, minor, patch, prerelease, prerelease_patch)
+        channel, major, minor, patch, prerelease, prerelease_patch, abi_version,
+        oldest_supported_abi_version)
   else:
     print "Warning: VERSION file (%s) has wrong format" % VERSION_FILE
     return None
@@ -441,12 +458,12 @@
       return fd.read()
   except:
     pass
-
-  p = subprocess.Popen(['git', 'log', '-n', '1', '--pretty=format:%H'],
+  p = subprocess.Popen(['git', 'rev-parse', 'HEAD'],
                        stdout = subprocess.PIPE,
                        stderr = subprocess.STDOUT, shell=IsWindows(),
                        cwd = DART_DIR)
   output, _ = p.communicate()
+  output = output.strip()
   # We expect a full git hash
   if len(output) != 40:
     print "Warning: could not parse git commit, output was %s" % output
@@ -455,11 +472,12 @@
 
 
 def GetShortGitHash():
-  p = subprocess.Popen(['git', 'log', '-n', '1', '--pretty=format:%h'],
+  p = subprocess.Popen(['git', 'rev-parse', '--short', 'HEAD'],
                        stdout = subprocess.PIPE,
                        stderr = subprocess.STDOUT, shell=IsWindows(),
                        cwd = DART_DIR)
   output, _ = p.communicate()
+  output = output.strip()
   if p.wait() != 0:
     return None
   return output
@@ -734,13 +752,13 @@
 
 
 class UnexpectedCrash(object):
-  def __init__(self, test, pid, binary):
+  def __init__(self, test, pid, *binaries):
     self.test = test
     self.pid = pid
-    self.binary = binary
+    self.binaries = binaries
 
   def __str__(self):
-    return "Crash(%s: %s %s)" % (self.test, self.binary, self.pid)
+    return "Crash(%s: %s %s)" % (self.test, self.pid, ', '.join(self.binaries))
 
 
 class PosixCoreDumpEnabler(object):
@@ -854,7 +872,7 @@
     files = set()
     missing = []
     for crash in crashes:
-      files.add(crash.binary)
+      files.update(crash.binaries)
       core = self._find_coredump_file(crash)
       if core:
         files.add(core)
@@ -862,11 +880,11 @@
         missing.append(crash)
     if self._output_directory is not None and self._is_shard():
       print (
-          "INFO: Copying collected dumps and binaries into output directory\n"
+          "INFO: Moving collected dumps and binaries into output directory\n"
           "INFO: They will be uploaded to isolate server. Look for \"isolated"
           " out\" under the failed step on the build page.\n"
           "INFO: For more information see runtime/docs/infra/coredumps.md")
-      self._copy(files)
+      self._move(files)
     else:
       print (
           "INFO: Uploading collected dumps and binaries into Cloud Storage\n"
@@ -889,16 +907,12 @@
         "Existing files which *did not* match the pattern inside the search "
         "directory are are:\n  %s"
         % (missing_as_string, self._search_dir, '\n  '.join(other_files)))
-    if throw:
+    # TODO: Figure out why windows coredump generation does not work.
+    # See http://dartbug.com/36469
+    if throw and GuessOS() != 'win32':
       raise Exception('Missing crash dumps for: %s' % missing_as_string)
 
-  def _copy(self, files):
-    for file in files:
-      tarname = self._tar(file)
-      print '+++ Copying %s to output_directory (%s)' % (tarname, self._output_directory)
-      shutil.copy(tarname, self._output_directory)
-
-  def _tar(self, file):
+  def _get_file_name(self, file):
     # Sanitize the name: actual cores follow 'core.%d' pattern, crashed
     # binaries are copied next to cores and named
     # 'binary.<mode>_<arch>_<binary_name>'.
@@ -909,7 +923,21 @@
     if is_binary:
       (mode, arch, binary_name) = suffix.split('_', 2)
       name = binary_name
+    return (name, is_binary)
 
+  def _move(self, files):
+    for file in files:
+      print '+++ Moving %s to output_directory (%s)' % (file, self._output_directory)
+      (name, is_binary) = self._get_file_name(file)
+      destination = os.path.join(self._output_directory, name)
+      shutil.move(file, destination)
+      if is_binary and os.path.exists(file + '.pdb'):
+        # Also move a PDB file if there is one.
+        pdb = os.path.join(self._output_directory, name + '.pdb')
+        shutil.move(file + '.pdb', pdb)
+
+  def _tar(self, file):
+    (name, is_binary) = self._get_file_name(file)
     tarname = '%s.tar.gz' % name
 
     # Compress the file.
@@ -955,7 +983,7 @@
   def _find_unexpected_crashes(self):
     """Load coredumps file. Each line has the following format:
 
-        test-name,pid,binary-file
+        test-name,pid,binary-file1,binary-file2,...
     """
     try:
       with open(BaseCoreDumpArchiver._UNEXPECTED_CRASHES_FILE) as f:
diff --git a/utils/application_snapshot.gni b/utils/application_snapshot.gni
index 67749bb..e577331 100644
--- a/utils/application_snapshot.gni
+++ b/utils/application_snapshot.gni
@@ -197,11 +197,6 @@
   if (defined(invoker.inputs)) {
     extra_inputs += invoker.inputs
   }
-  if (defined(invoker.dot_packages)) {
-    dot_packages = invoker.dot_packages
-  } else {
-    dot_packages = rebase_path("$_dart_root/.packages")
-  }
   output = "$root_gen_dir/$name.dart.S"
   if (defined(invoker.output)) {
     output = invoker.output
@@ -220,7 +215,6 @@
 
     vm_args = [
       "--deterministic",
-      "--packages=$dot_packages",
       "--snapshot-kind=app-aot-assembly",
       "--assembly=$abs_output",
     ] + aot_vm_args
diff --git a/utils/bazel/kernel_worker.dart b/utils/bazel/kernel_worker.dart
index a9a0145..53cf818 100644
--- a/utils/bazel/kernel_worker.dart
+++ b/utils/bazel/kernel_worker.dart
@@ -15,10 +15,12 @@
 import 'package:args/args.dart';
 import 'package:bazel_worker/bazel_worker.dart';
 import 'package:build_integration/file_system/multi_root.dart';
+import 'package:dev_compiler/src/kernel/target.dart';
 import 'package:front_end/src/api_unstable/bazel_worker.dart' as fe;
 import 'package:kernel/ast.dart' show Component, Library;
 import 'package:kernel/target/targets.dart';
 import 'package:vm/target/vm.dart';
+import 'package:compiler/src/kernel/dart2js_target.dart';
 
 main(List<String> args) async {
   args = preprocessArgs(args);
@@ -30,8 +32,8 @@
     }
     await new KernelWorker().run();
   } else {
-    var succeeded = await computeKernel(args);
-    if (!succeeded) {
+    var result = await computeKernel(args);
+    if (!result.succeeded) {
       exitCode = 15;
     }
   }
@@ -39,13 +41,38 @@
 
 /// A bazel worker loop that can compute full or summary kernel files.
 class KernelWorker extends AsyncWorkerLoop {
+  fe.InitializedCompilerState previousState;
+
   Future<WorkResponse> performRequest(WorkRequest request) async {
     var outputBuffer = new StringBuffer();
     var response = new WorkResponse()..exitCode = 0;
     try {
-      var succeeded = await computeKernel(request.arguments,
-          isWorker: true, outputBuffer: outputBuffer);
-      if (!succeeded) {
+      fe.InitializedCompilerState previousStateToPass;
+      if (request.arguments.contains("--reuse-compiler-result")) {
+        previousStateToPass = previousState;
+      } else {
+        previousState = null;
+      }
+      ComputeKernelResult result;
+      // TODO(vsm): See https://github.com/dart-lang/sdk/issues/36644.
+      // If the CFE is crashing with previous state, then clear compilation
+      // state and try again.
+      try {
+        result = await computeKernel(request.arguments,
+            isWorker: true,
+            outputBuffer: outputBuffer,
+            inputs: request.inputs,
+            previousState: previousStateToPass);
+      } catch (_) {
+        outputBuffer.clear();
+        result = await computeKernel(request.arguments,
+            isWorker: true,
+            outputBuffer: outputBuffer,
+            inputs: request.inputs,
+            previousState: null);
+      }
+      previousState = result.previousState;
+      if (!result.succeeded) {
         response.exitCode = 15;
       }
     } catch (e, s) {
@@ -83,7 +110,7 @@
 
 /// An [ArgParser] for generating kernel summaries.
 final summaryArgsParser = new ArgParser()
-  ..addFlag('help', negatable: false)
+  ..addFlag('help', negatable: false, abbr: 'h')
   ..addFlag('exclude-non-sources',
       negatable: false,
       help: 'Whether source files loaded implicitly should be included as '
@@ -92,14 +119,27 @@
       defaultsTo: true,
       negatable: true,
       help: 'Whether to only build summary files.')
+  ..addOption('target',
+      allowed: const ['vm', 'dart2js', 'ddc'],
+      help: 'Build kernel for the vm, dart2js, or ddc')
   ..addOption('dart-sdk-summary')
   ..addMultiOption('input-summary')
   ..addMultiOption('input-linked')
   ..addMultiOption('multi-root')
   ..addOption('multi-root-scheme', defaultsTo: 'org-dartlang-multi-root')
+  ..addOption('libraries-file')
   ..addOption('packages-file')
   ..addMultiOption('source')
-  ..addOption('output');
+  ..addOption('output')
+  ..addFlag('reuse-compiler-result', defaultsTo: false)
+  ..addFlag('use-incremental-compiler', defaultsTo: false);
+
+class ComputeKernelResult {
+  final bool succeeded;
+  final fe.InitializedCompilerState previousState;
+
+  ComputeKernelResult(this.succeeded, this.previousState);
+}
 
 /// Computes a kernel file based on [args].
 ///
@@ -109,8 +149,11 @@
 /// instead of printed to the console.
 ///
 /// Returns whether or not the summary was successfully output.
-Future<bool> computeKernel(List<String> args,
-    {bool isWorker: false, StringBuffer outputBuffer}) async {
+Future<ComputeKernelResult> computeKernel(List<String> args,
+    {bool isWorker: false,
+    StringBuffer outputBuffer,
+    Iterable<Input> inputs,
+    fe.InitializedCompilerState previousState}) async {
   dynamic out = outputBuffer ?? stderr;
   bool succeeded = true;
   var parsedArgs = summaryArgsParser.parse(args);
@@ -118,7 +161,7 @@
   if (parsedArgs['help']) {
     out.writeln(summaryArgsParser.usage);
     if (!isWorker) exit(0);
-    return false;
+    return new ComputeKernelResult(false, previousState);
   }
 
   // Bazel creates an overlay file system where some files may be located in the
@@ -128,37 +171,121 @@
   if (multiRoots.isEmpty) multiRoots.add(Uri.base);
   var fileSystem = new MultiRootFileSystem(parsedArgs['multi-root-scheme'],
       multiRoots, fe.StandardFileSystem.instance);
-  var sources = (parsedArgs['source'] as List<String>).map(Uri.parse).toList();
-  Target target;
-  var summaryOnly = parsedArgs['summary-only'] as bool;
+  var sources =
+      (parsedArgs['source'] as List<String>).map(Uri.base.resolve).toList();
   var excludeNonSources = parsedArgs['exclude-non-sources'] as bool;
+
+  var summaryOnly = parsedArgs['summary-only'] as bool;
+  // TODO(sigmund,jakemac): make target mandatory. We allow null to be backwards
+  // compatible while we migrate existing clients of this tool.
+  var targetName =
+      (parsedArgs['target'] as String) ?? (summaryOnly ? 'ddc' : 'vm');
   var targetFlags = new TargetFlags();
-  if (summaryOnly) {
-    target = new SummaryTarget(sources, excludeNonSources, targetFlags);
-  } else {
-    target = new VmTarget(targetFlags);
+  Target target;
+  switch (targetName) {
+    case 'vm':
+      target = new VmTarget(targetFlags);
+      if (summaryOnly) {
+        out.writeln('error: --summary-only not supported for the vm target');
+      }
+      break;
+    case 'dart2js':
+      target = new Dart2jsTarget('dart2js', targetFlags);
+      if (summaryOnly) {
+        out.writeln(
+            'error: --summary-only not supported for the dart2js target');
+      }
+      break;
+    case 'ddc':
+      // TODO(jakemac):If `generateKernel` changes to return a summary
+      // component, process the component instead.
+      target = new DevCompilerSummaryTarget(sources, excludeNonSources);
+      if (!summaryOnly) {
+        out.writeln('error: --no-summary-only not supported for the '
+            'ddc target');
+      }
+      break;
+    default:
+      out.writeln('error: unsupported target: $targetName');
   }
-  var state = await fe.initializeCompiler(
-      // TODO(sigmund): pass an old state once we can make use of it.
-      null,
-      Uri.base.resolve(parsedArgs['dart-sdk-summary']),
-      Uri.base.resolve(parsedArgs['packages-file']),
-      (parsedArgs['input-summary'] as List<String>)
-          .map(Uri.base.resolve)
-          .toList(),
-      (parsedArgs['input-linked'] as List<String>)
-          .map(Uri.base.resolve)
-          .toList(),
-      target,
-      fileSystem);
+
+  // TODO(sigmund,jakemac): make it mandatory. We allow null while we migrate
+  // existing clients of this tool.
+  var librariesSpec = parsedArgs['libraries-file'] == null
+      ? null
+      : Uri.base.resolve(parsedArgs['libraries-file']);
+
+  List<Uri> linkedInputs = (parsedArgs['input-linked'] as List<String>)
+      .map(Uri.base.resolve)
+      .toList();
+
+  List<Uri> summaryInputs = (parsedArgs['input-summary'] as List<String>)
+      .map(Uri.base.resolve)
+      .toList();
+
+  fe.InitializedCompilerState state;
+  bool usingIncrementalCompiler = false;
+  if (parsedArgs['use-incremental-compiler'] && linkedInputs.isEmpty) {
+    usingIncrementalCompiler = true;
+
+    /// Build a map of uris to digests.
+    final inputDigests = <Uri, List<int>>{};
+    for (var input in inputs) {
+      var uri = Uri.parse(input.path);
+      if (uri.scheme.isEmpty) {
+        uri = Uri.parse('file://${input.path}');
+      }
+      inputDigests[uri] = input.digest;
+    }
+
+    state = await fe.initializeIncrementalCompiler(
+        previousState,
+        Uri.base.resolve(parsedArgs['dart-sdk-summary']),
+        Uri.base.resolve(parsedArgs['packages-file']),
+        librariesSpec,
+        summaryInputs,
+        inputDigests,
+        target,
+        fileSystem,
+        summaryOnly);
+  } else {
+    state = await fe.initializeCompiler(
+        // TODO(sigmund): pass an old state once we can make use of it.
+        null,
+        Uri.base.resolve(parsedArgs['dart-sdk-summary']),
+        librariesSpec,
+        Uri.base.resolve(parsedArgs['packages-file']),
+        summaryInputs,
+        linkedInputs,
+        target,
+        fileSystem);
+  }
 
   void onDiagnostic(fe.DiagnosticMessage message) {
     fe.printDiagnosticMessage(message, out.writeln);
     succeeded = false;
   }
 
-  var kernel =
-      await fe.compile(state, sources, onDiagnostic, summaryOnly: summaryOnly);
+  List<int> kernel;
+  if (usingIncrementalCompiler) {
+    state.options.onDiagnostic = onDiagnostic;
+    Component incrementalComponent = await state.incrementalCompiler
+        .computeDelta(entryPoints: sources, fullComponent: true);
+
+    kernel = await state.incrementalCompiler.context.runInContext((_) {
+      if (summaryOnly) {
+        incrementalComponent.uriToSource.clear();
+        incrementalComponent.problemsAsJson = null;
+        incrementalComponent.mainMethod = null;
+        target.performOutlineTransformations(incrementalComponent);
+      }
+
+      return Future.value(fe.serializeComponent(incrementalComponent));
+    });
+  } else {
+    kernel = await fe.compile(state, sources, onDiagnostic,
+        summaryOnly: summaryOnly);
+  }
 
   if (kernel != null) {
     var outputFile = new File(parsedArgs['output']);
@@ -168,11 +295,11 @@
     assert(!succeeded);
   }
 
-  return succeeded;
+  return new ComputeKernelResult(succeeded, state);
 }
 
-/// A target that transforms outlines to meet the requirements of summaries in
-/// bazel and package-build.
+/// Extends the DevCompilerTarget to transform outlines to meet the requirements
+/// of summaries in bazel and package-build.
 ///
 /// Build systems like package-build may provide the same input file twice to
 /// the summary worker, but only intends to have it in one output summary.  The
@@ -183,15 +310,15 @@
 ///
 /// Note: this transformation is destructive and is only intended to be used
 /// when generating summaries.
-class SummaryTarget extends NoneTarget {
+class DevCompilerSummaryTarget extends DevCompilerTarget {
   final List<Uri> sources;
   final bool excludeNonSources;
 
-  SummaryTarget(this.sources, this.excludeNonSources, TargetFlags flags)
-      : super(flags);
+  DevCompilerSummaryTarget(this.sources, this.excludeNonSources);
 
   @override
   void performOutlineTransformations(Component component) {
+    super.performOutlineTransformations(component);
     if (!excludeNonSources) return;
 
     List<Library> libraries = new List.from(component.libraries);
diff --git a/utils/compile_platform.gni b/utils/compile_platform.gni
index 94bce50..1d30b6f 100644
--- a/utils/compile_platform.gni
+++ b/utils/compile_platform.gni
@@ -34,6 +34,11 @@
         invoker.add_implicit_vm_platform_dependency
   }
 
+  outline = "vm_outline_strong.dill"
+  if (defined(invoker.outline)) {
+    outline = invoker.outline
+  }
+
   prebuilt_dart_action(target_name) {
     script = "$_dart_root/pkg/front_end/tool/_fasta/compile_platform.dart"
 
@@ -44,7 +49,6 @@
     inputs = []
     deps = []
     args = []
-
     if (defined(invoker.deps)) {
       deps += invoker.deps
     }
@@ -54,7 +58,7 @@
     }
 
     if (add_implicit_vm_platform_dependency) {
-      inputs += [ "$root_out_dir/vm_outline_strong.dill" ]
+      inputs += [ "$root_out_dir/$outline" ]
       deps += [ "$_dart_root/runtime/vm:vm_platform" ]
     }
     depfile = outputs[0] + ".d"
@@ -73,7 +77,7 @@
           [ rebase_path(invoker.libraries_specification_uri, root_build_dir) ]
     }
     args +=
-        [ rebase_path("$root_out_dir/vm_outline_strong.dill", root_build_dir) ]
+        [ rebase_path("$root_out_dir/$outline", root_build_dir) ]
     args += rebase_path(outputs, root_build_dir)
   }
 }
diff --git a/utils/dartdevc/BUILD.gn b/utils/dartdevc/BUILD.gn
index 039604a..767bdb9 100644
--- a/utils/dartdevc/BUILD.gn
+++ b/utils/dartdevc/BUILD.gn
@@ -19,8 +19,7 @@
     rebase_path("../../sdk"),
     "--dart-sdk-summary",
     rebase_path(sdk_summary),
-    "--library-root",
-    rebase_path("../../pkg/dev_compiler"),
+    "-k",
     "-o",
     "dartdevc.js",
     rebase_path("../../pkg/dev_compiler/bin/dartdevc.dart"),
@@ -347,6 +346,6 @@
     "--output",
     rebase_path(sdk_dill),
     "--libraries",
-    rebase_path("//sdk/lib/libraries.json"),
+    rebase_path("../../sdk/lib/libraries.json"),
   ]
 }
diff --git a/utils/gen_kernel/BUILD.gn b/utils/gen_kernel/BUILD.gn
new file mode 100644
index 0000000..d69281f
--- /dev/null
+++ b/utils/gen_kernel/BUILD.gn
@@ -0,0 +1,22 @@
+# Copyright (c) 2019, the Dart project authors.  Please see the AUTHORS file
+# for details. All rights reserved. Use of this source code is governed by a
+# BSD-style license that can be found in the LICENSE file.
+
+import("../application_snapshot.gni")
+
+application_snapshot("gen_kernel") {
+  main_dart = "../../pkg/vm/bin/gen_kernel.dart"
+  deps = [
+    "../../runtime/vm:vm_platform",
+  ]
+  # NOTE: The output filename must be kept in sync with the output of the
+  # vm_platform rule.
+  vm_platform_out = get_label_info("../../runtime/vm:vm_platform", "root_out_dir")
+  vm_platform = "$vm_platform_out/vm_platform_strong.dill"
+  training_args = [
+      "--platform",
+      rebase_path(vm_platform),
+      rebase_path("../../pkg/vm/bin/gen_kernel.dart"),
+      "-o -",
+  ]
+}
diff --git a/utils/kernel-service/BUILD.gn b/utils/kernel-service/BUILD.gn
index 3d9a72a..846640b 100644
--- a/utils/kernel-service/BUILD.gn
+++ b/utils/kernel-service/BUILD.gn
@@ -60,40 +60,51 @@
   output = "$root_out_dir/frontend_server.dart.snapshot"
 }
 
-prebuilt_dart_action("kernel_service_dill") {
-  deps = [
-    "../../runtime/vm:vm_platform",
-    "../../runtime/vm:kernel_platform_files($dart_host_toolchain)",
-  ]
-  kernel_service_script = "../../pkg/vm/bin/kernel_service.dart"
-  gen_kernel_script = "../../pkg/vm/bin/gen_kernel.dart"
+template("kernel_service_dill") {
+  prebuilt_dart_action("kernel_service" + target_name + "_dill") {
+    deps = [
+      "../../runtime/vm:kernel_platform_files($dart_host_toolchain)",
+      "../../runtime/vm:vm_platform",
+    ]
+    kernel_service_script = "../../pkg/vm/bin/kernel_service.dart"
+    gen_kernel_script = "../../pkg/vm/bin/gen_kernel.dart"
 
-  inputs = [
-    gen_kernel_script,
-    kernel_service_script,
-    "$root_out_dir/vm_platform_strong.dill",
-  ]
-  output = "$root_gen_dir/kernel_service.dill"
-  outputs = [
-    output,
-  ]
+    inputs = [
+      gen_kernel_script,
+      kernel_service_script,
+      "$root_out_dir/vm_platform_strong.dill",
+    ]
+    output = "$root_gen_dir/kernel_service" + invoker.target_name + ".dill"
+    outputs = [
+      output,
+    ]
 
-  depfile = "$root_gen_dir/kernel_service_dill.d"
-  abs_depfile = rebase_path(depfile)
-  rebased_output = rebase_path(output, root_out_dir)
-  vm_args = [
-    "--depfile=$abs_depfile",
-    "--depfile_output_filename=$rebased_output",
-  ]
+    depfile = "$root_gen_dir/kernel_service" + invoker.target_name + "_dill.d"
+    abs_depfile = rebase_path(depfile)
+    rebased_output = rebase_path(output, root_build_dir)
+    vm_args = [
+      "--depfile=$abs_depfile",
+      "--depfile_output_filename=$rebased_output",
+    ]
 
-  script = gen_kernel_script
+    script = gen_kernel_script
 
-  args = [
-    "--packages=" + rebase_path("../../.packages"),
-    "--platform=" + rebase_path("$root_out_dir/vm_platform_strong.dill"),
-    "--no-aot",
-    "--no-embed-sources",
-    "--output=" + rebase_path("$root_gen_dir/kernel_service.dill"),
-    rebase_path(kernel_service_script),
-  ]
+    args =
+        invoker.extra_args + [
+          "--packages=" + rebase_path("../../.packages"),
+          "--platform=" + rebase_path("$root_out_dir/vm_platform_strong.dill"),
+          "--no-aot",
+          "--no-embed-sources",
+          "--output=" + rebase_path(output),
+          rebase_path(kernel_service_script),
+        ]
+  }
+}
+
+kernel_service_dill("") {
+  extra_args = []
+}
+
+kernel_service_dill("_bytecode") {
+  extra_args = [ "--gen-bytecode" ]
 }